(()=>{"use strict";var e,b={},m={};function t(e){var n=m[e];if(void 0!==n)return n.exports;var r=m[e]={exports:{}};return b[e].call(r.exports,r,r.exports,t),r.exports}t.m=b,e=[],t.O=(n,r,u,o)=>{if(!r){var a=1/0;for(i=0;i<e.length;i++){for(var[r,u,o]=e[i],s=!0,l=0;l<r.length;l++)(!1&o||a>=o)&&Object.keys(t.O).every(v=>t.O[v](r[l]))?r.splice(l--,1):(s=!1,o<a&&(a=o));if(s){e.splice(i--,1);var d=u();void 0!==d&&(n=d)}}return n}o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[r,u,o]},t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce((n,r)=>(t.f[r](e,n),n),[])),t.u=e=>e+".1999831eb125040c.js",t.miniCssF=e=>{},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="ClientApp:";t.l=(r,u,o,i)=>{if(e[r])e[r].push(u);else{var a,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var f=l[d];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==n+o){a=f;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,t.nc&&a.setAttribute("nonce",t.nc),a.setAttribute("data-webpack",n+o),a.src=t.tu(r)),e[r]=[u];var c=(g,v)=>{a.onerror=a.onload=null,clearTimeout(p);var h=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(v)),g)return g(v)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),t.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;t.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),t.tu=e=>t.tt().createScriptURL(e),t.p="/scripts/ClientApp/",(()=>{var e={runtime:0};t.f.j=(u,o)=>{var i=t.o(e,u)?e[u]:void 0;if(0!==i)if(i)o.push(i[2]);else if("runtime"!=u){var a=new Promise((f,c)=>i=e[u]=[f,c]);o.push(i[2]=a);var s=t.p+t.u(u),l=new Error;t.l(s,f=>{if(t.o(e,u)&&(0!==(i=e[u])&&(e[u]=void 0),i)){var c=f&&("load"===f.type?"missing":f.type),p=f&&f.target&&f.target.src;l.message="Loading chunk "+u+" failed.\n("+c+": "+p+")",l.name="ChunkLoadError",l.type=c,l.request=p,i[1](l)}},"chunk-"+u,u)}else e[u]=0},t.O.j=u=>0===e[u];var n=(u,o)=>{var l,d,[i,a,s]=o,f=0;if(i.some(p=>0!==e[p])){for(l in a)t.o(a,l)&&(t.m[l]=a[l]);if(s)var c=s(t)}for(u&&u(o);f<i.length;f++)t.o(e,d=i[f])&&e[d]&&e[d][0](),e[d]=0;return t.O(c)},r=self.webpackChunkClientApp=self.webpackChunkClientApp||[];r.forEach(n.bind(null,0)),r.push=n.bind(null,r.push.bind(r))})()})();
"use strict";(self.webpackChunkClientApp=self.webpackChunkClientApp||[]).push([["polyfills"],{2260:()=>{const te=globalThis;function Q(e){return(te.__Zone_symbol_prefix||"__zone_symbol__")+e}const Te=Object.getOwnPropertyDescriptor,Le=Object.defineProperty,Ie=Object.getPrototypeOf,_t=Object.create,Et=Array.prototype.slice,Me="addEventListener",Ze="removeEventListener",Ae=Q(Me),je=Q(Ze),ae="true",le="false",Pe=Q("");function He(e,r){return Zone.current.wrap(e,r)}function xe(e,r,c,t,i){return Zone.current.scheduleMacroTask(e,r,c,t,i)}const j=Q,Ce=typeof window<"u",ge=Ce?window:void 0,$=Ce&&ge||globalThis,Tt="removeAttribute";function Ve(e,r){for(let c=e.length-1;c>=0;c--)"function"==typeof e[c]&&(e[c]=He(e[c],r+"_"+c));return e}function We(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const qe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,De=!("nw"in $)&&typeof $.process<"u"&&"[object process]"===$.process.toString(),Ge=!De&&!qe&&!(!Ce||!ge.HTMLElement),Xe=typeof $.process<"u"&&"[object process]"===$.process.toString()&&!qe&&!(!Ce||!ge.HTMLElement),Se={},pt=j("enable_beforeunload"),Ye=function(e){if(!(e=e||$.event))return;let r=Se[e.type];r||(r=Se[e.type]=j("ON_PROPERTY"+e.type));const c=this||e.target||$,t=c[r];let i;return Ge&&c===ge&&"error"===e.type?(i=t&&t.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===i&&e.preventDefault()):(i=t&&t.apply(this,arguments),"beforeunload"===e.type&&$[pt]&&"string"==typeof i?e.returnValue=i:null!=i&&!i&&e.preventDefault()),i};function $e(e,r,c){let t=Te(e,r);if(!t&&c&&Te(c,r)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;const i=j("on"+r+"patched");if(e.hasOwnProperty(i)&&e[i])return;delete t.writable,delete t.value;const u=t.get,E=t.set,T=r.slice(2);let y=Se[T];y||(y=Se[T]=j("ON_PROPERTY"+T)),t.set=function(D){let d=this;!d&&e===$&&(d=$),d&&("function"==typeof d[y]&&d.removeEventListener(T,Ye),E&&E.call(d,null),d[y]=D,"function"==typeof D&&d.addEventListener(T,Ye,!1))},t.get=function(){let D=this;if(!D&&e===$&&(D=$),!D)return null;const d=D[y];if(d)return d;if(u){let w=u.call(this);if(w)return t.set.call(this,w),"function"==typeof D[Tt]&&D.removeAttribute(r),w}return null},Le(e,r,t),e[i]=!0}function Ke(e,r,c){if(r)for(let t=0;t<r.length;t++)$e(e,"on"+r[t],c);else{const t=[];for(const i in e)"on"==i.slice(0,2)&&t.push(i);for(let i=0;i<t.length;i++)$e(e,t[i],c)}}const re=j("originalInstance");function we(e){const r=$[e];if(!r)return;$[j(e)]=r,$[e]=function(){const i=Ve(arguments,e);switch(i.length){case 0:this[re]=new r;break;case 1:this[re]=new r(i[0]);break;case 2:this[re]=new r(i[0],i[1]);break;case 3:this[re]=new r(i[0],i[1],i[2]);break;case 4:this[re]=new r(i[0],i[1],i[2],i[3]);break;default:throw new Error("Arg list too long.")}},fe($[e],r);const c=new r(function(){});let t;for(t in c)"XMLHttpRequest"===e&&"responseBlob"===t||function(i){"function"==typeof c[i]?$[e].prototype[i]=function(){return this[re][i].apply(this[re],arguments)}:Le($[e].prototype,i,{set:function(u){"function"==typeof u?(this[re][i]=He(u,e+"."+i),fe(this[re][i],u)):this[re][i]=u},get:function(){return this[re][i]}})}(t);for(t in r)"prototype"!==t&&r.hasOwnProperty(t)&&($[e][t]=r[t])}function ue(e,r,c){let t=e;for(;t&&!t.hasOwnProperty(r);)t=Ie(t);!t&&e[r]&&(t=e);const i=j(r);let u=null;if(t&&(!(u=t[i])||!t.hasOwnProperty(i))&&(u=t[i]=t[r],We(t&&Te(t,r)))){const T=c(u,i,r);t[r]=function(){return T(this,arguments)},fe(t[r],u)}return u}function yt(e,r,c){let t=null;function i(u){const E=u.data;return E.args[E.cbIdx]=function(){u.invoke.apply(this,arguments)},t.apply(E.target,E.args),u}t=ue(e,r,u=>function(E,T){const y=c(E,T);return y.cbIdx>=0&&"function"==typeof T[y.cbIdx]?xe(y.name,T[y.cbIdx],y,i):u.apply(E,T)})}function fe(e,r){e[j("OriginalDelegate")]=r}let Je=!1,Be=!1;function kt(){if(Je)return Be;Je=!0;try{const e=ge.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Be=!0)}catch{}return Be}function Qe(e){return"function"==typeof e}function et(e){return"number"==typeof e}let pe=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){pe=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{pe=!1}const vt={useG:!0},ne={},tt={},nt=new RegExp("^"+Pe+"(\\w+)(true|false)$"),rt=j("propagationStopped");function ot(e,r){const c=(r?r(e):e)+le,t=(r?r(e):e)+ae,i=Pe+c,u=Pe+t;ne[e]={},ne[e][le]=i,ne[e][ae]=u}function bt(e,r,c,t){const i=t&&t.add||Me,u=t&&t.rm||Ze,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",y=j(i),D="."+i+":",d="prependListener",w="."+d+":",Z=function(k,h,H){if(k.isRemoved)return;const V=k.callback;let Y;"object"==typeof V&&V.handleEvent&&(k.callback=g=>V.handleEvent(g),k.originalDelegate=V);try{k.invoke(k,h,[H])}catch(g){Y=g}const G=k.options;return G&&"object"==typeof G&&G.once&&h[u].call(h,H.type,k.originalDelegate?k.originalDelegate:k.callback,G),Y};function x(k,h,H){if(!(h=h||e.event))return;const V=k||h.target||e,Y=V[ne[h.type][H?ae:le]];if(Y){const G=[];if(1===Y.length){const g=Z(Y[0],V,h);g&&G.push(g)}else{const g=Y.slice();for(let z=0;z<g.length&&(!h||!0!==h[rt]);z++){const O=Z(g[z],V,h);O&&G.push(O)}}if(1===G.length)throw G[0];for(let g=0;g<G.length;g++){const z=G[g];r.nativeScheduleMicroTask(()=>{throw z})}}}const U=function(k){return x(this,k,!1)},K=function(k){return x(this,k,!0)};function J(k,h){if(!k)return!1;let H=!0;h&&void 0!==h.useG&&(H=h.useG);const V=h&&h.vh;let Y=!0;h&&void 0!==h.chkDup&&(Y=h.chkDup);let G=!1;h&&void 0!==h.rt&&(G=h.rt);let g=k;for(;g&&!g.hasOwnProperty(i);)g=Ie(g);if(!g&&k[i]&&(g=k),!g||g[y])return!1;const z=h&&h.eventNameToString,O={},R=g[y]=g[i],b=g[j(u)]=g[u],S=g[j(E)]=g[E],ee=g[j(T)]=g[T];let W;h&&h.prepend&&(W=g[j(h.prepend)]=g[h.prepend]);const q=H?function(s){if(!O.isExisting)return R.call(O.target,O.eventName,O.capture?K:U,O.options)}:function(s){return R.call(O.target,O.eventName,s.invoke,O.options)},A=H?function(s){if(!s.isRemoved){const l=ne[s.eventName];let v;l&&(v=l[s.capture?ae:le]);const C=v&&s.target[v];if(C)for(let p=0;p<C.length;p++)if(C[p]===s){C.splice(p,1),s.isRemoved=!0,s.removeAbortListener&&(s.removeAbortListener(),s.removeAbortListener=null),0===C.length&&(s.allRemoved=!0,s.target[v]=null);break}}if(s.allRemoved)return b.call(s.target,s.eventName,s.capture?K:U,s.options)}:function(s){return b.call(s.target,s.eventName,s.invoke,s.options)},he=h&&h.diff?h.diff:function(s,l){const v=typeof l;return"function"===v&&s.callback===l||"object"===v&&s.originalDelegate===l},de=Zone[j("UNPATCHED_EVENTS")],oe=e[j("PASSIVE_EVENTS")],a=function(s,l,v,C,p=!1,L=!1){return function(){const I=this||e;let M=arguments[0];h&&h.transferEventName&&(M=h.transferEventName(M));let B=arguments[1];if(!B)return s.apply(this,arguments);if(De&&"uncaughtException"===M)return s.apply(this,arguments);let F=!1;if("function"!=typeof B){if(!B.handleEvent)return s.apply(this,arguments);F=!0}if(V&&!V(s,B,I,arguments))return;const Ee=pe&&!!oe&&-1!==oe.indexOf(M),ie=function f(s){if("object"==typeof s&&null!==s){const l={...s};return s.signal&&(l.signal=s.signal),l}return s}(function N(s,l){return!pe&&"object"==typeof s&&s?!!s.capture:pe&&l?"boolean"==typeof s?{capture:s,passive:!0}:s?"object"==typeof s&&!1!==s.passive?{...s,passive:!0}:s:{passive:!0}:s}(arguments[2],Ee)),me=ie?.signal;if(me?.aborted)return;if(de)for(let ce=0;ce<de.length;ce++)if(M===de[ce])return Ee?s.call(I,M,B,ie):s.apply(this,arguments);const Ue=!!ie&&("boolean"==typeof ie||ie.capture),lt=!(!ie||"object"!=typeof ie)&&ie.once,At=Zone.current;let ze=ne[M];ze||(ot(M,z),ze=ne[M]);const ut=ze[Ue?ae:le];let Ne,ke=I[ut],ft=!1;if(ke){if(ft=!0,Y)for(let ce=0;ce<ke.length;ce++)if(he(ke[ce],B))return}else ke=I[ut]=[];const ht=I.constructor.name,dt=tt[ht];dt&&(Ne=dt[M]),Ne||(Ne=ht+l+(z?z(M):M)),O.options=ie,lt&&(O.options.once=!1),O.target=I,O.capture=Ue,O.eventName=M,O.isExisting=ft;const Re=H?vt:void 0;Re&&(Re.taskData=O),me&&(O.options.signal=void 0);const se=At.scheduleEventTask(Ne,B,Re,v,C);if(me){O.options.signal=me;const ce=()=>se.zone.cancelTask(se);s.call(me,"abort",ce,{once:!0}),se.removeAbortListener=()=>me.removeEventListener("abort",ce)}return O.target=null,Re&&(Re.taskData=null),lt&&(O.options.once=!0),!pe&&"boolean"==typeof se.options||(se.options=ie),se.target=I,se.capture=Ue,se.eventName=M,F&&(se.originalDelegate=B),L?ke.unshift(se):ke.push(se),p?I:void 0}};return g[i]=a(R,D,q,A,G),W&&(g[d]=a(W,w,function(s){return W.call(O.target,O.eventName,s.invoke,O.options)},A,G,!0)),g[u]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=arguments[2],C=!!v&&("boolean"==typeof v||v.capture),p=arguments[1];if(!p)return b.apply(this,arguments);if(V&&!V(b,p,s,arguments))return;const L=ne[l];let I;L&&(I=L[C?ae:le]);const M=I&&s[I];if(M)for(let B=0;B<M.length;B++){const F=M[B];if(he(F,p))return M.splice(B,1),F.isRemoved=!0,0!==M.length||(F.allRemoved=!0,s[I]=null,C||"string"!=typeof l)||(s[Pe+"ON_PROPERTY"+l]=null),F.zone.cancelTask(F),G?s:void 0}return b.apply(this,arguments)},g[E]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=[],C=st(s,z?z(l):l);for(let p=0;p<C.length;p++){const L=C[p];v.push(L.originalDelegate?L.originalDelegate:L.callback)}return v},g[T]=function(){const s=this||e;let l=arguments[0];if(l){h&&h.transferEventName&&(l=h.transferEventName(l));const v=ne[l];if(v){const L=s[v[le]],I=s[v[ae]];if(L){const M=L.slice();for(let B=0;B<M.length;B++){const F=M[B];this[u].call(this,l,F.originalDelegate?F.originalDelegate:F.callback,F.options)}}if(I){const M=I.slice();for(let B=0;B<M.length;B++){const F=M[B];this[u].call(this,l,F.originalDelegate?F.originalDelegate:F.callback,F.options)}}}}else{const v=Object.keys(s);for(let C=0;C<v.length;C++){const L=nt.exec(v[C]);let I=L&&L[1];I&&"removeListener"!==I&&this[T].call(this,I)}this[T].call(this,"removeListener")}if(G)return this},fe(g[i],R),fe(g[u],b),ee&&fe(g[T],ee),S&&fe(g[E],S),!0}let X=[];for(let k=0;k<c.length;k++)X[k]=J(c[k],t);return X}function st(e,r){if(!r){const u=[];for(let E in e){const T=nt.exec(E);let y=T&&T[1];if(y&&(!r||y===r)){const D=e[E];if(D)for(let d=0;d<D.length;d++)u.push(D[d])}}return u}let c=ne[r];c||(ot(r),c=ne[r]);const t=e[c[le]],i=e[c[ae]];return t?i?t.concat(i):t.slice():i?i.slice():[]}function Pt(e,r){const c=e.Event;c&&c.prototype&&r.patchMethod(c.prototype,"stopImmediatePropagation",t=>function(i,u){i[rt]=!0,t&&t.apply(i,u)})}const Oe=j("zoneTask");function ye(e,r,c,t){let i=null,u=null;c+=t;const E={};function T(D){const d=D.data;d.args[0]=function(){return D.invoke.apply(this,arguments)};const w=i.apply(e,d.args);return et(w)?d.handleId=w:(d.handle=w,d.isRefreshable=Qe(w.refresh)),D}function y(D){const{handle:d,handleId:w}=D.data;return u.call(e,d??w)}i=ue(e,r+=t,D=>function(d,w){if(Qe(w[0])){const Z={isRefreshable:!1,isPeriodic:"Interval"===t,delay:"Timeout"===t||"Interval"===t?w[1]||0:void 0,args:w},x=w[0];w[0]=function(){try{return x.apply(this,arguments)}finally{const{handle:H,handleId:V,isPeriodic:Y,isRefreshable:G}=Z;!Y&&!G&&(V?delete E[V]:H&&(H[Oe]=null))}};const U=xe(r,w[0],Z,T,y);if(!U)return U;const{handleId:K,handle:J,isRefreshable:X,isPeriodic:k}=U.data;if(K)E[K]=U;else if(J&&(J[Oe]=U,X&&!k)){const h=J.refresh;J.refresh=function(){const{zone:H,state:V}=U;return"notScheduled"===V?(U._state="scheduled",H._updateTaskCount(U,1)):"running"===V&&(U._state="scheduling"),h.call(this)}}return J??K??U}return D.apply(e,w)}),u=ue(e,c,D=>function(d,w){const Z=w[0];let x;et(Z)?(x=E[Z],delete E[Z]):(x=Z?.[Oe],x?Z[Oe]=null:x=Z),x?.type?x.cancelFn&&x.zone.cancelTask(x):D.apply(e,w)})}function it(e,r,c){if(!c||0===c.length)return r;const t=c.filter(u=>u.target===e);if(!t||0===t.length)return r;const i=t[0].ignoreProperties;return r.filter(u=>-1===i.indexOf(u))}function ct(e,r,c,t){e&&Ke(e,it(e,r,c),t)}function Fe(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function It(e,r,c,t,i){const u=Zone.__symbol__(t);if(r[u])return;const E=r[u]=r[t];r[t]=function(T,y,D){return y&&y.prototype&&i.forEach(function(d){const w=`${c}.${t}::`+d,Z=y.prototype;try{if(Z.hasOwnProperty(d)){const x=e.ObjectGetOwnPropertyDescriptor(Z,d);x&&x.value?(x.value=e.wrapWithCurrentZone(x.value,w),e._redefineProperty(y.prototype,d,x)):Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}else Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}catch{}}),E.call(r,T,y,D)},e.attachOriginToPatched(r[t],E)}const at=function be(){const e=globalThis,r=!0===e[Q("forceDuplicateZoneCheck")];if(e.Zone&&(r||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function ve(){const e=te.performance;function r(N){e&&e.mark&&e.mark(N)}function c(N,_){e&&e.measure&&e.measure(N,_)}r("Zone");let t=(()=>{class N{static{this.__symbol__=Q}static assertZonePatched(){if(te.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=N.current;for(;n.parent;)n=n.parent;return n}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(n,o,m=!1){if(O.hasOwnProperty(n)){const P=!0===te[Q("forceDuplicateZoneCheck")];if(!m&&P)throw Error("Already loaded patch: "+n)}else if(!te["__Zone_disable_"+n]){const P="Zone:"+n;r(P),O[n]=o(te,N,R),c(P,P)}}get parent(){return this._parent}get name(){return this._name}constructor(n,o){this._parent=n,this._name=o?o.name||"unnamed":"<root>",this._properties=o&&o.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,o)}get(n){const o=this.getZoneWith(n);if(o)return o._properties[n]}getZoneWith(n){let o=this;for(;o;){if(o._properties.hasOwnProperty(n))return o;o=o._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,o){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const m=this._zoneDelegate.intercept(this,n,o),P=this;return function(){return P.runGuarded(m,this,arguments,o)}}run(n,o,m,P){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,n,o,m,P)}finally{b=b.parent}}runGuarded(n,o=null,m,P){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,n,o,m,P)}catch(q){if(this._zoneDelegate.handleError(this,q))throw q}}finally{b=b.parent}}runTask(n,o,m){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||J).name+"; Execution: "+this.name+")");const P=n,{type:q,data:{isPeriodic:A=!1,isRefreshable:_e=!1}={}}=n;if(n.state===X&&(q===z||q===g))return;const he=n.state!=H;he&&P._transitionTo(H,h);const de=S;S=P,b={parent:b,zone:this};try{q==g&&n.data&&!A&&!_e&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,P,o,m)}catch(oe){if(this._zoneDelegate.handleError(this,oe))throw oe}}finally{const oe=n.state;if(oe!==X&&oe!==Y)if(q==z||A||_e&&oe===k)he&&P._transitionTo(h,H,k);else{const f=P._zoneDelegates;this._updateTaskCount(P,-1),he&&P._transitionTo(X,H,X),_e&&(P._zoneDelegates=f)}b=b.parent,S=de}}scheduleTask(n){if(n.zone&&n.zone!==this){let m=this;for(;m;){if(m===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);m=m.parent}}n._transitionTo(k,X);const o=[];n._zoneDelegates=o,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(m){throw n._transitionTo(Y,k,X),this._zoneDelegate.handleError(this,m),m}return n._zoneDelegates===o&&this._updateTaskCount(n,1),n.state==k&&n._transitionTo(h,k),n}scheduleMicroTask(n,o,m,P){return this.scheduleTask(new E(G,n,o,m,P,void 0))}scheduleMacroTask(n,o,m,P,q){return this.scheduleTask(new E(g,n,o,m,P,q))}scheduleEventTask(n,o,m,P,q){return this.scheduleTask(new E(z,n,o,m,P,q))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||J).name+"; Execution: "+this.name+")");if(n.state===h||n.state===H){n._transitionTo(V,h,H);try{this._zoneDelegate.cancelTask(this,n)}catch(o){throw n._transitionTo(Y,V),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(n,-1),n._transitionTo(X,V),n.runCount=-1,n}}_updateTaskCount(n,o){const m=n._zoneDelegates;-1==o&&(n._zoneDelegates=null);for(let P=0;P<m.length;P++)m[P]._updateTaskCount(n.type,o)}}return N})();const i={name:"",onHasTask:(N,_,n,o)=>N.hasTask(n,o),onScheduleTask:(N,_,n,o)=>N.scheduleTask(n,o),onInvokeTask:(N,_,n,o,m,P)=>N.invokeTask(n,o,m,P),onCancelTask:(N,_,n,o)=>N.cancelTask(n,o)};class u{get zone(){return this._zone}constructor(_,n,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=n,this._forkZS=o&&(o&&o.onFork?o:n._forkZS),this._forkDlgt=o&&(o.onFork?n:n._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:n._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:n._interceptZS),this._interceptDlgt=o&&(o.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:n._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:n._invokeZS),this._invokeDlgt=o&&(o.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:n._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:n._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:n._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:n._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:n._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:n._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:n._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:n._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const m=o&&o.onHasTask;(m||n&&n._hasTaskZS)&&(this._hasTaskZS=m?o:i,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this._zone))}fork(_,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,n):new t(_,n)}intercept(_,n,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,n,o):n}invoke(_,n,o,m,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,n,o,m,P):n.apply(o,m)}handleError(_,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,n)}scheduleTask(_,n){let o=n;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,n),o||(o=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=G)throw new Error("Task is missing scheduleFn.");U(n)}return o}invokeTask(_,n,o,m){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,n,o,m):n.callback.apply(o,m)}cancelTask(_,n){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");o=n.cancelFn(n)}return o}hasTask(_,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,n)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,n){const o=this._taskCounts,m=o[_],P=o[_]=m+n;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=m&&0!=P||this.hasTask(this._zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class E{constructor(_,n,o,m,P,q){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=n,this.data=m,this.scheduleFn=P,this.cancelFn=q,!o)throw new Error("callback is not defined");this.callback=o;const A=this;this.invoke=_===z&&m&&m.useG?E.invokeTask:function(){return E.invokeTask.call(te,A,this,arguments)}}static invokeTask(_,n,o){_||(_=this),ee++;try{return _.runCount++,_.zone.runTask(_,n,o)}finally{1==ee&&K(),ee--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(X,k)}_transitionTo(_,n,o){if(this._state!==n&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${n}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==X&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const T=Q("setTimeout"),y=Q("Promise"),D=Q("then");let Z,d=[],w=!1;function x(N){if(Z||te[y]&&(Z=te[y].resolve(0)),Z){let _=Z[D];_||(_=Z.then),_.call(Z,N)}else te[T](N,0)}function U(N){0===ee&&0===d.length&&x(K),N&&d.push(N)}function K(){if(!w){for(w=!0;d.length;){const N=d;d=[];for(let _=0;_<N.length;_++){const n=N[_];try{n.zone.runTask(n,null,null)}catch(o){R.onUnhandledError(o)}}}R.microtaskDrainDone(),w=!1}}const J={name:"NO ZONE"},X="notScheduled",k="scheduling",h="scheduled",H="running",V="canceling",Y="unknown",G="microTask",g="macroTask",z="eventTask",O={},R={symbol:Q,currentZoneFrame:()=>b,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[Q("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:x};let b={parent:null,zone:new t(null,null)},S=null,ee=0;function W(){}return c("Zone","Zone"),t}(),e.Zone}();(function Zt(e){(function Nt(e){e.__load_patch("ZoneAwarePromise",(r,c,t)=>{const i=Object.getOwnPropertyDescriptor,u=Object.defineProperty,T=t.symbol,y=[],D=!1!==r[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],d=T("Promise"),w=T("then"),Z="__creationTrace__";t.onUnhandledError=f=>{if(t.showUncaughtError()){const a=f&&f.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(f)}},t.microtaskDrainDone=()=>{for(;y.length;){const f=y.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(a){U(a)}}};const x=T("unhandledPromiseRejectionHandler");function U(f){t.onUnhandledError(f);try{const a=c[x];"function"==typeof a&&a.call(this,f)}catch{}}function K(f){return f&&f.then}function J(f){return f}function X(f){return A.reject(f)}const k=T("state"),h=T("value"),H=T("finally"),V=T("parentPromiseValue"),Y=T("parentPromiseState"),G="Promise.then",g=null,z=!0,O=!1,R=0;function b(f,a){return s=>{try{N(f,a,s)}catch(l){N(f,!1,l)}}}const S=function(){let f=!1;return function(s){return function(){f||(f=!0,s.apply(null,arguments))}}},ee="Promise resolved with itself",W=T("currentTaskTrace");function N(f,a,s){const l=S();if(f===s)throw new TypeError(ee);if(f[k]===g){let v=null;try{("object"==typeof s||"function"==typeof s)&&(v=s&&s.then)}catch(C){return l(()=>{N(f,!1,C)})(),f}if(a!==O&&s instanceof A&&s.hasOwnProperty(k)&&s.hasOwnProperty(h)&&s[k]!==g)n(s),N(f,s[k],s[h]);else if(a!==O&&"function"==typeof v)try{v.call(s,l(b(f,a)),l(b(f,!1)))}catch(C){l(()=>{N(f,!1,C)})()}else{f[k]=a;const C=f[h];if(f[h]=s,f[H]===H&&a===z&&(f[k]=f[Y],f[h]=f[V]),a===O&&s instanceof Error){const p=c.currentTask&&c.currentTask.data&&c.currentTask.data[Z];p&&u(s,W,{configurable:!0,enumerable:!1,writable:!0,value:p})}for(let p=0;p<C.length;)o(f,C[p++],C[p++],C[p++],C[p++]);if(0==C.length&&a==O){f[k]=R;let p=s;try{throw new Error("Uncaught (in promise): "+function E(f){return f&&f.toString===Object.prototype.toString?(f.constructor&&f.constructor.name||"")+": "+JSON.stringify(f):f?f.toString():Object.prototype.toString.call(f)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(L){p=L}D&&(p.throwOriginal=!0),p.rejection=s,p.promise=f,p.zone=c.current,p.task=c.currentTask,y.push(p),t.scheduleMicroTask()}}}return f}const _=T("rejectionHandledHandler");function n(f){if(f[k]===R){try{const a=c[_];a&&"function"==typeof a&&a.call(this,{rejection:f[h],promise:f})}catch{}f[k]=O;for(let a=0;a<y.length;a++)f===y[a].promise&&y.splice(a,1)}}function o(f,a,s,l,v){n(f);const C=f[k],p=C?"function"==typeof l?l:J:"function"==typeof v?v:X;a.scheduleMicroTask(G,()=>{try{const L=f[h],I=!!s&&H===s[H];I&&(s[V]=L,s[Y]=C);const M=a.run(p,void 0,I&&p!==X&&p!==J?[]:[L]);N(s,!0,M)}catch(L){N(s,!1,L)}},s)}const P=function(){},q=r.AggregateError;class A{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof A?a:N(new this(null),z,a)}static reject(a){return N(new this(null),O,a)}static withResolvers(){const a={};return a.promise=new A((s,l)=>{a.resolve=s,a.reject=l}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new q([],"All promises were rejected"));const s=[];let l=0;try{for(let p of a)l++,s.push(A.resolve(p))}catch{return Promise.reject(new q([],"All promises were rejected"))}if(0===l)return Promise.reject(new q([],"All promises were rejected"));let v=!1;const C=[];return new A((p,L)=>{for(let I=0;I<s.length;I++)s[I].then(M=>{v||(v=!0,p(M))},M=>{C.push(M),l--,0===l&&(v=!0,L(new q(C,"All promises were rejected")))})})}static race(a){let s,l,v=new this((L,I)=>{s=L,l=I});function C(L){s(L)}function p(L){l(L)}for(let L of a)K(L)||(L=this.resolve(L)),L.then(C,p);return v}static all(a){return A.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof A?this:A).allWithCallback(a,{thenCallback:l=>({status:"fulfilled",value:l}),errorCallback:l=>({status:"rejected",reason:l})})}static allWithCallback(a,s){let l,v,C=new this((M,B)=>{l=M,v=B}),p=2,L=0;const I=[];for(let M of a){K(M)||(M=this.resolve(M));const B=L;try{M.then(F=>{I[B]=s?s.thenCallback(F):F,p--,0===p&&l(I)},F=>{s?(I[B]=s.errorCallback(F),p--,0===p&&l(I)):v(F)})}catch(F){v(F)}p++,L++}return p-=2,0===p&&l(I),C}constructor(a){const s=this;if(!(s instanceof A))throw new Error("Must be an instanceof Promise.");s[k]=g,s[h]=[];try{const l=S();a&&a(l(b(s,z)),l(b(s,O)))}catch(l){N(s,!1,l)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return A}then(a,s){let l=this.constructor?.[Symbol.species];(!l||"function"!=typeof l)&&(l=this.constructor||A);const v=new l(P),C=c.current;return this[k]==g?this[h].push(C,v,a,s):o(this,C,v,a,s),v}catch(a){return this.then(null,a)}finally(a){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=A);const l=new s(P);l[H]=H;const v=c.current;return this[k]==g?this[h].push(v,l,a,a):o(this,v,l,a,a),l}}A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;const _e=r[d]=r.Promise;r.Promise=A;const he=T("thenPatched");function de(f){const a=f.prototype,s=i(a,"then");if(s&&(!1===s.writable||!s.configurable))return;const l=a.then;a[w]=l,f.prototype.then=function(v,C){return new A((L,I)=>{l.call(this,L,I)}).then(v,C)},f[he]=!0}return t.patchThen=de,_e&&(de(_e),ue(r,"fetch",f=>function oe(f){return function(a,s){let l=f.apply(a,s);if(l instanceof A)return l;let v=l.constructor;return v[he]||de(v),l}}(f))),Promise[c.__symbol__("uncaughtPromiseErrors")]=y,A})})(e),function Lt(e){e.__load_patch("toString",r=>{const c=Function.prototype.toString,t=j("OriginalDelegate"),i=j("Promise"),u=j("Error"),E=function(){if("function"==typeof this){const d=this[t];if(d)return"function"==typeof d?c.call(d):Object.prototype.toString.call(d);if(this===Promise){const w=r[i];if(w)return c.call(w)}if(this===Error){const w=r[u];if(w)return c.call(w)}}return c.call(this)};E[t]=c,Function.prototype.toString=E;const T=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":T.call(this)}})}(e),function Mt(e){e.__load_patch("util",(r,c,t)=>{const i=Fe(r);t.patchOnProperties=Ke,t.patchMethod=ue,t.bindArguments=Ve,t.patchMacroTask=yt;const u=c.__symbol__("BLACK_LISTED_EVENTS"),E=c.__symbol__("UNPATCHED_EVENTS");r[E]&&(r[u]=r[E]),r[u]&&(c[u]=c[E]=r[u]),t.patchEventPrototype=Pt,t.patchEventTarget=bt,t.isIEOrEdge=kt,t.ObjectDefineProperty=Le,t.ObjectGetOwnPropertyDescriptor=Te,t.ObjectCreate=_t,t.ArraySlice=Et,t.patchClass=we,t.wrapWithCurrentZone=He,t.filterProperties=it,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=It,t.getGlobalObjects=()=>({globalSources:tt,zoneSymbolEventNames:ne,eventNames:i,isBrowser:Ge,isMix:Xe,isNode:De,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:Me,REMOVE_EVENT_LISTENER_STR:Ze})})}(e)})(at),function Ot(e){e.__load_patch("legacy",r=>{const c=r[e.__symbol__("legacyPatch")];c&&c()}),e.__load_patch("timers",r=>{const c="set",t="clear";ye(r,c,t,"Timeout"),ye(r,c,t,"Interval"),ye(r,c,t,"Immediate")}),e.__load_patch("requestAnimationFrame",r=>{ye(r,"request","cancel","AnimationFrame"),ye(r,"mozRequest","mozCancel","AnimationFrame"),ye(r,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(r,c)=>{const t=["alert","prompt","confirm"];for(let i=0;i<t.length;i++)ue(r,t[i],(E,T,y)=>function(D,d){return c.current.run(E,r,d,y)})}),e.__load_patch("EventTarget",(r,c,t)=>{(function Dt(e,r){r.patchEventPrototype(e,r)})(r,t),function Ct(e,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:c,zoneSymbolEventNames:t,TRUE_STR:i,FALSE_STR:u,ZONE_SYMBOL_PREFIX:E}=r.getGlobalObjects();for(let y=0;y<c.length;y++){const D=c[y],Z=E+(D+u),x=E+(D+i);t[D]={},t[D][u]=Z,t[D][i]=x}const T=e.EventTarget;T&&T.prototype&&r.patchEventTarget(e,r,[T&&T.prototype])}(r,t);const i=r.XMLHttpRequestEventTarget;i&&i.prototype&&t.patchEventTarget(r,t,[i.prototype])}),e.__load_patch("MutationObserver",(r,c,t)=>{we("MutationObserver"),we("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(r,c,t)=>{we("IntersectionObserver")}),e.__load_patch("FileReader",(r,c,t)=>{we("FileReader")}),e.__load_patch("on_property",(r,c,t)=>{!function St(e,r){if(De&&!Xe||Zone[e.symbol("patchEvents")])return;const c=r.__Zone_ignore_on_properties;let t=[];if(Ge){const i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const u=function mt(){try{const e=ge.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:i,ignoreProperties:["error"]}]:[];ct(i,Fe(i),c&&c.concat(u),Ie(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let i=0;i<t.length;i++){const u=r[t[i]];u&&u.prototype&&ct(u.prototype,Fe(u.prototype),c)}}(t,r)}),e.__load_patch("customElements",(r,c,t)=>{!function Rt(e,r){const{isBrowser:c,isMix:t}=r.getGlobalObjects();(c||t)&&e.customElements&&"customElements"in e&&r.patchCallbacks(r,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,t)}),e.__load_patch("XHR",(r,c)=>{!function D(d){const w=d.XMLHttpRequest;if(!w)return;const Z=w.prototype;let U=Z[Ae],K=Z[je];if(!U){const R=d.XMLHttpRequestEventTarget;if(R){const b=R.prototype;U=b[Ae],K=b[je]}}const J="readystatechange",X="scheduled";function k(R){const b=R.data,S=b.target;S[E]=!1,S[y]=!1;const ee=S[u];U||(U=S[Ae],K=S[je]),ee&&K.call(S,J,ee);const W=S[u]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[E]&&R.state===X){const _=S[c.__symbol__("loadfalse")];if(0!==S.status&&_&&_.length>0){const n=R.invoke;R.invoke=function(){const o=S[c.__symbol__("loadfalse")];for(let m=0;m<o.length;m++)o[m]===R&&o.splice(m,1);!b.aborted&&R.state===X&&n.call(R)},_.push(R)}else R.invoke()}else!b.aborted&&!1===S[E]&&(S[y]=!0)};return U.call(S,J,W),S[t]||(S[t]=R),z.apply(S,b.args),S[E]=!0,R}function h(){}function H(R){const b=R.data;return b.aborted=!0,O.apply(b.target,b.args)}const V=ue(Z,"open",()=>function(R,b){return R[i]=0==b[2],R[T]=b[1],V.apply(R,b)}),G=j("fetchTaskAborting"),g=j("fetchTaskScheduling"),z=ue(Z,"send",()=>function(R,b){if(!0===c.current[g]||R[i])return z.apply(R,b);{const S={target:R,url:R[T],isPeriodic:!1,args:b,aborted:!1},ee=xe("XMLHttpRequest.send",h,S,k,H);R&&!0===R[y]&&!S.aborted&&ee.state===X&&ee.invoke()}}),O=ue(Z,"abort",()=>function(R,b){const S=function x(R){return R[t]}(R);if(S&&"string"==typeof S.type){if(null==S.cancelFn||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(!0===c.current[G])return O.apply(R,b)})}(r);const t=j("xhrTask"),i=j("xhrSync"),u=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),y=j("xhrErrorBeforeScheduled")}),e.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function gt(e,r){const c=e.constructor.name;for(let t=0;t<r.length;t++){const i=r[t],u=e[i];if(u){if(!We(Te(e,i)))continue;e[i]=(T=>{const y=function(){return T.apply(this,Ve(arguments,c+"."+i))};return fe(y,T),y})(u)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(r,c)=>{function t(i){return function(u){st(r,i).forEach(T=>{const y=r.PromiseRejectionEvent;if(y){const D=new y(i,{promise:u.promise,reason:u.rejection});T.invoke(D)}})}}r.PromiseRejectionEvent&&(c[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),c[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(r,c,t)=>{!function wt(e,r){r.patchMethod(e,"queueMicrotask",c=>function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])})}(r,t)})}(at)},4050:(te,Q,ve)=>{ve(2260)}},te=>{te(te.s=4050)}]);
const app=angular.module("app",["angular.css.injector","ui.router","angulartics","angulartics.piwik","angulartics.google.analytics","ngSanitize","ui.bootstrap","angular-loading-bar","vjs.video","angularLazyImg","ct.ui.router.extras","angular.bind.notifier","ngFileUpload","mm.iban","ngTagsInput","angular-inview"]);function getDocHeight(e){var t=(e=e||document).body,a=e.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,a.clientHeight,a.scrollHeight,a.offsetHeight)}function MetaArticleDirective(e){return{restrict:"E",link:function(a,n,u){var f=new MetaArticleInfo(a.$eval(u.metaElement));e.generalPush(f),n.remove()}}}function MetaEventDirective(e){return{restrict:"E",link:function(a,n,u){var f=new MetaEventInfo(a.$eval(u.metaElement));e.generalPush(f),n.remove()}}}function MetaSnipDirective(e){return{restrict:"E",link:function(a,n,u){var f=new MetaSnipInfo(a.$eval(u.metaElement));e.generalPush(f),n.remove()}}}function MetaSponsoredArticleDirective(e){return{restrict:"E",link:function(a,n,u){var f=new MetaSponsoredArticleInfo(a.$eval(u.metaElement));e.generalPush(f),n.remove()}}}function MetaStaticArticleDirective(e){return{restrict:"E",link:function(a,n,u){var f=new MetaStaticArticleInfo(a.$eval(u.metaElement));e.generalPush(f),n.remove()}}}function MetaInformationBase(e){this.title=e.title,this.description=e.description||e.title,this.author=e.author,this.date=e.date,this.imageUrl=e.imageUrl||scope.globalSettings.serverCdnUrl+"/Content/images/logo-big.png",this.twitterSite=e.twitterSite,this.facebookSite=e.facebookSite,this.path=e.path,this.type=e.type||"website",this.removeAttributes=e.removeAttributes,this.canonicalLink=e.canonicalLink}function MetaArticleInfo(e){MetaInformationBase.call(this,{title:e.text,description:e.summary,author:e.user,date:e.published,imageUrl:e.coverAssetReference?`${e.coverAssetReference.assetImage.assetImageUrl}?preset=cover&cache=${e.coverAssetReference.assetImage.cache}`:"",path:e.path,type:"article",canonicalLink:e.canonicalLink})}function MetaSnipInfo(e){MetaInformationBase.call(this,{title:e.text,description:e.text,author:e.user,date:e.published,path:e.path,removeAttributes:["author","article:publisher","article:published_time","article:section"]})}function MetaSponsoredArticleInfo(e){MetaInformationBase.call(this,{title:e.text,description:e.summary,author:e.user,date:e.published,type:"article",imageUrl:e.coverAssetReference.assetImage.assetImageUrl+"?preset=cover&cache="+e.coverAssetReference.assetImage.cache,path:e.path,canonicalLink:e.canonicalLink})}function MetaStaticArticleInfo(e){MetaInformationBase.call(this,{title:e.title,description:e.summary,date:e.published,type:"article",imageUrl:e.coverAssetReference.assetImage.assetImageUrl+"?preset=cover&cache="+e.coverAssetReference.assetImage.cache,path:e.path})}function MetaEventInfo(e){e&&MetaInformationBase.call(this,{title:e.summary??"Event",date:e.start,imageUrl:e.coverImage?e.coverImage.assetImageUrl+"?preset=cover&cache=0":"",path:e.coverImage?"/"+scope.currentScope.chapter.regEx+e.coverImage.sourceArticlePath:"",type:"event",removeAttributes:["author","description"]})}function MessageHolder(e){this.id=e.id}app.run([function(){var e=navigator.userAgent||navigator.vendor||window.opera;-1===e.indexOf("FBAN")&&-1===e.indexOf("FBAV")&&viewportUnitsBuggyfill.init()}]),app.run(["$http","$rootScope","$window","localStorageService","$urlMatcherFactory","ngxPopupService",function(e,t,a,n,u,g){e.defaults.withCredentials=!0;const f=t.$dismiss;t.$dismiss=function(d){g.closeLast(),f&&f.call(t,d)},u.caseInsensitive(!0);var r=a.scope;t.scope=a.scope,t.showSnipSlide=!0;try{if(t.showSnipSlide=-1!=t.scope.currentScope.chapter.settings.configurations.showSnipsForUserRoleId,t.showSnipSlide){var s=t.scope.currentScope.chapter.settings.configurations.showSnipsForUserRoleId;"number"==typeof s&&s>0&&(t.showSnipSlide=!!t.scope.profile.chapterRoles&&t.scope.profile.chapterRoles.includes(s))}}catch{}var c={chapterSlug:r.currentScope.chapter?r.currentScope.chapter.slug:null,networkSlug:r.currentScope.network.slug,threshold:r.globalSettings.oculusImpressionThreshold,trackArticleWordReading:r.globalSettings.oculusTrackArticleWordReading,idleTimeout:r.globalSettings.oculusIdleTimeout,impressionThreshold:r.globalSettings.oculusImpressionThreshold,impressionViewportThreshold:r.globalSettings.oculusImpressionViewportThreshold,shipmentImpressionThreshold:r.globalSettings.oculusShipmentImpressionThreshold,shipmentImpressionViewportThreshold:r.globalSettings.oculusShipmentImpressionViewportThreshold,readingSpeed:r.globalSettings.oculusReadingSpeed,readingThreshold:r.globalSettings.oculusReadingThreshold,readingViewportThreshold:r.globalSettings.oculusReadingViewportThreshold,trackArticleScrolling:r.globalSettings.oculusTrackArticleScrolling,locationRequestEnable:r.currentScope.network.settings.oculusLocationRequestEnable,locationRequestSuccessThrottleDays:r.globalSettings.oculusLocationRequestSuccessThrottleDays,locationRequestFailedThrottleDays:r.globalSettings.oculusLocationRequestFailedThrottleDays};r.oculus=c,n.enableOculusFeedback&&(c.feedback=!0),a.Oculus=new Oculus(c)}]),app.run(["$state","$rootScope","$previousState","$window","localStorageService","profileService","$analytics","$uibModal","$timeout","notificationService","$interval","$location","scopeService","clickService","hybridRouteTrackingService",function(e,t,a,n,u,g,f,r,s,c,d,i,o,h,p){t.$state=e,t.app=navigator.userAgent&&-1!==navigator.userAgent.indexOf("Merkurist_IAB"),t.app&&(t.appVersion=navigator.userAgent.replace(/.*\[Merkurist_IAB\/(.*)\]/gi,function(M,T){return T}),t.appPlatform=-1!==navigator.userAgent.indexOf("Android")?"Android":"iOS"),t.navigateUp=function(){s(function(){e.params.back&&!e.params.back.abstract||document.referrer.includes(window.location.hostname)?window.history.length<=1?e.go("app.main-news"):window.history.back():e.go("app.main-news")})},t.openChapterSwitch=function(){var M=r.open({templateUrl:"/ClientApp/src/legacy-app/index/chapterSwitchDialog.html",controller:"ChapterSwitchDialog",size:"lg",resolve:{}});f.eventTrack("ShowChapterSwitchDialog",{category:"Navigation",label:scope.currentChapter.slug}),M.result.then(function(T){t.switchChapter(T)})},t.switchChapter=function(M){var T=null;scope.chapters.some(function(k){return k.slug===M&&(T=k,!0)}),T&&g.updateFavoriteChapter(T.slug).then(function(){var k=T.path;if(scope.currentScope.networkPath.length>1&&(k=scope.currentScope.networkPath+T.path),typeof cordova<"u"&&"android"===cordova.platformId){var w=history.length-1;history.go(-w),history.replaceState(null,null,k),window.location.href=k}else window.location.href=k})},t.notification=c;var v=function(M){g.getProfile().then(function(T){T.isRegistered?c.update(M):c.updateUnseenCount()})};if(t.updateNotificationsTimed=function(M){var T=3e5;void 0===window.updateNotificationsTimerHandle?(window.updateNotificationsTimerHandle=s(function(){t.updateNotificationsTimed()},T),window.updateNotificationsTimerCreated=new Date,t.notification.getNotifications()):(Math.round((new Date-window.updateNotificationsTimerCreated)/1e3)>=30||M)&&(s.cancel(window.updateNotificationsTimerHandle),window.updateNotificationsTimerHandle=s(function(){t.updateNotificationsTimed()},T),window.updateNotificationsTimerCreated=new Date,t.notification.getNotifications())},t.$on("$stateChangeSuccess",function(M,T){p.getCurrentRouteState(),p.trackAngularJsStateChange(T.name),g.getProfile().then(function(w){w.isRegistered&&t.updateNotificationsTimed()})}),t.$on("authenticationStateChanged",function(){t.updateNotificationsTimed(!0),v(!0)}),g.getProfile().then(function(M){M.isRegistered&&t.updateNotificationsTimed()}),t.app||(document.hasFocus(),$(window).on("focus",function(){v()}).on("blur",function(){}),d(function(){v()},2e4)),t.app){var A=function(){FCMPlugin.getToken(function(M){M?c.updateToken({token:M}):s(function(){FCMPlugin.getToken(function(T){T&&c.updateToken({token:T})},function(){})},1e4)},function(){s(function(){FCMPlugin.getToken(function(M){M&&c.updateToken({token:M})},function(){})},1e4)})};t.$on("authenticationStateChanged",function(){A()});var x="app.main-news",b="",R=0,y="",l={initialize:function(){this.bindEvents()},bindEvents:function(){document.addEventListener("deviceready",this.onDeviceReady,!1),document.addEventListener("offline",this.onOffline,!1)},didLaunchAppFromLink:function(M){-1==M.url.indexOf("/document/")&&-1==M.url.indexOf("/pdf/")&&-1==M.url.indexOf("/file/")&&(window.location.href=M.url)},onOffline:function(){x=e.current.name,y=window.location.href,R=setTimeout(function(){R=0,b="offline",e.go("app.offline")},5e3)},onOnline:function(){R>0?(clearTimeout(R),y="",R=0):"offline"===b&&("app.main-news"!==x&&(window.location.href=y),e.go(x),y=b=""),t.updateNotificationsTimed()},onBackKeyDown:function(){console.log("backKey",history.length,history),history.back()},statusBarDarkMode:function(){var M=window.matchMedia("(prefers-color-scheme:dark)");"android"==cordova.platformId?M.matches?(StatusBar.styleLightContent(),backcolor=getComputedStyle(document.body).getPropertyValue("--color1Dark"),StatusBar.backgroundColorByHexString(backcolor)):(StatusBar.styleDefault(),backcolor=getComputedStyle(document.body).getPropertyValue("--color1"),StatusBar.backgroundColorByHexString(backcolor)):M.matches?(StatusBar.styleLightContent(),StatusBar.backgroundColorByHexString("#000")):(StatusBar.styleDefault(),StatusBar.backgroundColorByHexString("#fff"))},checkNotificationPermission:function(M){FirebasePlugin=window.FCMPlugin,FirebasePlugin.hasPermission(function(T){T?(console.log("Remote notifications permission granted"),A()):M?console.log("Notifications won't be shown as permission is denied"):(console.log("Requesting remote notifications permission"),FirebasePlugin.grantPermission(A()))})},onDeviceReady:function(){document.addEventListener("online",l.onOnline,!1),document.addEventListener("backbutton",l.onBackKeyDown,!1),navigator&&navigator.splashscreen&&navigator.splashscreen.hide(),universalLinks.subscribe("launchedAppFromLink",l.didLaunchAppFromLink),g.getProfile().then(function(){v()});var M=new Date,T=new Date;document.addEventListener("resume",function(){setTimeout(function(){currentDate=new Date,Math.round((currentDate-M)/864e5)>1&&(window.location.href="/"),Math.round((currentDate-T)/6e4)>30&&(t.$emit("invalidateLists"),T=new Date),t.updateNotificationsTimed()},0)},!1),window.matchMedia&&(l.statusBarDarkMode(),window.matchMedia("(prefers-color-scheme: dark)").addListener(function(D){l.statusBarDarkMode()})),"Android"===t.appPlatform&&t.appVersion>6?l.checkNotificationPermission():A(),FCMPlugin.onNotification(function(D){console.log("FcmOnNotification",D),D.wasTapped?D.untrackedUri?t.$state.go("app.untrackedNotification",{untrackedUri:D.untrackedUri}):t.$state.go("clickNotification",{id:D.notificationId}):t.updateNotificationsTimed(!0).then(S=>{v(!0)})},function(){v()});var k=0,w=!1;document.body.ontouchstart=function(D){window.visualViewport.pageTop>10?w=!1:(w=!0,k=D.targetTouches[0].pageY)},document.body.ontouchend=function(D){!w||window.visualViewport.pageTop>10||D.changedTouches[0].pageY-k>150&&setTimeout(function(){location.href.includes("/chat")||location.href.includes("/edit")||location.reload()},500)}}};l.initialize()}else g.getProfile().then(function(){s(function(){v()},2e3)})}]),app.config(["lazyImgConfigProvider",function(e){e.setOptions({offset:1334})}]),app.config(["$urlRouterProvider","$stateProvider","$locationProvider","$compileProvider","$qProvider",function(e,t,a,n,u){a.html5Mode({enabled:!0,requireBase:!1}),n.debugInfoEnabled(!1),u.errorOnUnhandledRejections(!1),n.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob|whatsapp):/);var g=["$stateParams","sponsoredArticleService","parserService","$location",function(i,o,h,p){var v=i.id;return v||p.path("/").replace(),o.getSponsoredArticle(v,i.v).then(function(A){return h.postProcessHtml(A),A},function(){console.log("Error on the SponsoredDetail")})}],f=["$stateParams","articleService","profileService","parserService","$location",function(i,o,h,p,v){var C=i.id;C||v.path("/").replace();var A=i.v;return h.getProfile().then(function(){return o.getArticleDetails(C,A).then(function(x){return x.detailsLoaded=!0,p.postProcessHtml(x),x},function(){return o.getArticleDetails(C,A).then(function(x){return p.postProcessHtml(x),x},function(){v.path("/").replace()})})})}],c={chapterReport:["$stateParams","articleService","$location",function(i,o,h){return o.getElasticReport(i.id).then(function(p){return p},function(){h.path("/")})}],article:["$stateParams","articleService","parserService",function(i,o,h){return o.getArticleDetails(i.id)}]};t.state("app.imprint",{url:"imprint",templateUrl:"/ClientApp/src/legacy-app/content/imprint.html"}).state("app.privacyPolicy",{url:"pp",controller:"DataPrivacyPolicyController",templateUrl:"/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy.html"}).state("app.privacyPolicy-merkurist-gmbh",{url:"pp-merkurist-gmbh",controller:"DataPrivacyPolicyController",templateUrl:"/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-merkurist-gmbh.html"}).state("app.accessibility",{url:"accessibility",controller:"AccessibilityController",templateUrl:"/ClientApp/src/legacy-app/termsOfUse/accessibility.html"}).state("app.tos",{url:"tos",controller:"TermsOfUseController",templateUrl:"/ClientApp/src/legacy-app/termsOfUse/termsOfUse.html"}).state("app.optOut",{url:"optout",controller:"OptOutController",templateUrl:"/ClientApp/src/legacy-app/optOut/optOut.html"}),scope.currentChapter.name?(t.state("app",{url:"/",sticky:!0,abstract:!0,controller:"RootController",templateUrl:"/ClientApp/src/legacy-app/root/root.html"}).state("app.main-news",{url:"",translatable:!0,controller:"rootNewsCompomentController",templateUrl:"/ClientApp/src/legacy-app/root/news/rootNewsComponent.html"}).state("app.main-snips",{url:"snips",controller:"rootSnipsComponentController",templateUrl:"/ClientApp/src/legacy-app/root/snips/rootSnipsComponent.html",translatable:!0}).state("app.main-login",{url:"login?closedToken",controller:"rootLoginComponentController",templateUrl:"/ClientApp/src/legacy-app/root/login/rootLoginComponent.html"}).state("app.main-notifications",{url:"notifications",controller:"rootNotificationsComponentController",templateUrl:"/ClientApp/src/legacy-app/root/notifications/rootNotificationsComponent.html"}).state("app.main-menu",{url:"menu",controller:"rootMenuComponentController",templateUrl:"/ClientApp/src/legacy-app/root/menu/rootMenuComponent.html"}).state("app.articleStatistic",{url:"{slug}_{id}/legacy-report",controller:"ArticleReportController",templateUrl:"/ClientApp/src/legacy-app/article/articleReport.html",resolve:{chapterReport:["$stateParams","articleService","$location",function(i,o,h){return o.getReport(i.id).then(function(p){return p},function(){h.path("/")})}],article:["$stateParams","articleService","parserService",function(i,o,h){return o.getArticleFromCache(i.id).then(function(p){return o.getArticleDetails(i.id).then(function(){}),p},function(){return o.getArticleDetails(i.id).then(function(p){return p})})}]}}).state("app.articleElasticStatistic",{url:"{slug}_{id}/{v}/report",controller:"ArticleElasticReportController",templateUrl:"/ClientApp/src/legacy-app/article/articleElasticReport.html",resolve:c}).state("app.articleElasticStatisticAlt",{url:"{slug}_{id}/report",controller:"ArticleElasticReportController",templateUrl:"/ClientApp/src/legacy-app/article/articleElasticReport.html",resolve:c}).state("app.snipStatistic",{url:"snips/{slug}_{id}/legacy-report",controller:"SnipReportController",templateUrl:"/ClientApp/src/legacy-app/snip/snipReport.html",resolve:{chapterReport:["$stateParams","snipService","parserService",function(i,o){return o.getReport(i.id)}],snip:["$stateParams","snipService","parserService",function(i,o,h){return o.getSnipDetails(i.id).then(function(p){return p})}]}}).state("app.snipElasticStatistic",{url:"snips/{slug}_{id}/report",controller:"SnipElasticReportController",templateUrl:"/ClientApp/src/legacy-app/snip/snipElasticReport.html"}).state("app.snipDetail",{url:"snips/{slug}_{id}",controller:"SnipDetailController",templateUrl:"/ClientApp/src/legacy-app/snip/snipDetail.html",resolve:{snip:["$stateParams","snipService","profileService","parserService","$location",function(i,o,h,p,v){var C=i.id;return C||v.path("/").replace(),h.getProfile().then(function(){return o.getSnipDetailsFromCache(C).then(function(A){return o.getSnipDetails(C).then(function(){}),A},function(){return o.getSnipDetails(C).then(function(A){return A},function(){v.path("/").replace()})})})}]},translatable:!0}).state("app.articleEditAlt",{disableNavigation:!0,url:"{slug}_{id}/{v}/edit",controller:"ArticleEditController",templateUrl:"/ClientApp/src/legacy-app/article/articleEdit.html"}).state("app.articleEdit",{disableNavigation:!0,url:"{slug}_{id}/edit",controller:"ArticleEditController",templateUrl:"/ClientApp/src/legacy-app/article/articleEdit.html"}).state("app.articleDetail",{url:"{slug}_{id}/{v}",controller:"ArticleDetailController",templateUrl:"/ClientApp/src/legacy-app/article/articleDetail.html",resolve:{article:f},translatable:!0}).state("app.articleDetailAlt",{url:"{slug}_{id}",controller:"ArticleDetailController",templateUrl:"/ClientApp/src/legacy-app/article/articleDetail.html",resolve:{article:f},translatable:!0}).state("app.sponsoredArticleEditAlt",{disableNavigation:!0,url:"sparticles/{slug}_{id}/{v}/edit",controller:"SponsoredArticleEditController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticle/sponsoredArticleEdit.html"}).state("app.sponsoredArticleEdit",{disableNavigation:!0,url:"sparticles/{slug}_{id}/edit",controller:"SponsoredArticleEditController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticle/sponsoredArticleEdit.html"}).state("app.sponsoredArticleDetail",{url:"sparticles/{slug}_{id}",controller:"SponsoredArticleDetailController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticle/sponsoredArticleDetail.html",resolve:{sponsoredArticle:g}}).state("app.sponsoredArticleDetailAlt",{url:"sparticles/{slug}_{id}/{v}",controller:"SponsoredArticleDetailController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticle/sponsoredArticleDetail.html",resolve:{sponsoredArticle:g}}).state("app.adminsettings",{url:"adminsettings",controller:"AdminSettingsController",templateUrl:"/ClientApp/src/legacy-app/admin/adminSettings.html"}).state("app.notificationsettings",{url:"notifications/settings/{privateUserGuid}?optOutAll",controller:"NotificationSettingsController",templateUrl:"/ClientApp/src/legacy-app/notification/notificationSettings.html"}).state("app.my-profile",{url:"profile",controller:"ProfileController",templateUrl:"/ClientApp/src/legacy-app/user/profile.html"}).state("app.public-profile",{url:"profile/{id}",controller:"PublicProfileController",templateUrl:"/ClientApp/src/legacy-app/user/publicProfile.html"}).state("app.loginSaml2",{url:"login/saml2",controller:"LoginSaml2Controller",templateUrl:"/ClientApp/src/legacy-app/authentication/loginSaml2.html"}).state("app.register",{url:"register?closedToken",controller:"RegisterController",templateUrl:"/ClientApp/src/legacy-app/authentication/register.html",resolve:{registerForNewsletter:function(){return!1}}}).state("app.registerNewsletter",{url:"newsletter-subscribe",controller:"RegisterController",templateUrl:"/ClientApp/src/legacy-app/authentication/register.html",resolve:{registerForNewsletter:function(){return!0}}}).state("app.registrationcomplete",{url:"account/registration-complete",templateUrl:"/ClientApp/src/legacy-app/content/registrationcomplete.html"}).state("app.requestPassword",{url:"account/request-password",controller:"RequestPasswordController",templateUrl:"/ClientApp/src/legacy-app/authentication/requestPassword.html"}).state("app.passwordResetComplete",{url:"account/password-resetted",templateUrl:"/ClientApp/src/legacy-app/content/passwordresetcomplete.html"}).state("app.requestPasswordComplete",{url:"account/password-requested",templateUrl:"/ClientApp/src/legacy-app/content/requestpasswordcomplete.html"}).state("app.unsubscribeNewsletter",{url:"account/newsletter-unsubscribe/{id}",controller:"UnsubscribeController",templateUrl:"/ClientApp/src/legacy-app/user/unsubscribe.html"}).state("app.accountsettings",{url:"settings",controller:"AuthenticationSettingsController",templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationSettings.html"}).state("app.special",{url:"specials/{id}",controller:"SpecialDetailController",templateUrl:"/ClientApp/src/legacy-app/special/specialDetail.html",resolve:{special:["$stateParams","specialService",function(i,o){return o.getSpecial(i.id)}]}}).state("app.specialStatistics",{url:"campaigns/specials/{id}/legacy-report",controller:"SpecialReportController",templateUrl:"/ClientApp/src/legacy-app/special/specialReport.html"}).state("app.surveyDetails",{url:"surveys/{id}?preview",controller:"SurveyDetailController",templateUrl:"/ClientApp/src/legacy-app/survey/surveyDetail.html"}).state("app.workflow",{url:"workflow/{id}?preview",controller:"workflowController",templateUrl:"/ClientApp/src/legacy-app/workflow/workflowTemplate.html"}).state("app.videoplay",{url:scope.currentScope.prefixAppRoutes+"apicodo-video/{id}",controller:"apicodoMediaPlayPageController",templateUrl:"/ClientApp/src/legacy-app/media/apicodoMediaPlayPage.html"}).state("app.specialElasticStatistic",{url:"campaigns/specials/{id}/report",controller:"SpecialElasticReportController",templateUrl:"/ClientApp/src/legacy-app/special/specialElasticReport.html"}).state("app.search",{url:"search?q&chapterIds",controller:"SearchController",templateUrl:"/ClientApp/src/legacy-app/search/search.html",reloadOnSearch:!1}).state("app.campaignStatistic",{url:"campaigns/{pin}/report",controller:"CampaignReportController",templateUrl:"/ClientApp/src/legacy-app/campaign/campaignReport.html"}).state("app.campaignDetail",{url:"campaigns/{pin}",controller:"AdvertisementController",templateUrl:"/ClientApp/src/legacy-app/campaign/shipments.html"}).state("app.authorDashboard",{url:"dashboard",controller:"DashboardController",templateUrl:"/ClientApp/src/legacy-app/author/dashboard.html"}).state("app.snipApply",{url:"snips/{slug}_{id}/apply",controller:"SnipApplyController",templateUrl:"/ClientApp/src/legacy-app/snip/snipApply.html"}).state("app.marketResearchStatistic",{url:"campaigns/marketresearch/{id}/legacy-report",controller:"MarketResearchReportController",templateUrl:"/ClientApp/src/legacy-app/marketResearch/MarketResearchReport.html"}).state("app.marketResearchElasticStatistic",{url:"campaigns/marketresearch/{id}/report",controller:"MarketResearchElasticReportController",templateUrl:"/ClientApp/src/legacy-app/marketResearch/MarketResearchElasticReport.html"}).state("app.brochureStatistic",{url:"campaigns/brochures/{id}/legacy-report",controller:"BrochureReportController",templateUrl:"/ClientApp/src/legacy-app/brochure/BrochureReport.html"}).state("app.brochureElasticStatistic",{url:"campaigns/brochures/{id}/report",controller:"BrochureElasticReportController",templateUrl:"/ClientApp/src/legacy-app/brochure/BrochureElasticReport.html"}).state("app.bannerCampaignStatistic",{url:"campaigns/banners/{pin}/legacy-report",controller:"bannerCampaignReportController",templateUrl:"/ClientApp/src/legacy-app/bannerCampaign/bannerCampaignReport.html"}).state("app.bannerCampaignElasticStatistic",{url:"campaigns/banners/{pin}/report",controller:"BannerCampaignElasticReportController",templateUrl:"/ClientApp/src/legacy-app/bannerCampaign/bannerCampaignElasticReport.html"}).state("app.sponsoredArticleCampaignStatistic",{url:"campaigns/sparticles/{pin}/legacy-report",controller:"sponsoredArticleCampaignReportController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticleCampaign/sponsoredArticleCampaignReport.html"}).state("app.sponsoredArticleCampaignElasticStatistic",{url:"campaigns/sparticles/{pin}/report",controller:"SponsoredArticleCampaignElasticReportController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticleCampaign/sponsoredArticleCampaignElasticReport.html"}).state("app.premiumStatistic",{url:"campaigns/premiums/{pin}/legacy-report",controller:"premiumReportController",templateUrl:"/ClientApp/src/legacy-app/premium/premiumReport.html"}).state("app.premiumElasticStatistic",{url:"campaigns/premiums/{pin}/report",controller:"PremiumElasticReportController",templateUrl:"/ClientApp/src/legacy-app/premium/premiumElasticReport.html"}).state("app.superStatistic",{url:"campaigns/super/{pin}/legacy-report",controller:"superCampaignReportController",templateUrl:"/ClientApp/src/legacy-app/superCampaign/superCampaignReport.html"}).state("app.superElasticStatistic",{url:"campaigns/super/{pin}/report",controller:"SuperCampaignElasticReportController",templateUrl:"/ClientApp/src/legacy-app/superCampaign/superCampaignElasticReport.html"}).state("app.staticArticleEditAdmin",{url:"staticarticles/{id}/edit",controller:"StaticArticleEditController",disableNavigation:!0,templateUrl:"/ClientApp/src/legacy-app/staticArticle/staticArticleEdit.html",resolve:{staticArticleId:["$stateParams",function(i){return i.id}]}}).state("app.companyNews",{url:"companyNews/{id}",controller:"StaticArticleDetailController",disableNavigation:!0,forceShowNavigationBranding:!0,templateUrl:"/ClientApp/src/legacy-app/staticArticle/staticArticleDetail.html",resolve:{staticArticle:["companyNewsService","parserService","$stateParams",function(i,o,h){return i.getCompanyNewsDetail(h.id).then(function(p){return o.postProcessHtml(p),p})}]}}).state("app.rubrics",{url:"rubrics?q",controller:"",templateUrl:"/ClientApp/src/redesign/rubrics/rubrics.html"}),scope.currentChapter.settings.featureFeedback&&t.state("app.feedback",{url:"feedback",controller:"FeedbackController",templateUrl:"/ClientApp/src/legacy-app/user/feedback.html"}),!1!==scope.currentScope.network.settings.configurations.enableCalendar&&t.state("app.eventCalendar",{url:"events",controller:"EventCalendarController",templateUrl:"/ClientApp/src/legacy-app/event/eventCalendar.html"}),!1!==scope.currentScope.network.settings.configurations.enableCalendar&&scope.currentScope.chapter.settings.configurations.enableEventCalendar&&t.state("app.eventCalendarDetail",{url:"events/{guid}",controller:"EventCalendarDetailController",templateUrl:"/ClientApp/src/legacy-app/event/eventCalendarDetail.html",translatable:!0,resolve:{event:["eventCalendarService","$stateParams","$state",function(i,o,h){return i.getEvent(o.guid).then(function(p){return p},function(){h.go("app.main-news")})}]}}),!1!==scope.currentScope.network.settings.configurations.enableCalendar&&scope.currentScope.chapter.settings.configurations.enableEventCalendar&&t.state("app.eventCalendarEdit",{disableNavigation:!0,url:"events/{guid}/edit",controller:"EventCalendarEditController",templateUrl:"/ClientApp/src/legacy-app/event/eventCalendarEdit.html",resolve:{event:["eventCalendarService","$stateParams","$state",function(i,o,h){return i.getEventForEdit(o.guid).then(function(p){return p},function(){h.go("app.main-news")})}]}}),scope.currentChapter.settings.featureSales&&t.state("app.sponsoredArticleList",{url:"sparticles",controller:"SponsoredArticleListController",templateUrl:"/ClientApp/src/legacy-app/sponsoredArticle/sponsoredArticleList.html"}).state("app.campaigns",{url:"campaigns",controller:"CampaignController",templateUrl:"/ClientApp/src/legacy-app/campaign/campaigns.html"}).state("app.advertiserBillingInfo",{url:"advertisers/billinginfo",controller:"AdvertiserBillingInfoController",templateUrl:"/ClientApp/src/legacy-app/advertiser/advertiserBillingInfo.html"}).state("app.consumeAdvertiserToken",{url:"advertisers/connect",controller:"AdvertiserConsumeController",templateUrl:"/ClientApp/src/legacy-app/advertiser/advertiserConsume.html"}).state("app.advertiserConsumtionComplete",{url:"advertisers/connected",templateUrl:"/ClientApp/src/legacy-app/advertiser/advertiserConsumationComplete.html"}),scope.currentChapter.settings.featureAuthorBilling&&t.state("app.authorBillingInfo",{url:"author/billinginfo",controller:"AuthorBillingInfoController",templateUrl:"/ClientApp/src/legacy-app/author/authorBillingInfo.html"}),scope.currentChapter.managingParent.closed&&t.state("app.closedChapter",{url:"closed?token=",controller:"ClosedChapterController",templateUrl:"/ClientApp/src/legacy-app/closedChapter/closedChapter.html"}).state("app.ikUpLanding",{url:"landing",controller:"IkUpLandingPageController",templateUrl:"/ClientApp/src/legacy-app/ikUpLandingPage/ikUpLandingPage.html"}),t.state("app.authors",{url:"authors",controller:"AuthorListController",templateUrl:"/ClientApp/src/legacy-app/author/authorList.html"}).state("app.imagelicensing",{url:"imagelicensing",templateUrl:"/ClientApp/src/legacy-app/content/imagelicensing.html"}),scope.currentScope.network.staticArticles.concat(scope.currentScope.chapter.staticArticles).forEach(function(i){i.path&&t.state("app.staticArticles_"+i.id,{url:i.path.substring(1),templateUrl:"/ClientApp/src/legacy-app/staticArticle/staticArticleDetail.html",controller:"StaticArticleDetailController",resolve:{staticArticle:["staticArticleService","parserService",function(o,h){return o.getStaticArticle(i.id).then(function(p){return h.postProcessHtml(p),p})}]}}).state("app.staticArticles_"+i.id+".edit",{disableNavigation:!0,url:"/edit",controller:"StaticArticleEditController",templateUrl:"/ClientApp/src/legacy-app/staticArticle/staticArticleEdit.html",resolve:{staticArticleId:function(){return i.id}}})}),(scope.currentScope.network.settings.appLinkAndroid||scope.currentScope.network.settings.appLinkITunes)&&t.state("app.appStore",{url:"app",controller:"AppStoreController",templateUrl:"/ClientApp/src/legacy-app/appStore/appStore.html"})):t.state("app",{url:"/",abstract:!0,template:"<div ui-view></div>"}),navigator.userAgent&&-1!==navigator.userAgent.indexOf("Merkurist_IAB")?(t.state("clickNotification",{url:"/click/notification/{id}"}).state("clickSpecial",{url:"/click/special/{guid}/{id}"}).state("clickPremiumBanner",{url:"/click/premiumBanner/{guid}/{pin}"}).state("clickSuperBanner",{url:"/click/superBanner/{guid}/{pin}"}).state("clickBanner",{url:"/click/banner/{guid}/{pin}"}).state("clickSurveyBanner",{url:"/click/surveyBanner/{guid}/{pin}"}).state("app.untrackedNotification",{url:"/untracked/{untrackedUri}"}).state("app.documentDownload",{url:"{route:pdf|document}/{id}"}).state("app.fileDownload",{url:"file/{id}"}).state("app.offline",{url:"appOffline",templateUrl:"/ClientApp/src/legacy-app/content/appOffline.html"}),scope.currentChapter.name||t.state("home",{url:"/",controller:"AppLandingController",templateUrl:"/ClientApp/src/legacy-app/landing/appLanding.html"})):scope.currentChapter.name||t.state("home",{url:"/",controller:"LandingController",templateUrl:"/ClientApp/src/legacy-app/landing/landing.html"}),e.otherwise("/")}]),app.run(["$rootScope","clickService","profileService","$location","$timeout","$state","scopeService","redirectService","$window",function(e,t,a,n,u,g,f,r,s){var c=["app.closedChapter","app.loginSaml2","app.register","app.registrationcomplete","app.requestPassword","app.passwordResetComplete","app.requestPasswordComplete","app.unsubscribeNewsletter","app.main-login","app.imprint","app.privacyPolicy","app.accessibility","app.tos","app.companyNews","app.ikUpLanding","app.documentDownload","app.untrackedNotification","app.offline","app.fileDownload","app.appStore","app.optOut"],d=r.redirectNotificationUrl;e.$on("$stateChangeSuccess",function(i,o,h){u(function(){if("app.main-news"!=o.name&&!0===e.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled){var p=e.scope.network.settings.languagePack.split("-")[0];null!=e.scope.profile.activeUserLanguage?.vendorLanguageCode&&p!=e.scope.profile.activeUserLanguage?.vendorLanguageCode&&(p=e.scope.profile.activeUserLanguage?.vendorLanguageCode,moment.locale(p),e.$broadcast("apicodo.translate",e.scope.profile.activeUserLanguage.vendorLanguageCode))}})}),e.$on("$stateChangeStart",function(i,o,h){switch(scope.network.landingSwitch&&"app.ikUpLanding"!==o.name&&"app.offline"!==o.name&&(i.preventDefault(),window.sessionStorage.setItem("returnUrl",n.path()),g.go("app.ikUpLanding",{},{location:"replace"})),a.getProfile(!0).then(function(C){if(C.hasChapterAccess||-1!==c.indexOf(o.name)){if(C.adminSetPassword&&"app.requestPassword"!==o.name)window.sessionStorage.setItem("returnUrl",n.path()),g.go("app.requestPassword",{},{location:"replace"});else if(C.hasChapterAccess){var A=window.sessionStorage.getItem("returnUrl");A&&(i.preventDefault(),window.sessionStorage.removeItem("returnUrl"),n.path(A))}}else window.sessionStorage.setItem("returnUrl",n.path()),i.preventDefault(),g.go("app.closedChapter",{},{location:"replace"})}),o.name){case"app.main-snips":e.showSnipSlide||(g.go("app.main-news",{},{location:"replace"}),i.preventDefault());break;case"clickPremiumBanner":t.clickPremium(h.guid,h.pin).then(function(C){d(C.uri)}),i.preventDefault();break;case"clickSuperBanner":t.clickSuper(h.guid,h.pin).then(function(C){d(C.uri)}),i.preventDefault();break;case"clickBanner":console.log("clickBanner toParams",h),t.clickBanner(h.guid,h.pin).then(function(C){console.log("clickBanner result from api",C),d(C.uri)}),i.preventDefault();break;case"clickSurveyBanner":t.clickSurveyBanner(h.guid,h.pin).then(function(C){d(C.uri)}),i.preventDefault();break;case"clickSpecial":t.clickSpecial(h.guid,h.id).then(function(C){d(C.uri)}),i.preventDefault();break;case"clickNotification":t.clickNotification(h.id).then(function(C){d(C.uri)}),i.preventDefault();break;case"app.untrackedNotification":d(h.untrackedUri),i.preventDefault();break;case"app.documentDownload":t.clickDocument(h.id).then(v),i.preventDefault();break;case"app.fileDownload":t.clickFile(h.id).then(v),i.preventDefault()}function v(C){"android"===cordova.platformId&&C.isPdf?cordova.InAppBrowser.open("/Content/pdfview/web/?file="+C.uri,"_blank","location=yes,hidenavigationbuttons=yes,hideurlbar=yes,closebuttoncaption="+scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption")):cordova.InAppBrowser.open(C.uri,"_system","location=yes,closebuttoncaption="+scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption"))}})}]),app.run(["$rootScope","$window","$location","$uibModalStack","$timeout","$state","metaService","profileService",function(e,t,a,n,u,g,f,r){e.profile=r.profile,window.scope.profile=r.profile,e.$on("$stateChangeStart",function(s){var c=n.getTop();c&&(n.dismiss(c.key),s.preventDefault())}),e.$on("$locationChangeStart",function(s,c,d){c.endsWith("?top")&&(s.preventDefault(),a.url(c.replace(/^(?:\/\/|[^\/]+)*\//,"").replace(/\?top$/g,"")))}),e.$on("$stateChangeSuccess",function(s,c,d,i,o){function h(p){if(null===p||"object"!=typeof p)return p;var v=p.constructor();for(var C in p)p.hasOwnProperty(C)&&"object"!=typeof p[C]&&(v[C]=p[C]);return v}g.includes("app.main-news")||t.scrollTo(0,0),document.dispatchEvent(new CustomEvent("angularCustomEvent",{detail:{source:"stateChangeSuccess",toState:c}})),i&&i!==c&&!d.back?(d.back=i,d.backParams=o):i.name===c.name&&o.back&&(d.back=o.back,d.backParams=o.backParams),o&&o.backParams&&JSON.stringify(h(d))===JSON.stringify(h(o.backParams))&&(d.back=o.backParams.back,d.backParams=o.backParams.backParams),f.stateChanged(c)}),e.$on("$locationChangeSuccess",function(s,c,d){c!==d&&(Oculus.push(),Oculus.navigate(d))})}]),app.directive("resolve",["$controller",function(e){return{scope:!0,link:function(t,a,n){var u=t.$eval(n.resolve);angular.extend(u,{$scope:t}),e(n.resolveController,u)}}}]),objectFitImages(),app.controller("AdminSettingsController",["$scope","$rootScope","$state","localStorageService","profileService","$location",function(e,t,a,n,u,g){e.showClearLandingRedirectButton=!1,u.getProfile().then(function(f){!f.isSales&&!f.isMerkuristJournalist&&g.path("/").replace(),f.isAdmin&&t.scope.network.settings.languagePack.endsWith("-business")&&(e.showClearLandingRedirectButton=!0);var r=f.guid;e.$watch("profile.guid",function(){r!==f.guid&&g.path("/")})},function(f){g.path("/").replace()}),e.storage=n,e.toggleOculusFeedback=function(){n.enableOculusFeedback=!n.enableOculusFeedback},e.toggleArticleExitRates=function(){n.enableArticleExitRates=!n.enableArticleExitRates},e.toggleApp=function(){n.app=!n.app},e.removeLandingRedirect=function(){window.location.href="https://"+t.scope.globalSettings.configurations.sharedAppLandingPageDomain.domain+"/landing?delete=true"}}]),app.controller("AdvertiserBillingInfoController",["$scope","advertiserService","profileService","$location",function(e,t,a,n){e.advertisers=[],e.success=!1,e.fromApply=n.search().fromApply,a.getProfile().then(function(f){f.isRegistered||n.path("/").replace(),t.getAdvertisersByUser().then(function(r){$.each(r,function(s,c){e.advertisers.push({accountHolder:"",costCenter:"",phone:"",gender:"",email:"",country:"",iban:"",guid:"",title:"",bic:"",firstName:"",lastName:"",companyName:"",address:"",city:"",postalCode:null,chapter:c.chapter}),c.title&&(e.advertisers[s].title=c.title),c.gender&&(e.advertisers[s].gender=c.gender),c.country&&(e.advertisers[s].country=c.country),c.phone&&(e.advertisers[s].phone=c.phone),c.email&&(e.advertisers[s].email=c.email),c.costCenter&&(e.advertisers[s].costcenter=c.costCenter),c.guid&&(e.advertisers[s].guid=c.guid),c.firstName&&(e.advertisers[s].firstname=c.firstName),c.accountHolder&&(e.advertisers[s].accountholder=c.accountHolder),c.bic&&(e.advertisers[s].bic=c.bic),c.lastName&&(e.advertisers[s].lastname=c.lastName),c.companyName&&(e.advertisers[s].companyname=c.companyName),c.address&&(e.advertisers[s].address=c.address),c.city&&(e.advertisers[s].city=c.city),c.postalCode&&(e.advertisers[s].postalcode=c.postalCode),c.iban&&(e.advertisers[s].iban=c.iban),c.iban&&(e.advertisers[s].ibanshow=c.iban.substr(0,7)+c.iban.substr(7).replace(/.(?=.{4,}$)/g,"*"))}),e.currentAdvertiser=e.advertisers[0]})},function(f){n.path("/").replace()}),e.resetValue=function(f){e.currentAdvertiser.iban=""},e.signUp=function(f,r){f&&(0==r.gender&&(r.gender=!1),1==r.gender&&(r.gender=!0),t.updateBillingInfo(r).then(function(s){e.success=!0},function(){e.success=!1}))}}]),app.controller("AdvertiserConsumeController",["$scope","$location","profileService","advertiserService","$timeout","$uibModal","$state",function(e,t,a,n,u,g,f){e.working=!0,t.search().token?n.getAdvertiserByToken(t.search().token).then(function(r){e.advertiser=r,u(function(){e.working=!1},1e3)}):e.working=!1,e.login=function(){g.open({templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationDialog.html",controller:"AuthenticationDialog",size:"lg",resolve:{authenticationCallback:function(){return function(){}},facebookSignUpData:function(){return null},login:!0}})},e.consume=function(){n.consumeAdvertiserToken(t.search().token).then(function(){e.consumeError=!1,a.getProfile(!0).then(function(){f.go("app.advertiserConsumtionComplete")})},function(){e.consumeError=!0})}}]),app.factory("advertiserService",["$http","$q","$location",function(e,t){return{getAdvertiserByToken:function(f){var r=t.defer();return e.get(scope.apiEndpoint+"advertis0rs/"+f).then(function(s){r.resolve(s.data)},function(){r.reject()}),r.promise},getAdvertisersByUser:function(){var f=t.defer();return e.get(scope.apiEndpoint+"advertis0rs/getbyuser").then(function(r){f.resolve(r.data)},function(){f.reject()}),f.promise},updateBillingInfo:function(f){var r=t.defer();return e.put(scope.apiEndpoint+"advertis0rs/billingInfo",f).then(function(s){r.resolve(s.data)},function(){r.reject()}),r.promise},consumeAdvertiserToken:function(f){var r=t.defer();return e.put(scope.apiEndpoint+"advertis0rs/"+f).then(function(s){r.resolve(s)},function(){r.reject()}),r.promise}}}]),app.controller("AppStoreController",["$scope",function(e){e.isRedesign="Redesign2024"==scope.currentScope.network.settings.configurations.contentRenderEngine,e.appLinkAndroid=scope.currentScope.network.settings.appLinkAndroid,e.appLinkITunes=scope.currentScope.network.settings.appLinkITunes;let t=navigator.userAgent,a=t.includes("Macintosh")&&"ontouchend"in document;e.isIOS=/iPhone|iPad|iPod/i.test(t)||a,e.isAndroid=/Android/i.test(t),e.isOther=!e.isIOS&&!e.isAndroid,e.showIos=e.appLinkITunes&&(e.isIOS||e.isOther),e.showAndroid=e.appLinkAndroid&&(e.isAndroid||e.isOther)}]),app.controller("articleCancelScheduledPublish",["$Scope","article",function(e,t){}]),app.controller("ArticleCreatePublishDialog",["$scope","profileService","article","markdown","heading","htmlDocument","publishService","resultCallback","$rootScope","notificationService","articleService",function(e,t,a,n,u,g,f,r,s,c,d){e.working=!1,e.error=!1,e.dateOptions={minDate:new Date,showWeeks:!0};var i=s.scope.network.settings.languagePack.split("-")[0];null!=s.scope.profile.activeUserLanguage?.vendorLanguageCode&&i!=s.scope.profile.activeUserLanguage?.vendorLanguageCode&&(i=s.scope.profile.activeUserLanguage?.vendorLanguageCode),e.isJournalistOnly=s.profile.isJournalist&&!s.profile.isMerkuristJournalist,e.publishButtonLabel=s.scope.currentScope.network.getResourceOrKeyName(s.scope.currentScope.chapter.settings.enablePublishWorkflowForJournalists&&e.isJournalistOnly?"web_common_submit":"web_common_publish"),e.showContentConnectTagBox=!1,e.words=!1,e.sentences=!1,e.paragraphs=!1,e.alreadyNotified=!1,e.datepickerPlaceholder=moment.localeData(i).longDateFormat("L"),e.allowCriticalContent=s.scope.currentScope.chapter.settings.enableCriticalContent,t.getProfile().then(function(v){e.firstPublish=v.isMerkuristJournalist&&!a.published,e.allowBreakingNews=v.isMerkuristJournalist}),e.alreadyNotified=a.alreadyNotified;var o=new Date(Date.now());o.setMilliseconds(0),o.setSeconds(0),e.minDate=o,e.minDateString=new Date(o).toISOString().slice(0,-1),c.getNotifiedUsersCount().then(function(v){e.NumberOfNotifiedUsers=v});var h=new Date(a.scheduledPublish);a.scheduledPublish||(h=new Date(Date.now())),h.setMilliseconds(0),h.setSeconds(0);var p=new Date(a.scheduledArchive);a.scheduledArchive||(p=h),p.setMilliseconds(0),p.setSeconds(0),e.publishArticle={id:a.id,criticalContent:!1,enableInteraction:!0!==s.scope.currentScope.chapter.settings.configurations.disableInteractionsByDefault,inactive:a.inactive,chapterSlugs:[],breakingNews:!1,heading:u,calendarDate:null,cbCalendarDate:!1,scheduledPublish:h,scheduledArchive:p,scheduledPublishDo:!!a.scheduledPublish,scheduledArchiveDo:!!a.scheduledArchive,externalContent:!!a.externalContent,externalContentNotifyAdminsNewContent:a.externalContentNotifyAdminsNewContent,externalContentNotifyAdminsChangedContent:a.externalContentNotifyAdminsChangedContent,externalContentNotifyAllChangedContent:a.externalContentNotifyAllChangedContent,externalContentUpdateCronSelection:a.externalContentUpdateCronSelection,externalContentConfluenceSourceId:a.externalContentConfluenceSourceId,firstPublish:!!e.firstPublish,assetReferences:a.assetReferences,updatePublishDateAfterFirstPublish:!1},e.publishArticle.scheduledPublishString=e.publishArticle.scheduledPublish,e.scheduledDate=h,e.networkChapters=[],$.each(s.scope.currentScope.network.chapters,function(v,C){2===C.managementState&&C.id!==scope.currentChapter.id&&e.networkChapters.push({name:C.name,slug:C.slug})}),e.showContentConnectTagBox=e.networkChapters.length>0,e.contentConnectTagBox={selectionOptions:{width:"90%",dataSource:e.networkChapters,showSelectionControls:!0,searchEnabled:!0,displayExpr:"name",valueExpr:"slug",selectAllText:s.scope.currentScope.network.getResourceOrKeyName("web_rubric_choice_check_all"),placeholder:s.scope.currentScope.network.getResourceOrKeyName("web_articleDialog_createPublish_contentConnectPlaceholder"),onContentReady:function(v){e.dxTagBoxInstance=v.component}}},d.getContentConnectNetworks().then(function(v){v.length>0&&(e.showContentConnectTagBox=!0),v.forEach(function(C){C.networkChapters.forEach(function(A){e.dxTagBoxInstance.getDataSource().store().insert({name:C.name+": "+A.name,slug:A.slug})})}),e.dxTagBoxInstance.load()}),e.formIsValid=function(){return!e.publishArticle.scheduledArchiveDo||e.publishArticle.scheduledArchive>=e.publishArticle.scheduledPublish},e.words=f.checkWords(g),e.sentences=f.checkSentences(g),e.paragraphs=f.checkParagraphs(g),e.publish=function(){e.working||(e.working=!0,e.publishArticle.cbCalendarDate||(e.publishArticle.calendarDate=null),e.publishArticle.scheduledPublishDo||(e.publishArticle.scheduledPublish=null),e.publishArticle.scheduledArchiveDo||(e.publishArticle.scheduledArchive=null),e.publishArticle.firstPublish=e.firstPublish,e.publishArticle.chapterSlugs=e.dxTagBoxInstance.option("selectedItems").map(function(v){return v.slug}),r&&r(e.publishArticle),e.$dismiss())}}]),app.controller("ArticleDetailController",["$scope","$rootScope","$previousState","articleService","snipService","articleQuestionService","scopeService","parserService","$location","article","$timeout","shipmentService","$uibModal","translationService","profileService","assetService",function(e,t,a,n,u,g,f,r,s,c,d,i,o,h,p,v){if(e.snip=void 0,e.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage,e.readOnlyMode=t.profile.readOnlyMode,e.hideUserInteraction=1==scope.currentChapter.settings.configurations.hideAssetsForUnregisteredUsers&&0==t.scope.profile.isRegistered&&0==t.app,(!document.referrer||!document.referrer.startsWith(scope.globalSettings.serverCdnUrl))&&!a.get()&&history&&window.allowRedirect){var C=t.scope.currentChapter.path+s.url();history.replaceState(null,"",scope.currentChapter.path),history.pushState(null,"",C)}function A(w){e.articleQuestions=w,$.each(w,function(D,S){S.normalAnswers=[],S.freeTextAnswers=[],$.each(S.items,function(U,I){I.isFreeTextAnswer?S.freeTextAnswers.push(I):S.normalAnswers.push(I)}),g.getAnswerId(S.id).then(function(U){e.articleQuestionAnswerIds[S.id]=[],$.each(U,function(I,m){if(e.articleQuestionAnswerIds[S.id].push(m.itemId),m.freeText){var F=S.freeTextAnswers.find(function(E){return E.id===m.itemId});F.freeText=m.freeText,F.synchedFreeText=m.freeText}})})})}c&&(f.getNetworkChapter(c.originChapterSlug,c.originNetworkSlug).then(function(w){e.crossNetworkInfo=w}),t.scope.currentScope.chapter.settings.enableArticleQuestions&&(e.articleQuestionAnswerIds={},g.getArticleQuestions(c.id).then(A))),e.answering=function(w,D){var S=e.articleQuestions.find(function(V){return V.id===w}),U=S.items.find(function(V){return V.id==D});if(!S.locked){var I=e.articleQuestionAnswerIds[w].includes(D),m=e.articleQuestionAnswerIds[w],F=I&&(!U.isFreeTextAnswer||!U.freeText);if(!S.allowMultipleChoice||F){var E=I?D:m[0];(U.id!==E||!U.isFreeTextAnswer||!U.freeText)&&g.deleteArticleQuestionAnswersByUser(E).then(function(){m.splice(m.indexOf(E),1);var V=S.items.find(function(q){return q.id==E});V.freeText=null,V.synchedFreeText=null})}F||g.postArticleQuestionAnswer(D,U.freeText).then(function(){U.synchedFreeText=U.freeText,I||m.push(D)})}};var x,w,b=function(){e.article.assetReferences&&(x=e.article.assetReferences.reduce(function(w,D){return w[D.guid]=D,w},{}))};if(e.resolveAsset=function(w){return x[w]},e.socialMediaShareEnable=t.scope.currentScope.network.settings.socialMediaShareEnable,$(window).scroll(function(w){$(w.target).scrollTop()>100?$(".articleDetail-mobileNavigation-wrapper").addClass("articleDetail-mobileNavigation-wrapper-scrolled"):$(".articleDetail-mobileNavigation-wrapper").removeClass("articleDetail-mobileNavigation-wrapper-scrolled")}),e.recommendedArticles=[],e.recommendedArticlePairs=[],e.recommendedSnips=[],e.assetsMedia=[],e.assetsFacts=[],e.assetsQuestions=[],e.assetsComments=[],e.articleUpdater)(e.$parent.articleUpdater?e.$parent:e.$parent.$parent).$on("articleUpdate",function(w,D){e.article=D,r.postProcessHtml(e.article),e.article.detailsLoaded=!0,b(),e.$broadcast("$$rebind::refresh")});else{e.$watch(function(){return"article.detailsLoaded"},function(w){w&&b()});var y=c.id,l=function(){e.$watch("article.shipmentsPlaced",function(w){(w||0===w)&&i.resolve(c.shipmentsPlaced,y,e.currentLanguage).then(function(){t.scope.currentScope.chapter.settings.enableArticleRecommendations&&n.getRecommendedArticles(y).then(function(D){if(D.length){[].push.apply(e.recommendedArticles,D);for(var S=0;S<e.recommendedArticles.length;S+=2){var U=[];U.push(e.recommendedArticles[S]),e.recommendedArticles.length>S+1&&U.push(e.recommendedArticles[S+1]),e.recommendedArticlePairs.push(U)}}})})})};if(l(),e.article=c,e.availableTargetLanguages=null,h.getAvailableTargetLanguages().then(function(w){e.availableTargetLanguages=w}),t.scope.currentScope.chapter.settings.enableSnipRecommendations&&t.showSnipSlide&&c.snipId&&u.getRecommendedSnips(c.snipId).then(function(w){e.recommendedSnips=w}),c.snipId&&t.showSnipSlide&&u.getSnipDetails(c.snipId).then(function(w){e.currentPath=t.scope.currentScope.network.path,e.snip=w}),(w=window.navigator.userAgent).indexOf(" Android ")>-1&&w.indexOf("Version/")>-1&&parseFloat((w.match("Android ([0-9.]+)")||[])[1])<=4.4){var T=$(window).height();$(".app-mobile .articleDetail-wrapper").css("height",T+"px"),$(".app-desktop .articleDetail-wrapper").css("height",T+"px")}}var k=function(w){e.article.assetReferences.unshift(w)};e.selectedTargetLanguage=t.profile.favoriteLanguage,e.$on("apicodo.translate",function(w,D){e.translateArticleDetail(D)}),e.translateArticleDetail=function(w){w&&(e.selectedTargetLanguage=w),e.currentLanguage=e.selectedTargetLanguage,null===e.selectedTargetLanguage?(n.getArticleDetails(e.article.id).then(function(D){c.assetReferences=D.assetReferences,e.article=D,r.postProcessHtml(e.article),e.article.detailsLoaded=!0,b(),l(),e.$broadcast("$$rebind::refresh")}),g.getArticleQuestions(e.article.id).then(A)):(n.getTranslatedArticleDetails(e.article.id,e.selectedTargetLanguage,e.article.variantId).then(function(D){c.assetReferences=D.assetReferences,e.article=D,r.postProcessHtml(e.article),e.article.detailsLoaded=!0,b(),l(),e.$broadcast("$$rebind::refresh"),p.updateFavoriteLanguage(e.selectedTargetLanguage).then(function(){t.profile.favoriteLanguage=e.selectedTargetLanguage})}),g.getTranslatedArticleQuestions(e.article.id,e.selectedTargetLanguage).then(A))},e.assetCreateOpinionDialog=function(){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateOpinionDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 0},resultCallback:function(){return k},createAssetAsync:function(){return function(w){return v.insertAssetTextToArticle(w,e.article.id)}}}})},e.assetCreateFactDialog=function(){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateFactDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 8},resultCallback:function(){return k},createAssetAsync:function(){return function(w){return v.insertAssetTextToArticle(w,e.article.id)}}}})},e.assetCreateQuestionDialog=function(){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateQuestionDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 9},resultCallback:function(){return k},createAssetAsync:function(){return function(w){return v.insertAssetTextToArticle(w,e.article.id)}}}})},e.assetCreateImageDialog=function(w,D,S){w&&0!==w.length?D.length||o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateImageDialog.html",controller:"AssetCreateImageDialog",size:"lg",resolve:{files:function(){return w},resultCallback:function(){return k},createAssetAsync:function(){return function(U){return v.insertAssetImageToArticle(U,e.article.id)}}}}):D||S.$setPristine()},e.assetCreateVideoDialog=function(){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateVideoDialog.html",controller:"AssetCreateVideoDialog",size:"lg",resolve:{resultCallback:function(){return k},createAssetAsync:function(){return function(w){return v.insertAssetTextToArticle(w,e.article.id)}}}})},e.assetCreateGifDialog=function(){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateGifDialog.html",controller:"AssetCreateGifDialog",size:"lg",resolve:{resultCallback:function(){return k},createAssetAsync:function(){return function(w){return v.insertAssetTextToArticle(w,e.article.id)}}}})},e.assetSearchDialog=function(){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetSearchDialog.html",controller:"AssetSearchDialog",size:"lg",resolve:{resultCallback:function(){return k},articleId:function(){return e.article.id},assetReferences:function(){return e.article.assetReferences}}})},e.assetImageFocuspointDialog=function(w){o.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){return w}}})},e.scrollTo=function(w){$("body,html").animate({scrollTop:$(w).offset().top-120},1e3)},e.$watchCollection("article.assetReferences",function(){c&&(e.assetsMedia=[],e.assetsFacts=[],e.assetsQuestions=[],e.assetsComments=[],angular.isDefined(c.assetReferences)&&c.assetReferences.forEach(function(w){null!==w.assetImage||null!==w.assetText&&(5===w.assetText.type||6===w.assetText.type||7===w.assetText.type||10===w.assetText.type||13===w.assetText.type)?e.assetsMedia.push(w):null!==w.assetText&&(8===w.assetText.type?e.assetsFacts.push(w):9===w.assetText.type?e.assetsQuestions.push(w):0===w.assetText.type&&e.assetsComments.push(w))}))}),e.share=function(){if(!window.plugins||!window.plugins.socialsharing)return;window._paq&&_paq.push(["trackEvent","Conversion","StartShareArticle","ArticleDetail"]);let w=s.absUrl().substring(0,s.absUrl().lastIndexOf("/"));w.includes(e.article.path)||(w=s.absUrl()),window.plugins.socialsharing.shareWithOptions({message:(e.article.heading?e.article.heading+": ":"")+e.article.text+" "+w},function(){window._paq&&_paq.push(["trackEvent","Conversion","SuccessShareArticle","ArticleDetail"])})}}]),app.component("articleDisplayable",{templateUrl:"/ClientApp/src/legacy-app/article/articleDisplayable.html",bindings:{data:"<",article:"<"},controller:["$rootScope","scopeService",function(e,t){var a=this;a.enableHighQualityImage=e.scope.network.settings.configurations.enableHighQualityImage,this.$onInit=function(){a.data&&(!1===a.data.sponsored&&void 0!==a.data.sponsored&&function n(){let u=a.data.focusPoint;!u&&u.focusX1&&u.focusX2&&u.focusY1&&u.focusY2&&(fpCenterX=(u.focusX1+u.focusX2)/2,fpCenterY=(u.focusY1+u.focusY2)/2,xPercentage=fpCenterX/u.width,yPercentage=fpCenterY/u.height,a.style=`--crop-focus-x: ${xPercentage}; --crop-focus-y: ${yPercentage};`)}(),a.blobPath=e.scope.globalSettings.blobStorageCdnUrl+"/images/",a.data.coverImageGuid?(a.imagePath=a.blobPath+a.data.coverImageGuid,a.coverCache=a.data.coverImageCache??0):a.data.coverAssetReference&&a.data.coverAssetReference.assetImage?(a.imagePath=a.blobPath+a.data.coverAssetReference.assetImage.guid,a.coverCache=a.data.coverAssetReference.assetImage.cache??0):(a.coverCache=0,a.imagePath=a.blobPath+"/dummy.jpg"),a.data.originNetworkSlug&&a.data.originChapterSlug&&e.scope.currentScope.network.slug!==a.data.originNetworkSlug&&t.getNetworkChapter(a.data.originChapterSlug,a.data.originNetworkSlug).then(function(u){a.crossNetworkInfo=u}),a.categories=[],a.data.chapterSlugs&&a.data.chapterSlugs.forEach(u=>{let g=e.scope.currentScope.network.chaptersDictionary[u];g&&a.categories.push(g)}))}}]}),app.component("articleDisplayableSnip",{templateUrl:"/ClientApp/src/legacy-app/article/articleDisplayableSnip.html",bindings:{data:"<",horizontal:"<"},controller:["$rootScope",function(e){var t=this;t.hideComponent=!1,this.$onInit=function(){t.hideComponent=2==e.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig}}]}),app.controller("ArticleEditController",["$scope","scopeService","articleService","publishService","metaService","$state","authService","fileUploadService","formatterService","$location","$timeout","$uibModal","$rootScope","$interpolate","proseMirrorEditorService","editorAssetsService","backendHubProxy","spellingService","editorCommentService",function(e,t,a,n,u,g,f,r,s,c,d,i,o,h,p,v,C,A,x){e.initializedMobile=e.mobile,e.isPublishWorking=!1,e.isJournalistOnly=o.profile.isJournalist&&!o.profile.isMerkuristJournalist,e.publishButtonLabel=o.scope.currentScope.network.getResourceOrKeyName(o.scope.currentScope.chapter.settings.enablePublishWorkflowForJournalists&&e.isJournalistOnly?"web_common_submit":"web_common_publish"),e.enableHighQualityImage=o.scope.network.settings.configurations.enableHighQualityImage,e.articleAsExternalLink=!1,e.articleData={articleExternalLinkUrl:""},e.coverButtonText=o.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_changeCoverAsset"),e.forceArticleCoverDisabled=!1;var l,b=C("editorHub"),R=g.params.id,y="article_"+R+"_"+o.scope.currentScope.chapter.id,M=!1;e.forceArticleCoverDisabled="Redesign2024"==o.scope.network.settings.configurations.contentRenderEngine&&(o.scope.currentScope.chapter.settings.configurations.forceArticleCoverDisabled??!1),e.forceArticleCoverDisabled&&(e.coverButtonText=o.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_coverAsset")),b.on("broadcastSummary",function(N){e.revision.summary=N}),b.on("broadcastHeading",function(N){e.revision.texts[N.indexPosition].heading=N.heading}),b.on("broadcastAddVariant",function(){e.addTextVariant(!1)}),b.on("broadcastDeleteVariant",function(N){e.delTextVariant(!1,N.indexPosition)}),b.on("broadcastTitle",function(N){e.revision.texts[N.indexPosition].text=N.title}),b.start(function(){b.invoke("joinGroup",y)}),e.leaveEditor=function(){M=!0},e.blurHeading=function(N){b.invoke("updatingHeading",{groupName:y,heading:e.revision.texts[N].heading,indexPosition:N})},e.blurTitle=function(N){b.invoke("updatingTitle",{groupName:y,title:e.revision.texts[N].text,indexPosition:N})},e.blurSummary=function(){b.invoke("updatingSummary",{groupName:y,summary:e.revision.summary})};var w={coverAssetImages:[],texts:[{heading:"",text:""}],ChapterSlug:scope.currentChapter.slug};e.$on("$destroy",function(){u.setFavicon(),d.cancel(l)}),e.chapterHasTags=!!scope.currentChapter.chapterGroups&&scope.currentChapter.chapterGroups.length>0;var S,D=[];function U(){for(var N=e.article.revisions[0],H=N.published,ee=0;ee<e.article.revisions.length;ee++)(e.article.revisions[ee].published>N.published||!N.published)&&(H=(N=e.article.revisions[ee]).published);if(o.scope.currentScope.chapter.settings.enablePublishWorkflowForJournalists&&e.isJournalistOnly)for(var G=0;G<e.article.revisions.length;G++)(e.article.revisions[G].publishRequested>N.published||null===H)&&(H=e.article.revisions[G].publishRequested);var Y=new Date(H);e.article.scheduledPublish&&(Y=new Date(e.article.scheduledPublish)),e.publishConfirmMessage=e.isJournalistOnly?scope.currentScope.network.resources.web_article_edit_publishRequestSuccess:h(scope.currentScope.network.resources.web_article_edit_timeSincePublished)({timeSincePublished:s.momentFromNowAsString(Y)}),l=d(function(){U()},s.momentFromNowTimeout(Y),!1)}scope.currentChapter.chapterGroups&&scope.currentChapter.chapterGroups.forEach(function(N){N.chapters.forEach(function(H){D.push({text:H.shortName,slug:H.slug})})}),e.articleUpdater=!0,e.article={text:"",content:"",summary:"",heading:""},e.editor=null,e.changed=!1,e.loading=!0,e.wordCount=0,e.words=!1,e.paragraphs=!1,e.sentences=!1;var I=o.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_leaveMessage");window.onbeforeunload=function(){if(e.changed)return I};var m=!1;o.$on("$stateChangeStart",function(N,H){m?N.preventDefault():e.changed&&!confirm(I)?(m=!0,N.preventDefault(),M=!1,d(function(){m=!1},1e3)):(e.changed=!1,M&&(b.invoke("leaveGroup",y),p.closeConnection(),b.stop(),M=!1))}),e.textCarousel=null,e.textSlick=null,e.textSlickIndex=0,e.coverAssetSlickIndex=0,e.showRubricSelection=!1,e.rubricMultiSelectModel=[],e.rubricMultiSelectModelfordx=[];var F=function(N){e.revision=null,e.article=N,e.rubricMultiSelectModel.length=0,e.articleData.articleExternalLinkUrl=e.article.articleExternalLinkUrl,e.articleData.articleExternalLinkUrl&&(e.articleAsExternalLink=!0),D.length>0&&(e.showRubricSelection=!0),N.chapterSlugs.forEach(function(ee){var G=E(ee),Y={text:G,slug:ee};null!==G&&(e.rubricMultiSelectModel.push(Y),e.rubricMultiSelectModelfordx.push(Y.slug))}),e.rubricTagBoxEntered=!1,e.rubricTagBox={selectionOptions:{width:"auto",dataSource:D,value:e.rubricMultiSelectModelfordx,showSelectionControls:!0,searchEnabled:!0,displayExpr:"text",valueExpr:"slug",selectAllText:o.scope.currentScope.network.getResourceOrKeyName("web_rubric_choice_check_all"),placeholder:o.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_chapterTagsPlaceholder"),onContentReady:function(ee){e.dxTagBoxInstance=ee.component,e.rubricTagBoxEntered=!0},onValueChanged:function(ee){e.dxTagBoxInstance=ee.component,e.rubricTagBoxEntered&&(e.changed=!0,N.chapterSlugs=[],e.dxTagBoxInstance.option("selectedItems").forEach(G=>{N.chapterSlugs.push(G.slug)}))}}};var H=L(N);H?e.revision=H:(e.revision=w,N.revisions.push(w)),e.revision.texts.length||(H.texts=[{heading:"",text:""}]),S=P(N),d(function(){e.textCarousel||(e.textCarousel=$("#articleEdit-text-wrapper").find(".articleEdit-text-carousel"),e.textCarousel.on("afterChange",function(ee,G){e.textSlickIndex=G.currentSlide})),e.coverAssetCarousel||(e.coverAssetCarousel=$("#articleEdit-cover-wrapper").find(".articleEdit-cover-carousel"),e.coverAssetCarousel.on("afterChange",function(ee,G){e.coverAssetSlickIndex=G.currentSlide})),e.revision.texts.push({}),d(function(){e.revision.texts.splice(e.revision.texts.length-1,1),d(function(){e.textSlick=e.textCarousel.slick({dots:!0,initialSlide:e.textSlickIndex})},100)}),e.revision.coverAssetImages.push({}),d(function(){e.revision.coverAssetImages.splice(e.revision.coverAssetImages.length-1,1),d(function(){e.coverAssetSlick=e.coverAssetCarousel.slick({dots:!0,initialSlide:e.coverAssetSlickIndex})},100)}),U()}),e.loading=!1},E=function(N){for(var H=0;H<scope.currentScope.network.chapters.length;H++)if(scope.currentScope.network.chapters[H].slug===N)return scope.currentScope.network.chapters[H].shortName;return null};e.addTextVariant=function(N){e.textSlick=e.textCarousel.slick("unslick"),d(function(){e.revision.texts.push({heading:"",text:""}),d(function(){e.textSlick=e.textCarousel.slick({dots:!0}),e.textSlick.slick("slickGoTo",e.revision.texts.length-1)})}),N&&b.invoke("addVariant",{groupName:y})},e.delTextVariant=function(N,H){var ee=H||e.textSlick.slick("slickCurrentSlide");e.textSlick.slick("unslick"),e.revision.texts.splice(ee,1),e.revision.texts.push({}),d(function(){e.revision.texts.splice(e.revision.texts.length-1,1),d(function(){e.textSlick=e.textCarousel.slick({dots:!0}),ee>0&&(e.textSlick.slick("slickGoTo",ee-1),e.textSlickIndex=ee-1)},100)}),N&&b.invoke("deleteVariant",{groupName:y,indexPosition:ee})},e.mobileEditorFocused=!1,e.focusMobileEditor=function(){e.mobileEditorFocused=!0},e.blurMobileEditor=function(){e.mobileEditorFocused=!1},e.coverAssetCarousel=null,e.coverAssetSlick=null,e.delCoverAssetVariant=function(){if(e.revision.coverAssetImages.length>1){var N=e.coverAssetSlick.slick("slickCurrentSlide");e.coverAssetSlick.slick("slickRemove",N-1),e.revision.coverAssetImages.splice(N,1),e.coverAssetSlick.slick("unslick"),e.revision.coverAssetImages.push({}),d(function(){e.revision.coverAssetImages.splice(e.revision.coverAssetImages.length-1,1),d(function(){e.coverAssetSlick=e.coverAssetCarousel.slick({dots:!0}),N>0&&(e.coverAssetSlick.slick("slickGoTo",N-1),e.coverAssetSlickIndex=N-1)})})}},e.pickCoverAsset=function(N){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 2},single:function(){return!0},hideInComments:function(){return!0},resultCallback:function(){return function(H){e.coverAssetSlick.slick("unslick"),N&&e.revision.coverAssetImages.length?e.revision.coverAssetImages[0]=H.assetImage:e.revision.coverAssetImages.push(H.assetImage),d(function(){e.coverAssetSlick=e.coverAssetCarousel.slick({dots:!0}),e.coverAssetSlick.slick("slickGoTo",e.revision.coverAssetImages.length-1)})}},article:function(){return e.article}}})};var V=function(N,H){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 0},single:function(){return!1},hideInComments:function(){return!0},resultCallback:function(){return function(ee){if(H&&ee.length>0){p.setFocus();var G=[];$.each(ee,function(Y,W){var te=null;W.assetImage&&(te=W.assetImage.type),W.assetText&&(te=W.assetText.type),W.assetArticle&&(te=W.assetArticle.type),W.assetStaticArticle&&(te=W.assetStaticArticle.type),W.assetFile&&(te=W.assetFile.type),G.push({guid:W.guid,type:te})}),H(G)}}},article:function(){return e.article}}})};e.artikelUrlonChange=function(){e.changed=!0},e.save=function(){e.rubricMultiSelectModel=e.dxTagBoxInstance.option("selectedItems");for(var N=angular.copy(e.article),H=e.revision.coverAssetImages.map(function(G){return G.id}),ee=0;ee<H.length;ee++)if(H.lastIndexOf(H[ee])>ee)return void i.open({templateUrl:"/ClientApp/src/legacy-app/article/noDuplicateCoverAssetDialog.html"});N.texts=e.revision.texts,N.coverAssetImages=e.revision.coverAssetImages,N.markdown=e.revision.markdown,N.summary=e.revision.summary,N.chapterSlugs=e.rubricMultiSelectModel.map(function(G){return G.slug}),N.googleNewsCheck=n.checkGoogleNewsRecommendation(p.getHtmlDocument()),N.jsonDocument=p.getDocument(),N.HtmlDocument=p.getHtmlDocument(),N.articleExternalLinkUrl=e.articleData.articleExternalLinkUrl,a.updateArticle(N).then(function(G){e.changed=!1,e.textSlick=e.textCarousel.slick("unslick"),e.coverAssetSlick=e.coverAssetCarousel.slick("unslick"),F(G)},function(){i.open({templateUrl:"/ClientApp/src/legacy-app/article/unableToSaveDialog.html"})})},e.submit=function(){e.editForm.$submitted=!0};var q=function(N){e.editForm.$submitted=!0,e.isPublishWorking=!0,o.scope.currentScope.chapter.settings.enablePublishWorkflowForJournalists&&e.isJournalistOnly?a.publishArticleRequest(N).then(function(H){e.changed=!1,e.isPublishWorking=!1,e.textSlick=e.textCarousel.slick("unslick"),e.coverAssetSlick=e.coverAssetCarousel.slick("unslick"),F(H)},function(){}):a.publishArticle(N).then(function(H){e.changed=!1,e.isPublishWorking=!1,e.textSlick=e.textCarousel.slick("unslick"),e.coverAssetSlick=e.coverAssetCarousel.slick("unslick"),F(H)},function(){})};e.publish=function(){a.checkNotification(e.article.id).then(function(N){e.article.alreadyNotified=N,i.open({templateUrl:"/ClientApp/src/legacy-app/article/articleCreatePublishDialog.html",controller:"ArticleCreatePublishDialog",size:"lg",resolve:{resultCallback:function(){return q},article:function(){return e.article},markdown:function(){return e.revision.markdown},heading:function(){return e.revision.texts[0].text},htmlDocument:function(){return e.revision.htmlDocument}}})})},e.cancelScheduledPublish=function(){var N=new Date(e.article.scheduledPublish);e.article.scheduledPublishAsString=N.toLocaleString(),i.open({scope:e,templateUrl:"/ClientApp/src/legacy-app/article/articleCancelScheduledPublish.html",controler:"articleCancelScheduledPublish",resolve:{article:function(){return e.article}},size:"lg"}).result.then(function(){a.deleteScheduledPublish(e.article.id).then(function(){e.article.scheduledPublish=null,e.article.scheduledArchive=null})})},e.preview=!1,e.togglePreview=function(){if(e.preview=!e.preview,e.preview){var N=angular.copy(e.article);N.content=p.getHtmlDocument(),N.assetReferences=N.assetReferences,N.text=e.revision.texts[0].text,N.heading=e.revision.texts[0].heading,N.summary=e.revision.summary,e.revision.coverAssetImages.length&&(N.coverAssetReference=N.assetReferences.filter(function(H){return H.assetImage&&H.assetImage.id===e.revision.coverAssetImages[0].id})[0]),d(function(){e.$broadcast("articleUpdate",N)},500)}};var P=function(N){var H=L(N);return angular.toJson(H.texts)+angular.toJson(H.coverAssetImages)+H.summary+H.jsonDocument+angular.toJson(e.rubricMultiSelectModel)},L=function(N){if(e.revision)return e.revision;var H=N.revisions.filter(function(G){return G.chapterSlug===scope.currentChapter.slug});if(H.length)return H[0];if(N.chapterSlug!==scope.currentChapter.managingParent.slug){i.open({templateUrl:"/ClientApp/src/legacy-app/article/articleEditForeignDisclaimerDialog.html",size:"lg"}).result.then(function(){},function(){c.path("/")});var ee=N.revisions.filter(function(G){return G.chapterSlug===N.chapterSlug});if(ee.length)return ee[0]}},K=function(N,H){i.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createEditorCommentDialog.html",controller:"CreateEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{editorCommentCallback:function(){return H},messageHolder:function(){return new MessageHolder(e.article)},sourceService:function(){return x}}})};u.setFavicon(!0);var J=function(N){i.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createLinkDialog.html",controller:"CreateLinkDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return N}}})},j=function(N,H){i.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createCallToActionDialog.html",controller:"CreateCallToActionDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return H}}})},Z=function(N,H){i.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/addMetaInfoDialog.html",controller:"AddMetaInfoDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return H}}})},B=function(N,H,ee){i.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/listEditorCommentDialog.html",controller:"ListEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{onDeletedCallback:function(){return ee},onAddedCallback:function(){return H},messageHolder:function(){return new MessageHolder(e.article)},chainComments:function(){return N},sourceService:function(){return x}}})},Q=function(N){return v.getAsset(N,e.article.assetReferences)},z=function(N){d(function(){L(e.article).jsonDocument=N,e.numberOfWords=A.countWords(p.getHtmlDocument())})};$(".articleEdit-wrapper").scroll(function(){!function N(){$(".proseMirror-wrapper").offset().top<50?$(".proseMirror-wrapper").addClass("sticky"):$(".proseMirror-wrapper").removeClass("sticky")}()}),a.getArticleEdit(R).then(function(N){F(N),p.init({docID:"article_"+N.id+"_"+scope.currentChapter.slug,assetDlgFactory:V,commentCreationDlgFactory:K,commentMgmtDlgFactory:B,initialDocument:L(N).jsonDocument,initialAssetReferences:N.assetReferences,createLinkFactory:J,callToActionDlgFactory:j,metadataCreationDlgFactory:Z,assetResolver:Q,onNewStateFactory:z,onLoadTransactionCallback:z,languageCode:o.scope.currentScope.network.settings.languageCode}),e.$watch(function(){return P(e.article)},function(N){e.changed=S!==N,e.wordCount=e.revision.markdown?e.revision.markdown.replace(/[^\w-_ ]/g," ").trim().split(/\s+/).length:0})},function(){c.path("/")})}]),app.controller("ArticleElasticReportController",["$scope","$rootScope","article","chapterReport","articleService","formatterService","scopeService","$timeout",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";e.dateFormatString=g.getShortDateFormatString(),e.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage;var c=[],d=[],i=[{name:t.scope.currentScope.network.getResourceOrKeyName("web_report_unknownReferrer"),color:"#cccccc",regEx:["^$"]},{name:t.scope.currentScope.network.domain.charAt(0).toUpperCase()+t.scope.currentScope.network.domain.slice(1),color:s,regEx:["^https?:\\/\\/"+t.scope.currentScope.network.domain]},{name:"Facebook",color:"#3B5998",regEx:["^https?:\\/\\/(\\w*\\.)?facebook\\.com","^android-app:\\/\\/m.facebook."]},{name:"Google",color:"#F44336",regEx:["^https?:\\/\\/((www\\.)|(images\\.))?google\\.","^android-app:\\/\\/com\\.google\\.android\\.googlequicksearchbox"]},{name:"Twitter",color:"#4099FF",regEx:["^https?:\\/\\/t\\.co\\/","^https?:\\/\\/twitter\\.com\\/"]},{name:"Webmail",color:"#ff66ff",regEx:["^https?:\\/\\/.*\\.mail\\.live\\.com","^https?:\\/\\/mail\\.google\\.com","^https?:\\/\\/3c\\.gmx\\.net","^https?:\\/\\/3c\\.web\\.de","^https?:\\/\\/email\\.t-online\\.de","^https?:\\/\\/3c-bap\\.web\\.de","^https?:\\/\\/email\\.1und1\\.de","^https?:\\/\\/www\\.arcor\\.de\\/home\\/link\\.php"]},{name:"WhatsApp",color:"#43d854",regEx:["^https?:\\/\\/web.whatsapp.com"]},{name:t.scope.currentScope.network.getResourceOrKeyName("web_report_articleSuggestionReferrer"),color:"#F44336",regEx:["^https?:\\/\\/www\\.googleapis\\.com\\/auth\\/chrome-content-suggestions","^https?:\\/\\/play\\.google\\.(com|de){1}\\/newsstand"]},{name:"Google News",color:"#F44336",regEx:["^https?:\\/\\/((www\\.news\\.)|(news\\.))?(url\\.)?google\\."]},{name:"Instagram",color:"#cd486b",regEx:["^https?:\\/\\/(\\w*\\.)?instagram\\."]}],o=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}];e.chapterReport=n,e.article=a,r(function(){var h,p,v,C,A;$.each(n,function(D,S){S.active=!0,S.variants.length&&$.each(S.variants,function(U,I){I.viewableImpressions>0&&(n.hasVariants=!0,I.hasViews=!0)})}),n.length>1&&(n.multiChapterShipment=!0);for(var x=[],b=[],R=[],y=new Date(a.published);y<=moment(new Date).startOf("day").add(1,"d").toDate();y.setDate(y.getDate()+1)){var l={start:new Date(y),viewableImpressions:0,readings:0};x.push(l),R[l.start.toDateString()]=l,b.push(l)}var M={impressions:0,readings:0,uniqueImpressions:0,uniqueReadings:0,uniqueReadingPercentageReads:0,uniqueViewableImpressions:0,activeTimeSeconds:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0};e.summary=M;var T=function(D){var S=!1;if(D?(M.start=moment(a.published).startOf("day").toDate(),M.end=moment(new Date).startOf("day").toDate()):n.hasVariants=!1,$.each(b,function(I,m){m.readings=0,m.viewableImpressions=0}),c.length=0,d=[],M.impressions=0,M.readings=0,M.uniqueImpressions=0,M.uniqueReadings=0,M.uniqueReadingPercentageReads=0,M.uniqueViewableImpressions=0,M.activeTimeSeconds=0,M.uniqueReadingsHavingViewableImpressions=0,M.uniqueReadingPercentage24Reads=0,M.uniqueReadingPercentage2549Reads=0,M.uniqueReadingPercentage5074Reads=0,M.uniqueReadingPercentage75100Reads=0,o[0].value=0,o[1].value=0,o[2].value=0,$.each(n,function(I,m){if(m.active){m.report.referrers.length&&$.each(m.report.referrers,function(E,V){S=!1,$.each(i,function(q,O){$.each(O.regEx,function(_,P){V.referrer.match(P)&&(d[O.name]?(d[O.name].readings+=V.readings,S=!0):(d[O.name]={readings:V.readings,referrer:O.name,color:O.color},c.push(d[O.name]),S=!0))})}),S||(d.others?d.others.readings+=V.readings:d.others={readings:V.readings,referrer:"Andere"})}),m.report.impressionCalendar.length&&$.each(m.report.impressionCalendar,function(E,V){R[new Date(V.day).toDateString()].viewableImpressions+=V.data}),m.report.readingCalendar.length&&$.each(m.report.readingCalendar,function(E,V){R[new Date(V.day).toDateString()].readings+=V.data}),m.variants.length&&$.each(m.variants,function(E,V){V.viewableImpressions>0&&(n.hasVariants=!0,V.hasViews=!0)}),M.impressions+=m.report.impressions,M.readings+=m.report.readings,M.uniqueReadings+=m.report.uniqueReadings,M.uniqueReadingsHavingViewableImpressions+=m.report.uniqueReadingsHavingViewableImpressions,M.uniqueImpressions+=m.report.uniqueImpressions,M.uniqueReadingPercentageReads+=m.report.uniqueReadingPercentageReads,M.activeTimeSeconds+=m.report.activeTimeSeconds,M.uniqueReadingPercentage24Reads+=m.report.uniqueReadingPercentage24Reads,M.uniqueReadingPercentage2549Reads+=m.report.uniqueReadingPercentage2549Reads,M.uniqueReadingPercentage5074Reads+=m.report.uniqueReadingPercentage5074Reads,M.uniqueReadingPercentage75100Reads+=m.report.uniqueReadingPercentage75100Reads;var F=m.report.desktopReadingCalendar+m.report.mobileReadingCalendar+m.report.tabletReadingCalendar;o[0].value+=Math.round(100/(F/m.report.desktopReadingCalendar)),o[1].value+=Math.round(100/(F/m.report.mobileReadingCalendar)),o[2].value+=Math.round(100/(F/m.report.tabletReadingCalendar))}}),n.length>1){var U=n.filter(function(I){return I.active}).length;o[0].value=Math.round(o[0].value/U),o[1].value=Math.round(o[1].value/U),o[2].value=Math.round(o[2].value/U)}d.others&&c.push(d.others),D&&(x.length=0,$.each(b,function(I,m){x.push({start:m.start,viewableImpressions:m.viewableImpressions})})),h.validateData(),p.validateData(),v.validateData(),C.validateData(),A.validateData()};h=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",marginRight:80,autoMarginOffset:20,marginTop:7,path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"}],dataProvider:x,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"viewableImpressions",valueField:"viewableImpressions"}]}],chartScrollbarSettings:{position:"top",graph:"viewableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),p=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:"Gesamt",color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"readings",toField:"readings"}],dataProvider:b,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:t.scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:t.scope.currentScope.network.getResourceOrKeyName("web_reportArticle_articleCallsHeading"),percentHeight:30,stockGraphs:[{valueField:"readings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:t.scope.currentScope.network.getResourceOrKeyName("web_report_views")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),(v=AmCharts.makeChart("chartReferrers",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"readings",titleField:"referrer",colorField:"color",labelsEnabled:!1,autoMargins:!1,pullOutRadius:0,innerRadius:"30%",legend:{switchable:!1,textClickEnabled:!0,markerType:"circle",position:"bottom",autoMargins:!1,marginLeft:2},balloonText:"[[referrer]]: [[value]]"})).legend.addListener("clickLabel",function(D){D.dataItem.dataContext.referrer.startsWith("http")&&window.prompt(t.scope.currentScope.network.getResourceOrKeyName("web_report_copyReferrerLink"),D.dataItem.dataContext.referrer)}),C=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:o,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:s,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),A=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[M],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:s,fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:s,fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:s,fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:s,fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}});var k=function(D,S,U){$.each(n,function(I,m){u.getChapterReport(m.chapter.id,a,S,U).then(function(F){m.report=F,T(D)}),h.validateData(),p.validateData(),v.validateData(),C.validateData(),A.validateData()})};h.addListener("zoomed",function(){M.start=moment(h.startDate).startOf("day").toDate(),M.end=moment(h.endDate).startOf("day").toDate(),p.zoom(M.start,moment(M.end).startOf("day").add(1,"d").toDate()),k(!1,moment(M.start).startOf("day").add(1,"d").toDate(),moment(M.end).startOf("day").add(2,"d").toDate())}),e.toggleChapter=function(D){$.each(n,function(S,U){null!==U.chapter&&U.chapter.name===D&&(U.active=!U.active)}),T(!1)},k(!0,a.published,moment(new Date).startOf("day").add(2,"d").toDate())})}]),app.component("articleListDisplayablesList",{templateUrl:"/ClientApp/src/legacy-app/article/articleListDisplayablesList.html",bindings:{data:"<",mobile:"<"},controller:["$rootScope","shipmentService",function(e,t){var a=this;a.hideSnips=!1,a.hideSnips=scope.currentChapter.settings.configurations.hideSnipsInArticleFeed||!e.showSnipSlide,t.getShipmentSuper().then(function(u){a.superShipment=u}),a.$onChanges=function(u){u.data&&function n(){var u=[];a.counterOverdue=0,a.data.forEach(function(g,f){var r=0===f?null:a.data[f-1];(!r||4===r.articleListDisplayableType&&4!==g.articleListDisplayableType)&&(u.push({displayables:[],snips:[]}),a.counterOverdue=0),a.counterOverdue>3&&4!==g.articleListDisplayableType&&(u.push({displayables:[],snips:[]}),a.counterOverdue=0),a.counterOverdue++;var s=u[u.length-1];4===g.articleListDisplayableType?(a.counterOverdue=0,s.snips.push(g)):s.displayables.push(g)}),a.groups=u}()}}]}),app.component("articleListDisplayablesListMore",{templateUrl:"/ClientApp/src/legacy-app/article/articleListDisplayablesListMore.html",bindings:{data:"<",mobile:"<"},controller:["$scope","scopeService",function(e,t){var a=this;a.groups=[],a.hideSnips=!1,this.$onInit=function(){a.hideSnips=scope.currentChapter.settings.configurations.hideSnipsInArticleFeed,a.data.forEach(function(n,u){var g=0===u?null:a.data[u-1];(!g||4===g.articleListDisplayableType&&4!==n.articleListDisplayableType)&&a.groups.push({displayables:[],snips:[]});var f=a.groups[a.groups.length-1];4===n.articleListDisplayableType?f.snips.push(n):f.displayables.push(n)})}}]}),app.factory("articleQuestionService",["$http","$q",function(e,t){return{getArticleQuestions:function(r){var s=t.defer();return e.get(scope.apiEndpoint+"articleQuestions/"+r).then(function(c){s.resolve(c.data)},function(){s.reject()}),s.promise},getTranslatedArticleQuestions:function(r,s){var c=t.defer();return e.get(scope.apiEndpoint+"articleQuestions/"+r+"/translate?targetLanguage="+s).then(function(d){c.resolve(d.data)},function(){c.reject()}),c.promise},postArticleQuestionAnswer:function(r,s){var c=t.defer(),d=s?'"'+s.replace(/\\/gm,"\\\\").replace(/"/gm,'\\"')+'"':null;return e.post(scope.apiEndpoint+"articleQuestions/articleQuestionItems/"+r,d).then(function(i){c.resolve(i.data)},function(){c.reject()}),c.promise},getAnswerId:function(r){var s=t.defer();return e.get(scope.apiEndpoint+"articleQuestions/answers/"+r).then(function(c){s.resolve(c.data)},function(){s.reject()}),s.promise},deleteArticleQuestionAnswersByUser:function(r){var s=t.defer();return e.delete(scope.apiEndpoint+"articleQuestions/"+r).then(function(c){s.resolve(c.data)},function(){s.reject()}),s.promise}}}]),app.controller("ArticleReportController",["$scope","$rootScope","article","chapterReport","articleService","scopeService","$timeout",function(e,t,a,n,u,g,f){AmCharts.isReady=!0,e.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage;var r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{title:t.scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:r,value:0},{title:t.scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],c=[],d=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],i=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}];e.chapterReport=n,e.article=a,f(function(){n.forEach(function(D){D.report.calendar.forEach(function(S){S.start=moment(S.start.replace("Z","")).toDate(),S.end=moment(S.end.replace("Z","")).toDate()})});var o,h,p,v,C,A,x,b=new Set;$.each(n,function(D,S){S.active=!0,2===S.chapter.managementState&&b.add(S.chapter.name)}),n.uniqueChapters=[],b.forEach(function(D){n.uniqueChapters.push(D)}),b.size>1&&(n.multiChapterShipment=!0);var R=[],y=function(){R.length=0,n.hasVariants=!1,$.each(n[0].report.calendar,function(D,S){R.push({start:S.start,end:S.end,viewableImpressions:0,uniqueViewableImpressions:0,billableViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueReadings:0,femaleUniqueReadings:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueReadings:0,age1824MaleUniqueReadings:0,age2534MaleUniqueReadings:0,age3544MaleUniqueReadings:0,age4554MaleUniqueReadings:0,age55MaleUniqueReadings:0,age1617FemaleUniqueReadings:0,age1824FemaleUniqueReadings:0,age2534FemaleUniqueReadings:0,age3544FemaleUniqueReadings:0,age4554FemaleUniqueReadings:0,age55FemaleUniqueReadings:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0,referrers:[]})}),$.each(n,function(D,S){if(S.active){S.report.variants.length&&$.each(S.report.variants,function(I,m){m.viewableImpressions>0&&(n.hasVariants=!0,m.hasViews=!0)});var U=a.id;$.each(S.report.calendar,function(I,m){m.id=U,R[I].viewableImpressions+=m.viewableImpressions,R[I].uniqueViewableImpressions+=m.uniqueViewableImpressions,R[I].billableViewableImpressions+=m.billableViewableImpressions,R[I].activeTimeSeconds+=m.activeTimeSeconds,R[I].readings+=m.readings,R[I].uniqueReadings+=m.uniqueReadings,R[I].uniqueReadingsHavingViewableImpressions+=m.uniqueReadingsHavingViewableImpressions,R[I].uniqueReadingPercentageReads+=m.uniqueReadingPercentageReads,R[I].maleUniqueReadings+=m.maleUniqueReadings,R[I].femaleUniqueReadings+=m.femaleUniqueReadings,R[I].desktopReadings+=m.desktopReadings,R[I].mobileReadings+=m.mobileReadings,R[I].tabletReadings+=m.tabletReadings,R[I].age1617MaleUniqueReadings+=m.age1617MaleUniqueReadings,R[I].age1824MaleUniqueReadings+=m.age1824MaleUniqueReadings,R[I].age2534MaleUniqueReadings+=m.age2534MaleUniqueReadings,R[I].age3544MaleUniqueReadings+=m.age3544MaleUniqueReadings,R[I].age4554MaleUniqueReadings+=m.age4554MaleUniqueReadings,R[I].age55MaleUniqueReadings+=m.age55MaleUniqueReadings,R[I].age1617FemaleUniqueReadings+=m.age1617FemaleUniqueReadings,R[I].age1824FemaleUniqueReadings+=m.age1824FemaleUniqueReadings,R[I].age2534FemaleUniqueReadings+=m.age2534FemaleUniqueReadings,R[I].age3544FemaleUniqueReadings+=m.age3544FemaleUniqueReadings,R[I].age4554FemaleUniqueReadings+=m.age4554FemaleUniqueReadings,R[I].age55FemaleUniqueReadings+=m.age55FemaleUniqueReadings,R[I].uniqueReadingPercentage24Reads+=m.uniqueReadingPercentage24Reads,R[I].uniqueReadingPercentage2549Reads+=m.uniqueReadingPercentage2549Reads,R[I].uniqueReadingPercentage5074Reads+=m.uniqueReadingPercentage5074Reads,R[I].uniqueReadingPercentage75100Reads+=m.uniqueReadingPercentage75100Reads,m.referrers.length&&m.referrers.forEach(function(F){R[I].referrers.push(F)})})}}),o.validateData(),h.validateData(),p.validateData(),v.validateData(),C.validateData(),A.validateData(),x.validateData()},l=n.summary={referrers:[]},M=function(D,S){l.viewableImpressions=0,l.uniqueViewableImpressions=0,l.billableViewableImpressions=0,l.activeTimeSeconds=0,l.readings=0,l.uniqueReadings=0,l.uniqueReadingsHavingViewableImpressions=0,l.uniqueReadingPercentageReads=0,l.maleUniqueReadings=0,l.femaleUniqueReadings=0,l.desktopReadings=0,l.mobileReadings=0,l.tabletReadings=0,l.age1617MaleUniqueReadings=0,l.age1824MaleUniqueReadings=0,l.age2534MaleUniqueReadings=0,l.age3544MaleUniqueReadings=0,l.age4554MaleUniqueReadings=0,l.age55MaleUniqueReadings=0,l.age1617FemaleUniqueReadings=0,l.age1824FemaleUniqueReadings=0,l.age2534FemaleUniqueReadings=0,l.age3544FemaleUniqueReadings=0,l.age4554FemaleUniqueReadings=0,l.age55FemaleUniqueReadings=0,l.uniqueReadingPercentage24Reads=0,l.uniqueReadingPercentage2549Reads=0,l.uniqueReadingPercentage5074Reads=0,l.uniqueReadingPercentage75100Reads=0;var U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0,j=0,Z=0;l.start=D,l.end=S,l.referrers.length=0,$.each(R,function(N,H){var ee=new Date(H.start);ee<D||ee>S||(l.viewableImpressions+=H.viewableImpressions,l.uniqueViewableImpressions+=H.uniqueViewableImpressions,l.billableViewableImpressions+=H.billableViewableImpressions,l.activeTimeSeconds+=H.activeTimeSeconds,l.readings+=H.readings,l.uniqueReadingPercentageReads+=H.uniqueReadingPercentageReads,l.maleUniqueReadings+=H.maleUniqueReadings,l.femaleUniqueReadings+=H.femaleUniqueReadings,l.uniqueReadings+=H.uniqueReadings,l.uniqueReadingsHavingViewableImpressions+=H.uniqueReadingsHavingViewableImpressions,l.uniqueReadingPercentage24Reads+=H.uniqueReadingPercentage24Reads,l.uniqueReadingPercentage2549Reads+=H.uniqueReadingPercentage2549Reads,l.uniqueReadingPercentage5074Reads+=H.uniqueReadingPercentage5074Reads,l.uniqueReadingPercentage75100Reads+=H.uniqueReadingPercentage75100Reads,U+=H.desktopReadings,I+=H.mobileReadings,m+=H.tabletReadings,F+=H.age1617MaleUniqueReadings,E+=H.age1824MaleUniqueReadings,V+=H.age2534MaleUniqueReadings,q+=H.age3544MaleUniqueReadings,O+=H.age4554MaleUniqueReadings,_+=H.age55MaleUniqueReadings,P+=H.age1617FemaleUniqueReadings,L+=H.age1824FemaleUniqueReadings,K+=H.age2534FemaleUniqueReadings,J+=H.age3544FemaleUniqueReadings,j+=H.age4554FemaleUniqueReadings,Z+=H.age55FemaleUniqueReadings,H.referrers.forEach(function(G){var Y=l.referrers.filter(function(W){return W.referrer===G.referrer});Y.length?Y[0].readings+=G.readings:l.referrers.push({referrer:G.referrer,readings:G.readings,color:G.color})}))}),l.referrers.sort(function(N,H){return H.readings-N.readings}),l.referrers.forEach(function(N){N.name=N.referrer?N.referrer.substring(0,30):N.referrer}),c.length=0,[].push.apply(c,l.referrers.slice(0,8)),c.filter(function(N){return!N.color}).forEach(function(N,H){N.color=v.colors[H]});var B=l.referrers.slice(9,-1),Q={referrer:t.scope.currentScope.network.getResourceOrKeyName("web_report_others"),name:t.scope.currentScope.network.getResourceOrKeyName("web_report_others"),readings:0,color:v.colors[10]};B.forEach(function(N){Q.readings+=N.readings}),Q.readings>0&&c.push(Q);var X=U+I+m;l.desktopReadings=Math.round(100/(X/U)),l.mobileReadings=Math.round(100/(X/I)),l.tabletReadings=Math.round(100/(X/m)),l.maleUniqueReadings=Math.round(l.maleUniqueReadings),l.femaleUniqueReadings=Math.round(l.femaleUniqueReadings),s[0].value=l.femaleUniqueReadings,s[1].value=l.maleUniqueReadings;var z=F+E+V+q+O+_+P+L+K+J+j+Z;l.age1617MaleUniqueReadings=Math.round(100/(z/F)),l.age1824MaleUniqueReadings=Math.round(100/(z/E)),l.age2534MaleUniqueReadings=Math.round(100/(z/V)),l.age3544MaleUniqueReadings=Math.round(100/(z/q)),l.age4554MaleUniqueReadings=Math.round(100/(z/O)),l.age55MaleUniqueReadings=Math.round(100/(z/_)),l.age1617FemaleUniqueReadings=Math.round(100/(z/P)),l.age1824FemaleUniqueReadings=Math.round(100/(z/L)),l.age2534FemaleUniqueReadings=Math.round(100/(z/K)),l.age3544FemaleUniqueReadings=Math.round(100/(z/J)),l.age4554FemaleUniqueReadings=Math.round(100/(z/j)),l.age55FemaleUniqueReadings=Math.round(100/(z/Z)),d[0].male=Math.round(-1*l.age1617MaleUniqueReadings),d[1].male=Math.round(-1*l.age1824MaleUniqueReadings),d[2].male=Math.round(-1*l.age2534MaleUniqueReadings),d[3].male=Math.round(-1*l.age3544MaleUniqueReadings),d[4].male=Math.round(-1*l.age4554MaleUniqueReadings),d[5].male=Math.round(-1*l.age55MaleUniqueReadings),d[0].female=Math.round(l.age1617FemaleUniqueReadings),d[1].female=Math.round(l.age1824FemaleUniqueReadings),d[2].female=Math.round(l.age2534FemaleUniqueReadings),d[3].female=Math.round(l.age3544FemaleUniqueReadings),d[4].female=Math.round(l.age4554FemaleUniqueReadings),d[5].female=Math.round(l.age55FemaleUniqueReadings),i[0].value=l.desktopReadings,i[1].value=l.mobileReadings,i[2].value=l.tabletReadings,p.validateData(),C.validateData(),A.validateData(),x.validateData(),v.validateData(),e.$$phase||e.$apply()};o=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:R,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"uniqueReadings",valueField:"uniqueReadings"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+t.scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+t.scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+t.scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:t.scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"uniqueReadings",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),h=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:t.scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:R,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:t.scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:t.scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:t.scope.currentScope.network.getResourceOrKeyName("web_reportArticle_uniqueReadersAmount"),percentHeight:30,stockGraphs:[{title:t.scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders"),valueField:"uniqueReadings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:t.scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),p=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!1,marginLeft:2,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),(v=AmCharts.makeChart("chartReferrers",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"readings",titleField:"referrer",colorField:"color",labelsEnabled:!1,autoMargins:!1,pullOutRadius:0,innerRadius:"30%",legend:{switchable:!1,textClickEnabled:!0,markerType:"circle",position:"bottom",autoMargins:!1,marginLeft:2},balloonText:"[[name]]: [[value]]"})).legend.addListener("clickLabel",function(D){D.dataItem.dataContext.referrer.startsWith("http")&&window.prompt(t.scope.currentScope.network.getResourceOrKeyName("web_report_copyLink"),D.dataItem.dataContext.referrer)}),C=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,graphs:[{fillAlphas:1,title:t.scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:r,balloonText:"[[value]]%"},{fillAlphas:1,title:t.scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(D){return-1*D.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(D){return D<0?-1*D+"":D+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),A=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),x=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[l],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:r,fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:r,fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:r,fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:r,fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}});var T=function(){var D=moment(o.startDate).startOf("day").toDate(),S=moment(o.endDate).startOf("day").add(-1,"d").toDate();M(D,S),h.zoom(D,moment(S).add(1,"d").toDate())};o.addListener("zoomed",function(){T()}),e.toggleChapter=function(D){$.each(n,function(S,U){null!==U.chapter&&U.chapter.name===D&&(U.active=!U.active)}),y(),T()},T(),y();var w=!1;setInterval(function(){"visible"!==document.visibilityState||0===R.length||w||(w=!0,u.getLatestReport(a.id).then(function(D){if(D){D[0].start=moment(D[0].start.replace("Z","")).toDate(),D[0].end=moment(D[0].end.replace("Z","")).toDate();var S={start:D[0].start,end:D[0].end,viewableImpressions:0,uniqueViewableImpressions:0,billableViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueReadings:0,femaleUniqueReadings:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueReadings:0,age1824MaleUniqueReadings:0,age2534MaleUniqueReadings:0,age3544MaleUniqueReadings:0,age4554MaleUniqueReadings:0,age55MaleUniqueReadings:0,age1617FemaleUniqueReadings:0,age1824FemaleUniqueReadings:0,age2534FemaleUniqueReadings:0,age3544FemaleUniqueReadings:0,age4554FemaleUniqueReadings:0,age55FemaleUniqueReadings:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0,referrers:[]};$.each(D,function(m,F){n[m].active&&(S.viewableImpressions+=F.viewableImpressions,S.uniqueViewableImpressions+=F.uniqueViewableImpressions,S.billableViewableImpressions+=F.billableViewableImpressions,S.activeTimeSeconds+=F.activeTimeSeconds,S.readings+=F.readings,S.uniqueReadings+=F.uniqueReadings,S.uniqueReadingsHavingViewableImpressions+=F.uniqueReadingsHavingViewableImpressions,S.uniqueReadingPercentageReads+=F.uniqueReadingPercentageReads,S.maleUniqueReadings+=F.maleUniqueReadings,S.femaleUniqueReadings+=F.femaleUniqueReadings,S.desktopReadings+=F.desktopReadings,S.mobileReadings+=F.mobileReadings,S.tabletReadings+=F.tabletReadings,S.age1617MaleUniqueReadings+=F.age1617MaleUniqueReadings,S.age1824MaleUniqueReadings+=F.age1824MaleUniqueReadings,S.age2534MaleUniqueReadings+=F.age2534MaleUniqueReadings,S.age3544MaleUniqueReadings+=F.age3544MaleUniqueReadings,S.age4554MaleUniqueReadings+=F.age4554MaleUniqueReadings,S.age55MaleUniqueReadings+=F.age55MaleUniqueReadings,S.age1617FemaleUniqueReadings+=F.age1617FemaleUniqueReadings,S.age1824FemaleUniqueReadings+=F.age1824FemaleUniqueReadings,S.age2534FemaleUniqueReadings+=F.age2534FemaleUniqueReadings,S.age3544FemaleUniqueReadings+=F.age3544FemaleUniqueReadings,S.age4554FemaleUniqueReadings+=F.age4554FemaleUniqueReadings,S.age55FemaleUniqueReadings+=F.age55FemaleUniqueReadings,S.uniqueReadingPercentage24Reads+=F.uniqueReadingPercentage24Reads,S.uniqueReadingPercentage2549Reads+=F.uniqueReadingPercentage2549Reads,S.uniqueReadingPercentage5074Reads+=F.uniqueReadingPercentage5074Reads,S.uniqueReadingPercentage75100Reads+=F.uniqueReadingPercentage75100Reads,F.referrers.length&&F.referrers.forEach(function(E){S.referrers.push(E)}))}),R[R.length-1].start-D[0].start==0?R[R.length-1]=S:R.push(S),o.validateData(),h.validateData();var U=moment(o.startDate).startOf("day").toDate(),I=moment(o.endDate).startOf("day").add(-1,"d").toDate();U<=D[0].start&&I>=D[0].start&&M(U,I),w=!1}}))},1e4)},function(){$location.path("/")})}]),app.component("imageInfo",{templateUrl:"/ClientApp/src/legacy-app/article/imageInfo.html",bindings:{assetImage:"<",text:"<",source:"<",showByDefault:"<"},controller:["$element","$timeout","$rootScope",function(e,t,a){var n=this;this.$onInit=function(){n.showByDefault=!1,this.assetImage&&((7===this.assetImage.imageSourceType||this.assetImage.imageProperties&&7===this.assetImage.imageProperties.imageSourceType||this.assetImage.alwaysShowImageDescription)&&(this.showByDefault=!0),n.text=this.assetImage.text,n.source=this.assetImage.source),n.showinfo=function(){e.find(".imageInfo-view")[0]&&e.find(".imageInfo-contentView")[0]&&$(e.find(".imageInfo-view")[0]).css("height",e.find(".imageInfo-contentView")[0].offsetHeight),t(function(){$(e.find(".imageInfo").toggleClass("imageInfo-collapsed"))})}}}]}),app.controller("AddAssetArticleDialogController",["$rootScope","$scope","articleService","assetArticleService","ownerId","onAddSuccessful","ownerType",function(e,t,a,n,u,g,f){var r=this;t.url=null,t.assetArticle=null,t.errorMessage=null,t.articleRegex=new RegExp("^https?://"+escape(e.scope.currentScope.network.domain)+"/(.*)_(.*)"),r.searchArticles=function(s){if(!t.searchArticleForm.$invalid){var d=t.articleRegex.exec(s)[2].split("/")[0];t.assetArticle=null,a.getArticleDetails(d).then(function(i){t.assetArticle={coverAssetImageUrl:i.coverAssetReference.assetImage.assetImageUrl,coverAssetImageCache:i.coverAssetReference.assetImage.cache,path:i.path,chapterSlugs:i.chapterSlugs,heading:i.heading,text:i.text,attachedArticleId:i.id}})}},r.close=function(){t.$dismiss()},r.reset=function(){t.assetArticle=null,t.url=null,t.searchArticleForm.$setPristine()},r.addAssetArticle=function(){n.addAssetArticle(u,t.assetArticle.attachedArticleId,f).then(function(s){g(s),t.$dismiss()})}}]),app.controller("AddAssetStaticArticleDialogController",["$rootScope","$scope","staticArticleService","ownerId","onAddSuccessful","ownerType",function(e,t,a,n,u,g){var f=this;t.url=null,t.assetStaticArticle=null,t.errorMessage=null,t.articleRegex=new RegExp("^https?://"+escape(e.scope.currentScope.network.domain)+"/(.*)_(.*)"),f.listOfArticles=[],f.updating=!0,e.scope.staticArticles.forEach(r=>{(r.networkId||r.chapterId==e.scope.currentChapter.id)&&f.listOfArticles.push({id:r.id,title:r.title})}),f.listOfArticles.sort((r,s)=>r.title.localeCompare(s.title)),f.close=function(){t.$dismiss()},f.reset=function(){t.assetStaticArticle=null,t.url=null,t.searchArticleForm.$setPristine()},f.updateSelectedArticle=function(){f.updating=!0;var r=f.selectedStaticArticle.id;-1!=r?(t.assetStaticArticle=null,a.getStaticArticle(r).then(function(s){t.assetStaticArticle={coverAssetImageUrl:s.coverAssetReference?.assetImage.assetImageUrl,coverAssetImageCache:s.coverAssetReference?.assetImage.cache,path:s.path,chapterSlugs:s.chapterSlugs,heading:s.heading,text:s.title,attachedArticleId:s.id},f.updating=!1})):(t.assetStaticArticle=null,f.updating=!0)},f.addAssetArticle=function(){n?a.addAssetStaticArticle(n,t.assetStaticArticle.attachedArticleId,g).then(function(r){u(r),t.$dismiss()}):t.$dismiss()},f.selectBoxOptions={dataSource:f.listOfArticles,valueExpr:"id",name:"staticArticlesSelect",displayExpr:"title",inputAttr:{"aria-label":"Article"},searchEnabled:!0,placeholder:e.scope.network.getResourceOrKeyName("web_asset_addStatiArticleDialog_select_placeholder"),onValueChanged(r){if(null!==r.value){const s=r.component.option("selectedItem");f.selectedStaticArticle=s,f.updateSelectedArticle()}else f.selectedStaticArticle=null}}}]),app.component("assetArticleItem",{templateUrl:"/ClientApp/src/legacy-app/asset/assetArticleItem.html",bindings:{assetArticle:"<"},controller:["$rootScope",function(e){this.enableHighQualityImage=e.scope.network.settings.configurations.enableHighQualityImage}]}),app.component("assetStaticArticleItem",{templateUrl:"/ClientApp/src/legacy-app/asset/assetStaticArticleItem.html",bindings:{assetStaticArticle:"<"},controller:["$rootScope",function(e){this.enableHighQualityImage=e.scope.network.settings.configurations.enableHighQualityImage}]}),app.service("assetArticleService",["$http","$q","$rootScope",function(e,t,a){var u=a.scope.apiEndpoint+"assetArticles";return this.addAssetArticle=function(g,f,r){var s=t.defer();return e.post(u,{ownerId:g,articleId:f,assetArticleType:r}).then(function(d){s.resolve(d.data)},function(){s.reject()}),s.promise},this}]),app.controller("AssetChildListDialog",["$rootScope","$scope","$q","$interval","$timeout","archived","parentAssetReference","assetService","reportAsset","deleteAsset",function(e,t,a,n,u,g,f,r,s,c){t.working=!1,t.error=!1,t.parentAssetReference=f,t.showVerifiedUser=t.parentAssetReference.user.isVerifiedUser,t.enableVerifiedUsers=e.scope.currentChapter.settings.configurations.enableVerifiedUsers,t.archived=g;var d={type:0,text:"",attachment:"",source:"",parentGuid:f.guid};t.assetText={},t.assetReferences=[],angular.copy(d,t.assetText);var i,o=function(){var v=t.parentAssetReference;t.parentAssetReference.childAssets&&t.parentAssetReference.childAssets.length&&(v=t.parentAssetReference.childAssets.sort(function(x,b){return new Date(x.created)>new Date(b.created)?-1:1})[0]);var A=a.defer();i=A.promise,r.getChildren(f.guid,v.created).then(function(x){return f.childAssets||(f.childAssets=[]),Array.prototype.push.apply(f.childAssets,x),!0},function(){return!0}).then(function(){A.resolve(),i=null})};i&&i();var p=n(function(){o()},1e4);t.$on("$destroy",function(){o(),n.cancel(p)}),t.focusInput=function(){/(android)/i.test(navigator.userAgent)&&setTimeout(function(){var v=$(".modal");v.scrollTop(v.height()+v.offset().top)},500)},t.post=function(){t.assetText.text.length<e.scope.currentScope.chapter.settings.assetTextMinLength||t.assetText.text.length>e.scope.currentScope.chapter.settings.assetTextMaxLength||(t.working=!0,r.insertChild(f.guid,t.assetText).then(function(v){angular.copy(d,t.assetText),u(function(){var C=document.createEvent("Event");C.initEvent("autosize.update",!0,!1),$(".assetChildListDialog").find("textarea")[0].dispatchEvent(C)}),o(),t.working=!1}))},t.deleteAsset=c,t.reportAsset=s,t.isAssetTextValid=function(){return e.scope.currentScope.chapter.settings.assetTextMinLength<=t.assetText.text.length},t.isAddDisable=function(){return!t.isAssetTextValid()||t.working}}]),app.component("asset",{templateUrl:"/ClientApp/src/legacy-app/asset/asset.html",bindings:{assetReference:"<",snip:"<",article:"<",sponsoredArticle:"<",staticArticle:"<",imageGalleryItemIndex:"<"},controller:["$uibModal","$rootScope","clickService","$element","$state","authService","apicodoMediaService",function(e,t,a,n,u,g,f){var r=this;r.profile=t.profile,this.assetImageFocuspointDialog=function(i){e.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){return i}}})},r.clickAssetReference=function(){r.assetReference.oculus.click(),a.clickAssetReference(r.assetReference.oculus.guid,r.assetReference.id)},this.$onInit=function(){if(r.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage,r.assetReference){var i=t.scope.currentScope.network;r.article&&(r.assetReference.oculus=Oculus.trackAssetReferenceImpression(n.find(".asset"),{ia:r.article.id,iar:r.article.revisionId,iav:r.article.variantId,c:r.article.chapterSlug,n:i.slug,ari:r.assetReference.id}),r.assetReference.oculus.persistent=u.includes("app.main")),r.sponsoredArticle&&(r.assetReference.oculus=Oculus.trackAssetReferenceImpression(n.find(".asset"),{isa:r.sponsoredArticle.id,isar:r.sponsoredArticle.revisionId,isav:r.sponsoredArticle.variantId,c:r.sponsoredArticle.chapterSlug,n:i.slug,ari:r.assetReference.id}),r.assetReference.oculus.persistent=u.includes("app.main")),r.showCookieExternalMediaInfo=!!t.scope.globalSettings.configurations.global_module_configuration.ConsentManagementModuleEnabled&&function s(){var i=0;switch(t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&(i=t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager),i){case 1:return function d(){const{twitter:i,youTube:o,facebook:h,vimeo:p,giphy:v}=t.scope.profile.settings.externalMediaPermissions;switch(r.assetReference?.assetText?.type){case 4:return!i?.granted;case 5:return!o?.granted;case 6:return!h?.granted;case 7:return!p?.granted;case 10:return!v?.granted;default:return!1}}();case 4:return function c(){const h=!r.profile.hasCookiesConsented&&!r.profile.isRegistered,v=[5,6,7,10].some(C=>r.assetReference.assetText?.type===C);return h&&v}();default:return!1}}()}}}]}),app.controller("AssetCreateCommonDialog",["$interpolate","$rootScope","$scope","assetType","createAssetAsync","resultCallback",function(e,t,a,n,u,g){a.working=!1,a.error=!1,a.web_assetDialog_description=e(t.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_description"))({networkName:t.scope.currentScope.network.name}),a.asset={type:n,text:"",attachment:"",imageSource:"",uploadGuid:"",uploadError:"",source:""},a.createAsset=function(){a.working||!a.asset.text||a.asset.text.length<t.scope.currentScope.chapter.settings.assetTextMinLength||a.asset.text.length>t.scope.currentScope.chapter.settings.assetTextMaxLength||(a.working=!0,u(a.asset).then(function(f){g&&(f.assetText.user=f.user,g(f)),a.$dismiss()},function(){a.error=!0,a.working=!1}))}}]),app.controller("AssetCreateFileDialog",["$interpolate","$rootScope","$scope","files","createAssetAsync","resultCallback","Upload",function(e,t,a,n,u,g,f){a.web_assetDialog_description=e(scope.currentScope.network.getResourceOrKeyName("web_assetDialog_description"))({networkName:scope.currentScope.network.name}),a.closedChapter=t.scope.currentChapter.closed,a.chapterName=t.scope.currentChapter.name,a.numberOfClosedChapter=t.scope.network.chapters.filter(function(s){return s.closed}).length,a.accessibility=0,a.accessibilitySelectionDataSource=[{value:0,text:a.chapterName},{value:1,text:scope.currentScope.network.getResourceOrKeyName("web_asset_addFileDialog_accessibility_select_networkwide")}];var r={type:11,text:"",fileName:"",attachment:"",fileSource:"",guid:"",uploadError:"",source:"",sourceType:null,author:"",title:"",sourceUrl:"",mimeType:null,accessibility:null};a.form={},a.files=n,a.workingFiles=n.length,angular.forEach(n,function(s,c){s.assetFile=angular.copy(r),s.assetFile.fileName=s.fileName,s.prefix="file"+c,s.uploadAssetProgress=0,s.uploadAsset=f.upload({url:scope.apiEndpoint+"upload",data:{file:s}}).then(function(d){s.assetFile.guid=d.data},function(d){s.uploadError="Error: "+d.data,a.$dismiss()},function(d){s.uploadAssetProgress=parseInt(100*d.loaded/d.total)}).finally(function(){s.uploadAsset=null,a.workingFiles--})}),a.copyFileData=function(){var s=n[0];angular.forEach(n,function(c,d){if(d>0){var i=c.assetFile.guid;c.assetFile=angular.copy(s.assetFile),c.assetFile.guid=i}})},a.createFiles=function(s){s&&angular.forEach(n,function(c){a.working=!0,c.assetFile.mimeType=c.type,c.assetFile.fileName=c.name,c.assetFile.accessibility=a.accessibility,u(c.assetFile).then(function(d){g&&(d.assetFile.user=d.user,g(d)),a.working=!1,a.$dismiss()},function(){a.error=!0,a.working=!1})})},a.cancel=function(){a.$dismiss()}}]),app.controller("AssetCreateGifDialog",["$scope","$rootScope","createAssetAsync","resultCallback","$http","$q",function(e,t,a,n,u,g){e.working=!1,e.error=!1,e.query="",e.gifHits=null,e.assetText={type:10,text:"",imageSource:"",uploadGuid:"",uploadError:"",source:""},e.offset=0,e.limit=t.mobile?90:6,e.clear=function(){e.gifHits=null,e.offset=0},e.showMoreGifs=function(){var r,s,c,d;(r=e.query,s=e.offset,c=e.limit,d=g.defer(),u.get("https://api.giphy.com/v1/gifs/search?api_key=gF576MzYtgG2BZmhA2xRDU9DSPG6o96i&q="+encodeURIComponent(r)+"&limit="+c+"&offset="+s,{withCredentials:!1}).then(function(i){e.gifHits=null===e.gifHits?i.data.data:e.gifHits.concat(i.data.data),d.resolve(i.data)},function(){d.reject()}),d.promise).then(function(r){e.offset=e.offset+e.limit})},e.searchGifs=function(){e.clear(),e.showMoreGifs()},e.createAsset=function(r){e.working||(e.working=!0,e.assetText.text=r.images.original.url,a(e.assetText).then(function(s){n&&(s.assetText.user=s.user,n(s)),e.$dismiss()},function(){e.error=!0,e.working=!1}))}}]),app.controller("AssetCreateImageDialog",["$interpolate","$rootScope","$scope","files","createAssetAsync","resultCallback","Upload",function(e,t,a,n,u,g,f){a.web_assetDialog_createImage_canBeUsedElsewhere=e(scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_canBeUsedElsewhere"))({networkName:scope.currentScope.network.name}),a.web_assetDialog_description=e(scope.currentScope.network.getResourceOrKeyName("web_assetDialog_description"))({networkName:scope.currentScope.network.name}),a.defaultSourceTypes={1:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType1,sourceType:1,riskLevel:1,expirationDays:0,checkRequired:!1},2:{name:scope.currentScope.network.name,sourceType:2,riskLevel:1,expirationDays:0,checkRequired:!1},3:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType3,sourceType:3,riskLevel:1,expirationDays:0,checkRequired:!1},4:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType4,sourceType:4,riskLevel:2,expirationDays:30,checkRequired:!1},5:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType5,sourceType:5,riskLevel:1,expirationDays:0,checkRequired:!1},7:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7,sourceType:7,riskLevel:2,expirationDays:30,checkRequired:!0},8:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType8,sourceType:8,riskLevel:2,expirationDays:30,checkRequired:!1},9:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType9,sourceType:9,riskLevel:3,expirationDays:14,checkRequired:!0},12:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType12,sourceType:12,riskLevel:3,expirationDays:14,checkRequired:!0},14:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType14,sourceType:14,riskLevel:3,expirationDays:14,checkRequired:!0},15:{name:scope.currentScope.network.resources.web_assetDialog_createImage_sourceType15,sourceType:15,riskLevel:1,expirationDays:0,checkRequired:!1}},a.profile.isMerkuristJournalist||delete a.defaultSourceTypes[2],a.creativeCommonsLicenses={1:{name:"CC0 1.0",value:"[CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/deed.de)",validity:!0},2:{name:"BY 1.0",value:"[BY 1.0](https://creativecommons.org/licenses/by/1.0/legalcode)",validity:!0},3:{name:"BY 2.0",value:"[BY 2.0](https://creativecommons.org/licenses/by/2.0/de/legalcode)",validity:!0},4:{name:"BY 2.5",value:"[BY 2.5](https://creativecommons.org/licenses/by/2.5/legalcode)",validity:!0},5:{name:"BY 3.0",value:"[BY 3.0](https://creativecommons.org/licenses/by/3.0/de/legalcode)",validity:!0},6:{name:"BY 4.0",value:"[BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode)",validity:!0},7:{name:"BY-SA 1.0",value:"[BY-SA 1.0](https://creativecommons.org/licenses/by-sa/1.0/legalcode)",validity:!0},8:{name:"BY-SA 2.0",value:"[BY-SA 2.0](https://creativecommons.org/licenses/by-sa/2.0/de/legalcode)",validity:!0},9:{name:"BY-SA 2.5",value:"[BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/legalcode)",validity:!0},10:{name:"BY-SA 3.0",value:"[BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/de/legalcode)",validity:!0},11:{name:"BY-SA 4.0",value:"[BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode)",validity:!0},12:{name:"BY-ND",value:"",validity:!1},13:{name:"BY-NC",value:"",validity:!1},14:{name:"BY-NC-SA",value:"",validity:!1},15:{name:"BY-ND-NC",value:"",validity:!1},16:{name:"BY-NC-ND",value:"",validity:!1}};var r={type:2,text:"",attachment:"",imageSource:"",uploadGuid:"",pdfUploadGuid:"",uploadError:"",source:"",expirationDate:"",expirationDays:0,canBeUsedElsewhere:t.scope.currentScope.network.settings.simpleImageSource||!(a.profile.isJournalist||a.profile.isMerkuristJournalist),sourceType:null,author:"",title:"",dateOfPermission:"",descriptionOfPermission:"",permissionGivenBy:"",pressServiceUrl:"",sourceUrl:"",agency:"",creativeCommonsLicense:"",dateOfScreenshot:"",canBeUsedEditorial:!0,canBeUsedAdvertising:!1,imageId:"",mimeType:null,alwaysShowImageDescription:!!t.scope.currentScope.network.settings.configurations.alwaysShowImageDescriptionDefaultValue};a.form={},a.files=n,a.workingFiles=n.length,angular.forEach(n,function(d,i){d.assetImage=angular.copy(r),d.ccLicense=null,d.ccLicenseError="",d.visibleImageSource="",d.prefix="file"+i,d.overrideSource=null,t.scope.currentScope.network.settings.simpleImageSource&&(d.assetImage.sourceType=16),d.uploadAssetProgress=0,d.uploadAsset=f.upload({url:scope.apiEndpoint+"upload",data:{file:d}}).then(function(o){d.assetImage.uploadGuid=o.data},function(o){d.uploadError="Error: "+o.data,a.$dismiss()},function(o){d.uploadAssetProgress=parseInt(100*o.loaded/o.total)}).finally(function(){(function s(d){["image/gif","image/exif","image/png","image/tif","image/tiff","image/tff","image/jpg","image/jpeg","image/jpe","image/jif","image/jfif","image/jfi","image/webp"].includes(d.type)||a.form[d.prefix+"_type"].$setValidity("validateType",!1)})(d),d.uploadAsset=null,a.workingFiles--}),d.uploadPdf=function(o){o&&(a.workingFiles++,f.upload({url:scope.apiEndpoint+"upload",data:{file:o}}).then(function(h){d.assetImage.pdfUploadGuid=h.data,d.uploadedPdfName=o.name},function(h){d.uploadPdfError="Error: "+h.data,d.uploadedPdfName=null},function(h){}).finally(function(){a.workingFiles--}))},d.removePdf=function(){d.assetImage.pdfUploadGuid=null,d.uploadPdfName=null},d.sourceTypeSelected=function(){var o=d.assetImage.sourceType,h=d.assetImage.uploadGuid,p=d.assetImage.text;d.assetImage=angular.copy(r),d.assetImage.sourceType=o,d.assetImage.uploadGuid=h,d.assetImage.text=p,o&&(a.profile.isJournalist||a.profile.isMerkuristJournalist?a.form.$setPristine():a.formNonAuthor.$setPristine(),(2===o||1===o&&(a.profile.isJournalist||a.profile.isMerkuristJournalist))&&(d.assetImage.canBeUsedAdvertising=!0),8===o&&(d.assetImage.canBeUsedEditorial=!1),(4===o||16===o||3!==o.riskLevel)&&(d.assetImage.canBeUsedElsewhere=!0),d.assetImage.expirationDays=o.expirationDays,a.copyImageData())},d.creativeCommonsLicenseSelected=function(){var o=d.ccLicense;if(a.form[d.prefix+"_selectCreativeCommonsLicense"].$setValidity("validateCreativeCommons",!1),o&&!o.validity)d.ccLicenseError=scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectedInvalidLicensePlatformError_0+" "+o.name+" "+scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectedInvalidLicensePlatformError_1;else{if(!o)return void(d.ccLicenseError=scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectLicenseError);a.form[d.prefix+"_selectCreativeCommonsLicense"].$setValidity("validateCreativeCommons",!0),d.ccLicenseError=null}d.assetImage.creativeCommonsLicense=o.name,a.copyImageData()},d.generateImageSource=function(){var o=d.assetImage.author,h=d.assetImage.author;switch(d.assetImage.sourceType){case 2:d.assetImage.author||(o=h=scope.currentScope.network.name);break;case 5:d.assetImage.pressServiceUrl&&(o+=", [source]("+d.assetImage.pressServiceUrl+")");break;case 7:d.ccLicense&&!d.ccLicense.validity?o=scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectedInvalidLicenseError:d.ccLicense&&o&&(d.assetImage.title&&(o+=", ["+d.assetImage.title+"]",h=h+", "+d.assetImage.title),d.assetImage.sourceUrl&&(o+="("+d.assetImage.sourceUrl+")"),d.assetImage.creativeCommonsLicense&&(o+=", "+d.ccLicense.value,h+=", "+d.ccLicense.name));break;case 8:d.assetImage.agency&&(o=h="\xa9 "+o+" / "+d.assetImage.agency)}d.assetImage.source=o,d.visibleImageSource=h,a.copyImageData()},d.hasExpirationChanged=function(){d.hasExpirationDays||(d.assetImage.expirationDays=0)},d.overrideSourceChanged=function(){d.overrideSource?(d.sourceTypeSelected(),d.generateImageSource()):a.copyImageData()}}),a.$watch("files[0].assetImage.text",function(d,i,o){for(var h=1;h<n.length;h++){var p=n[h].assetImage.text;n[h].assetImage.text=p===i?d:p}}),a.copyImageData=function(){var d=n[0];angular.forEach(n,function(i,o){if(o>0&&!i.overrideSource){var h=i.assetImage.uploadGuid;i.assetImage=angular.copy(d.assetImage),i.assetImage.uploadGuid=h,i.visibleImageSource=d.visibleImageSource}})};var c=function(d){if(d&&d.indexOf(!1)){var i=d.split(".");return i[2]+"-"+i[1]+"-"+i[0]}return d};a.createImages=function(d){d&&angular.forEach(n,function(i){a.working=!0,i.assetImage.dateOfScreenshot=c(i.assetImage.dateOfScreenshot),i.assetImage.dateOfPermission=c(i.assetImage.dateOfPermission),i.assetImage.mimeType=i.type,u(i.assetImage).then(function(o){g&&(o.assetImage.user=o.user,g(o)),a.working=!1,a.$dismiss()},function(){a.error=!0,a.working=!1})})},a.cancel=function(){a.$dismiss()}}]),app.controller("AssetCreateVideoDialog",["$interpolate","$scope","createAssetAsync","resultCallback","$http","authService","vimeoService","profileService",function(e,t,a,n,u,g,f,r){t.web_assetDialog_description=e(scope.currentScope.network.getResourceOrKeyName("web_assetDialog_description"))({networkName:scope.currentScope.network.name}),t.title="",t.thumbnailUrl="",t.valid=!1,t.working=!1,t.error=!1,t.displayMediaManager=!1,t.assetText={type:-1,text:"",thumbnail:"",imageSource:"",uploadGuid:"",uploadError:"",source:""},t.externalData=null,scope.currentScope.network.settings.configurations.apicodoMediaServicesEnabled&&r.getProfile().then(function(d){(d.isJournalist||d.isMerkuristJournalist)&&(t.displayMediaManager=!0)}),t.assetTextExternalCallback=function(d){t.working=!1,t.assetText.title=d.title,t.assetText.thumbnailUrl=d.thumbnailUrl,t.externalData=d,t.assetText.type=13,t.assetText.attachment=d.attachment,t.assetText.text=d.attachment,t.valid=!0,a(t.assetText).then(function(i){n&&n(i),t.$dismiss()},function(){t.error=!0,t.working=!1})};var s=[{type:5,regEx:/(youtu\.be\/|youtube\.com\/watch\?(?:.*&)?v=)([a-z|0-9|_|-]+)/i,regExGroup:2},{type:5,regEx:/(youtu\.be\/|youtube\.com\/shorts\/)([a-z|0-9|_|-]+)(\?(.*))?/i,regExGroup:2},{type:6,regEx:/(facebook\.com\/(.*)\/videos\/)(vb\.[0-9]+\/)?([0-9]+)(.*)?/i,regExGroup:4},{type:7,regEx:/vimeo.com(\/?|.+\/)([^\/]+)\/?$/i,regExGroup:2},{type:13,regEx:/(?:media\.apicodo\.dev|media\.platform-services\.io)\/play\/([a-z|0-9|-]{36})\?guiMode\=iframe/i,regExGroup:1}];t.$watch("inputText",function(){if(t.valid=!1,t.inputText){if(t.assetText.text=t.inputText,t.showVimeoEmbed=!1,null!=t.externalData)return t.working=!1,t.assetText.title=callbackData.title,t.assetText.thumbnailUrl=callbackData.thumbnailUrl,t.externalData=callbackData,t.assetText.type=13,t.assetText.attachment=callbackData.attachment,t.assetText.text=callbackData.attachment,t.valid=!0,void(t.externalData=null);for(var d=0;d<s.length;d++)if(t.assetText.text.match(s[d].regEx)){t.assetText.type=s[d].type,t.assetText.attachment=s[d].regEx.exec(t.assetText.text)[s[d].regExGroup],t.assetText.attachment2=s[d].regEx.exec(t.assetText.text)[s[d].regExGroup-2],t.working=!0,5===t.assetText.type?u.get("https://www.googleapis.com/youtube/v3/videos?part=snippet&key=AIzaSyAk2ySSOTI2-ayM8g0gMpaanjQ6B-7NbXU&id="+t.assetText.attachment,{withCredentials:!1}).then(function(i){if(!i.data.items.length)return t.working=t.valid=!1,void(t.title=t.thumbnailUrl="");t.working=!1,t.valid=!0,t.title=i.data.items[0].snippet.title,t.thumbnailUrl=i.data.items[0].snippet.thumbnails.default.url},function(i){t.working=t.valid=!1,t.title=t.thumbnailUrl=""}):6===t.assetText.type?(t.working=!1,t.valid=!0,t.title="",t.thumbnailUrl="https://graph.facebook.com/"+t.assetText.attachment+"/picture"):7===t.assetText.type?f.getVideo(t.assetText.attachment).then(function(i){t.title=i.name,t.thumbnailUrl=i.thumbnailUrl,t.working=!1,t.valid=!0},function(){t.valid=!0,t.showVimeoEmbed=!0,t.working=!1,t.title=t.thumbnailUrl=""}):13===t.assetText.type&&(t.externalData?(t.title=t.externalData.title,t.thumbnailUrl=t.externalData.thumbnailUrl,t.valid=!0,t.working=!1,t.externalData=null):g.getApicodoMediaToken().then(function(i){u.get(i.apiBase+"/api/Thumbnail/GetWebFrontendData?fileId="+t.assetText.attachment,{withCredentials:!1,headers:{Authorization:"bearer "+i.token}}).then(function(h){if(!h.data)return t.working=t.valid=!1,t.title=t.thumbnailUrl="",t.title=t.assetText.attachment,t.thumbnailUrl=i.apiBase+"/api/Thumbnail/GetWebFrontendData?fileId="+t.assetText.attachment,void(t.valid=!0);t.working=!1,t.valid=!0,t.title=h.data.title,t.thumbnailUrl=h.data.thumbnailUrl},function(h){t.working=t.valid=!1,t.title=t.thumbnailUrl="",t.externalData&&(t.title=t.externalData.title,t.thumbnailUrl=t.externalData.thumbnailUrl,t.valid=!0),console.log(h)})}));break}t.working||(t.title=t.description=t.thumbnailUrl="")}}),t.createAsset=function(){if(!t.working&&t.valid){switch(t.working=!0,t.assetText.type){case 5:t.assetText.text=t.assetText.attachment+"||"+t.title;break;case 6:t.assetText.text=t.assetText.attachment2+"/videos/"+t.assetText.attachment;break;case 7:t.assetText.text=t.assetText.attachment+"|"+t.thumbnailUrl;break;default:t.assetText.text=t.assetText.attachment}a(t.assetText).then(function(d){n&&(d.assetText.user=d.user,n(d)),t.$dismiss()},function(){t.error=!0,t.working=!1})}}}]),app.controller("AssetCreateWorkflowDialog",["$scope","$rootScope","createAssetAsync","resultCallback","workflowService",function(e,t,a,n,u){e.working=!1,e.error=!1,e.query="",e.assetText={type:14,text:"",imageSource:"",uploadGuid:"",uploadError:"",source:""},e.offset=0,e.limit=t.mobile?90:6,e.searchWorkflow=function(){e.working=!0;var g=e.workflowUrl.lastIndexOf("/"),f=e.workflowUrl.lastIndexOf("?");f<g&&(f=e.workflowUrl.length);var r=e.workflowUrl.substring(g+1,f);u.getWorkflowTemplate(r).then(function(s){e.workflow=s,e.working=!1,e.error=!1},function(){e.workflow=null,e.working=!1,e.error=!0})},e.createAsset=function(){e.working||(e.working=!0,e.assetText.text=e.workflow.workflowTemplateId,a(e.assetText).then(function(g){n&&(g.assetText.user=g.user,n(g)),e.$dismiss()},function(){e.error=!0,e.working=!1}))}}]),app.controller("AssetDeleteDialog",["$scope","assetReference","assetService","isSponsored","profile",function(e,t,a,n,u){e.working=!1,e.error=!1,e.myArticle={},e.isSponsored=n,e.myAsset=t.assetImage?t.assetImage.user.guid===u.guid:t.assetText?t.assetText.user.guid===u.guid:t.assetFile.user,e.myAssetReference=t.user.guid===u.guid,e.isChildAsset=null!==t.parentGuid,e.deleteAsset=function(){e.working=!0,a.remove(t).then(function(){t.deleted=new Date,e.$dismiss()},function(){e.error=!0,e.working=!1})},e.deleteAssetReference=function(){e.working=!0,a.removeReference(t).then(function(){t.deleted=new Date,e.$dismiss()},function(){e.error=!0,e.working=!1})}}]),app.controller("AssetDialog",["$rootScope","$scope","article","sponsoredArticle","staticArticle","event","assetType","resultCallback","single","hideInComments","$timeout","$uibModal","assetService",function(e,t,a,n,u,g,f,r,s,c,d,i,o){t.working=!1,t.error=!1,t.article=a,t.sponsoredArticle=n,t.staticArticle=u,t.event=g,t.assetType=f,t.entity=a||n||u||g||null,t.assetReferencesWithAssetArticle=t.entity.assetReferences.filter(function(b){return null!==b.assetArticle}),t.assetReferencesWithAssetStaticArticle=t.entity.assetReferences.filter(function(b){return null!==b.assetStaticArticle});var h=e.scope.currentScope.network.settings.configurations.workflowConfiguration;t.canUseWorkflows=h?e.profile.isNewsroomAdmin||6===h.MinReferenceAsAssetRole&&e.profile.isHeadSales||5===h.MinReferenceAsAssetRole&&e.profile.isSales||4===h.MinReferenceAsAssetRole&&e.profile.isHeadJournalist||3===h.MinReferenceAsAssetRole&&e.profile.isMerkuristJournalist||2===h.MinReferenceAsAssetRole&&e.profile.isJournalist:e.profile.isNewsroomAdmin;var p=function(){return t.article?"article":t.sponsoredArticle?"sponsoredArticle":t.staticArticle?"staticArticle":t.event?"event":null},v=function(b){t.entity.assetReferences.unshift(b),d(function(){var y=$("#asset-list-assetReference-"+b.guid).parent();$(y).animate({scrollLeft:0},1e3)},500)};t.assetCreateImageDialog=function(b,R,y){b&&0!==b.length?R.length||i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateImageDialog.html",controller:"AssetCreateImageDialog",size:"lg",resolve:{files:function(){return b},resultCallback:function(){return v},createAssetAsync:function(){return a?function(l){return o.insertAssetImageToArticle(l,a.id,c)}:n?function(l){return o.insertAssetImageToSponsoredArticle(l,n.id)}:u?function(l){return o.insertAssetImageToStaticArticle(l,u.id)}:g?function(l){return o.insertAssetImageToEvent(l,g.id,c)}:void 0}}}):R||y.$setPristine()},t.assetCreateFileDialog=function(b,R,y){b&&0!==b.length?i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateFileDialog.html",controller:"AssetCreateFileDialog",size:"lg",resolve:{files:function(){return b},resultCallback:function(){return v},createAssetAsync:function(){return a?function(l){return o.insertAssetFileToArticle(l,a.id,c)}:n?function(l){return o.insertAssetFileToSponsoredArticle(l,n.id)}:u?function(l){return o.insertAssetFileToStaticArticle(l,u.id)}:g?function(l){return o.insertAssetFileToEvent(l,g.id,c)}:void 0}}}):R||y.$setPristine()},t.assetCreateVideoDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateVideoDialog.html",controller:"AssetCreateVideoDialog",size:"lg",resolve:{resultCallback:function(){return v},createAssetAsync:function(){return a?function(b){return o.insertAssetTextToArticle(b,a.id,c)}:n?function(b){return o.insertAssetTextToSponsoredArticle(b,n.id)}:u?function(b){return o.insertAssetTextToStaticArticle(b,u.id)}:g?function(b){return o.insertAssetTextToEvent(b,g.id,c)}:void 0}}})},t.assetCreateWorkflowDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateWorkflowDialog.html",controller:"AssetCreateWorkflowDialog",size:"lg",resolve:{resultCallback:function(){return v},createAssetAsync:function(){return a?function(b){return o.insertAssetTextToArticle(b,a.id,c)}:n?function(b){return o.insertAssetTextToSponsoredArticle(b,n.id)}:u?function(b){return o.insertAssetTextToStaticArticle(b,u.id)}:g?function(b){return o.insertAssetTextToEvent(b,g.id,c)}:void 0}}})},t.assetCreateGifDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateGifDialog.html",controller:"AssetCreateGifDialog",size:"lg",resolve:{resultCallback:function(){return v},createAssetAsync:function(){return a?function(b){return o.insertAssetTextToArticle(b,a.id,c)}:n?function(b){return o.insertAssetTextToSponsoredArticle(b,n.id)}:u?function(b){return o.insertAssetTextToStaticArticle(b,u.id)}:g?function(b){return o.insertAssetTextToEvent(b,g.id,c)}:void 0}}})},t.assetPixabaySearchDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/pixabay/pixabaySearchDialog.html",controller:"pixabaySearchDialog",size:"lg",resolve:{resultCallback:function(){return v},assetContainer:{articleId:a?a.id:null,sponsoredArticleId:n?n.id:null,staticArticleId:u?u.id:null,eventId:g?g.id:null,hideInComments:c??!1},createAssetAsync:function(){return a?function(b){return o.insertAssetTextToArticle(b,a.id,c)}:n?function(b){return o.insertAssetTextToSponsoredArticle(b,n.id)}:u?function(b){return o.insertAssetTextToStaticArticle(b,u.id)}:g?function(b){return o.insertAssetTextToEvent(b,g.id,c)}:void 0}}})},t.assetCreateFactDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateFactDialog.html",controller:"AssetCreateCommonDialog",size:"lg",resolve:{assetType:function(){return 8},resultCallback:function(){return v},createAssetAsync:function(){return a?function(b){return o.insertAssetTextToArticle(b,a.id,c)}:n?function(b){return o.insertAssetTextToSponsoredArticle(b,n.id)}:u?function(b){return o.insertAssetTextToStaticArticle(b,u.id)}:g?function(b){return o.insertAssetTextToEvent(b,g.id,c)}:void 0}}})},t.assetCreateQuestionDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateQuestionDialog.html",controller:"AssetCreateCommonDialog",size:"lg",resolve:{assetType:function(){return 9},resultCallback:function(){return v},createAssetAsync:function(){return a?function(b){return o.insertAssetTextToArticle(b,a.id,c)}:n?function(b){return o.insertAssetTextToSponsoredArticle(b,n.id)}:u?function(b){return o.insertAssetTextToStaticArticle(b,u.id)}:g?function(b){return o.insertAssetTextToEvent(b,g.id,c)}:void 0}}})},t.assetSearchDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetSearchDialog.html",controller:"AssetSearchDialog",size:"lg",resolve:{resultCallback:function(){return v},snipId:function(){return t.snip?t.snip.id:null},articleId:function(){return t.article?t.article.id:null},sponsoredArticleId:function(){return t.sponsoredArticle?t.sponsoredArticle.id:null},staticArticleId:function(){return t.staticArticle?t.staticArticle.id:null},eventId:function(){return t.event?t.event.id:null},assetReferences:function(){return t.entity.assetReferences}}})};var C=function(b){t.entity.assetReferences.push(b),t.assetReferencesWithAssetArticle.unshift(b)};t.showAddArticleDialog=function(){i.open({templateUrl:"/ClientApp/src/legacy-app/asset/addAssetArticleDialog.html",controller:"AddAssetArticleDialogController",controllerAs:"$ctrl",size:"lg",resolve:{ownerId:function(){return t.entity.id},ownerType:function(){return p()},onAddSuccessful:function(){return C}}})};var A=function(b){t.entity.assetReferences.push(b),t.assetReferencesWithAssetStaticArticle.unshift(b)};t.showAddStaticArticleDialog=()=>{i.open({templateUrl:"/ClientApp/src/legacy-app/asset/addAssetStaticArticleDialog.html",controller:"AddAssetStaticArticleDialogController",controllerAs:"$ctrl",size:"lg",resolve:{ownerId:function(){return t.entity.id},ownerType:function(){return p()},onAddSuccessful:function(){return A}}})},t.$watchCollection("entity.assetReferences",function(b){if(t.assetsMedia=[],t.assetsFacts=[],t.assetsQuestions=[],t.assetsComments=[],t.assetsImages=[],t.assetsFiles=[],t.assetsWorkflows=[],b&&angular.isDefined(b)){var R=[];b.forEach(function(y){y.deleted||(y.childAssets=[],y.parentGuid||R.push(y))}),R.forEach(function(y){b.forEach(function(l){l.parentGuid&&y.guid===l.parentGuid&&y.childAssets.push(l)}),null!==y.assetFile&&t.assetsFiles.push(y),null!==y.assetImage||null!==y.assetText&&(5===y.assetText.type||6===y.assetText.type||7===y.assetText.type||10===y.assetText.type||13===y.assetText.type)?(t.assetsMedia.push(y),null!==y.assetImage&&t.assetsImages.push(y)):null!==y.assetText&&(8===y.assetText.type?t.assetsFacts.push(y):9===y.assetText.type?t.assetsQuestions.push(y):0===y.assetText.type?t.assetsComments.push(y):14===y.assetText.type&&t.assetsWorkflows.push(y))})}});var x=new Map;t.toggleAssetAdded=function(b,R){s?(r(b),t.$dismiss()):R?x.set(b.guid,b):x.delete(b.guid)},t.cancel=function(){s||r(Array.from(x.values())),t.$dismiss()},t.articleAssetToggle={},t.toggleAssetArticleAdded=function(b){s?(r(b),t.$dismiss()):(t.articleAssetToggle[b.guid]=!t.articleAssetToggle[b.guid],t.articleAssetToggle[b.guid]?x.set(b.guid,b):x.delete(b.guid))}}]).value("article",null).value("sponsoredArticle",null).value("staticArticle",null).value("event",null),app.controller("AssetEditDialog",["$scope","assetReference","assetService","$rootScope",function(e,t,a,n){e.working=!1,e.error=!1,e.assetReference=t,e.updateImageText=function(){e.working=!0,a.updateImageText(t).then(function(){e.$dismiss(),n.$broadcast("$$rebind::refresh")},function(){e.error=!0,e.working=!1})}}]),app.controller("AssetImageFocuspointDialog",["$scope","assetReference","assetService","$timeout","$rootScope",function(e,t,a,n,u){e.working=!1,e.error=!1,e.assetReference=t;var g,f,r,c=function(o,h,p,v){let A,x;o/h>v?(A=h*v,x=h):(A=o,x=o/v);let y=p.x+p.w/2-A/2,l=p.y+p.h/2-x/2;return y+A>f.width()&&(y=f.width()-A),y<0&&(y=0),l+x>h&&(l=h-x),l<0&&(l=0),{x:y,y:l,w:A,h:x}},d=function(o,h,p){let C=40;screen.width<769&&(C=20);let A=0;screen.width<991&&(A=66),presetImgDimensions=c(f.width(),f.height(),h,2.6857142857142855),targetImgDimensions=c(presetImgDimensions.w,presetImgDimensions.h,h,p),o.style.top=targetImgDimensions.y+presetImgDimensions.y+A+"px",o.style.left=targetImgDimensions.x+C+"px",o.style.width=targetImgDimensions.w+"px",o.style.height=targetImgDimensions.h+"px",o.style.display="block"},i=function(o){if(o){var h=f.width(),p=f.height();g.x1=Math.round(g.width/h*o.x),g.x2=Math.round(g.width/h*o.x2),g.y1=Math.round(g.height/p*o.y),g.y2=Math.round(g.height/p*o.y2),d(document.getElementById("mobileFrame"),o,1.45)}else g.x1=g.x2=g.y1=g.y2=null};e.imageLoad=function(){a.getAssetImageProcessing(t.assetImage.guid).then(function(o){g=o,(f=$(".assetImageFocuspointDialog-asset")).Jcrop({onSelect:i,onRelease:i},function(){r=this});var h=f.width(),p=f.height();if(null!==g.x1&&null!==g.x2&&null!==g.y1&&null!==g.y2){let v={x:Math.round(h/g.width*g.x1),y:Math.round(p/g.height*g.y1),x2:Math.round(h/g.width*g.x2),y2:Math.round(p/g.height*g.y2),w:Math.round(h/g.width*g.x2)-Math.round(h/g.width*g.x1),h:Math.round(p/g.height*g.y2)-Math.round(p/g.height*g.y1)};r.animateTo([v.x,v.y,v.x2,v.y2]),d(document.getElementById("desktopFrame"),v,desktopTargetAspectRatio),d(document.getElementById("mobileFrame"),v,1.45)}},function(){e.error=!0})},e.save=function(){a.updateAssetImageProcessingFocuspoint(t.assetImage.guid,g).then(function(){t.assetImage.cache++,n(function(){u.$emit("lazyImg:refresh")}),e.$dismiss()},function(){e.error=!0})},e.reset=function(){g.x1=g.x2=g.y1=g.y2=null,a.updateAssetImageProcessingFocuspoint(t.assetImage.guid,g).then(function(){t.assetImage.cache++,n(function(){u.$emit("lazyImg:refresh")}),e.$dismiss()},function(){e.error=!0})}}]),app.component("assetList",{templateUrl:"/ClientApp/src/legacy-app/asset/assetList.html",bindings:{sponsored:"<?",archived:"<?",assetImages:"<",assetFiles:"<",assetTexts:"<",assetReferences:"=",assetLimitStart:"<",loanCallback:"&"},controller:["$uibModal","$rootScope","assetService",function(e,t,a){var n=this;n.mobile=t.mobile,n.profile=t.profile,n.order=t.scope.currentScope.chapter.settings.assetOrderByPublished?"-created":"-likes",n.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage,n.cookieManager=0,n.coverImage=t.scope.globalSettings.blobStorageCdnUrl+"/logo/chapter/picture/"+t.scope.currentScope.chapter.slug+"?cache="+t.scope.currentScope.chapter.settings.chapterPictureCache+"&profile=profile-cover",n.isRedesign="Redesign2024"==t.scope.currentScope.network.settings.configurations.contentRenderEngine,t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&(n.cookieManager=t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager),n.isBuiltInCookieManager=1===n.cookieManager,this.$onInit=function(){n.assetLimitStart=n.assetLimitStart||12,n.assetLimit=n.assetLimitStart,n.loanCallback&&(n.loanCallback=n.loanCallback())},n.assetToggle={},n.toggleAssetAdded=function(u){n.assetToggle[u.guid]=!n.assetToggle[u.guid],n.loanCallback(u,n.assetToggle[u.guid]),null!=u.assetImage&&((new Image).src=u.assetImage.assetImageUrl+"?preset=asset-embed{{ ::($ctrl.enableHighQualityImage ? '-hq' : '') }}&cache=0",(new Image).src=u.assetImage.assetImageUrl+"?preset=asset-image-large&cache=0")},n.getAssets=function(){var u=n.assetReferences||[];return n.assetFiles&&(n.assetFiles.forEach(function(g){g.assetFile=g,g.fake=!0}),u=u.concat(n.assetFiles)),n.assetImages&&(n.assetImages.forEach(function(g){g.assetImage=g,g.fake=!0}),u=u.concat(n.assetImages)),n.assetTexts&&(n.assetTexts.forEach(function(g){g.assetText=g,g.fake=!0}),u=u.concat(n.assetTexts)),u},n.deleteAsset=function(u){e.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDeleteDialog.html",controller:"AssetDeleteDialog",size:"lg",resolve:{assetReference:function(){return u},isSponsored:function(){return n.sponsored},profile:function(){return n.profile}}})},n.openApicodoVideo=function(u){e.open({templateUrl:"/ClientApp/src/legacy-app/media/apicodoMediaPlayDialog.html",controller:"apicodoMediaPlayDialog",size:"lg",resolve:{videoId:function(){return u.assetText.text}}})},n.reportAsset=function(u){e.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetReportDialog.html",controller:"AssetReportDialog",size:"lg",resolve:{assetReference:function(){return u}}})},n.listChildAssets=function(u){e.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetChildListDialog.html",controller:"AssetChildListDialog",size:"lg",resolve:{parentAssetReference:function(){return u},archived:function(){return n.archived},reportAsset:function(){return n.reportAsset},deleteAsset:function(){return n.deleteAsset}}})},n.calcLimit=function(u){n.assetLimit=n.assetReferences.length-u.length>n.assetLimitStart?u.length+n.assetLimitStart:n.assetReferences.length},n.assetImageFocuspointDialog=function(u){e.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){return u}}})},n.assetEditDialog=function(u){e.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetEditDialog.html",controller:"AssetEditDialog",size:"lg",resolve:{assetReference:function(){return u}}})},n.toggleMenu=function(u){u.menuVisible=!!angular.isUndefined(u.menuVisible)||!u.menuVisible},n.showCookieInfo=function(u){if(!n.isBuiltInCookieManager)return!1;const{twitter:g,youTube:f,facebook:r,vimeo:s,giphy:c}=t.scope.profile.settings.externalMediaPermissions;switch(u.assetText.type){case 4:return!g?.granted;case 5:return!f?.granted;case 6:return!r?.granted;case 7:return!s?.granted;case 10:return!c?.granted;default:return!1}},n.toggleAssetHideInComments=function(u){a.updateAssetReferenceHideInComments(u.guid),u.hideInComments=!u.hideInComments},n.authorized=function(){return n.profile.chapterRoles.some(u=>2==u||3==u||4==u||7==u)}}]}),app.component("assetListWorkflowItem",{templateUrl:"/ClientApp/src/legacy-app/asset/assetListWorkflowItem.html",bindings:{workflowId:"<"},controller:["workflowService",function(e){var t=this;this.$onInit=function(){e.getWorkflowTemplate(t.workflowId).then(function(a){t.workflow=a})}}]}),app.directive("assetpreview",[function(){return{restrict:"E",templateUrl:"/ClientApp/src/legacy-app/asset/assetpreview.html",replace:!0,scope:{article:"=article"},link:function(e,t,a){e.$watch(a.article,function(){e.assetReference=$.grep(e.article.assetReferences,function(n){return n.guid===a.assetGuid})[0]})}}}]),app.controller("AssetReportDialog",["$scope","assetReference","assetService",function(e,t,a){e.working=!1,e.error=!1,e.type=-1,e.reportAsset=function(){e.working=!0,a.report(t,e.type).then(function(){e.working=!1,e.$dismiss()},function(){e.error=!0,e.working=!1,e.$dismiss()})}}]),app.controller("AssetSearchDialog",["$scope","$state","snipId","articleId","sponsoredArticleId","staticArticleId","eventId","assetReferences","resultCallback","assetService","searchService","profileService",function(e,t,a,n,u,g,f,r,s,c,d,i){e.valid=!1,e.thumbnailUrl="",e.activePage=1,e.searchPage=0,e.assetReferences=[],e.selectedAssetReferences=[],e.isSponsoredArticle=!!u,i.getProfile().then(function(R){guid=R.guid}),this.query=function o(){return t.includes("app.search")?$location.getArticles().q:""}();e.clear=function(){this.query="",hits=null};var p=function(R){var y=!1;return angular.forEach(r,function(l){(null!==l.assetImage&&l.assetImage.guid===R||null!==l.assetText&&l.assetText.guid===R||null!==l.assetFile&&l.assetFile.guid===R)&&(y=!0)}),y};function A(R){e.showAssetImages=!1,e.showAssetFiles=!1,e.showArticles=!1,e.show=!0,angular.forEach(R,function(y){y&&(y.disabled=p(y.guid),e.assetImageHits=e.assetImageHits.concat(y))})}function b(R){e.showAssetImages=!1,e.showAssetFiles=!1,e.showArticles=!1,e.show=!0,angular.forEach(R,function(y){y&&(y.disabled=p(y.guid),e.assetFileHits.push(y))})}e.showMoreArticles=function(){e.searchPage++,e.isSponsoredArticle?d.getAssetSponsoredArticles(this.query,e.searchPage=e.searchPage).then(function(R){e.show=!1,e.showArticles=!0,angular.forEach(R,function(y){y.assetReferences.length&&(e.articleHits=e.articleHits.concat(y))})}):d.getAssetArticles(this.query,e.searchPage=e.searchPage).then(function(R){e.show=!1,e.showArticles=!0,e.totalArticles=R.total,angular.forEach(R.articles,function(y){y.assetReferences.length&&(e.articleHits=e.articleHits.concat(y))})})},e.showMoreAssetImages=function(){e.searchPage++,e.isSponsoredArticle?d.getSponsoredAssetImages(this.query,e.searchPage=e.searchPage,this.mobile?90:6).then(function(R){e.show=!1,e.showAssetImages=!0,angular.forEach(R,function(y){y&&(y.disabled=p(y.guid),e.assetImageHits=e.assetImageHits.concat(y))})}):d.getAssetImages(this.query,e.searchPage=e.searchPage,this.mobile?90:6).then(function(R){e.show=!1,e.showAssetImages=!0,angular.forEach(R,function(y){y&&(y.disabled=p(y.guid),e.assetImageHits=e.assetImageHits.concat(y))})})},e.showMoreAssetFiles=function(){e.searchPage++,e.isSponsoredArticle?d.getSponsoredAssetFiles(this.query,e.searchPage=e.searchPage,this.mobile?90:6).then(function(R){e.show=!1,e.showAssetFiles=!0,angular.forEach(R,function(y){y&&(y.disabled=p(y.guid),e.assetFileHits=e.assetFileHits.concat(y))})}):d.getAssetFiles(this.query,e.searchPage=e.searchPage,this.mobile?90:6).then(function(R){e.show=!1,e.showAssetFiles=!0,angular.forEach(R,function(y){y&&(y.disabled=p(y.guid),e.assetFileHits=e.assetFileHits.concat(y))})})},e.goBack=function(){e.activePage=1,e.show=!0,e.showAssetImages=!1,e.showAssetFiles=!1,e.showArticles=!1,!this.mobile&&e.assetImageHits&&e.assetImageHits.length>6&&(e.assetImageHits.splice(6),e.searchPage=0)},e.clickArticle=function(R){e.selectedArticle=R,angular.forEach(R.assetReferences,function(y){null!==y.assetImage?y.assetImage.isAdded=p(y.assetImage.guid):null!==y.assetText&&(y.assetText.isAdded=p(y.assetText.guid))}),e.assetReferences=R.assetReferences,e.activePage=2},e.addAssetImage=function(R){R&&(e.createAssetReference({assetImageGuid:R.guid}),R.disabled=!0)},e.addAssetFile=function(R){R&&(e.createAssetReference({assetFileGuid:R.guid}),R.disabled=!0)},e.addAssetText=function(R){R&&(e.createAssetReference({assetTextGuid:R.guid}),R.isAdded=!0)},e.search=function(){(function v(){t.includes("app.search")?$location.getArticles("q",e.query):(e.articleHits=[],""===e.query?e.articleHits=null:e.isSponsoredArticle?d.getAssetSponsoredArticles(e.query,e.searchPage=0).then(function(R){e.show=!0,angular.forEach(R,function(y){y.assetReferences.length&&(e.articleHits=e.articleHits.concat(y))})}):d.getAssetArticles(e.query,e.searchPage=0).then(function(R){e.show=!0,e.totalArticles=R.total,angular.forEach(R.articles,function(y){y.assetReferences.length&&(e.articleHits=e.articleHits.concat(y))})}))})(),function C(){t.includes("app.search")?$location.getArticles("q",e.query):(e.assetImageHits=[],""===e.query?e.assetImageHits=null:e.isSponsoredArticle?d.getSponsoredAssetImages(e.query,e.searchPage=0,e.mobile?90:6).then(A):d.getAssetImages(e.query,e.searchPage=0,e.mobile?90:6).then(A))}(),function x(){t.includes("app.search")?$location.getArticles("q",e.query):(e.assetFileHits=[],""===e.query?e.assetFileHits=null:e.isSponsoredArticle?d.getSponsoredAssetFiles(e.query,e.searchPage=0,e.mobile?90:6).then(b):d.getAssetFiles(e.query,e.searchPage=0,e.mobile?90:6).then(b))}()},e.createAssetReferences=function(){e.working||0===e.selectedAssetReferences.length||angular.forEach(e.selectedAssetReferences,function(R){null!==R.assetImage?e.createAssetReference({assetImageId:R.assetImage.id}):null!==R.assetText&&e.createAssetReference({assetImageId:null})})},e.createAssetReference=function(R){e.working=!0,R.snipId=a,R.articleId=n,R.sponsoredArticleId=u,R.staticArticleId=g,R.eventId=f,c.insertReference(R).then(function(y){s&&s(y),e.working=!1},function(){e.error=!0,e.working=!1})}}]).value("articleId",null).value("snipId",null).value("sponsoredArticleId",null).value("staticArticleId",null).value("eventId",null),app.factory("assetService",["$http","$q",function(e,t){return{getChildren:function(D,S){var U=t.defer();return e.get(scope.apiEndpoint+"assets/"+D+"/children"+(S?"?start="+S:"")).then(function(I){U.resolve(I.data)},function(I){U.reject()}),U.promise},getAssetImageProcessing:function(D){var S=t.defer();return e.get(scope.apiEndpoint+"assets/"+D+"/imageprocessing").then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},insertAssetImageToArticle:function(D,S,U){D.hideInComments=U??!1;var I=t.defer();return e.post(scope.apiEndpoint+"assets/image/article/"+S,D).then(function(m){var F=m.data;F.myAsset=!0,new Date(F.created)>new Date&&(F.created=(new Date).toISOString()),I.resolve(m.data)},function(){I.reject()}),I.promise},insertAssetImageToSnip:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/image/snip/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetImageToSponsoredArticle:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/image/sponsoredArticle/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetImageToStaticArticle:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/image/staticArticle/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetImageToEvent:function(D,S,U){D.hideInComments=U??!1;var I=t.defer();return e.post(scope.apiEndpoint+"assets/image/event/"+S,D).then(function(m){var F=m.data;F.myAsset=!0,new Date(F.created)>new Date&&(F.created=(new Date).toISOString()),I.resolve(m.data)},function(){I.reject()}),I.promise},insertAssetTextToArticle:function(D,S,U){D.hideInComments=U??!1;var I=t.defer();return e.post(scope.apiEndpoint+"assets/text/article/"+S,D).then(function(m){var F=m.data;F.myAsset=!0,new Date(F.created)>new Date&&(F.created=(new Date).toISOString()),I.resolve(m.data)},function(){I.reject()}),I.promise},insertAssetTextToSnip:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/text/snip/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetTextToSponsoredArticle:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/text/sponsoredArticle/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetTextToStaticArticle:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/text/staticArticle/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetTextToEvent:function(D,S,U){D.hideInComments=U??!1;var I=t.defer();return e.post(scope.apiEndpoint+"assets/text/event/"+S,D).then(function(m){var F=m.data;F.myAsset=!0,new Date(F.created)>new Date&&(F.created=(new Date).toISOString()),I.resolve(m.data)},function(){I.reject()}),I.promise},insertAssetFileToArticle:function(D,S,U){D.hideInComments=U??!1;var I=t.defer();return e.post(scope.apiEndpoint+"assets/file/article/"+S,D).then(function(m){var F=m.data;F.myAsset=!0,new Date(F.created)>new Date&&(F.created=(new Date).toISOString()),I.resolve(m.data)},function(){I.reject()}),I.promise},insertAssetFileToStaticArticle:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/file/staticArticle/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetFileToSponsoredArticle:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/file/sponsoredArticle/"+S,D).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertAssetFileToEvent:function(D,S,U){D.hideInComments=U??!1;var I=t.defer();return e.post(scope.apiEndpoint+"assets/file/event/"+S,D).then(function(m){var F=m.data;F.myAsset=!0,new Date(F.created)>new Date&&(F.created=(new Date).toISOString()),I.resolve(m.data)},function(){I.reject()}),I.promise},insertChild:function(D,S){var U=t.defer();return e.post(scope.apiEndpoint+"assets/"+D+"/children",S).then(function(I){var m=I.data;m.myAsset=!0,new Date(m.created)>new Date&&(m.created=(new Date).toISOString()),U.resolve(I.data)},function(){U.reject()}),U.promise},insertReference:function(D){var S=t.defer();return e.post(scope.apiEndpoint+"assets/reference",D).then(function(U){var I=U.data;I.myAsset=!0,new Date(I.created)>new Date&&(I.created=(new Date).toISOString()),S.resolve(U.data)},function(){S.reject()}),S.promise},report:function(D,S){var U=t.defer();return e.put(scope.apiEndpoint+"assets/"+D.guid+"/report/"+S).then(function(I){U.resolve(I.data)},function(){U.reject()}),U.promise},like:function(D){var S=t.defer();return e.put(scope.apiEndpoint+"assets/"+D+"/like",{ignoreLoadingBar:!0}).then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},updateAssetImageProcessingFocuspoint:function(D,S){var U=t.defer();return e.put(scope.apiEndpoint+"assets/"+D+"/imageprocessing/focuspoint",S).then(function(I){U.resolve()},function(){U.reject()}),U.promise},updateImageText:function(D){var S=t.defer();return e.put(scope.apiEndpoint+"assets/image/"+D.assetImage.guid,D.assetImage).then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},remove:function(D){var S=t.defer();return e.delete(scope.apiEndpoint+"assets/"+D.guid).then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},removeReference:function(D){var S=t.defer();return e.delete(scope.apiEndpoint+"assets/reference/"+D.guid).then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},updateAssetReferenceHideInComments:function(D){var S=t.defer();return e.put(scope.apiEndpoint+"assets/Reference/HideInComments/"+D).then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise}}}]),app.component("assetUserBadge",{templateUrl:"/ClientApp/src/legacy-app/asset/assetUserBadge.html",bindings:{assetText:"<?",assetImage:"<?",assetFile:"<?"},controller:["$state","$scope",function(e,t){var a=this;a.showVerifiedUser=!1,a.isEditorState=e.includes("app.articleEdit")||e.includes("app.staticArticleEditAdmin")||e.includes("app.sponsoredArticleEdit"),a.$onInit=function(){a.assetFile&&a.assetFile.user.isVerifiedUser&&(a.showVerifiedUser=!0),a.assetImage&&a.assetImage.user.isVerifiedUser&&(a.showVerifiedUser=!0),a.assetText&&a.assetText.user.isVerifiedUser&&(a.showVerifiedUser=!0)}}]}),app.controller("pixabaySearchDialog",["$scope","assetContainer","resultCallback",function(e,t,a){e.working=!1,e.error=!1,e.assetContainer=t,e.resultCallback=a,e.dismiss=e.$dismiss()}]),app.factory("pixabayService",["$rootScope","$http","$q","authService",function(e,t,a,n){return{search:function(s,c,d){c||(c=1),d||(d=20);var i=a.defer();return t.post(scope.apiEndpoint+"pixabay/search",{query:s,language:2,page:c,perPage:d}).then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},defaultModel:{articleId:0,blobId:new DevExpress.data.Guid,staticArticleId:0,snipId:0,networkId:0,eventId:new DevExpress.data.Guid,author:"",source:"",sourceUrl:"",text:"",title:""},create:function(s){var c=a.defer();return t.post(scope.apiEndpoint+"pixabay/create",s).then(function(d){c.resolve(d.data)},function(){c.reject()}),c.promise}}}]),app.factory("vimeoService",["$http","$q",function(e,t){return{getVideo:function(n){var u=t.defer();return e.get(scope.apiEndpoint+"vimeo/"+n).then(function(g){u.resolve(g.data)},function(g){u.reject()}),u.promise}}}]),app.controller("AllowPartnerAccessDialog",["$interpolate","$scope","$rootScope","$timeout","profileService","authenticationCallback","formatterService",function(e,t,a,n,u,g,f){t.allowData={hasPartnerAccessAllowed:!1,hasAgb:!1},u.getProfile().then(function(){u.getPartnerAccessAllowData().then(function(r){t.formData={originRegisteredDomain:r.originRegisteredDomain,originRegisteredChapter:r.originRegisteredChapter,originRegisteredPartner:r.originRegisteredPartner,originRegisterdDate:moment(r.registered).format(f.getShortDateFormatString())},t.web_partnerAccessDialog_description=e(scope.currentScope.network.resources.web_partnerAccessDialog_description)({originRegisteredDomain:r.originRegisteredDomain,originRegisteredChapter:r.originRegisteredChapter,originRegisterdDate:moment(r.registered).format(f.getShortDateFormatString())}),t.web_partnerAccessDialog_accessCheckboxDescription_0=e(scope.currentScope.network.resources.web_partnerAccessDialog_accessCheckboxDescription_0)({originRegisteredPartner:r.originRegisteredPartner,partnerCompanyName:scope.currentScope.chapter.partner.companyName}),t.allowPartnerAccess=function(){t.allowData.hasPartnerAccessAllowed&&t.allowData.hasAgb&&u.updatePartnerAccessAllow().then(function(){t.$close(),u.getProfile(!0),g()})}})})}]),app.controller("AuthenticationDialog",["$scope","$rootScope","$location","instagramService","$timeout","authService","profileService","authenticationCallback","facebookSignUpData","login",function(e,t,a,n,u,g,f,r,s,c){e.dialogState={none:0,facebookSignUp:1,login:2},e.changeState=function(d){e.state=d,d===e.dialogState.login&&u(function(){$(".modal").find("input[name='email']").focus()})},e.hasHowto=t.scope.staticArticles.filter(function(d){return"/howto"===d.path}).length>0,e.changeState(s?1:c?2:0),e.signUpData=s||{},e.loginData={userName:"",password:""},e.facebookLogin=function(){g.facebookLogin(t.app).then(function(d){d.token?(angular.extend(e.signUpData,d),e.state=e.dialogState.facebookSignUp):(e.$dismiss(),r())})},e.playVideoTracked=!1,e.playVideo=function(){e.playVideoTracked||window._paq&&(_paq.push(["trackEvent","Conversion","PlayVideo","AuthenticationRequiredDialog"]),e.playVideoTracked=!0)},e.facebookRegister=function(d){d&&g.externalRegister(e.signUpData).then(function(){f.fetchExternalAvatar({providerName:"Facebook"}).then(function(){e.$dismiss(),r()})},function(i){e.error=i.data||scope.currentScope.network.getResourceOrKeyName("web_common_errorOccurred")})},e.instagramLogin=function(){n.getGrant(t.app)},e.showInstagram=n.isAvailable(),e.login=function(d){d&&g.login(e.loginData).then(function(){e.$dismiss(),r()},function(i){e.loginError=i.data||scope.currentScope.network.getResourceOrKeyName("web_common_errorOccurred")})}}]),app.controller("AuthenticationSettingsController",["$scope","$rootScope","$location","$state","$timeout","$uibModal","authService","profileService","instagramService",function(e,t,a,n,u,g,f,r,s){r.getProfile().then(function(i){i.isRegistered||a.path("/").replace()},function(i){a.path("/").replace()}),e.emailValidationState=0,e.emailValidationStates={none:0,inProgress:1,failure:2,success:3},r.getProfile().then(function(i){i.isRegistered&&a.search().token&&(e.emailValidationState=e.emailValidationStates.inProgress,f.validateEmail(a.search().token).then(function(){u(function(){e.emailValidationState=e.emailValidationStates.success},2e3)},function(){u(function(){e.emailValidationState=e.emailValidationStates.failure},2e3)}))});var c={password:"",newPassword:"",confirmPassword:""},d=function(i){e.changePasswordData=angular.copy(c),e.changePasswordMessage=scope.currentScope.network.getResourceOrKeyName("web_authenticationSettings_changePasswordSuccess"),i.$setUntouched(),i.$setPristine()};e.compileErros=function(i){if(i.modelState){var o=[];for(var h in i.modelState)if(i.modelState.hasOwnProperty(h))for(var p=0;p<i.modelState[h].length;p++){var v=i.modelState[h][p];-1===o.indexOf(v)&&o.push(v)}return o.join(" ")}return i},e.cleanChangesMessages=function(){e.changePasswordMessage=null,e.changePasswordError=null},e.changePasswordData=angular.copy(c),e.changePassword=function(i){i.$invalid||(e.cleanChangesMessages(),e.changePasswordData.password?f.changePassword(e.changePasswordData).then(function(){d(i)},function(o){e.changePasswordError=e.compileErros(o.data)}):f.setPassword(e.changePasswordData).then(function(){d(i)},function(o){e.changePasswordError=e.compileErros(o.data)}))},e.facebookLogin=function(){e.linkFacebookError=null,f.facebookLogin(t.app).then(function(i){},function(i){e.linkFacebookError=e.compileErros(i.data)})},e.instagramLogin=function(){s.getGrant()},e.showInstagram=s.isAvailable(),e.deleteAccount=function(){document.body.style="pointer-events: none;",f.deleteAccount().then(function(){Oculus.push(!1,function(){f.logout().then(function(){Oculus.navigate(""),window.location=scope.currentChapter.path+"/login"})})})}}]),app.factory("authService",["$rootScope","$window","$location","$http","$q","$timeout",function(e,t,a,n,u,g){var f={externalAuthData:{}},r=null,s=function(){if(null===r){var D=u.defer();n.get(scope.apiEndpoint+"account/noop").then(function(S){e.scope.profile.loginInfo=S.data,scope.profile.loginInfo=S.data,D.resolve(S)},function(S){D.reject(S)}).finally(function(){r=null}),r=D.promise}return r};s();var h=function(){var D=u.defer();return s().then(function(){n.get(scope.apiEndpoint+"account/logout").then(function(S){e.$emit("authenticationStateChanged"),window.indexedDB.deleteDatabase("chatDb-"+scope.network.id+"-"+scope.currentChapter.id).onerror=I=>{console.error("Error deleting database.")},D.resolve(S)},function(S){D.reject(S)})}).catch(function(S){D.reject(S)}),D.promise},k=function(){var D=u.defer();return n.get(scope.apiEndpoint+"media/token").then(function(S){D.resolve(S.data)},function(){D.reject()}),D.promise},w={url:scope.globalSettings.configurations.apicodoMediaBaseUrl};return k(),f.noop=s,f.register=function(D){var S=u.defer();return s().then(function(){n.post(scope.apiEndpoint+"account/register",D).then(function(U){g(function(){S.resolve(U)})},function(U){S.reject(U)})}).catch(function(U){S.reject(U)}),S.promise},f.externalRegister=function(D){h();var S=u.defer();return s().then(function(){n.post(scope.apiEndpoint+"account/registerexternal",D).then(function(U){e.$emit("authenticationStateChanged"),S.resolve(U)},function(U){S.reject(U)})}).catch(function(U){S.reject(U)}),S.promise},f.login=function(D){var S=u.defer();return s().then(function(){n.post(scope.apiEndpoint+"account/login",D).then(function(U){e.$emit("authenticationStateChanged"),S.resolve(U)},function(U){S.reject(U)})}).catch(function(U){S.reject(U)}),S.promise},f.loginSaml2=function(D){var S=u.defer();return s().then(function(){n.post(scope.apiEndpoint+"account/loginSaml2",D).then(function(U){e.$emit("authenticationStateChanged"),S.resolve(U)},function(U){S.reject(U)})}).catch(function(U){S.reject(U)}),S.promise},f.logout=h,f.facebookLogin=function(D){var S=u.defer(),U=function(I){var m;I&&I.authResponse&&I.authResponse.accessToken?m=I.authResponse.accessToken:S.reject("authentication canceled.");var F={loginProvider:"Facebook",token:m},E=function(V){var q=null;"male"===V.gender?q=1:"female"===V.gender&&(q=0);var O=null;V.birthday&&V.birthday.replace(/\d\d\/\d\d\/(\d\d\d\d)/g,function(P,L){moment().year(),moment(L,"YYYY").year(),O=L});var _=V.email&&V.email.match(/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/)?V.email:null;S.resolve({loginProvider:"Facebook",token:m,email:_,emailConfirmed:_,firstName:V.first_name,lastName:V.last_name,gender:q,genderConfirmed:q,yearOfBirth:O,yearOfBirthConfirmed:O})};s().then(function(){n.post(scope.apiEndpoint+"account/loginexternal",F).then(function(V){e.$emit("authenticationStateChanged"),S.resolve(V)},function(V){404===V.status?D?facebookConnectPlugin.api("me?fields=email,first_name,last_name,gender,birthday",["public_profile","email","user_birthday"],function(q){E(q)},function(q){}):FB.api("/me",{fields:"first_name,email,last_name,gender,birthday"},function(q){E(q)}):S.reject(V)})}).catch(function(V){S.reject(V)})};return D?facebookConnectPlugin.login(["public_profile"],function(I){U(I)},function(m){S.reject("authentication canceled.")}):(FB.init({appId:scope.globalSettings.authenticationFacebookAppId,xfbml:!0,version:"v20.0",status:!0}),FB.login(function(I){U(I)},{scope:"email,public_profile"})),S.promise},f.validateEmail=function(D){var S=u.defer();return n.put(scope.apiEndpoint+"account/email/"+D).then(function(U){S.resolve(U)},function(U){S.reject(U)}),S.promise},f.requestPassword=function(D){var S=u.defer();return n.put(scope.apiEndpoint+"account/RequestPassword",D).then(function(U){S.resolve(U)},function(U){S.reject(U)}),S.promise},f.setPassword=function(D){var S=u.defer();return n.post(scope.apiEndpoint+"account/password",D).then(function(U){S.resolve(U)},function(U){S.reject(U)}),S.promise},f.changePassword=function(D){var S=u.defer();return n.put(scope.apiEndpoint+"account/Password",D).then(function(U){S.resolve(U)},function(U){S.reject(U)}),S.promise},f.deleteAccount=function(){var D=u.defer();return s().then(function(){n.get(scope.apiEndpoint+"account/delete").then(function(S){window.indexedDB.deleteDatabase("chatDb-"+scope.network.id+"-"+scope.currentChapter.id).onerror=I=>{console.error("Error deleting database.")},D.resolve(S)},function(S){D.reject(S)})}).catch(function(S){D.reject(S)}),D.promise},f.changeEmail=function(D){var S=u.defer();return n.post(scope.apiEndpoint+"account/email",D).then(function(U){S.resolve(U)},function(U){S.reject(U.data)}),S.promise},f.getEmails=function(){var D=u.defer();return n.get(scope.apiEndpoint+"account/emails/").then(function(S){D.resolve(S.data)},function(){D.reject()}),D.promise},f.deleteEmail=function(D){var S=u.defer();return n.post(scope.apiEndpoint+"account/email/"+D+"/delete").then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},f.sendEmailVerification=function(D){var S=u.defer();return n.post(scope.apiEndpoint+"account/email/"+D+"/sendVerification").then(function(U){S.resolve(U)},function(U){S.reject(U.data)}),S.promise},f.updateActiveEmail=function(D){var S=u.defer();return n.post(scope.apiEndpoint+"account/email/"+D+"/updateActive").then(function(U){S.resolve(U.data)},function(){S.reject()}),S.promise},f.getApicodoMediaToken=k,f.mediaApiBase=w,f}]),app.component("changeEmailForm",{templateUrl:"/ClientApp/src/legacy-app/authentication/changeEmailForm.html",controller:["$rootScope","authService",function(e,t){var a=this,n={email:"",confirmEmail:""},u=function(){a.newEmail=angular.copy(n)};u(),a.changeEmail=function(g,f){g||a.newEmail.confirmEmail!==a.newEmail.email||t.changeEmail(a.newEmail).then(function(r){a.changeEmailError=null,a.changeEmailSuccess=e.scope.currentScope.network.resources.web_authentication_changeEmailForm_changeEmailSuccessful,u(),f.$setPristine(),f.$setUntouched()},function(r){a.changeEmailError=r,a.changeEmailSuccess=null})}}]}),app.component("emailManagementForm",{templateUrl:"/ClientApp/src/legacy-app/authentication/emailManagementForm.html",controller:["$rootScope","authService","$uibModal",function(e,t,a){var n=this;n.active=!0;var u=function(){t.getEmails().then(function(g){n.emails=g,n.confirmedEmails=[],n.unConfirmedEmails=[],$.each(g,function(f,r){r.active&&(n.activeEmail=r),r.emailConfirmed&&!r.active&&n.confirmedEmails.push(r),!r.emailConfirmed&&r.email&&n.unConfirmedEmails.push(r)})})};n.toggleDropdown=function(){n.active=!n.active},n.sendVerificationDialog=function(g){a.open({templateUrl:"/ClientApp/src/legacy-app/authentication/sendVerificationDialog.html",size:"lg"}).result.then(function(){t.sendEmailVerification(g)})},n.updateActiveEmailDialog=function(g){a.open({templateUrl:"/ClientApp/src/legacy-app/authentication/updateActiveEmailDialog.html",size:"lg"}).result.then(function(){t.updateActiveEmail(g).then(function(){u()})})},n.emailDeleteDialog=function(g){a.open({templateUrl:"/ClientApp/src/legacy-app/authentication/emailDeleteDialog.html",size:"lg"}).result.then(function(){t.deleteEmail(g).then(function(f){u()})})},u()}]}),app.controller("InstagramRegisterFormController",["$scope","authenticationCallback","instagramUserData","instagramService","profileService",function(e,t,a,n,u){e.signUpData=a;var g=function(r,s){return r?r.split(" ")[0]:s},f=function(r){if(r){var s=g(r);return r.replace(s,"")||s}return null};e.instagramRegister=function(r){if(r){var s=g(e.signUpData.data.full_name,e.signUpData.data.username),c={token:e.signUpData.token,loginProvider:"Instagram",Email:e.signUpData.email,Gender:e.signUpData.gender,YearOfBirth:e.signUpData.yearOfBirth,FirstName:s,LastName:f(s)};n.register(c).then(function(){u.fetchExternalAvatar({providerName:"Instagram",token:e.signUpData.token}).then(function(){e.$dismiss(),t()})},function(d){e.error=d.data||scope.currentScope.network.getResourceOrKeyName("web_common_errorOccurred")})}}}]),app.factory("instagramService",["$rootScope","$location","$http","$q","$uibModal",function(e,t,a,n,u){var g=this;g.accessToken=null;var f=function(p){return angular.isDefined(p)&&(g.accessToken=p),g.accessToken},s=function(){var p=n.defer(),v=scope.apiEndpoint+"Account/LoginExternal";return a.post(v,{LoginProvider:"Instagram",Token:g.accessToken}).then(function(){p.resolve({isUserRegister:!0})},function(A){404===A.status?p.resolve({isUserRegister:!1,token:g.accessToken}):p.reject(A)}),p.promise},c=function(){var p=n.defer();return a.get("https://api.instagram.com/v1/users/self/?access_token="+g.accessToken,{withCredentials:!1}).then(function(C){p.resolve(C.data)},function(C){console.error("error",C)}),p.promise};return $.oauthpopup=function(p){p.windowName=p.windowName||"ConnectWithOAuth",p.windowOptions=p.windowOptions||"location=0,status=0,width=800,height=400",p.callback=p.callback||function(){window.location.reload()};var v=this;v._oauthWindow=window.open(p.path,p.windowName,p.windowOptions),v._oauthInterval=window.setInterval(function(){if(v._oauthWindow.closed){var C=localStorage.token;window.clearInterval(v._oauthInterval),p.callback(C)}},1e3)},{getGrant:function(){var v=e.scope.currentScope.isNative?"https://"+e.scope.currentScope.network.domain+e.scope.currentScope.chapter.path:"http://localhost:52392"+e.scope.currentScope.chapter.path;$.oauthpopup({path:"https://instagram.com/oauth/authorize/?client_id="+e.scope.globalSettings.authenticationInstagramAppId+"&redirect_uri="+(v+="/instagram-callback/")+"&response_type=code",windowName:"ConnectToInstagram",callback:function(){var p;p=localStorage.token,f(p),c().then(function(v){s().then(function(C){C.isUserRegister?(e.$emit("authenticationStateChanged"),t.path("/").search("")):u.open({templateUrl:"/ClientApp/src/legacy-app/authentication/instagramRegisterForm.html",controller:"InstagramRegisterFormController",size:"lg",resolve:{instagramUserData:function(){return v.token=C.token,v},authenticationCallback:function(){return function(){e.$emit("authenticationStateChanged"),t.path("/").search("")}}}})},function(C){$scope.error=C.data||"Es ist ein Fehler aufgetreten."})}),localStorage.token=""}})},setToken:f,getUserData:c,login:s,isAvailable:function(){return e.scope.currentScope.network.settings.availableInstagramLogin&&!e.app},register:function(p){var v=n.defer(),C=scope.apiEndpoint+"Account/RegisterExternal";return a.post(C,p).then(function(A){v.resolve(A)},function(A){v.reject(A)}),v.promise}}}]),app.controller("LoginSaml2Controller",["$scope","$rootScope","$location","$state","authService",function(e,t,a,n,u){e.isApp=t.app,e.title="Mit Unternehmenskonto anmelden",e.login=function(){n.go("app.main-login",{closedToken:a.search().token})},e.signUpData={gender:null,yearOfBirth:null,staffNumber:null,isApp:t.app},e.loginError=null,u.loginSaml2(e.signUpData).then(function(g){a.path(scope.currentChapter.path+"/")},function(g){e.loginError=g.data})}]),app.controller("RegisterController",["$interpolate","$scope","$rootScope","$location","$window","authService","$timeout","profileService","$state","registerForNewsletter",function(e,t,a,n,u,g,f,r,s,c){t.signUpData={token:null,email:"",password:"",confirmPassword:"",gender:a.scope.currentScope.chapter.settings.featureRegistrationAgeGender?1:null,yearOfBirth:null,firstName:"",lastName:"",locations:[],isNewsletterSubscribe:!1,closedChapterToken:null},t.registerForNewsletter=c,t.inputType="password",r.getProfile(!0).then(function(i){t.isRegistered=i.isRegistered,t.newsletterSubscribed=!i.unsubscribe,i.isRegistered&&!t.registerForNewsletter&&n.path("/").replace()},function(){n.path("/").replace()}),t.web_register_newsletterIsSubscribedDescription_0=e(scope.currentScope.network.resources.web_register_newsletterIsSubscribedDescription_0)({chapterName:scope.currentScope.chapter.name}),t.web_register_newsletterIsNotSubscribedDescription_0=e(scope.currentScope.network.resources.web_register_newsletterIsNotSubscribedDescription_0)({chapterName:scope.currentScope.chapter.name}),t.web_register_newsletterCheckboxDescription_0=e(scope.currentScope.network.resources.web_register_newsletterCheckboxDescription_0)({chapterName:scope.currentScope.chapter.name}),t.isApp=a.app,t.title=t.registerForNewsletter?scope.currentScope.network.getResourceOrKeyName("web_register_subscribeNewsletter"):scope.currentScope.network.getResourceOrKeyName("web_common_register"),t.signupError=null,t.signUp=function(i){i&&t.signUpData.password===t.signUpData.confirmPassword?(n.search().closedToken&&(t.signUpData.closedChapterToken=n.search().closedToken),g.register(t.signUpData).then(function(){n.path(scope.currentChapter.path+"/account/registration-complete")},function(o){!function(i){if(i.modelState){var o=[];for(var h in i.modelState)if(i.modelState.hasOwnProperty(h))for(var p=0;p<i.modelState[h].length;p++){var v=i.modelState[h][p];-1===o.indexOf(v)&&o.push(v)}t.signupError="Fehler bei der Registrierung: "+o.join(" ")}else i.data?t.signupError=i.data:i.error&&"string"==typeof i.error&&""!==i.error&&(t.signupError=i.error),$ctrl.signupError||(t.signupError="Unknown error");f(function(){var C=$("form[name='signUpForm']").find("div[name='signupError']").not(".ng-hide").first(),A=null;C.length&&!C.visible(!1,!0)?A=C:t.signUpError&&(A=$("form[name='signUpForm']")),A&&$(document.body).animate({scrollTop:A.offset().top-150},1e3)})}(o)})):f(function(){var o=$("form[name='signUpForm']").find(".input-error").not(".ng-hide").first();o.length&&!o.visible(!1,!0)&&$(document.body).animate({scrollTop:o.offset().top-150},1e3)})},t.togglePasswordVisibility=function(){t.inputType="password"==t.inputType?"text":"password"}}]),app.controller("RequestPasswordController",["$rootScope","$scope","$location","authService",function(e,t,a,n){e.profile.isRegistered&&!e.profile.adminSetPassword&&a.path("/").replace(),t.setPasswordData={newPassword:"",confirmPassword:"",passwordRequestToken:null,acceptPrivacyPolicy:!1,title:e.scope.currentScope.network.getResourceOrKeyName("web_requestPassword_pageTitle")},t.requestPasswordData={email:""},a.search().token&&(t.setPasswordData.passwordRequestToken=a.search().token),t.isInvitation=void 0!==a.search().invitation,t.isInitialPasswordChange=void 0!==a.search().initial|e.profile.adminSetPassword,t.isInvitation&&e.scope.currentScope.network.resources.web_requestPassword_pageTitle_Invitation&&(t.setPasswordData.title=e.scope.currentScope.network.resources.web_requestPassword_pageTitle_Invitation),t.showPrivacyPolicy=(t.isInvitation||t.isInitialPasswordChange)&&e.scope.currentChapter.settings.configurations.requirePrivacyPolicyInvitation,t.requestPassword=function(u){u&&n.requestPassword(t.requestPasswordData).then(function(g){a.path(scope.currentChapter.path+"/account/password-requested")},function(g){if(g.modelState){var f=[];for(var r in g.modelState)for(var s=0;s<g.modelState[r].length;s++){var c=g.modelState[r][s];-1==f.indexOf(c)&&f.push(c)}t.error=f.join(" ")}else t.error=g.data})},t.setPassword=function(u){!u||t.setPasswordData.newPassword!==t.setPasswordData.confirmPassword||n.changePassword(t.setPasswordData).then(function(g){e.profile.adminSetPassword&&(e.profile.adminSetPassword=!1),a.path(scope.currentChapter.path+"/account/password-resetted").search("")},function(g){if(g.modelState){var f=[];for(var r in g.modelState)for(var s=0;s<g.modelState[r].length;s++){var c=g.modelState[r][s];-1==f.indexOf(c)&&f.push(c)}t.error=f.join(" ")}else t.error=g.data})}}]),app.controller("AuthorBillingInfoController",["$scope","$rootScope","authorService","profileService","$location",function(e,t,a,n,u){e.author={authorId:null,taxNumber:"",taxIdNumber:"",accountHolder:"",iban:"",bic:"",tax:!1,billingFirstName:"",billingLastName:"",billingCompanyName:"",address:"",city:"",postalCode:null,chapter:null,imprint:{value:""}},e.success=!1,e.fromApply=u.search().fromApply,"Redesign2024"!=t.scope.currentScope.network.settings.configurations.contentRenderEngine&&(n.getProfile().then(function(g){g.isRegistered||u.path("/").replace(),a.getAuthor(g.chapter,g.guid).then(function(f){f.billingFirstName&&(e.author.billingfirstname=f.billingFirstName),f.taxNumber&&(e.author.taxnumber=f.taxNumber),f.taxIdNumber&&(e.author.taxidnumber=f.taxIdNumber),f.accountHolder&&(e.author.accountholder=f.accountHolder),f.bic&&(e.author.bic=f.bic),f.tax&&(e.author.tax=f.tax),f.billingLastName&&(e.author.billinglastname=f.billingLastName),f.billingCompanyName&&(e.author.billingcompanyname=f.billingCompanyName),f.address&&(e.author.address=f.address),f.city&&(e.author.city=f.city),f.postalCode&&(e.author.postalcode=f.postalCode),f.imprint&&(e.author.imprint=f.imprint),f.iban&&(e.author.iban=f.iban),f.iban&&(e.author.ibanshow=f.iban.substr(0,7)+f.iban.substr(7).replace(/.(?=.{4,}$)/g,"*"))})},function(g){u.path("/").replace()}),e.resetValue=function(){e.author.iban=""},e.signUp=function(g){g&&a.updateAuthorBillingInfo(e.author.chapter,e.author).then(function(f){e.success=!0},function(){e.success=!1})})}]),app.controller("AuthorListController",["$scope","authorService",function(e,t){t.getAuthors().then(function(a){e.authors=a}),e.level9Filter=function(){return function(a){return 9==a.levelId}},e.level8Filter=function(){return function(a){return 8==a.levelId}},e.level7Filter=function(){return function(a){return 7==a.levelId}},e.level6Filter=function(){return function(a){return 6==a.levelId}},e.level5Filter=function(){return function(a){return 5==a.levelId}},e.level4Filter=function(){return function(a){return 4==a.levelId}},e.level3Filter=function(){return function(a){return 3==a.levelId}},e.level2Filter=function(){return function(a){return 2==a.levelId}},e.level1Filter=function(){return function(a){return 1==a.levelId}}}]),app.directive("authorListItem",[function(){return{restrict:"E",require:"ngModel",templateUrl:"/ClientApp/src/legacy-app/author/authorListItem.html",replace:!0,scope:!0,link:function(e,t,a){e.$watch(a.ngModel,function(){e.author=e.$eval(a.ngModel)})}}}]),app.controller("DashboardController",["$scope","$rootScope","authorService","articleService","$uibModal","profileService","$location","eventCalendarService",function(e,t,a,n,u,g,f,r){var s=function(){a.getMyArticles().then(function(d){d.applications.forEach(function(h){h.fullPath=t.scope.currentScope.chapter.path+h.path}),d.publishedArticles.forEach(function(h){h.fullPath=t.scope.currentScope.chapter.path+h.path});var o=d.applications,i=d.publishedArticles;o=d.applications,!1!==t.scope.currentScope.network.settings.configurations.enableCalendar&&t.scope.currentScope.chapter.settings.configurations.enableEventCalendar?r.getEventsForAuthorDashboard().then(function(h){h.forEach(function(p){p.fullPath=t.scope.currentScope.chapter.path+"/events/"+p.id,p.isEvent=!0,p.published?i.push(p):(p.accepted=p.created,p.assigned=p.created,o.push(p))}),e.articles=i,e.applications=o}):(e.articles=i,e.applications=o)})},c=t.scope.currentScope.chapter.settings.configurations.eventsBirthdayCalendarConfiguration;e.canCreateEvents=t.profile.isNewsroomAdmin||!c&&t.profile.isMerkuristJournalist||c&&(6===c.MinEventCreationRole&&t.profile.isHeadSales||5===c.MinEventCreationRole&&t.profile.isSales||4===c.MinEventCreationRole&&t.profile.isHeadJournalist||3===c.MinEventCreationRole&&t.profile.isMerkuristJournalist||2===c.MinEventCreationRole&&t.profile.isJournalist),g.getProfile().then(function(d){d.isJournalist||f.path("/").replace();var i=d.guid;e.$watch("profile.guid",function(){i!=d.guid&&f.path("/")}),s(),$(window).bind("focus",function(){s()})},function(d){f.path("/").replace()}),e.noApply=function(d){a.noApplySnip(d).then(function(i){s()})},e.allocate=function(d){a.allocateSnip(d).then(function(i){s()})},e.reject=function(d){a.rejectSnip(d).then(function(i){s()})},e.articleDeleteDialog=function(d){u.open({templateUrl:"/ClientApp/src/legacy-app/author/articleDeleteDialog.html",size:"lg"}).result.then(function(){n.deleteArticle(d).then(function(){s()})})},e.eventDeleteDialog=function(d){u.open({templateUrl:"/ClientApp/src/legacy-app/author/eventDeleteDialog.html",size:"lg"}).result.then(function(){r.deleteEvent(d).then(function(){s()})})},e.createArticle=function(){n.createArticle().then(function(d){f.path(d.path+"/edit")})},e.createEvent=function(){r.createEvent().then(function(d){f.path("/events/"+d+"/edit")})}}]),app.controller("BannerCampaignElasticReportController",["$scope","$rootScope","bannerCampaignService","scopeService","$stateParams","$timeout","$location",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";a.getbannerCampaignByPin(u.pin).then(function(s){e.bannerCampaign=s,e.loaded=!1,a.getElasticReportBannerCalendar(s.pin).then(function(c){s.report=c,s.banners.forEach(function(i){i.imageUrl=n.getGlobalSettings().blobStorageCdnUrl+"/"+n.getGlobalSettings().blobStorageContainerNameShipment+"/"+i.pin+"?preset=shipment"});var d=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}];g(function(){var i,o,h;$.each(c,function(M,T){T.active=!0}),$.each(s.banners,function(M,T){T.active=!0}),c.length>1&&(c.multiChapterShipment=!0);for(var p=[],v=[],C=[],A=new Date(s.start);A<=moment(new Date).startOf("day").add(1,"d").toDate();A.setDate(A.getDate()+1)){var x={start:new Date(A),billableImpressions:0,clicks:0};p.push(x),C[x.start.toDateString()]=x,v.push(x)}var b={impressions:0,billableImpressions:0,viewableImpressionTimeSeconds:0,clicks:0,desktopImpressions:0,mobileImpressions:0,tabletImpressions:0,start:moment(s.start).startOf("day").toDate(),end:moment(new Date).startOf("day").toDate()};e.summary=b;var R=function(){$.each(v,function(M,T){T.clicks=0,T.billableImpressions=0}),b.impressions=0,b.billableImpressions=0,b.viewableImpressionTimeSeconds=0,b.clicks=0,b.desktopImpressions=0,b.mobileImpressions=0,b.tabletImpressions=0,d[0].value=0,d[1].value=0,d[2].value=0,i.validateData(),o.validateData(),h.validateData(),$.each(c,function(M,T){T.active&&$.each(T.reports,function(k,w){var D=!1;$.each(s.banners,function(S,U){U.id===w.bannerId&&U.active&&(D=!0)}),D&&(w.billableImpressionsCalendar.length&&$.each(w.billableImpressionsCalendar,function(S,U){C[new Date(U.day).toDateString()]&&(C[new Date(U.day).toDateString()].billableImpressions+=U.data)}),w.clickCalendar.length&&$.each(w.clickCalendar,function(S,U){C[new Date(U.day).toDateString()]&&(C[new Date(U.day).toDateString()].clicks+=U.data)}),b.impressions+=w.impressions,b.billableImpressions+=w.billableImpressions,b.viewableImpressionTimeSeconds+=w.viewableImpressionTimeSeconds/1e3,b.clicks+=w.clicks,b.desktopImpressions+=w.desktopImpressions,b.mobileImpressions+=w.mobileImpressions,b.tabletImpressions+=w.tabletImpressions)})}),d[0].value=Math.round(100/(b.impressions/b.desktopImpressions)),d[1].value=Math.round(100/(b.impressions/b.mobileImpressions)),d[2].value=Math.round(100/(b.impressions/b.tabletImpressions)),i.validateData(),o.validateData(),h.validateData()};i=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"billableImpressions",toField:"billableImpressions"}],dataProvider:p,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"billableImpressions",valueField:"billableImpressions"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"billableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),o=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"billableImpressions",toField:"billableImpressions"},{fromField:"clicks",toField:"clicks"},{fromField:"clickThroughRate",toField:"clickThroughRate"}],dataProvider:v,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),id:"billableImpressions",type:"smoothedLine",valueField:"billableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clicks",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),h=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}});var y=function(M,T,k){$.each(c,function(w,D){D.chapter=n.getChapter(D.chapterSlug),a.getChapterReport(D.chapter.id,s,T,k).then(function(S){D.reports=S,e.loaded=!0,R(),M&&($.each(D.reports,function(U,I){I.active=!0}),p.length=0,$.each(v,function(U,I){p.push({start:I.start,billableImpressions:I.billableImpressions})}))}),i.validateData(),o.validateData(),h.validateData()})};i.addListener("zoomed",function(M){b.start=moment(i.startDate).startOf("day").toDate(),b.end=moment(i.endDate).startOf("day").toDate(),y(!1,moment(b.start).startOf("day").add(1,"d").toDate(),moment(b.end).startOf("day").add(2,"d").toDate()),o.zoom(b.start,moment(b.end).startOf("day").add(1,"d").toDate())}),e.toggleReport=function(M){$.each(s.banners,function(T,k){k.id===M.id&&(k.active=!k.active)}),R()},e.toggleChapter=function(M){$.each(c,function(T,k){k.chapter.name===M&&(k.active=!k.active)}),R()},y(!0,moment(s.start).startOf("day").toDate(),moment(new Date).startOf("day").add(2,"d").toDate())},function(){e.error=!0})})},function(){f.path("/")})}]),app.controller("bannerCampaignReportController",["$scope","$rootScope","bannerCampaignService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";a.getbannerCampaignByPin(u.pin).then(function(o){e.bannerCampaign=o,a.getreportBannerCalendar(o.pin).then(function(h){h.forEach(function(p){p.chapter=n.getChapter(p.chapterSlug),p.reports.forEach(function(v){v.calendar.forEach(function(C){C.start=moment(C.start.replace("Z","")).toDate(),C.end=moment(C.end.replace("Z","")).toDate()})})}),o.report=h,o.banners.forEach(function(p){p.imageUrl=n.getGlobalSettings().blobStorageCdnUrl+"/"+n.getGlobalSettings().blobStorageContainerNameShipment+"/"+p.pin+"?preset=shipment"}),f(function(){var p,v,C,A,x,b=new Set;$.each(h,function(k,w){w.active=!0,b.add(w.chapter.name)}),h.uniqueChapters=[],b.forEach(function(k){h.uniqueChapters.push(k)}),$.each(o.banners,function(k,w){w.reportActive=!0});var R=[],y=function(){R.length=0,$.each(h[0].reports[0].calendar,function(k,w){R.push({start:w.start,end:w.end,impressions:0,viewableImpressions:0,billableViewableImpressions:0,viewableImpressionTimeSeconds:0,desktopViewableImpressions:0,mobileViewableImpressions:0,tabletViewableImpressions:0,clicks:0,maleViewableImpressions:0,femaleViewableImpressions:0,age1617MaleViewableImpressions:0,age1824MaleViewableImpressions:0,age2534MaleViewableImpressions:0,age3544MaleViewableImpressions:0,age4554MaleViewableImpressions:0,age55MaleViewableImpressions:0,age1617FemaleViewableImpressions:0,age1824FemaleViewableImpressions:0,age2534FemaleViewableImpressions:0,age3544FemaleViewableImpressions:0,age4554FemaleViewableImpressions:0,age55FemaleViewableImpressions:0})}),$.each(h,function(k,w){w.active&&(h[k-1]&&2===h[k-1].chapter.managementState&&2===w.chapter.managementState&&h[k-1].chapter.name!==w.chapter.name&&(h.multiChapterShipment=!0),$.each(w.reports,function(D,S){if(o.banners[D].reportActive){var U=S.banner.pin;$.each(S.calendar,function(I,m){m.pin=U,R[I].impressions+=m.impressions,R[I].viewableImpressions+=m.viewableImpressions,R[I].billableViewableImpressions+=m.billableViewableImpressions,R[I].viewableImpressionTimeSeconds+=m.viewableImpressionTimeSeconds,R[I].desktopViewableImpressions+=m.desktopViewableImpressions,R[I].mobileViewableImpressions+=m.mobileViewableImpressions,R[I].tabletViewableImpressions+=m.tabletViewableImpressions,R[I].clicks+=m.clicks,R[I].maleViewableImpressions+=m.maleViewableImpressions,R[I].femaleViewableImpressions+=m.femaleViewableImpressions,R[I].age1617MaleViewableImpressions+=m.age1617MaleViewableImpressions,R[I].age1824MaleViewableImpressions+=m.age1824MaleViewableImpressions,R[I].age2534MaleViewableImpressions+=m.age2534MaleViewableImpressions,R[I].age3544MaleViewableImpressions+=m.age3544MaleViewableImpressions,R[I].age4554MaleViewableImpressions+=m.age4554MaleViewableImpressions,R[I].age55MaleViewableImpressions+=m.age55MaleViewableImpressions,R[I].age1617FemaleViewableImpressions+=m.age1617FemaleViewableImpressions,R[I].age1824FemaleViewableImpressions+=m.age1824FemaleViewableImpressions,R[I].age2534FemaleViewableImpressions+=m.age2534FemaleViewableImpressions,R[I].age3544FemaleViewableImpressions+=m.age3544FemaleViewableImpressions,R[I].age4554FemaleViewableImpressions+=m.age4554FemaleViewableImpressions,R[I].age55FemaleViewableImpressions+=m.age55FemaleViewableImpressions})}}))}),v.validateData(),p.validateData()},l=h.summary={};p=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"}],dataProvider:R,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"viewableImpressions",valueField:"viewableImpressions"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"viewableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),v=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"billableViewableImpressions",toField:"billableViewableImpressions"},{fromField:"clicks",toField:"clicks"},{fromField:"clickThroughRate",toField:"clickThroughRate"}],dataProvider:R,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),id:"billableViewableImpressions",type:"smoothedLine",valueField:"billableViewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clicks",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),C=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),A=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:s,balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(k,w){return-1*k.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(k){return k<0?-1*k+"":k+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),x=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:s,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}});var T=function(){var k=moment(p.startDate).startOf("day").toDate(),w=moment(p.endDate).startOf("day").add(-1,"d").toDate();(function(k,w){l.maleViewableImpressions=0,l.femaleViewableImpressions=0,l.viewableImpressions=0,l.billableViewableImpressions=0,l.viewableImpressionTimeSeconds=0,l.impressions=0,l.clicks=0,l.desktopViewableImpressions=0,l.mobileViewableImpressions=0,l.tabletViewableImpressions=0,l.age1617MaleViewableImpressions=0,l.age1824MaleViewableImpressions=0,l.age2534MaleViewableImpressions=0,l.age3544MaleViewableImpressions=0,l.age4554MaleViewableImpressions=0,l.age55MaleViewableImpressions=0,l.age1617FemaleViewableImpressions=0,l.age1824FemaleViewableImpressions=0,l.age2534FemaleViewableImpressions=0,l.age3544FemaleViewableImpressions=0,l.age4554FemaleViewableImpressions=0,l.age55FemaleViewableImpressions=0;var D=0,S=0,U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0;l.start=k,l.end=w,$.each(R,function(Z,B){var Q=new Date(B.start);Q<k||Q>w||(l.maleViewableImpressions+=B.maleViewableImpressions,l.femaleViewableImpressions+=B.femaleViewableImpressions,l.viewableImpressions+=B.viewableImpressions,l.billableViewableImpressions+=B.billableViewableImpressions,l.viewableImpressionTimeSeconds+=B.viewableImpressionTimeSeconds,l.impressions+=B.impressions,l.clicks+=B.clicks,D+=B.desktopViewableImpressions,S+=B.mobileViewableImpressions,U+=B.tabletViewableImpressions,I+=B.age1617MaleViewableImpressions,m+=B.age1824MaleViewableImpressions,F+=B.age2534MaleViewableImpressions,E+=B.age3544MaleViewableImpressions,V+=B.age4554MaleViewableImpressions,q+=B.age55MaleViewableImpressions,O+=B.age1617FemaleViewableImpressions,_+=B.age1824FemaleViewableImpressions,P+=B.age2534FemaleViewableImpressions,L+=B.age3544FemaleViewableImpressions,K+=B.age4554FemaleViewableImpressions,J+=B.age55FemaleViewableImpressions)}),l.desktopViewableImpressions=Math.round(100/(l.viewableImpressions/D)),l.mobileViewableImpressions=Math.round(100/(l.viewableImpressions/S)),l.tabletViewableImpressions=Math.round(100/(l.viewableImpressions/U));var j=l.viewableImpressions-(I+m+F+E+V+q+O+_+P+L+K+J);j>100&&(I+=j*t.scope.globalSettings.reportAverageAge1617Male,m+=j*t.scope.globalSettings.reportAverageAge1824Male,F+=j*t.scope.globalSettings.reportAverageAge2534Male,E+=j*t.scope.globalSettings.reportAverageAge3544Male,V+=j*t.scope.globalSettings.reportAverageAge4554Male,q+=j*t.scope.globalSettings.reportAverageAge55Male,O+=j*t.scope.globalSettings.reportAverageAge1617Female,_+=j*t.scope.globalSettings.reportAverageAge1824Female,P+=j*t.scope.globalSettings.reportAverageAge2534Female,L+=j*t.scope.globalSettings.reportAverageAge3544Female,K+=j*t.scope.globalSettings.reportAverageAge4554Female,J+=j*t.scope.globalSettings.reportAverageAge55Female),l.age1617MaleViewableImpressions=Math.round(100/(l.viewableImpressions/I)),l.age1824MaleViewableImpressions=Math.round(100/(l.viewableImpressions/m)),l.age2534MaleViewableImpressions=Math.round(100/(l.viewableImpressions/F)),l.age3544MaleViewableImpressions=Math.round(100/(l.viewableImpressions/E)),l.age4554MaleViewableImpressions=Math.round(100/(l.viewableImpressions/V)),l.age55MaleViewableImpressions=Math.round(100/(l.viewableImpressions/q)),l.age1617FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/O)),l.age1824FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/_)),l.age2534FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/P)),l.age3544FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/L)),l.age4554FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/K)),l.age55FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/J)),l.maleViewableImpressions=Math.round(l.maleViewableImpressions),l.femaleViewableImpressions=Math.round(l.femaleViewableImpressions),c[0].value=l.femaleViewableImpressions,c[1].value=l.maleViewableImpressions,d[0].male=Math.round(-1*l.age1617MaleViewableImpressions),d[1].male=Math.round(-1*l.age1824MaleViewableImpressions),d[2].male=Math.round(-1*l.age2534MaleViewableImpressions),d[3].male=Math.round(-1*l.age3544MaleViewableImpressions),d[4].male=Math.round(-1*l.age4554MaleViewableImpressions),d[5].male=Math.round(-1*l.age55MaleViewableImpressions),d[0].female=Math.round(l.age1617FemaleViewableImpressions),d[1].female=Math.round(l.age1824FemaleViewableImpressions),d[2].female=Math.round(l.age2534FemaleViewableImpressions),d[3].female=Math.round(l.age3544FemaleViewableImpressions),d[4].female=Math.round(l.age4554FemaleViewableImpressions),d[5].female=Math.round(l.age55FemaleViewableImpressions),i[0].value=l.desktopViewableImpressions,i[1].value=l.mobileViewableImpressions,i[2].value=l.tabletViewableImpressions,C.validateData(),A.validateData(),x.validateData(),e.$apply()})(k,w),v.zoom(k,moment(w).add(1,"d").toDate())};p.addListener("zoomed",function(k){T()}),e.toggleReport=function(k){$.each(o.banners,function(w,D){D.pin===k.pin&&(D.reportActive=!D.reportActive)}),f(function(){y(),T()},50)},e.toggleChapter=function(k){$.each(h,function(w,D){D.chapter.name===k&&(D.active=!D.active)}),f(function(){y(),T()},50)},y(),v.validateData(),p.validateNow(),p.setDefaultPeriod()},function(){e.error=!0})})},function(){r.path("/")});var c=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:s,value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],d=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],i=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}]}]),app.factory("bannerCampaignService",["$http","$q","$rootScope","authService","profileService","$location",function(e,t,a,n,u,g){var f=[],d=function(){var h=t.defer();return f.length>0?h.resolve(f):e.get(scope.apiEndpoint+"bannerCampaigns").then(function(p){angular.copy(p.data,f),h.resolve(f)},function(){h.reject()}),h.promise};function i(h){var p=null;return $.each(f,function(v,C){if(C.pin===h)return p=C,!1}),p}return{bannerCampaigns:f,getbannerCampaigns:d,getreportBannerCalendar:function(h){var p=t.defer();return e.get(scope.apiEndpoint+"bannerCampaigns/"+h+"/ReportBannerCalendar").then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise},getbannerCampaignByPin:function(h){var p=t.defer();if(f.length>0){var v=i(h);v?p.resolve(v):e.get(scope.apiEndpoint+"/bannerCampaigns"+h).then(function(C){p.resolve(C.data)},function(){p.reject()})}else d().then(function(){var C=i(h);C?p.resolve(C):e.get(scope.apiEndpoint+"bannerCampaigns/"+h).then(function(A){p.resolve(A.data)},function(){p.reject()})},function(){p.reject()});return p.promise},getElasticReportBannerCalendar:function(h){var p=t.defer();return e.get(scope.apiEndpoint+"bannerCampaigns/"+h+"/Elastic").then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise},getChapterReport:function(h,p,v,C){var A=t.defer();return e.get(scope.apiEndpoint+"bannerCampaigns/chapterReport?chapterId="+h+"&bannerCampaignId="+p.id+"&start="+new Date(v).getTime()+"&end="+new Date(C).getTime()).then(function(x){A.resolve(x.data)},function(){A.reject()}),A.promise}}}]),app.controller("BrochureElasticReportController",["$scope","$rootScope","brochureService","scopeService","$stateParams","$timeout","$location",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var d,i,o,r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}],c=[];e.report=null,e.totalUniqueViewCount=0,e.totalImpressionTime=0,e.totalImpressionCount=0,e.filterDisabled=!1,e.startDay=null,e.endDay=null;var h=function(A){var x=0,b=0,R=0,y=0,l=0,M=0;$.each(A,function(T,k){x+=k.desktopImpressionCount,b+=k.tabletImpressionCount,R+=k.mobileImpressionCount,y+=k.uniqueViews,l+=k.impressionTime,M+=k.impressionCount}),e.$apply(function(){e.totalUniqueViewCount=y,e.totalImpressionTime=l,e.totalImpressionCount=M}),s[0].value=Math.round(100/(M/x)),s[1].value=Math.round(100/(M/R)),s[2].value=Math.round(100/(M/b)),d.validateData()},p=function(){var A=moment(i.startDate).startOf("day").toDate(),x=moment(i.endDate).startOf("day").toDate(),b=e.report.filter(function(R){return R.day>=A&&R.day<=x});h(b),o.zoom(A,moment(x).add(1,"d").toDate()),e.$apply(function(){e.startDay=A,e.endDay=x})};e.filterChapter=function(A){A.filtered=!A.filtered,function(){var A=e.chapters.filter(function(x){return!x.filtered}).map(function(x){return x.id});e.filterDisabled=!0,a.getBrochureReport({specialId:u.id,chapterIds:A}).then(function(x){x.forEach(function(b){b.day=moment(b.day.replace("Z","")).toDate()}),e.report=x,g(function(){(function(A){c.length=0,$.each(A,function(x,b){c.push(b)}),i.validateData(),o.validateData()})(x),p(),e.filterDisabled=!1},50)})}()},e.chapterFilterDisabled=function(A){return e.filterDisabled||1===e.chapters.filter(function(x){return!x.filtered}).length&&!A.filtered},a.getBrochureInfo(u.id).then(function(A){e.brochure=A,a.getBrochureReport({specialId:u.id}).then(function(x){x.forEach(function(R){R.day=moment(R.day.replace("Z","")).toDate()}),e.report=x,e.startDay=x[0].day,e.endDay=x[x.length-1].day;var b=[];$.each(A.chapterSlugs,function(R,y){b.push(n.getChapter(y))}),b=b.filter(function(R){return 2===R.managementState}),e.chapters=b,$.each(x,function(R,y){c.push(y)}),g(function(){d=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),(i=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"}],dataProvider:c,categoryField:"day"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"impressionCount",valueField:"impressionCount"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"impressionCount",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).addListener("zoomed",function(){p()}),o=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"},{fromField:"uniqueViews",toField:"uniqueViews"}],dataProvider:c,categoryField:"day"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.resources.web_report_viewableImpressions,id:"impressionCount",type:"smoothedLine",valueField:"impressionCount",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.resources.web_report_viewableImpressions+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"uniqueViews",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),h(x)})},function(){e.error=!0})})}]),app.controller("BrochureReportController",["$scope","$rootScope","brochureService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0,a.getBrochureInfo(u.id).then(function(i){e.brochure=i,a.getBrochureCalendar(u.id).then(function(o){o.forEach(function(h){h.chapter=n.getChapter(h.chapterSlug),h.report.calendar.forEach(function(p){p.start=moment(p.start.replace("Z","")).toDate(),p.end=moment(p.end.replace("Z","")).toDate()})}),i.chapterReport=o,f(function(){var h,p,v,C,A,x,b=new Set;$.each(o,function(k,w){w.active=!0,b.add(w.chapter.name)}),o.uniqueChapters=[],b.forEach(function(k){o.uniqueChapters.push(k)});var R=[],y=function(){R.length=0,$.each(o[0].report.calendar,function(k,w){R.push({start:w.start,end:w.end,viewableImpressions:0,billableViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueViewableImpressions:0,femaleUniqueViewableImpressions:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueViewableImpressions:0,age1824MaleUniqueViewableImpressions:0,age2534MaleUniqueViewableImpressions:0,age3544MaleUniqueViewableImpressions:0,age4554MaleUniqueViewableImpressions:0,age55MaleUniqueViewableImpressions:0,age1617FemaleUniqueViewableImpressions:0,age1824FemaleUniqueViewableImpressions:0,age2534FemaleUniqueViewableImpressions:0,age3544FemaleUniqueViewableImpressions:0,age4554FemaleUniqueViewableImpressions:0,age55FemaleUniqueViewableImpressions:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0})}),$.each(o,function(k,w){if(w.active){o[k-1]&&2===o[k-1].chapter.managementState&&2===w.chapter.managementState&&o[k-1].chapter.name!==w.chapter.name&&(o.multiChapterShipment=!0);var D=w.report.brochure.Id;$.each(w.report.calendar,function(S,U){U.brochureId=D;var I=R[S];I.viewableImpressions+=U.viewableImpressions,I.activeTimeSeconds+=U.activeTimeSeconds,I.readings+=U.views,I.maleUniqueViewableImpressions+=U.maleViewableImpressions,I.femaleUniqueViewableImpressions+=U.femaleViewableImpressions,I.uniqueReadings+=U.uniqueViews,I.desktopReadings+=U.desktopViews,I.mobileReadings+=U.mobileViews,I.tabletReadings+=U.tabletViews,I.age1617MaleUniqueViewableImpressions+=U.age1617MaleViewableImpressions,I.age1824MaleUniqueViewableImpressions+=U.age1824MaleViewableImpressions,I.age2534MaleUniqueViewableImpressions+=U.age2534MaleViewableImpressions,I.age3544MaleUniqueViewableImpressions+=U.age3544MaleViewableImpressions,I.age4554MaleUniqueViewableImpressions+=U.age4554MaleViewableImpressions,I.age55MaleUniqueViewableImpressions+=U.age55MaleViewableImpressions,I.age1617FemaleUniqueViewableImpressions+=U.age1617FemaleViewableImpressions,I.age1824FemaleUniqueViewableImpressions+=U.age1824FemaleViewableImpressions,I.age2534FemaleUniqueViewableImpressions+=U.age2534FemaleViewableImpressions,I.age3544FemaleUniqueViewableImpressions+=U.age3544FemaleViewableImpressions,I.age4554FemaleUniqueViewableImpressions+=U.age4554FemaleViewableImpressions,I.age55FemaleUniqueViewableImpressions+=U.age55FemaleViewableImpressions})}}),v.validateData(),C.validateData(),A.validateData(),x.validateData()},l=o.summary={};h=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:R,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"uniqueReadings",valueField:"uniqueReadings"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"uniqueReadings",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),p=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:"#00cdbd",fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:R,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:"Wie oft wurde die Prospektseite aufgerufen?",percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_reportBrochure_amountOfViews"),valueField:"uniqueReadings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),v=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),C=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:"#00cdbd",balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(k,w){return-1*k.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(k){return k<0?-1*k+"":k+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),A=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:"#00cdbd",balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),x=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[l],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:"#00cdbd",fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:"#00cdbd",fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:"#00cdbd",fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:"#00cdbd",fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}});var T=function(){var k=moment(h.startDate).startOf("day").toDate(),w=moment(h.endDate).startOf("day").add(-1,"d").toDate();p.zoom(k,moment(w).add(1,"d").toDate()),function(k,w){l.viewableImpressions=0,l.billableViewableImpressions=0,l.activeTimeSeconds=0,l.readings=0,l.uniqueReadings=0,l.uniqueReadingsHavingViewableImpressions=0,l.uniqueReadingPercentageReads=0,l.maleUniqueViewableImpressions=0,l.femaleUniqueViewableImpressions=0,l.desktopReadings=0,l.mobileReadings=0,l.tabletReadings=0,l.age1617MaleUniqueViewableImpressions=0,l.age1824MaleUniqueViewableImpressions=0,l.age2534MaleUniqueViewableImpressions=0,l.age3544MaleUniqueViewableImpressions=0,l.age4554MaleUniqueViewableImpressions=0,l.age55MaleUniqueViewableImpressions=0,l.age1617FemaleUniqueViewableImpressions=0,l.age1824FemaleUniqueViewableImpressions=0,l.age2534FemaleUniqueViewableImpressions=0,l.age3544FemaleUniqueViewableImpressions=0,l.age4554FemaleUniqueViewableImpressions=0,l.age55FemaleUniqueViewableImpressions=0,l.uniqueReadingPercentage24Reads=0,l.uniqueReadingPercentage2549Reads=0,l.uniqueReadingPercentage5074Reads=0,l.uniqueReadingPercentage75100Reads=0;var D=0,S=0,U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0;l.start=k,l.end=w,$.each(R,function(B,Q){var X=new Date(Q.start);X<k||X>w||(l.viewableImpressions+=Q.viewableImpressions,l.activeTimeSeconds+=Q.activeTimeSeconds,l.readings+=Q.readings,l.maleUniqueViewableImpressions+=Q.maleUniqueViewableImpressions,l.femaleUniqueViewableImpressions+=Q.femaleUniqueViewableImpressions,l.uniqueReadings+=Q.uniqueReadings,D+=Q.desktopReadings,S+=Q.mobileReadings,U+=Q.tabletReadings,I+=Q.age1617MaleUniqueViewableImpressions,m+=Q.age1824MaleUniqueViewableImpressions,F+=Q.age2534MaleUniqueViewableImpressions,E+=Q.age3544MaleUniqueViewableImpressions,V+=Q.age4554MaleUniqueViewableImpressions,q+=Q.age55MalUniqueeViewableImpressions,O+=Q.age1617FemaleUniqueViewableImpressions,_+=Q.age1824FemaleUniqueViewableImpressions,P+=Q.age2534FemaleUniqueViewableImpressions,L+=Q.age3544FemaleUniqueViewableImpressions,K+=Q.age4554FemaleUniqueViewableImpressions,J+=Q.age55FemaleUniqueViewableImpressions)});var j=D+S+U;l.desktopReadings=Math.round(100/(j/D)),l.mobileReadings=Math.round(100/(j/S)),l.tabletReadings=Math.round(100/(j/U)),l.maleUniqueViewableImpressions=Math.round(l.maleUniqueViewableImpressions),l.femaleUniqueViewableImpressions=Math.round(l.femaleUniqueViewableImpressions),s[0].value=l.femaleUniqueViewableImpressions,s[1].value=l.maleUniqueViewableImpressions;var Z=l.viewableImpressions-(I+m+F+E+V+q+O+_+P+L+K+J);Z>100&&(I+=Z*t.scope.globalSettings.reportAverageAge1617Male,m+=Z*t.scope.globalSettings.reportAverageAge1824Male,F+=Z*t.scope.globalSettings.reportAverageAge2534Male,E+=Z*t.scope.globalSettings.reportAverageAge3544Male,V+=Z*t.scope.globalSettings.reportAverageAge4554Male,q+=Z*t.scope.globalSettings.reportAverageAge55Male,O+=Z*t.scope.globalSettings.reportAverageAge1617Female,_+=Z*t.scope.globalSettings.reportAverageAge1824Female,P+=Z*t.scope.globalSettings.reportAverageAge2534Female,L+=Z*t.scope.globalSettings.reportAverageAge3544Female,K+=Z*t.scope.globalSettings.reportAverageAge4554Female,J+=Z*t.scope.globalSettings.reportAverageAge55Female),l.age1617MaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/I)),l.age1824MaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/m)),l.age2534MaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/F)),l.age3544MaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/E)),l.age4554MaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/V)),l.age55MaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/q)),l.age1617FemaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/O)),l.age1824FemaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/_)),l.age2534FemaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/P)),l.age3544FemaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/L)),l.age4554FemaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/K)),l.age55FemaleUniqueViewableImpressions=Math.round(100/(l.viewableImpressions/J)),c[0].male=Math.round(-1*l.age1617MaleUniqueViewableImpressions),c[1].male=Math.round(-1*l.age1824MaleUniqueViewableImpressions),c[2].male=Math.round(-1*l.age2534MaleUniqueViewableImpressions),c[3].male=Math.round(-1*l.age3544MaleUniqueViewableImpressions),c[4].male=Math.round(-1*l.age4554MaleUniqueViewableImpressions),c[5].male=Math.round(-1*l.age55MaleUniqueViewableImpressions),c[0].female=Math.round(l.age1617FemaleUniqueViewableImpressions),c[1].female=Math.round(l.age1824FemaleUniqueViewableImpressions),c[2].female=Math.round(l.age2534FemaleUniqueViewableImpressions),c[3].female=Math.round(l.age3544FemaleUniqueViewableImpressions),c[4].female=Math.round(l.age4554FemaleUniqueViewableImpressions),c[5].female=Math.round(l.age55FemaleUniqueViewableImpressions),d[0].value=l.desktopReadings,d[1].value=l.mobileReadings,d[2].value=l.tabletReadings,v.validateData(),C.validateData(),A.validateData(),x.validateData(),e.$apply()}(k,w)};h.addListener("zoomed",function(k){T()}),e.toggleChapter=function(k){$.each(o,function(w,D){D.chapter.name===k&&(D.active=!D.active)}),f(function(){y(),T()},50)},y(),p.validateNow(),h.validateNow(),h.setDefaultPeriod(),T()},function(){e.error=!0})})},function(){r.path("/")});var s=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:"#00cdbd",value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],c=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],d=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}]}]),app.factory("brochureService",["$http","$q","$rootScope",function(e,t,a){var n=[],u=[];return a.$on("$locationChangeSuccess",function(){n.length=0,u.length=0}),{getBrochure:function(d){var i=t.defer();return d?e.get(scope.apiEndpoint+"brochures/"+d).then(function(o){i.resolve(o.data)},function(){i.reject()}):n.length>0?i.resolve(n.splice(0,1)[0]):u.push(i),i.promise},getBrochureInfo:function(d){var i=t.defer();return e.get(scope.apiEndpoint+"brochures/"+d+"/ReportInfo").then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},getBrochureCalendar:function(d){var i=t.defer();return e.get(scope.apiEndpoint+"brochures/"+d+"/ReportCalendar").then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},getBrochureReport:function(d){var i=t.defer();return e.post(scope.apiEndpoint+"brochures/report",d).then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},resolve:function(d,i){var o=t.defer();return u.length>d&&(d=u.length),e.get(scope.apiEndpoint+"brochures/"+d+"/"+i).then(function(h){o.resolve(h.data),n.length=0,n.push.apply(n,h.data),u.forEach(function(p){n.length>0?p.resolve(n.splice(0,1)[0]):p.reject()}),u.length=0},function(){o.reject()}),o.promise}}}]),app.controller("CampaignController",["$rootScope","$scope","campaignService","profileService","$timeout","$location","$q",function(e,t,a,n,u,g,f){e.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage,n.getProfile().then(function(r){r.isAdvertiser||g.path("/").replace();var s=r.guid;e.$watch("profile.guid",function(){s!==r.guid&&g.path("/")})},function(){g.path("/").replace()}),e.data=a,e.isBusy=!0,e.articleFilter=function(r){return r.coverAssetReference},e.advertisementFilter=function(r){return!r.deleted&&!r.hidden},f.all([a.getBannerCampaigns(),a.getMarketResearchs(),a.getSparticleCampaigns(),a.getSpecials(),a.getBrochures(),a.getPremiums(),a.getSupers()]).then(function(){e.isBusy=!1})}]),app.factory("campaignService",["$http","$q",function(e,t){var a=[],n=[],u=[],g=[],f=[],r=[],s=[],c=[],o=function(){var k=t.defer();return a.length>0?k.resolve(a):e.get(scope.apiEndpoint+"campaigns").then(function(w){angular.copy(w.data,a),k.resolve(a)},function(){k.reject()}),k.promise};function M(k){var w=null;return $.each(a,function(D,S){if(S.pin==k)return w=S,!1}),w}return{campaigns:a,specials:r,brochures:s,bannerCampaigns:n,premiums:g,supers:c,marketResearchs:u,sparticleCampaigns:f,getCampaigns:o,getSpecials:function(){var k=t.defer();return r.length>0?k.resolve(r):e.get(scope.apiEndpoint+"specials").then(function(w){angular.copy(w.data,r),k.resolve(r)},function(){k.reject()}),k.promise},getBrochures:function(){var k=t.defer();return s.length>0?k.resolve(s):e.get(scope.apiEndpoint+"brochures").then(function(w){angular.copy(w.data,s),k.resolve(s)},function(){k.reject()}),k.promise},getBannerCampaigns:function(){var k=t.defer();return n.length>0?k.resolve(n):e.get(scope.apiEndpoint+"bannerCampaigns").then(function(w){angular.copy(w.data,n),k.resolve(n)},function(){k.reject()}),k.promise},getMarketResearchs:function(){var k=t.defer();return u.length>0?k.resolve(u):e.get(scope.apiEndpoint+"marketResearch").then(function(w){angular.copy(w.data,u),k.resolve(u)},function(){k.reject()}),k.promise},getPremiums:function(){var k=t.defer();return g.length>0?k.resolve(g):e.get(scope.apiEndpoint+"premiums").then(function(w){angular.copy(w.data,g),k.resolve(g)},function(){k.reject()}),k.promise},getSupers:function(){var k=t.defer();return c.length>0?k.resolve(c):e.get(scope.apiEndpoint+"super").then(function(w){angular.copy(w.data,c),k.resolve(c)},function(){k.reject()}),k.promise},getCampaignByPin:function(k){var w=t.defer();if(a.length>0){var D=M(k);D?w.resolve(D):e.get(scope.apiEndpoint+"campaigns/"+k).then(function(S){w.resolve(S.data)},function(){w.reject()})}else o().then(function(){var S=M(k);S?w.resolve(S):e.get(scope.apiEndpoint+"campaigns/"+k).then(function(U){w.resolve(U.data)},function(){w.reject()})},function(){w.reject()});return w.promise},createAdvertisement:function(k,w){var D=t.defer();return e.post(scope.apiEndpoint+"advertisements",w).then(function(S){k.advertisements.push(S.data),D.resolve(S.data)},function(S){D.reject(S)}),D.promise},deleteAdvertisement:function(k,w){var D=t.defer();return w.deleted=(new Date).getUTCDate(),e.delete(scope.apiEndpoint+"advertisements/"+w.pin).then(function(S){angular.copy(S.data,w),D.resolve(S)},function(){k.deleted=null,D.reject()}),D.promise},updateAdvertisement:function(k){var w=t.defer();return e.put(scope.apiEndpoint+"advertisements",k).then(function(D){angular.copy(D.data,k),w.resolve(D.data)},function(){w.reject()}),w.promise},getReportAdvertisementCalendar:function(k){var w=t.defer();return e.get(scope.apiEndpoint+"campaigns/"+k+"/ReportAdvertisementCalendar").then(function(D){w.resolve(D.data)},function(){w.reject()}),w.promise},getReportContentMarketingCalendar:function(k){var w=t.defer();return e.get(scope.apiEndpoint+"campaigns/"+k+"/ReportContentMarketingCalendar").then(function(D){w.resolve(D.data)},function(){w.reject()}),w.promise},getSparticleCampaigns:function(){var k=t.defer();return f.length>0?k.resolve(f):e.get(scope.apiEndpoint+"sponsoredArticleCampaigns").then(function(w){angular.copy(w.data,f),k.resolve(f)},function(){k.reject()}),k.promise}}}]),app.factory("clickService",["$http","$q",function(e,t){var a=function(l,M,T){var k=t.defer();return e.get(scope.apiEndpoint+l+M+"/"+T).then(function(w){k.resolve(w.data)},function(){k.reject()}),k.promise},n=function(l,M,T){var k=t.defer();return e.post(scope.apiEndpoint+l+M+"/"+T).then(function(w){k.resolve(w.data)},function(){k.reject()}),k.promise};return{clickArticle:function(l,M){return a("click/article/",l,M)},clickBanner:function(l,M){return a("click/banner/",l,M)},clickBannerPost:function(l,M){return n("click/banner/",l,M)},clickDocument:function(l){var M=t.defer();return e.get(scope.apiEndpoint+"click/document/"+l).then(function(T){M.resolve(T.data)},function(){M.reject()}),M.promise},clickFile:function(l){var M=t.defer();return e.get(scope.apiEndpoint+"click/file/"+l).then(function(T){M.resolve(T.data)},function(){M.reject()}),M.promise},clickPremium:function(l,M){return a("click/premiumBanner/",l,M)},clickPremiumPost:function(l,M){return n("click/premiumBanner/",l,M)},clickSnip:function(l,M){return a("click/snip/",l,M)},clickSpecial:function(l,M){return a("click/special/",l,M)},clickSpecialPost:function(l,M){return n("click/special/",l,M)},clickSponsoredArticle:function(l,M){return a("click/sponsoredarticle/",l,M)},clickSuper:function(l,M){return a("click/superBanner/",l,M)},clickSuperPost:function(l,M){return n("click/superBanner/",l,M)},clickSurveyBanner:function(l){return a("click/surveyBanner/",l)},clickSurveyBannerPost:function(l,M){return n("click/surveyBanner/",l,M)},clickNotification:function(l){var M=t.defer();return e.get(scope.apiEndpoint+"click/notification/"+l).then(function(T){M.resolve(T.data)},function(){M.reject()}),M.promise},clickBreaking:function(l){var M=t.defer();return e.get(scope.apiEndpoint+"click/breaking/"+l).then(function(T){M.resolve(T.data)},function(){M.reject()}),M},clickAssetReference:function(l,M){return a("click/assetReference/",l,M)}}}]),app.controller("ClosedChapterController",["$scope","$rootScope","$timeout","profileService","companyNewsService","$window","$location","$uibModal","$state","closedChapterService","authService","localStorageService",function(e,t,a,n,u,g,f,r,s,c,d,i){if(e.working=!1,e.success=!1,e.title=t.scope.currentScope.chapter.name,e.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage,e.showBackButton=!1,""!=t.scope.currentScope.chapter.path&&t.scope.network.chapters.length>0){var o=t.scope.network.chapters.filter(function(p){return 2==p.managementState&&"/"==p.path});e.showBackButton=o.length<1}var h=f.search().returnUrl;h&&window.sessionStorage.setItem("returnUrl",h),e.login=function(){s.go("app.main-login",{closedToken:f.search().token})},e.register=function(){s.go("app.register",{closedToken:f.search().token})},e.goBackToLanding=()=>{window.location.href=t.scope.network.path+"?ignoreFavoriteChapter=true"},e.hasRequest=!1,c.hasChapterRequest().then(function(p){e.hasRequest=p}),c.getRSS().then(function(p){e.feedArticles=p}),u.getCompanyNews().then(function(p){e.companyNews=p}),e.reload=function(){g.location.reload()},e.request=function(){c.getChapterRequest().then(function(){e.hasRequest=!0})},n.getProfile().then(function(p){e.profile=p,p.hasChapterAccess&&f.path("/").replace(),f.search().token&&p.isRegistered?(e.working=!0,c.consumeChapterUserToken(f.search().token).then(function(){e.consumeError=!1,a(function(){e.working=!1,e.success=!0,g.location.reload()},1e3)},function(){e.working=!1,e.consumeError=!0})):p.hasChapterAccess&&f.path("/").replace()}),e.privateLogOut=function(){const p=t.scope.currentChapter.closed;d.logout().then(function(){Oculus.navigate(""),p?window.location.href="/"!==t.scope.currentChapter.path?t.scope.currentChapter.path+"/login":"/login":(null!==t.scope.currentScope.network.settings.sharedAppLogoutUrl&&(window.location.href=t.scope.currentScope.network.settings.sharedAppLogoutUrl),t.app?window.location.href="/":s.go("app.main-login"))})},e.logout=function(){i.oculusOptOut?e.privateLogOut():Oculus.push(!1,e.privateLogOut())}}]),app.factory("closedChapterService",["$http","$q",function(e,t){return{getChapterRequest:function(){var f=t.defer();return e.get(scope.apiEndpoint+"closedChapter/request").then(function(r){f.resolve()}),f.promise},hasChapterRequest:function(){var f=t.defer();return e.get(scope.apiEndpoint+"closedChapter/hasRequest").then(function(r){f.resolve(r.data)}),f.promise},consumeChapterUserToken:function(f){var r=t.defer();return e.put(scope.apiEndpoint+"closedChapter/"+f).then(function(s){r.resolve(s)},function(){r.reject()}),r.promise},getRSS:function(){var f=t.defer();return e.get(scope.apiEndpoint+"closedChapter/RSS").then(function(r){f.resolve(r.data)}),f.promise}}}]),app.directive("a",["$state","$rootScope","$location","$timeout",function(e,t,a,n){return{restrict:"E",link:function(u,g){t.app&&$(g).click(function(f){if("_blank"===$(g).attr("target")){f.preventDefault();var r=$(g).attr("href");let d=!1;if(r.match("https?://(.*/)?"+location.hostname+".*"))d=!0;else try{new URL(r),d=!1}catch{r.match("^(?:https?:)?//.*")||(d=!0)}if(d)r.startsWith("/click/")?n(function(){a.url(r)}):-1!==r.indexOf("/document/")||-1!==r.indexOf("/pdf/")?e.go("app.documentDownload",{id:/[^/]*$/.exec(r)[0]}):-1!==r.indexOf("/file/")?e.go("app.fileDownload",{id:/[^/]*$/.exec(r)[0]}):t.scope.currentChapter.path.length>1?r.startsWith(t.scope.currentScope.network.path+t.scope.currentChapter.path)?n(function(){a.url(r.replace(t.scope.currentScope.network.path+t.scope.currentChapter.path,""))}):window.location.href=r:(chapters=t.scope.chapters.filter(function(i){return 2===i.managementState&&i.path!=t.scope.currentChapter.path}),chapters.forEach(function(i){r.startsWith(t.scope.currentScope.network.path+i.path)&&(window.location.href=r)}),n(function(){a.url(r.replace("https://"+location.hostname,""))}));else if(typeof cordova<"u"){let i=t.scope.currentScope.network.settings.configurations.inAppBrowserOnly;var s="location=no,toolbarposition=top,toolbartranslucent=no";"android"===cordova.platformId&&(s="location=yes,hideurlbar=yes,zoom=no,closebuttoncaption="+t.scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption"));var c="_blank";(!i||r.match("mailto:.*")||r.match("tel:.*"))&&(c="_system"),cordova.InAppBrowser.open(r,c,s)}else console.log("external link: error while calling in app browser"),window.open(r,"_blank")}})}}}]),app.directive("amchart",function(){var e=!1;return{restrict:"A",scope:{config:"="},link:function(t,a,n){e&&e.destroy(),(e=new AmCharts.makeChart(a[0],t.config||{})).pathToImages="/content/amcharts/images/",n.chart&&(t.$parent[n.chart]=e)}}}),function(){"use strict";angular.module("angular-loading-bar",["cfp.loadingBarInterceptor"]),angular.module("chieffancypants.loadingBar",["cfp.loadingBarInterceptor"]),angular.module("cfp.loadingBarInterceptor",["cfp.loadingBar"]).config(["$httpProvider",function(e){e.interceptors.push(["$q","$cacheFactory","$timeout","$rootScope","$log","cfpLoadingBar",function(a,n,u,g,f,r){var i,s=0,c=0,d=r.latencyThreshold;function o(){u.cancel(i),r.complete(),c=0,s=0}function h(p){var v,C=n.get("$http"),A=e.defaults;(p.cache||A.cache)&&!1!==p.cache&&("GET"===p.method||"JSONP"===p.method)&&(v=angular.isObject(p.cache)?p.cache:angular.isObject(A.cache)?A.cache:C);var x=void 0!==v&&void 0!==v.get(p.url);return void 0!==p.cached&&x!==p.cached?p.cached:(p.cached=x,x)}return{request:function(p){return!p.ignoreLoadingBar&&!h(p)&&(g.$broadcast("cfpLoadingBar:loading",{url:p.url}),0===s&&(i=u(function(){r.start()},d)),s++,r.set(c/s)),p},response:function(p){return p&&p.config?(!p.config.ignoreLoadingBar&&!h(p.config)&&(c++,g.$broadcast("cfpLoadingBar:loaded",{url:p.config.url,result:p}),c>=s?o():r.set(c/s)),p):(f.error("Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"),p)},responseError:function(p){return p&&p.config?(!p.config.ignoreLoadingBar&&!h(p.config)&&(c++,g.$broadcast("cfpLoadingBar:loaded",{url:p.config.url,result:p}),c>=s?o():r.set(c/s)),a.reject(p)):(f.error("Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"),a.reject(p))}}}])}]),angular.module("cfp.loadingBar",[]).provider("cfpLoadingBar",function(){this.includeSpinner=!0,this.includeBar=!0,this.latencyThreshold=100,this.startSize=.02,this.parentSelector="body",this.spinnerTemplate='<div id="loading-bar-spinner"><div class="spinner-icon"></div></div>',this.loadingBarTemplate='<div id="loading-bar"><div class="bar"><div class="peg"></div></div></div>',this.$get=["$injector","$document","$timeout","$rootScope",function(e,t,a,n){var u,c,d,g=this.parentSelector,f=angular.element(this.loadingBarTemplate),r=f.find("div").eq(0),s=angular.element(this.spinnerTemplate),i=!1,o=0,h=this.includeSpinner,p=this.includeBar,v=this.startSize;function A(l){i&&(r.css("width",100*l+"%"),o=l,a.cancel(c),c=a(function(){x()},250))}function x(){if(!(b()>=1)){var l,M=b();l=M>=0&&M<.25?(3*Math.random()+3)/100:M>=.25&&M<.65?3*Math.random()/100:M>=.65&&M<.9?2*Math.random()/100:M>=.9&&M<.99?.005:0,A(b()+l)}}function b(){return o}function R(){o=0,i=!1}return{start:function C(){u||(u=e.get("$animate"));var l=t.find(g).eq(0);a.cancel(d),!i&&(n.$broadcast("cfpLoadingBar:started"),i=!0,p&&u.enter(f,l,angular.element(l[0].lastChild)),h&&u.enter(s,l,angular.element(l[0].lastChild)),A(v))},set:A,status:b,inc:x,complete:function y(){u||(u=e.get("$animate")),n.$broadcast("cfpLoadingBar:completed"),A(1),a.cancel(d),d=a(function(){var l=u.leave(f,R);l&&l.then&&l.then(R),u.leave(s)},500)},includeSpinner:this.includeSpinner,latencyThreshold:this.latencyThreshold,parentSelector:this.parentSelector,startSize:this.startSize}}]})}(),app.component("apicodoChapterGroups",{templateUrl:"/ClientApp/src/legacy-app/common/apicodoChapterGroups.html",bindings:{},controller:["$scope","$rootScope","$state","$timeout","translationService",function(e,t,a,n,u){if((e=this).show=!1,e.chapterPath="",e.chapterGroupChapters=[],e.showEvent=!1,e.swiperInitialized=!1,t.scope.currentScope.chapter.settings.configurations.enableChapterGroupsDisplay){if(e.chapterPath=t.scope.currentScope.chapter.path,e.chapterPath.endsWith("/")&&(e.chapterPath=e.chapterPath.substring(0,e.chapterPath.length-1)),t.scope.currentScope.chapter.chapterGroups)for(var g=t.scope.currentScope.chapter.chapterGroups.sort(function(c,d){return c.order-d.order}),f=0;f<g.length;f++)g[f].isFrontpageMenuStrip&&(e.chapterGroupChapters=e.chapterGroupChapters.concat(g[f].chapters.sort(function(c,d){return c.order-d.order})),e.show=e.chapterGroupChapters.length>0);if(e.shouldShowIcon=t.scope.currentChapter.settings.configurations.eventsBirthdayCalendarConfiguration&&1===t.scope.currentChapter.settings.configurations.eventsBirthdayCalendarConfiguration.CalendarLocation,e.shouldShowIcon&&(t.scope.currentChapter.settings.configurations.enableBirthdayCalendar||t.scope.currentChapter.settings.configurations.enableEventCalendar||t.scope.currentChapter.settings.configurations.enableEventArticles)&&(e.showEvent=!0),e.show=e.chapterGroupChapters.length>0,e.show){var s=[];for(f=0;f<e.chapterGroupChapters.length;f++)s.push(e.chapterGroupChapters[f].shortName);u.translateByUserLanguageCode(s).then(c=>{for(var d=0;d<e.chapterGroupChapters.length;d++)e.chapterGroupChapters[d].translatedName=c[d].translation,e.chapterGroupChapters[d].shortName=c[d].translation;e.show=e.chapterGroupChapters.length>0})}e.swiperInitialized||n(function(){e.swiperInitialized=new Swiper(".swiper-container",{slidesPerView:"auto",direction:"horizontal",navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})})}}]}),app.component("apicodoHeader",{templateUrl:"/ClientApp/src/legacy-app/common/apicodoHeader.html",bindings:{mobile:"<",searchGuid:"=?"},controller:["$scope","$rootScope","$state","$window","$location","$timeout","searchService","profileService","logoService","translationService","notificationService",function(e,t,a,n,u,g,f,r,s,c,d){function h(p){t.$apply(function(){angular.element(p.target).hasClass("searchbar")||(e.show=!1,n.removeEventListener("click",h))})}(e=this).guid="",e.focusIndex=-1,e.focusIndexMax=0,e.displayedItems=null,e.emptyResult=!1,e.searchGuid="",e.networkIconBigUrl=s.getNetworkIconBigUrl(),e.notification=d,e.showSnipMenuItem=t.showSnipSlide,e.customHeaderIconOrText=[],e.quadraticLogoEnabled=t.scope.network.settings.configurations.enableQuadraticNetworkLogo,e.multiLanguageTranslationSystemIsEnabled=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,e.small=ResponsiveBootstrapToolkit.is("<=xs"),e.isApp=t.app,$(window).resize(function(){e.small=ResponsiveBootstrapToolkit.is("<=xs")}),0!==t.scope.currentScope.chapter.settings.featureTranslationProvider&&(angular.element(document).ready(function(){e.availableTargetLanguages=[],$(".search-container"),$(".header-language-switch"),$(".header-language-icon"),c.getAvailableTargetLanguages().then(function(A){for(var x in A)e.availableTargetLanguages.push({languageCode:x})}),e.selectedTargetLanguage=t.profile.favoriteLanguage,t.$on("$stateChangeSuccess",function(){e.selectedTargetLanguage=t.profile.favoriteLanguage})}),e.translate=function(){moment.locale(e.selectedTargetLanguage),t.$broadcast("apicodo.translate",e.selectedTargetLanguage)}),t.scope.currentChapter.settings.configurations.custom_Header_Icon_Or_Text&&(e.customHeaderIconOrText=t.scope.currentChapter.settings.configurations.custom_Header_Icon_Or_Text.filter(function(p){return 1==p.Status})),e.showCalendarIcon=!1,e.shouldShowIcon=t.scope.currentChapter.settings.configurations.eventsBirthdayCalendarConfiguration&&0===t.scope.currentChapter.settings.configurations.eventsBirthdayCalendarConfiguration.CalendarLocation,e.shouldShowIcon&&(t.scope.currentChapter.settings.configurations.enableBirthdayCalendar||t.scope.currentChapter.settings.configurations.enableEventCalendar||t.scope.currentChapter.settings.configurations.enableEventArticles)&&(e.showCalendarIcon=!0),r.getProfile().then(function(p){e.guid=p.guid}),e.switchChapter=t.switchChapter,e.scope=t.scope,e.query=function o(){return a.includes("app.search")?u.search().q:""}(),e.hits=null,e.show=!1,e.search=function(){a.includes("app.search")?u.search("q",e.query):""===e.query?e.hits=null:f.search(e.query).then(function(p){e.show=!0,e.focusIndexMax=0,e.focusIndex=-1,e.emptyResult=!1,e.displayedItems=[],angular.forEach(p.articles,function(v,C){C<5&&(v.article.focusIndex=e.focusIndexMax,e.focusIndexMax++,e.displayedItems.push(v))}),0===e.focusIndexMax&&(e.focusIndexMax=1,e.emptyResult=!0),e.hits=p,t.scope.currentScope.network.settings.isStaffDirectoryEnabled&&f.getStaffDirectoryUsers(e.query).then(function(v){angular.forEach(v,function(C,A){A<5&&(C.focusIndex=e.focusIndexMax,e.focusIndexMax++,e.displayedItems.push(C))}),0===e.focusIndexMax&&(e.focusIndexMax=1),e.staffDirectoryUserHits=v})})},t.$on("keydown",function(p,v,C){if(!a.includes("app.search")&&(27===v&&(e.show&&(e.show=!1,C.preventDefault(),t.$apply()),C.preventDefault()),40===v&&(e.focusIndex===e.focusIndexMax&&(e.focusIndex=-1),e.focusIndex=e.focusIndex+1,C.preventDefault(),t.$apply()),38===v&&(e.focusIndex>-1&&(e.focusIndex=e.focusIndex-1,t.$apply()),C.preventDefault()),13===v&&-1!==e.focusIndex)){if(0===e.focusIndex&&e.emptyResult)return a.go("app.main-snips"),e.clear(),void C.preventDefault();if(e.focusIndex===e.focusIndexMax)return a.go("app.search",{q:e.query}),e.clear(),void C.preventDefault();var A=e.displayedItems[e.focusIndex];if(A.slug)return t.switchChapter(A.slug),e.clear(),void C.preventDefault();if(A.levelId)return a.go("app.public-profile",{id:A.guid}),e.clear(),void C.preventDefault();if(A.articleListDisplayableType){switch(A.articleListDisplayableType){case 4:a.go("app.snipDetail",{id:A.id});break;case 1:a.go("app.articleDetail",{id:A.id});break;default:a.go("app.sponsoredArticleDetail",{id:A.id})}return e.clear(),void C.preventDefault()}}}),e.focusItem=function(p){e.focusIndex=p.focusIndex},e.focusShowmore=function(){e.focusIndex=e.focusIndexMax},e.focusNewSnip=function(){e.focusIndex=0},e.clear=function(){e.query="",e.hits=null,e.focusIndexMax=0,e.focusIndex=-1,e.emptyResult=!1,e.displayedItems=[]},e.openSearch=function(){e.show=!0,e.show&&g(function(){n.addEventListener("click",h)})},e.details=function(){a.includes("app.search")||(a.go("app.search",{q:e.query}),e.query="",e.hits=null)},e.goSnips=function(){a.go("app.main-snips")}}]}),app.directive("authorizedClick",["profileService","$uibModal","$analytics","$timeout",function(e,t,a,n){return{restrict:"A",link:function(u,g,f){var r=null;u.$watch("element[0].onclick",function(){g[0].onclick&&(r=g[0].onclick,g[0].onclick=null)});var s=$._data($(g)[0]).events;s&&s.click&&s.click.reverse(),g.on("click",function(c){if(!e.profile.isRegistered){c.stopImmediatePropagation();var d=function(){n(function(){e.profile.isRegistered&&$(g).click()},900,!1)};return t.open({templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationDialog.html",controller:"AuthenticationDialog",size:"lg",resolve:{authenticationCallback:function(){return d},facebookSignUpData:!1,login:!1}}),a.eventTrack("ShowAuthenticationRequiredDialog",{category:"Conversion",label:f.authorizedClickSource}),!1}if(!e.profile.hasPartnerAccessAllowed){c.stopImmediatePropagation();var i=function(){n(function(){e.profile.hasPartnerAccessAllowed&&$(g).click()},900,!1)};return t.open({templateUrl:"/ClientApp/src/legacy-app/authentication/allowPartnerAccessDialog.html",controller:"AllowPartnerAccessDialog",size:"lg",resolve:{authenticationCallback:function(){return i}}}),!1}r&&r.call(g,c)}),s&&s.click&&s.click.reverse()}}}]),app.directive("automaticFocus",["$timeout",function(e){return{restrict:"A",link:function(t,a){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||e(function(){$(a).focus()})}}}]),app.directive("autosize",["$timeout",function(e){return{restrict:"A",link:function(t,a,n,u){var g;e(function(){autosize(a),g&&g()}),$(a).parents(".modal").on("shown.bs.modal",function(f){var r=document.createEvent("Event");r.initEvent("autosize.update",!0,!1),a[0].dispatchEvent(r)}),/firefox/i.test(navigator.userAgent)&&(g=function(f){if(!a.val()){a.val(a.prop("placeholder")),a.css("color","#7F7F7F");var r=document.createEvent("Event");r.initEvent("autosize.update",!0,!1),a[0].dispatchEvent(r),e(function(){a.val(""),a.css("color","")})}},$(a).on("input",g),$(window).on("resize",g))}}}]),app.directive("birthYearValidation",function(){return{require:"ngModel",link:function(e,t,a,n){n.$parsers.unshift(function(u){if(null==u)return"";var g=u.replace(/[^0-9]/g,"");return g!=u&&(n.$setViewValue(g),n.$render()),g}),n.$parsers.push(function(u){if(!u)return null;var g=parseInt(u.toString().replace(/[^0-9]/g,""));return g!=u&&(n.$setViewValue(g),n.$render()),parseInt(g)}),n.$parsers.push(function(u){if(!u||4!=u.toString().length||0!==u.toString().lastIndexOf("20",0)&&0!==u.toString().lastIndexOf("19",0))return n.$setValidity("year",!1),u;n.$setValidity("year",!0);var g=moment().year()-moment(u.toString(),"YYYY").year();return n.$setValidity("age",!(g<0)),g>120&&n.$setValidity("year",!1),u})}}}),app.component("chapterLogo",{templateUrl:"/ClientApp/src/legacy-app/common/chapterLogo.html",bindings:{},controller:["$rootScope","logoService",function(e,t){var a=this;a.showChapterSwitch=e.scope.currentScope.network.chapters.filter(function(n){return 2===n.managementState}).length>1,a.quadraticLogoEnabled=e.scope.network.settings.configurations.enableQuadraticNetworkLogo,a.hasChapterLogo=t.hasChapterLogo(e.scope.currentScope.chapter),a.hasChapterLogoDark=t.hasChapterLogoDark(e.scope.currentScope.chapter),a.networkLogoUrl=t.getNetworkLogoUrl(),a.networkLogoDarkUrl=t.getNetworkLogoDarkUrl(),a.chapterLogoUrl=t.getChapterLogoUrl(),a.chapterLogoDarkUrl=t.getChapterLogoDarkUrl()}]}),app.directive("chart",function(){return{restrict:"E",template:"<canvas></canvas>",scope:{chartObject:"=value"},link:function(a,n,u){var r,g=n.find("canvas")[0],f=g.getContext("2d"),s={type:u.type||"Line",width:u.width||600,height:u.height||400};g.width=s.width,g.height=s.height,r=new Chart(f),a.$watch(function(){return n.attr("type")},function(d){d&&(s.type=d,r[s.type](a.chartObject.data,a.chartObject.options))}),a.$watch(function(){return a.chartObject},function(d){d&&r[s.type](a.chartObject.data,a.chartObject.options)})}}}),app.directive("compile",["$compile",function(e){return{scope:!0,link:function(t,a,n){var u;n.$observe("template",function(g){u=e(g)(t),a.html(""),a.append(u)})}}}]),app.directive("compileHtml",["$compile",function(e){return{restrict:"A",scope:{compileHtml:"="},link:function(t,a){t.$watch("compileHtml",function(n){if(console.log("COMPILE HTML",n),n){var u=e(n)(t.$parent);angular.element(u).find("a").each(function(){var f=angular.element(this);f.attr("target")||f.attr("target","_blank")}),a.empty().append(u)}})}}}]),app.component("customChapterLogo",{templateUrl:"/ClientApp/src/legacy-app/common/customChapterLogo.html",bindings:{},controller:["$scope","$rootScope","scopeService","logoService",function(e,t,a,n){var u=this;u.isManagedAlone=1===t.scope.currentScope.network.chapters.filter(function(){return 2===this.managementState}).length,u.chapterLogoUrl=n.getChapterLogoUrl(t.scope.currentScope.chapter),u.hasChapterLogo=n.hasChapterLogo()}]}),app.directive("ellipsis",["$timeout",function(e){return{restrict:"A",link:function(t,a){e(function(){$(a).ellipsis({responsive:!0})})}}}]),app.directive("emailValidation",function(){var e=/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;return{require:"ngModel",link:function(t,a,n,u){u.$parsers.unshift(function(g){if(e.test(g))return u.$setValidity("email",!0),g;u.$setValidity("email",!1)})}}}),app.service("fileUploadService",["$http","$q",function(e,t){this.uploadFileToUrl=function(a,n){var u=t.defer(),g=new FormData;return g.append("file",a),e.post(n,g,{transformRequest:angular.identity,headers:{"Content-Type":void 0}}).then(function(f){u.resolve(f)}).error(function(){u.reject()}),u.promise}}]),app.factory("formatterService",["$location","scopeService","$rootScope",function(e,t,a){var n=a.scope.network.settings.languagePack.split("-")[0];return null!=a.scope.profile.activeUserLanguage?.vendorLanguageCode&&n!=a.scope.profile.activeUserLanguage?.vendorLanguageCode&&(n=a.scope.profile.activeUserLanguage?.vendorLanguageCode),{getShortDateFormatString:function(){return moment.localeData(n).longDateFormat("L")},getShortDateTimeFormatString:function(){return moment.localeData(n).longDateFormat("L")+" "+moment.localeData(n).longDateFormat("LT")},momentFromNowAsString:function(c){var d=new moment(c,"YYYY-MM-DD HH:mm:ss","en");return moment.locale(n),(c=d.locale(a.scope.profile.activeUserLanguage?.vendorLanguageCode?a.scope.profile.activeUserLanguage?.vendorLanguageCode:n)).fromNow()},momentFromNowTimeout:function(c){var d=moment.duration(moment().diff(c)).asMinutes(),i=1e4;return d>10?i=3e5:d>1&&(i=6e4),i},eventCalendarFormatAsString:c=>{var d=new moment(c,"YYYY-MM-DD HH:mm:ss","en");return moment.locale(n),(c=d.locale(a.scope.profile.activeUserLanguage?.vendorLanguageCode?a.scope.profile.activeUserLanguage?.vendorLanguageCode:n)).format("dd, ll")}}}]),app.directive("iframeSetDimensionsOnload",[function(){return{restrict:"A",link:function(e,t,a){t.on("load",function(){var n=t[0],u=n.contentDocument?n.contentDocument:n.contentWindow.document;n.style.visibility="hidden",n.style.height="10px";var g=getDocHeight(u);g<200&&(g=250,console.log("Unable to determine iframe height. Fallback to 250 px.")),n.style.height=g+4+"px",n.style.visibility="visible"})}}}]),app.directive("imageLoad",function(){return{restrict:"A",link:function(e,t,a){t.on("load",function(){e.$apply(a.imageLoad)})}}}),app.service("imageUrlBuilderService",["$rootScope",function(e){return this.createCdnImageUrl=function(a,n){return a?e.scope.globalSettings.blobStorageCdnUrl+"/"+e.scope.globalSettings.blobStorageContainerNameImage+"/"+a+"?"+n:null},this}]),app.directive("integer",function(){return{require:"ngModel",link:function(e,t,a,n){n.$parsers.unshift(function(u){return parseInt(u)})}}}),app.directive("keyTrap",["$rootScope",function(e){return function(t,a){a.bind("keydown",function(n){e.$broadcast("keydown",n.keyCode,n)})}}]),function(){function e(t){return["$rootScope","$window","$log",function(a,n,u){var g;try{g=n[t]}catch{g={}}for(var s,c,i,f=g,r={$default:function(o){for(var h in o)angular.isDefined(r[h])||(r[h]=o[h]);return r},$reset:function(o){for(var h in r)"$"===h[0]||delete r[h];return r.$default(o)}},d=0;d<f.length;d++)try{(i=f.key(d))===i&&(r[i]=angular.fromJson(f.getItem(i)))}catch{}return s=angular.copy(r),a.$watch(function(){c||(c=setTimeout(function(){if(c=null,!angular.equals(r,s)){for(var o in angular.forEach(r,function(h,p){angular.isDefined(h)&&"$"!==p[0]&&f.setItem(p,angular.toJson(h)),delete s[p]}),s)f.removeItem(o);s=angular.copy(r)}},100))}),"localStorage"===t&&n.addEventListener&&n.addEventListener("storage",function(o){if(o.newValue)try{r[o.key]=angular.fromJson(o.newValue)}catch{r[o.key]=o.newValue}else delete r[o.key];s=angular.copy(r),a.$apply()}),r}]}app.factory("localStorageService",e("localStorage")).factory("sessionStorageService",e("sessionStorage"))}(),app.factory("markdownConverterService",["$rootScope","$http","$q","authService",function(e,t,a,n){var u=TurndownService;u.addRule&&u.addRule("emptyLine",{filter:function(s){return"p"===s.nodeName.toLowerCase()&&"<br>"===s.innerHTML},replacement:function(){return"<br>"}}),showdown.setOption("simpleLineBreaks",!0),showdown.setOption("strikethrough",!0);var g=new showdown.Converter({simpleLineBreaks:!0,strikethrough:!0});return{toMarkdown:function(s){return u.turndown(s||"")},toHtml:function(s){var c=g.makeHtml(s);return c&&(c=c.replace(new RegExp("\\r?\\n","g"),"")),c}}}]),app.directive("metaArticle",MetaArticleDirective),MetaArticleDirective.$inject=["metaService"],app.directive("metaEvent",MetaEventDirective),MetaEventDirective.$inject=["metaService"],app.directive("metaHead",["metaService",function(e){return{restrict:"E",link:function(t,a,n){t.$watch(function(){return n.title+n.description+t.$eval(n.article)+n.article},function(){(n.title||n.description)&&e.push(n.title,n.description)}),a.remove()}}}]),app.directive("metaSnip",MetaSnipDirective),MetaSnipDirective.$inject=["metaService"],app.directive("metaSponsoredArticle",MetaSponsoredArticleDirective),MetaSponsoredArticleDirective.$inject=["metaService"],app.directive("metaStaticArticle",MetaStaticArticleDirective),MetaStaticArticleDirective.$inject=["metaService"],app.directive("minCapitals",function(){return{restrict:"A",require:"ngModel",link:function(e,t,a,n){n.$validators.minCapitals=function(u){return!!(n.$isEmpty(u)||(u.match(/[A-Z]/g)||[]).length>=a.minCapitals)}}}}),app.directive("minNumbers",function(){return{restrict:"A",require:"ngModel",link:function(e,t,a,n){n.$validators.minNumbers=function(u){return!!(n.$isEmpty(u)||(u.match(/[0-9]/g)||[]).length>=a.minNumbers)}}}}),app.directive("minSpecialChars",function(){return{restrict:"A",require:"ngModel",link:function(e,t,a,n){n.$validators.minSpecialChars=function(u){return!!(n.$isEmpty(u)||(u.match(/[^A-Za-z0-9]/g)||[]).length>=a.minSpecialChars)}}}}),app.directive("momentFromNow",["$interval","$timeout","$rootScope",function(e,t,a){return{restrict:"A",scope:!1,link:function(n,u,g){var f,r;function s(){var c=a.scope.network.settings.languagePack.split("-")[0];if(null!=a.scope.profile.activeUserLanguage?.vendorLanguageCode&&c!=a.scope.profile.activeUserLanguage?.vendorLanguageCode&&(c=a.scope.profile.activeUserLanguage?.vendorLanguageCode),!r){var d=new moment(g.momentFromNow,"ddd MMM DD YYYY HH:mm:ss","en");moment.locale(c),r=d.locale(c||"de")}var i=r.fromNow();u[0].innerText=i,u[0].textContent=i;var o=moment.duration(moment().diff(r)).asMinutes(),h=1e4;o>10?h=3e5:o>1&&(h=6e4),f=t(function(){s()},h,!1)}t(function(){s()}),u.on("$destroy",function(){t.cancel(f)})}}}]),app.directive("noReturn",function(){return{require:"ngModel",link:function(e,t,a,n){t.keypress(function(u){return"13"!=u.which}),n.$parsers.unshift(function(u){if(null==u)return"";var g=u.replace("\r","").replace("\n"," ");return g!=u&&(n.$setViewValue(g),n.$render()),g})}}}),app.component("oha",{templateUrl:"/ClientApp/src/legacy-app/common/oha.html",bindings:{snip:"<",article:"<",assetReference:"<",size:"@",source:"@"},controller:["$rootScope","$element","$timeout","$analytics","snipService","articleService","assetService",function(e,t,a,n,u,g,f){var r=this;r.profile=e.profile;var c,d,s=t,i=s.find(".oha-text"),o=s.find(".oha-score-tspan");r.isArticle=!1,r.isSnip=!1,r.isAssetReference=!1,r.isDisabled=!1,r.isPreview=!1,r.isLoading=!1,r.showLikes=!1,r.showScore=!0,r.showComponent=!0,r.ohaAdditionalClass="",r.ohaName=e.scope.currentScope.network.getResourceOrKeyName("web_common_oha"),r.ohaName&&r.ohaName.startsWith("<span ")&&r.ohaName.endsWith("</span>")&&(r.ohaName=r.ohaName.replace("</span>","</tspan>"),r.ohaName=r.ohaName.replace("<span ","<tspan ")),this.$onInit=function(){r.article?(r.isArticle=!0,r.showLikes=e.scope.currentScope.chapter.settings.enableOhaLikes,r.showScore=!e.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig||e.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig<1,r.showComponent=!e.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig||e.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig<2,c=r.article,d=g):r.snip?(r.isSnip=!0,r.showLikes=e.scope.currentScope.chapter.settings.enableOhaLikes,r.showScore=!e.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig||e.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig<1,r.showComponent=!e.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig||e.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig<2,c=r.snip,d=u):r.assetReference&&(r.isAssetReference=!0,c=r.assetReference,r.showScore=!e.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig||e.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig<1,r.showComponent=!e.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig||e.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig<2),e.scope.network.settings.configurations.ohaConfigurationModel&&e.scope.network.settings.configurations.ohaConfigurationModel.useIcon&&(r.ohaAdditionalClass=e.scope.network.settings.configurations.ohaConfigurationModel.additionalClass,r.ohaName=String.fromCharCode(e.scope.network.settings.configurations.ohaConfigurationModel.charCode)),r.isAnimated=!r.isAssetReference&&!r.showLikes&&"ArticleDisplayable"!==r.source&&"xs"!==r.size,r.isTransitioned=!r.isAssetReference&&"ArticleDisplayable"!==r.source,r.isDisabled=!r.isAssetReference&&(c.archived||c.deleted),r.isPreview=r.isArticle&&c.isPreview,r.size=r.size?r.size:"md"},r.getReferenceScore=function(){return c?r.isAssetReference||r.showLikes?c.likes:c.score<1?c.score:1:0},r.getScore=function(){if(r.isDisabled||!c||typeof c.likes>"u")return"...";if(!r.isAssetReference&&!r.showLikes){var p=c.score;return(p<1?100*p:100).toFixed(p<1?1:0).replace(/\./g,",")}return c.likes.toString()},r.iLike=function(){return c?c.iLike:null},r.oha=function(){if(!(r.isDisabled||e.profile.readOnlyMode||r.isPreview||r.isLoading)&&c)if(r.isTransitioned||(r.isTransitioned=!0),r.isLoading=!0,i.addClass("oha-loading").removeClass("oha-liked"),c.iLike=!c.iLike,r.isAssetReference)f.like(c.guid).then(function(C){r.animateOhaButton(C.likes)},function(){c.iLike=!c.iLike,r.animateOhaButton(c.score)});else{var p=c.score,v=c.likes;c.iLike&&a(function(){r.animateOhaPlanet(0)}),d.like(c.id).then(function(C){var A=C.score,x=C.likes;n.eventTrack("o-ha!",{category:"Interaction",label:r.source,value:c.iLike?1:0}),r.showLikes?((c.iLike&&v>x||!c.iLike&&v<x)&&(x=v),r.animateOhaButton(x)):((c.iLike&&p>A||!c.iLike&&p<A)&&(A=p),r.animateOhaButton(A<1?A:1))},function(){c.iLike=!c.iLike,r.animateOhaButton(r.showLikes?v:p)})}},r.animateOhaButton=function(p){if(c){var v=!r.isAssetReference&&c.iLike?750:0,C=!r.isAssetReference&&c.iLike?500:0;a(function(){r.showLikes?c.likes=p:c.score=p,v?(o.text(r.showLikes?p:(100*p).toFixed(p<1?1:0)),i.addClass("oha-liked"),o.counterUp({delay:25,time:C,formatter:function(A){return A.replace(/\./g,",")},callback:function(){r.isLoading=!1,a(function(){i.removeClass("oha-liked")},500)}})):(r.isAssetReference||r.showLikes?c.likes=p:c.score=p,r.isLoading=!1),i.removeClass("oha-loading")},v)}},r.getStrokeDashoffset=function(p){return 102.1-(102.1*p).toFixed(0)},r.getRotateDegrees=function(p){return 360*p},r.animateOhaPlanet=function(p){if(c){s.find(".oha-outer").css("stroke-dashoffset",r.getStrokeDashoffset(p));var C=s.find(".oha-rotate");C.css("transform","rotateZ("+r.getRotateDegrees(p)+"deg)"),C.attr("transform","rotate("+r.getRotateDegrees(p)+")"),a(function(){c.score=p},500)}}}]}),app.directive("onReturn",["$parse",function(e){return{scope:!1,link:function(t,a,n,u){var g;n.onReturn&&(g=e(n.onReturn)),a.keypress(function(f){return"13"!=f.which||!(f.ctrlKey||""!==n.onReturnRequireCtrl&&"true"!==n.onReturnRequireCtrl)||(g&&g(t),!1)}),u&&u.$parsers&&u.$parsers.unshift(function(f){if(null==f)return"";var r=f.replace("\r","").replace("\n"," ");return r!=f&&(u.$setViewValue(r),u.$render()),r})}}}]),app.directive("page",["$interpolate","$rootScope",function(e,t){return{templateUrl:"/ClientApp/src/legacy-app/common/page.html",restrict:"E",transclude:!0,link:function(a,n,u){var r;if(u.pageTitle&&(a.title=e(u.pageTitle)()),a.isApp=t.app,(r=window.navigator.userAgent).indexOf(" Android ")>-1&&r.indexOf("Version/")>-1&&parseFloat((r.match("Android ([0-9.]+)")||[])[1])<=4.4){var f=$(window).height()-51;$(".app-mobile .pageWrapper").css("height",f+"px")}}}}]),app.factory("parserService",["$location","profileService","localStorageService","articleService","$rootScope","$timeout",function(e,t,a,n,u,g){return{postProcessHtml:function(r){if(r&&r.content){r.processedContent=r.content.replace(/(<p>)?!\[(.+?)\](<\/p>)?/gi,function(v,C,A,x){return"<asset asset-reference=\"resolveAsset('"+A+'\')" data-guid="'+A+'" article="article" snip="snip" sponsored-article="sponsoredArticle" static-article="staticArticle"></asset>'}),r.processedContent=r.processedContent.replace(/(<p><\/p>)+/gi,function(){return"<p></p>"});var s=document.createElement("div");s.innerHTML=r.processedContent;var c=0;$(s).children("blockquote").each(function(v,C){if(!($(C).children("blockquote").length>0)){var A=0;if($(C).nextAll().each(function(b,R){if("p"!==$(R).prop("tagName").toLowerCase())return!1;A+=$(R).text().length}),1.5*$(C).text().length<A){var x=++c%2>0;$(C).addClass("allow-float"),x?$(C).addClass("allow-float-right"):$(C).addClass("allow-float-left")}}});for(var d=0;d<r.assetReferences.length;d++)null!==r.assetReferences[d].assetImage&&2===r.assetReferences[d].assetImage.type&&$(s).find("asset[data-guid='"+r.assetReferences[d].guid+"']").attr("data-type","2");$(s).find(":not(asset[data-type='2']) + asset[data-type='2'], asset[data-type='2']:first-of-type").each(function(){$(this).nextUntil(":not(asset[data-type='2'])").addBack().wrapAll('<div class="asset-image-gallery asset-image-gallery-article" />')}),$(s).find(".asset-image-gallery asset").each(function(){$(this).attr("image-gallery-item-index",$(this).index())});var i=/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i;if($(s).find(".call-to-action").each(function(){var v=$.trim($(this).text());null!==i.exec(v)&&$(this).html('<img ng-src="'+u.scope.globalSettings.blobStorageCdnUrl+"/"+u.scope.globalSettings.blobStorageContainerNameImage+"/"+v+'?preset=focus&amp;cache=0">').addClass("call-to-action-assetImage")}),r.sponsored||navigator.userAgent&&-1!==navigator.userAgent.toLowerCase().indexOf("googlebot")||scope.currentChapter.scopeStaticArticlesDictionary[e.$$path.replace(scope.currentChapter.path,"")])r.shipmentsPlaced=0;else{var o=$(s).children("p");r.shipmentsPlaced=0;var h=0;(function(){var v=[],C=[],A=1,x=3;o.length<=3&&(A=0,x=2);for(var b=A;b<o.length;b++)0===$(o[b]).next().length||"div"!==$(o[b]).next().prop("tagName").toLowerCase()&&"asset"!==$(o[b]).next().prop("tagName").toLowerCase()&&!$(o[b]).text().trim().endsWith(":")&&!$(o[b]).next().hasClass("allow-float")||"h3"===$(o[b]).next().prop("tagName").toLowerCase()?v.push(b):"div"!==$(o[b]).next().prop("tagName").toLowerCase()&&!$(o[b]).text().trim().endsWith(":")&&!$(o[b]).next().hasClass("allow-float")&&C.push(b);if(0===v.length&&0===C.length)return 0;if(0===v.length)$(o[C[0]]).next().after("<delivery article='article' />"),r.shipmentsPlaced++,h=C[0];else if(1===v.length)if(C.length>0)if(v[0]+1>=o.length/2&&C[0]<v[0])$(o[C[0]]).next().after("<delivery article='article' />"),r.shipmentsPlaced++,h=C[0],v[0]-C[0]>=x&&($(o[v[0]]).after("<delivery article='article' />"),r.shipmentsPlaced++,h=v[0]);else{$(o[v[0]]).after("<delivery article='article' />"),r.shipmentsPlaced++,h=v[0];for(var R=v[0],y=0;y<C.length;y++)if(!(Math.abs(C[y]-R)<x)){$(o[C[y]]).next().after("<delivery article='article' />"),r.shipmentsPlaced++,h=C[y];break}}else $(o[v[0]]).after("<delivery article='article' />"),r.shipmentsPlaced++,h=v[0];else{h=A-x,v[0]+1>=o.length/2&&C[0]<v[0]&&C[0]>=A&&($(o[C[0]]).next().after("<delivery article='article' />"),r.shipmentsPlaced++,h=C[0]);for(var l=0;l<v.length;l++)if(!(v[l]-h<x)){if($(o[v[l]]).after("<delivery article='article' />"),r.shipmentsPlaced++,3===r.shipmentsPlaced)break;h=v[l]}}})(),r.shipmentsPlaced<2&&h<o.length-1&&($(s).append("<delivery article='article' />"),r.shipmentsPlaced++)}4!==r.articleListDisplayableType&&a.enableArticleExitRates&&t.getProfile().then(function(v){v.isAdmin&&n.getExitRates(r.articleId).then(function(C){C.forEach(function(A,x){var b=0===x?1:C[x-1].word+1,R=C[x+1]?A.word:-1,y=$(s).find(":not(iframe)").contents().filter(function(){return 3===this.nodeType}).sort(function(M,T){return M===T?0:M.compareDocumentPosition?2&M.compareDocumentPosition(T)?1:-1:M.sourceIndex-T.sourceIndex}).toArray(),l=0;y.forEach(function(M){var T=$(M).text().split(/(\s)/),k=[],w=[];if(T.forEach(function(S){S.trim()?++l<b||R-l<0&&-1!==R?w.push(S):k.push(S):l<b||R-l<0&&-1!==R?w.push(S):k.push(S)}),k.length){var D='<span class="exit-rate" style="background-color: rgba(204, 0, 0, '+A.rate/100+');" uib-tooltip="Absprungrate: '+A.rate+'%">'+k.join("")+"</span>";w.length&&(D+=w.join("")),$(M).replaceWith(D),r.processedContent=s.innerHTML}})})})}),$(s).find("a:not([target])").attr("target","_blank"),r.processedContent=s.innerHTML,r.postProcessed=!0}}}}]),app.directive("photoswipe",["$timeout","$location","$rootScope","$window",function(e,t,a,n){return{link:function(u,g,f){var r;a.$watch(function(){return t.search().zoom},function(s){!s&&r&&r.close()}),$(g).parents("asset").wrap('<div class="asset-image-gallery-item"/>'),e(function(){var s=$(g).parents(".asset-image-gallery"),c=s.find("[photoSwipe]"),i=c.index(g);if(0===i&&s.addClass("asset-image-gallery-"+c.length),-1!==i&&($(g).on("click",function(h){h.preventDefault();var p=[];c.each(function(A,x){if(!0===$(x).data("gallery-item")){var b=$(x).parent().find(".imageInfo-title"),R=$(x).parent().find(".imageInfo-source"),y=[b.html(),R.html()].filter(Boolean).join(" - "),l=$(x).parentsUntil(".asset-image-gallery").find("asset-user-badge");l.length>0&&(y+="<br>"+$("<div />").append(l.clone()).html()),p.push({src:$(x).data("image"),w:$(x).data("width"),h:$(x).data("height"),title:y})}});var v={index:i%=p.length,history:!1,closeOnScroll:!1,preload:[2,2],isClickableElement:function(){return!0}},C=document.querySelectorAll(".pswp")[0];(r=new PhotoSwipe(C,PhotoSwipeUI_Default,p,v)).listen("gettingData",function(A,x){if(x.w<1||x.h<1){var b=new Image;b.onload=function(){x.w=this.width,x.h=this.height,r.updateSize(!0)},b.src=x.src}}),r.listen("initialZoomIn",function(){bodyScrollLock.disableBodyScroll($(".pswp")),$("button.oha").css("pointer-events","none")}),r.listen("destroy",function(){bodyScrollLock.clearAllBodyScrollLocks(),e(function(){$("button.oha").css("pointer-events","all"),t.search().zoom&&n.history.back()},200)}),r.init(),e(function(){t.search("zoom",!0)})}),3===i&&c.length>4)){var o=c.length-4;g.find(".asset-image-gallery-overlay").text("+"+o).addClass("asset-image-gallery-overlay-visible")}})}}}]),app.run(["$rootScope","$window","profileService","$location","$analytics",function(e,t,a,n,u){e.$on("$viewContentLoaded",function(){t._paq&&a.getProfile().then(function(g){t._paq.push(["setCustomVariable",1,"guid",g.guid,"visit"]),t._paq.push(["setCustomVariable",2,"isRegistered",g.isRegistered,"visit"]),t._paq.push(["setCustomVariable",3,"isJournalist",g.isJournalist,"visit"]),t._paq.push(["setCustomVariable",4,"isMerkuristJournalist",g.isMerkuristJournalist,"visit"]),t._paq.push(["setCustomVariable",5,"isAdvertiser",g.isAdvertiser,"visit"]),u.pageTrack(u.settings.pageTracking.basePath+e.scope.currentChapter.path+n.url(),n)})})}]),app.component("propertyGrid",{bindings:{staffdata:"=",isReadonly:"<",userId:"<",api:"=",loadFunction:"<",saveFunction:"<",gridOnInit:"&",noGroups:"<",noHelp:"<"},templateUrl:"/ClientApp/src/legacy-app/common/propertyGrid.html",controller:["$location","$element","$scope","translationService","$rootScope","$sanitize",function(e,t,a,n,u,g){var f=this;function r(){var p=$(t).jqPropertyGrid("get");f.saveFunction(f.userId,p).then(function(v){f.staffDirectoryData=v,i=f.staffDirectoryData.data,h=f.staffDirectoryData.metaData,$(t).jqPropertyGrid(i,{isReadonly:f.isReadonly,meta:h,customTypes:d,postCreateInitFuncs:[]})},function(v){alert("Staff dir NOT saved")})}function s(){alert("Staff dir loaded")}this.$onInit=function(){f.api={},f.api.save=r,f.api.load=s,f.api.getData=function(){return $(t).jqPropertyGrid("get")},0==f.isReadonly&&(a.$parent.$parent.$parent.gridApi=f.api),f.loadFunction(f.userId).then(function(p){f.staffDirectoryData=p;var v=u.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==v){var C=u.scope.profile,A=u.scope.network.settings.languagePack.split("-")[0];if(null!=C.activeUserLanguage?.vendorLanguageCode&&A!=C.activeUserLanguage?.vendorLanguageCode){i=f.staffDirectoryData.data,h=f.staffDirectoryData.metaData;for(var x=Object.entries(h).map(function(S){return{key:S[0],value:S[1]}}),b=[],R=[],y=[],l=[],M=[],T=0;T<x.length;T++){var k=x[T];b.push(k.key),R.push(k.value.description),y.push(k.value.name),l.push(k.value.metaDataSource.displayLabel),M.push(k.value.metaDataSource.editLabel)}var w=y.concat(R).concat(M).concat(l);n.translateByUserLanguageCode(w).then(S=>{for(var U=S.length/4,I=0;I<U;I++){var m=b[I];h[m].name=S[I].translation,h[m].description=S[I+U].translation,h[m].metaDataSource.displayLabel=S[I+2*U],h[m].metaDataSource.editLabel=S[I+3*U]}var F={isReadonly:f.isReadonly,meta:h,customTypes:d,postCreateInitFuncs:[],noGroups:f.noGroups};F.helpHtml=1==f.noHelp?" ":'<i class="fa fa-question-circle"></i>',$(t).jqPropertyGrid(i,F)})}else i=f.staffDirectoryData.data,(D={isReadonly:f.isReadonly,meta:h=f.staffDirectoryData.metaData,customTypes:d,postCreateInitFuncs:[],noGroups:f.noGroups}).helpHtml=1==f.noHelp?" ":'<i class="fa fa-question-circle"></i>',$(t).jqPropertyGrid(i,D)}else{var D;i=f.staffDirectoryData.data,(D={isReadonly:f.isReadonly,meta:h=f.staffDirectoryData.metaData,customTypes:d,postCreateInitFuncs:[],noGroups:f.noGroups}).helpHtml=1==f.noHelp?" ":'<i class="fa fa-question-circle"></i>',$(t).jqPropertyGrid(i,D)}},function(p){console.log(p)})},f.chapterGroups=scope.currentScope.chapter.chapterGroups,f.chapterGroups=scope.currentScope.chapter.chapterGroups,f.chapterGroupSelections={},f.filtered=!1;var d={icon:{html:function(p,v,C,A){return'<i class="fa fa-'+C+'"></i>'},valueFn:function(){return"Icon field value"}},textarea:{html:function(p,v,C,A){var x='<textarea class="form-control" id="'+p+'" rows=6 style="overflow-x: auto; width:100%">';return C instanceof Array&&(x+=C.join("\n")),x+"</textarea>"},makeValueFn:function(p,v,C,A){return function(){return $("#"+p).val().split("\n")}}},datePicker:{html:function(p,v,C,A){return'<input class="form-control" id="'+p+'">'+"</input>"},makePostCreateFn:function(p,v,C,A,x,b){return p?function(){var y=$("#"+p);y.datepicker({changeMonth:!0,changeYear:!0,yearRange:"-100:+1",gotoCurrent:!0,numberOfMonths:1,firstDay:1,defaultDate:null,prevText:'<i class="fa fa-chevron-left"></i>',nextText:'<i class="fa fa-chevron-right"></i>',dateFormat:"dd.mm.yy",closeText:"Schlie\xdfen",prevText:'<i class="fa fa-chevron-left"></i>',nextText:'<i class="fa fa-chevron-right"></i>',currentText:"Heute",monthNames:["Januar","Februar","M\xe4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","M\xe4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",showButtonPanel:!1});var l=new Date(C);l.setMinutes(l.getMinutes()-l.getTimezoneOffset()),C?y.datepicker("setDate",l):y.datepicker()}:null},makeValueFn:function(p,v,C,A){return function(){return $("#"+p).datepicker("getDate")?new Date($("#"+p).datepicker("getDate")):null}}},tagArea:{html:function(p,v,C,A){var x='<textarea id="'+p+'">';return C instanceof Array&&(x+=g(C.join(","))),x+"</textarea>"},makePostCreateFn:function(p,v,C,A,x,b){return p?($.extend({},v),function(){var l=$("#"+p);l.tagEditor({placeholder:"Enter tags ..."},C),x&&l.on("spin change keyup paste input",function(k,w){x(b,A,w?w.value:$(k.target).val())})}):null},makeValueFn:function(p,v,C,A){return function(){return $("#"+p).val().split(",")}},colSpan2:!0},tagAutocomplete:{html:function(p,v,C,A){var x='<textarea id="'+p+'">';return C instanceof Array&&(x+=g(C.join(","))),x+"</textarea>"},makePostCreateFn:function(p,v,C,A,x,b){if(!p)return null;var R={};if(v){for(var y=[],l=0;l<v.length;l++)y.push(v[l].text);R.autocomplete={delay:0,position:{collision:"flip"},source:y},R.forceLowercase=!1}return $.extend(R,v),function(){var T=$("#"+p);T.tagEditor(R,C),x&&T.on("spin change keyup paste input",function(w,D){x(b,A,D?D.value:$(w.target).val())})}},makeValueFn:function(p,v,C,A){return function(){return $("#"+p).val().split(",")}},colSpan2:!0},phonecall:{html:function(p,v,C,A){if(0==A.isReadonlyMode)return'<input type="text" class="form-control" id="'+p+'" value="'+g(C)+'"</input>';if(C){var x='<a class="btn btn-green btn-block" role="button" id="'+p+'" href="tel:'+g(C)+'">';return x+='<i class="fa fa-phone" aria-hidden="true"></i> ',(x+=g(C))+"</a>"}return""}},emailsend:{html:function(p,v,C,A){if(0==A.isReadonlyMode)return'<input type="text" class="form-control" id="'+p+'" value="'+g(C)+'"</input>';if(C){var x='<a class="btn btn-green btn-block" role="button" id="'+p+'" href="mailto:'+g(C)+'">';return x+='<i class="fa fa-envelope" aria-hidden="true"></i> ',(x+=g(C))+"</a>"}return""}}},i={accumulateTicks:!0,filter:!1,filterSize:200,buyColor:"#00ff00",sellColor:"#ff0000",someOption:"Maybe",noGroup:"I have no group",dontShowMe:"please",tagArea:null},h={dontShowMe:{browsable:!1},filter:{group:"Behavior",name:"Filter",type:"boolean"},filterSize:{group:"Behavior",name:"Filter size",type:"number",options:{min:0,max:500,step:10}},accumulateTicks:{group:"Behavior",name:"Accumulate ticks",type:"boolean"},buyColor:{group:"Appearance",name:"Buy color",type:"color",options:{preferredFormat:"hex",showInput:!0,showInitial:!0}},sellColor:{group:"Appearance",name:"Sell color",type:"color",options:{preferredFormat:"hex",showInput:!0,showInitial:!0}},someOption:{name:"Some option",type:"options",options:["Yes","No",{text:"Not sure",value:"Maybe"}]},tagArea:{name:"Tags",type:"tagArea",description:"This is a tager",showHelp:!1,options:{delimiter:","}}}}]}),function(e){var t="Other",a="pg.getValues",n=0;function u(d,i){return'<tr class="pgGroupRow '+(i?"pgCollapsible":"")+'"><td colspan="2" class="pgGroupCell">'+(i?"- ":"")+d+"</td></tr>"}function c(){var d=e(this);if(null!==d.spinner("value")||"string"!=typeof d.val()){var o=d.spinner("option","min"),h=d.spinner("option","max");"number"==typeof o&&this.value<o?this.value=o:"number"==typeof h&&this.value>h&&(this.value=h)}else d.val("")}e.fn.jqPropertyGrid=function(d,i){if("string"==typeof d&&"get"===d)return"function"==typeof this.data(a)?this.data(a)():null;if("string"!=typeof d)if("object"==typeof d&&null!==d){(i=i&&"object"==typeof i?i:{}).meta=i.meta&&"object"==typeof i.meta?i.meta:{},i.customTypes=i.customTypes||{},i.helpHtml=i.helpHtml||"[?]",i.sort=!(typeof i.sort>"u")&&i.sort,i.isCollapsible=!(typeof i.isCollapsible>"u"||!i.isCollapsible),i.callback="function"==typeof i.callback?i.callback:null,i.isReadonly=i.isReadonly||!1;var b,o=i.meta,h={OTHER_GROUP_NAME:""},p={},v=[],C={},A="pg"+n++,x=this,R=Object.keys(d);i.sort&&("boolean"==typeof i.sort?R=R.sort():"function"==typeof i.sort&&(R=R.sort(i.sort))),R.forEach(function(w){"function"==typeof d[w]||o[w]&&!1===o[w].browsable||(o[w].isReadonlyMode=i.isReadonly,(b=o[w]&&o[w].group||t)!==t&&!p[b]&&(p[b]=u(b,i.isCollapsible)),h[b]=h[b]||"",h[b]+=function g(d,i,o,h,p,v,C,A){if(!i)return"";var l,T,x=C.callback,b=(h=h||{}).name||i,R=h.type||"",y=d+i,M=C.customTypes;for(var k in M)if(R===k){T=M[k];break}return T?(l=T.html(y,i,o,h),v&&(v[i]=T.hasOwnProperty("makeValueFn")?T.makeValueFn(y,i,o,h):T.hasOwnProperty("valueFn")?T.valueFn:function(){return e("#"+y).val()}),p&&T.hasOwnProperty("makePostCreateFn")&&p.push(T.makePostCreateFn(y,h.options,o,i,x,A))):"boolean"===R||""===R&&"boolean"==typeof o?(l=(l='<label class="switch"><input class="form-control" type="checkbox" id="'+y+'" value="'+i+'"'+(o?" checked":"")+" /><span></span></label>")+'<label class="elipsis" for"'+y+" />",v&&(v[i]=function(){return e("#"+y).prop("checked")}),x&&e(A).on("change","#"+y,function(){x(this,i,e("#"+y).is(":checked"))})):"options"===R&&Array.isArray(h.options)?(l=function f(d,i,o){i=i||"",o=o||[];var v,h='<select class="form-control"';(d=d||"")&&(h+=' id="'+d+'"'),h+=">",h+='<option value="" selected disabled style="display:none;">. . .</option>';for(var C=0;C<o.length;C++)h+='<option value="'+(v="object"==typeof o[C]?o[C].value:o[C])+'"'+(i===v?" selected>":">"),h+=("object"==typeof o[C]?o[C].text:o[C])+"</option>";return h+="</select>"}(y,o,h.options),v&&(v[i]=function(){return e("#"+y).val()}),x&&e(A).on("change","#"+y,function(){x(this,i,e("#"+y).val())})):"function"==typeof e.fn.spinner&&("number"===R||""===R&&"number"==typeof o)?(l='<input type="text" id="'+y+'" value="'+o+'" class="form-control" style="width:50px" />',p&&p.push(function r(d,i,o,h,p){if(!d)return null;var v={};return e.extend(v,i),v.change=typeof v.change>"u"?c:v.change,function(){var A=e("#"+d);A.spinner(v),h&&A.on("spin change keyup paste input",function(b,R){h(p,o,R?R.value:e(b.target).val())})}}(y,h.options,i,x,A)),v&&(v[i]=function(){return e("#"+y).spinner("value")})):"color"===R&&"function"==typeof e.fn.spectrum?(l='<input type="text" class="form-control" id="'+y+'" />',p&&p.push(function s(d,i,o,h,p,v){if(!d)return null;var C={};return e.extend(C,o),"string"==typeof i&&(C.color=i),function(){var x=e("#"+d);x.spectrum(C),void 0!==p&&x.on("change",function(R,y){p(v,h,y.toHexString())})}}(y,o,h.options,i,x,A)),v&&(v[i]=function(){return e("#"+y).spectrum("get").toHexString()})):"label"===R?l="string"==typeof h.description&&h.description?'<label for="'+y+'" title="'+h.description+'">'+o+"</label>":'<label for="'+y+'">'+o+"</label>":(l='<input type="text" class="form-control" id="'+y+'" value="'+o+'"</input>',v&&(v[i]=function(){return e("#"+y).val()}),x&&e(A).on("propertychange change keyup paste input","#"+y,function(){x(this,i,e("#"+y).val())})),"string"==typeof h.description&&h.description&&(typeof h.showHelp>"u"||h.showHelp)&&(b+='<div class="pgTooltip">&nbsp '+C.helpHtml+' <span class="pgTooltiptext">'+h.description+"</span>"),h.colspan2?'<tr class="pgRow"><td colspan="2" class="pgCell">'+l+"</td></tr>":C.isReadonly?'<tr class="pgRow"><td class="pgLabelCell">'+b+'</td><td class="pgReadOnlyCell">'+l+"</td></tr>":'<tr class="pgRow"><td class="pgLabelCell">'+b+'</td><td class="pgValueCell">'+l+"</td></tr>"}(A,w,d[w],o[w],v,C,i,x))});var y='<table class="pgTable">';for(var l in p)i.noGroups||(y+=p[l]),y+=h[l];h[t]&&(y+=u(t,i.isCollapsible),y+=h[t]),this.html(y+="</table>"),this.data(a,function(){var k={};for(var w in C)"function"==typeof C[w]&&(k[w]=C[w]());return k}),i.isCollapsible?e(x).find(".pgGroupRow").click(function(){var w=e(this).html(),D=e(w).text(),S="+"===D[0],U=D.substring(1),m=w.replace(D,S?"-"+U:"+"+U);e(this).html(m),e(this).nextUntil("tr.pgGroupRow").slideToggle(1)}):e("tr.pgGroupRow").each(function(w){var D=e(this).html(),S=e(D).text();if(e(this).css("cursor","default"),"-"===S[0]&&" "===S[1]){var m=S.substring(2),F=D.replace(S,m);e(this).html(F)}});for(var T=0;T<v.length;++T)"function"==typeof v[T]&&(v[T](),v[T]=null);i.isReadonly&&(e(x).find("*").prop("disabled",!0),e(x).find("div.tag-editor-delete").hide(),e(x).find("ul.tag-editor.ui-sortable").off("click"))}else console.error("jqPropertyGrid must get an object in order to initialize the grid.");else console.error("jqPropertyGrid got invalid option:",d)}}(window.$),app.factory("redirectService",["$window","$location","$timeout","$rootScope",function(e,t,a,n){var u=n.scope,g=function(r){var c=r.startsWith(u.currentScope.network.path+(""!=u.currentScope.chapter.regEx?"/"+u.currentScope.chapter.regEx:"")+"/");return""===u.currentScope.chapter.regEx&&c&&u.chapters.forEach(function(d){2===d.managementState&&d.id!==u.currentChapter.id&&r.startsWith(u.currentScope.network.path+"/"+d.regEx+"/")&&(c=!1)}),c};return{redirectNotificationUrl:function(r){var s=new URL("https://"+u.currentScope.network.domain),c=u.currentScope.network.path+(""!=u.currentScope.chapter.regEx?"/"+u.currentScope.chapter.regEx:"");if(g(r))a(function(){var o=r.substring(c.length);t.url(o).replace()});else if(r.startsWith(s.origin))e.location.href=r;else if(e.cordova&&e.cordova.InAppBrowser){let o=n.scope.currentScope.network.settings.configurations.inAppBrowserOnly;var i="location=no,toolbarposition=top,toolbartranslucent=no";"android"===cordova.platformId&&(i="location=yes,hideurlbar=yes,zoom=no,closebuttoncaption="+n.scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption")),o?cordova.InAppBrowser.open(r,"_blank",i):cordova.InAppBrowser.open(r,"_system",i)}else e.location.href=r},isSameChapterUrl:g}}]),app.factory("scopeService",["$http","$q","$window",function(e,t,a){var n=this,u={};n.settings=a.scope.scopeSettings;var g={};return this.getNetworkChapter=function(f,r){var s=t.defer();if(u[r+"_"+f])s.resolve(u[r+"_"+f]);else{if(g[r+"_"+f])return g[r+"_"+f].promise;g[r+"_"+f]=s,e.get(scope.apiEndpoint+"networks/"+f+"/"+r).then(function(c){u[r+"_"+f]=c.data,s.resolve(c.data)},function(){s.reject(),delete g[r+"_"+f]})}return s.promise},this.getGlobalSettings=function(){return n.settings.getGlobalSettings()},this.getChapter=function(f){return n.settings.getChapter(f)},this.resolveUrl=function(f){return n.settings.resolveUrl(f)},this.getNetworkUrl=function(){return"https://"+scope.currentScope.network.domain},{getGlobalSettings:this.getGlobalSettings,getChapter:this.getChapter,getNetworkUrl:this.getNetworkUrl,getNetworkChapter:this.getNetworkChapter}}]),app.component("shareButton",{templateUrl:"/ClientApp/src/legacy-app/common/shareButton.html",bindings:{text:"<",image:"<"},controller:["$rootScope","$location","$window",function(e,t,a){var n=this;n.getUrl=function(){let r=new URL(t.absUrl()),s=t.path().substring(1).split("/")[0],c=r.pathname.replace(r.pathname.substring(r.pathname.indexOf(s)),s);return encodeURIComponent(`${r.origin}/${c}`)},n.getImageUrl=function(){return encodeURIComponent(n.image.assetImageUrl)},n.shareFacebook=function(){a.open("https://www.facebook.com/sharer/sharer.php?u="+n.getUrl()+"&t="+encodeURIComponent(n.text),"_blank","width=600,height=460")},n.showWhatsappShare=new window.MobileDetect(window.navigator.userAgent).phone(),n.shareTwitter=function(){var r="https://twitter.com/intent/tweet?url="+n.getUrl()+"&text="+n.text;e.scope.currentScope.chapter.settings.seoTwitterSite&&(r=r+"&via="+e.scope.currentScope.chapter.settings.seoTwitterSite.substring(1)),a.open(r,"_blank","width=600,height=460")},n.sharePinterest=function(){a.open("https://www.pinterest.com/pin/create/link/?url="+n.getUrl()+"?media="+n.getImageUrl()+"?description="+encodeURIComponent(n.text),"_blank","width=600,height=460")}}]}),app.directive("smartQuotes",[function(){return{scope:!0,link:function(e,t,a){t.keypress(function(n){if(34===n.charCode){var u=t[0].selectionStart;if(u!==t[0].selectionEnd)return;n.preventDefault(),0===u||t.val().substring(u-1,u).match(/\s/g)?t.val(t.val().substring(0,u)+"\u201e"+t.val().substring(u)):t.val(t.val().substring(0,u)+"\u201c"+t.val().substring(u)),t[0].setSelectionRange(u+1,u+1)}})}}}]),app.filter("szAwareUppercase",function(){return function(e){return(e=e||"").replace(/\xdf/g,"\u1e9e").toUpperCase()}}),app.directive("timedUpdate",["$interval","$timeout",function(e,t){return{restrict:"A",scope:!1,link:function(a,n,u){function g(){var r=a.$eval(u.timedUpdate);n[0].innerText=r,n[0].textContent=r}var f=e(function(){g()},u.milliseconds?u.milliseconds:3e4);t(function(){g()}),n.on("$destroy",function(){e.cancel(f)})}}}]),app.factory("companyNewsService",["$http","$q",function(e,t){return{getCompanyNews:function(){var u=t.defer();return e.get(scope.apiEndpoint+"companyNews").then(function(g){u.resolve(g.data)}),u.promise},getCompanyNewsDetail:function(u){var g=t.defer();return e.get(scope.apiEndpoint+"companyNews/"+u).then(function(f){g.resolve(f.data)}),g.promise}}}]),MetaInformationBase.prototype.getFullAuthorName=function(){var e=scope.currentScope.network.name;return this.author&&(e=this.author.firstName+" "+this.author.lastName),e},MetaInformationBase.prototype.getMetaDate=function(){var e=moment().format();return moment(this.date).isValid()?moment(this.date).format():e},MetaArticleInfo.prototype=Object.create(MetaInformationBase.prototype),MetaSnipInfo.prototype=Object.create(MetaInformationBase.prototype),MetaSponsoredArticleInfo.prototype=Object.create(MetaInformationBase.prototype),MetaStaticArticleInfo.prototype=Object.create(MetaInformationBase.prototype),MetaEventInfo.prototype=Object.create(MetaInformationBase.prototype),app.service("pageMetaInfoService",["$interpolate","metaService",function(e,t){var a=this;function n(d,i){this.title=d,this.description=i}this.statesInfo={},this.statesInfo["app.main-news"]=new n(scope.currentScope.network.getResourceOrKeyName("web_newsMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_newsMeta_description")),this.statesInfo["app.main-login"]=new n(scope.currentScope.network.getResourceOrKeyName("web_loginMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_loginMeta_description")),this.statesInfo["app.main-menu"]=new n(scope.currentScope.network.getResourceOrKeyName("web_menuMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_menuMeta_description")),this.statesInfo.home=new n(scope.currentScope.network.getResourceOrKeyName("web_landingMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_landingMeta_description")),this.statesInfo["app.main-snips"]=new n(scope.currentScope.network.getResourceOrKeyName("web_snipMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_snipMeta_description")),this.statesInfo["app.search"]=new n(scope.currentScope.network.getResourceOrKeyName("web_searchMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_searchMeta_description")),this.statesInfo["app.imprint"]=new n(scope.currentScope.network.getResourceOrKeyName("web_imprintMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_imprintMeta_description")),this.statesInfo["app.sponsoredArticleList"]=new n(scope.currentScope.network.getResourceOrKeyName("web_sponsoredArticleMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_sponsoredArticleMeta_description")),this.statesInfo["app.privacyPolicy"]=new n(scope.currentScope.network.getResourceOrKeyName("web_privacyPolicyMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_privacyPolicyMeta_description")),this.statesInfo["app.tos"]=new n(scope.currentScope.network.getResourceOrKeyName("web_termsOfUseMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_termsOfUseMeta_description")),this.statesInfo["app.accessibility"]=new n(scope.currentScope.network.getResourceOrKeyName("web_accessibility_title"),scope.currentScope.network.getResourceOrKeyName("web_accessibility_description")),this.statesInfo["app.imagelicensing"]=new n(scope.currentScope.network.getResourceOrKeyName("web_asset_imageLicensingMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_asset_imageLicensingMeta_description")),this.statesInfo["app.register"]=new n(scope.currentScope.network.getResourceOrKeyName("web_registerMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_registerMeta_description")),this.statesInfo["app.feedback"]=new n(scope.currentScope.network.getResourceOrKeyName("web_feedbackMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_feedbackMeta_description")),this.statesInfo["app.authorRegister"]=new n(scope.currentScope.network.getResourceOrKeyName("web_authorRegisterMeta_title"),""),this.statesInfo["app.authors"]=new n(scope.currentScope.network.getResourceOrKeyName("web_authorMeta_title"),scope.currentScope.network.getResourceOrKeyName("web_authorMeta_description"));var r=function(d){if(!d)return"";var i=function(d){return d.replace("{{{networkName}}}",scope.currentScope.network.name)}(d);return i=function(d){return d.replace("{{{chapterName}}}",scope.currentScope.chapter.name)}(i),i};return{run:function(d){if(d){var i=a.statesInfo[d];i&&function(d,i){var o=r(d),h=r(i);t.push(o,h)}(i.title,i.description)}}}}]),app.component("articleEventCalendarDisplayable",{templateUrl:"/ClientApp/src/legacy-app/event/articleEventCalendarDisplayable.html",bindings:{article:"<"},controller:["$rootScope",function(e){var t=this;this.$onInit=function(){var a=new Date(t.article.calendarDate).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"});t.formattedCalendarDate=e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:a}),t.article.isToday=t.isToday}}]}),app.component("birthdayEventCalendarDisplayable",{templateUrl:"/ClientApp/src/legacy-app/event/birthdayEventCalendarDisplayable.html",bindings:{event:"<"},controller:["$rootScope","eventCalendarService","formatterService",function(e,t,a){var n=this,u="";this.$onInit=function(){u=new Date(n.event.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"2-digit"}),u=a.eventCalendarFormatAsString(n.event.start),n.formattedCalendarDate=e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:u}),n.congratulatable=n.event.isToday||new Date>new Date(n.event.start),n.hasCongratulated=!1,n.event.ownReactions.forEach(function(g){1===g.type&&g.occurance==n.event.start&&(n.hasCongratulated=!0)})},n.congratulate=function(){t.congratulateToBirthday(n.event.id,n.event.start).then(function(){n.hasCongratulated=!0})}}]}),app.controller("EventCalendarController",["$scope","$rootScope","$timeout","articleService","snipService","sponsoredArticleService","profileService","eventCalendarService","$location",function(e,t,a,n,u,g,f,r,s){e.eventsLoading=!0,e.calendar=[],e.cachedEventData=[],e.filteredCalendar=[],e.isFiltered=!1,e.filterGroupsReady=!1,e.isMobileView=t.mobile,e.eventCategories=[],e.eventGroups=[],e.eventTypes=[],e.eventCategorySelection=null,e.typeSelection=null,e.noSelectionStyle={"background-color":"cadetblue"},e.containsArticle=!1,e.containsEvent=!1,e.containsSnip=!1,e.containsSponsored=!1,e.containsBirthday=!1,e.showCategoryFilter=!0,e.showTypeFilter=!0,e.hideEventFilter=t.scope.currentChapter.settings.configurations.eventsBirthdayCalendarConfiguration.EventFilterDisabled;var c=t.scope.currentChapter.settings.configurations.custom_Header_Icon_Or_Text;e.hideFilterUi="hidden"==s.search().filterUi;var d=t.scope.currentScope.network.settings.languageCode,i=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(e.location=s,e.$watch("location.url()",function(b,R){b!=R&&function v(b,R){if("/events"!=b||1!=e.isFiltered){var y=!1;if(c.forEach(l=>{"/"+l.Link.substring(l.Link.indexOf("events"))==b&&(y=!0)}),y){e.hideFilterUi="hidden"==s.search().filterUi,e.showCategoryFilter=!0,e.showTypeFilter=!0;let l=s.search().category,M=s.search().type;2==M&&(l="Event"==l?2:1),(e.eventCategorySelection!=l||e.typeSelection!=M)&&(e.eventCategorySelection=l,e.typeSelection=l,e.changeFilter(M,l))}}else e.resetFilter()}(b)}),1==i){var o=t.scope.profile,h=t.scope.network.settings.languagePack.split("-")[0];d=h,null!=o.activeUserLanguage?.vendorLanguageCode&&h!=o.activeUserLanguage?.vendorLanguageCode&&(d=o.activeUserLanguage.vendorLanguageCode)}function p(){var b=[],R=[],y=[],l=[],M=s.search().type,T=s.search().category,k=null!=M&&null!=T;Promise.allSettled([n.getArticlesForEventCalendar(),u.getSnipsForEventCalendar(),g.getSponsoredArticlesForEventCalendar(),r.getEventCalendarEventData()]).then(function(I){if(I.forEach((m,F)=>{"rejected"===m.status&&console.error(`Service call ${F+1} failed:`,m.reason)}),"fulfilled"===I[0].status&&function w(I){$.each(I,function(m,F){if(null!==F.calendarDate){e.containsArticle=!0;var E=new Date(F.calendarDate).getMonth(),V=new Date(F.calendarDate).getDate(),q=new Date(F.calendarDate).getFullYear(),O=moment(F.calendarDate).locale(d),_=O.format("L");if(F.isToday=_===moment(new Date).locale(d).format("L"),typeof b[E+""+q]>"u"){y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Articles:[F],Snips:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:new Date(F.calendarDate)},l[E+""+q]=[y[_]];var P={Month:O.format("MMMM")+" "+q,Dates:l[E+""+q]};b[E+""+q]=P,R.push(P)}else typeof y[_]>"u"?(y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Articles:[F],Snips:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:new Date(F.calendarDate)},l[E+""+q].push(y[_]),l[E+""+q].sort(function(L,K){return L.CalendarDate.getTime()-K.CalendarDate.getTime()})):y[_].Articles.push(F)}})}(I[0].value),"fulfilled"===I[1].status&&function D(I){$.each(I,function(m,F){if(null!==F.calendarDate){e.containsSnip=!0;var E=new Date(F.calendarDate).getMonth(),V=new Date(F.calendarDate).getDate(),q=new Date(F.calendarDate).getFullYear(),O=moment(F.calendarDate).locale(d),_=O.format("L");if(F.isToday=_===moment(new Date).locale(d).format("L"),typeof b[E+""+q]>"u"){y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Snips:[F],Articles:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:new Date(F.calendarDate)},l[E+""+q]=[y[_]];var P={Month:O.format("MMMM")+" "+q,Dates:l[E+""+q]};b[E+""+q]=P,R.push(P)}else typeof y[_]>"u"?(y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Snips:[F],Articles:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:new Date(F.calendarDate)},l[E+""+q].push(y[_]),l[E+""+q].sort(function(L,K){return L.CalendarDate.getTime()-K.CalendarDate.getTime()})):y[_].Snips.push(F)}})}(I[1].value),"fulfilled"===I[2].status&&function S(I){$.each(I,function(m,F){if(null!==F.calendarDate){e.containsSponsored=!0;var E=new Date(F.calendarDate).getMonth(),V=new Date(F.calendarDate).getDate(),q=new Date(F.calendarDate).getFullYear(),O=moment(F.calendarDate).locale(d),_=O.format("L");if(F.isToday=_===moment(new Date).locale(d).format("L"),typeof b[E+""+q]>"u"){y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Snips:[],Articles:[],SponsoredArticles:[F],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:new Date(F.calendarDate)},l[E+""+q]=[y[_]];var P={Month:O.format("MMMM")+" "+q,Dates:l[E+""+q]};b[E+""+q]=P,R.push(P)}else typeof y[_]>"u"?(y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Snips:[],Articles:[],SponsoredArticles:[F],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:new Date(F.calendarDate)},l[E+""+q].push(y[_]),l[E+""+q].sort(function(L,K){return L.CalendarDate.getTime()-K.CalendarDate.getTime()})):y[_].SponsoredArticles.push(F)}})}(I[2].value),"fulfilled"===I[3].status&&function U(I){$.each(I,function(m,F){if(null!==F.start){1===F.type&&(e.containsBirthday=!0),e.containsEvent=!0;var E=new Date(F.start).getMonth(),V=new Date(F.start).getDate(),q=new Date(F.start).getFullYear(),O=moment(F.start).locale(d),_=O.format("L");if(F.isToday=_===moment(new Date).locale(d).format("L"),typeof b[E+""+q]>"u"){y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Snips:[],Articles:[],SponsoredArticles:[],Birthdays:1===F.type?[F]:[],Events:2===F.type?[F]:[],ExternalEvents:3===F.type?[F]:[],CalendarDate:new Date(F.start)},l[E+""+q]=[y[_]];var P={Month:O.format("MMMM")+" "+q,Dates:l[E+""+q]};b[E+""+q]=P,R.push(P)}else if(typeof y[_]>"u")y[_]={Day:O.format("dddd")+", der "+V+". "+O.format("MMMM"),Snips:[],Articles:[],SponsoredArticles:[],Birthdays:1===F.type?[F]:[],Events:2===F.type?[F]:[],ExternalEvents:3===F.type?[F]:[],CalendarDate:new Date(F.start)},l[E+""+q].push(y[_]),l[E+""+q].sort(function(L,K){return L.CalendarDate.getTime()-K.CalendarDate.getTime()});else switch(F.type){case 1:y[_].Birthdays.push(F);break;case 3:y[_].ExternalEvents.push(F);break;default:y[_].Events.push(F)}}})}(I[3].value),e.calendar=R.sort(function(m,F){return m.Dates[0].CalendarDate-F.Dates[0].CalendarDate}),e.cachedEventData=angular.copy(e.calendar),e.filteredCalendar=angular.copy(e.cachedEventData),e.eventsLoading=!1,function C(){e.eventGroups=t.scope.currentScope.chapter.chapterGroups.filter(b=>!0===b.isEventCategory),e.eventGroups.forEach(b=>{b.chapters&&(e.eventCategories=e.eventCategories.concat(b.chapters))}),e.filterGroupsReady=!0}(),function A(){e.eventTypes=[],e.containsBirthday&&e.eventTypes.push({id:1,text:t.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_birthday")}),e.containsEvent&&e.eventTypes.push({id:2,text:t.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_events")}),e.containsSnip&&e.eventTypes.push({id:3,text:t.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_snips")}),e.containsSponsored&&e.eventTypes.push({id:4,text:t.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_spons")}),e.containsArticle&&e.eventTypes.push({id:5,text:t.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_article")})}(),k){let m;1===M?(e.eventCategorySelection=T,m=T):2===M&&(m="Event"===T?2:1,e.typeSelection=m),e.changeFilter(M,m)}})}e.changeFilter=async function(b,R){if(!R)return;let y=R,l=e.hideFilterUi?"&filterUi=hidden":"";if(e.filteredCalendar=angular.copy(e.cachedEventData),1==b)e.showTypeFilter=!1,e.filteredCalendar=e.filteredCalendar.filter(M=>(M.Dates=M.Dates.filter(T=>(T.ExternalEvents=[],T.Events=T.Events.filter(k=>k.chapters.some(w=>w.id===R)),T.Events.length>0)),M.Dates.length>0));else if(2==b)switch(e.showCategoryFilter=!1,R){case 1:e.filteredCalendar=e.filteredCalendar.filter(M=>(M.Dates=M.Dates.filter(T=>(T.Birthdays=T.Birthdays.filter(k=>!0),T.Events=T.Events.filter(k=>2!==k.type&&3!==k.type),T.ExternalEvents=[],T.Articles=[],T.Snips=[],T.SponsoredArticles=[],T.Birthdays.length>0)),M.Dates.length>0)),y="Birthday";break;case 2:e.filteredCalendar=e.filteredCalendar.filter(M=>(M.Dates=M.Dates.filter(T=>(T.Events=T.Events.filter(k=>2===k.type||3===k.type),T.Articles=[],T.Birthdays=[],T.Snips=[],T.SponsoredArticles=[],T.Events.length>0)),M.Dates.length>0)),y="Event";break;case 3:e.filteredCalendar=e.filteredCalendar.filter(M=>(M.Dates=M.Dates.filter(T=>(T.Snips=T.Snips.filter(k=>!0),T.Events=[],T.ExternalEvents=[],T.Birthdays=[],T.Articles=[],T.SponsoredArticles=[],T.Snips.length>0)),M.Dates.length>0)),y="Snip";break;case 4:e.filteredCalendar=e.filteredCalendar.filter(M=>(M.Dates=M.Dates.filter(T=>(T.SponsoredArticles=T.SponsoredArticles.filter(k=>!0),T.Events=[],T.ExternalEvents=[],T.Birthdays=[],T.Snips=[],T.Articles=[],T.SponsoredArticles.length>0)),M.Dates.length>0)),y="SponsoredArticle";break;case 5:e.filteredCalendar=e.filteredCalendar.filter(M=>(M.Dates=M.Dates.filter(T=>(T.Articles=T.Articles.filter(k=>!0),T.Events=[],T.ExternalEvents=[],T.Birthdays=[],T.Snips=[],T.SponsoredArticles=[],T.Articles.length>0)),M.Dates.length>0)),y="Article";break;default:alert("Etwas ist schief gelaufen!")}s.url(`?type=${b}&category=${y}${l}`),e.isFiltered=!0,e.$emit("updateFilteredCalendar",e.filteredCalendar)},p(),e.resetFilter=function(){(function x(){e.isFiltered=!1,e.eventTypes=[],e.eventCategories=[],e.eventCategorySelection=null,e.typeSelection=null,e.filteredCalendar=[],e.containsArticle=!1,e.containsEvent=!1,e.containsSnip=!1,e.containsSponsored=!1,e.containsBirthday=!1,e.calendar=[],e.cachedEventData=[],e.showCategoryFilter=!0,e.showTypeFilter=!0,e.hideFilterUi=!1,s.url(s.path()),e.eventsLoading=!0})(),p()},e.$on("updateFilteredCalendar",function(b,R){a(function(){e.filteredCalendar=R})})}]),app.controller("EventCalendarDetailController",["$scope","$rootScope","$previousState","event","eventCalendarService","parserService","$location","$uibModal","translationService","profileService","assetService","logoService",function(e,t,a,n,u,g,f,r,s,c,d,i){e.event=n,e.defaultEventPicture=i.getChapterEventPictureUrl(),e.enableHighQualityImage=t.scope.network.settings.configurations.enableHighQualityImage,e.loadMoreParticipantsPending=!0;var o=t.scope.currentScope.network.getResourceOrKeyName;function h(){var T=new Date(e.event.start),k=new Date(e.event.end),w=new Date(e.event.recurrenceRule.until);if(0===e.event.recurrenceRule.frequency)e.ocurranceString=e.event.isAllDay?T.toLocaleDateString()==k.toLocaleDateString()?o("web_eventDetail_dateAllDay_singleDay",{date:T.toLocaleDateString()}):o("web_eventDetail_dateAllDay",{start:T.toLocaleDateString(),end:k.toLocaleDateString()}):e.event.isOpenEnd?o("web_eventDetail_openEnd",{start:T.toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),end:o("web_eventDetail_dateOpenEnd")}):o("web_eventDetail_date",{start:T.toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),end:k.toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})});else{var D=e.event.durationInSeconds,S="web_eventDetail_duration_seconds";switch(D>0&&D%60==0&&(S="web_eventDetail_duration_minutes",(D/=60)%60==0&&(S="web_eventDetail_duration_hours",(D/=60)%24==0&&(S="web_eventDetail_duration_days",(D/=24)%7==0&&(D/=7,S="web_eventDetail_duration_weeks")))),e.ocurranceString=!e.event.recurrenceRule.until||w.getUTCFullYear()<=1?o("web_eventDetail_recurringEvent",{start:T.toLocaleDateString(),startTime:T.toLocaleString([],{hour:"2-digit",minute:"2-digit"}),duration:o(S,{duration:D})}):o("web_eventDetail_recurringEvent_until",{start:T.toLocaleDateString(),startTime:T.toLocaleString([],{hour:"2-digit",minute:"2-digit"}),until:w.toLocaleDateString(),duration:o(S,{duration:D})}),e.event.recurrenceRule.frequency){case 4:e.ocurranceString+=1===e.event.recurrenceRule.interval?" "+o("web_eventDetail_dailyIntervalOne"):" "+o("web_eventDetail_daily",{interval:e.event.recurrenceRule.interval});break;case 5:var U="";0===e.event.recurrenceRule.byDay[0].dayOfWeek&&(e.event.recurrenceRule.byDay.push(e.event.recurrenceRule.byDay[0]),e.event.recurrenceRule.byDay.splice(0,1)),e.event.recurrenceRule.byDay.forEach(function(O,_){U+=p(O.dayOfWeek),_<e.event.recurrenceRule.byDay.length-2?U+=", ":_===e.event.recurrenceRule.byDay.length-2&&(U+=" "+o("web_common_and")+" ")}),e.ocurranceString+=1===e.event.recurrenceRule.interval?" "+o("web_eventDetail_weeklyIntervalOne",{weekDays:U}):" "+o("web_eventDetail_weekly",{interval:e.event.recurrenceRule.interval,weekDays:U});break;case 6:if(e.event.recurrenceRule.byDay.length){var F=[{ocurrances:[],weekDay:o("web_common_sunday")},{ocurrances:[],weekDay:o("web_common_monday")},{ocurrances:[],weekDay:o("web_common_tuesday")},{ocurrances:[],weekDay:o("web_common_wednesday")},{ocurrances:[],weekDay:o("web_common_thursday")},{ocurrances:[],weekDay:o("web_common_friday")},{ocurrances:[],weekDay:o("web_common_saturday")}],E=[{occurance:o("web_eventDetail_recurrence_byWeekDay_first"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_second"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_third"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_fourth"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_last"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_secondToLast"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_thirdToLast"),weekDays:[]},{occurance:o("web_eventDetail_recurrence_byWeekDay_fourthToLast"),weekDays:[]}];e.event.recurrenceRule.byDay.forEach(function(O){F[O.dayOfWeek].ocurrances.push(v(O.offset));var _=O.offset;_<0&&(_=4-_),E[_-=1].weekDays.push(p(O.dayOfWeek))}),F.push(F[0]),F.splice(0,1),F=F.filter(function(O){return O.ocurrances.length>0}),E=E.filter(function(O){return O.weekDays.length>0}),weekDayString="",F.length<=E.length?F.forEach(function(O,_){O.ocurrances.forEach(function(P,L){weekDayString+=P,L<O.ocurrances.length-2?weekDayString+=", ":L===O.ocurrances.length-2&&(weekDayString+=" "+o("web_common_and")+" ")}),weekDayString+=" "+O.weekDay,_<F.length-2?weekDayString+=", ":_===F.length-2&&(weekDayString+=" "+o("web_common_and")+" ")}):E.forEach(function(O,_){weekDayString+=" "+O.occurance+" ",O.weekDays.forEach(function(P,L){weekDayString+=P,L<O.weekDays.length-2?weekDayString+=", ":L===O.weekDays.length-2&&(weekDayString+=" "+o("web_common_and")+" ")}),_<E.length-2?weekDayString+=", ":_===E.length-2&&(weekDayString+=" "+o("web_common_and")+" ")}),e.ocurranceString+=1===e.event.recurrenceRule.interval?" "+o("web_eventDetail_monthlyIntervalOne_byWeekDay",{weekDays:weekDayString}):" "+o("web_eventDetail_monthly_byWeekDay",{interval:e.event.recurrenceRule.interval,weekDays:weekDayString})}else{var I=e.event.recurrenceRule.byMonthDay.join(", "),m=I.lastIndexOf(",");-1!==m&&(I=I.substring(0,m)+" "+o("web_common_and")+I.substring(m+1,I.length)),e.ocurranceString+=1===e.event.recurrenceRule.interval?" "+o("web_eventDetail_monthlyIntervalOne_byMonthDay",{monthDays:I}):" "+o("web_eventDetail_monthly_byMonthDay",{interval:e.event.recurrenceRule.interval,monthDays:I})}break;case 7:var V="";switch(e.event.recurrenceRule.byMonth[0]){case 1:V=o("web_common_january");break;case 2:V=o("web_common_february");break;case 3:V=o("web_common_march");break;case 4:V=o("web_common_april");break;case 5:V=o("web_common_may");break;case 6:V=o("web_common_june");break;case 7:V=o("web_common_july");break;case 8:V=o("web_common_august");break;case 9:V=o("web_common_september");break;case 10:V=o("web_common_october");break;case 11:V=o("web_common_november");break;case 12:V=o("web_common_december")}if(e.event.recurrenceRule.byDay.length){var q=e.event.recurrenceRule.byDay[0];e.ocurranceString+=1===e.event.recurrenceRule.interval?" "+o("web_eventDetail_yearlyIntervalOne_byWeekDay",{weekDay:v(q.offset)+" "+p(q.dayOfWeek),month:V}):" "+o("web_eventDetail_yearly_byWeekDay",{interval:e.event.recurrenceRule.interval,weekDay:v(q.offset)+" "+p(q.dayOfWeek),month:V})}else e.ocurranceString+=1===e.event.recurrenceRule.interval?" "+o("web_eventDetail_yearlyIntervalOne_byMonthDay",{monthDay:e.event.recurrenceRule.byMonthDay[0],month:V}):" "+o("web_eventDetail_yearly_byMonthDay",{interval:e.event.recurrenceRule.interval,monthDay:e.event.recurrenceRule.byMonthDay[0],month:V})}}e.event.content=e.event.htmlDescription,g.postProcessHtml(e.event),e.event.participantsPublic&&u.getParticipants(n.id,0).then(function(O){e.participants=O,e.participantPage=0,e.loadMoreParticipantsPending=!1,e.$broadcast("$$rebind::refreshParticipants")})}function p(T){switch(T){case 1:return o("web_common_monday");case 2:return o("web_common_tuesday");case 3:return o("web_common_wednesday");case 4:return o("web_common_thursday");case 5:return o("web_common_friday");case 6:return o("web_common_saturday");case 0:return o("web_common_sunday")}}function v(T){switch(T){case 1:return o("web_eventDetail_recurrence_byWeekDay_first");case 2:return o("web_eventDetail_recurrence_byWeekDay_second");case 3:return o("web_eventDetail_recurrence_byWeekDay_third");case 4:return o("web_eventDetail_recurrence_byWeekDay_fourth");case-1:return o("web_eventDetail_recurrence_byWeekDay_last");case-2:return o("web_eventDetail_recurrence_byWeekDay_secondToLast");case-3:return o("web_eventDetail_recurrence_byWeekDay_thirdToLast");case-4:return o("web_eventDetail_recurrence_byWeekDay_fourthToLast")}}if(e.hideUserInteraction=1==scope.currentChapter.settings.configurations.hideAssetsForUnregisteredUsers&&0==t.scope.profile.isRegistered&&0==t.app,null===e.event&&e.$parent.$parent.event&&e.$parent.$parent.$on("eventUpdate",function(T,k){e.event=k,h(),x(),e.$broadcast("$$rebind::refresh")}),n&&h(),e.acceptJoin=function(){e.loadMoreParticipantsPending=!0,u.acceptJoinEvent(e.event.id).then(function(T){e.event.ownParticipationStatus=T.ownStatus,e.event.participantsAcceptedCount=T.acceptedCount,e.event.participantsDeclinedCount=T.declinedCount,e.event.participantsQueuedCount=T.queuedCount,e.notifyToast(T),n.participantsPublic?u.getParticipants(n.id,0).then(function(k){e.participants=k,e.participantPage=0,e.loadMoreParticipantsPending=!1,e.$broadcast("$$rebind::refreshParticipants")}):e.$broadcast("$$rebind::refreshParticipants")})},e.declineJoin=function(){e.loadMoreParticipantsPending=!0,u.declineJoinEvent(e.event.id).then(function(T){e.event.ownParticipationStatus=T.ownStatus,e.event.participantsAcceptedCount=T.acceptedCount,e.event.participantsDeclinedCount=T.declinedCount,e.event.participantsQueuedCount=T.queuedCount,e.notifyToast(T),e.event.ownParticipationStatus="DECLINED",n.participantsPublic?u.getParticipants(n.id,0).then(function(k){e.participants=k,e.participantPage=0,e.loadMoreParticipantsPending=!1,e.$broadcast("$$rebind::refreshParticipants")}):e.$broadcast("$$rebind::refreshParticipants")})},e.queueJoin=function(){e.loadMoreParticipantsPending=!0,u.queueJoinEvent(e.event.id).then(function(T){e.event.ownParticipationStatus=T.ownStatus,e.event.participantsAcceptedCount=T.acceptedCount,e.event.participantsDeclinedCount=T.declinedCount,e.event.participantsQueuedCount=T.queuedCount,e.notifyToast(T),n.participantsPublic?u.getParticipants(n.id,0).then(function(k){e.participants=k,e.participantPage=0,e.loadMoreParticipantsPending=!1,e.$broadcast("$$rebind::refreshParticipants")}):e.$broadcast("$$rebind::refreshParticipants")},T=>{e.notifyToast({changeOutcome:"web_events_reason_server_error",changeSuccess:!1,error:T})})},e.notifyToast=function(T){T.changeSuccess?DevExpress.ui.notify({message:t.scope.currentScope.network.getResourceOrKeyName(T.changeOutcome),position:{my:"center center",at:"center center"},maxWidth:"540px"},"success",3e3):(DevExpress.ui.notify({message:t.scope.currentScope.network.getResourceOrKeyName(T.changeOutcome),position:{my:"center center",at:"center center"},maxWidth:"540px"},"error",3e3),console.log(T.error))},e.loadMoreParticipants=function(){e.loadMoreParticipantsPending=!0,u.getParticipants(n.id,e.participantPage+1).then(function(T){Array.prototype.push.apply(e.participants,T),e.participantPage+=1,e.loadMoreParticipantsPending=!1,e.$broadcast("$$rebind::refreshParticipants")})},(!document.referrer||!document.referrer.startsWith(scope.globalSettings.serverCdnUrl))&&!a.get()&&history&&window.allowRedirect){var C=t.scope.currentChapter.path+f.url();history.replaceState(null,"",scope.currentChapter.path),history.pushState(null,"",C)}var A,x=function(){e.event&&e.event.assetReferences&&(A=e.event.assetReferences.reduce(function(T,k){return T[k.guid]=k,T},{}))};e.resolveAsset=function(T){return A[T]},$(window).scroll(function(T){$(T.target).scrollTop()>100?$(".articleDetail-mobileNavigation-wrapper").addClass("articleDetail-mobileNavigation-wrapper-scrolled"):$(".articleDetail-mobileNavigation-wrapper").removeClass("articleDetail-mobileNavigation-wrapper-scrolled")}),e.recommendedArticles=[],e.recommendedArticlePairs=[],e.recommendedSnips=[],e.assetsMedia=[],e.assetsFacts=[],e.assetsQuestions=[],e.assetsComments=[],e.$watch(function(){return"event.detailsLoaded"},function(T){T&&x()});var b=function(T){e.event.assetReferences.unshift(T)};e.availableTargetLanguages=null,s.getAvailableTargetLanguages().then(function(T){e.availableTargetLanguages=T}),e.selectedTargetLanguage=t.profile.favoriteLanguage,e.$on("apicodo.translate",function(T,k){e.translateEventDetail(k)});var R=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,y=t.scope.profile;if(e.isParticipationLocked=function(){const T=e.event;return!!T.lockParticipation||!!T.lockParticipationAuto&&new Date(T.lockParticipationAutoDate)<new Date},e.translateEventDetail=function(T){T&&(e.selectedTargetLanguage=T),e.currentLanguage=e.selectedTargetLanguage,null===e.selectedTargetLanguage?u.getEvent(e.event.id).then(function(k){e.event=k,e.event.assetReferences=k.assetReferences,h(),x(),e.$broadcast("$$rebind::refresh")}):u.translateEventDetail(e.event.id,e.selectedTargetLanguage).then(function(k){e.event=k,e.event.assetReferences=k.assetReferences,h(),x(),e.$broadcast("$$rebind::refresh"),c.updateFavoriteLanguage(e.selectedTargetLanguage).then(function(){t.profile.favoriteLanguage=e.selectedTargetLanguage})})},e.assetCreateOpinionDialog=function(){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateOpinionDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 0},resultCallback:function(){return b},createAssetAsync:function(){return function(T){return d.insertAssetTextToEvent(T,e.event.id)}}}})},e.assetCreateFactDialog=function(){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateFactDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 8},resultCallback:function(){return b},createAssetAsync:function(){return function(T){return d.insertAssetTextToEvent(T,e.event.id)}}}})},e.assetCreateQuestionDialog=function(){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateQuestionDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 9},resultCallback:function(){return b},createAssetAsync:function(){return function(T){return d.insertAssetTextToEvent(T,e.event.id)}}}})},e.assetCreateImageDialog=function(T,k,w){T&&0!==T.length?k.length||r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateImageDialog.html",controller:"AssetCreateImageDialog",size:"lg",resolve:{files:function(){return T},resultCallback:function(){return b},createAssetAsync:function(){return function(D){return d.insertAssetImageToEvent(D,e.event.id)}}}}):k||w.$setPristine()},e.assetCreateVideoDialog=function(){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateVideoDialog.html",controller:"AssetCreateVideoDialog",size:"lg",resolve:{resultCallback:function(){return b},createAssetAsync:function(){return function(T){return d.insertAssetTextToEvent(T,e.event.id)}}}})},e.assetCreateGifDialog=function(){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateGifDialog.html",controller:"AssetCreateGifDialog",size:"lg",resolve:{resultCallback:function(){return b},createAssetAsync:function(){return function(T){return d.insertAssetTextToEvent(T,e.event.id)}}}})},e.assetSearchDialog=function(){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetSearchDialog.html",controller:"AssetSearchDialog",size:"lg",resolve:{resultCallback:function(){return b},eventId:function(){return e.event.id},assetReferences:function(){return e.event.assetReferences}}})},e.assetImageFocuspointDialog=function(T){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){var k=null;return e.event.assetReferences.forEach(function(w){w.assetImage?.guid===e.event.coverImage.guid&&(e.event.coverImage=(k=w).assetImage)}),k}}})},e.scrollTo=function(T){$("body,html").animate({scrollTop:$(T).offset().top-120},1e3)},e.$watchCollection("event.assetReferences",function(){e.event&&(e.assetsMedia=[],e.assetsFacts=[],e.assetsQuestions=[],e.assetsComments=[],angular.isDefined(e.event.assetReferences)&&e.event.assetReferences.forEach(function(T){null!==T.assetImage||null!==T.assetText&&(5===T.assetText.type||6===T.assetText.type||7===T.assetText.type||10===T.assetText.type||13===T.assetText.type)?e.assetsMedia.push(T):null!==T.assetText&&(8===T.assetText.type?e.assetsFacts.push(T):9===T.assetText.type?e.assetsQuestions.push(T):0===T.assetText.type&&e.assetsComments.push(T))}))}),1==R){var l=t.scope.network.settings.languagePack.split("-")[0];if(null!=y.activeUserLanguage?.vendorLanguageCode&&l!=y.activeUserLanguage?.vendorLanguageCode){var M=y.activeUserLanguage?.vendorLanguageCode;e.translateEventDetail(M)}}}]),app.component("eventCalendarDisplayable",{templateUrl:"/ClientApp/src/legacy-app/event/eventCalendarDisplayable.html",bindings:{event:"<"},controller:["$rootScope","formatterService",function(e,t){var a=this;this.$onInit=function(){var n=new Date(a.event.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),u=new Date(a.event.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"});a.formattedCalendarDate=n!==u?e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_dateRange",{start:n,end:u}):e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:n})}}]}),app.component("eventCalendarExternalDisplayable",{templateUrl:"/ClientApp/src/legacy-app/event/eventCalendarExternalDisplayable.html",bindings:{event:"<"},controller:["$rootScope","formatterService",function(e,t){var a=this;this.$onInit=function(){var n=new Date(a.event.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"2-digit"}),u=new Date(a.event.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"2-digit"});n=t.eventCalendarFormatAsString(a.event.start),u=t.eventCalendarFormatAsString(a.event.end),a.formattedCalendarDate=n!==u?e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_dateRange",{start:n,end:u}):e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:n})}}]}),app.controller("EventCalendarEditController",["$rootScope","$scope","event","metaService","$timeout","$uibModal","$rootScope","proseMirrorEditorService","editorAssetsService","spellingService","eventCalendarService","logoService","editorCommentService",function(g,e,t,a,n,u,g,f,r,s,c,d,i){e.event=t,e.ccBreakingEvent=!1,e.event.breakingEvent=!1,e.showFirstPublishDialog=!1,e.enableHighQualityImage=g.scope.network.settings.configurations.enableHighQualityImage,e.closedChapter=g.scope.currentChapter.closed,e.connectedChapters=[],e.showOpenEndCheckBox=!0,e.showTagBox=!1,e.changed=!1,e.eventChapterTags=[],e.selectedEventChapters=[],g.scope.currentScope.chapter.chapterGroups&&(g.scope.currentScope.chapter.chapterGroups.filter(w=>1==w.isEventCategory).forEach(w=>{w.chapters&&(e.showTagBox=!0,w.chapters.forEach(function(D){e.eventChapterTags.push(D)}))}),e.event.chapters&&e.event.chapters.forEach(function(w){e.selectedEventChapters.push(w.id)})),e.eventCategoryTagBoxEntered=!1,e.eventCategoryTagBox={selectionOptions:{width:"auto",dataSource:e.eventChapterTags,value:e.selectedEventChapters,showSelectionControls:!0,searchEnabled:!0,displayExpr:"shortName",valueExpr:"id",selectAllText:g.scope.currentScope.network.getResourceOrKeyName("web_eventCategory_choice_check_all"),placeholder:g.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_chapterTagsPlaceholder"),onContentReady:function(w){e.dxTagBoxInstance=w.component,e.eventCategoryTagBoxEntered=!0},onValueChanged:function(w){e.dxTagBoxInstance=w.component,e.eventCategoryTagBoxEntered&&(e.editForm.$dirty=!0,e.event.chapters=[],e.dxTagBoxInstance.option("selectedItems").forEach(D=>{e.event.chapters.push(D.slug)}))}}};var h=g.scope.currentScope.chapter.settings.configurations.eventsBirthdayCalendarConfiguration;e.canPublish=!h||!0!==h.EnableApproval||g.profile.isNewsroomAdmin||6===h.MinApprovalRole&&g.profile.isHeadSales||5===h.MinApprovalRole&&g.profile.isSales||4===h.MinApprovalRole&&g.profile.isHeadJournalist||3===h.MinApprovalRole&&g.profile.isMerkuristJournalist||2===h.MinApprovalRole&&g.profile.isJournalist;var p=new Date;if(t.start||(t.start=p),t.showStartDateCalendar=!1,t.showEndDateCalendar=!1,t.recurrenceRule.hasUntil=!1,t.recurrenceRule.showStartDateCalendar=!1,t.showAutoLockParticipationDatePicker=!1,"string"==typeof t.start&&(t.start=new Date(t.start)),t.end||(t.end=new Date(t.start.setMinutes(t.start.getMinutes()+30))),"string"==typeof t.end&&(t.end=new Date(t.end)),e.endOptions={minDate:t.start,showWeeks:!1},e.toggleStartDateCalendar=function(){t.showStartDateCalendar=!t.showStartDateCalendar},e.toggleEndDateCalendar=function(){t.showEndDateCalendar=!t.showEndDateCalendar},e.toggleRecurrenceRuleHasUntilCalendar=function(){t.recurrenceRule.hasUntil=!t.recurrenceRule.hasUntil},e.toggleReccurenceStartDateCalendar=function(){t.recurrenceRule.showStartDateCalendar=!t.recurrenceRule.showStartDateCalendar},e.toggleAutoLockParticipationDatePicker=function(){t.showAutoLockParticipationDatePicker=!t.showAutoLockParticipationDatePicker},e.onChangeEventIsAllDay=function(){t.isAllDay?(e.showOpenEndCheckBox=!1,t.start&&(t.start=new Date(t.start.setHours(0,0,0,0))),t.end&&(t.end=new Date(t.end.setHours(23,59,59,999)))):e.showOpenEndCheckBox=!0},e.onChangeEventIsOpenEnd=function(){t.isOpenEnd&&t.end&&(t.end=new Date(t.start.valueOf()),t.end.setHours(23,59,59,999))},e.onFrequencyChange=function(){e.showOpenEndCheckBox=0===t.recurrenceRule.frequency},e.defaultEventPicture=d.getChapterEventPictureUrl(),e.togglePreview=function(){e.preview=!e.preview,e.$broadcast("eventUpdate",A())},e.toggleBreakingEvent=function(){e.breakingEvent=!e.breakingEvent},e.event.recurrenceRule.hasUntil=new Date(e.event.recurrenceRule.until).getFullYear()>1,e.event.recurrenceRule.hasUntil||(e.event.recurrenceRule.until=new Date(e.event.start.valueOf()).setDate(e.event.start.getDate()+1)),"string"==typeof e.event.recurrenceRule.until&&(e.event.recurrenceRule.until=new Date(e.event.recurrenceRule.until)),0===e.event.durationInSeconds?(e.event.durationValue=30,e.event.durationType=1):(e.event.durationValue=e.event.durationInSeconds,e.event.durationType=0,e.event.durationValue%60==0&&(e.event.durationValue/=60,e.event.durationType=1,e.event.durationValue%60==0&&(e.event.durationValue/=60,e.event.durationType=2,e.event.durationValue%24==0&&(e.event.durationValue/=24,e.event.durationType=3,e.event.durationValue%7==0&&(e.event.durationValue/=7,e.event.durationType=4))))),e.event.recurrenceRule.weekDays=[!1,!1,!1,!1,!1,!1,!1],5===e.event.recurrenceRule.frequency?(e.event.recurrenceRule.byDay.forEach(function(w){e.event.recurrenceRule.weekDays[w.dayOfWeek]=!0}),e.event.recurrenceRule.byDay=[]):e.event.recurrenceRule.weekDays[p.getDay()]=!0,e.event.recurrenceRule.dayType=1,!e.event.recurrenceRule.byDay.length){var v=Math.floor(p.getDate()/7)+1;5==v&&(v=-1),e.event.recurrenceRule.byDay.push({dayOfWeek:p.getDay(),offset:v}),e.event.recurrenceRule.dayType=0}e.event.recurrenceRule.byMonthDay.length||e.event.recurrenceRule.byMonthDay.push(p.getDate()),e.event.recurrenceRule.byMonth.length||e.event.recurrenceRule.byMonth.push(p.getMonth()+1),e.addWeekDayRule=function(){e.event.recurrenceRule.byDay.push({dayOfWeek:1,offset:1})},e.deleteWeekDayRule=function(w){e.event.recurrenceRule.byDay.splice(w,1)},e.$on("$destroy",function(){a.setFavicon()});var C=g.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_leaveMessage");function A(){var w=JSON.parse(JSON.stringify(e.event));switch(w.jsonDescription=f.getDocument(),w.htmlDescription=f.getHtmlDocument(),w.durationInSeconds=w.durationValue,w.durationType){case 0:break;case 1:w.durationInSeconds*=60;break;case 2:w.durationInSeconds*=3600;break;case 3:w.durationInSeconds*=86400;break;case 4:w.durationInSeconds*=604800}if(0!==w.recurrenceRule.frequency&&(w.end=null,w.isAllDay=!1),w.recurrenceRule.frequency<=5&&(w.recurrenceRule.byDay=[],w.recurrenceRule.byMonthDay=[]),w.recurrenceRule.frequency<=6&&(w.recurrenceRule.byMonth=[]),5===w.recurrenceRule.frequency?w.recurrenceRule.weekDays.forEach(function(U,I){U&&w.recurrenceRule.byDay.push({dayOfWeek:I})}):1===w.recurrenceRule.dayType?w.recurrenceRule.byMonthDay=[]:w.recurrenceRule.byDay=[],7===w.recurrenceRule.frequency&&(w.recurrenceRule.byMonthDay.splice(1),w.recurrenceRule.byDay.splice(1)),w.isAllDay){var D=new Date(w.start);w.start=D.getFullYear()+"-"+(D.getMonth()+1)+"-"+ +D.getDate();var S=new Date(w.end);w.end=S.getFullYear()+"-"+(S.getMonth()+1)+"-"+ +S.getDate()}return w.isOpenEnd&&(w.isAllDay=!1),w.recurrenceRule&&!w.recurrenceRule.hasUntil&&(w.recurrenceRule.until=null),w.allowJoin||(w.showParticipants=!1,w.maxParticipants=null),w.maxParticipants<1&&(w.maxParticipants=null),w.lockParticipation&&(w.lockParticipationAuto=!1,w.lockParticipationAutoDate=null),w}window.onbeforeunload=function(){if(e.changed)return C},preventNavigation=!1,g.$on("$stateChangeStart",function(w,D){if(preventNavigation)w.preventDefault();else if(e.changed&&!confirm(C)){preventNavigation=!0,w.preventDefault();var S=!1;n(function(){preventNavigation=!1},1e3)}else e.changed=!1,S&&(closeConnection(),S=!1)}),e.$watch("event.lockParticipation",function(w){}),e.$watch("event.start",function(w){if(e.endOptions.minDate=w,e.event.end<w&&((D=new Date(w.valueOf())).setHours(e.event.end.getHours()),D.setMinutes(e.event.end.getMinutes()),D<w&&D.setDate(D.getDate()+1),e.event.end=D),e.event.recurrenceRule.until<w){var D=new Date(w.valueOf());e.event.recurrenceRule.until=D}}),e.save=function(){e.event.chapters=e.dxTagBoxInstance.option("selectedItems"),c.updateEvent(e.event.id,A()).then(function(w){e.editForm.$dirty=!1,e.event.unpublishedRevisionGuid=w})},e.eventFirstPublishDialog=function(){u.open({templateUrl:"/ClientApp/src/legacy-app/event/eventFirstPublishDialog.html",controller:"eventFirstPublishDialogController",resolve:{networkChapters:function(){return e.networkChapters},ccBreakingEvent:function(){return e.ccBreakingEvent}}}).result.then(function(D){e.networkChapters=D.selectedChapters,e.ccBreakingEvent=D.ccBreakingEvent,c.publishContentConnectEvent(e.event.unpublishedRevisionGuid,e.event.breakingEvent,e.networkChapters,e.ccBreakingEvent).then(function(){e.event.unpublishedRevisionGuid=null})},function(){})},e.publish=function(){!e.event.published&&g.scope.currentScope.network.settings.featureContentConnect&&g.scope.currentScope.chapter.settings.configurations.enableEventCalendar?e.eventFirstPublishDialog():c.publishEvent(e.event.unpublishedRevisionGuid,e.event.breakingEvent).then(function(){e.event.unpublishedRevisionGuid=null})},e.requestPublish=function(){c.requestEventPublish(e.event.id).then(function(){e.event.publishRequested=!0})},e.requestPublish=function(){c.requestEventPublish(e.event.id).then(function(){e.event.publishRequested=!0})},e.onChangeLockParticipationAuto=function(){if(t.lockParticipationAuto){if(t.lockParticipationAutoDate)return;t.lockParticipationAutoDate=p}else t.lockParticipationAutoDate=null},e.pickCoverAsset=function(){u.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 2},single:function(){return!0},hideInComments:function(){return!0},resultCallback:function(){return function(w){e.event.coverImage=w.assetImage,e.editForm.$dirty=!0}},event:function(){return e.event}}})},$(".articleEdit-wrapper").scroll(function(){!function T(){$(".proseMirror-wrapper").offset().top<50?$(".proseMirror-wrapper").addClass("sticky"):$(".proseMirror-wrapper").removeClass("sticky")}()}),e.numberOfWords=s.countWords(e.event.htmlDescription);var k=function(w){n(function(){e.event.jsonDescription!==w&&(e.event.jsonDescription=w,e.numberOfWords=s.countWords(f.getHtmlDocument()),e.editForm.$dirty=!0)})};f.init({docID:"event_"+t.id,assetDlgFactory:function(w,D){u.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 0},single:function(){return!1},hideInComments:function(){return!0},resultCallback:function(){return function(S){if(D&&S.length>0){f.setFocus();var U=[];$.each(S,function(I,m){var F=null;m.assetImage&&(F=m.assetImage.type),m.assetText&&(F=m.assetText.type),m.assetArticle&&(F=m.assetArticle.type),m.assetFile&&(F=m.assetFile.type),U.push({guid:m.guid,type:F})}),D(U)}}},event:function(){return e.event}}})},initialDocument:t.jsonDescription,initialAssetReferences:t.assetReferences,assetResolver:function(w){return r.getAsset(w,e.event.assetReferences)},commentCreationDlgFactory:function(w,D){u.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createEditorCommentDialog.html",controller:"CreateEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{editorCommentCallback:function(){return D},messageHolder:function(){return new MessageHolder(e.event)},sourceService:function(){return i}}})},commentMgmtDlgFactory:function(w,D,S){u.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/listEditorCommentDialog.html",controller:"ListEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{onDeletedCallback:function(){return S},onAddedCallback:function(){return D},messageHolder:function(){return new MessageHolder(e.event)},chainComments:function(){return w},sourceService:function(){return i}}})},createLinkFactory:function(w){u.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createLinkDialog.html",controller:"CreateLinkDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return w}}})},callToActionDlgFactory:function(w,D){u.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createCallToActionDialog.html",controller:"CreateCallToActionDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return D}}})},onNewStateFactory:k,onLoadTransactionCallback:k,languageCode:g.scope.currentScope.network.settings.languageCode}),g.$on("$stateChangeStart",function(w,D){f.closeConnection()})}]),app.factory("eventCalendarService",["$rootScope","$http","$q","authService",function(e,t,a,n){var u=[];return{getEventCalendarEventData:function(){var y=a.defer();return 0===u.length?t.get(scope.apiEndpoint+"eventcalendar/eventList").then(function(l){y.resolve(u=l.data)},function(){y.reject()}):y.resolve(u),y.promise},createEvent:function(){var y=a.defer();return t.post(scope.apiEndpoint+"eventcalendar").then(function(l){y.resolve(l.data)},function(){y.reject()}),y.promise},updateEvent:function(y,l){var M=a.defer();return t.put(scope.apiEndpoint+"eventcalendar/"+y,l).then(function(T){M.resolve(T.data)},function(){M.reject()}),M.promise},deleteEvent:function(y){var l=a.defer();return t.delete(scope.apiEndpoint+"eventcalendar/"+y).then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},publishEvent:function(y,l){var M=a.defer();return t.post(scope.apiEndpoint+"eventcalendar/"+y+"/publish?breaking="+(l?"true":"false")).then(function(k){M.resolve(k.data)},function(){M.reject()}),M.promise},requestEventPublish:function(y){var l=a.defer();return t.post(scope.apiEndpoint+"eventcalendar/"+y+"/requestPublish").then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},getEvent:function(y){var l=a.defer();return t.get(scope.apiEndpoint+"eventcalendar/"+y+"?forEdit=false").then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},getEventForEdit:function(y){var l=a.defer();return t.get(scope.apiEndpoint+"eventcalendar/"+y+"?forEdit=true").then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},getEventsForAuthorDashboard:function(){var y=a.defer();return t.get(scope.apiEndpoint+"eventcalendar/authorDasboardList").then(function(l){y.resolve(l.data)},function(){y.reject()}),y.promise},getParticipants:function(y,l,M){var T=a.defer(),k=scope.apiEndpoint+"eventcalendar/"+y+"/participants?page="+l;return M&&M>0&&(k+="&elementsPerPage="+M),t.get(k).then(function(w){T.resolve(w.data)},function(){T.reject()}),T.promise},acceptJoinEvent:function(y){var l=a.defer();return t.post(scope.apiEndpoint+"eventcalendar/"+y+"/join/accept").then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},declineJoinEvent:function(y){var l=a.defer();return t.post(scope.apiEndpoint+"eventcalendar/"+y+"/join/decline").then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},translateEventDetail:function(y,l){var M=a.defer();return t.get(scope.apiEndpoint+"eventcalendar/"+y+"/translate/"+l).then(function(T){M.resolve(T.data)},function(){M.reject()}),M.promise},congratulateToBirthday:function(y,l){var M=a.defer(),T=JSON.stringify(l);return T=T.substring(1,T.length-1),t.post(scope.apiEndpoint+"eventcalendar/"+y+"/congratulateForBirthday?occurance="+T).then(function(k){M.resolve(k.data)},function(){M.reject()}),M.promise},queueJoinEvent:function(y){var l=a.defer();return t.post(scope.apiEndpoint+"eventcalendar/"+y+"/join/queue").then(function(M){l.resolve(M.data)},function(){l.reject()}),l.promise},publishContentConnectEvent:function(y,l,M,T){var k=a.defer();return t.post(scope.apiEndpoint+"eventCalenderContentConnect/"+y+"/publishContentConnect",{ownerBreakingEvent:l,chapterNetworks:M,ccBreakingEvent:T}).then(function(D){k.resolve(D.data)},function(){k.reject()}),k.promise}}}]),app.component("eventFirstPublishDialog",{templateUrl:"/ClientApp/src/legacy-app/event/eventFirstPublishDialog.html",bindings:{resolve:"<",close:"&",dismiss:"&"}}),app.controller("eventFirstPublishDialogController",["$scope","$rootScope","articleService","$uibModalInstance",function(e,t,a,n){e.ccFullControl=t.scope.currentScope.network.settings.configurations.ccFullControl,e.showContentConnectTagBox=!0,e.networkChapters=[],e.ccBreakingEvent=!1,e.publishButtonLabel=t.scope.currentScope.network.getResourceOrKeyName(t.scope.currentScope.chapter.settings.enablePublishWorkflowForJournalists&&e.isJournalistOnly?"web_common_submit":"web_common_publish"),e.showContentConnectTagBox=e.networkChapters.length>0&&t.scope.network.featureContentConnect,e.contentConnectTagBox={selectionOptions:{width:"90%",dataSource:e.networkChapters,showSelectionControls:!0,searchEnabled:!0,displayExpr:"name",selectAllText:t.scope.currentScope.network.getResourceOrKeyName("web_rubric_choice_check_all"),placeholder:t.scope.currentScope.network.getResourceOrKeyName("web_articleDialog_createPublish_contentConnectPlaceholder"),onContentReady:function(g){e.dxTagBoxInstance=g.component}}},a.getEventContentConnectNetworks().then(function(g){g.length>0&&(e.showContentConnectTagBox=!0),g.forEach(function(f){f.networkChapters.forEach(function(r){e.dxTagBoxInstance.getDataSource().store().insert({name:f.name+": "+r.name,chapterNetwork:{chapterSlug:r.slug,networkSlug:f.slug,isOwnNetwork:r.isOwnNetwork}})})}),e.dxTagBoxInstance.load()}),e.$onInit=function(){e.networkChapters=e.resolve.networkChapters},e.publish=function(){var g={selectedChapters:e.dxTagBoxInstance.option("selectedItems").map(function(f){return f.chapterNetwork}),ccBreakingEvent:e.ccBreakingEvent};n.close(g)}}]),app.component("snipEventCalendarDisplayable",{templateUrl:"/ClientApp/src/legacy-app/event/snipEventCalendarDisplayable.html",bindings:{snip:"<",horizontal:"<"},controller:["$rootScope",function(e){var t=this;this.$onInit=function(){var a=new Date(t.snip.calendarDate).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"});t.formattedCalendarDate=e.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:a}),t.snip.isToday=t.isToday}}]}),app.component("sponsoredArticleEventCalendarDisplayable",{templateUrl:"/ClientApp/src/legacy-app/event/sponsoredArticleEventCalendarDisplayable.html",bindings:{sparticle:"<"},controller:function(){var e=this;this.$onInit=function(){e.formatedCalendarDate=moment(e.sparticle.calendarDate).format("dddd")+", der "+new Date(e.sparticle.calendarDate).getDate()+". "+moment(e.sparticle.calendarDate).format("MMMM")}}}),app.filter("absoluteUrl",function(){return function(e){return e?0!=e.indexOf("http://")&&0!=e.indexOf("https://")?"http://"+e:e:""}}),app.filter("apicodoMediaServiceEmbed",["$sce","authService",function(e,t){return function(a){return e.trustAsResourceUrl(t.mediaApiBase.url+"/play/"+a.split("|")[0]+"?guiMode=iframe&token="+a.split("|")[1]+"&platform=external")}}]),app.filter("apicodoMediaServiceWatch",["$sce","authService",function(e,t){return function(a){return e.trustAsResourceUrl(t.mediaApiBase.url+"/play/"+a.split("|")[0]+"?guiMode=iframe&token="+a.split("|")[1]+"&platform=external")}}]),app.filter("apicodoMediaServiceImage",["$sce","authService",function(e,t){return function(a){return e.trustAsResourceUrl(t.mediaApiBase.url+"/api/Asset/"+a+"/Thumbnail000001.jpg")}}]),app.filter("dailymotionEmbed",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//www.dailymotion.com/embed/video/"+t+"?logo=0&related=0&highlight=00a9fd")}}]),app.filter("datePastOrNow",function(){return function(e){return moment()<moment(e)?moment():moment(e)}}),app.filter("encodeURIComponent",function(){return window.encodeURIComponent}),app.filter("escapeHtml",[function(){return function(e){return e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}}]),app.filter("facebookEmbed",["$sce","$rootScope",function(e,t){return function(a){return e.trustAsResourceUrl("//www.facebook.com/plugins/video.php?href="+window.encodeURIComponent("https://www.facebook.com/".concat(a))+"%2F&show_text=0&width=600&height=338")}}]),app.filter("facebookWatch",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//www.facebook.com/"+t+"/")}}]),app.filter("facebookImage",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//graph.facebook.com/"+t.split("/")[2]+"/picture")}}]),app.filter("includeMyUnpublishedSnips",function(){return function(e,t){Array.isArray(e)||(e=[]);var a=function(r,s){return r?.user?.guid?.toLowerCase()===s?.toLowerCase()},u=e.filter(function(r){return a(r,t)&&!function(r){return null!==r.deleted}(r)}),g=e.filter(function(r){return!r||!a(r,t)&&r?.published});return u.concat(g)}}),app.filter("moment",function(){return function(e,t){var a=Array.prototype.slice.call(arguments,2),n=moment(e);return n[t].apply(n,a)}}),app.filter("momentShortDateFormat",["$rootScope",function(e){return function(){return moment(arguments[0]).locale(e.scope.currentScope.network.settings.languageCode).format("L")}}]),app.filter("momentShortDateTimeFormat",["$rootScope",function(e){return function(){var t=moment(arguments[0]),a=e.scope.currentScope.network.settings.languageCode;return t.locale(a).format("L")+" "+t.locale(a).format("LT")}}]),app.filter("parseUrl",function(){"use strict";return function(t){return function e(t){if(t)return t.replace(/(?:https?\:\/\/|www\.)+(?![^\s]*?")([\w.,@?!^=%&amp;:\/~+#-]*[\w@?!^=%&amp;\/~+#-])?/gi,function(n){var u=document.createElement("div"),g=document.createElement("a");return 0!=n.indexOf("http://")&&0!=n.indexOf("https://")&&(n="http://"+n),g.href=n,g.target="_blank",g.innerHTML=n.replace(/.*?:\/\/(www\.)?/g,""),u.appendChild(g),u.innerHTML})||""}(t)}}),app.filter("readableMilliseconds",function(){return function(e){var t,a,u,g,f,r,s,c,d,i,o,h,p,v,C,A;switch(v=parseInt(e)<0,C=parseInt(e)/1e3,C=Math.abs(C),g=7*(t=24*(a=3600)),u=(f=365*t)/12,A={years:null,months:null,weeks:null,days:null,hours:null,minutes:null,seconds:null},r=function(){return("        "+(v?"-":"")+"        "+(A.years?" "+A.years+"yr":"")+"        "+(A.months?" "+A.months+"mth":"")+"        "+(A.weeks?" "+A.weeks+"w":"")+"        "+(A.days?" "+A.days+"d":"")+"        "+(A.hours?" "+A.hours+"h":"")+"        "+(A.minutes?" "+A.minutes+"m":"")+"        "+(A.seconds?" "+A.seconds+"s":"")+"        ").trim()},o=function(x,b){return null==b&&(b=0),A.seconds=1===b?x.toFixed(1):Math.floor(x),r()},d=function(x){return A.minutes=Math.floor(x/60),o(x-60*A.minutes)},c=function(x){return A.hours=Math.floor(x/a),d(x-A.hours*a)},s=function(x){return A.days=Math.floor(x/t),c(x-A.days*t)},h=function(x){return A.weeks=Math.floor(x/g),s(x-A.weeks*g)},i=function(x){return A.months=Math.floor(x/u),h(x-A.months*u)},p=function(x){return A.years=Math.floor(x/f),i(x-A.years*f)},!1){case!(C<60):return o(C,1);case!(C<a):return d(C);case!(C<t):return c(C);case!(C<g):return s(C);case!(C<u):return h(C);case!(C<f):return i(C);default:return p(C)}}}),app.directive("translateText",["$compile","$rootScope","translationService","$timeout","$sce","$sanitize",function(e,t,a,n,u,g){return{restrict:"A",scope:{translateText:"="},link:function(f,r){f.$watch("translateText",function(s){if(s){var c=[s];n(function(){a.translateByUserLanguageCode(c).then(d=>{var o=g(d[0].translation),p=e("<div>"+o+"</div>")(f.$parent);r.empty(),angular.element(r).append(p.contents())}).catch(d=>{var o=g(s),p=e("<div>"+o+"</div>")(f.$parent);r.empty(),angular.element(r).append(p.contents())})},0)}else r.empty()},!0)}}}]),app.directive("translateUnSanitized",["$compile","$rootScope","translationService","$timeout","$sce",function(e,t,a,n,u){return{restrict:"A",scope:{translateUnSanitized:"="},link:function(g,f){g.$watch("translateUnSanitized",function(r){if(r){var s=[r];n(function(){a.translateByUserLanguageCode(s).then(c=>{var o=e("<div>"+c[0].translation+"</div>")(g.$parent);f.empty(),angular.element(f).append(o.contents())}).catch(c=>{var o=e("<div>"+r+"</div>")(g.$parent);f.empty(),angular.element(f).append(o.contents())})},0)}else f.empty()},!0)}}}]),app.filter("trustUrl",["$sce",function(e){return function(t){return e.trustAsResourceUrl(t)}}]),app.filter("vimeoEmbed",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//player.vimeo.com/video/"+t.split("|")[0].split("/")[0]+"?badge=0&portrait=0&byline=0")}}]),app.filter("vimeoWatch",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//vimeo.com/"+t.split("|")[0])}}]),app.filter("vimeoImage",["$sce",function(e){return function(t){var a=t.split("|")[1];return a||(a="/Content/images/vimeo_logo.jpg"),e.trustAsResourceUrl(a)}}]),app.filter("youtubeEmbed",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//www.youtube.com/embed/"+t.split("||")[0]+"?modestbranding=1&amp;rel=0")}}]),app.filter("youtubeWatch",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//youtu.be/"+t.split("||")[0])}}]),app.filter("youtubeImage",["$sce",function(e){return function(t){return e.trustAsResourceUrl("//img.youtube.com/vi/"+t.split("||")[0]+"/0.jpg")}}]),app.factory("backendHubProxy",["$rootScope",function(e){return function t(a){var n=$.hubConnection(),u=n.createHubProxy(a);return u.connection.logging=!0,{on:function(g,f){u.on(g,function(r){e.$apply(function(){f&&f(r)})})},invoke:function(g,f,r){u.invoke(g,f).done(function(s){e.$apply(function(){r&&r(s)})})},start:function(g){n.start().done(function(){g&&g()}).catch(function(f){console.log(f.toString())})},stop:function(g){n.stop(),g&&g()}}}}]),app.controller("IkUpLandingPageController",["$scope","$rootScope","ikUpLandingPageService","$location","$timeout","$window",function(e,t,a,n,u,g){switch(e.input={},e.description=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_description"),e.placeholder=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_companyKey"),e.loginbutton=t.scope.currentScope.network.getResourceOrKeyName("web_common_login"),(g.navigator.language||g.navigator.userLanguage).substring(0,2).toLowerCase()){case"en":t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_description_en")&&(e.description=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_description_en")),t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_companyKey_en")&&(e.placeholder=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_companyKey_en")),t.scope.currentScope.network.getResourceOrKeyName("web_common_login_en")&&(e.loginbutton=t.scope.currentScope.network.getResourceOrKeyName("web_common_login_en"));break;case"fr":t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_description_fr")&&(e.description=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_description_fr")),t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_companyKey_fr")&&(e.placeholder=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_companyKey_fr")),t.scope.currentScope.network.getResourceOrKeyName("web_common_login_fr")&&(e.loginbutton=t.scope.currentScope.network.getResourceOrKeyName("web_common_login_fr"))}e.request=function(){a.getCompanyKey(e.input.companyKey).then(function(r){let s=new URL(n.absUrl());if(r)window.location.href=s.origin+s.pathname+"?id="+r.landingSwitchRedirectId;else{var d=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_noMatches");switch((g.navigator.language||g.navigator.userLanguage).substring(0,2).toLowerCase()){case"en":t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_noMatches_en")&&(d=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_noMatches_en"));break;case"fr":t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_noMatches_fr")&&(d=t.scope.currentScope.network.getResourceOrKeyName("web_sharedApp_noMatches_fr"))}e.input.noMatches=d,u(function(){e.input.noMatches=""},2e3)}})}}]),app.factory("ikUpLandingPageService",["$http","$q",function(e,t){return{getCompanyKey:function(n){var u=t.defer();return e.post(scope.apiEndpoint+"companyKeys",{Key:n}).then(function(g){u.resolve(g.data)}),u.promise}}}]),app.controller("ChapterSwitchDialog",["$scope","$rootScope","profileService","scopeService","$stateParams",function(e,t,a,n,u){scope.network.settings.configurations.chapterSwitchGrantedChaptersOnly?a.getProfile().then(function(g){e.aprofile=g;for(var f=[],r=0;r<scope.network.chapters.length;r++)(g.closedChapterSlugs.includes(scope.network.chapters[r].slug)||!scope.network.chapters[r].closed)&&f.push(scope.network.chapters[r]);e.chapterList=f}):e.chapterList=scope.network.chapters}]),app.controller("IndexController",["$scope","$rootScope","$location","authService","$uibModal","$window","profileService","$timeout",function(e,t,a,n,u,g,f,r){var s=function(){"unrecognized"!==ResponsiveBootstrapToolkit.current()?t.mobile=ResponsiveBootstrapToolkit.is("<=sm"):r(s)};s(),$(window).resize(function(){e.$apply(function(){t.mobile=ResponsiveBootstrapToolkit.is("<=sm")})}),e.login=function(){u.open({templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationDialog.html",controller:"AuthenticationDialog",size:"lg",resolve:{authenticationCallback:function(){return function(){}},facebookSignUpData:!1,login:!0}})},e.profile=f.profile,e.authentication=n,f.getProfile().then(function(){r(function(){e.loaded=!0})}),e.openSnip=function(){var c=u.open({templateUrl:"/ClientApp/src/legacy-app/article/articleCreate.html",controller:"ArticleCreateController",size:"lg",resolve:{}});c.result.then(function(d){},function(){}),c.opened.then(function(){})},e.isActive=function(c){return c===a.path()}}]),app.controller("AppLandingController",["$rootScope","$scope","profileService",function(e,t,a){t.chapterClick=function(n){e.switchChapter(n)}}]),app.controller("LandingController",["$rootScope","$scope","profileService","scopeService","logoService","pageMetaInfoService","$state",function(e,t,a,n,u,g,f){t.success=!1,t.networkLogoUrl=u.getNetworkLogoUrl(),t.logoService=u,g.run("home"),t.switchChapter=function(r,s){s.preventDefault(),e.switchChapter(r)},t.submitForm=function(r){r&&a.insertProposedCity(t.proposedCity).then(function(s){t.success=!0},function(){}).then(function(){})},t.updatePageMetaInfo=function(r){g.run(r)}}]),app.controller("MarketResearchElasticReportController",["$scope","$rootScope","marketResearchService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var i,o,h,s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",c=[{color:s},{color:"#cccccc"},{color:"#b53967"},{color:"#00a9fd"},{color:"#9d4f9f"},{color:"#8e6fff"},{color:"#00ffeb"},{color:"#63223a"},{color:"#00496d"},{color:"#d4aad5"},{color:"#160066"},{color:"#e5cce6"},{color:"#ff5733"},{color:"#33ff57"},{color:"#5733ff"},{color:"#ffd700"},{color:"#ff1493"},{color:"#00ced1"},{color:"#adff2f"},{color:"#ff4500"},{color:"#7f00ff"},{color:"#ff6347"}],d=[],p=[];e.report=null,e.totalImpressionTime=0,e.totalImpressionCount=0,e.filterDisabled=!1,e.startDay=null,e.endDay=null,e.totalClickCount=0;var v=function(b){var R=0,y=0,l=0;p.forEach(function(M,T){p[T].value=0}),$.each(b,function(M,T){R+=T.impressionTime,y+=T.impressionCount,$.each(T.answers,function(k,w){$.each(p,function(D,S){if(S.id===w.id)return S.value+=w.clicks,void(l+=w.clicks)})})}),e.$apply(function(){e.totalImpressionTime=R,e.totalImpressionCount=y,e.totalClickCount=l}),h.validateData(),i.validateData(),o.validateData()},C=function(){var b=moment(i.startDate).startOf("day").toDate(),R=moment(i.endDate).startOf("day").toDate(),y=e.report.filter(function(l){return l.day>=b&&l.day<=R});v(y),o.zoom(b,moment(R).add(1,"d").toDate()),e.$apply(function(){e.startDay=b,e.endDay=R})};e.filterChapter=function(b){b.filtered=!b.filtered,function(){var b=e.chapters.filter(function(R){return!R.filtered}).map(function(R){return R.id});e.filterDisabled=!0,a.getReport({marketResearchId:e.marketResearch.id,marketResearchQuestionId:e.marketResearch.questionId,chapterIds:b}).then(function(R){R.forEach(function(y){y.day=moment(y.day.replace("Z","")).toDate()}),e.report=R,f(function(){(function(b){d.length=0,$.each(b,function(R,y){d.push(y)}),i.validateData(),o.validateData()})(R),C(),e.filterDisabled=!1},50)})}()},e.chapterFilterDisabled=function(b){return e.filterDisabled||1===e.chapters.filter(function(R){return!R.filtered}).length&&!b.filtered},a.getMarketResearch(u.id).then(function(b){e.marketResearch=b,b.questions[0].answers.forEach(function(R,y){p.push({title:R.text,value:0,id:R.intId,color:p.length<c.length?c[p.length].color:"#000000"})}),a.getReport({marketResearchId:u.id,marketResearchQuestionId:b.questionId}).then(function(R){R.forEach(function(l){l.day=moment(l.day.replace("Z","")).toDate()}),e.report=R,e.startDay=R[0].day,e.endDay=R[R.length-1].day;var y=[];$.each(b.chapterSlugs,function(l,M){y.push(n.getChapter(M))}),y=y.filter(function(l){return 2===l.managementState}),e.chapters=y,$.each(R,function(l,M){d.push(M)}),f(function(){(i=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"}],dataProvider:d,categoryField:"day"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"impressionCount",valueField:"impressionCount"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"impressionCount",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).addListener("zoomed",function(){C()}),o=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:s,fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"},{fromField:"clickCount",toField:"clickCount"}],dataProvider:d,categoryField:"day"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.resources.web_report_viewableImpressions,id:"impressionCount",type:"smoothedLine",valueField:"impressionCount",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.resources.web_report_viewableImpressions+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clickCount",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),h=AmCharts.makeChart("chartAnswers",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:p,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%\nClicks: [[value]]"}),v(R)})},function(){e.error=!0})})}]),app.controller("MarketResearchReportController",["$scope","$rootScope","marketResearchService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";a.getMarketResearch(u.id).then(function(d){e.marketResearch=d,a.getReportMarketResearchCalendar(u.id).then(function(i){i.forEach(function(o){o.chapter=n.getChapter(o.chapterSlug),o.reports.forEach(function(h){h.calendar.forEach(function(p){p.start=moment(p.start.replace("Z","")).toDate(),p.end=moment(p.end.replace("Z","")).toDate()})})}),d.report=i,f(function(){var o,h,p,v=[],C=new Set;$.each(i,function(T,k){k.active=!0,C.add(k.chapter.name)}),i.uniqueChapters=[],C.forEach(function(T){i.uniqueChapters.push(T)});var A=[],x=function(){A.length=0,$.each(i[0].reports[0].calendar,function(T,k){A.push({start:k.start,end:k.end,impressions:0,viewableImpressions:0,clicks:0,impressionTime:0})}),$.each(i,function(T,k){k.active&&(i[T-1]&&2===i[T-1].chapter.managementState&&2===k.chapter.managementState&&i[T-1].chapter.name!==k.chapter.name&&(i.multiChapterShipment=!0),$.each(k.reports,function(w,D){var S=D.marketResearch.id;$.each(D.calendar,function(U,I){I.id=S,A[U].impressions+=I.impressions,A[U].viewableImpressions+=I.viewableImpressions,A[U].impressionTime+=I.impressionTime,null!==I.marketResearchAnswerId&&(A[U].clicks+=I.impressions)})}))}),h.validateData(),o.validateData()},y=i.summary={};o=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"}],dataProvider:A,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"viewableImpressions",valueField:"viewableImpressions"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"viewableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),h=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"impressions",toField:"impressions"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"clicks",toField:"clicks"},{fromField:"clickThroughRate",toField:"clickThroughRate"}],dataProvider:A,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_impressions"),type:"smoothedLine",valueField:"impressions",periodValue:"Sum",comparable:!0,balloonText:"Einblendungen: <i class='fa fa-eye-slash'></i> [[value]]",lineAlpha:.5,fillAlphas:.05,periodValueText:"[[value.sum]]",visibleInLegend:!1},{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),id:"viewableImpressions",type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clicks",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),p=AmCharts.makeChart("chartAnswers",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:v,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%\nClicks: [[value]]"});var T,M=function(){var T=moment(o.startDate).startOf("day").toDate(),k=moment(o.endDate).startOf("day").add(-1,"d").toDate();(function(T,k){y.viewableImpressions=0,y.impressions=0,y.clicks=0,y.impressionTime=0,y.start=T,y.end=k,$.each(A,function(w,D){var S=new Date(D.start);S<T||S>k||(y.viewableImpressions+=D.viewableImpressions,y.impressions+=D.impressions,y.clicks+=D.clicks,y.impressionTime+=D.impressionTime)}),p.validateData(),h.validateData(),e.$apply()})(T,k),function(T,k){v.forEach(function(w,D){v[D].value=0}),$.each(i,function(w,D){D.active&&$.each(D.reports,function(S,U){$.each(U.calendar,function(I,m){var F=new Date(m.start);F<T||F>k||m.impressions>0&&null!==m.marketResearchAnswerId&&m.start>=T&&m.end<=k&&v.forEach(function(E,V){v[V].answerId!==m.marketResearchAnswerId||(v[V].value+=m.impressions)})})})}),p.validateData(),e.$apply()}(T,k),h.zoom(T,moment(k).add(1,"d").toDate())};o.addListener("zoomed",function(T){M()}),e.toggleReport=function(T){$.each(i,function(k,w){w.chapter.name===T&&(w.active=!w.active)}),f(function(){x(),M()},50)},x(),(T=d.questions[0].answers).sort(function(k,w){return(k.id>w.id)-(k.id<w.id)}),T.forEach(function(k,w){v.push({title:k.text,value:0,answerId:k.id,color:v.length<=c.length?c[v.length].color:"#000000"})}),M()},function(){e.error=!0})})},function(){r.path("/")});var c=[{color:s},{color:"#cccccc"},{color:"#b53967"},{color:"#00a9fd"},{color:"#9d4f9f"},{color:"#8e6fff"},{color:"#00ffeb"},{color:"#63223a"},{color:"#00496d"},{color:"#d4aad5"},{color:"#160066"},{color:"#e5cce6"}]}]),app.factory("marketResearchService",["$http","$q","$rootScope","authService","profileService","$location",function(e,t,a,n,u,g){return{getMarketResearch:function(d){var i=t.defer();return e.get(scope.apiEndpoint+"marketresearch/"+d).then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},getReportMarketResearchCalendar:function(d){var i=t.defer();return e.get(scope.apiEndpoint+"marketresearch/"+d+"/ReportMarketResearchCalendar").then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},getReportMarketResearchAnswers:function(d){var i=t.defer();return e.get(scope.apiEndpoint+"marketresearch/"+d+"/ReportMarketResearchAnswers").then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},getReport:function(d){var i=t.defer();return e.post(scope.apiEndpoint+"marketResearch/report",d).then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise}}}]),app.component("apicodoMediaManager",{templateUrl:"/ClientApp/src/legacy-app/media/apicodoMediaManagerComponent.html",bindings:{callback:"<"},controller:["$scope","$element","$stateParams","$location","$rootScope","profileService","apicodoMediaService","authService",function(e,t,a,n,u,g,f,r){var s=this;s.uploading=!1,s.isInitialized=!1,s.apicodoBaseUrl=r.mediaApiBase.url,s.odataBaseUrl=s.apicodoBaseUrl+"/api/odata/",s.apiBaseUrl=s.apicodoBaseUrl+"/api/",DevExpress.localization.locale(u.scope.currentScope.network.settings.languageCode),s.refreshGrid=function(){s.gridInstance.refresh()},s.executeClickCallback=function(d){s.callback&&s.callback({text:s.apicodoBaseUrl+"/play/"+d.row.data.id+"?guiMode=iframe",title:d.row.data.title,attachment:d.row.data.id,thumbnailUrl:s.apicodoBaseUrl+"/api/Asset/"+d.row.data.id+"/Thumbnail000001.jpg"})},f.getConnectionData().then(function(d){s.token=d.token,s.odataBaseUrl=d.apiBase+"/api/odata/",s.gridInstance=$("#mediaGridContainer").dxDataGrid({dataSource:{store:new DevExpress.data.ODataStore({url:s.getGridUrl(),key:"id",keyType:"Guid",version:4,withCredentials:!0,beforeSend:function(i){i.headers=s.getHeaders()}})},paging:{pageSize:5},pager:{showPageSizeSelector:!0,allowedPageSizes:[5,10,25,50,100]},remoteOperations:!0,searchPanel:{visible:!0,highlightCaseSensitive:!0},showColumnHeaders:!1,showColumnLines:!1,showRowLines:!1,columns:[{width:75,allowFiltering:!1,allowSorting:!1,dataField:"id",cellTemplate:function(i,o){$("<div>").append($("<button>",{class:"btn btn-green action-button",click:function(){s.callback&&s.callback({text:s.apicodoBaseUrl+"/play/"+o.data.id+"?guiMode=iframe",title:o.data.title,attachment:o.data.id,thumbnailUrl:s.apicodoBaseUrl+"/api/Asset/"+o.data.id+"/Thumbnail000001.jpg"})}}).append($("<img>",{src:s.apicodoBaseUrl+"/api/Asset/"+o.data.id+"/Thumbnail000001.jpg",height:20}))).appendTo(i)}},{dataField:"title",caption:"Name"},{dataField:"description",caption:"Description",visible:!1},{dataField:"createdOn",sortIndex:0,sortOrder:"desc",visible:!1}]}).dxDataGrid("instance"),s.uploaderInstance=$("#mediaFileUploader").dxFileUploader({name:"file",multiple:!1,accept:"video/*",value:[],chunkSize:5e5,uploadMode:"instantly",labelText:u.scope.currentScope.network.getResourceOrKeyName("web_upload_drag_drop_here"),selectButtonText:u.scope.currentScope.network.getResourceOrKeyName("web_upload_video_button"),uploadHeaders:s.getHeaders(),uploadUrl:s.getFileUploaderUrl(),onValueChanged:function(i){var o=i.value;o.length>0&&$.each(o,function(h,p){var v=(new DevExpress.data.Guid)._value;p.guid=v})},onUploadStarted:function(i){s.uploading=!0},onUploadAborted:function(i){s.uploading=!1},onUploadError:function(i){s.uploading=!1},onUploaded:function(i){s.refreshGrid(),s.uploading=!1}}).dxFileUploader("instance"),s.isInitialized=!0,$(".dx-fileuploader-button").addClass("btn btn-green action-button")}),s.getGridUrl=function(){return s.odataBaseUrl+"MediaFiles"},s.getFileUploaderUrl=function(){return s.apiBaseUrl+"Upload"},s.getHeaders=function(){return{Authorization:"Bearer "+s.token,withCredentials:!1}}}]}),app.component("apicodoMediaPlay",{templateUrl:"/ClientApp/src/legacy-app/media/apicodoMediaPlayComponent.html",bindings:{fileid:"<",originNetworkSlug:"<"},controller:["$scope","$element","$stateParams","$location","$rootScope","profileService","apicodoMediaService","$sce","authService",function(e,t,a,n,u,g,f,r,s){var c=this;c.isVerticalVideo=!0,this.$onInit=function(){f.getConnectionData(c.originNetworkSlug).then(function(d){c.getVideoUrl=function(i){return r.trustAsResourceUrl(s.mediaApiBase.url+"/play/"+i+"?guiMode=iframe&token="+d.token+"&platform=external")},f.getVideoData(c.fileid,c.originNetworkSlug).then(function(i){try{var o=i.metaData.assetMetadata.assetFile[0].videoTracks[0].height,h=i.metaData.assetMetadata.assetFile[0].videoTracks[0].width,p=void 0!==i.metaData.assetMetadata.assetFile[0].videoTracks[0].metadata.find(function(v){return"rotate"===v.key});c.isVerticalVideo=p,p?console.log(parseInt(o),"x",parseInt(h),"rotation"):(console.log(parseInt(o),"x",parseInt(h),"no rotation"),parseInt(o)>parseInt(h)&&(c.isVerticalVideo=!0))}catch{console.log("ERROR META ROTATION"),console.log(i)}}),c.videoUrl=c.getVideoUrl(c.fileid)})}}]}),app.controller("apicodoMediaPlayDialog",["$scope","videoId",function(e,t){e.working=!1,e.error=!1,e.videoid=t}]),app.controller("apicodoMediaPlayPageController",["$scope","$stateParams","$location",function(e,t,a){e.videoid=t.id}]),app.factory("apicodoMediaService",["$rootScope","$http","$q","authService",function(e,t,a,n){var u=scope.globalSettings.configurations.apicodoMediaBaseUrl;e.apicodoMediaConnectionData||(e.apicodoMediaConnectionData={});var g=function(r){var s=a.defer(),c=r||"default";if(e.apicodoMediaConnectionData[c]&&e.apicodoMediaConnectionData[c].expiresOn>Date.now())s.resolve(e.apicodoMediaConnectionData[c]);else{var d=scope.apiEndpoint+"media/token";r&&(d+="?originNetworkSlug="+r),t.get(d).then(function(i){var o=i.data;e.apicodoMediaConnectionData[c]=o,e.apicodoMediaConnectionData[c].isInitialized=!0,e.apicodoMediaConnectionData[c].expiresOn=new Date(Date.now()+36e5),s.resolve(o)},function(){s.reject()})}return s.promise};return{apicodoMediaUrl:scope.globalSettings.configurations.apicodoMediaBaseUrl,getConnectionData:g,getVideoData:function(r,s){var c=a.defer();return g(s).then(function(d){t.get(u+"/api/Thumbnail/GetWebFrontendData?fileId="+r,{headers:{Authorization:"Bearer "+d.token}}).then(function(o){c.resolve(o.data)},function(){c.reject()})}),c.promise}}}]),app.component("collapsableMenu",{templateUrl:"/ClientApp/src/legacy-app/collapsableMenu/collapsableMenu.html",bindings:{menuitems:"<"},controller:["$element","$timeout",function(e,t){}]}),app.directive("collapsableMenuTarget",["$rootScope",function(e){return{restrict:"A",link:function(t,a,n){var u=n.href;(!u.match("https?://(.*/)?"+location.hostname+".*")&&!u.startsWith("/")||-1!==u.indexOf("/pdf/")||-1!==u.indexOf("/document/")||-1!==u.indexOf("/file/"))&&a.attr("target","_blank")}}}]),app.controller("NotificationSettingsController",["$rootScope","$scope","notificationService","$stateParams","$timeout","$location",function(e,t,a,n,u,g){t.working=!1,t.success=!1,t.error=!1;var f=!0;e.profile.isAdmin||e.profile.isNetworkAdmin||(f=!1,e.profile.chapterRoles&&e.profile.chapterRoles.forEach(s=>{s>2&&(f=!0)})),t.isRedesign="Redesign2024"==e.scope.currentScope.network.settings.configurations.contentRenderEngine;var r=n.privateUserGuid||null;a.getNotificationGroups(r).then(function(s){if(!f)for(let d=0;d<s.length;d++)1001==s[d].order&&s.splice(d,1);if(t.notificationGroups=s,g.search().optOutAll){for(var c=0;c<t.notificationGroups.length;c++)6===t.notificationGroups[c].order&&e.scope.currentScope.chapter.settings.featureBreakingNewsToAll||(t.notificationGroups[c].enabled=!1);t.working=!0,a.updateNotificationGroups(t.notificationGroups,r).then(function(){u(function(){t.working=!1,t.success=!0},2e3)},function(){t.error=!0})}}),a.getUserEmail(r).then(function(s){t.userEmail=s}),t.toggleNotificationGroup=function(s){s.enabled=!s.enabled,t.success=!1,t.working=!0,a.updateNotificationGroups(t.notificationGroups,n.privateUserGuid).then(function(){u(function(){t.working=!1,t.success=!0},2e3)},function(){t.error=!0,s.enabled=!s.enabled})}}]),app.directive("articleImpression",["$state","$rootScope","clickService",function(e,t,a){return{restrict:"A",link:function(n,u,g){var f=n.$eval(g.articleImpression),c=Oculus.trackArticleImpression(u,{ia:f.id,iar:f.revisionId,iav:f.variantId,c:t.scope.currentScope.chapter.slug,n:t.scope.currentScope.network.slug});c.persistent=e.includes("app.main-news"),u.on("click",function(){c.click(),a.clickArticle(c.guid,f.id)})}}}]),app.directive("articleReading",["$rootScope",function(e){return{restrict:"A",link:function(t,a,n){var u=$(a).children().map(function(){for(var s=$(this),c=s;c.length;){if(c.parent().hasClass("allow-float"))return c[0];c=(s=c).children()}return this}),g=e.scope.currentScope.network,f=t.$eval(n.articleReading);Oculus.trackArticleReading(u,{ia:f.id,iar:f.revisionId,iav:f.variantId,c:e.scope.currentScope.chapter.slug,n:g.slug})}}}]),app.directive("marketResearchQuestion",["$timeout","$state","$rootScope",function(e,t,a){return{restrict:"E",templateUrl:"/ClientApp/src/legacy-app/oculus/marketResearchQuestion.html",scope:{marketResearch:"=",article:"=",question:"=",nextQuestion:"="},link:function(n,u){var g=a.scope.currentScope.network,f=a.scope.currentScope.chapter;n.isInView=!1,n.oculus=Oculus.trackMarketResearch(u.children().first(),{mq:n.question.id,ia:n.article?n.article.id:null,iar:n.article?n.article.revisionId:null,iav:n.article?n.article.variantId:null,c:f.slug,n:g.slug}),n.oculus.persistent=t.includes("app.main"),n.answering=function(r){n.oculus.bundle.ma=r,n.oculus.push(),n.oculus.stop(0),n.nextQuestion()}}}}]),app.directive("marketResearchShipment",[function(){return{restrict:"E",templateUrl:"/ClientApp/src/legacy-app/oculus/marketResearchShipment.html",scope:{marketResearch:"=",article:"="},link:function(e){e.actQuestionIndex=0,e.actQuestion=e.marketResearch.questions[e.actQuestionIndex],e.actQuestion.isVisible=!0,e.nextQuestion=function(){e.actQuestion.nextQuestionId?(e.actQuestion.isVisible=!1,e.actQuestionIndex++,e.actQuestion=e.marketResearch.questions[e.actQuestionIndex],e.actQuestion.isVisible=!0):(e.actQuestion.isVisible=!1,e.answered=!0)}}}}]),app.directive("oculusContainer",[function(){return{restrict:"A",link:function(e,t,a){Oculus.addScrollContainer(t)}}}]),app.directive("searchImpression",["$state","$rootScope",function(e){return{restrict:"A",scope:{query:"<searchQuery",guid:"=searchGuid"},link:function(t,a){t.$watch(function(){return t.query},function(n){if(n){var u=Oculus.trackSearch(a,{q:n});t.guid=u.guid,u.persistent=e.includes("app.main-news")}})}}}]),app.directive("delivery",["shipmentService","profileService","localStorageService","$rootScope","$timeout","$state","redirectService","clickService",function(e,t,a,n,u,g,f,r){return{restrict:"E",templateUrl:"/ClientApp/src/legacy-app/oculus/shipment.html",scope:!0,link:function(s,c,d){var i=s.$eval(d.article),o=i?i.id:void 0;t.getProfile().then(function(h){e.getShipment(o).then(function(p){s.shipment=p;var v=n.scope.globalSettings.blobStorageCdnUrl,C=n.scope.globalSettings.blobStorageContainerNameShipment;s.imageUrl="",p.pin&&(s.imageUrl=v+"/"+C+"/"+p.pin+(n.scope.currentChapter.settings.configurations.allowCustomBannerResolution?"":"?preset=shipment")),p.uri&&(s.inSameChapter=f.isSameChapterUrl(p.uri),s.uriIsDocument=-1!==p.uri.indexOf("/pdf/")||-1!==p.uri.indexOf("/document/")||-1!==p.uri.indexOf("/file/"));var A=angular.copy(s.scope.oculus),x=n.scope.currentScope.network,b=n.scope.currentScope.chapter;A.impressionThreshold=A.shipmentImpressionThreshold,A.impressionViewportThreshold=A.shipmentImpressionViewportThreshold,1===p.articleDetailDisplayableType&&u(function(){p.oculus=Oculus.trackBanner(c.children().first(),{c:b.slug,n:x.slug,ia:i?i.id:null,iar:i?i.revisionId:null,iav:i?i.variantId:null,ibc:p.bannerCampaignId,ib:p.bannerId}),p.oculus.persistent=g.includes("app.main-news")}),s.clickBanner=function(){s.shipment.oculus.click(),r.clickBannerPost(s.shipment.oculus.guid,s.shipment.pin)}})})}}}]),app.component("deliveryPremium",{templateUrl:"/ClientApp/src/legacy-app/oculus/shipmentPremium.html",bindings:{shipment:"="},controller:["$interpolate","$scope","shipmentService","profileService","localStorageService","scopeService","$timeout","$element","$state","$rootScope","redirectService","clickService",function(e,t,a,n,u,g,f,r,s,c,d,i){var o=this,h=g.getGlobalSettings().blobStorageCdnUrl,p=g.getGlobalSettings().blobStorageContainerNameShipment;o.web_shipment_premium_title=e(scope.currentScope.network.resources.web_shipment_premium_title)({chapterName:scope.currentScope.chapter.name}),this.$onInit=function(){if(o.shipment){o.imageUrl="",o.shipment.pin&&(o.imageUrl=h+"/"+p+"/"+o.shipment.pin+(c.scope.currentChapter.settings.configurations.allowCustomBannerResolution?"":o.shipment.mobile?"?preset=premium-shipment-xs":"?preset=premium-shipment")),o.shipment.uri&&(o.inSameChapter=d.isSameChapterUrl(o.shipment.uri),o.uriIsDocument=-1!==o.shipment.uri.indexOf("/pdf/")||-1!==o.shipment.uri.indexOf("/document/")||-1!==o.shipment.uri.indexOf("/file/"));var v=c.scope.currentScope.network,C=c.scope.currentScope.chapter,A=angular.copy(c.scope.oculus);A.impressionThreshold=A.shipmentImpressionThreshold,A.impressionViewportThreshold=A.shipmentImpressionViewportThreshold,o.shipment.oculus=Oculus.trackPremiumBanner(r.find(".shipmentPremium-image-wrapper"),{c:C.slug,n:v.slug,ip:o.shipment.premiumId,ipb:o.shipment.premiumBannerId}),o.clickBanner=function(){o.shipment.oculus.click(),i.clickPremiumPost(o.shipment.oculus.guid,o.shipment.pin)},o.shipment.oculus.persistent=s.includes("app.main-news")}}}]}),app.component("deliverySuper",{templateUrl:"/ClientApp/src/legacy-app/oculus/shipmentSuper.html",bindings:{shipment:"<"},controller:["scopeService","$element","$state","$rootScope","$timeout","redirectService","clickService",function(e,t,a,n,u,g,f){var r=this,s=e.getGlobalSettings().blobStorageCdnUrl,c=e.getGlobalSettings().blobStorageContainerNameShipment;this.$onInit=function(){if(r.shipment){r.imageUrl="",r.shipment.pin&&(r.imageUrl=s+"/"+c+"/"+r.shipment.pin+(n.scope.currentChapter.settings.configurations.allowCustomBannerResolution?"":r.shipment.mobile?"?preset=premium-shipment-xs":"?preset=premium-shipment")),r.shipment.uri&&(r.inSameChapter=g.isSameChapterUrl(r.shipment.uri),r.uriIsDocument=-1!==r.shipment.uri.indexOf("/pdf/")||-1!==r.shipment.uri.indexOf("/document/")||-1!==r.shipment.uri.indexOf("/file/"));var d=n.scope.currentScope.network,i=n.scope.currentScope.chapter,o=angular.copy(n.scope.oculus);o.impressionThreshold=o.shipmentImpressionThreshold,o.impressionViewportThreshold=o.shipmentImpressionViewportThreshold,r.shipment.oculus=Oculus.trackSuperBanner(t.find(".shipmentSuper-image-wrapper"),{c:i.slug,n:d.slug,isu:r.shipment.superCampaignId,isub:r.shipment.superBannerId}),r.clickBanner=function(){r.shipment.oculus.click(),f.clickSuperPost(r.shipment.oculus.guid,r.shipment.pin)},r.shipment.oculus.persistent=a.includes("app.main-news")}}}]}),app.directive("snipImpression",["$state","$rootScope","clickService",function(e,t,a){return{restrict:"A",link:function(n,u,g){var f=n.$eval(g.snipImpression),r=n.$eval(g.searchGuid),d=Oculus.trackSnipImpression(u,{is:f.id,isr:f.revisionId,seg:r,c:t.scope.currentScope.chapter.slug,n:t.scope.currentScope.network.slug});d.persistent=e.includes("app.main-snips"),u.on("click",function(){d.click(),a.clickSnip(d.guid,f.id)})}}}]),app.directive("snipReading",["$rootScope",function(e){return{restrict:"A",link:function(t,a,n){var u=$(a).children().map(function(){for(var s=$(this),c=s;c.length;){if(c.parent().hasClass("allow-float"))return c[0];c=(s=c).children()}return this}),g=e.scope.currentScope.network,f=e.scope.currentScope.chapter,r=t.$eval(n.snipReading);Oculus.trackSnipReading(u,{is:r.id,isr:r.revisionId,c:f.slug,n:g.slug})}}}]),app.directive("sparticleImpression",["$state","$rootScope","clickService",function(e,t,a){return{restrict:"A",link:function(n,u,g){var f=n.$eval(g.sparticleImpression),r=n.$eval(g.sparticleImpressionArticle),s=t.scope.currentScope.network,c=t.scope.currentScope.chapter,d=n.$eval(g.searchGuid),i=Oculus.trackSponsoredArticleImpression(u,{isac:f.sponsoredArticleCampaignId,isa:f.id,isar:f.revisionId,isav:f.variantId,c:c.slug,n:s.slug,seg:d,iar:r?r.revisionId:null,iav:r?r.variantId:null});i.persistent=e.includes("app.main-news"),u.on("click",function(){i.click(),a.clickSponsoredArticle(i.guid,f.sponsoredArticleCampaignId)})}}}]),app.directive("sparticleReading",["$rootScope",function(e){return{restrict:"A",link:function(t,a,n){var u=$(a).children().map(function(){for(var s=$(this),c=s;c.length;){if(c.parent().hasClass("allow-float"))return c[0];c=(s=c).children()}return this}),g=e.scope.currentScope.network,f=e.scope.currentScope.chapter,r=t.$eval(n.sparticleReading);Oculus.trackSponsoredArticleReading(u,{isa:r.id,isac:r.sponsoredArticleCampaignId,isar:r.revisionId,isav:r.variantId,c:f.slug,n:g.slug})}}}]),app.directive("specialImpression",["$state","$rootScope",function(e,t){return{restrict:"A",link:function(a,n,u){var g=a.$eval(u.specialImpression),f=t.scope.currentScope.network,r=t.scope.currentScope.chapter,s=a.$eval(u.article);Oculus.trackSpecialImpression(n,{isp:g.id,c:r.slug,n:f.slug,ia:s?s.id:null,iar:s?s.revisionId:null,iav:s?s.variantId:null}).persistent=e.includes("app.main-news")}}}]),app.directive("specialItemImpression",["$rootScope","redirectService","clickService",function(e,t,a){return{restrict:"A",link:function(n,u,g){var f=n.$eval(g.specialItemImpression),r=e.scope.currentScope.chapter,s=e.scope.currentScope.network,c=g.specialItemSpecialViewOculus?n.$eval(g.specialItemSpecialViewOculus):null;n.imageUrl=e.scope.globalSettings.blobStorageCdnUrl+"/"+e.scope.globalSettings.blobStorageContainerNameSpecial+"/"+f.values.image+"?preset=shipment",f.uri&&(n.inSameChapter=t.isSameChapterUrl(f.uri),n.uriIsDocument=-1!==f.uri.indexOf("/pdf/")||-1!==f.uri.indexOf("/document/")||-1!==f.uri.indexOf("/file/")),f.oculus=Oculus.trackSpecialItemImpression(u,{ispi:f.id,c:r.slug,n:s.slug,spg:c?c.guid:null}),f.oculusGuid=f.oculus.guid,n.clickBanner=function(){a.clickSpecialPost(f.oculusGuid,f.id),f.oculus.click()}}}}]),app.directive("survey",["$state","$rootScope","redirectService","clickService",function(e,t,a,n){return{restrict:"E",templateUrl:"/ClientApp/src/legacy-app/oculus/survey.html",scope:{survey:"<",article:"<",preview:"<"},link:function(u,g,f){var r=u.survey;u.actQuestionId=r.firstQuestionId,u.$watch("survey",function(){r=u.survey,u.finalBannerId=null,r.preview=u.preview,r.questionDict={},r.questions.forEach(function(d){r.questionDict[d.id]=d});var s=t.scope.globalSettings.blobStorageCdnUrl,c=t.scope.globalSettings.blobStorageContainerNameShipment;r.bannerDict={},r.banners.forEach(function(d){d.imageUrl="",d.pin&&(d.imageUrl=s+"/"+c+"/"+d.pin+"?preset=shipment"),d.uri&&(d.inSameChapter=a.isSameChapterUrl(d.uri),d.uriIsDocument=-1!==d.uri.indexOf("/pdf/")||-1!==d.uri.indexOf("/document/")||-1!==d.uri.indexOf("/file/")),r.bannerDict[d.id]=d}),r.answers.forEach(function(d){null!==d.finalBannerId&&(d.finalBanner=r.bannerDict[d.finalBannerId]),null===r.questionDict[d.questionId].answers&&(r.questionDict[d.questionId].answers={}),r.questionDict[d.questionId].answers[d.id]=d}),u.actQuestion=r.questionDict[u.actQuestionId]}),u.processAnswer=function(s){if(s.nextQuestionId)u.actQuestionId=s.nextQuestionId,u.actQuestion=r.questionDict[u.actQuestionId];else if(u.actQuestionId=null,s.finalBannerId){u.finalBannerId=s.finalBannerId;var c=r.bannerDict[u.finalBannerId],d=$(g).find(".survey-banner-wrapper-"+u.finalBannerId);r.preview||(u.oculus=Oculus.trackSurveyBannerImpression(d,{sv:r.id,sb:u.finalBannerId,ia:u.article?u.article.id:null,iar:u.article?u.article.revisionId:null,iav:u.article?u.article.variantId:null}),u.oculus.persistent=e.includes("app.main-news"),u.oculus.impressionThreshold=0,u.clickBanner=function(){console.log("clickSurveyBanner",u.oculus.guid,u.finalBannerId,r.id),n.clickSurveyBannerPost(u.oculus.guid,c.guid),u.oculus.click()},u.oculus.push())}}}}}]),app.directive("surveyQuestion",["$state","shipmentService",function(e,t){return{restrict:"E",templateUrl:"/ClientApp/src/legacy-app/oculus/surveyQuestion.html",scope:{survey:"<",article:"<",question:"<",processAnswer:"<"},link:function(a,n){a.isInView=!1,a.$watch("survey",function(){a.answerArray=Object.keys(a.question.answers).map(function(u){return a.question.answers[u]}),a.fixedAnswers=a.answerArray.filter(function(u){return!u.isFreeTextAnswer}),a.freeTextAnswers=a.answerArray.filter(function(u){return u.isFreeTextAnswer})}),a.survey.preview||(a.oculus=Oculus.trackSurveyImpression(n.children().first(),{sv:a.survey.id,sq:a.question.id,ia:a.article?a.article.id:null,iar:a.article?a.article.revisionId:null,iav:a.article?a.article.variantId:null}),a.oculus.persistent=e.includes("app.main-news"),a.survey.firstQuestionId!==a.question.id&&(a.oculus.impressionThreshold=0)),a.answerQuestion=function(u,g){if(!a.survey.preview){if(a.question.answers[u].isFreeTextAnswer){if(!g||g.match(/^\s*$/))return;a.oculus.bundle.sft=g}a.oculus.bundle.sa=u,a.oculus.ignoreImpressionThreshold=!0,a.oculus.push(),a.oculus.stop(0),t.clickSurvey(a.survey.id)}a.processAnswer(a.question.answers[u])}}}}]),app.controller("OptOutController",["$rootScope","$scope","localStorageService",function(e,t,a){t.oculusOptOut=a.oculusOptOut,t.toggleOptOut=function(){t.oculusOptOut=!t.oculusOptOut,t.oculusOptOut?a.oculusOptOut=!0:delete a.oculusOptOut}}]),app.controller("PremiumElasticReportController",["$scope","$rootScope","premiumService","scopeService","$stateParams","$timeout","$location",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var d,i,o,r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}],c=[];e.report=null,e.totalClickCount=0,e.totalImpressionTime=0,e.totalImpressionCount=0,e.filterDisabled=!1,e.startDay=null,e.endDay=null;var h=function(A){var x=0,b=0,R=0,y=0,l=0,M=0;$.each(A,function(T,k){x+=k.desktopImpressionCount,b+=k.tabletImpressionCount,R+=k.mobileImpressionCount,y+=k.clickCount,l+=k.impressionTime,M+=k.impressionCount}),e.$apply(function(){e.totalClickCount=y,e.totalImpressionTime=l,e.totalImpressionCount=M}),s[0].value=Math.round(100/(M/x)),s[1].value=Math.round(100/(M/R)),s[2].value=Math.round(100/(M/b)),d.validateData()},p=function(){var A=moment(i.startDate).startOf("day").toDate(),x=moment(i.endDate).startOf("day").toDate(),b=e.report.filter(function(R){return R.day>=A&&R.day<=x});h(b),o.zoom(A,moment(x).add(1,"d").toDate()),e.$apply(function(){e.startDay=A,e.endDay=x})},C=function(){var A=e.premium.premiumBanners.filter(function(b){return!b.filtered}).map(function(b){return b.id}),x=e.chapters.filter(function(b){return!b.filtered}).map(function(b){return b.id});e.filterDisabled=!0,a.getPremiumReport(e.premium.pin,{premiumId:e.premium.id,premiumbannerIds:A,chapterIds:x}).then(function(b){b.forEach(function(R){R.day=moment(R.day.replace("Z","")).toDate()}),e.report=b,g(function(){(function(A){c.length=0,$.each(A,function(x,b){c.push(b)}),i.validateData(),o.validateData()})(b),p(),e.filterDisabled=!1},50)})};e.filterChapter=function(A){A.filtered=!A.filtered,C()},e.chapterFilterDisabled=function(A){return e.filterDisabled||1===e.chapters.filter(function(x){return!x.filtered}).length&&!A.filtered},e.filterBanner=function(A){e.filterDisabled||1===e.premium.premiumBanners.filter(function(x){return!x.filtered}).length&&!A.filtered||(A.filtered=!A.filtered,C())},a.getPremiumByPin(u.pin).then(function(A){e.premium=A,a.getPremiumReport(A.pin,{premiumId:A.id}).then(function(x){x.forEach(function(R){R.day=moment(R.day.replace("Z","")).toDate()}),e.report=x,e.startDay=x[0].day,e.endDay=x[x.length-1].day;var b=[];$.each(A.chapterSlugs,function(R,y){b.push(n.getChapter(y))}),b=b.filter(function(R){return 2===R.managementState}),e.chapters=b,$.each(x,function(R,y){c.push(y)}),g(function(){d=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),(i=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"}],dataProvider:c,categoryField:"day"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"impressionCount",valueField:"impressionCount"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"impressionCount",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).addListener("zoomed",function(){p()}),o=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"},{fromField:"clickCount",toField:"clickCount"}],dataProvider:c,categoryField:"day"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.resources.web_report_viewableImpressions,id:"impressionCount",type:"smoothedLine",valueField:"impressionCount",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.resources.web_report_viewableImpressions+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clickCount",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),h(x)})},function(){e.error=!0})})}]),app.controller("premiumReportController",["$scope","$rootScope","premiumService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";a.getPremiumByPin(u.pin).then(function(o){e.premium=o,a.getReportPremiumBannerCalendar(o.pin).then(function(h){h.forEach(function(p){p.chapter=n.getChapter(p.chapterSlug),p.reports.forEach(function(v){v.calendar.forEach(function(C){C.start=moment(C.start.replace("Z","")).toDate(),C.end=moment(C.end.replace("Z","")).toDate()})})}),o.report=h,f(function(){var p,v,C,A,x,b=new Set;$.each(h,function(k,w){w.active=!0,b.add(w.chapter.name)}),h.uniqueChapters=[],b.forEach(function(k){h.uniqueChapters.push(k)}),$.each(o.premiumBanners,function(k,w){w.reportActive=!0});var R=[],y=function(){R.length=0,$.each(h[0].reports[0].calendar,function(k,w){R.push({start:w.start,end:w.end,impressions:0,viewableImpressions:0,viewableImpressionTimeSeconds:0,desktopViewableImpressions:0,mobileViewableImpressions:0,tabletViewableImpressions:0,clicks:0,maleViewableImpressions:0,femaleViewableImpressions:0,age1617MaleViewableImpressions:0,age1824MaleViewableImpressions:0,age2534MaleViewableImpressions:0,age3544MaleViewableImpressions:0,age4554MaleViewableImpressions:0,age55MaleViewableImpressions:0,age1617FemaleViewableImpressions:0,age1824FemaleViewableImpressions:0,age2534FemaleViewableImpressions:0,age3544FemaleViewableImpressions:0,age4554FemaleViewableImpressions:0,age55FemaleViewableImpressions:0})}),$.each(h,function(k,w){w.active&&(h[k-1]&&2===h[k-1].chapter.managementState&&2===w.chapter.managementState&&h[k-1].chapter.name!==w.chapter.name&&(h.multiChapterShipment=!0),$.each(w.reports,function(D,S){if(o.premiumBanners[D].reportActive){var U=S.premiumBanner.pin;$.each(S.calendar,function(I,m){m.pin=U,R[I].impressions+=m.impressions,R[I].viewableImpressions+=m.viewableImpressions,R[I].viewableImpressionTimeSeconds+=m.viewableImpressionTimeSeconds,R[I].desktopViewableImpressions+=m.desktopViewableImpressions,R[I].mobileViewableImpressions+=m.mobileViewableImpressions,R[I].tabletViewableImpressions+=m.tabletViewableImpressions,R[I].clicks+=m.clicks,R[I].maleViewableImpressions+=m.maleViewableImpressions,R[I].femaleViewableImpressions+=m.femaleViewableImpressions,R[I].age1617MaleViewableImpressions+=m.age1617MaleViewableImpressions,R[I].age1824MaleViewableImpressions+=m.age1824MaleViewableImpressions,R[I].age2534MaleViewableImpressions+=m.age2534MaleViewableImpressions,R[I].age3544MaleViewableImpressions+=m.age3544MaleViewableImpressions,R[I].age4554MaleViewableImpressions+=m.age4554MaleViewableImpressions,R[I].age55MaleViewableImpressions+=m.age55MaleViewableImpressions,R[I].age1617FemaleViewableImpressions+=m.age1617FemaleViewableImpressions,R[I].age1824FemaleViewableImpressions+=m.age1824FemaleViewableImpressions,R[I].age2534FemaleViewableImpressions+=m.age2534FemaleViewableImpressions,R[I].age3544FemaleViewableImpressions+=m.age3544FemaleViewableImpressions,R[I].age4554FemaleViewableImpressions+=m.age4554FemaleViewableImpressions,R[I].age55FemaleViewableImpressions+=m.age55FemaleViewableImpressions})}}))}),v.validateData(),p.validateData()},l=h.summary={};p=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"}],dataProvider:R,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"viewableImpressions",valueField:"viewableImpressions"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"viewableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),v=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"clicks",toField:"clicks"},{fromField:"clickThroughRate",toField:"clickThroughRate"}],dataProvider:R,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),id:"viewableImpressions",type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clicks",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),C=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),A=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:s,balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(k,w){return-1*k.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(k){return k<0?-1*k+"":k+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),x=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:s,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}});var T=function(){var k=moment(p.startDate).startOf("day").toDate(),w=moment(p.endDate).startOf("day").add(-1,"d").toDate();(function(k,w){l.maleViewableImpressions=0,l.femaleViewableImpressions=0,l.viewableImpressions=0,l.viewableImpressionTimeSeconds=0,l.impressions=0,l.clicks=0,l.desktopViewableImpressions=0,l.mobileViewableImpressions=0,l.tabletViewableImpressions=0,l.age1617MaleViewableImpressions=0,l.age1824MaleViewableImpressions=0,l.age2534MaleViewableImpressions=0,l.age3544MaleViewableImpressions=0,l.age4554MaleViewableImpressions=0,l.age55MaleViewableImpressions=0,l.age1617FemaleViewableImpressions=0,l.age1824FemaleViewableImpressions=0,l.age2534FemaleViewableImpressions=0,l.age3544FemaleViewableImpressions=0,l.age4554FemaleViewableImpressions=0,l.age55FemaleViewableImpressions=0;var D=0,S=0,U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0;l.start=k,l.end=w,$.each(R,function(Z,B){var Q=new Date(B.start);Q<k||Q>w||(l.maleViewableImpressions+=B.maleViewableImpressions,l.femaleViewableImpressions+=B.femaleViewableImpressions,l.viewableImpressions+=B.viewableImpressions,l.viewableImpressionTimeSeconds+=B.viewableImpressionTimeSeconds,l.impressions+=B.impressions,l.clicks+=B.clicks,D+=B.desktopViewableImpressions,S+=B.mobileViewableImpressions,U+=B.tabletViewableImpressions,I+=B.age1617MaleViewableImpressions,m+=B.age1824MaleViewableImpressions,F+=B.age2534MaleViewableImpressions,E+=B.age3544MaleViewableImpressions,V+=B.age4554MaleViewableImpressions,q+=B.age55MaleViewableImpressions,O+=B.age1617FemaleViewableImpressions,_+=B.age1824FemaleViewableImpressions,P+=B.age2534FemaleViewableImpressions,L+=B.age3544FemaleViewableImpressions,K+=B.age4554FemaleViewableImpressions,J+=B.age55FemaleViewableImpressions)}),l.desktopViewableImpressions=Math.round(100/(l.viewableImpressions/D)),l.mobileViewableImpressions=Math.round(100/(l.viewableImpressions/S)),l.tabletViewableImpressions=Math.round(100/(l.viewableImpressions/U));var j=l.viewableImpressions-(I+m+F+E+V+q+O+_+P+L+K+J);j>100&&(I+=j*t.scope.globalSettings.reportAverageAge1617Male,m+=j*t.scope.globalSettings.reportAverageAge1824Male,F+=j*t.scope.globalSettings.reportAverageAge2534Male,E+=j*t.scope.globalSettings.reportAverageAge3544Male,V+=j*t.scope.globalSettings.reportAverageAge4554Male,q+=j*t.scope.globalSettings.reportAverageAge55Male,O+=j*t.scope.globalSettings.reportAverageAge1617Female,_+=j*t.scope.globalSettings.reportAverageAge1824Female,P+=j*t.scope.globalSettings.reportAverageAge2534Female,L+=j*t.scope.globalSettings.reportAverageAge3544Female,K+=j*t.scope.globalSettings.reportAverageAge4554Female,J+=j*t.scope.globalSettings.reportAverageAge55Female),l.age1617MaleViewableImpressions=Math.round(100/(l.viewableImpressions/I)),l.age1824MaleViewableImpressions=Math.round(100/(l.viewableImpressions/m)),l.age2534MaleViewableImpressions=Math.round(100/(l.viewableImpressions/F)),l.age3544MaleViewableImpressions=Math.round(100/(l.viewableImpressions/E)),l.age4554MaleViewableImpressions=Math.round(100/(l.viewableImpressions/V)),l.age55MaleViewableImpressions=Math.round(100/(l.viewableImpressions/q)),l.age1617FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/O)),l.age1824FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/_)),l.age2534FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/P)),l.age3544FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/L)),l.age4554FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/K)),l.age55FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/J)),l.maleViewableImpressions=Math.round(l.maleViewableImpressions),l.femaleViewableImpressions=Math.round(l.femaleViewableImpressions),c[0].value=l.femaleViewableImpressions,c[1].value=l.maleViewableImpressions,d[0].male=Math.round(-1*l.age1617MaleViewableImpressions),d[1].male=Math.round(-1*l.age1824MaleViewableImpressions),d[2].male=Math.round(-1*l.age2534MaleViewableImpressions),d[3].male=Math.round(-1*l.age3544MaleViewableImpressions),d[4].male=Math.round(-1*l.age4554MaleViewableImpressions),d[5].male=Math.round(-1*l.age55MaleViewableImpressions),d[0].female=Math.round(l.age1617FemaleViewableImpressions),d[1].female=Math.round(l.age1824FemaleViewableImpressions),d[2].female=Math.round(l.age2534FemaleViewableImpressions),d[3].female=Math.round(l.age3544FemaleViewableImpressions),d[4].female=Math.round(l.age4554FemaleViewableImpressions),d[5].female=Math.round(l.age55FemaleViewableImpressions),i[0].value=l.desktopViewableImpressions,i[1].value=l.mobileViewableImpressions,i[2].value=l.tabletViewableImpressions,C.validateData(),A.validateData(),x.validateData(),e.$apply()})(k,w),v.zoom(k,moment(w).add(1,"d").toDate())};p.addListener("zoomed",function(k){T()}),e.toggleReport=function(k){$.each(o.premiumBanners,function(w,D){D.pin===k.pin&&(D.reportActive=!D.reportActive)}),f(function(){y(),T()},50)},e.toggleChapter=function(k){$.each(h,function(w,D){D.chapter.name===k&&(D.active=!D.active)}),f(function(){y(),T()},50)},y(),v.validateData(),p.validateNow(),p.setDefaultPeriod()},function(){e.error=!0})})},function(){r.path("/")});var c=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:s,value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],d=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],i=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}]}]),app.factory("premiumService",["$http","$q","$rootScope","authService","profileService","$location",function(e,t,a,n,u,g){var f=[],c=function(){var o=t.defer();return f.length>0?o.resolve(f):e.get(scope.apiEndpoint+"premiums").then(function(h){angular.copy(h.data,f),o.resolve(f)},function(){o.reject()}),o.promise};function d(o){var h=null;return $.each(f,function(p,v){if(v.pin===o)return h=v,!1}),h}return{premiums:f,getPremiums:c,getReportPremiumBannerCalendar:function(o){var h=t.defer();return e.get(scope.apiEndpoint+"premiums/"+o+"/ReportPremiumBannerCalendar").then(function(p){h.resolve(p.data)},function(){h.reject()}),h.promise},getPremiumReport:function(o,h){var p=t.defer();return e.post(scope.apiEndpoint+"premiums/"+o+"/report",h).then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise},getPremiumByPin:function(o){var h=t.defer();if(f.length>0){var p=d(o);p?h.resolve(p):e.get(scope.apiEndpoint+"/premiums"+o).then(function(v){h.resolve(v.data)},function(){h.reject()})}else c().then(function(){var v=d(o);v?h.resolve(v):e.get(scope.apiEndpoint+"premiums/"+o).then(function(C){h.resolve(C.data)},function(){h.reject()})},function(){h.reject()});return h.promise}}}]),app.controller("AddMetaInfoDialogController",["$scope","onSuccessfulCallback",function(e,t){var a=this;function n(u,g){this.tagValue=u,this.displayName=g}e.availableMetaTags=[new n("person","Personen"),new n("location","Stadt"),new n("event","Veranstaltung")],this.cancel=function(){e.$dismiss()},this.addMetaInfo=function(u){u&&e.selectedMetaTag.tagValue&&(t(e.selectedMetaTag.tagValue),a.cancel())}}]),app.controller("CreateCallToActionDialogController",["$scope","onSuccessfulCallback",function(e,t){var a=this;this.cancel=function(){e.$dismiss()},this.createCallToAction=function(n){n&&(t({href:e.linkUrl,description:e.linkDescription}),a.cancel())}}]),app.controller("CreateEditorCommentDialogController",["$scope","editorCommentCallback","sourceService","messageHolder",function(e,t,a,n){var u=this;e.messageText=null,this.cancel=function(){e.$dismiss()},this.saveComment=function(){a.save({messageText:e.messageText,holderId:n.id,parentId:null}).then(function(g){t(g.guid),u.cancel()})}}]),app.controller("CreateLinkDialogController",["$scope","onSuccessfulCallback",function(e,t){var a=this;this.cancel=function(){e.$dismiss()},this.createLink=function(n){n&&(t({href:e.linkUrl,title:""}),a.cancel())}}]),app.service("editorAssetsService",["$filter","$sce","$q","workflowService",function(e,t,a,n){var u=this;function g(s){this.name=s.firstName+" "+s.lastName,this.profileURL=s.avatarImageUrl||"",this.avatarURL=s.avatarImageUrl+"?preset=article-detail-badge"}function f(s){this.guid=s.guid||"",this.imgContent=s.imgContent||"",this.textContent=s.textContent||"",this.videoThumbnail=s.videoThumbnail||"",this.type=s.type||0,this.author=s.author||new g}return this.url=scope.apiEndpoint+"editorAssets",this.getImageContent=function(s){var c=null;return s.assetImage&&(c=s.assetImage.assetImageUrl+"?maxheight=50"),s.assetArticle&&(c=s.assetArticle.coverAssetImageUrl+"?maxheight=50"),s.assetStaticArticle&&(c=s.assetStaticArticle.coverAssetImageUrl+"?maxheight=50"),s.assetFile&&(c=s.assetFile.fileName),c},this.getTextContent=function(s){var c=null;return s.assetText&&(c=s.assetText.text),s.assetFile&&(c=s.assetFile.text),c},this.getAssetType=function(s){var c=null;return s.assetImage&&(c=s.assetImage.type),s.assetText&&(c=s.assetText.type),s.assetArticle&&(c=s.assetArticle.type),s.assetFile&&(c=s.assetFile.type),s.assetStaticArticle&&(c=s.assetStaticArticle.type),c},this.getUser=function(s){var c=null;return s.assetImage&&(c=s.assetImage.user),s.assetText&&(c=s.assetText.user),s.assetArticle&&(c=s.assetArticle.user),s.assetFile&&(c=s.assetFile.user),s.assetStaticArticle&&(c=s.assetStaticArticle.user),c},this.getThumbnail=function(s){var c=null;return s.assetText&&(c=s.thumbnailUrl),c},{getAsset:function(s,c){var i=c.filter(function(A){return A.guid===s})[0];if(i.assetText){var o=null,h=i.assetText.type;if(5===h)o=e("youtubeImage")(i.assetText.text);else if(6===h)o=e("facebookImage")(i.assetText.text);else if(7===h)o=e("vimeoImage")(i.assetText.text);else if(13===h)o=e("apicodoMediaServiceImage")(i.assetText.text);else if(14===h){var p=a.defer();return n.getWorkflowTemplate(i.assetText.text).then(function(A){if(i){var x=new f({guid:i.guid,imgContent:A.name,textContent:A.description,type:14,author:new g(u.getUser(i))});p.resolve(x)}else p.resolve({guid:s})},function(){p.resolve({guid:s})}),p.promise}if(o){var v=t.valueOf(o);i.thumbnailUrl=v}}return new Promise(function(A,x){A(i?new f({guid:i.guid,imgContent:u.getImageContent(i),textContent:u.getTextContent(i),videoThumbnail:u.getThumbnail(i),type:u.getAssetType(i),author:new g(u.getUser(i))}):{guid:s})})}}}]),app.component("editorCommentItem",{templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/editorCommentItem.html",bindings:{authorName:"@",messageText:"@",messageDate:"@",profileImage:"@",enableDelete:"<",onDelete:"&"}}),app.service("editorCommentService",["$http","$q",function(e,t){var a=this;return this.url=scope.apiEndpoint+"editorCommentsArticle",{save:function(f){var r=t.defer();return e.put(a.url,f).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise},getChain:function(f){var r=t.defer();return e.get(a.url+"/chain/"+f).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise},deleteComment:function(f){var r=t.defer();return e.delete(a.url,{data:f,headers:{"Content-type":"application/json;charset=utf-8"}}).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise}}}]),app.service("editorCommentSponsoredArticleService",["$http","$q",function(e,t){var a=this;return this.url=scope.apiEndpoint+"editorCommentsSponsoredArticle",{save:function(f){var r=t.defer();return e.put(a.url,f).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise},getChain:function(f){var r=t.defer();return e.get(a.url+"/chain/"+f).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise},deleteComment:function(f){var r=t.defer();return e.delete(a.url,{data:f,headers:{"Content-type":"application/json;charset=utf-8"}}).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise}}}]),app.service("editorCommentStaticArticleService",["$http","$q",function(e,t){var a=this;return this.url=scope.apiEndpoint+"editorCommentsStaticArticle",{save:function(f){var r=t.defer();return e.put(a.url,f).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise},getChain:function(f){var r=t.defer();return e.get(a.url+"/chain/"+f).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise},deleteComment:function(f){var r=t.defer();return e.delete(a.url,{data:f,headers:{"Content-type":"application/json;charset=utf-8"}}).then(function(s){r.resolve(s.data)},function(s){r.reject(s)}),r.promise}}}]),app.controller("ListEditorCommentDialogController",["$scope","onDeletedCallback","onAddedCallback","messageHolder","chainComments","profileService","sourceService",function(e,t,a,n,u,g,f){var r=this;function s(i){this.guid=i.guid,this.contentText=i.contentText,this.displayMessages=[]}e.messageText=null,e.master={holderId:n.id},e.newComment=window.angular.copy(e.master),e.availableParentMessages=[],e.selectedParentMessage=null,this.close=function(){e.$dismiss()},this.saveChildComment=function(i){i.parentId=e.selectedParentMessage.guid,f.save(i).then(function(o){e.selectedParentMessage.displayMessages.push(o),e.availableParentMessages.filter(function(h){return h.guid===e.selectedParentMessage.guid})[0].displayMessages.push(o),r.reset()})},this.deleteComment=function(i){f.deleteComment({holderId:n.id,deleteMessageGuid:i,parentGuid:e.selectedParentMessage.guid}).then(function(h){e.selectedParentMessage.displayMessages=h,t(e.selectedParentMessage.guid,i),e.selectedParentMessage.guid===i&&r.close(),r.reset()})},this.reset=function(){e.newComment=window.angular.copy(e.master),e.deleteComment=null},u.chains.forEach(function(i){var o=new s({guid:i.id,contentText:u.textContents[i.id]});f.getChain(o.guid).then(function(h){o.displayMessages=h,e.availableParentMessages.push(o),e.selectedParentMessage||(e.selectedParentMessage=angular.copy(e.availableParentMessages[0]))})}),g.getProfile().then(function(i){e.myProfile=i})}]),app.service("proseMirrorEditorService",["$window",function(e){var t=this;return this.connection=null,{init:function(s){s||(s={docId:"unknown"}),t.connection=e.initializeEditor({docID:s.docID,assetDlgFactory:s.assetDlgFactory,commentCreationDlgFactory:s.commentCreationDlgFactory,createLinkFactory:s.createLinkFactory,callToActionDlgFactory:s.callToActionDlgFactory,commentMgmtDlgFactory:s.commentMgmtDlgFactory,metadataCreationDlgFactory:s.metadataCreationDlgFactory,initialDocument:s.initialDocument,initialAssetReferences:s.initialAssetReferences,assetResolver:s.assetResolver,onNewStateFactory:s.onNewStateFactory,transformHtmlFactory:function(c){var d=$("<div>").html(c).find("img").remove().end().html();return $("<div>").html(d).find("br").remove().end().html().replace(/<\/word><word/gi,"</word><span>&nbsp;</span><word").replace(/&nbsp\;/gi," ")},onLoadTransactionCallback:s.onLoadTransactionCallback||null,languageCode:s.languageCode}),e.editorConnection=t.connection},getDocument:function(){try{return t.connection.exportModel()}catch(s){console.error("getting JSON Document threw an error",s)}},setDocument:function(s){try{t.connection.importModel(s,!0)}catch(c){console.error("loading error with proseMirror",c)}},getHtmlDocument:function(){return t.connection.getDbDoc()},setFocus:function(){t.connection.view.focus()},closeConnection:function(){t.connection.report.success(),t.connection.request.abort()}}}]),app.factory("publishService",["$http","$q","$window","spellingService",function(e,t,a,n){var g=150;return this.checkWords=function(i){if(!i)return 0;var o=n.countWords(i);return o>=g&&o<=750},this.checkSentences=function(i){return i?n.countSentences(i)>=8:0},this.checkParagraphs=function(i){return i?n.countParagraphs(i)>=4:0},this.checkGoogleNewsRecommendation=function(i){return(function(i){if(!i)return 0;var o=n.countParagraphs(i);return o>=4?1:o/4}(i)+function(i){if(!i)return 0;var o=n.countSentences(i);return o>=8?1:o/8}(i)+function(i){if(!i)return 0;var o=n.countWords(i);return o>=g&&o<=750?1:o<g?o/g:750/o}(i))/3},{checkWords:this.checkWords,checkSentences:this.checkSentences,checkParagraphs:this.checkParagraphs,checkGoogleNewsRecommendation:this.checkGoogleNewsRecommendation}}]),app.service("spellingService",[function(){var e=function(u){return"<div>"+u+"</div>"};return{countWords:function(u){var g=e(u);return $(g).find("p:not(:empty)").text().split(/\s+/).filter(function(f){return f}).length},countParagraphs:function(u){var g=e(u);return $(g).find("p:not(:empty)").length},countSentences:function(u){var g=e(u);return $(g).find("p:not(:empty)").text().split(/[!.?]/g).length}}}]),app.service("resourceService",["$http","$q",function(e,t){return{GetResources:function(){var n=t.defer();return e.get(scope.apiEndpoint+"resources").then(function(u){n.resolve(u.data)},function(){n.reject()}),n.promise}}}]),app.controller("RootController",["$scope","$state","$rootScope","$interpolate","logoService","pageMetaInfoService",function(e,t,a,n,u,g){e.profile=a.profile,e.shipmentSnipDistribution=4,e.cookieManager=0,a.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&!navigator.userAgent.includes("Merkurist_IAB")&&!navigator.userAgent.includes("Apicodo_IAB")&&(e.cookieManager=a.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager),e.showSnipSlide=a.showSnipSlide,e.getChapterLogoUrl=function(){return u.getChapterLogoUrl()},e.getChapterLogoDarkUrl=function(){return u.getChapterLogoDarkUrl()},e.chapterGroupChoose=function(f){return n(scope.currentScope.network.resources.web_root_snip_chapterGroupChoose)({chapterGroupName:f.toUpperCase()})},a.$on("$stateChangeSuccess",function(){g.run(t.$current.name)})}]),app.component("rootFooter",{templateUrl:"/ClientApp/src/legacy-app/root/footer/rootFooterComponent.html",bindings:{inputParam:"<"},controller:["$scope","$rootScope",function(e,t){e.year=t.scope.year,e.dataPrivacy=t.scope.currentChapter.partner.settings.dataPrivacyUrl,e.tos=t.scope.currentScope.network.settings.configurations.enableTOS,e.accessibility=t.scope.currentScope.network.settings.configurations.accessibility,e.cookieManager=0,t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&!navigator.userAgent.includes("Merkurist_IAB")&&!navigator.userAgent.includes("Apicodo_IAB")&&(e.cookieManager=t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager)}]}),app.component("rootLogin",{templateUrl:"/ClientApp/src/legacy-app/root/login/rootLoginComponent.html",controller:"rootLoginComponentController",bindings:{inputParam:"<"}}),app.controller("rootLoginComponentController",["$scope","$rootScope","authService","$location","$timeout","$state","instagramService","$uibModal",function(e,t,a,n,u,g,f,r){e.inputType="password",e.showInstagram=f.isAvailable(),e.emailValidationState=0,e.emailValidationStates={none:0,inProgress:1,failure:2,success:3},e.profile=t.scope.profile,!e.profile.isRegistered&&n.search().token?(e.emailValidationState=e.emailValidationStates.inProgress,a.validateEmail(n.search().token).then(function(){u(function(){e.emailValidationState=e.emailValidationStates.success},2e3)},function(){u(function(){e.emailValidationState=e.emailValidationStates.failure},2e3)})):e.profile.isRegistered&&n.search().token?n.path("/settings").replace():e.profile.isRegistered&&g.go("app.main-news");var s={userName:"",password:""};e.loginData=angular.copy(s),e.loginError=null,t.$on("authenticationStateChanged",function(){e.loginError=null,angular.copy(s,e.loginData)}),e.login=function(c){c&&a.login(e.loginData).then(function(){e.loginForm.$setPristine(),n.search().closedToken&&scope.currentChapter.closed?g.go("app.closedChapter",{action:"Get",token:n.search().closedToken}):g.go("app.main-news")},function(d){d.data?e.loginError=d.data:d.error&&"string"==typeof d.error&&""!==d.error&&(e.loginError=d.error),e.loginError||(e.loginError="Unknown error")})},e.saml2ModulePaths=saml2ModulePathSplitted=[],t.scope.network.settings.saml2ModulePath&&(saml2ModulePathSplitted=t.scope.network.settings.saml2ModulePath.split(","),saml2ModulePathSplitted.length>0&&saml2ModulePathSplitted.forEach(c=>{e.saml2ModulePaths.push(c.trim())})),e.loginSaml2=function(c){if(e.saml2ModulePaths.indexOf(c)>=0){var d="/authentication/saml2?authenticationType="+c+"&referrerUri="+encodeURIComponent(window.location.origin+scope.currentScope.appRoute+"login/saml2");if(t.app){var i="location=no,toolbarposition=top,toolbartranslucent=no,hidenavigationbuttons=yes";"android"===cordova.platformId&&(i="location=yes,hideurlbar=yes,zoom=no,hidenavigationbuttons=yes,closebuttoncaption="+scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption"));var o=cordova.InAppBrowser.open(d,"_blank",i);o.addEventListener("loadstart",function(h){h.url.endsWith("login/saml2")&&(o.close(),g.go("app.loginSaml2"))})}else window.location.href=d}},e.register=function(){g.go("app.register",{closedToken:n.search().closedToken})},e.facebookLogin=function(){a.facebookLogin(t.app).then(function(c){c.token?r.open({templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationDialog.html",controller:"AuthenticationDialog",size:"lg",resolve:{authenticationCallback:function(){return function(){g.go("app.main-news"),document.location.reload()}},facebookSignUpData:function(){return c},login:!1}}):n.path("/").search("")})},e.instagramLogin=function(){f.getGrant(t.app)},e.togglePasswordVisibility=function(){e.inputType="password"==e.inputType?"text":"password"}}]),app.component("rootMenu",{templateUrl:"/ClientApp/src/legacy-app/root/menu/rootMenuComponent.html",controller:"rootMenuComponentController",bindings:{inputParam:"<"}}),app.controller("rootMenuComponentController",["$scope","$rootScope","$state","specialService","authService","localStorageService",function(e,t,a,n,u,g){e.isAuthorCollapsed=e.defaultCollapsed,e.profile=t.scope.profile,e.containers=t.scope.currentScope.chapter.containers,e.networkContainers=t.scope.currentScope.network.containers.sort((s,c)=>s.position-c.position),e.containers.sort((s,c)=>s.position-c.position),e.activeSpecials||n.getActiveSpecials().then(function(s){e.activeSpecials=s}),e.toggleAuthorContainer=function(){scope.currentChapter.settings.featureMenuContainerCollapsable>0&&(e.isAuthorCollapsed=!e.isAuthorCollapsed)},e.toggleAdvertiserContainer=function(){scope.currentChapter.settings.featureMenuContainerCollapsable>0&&(e.isAdvertiserCollapsed=!e.isAdvertiserCollapsed)},e.toggleSpecialsContainer=function(){scope.currentChapter.settings.featureMenuContainerCollapsable>0&&(e.isSpecialsCollapsed=!e.isSpecialsCollapsed)},e.toggleSocialContainer=function(){scope.currentChapter.settings.featureMenuContainerCollapsable>0&&(e.isSocialCollapsed=!e.isSocialCollapsed)},e.toggleChapterContainer=function(s){scope.currentChapter.settings.featureMenuContainerCollapsable>0&&(e.isChapterCollapsed[s]=!e.isChapterCollapsed[s])},e.toggleNetworkContainer=function(s){scope.currentChapter.settings.featureMenuContainerCollapsable>0&&(e.isNetworkCollapsed[s]=!e.isNetworkCollapsed[s])},e.defaultCollapsed=2!==t.scope.currentChapter.settings.featureMenuContainerCollapsable,e.isAuthorCollapsed=e.defaultCollapsed,e.isAdvertiserCollapsed=e.defaultCollapsed,e.isSpecialsCollapsed=e.defaultCollapsed,e.isSocialCollapsed=e.defaultCollapsed,e.isChapterCollapsed=[];for(var f=0;f<scope.currentScope.chapter.containers.length;f++)e.isChapterCollapsed[f]=e.defaultCollapsed;e.isNetworkCollapsed=[];for(var r=0;r<scope.currentScope.network.containers.length;r++)e.isNetworkCollapsed[r]=e.defaultCollapsed;e.privateLogOut=function(){const s=t.scope.currentChapter.closed;u.logout().then(function(){Oculus.navigate(""),s?window.location.href="/"!==t.scope.currentChapter.path?t.scope.currentChapter.path+"/login":"/login":(null!==t.scope.currentScope.network.settings.sharedAppLogoutUrl&&(window.location.href=t.scope.currentScope.network.settings.sharedAppLogoutUrl),t.app?window.location.href="/":a.go("app.main-login"))})},e.logout=function(){g.oculusOptOut?e.privateLogOut():Oculus.push(!1,e.privateLogOut)}}]),app.component("rootNews",{templateUrl:"/ClientApp/src/legacy-app/root/news/rootNewsComponent.html",controller:"rootNewsCompomentController",bindings:{inputParam:"<"}}),app.controller("rootNewsCompomentController",["$scope","$rootScope","$state","articleService","snipService","profileService","$interpolate","$timeout","shipmentService","$interval","$filter","$q","logoService",function(e,t,a,n,u,g,f,r,s,c,d,i,o){function C(A,x,b){(b||!e.articleListDisplayables||!e.articleListDisplayableSnips)&&i.all([g.getProfile(),A(),x()]).then(function(R){var y=R[0],l=R[1],M=R[2];e.dataLoading=!1;var T=d("includeMyUnpublishedSnips");e.articleListDisplayableSnips=M,e.articleListDisplayables=function v(A,x){for(var l=[],M=A.slice(),T=x.slice(),k=1;T.length>0||M.length>0&&k<7;){for(var w=0;w<4;w++){var D=T.shift();D&&l.push(D)}for(var S=0;S<3;S++){var U=M.shift();U&&l.push(U)}k++}return l}(T(M,y.guid),l),e.alreadyLoadedArticleIds=e.articleListDisplayables.filter(function(k){return 1===k.articleListDisplayableType}).map(function(k){return k.id}),e.alreadyLoadedSnipIds=e.articleListDisplayables.filter(function(k){return 4===k.articleListDisplayableType}).map(function(k){return k.id}),e.amountOfArticles=e.articleListDisplayables.filter(function(k){return 4!==k.articleListDisplayableType}).length,e.articleListDisplayablesMore=[],r(function(){n.getArticleIds().then(function(k){e.articleListIds=k,e.loadMoreAvailable=e.articleListDisplayables&&e.alreadyLoadedArticleIds.length<e.articleListIds.length}),e.snipListIds=e.articleListDisplayableSnips.map(function(k){return k.id}),e.loadMorePending=!1,t.$emit("lazyImg:refresh"),r(function(){r(function(){s.resolve(Math.round(M.length/e.shipmentSnipDistribution))})})})}).catch(function(R){console.error("ERROR LOADING ARTICLES()",R)})}e.shipmentSnipDistribution=4,e.cookieManager=0,e.dataLoading=!0,e.loadMorePending=!1,t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&!navigator.userAgent.includes("Merkurist_IAB")&&!navigator.userAgent.includes("Apicodo_IAB")&&(e.cookieManager=t.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager),e.getChapterLogoUrl=function(){return o.getChapterLogoUrl()},e.getChapterLogoDarkUrl=function(){return o.getChapterLogoDarkUrl()},e.$on("apicodo.translate",function(A,x){var b=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,R=t.scope.profile;if(1==b){var y=t.scope.network.settings.languagePack.split("-")[0];null!=R.activeUserLanguage?.vendorLanguageCode&&y!=R.activeUserLanguage?.vendorLanguageCode&&(x=R.activeUserLanguage?.vendorLanguageCode)}a.is("app.main-news")&&(null===x?C(n.getMainArticles,u.getSnips,!0):(C(function(){return n.getTranslatedArticles(x)},function(){return u.getTranslatedSnipList(x)},!0),g.updateFavoriteLanguage(x).then(function(){t.profile.favoriteLanguage=x})))}),"Redesign2024"!==t.scope.network.settings.configurations.contentRenderEngine&&(e.premiumShipment||s.getShipmentPremium().then(function(A){e.premiumShipment=A}),a.includes("app.main-news")?C(n.getMainArticles,u.getSnips,!0):r(function(){C(n.getMainArticles,u.getSnips)})),e.loadMore=function(){e.remainingArticleIds=e.articleListIds.filter(function(A){return e.alreadyLoadedArticleIds.indexOf(A)<0}),e.remainingSnipIds=e.snipListIds.filter(function(A){return e.alreadyLoadedSnipIds.indexOf(A)<0}),e.amountOfArticles=e.articleListDisplayables.filter(function(A){return 4!==A.articleListDisplayableType}).length,e.loadMorePending=!0,i.all([g.getProfile(),n.getArticlesByIds(e.remainingArticleIds.splice(0,e.amountOfArticles))]).then(function(A){var x=A[0],b=A[1],R=d("includeMyUnpublishedSnips");e.dataLoading=!1;var T,k,S,U,I,m,F,l=e.articleListDisplayableSnips.filter(function(T){return e.remainingSnipIds.indexOf(T.id)>=0}),M=(T=R(l,x.guid),k=b,S=[],U=T.slice(),I=k.slice(),m=function(){for(;I.length>0;){for(var E=0;E<4;E++){var V=I.shift();V&&S.push(V)}for(var q=0;q<3;q++){var O=U.shift();O&&S.push(O)}}},F=function(){for(;U.length>0||I.length>0;){for(var E=0;E<3;E++){var V=U.shift();V&&S.push(V)}for(var q=0;q<4;q++){var O=I.shift();O&&S.push(O)}}},e.articleListDisplayablesMore.length>0?4===e.articleListDisplayablesMore[e.articleListDisplayablesMore.length-1].articleListDisplayableType?m():F():4===e.articleListDisplayables[e.articleListDisplayables.length-1].articleListDisplayableType?m():F(),S);angular.forEach(M,function(T){e.articleListDisplayablesMore.push(T),4===T.articleListDisplayableType?e.alreadyLoadedSnipIds.push(T.id):e.alreadyLoadedArticleIds.push(T.id)}),e.articleListDisplayablesMoreShow=!1,e.loadMoreAvailable=e.alreadyLoadedArticleIds.length<e.articleListIds.length,r(function(){e.loadMorePending=!1,e.dataLoading=!1,e.articleListDisplayablesMoreShow=!0})})},e.chapterGroupChoose=function(A){return f(t.scope.currentScope.network.resources.web_root_snip_chapterGroupChoose)({chapterGroupName:A.toUpperCase()})}}]),app.component("rootNotifications",{templateUrl:"/ClientApp/src/legacy-app/root/notifications/rootNotificationsComponent.html",bindings:{inputParam:"<"},controller:"rootNotificationsComponentController"}),app.controller("rootNotificationsComponentController",["$scope","$rootScope","metaService","notificationService","$interval","redirectService","$state",function(e,t,a,n,u,g,f){e.message="Notifications message works!",e.notifications=[],e.notificationsLoading=!0,e.clickNotification=function(r){n.click(r),r.openSeparate?window.open(r.uri):g.redirectNotificationUrl(r.uri)},a.push("Benachrichtigung","Benachrichtigung"),notificationUpdateInterval=u(function(){f.is("app.main-notifications")&&n.getNotifications().then(function(r){e.notifications=r,e.notificationsLoading=!1})},3e4),n.getNotifications().then(function(r){e.notifications=r,e.notificationsLoading=!1}),n.updateUnseenCount()}]),app.component("rootSnips",{templateUrl:"/ClientApp/src/legacy-app/root/snips/rootSnipsComponent.html",controller:"rootSnipsComponentController",bindings:{inputParam:"<"}}),app.controller("rootSnipsComponentController",["$scope","$rootScope","snipService","$interpolate","$filter","profileService",function(e,t,a,n,u,g){e.doWork=!1,e.snip={},e.snips=[],e.profile=t.scope.profile,e.snipsLoading=!0,e.code=t.scope.network.settings.languagePack.split("-")[0];var f=u("includeMyUnpublishedSnips");e.snipsLoader=function(r,s){s||(s=e.code);var c=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==c){var d=t.scope.profile;null!=d.activeUserLanguage?.vendorLanguageCode&&e.code!=d.activeUserLanguage?.vendorLanguageCode&&(s=d.activeUserLanguage?.vendorLanguageCode)}s===e.code?a.getSnips().then(function(i){e.snips=[],e.snips=i,e.snipsLoading=!1,t.$broadcast("$$rebind::refreshSnips")}):a.getTranslatedSnipList(s).then(function(i){e.snips=[],e.snips=i,e.snipsLoading=!1,g.updateFavoriteLanguage(s).then(function(){t.profile.favoriteLanguage=s}),t.$broadcast("$$rebind::refreshSnips")})},e.$on("apicodo.translate",e.snipsLoader),e.submitNewSnip=function(){e.snip.chapterGroupSelections&&(e.snip.chapterSlugs=Object.keys(e.snip.chapterGroupSelections).map(function(r){return e.snip.chapterGroupSelections[r]})),e.doWork=!0,a.createSnip(e.snip).then(function(r){e.doWork=!1,e.snip={},e.snips.push(r);var s=scope.currentChapter.path+r.path;$location.path(s)},function(){e.doWork=!1,e.error=!0})},(e.code===t.scope.profile.activeUserLanguage?.vendorLanguageCode||!t.scope.profile.activeUserLanguage?.vendorLanguageCode)&&(e.loadSnips=function(){e.snips=[],a.getSnips().then(function(r){e.snips=f(r,e.profile.guid),e.snipsLoading=!1}).catch(function(r){console.error("Error loading snips:",r)})}),e.snipsLoader(null,null),e.chapterGroupChoose=function(r){return n(scope.currentScope.network.resources.web_root_snip_chapterGroupChoose)({chapterGroupName:r.toUpperCase()})}}]),app.controller("SearchController",["$scope","$rootScope","searchService","$state","$location","$uibModal","$timeout","translationService",function(e,t,a,n,u,g,f,r){if("Redesign2024"!=t.scope.currentScope.network.settings.configurations.contentRenderEngine){let o=function(p,v){e.hits=null,e.state=p||u.search().searchFilter;var C=u.search().chapterIds,A=u.search().showAll;if(C=s(C),e.hasChapterIds=C.length>0,e.hasQuery=!1,e.model.query&&(e.hasQuery=e.model.query.length>0),!v&&(v={},u.search().staffDirFilter)){var x=JSON.parse(decodeURIComponent(u.search().staffDirFilter));x&&(x.datePickers&&(angular.forEach(Object.entries(x.datePickers),function(b){if(b[1].from){var R=new Date(b[1].from);b[1].from=R}if(b[1].until){var y=new Date(b[1].until);b[1].until=y}}),x.attributeRanges=c(x.datePickers)),v=x)}if(e.filtered=C.length>0,!0===e.isStaffDirectoryEnabled||!0===e.isCalendarEnabled)switch(e.state){case"all":default:(C.length>0||e.translatedValue||A)&&(e.searching=!0,a.search(e.translatedValue,C).then(function(b){e.hits=b,e.searching=!1})),e.isStaffDirectoryEnabled&&a.getStaffDirectoryUsers(e.translatedValue,v.optionIds,v.booleanIds,v.attributeRanges,e.state).then(function(b){e.staffDirectoryUserHits=b}),e.isCalendarEnabled&&(C.length>0||e.translatedValue||A)&&a.getEvents(e.translatedValue,0,C).then(function(b){b.forEach(R=>{R.start=new Date(R.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),R.end=new Date(R.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),R.date=R.start!==R.end?`${R.start} - ${R.end}`:R.start}),e.eventHits=b});break;case"staffs":e.hits=null,e.eventHits=null,e.searching=!0,a.getStaffDirectoryUsers(e.translatedValue,v.optionIds,v.booleanIds,v.attributeRanges,e.state).then(function(b){e.staffDirectoryUserHits=b,e.searching=!1});break;case"articles":(C.length>0||e.translatedValue||A)&&(e.searching=!0,a.search(e.translatedValue,C).then(function(b){e.hits=b,b||(e.hits=[]),e.searching=!1})),e.staffDirectoryUserHits=null,e.eventHits=null;break;case"events":e.hits=null,e.staffDirectoryUserHits=null,(C.length>0||e.translatedValue||A)&&(e.searching=!0,a.getEvents(e.translatedValue,0,C).then(function(b){b.forEach(R=>{R.start=new Date(R.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),R.end=new Date(R.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),R.date=R.start!==R.end?`${R.start} - ${R.end}`:R.start}),e.eventHits=b,e.searching=!1}))}else C.length>0||e.translatedValue||A?(e.searching=!0,a.search(e.translatedValue,C).then(function(b){e.hits=b,e.searching=!1}),e.staffDirectoryUserHits=[],e.eventHits=[]):(e.hits=null,e.staffDirectoryUserHits=null,e.eventHits=null);u.search("q",e.model.query)},h=function(p){return new Promise(function(v,C){r.translateToOrigin([p]).then(x=>{e.translatedValue=x[0].translation,v()})})};e.hits=null,e.translatedValue=null,e.staffDirectoryUserHits=null,e.model={},e.model.query=u.search().q,e.filter=null,e.searching=!1,e.isMobileView=t.mobile,e.hasChapterGroups=scope.currentScope.chapter.chapterGroups.length>0,e.isStaffDirectoryEnabled=t.scope.currentScope.network.settings.isStaffDirectoryEnabled,e.isCalendarEnabled=t.scope.currentScope.network.settings.configurations.enableCalendar,e.state=u.search().searchFilter||"all",e.hasChapterIds=!1,e.hasQuery=!1;var s=function(p){if(angular.isArray(p))return p;var v=[];return p&&v.push(p),v},c=function(p){return Object.keys(p).map(function(v){return{attribute_Id:v,from:p[v].from,until:p[v].until,ignoreYear:p[v].ignoreYear}})};e.search=function(p,v){var C=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,A=t.scope.profile.activeUserLanguage,x=t.scope.network.settings.languagePack.split("-")[0];A||(A={vendorLanguageCode:x,nativeName:t.scope.network.getResourceOrKeyName("web_translation_use_original")}),1==C&&A.vendorLanguageCode!=x?h(e.model.query).then(function(){o(p,v)}):(e.translatedValue=e.model.query,o(p,v))},e.filtering=function(p){e.state=p.state,1==p.shouldResetSearch&&(e.translatedValue=null)},e.navigateUp=function(){f(function(){n.go("app.main-news")})},e.loadArticles=function(){var p=u.search().chapterIds;p=s(p),e.hasChapterIds=p.length>0,a.getArticles(e.translatedValue,e.hits.articles.length/10,p).then(function(v){e.hits.articles=e.hits.articles.concat(v)})},e.filterModal=function(){g.open({templateUrl:"/ClientApp/src/legacy-app/search/searchFilterDialog.html",controller:"SearchFilterDialog",size:"lg",resolve:{searchCallback:function(){return e.search}}})},e.isMobileView?$("#app-search-input-mobile").focus():$("#app-search-input-desktop").focus(),e.search()}}]),app.component("searchFilter",{bindings:{searchCallback:"<",filterStateCallback:"<"},templateUrl:"/ClientApp/src/legacy-app/search/searchFilter.html",controller:["$location","$rootScope","searchService","$scope","translationService",function(e,t,a,n,u){var g=this;g.staffDirEnabled=t.scope.currentScope.network.settings.isStaffDirectoryEnabled,g.calendarEnabled=t.scope.currentScope.network.settings.configurations.enableCalendar,g.filtered=!1,g.filterGroupsReady=!1,g.filterRubricsReady=!1,g.isMobileView=t.mobile,g.countChanges=0,g.filterInitialized=!1,g.chapterGroupNames=[],g.chapterGroups=[],g.filterTypes=[{id:0,display:t.scope.currentScope.network.resources.web_filter_mode_both||"!RES[web_filter_mode_both]"},{id:1,display:t.scope.currentScope.network.resources.web_filter_mode_articles||"!RES[web_filter_mode_articles]"}],g.staffDirEnabled&&g.filterTypes.push({id:-1,display:t.scope.currentScope.network.resources.web_filter_mode_staff_dir||"!RES[web_filter_mode_staff_dir]"}),g.calendarEnabled&&g.filterTypes.push({id:2,display:t.scope.currentScope.network.resources.web_filter_mode_events||"!RES[web_filter_mode_events]"}),n.noSelectionStyle={"background-color":"cadetblue"},g.searchFilter=e.search().searchFilter||"all",g.$onInit=function(){a.getStaffDirectoryAttributes().then(function(A){g.attributes=A});var v=e.search().searchFilter;if(v){switch(v){case"staffs":g.rangeSelection=-1;break;case"all":default:g.rangeSelection=0;break;case"articles":g.rangeSelection=1;break;case"events":g.rangeSelection=2}g.filtered=!0}if(e.search().staffDirFilter){var C=JSON.parse(decodeURIComponent(e.search().staffDirFilter));C&&(C.datePickers&&(angular.forEach(Object.entries(C.datePickers),function(A){if(A[1].from){var x=new Date(A[1].from);A[1].from=x}if(A[1].until){var b=new Date(A[1].until);A[1].until=b}}),C.attributeRanges=p(C.datePickers)),g.staffDirFilter=C,g.filtered=!0)}g.filterInitialized=!0};var f=scope.currentScope.chapter.chapterGroups,r=t.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==r){if(f){g.chapterGroups=f;var s=f.map(function(v){return v.name});u.translateByUserLanguageCode(s).then(v=>{v.forEach((C,A)=>{f[A].name=C.translation}),g.chapterGroupNames=f,g.filterGroupsReady=g.chapterGroupNames.length>0});var d=f.map(function(v){return v.chapters}).map((v,C)=>{var A=v.map(function(x){return x.shortName});return u.translateByUserLanguageCode(A).then(x=>{x.forEach((b,R)=>{f[C].chapters[R].shortName=b.translation})})});Promise.all(d).then(()=>{g.filterRubricsReady=!0})}}else f&&(g.chapterGroupNames=f,g.chapterGroups=f),g.filterGroupsReady=!0,g.filterRubricsReady=!0;for(let v=0;v<g.chapterGroups.length;v++)g.chapterGroups[v].chapters.sort(function(C,A){return C.order<A.order?-1:1});if(g.chapterGroupSelections={},g.staffDirFilter={},g.changeFilter=function(v){v=g.rangeSelection,g.countChanges++,-1==v&&(g.searchFilter="staffs"),0==v&&(g.searchFilter="all"),1==v&&(g.searchFilter="articles"),2==v&&(g.searchFilter="events"),e.search("searchFilter",g.searchFilter),g.updateQuery()},e.search().chapterIds){var i=[],o=e.search().chapterIds;angular.isArray(o)?i=o:i.push(o),angular.forEach(i,function(v){angular.forEach(g.chapterGroups,function(C,A){C.chapters.filter(function(x){return x.id===v}).length>0&&(g.chapterGroupSelections[A]=v,g.filtered=!0)})})}var h=function(v){return Object.keys(v).map(function(C){return v[C]})},p=function(v){return Object.keys(v).map(function(C){return{attribute_Id:C,from:v[C].from,until:v[C].until,ignoreYear:v[C].ignoreYear}})};g.updateQuery=function(){if(g.chapterGroupSelections){var v=h(g.chapterGroupSelections);e.search("chapterIds",v)}if(g.staffDirFilter.optionSelections){var C=h(g.staffDirFilter.optionSelections);g.staffDirFilter.optionIds=C}if(g.staffDirFilter.datePickers&&(g.staffDirFilter.attributeRanges=p(g.staffDirFilter.datePickers)),g.staffDirFilter.booleanSelections){var A=h(g.staffDirFilter.booleanSelections);A=A.filter(function(b){return void 0!==b}),g.staffDirFilter.booleanIds=A}if(g.staffDirFilter.optionSelections||g.chapterGroupSelections||g.booleanSelections||g.datePickers){var x=encodeURIComponent(JSON.stringify(g.staffDirFilter));e.search("staffDirFilter",x),g.filtered=!0,g.searchCallback(g.searchFilter,g.staffDirFilter)}},g.resetFilter=function(){e.search("chapterIds",null),g.chapterGroupSelections={},g.staffDirFilter={},e.search("staffDirFilter",null),g.filtered=!1,g.searchCallback(g.searchFilter,g.staffDirFilter)}}]}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),a=t.length,n=new Array(a);a--;)n[a]=[t[a],e[t[a]]];return n}),Object.keys||(Object.keys=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=a.length;return function(u){if("function"!=typeof u&&("object"!=typeof u||null===u))throw new TypeError("Object.keys called on non-object");var f,r,g=[];for(f in u)e.call(u,f)&&g.push(f);if(t)for(r=0;r<n;r++)e.call(u,a[r])&&g.push(a[r]);return g}}()),app.controller("SearchFilterDialog",["searchCallback","$location","$scope",function(e,t,a){if(a.chapterGroups=scope.currentScope.chapter.chapterGroups,a.chapterGroupSelections={},a.filtered=!1,a.searchCallback=e,t.search().chapterIds){var n=[],u=t.search().chapterIds;angular.isArray(u)?n=u:n.push(u),angular.forEach(n,function(f){angular.forEach(a.chapterGroups,function(r,s){r.chapters.filter(function(c){return c.id===f}).length>0&&(a.chapterGroupSelections[s]=f,a.filtered=!0)})})}a.updateQuery=function(){a.chapterGroupSelections&&(a.filtered=!0)},a.resetFilter=function(){a.chapterGroupSelections={},a.filtered=!1},a.save=function(){a.$dismiss()}}]),app.factory("searchService",["$http","$q",function(e,t){var a=function(v,C,A){var x={};return v&&(x.query=v),C&&(x.page=C),A&&(x.chapterIds=A),x};function h(v,C,A){var x=t.defer();return e.post(scope.apiEndpoint+A,a(v,C)).then(function(b){x.resolve(b.data)},function(){x.reject()}),x.promise}return{search:function(v,C){var A=t.defer();return e.post(scope.apiEndpoint+"search",a(v,0,C)).then(function(x){A.resolve(x.data)},function(){A.reject()}),A.promise},getArticles:function(v,C,A){var x=t.defer();return e.post(scope.apiEndpoint+"search/articles",a(v,C,A)).then(function(b){x.resolve(b.data)},function(){x.reject()}),x.promise},getAssetArticles:function(v,C){var A=t.defer();return e.post(scope.apiEndpoint+"search/assets/articles",a(v,C)).then(function(x){A.resolve(x.data)},function(){A.reject()}),A.promise},getAssetSponsoredArticles:function(v,C){var A=t.defer();return e.post(scope.apiEndpoint+"search/assets/articles/sponsored?q=",a(v,C)).then(function(x){A.resolve(x.data)},function(){A.reject()}),A.promise},getAssetImages:function(v,C){return h(v,C,"search/assets/images")},getSponsoredAssetImages:function(v,C){return h(v,C,"search/assets/images/sponsored")},getAssetFiles:function(v,C){return h(v,C,"search/assets/files")},getSponsoredAssetFiles:function(v,C){return h(v,C,"search/assets/files/sponsored")},getStaffDirectoryUsers:function(v,C,A,x,b){var R=t.defer();return e.post(scope.apiEndpoint+"search/staffDirectory",{query:v,optionIds:C,booleanIds:A,attributeDateTimeRanges:x,filterState:b}).then(function(y){R.resolve(y.data)},function(){R.reject()}),R.promise},getStaffDirectoryAttributes:function(){var v=t.defer();return e.get(scope.apiEndpoint+"staffDirectory/attributes").then(function(C){v.resolve(C.data)},function(){v.reject()}),v.promise},getEvents:function p(v,C,A){var x=t.defer();return e.post(scope.apiEndpoint+"search/events",a(v,C,A)).then(function(b){x.resolve(b.data)},function(){x.reject()}),x.promise}}}]),app.controller("SnipApplyController",["$interpolate","$scope","$rootScope","snipService","authorService","profileService","$stateParams","$location",function(e,t,a,n,u,g,f,r){t.snip=null;var s=f.id;t.targetSnipId=s,"Redesign2024"!=a.scope.currentScope.network.settings.configurations.contentRenderEngine&&(t.web_snipApply_notAppliedDescription=e(scope.currentScope.network.resources.web_snipApply_notAppliedDescription)({web_common_author_custom:scope.currentScope.network.getResourceOrKeyName("web_common_author_custom")}),g.getProfile().then(function(c){c.isJournalist?(n.getSnipDetails(s).then(function(d){t.snip=d}),u.checkApply(s).then(function(d){t.hasApplied=d})):r.path("/author/register").search("fromApply","1")},function(c){r.path("/author/register")}),t.apply=function(){u.applySnip(s).then(function(c){r.path("/dashboard")})})}]),app.controller("SnipDeleteDialog",["$scope","snipService","snip",function(e,t,a){e.delete=function(){t.deleteSnip(a.id).then(function(){a.deleted=new Date,e.$dismiss()},function(){e.error=!0})}}]),app.controller("SnipDetailController",["$rootScope","$scope","$previousState","snipService","$location","snip","$timeout","articleService","profileService","$uibModal","translationService","assetService",function(e,t,a,n,u,g,f,r,s,c,d,i){if((!document.referrer||!document.referrer.startsWith(scope.globalSettings.serverCdnUrl))&&!a.get()&&history){var o=u.path();history.replaceState(null,"",scope.currentChapter.path),history.pushState(null,"",scope.currentChapter.path+o)}var A;if(t.$on("$viewContentLoaded",function(){f(function(){t.viewContentLoaded=!0});var A=e.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==A){var x=e.scope.profile,b=e.scope.network.settings.languagePack.split("-")[0];null!=x.activeUserLanguage?.vendorLanguageCode&&b!=x.activeUserLanguage?.vendorLanguageCode&&t.translateSnip(x.activeUserLanguage?.vendorLanguageCode)}}),t.hasHowto=e.scope.staticArticles.filter(function(A){return"/howto"===A.path}).length>0,t.hideUserInteraction=1==scope.currentChapter.settings.configurations.hideAssetsForUnregisteredUsers&&0==e.scope.profile.isRegistered&&0==e.app,$(window).scroll(function(A){$(A.target).scrollTop()>100?$(".snipDetail-mobileNavigation-wrapper").addClass("snipDetail-mobileNavigation-wrapper-scrolled"):$(".snipDetail-mobileNavigation-wrapper").removeClass("snipDetail-mobileNavigation-wrapper-scrolled")}),t.recommendedSnips=[],t.snip=g,t.availableTargetLanguages=null,d.getAvailableTargetLanguages().then(function(A){t.availableTargetLanguages=A}),t.selectedTargetLanguage=e.profile.favoriteLanguage,t.$on("apicodo.translate",function(A,x){t.translateSnip(x)}),t.translateSnip=function(A){A&&(t.selectedTargetLanguage=A),null===t.selectedTargetLanguage?n.getSnipDetails(t.snip.id).then(function(x){t.snip.text=x.text,t.snip.formattedText=x.formattedText,t.snip.assetReferences=x.assetReferences,C()}):n.getTranslatedSnipDetails(t.snip.id,t.selectedTargetLanguage).then(function(x){t.snip.text=x.text,t.snip.formattedText=x.formattedText,t.snip.assetReferences=x.assetReferences,C(),s.updateFavoriteLanguage(t.selectedTargetLanguage).then(function(){e.profile.favoriteLanguage=t.selectedTargetLanguage})})},e.scope.currentScope.chapter.settings.enableSnipRecommendations&&n.getRecommendedSnips(t.snip.id).then(function(A){t.recommendedSnips=A}),g.articleId&&r.getArticleDetails(g.articleId).then(function(A){t.article=A}),t.deleteSnip=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/snip/snipDeleteDialog.html",controller:"SnipDeleteDialog",size:"lg",resolve:{snip:function(){return t.snip}}})},t.contactSnipUser=function(){s.getProfile().then(function(A){A.isRegistered&&c.open({templateUrl:"/ClientApp/src/legacy-app/user/userContactDialog.html",controller:"UserContactDialog",size:"lg",resolve:{snip:function(){return t.snip}}})})},(A=window.navigator.userAgent).indexOf(" Android ")>-1&&A.indexOf("Version/")>-1&&parseFloat((A.match("Android ([0-9.]+)")||[])[1])<=4.4){var p=$(window).height();$(".app-mobile .snipDetail-wrapper").css("height",p+"px"),$(".app-desktop .snipDetail-wrapper").css("height",p+"px")}var v=function(A){t.snip.assetReferences.unshift(A),C()};function C(){t.snip.assetsMedia=[],t.snip.assetsFacts=[],t.snip.assetsQuestions=[],t.snip.assetsComments=[],angular.isDefined(g.assetReferences)&&g.assetReferences.forEach(function(A){null!==A.assetImage||null!==A.assetText&&(5===A.assetText.type||6===A.assetText.type||7===A.assetText.type||10===A.assetText.type||13===A.assetText.type)?t.snip.assetsMedia.push(A):null!==A.assetText&&(8===A.assetText.type?t.snip.assetsFacts.push(A):9===A.assetText.type?t.snip.assetsQuestions.push(A):0===A.assetText.type&&t.snip.assetsComments.push(A))})}t.assetCreateOpinionDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateOpinionDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 0},resultCallback:function(){return v},createAssetAsync:function(){return function(A){return i.insertAssetTextToSnip(A,t.snip.id)}}}})},t.assetCreateFactDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateFactDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 8},resultCallback:function(){return v},createAssetAsync:function(){return function(A){return i.insertAssetTextToSnip(A,t.snip.id)}}}})},t.assetCreateQuestionDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateQuestionDialog.html",controller:"AssetCreateCommonDialog",backdrop:"static",size:"lg",resolve:{assetType:function(){return 9},resultCallback:function(){return v},createAssetAsync:function(){return function(A){return i.insertAssetTextToSnip(A,t.snip.id)}}}})},t.assetCreateImageDialog=function(A,x,b){A&&0!==A.length?x.length||c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateImageDialog.html",controller:"AssetCreateImageDialog",size:"lg",resolve:{files:function(){return A},resultCallback:function(){return v},createAssetAsync:function(){return function(R){return i.insertAssetImageToSnip(R,t.snip.id)}}}}):x||b.$setPristine()},t.assetCreateVideoDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateVideoDialog.html",controller:"AssetCreateVideoDialog",size:"lg",resolve:{resultCallback:function(){return v},createAssetAsync:function(){return function(A){return i.insertAssetTextToSnip(A,t.snip.id)}}}})},t.assetCreateGifDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateGifDialog.html",controller:"AssetCreateGifDialog",size:"lg",resolve:{resultCallback:function(){return v},createAssetAsync:function(){return function(A){return i.insertAssetTextToSnip(A,t.snip.id)}}}})},t.assetSearchDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetSearchDialog.html",controller:"AssetSearchDialog",size:"lg",resolve:{resultCallback:function(){return v},snipId:function(){return t.snip.id},assetReferences:function(){return t.snip.assetReferences}}})},t.assetImageFocuspointDialog=function(A){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){return A}}})},t.scrollTo=function(A){$("body,html").animate({scrollTop:$(A).offset().top-120},1e3)},C(),t.share=function(){!window.plugins||!window.plugins.socialsharing||(window._paq&&_paq.push(["trackEvent","Conversion","StartShareSnip","SnipDetail"]),window.plugins.socialsharing.shareWithOptions({message:t.snip.text+" "+u.absUrl()},function(){window._paq&&_paq.push(["trackEvent","Conversion","SuccessShareSnip","SnipDetail"])}))}}]),app.controller("SnipElasticReportController",["$scope","$rootScope","snipService","scopeService","$timeout","$location","$stateParams",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var o,h,p,v,r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{name:t.scope.currentScope.network.getResourceOrKeyName("web_report_unknownReferrer"),color:"#cccccc",regEx:["^$"]},{name:t.scope.currentScope.network.domain.charAt(0).toUpperCase()+t.scope.currentScope.network.domain.slice(1),color:r,regEx:["^https?:\\/\\/"+t.scope.currentScope.network.domain]},{name:"Facebook",color:"#3B5998",regEx:["^https?:\\/\\/(\\w*\\.)?facebook\\.com","^android-app:\\/\\/m.facebook."]},{name:"Google",color:"#F44336",regEx:["^https?:\\/\\/((www\\.)|(images\\.))?google\\.","^android-app:\\/\\/com\\.google\\.android\\.googlequicksearchbox"]},{name:"Twitter",color:"#4099FF",regEx:["^https?:\\/\\/t\\.co\\/","^https?:\\/\\/twitter\\.com\\/"]},{name:"Webmail",color:"#ff66ff",regEx:["^https?:\\/\\/.*\\.mail\\.live\\.com","^https?:\\/\\/mail\\.google\\.com","^https?:\\/\\/3c\\.gmx\\.net","^https?:\\/\\/3c\\.web\\.de","^https?:\\/\\/email\\.t-online\\.de","^https?:\\/\\/3c-bap\\.web\\.de","^https?:\\/\\/email\\.1und1\\.de","^https?:\\/\\/www\\.arcor\\.de\\/home\\/link\\.php"]},{name:"WhatsApp",color:"#43d854",regEx:["^https?:\\/\\/web.whatsapp.com"]},{name:t.scope.currentScope.network.getResourceOrKeyName("web_report_articleSuggestionReferrer"),color:"#F44336",regEx:["^https?:\\/\\/www\\.googleapis\\.com\\/auth\\/chrome-content-suggestions","^https?:\\/\\/play\\.google\\.(com|de){1}\\/newsstand"]},{name:"Google News",color:"#F44336",regEx:["^https?:\\/\\/((www\\.news\\.)|(news\\.))?(url\\.)?google\\."]},{name:"Instagram",color:"#cd486b",regEx:["^https?:\\/\\/(\\w*\\.)?instagram\\."]}],c=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}],d=[],i=[];e.report=null,e.totalReadingTime=0,e.totalReadingCount=0,e.totalImpressionCount=0,e.totalUniqueImpressionCount=0,e.totalUniqueReadingCount=0,e.totalUniqueReadingHavingImpressionsCount=0,e.filterDisabled=!1,e.startDay=null,e.endDay=null;var C=function(R){var y=0,l=0,M=0,T=0,k=0,w=0,D=0,S=0,U=0,I=[];d.length=0,$.each(R,function(m,F){y+=F.desktopReadingCount,l+=F.tabletReadingCount,M+=F.mobileReadingCount,D+=F.uniqueReadingCount,w+=F.uniqueImpressionCount,S+=F.uniqueReadingHavingImpressionsCount,T+=F.readingTime,U+=F.impressionCount,k+=F.readingCount,F.referrers&&$.each(F.referrers,function(E,V){var q=!1;$.each(s,function(O,_){if($.each(_.regEx,function(P,L){if(V.uri.match(L))return I[_.name]?(I[_.name].count+=V.count,q=!0,!1):(I[_.name]={count:V.count,referrer:_.name,color:_.color},d.push(I[_.name]),q=!0,!1)}),q)return!1}),q||(I.others?I.others.count+=V.count:(I.others={count:V.count,referrer:"Andere"},d.push(I.others)))})}),e.$apply(function(){e.totalUniqueReadingCount=D,e.totalUniqueReadingHavingImpressionsCount=S,e.totalReadingTime=T,e.totalImpressionCount=U,e.totalReadingCount=k,e.totalUniqueImpressionCount=w}),c[0].value=Math.round(100/(k/y)),c[1].value=Math.round(100/(k/M)),c[2].value=Math.round(100/(k/l)),v.validateData(),o.validateData()},A=function(){var R=moment(h.startDate).startOf("day").toDate(),y=moment(h.endDate).startOf("day").toDate(),l=e.report.filter(function(M){return M.day>=R&&M.day<=y});C(l),p.zoom(R,moment(y).add(1,"d").toDate()),e.$apply(function(){e.startDay=R,e.endDay=y})};e.filterChapter=function(R){R.filtered=!R.filtered,function(){var R=e.chapters.filter(function(y){return!y.filtered}).map(function(y){return y.id});e.filterDisabled=!0,a.getSnipReport(e.snip.id,{chapterIds:R}).then(function(y){y.forEach(function(l){l.day=moment(l.day.replace("Z","")).toDate()}),e.report=y,u(function(){(function(R){i.length=0,$.each(R,function(y,l){i.push(l)}),h.validateData(),p.validateData()})(y),A(),e.filterDisabled=!1},50)})}()},e.chapterFilterDisabled=function(R){return e.filterDisabled||1===e.chapters.filter(function(y){return!y.filtered}).length&&!R.filtered},a.getSnipDetails(f.id).then(function(R){e.snip=R,a.getSnipReport({snipId:R.id}).then(function(y){y.forEach(function(M){M.day=moment(M.day.replace("Z","")).toDate()}),e.report=y,e.startDay=y[0].day,e.endDay=y[y.length-1].day;var l=[];$.each(R.chapterSlugs,function(M,T){l.push(n.getChapter(T))}),l=l.filter(function(M){return 2===M.managementState}),e.chapters=l,$.each(y,function(M,T){i.push(T)}),u(function(){o=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),(h=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"}],dataProvider:i,categoryField:"day"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"impressionCount",valueField:"impressionCount"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"impressionCount",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).addListener("zoomed",function(){A()}),p=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"},{fromField:"readingCount",toField:"readingCount"}],dataProvider:i,categoryField:"day"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.resources.web_reportSnip_uniqueReadersAmount,id:"impressionCount",type:"smoothedLine",valueField:"impressionCount",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.resources.web_report_viewableImpressions+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_reportSnip_callsAmount"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_calls"),valueField:"readingCount",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_calls")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),(v=AmCharts.makeChart("chartReferrers",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,valueField:"count",titleField:"referrer",colorField:"color",labelsEnabled:!1,autoMargins:!1,pullOutRadius:0,innerRadius:"30%",legend:{switchable:!1,textClickEnabled:!0,markerType:"circle",position:"bottom",autoMargins:!1,marginLeft:2},balloonText:"[[title]]: [[value]]"})).legend.addListener("clickLabel",function(M){M.dataItem.dataContext.name.startsWith("http")&&window.prompt(scope.currentScope.network.getResourceOrKeyName("web_report_copyLink"),M.dataItem.dataContext.referrer)}),C(y)})},function(){e.error=!0})})}]),app.controller("SnipReportController",["$scope","$rootScope","snip","chapterReport","snipService","scopeService","$timeout",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:r,value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],c=[],d=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],i=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}];n.forEach(function(o){o.chapter=g.getChapter(o.chapterSlug),o.report.calendar.forEach(function(h){h.start=moment(h.start.replace("Z","")).toDate(),h.end=moment(h.end.replace("Z","")).toDate()})}),e.chapterReport=n,e.snip=a,f(function(){var o,h,p,v,C,A,x;$.each(n,function(k,w){w.active=!0});var b=[],R=function(){b.length=0,n.hasVariants=!1,$.each(n[0].report.calendar,function(k,w){b.push({start:w.start,end:w.end,viewableImpressions:0,uniqueViewableImpressions:0,billableViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueReadings:0,femaleUniqueReadings:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueReadings:0,age1824MaleUniqueReadings:0,age2534MaleUniqueReadings:0,age3544MaleUniqueReadings:0,age4554MaleUniqueReadings:0,age55MaleUniqueReadings:0,age1617FemaleUniqueReadings:0,age1824FemaleUniqueReadings:0,age2534FemaleUniqueReadings:0,age3544FemaleUniqueReadings:0,age4554FemaleUniqueReadings:0,age55FemaleUniqueReadings:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0,referrers:[]})}),$.each(n,function(k,w){if(w.active){n[k-1]&&2===n[k-1].chapter.managementState&&2===w.chapter.managementState&&n[k-1].chapter.name!==w.chapter.name&&(n.multiChapterShipment=!0);var D=a.id;$.each(w.report.calendar,function(S,U){U.id=D,b[S].viewableImpressions+=U.viewableImpressions,b[S].uniqueViewableImpressions+=U.uniqueViewableImpressions,b[S].billableViewableImpressions+=U.billableViewableImpressions,b[S].activeTimeSeconds+=U.activeTimeSeconds,b[S].readings+=U.readings,b[S].uniqueReadings+=U.uniqueReadings,b[S].uniqueReadingsHavingViewableImpressions+=U.uniqueReadingsHavingViewableImpressions,b[S].uniqueReadingPercentageReads+=U.uniqueReadingPercentageReads,b[S].maleUniqueReadings+=U.maleUniqueReadings,b[S].femaleUniqueReadings+=U.femaleUniqueReadings,b[S].desktopReadings+=U.desktopReadings,b[S].mobileReadings+=U.mobileReadings,b[S].tabletReadings+=U.tabletReadings,b[S].age1617MaleUniqueReadings+=U.age1617MaleUniqueReadings,b[S].age1824MaleUniqueReadings+=U.age1824MaleUniqueReadings,b[S].age2534MaleUniqueReadings+=U.age2534MaleUniqueReadings,b[S].age3544MaleUniqueReadings+=U.age3544MaleUniqueReadings,b[S].age4554MaleUniqueReadings+=U.age4554MaleUniqueReadings,b[S].age55MaleUniqueReadings+=U.age55MaleUniqueReadings,b[S].age1617FemaleUniqueReadings+=U.age1617FemaleUniqueReadings,b[S].age1824FemaleUniqueReadings+=U.age1824FemaleUniqueReadings,b[S].age2534FemaleUniqueReadings+=U.age2534FemaleUniqueReadings,b[S].age3544FemaleUniqueReadings+=U.age3544FemaleUniqueReadings,b[S].age4554FemaleUniqueReadings+=U.age4554FemaleUniqueReadings,b[S].age55FemaleUniqueReadings+=U.age55FemaleUniqueReadings,b[S].uniqueReadingPercentage24Reads+=U.uniqueReadingPercentage24Reads,b[S].uniqueReadingPercentage2549Reads+=U.uniqueReadingPercentage2549Reads,b[S].uniqueReadingPercentage5074Reads+=U.uniqueReadingPercentage5074Reads,b[S].uniqueReadingPercentage75100Reads+=U.uniqueReadingPercentage75100Reads,U.referrers.length&&U.referrers.forEach(function(I){b[S].referrers.push(I)})})}}),o.validateData(),h.validateData(),p.validateData(),v.validateData(),C.validateData(),A.validateData(),x.validateData()},y=n.summary={referrers:[]},l=function(k,w){y.viewableImpressions=0,y.uniqueViewableImpressions=0,y.billableViewableImpressions=0,y.activeTimeSeconds=0,y.readings=0,y.uniqueReadings=0,y.uniqueReadingsHavingViewableImpressions=0,y.uniqueReadingPercentageReads=0,y.maleUniqueReadings=0,y.femaleUniqueReadings=0,y.desktopReadings=0,y.mobileReadings=0,y.tabletReadings=0,y.age1617MaleUniqueReadings=0,y.age1824MaleUniqueReadings=0,y.age2534MaleUniqueReadings=0,y.age3544MaleUniqueReadings=0,y.age4554MaleUniqueReadings=0,y.age55MaleUniqueReadings=0,y.age1617FemaleUniqueReadings=0,y.age1824FemaleUniqueReadings=0,y.age2534FemaleUniqueReadings=0,y.age3544FemaleUniqueReadings=0,y.age4554FemaleUniqueReadings=0,y.age55FemaleUniqueReadings=0,y.uniqueReadingPercentage24Reads=0,y.uniqueReadingPercentage2549Reads=0,y.uniqueReadingPercentage5074Reads=0,y.uniqueReadingPercentage75100Reads=0;var D=0,S=0,U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0;y.start=k,y.end=w,y.referrers.length=0,$.each(b,function(X,z){var N=new Date(z.start);N<k||N>w||(y.viewableImpressions+=z.viewableImpressions,y.uniqueViewableImpressions+=z.uniqueViewableImpressions,y.billableViewableImpressions+=z.billableViewableImpressions,y.activeTimeSeconds+=z.activeTimeSeconds,y.readings+=z.readings,y.uniqueReadingPercentageReads+=z.uniqueReadingPercentageReads,y.maleUniqueReadings+=z.maleUniqueReadings,y.femaleUniqueReadings+=z.femaleUniqueReadings,y.uniqueReadings+=z.uniqueReadings,y.uniqueReadingsHavingViewableImpressions+=z.uniqueReadingsHavingViewableImpressions,y.uniqueReadingPercentage24Reads+=z.uniqueReadingPercentage24Reads,y.uniqueReadingPercentage2549Reads+=z.uniqueReadingPercentage2549Reads,y.uniqueReadingPercentage5074Reads+=z.uniqueReadingPercentage5074Reads,y.uniqueReadingPercentage75100Reads+=z.uniqueReadingPercentage75100Reads,D+=z.desktopReadings,S+=z.mobileReadings,U+=z.tabletReadings,I+=z.age1617MaleUniqueReadings,m+=z.age1824MaleUniqueReadings,F+=z.age2534MaleUniqueReadings,E+=z.age3544MaleUniqueReadings,V+=z.age4554MaleUniqueReadings,q+=z.age55MaleUniqueReadings,O+=z.age1617FemaleUniqueReadings,_+=z.age1824FemaleUniqueReadings,P+=z.age2534FemaleUniqueReadings,L+=z.age3544FemaleUniqueReadings,K+=z.age4554FemaleUniqueReadings,J+=z.age55FemaleUniqueReadings,z.referrers.forEach(function(H){var ee=y.referrers.filter(function(G){return G.referrer===H.referrer});ee.length?ee[0].readings+=H.readings:y.referrers.push({referrer:H.referrer,readings:H.readings,color:H.color})}))}),y.referrers.sort(function(X,z){return z.readings-X.readings}),y.referrers.forEach(function(X){X.name=X.referrer?X.referrer.substring(0,30):X.referrer}),c.length=0,[].push.apply(c,y.referrers.slice(0,8)),c.filter(function(X){return!X.color}).forEach(function(X,z){X.color=v.colors[z]});var j=y.referrers.slice(9,-1),Z={referrer:scope.currentScope.network.getResourceOrKeyName("web_report_others"),name:scope.currentScope.network.getResourceOrKeyName("web_report_others"),readings:0,color:v.colors[10]};j.forEach(function(X){Z.readings+=X.readings}),Z.readings>0&&c.push(Z);var B=D+S+U;y.desktopReadings=Math.round(100/(B/D)),y.mobileReadings=Math.round(100/(B/S)),y.tabletReadings=Math.round(100/(B/U)),y.maleUniqueReadings=Math.round(y.maleUniqueReadings),y.femaleUniqueReadings=Math.round(y.femaleUniqueReadings),s[0].value=y.femaleUniqueReadings,s[1].value=y.maleUniqueReadings;var Q=I+m+F+E+V+q+O+_+P+L+K+J;y.age1617MaleUniqueReadings=Math.round(100/(Q/I)),y.age1824MaleUniqueReadings=Math.round(100/(Q/m)),y.age2534MaleUniqueReadings=Math.round(100/(Q/F)),y.age3544MaleUniqueReadings=Math.round(100/(Q/E)),y.age4554MaleUniqueReadings=Math.round(100/(Q/V)),y.age55MaleUniqueReadings=Math.round(100/(Q/q)),y.age1617FemaleUniqueReadings=Math.round(100/(Q/O)),y.age1824FemaleUniqueReadings=Math.round(100/(Q/_)),y.age2534FemaleUniqueReadings=Math.round(100/(Q/P)),y.age3544FemaleUniqueReadings=Math.round(100/(Q/L)),y.age4554FemaleUniqueReadings=Math.round(100/(Q/K)),y.age55FemaleUniqueReadings=Math.round(100/(Q/J)),d[0].male=Math.round(-1*y.age1617MaleUniqueReadings),d[1].male=Math.round(-1*y.age1824MaleUniqueReadings),d[2].male=Math.round(-1*y.age2534MaleUniqueReadings),d[3].male=Math.round(-1*y.age3544MaleUniqueReadings),d[4].male=Math.round(-1*y.age4554MaleUniqueReadings),d[5].male=Math.round(-1*y.age55MaleUniqueReadings),d[0].female=Math.round(y.age1617FemaleUniqueReadings),d[1].female=Math.round(y.age1824FemaleUniqueReadings),d[2].female=Math.round(y.age2534FemaleUniqueReadings),d[3].female=Math.round(y.age3544FemaleUniqueReadings),d[4].female=Math.round(y.age4554FemaleUniqueReadings),d[5].female=Math.round(y.age55FemaleUniqueReadings),i[0].value=y.desktopReadings,i[1].value=y.mobileReadings,i[2].value=y.tabletReadings,p.validateData(),C.validateData(),A.validateData(),x.validateData(),v.validateData(),e.$$phase||e.$apply()};o=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:b,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"uniqueReadings",valueField:"uniqueReadings"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"uniqueReadings",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),h=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:b,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_reportSnip_uniqueReadersAmount"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders"),valueField:"uniqueReadings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),p=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),(v=AmCharts.makeChart("chartReferrers",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"readings",titleField:"referrer",colorField:"color",labelsEnabled:!1,autoMargins:!1,pullOutRadius:0,innerRadius:"30%",legend:{switchable:!1,textClickEnabled:!0,markerType:"circle",position:"bottom",autoMargins:!1,marginLeft:2},balloonText:"[[name]]: [[value]]"})).legend.addListener("clickLabel",function(k){k.dataItem.dataContext.referrer.startsWith("http")&&window.prompt(scope.currentScope.network.getResourceOrKeyName("web_report_copyLink"),k.dataItem.dataContext.referrer)}),C=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:r,balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(k){return-1*k.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(k){return k<0?-1*k+"":k+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),A=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),x=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[y],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:r,fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:r,fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:r,fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:r,fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}});var M=function(){var k=moment(o.startDate).startOf("day").toDate(),w=moment(o.endDate).startOf("day").add(-1,"d").toDate();l(k,w),h.zoom(k,moment(w).add(1,"d").toDate())};o.addListener("zoomed",function(){M()}),e.toggleChapter=function(k){$.each(n,function(w,D){null!==D.chapter&&D.chapter.name===k.name&&(D.active=!D.active)}),R(),M()},M(),R();var T=!1;setInterval(function(){"visible"!==document.visibilityState||0===b.length||T||(T=!0,u.getLatestReport(a.id).then(function(k){if(k){k[0].start=moment(k[0].start.replace("Z","")).toDate(),k[0].end=moment(k[0].end.replace("Z","")).toDate();var w={start:k[0].start,end:k[0].end,viewableImpressions:0,uniqueViewableImpressions:0,billableViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueReadings:0,femaleUniqueReadings:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueReadings:0,age1824MaleUniqueReadings:0,age2534MaleUniqueReadings:0,age3544MaleUniqueReadings:0,age4554MaleUniqueReadings:0,age55MaleUniqueReadings:0,age1617FemaleUniqueReadings:0,age1824FemaleUniqueReadings:0,age2534FemaleUniqueReadings:0,age3544FemaleUniqueReadings:0,age4554FemaleUniqueReadings:0,age55FemaleUniqueReadings:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0,referrers:[]};$.each(k,function(U,I){n[U].active&&(w.viewableImpressions+=I.viewableImpressions,w.uniqueViewableImpressions+=I.uniqueViewableImpressions,w.billableViewableImpressions+=I.billableViewableImpressions,w.activeTimeSeconds+=I.activeTimeSeconds,w.readings+=I.readings,w.uniqueReadings+=I.uniqueReadings,w.uniqueReadingsHavingViewableImpressions+=I.uniqueReadingsHavingViewableImpressions,w.uniqueReadingPercentageReads+=I.uniqueReadingPercentageReads,w.maleUniqueReadings+=I.maleUniqueReadings,w.femaleUniqueReadings+=I.femaleUniqueReadings,w.desktopReadings+=I.desktopReadings,w.mobileReadings+=I.mobileReadings,w.tabletReadings+=I.tabletReadings,w.age1617MaleUniqueReadings+=I.age1617MaleUniqueReadings,w.age1824MaleUniqueReadings+=I.age1824MaleUniqueReadings,w.age2534MaleUniqueReadings+=I.age2534MaleUniqueReadings,w.age3544MaleUniqueReadings+=I.age3544MaleUniqueReadings,w.age4554MaleUniqueReadings+=I.age4554MaleUniqueReadings,w.age55MaleUniqueReadings+=I.age55MaleUniqueReadings,w.age1617FemaleUniqueReadings+=I.age1617FemaleUniqueReadings,w.age1824FemaleUniqueReadings+=I.age1824FemaleUniqueReadings,w.age2534FemaleUniqueReadings+=I.age2534FemaleUniqueReadings,w.age3544FemaleUniqueReadings+=I.age3544FemaleUniqueReadings,w.age4554FemaleUniqueReadings+=I.age4554FemaleUniqueReadings,w.age55FemaleUniqueReadings+=I.age55FemaleUniqueReadings,w.uniqueReadingPercentage24Reads+=I.uniqueReadingPercentage24Reads,w.uniqueReadingPercentage2549Reads+=I.uniqueReadingPercentage2549Reads,w.uniqueReadingPercentage5074Reads+=I.uniqueReadingPercentage5074Reads,w.uniqueReadingPercentage75100Reads+=I.uniqueReadingPercentage75100Reads,I.referrers.length&&I.referrers.forEach(function(m){w.referrers.push(m)}))}),b[b.length-1].start-k[0].start==0?b[b.length-1]=w:b.push(w),o.validateData(),h.validateData();var D=moment(o.startDate).startOf("day").toDate(),S=moment(o.endDate).startOf("day").add(-1,"d").toDate();D<=k[0].start&&S>=k[0].start&&l(D,S),T=!1}}))},1e4)},function(){e.error=!0},function(){$location.path("/")})}]),app.component("snipStatusHeader",{templateUrl:"/ClientApp/src/legacy-app/snip/snipStatusHeader.html",bindings:{data:"<"},controller:["$rootScope","$interpolate",function(e,t){this.web_snipStatus_lookingForAuthor=t(scope.currentScope.network.resources.web_snipStatus_lookingForAuthor)({web_common_author:scope.currentScope.network.getResourceOrKeyName("web_common_author")}),this.getSnipStatus=function(){if(!this.data.published)return 1;if(this.data.archived)return 2;if(this.data.assignedUser&&this.data.score>e.scope.globalSettings.snipShowAuthorEditStatusScoreThreshold)return 3;if(moment().diff(this.data.published,"hours")<3)return 0;if(!e.scope.currentChapter.settings.enableOhaLikes&&this.data.score>=1)return 4;if(this.data.assetReferences.length){var n=this.data.assetReferences.reduce(function(u,g){return new Date(u.published)<new Date(g.published)?u:g});if(moment().diff(n.created,"hours")<3)switch(n.type){case 2:case 5:case 6:case 7:return 5;case 8:return 6;case 9:return 7;case 0:case 1:case 10:return 8}}}}]}),app.controller("SpecialDetailController",["$scope","special","$rootScope",function(e,t,a){e.special=t,e.getTemplateUri=function(n){return"/ClientApp/src/legacy-app/template/"+n+".html"},e.specialViewOculus=Oculus.trackSpecialView({isp:t.id,n:a.scope.currentScope.network.slug,c:t.chapterSlug}),$(window).scroll(function(n){$(n.target).scrollTop()>100?$(".specialDetail-mobileNavigation-wrapper").addClass("specialDetail-mobileNavigation-wrapper-scrolled"):$(".specialDetail-mobileNavigation-wrapper").removeClass("specialDetail-mobileNavigation-wrapper-scrolled")})}]),app.directive("special",[function(){return{restrict:"E",require:"ngModel",templateUrl:"/ClientApp/src/legacy-app/special/special.html",replace:!1,scope:!0,link:function(e,t,a,n){e.getTemplateUri=function(u){return"/ClientApp/src/legacy-app/template/"+u+".html"},e.article=e.$eval(a.article),e.$watch(a.ngModel,function(){e.special=n.$viewValue})}}}]),app.controller("SpecialElasticReportController",["$scope","$rootScope","specialService","scopeService","$stateParams","$timeout","$location",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var d,i,o,r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}],c=[];e.report=null,e.totalUniqueViewCount=0,e.totalImpressionTime=0,e.totalImpressionCount=0,e.filterDisabled=!1,e.startDay=null,e.endDay=null;var h=function(A){var x=0,b=0,R=0,y=0,l=0,M=0,T=0;$.each(A,function(w,D){x+=D.desktopImpressionCount,b+=D.tabletImpressionCount,R+=D.mobileImpressionCount,y+=D.uniqueViews,l+=D.impressionTime,M+=D.totalViewTime,T+=D.impressionCount}),e.$apply(function(){e.totalUniqueViewCount=y,e.totalImpressionTime=l,e.totalViewTime=M,e.totalImpressionCount=T});var k=x+R+b;s[0].value=Math.round(100/(k/x)),s[1].value=Math.round(100/(k/R)),s[2].value=Math.round(100/(k/b)),d.validateData()},p=function(){var A=moment(i.startDate).startOf("day").toDate(),x=moment(i.endDate).startOf("day").toDate(),b=e.report.filter(function(R){return R.day>=A&&R.day<=x});h(b),o.zoom(A,moment(x).add(1,"d").toDate()),e.$apply(function(){e.startDay=A,e.endDay=x})};e.filterChapter=function(A){A.filtered=!A.filtered,function(){var A=e.chapters.filter(function(x){return!x.filtered}).map(function(x){return x.id});e.filterDisabled=!0,a.getSpecialReport({specialId:u.id,chapterIds:A}).then(function(x){x.forEach(function(b){b.day=moment(b.day.replace("Z","")).toDate()}),e.report=x,g(function(){(function(A){c.length=0,$.each(A,function(x,b){c.push(b)}),i.validateData(),o.validateData()})(x),p(),e.filterDisabled=!1},50)})}()},e.chapterFilterDisabled=function(A){return e.filterDisabled||1===e.chapters.filter(function(x){return!x.filtered}).length&&!A.filtered},a.getSpecialInfo(u.id).then(function(A){e.special=A,a.getSpecialReport({specialId:u.id}).then(function(x){x.forEach(function(R){R.day=moment(R.day.replace("Z","")).toDate()}),e.report=x,e.startDay=x[0].day,e.endDay=x[x.length-1].day;var b=[];$.each(A.chapterSlugs,function(R,y){b.push(n.getChapter(y))}),b=b.filter(function(R){return 2===R.managementState}),e.chapters=b,$.each(x,function(R,y){c.push(y)}),g(function(){d=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),(i=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"}],dataProvider:c,categoryField:"day"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"impressionCount",valueField:"impressionCount"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"impressionCount",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).addListener("zoomed",function(){p()}),o=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"},{fromField:"uniqueViews",toField:"uniqueViews"}],dataProvider:c,categoryField:"day"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.resources.web_report_viewableImpressions,id:"impressionCount",type:"smoothedLine",valueField:"impressionCount",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.resources.web_report_viewableImpressions+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"uniqueViews",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),h(x)})},function(){e.error=!0})})}]),app.controller("SpecialReportController",["$scope","$rootScope","specialService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";a.getSpecialInfo(u.id).then(function(o){e.special=o,a.getSpecialCalendar(u.id).then(function(h){h.forEach(function(p){p.chapter=n.getChapter(p.chapterSlug),p.report.calendar.forEach(function(v){v.start=moment(v.start.replace("Z","")).toDate(),v.end=moment(v.end.replace("Z","")).toDate()})}),o.chapterReport=h,f(function(){var p,v,C,A,x,b,R=new Set;$.each(h,function(w,D){D.active=!0,R.add(D.chapter.name)}),h.uniqueChapters=[],R.forEach(function(w){h.uniqueChapters.push(w)});var y=[],l=function(){y.length=0,$.each(h[0].report.calendar,function(w,D){y.push({start:D.start,end:D.end,viewableImpressions:0,billableViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueViewableImpressions:0,femaleUniqueViewableImpressions:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueViewableImpressions:0,age1824MaleUniqueViewableImpressions:0,age2534MaleUniqueViewableImpressions:0,age3544MaleUniqueViewableImpressions:0,age4554MaleUniqueViewableImpressions:0,age55MaleUniqueViewableImpressions:0,age1617FemaleUniqueViewableImpressions:0,age1824FemaleUniqueViewableImpressions:0,age2534FemaleUniqueViewableImpressions:0,age3544FemaleUniqueViewableImpressions:0,age4554FemaleUniqueViewableImpressions:0,age55FemaleUniqueViewableImpressions:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0})}),$.each(h,function(w,D){if(D.active){h[w-1]&&2===h[w-1].chapter.managementState&&2===D.chapter.managementState&&h[w-1].chapter.name!==D.chapter.name&&(h.multiChapterShipment=!0);var S=D.report.special.Id;$.each(D.report.calendar,function(U,I){I.specialId=S;var m=y[U];m.viewableImpressions+=I.viewableImpressions,m.activeTimeSeconds+=I.activeTimeSeconds,m.readings+=I.views,m.maleUniqueViewableImpressions+=I.maleViewableImpressions,m.femaleUniqueViewableImpressions+=I.femaleViewableImpressions,m.uniqueReadings+=I.uniqueViews,m.desktopReadings+=I.desktopViews,m.mobileReadings+=I.mobileViews,m.tabletReadings+=I.tabletViews,m.age1617MaleUniqueViewableImpressions+=I.age1617MaleViewableImpressions,m.age1824MaleUniqueViewableImpressions+=I.age1824MaleViewableImpressions,m.age2534MaleUniqueViewableImpressions+=I.age2534MaleViewableImpressions,m.age3544MaleUniqueViewableImpressions+=I.age3544MaleViewableImpressions,m.age4554MaleUniqueViewableImpressions+=I.age4554MaleViewableImpressions,m.age55MaleUniqueViewableImpressions+=I.age55MaleViewableImpressions,m.age1617FemaleUniqueViewableImpressions+=I.age1617FemaleViewableImpressions,m.age1824FemaleUniqueViewableImpressions+=I.age1824FemaleViewableImpressions,m.age2534FemaleUniqueViewableImpressions+=I.age2534FemaleViewableImpressions,m.age3544FemaleUniqueViewableImpressions+=I.age3544FemaleViewableImpressions,m.age4554FemaleUniqueViewableImpressions+=I.age4554FemaleViewableImpressions,m.age55FemaleUniqueViewableImpressions+=I.age55FemaleViewableImpressions})}}),C.validateData(),A.validateData(),x.validateData(),b.validateData()},M=h.summary={};p=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:y,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"uniqueReadings",valueField:"uniqueReadings"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"uniqueReadings",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),v=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:y,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_reportSpecial_amountOfViews"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders"),valueField:"uniqueReadings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),C=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),A=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:s,balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(w,D){return-1*w.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(w){return w<0?-1*w+"":w+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),x=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:s,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),b=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[M],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:s,fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:s,fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:s,fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:s,fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}});var k=function(){var w=moment(p.startDate).startOf("day").toDate(),D=moment(p.endDate).startOf("day").add(-1,"d").toDate();v.zoom(w,moment(D).add(1,"d").toDate()),function(w,D){M.viewableImpressions=0,M.billableViewableImpressions=0,M.activeTimeSeconds=0,M.readings=0,M.uniqueReadings=0,M.uniqueReadingsHavingViewableImpressions=0,M.uniqueReadingPercentageReads=0,M.maleUniqueViewableImpressions=0,M.femaleUniqueViewableImpressions=0,M.desktopReadings=0,M.mobileReadings=0,M.tabletReadings=0,M.age1617MaleUniqueViewableImpressions=0,M.age1824MaleUniqueViewableImpressions=0,M.age2534MaleUniqueViewableImpressions=0,M.age3544MaleUniqueViewableImpressions=0,M.age4554MaleUniqueViewableImpressions=0,M.age55MaleUniqueViewableImpressions=0,M.age1617FemaleUniqueViewableImpressions=0,M.age1824FemaleUniqueViewableImpressions=0,M.age2534FemaleUniqueViewableImpressions=0,M.age3544FemaleUniqueViewableImpressions=0,M.age4554FemaleUniqueViewableImpressions=0,M.age55FemaleUniqueViewableImpressions=0,M.uniqueReadingPercentage24Reads=0,M.uniqueReadingPercentage2549Reads=0,M.uniqueReadingPercentage5074Reads=0,M.uniqueReadingPercentage75100Reads=0;var S=0,U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0,j=0;M.start=w,M.end=D,$.each(y,function(Q,X){var z=new Date(X.start);z<w||z>D||(M.viewableImpressions+=X.viewableImpressions,M.activeTimeSeconds+=X.activeTimeSeconds,M.readings+=X.readings,M.maleUniqueViewableImpressions+=X.maleUniqueViewableImpressions,M.femaleUniqueViewableImpressions+=X.femaleUniqueViewableImpressions,M.uniqueReadings+=X.uniqueReadings,S+=X.desktopReadings,U+=X.mobileReadings,I+=X.tabletReadings,m+=X.age1617MaleUniqueViewableImpressions,F+=X.age1824MaleUniqueViewableImpressions,E+=X.age2534MaleUniqueViewableImpressions,V+=X.age3544MaleUniqueViewableImpressions,q+=X.age4554MaleUniqueViewableImpressions,O+=X.age55MalUniqueeViewableImpressions,_+=X.age1617FemaleUniqueViewableImpressions,P+=X.age1824FemaleUniqueViewableImpressions,L+=X.age2534FemaleUniqueViewableImpressions,K+=X.age3544FemaleUniqueViewableImpressions,J+=X.age4554FemaleUniqueViewableImpressions,j+=X.age55FemaleUniqueViewableImpressions)});var Z=S+U+I;M.desktopReadings=Math.round(100/(Z/S)),M.mobileReadings=Math.round(100/(Z/U)),M.tabletReadings=Math.round(100/(Z/I)),M.maleUniqueViewableImpressions=Math.round(M.maleUniqueViewableImpressions),M.femaleUniqueViewableImpressions=Math.round(M.femaleUniqueViewableImpressions),c[0].value=M.femaleUniqueViewableImpressions,c[1].value=M.maleUniqueViewableImpressions;var B=M.viewableImpressions-(m+F+E+V+q+O+_+P+L+K+J+j);B>100&&(m+=B*t.scope.globalSettings.reportAverageAge1617Male,F+=B*t.scope.globalSettings.reportAverageAge1824Male,E+=B*t.scope.globalSettings.reportAverageAge2534Male,V+=B*t.scope.globalSettings.reportAverageAge3544Male,q+=B*t.scope.globalSettings.reportAverageAge4554Male,O+=B*t.scope.globalSettings.reportAverageAge55Male,_+=B*t.scope.globalSettings.reportAverageAge1617Female,P+=B*t.scope.globalSettings.reportAverageAge1824Female,L+=B*t.scope.globalSettings.reportAverageAge2534Female,K+=B*t.scope.globalSettings.reportAverageAge3544Female,J+=B*t.scope.globalSettings.reportAverageAge4554Female,j+=B*t.scope.globalSettings.reportAverageAge55Female),M.age1617MaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/m)),M.age1824MaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/F)),M.age2534MaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/E)),M.age3544MaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/V)),M.age4554MaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/q)),M.age55MaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/O)),M.age1617FemaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/_)),M.age1824FemaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/P)),M.age2534FemaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/L)),M.age3544FemaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/K)),M.age4554FemaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/J)),M.age55FemaleUniqueViewableImpressions=Math.round(100/(M.viewableImpressions/j)),d[0].male=Math.round(-1*M.age1617MaleUniqueViewableImpressions),d[1].male=Math.round(-1*M.age1824MaleUniqueViewableImpressions),d[2].male=Math.round(-1*M.age2534MaleUniqueViewableImpressions),d[3].male=Math.round(-1*M.age3544MaleUniqueViewableImpressions),d[4].male=Math.round(-1*M.age4554MaleUniqueViewableImpressions),d[5].male=Math.round(-1*M.age55MaleUniqueViewableImpressions),d[0].female=Math.round(M.age1617FemaleUniqueViewableImpressions),d[1].female=Math.round(M.age1824FemaleUniqueViewableImpressions),d[2].female=Math.round(M.age2534FemaleUniqueViewableImpressions),d[3].female=Math.round(M.age3544FemaleUniqueViewableImpressions),d[4].female=Math.round(M.age4554FemaleUniqueViewableImpressions),d[5].female=Math.round(M.age55FemaleUniqueViewableImpressions),i[0].value=M.desktopReadings,i[1].value=M.mobileReadings,i[2].value=M.tabletReadings,C.validateData(),A.validateData(),x.validateData(),b.validateData(),e.$apply()}(w,D)};p.addListener("zoomed",function(w){k()}),e.toggleChapter=function(w){$.each(h,function(D,S){S.chapter.name===w&&(S.active=!S.active)}),f(function(){l(),k()},50)},l(),v.validateNow(),p.validateNow(),p.setDefaultPeriod(),k(),p.zoom(new Date(o.start),new Date)},function(){e.error=!0})})},function(){r.path("/")});var c=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:s,value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],d=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],i=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}]}]),app.factory("specialService",["$http","$q","$rootScope",function(e,t,a){var n=[],u=[];return a.$on("$locationChangeSuccess",function(){n.length=0,u.length=0}),{getSpecial:function(i){var o=t.defer();return i?e.get(scope.apiEndpoint+"specials/"+i).then(function(h){o.resolve(h.data)},function(){o.reject()}):n.length>0?o.resolve(n.splice(0,1)[0]):u.push(o),o.promise},getSpecialInfo:function(i){var o=t.defer();return e.get(scope.apiEndpoint+"specials/"+i+"/ReportInfo").then(function(h){o.resolve(h.data)},function(){o.reject()}),o.promise},getSpecialCalendar:function(i){var o=t.defer();return e.get(scope.apiEndpoint+"specials/"+i+"/ReportCalendar").then(function(h){o.resolve(h.data)},function(){o.reject()}),o.promise},resolve:function(i,o){var h=t.defer();return u.length>i&&(i=u.length),e.get(scope.apiEndpoint+"specials/"+i+"/"+o).then(function(p){h.resolve(p.data),n.length=0,n.push.apply(n,p.data),u.forEach(function(v){n.length>0?v.resolve(n.splice(0,1)[0]):v.reject()}),u.length=0},function(){h.reject()}),h.promise},getActiveSpecials:function(){var i=t.defer();return e.get(scope.apiEndpoint+"specials/sections").then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},getSpecialReport:function(i){var o=t.defer();return e.post(scope.apiEndpoint+"specials/report",i).then(function(h){o.resolve(h.data)},function(){o.reject()}),o.promise}}}]),app.controller("SponsoredArticleDetailController",["$rootScope","$scope","snipService","sponsoredArticleService","parserService","$location","sponsoredArticle","$timeout","$uibModal",function(e,t,a,n,u,g,f,r,s){t.enableHighQualityImage=e.scope.network.settings.configurations.enableHighQualityImage,t.$on("$viewContentLoaded",function(){r(function(){t.viewContentLoaded=!0})});var c,v,d=function(){c=t.sponsoredArticle.assetReferences.reduce(function(v,C,A){return v[C.guid]=C,v},{})};if(t.resolveAsset=function(v){return c[v]},$(window).scroll(function(v){$(v.target).scrollTop()>100?$(".sponsoredArticleDetail-mobileNavigation-wrapper").addClass("sponsoredArticleDetail-mobileNavigation-wrapper-scrolled"):$(".sponsoredArticleDetail-mobileNavigation-wrapper").removeClass("sponsoredArticleDetail-mobileNavigation-wrapper-scrolled")}),t.recommendedArticles=[],t.recommendedArticlePairs=[],t.recommendedSnips=[],t.assetsMedia=[],t.assetsFacts=[],t.assetsQuestions=[],t.assetsComments=[],t.$parent&&(t.$parent.sponsoredArticleUpdater||t.$parent.$parent.sponsoredArticleUpdater))t.sponsoredArticleUpdater=!0,(t.$parent.sponsoredArticleUpdater?t.$parent:t.$parent.$parent).$on("articleUpdate",function(v,C){t.sponsoredArticle=C,u.postProcessHtml(t.sponsoredArticle),t.sponsoredArticle.detailsLoaded=!0,d(),t.$broadcast("$$rebind::refresh")});else{t.$watch(function(){return"sponsoredArticle.detailsLoaded"},function(v){v&&d()});var o=f.id;if(n.getRecommendedArticles(o).then(function(v){if(v.length){[].push.apply(t.recommendedArticles,v);for(var C=0;C<t.recommendedArticles.length;C+=2){var A=[];A.push(t.recommendedArticles[C]),t.recommendedArticles.length>C+1&&A.push(t.recommendedArticles[C+1]),t.recommendedArticlePairs.push(A)}}}),t.sponsoredArticle=f,u.postProcessHtml(t.sponsoredArticle),a.getRecommendedSnips(o).then(function(v){t.recommendedSnips=v}),(v=window.navigator.userAgent).indexOf(" Android ")>-1&&v.indexOf("Version/")>-1&&parseFloat((v.match("Android ([0-9.]+)")||[])[1])<=4.4){var p=$(window).height();$(".app-mobile .sponsoredArticleDetail-wrapper").css("height",p+"px"),$(".app-desktop .sponsoredArticleDetail-wrapper").css("height",p+"px")}}t.assetImageFocuspointDialog=function(v){s.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){return v}}})},t.share=function(){if(!window.plugins||!window.plugins.socialsharing)return;window._paq&&_paq.push(["trackEvent","Conversion","StartShareSponsoredArticle","SponsoredArticleDetail"]);let v=g.absUrl().substring(0,g.absUrl().lastIndexOf("/"));window.plugins.socialsharing.shareWithOptions({message:(t.sponsoredArticle.heading?t.sponsoredArticle.heading+": ":"")+t.sponsoredArticle.text+" "+v},function(){window._paq&&_paq.push(["trackEvent","Conversion","SuccessShareSponsoredArticle","SponsoredArticleDetail"])})}}]),app.controller("SponsoredArticleEditController",["$scope","sponsoredArticleService","metaService","$state","authService","fileUploadService","$location","$timeout","$uibModal","$rootScope","proseMirrorEditorService","editorCommentSponsoredArticleService","editorAssetsService","spellingService","backendHubProxy",function(e,t,a,n,u,g,f,r,s,c,d,i,o,h,p){e.initializedMobile=e.mobile,e.enableHighQualityImage=c.scope.network.settings.configurations.enableHighQualityImage,e.revision={coverAssetImages:[],texts:[{heading:"",text:""}],chapterSlug:null},e.$on("$destroy",function(){a.setFavicon()}),e.sponsoredArticleUpdater=!0;var x,v=n.params.id,C="sp_"+v+"_"+c.scope.currentScope.chapter.id,A=p("editorHub"),b=!1;e.sponsoredArticle={text:"",content:"",summary:"",heading:""},e.editor=null,e.changed=!1,e.loading=!0;var R=c.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_leaveMessage");window.onbeforeunload=function(){if(e.changed)return R};var y=!1;c.$on("$stateChangeStart",function(_,P){y?_.preventDefault():e.changed&&!confirm(R)?(y=!0,_.preventDefault(),b=!1,r(function(){y=!1},1e3)):(e.changed=!1,b&&(A.invoke("leaveGroup",C),d.closeConnection(),A.stop(),b=!1))}),e.textCarousel=null,e.textSlick=null,e.textSlickIndex=0,e.coverAssetSlickIndex=0;var M=function(_){e.sponsoredArticle=_;var P=D(_);P?e.revision=P:_.revisions.push(e.revision),e.revision.texts.length||(P.texts=[{heading:"",text:""}]),x=w(_),r(function(){e.textCarousel||(e.textCarousel=$("#sponsoredArticleEdit-text-wrapper").find(".sponsoredArticleEdit-text-carousel"),e.textCarousel.on("afterChange",function(L,K){e.textSlickIndex=K.currentSlide})),e.coverAssetCarousel||(e.coverAssetCarousel=$("#sponsoredArticleEdit-cover-wrapper").find(".sponsoredArticleEdit-cover-carousel"),e.coverAssetCarousel.on("afterChange",function(L,K){e.coverAssetSlickIndex=K.currentSlide})),e.revision.texts.push({}),r(function(){e.revision.texts.splice(e.revision.texts.length-1,1),r(function(){e.textSlick=e.textCarousel.slick({dots:!0,initialSlide:e.textSlickIndex})},100)}),e.revision.coverAssetImages.push({}),r(function(){e.revision.coverAssetImages.splice(e.revision.coverAssetImages.length-1,1),r(function(){e.coverAssetSlick=e.coverAssetCarousel.slick({dots:!0,initialSlide:e.coverAssetSlickIndex})},100)})})};e.addTextVariant=function(){e.textSlick=e.textCarousel.slick("unslick"),r(function(){e.revision.texts.push({heading:"",text:""}),r(function(){e.textSlick=e.textCarousel.slick({dots:!0}),e.textSlick.slick("slickGoTo",e.revision.texts.length-1)})})},e.delTextVariant=function(){var _=e.textSlick.slick("slickCurrentSlide");e.textSlick.slick("slickRemove",_-1),e.revision.texts.splice(_,1),e.textSlick.slick("unslick"),e.revision.texts.push({}),r(function(){e.revision.texts.splice(e.revision.texts.length-1,1),r(function(){e.textSlick=e.textCarousel.slick({dots:!0}),_>0&&(e.textSlick.slick("slickGoTo",_-1),e.textSlickIndex=_-1)},100)})},e.mobileEditorFocused=!1,e.focusMobileEditor=function(){e.mobileEditorFocused=!0},e.blurMobileEditor=function(){e.mobileEditorFocused=!1},e.coverAssetCarousel=null,e.coverAssetSlick=null,e.delCoverAssetVariant=function(){if(e.revision.coverAssetImages.length>1){var _=e.coverAssetSlick.slick("slickCurrentSlide");e.coverAssetSlick.slick("slickRemove",_-1),e.revision.coverAssetImages.splice(_,1),e.coverAssetSlick.slick("unslick"),e.revision.coverAssetImages.push({}),r(function(){e.revision.coverAssetImages.splice(e.revision.coverAssetImages.length-1,1),r(function(){e.coverAssetSlick=e.coverAssetCarousel.slick({dots:!0}),_>0&&(e.coverAssetSlick.slick("slickGoTo",_-1),e.coverAssetSlickIndex=_-1)})})}},e.pickCoverAsset=function(_){s.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 2},single:function(){return!0},hideInComments:function(){return!0},resultCallback:function(){return function(P){e.coverAssetSlick.slick("unslick"),_&&e.revision.coverAssetImages.length?e.revision.coverAssetImages[0]=P.assetImage:e.revision.coverAssetImages.push(P.assetImage),r(function(){e.coverAssetSlick=e.coverAssetCarousel.slick({dots:!0}),e.coverAssetSlick.slick("slickGoTo",e.revision.coverAssetImages.length-1)})}},sponsoredArticle:function(){return e.sponsoredArticle}}})},e.assetDialog=function(){s.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 0},resultCallback:function(){return T},sponsoredArticle:function(){return e.sponsoredArticle}}})};var T=function(_){r(function(){e.insertAsset(_)},500)};e.insertAsset=function(_){if($("#assetModal").modal("hide"),e.initializedMobile){if(e.initializedMobile){var P=$("#sponsoredArticleEdit-editor-mobile")[0],L=P.selectionStart,K=P.selectionEnd,J=P.value,j=J.substring(0,L),Z=J.substring(K,J.length),B="\n!["+_.guid+"]\n";P.value=j+B+Z,r(function(){P.selectionStart=P.selectionEnd=L+B.length,P.focus()})}}else{if(!e.editor)return;e.editor.replaceSelection("\n!["+_.guid+"]\n"),setTimeout(function(){e.editor.focus()},600)}},e.save=function(){for(var _=angular.copy(e.sponsoredArticle),P=e.revision.coverAssetImages.map(function(K){return K.id}),L=0;L<P.length;L++)if(P.lastIndexOf(P[L])>L)return void s.open({templateUrl:"/ClientApp/src/legacy-app/article/noDuplicateCoverAssetDialog.html"});_.texts=e.revision.texts,_.coverAssetImages=e.revision.coverAssetImages,_.summary=_.revisions[0].summary,_.jsonDocument=d.getDocument(),_.HtmlDocument=d.getHtmlDocument(),t.updateSponsoredArticle(_).then(function(K){e.changed=!1,e.textSlick=e.textCarousel.slick("unslick"),e.coverAssetSlick=e.coverAssetCarousel.slick("unslick"),M(K.data)},function(){s.open({templateUrl:"/ClientApp/src/legacy-app/article/unableToSaveDialog.html"})})},e.submit=function(){e.editForm.$submitted=!0},e.publish=function(_){if(e.editForm.$submitted=!0,_){var P=angular.copy(e.sponsoredArticle);t.publishSponsoredArticle(P).then(function(L){e.changed=!1,e.textSlick=e.textCarousel.slick("unslick"),e.coverAssetSlick=e.coverAssetCarousel.slick("unslick"),M(L.data)},function(){})}},e.preview=!1,e.togglePreview=function(){if(e.preview=!e.preview,e.preview){var _=angular.copy(e.sponsoredArticle);_.content=d.getHtmlDocument(),_.assetReferences=_.assetReferences,_.text=e.revision.texts[0].text,_.heading=e.revision.texts[0].heading,_.summary=e.revision.summary,_.sponsored=!0,e.revision.coverAssetImages.length&&(_.coverAssetReference=_.assetReferences.filter(function(P){return P.assetImage&&P.assetImage.id===e.revision.coverAssetImages[0].id})[0]),r(function(){e.$broadcast("articleUpdate",_)},500)}};var w=function(_){var P=D(_);return angular.toJson(P.texts)+angular.toJson(P.coverAssetImages)+P.summary+P.jsonDocument},D=function(_){var P=e.scope.currentScope.chapter.slug,L=_.revisions.filter(function(J){return J.chapterSlug===P});if(L.length)return L[0];var K=_.revisions.filter(function(J){return null===J.chapterSlug});return K.length?K[0]:void 0},S=function(_,P){s.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 0},single:function(){return!1},hideInComments:function(){return!0},resultCallback:function(){return function(L){if(P){d.setFocus();var K=[];$.each(L,function(J,j){K.push({guid:j.guid,type:j.assetImage?j.assetImage.type:j.assetText.type})}),P(K)}}},sponsoredArticle:function(){return e.sponsoredArticle}}})},U=function(_,P){s.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createEditorCommentDialog.html",controller:"CreateEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{editorCommentCallback:function(){return P},messageHolder:function(){return new MessageHolder(e.sponsoredArticle)},sourceService:function(){return i}}})},I=function(_,P,L){s.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/listEditorCommentDialog.html",controller:"ListEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{onDeletedCallback:function(){return L},onAddedCallback:function(){return P},messageHolder:function(){return new MessageHolder(e.sponsoredArticle)},chainComments:function(){return _},sourceService:function(){return i}}})},m=function(_){s.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createLinkDialog.html",controller:"CreateLinkDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return _}}})},F=function(_,P){s.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createCallToActionDialog.html",controller:"CreateCallToActionDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return P}}})},E=function(_){return o.getAsset(_,e.sponsoredArticle.assetReferences)},V=function(_){r(function(){D(e.sponsoredArticle).jsonDocument=_,e.numberOfWords=h.countWords(d.getHtmlDocument())})};$(".sponsoredArticleEdit-wrapper").scroll(function(){!function _(){$(".proseMirror-wrapper").offset().top<50?$(".proseMirror-wrapper").addClass("sticky"):$(".proseMirror-wrapper").removeClass("sticky")}()}),A.on("broadcastSummary",function(_){e.revision.summary=_}),A.on("broadcastHeading",function(_){e.revision.texts[_.indexPosition].heading=_.heading}),A.on("broadcastAddVariant",function(){e.addTextVariant(!1)}),A.on("broadcastDeleteVariant",function(_){e.delTextVariant(!1,_.indexPosition)}),A.on("broadcastTitle",function(_){e.revision.texts[_.indexPosition].text=_.title}),A.start(function(){A.invoke("joinGroup",C)}),e.leaveEditor=function(){b=!0},e.blurHeading=function(_){A.invoke("updatingHeading",{groupName:C,heading:e.revision.texts[_].heading,indexPosition:_})},e.blurTitle=function(_){A.invoke("updatingTitle",{groupName:C,title:e.revision.texts[_].text,indexPosition:_})},e.blurSummary=function(){A.invoke("updatingSummary",{groupName:C,summary:e.revision.summary})},t.getSponsoredArticleEdit(v).then(function(_){e.loading=!1,M(_),d.init({docID:"sparticle_"+_.id+"_"+scope.currentChapter.slug,assetDlgFactory:S,commentCreationDlgFactory:U,commentMgmtDlgFactory:I,initialDocument:D(_).jsonDocument,initialAssetReferences:_.assetReferences,createLinkFactory:m,callToActionDlgFactory:F,assetResolver:E,onNewStateFactory:V,onLoadTransactionCallback:V,languageCode:c.scope.currentScope.network.settings.languageCode}),a.setFavicon(!0),e.$watch(function(){return w(e.sponsoredArticle)},function(_){e.changed=x!==_})},function(){f.path("/")})}]),app.controller("SponsoredArticleListController",["$scope","$timeout","$rootScope","sponsoredArticleService",function(e,t,a,n){n.getSponsoredArticles().then(function(u){e.sponsoredArticles=u,t(function(){a.$emit("lazyImg:refresh")})})}]),app.factory("sponsoredArticleService",["$http","$q",function(e,t){var c=[];return{getSponsoredArticles:function(){var p=t.defer();return e.get(scope.apiEndpoint+"sponsoredArticles").then(function(v){p.resolve(v.data)}),p.promise},getSponsoredArticle:function(p,v){var C=t.defer(),A=scope.apiEndpoint+"sponsoredArticles/"+p;return v&&(A=A+"?v="+v),e.get(A).then(function(x){C.resolve(x.data)}),C.promise},getSponsoredArticlesForEventCalendar:function(){var p=t.defer();return 0===c.length?e.get(scope.apiEndpoint+"sponsoredArticles/events").then(function(v){p.resolve(c=v.data)},function(){p.reject()}):p.resolve(c),p.promise},getSponsoredArticleEdit:function(p){var v=t.defer();return e.get(scope.apiEndpoint+"sponsoredArticles/"+p+"/edit").then(function(C){v.resolve(C.data)},function(C){v.reject()}),v.promise},getRecommendedArticles:function(p){var v=t.defer();return e.get(scope.apiEndpoint+"sponsoredArticles/"+p+"/recommendedarticles").then(function(C){v.resolve(C.data)}),v.promise},getSponsoredArticleParse:function(p,v){var C=t.defer();return e.post(scope.apiEndpoint+"sponsoredArticles/"+p+"/parse",v).then(function(A){C.resolve(A.data)},function(){C.reject()}),C.promise},updateSponsoredArticle:function(p){var v=t.defer();return e.put(scope.apiEndpoint+"sponsoredArticles",p).then(function(C){angular.copy(C.data,p),v.resolve(C)},function(){v.reject()}),v.promise},publishSponsoredArticle:function(p){var v=t.defer();return e.put(scope.apiEndpoint+"sponsoredArticles/"+p.id+"/publish",p).then(function(C){v.resolve(C)},function(){v.reject()}),v.promise}}}]),app.controller("SponsoredArticleCampaignElasticReportController",["$scope","$rootScope","sponsoredArticleCampaignService","formatterService","scopeService","$timeout","$location","$stateParams",function(e,t,a,n,u,g,f,r){var s=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";e.dateFormatString=n.getShortDateFormatString();var d,i,o,h,c=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}],p={impressions:0,readings:0,billableImpressions:0,uniqueImpressions:0,uniqueReadings:0,uniqueReadingPercentageReads:0,uniqueViewableImpressions:0,activeTimeSeconds:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0,end:moment(new Date).startOf("day").toDate()},v=[],C=[],A=[];a.GetSponsoredArticleReport(r.pin).then(function(x){var b=x.chapterReports,l=function(){(d=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",marginRight:80,marginTop:7,path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"}],dataProvider:v,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"viewableImpressions",valueField:"viewableImpressions"}]}],chartScrollbarSettings:{position:"top",graph:"viewableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).validateData(),d.addListener("zoomed",function(){var w,D;p.start=moment(d.startDate).startOf("day").toDate(),p.end=moment(d.endDate).startOf("day").toDate(),i.zoom(p.start,moment(p.end).startOf("day").add(1,"d").toDate()),w=moment(p.start).startOf("day").add(1,"d").toDate(),D=moment(p.end).startOf("day").add(2,"d").toDate(),$.each(b,function(S,U){U.chapter=u.getChapter(U.chapterSlug),a.getChapterReport({chapterId:U.chapter.id,start:w,end:D,pin:x.sponsoredArticleCampaign.pin,sponsoredArticleCampaignId:x.sponsoredArticleCampaign.id}).then(function(I){U.reports=I,k()}),d.validateData(),i.validateData(),o.validateData(),h.validateData()})}),i=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:"Gesamt",color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"readings",toField:"readings"}],dataProvider:C,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:t.scope.currentScope.network.resources.web_report_viewableImpressions+": <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:t.scope.currentScope.network.resources.web_reportArticle_articleCallsHeading,percentHeight:30,stockGraphs:[{valueField:"readings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:t.scope.currentScope.network.resources.web_report_views+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),o=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:s,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),h=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[p],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:s,fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:s,fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:s,fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:s,fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}})};AmCharts.isReady?l():AmCharts.ready(l),e.sponsoredArticleCampaign=x.sponsoredArticleCampaign,e.sponsoredArticleCampaign.report=b,$.each(b,function(w,D){D.active=!0,D.variants.length&&$.each(D.variants,function(S,U){U.viewableImpressions>0&&(b.hasVariants=!0,U.hasViews=!0)})});for(var M=new Date(x.sponsoredArticleCampaign.start);M<=moment(new Date).startOf("day").add(1,"d").toDate();M.setDate(M.getDate()+1)){var T={start:new Date(M),viewableImpressions:0,readings:0};A[T.start.toDateString()]=T,C.push(T)}p.start=moment(x.sponsoredArticleCampaign.start).startOf("day").toDate(),e.summary=p;var k=function(){if(b.hasVariants=!1,$.each(C,function(D,S){S.readings=0,S.viewableImpressions=0}),p.impressions=0,p.billableImpressions=0,p.readings=0,p.billableReadings=0,p.uniqueImpressions=0,p.uniqueReadings=0,p.uniqueReadingPercentageReads=0,p.uniqueViewableImpressions=0,p.activeTimeSeconds=0,p.uniqueReadingsHavingViewableImpressions=0,p.uniqueReadingPercentage24Reads=0,p.uniqueReadingPercentage2549Reads=0,p.uniqueReadingPercentage5074Reads=0,p.uniqueReadingPercentage75100Reads=0,c[0].value=0,c[1].value=0,c[2].value=0,$.each(b,function(D,S){if(S.active){var U=0;$.each(S.reports,function(I,m){var F=!1;$.each(x.sponsoredArticleCampaign.sponsoredArticles,function(E,V){V.id===m.sponsoredArticleId&&V.active&&(F=!0)}),F&&(m.billableImpressionCalendar.length&&$.each(m.billableImpressionCalendar,function(E,V){A[new Date(V.day).toDateString()].viewableImpressions+=V.data}),m.readingCalendar.length&&$.each(m.readingCalendar,function(E,V){A[new Date(V.day).toDateString()].readings+=V.data}),p.impressions+=m.impressions,p.billableImpressions+=m.billableImpressions,p.readings+=m.readings,p.billableReadings+=m.billableReadings,p.uniqueReadings+=m.uniqueReadings,p.uniqueReadingsHavingViewableImpressions+=m.uniqueReadingsHavingViewableImpressions,p.uniqueImpressions+=m.uniqueImpressions,p.uniqueReadingPercentageReads+=m.uniqueReadingPercentageReads,p.activeTimeSeconds+=m.activeTimeSeconds,p.uniqueReadingPercentage24Reads+=m.uniqueReadingPercentage24Reads,p.uniqueReadingPercentage2549Reads+=m.uniqueReadingPercentage2549Reads,p.uniqueReadingPercentage5074Reads+=m.uniqueReadingPercentage5074Reads,p.uniqueReadingPercentage75100Reads+=m.uniqueReadingPercentage75100Reads,U+=m.desktopCount+m.mobileCount+m.tabletCount,c[0].value+=m.desktopCount,c[1].value+=m.mobileCount,c[2].value+=m.tabletCount)}),c[0].value=Math.round(c[0].value/U*100),c[1].value=Math.round(c[1].value/U*100),c[2].value=Math.round(c[2].value/U*100),S.variants.length&&$.each(S.variants,function(I,m){m.viewableImpressions>0&&(b.hasVariants=!0,m.hasViews=!0)})}}),b.length>1){var w=b.filter(function(D){return D.active}).length;c[0].value=Math.round(c[0].value/w),c[1].value=Math.round(c[1].value/w),c[2].value=Math.round(c[2].value/w)}d.validateData(),i.validateData(),o.validateData(),h.validateData()};e.toggleChapter=function(w){$.each(b,function(D,S){null!==S.chapter&&S.chapter.name===w&&(S.active=!S.active)}),k()},e.toggleReport=function(w){$.each(x.sponsoredArticleCampaign.sponsoredArticles,function(D,S){S.guid===w.guid&&(S.active=!S.active)}),k()},$.each(b,function(w,D){D.chapter=u.getChapter(D.chapterSlug),a.getChapterReport({chapterId:D.chapter.id,start:x.sponsoredArticleCampaign.start,end:moment(new Date).startOf("day").add(2,"d").toDate(),pin:x.sponsoredArticleCampaign.pin,sponsoredArticleCampaignId:x.sponsoredArticleCampaign.id}).then(function(S){D.reports=S,k(),$.each(x.sponsoredArticleCampaign.sponsoredArticles,function(U,I){I.active=!0}),$.each(C,function(U,I){v.push({start:I.start,viewableImpressions:I.viewableImpressions})})}),d.validateData(),i.validateData(),o.validateData(),h.validateData()})})}]),app.factory("sponsoredArticleCampaignService",["$http","$q","$rootScope","authService","profileService","$location",function(e,t,a,n,u,g){var f=[],s=function(){var h=t.defer();return f.length>0?h.resolve(f):e.get(scope.apiEndpoint+"SponsoredArticleCampaigns").then(function(p){angular.copy(p.data,f),h.resolve(f)},function(){h.reject()}),h.promise};function c(h){var p=null;return $.each(f,function(v,C){if(C.pin===h)return p=C,!1}),p}return{sponsoredArticleCampaigns:f,getsponsoredArticleCampaigns:s,getreportSponsoredArticleCalendar:function(h){var p=t.defer();return e.get(scope.apiEndpoint+"SponsoredArticleCampaigns/"+h+"/ReportSponsoredArticleCalendar").then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise},getsponsoredArticleCampaignByPin:function(h){var p=t.defer();if(f.length>0){var v=c(h);v?p.resolve(v):e.get(scope.apiEndpoint+"/SponsoredArticleCampaigns"+h).then(function(C){p.resolve(C.data)},function(){p.reject()})}else s().then(function(){var C=c(h);C?p.resolve(C):e.get(scope.apiEndpoint+"sponsoredArticleCampaigns/"+h).then(function(A){p.resolve(A.data)},function(){p.reject()})},function(){p.reject()});return p.promise},GetSponsoredArticleReport:function(h){var p=t.defer();return e.get(scope.apiEndpoint+"SponsoredArticleCampaigns/"+h+"/Elastic").then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise},getChapterReport:function(h){var p=t.defer();return e.post(scope.apiEndpoint+"SponsoredArticleCampaigns/chapterReport",h).then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise}}}]),app.controller("sponsoredArticleCampaignReportController",["$scope","$rootScope","sponsoredArticleCampaignService","articleService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r,s){AmCharts.isReady=!0;var c=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd";a.getsponsoredArticleCampaignByPin(g.pin).then(function(h){e.sponsoredArticleCampaign=h,a.getreportSponsoredArticleCalendar(h.pin).then(function(p){p.forEach(function(v){v.chapter=u.getChapter(v.chapterSlug),v.reports.forEach(function(C){C.calendar.forEach(function(A){A.start=moment(A.start.replace("Z","")).toDate(),A.end=moment(A.end.replace("Z","")).toDate()})})}),h.report=p,r(function(){var v,C,A,x,b,R,y=new Set;$.each(p,function(D,S){S.active=!0,y.add(S.chapter.name)}),p.uniqueChapters=[],y.forEach(function(D){p.uniqueChapters.push(D)}),$.each(h.sponsoredArticles,function(D,S){S.reportActive=!0});var l=[],M=function(){l.length=0,p.hasVariants=!1,$.each(p[0].reports[0].calendar,function(D,S){l.push({start:S.start,end:S.end,viewableImpressions:0,billableViewableImpressions:0,uniqueViewableImpressions:0,activeTimeSeconds:0,readings:0,uniqueReadings:0,uniqueReadingsHavingViewableImpressions:0,uniqueReadingPercentageReads:0,maleUniqueViewableImpressions:0,femaleUniqueViewableImpressions:0,desktopReadings:0,mobileReadings:0,tabletReadings:0,age1617MaleUniqueViewableImpressions:0,age1824MaleUniqueViewableImpressions:0,age2534MaleUniqueViewableImpressions:0,age3544MaleUniqueViewableImpressions:0,age4554MaleUniqueViewableImpressions:0,age55MaleUniqueViewableImpressions:0,age1617FemaleUniqueViewableImpressions:0,age1824FemaleUniqueViewableImpressions:0,age2534FemaleUniqueViewableImpressions:0,age3544FemaleUniqueViewableImpressions:0,age4554FemaleUniqueViewableImpressions:0,age55FemaleUniqueViewableImpressions:0,uniqueReadingPercentage24Reads:0,uniqueReadingPercentage2549Reads:0,uniqueReadingPercentage5074Reads:0,uniqueReadingPercentage75100Reads:0})}),$.each(p,function(D,S){S.active&&(p[D-1]&&2===p[D-1].chapter.managementState&&2===S.chapter.managementState&&p[D-1].chapter.name!==S.chapter.name&&(p.multiChapterShipment=!0),$.each(S.reports,function(U,I){I.variants&&(h.report.hasVariants=!0,$.each(I.variants,function(m,F){F.viewableImpressions>0&&(F.hasViews=!0)}))}),$.each(S.reports,function(U,I){if(h.sponsoredArticles[U].reportActive){var m=I.sponsoredArticle.Id;$.each(I.calendar,function(F,E){E.sponsoredArticleId=m,l[F].uniqueViewableImpressions+=E.uniqueViewableImpressions,l[F].viewableImpressions+=E.viewableImpressions,l[F].billableViewableImpressions+=E.billableViewableImpressions,l[F].activeTimeSeconds+=E.activeTimeSeconds,l[F].readings+=E.readings,l[F].uniqueReadingPercentageReads+=E.uniqueReadingPercentageReads,l[F].maleUniqueViewableImpressions+=E.maleUniqueViewableImpressions,l[F].femaleUniqueViewableImpressions+=E.femaleUniqueViewableImpressions,l[F].uniqueReadings+=E.uniqueReadings,l[F].uniqueReadingsHavingViewableImpressions+=E.uniqueReadingsHavingViewableImpressions,l[F].uniqueReadingPercentage24Reads+=E.uniqueReadingPercentage24Reads,l[F].uniqueReadingPercentage2549Reads+=E.uniqueReadingPercentage2549Reads,l[F].uniqueReadingPercentage5074Reads+=E.uniqueReadingPercentage5074Reads,l[F].uniqueReadingPercentage75100Reads+=E.uniqueReadingPercentage75100Reads,l[F].desktopReadings+=E.desktopReadings,l[F].mobileReadings+=E.mobileReadings,l[F].tabletReadings+=E.tabletReadings,l[F].age1617MaleUniqueViewableImpressions+=E.age1617MaleUniqueViewableImpressions,l[F].age1824MaleUniqueViewableImpressions+=E.age1824MaleUniqueViewableImpressions,l[F].age2534MaleUniqueViewableImpressions+=E.age2534MaleUniqueViewableImpressions,l[F].age3544MaleUniqueViewableImpressions+=E.age3544MaleUniqueViewableImpressions,l[F].age4554MaleUniqueViewableImpressions+=E.age4554MaleUniqueViewableImpressions,l[F].age55MaleUniqueViewableImpressions+=E.age55MaleUniqueViewableImpressions,l[F].age1617FemaleUniqueViewableImpressions+=E.age1617FemaleUniqueViewableImpressions,l[F].age1824FemaleUniqueViewableImpressions+=E.age1824FemaleUniqueViewableImpressions,l[F].age2534FemaleUniqueViewableImpressions+=E.age2534FemaleUniqueViewableImpressions,l[F].age3544FemaleUniqueViewableImpressions+=E.age3544FemaleUniqueViewableImpressions,l[F].age4554FemaleUniqueViewableImpressions+=E.age4554FemaleUniqueViewableImpressions,l[F].age55FemaleUniqueViewableImpressions+=E.age55FemaleUniqueViewableImpressions})}}))}),C.validateData(),v.validateData()},T=p.summary={};v=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",useUTC:!0,dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:l,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"uniqueReadings",valueField:"uniqueReadings"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"uniqueReadings",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),C=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:c,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"uniqueReadings",toField:"uniqueReadings"}],dataProvider:l,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_reportSponsoredArticle_uniqueReadersAmount"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders"),valueField:"uniqueReadings",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_uniqueReaders")+": <i class='fa fa-user'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),A=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,marginLeft:2,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),x=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:c,balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(D){return-1*D.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(D){return D<0?-1*D+"":D+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),b=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:o,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:c,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),R=AmCharts.makeChart("chartPercentage",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:[T],rotate:!0,graphs:[{title:"0-24%",labelText:"0-24%",valueField:"uniqueReadingPercentage24Reads",lineColor:c,fillAlphas:.15,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"25-49%",labelText:"25-49%",valueField:"uniqueReadingPercentage2549Reads",lineColor:c,fillAlphas:.25,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"50-74%",labelText:"50-74%",valueField:"uniqueReadingPercentage5074Reads",lineColor:c,fillAlphas:.5,lineAlpha:0,type:"column",balloonText:"[[percents]]%"},{title:"75-100%",labelText:"75-100%",valueField:"uniqueReadingPercentage75100Reads",lineColor:c,fillAlphas:1,lineAlpha:0,type:"column",balloonText:"[[percents]]%"}],valueAxes:[{stackType:"100%",labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,labelsEnabled:!1,inside:!0,tickLength:0,axisAlpha:0}});var w=function(){var D=moment(v.startDate).startOf("day").toDate(),S=moment(v.endDate).startOf("day").add(-1,"d").toDate();C.zoom(D,moment(S).add(1,"d").toDate()),function(D,S){T.viewableImpressions=0,T.billableViewableImpressions=0,T.uniqueViewableImpressions=0,T.activeTimeSeconds=0,T.readings=0,T.uniqueReadings=0,T.uniqueReadingsHavingViewableImpressions=0,T.uniqueReadingPercentageReads=0,T.maleUniqueViewableImpressions=0,T.femaleUniqueViewableImpressions=0,T.desktopReadings=0,T.mobileReadings=0,T.tabletReadings=0,T.age1617MaleUniqueViewableImpressions=0,T.age1824MaleUniqueViewableImpressions=0,T.age2534MaleUniqueViewableImpressions=0,T.age3544MaleUniqueViewableImpressions=0,T.age4554MaleUniqueViewableImpressions=0,T.age55MaleUniqueViewableImpressions=0,T.age1617FemaleUniqueViewableImpressions=0,T.age1824FemaleUniqueViewableImpressions=0,T.age2534FemaleUniqueViewableImpressions=0,T.age3544FemaleUniqueViewableImpressions=0,T.age4554FemaleUniqueViewableImpressions=0,T.age55FemaleUniqueViewableImpressions=0,T.uniqueReadingPercentage24Reads=0,T.uniqueReadingPercentage2549Reads=0,T.uniqueReadingPercentage5074Reads=0,T.uniqueReadingPercentage75100Reads=0;var U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0,j=0,Z=0;T.start=D,T.end=S,$.each(l,function(X,z){var N=new Date(z.start);N<D||N>S||(T.viewableImpressions+=z.viewableImpressions,T.billableViewableImpressions+=z.billableViewableImpressions,T.uniqueViewableImpressions+=z.uniqueViewableImpressions,T.activeTimeSeconds+=z.activeTimeSeconds,T.readings+=z.readings,T.uniqueReadingPercentageReads+=z.uniqueReadingPercentageReads,T.maleUniqueViewableImpressions+=z.maleUniqueViewableImpressions,T.femaleUniqueViewableImpressions+=z.femaleUniqueViewableImpressions,T.uniqueReadings+=z.uniqueReadings,T.uniqueReadingsHavingViewableImpressions+=z.uniqueReadingsHavingViewableImpressions,T.uniqueReadingPercentage24Reads+=z.uniqueReadingPercentage24Reads,T.uniqueReadingPercentage2549Reads+=z.uniqueReadingPercentage2549Reads,T.uniqueReadingPercentage5074Reads+=z.uniqueReadingPercentage5074Reads,T.uniqueReadingPercentage75100Reads+=z.uniqueReadingPercentage75100Reads,U+=z.desktopReadings,I+=z.mobileReadings,m+=z.tabletReadings,F+=z.age1617MaleUniqueViewableImpressions,E+=z.age1824MaleUniqueViewableImpressions,V+=z.age2534MaleUniqueViewableImpressions,q+=z.age3544MaleUniqueViewableImpressions,O+=z.age4554MaleUniqueViewableImpressions,_+=z.age55MaleUniqueViewableImpressions,P+=z.age1617FemaleUniqueViewableImpressions,L+=z.age1824FemaleUniqueViewableImpressions,K+=z.age2534FemaleUniqueViewableImpressions,J+=z.age3544FemaleUniqueViewableImpressions,j+=z.age4554FemaleUniqueViewableImpressions,Z+=z.age55FemaleUniqueViewableImpressions)});var B=U+I+m;T.desktopReadings=Math.round(100/(B/U)),T.mobileReadings=Math.round(100/(B/I)),T.tabletReadings=Math.round(100/(B/m)),T.maleUniqueViewableImpressions=Math.round(T.maleUniqueViewableImpressions),T.femaleUniqueViewableImpressions=Math.round(T.femaleUniqueViewableImpressions),d[0].value=T.femaleUniqueViewableImpressions,d[1].value=T.maleUniqueViewableImpressions;var Q=T.viewableImpressions-(F+E+V+q+O+_+P+L+K+J+j+Z);Q>100&&(F+=Q*t.scope.globalSettings.reportAverageAge1617Male,E+=Q*t.scope.globalSettings.reportAverageAge1824Male,V+=Q*t.scope.globalSettings.reportAverageAge2534Male,q+=Q*t.scope.globalSettings.reportAverageAge3544Male,O+=Q*t.scope.globalSettings.reportAverageAge4554Male,_+=Q*t.scope.globalSettings.reportAverageAge55Male,P+=Q*t.scope.globalSettings.reportAverageAge1617Female,L+=Q*t.scope.globalSettings.reportAverageAge1824Female,K+=Q*t.scope.globalSettings.reportAverageAge2534Female,J+=Q*t.scope.globalSettings.reportAverageAge3544Female,j+=Q*t.scope.globalSettings.reportAverageAge4554Female,Z+=Q*t.scope.globalSettings.reportAverageAge55Female),T.age1617MaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/F)),T.age1824MaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/E)),T.age2534MaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/V)),T.age3544MaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/q)),T.age4554MaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/O)),T.age55MaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/_)),T.age1617FemaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/P)),T.age1824FemaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/L)),T.age2534FemaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/K)),T.age3544FemaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/J)),T.age4554FemaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/j)),T.age55FemaleUniqueViewableImpressions=Math.round(100/(T.viewableImpressions/Z)),i[0].male=Math.round(-1*T.age1617MaleUniqueViewableImpressions),i[1].male=Math.round(-1*T.age1824MaleUniqueViewableImpressions),i[2].male=Math.round(-1*T.age2534MaleUniqueViewableImpressions),i[3].male=Math.round(-1*T.age3544MaleUniqueViewableImpressions),i[4].male=Math.round(-1*T.age4554MaleUniqueViewableImpressions),i[5].male=Math.round(-1*T.age55MaleUniqueViewableImpressions),i[0].female=Math.round(T.age1617FemaleUniqueViewableImpressions),i[1].female=Math.round(T.age1824FemaleUniqueViewableImpressions),i[2].female=Math.round(T.age2534FemaleUniqueViewableImpressions),i[3].female=Math.round(T.age3544FemaleUniqueViewableImpressions),i[4].female=Math.round(T.age4554FemaleUniqueViewableImpressions),i[5].female=Math.round(T.age55FemaleUniqueViewableImpressions),o[0].value=T.desktopReadings,o[1].value=T.mobileReadings,o[2].value=T.tabletReadings,A.validateData(),x.validateData(),b.validateData(),R.validateData(),e.$apply()}(D,S)};v.addListener("zoomed",function(){w()}),e.toggleReport=function(D){$.each(h.sponsoredArticles,function(S,U){U.guid===D.guid&&(U.reportActive=!U.reportActive)}),r(function(){M(),w()},50)},e.toggleChapter=function(D){$.each(p,function(S,U){U.chapter.name===D&&(U.active=!U.active)}),r(function(){M(),w()},50)},M(),C.validateNow(),v.validateNow(),v.setDefaultPeriod(),w()},function(){e.error=!0})})},function(){s.path("/")});var d=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:c,value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],i=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],o=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}]}]),app.controller("StaticArticleDetailController",["$rootScope","$scope","snipService","parserService","$location","staticArticle","$timeout","$uibModal",function(e,t,a,n,u,g,f,r){t.enableHighQualityImage=e.scope.network.settings.configurations.enableHighQualityImage,t.$on("$viewContentLoaded",function(){f(function(){t.viewContentLoaded=!0})});var s,p,c=function(){s=t.staticArticle.assetReferences.reduce(function(p,v,C){return p[v.guid]=v,p},{})};if(t.resolveAsset=function(p){return s[p]},$(window).scroll(function(p){$(p.target).scrollTop()>100?$(".staticArticleDetail-mobileNavigation-wrapper").addClass("staticArticleDetail-mobileNavigation-wrapper-scrolled"):$(".staticArticleDetail-mobileNavigation-wrapper").removeClass("staticArticleDetail-mobileNavigation-wrapper-scrolled")}),t.recommendedArticles=[],t.recommendedArticlePairs=[],t.recommendedSnips=[],t.assetsMedia=[],t.assetsFacts=[],t.assetsQuestions=[],t.assetsComments=[],t.staticArticleUpdater)(t.$parent.staticArticleUpdater?t.$parent:t.$parent.$parent).$on("staticArticleUpdater",function(p,v){t.staticArticle=v,n.postProcessHtml(t.staticArticle),t.staticArticle.detailsLoaded=!0,c(),t.$broadcast("$$rebind::refresh")});else{t.$watch(function(){return"staticArticle.detailsLoaded"},function(p){p&&c()});var i=g.id;if(t.staticArticle=g,n.postProcessHtml(t.staticArticle),a.getRecommendedSnips(i).then(function(p){t.recommendedSnips=p}),(p=window.navigator.userAgent).indexOf(" Android ")>-1&&p.indexOf("Version/")>-1&&parseFloat((p.match("Android ([0-9.]+)")||[])[1])<=4.4){var h=$(window).height();$(".app-mobile .staticArticleDetail-wrapper").css("height",h+"px"),$(".app-desktop .staticArticleDetail-wrapper").css("height",h+"px")}}t.assetImageFocuspointDialog=function(p){r.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetImageFocuspointDialog.html",controller:"AssetImageFocuspointDialog",size:"lg",resolve:{assetReference:function(){return p}}})},t.share=function(){!window.plugins||!window.plugins.socialsharing||(window._paq&&_paq.push(["trackEvent","Conversion","StartSharestaticArticle","staticArticleDetail"]),window.plugins.socialsharing.shareWithOptions({message:(t.staticArticle.heading?t.staticArticle.heading+": ":"")+t.staticArticle.text+" "+u.absUrl()},function(){window._paq&&_paq.push(["trackEvent","Conversion","SuccessSharestaticArticle","staticArticleDetail"])}))}}]),app.controller("StaticArticleEditController",["$scope","$window","staticArticleService","metaService","$state","authService","fileUploadService","$location","$timeout","$uibModal","$rootScope","staticArticleId","proseMirrorEditorService","editorCommentStaticArticleService","editorAssetsService","spellingService","backendHubProxy",function(e,t,a,n,u,g,f,r,s,c,d,i,o,h,p,v,C){var A=C("editorHub");e.revision={coverAssetImages:[],texts:[{heading:"",text:""}],chapterSlug:null};var x="static_"+i+"_"+d.scope.currentScope.chapter.id;e.enableHighQualityImage=d.scope.network.settings.configurations.enableHighQualityImage,e.$on("$destroy",function(){n.setFavicon()}),e.staticArticleUpdater=!0;var R,b=!1;e.staticArticle={text:"",content:"",summary:"",heading:""},e.editor=null,e.changed=!1,e.loading=!0;var y=d.scope.currentScope.network.getResourceOrKeyName("web_articleEdit_leaveMessage");window.onbeforeunload=function(){if(e.changed)return y};var l=!1;d.$on("$stateChangeStart",function(P,L){l?P.preventDefault():e.changed&&!confirm(y)?(l=!0,P.preventDefault(),b=!1,s(function(){l=!1},1e3)):(e.changed=!1,b&&(A.invoke("leaveGroup",x),o.closeConnection(),A.stop(),b=!1))}),e.textCarousel=null,e.textSlick=null,e.textSlickIndex=0,e.coverAssetSlickIndex=0;var T=function(P){e.staticArticle=P;var L=S(P);L?e.revision=L:P.revisions.push(e.revision),R=D(P),s(function(){e.textCarousel||(e.textCarousel=$("#staticArticleEdit-text-wrapper").find(".staticArticleEdit-text-carousel"),e.textCarousel.on("afterChange",function(K,J){e.textSlickIndex=J.currentSlide})),e.coverAssetCarousel||(e.coverAssetCarousel=$("#staticArticleEdit-cover-wrapper").find(".staticArticleEdit-cover-carousel"),e.coverAssetCarousel.on("afterChange",function(K,J){e.coverAssetSlickIndex=J.currentSlide})),s(function(){})})};e.coverAssetCarousel=null,e.coverAssetSlick=null,e.delCoverAssetVariant=function(){e.revision.coverAssetImages=[],e.revision.coverAssetImageId=null},e.pickCoverAsset=function(P){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 2},single:function(){return!0},hideInComments:function(){return!0},resultCallback:function(){return function(L){P&&e.revision.coverAssetImages.length?e.revision.coverAssetImages[0]=L.assetImage:e.revision.coverAssetImages.push(L.assetImage)}},staticArticle:function(){return e.staticArticle}}})},e.assetDialog=function(){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 0},resultCallback:function(){return k},staticArticle:function(){return e.staticArticle}}})};var k=function(P){s(function(){e.insertAsset(P)},500)};e.insertAsset=function(P){if($("#assetModal").modal("hide"),e.initializedMobile){if(e.initializedMobile){var L=$("#staticArticleEdit-editor-mobile")[0],K=L.selectionStart,J=L.selectionEnd,j=L.value,Z=j.substring(0,K),B=j.substring(J,j.length),Q="\n!["+P.guid+"]\n";L.value=Z+Q+B,s(function(){L.selectionStart=L.selectionEnd=K+Q.length,L.focus()})}}else{if(!e.editor)return;e.editor.replaceSelection("\n!["+P.guid+"]\n"),setTimeout(function(){e.editor.focus()},600)}},e.save=function(){var P={id:e.staticArticle.id,title:e.revision.title,heading:e.revision.heading,summary:e.revision.summary,htmlDocument:o.getHtmlDocument(),jsonDocument:o.getDocument()};null!==e.staticArticle.revisions[0].coverAssetImages&&e.staticArticle.revisions[0].coverAssetImages.length>0&&(P.coverAssetImageId=e.revision.coverAssetImages[0].id),a.updateStaticArticle(P).then(function(L){e.changed=!1,T(L.data)},function(){c.open({templateUrl:"/ClientApp/src/legacy-app/article/unableToSaveDialog.html"})})},e.submit=function(){e.editForm.$submitted=!0},e.publish=function(P){e.editForm.$submitted=!0,P&&a.publishStaticArticle(e.staticArticle).then(function(L){e.changed=!1,T(L.data)},function(){})},e.preview=!1,e.togglePreview=function(){if(e.preview=!e.preview,e.preview){var P=angular.copy(e.staticArticle);P.content=o.getHtmlDocument(),P.assetReferences=P.assetReferences,P.title=e.revision.title,P.heading=e.revision.heading,P.summary=e.revision.summary,e.revision.coverAssetImages.length&&(P.coverAssetReference=P.assetReferences.filter(function(L){return L.assetImage&&L.assetImage.id===e.revision.coverAssetImages[0].id})[0]),s(function(){e.$broadcast("staticArticleUpdater",P)},500)}};var D=function(P){var L=S(P);return angular.toJson(L.coverAssetImages)+L.summary+L.jsonDocument+L.title+L.heading},S=function(P){return P.revisions[0]},U=function(P,L){c.open({templateUrl:"/ClientApp/src/legacy-app/asset/assetDialog.html",controller:"AssetDialog",size:"lg",resolve:{assetType:function(){return 0},single:function(){return!1},hideInComments:function(){return!0},resultCallback:function(){return function(K){if(L){o.setFocus();var J=[];$.each(K,function(j,Z){var B=null;Z.assetImage&&(B=Z.assetImage.type),Z.assetText&&(B=Z.assetText.type),Z.assetArticle&&(B=Z.assetArticle.type),Z.assetFile&&(B=Z.assetFile.type),J.push({guid:Z.guid,type:B})}),L(J)}}},staticArticle:function(){return e.staticArticle}}})},I=function(P,L){c.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createEditorCommentDialog.html",controller:"CreateEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{editorCommentCallback:function(){return L},messageHolder:function(){return new MessageHolder(e.staticArticle)},sourceService:function(){return h}}})},m=function(P,L,K){c.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/listEditorCommentDialog.html",controller:"ListEditorCommentDialogController",controllerAs:"ctrl",size:"lg",resolve:{onDeletedCallback:function(){return K},onAddedCallback:function(){return L},messageHolder:function(){return new MessageHolder(e.staticArticle)},chainComments:function(){return P},sourceService:function(){return h}}})},F=function(P){c.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createLinkDialog.html",controller:"CreateLinkDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return P}}})},E=function(P,L){c.open({templateUrl:"/ClientApp/src/legacy-app/proseMirrorEditor/createCallToActionDialog.html",controller:"CreateCallToActionDialogController",controllerAs:"ctrl",size:"lg",resolve:{onSuccessfulCallback:function(){return L}}})},V=function(P){return p.getAsset(P,e.staticArticle.assetReferences)},q=function(P){s(function(){S(e.staticArticle).jsonDocument=P,e.numberOfWords=v.countWords(o.getHtmlDocument())})};$(".staticArticleEdit-wrapper").scroll(function(){!function P(){$(".proseMirror-wrapper").offset().top<50?$(".proseMirror-wrapper").addClass("sticky"):$(".proseMirror-wrapper").removeClass("sticky")}()}),A.on("broadcastSummary",function(P){e.revision.summary=P}),A.on("broadcastHeading",function(P){e.revision.heading=P.heading}),A.on("broadcastTitle",function(P){e.revision.title=P.title}),A.start(function(){A.invoke("joinGroup",x)}),e.leaveEditor=function(){b=!0},e.blurHeading=function(){A.invoke("updatingHeading",{groupName:x,heading:e.revision.heading})},e.blurTitle=function(){A.invoke("updatingTitle",{groupName:x,title:e.revision.title})},e.blurSummary=function(){A.invoke("updatingSummary",{groupName:x,summary:e.revision.summary})},a.getStaticArticleEdit(i).then(function(P){e.loading=!1,T(P),n.setFavicon(!0),o.init({docID:"staticArticle_"+P.id+"_"+P.chapterId,assetDlgFactory:U,commentCreationDlgFactory:I,commentMgmtDlgFactory:m,initialDocument:S(P).jsonDocument,initialAssetReferences:P.assetReferences,createLinkFactory:F,callToActionDlgFactory:E,assetResolver:V,onNewStateFactory:q,onLoadTransactionCallback:q,languageCode:d.scope.currentScope.network.settings.languageCode}),e.$watch(function(){return D(e.staticArticle)},function(P){e.changed=R!==P})},function(){r.path("/")})}]),app.factory("staticArticleService",["$http","$q",function(e,t){return{getStaticArticles:function(){var c=t.defer();return e.get(scope.apiEndpoint+"staticArticles").then(function(d){c.resolve(d.data)}),c.promise},getStaticArticle:function(c){var d=t.defer();return e.get(scope.apiEndpoint+"staticArticles/"+c).then(function(i){d.resolve(i.data)}),d.promise},getStaticArticleEdit:function(c){var d=t.defer();return e.get(scope.apiEndpoint+"staticArticles/"+c+"/edit").then(function(i){d.resolve(i.data)},function(i){d.reject()}),d.promise},getStaticArticleParse:function(c,d){var i=t.defer();return e.post(scope.apiEndpoint+"staticArticles/"+c+"/parse",d).then(function(o){i.resolve(o.data)},function(){i.reject()}),i.promise},updateStaticArticle:function(c){var d=t.defer();return e.put(scope.apiEndpoint+"staticArticles",c).then(function(i){angular.copy(i.data,c),d.resolve(i)},function(){d.reject()}),d.promise},publishStaticArticle:function(c){var d=t.defer();return e.put(scope.apiEndpoint+"staticArticles/"+c.id+"/publish",c).then(function(i){d.resolve(i)},function(){d.reject()}),d.promise},addAssetStaticArticle:function(c,d,i){var o=t.defer();return e.post(scope.apiEndpoint+"assets/StaticArticle/CreateAsset",{ownerId:c,staticArticleId:d,assetArticleType:i}).then(function(p){o.resolve(p.data)},function(){o.reject()}),o.promise}}}]),app.controller("SuperCampaignElasticReportController",["$scope","$rootScope","superService","scopeService","$stateParams","$timeout","$location",function(e,t,a,n,u,g,f){AmCharts.isReady=!0;var d,i,o,r=t.scope.currentScope.network.settings.colorPrimary?"#"+t.scope.currentScope.network.settings.colorPrimary:"#00cdbd",s=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}],c=[];e.report=null,e.totalClickCount=0,e.totalImpressionTime=0,e.totalImpressionCount=0,e.filterDisabled=!1,e.startDay=null,e.endDay=null;var h=function(A){var x=0,b=0,R=0,y=0,l=0,M=0;$.each(A,function(T,k){x+=k.desktopImpressionCount,b+=k.tabletImpressionCount,R+=k.mobileImpressionCount,y+=k.clickCount,l+=k.impressionTime,M+=k.impressionCount}),e.$apply(function(){e.totalClickCount=y,e.totalImpressionTime=l,e.totalImpressionCount=M}),s[0].value=Math.round(100/(M/x)),s[1].value=Math.round(100/(M/R)),s[2].value=Math.round(100/(M/b)),d.validateData()},p=function(){var A=moment(i.startDate).startOf("day").toDate(),x=moment(i.endDate).startOf("day").toDate(),b=e.report.filter(function(R){return R.day>=A&&R.day<=x});h(b),o.zoom(A,moment(x).add(1,"d").toDate())},C=function(){var A=e.superCampaign.superBanners.filter(function(b){return!b.filtered}).map(function(b){return b.id}),x=e.chapters.filter(function(b){return!b.filtered}).map(function(b){return b.id});e.filterDisabled=!0,a.getSuperReport(e.superCampaign.pin,{superCampaignId:e.superCampaign.id,superBannerIds:A,chapterIds:x}).then(function(b){b.forEach(function(R){R.day=moment(R.day.replace("Z","")).toDate()}),e.report=b,g(function(){(function(A){c.length=0,$.each(A,function(x,b){c.push(b)}),i.validateData(),o.validateData(),e.$apply(function(){e.startDay=start,e.endDay=end})})(b),p(),e.filterDisabled=!1},50)})};e.filterChapter=function(A){A.filtered=!A.filtered,C()},e.chapterFilterDisabled=function(A){return e.filterDisabled||1===e.chapters.filter(function(x){return!x.filtered}).length&&!A.filtered},e.filterBanner=function(A){e.filterDisabled||1===e.superCampaign.superBanners.filter(function(x){return!x.filtered}).length&&!A.filtered||(A.filtered=!A.filtered,C())},a.getSuperByPin(u.pin).then(function(A){e.superCampaign=A,a.getSuperReport(A.pin,{superCampaignId:A.id}).then(function(x){x.forEach(function(R){R.day=moment(R.day.replace("Z","")).toDate()}),e.report=x,e.startDay=x[0].day,e.endDay=x[x.length-1].day;var b=[];$.each(A.chapterSlugs,function(R,y){b.push(n.getChapter(y))}),b=b.filter(function(R){return 2===R.managementState}),e.chapters=b,$.each(x,function(R,y){c.push(y)}),g(function(){d=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:s,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:r,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}}),(i=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"}],dataProvider:c,categoryField:"day"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"impressionCount",valueField:"impressionCount"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",selected:!0,label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"impressionCount",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}})).addListener("zoomed",function(){p()}),o=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:r,fieldMappings:[{fromField:"day",toField:"day"},{fromField:"impressionCount",toField:"impressionCount"},{fromField:"clickCount",toField:"clickCount"}],dataProvider:c,categoryField:"day"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.resources.web_report_viewableImpressions,id:"impressionCount",type:"smoothedLine",valueField:"impressionCount",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.resources.web_report_viewableImpressions+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clickCount",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),h(x)})})},function(){f.path("/")})}]),app.controller("superCampaignReportController",["$scope","$rootScope","superService","scopeService","$stateParams","$window","$timeout","$location",function(e,t,a,n,u,g,f,r){AmCharts.isReady=!0;var s="#00cdbd",c=[{title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),color:s,value:0},{title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),color:"#cccccc",value:0}],d=[{title:"16-17",male:0,female:0},{title:"18-24",male:0,female:0},{title:"25-34",male:0,female:0},{title:"35-44",male:0,female:0},{title:"45-54",male:0,female:0},{title:"55+",male:0,female:0}],i=[{title:"Desktop",value:0},{title:"Smartphone",value:0},{title:"Tablet",value:0}];a.getSuperByPin(u.pin).then(function(o){e.superCampaign=o,a.getReportSuperBannerCalendar(o.pin).then(function(h){h.forEach(function(p){p.chapter=n.getChapter(p.chapterSlug),p.reports.forEach(function(v){v.calendar.forEach(function(C){C.start=moment(C.start.replace("Z","")).toDate(),C.end=moment(C.end.replace("Z","")).toDate()})})}),o.report=h,f(function(){var p,v,C,A,x,b=new Set;$.each(h,function(k,w){w.active=!0,b.add(w.chapter.name)}),h.uniqueChapters=[],b.forEach(function(k){h.uniqueChapters.push(k)}),$.each(o.superBanners,function(k,w){w.reportActive=!0});var R=[],y=function(){R.length=0,$.each(h[0].reports[0].calendar,function(k,w){R.push({start:w.start,end:w.end,impressions:0,viewableImpressions:0,viewableImpressionTimeSeconds:0,desktopViewableImpressions:0,mobileViewableImpressions:0,tabletViewableImpressions:0,clicks:0,maleViewableImpressions:0,femaleViewableImpressions:0,age1617MaleViewableImpressions:0,age1824MaleViewableImpressions:0,age2534MaleViewableImpressions:0,age3544MaleViewableImpressions:0,age4554MaleViewableImpressions:0,age55MaleViewableImpressions:0,age1617FemaleViewableImpressions:0,age1824FemaleViewableImpressions:0,age2534FemaleViewableImpressions:0,age3544FemaleViewableImpressions:0,age4554FemaleViewableImpressions:0,age55FemaleViewableImpressions:0})}),$.each(h,function(k,w){w.active&&(h[k-1]&&2===h[k-1].chapter.managementState&&2===w.chapter.managementState&&h[k-1].chapter.name!==w.chapter.name&&(h.multiChapterShipment=!0),$.each(w.reports,function(D,S){if(o.superBanners[D].reportActive){var U=S.superBanner.pin;$.each(S.calendar,function(I,m){m.pin=U,R[I].impressions+=m.impressions,R[I].viewableImpressions+=m.viewableImpressions,R[I].viewableImpressionTimeSeconds+=m.viewableImpressionTimeSeconds,R[I].desktopViewableImpressions+=m.desktopViewableImpressions,R[I].mobileViewableImpressions+=m.mobileViewableImpressions,R[I].tabletViewableImpressions+=m.tabletViewableImpressions,R[I].clicks+=m.clicks,R[I].maleViewableImpressions+=m.maleViewableImpressions,R[I].femaleViewableImpressions+=m.femaleViewableImpressions,R[I].age1617MaleViewableImpressions+=m.age1617MaleViewableImpressions,R[I].age1824MaleViewableImpressions+=m.age1824MaleViewableImpressions,R[I].age2534MaleViewableImpressions+=m.age2534MaleViewableImpressions,R[I].age3544MaleViewableImpressions+=m.age3544MaleViewableImpressions,R[I].age4554MaleViewableImpressions+=m.age4554MaleViewableImpressions,R[I].age55MaleViewableImpressions+=m.age55MaleViewableImpressions,R[I].age1617FemaleViewableImpressions+=m.age1617FemaleViewableImpressions,R[I].age1824FemaleViewableImpressions+=m.age1824FemaleViewableImpressions,R[I].age2534FemaleViewableImpressions+=m.age2534FemaleViewableImpressions,R[I].age3544FemaleViewableImpressions+=m.age3544FemaleViewableImpressions,R[I].age4554FemaleViewableImpressions+=m.age4554FemaleViewableImpressions,R[I].age55FemaleViewableImpressions+=m.age55FemaleViewableImpressions})}}))}),v.validateData(),p.validateData()},l=h.summary={};p=AmCharts.makeChart("chartScrollbar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"}],dataProvider:R,categoryField:"start"}],panels:[{showCategoryAxis:!1,percentHeight:0,recalculateToPercents:"never",stockGraphs:[{id:"viewableImpressions",valueField:"viewableImpressions"}]}],periodSelector:{inputFieldsEnabled:!1,position:"top",periods:[{period:"MM",selected:!0,count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_month")},{period:"MM",count:3,label:"3 "+scope.currentScope.network.getResourceOrKeyName("web_report_months")},{period:"YYYY",count:1,label:"1 "+scope.currentScope.network.getResourceOrKeyName("web_report_year")},{period:"MAX",label:scope.currentScope.network.getResourceOrKeyName("web_report_everything")}]},categoryAxis:{parseDates:!0},chartScrollbarSettings:{position:"top",graph:"viewableImpressions",graphFillAlpha:1,selectedBackgroundColor:"#888888",selectedGraphFillAlpha:1}}),v=AmCharts.makeChart("chartCalendar",{type:"stock",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataSets:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_all"),color:s,fieldMappings:[{fromField:"start",toField:"start"},{fromField:"viewableImpressions",toField:"viewableImpressions"},{fromField:"clicks",toField:"clicks"},{fromField:"clickThroughRate",toField:"clickThroughRate"}],dataProvider:R,categoryField:"start"}],categoryAxesSettings:{maxSeries:65,groupToPeriods:["DD","WW","MM"]},panels:[{showCategoryAxis:!1,percentHeight:70,recalculateToPercents:"never",stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions"),id:"viewableImpressions",type:"smoothedLine",valueField:"viewableImpressions",periodValue:"Sum",comparable:!0,balloonText:scope.currentScope.network.getResourceOrKeyName("web_report_viewableImpressions")+": : <i class='fa fa-eye'></i> [[value]]",fillAlphas:.5,periodValueText:"[[value.sum]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}},{showCategoryAxis:!0,title:scope.currentScope.network.getResourceOrKeyName("web_report_AdAmountOfClicks"),percentHeight:30,stockGraphs:[{title:scope.currentScope.network.getResourceOrKeyName("web_report_clicks"),valueField:"clicks",periodValue:"Sum",type:"column",fillAlphas:1,balloonText:"<i class='fa fa-external-link'></i> [[value]]",visibleInLegend:!1}],stockLegend:{switchable:!1,periodValueText:"[[value.sum]]"},valueAxes:[{precision:0,tickLength:0,gridAlpha:0}],categoryAxis:{gridAlpha:0}}],chartCursorSettings:{valueBalloonsEnabled:!0,zoomable:!1,fullWidth:!0,cursorAlpha:.1},categoryAxis:{parseDates:!0},chartScrollbarSettings:{enabled:!1}}),C=AmCharts.makeChart("chartGender",{type:"pie",theme:"light",percentFormatter:{precision:0},pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:c,valueField:"value",titleField:"title",colorField:"color",labelsEnabled:!1,autoMargins:!0,pullOutRadius:20,legend:{markerType:"circle",position:"top",autoMargins:!0,valueText:"[[percents]]%"},balloonText:"[[percents]]%"}),A=AmCharts.makeChart("chartAge",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:d,graphs:[{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_female"),type:"column",valueField:"female",lineColor:s,balloonText:"[[value]]%"},{fillAlphas:1,title:scope.currentScope.network.getResourceOrKeyName("web_user_male"),type:"column",clustered:!1,valueField:"male",lineColor:"#cccccc",balloonFunction:function(k,w){return-1*k.values.value+"%"}}],categoryField:"title",valueAxes:[{integersOnly:!0,precision:0,labelFunction:function(k){return k<0?-1*k+"":k+""},labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,axisAlpha:0}}),x=AmCharts.makeChart("chartDevice",{type:"serial",theme:"light",pathToImages:"/content/amcharts/images/",path:"/content/amcharts/",dataProvider:i,rotate:!0,graphs:[{fillAlphas:1,type:"column",valueField:"value",lineColor:s,balloonText:"[[value]]%"}],valueField:"value",categoryField:"title",valueAxes:[{labelsEnabled:!1,gridAlpha:0,tickLength:0,axisAlpha:0}],categoryAxis:{gridAlpha:0,inside:!0,tickLength:0,axisAlpha:0}});var T=function(){var k=moment(p.startDate).startOf("day").toDate(),w=moment(p.endDate).startOf("day").add(-1,"d").toDate();(function(k,w){l.maleViewableImpressions=0,l.femaleViewableImpressions=0,l.viewableImpressions=0,l.viewableImpressionTimeSeconds=0,l.impressions=0,l.clicks=0,l.desktopViewableImpressions=0,l.mobileViewableImpressions=0,l.tabletViewableImpressions=0,l.age1617MaleViewableImpressions=0,l.age1824MaleViewableImpressions=0,l.age2534MaleViewableImpressions=0,l.age3544MaleViewableImpressions=0,l.age4554MaleViewableImpressions=0,l.age55MaleViewableImpressions=0,l.age1617FemaleViewableImpressions=0,l.age1824FemaleViewableImpressions=0,l.age2534FemaleViewableImpressions=0,l.age3544FemaleViewableImpressions=0,l.age4554FemaleViewableImpressions=0,l.age55FemaleViewableImpressions=0;var D=0,S=0,U=0,I=0,m=0,F=0,E=0,V=0,q=0,O=0,_=0,P=0,L=0,K=0,J=0;l.start=k,l.end=w,$.each(R,function(Z,B){var Q=new Date(B.start);Q<k||Q>w||(l.maleViewableImpressions+=B.maleViewableImpressions,l.femaleViewableImpressions+=B.femaleViewableImpressions,l.viewableImpressions+=B.viewableImpressions,l.viewableImpressionTimeSeconds+=B.viewableImpressionTimeSeconds,l.impressions+=B.impressions,l.clicks+=B.clicks,D+=B.desktopViewableImpressions,S+=B.mobileViewableImpressions,U+=B.tabletViewableImpressions,I+=B.age1617MaleViewableImpressions,m+=B.age1824MaleViewableImpressions,F+=B.age2534MaleViewableImpressions,E+=B.age3544MaleViewableImpressions,V+=B.age4554MaleViewableImpressions,q+=B.age55MaleViewableImpressions,O+=B.age1617FemaleViewableImpressions,_+=B.age1824FemaleViewableImpressions,P+=B.age2534FemaleViewableImpressions,L+=B.age3544FemaleViewableImpressions,K+=B.age4554FemaleViewableImpressions,J+=B.age55FemaleViewableImpressions)}),l.desktopViewableImpressions=Math.round(100/(l.viewableImpressions/D)),l.mobileViewableImpressions=Math.round(100/(l.viewableImpressions/S)),l.tabletViewableImpressions=Math.round(100/(l.viewableImpressions/U));var j=l.viewableImpressions-(I+m+F+E+V+q+O+_+P+L+K+J);j>100&&(I+=j*t.scope.globalSettings.reportAverageAge1617Male,m+=j*t.scope.globalSettings.reportAverageAge1824Male,F+=j*t.scope.globalSettings.reportAverageAge2534Male,E+=j*t.scope.globalSettings.reportAverageAge3544Male,V+=j*t.scope.globalSettings.reportAverageAge4554Male,q+=j*t.scope.globalSettings.reportAverageAge55Male,O+=j*t.scope.globalSettings.reportAverageAge1617Female,_+=j*t.scope.globalSettings.reportAverageAge1824Female,P+=j*t.scope.globalSettings.reportAverageAge2534Female,L+=j*t.scope.globalSettings.reportAverageAge3544Female,K+=j*t.scope.globalSettings.reportAverageAge4554Female,J+=j*t.scope.globalSettings.reportAverageAge55Female),l.age1617MaleViewableImpressions=Math.round(100/(l.viewableImpressions/I)),l.age1824MaleViewableImpressions=Math.round(100/(l.viewableImpressions/m)),l.age2534MaleViewableImpressions=Math.round(100/(l.viewableImpressions/F)),l.age3544MaleViewableImpressions=Math.round(100/(l.viewableImpressions/E)),l.age4554MaleViewableImpressions=Math.round(100/(l.viewableImpressions/V)),l.age55MaleViewableImpressions=Math.round(100/(l.viewableImpressions/q)),l.age1617FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/O)),l.age1824FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/_)),l.age2534FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/P)),l.age3544FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/L)),l.age4554FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/K)),l.age55FemaleViewableImpressions=Math.round(100/(l.viewableImpressions/J)),l.maleViewableImpressions=Math.round(l.maleViewableImpressions),l.femaleViewableImpressions=Math.round(l.femaleViewableImpressions),c[0].value=l.femaleViewableImpressions,c[1].value=l.maleViewableImpressions,d[0].male=Math.round(-1*l.age1617MaleViewableImpressions),d[1].male=Math.round(-1*l.age1824MaleViewableImpressions),d[2].male=Math.round(-1*l.age2534MaleViewableImpressions),d[3].male=Math.round(-1*l.age3544MaleViewableImpressions),d[4].male=Math.round(-1*l.age4554MaleViewableImpressions),d[5].male=Math.round(-1*l.age55MaleViewableImpressions),d[0].female=Math.round(l.age1617FemaleViewableImpressions),d[1].female=Math.round(l.age1824FemaleViewableImpressions),d[2].female=Math.round(l.age2534FemaleViewableImpressions),d[3].female=Math.round(l.age3544FemaleViewableImpressions),d[4].female=Math.round(l.age4554FemaleViewableImpressions),d[5].female=Math.round(l.age55FemaleViewableImpressions),i[0].value=l.desktopViewableImpressions,i[1].value=l.mobileViewableImpressions,i[2].value=l.tabletViewableImpressions,C.validateData(),A.validateData(),x.validateData(),e.$apply()})(k,w),v.zoom(k,moment(w).add(1,"d").toDate())};p.addListener("zoomed",function(k){T()}),e.toggleReport=function(k){$.each(o.superBanners,function(w,D){D.pin===k.pin&&(D.reportActive=!D.reportActive)}),f(function(){y(),T()},50)},e.toggleChapter=function(k){$.each(h,function(w,D){D.chapter.name===k&&(D.active=!D.active)}),f(function(){y(),T()},50)},y(),v.validateData(),p.validateNow(),p.setDefaultPeriod()},function(){e.error=!0})})},function(){r.path("/")})}]),app.factory("superService",["$http","$q","$rootScope","authService","profileService","$location",function(e,t,a,n,u,g){var f=[],s=function(){var o=t.defer();return f.length>0?o.resolve(f):e.get(scope.apiEndpoint+"super").then(function(h){angular.copy(h.data,f),o.resolve(f)},function(){o.reject()}),o.promise};function c(o){var h=null;return $.each(f,function(p,v){if(v.pin===o)return h=v,!1}),h}return{supers:f,getSuperReport:function(o,h){var p=t.defer();return e.post(scope.apiEndpoint+"super/"+o+"/report",h).then(function(v){p.resolve(v.data)},function(){p.reject()}),p.promise},getSupers:s,getReportSuperBannerCalendar:function(o){var h=t.defer();return e.get(scope.apiEndpoint+"super/"+o+"/ReportSuperBannerCalendar").then(function(p){h.resolve(p.data)},function(){h.reject()}),h.promise},getSuperByPin:function(o){var h=t.defer();if(f.length>0){var p=c(o);p?h.resolve(p):e.get(scope.apiEndpoint+"super/"+o).then(function(v){h.resolve(v.data)},function(){h.reject()})}else s().then(function(){var v=c(o);v?h.resolve(v):e.get(scope.apiEndpoint+"super/"+o).then(function(C){h.resolve(C.data)},function(){h.reject()})},function(){h.reject()});return h.promise}}}]),app.controller("SurveyDetailController",["$scope","$stateParams","shipmentService","$location","$rootScope","translationService","profileService",function(e,t,a,n,u,g,f){e.surveyId=t.id,e.preview=void 0!==n.search().preview,e.requestInProgress=!0,a.getSurveyForDeeplink(e.surveyId,e.preview).then(function(r){e.requestInProgress=!1,e.shipment=r},function(){e.requestInProgress=!1,n.path("/")}),e.availableTargetLanguages=null,g.getAvailableTargetLanguages().then(function(r){e.availableTargetLanguages=r}),e.selectedTargetLanguage=u.profile.favoriteLanguage,e.translateSurvey=function(){null===e.selectedTargetLanguage?a.getSurveyForDeeplink(e.surveyId,e.preview).then(function(r){e.shipment=r}):a.getTranslatedSurveyForDeeplink(e.surveyId,e.preview,e.selectedTargetLanguage).then(function(r){e.shipment=r,f.updateFavoriteLanguage(e.selectedTargetLanguage).then(function(){u.profile.favoriteLanguage=e.selectedTargetLanguage})})}}]),app.factory("configurationsService",["$rootScope","$http","$q","authService",function(e,t,a,n){return{getConfigurationsData:function(g){var f=a.defer(),r=scope.apiEndpoint+"configurations";return g&&(r=r+"?key="+g),t.get(r).then(function(s){f.resolve(s.data)},function(){f.reject()}),f.promise}}}]),app.controller("DataPrivacyPolicyController",["$scope","$filter","$sce","$window","configurationsService","markdownConverterService","$templateRequest","$interpolate",function(e,t,a,n,u,g,f,r){e.updatePolicyHtml=function(){var i=new RegExp("{{resource:[a-z]*}}","i"),o=e.policyHtml.match(i);o&&o.forEach(function(h,p,v){var C=h.substring(11,h.length-2);e.policyHtml=e.policyHtml.replaceAll(h,scope.network.resources[C])}),e.policyHtml=e.policyHtml.replaceAll("{{Matomo}}",scope.currentScope.chapter.settings.piwikBaseUrl?'<iframe style="border: 0; height: 200px; width: 600px; " src="'+e.matomoOptOutUrl+'"></iframe>':""),e.policyHtml=e.policyHtml.replaceAll("{{TrackingLink}}",e.trackingLink),e.policyHtml=r(e.policyHtml)(e)},e.partner=scope.currentScope.chapter.partner?scope.currentScope.chapter.partner:scope.currentScope.network.partner,e.network=scope.currentScope.network,e.chapter=scope.currentScope.chapter,e.cookieManager=0,e.partner.settings.dataPrivacyUrl&&(n.location.href=e.partner.settings.dataPrivacyUrl),scope.currentScope.chapter&&scope.currentScope.chapter.settings&&(scope.currentScope.chapter.settings.piwikBaseUrl&&(e.matomoOptOutUrl=a.trustAsResourceUrl(scope.currentScope.chapter.settings.piwikBaseUrl+"index.php?module=CoreAdminHome&action=optOut&language=de")),scope.currentScope.chapter.settings.configurations.externalMediaConsentConfiguration&&(e.cookieManager=scope.currentScope.chapter.settings.configurations.externalMediaConsentConfiguration.Manager)),e.trackingLink=scope.currentScope.chapter.path,e.trackingLink.endsWith("/")||(e.trackingLink+="/"),e.trackingLink+="optout",u.getConfigurationsData("privacy_policy_markdown").then(function(s){if(s.chapterConfiguration&&s.chapterConfiguration.privacy_policy_markdown)return e.policyHtml=g.toHtml(s.chapterConfiguration.privacy_policy_markdown),void e.updatePolicyHtml();if(s.networkConfiguration.privacy_policy_markdown)e.policyHtml=g.toHtml(s.networkConfiguration.privacy_policy_markdown),e.updatePolicyHtml();else{if("de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("business")>-1){var c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-ik-up-de.html");f(c).then(function(d){e.policyHtml=d,e.updatePolicyHtml()})}"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("business")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-ik-up-en.html"),f(c).then(function(i){e.policyHtml=i,e.updatePolicyHtml()})),"de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("location")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-location-de.html"),f(c).then(function(i){e.policyHtml=i,e.updatePolicyHtml()})),"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("location")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-location-en.html"),f(c).then(function(i){e.policyHtml=i,e.updatePolicyHtml()})),"de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-common-de.html"),f(c).then(function(i){e.policyHtml=i,e.updatePolicyHtml()})),"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/dataPrivacyPolicy-common-en.html"),f(c).then(function(i){e.policyHtml=i,e.updatePolicyHtml()}))}}),e.newsrooms=t("filter")(scope.network.chapters,{managementState:2}),e.scrollTo=function(s){$("body,html").animate({scrollTop:$(s).offset().top-120},1e3)}}]),app.controller("TermsOfUseController",["$scope","$filter","$sce","$window","configurationsService","markdownConverterService","$interpolate","$templateRequest",function(e,t,a,n,u,g,f,r){e.updateTosHtml=function(){var i=new RegExp("{{resource:[a-z]*}}","i"),o=e.tosHtml.match(i);o&&o.forEach(function(h,p,v){var C=h.substring(11,h.length-2);e.tosHtml=e.tosHtml.replaceAll(h,scope.network.resources[C])}),e.tosHtml=e.tosHtml.replaceAll("{{Matomo}}",scope.currentScope.chapter.settings.piwikBaseUrl?'<iframe style="border: 0; height: 200px; width: 600px; " src="'+e.matomoOptOutUrl+'"></iframe>':""),e.tosHtml=e.tosHtml.replaceAll("{{TrackingLink}}",e.trackingLink),e.tosHtml=f(e.tosHtml)(e)},e.newsrooms=t("filter")(scope.network.chapters,{managementState:2}),e.network=scope.currentScope.network,e.chapter=scope.currentScope.chapter,scope.currentScope.chapter&&scope.currentScope.chapter.settings&&scope.currentScope.chapter.settings.piwikBaseUrl&&(e.matomoOptOutUrl=a.trustAsResourceUrl(scope.currentScope.chapter.settings.piwikBaseUrl+"index.php?module=CoreAdminHome&action=optOut&language=de")),e.trackingLink="/optout",u.getConfigurationsData("terms_of_service_markdown").then(function(s){if(s.chapterConfiguration&&s.chapterConfiguration.terms_of_service_markdown)return e.tosHtml=g.toHtml(s.chapterConfiguration.terms_of_service_markdown),void e.updateTosHtml();if(s.networkConfiguration.terms_of_service_markdown)e.tosHtml=g.toHtml(s.networkConfiguration.terms_of_service_markdown),e.updateTosHtml();else{if("de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("business")>-1){var c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/termsOfUse-ik-up-de.html");r(c).then(function(d){e.tosHtml=d,e.updateTosHtml()})}"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("business")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/termsOfUse-ik-up-en.html"),r(c).then(function(i){e.tosHtml=i,e.updateTosHtml()})),"de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("location")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/termsOfUse-location-de.html"),r(c).then(function(i){e.tosHtml=i,e.updateTosHtml()})),"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("location")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/termsOfUse-location-en.html"),r(c).then(function(i){e.tosHtml=i,e.updateTosHtml()})),"de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/termsOfUse-common-de.html"),r(c).then(function(i){e.tosHtml=i,e.updateTosHtml()})),"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/termsOfUse-common-en.html"),r(c).then(function(i){e.tosHtml=i,e.updateTosHtml()}))}})}]),app.controller("AccessibilityController",["$scope","$filter","$sce","$window","configurationsService","markdownConverterService","$templateRequest","$interpolate",function(e,t,a,n,u,g,f,r){e.updateAccessibilityHtml=function(){var i=new RegExp("{{resource:[a-z]*}}","i"),o=e.accessibilityHtml.match(i);o&&o.forEach(function(h,p,v){var C=h.substring(11,h.length-2);e.accessibilityHtml=e.accessibilityHtml.replaceAll(h,scope.network.resources[C])}),e.accessibilityHtml=e.accessibilityHtml.replaceAll("{{Matomo}}",scope.currentScope.chapter.settings.piwikBaseUrl?'<iframe style="border: 0; height: 200px; width: 600px; " src="'+e.matomoOptOutUrl+'"></iframe>':""),e.accessibilityHtml=e.accessibilityHtml.replaceAll("{{TrackingLink}}",e.trackingLink),e.accessibilityHtml=r(e.accessibilityHtml)(e)},e.newsrooms=t("filter")(scope.network.chapters,{managementState:2}),e.network=scope.currentScope.network,e.chapter=scope.currentScope.chapter,scope.currentScope.chapter&&scope.currentScope.chapter.settings&&scope.currentScope.chapter.settings.piwikBaseUrl&&(e.matomoOptOutUrl=a.trustAsResourceUrl(scope.currentScope.chapter.settings.piwikBaseUrl+"index.php?module=CoreAdminHome&action=optOut&language=de")),e.trackingLink="/optout",u.getConfigurationsData("accessibility_markdown").then(function(s){if(s.chapterConfiguration&&s.chapterConfiguration.accessibility_markdown)return e.accessibilityHtml=g.toHtml(s.chapterConfiguration.accessibility_markdown),void e.updateAccessibilityHtml();if(s.networkConfiguration.accessibility_markdown)e.accessibilityHtml=g.toHtml(s.networkConfiguration.accessibility_markdown),e.updateAccessibilityHtml();else{if("de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("business")>-1){var c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/accessibility-ik-up-de.html");f(c).then(function(d){e.accessibilityHtml=d,e.updateAccessibilityHtml()})}"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("business")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/accessibility-ik-up-en.html"),f(c).then(function(i){e.accessibilityHtml=i,e.updateAccessibilityHtml()})),"de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("location")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/accessibility-location-de.html"),f(c).then(function(i){e.accessibilityHtml=i,e.updateAccessibilityHtml()})),"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("location")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/accessibility-location-en.html"),f(c).then(function(i){e.accessibilityHtml=i,e.updateAccessibilityHtml()})),"de"==scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/accessibility-common-de.html"),f(c).then(function(i){e.accessibilityHtml=i,e.updateAccessibilityHtml()})),"de"!=scope.currentScope.network.settings.languageCode&&scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&(c=a.getTrustedResourceUrl("/ClientApp/src/legacy-app/termsOfUse/accessibility-common-en.html"),f(c).then(function(i){e.accessibilityHtml=i,e.updateAccessibilityHtml()}))}})}]),app.factory("translationService",["$http","$q","$rootScope","$cacheFactory",function(e,t,a,n){var u=new Map;function f(){var i=a.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==i){var o=a.scope.profile,h=a.scope.network.settings.languagePack.split("-")[0];if(null!=o.activeUserLanguage?.vendorLanguageCode&&h!=o.activeUserLanguage?.vendorLanguageCode)return!0}return!1}var s=async function(i,o){if(null==o)return i.map(function(C){return{source:C,translation:C}});var p=JSON.stringify({textEntries:i,targetVendorLanguageId:o});if(u.has(p))return u.get(p);var v=function(i,o){var h=t.defer(),p=a.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==p&&null!==o){var v=a.scope.profile,C=a.scope.network.settings.languagePack.split("-")[0];if(null!=v.activeUserLanguage?.vendorLanguageCode&&C!=v.activeUserLanguage?.vendorLanguageCode){var A=a.scope.globalSettings.configurations.translationEndpointInfo;return e.post(A.baseUrl+"/api/Translations/vendorbatch",{TenantId:"ab1c0d0b-c2d1-d0ab-1c0d-0ab1c0d0ab1c",Sources:i,IgnoreReplacements:!0,ToVendorLanguageId:o},{headers:{"Content-Type":"application/json",Authorization:"Bearer "+A.token}}).then(function(M){h.resolve(M.data.translations)},function(M){console.log("TRANS FETCH FAIL",M);var T=i.map(function(k){return{source:k,translation:"UNABLE TO TRANSLATE:\n"+k}});return h.resolve(T),h.promise}),h.promise}}var l=i.map(function(M){return{source:M,translation:M}});return h.resolve(l),h.promise}(i,o);return u.set(p,v),v};return{getAvailableTargetLanguages:function(){var i=n.get("targetLanguagesCache");i||(i=n("targetLanguagesCache"));var o=i.get("availableTargetLanguages");if(o)return t.resolve(o);var h=t.defer();return e.get(scope.apiEndpoint+"translations/targetLanguages").then(function(p){var v=p.data;i.put("availableTargetLanguages",v),h.resolve(v)},function(){h.reject()}),h.promise},translate:s,translateByUserLanguageCode:function(i){if(f()){var o=a.scope.network.settings.configurations.apicodoTranslationSystemConfiguration.VendorId,h=a.scope.profile,p=h.activeUserLanguage?.vendorLanguageCode,C=a.scope.globalSettings.configurations.availableVendorLanguages.find(A=>A.id==o).supportedVendorLanguages.find(A=>A.languageCode===p||A.languageISO639Code===p);return s(i,C.id)}return s(i,null)},translateToOrigin:function(i){if(f()){var o=a.scope.network.settings.languagePack.split("-")[0],h=a.scope.network.settings.configurations.apicodoTranslationSystemConfiguration.VendorId,v=a.scope.globalSettings.configurations.availableVendorLanguages.find(C=>C.id==h).supportedVendorLanguages.find(C=>C.languageCode===o||C.languageISO639Code===o);return s(i,v.id)}return s(i,null)}}}]),app.controller("FeedbackController",["$scope","$rootScope","profileService","authService",function(e,t,a,n){e.data=a,e.success=!1,e.feedback={description:""},e.showEmail=!1,"Redesign2024"!=t.scope.currentScope.network.settings.configurations.contentRenderEngine&&(a.getProfile(!0).then(function(u){u.isRegistered||(e.showEmail=!0)}),e.submitForm=function(u){u&&a.insertFeedback(e.feedback).then(function(g){e.success=!0},function(){}).then(function(){})})}]),app.controller("ProfileController",["$interpolate","$scope","profileService","fileUploadService","$location","Upload","$rootScope","translationService",function(e,t,a,n,u,g,f,r){if(t.blurb="About me",t.multiLanguageTranslationSystemIsEnabled=f.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,t.profile=a.profile,t.profileSvc=a,t.web_profile_newsletter=e(scope.currentScope.network.resources.web_profile_newsletter)({chapterName:scope.currentScope.chapter.name}),t.birthdayCalendarVisible=!1,t.staffDirectoryLoad=h=>a.getStaffDirectoryOwned(h),t.staffDirectorySave=a.updateStaffDirectory,t.staffDirectoryLoadAdminEditable=h=>a.getOwnPrivateStaffDirData(h),t.profileSaved=!1,t.blurb=t.profile.about,t.loadingAvatar=!1,t.loadingCover=!1,t.showNewsListOrder=t.profile.isMerkuristJournalist,t.profile.birthdayCalendarData){var c=new Date(t.profile.birthdayCalendarData.birthday);t.profile.birthdayCalendarData.convertedDate=new Date(c.getFullYear(),c.getMonth(),c.getDate()),t.profile.birthdayCalendarData.convertedDate.setMinutes(t.profile.birthdayCalendarData.convertedDate.getMinutes()-t.profile.birthdayCalendarData.convertedDate.getTimezoneOffset())}t.listOflanguages=[];var d=f.scope.network.settings.languagePack.split("-")[0],i=f.scope.network.getResourceOrKeyName("web_translation_use_original");f.scope.network.getResourceOrKeyName("web_translation_select_target_language"),t.listOflanguages.push({vendorLanguageCode:d,nativeName:i}),r.getAvailableTargetLanguages().then(function(h){Object.keys(h).forEach(p=>{t.listOflanguages.push({vendorLanguageCode:p,nativeName:h[p]})}),a.getProfile().then(function(p){t.profile.activeUserLanguage||(t.profile.activeUserLanguage=t.listOflanguages.find(function(A){return A.vendorLanguageCode===d})),p.isRegistered||u.path("/").replace(),t.blurb=p.about;var v=p.guid,C=new Date(t.profile.birthdayCalendarData.birthday);t.birthdayDisplayString=C.setMinutes(C.getMinutes()-C.getTimezoneOffset()).toLocaleDateString("de-DE"),t.$watch("profile.guid",function(){v!==p.guid&&u.path("/")})},function(p){u.path("/").replace()})}),t.deleteAvatar=function(){a.updateAvatar(null)},t.deleteCover=function(){a.updateCover(null)},t.uploadCover=function(h,p){h||!p?h&&(t.loadingCover=!0,g.upload({url:scope.apiEndpoint+"upload",data:{file:h}}).then(function(v){a.updateCover(v.data).then(function(){})},function(v){alert(scope.currentScope.network.getResourceOrKeyName("web_profile_uploadError"))},function(v){t.fileUploadProgress=parseInt(100*v.loaded/v.total)}).finally(function(){t.loadingCover=!1})):alert(scope.currentScope.network.getResourceOrKeyName("web_profile_uploadError"))},t.uploadAvatar=function(h,p){h||!p?h&&(t.loadingAvatar=!0,g.upload({url:scope.apiEndpoint+"upload",data:{file:h}}).then(function(v){a.updateAvatar(v.data).then(function(){})},function(v){alert(scope.currentScope.network.getResourceOrKeyName("web_profile_uploadError"))},function(v){t.fileUploadProgress=parseInt(100*v.loaded/v.total)}).finally(function(){t.loadingAvatar=!1})):alert(scope.currentScope.network.getResourceOrKeyName("web_profile_uploadError"))},t.toggleLocationSelection=function(h){-1===t.profile.locations.indexOf(h)?t.profile.locations.push(h):t.profile.locations.splice(t.profile.locations.indexOf(h),1)},t.toggleUnsubscribe=function(){t.profile.unsubscribe=null===t.profile.unsubscribe?new Date:null},t.submitForm=function(h){if(t.profileSaved=!1,h){if(t.profile.birthdayCalendarData){var p=new Date(t.profile.birthdayCalendarData.birthday);t.profile.birthdayCalendarData.convertedDate=new Date(p.getFullYear(),p.getMonth(),p.getDate()),t.profile.birthdayCalendarData.convertedDate.setMinutes(t.profile.birthdayCalendarData.convertedDate.getMinutes()-t.profile.birthdayCalendarData.convertedDate.getTimezoneOffset());var v=new Date(t.profile.birthdayCalendarData.convertedDate.getFullYear(),t.profile.birthdayCalendarData.convertedDate.getMonth(),t.profile.birthdayCalendarData.convertedDate.getDate());v.setMilliseconds(0),v.setSeconds(0),v.setMinutes(v.getMinutes()-v.getTimezoneOffset()),t.profile.birthdayCalendarData.birthday=v}t.gridApi&&(t.profile.StaffDirectoryData=t.gridApi.getData()),a.updateProfile(t.profile).then(function(C){t.profileSaved=!0,t.birthdayCalendarVisible=!1,t.profile.birthdayCalendarData&&(t.profile.birthdayCalendarData.convertedDate=new Date(t.profile.birthdayCalendarData.birthday)),t.multiLanguageTranslationSystemIsEnabled&&document.location.reload()})}},t.toggleBirthdayCalendar=function(){t.birthdayCalendarVisible=!t.birthdayCalendarVisible}}]),app.factory("profileService",["$rootScope","$http","$q","authService",function(e,t,a,n){var u={};e.$on("authenticationStateChanged",function(){f(!0)});var g=null,f=function(U){if(g||angular.equals({},u)||U){if(g)return g;var m=a.defer();return n.noop().then(function(){t.get(scope.apiEndpoint+"Profiles").then(function(E){angular.copy(E.data,u),u.translatedResources&&(scope.network.resources=u.translatedResources),m.resolve(u)}).catch(function(){m.reject()}).finally(function(){g=null})}).catch(function(){m.reject()}),g=m.promise}var I=a.defer();return I.resolve(u),I.promise};return{updateProfile:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Profiles",U).then(function(m){angular.copy(m.data,u),I.resolve(u)},function(){I.reject()}),I.promise},updateAvatar:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Profiles/Avatar",{guid:U}).then(function(m){u?(u.avatarGuid=m.data.avatarGuid,u.avatarImageUrl=m.data.avatarImageUrl+"?preset=profile-avatar"):angular.copy(m.data,u),I.resolve(u)},function(){I.reject()}),I.promise},updatePartnerAccessAllow:function(){var U=a.defer();return t.post(scope.apiEndpoint+"Profiles/PartnerAccessAllow").then(function(I){angular.copy(I.data,u),U.resolve(u)},function(){U.reject()}),U.promise},fetchExternalAvatar:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Profiles/Avatar/FetchExternal",U).then(function(m){u?(u.avatarGuid=m.data.avatarGuid,u.avatarImageUrl=m.data.avatarImageUrl+"?preset=profile-avatar"):angular.copy(m.data,u),I.resolve(u)},function(){I.reject()}),I.promise},updateCover:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Profiles/Cover",{guid:U}).then(function(m){u?(u.coverGuid=m.data.coverGuid,u.coverImageUrl=m.data.coverImageUrl):angular.copy(m.data,u),I.resolve(u)},function(){I.reject()}),I.promise},getProfile:f,insertFeedback:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Sendmail/Feedback",U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},insertProposedCity:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Sendmail/ProposedCity",U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},profile:u,getPublicProfile:function(U){var I=a.defer();return t.get(scope.apiEndpoint+"profiles/public/"+U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},unsubscribe:function(U){var I=a.defer();return t.put(scope.apiEndpoint+"profiles/unsubscribe/"+U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},updateFavoriteChapter:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Profiles/FavoriteChapter/"+U).then(function(){I.resolve()},function(){I.reject()}),I.promise},updateFavoriteLanguage:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"Profiles/favoriteLanguage/"+U).then(function(){I.resolve()},function(){I.reject()}),I.promise},getPartnerAccessAllowData:function(){var U=a.defer();return t.get(scope.apiEndpoint+"Profiles/PartnerAccessAllowData").then(function(I){U.resolve(I.data)},function(){U.reject()}),U.promise},consentCookies:function(){var U=a.defer();return t.post(scope.apiEndpoint+"profiles/cookiesConsent").then(function(I){U.resolve(I.data)},function(){U.reject()}),U.promise},consentExternalMediaCookies:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"profiles/externalMediaCookiesConsent",U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},contactSnipCreator:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"profiles/contactSnipCreator",U).then(function(m){I.resolve()},function(){I.reject()}),I.promise},getStaffDirectoryPublic:function(U){var I=a.defer();return t.get(scope.apiEndpoint+"profiles/publicstaffdirdata/"+U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},getStaffDirectoryOwned:function(U){var I=a.defer();return t.get(scope.apiEndpoint+"profiles/ownstaffdirdata/"+U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},updateStaffDirectory:function(U,I){var m=a.defer();return t.post(scope.apiEndpoint+"Profiles/staffdirdata/?userId="+U,I).then(function(F){angular.copy(F.data,u),m.resolve(u)},function(){m.reject()}),m.promise},getOwnPrivateStaffDirData:function(U){var I=a.defer();return t.get(scope.apiEndpoint+"profiles/ownnoneditablestaffdirdata/"+U).then(function(m){I.resolve(m.data)},function(){I.reject()}),I.promise},report:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"profiles/report",U).then(function(m){I.resolve(u)},function(){I.reject()}),I.promise},block:function(U){var I=a.defer();return t.post(scope.apiEndpoint+"profiles/block",U).then(function(m){I.resolve(u)},function(){I.reject()}),I.promise}}}]),app.controller("PublicProfileController",["$scope","$rootScope","profileService","articleService","scopeService","$stateParams","$uibModal",function(e,t,a,n,u,g,f){e.targetUserId=g.id,"Redesign2024"!=t.scope.currentScope.network.settings.configurations.contentRenderEngine&&(e.articleLimit=12,e.articleIncrement=12,e.enableUserReports=t.scope.currentScope.chapter.settings.configurations.enableUserReports,e.enableBlockUsers=t.scope.currentScope.chapter.settings.configurations.enableBlockUsers,e.enableUserReportsOrBlockForAll=t.scope.currentScope.chapter.settings.configurations.enableUserReportsOrBlockForAll,e.showReportUser=e.enableUserReports,e.showBlockUser=e.enableBlockUsers,e.enableVerifiedUsers=t.scope.currentScope.chapter.settings.configurations.enableVerifiedUsers,e.showVerifiedUser=!1,e.loadProfile=function(){a.getPublicProfile(g.id).then(function(r){e.aprofile=r,e.aprofile.callback=e.loadProfile,e.staffDirectoryLoad=a.getStaffDirectoryPublic,e.imageContainer=u.getGlobalSettings().blobStorageCdnUrl+"/"+u.getGlobalSettings().blobStorageContainerNameImage+"/",r.isJournalist&&n.getArticlesByAuthor(g.id).then(function(s){e.articles=s}),e.showReportUser=e.enableUserReports&&(!!e.enableUserReportsOrBlockForAll||!e.aprofile.isJournalist),e.showBlockUser=e.enableBlockUsers&&(!!e.enableUserReportsOrBlockForAll||!e.aprofile.isJournalist),e.showVerifiedUser=e.aprofile.isVerifiedUser})},e.loadProfile(),e.reportUser=function(r){f.open({templateUrl:"/ClientApp/src/legacy-app/user/profileReportDialog.html",controller:"ProfileReportDialog",size:"lg",resolve:{profile:function(){return r}}})},e.blockUser=function(r){f.open({templateUrl:"/ClientApp/src/legacy-app/user/profileBlockDialog.html",controller:"ProfileBlockDialog",size:"lg",resolve:{profile:function(){return r}}})})}]),app.controller("ProfileReportDialog",["$scope","profile","profileService",function(e,t,a){e.working=!1,e.error=!1,e.type=-1,e.reportUser=function(){e.working=!0,a.reportProfile({reportedUserGuid:t.guid,reportingReason:e.type}).then(function(){e.working=!1,t.callback&&t.callback(),e.$dismiss()},function(){e.error=!0,e.working=!1,e.$dismiss()})}}]),app.controller("ProfileBlockDialog",["$scope","profile","profileService",function(e,t,a){e.working=!1,e.error=!1,e.type=-1,e.isBlocked=t.isBlockedByCurrentUser,e.blockUser=function(){e.working=!0,a.block({blockedUserGuid:t.guid,blockingReason:e.type}).then(function(){e.working=!1,t.callback&&t.callback(),e.$dismiss()},function(){e.error=!0,e.working=!1,e.$dismiss()})},e.unblockUser=function(){e.working=!0,a.block({blockedUserGuid:t.guid,blockingReason:e.type,performUnblock:!0}).then(function(){e.working=!1,t.callback&&t.callback(),e.$dismiss()},function(){e.error=!0,e.working=!1,e.$dismiss()})}}]),app.controller("UnsubscribeController",["$scope","profileService","$location","$stateParams",function(e,t,a,n){e.unsubscribed=!1,e.email="",a.search().email&&(e.email=a.search().email),e.unsubscribe=function(){t.unsubscribe(n.id).then(function(u){e.unsubscribed=!0,e.success=u},function(){e.unsubscribed=!0,e.success=!1}).then(function(){})}}]),app.component("userBadge",{templateUrl:"/ClientApp/src/legacy-app/user/userBadge.html",bindings:{user:"<",article:"<",snip:"<"},controller:["$state","$scope","$rootScope","scopeService","formatterService","profileService","$uibModal",function(e,t,a,n,u,g,f){var r=this;r.shortDateTimeFormatString=u.getShortDateTimeFormatString(),r.showVerifiedUser=!1,this.$onInit=function(){r.article&&r.article.originChapterSlug&&r.article.originNetworkSlug?n.getNetworkChapter(r.article.originChapterSlug,r.article.originNetworkSlug).then(function(s){r.crossNetworkInfo=s,r.userProfileUrl=s.network.path+("/"===s.chapter.path?"/profile/"+r.user.guid:s.chapter.path+"/profile/"+r.user.guid)}):r.userProfileUrl=a.scope.currentScope.chapter.path+"/profile/"+r.user.guid,r.article&&r.article.originArticle&&(r.originArticlePath=a.scope.currentScope.network.path+n.getChapter(r.article.originChapterSlug).path+r.article.originArticle.path),r.showVerifiedUser=r.user.isVerifiedUser},r.userBadgeImprintDialog=function(){f.open({templateUrl:"/ClientApp/src/legacy-app/user/userBadgeImprintDialog.html",controller:"UserBadgeImprintDialog",size:"lg",resolve:{user:function(){return r.user},article:function(){return r.article}}})}}]}),app.controller("UserBadgeImprintDialog",["$scope","user","article","scopeService","authorService",function(e,t,a,n,u){e.user=t,t.freelance?u.getAuthorImprint(t.guid).then(function(g){e.impressum=g.html}):a&&a.originChapterSlug&&a.originNetworkSlug&&n.getNetworkChapter(a.originChapterSlug,a.originNetworkSlug).then(function(g){e.impressum=g.chapter.partner.settings.frontendImpressum.html})}]),app.controller("UserContactDialog",["$scope","$timeout","snip","profileService",function(e,t,a,n){e.user=a.user,e.content={snipId:a.id,message:""},e.successful=!1,e.contactFailed=!1,e.send=function(){e.content.message&&n.contactSnipCreator(e.content).then(function(){e.successful=!0,t(function(){e.$dismiss()},3e3)},function(){e.successful=!1,e.contactFailed=!0})}}]),app.controller("workflowController",["$scope","$stateParams","$location",function(e,t,a){e.workflowId=t.id,e.preview=void 0!==a.search().preview,1!=a.search().preview&&(e.revisionId=a.search().preview)}]),app.factory("workflowService",["$rootScope","$http","$q","authService",function(e,t,a,n){var f=function(){return scope.apiEndpoint+"workflow/attachment/"};return{getWorkflowTemplate:function(c,d,i,o){var h=a.defer(),p=d?"?preview=true":"";return p?(i&&(p=p+"&articleId="+i),o&&(p=p+"&revisionId="+o)):i&&(p="?articleId="+i),t.get(scope.apiEndpoint+"workflow/template/"+c+p).then(function(v){h.resolve(v.data)},function(){h.reject()}),h.promise},saveWorkflowData:function(c){var d=a.defer();return t.post(scope.apiEndpoint+"workflow/submission",JSON.stringify(c)).then(function(i){d.resolve(i.data)},function(){d.reject()}),d.promise},getWorkflowUploadBaseUrl:f,getEmbeddableWorkflowList:function(){var c=a.defer();return t.get(scope.apiEndpoint+"workflow/list/").then(function(d){c.resolve(d.data)},function(){c.reject()}),c.promise},deleteSubmittedFile:function(c){var d=a.defer();return t.delete(f()+c).then(function(i){d.resolve(!1)},function(i){d.reject("Can not delete file: "+i)}),d}}}]),function(e,t){"use strict";var c,d,a="oculus",n="oculusOptOut",u="oculusLastSuccessfulLocationRequest",g="oculusLastFailedLocationRequest",f="oculusBrowserGuid",r="oculusBrowser",s="oculusSession";try{c=e.localStorage,d=e.sessionStorage}catch{d={removeItem:function(){}},(c={removeItem:function(){}})[n]=!0}var i={BROWSER:-1,SESSION:-2,APP:-3,ARTICLEIMPRESSION:1,SNIPIMPRESSION:2,SPONSOREDARTICLEIMPRESSION:3,ARTICLEREADING:4,SNIPREADING:5,BANNERIMPRESSION:6,PREMIUMBANNERIMPRESSION:7,SPECIALIMPRESSION:8,SPECIALVIEW:9,SPECIALITEMIMPRESSION:10,MARKETRESEARCH:11,SEARCH:13,SPONSOREDARTICLEREADING:14,ARTICLEWORDREADING:15,SPONSOREDARTICLEWORDREADING:16,SURVEYIMPRESSION:17,SURVEYBANNERIMPRESSION:18,SUPERBANNERIMPRESSION:19,ASSETREFERENCEIMPRESSION:20,WORKFLOWIMPRESSION:21},p_SOFT=0,p_HARD=1;function v(k,w){for(var D in k)w.hasOwnProperty(D)||(w[D]=k[D]);return w}function C(k){this.controller=k,this.guid=k.generateGuid(),this.trackingType=i.BROWSER,this.persistent=!0,this.instanceStart=new Date,this.device=0;var w=new MobileDetect(window.navigator.userAgent);this.device=w.tablet()?3:w.phone()?2:1}function A(k){this.controller=k,this.guid=k.generateGuid(),this.browserGuid=k.oculusBrowser.g,this.trackingType=i.SESSION,this.persistent=!0,this.instanceStart=new Date}function x(k){this.controller=k,this.guid=k.generateGuid(),this.sessionGuid=k.oculusSession.g,this.trackingType=i.APP,this.persistent=!0,this.instanceStart=new Date,this.referrer=k.referrer,this.location={lc:-1}}function b(k){this.controller=k,this.guid=k.generateGuid(),this.instanceStart=new Date,this.stopTime=null,this.idleTime=0,this.referrer=k.referrer}function R(k,w,D){this.trackingType=w,this.bundle=typeof D>"u"?null:D,b.call(this,k)}function y(k,w,D,S,U,I){this.trackingType=w,this.trackingType===i.SHIPMENT?(this.originalImpressionThreshold=k.settings.shipmentImpressionThreshold,this.impressionThreshold=k.settings.shipmentImpressionThreshold,this.impressionViewportThreshold=k.settings.shipmentImpressionViewportThreshold):(this.originalImpressionThreshold=k.settings.impressionThreshold,this.impressionThreshold=k.settings.impressionThreshold,this.impressionViewportThreshold=k.settings.impressionViewportThreshold),this.element=D,this.bundle=typeof S>"u"?null:S,this.pushRequestType=typeof U<"u"?U:p_SOFT,this.lastImpressionUpdate=new Date,this.impressionTime=0,this.ignoreImpressionThreshold=!1,this.previousFracs=null,this.focused=!0,k.settings.feedback&&setInterval(function(m){return function(){y.prototype.update.call(m)}}(this),k.settings.feedbackInterval),b.call(this,k),I&&(this.guid=I)}function l(k,w,D,S,U){b.call(this,k);var I=this,m=new Date;this.readedWordCount=0,this.pushRequestType=typeof U<"u"?U:p_SOFT,this.trackingType=w,this.elements=D.map(function(){for(var F=t(this),E=F;E.length;){if("left"===E.css("float")||"right"===E.css("float"))return E[0];E=(F=E).children()}return this}),this.elementsData=new WeakMap,this.unreadedElementsData=new WeakMap,this.readedElementsData=new WeakMap,this.wordCount=0,this.elements.each(function(){var F={threshold:I.controller.settings.readingThreshold,wordCount:t(this).text().replace(/[^\w ]/g,"").trim().split(/\s+/).clean("").length,readedWordCount:0,impressionTime:0};I.wordCount+=F.wordCount,I.elementsData.set(this,F),F.wordCount>0?I.unreadedElementsData.set(this,F):I.readedElementsData.set(this,F)}),this.bundle=typeof S>"u"?null:S,this.lastReadingUpdate=m,this.readingTimeOffset=m,this.readingEnded=null,k.settings.feedback&&setInterval(function(F){return function(){l.prototype.update.call(F)}}(this),k.settings.feedbackInterval)}function M(k,w,D,S){b.call(this,k);var U=this,I=new Date;this.readedWordCount=0,this.trackingType=w,this.elements=D.find("word"),this.elementsData=new WeakMap,this.unreadedElementsData=new WeakMap,this.readedElementsData=new WeakMap,this.readedWords=[],this.wordCount=this.elements.length,this.elements.each(function(m){U.unreadedElementsData.set(this,m+1)}),this.bundle=typeof S>"u"?null:S,this.lastReadingUpdate=I,this.readingTimeOffset=I,this.readingEnded=null,k.settings.feedback&&setInterval(function(m){return function(){M.prototype.update.call(m)}}(this),k.settings.feedbackInterval)}typeof document.hasFocus>"u"&&(document.hasFocus=function(){return"visible"===document.visibilityState}),C.prototype.getData=function(){return{g:this.guid,t:this.trackingType,s:this.instanceStart,e:new Date,d:this.device}},A.prototype.getData=function(){return{g:this.guid,t:this.trackingType,s:this.instanceStart,e:new Date,bg:this.browserGuid}},x.prototype.getData=function(){var k={g:this.guid,t:this.trackingType,s:this.instanceStart,e:new Date,sg:this.sessionGuid,n:this.controller.settings.networkSlug,c:this.controller.settings.chapterSlug,w:screen.width,h:screen.height,r:this.referrer};return v(this.location,k)},b.prototype.start=function(k){this.stopTime&&(this.idleTime+=new Date-this.stopTime,this.stopTime=null)},b.prototype.stop=function(k){this.stopTime||(this.stopTime=new Date)},b.prototype.getData=function(){return{g:this.guid,t:this.trackingType,a:new Date-this.instanceStart-this.idleTime,s:this.instanceStart,e:new Date,r:this.referrer,ag:this.controller.oculusApp.g,oa:this.controller.oculusApp,os:this.controller.oculusSession,ob:this.controller.oculusBrowser}},b.prototype.scroll=function(){},b.prototype.push=function(k){this.controller.push([this],k)},(R.prototype=Object.create(b.prototype)).constructor=R,R.prototype.getData=function(){var k=b.prototype.getData.call(this);return this.bundle&&v(this.bundle,k),k},(y.prototype=Object.create(b.prototype)).constructor=y,y.prototype.start=function(k){2===k&&(this.focused=!0),b.prototype.start.call(this,k),this.lastImpressionUpdate=new Date},y.prototype.stop=function(k){2===k&&(this.focused=!1),b.prototype.stop.call(this,k)},y.prototype.getData=function(){if(this.update(),this.impressionTime<this.impressionThreshold&&!this.ignoreImpressionThreshold)return null;var k=b.prototype.getData.call(this);return this.bundle&&v(this.bundle,k),v({i:this.impressionTime},k)},y.prototype.scroll=function(){this.update(),b.prototype.scroll.call(this)},y.prototype.update=function(){var k=!1;if(!this.stopTime){var w=this.previousFracs,D=this.previousFracs=t(this.element).fracs(),S=new Date,U=!1;if(D.possible>=this.impressionViewportThreshold&&(!w||w.possible<this.impressionViewportThreshold)?(U=!0,this.lastImpressionUpdate=S):D.possible<this.impressionViewportThreshold&&w&&w.possible>=this.impressionViewportThreshold&&(this.impressionThreshold=this.impressionThreshold,U=!0),S-this.lastImpressionUpdate<=this.controller.generalThrottling&&!U)return void(w=D);var I=S-this.lastImpressionUpdate;if(D.possible>=this.impressionViewportThreshold){var m=this.impressionThreshold;if(this.impressionThreshold-=I,this.impressionTime+=I,m>0&&this.impressionThreshold<=0&&(k=!0),this.controller.settings.feedback){var O,F=function(_,P,L){return L=L||"0",(_+="").length>=P?_:new Array(P-_.length+1).join(L)+_},E=Math.floor(this.impressionTime/1e3),V=F(Math.floor(E/60),2,0)+":"+F(E%60,2,0),q=Math.round(this.impressionThreshold/1e3);O=q>0?'<span style="color: #00cdbd">'+q+"</span>":"0",this.feedbackElement||(this.feedbackElement=t('<div style="position: relative; bottom: 0px; right: 0; width: 100%; text-align: right;"><span style="height: 22px; border-top-left-radius: 5px; color: white !important; text-align: right; padding: 5px; background-color: rgba(0, 0, 0, 0.7) !important;"><i class="fa fa-spinner feedbackImpressionThresholdIcon"></i> <span class="feedbackImpressionThresholdString"></span> | <i class="fa fa-eye"></i> <span class="feedbackImpressionTimeString"></span></span></div>'),this.feedbackImpressionThresholdIconElement=this.feedbackElement.find(".feedbackImpressionThresholdIcon"),this.feedbackImpressionThresholdStringElement=this.feedbackElement.find(".feedbackImpressionThresholdString"),this.feedbackImpressionTimeStringElement=this.feedbackElement.find(".feedbackImpressionTimeString"),"IMG"===this.element[0].tagName?t(this.element).after(this.feedbackElement):t(this.element).append(this.feedbackElement)),this.impressionThreshold>0?this.feedbackImpressionThresholdIconElement.removeClass("fa-pulse"):this.feedbackImpressionThresholdIconElement.addClass("fa-pulse"),this.feedbackImpressionThresholdStringElement.html(O),this.feedbackImpressionTimeStringElement.html(V)}}this.lastImpressionUpdate=S,k&&this.controller.requestPush(this,this.pushRequestType)}},y.prototype.click=function(){this.ignoreImpressionThreshold=!0,this.controller.requestPush(this,this.pushRequestType)},(l.prototype=Object.create(b.prototype)).constructor=l,l.prototype.start=function(k){var w=new Date;this.readingTimeOffset=new Date(this.readingTimeOffset.getTime()+(w-this.stopTime)),this.lastReadingUpdate=w,b.prototype.start.call(this,k)},l.prototype.stop=function(k){b.prototype.stop.call(this,k)},l.prototype.getData=function(){this.update();var k=b.prototype.getData.call(this);return this.bundle&&v(this.bundle,k),v({wc:this.wordCount,wr:this.readedWordCount,re:this.readingEnded?this.readingEnded:new Date},k)},l.prototype.update=function(){if(!this.stopTime){var k=this,w=new Date;if(this.lastReadingUpdate<this.startTime)return this.readingTimeOffset=new Date(this.readingTimeOffset+(w-this.lastReadingUpdate)),void(this.lastReadingUpdate=w);var D=w-this.readingTimeOffset,S=w-this.lastReadingUpdate,U=[],I=[];this.elements.each(function(){if(t(this).fracs().possible<k.controller.settings.readingViewportThreshold)k.elementsData.get(this).threshold=k.controller.settings.readingThreshold;else{var _=k.unreadedElementsData.get(this);I.push(this),_&&U.push(this)}});var m=0;I.forEach(function(_){var P=k.elementsData.get(_);P.threshold-=S,P.threshold<0&&(P.impressionTime+=S,m+=P.wordCount-P.readedWordCount)});var F=function(){if(k.controller.settings.feedback){var _=function(P,L,K){return K=K||"0",(P+="").length>=L?P:new Array(L-P.length+1).join(K)+P};I.forEach(function(P){var L=k.elementsData.get(P);t(P).css("background-color","rgba(0, 204, 187, "+L.readedWordCount/L.wordCount/2+")");var K=t(P).css("float");if("left"!==K&&"right"!==K){var B,J=Math.floor(L.impressionTime/1e3),j=_(Math.floor(J/60),2,0)+":"+_(J%60,2,0),Z=Math.round(L.threshold/1e3);B=Z>0?'<span style="color: #00cdbd">'+Z+"</span>":"0";var Q=Math.floor(L.wordCount/(k.controller.settings.readingSpeed/60)),X=_(Math.floor(Q/60),2,0)+":"+_(Q%60,2,0),z=L.readedWordCount+"/"+L.wordCount;L.feedbackElement||(L.feedbackElement=t('<div style="position: absolute; margin-top: -19px; width: 100%;"><progress style="width: 100%;" class="oculus-progress feedbackProgress" value="0" max="'+L.wordCount+'"></progress><div style="padding: 2px; background-color: #eee !important; border-bottom-left-radius: 5px; color: rgba(0, 0, 0, 0.9) !important; border-bottom-right-radius: 5px; text-align: right;"><span title="threshold"><i class="fa fa-spinner feedbackThresholdIcon"></i> <span class="feedbackThresholdString"></span></span> | <span class="fa fa-eye" title="visibility time"> <span class="feedbackImpressionTimeString"></span></span> | <span class="fa fa-clock-o" title="time to read"> <span class="feedbackTimeString"></span></span> | <span class="fa fa-file-text-o" title="words read / words total"> <span class="feedbackParagraphString"></span></span></div></div>'),L.feedbackProgressElement=L.feedbackElement.find(".feedbackProgress"),L.feedbackThresholdIconElement=L.feedbackElement.find(".feedbackThresholdIcon"),L.feedbackThresholdStringElement=L.feedbackElement.find(".feedbackThresholdString"),L.feedbackImpressionTimeStringElement=L.feedbackElement.find(".feedbackImpressionTimeString"),L.feedbackTimeStringElement=L.feedbackElement.find(".feedbackTimeString"),L.feedbackParagraphStringElement=L.feedbackElement.find(".feedbackParagraphString"),t(P).after(L.feedbackElement)),L.threshold>0?L.feedbackThresholdIconElement.removeClass("fa-pulse"):L.feedbackThresholdIconElement.addClass("fa-pulse"),L.feedbackThresholdStringElement.html(B),L.feedbackProgressElement.val(L.readedWordCount),L.feedbackImpressionTimeStringElement.html(j),L.feedbackTimeStringElement.html(X),L.feedbackParagraphStringElement.html(z)}else L.feedbackElement&&L.feedbackElement.hide()})}};if(0===m)this.readingTimeOffset=new Date(this.readingTimeOffset.getTime()+(w-this.lastReadingUpdate)),F();else{var E=Math.round(D*(k.controller.settings.readingSpeed/6e4));E>this.wordCount&&(E=this.wordCount);var V=E-this.readedWordCount;if(V>m&&(V=m),V>0){var q=V;U.forEach(function(_){var P=k.unreadedElementsData.get(_);if(P){var L=P.wordCount-P.readedWordCount;if(!(q>L))return P.readedWordCount+=q,q=0,!1;P.readedWordCount=P.wordCount,q-=L,k.unreadedElementsData.set(_,void 0),k.readedElementsData.get(_,P)}return!0});var O=this.readedWordCount;this.readedWordCount+=V-q,Math.floor(this.readedWordCount/this.wordCount*100/25)>Math.floor(O/this.wordCount*100/25)&&this.controller.requestPush(this,this.pushRequestType),this.readedWordCount===this.wordCount&&(this.readingEnded=w),F()}}this.lastReadingUpdate=w}},(M.prototype=Object.create(b.prototype)).constructor=M,M.prototype.start=function(k){var w=new Date;this.readingTimeOffset=new Date(this.readingTimeOffset.getTime()+(w-this.stopTime)),this.lastReadingUpdate=w,b.prototype.start.call(this,k)},M.prototype.stop=function(k){b.prototype.stop.call(this,k)},M.prototype.getData=function(){this.update();var k=b.prototype.getData.call(this);return this.bundle&&v(this.bundle,k),v({wc:this.wordCount,wr:this.readedWordCount,ws:this.readedWords,re:this.readingEnded?this.readingEnded:new Date},k)},M.prototype.update=function(){if(!this.stopTime){var k=this,w=new Date;if(this.lastReadingUpdate<this.startTime)return this.readingTimeOffset=new Date(this.readingTimeOffset+(w-this.lastReadingUpdate)),void(this.lastReadingUpdate=w);var D=w-this.readingTimeOffset,S=[],U=[];this.elements.each(function(){if(!(t(this).fracs().possible<k.controller.settings.readingViewportThreshold)){var O=k.unreadedElementsData.get(this);U.push(this),O&&S.push(this)}});var I=0;U.forEach(function(O){k.unreadedElementsData.get(O)&&I++});var m=function(){k.controller.settings.feedback&&U.forEach(function(O){k.readedElementsData.get(O)&&("rgba(0, 0, 0, 0)"===t(O).css("background-color")||"transparent"===t(O).css("background-color"))&&t(O).css("background-color","rgba(0, 205, 189, 0.2)")})};if(0===I)this.readingTimeOffset=new Date(this.readingTimeOffset.getTime()+(w-this.lastReadingUpdate)),m();else{var F=Math.round(D*(k.controller.settings.readingSpeed/6e4));F>this.wordCount&&(F=this.wordCount);var E=F-this.readedWordCount;if(E>I&&(E=I),E>0){var V=E;S.every(function(O){var _=k.unreadedElementsData.get(O);return k.unreadedElementsData.set(O,void 0),k.readedElementsData.set(O,_),k.readedWords.push(_),0!=--V});var q=this.readedWordCount;this.readedWordCount+=E-V,Math.floor(this.readedWordCount/this.wordCount*100/25)>Math.floor(q/this.wordCount*100/25)&&this.controller.requestPush(this,this.pushRequestType),this.readedWordCount===this.wordCount&&(this.readingEnded=w),m()}}this.lastReadingUpdate=w}},e.Oculus=function T(k){var w=this;this.settings=v({softPushThrottling:300,generalThrottling:250,navigationThrottling:1500,saveInterval:2e3,idleTimeout:5e3,feedback:!1,feedbackInterval:300,impressionThreshold:3e3,impressionViewportThreshold:.5,shipmentImpressionThreshold:2e3,shipmentImpressionViewportThreshold:.5,readingSpeed:400,readingThreshold:2e3,readingViewportThreshold:.5,locationRequestEnable:!0,locationRequestSuccessThrottleDays:14,locationRequestFailedThrottleDays:30},k),this.referrer=document.referrer,this.generateGuid=function(){var W,ae=this.crypto||this.msCrypto;if(!W&&ae&&ae.getRandomValues){var oe=new Uint8Array(16);W=function(){return ae.getRandomValues(oe),oe}}if(!W){var le=new Array(16);W=function(){for(var re,se=0;16>se;se++)!(3&se)&&(re=4294967296*Math.random()),le[se]=re>>>((3&se)<<3)&255;return le}}for(var ge="function"==typeof this.Buffer?this.Buffer:Array,de=[],fe={},ue=0;256>ue;ue++)de[ue]=(ue+256).toString(16).substr(1),fe[de[ue]]=ue;return function Y(re,se,ne){var ie=se&&ne||0;"string"==typeof re&&(se="binary"==re?new ge(16):null,re=null);var ce=(re=re||{}).random||(re.rng||W)();if(ce[6]=15&ce[6]|64,ce[8]=63&ce[8]|128,se)for(var pe=0;16>pe;pe++)se[ie+pe]=ce[pe];return se||function G(re,se){var ne=se||0;return de[re[ne++]]+de[re[ne++]]+de[re[ne++]]+de[re[ne++]]+"-"+de[re[ne++]]+de[re[ne++]]+"-"+de[re[ne++]]+de[re[ne++]]+"-"+de[re[ne++]]+de[re[ne++]]+"-"+de[re[ne++]]+de[re[ne++]]+de[re[ne++]]+de[re[ne++]]+de[re[ne++]]+de[re[ne++]]}(ce)}}.call(window),this.settings.feedback?(t(document.body).prepend('<canvas id="oculus-outline" width="200" height="200" style="position: fixed; right: 0; bottom: 0px;"></canvas>'),t("#oculus-outline").fracs("outline",{crop:!0,styles:[{selector:"p,div.article",fillStyle:"rgb(220,220,220)"},{selector:"h1,h2,h3,.subheader",fillStyle:"rgb(165,204,39)"},{selector:"img,.bigpicture",fillStyle:"rgb(250,250,150)"},{selector:".shipment",fillStyle:"rgb(204,0,0)"}]})):t("#oculus-outline").remove();var S=[];if(c[r])this.oculusBrowser=JSON.parse(c[r]);else{var U=new C(this);c[f]&&(U.guid=c[f]),c[r]=JSON.stringify(U.getData()),S.push(U),this.oculusBrowser=U.getData()}if(d[s])this.oculusSession=JSON.parse(d[s]);else{var I=new A(this);d[s]=JSON.stringify(I.getData()),S.push(I),this.oculusSession=I.getData()}var m=new x(this);this.oculusApp=m.getData(),S.push(m);var F=function(){var G=c[a],Y=null;try{Y=JSON.parse(G)}catch{}return jQuery.isArray(Y)&&0!==Y.length?Y:[]},E=function(G){for(var Y=F(),W=[],te=0;te<G.length;te++){var ae=G[te].getData();ae&&(W.push(ae),Y.some(function(oe){return function(le,ge,de){return le.g===oe.g&&(de[ge]=oe,!0)}}(ae))||Y.push(ae))}return c[a]=JSON.stringify(Y),W};this.push=function(G,Y){var W;if(G?W=E(G):(E(S),W=F()),0!==W.length){var te={clientTime:new Date,data:W};if(!c[n]){var ae=new XMLHttpRequest;ae.withCredentials=!0;var oe=scope.apiEndpoint+"oculus/v2";ae.open("POST",oe,!0),ae.setRequestHeader("Content-type","application/json; charset=utf-8"),ae.onreadystatechange=function(){ae.readyState===XMLHttpRequest.DONE&&(200===ae.status&&function(G){for(var Y=F(),W=0;W<G.length;W++)Y.some(function(te){return function(ae,oe,le){return ae.g===te.g&&(le.splice(oe,1),!0)}}(G[W]));c[a]=JSON.stringify(Y)}(W),Y&&Y())},ae.send(JSON.stringify(te))}}else Y&&Y()};var q,O=[];this.requestPush=function(G,Y){q&&(clearTimeout(q),q=null),Y===p_SOFT?(O.push(G),q=setTimeout(function(){w.push(O),O.length=0},this.settings.softPushThrottling)):this.push()},this.navigate=function(G){this.referrer=G;for(var Y=[],W=[],te=[],ae=0;ae<S.length;ae++)te.push(S[ae]),S[ae].persistent?W.push(S[ae]):Y.push(S[ae]);for(S.length=0,ae=0;ae<W.length;ae++)S.push(W[ae]);setTimeout(function(){E(te),Y.length=0},k.navigationThrottling)};var _=!0,P=function(Y){_&&(document.hasFocus()||-1!==navigator.userAgent.indexOf("FBIOS")?Y.stop(0):Y.stop(2)),S.push(Y)};this.updateLocation=function(){if(this.settings.locationRequestEnable){var Y=c[g]?this.settings.locationRequestFailedThrottleDays:this.settings.locationRequestSuccessThrottleDays,W=c[g]?c[g]:c[u];if(W&&(te=new Date,ae=new Date(parseInt(W)),Math.round((te-ae)/864e5)<Y))return void(this.oculusApp.location={lc:-2});navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition&&navigator.geolocation.getCurrentPosition(function(te){this.oculusApp.location={lc:0,lt:new Date(te.timestamp),lac:te.coords.accuracy,la:te.coords.altitude,laac:te.coords.altitudeAccuracy,lh:te.coords.heading,llo:te.coords.longitude,lla:te.coords.latitude,ls:te.coords.speed},c.removeItem(g),c[u]=(new Date).getTime()},function(te){this.oculusApp.location={lc:te.code},c[g]=(new Date).getTime(),c.removeItem(u)})}var te,ae},this.trackArticleReading=function(G,Y){var W=new l(this,i.ARTICLEREADING,G,Y);return P(W),W},this.trackSponsoredArticleReading=function(G,Y){var W=new l(this,i.SPONSOREDARTICLEREADING,G,Y);return P(W),W},this.trackSnipReading=function(G,Y){var W=new l(this,i.SNIPREADING,G,Y);return P(W),W},this.trackArticleImpression=function(G,Y){var W=new y(this,i.ARTICLEIMPRESSION,G,Y,p_SOFT);return P(W),W},this.trackSnipImpression=function(G,Y){var W=new y(this,i.SNIPIMPRESSION,G,Y,p_SOFT);return P(W),W},this.trackSponsoredArticleImpression=function(G,Y){var W=new y(this,i.SPONSOREDARTICLEIMPRESSION,G,Y,p_SOFT);return P(W),W},this.trackSpecialImpression=function(G,Y){var W=new y(this,i.SPECIALIMPRESSION,G,Y,p_SOFT);return P(W),W},this.trackSpecialView=function(G){var Y=new R(this,i.SPECIALVIEW,G);return P(Y),Y},this.trackSpecialItemImpression=function(G,Y){var W=new y(this,i.SPECIALITEMIMPRESSION,G,Y,p_HARD);return P(W),W},this.trackBanner=function(G,Y){var W=new y(this,i.BANNERIMPRESSION,G,Y,p_HARD);return P(W),W},this.trackPremiumBanner=function(G,Y){var W=new y(this,i.PREMIUMBANNERIMPRESSION,G,Y,p_HARD);return P(W),W},this.trackSuperBanner=function(G,Y){var W=new y(this,i.SUPERBANNERIMPRESSION,G,Y,p_HARD);return P(W),W},this.trackMarketResearch=function(G,Y){var W=new y(this,i.MARKETRESEARCH,G,Y,p_HARD);return W.ignoreImpressionThreshold=!0,P(W),W},this.trackSearch=function(G,Y){var W=new y(this,i.SEARCH,G,Y,p_SOFT);return P(W),W},this.trackSurveyImpression=function(G,Y){var W=new y(this,i.SURVEYIMPRESSION,G,Y,p_HARD);return P(W),W},this.trackSurveyBannerImpression=function(G,Y){var W=new y(this,i.SURVEYBANNERIMPRESSION,G,Y,p_HARD);return P(W),W},this.trackAssetReferenceImpression=function(G,Y){var W=new y(this,i.ASSETREFERENCEIMPRESSION,G,Y,p_SOFT);return P(W),W},this.trackWorkflowImpression=function(G,Y){var W=new y(this,i.WORKFLOWIMPRESSION,G,Y,p_SOFT);return P(W),W},window.addEventListener("unload",function(){w.push()});var X,L=function(){E(S)},K=null,Z=function(G){if(!_){K&&(clearInterval(K),K=null);for(var Y=0;Y<S.length;Y++)S[Y].stop&&S[Y].stop(G);_=!0,2===G&&w.push()}},B=function(){Z(1)},Q=function(G){if(_){K||(K=setInterval(L,k.saveInterval));for(var Y=0;Y<S.length;Y++)S[Y].start&&S[Y].start(G);_=!1}},z=!1,N=function(){z||(z=!0,X&&clearTimeout(X),X=setTimeout(B,k.idleTimeout),Q(1),setTimeout(function(){z=!1},k.generalThrottling))};t(document).mousemove(N),t(document).keypress(N);var H=!1,ee=function(){if(!H){H=!0;for(var G=0;G<S.length;G++)S[G].scroll&&setTimeout(function(Y){return function(){Y.scroll()}}(S[G]),10*G);setTimeout(function(){H=!1},k.generalThrottling),N()}};t(document).scroll(ee),this.addScrollContainer=function(G){t(G).scroll(ee)},window.addEventListener("blur",function(){Z(2)}),window.addEventListener("focus",function(){Q(2)}),document.hasFocus()||-1!==navigator.userAgent.indexOf("FBIOS")?(Q(),N()):Z()}}(window,jQuery),function(){"use strict";function e(m,F){return typeof m===F}function t(m,F){return m instanceof F}function a(m){return m&&m.nodeType}function n(m){return a(m)?m:t(m,x)?m[0]:void 0}function u(m,F,E){return x.each(m,function(V,q){E=F.call(q,E,V,q)}),E}function g(m,F,E){var V,q,O;if(m===F)return!0;if(!m||!F||m.constructor!==F.constructor)return!1;for(V=0,q=E.length;q>V;V+=1)if(m[O=E[V]]&&l(m[O].equals)&&!m[O].equals(F[O])||m[O]!==F[O])return!1;return!0}function f(m,F,E,V){this.left=k(m),this.top=k(F),this.width=k(E),this.height=k(V),this.right=this.left+this.width,this.bottom=this.top+this.height}function r(m,F,E,V){this.visible=m||0,this.viewport=F||0,this.possible=E||0,this.rects=V&&y({},V)||null}function s(m,F){this.els=m,this.viewport=F}function c(m,F,E){var V;return x.inArray(E,D)>=0?V=f.ofElement(m):x.inArray(E,S)>=0&&(V=r.of(m,F)),V?V[E]:0}function d(m,F){return m.val-F.val}function i(m,F){return F.val-m.val}function o(m){var F=f.ofContent(m,!0),E=f.ofViewport(m,!0),V=F.width-E.width,q=F.height-E.height;this.content=F,this.viewport=E,this.width=0>=V?null:E.left/V,this.height=0>=q?null:E.top/q,this.left=E.left,this.top=E.top,this.right=F.right-E.right,this.bottom=F.bottom-E.bottom}function h(m){this.el=m||window}function p(m,F){this.context=m,this.viewport=F,this.init()}function v(m,F,E,V){this.context=new s(m,F),this.property=E,this.descending=V,this.init()}function C(m){m&&m!==window&&m!==document?(this.context=m,this.$autoTarget=x(m)):this.context=window,this.init()}var x=jQuery,b=x(window),R=x(document),y=x.extend,l=x.isFunction,M=Math.max,T=Math.min,k=Math.round,w=function(){var m={},F=1;return function(E){return E?(m[E]||(m[E]=F,F+=1),m[E]):0}}();y(f.prototype,{equals:function(m){return g(this,m,["left","top","width","height"])},area:function(){return this.width*this.height},relativeTo:function(m){return new f(this.left-m.left,this.top-m.top,this.width,this.height)},intersection:function(m){if(!t(m,f))return null;var F=M(this.left,m.left),E=T(this.right,m.right),V=M(this.top,m.top),O=E-F,_=T(this.bottom,m.bottom)-V;return O>=0&&_>=0?new f(F,V,O,_):null},envelope:function(m){if(!t(m,f))return this;var F=T(this.left,m.left),E=M(this.right,m.right),V=T(this.top,m.top);return new f(F,V,E-F,M(this.bottom,m.bottom)-V)}}),y(f,{ofContent:function(m,F){return m&&m!==document&&m!==window?F?new f(0,0,m.scrollWidth,m.scrollHeight):new f(m.offsetLeft-m.scrollLeft,m.offsetTop-m.scrollTop,m.scrollWidth,m.scrollHeight):new f(0,0,R.width(),R.height())},ofViewport:function(m,F){return m&&m!==document&&m!==window?F?new f(m.scrollLeft,m.scrollTop,m.clientWidth,m.clientHeight):new f(m.offsetLeft,m.offsetTop,m.clientWidth,m.clientHeight):new f(b.scrollLeft(),b.scrollTop(),b.width(),b.height())},ofElement:function(m){var F=x(m);if(!F.is(":visible"))return null;var E=F.offset();return new f(E.left,E.top,F.outerWidth(),F.outerHeight())}}),y(r.prototype,{equals:function(m){return this.fracsEqual(m)&&this.rectsEqual(m)},fracsEqual:function(m){return g(this,m,["visible","viewport","possible"])},rectsEqual:function(m){return g(this.rects,m.rects,["document","element","viewport"])}}),y(r,{of:function(m,F){var E,V,q;return m=a(m)&&f.ofElement(m)||m,F=a(F)&&f.ofViewport(F)||F||f.ofViewport(),m instanceof f&&(E=m.intersection(F))?(V=E.area(),q=T(m.width,F.width)*T(m.height,F.height),new r(V/m.area(),V/F.area(),V/q,{document:E,element:E.relativeTo(m),viewport:E.relativeTo(F)})):new r}});var D=["width","height","left","right","top","bottom"],S=["possible","visible","viewport"];y(s.prototype,{sorted:function(m,F){var E=this.viewport;return x.map(this.els,function(V){return{el:V,val:c(V,E,m)}}).sort(F?i:d)},best:function(m,F){return this.els.length?this.sorted(m,F)[0]:null}}),y(o.prototype,{equals:function(m){return g(this,m,["width","height","left","top","right","bottom","content","viewport"])}}),y(h.prototype,{equals:function(m){return g(this,m,["el"])},scrollState:function(){return new o(this.el)},scrollTo:function(m,F,E){var V=x(this.el===window?"html,body":this.el);m=m||0,F=F||0,E=isNaN(E)?1e3:E,V.stop(!0).animate({scrollLeft:m,scrollTop:F},E)},scroll:function(m,F,E){var V=this.el===window?b:x(this.el);m=m||0,F=F||0,this.scrollTo(V.scrollLeft()+m,V.scrollTop()+F,E)},scrollToRect:function(m,F,E,V){this.scrollTo(m.left-(F=F||0),m.top-(E=E||0),V)},scrollToElement:function(m,F,E,V){var q=f.ofElement(m).relativeTo(f.ofContent(this.el));this.scrollToRect(q,F,E,V)}});var U={init:function(){this.callbacks=x.Callbacks("memory unique"),this.currVal=null,this.prevVal=null,this.checkProxy=x.proxy(this.check,this),this.autoCheck()},bind:function(m){this.callbacks.add(m)},unbind:function(m){m?this.callbacks.remove(m):this.callbacks.empty()},trigger:function(){this.callbacks.fireWith(this.context,[this.currVal,this.prevVal])},check:function(m){var F=this.updatedValue(m);return void 0!==F&&(this.prevVal=this.currVal,this.currVal=F,this.trigger(),!0)},$autoTarget:b,autoEvents:"load resize scroll",autoCheck:function(m){this.$autoTarget[!1===m?"off":"on"](this.autoEvents,this.checkProxy)}};y(p.prototype,U,{updatedValue:function(){var m=r.of(this.context,this.viewport);return this.currVal&&this.currVal.equals(m)?void 0:m}}),y(v.prototype,U,{updatedValue:function(){var m=this.context.best(this.property,this.descending);return m&&this.currVal!==(m=m.val>0?m.el:null)?m:void 0}}),y(C.prototype,U,{updatedValue:function(){var m=new o(this.context);return this.currVal&&this.currVal.equals(m)?void 0:m}});var I="fracs";!function A(m,F){function E(j,Z,B,Q){return B=P(B)?B.apply(j,Z):B,P(Q[B])?Q[B].apply(j,Z):void O.error('Method "'+B+'" does not exist on jQuery.'+m)}function V(j){j&&(_(K,j.statics),_(J,j.methods)),K.modplug=V}var q=[].slice,O=jQuery,_=O.extend,P=O.isFunction,L=_({},F),K=function j(){return E(this,q.call(arguments),L.defaultStatic,j)},J=function j(Z){return P(j[Z])?j[Z].apply(this,q.call(arguments,1)):E(this,q.call(arguments),L.defaultMethod,j)};V.prev={statics:O[m],methods:O.fn[m]},V(F),O[m]=K,O.fn[m]=J}(I,{statics:{version:"0.15.1",Rect:f,Fractions:r,Group:s,ScrollState:o,Viewport:h,FracsCallbacks:p,GroupCallbacks:v,ScrollStateCallbacks:C,fracs:function(m,F){return r.of(m,F)}},methods:{content:function(m){return this.length?f.ofContent(this[0],m):null},envelope:function(){return u(this,function(m){var F=f.ofElement(this);return m?m.envelope(F):F})},fracs:function(m,F,E){e(m,"string")||(E=F,F=m,m=null),l(F)||(E=F,F=null),E=n(E);var V=I+".fracs."+w(E);return"unbind"===m?this.each(function(){var q=x(this).data(V);q&&q.unbind(F)}):"check"===m?this.each(function(){var q=x(this).data(V);q&&q.check()}):l(F)?this.each(function(){var q=x(this),O=q.data(V);O||(O=new p(this,E),q.data(V,O)),O.on(F)}):this.length?r.of(this[0],E):null},intersection:function(){return u(this,function(m){var F=f.ofElement(this);return m?m.intersection(F):F})},max:function(m,F,E){return l(F)||(E=F,F=null),E=n(E),F?(new v(this,E,m,!0).on(F),this):this.pushStack(new s(this,E).best(m,!0).el)},min:function(m,F,E){return l(F)||(E=F,F=null),E=n(E),F?(new v(this,E,m).on(F),this):this.pushStack(new s(this,E).best(m).el)},rect:function(){return this.length?f.ofElement(this[0]):null},scrollState:function(m,F){var E=I+".scrollState";return e(m,"string")||(F=m,m=null),"unbind"===m?this.each(function(){var V=x(this).data(E);V&&V.unbind(F)}):"check"===m?this.each(function(){var V=x(this).data(E);V&&V.check()}):l(F)?this.each(function(){var V=x(this),q=V.data(E);q||(q=new C(this),V.data(E,q)),q.on(F)}):this.length?new o(this[0]):null},scroll:function(m,F,E){return this.each(function(){new h(this).scroll(m,F,E)})},scrollTo:function(m,F,E,V){return x.isNumeric(m)&&(V=E,E=F,F=m,m=null),m=n(m),this.each(function(){m?new h(this).scrollToElement(m,F,E,V):new h(this).scrollTo(F,E,V)})},scrollToThis:function(m,F,E,V){return(V=new h(n(V))).scrollToElement(this[0],m,F,E),this},softLink:function(m,F,E,V){return V=new h(n(V)),this.filter("a[href^=#]").each(function(){var q=x(this);q.on("click",function(){V.scrollToElement(x(q.attr("href"))[0],m,F,E)})})},sort:function(m,F,E){return e(F,"boolean")||(E=F,F=null),E=n(E),this.pushStack(x.map(new s(this,E).sorted(m,!F),function(V){return V.el}))},viewport:function(m){return this.length?f.ofViewport(this[0],m):null}},defaultStatic:"fracs",defaultMethod:"fracs"})}(),function(){"use strict";function e(c,d,i){function o(q,O,_,P,L){q&&(_||P)&&(P&&(y.beginPath(),L?(y.rect(0,0,l.width,q.top),y.rect(0,q.top,q.left,q.height),y.rect(q.right,q.top,l.width-q.right,q.height),y.rect(0,q.bottom,l.width,l.height-q.bottom)):y.rect(q.left,q.top,q.width,q.height),y.fillStyle=P,y.fill()),_&&(y.beginPath(),y.rect(q.left,q.top,q.width,q.height),y.lineWidth=T?Math.max(O,.2/T):O,y.strokeStyle=_,y.stroke()))}function C(){l=g.ofContent(i),M=g.ofViewport(i,!0),T=Math.min(U/l.width,I/l.height),D.crop&&S.attr("width",l.width*T).attr("height",l.height*T),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,S.width(),S.height()),y.scale(T,T),function p(){t.each(D.styles,function(q,O){E(O.selector).each(function(){!function h(q,O,_,P){var L=t(q),K=g.ofElement(q);!K||K.width<=0||K.height<=0||"hidden"===L.css("visibility")||o(K=K.relativeTo(l),O="auto"===O?parseInt(L.css("border-top-width"),10):O,_="auto"===_?L.css("border-top-color"):_,P="auto"===P?L.css("background-color"):P)}(this,O.strokeWidth,O.strokeStyle,O.fillStyle)})})}(),function v(){var q=V&&D.viewportDragStyle?D.viewportDragStyle:D.viewportStyle;o(M,q.strokeWidth,q.strokeStyle,q.fillStyle,D.invertViewport)}()}function A(q){var O=g.ofElement(c);F.scrollTo((q.pageX-O.left)/T-M.width*k,(q.pageY-O.top)/T-M.height*w,D.duration)}function x(q){V=!1,q.preventDefault(),S.css("cursor","pointer").removeClass("dragOn"),t("body").css("cursor","auto"),a.off("mousemove",A),C()}function b(q){var O;D.autoFocus&&(O=g.ofElement(c),k=((q.pageX-O.left)/T-M.left)/M.width,w=((q.pageY-O.top)/T-M.top)/M.height),(!D.autoFocus||0>k||k>1||0>w||w>1)&&(k=D.focusWidth,w=D.focusHeight),V=!0,q.preventDefault(),S.css("cursor","crosshair").addClass("dragOn"),t("body").css("cursor","crosshair"),a.on("mousemove",A).one("mouseup",x),A(q)}if(!c||!t.isFunction(c.getContext))return null;var y=c.getContext("2d");if(!y)return null;i=i||window;var l,M,T,k,w,D=n({},r,d),S=t(c),U=S.attr("width"),I=S.attr("height"),m=t(i),F=new f(i),E=i===window?function(q){return t(q)}:function(q){return m.find(q)},V=!1;(function R(){S.css("cursor","pointer").mousedown(b),m.on("load resize scroll",C),C()})(),this.redraw=C}var t=jQuery,a=t(window),n=t.extend,u=t.fracs,g=u.Rect,f=u.Viewport,r={crop:!1,duration:0,focusWidth:.5,focusHeight:.5,autoFocus:!0,styles:[{selector:"header,footer,section,article",fillStyle:"rgb(230,230,230)"},{selector:"h1,h2,h3,h4",fillStyle:"rgb(255,144,55)"}],viewportStyle:{fillStyle:"rgba(255,144,55,0.3)"},viewportDragStyle:{fillStyle:"rgba(255,144,55,0.5)"},invertViewport:!1},s="fracs.outline";u.modplug({statics:{Outline:e},methods:{outline:function(c,d,i){return"string"!=typeof c&&(i=d,d=c,c=null),i instanceof t&&(i=i[0]),this.each("redraw"===c?function(){var o=t(this).data(s);o&&o.redraw()}:function(){var o=t(this).data(s);o||(o=new e(this,d,i))&&t(this).data(s,o)})}}})}();
(self.webpackChunkClientApp=self.webpackChunkClientApp||[]).push([["main"],{5652:(In,Ze,M)=>{"use strict";M.d(Ze,{eh:()=>b,JP:()=>f,Lt:()=>d,R3:()=>o,oe:()=>S,q6:()=>y,h2:()=>s,rJ:()=>re,Qv:()=>B,gs:()=>pe,Xm:()=>ie});var W=M(5328);const o={lockCount:0,lock(){this.lockCount++},callbacks:[],callEffects(){if(this.lockCount--,this.lockCount<0)throw new Error("Unexpected Effect Call");if(0===this.lockCount){const z=this.callbacks;this.callbacks=[],z.forEach(oe=>oe())}}},P=(z,oe)=>{if(!(z instanceof Object&&oe instanceof Object))return z===oe;const ee=Object.keys(z),he=Object.keys(oe);return ee.length===he.length&&!ee.some(ue=>z[ue]!==oe[ue])};class b extends W.uA{constructor(){super(...arguments),this._pendingContext=this.context}componentWillReceiveProps(oe,ae){this._pendingContext=ae??{}}shouldComponentUpdate(oe,ae){return!P(this.props,oe)||!P(this.state,ae)||!P(this.context,this._pendingContext)}}class f extends b{constructor(){super(...arguments),this._effects=[]}createEffects(){return[]}updateEffects(){}componentWillMount(){o.lock()}componentWillUpdate(oe,ae,ee){o.lock()}componentDidMount(){o.callbacks.push(()=>{this._effects=this.createEffects()}),o.callEffects()}componentDidUpdate(){o.callbacks.push(()=>this.updateEffects()),o.callEffects()}destroyEffects(){this._effects.forEach(oe=>oe.dispose())}componentWillUnmount(){this.destroyEffects()}}class S extends f{constructor(){super(...arguments),this.vDomElement=null}vDomUpdateClasses(){const oe=this.vDomElement,ae=oe.className.length?oe.className.split(" "):[],ee=ae.filter(de=>oe.dxClasses.previous.indexOf(de)<0),he=oe.dxClasses.previous.filter(de=>ae.indexOf(de)<0);ee.forEach(de=>{const ue=oe.dxClasses.removed.indexOf(de);ue>-1?oe.dxClasses.removed.splice(ue,1):oe.dxClasses.added.includes(de)||oe.dxClasses.added.push(de)}),he.forEach(de=>{const ue=oe.dxClasses.added.indexOf(de);ue>-1?oe.dxClasses.added.splice(ue,1):oe.dxClasses.removed.includes(de)||oe.dxClasses.removed.push(de)})}componentDidMount(){const oe=(0,W.UV)(this.$LI,!0);this.vDomElement=oe,super.componentDidMount(),oe.dxClasses=oe.dxClasses||{removed:[],added:[],previous:[]},oe.dxClasses.previous=oe?.className.length?oe.className.split(" "):[]}componentDidUpdate(){super.componentDidUpdate();const oe=this.vDomElement;null!==oe&&(oe.dxClasses.added.forEach(ae=>oe.classList.add(ae)),oe.dxClasses.removed.forEach(ae=>oe.classList.remove(ae)),oe.dxClasses.previous=oe.className.length?oe.className.split(" "):[])}shouldComponentUpdate(oe,ae){const ee=super.shouldComponentUpdate(oe,ae);return ee&&this.vDomUpdateClasses(),ee}}let T=0;const y=function(z){const oe=T++;return{id:oe,defaultValue:z,Provider:class extends W.uA{getChildContext(){return Object.assign(Object.assign({},this.context),{[oe]:this.props.value||z})}render(){return this.props.children}}}};class d{constructor(oe,ae){this.dependency=ae,this.effect=oe,this.destroy=oe()}update(oe){const ae=this.dependency;oe&&(this.dependency=oe),(!oe||oe.some((ee,he)=>ae[he]!==ee))&&(this.dispose(),this.destroy=this.effect())}dispose(){this.destroy&&this.destroy()}}const s=()=>new d(()=>{(0,W.mM)()},[]),a="a runtime error occured! Use Inferno in development environment to find the error.";function _(z){return null===z}function L(z,oe,ae,ee,he,de){const ue=z.childFlags,be=z.children,ve=z.props,le=z.flags;if(1!==ue){if(2===ue)_(ae)?(0,W._M)(be,oe,ee,he,null,de):ae=(ae=U(be,oe,ae,ee,he,de))?ae.nextSibling:null;else if(16===ue)_(ae)?oe.appendChild(document.createTextNode(be)):1!==oe.childNodes.length||3!==ae.nodeType?oe.textContent=be:ae.nodeValue!==be&&(ae.nodeValue=be),ae=null;else if(12&ue){let Ce=!1;for(let ye=0,ge=be.length;ye<ge;++ye){const fe=be[ye];_(ae)||Ce&&(16&fe.flags)>0?(0,W._M)(fe,oe,ee,he,ae,de):ae=(ae=U(fe,oe,ae,ee,he,de))?ae.nextSibling:null,Ce=(16&fe.flags)>0}}if(!(8192&le)){let Ce=null;for(;ae;)Ce=ae.nextSibling,oe.removeChild(ae),ae=Ce}}else!_(oe.firstChild)&&!function C(z,oe){return!!(oe&&oe.dangerouslySetInnerHTML&&oe.dangerouslySetInnerHTML.__html&&function w(z,oe){const ae=document.createElement("i");return ae.innerHTML=oe,ae.innerHTML===z.innerHTML}(z,oe.dangerouslySetInnerHTML.__html))}(oe,ve)&&(oe.textContent="",448&le&&(oe.defaultValue=""))}function G(z,oe,ae){if(3!==ae.nodeType)oe.replaceChild(z.dom=document.createTextNode(z.children),ae);else{const ee=z.children;ae.nodeValue!==ee&&(ae.nodeValue=ee),z.dom=ae}return z.dom}function U(z,oe,ae,ee,he,de){const ue=z.flags|=16384;return 14&ue?function I(z,oe,ae,ee,he,de,ue){const ve=z.ref;let Ce;if(de){const ye=(0,W.EW)(z,z.type,z.props||W.MZ,ee,he,ue);Ce=U(ye.$LI,oe,ae,ye.$CX,he,ue),(0,W.Gg)(ve,ye,ue)}else{const ye=(0,W.zF)((0,W.F1)(z,ee));Ce=U(ye,oe,ae,ee,he,ue),z.children=ye,(0,W.Hq)(z,ue)}return Ce}(z,oe,ae,ee,he,(4&ue)>0,de):481&ue?function N(z,oe,ae,ee,he,de){const ue=z.props,be=z.className,ve=z.flags,le=z.ref;return he=he||(32&ve)>0,1!==ae.nodeType?((0,W.C4)(z,null,ee,he,null,de),oe.replaceChild(z.dom,ae)):(z.dom=ae,L(z,ae,ae.firstChild,ee,he,de),_(ue)||(0,W.vI)(z,ve,ue,ae,he),function u(z){return null==z}(be)?""!==ae.className&&ae.removeAttribute("class"):he?ae.setAttribute("class",be):ae.className=be,(0,W.J4)(le,ae,de)),z.dom}(z,oe,ae,ee,he,de):16&ue?G(z,oe,ae):512&ue?z.dom=ae:8192&ue?function k(z,oe,ae,ee,he,de){const ue=z.children;return 2===z.childFlags?(G(ue,oe,ae),ue.dom):(L(z,oe,ae,ee,he,de),function D(z){let oe,ae;for(;z;){if(oe=z.flags,2033&oe)return z.dom;ae=z.children,z=8192&oe?2===z.childFlags?ae:ae[ae.length-1]:4&oe?ae.$LI:ae}return null}(ue[ue.length-1]))}(z,oe,ae,ee,he,de):(function x(z){throw z||(z=a),new Error(`Inferno Error: ${z}`)}(),null)}function B(z,oe,ae){let ee=oe.firstChild;if(_(ee))(0,W.XX)(z,oe,ae);else{const he=[];for(function h(z){return null===z||!1===z||!0===z||void 0===z}(z)||(ee=U(z,oe,ee,{},!1,he));ee&&(ee=ee.nextSibling);)oe.removeChild(ee);if(he.length>0){let de;for(;void 0!==(de=he.shift());)de()}}oe.$V=z,function g(z){return"function"==typeof z}(ae)&&ae()}var K=M(9446);const J=z=>{var oe,ae;return(null===(oe=z.container)||void 0===oe?void 0:oe.get(0))||(null===(ae=z.item)||void 0===ae?void 0:ae.get(0))};function ie(z,oe,ae){setTimeout(()=>{(0,W.XX)((0,K.n)(z,oe),J(oe))},0)}const re=(z,oe,ae)=>{const ee=oe[z];return!!ee&&"string"!=typeof ee},q=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","border-imageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","fillOpacity","flex","flexGrow","flexNegative","flexOrder","flexPositive","flexShrink","floodOpacity","fontWeight","gridColumn","gridRow","lineClamp","lineHeight","opacity","order","orphans","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),Y=z=>"number"==typeof z||!Number.isNaN(Number(z)),Z=(z,oe)=>q.has(z)?oe:`${oe}px`,Q=/[A-Z]/g,te=z=>z.replace(Q,"-$&").toLowerCase();function pe(z){if(z instanceof Object)return Object.entries(z).reduce((oe,[ae,ee])=>(oe[te(ae)]=Y(ee)?Z(ae,ee):ee,oe),{})}},8189:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>Ke});const W=[0,2e3,1e4,3e4,null];class o{constructor(Se){this._retryDelays=void 0!==Se?[...Se,null]:W}nextRetryDelayInMilliseconds(Se){return this._retryDelays[Se.previousRetryCount]}}var P=M(3308);let b=(()=>{class Pe{}return Pe.Authorization="Authorization",Pe.Cookie="Cookie",Pe})();class f{constructor(Se,Re,Fe){this.statusCode=Se,this.statusText=Re,this.content=Fe}}class S{get(Se,Re){return this.send({...Re,method:"GET",url:Se})}post(Se,Re){return this.send({...Re,method:"POST",url:Se})}delete(Se,Re){return this.send({...Re,method:"DELETE",url:Se})}getCookieString(Se){return""}}class T extends S{constructor(Se,Re){super(),this._innerClient=Se,this._accessTokenFactory=Re}send(Se){var Re=this;return(0,P.A)(function*(){let Fe=!0;Re._accessTokenFactory&&(!Re._accessToken||Se.url&&Se.url.indexOf("/negotiate?")>0)&&(Fe=!1,Re._accessToken=yield Re._accessTokenFactory()),Re._setAuthorizationHeader(Se);const Xe=yield Re._innerClient.send(Se);return Fe&&401===Xe.statusCode&&Re._accessTokenFactory?(Re._accessToken=yield Re._accessTokenFactory(),Re._setAuthorizationHeader(Se),yield Re._innerClient.send(Se)):Xe})()}_setAuthorizationHeader(Se){Se.headers||(Se.headers={}),this._accessToken?Se.headers[b.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&Se.headers[b.Authorization]&&delete Se.headers[b.Authorization]}getCookieString(Se){return this._innerClient.getCookieString(Se)}}class y extends Error{constructor(Se,Re){const Fe=new.target.prototype;super(`${Se}: Status code '${Re}'`),this.statusCode=Re,this.__proto__=Fe}}class d extends Error{constructor(Se="A timeout occurred."){const Re=new.target.prototype;super(Se),this.__proto__=Re}}class c extends Error{constructor(Se="An abort occurred."){const Re=new.target.prototype;super(Se),this.__proto__=Re}}class s extends Error{constructor(Se,Re){const Fe=new.target.prototype;super(Se),this.transport=Re,this.errorType="UnsupportedTransportError",this.__proto__=Fe}}class a extends Error{constructor(Se,Re){const Fe=new.target.prototype;super(Se),this.transport=Re,this.errorType="DisabledTransportError",this.__proto__=Fe}}class u extends Error{constructor(Se,Re){const Fe=new.target.prototype;super(Se),this.transport=Re,this.errorType="FailedToStartTransportError",this.__proto__=Fe}}class h extends Error{constructor(Se){const Re=new.target.prototype;super(Se),this.errorType="FailedToNegotiateWithServerError",this.__proto__=Re}}class g extends Error{constructor(Se,Re){const Fe=new.target.prototype;super(Se),this.innerErrors=Re,this.__proto__=Fe}}var _=M(5574);class x{constructor(){}log(Se,Re){}}x.instance=new x;const w="7.0.14";class D{static isRequired(Se,Re){if(null==Se)throw new Error(`The '${Re}' argument is required.`)}static isNotEmpty(Se,Re){if(!Se||Se.match(/^\s*$/))throw new Error(`The '${Re}' argument should not be empty.`)}static isIn(Se,Re,Fe){if(!(Se in Re))throw new Error(`Unknown ${Fe} value: ${Se}.`)}}class C{static get isBrowser(){return"object"==typeof window&&"object"==typeof window.document}static get isWebWorker(){return"object"==typeof self&&"importScripts"in self}static get isReactNative(){return"object"==typeof window&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function I(Pe,Se){let Re="";return N(Pe)?(Re=`Binary data of length ${Pe.byteLength}`,Se&&(Re+=`. Content: '${function L(Pe){const Se=new Uint8Array(Pe);let Re="";return Se.forEach(Fe=>{Re+=`0x${Fe<16?"0":""}${Fe.toString(16)} `}),Re.substr(0,Re.length-1)}(Pe)}'`)):"string"==typeof Pe&&(Re=`String data of length ${Pe.length}`,Se&&(Re+=`. Content: '${Pe}'`)),Re}function N(Pe){return Pe&&typeof ArrayBuffer<"u"&&(Pe instanceof ArrayBuffer||Pe.constructor&&"ArrayBuffer"===Pe.constructor.name)}function G(Pe,Se,Re,Fe,Xe,tt){return k.apply(this,arguments)}function k(){return(k=(0,P.A)(function*(Pe,Se,Re,Fe,Xe,tt){const vt={},[qe,At]=J();vt[qe]=At,Pe.log(_.$.Trace,`(${Se} transport) sending data. ${I(Xe,tt.logMessageContent)}.`);const Tt=N(Xe)?"arraybuffer":"text",qt=yield Re.post(Fe,{content:Xe,headers:{...vt,...tt.headers},responseType:Tt,timeout:tt.timeout,withCredentials:tt.withCredentials});Pe.log(_.$.Trace,`(${Se} transport) request complete. Response status: ${qt.statusCode}.`)})).apply(this,arguments)}class B{constructor(Se,Re){this._subject=Se,this._observer=Re}dispose(){const Se=this._subject.observers.indexOf(this._observer);Se>-1&&this._subject.observers.splice(Se,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(Re=>{})}}class K{constructor(Se){this._minLevel=Se,this.out=console}log(Se,Re){if(Se>=this._minLevel){const Fe=`[${(new Date).toISOString()}] ${_.$[Se]}: ${Re}`;switch(Se){case _.$.Critical:case _.$.Error:this.out.error(Fe);break;case _.$.Warning:this.out.warn(Fe);break;case _.$.Information:this.out.info(Fe);break;default:this.out.log(Fe)}}}}function J(){let Pe="X-SignalR-User-Agent";return C.isNode&&(Pe="User-Agent"),[Pe,ie(w,re(),C.isNode?"NodeJS":"Browser",q())]}function ie(Pe,Se,Re,Fe){let Xe="Microsoft SignalR/";const tt=Pe.split(".");return Xe+=`${tt[0]}.${tt[1]}`,Xe+=` (${Pe}; `,Xe+=Se&&""!==Se?`${Se}; `:"Unknown OS; ",Xe+=`${Re}`,Xe+=Fe?`; ${Fe}`:"; Unknown Runtime Version",Xe+=")",Xe}function re(){if(!C.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function q(){if(C.isNode)return process.versions.node}function Z(Pe){return Pe.stack?Pe.stack:Pe.message?Pe.message:`${Pe}`}class te extends S{constructor(Se){if(super(),this._logger=Se,typeof fetch>"u"){const Re=require;this._jar=new(Re("tough-cookie").CookieJar),this._fetchType=Re("node-fetch"),this._fetchType=Re("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function Q(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}());if(typeof AbortController>"u"){const Re=require;this._abortControllerType=Re("abort-controller")}else this._abortControllerType=AbortController}send(Se){var Re=this;return(0,P.A)(function*(){if(Se.abortSignal&&Se.abortSignal.aborted)throw new c;if(!Se.method)throw new Error("No method defined.");if(!Se.url)throw new Error("No url defined.");const Fe=new Re._abortControllerType;let Xe;Se.abortSignal&&(Se.abortSignal.onabort=()=>{Fe.abort(),Xe=new c});let vt,tt=null;Se.timeout&&(tt=setTimeout(()=>{Fe.abort(),Re._logger.log(_.$.Warning,"Timeout from HTTP request."),Xe=new d},Se.timeout)),""===Se.content&&(Se.content=void 0),Se.content&&(Se.headers=Se.headers||{},Se.headers["Content-Type"]=N(Se.content)?"application/octet-stream":"text/plain;charset=UTF-8");try{vt=yield Re._fetchType(Se.url,{body:Se.content,cache:"no-cache",credentials:!0===Se.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...Se.headers},method:Se.method,mode:"cors",redirect:"follow",signal:Fe.signal})}catch(Tt){throw Xe||(Re._logger.log(_.$.Warning,`Error from HTTP request. ${Tt}.`),Tt)}finally{tt&&clearTimeout(tt),Se.abortSignal&&(Se.abortSignal.onabort=null)}if(!vt.ok){const Tt=yield pe(vt,"text");throw new y(Tt||vt.statusText,vt.status)}const At=yield pe(vt,Se.responseType);return new f(vt.status,vt.statusText,At)})()}getCookieString(Se){let Re="";return C.isNode&&this._jar&&this._jar.getCookies(Se,(Fe,Xe)=>Re=Xe.join("; ")),Re}}function pe(Pe,Se){let Re;switch(Se){case"arraybuffer":Re=Pe.arrayBuffer();break;case"text":default:Re=Pe.text();break;case"blob":case"document":case"json":throw new Error(`${Se} is not supported.`)}return Re}class z extends S{constructor(Se){super(),this._logger=Se}send(Se){return Se.abortSignal&&Se.abortSignal.aborted?Promise.reject(new c):Se.method?Se.url?new Promise((Re,Fe)=>{const Xe=new XMLHttpRequest;Xe.open(Se.method,Se.url,!0),Xe.withCredentials=void 0===Se.withCredentials||Se.withCredentials,Xe.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===Se.content&&(Se.content=void 0),Se.content&&(N(Se.content)?Xe.setRequestHeader("Content-Type","application/octet-stream"):Xe.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const tt=Se.headers;tt&&Object.keys(tt).forEach(vt=>{Xe.setRequestHeader(vt,tt[vt])}),Se.responseType&&(Xe.responseType=Se.responseType),Se.abortSignal&&(Se.abortSignal.onabort=()=>{Xe.abort(),Fe(new c)}),Se.timeout&&(Xe.timeout=Se.timeout),Xe.onload=()=>{Se.abortSignal&&(Se.abortSignal.onabort=null),Xe.status>=200&&Xe.status<300?Re(new f(Xe.status,Xe.statusText,Xe.response||Xe.responseText)):Fe(new y(Xe.response||Xe.responseText||Xe.statusText,Xe.status))},Xe.onerror=()=>{this._logger.log(_.$.Warning,`Error from HTTP request. ${Xe.status}: ${Xe.statusText}.`),Fe(new y(Xe.statusText,Xe.status))},Xe.ontimeout=()=>{this._logger.log(_.$.Warning,"Timeout from HTTP request."),Fe(new d)},Xe.send(Se.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class oe extends S{constructor(Se){if(super(),typeof fetch<"u"||C.isNode)this._httpClient=new te(Se);else{if(!(typeof XMLHttpRequest<"u"))throw new Error("No usable HttpClient found.");this._httpClient=new z(Se)}}send(Se){return Se.abortSignal&&Se.abortSignal.aborted?Promise.reject(new c):Se.method?Se.url?this._httpClient.send(Se):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(Se){return this._httpClient.getCookieString(Se)}}var ae=function(Pe){return Pe[Pe.None=0]="None",Pe[Pe.WebSockets=1]="WebSockets",Pe[Pe.ServerSentEvents=2]="ServerSentEvents",Pe[Pe.LongPolling=4]="LongPolling",Pe}(ae||{}),ee=function(Pe){return Pe[Pe.Text=1]="Text",Pe[Pe.Binary=2]="Binary",Pe}(ee||{});class he{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class de{constructor(Se,Re,Fe){this._httpClient=Se,this._logger=Re,this._pollAbort=new he,this._options=Fe,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}connect(Se,Re){var Fe=this;return(0,P.A)(function*(){if(D.isRequired(Se,"url"),D.isRequired(Re,"transferFormat"),D.isIn(Re,ee,"transferFormat"),Fe._url=Se,Fe._logger.log(_.$.Trace,"(LongPolling transport) Connecting."),Re===ee.Binary&&typeof XMLHttpRequest<"u"&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[Xe,tt]=J(),vt={[Xe]:tt,...Fe._options.headers},qe={abortSignal:Fe._pollAbort.signal,headers:vt,timeout:1e5,withCredentials:Fe._options.withCredentials};Re===ee.Binary&&(qe.responseType="arraybuffer");const At=`${Se}&_=${Date.now()}`;Fe._logger.log(_.$.Trace,`(LongPolling transport) polling: ${At}.`);const Tt=yield Fe._httpClient.get(At,qe);200!==Tt.statusCode?(Fe._logger.log(_.$.Error,`(LongPolling transport) Unexpected response code: ${Tt.statusCode}.`),Fe._closeError=new y(Tt.statusText||"",Tt.statusCode),Fe._running=!1):Fe._running=!0,Fe._receiving=Fe._poll(Fe._url,qe)})()}_poll(Se,Re){var Fe=this;return(0,P.A)(function*(){try{for(;Fe._running;)try{const Xe=`${Se}&_=${Date.now()}`;Fe._logger.log(_.$.Trace,`(LongPolling transport) polling: ${Xe}.`);const tt=yield Fe._httpClient.get(Xe,Re);204===tt.statusCode?(Fe._logger.log(_.$.Information,"(LongPolling transport) Poll terminated by server."),Fe._running=!1):200!==tt.statusCode?(Fe._logger.log(_.$.Error,`(LongPolling transport) Unexpected response code: ${tt.statusCode}.`),Fe._closeError=new y(tt.statusText||"",tt.statusCode),Fe._running=!1):tt.content?(Fe._logger.log(_.$.Trace,`(LongPolling transport) data received. ${I(tt.content,Fe._options.logMessageContent)}.`),Fe.onreceive&&Fe.onreceive(tt.content)):Fe._logger.log(_.$.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(Xe){Fe._running?Xe instanceof d?Fe._logger.log(_.$.Trace,"(LongPolling transport) Poll timed out, reissuing."):(Fe._closeError=Xe,Fe._running=!1):Fe._logger.log(_.$.Trace,`(LongPolling transport) Poll errored after shutdown: ${Xe.message}`)}}finally{Fe._logger.log(_.$.Trace,"(LongPolling transport) Polling complete."),Fe.pollAborted||Fe._raiseOnClose()}})()}send(Se){var Re=this;return(0,P.A)(function*(){return Re._running?G(Re._logger,"LongPolling",Re._httpClient,Re._url,Se,Re._options):Promise.reject(new Error("Cannot send until the transport is connected"))})()}stop(){var Se=this;return(0,P.A)(function*(){Se._logger.log(_.$.Trace,"(LongPolling transport) Stopping polling."),Se._running=!1,Se._pollAbort.abort();try{yield Se._receiving,Se._logger.log(_.$.Trace,`(LongPolling transport) sending DELETE request to ${Se._url}.`);const Re={},[Fe,Xe]=J();Re[Fe]=Xe;const tt={headers:{...Re,...Se._options.headers},timeout:Se._options.timeout,withCredentials:Se._options.withCredentials};yield Se._httpClient.delete(Se._url,tt),Se._logger.log(_.$.Trace,"(LongPolling transport) DELETE request sent.")}finally{Se._logger.log(_.$.Trace,"(LongPolling transport) Stop finished."),Se._raiseOnClose()}})()}_raiseOnClose(){if(this.onclose){let Se="(LongPolling transport) Firing onclose event.";this._closeError&&(Se+=" Error: "+this._closeError),this._logger.log(_.$.Trace,Se),this.onclose(this._closeError)}}}class ue{constructor(Se,Re,Fe,Xe){this._httpClient=Se,this._accessToken=Re,this._logger=Fe,this._options=Xe,this.onreceive=null,this.onclose=null}connect(Se,Re){var Fe=this;return(0,P.A)(function*(){return D.isRequired(Se,"url"),D.isRequired(Re,"transferFormat"),D.isIn(Re,ee,"transferFormat"),Fe._logger.log(_.$.Trace,"(SSE transport) Connecting."),Fe._url=Se,Fe._accessToken&&(Se+=(Se.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(Fe._accessToken)}`),new Promise((Xe,tt)=>{let qe,vt=!1;if(Re===ee.Text){if(C.isBrowser||C.isWebWorker)qe=new Fe._options.EventSource(Se,{withCredentials:Fe._options.withCredentials});else{const At=Fe._httpClient.getCookieString(Se),Tt={};Tt.Cookie=At;const[qt,wt]=J();Tt[qt]=wt,qe=new Fe._options.EventSource(Se,{withCredentials:Fe._options.withCredentials,headers:{...Tt,...Fe._options.headers}})}try{qe.onmessage=At=>{if(Fe.onreceive)try{Fe._logger.log(_.$.Trace,`(SSE transport) data received. ${I(At.data,Fe._options.logMessageContent)}.`),Fe.onreceive(At.data)}catch(Tt){return void Fe._close(Tt)}},qe.onerror=At=>{vt?Fe._close():tt(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},qe.onopen=()=>{Fe._logger.log(_.$.Information,`SSE connected to ${Fe._url}`),Fe._eventSource=qe,vt=!0,Xe()}}catch(At){return void tt(At)}}else tt(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})})()}send(Se){var Re=this;return(0,P.A)(function*(){return Re._eventSource?G(Re._logger,"SSE",Re._httpClient,Re._url,Se,Re._options):Promise.reject(new Error("Cannot send until the transport is connected"))})()}stop(){return this._close(),Promise.resolve()}_close(Se){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(Se))}}class be{constructor(Se,Re,Fe,Xe,tt,vt){this._logger=Fe,this._accessTokenFactory=Re,this._logMessageContent=Xe,this._webSocketConstructor=tt,this._httpClient=Se,this.onreceive=null,this.onclose=null,this._headers=vt}connect(Se,Re){var Fe=this;return(0,P.A)(function*(){let Xe;return D.isRequired(Se,"url"),D.isRequired(Re,"transferFormat"),D.isIn(Re,ee,"transferFormat"),Fe._logger.log(_.$.Trace,"(WebSockets transport) Connecting."),Fe._accessTokenFactory&&(Xe=yield Fe._accessTokenFactory()),new Promise((tt,vt)=>{let qe;Se=Se.replace(/^http/,"ws");const At=Fe._httpClient.getCookieString(Se);let Tt=!1;if(C.isNode||C.isReactNative){const qt={},[wt,En]=J();qt[wt]=En,Xe&&(qt[b.Authorization]=`Bearer ${Xe}`),At&&(qt[b.Cookie]=At),qe=new Fe._webSocketConstructor(Se,void 0,{headers:{...qt,...Fe._headers}})}else Xe&&(Se+=(Se.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(Xe)}`);qe||(qe=new Fe._webSocketConstructor(Se)),Re===ee.Binary&&(qe.binaryType="arraybuffer"),qe.onopen=qt=>{Fe._logger.log(_.$.Information,`WebSocket connected to ${Se}.`),Fe._webSocket=qe,Tt=!0,tt()},qe.onerror=qt=>{let wt=null;wt=typeof ErrorEvent<"u"&&qt instanceof ErrorEvent?qt.error:"There was an error with the transport",Fe._logger.log(_.$.Information,`(WebSockets transport) ${wt}.`)},qe.onmessage=qt=>{if(Fe._logger.log(_.$.Trace,`(WebSockets transport) data received. ${I(qt.data,Fe._logMessageContent)}.`),Fe.onreceive)try{Fe.onreceive(qt.data)}catch(wt){return void Fe._close(wt)}},qe.onclose=qt=>{if(Tt)Fe._close(qt);else{let wt=null;wt=typeof ErrorEvent<"u"&&qt instanceof ErrorEvent?qt.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",vt(new Error(wt))}}})})()}send(Se){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(_.$.Trace,`(WebSockets transport) sending data. ${I(Se,this._logMessageContent)}.`),this._webSocket.send(Se),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(Se){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(_.$.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(Se)||!1!==Se.wasClean&&1e3===Se.code?Se instanceof Error?this.onclose(Se):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${Se.code} (${Se.reason||"no reason given"}).`)))}_isCloseEvent(Se){return Se&&"boolean"==typeof Se.wasClean&&"number"==typeof Se.code}}class le{constructor(Se,Re={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,D.isRequired(Se,"url"),this._logger=function U(Pe){return void 0===Pe?new K(_.$.Information):null===Pe?x.instance:void 0!==Pe.log?Pe:new K(Pe)}(Re.logger),this.baseUrl=this._resolveUrl(Se),(Re=Re||{}).logMessageContent=void 0!==Re.logMessageContent&&Re.logMessageContent,"boolean"!=typeof Re.withCredentials&&void 0!==Re.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");Re.withCredentials=void 0===Re.withCredentials||Re.withCredentials,Re.timeout=void 0===Re.timeout?1e5:Re.timeout;let Fe=null,Xe=null;if(C.isNode){const tt=require;Fe=tt("ws"),Xe=tt("eventsource")}!C.isNode&&typeof WebSocket<"u"&&!Re.WebSocket?Re.WebSocket=WebSocket:C.isNode&&!Re.WebSocket&&Fe&&(Re.WebSocket=Fe),!C.isNode&&typeof EventSource<"u"&&!Re.EventSource?Re.EventSource=EventSource:C.isNode&&!Re.EventSource&&typeof Xe<"u"&&(Re.EventSource=Xe),this._httpClient=new T(Re.httpClient||new oe(this._logger),Re.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=Re,this.onreceive=null,this.onclose=null}start(Se){var Re=this;return(0,P.A)(function*(){if(D.isIn(Se=Se||ee.Binary,ee,"transferFormat"),Re._logger.log(_.$.Debug,`Starting connection with transfer format '${ee[Se]}'.`),"Disconnected"!==Re._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(Re._connectionState="Connecting",Re._startInternalPromise=Re._startInternal(Se),yield Re._startInternalPromise,"Disconnecting"===Re._connectionState){const Fe="Failed to start the HttpConnection before stop() was called.";return Re._logger.log(_.$.Error,Fe),yield Re._stopPromise,Promise.reject(new c(Fe))}if("Connected"!==Re._connectionState){const Fe="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return Re._logger.log(_.$.Error,Fe),Promise.reject(new c(Fe))}Re._connectionStarted=!0})()}send(Se){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ye(this.transport)),this._sendQueue.send(Se))}stop(Se){var Re=this;return(0,P.A)(function*(){return"Disconnected"===Re._connectionState?(Re._logger.log(_.$.Debug,`Call to HttpConnection.stop(${Se}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===Re._connectionState?(Re._logger.log(_.$.Debug,`Call to HttpConnection.stop(${Se}) ignored because the connection is already in the disconnecting state.`),Re._stopPromise):(Re._connectionState="Disconnecting",Re._stopPromise=new Promise(Fe=>{Re._stopPromiseResolver=Fe}),yield Re._stopInternal(Se),void(yield Re._stopPromise))})()}_stopInternal(Se){var Re=this;return(0,P.A)(function*(){Re._stopError=Se;try{yield Re._startInternalPromise}catch{}if(Re.transport){try{yield Re.transport.stop()}catch(Fe){Re._logger.log(_.$.Error,`HttpConnection.transport.stop() threw error '${Fe}'.`),Re._stopConnection()}Re.transport=void 0}else Re._logger.log(_.$.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})()}_startInternal(Se){var Re=this;return(0,P.A)(function*(){let Fe=Re.baseUrl;Re._accessTokenFactory=Re._options.accessTokenFactory,Re._httpClient._accessTokenFactory=Re._accessTokenFactory;try{if(Re._options.skipNegotiation){if(Re._options.transport!==ae.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");Re.transport=Re._constructTransport(ae.WebSockets),yield Re._startTransport(Fe,Se)}else{let Xe=null,tt=0;do{if(Xe=yield Re._getNegotiationResponse(Fe),"Disconnecting"===Re._connectionState||"Disconnected"===Re._connectionState)throw new c("The connection was stopped during negotiation.");if(Xe.error)throw new Error(Xe.error);if(Xe.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(Xe.url&&(Fe=Xe.url),Xe.accessToken){const vt=Xe.accessToken;Re._accessTokenFactory=()=>vt,Re._httpClient._accessToken=vt,Re._httpClient._accessTokenFactory=void 0}tt++}while(Xe.url&&tt<100);if(100===tt&&Xe.url)throw new Error("Negotiate redirection limit exceeded.");yield Re._createTransport(Fe,Re._options.transport,Xe,Se)}Re.transport instanceof de&&(Re.features.inherentKeepAlive=!0),"Connecting"===Re._connectionState&&(Re._logger.log(_.$.Debug,"The HttpConnection connected successfully."),Re._connectionState="Connected")}catch(Xe){return Re._logger.log(_.$.Error,"Failed to start the connection: "+Xe),Re._connectionState="Disconnected",Re.transport=void 0,Re._stopPromiseResolver(),Promise.reject(Xe)}})()}_getNegotiationResponse(Se){var Re=this;return(0,P.A)(function*(){const Fe={},[Xe,tt]=J();Fe[Xe]=tt;const vt=Re._resolveNegotiateUrl(Se);Re._logger.log(_.$.Debug,`Sending negotiation request: ${vt}.`);try{const qe=yield Re._httpClient.post(vt,{content:"",headers:{...Fe,...Re._options.headers},timeout:Re._options.timeout,withCredentials:Re._options.withCredentials});if(200!==qe.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${qe.statusCode}'`));const At=JSON.parse(qe.content);return(!At.negotiateVersion||At.negotiateVersion<1)&&(At.connectionToken=At.connectionId),At}catch(qe){let At="Failed to complete negotiation with the server: "+qe;return qe instanceof y&&404===qe.statusCode&&(At+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),Re._logger.log(_.$.Error,At),Promise.reject(new h(At))}})()}_createConnectUrl(Se,Re){return Re?Se+(-1===Se.indexOf("?")?"?":"&")+`id=${Re}`:Se}_createTransport(Se,Re,Fe,Xe){var tt=this;return(0,P.A)(function*(){let vt=tt._createConnectUrl(Se,Fe.connectionToken);if(tt._isITransport(Re))return tt._logger.log(_.$.Debug,"Connection was provided an instance of ITransport, using that directly."),tt.transport=Re,yield tt._startTransport(vt,Xe),void(tt.connectionId=Fe.connectionId);const qe=[],At=Fe.availableTransports||[];let Tt=Fe;for(const qt of At){const wt=tt._resolveTransportOrError(qt,Re,Xe);if(wt instanceof Error)qe.push(`${qt.transport} failed:`),qe.push(wt);else if(tt._isITransport(wt)){if(tt.transport=wt,!Tt){try{Tt=yield tt._getNegotiationResponse(Se)}catch(En){return Promise.reject(En)}vt=tt._createConnectUrl(Se,Tt.connectionToken)}try{return yield tt._startTransport(vt,Xe),void(tt.connectionId=Tt.connectionId)}catch(En){if(tt._logger.log(_.$.Error,`Failed to start the transport '${qt.transport}': ${En}`),Tt=void 0,qe.push(new u(`${qt.transport} failed: ${En}`,ae[qt.transport])),"Connecting"!==tt._connectionState){const ri="Failed to select transport before stop() was called.";return tt._logger.log(_.$.Debug,ri),Promise.reject(new c(ri))}}}}return Promise.reject(qe.length>0?new g(`Unable to connect to the server with any of the available transports. ${qe.join(" ")}`,qe):new Error("None of the transports supported by the client are supported by the server."))})()}_constructTransport(Se){switch(Se){case ae.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new be(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case ae.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ue(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case ae.LongPolling:return new de(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${Se}.`)}}_startTransport(Se,Re){return this.transport.onreceive=this.onreceive,this.transport.onclose=Fe=>this._stopConnection(Fe),this.transport.connect(Se,Re)}_resolveTransportOrError(Se,Re,Fe){const Xe=ae[Se.transport];if(null==Xe)return this._logger.log(_.$.Debug,`Skipping transport '${Se.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${Se.transport}' because it is not supported by this client.`);if(!function Ce(Pe,Se){return!Pe||!!(Se&Pe)}(Re,Xe))return this._logger.log(_.$.Debug,`Skipping transport '${ae[Xe]}' because it was disabled by the client.`),new a(`'${ae[Xe]}' is disabled by the client.`,Xe);if(!(Se.transferFormats.map(vt=>ee[vt]).indexOf(Fe)>=0))return this._logger.log(_.$.Debug,`Skipping transport '${ae[Xe]}' because it does not support the requested transfer format '${ee[Fe]}'.`),new Error(`'${ae[Xe]}' does not support ${ee[Fe]}.`);if(Xe===ae.WebSockets&&!this._options.WebSocket||Xe===ae.ServerSentEvents&&!this._options.EventSource)return this._logger.log(_.$.Debug,`Skipping transport '${ae[Xe]}' because it is not supported in your environment.'`),new s(`'${ae[Xe]}' is not supported in your environment.`,Xe);this._logger.log(_.$.Debug,`Selecting transport '${ae[Xe]}'.`);try{return this._constructTransport(Xe)}catch(vt){return vt}}_isITransport(Se){return Se&&"object"==typeof Se&&"connect"in Se}_stopConnection(Se){if(this._logger.log(_.$.Debug,`HttpConnection.stopConnection(${Se}) called while in state ${this._connectionState}.`),this.transport=void 0,Se=this._stopError||Se,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(_.$.Warning,`Call to HttpConnection.stopConnection(${Se}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${Se}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),Se?this._logger.log(_.$.Error,`Connection disconnected with error '${Se}'.`):this._logger.log(_.$.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(Re=>{this._logger.log(_.$.Error,`TransportSendQueue.stop() threw error '${Re}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(Se)}catch(Re){this._logger.log(_.$.Error,`HttpConnection.onclose(${Se}) threw error '${Re}'.`)}}}else this._logger.log(_.$.Debug,`Call to HttpConnection.stopConnection(${Se}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(Se){if(0===Se.lastIndexOf("https://",0)||0===Se.lastIndexOf("http://",0))return Se;if(!C.isBrowser)throw new Error(`Cannot resolve '${Se}'.`);const Re=window.document.createElement("a");return Re.href=Se,this._logger.log(_.$.Information,`Normalizing '${Se}' to '${Re.href}'.`),Re.href}_resolveNegotiateUrl(Se){const Re=Se.indexOf("?");let Fe=Se.substring(0,-1===Re?Se.length:Re);return"/"!==Fe[Fe.length-1]&&(Fe+="/"),Fe+="negotiate",Fe+=-1===Re?"":Se.substring(Re),-1===Fe.indexOf("negotiateVersion")&&(Fe+=-1===Re?"?":"&",Fe+="negotiateVersion="+this._negotiateVersion),Fe}}class ye{constructor(Se){this._transport=Se,this._buffer=[],this._executing=!0,this._sendBufferedData=new ge,this._transportResult=new ge,this._sendLoopPromise=this._sendLoop()}send(Se){return this._bufferData(Se),this._transportResult||(this._transportResult=new ge),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(Se){if(this._buffer.length&&typeof this._buffer[0]!=typeof Se)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof Se}`);this._buffer.push(Se),this._sendBufferedData.resolve()}_sendLoop(){var Se=this;return(0,P.A)(function*(){for(;;){if(yield Se._sendBufferedData.promise,!Se._executing){Se._transportResult&&Se._transportResult.reject("Connection stopped.");break}Se._sendBufferedData=new ge;const Re=Se._transportResult;Se._transportResult=void 0;const Fe="string"==typeof Se._buffer[0]?Se._buffer.join(""):ye._concatBuffers(Se._buffer);Se._buffer.length=0;try{yield Se._transport.send(Fe),Re.resolve()}catch(Xe){Re.reject(Xe)}}})()}static _concatBuffers(Se){const Re=Se.map(tt=>tt.byteLength).reduce((tt,vt)=>tt+vt),Fe=new Uint8Array(Re);let Xe=0;for(const tt of Se)Fe.set(new Uint8Array(tt),Xe),Xe+=tt.byteLength;return Fe.buffer}}class ge{constructor(){this.promise=new Promise((Se,Re)=>[this._resolver,this._rejecter]=[Se,Re])}resolve(){this._resolver()}reject(Se){this._rejecter(Se)}}class fe{static write(Se){return`${Se}${fe.RecordSeparator}`}static parse(Se){if(Se[Se.length-1]!==fe.RecordSeparator)throw new Error("Message is incomplete.");const Re=Se.split(fe.RecordSeparator);return Re.pop(),Re}}fe.RecordSeparatorCode=30,fe.RecordSeparator=String.fromCharCode(fe.RecordSeparatorCode);class xe{writeHandshakeRequest(Se){return fe.write(JSON.stringify(Se))}parseHandshakeResponse(Se){let Re,Fe;if(N(Se)){const qe=new Uint8Array(Se),At=qe.indexOf(fe.RecordSeparatorCode);if(-1===At)throw new Error("Message is incomplete.");const Tt=At+1;Re=String.fromCharCode.apply(null,Array.prototype.slice.call(qe.slice(0,Tt))),Fe=qe.byteLength>Tt?qe.slice(Tt).buffer:null}else{const qe=Se,At=qe.indexOf(fe.RecordSeparator);if(-1===At)throw new Error("Message is incomplete.");const Tt=At+1;Re=qe.substring(0,Tt),Fe=qe.length>Tt?qe.substring(Tt):null}const Xe=fe.parse(Re),tt=JSON.parse(Xe[0]);if(tt.type)throw new Error("Expected a handshake response from the server.");return[Fe,tt]}}var Te=function(Pe){return Pe[Pe.Invocation=1]="Invocation",Pe[Pe.StreamItem=2]="StreamItem",Pe[Pe.Completion=3]="Completion",Pe[Pe.StreamInvocation=4]="StreamInvocation",Pe[Pe.CancelInvocation=5]="CancelInvocation",Pe[Pe.Ping=6]="Ping",Pe[Pe.Close=7]="Close",Pe}(Te||{});class Ee{constructor(){this.observers=[]}next(Se){for(const Re of this.observers)Re.next(Se)}error(Se){for(const Re of this.observers)Re.error&&Re.error(Se)}complete(){for(const Se of this.observers)Se.complete&&Se.complete()}subscribe(Se){return this.observers.push(Se),new B(this,Se)}}var $e=function(Pe){return Pe.Disconnected="Disconnected",Pe.Connecting="Connecting",Pe.Connected="Connected",Pe.Disconnecting="Disconnecting",Pe.Reconnecting="Reconnecting",Pe}($e||{});class Be{constructor(Se,Re,Fe,Xe){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(_.$.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},D.isRequired(Se,"connection"),D.isRequired(Re,"logger"),D.isRequired(Fe,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=Re,this._protocol=Fe,this.connection=Se,this._reconnectPolicy=Xe,this._handshakeProtocol=new xe,this.connection.onreceive=tt=>this._processIncomingData(tt),this.connection.onclose=tt=>this._connectionClosed(tt),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=$e.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Te.Ping})}static create(Se,Re,Fe,Xe){return new Be(Se,Re,Fe,Xe)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(Se){if(this._connectionState!==$e.Disconnected&&this._connectionState!==$e.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!Se)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=Se}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){var Se=this;return(0,P.A)(function*(){if(Se._connectionState!==$e.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));Se._connectionState=$e.Connecting,Se._logger.log(_.$.Debug,"Starting HubConnection.");try{yield Se._startInternal(),C.isBrowser&&window.document.addEventListener("freeze",Se._freezeEventListener),Se._connectionState=$e.Connected,Se._connectionStarted=!0,Se._logger.log(_.$.Debug,"HubConnection connected successfully.")}catch(Re){return Se._connectionState=$e.Disconnected,Se._logger.log(_.$.Debug,`HubConnection failed to start successfully because of error '${Re}'.`),Promise.reject(Re)}})()}_startInternal(){var Se=this;return(0,P.A)(function*(){Se._stopDuringStartError=void 0,Se._receivedHandshakeResponse=!1;const Re=new Promise((Fe,Xe)=>{Se._handshakeResolver=Fe,Se._handshakeRejecter=Xe});yield Se.connection.start(Se._protocol.transferFormat);try{const Fe={protocol:Se._protocol.name,version:Se._protocol.version};if(Se._logger.log(_.$.Debug,"Sending handshake request."),yield Se._sendMessage(Se._handshakeProtocol.writeHandshakeRequest(Fe)),Se._logger.log(_.$.Information,`Using HubProtocol '${Se._protocol.name}'.`),Se._cleanupTimeout(),Se._resetTimeoutPeriod(),Se._resetKeepAliveInterval(),yield Re,Se._stopDuringStartError)throw Se._stopDuringStartError;Se.connection.features.inherentKeepAlive||(yield Se._sendMessage(Se._cachedPingMessage))}catch(Fe){throw Se._logger.log(_.$.Debug,`Hub handshake failed with error '${Fe}' during start(). Stopping HubConnection.`),Se._cleanupTimeout(),Se._cleanupPingTimer(),yield Se.connection.stop(Fe),Fe}})()}stop(){var Se=this;return(0,P.A)(function*(){const Re=Se._startPromise;Se._stopPromise=Se._stopInternal(),yield Se._stopPromise;try{yield Re}catch{}})()}_stopInternal(Se){return this._connectionState===$e.Disconnected?(this._logger.log(_.$.Debug,`Call to HubConnection.stop(${Se}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===$e.Disconnecting?(this._logger.log(_.$.Debug,`Call to HttpConnection.stop(${Se}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=$e.Disconnecting,this._logger.log(_.$.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(_.$.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=Se||new c("The connection was stopped before the hub handshake could complete."),this.connection.stop(Se)))}stream(Se,...Re){const[Fe,Xe]=this._replaceStreamingParams(Re),tt=this._createStreamInvocation(Se,Re,Xe);let vt;const qe=new Ee;return qe.cancelCallback=()=>{const At=this._createCancelInvocation(tt.invocationId);return delete this._callbacks[tt.invocationId],vt.then(()=>this._sendWithProtocol(At))},this._callbacks[tt.invocationId]=(At,Tt)=>{Tt?qe.error(Tt):At&&(At.type===Te.Completion?At.error?qe.error(new Error(At.error)):qe.complete():qe.next(At.item))},vt=this._sendWithProtocol(tt).catch(At=>{qe.error(At),delete this._callbacks[tt.invocationId]}),this._launchStreams(Fe,vt),qe}_sendMessage(Se){return this._resetKeepAliveInterval(),this.connection.send(Se)}_sendWithProtocol(Se){return this._sendMessage(this._protocol.writeMessage(Se))}send(Se,...Re){const[Fe,Xe]=this._replaceStreamingParams(Re),tt=this._sendWithProtocol(this._createInvocation(Se,Re,!0,Xe));return this._launchStreams(Fe,tt),tt}invoke(Se,...Re){const[Fe,Xe]=this._replaceStreamingParams(Re),tt=this._createInvocation(Se,Re,!1,Xe);return new Promise((qe,At)=>{this._callbacks[tt.invocationId]=(qt,wt)=>{wt?At(wt):qt&&(qt.type===Te.Completion?qt.error?At(new Error(qt.error)):qe(qt.result):At(new Error(`Unexpected message type: ${qt.type}`)))};const Tt=this._sendWithProtocol(tt).catch(qt=>{At(qt),delete this._callbacks[tt.invocationId]});this._launchStreams(Fe,Tt)})}on(Se,Re){!Se||!Re||(Se=Se.toLowerCase(),this._methods[Se]||(this._methods[Se]=[]),-1===this._methods[Se].indexOf(Re)&&this._methods[Se].push(Re))}off(Se,Re){if(!Se)return;Se=Se.toLowerCase();const Fe=this._methods[Se];if(Fe)if(Re){const Xe=Fe.indexOf(Re);-1!==Xe&&(Fe.splice(Xe,1),0===Fe.length&&delete this._methods[Se])}else delete this._methods[Se]}onclose(Se){Se&&this._closedCallbacks.push(Se)}onreconnecting(Se){Se&&this._reconnectingCallbacks.push(Se)}onreconnected(Se){Se&&this._reconnectedCallbacks.push(Se)}_processIncomingData(Se){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(Se=this._processHandshakeResponse(Se),this._receivedHandshakeResponse=!0),Se){const Re=this._protocol.parseMessages(Se,this._logger);for(const Fe of Re)switch(Fe.type){case Te.Invocation:this._invokeClientMethod(Fe);break;case Te.StreamItem:case Te.Completion:{const Xe=this._callbacks[Fe.invocationId];if(Xe){Fe.type===Te.Completion&&delete this._callbacks[Fe.invocationId];try{Xe(Fe)}catch(tt){this._logger.log(_.$.Error,`Stream callback threw error: ${Z(tt)}`)}}break}case Te.Ping:break;case Te.Close:{this._logger.log(_.$.Information,"Close message received from server.");const Xe=Fe.error?new Error("Server returned an error on close: "+Fe.error):void 0;!0===Fe.allowReconnect?this.connection.stop(Xe):this._stopPromise=this._stopInternal(Xe);break}default:this._logger.log(_.$.Warning,`Invalid message type: ${Fe.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(Se){let Re,Fe;try{[Fe,Re]=this._handshakeProtocol.parseHandshakeResponse(Se)}catch(Xe){const tt="Error parsing handshake response: "+Xe;this._logger.log(_.$.Error,tt);const vt=new Error(tt);throw this._handshakeRejecter(vt),vt}if(Re.error){const Xe="Server returned handshake error: "+Re.error;this._logger.log(_.$.Error,Xe);const tt=new Error(Xe);throw this._handshakeRejecter(tt),tt}return this._logger.log(_.$.Debug,"Server handshake complete."),this._handshakeResolver(),Fe}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){var Se=this;if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let Re=this._nextKeepAlive-(new Date).getTime();Re<0&&(Re=0),this._pingServerHandle=setTimeout((0,P.A)(function*(){if(Se._connectionState===$e.Connected)try{yield Se._sendMessage(Se._cachedPingMessage)}catch{Se._cleanupPingTimer()}}),Re)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(Se){var Re=this;return(0,P.A)(function*(){const Fe=Se.target.toLowerCase(),Xe=Re._methods[Fe];if(!Xe)return Re._logger.log(_.$.Warning,`No client method with the name '${Fe}' found.`),void(Se.invocationId&&(Re._logger.log(_.$.Warning,`No result given for '${Fe}' method and invocation ID '${Se.invocationId}'.`),yield Re._sendWithProtocol(Re._createCompletionMessage(Se.invocationId,"Client didn't provide a result.",null))));const tt=Xe.slice(),vt=!!Se.invocationId;let qe,At,Tt;for(const qt of tt)try{const wt=qe;qe=yield qt.apply(Re,Se.arguments),vt&&qe&&wt&&(Re._logger.log(_.$.Error,`Multiple results provided for '${Fe}'. Sending error to server.`),Tt=Re._createCompletionMessage(Se.invocationId,"Client provided multiple results.",null)),At=void 0}catch(wt){At=wt,Re._logger.log(_.$.Error,`A callback for the method '${Fe}' threw error '${wt}'.`)}Tt?yield Re._sendWithProtocol(Tt):vt?(At?Tt=Re._createCompletionMessage(Se.invocationId,`${At}`,null):void 0!==qe?Tt=Re._createCompletionMessage(Se.invocationId,null,qe):(Re._logger.log(_.$.Warning,`No result given for '${Fe}' method and invocation ID '${Se.invocationId}'.`),Tt=Re._createCompletionMessage(Se.invocationId,"Client didn't provide a result.",null)),yield Re._sendWithProtocol(Tt)):qe&&Re._logger.log(_.$.Error,`Result given for '${Fe}' method but server is not expecting a result.`)})()}_connectionClosed(Se){this._logger.log(_.$.Debug,`HubConnection.connectionClosed(${Se}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||Se||new c("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(Se||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===$e.Disconnecting?this._completeClose(Se):this._connectionState===$e.Connected&&this._reconnectPolicy?this._reconnect(Se):this._connectionState===$e.Connected&&this._completeClose(Se)}_completeClose(Se){if(this._connectionStarted){this._connectionState=$e.Disconnected,this._connectionStarted=!1,C.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(Re=>Re.apply(this,[Se]))}catch(Re){this._logger.log(_.$.Error,`An onclose callback called with error '${Se}' threw error '${Re}'.`)}}}_reconnect(Se){var Re=this;return(0,P.A)(function*(){const Fe=Date.now();let Xe=0,tt=void 0!==Se?Se:new Error("Attempting to reconnect due to a unknown error."),vt=Re._getNextRetryDelay(Xe++,0,tt);if(null===vt)return Re._logger.log(_.$.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void Re._completeClose(Se);if(Re._connectionState=$e.Reconnecting,Re._logger.log(_.$.Information,Se?`Connection reconnecting because of error '${Se}'.`:"Connection reconnecting."),0!==Re._reconnectingCallbacks.length){try{Re._reconnectingCallbacks.forEach(qe=>qe.apply(Re,[Se]))}catch(qe){Re._logger.log(_.$.Error,`An onreconnecting callback called with error '${Se}' threw error '${qe}'.`)}if(Re._connectionState!==$e.Reconnecting)return void Re._logger.log(_.$.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==vt;){if(Re._logger.log(_.$.Information,`Reconnect attempt number ${Xe} will start in ${vt} ms.`),yield new Promise(qe=>{Re._reconnectDelayHandle=setTimeout(qe,vt)}),Re._reconnectDelayHandle=void 0,Re._connectionState!==$e.Reconnecting)return void Re._logger.log(_.$.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(yield Re._startInternal(),Re._connectionState=$e.Connected,Re._logger.log(_.$.Information,"HubConnection reconnected successfully."),0!==Re._reconnectedCallbacks.length)try{Re._reconnectedCallbacks.forEach(qe=>qe.apply(Re,[Re.connection.connectionId]))}catch(qe){Re._logger.log(_.$.Error,`An onreconnected callback called with connectionId '${Re.connection.connectionId}; threw error '${qe}'.`)}return}catch(qe){if(Re._logger.log(_.$.Information,`Reconnect attempt failed because of error '${qe}'.`),Re._connectionState!==$e.Reconnecting)return Re._logger.log(_.$.Debug,`Connection moved to the '${Re._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(Re._connectionState===$e.Disconnecting&&Re._completeClose());tt=qe instanceof Error?qe:new Error(qe.toString()),vt=Re._getNextRetryDelay(Xe++,Date.now()-Fe,tt)}}Re._logger.log(_.$.Information,`Reconnect retries have been exhausted after ${Date.now()-Fe} ms and ${Xe} failed attempts. Connection disconnecting.`),Re._completeClose()})()}_getNextRetryDelay(Se,Re,Fe){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:Re,previousRetryCount:Se,retryReason:Fe})}catch(Xe){return this._logger.log(_.$.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${Se}, ${Re}) threw error '${Xe}'.`),null}}_cancelCallbacksWithError(Se){const Re=this._callbacks;this._callbacks={},Object.keys(Re).forEach(Fe=>{const Xe=Re[Fe];try{Xe(null,Se)}catch(tt){this._logger.log(_.$.Error,`Stream 'error' callback called with '${Se}' threw error: ${Z(tt)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(Se,Re,Fe,Xe){if(Fe)return 0!==Xe.length?{arguments:Re,streamIds:Xe,target:Se,type:Te.Invocation}:{arguments:Re,target:Se,type:Te.Invocation};{const tt=this._invocationId;return this._invocationId++,0!==Xe.length?{arguments:Re,invocationId:tt.toString(),streamIds:Xe,target:Se,type:Te.Invocation}:{arguments:Re,invocationId:tt.toString(),target:Se,type:Te.Invocation}}}_launchStreams(Se,Re){if(0!==Se.length){Re||(Re=Promise.resolve());for(const Fe in Se)Se[Fe].subscribe({complete:()=>{Re=Re.then(()=>this._sendWithProtocol(this._createCompletionMessage(Fe)))},error:Xe=>{let tt;tt=Xe instanceof Error?Xe.message:Xe&&Xe.toString?Xe.toString():"Unknown error",Re=Re.then(()=>this._sendWithProtocol(this._createCompletionMessage(Fe,tt)))},next:Xe=>{Re=Re.then(()=>this._sendWithProtocol(this._createStreamItemMessage(Fe,Xe)))}})}}_replaceStreamingParams(Se){const Re=[],Fe=[];for(let Xe=0;Xe<Se.length;Xe++){const tt=Se[Xe];if(this._isObservable(tt)){const vt=this._invocationId;this._invocationId++,Re[vt]=tt,Fe.push(vt.toString()),Se.splice(Xe,1)}}return[Re,Fe]}_isObservable(Se){return Se&&Se.subscribe&&"function"==typeof Se.subscribe}_createStreamInvocation(Se,Re,Fe){const Xe=this._invocationId;return this._invocationId++,0!==Fe.length?{arguments:Re,invocationId:Xe.toString(),streamIds:Fe,target:Se,type:Te.StreamInvocation}:{arguments:Re,invocationId:Xe.toString(),target:Se,type:Te.StreamInvocation}}_createCancelInvocation(Se){return{invocationId:Se,type:Te.CancelInvocation}}_createStreamItemMessage(Se,Re){return{invocationId:Se,item:Re,type:Te.StreamItem}}_createCompletionMessage(Se,Re,Fe){return Re?{error:Re,invocationId:Se,type:Te.Completion}:{invocationId:Se,result:Fe,type:Te.Completion}}}class ot{constructor(){this.name="json",this.version=1,this.transferFormat=ee.Text}parseMessages(Se,Re){if("string"!=typeof Se)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!Se)return[];null===Re&&(Re=x.instance);const Fe=fe.parse(Se),Xe=[];for(const tt of Fe){const vt=JSON.parse(tt);if("number"!=typeof vt.type)throw new Error("Invalid payload.");switch(vt.type){case Te.Invocation:this._isInvocationMessage(vt);break;case Te.StreamItem:this._isStreamItemMessage(vt);break;case Te.Completion:this._isCompletionMessage(vt);break;case Te.Ping:case Te.Close:break;default:Re.log(_.$.Information,"Unknown message type '"+vt.type+"' ignored.");continue}Xe.push(vt)}return Xe}writeMessage(Se){return fe.write(JSON.stringify(Se))}_isInvocationMessage(Se){this._assertNotEmptyString(Se.target,"Invalid payload for Invocation message."),void 0!==Se.invocationId&&this._assertNotEmptyString(Se.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(Se){if(this._assertNotEmptyString(Se.invocationId,"Invalid payload for StreamItem message."),void 0===Se.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(Se){if(Se.result&&Se.error)throw new Error("Invalid payload for Completion message.");!Se.result&&Se.error&&this._assertNotEmptyString(Se.error,"Invalid payload for Completion message."),this._assertNotEmptyString(Se.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(Se,Re){if("string"!=typeof Se||""===Se)throw new Error(Re)}}const st={trace:_.$.Trace,debug:_.$.Debug,info:_.$.Information,information:_.$.Information,warn:_.$.Warning,warning:_.$.Warning,error:_.$.Error,critical:_.$.Critical,none:_.$.None};class Ke{configureLogging(Se){if(D.isRequired(Se,"logging"),function Ye(Pe){return void 0!==Pe.log}(Se))this.logger=Se;else if("string"==typeof Se){const Re=function et(Pe){const Se=st[Pe.toLowerCase()];if(typeof Se<"u")return Se;throw new Error(`Unknown log level: ${Pe}`)}(Se);this.logger=new K(Re)}else this.logger=new K(Se);return this}withUrl(Se,Re){return D.isRequired(Se,"url"),D.isNotEmpty(Se,"url"),this.url=Se,this.httpConnectionOptions="object"==typeof Re?{...this.httpConnectionOptions,...Re}:{...this.httpConnectionOptions,transport:Re},this}withHubProtocol(Se){return D.isRequired(Se,"protocol"),this.protocol=Se,this}withAutomaticReconnect(Se){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return this.reconnectPolicy=Se?Array.isArray(Se)?new o(Se):Se:new o,this}build(){const Se=this.httpConnectionOptions||{};if(void 0===Se.logger&&(Se.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const Re=new le(this.url,Se);return Be.create(Re,this.logger||x.instance,this.protocol||new ot,this.reconnectPolicy)}}},5574:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>W});var W=function(o){return o[o.Trace=0]="Trace",o[o.Debug=1]="Debug",o[o.Information=2]="Information",o[o.Warning=3]="Warning",o[o.Error=4]="Error",o[o.Critical=5]="Critical",o[o.None=6]="None",o}(W||{})},3110:function(In){In.exports=function(Ze){function M(o){if(W[o])return W[o].exports;var P=W[o]={exports:{},id:o,loaded:!1};return Ze[o].call(P.exports,P,P.exports,M),P.loaded=!0,P.exports}var W={};return M.m=Ze,M.c=W,M.p="dist/",M(0)}([function(Ze,M,W){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}var P=Object.assign||function(B){for(var K=1;K<arguments.length;K++){var J=arguments[K];for(var ie in J)Object.prototype.hasOwnProperty.call(J,ie)&&(B[ie]=J[ie])}return B},f=(o(W(1)),W(6)),S=o(f),y=o(W(7)),c=o(W(8)),a=o(W(9)),h=o(W(10)),_=o(W(11)),w=o(W(14)),D=[],C=!1,I={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},L=function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(C=!0),C)return D=(0,_.default)(D,I),(0,h.default)(D,I.once),D},N=function(){D=(0,w.default)(),L()};Ze.exports={init:function(B){I=P(I,B),D=(0,w.default)();var K=document.all&&!window.atob;return function(B){return!0===B||"mobile"===B&&a.default.mobile()||"phone"===B&&a.default.phone()||"tablet"===B&&a.default.tablet()||"function"==typeof B&&!0===B()}(I.disable)||K?void D.forEach(function(B,K){B.node.removeAttribute("data-aos"),B.node.removeAttribute("data-aos-easing"),B.node.removeAttribute("data-aos-duration"),B.node.removeAttribute("data-aos-delay")}):(I.disableMutationObserver||c.default.isSupported()||(console.info('\n      aos: MutationObserver is not supported on this browser,\n      code mutations observing has been disabled.\n      You may have to call "refreshHard()" by yourself.\n    '),I.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",I.easing),document.querySelector("body").setAttribute("data-aos-duration",I.duration),document.querySelector("body").setAttribute("data-aos-delay",I.delay),"DOMContentLoaded"===I.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?L(!0):"load"===I.startEvent?window.addEventListener(I.startEvent,function(){L(!0)}):document.addEventListener(I.startEvent,function(){L(!0)}),window.addEventListener("resize",(0,y.default)(L,I.debounceDelay,!0)),window.addEventListener("orientationchange",(0,y.default)(L,I.debounceDelay,!0)),window.addEventListener("scroll",(0,S.default)(function(){(0,h.default)(D,I.once)},I.throttleDelay)),I.disableMutationObserver||c.default.ready("[data-aos]",N),D)},refresh:L,refreshHard:N}},function(Ze,M){},,,,,function(Ze,M){(function(W){"use strict";function o(k,U,B){function K(le){var Ce=pe,ye=z;return pe=z=void 0,de=le,ae=k.apply(ye,Ce)}function re(le){var Ce=le-he;return void 0===he||Ce>=U||Ce<0||be&&le-de>=oe}function q(){var le=G();return re(le)?Y(le):void(ee=setTimeout(q,function ie(le){var ge=U-(le-he);return be?N(ge,oe-(le-de)):ge}(le)))}function Y(le){return ee=void 0,ve&&pe?K(le):(pe=z=void 0,ae)}function te(){var le=G(),Ce=re(le);if(pe=arguments,z=this,he=le,Ce){if(void 0===ee)return function J(le){return de=le,ee=setTimeout(q,U),ue?K(le):ae}(he);if(be)return ee=setTimeout(q,U),K(he)}return void 0===ee&&(ee=setTimeout(q,U)),ae}var pe,z,oe,ae,ee,he,de=0,ue=!1,be=!1,ve=!0;if("function"!=typeof k)throw new TypeError(d);return U=T(U)||0,b(B)&&(ue=!!B.leading,oe=(be="maxWait"in B)?L(T(B.maxWait)||0,U):oe,ve="trailing"in B?!!B.trailing:ve),te.cancel=function Z(){void 0!==ee&&clearTimeout(ee),de=0,pe=he=z=ee=void 0},te.flush=function Q(){return void 0===ee?ae:Y(G())},te}function b(k){var U=typeof k>"u"?"undefined":y(k);return!!k&&("object"==U||"function"==U)}function S(k){return"symbol"==(typeof k>"u"?"undefined":y(k))||function f(k){return!!k&&"object"==(typeof k>"u"?"undefined":y(k))}(k)&&I.call(k)==s}function T(k){if("number"==typeof k)return k;if(S(k))return c;if(b(k)){var U="function"==typeof k.valueOf?k.valueOf():k;k=b(U)?U+"":U}if("string"!=typeof k)return 0===k?k:+k;k=k.replace(a,"");var B=h.test(k);return B||g.test(k)?_(k.slice(2),B?2:8):u.test(k)?c:+k}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},d="Expected a function",c=NaN,s="[object Symbol]",a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,g=/^0o[0-7]+$/i,_=parseInt,x="object"==(typeof W>"u"?"undefined":y(W))&&W&&W.Object===Object&&W,w="object"==(typeof self>"u"?"undefined":y(self))&&self&&self.Object===Object&&self,D=x||w||Function("return this")(),I=Object.prototype.toString,L=Math.max,N=Math.min,G=function(){return D.Date.now()};Ze.exports=function P(k,U,B){var K=!0,J=!0;if("function"!=typeof k)throw new TypeError(d);return b(B)&&(K="leading"in B?!!B.leading:K,J="trailing"in B?!!B.trailing:J),o(k,U,{leading:K,maxWait:U,trailing:J})}}).call(M,function(){return this}())},function(Ze,M){(function(W){"use strict";function P(G){var k=typeof G>"u"?"undefined":T(G);return!!G&&("object"==k||"function"==k)}function f(G){return"symbol"==(typeof G>"u"?"undefined":T(G))||function b(G){return!!G&&"object"==(typeof G>"u"?"undefined":T(G))}(G)&&C.call(G)==c}function S(G){if("number"==typeof G)return G;if(f(G))return d;if(P(G)){var k="function"==typeof G.valueOf?G.valueOf():G;G=P(k)?k+"":k}if("string"!=typeof G)return 0===G?G:+G;G=G.replace(s,"");var U=u.test(G);return U||h.test(G)?g(G.slice(2),U?2:8):a.test(G)?d:+G}var T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(G){return typeof G}:function(G){return G&&"function"==typeof Symbol&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},y="Expected a function",d=NaN,c="[object Symbol]",s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,h=/^0o[0-7]+$/i,g=parseInt,_="object"==(typeof W>"u"?"undefined":T(W))&&W&&W.Object===Object&&W,x="object"==(typeof self>"u"?"undefined":T(self))&&self&&self.Object===Object&&self,w=_||x||Function("return this")(),C=Object.prototype.toString,I=Math.max,L=Math.min,N=function(){return w.Date.now()};Ze.exports=function o(G,k,U){function B(ve){var le=te,Ce=pe;return te=pe=void 0,he=ve,oe=G.apply(Ce,le)}function ie(ve){var le=ve-ee;return void 0===ee||le>=k||le<0||ue&&ve-he>=z}function re(){var ve=N();return ie(ve)?q(ve):void(ae=setTimeout(re,function J(ve){var ye=k-(ve-ee);return ue?L(ye,z-(ve-he)):ye}(ve)))}function q(ve){return ae=void 0,be&&te?B(ve):(te=pe=void 0,oe)}function Q(){var ve=N(),le=ie(ve);if(te=arguments,pe=this,ee=ve,le){if(void 0===ae)return function K(ve){return he=ve,ae=setTimeout(re,k),de?B(ve):oe}(ee);if(ue)return ae=setTimeout(re,k),B(ee)}return void 0===ae&&(ae=setTimeout(re,k)),oe}var te,pe,z,oe,ae,ee,he=0,de=!1,ue=!1,be=!0;if("function"!=typeof G)throw new TypeError(y);return k=S(k)||0,P(U)&&(de=!!U.leading,z=(ue="maxWait"in U)?I(S(U.maxWait)||0,k):z,be="trailing"in U?!!U.trailing:be),Q.cancel=function Y(){void 0!==ae&&clearTimeout(ae),he=0,te=ee=pe=ae=void 0},Q.flush=function Z(){return void 0===ae?oe:q(N())},Q}}).call(M,function(){return this}())},function(Ze,M){"use strict";function W(T){var y=void 0,d=void 0;for(y=0;y<T.length;y+=1)if((d=T[y]).dataset&&d.dataset.aos||d.children&&W(d.children))return!0;return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function f(T){T&&T.forEach(function(y){var d=Array.prototype.slice.call(y.addedNodes),c=Array.prototype.slice.call(y.removedNodes);if(W(d.concat(c)))return S()})}Object.defineProperty(M,"__esModule",{value:!0});var S=function(){};M.default={isSupported:function P(){return!!o()},ready:function b(T,y){var d=window.document,s=new(o())(f);S=y,s.observe(d.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}}},function(Ze,M){"use strict";function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(M,"__esModule",{value:!0});var P=function(){function d(c,s){for(var a=0;a<s.length;a++){var u=s[a];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}return function(c,s,a){return s&&d(c.prototype,s),a&&d(c,a),c}}(),b=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,f=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,S=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,T=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,y=function(){function d(){!function W(d,c){if(!(d instanceof c))throw new TypeError("Cannot call a class as a function")}(this,d)}return P(d,[{key:"phone",value:function(){var c=o();return!(!b.test(c)&&!f.test(c.substr(0,4)))}},{key:"mobile",value:function(){var c=o();return!(!S.test(c)&&!T.test(c.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),d}();M.default=new y},function(Ze,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.default=function(P,b){var f=window.pageYOffset,S=window.innerHeight;P.forEach(function(T,y){!function(P,b,f){var S=P.node.getAttribute("data-aos-once");b>P.position?P.node.classList.add("aos-animate"):typeof S<"u"&&("false"===S||!f&&"true"!==S)&&P.node.classList.remove("aos-animate")}(T,S+f,b)})}},function(Ze,M,W){"use strict";Object.defineProperty(M,"__esModule",{value:!0});var b=function o(S){return S&&S.__esModule?S:{default:S}}(W(12));M.default=function(S,T){return S.forEach(function(y,d){y.node.classList.add("aos-init"),y.position=(0,b.default)(y.node,T.offset)}),S}},function(Ze,M,W){"use strict";Object.defineProperty(M,"__esModule",{value:!0});var b=function o(S){return S&&S.__esModule?S:{default:S}}(W(13));M.default=function(S,T){var y=0,d=0,c=window.innerHeight,s={offset:S.getAttribute("data-aos-offset"),anchor:S.getAttribute("data-aos-anchor"),anchorPlacement:S.getAttribute("data-aos-anchor-placement")};switch(s.offset&&!isNaN(s.offset)&&(d=parseInt(s.offset)),s.anchor&&document.querySelectorAll(s.anchor)&&(S=document.querySelectorAll(s.anchor)[0]),y=(0,b.default)(S).top,s.anchorPlacement){case"top-bottom":break;case"center-bottom":y+=S.offsetHeight/2;break;case"bottom-bottom":y+=S.offsetHeight;break;case"top-center":y+=c/2;break;case"bottom-center":y+=c/2+S.offsetHeight;break;case"center-center":y+=c/2+S.offsetHeight/2;break;case"top-top":y+=c;break;case"bottom-top":y+=S.offsetHeight+c;break;case"center-top":y+=S.offsetHeight/2+c}return s.anchorPlacement||s.offset||isNaN(T)||(d=T),y+d}},function(Ze,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.default=function(o){for(var P=0,b=0;o&&!isNaN(o.offsetLeft)&&!isNaN(o.offsetTop);)P+=o.offsetLeft-("BODY"!=o.tagName?o.scrollLeft:0),b+=o.offsetTop-("BODY"!=o.tagName?o.scrollTop:0),o=o.offsetParent;return{top:b,left:P}}},function(Ze,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.default=function(o){return o=o||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(o,function(P){return{node:P}})}}])},8111:function(In){var M;M=()=>(()=>{"use strict";var Ze={9279:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Browser=void 0;var b=function(){function f(){}return f.IdentUserAgent=function(S,T){void 0===T&&(T=!1);var y=["Mozilla","IE","Firefox","Netscape","Safari","Chrome","Opera","Opera10","Edge"],d="IE",c="Win",s={Safari:2,Chrome:.1,Mozilla:1.9,Netscape:8,Firefox:2,Opera:9,IE:6,Edge:12};if(S&&0!==S.length){S=S.toLowerCase(),f.indentPlatformMajorVersion(S);try{for(var a={Windows:"Win",Macintosh:"Mac","Mac OS":"Mac",Mac_PowerPC:"Mac","cpu os":"MacMobile","cpu iphone os":"MacMobile",Android:"Android","!Windows Phone":"WinPhone","!WPDesktop":"WinPhone","!ZuneWP":"WinPhone"},u="(?:/|\\s*)?",h="(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?",g="(?:"+h+")?",_={Safari:"applewebkit(?:.*?(?:version/"+h+"[\\.\\w\\d]*?(?:\\s+mobile/\\S*)?\\s+safari))?",Chrome:"(?:chrome|crios)(?!frame)"+u+g,Mozilla:"mozilla(?:.*rv:"+g+".*Gecko)?",Netscape:"(?:netscape|navigator)\\d*/?\\s*"+g,Firefox:"firefox"+u+g,Opera:"(?:opera|\\sopr)"+u+g,Opera10:"opera.*\\s*version"+u+g,IE:"msie\\s*"+g,Edge:"edge"+u+g},x=null,w=-1,D=0;D<y.length;D++){var C=y[D],I=new RegExp(_[C],"i").exec(S);if(I&&I.index>=0){if("IE"===x&&w>=11&&"Safari"===C)continue;"Opera10"===(x=C)&&(x="Opera"),w=f.GetBrowserVersion(S,I,"trident"+u+g,f.getIECompatibleVersionString()),"Mozilla"===x&&w>=11&&(x="IE")}}x||(x=d);var N=-1!==w;N||(w=s[x]);var G=null,k=Number.MAX_VALUE;for(var U in a)if(Object.prototype.hasOwnProperty.call(a,U)){var B="!"===U.substr(0,1),K=S.indexOf((B?U.substr(1):U).toLowerCase());K>=0&&(K<k||B)&&(k=B?0:K,G=a[U])}var J=S.toUpperCase().match("SM-[A-Z]"),ie=J&&J.length>0;"WinPhone"===G&&w<9&&(w=Math.floor(f.getVersionFromTrident(S,"trident"+u+g))),!T&&"IE"===x&&w>7&&document.documentMode<w&&(w=document.documentMode),"WinPhone"===G&&(w=Math.max(9,w)),G||(G=c),G!==a["cpu os"]||N||(w=4),f.fillUserAgentInfo(y,x,w,G,ie)}catch{f.fillUserAgentInfo(y,d,s[d],c)}}else f.fillUserAgentInfo(y,d,s[d],c)},f.GetBrowserVersion=function(S,T,y,d){var c=f.getVersionFromMatches(T);if(d){var s=f.getVersionFromTrident(S,y);if("edge"===d||parseInt(d)===s)return s}return c},f.getIECompatibleVersionString=function(){if(document.compatible)for(var S=0;S<document.compatible.length;S++)if("IE"===document.compatible[S].userAgent&&document.compatible[S].version)return document.compatible[S].version.toLowerCase();return""},f.isTouchEnabled=function(){return f.hasTouchStart()||f.hasMaxTouchPoints()||f.hasMsMaxTouchPoints()},f.hasTouchStart=function(){return"ontouchstart"in window},f.hasMaxTouchPoints=function(){return navigator.maxTouchPoints>0},f.hasMsMaxTouchPoints=function(){return navigator.msMaxTouchPoints>0},f.hasNavigator=function(){return typeof navigator<"u"},f.fillUserAgentInfo=function(S,T,y,d,c){void 0===c&&(c=!1);for(var s=0;s<S.length;s++){var a=S[s];f[a]=a===T}f.Version=Math.floor(10*y)/10,f.MajorVersion=Math.floor(f.Version),f.WindowsPlatform="Win"===d||"WinPhone"===d,f.MacOSMobilePlatform="MacMobile"===d||"Mac"===d&&f.isTouchEnabled(),f.MacOSPlatform="Mac"===d&&!f.MacOSMobilePlatform,f.AndroidMobilePlatform="Android"===d,f.WindowsPhonePlatform="WinPhone"===d,f.WebKitFamily=f.Safari||f.Chrome||f.Opera&&f.MajorVersion>=15,f.NetscapeFamily=f.Netscape||f.Mozilla||f.Firefox,f.WebKitTouchUI=f.MacOSMobilePlatform||f.AndroidMobilePlatform;var u=f.IE&&f.MajorVersion>9&&f.WindowsPlatform&&f.UserAgent.toLowerCase().indexOf("touch")>=0;if(f.MSTouchUI=u||f.Edge&&!!window.navigator.maxTouchPoints,f.TouchUI=f.WebKitTouchUI||f.MSTouchUI,f.MobileUI=f.WebKitTouchUI||f.WindowsPhonePlatform,f.AndroidDefaultBrowser=f.AndroidMobilePlatform&&!f.Chrome,f.AndroidChromeBrowser=f.AndroidMobilePlatform&&f.Chrome,c&&(f.SamsungAndroidDevice=c),f.MSTouchUI){var h=f.UserAgent.toLowerCase().indexOf("arm;")>-1;f.VirtualKeyboardSupported=h||f.WindowsPhonePlatform}else f.VirtualKeyboardSupported=f.WebKitTouchUI;f.fillDocumentElementBrowserTypeClassNames(S)},f.indentPlatformMajorVersion=function(S){var T=/(?:(?:windows nt|macintosh|mac os|cpu os|cpu iphone os|android|windows phone|linux) )(\d+)(?:[-0-9_.])*/.exec(S);T&&(f.PlaformMajorVersion=T[1])},f.getVersionFromMatches=function(S){var T=-1,y="";return S&&(S[1]&&(y+=S[1],S[2]&&(y+="."+S[2])),""!==y&&(T=parseFloat(y),isNaN(T)&&(T=-1))),T},f.getVersionFromTrident=function(S,T){var y=new RegExp(T,"i").exec(S);return f.getVersionFromMatches(y)+4},f.fillDocumentElementBrowserTypeClassNames=function(S){for(var T="",y=S.concat(["WindowsPlatform","MacOSPlatform","MacOSMobilePlatform","AndroidMobilePlatform","WindowsPhonePlatform","WebKitFamily","WebKitTouchUI","MSTouchUI","TouchUI","AndroidDefaultBrowser"]),d=0;d<y.length;d++){var c=y[d];f[c]&&(T+="dx"+c+" ")}T+="dxBrowserVersion-"+f.MajorVersion,typeof document<"u"&&document&&document.documentElement&&(""!==document.documentElement.className&&(T=" "+T),document.documentElement.className+=T,f.Info=T)},f.getUserAgent=function(){return f.hasNavigator()&&navigator.userAgent?navigator.userAgent.toLowerCase():""},f.UserAgent=f.getUserAgent(),f._foo=f.IdentUserAgent(f.UserAgent),f}();P.Browser=b},1772:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.EmptyBatchUpdatableObject=P.BatchUpdatableObject=void 0;var b=function(){function S(){this.suspendUpdateCount=0,this.occurredEvents=0}return S.prototype.beginUpdate=function(){0===this.suspendUpdateCount&&this.onUpdateLocked(),this.suspendUpdateCount<0?this.suspendUpdateCount--:this.suspendUpdateCount++},S.prototype.endUpdate=function(){if(this.suspendUpdateCount<0?this.suspendUpdateCount++:this.suspendUpdateCount>0&&this.suspendUpdateCount--,!this.isUpdateLocked()){var T=this.occurredEvents;this.occurredEvents=0,this.onUpdateUnlocked(T)}},S.prototype.suspendUpdate=function(){if(this.suspendUpdateCount>0){this.suspendUpdateCount*=-1;var T=this.occurredEvents;this.occurredEvents=0,this.onUpdateUnlocked(T)}},S.prototype.continueUpdate=function(){this.suspendUpdateCount<0&&(this.suspendUpdateCount*=-1)},S.prototype.isUpdateLocked=function(){return this.suspendUpdateCount>0},S.prototype.onUpdateLocked=function(){},S.prototype.registerOccurredEvent=function(T){this.occurredEvents|=T},S.prototype.resetOccurredEvents=function(){this.occurredEvents=0},S.prototype.isLocked=function(){return 0!==this.suspendUpdateCount},S}();P.BatchUpdatableObject=b;var f=function(){function S(){}return S.prototype.beginUpdate=function(){},S.prototype.endUpdate=function(){},S}();P.EmptyBatchUpdatableObject=f},7820:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Flag=void 0;var b=function(){function f(S){void 0===S&&(S=0),this.value=S}return f.prototype.get=function(S){return(this.value&S)===S},f.prototype.set=function(S,T){return(this.value&S)===S!==T&&(T?this.value|=S:this.value^=S),this},f.prototype.add=function(S){this.value|=S},f.prototype.anyOf=function(){for(var S=[],T=0;T<arguments.length;T++)S[T]=arguments[T];for(var y=0,d=S;y<d.length;y++){var c=d[y];if((this.value&c)===c)return!0}return!1},f.prototype.getValue=function(){return this.value},f.prototype.clone=function(){return new f(this.value)},f}();P.Flag=b},6799:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ExtendedMinMax=P.ExtendedMax=P.ExtendedMin=P.MinMaxNumber=P.MinMax=void 0;var f=b(655),S=function(s,a){this.minElement=s,this.maxElement=a};P.MinMax=S;var T=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return f.__extends(a,s),Object.defineProperty(a.prototype,"length",{get:function(){return this.maxElement-this.minElement},enumerable:!1,configurable:!0}),a}(S);P.MinMaxNumber=T,P.ExtendedMin=function(s,a){this.minElement=s,this.minValue=a},P.ExtendedMax=function(s,a){this.maxElement=s,this.maxValue=a};var c=function(s){function a(u,h,g,_){var x=s.call(this,u,g)||this;return x.minValue=h,x.maxValue=_,x}return f.__extends(a,s),a}(S);P.ExtendedMinMax=c},9291:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.UnitConverter=void 0;var b=function(){function f(){}return f.hundredthsOfMillimeterToTwipsRound=function(S){return Math.round(1440*S/2540)},f.documentsToTwips=function(S){return 24*S/5},f.pixelsToTwips=function(S){return Math.round(f.pixelsToTwipsF(S))},f.pixelsToTwipsCustomDpi=function(S,T){return Math.round(f.pixelsToTwipsFCustomDpi(S,T))},f.inchesToTwips=function(S){return Math.round(f.inchesToTwipsF(S))},f.pointsToTwips=function(S){return Math.round(f.pointsToTwipsF(S))},f.picasToTwips=function(S){return Math.round(1440*S/f.PICAS_PER_INCH)},f.centimetersToTwips=function(S){return Math.round(f.centimetersToTwipsF(S))},f.pixelsToTwipsF=function(S){return 1440*S/f.DPI},f.pixelsToTwipsFCustomDpi=function(S,T){return 1440*S/T},f.inchesToTwipsF=function(S){return 1440*S},f.pointsToTwipsF=function(S){return 20*S},f.centimetersToTwipsF=function(S){return 1440*S/f.CENTIMETERS_PER_INCH},f.twipsToDegrees=function(S){return S/6e4},f.twipsToRadians=function(S){return S/6e4*Math.PI/180},f.degreesToTwips=function(S){return 6e4*S},f.radiansToTwips=function(S){return 6e4*S/Math.PI*180},f.radiansToDegrees=function(S){return S/Math.PI*180},f.twipsToFD=function(S){return Math.round(2048*S/1875)},f.fdToTwips=function(S){return Math.round(1875*S/2048)},f.emuToTwips=function(S){return S/635},f.twipsToPixels=function(S){return Math.round(f.twipsToPixelsF(S))},f.inchesToPixels=function(S){return Math.round(f.DPI*S)},f.centimeterToPixel=function(S){return Math.round(this.centimeterToPixelF(S))},f.centimeterToPixelF=function(S){return S*f.DPI/f.CENTIMETERS_PER_INCH},f.millimetersToPixel=function(S){return Math.round(S/(f.CENTIMETERS_PER_INCH/f.DPI)/10)},f.pointsToPixels=function(S){return Math.round(S*f.DPI/72)},f.pointsToPixelsF=function(S){return S*f.DPI/72},f.twipsToPixelsF=function(S){return S*f.DPI/1440},f.pixelsToPoints=function(S){return Math.round(72*S/f.DPI)},f.pixelsToPointsF=function(S){return 72*S/f.DPI},f.twipsToPoints=function(S){return Math.round(this.twipsToPointsF(S))},f.twipsToPointsF=function(S){return S/20},f.twipsToInches=function(S){return S/1440},f.pixelsToInches=function(S){return S/f.DPI},f.twipsToCentimeters=function(S){return S*f.CENTIMETERS_PER_INCH/1440},f.pixelToCentimeters=function(S){return S*f.CENTIMETERS_PER_INCH/f.DPI},f.twipsToHundredthsOfMillimeter=function(S){return Math.round(127*S/72)},f.pixelsToHundredthsOfMillimeter=function(S){return Math.round(2540*S/f.DPI)},f.hundredthsOfMillimeterToTwips=function(S){return 15*S/127},f.twipsToEmu=function(S){return 635*S},f.twipsToDegree=function(S){return S/6e4},f.DPI=96,f.CENTIMETERS_PER_INCH=2.54,f.PICAS_PER_INCH=6,f}();P.UnitConverter=b},5596:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Metrics=void 0;var b=function(){function f(){}return f.euclideanDistance=function(S,T){var y=S.x-T.x,d=S.y-T.y;return Math.sqrt(y*y+d*d)},f.manhattanDistance=function(S,T){return Math.abs(S.x-T.x)+Math.abs(S.y-T.y)},f}();P.Metrics=b},4125:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Offsets=void 0;var b=function(){function f(S,T,y,d){this.left=S,this.right=T,this.top=y,this.bottom=d}return f.empty=function(){return new f(0,0,0,0)},Object.defineProperty(f.prototype,"horizontal",{get:function(){return this.left+this.right},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"vertical",{get:function(){return this.top+this.bottom},enumerable:!1,configurable:!0}),f.fromNumber=function(S){return new f(S,S,S,S)},f.fromOffsets=function(S){return new f(S.left,S.right,S.top,S.bottom)},f.fromSide=function(S,T){return new f(S,S,T,T)},f.prototype.normalize=function(){return this.left=Math.max(0,this.left),this.right=Math.max(0,this.right),this.top=Math.max(0,this.top),this.bottom=Math.max(0,this.bottom),this},f.prototype.toString=function(){return JSON.stringify(this)},f.prototype.isEmpty=function(){return 0===this.left&&0===this.right&&0===this.top&&0===this.bottom},f.prototype.offset=function(S){return this.left+=S.left,this.right+=S.right,this.top+=S.top,this.bottom+=S.bottom,this},f.prototype.multiply=function(S,T,y,d){switch(arguments.length){case 1:return this.left*=S,this.right*=S,this.top*=S,this.bottom*=S,this;case 2:return this.left*=S,this.right*=S,this.top*=T,this.bottom*=T,this;case 4:return this.left*=S,this.right*=T,this.top*=y,this.bottom*=d,this}return this},f.prototype.clone=function(){return new f(this.left,this.right,this.top,this.bottom)},f.prototype.copyFrom=function(S){this.left=S.left,this.right=S.right,this.top=S.top,this.bottom=S.bottom},f.prototype.equals=function(S){return this.top===S.top&&this.bottom===S.bottom&&this.right===S.right&&this.left===S.left},f.prototype.applyConverter=function(S){return this.left=S(this.left),this.right=S(this.right),this.top=S(this.top),this.bottom=S(this.bottom),this},f}();P.Offsets=b},8900:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Point=void 0;var b=function(){function f(S,T){this.x=S,this.y=T}return f.zero=function(){return new f(0,0)},f.fromNumber=function(S){return new f(S,S)},f.prototype.isZero=function(){return 0===this.x&&0===this.y},f.prototype.toString=function(){return JSON.stringify(this)},f.prototype.copyFrom=function(S){this.x=S.x,this.y=S.y},f.prototype.clone=function(){return new f(this.x,this.y)},f.prototype.equals=function(S){return this.x===S.x&&this.y===S.y},f.prototype.offset=function(S,T){return this.x+=S,this.y+=T,this},f.prototype.offsetByPoint=function(S){return this.x+=S.x,this.y+=S.y,this},f.prototype.multiply=function(S,T){return this.x*=S,this.y*=T,this},f.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},f.prototype.applyConverter=function(S){return this.x=S(this.x),this.y=S(this.y),this},f.plus=function(S,T){return new f(S.x+T.x,S.y+T.y)},f.minus=function(S,T){return new f(S.x-T.x,S.y-T.y)},f.xComparer=function(S,T){return S.x-T.x},f.yComparer=function(S,T){return S.y-T.y},f.equals=function(S,T){return S.x===T.x&&S.y===T.y},f}();P.Point=b},8011:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RectangleDeviation=P.HitTestDeviation=P.Rectangle=void 0;var f,u,S=b(7820),T=b(1104),y=b(8860),d=b(8900),c=b(6353),s=function(){function u(h,g,_,x){this.x=h,this.y=g,this.width=_,this.height=x}return Object.defineProperty(u.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"center",{get:function(){return u.center(this)},enumerable:!1,configurable:!0}),u.prototype.createRectangle=function(){return new u(this.x,this.y,this.width,this.height)},u.prototype.createSize=function(){return new c.Size(this.width,this.height)},u.prototype.createPosition=function(){return new d.Point(this.x,this.y)},u.prototype.createVerticalInterval=function(){return new y.FixedInterval(this.y,this.height)},u.prototype.createHorizontalInterval=function(){return new y.FixedInterval(this.x,this.width)},u.fromGeometry=function(h,g){return new u(h.x,h.y,g.width,g.height)},u.fromPoints=function(h,g){return new u(Math.min(h.x,g.x),Math.min(h.y,g.y),Math.abs(h.x-g.x),Math.abs(h.y-g.y))},u.fromPositions=function(h,g,_,x){return new u(Math.min(h,_),Math.min(g,x),Math.abs(_-h),Math.abs(x-g))},u.fromCenter=function(h,g){return new u(h.x-g,h.y-g,2*g,2*g)},u.prototype.isCollapsed=function(){return 0===this.width||0===this.height},u.prototype.isEmpty=function(){return 0===this.x&&0===this.y&&0===this.width&&0===this.height},u.prototype.toString=function(){return JSON.stringify(this)},u.prototype.setPosition=function(h){return this.x=h.x,this.y=h.y,this},u.prototype.setSize=function(h){return this.width=h.width,this.height=h.height,this},u.prototype.setGeomerty=function(h){return this.x=h.x,this.y=h.y,this.width=h.width,this.height=h.height,this},u.prototype.moveRectangle=function(h,g){return this.x+=h,this.y+=g,this},u.prototype.moveRectangleByPoint=function(h){return this.x+=h.x,this.y+=h.y,this},u.prototype.resize=function(h,g){return this.width+=h,this.height+=g,this},u.prototype.nonNegativeSize=function(){return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this},u.prototype.multiply=function(h,g){return this.x*=h,this.y*=g,this.width*=h,this.height*=g,this},u.prototype.equals=function(h){return u.equals(this,h)},u.prototype.clone=function(){var h=new u(0,0,0,0);return h.copyFrom(this),h},u.prototype.copyFrom=function(h){this.x=h.x,this.y=h.y,this.width=h.width,this.height=h.height},u.prototype.containsPoint=function(h){return u.containsPoint(this,h)},u.prototype.containsRectangle=function(h){return this.x<=h.x&&this.right>=h.right&&this.y<=h.y&&this.bottom>=h.bottom},u.prototype.inflate=function(h,g){return void 0===g&&(g=h),this.x-=h,this.y-=g,this.width+=2*h,this.height+=2*g,this},u.prototype.applyOffsetsInside=function(h){return this.x+=h.left,this.y+=h.top,this.width-=h.left+h.right,this.height-=h.top+h.bottom,this},u.prototype.applyNormalizedOffsetsInside=function(h){var g=Math.max(0,h.left),_=g+Math.max(0,h.right);0!==_&&(_<=this.width?(this.x+=g,this.width-=_):(this.x+=this.width*(g/_),this.width=0));var x=Math.max(0,h.top),w=x+Math.max(0,h.bottom);return 0!==w&&(w<=this.height?(this.y+=x,this.height-=w):(this.y+=this.height*(x/w),this.height=0)),this},u.prototype.applyOffsetsOutside=function(h){return this.x-=h.left,this.y-=h.top,this.width+=h.left+h.right,this.height+=h.top+h.bottom,this},u.prototype.applyConverter=function(h){return this.x=h(this.x),this.y=h(this.y),this.width=h(this.width),this.height=h(this.height),this},u.getHorizIntersection=function(h,g){return T.IntervalAlgorithms.getIntersection(new y.FixedInterval(h.x,h.width),new y.FixedInterval(g.x,g.width))},u.getVertIntersection=function(h,g){return T.IntervalAlgorithms.getIntersection(new y.FixedInterval(h.y,h.height),new y.FixedInterval(g.y,g.height))},u.getIntersection=function(h,g){var _=T.IntervalAlgorithms.getIntersection(new y.FixedInterval(h.x,h.width),new y.FixedInterval(g.x,g.width));if(!_)return null;var x=T.IntervalAlgorithms.getIntersection(new y.FixedInterval(h.y,h.height),new y.FixedInterval(g.y,g.height));return x?new u(_.start,x.start,_.length,x.length):null},u.getHorNonCollapsedIntersection=function(h,g){var _=u.getHorizIntersection(h,g);return _&&!_.isCollapsed()?_:null},u.getVertNonCollapsedIntersection=function(h,g){var _=u.getVertIntersection(h,g);return _&&!_.isCollapsed()?_:null},u.getNonCollapsedIntersection=function(h,g){var _=u.getIntersection(h,g);return _&&!_.isCollapsed()?_:null},u.areIntersected=function(h,g){return!(h.x>g.x+g.width||g.x>h.x+h.width||h.y>g.y+g.height||g.y>h.y+h.height)},u.union=function(h,g){var _=Math.max(h.x+h.width,g.x+g.width),x=Math.max(h.y+h.height,g.y+g.height),w=Math.min(h.x,g.x),D=Math.min(h.y,g.y);return new u(w,D,_-w,x-D)},u.equals=function(h,g){return h.x===g.x&&h.y===g.y&&h.width===g.width&&h.height===g.height},u.center=function(h){return new d.Point(h.x+h.width/2,h.y+h.height/2)},u.containsPoint=function(h,g){return g.y>=h.y&&h.y+h.height>=g.y&&g.x>=h.x&&h.x+h.width>=g.x},u}();P.Rectangle=s,(u=f=P.HitTestDeviation||(P.HitTestDeviation={}))[u.None=0]="None",u[u.Top=1]="Top",u[u.Bottom=2]="Bottom",u[u.Left=4]="Left",u[u.Right=8]="Right";var a=function(){function u(h,g){this.initRectangle=h,this.initPoint=g,this.deviation=new S.Flag(f.None)}return u.prototype.calcDeviation=function(){return this.initPoint.x<this.initRectangle.x?this.deviation.set(f.Left,!0):this.initPoint.x>this.initRectangle.right&&this.deviation.set(f.Right,!0),this.initPoint.y<this.initRectangle.y?this.deviation.set(f.Top,!0):this.initPoint.y>this.initRectangle.bottom&&this.deviation.set(f.Bottom,!0),this},u.prototype.calcAdditionalParams=function(){return this.insidePoint=this.initPoint.clone(),this.offsetToInside=new d.Point(0,0),this.deviation.get(f.Left)?(this.insidePoint.x=this.initRectangle.x,this.offsetToInside.x=this.insidePoint.x-this.initPoint.x):this.deviation.get(f.Right)&&(this.insidePoint.x=this.initRectangle.right,this.offsetToInside.x=this.initPoint.x-this.insidePoint.x),this.deviation.get(f.Top)?(this.insidePoint.y=this.initRectangle.y,this.offsetToInside.y=this.insidePoint.y-this.initPoint.y):this.deviation.get(f.Bottom)&&(this.insidePoint.y=this.initRectangle.bottom,this.offsetToInside.y=this.initPoint.y-this.insidePoint.y),this},u}();P.RectangleDeviation=a},1335:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Segment=void 0;var f=b(8679),S=b(5596),T=b(8900),y=b(8011),d=function(){function c(s,a){this.startPoint=s,this.endPoint=a}return Object.defineProperty(c.prototype,"length",{get:function(){return S.Metrics.euclideanDistance(this.startPoint,this.endPoint)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"xLength",{get:function(){return Math.abs(this.endPoint.x-this.startPoint.x)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"yLength",{get:function(){return Math.abs(this.endPoint.y-this.startPoint.y)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"center",{get:function(){return new T.Point(this.startPoint.x+(this.endPoint.x-this.startPoint.x)/2,this.startPoint.y+(this.endPoint.y-this.startPoint.y)/2)},enumerable:!1,configurable:!0}),c.prototype.isIntersected=function(s){return this.startPoint.equals(s.startPoint)||this.endPoint.equals(s.startPoint)||this.startPoint.equals(s.endPoint)||this.endPoint.equals(s.endPoint)||this.intersectCore(s)&&s.intersectCore(this)},c.prototype.containsPoint=function(s,a){return void 0===a&&(a=1e-7),this.startPoint.equals(s)||this.endPoint.equals(s)||f.MathUtils.numberCloseTo(this.length,S.Metrics.euclideanDistance(this.startPoint,s)+S.Metrics.euclideanDistance(this.endPoint,s),a)},c.prototype.isIntersectedByRect=function(s){if(y.Rectangle.containsPoint(s,this.startPoint)||y.Rectangle.containsPoint(s,this.endPoint))return!0;var a=s.x,u=s.x+s.width,h=s.y,g=s.y+s.height;return this.isIntersected(new c(new T.Point(a,h),new T.Point(a,g)))||this.isIntersected(new c(new T.Point(u,h),new T.Point(u,g)))||this.isIntersected(new c(new T.Point(a,h),new T.Point(u,h)))||this.isIntersected(new c(new T.Point(a,g),new T.Point(u,g)))},c.prototype.intersectCore=function(s){if(this.startPoint.x===this.endPoint.x){if(this.startPoint.x-s.endPoint.x!=0)return(this.startPoint.x-s.startPoint.x)/(this.startPoint.x-s.endPoint.x)<=0;if(s.endPoint.y-this.endPoint.y!=0)return(s.endPoint.y-this.startPoint.y)/(s.endPoint.y-this.endPoint.y)<=0}if(this.startPoint.y===this.endPoint.y){if(this.startPoint.y-s.endPoint.y!=0)return(this.startPoint.y-s.startPoint.y)/(this.startPoint.y-s.endPoint.y)<=0;if(s.endPoint.x-this.endPoint.x!=0)return(s.endPoint.x-this.startPoint.x)/(s.endPoint.x-this.endPoint.x)<=0}var a=(this.endPoint.y-this.startPoint.y)/(this.endPoint.x-this.startPoint.x),u=this.startPoint.y+(s.startPoint.x-this.startPoint.x)*a,h=this.startPoint.y+(s.endPoint.x-this.startPoint.x)*a,g=s.startPoint.y-u,_=s.endPoint.y-h;return 0===g&&0===_?(this.startPoint.y-u)/(this.endPoint.y-u)<=0||(this.startPoint.y-h)/(this.endPoint.y-h)<=0:0===g||0===_||g/_<0},c}();P.Segment=d},6353:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Size=void 0;var b=function(){function f(S,T){this.width=S,this.height=T}return f.empty=function(){return new f(0,0)},f.fromNumber=function(S){return new f(S,S)},f.initByCommonAction=function(S){var T=function(d){return d.width},y=function(d){return d.height};return new f(S(T,y),S(y,T))},f.prototype.isEmpty=function(){return 0===this.width&&0===this.height},f.prototype.toString=function(){return JSON.stringify(this)},f.prototype.nonNegativeSize=function(){return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this},f.prototype.offset=function(S,T){return this.width=this.width+S,this.height=this.height+T,this},f.prototype.multiply=function(S,T){return this.width*=S,this.height*=T,this},f.prototype.equals=function(S){return this.width===S.width&&this.height===S.height},f.prototype.clone=function(){return new f(this.width,this.height)},f.prototype.copyFrom=function(S){this.width=S.width,this.height=S.height},f.prototype.applyConverter=function(S){return this.width=S(this.width),this.height=S(this.height),this},f.equals=function(S,T){return S.width===T.width&&S.height===T.height},f}();P.Size=b},9716:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Vector=void 0;var b=function(){function f(S,T){void 0===S&&(S=0),void 0===T&&(T=0),this.x=S,this.y=T}return Object.defineProperty(f.prototype,"length",{get:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},enumerable:!1,configurable:!0}),f.fromPoints=function(S,T){return new f(T.x-S.x,T.y-S.y)},f.fromSegment=function(S){return new f(S.endPoint.x-S.startPoint.x,S.endPoint.y-S.startPoint.y)},f.prototype.normalize=function(){var S=this.length;return 0!==S&&(this.x/=S,this.y/=S),this},f.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},Object.defineProperty(f,"axisX",{get:function(){return new f(1,0)},enumerable:!1,configurable:!0}),Object.defineProperty(f,"axisY",{get:function(){return new f(0,1)},enumerable:!1,configurable:!0}),f.angleBetween=function(S,T){var y=f.scalarProduct(S,T)/(S.length*T.length);return Math.acos(y)},f.scalarProduct=function(S,T){return S.x*T.x+S.y*T.y},f}();P.Vector=b},1104:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.IntervalAlgorithms=void 0;var f=b(2940),S=b(2400),T=b(8860),y=b(6102),d=function(){function c(){}return c.oneConstainsOtherArraysOfInterval=function(s,a){for(var u=f.ListUtils.deepCopy(a),h=u.pop();h;){if(!f.ListUtils.unsafeAnyOf(s,function(g){return g.containsInterval(h)}))return!1;h=u.pop()}return!0},c.getIntersection=function(s,a){return c.getIntersectionTemplate(s,a,s)},c.getIntersectionTemplate=function(s,a,u){var h=Math.max(s.start,a.start),g=Math.min(s.end,a.end);return h>g?null:u.makeByStartEnd(h,g)},c.getIntersectionNonNullLength=function(s,a){return c.getIntersectionNonNullLengthTemplate(s,a,s)},c.getIntersectionNonNullLengthTemplate=function(s,a,u){var h=c.getIntersectionTemplate(s,a,u);return h&&h.length?h:null},c.getIntersectionsTwoArraysOfInterval=function(s,a){return c.getIntersectionsTwoArraysOfIntervalTemplate(s,a,s[0])},c.getIntersectionsTwoArraysOfIntervalTemplate=function(s,a,u){for(var h=[],g=s.length,_=a.length,x=0,w=0,D=s[x],C=a[w],I=null;x<g&&w<_;){var L=c.getIntersectionTemplate(D,C,u);L&&(I&&I.end===L.start?I.length+=L.length:h.push(I=L)),D.end<C.end?D=s[++x]:C=a[++w]}return h},c.getAffectedObjects=function(s,a,u,h){return void 0===u&&(u=function(g){return S.SearchUtils.normedInterpolationIndexOf(s,function(_){return _.interval.start},g)}),void 0===h&&(h=function(g,_,x){return g.start===x&&0===_}),c.getAffectedObjectsTemplate(s,a,a[0],u,h)},c.getAffectedObjectsTemplate=function(s,a,u,h,g){void 0===h&&(h=function(G){return S.SearchUtils.normedInterpolationIndexOf(s,function(k){return k.interval.start},G)}),void 0===g&&(g=function(G,k,U){return G.start===U&&0===k});for(var _=new y.SparseIntervalsCollector(u),x=0,w=a;x<w.length;x++)for(var D=w[x],C=Math.max(0,h(D.start,s)),I=void 0;I=s[C];C++){var L=I.interval;if(L.start>D.end)break;var N=c.getIntersectionTemplate(L,D,u);N&&(N.length||g(L,D.length,N.start))&&_.add(C)}return _.getIntervals()},c.handleAffectedObjects=function(s,a,u,h){void 0===h&&(h=function(N){return S.SearchUtils.normedInterpolationIndexOf(s,function(G){return G.interval.start},N)});for(var g=new T.FixedInterval(0,0),_=0,x=a;_<x.length;_++)for(var w=x[_],D=Math.max(0,h(w.start,s)),C=void 0;C=s[D];D++){var I=C.interval;if(I.start>w.end)break;var L=c.getIntersectionTemplate(I,w,g);L&&u(C,D,w,L)}},c.getMergedIntervals=function(s,a){return c.getMergedIntervalsTemplate(s,a,s[0])},c.getMergedIntervalsTemplate=function(s,a,u){if(s.length<2)return s.length>0?[u.makeByStartLength(s[0].start,s[0].length)]:[];for(var h=a?[].concat(s).sort(function(C,I){return C.start-I.start}):s,g=[],_=0,x=void 0;x=h[_];){var w=x.start,D=x.end;for(++_;void 0!==(x=h[_])&&x.start<=D;_++)x.end>D&&(D=x.end);g.push(u.makeByStartEnd(w,D))}return g},c.reflectIntervals=function(s,a){return c.reflectIntervalsTemplate(s,a,a)},c.reflectIntervalsTemplate=function(s,a,u){if(!s.length)return[u.makeByStartLength(a.start,a.length)];var h=f.ListUtils.last(s).end,g=f.ListUtils.reducedMap(s,function(_,x){return c.getIntersectionNonNullLengthTemplate(u.makeByStartEnd(s[x-1].end,_.start),a,u)},1);return a.start<s[0].start&&g.unshift(u.makeByStartEnd(a.start,s[0].start)),a.end>h&&g.push(u.makeByStartEnd(h,a.end)),g},c.reflectionOfPointOnInterval=function(s,a,u){return(s-a.start)/a.length*u.length+u.start},c}();P.IntervalAlgorithms=d},7814:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConstInterval=void 0;var b=function(){function f(){}return Object.defineProperty(f.prototype,"center",{get:function(){return this.start+this.length/2},enumerable:!1,configurable:!0}),f.prototype.isNormalized=function(){return this.end>=this.start},f.prototype.isCollapsed=function(){return 0===this.length},f.prototype.equals=function(S){return this.start===S.start&&this.end===S.end},f.isCollapsed=function(S){return!S[1]&&S[0].isCollapsed()},f.prototype.containsInterval=function(S){return this.start<=S.start&&this.end>=S.end},f.prototype.containsIntervalWithoutEnd=function(S){return this.start<=S.start&&this.end>S.end},f.prototype.contains=function(S){return this.start<=S&&S<this.end},f.prototype.containsWithIntervalEnd=function(S){return this.start<=S&&S<=this.end},f.prototype.containsWithoutIntervalEndAndStart=function(S){return this.start<S&&S<this.end},f}();P.ConstInterval=b},8860:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FixedInterval=void 0;var f=b(655),S=function(T){function y(d,c){var s=T.call(this)||this;return s.start=d,s.length=c,s}return f.__extends(y,T),Object.defineProperty(y.prototype,"end",{get:function(){return this.start+this.length},set:function(d){this.length=d-this.start},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"center",{get:function(){return this.start+this.length/2},enumerable:!1,configurable:!0}),y.prototype.copyFrom=function(d){this.start=d.start,this.length=d.length},y.prototype.equals=function(d){return d&&this.start===d.start&&this.length===d.length},y.prototype.clone=function(){return new y(this.start,this.length)},y.prototype.makeByStartEnd=function(d,c){return new y(d,c-d)},y.prototype.makeByStartLength=function(d,c){return new y(d,c)},y.prototype.makeByLengthEnd=function(d,c){return new y(c-d,d)},y.fromPositions=function(d,c){return new y(d,c-d)},y.makeByConstInterval=function(d){return new y(d.start,d.length)},y.prototype.expand=function(d){var c=Math.max(d.end,this.end);return this.start=Math.min(d.start,this.start),this.end=c,this},y}(b(8678).MutableInterval);P.FixedInterval=S},8678:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.MutableInterval=void 0;var f=b(655),S=function(T){function y(){return null!==T&&T.apply(this,arguments)||this}return f.__extends(y,T),y.prototype.normalizeLength=function(){return this.length<0&&(this.length=0),this},y}(b(7814).ConstInterval);P.MutableInterval=S},6102:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SparseIntervalsCollector=void 0;var f=b(448),S=function(){function T(y){this.intervals=[],this.template=y}return T.prototype.add=function(y){this.curr&&this.curr.end===y?this.curr.length++:(this.curr=this.template.makeByStartLength(y,1),this.intervals.push(this.curr))},T.prototype.getIntervals=function(){return new f.SparseIntervals(this.intervals)},T}();P.SparseIntervalsCollector=S},448:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SparseIntervals=void 0;var f=b(8094),S=b(510),T=function(){function y(d){void 0===d&&(d=[]),this.list=d,this._count=0,this._numIntervals=0;for(var c=0,s=d;c<s.length;c++)this._count+=s[c].length,this._numIntervals++}return Object.defineProperty(y.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"numIntervals",{get:function(){return this._numIntervals},enumerable:!1,configurable:!0}),y.prototype.getInterval=function(d){return this.list[d]},y.prototype.getNativeIterator=function(){return new f.SparseIntervalsIterator(this)},y.prototype.getObjectsIterator=function(d){return new S.SparseObjectsIterator(this,d)},y}();P.SparseIntervals=T},8094:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SparseIntervalsIterator=void 0;var b=function(){function f(S){this.sparseIntervals=S,this.intervalIndex=-1}return Object.defineProperty(f.prototype,"isStarted",{get:function(){return!!this.curr},enumerable:!1,configurable:!0}),f.prototype.moveNext=function(){return this.curr&&this.posInInterval+1<this.curr.length?(this.posInInterval++,this.index++,this.initObject(),!0):this.intervalIndex+1<this.sparseIntervals.numIntervals&&(this.intervalIndex++,this.curr=this.sparseIntervals.getInterval(this.intervalIndex),this.curr.length?(this.posInInterval=0,this.index=this.curr.start,this.initObject(),!0):this.moveNext())},f.prototype.movePrev=function(){return this.curr&&this.posInInterval-1>=this.curr.start?(this.posInInterval--,this.index--,this.initObject(),!0):(this.isStarted||(this.intervalIndex=this.sparseIntervals.numIntervals),this.intervalIndex-1>=0&&(this.intervalIndex--,this.curr=this.sparseIntervals.getInterval(this.intervalIndex),this.posInInterval=Math.max(this.curr.length-1,this.curr.start),this.index=this.curr.start,this.initObject(),!0))},f.prototype.initObject=function(){},f}();P.SparseIntervalsIterator=b},510:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SparseObjectsIterator=void 0;var f=b(655),S=function(T){function y(d,c){var s=T.call(this,d)||this;return s.objects=c,s}return f.__extends(y,T),y.prototype.initObject=function(){this.obj=this.objects[this.index]},y}(b(8094).SparseIntervalsIterator);P.SparseObjectsIterator=S},6477:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Base64Utils=void 0;var f=b(2674),S=b(4633),T=function(){function y(){}return y.normalizeToDataUrl=function(d,c){return y.checkPrependDataUrl(d)||(d=y.prependByDataUrl(d,c)),d},y.prependByDataUrl=function(d,c){return"data:"+c+";base64,"+d},y.checkPrependDataUrl=function(d){return y.dataUrl.test(d)},y.deleteDataUrlPrefix=function(d){return d.replace(y.dataUrl,"")},y.getUint8Array=function(d){for(var c=(d=atob(d)).length,s=new Uint8Array(c);c--;)s[c]=d.charCodeAt(c);return s},y.fromArrayBuffer=function(d){for(var c=[],s=new Uint8Array(d),a=s.byteLength,u=0;u<a;u++)c.push(String.fromCharCode(s[u]));return window.btoa(c.join(""))},y.getFileFromBase64=function(d,c,s){void 0===c&&(c="");var a=y.getUint8Array(d);return f.FileUtils.createFile([a],c,s)},y.getMimeTypeAsString=function(d){var c=d.match(y.dataUrl);return c?c[1]:null},y.getKnownMimeType=function(d){var c=d.match(y.dataUrl);return c?S.MimeTypeUtils.stringTypeToType(c[1]):S.DxMimeType.Unknown},y.fromBlobAsArrayBuffer=function(d,c){var s=new FileReader;s.onloadend=function(){return c(y.fromArrayBuffer(s.result))},s.readAsArrayBuffer(d)},y.fromBlobAsDataUrl=function(d,c){var s=new FileReader;s.onloadend=function(){return c(s.result)},s.readAsDataURL(d)},y.dataUrl=/^data:(.*?)(;(.*?))??(;base64)?,/,y}();P.Base64Utils=T},13:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ColorUtils=void 0;var f=b(49),S=function(){function T(){}return T.getAlpha=function(y){return y>>24&255},T.getRed=function(y){return y>>16&255},T.getGreen=function(y){return y>>8&255},T.getBlue=function(y){return 255&y},T.redPartToString=function(y){var d=T.getRed(y).toString(16);return d.length>1?d:"0"+d},T.greenPartToString=function(y){var d=T.getGreen(y).toString(16);return d.length>1?d:"0"+d},T.bluePartToString=function(y){var d=T.getBlue(y).toString(16);return d.length>1?d:"0"+d},T.fromArgbNumber=function(y,d,c,s){return y<<24|d<<16|c<<8|s},T.fromRgbaString=function(y,d){void 0===d&&(d=255);var c=y.replace(/ +/g,"").match(/(rgba?)|(\d+(\.\d+)?%?)|(\.\d+)/g);if(c&&c.length>3){for(var s=[],a=1,u=void 0;u=c[a];a++){var h=-1!==u.indexOf("%")?Math.round(2.55*parseFloat(u)):parseInt(u);if(h<0||h>255)return null;s.push(h)}if(0===y.indexOf("rgba")){if(isNaN(s[3])||s[3]<0||s[3]>1)return null;s[3]<=1&&(s[3]=Math.round(255*s[3]))}else if(s[3])return null;return(255&s[0])<<16|(255&s[1])<<8|255&s[2]|(255&(s.length>3?s[3]:d))<<24}return null},T.fromHashString=function(y,d){return void 0===d&&(d=255),T.isHashColorString(y)?("#"===y.charAt(0)&&(y=y.substr(1)),3===y.length&&(y=f.StringUtils.repeat(y.charAt(0),2)+f.StringUtils.repeat(y.charAt(1),2)+f.StringUtils.repeat(y.charAt(2),2)),parseInt(y,16)|d<<24):null},T.fromColorName=function(y,d){void 0===d&&(d=255);var c=T.colorNames[y.toLowerCase()];return c?T.fromHashString(c,d):null},T.fromString=function(y,d){void 0===d&&(d=255);var c=T.fromRgbaString(y,d);if(null!==c)return c;var s=T.fromHashString(y,d);return null!==s?s:T.fromColorName(y,d)},T.colorToHash=function(y){return"#"+T.redPartToString(y)+T.greenPartToString(y)+T.bluePartToString(y)},T.stringToHash=function(y){var d=this.fromString(y);return null!==d?this.colorToHash(d):null},T.isHashColorString=function(y){return/^#?([0-9a-f]{6})$/i.test(y)||/^#?([0-9a-f]{3})$/i.test(y)},T.isKnownColorName=function(y){return!!T.colorNames[y.toLowerCase()]},T.isGray=function(y){var d=T.getRed(y);return d===T.getGreen(y)&&d===T.getBlue(y)},T.DARK_COLOR=-16777216,T.LIGHT_COLOR=-1,T.colorNames={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#00ff00",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",windowtext:"#000000"},T}();P.ColorUtils=S},2491:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.numberToStringHex=P.numberToStringBin=P.isOdd=P.isEven=P.isNonNullString=P.isString=P.isNumber=P.boolToString=P.boolToInt=P.isDefined=void 0;var f=b(49);P.isDefined=function(S){return null!=S},P.boolToInt=function(S){return S?1:0},P.boolToString=function(S){return S?"1":"0"},P.isNumber=function(S){return"number"==typeof S},P.isString=function(S){return"string"==typeof S},P.isNonNullString=function(S){return!!S},P.isEven=function(S){return S%2!=0},P.isOdd=function(S){return S%2==0},P.numberToStringBin=function(S,T){return void 0===T&&(T=0),f.StringUtils.padLeft(S.toString(2),T,"0")},P.numberToStringHex=function(S,T){return void 0===T&&(T=0),f.StringUtils.padLeft(S.toString(16),T,"0")}},4170:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Equals=P.Comparers=void 0;var b=function(){function S(){}return S.number=function(T,y){return T-y},S.string=function(T,y){return T===y?0:T>y?1:-1},S.stringIgnoreCase=function(T,y){return(T=T.toLowerCase())===(y=y.toLowerCase())?0:T>y?1:-1},S}();P.Comparers=b;var f=function(){function S(){}return S.simpleType=function(T,y){return T===y},S.object=function(T,y){return T&&y&&(T===y||T.equals(y))},S}();P.Equals=f},6907:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DomUtils=void 0;var f=b(9279),S=b(2491),T=b(8679),y=b(49),d=function(){function a(){}return a.clearInnerHtml=function(u){for(;u.firstChild;)u.removeChild(u.firstChild)},a.setStylePosition=function(u,h){u.left=T.MathUtils.round(h.x,3)+"px",u.top=T.MathUtils.round(h.y,3)+"px"},a.setStyleSize=function(u,h){u.width=T.MathUtils.round(h.width,3)+"px",u.height=T.MathUtils.round(h.height,3)+"px"},a.setStyleSizeAndPosition=function(u,h){a.setStylePosition(u,h),a.setStyleSize(u,h)},a.hideNode=function(u){if(u){var h=u.parentNode;h&&h.removeChild(u)}},a.isHTMLElementNode=function(u){return u.nodeType===Node.ELEMENT_NODE},a.isTextNode=function(u){return u.nodeType===Node.TEXT_NODE},a.isElementNode=function(u){return u.nodeType===Node.ELEMENT_NODE},a.isHTMLTableRowElement=function(u){return"TR"===u.tagName},a.isItParent=function(u,h){if(!u||!h)return!1;for(;h;){if(h===u)return!0;if("BODY"===h.tagName)return!1;h=h.parentNode}return!1},a.getParentByTagName=function(u,h){for(h=h.toUpperCase();u;){if("BODY"===u.tagName)return null;if(u.tagName===h)return u;u=u.parentNode}return null},a.getDocumentScrollTop=function(){var u=f.Browser.IE&&"hidden"===a.getCurrentStyle(document.body).overflow&&document.body.scrollTop>0;return f.Browser.WebKitFamily||f.Browser.Edge||u?f.Browser.MacOSMobilePlatform?window.pageYOffset:f.Browser.WebKitFamily&&document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop},a.getDocumentScrollLeft=function(){var u=f.Browser.IE&&"hidden"===a.getCurrentStyle(document.body).overflow&&document.body.scrollLeft>0;return f.Browser.Edge||u?document.body?document.body.scrollLeft:document.documentElement.scrollLeft:f.Browser.WebKitFamily?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft},a.getCurrentStyle=function(u){if(u.currentStyle)return u.currentStyle;if(document.defaultView&&document.defaultView.getComputedStyle){var h=document.defaultView.getComputedStyle(u,null);if(!h&&f.Browser.Firefox&&window.frameElement){for(var g=[],_=window.frameElement;!(h=document.defaultView.getComputedStyle(u,null));)g.push([_,_.style.display]),_.style.setProperty("display","block","important"),_="BODY"===_.tagName?_.ownerDocument.defaultView.frameElement:_.parentNode;h=function(D){if("object"!=typeof D||!S.isDefined(D))return D;var C={};for(var I in D)C[I]=D[I];return C}(h);for(var x=void 0,w=0;x=g[w];w++)x[0].style.display=x[1];document}return h}return window.getComputedStyle(u,null)},a.setFocus=function(u){function h(){try{u.focus(),f.Browser.IE&&document.activeElement!==u&&u.focus()}catch{}}f.Browser.MacOSMobilePlatform?h():setTimeout(function(){h()},100)},a.hasClassName=function(u,h){try{var g=h.split(" "),_=u.classList;if(_){for(var x=g.length-1;x>=0;x--)if(!_.contains(g[x]))return!1}else{var w=u.getAttribute&&u.getAttribute("class");if(!w)return!1;var D=w.split(" ");for(x=g.length-1;x>=0;x--)if(D.indexOf(g[x])<0)return!1}return!0}catch{return!1}},a.addClassName=function(u,h){if(!a.hasClassName(u,h)){var g=u.getAttribute&&u.getAttribute("class");u.setAttribute("class",""===g?h:g+" "+h)}},a.removeClassName=function(u,h){var g=" "+(u.getAttribute&&u.getAttribute("class"))+" ",_=g.replace(" "+h+" "," ");g.length!==_.length&&u.setAttribute("class",y.StringUtils.trim(_))},a.toggleClassName=function(u,h,g){void 0===g?a.hasClassName(u,h)?a.removeClassName(u,h):a.addClassName(u,h):g?a.addClassName(u,h):a.removeClassName(u,h)},a.pxToInt=function(u){return c(u,parseInt)},a.pxToFloat=function(u){return c(u,parseFloat)},a.getAbsolutePositionY=function(u){function h(g){return Math.round(g.getBoundingClientRect().top+a.getDocumentScrollTop())}return u?f.Browser.IE?(g=u,f.Browser.IE&&null===g.parentNode?0:g.getBoundingClientRect().top+a.getDocumentScrollTop()):f.Browser.Firefox&&f.Browser.Version>=3?h(u):f.Browser.NetscapeFamily&&(!f.Browser.Firefox||f.Browser.Version<3)?function(g){for(var _=s(g,!1),x=!0;null!=g;){if(_+=g.offsetTop,x||null==g.offsetParent||(_-=g.scrollTop),!x&&f.Browser.Firefox){var w=a.getCurrentStyle(g);"DIV"===g.tagName&&"visible"!==w.overflow&&(_+=a.pxToInt(w.borderTopWidth))}x=!1,g=g.offsetParent}return _}(u):f.Browser.WebKitFamily||f.Browser.Edge?h(u):function(g){for(var _=0,x=!0;null!=g;)_+=g.offsetTop,x||null==g.offsetParent||(_-=g.scrollTop),x=!1,g=g.offsetParent;return _}(u):0;var g},a.getAbsolutePositionX=function(u){function h(g){return Math.round(g.getBoundingClientRect().left+a.getDocumentScrollLeft())}return u?f.Browser.IE?(g=u,f.Browser.IE&&null===g.parentNode?0:g.getBoundingClientRect().left+a.getDocumentScrollLeft()):f.Browser.Firefox&&f.Browser.Version>=3?h(u):f.Browser.Opera&&f.Browser.Version<=12?function(g){for(var _=!0,x=s(g,!0);null!=g;)x+=g.offsetLeft,_||(x-=g.scrollLeft),g=g.offsetParent,_=!1;return x+document.body.scrollLeft}(u):f.Browser.NetscapeFamily&&(!f.Browser.Firefox||f.Browser.Version<3)?function(g){for(var _=s(g,!0),x=!0;null!=g;){if(_+=g.offsetLeft,x||null==g.offsetParent||(_-=g.scrollLeft),!x&&f.Browser.Firefox){var w=a.getCurrentStyle(g);"DIV"===g.tagName&&"visible"!==w.overflow&&(_+=a.pxToInt(w.borderLeftWidth))}x=!1,g=g.offsetParent}return _}(u):f.Browser.WebKitFamily||f.Browser.Edge?h(u):function(g){for(var _=0,x=!0;null!=g;)_+=g.offsetLeft,x||null==g.offsetParent||(_-=g.scrollLeft),x=!1,g=g.offsetParent;return _}(u):0;var g},a.isInteractiveControl=function(u){return["A","INPUT","SELECT","OPTION","TEXTAREA","BUTTON","IFRAME"].indexOf(u.tagName)>-1},a.getClearClientHeight=function(u){return u.offsetHeight-(a.getTopBottomPaddings(u)+a.getVerticalBordersWidth(u))},a.getTopBottomPaddings=function(u,h){var g=h||a.getCurrentStyle(u);return a.pxToInt(g.paddingTop)+a.pxToInt(g.paddingBottom)},a.getVerticalBordersWidth=function(u,h){S.isDefined(h)||(h=f.Browser.IE&&9!==f.Browser.MajorVersion&&window.getComputedStyle?window.getComputedStyle(u):a.getCurrentStyle(u));var g=0;return"none"!==h.borderTopStyle&&(g+=a.pxToFloat(h.borderTopWidth)),"none"!==h.borderBottomStyle&&(g+=a.pxToFloat(h.borderBottomWidth)),g},a.getNodes=function(u,h){for(var g=u.all||u.getElementsByTagName("*"),_=[],x=0;x<g.length;x++){var w=g[x];h(w)&&_.push(w)}return _},a.getChildNodes=function(u,h){for(var g=u.childNodes,_=[],x=0;x<g.length;x++){var w=g[x];h(w)&&_.push(w)}return _},a.getNodesByClassName=function(u,h){if(u.querySelectorAll){var g=u.querySelectorAll("."+h),_=[];return g.forEach(function(x){return _.push(x)}),_}return a.getNodes(u,function(x){return a.hasClassName(x,h)})},a.getChildNodesByClassName=function(u,h){return u.querySelectorAll?function(g,_){for(var x=[],w=0;w<g.length;w++){var D=g[w];_(D)&&x.push(D)}return x}(u.querySelectorAll("."+h),function(g){return g.parentNode===u}):a.getChildNodes(u,function(g){return!!a.isElementNode(g)&&S.isNonNullString(g.className)&&a.hasClassName(g,g.className)})},a.getVerticalScrollBarWidth=function(){if(void 0===a.verticalScrollBarWidth){var u=document.createElement("DIV");u.style.cssText="position: absolute; top: 0px; left: 0px; visibility: hidden; width: 200px; height: 150px; overflow: hidden; box-sizing: content-box",document.body.appendChild(u);var h=document.createElement("P");u.appendChild(h),h.style.cssText="width: 100%; height: 200px;";var g=h.offsetWidth;u.style.overflow="scroll";var _=h.offsetWidth;g===_&&(_=u.clientWidth),a.verticalScrollBarWidth=g-_,document.body.removeChild(u)}return a.verticalScrollBarWidth},a.getHorizontalBordersWidth=function(u,h){S.isDefined(h)||(h=f.Browser.IE&&window.getComputedStyle?window.getComputedStyle(u):a.getCurrentStyle(u));var g=0;return"none"!==h.borderLeftStyle&&(g+=a.pxToFloat(h.borderLeftWidth)),"none"!==h.borderRightStyle&&(g+=a.pxToFloat(h.borderRightWidth)),g},a.getFontFamiliesFromCssString=function(u){return u.split(",").map(function(h){return y.StringUtils.trim(h.replace(/'|"/gi,""))})},a.getInnerText=function(u){if(f.Browser.Safari&&f.Browser.MajorVersion<=5){null===a.html2PlainTextFilter&&((a.html2PlainTextFilter=document.createElement("DIV")).style.width="0",a.html2PlainTextFilter.style.height="0",a.html2PlainTextFilter.style.overflow="visible",a.html2PlainTextFilter.style.display="none",document.body.appendChild(a.html2PlainTextFilter));var h=a.html2PlainTextFilter;h.innerHTML=u.innerHTML,h.style.display="";var g=h.innerText;return h.style.display="none",g}return f.Browser.NetscapeFamily||f.Browser.WebKitFamily||f.Browser.IE&&f.Browser.Version>=9||f.Browser.Edge?u.textContent:u.innerText},a.html2PlainTextFilter=null,a.verticalScrollBarWidth=void 0,a}();function c(a,u){var h=0;if(S.isDefined(a)&&""!==a)try{var g=a.indexOf("px");g>-1&&(h=u(a.substr(0,g)))}catch{}return h}function s(a,u){for(var h=0,g=!0;null!=a&&"BODY"!==a.tagName;){var _=d.getCurrentStyle(a);if("absolute"===_.position)break;g||"DIV"!==a.tagName||""!==_.position&&"static"!==_.position||(h-=u?a.scrollLeft:a.scrollTop),a=a.parentNode,g=!1}return h}P.DomUtils=d},9712:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.EncodeUtils=void 0;var b=function(){function f(){}return f.encodeHtml=function(S){return S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},f.decodeHtml=function(S){return S.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},f.prepareTextForRequest=function(S){return S.replace(/%/g,"%25").replace(/&/g,"%26amp;").replace(/\+/g,"%2B").replace(/</g,"%26lt;").replace(/>/g,"%26gt;").replace(/"/g,"%26quot;")},f.prepareTextForCallBackRequest=function(S){return S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},f.decodeViaTextArea=function(S){var T=document.createElement("TEXTAREA");return T.innerHTML=S,T.value},f}();P.EncodeUtils=b},3714:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.EvtUtils=void 0;var f=b(9279),S=b(2491),T=b(6907),y=b(1632),d=function(){function c(){}return c.preventEvent=function(s){s.cancelable&&(s.preventDefault?s.preventDefault():s.returnValue=!1)},c.getEventSource=function(s){return S.isDefined(s)?c.getEventSourceCore(s):null},c.getEventSourceByPosition=function(s){if(!S.isDefined(s))return null;if(!document.elementFromPoint)return c.getEventSourceCore(s);var a=c.getEventX(s)-(c.clientEventRequiresDocScrollCorrection()?T.DomUtils.getDocumentScrollLeft():0),u=c.getEventY(s)-(c.clientEventRequiresDocScrollCorrection()?T.DomUtils.getDocumentScrollTop():0);return void 0===a||void 0===u?c.getEventSourceCore(s):document.elementFromPoint(a,u)},c.getEventSourceCore=function(s){return s.srcElement?s.srcElement:s.target},c.getMouseWheelEventName=function(){return f.Browser.Safari?"mousewheel":f.Browser.NetscapeFamily&&f.Browser.MajorVersion<17?"DOMMouseScroll":"wheel"},c.isLeftButtonPressed=function(s){return!!y.TouchUtils.isTouchEvent(s)||!!(s=f.Browser.IE&&S.isDefined(event)?event:s)&&(f.Browser.IE&&f.Browser.Version<11?!!f.Browser.MSTouchUI||s.button%2==1:f.Browser.WebKitFamily?"pointermove"===s.type||"pointerenter"===s.type||"pointerleave"===s.type?1===s.buttons:1===s.which:f.Browser.NetscapeFamily||f.Browser.Edge||f.Browser.IE&&f.Browser.Version>=11?c.isMoveEventName(s.type)?1===s.buttons:1===s.which:!f.Browser.Opera||0===s.button)},c.isMoveEventName=function(s){return s===y.TouchUtils.touchMouseMoveEventName||s===c.getMoveEventName()},c.getMoveEventName=function(){return window.PointerEvent?"pointermove":f.Browser.TouchUI?"touchmove":"mousemove"},c.preventEventAndBubble=function(s){c.preventEvent(s),s.stopPropagation&&s.stopPropagation(),s.cancelBubble=!0},c.clientEventRequiresDocScrollCorrection=function(){return f.Browser.AndroidDefaultBrowser||f.Browser.AndroidChromeBrowser||!(f.Browser.Safari&&f.Browser.Version<3||f.Browser.MacOSMobilePlatform&&f.Browser.Version<5.1)},c.getEventX=function(s){return y.TouchUtils.isTouchEvent(s)?y.TouchUtils.getEventX(s):s.clientX+(c.clientEventRequiresDocScrollCorrection()?T.DomUtils.getDocumentScrollLeft():0)},c.getEventY=function(s){return y.TouchUtils.isTouchEvent(s)?y.TouchUtils.getEventY(s):s.clientY+(c.clientEventRequiresDocScrollCorrection()?T.DomUtils.getDocumentScrollTop():0)},c.cancelBubble=function(s){s.cancelBubble=!0},c.getWheelDelta=function(s){var a;return a=f.Browser.NetscapeFamily&&f.Browser.MajorVersion<17?-s.detail:f.Browser.Safari?s.wheelDelta:-s.deltaY,f.Browser.Opera&&f.Browser.Version<9&&(a=-a),a},c}();P.EvtUtils=d},2674:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FileUtils=void 0;var f=b(9279),S=b(6477),T=b(2491),y=function(){function d(){}return d.loadJavascriptFile=function(c,s){var a,u=document.getElementsByTagName("head")[0];if(!u){u=document.createElement("head");var h=document.getElementsByTagName("body")[0];null===(a=h.parentNode)||void 0===a||a.insertBefore(u,h)}var g=document.createElement("script");return g.onload=s,g.src=c,u.appendChild(g),{htmlScriptElement:g}},d.startDownloadFileLocal=function(c,s){if(c instanceof ArrayBuffer&&(c=S.Base64Utils.fromArrayBuffer(c)),T.isString(c)&&(c=S.Base64Utils.getFileFromBase64(c)),window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(c,s);else{var a=document.createElement("a"),u=URL.createObjectURL(c);a.href=u,a.download=s,document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),window.URL.revokeObjectURL(u)},0)}},d.createFile=function(c,s,a){var u;if(f.Browser.IE||f.Browser.Edge&&f.Browser.MajorVersion<86){var h=new Blob(c,a);return h.lastModifiedDate=null!==(u=a?.lastModified)&&void 0!==u?u:Date.now(),h.name=s,h}return new File(c,s,a)},d.isFile=function(c){return f.Browser.IE||f.Browser.Edge&&f.Browser.MajorVersion<86?c instanceof File||c instanceof Blob&&T.isDefined(c.name):c instanceof File},d}();P.FileUtils=y},2153:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.KeyCode=P.ModifierKey=P.KeyUtils=void 0;var f,S,s,T=b(9279),y=b(9712),d=b(49),c=function(){function s(){}return s.getKeyModifiers=function(a){var u=0;return a.altKey&&(u|=f.Alt),a.ctrlKey&&(u|=f.Ctrl),a.shiftKey&&(u|=f.Shift),a.metaKey&&(u|=f.Meta),u},s.getShortcutCode=function(a,u,h,g,_){var x=a;return x|=u?f.Ctrl:0,x|=h?f.Shift:0,(x|=g?f.Alt:0)|(_?f.Meta:0)},s.getShortcutCodeByEvent=function(a){return s.getShortcutCode(s.getEventKeyCode(a),a.ctrlKey,a.shiftKey,a.altKey,!!T.Browser.MacOSPlatform&&a.metaKey)},s.getEventKeyCode=function(a){return T.Browser.NetscapeFamily||T.Browser.Opera?a.which:a.keyCode},s.parseShortcutString=function(a){if(!a)return 0;var u=!1,h=!1,g=!1,_=!1,x=null,w=a.toString().split("+");if(w.length>0)for(var D=0;D<w.length;D++){var C=d.StringUtils.trim(w[D].toUpperCase());switch(C){case"CONTROL":case"CONTROLKEY":case"CTRL":u=!0;break;case"SHIFT":case"SHIFTKEY":h=!0;break;case"ALT":g=!0;break;case"CMD":_=!0;break;case"F1":x=S.F1;break;case"F2":x=S.F2;break;case"F3":x=S.F3;break;case"F4":x=S.F4;break;case"F5":x=S.F5;break;case"F6":x=S.F6;break;case"F7":x=S.F7;break;case"F8":x=S.F8;break;case"F9":x=S.F9;break;case"F10":x=S.F10;break;case"F11":x=S.F11;break;case"F12":x=S.F12;break;case"RETURN":case"ENTER":x=S.Enter;break;case"HOME":x=S.Home;break;case"END":x=S.End;break;case"LEFT":x=S.Left;break;case"RIGHT":x=S.Right;break;case"UP":x=S.Up;break;case"DOWN":x=S.Down;break;case"PAGEUP":x=S.PageUp;break;case"PAGEDOWN":x=S.PageDown;break;case"SPACE":x=S.Space;break;case"TAB":x=S.Tab;break;case"BACKSPACE":case"BACK":x=S.Backspace;break;case"CONTEXT":x=S.ContextMenu;break;case"ESCAPE":case"ESC":x=S.Esc;break;case"DELETE":case"DEL":x=S.Delete;break;case"INSERT":case"INS":x=S.Insert;break;case"PLUS":x=43;break;default:x=C.charCodeAt(0)}}else alert(y.EncodeUtils.decodeViaTextArea("Invalid shortcut"));return s.getShortcutCode(x,u,h,g,_)},s}();P.KeyUtils=c,(s=f=P.ModifierKey||(P.ModifierKey={}))[s.None=0]="None",s[s.Ctrl=65536]="Ctrl",s[s.Shift=262144]="Shift",s[s.Alt=1048576]="Alt",s[s.Meta=16777216]="Meta",function(s){s[s.Backspace=8]="Backspace",s[s.Tab=9]="Tab",s[s.Enter=13]="Enter",s[s.Pause=19]="Pause",s[s.CapsLock=20]="CapsLock",s[s.Esc=27]="Esc",s[s.Space=32]="Space",s[s.PageUp=33]="PageUp",s[s.PageDown=34]="PageDown",s[s.End=35]="End",s[s.Home=36]="Home",s[s.Left=37]="Left",s[s.Up=38]="Up",s[s.Right=39]="Right",s[s.Down=40]="Down",s[s.Insert=45]="Insert",s[s.Delete=46]="Delete",s[s.Key_0=48]="Key_0",s[s.Key_1=49]="Key_1",s[s.Key_2=50]="Key_2",s[s.Key_3=51]="Key_3",s[s.Key_4=52]="Key_4",s[s.Key_5=53]="Key_5",s[s.Key_6=54]="Key_6",s[s.Key_7=55]="Key_7",s[s.Key_8=56]="Key_8",s[s.Key_9=57]="Key_9",s[s.Key_a=65]="Key_a",s[s.Key_b=66]="Key_b",s[s.Key_c=67]="Key_c",s[s.Key_d=68]="Key_d",s[s.Key_e=69]="Key_e",s[s.Key_f=70]="Key_f",s[s.Key_g=71]="Key_g",s[s.Key_h=72]="Key_h",s[s.Key_i=73]="Key_i",s[s.Key_j=74]="Key_j",s[s.Key_k=75]="Key_k",s[s.Key_l=76]="Key_l",s[s.Key_m=77]="Key_m",s[s.Key_n=78]="Key_n",s[s.Key_o=79]="Key_o",s[s.Key_p=80]="Key_p",s[s.Key_q=81]="Key_q",s[s.Key_r=82]="Key_r",s[s.Key_s=83]="Key_s",s[s.Key_t=84]="Key_t",s[s.Key_u=85]="Key_u",s[s.Key_v=86]="Key_v",s[s.Key_w=87]="Key_w",s[s.Key_x=88]="Key_x",s[s.Key_y=89]="Key_y",s[s.Key_z=90]="Key_z",s[s.Windows=91]="Windows",s[s.ContextMenu=93]="ContextMenu",s[s.Numpad_0=96]="Numpad_0",s[s.Numpad_1=97]="Numpad_1",s[s.Numpad_2=98]="Numpad_2",s[s.Numpad_3=99]="Numpad_3",s[s.Numpad_4=100]="Numpad_4",s[s.Numpad_5=101]="Numpad_5",s[s.Numpad_6=102]="Numpad_6",s[s.Numpad_7=103]="Numpad_7",s[s.Numpad_8=104]="Numpad_8",s[s.Numpad_9=105]="Numpad_9",s[s.Multiply=106]="Multiply",s[s.Add=107]="Add",s[s.Subtract=109]="Subtract",s[s.Decimal=110]="Decimal",s[s.Divide=111]="Divide",s[s.F1=112]="F1",s[s.F2=113]="F2",s[s.F3=114]="F3",s[s.F4=115]="F4",s[s.F5=116]="F5",s[s.F6=117]="F6",s[s.F7=118]="F7",s[s.F8=119]="F8",s[s.F9=120]="F9",s[s.F10=121]="F10",s[s.F11=122]="F11",s[s.F12=123]="F12",s[s.NumLock=144]="NumLock",s[s.ScrollLock=145]="ScrollLock",s[s.Semicolon=186]="Semicolon",s[s.Equals=187]="Equals",s[s.Comma=188]="Comma",s[s.Dash=189]="Dash",s[s.Period=190]="Period",s[s.ForwardSlash=191]="ForwardSlash",s[s.GraveAccent=192]="GraveAccent",s[s.OpenBracket=219]="OpenBracket",s[s.BackSlash=220]="BackSlash",s[s.CloseBracket=221]="CloseBracket",s[s.SingleQuote=222]="SingleQuote"}(S=P.KeyCode||(P.KeyCode={}))},2940:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ListUtils=void 0;var f=b(6799),S=b(4170),T=function(){function y(){}return y.remove=function(d,c){var s=d.indexOf(c,0);s>=0&&d.splice(s,1)},y.removeBy=function(d,c){for(var s=d.length,a=0;a<s;a++)if(c(d[a],a))return d.splice(a,1)[0];return null},y.shallowCopy=function(d){return d.slice()},y.deepCopy=function(d){return y.map(d,function(c){return c.clone()})},y.initByValue=function(d,c){for(var s=[];d>0;d--)s.push(c);return s},y.initByCallback=function(d,c){for(var s=[],a=0;a<d;a++)s.push(c(a));return s},y.forEachOnInterval=function(d,c){for(var s=d.end,a=d.start;a<s;a++)c(a)},y.reverseForEachOnInterval=function(d,c){for(var s=d.start,a=d.end-1;a>=s;a--)c(a)},y.reducedMap=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=[],h=s;h<a;h++){var g=c(d[h],h);null!==g&&u.push(g)}return u},y.filter=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=[],h=s;h<a;h++){var g=d[h];c(g,h)&&u.push(g)}return u},y.map=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=[],h=s;h<a;h++)u.push(c(d[h],h));return u},y.indexBy=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=s;u<a;u++)if(c(d[u],u))return u;return-1},y.reverseIndexBy=function(d,c,s,a){void 0===s&&(s=d.length-1),void 0===a&&(a=0);for(var u=s;u>=a;u--)if(c(d[u],u))return u;return-1},y.elementBy=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);var u=y.indexBy(d,c,s,a);return u<0?null:d[u]},y.reverseElementBy=function(d,c,s,a){void 0===s&&(s=d.length-1),void 0===a&&(a=0);var u=y.reverseIndexBy(d,c,s,a);return u<0?null:d[u]},y.last=function(d){return d[d.length-1]},y.setLast=function(d,c){return d[d.length-1]=c},y.incLast=function(d){return++d[d.length-1]},y.decLast=function(d){return--d[d.length-1]},y.equals=function(d,c){return d.length===c.length&&y.allOf2(d,c,function(s,a){return s.equals(a)})},y.equalsByReference=function(d,c){var s=d.length;if(s!==d.length)return!1;for(var a=0;a<s;a++)if(d[a]!==c[a])return!1;return!0},y.unique=function(d,c,s,a){void 0===s&&(s=c),void 0===a&&(a=function(){});var u=d.length;if(0===u)return[];var h=(d=d.sort(c))[0],g=y.reducedMap(d,function(_){return 0!==s(h,_)?(h=_,_):(a(_),null)},1,u);return g.unshift(d[0]),g},y.uniqueNumber=function(d){d=d.sort(S.Comparers.number);for(var c=Number.NaN,s=d.length-1;s>=0;s--)c===d[s]?d.splice(s,1):c=d[s];return d},y.forEach=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=s;u<a;u++)c(d[u],u)},y.forEach2=function(d,c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=d.length);for(var h=a;h<u;h++)s(d[h],c[h],h)},y.reverseForEach=function(d,c,s,a){void 0===s&&(s=d.length-1),void 0===a&&(a=0);for(var u=s;u>=a;u--)c(d[u],u)},y.reverseIndexOf=function(d,c,s,a){void 0===s&&(s=d.length-1),void 0===a&&(a=0);for(var u=s;u>=a;u--)if(d[u]===c)return u;return-1},y.accumulate=function(d,c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=d.length);for(var h=c,g=a;g<u;g++)h=s(h,d[g],g);return h},y.accumulateNumber=function(d,c,s,a,u){void 0===s&&(s=0),void 0===a&&(a=0),void 0===u&&(u=d.length);for(var h=s,g=a;g<u;g++)h+=c(d[g],g,h);return h},y.anyOf=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=s;u<a;u++)if(c(d[u],u))return!0;return!1},y.unsafeAnyOf=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=s;u<a;u++){var h=c(d[u],u);if(h)return h}return null},y.reverseAnyOf=function(d,c,s,a){void 0===s&&(s=d.length-1),void 0===a&&(a=0);for(var u=s;u>=a;u--)if(c(d[u],u))return!0;return!1},y.unsafeReverseAnyOf=function(d,c,s,a){void 0===s&&(s=d.length-1),void 0===a&&(a=0);for(var u=s;u>=a;u--){var h=c(d[u],u);if(h)return h}return null},y.anyOf2=function(d,c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=d.length);for(var h=a;h<u;h++)if(s(d[h],c[h],h))return!0;return!1},y.allOf=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);for(var u=s;u<a;u++)if(!c(d[u],u))return!1;return!0},y.allOf2=function(d,c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=d.length);for(var h=a;h<u;h++)if(!s(d[h],c[h],h))return!1;return!0},y.allOfOnInterval=function(d,c){for(var s=d.end,a=d.start;a<s;a++)if(!c(a))return!1;return!0},y.addListOnTail=function(d,c){for(var s=0,a=void 0;a=c[s];s++)d.push(a);return d},y.joinLists=function(d){for(var c=[],s=1;s<arguments.length;s++)c[s-1]=arguments[s];return y.accumulate(c,[],function(a,u){return y.addListOnTail(a,d(u)),a})},y.push=function(d,c){return d.push(c),d},y.countIf=function(d,c){return y.accumulateNumber(d,function(s,a){return c(s,a)?1:0})},y.clear=function(d){d.splice(0)},y.merge=function(d,c,s,a,u,h){if(void 0===u&&(u=0),void 0===h&&(h=d.length),d=d.slice(u,h),h-u<2)return d;for(var g=(d=d.sort(c))[u],_=[g],x=u+1;x<h;x++){var w=d[x];s(g,w)?a(g,w):_.push(g=w)}return _},y.min=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);var u=y.minExtended(d,c,s,a);return u?u.minElement:null},y.max=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);var u=y.maxExtended(d,c,s,a);return u?u.maxElement:null},y.minMax=function(d,c,s,a){void 0===s&&(s=0),void 0===a&&(a=d.length);var u=y.minMaxExtended(d,c,s,a);return u?new f.MinMax(u.minElement,u.maxElement):null},y.minExtended=function(d,c,s,a){if(void 0===s&&(s=0),void 0===a&&(a=d.length),0===d.length)return null;for(var u=d[s],h=c(u),g=s+1;g<a;g++){var _=d[g],x=c(_);x<h&&(h=x,u=_)}return new f.ExtendedMin(u,h)},y.maxExtended=function(d,c,s,a){if(void 0===s&&(s=0),void 0===a&&(a=d.length),0===d.length)return null;for(var u=d[s],h=c(u),g=s+1;g<a;g++){var _=d[g],x=c(_);x>h&&(h=x,u=_)}return new f.ExtendedMax(u,h)},y.minMaxExtended=function(d,c,s,a){if(void 0===s&&(s=0),void 0===a&&(a=d.length),0===d.length)return null;for(var u=d[s],h=u,g=c(u),_=g,x=s+1;x<a;x++){var w=d[x],D=c(w);D<g?(g=D,u=w):D>_&&(_=D,h=w)}return new f.ExtendedMinMax(u,g,h,_)},y.minByCmp=function(d,c,s,a){if(void 0===s&&(s=0),void 0===a&&(a=d.length),0===d.length)return null;for(var u=d[s],h=s+1;h<a;h++){var g=d[h];c(g,u)<0&&(u=g)}return u},y.maxByCmp=function(d,c,s,a){if(void 0===s&&(s=0),void 0===a&&(a=d.length),0===d.length)return null;for(var u=d[s],h=s+1;h<a;h++){var g=d[h];c(g,u)>0&&(u=g)}return u},y.minMaxByCmp=function(d,c,s,a){if(void 0===s&&(s=0),void 0===a&&(a=d.length),0===d.length)return null;for(var u=d[s],h=u,g=s+1;g<a;g++){var _=d[g],x=c(_,u);x>0?h=_:x<0&&(u=_)}return new f.MinMax(u,h)},y}();P.ListUtils=T},8679:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.MathUtils=void 0;var f=b(2940),S=function(){function T(){}return T.round=function(y,d){void 0===d&&(d=0);var c=T.powFactor[d];return Math.round(y*c)/c},T.numberCloseTo=function(y,d,c){return void 0===c&&(c=1e-5),Math.abs(y-d)<c},T.restrictValue=function(y,d,c){return c<d&&(c=d),y>c?c:y<d?d:y},T.getRandomInt=function(y,d){return Math.floor(Math.random()*(d-y+1))+y},T.generateGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(y){var d=16*Math.random()|0;return("x"===y?d:3&d|8).toString(16)})},T.powFactor=f.ListUtils.initByCallback(20,function(y){return Math.pow(10,y)}),T.somePrimes=[1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003],T}();P.MathUtils=S},4633:(o,P)=>{var b,f,S,T,d;Object.defineProperty(P,"__esModule",{value:!0}),P.MimeTypeUtils=P.DxMimeType=P.ImageWebpMimeType=P.ImageWbmpMimeType=P.ImageIcoMimeType=P.ImageTiffMimeType=P.ImageSvgMimeType=P.ImagePjpegMimeType=P.ImageJpegMimeType=P.ImageGifMimeType=P.ImagePngMimeType=P.DocmMimeType=P.HtmlMimeType=P.PlainTextMimeType=P.RtfMimeType=P.OpenXmlMimeType=void 0,P.OpenXmlMimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document",P.RtfMimeType="application/rtf",P.PlainTextMimeType="text/plain",P.HtmlMimeType="text/html",P.DocmMimeType="application/vnd.ms-word.document.macroEnabled.12",P.ImagePngMimeType="image/png",P.ImageGifMimeType="image/gif",P.ImageJpegMimeType="image/jpeg",P.ImagePjpegMimeType="image/pjpeg",P.ImageSvgMimeType="image/svg+xml",P.ImageTiffMimeType="image/tiff",P.ImageIcoMimeType="image/vnd.microsoft.icon",P.ImageWbmpMimeType="image/vnd.wap.wbmp",P.ImageWebpMimeType="image/webp",(d=T=P.DxMimeType||(P.DxMimeType={}))[d.Unknown=0]="Unknown",d[d.OpenXml=1]="OpenXml",d[d.Rtf=2]="Rtf",d[d.PlainText=3]="PlainText",d[d.Docm=4]="Docm",d[d.Png=5]="Png",d[d.Gif=6]="Gif",d[d.Jpeg=7]="Jpeg",d[d.Pjpeg=8]="Pjpeg",d[d.Svg=9]="Svg",d[d.Tiff=10]="Tiff",d[d.Ico=11]="Ico",d[d.Wbmp=12]="Wbmp",d[d.Webp=13]="Webp",d[d.Html=14]="Html";var y=function(){function d(){}return d.stringTypeToExtension=function(c){var s=d.stringTypeToTypeMap[c];return void 0===s?"":d.typeToExtensionMap[s]},d.typeToExtension=function(c){return d.typeToExtensionMap[c]??""},d.extensionToType=function(c){return"."!==(c=c.toLowerCase())[0]&&(c+="."),d.extensionToTypeMap[c]??T.Unknown},d.typeToStringType=function(c){return d.typeToStringTypeMap[c]??""},d.stringTypeToType=function(c){var s=d.stringTypeToTypeMap[c];return void 0===s?T.Unknown:s},d.stringTypeToTypeMap=((b={})[P.OpenXmlMimeType]=T.OpenXml,b[P.RtfMimeType]=T.Rtf,b[P.PlainTextMimeType]=T.PlainText,b[P.DocmMimeType]=T.Docm,b[P.HtmlMimeType]=T.Html,b[P.ImagePngMimeType]=T.Png,b[P.ImageGifMimeType]=T.Gif,b[P.ImageJpegMimeType]=T.Jpeg,b[P.ImagePjpegMimeType]=T.Pjpeg,b[P.ImageSvgMimeType]=T.Svg,b[P.ImageTiffMimeType]=T.Tiff,b[P.ImageIcoMimeType]=T.Ico,b[P.ImageWbmpMimeType]=T.Wbmp,b[P.ImageWebpMimeType]=T.Webp,b),d.typeToStringTypeMap=((f={})[T.Unknown]=void 0,f[T.OpenXml]=P.OpenXmlMimeType,f[T.Rtf]=P.RtfMimeType,f[T.PlainText]=P.PlainTextMimeType,f[T.Docm]=P.DocmMimeType,f[T.Html]=P.HtmlMimeType,f[T.Png]=P.ImagePngMimeType,f[T.Gif]=P.ImageGifMimeType,f[T.Jpeg]=P.ImageJpegMimeType,f[T.Pjpeg]=P.ImagePjpegMimeType,f[T.Svg]=P.ImageSvgMimeType,f[T.Tiff]=P.ImageTiffMimeType,f[T.Ico]=P.ImageIcoMimeType,f[T.Wbmp]=P.ImageWbmpMimeType,f[T.Webp]=P.ImageWebpMimeType,f),d.typeToExtensionMap=((S={})[T.Unknown]=void 0,S[T.OpenXml]=".docx",S[T.Rtf]=".rtf",S[T.PlainText]=".txt",S[T.Docm]=".docm",S[T.Html]=".html",S[T.Png]=".png",S[T.Gif]=".gif",S[T.Jpeg]=".jpeg",S[T.Pjpeg]=".pjpeg",S[T.Svg]=".svg",S[T.Tiff]=".tiff",S[T.Ico]=".ico",S[T.Wbmp]=".wbmp",S[T.Webp]=".webp",S),d.extensionToTypeMap={".docx":T.OpenXml,".rtf":T.Rtf,".txt":T.PlainText,".docm":T.Docm,".html":T.Html,".htm":T.Html,".png":T.Png,".gif":T.Gif,".jpeg":T.Jpeg,".pjpeg":T.Pjpeg,".svg":T.Svg,".tiff":T.Tiff,".ico":T.Ico,".wbmp":T.Wbmp,".webp":T.Webp},d}();P.MimeTypeUtils=y},2400:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SearchUtils=void 0;var b=function(){function f(){}return f.binaryIndexOf=function(S,T,y,d){void 0===y&&(y=0),void 0===d&&(d=-2);var c=0===y;for(-2===d&&(d=S.length-1);y<=d;){var s=y+(d-y>>1),a=T(S[s]);if(a<0)y=s+1;else{if(!(a>0))return s;d=s-1}}return c?~y:-1},f.normedBinaryIndexOf=function(S,T,y,d){void 0===y&&(y=0),void 0===d&&(d=-2);var c=f.binaryIndexOf(S,T,y,d);return f.binaryIndexNormalizator(c)},f.binaryIndexNormalizator=function(S){return S<0?~S-1:S},f.normedInterpolationIndexOf=function(S,T,y,d,c){void 0===d&&(d=0),void 0===c&&(c=-2),-2===c&&(c=S.length-1);var s=S[Math.min(d,c)];if(void 0===s||y<T(s))return-1;for(var a=T(S[d]),u=T(S[c]);;){if(!(y>a&&y<u))return y===a?d:c;var h=d+Math.floor((y-a)*(c-d)/(u-a)),g=T(S[h]);if(y>g){if(y<(a=T(S[d=h+1])))return h}else{if(!(y<g))return h;u=T(S[c=h-1])}}},f}();P.SearchUtils=b},49:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.StringUtils=void 0;var b=function(){function f(){}return f.isAlpha=function(S){return S>="a"&&S<="z"||S>="A"&&S<="Z"},f.isDigit=function(S){return S>="0"&&S<="9"},f.stringHashCode=function(S){var T=0;if(0===S.length)return T;for(var y=S.length,d=0;d<y;d++)T=(T<<5)-T+S.charCodeAt(d),T|=0;return T},f.endsAt=function(S,T){var y=S.length-1,d=T.length-1,c=y-d;if(c<0)return!1;for(;y>=c;y--,d--)if(S[y]!==T[d])return!1;return!0},f.startsAt=function(S,T){return S.substr(0,T.length)===T},f.stringInLowerCase=function(S){return S.toLowerCase()===S},f.stringInUpperCase=function(S){return S.toUpperCase()===S},f.atLeastOneSymbolInUpperCase=function(S){for(var T=0,y=void 0;y=S[T];T++)if(f.stringInUpperCase(y)&&!f.stringInLowerCase(y))return!0;return!1},f.getSymbolFromEnd=function(S,T){return S[S.length-T]},f.trim=function(S,T){if(void 0===T)return f.trimInternal(S,!0,!0);var y=T.join("");return S.replace(new RegExp("(^["+y+"]*)|(["+y+"]*$)","g"),"")},f.trimStart=function(S,T){if(void 0===T)return f.trimInternal(S,!0,!1);var y=T.join("");return S.replace(new RegExp("^["+y+"]*","g"),"")},f.trimEnd=function(S,T){if(void 0===T)return f.trimInternal(S,!1,!0);var y=T.join("");return S.replace(new RegExp("["+y+"]*$","g"),"")},f.getDecimalSeparator=function(){return 1.1.toLocaleString().substr(1,1)},f.repeat=function(S,T){return new Array(T<=0?0:T+1).join(S)},f.isNullOrEmpty=function(S){return!S||!S.length},f.padLeft=function(S,T,y){return f.repeat(y,Math.max(0,T-S.length))+S},f.trimInternal=function(S,T,y){var d=S.length;if(!d)return S;if(d<764833){var c=S;return T&&(c=c.replace(/^\s+/,"")),y&&(c=c.replace(/\s+$/,"")),c}var s=0;if(y)for(;d>0&&/\s/.test(S[d-1]);)d--;if(T&&d>0)for(;s<d&&/\s/.test(S[s]);)s++;return S.substring(s,d)},f}();P.StringUtils=b},1632:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.TouchUtils=void 0;var f=b(9279),S=b(2491),T=function(){function y(){}return y.onEventAttachingToDocument=function(d,c){return!f.Browser.MacOSMobilePlatform||!y.isTouchEventName(d)||(y.documentTouchHandlers[d]||(y.documentTouchHandlers[d]=[]),y.documentTouchHandlers[d].push(c),y.documentEventAttachingAllowed)},y.isTouchEventName=function(d){return f.Browser.WebKitTouchUI&&(d.indexOf("touch")>-1||d.indexOf("gesture")>-1)},y.isTouchEvent=function(d){return f.Browser.WebKitTouchUI&&S.isDefined(d.changedTouches)},y.getEventX=function(d){return f.Browser.IE?d.pageX:d.changedTouches[0].pageX},y.getEventY=function(d){return f.Browser.IE?d.pageY:d.changedTouches[0].pageY},y.touchMouseDownEventName=f.Browser.WebKitTouchUI?"touchstart":f.Browser.Edge&&f.Browser.MSTouchUI&&window.PointerEvent?"pointerdown":"mousedown",y.touchMouseUpEventName=f.Browser.WebKitTouchUI?"touchend":f.Browser.Edge&&f.Browser.MSTouchUI&&window.PointerEvent?"pointerup":"mouseup",y.touchMouseMoveEventName=f.Browser.WebKitTouchUI?"touchmove":f.Browser.Edge&&f.Browser.MSTouchUI&&window.PointerEvent?"pointermove":"mousemove",y.msTouchDraggableClassName="dxMSTouchDraggable",y.documentTouchHandlers={},y.documentEventAttachingAllowed=!0,y}();P.TouchUtils=T},7097:(o,P,b)=>{b(8091).polyfill()},8091:o=>{function P(b,f){if(null==b)throw new TypeError("Cannot convert first argument to object");for(var S=Object(b),T=1;T<arguments.length;T++){var y=arguments[T];if(null!=y)for(var d=Object.keys(Object(y)),c=0,s=d.length;c<s;c++){var a=d[c],u=Object.getOwnPropertyDescriptor(y,a);void 0!==u&&u.enumerable&&(S[a]=y[a])}}return S}o.exports={assign:P,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:P})}}},8721:(o,P,b)=>{b.r(P)},5656:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ApiController=void 0;var T,u,y=b(1772),d=b(6031),c=b(4867),s=b(3607),a=function(u){function h(g,_,x){var w=u.call(this)||this;return w.events=g,w.model=x,w.selection=_,w}return S(h,u),h.prototype.notifySelectionChanged=function(g){this.isUpdateLocked()?this.registerOccurredEvent(T.SelectionChanged):this.raiseSelectionChanged()},h.prototype.notifyToolboxDragStart=function(){this.events.raise("notifyToolboxItemDragStart")},h.prototype.notifyToolboxDragEnd=function(){this.events.raise("notifyToolboxItemDragEnd")},h.prototype.notifyToolboxDraggingMouseMove=function(){},h.prototype.notifyClick=function(g){var _=this;this.tryRaiseUserAction(g,function(x){return _.events.raise("notifyItemClick",x)})},h.prototype.notifyDblClick=function(g){var _=this;this.tryRaiseUserAction(g,function(x){return _.events.raise("notifyItemDblClick",x)})},h.prototype.createNativeItem=function(g){return g&&this.cleanupNativeItem(g.toNative(this.model.units))},h.prototype.createNativeShape=function(g){return this.createNativeItem(g)},h.prototype.createNativeConnector=function(g){return this.createNativeItem(g)},h.prototype.convertUnit=function(g){return c.ModelUtils.getlUnitValue(this.model.units,g)},h.prototype.convertPoint=function(g){return new s.Point(this.convertUnit(g.x),this.convertUnit(g.y))},h.prototype.convertSize=function(g){return new s.Size(this.convertUnit(g.width),this.convertUnit(g.height))},h.prototype.cleanupNativeItem=function(g){var _=this.dataSource;return _&&(_.isAutoGeneratedKey(g.fromKey)&&(g.fromKey=void 0),_.isAutoGeneratedKey(g.key)&&(g.key=void 0),_.isAutoGeneratedKey(g.toKey)&&(g.toKey=void 0)),g},h.prototype.setDataSource=function(g){this.dataSource=g},h.prototype.tryRaiseUserAction=function(g,_){var x=this;if(this.isUserAction(g)){var w=this.model.findItem(g.source.key);w&&this.events.raise1(function(D){return _(x.createNativeItem(w))})}},h.prototype.isUserAction=function(g){return g.source&&(g.source.type===d.MouseEventElementType.Shape||g.source.type===d.MouseEventElementType.ShapeExpandButton||g.source.type===d.MouseEventElementType.ShapeParameterBox||g.source.type===d.MouseEventElementType.ShapeResizeBox||g.source.type===d.MouseEventElementType.ShapeConnectionPoint||g.source.type===d.MouseEventElementType.Connector||g.source.type===d.MouseEventElementType.ConnectorPoint||g.source.type===d.MouseEventElementType.ConnectorSide||g.source.type===d.MouseEventElementType.ConnectorOrthogonalSide||g.source.type===d.MouseEventElementType.ConnectorText)},h.prototype.onUpdateUnlocked=function(g){g&T.SelectionChanged&&this.raiseSelectionChanged()},h.prototype.raiseSelectionChanged=function(){var g=this,_=this.selection.getKeys().map(function(x){return g.createNativeItem(g.model.findItem(x))});this.events.raise1(function(x){return x.notifySelectionChanged(_)})},h}(y.BatchUpdatableObject);P.ApiController=a,(u=T||(T={}))[u.SelectionChanged=1]="SelectionChanged"},7185:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.NativeConnector=P.NativeShape=P.NativeItem=void 0;var T=b(4867),y=function(){function s(a,u){this.id=a,this.key=u,this.unitsApplied=!1}return s.prototype.applyUnits=function(a){this.unitsApplied||void 0===a||(this.applyUnitsCore(a),this.unitsApplied=!0)},s}();P.NativeItem=y;var d=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.applyUnitsCore=function(u){this.position.x=T.ModelUtils.getlUnitValue(u,this.position.x),this.position.y=T.ModelUtils.getlUnitValue(u,this.position.y),this.size.width=T.ModelUtils.getlUnitValue(u,this.size.width),this.size.height=T.ModelUtils.getlUnitValue(u,this.size.height)},a}(y);P.NativeShape=d;var c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.applyUnitsCore=function(u){this.points.forEach(function(h){h.x=T.ModelUtils.getlUnitValue(u,h.x),h.y=T.ModelUtils.getlUnitValue(u,h.y)})},a}(y);P.NativeConnector=c},8906:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutCommandBase=void 0;var T=b(4867),y=b(9741),d=b(5503),c=b(7959),s=b(8675),a=b(8011),u=b(7626),h=function(g){function _(){return null!==g&&g.apply(this,arguments)||this}return S(_,g),_.prototype.executeCore=function(x,w){var D=this;this.control.history.beginTransaction();var C=this.getAffectedShapes(),I=this.getAffectedConnectors(),L=this.createLayoutSettings(),N=T.ModelUtils.getGraphInfoByItems(this.control.model,C,I,!1);if(N.length){var G,k=this.control.model,U=s.GeometryUtils.getCommonRectangle(s.Utils.flatten(N.map(function(B){return B.graph.items.map(function(K){return k.findItem(K.key)})})).concat(N.map(function(B){return B.container})).filter(function(B){return B}).map(function(B){return B.rectangle}));this.control.history.addAndRedo(new u.ScrollIntoViewOnUndoHistoryItem(this.control.view,U)),N.forEach(function(B){var K=D.createLayout(L,B.graph),J=T.ModelUtils.getNonGraphItems(D.control.model,B.container,K.nodeToLayout,C,I),ie=T.ModelUtils.applyLayout(D.control.history,D.control.model,B.container,B.graph,K,J,L,D.control.settings.snapToGrid,D.control.settings.gridSize,!1);G=G&&a.Rectangle.union(G,ie)||ie}),T.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.addAndRedo(new u.ScrollIntoViewOnRedoHistoryItem(this.control.view,G))}return this.control.history.endTransaction(),!0},_.prototype.getAffectedShapes=function(){return this.control.selection.isEmpty()?this.control.model.items.filter(function(x){return x instanceof d.Shape&&!x.locked}):this.control.selection.getSelectedShapes(!1,!0)},_.prototype.getAffectedConnectors=function(){return this.control.selection.isEmpty()?this.control.model.items.filter(function(x){return x instanceof c.Connector&&!x.locked}):this.control.selection.getSelectedConnectors(!1,!0)},_}(y.SimpleCommandBase);P.AutoLayoutCommandBase=h},30:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutLayeredHorizontalCommand=void 0;var T=b(8906),y=b(1256),d=b(8710),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.createLayoutSettings=function(){var u=new d.LayoutSettings;return u.orientation=d.DataLayoutOrientation.Horizontal,u},a.prototype.createLayout=function(u,h){return new y.SugiyamaLayoutBuilder(u,h).build()},a}(T.AutoLayoutCommandBase);P.AutoLayoutLayeredHorizontalCommand=c},7826:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutLayeredHorizontalRightToLeftCommand=void 0;var T=b(8710),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.createLayoutSettings=function(){var s=d.prototype.createLayoutSettings.call(this);return s.direction=T.LogicalDirectionKind.Backward,s},c}(b(30).AutoLayoutLayeredHorizontalCommand);P.AutoLayoutLayeredHorizontalRightToLeftCommand=y},554:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutLayeredVerticalBottomToTopCommand=void 0;var T=b(8710),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.createLayoutSettings=function(){var s=d.prototype.createLayoutSettings.call(this);return s.direction=T.LogicalDirectionKind.Backward,s},c}(b(9427).AutoLayoutLayeredVerticalCommand);P.AutoLayoutLayeredVerticalBottomToTopCommand=y},9427:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutLayeredVerticalCommand=void 0;var T=b(8906),y=b(1256),d=b(8710),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.createLayoutSettings=function(){var u=new d.LayoutSettings;return u.orientation=d.DataLayoutOrientation.Vertical,u},a.prototype.createLayout=function(u,h){return new y.SugiyamaLayoutBuilder(u,h).build()},a}(T.AutoLayoutCommandBase);P.AutoLayoutLayeredVerticalCommand=c},7004:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutTreeHorizontalCommand=void 0;var T=b(8906),y=b(9533),d=b(8710),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.createLayoutSettings=function(){var h=new d.TreeLayoutSettings(this.control.settings.snapToGrid?this.control.settings.gridSize:void 0);return h.orientation=d.DataLayoutOrientation.Horizontal,h},a.prototype.createLayout=function(u,h){return new y.TreeLayoutBuilder(u,h).build()},a}(T.AutoLayoutCommandBase);P.AutoLayoutTreeHorizontalCommand=c},5010:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutTreeHorizontalRightToLeftCommand=void 0;var T=b(8710),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.createLayoutSettings=function(){var s=d.prototype.createLayoutSettings.call(this);return s.direction=T.LogicalDirectionKind.Backward,s},c}(b(7004).AutoLayoutTreeHorizontalCommand);P.AutoLayoutTreeHorizontalRightToLeftCommand=y},2217:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutTreeVerticalBottomToTopCommand=void 0;var T=b(8710),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.createLayoutSettings=function(){var s=d.prototype.createLayoutSettings.call(this);return s.direction=T.LogicalDirectionKind.Backward,s},c}(b(375).AutoLayoutTreeVerticalCommand);P.AutoLayoutTreeVerticalBottomToTopCommand=y},375:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.AutoLayoutTreeVerticalCommand=void 0;var T=b(8906),y=b(9533),d=b(8710),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.createLayoutSettings=function(){var h=new d.TreeLayoutSettings(this.control.settings.snapToGrid?this.control.settings.gridSize:void 0);return h.orientation=d.DataLayoutOrientation.Vertical,h},a.prototype.createLayout=function(u,h){return new y.TreeLayoutBuilder(u,h).build()},a}(T.AutoLayoutCommandBase);P.AutoLayoutTreeVerticalCommand=c},4982:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ClipboardCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.setClipboardData=function(c){this.control.render&&this.control.render.input.setClipboardData(c),d.clipboardData=c},d.prototype.getClipboardData=function(c){this.control.render&&this.isPasteSupportedByBrowser()?this.control.render.input.getClipboardData(c):c(d.clipboardData)},d.prototype.isPasteSupportedByBrowser=function(){return this.control.render&&this.control.render.input.isPasteSupportedByBrowser()},d}(b(9741).SimpleCommandBase);P.ClipboardCommand=T},5827:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.CopySelectionCommand=void 0;var T=b(5885),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabled=function(){return d.prototype.isEnabled.call(this)&&!this.control.selection.isEmpty(!0)},c.prototype.isEnabledInReadOnlyMode=function(){return!0},c.prototype.executeCore=function(s){var a=(new T.Exporter).exportItems(this.control.selection.getSelectedItems(!0,!0));return this.setClipboardData(a),!0},c}(b(4982).ClipboardCommand);P.CopySelectionCommand=y},2664:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.CutSelectionCommand=void 0;var T=b(5885),y=b(4867),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.isEnabled=function(){var a=this.control.selection.getSelectedItems();return c.prototype.isEnabled.call(this)&&a.length&&(a.length>1||this.permissionsProvider.canDeleteItems(a))},s.prototype.executeCore=function(a){var u=new T.Exporter,h=this.control.selection.getSelectedItems(!0,!0),g=u.exportItems(h);return this.permissionsProvider.beginDeleteItems(h),this.setClipboardData(g),y.ModelUtils.deleteSelection(this.control.history,this.control.model,this.control.selection),this.permissionsProvider.endDeleteItems(),!0},Object.defineProperty(s.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),s}(b(4982).ClipboardCommand);P.CutSelectionCommand=d},4200:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.PasteSelectionCommand=void 0;var T=b(8900),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.getEventPositionOffset=function(s,a){return new T.Point(0,0)},c}(b(7688).PasteSelectionCommandBase);P.PasteSelectionCommand=y},7688:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.PasteSelectionCommandBase=void 0;var T=b(4982),y=b(2406),d=b(5503),c=b(4383),s=b(7959),a=b(3849),u=b(4867),h=b(4297),g=b(8900),_=b(9291),x=function(w){function D(){return null!==w&&w.apply(this,arguments)||this}return S(D,w),D.prototype.isEnabled=function(){return w.prototype.isEnabled.call(this)&&(this.isPasteSupportedByBrowser()||void 0!==T.ClipboardCommand.clipboardData)},D.prototype.isVisible=function(){return this.isPasteSupportedByBrowser()||void 0!==T.ClipboardCommand.clipboardData},D.prototype.parseClipboardData=function(C){var I;I=new y.Importer(this.control.shapeDescriptionManager,C).importItems(this.control.model);var L=this.getEventPositionOffset(I,this.control.contextMenuPosition);L=this.getCorrectedOffsetByModel(I,L);for(var N=0;N<I.length;N++){var G=I[N];G instanceof d.Shape?G.position.offsetByPoint(L):G instanceof s.Connector&&G.points.forEach(function(k){return k.offsetByPoint(L)})}return I},D.prototype.getCorrectedOffsetByModel=function(C,I){var L=C.reduce(function(k,U){var B=U instanceof d.Shape?U.position.x:U instanceof s.Connector?U.getMinX():Number.MAX_VALUE,K=U instanceof d.Shape?U.position.y:U instanceof s.Connector?U.getMinY():Number.MAX_VALUE;return(K<k.y||K===k.y&&B<k.x)&&(k.topLeftItem=U,k.x=B,k.y=K),k},{topLeftItem:C[0],x:Number.MAX_VALUE,y:Number.MAX_VALUE}).topLeftItem;if(L instanceof d.Shape){var N=this.getShapeCorrectedPosition(this.control.model,L,I);return new g.Point(N.x-L.position.x,N.y-L.position.y)}if(L instanceof s.Connector){var G=this.getConnectorCorrectedPoints(this.control.model,L,I);return new g.Point(L.points[0].x-G[0].x,L.points[0].y-G[0].y)}},D.prototype.executeCore=function(C,I){var L=this,N=!0;return void 0===I?this.getClipboardData(function(G){N=L.execute(G)}):this.performPaste(I),N},D.prototype.addItemForSortingRecursive=function(C,I){if(C[I.key])return C[I.key];if(I instanceof s.Connector)return C[I.key]=I.endItem?this.addItemForSortingRecursive(C,I.endItem)-.5:I.beginItem?this.addItemForSortingRecursive(C,I.beginItem)+.5:-1,C[I.key];if(0===I.attachedConnectors.length)return C[I.key]=0;for(var L=0;L<I.attachedConnectors.length;L++){var N=I.attachedConnectors[L].beginItem;return C[I.key]=I.attachedConnectors[L].endItem===I&&N&&N!==I.attachedConnectors[L].endItem?this.addItemForSortingRecursive(C,N)+1:0}},D.prototype.getSortedPasteItems=function(C){for(var I=[],L=[],N={},G=0;G<C.length;G++){var k=C[G];k instanceof d.Shape?I.push(k):k instanceof s.Connector&&(L.push(k),this.addItemForSortingRecursive(N,k))}return L.sort(function(U,B){return N[B.key]-N[U.key]}),I.concat(L)},D.prototype.performPaste=function(C){this.control.beginUpdateCanvas(),this.control.history.beginTransaction();var I={},L=this.parseClipboardData(C);L=this.getSortedPasteItems(L);for(var N=0;N<L.length;N++){var G=L[N];G instanceof d.Shape?this.control.history.addAndRedo(new c.ImportShapeHistoryItem(G)):G instanceof s.Connector&&this.control.history.addAndRedo(new a.ImportConnectorHistoryItem(G));var k=G.container&&G.container.key;k&&void 0!==I[k]?k&&void 0!==I[k]&&(I[G.key]=!1):I[G.key]=!0}u.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.addAndRedo(new h.SetSelectionHistoryItem(this.control.selection,Object.keys(I).filter(function(U){return I[U]}))),this.control.history.endTransaction(),this.control.endUpdateCanvas(),this.control.barManager.updateItemsState()},D.prototype.getShapeCorrectedPosition=function(C,I,L){for(var N=I.position.clone().offsetByPoint(L);C.findShapeAtPosition(N);)N.offset(D.positionOffset,D.positionOffset);return N},D.prototype.getConnectorCorrectedPoints=function(C,I,L){for(var N=I.points.map(function(G){return G.clone().offsetByPoint(L)});C.findConnectorAtPoints(N);)N.forEach(function(G){G.x+=D.positionOffset,G.y+=D.positionOffset});return N},Object.defineProperty(D.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),D.positionOffset=_.UnitConverter.pixelsToTwips(10),D}(T.ClipboardCommand);P.PasteSelectionCommandBase=x},437:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.PasteSelectionInPositionCommand=void 0;var T=b(7688),y=b(5503),d=b(7959),c=b(8900),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S(u,a),u.prototype.getEventPositionOffset=function(h,g){if(!g)return c.Point.zero();var _=h.reduce(function(w,D){return{x:Math.min(w.x,D instanceof y.Shape?D.position.x:D instanceof d.Connector?D.getMinX():Number.MAX_VALUE),y:Math.min(w.y,D instanceof y.Shape?D.position.y:D instanceof d.Connector?D.getMinY():Number.MAX_VALUE)}},{x:Number.MAX_VALUE,y:Number.MAX_VALUE}),x=this.control.render.getModelPointByEventPoint(g.x,g.y);return new c.Point(x.x-_.x,x.y-_.y)},u}(T.PasteSelectionCommandBase);P.PasteSelectionInPositionCommand=s},9687:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CommandBase=void 0;var b=function(){function f(S){this.control=S}return f.prototype.execute=function(S){this.isPermissionsRequired&&this.permissionsProvider.lockPermissions();var y,T=this.getState();return this.isPermissionsRequired&&this.permissionsProvider.unlockPermissions(),!!T.enabled&&(this.control.beginUpdate(),y=this.isPermissionsRequired?this.executeWithPermissions(T,S):this.executeCore(T,S),this.control.endUpdate(),y&&this.updateControlState(),y)},f.prototype.executeWithPermissions=function(S,T){var y=!1;return this.permissionsProvider.beginStorePermissions(),this.control.history.beginTransaction(),y=this.executeCore(S,T),this.permissionsProvider.isStoredPermissionsGranted()||(this.permissionsProvider.lockPermissions(),this.control.history.undoTransaction(),this.permissionsProvider.unlockPermissions(),y=!1),this.control.history.endTransaction(),this.permissionsProvider.endStorePermissions(),y},f.prototype.updateControlState=function(){this.lockInputPositionUpdating()||this.control.selection.inputPosition.reset(),this.lockUIUpdating()||this.control.barManager.updateItemsState()},Object.defineProperty(f.prototype,"permissionsProvider",{get:function(){return this.control&&this.control.permissionsProvider},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isPermissionsRequired",{get:function(){return!1},enumerable:!1,configurable:!0}),f.prototype.lockUIUpdating=function(){return!1},f.prototype.lockInputPositionUpdating=function(){return!1},f}();P.CommandBase=b},7156:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CommandManager=P.DiagramCommand=void 0;var f,Re,S=b(264),T=b(6679),y=b(3614),d=b(6596),c=b(4845),s=b(4378),a=b(7607),u=b(3411),h=b(7480),g=b(4077),_=b(6106),x=b(1649),w=b(3166),D=b(8700),C=b(2301),I=b(7306),L=b(2452),N=b(2153),G=b(375),k=b(4503),U=b(7550),B=b(7649),K=b(1813),J=b(3690),ie=b(2276),re=b(1203),q=b(5827),Y=b(2664),Z=b(4200),Q=b(1239),te=b(4624),pe=b(3591),z=b(30),oe=b(5925),ae=b(4522),ee=b(9538),he=b(125),de=b(7004),ue=b(9427),be=b(9031),ve=b(6049),le=b(4999),Ce=b(4419),ye=b(8016),ge=b(72),fe=b(6619),xe=b(7795),Te=b(9970),Ee=b(4281),Oe=b(437),ze=b(5830),$e=b(9158),Be=b(962),Ue=b(4643),ot=b(4681),st=b(2217),et=b(5010),Ke=b(554),Ye=b(7826),Pe=b(7717);(Re=f=P.DiagramCommand||(P.DiagramCommand={}))[Re.Undo=0]="Undo",Re[Re.Redo=1]="Redo",Re[Re.Cut=2]="Cut",Re[Re.Copy=3]="Copy",Re[Re.Paste=4]="Paste",Re[Re.PasteInPosition=5]="PasteInPosition",Re[Re.SelectAll=6]="SelectAll",Re[Re.Delete=7]="Delete",Re[Re.Import=8]="Import",Re[Re.ImportBPMN=9]="ImportBPMN",Re[Re.Export=10]="Export",Re[Re.ExportSvg=11]="ExportSvg",Re[Re.ExportPng=12]="ExportPng",Re[Re.ExportJpg=13]="ExportJpg",Re[Re.BindDocument=14]="BindDocument",Re[Re.UnbindDocument=15]="UnbindDocument",Re[Re.Bold=16]="Bold",Re[Re.Italic=17]="Italic",Re[Re.Underline=18]="Underline",Re[Re.FontName=19]="FontName",Re[Re.FontSize=20]="FontSize",Re[Re.FontColor=21]="FontColor",Re[Re.FillColor=22]="FillColor",Re[Re.StrokeColor=23]="StrokeColor",Re[Re.TextLeftAlign=24]="TextLeftAlign",Re[Re.TextCenterAlign=25]="TextCenterAlign",Re[Re.TextRightAlign=26]="TextRightAlign",Re[Re.ConnectorLineOption=27]="ConnectorLineOption",Re[Re.ConnectorStartLineEnding=28]="ConnectorStartLineEnding",Re[Re.ConnectorEndLineEnding=29]="ConnectorEndLineEnding",Re[Re.BringToFront=30]="BringToFront",Re[Re.SendToBack=31]="SendToBack",Re[Re.MoveLeft=32]="MoveLeft",Re[Re.MoveStepLeft=33]="MoveStepLeft",Re[Re.MoveRight=34]="MoveRight",Re[Re.MoveStepRight=35]="MoveStepRight",Re[Re.MoveUp=36]="MoveUp",Re[Re.MoveStepUp=37]="MoveStepUp",Re[Re.MoveDown=38]="MoveDown",Re[Re.MoveStepDown=39]="MoveStepDown",Re[Re.CloneLeft=40]="CloneLeft",Re[Re.CloneRight=41]="CloneRight",Re[Re.CloneUp=42]="CloneUp",Re[Re.CloneDown=43]="CloneDown",Re[Re.AutoLayoutTree=44]="AutoLayoutTree",Re[Re.AutoLayoutFlow=45]="AutoLayoutFlow",Re[Re.AutoLayoutTreeVertical=46]="AutoLayoutTreeVertical",Re[Re.AutoLayoutTreeHorizontal=47]="AutoLayoutTreeHorizontal",Re[Re.AutoLayoutLayeredVertical=48]="AutoLayoutLayeredVertical",Re[Re.AutoLayoutLayeredHorizontal=49]="AutoLayoutLayeredHorizontal",Re[Re.Lock=50]="Lock",Re[Re.Unlock=51]="Unlock",Re[Re.Units=52]="Units",Re[Re.ViewUnits=53]="ViewUnits",Re[Re.PageSize=54]="PageSize",Re[Re.PageLandscape=55]="PageLandscape",Re[Re.PageColor=56]="PageColor",Re[Re.GridSize=57]="GridSize",Re[Re.ShowGrid=58]="ShowGrid",Re[Re.SnapToGrid=59]="SnapToGrid",Re[Re.ZoomLevel=60]="ZoomLevel",Re[Re.Fullscreen=61]="Fullscreen",Re[Re.ToggleSimpleView=62]="ToggleSimpleView",Re[Re.ToggleReadOnly=63]="ToggleReadOnly",Re[Re.EditShapeImage=64]="EditShapeImage",Re[Re.FitToScreen=65]="FitToScreen",Re[Re.SwitchAutoZoom=66]="SwitchAutoZoom",Re[Re.ToggleAutoZoom=67]="ToggleAutoZoom",Re[Re.FitToWidth=68]="FitToWidth",Re[Re.ZoomLevelItems=69]="ZoomLevelItems",Re[Re.GridSizeItems=70]="GridSizeItems",Re[Re.PageSizeItems=71]="PageSizeItems",Re[Re.ImportXML=72]="ImportXML",Re[Re.InsertShapeImage=73]="InsertShapeImage",Re[Re.DeleteShapeImage=74]="DeleteShapeImage",Re[Re.StrokeStyle=75]="StrokeStyle",Re[Re.StrokeWidth=76]="StrokeWidth",Re[Re.AutoLayoutTreeVerticalBottomToTop=77]="AutoLayoutTreeVerticalBottomToTop",Re[Re.AutoLayoutTreeHorizontalRightToLeft=78]="AutoLayoutTreeHorizontalRightToLeft",Re[Re.AutoLayoutLayeredVerticalBottomToTop=79]="AutoLayoutLayeredVerticalBottomToTop",Re[Re.AutoLayoutLayeredHorizontalRightToLeft=80]="AutoLayoutLayeredHorizontalRightToLeft",Re[Re.Zoom25=81]="Zoom25",Re[Re.Zoom50=82]="Zoom50",Re[Re.Zoom75=83]="Zoom75",Re[Re.Zoom100=84]="Zoom100",Re[Re.Zoom125=85]="Zoom125",Re[Re.Zoom150=86]="Zoom150",Re[Re.Zoom200=87]="Zoom200",Re[Re.AutoZoomToContent=88]="AutoZoomToContent",Re[Re.AutoZoomToWidth=89]="AutoZoomToWidth",Re[Re.ZoomLevelInPercentage=90]="ZoomLevelInPercentage",Re[Re.ConnectorRoutingMode=91]="ConnectorRoutingMode";var Se=function(){function Re(Fe){this.commands={},this.shortcutsToCommand={},this.lastCommandsChain=[],this.executingCommandsChain=[],this.executingCommandCounter=0,this.isPublicApiCall=!1,this.createCommand(Fe,f.Undo,T.UndoCommand,N.ModifierKey.Ctrl|N.KeyCode.Key_z,N.ModifierKey.Meta|N.KeyCode.Key_z),this.createCommand(Fe,f.Redo,y.RedoCommand,N.ModifierKey.Ctrl|N.KeyCode.Key_y,N.ModifierKey.Ctrl|N.ModifierKey.Shift|N.KeyCode.Key_z,N.ModifierKey.Meta|N.ModifierKey.Shift|N.KeyCode.Key_z),this.createCommand(Fe,f.Cut,Y.CutSelectionCommand,N.KeyCode.Key_x|N.ModifierKey.Ctrl,N.KeyCode.Key_x|N.ModifierKey.Meta,N.KeyCode.Delete|N.ModifierKey.Shift),this.createCommand(Fe,f.Copy,q.CopySelectionCommand,N.KeyCode.Key_c|N.ModifierKey.Ctrl,N.KeyCode.Key_c|N.ModifierKey.Meta,N.KeyCode.Insert|N.ModifierKey.Ctrl),this.createCommand(Fe,f.Paste,Z.PasteSelectionCommand),this.createCommand(Fe,f.PasteInPosition,Oe.PasteSelectionInPositionCommand),this.createCommand(Fe,f.SelectAll,L.SelectAllCommand,N.KeyCode.Key_a|N.ModifierKey.Ctrl,N.KeyCode.Key_a|N.ModifierKey.Meta),this.createCommand(Fe,f.Delete,S.DeleteCommand,N.KeyCode.Delete,N.KeyCode.Backspace),this.createCommand(Fe,f.Import,d.ImportCommand),this.createCommand(Fe,f.ImportBPMN,Q.ImportBPMNCommand),this.createCommand(Fe,f.ImportXML,ze.ImportXMLCommand),this.createCommand(Fe,f.Export,c.ExportCommand),this.createCommand(Fe,f.ExportSvg,ie.ExportSvgCommand),this.createCommand(Fe,f.ExportPng,J.ExportPngCommand),this.createCommand(Fe,f.ExportJpg,re.ExportJpgCommand),this.createCommand(Fe,f.BindDocument,ee.BindDocumentCommand),this.createCommand(Fe,f.UnbindDocument,he.UnbindDocumentCommand),this.createCommand(Fe,f.Bold,s.ToggleFontBoldCommand,N.ModifierKey.Ctrl|N.KeyCode.Key_b,N.ModifierKey.Meta|N.KeyCode.Key_b),this.createCommand(Fe,f.Italic,a.ToggleFontItalicCommand,N.ModifierKey.Ctrl|N.KeyCode.Key_i,N.ModifierKey.Meta|N.KeyCode.Key_i),this.createCommand(Fe,f.Underline,u.ToggleFontUnderlineCommand,N.ModifierKey.Ctrl|N.KeyCode.Key_u,N.ModifierKey.Meta|N.KeyCode.Key_u),this.createCommand(Fe,f.FontName,h.ChangeFontNameCommand),this.createCommand(Fe,f.FontSize,g.ChangeFontSizeCommand),this.createCommand(Fe,f.FontColor,_.ChangeFontColorCommand),this.createCommand(Fe,f.FillColor,x.ChangeFillColorCommand),this.createCommand(Fe,f.StrokeColor,w.ChangeStrokeColorCommand),this.createCommand(Fe,f.StrokeStyle,Ue.ChangeStrokeStyleCommand),this.createCommand(Fe,f.StrokeWidth,ot.ChangeStrokeWidthCommand),this.createCommand(Fe,f.TextLeftAlign,D.TextLeftAlignCommand),this.createCommand(Fe,f.TextCenterAlign,D.TextCenterAlignCommand),this.createCommand(Fe,f.TextRightAlign,D.TextRightAlignCommand),this.createCommand(Fe,f.ConnectorLineOption,I.ChangeConnectorLineOptionCommand),this.createCommand(Fe,f.ConnectorStartLineEnding,C.ChangeConnectorStartLineEndingCommand),this.createCommand(Fe,f.ConnectorEndLineEnding,C.ChangeConnectorEndLineEndingCommand),this.createCommand(Fe,f.BringToFront,pe.BringToFrontCommand),this.createCommand(Fe,f.SendToBack,te.SendToBackCommand),this.createCommand(Fe,f.MoveLeft,oe.MoveLeftCommand,N.ModifierKey.Ctrl|N.KeyCode.Left,N.ModifierKey.Ctrl|N.ModifierKey.Shift|N.KeyCode.Left),this.createCommand(Fe,f.MoveRight,oe.MoveRightCommand,N.ModifierKey.Ctrl|N.KeyCode.Right,N.ModifierKey.Ctrl|N.ModifierKey.Shift|N.KeyCode.Right),this.createCommand(Fe,f.MoveUp,oe.MoveUpCommand,N.ModifierKey.Ctrl|N.KeyCode.Up,N.ModifierKey.Ctrl|N.ModifierKey.Shift|N.KeyCode.Up),this.createCommand(Fe,f.MoveDown,oe.MoveDownCommand,N.ModifierKey.Ctrl|N.KeyCode.Down,N.ModifierKey.Ctrl|N.ModifierKey.Shift|N.KeyCode.Down),this.createCommand(Fe,f.MoveStepLeft,oe.MoveStepLeftCommand,N.KeyCode.Left,N.ModifierKey.Shift|N.KeyCode.Left),this.createCommand(Fe,f.MoveStepRight,oe.MoveStepRightCommand,N.KeyCode.Right,N.ModifierKey.Shift|N.KeyCode.Right),this.createCommand(Fe,f.MoveStepUp,oe.MoveStepUpCommand,N.KeyCode.Up,N.ModifierKey.Shift|N.KeyCode.Up),this.createCommand(Fe,f.MoveStepDown,oe.MoveStepDownCommand,N.KeyCode.Down,N.ModifierKey.Shift|N.KeyCode.Down),this.createCommand(Fe,f.CloneLeft,le.CloneLeftCommand,N.ModifierKey.Alt|N.KeyCode.Left,N.ModifierKey.Alt|N.ModifierKey.Shift|N.KeyCode.Left),this.createCommand(Fe,f.CloneRight,le.CloneRightCommand,N.ModifierKey.Alt|N.KeyCode.Right,N.ModifierKey.Alt|N.ModifierKey.Shift|N.KeyCode.Right),this.createCommand(Fe,f.CloneUp,le.CloneUpCommand,N.ModifierKey.Alt|N.KeyCode.Up,N.ModifierKey.Alt|N.ModifierKey.Shift|N.KeyCode.Up),this.createCommand(Fe,f.CloneDown,le.CloneDownCommand,N.ModifierKey.Alt|N.KeyCode.Down,N.ModifierKey.Alt|N.ModifierKey.Shift|N.KeyCode.Down),this.createCommand(Fe,f.Lock,be.LockCommand),this.createCommand(Fe,f.Unlock,ve.UnLockCommand),this.createCommand(Fe,f.AutoLayoutTree,G.AutoLayoutTreeVerticalCommand),this.createCommand(Fe,f.AutoLayoutFlow,z.AutoLayoutLayeredHorizontalCommand),this.createCommand(Fe,f.Units,Ce.ChangeUnitsCommand),this.createCommand(Fe,f.ViewUnits,Ce.ChangeViewUnitsCommand),this.createCommand(Fe,f.PageSize,K.ChangePageSizeCommand),this.createCommand(Fe,f.PageLandscape,B.ChangePageLandscapeCommand),this.createCommand(Fe,f.PageColor,ye.ChangePageColorCommand),this.createCommand(Fe,f.GridSize,U.ChangeGridSizeCommand),this.createCommand(Fe,f.ShowGrid,ge.ChangeShowGridCommand),this.createCommand(Fe,f.SnapToGrid,k.ChangeSnapToGridCommand),this.createCommand(Fe,f.ZoomLevel,ae.ChangeZoomLevelCommand),this.createCommand(Fe,f.ZoomLevelInPercentage,ae.ChangeZoomLevelInPercentageCommand),this.createCommand(Fe,f.AutoLayoutTreeVertical,G.AutoLayoutTreeVerticalCommand),this.createCommand(Fe,f.AutoLayoutTreeVerticalBottomToTop,st.AutoLayoutTreeVerticalBottomToTopCommand),this.createCommand(Fe,f.AutoLayoutTreeHorizontal,de.AutoLayoutTreeHorizontalCommand),this.createCommand(Fe,f.AutoLayoutTreeHorizontalRightToLeft,et.AutoLayoutTreeHorizontalRightToLeftCommand),this.createCommand(Fe,f.AutoLayoutLayeredVertical,ue.AutoLayoutLayeredVerticalCommand),this.createCommand(Fe,f.AutoLayoutLayeredVerticalBottomToTop,Ke.AutoLayoutLayeredVerticalBottomToTopCommand),this.createCommand(Fe,f.AutoLayoutLayeredHorizontal,z.AutoLayoutLayeredHorizontalCommand),this.createCommand(Fe,f.AutoLayoutLayeredHorizontalRightToLeft,Ye.AutoLayoutLayeredHorizontalRightToLeftCommand),this.createCommand(Fe,f.Fullscreen,fe.ToggleFullscreenCommand,N.KeyCode.F11),this.createCommand(Fe,f.ToggleSimpleView,xe.ToggleSimpleViewCommand),this.createCommand(Fe,f.ToggleReadOnly,Te.ToggleReadOnlyCommand),this.createCommand(Fe,f.InsertShapeImage,$e.InsertShapeImageCommand),this.createCommand(Fe,f.EditShapeImage,Ee.EditShapeImageCommand),this.createCommand(Fe,f.DeleteShapeImage,Be.DeleteShapeImageCommand),this.createCommand(Fe,f.FitToScreen,ae.FitToScreenCommand),this.createCommand(Fe,f.FitToWidth,ae.FitToWidthCommand),this.createCommand(Fe,f.SwitchAutoZoom,ae.SwitchAutoZoomCommand),this.createCommand(Fe,f.ToggleAutoZoom,ae.ToggleAutoZoomCommand),this.createCommand(Fe,f.ZoomLevelItems,ae.ChangeZoomLevelItemsCommand),this.createCommand(Fe,f.GridSizeItems,U.ChangeGridSizeItemsCommand),this.createCommand(Fe,f.PageSizeItems,K.ChangePageSizeItemsCommand),this.createCommand(Fe,f.Zoom25,ae.ChangeZoomLevelTo25Command),this.createCommand(Fe,f.Zoom50,ae.ChangeZoomLevelTo50Command),this.createCommand(Fe,f.Zoom75,ae.ChangeZoomLevelTo75Command),this.createCommand(Fe,f.Zoom100,ae.ChangeZoomLevelTo100Command),this.createCommand(Fe,f.Zoom125,ae.ChangeZoomLevelTo125Command),this.createCommand(Fe,f.Zoom150,ae.ChangeZoomLevelTo150Command),this.createCommand(Fe,f.Zoom200,ae.ChangeZoomLevelTo200Command),this.createCommand(Fe,f.AutoZoomToContent,ae.ToggleAutoZoomToContentCommand),this.createCommand(Fe,f.AutoZoomToWidth,ae.ToggleAutoZoomToWidthCommand),this.createCommand(Fe,f.ConnectorRoutingMode,Pe.ChangeConnectorRoutingModeCommand)}return Re.prototype.getCommand=function(Fe){return this.commands[Fe]},Re.prototype.beforeExecuting=function(Fe){this.executingCommandsChain.push(Fe),this.executingCommandCounter++},Re.prototype.afterExecuting=function(){this.executingCommandCounter--,0===this.executingCommandCounter&&(this.lastCommandsChain=this.executingCommandsChain,this.executingCommandsChain=[])},Re.prototype.processShortcut=function(Fe){var Xe=this.shortcutsToCommand[Fe];return!!Xe&&Xe.execute()},Re.prototype.processPaste=function(Fe){var Xe=this.getCommand(f.Paste);return Xe&&Xe.isEnabled()&&Xe.execute(Fe),!0},Re.prototype.notifySelectionChanged=function(Fe){this.lastCommandsChain=[]},Re.prototype.notifyScrollPositionChanged=function(){},Re.prototype.createCommand=function(Fe,Xe,tt){for(var vt=[],qe=3;qe<arguments.length;qe++)vt[qe-3]=arguments[qe];this.commands[Xe]=new tt(Fe);for(var At=0;At<vt.length;At++){var Tt=vt[At];"number"==typeof Tt&&(this.shortcutsToCommand[Tt]=this.commands[Xe])}},Re}();P.CommandManager=Se},2102:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SimpleCommandState=void 0,P.SimpleCommandState=function(f,S,T,y,d){this.visible=!0,this.denyUpdateValue=!1,this.enabled=f,this.value=S,this.items=y,this.visible=d,this.defaultValue=T}},264:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteCommand=void 0;var T=b(4867),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabled=function(){var s=this.control.selection.getSelectedItems();return d.prototype.isEnabled.call(this)&&s.length&&(s.length>1||this.permissionsProvider.canDeleteItems(s))},c.prototype.executeCore=function(s){var a=this.control.selection.getSelectedItems(!0,!0);return this.permissionsProvider.beginDeleteItems(a),T.ModelUtils.deleteSelection(this.control.history,this.control.model,this.control.selection),this.permissionsProvider.endDeleteItems(),!0},Object.defineProperty(c.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),c}(b(9741).SimpleCommandBase);P.DeleteCommand=y},3614:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.RedoCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.executeCore=function(c){return this.control.beginUpdateCanvas(),this.permissionsProvider.lockPermissions(),this.control.history.redo(),this.permissionsProvider.unlockPermissions(),this.control.endUpdateCanvas(),!0},d.prototype.isEnabled=function(){return y.prototype.isEnabled.call(this)&&this.control.history.canRedo()},d}(b(9741).SimpleCommandBase);P.RedoCommand=T},2452:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.SelectAllCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabledInReadOnlyMode=function(){return!0},d.prototype.executeCore=function(c,s){var a=[];return this.control.model.iterateItems(function(u){return a.push(u.key)}),this.control.selection.set(a),!0},d}(b(9741).SimpleCommandBase);P.SelectAllCommand=T},6679:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.UndoCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.executeCore=function(c){return this.control.beginUpdateCanvas(),this.permissionsProvider.lockPermissions(),this.control.history.undo(),this.permissionsProvider.unlockPermissions(),this.control.endUpdateCanvas(),!0},d.prototype.isEnabled=function(){return y.prototype.isEnabled.call(this)&&this.control.history.canUndo()},d}(b(9741).SimpleCommandBase);P.UndoCommand=T},9538:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.BindDocumentCommand=void 0;var T=b(3503),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabledInReadOnlyMode=function(){return!0},c.prototype.executeCore=function(s,a){if(!a||!Array.isArray(a.nodeDataSource))throw Error("Format exception");return this.performImportData(a),this.control.updateLayout(!0),!0},c.prototype.performImportData=function(s){var a=this.control.createDocumentDataSource(s.nodeDataSource,s.edgeDataSource,s.dataParameters,s.nodeDataImporter,s.edgeDataImporter);this.control.beginUpdateCanvas(),this.permissionsProvider.lockPermissions();var u=new T.DataLayoutParameters(this.control.settings,s.layoutParameters);a.createModelItems(this.control.history,this.control.model,this.control.shapeDescriptionManager,this.control.selection,u,this.control.settings.snapToGrid,this.control.settings.gridSize,this.control.measurer),this.permissionsProvider.unlockPermissions(),this.control.endUpdateCanvas()},c}(b(9741).SimpleCommandBase);P.BindDocumentCommand=y},125:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.UnbindDocumentCommand=void 0;var T=b(4867),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabledInReadOnlyMode=function(){return!0},c.prototype.executeCore=function(s){return this.permissionsProvider.lockPermissions(),this.control.deleteDocumentDataSource(),T.ModelUtils.deleteAllItems(this.control.history,this.control.model,this.control.selection),this.control.history.clear(),this.permissionsProvider.unlockPermissions(),!0},c}(b(9741).SimpleCommandBase);P.UnbindDocumentCommand=y},4845:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportCommand=void 0;var T=b(5885),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.executeCore=function(s,a){return a((new T.Exporter).export(this.control.model)),!0},c}(b(1081).ExportImportCommandBase);P.ExportCommand=y},4012:function(o,P,b){var f,S=this&&this.__extends||(f=function(_,x){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var C in D)D.hasOwnProperty(C)&&(w[C]=D[C])})(_,x)},function(_,x){function w(){this.constructor=_}f(_,x),_.prototype=null===x?Object.create(x):(w.prototype=x.prototype,new w)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportImageCommand=void 0;var T=b(8693),y=b(3872),d=b(1081),c=b(5885),s=b(1114),a=b(1733),u=b(6078),h=b(7176),g=function(_){function x(w){var D=_.call(this,w)||this;return D.exporter=new c.Exporter,D}return S(x,_),x.prototype.isEnabled=function(){return!h.ImageCache.instance.hasNonLoadedImages()},x.prototype.executeCore=function(w,D){var C=this;try{var I=this.getExportManager();this.getExportFunc()(this.control.model.size.clone(),this.control.model.pageColor,I,function(L){D(L,C.getExtension()),C.tryDispose()},this.control.settings.useCanvgForExportToImage)}catch(L){throw this.tryDispose(),L}return!0},x.prototype.getExportManager=function(){var w=this.getOrCreateMeasurer(),D=this.control.render&&this.control.render.items||this.createItemsManager(w);return this.exportManager||(this.exportManager=new y.CanvasExportManager(D.itemsContainer,w,this.control.instanceId))},x.prototype.createItemsManager=function(w){this.svgElement=s.RenderHelper.createSvgElement(document.body,!0);var D=new T.CanvasItemsManager(this.svgElement,1,new u.ExportDOMManipulator(w),this.control.instanceId);return this.control.modelManipulator.onModelChanged.add(D),this.control.modelManipulator.commitItemsCreateChanges(),D},x.prototype.tryDispose=function(){this.svgElement&&(document.body.removeChild(this.svgElement),delete this.svgElement),this.tempMeasurer&&(this.tempMeasurer.clean(),this.tempMeasurer=void 0),this.exportManager=void 0},x.prototype.getOrCreateMeasurer=function(){return this.control.measurer||(this.tempMeasurer=new a.TextMeasurer(document.body))},x}(d.ExportImportCommandBase);P.ExportImageCommand=g},1081:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportImportCommandBase=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabledInReadOnlyMode=function(){return!0},d}(b(9741).SimpleCommandBase);P.ExportImportCommandBase=T},1203:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportJpgCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getExtension=function(){return"jpg"},d.prototype.getExportFunc=function(){return this.exporter.exportJpg},d}(b(4012).ExportImageCommand);P.ExportJpgCommand=T},3690:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportPngCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getExtension=function(){return"png"},d.prototype.getExportFunc=function(){return this.exporter.exportPng},d}(b(4012).ExportImageCommand);P.ExportPngCommand=T},2276:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportSvgCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getExtension=function(){return"svg"},d.prototype.getExportFunc=function(){return this.exporter.exportSvg},d}(b(4012).ExportImageCommand);P.ExportSvgCommand=T},1239:function(o,P,b){var f,S=this&&this.__extends||(f=function(x,w){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,C){D.__proto__=C}||function(D,C){for(var I in C)C.hasOwnProperty(I)&&(D[I]=C[I])})(x,w)},function(x,w){function D(){this.constructor=x}f(x,w),x.prototype=null===w?Object.create(w):(D.prototype=w.prototype,new D)});Object.defineProperty(P,"__esModule",{value:!0}),P.ImportBPMNCommand=void 0;var T=b(5941),y=b(4867),d=b(4145),c=b(8900),s=b(7959),a=b(9603),u=b(3477),h=b(1256),g=b(8710),_=function(x){function w(){return null!==x&&x.apply(this,arguments)||this}return S(w,x),w.prototype.executeCore=function(D,C){var I=new T.BPMNImporter(C).import();return this.updateModel(I),!0},w.prototype.updateModel=function(D){var C=this,I={},L=[],N=[];this.control.history.beginTransaction(),D.items.forEach(function(k){var U=new d.AddShapeHistoryItem(C.getShapeDescription(k.type),new c.Point(0,0),k.text,k.key);C.control.history.addAndRedo(U),I[k.key]=U.shapeKey;var B=C.control.model.findShape(U.shapeKey);L.push(B)}),D.edges.forEach(function(k){var U=C.control.model.findShape(I[k.from]),B=C.control.model.findShape(I[k.to]),K=new a.AddConnectorHistoryItem([U.getConnectionPointPosition(0),B.getConnectionPointPosition(0)]);C.control.history.addAndRedo(K);var J=C.control.model.findConnector(K.connectorKey);C.control.history.addAndRedo(new u.AddConnectionHistoryItem(J,U,0,s.ConnectorPosition.Begin)),C.control.history.addAndRedo(new u.AddConnectionHistoryItem(J,B,0,s.ConnectorPosition.End)),N.push(J)});var G=new g.LayoutSettings;y.ModelUtils.getGraphInfoByItems(this.control.model,L,N).forEach(function(k){var U=new h.SugiyamaLayoutBuilder(G,k.graph).build(),B=y.ModelUtils.getNonGraphItems(C.control.model,k.container,U.nodeToLayout,L,N);y.ModelUtils.applyLayout(C.control.history,C.control.model,void 0,k.graph,U,B,G,C.control.settings.snapToGrid,C.control.settings.gridSize,!1)}),y.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.endTransaction()},w.prototype.getShapeDescription=function(D){return this.control.shapeDescriptionManager.get(D)},w}(b(1081).ExportImportCommandBase);P.ImportBPMNCommand=_},6596:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ImportCommand=void 0;var T=b(2406),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.executeCore=function(s,a){this.permissionsProvider.lockPermissions();var h=new T.Importer(this.control.shapeDescriptionManager,a.data?a.data:a);if(!0===a.keepExistingItems)h.importItemsData(this.control.model),this.control.importItemsData();else{var g=h.import();this.control.importModel(g)}return this.permissionsProvider.unlockPermissions(),!0},c}(b(1081).ExportImportCommandBase);P.ImportCommand=y},5830:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ImportXMLCommand=void 0;var T=b(780),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.executeCore=function(s,a){var u=new T.XmlImporter(this.control.shapeDescriptionManager,a).import();return this.control.importModel(u),!0},c}(b(1081).ExportImportCommandBase);P.ImportXMLCommand=y},4999:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.CloneDownCommand=P.CloneUpCommand=P.CloneRightCommand=P.CloneLeftCommand=P.CloneCommand=void 0;var T=b(4867),y=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.isEnabled=function(){var g=this.control.selection.getSelectedItems();return u.prototype.isEnabled.call(this)&&g.length&&g.length>0&&this.permissionsProvider.canAddItems(g)},h.prototype.executeCore=function(g,_){var x=T.ModelUtils.createRectangle(this.control.selection.getSelectedItems());return T.ModelUtils.cloneSelectionToOffset(this.control.history,this.control.model,void 0,this.control.selection,this.getOffsetX(x),this.getOffsetY(x)),!0},Object.defineProperty(h.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),h.prototype.getOffsetX=function(g){return 0},h.prototype.getOffsetY=function(g){return 0},h}(b(9741).SimpleCommandBase);P.CloneCommand=y;var d=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.getOffsetX=function(g){return-g.width},h}(y);P.CloneLeftCommand=d;var c=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.getOffsetX=function(g){return g.width},h}(y);P.CloneRightCommand=c;var s=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.getOffsetY=function(g){return-g.height},h}(y);P.CloneUpCommand=s;var a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.getOffsetY=function(g){return g.height},h}(y);P.CloneDownCommand=a},5925:function(o,P,b){var f,S=this&&this.__extends||(f=function(I,L){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,G){N.__proto__=G}||function(N,G){for(var k in G)G.hasOwnProperty(k)&&(N[k]=G[k])})(I,L)},function(I,L){function N(){this.constructor=I}f(I,L),I.prototype=null===L?Object.create(L):(N.prototype=L.prototype,new N)});Object.defineProperty(P,"__esModule",{value:!0}),P.MoveStepDownCommand=P.MoveDownCommand=P.MoveStepUpCommand=P.MoveUpCommand=P.MoveStepRightCommand=P.MoveRightCommand=P.MoveStepLeftCommand=P.MoveLeftCommand=P.MoveCommand=void 0;var T=b(8900),y=b(4867),d=b(9291),c=b(9741),s=b(4742),a=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.isEnabled=function(){return I.prototype.isEnabled.call(this)&&!this.control.selection.isEmpty()},L.prototype.executeCore=function(N,G){var k=this;this.control.history.beginTransaction();var U=this.control.selection,B=new s.SelectionDragHelper(this.control.history,this.control.model,this.permissionsProvider,new T.Point(0,0),U.getSelectedItems(!0));return B.initDraggingShapes(U.getSelectedShapes(!1,!0),!1),B.initDraggingConnectors(U.getSelectedConnectors(!1,!0),!1),B.move(!1,function(K){return k.getPosition(K)},function(){},function(){}),y.ModelUtils.tryUpdateModelRectangle(this.control.history,function(K,J){return B.onTryUpdateModelSize(K,J)}),this.control.history.endTransaction(),!0},Object.defineProperty(L.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),L}(c.SimpleCommandBase);P.MoveCommand=a;var u=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return N.clone().offset(-d.UnitConverter.pixelsToTwips(1),0)},L}(a);P.MoveLeftCommand=u;var h=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return this.control.settings.snapToGrid?new T.Point(y.ModelUtils.getSnappedPos(this.control.model,this.control.settings.gridSize,N.x-(this.control.settings.gridSize/2+2),!0),N.y):N.clone().offset(-this.control.settings.gridSize,0)},L}(a);P.MoveStepLeftCommand=h;var g=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return N.clone().offset(d.UnitConverter.pixelsToTwips(1),0)},L}(a);P.MoveRightCommand=g;var _=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return this.control.settings.snapToGrid?new T.Point(y.ModelUtils.getSnappedPos(this.control.model,this.control.settings.gridSize,N.x+(this.control.settings.gridSize/2+2),!0),N.y):N.clone().offset(this.control.settings.gridSize,0)},L}(a);P.MoveStepRightCommand=_;var x=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return N.clone().offset(0,-d.UnitConverter.pixelsToTwips(1))},L}(a);P.MoveUpCommand=x;var w=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return this.control.settings.snapToGrid?new T.Point(N.x,y.ModelUtils.getSnappedPos(this.control.model,this.control.settings.gridSize,N.y-(this.control.settings.gridSize/2+2),!1)):N.clone().offset(0,-this.control.settings.gridSize)},L}(a);P.MoveStepUpCommand=w;var D=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return N.clone().offset(0,d.UnitConverter.pixelsToTwips(1))},L}(a);P.MoveDownCommand=D;var C=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.getPosition=function(N){return this.control.settings.snapToGrid?new T.Point(N.x,y.ModelUtils.getSnappedPos(this.control.model,this.control.settings.gridSize,N.y+(this.control.settings.gridSize/2+2),!1)):N.clone().offset(0,this.control.settings.gridSize)},L}(a);P.MoveStepDownCommand=C},7550:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeGridSizeItemsCommand=P.ChangeGridSizeCommand=void 0;var T=b(9741),y=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.isEnabledInReadOnlyMode=function(){return!0},s.prototype.getValue=function(){return this.getModelUnit(this.control.settings.gridSize)},s.prototype.executeCore=function(a,u){return this.control.settings.gridSize=this.getModelUnitTwipsValue(u),!0},s.prototype.getItems=function(){var a=this;return this.control.settings.gridSizeItems.map(function(u){return{value:a.getModelUnit(u),text:a.getViewUnitText(u)}})},s}(T.SimpleCommandBase);P.ChangeGridSizeCommand=y;var d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.isEnabledInReadOnlyMode=function(){return!0},s.prototype.getValue=function(){var a=this;return this.control.settings.gridSizeItems.map(function(u){return a.getModelUnit(u)})},s.prototype.executeCore=function(a,u){var h=this;return this.control.settings.gridSizeItems=u.map(function(g){return h.getModelUnitTwipsValue(g)}),!0},s}(T.SimpleCommandBase);P.ChangeGridSizeItemsCommand=d},8016:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePageColorCommand=void 0;var T=b(3499),y=b(7195),d=b(6613),c=b(13),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S(u,a),u.prototype.getValue=function(){return c.ColorUtils.colorToHash(this.control.model.pageColor)},u.prototype.getDefaultValue=function(){return c.ColorUtils.colorToHash(d.DiagramModel.defaultPageColor)},u.prototype.createHistoryItems=function(h){return[new y.ChangePageColorHistoryItem(c.ColorUtils.fromString(h))]},u}(T.ChangePagePropertyCommand);P.ChangePageColorCommand=s},7649:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePageLandscapeCommand=void 0;var T=b(3499),y=b(1380),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.getValue=function(){return this.control.model.pageLandscape},s.prototype.createHistoryItems=function(a){return[new y.ChangePageLandscapeHistoryItem(a)]},s}(T.ChangePagePropertyCommand);P.ChangePageLandscapeCommand=d},3499:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePagePropertyCommand=void 0;var T=b(4867),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.executeCore=function(s,a){var u=this;return this.control.history.beginTransaction(),this.createHistoryItems(a).forEach(function(h){u.control.history.addAndRedo(h)}),T.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.endTransaction(),!0},c.prototype.getItems=function(){return null},c}(b(9741).SimpleCommandBase);P.ChangePagePropertyCommand=y},1813:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePageSizeItemsCommand=P.ChangePageSizeCommand=void 0;var T=b(3499),y=b(6353),d=b(1044),c=b(9741),s=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.getValue=function(){return this.getModelUnitSize(this.control.model.pageSize)},h.prototype.createHistoryItems=function(g){return[new d.ChangePageSizeHistoryItem(new y.Size(this.getModelUnitTwipsValue(g.width),this.getModelUnitTwipsValue(g.height)))]},h.prototype.getItems=function(){var g=this;return this.control.settings.pageSizeItems.map(function(_){return{value:g.getModelUnitSize(_.size),text:_.text.replace("{width}",g.getViewUnitText(_.size.width)).replace("{height}",g.getViewUnitText(_.size.height))}})},h.prototype.getModelUnitSize=function(g){return new y.Size(this.getModelUnit(g.width),this.getModelUnit(g.height))},h}(T.ChangePagePropertyCommand);P.ChangePageSizeCommand=s;var a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.isEnabled=function(){return!0},h.prototype.getValue=function(){var g=this;return this.control.settings.pageSizeItems.map(function(_){return{size:new y.Size(g.getModelUnit(_.width),g.getModelUnit(_.height)),text:_.text}})},h.prototype.executeCore=function(g,_){var x=this;return this.control.settings.pageSizeItems=_.map(function(w){return{size:new y.Size(x.getModelUnitTwipsValue(w.width),x.getModelUnitTwipsValue(w.height)),text:w.text}}),!0},h}(c.SimpleCommandBase);P.ChangePageSizeItemsCommand=a},72:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeShowGridCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabledInReadOnlyMode=function(){return!0},d.prototype.executeCore=function(c,s){var a=void 0===s?!this.control.settings.showGrid:!!s;return this.control.settings.showGrid!==a&&(this.control.settings.showGrid=a,!0)},d.prototype.getValue=function(){return this.control.settings.showGrid},d}(b(9741).SimpleCommandBase);P.ChangeShowGridCommand=T},4503:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeSnapToGridCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.executeCore=function(c,s){var a=void 0===s?!this.control.settings.snapToGrid:!!s;return this.control.settings.snapToGrid!==a&&(this.control.settings.snapToGrid=a,!0)},d.prototype.getValue=function(){return this.control.settings.snapToGrid},d}(b(9741).SimpleCommandBase);P.ChangeSnapToGridCommand=T},4419:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeViewUnitsCommand=P.ChangeUnitsCommand=void 0;var T=b(3499),y=b(7479),d=b(9741),c=b(6224),s=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.isEnabledInReadOnlyMode=function(){return!0},h.prototype.getValue=function(){return this.control.model.units},h.prototype.createHistoryItems=function(g){return[new y.ChangeUnitsHistoryItem(g)]},h.prototype.getItems=function(){return Object.keys(c.DiagramLocalizationService.unitItems).map(function(g){return{value:parseInt(g),text:c.DiagramLocalizationService.unitItems[g]}})},h}(T.ChangePagePropertyCommand);P.ChangeUnitsCommand=s;var a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.isEnabledInReadOnlyMode=function(){return!0},h.prototype.getValue=function(){return this.control.settings.viewUnits},h.prototype.executeCore=function(g,_){return this.control.settings.viewUnits=_,!0},h.prototype.getItems=function(){return Object.keys(c.DiagramLocalizationService.unitItems).map(function(g){return{value:parseInt(g),text:c.DiagramLocalizationService.unitItems[g]}})},h}(d.SimpleCommandBase);P.ChangeViewUnitsCommand=a},4522:function(o,P,b){var f,S=this&&this.__extends||(f=function(B,K){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ie){J.__proto__=ie}||function(J,ie){for(var re in ie)ie.hasOwnProperty(re)&&(J[re]=ie[re])})(B,K)},function(B,K){function J(){this.constructor=B}f(B,K),B.prototype=null===K?Object.create(K):(J.prototype=K.prototype,new J)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleAutoZoomCommand=P.ToggleAutoZoomToWidthCommand=P.ToggleAutoZoomToContentCommand=P.SwitchAutoZoomCommand=P.FitToWidthCommand=P.FitToScreenCommand=P.ChangeZoomLevelItemsCommand=P.ChangeZoomLevelTo200Command=P.ChangeZoomLevelTo150Command=P.ChangeZoomLevelTo125Command=P.ChangeZoomLevelTo100Command=P.ChangeZoomLevelTo75Command=P.ChangeZoomLevelTo50Command=P.ChangeZoomLevelTo25Command=P.ChangeZoomLevelInPercentageCommand=P.ChangeZoomLevelCommand=void 0;var T=b(9741),y=b(240),d=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.isEnabledInReadOnlyMode=function(){return!0},K.prototype.getValue=function(){return this.control.view.getZoom()},K.prototype.executeCore=function(J,ie){return this.control.settings.zoomLevel=ie,this.control.settings.autoZoom=y.AutoZoomMode.Disabled,this.control.updateLayout(!0),!0},K.prototype.getItems=function(){return this.control.settings.zoomLevelItems.map(function(J){return{value:J,text:100*J+"%"}})},K}(T.SimpleCommandBase);P.ChangeZoomLevelCommand=d;var c=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.executeCore=function(J,ie){return B.prototype.executeCore.call(this,J,ie/100)},K.prototype.getValue=function(){return 100*this.control.view.getZoom()},K}(d);P.ChangeZoomLevelInPercentageCommand=c;var s=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.getValue=function(){return this.control.view.getZoom()===this.exactValue},K.prototype.executeCore=function(J,ie){return B.prototype.executeCore.call(this,J,this.exactValue),!0},K.prototype.getItems=function(){},K}(d),a=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=.25,J}return S(K,B),K}(s);P.ChangeZoomLevelTo25Command=a;var u=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=.5,J}return S(K,B),K}(s);P.ChangeZoomLevelTo50Command=u;var h=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=.75,J}return S(K,B),K}(s);P.ChangeZoomLevelTo75Command=h;var g=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=1,J}return S(K,B),K}(s);P.ChangeZoomLevelTo100Command=g;var _=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=1.25,J}return S(K,B),K}(s);P.ChangeZoomLevelTo125Command=_;var x=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=1.5,J}return S(K,B),K}(s);P.ChangeZoomLevelTo150Command=x;var w=function(B){function K(){var J=null!==B&&B.apply(this,arguments)||this;return J.exactValue=2,J}return S(K,B),K}(s);P.ChangeZoomLevelTo200Command=w;var D=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.isEnabledInReadOnlyMode=function(){return!0},K.prototype.getValue=function(){return this.control.settings.zoomLevelItems},K.prototype.executeCore=function(J,ie){return this.control.settings.zoomLevelItems=ie,!0},K}(T.SimpleCommandBase);P.ChangeZoomLevelItemsCommand=D;var C=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.isEnabled=function(){return B.prototype.isEnabled.call(this)&&!!this.control.render},K.prototype.isEnabledInReadOnlyMode=function(){return!0},K.prototype.executeCore=function(J){var ie=this.getZoomLevel();return this.control.settings.zoomLevel=ie,this.control.settings.autoZoom=y.AutoZoomMode.Disabled,this.control.updateLayout(!0),!0},K}(T.SimpleCommandBase),I=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.getZoomLevel=function(){return this.control.render.view.getActualAutoZoomLevel(y.AutoZoomMode.FitContent)},K}(C);P.FitToScreenCommand=I;var L=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.getZoomLevel=function(){return this.control.render.view.getActualAutoZoomLevel(y.AutoZoomMode.FitToWidth)},K}(C);P.FitToWidthCommand=L;var N=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.isEnabledInReadOnlyMode=function(){return!0},K.prototype.getValue=function(){return this.control.settings.autoZoom},K.prototype.executeCore=function(J,ie){return ie=parseInt(ie),this.control.settings.autoZoom!==ie&&(ie===y.AutoZoomMode.Disabled&&(this.control.settings.zoomLevel=this.control.view.getZoom()),this.control.settings.autoZoom=ie,this.control.updateLayout(!0),!0)},K}(T.SimpleCommandBase);P.SwitchAutoZoomCommand=N;var G=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.getValue=function(){return this.control.settings.autoZoom===y.AutoZoomMode.FitContent},K.prototype.executeCore=function(J,ie){return B.prototype.executeCore.call(this,J,y.AutoZoomMode.FitContent)},K}(N);P.ToggleAutoZoomToContentCommand=G;var k=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.getValue=function(){return this.control.settings.autoZoom===y.AutoZoomMode.FitToWidth},K.prototype.executeCore=function(J,ie){return B.prototype.executeCore.call(this,J,y.AutoZoomMode.FitToWidth)},K}(N);P.ToggleAutoZoomToWidthCommand=k;var U=function(B){function K(){return null!==B&&B.apply(this,arguments)||this}return S(K,B),K.prototype.isEnabled=function(){return B.prototype.isEnabled.call(this)&&!!this.control.render},K.prototype.isEnabledInReadOnlyMode=function(){return!0},K.prototype.getValue=function(){return this.control.settings.autoZoom},K.prototype.executeCore=function(J,ie){var re;return this.control.settings.autoZoom!==(re=void 0===ie?this.control.settings.autoZoom===y.AutoZoomMode.Disabled?y.AutoZoomMode.FitContent:y.AutoZoomMode.Disabled:ie?y.AutoZoomMode.FitContent:y.AutoZoomMode.Disabled)&&(re||(this.control.settings.zoomLevel=this.control.view.getZoom()),this.control.settings.autoZoom=re,this.control.updateLayout(!0),!0)},K}(T.SimpleCommandBase);P.ToggleAutoZoomCommand=U},6619:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleFullscreenCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabledInReadOnlyMode=function(){return!0},d.prototype.getValue=function(){return this.control.settings.fullscreen},d.prototype.executeCore=function(c,s){return this.control.settings.fullscreen!==("boolean"==typeof s?s:!c.value)&&(this.control.settings.fullscreen=!c.value,this.control.notifyToggleFullscreen(this.control.settings.fullscreen)),!0},d}(b(9741).SimpleCommandBase);P.ToggleFullscreenCommand=T},9970:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleReadOnlyCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabledInReadOnlyMode=function(){return!0},d.prototype.getValue=function(){return this.control.settings.readOnly},d.prototype.executeCore=function(c,s){return"boolean"==typeof s?this.control.settings.readOnly=s:void 0===s&&(this.control.settings.readOnly=!c.value),!0},d}(b(9741).SimpleCommandBase);P.ToggleReadOnlyCommand=T},7795:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleSimpleViewCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabledInReadOnlyMode=function(){return!0},d.prototype.getValue=function(){return this.control.settings.simpleView},d.prototype.executeCore=function(c,s){return"boolean"==typeof s?this.control.settings.simpleView=s:void 0===s&&(this.control.settings.simpleView=!c.value),this.control.updateLayout(!0),!0},d}(b(9741).SimpleCommandBase);P.ToggleSimpleViewCommand=T},3591:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.BringToFrontCommand=void 0;var T=b(5982),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabled=function(){var s=this.control.selection.getSelectedItems();return d.prototype.isEnabled.call(this)&&s.length>0&&this.needBringToFront(s)},c.prototype.executeCore=function(s,a){var u=this;return this.control.history.beginTransaction(),this.control.selection.getSelectedItems().forEach(function(h){var g=u.control.model.getIntersectItemsMaxZIndex(h)+1;u.control.history.addAndRedo(new T.ChangeZindexHistoryItem(h,g))}),this.control.history.endTransaction(),!0},c.prototype.needBringToFront=function(s){for(var a=this,u=function(x){var w=h.control.model.getIntersectItemsMaxZIndex(s[x]);if(w>s[x].zIndex)return{value:!0};if(w===s[x].zIndex){var D=!1;return h.control.model.getIntersectItems(s[x]).filter(function(C){return C.zIndex===s[x].zIndex}).forEach(function(C){a.control.model.getItemIndex(C)>a.control.model.getItemIndex(s[x])&&(D=!0)}),{value:D}}},h=this,g=0;g<s.length;g++){var _=u(g);if("object"==typeof _)return _.value}return!1},c}(b(9741).SimpleCommandBase);P.BringToFrontCommand=y},2301:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorEndLineEndingCommand=P.ChangeConnectorStartLineEndingCommand=void 0;var T=b(7551),y=b(4612),d=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getPropertyName=function(){return"startLineEnding"},a.prototype.getPropertyDefaultValue=function(){return y.ConnectorLineEnding.None},a}(T.ChangeConnectorPropertyCommand);P.ChangeConnectorStartLineEndingCommand=d;var c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getPropertyName=function(){return"endLineEnding"},a.prototype.getPropertyDefaultValue=function(){return y.ConnectorLineEnding.Arrow},a}(T.ChangeConnectorPropertyCommand);P.ChangeConnectorEndLineEndingCommand=c},7306:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorLineOptionCommand=void 0;var T=b(7551),y=b(4612),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.getPropertyName=function(){return"lineOption"},s.prototype.getPropertyDefaultValue=function(){return y.ConnectorLineOption.Straight},s}(T.ChangeConnectorPropertyCommand);P.ChangeConnectorLineOptionCommand=d},7551:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorPropertyCommand=void 0;var T=b(8236),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentConnectorPropertyValue(this.getPropertyName())},c.prototype.getDefaultValue=function(){return this.getPropertyDefaultValue()},c.prototype.executeCore=function(s,a){var u=this;return this.control.history.beginTransaction(),this.control.selection.getSelectedConnectors().forEach(function(h){var g=u.getPropertyName();u.control.history.addAndRedo(new T.ChangeConnectorPropertyHistoryItem(h.key,g,a))}),this.control.selection.inputPosition.setConnectorPropertyValue(this.getPropertyName(),a),this.control.history.endTransaction(),!0},c.prototype.lockInputPositionUpdating=function(){return!0},c.prototype.isEnabled=function(){var s=this.control.selection.getSelectedConnectors();return d.prototype.isEnabled.call(this)&&s.length>0},c}(b(9741).SimpleCommandBase);P.ChangeConnectorPropertyCommand=y},7717:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorRoutingModeCommand=void 0;var T=b(9741),y=b(240),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.getValue=function(){return this.control.settings.connectorRoutingMode},s.prototype.executeCore=function(a,u){return this.control.settings.connectorRoutingMode=void 0!==u?u:y.ConnectorRoutingMode.None,!0},s}(T.SimpleCommandBase);P.ChangeConnectorRoutingModeCommand=d},1307:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeLockedCommand=void 0;var T=b(4867),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabled=function(){var s=this,a=this.control.selection.getSelectedItems(!0),u=!1;return a.forEach(function(h){h.locked!==s.getLockState()&&(u=!0)}),d.prototype.isEnabled.call(this)&&u},c.prototype.executeCore=function(s,a){return T.ModelUtils.changeSelectionLocked(this.control.history,this.control.model,this.control.selection,this.getLockState()),!0},c}(b(9741).SimpleCommandBase);P.ChangeLockedCommand=y},9031:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.LockCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getLockState=function(){return!0},d}(b(1307).ChangeLockedCommand);P.LockCommand=T},4624:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.SendToBackCommand=void 0;var T=b(5982),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabled=function(){var s=this.control.selection.getSelectedItems();return d.prototype.isEnabled.call(this)&&s.length>0&&this.needSendToBack(s)},c.prototype.executeCore=function(s,a){var u=this;return this.control.history.beginTransaction(),this.control.selection.getSelectedItems().forEach(function(h){var g=u.control.model.getIntersectItemsMinZIndex(h)-1;u.control.history.addAndRedo(new T.ChangeZindexHistoryItem(h,g))}),this.control.history.endTransaction(),!0},c.prototype.needSendToBack=function(s){for(var a=this,u=function(x){var w=h.control.model.getIntersectItemsMinZIndex(s[x]);if(w<s[x].zIndex)return{value:!0};if(w===s[x].zIndex){var D=!1;return h.control.model.getIntersectItems(s[x]).filter(function(C){return C.zIndex===s[x].zIndex}).forEach(function(C){a.control.model.getItemIndex(C)<a.control.model.getItemIndex(s[x])&&(D=!0)}),{value:D}}},h=this,g=0;g<s.length;g++){var _=u(g);if("object"==typeof _)return _.value}return!1},c}(b(9741).SimpleCommandBase);P.SendToBackCommand=y},6049:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.UnLockCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getLockState=function(){return!1},d}(b(1307).ChangeLockedCommand);P.UnLockCommand=T},962:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteShapeImageCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabled=function(){var c=this.getSelectedShape();return y.prototype.isEnabled.call(this)&&!c.image.isEmpty},d.prototype.executeCore=function(c,s){return y.prototype.executeCore.call(this,c,void 0)},d}(b(7650).EditShapeImageCommandBase);P.DeleteShapeImageCommand=T},4281:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.EditShapeImageCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabled=function(){var c=this.getSelectedShape();return y.prototype.isEnabled.call(this)&&!c.image.isEmpty},d}(b(7650).EditShapeImageCommandBase);P.EditShapeImageCommand=T},7650:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.EditShapeImageCommandBase=void 0;var T=b(8210),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S(c,d),c.prototype.isEnabled=function(){var s=this.getSelectedShape();return d.prototype.isEnabled.call(this)&&!!s&&!s.locked&&s.enableImage&&s.allowEditImage},c.prototype.getValue=function(){var s=this.getSelectedShape();return s?s.image.exportUrl:void 0},c.prototype.getSelectedShape=function(){var s=this.control.selection.getSelectedShapes(!0);return 1===s.length?s[0]:void 0},c.prototype.executeCore=function(s,a){this.control.history.beginTransaction();var u=this.control.selection.getSelectedShapes(!1);return this.control.history.addAndRedo(new T.ChangeShapeImageHistoryItem(u[0],a)),this.control.history.endTransaction(),!0},c}(b(9741).SimpleCommandBase);P.EditShapeImageCommandBase=y},9158:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.InsertShapeImageCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.isEnabled=function(){var c=this.getSelectedShape();return y.prototype.isEnabled.call(this)&&c.image.isEmpty},d}(b(7650).EditShapeImageCommandBase);P.InsertShapeImageCommand=T},9741:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.SimpleCommandBase=void 0;var T=b(9687),y=b(2102),d=b(4867),c=b(6224),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S(u,a),u.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled(),this.getValue(),this.getDefaultValue(),this.getItems(),this.isVisible())},u.prototype.isVisible=function(){return!0},u.prototype.isEnabled=function(){return!this.control.settings.readOnly||this.isEnabledInReadOnlyMode()},u.prototype.isEnabledInReadOnlyMode=function(){return!1},u.prototype.getValue=function(){},u.prototype.getDefaultValue=function(){},u.prototype.getItems=function(){},u.prototype.getModelUnit=function(h){return d.ModelUtils.getlUnitValue(this.control.model.units,h)},u.prototype.getModelUnitText=function(h){return d.ModelUtils.getUnitText(this.control.model.units,c.DiagramLocalizationService.unitItems,c.DiagramLocalizationService.formatUnit,h)},u.prototype.getModelUnitTwipsValue=function(h){return d.ModelUtils.getTwipsValue(this.control.model.units,h)},u.prototype.getViewUnit=function(h){return d.ModelUtils.getlUnitValue(this.control.settings.viewUnits,h)},u.prototype.getViewUnitText=function(h){return d.ModelUtils.getUnitText(this.control.settings.viewUnits,c.DiagramLocalizationService.unitItems,c.DiagramLocalizationService.formatUnit,h)},u.prototype.getViewUnitTwipsValue=function(h){return d.ModelUtils.getTwipsValue(this.control.settings.viewUnits,h)},u}(T.CommandBase);P.SimpleCommandBase=s},1649:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeFillColorCommand=void 0;var T=b(5726),y=b(13),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.processParameter=function(a){return y.ColorUtils.stringToHash(a)},s.prototype.getStyleProperty=function(){return"fill"},s}(T.ChangeStylePropertyCommand);P.ChangeFillColorCommand=d},6106:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeFontColorCommand=void 0;var T=b(2722),y=b(13),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.processParameter=function(a){return y.ColorUtils.stringToHash(a)},s.prototype.getStyleProperty=function(){return"fill"},s}(T.ChangeStyleTextPropertyCommand);P.ChangeFontColorCommand=d},7480:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeFontNameCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"font-family"},d}(b(2722).ChangeStyleTextPropertyCommand);P.ChangeFontNameCommand=T},4077:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeFontSizeCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"font-size"},d}(b(2722).ChangeStyleTextPropertyCommand);P.ChangeFontSizeCommand=T},3166:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStrokeColorCommand=void 0;var T=b(5726),y=b(13),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.processParameter=function(a){return y.ColorUtils.stringToHash(a)},s.prototype.getStyleProperty=function(){return"stroke"},s}(T.ChangeStylePropertyCommand);P.ChangeStrokeColorCommand=d},4643:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStrokeStyleCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"stroke-dasharray"},d}(b(5726).ChangeStylePropertyCommand);P.ChangeStrokeStyleCommand=T},4681:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStrokeWidthCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"stroke-width"},d}(b(5726).ChangeStylePropertyCommand);P.ChangeStrokeWidthCommand=T},5726:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStylePropertyCommand=void 0;var T=b(521),y=b(4634),d=b(1552),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentStylePropertyValue(this.getStyleProperty())},a.prototype.getStyleObj=function(u){return u.style},a.prototype.getDefaultStyleObj=function(){return new d.Style},a.prototype.createHistoryItem=function(u,h,g){return new y.ChangeStyleHistoryItem(u.key,h,g)},a.prototype.updateInputPosition=function(u){this.control.selection.inputPosition.setStylePropertyValue(this.getStyleProperty(),u)},a}(T.ChangeStylePropertyCommandBase);P.ChangeStylePropertyCommand=c},521:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStylePropertyCommandBase=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.executeCore=function(c,s){var a=this;this.control.history.beginTransaction();var u=this.control.selection.getSelectedItems();return s=this.processParameter(s),u.forEach(function(h){var g=a.getStyleProperty();a.control.history.addAndRedo(a.createHistoryItem(h,g,s))}),this.updateInputPosition(s),this.control.history.endTransaction(),!0},d.prototype.getDefaultValue=function(){return this.getDefaultStyleObj()[this.getStyleProperty()]},d.prototype.processParameter=function(c){return c},d}(b(8351).StylePropertyCommandBase);P.ChangeStylePropertyCommandBase=T},2722:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStyleTextPropertyCommand=void 0;var T=b(521),y=b(926),d=b(1552),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentTextStylePropertyValue(this.getStyleProperty())},a.prototype.getStyleObj=function(u){return u.styleText},a.prototype.getDefaultStyleObj=function(){return new d.TextStyle},a.prototype.createHistoryItem=function(u,h,g){return new y.ChangeStyleTextHistoryItem(u.key,h,g)},a.prototype.updateInputPosition=function(u){this.control.selection.inputPosition.setTextStylePropertyValue(this.getStyleProperty(),u)},a}(T.ChangeStylePropertyCommandBase);P.ChangeStyleTextPropertyCommand=c},8700:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.TextRightAlignCommand=P.TextCenterAlignCommand=P.TextLeftAlignCommand=P.ChangeTextAlignCommand=void 0;var T=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getStyleProperty=function(){return"text-anchor"},a}(b(6980).ToggleStyleTextPropertyCommand);P.ChangeTextAlignCommand=T;var y=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getStylePropertyValue=function(){return"start"},a}(T);P.TextLeftAlignCommand=y;var d=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getStylePropertyValue=function(){return"middle"},a}(T);P.TextCenterAlignCommand=d;var c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getStylePropertyValue=function(){return"end"},a}(T);P.TextRightAlignCommand=c},8351:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.StylePropertyCommandBase=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.lockInputPositionUpdating=function(){return!0},d}(b(9741).SimpleCommandBase);P.StylePropertyCommandBase=T},4378:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleFontBoldCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"font-weight"},d.prototype.getStylePropertyValue=function(){return"bold"},d}(b(6980).ToggleStyleTextPropertyCommand);P.ToggleFontBoldCommand=T},7607:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleFontItalicCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"font-style"},d.prototype.getStylePropertyValue=function(){return"italic"},d}(b(6980).ToggleStyleTextPropertyCommand);P.ToggleFontItalicCommand=T},3411:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleFontUnderlineCommand=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.getStyleProperty=function(){return"text-decoration"},d.prototype.getStylePropertyValue=function(){return"underline"},d}(b(6980).ToggleStyleTextPropertyCommand);P.ToggleFontUnderlineCommand=T},6980:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleStyleTextPropertyCommand=void 0;var T=b(8351),y=b(926),d=b(1552),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S(a,s),a.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentTextStylePropertyValue(this.getStyleProperty())===this.getStylePropertyValue()},a.prototype.executeCore=function(u){var h=this;this.control.history.beginTransaction();var g=this.getStyleProperty(),_=u.value?d.TextStyle.defaultInstance[g]:this.getStylePropertyValue();return this.control.selection.getSelectedItems().forEach(function(x){h.control.history.addAndRedo(new y.ChangeStyleTextHistoryItem(x.key,g,_))}),this.control.selection.inputPosition.setTextStylePropertyValue(this.getStyleProperty(),_),this.control.history.endTransaction(),!0},a.prototype.getStyleObj=function(u){return u.styleText},a.prototype.getDefaultStyleObj=function(){return new d.TextStyle},a}(T.StylePropertyCommandBase);P.ToggleStyleTextPropertyCommand=c},5035:function(o,P){var b,f=this&&this.__extends||(b=function(d,c){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}b(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.DataSourceEdgeDataImporter=P.DataSourceNodeDataImporter=P.DataSourceItemDataImporter=void 0;var S=function(){this.getKey=function(d){return d.id},this.setKey=function(d,c){d.id=c},this.getCustomData=void 0,this.setCustomData=void 0,this.getLocked=void 0,this.setLocked=void 0,this.getStyle=void 0,this.setStyle=void 0,this.getStyleText=void 0,this.setStyleText=void 0,this.getZIndex=void 0,this.setZIndex=void 0};P.DataSourceItemDataImporter=S;var T=function(d){function c(){var s=null!==d&&d.apply(this,arguments)||this;return s.getType=void 0,s.setType=void 0,s.getText=void 0,s.setText=void 0,s.getImage=void 0,s.setImage=void 0,s.getLeft=void 0,s.setLeft=void 0,s.getTop=void 0,s.setTop=void 0,s.getWidth=void 0,s.setWidth=void 0,s.getHeight=void 0,s.setHeight=void 0,s.getChildren=void 0,s.setChildren=void 0,s.getParentKey=void 0,s.setParentKey=void 0,s.getItems=void 0,s.setItems=void 0,s.getContainerKey=void 0,s.setContainerKey=void 0,s}return f(c,d),c}(S);P.DataSourceNodeDataImporter=T;var y=function(d){function c(){var s=null!==d&&d.apply(this,arguments)||this;return s.getFrom=function(a){return a.from},s.setFrom=function(a,u){a.from=u},s.getFromPointIndex=void 0,s.setFromPointIndex=void 0,s.getTo=function(a){return a.to},s.setTo=function(a,u){a.to=u},s.getToPointIndex=void 0,s.setToPointIndex=void 0,s.getPoints=void 0,s.setPoints=void 0,s.getText=void 0,s.setText=void 0,s.getLineOption=void 0,s.setLineOption=void 0,s.getStartLineEnding=void 0,s.setStartLineEnding=void 0,s.getEndLineEnding=void 0,s.setEndLineEnding=void 0,s}return f(c,d),c}(S);P.DataSourceEdgeDataImporter=y},3503:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DataLayoutParameters=P.DataLayoutType=void 0;var f,c,S=b(8710),T=b(9533),y=b(1256);(c=f=P.DataLayoutType||(P.DataLayoutType={}))[c.Tree=0]="Tree",c[c.Sugiyama=1]="Sugiyama";var d=function(){function c(s,a){this.sizeSettings=s,a&&(void 0!==a.type&&(this.layoutType=a.type,this.layoutSettings=this.layoutType===f.Sugiyama?new S.LayoutSettings:new S.TreeLayoutSettings),void 0!==a.orientation&&(this.layoutSettings.orientation=a.orientation),this.skipPointIndices=a.skipPointIndices,this.autoSizeEnabled=a.autoSizeEnabled)}return Object.defineProperty(c.prototype,"needAutoLayout",{get:function(){return void 0!==this.layoutType},enumerable:!1,configurable:!0}),c.prototype.getLayoutBuilder=function(s){return this.layoutType===f.Tree?new T.TreeLayoutBuilder(this.layoutSettings,s):new y.SugiyamaLayoutBuilder(this.layoutSettings,s)},c}();P.DataLayoutParameters=d},4225:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DataSource=void 0;var f=b(9291),S=b(8900),T=b(6353),y=b(3477),d=b(9603),c=b(4145),s=b(8930),a=b(4629),u=b(8236),h=b(5144),g=b(9559),_=b(7443),x=b(8210),w=b(6516),D=b(5982),C=b(4634),I=b(926),L=b(7959),N=b(4867),G=b(2259),k=b(4246),U=b(8675),B=b(13),K=b(4914),J=b(8396),ie=b(3490),re=b(5035),q=b(5558),Y=b(58),Z=function(){function Q(te,pe,z,oe,ae,ee){if(this.key=te,this.nodes=[],this.edges=[],this.autoGeneratedDataKeys={},this.addInternalKeyOnInsert=!1,this.useNodeParentId=!1,this.useNodeContainerId=!1,this.useNodeChildren=!1,this.useNodeItems=!1,this.canUseAutoSize=!1,this.canUpdateEdgeDataSource=!1,this.containers=null,null==te)throw new Error("DataSource key must be specified");this.key=te.toString(),this.loadParameters(oe||{}),this.nodeDataImporter=this.createNodeDataImporter(ae),this.edgeDataImporter=this.createEdgeDataImporter(ee),this.nodeDataSource=pe||[],this.edgeDataSource=z||[],this.canUpdateEdgeDataSource=!!z,this.fetchData()}return Q.prototype.loadParameters=function(te){this.addInternalKeyOnInsert=!!te.addInternalKeyOnInsert},Q.prototype.isAutoGeneratedKey=function(te){return te&&!!this.autoGeneratedDataKeys[te]},Q.prototype.createNodeDataImporter=function(te){var pe=new re.DataSourceNodeDataImporter;return te&&this.assignNodeDataImporterProperties(te,pe),pe},Q.prototype.createEdgeDataImporter=function(te){var pe=new re.DataSourceEdgeDataImporter;return te&&this.assignEdgeDataImporterProperties(te,pe),pe},Q.prototype.assignItemDataImporterProperties=function(te,pe){te.getKey&&(pe.getKey=te.getKey),te.setKey&&(pe.setKey=te.setKey),te.getCustomData&&(pe.getCustomData=te.getCustomData),te.setCustomData&&(pe.setCustomData=te.setCustomData),te.getLocked&&(pe.getLocked=te.getLocked),te.setLocked&&(pe.setLocked=te.setLocked),te.getStyle&&(pe.getStyle=te.getStyle),te.setStyle&&(pe.setStyle=te.setStyle),te.getStyleText&&(pe.getStyleText=te.getStyleText),te.setStyleText&&(pe.setStyleText=te.setStyleText),te.getZIndex&&(pe.getZIndex=te.getZIndex),te.setZIndex&&(pe.setZIndex=te.setZIndex)},Q.prototype.assignNodeDataImporterProperties=function(te,pe){this.assignItemDataImporterProperties(te,pe),te.getType&&(pe.getType=te.getType),te.setType&&(pe.setType=te.setType),te.getImage&&(pe.getImage=te.getImage),te.setImage&&(pe.setImage=te.setImage),te.getText&&(pe.getText=te.getText),te.setText&&(pe.setText=te.setText),te.getLeft&&(pe.getLeft=te.getLeft),te.setLeft&&(pe.setLeft=te.setLeft),te.getTop&&(pe.getTop=te.getTop),te.setTop&&(pe.setTop=te.setTop),te.getWidth&&(pe.getWidth=te.getWidth),te.setWidth&&(pe.setWidth=te.setWidth),te.getHeight&&(pe.getHeight=te.getHeight),te.setHeight&&(pe.setHeight=te.setHeight),te.getChildren&&(pe.getChildren=te.getChildren),te.setChildren&&(pe.setChildren=te.setChildren),te.getParentKey&&(pe.getParentKey=te.getParentKey),te.setParentKey&&(pe.setParentKey=te.setParentKey),te.getItems&&(pe.getItems=te.getItems),te.setItems&&(pe.setItems=te.setItems),te.getContainerKey&&(pe.getContainerKey=te.getContainerKey),te.setContainerKey&&(pe.setContainerKey=te.setContainerKey)},Q.prototype.assignEdgeDataImporterProperties=function(te,pe){this.assignItemDataImporterProperties(te,pe),te.getFrom&&(pe.getFrom=te.getFrom),te.setFrom&&(pe.setFrom=te.setFrom),te.getFromPointIndex&&(pe.getFromPointIndex=te.getFromPointIndex),te.setFromPointIndex&&(pe.setFromPointIndex=te.setFromPointIndex),te.getTo&&(pe.getTo=te.getTo),te.setTo&&(pe.setTo=te.setTo),te.getToPointIndex&&(pe.getToPointIndex=te.getToPointIndex),te.setToPointIndex&&(pe.setToPointIndex=te.setToPointIndex),te.getPoints&&(pe.getPoints=te.getPoints),te.setPoints&&(pe.setPoints=te.setPoints),te.getText&&(pe.getText=te.getText),te.setText&&(pe.setText=te.setText),te.getLineOption&&(pe.getLineOption=te.getLineOption),te.setLineOption&&(pe.setLineOption=te.setLineOption),te.getStartLineEnding&&(pe.getStartLineEnding=te.getStartLineEnding),te.setStartLineEnding&&(pe.setStartLineEnding=te.setStartLineEnding),te.getEndLineEnding&&(pe.getEndLineEnding=te.getEndLineEnding),te.setEndLineEnding&&(pe.setEndLineEnding=te.setEndLineEnding)},Q.prototype.fetchData=function(){var te=this;if(this.nodes=[],this.edges=[],this.autoGeneratedDataKeys={},this.useNodeParentId=void 0!==this.nodeDataImporter.getParentKey,this.useNodeContainerId=void 0!==this.nodeDataImporter.getContainerKey,this.useNodeItems=void 0!==this.nodeDataImporter.getItems,this.useNodeChildren=void 0!==this.nodeDataImporter.getChildren,this.canUseAutoSize=void 0===this.nodeDataImporter.getWidth&&void 0!==this.nodeDataImporter.getText,this.useEdgesArray()&&this.useNodeParentId)throw new Error("You cannot use edges array and parentKey simultaneously.");if(this.useEdgesArray()&&this.useNodeItems)throw new Error("You cannot use edges array and items array simultaneously.");if(this.useNodeParentId&&this.useNodeItems)throw new Error("You cannot use parentKey and items array simultaneously.");if(this.useNodeContainerId&&this.useNodeChildren)throw new Error("You cannot use containerKey and children array simultaneously.");this.nodeDataSource.forEach(function(pe){te.addNode(pe)}),this.useEdgesArray()?this.edgeDataSource.forEach(function(pe){te.addEdge(pe)}):this.nodes.forEach(function(pe){te.addNodeEdgesByParentId(pe)})},Q.prototype.isContainer=function(te){var pe=this;return!this.containers&&this.useNodeContainerId&&(this.containers=this.nodeDataSource.map(function(z){return pe.nodeDataImporter.getContainerKey(z)}).filter(function(z){return null!=z}).reduce(function(z,oe){return z[oe]=!0,z},{})),this.containers&&this.containers[te]},Q.prototype.refetchData=function(te,pe){var z=this;this.nodeDataSource=te||this.nodeDataSource,this.edgeDataSource=pe||this.edgeDataSource;var oe=this.nodes.slice(),ae=this.edges.slice();return this.fetchData(),{nodes:this.getItemChanges(oe,this.nodes,function(ee,he){return ee.key===he.key||ee.dataObj===he.dataObj}),edges:this.getItemChanges(ae,this.edges,function(ee,he){return z.useNodeParentId||z.useNodeItems?ee.key===he.key||ee.from===he.from&&ee.to===he.to:ee.key===he.key||ee.dataObj===he.dataObj})}},Q.prototype.getItemChanges=function(te,pe,z){var oe=this,ae=te.filter(function(de){return oe.containsItem(pe,de,z)}),ee=te.filter(function(de){return!oe.containsItem(pe,de,z)}),he=pe.filter(function(de){return!oe.containsItem(te,de,z)});return{remained:ae.map(function(de){return de.key}),remainedNewKeys:ae.map(function(de){var ue;return null===(ue=pe.find(function(be){return z(de,be)}))||void 0===ue?void 0:ue.key}),removed:ee.map(function(de){return de.key}),added:he.map(function(de){return de.key})}},Q.prototype.containsItem=function(te,pe,z){var oe=!1;return te.forEach(function(ae){!oe&&z(ae,pe)&&(oe=!0)}),oe},Q.prototype.useEdgesArray=function(){return Array.isArray(this.edgeDataSource)&&(this.edgeDataSource.length||!(this.useNodeParentId||this.useNodeItems))},Q.prototype.addNode=function(te,pe,z,oe){var ae=this,ee=this.nodeDataImporter.getChildren&&this.nodeDataImporter.getChildren(te),he=ee&&Array.isArray(ee)&&ee.length,de=he||this.isContainer(this.nodeDataImporter.getKey(te)),ue=this.nodeDataImporter.getType&&this.nodeDataImporter.getType(te)||de&&G.ShapeTypes.VerticalContainer||G.ShapeTypes.Rectangle,be=this.nodeDataImporter.getText&&(this.nodeDataImporter.getText(te)||""),ve=this.addNodeInternal(te,ue,be,pe,z,oe);if(this.assignNodeProperties(ve,te),he&&ee.forEach(function(Ce){ae.addNode(Ce,void 0,ve.key,te)}),this.useNodeItems){var le=this.nodeDataImporter.getItems(te);Array.isArray(le)&&le.length&&le.forEach(function(Ce){var ye=ae.addNode(Ce,te,z,oe);ae.addEdgeInternal(void 0,ve.key,ye.key)})}return ve},Q.prototype.addNodeEdgesByParentId=function(te){if(this.useNodeParentId){var pe=this.nodeDataImporter.getParentKey(te.dataObj);null!=pe&&this.findNode(pe)&&this.addEdgeInternal(void 0,this.getNodeKey(te.dataObj,this.nodeDataImporter.getParentKey),this.getNodeKey(te.dataObj,this.nodeDataImporter.getKey))}},Q.prototype.addNodeInternal=function(te,pe,z,oe,ae,ee){var he=this.nodeDataImporter.getKey(te),de=he??N.ModelUtils.getGuidItemKey(),ue=new q.DataSourceNodeItem(this.key,de,te,pe,z,oe,ae,ee);return this.nodes.push(ue),null==he&&(he=de,this.autoGeneratedDataKeys[de]=!0),ue},Q.prototype.addEdge=function(te){var pe=this.addEdgeInternal(te,this.getNodeKey(te,this.edgeDataImporter.getFrom),this.getNodeKey(te,this.edgeDataImporter.getTo));return this.assignEdgeProperties(pe,te),pe},Q.prototype.addEdgeInternal=function(te,pe,z){var oe=te&&this.edgeDataImporter.getKey(te),ae=oe??N.ModelUtils.getGuidItemKey(),ee=new q.DataSourceEdgeItem(this.key,ae,te,pe,z);return this.edges.push(ee),null==oe&&(oe=ae,this.autoGeneratedDataKeys[ae]=!0),ee},Q.prototype.assignItemProperties=function(te,pe,z){if(z.getCustomData&&(te.customData=U.ObjectUtils.cloneObject(z.getCustomData(pe))),z.getLocked&&(te.locked=z.getLocked(pe)),z.getStyle){var oe=z.getStyle(pe);te.style="string"==typeof oe?K.Data.cssTextToObject(oe):oe}z.getStyleText&&(oe=z.getStyleText(pe),te.styleText="string"==typeof oe?K.Data.cssTextToObject(oe):oe),z.getZIndex&&(te.zIndex=z.getZIndex(pe))},Q.prototype.assignNodeProperties=function(te,pe){this.assignItemProperties(te,pe,this.nodeDataImporter),this.nodeDataImporter.getImage&&(te.image=this.nodeDataImporter.getImage(pe)),this.nodeDataImporter.getLeft&&(te.left=this.nodeDataImporter.getLeft(pe)),this.nodeDataImporter.getTop&&(te.top=this.nodeDataImporter.getTop(pe)),this.nodeDataImporter.getWidth&&(te.width=this.nodeDataImporter.getWidth(pe)),this.nodeDataImporter.getHeight&&(te.height=this.nodeDataImporter.getHeight(pe)),this.nodeDataImporter.getContainerKey&&(te.containerKey=this.nodeDataImporter.getContainerKey(pe))},Q.prototype.assignEdgeProperties=function(te,pe){if(this.assignItemProperties(te,pe,this.edgeDataImporter),this.edgeDataImporter.getFromPointIndex&&(te.fromPointIndex=this.edgeDataImporter.getFromPointIndex(pe)),this.edgeDataImporter.getToPointIndex&&(te.toPointIndex=this.edgeDataImporter.getToPointIndex(pe)),this.edgeDataImporter.getPoints&&(te.points=this.edgeDataImporter.getPoints(pe)),this.edgeDataImporter.getText){var z=this.edgeDataImporter.getText(pe);if(te.texts={},"object"==typeof z){for(var oe in z)if(Object.prototype.hasOwnProperty.call(z,oe)){var ae=parseFloat(oe),ee=z[oe];isNaN(ae)||"string"!=typeof ee||""===ee||(ae=Math.min(1,Math.max(0,ae)),te.texts[ae]=ee)}}else"string"==typeof z&&""!==z&&(te.texts[L.CONNECTOR_DEFAULT_TEXT_POSITION]=z)}this.edgeDataImporter.getLineOption&&(te.lineOption=this.edgeDataImporter.getLineOption(pe)),this.edgeDataImporter.getStartLineEnding&&(te.startLineEnding=this.edgeDataImporter.getStartLineEnding(pe)),this.edgeDataImporter.getEndLineEnding&&(te.endLineEnding=this.edgeDataImporter.getEndLineEnding(pe))},Q.prototype.findNode=function(te){return this.nodes.filter(function(pe){return void 0!==te&&pe.key===te})[0]},Q.prototype.findEdge=function(te){return this.edges.filter(function(pe){return void 0!==te&&pe.key===te})[0]},Q.prototype.getNodeKey=function(te,pe){return pe(te)},Q.prototype.createModelItems=function(te,pe,z,oe,ae,ee,he,de){var ue=this;this.beginChangesNotification(),te.clear(),te.beginTransaction(),N.ModelUtils.deleteAllItems(te,pe,oe),pe.initializeKeyCounter();var be=ee?Math.max(1,Math.floor(2e3/he))*he:2e3,ve=0,le=0,Ce={},ye=[],ge=[];this.nodes.forEach(function(fe){var xe=new S.Point(le++*be,ve*be),Te=ue.createShapeByNode(te,pe,oe,z,fe,xe,ae,ee,he,de);void 0!==fe.key&&(Ce[fe.key]=Te.key),le>4&&(le=0,ve++),ye.push(Te)}),this.nodes.forEach(function(fe){if(null!=fe.containerKey){var Te=pe.findShape(Ce[fe.key]),Oe=pe.findShape(Ce[fe.containerKey]);Oe&&N.ModelUtils.insertToContainer(te,pe,Te,Oe)}}),this.edges.forEach(function(fe){var xe=pe.findShape(Ce[fe.to]),Te=pe.findShape(Ce[fe.from]),Ee=ue.createConnectorByEdge(te,pe,oe,fe,Te,xe);Ee&&(ge.push(Ee),N.ModelUtils.updateConnectorContainer(te,pe,Ee))}),ae.needAutoLayout&&this.applyLayout(te,pe,ye,ge,ae,ee,he),N.ModelUtils.tryUpdateModelRectangle(te),te.endTransaction(!0),this.endChangesNotification(!0)},Q.prototype.updateModelItems=function(te,pe,z,oe,ae,ee,he,de,ue,be,ve,le){var Ce=this;this.beginChangesNotification(),te.beginTransaction();var ye=[],ge=[],fe=[],xe=ue.nodes.removed.map(function(Oe){return pe.findShapeByDataKey(Oe)}).filter(function(Oe){return Oe});xe.forEach(function(Oe){Oe.attachedConnectors.forEach(function(ze){ze.beginItem&&ze.beginItem!==Oe&&ge.push(ze.beginItem),ze.endItem&&ze.endItem!==Oe&&ge.push(ze.endItem)})}),N.ModelUtils.deleteItems(te,pe,oe,xe,!0);var Te=ue.edges.removed.map(function(Oe){return pe.findConnectorByDataKey(Oe)}).filter(function(Oe){return Oe});Te.forEach(function(Oe){Oe.beginItem&&ge.push(Oe.beginItem),Oe.endItem&&ge.push(Oe.endItem)}),N.ModelUtils.deleteItems(te,pe,oe,Te,!0),ge=this.purgeLayoutShapes(ge,xe),(he||[]).forEach(function(Oe){if(-1!==ue.nodes.remained.indexOf(Oe)){var ze=Ce.findNode(Oe);if(ze){var $e=pe.findShapeByDataKey(Oe);if($e){var Be=$e.position.clone();Ce.changeShapeByDataItem(te,pe,$e,ze,Be),Ce.changeItemByDataItem(te,$e,ze)}else $e=Ce.createShapeByNode(te,pe,oe,z,ze,new S.Point(0,0),ae,be,ve,le);Ce.updateShapeContainer(te,pe,$e,ze),ge.push($e),ye.push($e)}}}),ue.nodes.remained.forEach(function(Oe,ze){var $e=pe.findShapeByDataKey(Oe);$e&&($e.dataKey=ue.nodes.remainedNewKeys[ze])}),ue.nodes.added.forEach(function(Oe){var ze=Ce.findNode(Oe),$e=Ce.createShapeByNode(te,pe,oe,z,ze,new S.Point(0,0),ae,be,ve,le);Ce.updateShapeContainer(te,pe,$e,ze),ge.push($e)}),ue.edges.added.forEach(function(Oe){var ze=Ce.findEdge(Oe),$e=pe.findShapeByDataKey(ze.from),Be=pe.findShapeByDataKey(ze.to),Ue=Ce.createConnectorByEdge(te,pe,oe,ze,$e,Be);Ue&&(N.ModelUtils.updateConnectorContainer(te,pe,Ue),fe.push(Ue))});var Ee=he||[];ue.edges.remained.forEach(function(Oe){var ze=Ce.findEdge(Oe);!ze||-1===ue.nodes.added.indexOf(ze.from)&&-1===ue.nodes.added.indexOf(ze.to)||Ee.push(Oe)}),Ee.forEach(function(Oe){if(-1!==ue.edges.remained.indexOf(Oe)){var ze=Ce.findEdge(Oe);if(ze){var $e=pe.findShapeByDataKey(ze.from),Be=pe.findShapeByDataKey(ze.to),Ue=pe.findConnectorByDataKey(Oe);Ue?(Ce.changeConnectorPointsByDataItem(te,Ue,Ce.getConnectorPointsByEdge(pe,ze,$e,Be,!1)),Ce.changeConnectorByDataItem(te,pe,Ue,$e,Be,ze),Ce.changeItemByDataItem(te,Ue,ze)):Ue=Ce.createConnectorByEdge(te,pe,oe,ze,$e,Be),Ue&&(N.ModelUtils.updateConnectorContainer(te,pe,Ue),fe.push(Ue),ye.push(Ue))}}}),ue.edges.remained.forEach(function(Oe,ze){var $e=pe.findConnectorByDataKey(Oe);$e&&($e.dataKey=ue.edges.remainedNewKeys[ze])}),ye.length&&de&&ye.forEach(function(Oe){Oe.hasTemplate&&de(Oe)}),ae.needAutoLayout&&(ge.length||fe.length)&&this.applyLayout(te,pe,ge,fe,ae,be,ve),N.ModelUtils.tryUpdateModelRectangle(te),te.endTransaction(!ee),this.endChangesNotification(!1)},Q.prototype.purgeLayoutShapes=function(te,pe){var z=pe.reduce(function(oe,ae){return(oe[ae.key]=!0)&&oe},{});return te.reduce(function(oe,ae){return void 0===oe.keySet[ae.key]&&void 0===z[ae.key]&&(oe.uniqueShapes.push(ae),oe.keySet[ae.key]=!0),oe},{uniqueShapes:[],keySet:{}}).uniqueShapes},Q.prototype.applyShapeAutoSize=function(te,pe,z,oe,ae,ee){if(oe.description.enableText){var he=oe.textRectangle.createSize(),de=oe.size,ue=he.width-de.width,be=he.height-de.height,ve=oe.getMaxWidth(z.shapeMaxWidth),le=oe.getMaxHeight(z.shapeMaxHeight),Ce=function(fe,xe){return"number"==typeof fe?f.UnitConverter.twipsToPixelsF(fe+(xe?ue:be)):void 0},ye=ie.getOptimalTextRectangle(oe.text,oe.styleText,k.TextOwner.Shape,pe,he.clone().applyConverter(f.UnitConverter.twipsToPixelsF),oe.description.keepRatioOnAutoSize,Ce(oe.getMinWidth(z.shapeMinWidth),!0),Ce(ve,!0),Ce(oe.getMinHeight(z.shapeMinHeight),!1),Ce(le,!1)).clone().applyConverter(f.UnitConverter.pixelsToTwips);if(!ye.equals(he)){var ge=oe.description.getSizeByText(ye,oe);ae&&ee&&(ge=new T.Size(Math.min(ee*Math.ceil(ge.width/ee),ve||Number.MAX_VALUE),Math.min(ee*Math.ceil(ge.height/ee),le||Number.MAX_VALUE))),te.addAndRedo(new a.ResizeShapeHistoryItem(oe.key,oe.position,ge))}}},Q.prototype.applyLayout=function(te,pe,z,oe,ae,ee,he){N.ModelUtils.getGraphInfoByItems(pe,z,oe).forEach(function(de){var ue=ae.getLayoutBuilder(de.graph).build(),be=N.ModelUtils.getNonGraphItems(pe,de.container,ue.nodeToLayout,z,oe);N.ModelUtils.applyLayout(te,pe,de.container,de.graph,ue,be,ae.layoutSettings,ee,he,ae.skipPointIndices)})},Q.prototype.changeItemByDataItem=function(te,pe,z){if(void 0===z.customData||U.ObjectUtils.compareObjects(z.customData,pe.customData)||te.addAndRedo(new g.ChangeCustomDataHistoryItem(pe.key,z.customData)),void 0!==z.zIndex&&z.zIndex!==pe.zIndex&&te.addAndRedo(new D.ChangeZindexHistoryItem(pe,z.zIndex)),void 0!==z.style)for(var oe in z.style)Object.prototype.hasOwnProperty.call(z.style,oe)&&(ee=this.getPreparedStyleValue(z.style[oe],J.isColorProperty(oe)))!==pe.style[oe]&&te.addAndRedo(new C.ChangeStyleHistoryItem(pe.key,oe,ee));var ae=pe.style.getDefaultInstance();if(pe.style.forEach(function(de){z.style&&void 0===z.style[de]&&pe.style[de]!==ae[de]&&te.addAndRedo(new C.ChangeStyleHistoryItem(pe.key,de,ae[de]))}),void 0!==z.styleText)for(var oe in z.styleText){var ee;Object.prototype.hasOwnProperty.call(z.styleText,oe)&&(ee=this.getPreparedStyleValue(z.styleText[oe],J.isColorProperty(oe)))!==pe.styleText[oe]&&te.addAndRedo(new I.ChangeStyleTextHistoryItem(pe.key,oe,ee))}var he=pe.styleText.getDefaultInstance();pe.styleText.forEach(function(de){z.styleText&&void 0===z.styleText[de]&&pe.styleText[de]!==he[de]&&te.addAndRedo(new I.ChangeStyleTextHistoryItem(pe.key,de,he[de]))}),void 0!==z.locked&&z.locked!==pe.locked&&te.addAndRedo(new _.ChangeLockedHistoryItem(pe,z.locked))},Q.prototype.getPreparedStyleValue=function(te,pe){if(pe){var z=B.ColorUtils.stringToHash(te);null!==z&&(te=z)}return te},Q.prototype.createShapeByNode=function(te,pe,z,oe,ae,ee,he,de,ue,be){var ve=new c.AddShapeHistoryItem(oe.get(ae.type),ee,"",ae.key);te.addAndRedo(ve);var le=pe.findShape(ve.shapeKey);return N.ModelUtils.updateNewShapeProperties(te,z,ve.shapeKey),this.changeShapeByDataItem(te,pe,le,ae,ee),this.changeItemByDataItem(te,le,ae),be&&this.canUseAutoSize&&he.autoSizeEnabled&&this.applyShapeAutoSize(te,be,he.sizeSettings,le,de,ue),le},Q.prototype.changeShapeByDataItem=function(te,pe,z,oe,ae){var ee=!1;void 0!==oe.left&&(ae.x=N.ModelUtils.getTwipsValue(pe.units,oe.left)),void 0!==oe.top&&(ae.y=N.ModelUtils.getTwipsValue(pe.units,oe.top)),ee=N.ModelUtils.setShapePosition(te,pe,z,ae,!1)||ee,void 0!==oe.type&&(ee=N.ModelUtils.changeShapeType(te,pe,z,oe.type)||ee);var he=z.size.clone();void 0!==oe.width&&(he.width=N.ModelUtils.getTwipsValue(pe.units,oe.width)),void 0!==oe.height&&(he.height=N.ModelUtils.getTwipsValue(pe.units,oe.height)),(ee=N.ModelUtils.setShapeSize(te,pe,z,ae,he)||ee)&&N.ModelUtils.updateShapeAttachedConnectors(te,pe,z),void 0!==oe.text&&oe.text!==z.text&&te.addAndRedo(new w.ChangeShapeTextHistoryItem(z,oe.text)),void 0!==oe.image&&oe.image!==z.image.actualUrl&&te.addAndRedo(new x.ChangeShapeImageHistoryItem(z,oe.image))},Q.prototype.updateShapeContainer=function(te,pe,z,oe){var ae=void 0!==oe.containerKey?pe.findShapeByDataKey(oe.containerKey):void 0;ae!==z.container&&(ae?N.ModelUtils.insertToContainer(te,pe,z,ae):N.ModelUtils.removeFromContainer(te,pe,z))},Q.prototype.getConnectorPointsByEdge=function(te,pe,z,oe,ae){var ee=[],he=this.createModelPointFromDataSourceEdgeItemPoints(te.units,pe);if(he&&he.length>1)for(var de=he.length-1,ue=0;ue<=de;ue++){var be=he[ue];if(null!==be)ee.push(be);else{if(!z&&!oe)return;0===ue&&z?ee.push(z.position.clone()):ue===de&&oe&&ee.push(oe.position.clone())}}else ae&&(z&&ee.push(z.position.clone()),oe&&ee.push(oe.position.clone()));return ee},Q.prototype.createModelPointFromDataSourceEdgeItemPoints=function(te,pe){var z=this,oe=[];if(Array.isArray(pe.points))return pe.points.forEach(function(ae){return oe.push(z.isValidDataSourceEdgeItemPoint(ae)?z.createModelPoint(te,ae):null)}),oe},Q.prototype.createModelPoint=function(te,pe){return new S.Point(N.ModelUtils.getTwipsValue(te,pe.x),N.ModelUtils.getTwipsValue(te,pe.y))},Q.prototype.isValidDataSourceEdgeItemPoint=function(te){return null!=te&&void 0!==te.x&&void 0!==te.y&&null!==te.x&&null!==te.y},Q.prototype.createConnectorByEdge=function(te,pe,z,oe,ae,ee){var he,de=oe.key,ue=this.getConnectorPointsByEdge(pe,oe,ae,ee,!0);if(ue&&ue.length>1){var be=new d.AddConnectorHistoryItem(ue,de);te.addAndRedo(be),he=pe.findConnector(be.connectorKey),N.ModelUtils.updateNewConnectorProperties(te,z,be.connectorKey),this.changeConnectorByDataItem(te,pe,he,ae,ee,oe),this.changeItemByDataItem(te,he,oe)}return he},Q.prototype.changeConnectorByDataItem=function(te,pe,z,oe,ae,ee){var he=void 0!==ee.fromPointIndex?ee.fromPointIndex:z.beginConnectionPointIndex;z.beginItem===oe&&z.beginConnectionPointIndex===he||(z.beginItem&&te.addAndRedo(new s.DeleteConnectionHistoryItem(z,L.ConnectorPosition.Begin)),oe&&te.addAndRedo(new y.AddConnectionHistoryItem(z,oe,he,L.ConnectorPosition.Begin)));var de=void 0!==ee.toPointIndex?ee.toPointIndex:z.endConnectionPointIndex;if(z.endItem===ae&&z.endConnectionPointIndex===de||(z.endItem&&te.addAndRedo(new s.DeleteConnectionHistoryItem(z,L.ConnectorPosition.End)),ae&&te.addAndRedo(new y.AddConnectionHistoryItem(z,ae,de,L.ConnectorPosition.End))),N.ModelUtils.updateConnectorAttachedPoints(te,pe,z),void 0!==ee.texts&&!this.compareTexts(ee,z))for(var ue in z.texts.forEach(function(ve){te.addAndRedo(new h.ChangeConnectorTextHistoryItem(z,ve.position,void 0))}),ee.texts)if(Object.prototype.hasOwnProperty.call(ee.texts,ue)){var be=parseFloat(ue);te.addAndRedo(new h.ChangeConnectorTextHistoryItem(z,be,ee.texts[ue]))}void 0!==ee.lineOption&&ee.lineOption!==z.properties.lineOption&&te.addAndRedo(new u.ChangeConnectorPropertyHistoryItem(z.key,"lineOption",ee.lineOption)),void 0!==ee.startLineEnding&&ee.startLineEnding!==z.properties.startLineEnding&&te.addAndRedo(new u.ChangeConnectorPropertyHistoryItem(z.key,"startLineEnding",ee.startLineEnding)),void 0!==ee.endLineEnding&&ee.endLineEnding!==z.properties.endLineEnding&&te.addAndRedo(new u.ChangeConnectorPropertyHistoryItem(z.key,"endLineEnding",ee.endLineEnding))},Q.prototype.changeConnectorPointsByDataItem=function(te,pe,z){z&&z.length>1&&z.join(",")!==pe.points.join(",")&&te.addAndRedo(new Y.ReplaceConnectorPointsHistoryItem(pe.key,z))},Q.prototype.compareTexts=function(te,pe){var z=te.texts||{},oe=Object.keys(z).length===pe.getTextCount();if(oe)for(var ae in z)if(Object.prototype.hasOwnProperty.call(z,ae)){var ee=parseFloat(ae);this.compareStrings(pe.getText(ee),z[ae])||(oe=!1)}return oe},Q.prototype.compareStrings=function(te,pe){return"string"==typeof te&&"string"==typeof pe?te===pe:this.isEmptyString(te)&&this.isEmptyString(pe)},Q.prototype.isEmptyString=function(te){return""===te||null==te},Q}();P.DataSource=Z},5558:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.DataSourceEdgeItem=P.DataSourceNodeItem=P.DataSourceItem=void 0;var T=b(7959),y=function(s,a,u){this.sourceKey=s,this.key=a,this.dataObj=u};P.DataSourceItem=y;var d=function(s){function a(u,h,g,_,x,w,D,C){var I=s.call(this,u,h,g)||this;return I.type=_,I.text=x,I.parentDataObj=w,I.containerKey=D,I.containerDataObj=C,I}return S(a,s),a}(y);P.DataSourceNodeItem=d;var c=function(s){function a(u,h,g,_,x){var w=s.call(this,u,h,g)||this;return w.sourceKey=u,w.from=_,w.to=x,w}return S(a,s),Object.defineProperty(a.prototype,"text",{get:function(){return this.texts&&this.texts[T.CONNECTOR_DEFAULT_TEXT_POSITION]},enumerable:!1,configurable:!0}),a}(y);P.DataSourceEdgeItem=c},8717:function(o,P,b){var f,S=this&&this.__extends||(f=function(D,C){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,L){I.__proto__=L}||function(I,L){for(var N in L)L.hasOwnProperty(N)&&(I[N]=L[N])})(D,C)},function(D,C){function I(){this.constructor=D}f(D,C),D.prototype=null===C?Object.create(C):(I.prototype=C.prototype,new I)});Object.defineProperty(P,"__esModule",{value:!0}),P.DocumentDataSource=P.UpdateNodeKeyRelatedObjectsStackAction=P.UpdateNodeKeyRelatedObjectsStackItem=void 0;var T=b(2259),y=b(5503),d=b(7959),c=b(4225),s=b(4867),a=b(4914),u=b(8675),h=b(49),g=b(8679),_=function(D,C){this.shape=D,this.nodeObj=C};P.UpdateNodeKeyRelatedObjectsStackItem=_;var x=function(D,C){this.kind=D,this.nodeObj=C};P.UpdateNodeKeyRelatedObjectsStackAction=x;var w=function(D){function C(I,L,N,G,k,U){var B=D.call(this,"Document",L,N,G,k,U)||this;return B.changesListener=I,B.nodeInsertingLockCount=0,B.updateNodeKeyRelatedObjectsCount=0,B.updateNodeKeyRelatedObjectsStack=[],B.updateNodeKeyRelatedObjectsStackActions=[],B}return S(C,D),C.prototype.updateItemsByModel=function(I){var L=this;this.beginChangesNotification(),this.deleteNodes(I),this.deleteEdges(I),I.items.forEach(function(N){N instanceof y.Shape&&L.updateNode(I,N)}),I.items.forEach(function(N){N instanceof d.Connector&&L.updateEdge(I,N)}),this.endChangesNotification(!1)},C.prototype.isItemObjectModified=function(I,L,N){var G=N.setLocked&&L.locked!==I.locked||N.setZIndex&&L.zIndex!==I.zIndex||N.setCustomData&&!u.ObjectUtils.compareObjects(L.customData,I.customData);if(!G&&N.setStyle){var k=I.style.getDefaultInstance();I.style.forEach(function(B){I.style[B]!==k[B]&&I.style[B]!==(L.style&&L.style[B])&&(G=!0)})}if(!G&&N.setStyleText){var U=I.styleText.getDefaultInstance();I.styleText.forEach(function(B){I.styleText[B]!==U[B]&&I.styleText[B]!==(L.styleText&&L.styleText[B])&&(G=!0)})}return G},C.prototype.setDataObjectKeyRelatedProperty=function(I,L,N,G){(G||void 0===this.autoGeneratedDataKeys[N])&&I(L,N)},C.prototype.updateItemObjectProperties=function(I,L,N){if(N.setCustomData&&(I.customData=u.ObjectUtils.cloneObject(L.customData),I.dataObj&&void 0!==I.customData&&N.setCustomData(I.dataObj,L.customData)),N.setLocked&&(I.locked=L.locked,I.dataObj&&void 0!==I.locked&&N.setLocked(I.dataObj,L.locked)),N.setStyle){var G=L.style.toObject();I.style=G,I.dataObj&&void 0!==I.style&&N.setStyle(I.dataObj,a.Data.objectToCssText(G))}if(N.setStyleText){var k=L.styleText.toObject();I.styleText=k,I.dataObj&&void 0!==I.styleText&&N.setStyleText(I.dataObj,a.Data.objectToCssText(k))}N.setZIndex&&(I.zIndex=L.zIndex,I.dataObj&&void 0!==I.zIndex&&N.setZIndex(I.dataObj,L.zIndex))},C.prototype.deleteItems=function(I,L,N,G){I.slice().forEach(function(k){if(null!=k.key&&!L(k.key)){var U=N(k),B=U.indexOf(k.dataObj);U.splice(B,1),G(k,B>-1)}})},C.prototype.updateNode=function(I,L){var N=this,G=this.findNode(L.dataKey);if(G)this.isNodeObjectModified(L,G,I.units)?(this.updateNodeObjectProperties(L,G,I.units),this.updateNodeObjectConnectedProperties(L,G),this.beginChangesNotification(),this.changesListener.notifyNodeUpdated.call(this.changesListener,this.nodeDataImporter.getKey(G.dataObj||G.key),G.dataObj,function(U,B){N.endChangesNotification(!1)},function(U){N.endChangesNotification(!1)})):this.updateNodeObjectConnectedProperties(L,G,this.changesListener);else{var k={};null!=L.dataKey&&this.nodeDataImporter.setKey(k,L.dataKey),G=this.addNodeInternal(k,L.description.key,L.text),this.nodeDataSource.push(G.dataObj),this.setDataObjectKeyRelatedProperty(this.nodeDataImporter.setKey,k,G.key,this.addInternalKeyOnInsert),this.updateNodeObjectProperties(L,G,I.units),this.updateNodeObjectConnectedProperties(L,G),this.updateNodeObjectKey(L,G,G.dataObj),this.beginChangesNotification(),this.beginNodeInserting(),this.changesListener.notifyNodeInserted.call(this.changesListener,G.dataObj,function(U){N.updateNodeObjectKey(L,G,U),N.endNodeInserting(),N.endChangesNotification(!1)},function(U){N.endNodeInserting(),N.endChangesNotification(!1)})}},C.prototype.areImageUrlsEqual=function(I,L){return I===L||h.StringUtils.isNullOrEmpty(I)&&h.StringUtils.isNullOrEmpty(L)},C.prototype.isNodeObjectModified=function(I,L,N){return this.isItemObjectModified(I,L,this.nodeDataImporter)||L.type!==I.description.key&&!(void 0===L.type&&I.description.key===T.ShapeTypes.Rectangle)||!this.compareStrings(L.text,I.text)||this.nodeDataImporter.setImage&&!this.areImageUrlsEqual(L.image,I.image.actualUrl)||this.nodeDataImporter.setLeft&&!g.MathUtils.numberCloseTo(L.left,s.ModelUtils.getlUnitValue(N,I.position.x))||this.nodeDataImporter.setTop&&!g.MathUtils.numberCloseTo(L.top,s.ModelUtils.getlUnitValue(N,I.position.y))||this.nodeDataImporter.setWidth&&!g.MathUtils.numberCloseTo(L.width,s.ModelUtils.getlUnitValue(N,I.size.width))||this.nodeDataImporter.setHeight&&!g.MathUtils.numberCloseTo(L.height,s.ModelUtils.getlUnitValue(N,I.size.height))},C.prototype.updateNodeObjectProperties=function(I,L,N){if(this.updateItemObjectProperties(L,I,this.nodeDataImporter),this.nodeDataImporter.setType&&(L.type=I.description.key,this.nodeDataImporter.setType(L.dataObj,I.description.key)),this.nodeDataImporter.setText&&(L.text=I.text,this.nodeDataImporter.setText(L.dataObj,I.text)),this.nodeDataImporter.setImage&&(L.image=I.image.actualUrl,this.nodeDataImporter.setImage(L.dataObj,void 0===I.image.actualUrl?null:I.image.actualUrl)),this.nodeDataImporter.setLeft){var G=s.ModelUtils.getlUnitValue(N,I.position.x);L.left=G,this.nodeDataImporter.setLeft(L.dataObj,G)}if(this.nodeDataImporter.setTop){var k=s.ModelUtils.getlUnitValue(N,I.position.y);L.top=k,this.nodeDataImporter.setTop(L.dataObj,k)}if(this.nodeDataImporter.setWidth){var U=s.ModelUtils.getlUnitValue(N,I.size.width);L.width=U,this.nodeDataImporter.setWidth(L.dataObj,U)}if(this.nodeDataImporter.setHeight){var B=s.ModelUtils.getlUnitValue(N,I.size.height);L.height=B,this.nodeDataImporter.setHeight(L.dataObj,B)}},C.prototype.updateNodeObjectConnectedProperties=function(I,L,N){if(this.useNodeParentId&&void 0!==this.nodeDataImporter.setParentKey){var G=this.getParentItemKey(I),k=this.findNode(G);this.updateNodeObjectParentKey(L,k,N)}if(this.useNodeContainerId&&void 0!==this.nodeDataImporter.setContainerKey){var U=this.getContainerShapeKey(I),B=this.findNode(U);this.updateNodeObjectContainerKey(L,B,N)}this.useNodeItems&&void 0!==this.nodeDataImporter.setItems&&(G=this.getParentItemKey(I),k=this.findNode(G),this.updateNodeObjectItems(L,k,N)),this.useNodeChildren&&void 0!==this.nodeDataImporter.setChildren&&(U=this.getContainerShapeKey(I),B=this.findNode(U),this.updateNodeObjectChildren(L,B,N))},C.prototype.IsNodeParentIdMode=function(){return this.useNodeParentId&&void 0!==this.nodeDataImporter.setParentKey},C.prototype.IsNodeItemsMode=function(){return this.useNodeItems&&void 0!==this.nodeDataImporter.setItems},C.prototype.updateNodeObjectParentKey=function(I,L,N){var G=this.nodeDataImporter.getParentKey(I.dataObj),k=L?this.nodeDataImporter.getKey(L.dataObj):void 0;G===k||this.isRootParentKey(G)&&this.isRootParentKey(k)||(this.setDataObjectKeyRelatedProperty(this.nodeDataImporter.setParentKey,I.dataObj,k,!1),N&&(this.isInUpdateNodeKeyRelatedObjects()?this.addToUpdateNodeKeyRelatedObjectsStackAction("shape",I):this.updateNodeObjectContainerOrParentKeyInternal(I,N)))},C.prototype.updateNodeObjectParentKeyInternal=function(I,L){var N=this;this.beginChangesNotification(),L.notifyNodeUpdated.call(L,this.nodeDataImporter.getKey(I.dataObj)||I.key,I.dataObj,function(G,k){N.endChangesNotification(!1)},function(G){N.endChangesNotification(!1)})},C.prototype.updateNodeObjectContainerKey=function(I,L,N){var G=this.nodeDataImporter.getContainerKey(I.dataObj),k=L?this.nodeDataImporter.getKey(L.dataObj):void 0;G===k||this.isRootParentKey(G)&&this.isRootParentKey(k)||(this.setDataObjectKeyRelatedProperty(this.nodeDataImporter.setContainerKey,I.dataObj,k,!1),N&&(this.isInUpdateNodeKeyRelatedObjects()?this.addToUpdateNodeKeyRelatedObjectsStackAction("shape",I):this.updateNodeObjectContainerOrParentKeyInternal(I,N)))},C.prototype.updateNodeObjectContainerOrParentKeyInternal=function(I,L){var N=this;this.beginChangesNotification(),L.notifyNodeUpdated.call(L,this.nodeDataImporter.getKey(I.dataObj)||I.key,I.dataObj,function(G,k){N.endChangesNotification(!1)},function(G){N.endChangesNotification(!1)})},C.prototype.isRootParentKey=function(I){return null==I||!this.findNode(I)},C.prototype.updateNodeObjectItems=function(I,L,N){var G=this;if((L&&I.parentDataObj!==L.dataObj||!L&&I.parentDataObj)&&(!L||!this.checkNodeCyrcleItems(I.dataObj,L.dataObj))){var k=I.parentDataObj?this.nodeDataImporter.getItems(I.parentDataObj):this.nodeDataSource,U=k.indexOf(I.dataObj);k.splice(U,1);var B=L?this.nodeDataImporter.getItems(L.dataObj):this.nodeDataSource;B?B.push(I.dataObj):this.nodeDataImporter.setItems(L.dataObj,[I.dataObj]),I.parentDataObj=L&&L.dataObj,N&&(this.beginChangesNotification(),N.notifyNodeUpdated.call(N,this.nodeDataImporter.getKey(I.dataObj)||I.key,I.dataObj,function(K,J){G.endChangesNotification(!1)},function(K){G.endChangesNotification(!1)}))}},C.prototype.updateNodeObjectChildren=function(I,L,N){var G=this;if(L&&I.containerDataObj!==L.dataObj||!L&&I.containerDataObj){var k=I.containerDataObj?this.nodeDataImporter.getChildren(I.containerDataObj):this.nodeDataSource,U=k.indexOf(I.dataObj);k.splice(U,1);var B=L?this.nodeDataImporter.getChildren(L.dataObj):this.nodeDataSource;B?B.push(I.dataObj):this.nodeDataImporter.setChildren(L.dataObj,[I.dataObj]),I.containerDataObj=L&&L.dataObj,N&&(this.beginChangesNotification(),N.notifyNodeUpdated.call(N,this.nodeDataImporter.getKey(I.dataObj)||I.key,I.dataObj,function(K,J){G.endChangesNotification(!1)},function(K){G.endChangesNotification(!1)}))}},C.prototype.checkNodeCyrcleItems=function(I,L){var N=this,G=!1,k=this.nodeDataImporter.getItems(I);return k&&k.forEach(function(U){G=G||U===L||N.checkNodeCyrcleItems(U,L)}),G},C.prototype.updateNodeObjectKey=function(I,L,N){var G=this.nodeDataImporter.getKey(N),k=!1;if(null!=G&&G!==L.key&&(delete this.autoGeneratedDataKeys[L.key],L.key=G,k=!0),I.dataKey=L.key,L.dataObj!==N){var U=this.getNodeArray(L),B=U.indexOf(L.dataObj);U.splice(B,1,N),L.dataObj=N}k&&this.updateNodeKeyRelatedObjects(I,L)},C.prototype.updateNodeKeyRelatedObjects=function(I,L){var N=this;this.isInNodeInserting()?this.addToUpdateNodeKeyRelatedObjectsStack(I,L):(this.useNodeParentId&&void 0!==this.nodeDataImporter.setParentKey&&this.getChildItems(I).forEach(function(G){var k=N.findNode(G.dataKey);k&&N.updateNodeObjectParentKey(k,L,N.changesListener)}),this.useNodeContainerId&&void 0!==this.nodeDataImporter.setContainerKey&&I.children.forEach(function(G){var k=G instanceof y.Shape?N.findNode(G.dataKey):void 0;k&&N.updateNodeObjectContainerKey(k,L,N.changesListener)}),this.useEdgesArray()&&I.attachedConnectors.forEach(function(G){var k=N.findEdge(G.dataKey);k&&(I===G.beginItem&&N.updateEdgeObjectFromProperty(L,k,N.changesListener),I===G.endItem&&N.updateEdgeObjectToProperty(L,k,N.changesListener))}))},C.prototype.deleteNodes=function(I){var L=this;this.deleteItems(this.nodes,function(N){return I.findShapeByDataKey(N)},function(N){return L.getNodeArray(N)},function(N,G){var k=N.dataObj&&L.nodeDataImporter.getKey(N.dataObj)||N.key,U=L.findNode(k);U&&L.nodes.splice(L.nodes.indexOf(U),1),G&&(L.beginChangesNotification(),L.changesListener.notifyNodeRemoved.call(L.changesListener,k,N.dataObj,function(B,K){L.endChangesNotification(!1)},function(B){L.endChangesNotification(!1)}))})},C.prototype.getParentItem=function(I){for(var L=0;L<I.attachedConnectors.length;L++)if(I.attachedConnectors[L].endItem===I)return I.attachedConnectors[L].beginItem},C.prototype.getParentItemKey=function(I){var L=this.getParentItem(I);return L&&L.dataKey},C.prototype.getNodeArray=function(I){var L;return this.useNodeItems&&I.parentDataObj?L=this.nodeDataImporter.getItems(I.parentDataObj):I.containerDataObj&&(L=this.nodeDataImporter.getChildren(I.containerDataObj)),L||this.nodeDataSource},C.prototype.getContainerShapeKey=function(I){return I.container&&I.container.dataKey},C.prototype.getChildItems=function(I){for(var L=[],N=0;N<I.attachedConnectors.length;N++)I.attachedConnectors[N].beginItem===I&&I.attachedConnectors[N].endItem&&L.push(I.attachedConnectors[N].endItem);return L},C.prototype.updateEdge=function(I,L){var N=this,G=L.beginItem?L.beginItem.dataKey:void 0,k=L.endItem?L.endItem.dataKey:void 0,U=this.findEdge(L.dataKey);if(U)this.isEdgeObjectModified(L,U,I.units)&&(this.updateEdgeObjectProperties(L,U,I.units),U.dataObj&&(this.beginChangesNotification(),this.changesListener.notifyEdgeUpdated.call(this.changesListener,this.edgeDataImporter.getKey(U.dataObj)||U.key,U.dataObj,function(K,J){N.endChangesNotification(!1)},function(K){N.endChangesNotification(!1)})));else{var B=this.useEdgesArray()&&this.canUpdateEdgeDataSource?{}:void 0;B&&null!=L.dataKey&&this.edgeDataImporter.setKey(B,L.dataKey),U=this.addEdgeInternal(B,G,k),B&&(this.setDataObjectKeyRelatedProperty(this.edgeDataImporter.setKey,B,U.key,this.addInternalKeyOnInsert),this.edgeDataSource.push(U.dataObj)),this.updateEdgeObjectProperties(L,U,I.units),this.updateEdgeObjectKey(L,U,U.dataObj),B&&(this.beginChangesNotification(),this.beginNodeInserting(),this.changesListener.notifyEdgeInserted.call(this.changesListener,U.dataObj,function(K){N.updateEdgeObjectKey(L,U,K),N.endNodeInserting(),N.endChangesNotification(!1)},function(K){N.endNodeInserting(),N.endChangesNotification(!1)}))}},C.prototype.isEdgeObjectModified=function(I,L,N){return this.isItemObjectModified(I,L,this.edgeDataImporter)||(null!==L.from?L.from:void 0)!==(I.beginItem?I.beginItem.dataKey:void 0)||(null===L.to?void 0:L.to)!==(I.endItem?I.endItem.dataKey:void 0)||this.edgeDataImporter.setFromPointIndex&&L.fromPointIndex!==I.beginConnectionPointIndex||this.edgeDataImporter.setToPointIndex&&L.toPointIndex!==I.endConnectionPointIndex||this.edgeDataImporter.setPoints&&(!L.points||!this.pointsAreEqual(L.points.map(function(G){return G.x}),I.points.map(function(G){return s.ModelUtils.getlUnitValue(N,G.x)}))||!this.pointsAreEqual(L.points.map(function(G){return G.y}),I.points.map(function(G){return s.ModelUtils.getlUnitValue(N,G.y)})))||this.edgeDataImporter.setText&&!this.compareTexts(L,I)||this.edgeDataImporter.setLineOption&&L.lineOption!==I.properties.lineOption||this.edgeDataImporter.setStartLineEnding&&L.startLineEnding!==I.properties.startLineEnding||this.edgeDataImporter.setEndLineEnding&&L.endLineEnding!==I.properties.endLineEnding},C.prototype.pointsAreEqual=function(I,L){var N=I.length;if(N!==I.length)return!1;for(var G=0;G<N;G++)if(!g.MathUtils.numberCloseTo(I[G],L[G]))return!1;return!0},C.prototype.updateEdgeObjectFromProperty=function(I,L,N){if(L.from=I&&I.key,L.dataObj){var G=I&&I.dataObj&&this.nodeDataImporter.getKey(I.dataObj);this.setDataObjectKeyRelatedProperty(this.edgeDataImporter.setFrom,L.dataObj,G,!1),N&&(this.isInUpdateNodeKeyRelatedObjects()?this.addToUpdateNodeKeyRelatedObjectsStackAction("edge",L):this.updateEdgeObjectFromOrToPropertyInternal(L,N))}},C.prototype.updateEdgeObjectFromOrToPropertyInternal=function(I,L){var N=this;this.beginChangesNotification(),L.notifyEdgeUpdated.call(L,this.nodeDataImporter.getKey(I.dataObj)||I.key,I.dataObj,function(G,k){N.endChangesNotification(!1)},function(G){N.endChangesNotification(!1)})},C.prototype.updateEdgeObjectToProperty=function(I,L,N){if(L.to=I&&I.key,L.dataObj){var G=I&&I.dataObj&&this.nodeDataImporter.getKey(I.dataObj);this.setDataObjectKeyRelatedProperty(this.edgeDataImporter.setTo,L.dataObj,G,!1),N&&(this.isInUpdateNodeKeyRelatedObjects()?this.addToUpdateNodeKeyRelatedObjectsStackAction("edge",L):this.updateEdgeObjectFromOrToPropertyInternal(L,N))}},C.prototype.updateEdgeObjectProperties=function(I,L,N){if(this.updateItemObjectProperties(L,I,this.edgeDataImporter),this.edgeDataImporter.setFrom){var G=this.findNode(I.beginItem&&I.beginItem.dataKey);this.updateEdgeObjectFromProperty(G,L)}if(this.edgeDataImporter.setTo){var k=this.findNode(I.endItem&&I.endItem.dataKey);this.updateEdgeObjectToProperty(k,L)}if(this.edgeDataImporter.setFromPointIndex&&(L.fromPointIndex=I.beginConnectionPointIndex,L.dataObj&&this.edgeDataImporter.setFromPointIndex(L.dataObj,I.beginConnectionPointIndex)),this.edgeDataImporter.setToPointIndex&&(L.toPointIndex=I.endConnectionPointIndex,L.dataObj&&this.edgeDataImporter.setToPointIndex(L.dataObj,I.endConnectionPointIndex)),this.edgeDataImporter.setPoints){var U=I.points.map(function(ie){return{x:s.ModelUtils.getlUnitValue(N,ie.x),y:s.ModelUtils.getlUnitValue(N,ie.y)}});L.points=U,L.dataObj&&this.edgeDataImporter.setPoints(L.dataObj,U)}if(this.edgeDataImporter.setText){var B=void 0;1===I.getTextCount()&&I.getText()&&(B=I.getText());var K={};if(I.texts.forEach(function(ie){K[ie.position]=ie.value}),L.texts=K,L.dataObj){var J="";B?J=B:K&&Object.keys(K).length&&(J=K),this.edgeDataImporter.setText(L.dataObj,J)}}this.edgeDataImporter.setLineOption&&(L.lineOption=I.properties.lineOption,L.dataObj&&this.edgeDataImporter.setLineOption(L.dataObj,I.properties.lineOption)),this.edgeDataImporter.setStartLineEnding&&(L.startLineEnding=I.properties.startLineEnding,L.dataObj&&this.edgeDataImporter.setStartLineEnding(L.dataObj,I.properties.startLineEnding)),this.edgeDataImporter.setEndLineEnding&&(L.endLineEnding=I.properties.endLineEnding,L.dataObj&&this.edgeDataImporter.setEndLineEnding(L.dataObj,I.properties.endLineEnding))},C.prototype.updateEdgeObjectKey=function(I,L,N){var G=N&&this.edgeDataImporter.getKey(N);if(null!=G&&G!==L.key&&(delete this.autoGeneratedDataKeys[L.key],L.key=G),I.dataKey=L.key,L.dataObj!==N){var k=this.edgeDataSource,U=k.indexOf(L.dataObj);k.splice(U,1,N),L.dataObj=N}},C.prototype.deleteEdges=function(I){var L=this;this.deleteItems(this.edges,function(N){return I.findConnectorByDataKey(N)},function(N){return L.edgeDataSource},function(N,G){var k=N.dataObj&&L.edgeDataImporter.getKey(N.dataObj)||N.key,U=L.findEdge(k);U&&L.edges.splice(L.edges.indexOf(U),1),G&&(L.beginChangesNotification(),L.changesListener.notifyEdgeRemoved.call(L.changesListener,k,N.dataObj,function(B,K){L.endChangesNotification(!1)},function(B){L.endChangesNotification(!1)}))})},C.prototype.beginNodeInserting=function(){this.nodeInsertingLockCount++},C.prototype.endNodeInserting=function(){this.nodeInsertingLockCount--,0===this.nodeInsertingLockCount&&this.raiseNodeInsertingStack()},C.prototype.isInNodeInserting=function(){return this.nodeInsertingLockCount>0},C.prototype.addToUpdateNodeKeyRelatedObjectsStack=function(I,L){var N=new _(I,L);this.updateNodeKeyRelatedObjectsStack.push(N)},C.prototype.raiseNodeInsertingStack=function(){for(this.beginUpdateNodeKeyRelatedObjects();this.updateNodeKeyRelatedObjectsStack.length>0;){var I=this.updateNodeKeyRelatedObjectsStack[0];this.updateNodeKeyRelatedObjects(I.shape,I.nodeObj),this.updateNodeKeyRelatedObjectsStack.splice(0,1),I.shape.description.hasTemplate&&I.nodeObj&&this.changesListener.reloadInsertedItem(I.nodeObj.key)}this.endUpdateNodeKeyRelatedObjects()},C.prototype.beginUpdateNodeKeyRelatedObjects=function(){this.updateNodeKeyRelatedObjectsCount++},C.prototype.endUpdateNodeKeyRelatedObjects=function(){this.updateNodeKeyRelatedObjectsCount--,0===this.updateNodeKeyRelatedObjectsCount&&this.raiseUpdateNodeKeyRelatedObjectsStack()},C.prototype.isInUpdateNodeKeyRelatedObjects=function(){return this.updateNodeKeyRelatedObjectsCount>0},C.prototype.addToUpdateNodeKeyRelatedObjectsStackAction=function(I,L){for(var N=new x(I,L),G=0;G<this.updateNodeKeyRelatedObjectsStackActions.length;G++)if(this.updateNodeKeyRelatedObjectsStackActions[G].kind===I&&this.updateNodeKeyRelatedObjectsStackActions[G].nodeObj===L)return;this.updateNodeKeyRelatedObjectsStackActions.push(N)},C.prototype.raiseUpdateNodeKeyRelatedObjectsStack=function(){for(;this.updateNodeKeyRelatedObjectsStackActions.length>0;){var I=this.updateNodeKeyRelatedObjectsStackActions[0];switch(I.kind){case"shape":this.updateNodeObjectContainerOrParentKeyInternal(I.nodeObj,this.changesListener);break;case"edge":this.updateEdgeObjectFromOrToPropertyInternal(I.nodeObj,this.changesListener)}this.updateNodeKeyRelatedObjectsStackActions.splice(0,1)}},C.prototype.beginChangesNotification=function(){this.changesListener.beginChangesNotification()},C.prototype.endChangesNotification=function(I){this.changesListener.endChangesNotification(I)},C}(c.DataSource);P.DocumentDataSource=w},9463:(o,P)=>{var b,S;Object.defineProperty(P,"__esModule",{value:!0}),P.Diagnostics=void 0,(S=b||(b={}))[S.Disabled=0]="Disabled",S[S.Console=1]="Console",S[S.Document=2]="Document";var f=function(){function S(){}return S.beginAverage=function(T){this.enableLogsAndTimers&&(this.lastAverageGroupName=T)},S.endAverage=function(){this.enableLogsAndTimers&&(this.lastAverageGroupName=null)},S.tryLogAverage=function(T){var y=this;if(this.lastAverageGroupName!==T){var d=Object.keys(this.timers).map(function(s){return y.timers[s]}).filter(function(s){return s.groupName===T});if(!d.filter(function(s){return!s.endTime}).length){var c=d.reduce(function(s,a){return s+(a.endTime-a.startTime)},0)/d.length;this.log("average: "+c)}}},S.timer=function(T){this.enableLogsAndTimers&&(this.lastCreatedTimer={message:T,startTime:performance.now(),groupName:this.lastAverageGroupName})},S.endTimer=function(){var T=this;if(this.enableLogsAndTimers){var y=this.lastCreatedTimer,d=setTimeout(function(){y.endTime=performance.now(),T.showMessage('timer "'+y.message+'": '+(y.endTime-y.startTime)),y.groupName&&T.tryLogAverage(y.groupName)},0);this.timers[d]=y,this.lastCreatedTimer=null}},S.logPerfInfo=function(){var T=document.querySelector(".dxdi-control > svg").querySelectorAll("*").length,y=performance.memory;this.log("nodes: "+T.toLocaleString()+(y?" memory: ":"")+(y?y.usedJSHeapSize.toLocaleString():""))},S.log=function(T){this.showMessage(T)},S.showMessage=function(T){switch(S.mode){case b.Console:console.log(T);break;case b.Document:var y=this.getElement().value;if(this.lastMessage===T){var d=y.indexOf("\r\n");d<0&&(d=y.indexOf("\n"));var c=y.substr(0,d);/( \()([0-9]+)(\))$/.test(c)?c=c.replace(/( \()([0-9]+)(\))$/,function(s,a,u,h){return a+ ++u+h}):c+=" (1)",this.getElement().value=c+y.substr(d)}else this.getElement().value=T+"\r\n"+y,this.lastMessage=T}},S.getElement=function(){var T=this;if(!this.el){this.el=document.createElement("textarea"),this.el.style.top="0px",this.el.style.right="0px",this.el.style.position="fixed",this.el.style.background="transparent",this.el.style.fontSize="11px",this.el.style.fontFamily="monospace",this.el.style.overflow="auto",this.el.style.width="400px",document.body.appendChild(this.el);var y=document.createElement("button");y.innerHTML="x",y.addEventListener("click",function(){T.el.value="",T.lastMessage=""}),y.style.top="0px",y.style.right="400px",y.style.position="fixed",y.style.opacity="0.1",document.body.appendChild(y)}return this.el},S.mode=b.Document,S.optimizeUsingRAF=!0,S.optimizeLayers=!0,S.timers={},S.enableLogsAndTimers=!1,S}();P.Diagnostics=f},2106:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramControl=void 0;var f=b(8900),S=b(1118),T=b(7156),y=b(82),d=b(6613),c=b(9021),s=b(1864),a=b(2230),u=b(8098),h=b(8397),g=b(8717),_=b(240),x=b(6879),w=b(6734),D=b(4867),C=b(3298),I=b(8675),L=b(5656),N=b(7176),G=b(2883),k=b(5714),U=b(1733),B=b(7959),K=b(3503),J=b(6214),ie=b(3500),re=b(3607),q=b(8679),Y=function(){function Z(){this.updateLockCount=0,this.shouldUpdateItemsByModel=!1,this.reloadContentNeeded=!1,this.reloadContentParameters=new J.ReloadContentParameters,this.reloadContentByExternalChangesParameters=new J.ReloadContentParameters,this.instanceId=q.MathUtils.generateGuid(),this.settings=new _.DiagramSettings,this.shapeDescriptionManager=new h.ShapeDescriptionManager,this.shapeDescriptionManager.onShapeDecriptionChanged.add(this),this.model=new d.DiagramModel,this.selection=new c.Selection(this.model),this.onNativeAction=new I.EventDispatcher,this.apiController=new L.ApiController(this.onNativeAction,this.selection,this.model),this.permissionsProvider=new G.PermissionsProvider(this.apiController),this.permissionsProvider.onRequestOperation.add(this),this.routingModel=new k.ConnectorRoutingModel,this.modelManipulator=new S.ModelManipulator(this.model,this.routingModel,this.permissionsProvider,this.shapeDescriptionManager),this.modelManipulator.onModelChanged.add(this.permissionsProvider),this.history=new s.History(this.modelManipulator,this),this.barManager=new a.BarManager(this),this.view=new w.ViewController(this.settings,this.barManager),this.commandManager=new T.CommandManager(this),this.eventManager=new y.EventManager(this),this.settings.onReadOnlyChanged.add(this.eventManager.mouseHandler),this.settings.onReadOnlyChanged.add(this.eventManager.visualizersManager),this.selection.onChanged.add(this.barManager),this.selection.onChanged.add(this.apiController),this.selection.onChanged.add(this.permissionsProvider),this.modelManipulator.commitItemsCreateChanges(),this.history.onChanged.add(this),this.toolboxManager=new C.ToolboxManager(this.shapeDescriptionManager),this.settings.onConnectorRoutingModeChanged.add(this.routingModel),N.ImageCache.instance.onReadyStateChanged.add(this)}return Object.defineProperty(Z.prototype,"operationSettings",{get:function(){return this.permissionsProvider.operationSettings},enumerable:!1,configurable:!0}),Z.prototype.cleanMarkup=function(Q){this.toolboxManager.clean(Q=Q||function(te){ie.RenderUtils.removeElement(te)}),this.barManager.clean(),this.render&&(this.settings.onZoomChanged.remove(this.render.view),this.settings.onViewChanged.remove(this.render.page),this.settings.onViewChanged.remove(this.render.view),this.settings.onReadOnlyChanged.remove(this.render),this.settings.onReadOnlyChanged.remove(this.render.selection),this.eventManager.cleanToolboxes(this.settings.onReadOnlyChanged),this.eventManager.onTextInputOperation.remove(this.render.input),this.eventManager.onTextInputOperation.remove(this.render.items),this.eventManager.onTextInputOperation.remove(this.render.selection),this.eventManager.onMouseOperation.remove(this.render.items),this.eventManager.onMouseOperation.remove(this.render.selection),this.eventManager.onMouseOperation.remove(this.render.view),this.eventManager.onMouseOperation.remove(this.render),this.eventManager.onVisualizersUpdate.remove(this.render.selection),this.modelManipulator.onModelSizeChanged.remove(this.render.view),this.modelManipulator.onModelSizeChanged.remove(this.render.page),this.modelManipulator.onModelChanged.remove(this.render.items),this.modelManipulator.onModelChanged.remove(this.render.page),this.modelManipulator.onModelChanged.remove(this.render.selection),this.selection.onChanged.remove(this.render.selection),this.selection.onChanged.remove(this.render.items),this.render.clean(Q),this.render=void 0),this.measurer&&this.measurer instanceof U.TextMeasurer&&this.measurer.clean()},Z.prototype.dispose=function(){N.ImageCache.instance.onReadyStateChanged.remove(this)},Z.prototype.createDocument=function(Q,te,pe){this.measurer||this.initMeasurer(Q),this.render?this.render.replaceParent(Q,te):(this.render=new u.RenderManager(Q,this.eventManager,this.measurer,{pageColor:this.model.pageColor,modelSize:this.model.size,pageLandscape:this.model.pageLandscape,pageSize:this.model.pageSize,simpleView:this.settings.simpleView,readOnly:this.settings.readOnly,contextMenuEnabled:this.settings.contextMenuEnabled,gridSize:this.settings.gridSize,gridVisible:this.settings.showGrid,zoomLevel:this.settings.zoomLevel,autoZoom:this.settings.autoZoom,rectangle:this.model.getRectangle(!0)},this.instanceId,te,pe),this.settings.onZoomChanged.add(this.render.view),this.settings.onViewChanged.add(this.render.page),this.settings.onViewChanged.add(this.render.view),this.settings.onReadOnlyChanged.add(this.render),this.settings.onReadOnlyChanged.add(this.render.selection),this.eventManager.onTextInputOperation.add(this.render.input),this.eventManager.onTextInputOperation.add(this.render.items),this.eventManager.onTextInputOperation.add(this.render.selection),this.eventManager.onTextInputOperation.add(this),this.eventManager.onMouseOperation.add(this.render.items),this.eventManager.onMouseOperation.add(this.render.selection),this.eventManager.onMouseOperation.add(this.render.view),this.eventManager.onMouseOperation.add(this.render),this.eventManager.onVisualizersUpdate.add(this.render.selection),this.modelManipulator.onModelSizeChanged.add(this.render.view),this.modelManipulator.onModelSizeChanged.add(this.render.page),this.modelManipulator.onModelChanged.add(this.render.items),this.modelManipulator.onModelChanged.add(this.render.page),this.modelManipulator.onModelChanged.add(this.render.selection),this.selection.onChanged.add(this.render.selection),this.selection.onChanged.add(this.render.items),this.render.update(!1),this.render.onNewModel(this.model.items),this.modelManipulator.commitItemsCreateChanges(),this.view.initialize(this.render.view),this.settings.zoomLevelWasChanged&&this.raiseCanvasViewActualZoomChanged(),this.selection.raiseSelectionChanged())},Z.prototype.createToolbox=function(Q,te,pe,z){var oe=this.toolboxManager.create(Q,this.settings.readOnly,!0,te,pe,this.getToolboxAllowedShapeTypes.bind(this),this.instanceId,z);this.settings.onReadOnlyChanged.add(oe),oe.onDragOperation.add(this),oe.onDragOperation.add(this.apiController),this.eventManager.registerToolbox(oe)},Z.prototype.createContextToolbox=function(Q,te,pe,z,oe){this.cleanContextToolbox(),this.contextToolbox=this.toolboxManager.create(Q,this.settings.readOnly,!1,te,pe,this.getToolboxAllowedShapeTypes.bind(this),this.instanceId,z),this.contextToolbox.onClickOperation.add(this),this.contextToolboxOnClick=oe},Z.prototype.getToolboxAllowedShapeTypes=function(Q){var te=this,pe=[];return this.permissionsProvider.beginUpdateUI(),Q.forEach(function(z){te.permissionsProvider.canAddShapeFromToolbox(z)&&pe.push(z)}),this.permissionsProvider.endUpdateUI(),pe},Z.prototype.cleanContextToolbox=function(){this.contextToolbox&&(this.toolboxManager.clean(void 0,this.contextToolbox),this.contextToolbox=void 0,this.contextToolboxOnClick=void 0)},Z.prototype.refreshToolbox=function(Q){this.permissionsProvider.clearCache(x.DiagramModelOperation.AddShapeFromToolbox),this.toolboxManager.refresh(Q)},Z.prototype.applyToolboxFilter=function(Q,te){return this.toolboxManager.applyFilter(Q,te)},Z.prototype.notifyToolboxClick=function(Q){this.contextToolboxOnClick&&this.contextToolboxOnClick(Q)},Z.prototype.initMeasurer=function(Q){this.measurer=new U.TextMeasurer(Q)},Z.prototype.onDimensionChanged=function(){re.Browser.TouchUI||this.updateLayout(!0)},Z.prototype.updateLayout=function(Q){void 0===Q&&(Q=!1),this.render&&this.render.update(!Q)},Z.prototype.captureFocus=function(){this.render&&this.render.input.captureFocus()},Z.prototype.isFocused=function(){return!this.render||this.render.input.isFocused()},Z.prototype.registerBar=function(Q){this.barManager.registerBar(Q)},Z.prototype.updateBarItemsState=function(Q,te){this.barManager.updateBarItemsState(Q,te)},Z.prototype.getCommand=function(Q){return this.commandManager.getCommand(Q)},Z.prototype.getNativeItemByKey=function(Q){var te=this.model.findItem(Q);return te&&this.apiController.createNativeItem(te)},Z.prototype.getNativeItemByDataKey=function(Q){var te=this.model.findItemByDataKey(Q);return te&&this.apiController.createNativeItem(te)},Z.prototype.getNativeItems=function(){var Q=this;return this.model.items.map(function(te){return Q.apiController.createNativeItem(te)})},Z.prototype.getNativeSelectedItems=function(){var Q=this;return this.selection.getKeys().map(function(te){return Q.apiController.createNativeItem(Q.model.findItem(te))})},Z.prototype.setSelectedItems=function(Q){this.selection.set(Q)},Z.prototype.scrollToItems=function(Q){var te=this,pe=I.GeometryUtils.getCommonRectangle(Q.map(function(z){return te.model.findItem(z).rectangle}));this.view.scrollIntoView(pe)},Z.prototype.setInitialStyleProperties=function(Q){this.selection.inputPosition.setInitialStyleProperties(Q)},Z.prototype.setInitialTextStyleProperties=function(Q){this.selection.inputPosition.setInitialTextStyleProperties(Q)},Z.prototype.setInitialConnectorProperties=function(Q){this.selection.inputPosition.setInitialConnectorProperties(Q)},Z.prototype.addCustomShapes=function(Q){var te=this;Q.forEach(function(pe){pe.apiController=te.apiController,pe.defaultWidth&&(pe.defaultWidth=D.ModelUtils.getTwipsValue(te.model.units,pe.defaultWidth)),pe.defaultHeight&&(pe.defaultHeight=D.ModelUtils.getTwipsValue(te.model.units,pe.defaultHeight)),pe.minWidth&&(pe.minWidth=D.ModelUtils.getTwipsValue(te.model.units,pe.minWidth)),pe.minHeight&&(pe.minHeight=D.ModelUtils.getTwipsValue(te.model.units,pe.minHeight)),pe.maxWidth&&(pe.maxWidth=D.ModelUtils.getTwipsValue(te.model.units,pe.maxWidth)),pe.maxHeight&&(pe.maxHeight=D.ModelUtils.getTwipsValue(te.model.units,pe.maxHeight)),te.shapeDescriptionManager.registerCustomShape(pe)})},Z.prototype.removeCustomShapes=function(Q){var te=this;Q.forEach(function(pe){te.shapeDescriptionManager.unregisterCustomShape(pe)})},Z.prototype.removeAllCustomShapes=function(){this.shapeDescriptionManager.unregisterAllCustomShapes()},Z.prototype.importModel=function(Q){Q.units=this.model.units,this.model=Q,this.model.initializeKeyCounter(),this.apiController.model=Q,this.onImportData()},Z.prototype.importItemsData=function(){this.onImportData()},Z.prototype.onImportData=function(){this.render&&(this.render.clear(),this.render.onNewModel(this.model.items)),this.permissionsProvider.clearCache(),this.selection.initialize(this.model),this.modelManipulator.initialize(this.model,this.routingModel),this.history.clear(),this.eventManager.initialize(),this.modelManipulator.commitPageChanges(),this.modelManipulator.commitItemsCreateChanges(),this.notifyViewChanged(),this.notifyHistoryChanged()},Z.prototype.createDocumentDataSource=function(Q,te,pe,z,oe){return this.documentDataSource=new g.DocumentDataSource(this,Q,te,pe,z,oe),this.apiController.setDataSource(this.documentDataSource),this.documentDataSource},Z.prototype.deleteDocumentDataSource=function(){this.apiController.setDataSource(null),delete this.documentDataSource},Z.prototype.applyShapeSizeSettings=function(Q){this.settings.applyShapeSizeSettings(Q,this.model.units)},Z.prototype.applyOperationSettings=function(Q){this.permissionsProvider.operationSettings.applySettings(Q)},Z.prototype.beginUpdateCanvas=function(){this.render&&(this.render.items.beginUpdate(),this.render.selection.beginUpdate())},Z.prototype.endUpdateCanvas=function(){this.render&&(this.render.items.endUpdate(),this.render.selection.endUpdate())},Z.prototype.beginUpdate=function(){this.barManager.beginUpdate(),this.apiController.beginUpdate(),this.eventManager.beginUpdate()},Z.prototype.endUpdate=function(){this.barManager.endUpdate(),this.apiController.endUpdate(),this.eventManager.endUpdate()},Z.prototype.notifyEdgeInserted=function(Q,te,pe){this.onEdgeInserted?this.onEdgeInserted(Q,te,pe):te(Q)},Z.prototype.notifyEdgeUpdated=function(Q,te,pe,z){this.onEdgeUpdated?this.onEdgeUpdated(Q,te,pe,z):pe(Q,te)},Z.prototype.notifyEdgeRemoved=function(Q,te,pe,z){this.onEdgeUpdated?this.onEdgeRemoved(Q,te,pe,z):pe(Q,te)},Z.prototype.notifyNodeInserted=function(Q,te,pe){this.onNodeInserted?this.onNodeInserted(Q,te,pe):te(Q)},Z.prototype.notifyNodeUpdated=function(Q,te,pe,z){this.onNodeUpdated?this.onNodeUpdated(Q,te,pe,z):pe(Q,te)},Z.prototype.notifyNodeRemoved=function(Q,te,pe,z){this.onNodeRemoved?this.onNodeRemoved(Q,te,pe,z):pe(Q,te)},Z.prototype.reloadInsertedItem=function(Q){this.settings.reloadInsertedItemRequired&&this.reloadContent(Q)},Z.prototype.reloadContent=function(Q,te,pe,z){if(this.documentDataSource){this.isChangesLocked()&&(this.reloadContentNeeded=!0);var oe=!0===z||void 0===z&&!this.reloadContentNeeded,ae=oe?this.reloadContentByExternalChangesParameters:this.reloadContentParameters;ae.add(Q,te,pe),this.isChangesLocked()||(this.reloadContentCore(ae,oe),this.barManager.updateItemsState())}},Z.prototype.reloadContentCore=function(Q,te){var pe=this,z=Q.getData&&Q.getData(),oe=this.documentDataSource.refetchData(z&&z.nodeDataSource,z&&z.edgeDataSource);this.beginUpdateCanvas(),this.permissionsProvider.lockPermissions(),this.documentDataSource.updateModelItems(this.history,this.model,this.shapeDescriptionManager,this.selection,new K.DataLayoutParameters(this.settings,Q.layoutParameters),te,Q.dataKeys,function(ae){pe.modelManipulator.commitItemUpdateChanges(ae)},oe,this.settings.snapToGrid,this.settings.gridSize,this.measurer),this.permissionsProvider.unlockPermissions(),this.endUpdateCanvas(),Q.clear()},Z.prototype.notifyHistoryChanged=function(){this.documentDataSource?(this.shouldUpdateItemsByModel=!0,this.settings.readOnly||this.notifyDataChanges()):this.raiseOnChanged()},Z.prototype.notifyViewChanged=function(){this.settings.notifyViewChanged()},Z.prototype.notifyToolboxDragStart=function(Q){this.render.notifyToolboxDragStart(Q),this.onToolboxDragStart&&this.onToolboxDragStart()},Z.prototype.notifyToolboxDragEnd=function(Q){this.render.notifyToolboxDragEnd(Q),this.onToolboxDragEnd&&this.onToolboxDragEnd()},Z.prototype.notifyToolboxDraggingMouseMove=function(Q){this.render&&this.render.notifyToolboxDraggingMouseMove(Q)},Z.prototype.notifyTextInputStart=function(Q,te,pe,z){this.onTextInputStart&&this.onTextInputStart()},Z.prototype.notifyTextInputEnd=function(Q,te){this.onTextInputEnd&&this.onTextInputEnd()},Z.prototype.notifyTextInputPermissionsCheck=function(Q,te){},Z.prototype.notifyToggleFullscreen=function(Q){this.onToggleFullscreen&&this.onToggleFullscreen(Q)},Z.prototype.notifyShowContextMenu=function(Q,te){if(this.onShowContextMenu&&this.render){var pe=void 0;if(this.selection.getSelectedItems(!0).length>0){var z=D.ModelUtils.createRectangle(this.selection.getSelectedItems(!0)),oe=this.render.getEventPointByModelPoint(z.createPosition()),ae=this.render.view.getAbsoluteSize(z.createSize());pe={x:oe.x,y:oe.y,width:ae.width,height:ae.height}}if(Q)this.contextMenuPosition=new f.Point(Q.x,Q.y),this.onShowContextMenu(Q.x,Q.y,pe);else if(te){var ee=this.render.getEventPointByModelPoint(te);this.contextMenuPosition=ee.clone(),this.onShowContextMenu(ee.x,ee.y,pe)}}},Z.prototype.notifyHideContextMenu=function(){this.onHideContextMenu&&this.render&&this.onHideContextMenu()},Z.prototype.notifyShowContextToolbox=function(Q,te,pe,z,oe){if(this.onShowContextToolbox&&this.render){var ae=this.render.getEventPointByModelPoint(Q);this.onShowContextToolbox(ae.x,ae.y,pe,z,oe),this.render.view.notifyShowContextToolbox()}},Z.prototype.notifyHideContextToolbox=function(){this.onHideContextToolbox&&this.render&&(this.onHideContextToolbox(),this.render.view.notifyHideContextToolbox()),this.cleanContextToolbox()},Z.prototype.notifyShapeDescriptionChanged=function(Q){this.modelManipulator.updateShapeDescription(Q)},Z.prototype.notifyImageCacheReadyStateChanged=function(Q){this.barManager.updateItemsState()},Z.prototype.raiseCanvasViewActualZoomChanged=function(){this.render.view.raiseActualZoomChanged()},Z.prototype.notifyRequestOperation=function(Q,te){this.requestOperationByDataSource(Q,te)||this.onRequestOperation&&this.onRequestOperation(Q,te)},Z.prototype.requestOperationByDataSource=function(Q,te){if(!this.documentDataSource||!this.documentDataSource.IsNodeParentIdMode()&&!this.documentDataSource.IsNodeItemsMode())return!1;if(Q===x.DiagramModelOperation.ChangeConnection){var pe=te,z=pe.shape&&this.model.findItem(pe.shape.id),oe=pe.connector&&this.model.findItem(pe.connector.id);if(!z||!oe)return;if(pe.position===B.ConnectorPosition.End)for(var ae=0;ae<z.attachedConnectors.length;ae++){var ee=z.attachedConnectors[ae];if(ee!==oe&&ee.endItem&&ee.endItem===z){pe.allowed=!1;break}}pe.allowed&&oe.beginItem&&oe.endItem&&this.isShapeParent(oe.endItem,oe.beginItem)&&(pe.allowed=!1)}return!te.allowed},Z.prototype.isShapeParent=function(Q,te){if(Q===te)return!0;for(var pe=0;pe<Q.attachedConnectors.length;pe++){var z=Q.attachedConnectors[pe];if(z.beginItem===Q&&z.endItem){var oe=z.endItem;if(oe===te||this.isShapeParent(oe,te))return!0}}return!1},Z.prototype.isChangesLocked=function(){return this.updateLockCount>0},Z.prototype.beginChangesNotification=function(){this.isChangesLocked()||this.changesLockChanged&&this.changesLockChanged(!0),this.updateLockCount++},Z.prototype.endChangesNotification=function(Q){var te=this;this.updateLockCount--,this.isChangesLocked()||(this.changesLockChanged(!1),Q||setTimeout(function(){te.notifyReloadContent(),te.notifyDataChanges()},0))},Z.prototype.changesLockChanged=function(Q){Q?this.lockedReadOnly=this.settings.readOnly:Q=this.lockedReadOnly,this.commandManager.getCommand(T.DiagramCommand.ToggleReadOnly).execute(Q)},Z.prototype.notifyDataChanges=function(){this.isChangesLocked()||(this.shouldUpdateItemsByModel&&(this.documentDataSource.updateItemsByModel(this.model),this.shouldUpdateItemsByModel=!1),this.raiseOnChanged())},Z.prototype.notifyReloadContent=function(){this.reloadContentNeeded&&(this.reloadContentParameters.empty||this.reloadContentCore(this.reloadContentParameters,!1),this.reloadContentByExternalChangesParameters.empty||this.reloadContentCore(this.reloadContentByExternalChangesParameters,!0),this.reloadContentNeeded=!1)},Z.prototype.raiseOnChanged=function(){this.onChanged&&this.onChanged()},Z}();P.DiagramControl=Y},5383:(o,P)=>{var b;Object.defineProperty(P,"__esModule",{value:!0}),P.PageOrientation=P.DiagramUnit=void 0,(b=P.DiagramUnit||(P.DiagramUnit={}))[b.In=0]="In",b[b.Cm=1]="Cm",b[b.Px=2]="Px",function(b){b[b.Portrait=0]="Portrait",b[b.Landscape=1]="Landscape"}(P.PageOrientation||(P.PageOrientation={}))},9946:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ContextMenuHandler=void 0;var T=b(8675),y=b(6031),d=b(2153),c=b(1772),s=b(9279),a=function(u){function h(){var g=null!==u&&u.apply(this,arguments)||this;return g.contextMenuVisible=!1,g.textInputStarted=!1,g.canHideContextMenu=!0,g.onVisibilityChanged=new T.EventDispatcher,g}return S(h,u),h.prototype.onMouseDown=function(g){g.button===y.MouseButton.Left&&g.source.type!==y.MouseEventElementType.Undefined&&this.hideContextMenu()},h.prototype.onMouseUp=function(g){(!s.Browser.MacOSPlatform||s.Browser.MacOSPlatform&&this.canHideContextMenu)&&this.hideContextMenu(),this.canHideContextMenu=!0},h.prototype.onContextMenu=function(g){s.Browser.MacOSPlatform&&(this.canHideContextMenu=!1),this.showContextMenu(g.eventPoint,g.modelPoint)},h.prototype.onFocus=function(g){},h.prototype.onBlur=function(g){},h.prototype.onTextInputFocus=function(g){},h.prototype.onTextInputBlur=function(g){},h.prototype.onLongTouch=function(g){},h.prototype.onKeyDown=function(g){g.keyCode===d.KeyCode.Esc&&this.hideContextMenu()},h.prototype.onShortcut=function(g){this.hideContextMenu()},h.prototype.showContextMenu=function(g,_){var x=this;this.textInputStarted||window.setTimeout(function(){x.onVisibilityChanged.raise1(function(w){return w.notifyShowContextMenu(g,_)}),x.contextMenuVisible=!0},0)},h.prototype.hideContextMenu=function(){var g=this;this.contextMenuVisible&&window.setTimeout(function(){g.onVisibilityChanged.raise1(function(_){return _.notifyHideContextMenu()}),g.contextMenuVisible=!1},0)},h.prototype.notifyDragStart=function(g){},h.prototype.notifyDragEnd=function(g){},h.prototype.notifyDragScrollStart=function(){},h.prototype.notifyDragScrollEnd=function(){},h.prototype.notifyShowContextToolbox=function(g,_,x,w,D){},h.prototype.notifyHideContextToolbox=function(){},h.prototype.notifyTextInputStart=function(g,_,x,w){this.textInputStarted=!0},h.prototype.notifyTextInputEnd=function(g,_){this.textInputStarted=!1},h.prototype.notifyTextInputPermissionsCheck=function(g,_){},h.prototype.onUpdateUnlocked=function(g){},h}(c.BatchUpdatableObject);P.ContextMenuHandler=a},151:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ContextMenuTouchHandler=void 0;var T=b(6031),y=b(9946),d=b(4867),c=function(s){function a(u){var h=s.call(this)||this;return h.selection=u,h.contextToolboxVisible=!1,h.selection.onChanged.add(h),h}return S(a,s),a.prototype.onMouseDown=function(u){void 0===u.source.key&&this.hideContextMenu()},a.prototype.onMouseUp=function(u){},a.prototype.onFocus=function(u){var h=this;setTimeout(function(){h.showContextMenuAtSelection()},1)},a.prototype.onBlur=function(u){var h=this;setTimeout(function(){h.hideContextMenu()},1)},a.prototype.onTextInputFocus=function(u){var h=this;setTimeout(function(){h.hideContextMenu()},1)},a.prototype.onTextInputBlur=function(u){var h=this;setTimeout(function(){h.showContextMenuAtSelection()},1)},a.prototype.onLongTouch=function(u){u.source.type===T.MouseEventElementType.Document&&this.showContextMenuAtEmptySelection(u.modelPoint)},a.prototype.onKeyDown=function(u){},a.prototype.onShortcut=function(u){},a.prototype.getSelectedItems=function(){return this.selection.getSelectedItems(!0)},a.prototype.showContextMenuAtSelection=function(){if(!this.contextToolboxVisible){var u=this.getSelectedItems();0!==u.length&&this.showContextMenu(void 0,d.ModelUtils.createRectangle(u).createPosition())}},a.prototype.showContextMenuAtEmptySelection=function(u){this.contextToolboxVisible||0===this.getSelectedItems().length&&this.showContextMenu(void 0,u)},a.prototype.notifyDragStart=function(u){this.hideContextMenu()},a.prototype.notifyDragEnd=function(u){this.showContextMenuAtSelection()},a.prototype.notifySelectionChanged=function(u){this.isUpdateLocked()?this.registerOccurredEvent(1):this.raiseSelectionChanged()},a.prototype.raiseSelectionChanged=function(){0!==this.getSelectedItems().length?this.showContextMenuAtSelection():this.hideContextMenu()},a.prototype.onUpdateUnlocked=function(u){1&u&&this.raiseSelectionChanged()},a.prototype.notifyShowContextToolbox=function(u,h,g,_,x){this.contextToolboxVisible=!0,this.hideContextMenu()},a.prototype.notifyHideContextToolbox=function(){this.contextToolboxVisible=!1,this.showContextMenuAtSelection()},a}(y.ContextMenuHandler);P.ContextMenuTouchHandler=c},4426:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ContextToolboxHandler=void 0;var f=b(6031),S=b(8675),T=b(2153),y=b(9279),d=function(){function c(){this.contextToolboxVisible=!1,this.onVisibilityChanged=new S.EventDispatcher}return c.prototype.onMouseDown=function(s){s.source.type!==f.MouseEventElementType.Undefined&&this.hideContextToolbox()},c.prototype.onMouseUp=function(s){s.source.type===f.MouseEventElementType.Undefined&&y.Browser.TouchUI||this.hideContextToolbox()},c.prototype.onFocus=function(s){},c.prototype.onBlur=function(s){},c.prototype.onKeyDown=function(s){s.keyCode===T.KeyCode.Esc&&this.hideContextToolbox()},c.prototype.onShortcut=function(s){this.hideContextToolbox()},c.prototype.showContextToolbox=function(s,a,u,h,g,_){this.onVisibilityChanged.raise1(function(x){return x.notifyShowContextToolbox(s,a,u,h,g)}),this.contextToolboxVisible=!0,this.contextToolboxCancelCallback=_},c.prototype.hideContextToolbox=function(s){this.contextToolboxVisible&&(this.onVisibilityChanged.raise1(function(a){return a.notifyHideContextToolbox()}),this.contextToolboxCancelCallback&&(s||this.contextToolboxCancelCallback(),this.contextToolboxCancelCallback=void 0),this.contextToolboxVisible=!1)},c}();P.ContextToolboxHandler=d},6031:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramClipboardEvent=P.DiagramKeyboardEvent=P.DiagramContextMenuEvent=P.DiagramWheelEvent=P.DiagramMouseEvent=P.DiagramMouseEventBase=P.DiagramMouseEventTouch=P.DiagramFocusEvent=P.DiagramEvent=P.ResizeEventSource=P.MouseEventSource=P.MouseEventElementType=P.MouseButton=void 0;var w,T=b(2153);(w=P.MouseButton||(P.MouseButton={}))[w.None=0]="None",w[w.Left=1]="Left",w[w.Right=2]="Right",w[w.Middle=4]="Middle",function(w){w[w.Undefined=0]="Undefined",w[w.Background=1]="Background",w[w.Document=2]="Document",w[w.Connector=3]="Connector",w[w.ConnectorPoint=4]="ConnectorPoint",w[w.ConnectorSide=5]="ConnectorSide",w[w.ConnectorOrthogonalSide=6]="ConnectorOrthogonalSide",w[w.ConnectorText=7]="ConnectorText",w[w.Shape=8]="Shape",w[w.ShapeResizeBox=9]="ShapeResizeBox",w[w.ShapeParameterBox=10]="ShapeParameterBox",w[w.SelectionRect=11]="SelectionRect",w[w.ShapeConnectionPoint=12]="ShapeConnectionPoint",w[w.ShapeExpandButton=13]="ShapeExpandButton"}(P.MouseEventElementType||(P.MouseEventElementType={})),P.MouseEventSource=function(w,D,C){this.type=w,this.key=D,this.value=C},function(w){w[w.Undefined=0]="Undefined",w[w.ResizeBox_NW=1]="ResizeBox_NW",w[w.ResizeBox_NE=2]="ResizeBox_NE",w[w.ResizeBox_SE=3]="ResizeBox_SE",w[w.ResizeBox_SW=4]="ResizeBox_SW",w[w.ResizeBox_N=5]="ResizeBox_N",w[w.ResizeBox_E=6]="ResizeBox_E",w[w.ResizeBox_S=7]="ResizeBox_S",w[w.ResizeBox_W=8]="ResizeBox_W"}(P.ResizeEventSource||(P.ResizeEventSource={}));var d=function(w){this.modifiers=w};P.DiagramEvent=d;var c=function(w){function D(C){var I=w.call(this,T.ModifierKey.None)||this;return I.inputText=C,I}return S(D,w),D}(d);P.DiagramFocusEvent=c,P.DiagramMouseEventTouch=function(w,D){this.offsetPoint=w,this.modelPoint=D};var a=function(w){function D(C,I,L,N){var G=w.call(this,C)||this;return G.offsetPoint=I,G.modelPoint=L,G.source=N,G}return S(D,w),D}(d);P.DiagramMouseEventBase=a;var u=function(w){function D(C,I,L,N,G,k,U){void 0===k&&(k=[]);var B=w.call(this,C,L,N,G)||this;return B.button=I,B.touches=k,B.isTouchMode=U,B.scrollX=0,B.scrollY=0,B}return S(D,w),D}(a);P.DiagramMouseEvent=u;var h=function(w){function D(C,I,L,N,G,k){var U=w.call(this,C,N,G,k)||this;return U.deltaX=I,U.deltaY=L,U}return S(D,w),D}(a);P.DiagramWheelEvent=h;var g=function(w){function D(C,I,L){var N=w.call(this,C)||this;return N.eventPoint=I,N.modelPoint=L,N}return S(D,w),D}(d);P.DiagramContextMenuEvent=g;var _=function(w){function D(C,I,L){var N=w.call(this,C)||this;return N.keyCode=I,N.inputText=L,N}return S(D,w),D.prototype.getShortcutCode=function(){return this.modifiers|this.keyCode},D}(d);P.DiagramKeyboardEvent=_;var x=function(w){function D(C){var I=w.call(this,T.ModifierKey.None)||this;return I.clipboardData=C,I}return S(D,w),D}(d);P.DiagramClipboardEvent=x},82:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.EventManager=void 0;var f=b(5689),S=b(8675),T=b(8376),y=b(9946),d=b(151),c=b(7733),s=b(7459),a=b(4426),u=b(9279),h=b(2153),g=function(){function _(x){this.onMouseOperation=new S.EventDispatcher,this.onTextInputOperation=new S.EventDispatcher,this.toolboxes=[],this.control=x,this.visualizersManager=S.EventUtils.isTouchMode()?new s.VisualizerTouchManager(x.selection,x.model,this,x.settings):new c.VisualizerManager(x.selection,x.model,this,x.settings),this.onMouseOperation.add(this.visualizersManager),this.contextMenuHandler=u.Browser.TouchUI?new d.ContextMenuTouchHandler(x.selection):new y.ContextMenuHandler,this.contextMenuHandler.onVisibilityChanged.add(x),this.onMouseOperation.add(this.contextMenuHandler),this.onTextInputOperation.add(this.contextMenuHandler),this.contextToolboxHandler=new a.ContextToolboxHandler,this.contextToolboxHandler.onVisibilityChanged.add(x),this.contextToolboxHandler.onVisibilityChanged.add(this.contextMenuHandler),this.mouseHandler=new f.MouseHandler(x.history,x.selection,x.model,this,x.settings.readOnly,x.view,this.visualizersManager,this.contextToolboxHandler,x.shapeDescriptionManager,x.settings,x.permissionsProvider),this.textInputHandler=new T.TextInputHandler(x),this.visualizersManager.onVisualizersUpdate.add(this.mouseHandler)}return Object.defineProperty(_.prototype,"onVisualizersUpdate",{get:function(){return this.visualizersManager.onVisualizersUpdate},enumerable:!1,configurable:!0}),_.prototype.registerToolbox=function(x){this.toolboxes.push(x)},_.prototype.cleanToolboxes=function(x){this.toolboxes.forEach(function(w){x.remove(w)}),this.toolboxes=[]},_.prototype.initialize=function(){this.visualizersManager.initialize(this.control.model),this.mouseHandler.initialize(this.control.model)},_.prototype.beginUpdate=function(x){this.contextMenuHandler.beginUpdate(),this.visualizersManager.beginUpdate()},_.prototype.endUpdate=function(){this.contextMenuHandler.endUpdate(),this.visualizersManager.endUpdate()},_.prototype.onMouseDown=function(x){this.mouseHandler.onMouseDown(x),this.contextMenuHandler.onMouseDown(x),this.visualizersManager.onMouseDown(x),this.contextToolboxHandler.onMouseDown(x)},_.prototype.onMouseMove=function(x){this.processDragging(x),this.mouseHandler.onMouseMove(x)},_.prototype.onMouseUp=function(x){this.contextToolboxHandler.onMouseUp(x),this.mouseHandler.onMouseUp(x),this.contextMenuHandler.onMouseUp(x),this.visualizersManager.onMouseUp(x),this.processDragging(x)},_.prototype.onMouseEnter=function(x){this.visualizersManager.onMouseEnter(x)},_.prototype.onMouseLeave=function(x){this.visualizersManager.onMouseLeave(x)},_.prototype.onDblClick=function(x){this.mouseHandler.onMouseDblClick(x),this.textInputHandler.onDblClick(x),this.control.apiController.notifyDblClick(x)},_.prototype.onClick=function(x){this.mouseHandler.onMouseClick(x),this.control.apiController.notifyClick(x)},_.prototype.onContextMenu=function(x){this.contextMenuHandler.onContextMenu(x)},_.prototype.onLongTouch=function(x){this.mouseHandler.onLongTouch(x),this.contextMenuHandler.onLongTouch(x)},_.prototype.onBlur=function(x){this.contextMenuHandler.onBlur(x),this.contextToolboxHandler.onBlur(x),this.visualizersManager.onBlur(x)},_.prototype.onFocus=function(x){this.contextMenuHandler.onFocus(x),this.contextToolboxHandler.onFocus(x),this.visualizersManager.onFocus(x)},_.prototype.onKeyDown=function(x){var w=x.getShortcutCode();this.onShortcut(w)?(this.visualizersManager.updateConnectionPoints(),this.contextMenuHandler.onShortcut(x),this.contextToolboxHandler.onShortcut(x),x.preventDefault=!0):this.isShortcutForFocusInput(w)&&(x.preventDefault=!0),this.contextMenuHandler.onKeyDown(x),this.contextToolboxHandler.onKeyDown(x),this.mouseHandler.onKeyDown(x)},_.prototype.onKeyUp=function(x){this.mouseHandler.onKeyUp(x)},_.prototype.onTextInputBlur=function(x){this.textInputHandler.onBlur(x),this.contextMenuHandler.onTextInputBlur(x)},_.prototype.onTextInputFocus=function(x){this.textInputHandler.onFocus(x),this.contextMenuHandler.onTextInputFocus(x)},_.prototype.onTextInputKeyDown=function(x){this.textInputHandler.onKeyDown(x)},_.prototype.onShortcut=function(x){return!!this.control.commandManager.processShortcut(x)||!!this.mouseHandler.onShortcut(x)||void 0},_.prototype.isShortcutForFocusInput=function(x){return x===h.KeyCode.Delete||x===(h.KeyCode.Delete|h.ModifierKey.Ctrl)||x===(h.KeyCode.Delete|h.ModifierKey.Meta)||x===h.KeyCode.Backspace||x===(h.KeyCode.Backspace|h.ModifierKey.Ctrl)||x===(h.KeyCode.Backspace|h.ModifierKey.Shift)||x===(h.KeyCode.Backspace|h.ModifierKey.Meta)||x===h.KeyCode.Home||x===h.KeyCode.End||x===h.KeyCode.Up||x===(h.KeyCode.Up|h.ModifierKey.Ctrl)||x===(h.KeyCode.Up|h.ModifierKey.Meta)||x===h.KeyCode.Down||x===(h.KeyCode.Down|h.ModifierKey.Ctrl)||x===(h.KeyCode.Down|h.ModifierKey.Meta)||x===h.KeyCode.Left||x===(h.KeyCode.Left|h.ModifierKey.Ctrl)||x===(h.KeyCode.Left|h.ModifierKey.Meta)||x===h.KeyCode.Right||x===(h.KeyCode.Right|h.ModifierKey.Ctrl)||x===(h.KeyCode.Right|h.ModifierKey.Meta)},_.prototype.onPaste=function(x){!this.textInputHandler.isTextInputActive()&&this.control.commandManager.processPaste(x.clipboardData)&&(this.visualizersManager.updateConnectionPoints(),x.preventDefault=!0)},_.prototype.onMouseWheel=function(x){this.mouseHandler.onWheel(x)&&(x.preventDefault=!0)},_.prototype.isFocused=function(){return this.control.isFocused()},_.prototype.processDragging=function(x){var w=this.getDraggingEvent();w&&this.draggingEvent!==w?(this.draggingEvent=w,this.mouseHandler.onDragStart(this.draggingEvent),this.control.captureFocus()):!w&&this.draggingEvent&&(delete this.draggingEvent,this.mouseHandler.onDragEnd(x))},_.prototype.getDraggingEvent=function(){return this.toolboxes.filter(function(x){return x.draggingObject}).map(function(x){return x.draggingObject.evt})[0]},_.prototype.onDocumentDragStart=function(x){this.control.beginUpdate(),this.control.captureFocus(),this.onMouseOperation.raise("notifyDragStart",x)},_.prototype.onDocumentDragEnd=function(x){this.onMouseOperation.raise("notifyDragEnd",x),this.control.endUpdate(),this.control.barManager.updateItemsState()},_.prototype.onDocumentDragScrollStart=function(){this.onMouseOperation.raise1(function(x){return x.notifyDragScrollStart()})},_.prototype.onDocumentDragScrollEnd=function(){this.onMouseOperation.raise1(function(x){return x.notifyDragScrollEnd()})},_.prototype.onDocumentClick=function(x){this.control.beginUpdate(),this.control.endUpdate(),this.control.barManager.updateItemsState()},_.prototype.raiseTextInputStart=function(x,w,D,C){this.onTextInputOperation.raise("notifyTextInputStart",x,w,D,C)},_.prototype.raiseTextInputEnd=function(x,w){this.onTextInputOperation.raise("notifyTextInputEnd",x,w)},_.prototype.raiseTextInputPermissionsCheck=function(x,w){this.onTextInputOperation.raise("notifyTextInputPermissionsCheck",x,w)},_.prototype.canFinishTextEditing=function(){return this.textInputHandler.canFinishTextEditing()},_}();P.EventManager=g},5689:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandler=void 0;var f=b(3250),S=b(6031),T=b(8900),y=b(4867),d=b(8032),c=b(7286),s=b(8502),a=b(2153),u=b(8675),h=function(){function g(_,x,w,D,C,I,L,N,G,k,U){this.history=_,this.selection=x,this.model=w,this.eventManager=D,this.readOnly=C,this.view=I,this.visualizerManager=L,this.contextToolboxHandler=N,this.shapeDescriptionManager=G,this.settings=k,this.permissionsProvider=U,this.finishStateLock=0,this.initialize(w),this.selection.onChanged.add(this)}return g.prototype.initialize=function(_){this.model=_,this.allowMultipleSelection=!0,this.allowCopyDiagramItems=!0,this.allowSnapToCellOnDragDiagramItem=!0,this.allowSnapToCellOnDragPoint=!0,this.allowSnapToCellOnResizeShape=!0,this.allowFixedDrag=!0,this.allowZoomOnWheel=!0,this.allowScrollPage=!0,this.shouldScrollPage=!1,this.copyDiagramItemsByCtrlAndShift=!1,this.startScrollingPageByCtrl=!1,this.initializeDefaultState()},g.prototype.initializeDefaultState=function(){this.defaultState=this.readOnly?u.EventUtils.isTouchMode()?new d.MouseHandlerDefaultReadOnlyTouchState(this,this.history,this.selection,this.model,this.view,this.visualizerManager,this.shapeDescriptionManager,this.settings):new c.MouseHandlerDefaultReadOnlyState(this,this.history,this.selection,this.model,this.view,this.visualizerManager,this.shapeDescriptionManager,this.settings):u.EventUtils.isTouchMode()?new s.MouseHandlerDefaultTouchState(this,this.history,this.selection,this.model,this.view,this.visualizerManager,this.shapeDescriptionManager,this.settings):new f.MouseHandlerDefaultState(this,this.history,this.selection,this.model,this.view,this.visualizerManager,this.shapeDescriptionManager,this.settings),this.switchToDefaultState()},g.prototype.onMouseDown=function(_){this.mouseDownEvent=_,this.state.onMouseDown(_)},g.prototype.onMouseMove=function(_){this.state.onMouseMove(_)},g.prototype.onMouseUp=function(_){this.state.onMouseUp(_)},g.prototype.onMouseDblClick=function(_){this.state.onMouseDblClick(_)},g.prototype.onMouseClick=function(_){this.state.onMouseClick(_)},g.prototype.onLongTouch=function(_){if(_.touches&&!(_.touches.length>1)){var x=_.source.key;void 0===x?this.selection.clear():this.selection.hasKey(x)?this.selection.remove(x):this.selection.add(x)}},g.prototype.onShortcut=function(_){return this.state.onShortcut(_)},g.prototype.onWheel=function(_){return this.state.onMouseWheel(_)},g.prototype.onDragStart=function(_){this.state.onDragStart(_)},g.prototype.onDragEnd=function(_){this.state.onDragEnd(_)},g.prototype.onKeyDown=function(_){this.state.onKeyDown(_)},g.prototype.onKeyUp=function(_){this.state.onKeyUp(_)},g.prototype.showContextToolbox=function(_,x,w,D,C,I){this.contextToolboxHandler.showContextToolbox(_,x,w,D,C,I)},g.prototype.hideContextToolbox=function(_){this.contextToolboxHandler.hideContextToolbox(_)},g.prototype.canScrollPage=function(_){return this.startScrollingPageByCtrl?!!this.hasCtrlModifier(_.modifiers)&&(!this.copyDiagramItemsByCtrlAndShift||_.source.type!==S.MouseEventElementType.Shape&&_.source.type!==S.MouseEventElementType.Connector):this.allowScrollPage&&this.shouldScrollPage},g.prototype.canMultipleSelection=function(_){return this.allowMultipleSelection&&this.hasCtrlOrShiftModifier(_.modifiers)},g.prototype.canCopySelectedItems=function(_){return!!this.allowCopyDiagramItems&&(this.copyDiagramItemsByCtrlAndShift?this.hasCtrlAndShiftModifier(_.modifiers):this.hasAltModifier(_.modifiers))},g.prototype.canCalculateFixedPosition=function(_){return!(!this.allowFixedDrag||!this.hasShiftModifier(_.modifiers)||this.copyDiagramItemsByCtrlAndShift&&this.hasCtrlModifier(_.modifiers))},g.prototype.canStartZoomOnWheel=function(_){return this.allowZoomOnWheel&&this.hasCtrlModifier(_.modifiers)},g.prototype.canFinishZoomOnWheel=function(_){return this.allowZoomOnWheel&&!this.hasCtrlModifier(_.modifiers)},g.prototype.onStartScrollPageByKeyboard=function(_){this.canStartScrollingPageByKeyboard(_)&&(this.raiseDragScrollStart(),this.shouldScrollPage=!0)},g.prototype.onFinishScrollPageByKeyboard=function(_){this.canEndScrollingPageByKeyboard(_)&&this.finishScrollingPage()},g.prototype.onFinishScrollPageByMouse=function(_){this.canEndScrollingPage(_)&&this.finishScrollingPage()},g.prototype.finishScrollingPage=function(){this.shouldScrollPage=!1,this.raiseDragScrollEnd(),this.switchToDefaultState()},g.prototype.hasCtrlOrShiftModifier=function(_){return this.hasCtrlModifier(_)||this.hasShiftModifier(_)},g.prototype.hasCtrlAndShiftModifier=function(_){return this.hasCtrlModifier(_)&&this.hasShiftModifier(_)},g.prototype.hasCtrlModifier=function(_){return(_&a.ModifierKey.Ctrl)>0},g.prototype.hasAltModifier=function(_){return(_&a.ModifierKey.Alt)>0},g.prototype.hasShiftModifier=function(_){return(_&a.ModifierKey.Shift)>0},g.prototype.canStartScrollingPageByKeyboard=function(_){return!this.startScrollingPageByCtrl&&!this.shouldScrollPage&&_.keyCode===a.KeyCode.Space},g.prototype.canEndScrollingPageByKeyboard=function(_){return!this.startScrollingPageByCtrl&&_.keyCode===a.KeyCode.Space},g.prototype.canEndScrollingPage=function(_){return!this.startScrollingPageByCtrl||this.hasCtrlModifier(_.modifiers)},g.prototype.getSnappedPointOnDragDiagramItem=function(_,x,w,D,C){var I=this.getSnapToCellOnDragDiagramItem(_);return new T.Point(this.getSnappedPos(this.getFixedXPosition(_,x,w,C),!0,I),this.getSnappedPos(this.getFixedYPosition(_,x,D,C),!1,I))},g.prototype.getSnappedPointOnDragPoint=function(_,x,w){var D=this.getSnapToCellOnDragPoint(_),C=this.getSnappedPos(x.x,!0,D),I=this.getSnappedPos(x.y,!1,D);return void 0===w||Math.pow(x.x-C,2)+Math.pow(x.y-I,2)<Math.pow(x.x-w.x,2)+Math.pow(x.y-w.y,2)?new T.Point(C,I):w},g.prototype.getSnappedOffsetOnDragPoint=function(_,x){var w=this.getSnapToCellOnDragPoint(_);return new T.Point(this.getSnappedPos(_.modelPoint.x-x.x,!0,w),this.getSnappedPos(_.modelPoint.y-x.y,!1,w))},g.prototype.lockAspectRatioOnShapeResize=function(_){return this.hasShiftModifier(_.modifiers)},g.prototype.getSnappedPositionOnResizeShape=function(_,x,w){return this.getSnapToCellOnResizeShape(_)?y.ModelUtils.getSnappedPos(this.model,this.settings.gridSize,x,w):x},g.prototype.getSnappedPos=function(_,x,w){return w?y.ModelUtils.getSnappedPos(this.model,this.settings.gridSize,_,x):_},g.prototype.getFixedXPosition=function(_,x,w,D){return w?x.x:x.x+_.modelPoint.x-D.x},g.prototype.getFixedYPosition=function(_,x,w,D){return w?x.y:x.y+_.modelPoint.y-D.y},g.prototype.getSnapToCellOnDragDiagramItem=function(_){return this.allowSnapToCellOnDragDiagramItem&&this.settings.snapToGrid&&!this.hasCtrlModifier(_.modifiers)},g.prototype.getSnapToCellOnDragPoint=function(_){return this.allowSnapToCellOnDragPoint&&this.settings.snapToGrid&&!this.hasCtrlModifier(_.modifiers)},g.prototype.getSnapToCellOnResizeShape=function(_){return this.allowSnapToCellOnResizeShape&&this.settings.snapToGrid&&!this.hasCtrlModifier(_.modifiers)},g.prototype.tryUpdateModelSize=function(_){this.lockPermissions(),y.ModelUtils.tryUpdateModelRectangle(this.history,_),this.unlockPermissions()},g.prototype.canAddDiagramItemToSelection=function(_){return _.source.key&&(_.button===S.MouseButton.Left||_.button===S.MouseButton.Right)},g.prototype.addDiagramItemToSelection=function(_){this.pressedDiagramItemKey=_.source.key,this.pressedDiagramItemInSelection=this.selection.hasKey(this.pressedDiagramItemKey),this.canMultipleSelection(_)?this.selection.add(_.source.key):this.changeSingleSelection(_.source.key)},g.prototype.canRemoveDiagramItemToSelection=function(_){return this.pressedDiagramItemKey&&_.source.key&&this.pressedDiagramItemKey===_.source.key&&(_.button===S.MouseButton.Left||_.button===S.MouseButton.Right)},g.prototype.removeDiagramItemFromSelection=function(_,x){this.pressedDiagramItemInSelection&&this.selection.getKeys().length>1&&_===S.MouseButton.Left&&this.selection.remove(x)},g.prototype.changeSingleSelection=function(_){this.selection.hasKey(_)||this.selection.set([_])},g.prototype.notifySelectionChanged=function(_){this.pressedDiagramItemKey&&!this.selection.hasKey(this.pressedDiagramItemKey)&&(this.pressedDiagramItemKey=void 0,this.pressedDiagramItemInSelection=!1)},g.prototype.raiseDragStart=function(_){this.eventManager.onDocumentDragStart(_)},g.prototype.raiseDragEnd=function(_){this.eventManager.onDocumentDragEnd(_)},g.prototype.raiseDragScrollStart=function(){this.eventManager.onDocumentDragScrollStart()},g.prototype.raiseDragScrollEnd=function(){this.eventManager.onDocumentDragScrollEnd()},g.prototype.raiseClick=function(_){this.eventManager.onDocumentClick(_)},g.prototype.beginStorePermissions=function(){this.permissionsProvider.beginStorePermissions()},g.prototype.endStorePermissions=function(){this.permissionsProvider.endStorePermissions()},g.prototype.isStoredPermissionsGranted=function(){return this.permissionsProvider.isStoredPermissionsGranted()},g.prototype.lockPermissions=function(){this.permissionsProvider.lockPermissions()},g.prototype.unlockPermissions=function(){this.permissionsProvider.unlockPermissions()},g.prototype.canPerformChangeConnection=function(_,x){var w=!0;return _?w=this.permissionsProvider.canChangeConnection(_,x.item,x.oldItem,x.position,x.connectionPointIndex):x.item&&(w=this.permissionsProvider.canChangeConnection(void 0,x.item,x.oldItem,x.position,x.connectionPointIndex)),w},g.prototype.canPerformChangeConnectionOnUpdateUI=function(_,x){this.permissionsProvider.beginUpdateUI();var w=this.canPerformChangeConnection(_,x);return this.permissionsProvider.endUpdateUI(),w},g.prototype.canFinishTextEditing=function(){return this.eventManager.canFinishTextEditing()},g.prototype.restartState=function(){this.state&&!this.finishStateLock&&(this.finishStateLock++,this.state.finish(),this.finishStateLock--),this.state.start()},g.prototype.switchToDefaultState=function(){this.switchState(this.defaultState)},g.prototype.switchState=function(_){this.newState=_,this.state&&!this.finishStateLock&&(this.finishStateLock++,this.state.finish(),this.finishStateLock--),this.newState&&(this.state=this.newState,this.state.start(),this.newState=void 0)},g.prototype.addInteractingItem=function(_,x){this.permissionsProvider.addInteractingItem(_,x)},g.prototype.clearInteractingItems=function(){this.permissionsProvider.clearInteractingItems()},g.prototype.notifyReadOnlyChanged=function(_){this.readOnly=_,this.initializeDefaultState()},g.prototype.notifySelectionRectShow=function(_){},g.prototype.notifySelectionRectHide=function(){},g.prototype.notifyResizeInfoShow=function(_,x){},g.prototype.notifyResizeInfoHide=function(){},g.prototype.notifyConnectionPointsShow=function(_,x,w,D){this.state.onConnectionPointsShow(_,x)},g.prototype.notifyConnectionPointsHide=function(){},g.prototype.notifyConnectionTargetShow=function(_,x){this.state.onConnectionTargetShow(_,x)},g.prototype.notifyConnectionTargetHide=function(){},g.prototype.notifyContainerTargetShow=function(_,x){},g.prototype.notifyContainerTargetHide=function(){},g.prototype.notifyExtensionLinesShow=function(_){},g.prototype.notifyExtensionLinesHide=function(){},g}();P.MouseHandler=h},5627:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerCreateConnectorState=void 0;var T=b(7959),y=b(3477),d=b(9603),c=b(3742),s=b(7060),a=b(4297),u=b(4145),h=b(4867),g=b(8930),_=b(9143),x=function(w){function D(C,I,L,N,G,k,U){var B=w.call(this,C,I,L,N)||this;return B.shapeDescriptionManager=G,B.selection=k,B.connectionPointIndex=U,B}return S(D,w),D.prototype.onMouseDown=function(C){void 0===this.connectionPointIndex&&(this.connectionPointIndex=parseInt(C.source.value)),this.connectedItem=this.model.findItem(C.source.key),this.pointIndex=1,this.pointPosition=T.ConnectorPosition.End,w.prototype.onMouseDown.call(this,C)},D.prototype.onMouseUp=function(C){this.connector&&!this.connector.endItem&&this.createNewShapeAtConnectorEnd(C),w.prototype.onMouseUp.call(this,C)},D.prototype.onApplyChanges=function(C){var I=this.getSnappedPoint(C,C.modelPoint);if(this.connector)w.prototype.onApplyChanges.call(this,C);else{var L=new d.AddConnectorHistoryItem([this.connectedItem.getConnectionPointPosition(this.connectionPointIndex,I),I]);this.history.addAndRedo(L),this.connector=this.model.findConnector(L.connectorKey),this.handler.addInteractingItem(this.connector),this.history.addAndRedo(new y.AddConnectionHistoryItem(this.connector,this.connectedItem,this.connectionPointIndex,T.ConnectorPosition.Begin)),h.ModelUtils.updateNewConnectorProperties(this.history,this.selection,this.connector.key)}},D.prototype.checkStoredPermissionsOnFinish=function(){this.connector&&this.connector.endItem&&w.prototype.checkStoredPermissionsOnFinish.call(this)},D.prototype.onFinishWithChanges=function(){w.prototype.onFinishWithChanges.call(this),this.history.addAndRedo(new a.SetSelectionHistoryItem(this.selection,[this.connector.key]))},D.prototype.createNewShapeAtConnectorEnd=function(C){var I=this,L=this.connector&&this.connector.beginItem;if(L)if(!this.connector||this.handler.canPerformChangeConnection(this.connector,{position:T.ConnectorPosition.End,connectionPointIndex:-1})){var N=this.getNewShapeSide(this.connector),G=this.getSnappedPoint(C,C.modelPoint),k=this.shapeDescriptionManager.getCategoryByDescription(L.description);this.handler.showContextToolbox(G,function(U){var B=U.clone();B.position=G.clone();var K=I.getNewShapePosition(B,N);return I.handler.getSnappedPointOnDragPoint(C,K)},N,k,function(U){if(U){I.handler.beginStorePermissions(),I.history.beginTransaction();var B=new u.AddShapeHistoryItem(I.shapeDescriptionManager.get(U),G);I.history.addAndRedo(B);var K=I.model.findShape(B.shapeKey),J=I.targetItem&&I.model.findNearestContainer(I.targetItem.key);J&&h.ModelUtils.insertToContainer(I.history,I.model,K,J);var ie=I.getNewShapePosition(K,N);h.ModelUtils.setShapePosition(I.history,I.model,K,I.getSnappedPoint(C,ie)),h.ModelUtils.updateNewShapeProperties(I.history,I.selection,K.key),I.history.addAndRedo(new y.AddConnectionHistoryItem(I.connector,K,K.getConnectionPointIndexForSide(N),T.ConnectorPosition.End)),J&&h.ModelUtils.updateConnectorContainer(I.history,I.model,I.connector),h.ModelUtils.updateShapeAttachedConnectors(I.history,I.model,K),I.handler.isStoredPermissionsGranted()?(I.handler.tryUpdateModelSize(),I.history.addAndRedo(new a.SetSelectionHistoryItem(I.selection,[K.key]))):(I.handler.lockPermissions(),I.history.undoTransaction(),I.handler.unlockPermissions(),I.checkNewConnectorPermissions()),I.history.endTransaction(),I.handler.endStorePermissions(),I.handler.hideContextToolbox(!0)}},function(){I.checkNewConnectorPermissions()})}else this.cancelChanges()},D.prototype.checkNewConnectorPermissions=function(){this.connector&&!this.handler.canPerformChangeConnection(this.connector,{position:T.ConnectorPosition.End,connectionPointIndex:-1})&&(this.handler.lockPermissions(),this.history.beginTransaction(),this.history.addAndRedo(new a.SetSelectionHistoryItem(this.selection,[])),this.connector.beginItem&&this.history.addAndRedo(new g.DeleteConnectionHistoryItem(this.connector,T.ConnectorPosition.Begin)),this.connector.endItem&&this.history.addAndRedo(new g.DeleteConnectionHistoryItem(this.connector,T.ConnectorPosition.End)),this.history.addAndRedo(new _.DeleteConnectorHistoryItem(this.connector.key)),this.history.endTransaction(),this.handler.unlockPermissions())},D.prototype.getNewShapePosition=function(C,I){switch(I){case c.ConnectionPointSide.North:return C.position.clone().offset(-C.size.width/2,0);case c.ConnectionPointSide.South:return C.position.clone().offset(-C.size.width/2,-C.size.height);case c.ConnectionPointSide.East:return C.position.clone().offset(-C.size.width,-C.size.height/2);case c.ConnectionPointSide.West:return C.position.clone().offset(0,-C.size.height/2)}},D.prototype.getNewShapeSide=function(C){var I=C.getRenderPoints();return D.getNewShapeSideByConnectorPoints(I[I.length-1],I[I.length-2])},D.prototype.getSourceItem=function(){return this.connectedItem},D.getNewShapeSideByConnectorPoints=function(C,I){return C.x===I.x?C.y>I.y?c.ConnectionPointSide.North:c.ConnectionPointSide.South:C.x>I.x?C.y===I.y?c.ConnectionPointSide.West:C.y>I.y?Math.abs(C.x-I.x)>Math.abs(C.y-I.y)?c.ConnectionPointSide.West:c.ConnectionPointSide.North:Math.abs(C.x-I.x)>Math.abs(C.y-I.y)?c.ConnectionPointSide.West:c.ConnectionPointSide.South:C.y===I.y?c.ConnectionPointSide.East:C.y>I.y?Math.abs(C.x-I.x)>Math.abs(C.y-I.y)?c.ConnectionPointSide.East:c.ConnectionPointSide.North:Math.abs(C.x-I.x)>Math.abs(C.y-I.y)?c.ConnectionPointSide.East:c.ConnectionPointSide.South},D}(s.MouseHandlerMoveConnectorPointStateBase);P.MouseHandlerCreateConnectorState=x},7286:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDefaultReadOnlyState=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.canDragObjectOnMouseDown=function(c){return!1},d.prototype.canExpandContainerOnMouseDown=function(c){return!1},d.prototype.canClearSelectionOnMouseDown=function(){return!1},d.prototype.canSelectOnMouseUp=function(c){return!0},d.prototype.canClearSelectionOnMouseUp=function(){return!0},d.prototype.updateConnectionsOnMouseMove=function(c){},d}(b(8213).MouseHandlerDefaultStateBase);P.MouseHandlerDefaultReadOnlyState=T},8032:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDefaultReadOnlyTouchState=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.canDragObjectOnMouseDown=function(c){return!1},d.prototype.canExpandContainerOnMouseDown=function(c){return!1},d.prototype.canClearSelectionOnMouseDown=function(){return!0},d.prototype.canSelectOnMouseUp=function(c){return!this.inSelection(c)},d.prototype.canClearSelectionOnMouseUp=function(){return!1},d}(b(7286).MouseHandlerDefaultReadOnlyState);P.MouseHandlerDefaultReadOnlyTouchState=T},3250:function(o,P,b){var f,S=this&&this.__extends||(f=function(I,L){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,G){N.__proto__=G}||function(N,G){for(var k in G)G.hasOwnProperty(k)&&(N[k]=G[k])})(I,L)},function(I,L){function N(){this.constructor=I}f(I,L),I.prototype=null===L?Object.create(L):(N.prototype=L.prototype,new N)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDefaultState=void 0;var T=b(6031),y=b(4402),d=b(5609),c=b(481),s=b(4908),a=b(5627),u=b(5209),h=b(6918),g=b(5391),_=b(8213),x=b(9979),w=b(7959),D=b(5168),C=function(I){function L(){return null!==I&&I.apply(this,arguments)||this}return S(L,I),L.prototype.finish=function(){this.visualizerManager.resetConnectionPoints(),I.prototype.finish.call(this)},L.prototype.onMouseDownCore=function(N){this.handler.canScrollPage(N)?this.startScrolling(N):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ConnectorText?(this.handler.changeSingleSelection(N.source.key),this.handler.switchState(new g.MouseHandlerMoveConnectorTextState(this.handler,this.history,this.model))):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ShapeResizeBox?this.handler.switchState(new d.MouseHandlerResizeShapeState(this.handler,this.history,this.model,this.selection,this.visualizerManager,this.settings)):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ShapeParameterBox?this.handler.switchState(new s.MouseHandlerDragParameterPointState(this.handler,this.history,this.model)):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ConnectorPoint?this.handler.switchState(new y.MouseHandlerMoveConnectorPointState(this.handler,this.history,this.model,this.visualizerManager)):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ConnectorSide?this.handler.switchState(new c.MouseHandlerMoveConnectorSideState(this.handler,this.history,this.model)):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ConnectorOrthogonalSide?this.handler.switchState(new u.MouseHandlerMoveConnectorOrthogonalSideState(this.handler,this.history,this.model)):N.button===T.MouseButton.Left&&N.source.type===T.MouseEventElementType.ShapeConnectionPoint?this.handler.switchState(new a.MouseHandlerCreateConnectorState(this.handler,this.history,this.model,this.visualizerManager,this.shapeDescriptionManager,this.selection)):I.prototype.onMouseDownCore.call(this,N)},L.prototype.onDragDiagramItemOnMouseDown=function(N){this.handler.canAddDiagramItemToSelection(N)?N.source.type===T.MouseEventElementType.Shape?this.handler.switchState(new x.MouseHandlerMoveShapeState(this.handler,this.history,this.model,this.selection,this.visualizerManager)):N.source.type===T.MouseEventElementType.Connector&&this.handler.switchState(new D.MouseHandlerMoveConnectorState(this.handler,this.history,this.model,this.selection,this.visualizerManager)):I.prototype.onDragDiagramItemOnMouseDown.call(this,N)},L.prototype.onDragStart=function(N){this.handler.switchState(new h.MouseHandlerBeforeToolboxDraggingState(this.handler,this.history,this.model,this.selection,this.visualizerManager,this.shapeDescriptionManager)),this.handler.state.onDragStart(N)},L.prototype.onMouseMoveCore=function(N){this.updateConnectionsOnMouseMove(N),I.prototype.onMouseMoveCore.call(this,N)},L.prototype.onMouseUp=function(N){this.handler.canRemoveDiagramItemToSelection(N)?this.handler.removeDiagramItemFromSelection(N.button,N.source.key):I.prototype.onMouseUp.call(this,N)},L.prototype.updateConnectionsOnMouseMove=function(N){var G=this.model.findItem(N.source.key);this.visualizerManager.updateConnections(G,N.source.type,N.source.value)},L.prototype.canDragObjectOnMouseDown=function(N){return!0},L.prototype.canExpandContainerOnMouseDown=function(N){return!0},L.prototype.canClearSelectionOnMouseDown=function(){return!1},L.prototype.canSelectOnMouseUp=function(N){return!1},L.prototype.canClearSelectionOnMouseUp=function(){return!0},L.prototype.onConnectionPointsShow=function(N,G){var k=this,U=this.model.findShape(N);U&&G.forEach(function(B,K){B.allowed=k.handler.canPerformChangeConnectionOnUpdateUI(void 0,{item:U,position:w.ConnectorPosition.Begin,connectionPointIndex:K})})},L}(_.MouseHandlerDefaultStateBase);P.MouseHandlerDefaultState=C},8213:function(o,P,b){var f,S=this&&this.__extends||(f=function(_,x){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var C in D)D.hasOwnProperty(C)&&(w[C]=D[C])})(_,x)},function(_,x){function w(){this.constructor=_}f(_,x),_.prototype=null===x?Object.create(x):(w.prototype=x.prototype,new w)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDefaultStateBase=void 0;var T=b(5434),y=b(6031),d=b(5752),c=b(4869),s=b(7189),a=b(9582),u=b(9291),h=b(8461),g=function(_){function x(w,D,C,I,L,N,G,k){var U=_.call(this,w)||this;return U.history=D,U.selection=C,U.model=I,U.view=L,U.visualizerManager=N,U.shapeDescriptionManager=G,U.settings=k,U}return S(x,_),x.prototype.onKeyDown=function(w){this.handler.onStartScrollPageByKeyboard(w)},x.prototype.onKeyUp=function(w){this.handler.onFinishScrollPageByKeyboard(w)},x.prototype.onMouseDown=function(w){this.handler.canFinishTextEditing()&&(this.onMouseDownCore(w),this.handler.state!==this&&this.handler.state.onMouseDown(w))},x.prototype.onMouseDownCore=function(w){this.handler.canScrollPage(w)?this.startScrolling(w):this.hasDiagramItem(w)&&this.canDragObjectOnMouseDown(w.source.key)?this.onDragDiagramItemOnMouseDown(w):w.button===y.MouseButton.Left&&w.source.type===y.MouseEventElementType.ShapeExpandButton&&this.canExpandContainerOnMouseDown(w.source.key)?this.onShapeExpandBtnMouseDown(w):(!this.hasDiagramItem(w)&&this.canClearSelectionOnMouseDown()&&this.clearSelection(),this.startPoint=w.modelPoint)},x.prototype.onDragDiagramItemOnMouseDown=function(w){this.replaceSelection(w)},x.prototype.onMouseMove=function(w){this.onMouseMoveCore(w),this.handler.state!==this&&(this.handler.state.onMouseDown(this.handler.mouseDownEvent),this.handler.state.onMouseMove(w))},x.prototype.onMouseMoveCore=function(w){this.startPoint&&(Math.abs(this.startPoint.x-w.modelPoint.x)>x.startLimit||Math.abs(this.startPoint.y-w.modelPoint.y)>x.startLimit)&&(this.processOnMouseMoveAfterLimit(w),this.startPoint=void 0)},x.prototype.processOnMouseMoveAfterLimit=function(w){w.isTouchMode?w.touches.length>1?this.startZooming(w):this.startScrolling(w):this.startSelection(w)},x.prototype.onMouseUp=function(w){this.onMouseUpCore(w),this.handler.state!==this&&this.handler.state.onMouseUp(w)},x.prototype.onMouseUpCore=function(w){w.source.type===y.MouseEventElementType.Shape&&this.canSelectOnMouseUp(w.source.key)||w.source.type===y.MouseEventElementType.Connector&&this.canSelectOnMouseUp(w.source.key)||w.source.type===y.MouseEventElementType.ShapeExpandButton&&this.canSelectOnMouseUp(w.source.key)?this.replaceSelection(w):this.startPoint&&this.canClearSelectionOnMouseUp()&&this.clearSelection(),this.startPoint=void 0},x.prototype.onMouseWheel=function(w){return!!this.handler.canStartZoomOnWheel(w)&&(this.handler.switchState(new s.MouseHandlerZoomOnWheelState(this.handler,this.settings,this.view)),this.handler.state.onMouseWheel(w),!0)},x.prototype.onLongTouch=function(w){this.replaceMultipleSelection(w.source.key)},x.prototype.finish=function(){this.startPoint=void 0},x.prototype.startSelection=function(w){w.button===y.MouseButton.Left&&this.handler.switchState(new c.MouseHandlerSelectionState(this.handler,this.selection,this.visualizerManager))},x.prototype.startScrolling=function(w){w.button===y.MouseButton.Left&&(this.handler.raiseDragScrollStart(),this.handler.switchState(new a.MouseHandlerScrollingState(this.handler,this.view,this.selection)))},x.prototype.startZooming=function(w){this.handler.switchState(new h.MouseHandlerZoomOnPinchState(this.handler,this.selection,this.settings,this.view))},x.prototype.inSelection=function(w){return this.selection.hasKey(w)},x.prototype.hasDiagramItem=function(w){return w.source.type===y.MouseEventElementType.Shape||w.source.type===y.MouseEventElementType.Connector},x.prototype.onShapeExpandBtnMouseDown=function(w){this.handler.addDiagramItemToSelection(w),this.handler.switchState(new d.MouseHandlerToggleShapeExpandedState(this.handler,this.history,this.model,this.selection))},x.prototype.replaceSelection=function(w){this.handler.canMultipleSelection(w)?this.replaceMultipleSelection(w.source.key):this.handler.changeSingleSelection(w.source.key)},x.prototype.replaceMultipleSelection=function(w){this.selection.hasKey(w)?this.selection.remove(w):this.selection.add(w)},x.prototype.clearSelection=function(){this.selection.set([])},x.startLimit=u.UnitConverter.pixelsToTwips(1),x}(T.MouseHandlerStateBase);P.MouseHandlerDefaultStateBase=g},8502:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDefaultTouchState=void 0;var T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S(d,y),d.prototype.updateConnectionsOnMouseMove=function(c){},d.prototype.canDragObjectOnMouseDown=function(c){return this.inSelection(c)},d.prototype.canExpandContainerOnMouseDown=function(c){return!0},d.prototype.canClearSelectionOnMouseDown=function(){return!0},d.prototype.canSelectOnMouseUp=function(c){return!this.inSelection(c)},d.prototype.canClearSelectionOnMouseUp=function(){return!1},d}(b(3250).MouseHandlerDefaultState);P.MouseHandlerDefaultTouchState=T},1717:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDragDiagramItemStateBase=P.DraggingConnector=void 0;var T=b(4867),y=b(6879),d=b(6031),c=b(8816),s=b(4742);P.DraggingConnector=function(h){this.connector=h,this.startPoints=h.points.map(function(g){return g.clone()}),this.startRenderContext=h.tryCreateRenderPointsContext()};var u=function(h){function g(_,x,w,D,C){var I=h.call(this,_,x)||this;return I.model=w,I.selection=D,I.visualizerManager=C,I.startScrollLeft=0,I.startScrollTop=0,I}return S(g,h),g.prototype.finish=function(){this.visualizerManager.resetExtensionLines(),this.visualizerManager.resetContainerTarget(),this.visualizerManager.resetConnectionTarget(),this.visualizerManager.resetConnectionPoints(),h.prototype.finish.call(this)},g.prototype.onMouseDown=function(_){this.handler.addDiagramItemToSelection(_),this.shouldClone=this.handler.canCopySelectedItems(_),this.startPoint=_.modelPoint,this.initDrag(),this.lockInitDrag=!1,h.prototype.onMouseDown.call(this,_)},g.prototype.onMouseMove=function(_){if(this.mouseMoveEvent=_,_.button!==d.MouseButton.Left)return this.cancelChanges(),void this.handler.switchToDefaultState();this.canApplyChangesOnMouseMove(this.startPoint,_.modelPoint)&&(this.handler.canCopySelectedItems(_)&&(this.lockInitDrag||(this.cancelChanges(),this.shouldClone=!0,this.copySelection(),this.initDrag(),this.lockInitDrag=!0)),this.onApplyChanges(_),this.onAfterApplyChanges(),this.updateContainers(_))},g.prototype.updateContainers=function(_){this.visualizerManager.setExtensionLines(this.selection.getSelectedShapes(!1,!0));var x=T.ModelUtils.findContainerByEventKey(this.model,this.selection,_.source.key);x&&this.allowInsertToContainer(_,x)?this.visualizerManager.setContainerTarget(x,_.source.type):this.visualizerManager.resetContainerTarget()},g.prototype.onMouseUp=function(_){h.prototype.onMouseUp.call(this,_),this.handler.canRemoveDiagramItemToSelection(_)&&this.handler.canMultipleSelection(_)&&this.handler.removeDiagramItemFromSelection(_.button,_.source.key)},g.prototype.onApplyChanges=function(_){var x=this;this.calculateFixedPosition(_),this.dragHelper.move(this.shouldClone,function(D){return x.getSnappedPoint(_,D)},function(){x.visualizerManager.resetConnectionTarget(),x.visualizerManager.resetConnectionPoints()},function(D,C){x.visualizerManager.setConnectionTarget(D,d.MouseEventElementType.Shape),x.visualizerManager.setConnectionPoints(D,d.MouseEventElementType.Shape,C,!0)});var w=T.ModelUtils.findContainerByEventKey(this.model,this.selection,_.source.key);w&&this.allowInsertToContainer(_,w)?T.ModelUtils.insertSelectionToContainer(this.history,this.model,this.selection,w):T.ModelUtils.removeSelectionFromContainer(this.history,this.model,this.selection),this.handler.tryUpdateModelSize(function(D,C){return x.dragHelper.onTryUpdateModelSize(D,C)})},g.prototype.getDraggingElementKeys=function(){return this.dragHelper.draggingShapes.map(function(_){return _.shape.key}).concat(this.dragHelper.draggingConnectors.map(function(_){return _.connector.key}))},g.prototype.getSnappedPoint=function(_,x){return this.handler.getSnappedPointOnDragDiagramItem(_,x,this.fixedX,this.fixedY,this.startPoint)},g.prototype.initDrag=function(){this.dragHelper=new s.SelectionDragHelper(this.history,this.model,this.handler.permissionsProvider,this.startPoint,this.selection.getSelectedItems(!0)),this.initDraggingShapes(),this.areValidDraggingShapes?(this.initDraggingConnectors(),this.areValidDraggingConnectors||this.handler.switchToDefaultState()):this.handler.switchToDefaultState()},g.prototype.initDraggingShapes=function(){this.dragHelper.initDraggingShapes(this.selection.getSelectedShapes(!1,!0),this.shouldClone)},g.prototype.initDraggingConnectors=function(){this.dragHelper.initDraggingConnectors(this.selection.getSelectedConnectors(!1,!0),this.shouldClone)},g.prototype.copySelection=function(){var _=this;T.ModelUtils.cloneSelectionToOffset(this.history,this.model,function(x){var w=_.model.findItem(x);w&&_.handler.addInteractingItem(w,y.DiagramModelOperation.AddShape)},this.selection,0,0)},g.prototype.calculateFixedPosition=function(_){this.fixedX=!1,this.fixedY=!1,this.handler.canCalculateFixedPosition(_)&&(Math.abs(this.startPoint.x-_.modelPoint.x)<Math.abs(this.startPoint.y-_.modelPoint.y)?this.fixedX=!0:this.fixedY=!0)},g.prototype.allowInsertToContainer=function(_,x){return!this.handler.canMultipleSelection(_)&&x&&x.expanded&&T.ModelUtils.canInsertSelectionToContainer(this.model,this.selection,x)},g}(c.MouseHandlerDraggingState);P.MouseHandlerDragDiagramItemStateBase=u},4908:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDragParameterPointState=void 0;var T=b(8816),y=b(329),d=function(c){function s(a,u,h){var g=c.call(this,a,u)||this;return g.model=h,g.startScrollLeft=0,g.startScrollTop=0,g}return S(s,c),s.prototype.onMouseDown=function(a){this.startPoint=a.modelPoint,this.shape=this.model.findShape(a.source.key),this.parameterPointKey=a.source.value,this.startParameters=this.shape.parameters.clone(),c.prototype.onMouseDown.call(this,a)},s.prototype.onApplyChanges=function(a){var u=this.handler.getSnappedOffsetOnDragPoint(a,this.startPoint),h=this.startParameters.clone();this.shape.description.modifyParameters(this.shape,h,u.x,u.y),this.history.addAndRedo(new y.ChangeShapeParametersHistoryItem(this.shape.key,h))},s.prototype.getDraggingElementKeys=function(){return[this.shape.key]},s}(T.MouseHandlerDraggingState);P.MouseHandlerDragParameterPointState=d},8816:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerDraggingState=void 0;var T=b(5434),y=b(6031),d=b(9291),c=function(s){function a(u,h){var g=s.call(this,u)||this;return g.history=h,g}return S(a,s),a.prototype.canApplyChangesOnMouseMove=function(u,h){return!u||!h||Math.abs(u.x-h.x)>a.dragStartLimit||Math.abs(u.y-h.y)>a.dragStartLimit},a.prototype.onAfterApplyChanges=function(){this.modified||this.handler.raiseDragStart(this.getDraggingElementKeys()),this.modified=!0,this.mouseDownPoint=void 0},a.prototype.onMouseDown=function(u){this.mouseDownPoint=u.modelPoint.clone()},a.prototype.onMouseMove=function(u){this.mouseMoveEvent=u,u.button!==y.MouseButton.Left?(this.cancelChanges(),this.handler.switchToDefaultState()):u.button===y.MouseButton.Left&&this.canApplyChangesOnMouseMove(this.mouseDownPoint,u.modelPoint)&&(this.onApplyChanges(u),this.onAfterApplyChanges())},a.prototype.onKeyDown=function(u){!this.mouseMoveEvent||16!==u.keyCode&&17!==u.keyCode&&18!==u.keyCode||this.performMouseMoveEvent(u.modifiers)},a.prototype.onKeyUp=function(u){!this.mouseMoveEvent||16!==u.keyCode&&17!==u.keyCode&&18!==u.keyCode||this.performMouseMoveEvent(u.modifiers)},a.prototype.onMouseUp=function(u){this.mouseDownPoint=void 0,this.mouseMoveEvent=void 0,this.handler.switchToDefaultState()},a.prototype.performMouseMoveEvent=function(u){this.mouseMoveEvent.modifiers=u,this.onMouseMove(this.mouseMoveEvent)},a.prototype.start=function(){this.handler.beginStorePermissions(),this.history.beginTransaction()},a.prototype.finish=function(){this.checkStoredPermissionsOnFinish(),this.modified?(this.onFinishWithChanges(),this.modified=!1,this.history.endTransaction(),this.handler.raiseDragEnd(this.getDraggingElementKeys())):this.history.endTransaction(),this.handler.endStorePermissions(),this.handler.clearInteractingItems()},a.prototype.checkStoredPermissionsOnFinish=function(){this.handler.isStoredPermissionsGranted()||(this.cancelChanges(),this.modified=!1)},a.prototype.onFinishWithChanges=function(){},a.prototype.cancelChanges=function(){this.handler.lockPermissions(),this.history.undoTransaction(),this.handler.unlockPermissions(),this.modified&&this.handler.raiseDragEnd(this.getDraggingElementKeys()),this.modified=!1},a.prototype.getSnappedPoint=function(u,h){return this.handler.getSnappedPointOnDragPoint(u,h)},a.dragStartLimit=d.UnitConverter.pixelsToTwips(4),a}(T.MouseHandlerCancellableState);P.MouseHandlerDraggingState=c},5209:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveConnectorOrthogonalSideState=void 0;var T=b(8900),y=b(7959),d=b(3742),c=b(4867),s=b(8816),a=b(8675),u=function(h){function g(_,x,w){var D=h.call(this,_,x)||this;return D.model=w,D.canCreatePoints=!0,D}return S(g,h),g.prototype.saveSidePoints=function(_,x){var w=this,D=this.connector.getRenderPoints(!0);this.isHorizontal=D[_].y===D[x].y,this.iterateRenderPoints(D,_,!1,function(C,I){-1!==C.pointIndex&&(w.leftPointIndex=C.pointIndex),w.leftRenderPointIndex=I},function(C){return!a.GeometryUtils.arePointsOfOrthogonalLine(D[_],C,w.isHorizontal)}),this.iterateRenderPoints(D,this.leftRenderPointIndex,!0,function(C,I){-1!==C.pointIndex&&(w.rightPointIndex=C.pointIndex),w.rightRenderPointIndex=I},function(C){return!a.GeometryUtils.arePointsOfOrthogonalLine(D[_],C,w.isHorizontal)})},g.prototype.iterateRenderPoints=function(_,x,w,D,C){for(var I=x;w?I<_.length:I>=0;w?I++:I--){var L=_[I];if(C&&C(L,I))break;D(L,I)}},g.prototype.onMouseDown=function(_){this.startPoint=_.modelPoint,this.connector=this.model.findConnector(_.source.key),this.handler.addInteractingItem(this.connector);var x=_.source.value.split("_");this.saveSidePoints(parseInt(x[0]),parseInt(x[1])),h.prototype.onMouseDown.call(this,_)},g.prototype.shouldCreatePoint=function(_){if(!this.canCreatePoints)return!1;if(_&&(void 0===this.leftPointIndex||0===this.leftPointIndex)||!_&&(void 0===this.rightPointIndex||this.rightPointIndex===this.connector.points.length-1))return!0;var x=this.connector.getRenderPoints(!0);return!(!_||this.connector.points[this.leftPointIndex].equals(x[this.leftRenderPointIndex]))||!_&&!this.connector.points[this.rightPointIndex].equals(x[this.rightRenderPointIndex])},g.prototype.onApplyChanges=function(_){var x=this;if(this.shouldCreatePoint(!0)||this.shouldCreatePoint(!1)){var w=this.connector.getRenderPoints(!0),D=w[this.leftRenderPointIndex],C=w[this.rightRenderPointIndex];if(this.shouldCreatePoint(!0)){var I=new T.Point(D.x,D.y);0===this.leftPointIndex?(this.leftPointIndex=1,this.correctEdgePoint(I,C,this.connector.beginItem,this.connector.beginConnectionPointIndex)):void 0===this.leftPointIndex&&this.iterateRenderPoints(w,this.leftRenderPointIndex,!0,function(G){-1!==G.pointIndex&&(x.leftPointIndex=G.pointIndex)},function(){return void 0!==x.leftPointIndex}),c.ModelUtils.addConnectorPoint(this.history,this.connector.key,this.leftPointIndex,I),void 0!==this.rightPointIndex&&this.rightPointIndex++}if(this.shouldCreatePoint(!1)){w=this.connector.getRenderPoints(!0);var L=new T.Point(C.x,C.y);this.rightPointIndex===this.connector.points.length-1?(this.correctEdgePoint(L,D,this.connector.endItem,this.connector.endConnectionPointIndex),this.rightPointIndex--):void 0===this.rightPointIndex&&this.iterateRenderPoints(w,this.rightRenderPointIndex,!1,function(G){-1!==G.pointIndex&&(x.rightPointIndex=G.pointIndex)},function(){return x.rightPointIndex===x.leftPointIndex}),this.rightPointIndex++,c.ModelUtils.addConnectorPoint(this.history,this.connector.key,this.rightPointIndex,L)}}this.canCreatePoints=!1;var N=this.getSnappedPoint(_,_.modelPoint);c.ModelUtils.moveConnectorRightAnglePoints(this.history,this.connector,this.leftPointIndex,this.rightPointIndex,this.isHorizontal?void 0:N.x,this.isHorizontal?N.y:void 0),this.handler.tryUpdateModelSize()},g.prototype.onFinishWithChanges=function(){c.ModelUtils.deleteConnectorUnnecessaryPoints(this.history,this.connector),c.ModelUtils.fixConnectorBeginEndConnectionIndex(this.history,this.connector),this.handler.tryUpdateModelSize()},g.prototype.correctEdgePoint=function(_,x,w,D){var C=0;if(w){var I=w.getConnectionPointSideByIndex(D),L=w.rectangle;switch(C=y.Connector.minOffset,I){case d.ConnectionPointSide.South:C+=L.bottom-_.y;break;case d.ConnectionPointSide.North:C+=_.y-L.y;break;case d.ConnectionPointSide.East:C+=L.right-_.x;break;case d.ConnectionPointSide.West:C+=_.x-L.x}}this.isHorizontal?_.x>x.x?_.x-=Math.min(C,_.x-x.x):_.x+=Math.min(C,x.x-_.x):_.y>x.y?_.y-=Math.min(C,_.y-x.y):_.y+=Math.min(C,x.y-_.y)},g.prototype.getDraggingElementKeys=function(){return[this.connector.key]},g}(s.MouseHandlerDraggingState);P.MouseHandlerMoveConnectorOrthogonalSideState=u},4402:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveConnectorPointState=void 0;var T=b(8900),y=b(7060),d=b(7959),c=b(4867),s=b(4612),a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),h.prototype.onMouseDown=function(g){this.connector=this.model.findConnector(g.source.key),this.pointIndex=parseInt(g.source.value),0===this.pointIndex?this.pointPosition=d.ConnectorPosition.Begin:this.pointIndex===this.connector.points.length-1&&(this.pointPosition=d.ConnectorPosition.End),this.handler.addInteractingItem(this.connector),u.prototype.onMouseDown.call(this,g)},h.prototype.onApplyChanges=function(g){this.connector.properties.lineOption===s.ConnectorLineOption.Orthogonal&&0!==this.pointIndex&&this.pointIndex!==this.connector.points.length-1||u.prototype.onApplyChanges.call(this,g)},h.prototype.onFinishWithChanges=function(){u.prototype.onFinishWithChanges.call(this),c.ModelUtils.deleteConnectorUnnecessaryPoints(this.history,this.connector),this.handler.tryUpdateModelSize()},h.prototype.getSnappedPoint=function(g,_){var x=this.connector.points,w=this.pointIndex;if(0<w&&w<x.length-1){var C=_.x;return this.handler.getSnappedPointOnDragPoint(g,_,new T.Point(C,x[w+1].y-(x[w+1].y-x[w-1].y)/(x[w+1].x-x[w-1].x)*(x[w+1].x-C)))}return this.handler.getSnappedPointOnDragPoint(g,_)},h}(y.MouseHandlerMoveConnectorPointStateBase);P.MouseHandlerMoveConnectorPointState=a},7060:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveConnectorPointStateBase=void 0;var T=b(7959),y=b(6031),d=b(8816),c=b(8930),s=b(3477),a=b(4867),u=function(h){function g(_,x,w,D){var C=h.call(this,_,x)||this;return C.model=w,C.visualizerManager=D,C}return S(g,h),g.prototype.finish=function(){this.visualizerManager.resetConnectionTarget(),this.visualizerManager.resetConnectionPoints(),h.prototype.finish.call(this)},g.prototype.onMouseDown=function(_){h.prototype.onMouseDown.call(this,_),this.connector&&this.handler.addInteractingItem(this.connector)},g.prototype.onMouseMove=function(_){if(h.prototype.onMouseMove.call(this,_),this.allowAttachToObjects(_,!1,!1)){if(this.connector){var x=this.connector.getExtremeItem(this.pointPosition);this.visualizerManager.setConnectionTarget(x,_.source.type);var w=this.connector.getExtremeConnectionPointIndex(this.pointPosition);(x||-1===this.oppositeConnectionPointIndex)&&this.allowAttachToObjects(_,!0,!1)||(x=this.model.findItem(_.source.key)),this.visualizerManager.setConnectionPoints(x,_.source.type,w,!0)}}else this.visualizerManager.resetConnectionTarget(),this.visualizerManager.resetConnectionPoints()},g.prototype.onApplyChanges=function(_){var x=this.getSnappedPoint(_,_.modelPoint);if(void 0!==this.pointPosition){void 0===this.oppositePointPosition&&(this.oppositePointPosition=this.getOppositePointPosition(),this.oppositeItem=this.connector.getExtremeItem(this.oppositePointPosition),this.oppositeConnectionPointIndex=this.connector.getExtremeConnectionPointIndex(this.oppositePointPosition)),this.targetItem=this.model.findItem(_.source.key);var w=this.allowAttachToObjects(_,!0,!0)?this.targetItem:void 0,D=-1;_.source.type===y.MouseEventElementType.ShapeConnectionPoint&&(D=parseInt(_.source.value)),!w||_.source.type!==y.MouseEventElementType.Shape&&_.source.type!==y.MouseEventElementType.ShapeConnectionPoint||this.connector.getExtremeItem(this.oppositePointPosition)===w&&(-1===D||-1===this.oppositeConnectionPointIndex||D===this.oppositeConnectionPointIndex)?this.connector.getExtremeItem(this.pointPosition)&&(this.history.addAndRedo(new c.DeleteConnectionHistoryItem(this.connector,this.pointPosition)),this.oppositeItem&&this.updateOppositeItemConnectionPointIndex(this.oppositeConnectionPointIndex)):(this.connector.getExtremeItem(this.pointPosition)===w&&this.connector.getExtremeConnectionPointIndex(this.pointPosition)===D||(this.connector.getExtremeItem(this.pointPosition)&&this.history.addAndRedo(new c.DeleteConnectionHistoryItem(this.connector,this.pointPosition)),this.history.addAndRedo(new s.AddConnectionHistoryItem(this.connector,w,D,this.pointPosition)),this.oppositeItem&&this.updateOppositeItemConnectionPointIndex(D)),x=w.getConnectionPointPosition(D,this.connector.points[this.pointIndex+(this.pointPosition===T.ConnectorPosition.End?-1:1)]),this.visualizerManager.setConnectionPointIndex(D))}a.ModelUtils.moveConnectorPoint(this.history,this.connector,this.pointIndex,x),a.ModelUtils.updateConnectorAttachedPoints(this.history,this.model,this.connector),this.handler.tryUpdateModelSize()},g.prototype.updateOppositeItemConnectionPointIndex=function(_){var x=-1===_?-1:this.oppositeConnectionPointIndex;x!==this.connector.getExtremeConnectionPointIndex(this.oppositePointPosition)&&(this.history.addAndRedo(new c.DeleteConnectionHistoryItem(this.connector,this.oppositePointPosition)),this.history.addAndRedo(new s.AddConnectionHistoryItem(this.connector,this.oppositeItem,x,this.oppositePointPosition)))},g.prototype.onFinishWithChanges=function(){a.ModelUtils.updateConnectorContainer(this.history,this.model,this.connector),a.ModelUtils.deleteConnectorUnnecessaryPoints(this.history,this.connector),this.handler.tryUpdateModelSize()},g.prototype.getDraggingElementKeys=function(){return this.connector?[this.connector.key]:[]},g.prototype.getOppositePointPosition=function(){return this.pointPosition===T.ConnectorPosition.Begin?T.ConnectorPosition.End:T.ConnectorPosition.Begin},g.prototype.allowAttachToObjects=function(_,x,w){if(this.handler.canMultipleSelection(_))return!1;var D=this.connector;if(D&&_.source.type===y.MouseEventElementType.Shape){var C=this.model.findItem(_.source.key);if(x&&this.model.findItemContainerCore(D,function(I){return I===C})||x&&this.oppositeItem&&this.model.findItemContainerCore(this.oppositeItem,function(I){return I===C})||w&&this.oppositeItem===C&&-1===this.oppositeConnectionPointIndex)return!1}return!0},g.prototype.onConnectionPointsShow=function(_,x){var w=this;if(this.connector&&void 0!==this.pointPosition&&(this.connector.endItem&&this.connector.endItem.key===_||this.connector.beginItem&&this.connector.beginItem.key===_)){var D=this.connector.beginItem&&this.connector.beginItem.key===_?T.ConnectorPosition.Begin:T.ConnectorPosition.End;x.forEach(function(C,I){C.allowed=w.handler.canPerformChangeConnectionOnUpdateUI(w.connector,{item:w.connector.getExtremeItem(D),position:D,connectionPointIndex:I})})}},g.prototype.onConnectionTargetShow=function(_,x){if(this.connector&&void 0!==this.pointPosition&&(this.connector.endItem&&this.connector.endItem.key===_||this.connector.beginItem&&this.connector.beginItem.key===_)){var w=this.connector.beginItem&&this.connector.beginItem.key===_?T.ConnectorPosition.Begin:T.ConnectorPosition.End;x.allowed=this.handler.canPerformChangeConnectionOnUpdateUI(this.connector,{item:this.connector.getExtremeItem(w),position:w,connectionPointIndex:-1})}},g}(d.MouseHandlerDraggingState);P.MouseHandlerMoveConnectorPointStateBase=u},481:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveConnectorSideState=void 0;var T=b(8816),y=b(4867),d=function(c){function s(a,u,h){var g=c.call(this,a,u)||this;return g.model=h,g}return S(s,c),s.prototype.onMouseDown=function(a){this.startPoint=a.modelPoint,this.connectorKey=a.source.key,this.pointIndex=parseInt(a.source.value)+1,c.prototype.onMouseDown.call(this,a)},s.prototype.onApplyChanges=function(a){var u=this.getSnappedPoint(a,a.modelPoint),h=this.model.findConnector(this.connectorKey);this.pointCreated?y.ModelUtils.moveConnectorPoint(this.history,h,this.pointIndex,u):(this.handler.addInteractingItem(h),y.ModelUtils.addConnectorPoint(this.history,this.connectorKey,this.pointIndex,u.clone()),this.pointCreated=!0),this.handler.tryUpdateModelSize()},s.prototype.onFinishWithChanges=function(){var a=this.model.findConnector(this.connectorKey);y.ModelUtils.deleteConnectorUnnecessaryPoints(this.history,a),y.ModelUtils.fixConnectorBeginEndConnectionIndex(this.history,a),this.handler.tryUpdateModelSize()},s.prototype.getDraggingElementKeys=function(){return[this.connectorKey]},s}(T.MouseHandlerDraggingState);P.MouseHandlerMoveConnectorSideState=d},5168:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveConnectorState=void 0;var T=b(4867),y=function(d){function c(s,a,u,h,g){var _=d.call(this,s,a,u,h,g)||this;return _.model=u,_.selection=h,_.visualizerManager=g,_}return S(c,d),Object.defineProperty(c.prototype,"areValidDraggingShapes",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"areValidDraggingConnectors",{get:function(){var s=this;return this.shouldClone?this.dragHelper.draggingShapes.length>0||this.dragHelper.draggingConnectors.length>0:!!this.dragHelper.draggingConnectors.length&&(this.dragHelper.draggingShapes.length?T.ModelUtils.canMoveConnector(this.dragHelper.selectedItems,this.dragHelper.draggingConnectors[this.dragHelper.draggingConnectorsIndexByKey[this.handler.mouseDownEvent.source.key]].connector):!this.dragHelper.draggingConnectors.some(function(a){return!T.ModelUtils.canMoveConnector(s.dragHelper.selectedItems,a.connector)}))},enumerable:!1,configurable:!0}),c}(b(1717).MouseHandlerDragDiagramItemStateBase);P.MouseHandlerMoveConnectorState=y},5391:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveConnectorTextState=void 0;var T=b(8816),y=b(45),d=b(5144),c=function(s){function a(u,h,g){var _=s.call(this,u,h)||this;return _.model=g,_}return S(a,s),a.prototype.onMouseDown=function(u){this.connector=this.model.findConnector(u.source.key),this.position=parseFloat(u.source.value),this.text=this.connector.getText(this.position),this.savedText="",s.prototype.onMouseDown.call(this,u)},a.prototype.onApplyChanges=function(u){var h=this.connector.getTextPositionByPoint(u.modelPoint);if(h!==this.position){var g=this.connector.getText(h);""!==g&&g!==this.text&&(this.history.addAndRedo(new d.ChangeConnectorTextHistoryItem(this.connector,h,"")),this.savedText=g),this.history.addAndRedo(new y.ChangeConnectorTextPositionHistoryItem(this.connector,this.position,h)),""!==this.savedText&&this.savedText!==g&&(this.history.addAndRedo(new d.ChangeConnectorTextHistoryItem(this.connector,this.position,this.savedText)),this.savedText=""),this.position=h}},a.prototype.getDraggingElementKeys=function(){return[this.connector.key]},a}(T.MouseHandlerDraggingState);P.MouseHandlerMoveConnectorTextState=c},9979:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerMoveShapeState=void 0;var T=function(y){function d(c,s,a,u,h){var g=y.call(this,c,s,a,u,h)||this;return g.model=a,g.selection=u,g.visualizerManager=h,g}return S(d,y),Object.defineProperty(d.prototype,"areValidDraggingShapes",{get:function(){return this.shouldClone||this.dragHelper.draggingShapes.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"areValidDraggingConnectors",{get:function(){return!0},enumerable:!1,configurable:!0}),d}(b(1717).MouseHandlerDragDiagramItemStateBase);P.MouseHandlerMoveShapeState=T},5609:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerResizeShapeState=void 0;var T=b(6353),y=b(8900),d=b(6031),c=b(8816),s=b(4867),a=b(6794),u=b(6879),h=function(g){function _(x,w,D,C,I,L){var N=g.call(this,x,w)||this;return N.model=D,N.selection=C,N.visualizerManager=I,N.settings=L,N.startScrollLeft=0,N.startScrollTop=0,N.rotation=0,N}return S(_,g),_.prototype.finish=function(){this.visualizerManager.resetResizeInfo(),this.visualizerManager.resetExtensionLines(),g.prototype.finish.call(this)},_.prototype.onMouseDown=function(x){var w=this,D=parseInt(x.source.value);this.resizeEventSource=D,this.startPoint=x.modelPoint,this.lockH=D===d.ResizeEventSource.ResizeBox_S||D===d.ResizeEventSource.ResizeBox_N,this.lockV=D===d.ResizeEventSource.ResizeBox_E||D===d.ResizeEventSource.ResizeBox_W,this.sideH=D===d.ResizeEventSource.ResizeBox_E||D===d.ResizeEventSource.ResizeBox_NE||D===d.ResizeEventSource.ResizeBox_SE,this.sideV=D===d.ResizeEventSource.ResizeBox_SE||D===d.ResizeEventSource.ResizeBox_S||D===d.ResizeEventSource.ResizeBox_SW,this.shapes=this.selection.getSelectedShapes(),0!==this.shapes.length?(this.shapes.forEach(function(C){w.handler.addInteractingItem(C,u.DiagramModelOperation.ResizeShape),w.handler.addInteractingItem(C,u.DiagramModelOperation.MoveShape)}),this.connectors=this.selection.getSelectedConnectors(),this.startRectangle=s.ModelUtils.createRectangle(this.shapes),this.startShapeSizes=this.shapes.map(function(C){return C.size.clone()}),this.startShapePositions=this.shapes.map(function(C){return C.position.clone()}),this.startConnectorPoints=this.connectors.map(function(C){return C.points.map(function(I){return I.clone()})}),g.prototype.onMouseDown.call(this,x)):this.handler.switchToDefaultState()},_.prototype.onMouseMove=function(x){g.prototype.onMouseMove.call(this,x);var w=this.selection.getSelectedShapes();this.visualizerManager.setExtensionLines(w)},_.prototype.onApplyChanges=function(x){var w=this,D=s.ModelUtils.createRectangle(this.shapes),C=1===this.shapes.length?this.shapes[0].getMinWidth(this.settings.shapeMinWidth):a.ShapeMinDimension,I=1===this.shapes.length?this.shapes[0].getMinHeight(this.settings.shapeMinHeight):a.ShapeMinDimension,L=1===this.shapes.length?this.shapes[0].getMaxWidth(this.settings.shapeMaxWidth):void 0,N=1===this.shapes.length?this.shapes[0].getMaxHeight(this.settings.shapeMaxHeight):void 0,G=this.getSize(x,D.createPosition(),this.startRectangle.createSize(),C,I,L,N,this.handler.lockAspectRatioOnShapeResize(x)),k=this.getPosition(x,G,this.startRectangle.createSize(),this.startRectangle.createPosition()),U=G.width/this.startRectangle.width,B=G.height/this.startRectangle.height;this.shapes.forEach(function(K,J){var ie=w.startShapeSizes[J].width*(K.allowResizeHorizontally?U:1);ie=w.getNormalizedSize(ie,K.getMinWidth(w.settings.shapeMinWidth),K.getMaxWidth(w.settings.shapeMaxWidth));var re=w.startShapeSizes[J].height*(K.allowResizeVertically?B:1);re=w.getNormalizedSize(re,K.getMinHeight(w.settings.shapeMinHeight),K.getMaxHeight(w.settings.shapeMaxHeight)),s.ModelUtils.setShapeSize(w.history,w.model,K,new y.Point(K.allowResizeHorizontally?k.x+(w.startShapePositions[J].x-w.startRectangle.x)*U:w.startShapePositions[J].x,K.allowResizeVertically?k.y+(w.startShapePositions[J].y-w.startRectangle.y)*B:w.startShapePositions[J].y),new T.Size(ie,re))}),this.connectors.forEach(function(K,J){for(var re=K.endItem?K.points.length-2:K.points.length-1,q=K.beginItem?1:0;q<=re;q++){var Y=new y.Point(k.x+(w.startConnectorPoints[J][q].x-w.startRectangle.x)*U,k.y+(w.startConnectorPoints[J][q].y-w.startRectangle.y)*B);s.ModelUtils.moveConnectorPoint(w.history,K,q,Y)}}),this.selection.getSelectedShapes(!1,!0).forEach(function(K){s.ModelUtils.updateShapeAttachedConnectors(w.history,w.model,K)}),this.tryUpdateModelSize(),this.visualizerManager.setResizeInfo(this.shapes)},_.prototype.tryUpdateModelSize=function(){var x=this;this.handler.tryUpdateModelSize(function(w,D){x.startShapePositions.forEach(function(C){C.x+=w,C.y+=D}),x.startConnectorPoints.forEach(function(C){C.forEach(function(I){I.x+=w,I.y+=D})}),x.startRectangle.x+=w,x.startRectangle.y+=D,x.startPoint.x+=w,x.startPoint.y+=D})},_.prototype.getDraggingElementKeys=function(){return this.shapes.map(function(x){return x.key})},_.prototype.getNormalizedSize=function(x,w,D){return void 0!==w&&(x=Math.max(x,w)),void 0!==D&&(x=Math.min(x,D)),x},_.prototype.getSize=function(x,w,D,C,I,L,N,G){var k,U,B=x.modelPoint.x-(this.startScrollLeft-x.scrollX)-this.startPoint.x,K=x.modelPoint.y-(this.startScrollTop-x.scrollY)-this.startPoint.y,J=B*Math.cos(this.rotation)- -K*Math.sin(this.rotation),ie=-(B*Math.sin(this.rotation)+-K*Math.cos(this.rotation));return ie=!this.sideV&&ie>0?Math.min(D.height+1,ie):ie,J=!this.sideH&&J>0?Math.min(D.width+1,J):J,this.lockH||this.lockV||!G?(J=this.lockH?0:J,ie=this.lockV?0:ie,k=this.getNormalizedSize(this.sideH?D.width+J:D.width-J,C,L),U=this.getNormalizedSize(this.sideV?D.height+ie:D.height-ie,I,N)):Math.abs(J)>Math.abs(ie)?(k=this.getNormalizedSize(this.sideH?D.width+J:D.width-J,C,L),U=D.height*(k/D.width)):(U=this.getNormalizedSize(this.sideV?D.height+ie:D.height-ie,I,N),k=D.width*(U/D.height)),this.lockH||(k=this.getSnappedPosition(x,w.x+k,!0)-w.x),this.lockV||(U=this.getSnappedPosition(x,w.y+U,!1)-w.y),new T.Size(k,U)},_.prototype.getPosition=function(x,w,D,C){var I=C.x,L=C.y;if(this.resizeEventSource===d.ResizeEventSource.ResizeBox_N||this.resizeEventSource===d.ResizeEventSource.ResizeBox_NE||this.resizeEventSource===d.ResizeEventSource.ResizeBox_NW){var N=this.getSnappedPosition(x,L+=D.height-w.height,!1);w.height+=L-N,L=N}if(this.resizeEventSource===d.ResizeEventSource.ResizeBox_W||this.resizeEventSource===d.ResizeEventSource.ResizeBox_NW||this.resizeEventSource===d.ResizeEventSource.ResizeBox_SW){var G=this.getSnappedPosition(x,I+=D.width-w.width,!0);w.width+=I-G,I=G}return new y.Point(I,L)},_.prototype.getSnappedPosition=function(x,w,D){return this.handler.getSnappedPositionOnResizeShape(x,w,D)},_}(c.MouseHandlerDraggingState);P.MouseHandlerResizeShapeState=h},9582:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerScrollingState=void 0;var T=b(5434),y=b(6031),d=b(8900),c=function(s){function a(u,h,g){var _=s.call(this,u)||this;return _.view=h,_.selection=g,_.lastOffset=new d.Point(0,0),_}return S(a,s),a.prototype.onKeyUp=function(u){this.handler.onFinishScrollPageByKeyboard(u)},a.prototype.onMouseDown=function(u){u.preventDefault=!0,this.startPoint=this.getPointByEvent(u)},a.prototype.onMouseMove=function(u){if(u.button===y.MouseButton.Left){var h=this.currentPoint||this.startPoint;u.preventDefault=!0;var g=this.getPointByEvent(u),_=this.view.scrollBy(new d.Point(g.x-h.x,g.y-h.y));this.lastOffset=this.lastOffset.clone().offset(_.x,_.y),this.currentPoint=g}else this.handler.onFinishScrollPageByMouse(u)},a.prototype.onMouseUp=function(u){u.button===y.MouseButton.Left&&this.handler.onFinishScrollPageByMouse(u),this.handler.switchToDefaultState()},a.prototype.cancelChanges=function(){this.currentPoint&&this.view.scrollBy(this.lastOffset.clone().multiply(-1,-1))},a.prototype.finish=function(){this.currentPoint&&this.startPoint&&!this.currentPoint.equals(this.startPoint)||this.selection.set([]),s.prototype.finish.call(this)},a.prototype.getPointByEvent=function(u){return u.offsetPoint},a}(T.MouseHandlerCancellableState);P.MouseHandlerScrollingState=c},4869:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerSelectionState=void 0;var T=b(6031),y=b(8011),d=function(c){function s(a,u,h){var g=c.call(this,a)||this;return g.selection=u,g.visualizerManager=h,g}return S(s,c),s.prototype.finish=function(){this.handler.raiseDragEnd([]),this.visualizerManager.resetSelectionRectangle(),c.prototype.finish.call(this)},s.prototype.cancelChanges=function(){},s.prototype.onMouseDown=function(a){this.startPoint=a.modelPoint,this.handler.raiseDragStart([])},s.prototype.onMouseMove=function(a){a.button!==T.MouseButton.Left?this.handler.switchToDefaultState():(this.rectangle=y.Rectangle.fromPoints(this.startPoint,a.modelPoint),this.visualizerManager.setSelectionRectangle(this.rectangle))},s.prototype.onMouseUp=function(a){void 0!==this.rectangle?this.selection.selectRect(this.rectangle):this.selection.set([]),this.rectangle=void 0,this.handler.switchToDefaultState()},s}(b(5434).MouseHandlerCancellableState);P.MouseHandlerSelectionState=d},5434:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerCancellableState=P.MouseHandlerStateBase=void 0;var T=b(2153),y=function(){function c(s){this.handler=s}return c.prototype.start=function(){},c.prototype.finish=function(){},c.prototype.onMouseClick=function(s){},c.prototype.onMouseDblClick=function(s){this.handler.switchToDefaultState()},c.prototype.onMouseDown=function(s){},c.prototype.onMouseUp=function(s){},c.prototype.onMouseMove=function(s){},c.prototype.onMouseWheel=function(s){return!1},c.prototype.onDragStart=function(s){},c.prototype.onDragEnd=function(s){},c.prototype.onShortcut=function(s){return!1},c.prototype.onKeyDown=function(s){},c.prototype.onKeyUp=function(s){},c.prototype.onConnectionPointsShow=function(s,a){},c.prototype.onConnectionTargetShow=function(s,a){},c}();P.MouseHandlerStateBase=y;var d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.onShortcut=function(a){return a===T.KeyCode.Esc&&(this.cancelChanges(),this.handler.switchToDefaultState(),!0)},s}(y);P.MouseHandlerCancellableState=d},5752:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerToggleShapeExpandedState=void 0;var T=b(5434),y=b(442),d=b(4867),c=function(s){function a(u,h,g,_){var x=s.call(this,u)||this;return x.history=h,x.model=g,x.selection=_,x}return S(a,s),a.prototype.onMouseUp=function(u){var h=this.model.findShape(u.source.key);h&&!h.isLocked&&(this.history.beginTransaction(),this.history.addAndRedo(new y.ToggleShapeExpandedHistoryItem(h)),d.ModelUtils.updateShapeAttachedConnectors(this.history,this.model,h),d.ModelUtils.updateContainerConnectorsAttachedPoints(this.history,this.model,h),d.ModelUtils.updateSelection(this.history,this.selection),this.handler.tryUpdateModelSize(),this.history.endTransaction(),this.handler.raiseClick([h.key])),this.handler.switchToDefaultState()},a}(T.MouseHandlerStateBase);P.MouseHandlerToggleShapeExpandedState=c},6918:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerToolboxDraggingState=P.MouseHandlerBeforeToolboxDraggingState=void 0;var T=b(6031),y=b(8900),d=b(4145),c=b(4297),s=b(8816),a=b(1704),u=b(4867),h=b(5434),g=b(6879),_=function(w){function D(C,I,L,N,G,k){var U=w.call(this,C)||this;return U.history=I,U.model=L,U.selection=N,U.visualizerManager=G,U.shapeDescriptionManager=k,U.isModelEmpty=0===L.items.length,U}return S(D,w),D.prototype.cancelChanges=function(){this.tryRemoveTimer()},D.prototype.onDragStart=function(C){this.dragging=C},D.prototype.onDragEnd=function(C){this.cancelChanges(),this.handler.switchToDefaultState()},D.prototype.onMouseMove=function(C){var I=this;C.source.type>T.MouseEventElementType.Background?(this.tryRemoveTimer(),this.switchToDraggingState(C,!1)):C.source.type!==T.MouseEventElementType.Background||this.isModelEmpty?void 0!==this.nonPageAreaTimer&&this.tryRemoveTimer():(this.savedEvt=C,void 0===this.nonPageAreaTimer&&(this.nonPageAreaTimer=setTimeout(function(){return I.switchToDraggingState(I.savedEvt,!0)},500)))},D.prototype.switchToDraggingState=function(C,I){this.handler.switchState(new x(this.handler,this.history,this.model,this.selection,this.visualizerManager,this.shapeDescriptionManager,I)),this.handler.state.onDragStart(this.dragging),this.handler.state.onMouseMove(C)},D.prototype.tryRemoveTimer=function(){void 0!==this.nonPageAreaTimer&&(clearTimeout(this.nonPageAreaTimer),delete this.nonPageAreaTimer)},D.prototype.finish=function(){this.tryRemoveTimer()},D}(h.MouseHandlerCancellableState);P.MouseHandlerBeforeToolboxDraggingState=_;var x=function(w){function D(C,I,L,N,G,k,U){var B=w.call(this,C,I)||this;return B.model=L,B.selection=N,B.visualizerManager=G,B.shapeDescriptionManager=k,U||(B.updatePageSizeTimer=setTimeout(function(){B.processAndRemoveUpdatePageSizeTimer()},300)),B}return S(D,w),D.prototype.cancelChanges=function(){this.tryRemoveUpdatePageSizeTimer(),w.prototype.cancelChanges.call(this)},D.prototype.tryRemoveUpdatePageSizeTimer=function(){void 0!==this.updatePageSizeTimer&&(clearTimeout(this.updatePageSizeTimer),delete this.updatePageSizeTimer)},D.prototype.processAndRemoveUpdatePageSizeTimer=function(){void 0!==this.updatePageSizeTimer&&(this.handler.tryUpdateModelSize(),delete this.updatePageSizeTimer)},D.prototype.onMouseMove=function(C){w.prototype.onMouseMove.call(this,C);var I=this.model.findShape(this.shapeKey);if(I){this.visualizerManager.setExtensionLines([I]);var L=u.ModelUtils.findContainerByEventKey(this.model,this.selection,C.source.key);L&&this.allowInsertToContainer(C,I,L)?this.visualizerManager.setContainerTarget(L,C.source.type):this.visualizerManager.resetContainerTarget()}},D.prototype.getDraggingElementKeys=function(){return void 0===this.shapeKey?[]:[this.shapeKey]},D.prototype.onApplyChanges=function(C){var I=this;if(C.source.type===T.MouseEventElementType.Undefined){if(this.dragging.onCaptured(!1),void 0!==this.shapeKey&&!this.deleteHistoryItem){var L=this.model.findShape(this.shapeKey);u.ModelUtils.detachConnectors(this.history,L),u.ModelUtils.removeFromContainer(this.history,this.model,L),this.deleteHistoryItem=new a.DeleteShapeHistoryItem(this.shapeKey,!0),this.history.addAndRedo(this.deleteHistoryItem)}}else{if(this.dragging.onCaptured(!0),void 0===this.shapeKey){this.startPoint=C.modelPoint,this.shapeKey=this.insertToolboxItem(C);var N=this.model.findShape(this.shapeKey);N&&this.handler.addInteractingItem(N,g.DiagramModelOperation.AddShape)}this.deleteHistoryItem&&(this.history.undoTransactionTo(this.deleteHistoryItem),delete this.deleteHistoryItem);var G=this.getPosition(C,this.startShapePosition);L=this.model.findShape(this.shapeKey),u.ModelUtils.setShapePosition(this.history,this.model,L,G),u.ModelUtils.updateMovingShapeConnections(this.history,L,this.connectorsWithoutBeginItemInfo,this.connectorsWithoutEndItemInfo,function(){I.visualizerManager.resetConnectionTarget(),I.visualizerManager.resetConnectionPoints()},function(U,B){I.visualizerManager.setConnectionTarget(U,T.MouseEventElementType.Shape),I.visualizerManager.setConnectionPoints(U,T.MouseEventElementType.Shape,B,!0)},function(U){return I.handler.addInteractingItem(U)}),u.ModelUtils.updateShapeAttachedConnectors(this.history,this.model,L);var k=u.ModelUtils.findContainerByEventKey(this.model,this.selection,C.source.key);L&&k&&this.allowInsertToContainer(C,L,k)?u.ModelUtils.insertToContainer(this.history,this.model,L,k):u.ModelUtils.removeFromContainer(this.history,this.model,L),void 0===this.updatePageSizeTimer&&this.handler.tryUpdateModelSize(function(U,B){I.connectorsWithoutBeginItemInfo.forEach(function(K){K.point.x+=U,K.point.y+=B}),I.connectorsWithoutEndItemInfo.forEach(function(K){K.point.x+=U,K.point.y+=B})})}},D.prototype.onFinishWithChanges=function(){this.deleteHistoryItem||this.history.addAndRedo(new c.SetSelectionHistoryItem(this.selection,[this.shapeKey]))},D.prototype.onDragStart=function(C){this.dragging=C,this.connectorsWithoutBeginItemInfo=u.ModelUtils.getConnectorsWithoutBeginItemInfo(this.model),this.connectorsWithoutEndItemInfo=u.ModelUtils.getConnectorsWithoutEndItemInfo(this.model)},D.prototype.onDragEnd=function(C){void 0!==this.shapeKey&&C.source.type===T.MouseEventElementType.Undefined&&this.cancelChanges(),this.handler.switchToDefaultState()},D.prototype.finish=function(){this.visualizerManager.resetExtensionLines(),this.visualizerManager.resetContainerTarget(),this.visualizerManager.resetConnectionTarget(),this.visualizerManager.resetConnectionPoints(),this.processAndRemoveUpdatePageSizeTimer(),this.dragging.onFinishDragging(),w.prototype.finish.call(this)},D.prototype.insertToolboxItem=function(C){var I=this.shapeDescriptionManager.get(this.dragging.data);this.startShapePosition=this.getSnappedPoint(C,new y.Point(C.modelPoint.x-I.defaultSize.width/2,C.modelPoint.y-I.defaultSize.height/2));var L=new d.AddShapeHistoryItem(I,this.startShapePosition);return this.history.addAndRedo(L),u.ModelUtils.updateNewShapeProperties(this.history,this.selection,L.shapeKey),L.shapeKey},D.prototype.allowInsertToContainer=function(C,I,L){return!this.handler.canMultipleSelection(C)&&L&&L.expanded&&u.ModelUtils.canInsertToContainer(this.model,I,L)},D.prototype.getPosition=function(C,I){return this.getSnappedPoint(C,new y.Point(I.x+C.modelPoint.x-this.startPoint.x,I.y+C.modelPoint.y-this.startPoint.y))},D}(s.MouseHandlerDraggingState);P.MouseHandlerToolboxDraggingState=x},8461:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerZoomOnPinchState=void 0;var T=b(240),y=b(8900),d=b(9582),c=b(5596),s=function(a){function u(h,g,_,x){var w=a.call(this,h,x,g)||this;return w.selection=g,w.settings=_,w.view=x,w}return S(u,a),u.prototype.onMouseDown=function(h){a.prototype.onMouseDown.call(this,h),h.touches.length>1&&(this.startDistance=this.getTouchDistance(h),this.startZoomLevel=this.settings.zoomLevel,this.prevDistance=this.startDistance)},u.prototype.onMouseMove=function(h){if(h.touches.length>1){var g=this.getTouchDistance(h);Math.abs(this.prevDistance-g)>1&&(this.settings.zoomLevel=this.startZoomLevel*(g/this.startDistance),this.view.scrollTo(this.getMiddleLayoutPoint(h),this.getMiddleAbsPoint(h)),this.view.normalize(),this.prevDistance=g)}a.prototype.onMouseMove.call(this,h)},u.prototype.onMouseUp=function(h){0===h.touches.length&&setTimeout(function(){this.handler.switchToDefaultState()}.bind(this),1)},u.prototype.start=function(){a.prototype.start.call(this),this.settings.zoomLevel=this.view.getZoom(),this.settings.autoZoom=T.AutoZoomMode.Disabled},u.prototype.getTouchDistance=function(h){var g=new y.Point(h.touches[0].offsetPoint.x,h.touches[0].offsetPoint.y),_=new y.Point(h.touches[1].offsetPoint.x,h.touches[1].offsetPoint.y);return c.Metrics.euclideanDistance(g,_)},u.prototype.getPointByEvent=function(h){return this.getMiddleAbsPoint(h)},u.prototype.getMiddleAbsPoint=function(h){return h.touches.length>1?u.getMiddlePointByEvent(h,function(g){return g.offsetPoint}):h.offsetPoint},u.prototype.getMiddleLayoutPoint=function(h){return h.touches.length>1?u.getMiddlePointByEvent(h,function(g){return g.modelPoint}):h.modelPoint},u.getMiddlePointByEvent=function(h,g){if(h.touches.length>1)return new y.Point((g(h.touches[0]).x+g(h.touches[1]).x)/2,(g(h.touches[0]).y+g(h.touches[1]).y)/2)},u}(d.MouseHandlerScrollingState);P.MouseHandlerZoomOnPinchState=s},7189:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MouseHandlerZoomOnWheelState=void 0;var T=b(5434),y=b(6031),d=b(240),c=function(s){function a(u,h,g){var _=s.call(this,u)||this;return _.settings=h,_.view=g,_}return S(a,s),a.prototype.onMouseWheel=function(u){return this.trySwitchToDefault(u)?this.handler.state.onMouseWheel(u):(this.settings.zoomLevel=this.view.getNextStepZoom(u.deltaY<0),u.source.type===y.MouseEventElementType.Background?this.view.resetScroll():(this.view.scrollTo(u.modelPoint,u.offsetPoint),this.view.normalize()),u.preventDefault=!0,!0)},a.prototype.onMouseUp=function(u){this.handler.switchToDefaultState(),this.handler.state.onMouseUp(u)},a.prototype.onMouseDown=function(u){this.handler.switchToDefaultState(),this.handler.state.onMouseDown(u)},a.prototype.onMouseMove=function(u){this.trySwitchToDefault(u)&&this.handler.state.onMouseMove(u)},a.prototype.trySwitchToDefault=function(u){return!!this.handler.canFinishZoomOnWheel(u)&&(this.handler.switchToDefaultState(),!0)},a.prototype.start=function(){s.prototype.start.call(this),this.settings.zoomLevel=this.view.getZoom(),this.settings.autoZoom=d.AutoZoomMode.Disabled},a}(T.MouseHandlerStateBase);P.MouseHandlerZoomOnWheelState=c},8376:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.TextInputHandler=void 0;var f=b(6516),S=b(6031),T=b(2153),y=b(5503),d=b(7959),c=b(5144),s=function(){function a(u){this.control=u}return a.prototype.startTextInput=function(u,h){if(!u.isLocked&&u.enableText&&u.allowEditText&&!this.control.settings.readOnly&&this.canFinishTextEditing()){this.control.beginUpdate(),this.textInputItem=u;var g=!0;if(this.textInputItem instanceof y.Shape){var _=this.textInputItem.textEditRectangle;(g=this.control.permissionsProvider.canChangeShapeText(this.textInputItem))&&this.control.eventManager.raiseTextInputStart(this.textInputItem,this.textInputItem.text,_.createPosition(),_.createSize())}else this.textInputItem instanceof d.Connector&&(this.textInputPosition=h,(g=this.control.permissionsProvider.canChangeConnectorText(this.textInputItem,this.textInputPosition))&&this.control.eventManager.raiseTextInputStart(this.textInputItem,this.textInputItem.getText(this.textInputPosition),this.textInputItem.getTextPoint(this.textInputPosition)));g||(delete this.textInputItem,this.control.endUpdate())}},a.prototype.endTextInput=function(u){var h=this.textInputItem;delete this.textInputItem,this.control.eventManager.raiseTextInputEnd(h,u),this.control.endUpdate(),this.control.barManager.updateItemsState()},a.prototype.raiseTextInputPermissionsCheck=function(u){this.control.eventManager.raiseTextInputPermissionsCheck(this.textInputItem,u)},a.prototype.applyTextInput=function(u,h){if(this.canFinishTextEditing(u)){var g=this.textInputItem,_=this.textInputPosition;this.endTextInput(h),g instanceof y.Shape?g.text!==u&&this.control.history.addAndRedo(new f.ChangeShapeTextHistoryItem(g,u)):g instanceof d.Connector&&g.getText(_)!==u&&this.control.history.addAndRedo(new c.ChangeConnectorTextHistoryItem(g,_,u))}},a.prototype.canFinishTextEditing=function(u){var h=!0;if(this.isTextInputActive()){var g=u||this.getTextInputElementValue();this.textInputItem instanceof y.Shape?h=this.control.permissionsProvider.canApplyShapeTextChange(this.textInputItem,g):this.textInputItem instanceof d.Connector&&(h=this.control.permissionsProvider.canApplyConnectorTextChange(this.textInputItem,this.textInputPosition,g)),this.raiseTextInputPermissionsCheck(h)}return h},a.prototype.getTextInputElementValue=function(){return this.control.render?this.control.render.input.getTextInputElementValue():""},a.prototype.cancelTextInput=function(){this.raiseTextInputPermissionsCheck(!0),this.endTextInput(!0)},a.prototype.isTextInputActive=function(){return void 0!==this.textInputItem},a.prototype.processDblClick=function(u){if(u.source.type===S.MouseEventElementType.Shape){var h=this.control.model.findShape(u.source.key);this.startTextInput(h)}else if(u.source.type===S.MouseEventElementType.Connector){var g=(_=this.control.model.findConnector(u.source.key)).getTextPositionByPoint(u.modelPoint);this.startTextInput(_,g)}else if(u.source.type===S.MouseEventElementType.ConnectorText){var _=this.control.model.findConnector(u.source.key);g=parseFloat(u.source.value),this.startTextInput(_,g)}},a.prototype.onDblClick=function(u){var h=this;setTimeout(function(){h.processDblClick(u)},10)},a.prototype.onKeyDown=function(u){this.isTextInputActive()&&(13===u.keyCode&&this.hasCtrlModifier(u.modifiers)&&(u.preventDefault=!0,this.applyTextInput(u.inputText,!0)),27===u.keyCode&&this.cancelTextInput())},a.prototype.onBlur=function(u){this.isTextInputActive()&&this.applyTextInput(u.inputText)},a.prototype.onFocus=function(u){},a.prototype.hasCtrlModifier=function(u){return(u&T.ModifierKey.Ctrl)>0},a}();P.TextInputHandler=s},3541:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectionPointsVisualizer=P.ConnectionPointInfo=void 0,P.ConnectionPointInfo=function(S,T){this.point=S,this.side=T,this.allowed=!0};var f=function(){function S(T){this.dispatcher=T}return S.prototype.getKey=function(){return this.key},S.prototype.setPoints=function(T,y,d,c){this.key===T&&this.pointIndex===d||(this.key=T,this.points=y,this.pointIndex=d,this.outsideRectangle=c,this.raiseShow())},S.prototype.setPointIndex=function(T){0<=T&&T<this.points.length&&this.pointIndex!==T&&(this.pointIndex=T,this.raiseShow())},S.prototype.update=function(){this.raiseShow()},S.prototype.reset=function(){"-1"!==this.key&&(this.key="-1",this.points=[],this.pointIndex=-1,this.outsideRectangle=void 0,this.raiseHide())},S.prototype.raiseShow=function(){var T=this;this.dispatcher.raise1(function(y){return y.notifyConnectionPointsShow(T.key,T.points,T.pointIndex,T.outsideRectangle)})},S.prototype.raiseHide=function(){this.dispatcher.raise1(function(T){return T.notifyConnectionPointsHide()})},S}();P.ConnectionPointsVisualizer=f},3702:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectionTargetVisualizer=P.ConnectionTargetInfo=void 0;var T=b(3785),y=function(c,s){this.rect=c,this.strokeWidth=s,this.allowed=!0};P.ConnectionTargetInfo=y;var d=function(c){function s(a){return c.call(this,a)||this}return S(s,c),s.prototype.raiseShow=function(){var a=this,u=new y(this.targetRect,this.targetStrokeWidth);this.dispatcher.raise1(function(h){return h.notifyConnectionTargetShow(a.key,u)})},s.prototype.raiseHide=function(){this.dispatcher.raise1(function(a){return a.notifyConnectionTargetHide()})},s}(T.TargetVisualizerBase);P.ConnectionTargetVisualizer=d},9198:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ContainerTargetVisualizer=P.ContainerTargetInfo=void 0;var T=b(3785),y=function(c,s){this.rect=c,this.strokeWidth=s};P.ContainerTargetInfo=y;var d=function(c){function s(a){return c.call(this,a)||this}return S(s,c),s.prototype.raiseShow=function(){var a=this,u=new y(this.targetRect,this.targetStrokeWidth);this.dispatcher.raise1(function(h){return h.notifyContainerTargetShow(a.key,u)})},s.prototype.raiseHide=function(){this.dispatcher.raise1(function(a){return a.notifyContainerTargetHide()})},s}(T.TargetVisualizerBase);P.ContainerTargetVisualizer=d},371:(o,P)=>{var S;Object.defineProperty(P,"__esModule",{value:!0}),P.ExtensionLinesVisualizer=P.ExtensionLine=P.ExtensionLineType=void 0,(S=P.ExtensionLineType||(P.ExtensionLineType={}))[S.LeftToLeftAbove=0]="LeftToLeftAbove",S[S.LeftToLeftBelow=1]="LeftToLeftBelow",S[S.RightToRightAbove=2]="RightToRightAbove",S[S.RightToRightBelow=3]="RightToRightBelow",S[S.LeftToRightAbove=4]="LeftToRightAbove",S[S.LeftToRightBelow=5]="LeftToRightBelow",S[S.RightToLeftAbove=6]="RightToLeftAbove",S[S.RightToLeftBelow=7]="RightToLeftBelow",S[S.TopToTopBefore=8]="TopToTopBefore",S[S.TopToTopAfter=9]="TopToTopAfter",S[S.BottomToBottomBefore=10]="BottomToBottomBefore",S[S.BottomToBottomAfter=11]="BottomToBottomAfter",S[S.TopToBottomBefore=12]="TopToBottomBefore",S[S.TopToBottomAfter=13]="TopToBottomAfter",S[S.BottomToTopBefore=14]="BottomToTopBefore",S[S.BottomToTopAfter=15]="BottomToTopAfter",S[S.HorizontalCenterAbove=16]="HorizontalCenterAbove",S[S.HorizontalCenterBelow=17]="HorizontalCenterBelow",S[S.VerticalCenterBefore=18]="VerticalCenterBefore",S[S.VerticalCenterAfter=19]="VerticalCenterAfter",S[S.VerticalCenterToPageCenter=20]="VerticalCenterToPageCenter",S[S.HorizontalCenterToPageCenter=21]="HorizontalCenterToPageCenter",S[S.LeftToPageCenter=22]="LeftToPageCenter",S[S.RightToPageCenter=23]="RightToPageCenter",S[S.TopToPageCenter=24]="TopToPageCenter",S[S.BottomToPageCenter=25]="BottomToPageCenter";var b=function(S,T,y){this.type=S,this.segment=T,this.text=y};P.ExtensionLine=b;var f=function(){function S(T){this.dispatcher=T,this.lines=[],this.lineIndexByType={}}return S.prototype.addSegment=function(T,y,d){var c=this.lineIndexByType[T];if(void 0===c){var s=new b(T,y,d),a=this.lines.push(s);this.lineIndexByType[s.type]=a-1,this.raiseShow()}else y.length<this.lines[c].segment.length&&(s=new b(T,y,d),this.lines.splice(c,1,s),this.raiseShow())},S.prototype.update=function(){this.raiseShow()},S.prototype.reset=function(){this.lines.length&&(this.lines=[],this.lineIndexByType={},this.raiseHide())},S.prototype.raiseShow=function(){var T=this;this.dispatcher.raise1(function(y){return y.notifyExtensionLinesShow(T.lines)})},S.prototype.raiseHide=function(){this.dispatcher.raise1(function(T){return T.notifyExtensionLinesHide()})},S}();P.ExtensionLinesVisualizer=f},6569:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ResizeInfoVisualizer=void 0;var b=function(){function f(S){this.dispatcher=S}return f.prototype.set=function(S,T){this.point=S,this.text=T,this.raiseShow()},f.prototype.reset=function(){void 0!==this.point&&(this.point=void 0,this.text=void 0,this.raiseHide())},f.prototype.raiseShow=function(){var S=this;this.dispatcher.raise1(function(T){return T.notifyResizeInfoShow(S.point,S.text)})},f.prototype.raiseHide=function(){this.dispatcher.raise1(function(S){return S.notifyResizeInfoHide()})},f}();P.ResizeInfoVisualizer=b},4753:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SelectionRectVisualizer=void 0;var b=function(){function f(S){this.dispatcher=S}return f.prototype.setRectangle=function(S){this.rect=S,this.raiseShow()},f.prototype.reset=function(){this.rect=void 0,this.raiseHide()},f.prototype.raiseShow=function(){var S=this;this.dispatcher.raise1(function(T){return T.notifySelectionRectShow(S.rect)})},f.prototype.raiseHide=function(){this.dispatcher.raise1(function(S){return S.notifySelectionRectHide()})},f}();P.SelectionRectVisualizer=b},3785:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.TargetVisualizerBase=void 0;var b=function(){function f(S){this.dispatcher=S}return f.prototype.getKey=function(){return this.key},f.prototype.setTargetRect=function(S,T,y){this.key!==S&&(this.key=S,this.targetRect=T,this.targetStrokeWidth=y,this.raiseShow())},f.prototype.reset=function(){"-1"!==this.key&&(this.key="-1",this.targetRect=void 0,this.targetStrokeWidth=0,this.raiseHide())},f}();P.TargetVisualizerBase=b},7733:function(o,P,b){var f,S=this&&this.__extends||(f=function(N,G){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var B in U)U.hasOwnProperty(B)&&(k[B]=U[B])})(N,G)},function(N,G){function k(){this.constructor=N}f(N,G),N.prototype=null===G?Object.create(G):(k.prototype=G.prototype,new k)});Object.defineProperty(P,"__esModule",{value:!0}),P.VisualizerManager=void 0;var T=b(3702),y=b(9198),d=b(371),c=b(6031),s=b(3541),a=b(5503),u=b(8675),h=b(1335),g=b(8900),_=b(4e3),x=b(4867),w=b(6569),D=b(4753),C=b(1772),I=b(6224),L=function(N){function G(k,U,B,K,J){void 0===J&&(J=K.readOnly);var ie=N.call(this)||this;return ie.selection=k,ie.model=U,ie.eventManager=B,ie.settings=K,ie.readOnly=J,ie.onVisualizersUpdate=new u.EventDispatcher,ie.connectionPointsVisualizer=new s.ConnectionPointsVisualizer(ie.onVisualizersUpdate),ie.connectionPointsVisualizer=new s.ConnectionPointsVisualizer(ie.onVisualizersUpdate),ie.connectionTargetVisualizer=new T.ConnectionTargetVisualizer(ie.onVisualizersUpdate),ie.containerTargetVisualizer=new y.ContainerTargetVisualizer(ie.onVisualizersUpdate),ie.extensionLinesVisualizer=new d.ExtensionLinesVisualizer(ie.onVisualizersUpdate),ie.resizeInfoVisualizer=new w.ResizeInfoVisualizer(ie.onVisualizersUpdate),ie.selectionRectangleVisualizer=new D.SelectionRectVisualizer(ie.onVisualizersUpdate),ie}return S(G,N),G.prototype.initialize=function(k){this.model=k},G.prototype.onMouseDown=function(k){},G.prototype.onMouseUp=function(k){},G.prototype.onMouseEnter=function(k){},G.prototype.onMouseLeave=function(k){this.resetConnectionPoints(),this.resetConnectionTarget(),this.resetExtensionLines(),this.resetContainerTarget(),this.resetResizeInfo(),this.resetSelectionRectangle()},G.prototype.onBlur=function(k){},G.prototype.onFocus=function(k){},G.prototype.updateConnections=function(k,U,B){var K=-1;B&&U===c.MouseEventElementType.ShapeConnectionPoint&&(K=parseInt(B)),this.setConnectionPoints(k,U,K,k&&(!k.allowResizeHorizontally&&!k.allowResizeVertically||k.isLocked))},G.prototype.setConnectionPoints=function(k,U,B,K){if(this.eventManager.isFocused())if(!k||U!==c.MouseEventElementType.Shape&&U!==c.MouseEventElementType.ShapeResizeBox&&U!==c.MouseEventElementType.ShapeConnectionPoint||void 0===k)this.connectionPointsVisualizer.reset();else{var J=k.key,ie=this.selection.hasKey(J),re=k.getConnectionPoints();this.connectionPointsVisualizer.setPoints(J,re.map(function(q){return new s.ConnectionPointInfo(q,k.getConnectionPointSide(q))}),B,ie&&!K&&k.rectangle)}},G.prototype.setConnectionPointIndex=function(k){this.connectionPointsVisualizer.setPointIndex(k)},G.prototype.updateConnectionPoints=function(){void 0!==this.model.findItem(this.connectionPointsVisualizer.getKey())?this.connectionPointsVisualizer.update():this.connectionPointsVisualizer.reset()},G.prototype.resetConnectionPoints=function(){this.connectionPointsVisualizer.reset()},G.prototype.setConnectionTarget=function(k,U){!k||U!==c.MouseEventElementType.Shape&&U!==c.MouseEventElementType.ShapeConnectionPoint?this.connectionTargetVisualizer.reset():this.connectionTargetVisualizer.setTargetRect(k.key,k.rectangle,k.strokeWidth)},G.prototype.resetConnectionTarget=function(){this.connectionTargetVisualizer.reset()},G.prototype.setContainerTarget=function(k,U){k&&!k.isLocked&&U===c.MouseEventElementType.Shape&&k.enableChildren?this.containerTargetVisualizer.setTargetRect(k.key,k.rectangle,k.strokeWidth):this.containerTargetVisualizer.reset()},G.prototype.resetContainerTarget=function(){this.containerTargetVisualizer.reset()},G.prototype.setExtensionLines=function(k){var U=this;if(this.eventManager.isFocused()){this.extensionLinesVisualizer.reset();var B=x.ModelUtils.createRectangle(k.filter(function(K){return K}));this.addPageExtensionLines(B),this.model.items.forEach(function(K){k.indexOf(K)>-1||K instanceof a.Shape&&U.addShapeExtensionLines(K,B)})}},G.prototype.addPageExtensionLines=function(k){for(var U=Math.round(this.model.size.width/this.model.pageWidth),B=Math.round(this.model.size.height/this.model.pageHeight),K=0;K<U;K++)for(var J=0;J<B;J++){var ie=new g.Point(K*this.model.pageWidth+this.model.pageWidth/2,J*this.model.pageHeight+this.model.pageHeight/2);if(Math.abs(k.center.x-ie.x)<this.settings.gridSize/2){var re=new h.Segment(new g.Point(k.center.x,0),new g.Point(k.center.x,this.model.size.height));this.extensionLinesVisualizer.addSegment(d.ExtensionLineType.HorizontalCenterToPageCenter,re,"")}Math.abs(k.center.y-ie.y)<this.settings.gridSize/2&&(re=new h.Segment(new g.Point(0,k.center.y),new g.Point(this.model.size.width,k.center.y)),this.extensionLinesVisualizer.addSegment(d.ExtensionLineType.VerticalCenterToPageCenter,re,"")),Math.abs(k.x-ie.x)<this.settings.gridSize/2&&(re=new h.Segment(new g.Point(k.x,0),new g.Point(k.x,this.model.size.height)),this.extensionLinesVisualizer.addSegment(d.ExtensionLineType.LeftToPageCenter,re,"")),Math.abs(k.y-ie.y)<this.settings.gridSize/2&&(re=new h.Segment(new g.Point(0,k.y),new g.Point(this.model.size.width,k.y)),this.extensionLinesVisualizer.addSegment(d.ExtensionLineType.TopToPageCenter,re,"")),Math.abs(k.right-ie.x)<this.settings.gridSize/2&&(re=new h.Segment(new g.Point(k.right,0),new g.Point(k.right,this.model.size.height)),this.extensionLinesVisualizer.addSegment(d.ExtensionLineType.RightToPageCenter,re,"")),Math.abs(k.bottom-ie.y)<this.settings.gridSize/2&&(re=new h.Segment(new g.Point(0,k.bottom),new g.Point(this.model.size.width,k.bottom)),this.extensionLinesVisualizer.addSegment(d.ExtensionLineType.BottomToPageCenter,re,""))}},G.prototype.addShapeExtensionLines=function(k,U){var B,K,J,ie,re,q,Y,Z,Q=k.rectangle,te=k.strokeWidth-_.CanvasSelectionManager.extensionLineWidth,pe=!0;if(U.right<Q.x?(re=(B=U.right)+te+_.CanvasSelectionManager.extensionLineOffset,Y=(J=Q.x)-_.CanvasSelectionManager.extensionLineOffset):U.x>Q.right&&(re=(B=U.x)-_.CanvasSelectionManager.extensionLineOffset,Y=(J=Q.right)+te+_.CanvasSelectionManager.extensionLineOffset),U.bottom<Q.y?(q=(K=U.bottom)+te+_.CanvasSelectionManager.extensionLineOffset,Z=(ie=Q.y)-_.CanvasSelectionManager.extensionLineOffset):U.y>Q.bottom&&(q=(K=U.y)-_.CanvasSelectionManager.extensionLineOffset,Z=(ie=Q.bottom)+te+_.CanvasSelectionManager.extensionLineOffset),void 0!==re&&void 0!==Y){var z=this.getViewUnitText(Math.abs(B-J));if(U.center.y===Q.center.y){var oe=new h.Segment(new g.Point(re,U.center.y),new g.Point(Y,Q.center.y));this.extensionLinesVisualizer.addSegment(re>Y?d.ExtensionLineType.VerticalCenterAfter:d.ExtensionLineType.VerticalCenterBefore,oe,pe?z:""),pe=!1}U.y===Q.y&&(oe=new h.Segment(new g.Point(re,U.y),new g.Point(Y,Q.y)),this.extensionLinesVisualizer.addSegment(re>Y?d.ExtensionLineType.TopToTopAfter:d.ExtensionLineType.TopToTopBefore,oe,pe?z:"")),U.bottom===Q.bottom&&(oe=new h.Segment(new g.Point(re,U.bottom+te),new g.Point(Y,Q.bottom+te)),this.extensionLinesVisualizer.addSegment(re>Y?d.ExtensionLineType.BottomToBottomAfter:d.ExtensionLineType.BottomToBottomBefore,oe,pe?z:"")),U.y===Q.bottom&&(oe=new h.Segment(new g.Point(re,U.y),new g.Point(Y,Q.bottom+te)),this.extensionLinesVisualizer.addSegment(re>Y?d.ExtensionLineType.TopToBottomAfter:d.ExtensionLineType.TopToBottomBefore,oe,pe?z:"")),U.bottom===Q.y&&(oe=new h.Segment(new g.Point(re,U.bottom+te),new g.Point(Y,Q.y)),this.extensionLinesVisualizer.addSegment(re>Y?d.ExtensionLineType.BottomToTopAfter:d.ExtensionLineType.BottomToTopBefore,oe,pe?z:""))}void 0!==q&&void 0!==Z&&(z=this.getViewUnitText(Math.abs(K-ie)),U.center.x===Q.center.x&&(oe=new h.Segment(new g.Point(U.center.x,q),new g.Point(Q.center.x,Z)),this.extensionLinesVisualizer.addSegment(q>Z?d.ExtensionLineType.HorizontalCenterBelow:d.ExtensionLineType.HorizontalCenterAbove,oe,pe?z:""),pe=!1),U.x===Q.x&&(oe=new h.Segment(new g.Point(U.x,q),new g.Point(Q.x,Z)),this.extensionLinesVisualizer.addSegment(q>Z?d.ExtensionLineType.LeftToLeftBelow:d.ExtensionLineType.LeftToLeftAbove,oe,pe?z:"")),U.right===Q.right&&(oe=new h.Segment(new g.Point(U.right+te,q),new g.Point(Q.right+te,Z)),this.extensionLinesVisualizer.addSegment(q>Z?d.ExtensionLineType.RightToRightBelow:d.ExtensionLineType.RightToRightAbove,oe,pe?z:"")),U.x===Q.right&&(oe=new h.Segment(new g.Point(U.x,q),new g.Point(Q.right+te,Z)),this.extensionLinesVisualizer.addSegment(q>Z?d.ExtensionLineType.LeftToRightBelow:d.ExtensionLineType.LeftToRightAbove,oe,pe?z:"")),U.right===Q.x&&(oe=new h.Segment(new g.Point(U.right+te,q),new g.Point(Q.x,Z)),this.extensionLinesVisualizer.addSegment(q>Z?d.ExtensionLineType.RightToLeftBelow:d.ExtensionLineType.RightToLeftAbove,oe,pe?z:"")))},G.prototype.resetExtensionLines=function(){this.extensionLinesVisualizer.reset()},G.prototype.setResizeInfo=function(k){var U=x.ModelUtils.createRectangle(k),B=new g.Point(U.center.x,U.bottom+_.CanvasSelectionManager.resizeInfoOffset),K=this.getViewUnitText(U.width)+" x "+this.getViewUnitText(U.height);this.resizeInfoVisualizer.set(B,K)},G.prototype.resetResizeInfo=function(){this.resizeInfoVisualizer.reset()},G.prototype.setSelectionRectangle=function(k){this.selectionRectangleVisualizer.setRectangle(k)},G.prototype.resetSelectionRectangle=function(){this.selectionRectangleVisualizer.reset()},G.prototype.getViewUnitText=function(k){return x.ModelUtils.getUnitText(this.settings.viewUnits,I.DiagramLocalizationService.unitItems,I.DiagramLocalizationService.formatUnit,k)},G.prototype.notifyReadOnlyChanged=function(k){this.readOnly=k,this.readOnly&&(this.resetConnectionPoints(),this.resetConnectionTarget(),this.resetExtensionLines(),this.resetContainerTarget(),this.resetResizeInfo(),this.resetSelectionRectangle())},G.prototype.notifyDragStart=function(k){},G.prototype.notifyDragEnd=function(k){},G.prototype.notifyDragScrollStart=function(){},G.prototype.notifyDragScrollEnd=function(){},G.prototype.onUpdateUnlocked=function(k){},G}(C.BatchUpdatableObject);P.VisualizerManager=L},7459:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.VisualizerTouchManager=void 0;var T=b(7733),y=b(6031),d=function(c){function s(a,u,h,g,_){void 0===_&&(_=g.readOnly);var x=c.call(this,a,u,h,g,_)||this;return a.onChanged.add(x),x}return S(s,c),s.prototype.onBlur=function(a){var u=this;setTimeout(function(){u.hideConnections()},1)},s.prototype.onFocus=function(a){var u=this;setTimeout(function(){u.showConnections()},1)},s.prototype.hideConnections=function(){this.readOnly||this.resetConnectionPoints()},s.prototype.showConnections=function(){if(!this.readOnly&&this.needShowConnections()){var a=this.selection.getSelectedShapes();1===a.length&&this.setConnectionPoints(a[0],y.MouseEventElementType.ShapeConnectionPoint,-1,!a[0].allowResizeHorizontally&&!a[0].allowResizeVertically||a[0].isLocked)}},s.prototype.needShowConnections=function(){var a=this.selection.getSelectedItems(),u=this.selection.getSelectedShapes();return 1===a.length&&1===u.length},s.prototype.notifySelectionChanged=function(a){this.isUpdateLocked()?this.registerOccurredEvent(1):this.raiseSelectionChanged()},s.prototype.raiseSelectionChanged=function(){this.needShowConnections()?this.showConnections():this.hideConnections()},s.prototype.onUpdateUnlocked=function(a){1&a&&this.raiseSelectionChanged()},s.prototype.notifyDragStart=function(a){this.hideConnections()},s.prototype.notifyDragEnd=function(a){this.showConnections()},s}(T.VisualizerManager);P.VisualizerTouchManager=d},3477:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.SetConnectionPointIndexHistoryItem=P.AddConnectionHistoryItem=void 0;var T=b(4412),y=b(7959),d=function(s){function a(u,h,g,_){var x=s.call(this)||this;return x.connectorKey=u.key,x.itemKey=h.key,x.connectionPointIndex=g,x.position=_,x}return S(a,s),a.prototype.redo=function(u){var h=u.model.findConnector(this.connectorKey),g=u.model.findItem(this.itemKey);u.addConnection(h,g,this.connectionPointIndex,this.position)},a.prototype.undo=function(u){var h=u.model.findConnector(this.connectorKey);u.deleteConnection(h,this.position)},a}(T.HistoryItem);P.AddConnectionHistoryItem=d;var c=function(s){function a(u,h,g){var _=s.call(this)||this;return _.connectorKey=u.key,_.connectionPointIndex=h,_.position=g,_}return S(a,s),a.prototype.redo=function(u){var h=u.model.findConnector(this.connectorKey);this.oldConnectionPointIndex=this.position===y.ConnectorPosition.Begin?h.beginConnectionPointIndex:h.endConnectionPointIndex,u.setConnectionPointIndex(h,this.connectionPointIndex,this.position)},a.prototype.undo=function(u){var h=u.model.findConnector(this.connectorKey);u.setConnectionPointIndex(h,this.oldConnectionPointIndex,this.position)},a}(T.HistoryItem);P.SetConnectionPointIndexHistoryItem=c},9603:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.AddConnectorHistoryItem=void 0;var T=b(4412),y=b(7959),d=function(c){function s(a,u,h){var g=c.call(this)||this;return g.points=a,g.dataKey=u,g.renderPointsContext=h,g}return S(s,c),s.prototype.redo=function(a){var u=new y.Connector(this.points);void 0!==this.dataKey&&(u.dataKey=this.dataKey),void 0!==this.renderPointsContext&&u.replaceRenderPoints(this.renderPointsContext),a.addConnector(u,this.connectorKey),this.connectorKey=u.key},s.prototype.undo=function(a){var u=a.model.findConnector(this.connectorKey);a.deleteConnector(u)},s}(T.HistoryItem);P.AddConnectorHistoryItem=d},4430:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.AddConnectorPointHistoryItem=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.connectorKey=c,u.pointIndex=s,u.point=a,u}return S(d,y),d.prototype.redo=function(c){var s=this,a=c.model.findConnector(this.connectorKey);this.renderContext=a.tryCreateRenderPointsContext(),c.addDeleteConnectorPoint(a,function(u){u.addPoint(s.pointIndex,s.point),u.onAddPoint(s.pointIndex,s.point)})},d.prototype.undo=function(c){var s=this,a=c.model.findConnector(this.connectorKey);c.addDeleteConnectorPoint(a,function(u){u.deletePoint(s.pointIndex),u.replaceRenderPoints(s.renderContext)})},d}(b(4412).HistoryItem);P.AddConnectorPointHistoryItem=T},4145:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.AddShapeHistoryItem=void 0;var T=b(4412),y=b(5503),d=function(c){function s(a,u,h,g){var _=c.call(this)||this;return _.shapeDescription=a,_.position=u,_.text=h,_.dataKey=g,_}return S(s,c),s.prototype.redo=function(a){var u=new y.Shape(this.shapeDescription,this.position);"string"==typeof this.text&&(u.text=this.text),void 0!==this.dataKey&&(u.dataKey=this.dataKey),a.addShape(u,this.shapeKey),this.shapeKey=u.key},s.prototype.undo=function(a){a.deleteShape(a.model.findShape(this.shapeKey),!0)},s}(T.HistoryItem);P.AddShapeHistoryItem=d},58:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ReplaceConnectorPointsHistoryItem=P.ChangeConnectorPointsHistoryItem=P.UpdateConnectorPointsHistoryItem=void 0;var T=function(c){function s(a,u){var h=c.call(this)||this;return h.connectorKey=a,h.newPoints=u,h}return S(s,c),s.prototype.redo=function(a){var u=this,h=a.model.findConnector(this.connectorKey);this.oldRenderContext=h.tryCreateRenderPointsContext(),this.oldPoints=h.points.map(function(g){return g.clone()}),a.changeConnectorPoints(h,function(g){g.points=u.newPoints,u.updateRenderPoints(g)})},s.prototype.undo=function(a){var u=this,h=a.model.findConnector(this.connectorKey);a.changeConnectorPoints(h,function(g){g.points=u.oldPoints,g.replaceRenderPoints(u.oldRenderContext)})},s}(b(4412).HistoryItem);P.UpdateConnectorPointsHistoryItem=T;var y=function(c){function s(a,u,h){var g=c.call(this,a,u)||this;return g.connectorKey=a,g.newPoints=u,g.newRenderContext=h,g}return S(s,c),s.prototype.updateRenderPoints=function(a){a.replaceRenderPoints(this.newRenderContext)},s}(T);P.ChangeConnectorPointsHistoryItem=y;var d=function(c){function s(a,u){var h=c.call(this,a,u)||this;return h.connectorKey=a,h.newPoints=u,h}return S(s,c),s.prototype.updateRenderPoints=function(a){a.clearRenderPoints()},s}(T);P.ReplaceConnectorPointsHistoryItem=d},329:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeShapeParametersHistoryItem=void 0;var T=function(y){function d(c,s){var a=y.call(this)||this;return a.shapeKey=c,a.parameters=s,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findShape(this.shapeKey);this.oldParameters=s.parameters.clone(),c.changeShapeParameters(s,this.parameters)},d.prototype.undo=function(c){var s=c.model.findShape(this.shapeKey);c.changeShapeParameters(s,this.oldParameters)},d}(b(4412).HistoryItem);P.ChangeShapeParametersHistoryItem=T},56:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeShapeTypeHistoryItem=void 0;var T=b(6629),y=function(d){function c(s,a){var u=d.call(this)||this;return u.shapeKey=s.key,u.newType=a,u}return S(c,d),c.prototype.redo=function(s){var a=s.model.findShape(this.shapeKey);this.oldType=a.description.key,this.oldParameters=a.parameters.clone(),s.updateShapeType(a,this.newType,new T.ShapeParameters)},c.prototype.undo=function(s){var a=s.model.findShape(this.shapeKey);s.updateShapeType(a,this.oldType,this.oldParameters)},c}(b(4412).HistoryItem);P.ChangeShapeTypeHistoryItem=y},8930:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteConnectionHistoryItem=void 0;var T=b(4412),y=b(7959),d=function(c){function s(a,u){var h=c.call(this)||this;return h.connectorKey=a.key,h.position=u,h.itemKey=a.getExtremeItem(h.position).key,h}return S(s,c),s.prototype.redo=function(a){var u=a.model.findConnector(this.connectorKey);this.oldConnectionPointIndex=this.position===y.ConnectorPosition.Begin?u.beginConnectionPointIndex:u.endConnectionPointIndex,a.deleteConnection(u,this.position)},s.prototype.undo=function(a){var u=a.model.findConnector(this.connectorKey),h=a.model.findItem(this.itemKey);a.addConnection(u,h,this.oldConnectionPointIndex,this.position)},s}(T.HistoryItem);P.DeleteConnectionHistoryItem=d},9143:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteConnectorHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.connectorKey=c,s}return S(d,y),d.prototype.redo=function(c){var s=c.model.findConnector(this.connectorKey);this.connector=s.clone(),c.deleteConnector(s)},d.prototype.undo=function(c){c.addConnector(this.connector,this.connector.key)},d}(b(4412).HistoryItem);P.DeleteConnectorHistoryItem=T},1704:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteShapeHistoryItem=void 0;var T=function(y){function d(c,s){void 0===s&&(s=!0);var a=y.call(this)||this;return a.shapeKey=c,a.allowed=s,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findShape(this.shapeKey);this.shape=s.clone(),c.deleteShape(s,this.allowed)},d.prototype.undo=function(c){c.addShape(this.shape,this.shape.key)},d}(b(4412).HistoryItem);P.DeleteShapeHistoryItem=T},3849:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ImportConnectorHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.connector=c,s}return S(d,y),d.prototype.redo=function(c){this.connectorKey=this.connector.key,c.insertConnector(this.connector)},d.prototype.undo=function(c){var s=c.model.findConnector(this.connectorKey);c.removeConnector(s)},d}(b(4412).HistoryItem);P.ImportConnectorHistoryItem=T},4383:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ImportShapeHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.shape=c,s}return S(d,y),d.prototype.redo=function(c){this.shapeKey=this.shape.key,c.insertShape(this.shape)},d.prototype.undo=function(c){c.removeShape(c.model.findShape(this.shapeKey),!0)},d}(b(4412).HistoryItem);P.ImportShapeHistoryItem=T},9310:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.InsertToContainerHistoryItem=void 0;var T=function(y){function d(c,s){var a=y.call(this)||this;return a.containerKey=s.key,a.itemKey=c.key,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey),a=c.model.findShape(this.containerKey);c.insertToContainer(s,a)},d.prototype.undo=function(c){var s=c.model.findItem(this.itemKey);c.removeFromContainer(s)},d}(b(4412).HistoryItem);P.InsertToContainerHistoryItem=T},8338:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MoveConnectorRightAnglePointsHistoryItem=P.MoveConnectorPointHistoryItem=void 0;var T=b(8900),y=b(4412),d=function(s){function a(u,h,g){var _=s.call(this)||this;return _.connectorKey=u,_.pointIndex=h,_.newPoint=g,_}return S(a,s),a.prototype.redo=function(u){var h=this,g=u.model.findConnector(this.connectorKey);this.oldPoint=g.points[this.pointIndex].clone(),this.renderContext=g.tryCreateRenderPointsContext(),u.moveConnectorPoint(g,this.pointIndex,function(_){_.movePoint(h.pointIndex,h.newPoint),_.onMovePoint(h.pointIndex,h.newPoint)})},a.prototype.undo=function(u){var h=this,g=u.model.findConnector(this.connectorKey);u.moveConnectorPoint(g,this.pointIndex,function(_){_.movePoint(h.pointIndex,h.oldPoint),_.replaceRenderPoints(h.renderContext)})},a}(y.HistoryItem);P.MoveConnectorPointHistoryItem=d;var c=function(s){function a(u,h,g,_,x){var w=s.call(this)||this;return w.connectorKey=u,w.beginPointIndex=h,w.lastPointIndex=g,w.newX=_,w.newY=x,w.oldPoints=[],w}return S(a,s),a.prototype.redo=function(u){var h=this,g=u.model.findConnector(this.connectorKey);this.renderContext=g.tryCreateRenderPointsContext(),this.oldPoints=g.points.slice(this.beginPointIndex,this.lastPointIndex+1).map(function(x){return x.clone()});var _=[];u.changeConnectorPoints(g,function(x){for(var w=h.beginPointIndex;w<=h.lastPointIndex;w++){var D=new T.Point(void 0===h.newX?x.points[w].x:h.newX,void 0===h.newY?x.points[w].y:h.newY);_.push(D),x.movePoint(w,D)}x.onMovePoints(h.beginPointIndex,h.lastPointIndex,_)})},a.prototype.undo=function(u){var h=this,g=u.model.findConnector(this.connectorKey);u.changeConnectorPoints(g,function(_){for(var x=h.beginPointIndex;x<=h.lastPointIndex;x++)_.movePoint(x,h.oldPoints[x-h.beginPointIndex]);_.replaceRenderPoints(h.renderContext)})},a}(y.HistoryItem);P.MoveConnectorRightAnglePointsHistoryItem=c},4160:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.MoveShapeHistoryItem=void 0;var T=function(y){function d(c,s){var a=y.call(this)||this;return a.shapeKey=c,a.position=s,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findShape(this.shapeKey);this.oldPosition=s.position.clone(),c.moveShape(s,this.position)},d.prototype.undo=function(c){var s=c.model.findShape(this.shapeKey);c.moveShape(s,this.oldPosition)},d}(b(4412).HistoryItem);P.MoveShapeHistoryItem=T},9753:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.RemoveFromContainerHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.itemKey=c.key,s}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey);this.containerKey=s.container&&s.container.key,c.removeFromContainer(s)},d.prototype.undo=function(c){var s=c.model.findContainer(this.containerKey),a=c.model.findItem(this.itemKey);c.insertToContainer(a,s)},d}(b(4412).HistoryItem);P.RemoveFromContainerHistoryItem=T},4629:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ResizeShapeHistoryItem=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.shapeKey=c,u.position=s,u.size=a,u}return S(d,y),d.prototype.redo=function(c){var s=c.model.findShape(this.shapeKey);this.oldPosition=s.position.clone(),this.oldSize=s.size.clone(),c.resizeShape(s,this.position,this.size)},d.prototype.undo=function(c){var s=c.model.findShape(this.shapeKey);c.resizeShape(s,this.oldPosition,this.oldSize)},d}(b(4412).HistoryItem);P.ResizeShapeHistoryItem=T},7626:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ScrollIntoViewOnUndoHistoryItem=P.ScrollIntoViewOnRedoHistoryItem=void 0;var T=b(4412),y=function(c){function s(a,u){var h=c.call(this)||this;return h.view=a,h.rectangle=u,h.view=a,h.rectangle=u.clone(),h}return S(s,c),s.prototype.redo=function(a){this.view.scrollIntoView(this.rectangle)},s.prototype.undo=function(a){},s}(T.HistoryItem);P.ScrollIntoViewOnRedoHistoryItem=y;var d=function(c){function s(a,u){var h=c.call(this)||this;return h.view=a,h.rectangle=u,h.view=a,h.rectangle=u.clone(),h}return S(s,c),s.prototype.redo=function(a){},s.prototype.undo=function(a){this.view.scrollIntoView(this.rectangle)},s}(T.HistoryItem);P.ScrollIntoViewOnUndoHistoryItem=d},4297:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.SetSelectionHistoryItem=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.selectedKeys=s,u.selection=c,u.forceChange=a,u}return S(d,y),d.prototype.redo=function(){this.oldSelection=this.selection.getKeys().slice(0),this.selection.set(this.selectedKeys,this.forceChange)},d.prototype.undo=function(){this.selection.set(this.oldSelection,this.forceChange)},d}(b(4412).HistoryItem);P.SetSelectionHistoryItem=T},1864:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.History=void 0;var f=b(4412),S=b(8675),T=function(){function y(d,c){this.modelManipulator=d,this.diagram=c,this.historyItems=[],this.currentIndex=-1,this.incrementalId=-1,this.transactionLevel=-1,this.unmodifiedIndex=-1,this.currTransactionId=0,this.onChanged=new S.EventDispatcher}return y.prototype.isModified=function(){if(this.unmodifiedIndex===this.currentIndex)return!1;for(var d=Math.min(this.unmodifiedIndex,this.currentIndex),c=Math.max(this.unmodifiedIndex,this.currentIndex),s=d+1;s<=c;s++)if(this.historyItems[s].changeModified())return!0;return!1},y.prototype.undo=function(){this.canUndo()&&(this.historyItems[this.currentIndex].undo(this.modelManipulator),this.currentIndex--,this.raiseChanged())},y.prototype.redo=function(){this.canRedo()&&(this.startDataSyncItem&&(this.startDataSyncItem.undo(this.modelManipulator),this.startDataSyncItem=void 0),this.currentIndex++,this.historyItems[this.currentIndex].redo(this.modelManipulator),this.raiseChanged())},y.prototype.canUndo=function(){return this.currentIndex>=0},y.prototype.canRedo=function(){return this.currentIndex<this.historyItems.length-1},y.prototype.beginTransaction=function(){return this.transactionLevel++,0===this.transactionLevel&&(this.transaction=new f.CompositionHistoryItem),this.currTransactionId++},y.prototype.endTransaction=function(d){if(!(--this.transactionLevel>=0)){var c=this.transaction.historyItems.length;if(c>0){var s=c>1?this.transaction:this.transaction.historyItems.pop();d?this.addDataSyncItem(s):this.addInternal(s)}c>0&&!d&&this.raiseChanged(),delete this.transaction}},y.prototype.addAndRedo=function(d){this.add(d),d.redo(this.modelManipulator),this.raiseChanged()},y.prototype.add=function(d){this.transactionLevel>=0?this.transaction.add(d):this.addInternal(d)},y.prototype.addInternal=function(d){this.currentIndex<this.historyItems.length-1&&(this.historyItems.splice(this.currentIndex+1),this.unmodifiedIndex=Math.min(this.unmodifiedIndex,this.currentIndex)),this.historyItems.push(d),this.currentIndex++,this.deleteOldItems()},y.prototype.addDataSyncItem=function(d){var c=this.historyItems[this.currentIndex];if(c){var s=void 0;c instanceof f.CompositionHistoryItem?s=c:(this.historyItems.splice(this.currentIndex,1),s=new f.CompositionHistoryItem,this.historyItems.push(s),s.historyItems.push(c)),s.dataSyncItems.push(d)}else this.historyItems.length&&(this.startDataSyncItem=d)},y.prototype.deleteOldItems=function(){var d=this.historyItems.length-y.MAX_HISTORY_ITEM_COUNT;d>0&&this.currentIndex>d&&(this.historyItems.splice(0,d),this.currentIndex-=d)},y.prototype.getNextId=function(){return this.incrementalId++,this.incrementalId},y.prototype.clear=function(){this.currentIndex=-1,this.unmodifiedIndex=-1,this.incrementalId=-1,this.historyItems=[],delete this.transaction,this.transactionLevel=-1},y.prototype.resetModified=function(){this.unmodifiedIndex=this.currentIndex},y.prototype.getCurrentItemId=function(){if(-1===this.currentIndex)return-1;var d=this.historyItems[this.currentIndex];return-1===d.uniqueId&&(d.uniqueId=this.getNextId()),d.uniqueId},y.prototype.undoTransaction=function(){this.diagram.beginUpdateCanvas();for(var d=this.transaction.historyItems;d.length;)d.pop().undo(this.modelManipulator);this.diagram.endUpdateCanvas()},y.prototype.undoTransactionTo=function(d){this.diagram.beginUpdateCanvas();for(var c=this.transaction.historyItems;c.length;){var s=c.pop();if(s.undo(this.modelManipulator),s===d)break}this.diagram.endUpdateCanvas()},y.prototype.raiseChanged=function(){-1===this.transactionLevel&&this.onChanged.raise("notifyHistoryChanged")},y.MAX_HISTORY_ITEM_COUNT=100,y}();P.History=T},4412:function(o,P){var b,f=this&&this.__extends||(b=function(y,d){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}b(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.CompositionHistoryItem=P.HistoryItem=void 0;var S=function(){function y(){this.uniqueId=-1}return y.prototype.changeModified=function(){return!0},y.prototype.getName=function(){return this.constructor.name},y}();P.HistoryItem=S;var T=function(y){function d(){var c=null!==y&&y.apply(this,arguments)||this;return c.historyItems=[],c.dataSyncItems=[],c}return f(d,y),d.prototype.changeModified=function(){for(var c,s=0;c=this.historyItems[s];s++)if(c.changeModified())return!0;return!1},d.prototype.redo=function(c){for(var s,a=0;s=this.historyItems[a];a++)s.redo(c)},d.prototype.undo=function(c){for(var s,a=this.dataSyncItems.length-1;s=this.dataSyncItems[a];a--)s.undo(c);for(this.dataSyncItems=[],a=this.historyItems.length-1;s=this.historyItems[a];a--)s.undo(c)},d.prototype.add=function(c){if(null==c)throw new Error("cannot be null");this.historyItems.push(c)},d}(S);P.CompositionHistoryItem=T},7195:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePageColorHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.value=c,s}return S(d,y),d.prototype.redo=function(c){this.oldValue=c.model.pageColor,c.changePageColor(this.value)},d.prototype.undo=function(c){c.changePageColor(this.oldValue)},d}(b(4412).HistoryItem);P.ChangePageColorHistoryItem=T},1380:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePageLandscapeHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.value=c,s}return S(d,y),d.prototype.redo=function(c){this.oldValue=c.model.pageLandscape,c.changePageLandscape(this.value)},d.prototype.undo=function(c){c.changePageLandscape(this.oldValue)},d}(b(4412).HistoryItem);P.ChangePageLandscapeHistoryItem=T},1044:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangePageSizeHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.size=c,s}return S(d,y),d.prototype.redo=function(c){this.oldSize=c.model.pageSize,c.changePageSize(this.size)},d.prototype.undo=function(c){c.changePageSize(this.oldSize)},d}(b(4412).HistoryItem);P.ChangePageSizeHistoryItem=T},7479:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeUnitsHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.units=c,s}return S(d,y),d.prototype.redo=function(c){this.oldUnits=c.model.units,c.model.units=this.units},d.prototype.undo=function(c){c.model.units=this.oldUnits},d}(b(4412).HistoryItem);P.ChangeUnitsHistoryItem=T},1729:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ModelResizeHistoryItem=void 0;var T=b(4412),y=b(4125),d=b(6353),c=function(s){function a(u){var h=s.call(this)||this;return h.offset=u,h}return S(a,s),a.prototype.redo=function(u){this.oldSize=u.model.size.clone(),this.backOffset=new y.Offsets(-this.offset.left,-this.offset.right,-this.offset.top,-this.offset.bottom);var h=Math.max(this.oldSize.width+this.offset.left+this.offset.right,u.model.pageWidth),g=Math.max(this.oldSize.height+this.offset.top+this.offset.bottom,u.model.pageHeight);u.changeModelSize(new d.Size(h,g),this.offset)},a.prototype.undo=function(u){u.changeModelSize(this.oldSize,this.backOffset)},a}(T.HistoryItem);P.ModelResizeHistoryItem=c},4518:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.UpdatePositionsOnPageResizeHistoryItem=void 0;var T=b(7959),y=b(5503),d=function(c){function s(a){var u=c.call(this)||this;return u.offset=a,u}return S(s,c),s.prototype.redo=function(a){var u=this;a.model.iterateItems(function(h){h instanceof y.Shape&&a.moveShape(h,u.applyOffset(h.position,u.offset.x,u.offset.y)),h instanceof T.Connector&&a.changeConnectorPoints(h,function(g){return g.updatePointsOnPageResize(u.offset.x,u.offset.y)})})},s.prototype.undo=function(a){var u=this;a.model.iterateItems(function(h){h instanceof y.Shape&&a.moveShape(h,u.applyOffset(h.position,-u.offset.x,-u.offset.y)),h instanceof T.Connector&&a.changeConnectorPoints(h,function(g){return g.updatePointsOnPageResize(-u.offset.x,-u.offset.y)})})},s.prototype.applyOffset=function(a,u,h){return a.clone().offset(u,h)},s}(b(4412).HistoryItem);P.UpdatePositionsOnPageResizeHistoryItem=d},8236:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorPropertyHistoryItem=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.connectorKey=c,u.propertyName=s,u.value=a,u}return S(d,y),d.prototype.redo=function(c){var s=c.model.findConnector(this.connectorKey);this.oldValue=s.properties[this.propertyName],c.changeConnectorProperty(s,this.propertyName,this.value)},d.prototype.undo=function(c){var s=c.model.findConnector(this.connectorKey);c.changeConnectorProperty(s,this.propertyName,this.oldValue)},d}(b(4412).HistoryItem);P.ChangeConnectorPropertyHistoryItem=T},5144:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorTextHistoryItem=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.connectorKey=c.key,u.text=a,u.position=s,u}return S(d,y),d.prototype.redo=function(c){var s=c.model.findConnector(this.connectorKey);this.oldText=s.getText(this.position),c.changeConnectorText(s,this.text,this.position)},d.prototype.undo=function(c){var s=c.model.findConnector(this.connectorKey);c.changeConnectorText(s,this.oldText,this.position)},d}(b(4412).HistoryItem);P.ChangeConnectorTextHistoryItem=T},45:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorTextPositionHistoryItem=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.connectorKey=c.key,u.position=s,u.newPosition=a,u}return S(d,y),d.prototype.redo=function(c){var s=c.model.findConnector(this.connectorKey);c.changeConnectorTextPosition(s,this.position,this.newPosition)},d.prototype.undo=function(c){var s=c.model.findConnector(this.connectorKey);c.changeConnectorTextPosition(s,this.newPosition,this.position)},d}(b(4412).HistoryItem);P.ChangeConnectorTextPositionHistoryItem=T},9559:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeCustomDataHistoryItem=void 0;var T=b(4412),y=b(8675),d=function(c){function s(a,u){var h=c.call(this)||this;return h.itemKey=a,h.customData=y.ObjectUtils.cloneObject(u),h}return S(s,c),s.prototype.redo=function(a){var u=a.model.findItem(this.itemKey);this.oldCustomData=y.ObjectUtils.cloneObject(u.customData),a.changeCustomData(u,this.customData)},s.prototype.undo=function(a){var u=a.model.findItem(this.itemKey);a.changeCustomData(u,this.oldCustomData)},s}(T.HistoryItem);P.ChangeCustomDataHistoryItem=d},7443:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeLockedHistoryItem=void 0;var T=function(y){function d(c,s){var a=y.call(this)||this;return a.itemKey=c.key,a.locked=s,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey);this.oldLocked=s.locked,c.changeLocked(s,this.locked)},d.prototype.undo=function(c){var s=c.model.findItem(this.itemKey);c.changeLocked(s,this.oldLocked)},d}(b(4412).HistoryItem);P.ChangeLockedHistoryItem=T},8210:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeShapeImageHistoryItem=void 0;var T=b(4412),y=b(6617),d=function(c){function s(a,u){var h=c.call(this)||this;return h.shapeKey=a.key,h.imageUrl=u,h}return S(s,c),s.prototype.redo=function(a){var u=a.model.findShape(this.shapeKey);this.oldImage=u.image,a.changeShapeImage(u,new y.ImageInfo(this.imageUrl))},s.prototype.undo=function(a){var u=a.model.findShape(this.shapeKey);a.changeShapeImage(u,this.oldImage)},s}(T.HistoryItem);P.ChangeShapeImageHistoryItem=d},6516:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeShapeTextHistoryItem=void 0;var T=function(y){function d(c,s){var a=y.call(this)||this;return a.shapeKey=c.key,a.text=s,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findShape(this.shapeKey);this.oldText=s.text,c.changeShapeText(s,this.text)},d.prototype.undo=function(c){var s=c.model.findShape(this.shapeKey);c.changeShapeText(s,this.oldText)},d}(b(4412).HistoryItem);P.ChangeShapeTextHistoryItem=T},5982:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeZindexHistoryItem=void 0;var T=function(y){function d(c,s){var a=y.call(this)||this;return a.itemKey=c.key,a.zIndex=s,a}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey);this.oldZIndex=s.zIndex,c.changeZIndex(s,this.zIndex)},d.prototype.undo=function(c){var s=c.model.findItem(this.itemKey);c.changeZIndex(s,this.oldZIndex)},d}(b(4412).HistoryItem);P.ChangeZindexHistoryItem=T},442:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ToggleShapeExpandedHistoryItem=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.shapeKey=c.key,s.expanded=c.expanded,s}return S(d,y),d.prototype.redo=function(c){var s=c.model.findShape(this.shapeKey);c.changeShapeExpanded(s,!this.expanded)},d.prototype.undo=function(c){var s=c.model.findShape(this.shapeKey);c.changeShapeExpanded(s,this.expanded)},d}(b(4412).HistoryItem);P.ToggleShapeExpandedHistoryItem=T},4634:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStyleHistoryItem=void 0;var T=function(y){function d(c,s,a){return y.call(this,c,s,a)||this}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey);this.oldStyleValue=s.style[this.styleProperty],c.changeStyle(s,this.styleProperty,this.styleValue)},d.prototype.undo=function(c){var s=c.model.findItem(this.itemKey);c.changeStyle(s,this.styleProperty,this.oldStyleValue)},d}(b(3259).ChangeStyleHistoryItemBase);P.ChangeStyleHistoryItem=T},3259:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStyleHistoryItemBase=void 0;var T=function(y){function d(c,s,a){var u=y.call(this)||this;return u.itemKey=c,u.styleProperty=s,u.styleValue=a,u}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey);this.oldStyleValue=s.style[this.styleProperty],c.changeStyle(s,this.styleProperty,this.styleValue)},d.prototype.undo=function(c){var s=c.model.findItem(this.itemKey);c.changeStyle(s,this.styleProperty,this.oldStyleValue)},d}(b(4412).HistoryItem);P.ChangeStyleHistoryItemBase=T},926:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeStyleTextHistoryItem=void 0;var T=function(y){function d(c,s,a){return y.call(this,c,s,a)||this}return S(d,y),d.prototype.redo=function(c){var s=c.model.findItem(this.itemKey);this.oldStyleValue=s.styleText[this.styleProperty],c.changeStyleText(s,this.styleProperty,this.styleValue)},d.prototype.undo=function(c){var s=c.model.findItem(this.itemKey);c.changeStyleText(s,this.styleProperty,this.oldStyleValue)},d}(b(3259).ChangeStyleHistoryItemBase);P.ChangeStyleTextHistoryItem=T},7176:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ImageCache=P.CacheImageInfo=void 0;var f=b(6477),S=b(6617),T=b(8675),y=function(){function c(s,a,u,h,g){this._base64=void 0!==s?f.Base64Utils.normalizeToDataUrl(s,"image/png"):void 0,this.actualId=a,this._referenceInfo=h,this._isLoaded=void 0!==g&&g,this.imageUrl=u}return Object.defineProperty(c.prototype,"isLoaded",{get:function(){return this._referenceInfo?this._referenceInfo._isLoaded:this._isLoaded},set:function(s){this._isLoaded=s},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"base64",{get:function(){return this._base64},set:function(s){this._base64=f.Base64Utils.normalizeToDataUrl(s,"image/png")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"referenceInfo",{get:function(){return this._referenceInfo},set:function(s){this._referenceInfo=s,this._base64=void 0,this._isLoaded=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isLoading",{get:function(){return this._referenceInfo?this.referenceInfo._isLoading:this._isLoading},enumerable:!1,configurable:!0}),c.prototype.startLoading=function(){this._referenceInfo?this._referenceInfo.startLoading():this._isLoading=!0},c.prototype.finalizeLoading=function(){this._referenceInfo?this._referenceInfo.finalizeLoading():this._isLoading=!1},c}();P.CacheImageInfo=y;var d=function(){function c(){this.emptyImageId=0,this.lastActualId=0,this.onReadyStateChanged=new T.EventDispatcher,this.cache=[],this.nonLoadedImages=[],this.createUnloadedInfoByBase64(S.ImageInfo.transparentOnePixelImage).isLoaded=!0}return c.prototype.reset=function(){this.cache.splice(1),this.nonLoadedImages=[],this.lastActualId=1},Object.defineProperty(c.prototype,"emptyImage",{get:function(){return this.cache[this.emptyImageId]},enumerable:!1,configurable:!0}),c.prototype.getImageData=function(s){return this.cache[s]},c.prototype.createUnloadedInfoByUrl=function(s){return this.findInfoByUrl(s)||this.registerImageData(new y(void 0,this.getNextActualId(),s))},c.prototype.createUnloadedInfoByBase64=function(s){return this.findInfoByBase64(s)||this.registerImageData(new y(s,this.getNextActualId()))},c.prototype.createUnloadedInfoByShapeImageInfo=function(s){var a=s.exportUrl;return f.Base64Utils.checkPrependDataUrl(a)?this.createUnloadedInfoByBase64(a):this.createUnloadedInfoByUrl(a)},c.prototype.registerImageData=function(s){var a=this.cache[s.actualId];return a||(a=s),void 0!==s.actualId&&(this.cache[s.actualId]=a),0!==s.actualId&&(this.nonLoadedImages.push(s),1===this.nonLoadedImages.length&&this.raiseReadyStateChanged(!1)),a},c.prototype.loadAllImages=function(s){var a=this;this.cache.forEach(function(u){a.emptyImageId===u.actualId||u.isLoaded||u.isLoading||s.load(u)})},c.prototype.finalizeLoading=function(s,a){s.finalizeLoading(),s.isLoaded=!0;var u=this.nonLoadedImages.indexOf(s);if(this.nonLoadedImages.splice(u,1),0===this.nonLoadedImages.length&&this.raiseReadyStateChanged(!0),!s.referenceInfo&&a.base64){var h=f.Base64Utils.normalizeToDataUrl(a.base64,"image/png");this.cache.forEach(function(g){var _=g.base64===h&&g!==s&&g.isLoaded;return _&&(s.referenceInfo=g.referenceInfo?g.referenceInfo:g),_}),s.base64=h}},c.prototype.hasNonLoadedImages=function(){return 0!==this.nonLoadedImages.length},c.prototype.getNextActualId=function(){return this.lastActualId++},c.prototype.findInfoByBase64=function(s){return s=f.Base64Utils.normalizeToDataUrl(s,"image/png"),this.findInfoCore(function(a){return a.base64===s})},c.prototype.findInfoByUrl=function(s){return this.findInfoCore(function(a){return a.imageUrl===s})},c.prototype.findInfoCore=function(s){var a;return this.cache.forEach(function(u){s(u)&&(a=u)}),a},c.prototype.raiseReadyStateChanged=function(s){this.onReadyStateChanged.raise1(function(a){return a.notifyImageCacheReadyStateChanged(s)})},c.instance=new c,c}();P.ImageCache=d},6617:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ImageInfo=void 0;var f=b(6477),S=function(){function T(y){this.url=void 0,this.base64=void 0,y&&(f.Base64Utils.checkPrependDataUrl(y)?this.base64=y:this.url=y),this.loadFailed=!1}return T.prototype.clone=function(){var y=new T;return y.url=this.url,y.base64=this.base64,y},Object.defineProperty(T.prototype,"isEmpty",{get:function(){return void 0===this.url&&void 0===this.base64},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"unableToLoad",{get:function(){return this.loadFailed},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"renderUrl",{get:function(){return this.base64||""},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"exportUrl",{get:function(){return this.base64?this.base64:this.url},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"actualUrl",{get:function(){return this.url?this.url:this.base64},enumerable:!1,configurable:!0}),Object.defineProperty(T,"transparentOnePixelImage",{get:function(){return this.transparentWhiteImage1_1},enumerable:!1,configurable:!0}),T.prototype.loadBase64Content=function(y){this.base64=f.Base64Utils.normalizeToDataUrl(y,"image/png")},T.prototype.setUnableToLoadFlag=function(){this.loadFailed=!0},T.transparentWhiteImage1_1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAANSURBVBhXY/j///9/AAn7A/0FQ0XKAAAAAElFTkSuQmCC",T}();P.ImageInfo=S},590:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ImageLoader=void 0;var f=b(7176),S=function(){function T(y){this.loadedCallback=y}return T.prototype.load=function(y){y.isLoaded?this.loadedCallback(y):y.isLoading||this.loadInner(y)},T.prototype.loadInner=function(y){var d=this;return y.imageUrl?this.loadPictureByUrl(y,function(){return d.finalizeLoading(y,y)}):y.base64&&this.loadPictureByBase64(y,function(){return d.finalizeLoading(y,y)}),y},T.prototype.finalizeLoading=function(y,d){d||(d=f.ImageCache.instance.getImageData(y.actualId)),d.isLoaded||f.ImageCache.instance.finalizeLoading(d,y),this.loadedCallback(d)},T.prototype.loadPictureByBase64=function(y,d){var c=new Image;c.onload=function(){d(y)},c.src=y.base64},T.prototype.loadPictureByUrl=function(y,d){var c=this,s=new XMLHttpRequest;try{s.onload=function(){var a=new FileReader;a.onloadend=function(){y.base64=a.result,c.loadPictureByBase64(y,function(u){return d(u)})},a.readAsDataURL(s.response)},s.onerror=function(){return d(y)},s.onloadend=function(){404===s.status&&d(y)},s.open("GET",y.imageUrl,!0),s.responseType="blob",y.startLoading(),s.send()}catch{}},T}();P.ImageLoader=S},5941:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.BPMNNode=P.BPMNImporter=void 0;var T=b(213),y=b(2259),d=b(8217),c=b(6572),s=function(){function h(g){this.doc=c.ImportUtils.createDocument(g),this.graph=new T.Graph([],[])}return h.prototype.import=function(){for(var g=void 0,_=0;g=this.doc.children[_];_++)"DEFINITIONS"===g.nodeName.toUpperCase()&&this.onDefinitionsElement(g);return this.validate(),this.graph},h.prototype.validate=function(){var g={};this.graph.nodes.forEach(function(w){return g[w]=!0});for(var _=0,x=void 0;x=this.graph.edges[_];_++)g[x.from]&&g[x.to]||(this.graph.edges.splice(_,1),_--)},h.prototype.onDefinitionsElement=function(g){this.dataSourceKey=g.getAttribute("id");for(var _=void 0,x=0;_=g.children[x];x++)"PROCESS"===_.nodeName.toUpperCase()&&this.onProcessElement(_)},h.prototype.onProcessElement=function(g){for(var _=void 0,x=0;_=g.children[x];x++)switch(_.nodeName.toUpperCase()){case"STARTEVENT":this.onStartEventElement(_);break;case"SEQUENCEFLOW":this.onSequenceFlowElement(_);break;case"SCRIPTTASK":this.onScriptTaskElement(_);break;case"USERTASK":this.onUserTaskElement(_);break;case"SERVICETASK":this.onServiceTaskElement(_);break;case"SENDTASK":this.onSendTaskElement(_);break;case"EXCLUSIVEGATEWAY":this.onExclusiveGateway(_);break;case"ENDEVENT":this.onEndEventGateway(_)}},h.prototype.onStartEventElement=function(g){var _=this.createNode(g);_.type=y.ShapeTypes.Ellipse,_.text=g.getAttribute("name"),this.graph.addNode(_)},h.prototype.onSequenceFlowElement=function(g){var _=g.getAttribute("sourceRef"),x=g.getAttribute("targetRef"),w=this.createEdge(g,_,x);g.hasAttribute("name")&&(w.text=g.getAttribute("name")),this.graph.addEdge(w)},h.prototype.onScriptTaskElement=function(g){var _=this.createNode(g);_.text=g.getAttribute("name"),this.graph.addNode(_)},h.prototype.onUserTaskElement=function(g){var _=this.createNode(g);_.text=g.getAttribute("name"),this.graph.addNode(_)},h.prototype.onServiceTaskElement=function(g){var _=this.createNode(g);_.text=g.getAttribute("name"),this.graph.addNode(_)},h.prototype.onSendTaskElement=function(g){var _=this.createNode(g);_.text=g.getAttribute("name"),this.graph.addNode(_)},h.prototype.onExclusiveGateway=function(g){var _=this.createNode(g);_.text=g.getAttribute("name"),_.type=y.ShapeTypes.Decision,this.graph.addNode(_)},h.prototype.onEndEventGateway=function(g){var _=this.createNode(g);_.text=g.getAttribute("name"),_.type=y.ShapeTypes.Ellipse,this.graph.addNode(_)},h.prototype.createNode=function(g){return new a(this.dataSourceKey,g.getAttribute("id"))},h.prototype.createEdge=function(g,_,x){return new u(this.dataSourceKey,g.getAttribute("id"),_,x)},h}();P.BPMNImporter=s;var a=function(h,g){this.sourceKey=h,this.key=g,this.type=y.ShapeTypes.Rectangle};P.BPMNNode=a;var u=function(h){function g(_,x,w,D){var C=h.call(this,x,w,D)||this;return C.sourceKey=_,C}return S(g,h),g}(d.Edge)},5885:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Exporter=void 0;var f=b(5503),S=b(7959),T=b(8675),y=function(){function d(){}return d.prototype.export=function(c){var s={page:{},connectors:[],shapes:[]};return s.page={width:c.size.width,height:c.size.height,pageColor:c.pageColor,pageWidth:c.pageSize.width,pageHeight:c.pageSize.height,pageLandscape:c.pageLandscape},this.exportItemsCore(c.items,s),JSON.stringify(s)},d.prototype.exportItems=function(c){var s={connectors:[],shapes:[]};return this.exportItemsCore(c,s),JSON.stringify(s)},d.prototype.exportItemsCore=function(c,s){var a=this;c.forEach(function(u){if(u instanceof f.Shape)s.shapes.push(a.exportShape(u));else if(u instanceof S.Connector){var h=a.exportConnector(u);u.beginItem&&(h.beginItemKey=u.beginItem.key,h.beginConnectionPointIndex=u.beginConnectionPointIndex),u.endItem&&(h.endItemKey=u.endItem.key,h.endConnectionPointIndex=u.endConnectionPointIndex),s.connectors.push(h)}})},d.prototype.exportItem=function(c){return{key:c.key,dataKey:c.dataKey,customData:T.ObjectUtils.cloneObject(c.customData),locked:c.locked,zIndex:c.zIndex}},d.prototype.exportShape=function(c){var s=this.exportItem(c);s.type=c.description.key,s.text=c.text,c.image.isEmpty||(s.imageUrl=c.image.exportUrl),s.x=c.position.x,s.y=c.position.y,s.width=c.size.width,s.height=c.size.height;var a=c.parameters.toObject();a&&(s.parameters=a);var u=c.style.toObject();u&&(s.style=u);var h=c.styleText.toObject();return h&&(s.styleText=h),c.children.length&&(s.childKeys=c.children.map(function(g){return g.key})),c.expanded||(s.expanded=!1),c.expandedSize&&(s.expandedWidth=c.expandedSize.width,s.expandedHeight=c.expandedSize.height),s},d.prototype.exportConnector=function(c){var s=this.exportItem(c);s.points=c.points.map(function(x){return{x:x.x,y:x.y}});var a=c.texts.toObject();a&&(s.texts=a);var u=c.properties.toObject();u&&(s.properties=u);var h=c.style.toObject();h&&(s.style=h);var g=c.styleText.toObject();g&&(s.styleText=g);var _=c.tryCreateRenderPointsContext();return _&&(s.context=_.toObject()),s},d.prototype.exportSvg=function(c,s,a,u){a.exportSvgImage(c,s,u)},d.prototype.exportPng=function(c,s,a,u,h){a.exportPngImage(c,s,u,h)},d.prototype.exportJpg=function(c,s,a,u,h){a.exportJpgImage(c,s,u,h)},d}();P.Exporter=y},6572:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ImportUtils=void 0;var b=function(){function f(){}return f.parseJSON=function(S){if(!S||""===S)return{};try{return JSON.parse(S)}catch{return{}}},f.createDocument=function(S){return(new DOMParser).parseFromString(S,"application/xml")},f}();P.ImportUtils=b},2406:function(o,P,b){var f,S=this&&this.__extends||(f=function(D,C){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,L){I.__proto__=L}||function(I,L){for(var N in L)L.hasOwnProperty(N)&&(I[N]=L[N])})(D,C)},function(D,C){function I(){this.constructor=D}f(D,C),D.prototype=null===C?Object.create(C):(I.prototype=C.prototype,new I)});Object.defineProperty(P,"__esModule",{value:!0}),P.Importer=void 0;var T=b(5503),y=b(8675),d=b(6353),c=b(8900),s=b(8397),a=b(7959),u=b(6617),h=b(8577),g=b(6572),_=b(13),x=b(1510),w=function(D){function C(I,L){var N=D.call(this,I)||this;return N.obj=g.ImportUtils.parseJSON(L),N}return S(C,D),C.prototype.getObject=function(){return this.obj},C.prototype.getPageObject=function(I){return I.page},C.prototype.getShapeObjects=function(I){return I.shapes},C.prototype.getConnectorObjects=function(I){return I.connectors},C.prototype.importPageSettings=function(I,L){L&&(this.assert(L.width,"number"),this.assert(L.height,"number"),"number"==typeof L.width&&(I.size.width=L.width),"number"==typeof L.height&&(I.size.height=L.height),"number"==typeof L.pageColor?I.pageColor=L.pageColor:"string"==typeof L.pageColor&&(I.pageColor=_.ColorUtils.fromString(L.pageColor)),"number"==typeof L.pageWidth&&(I.pageSize.width=L.pageWidth),"number"==typeof L.pageHeight&&(I.pageSize.height=L.pageHeight),"boolean"==typeof L.pageLandscape&&(I.pageLandscape=L.pageLandscape))},C.prototype.importShape=function(I){this.assert(I.key,"string"),this.assert(I.x,"number"),this.assert(I.y,"number"),this.assert(I.type,"string");var N=this.shapeDescriptionManager.get(I.type),G=new c.Point(I.x,I.y),k=new T.Shape(N||s.ShapeDescriptionManager.default,G);return k.key=I.key,"string"!=typeof I.dataKey&&"number"!=typeof I.dataKey||(k.dataKey=I.dataKey),"object"==typeof I.customData&&(k.customData=y.ObjectUtils.cloneObject(I.customData)),"boolean"==typeof I.locked&&(k.locked=I.locked),"number"==typeof I.width&&(k.size.width=I.width),"number"==typeof I.height&&(k.size.height=I.height),"string"==typeof I.text&&(k.text=I.text),"string"==typeof I.imageUrl&&(k.image=new u.ImageInfo(I.imageUrl)),I.parameters&&(k.parameters.fromObject(I.parameters),k.description.normalizeParameters(k,k.parameters)),I.style&&k.style.fromObject(I.style),I.styleText&&k.styleText.fromObject(I.styleText),"number"==typeof I.zIndex&&(k.zIndex=I.zIndex),Array.isArray(I.childKeys)&&(k.childKeys=I.childKeys.slice()),"boolean"==typeof I.expanded&&(k.expanded=I.expanded),"number"==typeof I.expandedWidth&&"number"==typeof I.expandedHeight&&(k.expandedSize=new d.Size(I.expandedWidth,I.expandedHeight)),k},C.prototype.importShapeChildren=function(I,L){return[]},C.prototype.importConnector=function(I){var L=this;if(this.assert(I.key,"string"),!Array.isArray(I.points))throw Error("Invalid Format");var N=I.points.map(function(k){return L.assert(k.x,"number"),L.assert(k.y,"number"),new c.Point(k.x,k.y)}),G=new a.Connector(N);return G.key=I.key,"string"!=typeof I.dataKey&&"number"!=typeof I.dataKey||(G.dataKey=I.dataKey),"object"==typeof I.customData&&(G.customData=y.ObjectUtils.cloneObject(I.customData)),"boolean"==typeof I.locked&&(G.locked=I.locked),G.endConnectionPointIndex="number"==typeof I.endConnectionPointIndex?I.endConnectionPointIndex:-1,G.beginConnectionPointIndex="number"==typeof I.beginConnectionPointIndex?I.beginConnectionPointIndex:-1,void 0!==I.endItemKey&&this.assert(I.endItemKey,"string"),void 0!==I.beginItemKey&&this.assert(I.beginItemKey,"string"),G.endItemKey=I.endItemKey,G.beginItemKey=I.beginItemKey,I.texts&&G.texts.fromObject(I.texts),I.properties&&G.properties.fromObject(I.properties),I.style&&G.style.fromObject(I.style),I.styleText&&G.styleText.fromObject(I.styleText),"number"==typeof I.zIndex&&(G.zIndex=I.zIndex),void 0!==I.context&&G.replaceRenderPoints(x.ConnectorRenderPointsContext.fromObject(I.context),!1),G},C}(h.ImporterBase);P.Importer=w},8577:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ImporterBase=void 0;var f=b(6613),S=b(5503),T=function(){function y(d){this.shapeDescriptionManager=d}return y.prototype.import=function(){var d=new f.DiagramModel,c=this.getObject();this.importPageSettings(d,this.getPageObject(c));for(var s=this.importShapes(this.getShapeObjects(c)),a=0;a<s.length;a++){var u=s[a];if(d.findItem(u.key))throw Error("Item key is duplicated");d.pushItem(u)}var h=this.importConnectors(this.getConnectorObjects(c));for(a=0;a<h.length;a++){var g=h[a];if(g.endItem=d.findItem(g.endItemKey)||void 0,delete g.endItemKey,g.beginItem=d.findItem(g.beginItemKey)||void 0,delete g.beginItemKey,d.findItem(g.key))throw Error("Item key is duplicated");d.pushItem(g),this.updateConnections(g)}return this.updateChildren(d.items,function(_){return d.findItem(_)}),d},y.prototype.importItems=function(d){for(var c,s=[],a=this.getObject(),u={},h=this.importShapes(this.getShapeObjects(a)),g=0;g<h.length;g++){var _=h[g],x=_.key;c=d.getNextKey(),_.key=c,u[x]=_,void 0!==_.dataKey&&(_.dataKey=void 0),s.push(_)}var w=this.importConnectors(this.getConnectorObjects(a));for(g=0;g<w.length;g++){var D=w[g];x=D.key,c=d.getNextKey(),D.key=c,u[x]=D,void 0!==D.dataKey&&(D.dataKey=void 0),D.endItem=u[D.endItemKey],delete D.endItemKey,D.beginItem=u[D.beginItemKey],delete D.beginItemKey,s.push(D),this.updateConnections(D)}return this.updateChildren(s,function(L){return u[L]}),s},y.prototype.importItemsData=function(d){for(var c=this.getObject(),s=this.importShapes(this.getShapeObjects(c)),a={},u=0;u<s.length;u++){var h=s[u],g=void 0;void 0!==h.dataKey&&(g=d.findShapeByDataKey(h.dataKey)),g&&(g.dataKey=h.dataKey,a[h.key]=h.dataKey,g.locked=h.locked,g.position=h.position.clone(),g.expanded=h.expanded,h.expandedSize&&(g.expandedSize=h.expandedSize.clone()),g.size=h.size.clone(),g.parameters=h.parameters.clone(),g.style=h.style.clone(),g.styleText=h.styleText.clone(),g.zIndex=h.zIndex,g.text=h.text,g.description=h.description,g.image=h.image.clone())}var _=this.importConnectors(this.getConnectorObjects(c));for(u=0;u<_.length;u++){var x=_[u],w=void 0;void 0!==x.dataKey&&(w=d.findConnectorByDataKey(x.dataKey)),w||(w=d.findConnectorByBeginEndDataKeys(a[x.beginItemKey],a[x.endItemKey])),w&&(w.dataKey=x.dataKey,w.locked=x.locked,w.points=x.points.slice(),w.properties=x.properties.clone(),w.style=x.style.clone(),w.endConnectionPointIndex=x.endConnectionPointIndex,w.beginConnectionPointIndex=x.beginConnectionPointIndex,w.texts=x.texts.clone(),w.styleText=x.styleText.clone(),w.zIndex=x.zIndex)}},y.prototype.importShapes=function(d){var c=[];if(!d)return c;if(!Array.isArray(d))throw Error("Invalid Format");for(var s=0;s<d.length;s++){var a=d[s],u=this.importShape(a);c.push(u),c=c.concat(this.importShapeChildren(a,u))}return c},y.prototype.importConnectors=function(d){var c=[];if(!d)return c;if(!Array.isArray(d))throw Error("Invalid Format");for(var s=0;s<d.length;s++)c.push(this.importConnector(d[s]));return c},y.prototype.updateChildren=function(d,c){d.forEach(function(s){s instanceof S.Shape&&s.childKeys&&(s.childKeys.forEach(function(a){var u=c(a);u&&(-1===s.children.indexOf(u)&&s.children.push(u),u.container=s)}),delete s.childKeys)})},y.prototype.updateConnections=function(d){d.endItem&&(d.endItem instanceof S.Shape?(d.endItem.attachedConnectors.push(d),d.points[d.points.length-1]=d.endItem.getConnectionPointPosition(d.endConnectionPointIndex,d.points[d.points.length-2])):(d.endItem=void 0,d.endConnectionPointIndex=-1)),d.beginItem&&(d.beginItem instanceof S.Shape?(d.beginItem.attachedConnectors.push(d),d.points[0]=d.beginItem.getConnectionPointPosition(d.beginConnectionPointIndex,d.points[1])):(d.beginItem=void 0,d.beginConnectionPointIndex=-1))},y.prototype.assert=function(d,c){if(void 0===d||void 0!==c&&typeof d!==c)throw Error("Invalid Format")},y}();P.ImporterBase=T},780:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.XmlImporter=void 0;var T=b(7959),y=b(5503),d=b(8577),c=b(2259),s=b(8397),a=b(6353),u=b(8900),h=b(6572),g=b(13),_=b(9291),x=function(w){function D(C,I){var L=w.call(this,C)||this;return L.doc=h.ImportUtils.createDocument(I),L}return S(D,w),D.prototype.getObject=function(){return this.doc},D.prototype.getPageObject=function(C){var I=this.doc.querySelectorAll("[ItemKind='DiagramRoot']");return I&&I[0]},D.prototype.getShapeObjects=function(C){var I=[];return this.doc.querySelectorAll("[ItemKind='DiagramRoot'] > Children > [ItemKind='DiagramShape']").forEach(function(L){I.push(L)}),this.doc.querySelectorAll("[ItemKind='DiagramRoot'] > Children > [ItemKind='DiagramContainer']").forEach(function(L){I.push(L)}),I},D.prototype.getConnectorObjects=function(C){var I=[];return this.doc.querySelectorAll("[ItemKind='DiagramRoot'] > Children > [ItemKind='DiagramConnector']").forEach(function(L){I.push(L)}),I},D.prototype.importPageSettings=function(C,I){if(I){var L=I.getAttribute("PageSize"),N=this.getSize(L);N&&(C.size=N.clone(),C.pageSize=N.clone())}},D.prototype.importShape=function(C){var I=C.getAttribute("Position"),L=this.getPoint(I),N=C.getAttribute("Shape"),G=this.getShapeType(N),k=this.shapeDescriptionManager.get(G),U=new y.Shape(k||s.ShapeDescriptionManager.default,L);U.key=this.getItemKey(C);var B=C.getAttribute("Size"),K=this.getSize(B);K&&(U.size=K);var J=C.getAttribute("Content");if("string"==typeof J)U.text=J;else{var ie=C.getAttribute("Header");"string"==typeof ie&&(U.text=ie)}return this.importStyle(C,U),U},D.prototype.importShapeChildren=function(C,I){var L=[];C.setAttribute("dxDiagram",""),this.doc.querySelectorAll("[dxDiagram] > Children > [ItemKind='DiagramShape']").forEach(function(K){L.push(K)}),this.doc.querySelectorAll("[dxDiagram] > Children > [ItemKind='DiagramContainer']").forEach(function(K){L.push(K)}),C.removeAttribute("dxDiagram");var N=[];if(!L)return N;for(var G=0;G<L.length;G++){var k=L[G],U=this.importShape(k);U.key=I.key+","+U.key;var B=I.clientRectangle;U.position=U.position.clone().offset(B.x,B.y),I.childKeys||(I.childKeys=[]),I.childKeys.push(U.key),N.push(U),N=N.concat(this.importShapeChildren(k,U))}return N},D.prototype.importConnector=function(C){var I=this,L=[],N=C.getAttribute("BeginPoint"),G=this.getPoint(N);G&&L.push(G),C.getAttribute("Points").split(" ").forEach(function(Q){var te=I.getPoint(Q);te&&L.push(te)});var k=C.getAttribute("EndPoint"),U=this.getPoint(k);U&&L.push(U);var B=new T.Connector(L);B.key=this.getItemKey(C);var K=C.getAttribute("EndItemPointIndex"),J=parseInt(K);B.endConnectionPointIndex=isNaN(J)?-1:J;var ie=C.getAttribute("BeginItemPointIndex"),re=parseInt(ie);B.beginConnectionPointIndex=isNaN(re)?-1:re;var q=C.getAttribute("EndItem");void 0!==q&&this.assert(q,"string");var Y=C.getAttribute("BeginItem");void 0!==Y&&this.assert(Y,"string"),B.endItemKey=q,B.beginItemKey=Y;var Z=C.getAttribute("Content");return"string"==typeof Z&&B.setText(Z),this.importStyle(C,B),B},D.prototype.importStyle=function(C,I){var L=C.getAttribute("Background");"string"==typeof L&&(I.style.fill=this.getColor(L));var N=C.getAttribute("Stroke");"string"==typeof N&&(I.style.stroke=this.getColor(N));var G=C.getAttribute("Foreground");"string"==typeof G&&(I.styleText.fill=this.getColor(G));var k=C.getAttribute("FontFamily");"string"==typeof k&&(I.styleText["font-family"]=k);var U=C.getAttribute("FontSize");"string"==typeof U&&(I.styleText["font-size"]=U),"Bold"===C.getAttribute("FontWeight")&&(I.styleText["font-weight"]="bold"),"Italic"===C.getAttribute("FontStyle")&&(I.styleText["font-style"]="italic"),"Underline"===C.getAttribute("TextDecorations")&&(I.styleText["text-decoration"]="underline");var B=C.getAttribute("TextAlignment");"Left"===B?I.styleText["text-anchor"]="start":"Right"===B?I.styleText["text-anchor"]="end":"Center"===B&&(I.styleText["text-anchor"]="middle")},D.prototype.getShapeType=function(C){return D.shapeTypes[C]?D.shapeTypes[C]:C&&C.toLowerCase().indexOf("container")>-1?c.ShapeTypes.VerticalContainer:c.ShapeTypes.Rectangle},D.prototype.getItemKey=function(C){return(parseInt(C.tagName.replace("Item",""))-1).toString()},D.prototype.getNumbers=function(C){var I=C.split(",");return I&&I.length?I.map(function(L){return+L}):[]},D.prototype.getSize=function(C){if(C){var I=this.getNumbers(C);if(I.length>=2)return this.assert(I[0],"number"),this.assert(I[1],"number"),new a.Size(_.UnitConverter.pixelsToTwips(I[0]),_.UnitConverter.pixelsToTwips(I[1]))}},D.prototype.getPoint=function(C){if(C){var I=this.getNumbers(C);if(I.length>=2)return this.assert(I[0],"number"),this.assert(I[1],"number"),new u.Point(_.UnitConverter.pixelsToTwips(I[0]),_.UnitConverter.pixelsToTwips(I[1]))}},D.prototype.getColor=function(C){C="#"===C.charAt(0)?C.substr(1):C;var I=parseInt(C,16);return isNaN(I)?void 0:g.ColorUtils.colorToHash(I)},D.shapeTypes={"BasicShapes.Rectangle":c.ShapeTypes.Rectangle,"BasicShapes.Ellipse":c.ShapeTypes.Ellipse,"BasicShapes.Triangle":c.ShapeTypes.Triangle,"BasicShapes.Pentagon":c.ShapeTypes.Pentagon,"BasicShapes.Hexagon":c.ShapeTypes.Hexagon,"BasicShapes.Octagon":c.ShapeTypes.Octagon,"BasicShapes.Diamond":c.ShapeTypes.Diamond,"BasicShapes.Cross":c.ShapeTypes.Cross,"BasicShapes.Star5":c.ShapeTypes.Star,"BasicFlowchartShapes.StartEnd":c.ShapeTypes.Terminator,"BasicFlowchartShapes.Data":c.ShapeTypes.Data,"BasicFlowchartShapes.Database":c.ShapeTypes.Database,"BasicFlowchartShapes.ExternalData":c.ShapeTypes.StoredData,"BasicFlowchartShapes.Process":c.ShapeTypes.Process,"BasicFlowchartShapes.Decision":c.ShapeTypes.Decision,"BasicFlowchartShapes.Subprocess":c.ShapeTypes.PredefinedProcess,"BasicFlowchartShapes.Document":c.ShapeTypes.Document,"BasicFlowchartShapes.Custom1":c.ShapeTypes.ManualInput,"BasicFlowchartShapes.Custom2":c.ShapeTypes.ManualOperation,"ArrowShapes.SimpleArrow":c.ShapeTypes.ArrowLeft,"ArrowShapes.SimpleDoubleArrow":c.ShapeTypes.ArrowLeftRight},D}(d.ImporterBase);P.XmlImporter=x},5227:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.LayoutBuilder=void 0;var f=b(8710),S=function(){function T(y,d){this.settings=y,this.graph=d}return T.prototype.getBreadthNodeSizeCore=function(y,d){var c=this.settings.orientation===f.DataLayoutOrientation.Vertical?y.size.width:y.size.height;return d||(c+=this.settings.orientation===f.DataLayoutOrientation.Vertical?y.margin.left+y.margin.right:y.margin.top+y.margin.bottom),c},T.prototype.getDepthNodeSizeCore=function(y){return this.settings.orientation===f.DataLayoutOrientation.Horizontal?y.size.width+y.margin.left+y.margin.right:y.size.height+y.margin.top+y.margin.bottom},T.prototype.chooseDirectionValue=function(y,d){return this.settings.direction===f.LogicalDirectionKind.Forward?y:d},T.prototype.getDirectionValue=function(y){return this.settings.direction===f.LogicalDirectionKind.Forward?y:-y},T.prototype.getComponentOffset=function(y){var d=y.getRectangle(!0);return(this.settings.orientation===f.DataLayoutOrientation.Vertical?d.width:d.height)+this.settings.componentSpacing},T.prototype.setComponentOffset=function(y,d){return this.settings.orientation===f.DataLayoutOrientation.Vertical?y.offsetNodes(d):y.offsetNodes(0,d)},T}();P.LayoutBuilder=S},1256:function(o,P,b){var f,S=this&&this.__extends||(f=function(k,U){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,K){B.__proto__=K}||function(B,K){for(var J in K)K.hasOwnProperty(J)&&(B[J]=K[J])})(k,U)},function(k,U){function B(){this.constructor=k}f(k,U),k.prototype=null===U?Object.create(U):(B.prototype=U.prototype,new B)});Object.defineProperty(P,"__esModule",{value:!0}),P.EdgeOnLayer=P.NodeOnLayer=P.SugiyamaNodesOrderer=P.SugiyamaLayerDistributor=P.SugiyamaLayoutBuilder=void 0;var T=b(5227),y=b(213),d=b(617),c=b(8217),s=b(701),a=b(2400),u=b(8900),h=b(8710),g=b(8119),_=b(7959),x=b(7309),w=function(k){function U(){return null!==k&&k.apply(this,arguments)||this}return S(U,k),U.prototype.build=function(){var B=this,K=0,J=new g.GraphLayout,ie=new C;return this.graph.getConnectedComponents().forEach(function(re){var q=x.CycleRemover.removeCycles(re),Y=D.getLayers(q.graph),Z=ie.orderNodes(q.graph,Y),Q=Object.keys(q.removedEdges).map(function(z){return re.getEdge(z)}),te=ie.assignAbsCoordinates(Z),pe=B.createInfoGraphLayout(te,q.reversedEdges,Q);J.extend(B.setComponentOffset(pe,K)),K+=B.getComponentOffset(pe)}),J},U.prototype.createInfoGraphLayout=function(B,K,J){for(var ie=this,re=new u.Point(0,0),q=B.items,Y=new s.HashSet(q.map(function(de){return de.layer}).sort(function(de,ue){return de-ue})),Z=this.getAbsOffsetInfo(B.items),Q={},te=0,pe=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,z=Number.MIN_SAFE_INTEGER||Number.MAX_VALUE,oe=function(de){var ue=Y.item(de),be=0;q.filter(function(ve){return ve.layer===ue}).sort(function(ve,le){return ve.position-le.position}).forEach(function(ve){var le=ie.getDepthNodeSize(ve),Ce=ie.chooseDirectionValue(0,le),ye=ie.getAbsPosition(ve.position,ie.getBreadthNodeSize(ve),Z);re=ie.setBreadth(re,ye);var ge=ie.setDepthOffset(re,-Ce);if(Q[ve.key]=ge,!ve.isDummy){var fe=ie.settings.orientation===h.DataLayoutOrientation.Horizontal?ge.y:ge.x;pe=Math.min(pe,fe),z=Math.max(z,fe+ie.getBreadthNodeSize(ve)),be=Math.max(be,ie.getDepthNodeSize(ve))}}),te+=be,re=ae.setBreadth(re,0),re=ae.setDepthOffset(re,ae.getDirectionValue(be+ae.settings.layerSpacing))},ae=this,ee=0;ee<Y.length;ee++)oe(ee);te+=(Y.length-1)*this.settings.layerSpacing;var he=new g.GraphLayout;return this.createNodesLayout(B,he,pe,te,Q),this.createEdgesLayout(B,he,K,J),he},U.prototype.createNodesLayout=function(B,K,J,ie,re){var q=this,Y=this.settings.orientation===h.DataLayoutOrientation.Vertical?new u.Point(-J,this.chooseDirectionValue(0,ie)):new u.Point(this.chooseDirectionValue(0,ie),-J);B.items.forEach(function(Z){if(!Z.isDummy){var Q=q.graph.getNode(Z.key);K.addNode(new d.NodeLayout(Q,re[Z.key].clone().offset(Y.x,Y.y)))}})},U.prototype.createEdgesLayout=function(B,K,J,ie){var re=this.getDirectEdgeLayout(),q=this.getDiffLevelEdgeLayout(!0),Y=this.getDiffLevelEdgeLayout(!1),Z=this.getSameLevelEdgeLayout(!0),Q=this.getSameLevelEdgeLayout(!1),te={};B.edges.filter(function(pe){return!pe.isDummy}).concat(ie.map(function(pe){return new N(pe.key,!1,pe.from,pe.to)})).sort(function(pe,z){return B.getNode(pe.originFrom).layer-B.getNode(z.originFrom).layer||B.getNode(pe.to).layer-B.getNode(z.to).layer}).forEach(function(pe){var z=J[pe.key],oe=B.getNode(z?pe.to:pe.originFrom),ae=B.getNode(z?pe.originFrom:pe.to);if(ae.layer-oe.layer==1)K.addEdge(new d.EdgeLayout(pe.key,re.from,re.to));else{var ee=[];if(ae.position-oe.position>=1)ee.push(q),ee.push({from:re.from,to:q.to}),ee.push({from:q.from,to:re.to});else if(ae.position-oe.position<=-1)ee.push(Y),ee.push({from:re.from,to:Y.to}),ee.push({from:Y.from,to:re.to});else{var he=oe.position===ae.position&&0===ae.position?[Z,Q]:[Q,Z];he.forEach(function(le){return ee.push(le)}),he.forEach(function(le){ee.push({from:le.from,to:re.to}),ee.push({from:re.from,to:le.to})})}ee.push(re);for(var de=0,ue=void 0;ue=ee[de];de++){var be=oe.key+"_"+ue.from,ve=ae.key+"_"+ue.to;if(te[be]!==_.ConnectorPosition.End&&te[ve]!==_.ConnectorPosition.Begin){K.addEdge(new d.EdgeLayout(pe.key,ue.from,ue.to)),te[be]=_.ConnectorPosition.Begin,te[ve]=_.ConnectorPosition.End;break}}}})},U.prototype.getDirectEdgeLayout=function(){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?this.settings.direction===h.LogicalDirectionKind.Forward?{from:1,to:3}:{from:3,to:1}:this.settings.direction===h.LogicalDirectionKind.Forward?{from:2,to:0}:{from:0,to:2}},U.prototype.getDiffLevelEdgeLayout=function(B){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?B?{from:2,to:0}:{from:0,to:2}:B?{from:3,to:1}:{from:1,to:3}},U.prototype.getSameLevelEdgeLayout=function(B){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?B?{from:0,to:0}:{from:2,to:2}:B?{from:3,to:3}:{from:1,to:1}},U.prototype.getAbsOffsetInfo=function(B){var K=this,J={},ie=function(Y,Z){void 0===J[Z]&&(J[Z]=K.getBreadthNodeSize(Y)),J[Z]=Math.max(J[Z],K.getBreadthNodeSize(Y))};B.forEach(function(Y){var Z=G(Y.position);ie(Y,Z),J[Z]%1!=0&&ie(Y,Z+1)});var re={},q=0;return Object.keys(J).sort(function(Y,Z){return parseFloat(Y)-parseFloat(Z)}).forEach(function(Y){re[Y]={leftOffset:q,width:J[Y]},q+=J[Y]+K.settings.columnSpacing}),re},U.prototype.setBreadth=function(B,K){return this.settings.orientation===h.DataLayoutOrientation.Vertical?new u.Point(K,B.y):new u.Point(B.x,K)},U.prototype.setDepthOffset=function(B,K){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?new u.Point(B.x+K,B.y):new u.Point(B.x,B.y+K)},U.prototype.getAbsPosition=function(B,K,J){var ie=G(B),re=J[ie].leftOffset,q=J[ie].width;return B%1==0?re+(q-K)/2:re+q-(K-this.settings.columnSpacing)/2},U.prototype.getBreadthNodeSize=function(B){return B.isDummy?0:this.getBreadthNodeSizeCore(this.graph.getNode(B.key))},U.prototype.getDepthNodeSize=function(B){return B.isDummy?0:this.getDepthNodeSizeCore(this.graph.getNode(B.key))},U}(T.LayoutBuilder);P.SugiyamaLayoutBuilder=w;var D=function(){function k(){}return k.getLayers=function(U){var B=this.getFeasibleTree(U);return this.calcNodesLayers(B)},k.getFeasibleTree=function(U){var B=this.initLayerAssignment(U);return U.getSpanningGraph(U.nodes[0],c.ConnectionMode.OutgoingAndIncoming,function(K){return B[K.to]-B[K.from]})},k.initLayerAssignment=function(U){for(var B={},K=0,J={},ie=U.nodes.filter(function(q){return!U.getAdjacentEdges(q,c.ConnectionMode.Incoming).length}),re=function(){ie.forEach(function(Y){B[Y]=K,J[Y]=!0}),Object.keys(J).forEach(function(Y){0===U.getAdjacentEdges(Y,c.ConnectionMode.Outgoing).filter(function(Z){return void 0===B[Z.to]}).length&&delete J[Y]});var q={};Object.keys(J).forEach(function(Y){U.getAdjacentEdges(Y,c.ConnectionMode.Outgoing).map(function(Z){return Z.to}).filter(function(Z){return void 0===B[Z]&&U.getAdjacentEdges(Z,c.ConnectionMode.Incoming).reduce(function(Q,te){return Q&&void 0!==B[te.from]},!0)}).forEach(function(Z){return q[Z]=!0})}),ie=Object.keys(q),K++};ie.length;)re();return B},k.calcNodesLayers=function(U){var B={},K=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,J=0,ie=U.createIterator(c.ConnectionMode.OutgoingAndIncoming);for(var re in ie.visitEachEdgeOnce=!1,ie.onNode=function(q){B[q.key]=J,K=Math.min(K,J)},ie.skipNode=function(q){return void 0!==B[q.key]},ie.skipEdge=function(q){return void 0!==B[q.from]&&void 0!==B[q.to]},ie.onEdge=function(q,Y){J=Y?B[q.from]+1:B[q.to]-1},ie.iterate(U.nodes[0]),B)Object.prototype.hasOwnProperty.call(B,re)&&(B[re]-=K);return B},k}();P.SugiyamaLayerDistributor=D;var C=function(){function k(){this.idCounter=-1e4}return k.prototype.orderNodes=function(U,B){for(var K=1,J=this.initGraphInfo(U,B),ie=J.items,re=this.initOrder(ie),q=this.getNodeToPositionMap(ie),Y=this.getCrossCount(re,J),Z=!0;K<14&&0!==Y;){re=this.getNodesOrder(re,J,Z);var Q=this.getCrossCount(re,J);Q<Y&&(q=this.getNodeToPositionMap(J.items),Y=Q),Z=!Z,K++}return J.items.forEach(function(te){return te.position=q[te.key]}),J},k.prototype.getNodesOrder=function(U,B,K){var J=this,ie={},re=function(Z){if(!Object.prototype.hasOwnProperty.call(U,Z))return"continue";var Q={},te=[];U[Z].forEach(function(pe){var z=(K?B.getChildren(pe.key):B.getParents(pe.key)).map(function(oe){return B.getNode(oe).position});te.push(pe.key),Q[pe.key]=J.getNodePosition(z)}),ie[Z]=q.sortNodes(te,Q,B)},q=this;for(var Y in U)re(Y);return ie},k.prototype.sortNodes=function(U,B,K){return U.sort(function(J,ie){return B[J]-B[ie]}).map(function(J,ie){var re=K.getNode(J);return re.position=ie,re})},k.prototype.getNodePosition=function(U){if(!(U=U.sort(function(ie,re){return ie-re})).length)return 0;var B=Math.floor(U.length/2);if(2===U.length||U.length%2==1)return U[B];var K=U[B-1]-U[0],J=U[U.length-1]-U[B];return Math.floor((U[B-1]*J+U[B]*K)/(K+J))},k.prototype.initOrder=function(U){var B={};return U.forEach(function(K){return(B[K.layer]||(B[K.layer]=[])).push(K)}),B},k.prototype.getCrossCount=function(U,B){var K=0,J=function(re){if(!Object.prototype.hasOwnProperty.call(U,re))return"continue";var q=[];U[re].forEach(function(Y){var Z=B.getChildren(Y.key).map(function(Q){return B.getNode(Q).position});Z.forEach(function(Q){K+=q.filter(function(te){return Q<te}).length}),q=q.concat(Z)})};for(var ie in U)J(ie);return K},k.prototype.initGraphInfo=function(U,B){var K=this,J={},ie={},re=[],q=[];return U.nodes.forEach(function(Y){var Z=B[Y];void 0===J[Z]&&(J[Z]=0);var Q=new I(Y,!1,Z,J[Z]++);ie[Y]=Q,re.push(Q)}),U.edges.forEach(function(Y){var Z=B[Y.to]-B[Y.from];if(Z>1){for(var Q=ie[Y.from],te=1;te<Z;te++){var pe=new I(K.createDummyID(),!0,B[Y.from]+te,J[B[Y.from]+te]++);q.push(new N(K.createDummyID(),!0,Q.key,pe.key)),re.push(pe),Q=pe}q.push(new N(Y.key,!1,Q.key,ie[Y.to].key,ie[Y.from].key))}else q.push(new N(Y.key,!1,ie[Y.from].key,ie[Y.to].key))}),new y.FastGraph(re,q)},k.prototype.createDummyID=function(){return"dummy_"+--this.idCounter},k.prototype.getNodeToPositionMap=function(U){return U.reduce(function(B,K){return B[K.key]=K.position,B},{})},k.prototype.assignAbsCoordinates=function(U){var B=this.getAbsCoodinate(U);return new y.FastGraph(U.items.map(function(K){return new I(K.key,K.isDummy,K.layer,B[K.key])}),U.edges.slice(0))},k.prototype.getAbsCoodinate=function(U){var B=this,K=U.items.reduce(function(re,q){re[q.layer]=re[q.layer]||[];var Y=a.SearchUtils.binaryIndexOf(re[q.layer],function(Z){return Z.position-q.position});return re[q.layer].splice(Y<0?~Y:Y,0,q),re},{}),J=[L.TopLeft,L.TopRight,L.BottomLeft,L.BottomRight].map(function(re){return B.getPositionByMedian(U,re,K)}),ie={};return U.items.forEach(function(re){var q=J.map(function(Y){return Y[re.key]}).sort(function(Y,Z){return Y-Z});ie[re.key]=(q[1]+q[2])/2}),ie},k.prototype.getPositionByMedian=function(U,B,K){var J=U.items,ie=this.getNodeToPositionMap(J),re=this.getMedians(U,J,B);return re=this.resolveMedianConflicts(U,K,re,B),this.getSortedBlocks(U,J,re,B).forEach(function(q){var Y=q.reduce(function(Z,Q){return ie[Q.key]>Z?ie[Q.key]:Z},-2);q.forEach(function(Z){var Q=Y-ie[Z.key];Q>0&&K[Z.layer].filter(function(te){return te.position>Z.position}).forEach(function(te){return ie[te.key]+=Q}),ie[Z.key]=Y})}),ie},k.prototype.getSortedBlocks=function(U,B,K,J){for(var ie=[],re=J===L.BottomLeft||J===L.BottomRight,q=new s.HashSet(B.slice(0).sort(function(Q,te){return re?Q.layer-te.layer:te.layer-Q.layer}),function(Q){return Q.key});q.length;){var Y=q.item(0),Z=this.getBlock(U,Y,K,J);ie.push(Z),Z.forEach(function(Q){return q.remove(Q)})}return ie.sort(function(Q,te){var pe=Q.reduce(function(ee,he){return he.position<ee.position?he:ee},Q[0]),z=te.filter(function(ee){return ee.layer===pe.layer})[0];if(z)return pe.position>z.position?1:-1;var oe=te.reduce(function(ee,he){return he.position<ee.position?he:ee},te[0]),ae=Q.filter(function(ee){return ee.layer===oe.layer})[0];return ae?ae.position>oe.position?1:-1:pe.layer>oe.layer?1:-1}),ie},k.prototype.getBlock=function(U,B,K,J){var ie=[],re=null;do{re&&(B=U.getNode(J===L.TopLeft||J===L.TopRight?re.from:re.to)),ie.push(B),re=K[B.key]}while(re);return ie},k.prototype.resolveMedianConflicts=function(U,B,K,J){var ie=this,re={},q=function(Z){if(!Object.prototype.hasOwnProperty.call(B,Z))return"continue";var Q,te,pe=B[Z];J!==L.TopRight&&J!==L.BottomRight||(pe=pe.slice(0).sort(function(z,oe){return oe.position-z.position})),pe.forEach(function(z){var oe=K[z.key];if(oe){var ee=U.getNode(J===L.TopLeft||J===L.TopRight?oe.from:oe.to).position;ie.checkMedianConfict(Q,te,ee,J)?re[z.key]=null:(Q=void 0===Q?ee:Math.min(Q,ee),te=void 0===te?ee:Math.max(te,ee),re[z.key]=oe)}else re[z.key]=null})};for(var Y in B)q(Y);return re},k.prototype.checkMedianConfict=function(U,B,K,J){return void 0!==U&&void 0!==B&&(J===L.TopLeft||J===L.BottomLeft?B>=K:U<=K)},k.prototype.getMedians=function(U,B,K){var J=this,ie={};return B.forEach(function(re){var q=J.getActualAdjacentEdges(U,re,K),Y=J.getMedianPosition(q.length,K);ie[re.key]=q[Y]}),ie},k.prototype.getMedianPosition=function(U,B){if(0===U)return-1;if(U%2!=0)return Math.floor(U/2);if(B===L.TopLeft||B===L.BottomLeft)return Math.floor(U/2)-1;if(B===L.TopRight||B===L.BottomRight)return Math.floor(U/2);throw new Error("Invalid Operation")},k.prototype.getActualAdjacentEdges=function(U,B,K){return K===L.TopLeft||K===L.TopRight?U.getAdjacentEdges(B.key,c.ConnectionMode.Incoming).sort(function(J,ie){return U.getNode(J.from).position-U.getNode(ie.from).position}):U.getAdjacentEdges(B.key,c.ConnectionMode.Outgoing).sort(function(J,ie){return U.getNode(J.to).position-U.getNode(ie.to).position})},k}();P.SugiyamaNodesOrderer=C;var I=function(){function k(U,B,K,J){this.key=U,this.isDummy=B,this.layer=K,this.position=J}return k.prototype.getHashCode=function(){return this.key.toString()},k}();P.NodeOnLayer=I;var L,k,N=function(){function k(U,B,K,J,ie){this.key=U,this.isDummy=B,this.from=K,this.to=J,this._originFrom=ie}return k.prototype.getHashCode=function(){return this.from+"-"+this.to},Object.defineProperty(k.prototype,"originFrom",{get:function(){return void 0!==this._originFrom?this._originFrom:this.from},enumerable:!1,configurable:!0}),k}();function G(k){return Math.trunc?Math.trunc(k):isFinite(k)?k-k%1||(k<0?-0:0===k?k:0):k}P.EdgeOnLayer=N,(k=L||(L={}))[k.TopLeft=0]="TopLeft",k[k.TopRight=1]="TopRight",k[k.BottomLeft=2]="BottomLeft",k[k.BottomRight=3]="BottomRight"},9533:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.TreeLayoutBuilder=void 0;var T=b(8119),y=b(5148),d=b(617),c=b(8675),s=b(8900),a=b(5227),u=b(8217),h=b(3742),g=b(8710),_=b(213),x=function(w){function D(){var C=null!==w&&w.apply(this,arguments)||this;return C.nodeToLevel={},C.levelDepthSize={},C}return S(D,w),D.prototype.build=function(){var C=this,I=new T.GraphLayout,L=0;return this.graph.getConnectedComponents().forEach(function(N){for(var G=y.Tree.createSpanningTree(N),k=C.processTree(G),U=C.getComponentOffset(k);k.nodeKeys.length<N.nodes.length;){var B=new _.Graph(N.nodes.filter(function(ie){return!k.nodeToLayout[ie]}).map(function(ie){return N.getNode(ie)}),N.edges.filter(function(ie){return!k.edgeToPosition[ie.key]})),K=y.Tree.createSpanningTree(B),J=C.processTree(K);k.extend(C.setComponentOffset(J,U)),U+=C.getComponentOffset(J)}I.extend(C.setComponentOffset(k,L)),L+=C.getComponentOffset(k)}),I},D.prototype.preProcessTree=function(C,I,L){var N=this;if((I=I.filter(function(k){return(void 0===N.nodeToLevel[k.key]?N.nodeToLevel[k.key]=L:-1)>=0})).length){var G=this.getMaxDepthSize(I);this.levelDepthSize[L]=G,this.preProcessTree(C,[].concat.apply([],I.map(function(k){return C.getChildren(k)})),L+1)}},D.prototype.loadNodes=function(C,I,L){return L?C.getChildren(L.info).map(function(N){return I.hasNode(N.key)?void 0:I.addNode(new d.NodeLayout(N,s.Point.zero()))}).filter(function(N){return N}):[I.addNode(new d.NodeLayout(C.root,s.Point.zero()))]},D.prototype.processTree=function(C){var I=this,L=new T.GraphLayout;if(this.preProcessTree(C,[C.root],0),this.processLevel(C,L,0,new c.Range(0),0),this.settings.direction===g.LogicalDirectionKind.Backward){var N=Object.keys(this.levelDepthSize).map(function(k){return I.levelDepthSize[k]}),G=N.reduce(function(k,U){return k+U},0)+(N.length-1)*this.settings.layerSpacing;L.forEachNode(function(k){return I.setDepthPos(k,I.getDepthPos(k)+G)})}return L},D.prototype.processLevel=function(C,I,L,N,G,k){var U,B=this,K=this.addNodes(C,I,G,k),J=k?this.graph.getAdjacentEdges(k.key,u.ConnectionMode.Outgoing):[],ie=this.getDirectionValue(this.levelDepthSize[G]),re=this.getDirectionValue(this.settings.layerSpacing);if(K.forEach(function(Z){var Q=c.Range.fromLength(U?U.to+B.settings.columnSpacing:N.from,B.getBreadthNodeSizeCore(Z.info));Z.position=B.getNodePosition(Q.from,L,ie).clone().offset(Z.info.margin.left,Z.info.margin.top),B.processLevel(C,I,L+ie+re,Q,G+1,Z),B.updateEdgeConnections(I,J,Z),N.extend(Q),U=Q}),k&&K.length){var q=K[K.length-1],Y=new c.Range(this.getBreadthPos(K[0]),this.getBreadthPos(q)+this.getBreadthNodeSizeCore(q.info,!0));this.alignParent(k,Y,N)}},D.prototype.addNodes=function(C,I,L,N){var G=this;return 0===L?[I.addNode(new d.NodeLayout(C.root,s.Point.zero()))]:C.getChildren(N.info).reduce(function(k,U){return G.nodeToLevel[U.key]!==L||I.hasNode(U.key)||k.push(I.addNode(new d.NodeLayout(U,s.Point.zero()))),k},[])},D.prototype.getMaxDepthSize=function(C){var I=this;return C.reduce(function(L,N){return Math.max(L,I.getDepthNodeSizeCore(N))},0)},D.prototype.getNodePosition=function(C,I,L){return this.settings.direction===g.LogicalDirectionKind.Forward?this.settings.orientation===g.DataLayoutOrientation.Vertical?new s.Point(C,I):new s.Point(I,C):this.settings.orientation===g.DataLayoutOrientation.Vertical?new s.Point(C,I+L):new s.Point(I+L,C)},D.prototype.updateEdgeConnections=function(C,I,L){var N=this;I.filter(function(G){return G.to===L.key}).forEach(function(G){var k=N.getBeginEdgeIndex(),U=N.getEndEdgeIndex();C.addEdge(new d.EdgeLayout(G.key,k,U))})},D.prototype.getBeginEdgeIndex=function(){return this.settings.direction===g.LogicalDirectionKind.Forward?this.isVertical()?h.ConnectionPointSide.South:h.ConnectionPointSide.East:this.isVertical()?h.ConnectionPointSide.North:h.ConnectionPointSide.West},D.prototype.getEndEdgeIndex=function(){return this.settings.direction===g.LogicalDirectionKind.Forward?this.isVertical()?h.ConnectionPointSide.North:h.ConnectionPointSide.West:this.isVertical()?h.ConnectionPointSide.South:h.ConnectionPointSide.East},D.prototype.alignParent=function(C,I,L){if(this.settings.alignment===g.Alignment.Center){var N=I.from+I.length/2-this.getBreadthNodeSizeCore(C.info,!0)/2;this.settings.orientation===g.DataLayoutOrientation.Vertical?(C.position.x=Math.max(L.from+C.info.margin.left,N),C.position.x=Math.min(L.to-C.info.size.width-C.info.margin.right,C.position.x)):(C.position.y=Math.max(L.from+C.info.margin.top,N),C.position.y=Math.min(L.to-C.info.size.height-C.info.margin.bottom,C.position.y))}},D.prototype.getDepthPos=function(C){return this.settings.orientation===g.DataLayoutOrientation.Vertical?C.position.y:C.position.x},D.prototype.getBreadthPos=function(C){return this.settings.orientation===g.DataLayoutOrientation.Vertical?C.position.x:C.position.y},D.prototype.setDepthPos=function(C,I){this.settings.orientation===g.DataLayoutOrientation.Vertical?C.position.y=I:C.position.x=I},D.prototype.isVertical=function(){return this.settings.orientation===g.DataLayoutOrientation.Vertical},D}(a.LayoutBuilder);P.TreeLayoutBuilder=x},213:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.GraphIterator=P.FastGraph=P.Graph=void 0;var T=b(8217),y=b(5503),d=b(2400),c=b(701),s=function(){function g(_,x){this.nodeMap={},this.edgeMap={},this.nodes=[],this.edges=[],this.onInit(),_.forEach(this.addNode.bind(this)),x.forEach(this.addEdge.bind(this))}return Object.defineProperty(g.prototype,"items",{get:function(){return this.nodes.map(this.getNode.bind(this))},enumerable:!1,configurable:!0}),g.prototype.onInit=function(){},g.prototype.addEdge=function(_){this.edgeMap[_.key]=_,this.edges.push(_)},g.prototype.addNode=function(_){this.nodeMap[_.key]=_,this.nodes.push(_.key)},g.prototype.getNode=function(_){return this.nodeMap[_]},g.prototype.getEdge=function(_){return this.edgeMap[_]},g.prototype.isEmpty=function(){return!this.nodes.length&&!this.edges.length},g.prototype.getAdjacentEdges=function(_,x){return void 0===x&&(x=T.ConnectionMode.OutgoingAndIncoming),this.edges.filter(function(w){return x&T.ConnectionMode.Incoming&&w.to===_||x&T.ConnectionMode.Outgoing&&w.from===_})},g}(),a=function(g){function _(){return null!==g&&g.apply(this,arguments)||this}return S(_,g),_.prototype.cast=function(x,w){var D=this;return new _(this.nodes.map(function(C){return x(D.getNode(C))}),this.edges.map(function(C){return w?w(C):C}))},_.prototype.getConnectedComponents=function(){var x=this.createIterator(T.ConnectionMode.OutgoingAndIncoming);x.visitEachEdgeOnce=!0;for(var w=[],D=function(L){var N=[],G=[];x.onNode=function(k){return N.push(k)},x.onEdge=function(k){return G.push(k)},x.iterate(C.nodes[L]),N.length&&w.push(new _(N,G))},C=this,I=0;I<this.nodes.length;I++)D(I);return w},_.prototype.createIterator=function(x){var w=new h(this,x);return w.comparer=function(D,C){return D.weight-C.weight},w},_.prototype.getSpanningGraph=function(x,w,D){var C=this;if(void 0===D&&(D=void 0),!this.nodes.length)return new _([],[]);D||(D=function(U){return U.weight});var I=[],L=new c.HashSet,N=new c.HashSet([],function(U){return U.getHashKey()});for(this.addNodeToSpanningGraph(x,w,I,L,N,D);I.length&&L.length!==this.nodes.length;){var G=I.shift();N.tryPush(G);var k=L.contains(G.from)?G.to:G.from;this.addNodeToSpanningGraph(k,w,I,L,N,D),I=I.filter(function(U){return!L.contains(U.from)||!L.contains(U.to)})}return new _(L.list().map(function(U){return C.getNode(U)}),N.list())},_.prototype.addNodeToSpanningGraph=function(x,w,D,C,I,L){C.tryPush(x),this.getAdjacentEdges(x,w).filter(function(N){return!I.contains(N)}).forEach(function(N){var G=L(N),k=d.SearchUtils.binaryIndexOf(D,function(U){return U.weight-G});for(k=k<0?~k:k;k<D.length&&L(D[k])===G;)k++;D.splice(k,0,new T.Edge(N.key,N.from,N.to,G))})},_.create=function(x,w){return new _(x,w.filter(function(D){return D.beginItem&&D.endItem instanceof y.Shape&&D.endItem&&D.endItem instanceof y.Shape&&D.beginItem!==D.endItem}).map(function(D){return new T.Edge(D.key,D.beginItem&&D.beginItem.key,D.endItem&&D.endItem.key)}))},_}(s);P.Graph=a;var u=function(g){function _(){return null!==g&&g.apply(this,arguments)||this}return S(_,g),_.prototype.onInit=function(){this.parentToChildren={},this.childToParents={}},_.prototype.addEdge=function(x){g.prototype.addEdge.call(this,x),(this.parentToChildren[x.from]||(this.parentToChildren[x.from]=[])).push(x.to),(this.childToParents[x.to]||(this.childToParents[x.to]=[])).push(x.from)},_.prototype.getChildren=function(x){return this.parentToChildren[x]||[]},_.prototype.getParents=function(x){return this.childToParents[x]||[]},_.prototype.createIterator=function(x){return new h(this,x)},_}(s);P.FastGraph=u;var h=function(){function g(_,x){void 0===x&&(x=T.ConnectionMode.OutgoingAndIncoming),this.graph=_,this.connectionMode=x,this.visitEachEdgeOnce=!0,this.visitEachNodeOnce=!0,this.visitedNodes={},this.visitedEdges={}}return g.prototype.iterate=function(_){if(!this.visitEachNodeOnce&&!this.visitEachEdgeOnce&&!this.skipNode)throw"skipNode or visitEachNodeOnce or visitEachEdgeOnce must be set to avoid SOF";this.iterateCore(_)},g.prototype.iterateCore=function(_){var x=this,w=this.graph.getNode(_);if(!(!w||this.skipNode&&this.skipNode(w)||this.visitEachNodeOnce&&this.isNodeVisited(_))){this.visitedNodes[_]=!0,this.onNode&&this.onNode(w);var D=this.graph.getAdjacentEdges(_,this.connectionMode);if(this.skipEdge&&(D=D.filter(function(L){return!x.skipEdge(L)})),this.connectionMode&T.ConnectionMode.Outgoing){var C=D.filter(function(L){return L.from===_});this.comparer&&C.sort(this.comparer),C.forEach(function(L){x.visitEachEdgeOnce&&x.visitedEdges[L.key]||(x.visitedEdges[L.key]=!0,x.onEdge&&x.onEdge(L,!0),x.iterateCore(L.to),x.onAfterEdge&&x.onAfterEdge(L,!0))})}if(this.onAllEdges&&this.onAllEdges(w,!0),this.connectionMode&T.ConnectionMode.Incoming){var I=D.filter(function(L){return L.to===_});this.comparer&&I.sort(this.comparer),I.forEach(function(L){x.visitEachEdgeOnce&&x.visitedEdges[L.key]||(x.visitedEdges[L.key]=!0,x.onEdge&&x.onEdge(L,!1),x.iterateCore(L.from),x.onAfterEdge&&x.onAfterEdge(L,!1))})}this.onAllEdges&&this.onAllEdges(w,!1)}},g.prototype.isNodeVisited=function(_){return!!this.visitedNodes[_]},g.prototype.isEdgeVisited=function(_){return!!this.visitedEdges[_]},g}();P.GraphIterator=h},7819:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.GraphInfo=void 0;var f=b(1755),S=function(){function T(y,d){this.container=y,this.sourceGraph=d}return Object.defineProperty(T.prototype,"graph",{get:function(){return this._graph||(this._graph=this.getNodeInfoGraph())},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"level",{get:function(){return void 0!==this._level?this._level:this._level=this.getLevel()},enumerable:!1,configurable:!0}),T.prototype.getNodeInfoGraph=function(){return this.sourceGraph.cast(f.LayoutUtils.shapeToLayout)},T.prototype.getLevel=function(){var y=0;return this.container&&(y=this.getContainerLevel(this.container)),y},T.prototype.getContainerLevel=function(y){var d=1,c=y.container;return c&&(d+=this.getContainerLevel(c)),d},T}();P.GraphInfo=S},8119:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.GraphLayout=void 0;var f=b(8675),S=b(617),T=function(){function y(){this.nodeKeys=[],this.nodeToLayout={},this.edgeToPosition={}}return y.prototype.forEachNode=function(d){var c=this;this.nodeKeys.forEach(function(s){return d(c.nodeToLayout[s],s)})},y.prototype.reduce=function(d,c){var s=this;return this.nodeKeys.reduce(function(a,u,h){return d(a,s.nodeToLayout[u],h)},c)},y.prototype.addNode=function(d){if(this.nodeToLayout[d.key])throw Error("Node layout is already registered");return this.nodeKeys.push(d.key),this.nodeToLayout[d.key]=d,d},y.prototype.hasNode=function(d){return!!this.nodeToLayout[d]},y.prototype.addEdge=function(d){if(this.edgeToPosition[d.key])throw Error("Edge layout is already registered");this.edgeToPosition[d.key]=d},y.prototype.getRectangle=function(d){var c=this;return f.GeometryUtils.getCommonRectangle(this.nodeKeys.map(function(s){return c.nodeToLayout[s].rectangle}))},y.prototype.offsetNodes=function(d,c){var s=this;void 0===d&&(d=0),void 0===c&&(c=0);var a=new y;return this.nodeKeys.forEach(function(u){var h=s.nodeToLayout[u];a.addNode(new S.NodeLayout(h.info,h.position.clone().offset(d,c)))}),a.copyEdges(this),a},y.prototype.extend=function(d){var c=this;d.forEachNode(function(s){return c.addNode(s)}),this.copyEdges(d)},y.prototype.copyEdges=function(d){var c=this;Object.keys(d.edgeToPosition).forEach(function(s){var a=d.edgeToPosition[s];c.addEdge(new S.EdgeLayout(a.key,a.beginIndex,a.endIndex))})},y}();P.GraphLayout=T},8710:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.Alignment=P.DataLayoutOrientation=P.LogicalDirectionKind=P.TreeLayoutSettings=P.LayoutSettings=void 0;var T=b(7959),y=function(u){this.orientation=c.Vertical,this.direction=d.Forward;var h=u&&2*u>T.Connector.minOffset?2*u:T.Connector.minOffset;this.columnSpacing=h,this.layerSpacing=2*h,this.containerPadding=2*h,this.componentSpacing=2*h};P.LayoutSettings=y;var d,c,s,u,a=function(u){function h(g){var _=u.call(this,g)||this;return _.alignment=s.Center,_.subTreeColumnSpacing=_.componentSpacing/2,_}return S(h,u),h}(y);P.TreeLayoutSettings=a,(u=d=P.LogicalDirectionKind||(P.LogicalDirectionKind={}))[u.Backward=0]="Backward",u[u.Forward=1]="Forward",function(u){u[u.Horizontal=0]="Horizontal",u[u.Vertical=1]="Vertical"}(c=P.DataLayoutOrientation||(P.DataLayoutOrientation={})),function(u){u[u.Left=0]="Left",u[u.Center=1]="Center"}(s=P.Alignment||(P.Alignment={}))},1755:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.LayoutUtils=void 0;var f=b(617),S=function(){function T(){}return T.shapeToLayout=function(y){var d=new f.Margin(0),c=y.rectangle;y.attachedConnectors.filter(function(a){return!a.beginItem||!a.endItem}).forEach(function(a){var u=a.rectangle;d.left=Math.max(d.left,c.x-u.x),d.right=Math.max(d.right,u.right-c.right),d.top=Math.max(d.top,c.y-u.y),d.bottom=Math.max(d.bottom,u.bottom-c.bottom)});var s=new f.NodeInfo(y.key,d,y.size.clone());return s.connectionPoints=y.description.getConnectionPoints(),s},T}();P.LayoutUtils=S},617:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Margin=P.EdgeLayout=P.NodeLayout=P.NodeInfo=void 0;var f=b(8011);P.NodeInfo=function(c,s,a,u){void 0===u&&(u=[]),this.key=c,this.margin=s,this.size=a,this.connectionPoints=u};var T=function(){function c(s,a){this.info=s,this.position=a}return Object.defineProperty(c.prototype,"key",{get:function(){return this.info.key},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"rectangle",{get:function(){return f.Rectangle.fromGeometry(this.position,this.info.size)},enumerable:!1,configurable:!0}),c}();P.NodeLayout=T,P.EdgeLayout=function(c,s,a){this.key=c,this.beginIndex=s,this.endIndex=a};var d=function(){function c(s,a,u,h){void 0===a&&(a=s),void 0===u&&(u=s),void 0===h&&(h=s),this.top=s,this.right=a,this.bottom=u,this.left=h}return c.empty=function(){return new c(0)},c}();P.Margin=d},8217:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectionMode=P.PositionInfo=P.Edge=void 0;var S,b=function(){function S(T,y,d,c){void 0===c&&(c=1),this.weight=c,this.key=T,this.from=y,this.to=d}return S.prototype.getHashKey=function(){return this.from+"_"+this.to},S.prototype.reverse=function(){return new S(this.key,this.to,this.from,this.weight)},S}();P.Edge=b,P.PositionInfo=function(S,T){this.item=S,this.position=T},(S=P.ConnectionMode||(P.ConnectionMode={}))[S.Outgoing=1]="Outgoing",S[S.Incoming=2]="Incoming",S[S.OutgoingAndIncoming=3]="OutgoingAndIncoming"},5148:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Tree=void 0;var f=b(8217),S=function(){function T(y,d){var c=this;this.childToParent={},this.root=y,this.parentToChildren=d;var s=function(u){if(!Object.prototype.hasOwnProperty.call(d,u))return"continue";d[u].forEach(function(h){return c.childToParent[h.key]=u})};for(var a in d)s(a)}return T.prototype.getChildren=function(y){return y&&this.parentToChildren[y.key]?this.parentToChildren[y.key]:[]},T.prototype.hasChildren=function(y){return this.parentToChildren[y.key]&&this.parentToChildren[y.key].length>0},T.prototype.iterate=function(y){this.iterateCore(this.root,0,y)},T.createSpanningTree=function(y){var d=T.findRoot(y),c=y.createIterator(f.ConnectionMode.Outgoing),s={};return c.skipEdge=function(a){return void 0===a.to||c.isNodeVisited(a.to)},c.onNode=function(a){return s[a.key]=[]},c.onEdge=function(a){var u=y.getNode(a.to);u&&s[a.from].push(u)},c.iterate(d),new T(y.getNode(d),s)},T.prototype.iterateCore=function(y,d,c){var s=this;c(y,d),this.getChildren(y).forEach(function(a){return s.iterateCore(a,d+1,c)})},T.findRoot=function(y){return y.nodes.reduce(function(d,c){var s=y.getAdjacentEdges(c),a=s.filter(function(h){return h.to===c}).length,u=s.filter(function(h){return h.from===c}).length;return(void 0===d.candidate||0===a&&d.inc>0||0!==d.inc&&d.out-d.inc<u-a)&&(d.candidate=c,d.inc=a,d.out=u),d},{inc:-1,out:-1,candidate:void 0}).candidate},T}();P.Tree=S},7309:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CycleRemover=void 0;var f=b(213),S=b(8217),T=b(701),y=function(){function d(){}return d.removeCycles=function(c){var s=this.getFeedbackSet(c);return this.reverseEdges(c,s)},d.getFeedbackSet=function(c){for(var s=this,a={},u=this.getNonTrivialStronglyConnectedComponents(c);u.length;)u.forEach(function(h){var g=s.getMaxCyclicEdges(h);g.forEach(function(_){return delete a[_.reverse().getHashKey()]}),g.forEach(function(_){return a[_.getHashKey()]=!0})}),u=this.getNonTrivialStronglyConnectedComponents(this.reverseEdges(c,a).graph);return a},d.getMaxCyclicEdges=function(c){var s={},a={},u={},h=[],g=[],_=c.createIterator(S.ConnectionMode.Outgoing);_.visitEachEdgeOnce=!1,_.onNode=function(w){a[w.key]=!0},_.skipNode=function(w){if(a[w.key]){for(var D=[],C=0;C<h.length;C++){var I=h[C];if(void 0===u[I.key]&&(u[I.key]=0),u[I.key]++,D.push(I),I.from===w.key)break}g.push(D)}return a[w.key]||s[w.key]},_.skipEdge=function(w){return!1},_.onEdge=function(w){h.splice(0,0,w)},_.onAfterEdge=function(w){h.splice(0,1)},_.onAllEdges=function(w){s[w.key]=!0,a[w.key]=!1},_.iterate(c.nodes[0]);var x=new T.HashSet([],function(w){return w.key});return g.forEach(function(w){x.tryPush(w.reduce(function(D,C){return u[C.key]>u[D.key]?C:D},w[0]))}),x.list()},d.reverseEdges=function(c,s){var a=new T.HashSet([],function(g){return g.getHashKey()}),u={},h={};return c.edges.forEach(function(g){s[g.getHashKey()]&&(g=g.reverse(),u[g.key]=!0),a.tryPush(g)||(h[g.key]=!0,delete u[g.key])}),{graph:new f.Graph(c.nodes.map(function(g){return c.getNode(g)}),a.list()),reversedEdges:u,removedEdges:h}},d.getNonTrivialStronglyConnectedComponents=function(c){return this.getStronglyConnectedComponents(c).filter(function(s){return s.edges.length})},d.getStronglyConnectedComponents=function(c){for(var s=this,a=[],u=0,h={},g={},_={},x=[],w={},D=0;D<c.nodes.length;D++){var C=c.nodes[D],I=c.createIterator(S.ConnectionMode.Outgoing);I.visitEachEdgeOnce=!1,I.visitEachNodeOnce=!1,I.onNode=function(L){w[L.key]=!0,a.push(L),_[L.key]=!0,g[L.key]=u,h[L.key]=u,u++},I.skipNode=function(L){return w[L.key]},I.skipEdge=function(L){var N=w[L.to];return N&&_[L.to]&&(g[L.from]=Math.min(g[L.from],h[L.to])),N},I.onAfterEdge=function(L){g[L.from]=Math.min(g[L.from],g[L.to])},I.onAllEdges=function(L,N){N&&g[L.key]===h[L.key]&&x.push(s.getStronglyConnectedComponent(c,L,a,_))},I.iterate(C)}return x},d.getStronglyConnectedComponent=function(c,s,a,u){var h,g={},_=[],x=[];do{h=a.pop(),g[h.key]||_.push(h),g[h.key]=!0,u[h.key]=!1}while(h!==s);return _.forEach(function(w){var D=c.getAdjacentEdges(w.key,S.ConnectionMode.Outgoing);x=x.concat(D.filter(function(C){return!g[C.key]&&g[C.to]})),D.forEach(function(C){return g[C.key]=!0})}),new f.Graph(_,x)},d}();P.CycleRemover=y},701:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.HashSet=void 0;var b=function(){function f(S,T){var y=this;void 0===S&&(S=[]),void 0===T&&(T=function(d){return d.toString()}),this.items=[],this.map={},this.getHashCode=T,S.forEach(function(d){return y.tryPush(d)})}return f.prototype.tryPush=function(S){var T=this.getHashCode(S);return void 0===this.map[T]&&(this.map[T]=this.items.push(S)-1,!0)},f.prototype.contains=function(S){return void 0!==this.map[this.getHashCode(S)]},f.prototype.forEach=function(S){this.items.forEach(S)},f.prototype.filter=function(S){return this.items.filter(S)},f.prototype.list=function(){return this.items.slice(0)},f.prototype.item=function(S){return this.items[S]},f.prototype.first=function(){return this.items[0]},f.prototype.remove=function(S){var T=this.getHashCode(S),y=this.map[T];if("number"!=typeof y)throw"Item not found";delete this.map[T],this.items.splice(y,1);for(var d=y;d<this.items.length;d++)this.map[this.getHashCode(this.items[d])]--},Object.defineProperty(f.prototype,"length",{get:function(){return this.items.length},enumerable:!1,configurable:!0}),f}();P.HashSet=b},6224:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramLocalizationService=void 0;var f=b(2259),S=b(5383),T=function(){function y(){}return y.unitItems={},y.formatUnit=function(d){return d.toString()},y.shapeTexts={},y}();P.DiagramLocalizationService=T,T.unitItems[S.DiagramUnit.In]="in",T.unitItems[S.DiagramUnit.Cm]="cm",T.unitItems[S.DiagramUnit.Px]="px",T.shapeTexts[f.ShapeTypes.Text]="Text",T.shapeTexts[f.ShapeTypes.Rectangle]="Rectangle",T.shapeTexts[f.ShapeTypes.Ellipse]="Ellipse",T.shapeTexts[f.ShapeTypes.Cross]="Cross",T.shapeTexts[f.ShapeTypes.Triangle]="Triangle",T.shapeTexts[f.ShapeTypes.Diamond]="Diamond",T.shapeTexts[f.ShapeTypes.Heart]="Heart",T.shapeTexts[f.ShapeTypes.Pentagon]="Pentagon",T.shapeTexts[f.ShapeTypes.Hexagon]="Hexagon",T.shapeTexts[f.ShapeTypes.Octagon]="Octagon",T.shapeTexts[f.ShapeTypes.Star]="Star",T.shapeTexts[f.ShapeTypes.ArrowLeft]="Left Arrow",T.shapeTexts[f.ShapeTypes.ArrowUp]="Up Arrow",T.shapeTexts[f.ShapeTypes.ArrowRight]="Right Arrow",T.shapeTexts[f.ShapeTypes.ArrowDown]="Down Arrow",T.shapeTexts[f.ShapeTypes.ArrowUpDown]="Up Down Arrow",T.shapeTexts[f.ShapeTypes.ArrowLeftRight]="Left Right Arrow",T.shapeTexts[f.ShapeTypes.Process]="Process",T.shapeTexts[f.ShapeTypes.Decision]="Decision",T.shapeTexts[f.ShapeTypes.Terminator]="Terminator",T.shapeTexts[f.ShapeTypes.PredefinedProcess]="Predefined Process",T.shapeTexts[f.ShapeTypes.Document]="Document",T.shapeTexts[f.ShapeTypes.MultipleDocuments]="Multiple Documents",T.shapeTexts[f.ShapeTypes.ManualInput]="Manual Input",T.shapeTexts[f.ShapeTypes.Preparation]="Preparation",T.shapeTexts[f.ShapeTypes.Data]="Data",T.shapeTexts[f.ShapeTypes.Database]="Database",T.shapeTexts[f.ShapeTypes.HardDisk]="Hard Disk",T.shapeTexts[f.ShapeTypes.InternalStorage]="Internal Storage",T.shapeTexts[f.ShapeTypes.PaperTape]="Paper Tape",T.shapeTexts[f.ShapeTypes.ManualOperation]="Manual Operation",T.shapeTexts[f.ShapeTypes.Delay]="Delay",T.shapeTexts[f.ShapeTypes.StoredData]="Stored Data",T.shapeTexts[f.ShapeTypes.Display]="Display",T.shapeTexts[f.ShapeTypes.Merge]="Merge",T.shapeTexts[f.ShapeTypes.Connector]="Connector",T.shapeTexts[f.ShapeTypes.Or]="Or",T.shapeTexts[f.ShapeTypes.SummingJunction]="Summing Junction",T.shapeTexts[f.ShapeTypes.Container]="Container",T.shapeTexts[f.ShapeTypes.VerticalContainer]="Vertical Container",T.shapeTexts[f.ShapeTypes.HorizontalContainer]="Horizontal Container",T.shapeTexts[f.ShapeTypes.Card]="Person's Name",T.shapeTexts[f.ShapeTypes.CardWithImageOnLeft]="Card with Image on the Left",T.shapeTexts[f.ShapeTypes.CardWithImageOnTop]="Card with Image on the Top",T.shapeTexts[f.ShapeTypes.CardWithImageOnRight]="Card with Image on the Right"},6879:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramModelOperation=P.ModelOperationSettings=void 0;var f,b=function(){function f(){this._addShape=!0,this._addShapeFromToolbox=!0,this._deleteShape=!0,this._deleteConnector=!0,this._changeConnection=!0,this._changeConnectorPoints=!0,this._changeShapeText=!0,this._changeConnectorText=!0,this._resizeShape=!0,this._moveShape=!0}return Object.defineProperty(f.prototype,"addShape",{get:function(){return this._addShape},set:function(S){S!==this._addShape&&(this._addShape=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"addShapeFromToolbox",{get:function(){return this._addShapeFromToolbox},set:function(S){S!==this._addShapeFromToolbox&&(this._addShapeFromToolbox=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"deleteShape",{get:function(){return this._deleteShape},set:function(S){S!==this._deleteShape&&(this._deleteShape=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"deleteConnector",{get:function(){return this._deleteConnector},set:function(S){S!==this._deleteConnector&&(this._deleteConnector=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"changeConnection",{get:function(){return this._changeConnection},set:function(S){S!==this._changeConnection&&(this._changeConnection=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"changeConnectorPoints",{get:function(){return this._changeConnectorPoints},set:function(S){S!==this._changeConnectorPoints&&(this._changeConnectorPoints=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"changeShapeText",{get:function(){return this._changeShapeText},set:function(S){S!==this._changeShapeText&&(this._changeShapeText=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"changeConnectorText",{get:function(){return this._changeConnectorText},set:function(S){S!==this._changeConnectorText&&(this._changeConnectorText=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"resizeShape",{get:function(){return this._resizeShape},set:function(S){S!==this._resizeShape&&(this._resizeShape=S)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"moveShape",{get:function(){return this._moveShape},set:function(S){S!==this._moveShape&&(this._moveShape=S)},enumerable:!1,configurable:!0}),f.prototype.applySettings=function(S){S&&("boolean"==typeof S.addShape&&(this.addShape=S.addShape),"boolean"==typeof S.addShapeFromToolbox&&(this.addShapeFromToolbox=S.addShapeFromToolbox),"boolean"==typeof S.deleteShape&&(this.deleteShape=S.deleteShape),"boolean"==typeof S.deleteConnector&&(this.deleteConnector=S.deleteConnector),"boolean"==typeof S.changeConnection&&(this.changeConnection=S.changeConnection),"boolean"==typeof S.changeConnectorPoints&&(this.changeConnectorPoints=S.changeConnectorPoints),"boolean"==typeof S.changeShapeText&&(this.changeShapeText=S.changeShapeText),"boolean"==typeof S.changeConnectorText&&(this.changeConnectorText=S.changeConnectorText),"boolean"==typeof S.resizeShape&&(this.resizeShape=S.resizeShape),"boolean"==typeof S.moveShape&&(this.moveShape=S.moveShape))},f}();P.ModelOperationSettings=b,(f=P.DiagramModelOperation||(P.DiagramModelOperation={}))[f.AddShape=0]="AddShape",f[f.AddShapeFromToolbox=1]="AddShapeFromToolbox",f[f.DeleteShape=2]="DeleteShape",f[f.DeleteConnector=3]="DeleteConnector",f[f.ChangeConnection=4]="ChangeConnection",f[f.ChangeConnectorPoints=5]="ChangeConnectorPoints",f[f.BeforeChangeShapeText=6]="BeforeChangeShapeText",f[f.ChangeShapeText=7]="ChangeShapeText",f[f.BeforeChangeConnectorText=8]="BeforeChangeConnectorText",f[f.ChangeConnectorText=9]="ChangeConnectorText",f[f.ResizeShape=10]="ResizeShape",f[f.MoveShape=11]="MoveShape"},7228:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectionPoint=void 0;var T=b(8900),y=b(3742),d=function(c){function s(a,u,h){void 0===h&&(h=y.ConnectionPointSide.Undefined);var g=c.call(this,a,u)||this;return g.side=h,g}return S(s,c),s.prototype.offset=function(a,u){return c.prototype.offset.call(this,a,u),this.side=y.ConnectionPointSide.Undefined,this},s.prototype.multiply=function(a,u){return c.prototype.multiply.call(this,a,u),this.side=y.ConnectionPointSide.Undefined,this},s.prototype.clone=function(){return new s(this.x,this.y,this.side)},s.prototype.toPoint=function(){return new T.Point(this.x,this.y)},s}(T.Point);P.ConnectionPoint=d},5800:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsCalculator=void 0;var T=b(7595),y=b(4717),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.getPoints=function(){return this.connector.points.map(function(a,u){return new y.ConnectorRenderPoint(a.x,a.y,u)})},s}(T.ConnectorPointsCalculatorBase);P.ConnectorPointsCalculator=d},7595:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsCalculatorBase=void 0,P.ConnectorPointsCalculatorBase=function(f){this.connector=f}},2342:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalCalculator=void 0;var T=b(8011),y=b(3742),d=b(7595),c=b(1686),s=b(1774),a=b(993),u=b(2290),h=b(7369),g=b(4717),_=b(4867),x=function(w){function D(C){var I=w.call(this,C)||this;return I.sideCalculators={},I.sideCalculators[y.ConnectionPointSide.Undefined]=new c.ConnectorPointsOrthogonalUndefinedSideCalculator(I),I.sideCalculators[y.ConnectionPointSide.South]=new s.ConnectorPointsOrthogonalSouthSideCalculator(I),I.sideCalculators[y.ConnectionPointSide.North]=new a.ConnectorPointsOrthogonalNorthSideCalculator(I),I.sideCalculators[y.ConnectionPointSide.East]=new u.ConnectorPointsOrthogonalEastSideCalculator(I),I.sideCalculators[y.ConnectionPointSide.West]=new h.ConnectorPointsOrthogonalWestSideCalculator(I),I}return S(D,w),Object.defineProperty(D.prototype,"beginRect",{get:function(){return this.connector.beginItem?this.connector.beginItem.rectangle:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"endRect",{get:function(){return this.connector.endItem?this.connector.endItem.rectangle:void 0},enumerable:!1,configurable:!0}),D.prototype.getPoints=function(){var C=this.connector.points.map(function(Y,Z){return new g.ConnectorRenderPoint(Y.x,Y.y,Z)});_.ModelUtils.skipUnnecessaryRenderPoints(C,!0);var I=0,L=C.length-1,N=this.getPointSide(C,0),G=this.getPointSide(C,1),k=this.getPointSide(C,C.length-1),U=this.getPointSide(C,C.length-1-1),B=this.getSideCalculator(N),K=this.getSideCalculator(k),ie=B.getCorrectOriginPoint(C[I],this.beginRect),re=C[I+1];if(2===C.length&&B.isOnSidePoint(ie,re)&&B.isDirectConnectionAllowed(G,ie,re))B.getDirectConnectionPoints(ie,re).forEach(function(Y){C.splice(I+1,0,Y),I++,L++});else{var q=B.getBeginOffsetPoints(G,C[I],C[I+1],this.beginRect);q.forEach(function(Y){C.splice(I+1,0,Y)}),I+=q.length,K.getEndOffsetPoints(U,C[L+=q.length],C[L-1],this.endRect).forEach(function(Y,Z){C.splice(L+Z,0,Y)}),this.addMiddlePoints(C,I,L)}return _.ModelUtils.skipUnnecessaryRenderPoints(C,!0),C},D.prototype.getSideCalculator=function(C){return this.sideCalculators[C]},D.prototype.getPointSide=function(C,I){if(0===I&&this.connector.beginItem){var L=this.connector.beginConnectionPointIndex;return this.connector.beginItem.getConnectionPointSideByIndex(L,C[1])}return I===C.length-1&&this.connector.endItem?this.connector.endItem.getConnectionPointSideByIndex(L=this.connector.endConnectionPointIndex,C[C.length-2]):y.ConnectionPointSide.Undefined},D.prototype.addMiddlePoints=function(C,I,L){for(var N=I;N<L;N++){var G=N+1,k=this.getMiddlePoint(C[N],C[N-1],N-1==0,C[G],C[G+1],G+1===C.length-1);void 0!==k&&(C.splice(N+1,0,k),N++,L++)}},D.prototype.getMiddlePoints=function(C,I){return C.x===I.x||C.y===I.y?[]:[new g.ConnectorRenderPoint(C.x,I.y),new g.ConnectorRenderPoint(I.x,C.y)]},D.prototype.getMiddlePoint=function(C,I,L,N,G,k){var U,B=this,K=this.getMiddlePoints(C,N);return K.forEach(function(J){var ie=B.createPointsRect(C,J),re=B.createPointsRect(J,N),q=B.connector.beginItem?B.connector.beginItem.rectangle:void 0,Y=B.connector.endItem?B.connector.endItem.rectangle:void 0;q&&(T.Rectangle.areIntersected(q,ie)||T.Rectangle.areIntersected(q,re))||Y&&(T.Rectangle.areIntersected(Y,ie)||T.Rectangle.areIntersected(Y,re))||B.isReturnPoint(J,C,I)&&!B.isIntermediatePoints(C,I)||B.isReturnPoint(J,N,G)&&!B.isIntermediatePoints(N,G)||(void 0===U||B.isPriorMiddlePoint(J,C,I,N,G))&&(U=J)}),void 0===U&&K.length>0&&(U=K[0]),U},D.prototype.createPointsRect=function(C,I){var L=T.Rectangle.fromPoints(C,I);return L.width>0&&(L=L.clone().inflate(-1,0)),L.height>0&&(L=L.clone().inflate(0,-1)),L},D.prototype.isPriorMiddlePoint=function(C,I,L,N,G){return!(!L||C.x!==L.x&&C.y!==L.y)||!(!G||C.x!==G.x&&C.y!==G.y)},D.prototype.isReturnPoint=function(C,I,L){return void 0!==I&&void 0!==L&&(C.x===L.x&&(I.y<C.y&&C.y<L.y||I.y>C.y&&C.y>L.y)||C.y===L.y&&(I.x<C.x&&C.x<L.x||I.x>C.x&&C.x>L.x))},D.prototype.isIntermediatePoints=function(C,I){return 0<C.pointIndex&&C.pointIndex<this.connector.points.length-1&&0<I.pointIndex&&I.pointIndex<this.connector.points.length-1},D}(d.ConnectorPointsCalculatorBase);P.ConnectorPointsOrthogonalCalculator=x},2290:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalEastSideCalculator=void 0;var T=b(3742),y=b(1816),d=b(4717),c=function(s){function a(u){return s.call(this,u)||this}return S(a,s),a.prototype.getCorrectOriginPoint=function(u,h){return u.x<h.right&&(u=u.clone().offset(h.right-u.x,0)),u},a.prototype.getSameShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.North:case T.ConnectionPointSide.South:case T.ConnectionPointSide.East:return[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.West:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset())}},a.prototype.getOverlappedPointsOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.West:return[h.clone().offset(-this.getMinOffset(),0)]}return[]},a.prototype.getBeginOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.North:return h.x<g.x?h.y<g.y?[]:[h.clone().offset(this.getMinOffset(),0)]:h.x>this.endRect.right?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.South:return h.x<g.x?h.y>g.y?[]:[h.clone().offset(this.getMinOffset(),0)]:h.x>this.endRect.right?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.East:return[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.West:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),h.y<g.y)}},a.prototype.getEndOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.West:var x=this.getMinOffset();return this.beginRect.right>h.x&&(x+=this.beginRect.right-h.x),[h.clone().offset(x,0)];case T.ConnectionPointSide.North:return g.x<h.x?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):h.y>g.y?[h.clone().offset(this.getMinOffset(),0)]:[];case T.ConnectionPointSide.South:return g.x<h.x?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):h.y<g.y?[h.clone().offset(this.getMinOffset(),0)]:[]}},a.prototype.getBeginOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(this.getScaleableOffsetX(h,g,!1),0)]},a.prototype.getEndOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(this.getScaleableOffsetX(h,g,!0),0)]},a.prototype.getBeginOffSideOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.South:if(this.isBeginEndOverlappedY())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!1);break;case T.ConnectionPointSide.North:if(this.isBeginEndOverlappedY())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!0);break;case T.ConnectionPointSide.East:if(this.isBeginEndOverlappedY())return this.getScaleableAsideOffsetPoints(h,g,_,!1);break;case T.ConnectionPointSide.Undefined:case T.ConnectionPointSide.West:return this.getScaleableAsideOffsetPoints(h,g,_,!1)}return[h.clone().offset(this.getScaleableOffsetX(h,g,!1),0)]},a.prototype.getEndOffSideOffsetPoints=function(u,h,g,_){return u===T.ConnectionPointSide.Undefined?this.getScaleableAsideOffsetPoints(h,g,_,!0):this.isBeginEndOverlappedY()?this.getScaleableAsideOffsetPoints(h,g,_,!0,this.beginRect.center.y>this.endRect.center.y):[h.clone().offset(this.getScaleableOffsetX(h,g,!0),0)]},a.prototype.getAsideOffsetPoints=function(u,h,g,_,x,w){var D=[];return void 0!==g&&(void 0===w&&(w=h.y<u.y),D.push(w?u.clone().offset(_,-(u.y-g.y+x)):u.clone().offset(_,g.bottom-u.y+x))),D.push(u.clone().offset(_,0)),D},a.prototype.getScaleableAsideOffsetPoints=function(u,h,g,_,x){var w=this.getScaleableOffsetX(u,h,_),D=this.getScaleableOffsetY(u,h,_);return this.getAsideOffsetPoints(u,h,g,w,D,x)},a.prototype.getScaleableOffsetX=function(u,h,g){if(this.beginRect&&this.endRect){var _=g?this.beginRect.x-u.x:this.endRect.x-u.x;if(_>0&&_<2*this.getMinOffset())return _/2}return this.getMinOffset()},a.prototype.getScaleableOffsetY=function(u,h,g){var _;return this.beginRect&&this.endRect&&!g&&!this.isBeginEndOverlappedY()&&(_=h.y<u.y?this.beginRect.y-this.endRect.bottom:this.endRect.y-this.beginRect.bottom)<2*this.getMinOffset()?_/2:this.getMinOffset()},a.prototype.isOnSidePoint=function(u,h){return h.x>u.x},a.prototype.isDirectConnectionAllowed=function(u,h,g){return u===T.ConnectionPointSide.West||u===T.ConnectionPointSide.Undefined},a.prototype.getDirectConnectionPoints=function(u,h){var g=u.x+(h.x-u.x)/2;return[new d.ConnectorRenderPoint(g,u.y),new d.ConnectorRenderPoint(g,h.y)]},a}(y.ConnectorPointsOrthogonalSideCalculatorBase);P.ConnectorPointsOrthogonalEastSideCalculator=c},993:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalNorthSideCalculator=void 0;var T=b(3742),y=b(1816),d=b(4717),c=function(s){function a(u){return s.call(this,u)||this}return S(a,s),a.prototype.getCorrectOriginPoint=function(u,h){return u.y>h.y&&(u=u.clone().offset(0,h.y-u.y)),u},a.prototype.getSameShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:case T.ConnectionPointSide.West:case T.ConnectionPointSide.North:return[h.clone().offset(0,-this.getMinOffset())];case T.ConnectionPointSide.South:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset())}},a.prototype.getOverlappedPointsOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.South:return[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.North:return[h.clone().offset(0,-this.getMinOffset())]}return[]},a.prototype.getBeginOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return h.y>g.y?h.x>g.x?[]:[h.clone().offset(0,-this.getMinOffset())]:h.y<this.endRect.y?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):[h.clone().offset(0,-this.getMinOffset())];case T.ConnectionPointSide.West:return h.y>g.y?h.x<g.x?[]:[h.clone().offset(0,-this.getMinOffset())]:h.y<this.endRect.y?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):[h.clone().offset(0,-this.getMinOffset())];case T.ConnectionPointSide.North:return[h.clone().offset(0,-this.getMinOffset())];case T.ConnectionPointSide.South:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),h.x<g.x)}},a.prototype.getEndOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return g.y>h.y?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):h.x<g.x?[h.clone().offset(0,-this.getMinOffset())]:[];case T.ConnectionPointSide.West:return g.y>h.y?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):h.x>g.x?[h.clone().offset(0,-this.getMinOffset())]:[];case T.ConnectionPointSide.North:return[h.clone().offset(0,-this.getMinOffset())];case T.ConnectionPointSide.South:var x=-this.getMinOffset();return this.beginRect.y<h.y&&(x-=h.y-this.beginRect.y),[h.clone().offset(0,x)]}},a.prototype.getBeginOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(0,-this.getScaleableOffsetY(h,g,!1))]},a.prototype.getEndOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(0,-this.getScaleableOffsetY(h,g,!0))]},a.prototype.getBeginOffSideOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!1);break;case T.ConnectionPointSide.West:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!0);break;case T.ConnectionPointSide.North:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(h,g,_,!1);break;case T.ConnectionPointSide.Undefined:case T.ConnectionPointSide.South:return this.getScaleableAsideOffsetPoints(h,g,_,!1)}return[h.clone().offset(0,-this.getScaleableOffsetY(h,g,!1))]},a.prototype.getEndOffSideOffsetPoints=function(u,h,g,_){return u===T.ConnectionPointSide.Undefined?this.getScaleableAsideOffsetPoints(h,g,_,!0):this.isBeginEndOverlappedX()?this.getScaleableAsideOffsetPoints(h,g,_,!0,this.beginRect.center.x>this.endRect.center.x):[h.clone().offset(0,-this.getScaleableOffsetY(h,g,!0))]},a.prototype.getAsideOffsetPoints=function(u,h,g,_,x,w){var D=[];return void 0!==g&&(void 0===w&&(w=h.x<u.x),D.push(w?u.clone().offset(-(u.x-g.x+x),-_):u.clone().offset(g.right-u.x+x,-_))),D.push(u.clone().offset(0,-_)),D},a.prototype.getScaleableAsideOffsetPoints=function(u,h,g,_,x){var w=this.getScaleableOffsetY(u,h,_),D=this.getScaleableOffsetX(u,h,_);return this.getAsideOffsetPoints(u,h,g,w,D,x)},a.prototype.getScaleableOffsetX=function(u,h,g){var _;return this.beginRect&&this.endRect&&!g&&!this.isBeginEndOverlappedX()&&(_=h.x<u.x?this.beginRect.x-this.endRect.right:this.endRect.x-this.beginRect.right)<2*this.getMinOffset()?_/2:this.getMinOffset()},a.prototype.getScaleableOffsetY=function(u,h,g){if(this.beginRect&&this.endRect){var _=g?u.y-this.beginRect.bottom:u.y-this.endRect.bottom;if(_>0&&_<2*this.getMinOffset())return _/2}return this.getMinOffset()},a.prototype.isOnSidePoint=function(u,h){return h.y<u.y},a.prototype.isDirectConnectionAllowed=function(u,h,g){return u===T.ConnectionPointSide.South||u===T.ConnectionPointSide.Undefined},a.prototype.getDirectConnectionPoints=function(u,h){var g=h.y+(u.y-h.y)/2;return[new d.ConnectorRenderPoint(u.x,g),new d.ConnectorRenderPoint(h.x,g)]},a}(y.ConnectorPointsOrthogonalSideCalculatorBase);P.ConnectorPointsOrthogonalNorthSideCalculator=c},1816:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalSideCalculatorBase=void 0;var f=b(8011),S=b(3742),T=b(7959),y=function(){function d(c){this.parent=c}return Object.defineProperty(d.prototype,"connector",{get:function(){return this.parent.connector},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"beginRect",{get:function(){return this.parent.beginRect},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"endRect",{get:function(){return this.parent.endRect},enumerable:!1,configurable:!0}),d.prototype.getBeginOffsetPoints=function(c,s,a,u){if(s=this.getCorrectOriginPoint(s,u),c!==S.ConnectionPointSide.Undefined){if(this.isBeginEndSame())return this.getSameShapeOffsetPoints(c,s,a,u);if(this.isBeginEndOverlappedPoints(s,a))return this.getOverlappedPointsOffsetPoints(c,s,a,u);if(this.isBeginEndOverlapped())return this.getBeginOverlappedShapeOffsetPoints(c,s,a,u)}else if(this.isOriginRectContainsTargetPoint(u,a))return this.getOverlappedPointsOffsetPoints(c,s,a,u);return this.isOnSidePoint(s,a)?this.getBeginOnSideOffsetPoints(c,s,a,u):this.getBeginOffSideOffsetPoints(c,s,a,u)},d.prototype.getEndOffsetPoints=function(c,s,a,u){if(s=this.getCorrectOriginPoint(s,u),c!==S.ConnectionPointSide.Undefined){if(this.isBeginEndSame())return this.getSameShapeOffsetPoints(c,s,a,u);if(this.isBeginEndOverlappedPoints(a,s))return this.getOverlappedPointsOffsetPoints(c,s,a,u);if(this.isBeginEndOverlapped())return this.getEndOverlappedShapeOffsetPoints(c,s,a,u)}else if(this.isOriginRectContainsTargetPoint(u,a))return this.getOverlappedPointsOffsetPoints(c,s,a,u);return this.isOnSidePoint(s,a)?this.getEndOnSideOffsetPoints(c,s,a,u):this.getEndOffSideOffsetPoints(c,s,a,u)},d.prototype.getSide=function(c,s){return Math.abs(s.x-c.x)>Math.abs(s.y-c.y)?s.x>c.x?S.ConnectionPointSide.East:S.ConnectionPointSide.West:s.y>c.y?S.ConnectionPointSide.South:S.ConnectionPointSide.North},d.prototype.getSideCalculator=function(c,s){return this.parent.getSideCalculator(this.getSide(c,s))},d.prototype.getMinOffset=function(){return T.Connector.minOffset},d.prototype.isBeginEndSame=function(){return this.connector.beginItem===this.connector.endItem},d.prototype.isBeginEndOverlapped=function(){return this.beginRect&&this.endRect&&f.Rectangle.areIntersected(this.beginRect,this.endRect)},d.prototype.isBeginEndOverlappedX=function(){return this.beginRect&&this.endRect&&!!f.Rectangle.getHorizIntersection(this.beginRect,this.endRect)},d.prototype.isBeginEndOverlappedY=function(){return this.beginRect&&this.endRect&&!!f.Rectangle.getVertIntersection(this.beginRect,this.endRect)},d.prototype.isBeginEndOverlappedPoints=function(c,s){return this.beginRect&&this.endRect&&(this.beginRect.containsPoint(s)||this.endRect.containsPoint(c))},d.prototype.isOriginRectContainsTargetPoint=function(c,s){return c&&s&&c.containsPoint(s)},d}();P.ConnectorPointsOrthogonalSideCalculatorBase=y},1774:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalSouthSideCalculator=void 0;var T=b(3742),y=b(1816),d=b(4717),c=function(s){function a(u){return s.call(this,u)||this}return S(a,s),a.prototype.getCorrectOriginPoint=function(u,h){return u.y<h.bottom&&(u=u.clone().offset(0,h.bottom-u.y)),u},a.prototype.getSameShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:case T.ConnectionPointSide.West:case T.ConnectionPointSide.South:return[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.North:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset())}},a.prototype.getOverlappedPointsOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.South:return[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.North:return[h.clone().offset(0,-this.getMinOffset())]}return[]},a.prototype.getBeginOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return h.y<g.y?h.x>g.x?[]:[h.clone().offset(0,this.getMinOffset())]:h.y>this.endRect.bottom?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.West:return h.y<g.y?h.x<g.x?[]:[h.clone().offset(0,this.getMinOffset())]:h.y>this.endRect.bottom?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.South:return[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.North:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),h.x<g.x)}},a.prototype.getEndOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return g.y<h.y?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):h.x<g.x?[h.clone().offset(0,this.getMinOffset())]:[];case T.ConnectionPointSide.West:return g.y<h.y?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):h.x>g.x?[h.clone().offset(0,this.getMinOffset())]:[];case T.ConnectionPointSide.South:return[h.clone().offset(0,this.getMinOffset())];case T.ConnectionPointSide.North:var x=this.getMinOffset();return this.beginRect.bottom>h.y&&(x+=this.beginRect.bottom-h.y),[h.clone().offset(0,x)]}},a.prototype.getBeginOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(0,this.getScaleableOffsetY(h,g,!1))]},a.prototype.getEndOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(0,this.getScaleableOffsetY(h,g,!0))]},a.prototype.getBeginOffSideOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!1);break;case T.ConnectionPointSide.West:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!0);break;case T.ConnectionPointSide.South:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(h,g,_,!1);break;case T.ConnectionPointSide.Undefined:case T.ConnectionPointSide.North:return this.getScaleableAsideOffsetPoints(h,g,_,!1)}return[h.clone().offset(0,this.getScaleableOffsetY(h,g,!1))]},a.prototype.getEndOffSideOffsetPoints=function(u,h,g,_){return u===T.ConnectionPointSide.Undefined?this.getScaleableAsideOffsetPoints(h,g,_,!0):this.isBeginEndOverlappedX()?this.getScaleableAsideOffsetPoints(h,g,_,!0,this.beginRect.center.x>this.endRect.center.x):[h.clone().offset(0,this.getScaleableOffsetY(h,g,!0))]},a.prototype.getAsideOffsetPoints=function(u,h,g,_,x,w){var D=[];return void 0!==g&&(void 0===w&&(w=h.x<u.x),D.push(w?u.clone().offset(-(u.x-g.x+x),_):u.clone().offset(g.right-u.x+x,_))),D.push(u.clone().offset(0,_)),D},a.prototype.getScaleableAsideOffsetPoints=function(u,h,g,_,x){var w=this.getScaleableOffsetY(u,h,_),D=this.getScaleableOffsetX(u,h,_);return this.getAsideOffsetPoints(u,h,g,w,D,x)},a.prototype.getScaleableOffsetX=function(u,h,g){var _;return this.beginRect&&this.endRect&&!g&&!this.isBeginEndOverlappedX()&&(_=h.x<u.x?this.beginRect.x-this.endRect.right:this.endRect.x-this.beginRect.right)<2*this.getMinOffset()?_/2:this.getMinOffset()},a.prototype.getScaleableOffsetY=function(u,h,g){if(this.beginRect&&this.endRect){var _=g?this.beginRect.y-u.y:this.endRect.y-u.y;if(_>0&&_<2*this.getMinOffset())return _/2}return this.getMinOffset()},a.prototype.isOnSidePoint=function(u,h){return h.y>u.y},a.prototype.isDirectConnectionAllowed=function(u,h,g){return u===T.ConnectionPointSide.North||u===T.ConnectionPointSide.Undefined},a.prototype.getDirectConnectionPoints=function(u,h){var g=u.y+(h.y-u.y)/2;return[new d.ConnectorRenderPoint(u.x,g),new d.ConnectorRenderPoint(h.x,g)]},a}(y.ConnectorPointsOrthogonalSideCalculatorBase);P.ConnectorPointsOrthogonalSouthSideCalculator=c},1686:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalUndefinedSideCalculator=void 0;var T=b(1816),y=b(4717),d=function(c){function s(a){return c.call(this,a)||this}return S(s,c),s.prototype.getCorrectOriginPoint=function(a,u){return a},s.prototype.getSameShapeOffsetPoints=function(a,u,h,g){return[]},s.prototype.getOverlappedPointsOffsetPoints=function(a,u,h,g){return[]},s.prototype.getBeginOverlappedShapeOffsetPoints=function(a,u,h,g){return[]},s.prototype.getEndOverlappedShapeOffsetPoints=function(a,u,h,g){return[]},s.prototype.getBeginOnSideOffsetPoints=function(a,u,h,g){return[]},s.prototype.getEndOnSideOffsetPoints=function(a,u,h,g){return[]},s.prototype.getBeginOffSideOffsetPoints=function(a,u,h,g){return[]},s.prototype.getEndOffSideOffsetPoints=function(a,u,h,g){return[]},s.prototype.isOnSidePoint=function(a,u){return!0},s.prototype.isDirectConnectionAllowed=function(a,u,h){var g=this.getSideCalculator(u,h);return void 0===g||g.isDirectConnectionAllowed(a,u,h)},s.prototype.getDirectConnectionPoints=function(a,u){var h=Math.abs(u.x-a.x),g=Math.abs(u.y-a.y);if(h>g){var _=Math.min(a.x,u.x)+h/2;return[new y.ConnectorRenderPoint(_,a.y),new y.ConnectorRenderPoint(_,u.y)]}var x=Math.min(a.y,u.y)+g/2;return[new y.ConnectorRenderPoint(a.x,x),new y.ConnectorRenderPoint(u.x,x)]},s}(T.ConnectorPointsOrthogonalSideCalculatorBase);P.ConnectorPointsOrthogonalUndefinedSideCalculator=d},7369:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorPointsOrthogonalWestSideCalculator=void 0;var T=b(3742),y=b(1816),d=b(4717),c=function(s){function a(u){return s.call(this,u)||this}return S(a,s),a.prototype.getCorrectOriginPoint=function(u,h){return u.x>h.x&&(u=u.clone().offset(h.x-u.x,0)),u},a.prototype.getSameShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.North:case T.ConnectionPointSide.South:case T.ConnectionPointSide.West:return[h.clone().offset(-this.getMinOffset(),0)];case T.ConnectionPointSide.East:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset())}},a.prototype.getOverlappedPointsOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:return[h.clone().offset(this.getMinOffset(),0)];case T.ConnectionPointSide.West:return[h.clone().offset(-this.getMinOffset(),0)]}return[]},a.prototype.getBeginOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.North:return h.x>g.x?h.y<g.y?[]:[h.clone().offset(-this.getMinOffset(),0)]:h.x<this.endRect.x?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):[h.clone().offset(-this.getMinOffset(),0)];case T.ConnectionPointSide.South:return h.x>g.x?h.y>g.y?[]:[h.clone().offset(-this.getMinOffset(),0)]:h.x<this.endRect.x?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):[h.clone().offset(-this.getMinOffset(),0)];case T.ConnectionPointSide.West:return[h.clone().offset(-this.getMinOffset(),0)];case T.ConnectionPointSide.East:return this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),h.y<g.y)}},a.prototype.getEndOverlappedShapeOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.East:var x=-this.getMinOffset();return this.beginRect.x<h.x&&(x-=h.x-this.beginRect.x),[h.clone().offset(x,0)];case T.ConnectionPointSide.West:return[h.clone().offset(-this.getMinOffset(),0)];case T.ConnectionPointSide.North:return g.x>h.x?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!0):h.y>g.y?[h.clone().offset(-this.getMinOffset(),0)]:[];case T.ConnectionPointSide.South:return g.x>h.x?this.getAsideOffsetPoints(h,g,_,this.getMinOffset(),this.getMinOffset(),!1):h.y<g.y?[h.clone().offset(-this.getMinOffset(),0)]:[]}},a.prototype.getBeginOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(-this.getScaleableOffsetX(h,!1),0)]},a.prototype.getEndOnSideOffsetPoints=function(u,h,g,_){return[h.clone().offset(-this.getScaleableOffsetX(h,!0),0)]},a.prototype.getBeginOffSideOffsetPoints=function(u,h,g,_){switch(u){case T.ConnectionPointSide.South:if(this.isBeginEndOverlappedY())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!1);break;case T.ConnectionPointSide.North:if(this.isBeginEndOverlappedY())return this.getScaleableAsideOffsetPoints(h,g,_,!1,!0);break;case T.ConnectionPointSide.West:if(this.isBeginEndOverlappedY())return this.getScaleableAsideOffsetPoints(h,g,_,!1);break;case T.ConnectionPointSide.Undefined:case T.ConnectionPointSide.East:return this.getScaleableAsideOffsetPoints(h,g,_,!1)}return[h.clone().offset(-this.getScaleableOffsetX(h,!1),0)]},a.prototype.getEndOffSideOffsetPoints=function(u,h,g,_){return u===T.ConnectionPointSide.Undefined?this.getScaleableAsideOffsetPoints(h,g,_,!0):this.isBeginEndOverlappedY()?this.getScaleableAsideOffsetPoints(h,g,_,!0,this.beginRect.center.y>this.endRect.center.y):[h.clone().offset(-this.getScaleableOffsetX(h,!0),0)]},a.prototype.getAsideOffsetPoints=function(u,h,g,_,x,w){var D=[];return void 0!==g&&(void 0===w&&(w=h.y<u.y),D.push(w?u.clone().offset(-_,-(u.y-g.y+x)):u.clone().offset(-_,g.bottom-u.y+x))),D.push(u.clone().offset(-_,0)),D},a.prototype.getScaleableAsideOffsetPoints=function(u,h,g,_,x){var w=this.getScaleableOffsetX(u,_),D=this.getScaleableOffsetY(u,h,_);return this.getAsideOffsetPoints(u,h,g,w,D,x)},a.prototype.getScaleableOffsetX=function(u,h){if(this.beginRect&&this.endRect){var g=h?u.x-this.beginRect.right:u.x-this.endRect.right;if(g>0&&g<2*this.getMinOffset())return g/2}return this.getMinOffset()},a.prototype.getScaleableOffsetY=function(u,h,g){var _;return this.beginRect&&this.endRect&&!g&&!this.isBeginEndOverlappedY()&&(_=h.y<u.y?this.beginRect.y-this.endRect.bottom:this.endRect.y-this.beginRect.bottom)<2*this.getMinOffset()?_/2:this.getMinOffset()},a.prototype.isOnSidePoint=function(u,h){return h.x<u.x},a.prototype.isDirectConnectionAllowed=function(u,h,g){return u===T.ConnectionPointSide.East||u===T.ConnectionPointSide.Undefined},a.prototype.getDirectConnectionPoints=function(u,h){var g=h.x+(u.x-h.x)/2;return[new d.ConnectorRenderPoint(g,u.y),new d.ConnectorRenderPoint(g,h.y)]},a}(y.ConnectorPointsOrthogonalSideCalculatorBase);P.ConnectorPointsOrthogonalWestSideCalculator=c},7959:function(o,P,b){var f,S=this&&this.__extends||(f=function(ie,re){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,Y){q.__proto__=Y}||function(q,Y){for(var Z in Y)Y.hasOwnProperty(Z)&&(q[Z]=Y[Z])})(ie,re)},function(ie,re){function q(){this.constructor=ie}f(ie,re),ie.prototype=null===re?Object.create(re):(q.prototype=re.prototype,new q)});Object.defineProperty(P,"__esModule",{value:!0}),P.Connector=P.CONNECTOR_DEFAULT_TEXT_POSITION=P.ConnectorPosition=void 0;var T,ie,y=b(9291),d=b(8011),c=b(1335),s=b(6353),a=b(7716),u=b(7185),h=b(6031),g=b(4246),_=b(7724),x=b(9416),w=b(3500),D=b(240),C=b(8675),I=b(3742),L=b(4867),N=b(5800),G=b(2342),k=b(5454),U=b(4612),B=b(4351),K=b(1510);(ie=T=P.ConnectorPosition||(P.ConnectorPosition={}))[ie.Begin=0]="Begin",ie[ie.End=1]="End",P.CONNECTOR_DEFAULT_TEXT_POSITION=.5;var J=function(ie){function re(q){var Y=ie.call(this)||this;if(Y.beginConnectionPointIndex=-1,Y.endConnectionPointIndex=-1,Y.properties=new U.ConnectorProperties,Y.points=q.map(function(Z){return Z.clone()}),q.length<2)throw Error("Points count should be greater than 1");return Y.texts=new B.ConnectorTexts,Y}return S(re,ie),Object.defineProperty(re.prototype,"rectangle",{get:function(){return C.GeometryUtils.createRectagle(this.getRenderPoints(!0))},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"skippedRenderPoints",{get:function(){return this.renderPoints?this.renderPoints.filter(function(q){return q.skipped}):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"shouldChangeRenderPoints",{get:function(){return void 0!==this.renderPoints&&void 0!==this.routingStrategy},enumerable:!1,configurable:!0}),re.prototype.assign=function(q){ie.prototype.assign.call(this,q),q.beginItem=this.beginItem,q.beginConnectionPointIndex=this.beginConnectionPointIndex,q.endItem=this.endItem,q.endConnectionPointIndex=this.endConnectionPointIndex,q.properties=this.properties.clone(),q.texts=this.texts.clone(),void 0!==this.routingStrategy&&(q.routingStrategy=this.routingStrategy.clone()),void 0!==this.renderPoints&&(q.renderPoints=this.renderPoints.map(function(Y){return Y.clone()})),void 0!==this.renderPointsWithoutSkipped&&(q.renderPointsWithoutSkipped=this.renderPointsWithoutSkipped.map(function(Y){return Y.clone()})),void 0!==this.actualRoutingMode&&(q.actualRoutingMode=this.actualRoutingMode),void 0!==this.lockCreateRenderPoints&&(q.lockCreateRenderPoints=this.lockCreateRenderPoints),void 0!==this.shouldInvalidateRenderPoints&&(q.shouldInvalidateRenderPoints=this.shouldInvalidateRenderPoints)},re.prototype.clone=function(){var q=new re(this.points);return this.assign(q),q},re.prototype.getTextCount=function(){return this.texts.count()},re.prototype.getText=function(q){void 0===q&&(q=P.CONNECTOR_DEFAULT_TEXT_POSITION);var Y=this.texts.get(q);return Y?Y.value:""},re.prototype.setText=function(q,Y){void 0===Y&&(Y=P.CONNECTOR_DEFAULT_TEXT_POSITION),q&&""!==q?this.texts.set(Y,new B.ConnectorText(Y,q)):this.texts.remove(Y)},re.prototype.getTextPoint=function(q){var Y=this.getRenderPoints();return C.GeometryUtils.getPathPointByPosition(Y,q)[0]},re.prototype.getTextPositionByPoint=function(q){var Y=this.getRenderPoints(),Z=C.GeometryUtils.getPathLength(Y),Q=C.GeometryUtils.getPathPositionByPoint(Y,q),te=y.UnitConverter.pointsToTwips(parseInt(this.styleText["font-size"]));return te>Q*Z?te/Z:te>Z-Q*Z?(Z-te)/Z:Q},re.prototype.getTextRectangle=function(q){return d.Rectangle.fromGeometry(this.getTextPoint(q),new s.Size(0,0))},re.prototype.changeRoutingStrategy=function(q){this.routingStrategy=q,this.invalidateRenderPoints()},re.prototype.clearRoutingStrategy=function(){delete this.routingStrategy,delete this.renderPoints,delete this.renderPointsWithoutSkipped,delete this.lockCreateRenderPoints,delete this.actualRoutingMode,delete this.shouldInvalidateRenderPoints,this.invalidateRenderPoints()},re.prototype.getCustomRenderPoints=function(q){void 0===q&&(q=!1);var Y=this.getRenderPoints(q),Z=[];return Y.forEach(function(Q,te){te>0&&te<Y.length-1&&Z.push(Q)}),Z},re.prototype.getRenderPoints=function(q){if(void 0===q&&(q=!1),(void 0===this.shouldInvalidateRenderPoints||this.shouldInvalidateRenderPoints)&&(this.shouldInvalidateRenderPoints=!1,this.routingStrategy&&this.lockCreateRenderPoints||this.changeRenderPoints(this.getCalculator().getPoints()),this.routingStrategy&&!this.lockCreateRenderPoints&&this.actualRoutingMode!==D.ConnectorRoutingMode.None&&this.points&&this.renderPoints)&&!this.points[0].equals(this.points[this.points.length-1])){var Q=this.routingStrategy.createRenderPoints(this.points,this.renderPoints,this.beginItem,this.endItem,this.beginConnectionPointIndex,this.endConnectionPointIndex,L.ModelUtils.getConnectorContainer(this));Q?(this.changeRenderPoints(Q),this.actualRoutingMode=D.ConnectorRoutingMode.AllShapesOnly):this.actualRoutingMode=D.ConnectorRoutingMode.None}return q?this.renderPoints:this.renderPointsWithoutSkipped},re.prototype.tryCreateRenderPointsContext=function(q){return q||this.shouldChangeRenderPoints?new K.ConnectorRenderPointsContext(this.renderPoints.map(function(Y){return Y.clone()}),this.lockCreateRenderPoints,this.actualRoutingMode):void 0},re.prototype.updatePointsOnPageResize=function(q,Y){this.points=this.points.map(function(Z){return Z.clone().offset(q,Y)}),this.renderPoints&&this.changeRenderPoints(this.renderPoints.map(function(Z){var Q=Z.clone().offset(q,Y);return Q.pointIndex=Z.pointIndex,Q.skipped=Z.skipped,Q}))},re.prototype.addPoint=function(q,Y){this.points.splice(q,0,Y)},re.prototype.deletePoint=function(q){this.points.splice(q,1)},re.prototype.movePoint=function(q,Y){this.points[q]=Y},re.prototype.onAddPoint=function(q,Y){this.shouldChangeRenderPoints?this.replaceRenderPointsCore(this.routingStrategy.onAddPoint(this.points,q,Y,this.renderPoints),!0,D.ConnectorRoutingMode.AllShapesOnly):this.invalidateRenderPoints()},re.prototype.onDeletePoint=function(q){this.shouldChangeRenderPoints?this.replaceRenderPointsCore(this.routingStrategy.onDeletePoint(this.points,q,this.renderPoints),this.points.length>2,D.ConnectorRoutingMode.AllShapesOnly):this.invalidateRenderPoints()},re.prototype.onMovePoint=function(q,Y){this.shouldChangeRenderPoints?(0!==q&&q!==this.points.length-1||(this.lockCreateRenderPoints=!1),this.replaceRenderPointsCore(this.routingStrategy.onMovePoint(this.points,q,Y,this.renderPoints),this.lockCreateRenderPoints,D.ConnectorRoutingMode.AllShapesOnly)):this.invalidateRenderPoints()},re.prototype.onMovePoints=function(q,Y,Z){this.shouldChangeRenderPoints?(0!==q&&Y!==this.points.length-1||(this.lockCreateRenderPoints=!1),this.replaceRenderPointsCore(this.routingStrategy.onMovePoints(this.points,q,Y,Z,this.renderPoints),this.lockCreateRenderPoints,D.ConnectorRoutingMode.AllShapesOnly)):this.invalidateRenderPoints()},re.prototype.replaceRenderPoints=function(q,Y){void 0!==q?(this.replaceRenderPointsCore(q.renderPoints,q.lockCreateRenderPoints,q.actualRoutingMode),void 0!==Y&&(this.shouldInvalidateRenderPoints=Y)):this.invalidateRenderPoints()},re.prototype.clearRenderPoints=function(){this.changeRenderPoints(void 0),this.lockCreateRenderPoints=!1,this.actualRoutingMode=void 0,this.invalidateRenderPoints()},re.prototype.replaceRenderPointsCore=function(q,Y,Z){this.changeRenderPoints(q),this.lockCreateRenderPoints=Y,this.actualRoutingMode=Z,this.invalidateRenderPoints()},re.prototype.changeRenderPoints=function(q){this.renderPoints=q,this.renderPointsWithoutSkipped=q?this.renderPoints.filter(function(Y){return!Y.skipped}):void 0},re.prototype.getCalculator=function(){return this.properties.lineOption===U.ConnectorLineOption.Straight?new N.ConnectorPointsCalculator(this):new G.ConnectorPointsOrthogonalCalculator(this)},re.prototype.invalidateRenderPoints=function(){this.shouldInvalidateRenderPoints=!0},re.prototype.createPrimitives=function(q){var Y=[],Z=this.getRenderPoints(),Q=new _.PathPrimitive(Z.map(function(te,pe){return 0===pe?new _.PathPrimitiveMoveToCommand(te.x,te.y):new _.PathPrimitiveLineToCommand(te.x,te.y)}),this.style);return Y.push(Q),(Y=Y.concat(this.createLineEndingPrimitives(Z,Q))).concat(this.createTextPrimitives(q))},re.prototype.createLineEndingPrimitives=function(q,Y){var Z=[];return q.length>1&&[{strategy:this.createLineEndingStrategy(this.properties.startLineEnding),point1:q[0],point2:q[1]},{strategy:this.createLineEndingStrategy(this.properties.endLineEnding),point1:q[q.length-1],point2:q[q.length-2]}].forEach(function(Q){var te=Q.strategy;if(te.hasCommands()){var pe=Y;te.needCreateSeparatePrimitive()&&Z.push(pe=te.createPrimitive()),pe.commands=pe.commands.concat(te.createCommands(Q.point1,Q.point2))}}),Z},re.prototype.createLineEndingStrategy=function(q){switch(q){case U.ConnectorLineEnding.None:return new k.ConnectorLineEndingNoneStrategy(this.style);case U.ConnectorLineEnding.Arrow:return new k.ConnectorLineEndingArrowStrategy(this.style);case U.ConnectorLineEnding.OutlinedTriangle:return new k.ConnectorLineEndingOutlinedTriangleStrategy(this.style);case U.ConnectorLineEnding.FilledTriangle:return new k.ConnectorLineEndingFilledTriangleStrategy(this.style);default:return new k.ConnectorLineEndingStrategy(this.style)}},re.prototype.createSelectorPrimitives=function(){var q=[],Y=this.getRenderPoints();return q.push(new _.PathPrimitive(Y.map(function(Z,Q){return 0===Q?new _.PathPrimitiveMoveToCommand(Z.x,Z.y):new _.PathPrimitiveLineToCommand(Z.x,Z.y)}),null,"selector")),q},re.prototype.createTextPrimitives=function(q){var Y=this;if(!this.enableText)return[];var Z=[];return this.texts.forEach(function(Q){var te=Y.getText(Q.position);if(te&&""!==te){var pe=Y.getTextPoint(Q.position);Z=Z.concat([new x.TextPrimitive(pe.x,pe.y,te,g.TextOwner.Connector,void 0,void 0,void 0,Y.styleText,!0,null,a.PAGE_BG_TEXTFLOOR_FILTER_IDPREFIX+q,void 0,function(z){w.RenderUtils.setElementEventData(z,h.MouseEventElementType.ConnectorText,Y.key,Q.position)})])}}),Z},re.prototype.getExtremeItem=function(q){return q===T.Begin?this.beginItem:q===T.End?this.endItem:null},re.prototype.getExtremeConnectionPointIndex=function(q){return q===T.Begin?this.beginConnectionPointIndex:q===T.End?this.endConnectionPointIndex:-1},re.prototype.getMinX=function(){return this.getRenderPoints().map(function(q){return q.x}).reduce(function(q,Y){return Math.min(q,Y)},Number.MAX_VALUE)},re.prototype.getMinY=function(){return this.getRenderPoints().map(function(q){return q.y}).reduce(function(q,Y){return Math.min(q,Y)},Number.MAX_VALUE)},re.prototype.getConnectionPoints=function(){return[]},re.prototype.getConnectionPointSide=function(q,Y){return I.ConnectionPointSide.Undefined},re.prototype.getSegments=function(){var q=[],Y=this.getRenderPoints();return Y.forEach(function(Z,Q){Q>0&&q.push(new c.Segment(Y[Q-1],Z))}),q},re.prototype.intersectedByRect=function(q){return this.getSegments().some(function(Y){return Y.isIntersectedByRect(q)})},re.prototype.toNative=function(q){var Y=new u.NativeConnector(this.key,this.dataKey);return Y.fromKey=this.beginItem&&this.beginItem.dataKey,Y.toKey=this.endItem&&this.endItem.dataKey,Y.texts=this.texts.map(function(Z){return Z}).sort(function(Z,Q){return Z.position-Q.position}).map(function(Z){return Z.value}),Y.fromId=this.beginItem&&this.beginItem.key,Y.fromPointIndex=this.beginConnectionPointIndex,Y.toId=this.endItem&&this.endItem.key,Y.toPointIndex=this.endConnectionPointIndex,Y.points=this.points.map(function(Z){return Z.clone()}),Y.applyUnits(q),Y},re.minOffset=y.UnitConverter.pixelsToTwips(24),re.minTextHeight=y.UnitConverter.pixelsToTwips(12),re}(I.DiagramItem);P.Connector=J},5454:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorLineEndingFilledTriangleStrategy=P.ConnectorLineEndingOutlinedTriangleStrategy=P.ConnectorLineEndingArrowStrategy=P.ConnectorLineEndingNoneStrategy=P.ConnectorLineEndingStrategy=void 0;var T=b(8675),y=b(7724),d=function(){function h(g){this.style=g}return h.prototype.hasCommands=function(){return!0},h.prototype.needCreateSeparatePrimitive=function(){return!1},h.prototype.createPrimitive=function(){return new y.PathPrimitive([],this.getStyle(),this.getCssClass())},h.prototype.createCommands=function(g,_){return[]},h.prototype.getStyle=function(){var g=this.style.clone();return g.resetStrokeDashArray(),g},h.prototype.getCssClass=function(){},h}();P.ConnectorLineEndingStrategy=d;var c=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),g.prototype.hasCommands=function(){return!1},g}(d);P.ConnectorLineEndingNoneStrategy=c;var s=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),Object.defineProperty(g.prototype,"arrowHeight",{get:function(){return 6*this.style.strokeWidth},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"arrowWidth",{get:function(){return 2*this.style.strokeWidth},enumerable:!1,configurable:!0}),g.prototype.needCreateSeparatePrimitive=function(){return!this.style.isDefaultStrokeDashArray()},g.prototype.createCommands=function(_,x){var w=this.getArrowPoints(_,x),D=[new y.PathPrimitiveMoveToCommand(w.point1.x,w.point1.y),new y.PathPrimitiveLineToCommand(_.x,_.y),new y.PathPrimitiveLineToCommand(w.point2.x,w.point2.y)];return this.style.isDefaultStrokeDashArray()||(D=D.concat([new y.PathPrimitiveMoveToCommand(_.x,_.y),new y.PathPrimitiveLineToCommand(w.point3.x,w.point3.y)])),D},g.prototype.getArrowPoints=function(_,x){var w,D=this.arrowHeight;return _.x===x.x&&(w=Math.abs(_.y-x.y))<D&&(D=w),_.y===x.y&&(w=Math.abs(_.x-x.x))<D&&(D=w),T.GeometryUtils.getArrowPoints(_,x,D,this.arrowWidth)},g}(d);P.ConnectorLineEndingArrowStrategy=s;var a=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),g.prototype.needCreateSeparatePrimitive=function(){return!0},g.prototype.createCommands=function(_,x){var w=this.getArrowPoints(_,x);return[new y.PathPrimitiveMoveToCommand(w.point1.x,w.point1.y),new y.PathPrimitiveLineToCommand(_.x,_.y),new y.PathPrimitiveLineToCommand(w.point2.x,w.point2.y),new y.PathPrimitiveClosePathCommand]},g.prototype.getCssClass=function(){return"outlined-line-ending"},g}(s);P.ConnectorLineEndingOutlinedTriangleStrategy=a;var u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),g.prototype.getStyle=function(){var _=h.prototype.getStyle.call(this);return _.fill=_.stroke,_},g.prototype.getCssClass=function(){return"filled-line-ending"},g}(a);P.ConnectorLineEndingFilledTriangleStrategy=u},4612:(o,P)=>{var b,f,T;Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorProperties=P.DEFAULT_CONNECTOR_ENDLINEENDING=P.DEFAULT_CONNECTOR_STARTLINEENDING=P.DEFAULT_CONNECTOR_LINEOPTION=P.ConnectorLineEnding=P.ConnectorLineOption=void 0,(T=b=P.ConnectorLineOption||(P.ConnectorLineOption={}))[T.Straight=0]="Straight",T[T.Orthogonal=1]="Orthogonal",function(T){T[T.None=0]="None",T[T.Arrow=1]="Arrow",T[T.OutlinedTriangle=2]="OutlinedTriangle",T[T.FilledTriangle=3]="FilledTriangle"}(f=P.ConnectorLineEnding||(P.ConnectorLineEnding={})),P.DEFAULT_CONNECTOR_LINEOPTION=b.Orthogonal,P.DEFAULT_CONNECTOR_STARTLINEENDING=f.None,P.DEFAULT_CONNECTOR_ENDLINEENDING=f.Arrow;var S=function(){function T(){this.lineOption=P.DEFAULT_CONNECTOR_LINEOPTION,this.startLineEnding=P.DEFAULT_CONNECTOR_STARTLINEENDING,this.endLineEnding=P.DEFAULT_CONNECTOR_ENDLINEENDING}return T.prototype.clone=function(){var y=new T;return y.lineOption=this.lineOption,y.startLineEnding=this.startLineEnding,y.endLineEnding=this.endLineEnding,y},T.prototype.forEach=function(y){for(var d in this)Object.prototype.hasOwnProperty.call(this,d)&&y(d)},T.prototype.toObject=function(){var y={},d=!1;return this.lineOption!==P.DEFAULT_CONNECTOR_LINEOPTION&&(y.lineOption=this.lineOption,d=!0),this.startLineEnding!==P.DEFAULT_CONNECTOR_STARTLINEENDING&&(y.startLineEnding=this.startLineEnding,d=!0),this.endLineEnding!==P.DEFAULT_CONNECTOR_ENDLINEENDING&&(y.endLineEnding=this.endLineEnding,d=!0),d?y:null},T.prototype.fromObject=function(y){"number"==typeof y.lineOption&&(this.lineOption=y.lineOption),"number"==typeof y.startLineEnding&&(this.startLineEnding=y.startLineEnding),"number"==typeof y.endLineEnding&&(this.endLineEnding=y.endLineEnding)},T}();P.ConnectorProperties=S},4717:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorRenderPoint=void 0;var T=function(y){function d(c,s,a,u){void 0===a&&(a=-1),void 0===u&&(u=!1);var h=y.call(this,c,s)||this;return h.pointIndex=a,h.skipped=u,h}return S(d,y),d.prototype.offset=function(c,s){return y.prototype.offset.call(this,c,s),this.pointIndex=-1,this.skipped=!1,this},d.prototype.multiply=function(c,s){return y.prototype.multiply.call(this,c,s),this.pointIndex=-1,this.skipped=!1,this},d.prototype.clone=function(){return new d(this.x,this.y,this.pointIndex,this.skipped)},d.equal=function(c,s){return c.equals(s)&&c.pointIndex===s.pointIndex&&c.skipped===s.skipped},d.prototype.toObject=function(){return{x:this.x,y:this.y,pointIndex:this.pointIndex,skipped:this.skipped}},d.fromObject=function(c){return new d(c.x,c.y,c.pointIndex,c.skipped)},d}(b(8900).Point);P.ConnectorRenderPoint=T},4351:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorTexts=P.ConnectorText=void 0;var b=function(S,T){this.position=S,this.value=T};P.ConnectorText=b;var f=function(){function S(){this.items={}}return S.prototype.get=function(T){return this.items[T]},S.prototype.set=function(T,y){this.items[T]=y},S.prototype.remove=function(T){delete this.items[T]},S.prototype.map=function(T){var y=[];return this.forEach(function(d){return y.push(T(d))}),y},S.prototype.forEach=function(T){for(var y in this.items)Object.prototype.hasOwnProperty.call(this.items,y)&&T(this.items[y])},S.prototype.count=function(){return Object.keys(this.items).length},S.prototype.clone=function(){var T=new S;return this.forEach(function(y){T.set(y.position,new b(y.position,y.value))}),T},S.prototype.toObject=function(){var T={},y=!1;return this.forEach(function(d){T[d.position]=d.value,y=!0}),y?T:null},S.prototype.fromObject=function(T){for(var y in T)if(Object.prototype.hasOwnProperty.call(T,y)){var d=parseFloat(y);isNaN(d)||"string"!=typeof T[y]||this.set(d,new b(d,T[y]))}},S}();P.ConnectorTexts=f},3975:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.AStarCalculator=void 0;var b=function(){function f(){}return f.calculate=function(S){if(S)for(var T=this.start(S);T;)T=T(S)},f.start=function(S){return S.start(),S.shouldStartContinue?f.startContinue:f.finishWithPath},f.startContinue=function(S){return S.startContinue(),S.shouldFinish?f.finishWithPath:f.endContinue},f.endContinue=function(S){return S.endContinue(),S.shouldStartContinue?f.startContinue:f.finishWithoutPath},f.finishWithPath=function(S){S.finishWithPath()},f.finishWithoutPath=function(S){S.finishWithoutPath()},f}();P.AStarCalculator=b},2180:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.AStarContext=P.AStarContextBase=void 0;var T=b(3225),y=b(1039),d=b(684),c=b(1335),s=b(5074),a=b(8675),u=function(){function g(_,x,w){this.startPosition=_,this.targetPosition=x,this.maxStepsCount=w,this.prohibitedPoints={}}return Object.defineProperty(g.prototype,"shouldStartContinue",{get:function(){return this.updatableSet.count>0&&this.stepsCount<this.maxStepsCount},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"shouldFinish",{get:function(){return this.currentNode.position.equals(this.targetPosition)},enumerable:!1,configurable:!0}),g.prototype.start=function(){this.generalSet=new T.SortedQueues(function(x){return x.key}),this.updatableSet=new y.UniqueAStarNodePositions;var _=new d.AStarNode(this.startPosition,this.getDistance(this.startPosition,this.targetPosition));this.currentNode=_,this.generalSet.enqueue(_),this.updatableSet.add(_.position,_),this.stepsCount=0,this.openNode=void 0},g.prototype.startContinue=function(){this.currentNode=this.generalSet.dequeueMin()},g.prototype.endContinue=function(){var _=this,x=this.currentNode.position;this.updatableSet.remove(x),this.addProhibitedPoint(x),this.getNeighborPoints(x).forEach(function(w){var D=_.getPenalty(_.currentNode,w),C=_.updatableSet.getNode(w);if(void 0===C)(C=new d.AStarNode(w,_.getDistance(w,_.targetPosition))).parent=_.currentNode,C.penalty=D,_.generalSet.enqueue(C),_.updatableSet.add(w,C);else if(C.penalty>D){var I=_.generalSet;I.remove(C),C.parent=_.currentNode,C.penalty=D,I.enqueue(C)}_.openNode=C}),this.stepsCount++},g.prototype.finishWithPath=function(){this.path=this.currentNode.getPath()},g.prototype.finishWithoutPath=function(){this.path=[]},g}();P.AStarContextBase=u;var h=function(g){function _(x,w,D,C,I,L){var N=g.call(this,w,D,1e4)||this;return N.routingContext=x,N.startPosition=w,N.targetPosition=D,N.prohibitedSegments=C,N.grid=I,N.metrics=L,N}return S(_,g),_.prototype.addProhibitedPoint=function(x){this.prohibitedPoints[x.toString()]=x},_.prototype.getNeighborPoints=function(x){var w=this;return this.grid.getNeighborPoints(x).filter(function(D){return w.allowPoint(D)})},_.prototype.getDistance=function(x,w){return this.metrics.distance(x,w)},_.prototype.getPenalty=function(x,w){var D=x.parent,C=x.position,I=this.getTurnDirection(D?a.GeometryUtils.createAngle(D.position,C,w):0),L=this.getDistance(C,w),N=new c.Segment(C,w).center;return x.penalty+this.metrics.penalty(L,N,I,this.getIntersectedItems(N))},_.prototype.allowPoint=function(x){return void 0===this.prohibitedPoints[x.toString()]&&(!this.prohibitedSegments||this.prohibitedSegments.allowPoint(x))},_.prototype.getTurnDirection=function(x){return s.RightAngleConnectorRoutingMathOperations.getTurnDirection(x)},_.prototype.getIntersectedItems=function(x){var w=this,D=this.routingContext.shapeMargins;return this.routingContext.getIntersectedItems(x,function(C,I){return w.hasIntersectedItem(C,I,D)})},_.prototype.hasIntersectedItem=function(x,w,D){return!(!this.isIntersectedWithExtendedRectangle(x,w,D)||!this.hasOneShapeConnection(w)&&this.itemContainsConnectionPoints(w))},_.prototype.isIntersectedWithExtendedRectangle=function(x,w,D){return w.rectangle.clone().inflate(D).containsPoint(x)},_.prototype.itemContainsConnectionPoints=function(x){var w=x.rectangle;return w.containsPoint(this.routingContext.beginPoint)&&w.containsPoint(this.routingContext.endPoint)},_.prototype.hasOneShapeConnection=function(x){var w=x.getConnectionPoints();return this.isConnectionPoint(w,this.routingContext.beginPoint)&&this.isConnectionPoint(w,this.routingContext.endPoint)},_.prototype.isConnectionPoint=function(x,w){return x.filter(function(D){return D.equals(w)}).length>0},_}(u);P.AStarContext=h},9927:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.IntersectedShapeZone=P.AStarMetrics=P.IntersectedShapesMetrics=P.TurnDirectionMetrics=P.IntersectedShapeMetrics=P.RightAngleTurnDirection=void 0;var f,a,S=b(8900),T=b(5596);(a=f=P.RightAngleTurnDirection||(P.RightAngleTurnDirection={}))[a.Straight=0]="Straight",a[a.Left=1]="Left",a[a.Right=2]="Right",a[a.Backwards=3]="Backwards";var y=function(){function a(u,h){this.description=u,this.shapeMargin=h}return a.prototype.penalty=function(u,h,g,_){var x=_.rectangle;if(x.containsPoint(g))return u+this.description.shape*h;var w=this.createRelativeMarginPenalty(g,x,this.shapeMargin);return w>0?u+this.description.margin*w*h:u},a.prototype.createRelativeMarginPenalty=function(u,h,g){var _=this.isTopPosition(u,h,g),x=this.isLeftPosition(u,h,g),w=this.isBottomPosition(u,h,g),D=this.isRightPosition(u,h,g);if(_){if(x){var C=(N=h.clone().inflate(g)).createPosition(),I=h.createPosition(),L=T.Metrics.euclideanDistance(I,C);return 1-T.Metrics.euclideanDistance(I,u)/L}if(D){var N=h.clone().inflate(g),G=new S.Point(N.right,N.y),k=new S.Point(h.right,h.y),U=T.Metrics.euclideanDistance(k,G);return 1-T.Metrics.euclideanDistance(k,u)/U}return 1-(h.y-u.y)/g}if(w){if(x){N=h.clone().inflate(g);var B=new S.Point(N.x,N.bottom),K=new S.Point(h.x,h.bottom),J=T.Metrics.euclideanDistance(K,B);return 1-T.Metrics.euclideanDistance(K,u)/J}if(D){N=h.clone().inflate(g);var ie=new S.Point(N.right,N.bottom),re=new S.Point(h.right,h.bottom),q=T.Metrics.euclideanDistance(re,ie);return 1-T.Metrics.euclideanDistance(re,u)/q}return 1-(u.y-h.bottom)/g}return x?1-(h.x-u.x)/g:D?1-(u.x-h.right)/g:0},a.prototype.isTopPosition=function(u,h,g){return u.x>h.x-g&&u.x<h.right+g&&u.y>h.y-g&&u.y<h.y},a.prototype.isBottomPosition=function(u,h,g){return u.x>h.x-g&&u.x<h.right+g&&u.y>h.bottom&&u.y<h.bottom+g},a.prototype.isLeftPosition=function(u,h,g){return u.x>h.x-g&&u.x<h.x&&u.y>h.y-g&&u.y<h.bottom+g},a.prototype.isRightPosition=function(u,h,g){return u.x>h.right&&u.x<h.right+g&&u.y>h.y-g&&u.y<h.bottom+g},a}();P.IntersectedShapeMetrics=y;var d=function(){function a(u){this.description=u}return a.prototype.penalty=function(u,h){switch(h){case f.Backwards:return u*this.description.turnBack;case f.Left:return u*this.description.turnLeft;case f.Right:return u*this.description.turnRight}return u},a}();P.TurnDirectionMetrics=d;var c=function(){function a(u){this.shapeMetrics=u}return a.prototype.penalty=function(u,h,g,_){var x=this;if(!_||!_.length)return u;var w=u;return _.forEach(function(D){return w=x.shapeMetrics.penalty(w,h,g,D)}),w},a}();P.IntersectedShapesMetrics=c;var s=function(){function a(u,h){this.turnDirectionMetrics=u,this.shapesMetrics=h}return a.prototype.distance=function(u,h){return T.Metrics.manhattanDistance(u,h)},a.prototype.penalty=function(u,h,g,_){var x=u;return x=this.shapesMetrics.penalty(x,u,h,_),this.turnDirectionMetrics.penalty(x,g)},a}();P.AStarMetrics=s,function(a){a[a.None=0]="None",a[a.Shape=1]="Shape",a[a.Margin=2]="Margin"}(P.IntersectedShapeZone||(P.IntersectedShapeZone={}))},684:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.AStarNode=void 0;var b=function(){function f(S,T){this.position=S,this.distance=T,this.penalty=0}return Object.defineProperty(f.prototype,"key",{get:function(){return this.distance+this.penalty},enumerable:!1,configurable:!0}),f.prototype.getPath=function(){for(var S=[],T=this;void 0!==T;)S.splice(0,0,T.position),T=T.parent;return S},f}();P.AStarNode=b},3225:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SortedQueues=void 0;var f=b(2400),S=function(){function T(y){this.getKey=y,this._itemsArrays={},this._sortedKeys=[]}return Object.defineProperty(T.prototype,"sortedKeys",{get:function(){return this._sortedKeys},enumerable:!1,configurable:!0}),T.prototype.getQueue=function(y){return this._itemsArrays[y]},T.prototype.enqueue=function(y){var d=this.getKey(y);void 0===this._itemsArrays[d]?(this._itemsArrays[d]=[y],this.addSortedKey(d)):this._itemsArrays[d].push(y)},T.prototype.remove=function(y){var d=this.getKey(y),c=this._itemsArrays[d];void 0!==c&&(c.length?c[0]===y?(c.shift(),c.length||this.removeCore(d)):this._itemsArrays[d]=c.filter(function(s){return s!==y}):this.removeCore(d))},T.prototype.dequeueMin=function(){if(this._sortedKeys.length){var y=this._sortedKeys[0],d=this._itemsArrays[y],c=d.shift();return d.length||this.removeCore(y),c}},T.prototype.removeCore=function(y){delete this._itemsArrays[y],this.removeSortedKey(y)},T.prototype.removeSortedKey=function(y){var d=f.SearchUtils.binaryIndexOf(this._sortedKeys,function(c){return c-y});d>=0&&this.sortedKeys.splice(d,1)},T.prototype.addSortedKey=function(y){var d=f.SearchUtils.binaryIndexOf(this._sortedKeys,function(c){return c-y});d<0&&this._sortedKeys.splice(-(d+1),0,y)},T}();P.SortedQueues=S},1039:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.UniqueAStarNodePositions=void 0;var b=function(){function f(S){void 0===S&&(S=function(T){return T.toString()}),this.getKey=S,this.items={}}return Object.defineProperty(f.prototype,"count",{get:function(){return Object.keys(this.items).length},enumerable:!1,configurable:!0}),f.prototype.getNode=function(S){var T=this.items[this.getKey(S)];return void 0!==T?T.node:void 0},f.prototype.add=function(S,T){var y=this.getKey(S);void 0===this.items[y]&&(this.items[y]={position:S,node:T})},f.prototype.remove=function(S){var T=this.getKey(S);void 0!==this.items[T]&&delete this.items[T]},f}();P.UniqueAStarNodePositions=b},1768:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorProhibitedSegments=void 0;var b=function(){function f(){this.segments=[],this.exludedPoints={}}return f.prototype.addSegment=function(S){this.segments.push(S)},f.prototype.addExludedPoint=function(S){this.exludedPoints[S.toString()]=S},f.prototype.allowPoint=function(S){if(void 0===this.exludedPoints[S.toString()])for(var T=0;T<this.segments.length;T++)if(this.segments[T].containsPoint(S))return!1;return!0},f}();P.ConnectorProhibitedSegments=b},1510:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorRenderPointsContext=void 0;var f=b(4717),S=function(){function T(y,d,c){this.renderPoints=y,this.lockCreateRenderPoints=d,this.actualRoutingMode=c}return T.prototype.toObject=function(){return{actualRoutingMode:this.actualRoutingMode,lockCreateRenderPoints:this.lockCreateRenderPoints,renderPoints:this.renderPoints.map(function(y){return y.toObject()})}},T.fromObject=function(y){return new T(y.renderPoints.map(function(d){return f.ConnectorRenderPoint.fromObject(d)}),y.lockCreateRenderPoints,y.actualRoutingMode)},T}();P.ConnectorRenderPointsContext=S},2868:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorRenderSegment=void 0;var f=b(1335),S=b(1768),T=function(){function y(d,c,s,a){this.startInfo=d,this.endInfo=c,this.startPointIndex=s,this.previousCustomSegment=a}return Object.defineProperty(y.prototype,"startPathPoint",{get:function(){return this.startInfo instanceof f.Segment?this.startInfo.endPoint:this.startInfo},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"endPathPoint",{get:function(){return this.endInfo instanceof f.Segment?this.endInfo.startPoint:this.endInfo},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"startPoint",{get:function(){return this.startInfo instanceof f.Segment?this.startInfo.startPoint:this.startInfo},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"endPoint",{get:function(){return this.endInfo instanceof f.Segment?this.endInfo.endPoint:this.endInfo},enumerable:!1,configurable:!0}),y.prototype.createGridPoints=function(){var d=[];return this.endInfo instanceof f.Segment?(d.push(this.endInfo.startPoint),d.push(this.endInfo.endPoint)):d.push(this.endInfo),d},y.prototype.createProhibitedSegments=function(){if(this.startInfo instanceof f.Segment){var d=this.createProhibitedSegmentsCore(this.startInfo);return this.endInfo instanceof f.Segment&&(d.addSegment(this.endInfo),d.addExludedPoint(this.endInfo.startPoint)),this.previousCustomSegment&&d.addSegment(this.previousCustomSegment),d}return this.endInfo instanceof f.Segment?((d=this.createProhibitedSegmentsCore(this.endInfo)).addExludedPoint(this.endInfo.startPoint),this.previousCustomSegment&&d.addSegment(this.previousCustomSegment),d):this.previousCustomSegment?this.createProhibitedSegmentsCore(this.previousCustomSegment):void 0},y.prototype.createProhibitedSegmentsCore=function(d){var c=new S.ConnectorProhibitedSegments;return c.addSegment(d),c},y}();P.ConnectorRenderSegment=T},5714:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorRoutingModel=P.ConnectorRoutingPenaltyDescription=void 0;var f=b(240),S=b(5503),T=b(7959),y=b(4612),d=b(3597),c=function(){this.shape=20,this.margin=2,this.turnBack=20,this.turnLeft=3.1,this.turnRight=3};P.ConnectorRoutingPenaltyDescription=c;var s=function(){function a(){this.connectorRoutingMode=f.ConnectorRoutingMode.AllShapesOnly,this.shapeMargins=T.Connector.minOffset,this.shouldReverseConnections=!0,this.shouldResizeConnections=!0,this.penaltyDescription=new c}return a.prototype.initialize=function(u){this.model=u},a.prototype.createStrategy=function(u){if(void 0!==this.model&&this.connectorRoutingMode!==f.ConnectorRoutingMode.None&&u===y.ConnectorLineOption.Orthogonal)return new d.RightAngleConnectorRoutingStrategy(this)},a.prototype.getItems=function(u,h){return this.getShapes(u,h)},a.prototype.notifyConnectorRoutingModeChanged=function(u){this.connectorRoutingMode=u},a.prototype.getShapes=function(u,h){return void 0===this.model||void 0===this.connectorRoutingMode||this.connectorRoutingMode===f.ConnectorRoutingMode.None?[]:this.connectorRoutingMode===f.ConnectorRoutingMode.AllShapesOnly?this.model.items.filter(function(g){return g instanceof S.Shape}):this.getConnectorShapes(u,h)},a.prototype.getConnectorShapes=function(u,h){var g=[];return u&&g.push(u),h&&u!==h&&g.push(h),g},a}();P.ConnectorRoutingModel=s},1254:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RoutingGrid=void 0;var f=b(2400),S=function(){function T(y,d,c){this.verticalGridLines=y,this.horizontalGridLines=d,this.createPoint=c}return T.create=function(y,d,c){var s=this,a=[],u=[],h={},g={};return d.forEach(function(_){s.addLine(_.x,a,h),s.addLine(_.right,a,h),s.addLine(_.y,u,g),s.addLine(_.bottom,u,g)}),y.forEach(function(_){s.addLine(_.x,a,h),s.addLine(_.y,u,g)}),a.sort(function(_,x){return _-x}),u.sort(function(_,x){return _-x}),new T(a,u,c)},T.addLine=function(y,d,c){c[y]||(d.push(y),c[y]=!0)},T.prototype.getNeighborPoints=function(y){var d=[];if(!(this.horizontalGridLines&&this.horizontalGridLines.length&&this.verticalGridLines&&this.verticalGridLines.length))return d;var c=f.SearchUtils.binaryIndexOf(this.verticalGridLines,function(a){return a-y.x});c<0?this.isValidArrayIndex(this.verticalGridLines,c=~c)&&d.push(this.createPoint(this.verticalGridLines[c],y.y)):this.isValidArrayIndex(this.verticalGridLines,c+1)&&d.push(this.createPoint(this.verticalGridLines[c+1],y.y)),this.isValidArrayIndex(this.verticalGridLines,c-1)&&d.push(this.createPoint(this.verticalGridLines[c-1],y.y));var s=f.SearchUtils.binaryIndexOf(this.horizontalGridLines,function(a){return a-y.y});return s<0?this.isValidArrayIndex(this.horizontalGridLines,s=~s)&&d.push(this.createPoint(y.x,this.horizontalGridLines[s])):this.isValidArrayIndex(this.horizontalGridLines,s+1)&&d.push(this.createPoint(y.x,this.horizontalGridLines[s+1])),this.isValidArrayIndex(this.horizontalGridLines,s-1)&&d.push(this.createPoint(y.x,this.horizontalGridLines[s-1])),d},T.prototype.isValidArrayIndex=function(y,d){return y&&d>=0&&d<y.length},T}();P.RoutingGrid=S},1794:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RightAngleConnectorRoutingContext=P.IntersectingItemsByPointsContext=P.CuttingItemsContext=void 0;var f=b(8900),S=b(1335),T=b(9716),y=b(3742),d=b(5074),c=b(2868),s=b(1254),a=b(4867),u=b(9927),h=b(2180),g=b(3975),_=b(8675),x=function(){function C(){this.cuttingItemKeys=[]}return Object.defineProperty(C.prototype,"isEmpty",{get:function(){return 0===this.cuttingItemKeys.length},enumerable:!1,configurable:!0}),C.prototype.registerShape=function(I,L,N){return!!_.GeometryUtils.areSegmentsCutRectangle(N,L)&&(this.cuttingItemKeys.push(I),!0)},C}();P.CuttingItemsContext=x;var w=function(){function C(){this.items={}}return C.prototype.getOrAddItems=function(I,L){if(I){var N=I.toString(),G=this.items[N];if(void 0!==G)return G.items;if(L){var k=L(I);return this.items[N]={point:I,items:k},k}}},C}();P.IntersectingItemsByPointsContext=w;var D=function(){function C(I,L,N,G,k,U,B){this.routingModel=I,this.points=L,this.supportRenderPoints=N,this.beginConnectionShape=G,this.endConnectionShape=k,this.beginConnectionSide=this.getConnectionSide(this.beginConnectionShape,U,this.beginPoint),this.endConnectionSide=this.getConnectionSide(this.endConnectionShape,B,this.endPoint),this.ignorableItemKeys={},this.cuttingShapesContext=new x,this.intersectedItemsByPointsContext=new w,this.isInvalidRenderSegments=!0}return Object.defineProperty(C.prototype,"shapeMargins",{get:function(){return this.routingModel.shapeMargins},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"beginPoint",{get:function(){return this.points[0]},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"endPoint",{get:function(){return this.points[this.points.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasIntersecting",{get:function(){return!this.cuttingShapesContext.isEmpty},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"shouldCreateRenderPoints",{get:function(){return this.isInvalidRenderSegments||!this.isSmallPath&&(this.hasIntersecting||this.isReversedStartConnection||this.isReversedEndConnection)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"beginPathPoint",{get:function(){return this.beginConnectionSegment instanceof S.Segment?this.beginConnectionSegment.startPoint:this.beginConnectionSegment},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"endPathPoint",{get:function(){return this.endConnectionSegment instanceof S.Segment?this.endConnectionSegment.endPoint:this.endConnectionSegment},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isReversedStartConnection",{get:function(){if(!this.beginConnectionShape||this.beginConnectionSide===y.ConnectionPointSide.Undefined)return!1;var I=this.beginConnectionSegment;return!(I instanceof f.Point)&&this.isReversedConnectionSegment(this.supportSegments[0],I)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isReversedEndConnection",{get:function(){if(!this.endConnectionShape||this.endConnectionSide===y.ConnectionPointSide.Undefined)return!1;var I=this.endConnectionSegment;return!(I instanceof f.Point)&&this.isReversedConnectionSegment(this.supportSegments[this.supportSegments.length-1],I)},enumerable:!1,configurable:!0}),C.prototype.isReversedConnectionSegment=function(I,L){return T.Vector.scalarProduct(T.Vector.fromSegment(I),T.Vector.fromPoints(L.startPoint,L.endPoint))<=0},Object.defineProperty(C.prototype,"isSmallPath",{get:function(){var I=2*this.routingModel.shapeMargins;return Math.abs(this.beginPathPoint.x-this.endPathPoint.x)<I&&Math.abs(this.beginPathPoint.y-this.endPathPoint.y)<I},enumerable:!1,configurable:!0}),C.prototype.initialize=function(I){this.processContainers(I),this.processSupportSegments(),this.processIntersection(),this.processConnections(),this.processRenderSegments()},C.prototype.setup=function(){this.processRoutingGrid(),this.processRoutingMetrics()},C.prototype.createRoutedPoints=function(I,L,N){var U=this.createAStarContext(I instanceof f.Point?I:I.endPoint,L instanceof f.Point?L:L.startPoint,N);g.AStarCalculator.calculate(U);var B=U.path;return this.addConnectionRoutedPoints(B,I,L),d.RightAngleConnectorRoutingMathOperations.unionPoints(B),B},C.prototype.getIntersectedItems=function(I,L){var N=this;return this.intersectedItemsByPointsContext.getOrAddItems(I,function(G){return N.routingModel.getItems(N.beginConnectionShape,N.endConnectionShape).filter(function(k){return!N.isIgnorableItem(k)&&L(G,k)})})},C.prototype.validateRenderPoints=function(I){this.isInvalidRenderSegments&&(d.RightAngleConnectorRoutingMathOperations.unionPoints(I),a.ModelUtils.validateRenderPointIndexes(this.points,I,0)),a.ModelUtils.skipUnnecessaryRightAngleRenderPoints(I)},C.prototype.processContainers=function(I){if(I&&this.registerIgnorableShape(I),this.beginConnectionShape){var L=this.beginConnectionShape.container;L&&this.registerIgnorableShape(L)}if(this.endConnectionShape){var N=this.endConnectionShape.container;N&&this.registerIgnorableShape(N)}},C.prototype.processSupportSegments=function(){this.supportSegments=this.createSupportSegments()},C.prototype.processIntersection=function(){var I=this,L=this.routingModel.getItems(this.beginConnectionShape,this.endConnectionShape);L&&L.forEach(function(N){var G=N.key,k=N.rectangle;I.cuttingShapesContext.registerShape(G,k,I.supportSegments)?void 0!==I.ignorableItemKeys[G]&&delete I.ignorableItemKeys[G]:(!I.isConnectedByStart(N)&&k.containsPoint(I.beginPoint)||!I.isConnectedByEnd(N)&&k.containsPoint(I.endPoint))&&I.registerIgnorableShape(N)})},C.prototype.processConnections=function(){var I=!1,L=!1;this.beginConnectionShape!==this.endConnectionShape&&(I=this.shapeContainsOtherConnection(this.beginConnectionShape,this.endConnectionShape,this.endPoint),L=this.shapeContainsOtherConnection(this.endConnectionShape,this.beginConnectionShape,this.beginPoint),I&&this.registerIgnorableShape(this.beginConnectionShape),L&&this.registerIgnorableShape(this.endConnectionShape));var N=this.routingModel.shapeMargins;this.beginConnectionSegment=this.createBeginConnectionSegment(N,I),this.endConnectionSegment=this.createEndConnectionSegment(N,L)},C.prototype.processRenderSegments=function(){this.isInvalidRenderSegments=!1,this.renderSegments=this.createRenderSegments();for(var I=0;I<this.renderSegments.length-1;I++)if(this.renderSegments[I].endPoint.equals(this.renderSegments[I+1].startPoint))return void(this.isInvalidRenderSegments=!0)},C.prototype.createGridPoints=function(){var I=[];return this.renderSegments.forEach(function(L){return L.createGridPoints().forEach(function(N){return I.push(N)})}),I},C.prototype.processRoutingGrid=function(){this.routingGrid=this.createGrid()},C.prototype.processRoutingMetrics=function(){this.metrics=this.createAStarMetrics()},C.prototype.createAStarMetrics=function(){return new u.AStarMetrics(new u.TurnDirectionMetrics(this.routingModel.penaltyDescription),new u.IntersectedShapesMetrics(new u.IntersectedShapeMetrics(this.routingModel.penaltyDescription,this.routingModel.shapeMargins)))},C.prototype.createAStarContext=function(I,L,N){return new h.AStarContext(this,I,L,N,this.routingGrid,this.metrics)},C.prototype.addConnectionRoutedPoints=function(I,L,N){L instanceof S.Segment&&I.splice(0,0,L.startPoint),N instanceof S.Segment&&I.push(N.endPoint)},C.prototype.createSupportSegments=function(){var I=this;return this.supportRenderPoints.length<=1?[]:_.GeometryUtils.createSegments(this.supportRenderPoints).filter(function(L){return!I.isCustomSegment(L,I.supportRenderPoints[0],I.supportRenderPoints[I.supportRenderPoints.length-1])})},C.prototype.isCustomSegment=function(I,L,N){var G=I.startPoint;if(G.equals(L))return!1;var k=I.endPoint;return!k.equals(N)&&k.pointIndex-G.pointIndex==1},C.prototype.createRenderSegments=function(){var I=this,L=d.RightAngleConnectorRoutingMathOperations.createUnionSegments(this.supportSegments,function(G,k){return I.shouldCreateSegment(G,k)}),N=L.length-1;return L.map(function(G,k){return new c.ConnectorRenderSegment(k>0?new f.Point(G.startPoint.x,G.startPoint.y):I.beginConnectionSegment,k<N?new f.Point(G.endPoint.x,G.endPoint.y):I.endConnectionSegment,G.startPoint.pointIndex,I.createPreviousCustomSegment(G.startPoint))})},C.prototype.createPreviousCustomSegment=function(I){var L=I.pointIndex-1;return L>=0?new S.Segment(this.points[L].clone(),new f.Point(I.x,I.y)):void 0},C.prototype.shouldCreateSegment=function(I,L){return!I.equals(L)||L.pointIndex>0},C.prototype.isPathNormal=function(I){return I===y.ConnectionPointSide.Undefined||d.RightAngleConnectorRoutingMathOperations.isSegmentNormal(new S.Segment(this.beginPoint,this.endPoint),I===y.ConnectionPointSide.East||I===y.ConnectionPointSide.West)},C.prototype.registerIgnorableShape=function(I){this.ignorableItemKeys[I.key]=!0},C.prototype.isConnectedByStart=function(I){return this.beginConnectionShape&&this.beginConnectionShape.key===I.key&&this.beginConnectionSide!==y.ConnectionPointSide.Undefined},C.prototype.isConnectedByEnd=function(I){return this.endConnectionShape&&this.endConnectionShape.key===I.key&&this.endConnectionSide!==y.ConnectionPointSide.Undefined},C.prototype.getConnectionSide=function(I,L,N){return I?I.getConnectionPointSideByIndex(L,N):y.ConnectionPointSide.Undefined},C.prototype.shapeContainsOtherConnection=function(I,L,N){if(!I)return!1;var G=I.rectangle;return G.containsPoint(N)&&(!L||!L.rectangle.equals(G))},C.prototype.createBeginConnectionSegment=function(I,L){if(this.beginConnectionSide===y.ConnectionPointSide.Undefined)return this.createBeginConnectionSegmentCore(I);if(!L||!this.routingModel.shouldReverseConnections){var N=this.createBeginConnectionSegmentCore(I);if(N instanceof f.Point||!this.routingModel.shouldResizeConnections)return N;for(var G=N.startPoint,k=N.endPoint,U=I;this.hasIntersectedItemsByPoint(k,G,this.beginConnectionShape);)k=(N=this.createBeginConnectionSegmentCore(U/=2)).endPoint;return N}if(!this.endConnectionShape)return this.createBeginConnectionSegmentCore(-I);if(this.isPathNormal(this.endConnectionSide))return this.createBeginConnectionSegmentCore(-I);var B=this.createBeginConnectionSegmentCore(-2*I);return this.isEndConnectionRectanleLineIntersected(B,!1,!0)?this.createBeginConnectionSegmentCore(I):this.createBeginConnectionSegmentCore(-I)},C.prototype.hasIntersectedItemsByPoint=function(I,L,N){var G=this.getIntersectedItems(I,function(k,U){return U.rectangle.containsPoint(k)&&!U.rectangle.containsPoint(L)&&U.key!==N.key});return void 0!==G&&G.length>0},C.prototype.createEndConnectionSegment=function(I,L){if(this.endConnectionSide===y.ConnectionPointSide.Undefined)return this.createEndConnectionSegmentCore(I);if(!L||!this.routingModel.shouldReverseConnections){var N=this.createEndConnectionSegmentCore(I);if(N instanceof f.Point||!this.routingModel.shouldResizeConnections)return N;for(var G=N.endPoint,k=N.startPoint,U=I;this.hasIntersectedItemsByPoint(k,G,this.endConnectionShape);)k=(N=this.createEndConnectionSegmentCore(U/=2)).startPoint;return N}if(!this.beginConnectionShape)return this.createEndConnectionSegmentCore(-I);if(this.isPathNormal(this.beginConnectionSide))return this.createEndConnectionSegmentCore(-I);var B=this.createEndConnectionSegmentCore(-2*I);return this.isBeginConnectionRectanleLineIntersected(B,!0,!1)?this.createEndConnectionSegmentCore(I):this.createEndConnectionSegmentCore(-I)},C.prototype.createBeginConnectionSegmentCore=function(I){return d.RightAngleConnectorRoutingMathOperations.createBeginConnectionSegment(this.beginConnectionSide,this.beginPoint,I,function(L,N){return new f.Point(L,N)})},C.prototype.createEndConnectionSegmentCore=function(I){return d.RightAngleConnectorRoutingMathOperations.createEndConnectionSegment(this.endConnectionSide,this.endPoint,I,function(L,N){return new f.Point(L,N)})},C.prototype.isBeginConnectionRectanleLineIntersected=function(I,L,N){return d.RightAngleConnectorRoutingMathOperations.isConnectionRectanleLineIntersected(this.beginConnectionShape.rectangle,I,this.beginConnectionSide,L,N,function(G,k){return new f.Point(G,k)})},C.prototype.isEndConnectionRectanleLineIntersected=function(I,L,N){return d.RightAngleConnectorRoutingMathOperations.isConnectionRectanleLineIntersected(this.endConnectionShape.rectangle,I,this.endConnectionSide,L,N,function(G,k){return new f.Point(G,k)})},C.prototype.isIgnorableItem=function(I){return void 0!==this.ignorableItemKeys[I.key]},C.prototype.createExtendedShapesBounds=function(){var I=this;return this.routingModel.getItems(this.beginConnectionShape,this.endConnectionShape).map(function(L){return L.rectangle.clone().inflate(I.routingModel.shapeMargins)})},C.prototype.createGrid=function(){return s.RoutingGrid.create(this.createGridPoints(),this.createExtendedShapesBounds(),function(I,L){return new f.Point(I,L)})},C}();P.RightAngleConnectorRoutingContext=D},5074:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RightAngleConnectorRoutingMathOperations=void 0;var f=b(1335),S=b(8679),T=b(9927),y=b(8675),d=b(3742),c=function(){function s(){}return s.createUnionSegments=function(a,u){for(var h=[],g=a[0].startPoint,_=a[0].endPoint,x=1;x<a.length;x++){var w=a[x];u(_,w.startPoint)&&(h.push(new f.Segment(g.clone(),_.clone())),g=w.startPoint),_=w.endPoint}return h.push(new f.Segment(g,_)),h},s.unionPoints=function(a){for(var u=0;u<a.length-2;)y.GeometryUtils.isCorner(a[u],a[u+1],a[u+2])?u++:(a.splice(u+1,1),u=Math.max(0,u-1))},s.getTurnDirection=function(a){return S.MathUtils.numberCloseTo(a,0)?T.RightAngleTurnDirection.Straight:S.MathUtils.numberCloseTo(a,Math.PI)?T.RightAngleTurnDirection.Backwards:a<Math.PI?T.RightAngleTurnDirection.Left:T.RightAngleTurnDirection.Right},s.isSegmentNormal=function(a,u){return u?S.MathUtils.numberCloseTo(a.startPoint.y,a.endPoint.y):S.MathUtils.numberCloseTo(a.startPoint.x,a.endPoint.x)},s.isConnectionRectanleLineIntersected=function(a,u,h,g,_,x){switch(h){case d.ConnectionPointSide.North:return y.GeometryUtils.isLineIntersected(x(a.x,a.y),x(a.right,a.y),u,g,_);case d.ConnectionPointSide.South:return y.GeometryUtils.isLineIntersected(x(a.right,a.bottom),x(a.x,a.bottom),u,g,_);case d.ConnectionPointSide.West:return y.GeometryUtils.isLineIntersected(x(a.x,a.y),x(a.x,a.bottom),u,g,_);case d.ConnectionPointSide.East:return y.GeometryUtils.isLineIntersected(x(a.right,a.y),x(a.right,a.bottom),u,g,_);default:return!1}},s.createBeginConnectionSegment=function(a,u,h,g){switch(a){case d.ConnectionPointSide.North:return new f.Segment(u,g(u.x,u.y-h));case d.ConnectionPointSide.South:return new f.Segment(u,g(u.x,u.y+h));case d.ConnectionPointSide.West:return new f.Segment(u,g(u.x-h,u.y));case d.ConnectionPointSide.East:return new f.Segment(u,g(u.x+h,u.y));default:return u}},s.createEndConnectionSegment=function(a,u,h,g){switch(a){case d.ConnectionPointSide.North:return new f.Segment(g(u.x,u.y-h),u);case d.ConnectionPointSide.South:return new f.Segment(g(u.x,u.y+h),u);case d.ConnectionPointSide.West:return new f.Segment(g(u.x-h,u.y),u);case d.ConnectionPointSide.East:return new f.Segment(g(u.x+h,u.y),u);default:return u}},s}();P.RightAngleConnectorRoutingMathOperations=c},3597:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RightAngleConnectorRoutingStrategy=void 0;var f=b(1335),S=b(4717),T=b(1794),y=b(4867),d=function(){function c(s){this.model=s}return c.prototype.createRenderPoints=function(s,a,u,h,g,_,x){if(a.length>1){var w=new T.RightAngleConnectorRoutingContext(this.model,s,a,u,h,g,_);if(w.initialize(x),w.shouldCreateRenderPoints)return this.createRenderPointsCore(w)}},c.prototype.clone=function(){return new c(this.model)},c.prototype.onAddPoint=function(s,a,u,h){var g=h.map(function(I){return new S.ConnectorRenderPoint(I.x,I.y,I.pointIndex)}),_=y.ModelUtils.findFirstPointIndex(g,function(I){return I.equals(u)});if(0===_)return g.splice(1,0,new S.ConnectorRenderPoint(u.x,u.y,a)),y.ModelUtils.validateRenderPointIndexes(s,g,2);var x=g.length-1;if(_===x)return g.splice(x,0,new S.ConnectorRenderPoint(u.x,u.y,a)),g[x+1].pointIndex=a+1,g;if(_>0){var w=g[_];return g[_]=new S.ConnectorRenderPoint(w.x,w.y,a,w.skipped),y.ModelUtils.validateRenderPointIndexes(s,g,_+1)}var D=new f.Segment(g[0],g[1]),C=new S.ConnectorRenderPoint(u.x,u.y);return D.containsPoint(C)?(g.splice(1,0,new S.ConnectorRenderPoint(C.x,C.y,-1)),g.splice(2,0,new S.ConnectorRenderPoint(C.x,C.y,a)),y.ModelUtils.validateRenderPointIndexes(s,g,3)):new f.Segment(g[x-1],g[x]).containsPoint(C)?(g.splice(x,0,new S.ConnectorRenderPoint(C.x,C.y,a)),g.splice(x+1,0,new S.ConnectorRenderPoint(C.x,C.y,-1)),g[x+2].pointIndex=a+1,g):h},c.prototype.onDeletePoint=function(s,a,u){var h=u.map(function(G){return new S.ConnectorRenderPoint(G.x,G.y,G.pointIndex)}),g=this.getRenderPointIndexByPointIndex(h,a);if(1===g){var _=h[0],x=h[1];return _.equals(x)?(h.splice(1,1),y.ModelUtils.validateRenderPointIndexes(s,h,1)):(h[1]=new S.ConnectorRenderPoint(x.x,x.y,-1,x.skipped),y.ModelUtils.validateRenderPointIndexes(s,h,2))}if(2===g){var w=h[2];return(_=h[1]).equals(w)?(h.splice(1,2),y.ModelUtils.validateRenderPointIndexes(s,h,1)):(h[2]=new S.ConnectorRenderPoint(w.x,w.y,-1,w.skipped),y.ModelUtils.validateRenderPointIndexes(s,h,3))}var D=h.length-1;if(g===D-1){var C=h[D-1],I=h[D];return C.equals(I)?(h.splice(D-1,1),y.ModelUtils.validateRenderPointIndexes(s,h,D-1)):(h[D-1]=new S.ConnectorRenderPoint(C.x,C.y,-1,C.skipped),y.ModelUtils.validateRenderPointIndexes(s,h,D))}if(g===D-2){var L=h[D-2];return L.equals(I=h[D-1])?(h.splice(D-2,2),y.ModelUtils.validateRenderPointIndexes(s,h,D-2)):(h[D-2]=new S.ConnectorRenderPoint(L.x,L.y,-1,L.skipped),y.ModelUtils.validateRenderPointIndexes(s,h,D-1))}var N=h[g];return h[g]=new S.ConnectorRenderPoint(N.x,N.y,-1,N.skipped),y.ModelUtils.validateRenderPointIndexes(s,h,g+1)},c.prototype.onMovePoint=function(s,a,u,h){if(0===a||a===s.length-1)return h;var g=h.map(function(_){return new S.ConnectorRenderPoint(_.x,_.y,_.pointIndex)});return this.onMovePointCore(g,a,u),y.ModelUtils.skipUnnecessaryRightAngleRenderPoints(g),g},c.prototype.onMovePoints=function(s,a,u,h,g){if(0===a||u===s.length-1)return g;for(var _=g.map(function(w){return new S.ConnectorRenderPoint(w.x,w.y,w.pointIndex)}),x=a;x<=u;x++)this.onMovePointCore(_,x,h[x-a]);return y.ModelUtils.skipUnnecessaryRightAngleRenderPoints(_),_},c.prototype.onMovePointCore=function(s,a,u){var h=this.getRenderPointIndexByPointIndex(s,a);h>=0&&(s[h]=new S.ConnectorRenderPoint(u.x,u.y,a,s[h].skipped))},c.prototype.createRenderPointsCore=function(s){var a,u=[],h=-1,g=-1;s.setup();var _=s.renderSegments,x=_[_.length-1].endPoint,w=s.points;do{this.registerCustomPoints(u,w,g+2,_[h+1].startPointIndex-1),g=(a=_[++h]).startPointIndex,this.registerRenderPoints(u,s.createRoutedPoints(a.startInfo,a.endInfo,a.createProhibitedSegments()),g)}while(!a.endPoint.equals(x));return s.validateRenderPoints(u),u},c.prototype.getRenderPointIndexByPointIndex=function(s,a){return y.ModelUtils.findFirstPointIndex(s,function(u){return u.pointIndex===a})},c.prototype.registerRenderPoints=function(s,a,u){var h=this;a.forEach(function(g,_){h.registerPoint(s,g,0===_?u:_===a.length-1?u+1:-1)})},c.prototype.registerCustomPoints=function(s,a,u,h){for(var g=u;g<=h;g++)this.registerPoint(s,a[g],g)},c.prototype.registerPoint=function(s,a,u){s.push(new S.ConnectorRenderPoint(a.x,a.y,u))},c}();P.RightAngleConnectorRoutingStrategy=d},3742:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramItem=P.DEFAULT_ZINDEX=P.ConnectionPointSide=void 0;var f,s,S=b(8011),T=b(5596),y=b(8675),d=b(1552);(s=f=P.ConnectionPointSide||(P.ConnectionPointSide={}))[s.Undefined=-1]="Undefined",s[s.North=0]="North",s[s.East=1]="East",s[s.South=2]="South",s[s.West=3]="West",P.DEFAULT_ZINDEX=0;var c=function(){function s(){this.key=void 0,this.dataKey=void 0,this.customData=void 0,this.attachedConnectors=[],this.zIndex=P.DEFAULT_ZINDEX,this.locked=!1,this.container=void 0,this.style=new d.Style,this.styleText=new d.TextStyle}return s.prototype.assign=function(a){a.key=this.key,a.dataKey=this.dataKey,a.customData=y.ObjectUtils.cloneObject(this.customData),a.locked=this.locked,a.attachedConnectors=this.attachedConnectors.slice(),a.style=this.style.clone(),a.styleText=this.styleText.clone(),a.zIndex=this.zIndex,a.container=this.container},s.prototype.getConnectionPointPosition=function(a,u){return this.getConnectionPoint(a,u).toPoint()},s.prototype.getConnectionPoint=function(a,u){a<0&&u&&(a=this.getNearestConnectionPoint(u));var h=this.getConnectionPoints();return h[a]||h[0]},s.prototype.getNearestConnectionPoint=function(a){var u,h=Number.MAX_VALUE;return this.getConnectionPoints().forEach(function(g,_){var x=T.Metrics.euclideanDistance(g,a);x<h&&(h=x,u=_)}),u},s.prototype.getConnectionPointIndex=function(a){var u=this.getConnectionPoints();return u.reduce(function(h,g,_){return a===f.North&&g.y<u[h].y||a===f.South&&g.y>u[h].y||a===f.West&&g.x<u[h].x||a===f.East&&g.x>u[h].x?_:h},0)},s.prototype.getConnectionPointSideByIndex=function(a,u){var h=this.getConnectionPoint(a,u);return this.getConnectionPointSide(h,u)},s.prototype.getConnectionPointIndexForSide=function(a){return a},Object.defineProperty(s.prototype,"enableText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"allowEditText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasTemplate",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"enableChildren",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLocked",{get:function(){return this.locked||this.container&&this.container.isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"allowResizeHorizontally",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"allowResizeVertically",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"strokeWidth",{get:function(){return this.style.strokeWidth},enumerable:!1,configurable:!0}),s.prototype.intersectedByRect=function(a){return S.Rectangle.areIntersected(this.rectangle,a)},s}();P.DiagramItem=c},4742:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DraggingConnector=P.SelectionDragHelper=void 0;var f=b(9716),S=b(58),T=b(1510),y=b(4867),d=b(4717),c=b(6879),s=function(){function h(g,_,x,w,D){var C=this;this.history=g,this.model=_,this.permissionsProvider=x,this.startPoint=w,this.draggingShapes=[],this.draggingConnectors=[],this.selectedItems={},this.draggingConnectorsIndexByKey={},D.forEach(function(I){return C.selectedItems[I.key]=I})}return h.prototype.initDraggingShapes=function(g,_){var x=this;this.draggingShapes=g.map(function(w){return new u(w)}),_||this.draggingShapes.forEach(function(w){return x.permissionsProvider.addInteractingItem(w.shape,c.DiagramModelOperation.MoveShape)})},h.prototype.initDraggingConnectors=function(g,_){var x=this;this.draggingConnectors=[],this.draggingConnectorsIndexByKey={},g.forEach(function(w){return x.registerConnector(w)}),_||this.draggingShapes.forEach(function(w){var D=w.shape.attachedConnectors;D&&D.forEach(function(C){x.containsDraggingConnectorByKey(C.key)||x.registerConnector(C)})}),this.modelConnectorsWithoutBeginItemInfo=this.createModelConnectorsWithoutBeginItemInfo(),this.modelConnectorsWithoutEndItemInfo=this.createModelConnectorsWithoutEndItemInfo()},h.prototype.move=function(g,_,x,w){var D=this;if(this.draggingShapes.length){var C=this.draggingShapes.map(function(N){return N.shape});this.draggingShapes.forEach(function(N){for(var G=N.shape;G.container;){if(-1!==C.indexOf(G.container))return!1;G=G.container}D.moveShape(N,_,x,w)});var I=this.draggingShapes[0],L=f.Vector.fromPoints(I.startPosition.clone(),I.shape.position.clone());(L.x||L.y)&&this.draggingConnectors.forEach(function(N){return D.moveConnectorCore(N.connector,N.startPoints,N.startRenderContext,L,g)})}else this.draggingConnectors.forEach(function(N){return D.moveConnector(N,g,_)})},h.prototype.containsDraggingConnectorByKey=function(g){return void 0!==this.draggingConnectorsIndexByKey[g]},h.prototype.onTryUpdateModelSize=function(g,_){this.modelConnectorsWithoutBeginItemInfo.forEach(function(x){x.point.x+=g,x.point.y+=_}),this.modelConnectorsWithoutEndItemInfo.forEach(function(x){x.point.x+=g,x.point.y+=_})},h.prototype.moveConnector=function(g,_,x){var w=g.startPoints,D=f.Vector.fromPoints(w[0].clone(),x(w[0]).clone());(D.x||D.y)&&this.moveConnectorCore(g.connector,w,g.startRenderContext,D,_)},h.prototype.moveConnectorCore=function(g,_,x,w,D){D||y.ModelUtils.canMoveConnector(this.selectedItems,g)?this.offsetConnector(g,_,x,w):this.changeConnector(g)},h.prototype.moveShape=function(g,_,x,w){var D=this,C=g.shape,I=_(g.startPosition);y.ModelUtils.setShapePosition(this.history,this.model,C,I),y.ModelUtils.updateMovingShapeConnections(this.history,C,this.modelConnectorsWithoutBeginItemInfo,this.modelConnectorsWithoutEndItemInfo,x,w,function(L){return D.permissionsProvider.addInteractingItem(L)}),this.draggingConnectors.filter(function(L){return!!D.selectedItems[L.connector.key]}).length||y.ModelUtils.updateShapeAttachedConnectors(this.history,this.model,C)},h.prototype.offsetConnector=function(g,_,x,w){var D=this,C=_.map(function(I){return D.offsetPoint(I,w)});C[0].equals(g.points[0])||this.history.addAndRedo(new S.ChangeConnectorPointsHistoryItem(g.key,C,this.offsetRenderContext(x,w)))},h.prototype.offsetRenderContext=function(g,_){var x=this;if(void 0!==g)return new T.ConnectorRenderPointsContext(g.renderPoints.map(function(w){var D=x.offsetPoint(w,_);return new d.ConnectorRenderPoint(D.x,D.y,w.pointIndex,w.skipped)}),!0,g.actualRoutingMode)},h.prototype.offsetPoint=function(g,_){var x=f.Vector.fromPoints(g,this.startPoint);return this.startPoint.clone().offset(_.x-x.x,_.y-x.y)},h.prototype.changeConnector=function(g){y.ModelUtils.tryRemoveConnectorIntermediatePoints(this.history,g),y.ModelUtils.updateConnectorAttachedPoints(this.history,this.model,g)},h.prototype.registerConnector=function(g){this.draggingConnectorsIndexByKey[g.key]=this.draggingConnectors.push(new a(g))-1},h.prototype.createModelConnectorsWithoutBeginItemInfo=function(){var g=this;return this.model.findConnectorsCore(function(_){return!_.beginItem&&!g.containsDraggingConnectorByKey(_.key)}).map(function(_){return{connector:_,point:_.points[0].clone()}})},h.prototype.createModelConnectorsWithoutEndItemInfo=function(){var g=this;return this.model.findConnectorsCore(function(_){return!_.endItem&&!g.containsDraggingConnectorByKey(_.key)}).map(function(_){return{connector:_,point:_.points[_.points.length-1].clone()}})},h}();P.SelectionDragHelper=s;var a=function(h){this.connector=h,this.startPoints=h.points.map(function(g){return g.clone()}),this.startRenderContext=h.tryCreateRenderPointsContext()};P.DraggingConnector=a;var u=function(h){this.shape=h,this.startPosition=h.position.clone()}},6613:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramModel=void 0;var f=b(5503),S=b(7959),T=b(8675),y=b(8011),d=b(6353),c=b(8900),s=b(7176),a=b(13),u=b(5383),h=b(4867),g=function(){function _(x){void 0===x&&(x=new d.Size(8391,11906)),this.items=[],this.itemIndexByKey={},this.keyCounter=0,this.pageSize=new d.Size(8391,11906),this.pageLandscape=!1,this.pageColor=_.defaultPageColor,this.units=u.DiagramUnit.In,this.snapStartPoint=new c.Point(0,0),this.pageSize=x,this.size=this.pageSize.clone(),this.rectangle=y.Rectangle.fromGeometry(new c.Point(0,0),new d.Size(0,0)),this.initializeKeyCounter()}return Object.defineProperty(_.prototype,"pageWidth",{get:function(){return this.pageLandscape?this.pageSize.height:this.pageSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"pageHeight",{get:function(){return this.pageLandscape?this.pageSize.width:this.pageSize.height},enumerable:!1,configurable:!0}),_.prototype.getRectangle=function(x){return x&&(this.rectangle=h.ModelUtils.createRectangle(this.items)),this.rectangle},_.prototype.pushItem=function(x){var w=this.items.push(x);this.itemIndexByKey[x.key]=w-1,x instanceof f.Shape&&!x.image.isEmpty&&this.cacheShapeImage(x)},_.prototype.removeItem=function(x){var w=this.getItemIndex(x);delete this.itemIndexByKey[x.key],this.items.splice(w,1),this.updateIndicesHash(w)},_.prototype.updateIndicesHash=function(x){for(var w=x;w<this.items.length;w++)this.itemIndexByKey[this.items[w].key]=w},_.prototype.getItemIndex=function(x){return this.itemIndexByKey[x.key]},_.prototype.findShape=function(x){var w=this.findItem(x);return w instanceof f.Shape?w:void 0},_.prototype.findShapesCore=function(x){var w=[];return this.items.forEach(function(D){D instanceof f.Shape&&x(D)&&w.push(D)}),w},_.prototype.findShapeCore=function(x){for(var w=0;w<this.items.length;w++){var D=this.items[w];if(D instanceof f.Shape&&x(D))return D}},_.prototype.findShapeAtPosition=function(x){return this.findShapeCore(function(w){return w.position.equals(x)})},_.prototype.findShapeByDataKey=function(x){return this.findShapeCore(function(w){return w.dataKey===x})},_.prototype.findShapesByImageUrl=function(x){return this.findShapesCore(function(w){return w.image.url===x})},_.prototype.findShapesByDescription=function(x){return this.findShapesCore(function(w){return w.description.key===x.key})},_.prototype.cacheShapeImage=function(x){var w=s.ImageCache.instance.createUnloadedInfoByShapeImageInfo(x.image);w.isLoaded&&x.image.loadBase64Content(w.base64)},_.prototype.loadAllImages=function(x){s.ImageCache.instance.loadAllImages(x)},_.prototype.findContainer=function(x){var w=this.findShape(x);return w&&w.enableChildren?w:void 0},_.prototype.findNearestContainer=function(x){var w=this.findShape(x);return w?w.enableChildren?w:w.container:void 0},_.prototype.getChildren=function(x){var w=this;return x.children.map(function(D){return w.findItem(D.key)}).filter(function(D){return D})},_.prototype.findChild=function(x,w,D){var C,I=this;return void 0===D&&(D=!0),x.children.forEach(function(L){C||(L.key!==w?D&&L instanceof f.Shape&&(C=I.findChild(L,w,D)):C=L)}),C},_.prototype.findItemContainerCore=function(x,w){for(var D=x.container;D&&w&&!w(D);)D=D.container;return D},_.prototype.findItemContainer=function(x){return this.findItemContainerCore(x)},_.prototype.findItemCollapsedContainer=function(x){return this.findItemContainerCore(x,function(w){return!w.expanded})},_.prototype.findItemTopCollapsedContainer=function(x){for(var w,D=x.container;D;)D.expanded||(w=D),D=D.container;return w},_.prototype.isContainerItem=function(x,w){return void 0!==this.findItemContainerCore(w,function(D){return D.key===x.key})},_.prototype.findConnector=function(x){var w=this.findItem(x);return w instanceof S.Connector?w:void 0},_.prototype.findConnectorCore=function(x){for(var w=0;w<this.items.length;w++){var D=this.items[w];if(D instanceof S.Connector&&x(D))return D}},_.prototype.findConnectorAtPoints=function(x){return this.findConnectorCore(function(w){return T.GeometryUtils.arePointsEqual(w.points,x)})},_.prototype.findConnectorByDataKey=function(x){return this.findConnectorCore(function(w){return w.dataKey===x})},_.prototype.findConnectorByBeginEndDataKeys=function(x,w){return this.findConnectorCore(function(D){return D.beginItem&&D.beginItem.dataKey===x&&D.endItem&&D.endItem.dataKey===w})},_.prototype.findConnectorsCore=function(x){var w=[];return this.items.forEach(function(D){D instanceof S.Connector&&x(D)&&w.push(D)}),w},_.prototype.findConnectorsWithoutBeginItem=function(){return this.findConnectorsCore(function(x){return!x.beginItem})},_.prototype.findConnectorsWithoutEndItem=function(){return this.findConnectorsCore(function(x){return!x.endItem})},_.prototype.findItem=function(x){return this.items[this.itemIndexByKey[x]]},_.prototype.findItemByDataKey=function(x){return this.findItemCore(function(w){return w.dataKey===x})},_.prototype.findItemCore=function(x){for(var w=0;w<this.items.length;w++)if(x(this.items[w]))return this.items[w]},_.isIntersectedItems=function(x,w){var D=!1;return x instanceof f.Shape?D=w.intersectedByRect(x.rectangle):x instanceof S.Connector&&x.getSegments().forEach(function(C){w instanceof f.Shape?D=D||C.isIntersectedByRect(w.rectangle):w instanceof S.Connector&&w.getSegments().forEach(function(I){D=D||C.isIntersected(I)})}),D},_.prototype.getIntersectItems=function(x){var w=[];return this.items.forEach(function(D){D.container===x.container&&(x===D||D instanceof S.Connector&&-1!==x.attachedConnectors.indexOf(D)||!_.isIntersectedItems(D,x)||w.push(D))}),w},_.prototype.getIntersectItemsMinZIndex=function(x){return this.getIntersectItems(x).map(function(w){return w.zIndex}).reduce(function(w,D){return Math.min(w,D)},Number.MAX_VALUE)},_.prototype.getIntersectItemsMaxZIndex=function(x){return this.getIntersectItems(x).map(function(w){return w.zIndex}).reduce(function(w,D){return Math.max(w,D)},-Number.MAX_VALUE)},_.prototype.iterateItems=function(x){this.items.forEach(x)},_.prototype.getNextKey=function(){return(this.keyCounter++).toString()},_.prototype.initializeKeyCounter=function(){this.keyCounter=this.items.reduce(function(x,w){var D=parseInt(w.key);return Math.max(x,isNaN(D)?0:D+1)},this.items.length)},_.defaultPageColor=a.ColorUtils.LIGHT_COLOR,_}();P.DiagramModel=g},2004:(o,P)=>{var f;Object.defineProperty(P,"__esModule",{value:!0}),P.ItemChange=P.ItemChangeType=void 0,(f=P.ItemChangeType||(P.ItemChangeType={}))[f.Create=0]="Create",f[f.UpdateProperties=1]="UpdateProperties",f[f.UpdateStructure=2]="UpdateStructure",f[f.Update=3]="Update",f[f.Remove=4]="Remove",f[f.UpdateClassName=5]="UpdateClassName";var b=function(){function f(S,T,y){void 0===y&&(y=!0),this.item=S,this.type=T,this.isValid=y}return Object.defineProperty(f.prototype,"key",{get:function(){return this.item.key},enumerable:!1,configurable:!0}),f}();P.ItemChange=b},1118:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ModelManipulator=void 0;var f=b(4125),S=b(6353),T=b(9463),y=b(7176),d=b(590),c=b(6879),s=b(8675),a=b(7959),u=b(2004),h=b(4867),g=function(){function _(x,w,D,C){this.onModelChanged=new s.EventDispatcher,this.onModelSizeChanged=new s.EventDispatcher,this.initializeCore(x,w),this.permissionsProvider=D,this.descriptionManager=C,this.imageLoader=new d.ImageLoader(this.updateShapeImage.bind(this))}return _.prototype.initialize=function(x,w){this.initializeCore(x,w),this.model.loadAllImages(this.imageLoader),this.updateModelSize()},_.prototype.initializeCore=function(x,w){var D=this;this.model=x,this.routingModel=w,this.routingModel&&(this.routingModel.initialize(x),x.iterateItems(function(C){if(C instanceof a.Connector){var I=D.routingModel.createStrategy(C.properties.lineOption);I?C.changeRoutingStrategy(I):C.invalidateRenderPoints()}}))},_.prototype.commitPageChanges=function(){this.raisePageSizeChanged(this.model.pageSize.clone(),this.model.pageLandscape),this.raiseModelSizeChanged(this.model.size.clone()),this.raisePageColorChanged(this.model.pageColor),this.raiseModelRectangleChanged(h.ModelUtils.createRectangle(this.model.items))},_.prototype.commitItemsCreateChanges=function(){T.Diagnostics.timer("new model: model changes"),this.commitItemsChangesCore(u.ItemChangeType.Create,this.model.items),T.Diagnostics.endTimer()},_.prototype.commitItemUpdateChanges=function(x){this.commitItemsChangesCore(u.ItemChangeType.UpdateStructure,[x])},_.prototype.commitItemsChangesCore=function(x,w){var D=[];w.forEach(function(C){D.push(new u.ItemChange(C,x))}),D.length&&this.raiseModelChanged(D)},_.prototype.insertToContainer=function(x,w){if(x.container&&w&&x.container.key!==w.key)throw Error("To insert an item to a container it's necessary to remove it from the current container.");w&&(-1===w.children.indexOf(x)&&w.children.push(x),x.container=w,this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Update)]))},_.prototype.removeFromContainer=function(x){if(x.container){var w=x.container.children.indexOf(x);x.container.children.splice(w,1),x.container=void 0,this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Update)])}},_.prototype.changeStyle=function(x,w,D){this.changeStyleCore(x,x.style,w,D)},_.prototype.changeStyleText=function(x,w,D){this.changeStyleCore(x,x.styleText,w,D)},_.prototype.changeStyleCore=function(x,w,D,C){void 0!==C?w[D]=C:delete w[D],this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties)])},_.prototype.changeZIndex=function(x,w){x.zIndex=w,this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Update)])},_.prototype.changeLocked=function(x,w){x.locked=w,this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateClassName)])},_.prototype.changeCustomData=function(x,w){x.customData=s.ObjectUtils.cloneObject(w),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateStructure)])},_.prototype.addShape=function(x,w){if(x.attachedConnectors.length)throw Error("A creating shape should not contain existing connectors.");return x.key=void 0!==w?w:this.model.getNextKey(),this.insertShape(x)},_.prototype.insertShape=function(x){this.model.pushItem(x);var w=this.permissionsProvider.canAddItems([x]);return this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Create,w)]),this.model.loadAllImages(this.imageLoader),x},_.prototype.resizeShape=function(x,w,D){x.position=w,x.size=D;var C=this.permissionsProvider.isStoredPermissionsGranted(),I=this.getInteractingItem(x,c.DiagramModelOperation.ResizeShape);if(I){var L=I.size.clone(),N=x.size.clone();N.equals(L)||(C=this.permissionsProvider.canResizeShapes([{shape:x,size:N,oldSize:L}]))}var G=this.getInteractingItem(x,c.DiagramModelOperation.MoveShape);if(G){var k=G.position.clone(),U=x.position.clone();U.equals(k)||(C=this.permissionsProvider.canMoveShapes([{shape:x,position:U,oldPosition:k}]))}this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,C)])},_.prototype.moveShape=function(x,w){x.position=w;var D=this.permissionsProvider.isStoredPermissionsGranted();this.getInteractingItem(x,c.DiagramModelOperation.AddShape)&&(D=this.permissionsProvider.canAddItems([x]));var C=this.getInteractingItem(x,c.DiagramModelOperation.MoveShape);if(C){var I=C.position.clone(),L=x.position.clone();L.equals(I)||(D=this.permissionsProvider.canMoveShapes([{shape:x,position:L,oldPosition:I}]))}this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,D)])},_.prototype.changeShapeParameters=function(x,w){x.parameters.forEach(function(D){var C=w.get(D.key);C&&(D.value=C.value)}),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties)])},_.prototype.changeShapeText=function(x,w){x.text=w,this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateStructure)])},_.prototype.changeShapeImage=function(x,w){x.image=w;var D=y.ImageCache.instance.createUnloadedInfoByShapeImageInfo(w);this.imageLoader.load(D),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateStructure)])},_.prototype.changeShapeExpanded=function(x,w){x.expanded=w,x.toggleExpandedSize(),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateStructure)])},_.prototype.deleteShape=function(x,w){if(x.attachedConnectors.length)throw Error("A removing shape should not contain existing connectors.");this.removeShape(x,w)},_.prototype.removeShape=function(x,w){this.model.removeItem(x),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Remove,w)])},_.prototype.updateShapeImage=function(x){if(x.imageUrl){var w=this.model.findShapesByImageUrl(x.imageUrl);w.forEach(function(D){x.base64?D.image.loadBase64Content(x.base64):D.image.setUnableToLoadFlag()}),this.commitItemsChangesCore(u.ItemChangeType.UpdateStructure,w)}},_.prototype.updateShapeDescription=function(x){var w=this.model.findShapesByDescription(x);this.commitItemsChangesCore(u.ItemChangeType.UpdateProperties,w)},_.prototype.updateShapeType=function(x,w,D){var C=this.descriptionManager.get(w);x.description=C,x.parameters=D,C.createParameters(D),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateStructure)])},_.prototype.addConnector=function(x,w){if(x.beginItem||x.endItem)throw Error("Creating connector should not contain begin/end items");return x.key=void 0!==w?w:this.model.getNextKey(),this.insertConnector(x)},_.prototype.insertConnector=function(x){this.model.pushItem(x);var w=this.routingModel.createStrategy(x.properties.lineOption);w?x.changeRoutingStrategy(w):x.clearRoutingStrategy();var D=this.permissionsProvider.canAddItems([x]);return this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Create,D)]),x},_.prototype.deleteConnector=function(x){if(x.beginItem||x.endItem)throw Error("Creating connector should not contain begin/end items");this.removeConnector(x)},_.prototype.removeConnector=function(x){this.model.removeItem(x);var w=this.permissionsProvider.canDeleteItems([x]);this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.Remove,w)])},_.prototype.addDeleteConnectorPoint=function(x,w){var D=this.getConnectorInteractingPoints(x);w(x),this.addDeleteConnectorPointCore(x,D)},_.prototype.moveConnectorPoint=function(x,w,D){D(x),this.moveConnectorPointCore(x,w)},_.prototype.changeConnectorPoints=function(x,w){var D=this;w(x),x.points.forEach(function(C,I){return D.moveConnectorPointCore(x,I)})},_.prototype.moveConnectorPointCore=function(x,w){var D=this.getInteractingItem(x),C=this.permissionsProvider.isStoredPermissionsGranted();if(D){var I=0<w&&w<x.points.length-1;if(I=(I=I||0===w&&!x.beginItem)||w===x.points.length-1&&!x.endItem){var L=D.points.map(function(G){return G.clone()}),N=x.points.map(function(G){return G.clone()});s.GeometryUtils.arePointsEqual(L,N)||(C=this.permissionsProvider.canChangeConnectorPoints(x,L,N))}}this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,C)])},_.prototype.getConnectorInteractingPoints=function(x){var w=this.getInteractingItem(x);return w?w.points.map(function(D){return D.clone()}):x.points.map(function(D){return D.clone()})},_.prototype.addDeleteConnectorPointCore=function(x,w){var D=this.permissionsProvider.isStoredPermissionsGranted(),C=x.points.map(function(I){return I.clone()});s.GeometryUtils.arePointsEqual(w,C)||(D=this.permissionsProvider.canChangeConnectorPoints(x,w,C)),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,D)])},_.prototype.addConnection=function(x,w,D,C){var I=x.getExtremeItem(C),L=x.getExtremeConnectionPointIndex(C);if(I!==w||L!==D){if(I)throw Error("Connector is already connected");w.attachedConnectors.push(x),C===a.ConnectorPosition.Begin?(x.beginItem=w,x.beginConnectionPointIndex=D):(x.endItem=w,x.endConnectionPointIndex=D),x.invalidateRenderPoints();var N=this.permissionsProvider.canChangeConnection(x,w,void 0,C,D);this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,N)])}},_.prototype.setConnectionPointIndex=function(x,w,D){if(!x.getExtremeItem(D))throw Error("Connection should be connected");D===a.ConnectorPosition.Begin?x.beginConnectionPointIndex=w:x.endConnectionPointIndex=w,x.invalidateRenderPoints();var C=x.getExtremeItem(D),I=this.permissionsProvider.canChangeConnection(x,C,C,D,w);this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,I)])},_.prototype.deleteConnection=function(x,w){var D=x.getExtremeItem(w);if(D){D.attachedConnectors.splice(D.attachedConnectors.indexOf(x),1),w===a.ConnectorPosition.Begin?(x.beginItem=null,x.beginConnectionPointIndex=-1):(x.endItem=null,x.endConnectionPointIndex=-1),x.invalidateRenderPoints();var C=this.permissionsProvider.canChangeConnection(x,void 0,D,w,-1);this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties,C)])}},_.prototype.changeConnectorProperty=function(x,w,D){if(x.properties[w]=D,"lineOption"===w){var C=this.routingModel?this.routingModel.createStrategy(x.properties.lineOption):void 0;C?x.changeRoutingStrategy(C):x.clearRoutingStrategy()}else x.invalidateRenderPoints();this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties)])},_.prototype.changeConnectorText=function(x,w,D){x.setText(w,D),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateStructure)])},_.prototype.changeConnectorTextPosition=function(x,w,D){var C=x.getText(w);x.setText(null,w),x.setText(C,D),this.raiseModelChanged([new u.ItemChange(x,u.ItemChangeType.UpdateProperties)])},_.prototype.changeModelSize=function(x,w){this.model.size.width=x.width,this.model.size.height=x.height,this.raiseModelSizeChanged(this.model.size.clone(),w),(w.left||w.top)&&(this.model.snapStartPoint=this.model.snapStartPoint.clone().offset(w.left,w.top),this.raiseSnapPointChange(this.model.snapStartPoint))},_.prototype.changePageSize=function(x){this.model.pageSize.equals(x)||(this.model.pageSize=x,this.model.size=new S.Size(this.model.pageWidth,this.model.pageHeight),this.raiseModelSizeChanged(this.model.size.clone()),this.raisePageSizeChanged(this.model.pageSize,this.model.pageLandscape))},_.prototype.changePageLandscape=function(x){this.model.pageLandscape!==x&&(this.model.pageLandscape=x,this.model.pageSize.width!==this.model.pageSize.height&&(this.model.size=new S.Size(this.model.pageWidth,this.model.pageHeight),this.raiseModelSizeChanged(this.model.size.clone()),this.raisePageSizeChanged(this.model.pageSize,this.model.pageLandscape)))},_.prototype.changePageColor=function(x){this.model.pageColor!==x&&(this.model.pageColor=x,this.raisePageColorChanged(x))},_.prototype.updateModelSize=function(){var x=this.getModelSizeUpdateOffset();if(!x.isEmpty()){var w=Math.max(this.model.size.width+x.left+x.right,this.model.pageWidth),D=Math.max(this.model.size.height+x.top+x.bottom,this.model.pageHeight);this.model.size=new S.Size(w,D)}},_.prototype.getModelSizeUpdateOffset=function(){var x=this.model.getRectangle(!1),w=this.model.getRectangle(!0);return w.equals(x)||this.raiseModelRectangleChanged(w),this.createModelRectangleOffset(w)},_.prototype.createModelRectangleOffset=function(x){var w=this.model.pageWidth,D=this.model.pageHeight,C=this.model.size;return new f.Offsets(-Math.floor(x.x/w)*w,-Math.floor((C.width-x.right)/w)*w,-Math.floor(x.y/D)*this.model.pageHeight,-Math.floor((C.height-x.bottom)/D)*D)},_.prototype.raiseModelChanged=function(x){this.onModelChanged.raise1(function(w){return w.notifyModelChanged(x)})},_.prototype.raisePageColorChanged=function(x){this.onModelChanged.raise1(function(w){return w.notifyPageColorChanged(x)})},_.prototype.raisePageSizeChanged=function(x,w){this.onModelChanged.raise1(function(D){return D.notifyPageSizeChanged(x,w)})},_.prototype.raiseModelSizeChanged=function(x,w){this.onModelSizeChanged.raise1(function(D){return D.notifyModelSizeChanged(x,w)})},_.prototype.raiseModelRectangleChanged=function(x){this.onModelSizeChanged.raise1(function(w){return w.notifyModelRectangleChanged(x)})},_.prototype.raiseSnapPointChange=function(x){this.onModelSizeChanged.raise1(function(w){return w.notifySnapPointPositionChanged(x)})},_.prototype.getInteractingItem=function(x,w){return this.permissionsProvider.getInteractingItem(x,w)},_}();P.ModelManipulator=g},4867:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ModelUtils=void 0;var f=b(9291),S=b(5596),T=b(8900),y=b(8011),d=b(6353),c=b(9716),s=b(8679),a=b(5383),u=b(3477),h=b(9603),g=b(4430),_=b(4145),x=b(58),w=b(329),D=b(8930),C=b(9143),I=b(1704),L=b(9310),N=b(8338),G=b(4160),k=b(9753),U=b(4629),B=b(4297),K=b(1729),J=b(4518),ie=b(8236),re=b(5144),q=b(9559),Y=b(7443),Z=b(4634),Q=b(926),te=b(213),pe=b(7819),z=b(8217),oe=b(8675),ae=b(7959),ee=b(4612),he=b(4717),de=b(1510),ue=b(5503),be=b(56),ve=function(){function le(){}return le.setShapePosition=function(Ce,ye,ge,fe,xe){if(void 0===xe&&(xe=!0),!ge.position.equals(fe)){var Te=fe.clone().offset(-ge.position.x,-ge.position.y);return Ce.addAndRedo(new G.MoveShapeHistoryItem(ge.key,fe)),xe&&ge.children.forEach(function(Ee){if(Ee instanceof ue.Shape){var Oe=Ee.position.clone().offset(Te.x,Te.y);le.setShapePosition(Ce,ye,Ee,Oe)}}),!0}return!1},le.setShapeSize=function(Ce,ye,ge,fe,xe){return!(ge.size.equals(xe)&&ge.position.equals(fe)||(Ce.addAndRedo(new U.ResizeShapeHistoryItem(ge.key,fe,xe)),0))},le.addConnectorPoint=function(Ce,ye,ge,fe){Ce.addAndRedo(new g.AddConnectorPointHistoryItem(ye,ge,fe))},le.deleteConnectorCustomPoints=function(Ce,ye){if(ye.points.length>2){var ge=ye.tryCreateRenderPointsContext();if(ye.properties.lineOption!==ee.ConnectorLineOption.Straight&&ge){var fe=ye.points[0].clone(),xe=ye.points[ye.points.length-1].clone();Ce.addAndRedo(new x.ChangeConnectorPointsHistoryItem(ye.key,[fe,xe],new de.ConnectorRenderPointsContext([new he.ConnectorRenderPoint(fe.x,fe.y,0),new he.ConnectorRenderPoint(xe.x,xe.y,1)],!1,ge.actualRoutingMode)))}else Ce.addAndRedo(new x.ReplaceConnectorPointsHistoryItem(ye.key,[ye.points[0].clone(),ye.points[ye.points.length-1].clone()]))}},le.deleteConnectorUnnecessaryPoints=function(Ce,ye){var ge=ye.getRenderPoints(!0).map(function(ze){return ze.clone()});if(ye.properties.lineOption===ee.ConnectorLineOption.Straight){var fe=le.createUnnecessaryRenderPoints(ge.filter(function(ze){return!ze.skipped}).map(function(ze){return ze.clone()}),ye.skippedRenderPoints,function(ze){return le.findFirstPointIndex(ge,function($e){return he.ConnectorRenderPoint.equal($e,ze)})});Object.keys(fe).length&&Ce.addAndRedo(new x.ReplaceConnectorPointsHistoryItem(ye.key,le.createNecessaryPoints(ye.points.map(function(ze){return ze.clone()}),fe)))}else{var xe=ye.tryCreateRenderPointsContext(!0),Te=ge.filter(function(ze){return!ze.skipped}).map(function(ze){return ze.clone()});if(fe=le.createUnnecessaryRightAngleRenderPoints(Te,ye.skippedRenderPoints,function(ze){return le.findFirstPointIndex(ge,function($e){return he.ConnectorRenderPoint.equal($e,ze)})}),Object.keys(fe).length){var Ee=le.createNecessaryPoints(ye.points.map(function(ze){return ze.clone()}),fe),Oe=new de.ConnectorRenderPointsContext(le.validateRenderPointIndexes(Ee,Te,0),xe.lockCreateRenderPoints,xe.actualRoutingMode);Ce.addAndRedo(new x.ChangeConnectorPointsHistoryItem(ye.key,Ee,Oe))}}},le.fixConnectorBeginEndConnectionIndex=function(Ce,ye){if(ye.beginItem&&-1===ye.beginConnectionPointIndex){var ge=ye.beginItem.getNearestConnectionPoint(ye.points[0]);Ce.addAndRedo(new u.SetConnectionPointIndexHistoryItem(ye,ge,ae.ConnectorPosition.Begin))}if(ye.endItem&&-1===ye.endConnectionPointIndex){var fe=ye.endItem.getNearestConnectionPoint(ye.points[ye.points.length-1]);Ce.addAndRedo(new u.SetConnectionPointIndexHistoryItem(ye,fe,ae.ConnectorPosition.End))}},le.skipUnnecessaryRenderPoints=function(Ce,ye){oe.GeometryUtils.removeUnnecessaryPoints(Ce,function(ge,fe){return le.removeUnnecessaryPoint(Ce,ge,fe,ye)},function(ge){return void 0!==ge&&!ge.skipped}),Ce[0].skipped=!1,Ce[Ce.length-1].skipped=!1},le.skipUnnecessaryRightAngleRenderPoints=function(Ce,ye){oe.GeometryUtils.removeUnnecessaryRightAnglePoints(Ce,function(ge,fe){return le.removeUnnecessaryPoint(Ce,ge,fe,ye)},function(ge){return void 0!==ge&&!ge.skipped}),Ce[0].skipped=!1,Ce[Ce.length-1].skipped=!1},le.createUnnecessaryRenderPoints=function(Ce,ye,ge,fe){void 0===fe&&(fe=function(Te){return!0});var xe={};return oe.GeometryUtils.removeUnnecessaryPoints(Ce,function(Te,Ee){return le.collectNotSkippedRenderPoints(xe,Ce,Te,Ee,ge,fe)}),le.collectSkippedRenderPoints(xe,ye,ge,fe),xe},le.createUnnecessaryRightAngleRenderPoints=function(Ce,ye,ge,fe){void 0===fe&&(fe=function(Te){return!0});var xe={};return oe.GeometryUtils.removeUnnecessaryRightAnglePoints(Ce,function(Te,Ee){return le.collectNotSkippedRenderPoints(xe,Ce,Te,Ee,ge,fe)}),le.collectSkippedRenderPoints(xe,ye,ge,fe),xe},le.createNecessaryPoints=function(Ce,ye){var ge=this,fe=[],xe=Ce.length-1;return Ce.forEach(function(Te,Ee){(0===Ee||Ee===xe||ge.isNecessaryPoint(Te,Ee,ye))&&fe.push(Te.clone())}),fe},le.isNecessaryPoint=function(Ce,ye,ge){return!Object.keys(ge).some(function(fe){var xe=ge[fe];return xe.pointIndex===ye&&oe.GeometryUtils.areDuplicatedPoints(Ce,xe)})},le.collectSkippedRenderPoints=function(Ce,ye,ge,fe){void 0===fe&&(fe=function(xe){return!0}),ye&&ye.forEach(function(xe){if(fe(xe)){var Te=ge(xe);void 0===Ce[Te]&&(Ce[Te]=xe)}})},le.collectNotSkippedRenderPoints=function(Ce,ye,ge,fe,xe,Te){if(void 0===Te&&(Te=function(Oe){return!0}),Te(ge)){var Ee=xe(ge);if(void 0===Ce[Ee])return Ce[Ee]=ge,ge.skipped=!0,ye.splice(fe,1),!0}return!1},le.removeUnnecessaryPoint=function(Ce,ye,ge,fe){return fe&&-1===ye.pointIndex?(Ce.splice(ge,1),!0):(ye.skipped=!0,!1)},le.validateRenderPointIndexes=function(Ce,ye,ge){var fe=this,xe=ye.map(function(Te,Ee){return new he.ConnectorRenderPoint(Te.x,Te.y,Ee>=ge&&Te.pointIndex>=0?fe.findFirstPointIndex(Ce,function(Oe){return Oe.equals(Te)}):Te.pointIndex,Te.skipped)});return xe[0].skipped=!1,xe[xe.length-1].skipped=!1,xe},le.findFirstPointIndex=function(Ce,ye){if(!Ce||!ye)return-1;for(var ge=0;ge<Ce.length;ge++)if(ye(Ce[ge]))return ge;return-1},le.moveConnectorRightAnglePoints=function(Ce,ye,ge,fe,xe,Te){ye.points.slice(ge,fe+1).some(function(Ee){return!oe.GeometryUtils.areDuplicatedPoints(Ee,new T.Point(void 0===xe?Ee.x:xe,void 0===Te?Ee.y:Te))})&&Ce.addAndRedo(new N.MoveConnectorRightAnglePointsHistoryItem(ye.key,ge,fe,xe,Te))},le.moveConnectorPoint=function(Ce,ye,ge,fe){return!ye.points[ge].equals(fe)&&(Ce.addAndRedo(new N.MoveConnectorPointHistoryItem(ye.key,ge,fe)),!0)},le.updateConnectorAttachedPoints=function(Ce,ye,ge){Ce.beginTransaction();var fe=ge.beginItem&&ye.findItemCollapsedContainer(ge.beginItem),xe=fe&&(!ge.endItem||!ye.isContainerItem(fe,ge.endItem)),Te=ge.endItem&&ye.findItemCollapsedContainer(ge.endItem),Ee=Te&&(!ge.beginItem||!ye.isContainerItem(Te,ge.beginItem)),Oe=!1;return Oe=xe?this.updateConnectorBeginPoint(Ce,ge,fe,Ee&&Te||ge.endItem,function(ze){return fe.getConnectionPointIndexForItem(ge.beginItem,ze)})||Oe:this.updateConnectorBeginPoint(Ce,ge,ge.beginItem,Ee&&Te||ge.endItem)||Oe,Oe=Ee?this.updateConnectorEndPoint(Ce,ge,Te,function(ze){return Te.getConnectionPointIndexForItem(ge.beginItem,ze)})||Oe:this.updateConnectorEndPoint(Ce,ge,ge.endItem)||Oe,Ce.endTransaction(),Oe},le.updateConnectorBeginPoint=function(Ce,ye,ge,fe,xe){if(ge){var Te=void 0!==xe?xe(ye.beginConnectionPointIndex):ye.beginConnectionPointIndex,Ee=ye.points[1];fe&&2===ye.points.length&&(Ee=-1!==ye.endConnectionPointIndex?fe.getConnectionPointPosition(ye.endConnectionPointIndex,T.Point.zero()):fe.rectangle.center);var Oe=ge.getConnectionPointPosition(Te,Ee);return this.moveConnectorPoint(Ce,ye,0,Oe.clone())}},le.updateConnectorEndPoint=function(Ce,ye,ge,fe){if(ge){var xe=void 0!==fe?fe(ye.endConnectionPointIndex):ye.endConnectionPointIndex,Te=ge.getConnectionPointPosition(xe,ye.points[ye.points.length-2]);return this.moveConnectorPoint(Ce,ye,ye.points.length-1,Te)}},le.updateContainerConnectorsAttachedPoints=function(Ce,ye,ge,fe){var xe=this;void 0===fe&&(fe=ge),Ce.beginTransaction(),ye.getChildren(fe).forEach(function(Te){Te instanceof ue.Shape&&(Te.attachedConnectors.forEach(function(Ee){var Oe=Ee.beginItem&&ye.isContainerItem(fe,Ee.beginItem),ze=Ee.endItem&&ye.isContainerItem(fe,Ee.endItem);if(Oe&&!ze){var $e=ye.findItemTopCollapsedContainer(Ee.beginItem),Be=Ee.endItem&&ye.findItemTopCollapsedContainer(Ee.endItem);$e?xe.updateConnectorBeginPoint(Ce,Ee,$e,Be||Ee.endItem,function(Ue){return ge.getConnectionPointIndexForItem(Ee.beginItem,Ue)}):xe.updateConnectorBeginPoint(Ce,Ee,Ee.beginItem,Be||Ee.endItem)}ze&&!Oe&&(($e=ye.findItemTopCollapsedContainer(Ee.endItem))?xe.updateConnectorEndPoint(Ce,Ee,$e,function(Ue){return ge.getConnectionPointIndexForItem(Ee.endItem,Ue)}):xe.updateConnectorEndPoint(Ce,Ee,Ee.endItem))}),xe.updateContainerConnectorsAttachedPoints(Ce,ye,ge,Te))}),Ce.endTransaction()},le.getConnectorsWithoutBeginItemInfo=function(Ce){return Ce.findConnectorsWithoutBeginItem().map(function(ye){return{connector:ye,point:ye.points[0].clone()}})},le.getConnectorsWithoutEndItemInfo=function(Ce){return Ce.findConnectorsWithoutEndItem().map(function(ye){return{connector:ye,point:ye.points[ye.points.length-1].clone()}})},le.updateShapeAttachedConnectors=function(Ce,ye,ge){var fe=this;ge.attachedConnectors.forEach(function(xe){fe.tryRemoveConnectorIntermediatePoints(Ce,xe),fe.updateConnectorAttachedPoints(Ce,ye,xe)})},le.updateMovingShapeConnections=function(Ce,ye,ge,fe,xe,Te,Ee){var Oe=this;xe(),ge.forEach(function(ze){var $e=Oe.getMovingShapeConnectionPointIndex(ye,ze.point);ye.rectangle.containsPoint(ze.point)||$e>-1?(Te(ye,$e),$e!==ze.connector.beginConnectionPointIndex&&ze.connector.beginItem&&Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ze.connector,ae.ConnectorPosition.Begin)),Ee(ze.connector),Ce.addAndRedo(new u.AddConnectionHistoryItem(ze.connector,ye,$e,ae.ConnectorPosition.Begin))):ze.connector.beginItem&&(Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ze.connector,ae.ConnectorPosition.Begin)),Ce.addAndRedo(new N.MoveConnectorPointHistoryItem(ze.connector.key,0,ze.point)))}),fe.forEach(function(ze){var $e=Oe.getMovingShapeConnectionPointIndex(ye,ze.point);ye.rectangle.containsPoint(ze.point)||$e>-1?(Te(ye,$e),$e!==ze.connector.endConnectionPointIndex&&ze.connector.endItem&&Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ze.connector,ae.ConnectorPosition.End)),Ee(ze.connector),Ce.addAndRedo(new u.AddConnectionHistoryItem(ze.connector,ye,$e,ae.ConnectorPosition.End))):ze.connector.endItem&&(Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ze.connector,ae.ConnectorPosition.End)),Ce.addAndRedo(new N.MoveConnectorPointHistoryItem(ze.connector.key,ze.connector.points.length-1,ze.point)))})},le.getMovingShapeConnectionPointIndex=function(Ce,ye){var ge=this,fe=-1;return Ce.getConnectionPoints().forEach(function(xe,Te){S.Metrics.euclideanDistance(ye,xe)<ge.connectionPointActionSize&&(fe=Te)}),fe},le.shouldRemoveConnectorIntermediatePoints=function(Ce,ye){if(Ce.properties.lineOption!==ee.ConnectorLineOption.Orthogonal||2===Ce.points.length||!ye||!ye.length)return!1;for(var ge,fe=0;ge=ye[fe];){if(this.isShapeIntersectConnectorCustomPoints(ge,Ce))return!0;fe++}return!1},le.tryRemoveConnectorIntermediatePoints=function(Ce,ye){this.shouldRemoveConnectorIntermediatePoints(ye,[ye.beginItem,ye.endItem])&&this.deleteConnectorCustomPoints(Ce,ye)},le.isShapeIntersectConnectorCustomPoints=function(Ce,ye){if(!Ce)return!1;var ge=ye.getCustomRenderPoints(!0);if(!ge.length)return!1;var fe=ae.Connector.minOffset-f.UnitConverter.pixelsToTwips(1);return oe.GeometryUtils.areIntersectedSegments(oe.GeometryUtils.createSegments(ge),oe.GeometryUtils.createSegmentsFromRectangle(Ce.rectangle.clone().inflate(fe,fe)))},le.getSnappedPos=function(Ce,ye,ge,fe){var xe=fe?Ce.snapStartPoint.x:Ce.snapStartPoint.y;return Math.round((ge-xe)/ye)*ye+xe},le.tryUpdateModelRectangle=function(Ce,ye){var ge=Ce.modelManipulator.getModelSizeUpdateOffset();ge.isEmpty()||(Ce.addAndRedo(new K.ModelResizeHistoryItem(ge)),(ge.left||ge.top)&&(Ce.addAndRedo(new J.UpdatePositionsOnPageResizeHistoryItem(new c.Vector(ge.left,ge.top))),void 0!==ye&&ye(ge.left,ge.top)),Ce.modelManipulator.raiseModelRectangleChanged(Ce.modelManipulator.model.getRectangle(!0)))},le.deleteItems=function(Ce,ye,ge,fe,xe){Ce.beginTransaction();var Te={};fe.forEach(function(Oe){return Te[Oe.key]=Oe});var Ee=ge.getKeys().filter(function(Oe){return!Te[Oe]});Ce.addAndRedo(new B.SetSelectionHistoryItem(ge,Ee)),this.deleteItemsCore(Ce,ye,fe,xe),this.tryUpdateModelRectangle(Ce),Ce.endTransaction()},le.deleteItemsCore=function(Ce,ye,ge,fe){var xe=this;ge.sort(function(Te,Ee){return(Te instanceof ae.Connector?0:1)-(Ee instanceof ae.Connector?0:1)}),ge.forEach(function(Te){if(Te.container&&xe.removeFromContainer(Ce,ye,Te),Te instanceof ue.Shape){var Ee=ye.getChildren(Te);Ee.length&&(Ee.forEach(function(Oe){Ce.addAndRedo(new k.RemoveFromContainerHistoryItem(Oe)),xe.updateAttachedConnectorsContainer(Ce,ye,Oe)}),xe.deleteItemsCore(Ce,ye,Ee.filter(function(Oe){return!Oe.locked||fe}),fe)),ye.findItem(Te.key)&&xe.deleteShape(Ce,Te)}Te instanceof ae.Connector&&ye.findItem(Te.key)&&xe.deleteConnector(Ce,Te)})},le.detachConnectors=function(Ce,ye){for(Ce.beginTransaction();ye.attachedConnectors.length>0;){var ge=ye.attachedConnectors[0];Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ge,ge.beginItem===ye?ae.ConnectorPosition.Begin:ae.ConnectorPosition.End))}Ce.endTransaction()},le.deleteShape=function(Ce,ye){var ge=Ce.modelManipulator.permissionsProvider.canDeleteItems([ye]);Ce.beginTransaction(),this.detachConnectors(Ce,ye),Ce.addAndRedo(new I.DeleteShapeHistoryItem(ye.key,ge)),Ce.endTransaction()},le.deleteConnector=function(Ce,ye){Ce.beginTransaction(),ye.beginItem&&Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ye,ae.ConnectorPosition.Begin)),ye.endItem&&Ce.addAndRedo(new D.DeleteConnectionHistoryItem(ye,ae.ConnectorPosition.End)),Ce.addAndRedo(new C.DeleteConnectorHistoryItem(ye.key)),Ce.endTransaction()},le.deleteAllItems=function(Ce,ye,ge){this.deleteItems(Ce,ye,ge,ye.items.slice(),!0)},le.deleteSelection=function(Ce,ye,ge){this.deleteItems(Ce,ye,ge,ge.getSelectedItems())},le.changeSelectionLocked=function(Ce,ye,ge,fe){Ce.beginTransaction(),ge.getSelectedItems(!0).forEach(function(xe){Ce.addAndRedo(new Y.ChangeLockedHistoryItem(xe,fe))}),le.updateSelection(Ce,ge),Ce.endTransaction()},le.copyStylesToItem=function(Ce,ye,ge,fe){var xe=ye.findItem(fe);ge.styleText.forEach(function(Te){ge.styleText[Te]!==xe.styleText[Te]&&Ce.addAndRedo(new Q.ChangeStyleTextHistoryItem(fe,Te,ge.styleText[Te]))}),ge.style.forEach(function(Te){ge.style[Te]!==xe.style[Te]&&Ce.addAndRedo(new Z.ChangeStyleHistoryItem(fe,Te,ge.style[Te]))})},le.updateSelection=function(Ce,ye){Ce.addAndRedo(new B.SetSelectionHistoryItem(ye,ye.getKeys(),!0))},le.cloneShapeToOffset=function(Ce,ye,ge,fe,xe){Ce.beginTransaction();var Te=ge.position.clone().offset(fe,xe),Ee=new _.AddShapeHistoryItem(ge.description,Te,ge.text);Ce.addAndRedo(Ee);var Oe=Ee.shapeKey;return Ce.addAndRedo(new U.ResizeShapeHistoryItem(Oe,Te,ge.size.clone())),Ce.addAndRedo(new q.ChangeCustomDataHistoryItem(Oe,oe.ObjectUtils.cloneObject(ge.customData))),Ce.addAndRedo(new w.ChangeShapeParametersHistoryItem(Oe,ge.parameters.clone())),this.copyStylesToItem(Ce,ye,ge,Oe),Ce.endTransaction(),Oe},le.applyOffsetToConnectorRenderPointsContext=function(Ce,ye,ge){return Ce&&Ce.renderPoints?new de.ConnectorRenderPointsContext(Ce.renderPoints.map(function(fe){return fe.clone().offset(ye,ge)}),!0,Ce.actualRoutingMode):void 0},le.cloneConnectorToOffset=function(Ce,ye,ge,fe,xe,Te,Ee){Ce.beginTransaction();var Oe=ge.points.map(function(st){return st.clone().offset(Te,Ee)}),ze=new h.AddConnectorHistoryItem(Oe,void 0,this.applyOffsetToConnectorRenderPointsContext(ge.tryCreateRenderPointsContext(),Te,Ee));Ce.addAndRedo(ze);var $e=ze.connectorKey,Be=ye.findConnector($e);if(ge.properties.forEach(function(st){ge.properties[st]!==Be.properties[st]&&Ce.addAndRedo(new ie.ChangeConnectorPropertyHistoryItem($e,st,ge.properties[st]))}),fe){var Ue=ye.findShape(fe);Ce.addAndRedo(new u.AddConnectionHistoryItem(Be,Ue,ge.beginConnectionPointIndex,ae.ConnectorPosition.Begin))}if(xe){var ot=ye.findShape(xe);Ce.addAndRedo(new u.AddConnectionHistoryItem(Be,ot,ge.endConnectionPointIndex,ae.ConnectorPosition.End))}return ge.texts.clone().forEach(function(st){Ce.addAndRedo(new re.ChangeConnectorTextHistoryItem(Be,st.position,st.value))}),this.copyStylesToItem(Ce,ye,ge,$e),Ce.endTransaction(),$e},le.cloneSelectionToOffset=function(Ce,ye,ge,fe,xe,Te){var Ee=this;Ce.beginTransaction();var Oe={},ze=[];fe.getSelectedShapes().forEach(function($e){var Be=Ee.cloneShapeToOffset(Ce,ye,$e,xe,Te);Oe[$e.key]=Be,ze.push(Be),ge&&ge(Be)}),fe.getSelectedConnectors().forEach(function($e){var ot=Ee.cloneConnectorToOffset(Ce,ye,$e,$e.beginItem?Oe[$e.beginItem.key]:null,$e.endItem?Oe[$e.endItem.key]:null,xe,Te);ze.push(ot),ge&&ge(ot)}),Ce.addAndRedo(new B.SetSelectionHistoryItem(fe,ze)),le.tryUpdateModelRectangle(Ce),Ce.endTransaction()},le.findContainerByEventKey=function(Ce,ye,ge){var fe=Ce.findContainer(ge);if(fe&&!fe.isLocked)return fe;var xe=Ce.findShape(ge);return xe&&xe.container&&!ye.hasKey(xe.key)?le.findContainerByEventKey(Ce,ye,xe.container.key):void 0},le.canInsertToContainer=function(Ce,ye,ge){return ye!==ge&&!(ye instanceof ue.Shape&&Ce.findChild(ye,ge.key))},le.canInsertSelectionToContainer=function(Ce,ye,ge){var fe=!0;return ye.getSelectedItems().forEach(function(xe){xe!==ge?xe instanceof ue.Shape&&Ce.findChild(xe,ge.key)&&(fe=!1):fe=!1}),fe},le.insertToContainer=function(Ce,ye,ge,fe){if(!fe.enableChildren)throw Error("Inpossible to add children to non-container shape.");if(this.canInsertToContainer(ye,ge,fe)){var xe=ge.container;xe!==fe&&(Ce.beginTransaction(),xe&&(Ce.addAndRedo(new k.RemoveFromContainerHistoryItem(ge)),ge.attachedConnectors.forEach(function(Te){Te.container&&Ce.addAndRedo(new k.RemoveFromContainerHistoryItem(Te))})),Ce.addAndRedo(new L.InsertToContainerHistoryItem(ge,fe)),this.updateAttachedConnectorsContainer(Ce,ye,ge),Ce.endTransaction())}},le.removeFromContainer=function(Ce,ye,ge){ge.container&&(Ce.beginTransaction(),Ce.addAndRedo(new k.RemoveFromContainerHistoryItem(ge)),this.updateAttachedConnectorsContainer(Ce,ye,ge),Ce.endTransaction())},le.insertSelectionToContainer=function(Ce,ye,ge,fe){var xe=this;Ce.beginTransaction();var Te=ge.getSelectedItems();Te.filter(function(Ee){return!Ee.container||-1===Te.indexOf(Ee.container)}).forEach(function(Ee){xe.insertToContainer(Ce,ye,Ee,fe)}),Ce.endTransaction()},le.removeSelectionFromContainer=function(Ce,ye,ge){var fe=this;Ce.beginTransaction(),ge.getSelectedItems().forEach(function(xe){xe.container&&!ge.hasKey(xe.container.key)&&(Ce.addAndRedo(new k.RemoveFromContainerHistoryItem(xe)),fe.updateAttachedConnectorsContainer(Ce,ye,xe))}),Ce.endTransaction()},le.getConnectorContainer=function(Ce){if(Ce.beginItem&&Ce.endItem){for(var ye={},ge=Ce.beginItem.container;ge;)ye[ge.key]=!0,ge=ge.container;for(var fe=Ce.endItem.container;fe;){if(void 0!==ye[fe.key])return fe;fe=fe.container}}},le.updateAttachedConnectorsContainer=function(Ce,ye,ge){var fe=this;Ce.beginTransaction(),ge.attachedConnectors.forEach(function(xe){fe.updateConnectorContainer(Ce,ye,xe)}),Ce.endTransaction()},le.updateConnectorContainer=function(Ce,ye,ge){var fe=this.getConnectorContainer(ge);fe?Ce.addAndRedo(new L.InsertToContainerHistoryItem(ge,fe)):ge.container&&Ce.addAndRedo(new k.RemoveFromContainerHistoryItem(ge))},le.updateNewShapeProperties=function(Ce,ye,ge){ye.inputPosition.getDefaultStyle().forEach(function(fe){Ce.addAndRedo(new Z.ChangeStyleHistoryItem(ge,fe,ye.inputPosition.getDefaultStylePropertyValue(fe)))}),ye.inputPosition.getDefaultTextStyle().forEach(function(fe){Ce.addAndRedo(new Q.ChangeStyleTextHistoryItem(ge,fe,ye.inputPosition.getDefaultTextStylePropertyValue(fe)))})},le.updateNewConnectorProperties=function(Ce,ye,ge){ye.inputPosition.getDefaultConnectorProperties().forEach(function(fe){Ce.addAndRedo(new ie.ChangeConnectorPropertyHistoryItem(ge,fe,ye.inputPosition.getDefaultConnectorPropertyValue(fe)))}),ye.inputPosition.getDefaultStyle().forEach(function(fe){Ce.addAndRedo(new Z.ChangeStyleHistoryItem(ge,fe,ye.inputPosition.getDefaultStylePropertyValue(fe)))}),ye.inputPosition.getDefaultTextStyle().forEach(function(fe){Ce.addAndRedo(new Q.ChangeStyleTextHistoryItem(ge,fe,ye.inputPosition.getDefaultTextStylePropertyValue(fe)))})},le.applyLayout=function(Ce,ye,ge,fe,xe,Te,Ee,Oe,ze,$e){Ce.beginTransaction();var Be=this.getOccupiedRectangles(Te,ge);return xe=this.offsetLayoutToFreeSpace(xe,ge&&ge.clientRectangle,Be,Ee.containerPadding),Oe&&this.adjustLayoutToSnapGrid(ye,xe,ze),ge&&this.resizeContainerOnLayout(Ce,ye,xe,ge,Ee.containerPadding),this.applyLayoutToNodes(Ce,ye,xe,fe.edges.map(function(Ue){return ye.findConnector(Ue.key)})),this.applyLayoutToConnectors(Ce,ye,xe,fe.edges.map(function(Ue){return ye.findConnector(Ue.key)}),$e),Ce.endTransaction(),xe.getRectangle(!0)},le.getNonGraphItems=function(Ce,ye,ge,fe,xe){return(ye?Ce.getChildren(ye):Ce.items.filter(function(Te){return!Te.container})).filter(function(Te){return Te instanceof ae.Connector?!(Te.beginItem&&ge[Te.beginItem.key]||Te.endItem&&ge[Te.endItem.key]||-1!==xe.indexOf(Te)):Te instanceof ue.Shape?!ge[Te.key]&&-1===fe.indexOf(Te):void 0})},le.getOccupiedRectangles=function(Ce,ye){var ge=Ce.map(function(xe){return xe.rectangle});if(ye&&ge.length){var fe=ye.clientRectangle;ge.push(new y.Rectangle(fe.right,fe.y,1,1)),ge.push(new y.Rectangle(fe.right,fe.bottom,1,1))}return ge},le.offsetLayoutToFreeSpace=function(Ce,ye,ge,fe){var xe=Ce.getRectangle(!0),Te=oe.GeometryUtils.findFreeSpace(ge,xe.createSize().offset(fe,fe).nonNegativeSize(),!1,ye);if(Te)return Ce.offsetNodes(Te.x+fe,Te.y+fe);var ze=ge&&ge.length?ge.reduce(function(Be,Ue){return Ue.right>Be?Ue.right:Be},0):ye?ye.x:0,$e=ye?ye.y:Math.max(0,xe.y);return Ce.offsetNodes(ze+fe,$e+fe)},le.resizeContainerOnLayout=function(Ce,ye,ge,fe,xe){var Te=ge.getRectangle(!0),Ee=fe.children.filter(function(Ue){return Ue instanceof ue.Shape?-1===ge.nodeKeys.indexOf(Ue.key):!!(Ue instanceof ae.Connector&&Ue.beginItem&&Ue.endItem)&&-1===ge.nodeKeys.indexOf(Ue.beginItem.key)&&-1===ge.nodeKeys.indexOf(Ue.endItem.key)}).map(function(Ue){return Ue.rectangle}),Oe=Ee.map(function(Ue){return Ue.right}).reduce(function(Ue,ot){return Math.max(Ue,ot)},Te.right),ze=Ee.map(function(Ue){return Ue.bottom}).reduce(function(Ue,ot){return Math.max(Ue,ot)},Te.bottom);le.setShapeSize(Ce,ye,fe,fe.position,new d.Size(fe.rectangle.width+Oe+xe-fe.rectangle.right,fe.rectangle.height+ze+xe-fe.rectangle.bottom)),le.updateShapeAttachedConnectors(Ce,ye,fe)},le.applyLayoutToNodes=function(Ce,ye,ge,fe){var xe=this,Te=fe.reduce(function(Ee,Oe){return Ee[Oe.key]=Ee},{});ge.forEachNode(function(Ee,Oe){var ze=ye.findShape(Oe);xe.applyLayoutToNode(Ce,ye,ze,Ee.position,Te)})},le.applyLayoutToNode=function(Ce,ye,ge,fe,xe){var Te=this,Ee=fe.clone().offset(-ge.position.x,-ge.position.y);le.setShapePosition(Ce,ye,ge,fe,!1),0===Ee.x&&0===Ee.y||(ge.attachedConnectors.filter(function(Oe){return!xe[Oe.key]}).forEach(function(Oe){Te.updateConnectorAttachedPoints(Ce,ye,Oe);for(var $e=Oe.endItem?Oe.points.length-2:Oe.points.length-1,Be=Oe.beginItem?1:0;Be<=$e;Be++)Te.moveConnectorPoint(Ce,Oe,Be,Oe.points[Be].offset(Ee.x,Ee.y))}),ye.getChildren(ge).forEach(function(Oe){if(Oe instanceof ue.Shape){var ze=Oe.position.clone().offset(Ee.x,Ee.y);Te.applyLayoutToNode(Ce,ye,Oe,ze,xe)}}))},le.applyLayoutToConnectors=function(Ce,ye,ge,fe,xe){var Te=this;fe.filter(function(Ee){return Ee.beginItem||Ee.endItem}).forEach(function(Ee){var Oe=ge.edgeToPosition[Ee.key];if(Ee.beginItem&&Ee.endItem&&!xe&&Oe){var ze=Ee.beginItem.getConnectionPointIndexForSide(Oe.beginIndex);ze!==Ee.beginConnectionPointIndex&&Ce.addAndRedo(new u.SetConnectionPointIndexHistoryItem(Ee,ze,ae.ConnectorPosition.Begin));var $e=Ee.endItem.getConnectionPointIndexForSide(Oe.endIndex);$e!==Ee.endConnectionPointIndex&&Ce.addAndRedo(new u.SetConnectionPointIndexHistoryItem(Ee,$e,ae.ConnectorPosition.End))}Te.updateConnectorAttachedPoints(Ce,ye,Ee),Oe&&Te.deleteConnectorCustomPoints(Ce,Ee)})},le.adjustLayoutToSnapGrid=function(Ce,ye,ge){var fe=this;ye.nodeKeys.forEach(function(xe){ye.nodeToLayout[xe].position.x=fe.getSnappedPos(Ce,ge,ye.nodeToLayout[xe].position.x,!0),ye.nodeToLayout[xe].position.y=fe.getSnappedPos(Ce,ge,ye.nodeToLayout[xe].position.y,!1)})},le.getGraphInfoByItems=function(Ce,ye,ge,fe){void 0===fe&&(fe=!0);var xe={};[].concat(ye).concat(ge).forEach(function(Ue){var ot=Ue.container&&Ue.container.key;xe[ot]||(xe[ot]=[]),xe[ot].push(Ue)});var Te=[];for(var Ee in xe)if(Object.prototype.hasOwnProperty.call(xe,Ee)){var Oe=Ee&&Ce.findContainer(Ee);if(!Oe||Oe.expanded&&!Ce.findItemCollapsedContainer(Oe)){var $e=this.getGraphByItems(Ce,xe[Ee],Oe&&Oe.key,!fe),Be=!1;($e.nodes.length>1||$e.nodes.length&&(fe||Oe&&xe[Oe.container&&Oe.container.key]))&&(Be=!0),Be&&Te.push(new pe.GraphInfo(Oe,$e))}}return Te.sort(function(Ue,ot){return ot.level-Ue.level})},le.getGraphByItems=function(Ce,ye,ge,fe){var xe=this,Te=new te.Graph([],[]),Ee={};return ye.forEach(function(Oe){xe.extendByConnectedComponents(Oe,Te,ge,Ee,fe)}),Te.nodes.sort(function(Oe,ze){return Ce.getItemIndex(Ce.findItem(Oe))-Ce.getItemIndex(Ce.findItem(ze))}),Te.edges.sort(function(Oe,ze){return Ce.getItemIndex(Ce.findItem(Oe.key))-Ce.getItemIndex(Ce.findItem(ze.key))}),Te.edges=Te.edges.filter(function(Oe){return Te.getNode(Oe.from)&&Te.getNode(Oe.to)}),Te},le.extendByConnectedComponents=function(Ce,ye,ge,fe,xe){var Te=this;!Ce||xe&&Ce.locked||fe[Ce.key]||(fe[Ce.key]=!0,!(Ce instanceof ae.Connector&&(Ce.container&&Ce.container.key)===ge&&Ce.beginItem)||Ce.beginItem.locked&&xe||!Ce.endItem||Ce.endItem.locked&&xe||Ce.beginItem===Ce.endItem?Ce instanceof ue.Shape&&(Ce.container&&Ce.container.key)===ge&&(ye.addNode(Ce),Ce.attachedConnectors.forEach(function(Ee){return Te.extendByConnectedComponents(Ee,ye,ge,fe,xe)})):(ye.addEdge(new z.Edge(Ce.key,Ce.beginItem&&Ce.beginItem.key,Ce.endItem&&Ce.endItem.key)),this.extendByConnectedComponents(Ce.beginItem,ye,ge,fe,xe),this.extendByConnectedComponents(Ce.endItem,ye,ge,fe,xe)))},le.getlUnitValue=function(Ce,ye){switch(Ce){case a.DiagramUnit.Cm:return f.UnitConverter.twipsToCentimeters(ye);case a.DiagramUnit.In:return f.UnitConverter.twipsToInches(ye);case a.DiagramUnit.Px:return f.UnitConverter.twipsToPixels(ye)}},le.getUnitText=function(Ce,ye,ge,fe,xe){void 0===xe&&(xe=2);var Te=ye[Ce]?" "+ye[Ce]:"",Ee=this.getlUnitValue(Ce,fe);switch(Ce){case a.DiagramUnit.Cm:case a.DiagramUnit.In:return ge(+Ee.toFixed(xe))+Te;case a.DiagramUnit.Px:return ge(+Ee.toFixed(0))+Te}},le.getTwipsValue=function(Ce,ye){switch(Ce){case a.DiagramUnit.Cm:return f.UnitConverter.centimetersToTwips(ye);case a.DiagramUnit.In:return f.UnitConverter.inchesToTwips(ye);case a.DiagramUnit.Px:return f.UnitConverter.pixelsToTwips(ye)}},le.getGuidItemKey=function(){return s.MathUtils.generateGuid()},le.createSelectedItems=function(Ce){var ye={};return Ce.getSelectedItems(!0).forEach(function(ge){return ye[ge.key]=ge}),ye},le.canMoveConnector=function(Ce,ye){var ge=ye.beginItem,fe=ye.endItem;return ge||fe?!(!Ce[ye.key]||!(ge===fe?Ce[ge.key]:ge?fe?Ce[ge.key]&&Ce[fe.key]:Ce[ge.key]:Ce[fe.key])):!ye.isLocked},le.createRectangle=function(Ce){return oe.GeometryUtils.getCommonRectangle(Ce.map(function(ye){return ye.rectangle}))},le.changeShapeType=function(Ce,ye,ge,fe){if(ge.description.key===fe)return!1;Ce.beginTransaction();var xe=ge.getConnectionPoints(),Te=xe.map(function(Be){return ge.getConnectionPointSide(Be)});Ce.addAndRedo(new be.ChangeShapeTypeHistoryItem(ge,fe));for(var Ee=ge.getConnectionPoints(),Oe=Ee.map(function(Be){return ge.getConnectionPointSide(Be)}),ze=0,$e=void 0;$e=ge.attachedConnectors[ze];ze++)$e.beginItem===ge&&this.updateConnectionIndexByNewShapeType(Ce,$e,ae.ConnectorPosition.Begin,$e.beginConnectionPointIndex,xe,Te,Ee,Oe),$e.endItem===ge&&this.updateConnectionIndexByNewShapeType(Ce,$e,ae.ConnectorPosition.End,$e.endConnectionPointIndex,xe,Te,Ee,Oe),this.updateConnectorAttachedPoints(Ce,ye,$e);return Ce.endTransaction(),!0},le.updateConnectionIndexByNewShapeType=function(Ce,ye,ge,fe,xe,Te,Ee,Oe){if(!(fe<0)){var ze=Te[fe],$e=xe[fe];if(!(fe<Ee.length&&ze===Oe[fe])){var Be=this.findNearestPointIndex(Ee,$e,function(Ue){return Oe[Ue]===ze});-1===Be&&(Be=this.findNearestPointIndex(Ee,$e,function(){return!0})),Be!==fe&&Ce.addAndRedo(new u.SetConnectionPointIndexHistoryItem(ye,Be,ge))}}},le.findNearestPointIndex=function(Ce,ye,ge){return Ce.reduce(function(fe,xe,Te){if(ge(Te)){var Ee=S.Metrics.euclideanDistance(ye,Ce[Te]);(-1===fe.index||fe.distance>Ee)&&(fe.index=Te,fe.distance=Ee)}return fe},{distance:Number.MAX_SAFE_INTEGER,index:-1}).index},le.connectionPointActionSize=f.UnitConverter.pixelsToTwips(8),le}();P.ModelUtils=ve},6469:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.AddShapeEventArgs=P.AddShapeRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h){var g=s.call(this,u)||this;return g.shape=h,g}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.AddShape},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeShape(this.shape),this.apiController.convertPoint(this.shape.position))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"addShape"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shape===u.shape&&this.shape.position.equals(u.shape.position)},a}(y.RequestedEntity);P.AddShapeRequestedEntity=d;var c=function(s){function a(u,h){var g=s.call(this)||this;return g.shape=u,g.position=h,g}return S(a,s),a}(y.PermissionRequestEventArgs);P.AddShapeEventArgs=c},1110:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.AddShapeFromToolboxEventArgs=P.AddShapeFromToolboxRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h){var g=s.call(this,u)||this;return g.shapeType=h,g}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.AddShapeFromToolbox},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.shapeType)},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"addShapeFromToolbox"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+this.shapeType},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shapeType===u.shapeType},a}(y.RequestedEntity);P.AddShapeFromToolboxRequestedEntity=d;var c=function(s){function a(u){var h=s.call(this)||this;return h.shapeType=u,h}return S(a,s),a}(y.PermissionRequestEventArgs);P.AddShapeFromToolboxEventArgs=c},4829:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.BeforeChangeConnectorTextEventArgs=P.BeforeChangeConnectorTextRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h,g){var _=s.call(this,u)||this;return _.connector=h,_.position=g,_}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.BeforeChangeConnectorText},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeConnector(this.connector),this.position,this.connector.texts.map(function(u){return u}).sort(function(u,h){return u.position-h.position}).indexOf(this.connector.texts.get(this.position)))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"changeConnectorText"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return"before"+this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.connector===u.connector&&this.position===u.position&&this.connector.texts.get(this.position)===u.connector.texts.get(u.position)},a}(y.RequestedEntity);P.BeforeChangeConnectorTextRequestedEntity=d;var c=function(s){function a(u,h,g){var _=s.call(this)||this;return _.connector=u,_.position=h,_.index=g,_}return S(a,s),a}(y.PermissionRequestEventArgs);P.BeforeChangeConnectorTextEventArgs=c},2345:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.BeforeChangeShapeTextEventArgs=P.BeforeChangeShapeTextRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h){var g=s.call(this,u)||this;return g.shape=h,g}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.BeforeChangeShapeText},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeShape(this.shape))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"changeShapeText"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return"before"+this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shape===u.shape&&this.shape.text===u.shape.text},a}(y.RequestedEntity);P.BeforeChangeShapeTextRequestedEntity=d;var c=function(s){function a(u){var h=s.call(this)||this;return h.shape=u,h}return S(a,s),a}(y.PermissionRequestEventArgs);P.BeforeChangeShapeTextEventArgs=c},6466:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectionEventArgs=P.ChangeConnectionRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h,g,_,x,w){var D=s.call(this,u)||this;return D.connector=h,D.shape=g,D.oldShape=_,D.position=x,D.connectionPointIndex=w,D}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.ChangeConnection},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeConnector(this.connector),this.apiController.createNativeShape(this.shape),this.apiController.createNativeShape(this.oldShape),this.position,this.connectionPointIndex)},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"changeConnection"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)+"_"+this.position},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&(!this.shape&&!u.shape||this.shape&&u.shape&&this.shape===u.shape)&&(!this.oldShape&&!u.oldShape||this.oldShape&&u.oldShape&&this.oldShape===u.oldShape)&&(!this.connector&&!u.connector||this.connector&&u.connector&&this.connector===u.connector)&&this.position===u.position&&this.connectionPointIndex===u.connectionPointIndex},a}(y.RequestedEntity);P.ChangeConnectionRequestedEntity=d;var c=function(s){function a(u,h,g,_,x){var w=s.call(this)||this;return w.connector=u,w.shape=h,w.oldShape=g,w.position=_,w.connectionPointIndex=x,w}return S(a,s),a}(y.PermissionRequestEventArgs);P.ChangeConnectionEventArgs=c},6354:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorPointsEventArgs=P.ChangeConnectorPointsRequestedEntity=void 0;var T=b(6879),y=b(8532),d=b(8675),c=function(a){function u(h,g,_,x){var w=a.call(this,h)||this;return w.connector=g,w.oldPoints=_,w.points=x,w}return S(u,a),Object.defineProperty(u.prototype,"operation",{get:function(){return T.DiagramModelOperation.ChangeConnectorPoints},enumerable:!1,configurable:!0}),u.prototype.createEventArgs=function(){var h=this;return new s(this.apiController.createNativeConnector(this.connector),this.oldPoints.map(function(g){return h.apiController.convertPoint(g)}),this.points.map(function(g){return h.apiController.convertPoint(g)}))},Object.defineProperty(u.prototype,"settingsKey",{get:function(){return"changeConnectorPoints"},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),u.prototype.equals=function(h){return h instanceof u&&this.connector===h.connector&&d.GeometryUtils.arePointsEqual(this.oldPoints,h.oldPoints)&&d.GeometryUtils.arePointsEqual(this.points,h.points)},u}(y.RequestedEntity);P.ChangeConnectorPointsRequestedEntity=c;var s=function(a){function u(h,g,_){var x=a.call(this)||this;return x.connector=h,x.oldPoints=g,x.points=_,x}return S(u,a),u}(y.PermissionRequestEventArgs);P.ChangeConnectorPointsEventArgs=s},2249:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeConnectorTextEventArgs=P.ChangeConnectorTextRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h,g,_){var x=s.call(this,u)||this;return x.connector=h,x.position=g,x.text=_,x}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.ChangeConnectorText},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeConnector(this.connector),this.position,this.connector.texts.map(function(u){return u}).sort(function(u,h){return u.position-h.position}).indexOf(this.connector.texts.get(this.position)),this.text)},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"changeConnectorText"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.connector===u.connector&&this.position===u.position&&this.text===u.text},a}(y.RequestedEntity);P.ChangeConnectorTextRequestedEntity=d;var c=function(s){function a(u,h,g,_){var x=s.call(this)||this;return x.connector=u,x.position=h,x.index=g,x.text=_,x}return S(a,s),a}(y.PermissionRequestEventArgs);P.ChangeConnectorTextEventArgs=c},5560:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ChangeShapeTextEventArgs=P.ChangeShapeTextRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h,g){var _=s.call(this,u)||this;return _.shape=h,_.text=g,_}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.ChangeShapeText},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeShape(this.shape),this.text)},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"changeShapeText"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shape===u.shape&&this.text===u.text},a}(y.RequestedEntity);P.ChangeShapeTextRequestedEntity=d;var c=function(s){function a(u,h){var g=s.call(this)||this;return g.shape=u,g.text=h,g}return S(a,s),a}(y.PermissionRequestEventArgs);P.ChangeShapeTextEventArgs=c},6580:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteConnectorEventArgs=P.DeleteConnectorRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h){var g=s.call(this,u)||this;return g.connector=h,g}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.DeleteConnector},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeConnector(this.connector))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"deleteConnector"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.connector===u.connector},a}(y.RequestedEntity);P.DeleteConnectorRequestedEntity=d;var c=function(s){function a(u){var h=s.call(this)||this;return h.connector=u,h}return S(a,s),a}(y.PermissionRequestEventArgs);P.DeleteConnectorEventArgs=c},8825:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.DeleteShapeEventArgs=P.DeleteShapeRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h){var g=s.call(this,u)||this;return g.shape=h,g}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.DeleteShape},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeShape(this.shape))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"deleteShape"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shape===u.shape},a}(y.RequestedEntity);P.DeleteShapeRequestedEntity=d;var c=function(s){function a(u){var h=s.call(this)||this;return h.shape=u,h}return S(a,s),a}(y.PermissionRequestEventArgs);P.DeleteShapeEventArgs=c},4864:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.MoveShapeEventArgs=P.MoveShapeRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h,g,_){var x=s.call(this,u)||this;return x.shape=h,x.oldPosition=g,x.position=_,x}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.MoveShape},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeShape(this.shape),this.apiController.convertPoint(this.oldPosition),this.apiController.convertPoint(this.position))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"moveShape"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shape===u.shape&&this.oldPosition.equals(u.oldPosition)&&this.position.equals(u.position)},a}(y.RequestedEntity);P.MoveShapeRequestedEntity=d;var c=function(s){function a(u,h,g){var _=s.call(this)||this;return _.shape=u,_.oldPosition=h,_.position=g,_}return S(a,s),a}(y.PermissionRequestEventArgs);P.MoveShapeEventArgs=c},8532:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PermissionRequestEventArgs=P.RequestedEntity=void 0;var b=function(){function S(T){this.apiController=T}return Object.defineProperty(S.prototype,"allowed",{get:function(){return this.eventArgs.allowed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"updateUI",{get:function(){return this.eventArgs.updateUI},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"eventArgs",{get:function(){return this._eventArgs||(this._eventArgs=this.createEventArgs()),this._eventArgs},enumerable:!1,configurable:!0}),S}();P.RequestedEntity=b,P.PermissionRequestEventArgs=function(){this.allowed=!0,this.updateUI=!1}},3214:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ResizeShapeEventArgs=P.ResizeShapeRequestedEntity=void 0;var T=b(6879),y=b(8532),d=function(s){function a(u,h,g,_){var x=s.call(this,u)||this;return x.shape=h,x.oldSize=g,x.size=_,x}return S(a,s),Object.defineProperty(a.prototype,"operation",{get:function(){return T.DiagramModelOperation.ResizeShape},enumerable:!1,configurable:!0}),a.prototype.createEventArgs=function(){return new c(this.apiController.createNativeShape(this.shape),this.apiController.convertSize(this.oldSize),this.apiController.convertSize(this.size))},Object.defineProperty(a.prototype,"settingsKey",{get:function(){return"resizeShape"},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),a.prototype.equals=function(u){return u instanceof a&&this.shape===u.shape&&this.oldSize.equals(u.oldSize)&&this.size.equals(u.size)},a}(y.RequestedEntity);P.ResizeShapeRequestedEntity=d;var c=function(s){function a(u,h,g){var _=s.call(this)||this;return _.shape=u,_.oldSize=h,_.size=g,_}return S(a,s),a}(y.PermissionRequestEventArgs);P.ResizeShapeEventArgs=c},2883:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PermissionsProvider=void 0;var f=b(5503),S=b(8675),T=b(6879),y=b(7959),d=b(6469),c=b(8825),s=b(6580),a=b(1110),u=b(6466),h=b(6354),g=b(2345),_=b(4829),x=b(5560),w=b(2249),D=b(9187),C=b(3214),I=b(4864),L=function(){function N(G){this.onRequestOperation=new S.EventDispatcher,this.cache=[],this.permissionsLockCount=0,this.requestDeleteItems={},this.updateUICount=0,this.apiController=G,this.operationSettings=new T.ModelOperationSettings,this.storage=new D.PermissionsProviderStorage}return N.prototype.notifySelectionChanged=function(G){this.clearCache()},N.prototype.notifyModelChanged=function(G){this.clearCache()},N.prototype.notifyPageColorChanged=function(G){},N.prototype.notifyPageSizeChanged=function(G,k){},N.prototype.clearCache=function(G){this.cache=void 0!==G?this.cache.filter(function(k){return k.operation!==G}):[]},N.prototype.canDeleteItems=function(G){var k=this,U=!0;return G.forEach(function(B){var K;B instanceof f.Shape&&(K=new c.DeleteShapeRequestedEntity(k.apiController,B)),B instanceof y.Connector&&(K=new s.DeleteConnectorRequestedEntity(k.apiController,B)),U=U&&k.requestOperation(K)}),U},N.prototype.canAddItems=function(G){var k=this,U=!0;return G.forEach(function(B){B instanceof f.Shape&&(U=U&&k.requestOperation(new d.AddShapeRequestedEntity(k.apiController,B))),B instanceof y.Connector&&(U=(U=U&&k.canChangeConnection(B,B.beginItem,void 0,y.ConnectorPosition.Begin,B.beginConnectionPointIndex))&&k.canChangeConnection(B,B.endItem,void 0,y.ConnectorPosition.End,B.endConnectionPointIndex))}),U},N.prototype.canAddShapeFromToolbox=function(G){return this.requestOperation(new a.AddShapeFromToolboxRequestedEntity(this.apiController,G))},N.prototype.canChangeConnection=function(G,k,U,B,K){return!(!G||!this.requestDeleteItems[G.key])||!(null==k||k instanceof f.Shape)||this.requestOperation(new u.ChangeConnectionRequestedEntity(this.apiController,G,k,U,B,K))},N.prototype.canChangeConnectorPoints=function(G,k,U){return!(!G||!this.requestDeleteItems[G.key])||this.requestOperation(new h.ChangeConnectorPointsRequestedEntity(this.apiController,G,k,U))},N.prototype.canChangeShapeText=function(G){return this.requestOperation(new g.BeforeChangeShapeTextRequestedEntity(this.apiController,G))},N.prototype.canChangeConnectorText=function(G,k){return this.requestOperation(new _.BeforeChangeConnectorTextRequestedEntity(this.apiController,G,k))},N.prototype.canApplyShapeTextChange=function(G,k){return this.requestOperation(new x.ChangeShapeTextRequestedEntity(this.apiController,G,k))},N.prototype.canApplyConnectorTextChange=function(G,k,U){return this.requestOperation(new w.ChangeConnectorTextRequestedEntity(this.apiController,G,k,U))},N.prototype.canResizeShapes=function(G){var k=this,U=!0;return G.forEach(function(B){U=U&&k.requestOperation(new C.ResizeShapeRequestedEntity(k.apiController,B.shape,B.oldSize,B.size))}),U},N.prototype.canMoveShapes=function(G){var k=this,U=!0;return G.forEach(function(B){U=U&&k.requestOperation(new I.MoveShapeRequestedEntity(k.apiController,B.shape,B.oldPosition,B.position))}),U},N.prototype.requestOperation=function(G){var k,U=!0;return!this.permissionsLockCount&&(this.updateUICount>0&&this.cache.forEach(function(B){B.equals(G)&&(k=B)}),k?U=k.allowed:(this.requestOperationCore(G),this.updateUICount>0&&this.cache.push(G),U=G.allowed),0===this.updateUICount&&this.storage.needStorePermissions())?(this.storage.storePermission(G.storageKey,U),this.storage.isStoredPermissionsGranted()):U},N.prototype.requestOperationCore=function(G){G.eventArgs.allowed=this.operationSettings[G.settingsKey],G.eventArgs.updateUI=this.updateUICount>0,G.allowed&&this.onRequestOperation.raise("notifyRequestOperation",G.operation,G.eventArgs)},N.prototype.lockPermissions=function(){this.permissionsLockCount++},N.prototype.unlockPermissions=function(){this.permissionsLockCount--},N.prototype.beginDeleteItems=function(G){var k=this;G.forEach(function(U){return k.requestDeleteItems[U.key]=U})},N.prototype.endDeleteItems=function(){this.requestDeleteItems={}},N.prototype.beginUpdateUI=function(){this.updateUICount++},N.prototype.endUpdateUI=function(){this.updateUICount--},N.prototype.addInteractingItem=function(G,k){this.storage.addInteractingItem(G,k)},N.prototype.getInteractingItem=function(G,k){return this.storage.getInteractingItem(G,k)},N.prototype.getInteractingItemCount=function(){return this.storage.getInteractingItemCount()},N.prototype.clearInteractingItems=function(){this.storage.clearInteractingItems()},N.prototype.beginStorePermissions=function(){this.storage.beginStorePermissions()},N.prototype.endStorePermissions=function(){this.storage.endStorePermissions()},N.prototype.isStoredPermissionsGranted=function(){return this.permissionsLockCount>0||this.storage.isStoredPermissionsGranted()},N}();P.PermissionsProvider=L},9187:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PermissionsProviderStorage=void 0;var f=b(5503),S=b(7959),T=function(){function y(){this.interactingItems={},this.storedPermissions={}}return y.prototype.addInteractingItem=function(d,c){var s=this.getInteractingItemKey(d,c);void 0===this.interactingItems[s]&&(d instanceof f.Shape||d instanceof S.Connector)&&(this.interactingItems[s]=d.clone())},y.prototype.getInteractingItem=function(d,c){var s=this.getInteractingItemKey(d,c);return this.interactingItems[s]},y.prototype.getInteractingItemCount=function(){return Object.keys(this.interactingItems).length},y.prototype.clearInteractingItems=function(){this.interactingItems={}},y.prototype.getInteractingItemKey=function(d,c){return d.key+(void 0!==c?"_"+c.toString():"")},y.prototype.needStorePermissions=function(){return this.storePermissions},y.prototype.beginStorePermissions=function(){this.storePermissions=!0},y.prototype.endStorePermissions=function(){this.storePermissions=!1,this.storedPermissions={}},y.prototype.isStoredPermissionsGranted=function(){for(var d=Object.keys(this.storedPermissions),c=!0,s=0;s<d.length;s++)c=c&&this.storedPermissions[d[s]];return c},y.prototype.storePermission=function(d,c){this.storedPermissions[d]=c},y}();P.PermissionsProviderStorage=T},7255:function(o,P,b){var f,S=this&&this.__extends||(f=function(D,C){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,L){I.__proto__=L}||function(I,L){for(var N in L)L.hasOwnProperty(N)&&(I[N]=L[N])})(D,C)},function(D,C){function I(){this.constructor=D}f(D,C),D.prototype=null===C?Object.create(C):(I.prototype=C.prototype,new I)});Object.defineProperty(P,"__esModule",{value:!0}),P.ContainerDescription=P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO=P.CONTAINER_EXPAND_BUTTON_RECT_RATIO=P.CONTAINER_HEADER_TOOLBOX_SIZE_RATIO=P.CONTAINER_HEADER_SIZE=void 0;var T=b(6794),y=b(6353),d=b(2259),c=b(4716),s=b(7724),a=b(3500),u=b(6031),h=b(5329),g=b(7228),_=b(3742),x=b(6224);P.CONTAINER_HEADER_SIZE=360,P.CONTAINER_HEADER_TOOLBOX_SIZE_RATIO=.2,P.CONTAINER_EXPAND_BUTTON_RECT_RATIO=.5,P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO=.3;var w=function(D){function C(I){return void 0===I&&(I=new y.Size(2*T.ShapeDefaultDimension,1.5*T.ShapeDefaultDimension)),D.call(this,I,!0)||this}return S(C,D),Object.defineProperty(C.prototype,"enableChildren",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),C.prototype.getDefaultText=function(){return x.DiagramLocalizationService.shapeTexts[d.ShapeTypes.Container]},C.prototype.createConnectionPoints=function(){return[new g.ConnectionPoint(.25,0,_.ConnectionPointSide.North),new g.ConnectionPoint(.5,0,_.ConnectionPointSide.North),new g.ConnectionPoint(.75,0,_.ConnectionPointSide.North),new g.ConnectionPoint(1,.25,_.ConnectionPointSide.East),new g.ConnectionPoint(1,.5,_.ConnectionPointSide.East),new g.ConnectionPoint(1,.75,_.ConnectionPointSide.East),new g.ConnectionPoint(.75,1,_.ConnectionPointSide.South),new g.ConnectionPoint(.5,1,_.ConnectionPointSide.South),new g.ConnectionPoint(.25,1,_.ConnectionPointSide.South),new g.ConnectionPoint(0,.75,_.ConnectionPointSide.West),new g.ConnectionPoint(0,.5,_.ConnectionPointSide.West),new g.ConnectionPoint(0,.25,_.ConnectionPointSide.West)]},C.prototype.getConnectionPointIndexForItem=function(I,L){return 4===(I&&I.getConnectionPoints()).length?3*L+1:L},C.prototype.getConnectionPointIndexForSide=function(I){return 3*I+1},C.prototype.createShapePrimitives=function(I,L){var N=I.rectangle,K=[];return I.expanded&&(K=K.concat([new c.RectanglePrimitive(N.x,N.y,N.width,N.height,I.style)])),K.concat(this.createHeaderPrimitives(I,L))},C.prototype.createExpandButtonPrimitives=function(I,L){var N=[new s.PathPrimitiveMoveToCommand(L.x+L.width*((1-P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO)/2),L.center.y),new s.PathPrimitiveLineToCommand(L.x+L.width*((1-P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO)/2+P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO),L.center.y)];I.expanded||(N=N.concat([new s.PathPrimitiveMoveToCommand(L.center.x,L.y+L.height*((1-P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO)/2)),new s.PathPrimitiveLineToCommand(L.center.x,L.y+L.height*((1-P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO)/2+P.CONTAINER_EXPAND_BUTTON_SIGN_RATIO))]));var G=L.clone().inflate(-L.width*(1-P.CONTAINER_EXPAND_BUTTON_RECT_RATIO)/2,-L.height*(1-P.CONTAINER_EXPAND_BUTTON_RECT_RATIO)/2);return[new h.GroupPrimitive([new c.RectanglePrimitive(G.x,G.y,G.width,G.height,I.style),new s.PathPrimitive(N,I.style)],"shape-expand-btn",null,null,function(k){a.RenderUtils.setElementEventData(k,u.MouseEventElementType.ShapeExpandButton,I.key)})]},C}(T.ShapeDescription);P.ContainerDescription=w},944:function(o,P,b){var f,S=this&&this.__extends||(f=function(_,x){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var C in D)D.hasOwnProperty(C)&&(w[C]=D[C])})(_,x)},function(_,x){function w(){this.constructor=_}f(_,x),_.prototype=null===x?Object.create(x):(w.prototype=x.prototype,new w)});Object.defineProperty(P,"__esModule",{value:!0}),P.HorizontalContainerDescription=void 0;var T=b(6794),y=b(8011),d=b(6353),c=b(8900),s=b(2259),a=b(7255),u=b(4716),h=b(9416),g=function(_){function x(){return _.call(this,new d.Size(2*T.ShapeDefaultDimension,1.5*T.ShapeDefaultDimension))||this}return S(x,_),Object.defineProperty(x.prototype,"key",{get:function(){return s.ShapeTypes.HorizontalContainer},enumerable:!1,configurable:!0}),x.prototype.getExpandedSize=function(w){return new d.Size(w.expandedSize.width,w.size.height)},x.prototype.getCollapsedSize=function(w){return new d.Size(a.CONTAINER_HEADER_SIZE+2*w.strokeWidth,w.size.height)},x.prototype.allowResizeHorizontally=function(w){return w.expanded},x.prototype.createHeaderPrimitives=function(w,D){var C=w.rectangle,I=C.x,L=C.y,N=C.height,G=this.getHeaderSize(w,D),k=[];return k=k.concat([new u.RectanglePrimitive(I,L,G,N,w.style)]),D||(k=k.concat(this.createExpandButtonPrimitives(w,new y.Rectangle(I,L,G,G)))),k},x.prototype.getClientRectangle=function(w){var D=w.rectangle,C=this.getHeaderSize(w);return y.Rectangle.fromGeometry(new c.Point(D.x+C,D.y),new d.Size(D.width-C,D.height))},x.prototype.getTextRectangle=function(w){var D=w.rectangle,C=this.getHeaderSize(w);return y.Rectangle.fromGeometry(new c.Point(D.x,D.y+C),new d.Size(C,D.height-C)).nonNegativeSize()},x.prototype.getSizeByText=function(w,D){var C=this.getHeaderSize(D);return new d.Size(D.size.width,Math.max(D.size.height,Math.max(w.width+C,D.size.height)))},x.prototype.getTextEditRectangle=function(w){var D=this.getTextRectangle(w);return y.Rectangle.fromGeometry(new c.Point(D.x,D.y+D.height),new d.Size(D.height,D.width))},x.prototype.getTextAngle=function(){return h.TextAngle.Angle270deg},x.prototype.getHeaderSize=function(w,D){return D?w.rectangle.height*a.CONTAINER_HEADER_TOOLBOX_SIZE_RATIO:a.CONTAINER_HEADER_SIZE+2*w.strokeWidth},x}(a.ContainerDescription);P.HorizontalContainerDescription=g},5759:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.VerticalContainerDescription=void 0;var T=b(8900),y=b(6353),d=b(4716),c=b(8011),s=b(2259),a=b(6794),u=b(7255),h=function(g){function _(){return g.call(this,new y.Size(2*a.ShapeDefaultDimension,1.5*a.ShapeDefaultDimension))||this}return S(_,g),Object.defineProperty(_.prototype,"key",{get:function(){return s.ShapeTypes.VerticalContainer},enumerable:!1,configurable:!0}),_.prototype.getExpandedSize=function(x){return new y.Size(x.size.width,x.expandedSize.height)},_.prototype.getCollapsedSize=function(x){return new y.Size(x.size.width,u.CONTAINER_HEADER_SIZE+2*x.strokeWidth)},_.prototype.allowResizeVertically=function(x){return x.expanded},_.prototype.createHeaderPrimitives=function(x,w){var D=x.rectangle,C=D.x,I=D.y,L=D.width,N=this.getHeaderSize(x,w),G=[];return G=G.concat([new d.RectanglePrimitive(C,I,L,N,x.style)]),w||(G=G.concat(this.createExpandButtonPrimitives(x,new c.Rectangle(C,I,N,N)))),G},_.prototype.getClientRectangle=function(x){var w=x.rectangle,D=this.getHeaderSize(x);return c.Rectangle.fromGeometry(new T.Point(w.x,w.y+D),new y.Size(w.width,w.height-D))},_.prototype.getTextRectangle=function(x){var w=x.rectangle,D=this.getHeaderSize(x);return c.Rectangle.fromGeometry(new T.Point(w.x+D,w.y),new y.Size(w.width-D,D))},_.prototype.getSizeByText=function(x,w){var D=this.getHeaderSize(w);return new y.Size(Math.max(w.size.width,x.width+D),w.size.height)},_.prototype.getHeaderSize=function(x,w){return w?x.rectangle.height*u.CONTAINER_HEADER_TOOLBOX_SIZE_RATIO:u.CONTAINER_HEADER_SIZE+2*x.strokeWidth},_}(u.ContainerDescription);P.VerticalContainerDescription=h},6688:function(o,P,b){var f,S=this&&this.__extends||(f=function(C,I){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,N){L.__proto__=N}||function(L,N){for(var G in N)N.hasOwnProperty(G)&&(L[G]=N[G])})(C,I)},function(C,I){function L(){this.constructor=C}f(C,I),C.prototype=null===I?Object.create(I):(L.prototype=I.prototype,new L)});Object.defineProperty(P,"__esModule",{value:!0}),P.CustomShapeDescription=void 0;var T=b(1995),y=b(8011),d=b(6353),c=b(8900),s=b(7228),a=b(3742),u=b(4083),h=b(6794),g=b(6617),_=b(7176),x=b(590),w=b(1248),D=function(C){function I(L,N){var G=C.call(this,new d.Size(L.defaultWidth||N&&N.defaultSize.width||h.ShapeDefaultDimension,L.defaultHeight||N&&N.defaultSize.height||h.ShapeDefaultDimension))||this;if(G.properties=L,G.baseDescription=N,G.imageLoader=new x.ImageLoader(G.updateSvgImage.bind(G)),G.defaultText=void 0!==L.defaultText?L.defaultText:N&&N.getDefaultText(),G.defaultImageUrl=L.defaultImageUrl||N&&N.getDefaultImageUrl(),G.title=L.title||N&&N.getTitle()||G.defaultText||"",G.connectionPoints=G.createConnectionPoints(),L.svgUrl){G.svgImage=new g.ImageInfo(L.svgUrl);var k=_.ImageCache.instance.createUnloadedInfoByShapeImageInfo(G.svgImage);G.imageLoader.load(k)}return L.svgToolboxUrl&&(G.svgToolboxImage=new g.ImageInfo(L.svgToolboxUrl),k=_.ImageCache.instance.createUnloadedInfoByShapeImageInfo(G.svgToolboxImage),G.imageLoader.load(k)),G}return S(I,C),Object.defineProperty(I.prototype,"key",{get:function(){return this.properties.type},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"allowEditText",{get:function(){return!1!==this.properties.allowEditText},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"allowEditImage",{get:function(){return this.baseDescription?this.baseDescription.allowEditImage:!0===this.properties.allowEditImage},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"enableChildren",{get:function(){return this.baseDescription&&this.baseDescription.enableChildren},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"hasTemplate",{get:function(){return!!this.properties.createTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"minWidth",{get:function(){return this.properties.minWidth||this.baseDescription&&this.baseDescription.minWidth},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"minHeight",{get:function(){return this.properties.minHeight||this.baseDescription&&this.baseDescription.minHeight},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"maxWidth",{get:function(){return this.properties.maxWidth||this.baseDescription&&this.baseDescription.maxWidth},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"maxHeight",{get:function(){return this.properties.maxHeight||this.baseDescription&&this.baseDescription.maxHeight},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"keepRatioOnAutoSize",{get:function(){return this.properties.keepRatioOnAutoSize},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"toolboxSize",{get:function(){return this.properties.toolboxWidthToHeightRatio?new d.Size(this.defaultSize.width,this.defaultSize.width/this.properties.toolboxWidthToHeightRatio):this.defaultSize},enumerable:!1,configurable:!0}),I.prototype.getTextAngle=function(){return this.baseDescription&&this.baseDescription.getTextAngle()||C.prototype.getTextAngle.call(this)},I.prototype.getTitle=function(){return void 0!==this.title?this.title:C.prototype.getTitle.call(this)},I.prototype.getDefaultText=function(){return void 0!==this.defaultText?this.defaultText:C.prototype.getDefaultText.call(this)},I.prototype.getDefaultImageUrl=function(){return void 0!==this.defaultImageUrl?this.defaultImageUrl:C.prototype.getDefaultImageUrl.call(this)},I.prototype.allowResizeHorizontally=function(L){return!1!==this.properties.allowResize&&(this.baseDescription?this.baseDescription.allowResizeHorizontally(L):C.prototype.allowResizeHorizontally.call(this,L))},I.prototype.allowResizeVertically=function(L){return!1!==this.properties.allowResize&&(this.baseDescription?this.baseDescription.allowResizeVertically(L):C.prototype.allowResizeVertically.call(this,L))},I.prototype.createConnectionPoints=function(){return this.properties&&this.properties.connectionPoints&&this.properties.connectionPoints.length?this.properties.connectionPoints.map(function(L){if(L&&"number"==typeof L.x&&"number"==typeof L.y)return new s.ConnectionPoint(L.x,L.y,"number"==typeof L.side?L.side:a.ConnectionPointSide.Undefined)}).filter(function(L){return L}):C.prototype.createConnectionPoints.call(this)},I.prototype.getConnectionPointSides=function(){for(var L={},N=0;N<this.connectionPoints.length;N++){var G=h.ShapeDescription.getConnectionPointSideByGeometry(this.connectionPoints[N]);L[G]||(L[G]=[]),L[G].push(N)}return L},I.prototype.getConnectionPointIndexForSide=function(L){var N=this.getConnectionPointSides(),G=N[L];if(G){var k=Math.floor(G.length/2);return G.length%2==0&&k--,G[k]}return(G=N[(L+1)%4])?G[0]:(G=N[(L+3)%4])?G[G.length-1]:(G=N[(L+2)%4])?G[0]:L},I.prototype.createImagePrimitives=function(L,N){return this.baseDescription?this.baseDescription.createImagePrimitives(L,N):C.prototype.createImagePrimitives.call(this,L,N)},I.prototype.createShapePrimitives=function(L,N){var G=[],k=L.rectangle,U=k.x,B=k.y,K=k.width,J=k.height;if(this.baseDescription)G=this.baseDescription.createShapePrimitives(L,N);else{var ie=N&&this.svgToolboxImage?this.svgToolboxImage:this.svgImage;ie&&(G=G.concat([new T.ImagePrimitive(U+(this.properties.svgLeft&&!N?this.properties.svgLeft*K:0),B+(this.properties.svgTop&&!N?this.properties.svgTop*J:0),this.properties.svgWidth&&!N?this.properties.svgWidth*K:K,this.properties.svgHeight&&!N?this.properties.svgHeight*J:J,ie.exportUrl)]))}var Q=N&&this.properties.createToolboxTemplate||this.properties.createTemplate;if(Q){var te=U+(this.properties.templateLeft&&!N?this.properties.templateLeft*K:0),pe=B+(this.properties.templateTop&&!N?this.properties.templateTop*J:0),z=this.properties.templateWidth&&!N?this.properties.templateWidth*K:K,oe=this.properties.templateHeight&&!N?this.properties.templateHeight*J:J,ae=this.properties.apiController?this.properties.apiController.createNativeShape(L):L.toNative();G=G.concat([new w.SvgElementPrimitive(te,pe,z,oe,Q,this.properties.destroyTemplate,ae)])}return G},I.prototype.createParameters=function(L){return this.baseDescription?this.baseDescription.createParameters(L):C.prototype.createParameters.call(this,L)},I.prototype.normalizeParameters=function(L,N){this.baseDescription?this.baseDescription.normalizeParameters(L,N):C.prototype.normalizeParameters.call(this,L,N)},I.prototype.modifyParameters=function(L,N,G,k){this.baseDescription?this.baseDescription.modifyParameters(L,N,G,k):C.prototype.modifyParameters.call(this,L,N,G,k)},I.prototype.getParameterPoints=function(L){return this.baseDescription?this.baseDescription.getParameterPoints(L):C.prototype.getParameterPoints.call(this,L)},I.prototype.getTextRectangle=function(L){if(this.baseDescription)return this.baseDescription.getTextRectangle(L);var N=L.rectangle,U=N.width,B=N.height;return new y.Rectangle(N.x+(this.properties.textLeft?this.properties.textLeft*U:0),N.y+(this.properties.textTop?this.properties.textTop*B:0),this.properties.textWidth?this.properties.textWidth*U:U,this.properties.textHeight?this.properties.textHeight*B:B)},I.prototype.getSizeByText=function(L,N){if(this.baseDescription)return this.baseDescription.getSizeByText(L,N);var G=this.properties.textWidth;G||(G=1);var k=this.properties.textHeight;return k||(k=1),new d.Size(L.width/G,L.height/k)},I.prototype.getImageSize=function(L,N,G){return this.baseDescription?this.baseDescription instanceof u.ShapeWithImageDescription?this.baseDescription.getImageSize(L,N,G):d.Size.empty():new d.Size(this.properties.imageWidth?this.properties.imageWidth*L.width:L.width,this.properties.imageHeight?this.properties.imageHeight*L.height:L.height).nonNegativeSize()},I.prototype.getImagePlacementRectangle=function(L,N){if(this.baseDescription)return this.baseDescription instanceof u.ShapeWithImageDescription?this.baseDescription.getImagePlacementRectangle(L,N):y.Rectangle.fromGeometry(c.Point.zero(),d.Size.empty());var U=L.width,B=L.height;return new y.Rectangle(L.x+(this.properties.imageLeft&&!N?this.properties.imageLeft*U:0),L.y+(this.properties.imageTop&&!N?this.properties.imageTop*B:0),this.properties.imageWidth&&!N?this.properties.imageWidth*U:U,this.properties.imageHeight&&!N?this.properties.imageHeight*B:B)},I.prototype.updateSvgImage=function(L){var N=this.svgToolboxImage&&L.imageUrl&&L.imageUrl===this.properties.svgToolboxUrl,G=N?this.svgToolboxImage:this.svgImage;L.base64?G.loadBase64Content(L.base64):G.setUnableToLoadFlag(),N||this.raiseShapeDescriptionChanged(this)},I}(u.ShapeWithImageDescription);P.CustomShapeDescription=D},7552:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorShapeDescription=void 0;var T=b(2259),y=b(6353),d=b(6794),c=function(s){function a(){var u=s.call(this,!1)||this;return u.defaultSize=new y.Size(.5*d.ShapeDefaultDimension,.5*d.ShapeDefaultDimension),u}return S(a,s),Object.defineProperty(a.prototype,"key",{get:function(){return T.ShapeTypes.Connector},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),a}(b(7768).EllipseShapeDescription);P.ConnectorShapeDescription=c},4941:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.DataShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(3742),s=b(6794),a=function(u){function h(){return u.call(this,void 0,!0)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return y.ShapeTypes.Data},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.width,N=Math.min(Math.max(0,_.height/Math.tan(h.slopeAngle)),I),k=D-N;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(x+N,w),new d.PathPrimitiveLineToCommand(D,w),new d.PathPrimitiveLineToCommand(k,C),new d.PathPrimitiveLineToCommand(x,C),new d.PathPrimitiveClosePathCommand],g.style)]},h.prototype.processConnectionPoint=function(g,_){var x=g.size.height/Math.tan(h.slopeAngle),w=g.getConnectionPointSide(_);w===c.ConnectionPointSide.East?_.x-=x/2:w===c.ConnectionPointSide.West&&(_.x+=x/2)},h.prototype.getTextRectangle=function(g){var _=Math.min(Math.max(0,g.size.height/Math.tan(h.slopeAngle)),g.size.width);return g.rectangle.clone().moveRectangle(_,s.ShapeTextPadding).resize(2*-_,2*-s.ShapeTextPadding)},h.slopeAngle=81*Math.PI/180,h}(T.RectangleShapeDescription);P.DataShapeDescription=a},1034:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.DatabaseShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(418),s=function(a){function u(){var h=a.call(this,void 0,!0)||this;return h.defaultSize.width=h.defaultSize.height,h}return S(u,a),Object.defineProperty(u.prototype,"key",{get:function(){return y.ShapeTypes.Database},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),u.prototype.createShapePrimitives=function(h){var g=h.rectangle,_=g.x,x=g.y,w=g.right,D=g.bottom,I=g.center.x,L=g.height*u.arcWidthRatio;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(w,x+L/2),new d.PathPrimitiveLineToCommand(w,D-L/2),new d.PathPrimitiveArcToCommand((w-_)/2,L/2,0,!1,!0,_,D-L/2),new d.PathPrimitiveLineToCommand(_,x+L/2)],h.style),new c.EllipsePrimitive(I,x+L/2,(w-_)/2,L/2,h.style)]},u.prototype.getTextRectangle=function(h){var g=h.rectangle,_=g.height*u.arcWidthRatio;return g.clone().resize(0,-_).clone().moveRectangle(0,_)},u.arcWidthRatio=.2,u}(T.RectangleShapeDescription);P.DatabaseShapeDescription=s},6825:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.DecisionShapeDescription=void 0;var T=b(5303),y=b(2259),d=b(6353),c=b(6794),s=function(a){function u(){return a.call(this,new d.Size(c.ShapeDefaultDimension,.75*c.ShapeDefaultDimension),!0)||this}return S(u,a),Object.defineProperty(u.prototype,"key",{get:function(){return y.ShapeTypes.Decision},enumerable:!1,configurable:!0}),u}(T.DiamondShapeDescription);P.DecisionShapeDescription=s},9229:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.DelayShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(8675),s=b(6794),a=b(6353),u=function(h){function g(){var _=h.call(this,void 0,!0)||this;return _.defaultSize.width=_.defaultSize.height,_}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.Delay},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,L=x.center.x;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(w,D),new d.PathPrimitiveLineToCommand(L,D),new d.PathPrimitiveArcToCommand((C-w)/2,(I-D)/2,0,!1,!0,L,I),new d.PathPrimitiveLineToCommand(w,I),new d.PathPrimitiveClosePathCommand],_.style)]},g.prototype.getTextRectangle=function(_){var x=c.GeometryUtils.getMaxRectangleEnscribedInEllipse(_.size);return _.rectangle.clone().moveRectangle(s.ShapeTextPadding,s.ShapeTextPadding).setSize({width:x.width/2+_.size.width/2-s.ShapeTextPadding,height:x.height/2+_.size.height/2-s.ShapeTextPadding}).nonNegativeSize()},g.prototype.getSizeByText=function(_,x){var w=c.GeometryUtils.getEllipseByEnscribedRectangle(_);return new a.Size(w.width/2+_.width/2+s.ShapeTextPadding,w.height/2+_.height/2+s.ShapeTextPadding)},g.arcWidthRatio=.2,g}(T.RectangleShapeDescription);P.DelayShapeDescription=u},2650:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.DisplayShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(6794),s=function(a){function u(){return a.call(this,void 0,!0)||this}return S(u,a),Object.defineProperty(u.prototype,"key",{get:function(){return y.ShapeTypes.Display},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),u.prototype.createShapePrimitives=function(h){var g=h.rectangle,_=g.x,x=g.y,w=g.right,D=g.bottom,I=g.center.y,L=g.width*u.arcWidthRatio;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(w-L/2,x),new d.PathPrimitiveLineToCommand(_+L/2,x),new d.PathPrimitiveLineToCommand(_,I),new d.PathPrimitiveLineToCommand(_+L/2,D),new d.PathPrimitiveLineToCommand(w-L/2,D),new d.PathPrimitiveArcToCommand(L/2,(D-x)/2,0,!1,!1,w-L/2,x)],h.style)]},u.prototype.getTextRectangle=function(h){var g=h.size.width*u.arcWidthRatio;return h.rectangle.clone().moveRectangle(g/2,c.ShapeTextPadding).resize(-g,2*-c.ShapeTextPadding).nonNegativeSize()},u.arcWidthRatio=.2,u}(T.RectangleShapeDescription);P.DisplayShapeDescription=s},3525:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.DocumentShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(3742),s=function(a){function u(){return a.call(this,void 0,!0)||this}return S(u,a),Object.defineProperty(u.prototype,"key",{get:function(){return y.ShapeTypes.Document},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),u.prototype.createShapePrimitives=function(h){return this.createDocumentPrimitives(h.rectangle,h.style)},u.prototype.createDocumentPrimitives=function(h,g){var _=h.x,x=h.y,w=h.right,D=h.bottom,C=h.width,L=h.center.x,N=h.height*u.curveOffsetRatio;return[].concat([new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(_,x),new d.PathPrimitiveLineToCommand(w,x),new d.PathPrimitiveLineToCommand(w,D),new d.PathPrimitiveQuadraticCurveToCommand(w-.25*C,D-2*N,L,D-N),new d.PathPrimitiveQuadraticCurveToCommand(_+.25*C,D+N,_,D-N),new d.PathPrimitiveClosePathCommand],g)])},u.prototype.processConnectionPoint=function(h,g){h.getConnectionPointSide(g)===c.ConnectionPointSide.South&&(g.y-=h.size.height*u.curveOffsetRatio)},u.prototype.getTextRectangle=function(h){var g=h.rectangle;return g.clone().resize(0,-g.height*u.curveOffsetRatio)},u.curveOffsetRatio=.1,u}(T.RectangleShapeDescription);P.DocumentShapeDescription=s},1314:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.HardDiskShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(418),s=b(6794),a=b(6353),u=function(h){function g(){return h.call(this,void 0,!0)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.HardDisk},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,N=x.center.y,G=x.width*g.arcWidthRatio;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(C-G/2,D),new d.PathPrimitiveLineToCommand(w+G/2,D),new d.PathPrimitiveArcToCommand(G/2,(I-D)/2,0,!1,!1,w+G/2,I),new d.PathPrimitiveLineToCommand(C-G/2,I)],_.style),new c.EllipsePrimitive(C-G/2,N,G/2,(I-D)/2,_.style)]},g.prototype.getTextRectangle=function(_){var x=_.rectangle,w=x.width*g.arcWidthRatio*1.5;return x.clone().resize(-w-2*s.ShapeTextPadding,-2*s.ShapeTextPadding).moveRectangle(s.ShapeTextPadding,s.ShapeTextPadding).nonNegativeSize()},g.prototype.getSizeByText=function(_,x){return new a.Size((_.width+2*s.ShapeTextPadding)/(1-1.5*g.arcWidthRatio),x.size.height+s.ShapeTextPadding)},g.arcWidthRatio=.2,g}(T.RectangleShapeDescription);P.HardDiskShapeDescription=u},2751:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.InternalStorageShapeDescription=P.InternalStorageVerticalEdgeParameterName=P.InternalStorageHorizontalEdgeParameterName=void 0;var T=b(1561),y=b(2259),d=b(6629),c=b(1852),s=b(8900),a=b(7724);P.InternalStorageHorizontalEdgeParameterName="he",P.InternalStorageVerticalEdgeParameterName="ve";var u=function(h){function g(){return h.call(this,void 0,!0)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.InternalStorage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,L=w+_.parameters.get(P.InternalStorageHorizontalEdgeParameterName).value,N=D+_.parameters.get(P.InternalStorageVerticalEdgeParameterName).value;return h.prototype.createShapePrimitives.call(this,_).concat([new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(L,D),new a.PathPrimitiveLineToCommand(L,I),new a.PathPrimitiveMoveToCommand(w,N),new a.PathPrimitiveLineToCommand(C,N)],_.style)])},g.prototype.createParameters=function(_){_.addRangeIfNotExists([new d.ShapeParameter(P.InternalStorageHorizontalEdgeParameterName,.1*this.defaultSize.width),new d.ShapeParameter(P.InternalStorageVerticalEdgeParameterName,.1*this.defaultSize.width)])},g.prototype.normalizeParameters=function(_,x){this.changeParameterValue(x,P.InternalStorageHorizontalEdgeParameterName,function(w){return Math.max(g.minEdge,Math.min(.3*_.size.width,w.value))}),this.changeParameterValue(x,P.InternalStorageVerticalEdgeParameterName,function(w){return Math.max(g.minEdge,Math.min(.3*_.size.height,w.value))})},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,P.InternalStorageHorizontalEdgeParameterName,function(C){return C.value+w}),this.changeParameterValue(x,P.InternalStorageVerticalEdgeParameterName,function(C){return C.value+D}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new c.ShapeParameterPoint("c",new s.Point(_.normalizeX(_.position.x+_.parameters.get(P.InternalStorageHorizontalEdgeParameterName).value),_.normalizeY(_.position.y+_.parameters.get(P.InternalStorageVerticalEdgeParameterName).value)))]},g.prototype.getTextRectangle=function(_){var x=_.rectangle,w=_.parameters.get(P.InternalStorageHorizontalEdgeParameterName).value;return x.clone().resize(-w,0).clone().moveRectangle(w,0)},g.minEdge=72,g}(T.RectangleShapeDescription);P.InternalStorageShapeDescription=u},9144:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ManualInputShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(3742),s=b(6794),a=function(u){function h(){return u.call(this,void 0,!0)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return y.ShapeTypes.ManualInput},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(x,w+_.height*h.slopeHeightRatio),new d.PathPrimitiveLineToCommand(D,w),new d.PathPrimitiveLineToCommand(D,C),new d.PathPrimitiveLineToCommand(x,C),new d.PathPrimitiveClosePathCommand],g.style)]},h.prototype.processConnectionPoint=function(g,_){g.getConnectionPointSide(_)===c.ConnectionPointSide.North&&(_.y+=h.slopeHeightRatio/2*g.size.height)},h.prototype.getTextRectangle=function(g){var _=g.size.height*h.slopeHeightRatio;return g.rectangle.clone().moveRectangle(s.ShapeTextPadding,_).resize(2*-s.ShapeTextPadding,-_-s.ShapeTextPadding).nonNegativeSize()},h.slopeHeightRatio=.1,h}(T.RectangleShapeDescription);P.ManualInputShapeDescription=a},1643:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ManualOperationShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(3742),s=b(6794),a=function(u){function h(){return u.call(this,void 0,!0)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return y.ShapeTypes.ManualOperation},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=g.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,L=x.width,G=Math.min(Math.max(0,x.height/Math.tan(h.slopeAngle)),L),k=_.center.x,U=Math.min(w+G,k),B=Math.max(C-G,k);return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(w,D),new d.PathPrimitiveLineToCommand(C,D),new d.PathPrimitiveLineToCommand(B,I),new d.PathPrimitiveLineToCommand(U,I),new d.PathPrimitiveClosePathCommand],g.style)]},h.prototype.processConnectionPoint=function(g,_){var x=g.size.height/Math.tan(h.slopeAngle),w=g.getConnectionPointSide(_);w===c.ConnectionPointSide.East?_.x-=x/2:w===c.ConnectionPointSide.West&&(_.x+=x/2)},h.prototype.getTextRectangle=function(g){var _=Math.min(Math.max(0,g.size.height/Math.tan(h.slopeAngle)),g.size.width);return g.rectangle.clone().moveRectangle(_,s.ShapeTextPadding).resize(2*-_,2*-s.ShapeTextPadding).nonNegativeSize()},h.slopeAngle=81*Math.PI/180,h}(T.RectangleShapeDescription);P.ManualOperationShapeDescription=a},3046:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.MergeShapeDescription=void 0;var T=b(2259),y=b(8011),d=b(2117),c=b(7724),s=b(6794),a=b(6353),u=function(h){function g(){return h.call(this,!0)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return T.ShapeTypes.Merge},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,D=x.y,C=x.right,I=x.bottom;return[new c.PathPrimitive([new c.PathPrimitiveMoveToCommand(x.x,D),new c.PathPrimitiveLineToCommand(C,D),new c.PathPrimitiveLineToCommand(x.center.x,I),new c.PathPrimitiveClosePathCommand],_.style)]},g.prototype.calculateHeight=function(_){return.75*_},g.prototype.getTextRectangle=function(_){return y.Rectangle.fromGeometry(_.position.clone().offset(_.size.width/4,s.ShapeTextPadding),new a.Size(_.size.width/2,_.size.height/2-s.ShapeTextPadding))},g.prototype.getSizeByText=function(_,x){return new a.Size(2*_.width,2*(_.height+s.ShapeTextPadding))},g}(d.TriangleShapeDescription);P.MergeShapeDescription=u},2850:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.MultipleDocumentsShapeDescription=void 0;var T=b(2259),y=b(7724),d=b(3525),c=b(4593),s=b(3500),a=b(6794),u=b(6353),h=function(g){function _(){return null!==g&&g.apply(this,arguments)||this}return S(_,g),Object.defineProperty(_.prototype,"key",{get:function(){return T.ShapeTypes.MultipleDocuments},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),_.prototype.createShapePrimitives=function(x,w){var D=x.rectangle,C=x.rectangle,L=C.height,N=w?_.documentsOffsetRatioForToolbox:_.documentsOffsetRatio,G=Math.ceil(C.width*N),k=Math.ceil(L*N),U=(D=D.clone().inflate(-G,-k).clone().moveRectangle(-G,-k)).clone().moveRectangle(G,k),B=U.clone().moveRectangle(G,k),K=s.RenderUtils.generateSvgElementId("clipRect");return[].concat(this.createDocumentPrimitives(D,x.style,K+"1",U)).concat(this.createDocumentPrimitives(U,x.style,K+"2",B)).concat(this.createDocumentPrimitives(B,x.style))},_.prototype.createDocumentPrimitives=function(x,w,D,C){var I=x.x,L=x.y,N=x.right,G=x.bottom,k=x.width,B=x.center.x,K=x.height*d.DocumentShapeDescription.curveOffsetRatio,J=[];return J=J.concat([new y.PathPrimitive([new y.PathPrimitiveMoveToCommand(I,L),new y.PathPrimitiveLineToCommand(N,L),new y.PathPrimitiveLineToCommand(N,G),new y.PathPrimitiveQuadraticCurveToCommand(N-.25*k,G-2*K,B,G-K),new y.PathPrimitiveQuadraticCurveToCommand(I+.25*k,G+K,I,G-K),new y.PathPrimitiveClosePathCommand],w,void 0,C&&D)]),C&&D&&(J=J.concat([new c.ClipPathPrimitive(D,[new y.PathPrimitive([new y.PathPrimitiveMoveToCommand(I-w.strokeWidth,L-w.strokeWidth),new y.PathPrimitiveLineToCommand(N+w.strokeWidth,L-w.strokeWidth),new y.PathPrimitiveLineToCommand(N+w.strokeWidth,C.y),new y.PathPrimitiveLineToCommand(C.x,C.y),new y.PathPrimitiveLineToCommand(C.x,G+w.strokeWidth),new y.PathPrimitiveLineToCommand(I-w.strokeWidth,G+w.strokeWidth),new y.PathPrimitiveClosePathCommand])])])),J},_.prototype.getTextRectangle=function(x){var w=x.rectangle,D=w.width*_.documentsOffsetRatio,C=w.height*_.documentsOffsetRatio;return(w=w.clone().inflate(-D,-C).clone().moveRectangle(-D,-C)).clone().moveRectangle(2*D+a.ShapeTextPadding,2*C+a.ShapeTextPadding).clone().resize(-2*a.ShapeTextPadding,-w.height*d.DocumentShapeDescription.curveOffsetRatio-2*a.ShapeTextPadding)},_.prototype.getSizeByText=function(x,w){return new u.Size((x.width+2*a.ShapeTextPadding)/(1-2*_.documentsOffsetRatio),(x.height+2*a.ShapeTextPadding)/((1-d.DocumentShapeDescription.curveOffsetRatio)*(1-_.documentsOffsetRatio))).nonNegativeSize()},_.documentsOffsetRatio=.1,_.documentsOffsetRatioForToolbox=.16,_}(d.DocumentShapeDescription);P.MultipleDocumentsShapeDescription=h},2019:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.OrShapeDescription=void 0;var T=b(2259),y=b(6353),d=b(6794),c=b(7768),s=b(7724),a=function(u){function h(){var g=u.call(this,!0)||this;return g.defaultSize=new y.Size(.5*d.ShapeDefaultDimension,.5*d.ShapeDefaultDimension),g}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return T.ShapeTypes.Or},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"enableText",{get:function(){return!1},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.center,L=I.x,N=I.y;return[].concat(u.prototype.createShapePrimitives.call(this,g)).concat([new s.PathPrimitive([new s.PathPrimitiveMoveToCommand(L,w),new s.PathPrimitiveLineToCommand(L,C),new s.PathPrimitiveMoveToCommand(x,N),new s.PathPrimitiveLineToCommand(D,N)],g.style)])},h}(c.EllipseShapeDescription);P.OrShapeDescription=a},8110:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.PaperTapeShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(3742),s=b(6794),a=b(6353),u=function(h){function g(){return h.call(this,void 0,!0)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.PaperTape},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){return this.createDocumentPrimitives(_.rectangle,_.style)},g.prototype.createDocumentPrimitives=function(_,x){var w=_.x,D=_.y,C=_.right,I=_.bottom,L=_.width,G=_.center.x,k=_.height*g.curveOffsetRatio;return[].concat([new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(w,D),new d.PathPrimitiveQuadraticCurveToCommand(w+.25*L,D+2*k,G,D+k),new d.PathPrimitiveQuadraticCurveToCommand(C-.25*L,D-k,C,D+k),new d.PathPrimitiveLineToCommand(C,I),new d.PathPrimitiveQuadraticCurveToCommand(C-.25*L,I-2*k,G,I-k),new d.PathPrimitiveQuadraticCurveToCommand(w+.25*L,I+k,w,I-k),new d.PathPrimitiveClosePathCommand],x)])},g.prototype.processConnectionPoint=function(_,x){var w=_.getConnectionPointSide(x);w===c.ConnectionPointSide.North&&(x.y+=_.size.height*g.curveOffsetRatio),w===c.ConnectionPointSide.South&&(x.y-=_.size.height*g.curveOffsetRatio)},g.prototype.getTextRectangle=function(_){var x=_.rectangle;return x.clone().inflate(s.ShapeTextPadding,-x.height*g.curveOffsetRatio)},g.prototype.getSizeByText=function(_,x){return new a.Size(_.width+2*s.ShapeTextPadding,_.height/(1-2*g.curveOffsetRatio))},g.curveOffsetRatio=.1,g}(T.RectangleShapeDescription);P.PaperTapeShapeDescription=u},6508:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.PredefinedProcessShapeDescription=P.PredefinedProcessEdgeParameterName=void 0;var T=b(1561),y=b(2259),d=b(6629),c=b(1852),s=b(8900),a=b(7724);P.PredefinedProcessEdgeParameterName="e";var u=function(h){function g(){return h.call(this,void 0,!0)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.PredefinedProcess},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,D=x.y,C=x.right,I=x.bottom,L=x.x+_.parameters.get(P.PredefinedProcessEdgeParameterName).value,N=C-_.parameters.get(P.PredefinedProcessEdgeParameterName).value;return h.prototype.createShapePrimitives.call(this,_).concat([new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(L,D),new a.PathPrimitiveLineToCommand(L,I),new a.PathPrimitiveMoveToCommand(N,D),new a.PathPrimitiveLineToCommand(N,I)],_.style)])},g.prototype.createParameters=function(_){_.addIfNotExists(new d.ShapeParameter(P.PredefinedProcessEdgeParameterName,.1*this.defaultSize.width))},g.prototype.normalizeParameters=function(_,x){this.changeParameterValue(x,P.PredefinedProcessEdgeParameterName,function(w){return Math.max(g.minEdge,Math.min(.3*_.size.width,w.value))})},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,P.PredefinedProcessEdgeParameterName,function(C){return C.value+w}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new c.ShapeParameterPoint("c",new s.Point(_.normalizeX(_.position.x+_.parameters.get(P.PredefinedProcessEdgeParameterName).value),_.position.y))]},g.prototype.getTextRectangle=function(_){var x=_.rectangle,w=_.parameters.get(P.PredefinedProcessEdgeParameterName).value;return x.clone().resize(-2*w,0).clone().moveRectangle(w,0)},g.minEdge=72,g}(T.RectangleShapeDescription);P.PredefinedProcessShapeDescription=u},4112:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.PreparationShapeDescription=void 0;var T=b(2259),y=b(6353),d=b(6794),c=function(s){function a(){var u=s.call(this,!0)||this;return u.defaultSize=new y.Size(d.ShapeDefaultDimension,.75*d.ShapeDefaultDimension),u}return S(a,s),Object.defineProperty(a.prototype,"key",{get:function(){return T.ShapeTypes.Preparation},enumerable:!1,configurable:!0}),a}(b(2953).HexagonShapeDescription);P.PreparationShapeDescription=c},5331:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ProcessShapeDescription=void 0;var T=b(1561),y=b(2259),d=function(c){function s(){return c.call(this,void 0,!0)||this}return S(s,c),Object.defineProperty(s.prototype,"key",{get:function(){return y.ShapeTypes.Process},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),s}(T.RectangleShapeDescription);P.ProcessShapeDescription=d},4810:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.StoredDataShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(6794),s=b(6353),a=function(u){function h(){return u.call(this,void 0,!0)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return y.ShapeTypes.StoredData},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.width*h.arcWidthRatio;return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(D,w),new d.PathPrimitiveLineToCommand(x+I/2,w),new d.PathPrimitiveArcToCommand(I/2,(C-w)/2,0,!1,!1,x+I/2,C),new d.PathPrimitiveLineToCommand(D,C),new d.PathPrimitiveArcToCommand(I/2,(C-w)/2,0,!1,!0,D,w)],g.style)]},h.prototype.getTextRectangle=function(g){var _=g.rectangle,x=_.width*h.arcWidthRatio/2;return _.clone().resize(-x-2*c.ShapeTextPadding,-2*c.ShapeTextPadding).moveRectangle(c.ShapeTextPadding,c.ShapeTextPadding).nonNegativeSize()},h.prototype.getSizeByText=function(g,_){return new s.Size((g.width+2*c.ShapeTextPadding)/(1-h.arcWidthRatio/2),g.height+2*c.ShapeTextPadding)},h.arcWidthRatio=.2,h}(T.RectangleShapeDescription);P.StoredDataShapeDescription=a},6182:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.SummingJunctionShapeDescription=void 0;var T=b(2259),y=b(6353),d=b(6794),c=b(7768),s=b(7724),a=function(u){function h(){var g=u.call(this,!0)||this;return g.defaultSize=new y.Size(.5*d.ShapeDefaultDimension,.5*d.ShapeDefaultDimension),g}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return T.ShapeTypes.SummingJunction},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"enableText",{get:function(){return!1},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,D=_.center,C=D.x,I=D.y,L=_.width/2,N=_.height/2,G=Math.atan(N/L),k=1/Math.sqrt(1/Math.pow(L,2)+Math.pow(Math.tan(G),2)/Math.pow(N,2)),U=k*Math.tan(G);return[].concat(u.prototype.createShapePrimitives.call(this,g)).concat([new s.PathPrimitive([new s.PathPrimitiveMoveToCommand(C-k,I-U),new s.PathPrimitiveLineToCommand(C+k,I+U),new s.PathPrimitiveMoveToCommand(C-k,I+U),new s.PathPrimitiveLineToCommand(C+k,I-U)],g.style)])},h}(c.EllipseShapeDescription);P.SummingJunctionShapeDescription=a},6242:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.TerminatorShapeDescription=void 0;var T=b(1561),y=b(2259),d=b(7724),c=b(6353),s=b(6794),a=b(8011),u=b(8675),h=function(g){function _(){return g.call(this,new c.Size(s.ShapeDefaultDimension,.5*s.ShapeDefaultDimension),!0)||this}return S(_,g),Object.defineProperty(_.prototype,"key",{get:function(){return y.ShapeTypes.Terminator},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),_.prototype.createShapePrimitives=function(x){var w=x.rectangle,D=w.x,C=w.y,I=w.right,L=w.bottom,N=w.width,G=w.center.y,k=D+N*_.curveWidthRatio,U=D+N*(1-_.curveWidthRatio);return[new d.PathPrimitive([new d.PathPrimitiveMoveToCommand(k,C),new d.PathPrimitiveLineToCommand(U,C),new d.PathPrimitiveQuadraticCurveToCommand(I,C,I,G),new d.PathPrimitiveQuadraticCurveToCommand(I,L,U,L),new d.PathPrimitiveLineToCommand(k,L),new d.PathPrimitiveQuadraticCurveToCommand(D,L,D,G),new d.PathPrimitiveQuadraticCurveToCommand(D,C,k,C),new d.PathPrimitiveClosePathCommand],x.style)]},_.prototype.getTextRectangle=function(x){var w=u.GeometryUtils.getMaxRectangleEnscribedInEllipse(x.size);return a.Rectangle.fromGeometry(x.position.clone().offset((x.size.width-w.width)/2,(x.size.height-w.height)/2),w)},_.prototype.getSizeByText=function(x,w){return u.GeometryUtils.getEllipseByEnscribedRectangle(x)},_.curveWidthRatio=.3,_}(T.RectangleShapeDescription);P.TerminatorShapeDescription=h},4958:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowDownShapeDescription=void 0;var T=b(7724),y=b(1852),d=b(8900),c=b(731),s=b(2259),a=b(3742),u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return s.ShapeTypes.ArrowDown},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,N=x.height,G=x.center.x,k=(x.width-_.parameters.get(c.ArrowVerticalLineWidthParameterName).value)/2,U=N-_.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value,B=_.normalizeX(w+k),K=_.normalizeY(D+U),J=_.normalizeX(C-k);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(B,D),new T.PathPrimitiveLineToCommand(J,D),new T.PathPrimitiveLineToCommand(J,K),new T.PathPrimitiveLineToCommand(C,K),new T.PathPrimitiveLineToCommand(G,I),new T.PathPrimitiveLineToCommand(w,K),new T.PathPrimitiveLineToCommand(B,K),new T.PathPrimitiveClosePathCommand],_.style)]},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,c.ArrowVerticalTriangleHeightParameterName,function(C){return C.value-D}),this.changeParameterValue(x,c.ArrowVerticalLineWidthParameterName,function(C){return C.value-2*w}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new y.ShapeParameterPoint("c",new d.Point(_.normalizeX(_.position.x+(_.size.width-_.parameters.get(c.ArrowVerticalLineWidthParameterName).value)/2),_.normalizeY(_.position.y+_.size.height-_.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value)))]},g.prototype.processConnectionPoint=function(_,x){var w=_.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value;if(x.y>_.position.y+_.size.height-w){var C=_.size.width/2/w*(x.y-(_.position.y+_.size.height-w)),I=_.getConnectionPointSide(x);I===a.ConnectionPointSide.East?x.x-=C:I===a.ConnectionPointSide.West&&(x.x+=C)}else h.prototype.processConnectionPoint.call(this,_,x)},g}(c.ArrowVerticalShapeDescription);P.ArrowDownShapeDescription=u},4493:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowHorizontalShapeDescription=P.ArrowVerticalLineHeightParameterName=P.ArrowVerticalTriangleWidthParameterName=void 0;var T=b(6794),y=b(6353),d=b(6629),c=b(3742);P.ArrowVerticalTriangleWidthParameterName="tw",P.ArrowVerticalLineHeightParameterName="lh";var s=function(a){function u(){return a.call(this,new y.Size(T.ShapeDefaultDimension,.375*T.ShapeDefaultDimension))||this}return S(u,a),Object.defineProperty(u.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),u.prototype.createParameters=function(h){h.addRangeIfNotExists([new d.ShapeParameter(P.ArrowVerticalTriangleWidthParameterName,Math.sqrt(Math.pow(this.defaultSize.height,2)-Math.pow(this.defaultSize.height/2,2))),new d.ShapeParameter(P.ArrowVerticalLineHeightParameterName,this.defaultSize.height/3)])},u.prototype.normalizeParameters=function(h,g){this.changeParameterValue(g,P.ArrowVerticalTriangleWidthParameterName,function(_){return Math.max(0,Math.min(h.size.width,_.value))}),this.changeParameterValue(g,P.ArrowVerticalLineHeightParameterName,function(_){return Math.max(0,Math.min(h.size.height,_.value))})},u.prototype.processConnectionPoint=function(h,g){var _=(h.size.height-h.parameters.get(P.ArrowVerticalLineHeightParameterName).value)/2,x=h.getConnectionPointSide(g);x===c.ConnectionPointSide.North?g.y+=_:x===c.ConnectionPointSide.South&&(g.y-=_)},u.prototype.getTextRectangle=function(h){return h.rectangle.clone().inflate(-T.ShapeTextPadding,-T.ShapeTextPadding)},u.prototype.getSizeByText=function(h,g){return h.clone().offset(2*T.ShapeTextPadding,2*T.ShapeTextPadding)},u}(T.ShapeDescription);P.ArrowHorizontalShapeDescription=s},8800:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowLeftRightShapeDescription=void 0;var T=b(7724),y=b(4493),d=b(1852),c=b(8900),s=b(2259),a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return s.ShapeTypes.ArrowLeftRight},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.height,L=_.center.y,N=g.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value,G=(I-g.parameters.get(y.ArrowVerticalLineHeightParameterName).value)/2,k=g.normalizeX(x+N),U=g.normalizeY(w+G),B=g.normalizeX(D-N),K=g.normalizeY(C-G);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(x,L),new T.PathPrimitiveLineToCommand(k,w),new T.PathPrimitiveLineToCommand(k,U),new T.PathPrimitiveLineToCommand(B,U),new T.PathPrimitiveLineToCommand(B,w),new T.PathPrimitiveLineToCommand(D,L),new T.PathPrimitiveLineToCommand(B,C),new T.PathPrimitiveLineToCommand(B,K),new T.PathPrimitiveLineToCommand(k,K),new T.PathPrimitiveLineToCommand(k,C),new T.PathPrimitiveClosePathCommand],g.style)]},h.prototype.normalizeParameters=function(g,_){this.changeParameterValue(_,y.ArrowVerticalTriangleWidthParameterName,function(x){return Math.max(0,Math.min(g.size.width/2-2*g.strokeWidth,x.value))}),this.changeParameterValue(_,y.ArrowVerticalLineHeightParameterName,function(x){return Math.max(0,Math.min(g.size.height,x.value))})},h.prototype.modifyParameters=function(g,_,x,w){this.changeParameterValue(_,y.ArrowVerticalTriangleWidthParameterName,function(D){return D.value+x}),this.changeParameterValue(_,y.ArrowVerticalLineHeightParameterName,function(D){return D.value-2*w}),this.normalizeParameters(g,_)},h.prototype.getParameterPoints=function(g){return[new d.ShapeParameterPoint("c",new c.Point(g.normalizeX(g.position.x+g.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value),g.normalizeY(g.position.y+(g.size.height-g.parameters.get(y.ArrowVerticalLineHeightParameterName).value)/2)))]},h}(y.ArrowHorizontalShapeDescription);P.ArrowLeftRightShapeDescription=a},6023:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowLeftShapeDescription=void 0;var T=b(7724),y=b(4493),d=b(1852),c=b(8900),s=b(2259),a=b(3742),u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return s.ShapeTypes.ArrowLeft},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,L=x.height,N=x.center.y,G=_.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value,k=(L-_.parameters.get(y.ArrowVerticalLineHeightParameterName).value)/2,U=_.normalizeX(w+G),B=_.normalizeY(D+k),K=_.normalizeY(I-k);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(w,N),new T.PathPrimitiveLineToCommand(U,D),new T.PathPrimitiveLineToCommand(U,B),new T.PathPrimitiveLineToCommand(C,B),new T.PathPrimitiveLineToCommand(C,K),new T.PathPrimitiveLineToCommand(U,K),new T.PathPrimitiveLineToCommand(U,I),new T.PathPrimitiveClosePathCommand],_.style)]},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,y.ArrowVerticalTriangleWidthParameterName,function(C){return C.value+w}),this.changeParameterValue(x,y.ArrowVerticalLineHeightParameterName,function(C){return C.value-2*D}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new d.ShapeParameterPoint("c",new c.Point(_.normalizeX(_.position.x+_.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value),_.normalizeY(_.position.y+(_.size.height-_.parameters.get(y.ArrowVerticalLineHeightParameterName).value)/2)))]},g.prototype.processConnectionPoint=function(_,x){var w=_.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value;if(x.x<_.position.x+w){var C=_.size.height/2/w*(_.position.x+w-x.x),I=_.getConnectionPointSide(x);I===a.ConnectionPointSide.North?x.y+=C:I===a.ConnectionPointSide.South&&(x.y-=C)}else h.prototype.processConnectionPoint.call(this,_,x)},g}(y.ArrowHorizontalShapeDescription);P.ArrowLeftShapeDescription=u},6599:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowRightShapeDescription=void 0;var T=b(7724),y=b(4493),d=b(1852),c=b(8900),s=b(2259),a=b(3742),u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return s.ShapeTypes.ArrowRight},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,N=x.height,G=x.center.y,k=x.width-_.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value,U=(N-_.parameters.get(y.ArrowVerticalLineHeightParameterName).value)/2,B=_.normalizeX(w+k),K=_.normalizeY(D+U),J=_.normalizeY(I-U);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(w,K),new T.PathPrimitiveLineToCommand(B,K),new T.PathPrimitiveLineToCommand(B,D),new T.PathPrimitiveLineToCommand(C,G),new T.PathPrimitiveLineToCommand(B,I),new T.PathPrimitiveLineToCommand(B,J),new T.PathPrimitiveLineToCommand(w,J),new T.PathPrimitiveClosePathCommand],_.style)]},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,y.ArrowVerticalTriangleWidthParameterName,function(C){return C.value-w}),this.changeParameterValue(x,y.ArrowVerticalLineHeightParameterName,function(C){return C.value-2*D}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new d.ShapeParameterPoint("c",new c.Point(_.normalizeX(_.position.x+_.size.width-_.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value),_.normalizeY(_.position.y+(_.size.height-_.parameters.get(y.ArrowVerticalLineHeightParameterName).value)/2)))]},g.prototype.processConnectionPoint=function(_,x){var w=_.parameters.get(y.ArrowVerticalTriangleWidthParameterName).value;if(x.x>_.position.x+_.size.width-w){var C=_.size.height/2/w*(x.x-(_.position.x+_.size.width-w)),I=_.getConnectionPointSide(x);I===a.ConnectionPointSide.North?x.y+=C:I===a.ConnectionPointSide.South&&(x.y-=C)}else h.prototype.processConnectionPoint.call(this,_,x)},g}(y.ArrowHorizontalShapeDescription);P.ArrowRightShapeDescription=u},9089:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowUpDownShapeDescription=void 0;var T=b(7724),y=b(1852),d=b(8900),c=b(731),s=b(2259),a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return s.ShapeTypes.ArrowUpDown},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,L=_.center.x,N=(_.width-g.parameters.get(c.ArrowVerticalLineWidthParameterName).value)/2,G=g.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value,k=g.normalizeX(x+N),U=g.normalizeY(w+G),B=g.normalizeX(D-N),K=g.normalizeY(C-G);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(L,w),new T.PathPrimitiveLineToCommand(D,U),new T.PathPrimitiveLineToCommand(B,U),new T.PathPrimitiveLineToCommand(B,K),new T.PathPrimitiveLineToCommand(D,K),new T.PathPrimitiveLineToCommand(L,C),new T.PathPrimitiveLineToCommand(x,K),new T.PathPrimitiveLineToCommand(k,K),new T.PathPrimitiveLineToCommand(k,U),new T.PathPrimitiveLineToCommand(x,U),new T.PathPrimitiveClosePathCommand],g.style)]},h.prototype.normalizeParameters=function(g,_){this.changeParameterValue(_,c.ArrowVerticalTriangleHeightParameterName,function(x){return Math.max(0,Math.min(g.size.height/2-2*g.strokeWidth,x.value))}),this.changeParameterValue(_,c.ArrowVerticalLineWidthParameterName,function(x){return Math.max(0,Math.min(g.size.width,x.value))})},h.prototype.modifyParameters=function(g,_,x,w){this.changeParameterValue(_,c.ArrowVerticalTriangleHeightParameterName,function(D){return D.value+w}),this.changeParameterValue(_,c.ArrowVerticalLineWidthParameterName,function(D){return D.value-2*x}),this.normalizeParameters(g,_)},h.prototype.getParameterPoints=function(g){return[new y.ShapeParameterPoint("c",new d.Point(g.normalizeX(g.position.x+(g.size.width-g.parameters.get(c.ArrowVerticalLineWidthParameterName).value)/2),g.normalizeY(g.position.y+g.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value)))]},h}(c.ArrowVerticalShapeDescription);P.ArrowUpDownShapeDescription=a},8327:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowUpShapeDescription=void 0;var T=b(7724),y=b(1852),d=b(8900),c=b(731),s=b(2259),a=b(3742),u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return s.ShapeTypes.ArrowUp},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,N=x.center.x,G=(x.width-_.parameters.get(c.ArrowVerticalLineWidthParameterName).value)/2,k=_.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value,U=_.normalizeX(w+G),B=_.normalizeY(D+k),K=_.normalizeX(C-G);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(N,D),new T.PathPrimitiveLineToCommand(C,B),new T.PathPrimitiveLineToCommand(K,B),new T.PathPrimitiveLineToCommand(K,I),new T.PathPrimitiveLineToCommand(U,I),new T.PathPrimitiveLineToCommand(U,B),new T.PathPrimitiveLineToCommand(w,B),new T.PathPrimitiveClosePathCommand],_.style)]},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,c.ArrowVerticalTriangleHeightParameterName,function(C){return C.value+D}),this.changeParameterValue(x,c.ArrowVerticalLineWidthParameterName,function(C){return C.value-2*w}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new y.ShapeParameterPoint("c",new d.Point(_.normalizeX(_.position.x+(_.size.width-_.parameters.get(c.ArrowVerticalLineWidthParameterName).value)/2),_.normalizeY(_.position.y+_.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value)))]},g.prototype.processConnectionPoint=function(_,x){var w=_.parameters.get(c.ArrowVerticalTriangleHeightParameterName).value;if(x.y<_.position.y+w){var C=_.size.width/2/w*(_.position.y+w-x.y),I=_.getConnectionPointSide(x);I===a.ConnectionPointSide.East?x.x-=C:I===a.ConnectionPointSide.West&&(x.x+=C)}else h.prototype.processConnectionPoint.call(this,_,x)},g}(c.ArrowVerticalShapeDescription);P.ArrowUpShapeDescription=u},731:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.ArrowVerticalShapeDescription=P.ArrowVerticalLineWidthParameterName=P.ArrowVerticalTriangleHeightParameterName=void 0;var T=b(6794),y=b(6353),d=b(6629),c=b(3742);P.ArrowVerticalTriangleHeightParameterName="th",P.ArrowVerticalLineWidthParameterName="lw";var s=function(a){function u(){return a.call(this,new y.Size(.375*T.ShapeDefaultDimension,T.ShapeDefaultDimension))||this}return S(u,a),Object.defineProperty(u.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),u.prototype.createParameters=function(h){h.addRangeIfNotExists([new d.ShapeParameter(P.ArrowVerticalTriangleHeightParameterName,Math.sqrt(Math.pow(this.defaultSize.width,2)-Math.pow(this.defaultSize.width/2,2))),new d.ShapeParameter(P.ArrowVerticalLineWidthParameterName,this.defaultSize.width/3)])},u.prototype.normalizeParameters=function(h,g){this.changeParameterValue(g,P.ArrowVerticalTriangleHeightParameterName,function(_){return Math.max(0,Math.min(h.size.height,_.value))}),this.changeParameterValue(g,P.ArrowVerticalLineWidthParameterName,function(_){return Math.max(0,Math.min(h.size.width,_.value))})},u.prototype.processConnectionPoint=function(h,g){var _=(h.size.width-h.parameters.get(P.ArrowVerticalLineWidthParameterName).value)/2,x=h.getConnectionPointSide(g);x===c.ConnectionPointSide.East?g.x-=_:x===c.ConnectionPointSide.West&&(g.x+=_)},u.prototype.getTextRectangle=function(h){return h.rectangle.clone().inflate(-T.ShapeTextPadding,-T.ShapeTextPadding)},u.prototype.getSizeByText=function(h,g){return h.clone().offset(2*T.ShapeTextPadding,2*T.ShapeTextPadding)},u}(T.ShapeDescription);P.ArrowVerticalShapeDescription=s},2281:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.CrossShapeDescription=P.CrossVerticalWidthParameterName=P.CrossHorizontalWidthParameterName=void 0;var T=b(6794),y=b(8900),d=b(6629),c=b(1852),s=b(7724),a=b(2259);P.CrossHorizontalWidthParameterName="chw",P.CrossVerticalWidthParameterName="cvw";var u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return a.ShapeTypes.Cross},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,N=x.height,G=(x.width-_.parameters.get(P.CrossHorizontalWidthParameterName).value)/2,k=(N-_.parameters.get(P.CrossVerticalWidthParameterName).value)/2,U=_.normalizeX(w+G),B=_.normalizeY(D+k),K=_.normalizeX(C-G),J=_.normalizeY(I-k);return[new s.PathPrimitive([new s.PathPrimitiveMoveToCommand(w,B),new s.PathPrimitiveLineToCommand(U,B),new s.PathPrimitiveLineToCommand(U,D),new s.PathPrimitiveLineToCommand(K,D),new s.PathPrimitiveLineToCommand(K,B),new s.PathPrimitiveLineToCommand(C,B),new s.PathPrimitiveLineToCommand(C,J),new s.PathPrimitiveLineToCommand(K,J),new s.PathPrimitiveLineToCommand(K,I),new s.PathPrimitiveLineToCommand(U,I),new s.PathPrimitiveLineToCommand(U,J),new s.PathPrimitiveLineToCommand(w,J),new s.PathPrimitiveClosePathCommand],_.style)]},g.prototype.createParameters=function(_){_.addRangeIfNotExists([new d.ShapeParameter(P.CrossHorizontalWidthParameterName,.2*this.defaultSize.width),new d.ShapeParameter(P.CrossVerticalWidthParameterName,.2*this.defaultSize.height)])},g.prototype.normalizeParameters=function(_,x){this.changeParameterValue(x,P.CrossHorizontalWidthParameterName,function(w){return Math.max(0,Math.min(_.size.width,w.value))}),this.changeParameterValue(x,P.CrossVerticalWidthParameterName,function(w){return Math.max(0,Math.min(_.size.height,w.value))})},g.prototype.modifyParameters=function(_,x,w,D){this.changeParameterValue(x,P.CrossHorizontalWidthParameterName,function(C){return C.value-2*w}),this.changeParameterValue(x,P.CrossVerticalWidthParameterName,function(C){return C.value-2*D}),this.normalizeParameters(_,x)},g.prototype.getParameterPoints=function(_){return[new c.ShapeParameterPoint("c",new y.Point(_.normalizeX(_.position.x+(_.size.width-_.parameters.get(P.CrossHorizontalWidthParameterName).value)/2),_.normalizeY(_.position.y+(_.size.height-_.parameters.get(P.CrossVerticalWidthParameterName).value)/2)))]},g.prototype.getTextRectangle=function(_){return _.rectangle.clone().inflate(-T.ShapeTextPadding,-T.ShapeTextPadding)},g.prototype.getSizeByText=function(_,x){return _.clone().offset(2*T.ShapeTextPadding,2*T.ShapeTextPadding)},g}(T.ShapeDescription);P.CrossShapeDescription=u},5303:function(o,P,b){var f,S=this&&this.__extends||(f=function(s,a){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var g in h)h.hasOwnProperty(g)&&(u[g]=h[g])})(s,a)},function(s,a){function u(){this.constructor=s}f(s,a),s.prototype=null===a?Object.create(a):(u.prototype=a.prototype,new u)});Object.defineProperty(P,"__esModule",{value:!0}),P.DiamondShapeDescription=void 0;var T=b(6794),y=b(7724),d=b(2259),c=function(s){function a(u,h){return void 0===u&&(u=T.ShapeDefaultSize.clone()),s.call(this,u,h)||this}return S(a,s),Object.defineProperty(a.prototype,"key",{get:function(){return d.ShapeTypes.Diamond},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),a.prototype.createShapePrimitives=function(u){var h=u.rectangle,g=h.x,x=h.right,w=h.bottom,D=h.center,C=D.x,I=D.y;return[new y.PathPrimitive([new y.PathPrimitiveMoveToCommand(C,h.y),new y.PathPrimitiveLineToCommand(x,I),new y.PathPrimitiveLineToCommand(C,w),new y.PathPrimitiveLineToCommand(g,I),new y.PathPrimitiveClosePathCommand],u.style)]},a.prototype.getTextRectangle=function(u){return u.rectangle.clone().inflate(-u.size.width/4,-u.size.height/4)},a.prototype.getSizeByText=function(u,h){return u.clone().multiply(2,2)},a}(T.ShapeDescription);P.DiamondShapeDescription=c},7768:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.EllipseShapeDescription=void 0;var T=b(6794),y=b(6353),d=b(418),c=b(2259),s=b(8675),a=b(8011),u=function(h){function g(_){return h.call(this,new y.Size(T.ShapeDefaultDimension,.75*T.ShapeDefaultDimension),_)||this}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return c.ShapeTypes.Ellipse},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.getTextRectangle=function(_){var x=s.GeometryUtils.getMaxRectangleEnscribedInEllipse(_.size);return a.Rectangle.fromGeometry(_.position.clone().offset((_.size.width-x.width)/2,(_.size.height-x.height)/2),x)},g.prototype.getSizeByText=function(_,x){return s.GeometryUtils.getEllipseByEnscribedRectangle(_)},g.prototype.createShapePrimitives=function(_){var x=_.rectangle,C=x.center;return[new d.EllipsePrimitive(C.x,C.y,x.width/2,x.height/2,_.style)]},g}(T.ShapeDescription);P.EllipseShapeDescription=u},8628:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.HeartShapeDescription=void 0;var T=b(6794),y=b(7724),d=b(2259),c=b(7228),s=b(3742),a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return d.ShapeTypes.Heart},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),h.prototype.createConnectionPoints=function(){return[new c.ConnectionPoint(.5,.15,s.ConnectionPointSide.North),new c.ConnectionPoint(1,.25,s.ConnectionPointSide.East),new c.ConnectionPoint(.5,1,s.ConnectionPointSide.South),new c.ConnectionPoint(0,.25,s.ConnectionPointSide.West)]},h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.width,L=_.height;return[new y.PathPrimitive([new y.PathPrimitiveMoveToCommand(D-.25*I,w),new y.PathPrimitiveCubicCurveToCommand(D-.15*I,w,D,w+.1*L,D,w+.25*L),new y.PathPrimitiveCubicCurveToCommand(D,w+.3*L,D-.02*I,w+.35*L,D-.05*I,w+.4*L),new y.PathPrimitiveLineToCommand(_.center.x,C),new y.PathPrimitiveLineToCommand(x+.05*I,w+.4*L),new y.PathPrimitiveCubicCurveToCommand(x+.02*I,w+.35*L,x,w+.3*L,x,w+.25*L),new y.PathPrimitiveCubicCurveToCommand(x,w+.1*L,x+.15*I,w,x+.25*I,w),new y.PathPrimitiveCubicCurveToCommand(x+.3*I,w,x+.45*I,w+.03*L,x+.5*I,w+.15*L),new y.PathPrimitiveCubicCurveToCommand(D-.45*I,w+.03*L,D-.3*I,w,D-.25*I,w),new y.PathPrimitiveClosePathCommand],g.style)]},h.prototype.getTextRectangle=function(g){return g.rectangle.clone().inflate(-T.ShapeTextPadding,-T.ShapeTextPadding)},h.prototype.getSizeByText=function(g,_){return _.size.clone().offset(2*T.ShapeTextPadding,2*T.ShapeTextPadding)},h}(T.ShapeDescription);P.HeartShapeDescription=a},2953:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.HexagonShapeDescription=void 0;var T=b(7724),y=b(2259),d=b(7314),c=b(8675),s=b(8011),a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return y.ShapeTypes.Hexagon},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"angleCount",{get:function(){return 6},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.width,L=_.center.y,N=Math.PI-this.angle,G=I/(1+2*Math.cos(N)),k=x+(I-G)/2,U=k+G;return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(k,w),new T.PathPrimitiveLineToCommand(U,w),new T.PathPrimitiveLineToCommand(D,L),new T.PathPrimitiveLineToCommand(U,C),new T.PathPrimitiveLineToCommand(k,C),new T.PathPrimitiveLineToCommand(x,L),new T.PathPrimitiveClosePathCommand],g.style)]},h.prototype.calculateHeight=function(g){var _=Math.PI-this.angle;return g/(1+2*Math.cos(_))*2*Math.sin(_)},h.prototype.getTextRectangle=function(g){var _=c.GeometryUtils.getMaxRectangleEnscribedInEllipse(g.size);return s.Rectangle.fromGeometry(g.position.clone().offset((g.size.width-_.width)/2,(g.size.height-_.height)/2),_)},h.prototype.getSizeByText=function(g,_){return c.GeometryUtils.getEllipseByEnscribedRectangle(g)},h}(d.PolygonShapeDescription);P.HexagonShapeDescription=a},1412:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.OctagonShapeDescription=void 0;var T=b(7724),y=b(2259),d=b(7314),c=b(8675),s=b(8011),a=function(u){function h(){return null!==u&&u.apply(this,arguments)||this}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return y.ShapeTypes.Octagon},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"angleCount",{get:function(){return 8},enumerable:!1,configurable:!0}),h.prototype.createShapePrimitives=function(g){var _=g.rectangle,x=_.x,w=_.y,D=_.right,C=_.bottom,I=_.width,L=_.height,N=Math.PI-this.angle,G=I/(1+2*Math.cos(N)),k=L/(1+2*Math.cos(N)),U=x+(I-G)/2,B=U+G,K=w+(L-k)/2,J=K+k;return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(U,w),new T.PathPrimitiveLineToCommand(B,w),new T.PathPrimitiveLineToCommand(D,K),new T.PathPrimitiveLineToCommand(D,J),new T.PathPrimitiveLineToCommand(B,C),new T.PathPrimitiveLineToCommand(U,C),new T.PathPrimitiveLineToCommand(x,J),new T.PathPrimitiveLineToCommand(x,K),new T.PathPrimitiveClosePathCommand],g.style)]},h.prototype.calculateHeight=function(g){return g},h.prototype.getTextRectangle=function(g){var _=c.GeometryUtils.getMaxRectangleEnscribedInEllipse(g.size);return s.Rectangle.fromGeometry(g.position.clone().offset((g.size.width-_.width)/2,(g.size.height-_.height)/2),_)},h.prototype.getSizeByText=function(g,_){return c.GeometryUtils.getEllipseByEnscribedRectangle(g)},h}(d.PolygonShapeDescription);P.OctagonShapeDescription=a},8761:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.PentagonShapeDescription=void 0;var T=b(7724),y=b(2259),d=b(7314),c=b(3742),s=b(8675),a=b(8011),u=function(h){function g(_){var x=h.call(this,_)||this;return x.defaultRatio=x.defaultSize.height/x.defaultSize.width,x}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.Pentagon},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"angleCount",{get:function(){return 5},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_){var x=_.rectangle,w=x.x,D=x.y,C=x.right,I=x.bottom,L=x.width,N=x.height,G=x.center.x,k=N/L/this.defaultRatio,U=Math.PI-this.angle,B=L/2*Math.tan(U/2)*k,K=D+B,J=(N-B)/Math.tan(U)/k,ie=w+J,re=C-J;return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(G,D),new T.PathPrimitiveLineToCommand(C,K),new T.PathPrimitiveLineToCommand(re,I),new T.PathPrimitiveLineToCommand(ie,I),new T.PathPrimitiveLineToCommand(w,K),new T.PathPrimitiveClosePathCommand],_.style)]},g.prototype.processConnectionPoint=function(_,x){var w=_.getConnectionPointSide(x);if(w===c.ConnectionPointSide.East||w===c.ConnectionPointSide.West){var D=_.rectangle,I=D.width,L=D.height/I/this.defaultRatio,N=Math.PI-this.angle,G=D.y+I/2*Math.tan(N/2)*L;(w===c.ConnectionPointSide.East||w===c.ConnectionPointSide.West)&&(x.y=G)}},g.prototype.calculateHeight=function(_){var x=Math.PI-this.angle;return _/2*Math.tan(x/2)+_/2/Math.cos(x/2)*Math.sin(x)},g.prototype.getTextRectangle=function(_){var x=s.GeometryUtils.getMaxRectangleEnscribedInEllipse(_.size);return a.Rectangle.fromGeometry(_.position.clone().offset((_.size.width-x.width)/2,(_.size.height-x.height)/2),x)},g.prototype.getSizeByText=function(_,x){return s.GeometryUtils.getEllipseByEnscribedRectangle(_)},g}(d.PolygonShapeDescription);P.PentagonShapeDescription=u},7314:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.PolygonShapeDescription=void 0;var T=b(6794),y=function(d){function c(s){var a=d.call(this,void 0,s)||this;return a.defaultSize.height=a.calculateHeight(T.ShapeDefaultDimension),a}return S(c,d),Object.defineProperty(c.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"angle",{get:function(){return Math.PI*(this.angleCount-2)/this.angleCount},enumerable:!1,configurable:!0}),c}(T.ShapeDescription);P.PolygonShapeDescription=y},1561:function(o,P,b){var f,S=this&&this.__extends||(f=function(a,u){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var _ in g)g.hasOwnProperty(_)&&(h[_]=g[_])})(a,u)},function(a,u){function h(){this.constructor=a}f(a,u),a.prototype=null===u?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(P,"__esModule",{value:!0}),P.RectangleShapeDescription=void 0;var T=b(6794),y=b(6353),d=b(4716),c=b(2259),s=function(a){function u(h,g){return void 0===h&&(h=new y.Size(T.ShapeDefaultDimension,.75*T.ShapeDefaultDimension)),a.call(this,h,g)||this}return S(u,a),Object.defineProperty(u.prototype,"key",{get:function(){return c.ShapeTypes.Rectangle},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),u.prototype.createShapePrimitives=function(h){var g=h.rectangle;return[new d.RectanglePrimitive(g.x,g.y,g.width,g.height,h.style)]},u.prototype.getTextRectangle=function(h){return h.rectangle.clone().inflate(-T.ShapeTextPadding,-T.ShapeTextPadding)},u.prototype.getSizeByText=function(h,g){return h.clone().offset(2*T.ShapeTextPadding,2*T.ShapeTextPadding)},u}(T.ShapeDescription);P.RectangleShapeDescription=s},8772:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.StarShapeDescription=P.StarConvexParameterName=void 0;var T=b(7724),y=b(2259),d=b(8761),c=b(6629),s=b(1852),a=b(8900),u=b(3742);P.StarConvexParameterName="sc";var h=function(g){function _(){return null!==g&&g.apply(this,arguments)||this}return S(_,g),Object.defineProperty(_.prototype,"key",{get:function(){return y.ShapeTypes.Star},enumerable:!1,configurable:!0}),_.prototype.createShapePrimitives=function(x){var w=x.rectangle,D=w.x,C=w.y,I=w.right,L=w.width,N=w.height,G=this.getActualBottom(C,w.bottom,L,N),k=w.center.x,U=C+(G-C)/2,B=N/L,K=Math.PI-this.angle,J=L/2*Math.tan(K/2)*B,ie=C+J,re=(N-J)/Math.tan(K)/B,q=D+re,Y=I-re,Z=x.parameters.get(P.StarConvexParameterName).value,Q=this.getInnerPointDistance(k,k,I,U,C,ie);return[new T.PathPrimitive([new T.PathPrimitiveMoveToCommand(k,C),new T.PathPrimitiveLineToCommand(this.getInnerPointPos(k,k,I,Z,Q),this.getInnerPointPos(U,C,ie,Z,Q)),new T.PathPrimitiveLineToCommand(I,ie),new T.PathPrimitiveLineToCommand(this.getInnerPointPos(k,I,Y,Z,Q),this.getInnerPointPos(U,ie,G,Z,Q)),new T.PathPrimitiveLineToCommand(Y,G),new T.PathPrimitiveLineToCommand(this.getInnerPointPos(k,Y,q,Z,Q),this.getInnerPointPos(U,G,G,Z,Q)),new T.PathPrimitiveLineToCommand(q,G),new T.PathPrimitiveLineToCommand(this.getInnerPointPos(k,q,D,Z,Q),this.getInnerPointPos(U,G,ie,Z,Q)),new T.PathPrimitiveLineToCommand(D,ie),new T.PathPrimitiveLineToCommand(this.getInnerPointPos(k,D,k,Z,Q),this.getInnerPointPos(U,ie,C,Z,Q)),new T.PathPrimitiveClosePathCommand],x.style)]},_.prototype.createParameters=function(x){x.addRangeIfNotExists([new c.ShapeParameter(P.StarConvexParameterName,300)])},_.prototype.normalizeParameters=function(x,w){var D=x.rectangle,C=D.y,I=D.right,L=D.width,N=D.height,G=this.getActualBottom(C,D.bottom,L,N),k=D.center.x,U=C+(G-C)/2,B=N/L,K=Math.PI-this.angle,J=C+L/2*Math.tan(K/2)*B,ie=this.getInnerPointDistance(k,k,I,U,C,J);this.changeParameterValue(w,P.StarConvexParameterName,function(re){return Math.max(0,Math.min(ie,re.value))})},_.prototype.modifyParameters=function(x,w,D,C){var I=Math.sqrt(Math.pow(D,2)+Math.pow(C,2));(D<0||C>0)&&(I=-I),this.changeParameterValue(w,P.StarConvexParameterName,function(L){return L.value+I}),this.normalizeParameters(x,w)},_.prototype.getParameterPoints=function(x){var w=x.rectangle,D=w.y,C=w.right,I=w.width,L=w.height,N=this.getActualBottom(D,w.bottom,I,L),G=w.center.x,k=D+(N-D)/2,U=L/I,B=Math.PI-this.angle,K=D+I/2*Math.tan(B/2)*U,J=x.parameters.get(P.StarConvexParameterName).value,ie=this.getInnerPointDistance(G,G,C,k,D,K),re=this.getInnerPointPos(G,G,C,J,ie),q=this.getInnerPointPos(k,D,K,J,ie);return[new s.ShapeParameterPoint("c",new a.Point(re,q))]},_.prototype.processConnectionPoint=function(x,w){if(g.prototype.processConnectionPoint.call(this,x,w),x.getConnectionPointSide(w)===u.ConnectionPointSide.South){var D=x.rectangle,C=D.y,I=D.right,L=D.width,N=D.height,G=this.getActualBottom(C,D.bottom,L,N),k=D.center.x,U=C+(G-C)/2,B=N/L,K=Math.PI-this.angle,J=C+L/2*Math.tan(K/2)*B,ie=x.parameters.get(P.StarConvexParameterName).value,re=this.getInnerPointDistance(k,k,I,U,C,J);w.y=this.getInnerPointPos(U,G,G,ie,re)}},_.prototype.getInnerPointDistanceByAxis=function(x,w,D){return Math.min(w,D)+Math.abs(w-D)/2-x},_.prototype.getInnerPointPos=function(x,w,D,C,I){var L=Math.min(1,C/I);return x+this.getInnerPointDistanceByAxis(x,w,D)*L},_.prototype.getInnerPointDistance=function(x,w,D,C,I,L){var N=this.getInnerPointDistanceByAxis(x,w,D),G=this.getInnerPointDistanceByAxis(C,I,L);return Math.sqrt(Math.pow(N,2)+Math.pow(G,2))},_.prototype.getActualBottom=function(x,w,D,C){var I=x+g.prototype.calculateHeight.call(this,D)*C/D;return I<w?I:w},_.prototype.calculateHeight=function(x){return x},_}(d.PentagonShapeDescription);P.StarShapeDescription=h},1669:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.TextShapeDescription=void 0;var T=b(6794),y=b(6353),d=b(2259),c=b(4593),s=b(4716),a=b(3500),u=function(h){function g(){var _=h.call(this,new y.Size(T.ShapeDefaultDimension,.5*T.ShapeDefaultDimension),!0)||this;return _.textClipPathId=a.RenderUtils.generateSvgElementId("clipRect"),_}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return d.ShapeTypes.Text},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),g.prototype.createShapePrimitives=function(_,x){if(x){var w=_.rectangle,D=w.x,C=w.y,I=w.width,L=w.height;return[new c.ClipPathPrimitive(this.getTextClipPathId(x),[new s.RectanglePrimitive(D,C,I,L)])]}return[]},g.prototype.getTextClipPathId=function(_){return _?this.textClipPathId:void 0},g.prototype.getSizeByTextRectangle=function(_){return _},g.prototype.getSizeByText=function(_,x){return _.clone()},g.prototype.getTextRectangle=function(_){return _.rectangle},g}(T.ShapeDescription);P.TextShapeDescription=u},2117:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.TriangleShapeDescription=void 0;var T=b(6794),y=b(7724),d=b(2259),c=b(7228),s=b(3742),a=b(8011),u=b(6353),h=function(g){function _(x){var w=g.call(this,void 0,x)||this;return w.defaultSize.height=w.calculateHeight(T.ShapeDefaultDimension),w}return S(_,g),Object.defineProperty(_.prototype,"key",{get:function(){return d.ShapeTypes.Triangle},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),_.prototype.createConnectionPoints=function(){return[new c.ConnectionPoint(.5,0,s.ConnectionPointSide.North),new c.ConnectionPoint(.75,.5,s.ConnectionPointSide.East),new c.ConnectionPoint(.5,1,s.ConnectionPointSide.South),new c.ConnectionPoint(.25,.5,s.ConnectionPointSide.West)]},_.prototype.createShapePrimitives=function(x){var w=x.rectangle,D=w.x,I=w.right,L=w.bottom;return[new y.PathPrimitive([new y.PathPrimitiveMoveToCommand(w.center.x,w.y),new y.PathPrimitiveLineToCommand(I,L),new y.PathPrimitiveLineToCommand(D,L),new y.PathPrimitiveClosePathCommand],x.style)]},_.prototype.calculateHeight=function(x){return Math.sqrt(Math.pow(x,2)-Math.pow(x/2,2))},_.prototype.getTextRectangle=function(x){return new a.Rectangle(x.position.x+x.size.width/4,x.position.y+x.size.height/2,x.size.width/2,x.size.height/2-T.ShapeTextPadding).nonNegativeSize()},_.prototype.getSizeByText=function(x,w){return new u.Size(2*x.width,2*x.height+T.ShapeTextPadding)},_}(T.ShapeDescription);P.TriangleShapeDescription=h},3233:function(o,P,b){var f,S=this&&this.__extends||(f=function(C,I){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,N){L.__proto__=N}||function(L,N){for(var G in N)N.hasOwnProperty(G)&&(L[G]=N[G])})(C,I)},function(C,I){function L(){this.constructor=C}f(C,I),C.prototype=null===I?Object.create(I):(L.prototype=I.prototype,new L)});Object.defineProperty(P,"__esModule",{value:!0}),P.CardBaseDescription=void 0;var T=b(6794),y=b(8011),d=b(6353),c=b(4083),s=b(4538),a=b(7724),u=b(5329),h=b(6411),g=b(2259),_=b(6224),x=b(9291),w=b(8900),D=function(C){function I(L){return void 0===L&&(L=new d.Size(T.ShapeDefaultDimension,26/46*T.ShapeDefaultDimension)),C.call(this,L,!0)||this}return S(I,C),Object.defineProperty(I.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),I.prototype.getDefaultText=function(){return _.DiagramLocalizationService.shapeTexts[g.ShapeTypes.Card]},I.prototype.createShapePrimitives=function(L,N){var G=L.rectangle;return[new s.RoundedRectanglePrimitive(G.x,G.y,G.width,G.height,N?30:60,N?30:60,L.style)]},I.prototype.createImagePlaceholder=function(L){return[new s.RoundedRectanglePrimitive(L.x,L.y,L.width,L.height,x.UnitConverter.pixelsToTwips(2),x.UnitConverter.pixelsToTwips(2),void 0,c.SHAPE_IMAGE_CLASSNAMES.IMAGE_PLACEHOLDER)]},I.prototype.createEmptyImagePrimitive=function(L){return h.ShapeImageIndicator.createUserIconPrimitives(L.x,L.y,this.defaultIconSize,x.UnitConverter.pixelsToTwips(1),c.SHAPE_IMAGE_CLASSNAMES.USER_PIC)},I.prototype.createWarningPrimitive=function(L){return h.ShapeImageIndicator.createWarningIconPrimitives(L.x+this.defaultIconSize/2,L.y+this.defaultIconSize/2,this.defaultIconSize/2,c.SHAPE_IMAGE_CLASSNAMES.WARNING_MARK)},I.prototype.getTextRectangle=function(L){var N=L.rectangle,G=N.clone().inflate(-T.ShapeTextPadding,-T.ShapeTextPadding),k=this.getImageSize(N.createSize(),!0);return this.isTextAfterImage&&G.moveRectangle(this.isHorizontal?k.width:0,this.isHorizontal?0:k.height),G.resize(this.isHorizontal?-k.width:0,this.isHorizontal?0:-k.height),G.nonNegativeSize()},I.prototype.getSizeByText=function(L,N){var G=L.clone().offset(2*T.ShapeTextPadding,2*T.ShapeTextPadding),k=this.getImageSizeByTextBlockSize(G);return this.isHorizontal?G.width+=k.width:G.height+=k.height,G},I.prototype.createTextPrimitives=function(L,N){return N?this.createGraphicalTextRepresentation(L.rectangle):C.prototype.createTextPrimitives.call(this,L,N)},I.prototype.createGraphicalTextRepresentation=function(L){var N=new y.Rectangle(0,0,0,0),G=this.getImageSize(L.createSize(),!0,!0);if(this.isHorizontal){var k=this.isTextAfterImage?L.width/2-x.UnitConverter.pixelsToTwips(2):0;N.x=L.x+k+x.UnitConverter.pixelsToTwips(4),N.y=L.y+x.UnitConverter.pixelsToTwips(5),N.width=G.width-x.UnitConverter.pixelsToTwips(4),N.height=L.height-x.UnitConverter.pixelsToTwips(6)}else{var U=this.isTextAfterImage?L.height/2-x.UnitConverter.pixelsToTwips(2):0;N.x=L.x+L.width/4,N.y=L.y+U+x.UnitConverter.pixelsToTwips(4),N.width=L.width/2,N.height=G.height-x.UnitConverter.pixelsToTwips(2)}return this.createTextRepresentationPrimitives(N)},I.prototype.getImagePlacementRectangle=function(L,N){var G=this.getImageSize(L.createSize(),!1,N),k=y.Rectangle.fromGeometry(new w.Point(L.x,L.y),G),U=this.getImageSize(L.createSize(),!0,N);return this.isHorizontal&&this.isTextAfterImage?k.x+=this.getImageMargin(N):this.isHorizontal&&(k.x=L.right-U.width-this.getImageMargin(N)),this.isHorizontal||this.isTextAfterImage?k.y+=this.getImageMargin(N):k.y=L.bottom-U.height-this.getImageMargin(N),this.isHorizontal||(k.x+=(L.width-k.width)/2),k},I.prototype.createTextRepresentationPrimitives=function(L){var N=x.UnitConverter.pixelsToTwips(x.UnitConverter.twipsToPixels(L.height/3));return[new u.GroupPrimitive([new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(L.x,L.y),new a.PathPrimitiveLineToCommand(L.x+L.width,L.y)]),new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(L.x,L.y+N),new a.PathPrimitiveLineToCommand(L.x+L.width,L.y+N)]),new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(L.x,L.y+2*N),new a.PathPrimitiveLineToCommand(L.x+.66*L.width,L.y+2*N)])],"dxdi-shape-text")]},I}(c.ShapeWithImageDescription);P.CardBaseDescription=D},3107:function(o,P,b){var f,S=this&&this.__extends||(f=function(h,g){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var w in x)x.hasOwnProperty(w)&&(_[w]=x[w])})(h,g)},function(h,g){function _(){this.constructor=h}f(h,g),h.prototype=null===g?Object.create(g):(_.prototype=g.prototype,new _)});Object.defineProperty(P,"__esModule",{value:!0}),P.CardWithImageOnRightDescription=P.CardWithImageOnLeftDescription=void 0;var T=b(6794),y=b(2259),d=b(3233),c=b(6353),s=function(h){function g(){var _=h.call(this,new c.Size(1.5*T.ShapeDefaultDimension,.5*T.ShapeDefaultDimension))||this;return _.isHorizontal=!0,_}return S(g,h),g.prototype.getToolboxHeightToWidthRatio=function(_,x){return 26/46},g.prototype.getImageSize=function(_,x,w){var D=Math.min(_.height,_.width);return x||(D=Math.max(0,D-2*this.getImageMargin(w))),new c.Size(D,D)},g.prototype.getImageSizeByTextBlockSize=function(_){return this.getImageSize(new c.Size(Number.MAX_VALUE,_.height),!0)},g}(d.CardBaseDescription),a=function(h){function g(){var _=null!==h&&h.apply(this,arguments)||this;return _.isTextAfterImage=!0,_}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.CardWithImageOnLeft},enumerable:!1,configurable:!0}),g}(s);P.CardWithImageOnLeftDescription=a;var u=function(h){function g(){var _=null!==h&&h.apply(this,arguments)||this;return _.isTextAfterImage=!1,_}return S(g,h),Object.defineProperty(g.prototype,"key",{get:function(){return y.ShapeTypes.CardWithImageOnRight},enumerable:!1,configurable:!0}),g}(s);P.CardWithImageOnRightDescription=u},2816:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.CardWithImageOnTopDescription=void 0;var T=b(6794),y=b(6353),d=b(2259),c=b(3233),s=b(9291),a=function(u){function h(){var g=u.call(this,new y.Size(.8*T.ShapeDefaultDimension,T.ShapeDefaultDimension))||this;return g.isTextAfterImage=!0,g.isHorizontal=!1,g}return S(h,u),Object.defineProperty(h.prototype,"key",{get:function(){return d.ShapeTypes.CardWithImageOnTop},enumerable:!1,configurable:!0}),h.prototype.getImageSize=function(g,_,x){var w=g.width/2;s.UnitConverter.twipsToPixels(w)%2==1&&(w-=s.UnitConverter.pixelsToTwips(1));var D=Math.max(0,g.height-(_?0:2*this.getImageMargin(x)));return D=Math.min(w,D),new y.Size(D,D)},h.prototype.getImageSizeByTextBlockSize=function(g){return this.getImageSize(new y.Size(g.width,Number.MAX_VALUE),!0)},h}(c.CardBaseDescription);P.CardWithImageOnTopDescription=a},6794:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeDescription=P.ShapeTextPadding=P.ShapeDefaultSize=P.ShapeMinDimension=P.ShapeDefaultDimension=void 0;var f=b(9291),S=b(6353),T=b(6224),y=b(4246),d=b(4716),c=b(9416),s=b(8675),a=b(7228),u=b(3742);P.ShapeDefaultDimension=1440,P.ShapeMinDimension=360,P.ShapeDefaultSize=new S.Size(P.ShapeDefaultDimension,P.ShapeDefaultDimension),P.ShapeTextPadding=f.UnitConverter.pixelsToTwips(10);var h=function(){function g(_,x){void 0===_&&(_=P.ShapeDefaultSize.clone()),this.defaultSize=_,this.hasDefaultText=x,this.onChanged=new s.EventDispatcher,this.connectionPoints=this.createConnectionPoints()}return Object.defineProperty(g.prototype,"enableText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"allowEditText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"enableImage",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"allowEditImage",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"hasTemplate",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"enableChildren",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"minWidth",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"minHeight",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"maxWidth",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"maxHeight",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"toolboxSize",{get:function(){return this.defaultSize},enumerable:!1,configurable:!0}),g.prototype.getTitle=function(){return T.DiagramLocalizationService.shapeTexts[this.key]},g.prototype.getDefaultText=function(){return this.hasDefaultText?T.DiagramLocalizationService.shapeTexts[this.key]:""},g.prototype.getDefaultImageUrl=function(){return""},g.prototype.getConnectionPoints=function(){return this.connectionPoints},g.prototype.createConnectionPoints=function(){return[new a.ConnectionPoint(.5,0,u.ConnectionPointSide.North),new a.ConnectionPoint(1,.5,u.ConnectionPointSide.East),new a.ConnectionPoint(.5,1,u.ConnectionPointSide.South),new a.ConnectionPoint(0,.5,u.ConnectionPointSide.West)]},g.prototype.processConnectionPoint=function(_,x){},g.prototype.getConnectionPointIndexForItem=function(_,x){return x},g.prototype.getConnectionPointIndexForSide=function(_){return _},g.getConnectionPointSideByGeometry=function(_){return _.x>=_.y&&(_.x>0||_.y>0)?_.x<.5||1-_.x>=_.y?u.ConnectionPointSide.North:u.ConnectionPointSide.East:_.x>.5||1-_.x<=_.y?u.ConnectionPointSide.South:u.ConnectionPointSide.West},g.prototype.createParameters=function(_){},g.prototype.normalizeParameters=function(_,x){},g.prototype.modifyParameters=function(_,x,w,D){throw Error("Not implemented")},g.prototype.changeParameterValue=function(_,x,w){var D=_.get(x);D.value=w(D)},g.prototype.getParameterPoints=function(_){return[]},g.prototype.getExpandedSize=function(_){return _.size},g.prototype.getCollapsedSize=function(_){return _.size},g.prototype.getToolboxHeightToWidthRatio=function(_,x){return x/_},g.prototype.allowResizeHorizontally=function(_){return!0},g.prototype.allowResizeVertically=function(_){return!0},g.prototype.createPrimitives=function(_,x,w){var D=[];return D=D.concat(this.createShapePrimitives(_,w)),this.enableImage&&(D=D.concat(this.createImagePrimitives(_,w))),this.enableText&&(D=D.concat(this.createTextPrimitives(_,w))),D},g.prototype.createImagePrimitives=function(_,x){return[]},g.prototype.createTextPrimitives=function(_,x){if(void 0===_.text||""===_.text)return[];var w=this.getTextRectangle(_);return[new c.TextPrimitive(w.x,w.y,_.text,y.TextOwner.Shape,w.width,w.height,g.textSpacing,_.styleText,!1,this.getTextClipPathId(x),void 0,this.getTextAngle())]},g.prototype.getTextClipPathId=function(_){},g.prototype.getTextAngle=function(){return c.TextAngle.Angle0deg},g.prototype.getClientRectangle=function(_){return _.rectangle},g.prototype.getTextEditRectangle=function(_){return this.getTextRectangle(_)},g.prototype.createSelectorPrimitives=function(_){return[new d.RectanglePrimitive(_.position.x,_.position.y,_.size.width,_.size.height,null,"selector")]},g.prototype.raiseShapeDescriptionChanged=function(_){this.onChanged.raise1(function(x){return x.notifyShapeDescriptionChanged(_)})},g.textSpacing=f.UnitConverter.pixelsToTwips(2),g}();P.ShapeDescription=h},8397:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeDescriptionManager=void 0;var f=b(5331),S=b(6825),T=b(9144),y=b(4941),d=b(6242),c=b(6508),s=b(9089),a=b(6599),u=b(8327),h=b(2281),g=b(5303),_=b(7768),x=b(8628),w=b(1561),D=b(1669),C=b(8761),I=b(2953),L=b(1412),N=b(8772),G=b(4958),k=b(8800),U=b(6023),B=b(2117),K=b(3525),J=b(2850),ie=b(4112),re=b(1314),q=b(1034),Y=b(2751),Z=b(8110),Q=b(1643),te=b(9229),pe=b(4810),z=b(3046),oe=b(2650),ae=b(2019),ee=b(6182),he=b(6688),de=b(5759),ue=b(944),be=b(2816),ve=b(2259),le=b(7552),Ce=b(8675),ye=b(3107),ge=function(){function fe(){this.descriptions={},this.descriptionTypes={},this.descriptionCategories={},this.onShapeDecriptionChanged=new Ce.EventDispatcher,this.register(new D.TextShapeDescription,ve.ShapeCategories.General),this.register(new w.RectangleShapeDescription,ve.ShapeCategories.General),this.register(new _.EllipseShapeDescription,ve.ShapeCategories.General),this.register(new h.CrossShapeDescription,ve.ShapeCategories.General),this.register(new B.TriangleShapeDescription,ve.ShapeCategories.General),this.register(new g.DiamondShapeDescription,ve.ShapeCategories.General),this.register(new x.HeartShapeDescription,ve.ShapeCategories.General),this.register(new C.PentagonShapeDescription,ve.ShapeCategories.General),this.register(new I.HexagonShapeDescription,ve.ShapeCategories.General),this.register(new L.OctagonShapeDescription,ve.ShapeCategories.General),this.register(new N.StarShapeDescription,ve.ShapeCategories.General),this.register(new u.ArrowUpShapeDescription,ve.ShapeCategories.General),this.register(new G.ArrowDownShapeDescription,ve.ShapeCategories.General),this.register(new U.ArrowLeftShapeDescription,ve.ShapeCategories.General),this.register(new a.ArrowRightShapeDescription,ve.ShapeCategories.General),this.register(new s.ArrowUpDownShapeDescription,ve.ShapeCategories.General),this.register(new k.ArrowLeftRightShapeDescription,ve.ShapeCategories.General),this.register(new f.ProcessShapeDescription,ve.ShapeCategories.Flowchart),this.register(new S.DecisionShapeDescription,ve.ShapeCategories.Flowchart),this.register(new d.TerminatorShapeDescription,ve.ShapeCategories.Flowchart),this.register(new c.PredefinedProcessShapeDescription,ve.ShapeCategories.Flowchart),this.register(new K.DocumentShapeDescription,ve.ShapeCategories.Flowchart),this.register(new J.MultipleDocumentsShapeDescription,ve.ShapeCategories.Flowchart),this.register(new T.ManualInputShapeDescription,ve.ShapeCategories.Flowchart),this.register(new ie.PreparationShapeDescription,ve.ShapeCategories.Flowchart),this.register(new y.DataShapeDescription,ve.ShapeCategories.Flowchart),this.register(new q.DatabaseShapeDescription,ve.ShapeCategories.Flowchart),this.register(new re.HardDiskShapeDescription,ve.ShapeCategories.Flowchart),this.register(new Y.InternalStorageShapeDescription,ve.ShapeCategories.Flowchart),this.register(new Z.PaperTapeShapeDescription,ve.ShapeCategories.Flowchart),this.register(new Q.ManualOperationShapeDescription,ve.ShapeCategories.Flowchart),this.register(new te.DelayShapeDescription,ve.ShapeCategories.Flowchart),this.register(new pe.StoredDataShapeDescription,ve.ShapeCategories.Flowchart),this.register(new oe.DisplayShapeDescription,ve.ShapeCategories.Flowchart),this.register(new z.MergeShapeDescription,ve.ShapeCategories.Flowchart),this.register(new le.ConnectorShapeDescription,ve.ShapeCategories.Flowchart),this.register(new ae.OrShapeDescription,ve.ShapeCategories.Flowchart),this.register(new ee.SummingJunctionShapeDescription,ve.ShapeCategories.Flowchart),this.register(new ye.CardWithImageOnLeftDescription,ve.ShapeCategories.OrgChart),this.register(new ye.CardWithImageOnRightDescription,ve.ShapeCategories.OrgChart),this.register(new be.CardWithImageOnTopDescription,ve.ShapeCategories.OrgChart),this.register(new de.VerticalContainerDescription,ve.ShapeCategories.Containers),this.register(new ue.HorizontalContainerDescription,ve.ShapeCategories.Containers)}return Object.defineProperty(fe,"default",{get:function(){return fe.defaultInstance},enumerable:!1,configurable:!0}),Object.defineProperty(fe,"defaultContainer",{get:function(){return fe.defaultContainerInstance},enumerable:!1,configurable:!0}),fe.prototype.get=function(xe){return this.descriptions[xe]},fe.prototype.getTypesByCategory=function(xe){return this.descriptionTypes[xe]||[]},fe.prototype.getCategoryByType=function(xe){return this.descriptionCategories[xe]},fe.prototype.getCategoryByDescription=function(xe){return this.getCategoryByType(xe.key)},fe.prototype.register=function(xe,Te,Ee){if(void 0===Ee&&(Ee=xe.key),void 0!==this.descriptions[Ee])throw Error("Description key is duplicated");this.descriptions[Ee]=xe,this.descriptionTypes[Te]||(this.descriptionTypes[Te]=[]),this.descriptionTypes[Te].push(Ee),this.descriptionCategories[Ee]=Te,xe.onChanged.add(this)},fe.prototype.registerCustomShape=function(xe){if(void 0===xe.type)throw Error("Custom shape type is not defined");if(void 0!==this.descriptions[xe.type])throw Error("Custom shape type is duplicated");var Te=xe.baseType&&this.descriptions[xe.baseType];xe.minWidth>xe.maxWidth&&(xe.maxWidth=xe.minWidth),xe.minHeight>xe.maxHeight&&(xe.maxHeight=xe.minHeight),this.register(new he.CustomShapeDescription(xe,Te),xe.category||ve.ShapeCategories.Custom)},fe.prototype.unregisterCustomShape=function(xe){var Te=this.descriptions[xe];if(Te instanceof he.CustomShapeDescription){Te.onChanged.remove(this);var Ee=this.descriptionCategories[xe];delete this.descriptions[xe],delete this.descriptionCategories[xe];var Oe=this.descriptionTypes[Ee].indexOf(xe);this.descriptionTypes[Ee].splice(Oe,1),0===this.descriptionTypes[Ee].length&&delete this.descriptionTypes[Ee]}},fe.prototype.unregisterAllCustomShapes=function(){var xe=this;Object.keys(this.descriptions).forEach(function(Te){xe.unregisterCustomShape(Te)})},fe.prototype.notifyShapeDescriptionChanged=function(xe){this.onShapeDecriptionChanged.raise1(function(Te){return Te.notifyShapeDescriptionChanged(xe)})},fe.defaultInstance=new w.RectangleShapeDescription,fe.defaultContainerInstance=new de.VerticalContainerDescription,fe}();P.ShapeDescriptionManager=ge},4083:function(o,P,b){var f,S=this&&this.__extends||(f=function(D,C){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,L){I.__proto__=L}||function(I,L){for(var N in L)L.hasOwnProperty(N)&&(I[N]=L[N])})(D,C)},function(D,C){function I(){this.constructor=D}f(D,C),D.prototype=null===C?Object.create(C):(I.prototype=C.prototype,new I)});Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeWithImageDescription=P.SHAPE_IMAGE_CLASSNAMES=P.ShapeDefaultSize=P.ShapeDefaultDimension=void 0;var T=b(6794),y=b(8011),d=b(6353),c=b(8900),s=b(9291),a=b(1995),u=b(4716),h=b(5329),g=b(3500),_=b(4593),x=b(6411);P.ShapeDefaultDimension=1440,P.ShapeDefaultSize=new d.Size(P.ShapeDefaultDimension,P.ShapeDefaultDimension),P.SHAPE_IMAGE_CLASSNAMES={IMAGE:"dxdi-image",IMAGE_PLACEHOLDER:"dxdi-image-placeholder",LOADING_INDICATOR:"dxdi-spinner",USER_PIC:"dxdi-user",WARNING_MARK:"dxdi-warning"};var w=function(D){function C(I,L){void 0===I&&(I=P.ShapeDefaultSize.clone());var N=D.call(this,I,L)||this;return N.hasDefaultText=L,N.defaultIconSize=480,N}return S(C,D),Object.defineProperty(C.prototype,"enableImage",{get:function(){return!0},enumerable:!1,configurable:!0}),C.prototype.getImageMargin=function(I){return s.UnitConverter.pixelsToTwips(I?2:3)},C.prototype.createImagePrimitives=function(I,L){if(!this.enableImage)return[];var N=this.getImagePlacementRectangle(I.rectangle,L);if(L)return this.createImagePlaceholder(N);var G=[];if(G=G.concat(I.image.isEmpty||I.image.unableToLoad?this.createEmptyImagePrimitives(N,I.image.unableToLoad):""===I.image.renderUrl?this.createLoadingImagePrimitives(N):this.createLoadedImagePrimitives(N,I.image.renderUrl)),""===I.image.renderUrl){var k=g.RenderUtils.generateSvgElementId("clipImage");return[].concat([new h.GroupPrimitive(G,P.SHAPE_IMAGE_CLASSNAMES.IMAGE,void 0,k),new _.ClipPathPrimitive(k,[new u.RectanglePrimitive(N.x,N.y,N.width,N.height)])])}return G},C.prototype.createImagePlaceholder=function(I){return[]},C.prototype.createLoadedImagePrimitives=function(I,L){return[new a.ImagePrimitive(I.x,I.y,I.width,I.height,L,C.imageScalingRule,void 0,P.SHAPE_IMAGE_CLASSNAMES.IMAGE)]},C.prototype.createLoadingImagePrimitives=function(I){var L=this.getIconPlacementRectangle(I);return[x.ShapeImageIndicator.createLoadingIndicatorPrimitives(L.x,L.y,this.defaultIconSize,s.UnitConverter.pixelsToTwips(5),P.SHAPE_IMAGE_CLASSNAMES.LOADING_INDICATOR)]},C.prototype.createEmptyImagePrimitives=function(I,L){var N=this.getIconPlacementRectangle(I),G=[];return G=G.concat(this.createEmptyImagePrimitive(N)),L&&(G=G.concat(this.createWarningPrimitive(N))),G},C.prototype.createEmptyImagePrimitive=function(I){return new h.GroupPrimitive([])},C.prototype.createWarningPrimitive=function(I){return new h.GroupPrimitive([])},C.prototype.getIconPlacementRectangle=function(I){var L=y.Rectangle.fromGeometry(new c.Point(I.x,I.y),new d.Size(this.defaultIconSize,this.defaultIconSize));return L.width<I.width&&(L.x=I.x+(I.width-L.width)/2),L.height<I.height&&(L.y=I.y+(I.height-L.height)/2),L},C.imageScalingRule="xMidYMid meet",C}(T.ShapeDescription);P.ShapeWithImageDescription=w},5503:function(o,P,b){var f,S=this&&this.__extends||(f=function(g,_){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D])})(g,_)},function(g,_){function x(){this.constructor=g}f(g,_),g.prototype=null===_?Object.create(_):(x.prototype=_.prototype,new x)});Object.defineProperty(P,"__esModule",{value:!0}),P.Shape=void 0;var T=b(8011),y=b(6794),d=b(6629),c=b(3742),s=b(7228),a=b(6617),u=b(7185),h=function(g){function _(x,w,D){var C=g.call(this)||this;if(C.description=x,C.children=[],C.expanded=!0,C.expandedSize=void 0,!x)throw Error("Shape type is incorrect");return C.position=w.clone(),C.size=(D?x.toolboxSize:x.defaultSize).clone(),C.text=x.getDefaultText(),C.image=new a.ImageInfo(x.getDefaultImageUrl()),C.parameters=new d.ShapeParameters,x.createParameters(C.parameters),C}return S(_,g),_.prototype.assign=function(x){g.prototype.assign.call(this,x),x.size=this.size.clone(),x.text=this.text,x.image=this.image.clone(),x.parameters=this.parameters.clone(),x.children=this.children.slice(),x.expanded=this.expanded,this.expandedSize&&(x.expandedSize=this.expandedSize.clone())},_.prototype.clone=function(){var x=new _(this.description,this.position.clone());return this.assign(x),x},Object.defineProperty(_.prototype,"enableText",{get:function(){return this.description.enableText},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"allowEditText",{get:function(){return this.description.allowEditText},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"hasTemplate",{get:function(){return this.description.hasTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"enableChildren",{get:function(){return this.description.enableChildren},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"enableImage",{get:function(){return this.description.enableImage},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"allowEditImage",{get:function(){return this.description.allowEditImage},enumerable:!1,configurable:!0}),_.prototype.getMinWidth=function(x){return"number"==typeof this.description.minWidth?this.description.minWidth:"number"==typeof x?x:y.ShapeMinDimension},_.prototype.getMinHeight=function(x){return"number"==typeof this.description.minHeight?this.description.minHeight:"number"==typeof x?x:y.ShapeMinDimension},_.prototype.getMaxWidth=function(x){return"number"==typeof this.description.maxWidth?this.description.maxWidth:"number"==typeof x?x:void 0},_.prototype.getMaxHeight=function(x){return"number"==typeof this.description.maxHeight?this.description.maxHeight:"number"==typeof x?x:void 0},_.prototype.createPrimitives=function(x){return this.description.createPrimitives(this,x)},_.prototype.createSelectorPrimitives=function(){return this.description.createSelectorPrimitives(this)},_.prototype.normalizeX=function(x){return Math.max(this.position.x,Math.min(x,this.position.x+this.size.width))},_.prototype.normalizeY=function(x){return Math.max(this.position.y,Math.min(x,this.position.y+this.size.height))},_.prototype.getConnectionPoints=function(){var x=this;return this.description.getConnectionPoints().map(function(w){var D=new s.ConnectionPoint(x.position.x+w.x*x.size.width,x.position.y+w.y*x.size.height,w.side);return x.description.processConnectionPoint(x,D),D})},_.prototype.getConnectionPointSide=function(x,w){return x.side!==c.ConnectionPointSide.Undefined?x.side:this.getConnectionPointSideByGeometry(x)},_.prototype.getConnectionPointSideByGeometry=function(x){var w=x.clone().offset(-this.position.x,-this.position.y).multiply(1/this.size.width,1/this.size.height);return y.ShapeDescription.getConnectionPointSideByGeometry(w)},_.prototype.getConnectionPointIndexForItem=function(x,w){return this.description.getConnectionPointIndexForItem(x,w)},_.prototype.getConnectionPointIndexForSide=function(x){return this.description.getConnectionPointIndexForSide(x)},_.prototype.toggleExpandedSize=function(){this.expanded?(this.size=this.getExpandedSize(),this.expandedSize=void 0):(this.expandedSize=this.size.clone(),this.size=this.getCollapsedSize())},_.prototype.getExpandedSize=function(){return this.description.getExpandedSize(this)},_.prototype.getCollapsedSize=function(){return this.description.getCollapsedSize(this)},_.prototype.getToolboxHeightToWidthRatio=function(){return this.description.getToolboxHeightToWidthRatio(this.size.width,this.size.height)},Object.defineProperty(_.prototype,"allowResizeHorizontally",{get:function(){return this.description.allowResizeHorizontally(this)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"allowResizeVertically",{get:function(){return this.description.allowResizeVertically(this)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"rectangle",{get:function(){return T.Rectangle.fromGeometry(this.position,this.size)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"clientRectangle",{get:function(){return this.description.getClientRectangle(this)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"textRectangle",{get:function(){return this.description.getTextRectangle(this)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"textEditRectangle",{get:function(){return this.description.getTextEditRectangle(this)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"textAngle",{get:function(){return this.description.getTextAngle()},enumerable:!1,configurable:!0}),_.prototype.toNative=function(x){var w=new u.NativeShape(this.key,this.dataKey);return w.type=this.description.key,w.text=this.text,w.position=this.position.clone(),w.size=this.size.clone(),w.attachedConnectorIds=this.attachedConnectors.map(function(D){return D.key}),w.applyUnits(x),w.containerId=this.container?this.container.key:null,w.containerChildItemIds=this.children.map(function(D){return D.key}),w.containerExpanded=this.expanded,w},_}(c.DiagramItem);P.Shape=h},1852:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeParameterPoint=void 0,P.ShapeParameterPoint=function(f,S){this.key=f,this.point=S}},6629:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeParameters=P.ShapeParameter=void 0;var b=function(S,T){this.key=S,this.value=T};P.ShapeParameter=b;var f=function(){function S(){this.items={}}return S.prototype.addIfNotExists=function(T){T.key in this.items||this.set(T)},S.prototype.set=function(T){this.items[T.key]=T},S.prototype.addRangeIfNotExists=function(T){for(var y=0;y<T.length;y++)this.addIfNotExists(T[y])},S.prototype.get=function(T){return this.items[T]},S.prototype.forEach=function(T){for(var y in this.items)Object.prototype.hasOwnProperty.call(this.items,y)&&T(this.items[y])},S.prototype.clone=function(){var T=new S;return this.forEach(function(y){T.addIfNotExists(new b(y.key,y.value))}),T},S.prototype.toObject=function(){var T={},y=!1;return this.forEach(function(d){T[d.key]={value:d.value},y=!0}),y?T:null},S.prototype.fromObject=function(T){this.forEach(function(y){var d=T[y.key];d&&"number"==typeof d.value&&(y.value=d.value)})},S}();P.ShapeParameters=f},2259:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeType=P.ShapeTypes=P.ShapeCategories=void 0;var b=function(){function S(){}return S.General="general",S.Flowchart="flowchart",S.OrgChart="orgChart",S.Containers="containers",S.Custom="custom",S}();P.ShapeCategories=b;var S,f=function(){function S(){}return S.Text="text",S.Rectangle="rectangle",S.Ellipse="ellipse",S.Cross="cross",S.Triangle="triangle",S.Diamond="diamond",S.Heart="heart",S.Pentagon="pentagon",S.Hexagon="hexagon",S.Octagon="octagon",S.Star="star",S.ArrowLeft="arrowLeft",S.ArrowUp="arrowTop",S.ArrowRight="arrowRight",S.ArrowDown="arrowBottom",S.ArrowUpDown="arrowNorthSouth",S.ArrowLeftRight="arrowEastWest",S.Process="process",S.Decision="decision",S.Terminator="terminator",S.PredefinedProcess="predefinedProcess",S.Document="document",S.MultipleDocuments="multipleDocuments",S.ManualInput="manualInput",S.Preparation="preparation",S.Data="data",S.Database="database",S.HardDisk="hardDisk",S.InternalStorage="internalStorage",S.PaperTape="paperTape",S.ManualOperation="manualOperation",S.Delay="delay",S.StoredData="storedData",S.Display="display",S.Merge="merge",S.Connector="connector",S.Or="or",S.SummingJunction="summingJunction",S.Container="container",S.VerticalContainer="verticalContainer",S.HorizontalContainer="horizontalContainer",S.Card="card",S.CardWithImageOnLeft="cardWithImageOnLeft",S.CardWithImageOnTop="cardWithImageOnTop",S.CardWithImageOnRight="cardWithImageOnRight",S}();P.ShapeTypes=f,(S=P.ShapeType||(P.ShapeType={}))[S.text=0]="text",S[S.rectangle=1]="rectangle",S[S.ellipse=2]="ellipse",S[S.cross=3]="cross",S[S.triangle=4]="triangle",S[S.diamond=5]="diamond",S[S.heart=6]="heart",S[S.pentagon=7]="pentagon",S[S.hexagon=8]="hexagon",S[S.octagon=9]="octagon",S[S.star=10]="star",S[S.arrowLeft=11]="arrowLeft",S[S.arrowTop=12]="arrowTop",S[S.arrowRight=13]="arrowRight",S[S.arrowBottom=14]="arrowBottom",S[S.arrowNorthSouth=15]="arrowNorthSouth",S[S.arrowEastWest=16]="arrowEastWest",S[S.process=17]="process",S[S.decision=18]="decision",S[S.terminator=19]="terminator",S[S.predefinedProcess=20]="predefinedProcess",S[S.document=21]="document",S[S.multipleDocuments=22]="multipleDocuments",S[S.manualInput=23]="manualInput",S[S.preparation=24]="preparation",S[S.data=25]="data",S[S.database=26]="database",S[S.hardDisk=27]="hardDisk",S[S.internalStorage=28]="internalStorage",S[S.paperTape=29]="paperTape",S[S.manualOperation=30]="manualOperation",S[S.delay=31]="delay",S[S.storedData=32]="storedData",S[S.display=33]="display",S[S.merge=34]="merge",S[S.connector=35]="connector",S[S.or=36]="or",S[S.summingJunction=37]="summingJunction",S[S.verticalContainer=38]="verticalContainer",S[S.horizontalContainer=39]="horizontalContainer",S[S.cardWithImageOnLeft=40]="cardWithImageOnLeft",S[S.cardWithImageOnTop=41]="cardWithImageOnTop",S[S.cardWithImageOnRight=42]="cardWithImageOnRight"},1552:function(o,P,b){var f,S=this&&this.__extends||(f=function(_,x){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var C in D)D.hasOwnProperty(C)&&(w[C]=D[C])})(_,x)},function(_,x){function w(){this.constructor=_}f(_,x),_.prototype=null===x?Object.create(x):(w.prototype=x.prototype,new w)});Object.defineProperty(P,"__esModule",{value:!0}),P.EmptyStyle=P.StrokeStyle=P.TextAlignment=P.TextStyle=P.Style=P.DEFAULT_STROKE_DASHARRAY=P.DEFAULT_STROKE_WIDTH=P.StyleBase=void 0;var T=b(13),y=b(8396),d=b(9291),c=function(){function _(){this.createDefaultProperties()}return _.prototype.clone=function(){var x=this,w=this.createInstance();return this.forEach(function(D){w[D]=x[D]}),w},_.prototype.forEach=function(x){for(var w in this)Object.prototype.hasOwnProperty.call(this,w)&&x(w)},Object.defineProperty(_.prototype,"strokeWidthPx",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"strokeWidth",{get:function(){return d.UnitConverter.pixelsToTwips(this.strokeWidthPx)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"strokeOffset",{get:function(){return.5},enumerable:!1,configurable:!0}),_.prototype.toHash=function(){var x=this.toObject();return x?Object.keys(x).map(function(w){return w+"|"+x[w]}).join(""):""},_.prototype.toObject=function(){var x=this,w={},D=!1,C=this.getDefaultInstance();return this.forEach(function(I){x[I]!==C[I]&&(w[I]=x[I],D=!0)}),D?w:null},_.prototype.fromObject=function(x){for(var w in x)if(Object.prototype.hasOwnProperty.call(x,w)){var D=y.isColorProperty(w)?T.ColorUtils.stringToHash(x[w]):x[w];this[w]=D}},_}();P.StyleBase=c,P.DEFAULT_STROKE_WIDTH=2,P.DEFAULT_STROKE_DASHARRAY="";var s=function(_){function x(){return null!==_&&_.apply(this,arguments)||this}return S(x,_),x.prototype.createInstance=function(){return new x},x.prototype.createDefaultProperties=function(){this.fill="#ffffff",this.stroke="#000000",this["stroke-width"]=P.DEFAULT_STROKE_WIDTH.toString(),this["stroke-dasharray"]=P.DEFAULT_STROKE_DASHARRAY},x.prototype.getDefaultInstance=function(){return x.defaultInstance},x.prototype.isDefaultStrokeDashArray=function(){return this["stroke-dasharray"]===P.DEFAULT_STROKE_DASHARRAY},x.prototype.resetStrokeDashArray=function(){this["stroke-dasharray"]=P.DEFAULT_STROKE_DASHARRAY},Object.defineProperty(x.prototype,"strokeWidthPx",{get:function(){return parseInt(this["stroke-width"])},enumerable:!1,configurable:!0}),x.defaultInstance=new x,x}(c);P.Style=s;var a,_,u=function(_){function x(){return null!==_&&_.apply(this,arguments)||this}return S(x,_),x.prototype.createInstance=function(){return new x},x.prototype.createDefaultProperties=function(){this.fill="#000000",this["font-family"]="Arial",this["font-size"]="10pt",this["font-weight"]="",this["font-style"]="",this["text-decoration"]="",this["text-anchor"]="middle"},x.prototype.getDefaultInstance=function(){return x.defaultInstance},x.prototype.getAlignment=function(){switch(this["text-anchor"]){case"left":return a.Left;case"right":return a.Right;default:return a.Center}},x.defaultInstance=new x,x}(c);P.TextStyle=u,(_=a=P.TextAlignment||(P.TextAlignment={}))[_.Left=0]="Left",_[_.Right=1]="Right",_[_.Center=2]="Center";var h=function(_){function x(w,D){var C=_.call(this)||this;return C._strokeWidthPx=w,C._strokeOffset=D,C}return S(x,_),x.prototype.createInstance=function(){return new x},x.prototype.createDefaultProperties=function(){},x.prototype.getDefaultInstance=function(){return u.defaultInstance},Object.defineProperty(x.prototype,"strokeWidthPx",{get:function(){return this._strokeWidthPx||0},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"strokeOffset",{get:function(){return this._strokeOffset||0},enumerable:!1,configurable:!0}),x.default1pxInstance=new x(1,.5),x.default1pxNegativeOffsetInstance=new x(1,-.5),x.default2pxInstance=new x(2),x}(s);P.StrokeStyle=h;var g=function(_){function x(w){var D=_.call(this)||this;return w&&Object.keys(w).forEach(function(C){return D[C]=w[C]}),D}return S(x,_),x.prototype.createInstance=function(){return new x},x.prototype.createDefaultProperties=function(){},x.prototype.getDefaultInstance=function(){return u.defaultInstance},x.defaultInstance=new x,x}(s);P.EmptyStyle=g},6214:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ReloadContentParameters=void 0;var b=function(){function f(){this.isEmpty=!0}return f.prototype.add=function(S,T,y){void 0!==S&&(void 0===this._dataKeys&&(this._dataKeys=[]),Array.isArray(S)?this._dataKeys=this._dataKeys.concat(S):this._dataKeys.push(S)),this._getData=this._getData||T,this._layoutParameters=this._layoutParameters||y,this.isEmpty=!1},f.prototype.clear=function(){this.isEmpty=!0,this._dataKeys=void 0,this._getData=void 0,this._layoutParameters=void 0},Object.defineProperty(f.prototype,"empty",{get:function(){return this.isEmpty},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"dataKeys",{get:function(){return this._dataKeys},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"getData",{get:function(){return this._getData},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"layoutParameters",{get:function(){return this._layoutParameters},enumerable:!1,configurable:!0}),f}();P.ReloadContentParameters=b},6557:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.AutoScrollController=void 0;var f=b(1114),S=b(6907),T=b(6353),y=b(8675),d=function(){function c(s,a,u,h){this.scroll=s,this.svgElement=a,this.view=u,this.dom=h,this.leftButtonPressed=!1,this.scrollDragging=!1,this.scrollTimer=-1,this.scrollBarWidth=S.DomUtils.getVerticalScrollBarWidth()}return c.prototype.onMouseMove=function(s,a){this.clearScrollTimer(),y.EventUtils.isLeftButtonPressed(s)||(this.leftButtonPressed=!1),this.canAutoScroll()&&this.changeScrollPosition(s,a,!1)},c.prototype.onMouseDown=function(s){this.leftButtonPressed=!!y.EventUtils.isLeftButtonPressed(s)},c.prototype.onMouseUp=function(s){this.clearScrollTimer(),this.leftButtonPressed=!1},c.prototype.onMouseEnter=function(s){var a=this;y.EventUtils.isLeftButtonPressed(s)&&setTimeout(function(){a.leftButtonPressed=!0},500)},c.prototype.onDragScrollStart=function(){this.scrollDragging=!0},c.prototype.onDragScrollEnd=function(){this.scrollDragging=!1},c.prototype.canAutoScroll=function(){return this.leftButtonPressed&&!this.scrollDragging},c.prototype.changeScrollPosition=function(s,a,u){var h=this,g=!1;if(!this.view.isAutoScrollLocked()){var _=this.scroll.getScrollContainer(),x=s.pageX-S.DomUtils.getAbsolutePositionX(_),w=s.pageY-S.DomUtils.getAbsolutePositionY(_),D=this.scroll.getSize(),C=new T.Size(parseFloat(this.svgElement.style.width),parseFloat(this.svgElement.style.height)),I=D.width;D.width<C.width&&(I-=this.scrollBarWidth);var L=D.height;D.height<C.height&&(L-=this.scrollBarWidth),x<=40?(this.dom.changeByFunc(null,function(){h.view.isAutoScrollLocked()||h.scroll.offsetScroll(-h.getScrollingOffset(x),0)}),g=!0):I-40<=x&&(this.dom.changeByFunc(null,function(){h.view.isAutoScrollLocked()||h.scroll.offsetScroll(h.getScrollingOffset(I-x),0)}),g=!0),w<=40?(this.dom.changeByFunc(null,function(){h.view.isAutoScrollLocked()||h.scroll.offsetScroll(0,-h.getScrollingOffset(w))}),g=!0):L-40<=w&&(this.dom.changeByFunc(null,function(){h.view.isAutoScrollLocked()||h.scroll.offsetScroll(0,h.getScrollingOffset(L-w))}),g=!0)}(g||this.view.isAutoScrollLocked())&&(this.scrollTimer=window.setTimeout(function(){return h.changeScrollPosition(s,a,g)},50)),u&&a()},c.prototype.clearScrollTimer=function(){this.scrollTimer>-1&&(window.clearTimeout(this.scrollTimer),this.scrollTimer=-1)},c.prototype.getScrollingOffset=function(s){var a=Math.pow((40-s)/5,2);return Math.round(Math.min(a,5))},c.createMainElement=function(s){var a=document.createElement("div");return a.setAttribute("class","dxdi-control"),s.appendChild(a),a},c.createSvgElement=function(s,a){void 0===a&&(a=!1);var u=document.createElementNS(f.svgNS,"svg");return u.className.baseVal="dxdi-canvas"+(a?" export":""),s.appendChild(u),u},c}();P.AutoScrollController=d},3872:function(o,P,b){var f,S=this&&this.__extends||(f=function(x,w){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,C){D.__proto__=C}||function(D,C){for(var I in C)C.hasOwnProperty(I)&&(D[I]=C[I])})(x,w)},function(x,w){function D(){this.constructor=x}f(x,w),x.prototype=null===w?Object.create(w):(D.prototype=w.prototype,new D)}),T=this&&this.__awaiter||function(x,w,D,C){return new(D||(D=Promise))(function(I,L){function N(U){try{k(C.next(U))}catch(B){L(B)}}function G(U){try{k(C.throw(U))}catch(B){L(B)}}function k(U){var B;U.done?I(U.value):(B=U.value,B instanceof D?B:new D(function(K){K(B)})).then(N,G)}k((C=C.apply(x,w||[])).next())})},y=this&&this.__generator||function(x,w){var D,C,I,L,N={label:0,sent:function(){if(1&I[0])throw I[1];return I[1]},trys:[],ops:[]};return L={next:G(0),throw:G(1),return:G(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function G(k){return function(U){return function(B){if(D)throw new TypeError("Generator is already executing.");for(;N;)try{if(D=1,C&&(I=2&B[0]?C.return:B[0]?C.throw||((I=C.return)&&I.call(C),0):C.next)&&!(I=I.call(C,B[1])).done)return I;switch(C=0,I&&(B=[2&B[0],I.value]),B[0]){case 0:case 1:I=B;break;case 4:return N.label++,{value:B[1],done:!1};case 5:N.label++,C=B[1],B=[0];continue;case 7:B=N.ops.pop(),N.trys.pop();continue;default:if(!((I=(I=N.trys).length>0&&I[I.length-1])||6!==B[0]&&2!==B[0])){N=0;continue}if(3===B[0]&&(!I||B[1]>I[0]&&B[1]<I[3])){N.label=B[1];break}if(6===B[0]&&N.label<I[1]){N.label=I[1],I=B;break}if(I&&N.label<I[2]){N.label=I[2],N.ops.push(B);break}I[2]&&N.ops.pop(),N.trys.pop();continue}B=w.call(x,N)}catch(K){B=[6,K],C=0}finally{D=I=0}if(5&B[0])throw B[1];return{value:B[0]?B[1]:void 0,done:!0}}([k,U])}}};Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasExportManager=void 0;var d=b(9291),c=b(9279),s=b(3500),a=b(7716),u=b(1114),h=b(6078),g=b(13),_=function(x){function w(D,C,I){var L=x.call(this,1,new h.ExportDOMManipulator(C),I)||this;return L.itemsContainer=D,L}return S(w,x),w.prototype.getSvgImage=function(D,C,I,L){var N=u.RenderHelper.createSvgElement(void 0,!0),G=D.clone().applyConverter(d.UnitConverter.twipsToPixelsF).clone().applyConverter(Math.ceil);s.RenderUtils.updateSvgElementSize(N,G.width,G.height,!0),N.style.backgroundColor=g.ColorUtils.colorToHash(C),this.createTextFloodFilter(this.instanceId,void 0,N,C);var k=!I&&!c.Browser.IE&&this.getExportCssRules();if(k){var U=document.createElementNS(u.svgNS,"style");U.innerHTML=k,N.appendChild(U)}if(L){var B=document.createElementNS(u.svgNS,"rect");B.setAttributeNS(null,"x","0"),B.setAttributeNS(null,"y","0"),B.setAttributeNS(null,"height",G.height.toString()),B.setAttributeNS(null,"width",G.width.toString()),B.setAttributeNS(null,"fill",N.style.backgroundColor),N.appendChild(B)}for(var K=0;K<this.itemsContainer.childNodes.length;K++){var J=this.itemsContainer.childNodes[K].cloneNode(!0);k||this.inlineStyle(J,this.itemsContainer.childNodes[K]),N.appendChild(J)}return N},w.prototype.getSvgImageUrl=function(D,C,I){var L=this.getSvgImage(D,C,I,!1);return this.getSvgBase64String(L)},w.prototype.getSvgString=function(D){return(new XMLSerializer).serializeToString(D)},w.prototype.getSvgBase64String=function(D){var C=this.getSvgString(D);return w.base64Start+this.getBase64EncodeUnicode(C)},w.prototype.getBase64EncodeUnicode=function(D){return btoa(encodeURIComponent(D).replace(/%([0-9A-F]{2})/g,function(C,I){return String.fromCharCode(parseInt("0x"+I,16))}))},w.prototype.getExportCssRules=function(){for(var D=0;D<document.styleSheets.length;D++){var C=this.getRules(document.styleSheets[D]);if(C){for(var I="",L=0;L<C.length;L++){var N=C[L],G=this.isCSSStyleRule(N)?N.selectorText:null;G&&this.checkSelector(G)&&(I+=N.cssText+"\n")}if(I.length>0)return"\n"+I}}},w.prototype.checkSelector=function(D){for(var C=0;C<w.exportStyleRules.length;C++)if(0===D.indexOf(w.exportStyleRules[C]))return!0;return!1},w.prototype.getRules=function(D){try{return this.isCSSStyleSheet(D)?D.rules||D.cssRules:null}catch{}},w.prototype.isCSSStyleSheet=function(D){return void 0!==D.rules},w.prototype.isCSSStyleRule=function(D){return void 0!==D.selectorText},w.prototype.inlineStyle=function(D,C){for(var I=0;I<D.childNodes.length;I++){var L=D.childNodes[I];if(L.tagName)if("g"===L.tagName)this.inlineStyle(L,C.childNodes[I]);else if(L.style){var N=window.getComputedStyle(C.childNodes[I]);if(void 0!==N)for(var G=0;G<w.exportStyleAttributes.length;G++){var k=w.exportStyleAttributes[G];L.style.setProperty(k,N.getPropertyValue(k))}this.inlineStyle(L,C.childNodes[I])}}},w.prototype.exportSvgImage=function(D,C,I){I(this.getSvgImageUrl(D,C,!0))},w.prototype.exportBinaryImage=function(D,C,I,L,N){var G=this.getAbsoluteSize(D).clone().applyConverter(Math.ceil),k=document.createElement("canvas");k.width=G.width,k.height=G.height;var U=k.getContext("2d");if(U.fillStyle=g.ColorUtils.colorToHash(C),U.fillRect(0,0,G.width,G.height),(N||c.Browser.IE)&&"object"==typeof canvg)this.exportBinaryImageCanvgAsync(D,C,k,U,I).then(function(K){return L(K)});else if(c.Browser.IE&&"function"==typeof canvg)this.exportBinaryImageCanvgOld(D,C,k,U,I,L);else{var B=new Image;B.width=G.width,B.height=G.height,B.setAttribute("crossOrigin","anonymous"),B.onload=function(){U.drawImage(B,0,0),L(k.toDataURL(I,1))},B.src=this.getSvgImageUrl(D,C,!0)}},w.prototype.exportBinaryImageCanvgOld=function(D,C,I,L,N,G){var k=this.getSvgImage(D,C,!0,!1),U=this.getSvgString(k);L.drawSvg(U,0,0,null,null,{renderCallback:function(){G(I.toDataURL(N,1))}})},w.prototype.exportBinaryImageCanvgAsync=function(D,C,I,L,N){return T(this,void 0,void 0,function(){var G,k;return y(this,function(U){switch(U.label){case 0:return G=this.getSvgImage(D,C,!0,!0),k=this.getSvgString(G),[4,canvg.Canvg.fromString(L,k).render()];case 1:return U.sent(),[2,I.toDataURL(N,1)]}})})},w.prototype.exportPngImage=function(D,C,I,L){this.exportBinaryImage(D,C,"image/png",I,L)},w.prototype.exportJpgImage=function(D,C,I,L){this.exportBinaryImage(D,C,"image/jpeg",I,L)},w.prototype.notifyModelChanged=function(D){},w.prototype.notifyPageColorChanged=function(D){},w.prototype.notifyPageSizeChanged=function(D,C){},w.base64Start="data:image/svg+xml;base64,",w.exportStyleRules=[".dxdi-canvas .shape ",".dxdi-canvas .connector ",".dxdi-canvas text",".dxdi-canvas.export"],w.exportStyleAttributes=["fill","stroke","stroke-width","stroke-linejoin","font-family","font-size","font-weight","font-style","text-decoration","text-anchor"],w}(a.CanvasManagerBase);P.CanvasExportManager=_},8693:function(o,P,b){var f,S=this&&this.__extends||(f=function(x,w){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,C){D.__proto__=C}||function(D,C){for(var I in C)C.hasOwnProperty(I)&&(D[I]=C[I])})(x,w)},function(x,w){function D(){this.constructor=x}f(x,w),x.prototype=null===w?Object.create(w):(D.prototype=w.prototype,new D)});Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasItemsManager=P.CONNECTOR_CAN_MOVE=P.NOT_VALID_CSSCLASS=void 0;var T=b(2004),y=b(6031),d=b(5329),c=b(3500),s=b(5503),a=b(7959),u=b(6907),h=b(916),g=b(4867);P.NOT_VALID_CSSCLASS="not-valid",P.CONNECTOR_CAN_MOVE="can-move";var _=function(x){function w(D,C,I,L){var N=x.call(this,C,I,L)||this;return N.itemSelectorGroupContainers={},N.itemSelectorElements={},N.itemGroupContainers={},N.itemElements={},N.itemChildElements={},N.primitives={},N.selectorPrimitives={},N.selectedItems={},N.initializeContainerElements(D),N}return S(w,x),w.prototype.initializeContainerElements=function(D){this.itemSelectorsContainer=this.createAndChangePrimitiveElement(new d.GroupPrimitive([],null),D),this.itemsContainer=this.createAndChangePrimitiveElement(new d.GroupPrimitive([],null),D)},w.prototype.clear=function(){this.primitives={},this.selectorPrimitives={},c.RenderUtils.removeContent(this.itemSelectorsContainer),c.RenderUtils.removeContent(this.itemsContainer),this.itemSelectorGroupContainers={},this.itemSelectorElements={},this.itemGroupContainers={},this.itemElements={},this.itemChildElements={},this.selectedItems={}},w.prototype.applyChange=function(D){var C=D.item;return!!this.getItemParent(C.zIndex,C.container&&C.container.key)&&(C instanceof s.Shape?this.applyShapeChange(C,D.type,D.isValid):C instanceof a.Connector&&this.applyConnectorChange(C,D.type,D.isValid),!0)},w.prototype.setPointerEventsNone=function(D,C){var I=D.style;void 0!==I&&void 0!==I.pointerEvents&&(I.pointerEvents=C?"none":"");for(var L=D.childNodes,N=0;N<L.length;N++)this.setPointerEventsNone(L[N],C)},w.prototype.notifyDragStart=function(D){var C=this;D.forEach(function(I){C.itemElements[I]&&C.setPointerEventsNone(C.itemElements[I],!0),C.itemChildElements[I]&&C.setPointerEventsNone(C.itemChildElements[I],!0),C.itemSelectorElements[I]&&C.setPointerEventsNone(C.itemSelectorElements[I],!0)})},w.prototype.notifyDragEnd=function(D){var C=this;D.forEach(function(I){C.itemElements[I]&&C.setPointerEventsNone(C.itemElements[I],!1),C.itemChildElements[I]&&C.setPointerEventsNone(C.itemChildElements[I],!1),C.itemSelectorElements[I]&&C.setPointerEventsNone(C.itemSelectorElements[I],!1)})},w.prototype.notifyDragScrollStart=function(){},w.prototype.notifyDragScrollEnd=function(){},w.prototype.notifyTextInputStart=function(D,C,I,L){u.DomUtils.addClassName(this.itemElements[D.key],"text-input")},w.prototype.notifyTextInputEnd=function(D,C){u.DomUtils.removeClassName(this.itemElements[D.key],"text-input")},w.prototype.notifyTextInputPermissionsCheck=function(D,C){var I=this.itemElements[D.key];C?u.DomUtils.removeClassName(I,P.NOT_VALID_CSSCLASS):u.DomUtils.addClassName(I,P.NOT_VALID_CSSCLASS)},w.prototype.notifyActualZoomChanged=function(D){var C="scale("+D+")";this.dom.changeByFunc(this.itemsContainer,function(I){return I.setAttribute("transform",C)}),this.dom.changeByFunc(this.itemSelectorsContainer,function(I){return I.setAttribute("transform",C)}),this.actualZoom=D},w.prototype.notifyViewAdjusted=function(D){},w.prototype.invalidatePrimitives=function(D){this.primitives[D.key]&&(this.primitives[D.key].forEach(function(C){C.dispose()}),delete this.primitives[D.key]),this.selectorPrimitives[D.key]&&(this.selectorPrimitives[D.key].forEach(function(C){C.dispose()}),delete this.selectorPrimitives[D.key])},w.prototype.getPrimitives=function(D,C){return this.primitives[D.key]||(this.primitives[D.key]=D.createPrimitives(C)),this.primitives[D.key]},w.prototype.getSelectorPrimitives=function(D){return this.selectorPrimitives[D.key]||(this.selectorPrimitives[D.key]=D.createSelectorPrimitives()),this.selectorPrimitives[D.key]},w.prototype.getShapeSelectorClassName=function(D){var C="shape";return D.enableChildren&&(C+=" container"),D.isLocked&&(C+=" locked"),C},w.prototype.getShapeClassName=function(D,C){var I=this.getShapeSelectorClassName(D);return C?I:I+" "+P.NOT_VALID_CSSCLASS},w.prototype.applyShapeChange=function(D,C,I){var L=D.key,N=D.container&&D.container.key,G=this.getItemSelectorGroupContainer(D.zIndex,N),k=this.getItemGroupContainer(D.zIndex,N),U=this.getShapeClassName(D,I);switch(C){case T.ItemChangeType.Create:this.itemSelectorElements[L]=this.createItemElements(L,this.getSelectorPrimitives(D),G,this.getShapeSelectorClassName(D),y.MouseEventElementType.Shape),this.itemElements[L]=this.createItemElements(L,this.getPrimitives(D,this.instanceId),k,U,y.MouseEventElementType.Shape),D.enableChildren&&(this.itemChildElements[L]=this.createItemElements(L,[],k,"container-children",y.MouseEventElementType.Undefined),this.changeItemChildrenVisibility(this.itemChildElements[L],D.expanded));break;case T.ItemChangeType.Remove:this.removeItemCustomContent(this.itemSelectorElements[L],this.getSelectorPrimitives(D)),this.removeItemCustomContent(this.itemElements[L],this.getPrimitives(D,this.instanceId)),this.invalidatePrimitives(D),this.removeItemElements(this.itemSelectorElements[L]),delete this.itemSelectorElements[L],this.removeItemElements(this.itemElements[L]),delete this.itemElements[L],this.itemChildElements[L]&&(this.removeItemElements(this.itemChildElements[L]),delete this.itemChildElements[L],delete this.itemGroupContainers[L],delete this.itemSelectorGroupContainers[L]);break;case T.ItemChangeType.UpdateStructure:case T.ItemChangeType.UpdateProperties:case T.ItemChangeType.Update:C!==T.ItemChangeType.Update&&(C===T.ItemChangeType.UpdateStructure&&(this.removeItemCustomContent(this.itemSelectorElements[L],this.getSelectorPrimitives(D)),this.removeItemCustomContent(this.itemElements[L],this.getPrimitives(D,this.instanceId))),this.invalidatePrimitives(D)),this.changeItemElements(this.getSelectorPrimitives(D),this.itemSelectorElements[L],C===T.ItemChangeType.UpdateStructure),this.changeItemElements(this.getPrimitives(D,this.instanceId),this.itemElements[L],C===T.ItemChangeType.UpdateStructure),this.changeItemClassName(this.itemElements[L],U),this.itemChildElements[L]&&this.changeItemChildrenVisibility(this.itemChildElements[L],D.expanded),G!==(this.itemSelectorElements[L]&&this.itemSelectorElements[L].parentNode)&&this.moveItemElements(G,this.itemSelectorElements[L]),k!==(this.itemElements[L]&&this.itemElements[L].parentNode)&&this.moveItemElements(k,this.itemElements[L]),this.itemChildElements[L]&&k!==this.itemChildElements[L].parentNode&&this.moveItemElements(k,this.itemChildElements[L]);break;case T.ItemChangeType.UpdateClassName:this.changeItemClassName(this.itemElements[L],U)}},w.prototype.getConnectorSelectorClassName=function(D){var C="connector";return g.ModelUtils.canMoveConnector(this.selectedItems,D)?C+" "+P.CONNECTOR_CAN_MOVE:C},w.prototype.getConnectorClassName=function(D,C){var I=this.getConnectorSelectorClassName(D);return C?I:I+" "+P.NOT_VALID_CSSCLASS},w.prototype.applyConnectorChange=function(D,C,I){var L=D.key,N=D.container&&D.container.key,G=this.getItemSelectorGroupContainer(D.zIndex,N),k=this.getItemGroupContainer(D.zIndex,N),U=this.getConnectorClassName(D,I);switch(C){case T.ItemChangeType.Create:this.itemSelectorElements[L]=this.createItemElements(L,this.getSelectorPrimitives(D),G,this.getConnectorSelectorClassName(D),y.MouseEventElementType.Connector),this.itemElements[L]=this.createItemElements(L,this.getPrimitives(D,this.instanceId),k,U,y.MouseEventElementType.Connector);break;case T.ItemChangeType.Remove:this.removeItemCustomContent(this.itemSelectorElements[L],this.getSelectorPrimitives(D)),this.removeItemCustomContent(this.itemElements[L],this.getPrimitives(D,this.instanceId)),this.invalidatePrimitives(D),this.removeItemElements(this.itemSelectorElements[L]),delete this.itemSelectorElements[L],this.removeItemElements(this.itemElements[L]),delete this.itemElements[L];break;case T.ItemChangeType.UpdateStructure:case T.ItemChangeType.UpdateProperties:case T.ItemChangeType.Update:C!==T.ItemChangeType.Update&&(C===T.ItemChangeType.UpdateStructure&&(this.removeItemCustomContent(this.itemSelectorElements[L],this.getSelectorPrimitives(D)),this.removeItemCustomContent(this.itemElements[L],this.getPrimitives(D,this.instanceId))),this.invalidatePrimitives(D)),this.changeItemElements(this.getSelectorPrimitives(D),this.itemSelectorElements[L],C===T.ItemChangeType.UpdateStructure),this.changeItemClassName(this.itemSelectorElements[L],this.getConnectorSelectorClassName(D)),this.changeItemElements(this.getPrimitives(D,this.instanceId),this.itemElements[L],C===T.ItemChangeType.UpdateStructure),this.changeItemClassName(this.itemElements[L],U),G!==(this.itemSelectorElements[L]&&this.itemSelectorElements[L].parentNode)&&this.moveItemElements(G,this.itemSelectorElements[L]),k!==(this.itemElements[L]&&this.itemElements[L].parentNode)&&this.moveItemElements(k,this.itemElements[L]);break;case T.ItemChangeType.UpdateClassName:this.changeItemClassName(this.itemSelectorElements[L],this.getConnectorSelectorClassName(D)),this.changeItemClassName(this.itemElements[L],U)}},w.prototype.createItemElements=function(D,C,I,L,N){var G=this.createAndChangePrimitiveElement(new d.GroupPrimitive([],L,void 0,void 0,function(k){return c.RenderUtils.setElementEventData(k,N,D)}),I);return this.createAndChangePrimitivesElements(C,G),G},w.prototype.changeItemElements=function(D,C,I){I||D.length!==C.childNodes.length?(c.RenderUtils.removeContent(C),this.createAndChangePrimitivesElements(D,C)):this.dom.changeChildrenByPrimitives(D,C)},w.prototype.changeItemClassName=function(D,C){C&&D&&this.changePrimitiveElement(new d.GroupPrimitive([],C),D)},w.prototype.removeItemElements=function(D){D&&D.parentNode&&D.parentNode.removeChild(D)},w.prototype.removeItemCustomContent=function(D,C){D&&C&&C.length===D.childNodes.length&&C.forEach(function(I,L){I.destroyCustomContent(D.childNodes[L])})},w.prototype.moveItemElements=function(D,C,I){C&&D&&(I?D.insertBefore(C,I):D.appendChild(C))},w.prototype.changeItemChildrenVisibility=function(D,C){D.style.display=C?"":"none"},w.prototype.getItemGroupContainerKey=function(D,C){return void 0!==C?D+"_"+C:D.toString()},w.prototype.getItemGroupContainer=function(D,C){var I=void 0!==C?this.getItemParent(D,C):this.itemsContainer,L=C||"Main";if(void 0===this.itemGroupContainers[L]||void 0===this.itemGroupContainers[L][D]){void 0===this.itemGroupContainers[L]&&(this.itemGroupContainers[L]=[]);var N=Object.keys(this.itemGroupContainers[L]).map(function(G){return+G}).sort().filter(function(G){return G>D})[0];this.itemGroupContainers[L][D]=this.createAndChangePrimitiveElement(new d.GroupPrimitive([],null,D),I,this.itemGroupContainers[L][N])}return this.itemGroupContainers[L][D]},w.prototype.getItemSelectorGroupContainer=function(D,C){var I=void 0!==C?this.getItemSelectorParent(D,C):this.itemSelectorsContainer,L=C||"Main";if(void 0===this.itemSelectorGroupContainers[L]||void 0===this.itemSelectorGroupContainers[L][D]){void 0===this.itemSelectorGroupContainers[L]&&(this.itemSelectorGroupContainers[L]=[]);var N=Object.keys(this.itemSelectorGroupContainers[L]).map(function(G){return+G}).sort().filter(function(G){return G>D})[0];this.itemSelectorGroupContainers[L][D]=this.createAndChangePrimitiveElement(new d.GroupPrimitive([],null,D),I,this.itemSelectorGroupContainers[L][N])}return this.itemSelectorGroupContainers[L][D]},w.prototype.getItemParent=function(D,C){return void 0!==C?this.itemChildElements[C]:this.getItemGroupContainer(D)},w.prototype.getItemSelectorParent=function(D,C){return void 0!==C?this.itemChildElements[C]:this.getItemSelectorGroupContainer(D)},w.prototype.notifySelectionChanged=function(D){var C=this,I=g.ModelUtils.createSelectedItems(D),L=[];this.populateItems(L,I,this.selectedItems),this.populateItems(L,this.selectedItems,I),this.selectedItems=I,L.forEach(function(N){N instanceof a.Connector&&!C.pendingRemoveChanges[N.key]&&C.applyOrPostponeChanges([new T.ItemChange(N,T.ItemChangeType.UpdateClassName,!0)])})},w.prototype.populateItems=function(D,C,I){Object.keys(C).forEach(function(L){I[L]||D.push(C[L])})},w}(h.CanvasManager);P.CanvasItemsManager=_},916:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasManager=void 0;var T=b(2004),y=function(d){function c(){var s=null!==d&&d.apply(this,arguments)||this;return s.pendingChanges={},s.pendingRemoveChanges={},s.updatesLock=0,s}return S(c,d),c.prototype.beginUpdate=function(){this.updatesLock++},c.prototype.endUpdate=function(){this.updatesLock--,0===this.updatesLock&&this.applyPendingChanges()},c.prototype.getPendingChanges=function(){var s=this;return Object.keys(this.pendingChanges).map(function(a){return s.pendingChanges[a]})},c.prototype.getPendingRemoveChanges=function(){var s=this;return Object.keys(this.pendingRemoveChanges).map(function(a){return s.pendingRemoveChanges[a]})},c.prototype.applyPendingChanges=function(){var s=this.getPendingRemoveChanges();s.length&&(this.applyChangesCore(s),this.pendingRemoveChanges={});var a=this.getPendingChanges();a.length&&(this.applyChangesCore(a),this.pendingChanges={})},c.prototype.applyChangesCore=function(s){var a=this,u=[];s.forEach(function(h){a.applyChange(h)||u.push(h)}),u.length&&u.length!==s.length&&this.applyChangesCore(u)},c.prototype.postponeChanges=function(s){var a=this;s.forEach(function(u){if(u.type===T.ItemChangeType.Remove)a.pendingRemoveChanges[u.key]=u,delete a.pendingChanges[u.key];else if(a.pendingChanges[u.key])u.type===T.ItemChangeType.Create?a.pendingChanges[u.key]=u:u.type===T.ItemChangeType.UpdateStructure?a.pendingChanges[u.key].type===T.ItemChangeType.UpdateProperties&&(a.pendingChanges[u.key]=u):u.type===T.ItemChangeType.UpdateProperties?a.pendingChanges[u.key].type===T.ItemChangeType.Update&&(a.pendingChanges[u.key]=u):u.type===T.ItemChangeType.UpdateClassName&&a.pendingChanges[u.key].type===T.ItemChangeType.UpdateClassName&&(a.pendingChanges[u.key]=u);else{if(a.pendingRemoveChanges[u.key]&&u.type!==T.ItemChangeType.Create)throw new Error("Incorrect model changes sequence.");a.pendingChanges[u.key]=u}})},c.prototype.applyOrPostponeChanges=function(s){0===this.updatesLock?this.applyChangesCore(s):this.postponeChanges(s)},c.prototype.notifyModelChanged=function(s){this.applyOrPostponeChanges(s)},c.prototype.notifyPageColorChanged=function(s){},c.prototype.notifyPageSizeChanged=function(s,a){},c}(b(7716).CanvasManagerBase);P.CanvasManager=y},7716:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasManagerBase=P.PAGE_BG_TEXTFLOOR_FILTER_IDPREFIX=void 0;var f=b(3360),S=b(9291);P.PAGE_BG_TEXTFLOOR_FILTER_IDPREFIX="page-text-flood";var T=function(){function y(d,c,s){this.elements={},this.instanceId=s,this.actualZoom=d,this.dom=c}return y.prototype.createAndChangePrimitivesElements=function(d,c){var s=this;d.forEach(function(a){s.createAndChangePrimitiveElement(a,c)})},y.prototype.createPrimitiveElement=function(d,c,s){return this.dom.createElement(d,c,s)},y.prototype.createAndChangePrimitiveElement=function(d,c,s){var a=this.createPrimitiveElement(d,c,s);return this.dom.changeByPrimitive(a,d),a},y.prototype.changePrimitiveElement=function(d,c){this.dom.changeByPrimitive(c,d)},y.prototype.getOrCreateElement=function(d,c,s,a){var u=d&&this.elements[d]||(this.elements[d]=this.createPrimitiveElement(c,s,a));return this.changePrimitiveElement(c,u),u},y.prototype.createTextFloodFilter=function(d,c,s,a){this.getOrCreateElement(c,new f.TextFloodFilterPrimitive(P.PAGE_BG_TEXTFLOOR_FILTER_IDPREFIX+d,a),s)},y.prototype.getAbsoluteSize=function(d){return d.clone().applyConverter(S.UnitConverter.twipsToPixelsF).clone().multiply(this.actualZoom,this.actualZoom)},y}();P.CanvasManagerBase=T},6043:function(o,P,b){var f,S=this&&this.__extends||(f=function(D,C){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,L){I.__proto__=L}||function(I,L){for(var N in L)L.hasOwnProperty(N)&&(I[N]=L[N])})(D,C)},function(D,C){function I(){this.constructor=D}f(D,C),D.prototype=null===C?Object.create(C):(I.prototype=C.prototype,new I)});Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasPageManager=void 0;var T=b(1552),y=b(4716),d=b(7724),c=b(1932),s=b(4593),a=b(7716),u=b(6353),h=b(8900),g=b(3500),_=b(13),x=b(9291),w=function(D){function C(I,L,N,G){var k=D.call(this,L.zoomLevel,N,G)||this;return k.snapPoint=new h.Point(0,0),k.gridPatternId=g.RenderUtils.generateSvgElementId("gridPattern"),k.pagesGridPatternId=g.RenderUtils.generateSvgElementId("pagesGridPattern"),k.pagesGridClipId=g.RenderUtils.generateSvgElementId("pagesGridClip"),k.pageColor=L.pageColor,k.modelSize=L.modelSize,k.simpleView=L.simpleView,k.gridSize=L.gridSize,k.gridVisible=L.gridVisible,k.pageSize=L.pageLandscape?new u.Size(L.pageSize.height,L.pageSize.width):L.pageSize,k.canvasViewOffset=new h.Point(0,0),k.initContainers(I),k}return S(C,D),C.prototype.initContainers=function(I){this.backgroundContainer=I},C.prototype.redraw=function(){this.redrawPage(this.pageColor),this.redrawGrid()},C.prototype.redrawPage=function(I){var L=new T.Style;L.fill=_.ColorUtils.colorToHash(I),this.getOrCreateElement("page-bg",new y.RectanglePrimitive(0,0,"100%","100%",L,"page"),this.backgroundContainer),this.createTextFloodFilter(this.instanceId,"page-bg-textflood-filter",this.backgroundContainer,I)},C.prototype.redrawGrid=function(){this.updateGridElements(),this.updatePagesGridElements()},C.prototype.getGridRectElement=function(I){return void 0===this.gridRectElement&&(this.gridRectElement=this.createPrimitiveElement(I,this.backgroundContainer)),this.gridRectElement},C.prototype.getGridPatternElement=function(I){return void 0===this.gridPatternElement&&(this.gridPatternElement=this.createPrimitiveElement(I,this.backgroundContainer)),this.gridPatternElement},C.prototype.updateGridElements=function(){var I=this,L=new y.RectanglePrimitive("0","0","100%","100%",null,"grid",null,function(q){q.style.setProperty("fill",g.RenderUtils.getUrlPathById(I.gridPatternId))}),N=this.getGridRectElement(L);if(this.gridVisible){N.style.display="",this.changePrimitiveElement(L,N);for(var G=x.UnitConverter.twipsToPixelsF(this.gridSize)*this.actualZoom,k=[0,1,2,3,4].map(function(q){return Math.round(G*q)}),U=[new d.PathPrimitiveMoveToCommand(k[4].toString(),"0"),new d.PathPrimitiveLineToCommand(k[4].toString(),k[4].toString()),new d.PathPrimitiveLineToCommand("0",k[4].toString())],B=[],K=1;K<=3;K++)B.push(new d.PathPrimitiveMoveToCommand(k[K].toString(),"0")),B.push(new d.PathPrimitiveLineToCommand(k[K].toString(),k[4].toString()));for(K=1;K<=3;K++)B.push(new d.PathPrimitiveMoveToCommand("0",k[K].toString())),B.push(new d.PathPrimitiveLineToCommand(k[4].toString(),k[K].toString()));var J=4*G,ie=this.simpleView?this.canvasViewOffset:h.Point.zero(),re=new c.PatternPrimitive(this.gridPatternId,[this.createGridPathPrimitive(U,"grid-outer-line"),this.createGridPathPrimitive(B,"grid-inner-line")],this.createGridPatternPrimitivePosition(ie.x,this.snapPoint.x,J),this.createGridPatternPrimitivePosition(ie.y,this.snapPoint.y,J),J.toString(),J.toString());this.changePrimitiveElement(re,this.getGridPatternElement(re))}else N.style.display="none"},C.prototype.createGridPatternPrimitivePosition=function(I,L,N){return(((I+L*this.actualZoom)%N-N)%N).toString()},C.prototype.createGridPathPrimitive=function(I,L){return new d.PathPrimitive(I,T.StrokeStyle.default1pxNegativeOffsetInstance,L)},C.prototype.getPagesGridRectElement=function(I){return this.getOrCreateElement("grid-pages-rect",I,this.backgroundContainer)},C.prototype.getPagesGridClipPathElement=function(I){return void 0===this.pagesGridClipPathElement&&(this.pagesGridClipPathElement=this.createPrimitiveElement(I,this.backgroundContainer)),this.pagesGridClipPathElement},C.prototype.getPagesGridPatternElement=function(I){return void 0===this.pagesGridPatternElement&&(this.pagesGridPatternElement=this.createPrimitiveElement(I,this.backgroundContainer)),this.pagesGridPatternElement},C.prototype.updatePagesGridElements=function(){var I=this,L=this.getAbsoluteSize(this.pageSize),N=new y.RectanglePrimitive("0","0","100%","100%",null,"grid-page",this.pagesGridClipId,function(K){K.style.setProperty("fill",g.RenderUtils.getUrlPathById(I.pagesGridPatternId)),K.style.setProperty("display",I.simpleView?"none":"")});if(this.getPagesGridRectElement(N),!this.simpleView){var G=this.modelSize.clone().multiply(this.actualZoom,this.actualZoom),k=[new d.PathPrimitiveMoveToCommand((L.width-1).toString(),"0"),new d.PathPrimitiveLineToCommand((L.width-1).toString(),(L.height-1).toString()),new d.PathPrimitiveLineToCommand("0",(L.height-1).toString())],U=new c.PatternPrimitive(this.pagesGridPatternId,[new d.PathPrimitive(k,null,"pages-grid-line")],0,0,L.width.toString(),L.height.toString());this.changePrimitiveElement(U,this.getPagesGridPatternElement(U));var B=new s.ClipPathPrimitive(this.pagesGridClipId,[new y.RectanglePrimitive(0,0,(x.UnitConverter.twipsToPixelsF(G.width)-4).toString(),(x.UnitConverter.twipsToPixelsF(G.height)-4).toString())]);this.changePrimitiveElement(B,this.getPagesGridClipPathElement(B))}},C.prototype.notifyModelSizeChanged=function(I,L){this.modelSize=I.clone(),this.redraw()},C.prototype.notifyModelRectangleChanged=function(I){},C.prototype.notifySnapPointPositionChanged=function(I){this.snapPoint=I.clone().applyConverter(x.UnitConverter.twipsToPixelsF),this.redrawGrid()},C.prototype.notifyPageColorChanged=function(I){this.pageColor=I,this.redrawPage(this.pageColor)},C.prototype.notifyModelChanged=function(I){},C.prototype.notifyPageSizeChanged=function(I,L){this.pageSize=L?new u.Size(I.height,I.width):I.clone(),this.redraw()},C.prototype.notifyActualZoomChanged=function(I){this.actualZoom=I,this.redraw()},C.prototype.notifyViewAdjusted=function(I){this.canvasViewOffset.equals(I)||(this.canvasViewOffset=I,this.simpleView&&this.redraw())},C.prototype.notifyViewChanged=function(I){this.simpleView=I,this.redraw()},C.prototype.notifyGridChanged=function(I,L){this.gridVisible=I,this.gridSize=L,this.redraw()},C}(a.CanvasManagerBase);P.CanvasPageManager=w},4e3:function(o,P,b){var f,S=this&&this.__extends||(f=function(oe,ae){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,he){ee.__proto__=he}||function(ee,he){for(var de in he)he.hasOwnProperty(de)&&(ee[de]=he[de])})(oe,ae)},function(oe,ae){function ee(){this.constructor=oe}f(oe,ae),oe.prototype=null===ae?Object.create(ae):(ee.prototype=ae.prototype,new ee)});Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasSelectionManager=P.ACTIVE_SELECTION_CSSCLASS=P.SELECTION_ELEMENT_CLASSNAMES=void 0;var T=b(7716),y=b(5329),d=b(3500),c=b(6031),s=b(3742),a=b(8675),u=b(8900),h=b(371),g=b(5503),_=b(7959),x=b(4612),w=b(4716),D=b(7724),C=b(9416),I=b(418),L=b(1552),N=b(9291),G=b(4246),k=b(9279),U=b(6907),B=b(8693),K=b(916),J=b(5596),ie=b(8679),re=b(4867),q="-1";P.SELECTION_ELEMENT_CLASSNAMES={SELECTION_RECTANGLE:"selection-rect",CONNECTION_POINT:"connection-point",ACTIVE:"active",CONTAINER_TARGET:"container-target",CONNECTION_TARGET:"connection-target",EXTENSION_LINE:"extension-line",CONNECTION_MARK:"connection-mark",SELECTION_MARK:"selection-mark",LOCKED_SELECTION_MARK:"locked-selection-mark",ITEMS_SELECTION_RECT:"items-selection-rect",CONNECTOR_MULTI_SELECTION:"connector-multi-selection",CONNECTOR_SELECTION:"connector-selection",CONNECTOR_POINT_MARK:"connector-point-mark",CONNECTOR_SELECTION_MASK:"connector-selection-mask",CONNECTOR_SIDE_MARK:"connector-side-mark",ITEM_SELECTION_RECT:"item-selection-rect",ITEM_MULTI_SELECTION:"item-multi-selection-rect"},P.ACTIVE_SELECTION_CSSCLASS="dxdi-active-selection";var Y=function(oe){function ae(ee,he,de,ue,be){var ve=oe.call(this,he,ue,be)||this;return ve.readOnly=de,ve.connectionPointElements=[],ve.extensionLineElements=[],ve.selectionMap={},ve.parentContainer=ee,ve.initializeContainerElements(ee),ve}return S(ae,oe),ae.prototype.initializeContainerElements=function(ee){this.itemSelectionContainer=this.createAndChangePrimitiveElement(new y.GroupPrimitive([],null),ee),this.visualizersContainer=this.createAndChangePrimitiveElement(new y.GroupPrimitive([],null),ee),this.selectionMarksContainer=this.createAndChangePrimitiveElement(new y.GroupPrimitive([],null),ee)},ae.prototype.clear=function(){d.RenderUtils.removeContent(this.itemSelectionContainer),d.RenderUtils.removeContent(this.selectionMarksContainer),d.RenderUtils.removeContent(this.visualizersContainer),this.selectionRectElement=void 0,this.resizeInfoElement=void 0,this.connectionPointElements=[],this.connectionTargetElement=void 0,this.containerTargetElement=void 0,this.extensionLineElements=[],this.selectionMap={}},ae.prototype.showSelectionRect=function(ee){U.DomUtils.addClassName(this.parentContainer,P.ACTIVE_SELECTION_CSSCLASS);var he=new w.RectanglePrimitive(ee.x,ee.y,ee.width,ee.height,L.StrokeStyle.default1pxInstance,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_RECTANGLE),de=this.getSelectionRectElement(he);this.changePrimitiveElement(he,de)},ae.prototype.hideSelectionRect=function(){U.DomUtils.removeClassName(this.parentContainer,P.ACTIVE_SELECTION_CSSCLASS),void 0!==this.selectionRectElement&&this.dom.changeByFunc(this.selectionRectElement,function(ee){return ee.style.display="none"})},ae.prototype.getSelectionRectElement=function(ee){return void 0!==this.selectionRectElement?this.dom.changeByFunc(this.selectionRectElement,function(he){return he.style.display=""}):this.selectionRectElement=this.createPrimitiveElement(ee,this.visualizersContainer),this.selectionRectElement},ae.prototype.showResizeInfo=function(ee,he){var de=new w.RectanglePrimitive(ee.x,ee.y,0,0,L.StrokeStyle.default1pxInstance),ue=new y.GroupPrimitive([de,new C.TextPrimitive(ee.x,ee.y,he,G.TextOwner.Resize)],"resize-info"),be=this.getResizeInfoElement(ue);this.changePrimitiveElement(ue,be);var ve=this.dom.measurer.measureTextLine(he,null,G.TextOwner.Resize).applyConverter(N.UnitConverter.pixelsToTwips);de.width=ve.width+2*ae.resizeInfoTextOffset,de.height=ve.height+2*ae.resizeInfoTextOffset,de.x=ee.x-ve.width/2-ae.resizeInfoTextOffset,de.y=ee.y-ve.height/2-ae.resizeInfoTextOffset,this.changePrimitiveElement(ue,be)},ae.prototype.hideResizeInfo=function(){void 0!==this.resizeInfoElement&&this.dom.changeByFunc(this.resizeInfoElement,function(ee){return ee.style.display="none"})},ae.prototype.getResizeInfoElement=function(ee){return void 0!==this.resizeInfoElement?this.dom.changeByFunc(this.resizeInfoElement,function(he){return he.style.display=""}):this.resizeInfoElement=this.createPrimitiveElement(ee,this.visualizersContainer),this.resizeInfoElement},ae.prototype.getConnectionPointClassName=function(ee,he){var de=P.SELECTION_ELEMENT_CLASSNAMES.CONNECTION_POINT;return ee&&(de+=" "+P.SELECTION_ELEMENT_CLASSNAMES.ACTIVE),he||(de+=" "+B.NOT_VALID_CSSCLASS),de},ae.prototype.showConnectionPoint=function(ee,he,de,ue,be,ve){this.showConnectionPointCore(2*ee,he.x,he.y,ae.connectionPointLargeSize,ae.connectionPointLargeSize,c.MouseEventElementType.ShapeConnectionPoint,de,ue,P.SELECTION_ELEMENT_CLASSNAMES.CONNECTION_POINT+" selector"+(ve?"":" "+B.NOT_VALID_CSSCLASS)),this.showConnectionPointCore(2*ee+1,he.x,he.y,ae.connectionPointSmallSize,ae.connectionPointSmallSize,c.MouseEventElementType.ShapeConnectionPoint,de,ue,this.getConnectionPointClassName(be,ve))},ae.prototype.showConnectionPointCore=function(ee,he,de,ue,be,ve,le,Ce,ye){var ge=new I.EllipsePrimitive(he,de,ue,be,null,ye,function(xe){return d.RenderUtils.setElementEventData(xe,ve,le,Ce)}),fe=this.getConnectionPointElement(ge,ee);this.changePrimitiveElement(ge,fe)},ae.prototype.hideConnectionPoints=function(){for(var ee=0;ee<this.connectionPointElements.length;ee++)this.dom.changeByFunc(this.connectionPointElements[ee],function(he){return he.style.display="none"})},ae.prototype.getConnectionPointElement=function(ee,he){var de=this.connectionPointElements[he];return void 0!==de?this.dom.changeByFunc(de,function(ue){return ue.style.display=""}):(de=this.createPrimitiveElement(ee,this.visualizersContainer),this.connectionPointElements[he]=de),de},ae.prototype.showContainerTarget=function(ee,he){var de=new w.RectanglePrimitive(he.x,he.y,he.width,he.height,null,P.SELECTION_ELEMENT_CLASSNAMES.CONTAINER_TARGET),ue=this.getContainerTargetElement(de);this.changePrimitiveElement(de,ue)},ae.prototype.hideContainerTarget=function(){this.containerTargetElement&&this.dom.changeByFunc(this.containerTargetElement,function(ee){return ee.style.display="none"})},ae.prototype.getContainerTargetElement=function(ee){return void 0!==this.containerTargetElement?this.dom.changeByFunc(this.containerTargetElement,function(he){return he.style.display=""}):this.containerTargetElement=this.createPrimitiveElement(ee,this.itemSelectionContainer),this.containerTargetElement},ae.prototype.showConnectionTarget=function(ee,he){var de=new w.RectanglePrimitive(he.x,he.y,he.width,he.height,null,P.SELECTION_ELEMENT_CLASSNAMES.CONNECTION_TARGET),ue=this.getConnectionTargetElement(de);this.changePrimitiveElement(de,ue)},ae.prototype.hideConnectionTarget=function(){this.connectionTargetElement&&this.dom.changeByFunc(this.connectionTargetElement,function(ee){return ee.style.display="none"})},ae.prototype.getConnectionTargetElement=function(ee){return void 0!==this.connectionTargetElement?this.dom.changeByFunc(this.connectionTargetElement,function(he){return he.style.display=""}):this.connectionTargetElement=this.createPrimitiveElement(ee,this.itemSelectionContainer),this.connectionTargetElement},ae.prototype.showExtensionLine=function(ee,he,de,ue,be){var ve=P.SELECTION_ELEMENT_CLASSNAMES.EXTENSION_LINE;he!==h.ExtensionLineType.VerticalCenterAfter&&he!==h.ExtensionLineType.VerticalCenterBefore&&he!==h.ExtensionLineType.HorizontalCenterAbove&&he!==h.ExtensionLineType.HorizontalCenterBelow||(ve+=" center"),he!==h.ExtensionLineType.VerticalCenterToPageCenter&&he!==h.ExtensionLineType.HorizontalCenterToPageCenter&&he!==h.ExtensionLineType.LeftToPageCenter&&he!==h.ExtensionLineType.RightToPageCenter&&he!==h.ExtensionLineType.TopToPageCenter&&he!==h.ExtensionLineType.BottomToPageCenter||(ve+=" page");var le=0,Ce=0,ye=0,ge=0,fe=0,xe=0,Te=0,Ee=0;de.y===ue.y?(le=de.x-ae.extensionLineWidth,Ce=de.y-ae.extensionLineEndingSize,ye=de.x-ae.extensionLineWidth,ge=de.y+ae.extensionLineEndingSize,fe=ue.x-ae.extensionLineWidth,xe=de.y-ae.extensionLineEndingSize,Te=ue.x-ae.extensionLineWidth,Ee=de.y+ae.extensionLineEndingSize):de.x===ue.x&&(le=de.x-ae.extensionLineEndingSize,Ce=de.y-ae.extensionLineWidth,ye=de.x+ae.extensionLineEndingSize,ge=de.y-ae.extensionLineWidth,fe=de.x-ae.extensionLineEndingSize,xe=ue.y-ae.extensionLineWidth,Te=de.x+ae.extensionLineEndingSize,Ee=ue.y-ae.extensionLineWidth);var Oe=0,ze=0;he!==h.ExtensionLineType.RightToRightAbove&&he!==h.ExtensionLineType.RightToRightBelow||(Oe-=ae.extensionLineWidth),he!==h.ExtensionLineType.BottomToBottomAfter&&he!==h.ExtensionLineType.BottomToBottomBefore||(ze-=ae.extensionLineWidth);var $e=[new D.PathPrimitive([D.PathPrimitiveMoveToCommand.fromPoint(de.clone().offset(Oe,ze)),D.PathPrimitiveLineToCommand.fromPoint(ue.clone().offset(Oe,ze))],L.StrokeStyle.default1pxInstance,"size-line"),new D.PathPrimitive([new D.PathPrimitiveMoveToCommand(le,Ce),new D.PathPrimitiveLineToCommand(ye,ge),new D.PathPrimitiveMoveToCommand(fe,xe),new D.PathPrimitiveLineToCommand(Te,Ee)],L.StrokeStyle.default1pxInstance),new C.TextPrimitive((ue.x+de.x)/2,(ue.y+de.y)/2,be,G.TextOwner.ExtensionLine,void 0,void 0,void 0,null,void 0,null,T.PAGE_BG_TEXTFLOOR_FILTER_IDPREFIX+this.instanceId)],Be=new y.GroupPrimitive($e,ve),Ue=this.getExtensionLineElement(Be,ee);this.changePrimitiveElement(Be,Ue)},ae.prototype.hideExtensionLines=function(){for(var ee=0;ee<this.extensionLineElements.length;ee++)this.extensionLineElements[ee]&&this.dom.changeByFunc(this.extensionLineElements[ee],function(he){return he.style.display="none"})},ae.prototype.getExtensionLineElement=function(ee,he){var de=this.extensionLineElements[he];return void 0!==de?this.dom.changeByFunc(de,function(ue){return ue.style.display=""}):(de=this.createPrimitiveElement(ee,this.visualizersContainer),this.extensionLineElements[he]=de),de},ae.prototype.getOrCreateShapeSelection=function(ee,he){var de=this.selectionMap[ee.key];return de||(de=new pe(this.itemSelectionContainer,this.selectionMarksContainer,this.actualZoom,this.readOnly,this.dom,ee.key,ee.isLocked,ee.rectangle,ee.style,ee.allowResizeHorizontally,ee.allowResizeVertically,ee.description.getParameterPoints(ee)),this.selectionMap[ee.key]=de),he&&(he[ee.key]=!0),de},ae.prototype.getOrCreateConnectorSelection=function(ee,he){var de=this.selectionMap[ee.key],ue=ee.getRenderPoints(!0),be=ee.getRenderPoints(!1);return de||(de=new z(this.itemSelectionContainer,this.selectionMarksContainer,this.actualZoom,this.readOnly,this.dom,ee.key,ee.isLocked,ee.rectangle,ue,ee.style,ee.styleText,ee.enableText,ee.texts.map(function(ve){var le=a.GeometryUtils.getPathPointByPosition(be,ve.position);return{text:ee.getText(ve.position),point:le[0],pointIndex:le[1],pos:ve.position}}).sort(function(ve,le){return ve.pos-le.pos}),ee.points,ee.properties.lineOption),this.selectionMap[ee.key]=de),he&&(he[ee.key]=!0),de},ae.prototype.getOrCreateMultipleSelection=function(ee){var he=this.selectionMap[q];return he||(he=new te(this.itemSelectionContainer,this.selectionMarksContainer,this.actualZoom,this.readOnly,this.dom),this.selectionMap[q]=he),ee[q]=!0,he},ae.prototype.getMultipleSelection=function(){return this.selectionMap[q]},ae.prototype.updateShapeSelection=function(ee,he){ee.key in this.selectionMap&&(this.getOrCreateShapeSelection(ee).onModelChanged(ee.isLocked,ee.rectangle,ee.style,ee.allowResizeHorizontally,ee.allowResizeVertically,ee.description.getParameterPoints(ee)),he&&he.onModelItemChanged(ee.key,ee.rectangle))},ae.prototype.updateConnectorSelection=function(ee,he){if(ee.key in this.selectionMap){var de=ee.getRenderPoints(!0),ue=ee.getRenderPoints(!1);this.getOrCreateConnectorSelection(ee).onModelChanged(ee.isLocked,ee.rectangle,de,ee.style,ee.styleText,ee.enableText,ee.texts.map(function(be){var ve=a.GeometryUtils.getPathPointByPosition(ue,be.position);return{text:ee.getText(be.position),pointIndex:ve[1],pos:be.position,point:ve[0]}}).sort(function(be,ve){return be.pos-ve.pos}),ee.points,ee.properties.lineOption),he&&he.onModelItemChanged(ee.key,ee.rectangle)}},ae.prototype.hideOutdatedSelection=function(ee){var he=this;Object.keys(this.selectionMap).filter(function(de){return!ee[de]}).forEach(function(de){he.selectionMap[de].destroy(),delete he.selectionMap[de]})},ae.prototype.selectionCanBeDrawn=function(ee){return!ee.container||ee.container.expanded&&this.selectionCanBeDrawn(ee.container)},ae.prototype.notifySelectionChanged=function(ee){var he=this,de=ee.getSelectedItems(!0).filter(function(ge){return he.selectionCanBeDrawn(ge)}),ue={},be=de.length>1,ve=ee.getSelectedShapes(!0).filter(function(ge){return he.selectionCanBeDrawn(ge)}),le=ee.getSelectedConnectors(!0).filter(function(ge){return he.selectionCanBeDrawn(ge)});if(ve.forEach(function(ge){return he.getOrCreateShapeSelection(ge,ue).onSelectionChanged(be)}),le.forEach(function(ge){return he.getOrCreateConnectorSelection(ge,ue).onSelectionChanged(be)}),be){var Ce=de.length>0?de[0].strokeWidth:0,ye={};de.filter(function(ge){return!ge.isLocked}).forEach(function(ge){return ye[ge.key]=ge.rectangle}),this.getOrCreateMultipleSelection(ue).onSelectionChanged(!!ve.filter(function(ge){return!ge.isLocked}).length,Ce,ye)}this.hideOutdatedSelection(ue)},ae.prototype.applyChangesCore=function(ee){oe.prototype.applyChangesCore.call(this,ee);var he=this.getMultipleSelection();he&&he.onModelChanged()},ae.prototype.applyChange=function(ee){var he=this.getMultipleSelection();ee.item instanceof g.Shape?this.updateShapeSelection(ee.item,he):ee.item instanceof _.Connector&&this.updateConnectorSelection(ee.item,he)},ae.prototype.notifyPageColorChanged=function(ee){},ae.prototype.notifyPageSizeChanged=function(ee,he){},ae.prototype.notifyActualZoomChanged=function(ee){var he=this;Object.keys(this.selectionMap).forEach(function(de){return he.selectionMap[de].notifyZoomChanged(ee)}),this.actualZoom=ee},ae.prototype.notifyViewAdjusted=function(ee){},ae.prototype.notifyReadOnlyChanged=function(ee){var he=this;this.readOnly=ee,Object.keys(this.selectionMap).forEach(function(de){return he.selectionMap[de].notifyReadOnlyChanged(ee)})},ae.prototype.notifySelectionRectShow=function(ee){this.showSelectionRect(ee.clone().multiply(this.actualZoom,this.actualZoom))},ae.prototype.notifySelectionRectHide=function(){this.hideSelectionRect()},ae.prototype.notifyResizeInfoShow=function(ee,he){this.showResizeInfo(ee.clone().multiply(this.actualZoom,this.actualZoom),he)},ae.prototype.notifyResizeInfoHide=function(){this.hideResizeInfo()},ae.prototype.notifyConnectionPointsShow=function(ee,he,de,ue){var be=this;this.hideConnectionPoints(),he.forEach(function(ve,le){var Ce=ve.point.clone().multiply(be.actualZoom,be.actualZoom);if(ue)switch(ve.side){case s.ConnectionPointSide.North:Ce.y=ue.y*be.actualZoom-ae.connectionPointShift;break;case s.ConnectionPointSide.South:Ce.y=ue.bottom*be.actualZoom+ae.connectionPointShift;break;case s.ConnectionPointSide.West:Ce.x=ue.x*be.actualZoom-ae.connectionPointShift;break;case s.ConnectionPointSide.East:Ce.x=ue.right*be.actualZoom+ae.connectionPointShift}be.showConnectionPoint(le,Ce,ee,le,le===de,ve.allowed)})},ae.prototype.notifyConnectionPointsHide=function(){this.hideConnectionPoints()},ae.prototype.notifyConnectionTargetShow=function(ee,he){if(he.allowed){var de=ae.correctSelectionRect(he.rect.clone().multiply(this.actualZoom,this.actualZoom),he.strokeWidth,ae.connectionTargetBorderWidth,this.actualZoom,0);this.showConnectionTarget(0,de)}},ae.prototype.notifyConnectionTargetHide=function(){this.hideConnectionTarget()},ae.prototype.notifyContainerTargetShow=function(ee,he){var de=ae.correctSelectionRect(he.rect.clone().multiply(this.actualZoom,this.actualZoom),he.strokeWidth,ae.connectionTargetBorderWidth,this.actualZoom,0);this.showContainerTarget(0,de)},ae.prototype.notifyContainerTargetHide=function(){this.hideContainerTarget()},ae.prototype.notifyExtensionLinesShow=function(ee){var he=this;this.hideExtensionLines(),ee.forEach(function(de,ue){he.showExtensionLine(ue,de.type,de.segment.startPoint.clone().multiply(he.actualZoom,he.actualZoom),de.segment.endPoint.clone().multiply(he.actualZoom,he.actualZoom),de.text)})},ae.prototype.notifyExtensionLinesHide=function(){this.hideExtensionLines()},ae.prototype.notifyDragStart=function(ee){this.dom.changeByFunc(this.selectionMarksContainer,function(he){return he.style.display="none"})},ae.prototype.notifyDragEnd=function(ee){this.dom.changeByFunc(this.selectionMarksContainer,function(he){return he.style.display=""})},ae.prototype.notifyDragScrollStart=function(){},ae.prototype.notifyDragScrollEnd=function(){},ae.prototype.notifyTextInputStart=function(ee,he,de,ue){this.dom.changeByFunc(this.visualizersContainer,function(be){return be.style.display="none"})},ae.prototype.notifyTextInputEnd=function(ee,he){this.dom.changeByFunc(this.visualizersContainer,function(de){return de.style.display=""})},ae.prototype.notifyTextInputPermissionsCheck=function(ee,he){},ae.correctSelectionRect=function(ee,he,de,ue,be){void 0===be&&(be=ae.selectionOffset);var ve=N.UnitConverter.twipsToPixels(he)%2!=N.UnitConverter.twipsToPixels(de)%2,le=Math.ceil(he/2*ue);ee=ee.clone().inflate(le,le);var Ce=Math.floor(de/2);if(ee.x-=Ce,ee.y-=Ce,ee.width+=de,ee.height+=de,ve){var ye=ae.evenOddSelectionCorrection*(N.UnitConverter.twipsToPixels(de)%2==1?-1:1);ee=ee.clone().moveRectangle(ye,ye)}return ee.clone().inflate(be,be)},ae.selectionMarkSize=N.UnitConverter.pixelsToTwips(10),ae.lockedSelectionMarkSize=N.UnitConverter.pixelsToTwips(8),ae.selectionOffset=N.UnitConverter.pixelsToTwips(2),ae.selectionRectLineWidth=N.UnitConverter.pixelsToTwips(1),ae.multiSelectionRectLineWidth=N.UnitConverter.pixelsToTwips(1),ae.connectionPointSmallSize=N.UnitConverter.pixelsToTwips(5),ae.connectionPointLargeSize=N.UnitConverter.pixelsToTwips(12),ae.connectionPointShift=N.UnitConverter.pixelsToTwips(16),ae.connectionTargetBorderWidth=N.UnitConverter.pixelsToTwips(2),ae.geomertyMarkSize=N.UnitConverter.pixelsToTwips(8),ae.connectorPointMarkSize=N.UnitConverter.pixelsToTwips(6),ae.connectorSideMarkSize=N.UnitConverter.pixelsToTwips(6),ae.extensionLineWidth=N.UnitConverter.pixelsToTwips(1),ae.extensionLineOffset=N.UnitConverter.pixelsToTwips(1),ae.extensionLineEndingSize=N.UnitConverter.pixelsToTwips(6),ae.resizeInfoOffset=N.UnitConverter.pixelsToTwips(16),ae.resizeInfoTextOffset=N.UnitConverter.pixelsToTwips(2),ae.resizeInfoLineWidth=N.UnitConverter.pixelsToTwips(1),ae.evenOddSelectionCorrection=N.UnitConverter.pixelsToTwips(1),ae}(K.CanvasManager);P.CanvasSelectionManager=Y;var Z=function(){function oe(ae,ee,he,de,ue,be){this.rectsContainer=ae,this.marksContainer=ee,this.key=he,this.zoomLevel=de,this.readOnly=ue,this.dom=be,this.elements={},this.updatedElements={}}return oe.prototype.notifyZoomChanged=function(ae){this.zoomLevel!==ae&&(this.zoomLevel=ae,this.redraw())},oe.prototype.notifyReadOnlyChanged=function(ae){this.readOnly=ae,this.redraw()},oe.prototype.destroy=function(){var ae=this;Object.keys(this.elements).forEach(function(ee){ae.elements[ee].parentNode.removeChild(ae.elements[ee]),delete ae.elements[ee]})},oe.prototype.redraw=function(){var ae=this;this.updatedElements={},this.redrawCore(),Object.keys(this.elements).filter(function(ee){return!ae.updatedElements[ee]}).forEach(function(ee){ae.elements[ee].parentNode.removeChild(ae.elements[ee]),delete ae.elements[ee]}),this.updatedElements={}},oe.prototype.drawSelectionMarks=function(ae,ee,he){if(!this.readOnly){var de=ee&&ae.height>3*Y.selectionMarkSize,ue=he&&ae.width>3*Y.selectionMarkSize,be=ee||he;be&&this.drawSelectionMark(0,new u.Point(ae.x,ae.y),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_NW,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),ue&&!k.Browser.TouchUI&&this.drawSelectionMark(1,new u.Point(ae.x+ae.width/2,ae.y),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_N,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),be&&this.drawSelectionMark(2,new u.Point(ae.right,ae.y),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_NE,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),de&&!k.Browser.TouchUI&&this.drawSelectionMark(3,new u.Point(ae.right,ae.y+ae.height/2),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_E,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),be&&this.drawSelectionMark(4,new u.Point(ae.right,ae.bottom),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_SE,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),ue&&!k.Browser.TouchUI&&this.drawSelectionMark(5,new u.Point(ae.x+ae.width/2,ae.bottom),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_S,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),be&&this.drawSelectionMark(6,new u.Point(ae.x,ae.bottom),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_SW,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),de&&!k.Browser.TouchUI&&this.drawSelectionMark(7,new u.Point(ae.x,ae.y+ae.height/2),Y.selectionMarkSize,c.MouseEventElementType.ShapeResizeBox,c.ResizeEventSource.ResizeBox_W,P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK)}},oe.prototype.drawSelectionMark=function(ae,ee,he,de,ue,be){var ve=this;this.getOrCreateElement("SM"+ae,new w.RectanglePrimitive(ee.x-he/2,ee.y-he/2,he,he,null,be,void 0,function(le){d.RenderUtils.setElementEventData(le,de,ve.key,ue)}),this.marksContainer)},oe.prototype.drawSelectionRect=function(ae,ee,he){var de=new w.RectanglePrimitive(ae.x,ae.y,ae.width,ae.height,L.StrokeStyle.default1pxInstance,he,void 0,function(ue){d.RenderUtils.setElementEventData(ue,ee,"-1",-1)});this.getOrCreateElement("shapeSelection",de,this.rectsContainer)},oe.prototype.getOrCreateElement=function(ae,ee,he){var de=this.elements[ae];return de||(de=ee.createElement(function(ue){return he.appendChild(ue)}),this.elements[ae]=de),this.updatedElements[ae]=!0,this.dom.changeByPrimitive(de,ee),de},oe}(),Q=function(oe){function ae(ee,he,de,ue,be,ve,le,Ce){var ye=oe.call(this,ee,he,de,ue,be,ve)||this;return ye.isLocked=le,ye.rectangle=Ce,ye}return S(ae,oe),ae.prototype.onSelectionChanged=function(ee){this.isMultipleSelection!==ee&&(this.isMultipleSelection=ee,this.redraw())},ae.prototype.isLockedRender=function(){return this.isLocked&&!this.readOnly},ae.prototype.drawLockedSelectionMark=function(ee,he,de,ue){var be=new D.PathPrimitive([new D.PathPrimitiveMoveToCommand(he.x-de/2,he.y-de/2),new D.PathPrimitiveLineToCommand(he.x+de/2,he.y+de/2),new D.PathPrimitiveMoveToCommand(he.x+de/2,he.y-de/2),new D.PathPrimitiveLineToCommand(he.x-de/2,he.y+de/2)],null,ue);this.getOrCreateElement("LSM"+ee,be,this.marksContainer)},ae}(Z),te=function(oe){function ae(ee,he,de,ue,be){var ve=oe.call(this,ee,he,"-1",de,ue,be)||this;return ve.rectangles={},ve}return S(ae,oe),ae.prototype.onModelItemChanged=function(ee,he){ee in this.rectangles&&(this.rectangles[ee]=he)},ae.prototype.onModelChanged=function(){this.redraw()},ae.prototype.onSelectionChanged=function(ee,he,de){this.needDrawSelectionMarks=ee,this.strokeWidth=he,this.rectangles=de,this.redraw()},ae.prototype.redrawCore=function(){var ee=this,he=Object.keys(this.rectangles);if(he.length){var de=a.GeometryUtils.getCommonRectangle(he.map(function(be){return ee.rectangles[be]})).clone().multiply(this.zoomLevel,this.zoomLevel),ue=Y.correctSelectionRect(de,this.strokeWidth,Y.selectionRectLineWidth,this.zoomLevel);this.drawSelectionRect(ue,c.MouseEventElementType.SelectionRect,P.SELECTION_ELEMENT_CLASSNAMES.ITEMS_SELECTION_RECT),this.needDrawSelectionMarks&&this.drawSelectionMarks(de,!0,!0)}},ae}(Z),pe=function(oe){function ae(ee,he,de,ue,be,ve,le,Ce,ye,ge,fe,xe){var Te=oe.call(this,ee,he,ve,de,ue,be,le,Ce)||this;return Te.style=ye,Te.allowResizeHorizontally=ge,Te.allowResizeVertically=fe,Te.shapeParameterPoints=xe,Te}return S(ae,oe),ae.prototype.onModelChanged=function(ee,he,de,ue,be,ve){this.isLocked=ee,this.rectangle=he,this.style=de,this.allowResizeHorizontally=ue,this.allowResizeVertically=be,this.shapeParameterPoints=ve,this.redraw()},ae.prototype.redrawCore=function(){var ee=this.rectangle.clone().multiply(this.zoomLevel,this.zoomLevel);this.isLockedRender()?this.drawLockedSelection(ee):this.drawUnlockedSelection(ee)},ae.prototype.drawLockedSelection=function(ee){this.drawLockedSelectionMark(0,new u.Point(ee.x,ee.y),Y.lockedSelectionMarkSize,P.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK),this.drawLockedSelectionMark(1,new u.Point(ee.right,ee.y),Y.lockedSelectionMarkSize,P.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK),this.drawLockedSelectionMark(2,new u.Point(ee.right,ee.bottom),Y.lockedSelectionMarkSize,P.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK),this.drawLockedSelectionMark(3,new u.Point(ee.x,ee.bottom),Y.lockedSelectionMarkSize,P.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK)},ae.prototype.drawUnlockedSelection=function(ee){var he=Y.correctSelectionRect(ee,this.style.strokeWidth,Y.selectionRectLineWidth,this.zoomLevel);this.drawSelectionRect(he,c.MouseEventElementType.SelectionRect,this.isMultipleSelection?P.SELECTION_ELEMENT_CLASSNAMES.ITEM_MULTI_SELECTION:P.SELECTION_ELEMENT_CLASSNAMES.ITEM_SELECTION_RECT),this.isMultipleSelection||this.drawSelectionMarks(ee,this.allowResizeHorizontally,this.allowResizeVertically),this.drawShapeParameterPoints()},ae.prototype.drawShapeParameterPoints=function(){var ee=this;this.readOnly||this.shapeParameterPoints.forEach(function(he,de){var ue=he.point.clone().multiply(ee.zoomLevel,ee.zoomLevel);ee.drawShapeParameterPoint(ue,de,he.key)})},ae.prototype.drawShapeParameterPoint=function(ee,he,de){var ue=this,be=Y.geomertyMarkSize,ve=new w.RectanglePrimitive(ee.x-be/2,ee.y-be/2,be,be,null,"geometry-mark",void 0,function(le){d.RenderUtils.setElementEventData(le,c.MouseEventElementType.ShapeParameterBox,ue.key,de)});this.getOrCreateElement("pp"+he.toString(),ve,this.marksContainer)},ae}(Q),z=function(oe){function ae(ee,he,de,ue,be,ve,le,Ce,ye,ge,fe,xe,Te,Ee,Oe){var ze=oe.call(this,ee,he,ve,de,ue,be,le,Ce)||this;return ze.renderPoints=ye,ze.style=ge,ze.styleText=fe,ze.enableText=xe,ze.texts=Te,ze.points=Ee,ze.lineType=Oe,ze}return S(ae,oe),ae.prototype.onModelChanged=function(ee,he,de,ue,be,ve,le,Ce,ye){this.isLocked=ee,this.rectangle=he,this.renderPoints=de,this.style=ue,this.styleText=be,this.enableText=ve,this.texts=le,this.points=Ce,this.lineType=ye,this.redraw()},ae.prototype.redrawCore=function(){this.isLockedRender()?this.drawLockedSelection():this.drawUnlockedSelection()},ae.prototype.drawLockedSelection=function(){var ee=this;this.renderPoints.forEach(function(he,de){ee.drawLockedSelectionMark(de,he,Y.lockedSelectionMarkSize,P.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK)})},ae.prototype.drawUnlockedSelection=function(){this.drawConnectorSelection(),this.isMultipleSelection||this.readOnly||this.drawConnectorSelectionMarks()},ae.prototype.drawConnectorSelection=function(){var ee=[],he=[],de=this.isMultipleSelection?P.SELECTION_ELEMENT_CLASSNAMES.CONNECTOR_MULTI_SELECTION:P.SELECTION_ELEMENT_CLASSNAMES.CONNECTOR_SELECTION;this.populateSelectionPrimitiveCommands(ee,he);var ue=new D.PathPrimitive(ee.concat(he.reverse()),L.StrokeStyle.default1pxInstance,de);this.getOrCreateElement("CS",ue,this.rectsContainer)},ae.prototype.populateSelectionPrimitiveCommands=function(ee,he){for(var de,ue,be,ve,le=this.texts,Ce=this.styleText.getAlignment(),ye=this.createNotSkippedRenderPoints(),ge=this.zoomLevel,fe=this.style.strokeWidthPx,xe=this.getSelectionOffset(fe),Te=fe%2==0,Ee=ye[0],Oe=0,ze=1,$e=void 0;$e=ye[ze];ze++){var Be=ye[ze+1];if(void 0===de){if(ue=J.Metrics.euclideanDistance(Ee,$e),ie.MathUtils.numberCloseTo(ue,0))continue;de=a.GeometryUtils.getSelectionOffsetPoint(Ee,$e,ue).multiply(xe,xe)}if(Be){if(ve=J.Metrics.euclideanDistance($e,Be),ie.MathUtils.numberCloseTo(ve,0))continue;be=a.GeometryUtils.getSelectionOffsetPoint($e,Be,ve).multiply(xe,xe)}var Ue=de.x,ot=de.y,st=-Ue,et=-ot,Ke=be&&be.x,Ye=be&&be.y,Pe=be&&-be.x,Se=be&&-be.y;for(Te&&(st>0?st-=Y.evenOddSelectionCorrection:Ue>0&&(Ue-=Y.evenOddSelectionCorrection),et>0?et-=Y.evenOddSelectionCorrection:ot>0&&(ot-=Y.evenOddSelectionCorrection),Pe>0?Pe-=Y.evenOddSelectionCorrection:Ke>0&&(Ke-=Y.evenOddSelectionCorrection),Se>0?Se-=Y.evenOddSelectionCorrection:Ye>0&&(Ye-=Y.evenOddSelectionCorrection));le[Oe]&&le[Oe].pointIndex<=ze;){var Re=le[Oe],Fe=this.getConnectorSelectionTextSize(Re.text,xe),Xe=a.GeometryUtils.getSelectionTextStartEndPoints(Ee,$e,ue,Re.point,Fe,Ce);le[Oe].pointIndex<ze?(ee.push(D.PathPrimitiveMoveToCommand.fromPoint((Ee=Xe[1]).clone().offset(Ue,ot).multiply(ge,ge))),he.push(D.PathPrimitiveLineToCommand.fromPoint(Ee.clone().offset(st,et).multiply(ge,ge)))):(ee.length||(ee.push(D.PathPrimitiveMoveToCommand.fromPoint(Ee.clone().offset(Ue,ot).multiply(ge,ge))),he.push(D.PathPrimitiveLineToCommand.fromPoint(Ee.clone().offset(st,et).multiply(ge,ge)))),ee.push(D.PathPrimitiveLineToCommand.fromPoint(Xe[0].clone().offset(Ue,ot).multiply(ge,ge))),ee.push(D.PathPrimitiveMoveToCommand.fromPoint(Xe[1].clone().offset(Ue,ot).multiply(ge,ge))),he.push(D.PathPrimitiveMoveToCommand.fromPoint(Xe[0].clone().offset(st,et).multiply(ge,ge))),he.push(D.PathPrimitiveLineToCommand.fromPoint(Xe[1].clone().offset(st,et).multiply(ge,ge))),Ee=Xe[1]),Oe++}ee.length||(ee.push(D.PathPrimitiveMoveToCommand.fromPoint(Ee.clone().offset(Ue,ot).multiply(ge,ge))),he.push(D.PathPrimitiveLineToCommand.fromPoint(Ee.clone().offset(st,et).multiply(ge,ge)))),Be?(a.GeometryUtils.addSelectedLinesTo(Ee,$e,Be,Ue,ot,st,et,Ke,Ye,Pe,Se,function(tt,vt){return ee.push(new D.PathPrimitiveLineToCommand(tt*ge,vt*ge))},function(tt,vt){return he.push(new D.PathPrimitiveLineToCommand(tt*ge,vt*ge))}),de=be,ue=ve):(ee.push(D.PathPrimitiveLineToCommand.fromPoint($e.clone().offset(Ue,ot).multiply(ge,ge))),he.push(D.PathPrimitiveMoveToCommand.fromPoint($e.clone().offset(st,et).multiply(ge,ge)))),Ee=$e}},ae.prototype.createNotSkippedRenderPoints=function(){var ee=this.renderPoints.map(function(he){return he.clone()});return this.lineType===x.ConnectorLineOption.Straight?re.ModelUtils.skipUnnecessaryRenderPoints(ee):re.ModelUtils.skipUnnecessaryRightAngleRenderPoints(ee),ee.filter(function(he){return!he.skipped})},ae.prototype.getSelectionOffset=function(ee){return Y.selectionOffset+N.UnitConverter.pixelsToTwips(Math.round(ee/2)+(ee+1)%2)},ae.prototype.getConnectorSelectionTextSize=function(ee,he){return this.dom.measurer.measureTextLine(ee,this.styleText,G.TextOwner.Connector).applyConverter(N.UnitConverter.pixelsToTwips).clone().offset(he,he).nonNegativeSize()},ae.prototype.drawConnectorSelectionMarks=function(){var ee=this,he=this.points.length-1;this.points.forEach(function(de,ue){var be=0===ue||ue===he,ve=be?P.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK:P.SELECTION_ELEMENT_CLASSNAMES.CONNECTOR_POINT_MARK,le=be?Y.selectionMarkSize:Y.connectorPointMarkSize;be||ee.lineType===x.ConnectorLineOption.Straight?ee.drawSelectionMark(ue,de.clone().multiply(ee.zoomLevel,ee.zoomLevel),le,c.MouseEventElementType.ConnectorPoint,ue,ve):ee.drawSelectionMark(ue,de.clone().multiply(ee.zoomLevel,ee.zoomLevel),le,c.MouseEventElementType.Undefined,-1,ve+" disabled")}),this.drawConnectorSideMarks()},ae.prototype.drawConnectorSideMarks=function(){var ee,he,de=this,ue=this.lineType===x.ConnectorLineOption.Straight?c.MouseEventElementType.ConnectorSide:c.MouseEventElementType.ConnectorOrthogonalSide;this.renderPoints.forEach(function(be,ve){if(!be.skipped){if(void 0!==ee&&de.canDrawConnectorSideMark(be,ee)){var le=de.lineType===x.ConnectorLineOption.Orthogonal?be.x-ee.x==0?"vertical":"horizontal":"";de.drawSelectionMark(de.points.length+ve-1,new u.Point(ee.x+(be.x-ee.x)/2,ee.y+(be.y-ee.y)/2).clone().multiply(de.zoomLevel,de.zoomLevel),Y.connectorSideMarkSize,ue,he+"_"+ve,P.SELECTION_ELEMENT_CLASSNAMES.CONNECTOR_SIDE_MARK+" "+le)}ee=be,he=ve}})},ae.prototype.canDrawConnectorSideMark=function(ee,he){if(this.lineType===x.ConnectorLineOption.Straight){var de=Y.selectionMarkSize+Y.connectorSideMarkSize;return J.Metrics.euclideanDistance(ee,he)>de}if(this.lineType===x.ConnectorLineOption.Orthogonal){var ue=0===he.pointIndex,be=a.GeometryUtils.areDuplicatedPoints(this.points[this.points.length-1],ee);return ue&&be?J.Metrics.euclideanDistance(ee,he)>2*_.Connector.minOffset:!ue&&be||ue&&!be?J.Metrics.euclideanDistance(ee,he)>_.Connector.minOffset:(de=Y.selectionMarkSize+Y.connectorSideMarkSize,J.Metrics.euclideanDistance(ee,he)>de)}return!1},ae}(Q)},9757:function(o,P,b){var f,S=this&&this.__extends||(f=function(G,k){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,B){U.__proto__=B}||function(U,B){for(var K in B)B.hasOwnProperty(K)&&(U[K]=B[K])})(G,k)},function(G,k){function U(){this.constructor=G}f(G,k),G.prototype=null===k?Object.create(k):(U.prototype=k.prototype,new U)});Object.defineProperty(P,"__esModule",{value:!0}),P.CanvasViewManager=P.CROP_OFFSET=P.CANVAS_SCROLL_PADDING=P.CANVAS_MIN_PADDING=void 0;var T=b(7716),y=b(240),d=b(8675),c=b(4125),s=b(6353),a=b(8900),u=b(5329),h=b(4593),g=b(4716),_=b(3500),x=b(3281),w=b(1552),D=b(6907),C=b(9291);P.CANVAS_MIN_PADDING=8,P.CANVAS_SCROLL_PADDING=18,P.CROP_OFFSET=40;var I="dxdi-drag-scroll",L="dxdi-drag-item",N=function(G){function k(U,B,K,J,ie,re,q,Y,Z){var Q=G.call(this,J,Y,Z)||this;return Q.svgElement=B,Q.paddings=new c.Offsets(0,0,0,0),Q.scroll=new a.Point(0,0),Q.crop=c.Offsets.empty(),Q.lockAutoZoom=!1,Q.autoScrollLocker=0,Q.pageClipPathId=_.RenderUtils.generateSvgElementId("page-clip"),Q.pageShadowId=_.RenderUtils.generateSvgElementId("page-shadow"),Q.onViewChanged=new d.EventDispatcher,U.onScroll.add(Q),K=K.clone().applyConverter(C.UnitConverter.twipsToPixelsF),Q.scrollView=U,Q.modelSize=K,Q.simpleView=re,Q.fixedZoomLevel=J,Q.autoZoom=ie,Q.crop=Q.rectangleToCrop(q,K),Q.updateElements(K.clone().multiply(J,J),a.Point.zero(),re),Q.getOrCreateElement("shadow",new x.ShadowFilterPrimitive(Q.pageShadowId),Q.svgElement),Q.containerSize=U.getSize(),Q}return S(k,G),k.prototype.adjust=function(U,B){var K;U||(U={vertical:!1,horizontal:!1},K=c.Offsets.empty()),this.containerSize=this.scrollView.getSize(),this.adjustCore(this.modelSize,this.fixedZoomLevel,this.autoZoom,this.simpleView,this.crop,U,this.containerSize,K,B),this.tryNormalizePaddings()},k.prototype.notifyModelSizeChanged=function(U,B){U=U.clone().applyConverter(C.UnitConverter.twipsToPixelsF),this.adjustCore(U,this.fixedZoomLevel,this.autoZoom,this.simpleView,this.crop,{horizontal:!B,vertical:!B},this.containerSize,B&&B.clone().applyConverter(C.UnitConverter.twipsToPixelsF)),this.modelSize=U},k.prototype.notifyModelRectangleChanged=function(U){var B=this.rectangleToCrop(U,this.modelSize);this.crop&&this.crop.equals(B)||(this.simpleView&&this.adjustCore(this.modelSize,this.fixedZoomLevel,this.autoZoom,this.simpleView,B,{horizontal:!1,vertical:!1},this.containerSize,c.Offsets.empty()),this.crop=B)},k.prototype.notifySnapPointPositionChanged=function(U){},k.prototype.notifyZoomChanged=function(U,B){this.adjustCore(this.modelSize,U,B,this.simpleView,this.crop,{horizontal:!1,vertical:!1},this.containerSize),this.fixedZoomLevel=U,this.autoZoom=B},k.prototype.notifyViewChanged=function(U){this.adjustCore(this.modelSize,this.fixedZoomLevel,this.autoZoom,U,this.crop,{vertical:!0,horizontal:!0},this.containerSize),this.simpleView=U},k.prototype.notifyGridChanged=function(U,B){},k.prototype.notifyDragStart=function(U){this.lockAutoZoom=!0,D.DomUtils.addClassName(this.svgElement,L)},k.prototype.notifyDragEnd=function(U){this.lockAutoZoom=!1,D.DomUtils.removeClassName(this.svgElement,L),this.adjustAfterDragEnd()},k.prototype.adjustAfterDragEnd=function(){this.autoZoom&&!this.autoZoomLocked&&this.adjust({horizontal:!0,vertical:this.autoZoom===y.AutoZoomMode.FitContent},this.autoZoom===y.AutoZoomMode.FitToWidth)},k.prototype.notifyShowContextToolbox=function(){this.autoZoomLocked=!0},k.prototype.notifyHideContextToolbox=function(){this.autoZoomLocked=!1,this.adjustAfterDragEnd()},k.prototype.notifyDragScrollStart=function(){D.DomUtils.addClassName(this.svgElement,I)},k.prototype.notifyDragScrollEnd=function(){D.DomUtils.removeClassName(this.svgElement,I)},k.prototype.notifyScrollChanged=function(U){this.scroll=U()},k.prototype.checkFitToCanvas=function(U){U=U||this.containerSize;var B=this.scrollView.getScrollBarWidth();U=U.clone().offset(2*-P.CANVAS_MIN_PADDING,2*-P.CANVAS_MIN_PADDING).nonNegativeSize();var K=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop).clone().multiply(this.actualZoom,this.actualZoom),J=this.checkScrollBars(U,B,K,c.Offsets.empty());return{vertical:(U=U.clone().offset(J.vertical?-B:0,J.horizontal?-B:0).nonNegativeSize()).height>=K.height,horizontal:U.width>=K.width}},k.prototype.rectangleToCrop=function(U,B){var K=U.clone().applyConverter(C.UnitConverter.twipsToPixelsF);return new c.Offsets(this.correctCrop(K.x),this.correctCrop(B.width-K.right),this.correctCrop(K.y),this.correctCrop(B.height-K.bottom))},k.prototype.correctCrop=function(U){return P.CROP_OFFSET*Math.floor(U/P.CROP_OFFSET)},k.prototype.setActualZoom=function(U){this.actualZoom!==U&&(this.actualZoom=U,this.raiseActualZoomChanged())},k.prototype.getActualAutoZoomLevel=function(U){if(U===y.AutoZoomMode.Disabled)return this.actualZoom;var B=this.containerSize,K=this.scrollView.getScrollBarWidth(),J=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop);return this.getActualAutoZoom(B,K,J,U)},k.prototype.getActualZoom=function(U,B,K,J,ie){return this.lockAutoZoom?this.actualZoom:ie===y.AutoZoomMode.Disabled?J:this.getActualAutoZoom(U,B,K,ie)},k.prototype.getActualAutoZoom=function(U,B,K,J){return 0===U.width||0===U.height?1:J===y.AutoZoomMode.FitContent?Math.min((U.width-2*P.CANVAS_MIN_PADDING)/K.width,(U.height-2*P.CANVAS_MIN_PADDING)/K.height,1):Math.min((U.width-2*P.CANVAS_MIN_PADDING-B)/K.width,1)},k.prototype.raiseActualZoomChanged=function(){var U=this;this.onViewChanged.raise1(function(B){return B.notifyActualZoomChanged(U.actualZoom)})},k.prototype.tryNormalizePaddings=function(){var U=this.scrollView.getScrollBarWidth(),B=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop).clone().multiply(this.actualZoom,this.actualZoom),K=new a.Point(this.paddings.left,this.paddings.top),J=new s.Size(this.paddings.right,this.paddings.bottom),ie=this.getTailSpace(K,this.scroll,B,this.containerSize,U);ie.equals(J)||this.applyChanges(new c.Offsets(K.x,ie.width,K.y,ie.height),B,this.simpleView,this.crop.clone().multiply(this.actualZoom))},k.prototype.scrollBy=function(U){var B,K,J,ie=this.scroll,re=this.containerSize,q=this.scrollView.getScrollBarWidth(),Y=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop).clone().multiply(this.actualZoom,this.actualZoom),Z=this.checkScrollBars(re,q,Y,this.paddings),Q=new a.Point(this.paddings.left,this.paddings.top),te=new s.Size(this.paddings.right,this.paddings.bottom);return ie=(B=this.changeScrollByOffset(Q,ie,te,Y,U,re,Z)).scroll,Q=(K=this.changeTranslateByOffset(Q,te,U=B.offset,Z)).translate,U=K.offset,Q=(J=this.cropHiddenHead(Q,ie)).translate,te=this.getTailSpace(Q,ie=J.scroll,Y,re,q),this.applyChanges(new c.Offsets(Q.x,te.width,Q.y,te.height),Y,this.simpleView,this.crop.clone().multiply(this.actualZoom),ie),U},k.prototype.changeScrollByOffset=function(U,B,K,J,ie,re,q){var Y=B.clone(),Z=ie.clone();return ie.x&&q.horizontal&&(Y.x-=Z.x=-this.getScrollDeltaByOffset(ie.x,B.x,U.x+J.width+K.width,re.width,q.vertical)),ie.y&&q.vertical&&(Y.y-=Z.y=-this.getScrollDeltaByOffset(ie.y,B.y,U.y+J.height+K.height,re.height,q.horizontal)),{scroll:Y,offset:Z}},k.prototype.changeTranslateByOffset=function(U,B,K,J){var ie=U.clone(),re=K.clone();return K.x&&!J.horizontal&&(ie.x+=re.x=this.getTranslateDeltaByOffset(K.x,ie.x,B.width)),K.y&&!J.vertical&&(ie.y+=re.y=this.getTranslateDeltaByOffset(K.y,ie.y,B.height)),{translate:ie,offset:re}},k.prototype.getScrollDeltaByOffset=function(U,B,K,J,ie){if(U>0)return-Math.min(B,U);var re=K-(J-(ie?this.scrollView.getScrollBarWidth():0));return Math.min(re-B,-U)},k.prototype.getTranslateDeltaByOffset=function(U,B,K){return U?U<0?-Math.min(B-P.CANVAS_MIN_PADDING,-U):Math.min(K-P.CANVAS_MIN_PADDING,U):0},k.prototype.getActualModelSizeWithoutZoom=function(U,B,K){return B&&K?U.clone().offset(-K.horizontal,-K.vertical).nonNegativeSize():U},k.prototype.setScrollTo=function(U,B){var K=this.containerSize,J=this.getVisibileAreaAbsShift(),ie=U.clone().applyConverter(C.UnitConverter.twipsToPixelsF).clone().multiply(this.actualZoom,this.actualZoom).clone().offset(J.x,J.y),re=this.scroll;B?(re.x+=ie.x-B.x,re.y+=ie.y-B.y):(ie.x<0&&(re.x+=ie.x-P.CANVAS_MIN_PADDING),ie.y<0&&(re.y+=ie.y-P.CANVAS_MIN_PADDING),ie.x>K.width&&(re.x+=ie.x-K.width+P.CANVAS_MIN_PADDING),ie.y>K.height&&(re.y+=ie.y-K.height+P.CANVAS_MIN_PADDING)),this.setScroll(re)},k.prototype.scrollIntoView=function(U){U=U.clone().applyConverter(C.UnitConverter.twipsToPixelsF).multiply(this.actualZoom,this.actualZoom).moveRectangle(this.paddings.left,this.paddings.top);var B=this.scroll,K=this.containerSize;if(!(U.x>=B.x&&U.y>=B.y&&U.right<=B.x+K.width&&U.bottom<=B.y+K.height)){var J=B.clone();U.x<B.x?J.x=U.x-P.CANVAS_SCROLL_PADDING:U.right>B.x+K.width&&(J.x=Math.min(U.x-P.CANVAS_SCROLL_PADDING,U.right+P.CANVAS_SCROLL_PADDING-K.width)),J.y=U.y<B.y?U.y-P.CANVAS_SCROLL_PADDING:Math.min(U.y-P.CANVAS_SCROLL_PADDING,U.bottom+P.CANVAS_SCROLL_PADDING-K.height),this.setScroll(J)}},k.prototype.setScroll=function(U){var B=this,K=this.modelSize.clone().multiply(this.actualZoom,this.actualZoom);U.x=Math.max(0,Math.min(U.x,K.width+this.paddings.horizontal-this.containerSize.width)),U.y=Math.max(0,Math.min(U.y,K.height+this.paddings.vertical-this.containerSize.height)),this.dom.changeByFunc(null,function(){B.scrollView.setScroll(U.x,U.y)}),this.scroll=U.clone()},k.prototype.updateElements=function(U,B,K){this.updatePageElement(U,B,K),this.updateCanvasElement(B)},k.prototype.updateCanvasElement=function(U){this.canvasElement=this.getOrCreateElement("dxdi-main",new u.GroupPrimitive([],"dxdi-main",null,null,function(B){B.setAttribute("transform","translate("+Math.round(U.x)+", "+Math.round(U.y)+")")}),this.svgElement)},k.prototype.updatePageElement=function(U,B,K){if(K)this.updatePageElementCore("",0,0,U.width,U.height);else{var J=B.x,ie=B.y,re=U.width,q=U.height;this.createPageShadow(J,ie,re,q),this.updatePageElementCore(this.pageClipPathId,Math.round(J),Math.round(ie),re,q)}},k.prototype.createPageShadow=function(U,B,K,J){this.getOrCreateElement("pageShadowRect",new g.RectanglePrimitive(U.toString(),B.toString(),K.toString(),J.toString(),new w.EmptyStyle({filter:_.RenderUtils.getUrlPathById(this.pageShadowId)}),"dxdi-page-shadow"),this.svgElement,this.svgElement.firstChild)},k.prototype.updatePageElementCore=function(U,B,K,J,ie){this.pageElement=this.getOrCreateElement("page",new u.GroupPrimitive([],"dxdi-page",null,U,function(re){re.setAttribute("transform","translate("+B+", "+K+")")}),this.svgElement),this.getOrCreateElement("pageClip",this.createPageClipPathPrimitive(J,ie),this.svgElement)},k.prototype.createPageClipPathPrimitive=function(U,B){return new h.ClipPathPrimitive(this.pageClipPathId,[new g.RectanglePrimitive(0,0,U.toString(),B.toString())])},k.prototype.adjustCore=function(U,B,K,J,ie,re,q,Y,Z){var Q=this.getActualModelSizeWithoutZoom(U,J,ie);if(this.lockAutoZoom||!K&&Y&&this.modelSize)this.resizeView(Q,this.actualZoom,q,J,ie,Y);else{var te=this.scrollView.getScrollBarWidth(),pe=this.getActualZoom(q,te,Q,B,K);!K||pe!==this.actualZoom||re.horizontal&&(re.vertical||Z)?(this.resetView(Q,pe,q,J,ie,re),this.setActualZoom(pe)):this.resizeView(Q,pe,q,J,ie,Y||c.Offsets.empty())}},k.prototype.resetView=function(U,B,K,J,ie,re){var q=U.clone().multiply(B,B),Y=c.Offsets.fromNumber(P.CANVAS_MIN_PADDING);!(re=re||{horizontal:!0,vertical:!0}).horizontal&&this.paddings&&(Y.left=this.paddings.left,Y.right=this.paddings.right),!re.vertical&&this.paddings&&(Y.top=this.paddings.top,Y.bottom=this.paddings.bottom);var Z=this.checkScrollBars(K,this.scrollView.getScrollBarWidth(),q,Y),Q=this.scrollView.getScrollBarWidth(),te=re.horizontal||re.vertical?this.scroll:void 0;if(re.horizontal){var pe=Math.max((K.width-(Z.vertical?Q:0)-q.width)/2,P.CANVAS_MIN_PADDING);Y.left=pe,Y.right=pe,te.x=0}if(re.vertical){var z=Math.max((K.height-(Z.horizontal?Q:0)-q.height)/2,P.CANVAS_MIN_PADDING);Y.top=z,Y.bottom=z,te.y=0}this.applyChanges(Y,q,J,ie.clone().multiply(B),te)},k.prototype.resizeView=function(U,B,K,J,ie,re){var q,Y,Z=this.actualZoom,Q=this.simpleView&&this.crop?this.crop.clone().multiply(Z):c.Offsets.empty(),te=U.clone().multiply(B,B);re=re.clone().multiply(B);var pe=J&&ie?ie.clone().multiply(B):c.Offsets.empty(),z=new a.Point(this.paddings.left,this.paddings.top),oe=this.scroll;z=(q=this.applyOffset(z,oe,Q,pe,re)).translate,z=(Y=this.cropHiddenHead(z,oe=q.scroll)).translate;var ae=this.getTailSpace(z,oe=Y.scroll,te,K,this.scrollView.getScrollBarWidth());if(!J){var ee=K.width-P.CANVAS_SCROLL_PADDING,he=K.height-P.CANVAS_SCROLL_PADDING;re.left<0&&z.x>ee&&(z.x=ee,oe.x=0),re.right<0&&ae.width>ee&&(ae.width=ee,oe.x>te.width&&(oe.x=te.width)),re.top<0&&z.y>he&&(z.y=he,oe.y=0),re.bottom<0&&ae.height>he&&(ae.height=he,oe.y>te.height&&(oe.y=te.height))}var de=new c.Offsets(z.x,ae.width,z.y,ae.height);this.applyChanges(de,te,J,pe,oe)},k.prototype.applyChanges=function(U,B,K,J,ie){var re=this,q=new a.Point(U.left,U.top);K&&J&&(q=q.clone().offset(-J.left,-J.top)),this.updateElements(B,q,K),this.setSvgSize(B.width+U.horizontal,B.height+U.vertical),this.onViewChanged.raise1(function(Y){return Y.notifyViewAdjusted(new a.Point(q.x,q.y))}),ie&&(this.lockAutoScroll(),ie&&this.dom.changeByFunc(this.scrollView,function(Y){Y.setScroll(ie.x,ie.y),re.unlockAutoScroll()}),this.scroll=ie),this.paddings=U},k.prototype.isAutoScrollLocked=function(){return 0!==this.autoScrollLocker},k.prototype.lockAutoScroll=function(){this.autoScrollLocker++},k.prototype.unlockAutoScroll=function(){this.autoScrollLocker--},k.prototype.applyOffset=function(U,B,K,J,ie){var re=U.clone(),q=B.clone(),Y=this.getActualOffset(K,J,ie);return Y.left&&(re.x=Math.max(P.CANVAS_MIN_PADDING,re.x-Y.left),q.x+=Y.left-(U.x-re.x)),Y.top&&(re.y=Math.max(P.CANVAS_MIN_PADDING,re.y-Y.top),q.y+=Y.top-(U.y-re.y)),{translate:re,scroll:q}},k.prototype.cropHiddenHead=function(U,B){var K=B.clone(),J=U.clone();if(K.x&&J.x>P.CANVAS_MIN_PADDING){var ie=J.x-Math.max(P.CANVAS_MIN_PADDING,J.x-K.x);J.x-=ie,K.x-=ie}return K.y&&J.y>P.CANVAS_MIN_PADDING&&(ie=J.y-Math.max(P.CANVAS_MIN_PADDING,J.y-K.y),J.y-=ie,K.y-=ie),{translate:J,scroll:K}},k.prototype.getTailSpace=function(U,B,K,J,ie){var re=U.clone(),q=B.clone(),Y=Math.max(J.width+q.x-(re.x+K.width),P.CANVAS_MIN_PADDING),Z=Math.max(J.height+q.y-(re.y+K.height),P.CANVAS_MIN_PADDING),Q=this.checkScrollBars(J,ie,K,new c.Offsets(re.x,Y,re.y,Z));return Q.vertical&&(Y=Math.max(P.CANVAS_MIN_PADDING,Y-ie)),Q.horizontal&&(Z=Math.max(P.CANVAS_MIN_PADDING,Z-ie)),new s.Size(Y,Z)},k.prototype.getActualOffset=function(U,B,K){return new c.Offsets(-(B.left-U.left)+K.left,-(B.right-U.right)+K.right,-(B.top-U.top)+K.top,-(B.bottom-U.bottom)+K.bottom)},k.prototype.checkScrollBars=function(U,B,K,J){var ie=U.width<K.width+J.horizontal,re=U.height<K.height+J.vertical;return ie&&!re&&(re=U.height-B<K.height+J.vertical),re&&!ie&&(ie=U.width-B<K.width+J.horizontal),{horizontal:ie,vertical:re}},k.prototype.setSvgSize=function(U,B){U===this.lastWidth&&B===this.lastHeight||(this.dom.changeByFunc(this.svgElement,function(K){return _.RenderUtils.updateSvgElementSize(K,U,B)}),this.lastWidth=U,this.lastHeight=B)},k.prototype.getVisibileAreaAbsShift=function(U){var B=this.scroll,K=this.paddings.clone(),J=this.simpleView;return new a.Point(K.left-(J&&this.crop?this.crop.left*this.actualZoom:0)-(U?0:B.x),K.top-(J&&this.crop?this.crop.top*this.actualZoom:0)-(U?0:B.y))},k.prototype.getModelPoint=function(U,B){var K=this.getVisibileAreaAbsShift(),J=U.clone().offset(-K.x,-K.y).multiply(1/this.actualZoom,1/this.actualZoom);if(B){var ie=this.containerSize;if(U.x<0||U.y<0||U.x>ie.width||U.y>ie.height||J.x<0||J.y<0||J.x>this.modelSize.width||J.y>this.modelSize.height)return null}return J.clone().applyConverter(C.UnitConverter.pixelsToTwips)},k.prototype.getAbsolutePoint=function(U,B,K){var J=this.getVisibileAreaAbsShift(B),ie=U.clone().multiply(this.actualZoom,this.actualZoom).clone().applyConverter(C.UnitConverter.twipsToPixelsF).clone().offset(J.x,J.y);if(K){if(ie.x<0||ie.y<0)return null;var re=this.containerSize;if(ie.x>re.width||ie.y>re.height)return null}return ie},k}(T.CanvasManagerBase);P.CanvasViewManager=N},6078:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ExportDOMManipulator=P.DOMManipulator=void 0;var T=b(9463),y=function(){function c(s){this.measurer=s,this.queue=[]}return c.prototype.createElement=function(s,a,u){return s.createElement(function(h){null!=a&&(void 0!==u?a.insertBefore(h,u):a.appendChild(h))})},c.prototype.changeChildrenByPrimitives=function(s,a){var u=this;s.forEach(function(h,g){u.changeByPrimitive(a.childNodes[g],h)})},c.prototype.changeByFunc=function(s,a){this.doChange(s,a)},c.prototype.changeByPrimitive=function(s,a){this.doChange(s,a)},c.prototype.cancelAnimation=function(){void 0!==this.rafId&&(cancelAnimationFrame(this.rafId),this.queue=[])},c.prototype.doChange=function(s,a){T.Diagnostics.optimizeUsingRAF?(this.queue.push([s,a]),this.requestAnimation()):this.doChangeSync(s,a)},c.prototype.doChangeSync=function(s,a){"function"==typeof a?a(s):a.applyElementProperties(s,this.measurer)},c.prototype.requestAnimation=function(){var s=this;if(!this.rafRequested){this.rafRequested=!0;var a=function(){s.queue.splice(0,2e3).forEach(function(u){return s.doChangeSync(u[0],u[1])}),s.queue.length?s.rafId=requestAnimationFrame(a):(s.rafRequested=!1,s.rafId=void 0)};this.rafId=requestAnimationFrame(a)}},c}();P.DOMManipulator=y;var d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.doChange=function(a,u){this.doChangeSync(a,u)},s}(y);P.ExportDOMManipulator=d},741:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.InputManager=void 0;var f=b(2153),S=b(6907),T=b(3500),y=b(6031),d=b(5503),c=b(7959),s=b(3714),a=b(4246),u=b(9279),h=b(9291),g=b(1114),_=b(3490),x=b(8675),w="dxdi-text-input",D=function(){function C(I,L,N,G,k,U){this.mainElement=I,this.layoutPointResolver=L,this.eventManager=N,this.textMeasurer=G,this.actualZoom=k,this.focusElementsParent=U,this.focused=!1,this.focusLocked=!1,this.createInputElements(this.mainElement,this.focusElementsParent)}return C.prototype.detachEvents=function(){this.detachInputElementEvents(),this.detachTextInputElementEvents()},C.prototype.isFocused=function(){return this.focused},C.prototype.captureFocus=function(I){I&&document.activeElement===this.textInputElement?x.HtmlFocusUtils.focusWithPreventScroll(this.textInputElement||this.inputElement):x.HtmlFocusUtils.focusWithPreventScroll(this.inputElement)},C.prototype.setClipboardData=function(I){this.clipboardInputElement.value=I,x.HtmlFocusUtils.focusWithPreventScroll(this.clipboardInputElement),this.clipboardInputElement.select(),document.execCommand("copy"),this.captureFocus()},C.prototype.getClipboardData=function(I){var L=this;navigator&&navigator.clipboard?navigator.clipboard.readText().then(function(N){I(N),L.captureFocus()}).catch(function(){I(""),L.captureFocus()}):u.Browser.IE&&(this.clipboardInputElement.value="",x.HtmlFocusUtils.focusWithPreventScroll(this.clipboardInputElement),this.clipboardInputElement.select(),document.execCommand("Paste"),I(this.clipboardInputElement.value),this.captureFocus())},C.prototype.isPasteSupportedByBrowser=function(){return u.Browser.IE||u.Browser.WebKitFamily&&navigator&&void 0!==navigator.clipboard},C.prototype.createInputElements=function(I,L){this.createFocusInputElement(L||I),this.createTextInputElement(I),this.createClipboardInputElement(L||I),this.attachInputElementEvents()},C.prototype.setInputElementFocusHandlerMode=function(I){this.textInputElementContainer.setAttribute("class","dxdi-text-input-container"),I&&this.captureFocus()},C.prototype.setInputElementTextInputMode=function(I,L,N,G,k,U){this.textInputElementContainer.setAttribute("class","dxdi-text-input-container "+k),this.textInputElement.value=I,this.setTextInputElementBounds(L,N,U),this.setTextInputElementStyle(G),this.updateTextInputPadding();var B=this.textInputElement||this.inputElement;x.HtmlFocusUtils.focusWithPreventScroll(B),B.select&&B.select()},C.prototype.setTextInputElementBounds=function(I,L,N){this.savedTextInputPosition=I,this.savedTextInputSize=L,this.savedTextInputAngle=N;var G=this.layoutPointResolver.getAbsolutePoint(I,!0);this.textInputElementContainer.style.left=G.x+"px",this.textInputElementContainer.style.top=G.y+"px",this.textInputElementContainer.style.width=L&&L.width+"px"||"0px",this.textInputElementContainer.style.height=L&&L.height+"px"||"0px";var k=[];this.textInputElementContainer.style.transform="",1!==this.actualZoom&&k.push("scale("+this.actualZoom+")"),N&&k.push("rotate("+N+"deg)"),this.textInputElementContainer.style.transform=k.join(" "),this.textInputElement.style.width=L&&L.width+"px"||"",this.textInputElement.style.height=L&&L.height+"px"||"auto"},C.prototype.setTextInputElementStyle=function(I){this.savedTextInputStyle=I,T.RenderUtils.applyStyleToElement(I,this.textInputElement)},C.prototype.createFocusInputElement=function(I){this.inputElement=document.createElement("textarea"),this.inputElement.readOnly=u.Browser.TouchUI,this.inputElement.setAttribute("class","dxdi-focus-input"),I.appendChild(this.inputElement)},C.prototype.attachInputElementEvents=function(){this.onInputBlurHandler=this.onInputBlur.bind(this),this.onInputFocusHandler=this.onInputFocus.bind(this),this.onInputKeyDownHandler=this.onInputKeyDown.bind(this),this.onInputKeyPressHandler=this.onInputKeyPress.bind(this),this.onInputKeyUpHandler=this.onInputKeyUp.bind(this),this.onPasteHandler=this.onPaste.bind(this),g.RenderHelper.addEventListener(this.inputElement,"blur",this.onInputBlurHandler),g.RenderHelper.addEventListener(this.inputElement,"focus",this.onInputFocusHandler),g.RenderHelper.addEventListener(this.inputElement,"keydown",this.onInputKeyDownHandler),g.RenderHelper.addEventListener(this.inputElement,"keypress",this.onInputKeyPressHandler),g.RenderHelper.addEventListener(this.inputElement,"keyup",this.onInputKeyUpHandler),g.RenderHelper.addEventListener(this.inputElement,"paste",this.onPasteHandler)},C.prototype.detachInputElementEvents=function(){g.RenderHelper.removeEventListener(this.inputElement,"blur",this.onInputBlurHandler),g.RenderHelper.removeEventListener(this.inputElement,"focus",this.onInputFocusHandler),g.RenderHelper.removeEventListener(this.inputElement,"keydown",this.onInputKeyDownHandler),g.RenderHelper.removeEventListener(this.inputElement,"keypress",this.onInputKeyPressHandler),g.RenderHelper.removeEventListener(this.inputElement,"keyup",this.onInputKeyUpHandler),g.RenderHelper.removeEventListener(this.inputElement,"paste",this.onPasteHandler)},C.prototype.createTextInputElement=function(I){this.textInputElementContainer=document.createElement("div"),this.textInputElementContainer.setAttribute("class","dxdi-text-input-container"),I.appendChild(this.textInputElementContainer),this.textInputElement=document.createElement("textarea"),this.textInputElement.setAttribute("class",w),this.attachTextInputElementEvents(),this.textInputElementContainer.appendChild(this.textInputElement)},C.prototype.attachTextInputElementEvents=function(){this.onTextInputBlurHandler=this.onTextInputBlur.bind(this),this.onTextInputFocusHandler=this.onTextInputFocus.bind(this),this.onTextInputKeyDownHandler=this.onTextInputKeyDown.bind(this),this.onTextInputMouseWheelHandler=this.onTextInputMouseWheel.bind(this),this.onTextInputMouseUpHandler=this.onTextInputMouseUp.bind(this),this.onTextInputKeyUpHandler=this.onTextInputKeyUp.bind(this),this.onTextInputChangeHandler=this.onTextInputChange.bind(this),g.RenderHelper.addEventListener(this.textInputElement,"mousewheel",this.onTextInputMouseWheelHandler),g.RenderHelper.addEventListener(this.textInputElement,"mouseup",this.onTextInputMouseUpHandler),g.RenderHelper.addEventListener(this.textInputElement,"blur",this.onTextInputBlurHandler),g.RenderHelper.addEventListener(this.textInputElement,"focus",this.onTextInputFocusHandler),g.RenderHelper.addEventListener(this.textInputElement,"keydown",this.onTextInputKeyDownHandler),g.RenderHelper.addEventListener(this.textInputElement,"keyup",this.onTextInputKeyUpHandler),g.RenderHelper.addEventListener(this.textInputElement,"change",this.onTextInputChangeHandler)},C.prototype.detachTextInputElementEvents=function(){g.RenderHelper.removeEventListener(this.textInputElement,"mousewheel",this.onTextInputMouseWheelHandler),g.RenderHelper.removeEventListener(this.textInputElement,"mouseup",this.onTextInputMouseUpHandler),g.RenderHelper.removeEventListener(this.textInputElement,"blur",this.onTextInputBlurHandler),g.RenderHelper.removeEventListener(this.textInputElement,"focus",this.onTextInputFocusHandler),g.RenderHelper.removeEventListener(this.textInputElement,"keydown",this.onTextInputKeyDownHandler),g.RenderHelper.removeEventListener(this.textInputElement,"keyup",this.onTextInputKeyUpHandler),g.RenderHelper.removeEventListener(this.textInputElement,"change",this.onTextInputChangeHandler)},C.prototype.createClipboardInputElement=function(I){this.clipboardInputElement=document.createElement("textarea"),this.clipboardInputElement.setAttribute("class","dxdi-clipboard-input"),I.appendChild(this.clipboardInputElement)},C.prototype.blurControl=function(){this.focusLocked||(this.focused=!1,S.DomUtils.removeClassName(this.mainElement,"focused"))},C.prototype.focusControl=function(){this.focused=!0,this.focusLocked=!1,S.DomUtils.addClassName(this.mainElement,"focused")},C.prototype.updateTextInputPadding=function(){var I=this.textInputElement.value;if(this.savedTextInputSize){N=this.textMeasurer.measureWords(I,this.savedTextInputStyle,a.TextOwner.Shape),G=_.getTextHeight(I,this.savedTextInputSize.width,N,!0);var L=Math.max(0,.5*(this.savedTextInputSize.height-G));this.textInputElement.style.paddingTop=Math.ceil(L)+"px",this.textInputElement.style.height=Math.floor(this.savedTextInputSize.height)+"px"}else{var N=this.textMeasurer.measureWords(" ",this.savedTextInputStyle,a.TextOwner.Connector),G=_.getLineHeight(N)*((_.textToParagraphs(I).length||1)+1);this.textInputElement.style.height=Math.ceil(G)+"px"}},C.prototype.onInputBlur=function(I){var L=this;this.blurControl(),T.raiseEvent(I,this.getDiagramFocusEvent(I),function(N){return L.eventManager.onBlur(N)})},C.prototype.onInputFocus=function(I){var L=this;this.focusControl(),T.raiseEvent(I,this.getDiagramFocusEvent(I),function(N){return L.eventManager.onFocus(N)})},C.prototype.onInputKeyDown=function(I){var L=this;T.raiseEvent(I,this.getDiagramKeyboardEvent(I),function(N){return L.eventManager.onKeyDown(N)})},C.prototype.onInputKeyPress=function(I){!I.preventDefault||u.Browser.Safari&&"KeyV"===I.code||I.preventDefault()},C.prototype.onInputKeyUp=function(I){var L=this;T.raiseEvent(I,this.getDiagramKeyboardEvent(I),function(N){return L.eventManager.onKeyUp(N)})},C.prototype.onTextInputBlur=function(I){var L=this;if(this.eventManager.canFinishTextEditing())this.blurControl(),T.raiseEvent(I,this.getDiagramFocusEvent(I),function(G){return L.eventManager.onTextInputBlur(G)});else{var N=s.EvtUtils.getEventSource(I);document.activeElement!==N&&N.focus()}},C.prototype.onTextInputFocus=function(I){var L=this;this.focusControl(),T.raiseEvent(I,this.getDiagramFocusEvent(I),function(N){return L.eventManager.onTextInputFocus(N)})},C.prototype.onTextInputKeyDown=function(I){var L=this;T.raiseEvent(I,this.getDiagramKeyboardEvent(I),function(N){return L.eventManager.onTextInputKeyDown(N)})},C.prototype.onTextInputKeyUp=function(I){this.updateTextInputPadding()},C.prototype.onTextInputChange=function(I){this.updateTextInputPadding()},C.prototype.onPaste=function(I){var L=this;T.raiseEvent(I,this.getDiagramClipboardEvent(I),function(N){return L.eventManager.onPaste(N)})},C.prototype.onTextInputMouseWheel=function(I){this.mouseWheelHandler&&this.mouseWheelHandler(I)},C.prototype.onTextInputMouseUp=function(I){I.stopPropagation&&I.stopPropagation(),s.EvtUtils.cancelBubble(I)},C.prototype.getDiagramKeyboardEvent=function(I){return new y.DiagramKeyboardEvent(f.KeyUtils.getKeyModifiers(I),f.KeyUtils.getEventKeyCode(I),this.textInputElement.value)},C.prototype.getTextInputElementValue=function(){return this.textInputElement.value},C.prototype.getDiagramFocusEvent=function(I){return new y.DiagramFocusEvent(I.target.value)},C.prototype.getDiagramClipboardEvent=function(I){var L,N=I.clipboardData||I.originalEvent&&I.originalEvent.clipboardData;return L=void 0!==N?N.getData("text/plain"):window.clipboardData.getData("Text"),new y.DiagramClipboardEvent(L)},C.prototype.isTextInputElement=function(I){return"string"==typeof I.className&&I.className.indexOf(w)>-1},C.prototype.lockFocus=function(){var I=this;this.focusLocked=!0,setTimeout(function(){return I.focusLocked=!1},10)},C.prototype.notifyViewAdjusted=function(I){},C.prototype.notifyActualZoomChanged=function(I){this.actualZoom=I,this.savedTextInputPosition&&this.savedTextInputSize&&this.setTextInputElementBounds(this.savedTextInputPosition,this.savedTextInputSize,this.savedTextInputAngle)},C.prototype.notifyTextInputStart=function(I,L,N,G){var k,U="";I instanceof d.Shape?(U="shape-text",k=I.textAngle):I instanceof c.Connector&&(U="connector-text"),G=G&&G.clone().applyConverter(h.UnitConverter.twipsToPixels),this.setInputElementTextInputMode(L,N,G,I.styleText,U,k)},C.prototype.notifyTextInputEnd=function(I,L){this.setInputElementFocusHandlerMode(L)},C.prototype.notifyTextInputPermissionsCheck=function(I,L){},C}();P.InputManager=D},4246:(o,P)=>{var b;Object.defineProperty(P,"__esModule",{value:!0}),P.TextOwner=void 0,(b=P.TextOwner||(P.TextOwner={}))[b.Shape=0]="Shape",b[b.Connector=1]="Connector",b[b.ExtensionLine=2]="ExtensionLine",b[b.Resize=3]="Resize"},1733:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.TextMeasurer=void 0;var f=b(6353),S=b(3500),T=b(5503),y=b(7959),d=b(4246),c=b(1114),s=b(3490),a=function(){function u(h){this.cache={},this.fontSizeCache={},this.containers={},this.parent=h,this.createNodes()}return u.prototype.measureWords=function(h,g,_){var x=this,w={words:{},fontSize:-1},D="string"==typeof h?this.splitToWords(h,!1):h.reduce(function(N,G){return N.concat(x.splitToWords(G,!1))},[]);D.push(" ");var C=this.getStyleHash(g,_),I=this.tryLoadWordsToMeasurer(D,g,C,_,void 0,void 0,void 0,void 0,w);return I&&(this.putElementsInDOM(this.containers[_],I),this.beforeMeasureInDOM(),this.measureElementsInDOM(I,w),this.afterMeasureInDOM()),w},u.prototype.measureTextLine=function(h,g,_){var x=this.measureWords(h,g,_);return s.getTextLineSize(h,x)},u.prototype.onNewModel=function(h,g){var _=this;g.changeByFunc(null,function(){return _.onNewModelCore(h)})},u.prototype.onNewModelCore=function(h){var g=h.filter(function(D){return D instanceof T.Shape}),_=h.filter(function(D){return D instanceof y.Connector}),x=this.tryLoadShapeTexts(g),w=this.tryLoadConnectorTexts(_);(x||w)&&(x&&this.putElementsInDOM(this.containers[d.TextOwner.Shape],x),w&&this.putElementsInDOM(this.containers[d.TextOwner.Connector],w),this.beforeMeasureInDOM(),x&&this.measureElementsInDOM(x),w&&this.measureElementsInDOM(w),this.afterMeasureInDOM())},u.prototype.replaceParent=function(h){this.parent!==h&&(this.mainElement.parentNode&&h.appendChild(this.mainElement),this.parent=h)},u.prototype.clean=function(){S.RenderUtils.removeElement(this.mainElement)},u.prototype.tryLoadShapeTexts=function(h){var g=this,_={},x=[],w=[],D=[];return h.forEach(function(C){var I=g.getStyleHash(C.styleText,d.TextOwner.Shape);g.tryLoadWordsToMeasurer(g.splitToWords(C.text,!0),C.styleText,I,d.TextOwner.Shape,_,x,w,D)}),x.length?{elements:x,hashes:w,styleHashes:D}:null},u.prototype.tryLoadConnectorTexts=function(h){var g=this,_={},x=[],w=[],D=[];return h.forEach(function(C){var I=C.texts.map(function(N){return N.value}).reduce(function(N,G){return N.concat(g.splitToWords(G,!1))},[]);if(I.length){I.push(" ");var L=g.getStyleHash(C.styleText,d.TextOwner.Connector);g.tryLoadWordsToMeasurer(I,C.styleText,L,d.TextOwner.Connector,_,x,w,D)}}),x.length?{elements:x,hashes:w,styleHashes:D}:null},u.prototype.tryLoadWordsToMeasurer=function(h,g,_,x,w,D,C,I,L){var N=this,G=[];return D=D||[],C=C||[],I=I||[],w=w||{},h.forEach(function(k){return N.tryLoadWordToMeasurer(k,g,_,x,w,D,C,I,G,L)}),D.length?{elements:D,hashes:C,styleHashes:I,newWords:G}:null},u.prototype.putElementsInDOM=function(h,g){for(h.parentNode&&h.parentNode.removeChild(h);h.firstChild;)h.removeChild(h.firstChild);g.elements.forEach(function(_){return h.appendChild(_)}),this.svgElement.appendChild(h)},u.prototype.measureElementsInDOM=function(h,g){for(var _=h.hashes,x=h.elements,w=h.newWords,D=_.length,C=0;C<D;C++){var I=this.getDomElementSize(x[C]);I&&(I.isEmpty()||(this.cache[_[C]]=I),g&&(g.words[w[C]]=I));var L=h.styleHashes[C];void 0===this.fontSizeCache[L]&&(this.fontSizeCache[L]=this.getDomFontSize(x[C])),g&&g.fontSize<0&&(g.fontSize=this.fontSizeCache[L])}},u.prototype.beforeMeasureInDOM=function(){this.parent.appendChild(this.mainElement)},u.prototype.afterMeasureInDOM=function(){this.mainElement.parentNode&&this.mainElement.parentNode.removeChild(this.mainElement)},u.prototype.tryLoadWordToMeasurer=function(h,g,_,x,w,D,C,I,L,N){var G=this.getHash(h,g,x),k=this.cache[G];k||w[G]?k&&N&&(N.words[h]=k,N.fontSize=this.fontSizeCache[_]):(w[G]=!0,C.push(G),D.push(this.createElement(h,g)),I.push(_),L.push(h))},u.prototype.getHash=function(h,g,_){return _+"|"+(g&&g.toHash())+"|"+h},u.prototype.getStyleHash=function(h,g){return this.getHash(" ",h,g)},u.prototype.createElement=function(h,g){var _=document.createElementNS(c.svgNS,"text");return" "===h&&_.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),_.textContent=h,g&&S.RenderUtils.applyStyleToElement(g,_),_},u.prototype.splitToWords=function(h,g){var _=s.textToWords(h);return g&&_.push(" "),_},u.prototype.getDomFontSize=function(h){return parseFloat(window.getComputedStyle(h).fontSize)},u.prototype.getDomElementSize=function(h){var g;try{g=h.getBBox()}catch{}return g?new f.Size(g.width,g.height):new f.Size(0,0)},u.prototype.createNodes=function(){this.mainElement=c.RenderHelper.createMainElement(void 0,!0),this.svgElement=c.RenderHelper.createSvgElement(this.mainElement,!1),this.createContainer(d.TextOwner.Shape,"shape"),this.createContainer(d.TextOwner.Connector,"connector"),this.createContainer(d.TextOwner.ExtensionLine,"extension-line"),this.createContainer(d.TextOwner.Resize,"resize-info")},u.prototype.createContainer=function(h,g){var _=document.createElementNS(c.svgNS,"g");_.setAttribute("class",g),this.containers[h]=_},u}();P.TextMeasurer=a},4593:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ClipPathPrimitive=void 0;var T=b(1114),y=function(d){function c(s,a){var u=d.call(this)||this;return u.id=s,u.children=a,u}return S(c,d),c.prototype.createMainElement=function(){var s=document.createElementNS(T.svgNS,"clipPath");return s.setAttribute("id",this.id),s},c.prototype.applyElementProperties=function(s,a){this.id&&s.setAttribute("id",this.id),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4178).SvgPrimitive);P.ClipPathPrimitive=y},418:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.EllipsePrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_,x){var w=d.call(this,g,_,void 0,x)||this;return w.cx=s,w.cy=a,w.rx=u,w.ry=h,w}return S(c,d),c.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"ellipse")},c.prototype.applyElementProperties=function(s,a){this.setUnitAttribute(s,"cx",this.cx),this.setUnitAttribute(s,"cy",this.cy),this.setUnitAttribute(s,"rx",this.rx),this.setUnitAttribute(s,"ry",this.ry),this.setPositionCorrectionAttribute(s),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4178).SvgPrimitive);P.EllipsePrimitive=y},4628:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.FilterPrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g){var _=d.call(this)||this;return _.id=s,_.x=a,_.y=u,_.width=h,_.height=g,_}return S(c,d),c.prototype.createMainElement=function(){var s=document.createElementNS(T.svgNS,"filter");return s.setAttribute("id",this.id),s},c.prototype.applyElementProperties=function(s,a){this.id&&s.setAttribute("id",this.id),this.setUnitAttribute(s,"x",this.x),this.setUnitAttribute(s,"y",this.y),this.setUnitAttribute(s,"width",this.width),this.setUnitAttribute(s,"height",this.height),this.setPositionCorrectionAttribute(s),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4178).SvgPrimitive);P.FilterPrimitive=y},5329:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.GroupPrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_){var x=d.call(this,null,a,h,g)||this;return x.zIndex=u,x.onBeforeDispose=_,x.children=s,x}return S(c,d),c.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"g")},c.prototype.applyElementProperties=function(s,a){(this.zIndex||0===this.zIndex)&&s.style.setProperty("z-index",this.zIndex.toString()),d.prototype.applyElementProperties.call(this,s,a)},c.prototype.dispose=function(){this.onBeforeDispose&&this.onBeforeDispose(),d.prototype.dispose.call(this)},c}(b(4178).SvgPrimitive);P.GroupPrimitive=y},1995:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.ImagePrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_,x,w){void 0===_&&(_="none");var D=d.call(this,x,w)||this;return D.x=s,D.y=a,D.width=u,D.height=h,D.url=g,D.preserveAspectRatio=_,D}return S(c,d),c.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"image")},c.prototype.applyElementProperties=function(s,a){this.setUnitAttribute(s,"x",this.x),this.setUnitAttribute(s,"y",this.y),this.setUnitAttribute(s,"width",this.width),this.setUnitAttribute(s,"height",this.height),this.setPositionCorrectionAttribute(s),s.setAttribute("href",this.url),s.setAttribute("preserveAspectRatio",this.preserveAspectRatio),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4178).SvgPrimitive);P.ImagePrimitive=y},7724:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.PathPrimitiveClosePathCommand=P.PathPrimitiveArcToCommand=P.PathPrimitiveQuadraticCurveToCommand=P.PathPrimitiveCubicCurveToCommand=P.PathPrimitiveLineToCommand=P.PathPrimitiveMoveToCommand=P.PathPrimitiveCommand=P.PathPrimitive=void 0;var T=b(1114),y=b(4178),d=b(9886),c=function(w){function D(C,I,L,N,G){var k=w.call(this,I,L,N,G)||this;return k.commands=C.map(function(U){return U.style=I,U}),k}return S(D,w),D.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"path")},D.prototype.applyElementProperties=function(C,I){C.setAttribute("d",this.commands.map(function(L){return L.toString()}).join(" ")),this.setPositionCorrectionAttribute(C),w.prototype.applyElementProperties.call(this,C,I)},D}(y.SvgPrimitive);P.PathPrimitive=c;var s=function(w){function D(){return null!==w&&w.apply(this,arguments)||this}return S(D,w),D}(d.PrimitiveObject);P.PathPrimitiveCommand=s;var a=function(w){function D(C,I){var L=w.call(this)||this;return L.x=C,L.y=I,L}return S(D,w),D.prototype.toString=function(){return"M "+this.getUnitVaue(this.x)+" "+this.getUnitVaue(this.y)},D.fromPoint=function(C){return new D(C.x,C.y)},D}(s);P.PathPrimitiveMoveToCommand=a;var u=function(w){function D(C,I){var L=w.call(this)||this;return L.x=C,L.y=I,L}return S(D,w),D.prototype.toString=function(){return"L "+this.getUnitVaue(this.x)+" "+this.getUnitVaue(this.y)},D.fromPoint=function(C){return new D(C.x,C.y)},D}(s);P.PathPrimitiveLineToCommand=u;var h=function(w){function D(C,I,L,N,G,k){var U=w.call(this)||this;return U.x1=C,U.y1=I,U.x2=L,U.y2=N,U.x3=G,U.y3=k,U}return S(D,w),D.prototype.toString=function(){return"C "+this.getUnitVaue(this.x1)+" "+this.getUnitVaue(this.y1)+","+this.getUnitVaue(this.x2)+" "+this.getUnitVaue(this.y2)+","+this.getUnitVaue(this.x3)+" "+this.getUnitVaue(this.y3)},D}(s);P.PathPrimitiveCubicCurveToCommand=h;var g=function(w){function D(C,I,L,N){var G=w.call(this)||this;return G.x1=C,G.y1=I,G.x2=L,G.y2=N,G}return S(D,w),D.prototype.toString=function(){return"Q "+this.getUnitVaue(this.x1)+" "+this.getUnitVaue(this.y1)+","+this.getUnitVaue(this.x2)+" "+this.getUnitVaue(this.y2)},D}(s);P.PathPrimitiveQuadraticCurveToCommand=g;var _=function(w){function D(C,I,L,N,G,k,U){var B=w.call(this)||this;return B.rx=C,B.ry=I,B.xAxisRotation=L,B.largeArcFlag=N,B.sweepFag=G,B.x=k,B.y=U,B}return S(D,w),D.prototype.toString=function(){return"A "+this.getUnitVaue(this.rx)+" "+this.getUnitVaue(this.ry)+" "+this.getUnitVaue(this.xAxisRotation)+" "+(this.largeArcFlag?"1":"0")+" "+(this.sweepFag?"1":"0")+this.getUnitVaue(this.x)+","+this.getUnitVaue(this.y)},D}(s);P.PathPrimitiveArcToCommand=_;var x=function(w){function D(){return w.call(this)||this}return S(D,w),D.prototype.toString=function(){return"z"},D}(s);P.PathPrimitiveClosePathCommand=x},1932:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.PatternPrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_,x){var w=d.call(this,x)||this;return w.id=s,w.x=u,w.y=h,w.width=g,w.height=_,w.children=a,w}return S(c,d),c.prototype.createMainElement=function(){var s=document.createElementNS(T.svgNS,"pattern");return s.setAttribute("patternUnits","userSpaceOnUse"),s.setAttribute("id",this.id),s},c.prototype.applyElementProperties=function(s,a){this.setUnitAttribute(s,"x",this.x),this.setUnitAttribute(s,"y",this.y),this.setUnitAttribute(s,"width",this.width),this.setUnitAttribute(s,"height",this.height),this.setPositionCorrectionAttribute(s),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4178).SvgPrimitive);P.PatternPrimitive=y},4178:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.SvgPrimitive=void 0;var T=b(3500),y=function(d){function c(s,a,u,h){var g=d.call(this,s)||this;return g.className=a,g.clipPathId=u,g.onApplyProperties=h,g.children=[],g}return S(c,d),c.prototype.createElement=function(s){var a=this.createMainElement();return this.createChildElements(a),s(a),this.createCustomContent(a),a},c.prototype.createChildElements=function(s){for(var a=0;a<this.children.length;a++)this.children[a].createElement(function(u){return s.appendChild(u)})},c.prototype.applyElementProperties=function(s,a){this.applyElementStyleProperties(s),this.className&&s.setAttribute("class",this.className),"string"==typeof this.clipPathId&&(this.clipPathId?s.setAttribute("clip-path",T.RenderUtils.getUrlPathById(this.clipPathId)):s.removeAttribute("clip-path")),this.onApplyProperties&&this.onApplyProperties(s),this.applyChildrenProperties(s,a)},c.prototype.applyChildrenProperties=function(s,a){for(var u=0;u<this.children.length;u++)this.children[u].applyElementProperties(s.childNodes[u],a)},c.prototype.applyElementStyleProperties=function(s){this.applyElementStylePropertiesCore(s)},c.prototype.applyElementStylePropertiesCore=function(s,a){void 0===a&&(a=!1),this.style&&T.RenderUtils.applyStyleToElement(this.style,s,a)},c.prototype.createCustomContent=function(s){},c.prototype.destroyCustomContent=function(s){},c.prototype.dispose=function(){this.children&&this.children.forEach(function(s){return s.dispose()})},c}(b(9886).PrimitiveObject);P.SvgPrimitive=y},9886:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PrimitiveObject=void 0;var f=b(9291),S=function(){function T(y){this.style=y}return Object.defineProperty(T.prototype,"strokeWidthPx",{get:function(){return this.style?this.style.strokeWidthPx:0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"strokeOffset",{get:function(){return this.style?this.style.strokeOffset:0},enumerable:!1,configurable:!0}),T.prototype.getUnitVaue=function(y){return"number"==typeof y?f.UnitConverter.twipsToPixels(y).toString():y},T.prototype.setUnitAttribute=function(y,d,c){null!=c&&y.setAttribute(d,this.getUnitVaue(c))},T.prototype.setPositionCorrectionAttribute=function(y){y.setAttribute("transform",this.strokeWidthPx%2==1?"translate("+this.strokeOffset+", "+this.strokeOffset+")":"")},T}();P.PrimitiveObject=S},4716:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.RectanglePrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_,x,w){var D=d.call(this,g,_,x,w)||this;return D.x=s,D.y=a,D.width=u,D.height=h,D}return S(c,d),c.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"rect")},c.prototype.applyElementProperties=function(s,a){this.setUnitAttribute(s,"x",this.x),this.setUnitAttribute(s,"y",this.y),this.setUnitAttribute(s,"width",this.width),this.setUnitAttribute(s,"height",this.height),this.setPositionCorrectionAttribute(s),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4178).SvgPrimitive);P.RectanglePrimitive=y},4538:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.RoundedRectanglePrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_,x,w,D,C){void 0===g&&(g=0),void 0===_&&(_=0);var I=d.call(this,s,a,u,h,x,w,D,C)||this;return I.x=s,I.y=a,I.width=u,I.height=h,I.rx=g,I.ry=_,I}return S(c,d),c.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"rect")},c.prototype.applyElementProperties=function(s,a){this.setUnitAttribute(s,"rx",this.rx),this.setUnitAttribute(s,"ry",this.ry),d.prototype.applyElementProperties.call(this,s,a)},c}(b(4716).RectanglePrimitive);P.RoundedRectanglePrimitive=y},3281:function(o,P,b){var f,S=this&&this.__extends||(f=function(c,s){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])})(c,s)},function(c,s){function a(){this.constructor=c}f(c,s),c.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(P,"__esModule",{value:!0}),P.ShadowFilterPrimitive=void 0;var T=b(4628),y=b(1114),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S(s,c),s.prototype.createChildElements=function(a){var u=document.createElementNS(y.svgNS,"feGaussianBlur");u.setAttribute("in","SourceGraphic"),u.setAttribute("stdDeviation","4.6"),a.appendChild(u);var h=document.createElementNS(y.svgNS,"feOffset");h.setAttribute("dx","0"),h.setAttribute("dy","0"),a.appendChild(h);var g=document.createElementNS(y.svgNS,"feMerge");a.appendChild(g);var _=document.createElementNS(y.svgNS,"feMergeNode");g.appendChild(_);var x=document.createElementNS(y.svgNS,"feMergeNode");x.setAttribute("in","SourceGraphic"),g.appendChild(x)},s}(T.FilterPrimitive);P.ShadowFilterPrimitive=d},1248:function(o,P,b){var f,S=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)a.hasOwnProperty(u)&&(s[u]=a[u])})(d,c)},function(d,c){function s(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(s.prototype=c.prototype,new s)});Object.defineProperty(P,"__esModule",{value:!0}),P.SvgElementPrimitive=void 0;var T=b(1114),y=function(d){function c(s,a,u,h,g,_,x,w,D){var C=d.call(this,null,w,void 0,D)||this;return C.x=s,C.y=a,C.width=u,C.height=h,C.createContent=g,C.destroyContent=_,C.data=x,C}return S(c,d),c.prototype.createMainElement=function(){return document.createElementNS(T.svgNS,"svg")},c.prototype.applyElementProperties=function(s,a){this.setUnitAttribute(s,"x",this.x),this.setUnitAttribute(s,"y",this.y),this.setUnitAttribute(s,"width",this.width),this.setUnitAttribute(s,"height",this.height),this.setPositionCorrectionAttribute(s),d.prototype.applyElementProperties.call(this,s,a)},c.prototype.createCustomContent=function(s){this.createContent&&this.createContent(s,this.data)},c.prototype.destroyCustomContent=function(s){this.destroyContent&&this.destroyContent(s)},c}(b(4178).SvgPrimitive);P.SvgElementPrimitive=y},3360:function(o,P,b){var f,S=this&&this.__extends||(f=function(u,h){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,_){g.__proto__=_}||function(g,_){for(var x in _)_.hasOwnProperty(x)&&(g[x]=_[x])})(u,h)},function(u,h){function g(){this.constructor=u}f(u,h),u.prototype=null===h?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(P,"__esModule",{value:!0}),P.TextFloodFilterPrimitive=P.TextFilterPrimitive=void 0;var T=b(1114),y=b(4628),d=b(6613),c=b(13),s=function(u){function h(g,_,x,w,D){void 0===_&&(_="-0.05"),void 0===x&&(x="-0.05"),void 0===w&&(w="1.1"),void 0===D&&(D="1.1");var C=u.call(this,g,_,x,w,D)||this;return C.id=g,C.x=_,C.y=x,C.width=w,C.height=D,C}return S(h,u),h.prototype.createChildElements=function(g){var _=document.createElementNS(T.svgNS,"feFlood");g.appendChild(_);var x=document.createElementNS(T.svgNS,"feComposite");x.setAttribute("in","SourceGraphic"),x.setAttribute("operator","atop"),g.appendChild(x)},h}(y.FilterPrimitive);P.TextFilterPrimitive=s;var a=function(u){function h(g,_,x,w,D,C){void 0===x&&(x="-0.05"),void 0===w&&(w="-0.05"),void 0===D&&(D="1.1"),void 0===C&&(C="1.1");var I=u.call(this,g,x,w,D,C)||this;return I.id=g,I.floodColor=_,I.x=x,I.y=w,I.width=D,I.height=C,I}return S(h,u),h.prototype.applyChildrenProperties=function(g){for(var _=void 0,x=0;_=g.childNodes[x];x++)if(_.nodeName&&"FEFLOOD"===_.nodeName.toUpperCase()){this.prepareFEFloodNode(_);break}},h.prototype.prepareFEFloodNode=function(g){var _=c.ColorUtils.colorToHash(this.floodColor);g.setAttribute("flood-color",_),g.setAttribute("class","text-filter-flood"),g.style.setProperty("flood-color",this.floodColor!==d.DiagramModel.defaultPageColor?_:"")},h}(s);P.TextFloodFilterPrimitive=a},9416:function(o,P,b){var f,S=this&&this.__extends||(f=function(w,D){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,I){C.__proto__=I}||function(C,I){for(var L in I)I.hasOwnProperty(L)&&(C[L]=I[L])})(w,D)},function(w,D){function C(){this.constructor=w}f(w,D),w.prototype=null===D?Object.create(D):(C.prototype=D.prototype,new C)});Object.defineProperty(P,"__esModule",{value:!0}),P.TextPrimitive270degRenderHelper=P.TextPrimitive180degRenderHelper=P.TextPrimitive90degRenderHelper=P.TextPrimitiveRenderHelper=P.TextPrimitive=P.TextAngle=void 0;var T,w,y=b(9291),d=b(1114),c=b(4178),s=b(3500),a=b(3490);(w=T=P.TextAngle||(P.TextAngle={}))[w.Angle0deg=0]="Angle0deg",w[w.Angle90deg=90]="Angle90deg",w[w.Angle180deg=180]="Angle180deg",w[w.Angle270deg=270]="Angle270deg";var u=function(w){function D(C,I,L,N,G,k,U,B,K,J,ie,re,q){var Y=w.call(this,B,"",J,q)||this;return Y.x=C,Y.y=I,Y.text=L,Y.owner=N,Y.textWidth=G,Y.textHeight=k,Y.textSpacing=U,Y.reverseTextAhchor=K,Y.angle=re,Y.filterId=ie,Y.textSegmens=a.textToParagraphs(Y.text),Y.renderHelper=Y.createRenderHelper(),void 0!==Y.textWidth&&void 0!==Y.textWidth&&(Y.x=Y.renderHelper.getTextX(Y.x),Y.y=Y.renderHelper.getTextY(Y.y)),Y}return S(D,w),D.prototype.createMainElement=function(){return document.createElementNS(d.svgNS,"text")},D.prototype.applyElementProperties=function(C,I){this.setUnitAttribute(C,"x",this.x),this.setUnitAttribute(C,"y",this.y),this.filterId&&C.setAttribute("filter",s.RenderUtils.getUrlPathById(this.filterId)),w.prototype.applyElementProperties.call(this,C,I),C.getAttribute("appliedText")!==this.text||C.getAttribute("appliedSize")!==(this.fitToSize&&this.fitToSize.toString())?(this.createTSpanElements(C,I),C.setAttribute("appliedText",this.text),C.setAttribute("appliedSize",this.fitToSize&&this.fitToSize.toString())):this.prepareTSpanElements(C),this.renderHelper.prepareMainElement(C,this.x,this.y)},D.prototype.createTSpanElements=function(C,I){var L=this;s.RenderUtils.removeContent(C),this.textSegmens.forEach(function(G,k){if(!G&&L.textSegmens.length>1)L.createTSpanElement(C).textContent=" ";else if(L.fitToSize){var U=a.textToWords(G),B=a.wordsByLines(y.UnitConverter.twipsToPixels(L.fitToSize),U,function(){return I.measureWords(U,L.style,L.owner)});B.forEach(function(K){L.createTSpanElement(C).textContent=K}),!B.length&&(L.createTSpanElement(C).textContent=" ")}else L.createTSpanElement(C).textContent=G});var N=C.firstChild;N&&this.prepareFirstTSpanElement(N,C.childNodes.length)},D.prototype.createTSpanElement=function(C){var I=document.createElementNS(d.svgNS,"tspan");return C.appendChild(I),this.prepareTSpanElement(I),I},D.prototype.prepareTSpanElements=function(C){for(var I=0;I<C.childNodes.length;I++)this.prepareTSpanElement(C.childNodes[I]);var N=C.firstChild;N&&this.prepareFirstTSpanElement(N,C.childNodes.length)},D.prototype.prepareTSpanElement=function(C){this.renderHelper.prepareTSpanElement(C,this.x,this.y)},D.prototype.prepareFirstTSpanElement=function(C,I){this.renderHelper.prepareFirstTSpanElement(C,I)},D.prototype.applyElementStyleProperties=function(C){this.applyElementStylePropertiesCore(C,this.reverseTextAhchor)},Object.defineProperty(D.prototype,"fitToSize",{get:function(){return this.renderHelper.fitToSize},enumerable:!1,configurable:!0}),D.prototype.createRenderHelper=function(){switch(this.angle){case T.Angle90deg:return new g(this);case T.Angle180deg:return new _(this);case T.Angle270deg:return new x(this);default:return new h(this)}},D.baselineCorrection=.35,D}(c.SvgPrimitive);P.TextPrimitive=u;var h=function(){function w(D){this.primitive=D}return Object.defineProperty(w.prototype,"textWidth",{get:function(){return this.primitive.textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"textHeight",{get:function(){return this.primitive.textHeight},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"fitToSize",{get:function(){return this.textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"textAnchor",{get:function(){return this.primitive.style["text-anchor"]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"textSpacing",{get:function(){return this.primitive.textSpacing},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"angle",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"needRotation",{get:function(){return!1},enumerable:!1,configurable:!0}),w.prototype.prepareMainElement=function(D,C,I){this.needRotation&&D.setAttribute("transform","rotate("+this.angle+", "+y.UnitConverter.twipsToPixels(C)+", "+y.UnitConverter.twipsToPixels(I)+")")},w.prototype.prepareTSpanElement=function(D,C,I){this.primitive.setUnitAttribute(D,"x",C),D.setAttribute("dy",a.LINE_HEIGHT+"em")},w.prototype.prepareFirstTSpanElement=function(D,C){D.setAttribute("dy",(-(C-1)/2+u.baselineCorrection).toFixed(2)+"em")},w.prototype.getTextX=function(D){return this.textAnchor&&"middle"!==this.textAnchor?"end"===this.textAnchor?D+this.textWidth-this.textSpacing:"start"===this.textAnchor?D+this.textSpacing:D:D+this.textWidth/2},w.prototype.getTextY=function(D){return D+this.textHeight/2},w.prototype.setUnitAttribute=function(D,C,I){this.primitive.setUnitAttribute(D,C,I)},w}();P.TextPrimitiveRenderHelper=h;var g=function(w){function D(C){return w.call(this,C)||this}return S(D,w),Object.defineProperty(D.prototype,"fitToSize",{get:function(){return this.textHeight},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"angle",{get:function(){return 90},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"needRotation",{get:function(){return!0},enumerable:!1,configurable:!0}),D.prototype.getTextX=function(C){return C+this.textWidth/2},D.prototype.getTextY=function(C){return this.textAnchor&&"middle"!==this.textAnchor?"end"===this.textAnchor?C+this.textHeight-this.textSpacing:"start"===this.textAnchor?C+this.textSpacing:C:C+this.textHeight/2},D}(h);P.TextPrimitive90degRenderHelper=g;var _=function(w){function D(C){return w.call(this,C)||this}return S(D,w),Object.defineProperty(D.prototype,"angle",{get:function(){return 180},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"needRotation",{get:function(){return!0},enumerable:!1,configurable:!0}),D.prototype.getTextX=function(C){return this.textAnchor&&"middle"!==this.textAnchor?"start"===this.textAnchor?C+this.textWidth-this.textSpacing:"end"===this.textAnchor?C+this.textSpacing:C:C+this.textWidth/2},D}(h);P.TextPrimitive180degRenderHelper=_;var x=function(w){function D(C){return w.call(this,C)||this}return S(D,w),Object.defineProperty(D.prototype,"angle",{get:function(){return 270},enumerable:!1,configurable:!0}),D.prototype.getTextY=function(C){return this.textAnchor&&"middle"!==this.textAnchor?"start"===this.textAnchor?C+this.textHeight-this.textSpacing:"end"===this.textAnchor?C+this.textSpacing:C:C+this.textHeight/2},D}(g);P.TextPrimitive270degRenderHelper=x},1114:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RenderHelper=P.svgNS=void 0;var f=b(9463);P.svgNS="http://www.w3.org/2000/svg";var S=function(){function T(){}return T.createSvgElement=function(y,d){void 0===d&&(d=!1);var c=document.createElementNS(P.svgNS,"svg");return c.className.baseVal="dxdi-canvas"+(d?" export":""),y&&y.appendChild(c),c},T.createMainElement=function(y,d){void 0===d&&(d=!1);var c=document.createElement("div");return c.setAttribute("class","dxdi-control"+(d?" measurer":"")),f.Diagnostics.optimizeLayers&&(c.style.transform="translateZ(0)"),y&&y.appendChild(c),c},T.addEventListener=function(y,d,c){y.addEventListener(d,c)},T.removeEventListener=function(y,d,c){y.removeEventListener(d,c)},T}();P.RenderHelper=S},8098:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RenderManager=P.DBL_CLICK_TIMEOUT=P.LONG_TOUCH_TIMEOUT=void 0;var f=b(6031),S=b(3714),T=b(6907),y=b(8900),d=b(2153),c=b(9279),s=b(3500),a=b(8693),u=b(7376),h=b(240),g=b(741),_=b(6043),x=b(9757),w=b(4e3),D=b(6557),C=b(1733),I=b(1114),L=b(6078),N=b(8675),G="dxdi-touch-action";P.LONG_TOUCH_TIMEOUT=500,P.DBL_CLICK_TIMEOUT=500;var k=function(){function U(B,K,J,ie,re,q,Y){this.moveLocked=!1,this.lockMouseMoveTimer=-1,this.lastClickElement=void 0,this.longTouchTimer=void 0,this.dblTouchTimer=void 0,this.pointers={};var Z=I.RenderHelper.createMainElement(B),Q=I.RenderHelper.createSvgElement(Z);this.instanceId=re,this.scroll=q||new u.NativeScrollView(B),this.measurer=J,this.dom=new L.DOMManipulator(this.measurer),this.view=new x.CanvasViewManager(this.scroll,Q,ie.modelSize,ie.zoomLevel,ie.autoZoom,ie.simpleView,ie.rectangle,this.dom,this.instanceId),this.input=new g.InputManager(Z,this.view,K,this.measurer,ie.zoomLevel,Y),this.items=new a.CanvasItemsManager(this.view.canvasElement,ie.zoomLevel,this.dom,this.instanceId),this.page=new _.CanvasPageManager(this.view.pageElement,ie,this.dom,this.instanceId),this.selection=new w.CanvasSelectionManager(this.view.canvasElement,ie.zoomLevel,ie.readOnly,this.dom,this.instanceId),this.contextMenuEnabled=ie.contextMenuEnabled,this.view.onViewChanged.add(this.page),this.view.onViewChanged.add(this.items),this.view.onViewChanged.add(this.selection),this.view.onViewChanged.add(this.input),this.autoScroll=new D.AutoScrollController(this.scroll,Q,this.view,this.dom),this.attachEvents(Q),this.mainElement=Z,this.svgElement=Q,this.events=K,this.notifyReadOnlyChanged(ie.readOnly)}return U.prototype.clean=function(B){this.killLockMouseMoveTimer(),this.clearLastMouseDownEvent(),this.detachEvents(this.svgElement),this.scroll.detachEvents(),this.input.detachEvents(),this.dom.cancelAnimation(),B&&B(this.mainElement)},U.prototype.replaceParent=function(B,K){this.mainElement&&this.mainElement.parentNode!==B&&B.appendChild(this.mainElement),K&&K!==this.scroll&&(this.scroll&&this.scroll.detachEvents(),this.scroll=K),this.measurer instanceof C.TextMeasurer&&this.measurer.replaceParent(B)},U.prototype.update=function(B){this.view.adjust({horizontal:!B,vertical:!B}),this.page.redraw()},U.prototype.onNewModel=function(B){this.measurer.onNewModel(B,this.dom)},U.prototype.clear=function(){this.items.clear(),this.selection.clear()},U.prototype.attachPointerEvents=function(B){T.DomUtils.addClassName(B,G),I.RenderHelper.addEventListener(B,"pointerdown",this.onPointerDownHandler),I.RenderHelper.addEventListener(c.Browser.TouchUI?B:document,"pointerup",this.onPointerUpHandler),I.RenderHelper.addEventListener(c.Browser.TouchUI?B:document,"pointermove",this.onPointerMoveHandler),I.RenderHelper.addEventListener(B,"pointercancel",this.onPointerCancelHandler),I.RenderHelper.addEventListener(B,"pointerleave",this.onPointerLeaveHandler)},U.prototype.detachPointerEvents=function(B){I.RenderHelper.removeEventListener(B,"pointerdown",this.onPointerDownHandler),I.RenderHelper.removeEventListener(c.Browser.TouchUI?B:document,"pointerup",this.onPointerUpHandler),I.RenderHelper.removeEventListener(c.Browser.TouchUI?B:document,"pointermove",this.onPointerMoveHandler),I.RenderHelper.removeEventListener(B,"pointercancel",this.onPointerCancelHandler),I.RenderHelper.removeEventListener(B,"pointerleave",this.onPointerLeaveHandler),T.DomUtils.removeClassName(B,G)},U.prototype.attachMouseTouchEvents=function(B){I.RenderHelper.addEventListener(B,this.mouseDownEventName,this.onMouseDownHandler),I.RenderHelper.addEventListener(document,this.mouseMoveEventName,this.onMouseMoveHandler),I.RenderHelper.addEventListener(document,this.mouseUpEventName,this.onMouseUpHandler)},U.prototype.detachMouseTouchEvents=function(B){I.RenderHelper.removeEventListener(B,this.mouseDownEventName,this.onMouseDownHandler),I.RenderHelper.removeEventListener(document,this.mouseMoveEventName,this.onMouseMoveHandler),I.RenderHelper.removeEventListener(document,this.mouseUpEventName,this.onMouseUpHandler)},U.prototype.attachEvents=function(B){this.mouseDownEventName=c.Browser.TouchUI?"touchstart":"mousedown",this.mouseMoveEventName=c.Browser.TouchUI?"touchmove":"mousemove",this.mouseUpEventName=c.Browser.TouchUI?"touchend":"mouseup",this.onPointerDownHandler=this.onPointerDown.bind(this),this.onPointerUpHandler=this.onPointerUp.bind(this),this.onPointerMoveHandler=this.onPointerMove.bind(this),this.onPointerCancelHandler=this.onPointerCancel.bind(this),this.onPointerLeaveHandler=this.onPointerLeave.bind(this),this.onMouseDownHandler=this.onMouseDown.bind(this),this.onMouseEnterHandler=this.onMouseEnter.bind(this),this.onMouseLeaveHandler=this.onMouseLeave.bind(this),this.onMouseWheelHandler=this.onMouseWheel.bind(this),this.onMouseDblClickHandler=this.onMouseDblClick.bind(this),this.onContextMenuHandler=this.onContextMenu.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onWindowResizelHandler=this.onWindowResize.bind(this),this.onOrientationChangeHandler=this.onOrientationChange.bind(this),this.onMouseClickHandler=this.onMouseClick.bind(this),N.EventUtils.isPointerEvents()?this.attachPointerEvents(B):(this.attachMouseTouchEvents(B),I.RenderHelper.addEventListener(B,"mouseenter",this.onMouseEnterHandler),I.RenderHelper.addEventListener(B,"mouseleave",this.onMouseLeaveHandler)),I.RenderHelper.addEventListener(B,"wheel",this.onMouseWheelHandler),I.RenderHelper.addEventListener(B,"dblclick",this.onMouseDblClickHandler),I.RenderHelper.addEventListener(B,"click",this.onMouseClickHandler),I.RenderHelper.addEventListener(B,"contextmenu",this.onContextMenuHandler),I.RenderHelper.addEventListener(window,"resize",this.onWindowResizelHandler),I.RenderHelper.addEventListener(window,"orientationchange",this.onOrientationChangeHandler),this.input.mouseWheelHandler=this.onMouseWheelHandler},U.prototype.detachEvents=function(B){N.EventUtils.isPointerEvents()?this.detachPointerEvents(B):(this.detachMouseTouchEvents(B),I.RenderHelper.removeEventListener(B,"mouseenter",this.onMouseEnterHandler),I.RenderHelper.removeEventListener(B,"mouseleave",this.onMouseLeaveHandler)),I.RenderHelper.removeEventListener(B,"wheel",this.onMouseWheelHandler),I.RenderHelper.removeEventListener(B,"dblclick",this.onMouseDblClickHandler),I.RenderHelper.removeEventListener(B,"contextmenu",this.onContextMenuHandler),I.RenderHelper.removeEventListener(B,"click",this.onMouseClickHandler),I.RenderHelper.removeEventListener(window,"resize",this.onWindowResizelHandler),I.RenderHelper.removeEventListener(window,"orientationchange",this.onOrientationChangeHandler)},U.prototype.setPointerPosition=function(B){this.pointers[B.pointerId]={clientX:B.clientX,clientY:B.clientY}},U.prototype.clearPointerPosition=function(B){delete this.pointers[B.pointerId]},U.prototype.onPointerDown=function(B){this.setPointerPosition(B),this.getPointerCount()>2&&(this.pointers={}),this.onMouseDown(B)},U.prototype.onPointerUp=function(B){this.clearPointerPosition(B),this.onMouseUp(B)},U.prototype.onPointerMove=function(B){(c.Browser.TouchUI&&!N.EventUtils.isMousePointer(B)||N.EventUtils.isLeftButtonPressed(B))&&this.setPointerPosition(B),this.onMouseMove(B)},U.prototype.onPointerCancel=function(B){this.clearPointerPosition(B)},U.prototype.onPointerLeave=function(B){N.EventUtils.isMousePointer(B)&&this.onMouseLeave(B),this.clearPointerPosition(B)},U.prototype.onMouseDown=function(B){var K=this;this.lockMouseMove(),this.input.lockFocus(),this.autoScroll.onMouseDown(B),this.lastDownMouseEvent=this.createDiagramMouseEvent(B),s.raiseEvent(B,this.lastDownMouseEvent,function(re){return K.events.onMouseDown(re)}),this.events.canFinishTextEditing()&&this.input.captureFocus(),N.EventUtils.isTouchEvent(B)&&this.processTouchDown(B);var J=S.EvtUtils.getEventSource(B),ie=J&&J.tagName;if(c.Browser.TouchUI||"img"===ie.toLowerCase()||"image"===ie.toLowerCase())return S.EvtUtils.preventEventAndBubble(B),!1},U.prototype.onMouseMove=function(B){var K=this;this.moveLocked||(this.autoScroll.onMouseMove(B,function(){return K.onMouseMoveCore(B)}),this.onMouseMoveCore(B),c.Browser.IE&&this.lockMouseMove(),N.EventUtils.isTouchEvent(B)&&this.processTouchMove(B))},U.prototype.onMouseMoveCore=function(B){var K=this;s.raiseEvent(B,this.createDiagramMouseEvent(B),function(J){return K.events.onMouseMove(J)})},U.prototype.onMouseUp=function(B){var K=this;this.lockMouseMove();var J=this.createDiagramMouseEvent(B);s.raiseEvent(B,J,function(ie){return K.events.onMouseUp(ie)}),this.autoScroll.onMouseUp(B),J.source.type!==f.MouseEventElementType.Undefined&&this.input.captureFocus(!0),N.EventUtils.isTouchEvent(B)&&this.processTouchUp(B)},U.prototype.onMouseEnter=function(B){var K=this;this.autoScroll.onMouseEnter(B),s.raiseEvent(B,this.createDiagramMouseEvent(B),function(J){return K.events.onMouseEnter(J)})},U.prototype.onMouseLeave=function(B){var K=this;s.raiseEvent(B,this.createDiagramMouseEvent(B),function(J){return K.events.onMouseLeave(J)})},U.prototype.onMouseDblClick=function(B){var K=this;s.raiseEvent(B,this.createDiagramMouseEvent(B),function(J){return K.events.onDblClick(J)})},U.prototype.onMouseClick=function(B){var K=this;N.EventUtils.isTouchEvent(B)?N.EventUtils.isMousePointer(B)||this.input.captureFocus():s.raiseEvent(B,this.createActualMouseClickEvent(B),function(J){return K.events.onClick(J)})},U.prototype.createActualMouseClickEvent=function(B){return this.lastDownMouseEvent?new f.DiagramMouseEvent(this.lastDownMouseEvent.modifiers,this.lastDownMouseEvent.button,this.lastDownMouseEvent.offsetPoint.clone(),this.lastDownMouseEvent.modelPoint.clone(),this.lastDownMouseEvent.source,this.createDiagramMouseEventTouches(B)):this.createDiagramMouseEvent(B)},U.prototype.onContextMenu=function(B){var K=this;if(this.contextMenuEnabled)return 1!==B.buttons&&s.raiseEvent(B,this.createDiagramContextMenuEvent(B),function(J){return K.events.onContextMenu(J)}),this.input.captureFocus(),S.EvtUtils.preventEventAndBubble(B)},U.prototype.processTouchDown=function(B){var K=this;this.touchDownPoint=this.getTouchPointFromEvent(B),this.resetLongTouch(),this.longTouchTimer=setTimeout(function(){s.raiseEvent(B,K.createDiagramMouseEvent(B),function(J){return K.events.onLongTouch(J)}),K.resetLongTouch(),K.resetDblClick()},P.LONG_TOUCH_TIMEOUT)},U.prototype.processTouchMove=function(B){var K=this.getTouchPointFromEvent(B);this.touchDownPoint&&K&&(Math.abs(this.touchDownPoint.x-K.x)>U.touchPositionLimit||Math.abs(this.touchDownPoint.y-K.y)>U.touchPositionLimit)&&(this.resetLongTouch(),this.resetDblClick())},U.prototype.getPointers=function(){var B=this;return Object.keys(this.pointers).map(function(K){return B.pointers[K]})},U.prototype.getPointerCount=function(){return Object.keys(this.pointers).length},U.prototype.getTouchPointFromEvent=function(B){var K,J=B.touches;if(J&&J.length>0)K=new y.Point(J[0].clientX,J[0].clientY);else{var ie=this.getPointers();ie.length&&(K=new y.Point(ie[0].clientX,ie[0].clientY))}return K},U.prototype.processTouchUp=function(B){var K=this;if(void 0!==this.longTouchTimer){s.raiseEvent(B,this.createDiagramMouseEvent(B),function(ie){return K.events.onClick(ie)});var J=S.EvtUtils.getEventSource(B);void 0!==this.dblTouchTimer&&this.lastClickElement===J?(s.raiseEvent(B,this.createDiagramMouseEvent(B),function(ie){return K.events.onDblClick(ie)}),this.resetDblClick()):(this.resetDblClick(),this.dblTouchTimer=setTimeout(function(){return K.dblTouchTimer=void 0},P.DBL_CLICK_TIMEOUT)),this.lastClickElement=J}this.resetLongTouch(),this.touchDownPoint=void 0},U.prototype.resetLongTouch=function(){void 0!==this.longTouchTimer&&clearTimeout(this.longTouchTimer),this.longTouchTimer=void 0},U.prototype.resetDblClick=function(){void 0!==this.dblTouchTimer&&clearTimeout(this.dblTouchTimer),this.dblTouchTimer=void 0},U.prototype.onOrientationChange=function(){var B=this;setTimeout(function(){return B.onWindowResize()},100)},U.prototype.onWindowResize=function(){var B={horizontal:!1,vertical:!1};if(this.view.autoZoom!==h.AutoZoomMode.Disabled)B.horizontal=!0,B.vertical=!0;else{var K=this.view.checkFitToCanvas(),J=this.view.checkFitToCanvas(this.scroll.getSize());B={horizontal:K.horizontal!==J.horizontal||J.horizontal,vertical:K.vertical!==J.vertical||J.vertical}}this.view.adjust(B)},U.prototype.onMouseWheel=function(B){var K=this;s.raiseEvent(B,this.createDiagramWheelEvent(B),function(J){return K.events.onMouseWheel(J)})},U.prototype.notifyModelSizeChanged=function(B,K){this.view.notifyModelSizeChanged(B,K)},U.prototype.notifyModelRectangleChanged=function(B){this.view.notifyModelRectangleChanged(B)},U.prototype.notifyReadOnlyChanged=function(B){T.DomUtils.toggleClassName(this.mainElement,"dxdi-read-only",B)},U.prototype.notifyDragStart=function(B){},U.prototype.notifyDragEnd=function(B){},U.prototype.notifyDragScrollStart=function(){this.autoScroll.onDragScrollStart()},U.prototype.notifyDragScrollEnd=function(){this.autoScroll.onDragScrollEnd()},U.prototype.notifyToolboxDragStart=function(B){this.onMouseEnter(B)},U.prototype.notifyToolboxDragEnd=function(B){B&&N.EventUtils.isPointerEvents()&&this.onMouseUp(B)},U.prototype.notifyToolboxDraggingMouseMove=function(B){this.onMouseMove(B)},U.prototype.createDiagramMouseEvent=function(B){var Q,K=d.KeyUtils.getKeyModifiers(B),J=(Q=B,(c.Browser.MSTouchUI?2!==Q.button:N.EventUtils.isLeftButtonPressed(Q))?f.MouseButton.Left:f.MouseButton.Right),ie=this.getOffsetPointByEvent(B),re=this.getModelPoint(ie),q=N.EventUtils.isTouchEvent(B),Y=this.getEventSource(B,q),Z=this.createDiagramMouseEventTouches(B);return new f.DiagramMouseEvent(K,J,ie,re,Y,Z,q)},U.prototype.createDiagramMouseEventTouches=function(B){var K=[];if(B.touches)for(var J=0;J<B.touches.length;J++){var ie=B.touches[J].clientX,re=B.touches[J].clientY,q=this.getOffsetPointByEventPoint(ie,re),Y=this.getModelPoint(q);K.push(new f.DiagramMouseEventTouch(q,Y))}else{var Z=this.getPointers();for(J=0;J<Z.length;J++)q=this.getOffsetPointByEventPoint(ie=Z[J].clientX,re=Z[J].clientY),Y=this.getModelPoint(q),K.push(new f.DiagramMouseEventTouch(q,Y))}return K},U.prototype.createDiagramContextMenuEvent=function(B){var K=d.KeyUtils.getKeyModifiers(B),J=new y.Point(B.pageX,B.pageY),ie=this.getOffsetPointByEvent(B),re=this.getModelPoint(ie);return new f.DiagramContextMenuEvent(K,J,re)},U.prototype.createDiagramWheelEvent=function(B){var K=d.KeyUtils.getKeyModifiers(B),J=this.getOffsetPointByEvent(B),ie=this.view.getModelPoint(J),re=this.getEventSource(B);return new f.DiagramWheelEvent(K,B.deltaX||B.originalEvent&&B.originalEvent.deltaX,B.deltaY||B.originalEvent&&B.originalEvent.deltaY,J,ie,re)},U.prototype.getEventSource=function(B,K){var J=K?S.EvtUtils.getEventSourceByPosition(B):S.EvtUtils.getEventSource(B);if(this.isDiagramControl(J))for(;J&&!this.isDocumentContainer(J);){var ie=s.RenderUtils.getElementEventData(J);if(void 0!==ie)return ie;if(this.input.isTextInputElement(J))return new f.MouseEventSource(f.MouseEventElementType.Document);J=J.parentNode}var re=new f.MouseEventSource(f.MouseEventElementType.Undefined);return J&&this.isDocumentContainer(J)&&(re.type=f.MouseEventElementType.Background),re},U.prototype.isDiagramControl=function(B){for(;B;){if(this.isDocumentContainer(B))return!0;B=B.parentNode}return!1},U.prototype.isDocumentContainer=function(B){return B===this.mainElement},U.prototype.lockMouseMove=function(){var B=this;this.moveLocked=!0,this.lockMouseMoveTimer=setTimeout(function(){B.moveLocked=!1,B.lockMouseMoveTimer=-1},10)},U.prototype.killLockMouseMoveTimer=function(){-1!==this.lockMouseMoveTimer&&(clearTimeout(this.lockMouseMoveTimer),this.lockMouseMoveTimer=-1)},U.prototype.clearLastMouseDownEvent=function(){this.lastDownMouseEvent=void 0},U.prototype.getModelPoint=function(B){return this.view.getModelPoint(B)},U.prototype.getOffsetPointByEvent=function(B){var K=S.EvtUtils.getEventX(B),J=S.EvtUtils.getEventY(B);return this.getOffsetPointByEventPoint(K,J)},U.prototype.getOffsetPointByEventPoint=function(B,K){var J=this.scroll.getScrollContainer(),ie=T.DomUtils.getAbsolutePositionX(J),re=T.DomUtils.getAbsolutePositionY(J);return new y.Point(B-ie,K-re)},U.prototype.getModelPointByEventPoint=function(B,K){var J=this.getOffsetPointByEventPoint(B,K);return this.view.getModelPoint(J)},U.prototype.getEventPointByModelPoint=function(B){var K=this.view.getAbsolutePoint(B),J=this.scroll.getScrollContainer();return new y.Point(T.DomUtils.getAbsolutePositionX(J)+K.x,T.DomUtils.getAbsolutePositionY(J)+K.y)},U.touchPositionLimit=4,U}();P.RenderManager=k},7376:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.NativeScrollView=void 0;var f=b(8675),S=b(6353),T=b(8900),y=b(6907),d=b(1114),c=function(){function s(a){this.onScroll=new f.EventDispatcher,this.scrollBarWidth=y.DomUtils.getVerticalScrollBarWidth(),this.mainElement=a,this.attachEvents()}return s.prototype.attachEvents=function(){var a=this;this.onScrollHandler=function(){return a.onScroll.raise1(function(u){return u.notifyScrollChanged(function(){return a.getScroll()})})},d.RenderHelper.addEventListener(this.mainElement,"scroll",this.onScrollHandler)},s.prototype.detachEvents=function(){d.RenderHelper.removeEventListener(this.mainElement,"scroll",this.onScrollHandler)},s.prototype.getScrollContainer=function(){return this.mainElement},s.prototype.setScroll=function(a,u){var h=this;this.mainElement.style.overflow="scroll",this.mainElement.scrollLeft=a,this.mainElement.scrollTop=u,this.mainElement.style.overflow="",this.onScroll.raise1(function(g){return g.notifyScrollChanged(function(){return h.getScroll()})})},s.prototype.offsetScroll=function(a,u){var h=this;a&&(this.mainElement.scrollLeft+=a),u&&(this.mainElement.scrollTop+=u),this.onScroll.raise1(function(g){return g.notifyScrollChanged(function(){return h.getScroll()})})},s.prototype.getScroll=function(){return new T.Point(this.mainElement.scrollLeft,this.mainElement.scrollTop)},s.prototype.getSize=function(){var a=this.mainElement.getBoundingClientRect();return new S.Size(Math.floor(a.width),Math.floor(a.height))},s.prototype.getScrollBarWidth=function(){return this.scrollBarWidth},s}();P.NativeScrollView=c},6411:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ShapeImageIndicator=void 0;var f=b(418),S=b(7724),T=b(5329),y=b(9279),d=b(4716),c=b(9291),s=function(){function a(u,h,g,_,x){this.x=u,this.y=h,this.size=g,this.borderThickness=_,this.className=x,this.animationStarted=!1}return a.createLoadingIndicatorPrimitives=function(u,h,g,_,x){return new a(u,h,g,_,x).createLoadingIndicatorPrimitive()},a.createUserIconPrimitives=function(u,h,g,_,x){return new a(u,h,g,_,x).createUserIconPrimitive()},a.createWarningIconPrimitives=function(u,h,g,_){return new a(u,h,g,void 0,_).createWarningIconPrimitive()},a.prototype.rotate=function(u,h,g,_){if(this.animationStarted){var x="rotate("+Math.round(_)%1080/3+" "+h+" "+g+")";u.setAttribute("transform",x),this.animationRequestId=requestAnimationFrame(function(w){this.rotate(u,h,g,w)}.bind(this))}},a.prototype.onApplyLoadingIndicatorElementProperties=function(u){var h=[c.UnitConverter.twipsToPixelsF(this.x+this.size/2),c.UnitConverter.twipsToPixelsF(this.y+this.size/2)],g=h[0],_=h[1];y.Browser.IE?(this.animationRequestId=requestAnimationFrame(function(x){this.rotate(u,g,_,x)}.bind(this)),this.animationStarted=!0):u.style.setProperty("transform-origin",g+"px "+_+"px")},a.prototype.center=function(){return[c.UnitConverter.twipsToPixelsF(this.x+this.size/2),c.UnitConverter.twipsToPixelsF(this.y+this.size/2)]},a.prototype.createLoadingIndicatorPrimitive=function(){var u=this.center(),h=u[0],g=u[1],_=c.UnitConverter.twipsToPixelsF(this.size/2-this.borderThickness/2);return new T.GroupPrimitive([new f.EllipsePrimitive(h+"",g+"",_+"",_+""),new S.PathPrimitive([new S.PathPrimitiveMoveToCommand(h+_+"",g+""),new S.PathPrimitiveArcToCommand(_+"",_+"",0,!1,!1,h+"",g-_+"")])],this.className,void 0,void 0,this.onApplyLoadingIndicatorElementProperties.bind(this),this.onBeforeDispose.bind(this))},a.prototype.createUserIconPrimitive=function(){var u=this.center(),h=u[0],g=u[1],_=c.UnitConverter.twipsToPixelsF(this.size/2-this.borderThickness/2),x=c.UnitConverter.twipsToPixelsF(this.size);return new T.GroupPrimitive([new f.EllipsePrimitive(h+"",g+"",_+"",_+"",void 0,"dxdi-background"),new f.EllipsePrimitive(h+"",g-x/8+"",x/8+"",x/8+""),new S.PathPrimitive([new S.PathPrimitiveMoveToCommand(h+"",g+x/16+""),new S.PathPrimitiveCubicCurveToCommand(h+.1375*x+"",g+x/16+"",h+x/4+"",g+.11875*x+"",h+x/4+"",g+.1875*x+""),new S.PathPrimitiveLineToCommand(h+x/4+"",g+x/4+""),new S.PathPrimitiveLineToCommand(h-x/4+"",g+x/4+""),new S.PathPrimitiveLineToCommand(h-x/4+"",g+.1875*x+""),new S.PathPrimitiveCubicCurveToCommand(h-x/4+"",g+.11875*x+"",h-.1375*x+"",g+x/16+"",h+"",g+x/16+""),new S.PathPrimitiveClosePathCommand])],this.className)},a.prototype.createWarningIconPrimitive=function(){var u=this.center(),h=u[0],g=u[1],_=c.UnitConverter.twipsToPixelsF(this.size/2)-1,x=c.UnitConverter.twipsToPixelsF(this.size/8);return new T.GroupPrimitive([new f.EllipsePrimitive(h+"",g+"",_+"",_+""),new d.RectanglePrimitive(h-x/2+.5+"",g+_-c.UnitConverter.twipsToPixelsF(this.size/4)+"",x+"",x+""),new d.RectanglePrimitive(h-x/2+.5+"",g-_+c.UnitConverter.twipsToPixelsF(this.size/4)-x+"",x+"",_+"")],this.className)},a.prototype.onBeforeDispose=function(){this.animationRequestId&&cancelAnimationFrame(this.animationRequestId),this.animationStarted=!1},a}();P.ShapeImageIndicator=s},4724:function(o,P,b){var f,S=this&&this.__extends||(f=function(x,w){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,C){D.__proto__=C}||function(D,C){for(var I in C)C.hasOwnProperty(I)&&(D[I]=C[I])})(x,w)},function(x,w){function D(){this.constructor=x}f(x,w),x.prototype=null===w?Object.create(w):(D.prototype=w.prototype,new D)});Object.defineProperty(P,"__esModule",{value:!0}),P.IconToolbox=void 0;var T=b(4602),y=b(1114),d=b(5503),c=b(9291),s=b(8900),a=b(1669),u=b(1552),h=b(6688),g=b(4716),_=function(x){function w(D,C,I,L,N,G,k,U,B){var K=x.call(this,D,C,I,L,N,G)||this;return K.options=k,K.measurer=U,K.instanceId=B,K}return S(w,x),w.prototype.createElements=function(D,C){var I=document.createElementNS(y.svgNS,"svg");I.className.baseVal="dxdi-canvas",D.appendChild(I),this.drawShapeIcons(I,C,this.options.toolboxWidth||I.getBoundingClientRect().width)},w.prototype.drawShapeIcons=function(D,C,I){var L=this,N=u.DEFAULT_STROKE_WIDTH,G=I-2*N,k=this.options.shapeIconSize;!k&&this.options.shapeIconSpacing&&this.options.shapeIconCountInRow&&(k=Math.floor((G-(this.options.shapeIconCountInRow-1)*this.options.shapeIconSpacing)/this.options.shapeIconCountInRow)),k||(k=32);var U=k=Math.max(k,this.options.shapeIconSpacing/2),B=this.options.shapeIconCountInRow;if(!B)for(B=1;U<G;)(U+=this.options.shapeIconSpacing+k)<G&&B++;var K=B>1?(G-k*B)/(B-1):0,J=N,ie=N,re=c.UnitConverter.pixelsToTwips(k);C.forEach(function(q,Y){Y>0&&Y%B==0&&(J=N,ie+=k+K);var Z=L.shapeDescriptionManager.get(q),Q=L.createShape(Z,J,ie,k<26);L.updateShapeIconBounds(Q,k);var te=L.drawShape(D,Q);L.drawSelector(te,c.UnitConverter.pixelsToTwips(J),c.UnitConverter.pixelsToTwips(ie),re),J+=k+K}),D.style.height=ie+k+N+"px",D.style.width=I+"px"},w.prototype.drawShape=function(D,C){var I=this,L=C.description.createPrimitives(C,this.instanceId,!0),N=document.createElementNS(y.svgNS,"g");if(N.setAttribute("data-tb-type",C.description.key.toString()),N.setAttribute("class","toolbox-item"),N.setAttribute("title",C.description.getTitle()),this.options.shapeIconAttributes)for(var G in this.options.shapeIconAttributes)Object.prototype.hasOwnProperty.call(this.options.shapeIconAttributes,G)&&N.setAttribute(G,this.options.shapeIconAttributes[G]);return D.appendChild(N),L.forEach(function(k){var U=k.createElement(function(B){return N.appendChild(B)});k.applyElementProperties(U,I.measurer)}),N},w.prototype.drawSelector=function(D,C,I,L){var N=this,G=new g.RectanglePrimitive(C,I,L,L,void 0,"selector");G.createElement(function(k){G.applyElementProperties(k,N.measurer),D.appendChild(k)})},w.prototype.createShape=function(D,C,I,L){var N=c.UnitConverter.pixelsToTwips(C),G=c.UnitConverter.pixelsToTwips(I),k=new d.Shape(D,new s.Point(N,G),!0);return this.needResetShapeText(D)?k.text="":L&&(k.text="T"),k},w.prototype.needResetShapeText=function(D){return!(D instanceof a.TextShapeDescription||D instanceof h.CustomShapeDescription&&D.baseDescription instanceof a.TextShapeDescription)},w.prototype.updateShapeIconBounds=function(D,C){var I=c.UnitConverter.pixelsToTwips(C);if(D.size.height=D.size.width*D.getToolboxHeightToWidthRatio(),D.size.width>D.size.height){var L=D.size.height/D.size.width;D.size.width=I,D.size.height=I*L,D.position.y=D.position.y+(I-D.size.height)/2,D.parameters.forEach(function(N){N.value=N.value*I/D.description.defaultSize.width})}else D.size.width<D.size.height?(L=D.size.width/D.size.height,D.size.height=I,D.size.width=I*L,D.position.x=D.position.x+(I-D.size.width)/2,D.parameters.forEach(function(N){N.value=N.value*I/D.description.defaultSize.height})):(D.size.width=I,D.size.height=I,D.parameters.forEach(function(N){N.value=N.value*I/D.description.defaultSize.width}))},w.prototype.createDraggingElement=function(D){var C=document.createElement("DIV");C.setAttribute("class","dxdi-toolbox-drag-item"),document.body.appendChild(C);var I=document.createElementNS(y.svgNS,"svg");I.className.baseVal="dxdi-canvas",C.appendChild(I);var L=this.shapeDescriptionManager.get(D.evt.data),N=this.createShape(L,u.DEFAULT_STROKE_WIDTH,u.DEFAULT_STROKE_WIDTH);return this.drawShape(I,N),C.style.width=c.UnitConverter.twipsToPixels(N.size.width)+2*u.DEFAULT_STROKE_WIDTH+"px",C.style.height=c.UnitConverter.twipsToPixels(N.size.height)+2*u.DEFAULT_STROKE_WIDTH+"px",C},w}(T.Toolbox);P.IconToolbox=_},5947:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.TextToolbox=void 0;var T=function(y){function d(c,s,a,u,h,g){return y.call(this,c,s,a,u,h,g)||this}return S(d,y),d.prototype.createElements=function(c,s){var a=this;s.forEach(function(u){var h=a.shapeDescriptionManager.get(u),g=document.createElement("div");g.setAttribute("class","toolbox-text-item"),g.setAttribute("data-tb-type",u),g.textContent=h.getDefaultText()||h.getTitle(),c.appendChild(g)})},d.prototype.createDraggingElement=function(c){var s=document.createElement("DIV");s.setAttribute("class","dxdi-toolbox-drag-text-item");var a=this.shapeDescriptionManager.get(c.evt.data);return s.textContent=a.getDefaultText()||a.getTitle(),document.body.appendChild(s),s},d}(b(4602).Toolbox);P.TextToolbox=T},4602:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramDraggingEvent=P.ToolboxDraggingObject=P.Toolbox=void 0;var f,D,S=b(8675),T=b(8900),y=b(3714),d=b(4914),c=b(6907),s=b(9279),a=b(1114),u=b(8693),h="dxdi-toolbox",g="dxdi-tb-start-drag-flag",_=function(){function D(C,I,L,N,G,k){this.readOnly=I,this.allowDragging=L,this.shapeDescriptionManager=N,this.shapeTypes=G,this.getAllowedShapeTypes=k,this.dragPrepareTimeout=-1,this.dragState=f.None,this.emulateDragEvents=s.Browser.WebKitTouchUI,this.onDragOperation=new S.EventDispatcher,this.onClickOperation=new S.EventDispatcher,C&&(this.mainElement=this.createMainElement(C),this.attachHandlers(this.mainElement))}return D.prototype.clean=function(C){this.detachHandlers(this.mainElement),C&&C(this.mainElement)},D.prototype.createMainElement=function(C){var I=document.createElement("div");return I.setAttribute("class",h),I.draggable=!0,this.emulateDragEvents&&(I.tabIndex=0),C.appendChild(I),I},D.prototype.attachHandlers=function(C){this.onElementMouseDownHandler=this.onElementMouseDown.bind(this),this.onElementMouseUpHandler=this.onElementMouseUp.bind(this),this.onMouseDownHandler=this.onMouseDown.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onDragStartHandler=this.onDragStart.bind(this),this.onTouchMoveHandler=this.onTouchMove.bind(this),this.emulateDragEvents||a.RenderHelper.addEventListener(C,"dragstart",this.onDragStartHandler),S.EventUtils.isPointerEvents()?(this.mouseDownEventName="pointerdown",this.mouseMoveEventName="pointermove",this.mouseUpEventName="pointerup"):(this.mouseDownEventName=s.Browser.TouchUI?"touchstart":"mousedown",this.mouseMoveEventName=s.Browser.TouchUI?"touchmove":"mousemove",this.mouseUpEventName=s.Browser.TouchUI?"touchend":"mouseup"),a.RenderHelper.addEventListener(C,"touchmove",this.onTouchMoveHandler),a.RenderHelper.addEventListener(C,this.mouseDownEventName,this.onElementMouseDownHandler),a.RenderHelper.addEventListener(C,this.mouseUpEventName,this.onElementMouseUpHandler),a.RenderHelper.addEventListener(C,this.mouseDownEventName,this.onMouseDownHandler),a.RenderHelper.addEventListener(document,this.mouseMoveEventName,this.onMouseMoveHandler),a.RenderHelper.addEventListener(document,this.mouseUpEventName,this.onMouseUpHandler)},D.prototype.detachHandlers=function(C){this.emulateDragEvents||a.RenderHelper.removeEventListener(C,"dragstart",this.onDragStartHandler),a.RenderHelper.removeEventListener(C,"touchmove",this.onTouchMoveHandler),a.RenderHelper.removeEventListener(C,this.mouseDownEventName,this.onElementMouseDownHandler),a.RenderHelper.removeEventListener(C,this.mouseUpEventName,this.onElementMouseUpHandler),a.RenderHelper.removeEventListener(C,this.mouseDownEventName,this.onMouseDownHandler),a.RenderHelper.removeEventListener(document,this.mouseMoveEventName,this.onMouseMoveHandler),a.RenderHelper.removeEventListener(document,this.mouseUpEventName,this.onMouseUpHandler)},D.prototype.render=function(C){this.mainElement.childNodes&&(this.mainElement.innerHTML="");var I=this.shapeTypes;return I=this.getAllowedShapeTypes?this.getAllowedShapeTypes(I):I,(I=C?I.filter(C):I).length&&this.createElements(this.mainElement,I),!!I.length},D.prototype.createDraggingObject=function(C){var I=new w;return I.data=C,I.onFinishDragging=this.resetDragState.bind(this),I.onCaptured=this.capture.bind(this),new x(I)},D.prototype.getDragShapeType=function(C){for(;C&&!c.DomUtils.hasClassName(C,h);){if(C.getAttribute&&C.getAttribute("data-tb-type"))return C.getAttribute("data-tb-type");C=C.parentNode}},D.prototype.getTouchPointFromEvent=function(C){var I,L=C.touches;return L&&L.length>0?I=new T.Point(L[0].clientX,L[0].clientY):C.clientX&&C.clientY&&(I=new T.Point(C.clientX,C.clientY)),I},D.prototype.onElementMouseDown=function(C){this.mouseDownShapeType=this.getDragShapeType(y.EvtUtils.getEventSource(C)),this.touchDownPoint=this.getTouchPointFromEvent(C)},D.prototype.onElementMouseUp=function(C){var I=this.getDragShapeType(y.EvtUtils.getEventSource(C));I&&I===this.mouseDownShapeType&&this.onClickOperation.raise("notifyToolboxClick",I),this.mouseDownShapeType=void 0,this.touchDownPoint=void 0},D.prototype.onMouseDown=function(C){this.setDragState(f.Prepare,C),s.Browser.TouchUI&&S.EventUtils.isMousePointer(C)&&this.setDragState(f.Start,C)},D.prototype.onDragStart=function(C){this.setDragState(f.Start,C),C.preventDefault()},D.prototype.onTouchMove=function(C){this.draggingObject&&C.preventDefault()},D.prototype.isLeftButtonPressed=function(C){return y.EvtUtils.isLeftButtonPressed(C)||"pointermove"===C.type&&s.Browser.TouchUI&&s.Browser.MacOSMobilePlatform&&S.EventUtils.isMousePointer(C)},D.prototype.onMouseMove=function(C){if(s.Browser.TouchUI&&s.Browser.MacOSMobilePlatform){var I=this.getTouchPointFromEvent(C);if(this.touchDownPoint&&I&&this.touchDownPoint.x===I.x&&this.touchDownPoint.y===I.y)return}this.setDragState(this.isLeftButtonPressed(C)?f.Dragging:f.None,C),S.EventUtils.isPointerEvents()&&this.raiseDraggingMouseMove(C)},D.prototype.onMouseUp=function(C){this.setDragState(f.None,C)},D.prototype.updateDraggingElementPosition=function(C,I){var L=this.draggingObject.element,G=I-L.offsetHeight/2;d.SetAbsoluteX(L,C-L.offsetWidth/2),d.SetAbsoluteY(L,G)},D.prototype.setDragState=function(C,I){if(!this.readOnly&&this.allowDragging&&!(C===f.None&&C===this.dragState||(this.dragPrepareTimeout>-1&&(clearTimeout(this.dragPrepareTimeout),this.dragPrepareTimeout=-1,this.dragPrepareEvent=void 0),C-this.dragState>1||C!==f.None&&C<this.dragState)))switch(this.dragState=C,C){case f.Prepare:this.prepareDragging(I)||this.setDragState(f.None,I),!this.emulateDragEvents&&S.EventUtils.isMousePointer(I)||(this.dragPrepareTimeout=setTimeout(this.onDragPrepareTimeout.bind(this),800),this.dragPrepareEvent=I);break;case f.Start:c.DomUtils.addClassName(document.body,"dxdi-dragging"),this.startDragging(I);break;case f.Dragging:this.doDragging(I);break;case f.None:this.finishDragging(I)}},D.prototype.resetDragState=function(){this.setDragState(f.None,void 0)},D.prototype.onDragPrepareTimeout=function(){this.dragPrepareTimeout=-1,this.dragState===f.Prepare&&this.setDragState(f.Start,this.dragPrepareEvent),this.dragPrepareEvent=void 0},D.prototype.prepareDragging=function(C){return this.dragStartPoint=new T.Point(y.EvtUtils.getEventX(C),y.EvtUtils.getEventY(C)),this.dragStartShapeType=this.getDragShapeType(y.EvtUtils.getEventSource(C)),S.EventUtils.isMousePointer(C)&&c.DomUtils.addClassName(this.mainElement,g),!this.emulateDragEvents&&S.EventUtils.isMousePointer(C)||S.HtmlFocusUtils.focusWithPreventScroll(this.mainElement),!!this.dragStartShapeType},D.prototype.startDragging=function(C){this.draggingObject=this.createDraggingObject(this.dragStartShapeType),this.dragStartShapeType?(this.raiseDragStart(C),this.draggingObject.element=this.createDraggingElement(this.draggingObject),void 0!==this.draggingObject.captured&&this.capture(this.draggingObject.captured,!0),this.updateDraggingElementPosition(this.dragStartPoint.x,this.dragStartPoint.y)):c.DomUtils.addClassName(document.body,u.NOT_VALID_CSSCLASS)},D.prototype.doDragging=function(C){this.draggingObject.element&&this.updateDraggingElementPosition(y.EvtUtils.getEventX(C),y.EvtUtils.getEventY(C))},D.prototype.finishDragging=function(C){if(this.draggingObject){this.raiseDragEnd(C);var I=this.draggingObject.element;I&&I.parentNode.removeChild(I),delete this.draggingObject}this.dragStartPoint=void 0,this.dragStartShapeType=void 0,c.DomUtils.removeClassName(this.mainElement,g),c.DomUtils.removeClassName(document.body,u.NOT_VALID_CSSCLASS),setTimeout(function(){return c.DomUtils.removeClassName(document.body,"dxdi-dragging")},500)},D.prototype.capture=function(C,I){this.draggingObject&&(this.draggingObject.captured!==C||I)&&(this.draggingObject.captured=C,this.draggingObject.element&&c.DomUtils.toggleClassName(this.draggingObject.element,"dxdi-tb-drag-captured",C))},D.prototype.raiseDragStart=function(C){this.onDragOperation.raise("notifyToolboxDragStart",C)},D.prototype.raiseDragEnd=function(C){this.onDragOperation.raise("notifyToolboxDragEnd",C)},D.prototype.raiseDraggingMouseMove=function(C){this.onDragOperation.raise("notifyToolboxDraggingMouseMove",C)},D.prototype.notifyReadOnlyChanged=function(C){this.readOnly=C},D}();P.Toolbox=_,(D=f||(f={}))[D.None=-1]="None",D[D.Prepare=0]="Prepare",D[D.Start=1]="Start",D[D.Dragging=2]="Dragging";var x=function(D){this.evt=D};P.ToolboxDraggingObject=x;var w=function(){};P.DiagramDraggingEvent=w},3298:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ToolboxManager=void 0;var f=b(5947),S=b(4724),T=b(1733),y=b(8679),d=function(){function c(s){this.shapeDescriptionManager=s,this.toolboxes=[],this.measurers={}}return c.prototype.create=function(s,a,u,h,g,_,x,w){var D=Array.isArray(g)?g:this.shapeDescriptionManager.getTypesByCategory(g),C=h?new f.TextToolbox(s,a,u,this.shapeDescriptionManager,D,_):new S.IconToolbox(s,a,u,this.shapeDescriptionManager,D,_,w,this.getOrCreateMeasurer(s),x);return C.render(),this.toolboxes.push(C),C},c.prototype.clean=function(s,a){var u=this;if(a)a.clean(s),this.toolboxes.splice(this.toolboxes.indexOf(a),1),Object.keys(this.measurers).forEach(function(g){u.measurers[g]===a.measurer&&delete u.measurers[g]});else{for(var h=0;h<this.toolboxes.length;h++)this.toolboxes[h].clean(s);this.toolboxes=[],this.measurers={}}},c.prototype.refresh=function(s){this.toolboxes.forEach(function(a,u){(!s||Array.isArray(s)&&s.indexOf(u)>-1||u===s)&&a.render()})},c.prototype.applyFilter=function(s,a){var u=this;return this.toolboxes.reduce(function(h,g,_){return(!a||Array.isArray(a)&&a.indexOf(_)>-1||_===a)&&g.render(function(x){return u.searchFilter(x,s,_)})&&h.push(_),h},[])},c.prototype.searchFilter=function(s,a,u,h){if(!a||h&&-1===h.indexOf(u))return!0;a=a.toLowerCase();var g=this.shapeDescriptionManager.get(s);return g.getTitle().toLowerCase().indexOf(a)>-1||g.getDefaultText().toLowerCase().indexOf(a)>-1},c.prototype.getOrCreateMeasurer=function(s){var a=s.getAttribute("data-dxdiMeasurerID");return a&&this.measurers[a]||(a=y.MathUtils.generateGuid(),this.measurers[a]=new T.TextMeasurer(s),s.setAttribute("data-dxdiMeasurerID",a)),this.measurers[a]},c}();P.ToolboxManager=d},3500:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.raiseEvent=P.RenderUtils=void 0;var f=b(6031),S=b(8679),T=function(){function y(){}return y.updateSvgElementSize=function(d,c,s,a){d.style.width=c+"px",d.style.height=s+"px",d.setAttribute("viewBox","0 0 "+c+" "+s),a&&(d.setAttribute("width",c.toString()),d.setAttribute("height",s.toString()))},y.removeElement=function(d){d&&d.parentNode&&d.parentNode.removeChild(d)},y.removeContent=function(d){for(;d&&d.firstChild;)d.removeChild(d.firstChild)},y.setElementEventData=function(d,c,s,a){c!==f.MouseEventElementType.Undefined&&(d.setAttribute("data-type",c.toString()),void 0!==s&&d.setAttribute("data-key",s.toString()),void 0!==a&&d.setAttribute("data-value",a.toString()))},y.getElementEventData=function(d){if(d.getAttribute&&d.getAttribute("data-type"))return new f.MouseEventSource(parseInt(d.getAttribute("data-type")),d.getAttribute("data-key"),d.getAttribute("data-value"));var c=d.getAttribute&&d.getAttribute("class");return"dxdi-page"===c||"dxdi-main"===c?new f.MouseEventSource(f.MouseEventElementType.Document):void 0},y.getHtmlElementStylePropertyName=function(d){switch(d){case"fill":return"color";case"text-anchor":return"text-align"}return d},y.getTextAnchorValue=function(d,c){if(void 0===c&&(c=!1),c){if("start"===d)return"end";if("end"===d)return"start"}return d},y.getStrokeDasharrayValue=function(d,c){if(c){var s=d&&d.toString();return(s?s.split(/[\s,]+/):[]).map(function(a){return parseInt(a)/2*c}).join(",")}return d},y.applyStyleToElement=function(d,c,s){var a=this;void 0===s&&(s=!1);var u=d.getDefaultInstance();d.forEach(function(h){var g=d[h],_=c instanceof HTMLElement?a.getHtmlElementStylePropertyName(h):h;if(void 0!==g&&""!==g&&g!==u[h]){switch(h){case"text-anchor":g=a.getTextAnchorValue(g,s);break;case"stroke-dasharray":g=a.getStrokeDasharrayValue(g,parseInt(d["stroke-width"]))}c.style.setProperty(_,g)}else c.style.setProperty(_,"")})},y.generateSvgElementId=function(d){return d+"_"+S.MathUtils.generateGuid()},y.getUrlPathById=function(d){return"url(#"+d+")"},y}();P.RenderUtils=T,P.raiseEvent=function(y,d,c){c(d),d.preventDefault&&y.preventDefault()}},5401:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.InputPosition=void 0;var f=b(6823),S=b(4914),T=function(){function y(d){this.selection=d,this.initialProperties=new f.InputPositionProperties(this.selection),this.defaultProperties=new f.InputPositionProperties(this.selection,this.initialProperties,!0),this.currentProperties=new f.InputPositionProperties(this.selection,this.defaultProperties)}return y.prototype.initialize=function(){this.reset(),this.defaultProperties.reset()},y.prototype.reset=function(){this.currentProperties.reset()},y.prototype.getDefaultConnectorProperties=function(){return this.defaultProperties.getConnectorProperties()},y.prototype.getDefaultConnectorPropertyValue=function(d){return this.defaultProperties.getConnectorPropertyValue(d)},y.prototype.getCurrentConnectorPropertyValue=function(d){return this.currentProperties.getConnectorPropertyValue(d)},y.prototype.setConnectorPropertyValue=function(d,c){this.currentProperties.setConnectorPropertyValue(d,c),this.selection.isEmpty(!0)&&this.defaultProperties.setConnectorPropertyValue(d,c)},y.prototype.setInitialConnectorProperties=function(d){for(var c in this.defaultProperties.reset(),this.currentProperties.reset(),d)Object.prototype.hasOwnProperty.call(d,c)&&this.initialProperties.setConnectorPropertyValue(c,d[c])},y.prototype.getDefaultStyle=function(){return this.defaultProperties.getStyle()},y.prototype.getDefaultStylePropertyValue=function(d){return this.defaultProperties.getStylePropertyValue(d)},y.prototype.getDefaultTextStyle=function(){return this.defaultProperties.getTextStyle()},y.prototype.getDefaultTextStylePropertyValue=function(d){return this.defaultProperties.getTextStylePropertyValue(d)},y.prototype.getCurrentStylePropertyValue=function(d){return this.currentProperties.getStylePropertyValue(d)},y.prototype.getCurrentTextStylePropertyValue=function(d){return this.currentProperties.getTextStylePropertyValue(d)},y.prototype.setStylePropertyValue=function(d,c){this.currentProperties.setStylePropertyValue(d,c),this.selection.isEmpty(!0)&&this.defaultProperties.setStylePropertyValue(d,c)},y.prototype.setTextStylePropertyValue=function(d,c){this.currentProperties.setTextStylePropertyValue(d,c),this.selection.isEmpty(!0)&&this.defaultProperties.setTextStylePropertyValue(d,c)},y.prototype.setInitialStyleProperties=function(d){this.defaultProperties.reset(),this.currentProperties.reset();var c="string"==typeof d?S.Data.cssTextToObject(d):d;for(var s in c)Object.prototype.hasOwnProperty.call(c,s)&&this.initialProperties.setStylePropertyValue(s,c[s])},y.prototype.setInitialTextStyleProperties=function(d){this.defaultProperties.reset(),this.currentProperties.reset();var c="string"==typeof d?S.Data.cssTextToObject(d):d;for(var s in c)Object.prototype.hasOwnProperty.call(c,s)&&this.initialProperties.setTextStylePropertyValue(s,c[s])},y.prototype.notifySelectionChanged=function(d){this.reset()},y}();P.InputPosition=T},6823:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.InputPositionProperties=void 0;var f=b(4612),S=b(1552),T=function(){function y(d,c,s){this.selection=d,this.baseProperties=c,this.disableMergingStyles=s,this.selection=d}return y.prototype.reset=function(){this.connectorProperties=null,this.style=null,this.textStyle=null},y.prototype.getConnectorProperties=function(){return this.connectorProperties||(this.connectorProperties=this.baseProperties?this.baseProperties.getConnectorProperties().clone():new f.ConnectorProperties,this.updateConnectorProperties(this.connectorProperties)),this.connectorProperties},y.prototype.getConnectorPropertyValue=function(d){return this.getConnectorProperties()[d]},y.prototype.setConnectorPropertyValue=function(d,c){this.getConnectorProperties()[d]=c},y.prototype.getStyle=function(){return this.style||(this.style=this.baseProperties?this.baseProperties.getStyle().clone():new S.Style,this.disableMergingStyles||this.updateStyle(this.style,"style")),this.style},y.prototype.getStylePropertyValue=function(d){return this.getStyle()[d]},y.prototype.setStylePropertyValue=function(d,c){this.getStyle()[d]=c},y.prototype.getTextStyle=function(){return this.textStyle||(this.textStyle=this.baseProperties?this.baseProperties.getTextStyle().clone():new S.TextStyle,this.disableMergingStyles||this.updateStyle(this.textStyle,"styleText")),this.textStyle},y.prototype.getTextStylePropertyValue=function(d){return this.getTextStyle()[d]},y.prototype.setTextStylePropertyValue=function(d,c){this.getTextStyle()[d]=c},y.prototype.updateConnectorProperties=function(d){var c=this,s=this.selection.getSelectedConnectors(!0);d.forEach(function(a){c.updatePropertyValue(d,s,function(u){return u.properties},a)})},y.prototype.updateStyle=function(d,c){var s=this,a=this.selection.getSelectedItems(!0);d.forEach(function(u){s.updatePropertyValue(d,a,function(h){return h[c]},u)})},y.prototype.updatePropertyValue=function(d,c,s,a){var u,h=!1;c.forEach(function(g){var _=s(g)[a];if(void 0===u&&void 0!==_)u=_,h=!0;else if(h&&u!==_)return void(u=void 0)}),h&&(d[a]=u)},y}();P.InputPositionProperties=T},9021:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Selection=void 0;var f=b(8675),S=b(5401),T=b(5503),y=b(7959),d=b(4914),c=function(){function s(a){this.onChanged=new f.EventDispatcher,this.inputPosition=new S.InputPosition(this),this.onChanged.add(this.inputPosition),this.initialize(a)}return s.prototype.initialize=function(a){this.model=a,this.keys=[],this.inputPosition.initialize()},s.prototype.add=function(a){this.keys.indexOf(a)<0&&(this.keys.push(a),this.raiseSelectionChanged())},s.prototype.remove=function(a){this.keys.indexOf(a)>=0&&(this.keys.splice(this.keys.indexOf(a),1),this.raiseSelectionChanged())},s.prototype.clear=function(){this.keys.length>0&&(this.keys=[],this.raiseSelectionChanged())},s.prototype.set=function(a,u){!u&&d.Data.ArrayEqual(a,this.keys)||(this.keys=a,this.raiseSelectionChanged())},s.prototype.getKeys=function(){return this.keys},s.prototype.getKey=function(a){return this.keys[a]},s.prototype.getSelectedItemsInsideContainers=function(a){var u=this,h=a.slice();return a.forEach(function(g){g instanceof T.Shape&&u.getSelectedItemsInsideContainers(u.model.getChildren(g)).forEach(function(_){-1!==h.indexOf(_)||u.hasKey(_.key)||h.push(_)})}),h},s.prototype.getSelectedItemsCore=function(a){var u=this;return this.keys.map(function(h){return u.model.findItem(h)}).filter(function(h){return h&&(a||!h.isLocked)})},s.prototype.getSelectedItems=function(a,u){return u?this.getSelectedItemsInsideContainers(this.getSelectedItemsCore(a)):this.getSelectedItemsCore(a)},s.prototype.getSelectedShapes=function(a,u){var h=this;if(u){var g=this.getSelectedItemsCore(a);return this.getSelectedItemsInsideContainers(g).map(function(_){return _ instanceof T.Shape?_:void 0}).filter(function(_){return _})}return this.keys.map(function(_){return h.model.findShape(_)}).filter(function(_){return _&&(a||!_.isLocked)})},s.prototype.getSelectedConnectors=function(a,u){var h=this;if(u){var g=this.keys.map(function(_){return h.model.findItem(_)});return this.getSelectedItemsInsideContainers(g).map(function(_){return _ instanceof y.Connector?_:void 0}).filter(function(_){return _&&(a||!_.isLocked)})}return this.keys.map(function(_){return h.model.findConnector(_)}).filter(function(_){return _&&(a||!_.isLocked)})},s.prototype.hasKey=function(a){return this.keys.indexOf(a)>=0},s.prototype.isEmpty=function(a){return!this.getSelectedItems(a).length},s.prototype.selectRect=function(a){var u=[];this.model.iterateItems(function(h){h.intersectedByRect(a)&&u.push(h.key)}),this.set(u)},s.prototype.raiseSelectionChanged=function(){this.onChanged.raise("notifySelectionChanged",this)},s}();P.Selection=c},240:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectorRoutingMode=P.AutoZoomMode=P.DiagramSettings=void 0;var f,S,a,T=b(8675),y=b(6353),d=b(5383),c=b(4867),s=function(){function a(){this.onZoomChanged=new T.EventDispatcher,this.onViewChanged=new T.EventDispatcher,this.onReadOnlyChanged=new T.EventDispatcher,this.onConnectorRoutingModeChanged=new T.EventDispatcher,this._zoomLevel=1,this._zoomLevelWasChanged=!1,this._zoomLevelItems=[.5,.75,1,1.25,1.5,2,3],this._simpleView=!1,this._fullscreen=!1,this._readOnly=!1,this._autoZoom=f.Disabled,this._snapToGrid=!0,this._showGrid=!0,this._contextMenuEnabled=!0,this._gridSize=180,this._gridSizeItems=[90,180,360,720],this._pageSizeItems=[{size:new y.Size(12240,15840),text:"US-Letter ({width} x {height})"},{size:new y.Size(12240,20160),text:"US-Legal ({width} x {height})"},{size:new y.Size(15817,24491),text:"US-Tabloid ({width} x {height})"},{size:new y.Size(47679,67408),text:"A0 ({width} x {height})"},{size:new y.Size(33676,47679),text:"A1 ({width} x {height})"},{size:new y.Size(23811,33676),text:"A2 ({width} x {height})"},{size:new y.Size(16838,23811),text:"A3 ({width} x {height})"},{size:new y.Size(11906,16838),text:"A4 ({width} x {height})"},{size:new y.Size(8391,11906),text:"A5 ({width} x {height})"},{size:new y.Size(5953,8391),text:"A6 ({width} x {height})"},{size:new y.Size(4195,5953),text:"A7 ({width} x {height})"}],this._viewUnits=d.DiagramUnit.In,this._connectorRoutingMode=S.AllShapesOnly,this._reloadInsertedItemRequired=!1,this._useCanvgForExportToImage=!0}return Object.defineProperty(a.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(u){var h=this;(u=a.correctZoomLevel(u))!==this._zoomLevel&&(this._zoomLevel=u,this._zoomLevelWasChanged=!0,this.onZoomChanged.raise1(function(g){return g.notifyZoomChanged(u,h._autoZoom)}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"zoomLevelWasChanged",{get:function(){return this._zoomLevelWasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"zoomLevelItems",{get:function(){return this._zoomLevelItems},set:function(u){(u=u.map(function(h){return a.correctZoomLevel(h)}))!==this._zoomLevelItems&&(this._zoomLevelItems=u)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"autoZoom",{get:function(){return this._autoZoom},set:function(u){var h=this;u!==this._autoZoom&&(this._autoZoom=u,this.onZoomChanged.raise1(function(g){return g.notifyZoomChanged(h._zoomLevel,u)}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"simpleView",{get:function(){return this._simpleView},set:function(u){u!==this._simpleView&&(this._simpleView=u,this.notifyViewChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"readOnly",{get:function(){return this._readOnly},set:function(u){u!==this._readOnly&&(this._readOnly=u,this.onReadOnlyChanged.raise1(function(h){return h.notifyReadOnlyChanged(u)}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"fullscreen",{get:function(){return this._fullscreen},set:function(u){this._fullscreen=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"snapToGrid",{get:function(){return this._snapToGrid},set:function(u){this._snapToGrid=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"showGrid",{get:function(){return this._showGrid},set:function(u){var h=this;u!==this._showGrid&&(this._showGrid=u,this.onViewChanged.raise1(function(g){return g.notifyGridChanged(h.showGrid,h.gridSize)}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"contextMenuEnabled",{get:function(){return this._contextMenuEnabled},set:function(u){this._contextMenuEnabled=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"gridSize",{get:function(){return this._gridSize},set:function(u){var h=this;u!==this._gridSize&&(this._gridSize=u,this.onViewChanged.raise1(function(g){return g.notifyGridChanged(h.showGrid,h.gridSize)}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"gridSizeItems",{get:function(){return this._gridSizeItems},set:function(u){u!==this._gridSizeItems&&(this._gridSizeItems=u)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"pageSizeItems",{get:function(){return this._pageSizeItems},set:function(u){u!==this._pageSizeItems&&(this._pageSizeItems=u)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"viewUnits",{get:function(){return this._viewUnits},set:function(u){this._viewUnits=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"connectorRoutingMode",{get:function(){return this._connectorRoutingMode},set:function(u){u!==this._connectorRoutingMode&&(this._connectorRoutingMode=u,this.onConnectorRoutingModeChanged.raise1(function(h){return h.notifyConnectorRoutingModeChanged(u)}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"reloadInsertedItemRequired",{get:function(){return this._reloadInsertedItemRequired},set:function(u){this._reloadInsertedItemRequired=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"useCanvgForExportToImage",{get:function(){return this._useCanvgForExportToImage},set:function(u){this._useCanvgForExportToImage=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"shapeMinWidth",{get:function(){return this._shapeMinWidth},set:function(u){this._shapeMinWidth=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"shapeMinHeight",{get:function(){return this._shapeMinHeight},set:function(u){this._shapeMinHeight=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"shapeMaxWidth",{get:function(){return this._shapeMaxWidth},set:function(u){this._shapeMaxWidth=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"shapeMaxHeight",{get:function(){return this._shapeMaxHeight},set:function(u){this._shapeMaxHeight=u},enumerable:!1,configurable:!0}),a.prototype.applyShapeSizeSettings=function(u,h){u&&("number"==typeof u.shapeMaxHeight&&(this.shapeMaxHeight=c.ModelUtils.getTwipsValue(h,u.shapeMaxHeight)),"number"==typeof u.shapeMinHeight&&(this.shapeMinHeight=c.ModelUtils.getTwipsValue(h,u.shapeMinHeight)),"number"==typeof u.shapeMaxWidth&&(this.shapeMaxWidth=c.ModelUtils.getTwipsValue(h,u.shapeMaxWidth)),"number"==typeof u.shapeMinWidth&&(this.shapeMinWidth=c.ModelUtils.getTwipsValue(h,u.shapeMinWidth)))},a.prototype.notifyViewChanged=function(){var u=this;this.onViewChanged.raise1(function(h){return h.notifyViewChanged(u._simpleView)})},a.correctZoomLevel=function(u){return Math.min(10,Math.max(u,.01))},a}();P.DiagramSettings=s,(a=f=P.AutoZoomMode||(P.AutoZoomMode={}))[a.Disabled=0]="Disabled",a[a.FitContent=1]="FitContent",a[a.FitToWidth=2]="FitToWidth",function(a){a[a.None=0]="None",a[a.ConnectorShapesOnly=1]="ConnectorShapesOnly",a[a.AllShapesOnly=2]="AllShapesOnly"}(S=P.ConnectorRoutingMode||(P.ConnectorRoutingMode={}))},2230:function(o,P,b){var f,S=this&&this.__extends||(f=function(y,d){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var a in s)s.hasOwnProperty(a)&&(c[a]=s[a])})(y,d)},function(y,d){function c(){this.constructor=y}f(y,d),y.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)});Object.defineProperty(P,"__esModule",{value:!0}),P.BarManager=void 0;var T=function(y){function d(c){var s=y.call(this)||this;return s.bars=[],s.control=c,s}return S(d,y),d.prototype.clean=function(){var c=this;this.bars.forEach(function(s){return s.onChanged.remove(c)}),this.bars=[]},d.prototype.registerBar=function(c){this.bars.push(c),c.onChanged.add(this),this.updateBarItemsState(c)},d.prototype.updateItemsState=function(c){if(!this.isUpdateLocked())for(var s=0,a=void 0;a=this.bars[s];s++)this.updateBarItemsState(a,c)},d.prototype.updateBarItemsState=function(c,s){if(!this.isUpdateLocked()){if(this.control.permissionsProvider.beginUpdateUI(),c.isVisible()){var a=void 0;if(s){var u=c.getCommandKeys().reduce(function(_,x){return _[x]=!0,_},{});a=s.filter(function(_){return u[_]})}else a=c.getCommandKeys();for(var h=a.length,g=0;g<h;g++)this.updateBarItem(c,a[g])}this.control.permissionsProvider.endUpdateUI()}},d.prototype.updateBarItem=function(c,s){var a=this.control.commandManager.getCommand(s);if(a){var u=a.getState();if(c.setItemVisible(s,u.visible),u.visible&&(c.setItemEnabled(s,u.enabled),!u.denyUpdateValue)){var h=this.getItemValue(u.value);u.items&&c.setItemSubItems(s,u.items),c.setItemValue(s,h,this.getDefaultItemValue(u.defaultValue))}}},d.prototype.setEnabled=function(c){for(var s=0,a=void 0;a=this.bars[s];s++)a.setEnabled(c)},d.prototype.notifyBarCommandExecuted=function(c,s){this.control.commandManager.getCommand(c).execute(s)||this.updateItemsState([c])},d.prototype.notifyBarUpdateRequested=function(){this.updateItemsState()},d.prototype.notifySelectionChanged=function(c){this.updateItemsState()},d.prototype.onUpdateUnlocked=function(c){},d.prototype.getItemValue=function(c){return c},d.prototype.getDefaultItemValue=function(c){return c},d}(b(1772).BatchUpdatableObject);P.BarManager=T},8675:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.EventUtils=P.HtmlFocusUtils=P.ObjectUtils=P.GeometryUtils=P.Utils=P.EventDispatcher=P.Range=P.LineEquation=void 0,b(7097);var f=b(6353),S=b(8900),T=b(8011),y=b(2400),d=b(5596),c=b(8679),s=b(9716),a=b(1335),u=b(1552),h=b(9279),g=b(3714),_=function(){function G(k,U,B){this.aParam=k,this.bParam=U,this.cParam=B}return G.fromPoints=function(k,U,B){return void 0===B&&(B=1e-5),C.areDuplicatedPoints(k,U,B)?void 0:new G(U.y-k.y,k.x-U.x,U.x*k.y-k.x*U.y)},G.prototype.getPointIntersection=function(k,U){void 0===U&&(U=1e-5);var B=this.aParam,K=this.bParam,J=this.cParam,ie=k.aParam,re=k.bParam,q=k.cParam,Y=ie*K-B*re;if(c.MathUtils.numberCloseTo(Y,0,U))return null;if(0===B)return this.createPoint((re*J-q*K)/(K*ie),-J/K);var Q=(q*B-J*ie)/Y;return this.createPoint((-K*Q-J)/B,Q)},G.prototype.containsPoint=function(k,U){return void 0===U&&(U=1e-5),c.MathUtils.numberCloseTo(this.aParam*k.x+this.bParam*k.y+this.cParam,0,U)},G.prototype.createPoint=function(k,U,B){return void 0===B&&(B=1e-5),new S.Point(c.MathUtils.numberCloseTo(k,0,B)?0:k,c.MathUtils.numberCloseTo(U,0,B)?0:U)},G}();P.LineEquation=_;var x=function(){function G(k,U){this.from=k,this.to=void 0!==U?U:k}return Object.defineProperty(G.prototype,"length",{get:function(){return Math.abs(this.to-this.from)},enumerable:!1,configurable:!0}),G.prototype.extend=function(k){this.from=Math.min(k.from,this.from),this.to=Math.max(k.to,this.to)},G.prototype.includes=function(k){return k>=this.from&&k<=this.to},G.fromLength=function(k,U){return new G(k,k+U)},G}();P.Range=x;var w=function(){function G(){this.listeners=[]}return G.prototype.add=function(k){if(!k)throw new Error("Not Implemented");this.hasEventListener(k)||this.listeners.push(k)},G.prototype.remove=function(k){for(var U=0,B=void 0;B=this.listeners[U];U++)if(B===k){this.listeners.splice(U,1);break}},G.prototype.raise=function(k){for(var U=[],B=1;B<arguments.length;B++)U[B-1]=arguments[B];for(var K=0,J=void 0;J=this.listeners[K];K++){var ie=J[k];ie&&ie.apply(J,U)}},G.prototype.raise1=function(k){for(var U=0,B=void 0;B=this.listeners[U];U++)k(B)},G.prototype.hasEventListener=function(k){for(var U=0,B=this.listeners.length;U<B;U++)if(this.listeners[U]===k)return!0;return!1},G}();P.EventDispatcher=w;var D=function(){function G(){}return G.flatten=function(k){return[].concat.apply([],k)},G}();P.Utils=D;var C=function(){function G(){}return G.arePointsOfOrthogonalLine=function(k,U,B){return B?k.y===U.y:k.x===U.x},G.getCommonRectangle=function(k){if(!k.length)return new T.Rectangle(0,0,0,0);var U=Number.MAX_VALUE,B=-Number.MAX_VALUE,K=Number.MAX_VALUE,J=-Number.MAX_VALUE;return k.forEach(function(ie){U=Math.min(U,ie.x),B=Math.max(B,ie.right),K=Math.min(K,ie.y),J=Math.max(J,ie.bottom)}),new T.Rectangle(U,K,B-U,J-K)},G.findFreeSpace=function(k,U,B,K){var J=[K?K.x:0],ie=[K?K.y:0];k.forEach(function(z){J.push(z.x),J.push(z.right),ie.push(z.y),ie.push(z.bottom)}),J=J.sort(function(z,oe){return z-oe}).reduce(function(z,oe,ae){return J[ae-1]!==oe&&z.push(oe)&&z||z},[]);for(var re=(ie=ie.sort(function(z,oe){return z-oe}).reduce(function(z,oe,ae){return ie[ae-1]!==oe&&z.push(oe)&&z||z},[])).map(function(z){return J.map(function(oe,ae){return J[ae+1]-oe})}),q=function(z,oe){for(var ae=y.SearchUtils.binaryIndexOf(J,function(ve){return ve-oe.x}),ee=y.SearchUtils.binaryIndexOf(J,function(ve){return ve-oe.right}),he=y.SearchUtils.binaryIndexOf(ie,function(ve){return ve-oe.y}),de=y.SearchUtils.binaryIndexOf(ie,function(ve){return ve-oe.bottom}),ue=he;ue<de;ue++)for(var be=ae;be<ee;be++)re[ue][be]*=-1},Y=0,Z=void 0;Z=k[Y];Y++)q(0,Z);for(var Q=0;Q<ie.length;Q++)for(var te=0;te<J.length-1;te++){var pe=this.checkRect(re,ie,J,Q,te,U,B);if(pe>0)te=pe;else if(0===pe)return new S.Point(J[te],ie[Q])}return null},G.checkRect=function(k,U,B,K,J,ie,re){for(var q=0,Y=0,Z=B.length-2,Q=K;Q<U.length;Q++){q=U[Q+1]-U[K];for(var te=J;te<=Z;te++){if(k[Q][te]<0)return 0===te?-1:te;if(ie.width<=(Y=B[te+1]-B[J])||!re&&te===B.length-2&&ie.width/2<=Y){if(ie.height<=q||!re&&Q===U.length-2&&ie.height/2<=q)return 0;Z=te}}}},G.getArrowPoints=function(k,U,B,K){if(k.x===U.x&&k.y===U.y)return{point1:k.clone(),point2:k.clone(),point3:k.clone()};var J=U.x-k.x,ie=U.y-k.y,re=Math.sqrt(Math.pow(J,2)+Math.pow(ie,2)),q=J/re,Y=ie/re,te=k.x+B*q-K*Y,pe=k.y+B*Y+K*q,z=k.x+B*q,oe=k.y+B*Y;return{point1:new S.Point(k.x+B*q+K*Y,k.y+B*Y-K*q),point2:new S.Point(te,pe),point3:new S.Point(z,oe)}},G.createSegments=function(k){for(var U=[],B=1;B<k.length;B++)U.push(new a.Segment(k[B-1],k[B]));return U},G.createRectagle=function(k){var U=k.map(function(q){return q.x}),B=k.map(function(q){return q.y}),K=U.reduce(function(q,Y){return Math.min(q,Y)},Number.MAX_VALUE),J=U.reduce(function(q,Y){return Math.max(q,Y)},-Number.MAX_VALUE),ie=B.reduce(function(q,Y){return Math.min(q,Y)},Number.MAX_VALUE),re=B.reduce(function(q,Y){return Math.max(q,Y)},-Number.MAX_VALUE);return new T.Rectangle(K,ie,J-K,re-ie)},G.createSegmentsFromRectangle=function(k){var U=[],B=new S.Point(k.x,k.y),K=new S.Point(k.right,k.y),J=new S.Point(k.right,k.bottom),ie=new S.Point(k.x,k.bottom);return U.push(new a.Segment(B,K)),U.push(new a.Segment(K,J)),U.push(new a.Segment(J,ie)),U.push(new a.Segment(ie,B)),U},G.areSegmentsCutRectangle=function(k,U){if(!U)return!1;for(var B=G.createSegmentsFromRectangle(U),K=!1,J=!1,ie=function(Y){if(K&&J)return{value:!0};var Z=k[Y];if(Z.isIntersectedByRect(U)){var Q=Z.startPoint,te=Z.endPoint,pe=U.containsPoint(Q),z=U.containsPoint(te);if(!pe&&!z)return{value:!0};if(pe&&!z){var oe=B.filter(function(de){return de.containsPoint(Q)});return oe.length>0&&B.filter(function(de){return 1===oe.length?!de.containsPoint(oe[0].startPoint)&&!de.containsPoint(oe[0].endPoint):de!==oe[0]&&de!==oe[1]}).some(function(de){return Z.isIntersected(de)})&&!K&&(K=!0),J||(J=!0),"continue"}if(!pe&&z){K||(K=!0,J&&(J=!1));var ae=B.filter(function(de){return de.containsPoint(te)});return ae.length>0&&B.filter(function(de){return 1===ae.length?!de.containsPoint(ae[0].startPoint)&&!de.containsPoint(ae[0].endPoint):de!==ae[0]&&de!==ae[1]}).some(function(de){return Z.isIntersected(de)})&&!J&&(J=!0),"continue"}var ee=B.filter(function(de){return de.containsPoint(Q)}),he=B.filter(function(de){return de.containsPoint(te)});if(2===ee.length&&2===he.length)return{value:!0};if(1===ee.length&&1===he.length&&ee[0]!==he[0])return{value:!0};J||1!==he.length||ee.length||(J=!0),K||1!==ee.length||he.length||(K=!0,J&&(J=!1))}},re=0;re<k.length;re++){var q=ie(re);if("object"==typeof q)return q.value}return K&&J},G.areIntersectedSegments=function(k,U){if(!U)return!1;for(var B,K=0;B=k[K];){for(var J=0,ie=void 0;ie=U[J];){if(ie.isIntersected(B))return!0;J++}K++}return!1},G.isLineIntersected=function(k,U,B,K,J){var ie=_.fromPoints(k,U),re=B.startPoint,q=B.endPoint;if(ie.containsPoint(re)&&ie.containsPoint(q))return!K&&!J;var Y=_.fromPoints(re,q).getPointIntersection(ie);return!(!Y||!B.containsPoint(Y)||(K?G.areDuplicatedPoints(re,Y):J&&G.areDuplicatedPoints(q,Y)))},G.removeUnnecessaryPoints=function(k,U,B,K){void 0===B&&(B=function(J){return void 0!==J}),void 0===K&&(K=1e-5),this.removeUnnecessaryPointsCore(k,U,B,K),this.removeBackwardPoints(k,U,B,K),this.removeUnnecessaryPointsCore(k,U,B,K)},G.removeUnnecessaryRightAnglePoints=function(k,U,B,K){void 0===B&&(B=function(J){return void 0!==J}),void 0===K&&(K=1e-5),this.removeUnnecessaryPointsCore(k,U,B,K),this.removeBackwardPoints(k,U,B,K),this.removeNotRightAnglePoints(k,U,B,K),this.removeUnnecessaryPointsCore(k,U,B,K)},G.removeUnnecessaryPointsCore=function(k,U,B,K){void 0===B&&(B=function(J){return void 0!==J}),void 0===K&&(K=1e-5),this.removeDuplicatedPoints(k,U,B,K),this.removeNotCornersPoints(k,U,B,K)},G.removeNotRightAnglePoints=function(k,U,B,K){void 0===B&&(B=function(Y){return void 0!==Y}),void 0===K&&(K=1e-5);for(var J,ie=0;(J=k[ie])&&k.length>2;){var re=this.getNextPoint(k,ie,1,B),q=this.getNextPoint(k,ie,-1,B);q&&re&&!G.isRightAngleCorner(q,J,re,K)&&U(J,ie)||ie++}},G.removeDuplicatedPoints=function(k,U,B,K){void 0===B&&(B=function(Y){return void 0!==Y}),void 0===K&&(K=1e-5);for(var J,ie=0;(J=k[ie])&&k.length>2;){var re=this.getNextPoint(k,ie,1,B);if(re&&G.areDuplicatedPoints(J,re,K)){var q=ie===k.length-2?ie:ie+1;if(U(k[q],q))continue}ie++}},G.removeNotCornersPoints=function(k,U,B,K){void 0===B&&(B=function(Y){return void 0!==Y}),void 0===K&&(K=1e-5);for(var J,ie=0;(J=k[ie])&&k.length>2;){var re=this.getNextPoint(k,ie,1,B),q=this.getNextPoint(k,ie,-1,B);q&&re&&!G.isCorner(q,J,re,K)&&U(J,ie)||ie++}},G.removeBackwardPoints=function(k,U,B,K){void 0===B&&(B=function(Y){return void 0!==Y}),void 0===K&&(K=1e-5);for(var J,ie=0;(J=k[ie])&&k.length>2;){var re=this.getNextPoint(k,ie,1,B),q=this.getNextPoint(k,ie,-1,B);q&&re&&G.isBackwardPoint(q,J,re,K)&&U(J,ie)||ie++}},G.isRightAngleCorner=function(k,U,B,K){return void 0===K&&(K=1e-5),c.MathUtils.numberCloseTo(G.createAngle(k,U,B),Math.PI/2,K)||c.MathUtils.numberCloseTo(G.createAngle(k,U,B),Math.PI,K)||c.MathUtils.numberCloseTo(G.createAngle(k,U,B),3*Math.PI/2,K)},G.isCorner=function(k,U,B,K){return void 0===K&&(K=1e-5),!c.MathUtils.numberCloseTo(G.createAngle(k,U,B),0,K)},G.areDuplicatedPoints=function(k,U,B){return void 0===B&&(B=1e-5),c.MathUtils.numberCloseTo(k.x,U.x,B)&&c.MathUtils.numberCloseTo(k.y,U.y,B)},G.isBackwardPoint=function(k,U,B,K){return void 0===K&&(K=1e-5),c.MathUtils.numberCloseTo(G.createAngle(k,U,B),Math.PI,K)},G.createAngle=function(k,U,B){var K=s.Vector.fromPoints(U,B),J=s.Vector.fromPoints(k,U),ie=K.x,re=K.y,q=J.x,Y=J.y,Z=Math.atan2(ie*Y-q*re,ie*q+re*Y);return Z<0?2*Math.PI+Z:Z},G.getNextPoint=function(k,U,B,K){for(var J,ie=U+B;J=k[ie];){if(K(J))return J;ie+=B}},G.addSelectedLinesTo=function(k,U,B,K,J,ie,re,q,Y,Z,Q,te,pe,z){void 0===z&&(z=1e-5);var oe=U.y-k.y,ae=B.y-U.y,ee=k.x-U.x,he=U.x-B.x,de=oe*he-ae*ee;if(!c.MathUtils.numberCloseTo(de,0,z)){var ue=oe*(k.x+K)+ee*(k.y+J),be=ae*(U.x+q)+he*(U.y+Y);te((he*ue-ee*be)/de,(oe*be-ae*ue)/de);var ve=oe*(k.x+ie)+ee*(k.y+re),le=ae*(U.x+Z)+he*(U.y+Q);pe((he*ve-ee*le)/de,(oe*le-ae*ve)/de)}},G.getSelectionOffsetPoint=function(k,U,B){return new S.Point((k.y-U.y)/B,(U.x-k.x)/B)},G.getSelectionTextStartEndPoints=function(k,U,B,K,J,ie){var re=(U.x-k.x)/B,q=(U.y-k.y)/B,Y=J.width*re+J.height*q;switch(ie){case u.TextAlignment.Left:return[K,new S.Point(K.x+re*Y,K.y+q*Y)];case u.TextAlignment.Right:return[new S.Point(K.x-re*Y,K.y-q*Y),K];default:return[new S.Point(K.x-.5*re*Y,K.y-.5*q*Y),new S.Point(K.x+.5*re*Y,K.y+.5*q*Y)]}},G.getPathLength=function(k){var U,B=0;return k.forEach(function(K){void 0!==U&&(B+=d.Metrics.euclideanDistance(K,U)),U=K}),B},G.getPathPointByPosition=function(k,U){if(!k.length)throw new Error("Invalid points");if(0>U||U>1)throw new Error("Invalid relative position");var B=this.getPathLength(k);if(k.length<=2&&0===B||0===U)return[k[0],0];for(var K=B*U,J=0,ie=1;ie<k.length;ie++){var re=d.Metrics.euclideanDistance(k[ie],k[ie-1]);if(J+re>=K){var q=K-J;return[new S.Point(k[ie-1].x+(k[ie].x-k[ie-1].x)/re*q,k[ie-1].y+(k[ie].y-k[ie-1].y)/re*q),ie]}J+=re}return[k[k.length-1],k.length-1]},G.getLineAngle=function(k,U){return Math.atan2(U.y-k.y,U.x-k.x)},G.getTriangleBeginAngle=function(k,U,B){var K=this.getLineAngle(k,U),J=this.getLineAngle(k,B);return Math.abs(J-K)},G.getTriangleEndAngle=function(k,U,B){var K=this.getLineAngle(k,U),J=this.getLineAngle(B,U);return Math.abs(K-J)},G.getPathPointByPoint=function(k,U){if(!k.length)throw new Error("Invalid points");if(1===k.length)return k[0];for(var B,K=Number.MAX_VALUE,J=1;J<k.length;J++){var ie=k[J-1],re=k[J];if(U.equals(ie)){B=ie.clone();break}if(U.equals(re)){B=re.clone();break}var pe,q=this.getTriangleBeginAngle(ie,re,U),Y=this.getTriangleEndAngle(ie,re,U),Z=d.Metrics.euclideanDistance(U,ie),Q=d.Metrics.euclideanDistance(U,re),te=Z*Math.sin(q);if((pe=Math.PI/2<=q&&q<=3*Math.PI/2?Z:Math.PI/2<=Y&&Y<=3*Math.PI/2?Q:Math.abs(te))<K)if(K=pe,Math.PI/2<=q&&q<=3*Math.PI/2)B=ie.clone();else if(Math.PI/2<=Y&&Y<=3*Math.PI/2)B=re.clone();else{var z=Math.fround||Math.round,oe=this.getLineAngle(ie,re),ae=z(Math.abs(te*Math.sin(oe))),ee=z(Math.abs(te*Math.cos(oe))),he=U.y-ie.y<z((U.x-ie.x)*Math.tan(oe));0<=oe&&oe<=Math.PI/2?(ae*=he?-1:1,ee*=he?1:-1):Math.PI/2<=oe&&oe<=Math.PI||0>=oe&&oe>=-Math.PI/2?(ae*=he?1:-1,ee*=he?1:-1):-Math.PI/2>=oe&&oe>=-Math.PI&&(ae*=he?-1:1,ee*=he?1:-1),B=U.clone().offset(ae,ee)}}return B},G.getPathPositionByPoint=function(k,U,B){void 0===B&&(B=100),U=this.getPathPointByPoint(k,U);for(var K=this.getPathLength(k),J=0,ie=1;ie<k.length;ie++){var re=k[ie-1],q=k[ie],Y=d.Metrics.euclideanDistance(q,re),Z=Math.atan((q.y-re.y)/(q.x-re.x)),Q=Math.fround||Math.round;if(U.x===q.x&&U.x===re.x||U.y===q.y&&U.y===re.y||Q(U.y-re.y)===Q((U.x-re.x)*Math.tan(Z)))return 0!==Math.sin(Z)?J+=Math.abs((U.y-re.y)/Math.sin(Z)):J+=Math.abs(U.x-re.x),Math.round(J*B/K)/B;J+=Y}return 1},G.arePointsEqual=function(k,U){var B=k.length;if(B!==U.length)return!1;for(var K=0;K<B;K++)if(!k[K].equals(U[K]))return!1;return!0},G.getMaxRectangleEnscribedInEllipse=function(k){var U=k.width*Math.sqrt(2)/2,B=k.height*Math.sqrt(2)/2;return new f.Size(U,B)},G.getEllipseByEnscribedRectangle=function(k){return new f.Size(2*k.width/Math.sqrt(2),2*k.height/Math.sqrt(2))},G}();P.GeometryUtils=C;var I=function(){function G(){}return G.cloneObject=function(k){return k&&Object.assign({},k)},G.compareObjects=function(k,U){return k===U||"object"==typeof k&&"object"==typeof U&&this.isDeepEqual(k,U)},G.isDeepEqual=function(k,U){var B=k?Object.getOwnPropertyNames(k):[],K=U?Object.getOwnPropertyNames(U):[];if(B.length!==K.length)return!1;for(var J=0;J<B.length;J++){var ie=B[J];switch(typeof k[ie]){case"object":if(!this.isDeepEqual(k[ie],U[ie]))return!1;break;case"number":if(!(isNaN(k[ie])&&isNaN(U[ie])||k[ie]===U[ie]))return!1;break;default:if(k[ie]!==U[ie])return!1}}return!0},G}();P.ObjectUtils=I;var L=function(){function G(){}return G.focusWithPreventScroll=function(k){try{var U=h.Browser.Safari,B=U&&this.getHtmlScrollPosition();if(U){var K=k.parentElement&&k.parentElement.getBoundingClientRect();if(K){var J=K.left<0?1-K.left:0,ie=K.top<0?1-K.top:0,re=window.frameElement&&window.frameElement.getBoundingClientRect();re&&(re.top<0&&-re.top>K.top&&(ie=-re.top-K.top+1),re.left<0&&-re.left>K.left&&(J=-re.left-K.left+1)),k.style.setProperty("left",J+"px","important"),k.style.setProperty("top",ie+"px","important")}}if(k.focus({preventScroll:!0}),U){var q=this.getHtmlScrollPosition();I.compareObjects(B,q)||this.setHtmlScrollPosition(B),k.style.setProperty("left","-1000px","important"),k.style.setProperty("top","-1000px","important")}}catch{}},G.getHtmlScrollPosition=function(){return{pos:this.getDocumentScrollPosition(window,document),iframePos:window.top!==window&&this.getDocumentScrollPosition(window.top,window.top.document)}},G.getDocumentScrollPosition=function(k,U){return{left:k.pageXOffset||U.documentElement.scrollLeft||U.body.scrollLeft,top:k.pageYOffset||U.documentElement.scrollTop||U.body.scrollTop}},G.setHtmlScrollPosition=function(k){this.setDocumentScrollPosition(document,k.pos),window.top!==window&&k.iframePos&&this.setDocumentScrollPosition(window.top.document,k.iframePos)},G.setDocumentScrollPosition=function(k,U){k.documentElement.scrollTop=U.top,k.documentElement.scrollLeft=U.left,k.body.scrollTop=U.top,k.body.scrollLeft=U.left},G}();P.HtmlFocusUtils=L;var N=function(){function G(){}return G.isLeftButtonPressed=function(k){return g.EvtUtils.isLeftButtonPressed(k)},G.isPointerEvents=function(){return window.PointerEvent},G.isMousePointer=function(k){return this.isPointerEvents()&&(k.pointerType&&"mouse"===k.pointerType||h.Browser.Firefox&&"click"===k.type)},G.isTouchMode=function(){return h.Browser.TouchUI||window.navigator&&window.navigator.maxTouchPoints>0},G.isTouchEvent=function(k){return h.Browser.TouchUI||!G.isMousePointer(k)},G}();P.EventUtils=N},4914:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Data=P.SetAbsoluteY=P.SetAbsoluteX=void 0;var f=b(6907),S=b(2491);function T(c){return!isNaN(parseFloat(c))&&isFinite(c)}function y(c,s,a){return c-function(u,h){var x,w,g=(x=u,(w=document.createElement("DIV")).style.top="0px",w.style.left="0px",w.style.visibility="hidden",w.style.position=f.DomUtils.getCurrentStyle(x).position,w);"static"===g.style.position&&(g.style.position="absolute"),u.parentNode.appendChild(g);var _=h?f.DomUtils.getAbsolutePositionX(g):f.DomUtils.getAbsolutePositionY(g);return u.parentNode.removeChild(g),Math.round(_)}(s,a)}P.SetAbsoluteX=function(c,s){c.style.left=y(s,c,!0)+"px"},P.SetAbsoluteY=function(c,s){c.style.top=y(s,c,!1)+"px"};var d=function(){function c(){}return c.ArrayInsert=function(s,a,u){if(0<=u&&u<s.length){for(var h=s.length;h>u;h--)s[h]=s[h-1];s[u]=a}else s.push(a)},c.ArrayRemove=function(s,a){var u=c.ArrayIndexOf(s,a);u>-1&&c.ArrayRemoveAt(s,u)},c.ArrayRemoveAt=function(s,a){if(a>=0&&a<s.length){for(var u=a;u<s.length-1;u++)s[u]=s[u+1];s.pop()}},c.ArrayClear=function(s){for(;s.length>0;)s.pop()},c.ArrayIndexOf=function(s,a,u){if(u){for(h=0;h<s.length;h++)if(u(s[h],a))return h}else for(var h=0;h<s.length;h++)if(s[h]===a)return h;return-1},c.ArrayContains=function(s,a){return c.ArrayIndexOf(s,a)>=0},c.ArrayEqual=function(s,a){var u=s.length;if(u!==a.length)return!1;for(var h=0;h<u;h++)if(s[h]!==a[h])return!1;return!0},c.ArraySame=function(s,a){return s.length===a.length&&s.every(function(u){return c.ArrayContains(a,u)})},c.ArrayGetIntegerEdgeValues=function(s){var a=c.CollectionToArray(s);return c.ArrayIntegerAscendingSort(a),{start:a[0],end:a[a.length-1]}},c.ArrayIntegerAscendingSort=function(s){c.ArrayIntegerSort(s,!1)},c.ArrayIntegerSort=function(s,a){s.sort(function(u,h){var g=0;return u>h?g=1:u<h&&(g=-1),a&&(g*=-1),g})},c.CollectionsUnionToArray=function(s,a){for(var u=[],h=s.length,g=a.length,_=0;_<h+g;_++)u.push(_<h?s[_]:a[_-h]);return u},c.CollectionToArray=function(s){for(var a=[],u=0;u<s.length;u++)a.push(s[u]);return a},c.CreateHashTableFromArray=function(s){for(var a=[],u=0;u<s.length;u++)a[s[u]]=1;return a},c.CreateIndexHashTableFromArray=function(s){for(var a=[],u=0;u<s.length;u++)a[s[u]]=u;return a},c.ArrayToHash=function(s,a,u){return s instanceof Array?s.reduce(function(h,g,_){var x=a(g,_),w=u(g,_);return h[x]=w,h},{}):{}},c.Sum=function(s,a){return s instanceof Array?s.reduce(function(u,h){var g=a?a(h):h;return T(g)||(g=0),u+g},0):0},c.Min=function(s,a){return c.CalculateArrayMinMax(s,a,!1)},c.Max=function(s,a){return c.CalculateArrayMinMax(s,a,!0)},c.NearestLeftBinarySearchComparer=function(s,a,u){var h=s[a],g=h<u;return g&&a===s.length-1||g&&s[a+1]>=u?0:h<u?-1:1},c.ArrayBinarySearch=function(s,a,u,h,g){u||(u=c.defaultBinarySearchComparer),S.isDefined(h)||(h=0),S.isDefined(g)||(g=s.length-h);for(var _=h+g-1;h<=_;){var x=h+(_-h>>1),w=u(s,x,a);if(0===w)return x;w<0?h=x+1:_=x-1}return-(h+1)},c.ArrayFlatten=function(s){var a=[];return s.forEach(function(u){a=a.concat(u)}),a},c.GetDistinctArray=function(s){for(var a=[],u=0;u<s.length;u++){var h=s[u];-1===c.ArrayIndexOf(a,h)&&a.push(h)}return a},c.ForEach=function(s,a){if(Array.prototype.forEach)Array.prototype.forEach.call(s,a);else for(var u=0,h=s.length;u<h;u++)a(s[u],u,s)},c.MergeHashTables=function(s,a){if(!a||"string"==typeof a)return s;for(var u in s||(s={}),a)u&&!(u in s)&&(s[u]=a[u]);return s},c.Range=function(s,a){return(s=parseInt(s)||0)<0&&(s=0),(a=parseInt(a)||0)<0&&(a=0),Array(s).map(function(u,h){return a+h})},c.CalculateArrayMinMax=function(s,a,u){if(!(s instanceof Array))return 0;var h=u?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;return s.reduce(function(g,_){var x=a?a(_):_;return T(x)||(x=h),(u?Math.max:Math.min)(x,g)},h)},c.byRange=function(s,a,u){return Math.min(Math.max(s,a),u)},c.defaultBinarySearchComparer=function(s,a,u){var h=s[a];return h===u?0:h<u?-1:1},c.cssTextToObject=function(s){return s?(s=s.replace(/\/\*(.|\s)*?\*\//g,"").replace(/\s+/g," ")).split(";").reduce(function(a,u){if(u){var h=/\s*([^:]+?)\s*:\s*([^;]*)\s*$/.exec(u);if(h){var g=h[1],_=h[2];g&&_&&(a[g.trim()]=_.trim())}return a}return a},{}):{}},c.objectToCssText=function(s){return s?Object.keys(s).reduce(function(a,u){var h=u.trim(),g=s[u];return h&&g&&a.push(h+": "+g.toString().trim()),a},[]).join("; "):""},c}();P.Data=d},8396:(o,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.isColorProperty=void 0;var b={stroke:!0,fill:!0};P.isColorProperty=function(f){return b[f]}},3490:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.getLineHeight=P.getTextHeight=P.getTextLineSize=P.getOptimalTextRectangle=P.TEXTRECT_RATIO_EPS=P.textToParagraphs=P.textToWords=P.wordsByLines=P.LINE_HEIGHT=void 0;var f=b(8675),S=b(6353),T=b(4914),y=/\s/gm;function d(D,C,I){if(1===C.length)return C;for(var L=I(),N=L.words[" "].width,G=[],k=0,U=-1,B=0;B<C.length;B++){var K=C[B],J=L.words[K].width;-1===U||k+N+J>D?(U=G.push(K)-1,k=J):(k+=N+J,G[U]+=" "+K)}return G}function c(D){return D.split(y).filter(function(C){return C.length})}function s(D){return D.split("\n")}function u(D,C,I){var L=D<1?1/D:D,N=C<1?1/C:C,G=L/N;return(G<1?1/G:G)<=I?0:N>L?1:-1}function h(D,C,I,L){return g(x(D,C,I,!1),L)}function g(D,C){return[T.Data.byRange(D,C.from,C.to),D<=C.to]}function _(D,C){return c(D).reduce(function(I,L,N){var G=C.words[L];return I.width+=G.width,I.height=Math.max(I.height,G.height),N>0&&(I.width+=C.words[" "].width),I},new S.Size(0,0))}function x(D,C,I,L){var N=Array.isArray(D)?D:s(D);return!L||N.length&&(1!==N.length||N[0].length)?N.reduce(function(G,k){return G+d(C,c(k),function(){return I}).length},0)*w(I):w(I)}function w(D){return D.fontSize*P.LINE_HEIGHT}P.LINE_HEIGHT=1.05,P.wordsByLines=d,P.textToWords=c,P.textToParagraphs=s,P.TEXTRECT_RATIO_EPS=1.2,P.getOptimalTextRectangle=function(D,C,I,L,N,G,k,U,B,K){if(void 0===k&&(k=0),void 0===U&&(U=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE),void 0===B&&(B=0),void 0===K&&(K=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE),!D)return new S.Size(T.Data.byRange(N.width,k,U),T.Data.byRange(N.height,B,K));if(k>U||B>K)throw new Error("Min size cannot exceed max size");if(k===U&&B===K)return new S.Size(k,B);var J=L.measureWords(D,C,I),ie=s(D),re=Object.keys(J.words).reduce(function(Q,te){return Math.max(Q,J.words[te].width)},0),q=new f.Range(T.Data.byRange(Math.max(N.width,re),k,U),U),Y=new f.Range(T.Data.byRange(N.height,B,K),K);return re<=N.width&&x(ie,N.width,J,!1)<=N.height&&q.includes(N.width)&&Y.includes(N.height)?N:function(Q,te,pe,z,oe,ae){for(var ee,he,de=Q.reduce(function(fe,xe){return Math.max(fe,_(xe,te).width)},0),ue=new S.Size(0,0),be=new S.Size(0,0),ve=0,le=0,Ce=0;Ce<5;Ce++){if(0===Ce)be.width=g(de,z)[0];else{if(!(Math.abs(ve)>1))break;be.width=g(ue.width+ve,z)[0]}if(ee=h(Q,be.width,te,oe),be.height=ee[0],he=ee[1],0===Ce&&(le=(ue=be.clone()).width/ue.height/pe),0===Ce&&!he)break;var ye=be.width/be.height,ge=ye/pe;if(0===Ce)ve=(be.width/ge-be.width)/2;else if(he){if(!u(pe,ye,P.TEXTRECT_RATIO_EPS)){ue=be.clone(),le=ge;break}if(!(u(le,ge,1)<0))break;ue=be.clone(),le=ge,ve=(be.width/ge-be.width)/2,ge<1&&(ve/=2)}else ve/=2}return ae&&(ue.height=T.Data.byRange(ue.width/pe,ue.height,oe.to)),ue}(ie,J,N.width/N.height,q,Y,G)},P.getTextLineSize=_,P.getTextHeight=x,P.getLineHeight=w},6734:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ViewController=void 0;var f=b(7156),S=Math.log(.05),T=Math.log(3),y=a(1),d=[f.DiagramCommand.ZoomLevel,f.DiagramCommand.ZoomLevelInPercentage,f.DiagramCommand.Zoom100,f.DiagramCommand.Zoom125,f.DiagramCommand.Zoom200,f.DiagramCommand.Zoom25,f.DiagramCommand.Zoom50,f.DiagramCommand.Zoom75],c=[f.DiagramCommand.SwitchAutoZoom,f.DiagramCommand.ToggleAutoZoom,f.DiagramCommand.AutoZoomToContent,f.DiagramCommand.AutoZoomToWidth],s=function(){function u(h,g){this.settings=h,this.bars=g,h.onZoomChanged.add(this),this.autoZoom=h.autoZoom}return u.prototype.initialize=function(h){this.view=h,this.view.onViewChanged.add(this)},u.prototype.scrollTo=function(h,g){this.view&&this.view.setScrollTo(h,g)},u.prototype.scrollBy=function(h){return!this.view||0===h.x&&0===h.y?h:this.view.scrollBy(h)},u.prototype.scrollIntoView=function(h){this.view&&this.view.scrollIntoView(h)},u.prototype.normalize=function(){this.view.tryNormalizePaddings()},u.prototype.getNextStepZoom=function(h){var g=this.getNearestCurrentZoomStep(),x=Math.min(39,Math.max(0,g+(h?1:-1)));return x!==y?Math.exp(S+(T-S)*x/39):1},u.prototype.getNearestCurrentZoomStep=function(){return a(this.getZoom())},u.prototype.getZoom=function(){return this.view?this.view.actualZoom:this.settings.zoomLevel},u.prototype.resetScroll=function(){this.view.adjust({horizontal:!0,vertical:!0})},u.prototype.notifyViewAdjusted=function(h){},u.prototype.notifyActualZoomChanged=function(h){this.bars.updateItemsState(d)},u.prototype.notifyZoomChanged=function(h,g){this.autoZoom!==g&&(this.autoZoom=g,this.bars.updateItemsState(c))},u}();function a(u){var h=Math.log(u);return Math.round(39*(h-S)/(T-S))}P.ViewController=s},3607:(o,P,b)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DiagramModelOperation=P.Diagnostics=P.RenderHelper=P.DiagramLocalizationService=P.NativeConnector=P.NativeShape=P.ShapeType=P.ColorUtils=P.PageOrientation=P.ConnectorPosition=P.ConnectorLineOption=P.ConnectorLineEnding=P.AutoZoomMode=P.Browser=P.UnitConverter=P.EventDispatcher=P.DataLayoutOrientation=P.DataLayoutType=P.ShapeCategories=P.ShapeTypes=P.DiagramUnit=P.default=P.DiagramControl=P.DiagramCommand=P.Point=P.Size=void 0;var f=b(7156);Object.defineProperty(P,"DiagramCommand",{enumerable:!0,get:function(){return f.DiagramCommand}});var S=b(2106);Object.defineProperty(P,"DiagramControl",{enumerable:!0,get:function(){return S.DiagramControl}}),Object.defineProperty(P,"default",{enumerable:!0,get:function(){return S.DiagramControl}});var T=b(6353);Object.defineProperty(P,"Size",{enumerable:!0,get:function(){return T.Size}});var y=b(8900);Object.defineProperty(P,"Point",{enumerable:!0,get:function(){return y.Point}});var d=b(8675);Object.defineProperty(P,"EventDispatcher",{enumerable:!0,get:function(){return d.EventDispatcher}});var c=b(2259);Object.defineProperty(P,"ShapeTypes",{enumerable:!0,get:function(){return c.ShapeTypes}}),Object.defineProperty(P,"ShapeCategories",{enumerable:!0,get:function(){return c.ShapeCategories}}),Object.defineProperty(P,"ShapeType",{enumerable:!0,get:function(){return c.ShapeType}});var s=b(9291);Object.defineProperty(P,"UnitConverter",{enumerable:!0,get:function(){return s.UnitConverter}});var a=b(9279);Object.defineProperty(P,"Browser",{enumerable:!0,get:function(){return a.Browser}});var u=b(240);Object.defineProperty(P,"AutoZoomMode",{enumerable:!0,get:function(){return u.AutoZoomMode}});var h=b(3503);Object.defineProperty(P,"DataLayoutType",{enumerable:!0,get:function(){return h.DataLayoutType}});var g=b(8710);Object.defineProperty(P,"DataLayoutOrientation",{enumerable:!0,get:function(){return g.DataLayoutOrientation}}),b(8721);var _=b(4612);Object.defineProperty(P,"ConnectorLineEnding",{enumerable:!0,get:function(){return _.ConnectorLineEnding}}),Object.defineProperty(P,"ConnectorLineOption",{enumerable:!0,get:function(){return _.ConnectorLineOption}});var x=b(13);Object.defineProperty(P,"ColorUtils",{enumerable:!0,get:function(){return x.ColorUtils}});var w=b(9463);Object.defineProperty(P,"Diagnostics",{enumerable:!0,get:function(){return w.Diagnostics}});var D=b(7185);Object.defineProperty(P,"NativeShape",{enumerable:!0,get:function(){return D.NativeShape}}),Object.defineProperty(P,"NativeConnector",{enumerable:!0,get:function(){return D.NativeConnector}});var C=b(6224);Object.defineProperty(P,"DiagramLocalizationService",{enumerable:!0,get:function(){return C.DiagramLocalizationService}});var I=b(1114);Object.defineProperty(P,"RenderHelper",{enumerable:!0,get:function(){return I.RenderHelper}});var L=b(5383);Object.defineProperty(P,"DiagramUnit",{enumerable:!0,get:function(){return L.DiagramUnit}}),Object.defineProperty(P,"PageOrientation",{enumerable:!0,get:function(){return L.PageOrientation}});var N=b(6879);Object.defineProperty(P,"DiagramModelOperation",{enumerable:!0,get:function(){return N.DiagramModelOperation}});var G=b(7959);Object.defineProperty(P,"ConnectorPosition",{enumerable:!0,get:function(){return G.ConnectorPosition}})},655:(o,P,b)=>{b.r(P),b.d(P,{__assign:()=>T,__asyncDelegator:()=>N,__asyncGenerator:()=>L,__asyncValues:()=>G,__await:()=>I,__awaiter:()=>a,__classPrivateFieldGet:()=>J,__classPrivateFieldSet:()=>ie,__createBinding:()=>h,__decorate:()=>d,__exportStar:()=>g,__extends:()=>S,__generator:()=>u,__importDefault:()=>K,__importStar:()=>B,__makeTemplateObject:()=>k,__metadata:()=>s,__param:()=>c,__read:()=>x,__rest:()=>y,__spread:()=>w,__spreadArray:()=>C,__spreadArrays:()=>D,__values:()=>_});var f=function(re,q){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,Z){Y.__proto__=Z}||function(Y,Z){for(var Q in Z)Object.prototype.hasOwnProperty.call(Z,Q)&&(Y[Q]=Z[Q])})(re,q)};function S(re,q){if("function"!=typeof q&&null!==q)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");function Y(){this.constructor=re}f(re,q),re.prototype=null===q?Object.create(q):(Y.prototype=q.prototype,new Y)}var T=function(){return T=Object.assign||function(re){for(var q,Y=1,Z=arguments.length;Y<Z;Y++)for(var Q in q=arguments[Y])Object.prototype.hasOwnProperty.call(q,Q)&&(re[Q]=q[Q]);return re},T.apply(this,arguments)};function y(re,q){var Y={};for(var Z in re)Object.prototype.hasOwnProperty.call(re,Z)&&q.indexOf(Z)<0&&(Y[Z]=re[Z]);if(null!=re&&"function"==typeof Object.getOwnPropertySymbols){var Q=0;for(Z=Object.getOwnPropertySymbols(re);Q<Z.length;Q++)q.indexOf(Z[Q])<0&&Object.prototype.propertyIsEnumerable.call(re,Z[Q])&&(Y[Z[Q]]=re[Z[Q]])}return Y}function d(re,q,Y,Z){var Q,te=arguments.length,pe=te<3?q:null===Z?Z=Object.getOwnPropertyDescriptor(q,Y):Z;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)pe=Reflect.decorate(re,q,Y,Z);else for(var z=re.length-1;z>=0;z--)(Q=re[z])&&(pe=(te<3?Q(pe):te>3?Q(q,Y,pe):Q(q,Y))||pe);return te>3&&pe&&Object.defineProperty(q,Y,pe),pe}function c(re,q){return function(Y,Z){q(Y,Z,re)}}function s(re,q){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(re,q)}function a(re,q,Y,Z){return new(Y||(Y=Promise))(function(Q,te){function pe(ae){try{oe(Z.next(ae))}catch(ee){te(ee)}}function z(ae){try{oe(Z.throw(ae))}catch(ee){te(ee)}}function oe(ae){var ee;ae.done?Q(ae.value):(ee=ae.value,ee instanceof Y?ee:new Y(function(he){he(ee)})).then(pe,z)}oe((Z=Z.apply(re,q||[])).next())})}function u(re,q){var Y,Z,Q,te,pe={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return te={next:z(0),throw:z(1),return:z(2)},"function"==typeof Symbol&&(te[Symbol.iterator]=function(){return this}),te;function z(oe){return function(ae){return function(ee){if(Y)throw new TypeError("Generator is already executing.");for(;pe;)try{if(Y=1,Z&&(Q=2&ee[0]?Z.return:ee[0]?Z.throw||((Q=Z.return)&&Q.call(Z),0):Z.next)&&!(Q=Q.call(Z,ee[1])).done)return Q;switch(Z=0,Q&&(ee=[2&ee[0],Q.value]),ee[0]){case 0:case 1:Q=ee;break;case 4:return pe.label++,{value:ee[1],done:!1};case 5:pe.label++,Z=ee[1],ee=[0];continue;case 7:ee=pe.ops.pop(),pe.trys.pop();continue;default:if(!((Q=(Q=pe.trys).length>0&&Q[Q.length-1])||6!==ee[0]&&2!==ee[0])){pe=0;continue}if(3===ee[0]&&(!Q||ee[1]>Q[0]&&ee[1]<Q[3])){pe.label=ee[1];break}if(6===ee[0]&&pe.label<Q[1]){pe.label=Q[1],Q=ee;break}if(Q&&pe.label<Q[2]){pe.label=Q[2],pe.ops.push(ee);break}Q[2]&&pe.ops.pop(),pe.trys.pop();continue}ee=q.call(re,pe)}catch(he){ee=[6,he],Z=0}finally{Y=Q=0}if(5&ee[0])throw ee[1];return{value:ee[0]?ee[1]:void 0,done:!0}}([oe,ae])}}}var h=Object.create?function(re,q,Y,Z){void 0===Z&&(Z=Y),Object.defineProperty(re,Z,{enumerable:!0,get:function(){return q[Y]}})}:function(re,q,Y,Z){void 0===Z&&(Z=Y),re[Z]=q[Y]};function g(re,q){for(var Y in re)"default"===Y||Object.prototype.hasOwnProperty.call(q,Y)||h(q,re,Y)}function _(re){var q="function"==typeof Symbol&&Symbol.iterator,Y=q&&re[q],Z=0;if(Y)return Y.call(re);if(re&&"number"==typeof re.length)return{next:function(){return re&&Z>=re.length&&(re=void 0),{value:re&&re[Z++],done:!re}}};throw new TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(re,q){var Y="function"==typeof Symbol&&re[Symbol.iterator];if(!Y)return re;var Z,Q,te=Y.call(re),pe=[];try{for(;(void 0===q||q-- >0)&&!(Z=te.next()).done;)pe.push(Z.value)}catch(z){Q={error:z}}finally{try{Z&&!Z.done&&(Y=te.return)&&Y.call(te)}finally{if(Q)throw Q.error}}return pe}function w(){for(var re=[],q=0;q<arguments.length;q++)re=re.concat(x(arguments[q]));return re}function D(){for(var re=0,q=0,Y=arguments.length;q<Y;q++)re+=arguments[q].length;var Z=Array(re),Q=0;for(q=0;q<Y;q++)for(var te=arguments[q],pe=0,z=te.length;pe<z;pe++,Q++)Z[Q]=te[pe];return Z}function C(re,q,Y){if(Y||2===arguments.length)for(var Z,Q=0,te=q.length;Q<te;Q++)!Z&&Q in q||(Z||(Z=Array.prototype.slice.call(q,0,Q)),Z[Q]=q[Q]);return re.concat(Z||Array.prototype.slice.call(q))}function I(re){return this instanceof I?(this.v=re,this):new I(re)}function L(re,q,Y){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Z,Q=Y.apply(re,q||[]),te=[];return Z={},pe("next"),pe("throw"),pe("return"),Z[Symbol.asyncIterator]=function(){return this},Z;function pe(he){Q[he]&&(Z[he]=function(de){return new Promise(function(ue,be){te.push([he,de,ue,be])>1||z(he,de)})})}function z(he,de){try{(ue=Q[he](de)).value instanceof I?Promise.resolve(ue.value.v).then(oe,ae):ee(te[0][2],ue)}catch(be){ee(te[0][3],be)}var ue}function oe(he){z("next",he)}function ae(he){z("throw",he)}function ee(he,de){he(de),te.shift(),te.length&&z(te[0][0],te[0][1])}}function N(re){var q,Y;return q={},Z("next"),Z("throw",function(Q){throw Q}),Z("return"),q[Symbol.iterator]=function(){return this},q;function Z(Q,te){q[Q]=re[Q]?function(pe){return(Y=!Y)?{value:I(re[Q](pe)),done:"return"===Q}:te?te(pe):pe}:te}}function G(re){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var q,Y=re[Symbol.asyncIterator];return Y?Y.call(re):(re=_(re),q={},Z("next"),Z("throw"),Z("return"),q[Symbol.asyncIterator]=function(){return this},q);function Z(Q){q[Q]=re[Q]&&function(te){return new Promise(function(pe,z){var oe,ae,ee;oe=pe,ae=z,ee=(te=re[Q](te)).done,Promise.resolve(te.value).then(function(de){oe({value:de,done:ee})},ae)})}}}function k(re,q){return Object.defineProperty?Object.defineProperty(re,"raw",{value:q}):re.raw=q,re}var U=Object.create?function(re,q){Object.defineProperty(re,"default",{enumerable:!0,value:q})}:function(re,q){re.default=q};function B(re){if(re&&re.__esModule)return re;var q={};if(null!=re)for(var Y in re)"default"!==Y&&Object.prototype.hasOwnProperty.call(re,Y)&&h(q,re,Y);return U(q,re),q}function K(re){return re&&re.__esModule?re:{default:re}}function J(re,q,Y,Z){if("a"===Y&&!Z)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof q?re!==q||!Z:!q.has(re))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===Y?Z:"a"===Y?Z.call(re):Z?Z.value:q.get(re)}function ie(re,q,Y,Z,Q){if("m"===Z)throw new TypeError("Private method is not writable");if("a"===Z&&!Q)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof q?re!==q||!Q:!q.has(re))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===Z?Q.call(re,Y):Q?Q.value=Y:q.set(re,Y),Y}}},M={};function W(o){var P=M[o];if(void 0!==P)return P.exports;var b=M[o]={exports:{}};return Ze[o].call(b.exports,b,b.exports,W),b.exports}return W.d=(o,P)=>{for(var b in P)W.o(P,b)&&!W.o(o,b)&&Object.defineProperty(o,b,{enumerable:!0,get:P[b]})},W.o=(o,P)=>Object.prototype.hasOwnProperty.call(o,P),W.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},W(3607)})(),In.exports=M()},2499:function(In){var M;M=()=>(()=>{"use strict";var Ze={9279:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Browser=void 0;var f=function(){function S(){}return S.IdentUserAgent=function(T,y){void 0===y&&(y=!1);var d=["Mozilla","IE","Firefox","Netscape","Safari","Chrome","Opera","Opera10","Edge"],c="IE",s="Win",a={Safari:2,Chrome:.1,Mozilla:1.9,Netscape:8,Firefox:2,Opera:9,IE:6,Edge:12};if(T&&0!==T.length){T=T.toLowerCase(),S.indentPlatformMajorVersion(T);try{for(var u={Windows:"Win",Macintosh:"Mac","Mac OS":"Mac",Mac_PowerPC:"Mac","cpu os":"MacMobile","cpu iphone os":"MacMobile",Android:"Android","!Windows Phone":"WinPhone","!WPDesktop":"WinPhone","!ZuneWP":"WinPhone"},h="(?:/|\\s*)?",g="(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?",_="(?:"+g+")?",x={Safari:"applewebkit(?:.*?(?:version/"+g+"[\\.\\w\\d]*?(?:\\s+mobile/\\S*)?\\s+safari))?",Chrome:"(?:chrome|crios)(?!frame)"+h+_,Mozilla:"mozilla(?:.*rv:"+_+".*Gecko)?",Netscape:"(?:netscape|navigator)\\d*/?\\s*"+_,Firefox:"firefox"+h+_,Opera:"(?:opera|\\sopr)"+h+_,Opera10:"opera.*\\s*version"+h+_,IE:"msie\\s*"+_,Edge:"edge"+h+_},w=null,D=-1,C=0;C<d.length;C++){var I=d[C],L=new RegExp(x[I],"i").exec(T);if(L&&L.index>=0){if("IE"===w&&D>=11&&"Safari"===I)continue;"Opera10"===(w=I)&&(w="Opera"),D=S.GetBrowserVersion(T,L,"trident"+h+_,S.getIECompatibleVersionString()),"Mozilla"===w&&D>=11&&(w="IE")}}w||(w=c);var G=-1!==D;G||(D=a[w]);var k=null,U=Number.MAX_VALUE;for(var B in u)if(Object.prototype.hasOwnProperty.call(u,B)){var K="!"===B.substr(0,1),J=T.indexOf((K?B.substr(1):B).toLowerCase());J>=0&&(J<U||K)&&(U=K?0:J,k=u[B])}var ie=T.toUpperCase().match("SM-[A-Z]"),re=ie&&ie.length>0;"WinPhone"===k&&D<9&&(D=Math.floor(S.getVersionFromTrident(T,"trident"+h+_))),!y&&"IE"===w&&D>7&&document.documentMode<D&&(D=document.documentMode),"WinPhone"===k&&(D=Math.max(9,D)),k||(k=s),k!==u["cpu os"]||G||(D=4),S.fillUserAgentInfo(d,w,D,k,re)}catch{S.fillUserAgentInfo(d,c,a[c],s)}}else S.fillUserAgentInfo(d,c,a[c],s)},S.GetBrowserVersion=function(T,y,d,c){var s=S.getVersionFromMatches(y);if(c){var a=S.getVersionFromTrident(T,d);if("edge"===c||parseInt(c)===a)return a}return s},S.getIECompatibleVersionString=function(){if(document.compatible)for(var T=0;T<document.compatible.length;T++)if("IE"===document.compatible[T].userAgent&&document.compatible[T].version)return document.compatible[T].version.toLowerCase();return""},S.isTouchEnabled=function(){return S.hasTouchStart()||S.hasMaxTouchPoints()||S.hasMsMaxTouchPoints()},S.hasTouchStart=function(){return"ontouchstart"in window},S.hasMaxTouchPoints=function(){return navigator.maxTouchPoints>0},S.hasMsMaxTouchPoints=function(){return navigator.msMaxTouchPoints>0},S.hasNavigator=function(){return typeof navigator<"u"},S.fillUserAgentInfo=function(T,y,d,c,s){void 0===s&&(s=!1);for(var a=0;a<T.length;a++){var u=T[a];S[u]=u===y}S.Version=Math.floor(10*d)/10,S.MajorVersion=Math.floor(S.Version),S.WindowsPlatform="Win"===c||"WinPhone"===c,S.MacOSMobilePlatform="MacMobile"===c||"Mac"===c&&S.isTouchEnabled(),S.MacOSPlatform="Mac"===c&&!S.MacOSMobilePlatform,S.AndroidMobilePlatform="Android"===c,S.WindowsPhonePlatform="WinPhone"===c,S.WebKitFamily=S.Safari||S.Chrome||S.Opera&&S.MajorVersion>=15,S.NetscapeFamily=S.Netscape||S.Mozilla||S.Firefox,S.WebKitTouchUI=S.MacOSMobilePlatform||S.AndroidMobilePlatform;var h=S.IE&&S.MajorVersion>9&&S.WindowsPlatform&&S.UserAgent.toLowerCase().indexOf("touch")>=0;if(S.MSTouchUI=h||S.Edge&&!!window.navigator.maxTouchPoints,S.TouchUI=S.WebKitTouchUI||S.MSTouchUI,S.MobileUI=S.WebKitTouchUI||S.WindowsPhonePlatform,S.AndroidDefaultBrowser=S.AndroidMobilePlatform&&!S.Chrome,S.AndroidChromeBrowser=S.AndroidMobilePlatform&&S.Chrome,s&&(S.SamsungAndroidDevice=s),S.MSTouchUI){var g=S.UserAgent.toLowerCase().indexOf("arm;")>-1;S.VirtualKeyboardSupported=g||S.WindowsPhonePlatform}else S.VirtualKeyboardSupported=S.WebKitTouchUI;S.fillDocumentElementBrowserTypeClassNames(T)},S.indentPlatformMajorVersion=function(T){var y=/(?:(?:windows nt|macintosh|mac os|cpu os|cpu iphone os|android|windows phone|linux) )(\d+)(?:[-0-9_.])*/.exec(T);y&&(S.PlaformMajorVersion=y[1])},S.getVersionFromMatches=function(T){var y=-1,d="";return T&&(T[1]&&(d+=T[1],T[2]&&(d+="."+T[2])),""!==d&&(y=parseFloat(d),isNaN(y)&&(y=-1))),y},S.getVersionFromTrident=function(T,y){var d=new RegExp(y,"i").exec(T);return S.getVersionFromMatches(d)+4},S.fillDocumentElementBrowserTypeClassNames=function(T){for(var y="",d=T.concat(["WindowsPlatform","MacOSPlatform","MacOSMobilePlatform","AndroidMobilePlatform","WindowsPhonePlatform","WebKitFamily","WebKitTouchUI","MSTouchUI","TouchUI","AndroidDefaultBrowser"]),c=0;c<d.length;c++){var s=d[c];S[s]&&(y+="dx"+s+" ")}y+="dxBrowserVersion-"+S.MajorVersion,typeof document<"u"&&document&&document.documentElement&&(""!==document.documentElement.className&&(y=" "+y),document.documentElement.className+=y,S.Info=y)},S.getUserAgent=function(){return S.hasNavigator()&&navigator.userAgent?navigator.userAgent.toLowerCase():""},S.UserAgent=S.getUserAgent(),S._foo=S.IdentUserAgent(S.UserAgent),S}();b.Browser=f},6799:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ExtendedMinMax=b.ExtendedMax=b.ExtendedMin=b.MinMaxNumber=b.MinMax=void 0;var S=f(655),T=function(a,u){this.minElement=a,this.maxElement=u};b.MinMax=T;var y=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S.__extends(u,a),Object.defineProperty(u.prototype,"length",{get:function(){return this.maxElement-this.minElement},enumerable:!1,configurable:!0}),u}(T);b.MinMaxNumber=y,b.ExtendedMin=function(a,u){this.minElement=a,this.minValue=u},b.ExtendedMax=function(a,u){this.maxElement=a,this.maxValue=u};var s=function(a){function u(h,g,_,x){var w=a.call(this,h,_)||this;return w.minValue=g,w.maxValue=x,w}return S.__extends(u,a),u}(T);b.ExtendedMinMax=s},3604:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Margins=void 0;var S=f(655),T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S.__extends(d,y),d.empty=function(){return new d(0,0,0,0)},d.prototype.clone=function(){return new d(this.left,this.right,this.top,this.bottom)},d}(f(4125).Offsets);b.Margins=T},5596:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Metrics=void 0;var f=function(){function S(){}return S.euclideanDistance=function(T,y){var d=T.x-y.x,c=T.y-y.y;return Math.sqrt(d*d+c*c)},S.manhattanDistance=function(T,y){return Math.abs(T.x-y.x)+Math.abs(T.y-y.y)},S}();b.Metrics=f},4125:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Offsets=void 0;var f=function(){function S(T,y,d,c){this.left=T,this.right=y,this.top=d,this.bottom=c}return S.empty=function(){return new S(0,0,0,0)},Object.defineProperty(S.prototype,"horizontal",{get:function(){return this.left+this.right},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"vertical",{get:function(){return this.top+this.bottom},enumerable:!1,configurable:!0}),S.fromNumber=function(T){return new S(T,T,T,T)},S.fromOffsets=function(T){return new S(T.left,T.right,T.top,T.bottom)},S.fromSide=function(T,y){return new S(T,T,y,y)},S.prototype.normalize=function(){return this.left=Math.max(0,this.left),this.right=Math.max(0,this.right),this.top=Math.max(0,this.top),this.bottom=Math.max(0,this.bottom),this},S.prototype.toString=function(){return JSON.stringify(this)},S.prototype.isEmpty=function(){return 0===this.left&&0===this.right&&0===this.top&&0===this.bottom},S.prototype.offset=function(T){return this.left+=T.left,this.right+=T.right,this.top+=T.top,this.bottom+=T.bottom,this},S.prototype.multiply=function(T,y,d,c){switch(arguments.length){case 1:return this.left*=T,this.right*=T,this.top*=T,this.bottom*=T,this;case 2:return this.left*=T,this.right*=T,this.top*=y,this.bottom*=y,this;case 4:return this.left*=T,this.right*=y,this.top*=d,this.bottom*=c,this}return this},S.prototype.clone=function(){return new S(this.left,this.right,this.top,this.bottom)},S.prototype.copyFrom=function(T){this.left=T.left,this.right=T.right,this.top=T.top,this.bottom=T.bottom},S.prototype.equals=function(T){return this.top===T.top&&this.bottom===T.bottom&&this.right===T.right&&this.left===T.left},S.prototype.applyConverter=function(T){return this.left=T(this.left),this.right=T(this.right),this.top=T(this.top),this.bottom=T(this.bottom),this},S}();b.Offsets=f},8900:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=function(){function S(T,y){this.x=T,this.y=y}return S.zero=function(){return new S(0,0)},S.fromNumber=function(T){return new S(T,T)},S.prototype.isZero=function(){return 0===this.x&&0===this.y},S.prototype.toString=function(){return JSON.stringify(this)},S.prototype.copyFrom=function(T){this.x=T.x,this.y=T.y},S.prototype.clone=function(){return new S(this.x,this.y)},S.prototype.equals=function(T){return this.x===T.x&&this.y===T.y},S.prototype.offset=function(T,y){return this.x+=T,this.y+=y,this},S.prototype.offsetByPoint=function(T){return this.x+=T.x,this.y+=T.y,this},S.prototype.multiply=function(T,y){return this.x*=T,this.y*=y,this},S.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},S.prototype.applyConverter=function(T){return this.x=T(this.x),this.y=T(this.y),this},S.plus=function(T,y){return new S(T.x+y.x,T.y+y.y)},S.minus=function(T,y){return new S(T.x-y.x,T.y-y.y)},S.xComparer=function(T,y){return T.x-y.x},S.yComparer=function(T,y){return T.y-y.y},S.equals=function(T,y){return T.x===y.x&&T.y===y.y},S}();b.Point=f},6353:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Size=void 0;var f=function(){function S(T,y){this.width=T,this.height=y}return S.empty=function(){return new S(0,0)},S.fromNumber=function(T){return new S(T,T)},S.initByCommonAction=function(T){var y=function(c){return c.width},d=function(c){return c.height};return new S(T(y,d),T(d,y))},S.prototype.isEmpty=function(){return 0===this.width&&0===this.height},S.prototype.toString=function(){return JSON.stringify(this)},S.prototype.nonNegativeSize=function(){return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this},S.prototype.offset=function(T,y){return this.width=this.width+T,this.height=this.height+y,this},S.prototype.multiply=function(T,y){return this.width*=T,this.height*=y,this},S.prototype.equals=function(T){return this.width===T.width&&this.height===T.height},S.prototype.clone=function(){return new S(this.width,this.height)},S.prototype.copyFrom=function(T){this.width=T.width,this.height=T.height},S.prototype.applyConverter=function(T){return this.width=T(this.width),this.height=T(this.height),this},S.equals=function(T,y){return T.width===y.width&&T.height===y.height},S}();b.Size=f},2217:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.AttrUtils=void 0;var S=f(9279),T=function(){function y(){}return y.setElementAttribute=function(d,c,s){d.setAttribute&&(S.Browser.IE&&S.Browser.MajorVersion>=11&&"src"===c.toLowerCase()&&d.setAttribute(c,""),d.setAttribute(c,s))},y.setStyleAttribute=function(d,c,s){d.setProperty&&d.setProperty(c,s,"")},y.getElementAttribute=function(d,c){return d.getAttribute(c)},y.getStyleAttribute=function(d,c){if(d.getPropertyValue){if(S.Browser.Firefox)try{return d.getPropertyValue(c)}catch{return d[c]}return d.getPropertyValue(c)}return null},y.removeElementAttribute=function(d,c){d.removeAttribute&&d.removeAttribute(c)},y.removeStyleAttribute=function(d,c){d.removeProperty&&d.removeProperty(c)},y.changeElementStyleAttribute=function(d,c,s){y.saveStyleAttributeInElement(d,c),y.setStyleAttribute(d.style,c,s)},y.restoreElementStyleAttribute=function(d,c){var s="dxwu_saved"+c,a=d.style;if(y.isExistsAttributeInElement(d,s)){var u=y.getElementAttribute(d,s);return u===y.emptyObject||null===u?y.removeStyleAttribute(a,c):y.setStyleAttribute(a,c,u),y.removeElementAttribute(d,s),!0}return!1},y.saveStyleAttributeInElement=function(d,c){var s="dxwu_saved"+c,a=d.style;if(!y.isExistsAttributeInElement(d,s)){var u=y.getStyleAttribute(a,c);y.setElementAttribute(d,s,y.isAttributeExists(u)?u:y.emptyObject)}},y.isExistsAttributeInElement=function(d,c){var s=y.getElementAttribute(d,c);return y.isAttributeExists(s)},y.isAttributeExists=function(d){return null!==d&&""!==d},y.emptyObject="DxEmptyValue",y}();b.AttrUtils=T},2491:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.numberToStringHex=b.numberToStringBin=b.isOdd=b.isEven=b.isNonNullString=b.isString=b.isNumber=b.boolToString=b.boolToInt=b.isDefined=void 0;var S=f(49);b.isDefined=function(T){return null!=T},b.boolToInt=function(T){return T?1:0},b.boolToString=function(T){return T?"1":"0"},b.isNumber=function(T){return"number"==typeof T},b.isString=function(T){return"string"==typeof T},b.isNonNullString=function(T){return!!T},b.isEven=function(T){return T%2!=0},b.isOdd=function(T){return T%2==0},b.numberToStringBin=function(T,y){return void 0===y&&(y=0),S.StringUtils.padLeft(T.toString(2),y,"0")},b.numberToStringHex=function(T,y){return void 0===y&&(y=0),S.StringUtils.padLeft(T.toString(16),y,"0")}},4170:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Equals=b.Comparers=void 0;var f=function(){function T(){}return T.number=function(y,d){return y-d},T.string=function(y,d){return y===d?0:y>d?1:-1},T.stringIgnoreCase=function(y,d){return(y=y.toLowerCase())===(d=d.toLowerCase())?0:y>d?1:-1},T}();b.Comparers=f;var S=function(){function T(){}return T.simpleType=function(y,d){return y===d},T.object=function(y,d){return y&&d&&(y===d||y.equals(d))},T}();b.Equals=S},6907:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DomUtils=void 0;var S=f(9279),T=f(2491),y=f(8679),d=f(49),c=function(){function u(){}return u.clearInnerHtml=function(h){for(;h.firstChild;)h.removeChild(h.firstChild)},u.setStylePosition=function(h,g){h.left=y.MathUtils.round(g.x,3)+"px",h.top=y.MathUtils.round(g.y,3)+"px"},u.setStyleSize=function(h,g){h.width=y.MathUtils.round(g.width,3)+"px",h.height=y.MathUtils.round(g.height,3)+"px"},u.setStyleSizeAndPosition=function(h,g){u.setStylePosition(h,g),u.setStyleSize(h,g)},u.hideNode=function(h){if(h){var g=h.parentNode;g&&g.removeChild(h)}},u.isHTMLElementNode=function(h){return h.nodeType===Node.ELEMENT_NODE},u.isTextNode=function(h){return h.nodeType===Node.TEXT_NODE},u.isElementNode=function(h){return h.nodeType===Node.ELEMENT_NODE},u.isHTMLTableRowElement=function(h){return"TR"===h.tagName},u.isItParent=function(h,g){if(!h||!g)return!1;for(;g;){if(g===h)return!0;if("BODY"===g.tagName)return!1;g=g.parentNode}return!1},u.getParentByTagName=function(h,g){for(g=g.toUpperCase();h;){if("BODY"===h.tagName)return null;if(h.tagName===g)return h;h=h.parentNode}return null},u.getDocumentScrollTop=function(){var h=S.Browser.IE&&"hidden"===u.getCurrentStyle(document.body).overflow&&document.body.scrollTop>0;return S.Browser.WebKitFamily||S.Browser.Edge||h?S.Browser.MacOSMobilePlatform?window.pageYOffset:S.Browser.WebKitFamily&&document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop},u.getDocumentScrollLeft=function(){var h=S.Browser.IE&&"hidden"===u.getCurrentStyle(document.body).overflow&&document.body.scrollLeft>0;return S.Browser.Edge||h?document.body?document.body.scrollLeft:document.documentElement.scrollLeft:S.Browser.WebKitFamily?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft},u.getCurrentStyle=function(h){if(h.currentStyle)return h.currentStyle;if(document.defaultView&&document.defaultView.getComputedStyle){var g=document.defaultView.getComputedStyle(h,null);if(!g&&S.Browser.Firefox&&window.frameElement){for(var _=[],x=window.frameElement;!(g=document.defaultView.getComputedStyle(h,null));)_.push([x,x.style.display]),x.style.setProperty("display","block","important"),x="BODY"===x.tagName?x.ownerDocument.defaultView.frameElement:x.parentNode;g=function(C){if("object"!=typeof C||!T.isDefined(C))return C;var I={};for(var L in C)I[L]=C[L];return I}(g);for(var w=void 0,D=0;w=_[D];D++)w[0].style.display=w[1];document}return g}return window.getComputedStyle(h,null)},u.setFocus=function(h){function g(){try{h.focus(),S.Browser.IE&&document.activeElement!==h&&h.focus()}catch{}}S.Browser.MacOSMobilePlatform?g():setTimeout(function(){g()},100)},u.hasClassName=function(h,g){try{var _=g.split(" "),x=h.classList;if(x){for(var w=_.length-1;w>=0;w--)if(!x.contains(_[w]))return!1}else{var D=h.getAttribute&&h.getAttribute("class");if(!D)return!1;var C=D.split(" ");for(w=_.length-1;w>=0;w--)if(C.indexOf(_[w])<0)return!1}return!0}catch{return!1}},u.addClassName=function(h,g){if(!u.hasClassName(h,g)){var _=h.getAttribute&&h.getAttribute("class");h.setAttribute("class",""===_?g:_+" "+g)}},u.removeClassName=function(h,g){var _=" "+(h.getAttribute&&h.getAttribute("class"))+" ",x=_.replace(" "+g+" "," ");_.length!==x.length&&h.setAttribute("class",d.StringUtils.trim(x))},u.toggleClassName=function(h,g,_){void 0===_?u.hasClassName(h,g)?u.removeClassName(h,g):u.addClassName(h,g):_?u.addClassName(h,g):u.removeClassName(h,g)},u.pxToInt=function(h){return s(h,parseInt)},u.pxToFloat=function(h){return s(h,parseFloat)},u.getAbsolutePositionY=function(h){function g(_){return Math.round(_.getBoundingClientRect().top+u.getDocumentScrollTop())}return h?S.Browser.IE?(_=h,S.Browser.IE&&null===_.parentNode?0:_.getBoundingClientRect().top+u.getDocumentScrollTop()):S.Browser.Firefox&&S.Browser.Version>=3?g(h):S.Browser.NetscapeFamily&&(!S.Browser.Firefox||S.Browser.Version<3)?function(_){for(var x=a(_,!1),w=!0;null!=_;){if(x+=_.offsetTop,w||null==_.offsetParent||(x-=_.scrollTop),!w&&S.Browser.Firefox){var D=u.getCurrentStyle(_);"DIV"===_.tagName&&"visible"!==D.overflow&&(x+=u.pxToInt(D.borderTopWidth))}w=!1,_=_.offsetParent}return x}(h):S.Browser.WebKitFamily||S.Browser.Edge?g(h):function(_){for(var x=0,w=!0;null!=_;)x+=_.offsetTop,w||null==_.offsetParent||(x-=_.scrollTop),w=!1,_=_.offsetParent;return x}(h):0;var _},u.getAbsolutePositionX=function(h){function g(_){return Math.round(_.getBoundingClientRect().left+u.getDocumentScrollLeft())}return h?S.Browser.IE?(_=h,S.Browser.IE&&null===_.parentNode?0:_.getBoundingClientRect().left+u.getDocumentScrollLeft()):S.Browser.Firefox&&S.Browser.Version>=3?g(h):S.Browser.Opera&&S.Browser.Version<=12?function(_){for(var x=!0,w=a(_,!0);null!=_;)w+=_.offsetLeft,x||(w-=_.scrollLeft),_=_.offsetParent,x=!1;return w+document.body.scrollLeft}(h):S.Browser.NetscapeFamily&&(!S.Browser.Firefox||S.Browser.Version<3)?function(_){for(var x=a(_,!0),w=!0;null!=_;){if(x+=_.offsetLeft,w||null==_.offsetParent||(x-=_.scrollLeft),!w&&S.Browser.Firefox){var D=u.getCurrentStyle(_);"DIV"===_.tagName&&"visible"!==D.overflow&&(x+=u.pxToInt(D.borderLeftWidth))}w=!1,_=_.offsetParent}return x}(h):S.Browser.WebKitFamily||S.Browser.Edge?g(h):function(_){for(var x=0,w=!0;null!=_;)x+=_.offsetLeft,w||null==_.offsetParent||(x-=_.scrollLeft),w=!1,_=_.offsetParent;return x}(h):0;var _},u.isInteractiveControl=function(h){return["A","INPUT","SELECT","OPTION","TEXTAREA","BUTTON","IFRAME"].indexOf(h.tagName)>-1},u.getClearClientHeight=function(h){return h.offsetHeight-(u.getTopBottomPaddings(h)+u.getVerticalBordersWidth(h))},u.getTopBottomPaddings=function(h,g){var _=g||u.getCurrentStyle(h);return u.pxToInt(_.paddingTop)+u.pxToInt(_.paddingBottom)},u.getVerticalBordersWidth=function(h,g){T.isDefined(g)||(g=S.Browser.IE&&9!==S.Browser.MajorVersion&&window.getComputedStyle?window.getComputedStyle(h):u.getCurrentStyle(h));var _=0;return"none"!==g.borderTopStyle&&(_+=u.pxToFloat(g.borderTopWidth)),"none"!==g.borderBottomStyle&&(_+=u.pxToFloat(g.borderBottomWidth)),_},u.getNodes=function(h,g){for(var _=h.all||h.getElementsByTagName("*"),x=[],w=0;w<_.length;w++){var D=_[w];g(D)&&x.push(D)}return x},u.getChildNodes=function(h,g){for(var _=h.childNodes,x=[],w=0;w<_.length;w++){var D=_[w];g(D)&&x.push(D)}return x},u.getNodesByClassName=function(h,g){if(h.querySelectorAll){var _=h.querySelectorAll("."+g),x=[];return _.forEach(function(w){return x.push(w)}),x}return u.getNodes(h,function(w){return u.hasClassName(w,g)})},u.getChildNodesByClassName=function(h,g){return h.querySelectorAll?function(_,x){for(var w=[],D=0;D<_.length;D++){var C=_[D];x(C)&&w.push(C)}return w}(h.querySelectorAll("."+g),function(_){return _.parentNode===h}):u.getChildNodes(h,function(_){return!!u.isElementNode(_)&&T.isNonNullString(_.className)&&u.hasClassName(_,_.className)})},u.getVerticalScrollBarWidth=function(){if(void 0===u.verticalScrollBarWidth){var h=document.createElement("DIV");h.style.cssText="position: absolute; top: 0px; left: 0px; visibility: hidden; width: 200px; height: 150px; overflow: hidden; box-sizing: content-box",document.body.appendChild(h);var g=document.createElement("P");h.appendChild(g),g.style.cssText="width: 100%; height: 200px;";var _=g.offsetWidth;h.style.overflow="scroll";var x=g.offsetWidth;_===x&&(x=h.clientWidth),u.verticalScrollBarWidth=_-x,document.body.removeChild(h)}return u.verticalScrollBarWidth},u.getHorizontalBordersWidth=function(h,g){T.isDefined(g)||(g=S.Browser.IE&&window.getComputedStyle?window.getComputedStyle(h):u.getCurrentStyle(h));var _=0;return"none"!==g.borderLeftStyle&&(_+=u.pxToFloat(g.borderLeftWidth)),"none"!==g.borderRightStyle&&(_+=u.pxToFloat(g.borderRightWidth)),_},u.getFontFamiliesFromCssString=function(h){return h.split(",").map(function(g){return d.StringUtils.trim(g.replace(/'|"/gi,""))})},u.getInnerText=function(h){if(S.Browser.Safari&&S.Browser.MajorVersion<=5){null===u.html2PlainTextFilter&&((u.html2PlainTextFilter=document.createElement("DIV")).style.width="0",u.html2PlainTextFilter.style.height="0",u.html2PlainTextFilter.style.overflow="visible",u.html2PlainTextFilter.style.display="none",document.body.appendChild(u.html2PlainTextFilter));var g=u.html2PlainTextFilter;g.innerHTML=h.innerHTML,g.style.display="";var _=g.innerText;return g.style.display="none",_}return S.Browser.NetscapeFamily||S.Browser.WebKitFamily||S.Browser.IE&&S.Browser.Version>=9||S.Browser.Edge?h.textContent:h.innerText},u.html2PlainTextFilter=null,u.verticalScrollBarWidth=void 0,u}();function s(u,h){var g=0;if(T.isDefined(u)&&""!==u)try{var _=u.indexOf("px");_>-1&&(g=h(u.substr(0,_)))}catch{}return g}function a(u,h){for(var g=0,_=!0;null!=u&&"BODY"!==u.tagName;){var x=c.getCurrentStyle(u);if("absolute"===x.position)break;_||"DIV"!==u.tagName||""!==x.position&&"static"!==x.position||(g-=h?u.scrollLeft:u.scrollTop),u=u.parentNode,_=!1}return g}b.DomUtils=c},9712:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EncodeUtils=void 0;var f=function(){function S(){}return S.encodeHtml=function(T){return T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},S.decodeHtml=function(T){return T.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},S.prepareTextForRequest=function(T){return T.replace(/%/g,"%25").replace(/&/g,"%26amp;").replace(/\+/g,"%2B").replace(/</g,"%26lt;").replace(/>/g,"%26gt;").replace(/"/g,"%26quot;")},S.prepareTextForCallBackRequest=function(T){return T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},S.decodeViaTextArea=function(T){var y=document.createElement("TEXTAREA");return y.innerHTML=T,y.value},S}();b.EncodeUtils=f},3714:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EvtUtils=void 0;var S=f(9279),T=f(2491),y=f(6907),d=f(1632),c=function(){function s(){}return s.preventEvent=function(a){a.cancelable&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},s.getEventSource=function(a){return T.isDefined(a)?s.getEventSourceCore(a):null},s.getEventSourceByPosition=function(a){if(!T.isDefined(a))return null;if(!document.elementFromPoint)return s.getEventSourceCore(a);var u=s.getEventX(a)-(s.clientEventRequiresDocScrollCorrection()?y.DomUtils.getDocumentScrollLeft():0),h=s.getEventY(a)-(s.clientEventRequiresDocScrollCorrection()?y.DomUtils.getDocumentScrollTop():0);return void 0===u||void 0===h?s.getEventSourceCore(a):document.elementFromPoint(u,h)},s.getEventSourceCore=function(a){return a.srcElement?a.srcElement:a.target},s.getMouseWheelEventName=function(){return S.Browser.Safari?"mousewheel":S.Browser.NetscapeFamily&&S.Browser.MajorVersion<17?"DOMMouseScroll":"wheel"},s.isLeftButtonPressed=function(a){return!!d.TouchUtils.isTouchEvent(a)||!!(a=S.Browser.IE&&T.isDefined(event)?event:a)&&(S.Browser.IE&&S.Browser.Version<11?!!S.Browser.MSTouchUI||a.button%2==1:S.Browser.WebKitFamily?"pointermove"===a.type||"pointerenter"===a.type||"pointerleave"===a.type?1===a.buttons:1===a.which:S.Browser.NetscapeFamily||S.Browser.Edge||S.Browser.IE&&S.Browser.Version>=11?s.isMoveEventName(a.type)?1===a.buttons:1===a.which:!S.Browser.Opera||0===a.button)},s.isMoveEventName=function(a){return a===d.TouchUtils.touchMouseMoveEventName||a===s.getMoveEventName()},s.getMoveEventName=function(){return window.PointerEvent?"pointermove":S.Browser.TouchUI?"touchmove":"mousemove"},s.preventEventAndBubble=function(a){s.preventEvent(a),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},s.clientEventRequiresDocScrollCorrection=function(){return S.Browser.AndroidDefaultBrowser||S.Browser.AndroidChromeBrowser||!(S.Browser.Safari&&S.Browser.Version<3||S.Browser.MacOSMobilePlatform&&S.Browser.Version<5.1)},s.getEventX=function(a){return d.TouchUtils.isTouchEvent(a)?d.TouchUtils.getEventX(a):a.clientX+(s.clientEventRequiresDocScrollCorrection()?y.DomUtils.getDocumentScrollLeft():0)},s.getEventY=function(a){return d.TouchUtils.isTouchEvent(a)?d.TouchUtils.getEventY(a):a.clientY+(s.clientEventRequiresDocScrollCorrection()?y.DomUtils.getDocumentScrollTop():0)},s.cancelBubble=function(a){a.cancelBubble=!0},s.getWheelDelta=function(a){var u;return u=S.Browser.NetscapeFamily&&S.Browser.MajorVersion<17?-a.detail:S.Browser.Safari?a.wheelDelta:-a.deltaY,S.Browser.Opera&&S.Browser.Version<9&&(u=-u),u},s}();b.EvtUtils=c},9937:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.JsonUtils=void 0;var f=function(){function S(){}return S.isValid=function(T){return!/[^,:{}[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(T.replace(/"(\\.|[^"\\])*"/g,""))},S}();b.JsonUtils=f},2153:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.KeyCode=b.ModifierKey=b.KeyUtils=void 0;var S,T,a,y=f(9279),d=f(9712),c=f(49),s=function(){function a(){}return a.getKeyModifiers=function(u){var h=0;return u.altKey&&(h|=S.Alt),u.ctrlKey&&(h|=S.Ctrl),u.shiftKey&&(h|=S.Shift),u.metaKey&&(h|=S.Meta),h},a.getShortcutCode=function(u,h,g,_,x){var w=u;return w|=h?S.Ctrl:0,w|=g?S.Shift:0,(w|=_?S.Alt:0)|(x?S.Meta:0)},a.getShortcutCodeByEvent=function(u){return a.getShortcutCode(a.getEventKeyCode(u),u.ctrlKey,u.shiftKey,u.altKey,!!y.Browser.MacOSPlatform&&u.metaKey)},a.getEventKeyCode=function(u){return y.Browser.NetscapeFamily||y.Browser.Opera?u.which:u.keyCode},a.parseShortcutString=function(u){if(!u)return 0;var h=!1,g=!1,_=!1,x=!1,w=null,D=u.toString().split("+");if(D.length>0)for(var C=0;C<D.length;C++){var I=c.StringUtils.trim(D[C].toUpperCase());switch(I){case"CONTROL":case"CONTROLKEY":case"CTRL":h=!0;break;case"SHIFT":case"SHIFTKEY":g=!0;break;case"ALT":_=!0;break;case"CMD":x=!0;break;case"F1":w=T.F1;break;case"F2":w=T.F2;break;case"F3":w=T.F3;break;case"F4":w=T.F4;break;case"F5":w=T.F5;break;case"F6":w=T.F6;break;case"F7":w=T.F7;break;case"F8":w=T.F8;break;case"F9":w=T.F9;break;case"F10":w=T.F10;break;case"F11":w=T.F11;break;case"F12":w=T.F12;break;case"RETURN":case"ENTER":w=T.Enter;break;case"HOME":w=T.Home;break;case"END":w=T.End;break;case"LEFT":w=T.Left;break;case"RIGHT":w=T.Right;break;case"UP":w=T.Up;break;case"DOWN":w=T.Down;break;case"PAGEUP":w=T.PageUp;break;case"PAGEDOWN":w=T.PageDown;break;case"SPACE":w=T.Space;break;case"TAB":w=T.Tab;break;case"BACKSPACE":case"BACK":w=T.Backspace;break;case"CONTEXT":w=T.ContextMenu;break;case"ESCAPE":case"ESC":w=T.Esc;break;case"DELETE":case"DEL":w=T.Delete;break;case"INSERT":case"INS":w=T.Insert;break;case"PLUS":w=43;break;default:w=I.charCodeAt(0)}}else alert(d.EncodeUtils.decodeViaTextArea("Invalid shortcut"));return a.getShortcutCode(w,h,g,_,x)},a}();b.KeyUtils=s,(a=S=b.ModifierKey||(b.ModifierKey={}))[a.None=0]="None",a[a.Ctrl=65536]="Ctrl",a[a.Shift=262144]="Shift",a[a.Alt=1048576]="Alt",a[a.Meta=16777216]="Meta",function(a){a[a.Backspace=8]="Backspace",a[a.Tab=9]="Tab",a[a.Enter=13]="Enter",a[a.Pause=19]="Pause",a[a.CapsLock=20]="CapsLock",a[a.Esc=27]="Esc",a[a.Space=32]="Space",a[a.PageUp=33]="PageUp",a[a.PageDown=34]="PageDown",a[a.End=35]="End",a[a.Home=36]="Home",a[a.Left=37]="Left",a[a.Up=38]="Up",a[a.Right=39]="Right",a[a.Down=40]="Down",a[a.Insert=45]="Insert",a[a.Delete=46]="Delete",a[a.Key_0=48]="Key_0",a[a.Key_1=49]="Key_1",a[a.Key_2=50]="Key_2",a[a.Key_3=51]="Key_3",a[a.Key_4=52]="Key_4",a[a.Key_5=53]="Key_5",a[a.Key_6=54]="Key_6",a[a.Key_7=55]="Key_7",a[a.Key_8=56]="Key_8",a[a.Key_9=57]="Key_9",a[a.Key_a=65]="Key_a",a[a.Key_b=66]="Key_b",a[a.Key_c=67]="Key_c",a[a.Key_d=68]="Key_d",a[a.Key_e=69]="Key_e",a[a.Key_f=70]="Key_f",a[a.Key_g=71]="Key_g",a[a.Key_h=72]="Key_h",a[a.Key_i=73]="Key_i",a[a.Key_j=74]="Key_j",a[a.Key_k=75]="Key_k",a[a.Key_l=76]="Key_l",a[a.Key_m=77]="Key_m",a[a.Key_n=78]="Key_n",a[a.Key_o=79]="Key_o",a[a.Key_p=80]="Key_p",a[a.Key_q=81]="Key_q",a[a.Key_r=82]="Key_r",a[a.Key_s=83]="Key_s",a[a.Key_t=84]="Key_t",a[a.Key_u=85]="Key_u",a[a.Key_v=86]="Key_v",a[a.Key_w=87]="Key_w",a[a.Key_x=88]="Key_x",a[a.Key_y=89]="Key_y",a[a.Key_z=90]="Key_z",a[a.Windows=91]="Windows",a[a.ContextMenu=93]="ContextMenu",a[a.Numpad_0=96]="Numpad_0",a[a.Numpad_1=97]="Numpad_1",a[a.Numpad_2=98]="Numpad_2",a[a.Numpad_3=99]="Numpad_3",a[a.Numpad_4=100]="Numpad_4",a[a.Numpad_5=101]="Numpad_5",a[a.Numpad_6=102]="Numpad_6",a[a.Numpad_7=103]="Numpad_7",a[a.Numpad_8=104]="Numpad_8",a[a.Numpad_9=105]="Numpad_9",a[a.Multiply=106]="Multiply",a[a.Add=107]="Add",a[a.Subtract=109]="Subtract",a[a.Decimal=110]="Decimal",a[a.Divide=111]="Divide",a[a.F1=112]="F1",a[a.F2=113]="F2",a[a.F3=114]="F3",a[a.F4=115]="F4",a[a.F5=116]="F5",a[a.F6=117]="F6",a[a.F7=118]="F7",a[a.F8=119]="F8",a[a.F9=120]="F9",a[a.F10=121]="F10",a[a.F11=122]="F11",a[a.F12=123]="F12",a[a.NumLock=144]="NumLock",a[a.ScrollLock=145]="ScrollLock",a[a.Semicolon=186]="Semicolon",a[a.Equals=187]="Equals",a[a.Comma=188]="Comma",a[a.Dash=189]="Dash",a[a.Period=190]="Period",a[a.ForwardSlash=191]="ForwardSlash",a[a.GraveAccent=192]="GraveAccent",a[a.OpenBracket=219]="OpenBracket",a[a.BackSlash=220]="BackSlash",a[a.CloseBracket=221]="CloseBracket",a[a.SingleQuote=222]="SingleQuote"}(T=b.KeyCode||(b.KeyCode={}))},2940:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ListUtils=void 0;var S=f(6799),T=f(4170),y=function(){function d(){}return d.remove=function(c,s){var a=c.indexOf(s,0);a>=0&&c.splice(a,1)},d.removeBy=function(c,s){for(var a=c.length,u=0;u<a;u++)if(s(c[u],u))return c.splice(u,1)[0];return null},d.shallowCopy=function(c){return c.slice()},d.deepCopy=function(c){return d.map(c,function(s){return s.clone()})},d.initByValue=function(c,s){for(var a=[];c>0;c--)a.push(s);return a},d.initByCallback=function(c,s){for(var a=[],u=0;u<c;u++)a.push(s(u));return a},d.forEachOnInterval=function(c,s){for(var a=c.end,u=c.start;u<a;u++)s(u)},d.reverseForEachOnInterval=function(c,s){for(var a=c.start,u=c.end-1;u>=a;u--)s(u)},d.reducedMap=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=[],g=a;g<u;g++){var _=s(c[g],g);null!==_&&h.push(_)}return h},d.filter=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=[],g=a;g<u;g++){var _=c[g];s(_,g)&&h.push(_)}return h},d.map=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=[],g=a;g<u;g++)h.push(s(c[g],g));return h},d.indexBy=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=a;h<u;h++)if(s(c[h],h))return h;return-1},d.reverseIndexBy=function(c,s,a,u){void 0===a&&(a=c.length-1),void 0===u&&(u=0);for(var h=a;h>=u;h--)if(s(c[h],h))return h;return-1},d.elementBy=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);var h=d.indexBy(c,s,a,u);return h<0?null:c[h]},d.reverseElementBy=function(c,s,a,u){void 0===a&&(a=c.length-1),void 0===u&&(u=0);var h=d.reverseIndexBy(c,s,a,u);return h<0?null:c[h]},d.last=function(c){return c[c.length-1]},d.setLast=function(c,s){return c[c.length-1]=s},d.incLast=function(c){return++c[c.length-1]},d.decLast=function(c){return--c[c.length-1]},d.equals=function(c,s){return c.length===s.length&&d.allOf2(c,s,function(a,u){return a.equals(u)})},d.equalsByReference=function(c,s){var a=c.length;if(a!==c.length)return!1;for(var u=0;u<a;u++)if(c[u]!==s[u])return!1;return!0},d.unique=function(c,s,a,u){void 0===a&&(a=s),void 0===u&&(u=function(){});var h=c.length;if(0===h)return[];var g=(c=c.sort(s))[0],_=d.reducedMap(c,function(x){return 0!==a(g,x)?(g=x,x):(u(x),null)},1,h);return _.unshift(c[0]),_},d.uniqueNumber=function(c){c=c.sort(T.Comparers.number);for(var s=Number.NaN,a=c.length-1;a>=0;a--)s===c[a]?c.splice(a,1):s=c[a];return c},d.forEach=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=a;h<u;h++)s(c[h],h)},d.forEach2=function(c,s,a,u,h){void 0===u&&(u=0),void 0===h&&(h=c.length);for(var g=u;g<h;g++)a(c[g],s[g],g)},d.reverseForEach=function(c,s,a,u){void 0===a&&(a=c.length-1),void 0===u&&(u=0);for(var h=a;h>=u;h--)s(c[h],h)},d.reverseIndexOf=function(c,s,a,u){void 0===a&&(a=c.length-1),void 0===u&&(u=0);for(var h=a;h>=u;h--)if(c[h]===s)return h;return-1},d.accumulate=function(c,s,a,u,h){void 0===u&&(u=0),void 0===h&&(h=c.length);for(var g=s,_=u;_<h;_++)g=a(g,c[_],_);return g},d.accumulateNumber=function(c,s,a,u,h){void 0===a&&(a=0),void 0===u&&(u=0),void 0===h&&(h=c.length);for(var g=a,_=u;_<h;_++)g+=s(c[_],_,g);return g},d.anyOf=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=a;h<u;h++)if(s(c[h],h))return!0;return!1},d.unsafeAnyOf=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=a;h<u;h++){var g=s(c[h],h);if(g)return g}return null},d.reverseAnyOf=function(c,s,a,u){void 0===a&&(a=c.length-1),void 0===u&&(u=0);for(var h=a;h>=u;h--)if(s(c[h],h))return!0;return!1},d.unsafeReverseAnyOf=function(c,s,a,u){void 0===a&&(a=c.length-1),void 0===u&&(u=0);for(var h=a;h>=u;h--){var g=s(c[h],h);if(g)return g}return null},d.anyOf2=function(c,s,a,u,h){void 0===u&&(u=0),void 0===h&&(h=c.length);for(var g=u;g<h;g++)if(a(c[g],s[g],g))return!0;return!1},d.allOf=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);for(var h=a;h<u;h++)if(!s(c[h],h))return!1;return!0},d.allOf2=function(c,s,a,u,h){void 0===u&&(u=0),void 0===h&&(h=c.length);for(var g=u;g<h;g++)if(!a(c[g],s[g],g))return!1;return!0},d.allOfOnInterval=function(c,s){for(var a=c.end,u=c.start;u<a;u++)if(!s(u))return!1;return!0},d.addListOnTail=function(c,s){for(var a=0,u=void 0;u=s[a];a++)c.push(u);return c},d.joinLists=function(c){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];return d.accumulate(s,[],function(u,h){return d.addListOnTail(u,c(h)),u})},d.push=function(c,s){return c.push(s),c},d.countIf=function(c,s){return d.accumulateNumber(c,function(a,u){return s(a,u)?1:0})},d.clear=function(c){c.splice(0)},d.merge=function(c,s,a,u,h,g){if(void 0===h&&(h=0),void 0===g&&(g=c.length),c=c.slice(h,g),g-h<2)return c;for(var _=(c=c.sort(s))[h],x=[_],w=h+1;w<g;w++){var D=c[w];a(_,D)?u(_,D):x.push(_=D)}return x},d.min=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);var h=d.minExtended(c,s,a,u);return h?h.minElement:null},d.max=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);var h=d.maxExtended(c,s,a,u);return h?h.maxElement:null},d.minMax=function(c,s,a,u){void 0===a&&(a=0),void 0===u&&(u=c.length);var h=d.minMaxExtended(c,s,a,u);return h?new S.MinMax(h.minElement,h.maxElement):null},d.minExtended=function(c,s,a,u){if(void 0===a&&(a=0),void 0===u&&(u=c.length),0===c.length)return null;for(var h=c[a],g=s(h),_=a+1;_<u;_++){var x=c[_],w=s(x);w<g&&(g=w,h=x)}return new S.ExtendedMin(h,g)},d.maxExtended=function(c,s,a,u){if(void 0===a&&(a=0),void 0===u&&(u=c.length),0===c.length)return null;for(var h=c[a],g=s(h),_=a+1;_<u;_++){var x=c[_],w=s(x);w>g&&(g=w,h=x)}return new S.ExtendedMax(h,g)},d.minMaxExtended=function(c,s,a,u){if(void 0===a&&(a=0),void 0===u&&(u=c.length),0===c.length)return null;for(var h=c[a],g=h,_=s(h),x=_,w=a+1;w<u;w++){var D=c[w],C=s(D);C<_?(_=C,h=D):C>x&&(x=C,g=D)}return new S.ExtendedMinMax(h,_,g,x)},d.minByCmp=function(c,s,a,u){if(void 0===a&&(a=0),void 0===u&&(u=c.length),0===c.length)return null;for(var h=c[a],g=a+1;g<u;g++){var _=c[g];s(_,h)<0&&(h=_)}return h},d.maxByCmp=function(c,s,a,u){if(void 0===a&&(a=0),void 0===u&&(u=c.length),0===c.length)return null;for(var h=c[a],g=a+1;g<u;g++){var _=c[g];s(_,h)>0&&(h=_)}return h},d.minMaxByCmp=function(c,s,a,u){if(void 0===a&&(a=0),void 0===u&&(u=c.length),0===c.length)return null;for(var h=c[a],g=h,_=a+1;_<u;_++){var x=c[_],w=s(x,h);w>0?g=x:w<0&&(h=x)}return new S.MinMax(h,g)},d}();b.ListUtils=y},8679:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.MathUtils=void 0;var S=f(2940),T=function(){function y(){}return y.round=function(d,c){void 0===c&&(c=0);var s=y.powFactor[c];return Math.round(d*s)/s},y.numberCloseTo=function(d,c,s){return void 0===s&&(s=1e-5),Math.abs(d-c)<s},y.restrictValue=function(d,c,s){return s<c&&(s=c),d>s?s:d<c?c:d},y.getRandomInt=function(d,c){return Math.floor(Math.random()*(c-d+1))+d},y.generateGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var c=16*Math.random()|0;return("x"===d?c:3&c|8).toString(16)})},y.powFactor=S.ListUtils.initByCallback(20,function(d){return Math.pow(10,d)}),y.somePrimes=[1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003],y}();b.MathUtils=T},49:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.StringUtils=void 0;var f=function(){function S(){}return S.isAlpha=function(T){return T>="a"&&T<="z"||T>="A"&&T<="Z"},S.isDigit=function(T){return T>="0"&&T<="9"},S.stringHashCode=function(T){var y=0;if(0===T.length)return y;for(var d=T.length,c=0;c<d;c++)y=(y<<5)-y+T.charCodeAt(c),y|=0;return y},S.endsAt=function(T,y){var d=T.length-1,c=y.length-1,s=d-c;if(s<0)return!1;for(;d>=s;d--,c--)if(T[d]!==y[c])return!1;return!0},S.startsAt=function(T,y){return T.substr(0,y.length)===y},S.stringInLowerCase=function(T){return T.toLowerCase()===T},S.stringInUpperCase=function(T){return T.toUpperCase()===T},S.atLeastOneSymbolInUpperCase=function(T){for(var y=0,d=void 0;d=T[y];y++)if(S.stringInUpperCase(d)&&!S.stringInLowerCase(d))return!0;return!1},S.getSymbolFromEnd=function(T,y){return T[T.length-y]},S.trim=function(T,y){if(void 0===y)return S.trimInternal(T,!0,!0);var d=y.join("");return T.replace(new RegExp("(^["+d+"]*)|(["+d+"]*$)","g"),"")},S.trimStart=function(T,y){if(void 0===y)return S.trimInternal(T,!0,!1);var d=y.join("");return T.replace(new RegExp("^["+d+"]*","g"),"")},S.trimEnd=function(T,y){if(void 0===y)return S.trimInternal(T,!1,!0);var d=y.join("");return T.replace(new RegExp("["+d+"]*$","g"),"")},S.getDecimalSeparator=function(){return 1.1.toLocaleString().substr(1,1)},S.repeat=function(T,y){return new Array(y<=0?0:y+1).join(T)},S.isNullOrEmpty=function(T){return!T||!T.length},S.padLeft=function(T,y,d){return S.repeat(d,Math.max(0,y-T.length))+T},S.trimInternal=function(T,y,d){var c=T.length;if(!c)return T;if(c<764833){var s=T;return y&&(s=s.replace(/^\s+/,"")),d&&(s=s.replace(/\s+$/,"")),s}var a=0;if(d)for(;c>0&&/\s/.test(T[c-1]);)c--;if(y&&c>0)for(;a<c&&/\s/.test(T[a]);)a++;return T.substring(a,c)},S}();b.StringUtils=f},1632:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TouchUtils=void 0;var S=f(9279),T=f(2491),y=function(){function d(){}return d.onEventAttachingToDocument=function(c,s){return!S.Browser.MacOSMobilePlatform||!d.isTouchEventName(c)||(d.documentTouchHandlers[c]||(d.documentTouchHandlers[c]=[]),d.documentTouchHandlers[c].push(s),d.documentEventAttachingAllowed)},d.isTouchEventName=function(c){return S.Browser.WebKitTouchUI&&(c.indexOf("touch")>-1||c.indexOf("gesture")>-1)},d.isTouchEvent=function(c){return S.Browser.WebKitTouchUI&&T.isDefined(c.changedTouches)},d.getEventX=function(c){return S.Browser.IE?c.pageX:c.changedTouches[0].pageX},d.getEventY=function(c){return S.Browser.IE?c.pageY:c.changedTouches[0].pageY},d.touchMouseDownEventName=S.Browser.WebKitTouchUI?"touchstart":S.Browser.Edge&&S.Browser.MSTouchUI&&window.PointerEvent?"pointerdown":"mousedown",d.touchMouseUpEventName=S.Browser.WebKitTouchUI?"touchend":S.Browser.Edge&&S.Browser.MSTouchUI&&window.PointerEvent?"pointerup":"mouseup",d.touchMouseMoveEventName=S.Browser.WebKitTouchUI?"touchmove":S.Browser.Edge&&S.Browser.MSTouchUI&&window.PointerEvent?"pointermove":"mousemove",d.msTouchDraggableClassName="dxMSTouchDraggable",d.documentTouchHandlers={},d.documentEventAttachingAllowed=!0,d}();b.TouchUtils=y},8721:(P,b,f)=>{f.r(b)},639:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.BarManager=void 0;var f=function(){function S(T,y){this.commandManager=T,this.bars=y}return S.prototype.updateContextMenu=function(){for(var T=0,y=void 0;y=this.bars[T];T++)if(y.isContextMenu()){y.updateItemsList();for(var d=y.getCommandKeys(),c=0;c<d.length;c++)this.updateBarItem(y,d[c])}},S.prototype.updateItemsState=function(T){for(var y=!!T.length,d=function(u,h){if(h.isVisible()){for(var g=h.getCommandKeys(),_=function(w){if(y&&!T.filter(function(D){return D==g[w]}).length)return"continue";c.updateBarItem(h,g[w])},x=0;x<g.length;x++)_(x);h.completeUpdate()}},c=this,s=0,a=void 0;a=this.bars[s];s++)d(0,a)},S.prototype.updateBarItem=function(T,y){var d=this.commandManager.getCommand(y);if(d){var c=d.getState();T.setItemVisible(y,c.visible),c.visible&&(T.setItemEnabled(y,c.enabled),T.setItemValue(y,c.value))}},S}();b.BarManager=f},3290:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.GanttClientCommand=void 0,(f=b.GanttClientCommand||(b.GanttClientCommand={}))[f.CreateTask=0]="CreateTask",f[f.CreateSubTask=1]="CreateSubTask",f[f.RemoveTask=2]="RemoveTask",f[f.RemoveDependency=3]="RemoveDependency",f[f.TaskInformation=4]="TaskInformation",f[f.TaskAddContextItem=5]="TaskAddContextItem",f[f.Undo=6]="Undo",f[f.Redo=7]="Redo",f[f.ZoomIn=8]="ZoomIn",f[f.ZoomOut=9]="ZoomOut",f[f.FullScreen=10]="FullScreen",f[f.CollapseAll=11]="CollapseAll",f[f.ExpandAll=12]="ExpandAll",f[f.ResourceManager=13]="ResourceManager",f[f.ToggleResources=14]="ToggleResources",f[f.ToggleDependencies=15]="ToggleDependencies"},3756:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CollapseAllCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled())},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.collapseAll(),!0},s.prototype.isEnabled=function(){return!0},s}(T.CommandBase);b.CollapseAllCommand=d},6585:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ExpandAllCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled())},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.expandAll(),!0},s.prototype.isEnabled=function(){return!0},s}(T.CommandBase);b.ExpandAllCommand=d},9687:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CommandBase=void 0;var f=function(){function S(T){this.control=T}return Object.defineProperty(S.prototype,"modelManipulator",{get:function(){return this.control.modelManipulator},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"history",{get:function(){return this.control.history},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"validationController",{get:function(){return this.control.validationController},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"state",{get:function(){return this._state||(this._state=this.getState()),this._state},enumerable:!1,configurable:!0}),S.prototype.execute=function(){for(var T=[],y=0;y<arguments.length;y++)T[y]=arguments[y];if(!this.state.enabled)return!1;var d=this.executeInternal.apply(this,T);return d&&this.control.barManager.updateItemsState([]),d},S.prototype.isEnabled=function(){return this.control.settings.editing.enabled},S.prototype.executeInternal=function(){for(var T=[],y=0;y<arguments.length;y++)T[y]=arguments[y];throw new Error("Not implemented")},S}();b.CommandBase=f},7156:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CommandManager=void 0;var S=f(5237),T=f(126),y=f(5477),d=f(6152),c=f(3290),s=f(3756),a=f(6585),u=f(4118),h=f(3044),g=f(9762),_=f(7823),x=f(3250),w=f(9072),D=f(1955),C=f(1757),I=f(7977),L=f(9793),N=f(358),G=f(9791),k=f(3936),U=f(5258),B=f(2018),K=f(4195),J=f(2714),ie=f(299),re=f(2231),q=function(){function Y(Z){this.control=Z,this.commands={},this.createCommand(c.GanttClientCommand.CreateTask,this.createTaskCommand),this.createCommand(c.GanttClientCommand.CreateSubTask,this.createSubTaskCommand),this.createCommand(c.GanttClientCommand.RemoveTask,this.removeTaskCommand),this.createCommand(c.GanttClientCommand.RemoveDependency,this.removeDependencyCommand),this.createCommand(c.GanttClientCommand.TaskInformation,this.showTaskEditDialog),this.createCommand(c.GanttClientCommand.ResourceManager,this.showResourcesDialog),this.createCommand(c.GanttClientCommand.TaskAddContextItem,new J.TaskAddContextItemCommand(this.control)),this.createCommand(c.GanttClientCommand.Undo,new w.UndoCommand(this.control)),this.createCommand(c.GanttClientCommand.Redo,new x.RedoCommand(this.control)),this.createCommand(c.GanttClientCommand.ZoomIn,new ie.ZoomInCommand(this.control)),this.createCommand(c.GanttClientCommand.ZoomOut,new re.ZoomOutCommand(this.control)),this.createCommand(c.GanttClientCommand.FullScreen,new _.ToggleFullScreenCommand(this.control)),this.createCommand(c.GanttClientCommand.CollapseAll,new s.CollapseAllCommand(this.control)),this.createCommand(c.GanttClientCommand.ExpandAll,new a.ExpandAllCommand(this.control)),this.createCommand(c.GanttClientCommand.ToggleResources,this.toggleResources),this.createCommand(c.GanttClientCommand.ToggleDependencies,this.toggleDependencies)}return Object.defineProperty(Y.prototype,"createTaskCommand",{get:function(){return new U.CreateTaskCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"createSubTaskCommand",{get:function(){return new k.CreateSubTaskCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"removeTaskCommand",{get:function(){return new K.RemoveTaskCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"updateTaskCommand",{get:function(){return new B.UpdateTaskCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"createDependencyCommand",{get:function(){return new u.CreateDependencyCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"removeDependencyCommand",{get:function(){return new h.RemoveDependencyCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"createResourceCommand",{get:function(){return new C.CreateResourceCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"removeResourceCommand",{get:function(){return new N.RemoveResourceCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"assignResourceCommand",{get:function(){return new D.AssignResourceCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"deassignResourceCommand",{get:function(){return new I.DeassignResourceCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"changeResourceColorCommand",{get:function(){return new L.ResourceColorCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"showTaskEditDialog",{get:function(){return new d.TaskEditDialogCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"showConstraintViolationDialog",{get:function(){return new T.ConstraintViolationDialogCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"showConfirmationDialog",{get:function(){return new S.ConfirmationDialog(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"showResourcesDialog",{get:function(){return new y.ResourcesDialogCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"toggleResources",{get:function(){return new G.ToggleResourceCommand(this.control)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"toggleDependencies",{get:function(){return new g.ToggleDependenciesCommand(this.control)},enumerable:!1,configurable:!0}),Y.prototype.getCommand=function(Z){return this.commands[Z]},Y.prototype.createCommand=function(Z,Q){this.commands[Z]=Q},Y}();b.CommandManager=q},4118:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CreateDependencyCommand=void 0;var S=f(655),T=f(5950),y=f(3279),d=f(1211),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S.__extends(a,s),a.prototype.execute=function(u,h,g){return s.prototype.execute.call(this,u,h,g)},a.prototype.executeInternal=function(u,h,g){if(this.control.viewModel.dependencies.items.filter(function(w){return w.predecessorId===u&&w.successorId===h||w.successorId===u&&w.predecessorId===h}).length)return!1;var _=new y.DependencyInsertingArguments(u,h,g);if(this.modelManipulator.dispatcher.notifyDependencyInserting(_),_.cancel)return!1;if(u=_.predecessorId,h=_.successorId,g=_.type,this.control.history.beginTransaction(),this.history.addAndRedo(new d.InsertDependencyHistoryItem(this.modelManipulator,u,h,g)),this.control.isValidateDependenciesRequired()){var x=this.control.viewModel.tasks.getItemById(u);g===T.DependencyType.SF||g===T.DependencyType.SS?this.control.validationController.moveStartDependTasks(u,x.start):this.control.validationController.moveEndDependTasks(u,x.end)}return this.control.history.endTransaction(),!0},a.prototype.isEnabled=function(){return s.prototype.isEnabled.call(this)&&this.control.settings.editing.allowDependencyInsert},a}(f(2291).DependencyCommandBase);b.CreateDependencyCommand=c},2291:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DependencyCommandBase=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled())},s}(T.CommandBase);b.DependencyCommandBase=d},3044:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RemoveDependencyCommand=void 0;var S=f(655),T=f(9544),y=f(5139),d=f(4797),c=f(5865),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S.__extends(u,a),u.prototype.execute=function(h,g){var _=this;return void 0===g&&(g=!0),g?(this.control.commandManager.showConfirmationDialog.execute(new y.ConfirmationDialogParameters(T.ConfirmationType.DependencyDelete,function(){_.executeInternal(h)})),!1):a.prototype.execute.call(this,h)},u.prototype.executeInternal=function(h){if(null!=(h=h||this.control.taskEditController.dependencyId)){var g=this.control.viewModel.dependencies.items.filter(function(x){return x.internalId===h})[0];if(g){var _=new d.DependencyRemovingArguments(g);if(this.modelManipulator.dispatcher.notifyDependencyRemoving(_),!_.cancel)return this.history.addAndRedo(new c.RemoveDependencyHistoryItem(this.modelManipulator,h)),h===this.control.taskEditController.dependencyId&&this.control.taskEditController.selectDependency(null),this.control.barManager.updateItemsState([]),!0}}return!1},u.prototype.isEnabled=function(){return a.prototype.isEnabled.call(this)&&this.control.settings.editing.allowDependencyDelete},u.prototype.getState=function(){var h=a.prototype.getState.call(this);return h.visible=h.enabled&&null!=this.control.taskEditController.dependencyId,h},u}(f(2291).DependencyCommandBase);b.RemoveDependencyCommand=s},9762:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ToggleDependenciesCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(!0)},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.toggleDependencies(),!0},s}(T.CommandBase);b.ToggleDependenciesCommand=d},7823:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ToggleFullScreenCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){var a=null!==c&&c.apply(this,arguments)||this;return a.isInFullScreenMode=!1,a.fullScreenTempVars={},a}return S.__extends(s,c),s.prototype.getState=function(){var a=new y.SimpleCommandState(!0);return a.value=this.control.fullScreenModeHelper.isInFullScreenMode,a},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.fullScreenModeHelper.toggle(),!0},s}(T.CommandBase);b.ToggleFullScreenCommand=d},3250:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RedoCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){var a=new y.SimpleCommandState(this.isEnabled());return a.visible=this.control.settings.editing.enabled,a},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.history.redo(),!0},s.prototype.isEnabled=function(){return c.prototype.isEnabled.call(this)&&this.history.canRedo()},s}(T.CommandBase);b.RedoCommand=d},9072:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.UndoCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){var a=new y.SimpleCommandState(this.isEnabled());return a.visible=this.control.settings.editing.enabled,a},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.history.undo(),!0},s.prototype.isEnabled=function(){return c.prototype.isEnabled.call(this)&&this.history.canUndo()},s}(T.CommandBase);b.UndoCommand=d},1955:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.AssignResourceCommand=void 0;var S=f(655),T=f(1389),y=f(3683),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.execute=function(a,u){return c.prototype.execute.call(this,a,u)},s.prototype.executeInternal=function(a,u){if(!this.control.viewModel.assignments.items.filter(function(_){return _.resourceId===a&&_.taskId===u})[0]){var h=this.control.viewModel,g=new T.ResourceAssigningArguments(h.convertInternalToPublicKey("resource",a),h.convertInternalToPublicKey("task",u));if(this.modelManipulator.dispatcher.notifyResourceAssigning(g),!g.cancel)return this.history.addAndRedo(new y.AssignResourceHistoryItem(this.modelManipulator,h.convertPublicToInternalKey("resource",g.resourceId),h.convertPublicToInternalKey("task",g.taskId))),!0}return!1},s.prototype.isEnabled=function(){return c.prototype.isEnabled.call(this)&&this.control.settings.editing.allowTaskResourceUpdate},s}(f(200).ResourceCommandBase);b.AssignResourceCommand=d},1757:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CreateResourceCommand=void 0;var S=f(655),T=f(990),y=f(2961),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.execute=function(a,u,h){return void 0===u&&(u=""),c.prototype.execute.call(this,a,u,h)},s.prototype.executeInternal=function(a,u,h){void 0===u&&(u="");var g=new T.ResourceInsertingArguments(a,u);return this.modelManipulator.dispatcher.notifyResourceCreating(g),g.cancel||this.history.addAndRedo(new y.CreateResourceHistoryItem(this.modelManipulator,g.text,g.color,h)),!g.cancel},s.prototype.isEnabled=function(){return c.prototype.isEnabled.call(this)&&this.control.settings.editing.allowResourceInsert},s}(f(200).ResourceCommandBase);b.CreateResourceCommand=d},7977:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DeassignResourceCommand=void 0;var S=f(655),T=f(1493),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.execute=function(s){return d.prototype.execute.call(this,s)},c.prototype.executeInternal=function(s){var a=this.control.viewModel.assignments.items.filter(function(u){return u.internalId===s})[0];return!(!a||!this.modelManipulator.dispatcher.fireResourceUnassigning(a)||(this.history.addAndRedo(new T.DeassignResourceHistoryItem(this.modelManipulator,s)),0))},c.prototype.isEnabled=function(){return d.prototype.isEnabled.call(this)&&this.control.settings.editing.allowTaskResourceUpdate},c}(f(200).ResourceCommandBase);b.DeassignResourceCommand=y},9793:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceColorCommand=void 0;var S=f(655),T=f(4641),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.execute=function(s,a){return d.prototype.execute.call(this,s,a)},c.prototype.executeInternal=function(s,a){return this.control.viewModel.resources.getItemById(s).color!==a&&(this.history.addAndRedo(new T.ResourceColorHistoryItem(this.modelManipulator,s,a)),!0)},c}(f(9876).ResourcePropertyCommandBase);b.ResourceColorCommand=y},9876:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcePropertyCommandBase=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled())},s.prototype.isEnabled=function(){return c.prototype.isEnabled.call(this)&&this.control.settings.editing.allowResourceUpdate},s}(T.CommandBase);b.ResourcePropertyCommandBase=d},358:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RemoveResourceCommand=void 0;var S=f(655),T=f(9748),y=f(7466),d=f(1493),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S.__extends(a,s),a.prototype.execute=function(u){return s.prototype.execute.call(this,u)},a.prototype.executeInternal=function(u){var h=this,g=this.control.viewModel.resources.items.filter(function(w){return w.internalId===u})[0];if(g){var _=new T.ResourceRemovingArguments(g);if(this.modelManipulator.dispatcher.notifyResourceRemoving(_),!_.cancel){var x=new y.RemoveResourceHistoryItem(this.modelManipulator,u);return this.control.viewModel.assignments.items.filter(function(w){return w.resourceId===u}).forEach(function(w){h.modelManipulator.dispatcher.fireResourceUnassigning(w)&&x.add(new d.DeassignResourceHistoryItem(h.modelManipulator,w.internalId))}),this.history.addAndRedo(x),!0}}return!1},a.prototype.isEnabled=function(){return s.prototype.isEnabled.call(this)&&this.control.settings.editing.allowResourceDelete},a}(f(200).ResourceCommandBase);b.RemoveResourceCommand=c},200:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceCommandBase=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled())},s}(T.CommandBase);b.ResourceCommandBase=d},9791:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ToggleResourceCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(!0)},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.toggleResources(),!0},s}(T.CommandBase);b.ToggleResourceCommand=d},4409:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SimpleCommandState=void 0,b.SimpleCommandState=function(S,T){this.visible=!0,this.enabled=S,this.value=T}},3936:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CreateSubTaskCommand=void 0;var S=f(655),T=f(4605),y=f(1284),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.execute=function(a){return c.prototype.execute.call(this,a)},s.prototype.executeInternal=function(a){var u=this.control.viewModel.findItem(a=a||this.control.currentSelectedTaskID);if(u.selected){var h={start:new Date(u.task.start.getTime()),end:new Date(u.task.end.getTime()),title:"New task",progress:0,parentId:a},g=new T.TaskInsertingArguments(null,h);if(this.modelManipulator.dispatcher.notifyTaskCreating(g),!g.cancel){this.history.addAndRedo(new y.CreateTaskHistoryItem(this.modelManipulator,g));var _=this.control.viewModel.findItem(h.parentId);c.prototype.updateParent.call(this,_)}return!g.cancel}return!1},s.prototype.isEnabled=function(){var a=this.control,u=a.viewModel.findItem(a.currentSelectedTaskID);return c.prototype.isEnabled.call(this)&&!!u&&u.selected},s.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.visible=a.visible&&this.control.settings.editing.allowTaskInsert,a},s}(f(9254).TaskCommandBase);b.CreateSubTaskCommand=d},5258:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CreateTaskCommand=void 0;var S=f(655),T=f(4605),y=f(1284),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.execute=function(a){return c.prototype.execute.call(this,a)},s.prototype.executeInternal=function(a){var u,h;if(null!=a||(a={}),!a.parentId){var g=this.control.viewModel.findItem(this.control.currentSelectedTaskID),_=g&&g.task;_&&(a.parentId=_.parentId)}var x=this.control.viewModel.findItem(a.parentId)||this.control.viewModel.items[0],w=x&&x.task;a.start||(a.start=w?new Date(w.start.getTime()):new Date(this.control.range.start.getTime())),a.end||(a.end=w?new Date(w.end.getTime()):new Date(this.control.range.end.getTime())),null!==(u=a.title)&&void 0!==u||(a.title="New task"),null!==(h=a.progress)&&void 0!==h||(a.progress=0);var D=new T.TaskInsertingArguments(null,a);if(this.modelManipulator.dispatcher.notifyTaskCreating(D),!D.cancel){this.history.addAndRedo(new y.CreateTaskHistoryItem(this.modelManipulator,D));var C=this.control.viewModel.findItem(a.parentId);c.prototype.updateParent.call(this,C)}return!D.cancel},s.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.visible=a.visible&&this.control.settings.editing.allowTaskInsert,a},s}(f(9254).TaskCommandBase);b.CreateTaskCommand=d},4195:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RemoveTaskCommand=void 0;var S=f(655),T=f(9544),y=f(5139),d=f(4642),c=f(5865),s=f(1493),a=f(9599),u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S.__extends(g,h),g.prototype.execute=function(_,x,w,D,C,I){var L=this;return void 0===x&&(x=!0),void 0===w&&(w=!1),void 0===D&&(D=!0),this.isApiCall=w,this.isUpdateParentTaskRequired=D,x?(this.control.commandManager.showConfirmationDialog.execute(new y.ConfirmationDialogParameters(T.ConfirmationType.TaskDelete,function(){L.executeInternal(_,C,I)})),!1):h.prototype.execute.call(this,_,C,I)},g.prototype.executeInternal=function(_,x,w){var D=this,C=w||[],I=this.control.viewModel.findItem(_=_||this.control.currentSelectedTaskID),L=I?I.task:this.control.viewModel.tasks.getItemById(_),N=new d.TaskRemovingArguments(L);if(this.modelManipulator.dispatcher.notifyTaskRemoving(N),N.cancel)return!1;var G=this.history,k=this.control.viewModel;G.beginTransaction(),k.beginUpdate();var U=!!x,B=new a.RemoveTaskHistoryItem(this.modelManipulator,_),K=k.tasks.items.filter(function(q){return q.parentId===_}),J=K.map(function(q){return q.internalId}),ie=k.dependencies.items.filter(function(q){return-1===C.indexOf(q.internalId)&&(q.predecessorId===_||q.successorId===_)&&!J.some(function(Y){return q.predecessorId===Y||q.successorId===Y})});if(ie.length){if(!this.control.settings.editing.allowDependencyDelete)return!1;ie.forEach(function(q){B.add(new c.RemoveDependencyHistoryItem(D.modelManipulator,q.internalId)),C.push(q.internalId)})}if(k.assignments.items.filter(function(q){return q.taskId===_}).forEach(function(q){D.modelManipulator.dispatcher.fireResourceUnassigning(q)&&B.add(new s.DeassignResourceHistoryItem(D.modelManipulator,q.internalId))}),K.reverse().forEach(function(q){return new g(D.control).execute(q.internalId,!1,!0,!1,B,C)}),U?x.add(B):G.addAndRedo(B),this.isUpdateParentTaskRequired){var re=this.control.viewModel.findItem(L.parentId);h.prototype.updateParent.call(this,re)}return G.endTransaction(),k.endUpdate(),!0},g.prototype.isEnabled=function(){var _=this.control,x=_.viewModel.findItem(_.currentSelectedTaskID);return h.prototype.isEnabled.call(this)&&(!!x&&x.selected||this.isApiCall)},g.prototype.getState=function(){var _=h.prototype.getState.call(this);return _.visible=_.visible&&this.control.settings.editing.allowTaskDelete,_},g}(f(9254).TaskCommandBase);b.RemoveTaskCommand=u},2714:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAddContextItemCommand=void 0;var S=f(655),T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S.__extends(d,y),d.prototype.getState=function(){var c=y.prototype.getState.call(this);return c.visible=c.visible&&this.control.settings.editing.allowTaskInsert,c},d.prototype.execute=function(){return!1},d}(f(9254).TaskCommandBase);b.TaskAddContextItemCommand=T},9254:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskCommandBase=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){var a=null!==c&&c.apply(this,arguments)||this;return a.isApiCall=!1,a}return S.__extends(s,c),s.prototype.getState=function(){var a=new y.SimpleCommandState(this.isEnabled());return a.visible=this.control.settings.editing.enabled&&!this.control.taskEditController.dependencyId,a},s.prototype.updateParent=function(a){this.validationController._parentAutoCalc&&a&&a.children.length>0&&this.control.validationController.updateParentsIfRequired(a.children[0].task.internalId)},s}(T.CommandBase);b.TaskCommandBase=d},2018:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.UpdateTaskCommand=void 0;var S=f(655),T=f(2491),y=f(9544),d=f(3433),c=f(5865),s=f(9496),a=f(9201),u=function(h){function g(){return null!==h&&h.apply(this,arguments)||this}return S.__extends(g,h),g.prototype.execute=function(_,x){return h.prototype.execute.call(this,_,x)},g.prototype.executeInternal=function(_,x){var w=this.control.viewModel.tasks.getItemById(_);if(!w)return!1;var D=this.control.modelManipulator.dispatcher.raiseTaskUpdating(w,x,function(I){x.title=I.title,x.progress=I.progress,x.start=I.start,x.end=I.end,x.color=I.color});if(D){(0,T.isDefined)(x.start)&&(0,T.isDefined)(x.end)&&x.end.getTime()<x.start.getTime()&&(x.end=x.start),(0,T.isDefined)(x.progress)&&(x.progress=Math.max(Math.min(x.progress,100),0));var C=this.filterChangedValues(x,w);this.processDependecyValidation(C,w)}return D},g.prototype.isEnabled=function(){return h.prototype.isEnabled.call(this)&&this.control.settings.editing.allowTaskUpdate},g.prototype.filterChangedValues=function(_,x){if(!_)return null;var w={};for(var D in x)Object.prototype.hasOwnProperty.call(x,D)&&(0,T.isDefined)(_[D])&&x[D]!==_[D]&&(w[D]=_[D]);return w},g.prototype.processDependecyValidation=function(_,x){var w=this,D=function(G){w.onAfterValidationCallback(_,x,G)},C=this.control.isValidateDependenciesRequired();if(C){var I=[],L=(0,T.isDefined)(_.start)&&_.start!==x.start,N=(0,T.isDefined)(_.end)&&_.end!==x.end;L&&C&&(I=I.concat(this.control.validationController.checkStartDependencies(x.internalId,_.start))),N&&C&&(I=I.concat(this.control.validationController.checkEndDependencies(x.internalId,_.end))),I.length>0?this.control.commandManager.showConstraintViolationDialog.execute(new d.ConstraintViolationDialogParameters(I,D)):D(null)}else D(null)},g.prototype.onAfterValidationCallback=function(_,x,w){var D=this;if(!w||w.option!==y.ConstraintViolationOption.DoNothing||(delete _.start,delete _.end),Object.keys(_).length>0){this.history.beginTransaction(),w?.option===y.ConstraintViolationOption.RemoveDependency&&w.validationErrors.forEach(function(G){return D.history.addAndRedo(new c.RemoveDependencyHistoryItem(D.modelManipulator,G.dependencyId))});var C=this.control.isValidateDependenciesRequired(),I=x.internalId,L=x.start,N=x.end;this.history.addAndRedo(new s.UpdateTaskHistoryItem(this.modelManipulator,I,_)),(0,T.isDefined)(_.start)&&C&&this.control.validationController.moveStartDependTasks(I,L),(0,T.isDefined)(_.end)&&C&&this.control.validationController.moveEndDependTasks(I,N),this.processAutoParentUpdate(I,_,L,N),this.history.endTransaction(),w?.option!==y.ConstraintViolationOption.RemoveDependency&&w?.option!==y.ConstraintViolationOption.KeepDependency||this.control.updateBarManager(),this.control.updateViewDataRange()}},g.prototype.processAutoParentUpdate=function(_,x,w,D){var C=(0,T.isDefined)(x.start),I=(0,T.isDefined)(x.end),L=(0,T.isDefined)(x.progress)||C||I,N=C?x.start.getTime()-w.getTime():null,G=I?x.end.getTime()-D.getTime():null,k=C&&0!==a.DateUtils.getTimezoneOffsetDiff(w,x.start),U=I&&0!==a.DateUtils.getTimezoneOffsetDiff(D,x.end),B=(k||U)&&Math.abs(G-N)===a.DateUtils.msPerHour;L?0===N||N!==G&&!B?this.validationController.updateParentsIfRequired(_):this.validationController.correctParentsOnChildMoving(_,N):this.control.updateOwnerInAutoParentMode()},g}(f(9254).TaskCommandBase);b.UpdateTaskCommand=u},299:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ZoomInCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(!0)},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.zoomIn(),!0},s}(T.CommandBase);b.ZoomInCommand=d},2231:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ZoomOutCommand=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.getState=function(){return new y.SimpleCommandState(!0)},s.prototype.execute=function(){return c.prototype.execute.call(this)},s.prototype.executeInternal=function(){return this.control.zoomOut(),!0},s}(T.CommandBase);b.ZoomOutCommand=d},5237:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ConfirmationDialog=void 0;var S=f(655),T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S.__extends(d,y),d.prototype.applyParameters=function(c,s){return this.history.beginTransaction(),s.callback(),this.history.endTransaction(),this.control.barManager.updateItemsState([]),!0},d.prototype.createParameters=function(c){return c},d.prototype.getDialogName=function(){return"Confirmation"},d}(f(4730).DialogBase);b.ConfirmationDialog=T},126:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ConstraintViolationDialogCommand=void 0;var S=f(655),T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S.__extends(d,y),d.prototype.applyParameters=function(c,s){return s.callback(c),!0},d.prototype.createParameters=function(c){return c},d.prototype.getDialogName=function(){return"ConstraintViolation"},d}(f(4730).DialogBase);b.ConstraintViolationDialogCommand=T},4730:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DialogBase=void 0;var S=f(655),T=f(9687),y=f(4409),d=function(c){function s(){var a=null!==c&&c.apply(this,arguments)||this;return a.isApiCall=!1,a._canRefresh=!0,a}return S.__extends(s,c),s.prototype.execute=function(a,u){return void 0===a&&(a=void 0),void 0===u&&(u=!1),this.isApiCall=u,c.prototype.execute.call(this,a)},s.prototype.executeInternal=function(a){return this.options=a,this.showDialog(a)},Object.defineProperty(s.prototype,"canRefresh",{get:function(){return this._canRefresh},enumerable:!1,configurable:!0}),s.prototype.refresh=function(){this.showDialog(this.options)},s.prototype.showDialog=function(a){var u=this,h=this.createParameters(a),g=h.clone();return!!this.onBeforeDialogShow(h)&&(s.activeInstance=this,this.control.showDialog(this.getDialogName(),h,function(_){_&&(u._canRefresh=!1,u.applyParameters(_,g),u._canRefresh=!0)},function(){delete s.activeInstance,u.afterClosing()}),!0)},s.prototype.onBeforeDialogShow=function(a){return!0},s.prototype.applyParameters=function(a,u){return!1},s.prototype.afterClosing=function(){},s.prototype.getState=function(){return new y.SimpleCommandState(this.isEnabled())},s.activeInstance=null,s}(T.CommandBase);b.DialogBase=d},9544:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.ConstraintViolationOption=b.ConfirmationType=void 0,(f=b.ConfirmationType||(b.ConfirmationType={}))[f.TaskDelete=0]="TaskDelete",f[f.DependencyDelete=1]="DependencyDelete",f[f.ResourcesDelete=2]="ResourcesDelete",function(f){f[f.DoNothing=0]="DoNothing",f[f.RemoveDependency=1]="RemoveDependency",f[f.KeepDependency=2]="KeepDependency"}(b.ConstraintViolationOption||(b.ConstraintViolationOption={}))},5139:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ConfirmationDialogParameters=void 0;var S=f(655),T=function(y){function d(c,s){var a=y.call(this)||this;return a.type=c,a.callback=s,a}return S.__extends(d,y),d.prototype.clone=function(){var c=new d(this.type,this.callback);return c.message=this.message,c},d}(f(9705).DialogParametersBase);b.ConfirmationDialogParameters=T},3433:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ConstraintViolationDialogParameters=void 0;var S=f(655),T=function(y){function d(c,s){var a=y.call(this)||this;return a.validationErrors=c,a.callback=s,a}return S.__extends(d,y),d.prototype.clone=function(){var c=new d(this.validationErrors,this.callback);return c.option=this.option,c},Object.defineProperty(d.prototype,"hasCriticalErrors",{get:function(){var c;return null===(c=this.validationErrors)||void 0===c?void 0:c.some(function(s){return s.critical})},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"errorsCount",{get:function(){var c;return null===(c=this.validationErrors)||void 0===c?void 0:c.length},enumerable:!1,configurable:!0}),d}(f(9705).DialogParametersBase);b.ConstraintViolationDialogParameters=T},9705:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DialogParametersBase=void 0,b.DialogParametersBase=function(){}},6711:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcesDialogParameters=void 0;var S=f(655),T=f(8828),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.clone=function(){var s=new c;return s.resources=new T.ResourceCollection,s.resources.addRange(this.resources.items),s},c}(f(9705).DialogParametersBase);b.ResourcesDialogParameters=y},1563:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditParameters=void 0;var S=f(655),T=f(8828),y=function(d){function c(){var s=null!==d&&d.apply(this,arguments)||this;return s.enableEdit=!0,s.enableRangeEdit=!0,s.isValidationRequired=!1,s.hiddenFields=[],s.readOnlyFields=[],s}return S.__extends(c,d),c.prototype.clone=function(){var s=new c;return s.id=this.id,s.title=this.title,s.progress=this.progress,s.start=this.start,s.end=this.end,s.assigned=new T.ResourceCollection,s.assigned.addRange(this.assigned.items),s.resources=new T.ResourceCollection,s.resources.addRange(this.resources.items),s.showResourcesDialogCommand=this.showResourcesDialogCommand,s.showTaskEditDialogCommand=this.showTaskEditDialogCommand,s.enableEdit=this.enableEdit,s.enableRangeEdit=this.enableRangeEdit,s.hiddenFields=this.hiddenFields.slice(),s.readOnlyFields=this.readOnlyFields.slice(),s.isValidationRequired=this.isValidationRequired,s.getCorrectDateRange=this.getCorrectDateRange,s},c}(f(9705).DialogParametersBase);b.TaskEditParameters=y},5477:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcesDialogCommand=void 0;var S=f(655),T=f(8828),y=f(4730),d=f(9544),c=f(5139),s=f(6711),a=function(u){function h(){var g=null!==u&&u.apply(this,arguments)||this;return g.resourcesForDelete=[],g}return S.__extends(h,u),h.prototype.onBeforeDialogShow=function(g){return this.modelManipulator.dispatcher.raiseResourceManagerDialogShowing(g,function(_){g.resources=_.values.resources})},h.prototype.applyParameters=function(g,_){this.history.beginTransaction();for(var x=0;x<g.resources.length;x++)_.resources.getItemById(g.resources.getItem(x).internalId)||this.control.commandManager.createResourceCommand.execute(g.resources.getItem(x).text);for(x=0;x<_.resources.length;x++)g.resources.getItemById(_.resources.getItem(x).internalId)||this.resourcesForDelete.push(_.resources.getItem(x));return this.history.endTransaction(),!1},h.prototype.createParameters=function(g){this.callBack=g;var _=new s.ResourcesDialogParameters;return _.resources=new T.ResourceCollection,_.resources.addRange(this.control.viewModel.resources.items),_},h.prototype.afterClosing=function(){var g=this;if(this.resourcesForDelete.length){var _=this.control.commandManager.showConfirmationDialog,x=new c.ConfirmationDialogParameters(d.ConfirmationType.ResourcesDelete,function(){g.history.beginTransaction();for(var w=0;w<g.resourcesForDelete.length;w++)g.control.commandManager.removeResourceCommand.execute(g.resourcesForDelete[w].internalId);g.history.endTransaction()});x.message=this.resourcesForDelete.reduce(function(w,D){return S.__spreadArray(S.__spreadArray([],w,!0),[D.text],!1)},[]).join(", "),this.callBack&&(_.afterClosing=function(){delete y.DialogBase.activeInstance,g.callBack()}),_.execute(x)}else this.callBack&&this.callBack()},h.prototype.getDialogName=function(){return"Resources"},h}(y.DialogBase);b.ResourcesDialogCommand=a},6152:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditDialogCommand=void 0;var S=f(655),T=f(8828),y=f(1389),d=f(3683),c=f(1493),s=f(4730),a=f(1563),u=f(2491),h=function(g){function _(){return null!==g&&g.apply(this,arguments)||this}return S.__extends(_,g),_.prototype.onBeforeDialogShow=function(x){return this.modelManipulator.dispatcher.raiseTaskTaskEditDialogShowing(x,function(w){var D=w.values;x.start=D.start,x.end=D.end,x.progress=D.progress,x.title=D.title,x.readOnlyFields=w.readOnlyFields,x.hiddenFields=w.hiddenFields})},_.prototype.applyParameters=function(x,w){var D=this;this.history.beginTransaction();var C=this.getUpdatedTaskData(x,w);Object.keys(C).length>0&&setTimeout(function(){return D.control.commandManager.updateTaskCommand.execute(w.id,C)},0);for(var I=0;I<x.assigned.length;I++)if(!w.assigned.getItemById(x.assigned.getItem(I).internalId)){var L=x.assigned.getItem(I).internalId,G=new y.ResourceAssigningArguments(L,w.id);this.modelManipulator.dispatcher.notifyResourceAssigning(G),G.cancel||this.history.addAndRedo(new d.AssignResourceHistoryItem(this.modelManipulator,G.resourceId,G.taskId))}var k=function(B){var K=w.assigned.getItem(B);if(!x.assigned.getItemById(K.internalId)){var J=U.control.viewModel.assignments.items.filter(function(ie){return ie.resourceId===K.internalId&&ie.taskId===w.id})[0];U.modelManipulator.dispatcher.fireResourceUnassigning(J)&&U.history.addAndRedo(new c.DeassignResourceHistoryItem(U.modelManipulator,J.internalId))}},U=this;for(I=0;I<w.assigned.length;I++)k(I);return this.history.endTransaction(),!1},_.prototype.getUpdatedTaskData=function(x,w){var D={};return(0,u.isDefined)(x.title)&&w.title!==x.title&&(D.title=x.title),(0,u.isDefined)(x.progress)&&w.progress!==x.progress&&(D.progress=x.progress),(0,u.isDefined)(x.start)&&w.start!==x.start&&(D.start=x.start),(0,u.isDefined)(x.end)&&w.end!==x.end&&(D.end=x.end),D},_.prototype.createParameters=function(x){var w=this;x=x||this.control.viewModel.tasks.getItemById(this.control.currentSelectedTaskID);var D=new a.TaskEditParameters;return D.id=x.internalId,D.title=x.title,D.progress=x.progress,D.start=x.start,D.end=x.end,D.assigned=this.control.viewModel.getAssignedResources(x),D.resources=new T.ResourceCollection,D.resources.addRange(this.control.viewModel.resources.items),D.showResourcesDialogCommand=this.control.commandManager.showResourcesDialog,D.showTaskEditDialogCommand=this.control.commandManager.showTaskEditDialog,D.enableEdit=this.isTaskEditEnabled(),D.enableRangeEdit=this.isTaskRangeEditEnabled(x),D.isValidationRequired=this.control.isValidateDependenciesRequired(),D.getCorrectDateRange=function(C,I,L){return w.control.validationController.getCorrectDateRange(C,I,L)},D},_.prototype.isTaskEditEnabled=function(){var x=this.control.settings;return x.editing.enabled&&x.editing.allowTaskUpdate},_.prototype.isTaskRangeEditEnabled=function(x){return!this.control.viewModel.isTaskToCalculateByChildren(x.internalId)},_.prototype.isEnabled=function(){var x=this.control,w=x.viewModel.findItem(x.currentSelectedTaskID);return!!w&&w.selected||this.isApiCall},_.prototype.getState=function(){var x=g.prototype.getState.call(this);return x.visible=x.visible&&!this.control.taskEditController.dependencyId,x},_.prototype.getDialogName=function(){return"TaskEdit"},_}(s.DialogBase);b.TaskEditDialogCommand=h},6893:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttExportCalculator=void 0;var S=f(8900),T=f(6907),y=f(2449),d=f(1855),c=f(4991),s=f(2485),a=f(3917),u=f(405),h=f(6995),g=f(5063),_=f(6032),x=f(8603),w=f(6997),D=f(8935),C=f(6353),I=f(3424),L=f(5763),N=f(7802),G=f(9895),k=f(2642),U=function(){function B(K,J){var ie,re;this._owner=K,this._props=new w.GanttPdfExportProps(J),null!==(ie=(re=this._props).margins)&&void 0!==ie||(re.margins=new g.Margin(B._defaultPageMargin))}return Object.defineProperty(B.prototype,"chartTableScaleTopMatrix",{get:function(){var K;return null!==(K=this._chartTableScaleTopMatrix)&&void 0!==K||(this._chartTableScaleTopMatrix=this.calculateChartScaleMatrix(0)),this._chartTableScaleTopMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"chartTableScaleBottomMatrix",{get:function(){var K;return null!==(K=this._chartTableScaleBottomMatrix)&&void 0!==K||(this._chartTableScaleBottomMatrix=this.calculateChartScaleMatrix(1)),this._chartTableScaleBottomMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"chartTableBodyMatrix",{get:function(){return this._chartTableBodyMatrix||this.calculateChartTableBodyMatrix(),this._chartTableBodyMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"treeListHeaderMatrix",{get:function(){return this._treeListHeaderMatrix||this.calculateTreeListTableHeaderMatrix(),this._treeListHeaderMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"treeListBodyMatrix",{get:function(){return this._treeListBodyMatrix||this.calculateTreeListTableBodyMatrix(),this._treeListBodyMatrix},enumerable:!1,configurable:!0}),B.prototype.getPages=function(K){return new I.PdfGanttPaginator(K,this.settings,this.createGlobalInfo()).getPages()},Object.defineProperty(B.prototype,"settings",{get:function(){return this.settingsForPaging},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"layoutCalculator",{get:function(){return this._taskAreaHelper.layoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"taskAreaHelper",{get:function(){var K;return null!==(K=this._taskAreaHelper)&&void 0!==K||(this._taskAreaHelper=new x.TaskAreaExportHelper(this._owner,this._props)),this._taskAreaHelper},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"scalingHelper",{get:function(){var K,J;return null!==(K=this._scalingHelper)&&void 0!==K||(this._scalingHelper=new L.ScalingHelper(null===(J=this._props)||void 0===J?void 0:J.pdfDoc)),this._scalingHelper},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"visibleTaskIndices",{get:function(){return this.taskAreaHelper.visibleTaskIndices},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"baseCellWidth",{get:function(){return this.taskAreaHelper.baseCellSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"baseCellHeight",{get:function(){return this.taskAreaHelper.baseCellHeight},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"chartScaleTableStyle",{get:function(){var K;return null!==(K=this._chartScaleTableStyle)&&void 0!==K||(this._chartScaleTableStyle=this.getChartScaleTableStyle()),this._chartScaleTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"chartMainTableStyle",{get:function(){var K;return null!==(K=this._chartMainTableStyle)&&void 0!==K||(this._chartMainTableStyle=this.getChartMainTableStyle()),this._chartMainTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"treeListTableStyle",{get:function(){return this._treeListTableStyle||this.calculateTreeListTableStyle(),this._treeListTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"pageTopMargin",{get:function(){return this._props.margins.top},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"pageLeftMargin",{get:function(){return this._props.margins.left},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"pageRightMargin",{get:function(){return this._props.margins.right},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"pageBottomMargin",{get:function(){return this._props.margins.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"headerTableTop",{get:function(){var K;return null!==(K=this._headerTableTop)&&void 0!==K||(this._headerTableTop=this.pageTopMargin),this._headerTableTop},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"mainTableTop",{get:function(){var K;return null!==(K=this._mainTableTop)&&void 0!==K||(this._mainTableTop=this.getMainTableTop()),this._mainTableTop},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"exportDataMode",{get:function(){return this._props.exportDataMode},enumerable:!1,configurable:!0}),B.prototype.getMainTableTop=function(){return this.headerTableTop+this.headerTableHeight-this.taskAreaHelper.offsetTop},Object.defineProperty(B.prototype,"chartLeft",{get:function(){var K;return null!==(K=this._chartLeft)&&void 0!==K||(this._chartLeft=this.getChartLeft()),this._chartLeft},enumerable:!1,configurable:!0}),B.prototype.getChartLeft=function(){var K;return(((null===(K=this._props)||void 0===K?void 0:K.exportMode)||G.ExportMode.all)===G.ExportMode.chart?this.pageLeftMargin:this.treeListLeft+this.treeListWidth)-this.taskAreaHelper.offsetLeft},Object.defineProperty(B.prototype,"treeListLeft",{get:function(){var K;return null!==(K=this._treeListLeft)&&void 0!==K||(this._treeListLeft=this.pageLeftMargin),this._treeListLeft},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"headerTableHeight",{get:function(){return 2*this.taskAreaHelper.headerRowHeight},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"mainTableHeight",{get:function(){var K;return null!==(K=this._mainTableHeight)&&void 0!==K||(this._mainTableHeight=this.taskAreaHelper.taskAreaHeight),this._mainTableHeight},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"treeListWidth",{get:function(){var K;return null!==(K=this._treeListWidth)&&void 0!==K||(this._treeListWidth=this.getTreeListTableWidth()),this._treeListWidth},enumerable:!1,configurable:!0}),B.prototype.getTreeListTableWidth=function(){var K,J=this,ie=this.treeListHeaderMatrix[0].map(function(re,q){return J.getTreeListColumnWidth(q)});return null!==(K=ie?.reduce(function(re,q){return re+q},0))&&void 0!==K?K:0},Object.defineProperty(B.prototype,"chartWidth",{get:function(){var K=this;return this._chartWidth||(this._chartWidth=this.chartTableScaleBottomMatrix[0].reduce(function(ie,re){return ie+(re.styles.cellWidth.hasValue()?re.styles.cellWidth.getValue():K.baseCellWidth)},0)),this._chartWidth},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"settingsForPaging",{get:function(){return this._settingsForPaging||(this._settingsForPaging=new w.GanttPdfExportProps(this._props),this.prepareAutoFormat(this._settingsForPaging),this.scalingHelper.scalePageMargins(this._settingsForPaging)),this._settingsForPaging},enumerable:!1,configurable:!0}),B.prototype.prepareAutoFormat=function(K){if(K.format===w.GanttPdfExportProps.autoFormatKey){K.format=null;var J=K.landscape,ie=this.autoFormatWidth,re=this.autoFormatHeight;(J&&re>ie||!J&&re<ie)&&(K.landscape=!J),K.pageSize=new C.Size(ie,re)}},Object.defineProperty(B.prototype,"autoFormatWidth",{get:function(){var K,J=((null===(K=this._props)||void 0===K?void 0:K.exportMode)||G.ExportMode.all)!==G.ExportMode.treeList,ie=this.pageRightMargin;return(ie+=J?this.chartLeft+this.chartWidth:this.treeListLeft+this.treeListWidth)+B._autoFormatWidthAddStock},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"autoFormatHeight",{get:function(){return this.mainTableTop+this.mainTableHeight+this.pageBottomMargin},enumerable:!1,configurable:!0}),B.prototype.createGlobalInfo=function(){var K={objects:this._canExportChart()?this.getGanttObjectsInfo():null,tables:this.getTablesInfo()};return this.scalingHelper.scaleSizes(K),K},B.prototype.getTablesInfo=function(){var K={};return this._canExportTreelist()&&(K[D.PdfPageTableNames.treeListHeader]=this.createTreeListHeaderTableInfo(),K[D.PdfPageTableNames.treeListMain]=this.createTreeListMainTableInfo()),this._canExportChart()&&(K[D.PdfPageTableNames.chartMain]=this.createChartMainTableInfo(),K[D.PdfPageTableNames.chartScaleTop]=this._createChartScaleTopInfo(),K[D.PdfPageTableNames.chartScaleBottom]=this._createChartScaleBottomInfo()),K},Object.defineProperty(B.prototype,"exportMode",{get:function(){var K,J;return null!==(J=null===(K=this._props)||void 0===K?void 0:K.exportMode)&&void 0!==J?J:G.ExportMode.all},enumerable:!1,configurable:!0}),B.prototype._canExportTreelist=function(){return this.exportMode===G.ExportMode.all||this.exportMode===G.ExportMode.treeList},B.prototype._canExportChart=function(){return this.exportMode===G.ExportMode.all||this.exportMode===G.ExportMode.chart},Object.defineProperty(B.prototype,"_predefinedFont",{get:function(){var K,J,ie,re,q=null===(J=null===(K=this._props)||void 0===K?void 0:K.pdfDoc)||void 0===J?void 0:J.getFont();return q?.fontName||(null===(re=null===(ie=this._props)||void 0===ie?void 0:ie.font)||void 0===re?void 0:re.name)},enumerable:!1,configurable:!0}),B.prototype._createChartScaleTopInfo=function(){return{name:D.PdfPageTableNames.chartScaleTop,size:new C.Size(this.chartWidth,this.taskAreaHelper.headerRowHeight),position:new S.Point(this.chartLeft,this.headerTableTop),style:this.chartScaleTableStyle,baseCellSize:new C.Size(this.baseCellWidth,this.taskAreaHelper.headerRowHeight),cells:this.chartTableScaleTopMatrix}},B.prototype._createChartScaleBottomInfo=function(){var K=this.taskAreaHelper.headerRowHeight;return{name:D.PdfPageTableNames.chartScaleBottom,size:new C.Size(this.chartWidth,K),position:new S.Point(this.chartLeft,this.headerTableTop+K),style:this.chartScaleTableStyle,baseCellSize:new C.Size(this.baseCellWidth,K),cells:this.chartTableScaleBottomMatrix}},B.prototype.createChartMainTableInfo=function(){return{name:D.PdfPageTableNames.chartMain,size:new C.Size(this.chartWidth,this.mainTableHeight),position:new S.Point(this.chartLeft,this.mainTableTop),style:this.chartMainTableStyle,baseCellSize:new C.Size(this.baseCellWidth,this.baseCellHeight),cells:this.chartTableBodyMatrix,hideRowLines:!this._owner.settings.areHorizontalBordersEnabled}},B.prototype.createTreeListHeaderTableInfo=function(){return{name:D.PdfPageTableNames.treeListHeader,size:new C.Size(this.treeListWidth,this.headerTableHeight),position:new S.Point(this.treeListLeft,this.headerTableTop),style:this.treeListTableStyle,baseCellSize:new C.Size(null,this.headerTableHeight),cells:this.treeListHeaderMatrix}},B.prototype.createTreeListMainTableInfo=function(){return{name:D.PdfPageTableNames.treeListMain,size:new C.Size(this.treeListWidth,this.mainTableHeight),position:new S.Point(this.treeListLeft,this.mainTableTop),style:this.treeListTableStyle,baseCellSize:new C.Size(null,this.baseCellHeight),cells:this.treeListBodyMatrix,hideRowLines:!this._owner.settings.areHorizontalBordersEnabled}},B.prototype.calculateChartScaleMatrix=function(K){for(var J=this.taskAreaHelper,ie=J.scaleRanges,re=new Array,Y=ie[K][1],Z=ie[K][0];Z<=Y;Z++){var Q=this.layoutCalculator.getScaleItemStart(Z,J.scales[K]),te=new _.CellDef(this._owner.renderHelper.getScaleItemTextByStart(Q,J.scales[K]));te.styles.cellPadding.assign(0),te.styles.minCellHeight=this.taskAreaHelper.headerRowHeight,te.styles.cellWidth.assign(0===K?J.scaleTopWidths[Z]:J.scaleBottomWidths[Z]),re.push(te)}return[re]},B.prototype.calculateChartTableBodyMatrix=function(){var K=this;this._chartTableBodyMatrix=new Array,this.visibleTaskIndices.length>0?this.visibleTaskIndices.forEach(function(J){return K._chartTableBodyMatrix.push(K.createChartTableBodyRow(J))}):this._chartTableBodyMatrix.push(this.createChartTableBodyRow(-1))},B.prototype.createChartTableBodyRow=function(K){var J=new _.CellDef;return this.rowHasChildren(K)&&J.styles.fillColor.assign(this.taskAreaHelper.parentRowBackColor),this.chartTableScaleBottomMatrix[0].map(function(ie){var re=new _.CellDef(J);return re.styles.cellWidth.assign(ie.styles.cellWidth),re})},B.prototype.rowHasSelection=function(K){return this._owner.rowHasSelection(K)},B.prototype.rowHasChildren=function(K){return this._owner.rowHasChildren(K)},B.prototype.calculateTreeListTableHeaderMatrix=function(){this._treeListHeaderMatrix=new Array;for(var K=this._owner,J=K.getTreeListColCount(),ie=new Array,re=0;re<J;re++){var q=new _.CellDef(K.getTreeListHeaderInfo(re));q.styles.minCellHeight=2*this.taskAreaHelper.headerRowHeight,ie.push(q)}this._treeListHeaderMatrix.push(ie)},B.prototype.calculateTreeListTableBodyMatrix=function(){this._treeListBodyMatrix=new Array,this.visibleTaskIndices.length>0?this.fillTreeListTableBodyMatrix(this._treeListBodyMatrix):this.fillTreeListEmptyTableBodyMatrix(this._treeListBodyMatrix)},B.prototype.fillTreeListTableBodyMatrix=function(K){for(var J,ie=this.visibleTaskIndices,re=this.treeListHeaderMatrix[0].length,q=0;q<ie.length;q++){for(var Y=new Array,Z=ie[q],Q=null===(J=this._owner.getTask(Z))||void 0===J?void 0:J.id,te=0;te<re;te++){var pe=new _.CellDef(this._owner.getTreeListCellInfo(Z,te,Q));pe.styles.cellWidth.hasValue()||pe.styles.cellWidth.assign(this.getTreeListColumnWidth(te)),this.rowHasChildren(ie[q])&&pe.styles.fillColor.assign(this.taskAreaHelper.parentRowBackColor),Y.push(pe)}K.push(Y)}},B.prototype.fillTreeListEmptyTableBodyMatrix=function(K){var J=new Array,ie=new _.CellDef(this._owner.getTreeListEmptyDataCellInfo());ie.styles.cellWidth.assign(this.treeListWidth),ie.styles.halign=k.PredefinedStyles.horizontalAlign[1],ie.styles.valign=k.PredefinedStyles.verticalAlign[1],J.push(ie),K.push(J)},B.prototype.getTreeListColumnWidth=function(K){var J=this.treeListHeaderMatrix[0][K],ie=J&&J.styles;return ie.cellWidth.getValue()||ie.minCellWidth||0},B.prototype.getObjectsLeftOffset=function(K){void 0===K&&(K=!1);var J=this.dataObjectLeftDelta;return K||(J+=this.taskAreaHelper.customRangeLeftOffset),J},Object.defineProperty(B.prototype,"dataObjectLeftDelta",{get:function(){var K;return null!==(K=this._dataObjectLeftDelta)&&void 0!==K||(this._dataObjectLeftDelta=this.getDataObjectLeftDelta()),this._dataObjectLeftDelta},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"dataObjectTopDelta",{get:function(){var K;return null!==(K=this._dataObjectTopDelta)&&void 0!==K||(this._dataObjectTopDelta=this.getDataObjectTopDelta()),this._dataObjectTopDelta},enumerable:!1,configurable:!0}),B.prototype.getChartScaleTableStyle=function(){var K=new h.StyleDef(this.taskAreaHelper.scaleTableStyle);return this._predefinedFont&&(K.font=this._predefinedFont),K},B.prototype.getChartMainTableStyle=function(){var K=new h.StyleDef(this.taskAreaHelper.chartMainTableStyle);return this._predefinedFont&&(K.font=this._predefinedFont),K},B.prototype.calculateTreeListTableStyle=function(){this._treeListTableStyle=new h.StyleDef(this._owner.getTreeListTableStyle()),this._treeListTableStyle.fillColor.assign(this.chartMainTableStyle.fillColor),this._treeListTableStyle.lineColor.assign(this.chartMainTableStyle.lineColor),this._predefinedFont&&(this._treeListTableStyle.font=this._predefinedFont)},B.prototype.getGanttObjectsInfo=function(){return{tasks:this.tasksInfo,dependencies:this.dependenciesInfo,resources:this.resourcesInfo,timeMarkers:this.timeMarkersInfo}},Object.defineProperty(B.prototype,"tasksInfo",{get:function(){var K;return null!==(K=this._tasksInfo)&&void 0!==K||(this._tasksInfo=this.calculateTasksInfo()),this._tasksInfo},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"dependenciesInfo",{get:function(){var K;return null!==(K=this._dependenciesInfo)&&void 0!==K||(this._dependenciesInfo=this.calculateDependenciesInfo()),this._dependenciesInfo},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"resourcesInfo",{get:function(){var K;return null!==(K=this._resourcesInfo)&&void 0!==K||(this._resourcesInfo=this.calculateResourcesInfo()),this._resourcesInfo},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"timeMarkersInfo",{get:function(){var K;return null!==(K=this._timeMarkersInfo)&&void 0!==K||(this._timeMarkersInfo=this.calculateTimeMarkersInfoInfo()),this._timeMarkersInfo},enumerable:!1,configurable:!0}),B.prototype.getDataObjectLeftDelta=function(){return this.chartLeft-this.taskAreaHelper.objectsLeftDelta},B.prototype.getDataObjectTopDelta=function(){return this.headerTableTop+this.headerTableHeight-this.taskAreaHelper.objectsTopDelta},B.prototype.calculateTasksInfo=function(){var K=this,J=new Array;return this.visibleTaskIndices.forEach(function(ie){return J.push(K.calculateTaskInfo(ie))}),J},B.prototype.calculateTaskInfo=function(K){var J=new a.PdfTaskInfo,ie=this.layoutCalculator.getTaskElementInfo(K);return J.taskColor=this.getTaskColor(K),J.sidePoints=this.getTaskSidePoints(K),J.isMilestone=ie.className.indexOf(d.GridLayoutCalculator.milestoneClassName)>0,J.isMilestone||(J.isSmallTask=ie.className.indexOf(d.GridLayoutCalculator.smallTaskClassName)>0,J.isParent=ie.className.indexOf(d.GridLayoutCalculator.parentTaskClassName)>0,this.appendTaskTitle(J,K),this.appendTaskProgress(J,K)),J},B.prototype.appendTaskTitle=function(K,J){var ie=this._owner.settings.taskTitlePosition;K.isSmallTask&&ie!==y.TaskTitlePosition.Outside||ie===y.TaskTitlePosition.None||(K.text=this._owner.getTaskText(J),K.textPosition=ie,K.textStyle=this.getTaskTextStyle(J))},B.prototype.appendTaskProgress=function(K,J){var ie=this.layoutCalculator.getTaskProgressElementInfo(J);K.progressWidth=ie.size.width,K.progressColor=this.getTaskProgressColor(J),K.progressColor.applyOpacityToBackground(K.taskColor)},B.prototype.getTaskSidePoints=function(K){var J=this,ie=this.layoutCalculator.getTaskSidePoints(K);return ie.forEach(function(re){re.x+=J.getObjectsLeftOffset(!0),re.y+=J.dataObjectTopDelta}),ie},B.prototype.getTaskColor=function(K){var J=this.taskAreaHelper.getTaskElementBackColor(K,d.GridLayoutCalculator.taskClassName);return new u.Color(J)},B.prototype.getTaskProgressColor=function(K){return new u.Color(this.taskAreaHelper.getTaskElementBackColor(K,d.GridLayoutCalculator.taskProgressClassName))},B.prototype.getTaskTextStyle=function(K){var J=new h.StyleDef;return J.cellPadding.assign(0),J.assign(this.taskAreaHelper.getTaskElementStyle(K,d.GridLayoutCalculator.taskTitleClassName)),J},B.prototype.calculateDependenciesInfo=function(){var K=this,J=new Array,ie=this.taskAreaHelper,re=new u.Color(ie.dependencyColor);return ie.connectorLines.forEach(function(q){return J.push(K.createLineInfo(q,re,ie.arrowWidth))}),J},B.prototype.createLineInfo=function(K,J,ie){var re=new c.PdfDependencyLineInfo;if(re.fillColor=J,K.className.indexOf(d.GridLayoutCalculator.arrowClassName)>-1){var q=this.layoutCalculator.getArrowPositionByClassName(K.className);re.arrowInfo={position:q,width:ie},re.points=[this.getArrowTopCorner(K,q,ie)]}else re.points=this.getLinePoints(K);return re},B.prototype.getArrowTopCorner=function(K,J,ie){var re=K.position.x+this.getObjectsLeftOffset(),q=K.position.y+this.dataObjectTopDelta;switch(J){case y.Position.Left:re+=ie;break;case y.Position.Top:q+=ie}return new S.Point(re,q)},B.prototype.getLinePoints=function(K){var J=K.position.x+this.getObjectsLeftOffset(),ie=K.position.y+this.dataObjectTopDelta,re=J+K.size.width,q=ie+K.size.height;return[new S.Point(J,ie),new S.Point(re,q)]},B.prototype.calculateResourcesInfo=function(){var K=this,J=new Array;return this.taskAreaHelper.resourcesElements.forEach(function(ie){return J=J.concat(K.calculateResourcesInLine(ie))}),J},B.prototype.calculateResourcesInLine=function(K){var J=new Array;if(K)for(var ie=T.DomUtils.pxToInt(K.style.left)+this.getObjectsLeftOffset(),re=T.DomUtils.pxToInt(K.style.top)+this.dataObjectTopDelta,q=K.getElementsByClassName(d.GridLayoutCalculator.taskResourceClassName),Y=0;Y<q.length;Y++){var Z=q[Y];if(this.taskAreaHelper.isElementVisible(Z)){var Q=getComputedStyle(Z);ie+=this.getMargin(Q).left,J.push(new s.PdfTaskResourcesInfo(Z.textContent,new h.StyleDef(Q),ie,re)),ie+=T.DomUtils.pxToInt(Q.width)}}return J},B.prototype.calculateTimeMarkersInfoInfo=function(){var K=this,J=new Array;return this.taskAreaHelper.stripLinesElements.forEach(function(ie){return J.push(K.createTimeMarkerInfo(ie,!0))}),this.taskAreaHelper.noWorkingIntervalsElements.forEach(function(ie){return J.push(K.createTimeMarkerInfo(ie,!1))}),J},B.prototype.createTimeMarkerInfo=function(K,J){var ie=getComputedStyle(K),re=T.DomUtils.pxToInt(ie.left)+this.getObjectsLeftOffset(),q=T.DomUtils.pxToInt(ie.top)+this.dataObjectTopDelta,Y=T.DomUtils.pxToInt(ie.width),Z=T.DomUtils.pxToInt(ie.height);return new N.PdfTimeMarkerInfo(new S.Point(re,q),new C.Size(Y,Z),new u.Color(ie.backgroundColor),new u.Color(ie.borderLeftColor),J)},B.prototype.getMargin=function(K){var J=new g.Margin(0);if(K){var ie=K.margin;ie||(ie+=K.marginTop||"0",ie+=" "+K.marginRight||0,ie+=" "+K.marginBottom||0,ie+=" "+K.marginLeft||0),J.assign(ie)}return J},B._defaultPageMargin=10,B._autoFormatWidthAddStock=1,B}();b.GanttExportCalculator=U},4991:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfDependencyLineInfo=void 0;var S=f(8900),T=f(405),y=function(){function d(){}return d.prototype.assign=function(c){var s;this._copyPoints(c.points),this.arrowInfo=c.arrowInfo,null!==(s=this.fillColor)&&void 0!==s||(this.fillColor=new T.Color),this.fillColor.assign(c.fillColor)},d.prototype._copyPoints=function(c){var s=this;this.points=new Array,c?.forEach(function(a){return s.points.push(new S.Point(a.x,a.y))})},d}();b.PdfDependencyLineInfo=y},266:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfObjectDrawer=void 0;var S=f(2449),T=f(817),y=f(3917),d=function(){function c(s,a){this._FONT_ROW_RATIO=1.15,this._info=a,this._pdfDoc=s}return c.prototype.draw=function(){this.drawTimeMarkers(),this.drawDependencies(),this.drawTasks(),this.drawResources()},c.prototype.drawTasks=function(){var s,a=this,u=null===(s=this._info)||void 0===s?void 0:s.tasks;u&&u.forEach(function(h){return a.drawTask(h)})},c.prototype.drawTask=function(s){var a=this._pdfDoc;a.setFillColor.apply(a,s.taskColor.getRBGColor()),a.setDrawColor.apply(a,s.taskColor.getRBGColor()),s.isMilestone?this.drawMilestone(s):this.drawRegularTask(s)},c.prototype.drawMilestone=function(s){var a=this._pdfDoc,u=s.sidePoints[0].x,h=s.sidePoints[0].y,x=s.sidePoints[2].x,w=s.sidePoints[2].y,D=s.sidePoints[3].x,C=s.sidePoints[3].y;a.triangle(u,h,s.sidePoints[1].x,s.sidePoints[1].y,x,w,"FD"),a.triangle(u,h,D,C,x,w,"FD")},c.prototype.drawRegularTask=function(s){var a=this._pdfDoc;a.rect(s.left,s.top,s.width,s.height,"FD"),s.isParent&&this.drawParentBorder(s),s.progressWidth&&(a.setFillColor.apply(a,s.progressColor.getRBGColor()),a.rect(s.left,s.top,s.progressWidth,s.height,"F")),s.text&&this.printTaskTitle(s)},c.prototype.drawParentBorder=function(s){var a=this._pdfDoc,u=s.sidePoints[0].x,h=s.sidePoints[1].y,g=s.sidePoints[3].y,_=s.sidePoints[2].x,x=s.sidePoints[3].y-s.sidePoints[1].y,w=s.progressWidth>x?s.progressColor.getRBGColor():s.taskColor.getRBGColor();a.setFillColor.apply(a,w),a.triangle(u,h,u,g,u+x,h,"FD"),a.setFillColor.apply(a,s.taskColor.getRBGColor()),a.triangle(_,h,_,g,_-x,h,"FD")},c.prototype.printTaskTitle=function(s){var a,u=this._pdfDoc,h=s.textStyle,g=h&&h.textColor.getRBGColor(),_=h&&h.fontSize;u.setTextColor.apply(u,g),u.setFontSize(_);var x=s.top+_*this._FONT_ROW_RATIO/u.internal.scaleFactor;s.isParent&&(x-=y.PdfTaskInfo.defaultParentHeightCorrection);var w=h&&h.cellPadding.left||0,D=h&&h.cellPadding.right||0;s.textPosition===S.TaskTitlePosition.Inside?(a=s.left+w,u.text(T.EllipsisHelper.limitPdfTextWithEllipsis(s.text,u,s.width-w-D),a,x)):u.text(s.text,a=s.left-D,x,{align:"right"})},c.prototype.drawDependencies=function(){var s,a=this,u=null===(s=this._info)||void 0===s?void 0:s.dependencies;u&&u.forEach(function(h){return a.drawDependencyLine(h)})},c.prototype.drawDependencyLine=function(s){var a,u;if((a=this._pdfDoc).setFillColor.apply(a,s.fillColor.getRBGColor()),(u=this._pdfDoc).setDrawColor.apply(u,s.fillColor.getRBGColor()),s.arrowInfo)this.drawArrow(s);else{var h=s.points;this._pdfDoc.line(h[0].x,h[0].y,h[1].x,h[1].y)}},c.prototype.isValidLine=function(s){var a=s.points;return!(isNaN(a[0].x)||isNaN(a[0].y)||isNaN(a[1].x)||isNaN(a[1].y))},c.prototype.drawArrow=function(s){var a=s.arrowInfo.width||0,u=s.points[0].x,h=s.points[0].y;switch(s.arrowInfo.position){case S.Position.Left:this._pdfDoc.triangle(u,h+a,u+a,h,u+a,h+2*a,"FD");break;case S.Position.Right:this._pdfDoc.triangle(u,h,u,h+2*a,u+a,h+a,"FD");break;case S.Position.Top:this._pdfDoc.triangle(u,h+a,u+a,h,u+2*a,h+a,"FD");break;case S.Position.Bottom:this._pdfDoc.triangle(u,h,u+a,h+a,u+2*a,h,"FD")}},c.prototype.drawResources=function(){var s,a=this,u=this._pdfDoc,h=null===(s=this._info)||void 0===s?void 0:s.resources;h&&h.forEach(function(g){var _,x,w;u.setFontSize(null!==(_=g.style.fontSize)&&void 0!==_?_:11);var D=g.y+g.style.fontSize*a._FONT_ROW_RATIO/u.internal.scaleFactor,C=null!==(x=g.style.cellPadding.left)&&void 0!==x?x:0,I=null!==(w=g.style.cellPadding.right)&&void 0!==w?w:1,L=Math.max(g.style.cellWidth.getValue(),C+u.getTextWidth(g.text)+I);u.setFillColor.apply(u,g.style.fillColor.getRBGColor()),u.rect(g.x,g.y,L,g.style.minCellHeight,"F"),u.setTextColor.apply(u,g.style.textColor.getRBGColor()),u.text(g.text,g.x+C,D)})},c.prototype.drawTimeMarkers=function(){var s,a=this,u=null===(s=this._info)||void 0===s?void 0:s.timeMarkers;u?.forEach(function(h){return a.drawTimeMarker(h)})},c.prototype.drawTimeMarker=function(s){var a,u,h=this._pdfDoc,g=s.size.width>1,_=s.start.x,x=s.start.y,w=s.size.width,D=s.size.height,C=s.isStripLine;g&&(h.setFillColor.apply(h,s.color.getRBGColor()),h.saveGraphicsState(),h.setGState(new h.GState({opacity:null!==(u=s.color.opacity)&&void 0!==u?u:1})),h.rect(_,x,w,D,"F"),h.restoreGraphicsState()),C&&(this._pdfDoc.setLineDashPattern([3]),(a=this._pdfDoc).setDrawColor.apply(a,s.lineColor.getRBGColor()),g&&this._pdfDoc.line(_+w,x,_+w,x+D,"S"),this._pdfDoc.line(_,x,_,x+D,"S"),this._pdfDoc.setLineDashPattern())},c}();b.PdfObjectDrawer=d},3917:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfTaskInfo=void 0;var S=f(8900),T=f(405),y=f(6995),d=function(){function c(){}return Object.defineProperty(c.prototype,"left",{get:function(){var s;return(null===(s=this.sidePoints)||void 0===s?void 0:s.length)>3?this.sidePoints[0].x:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"top",{get:function(){var s;return(null===(s=this.sidePoints)||void 0===s?void 0:s.length)>3?this.sidePoints[1].y:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"right",{get:function(){var s;return(null===(s=this.sidePoints)||void 0===s?void 0:s.length)>3?this.sidePoints[2].x:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"bottom",{get:function(){var s;return(null===(s=this.sidePoints)||void 0===s?void 0:s.length)>3?this.sidePoints[3].y:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"height",{get:function(){var s=this.bottom-this.top;return this.isParent&&(s-=c.defaultParentHeightCorrection),s},enumerable:!1,configurable:!0}),c.prototype.assign=function(s){var a,u,h;this.isMilestone=s.isMilestone,this._copyPoints(s.sidePoints),this.progressWidth=s.progressWidth,this.isSmallTask=s.isSmallTask,this.text=s.text,this.textPosition=s.textPosition,null!==(a=this.progressColor)&&void 0!==a||(this.progressColor=new T.Color),this.progressColor.assign(s.progressColor),null!==(u=this.taskColor)&&void 0!==u||(this.taskColor=new T.Color),this.taskColor.assign(s.taskColor),null!==(h=this.textStyle)&&void 0!==h||(this.textStyle=new y.StyleDef),this.textStyle.assign(s.textStyle),this.isParent=s.isParent},c.prototype._copyPoints=function(s){var a=this;this.sidePoints=new Array,s?.forEach(function(u){return a.sidePoints.push(new S.Point(u.x,u.y))})},c.defaultParentHeightCorrection=4,c}();b.PdfTaskInfo=d},2485:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfTaskResourcesInfo=void 0;var S=f(2491),T=f(6995),y=function(){function d(c,s,a,u){c&&(this.text=c),s&&(this.style=new T.StyleDef(s)),(0,S.isDefined)(a)&&(this.x=a),(0,S.isDefined)(u)&&(this.y=u)}return d.prototype.assign=function(c){this.text=c.text,this.style=new T.StyleDef(c.style),this.x=c.x,this.y=c.y},d}();b.PdfTaskResourcesInfo=y},7802:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfTimeMarkerInfo=void 0;var S=f(8900),T=f(6353),y=f(2491),d=f(405),c=function(){function s(a,u,h,g,_){this.lineColor=new d.Color,this.color=new d.Color,a&&(this.start=new S.Point(a.x,a.y)),u&&(this.size=new T.Size(u.width,u.height)),h&&this.color.assign(h),g&&this.lineColor.assign(g),(0,y.isDefined)(_)&&(this.isStripLine=_)}return s.prototype.assign=function(a){var u,h,g,_;a&&(this.start=new S.Point(null===(u=a.start)||void 0===u?void 0:u.x,null===(h=a.start)||void 0===h?void 0:h.y),this.size=new T.Size(null===(g=a.size)||void 0===g?void 0:g.width,null===(_=a.size)||void 0===_?void 0:_.height),this.isStripLine=a.isStripLine,this.color.assign(a.color),this.lineColor.assign(a.lineColor))},s}();b.PdfTimeMarkerInfo=c},2978:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfGanttExporter=void 0;var S=f(4970),T=function(){function y(d){if(!d.settings.pdfDoc&&!d.settings.docCreateMethod)throw new Error("Cannot convert gantt to pdf without document instance!");this._info=d}return y.prototype.export=function(){var d,c,s=this.pdfDoc;this.applyCustomFont();for(var a=this._info,u=new S.PdfGanttPageDrawer(s,a.settings),h=a.getPages(s),g=h.length,_=0;_<g;_++)_>0&&s.addPage(this.getDocumentFormat(),this.getOrientation()),u.drawPage(h[_]);return!(null===(d=this.props)||void 0===d)&&d.fileName&&s.save(null===(c=this.props)||void 0===c?void 0:c.fileName),s},Object.defineProperty(y.prototype,"pdfDoc",{get:function(){var d,c;return null!==(d=this._pdfDoc)&&void 0!==d||(this._pdfDoc=null!==(c=this._info.settings.pdfDoc)&&void 0!==c?c:this.createDoc()),this._pdfDoc},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"props",{get:function(){return this._info.settings},enumerable:!1,configurable:!0}),y.prototype.createDoc=function(){var d=this.getJsPDFProps();return this._info.settings.docCreateMethod(d)},y.prototype.getJsPDFProps=function(){var d={putOnlyUsedFonts:!0,unit:"px",hotfixes:["px_scaling"]};return d.orientation=this.getOrientation(),d.format=this.getDocumentFormat(),d},y.prototype.getOrientation=function(){var d;return null!==(d=this.props)&&void 0!==d&&d.landscape?"l":"p"},y.prototype.getDocumentFormat=function(){var d,c,s,a;return null!==(d=this.props)&&void 0!==d&&d.format||null!==(c=this.props)&&void 0!==c&&c.pageSize?null!==(s=this.props)&&void 0!==s&&s.pageSize?[this.props.pageSize.height,this.props.pageSize.width]:null===(a=this.props)||void 0===a?void 0:a.format:"a4"},y.prototype.applyCustomFont=function(){this.props.font&&this.props.font.applyToDoc(this.pdfDoc)},y}();b.PdfGanttExporter=T},8935:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfPageTableNames=void 0;var f=function(){function S(){}return S.treeListHeader="treeListHeader",S.treeListMain="treeListMain",S.chartMain="chartMain",S.chartScaleTop="chartScaleTop",S.chartScaleBottom="chartScaleBottom",S}();b.PdfPageTableNames=f},4970:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfGanttPageDrawer=void 0;var S=f(8900),T=f(266),y=f(8935),d=f(9895),c=f(5510),s=function(){function a(u,h){this._pdfDoc=u,this._props=h}return a.prototype.drawPage=function(u){var h=this._pdfDoc,g=new c.PdfGanttTableDrawer(h);return this.needDrawChart()&&(g.drawTable(u.tables[y.PdfPageTableNames.chartMain]),new T.PdfObjectDrawer(h,u.objects).draw(),g.drawTable(u.tables[y.PdfPageTableNames.chartScaleTop]),g.drawTable(u.tables[y.PdfPageTableNames.chartScaleBottom])),this.needDrawTreeList()&&(g.drawTable(u.tables[y.PdfPageTableNames.treeListMain]),g.drawTable(u.tables[y.PdfPageTableNames.treeListHeader])),this.drawMargins(u),h},a.prototype.needDrawChart=function(){return!this._props||this._props.exportMode===d.ExportMode.all||this._props.exportMode===d.ExportMode.chart},a.prototype.needDrawTreeList=function(){return!this._props||this._props.exportMode===d.ExportMode.all||this._props.exportMode===d.ExportMode.treeList},a.prototype.getContentRightBottom=function(u){var h=new S.Point(0,0);for(var g in u.tables)if(Object.prototype.hasOwnProperty.call(u.tables,g)){var _=u.tables[g];h.x=Math.max(h.x,_.position.x+_.size.width),h.y=Math.max(h.y,_.position.y+_.size.height)}return h},a.prototype.drawMargins=function(u){var h=this._pdfDoc,g=this._props,_=h.getPageWidth(),x=h.getPageHeight(),w=this.getContentRightBottom(u);h.setFillColor(255,255,255),h.rect(0,0,g.margins.left,x,"F"),h.rect(0,0,_,g.margins.top,"F"),h.rect(w.x,0,_,x,"F"),h.rect(0,w.y,_,x,"F")},a}();b.PdfGanttPageDrawer=s},4429:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PageNavigation=void 0;var f=function(){function S(T,y,d,c,s,a){this._correctedBottoms=new Array,this.vIndex=0,this.hIndex=0,this.pageX=0,this.pageY=0,this._top=T?.top,this._left=T?.left,this._bottom=T?.bottom,this._right=T?.right,this.vIndex=y??this.vIndex,this.hIndex=d??this.hIndex,this.pageX=c??this.pageX,this.pageY=s??this.pageY,a&&(this._correctedBottoms=a)}return S.prototype.offset=function(T,y){T&&this.offsetOneD(T),y&&this.offsetOneD(y,!0)},S.prototype.offsetOneD=function(T,y){for(var d=T,c=this.getSpaceToBorder(y);c<d;)y?(this.vIndex++,this.pageY=this._top):(this.hIndex++,this.pageX=this._left),d-=c,c=this.getSpaceToBorder(y);y?this.pageY+=d:this.pageX+=d},Object.defineProperty(S.prototype,"defaultPageHeight",{get:function(){return this.getCurrentPageBottom()-this._top},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"defaultPageWidth",{get:function(){return this._right-this._left},enumerable:!1,configurable:!0}),S.prototype.getPageEnd=function(T){return T?this.getCurrentPageBottom():this._right},S.prototype.getPageStart=function(T){return T?this._top:this._left},S.prototype.getPageSize=function(T,y){return T?this.getPageHeight(y):this.defaultPageWidth},S.prototype.getSpaceToBorder=function(T){return T?this.getCurrentPageBottom()-this.pageY:this._right-this.pageX},S.prototype.getPageGlobalOffset=function(T,y){if(!y)return T*this.defaultPageWidth;for(var d=0,c=1;c<=T;c++)d+=this.getPageHeight(c-1);return d},S.prototype.assign=function(T){this._top=T._top,this._left=T._left,this._bottom=T._bottom,this._right=T._right,this._correctedBottoms=T._correctedBottoms,this.vIndex=T.vIndex,this.hIndex=T.hIndex,this.pageX=T.pageX,this.pageY=T.pageY},S.createFrom=function(T){var y=new S;return y.assign(T),y},S.prototype.clone=function(){var T=new S;return T.assign(this),T},S.prototype.getCurrentPageBottom=function(){return this.getPageBottom(this.vIndex)},S.prototype.getPageBottom=function(T){var y;return null!==(y=this._correctedBottoms[T])&&void 0!==y?y:this._bottom},S.prototype.getPageHeight=function(T){return this.getPageBottom(T)-this._top},S}();b.PageNavigation=f},3424:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfGanttPaginator=void 0;var S=f(8900),T=f(6353),y=f(4991),d=f(3917),c=f(2485),s=f(7802),a=f(8935),u=f(6032),h=f(4429),g=function(w,D,C,I,L){this.pageVerIndex=D,this.pageHorIndex=w,this.cellRowIndexOnPage=C,this.cellColIndexOnPage=I,this.cell=L},_=function(){function w(D,C,I,L){this.pageIndex=D,this.globalCellIndex=C,this.pageOffset=I,this.cutSize=L}return Object.defineProperty(w.prototype,"isCutted",{get:function(){return this.cutSize>0},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"cellIndexOnPage",{get:function(){return this.globalCellIndex-this.pageOffset},enumerable:!1,configurable:!0}),w}(),x=function(){function w(D,C,I){this._pdfDoc=D,this._props=C,this._globalInfo=I}return w.prototype.getPages=function(){return delete this._pages,this._paginateTables(),this._paginateObjects(),this.pageMatrixToArray},w.prototype._paginateTables=function(){this._paginateTable(a.PdfPageTableNames.treeListHeader),this._paginateTable(a.PdfPageTableNames.treeListMain),this._paginateTable(a.PdfPageTableNames.chartScaleBottom),this._paginateTable(a.PdfPageTableNames.chartScaleTop),this._paginateTable(a.PdfPageTableNames.chartMain)},w.prototype._paginateObjects=function(){this._paginateTasks(),this._paginateDependencies(),this._paginateResources(),this._paginateTimeMarkers()},Object.defineProperty(w.prototype,"pageMatrixToArray",{get:function(){var D,C=new Array;return null===(D=this._pages)||void 0===D||D.forEach(function(I){C=C.concat(I)}),C},enumerable:!1,configurable:!0}),w.prototype._paginateTasks=function(){var D,C,I=this;null===(C=null===(D=this._globalInfo.objects)||void 0===D?void 0:D.tasks)||void 0===C||C.forEach(function(L){return I._paginateTask(L)})},w.prototype._paginateDependencies=function(){var D,C,I=this;null===(C=null===(D=this._globalInfo.objects)||void 0===D?void 0:D.dependencies)||void 0===C||C.forEach(function(L){L.arrowInfo?I._paginateArrow(L):I._paginateDependencyLine(L)})},w.prototype._paginateResources=function(){var D,C,I=this;null===(C=null===(D=this._globalInfo.objects)||void 0===D?void 0:D.resources)||void 0===C||C.forEach(function(L){return I._paginateResource(L)})},w.prototype._paginateTimeMarkers=function(){var D,C,I=this;null===(C=null===(D=this._globalInfo.objects)||void 0===D?void 0:D.timeMarkers)||void 0===C||C.forEach(function(L){return I._paginateTimeMarker(L)})},w.prototype._paginateTable=function(D){var C,I=null===(C=this._globalInfo)||void 0===C?void 0:C.tables[D];if(I){for(var L=this._getTableStart(I),N=this._preparePagesNavigationMatrixForTable(L,I),G=N.length,k=0;k<G;k++)for(var U=N[k].length,B=0;B<U;B++){var K=N[k][B],J=this._getPage(K.pageVerIndex,K.pageHorIndex,!0);this._setTablePositionOnPage(J,D,K.pageHorIndex===L.hIndex?L.pageX:this.pageLeft,K.pageVerIndex===L.vIndex?L.pageY:this.pageTop),this._addCellToPage(J,D,K)}this._updateTableSizeOnPages(D)}},w.prototype._paginateTask=function(D){for(var C=this._getTaskPagination(D),I=this._getTaskPagination(D,!0),L=0;L<I.length;L++)for(var N=0;N<C.length;N++){var G=new d.PdfTaskInfo;G.assign(D),this._offsetPoints(G.sidePoints,C[N].offset,I[L].offset),this._addTaskToPage(I[L].pageIndex,C[N].pageIndex,G)}},w.prototype._paginateArrow=function(D){var C=this._getPointPageInfo(D.points[0]),I=new y.PdfDependencyLineInfo;I.assign(D),this._offsetPoints(I.points,C.offsetX,C.offsetY),this._addDependencyToPage(C.pageVerIndex,C.pageHorIndex,I)},w.prototype._paginateDependencyLine=function(D){for(var C=this._getDependencyLinePagination(D),I=this._getDependencyLinePagination(D,!0),L=0;L<I.length;L++)for(var N=0;N<C.length;N++){var G=new y.PdfDependencyLineInfo;G.assign(D),this._offsetPoints(G.points,C[N].offset,I[L].offset),this._addDependencyToPage(I[L].pageIndex,C[N].pageIndex,G)}},w.prototype._paginateResource=function(D){var C=this._getPointPageInfo(new S.Point(D.x,D.y)),I=new c.PdfTaskResourcesInfo;I.assign(D),I.x-=C.offsetX,I.y-=C.offsetY,this._addResourceToPage(C.pageVerIndex,C.pageHorIndex,I)},w.prototype._paginateTimeMarker=function(D){for(var C=this._getTimeMarkerPagination(D),I=this._getTimeMarkerPagination(D,!0),L=0;L<I.length;L++)for(var N=0;N<C.length;N++){var G=new s.PdfTimeMarkerInfo;G.assign(D),G.start.x-=C[N].offset,G.start.y-=I[L].offset,this._addTimeMarkerToPage(I[L].pageIndex,C[N].pageIndex,G)}},w.prototype._getTableStart=function(D){var C=new h.PageNavigation(this.pageBorders,0,0,0,0,this.correctedPageBottoms);return C.offset(D.position.x,D.position.y),C},w.prototype._getPage=function(D,C,I){return I&&this._extendPageMatrixIfRequired(D,C),this._pages[D]&&this._pages[D][C]},w.prototype._getTableOrCreate=function(D,C){var I,L;return null!==(I=(L=D.tables)[C])&&void 0!==I||(L[C]=this._createTable(C)),D.tables[C]},w.prototype._preparePagesNavigationMatrixForTable=function(D,C){for(var I=new Array,L=this._getTableNavigationVector(D,C,!0),N=L.length,G=0;G<N;G++){for(var k=new Array,U=L[G],B=this._getTableNavigationVector(D,C,!1,U.globalCellIndex),K=B.length,J=0;J<K;J++){var ie=B[J],q=this._prepareCuttedCell(C.cells[U.globalCellIndex][ie.globalCellIndex],ie,U,C.name===a.PdfPageTableNames.chartScaleTop),Y=new g(ie.pageIndex,U.pageIndex,U.cellIndexOnPage,ie.cellIndexOnPage,q);k.push(Y)}I.push(k)}return I},w.prototype._setTablePositionOnPage=function(D,C,I,L){this._getTableOrCreate(D,C).position=new S.Point(I,L)},w.prototype._extendPageMatrixIfRequired=function(D,C){var I;null!==(I=this._pages)&&void 0!==I||(this._pages=new Array);for(var L=this._pages.length;L<=D;L++)this._pages.push(new Array);var N=this._pages[D];for(L=N.length;L<=C;L++)N.push(this._createPage())},w.prototype._getTableAndExtendIfRequired=function(D,C,I,L){for(var N=this._getTableOrCreate(D,C),G=N.cells,k=G.length;k<=I;k++)G.push(new Array);var U=G[I];for(k=U.length;k<=L;k++)U.push(new u.CellDef);return N},w.prototype._createPage=function(){return{objects:{tasks:null,dependencies:null,resources:null,timeMarkers:null},tables:{}}},w.prototype._createTable=function(D){var C,I=null===(C=this._globalInfo)||void 0===C?void 0:C.tables[D];return{name:D,size:null,position:null,style:I.style,baseCellSize:I.baseCellSize,cells:new Array,hideRowLines:I.hideRowLines}},w.prototype._addCellToPage=function(D,C,I){var L=I.cellRowIndexOnPage,N=I.cellColIndexOnPage;this._getTableAndExtendIfRequired(D,C,L,N).cells[L][N].assign(I.cell)},w.prototype._updateTableSizeOnPages=function(D){for(var C,I=null===(C=this._pages[0])||void 0===C?void 0:C.length,L=this._pages.length,N=0;N<L;N++)for(var G=0;G<I;G++)this._updateTableSizeOnPage(this._pages[N][G],D)},w.prototype._updateTableSizeOnPage=function(D,C){var I,L=this,N=D?.tables[C];if(N){var G=N.cells.length*N.baseCellSize.height||0,k=(null===(I=N.cells[0])||void 0===I?void 0:I.reduce(function(U,B,K){return U+L._getCellWidth(N,0,K)},0))||0;N.size=new T.Size(k,G)}},w.prototype._getTableNavigationVector=function(D,C,I,L){var N,G;void 0===I&&(I=!1),void 0===L&&(L=0);for(var k=new Array,U=h.PageNavigation.createFrom(D),B=I?null===(N=C.cells)||void 0===N?void 0:N.length:null===(G=C.cells[L])||void 0===G?void 0:G.length,K=0;K<B;K++){var J=I?C.baseCellSize.height:this._getCellWidth(C,L,K);this._placeCell(k,U,K,J,I)}return k},w.prototype._placeCell=function(D,C,I,L,N){var G,k,U=N?C.vIndex:C.hIndex,B=null!==(k=null===(G=D[D.length-1])||void 0===G?void 0:G.pageOffset)&&void 0!==k?k:I,K=L,J=C.getSpaceToBorder(N);C.offsetOneD(L,N);var ie=N?C.vIndex:C.hIndex;if(!N)for(var re=U;re<ie;re++){var q=new _(re,I,B,J);B=I,D.push(q),K-=J,J=C.getPageSize(N)}ie!==U&&(B=I);var Y=new _(ie,I,B,K!==L?K:null);D.push(Y)},w.prototype._prepareCuttedCell=function(D,C,I,L){var N=new u.CellDef(D);if(C.isCutted){var G=C.cutSize;if(!L){var k=N.content,U=D.styles,K=this._pdfDoc.splitTextToSize(k,G-(U&&U.cellPadding.left||0)-(U&&U.cellPadding.right||0));D.content=k.replace(K[0],""),N.content=K[0]}N.styles.cellWidth.assign(G)}return I.isCutted&&(N.styles.minCellHeight=I.cutSize),N},w.prototype._getCellWidth=function(D,C,I){var L,N=D.cells[C][I],G=N.styles;return G.cellWidth.getValue()??G.minCellWidth??D.baseCellSize.width*(null!==(L=N.colSpan)&&void 0!==L?L:1)},w.prototype._getTaskPagination=function(D,C){return this._getLinePagination(C?D.top:D.left,C?D.height:D.width,C)},w.prototype._getDependencyLinePagination=function(D,C){var I=D.points[0],L=D.points[1];return this._getLinePagination(C?I.y:I.x,C?L.y-I.y:L.x-I.x,C)},w.prototype._getTimeMarkerPagination=function(D,C){return this._getLinePagination(C?D.start.y:D.start.x,C?D.size.height:D.size.width,C)},w.prototype._getLinePagination=function(D,C,I){var L=new Array,N=this.pageNavigator.clone();N.offsetOneD(D,I);var G=I?N.vIndex:N.hIndex;N.offsetOneD(C,I);for(var k=I?N.vIndex:N.hIndex,U=G;U<=k;U++)L.push({offset:N.getPageGlobalOffset(U,I),pageIndex:U});return L},w.prototype._getPointPageInfo=function(D){var C=this.pageNavigator.clone();return C.offset(D.x,D.y),{offsetX:C.getPageGlobalOffset(C.hIndex),offsetY:C.getPageGlobalOffset(C.vIndex,!0),pageHorIndex:C.hIndex,pageVerIndex:C.vIndex}},Object.defineProperty(w.prototype,"pageWidth",{get:function(){var D;return null===(D=this._pdfDoc)||void 0===D?void 0:D.getPageWidth()},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageHeight",{get:function(){var D;return null===(D=this._pdfDoc)||void 0===D?void 0:D.getPageHeight()},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageLeftMargin",{get:function(){var D;return null===(D=this._props)||void 0===D?void 0:D.margins.left},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageTopMargin",{get:function(){var D;return null===(D=this._props)||void 0===D?void 0:D.margins.top},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageRightMargin",{get:function(){var D;return null===(D=this._props)||void 0===D?void 0:D.margins.right},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageBottomMargin",{get:function(){var D;return null===(D=this._props)||void 0===D?void 0:D.margins.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageLeft",{get:function(){var D;return null!==(D=this._pageLeft)&&void 0!==D||(this._pageLeft=this.pageLeftMargin),this._pageLeft},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageRight",{get:function(){var D;return null!==(D=this._pageRight)&&void 0!==D||(this._pageRight=this.pageWidth-this.pageRightMargin),this._pageRight},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageTop",{get:function(){var D;return null!==(D=this._pageTop)&&void 0!==D||(this._pageTop=this.pageTopMargin),this._pageTop},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageBottom",{get:function(){var D;return null!==(D=this._pageBottom)&&void 0!==D||(this._pageBottom=this.pageHeight-this.pageBottomMargin),this._pageBottom},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageBorders",{get:function(){return{left:this.pageLeft,top:this.pageTop,bottom:this.pageBottom,right:this.pageRight}},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"correctedPageBottoms",{get:function(){var D;return null!==(D=this._correctedPageBottoms)&&void 0!==D||(this._correctedPageBottoms=this._getCorrectedPagesBottom()),this._correctedPageBottoms},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pageNavigator",{get:function(){var D;return null!==(D=this._pageNavigator)&&void 0!==D||(this._pageNavigator=new h.PageNavigation(this.pageBorders,0,0,0,0,this.correctedPageBottoms)),this._pageNavigator},enumerable:!1,configurable:!0}),w.prototype._getCorrectedPagesBottom=function(){var D,C,I,L,N=new Array,G=null===(D=this._globalInfo)||void 0===D?void 0:D.tables,k=null!==(C=G[a.PdfPageTableNames.treeListMain])&&void 0!==C?C:G[a.PdfPageTableNames.chartMain],U=new h.PageNavigation(this.pageBorders);U.pageY=k.position.y;for(var B=0;B<k.cells.length;B++){var K=null!==(L=null===(I=k.cells[B][0].styles)||void 0===I?void 0:I.minCellHeight)&&void 0!==L?L:k.baseCellSize.height,J=U.vIndex,ie=U.pageY;U.offsetOneD(K,!0),J!==U.vIndex&&(N.push(ie),U.pageY=U.getPageStart(!0)+K)}return N},w.prototype._addTaskToPage=function(D,C,I){var L,N,G=this._getPage(D,C);G&&(null!==(L=(N=G.objects).tasks)&&void 0!==L||(N.tasks=new Array),G.objects.tasks.push(I))},w.prototype._addDependencyToPage=function(D,C,I){var L,N,G=this._getPage(D,C);G&&(null!==(L=(N=G.objects).dependencies)&&void 0!==L||(N.dependencies=new Array),G.objects.dependencies.push(I))},w.prototype._addResourceToPage=function(D,C,I){var L,N,G=this._getPage(D,C);G&&(null!==(L=(N=G.objects).resources)&&void 0!==L||(N.resources=new Array),G.objects.resources.push(I))},w.prototype._addTimeMarkerToPage=function(D,C,I){var L,N,G=this._getPage(D,C);G&&(null!==(L=(N=G.objects).timeMarkers)&&void 0!==L||(N.timeMarkers=new Array),G.objects.timeMarkers.push(I))},w.prototype._offsetPoints=function(D,C,I){D.forEach(function(L){L.x-=C,L.y-=I})},w}();b.PdfGanttPaginator=x},5763:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ScalingHelper=void 0;var S=f(8935),T=function(){function y(d){this._doc=d}return Object.defineProperty(y.prototype,"_docScaleFactor",{get:function(){var d,c;return null===(c=null===(d=this._doc)||void 0===d?void 0:d.internal)||void 0===c?void 0:c.scaleFactor},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"_correctScaleNeeded",{get:function(){return this._docScaleFactor&&Math.abs(this._docScaleFactor-y._defaultScaleFactor)>Number.EPSILON},enumerable:!1,configurable:!0}),y.prototype.getScaledSize=function(d){return d*y._defaultScaleFactor/this._docScaleFactor},y.prototype.scalePageMargins=function(d){var c,s,a,u;this._correctScaleNeeded&&(!(null===(c=d?.margins)||void 0===c)&&c.left&&(d.margins.left=this.getScaledSize(d.margins.left)),!(null===(s=d?.margins)||void 0===s)&&s.right&&(d.margins.right=this.getScaledSize(d.margins.right)),!(null===(a=d?.margins)||void 0===a)&&a.top&&(d.margins.top=this.getScaledSize(d.margins.top)),null!==(u=d?.margins)&&void 0!==u&&u.bottom&&(d.margins.bottom=this.getScaledSize(d.margins.bottom)))},y.prototype.scaleSizes=function(d){this._correctScaleNeeded&&(this.scaleTables(d),this.scaleObjects(d.objects))},y.prototype.scaleTables=function(d){d?.tables&&(this.scaleTable(d.tables[S.PdfPageTableNames.treeListHeader]),this.scaleTable(d.tables[S.PdfPageTableNames.treeListMain]),this.scaleTable(d.tables[S.PdfPageTableNames.chartMain]),this.scaleTable(d.tables[S.PdfPageTableNames.chartScaleTop]),this.scaleTable(d.tables[S.PdfPageTableNames.chartScaleBottom]))},y.prototype.scaleTable=function(d){var c,s,a,u,h,g;if(d&&(!(null===(c=d.size)||void 0===c)&&c.width&&(d.size.width=this.getScaledSize(d.size.width)),!(null===(s=d.size)||void 0===s)&&s.height&&(d.size.height=this.getScaledSize(d.size.height)),!(null===(a=d.position)||void 0===a)&&a.x&&(d.position.x=this.getScaledSize(d.position.x)),!(null===(u=d.position)||void 0===u)&&u.y&&(d.position.y=this.getScaledSize(d.position.y)),!(null===(h=d.baseCellSize)||void 0===h)&&h.width&&(d.baseCellSize.width=this.getScaledSize(d.baseCellSize.width)),!(null===(g=d.baseCellSize)||void 0===g)&&g.height&&(d.baseCellSize.height=this.getScaledSize(d.baseCellSize.height)),d.cells))for(var _=0;_<d.cells.length;_++)for(var x=d.cells[_],w=0;w<x.length;w++)this.scaleStyle(x[w].styles)},y.prototype.scaleObjects=function(d){this.scaleTasks(d?.tasks),this.scaleDependencies(d?.dependencies),this.scaleResources(d?.resources),this.scaleTimeMarkers(d?.timeMarkers)},y.prototype.scaleTasks=function(d){var c=this;d?.forEach(function(s){c.scalePoints(s.sidePoints),s.progressWidth=c.getScaledSize(s.progressWidth),c.scaleStyle(s.textStyle)})},y.prototype.scaleDependencies=function(d){var c=this;d?.forEach(function(s){var a;c.scalePoints(s.points),null!==(a=s.arrowInfo)&&void 0!==a&&a.width&&(s.arrowInfo.width=c.getScaledSize(s.arrowInfo.width))})},y.prototype.scaleResources=function(d){var c=this;d?.forEach(function(s){s.x=c.getScaledSize(s.x),s.y=c.getScaledSize(s.y),c.scaleStyle(s.style)})},y.prototype.scaleTimeMarkers=function(d){var c=this;d?.forEach(function(s){s.start.x=c.getScaledSize(s.start.x),s.start.y=c.getScaledSize(s.start.y),s.size.width=c.getScaledSize(s.size.width),s.size.height=c.getScaledSize(s.size.height)})},y.prototype.scaleStyle=function(d){var c,s,a,u;if(d){var h=d.cellWidth;if(h?.hasValue()){var g=this.getScaledSize(Number(h.getValue()));h.assign(g)}d.minCellHeight&&(d.minCellHeight=this.getScaledSize(d.minCellHeight)),d.minCellWidth&&(d.minCellWidth=this.getScaledSize(d.minCellWidth)),!(null===(c=d.cellPadding)||void 0===c)&&c.left&&(d.cellPadding.left=this.getScaledSize(d.cellPadding.left)),!(null===(s=d.cellPadding)||void 0===s)&&s.right&&(d.cellPadding.right=this.getScaledSize(d.cellPadding.right)),!(null===(a=d.cellPadding)||void 0===a)&&a.top&&(d.cellPadding.top=this.getScaledSize(d.cellPadding.top)),null!==(u=d.cellPadding)&&void 0!==u&&u.bottom&&(d.cellPadding.bottom=this.getScaledSize(d.cellPadding.bottom))}},y.prototype.scalePoints=function(d){var c=this;d?.forEach(function(s){s.x=c.getScaledSize(s.x),s.y=c.getScaledSize(s.y)})},y._defaultScaleFactor=.75,y}();b.ScalingHelper=T},7223:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfCustomFontSettings=void 0;var S=f(2491),T=function(){function y(d){this.style="normal",d&&this.assign(d)}return y.prototype.assign=function(d){(0,S.isDefined)(d.fontObject)&&(this.fontObject=d.fontObject),(0,S.isDefined)(d.name)&&(this.name=d.name),(0,S.isDefined)(d.style)&&(this.style=d.style),(0,S.isDefined)(d.weight)&&(this.weight=d.weight)},y.prototype.applyToDoc=function(d){try{if(d&&this.fontObject&&this.name){var c=this.name+"-"+this.style+".ttf";d.addFileToVFS(c,this.fontObject),d.addFont(c,this.name,this.style,this.weight),d.setFont(this.name)}}catch{}},y}();b.PdfCustomFontSettings=T},6431:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfDataRange=void 0;var S=f(2491),T=function(){function y(d,c,s,a){var u=!d||d instanceof Date?{startDate:d,endDate:c,startIndex:s,endIndex:a}:d;u&&this.assign(u)}return y.prototype.assign=function(d){(0,S.isDefined)(d.startDate)&&(this.startDate=d.startDate instanceof Date?d.startDate:new Date(d.startDate)),(0,S.isDefined)(d.endDate)&&(this.endDate=d.endDate instanceof Date?d.endDate:new Date(d.endDate)),(0,S.isDefined)(d.startIndex)&&(this.startIndex=parseInt(d.startIndex)),(0,S.isDefined)(d.endIndex)&&(this.endIndex=parseInt(d.endIndex))},y}();b.PdfDataRange=T},9895:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.DataExportMode=b.ExportMode=void 0,(f=b.ExportMode||(b.ExportMode={}))[f.all=0]="all",f[f.treeList=1]="treeList",f[f.chart=2]="chart",function(f){f[f.all=0]="all",f[f.visible=1]="visible"}(b.DataExportMode||(b.DataExportMode={}))},6997:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttPdfExportProps=void 0;var S=f(6353),T=f(2491),y=f(5063),d=f(6431),c=f(7223),s=f(9895),a=function(){function u(h){this.landscape=!1,this.margins=null,this.exportMode=s.ExportMode.all,this.exportDataMode=s.DataExportMode.visible,h&&this.assign(h)}return u.prototype.assign=function(h){if(h){if((0,T.isDefined)(h.pdfDocument)&&(this.pdfDoc=h.pdfDocument),(0,T.isDefined)(h.pdfDoc)&&(this.pdfDoc=h.pdfDoc),this.docCreateMethod=h.docCreateMethod,(0,T.isDefined)(h.fileName)&&(this.fileName=h.fileName),this.landscape=!!h.landscape,(0,T.isDefined)(h.margins)&&(this.margins=new y.Margin(h.margins)),(0,T.isDefined)(h.format)){var g=h.format;if("string"==typeof g)this.format=g;else{var _=parseInt(g.width),x=parseInt(g.height);this.pageSize=new S.Size(_,x)}}else if((0,T.isDefined)(h.pageSize)){var w=h.pageSize;this.pageSize=w instanceof S.Size?w.clone():new S.Size(w.width,w.height)}if((0,T.isDefined)(h.exportMode)&&(this.exportMode=this.getEnumValue(s.ExportMode,h.exportMode)),(0,T.isDefined)(h.dateRange)){var D=h.dateRange;"number"==typeof D||"string"==typeof D?this.exportDataMode=this.getEnumValue(s.DataExportMode,D):this.dateRange=new d.PdfDataRange(D)}(0,T.isDefined)(h.font)&&(this.font=new c.PdfCustomFontSettings(h.font))}},u.prototype.getEnumValue=function(h,g){if(!(0,T.isDefined)(h[g]))return null;var _=parseInt(g);return isNaN(_)?h[g]:_},u.autoFormatKey="auto",u}();b.GanttPdfExportProps=a},6032:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CellDef=void 0;var S=f(2491),T=f(6995),y=function(){function d(c,s,a){this.content="","string"==typeof c?(this.content=c,this.colSpan=s,a&&this.appendStyles(a)):c&&this.assign(c)}return Object.defineProperty(d.prototype,"styles",{get:function(){return this._styles||(this._styles=new T.StyleDef),this._styles},enumerable:!1,configurable:!0}),d.prototype.assign=function(c){(0,S.isDefined)(c.content)&&(this.content=c.content),(0,S.isDefined)(c.colSpan)&&(this.colSpan=c.colSpan),c.styles&&this.appendStyles(c.styles)},d.prototype.appendStyles=function(c){c&&this.styles.assign(c)},d.prototype.hasValue=function(){return!0},d.prototype.getValue=function(){var c={};return c.content=this.content,this.colSpan>1&&(c.colSpan=this.colSpan),this._styles&&(c.styles=this._styles.getValue()),c},d}();b.CellDef=y},405:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Color=void 0;var S=f(2491),T=function(){function y(d){this._num=null,this._opacity=1,this._rgb=null,this.assign(d)}return Object.defineProperty(y.prototype,"opacity",{get:function(){return this._opacity},enumerable:!1,configurable:!0}),y.prototype.hasValue=function(){return(0,S.isDefined)(this._num)||!!this._rgb||0===this._opacity},y.prototype.getValue=function(){return!(0===this._opacity&&!this._rgb)&&((0,S.isDefined)(this._num)?this._num:this._rgb?this.getRBGColor():null)},y.prototype.assign=function(d){this.reset(),"string"==typeof d&&this.assignFromString(d),"number"==typeof d&&(this._num=d),d instanceof Array&&this.assignFromRgbArray(d),d instanceof y&&this.assignFromColor(d)},y.prototype.reset=function(){this._opacity=1,this._num=null,this._rgb=null},y.prototype.assignFromString=function(d){d&&("transparent"===d&&(this._opacity=0),0===d.indexOf("#")&&this.assignFromHexString(d),"rgb"===d.substr(0,3).toLowerCase()&&this.assignFromRgbString(d))},y.prototype.assignFromHexString=function(d){if(4===d.length&&(d="#"+d[1].repeat(2)+d[2].repeat(2)+d[3].repeat(2)),d.length>6){var c=parseInt(d.substr(1,2),16),s=parseInt(d.substr(3,2),16),a=parseInt(d.substr(5,2),16);this._rgb=[c,s,a]}},y.prototype.assignFromRgbString=function(d){var c="rgba"===d.substr(0,4).toLowerCase(),s=d.toLowerCase().match(c?y.rgbaRegexp:y.rgbRegexp);if(s){var a=parseInt(s[1]),u=parseInt(s[2]),h=parseInt(s[3]);this._rgb=[a,u,h],c&&(this._opacity=parseFloat(s[4]))}},y.prototype.assignFromRgbArray=function(d){d&&d.length>2&&(this._rgb=[d[0],d[1],d[2]],(0,S.isDefined)(d[3])&&(this._opacity=d[3]))},y.prototype.assignFromColor=function(d){this._opacity=d._opacity,this._num=d._num,this._rgb=d._rgb},y.prototype.getRBGColor=function(){return this._rgb?this._rgb:[0,0,0]},y.prototype.applyOpacityToBackground=function(d){if(1!==this._opacity){var c=(d instanceof y?d:new y(d)).getValue();if(c instanceof Array){var s=this.opacity,a=Math.round((1-s)*c[0]+s*this._rgb[0]),u=Math.round((1-s)*c[1]+s*this._rgb[1]),h=Math.round((1-s)*c[2]+s*this._rgb[2]);this._rgb=[a,u,h]}}},y.rgbRegexp=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/,y.rgbaRegexp=/rgba?\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,?\s*([0-9]*\.?[0-9]*)\s*\)/,y}();b.Color=T},5510:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PdfGanttTableDrawer=void 0;var S=f(2491),T=f(8935),y=f(817),d=f(7624),c=function(){function s(a){this._pdfDoc=a}return s.prototype.drawTable=function(a){var u,h;if(a){var g=this.createTableOptions(a);!(null===(u=a.style)||void 0===u)&&u.fontSize&&this._pdfDoc.setFontSize(null===(h=a.style)||void 0===h?void 0:h.fontSize),this._pdfDoc.autoTable(g.getValue())}},s.prototype.createTableOptions=function(a){var u=this.createDefaultTableOptions();return this.addTableCommonSettings(a,u),this.addCommonTableStyles(a,u),this.prepareBodyCells(a),u.addBody(a.cells),a.hideRowLines&&this.hideRowLines(u),u},s.prototype.createDefaultTableOptions=function(){var a=new d.TableOptions;return a.pageBreak="auto",a.margin.assign(0),a.tableWidth.assign("auto"),a.styles.cellPadding.assign(0),a.styles.halign="center",a.styles.valign="middle",a.styles.lineWidth=1,a.styles.overflow="hidden",a},s.prototype.addTableCommonSettings=function(a,u){u.startY=a.position.y,u.margin.assign({left:a.position.x}),u.tableWidth.assign(a.size.width)},s.prototype.addCommonTableStyles=function(a,u){var h=u.styles;h.assign(a.style),0===h.fillColor.opacity&&h.fillColor.assign("#FFFFFF"),h.minCellHeight=a.baseCellSize.height,u.alternateRowStyles.minCellHeight=u.styles.minCellHeight,u.alternateRowStyles.fillColor.assign(u.styles.fillColor),(0,S.isDefined)(a.baseCellSize.width)&&h.cellWidth.assign(a.baseCellSize.width)},s.prototype.prepareBodyCells=function(a){var u,h,g;if(a.name===T.PdfPageTableNames.treeListMain||a.name===T.PdfPageTableNames.chartScaleTop||a.name===T.PdfPageTableNames.chartScaleBottom)for(var _=a.cells,x=0;x<_.length;x++)for(var w=_[x],D=0;D<w.length;D++){var C=w[D],I=C.styles,L=(null===(u=I?.cellWidth)||void 0===u?void 0:u.getValue())||a.baseCellSize.width||0,N=null!==(h=I?.cellPadding.left)&&void 0!==h?h:0,G=null!==(g=I?.cellPadding.right)&&void 0!==g?g:0,k=Math.max(L-N-G-s.cellEllipsisSpace,0);C.content=y.EllipsisHelper.limitPdfTextWithEllipsis(C.content,this._pdfDoc,k)}},s.prototype.hideRowLines=function(a){a.styles.lineWidth=0,a.onDrawCellCallback=function(u){var h=u.cell,g=u.doc,_=h.styles.lineColor,x=h.x,w=h.x+h.styles.cellWidth,D=h.y,C=h.y+u.row.height,I=u.column.index===u.table.columns.length-1,L=u.row.index===u.table.body.length-1,N=0===u.row.index;g.setDrawColor(_[0],_[1],_[2]),g.setLineWidth(1),g.line(x,C,x,D),I&&g.line(w,C,w,D),N&&g.line(x,D,w,D),L&&g.line(x,C,w,C)}},s.cellEllipsisSpace=3,s}();b.PdfGanttTableDrawer=c},817:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EllipsisHelper=void 0;var f=function(){function S(){}return S.limitPdfTextWithEllipsis=function(T,y,d){if(!y?.getTextWidth||!d)return T;if(y.getTextWidth(T.toString())>d){for(var c=T,s=T.length-1;y.getTextWidth(c)>d&&s>0;)c=c.substring(0,s)+S.ellipsis,s--;return c}return T},S.ellipsis="...",S}();b.EllipsisHelper=f},5063:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Margin=void 0;var S=f(2491),T=f(6907),y=function(){function d(c){this.assign(c)}return d.prototype.assign=function(c){(0,S.isDefined)(c)&&("string"==typeof c?this.assignFromString(c):"number"==typeof c||c instanceof Array?this.assignWithValues(c):this.assignWithMargin(c||c))},d.prototype.assignFromString=function(c){var s=c.split(" ").map(function(a){return T.DomUtils.pxToInt(a)});this.assignWithValues(s)},d.prototype.assignWithMargin=function(c){(0,S.isDefined)(c.top)&&(this.top=c.top),(0,S.isDefined)(c.right)&&(this.right=c.right),(0,S.isDefined)(c.bottom)&&(this.bottom=c.bottom),(0,S.isDefined)(c.left)&&(this.left=c.left)},d.prototype.assignWithValues=function(c){var s=this.getCorrectedValues(c);this.top=s[0],this.right=s[1],this.bottom=s[2],this.left=s[3]},d.prototype.getCorrectedValues=function(c){var s=[this.top,this.right,this.bottom,this.left];if("number"==typeof c)s=[c,c,c,c];else{var a=c;switch(a.length){case 1:s=[a[0],a[0],a[0],a[0]];break;case 2:s=[a[0],a[1],a[0],a[1]];break;case 3:s=[a[0],a[1],a[2],a[1]];break;default:a.forEach(function(u,h){return s[h]=u})}}return s},d.prototype.hasValue=function(){return(0,S.isDefined)(this.top)||(0,S.isDefined)(this.left)||(0,S.isDefined)(this.right)||(0,S.isDefined)(this.bottom)},d.prototype.getValue=function(){if(!this.hasValue())return null;if(this.top===this.bottom&&this.left===this.right&&this.top===this.left)return this.top;var c={};return(0,S.isDefined)(this.top)&&(c.top=this.top),(0,S.isDefined)(this.left)&&(c.left=this.left),(0,S.isDefined)(this.right)&&(c.right=this.right),(0,S.isDefined)(this.bottom)&&(c.bottom=this.bottom),c},d}();b.Margin=y},2642:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PredefinedStyles=void 0;var f=function(){function S(){}return S.getPredefinedStringOrUndefined=function(T,y){var d=T&&y&&T.toLowerCase()||void 0;return d&&(y.filter(function(c){return c.toLowerCase()===d})[0]||y.filter(function(c){return d.indexOf(c.toLowerCase())>-1})[0])},S.fontFamilies=["helvetica","times","courier"],S.fontStyles=["normal","bold","italic","bolditalic"],S.headerFooterVisibility=["everyPage","firstPage","never"],S.horizontalAlign=["left","center","right"],S.overflow=["linebreak","ellipsize","visible","hidden"],S.pageBreak=["auto","avoid","always"],S.rowPageBreak=["auto","avoid"],S.verticalAlign=["top","middle","bottom"],S.width=["auto","wrap"],S}();b.PredefinedStyles=f},6995:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.StyleDef=void 0;var S=f(2491),T=f(6907),y=f(405),d=f(2642),c=f(5063),s=f(7343),a=function(){function u(h){this._fillColor=new y.Color,this._textColor=new y.Color,this._lineColor=new y.Color,this._cellWidth=new s.Width,this._cellPadding=new c.Margin,h&&this.assign(h)}return Object.defineProperty(u.prototype,"font",{get:function(){return this._fontFamily},set:function(h){this._fontFamily=d.PredefinedStyles.getPredefinedStringOrUndefined(h,d.PredefinedStyles.fontFamilies)||h},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(h){this._fontStyle=d.PredefinedStyles.getPredefinedStringOrUndefined(h,d.PredefinedStyles.fontStyles)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"fontSize",{get:function(){return this._fontSize},set:function(h){this._fontSize=h},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"overflow",{get:function(){return this._overflow},set:function(h){this._overflow=d.PredefinedStyles.getPredefinedStringOrUndefined(h,d.PredefinedStyles.overflow)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"halign",{get:function(){return this._horizontalAlign},set:function(h){this._horizontalAlign=d.PredefinedStyles.getPredefinedStringOrUndefined(h,d.PredefinedStyles.horizontalAlign)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"valign",{get:function(){return this._verticalAlign},set:function(h){this._verticalAlign=d.PredefinedStyles.getPredefinedStringOrUndefined(h,d.PredefinedStyles.verticalAlign)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"fillColor",{get:function(){return this._fillColor},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"textColor",{get:function(){return this._textColor},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"lineColor",{get:function(){return this._lineColor},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"cellWidth",{get:function(){return this._cellWidth},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"cellPadding",{get:function(){return this._cellPadding},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(h){this._lineWidth=h},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"minCellWidth",{get:function(){return this._minCellWidth},set:function(h){this._minCellWidth=h},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"minCellHeight",{get:function(){return this._minCellHeight},set:function(h){this._minCellHeight=h},enumerable:!1,configurable:!0}),u.prototype.assign=function(h){h&&(h instanceof u?((0,S.isDefined)(h.font)&&(this.font=h.font),(0,S.isDefined)(h.fontStyle)&&(this.fontStyle=h.fontStyle),(0,S.isDefined)(h.overflow)&&(this.overflow=h.overflow),(0,S.isDefined)(h.halign)&&(this.halign=h.halign),(0,S.isDefined)(h.valign)&&(this.valign=h.valign),(0,S.isDefined)(h.fontSize)&&(this.fontSize=h.fontSize),(0,S.isDefined)(h.lineWidth)&&(this.lineWidth=h.lineWidth),(0,S.isDefined)(h.minCellWidth)&&(this.minCellWidth=h.minCellWidth),(0,S.isDefined)(h.minCellHeight)&&(this.minCellHeight=h.minCellHeight),(0,S.isDefined)(h.fillColor)&&this.fillColor.assign(h.fillColor),(0,S.isDefined)(h.textColor)&&this.textColor.assign(h.textColor),(0,S.isDefined)(h.lineColor)&&this.lineColor.assign(h.lineColor),(0,S.isDefined)(h.cellWidth)&&this.cellWidth.assign(h.cellWidth),(0,S.isDefined)(h.cellPadding)&&this.cellPadding.assign(h.cellPadding)):this.assignFromCssStyle(h))},u.prototype.assignFromCssStyle=function(h){if(h.fontFamily&&(this.font=this.getPdfFontFamily(h)),this.fontStyle=this.getPdfFontStyle(h),(0,S.isDefined)(h.fontSize)&&(this.fontSize=this.getPfrFontSize(h.fontSize)),h.textAlign&&(this.halign=h.textAlign),h.verticalAlign&&(this.valign=h.verticalAlign),(0,S.isDefined)(h.borderWidth)&&(this.lineWidth=h.borderWidth),(0,S.isDefined)(h.cellWidth)&&this.cellWidth.assign(h.cellWidth),(0,S.isDefined)(h.width)&&(this.minCellWidth="number"==typeof h.width?h.width:T.DomUtils.pxToInt(h.width)),(0,S.isDefined)(h.height)&&(this.minCellHeight="number"==typeof h.height?h.height:T.DomUtils.pxToInt(h.height)),h.backgroundColor&&this.fillColor.assign(h.backgroundColor),h.color&&this.textColor.assign(h.color),h.borderColor&&this.lineColor.assign(h.borderColor),(0,S.isDefined)(h.width)&&this.cellWidth.assign(h.width),this.assignPaddingFromCss(h),(0,S.isDefined)(h.extraLeftPadding)){var g=this._cellPadding.left;this._cellPadding.left=g?g+h.extraLeftPadding:h.extraLeftPadding}},u.prototype.getPdfFontStyle=function(h){var g=h.fontWeight,_=parseInt(g),x="bold"===g||!isNaN(_)&&_>500,w=x?"bold":"normal";return"italic"===h.fontStyle&&(w=x?"bolditalic":"italic"),w},u.prototype.getPdfFontFamily=function(h){var g=h.fontFamily&&h.fontFamily.toLowerCase(),_="helvetica";return g.indexOf("times")>-1&&(_="times"),g.indexOf("courier")>-1&&(_="courier"),_},u.prototype.getPfrFontSize=function(h){var g=T.DomUtils.pxToInt(h);if(!isNaN(g))return Math.ceil(g/96*72)},u.prototype.assignPaddingFromCss=function(h){if(h.padding)this._cellPadding.assign(h.padding);else{var g={};h.paddingLeft&&(g.left=T.DomUtils.pxToInt(h.paddingLeft)),h.paddingTop&&(g.top=T.DomUtils.pxToInt(h.paddingTop)),h.paddingRight&&(g.right=T.DomUtils.pxToInt(h.paddingRight)),h.paddingBottom&&(g.bottom=T.DomUtils.pxToInt(h.paddingBottom)),this._cellPadding.assign(g)}},u.prototype.hasValue=function(){return!0},u.prototype.getValue=function(){var h=this,g={};return(0,S.isDefined)(this.font)&&(g.font=this.font),(0,S.isDefined)(this.fontStyle)&&(g.fontStyle=this.fontStyle),(0,S.isDefined)(this.fontSize)&&(g.fontSize=this.fontSize),(0,S.isDefined)(this.overflow)&&(g.overflow=this.overflow),(0,S.isDefined)(this.halign)&&(g.halign=this.halign),(0,S.isDefined)(this.valign)&&(g.valign=this.valign),(0,S.isDefined)(this.lineWidth)&&(g.lineWidth=this.lineWidth),(0,S.isDefined)(this.minCellWidth)&&(g.minCellWidth=this.minCellWidth),(0,S.isDefined)(this.minCellHeight)&&(g.minCellHeight=this.minCellHeight),this.getJsPdfProviderProps().forEach(function(_){var x=h[_];x&&x.hasValue()&&(g[_]=x.getValue())}),g},u.prototype.getJsPdfProviderProps=function(){return["fillColor","textColor","lineColor","cellWidth","cellPadding"]},u}();b.StyleDef=a},7624:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TableOptions=void 0;var S=f(2491),T=f(6032),y=f(405),d=f(2642),c=f(5063),s=f(6995),a=f(7343),u=function(){function h(){this._margin=new c.Margin,this._tableLineColor=new y.Color,this._tableWidth=new a.Width,this._styles=new s.StyleDef,this._alternateRowStyles=new s.StyleDef}return Object.defineProperty(h.prototype,"pageBreak",{get:function(){return this._pageBreak},set:function(g){this._pageBreak=d.PredefinedStyles.getPredefinedStringOrUndefined(g,d.PredefinedStyles.pageBreak)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"rowPageBreak",{get:function(){return this._rowPageBreak},set:function(g){this._rowPageBreak=d.PredefinedStyles.getPredefinedStringOrUndefined(g,d.PredefinedStyles.rowPageBreak)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"showHead",{get:function(){return this._showHead},set:function(g){this._showHead=d.PredefinedStyles.getPredefinedStringOrUndefined(g,d.PredefinedStyles.headerFooterVisibility)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"showFoot",{get:function(){return this._showFoot},set:function(g){this._showFoot=d.PredefinedStyles.getPredefinedStringOrUndefined(g,d.PredefinedStyles.headerFooterVisibility)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"startY",{get:function(){return this._startY},set:function(g){this._startY=g},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableLineWidth",{get:function(){return this._tableLineWidth},set:function(g){this._tableLineWidth=g},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableLineColor",{get:function(){return this._tableLineColor},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableWidth",{get:function(){return this._tableWidth},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"styles",{get:function(){return this._styles},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"alternateRowStyles",{get:function(){return this._alternateRowStyles},enumerable:!1,configurable:!0}),h.prototype.hasValue=function(){return!0},h.prototype.getValue=function(){var g=this,_={};return _.pageBreak=this.pageBreak,_.rowPageBreak=this.rowPageBreak,_.showFoot=this.showFoot,_.showHead=this.showHead,_.startY=this.startY,_.tableLineWidth=this.tableLineWidth,this.getJsPdfProviderProps().forEach(function(x){var w=g[x];w&&w.hasValue()&&(_[x]=w.getValue())}),_.body=this.getBodyForJsPdf(),_.columnStyles=this.getColumnStylesForJsPdf(),this.onDrawCellCallback&&(_.didDrawCell=this.onDrawCellCallback),_},h.prototype.getJsPdfProviderProps=function(){return["margin","tableLineColor","tableWidth","styles","alternateRowStyles"]},h.prototype.getBodyForJsPdf=function(){for(var g=[],_=0;_<this._body.length;_++){for(var x=this._body[_],w=[],D=0;D<x.length;D++)w.push(x[D].getValue());g.push(w)}return g},h.prototype.assign=function(g){g&&((0,S.isDefined)(g.margin)&&this.margin.assign(g.margin),(0,S.isDefined)(g.pageBreak)&&(this.pageBreak=g.pageBreak),(0,S.isDefined)(g.rowPageBreak)&&(this.rowPageBreak=g.rowPageBreak),(0,S.isDefined)(g.showFoot)&&(this.showFoot=g.showFoot),(0,S.isDefined)(g.showHead)&&(this.showHead=g.showHead),(0,S.isDefined)(g.startY)&&(this.startY=g.startY),(0,S.isDefined)(g.tableLineWidth)&&(this.tableLineWidth=g.tableLineWidth),(0,S.isDefined)(g.tableLineColor)&&this.tableLineColor.assign(g.tableLineColor),(0,S.isDefined)(g.tableWidth)&&this.tableWidth.assign(g.tableWidth))},h.prototype.addBody=function(g){g&&(this._body=new Array,this.addCells(g,this._body))},h.prototype.addCells=function(g,_){for(var x=this.styles.fillColor,w=0;w<g.length;w++){for(var D=g[w],C=new Array,I=0;I<D.length;I++){var L=new T.CellDef(D[I]);x.hasValue()&&L.styles&&L.styles.fillColor.hasValue()&&L.styles.fillColor.applyOpacityToBackground(x),C.push(L)}_.push(C)}},h.prototype.applyColumnStyle=function(g,_){var x;null!==(x=this._columnStyles)&&void 0!==x||(this._columnStyles=new Array),this._columnStyles[g]=new s.StyleDef(_)},h.prototype.getColumnStylesForJsPdf=function(){if(this._columnStyles){var g={};return this._columnStyles.forEach(function(_,x){_&&(g[x]=_.getValue())}),g}return null},h}();b.TableOptions=u},7343:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Width=void 0;var S=f(2642),T=f(6907),y=function(){function d(c){this.assign(c)}return d.prototype.assign=function(c){if(c instanceof d)this._widthInternal=c._widthInternal;else{var s="number"==typeof c?c:parseInt(c);isNaN(s)?this.assignFromString(c):this._widthInternal=s}},d.prototype.assignFromString=function(c){if(c){var s=T.DomUtils.pxToInt(c);this._widthInternal=s||S.PredefinedStyles.getPredefinedStringOrUndefined(c,S.PredefinedStyles.width)}},d.prototype.hasValue=function(){return!!this._widthInternal},d.prototype.getValue=function(){return this._widthInternal},d}();b.Width=y},8603:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaExportHelper=void 0;var S=f(6907),T=f(858),y=f(1855),d=f(9201),c=f(405),s=f(9895),a=function(){function u(h,g){this._owner=h,this._props=g}return Object.defineProperty(u.prototype,"customRangeLeftOffset",{get:function(){var h;return null!==(h=this._customRangeLeftOffset)&&void 0!==h||(this._customRangeLeftOffset=this.layoutCalculator.getWidthByDateRange(this.startDate,this.ownerStartDate)),this._customRangeLeftOffset},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"baseCellSize",{get:function(){return this._owner.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"objectsLeftDelta",{get:function(){return this.renderedScaleLeft},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"objectsTopDelta",{get:function(){if(!this.hasTasks)return 0;var h=this.visibleTaskIndices[0];return this.getCellTop(h)+this.getTaskCellOffsetTop(h)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"offsetLeft",{get:function(){var h;return null!==(h=this._offsetLeft)&&void 0!==h||(this._offsetLeft=Math.max(this.visibleLeft-this.renderedScaleLeft,0)),this._offsetLeft},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"offsetTop",{get:function(){var h;return null!==(h=this._offsetTop)&&void 0!==h||(this._offsetTop=this.getOffsetTop()),this._offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scales",{get:function(){var h=this.settings.viewType;return[d.DateUtils.ViewTypeToScaleMap[h],h]},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleRanges",{get:function(){var h;return null!==(h=this._scaleRanges)&&void 0!==h||(this._scaleRanges=this.layoutCalculator.getScaleRangesInArea(this.scaleLeft,this.scaleRight)),this._scaleRanges},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleBottomStartIndex",{get:function(){return this.scaleRanges[1][0]},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleBottomEndIndex",{get:function(){return this.scaleRanges[1][1]},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleTopStartIndex",{get:function(){return this.scaleRanges[0][0]},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleTopEndIndex",{get:function(){return this.scaleRanges[0][1]},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleTopWidths",{get:function(){var h;return null!==(h=this._scaleTopWidths)&&void 0!==h||(this._scaleTopWidths=this.getScaleTopWidths()),this._scaleTopWidths},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleBottomWidths",{get:function(){var h;return null!==(h=this._scaleBottomWidths)&&void 0!==h||(this._scaleBottomWidths=this.getScaleBottomWidths()),this._scaleBottomWidths},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"headerRowHeight",{get:function(){if(!this._headerRowHeight){var h=this.scaleElements[0].filter(function(g){return!!g})[0];this._headerRowHeight=h?.offsetHeight}return this._headerRowHeight},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"visibleTaskIndices",{get:function(){var h;return null!==(h=this._visibleTaskIndices)&&void 0!==h||(this._visibleTaskIndices=this.getTaskIndices()),this._visibleTaskIndices},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"baseCellHeight",{get:function(){return this.hasTasks?this.baseCellSize.height:this.taskAreaHeight},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"taskAreaHeight",{get:function(){return this.hasTasks?this.visibleTaskIndices.length*this.baseCellHeight:this._owner.renderHelper.taskArea.offsetHeight},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleTableStyle",{get:function(){var h;return null!==(h=this._scaleTableStyle)&&void 0!==h||(this._scaleTableStyle=this.getScaleTableStyle()),this._scaleTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"chartMainTableStyle",{get:function(){var h;return null!==(h=this._chartMainTableStyle)&&void 0!==h||(this._chartMainTableStyle=this.getChartMainTableStyle()),this._chartMainTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"parentRowBackColor",{get:function(){var h;return null!==(h=this._parentRowBackColor)&&void 0!==h||(this._parentRowBackColor=this.getParentBackColor()),this._parentRowBackColor},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"arrowWidth",{get:function(){var h;return null!==(h=this._arrowWidth)&&void 0!==h||(this._arrowWidth=this.getArrowWidth()),this._arrowWidth},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"dependencyColor",{get:function(){var h;return null!==(h=this._dependencyColor)&&void 0!==h||(this._dependencyColor=this.getDependencyColor()),this._dependencyColor},enumerable:!1,configurable:!0}),u.prototype.getTaskElementBackColor=function(h,g){var _=this.getTaskElementStyle(h,g);return _?.backgroundColor},u.prototype.getTaskElementStyle=function(h,g){var _=this.getTaskWrapper(h);return this.getElementStyle(_.getElementsByClassName(g)[0])},u.prototype.isElementVisible=function(h){return h&&"none"!==getComputedStyle(h).display},Object.defineProperty(u.prototype,"hasTasks",{get:function(){return this.visibleTaskIndices.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"visibleLeft",{get:function(){var h;return null!==(h=this._visibleLeft)&&void 0!==h||(this._visibleLeft=this.isVisibleMode?this.container.scrollLeft:0),this._visibleLeft},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"visibleTop",{get:function(){var h;return null!==(h=this._visibleTop)&&void 0!==h||(this._visibleTop=this.isVisibleMode?this.container.scrollTop:0),this._visibleTop},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"visibleRight",{get:function(){var h;return null!==(h=this._visibleRight)&&void 0!==h||(this._visibleRight=this.getVisibleRight()),this._visibleRight},enumerable:!1,configurable:!0}),u.prototype.getVisibleRight=function(){var h=this.container.getElement().offsetWidth;return this.visibleLeft+h},Object.defineProperty(u.prototype,"visibleBottom",{get:function(){var h;return null!==(h=this._visibleBottom)&&void 0!==h||(this._visibleBottom=this.getVisibleBottom()),this._visibleBottom},enumerable:!1,configurable:!0}),u.prototype.getVisibleBottom=function(){return this.isVisibleMode?this.visibleTop+this.container.getHeight():this.visibleTaskIndices.length*this.baseCellSize.height},Object.defineProperty(u.prototype,"scaleLeft",{get:function(){var h;return null!==(h=this._scaleLeft)&&void 0!==h||(this._scaleLeft=this.isVisibleMode?this.visibleLeft:this.getPosByDate(this.startDate)),this._scaleLeft},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleRight",{get:function(){var h;return null!==(h=this._scaleRight)&&void 0!==h||(this._scaleRight=this.isVisibleMode?this.visibleRight:this.getPosByDate(this.endDate)-1),this._scaleRight},enumerable:!1,configurable:!0}),u.prototype.getScaleTopWidths=function(){var h=this.getScaleWidths(this.scaleTopStartIndex,this.scaleTopEndIndex,this.scales[0]),g=this.layoutCalculator,_=g.getScaleItemInfo(this.scaleBottomStartIndex,this.scales[1]),x=g.getScaleItemInfo(this.scaleTopStartIndex,this.scales[0]),w=Math.max(_.position.x-x.position.x,0);h[this.scaleTopStartIndex]-=w;var D=g.getScaleItemInfo(this.scaleTopEndIndex,this.scales[0]),C=g.getScaleItemInfo(this.scaleBottomEndIndex,this.scales[1]);return w=Math.max(D.position.x+D.size.width-C.position.x-C.size.width,0),h[this.scaleTopEndIndex]-=w,h},u.prototype.getScaleBottomWidths=function(){return this.getScaleWidths(this.scaleBottomStartIndex,this.scaleBottomEndIndex,this.scales[1])},u.prototype.getScaleWidths=function(h,g,_){for(var x=new Array,w=h;w<=g;w++)x[w]=this.layoutCalculator.getScaleItemInfo(w,_).size.width;return x},u.prototype.getOffsetTop=function(){return this.isVisibleMode&&this.hasTasks?this.getTaskCellOffsetTop(this.visibleTaskIndices[0]):0},Object.defineProperty(u.prototype,"renderedScaleLeft",{get:function(){return this.getCellLeft(this.scaleBottomStartIndex)},enumerable:!1,configurable:!0}),u.prototype.getTaskCellOffsetTop=function(h){var g=this.getCellTop(h);return Math.max(this.visibleTop-g,0)},u.prototype.getCellTop=function(h){return this.layoutCalculator.getGridBorderPosition(h-1,!1).y},u.prototype.getCellLeft=function(h){return this.layoutCalculator.getScaleItemInfo(h,this.scales[1]).position.x},u.prototype.getTaskIndices=function(){var h,g;return this.dataMode===s.DataExportMode.all||this.exportRange?this._owner.getAllVisibleTaskIndices(null===(h=this.exportRange)||void 0===h?void 0:h.startIndex,null===(g=this.exportRange)||void 0===g?void 0:g.endIndex):this.getVisibleTaskIndices()},u.prototype.getVisibleTaskIndices=function(){var h=this,g=[];return this.taskElements.forEach(function(_,x){if(_){var w=S.DomUtils.pxToInt(_.style.top),D=w+_.offsetHeight;(w>=h.visibleTop&&w<=h.visibleBottom||D>=h.visibleTop&&D<=h.visibleBottom)&&g.push(x)}}),g},Object.defineProperty(u.prototype,"scaleElements",{get:function(){return this._owner.renderHelper.scaleElements.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"scaleBorders",{get:function(){return this._owner.renderHelper.scaleBorders.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hlRowElements",{get:function(){return this._owner.renderHelper.hlRowElements.filter(function(h){return!!h})},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"selectionElements",{get:function(){return this._owner.renderHelper.selectionElements.filter(function(h){return!!h})},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"taskElements",{get:function(){return this._owner.renderHelper.taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"connectorLines",{get:function(){var h,g=this;return null!==(h=this._connectorLines)&&void 0!==h||(this._connectorLines=this._owner.renderHelper.allConnectorLines.filter(function(_){return g.isLineVisible(_)})),this._connectorLines},enumerable:!1,configurable:!0}),u.prototype.isLineVisible=function(h){return this.dataMode===s.DataExportMode.all||this.visibleDependencyKeys.indexOf(h.attr["dependency-id"])>-1},Object.defineProperty(u.prototype,"visibleDependencyKeys",{get:function(){var h;return null!==(h=this._visibleDependencyKeys)&&void 0!==h||(this._visibleDependencyKeys=this._owner.getVisibleDependencyKeysByTaskRange(this.visibleTaskIndices)),this._visibleDependencyKeys},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"resourcesElements",{get:function(){var h,g=this;return null!==(h=this._resourcesElements)&&void 0!==h||(this._resourcesElements=this.visibleTaskIndices.map(function(_){return g._owner.renderHelper.resourcesElements[_]}).filter(function(_){return g.isElementVisible(_)&&_.parentElement})),this._resourcesElements},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"stripLinesElements",{get:function(){if(!this._stripLinesElements){var h=this._owner.renderHelper.stripLinesMap.filter(function(g){return!!g}).map(function(g){return g});this._stripLinesElements=h.map(function(g){return g})}return this._stripLinesElements},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"noWorkingIntervalsElements",{get:function(){if(!this._noWorkingIntervalsElements){this._noWorkingIntervalsElements=[];var h=this._owner.renderHelper.noWorkingIntervalsToElementsMap;for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&this._noWorkingIntervalsElements.push(h[g])}return this._noWorkingIntervalsElements},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"taskArea",{get:function(){return this._owner.renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"settings",{get:function(){return this._owner.settings},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"dataMode",{get:function(){var h;return null===(h=this._props)||void 0===h?void 0:h.exportDataMode},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"exportRange",{get:function(){var h;return null===(h=this._props)||void 0===h?void 0:h.dateRange},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isVisibleMode",{get:function(){return this.dataMode===s.DataExportMode.visible&&!this.exportRange},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ownerStartDate",{get:function(){return this._owner.range.start},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ownerEndDate",{get:function(){return this._owner.range.end},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"startDate",{get:function(){var h,g,_,x;if(null!==(h=this.exportRange)&&void 0!==h&&h.startDate&&null!==(g=this.exportRange)&&void 0!==g&&g.endDate){var w=Math.min(null===(_=this.exportRange)||void 0===_?void 0:_.startDate.getTime(),null===(x=this.exportRange)||void 0===x?void 0:x.endDate.getTime());return new Date(w)}return this.ownerStartDate},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"endDate",{get:function(){var h,g,_,x;if(null!==(h=this.exportRange)&&void 0!==h&&h.startDate&&null!==(g=this.exportRange)&&void 0!==g&&g.endDate){var w=Math.max(null===(_=this.exportRange)||void 0===_?void 0:_.startDate.getTime(),null===(x=this.exportRange)||void 0===x?void 0:x.endDate.getTime());return new Date(w)}return this.ownerEndDate},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hasCustomRangeOutOfRender",{get:function(){return this.startDate.getTime()!==this.ownerStartDate.getTime()||this.endDate.getTime()!==this.ownerEndDate.getTime()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"layoutCalculator",{get:function(){if(!this._layoutCalculator){var h=this._owner.renderHelper.gridLayoutCalculator;this.hasCustomRangeOutOfRender?(this._layoutCalculator=new y.GridLayoutCalculator,this._layoutCalculator.setSettings(h.visibleTaskAreaSize,h.tickSize,h.elementSizeValues,new T.DateRange(this.startDate,this.endDate),h.viewModel,h.viewType,h.scrollBarHeight,this._owner.settings.firstDayOfWeek)):this._layoutCalculator=h}return this._layoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"container",{get:function(){return this._owner.renderHelper.taskAreaContainer},enumerable:!1,configurable:!0}),u.prototype.getPosByDate=function(h){return this.layoutCalculator.getPosByDate(h)},u.prototype.getScaleTableStyle=function(){var h={},g=this.scaleElements[0].filter(function(x){return!!x})[0],_=this.getElementStyle(g);return h.backgroundColor=this.findElementBackColor(g),h.borderColor=this.getChartTableBorderColor(),h.verticalAlign="middle",h.textAlign="center",h.fontSize=_.fontSize,h.fontFamily=_.fontFamily,h.fontWeight=_.fontWeight,h.fontStyle=_.fontStyle,h.color=_.color,h},u.prototype.getChartMainTableStyle=function(){var h={};return h.backgroundColor=this.findElementBackColor(this.taskArea),h.borderColor=this.getChartTableBorderColor(),h},u.prototype.findElementBackColor=function(h){if(!h)return null;for(var g=h,_=new c.Color("transparent");0===_.opacity&&g;){var x=this.getElementStyle(g);_.assign(x.backgroundColor),g=g.parentElement}return _},u.prototype.getChartTableBorderColor=function(){var h=this.getElementStyle(this.scaleBorders[0].filter(function(g){return!!g})[0]);return h?.borderColor},u.prototype.getParentBackColor=function(){var h=this.getElementStyle(this.hlRowElements[0]);return h?.backgroundColor},u.prototype.getArrowWidth=function(){var h=this.getDependencyLineStyle(y.GridLayoutCalculator.arrowClassName);return h&&S.DomUtils.pxToInt(h.borderWidth||h.borderLeftWidth||h.borderRightWidth||h.borderTopWidth||h.borderBottomWidth)},u.prototype.getDependencyColor=function(){var h=this.getDependencyLineStyle(y.GridLayoutCalculator.CLASSNAMES.CONNECTOR_HORIZONTAL);return h?.borderColor},u.prototype.getDependencyLineStyle=function(h){return this.getElementStyle(this.taskArea.getElementsByClassName(h)[0])},u.prototype.getElementStyle=function(h){return h&&getComputedStyle(h)},u.prototype.getTaskWrapper=function(h){return this.isTaskTemplateMode?this._owner.renderHelper.fakeTaskWrapper:(this.taskElements[h]||this._owner.renderHelper.createDefaultTaskElement(h),this.taskElements[h])},Object.defineProperty(u.prototype,"isTaskTemplateMode",{get:function(){return!!this._owner.settings.taskContentTemplate},enumerable:!1,configurable:!0}),u}();b.TaskAreaExportHelper=a},6057:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CollectionBase=void 0;var S=f(2491),T=f(2601),y=function(){function d(){this._items=new Array,this._isGanttCollection=!0}return d.prototype.add=function(c){if((0,S.isDefined)(c)){if(this.getItemById(c.internalId))throw"The collection item with id ='"+c.internalId+"' already exists.";this._addItem(c)}},d.prototype.addRange=function(c){for(var s=0;s<c.length;s++)this.add(c[s])},d.prototype.remove=function(c){var s=this._items.indexOf(c);s>-1&&s<this._items.length&&this._removeItems(s,1)},d.prototype.clear=function(){this._removeItems(0,this._items.length)},d.prototype.invalidate=function(){delete this._invertedItems},d.prototype._addItem=function(c){this._items.push(c),delete this._invertedItems},d.prototype._removeItems=function(c,s){this._items.splice(c,s),delete this._invertedItems},Object.defineProperty(d.prototype,"items",{get:function(){return this._items.slice()},set:function(c){c&&(this._items=c.slice())},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),d.prototype.getItem=function(c){return c>-1&&c<this._items.length?this._items[c]:null},Object.defineProperty(d.prototype,"invertedItems",{get:function(){var c;return null!==(c=this._invertedItems)&&void 0!==c||(this._invertedItems=this._createInvertedItems()),this._invertedItems},enumerable:!1,configurable:!0}),d.prototype._createInvertedItems=function(){for(var c={},s=0;s<this._items.length;s++){var a=this._items[s];c[a.internalId]=a}return c},d.prototype.getItemById=function(c){return this.invertedItems[c]},d.prototype.getItemByPublicId=function(c){return this._items.filter(function(s){return s.id===c||s.id.toString()===c})[0]},d.prototype.assign=function(c){(0,S.isDefined)(c)&&(this.items=c.items)},d.prototype.importFromObject=function(c){(0,S.isDefined)(c)&&(this.clear(),c._isGanttCollection?this.assign(c):c instanceof Array?this.importFromArray(c):this.createItemFromObjectAndAdd(c))},d.prototype.createItemFromObjectAndAdd=function(c){if((0,S.isDefined)(c)&&Object.keys(c).length>0){var s=this.createItem();s.assignFromObject(c),this.add(s)}},d.prototype.importFromArray=function(c){for(var s=0;s<c.length;s++)this.createItemFromObjectAndAdd(c[s])},d.prototype.importFromJSON=function(c){this.importFromObject(T.GanttJsonUtils.parseJson(c))},d}();b.CollectionBase=y},7380:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DependencyCollection=void 0;var S=f(655),T=f(6057),y=f(7352),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.createItem=function(){return new y.Dependency},s}(T.CollectionBase);b.DependencyCollection=d},4432:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.WorkingDayRuleCollection=void 0;var S=f(655),T=f(6057),y=f(8401),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.createItem=function(){return new y.WorkingTimeRule},s}(T.CollectionBase);b.WorkingDayRuleCollection=d},9883:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceAssignmentCollection=void 0;var S=f(655),T=f(6057),y=f(7437),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.createItem=function(){return new y.ResourceAssignment},s}(T.CollectionBase);b.ResourceAssignmentCollection=d},8828:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceCollection=void 0;var S=f(655),T=f(6057),y=f(2301),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.createItem=function(){return new y.Resource},s}(T.CollectionBase);b.ResourceCollection=d},9504:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskCollection=void 0;var S=f(655),T=f(8492),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.createItem=function(){return new T.Task},c}(f(6057).CollectionBase);b.TaskCollection=y},5594:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EventDispatcher=void 0;var f=function(){function S(){this.listeners=[]}return S.prototype.add=function(T){if(!T)throw new Error("Error");this.hasEventListener(T)||this.listeners.push(T)},S.prototype.remove=function(T){for(var y=0,d=void 0;d=this.listeners[y];y++)if(d===T){this.listeners.splice(y,1);break}},S.prototype.raise=function(T){for(var y=[],d=1;d<arguments.length;d++)y[d-1]=arguments[d];for(var c=0,s=void 0;s=this.listeners[c];c++){var a=s[T];a?.apply(s,y)}},S.prototype.hasEventListener=function(T){for(var y=0,d=this.listeners.length;y<d;y++)if(this.listeners[y]===T)return!0;return!1},S}();b.EventDispatcher=f},3452:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ModelChangesDispatcher=void 0;var S=f(255),T=f(8403),y=f(8738),d=f(9669),c=f(5594),s=function(){function a(){this.onModelChanged=new c.EventDispatcher,this.isLocked=!1}return a.prototype.notifyTaskCreating=function(u){this.isLocked||this.onModelChanged.raise("NotifyTaskCreating",u)},a.prototype.notifyTaskCreated=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyTaskCreated",u,h,g)},a.prototype.notifyTaskRemoving=function(u){this.isLocked||this.onModelChanged.raise("NotifyTaskRemoving",u)},a.prototype.notifyTaskRemoved=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyTaskRemoved",u,h,g)},a.prototype.notifyTaskUpdating=function(u){this.isLocked||this.onModelChanged.raise("NotifyTaskUpdating",u)},a.prototype.notifyTaskMoving=function(u){this.isLocked||this.onModelChanged.raise("NotifyTaskMoving",u)},a.prototype.notifyTaskEditDialogShowing=function(u){this.isLocked||this.onModelChanged.raise("NotifyTaskEditDialogShowing",u)},a.prototype.notifyResourceManagerDialogShowing=function(u){this.isLocked||this.onModelChanged.raise("NotifyResourceManagerDialogShowing",u)},a.prototype.notifyTaskUpdated=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyTaskUpdated",u,h,g)},a.prototype.notifyParentTaskUpdated=function(u,h){this.isLocked||this.onModelChanged.raise("NotifyParentTaskUpdated",u,h)},a.prototype.notifyDependencyInserting=function(u){this.isLocked||this.onModelChanged.raise("NotifyDependencyInserting",u)},a.prototype.notifyDependencyInserted=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyDependencyInserted",u,h,g)},a.prototype.notifyDependencyRemoving=function(u){this.isLocked||this.onModelChanged.raise("NotifyDependencyRemoving",u)},a.prototype.notifyDependencyRemoved=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyDependencyRemoved",u,h,g)},a.prototype.notifyResourceCreating=function(u){this.isLocked||this.onModelChanged.raise("NotifyResourceCreating",u)},a.prototype.notifyResourceCreated=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyResourceCreated",u,h,g)},a.prototype.notifyResourceRemoving=function(u){this.isLocked||this.onModelChanged.raise("NotifyResourceRemoving",u)},a.prototype.notifyResourceRemoved=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyResourceRemoved",u,h,g)},a.prototype.notifyResourceColorChanged=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyResourceColorChanged",u,h,g)},a.prototype.notifyResourceAssigning=function(u){this.isLocked||this.onModelChanged.raise("NotifyResourceAssigning",u)},a.prototype.notifyResourceAssigned=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyResourceAssigned",u,h,g)},a.prototype.notifyResourceUnassigning=function(u){this.isLocked||this.onModelChanged.raise("NotifyResourceUnassigning",u)},a.prototype.notifyResourceUnassigned=function(u,h,g){this.isLocked||this.onModelChanged.raise("NotifyResourceUnassigned",u,h,g)},a.prototype.notifyParentDataRecalculated=function(u){this.onModelChanged.raise("NotifyParentDataRecalculated",u)},a.prototype.notifyScaleCellPrepared=function(u){this.onModelChanged.raise("NotifyScaleCellPrepared",u)},a.prototype.notifyGanttViewUpdated=function(){this.onModelChanged.raise("NotifyGanttViewUpdated")},a.prototype.fireResourceUnassigning=function(u){var h=new y.ResourceUnassigningArguments(u);return this.notifyResourceUnassigning(h),!h.cancel},a.prototype.raiseTaskUpdating=function(u,h,g){var _=new d.TaskUpdatingArguments(u,h);return this.notifyTaskUpdating(_),!_.cancel&&(g(_.newValues),!0)},a.prototype.raiseTaskMoving=function(u,h,g,_){var x=new d.TaskUpdatingArguments(u,{start:h,end:g});return this.notifyTaskMoving(x),!x.cancel&&(_(x.start,x.end),!0)},a.prototype.raiseTaskTaskEditDialogShowing=function(u,h){var g=new T.TaskEditDialogShowingArguments(u);return this.notifyTaskEditDialogShowing(g),!g.cancel&&(h(g),!0)},a.prototype.raiseResourceManagerDialogShowing=function(u,h){var g=new S.ResourceManagerDialogShowingArguments(u);return this.notifyResourceManagerDialogShowing(g),!g.cancel&&(h(g),!0)},a.prototype.lock=function(){this.isLocked=!0},a.prototype.unlock=function(){this.isLocked=!1},a}();b.ModelChangesDispatcher=s},6124:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttDataObjectNames=b.DataObject=void 0;var S=f(2491),T=f(8679),y=function(){function d(){this.internalId=T.MathUtils.generateGuid()}return d.prototype.assignFromObject=function(c){(0,S.isDefined)(c)&&(0,S.isDefined)(c.id)&&this.updateId(c.id)},d.prototype.updateId=function(c){this.id=c,this.internalId=String(c)},d}();b.DataObject=y,b.GanttDataObjectNames={task:"task",dependency:"dependency",resource:"resource",resourceAssignment:"assignment"}},7352:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Dependency=void 0;var S=f(655),T=f(2491),y=f(6124),d=f(5950),c=function(s){function a(){var u=s.call(this)||this;return u.predecessorId="",u.successorId="",u.type=null,u}return S.__extends(a,s),Object.defineProperty(a.prototype,"isStartDependency",{get:function(){return this.type===d.DependencyType.SS||this.type===d.DependencyType.SF},enumerable:!1,configurable:!0}),a.prototype.assignFromObject=function(u){(0,T.isDefined)(u)&&(s.prototype.assignFromObject.call(this,u),this.predecessorId=String(u.predecessorId),this.successorId=String(u.successorId),this.type=this.parseType(u.type))},a.prototype.parseType=function(u){if(!(0,T.isDefined)(u))return d.DependencyType.FS;switch(u.toString().toUpperCase()){case"SS":case"1":return d.DependencyType.SS;case"FF":case"2":return d.DependencyType.FF;case"SF":case"3":return d.DependencyType.SF;default:return d.DependencyType.FS}},a}(y.DataObject);b.Dependency=c},5950:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.DependencyType=b.TaskType=void 0,(f=b.TaskType||(b.TaskType={}))[f.Regular=0]="Regular",f[f.Summary=1]="Summary",f[f.Milestone=2]="Milestone",function(f){f[f.FS=0]="FS",f[f.SS=1]="SS",f[f.FF=2]="FF",f[f.SF=3]="SF"}(b.DependencyType||(b.DependencyType={}))},2301:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Resource=void 0;var S=f(655),T=f(2491),y=function(d){function c(){var s=d.call(this)||this;return s.text="",s.color="",s}return S.__extends(c,d),c.prototype.assignFromObject=function(s){(0,T.isDefined)(s)&&(d.prototype.assignFromObject.call(this,s),this.text=s.text,(0,T.isDefined)(s.color)&&(this.color=s.color))},c}(f(6124).DataObject);b.Resource=y},7437:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceAssignment=void 0;var S=f(655),T=f(2491),y=function(d){function c(){var s=d.call(this)||this;return s.taskId="",s.resourceId="",s}return S.__extends(c,d),c.prototype.assignFromObject=function(s){(0,T.isDefined)(s)&&(d.prototype.assignFromObject.call(this,s),this.taskId=String(s.taskId),this.resourceId=String(s.resourceId))},c}(f(6124).DataObject);b.ResourceAssignment=y},8492:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Task=void 0;var S=f(655),T=f(2491),y=f(6124),d=-8e15,c=function(s){function a(){var u=s.call(this)||this;return u.start=null,u.end=null,u.duration=null,u.description="",u.parentId=null,u.title="",u.owner=null,u.progress=0,u.taskType=null,u.customFields={},u.expanded=!0,u.color="",u}return S.__extends(a,s),Object.defineProperty(a.prototype,"normalizedProgress",{get:function(){return Math.max(Math.min(this.progress,100),0)},enumerable:!1,configurable:!0}),a.prototype.assignFromObject=function(u){(0,T.isDefined)(u)&&(s.prototype.assignFromObject.call(this,u),this.owner=u.owner,this.parentId=(0,T.isDefined)(u.parentId)?String(u.parentId):null,this.rawParentId=u.parentId,this.description=u.description,this.title=u.title,this.start="string"==typeof u.start?new Date(u.start):u.start||this.createInvalidDate(),this.end="string"==typeof u.end?new Date(u.end):u.end||this.createInvalidDate(),this.duration=u.duration,this.progress=u.progress,this.taskType=u.taskType,(0,T.isDefined)(u.expanded)&&(this.expanded=!!u.expanded),(0,T.isDefined)(u.color)&&(this.color=u.color),this.assignCustomFields(u.customFields))},a.prototype.assignCustomFields=function(u){if(u)for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(this.customFields[h]=u[h])},a.prototype.isMilestone=function(){return this.start.getTime()===this.end.getTime()},a.prototype.getDuration=function(){return this.end.getTime()-this.start.getTime()},a.prototype.isValidStart=function(){return this.isValidTaskaDte(this.start)},a.prototype.isValidEnd=function(){return this.isValidTaskaDte(this.end)},a.prototype.isValid=function(){return this.isValidStart()&&this.isValidEnd()},a.prototype.createInvalidDate=function(){return new Date(d)},a.prototype.isValidTaskaDte=function(u){return!!u&&u.getTime()!==d},a}(y.DataObject);b.Task=c},8774:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.BaseArguments=void 0,b.BaseArguments=function(S){this.cancel=!1,this.values={},this.key=S}},3279:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DependencyInsertingArguments=void 0;var S=f(655),T=function(y){function d(c,s,a){var u=y.call(this,null)||this;return u.values={predecessorId:c,successorId:s,type:a},u}return S.__extends(d,y),Object.defineProperty(d.prototype,"predecessorId",{get:function(){return this.values.predecessorId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"successorId",{get:function(){return this.values.successorId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"type",{get:function(){return this.values.type},enumerable:!1,configurable:!0}),d}(f(8774).BaseArguments);b.DependencyInsertingArguments=T},4797:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DependencyRemovingArguments=void 0;var S=f(655),T=function(y){function d(c){var s=y.call(this,c.id)||this;return s.values=c,s}return S.__extends(d,y),d}(f(8774).BaseArguments);b.DependencyRemovingArguments=T},255:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceManagerDialogShowingArguments=void 0;var S=f(655),T=function(y){function d(c){var s=y.call(this,void 0)||this;return s.values.resources=c.resources,s}return S.__extends(d,y),d}(f(8774).BaseArguments);b.ResourceManagerDialogShowingArguments=T},8403:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditDialogShowingArguments=void 0;var S=f(655),T=function(y){function d(c){var s=y.call(this,c.id)||this;return s.values={start:c.start,end:c.end,title:c.title,progress:c.progress},s.hiddenFields=c.hiddenFields,s.readOnlyFields=c.readOnlyFields,s}return S.__extends(d,y),d}(f(8774).BaseArguments);b.TaskEditDialogShowingArguments=T},1389:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceAssigningArguments=void 0;var S=f(655),T=function(y){function d(c,s){var a=y.call(this,null)||this;return a.values={resourceId:c,taskId:s},a}return S.__extends(d,y),Object.defineProperty(d.prototype,"resourceId",{get:function(){return this.values.resourceId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskId",{get:function(){return this.values.taskId},enumerable:!1,configurable:!0}),d}(f(8774).BaseArguments);b.ResourceAssigningArguments=T},8738:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceUnassigningArguments=void 0;var S=f(655),T=function(y){function d(c){var s=y.call(this,c.internalId)||this;return s.values=c,s}return S.__extends(d,y),d}(f(8774).BaseArguments);b.ResourceUnassigningArguments=T},990:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceInsertingArguments=void 0;var S=f(655),T=function(y){function d(c,s){void 0===s&&(s="");var a=y.call(this,null)||this;return a.values={text:c,color:s},a}return S.__extends(d,y),Object.defineProperty(d.prototype,"text",{get:function(){return this.values.text},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"color",{get:function(){return this.values.color},enumerable:!1,configurable:!0}),d}(f(8774).BaseArguments);b.ResourceInsertingArguments=T},9748:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceRemovingArguments=void 0;var S=f(655),T=function(y){function d(c){var s=y.call(this,c.id)||this;return s.values=c,s}return S.__extends(d,y),d}(f(8774).BaseArguments);b.ResourceRemovingArguments=T},4605:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskInsertingArguments=void 0;var S=f(655),T=function(y){function d(c,s){var a=y.call(this,c)||this;return a.values=s??{},a}return S.__extends(d,y),Object.defineProperty(d.prototype,"start",{get:function(){return this.values.start},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"end",{get:function(){return this.values.end},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"title",{get:function(){return this.values.title},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"progress",{get:function(){return this.values.progress},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"parentId",{get:function(){return this.values.parentId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"color",{get:function(){return this.values.color},enumerable:!1,configurable:!0}),d}(f(8774).BaseArguments);b.TaskInsertingArguments=T},4642:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskRemovingArguments=void 0;var S=f(655),T=function(y){function d(c){var s=y.call(this,c.id)||this;return s.values=c,s}return S.__extends(d,y),d}(f(8774).BaseArguments);b.TaskRemovingArguments=T},9669:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskUpdatingArguments=void 0;var S=f(655),T=function(y){function d(c,s){var a=y.call(this,c.id)||this;return a.values=c,a.createNewValues(s),a}return S.__extends(d,y),d.prototype.createNewValues=function(c){var s=this;this.newValues={};var a=function(g){Object.prototype.hasOwnProperty.call(c,g)&&(u.newValues[g]=c[g],Object.defineProperty(u,g,{get:function(){return s.newValues[g]}}))},u=this;for(var h in c)a(h)},d}(f(8774).BaseArguments);b.TaskUpdatingArguments=T},8725:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.History=void 0;var S=f(5221),T=f(9751),y=function(){function d(c){this.historyItems=[],this.currentIndex=-1,this.currentProcessingItemInfo=null,this.transaction=null,this.transactionLevel=-1,this._listener=c}return d.prototype.undo=function(){this.canUndo()&&(this.activateItem(this.historyItems[this.currentIndex],!0),this.currentIndex--)},d.prototype.redo=function(){this.canRedo()&&(this.currentIndex++,this.activateItem(this.historyItems[this.currentIndex]))},d.prototype.beginTransaction=function(){var c;this.transactionLevel++,0==this.transactionLevel&&(this.transaction=new T.CompositionHistoryItem,null===(c=this._listener)||void 0===c||c.onTransactionStart())},d.prototype.endTransaction=function(){var c;if(!(--this.transactionLevel>=0)){var s=this.transaction.historyItems.length;s>1?this.addInternal(this.transaction):1==s&&this.addInternal(this.transaction.historyItems.pop()),this.transaction=null,null===(c=this._listener)||void 0===c||c.onTransactionEnd()}},d.prototype.addAndRedo=function(c){this.add(c),this.activateItem(c)},d.prototype.add=function(c){this.transactionLevel>=0?this.transaction.add(c):this.addInternal(c)},d.prototype.canUndo=function(){return this.currentIndex>=0},d.prototype.canRedo=function(){return this.currentIndex<this.historyItems.length-1},d.prototype.addInternal=function(c){this.currentIndex<this.historyItems.length-1&&this.historyItems.splice(this.currentIndex+1),this.historyItems.push(c),this.currentIndex++,this.deleteOldItems()},d.prototype.deleteOldItems=function(){var c=this.historyItems.length-d.MAX_HISTORY_ITEM_COUNT;c>0&&this.currentIndex>c&&(this.historyItems.splice(0,c),this.currentIndex-=c)},d.prototype.clear=function(){this.currentIndex=-1,this.historyItems=[]},d.prototype.activateItem=function(c,s){void 0===s&&(s=!1),this.currentProcessingItemInfo=new S.HistoryItemInfo(c,s),s?c.undo():c.redo(),this.currentProcessingItemInfo=null},d.prototype.getCurrentProcessingItemInfo=function(){return this.currentProcessingItemInfo},d.prototype.rollBackAndRemove=function(c){var s=c.item;this.checkAndRemoveItem(s)&&(c.isUndo?s.redo():s instanceof T.CompositionHistoryItem?s.undoItemsQuery():s.undo())},d.prototype.checkAndRemoveItem=function(c){var s=this.historyItems.indexOf(c);return s>-1?(this.historyItems.splice(s,1),this.currentIndex--):this.transaction&&(s=this.transaction.historyItems.indexOf(c))>-1&&this.transaction.historyItems.splice(s,1),s>-1},d.prototype.updateObsoleteInsertedKey=function(c,s,a){this.transaction&&this.updateItemsObsoleteInsertedKey(c,s,a,[this.transaction]),this.updateItemsObsoleteInsertedKey(c,s,a,this.historyItems)},d.prototype.updateItemsObsoleteInsertedKey=function(c,s,a,u){if(u)for(var h=0;h<u.length;h++){var g=u[h];g.keyUpdaters.filter(function(_){return _.getKey()===c&&_.objectType===a}).forEach(function(_){return _.updateKey(s)}),g instanceof T.CompositionHistoryItem&&this.updateItemsObsoleteInsertedKey(c,s,a,g.historyItems)}},d.MAX_HISTORY_ITEM_COUNT=100,d}();b.History=y},9751:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CompositionHistoryItem=void 0;var S=f(655),T=function(y){function d(){var c=y.call(this,null)||this;return c.historyItems=[],c}return S.__extends(d,y),d.prototype.redo=function(){for(var c,s=0;c=this.historyItems[s];s++)c.redo()},d.prototype.undo=function(){for(var c,s=this.historyItems.length-1;c=this.historyItems[s];s--)c.undo()},d.prototype.add=function(c){if(null==c)throw new Error("Can't add null HistoryItem");this.historyItems.push(c)},d.prototype.undoItemsQuery=function(){this.undo()},d.prototype.setModelManipulator=function(c){if(y.prototype.setModelManipulator.call(this,c),this.historyItems)for(var s=0;s<this.historyItems.length;s++)this.historyItems[s].setModelManipulator(c)},d}(f(7917).HistoryItem);b.CompositionHistoryItem=T},1211:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.InsertDependencyHistoryItem=void 0;var S=f(655),T=f(8679),y=f(6124),d=function(c){function s(a,u,h,g){var _=c.call(this,a)||this;return _.predecessorId=u,_.successorId=h,_.type=g,_}return S.__extends(s,c),s.prototype.redo=function(){var a;null!==(a=this.insertedKey)&&void 0!==a||(this.insertedKey=T.MathUtils.generateGuid()),this.modelManipulator.dependency.insertDependency(this.predecessorId,this.successorId,this.type,this.insertedKey)},s.prototype.undo=function(){this.modelManipulator.dependency.removeDependency(this.insertedKey)},Object.defineProperty(s.prototype,"keyUpdaters",{get:function(){var a=this;return[{objectType:y.GanttDataObjectNames.dependency,getKey:function(){return a.insertedKey},updateKey:function(u){return a.insertedKey=u}},{objectType:y.GanttDataObjectNames.task,getKey:function(){return a.predecessorId},updateKey:function(u){return a.predecessorId=u}},{objectType:y.GanttDataObjectNames.task,getKey:function(){return a.successorId},updateKey:function(u){return a.successorId=u}}]},enumerable:!1,configurable:!0}),s}(f(7917).HistoryItem);b.InsertDependencyHistoryItem=d},5865:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RemoveDependencyHistoryItem=void 0;var S=f(655),T=f(6124),y=function(d){function c(s,a){var u=d.call(this,s)||this;return u.dependencyId=a,u}return S.__extends(c,d),c.prototype.redo=function(){this.dependency=this.modelManipulator.dependency.removeDependency(this.dependencyId)},c.prototype.undo=function(){this.modelManipulator.dependency.insertDependency(this.dependency.predecessorId,this.dependency.successorId,this.dependency.type,this.dependencyId)},Object.defineProperty(c.prototype,"keyUpdaters",{get:function(){var s=this;return[{objectType:T.GanttDataObjectNames.dependency,getKey:function(){return s.dependencyId},updateKey:function(a){return s.dependencyId=a}},{objectType:T.GanttDataObjectNames.task,getKey:function(){var a;return null===(a=s.dependency)||void 0===a?void 0:a.predecessorId},updateKey:function(a){return s.dependency.predecessorId=a}},{objectType:T.GanttDataObjectNames.task,getKey:function(){var a;return null===(a=s.dependency)||void 0===a?void 0:a.successorId},updateKey:function(a){return s.dependency.successorId=a}}]},enumerable:!1,configurable:!0}),c}(f(7917).HistoryItem);b.RemoveDependencyHistoryItem=y},7917:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.HistoryItem=void 0;var f=function(){function S(T){this.setModelManipulator(T)}return S.prototype.setModelManipulator=function(T){this.modelManipulator=T},Object.defineProperty(S.prototype,"keyUpdaters",{get:function(){return[]},enumerable:!1,configurable:!0}),S}();b.HistoryItem=f},5221:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.HistoryItemInfo=void 0,b.HistoryItemInfo=function(S,T){void 0===T&&(T=!1),this.item=S,this.isUndo=T}},3064:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.HistoryItemState=void 0,b.HistoryItemState=function(S,T){this.id=S,this.value=T}},3683:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.AssignResourceHistoryItem=void 0;var S=f(655),T=f(7917),y=f(6124),d=f(8679),c=function(s){function a(u,h,g){var _=s.call(this,u)||this;return _.resourceId=h,_.taskId=g,_}return S.__extends(a,s),a.prototype.redo=function(){var u;null!==(u=this.insertedKey)&&void 0!==u||(this.insertedKey=d.MathUtils.generateGuid()),this.modelManipulator.resource.assign(this.resourceId,this.taskId,this.insertedKey)},a.prototype.undo=function(){this.modelManipulator.resource.deassig(this.insertedKey)},Object.defineProperty(a.prototype,"keyUpdaters",{get:function(){var u=this;return[{objectType:y.GanttDataObjectNames.resourceAssignment,getKey:function(){return u.insertedKey},updateKey:function(h){return u.insertedKey=h}},{objectType:y.GanttDataObjectNames.task,getKey:function(){return u.taskId},updateKey:function(h){return u.taskId=h}},{objectType:y.GanttDataObjectNames.resource,getKey:function(){return u.resourceId},updateKey:function(h){return u.resourceId=h}}]},enumerable:!1,configurable:!0}),a}(T.HistoryItem);b.AssignResourceHistoryItem=c},1493:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DeassignResourceHistoryItem=void 0;var S=f(655),T=f(7917),y=f(6124),d=function(c){function s(a,u){var h=c.call(this,a)||this;return h.assignmentId=u,h}return S.__extends(s,c),s.prototype.redo=function(){this.assignment=this.modelManipulator.resource.deassig(this.assignmentId)},s.prototype.undo=function(){this.modelManipulator.resource.assign(this.assignment.resourceId,this.assignment.taskId,this.assignmentId)},Object.defineProperty(s.prototype,"keyUpdaters",{get:function(){var a=this;return[{objectType:y.GanttDataObjectNames.resourceAssignment,getKey:function(){return a.assignmentId},updateKey:function(u){return a.assignmentId=u}},{objectType:y.GanttDataObjectNames.task,getKey:function(){var u;return null===(u=a.assignment)||void 0===u?void 0:u.taskId},updateKey:function(u){return a.assignment.taskId=u}},{objectType:y.GanttDataObjectNames.resource,getKey:function(){var u;return null===(u=a.assignment)||void 0===u?void 0:u.resourceId},updateKey:function(u){return a.assignment.resourceId=u}}]},enumerable:!1,configurable:!0}),s}(T.HistoryItem);b.DeassignResourceHistoryItem=d},2961:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CreateResourceHistoryItem=void 0;var S=f(655),T=f(7917),y=f(6124),d=f(8679),c=function(s){function a(u,h,g,_){void 0===g&&(g="");var x=s.call(this,u)||this;return x.text=h,x.color=g,x.createCallback=_,x}return S.__extends(a,s),a.prototype.redo=function(){var u;null!==(u=this.insertedKey)&&void 0!==u||(this.insertedKey=d.MathUtils.generateGuid()),this.modelManipulator.resource.create(this.text,this.color,this.insertedKey,this.createCallback)},a.prototype.undo=function(){this.modelManipulator.resource.remove(this.insertedKey)},Object.defineProperty(a.prototype,"keyUpdaters",{get:function(){var u=this;return[{objectType:y.GanttDataObjectNames.resource,getKey:function(){return u.insertedKey},updateKey:function(h){return u.insertedKey=h}}]},enumerable:!1,configurable:!0}),a}(T.HistoryItem);b.CreateResourceHistoryItem=c},4641:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceColorHistoryItem=void 0;var S=f(655),T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S.__extends(d,y),d.prototype.getPropertiesManipulator=function(){return this.modelManipulator.resource.properties.color},d}(f(7049).ResourcePropertiesHistoryItemBase);b.ResourceColorHistoryItem=T},7049:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcePropertiesHistoryItemBase=void 0;var S=f(655),T=f(6124),y=function(d){function c(s,a,u){var h=d.call(this,s)||this;return h.resourceId=a,h.newValue=u,h}return S.__extends(c,d),c.prototype.redo=function(){this.oldState=this.getPropertiesManipulator().setValue(this.resourceId,this.newValue)},c.prototype.undo=function(){this.getPropertiesManipulator().restoreValue(this.oldState)},c.prototype.getPropertiesManipulator=function(){throw new Error("Not Implemented")},Object.defineProperty(c.prototype,"keyUpdaters",{get:function(){var s=this;return[{objectType:T.GanttDataObjectNames.resource,getKey:function(){return s.resourceId},updateKey:function(a){return s.resourceId=a}}]},enumerable:!1,configurable:!0}),c}(f(7917).HistoryItem);b.ResourcePropertiesHistoryItemBase=y},7466:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RemoveResourceHistoryItem=void 0;var S=f(655),T=f(9751),y=f(6124),d=function(c){function s(a,u){var h=c.call(this)||this;return h.modelManipulator=a,h.resourceId=u,h}return S.__extends(s,c),s.prototype.redo=function(){c.prototype.redo.call(this),this.resource=this.modelManipulator.resource.remove(this.resourceId)},s.prototype.undo=function(){var a=this;this.modelManipulator.resource.create(this.resource.text,this.resource.color,this.resourceId,function(){a.resource.color&&a.modelManipulator.resource.properties.color.setValue(a.resource.internalId,a.resource.color),window.setTimeout(function(){return c.prototype.undo.call(a)},0)})},s.prototype.undoItemsQuery=function(){this.modelManipulator.resource.create(this.resource.text,this.resource.color,this.resourceId,function(){}),this.resource.color&&this.modelManipulator.resource.properties.color.setValue(this.resource.internalId,this.resource.color),c.prototype.undo.call(this)},Object.defineProperty(s.prototype,"keyUpdaters",{get:function(){var a=this;return[{objectType:y.GanttDataObjectNames.resource,getKey:function(){return a.resourceId},updateKey:function(u){return a.resourceId=u}}]},enumerable:!1,configurable:!0}),s}(T.CompositionHistoryItem);b.RemoveResourceHistoryItem=d},1284:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CreateTaskHistoryItem=void 0;var S=f(655),T=f(8679),y=f(6124),d=function(c){function s(a,u){var h=c.call(this,a)||this;return h.data=u,h}return S.__extends(s,c),s.prototype.redo=function(){var a;null!==(a=this.insertedKey)&&void 0!==a||(this.insertedKey=T.MathUtils.generateGuid()),this.modelManipulator.task.create(this.data,this.insertedKey)},s.prototype.undo=function(){this.modelManipulator.task.remove(this.insertedKey)},Object.defineProperty(s.prototype,"keyUpdaters",{get:function(){var a,u=this,h=[{objectType:y.GanttDataObjectNames.task,getKey:function(){return u.insertedKey},updateKey:function(g){return u.insertedKey=g}}];return!(null===(a=this.data)||void 0===a)&&a.parentId&&h.push({objectType:y.GanttDataObjectNames.task,getKey:function(){var g;return null===(g=u.data)||void 0===g?void 0:g.parentId},updateKey:function(g){return u.data.parentId=g}}),h},enumerable:!1,configurable:!0}),s}(f(7917).HistoryItem);b.CreateTaskHistoryItem=d},9599:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RemoveTaskHistoryItem=void 0;var S=f(655),T=f(6124),y=f(9751),d=function(c){function s(a,u){var h=c.call(this)||this;return h.modelManipulator=a,h.taskId=u,h}return S.__extends(s,c),s.prototype.redo=function(){c.prototype.redo.call(this),this.task=this.modelManipulator.task.remove(this.taskId)},s.prototype.undo=function(){var a=this;this.modelManipulator.task.create(this.task,this.taskId,function(){window.setTimeout(function(){return c.prototype.undo.call(a)},0)})},s.prototype.undoItemsQuery=function(){var a;this.modelManipulator.task.create(this.task,this.taskId);for(var u=this.historyItems.length-1;a=this.historyItems[u];u--)a instanceof y.CompositionHistoryItem?a.undoItemsQuery():a.undo()},Object.defineProperty(s.prototype,"keyUpdaters",{get:function(){var a=this;return[{objectType:T.GanttDataObjectNames.task,getKey:function(){return a.taskId},updateKey:function(u){return a.taskId=u}},{objectType:T.GanttDataObjectNames.task,getKey:function(){var u;return null===(u=a.task)||void 0===u?void 0:u.parentId},updateKey:function(u){return a.task.parentId=u}}]},enumerable:!1,configurable:!0}),s}(y.CompositionHistoryItem);b.RemoveTaskHistoryItem=d},9496:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.UpdateTaskHistoryItem=void 0;var S=f(655),T=f(6124),y=f(7917),d=f(3064),c=function(s){function a(u,h,g){var _=s.call(this,u)||this;return _.taskId=h,_.newValues=g,_}return S.__extends(a,s),a.prototype.redo=function(){var u=this.modelManipulator.task.update(this.taskId,this.newValues);this.oldState=new d.HistoryItemState(this.taskId,u)},a.prototype.undo=function(){this.modelManipulator.task.update(this.taskId,this.oldState.value)},Object.defineProperty(a.prototype,"keyUpdaters",{get:function(){var u=this;return[{objectType:T.GanttDataObjectNames.task,getKey:function(){return u.taskId},updateKey:function(h){return u.taskId=h}}]},enumerable:!1,configurable:!0}),a}(y.HistoryItem);b.UpdateTaskHistoryItem=c},6382:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.BaseManipulator=void 0;var f=function(){function S(T,y){this.viewModel=T,this.dispatcher=y}return S.prototype.getErrorCallback=function(){return this.viewModel.getDataUpdateErrorCallback()},Object.defineProperty(S.prototype,"renderHelper",{get:function(){return this.viewModel.owner.renderHelper},enumerable:!1,configurable:!0}),S}();b.BaseManipulator=f},1178:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskDependencyManipulator=void 0;var S=f(655),T=f(6124),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.insertDependency=function(s,a,u,h){var g=this.viewModel;g.onBeginDataObjectCreate();var _=g.dependencies.createItem();return _.predecessorId=s,_.successorId=a,_.type=u,h&&(_.internalId=h),_.id=_.internalId,g.dependencies.add(_),g.updateVisibleItemDependencies(),this.renderHelper.recreateConnectorLineElement(_.internalId,!0),this.dispatcher.notifyDependencyInserted(this.getObjectForDataSource(_),function(x){var w=_.internalId;_.updateId(x),g.processServerInsertedKey(w,_.internalId,T.GanttDataObjectNames.dependency)},this.getErrorCallback()),g.onEndDataObjectCreate(),_},c.prototype.removeDependency=function(s){var a=this.viewModel.dependencies.getItemById(s);return this.viewModel.dependencies.remove(a),this.dispatcher.notifyDependencyRemoved(a.id,this.getErrorCallback(),this.viewModel.getDependencyObjectForDataSource(a)),this.viewModel.updateVisibleItemDependencies(),this.renderHelper.recreateConnectorLineElement(a.internalId),a},c.prototype.getObjectForDataSource=function(s){var a=this.viewModel.tasks.getItemById(s.predecessorId),u=this.viewModel.tasks.getItemById(s.successorId);return{id:s.id,predecessorId:a.id,successorId:u.id,type:s.type}},c}(f(6382).BaseManipulator);b.TaskDependencyManipulator=y},9650:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ModelManipulator=void 0;var S=f(1178),T=f(7518),y=f(728);b.ModelManipulator=function(c,s){this.task=new y.TaskManipulator(c,s),this.dependency=new S.TaskDependencyManipulator(c,s),this.resource=new T.ResourcesManipulator(c,s),this.dispatcher=s}},4596:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourceColorManipulator=void 0;var S=f(655),T=function(y){function d(){return null!==y&&y.apply(this,arguments)||this}return S.__extends(d,y),d.prototype.getPropertyValue=function(c){return c.color},d.prototype.setPropertyValue=function(c,s){c.color=s,this.dispatcher.notifyResourceColorChanged(c.id,s,this.getErrorCallback())},d}(f(7470).ResourcePropertyManipulator);b.ResourceColorManipulator=T},79:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcePropertiesManipulator=void 0;var S=f(655),T=f(6382),y=f(4596),d=function(c){function s(a,u){var h=c.call(this,a,u)||this;return h.color=new y.ResourceColorManipulator(a,u),h}return S.__extends(s,c),s}(T.BaseManipulator);b.ResourcePropertiesManipulator=d},7470:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcePropertyManipulator=void 0;var S=f(655),T=f(3064),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.setValue=function(s,a){var u=this,h=this.viewModel.resources.getItemById(s),g=new T.HistoryItemState(s,this.getPropertyValue(h));return this.setPropertyValue(h,a),this.viewModel.assignments.items.filter(function(_){return _.resourceId===h.internalId}).forEach(function(_){var x=u.viewModel.findItem(_.taskId).visibleIndex;u.renderHelper.recreateTaskElement(x)}),g},c.prototype.restoreValue=function(s){var a=this;if(s){var u=s.value,h=this.viewModel.resources.getItemById(s.id);this.setPropertyValue(h,u),this.viewModel.assignments.items.filter(function(g){return g.resourceId===h.internalId}).forEach(function(g){var _=a.viewModel.findItem(g.taskId).visibleIndex;a.renderHelper.recreateTaskElement(_)})}},c}(f(6382).BaseManipulator);b.ResourcePropertyManipulator=y},7518:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourcesManipulator=void 0;var S=f(655),T=f(6124),y=f(6382),d=f(79),c=function(s){function a(u,h){var g=s.call(this,u,h)||this;return g.properties=new d.ResourcePropertiesManipulator(u,h),g}return S.__extends(a,s),a.prototype.create=function(u,h,g,_){var x=this.viewModel;x.onBeginDataObjectCreate();var w=x.resources.createItem();return w.text=u,h&&(w.color=h),g&&(w.internalId=g),w.id=w.internalId,this.viewModel.resources.add(w),this.dispatcher.notifyResourceCreated(this.getResourceObjectForDataSource(w),function(D){var C=w.internalId;w.updateId(D),x.processServerInsertedKey(C,w.internalId,T.GanttDataObjectNames.resource),_&&_(D)},this.getErrorCallback()),x.onEndDataObjectCreate(),w},a.prototype.remove=function(u){var h=this.viewModel.resources.getItemById(u);if(!h)throw new Error("Invalid resource id");if(this.viewModel.assignments.items.filter(function(g){return g.resourceId===u}).length)throw new Error("Can't delete assigned resource");return this.viewModel.resources.remove(h),this.dispatcher.notifyResourceRemoved(h.id,this.getErrorCallback(),this.viewModel.getResourceObjectForDataSource(h)),h},a.prototype.assign=function(u,h,g){var _=this.viewModel;_.onBeginDataObjectCreate();var x=_.assignments.createItem();return x.resourceId=u,x.taskId=h,g&&(x.internalId=g),x.id=x.internalId,this.viewModel.assignments.add(x),this.dispatcher.notifyResourceAssigned(this.getResourceAssignmentObjectForDataSource(x),function(w){var D=x.internalId;x.updateId(w),_.processServerInsertedKey(D,x.internalId,T.GanttDataObjectNames.resourceAssignment)},this.getErrorCallback()),this.viewModel.updateModel(),_.onEndDataObjectCreate(),this.viewModel.owner.resetAndUpdate(),x},a.prototype.deassig=function(u){var h=this.viewModel.assignments.getItemById(u);return this.viewModel.assignments.remove(h),this.dispatcher.notifyResourceUnassigned(h.id,this.getErrorCallback(),this.viewModel.getResourceAssignmentObjectForDataSource(h)),this.viewModel.updateModel(),this.viewModel.owner.resetAndUpdate(),h},a.prototype.getResourceObjectForDataSource=function(u){return{id:u.id,text:u.text}},a.prototype.getResourceAssignmentObjectForDataSource=function(u){return{id:u.id,taskId:this.viewModel.tasks.getItemById(u.taskId).id,resourceId:this.viewModel.resources.getItemById(u.resourceId).id}},a}(y.BaseManipulator);b.ResourcesManipulator=c},728:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskManipulator=void 0;var S=f(655),T=f(2491),y=f(6124),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.create=function(a,u,h){var g=this,_=this.viewModel;_.onBeginDataObjectCreate();var x=_.tasks.createItem();x.start=a.start,x.end=a.end,x.title=a.title,x.progress=a.progress,a.color&&(x.color=a.color);var w=_.tasks.getItemById(a.parentId);return w&&(w.expanded=!0),x.parentId=a.parentId,u&&(x.internalId=u),x.id=x.internalId,_.tasks.add(x),_.updateModel(),this.dispatcher.notifyTaskCreated(this.getObjectForDataSource(x),function(D){var C=x.internalId;if(x.updateId(D),_.processServerInsertedKey(C,x.internalId,y.GanttDataObjectNames.task),h&&h(),g.viewModel.requireFirstLoadParentAutoCalc){var I=_.getCurrentTaskData().map(function(L){return""===L.parentId&&(L.parentId=null),L});g.dispatcher.notifyParentDataRecalculated(I)}},this.getErrorCallback()),_.onEndDataObjectCreate(),_.owner.resetAndUpdate(),x},s.prototype.remove=function(a){var u=this.viewModel.tasks.getItemById(a);if(!u)throw new Error("Invalid task id");if(this.viewModel.dependencies.items.filter(function(h){return h.predecessorId==a||h.successorId==a}).length)throw new Error("Can't delete task with dependency");if(this.viewModel.assignments.items.filter(function(h){return h.taskId==a}).length)throw new Error("Can't delete task with assigned resource");return this.viewModel.tasks.remove(u),this.dispatcher.notifyTaskRemoved(u.id,this.getErrorCallback(),this.viewModel.getTaskObjectForDataSource(u)),this.viewModel.updateModel(),this.viewModel.owner.resetAndUpdate(),u},s.prototype.update=function(a,u){var h=this.viewModel.tasks.getItemById(a),g={};Object.keys(u).forEach(function(x){(0,T.isDefined)(h[x])&&(g[x]=h[x],h[x]=u[x])});var _=this.viewModel.findItem(a);return _&&this.renderHelper.recreateTaskElement(_.visibleIndex),this.dispatcher.notifyTaskUpdated(h.id,u,this.getErrorCallback()),g},s.prototype.getObjectForDataSource=function(a){return this.viewModel.getTaskObjectForDataSource(a)},s}(f(6382).BaseManipulator);b.TaskManipulator=d},2601:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttJsonUtils=void 0;var S=f(9937),T=function(){function y(){}return y.parseJson=function(d){return S.JsonUtils.isValid(d)?JSON.parse(d):null},y}();b.GanttJsonUtils=T},8478:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ValidationController=void 0;var S=f(655),T=f(2491),y=f(9201),d=f(5950),c=f(9496),s=f(858),a=f(7880),u=f(4927),h=function(){function g(_){this.lockPredecessorToSuccessor=!0,this.settings=_}return Object.defineProperty(g.prototype,"viewModel",{get:function(){return this.settings.getViewModel()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"history",{get:function(){return this.settings.getHistory()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"modelManipulator",{get:function(){return this.settings.getModelManipulator()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"range",{get:function(){return this.settings.getRange()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"validationSettings",{get:function(){return this.settings.getValidationSettings()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"_parentAutoCalc",{get:function(){return this.viewModel.parentAutoCalc},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"enablePredecessorGap",{get:function(){return this.viewModel.enablePredecessorGap},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isValidateDependenciesRequired",{get:function(){return this.settings.getIsValidateDependenciesRequired()},enumerable:!1,configurable:!0}),g.prototype.updateOwnerInAutoParentMode=function(){this.settings.updateOwnerInAutoParentMode()},g.prototype.checkStartDependencies=function(_,x){var w=this,D=[],C=this.viewModel.tasks.getItemById(_);return this.viewModel.dependencies.items.filter(function(I){return I.successorId===_}).forEach(function(I){var L=w.viewModel.tasks.getItemById(I.predecessorId);(I.type===d.DependencyType.FS&&L.end>x||I.type===d.DependencyType.SS&&L.start>x)&&D.push(new u.ValidationError(I.internalId,!0)),(I.type===d.DependencyType.FS&&L.end.valueOf()===C.start.valueOf()&&x>L.end||I.type===d.DependencyType.SS&&L.start.valueOf()===C.start.valueOf()&&x>L.start)&&D.push(new u.ValidationError(I.internalId))}),D},g.prototype.checkEndDependencies=function(_,x){var w=this,D=[],C=this.viewModel.tasks.getItemById(_);return this.viewModel.dependencies.items.filter(function(I){return I.successorId===_}).forEach(function(I){var L=w.viewModel.tasks.getItemById(I.predecessorId);(I.type===d.DependencyType.SF&&L.start>x||I.type===d.DependencyType.FF&&L.end>x)&&D.push(new u.ValidationError(I.internalId,!0)),(I.type===d.DependencyType.SF&&L.start.valueOf()===C.end.valueOf()&&x>L.start||I.type===d.DependencyType.FF&&L.end.valueOf()===C.end.valueOf()&&x>L.end)&&D.push(new u.ValidationError(I.internalId))}),D},g.prototype.moveEndDependTasks=function(_,x,w){var D=this;void 0===w&&(w=null);var C=this.viewModel.dependencies.items.filter(function(L){return L.predecessorId===_&&!L.isStartDependency}),I=this.viewModel.tasks.getItemById(_);C.forEach(function(L){var N=D.viewModel.tasks.getItemById(L.successorId);if(!(!N||w&&D.viewModel.checkParent(N.internalId,w)||N.parentId===I.id)){var G=new s.DateRange(new Date(N.start.getTime()),new Date(N.end.getTime())),k=new s.DateRange(new Date(N.start.getTime()),new Date(N.end.getTime())),U=I.end.getTime()-x.getTime(),B=D.enablePredecessorGap?I.end:x;L.type===d.DependencyType.FS&&(N.start<B||D.lockPredecessorToSuccessor&&N.start.getTime()===x.getTime())?(k.start.setTime(I.end.getTime()),k.end.setTime(k.start.getTime()+(N.end.getTime()-N.start.getTime())),D.correctMoving(N.internalId,k)):L.type===d.DependencyType.FF&&(N.end<B||D.lockPredecessorToSuccessor&&N.end.getTime()===x.getTime())?(k.start.setTime(I.end.getTime()-(N.end.getTime()-N.start.getTime())),k.end.setTime(I.end.getTime()),D.correctMoving(N.internalId,k)):D.enablePredecessorGap||(k.start.setTime(N.start.getTime()+U),k.end.setTime(N.end.getTime()+U)),G.equal(k)||(D.history.addAndRedo(new c.UpdateTaskHistoryItem(D.modelManipulator,L.successorId,{start:k.start,end:k.end})),D.moveRelatedTasks(L,G,N,k))}})},g.prototype.moveStartDependTasks=function(_,x,w){var D=this;void 0===w&&(w=null);var C=this.viewModel.dependencies.items.filter(function(L){return L.predecessorId===_&&L.isStartDependency}),I=this.viewModel.tasks.getItemById(_);C.forEach(function(L){var N=D.viewModel.tasks.getItemById(L.successorId);if(!(!N||w&&D.viewModel.checkParent(N.internalId,w)||N.parentId===I.id)){var G=new s.DateRange(new Date(N.start.getTime()),new Date(N.end.getTime())),k=new s.DateRange(new Date(N.start.getTime()),new Date(N.end.getTime())),U=I.start.getTime()-x.getTime(),B=D.enablePredecessorGap?I.start:x;L.type===d.DependencyType.SF&&(N.end<B||D.lockPredecessorToSuccessor&&N.end.getTime()===x.getTime())?(k.start.setTime(I.start.getTime()-(N.end.getTime()-N.start.getTime())),k.end.setTime(I.start.getTime()),D.correctMoving(N.internalId,k)):L.type===d.DependencyType.SS&&(N.start<B||D.lockPredecessorToSuccessor&&N.start.getTime()===x.getTime())?(k.start.setTime(I.start.getTime()),k.end.setTime(I.start.getTime()+(N.end.getTime()-N.start.getTime())),D.correctMoving(N.internalId,k)):D.enablePredecessorGap||(k.start.setTime(N.start.getTime()+U),k.end.setTime(N.end.getTime()+U)),G.equal(k)||(D.history.addAndRedo(new c.UpdateTaskHistoryItem(D.modelManipulator,L.successorId,{start:k.start,end:k.end})),D.moveRelatedTasks(L,G,N,k))}})},g.prototype.moveRelatedTasks=function(_,x,w,D){var C=D.start.getTime()-x.start.getTime();this.correctParentsOnChildMoving(w.internalId,C),this.moveStartDependTasks(_.successorId,x.start),this.moveEndDependTasks(_.successorId,x.end)},g.prototype.getCorrectDateRange=function(_,x,w){var D=this,C=new s.DateRange(new Date(x),new Date(w));return S.__spreadArray(S.__spreadArray([],this.checkStartDependencies(_,C.start),!0),this.checkEndDependencies(_,C.end),!0).filter(function(I){return I.critical}).forEach(function(I){var L=D.viewModel.dependencies.getItemById(I.dependencyId),N=D.viewModel.tasks.getItemById(L.predecessorId);L.type===d.DependencyType.FS&&C.start<N.end&&C.start.setTime(N.end.getTime()),L.type===d.DependencyType.SS&&C.start<N.start&&C.start.setTime(N.start.getTime()),L.type===d.DependencyType.FF&&C.end<N.end&&C.end.setTime(N.end.getTime()),L.type===d.DependencyType.SF&&C.end<N.start&&C.end.setTime(N.start.getTime())}),C},g.prototype.correctMoving=function(_,x){var w=this,D=x.end.getTime()-x.start.getTime();return S.__spreadArray(S.__spreadArray([],this.checkStartDependencies(_,x.start),!0),this.checkEndDependencies(_,x.end),!0).filter(function(C){return C.critical}).forEach(function(C){var I=w.viewModel.dependencies.getItemById(C.dependencyId),L=w.viewModel.tasks.getItemById(I.predecessorId);I.type===d.DependencyType.FS&&x.start<L.end&&(x.start.setTime(L.end.getTime()),x.end.setTime(x.start.getTime()+D)),I.type===d.DependencyType.SS&&x.start<L.start&&(x.start.setTime(L.start.getTime()),x.end.setTime(x.start.getTime()+D)),I.type===d.DependencyType.FF&&x.end<L.end&&(x.end.setTime(L.end.getTime()),x.start.setTime(x.end.getTime()-D)),I.type===d.DependencyType.SF&&x.end<L.start&&(x.end.setTime(L.start.getTime()),x.start.setTime(x.end.getTime()-D))}),x},g.prototype.recalculateParents=function(_,x){for(var w=_&&_.parent;w&&w.task;){for(var D=w.children,C=this.range.end,I=this.range.start,L=0,N=0,G={id:w.task.internalId},k=0;k<D.length;k++){var U=D[k].task;if(U.isValid()){C=a.DateTimeUtils.getMinDate(C,U.start),I=a.DateTimeUtils.getMaxDate(I,U.end);var B=U.getDuration();L+=U.progress*B,N+=B}}a.DateTimeUtils.areDatesEqual(w.task.start,C)||(G.start=C),a.DateTimeUtils.areDatesEqual(w.task.end,I)||(G.end=I),G.oldStart=w.task.start,G.oldEnd=w.task.end,(L=N>0?Math.round(L/N):0)!==w.task.progress&&(G.progress=L),x(G),w=w.parent}},g.prototype.updateParentsRangeByChild=function(_){var x=this;this.recalculateParents(this.viewModel.findItem(_),function(w){if((0,T.isDefined)(w.id)){var D=x.history,C=x.modelManipulator;(0,T.isDefined)(w.start)&&(D.addAndRedo(new c.UpdateTaskHistoryItem(C,w.id,{start:w.start})),x.moveStartDependTasks(w.id,w.oldStart)),(0,T.isDefined)(w.end)&&(D.addAndRedo(new c.UpdateTaskHistoryItem(C,w.id,{end:w.end})),x.moveEndDependTasks(w.id,w.oldEnd)),(0,T.isDefined)(w.progress)&&D.addAndRedo(new c.UpdateTaskHistoryItem(C,w.id,{progress:w.progress}))}})},g.prototype.updateChildRangeByParent=function(_,x,w){var D=this.viewModel.findItem(_);if(D&&0!==D.children.length)for(var C=D.children,I=0;I<C.length;I++){var L=C[I].task,N=new Date(L.start.getTime()+x),G=y.DateUtils.getRangeMSPeriod(L.start,L.end),k=y.DateUtils.getDSTCorrectedTaskEnd(N,G);w.push({id:L.internalId,start:L.start,end:L.end}),this.history.addAndRedo(new c.UpdateTaskHistoryItem(this.modelManipulator,L.internalId,{start:N,end:k})),this.updateChildRangeByParent(L.internalId,x,w)}},g.prototype.updateParentsIfRequired=function(_){this._parentAutoCalc&&(this.updateParentsRangeByChild(_),this.updateOwnerInAutoParentMode())},g.prototype.correctParentsOnChildMoving=function(_,x){var w=this;if(this._parentAutoCalc&&0!==x){this.updateParentsRangeByChild(_);var D=[];this.updateChildRangeByParent(_,x,D),this.isValidateDependenciesRequired&&D.forEach(function(C){w.moveStartDependTasks(C.id,C.start,_),w.moveEndDependTasks(C.id,C.end,_)}),this.updateOwnerInAutoParentMode()}},g.prototype.canCreateDependency=function(_,x){return this.viewModel.canCreateDependency(_,x)},g}();b.ValidationController=h},4927:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ValidationError=void 0,b.ValidationError=function(S,T){void 0===T&&(T=!1),this.dependencyId=S,this.critical=T}},6350:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ViewVisualModelDependencyInfo=void 0,b.ViewVisualModelDependencyInfo=function(S,T,y){this.id=S,this.predecessor=T,this.type=y}},3562:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ViewVisualModelItem=void 0;var S=f(2491),T=f(6353),y=function(){function d(c,s){this.dependencies=new Array,this.parent=null,this.visible=!0,this.selected=!1,this.visibleIndex=-1,this.task=c,this.resources=s,this.children=new Array,this.isCustom=!1,this.size=new T.Size(0,0)}return Object.defineProperty(d.prototype,"resourceText",{get:function(){var c="";return this.resources.items.forEach(function(s){return c+=s.text+" "}),c},enumerable:!1,configurable:!0}),d.prototype.addChild=function(c){(0,S.isDefined)(c)&&this.children.indexOf(c)<0&&this.children.push(c)},d.prototype.removeChild=function(c){var s=this.children.indexOf(c);s>-1&&this.children.splice(s,1)},d.prototype.getExpanded=function(){return!!this.task&&this.task.expanded},d.prototype.getVisible=function(){if(!this.visible)return!1;for(var c=this.parent;c;){if(!c.visible)return!1;c=c.parent}return!0},d.prototype.changeVisibility=function(c){this.visible=c},d.prototype.changeSelection=function(c){this.selected=c},d.prototype.setDependencies=function(c){c&&(this.dependencies=c.slice())},d}();b.ViewVisualModelItem=y},1408:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ViewVisualModel=void 0;var S=f(8828),T=f(9504),y=f(7380),d=f(9883),c=f(3562),s=f(6350),a=f(21),u=f(2491),h=f(6124),g=f(7352),_=f(2301),x=f(7437),w=function(){function D(C,I,L,N,G,k,U){this._fLockCount=0,this.lockChangesProcessing=!1,this.owner=C,this.tasks=new T.TaskCollection,this.tasks.importFromObject(I),this.dependencies=new y.DependencyCollection,this.dependencies.importFromObject(L),this.resources=new S.ResourceCollection,this.resources.importFromObject(N),this.assignments=new d.ResourceAssignmentCollection,this.assignments.importFromObject(G),this._itemList=new Array,this._viewItemList=new Array,this._workTimeCalculator=new a.WorkingTimeCalculator(k,U),this.updateModel(!0)}return Object.defineProperty(D.prototype,"renderHelper",{get:function(){return this.owner.renderHelper},enumerable:!1,configurable:!0}),D.prototype.updateModel=function(C){this._itemList.splice(0,this._itemList.length);for(var I=this.tasks.items,L=0;L<I.length;L++){var N=I[L];N&&this._itemList.push(new c.ViewVisualModelItem(N,this.getAssignedResources(N)))}this.createHierarchy(C),this.populateItemsForView(),this.owner&&this.owner.currentSelectedTaskID&&this.changeTaskSelected(this.owner.currentSelectedTaskID,!0)},D.prototype.createHierarchy=function(C){var I=this;this.root=new c.ViewVisualModelItem(null,null);for(var L=this._itemList,N=L.reduce(function(K,J){var ie,re=null===(ie=J.task)||void 0===ie?void 0:ie.internalId;return(0,u.isDefined)(re)&&(K[re]=J),K},{}),G=this.requireFirstLoadParentAutoCalc&&C,k=0;k<L.length;k++){var U=L[k],B=N[U.task.parentId]||this.root;U.parent=B,B.addChild(U),G&&this.owner.validationController.recalculateParents(U,function(K){if((0,u.isDefined)(K.id)){var J=I.tasks.getItemById(K.id);(0,u.isDefined)(K.start)&&(J.start=K.start),(0,u.isDefined)(K.end)&&(J.end=K.end),(0,u.isDefined)(K.progress)&&(J.progress=K.progress)}})}G&&this.owner.dispatcher.notifyParentDataRecalculated(this.getCurrentTaskData())},D.prototype.getCurrentTaskData=function(){var C=this;return this.tasks.items.map(function(I){return C.getTaskObjectForDataSource(I)})},D.prototype.getTaskObjectForDataSource=function(C){var I=C.parentId&&this.tasks.getItemById(C.parentId),L=this.getRootTaskId(),N=L&&C.parentId===L?this.getRootRawValue():I?.id;return{id:C.id,start:C.isValidStart()?C.start:null,end:C.isValidEnd()?C.end:null,duration:C.duration,description:C.description,parentId:N,progress:C.progress,color:C.color,taskType:C.taskType,title:C.title,customFields:C.customFields,expanded:C.expanded}},D.prototype.getDependencyObjectForDataSource=function(C){var I=C instanceof g.Dependency?C:this.getItemByPublicId("dependency",C);if(I){var L=this.convertInternalToPublicKey("task",I.predecessorId),N=this.convertInternalToPublicKey("task",I.successorId);return{id:I.id,predecessorId:(0,u.isDefined)(L)?L:I.predecessorId,successorId:(0,u.isDefined)(N)?N:I.successorId,type:I.type}}return null},D.prototype.getResourceObjectForDataSource=function(C){var I=C instanceof _.Resource?C:this.getItemByPublicId("resource",C);return I?{id:I.id,text:I.text,color:I.color}:null},D.prototype.getResourceAssignmentObjectForDataSource=function(C){var I=C instanceof x.ResourceAssignment?C:this.getItemByPublicId("assignment",C);if(I){var L=this.convertInternalToPublicKey("task",I.taskId),N=this.convertInternalToPublicKey("resource",I.resourceId);return{id:I.id,taskId:(0,u.isDefined)(L)?L:I.taskId,resourceId:(0,u.isDefined)(N)?N:I.resourceId}}return null},D.prototype.getRootRawValue=function(){var C,I,L;return null!==(L=null===(I=null===(C=this.root.children[0])||void 0===C?void 0:C.task)||void 0===I?void 0:I.rawParentId)&&void 0!==L?L:null},D.prototype.populateItemsForView=function(){this._viewItemList.splice(0,this._viewItemList.length),this.populateVisibleItems(this.root),this.updateVisibleItemDependencies()},D.prototype.populateVisibleItems=function(C){var I=this,L=C===this.root;C&&(C.task||L)&&(L||(this._viewItemList.push(C),C.visibleIndex=this._viewItemList.length-1),(C.getExpanded()||C===this.root)&&C.children.forEach(function(N){return I.populateVisibleItems(N)}))},D.prototype.updateVisibleItemDependencies=function(){for(var C=this._viewItemList,I=0;I<C.length;I++){var L=C[I],N=this.getTasVisibleDependencies(L.task);L.setDependencies(N)}},D.prototype.getAssignedResources=function(C){var I=this,L=new S.ResourceCollection;return this.assignments.items.filter(function(N){return N.taskId==C.internalId}).forEach(function(N){L.add(I.resources.getItemById(N.resourceId))}),L},D.prototype.getTasVisibleDependencies=function(C){for(var I=new Array,L=C.internalId,N=this.dependencies.items.filter(function(B){return B.successorId==L}),G=0;G<N.length;G++){var k=N[G],U=this.findItem(k.predecessorId);U&&U.getVisible()&&I.push(new s.ViewVisualModelDependencyInfo(k.internalId,U,k.type))}return I},D.prototype.changeTaskExpanded=function(C,I){var L=this.tasks.getItemById(String(C));L&&(L.expanded=I,this.changed())},D.prototype.changeTaskVisibility=function(C,I){var L=this.findItem(C);L&&(L.visible=I,this.changed())},D.prototype.changeTaskSelected=function(C,I){var L=this._itemList.filter(function(k){return k.task&&k.task.internalId===C})[0];if(L){L.selected=I;var N=this.findItem(C),G=N&&N.visibleIndex;G>-1&&this.renderHelper.recreateTaskElement(G)}},D.prototype.beginUpdate=function(){this._fLockCount++},D.prototype.endUpdate=function(){this._fLockCount--,0==this._fLockCount&&this.changed()},D.prototype.compareTaskOrder=function(C){var I=new T.TaskCollection;I.importFromObject(C);var L=I.items,N=this.tasks.items;if(L.length!==N.length)return!1;for(var G=0;G<L.length;G++)if(L[G].id!==N[G].id)return!1;return!0},D.prototype.refreshTaskDataIfRequires=function(C){var I=!this.lockChangesProcessing&&!this.compareTaskOrder(C);if(I){var L=this.saveTaskInternalIds();this.tasks.importFromObject(C),this.restoreTaskInternalIds(L),this.updateModel()}return I},D.prototype.saveTaskInternalIds=function(){var C={};return this.tasks.items.map(function(I){return C[I.id]=I.internalId}),C},D.prototype.restoreTaskInternalIds=function(C){for(var I in C)if(Object.prototype.hasOwnProperty.call(C,I)){var L=this.tasks.getItemByPublicId(I);L&&(L.internalId=C[I])}},D.prototype.canCreateDependency=function(C,I){if(!C||!I||C===I)return!1;var L=!1;if(this.enableDependencyValidation){var N=this.getDependentTasksHash();L=this.parentAutoCalc?this.checkTasksInterdependence(C,I,N)||this.checkParent(C,I)||this.checkParent(I,C):this.checkDependencyChain([C],[I],N,[])}return!L},D.prototype.checkParent=function(C,I){return this.getTaskTreeLine(C).indexOf(I)>-1},D.prototype.getTaskTreeLine=function(C){var I=[C],L=this.findItem(C);if(L)for(L=L.parent;L?.task;)I.push(L?.task.internalId),L=L.parent;else for(var N=this.tasks.getItemById(C),G=this.tasks.getItemById(N?.parentId);G;)I.push(G.id),G=this.tasks.getItemById(G.parentId);return I},D.prototype.getDependentTasksHash=function(){var C={};return this.dependencies.items.forEach(function(I){var L,N,G=I.predecessorId,k=I.successorId;null!==(L=C[G])&&void 0!==L||(C[G]=[]),C[G].indexOf(k)<0&&C[G].push(k),null!==(N=C[k])&&void 0!==N||(C[k]=[]),C[k].indexOf(G)<0&&C[k].push(G)}),C},D.prototype.checkTasksInterdependence=function(C,I,L){for(var N,G,k=this.getTaskTreeLine(C).reverse(),U=this.getTaskTreeLine(I).reverse(),B=0;B<k.length-1;B++){var J=U.indexOf(k[B]);J>-1&&(N=k[B+1],G=U[J+1])}return N||G||(N=k[0],G=U[0]),this.checkDependencyChain(this.getBranchIds(N),this.getBranchIds(G),L,[])},D.prototype.checkDependencyChain=function(C,I,L,N){if(C.some(function(U){return I.indexOf(U)>-1}))return!0;N.push.apply(N,C);for(var G=0;G<C.length;G++){var k=L[C[G]];if(k&&this.checkDependencyChain(k.filter(function(U){return-1===N.indexOf(U)}),I,L,N))return!0}return!1},D.prototype.getBranchIds=function(C){var I=this,L=[C],N=this.findItem(C),G=N?.children;return G&&G.forEach(function(k){var U,B=null===(U=k.task)||void 0===U?void 0:U.internalId;B&&(L=L.concat(I.getBranchIds(B)))}),L},D.prototype.getTasksExpandedState=function(){var I={};return this.tasks.items.forEach(function(L){return I[L.id]=L.expanded}),I},D.prototype.applyTasksExpandedState=function(C){if(C){for(var I in this.beginUpdate(),C)Object.prototype.hasOwnProperty.call(C,I)&&this.changeTaskExpanded(I,C[I]);this.endUpdate()}},D.prototype.changed=function(){0===this._fLockCount&&(this.populateItemsForView(),this.owner&&this.owner.onVisualModelChanged&&this.owner.onVisualModelChanged())},D.prototype.findItem=function(C){return this._viewItemList.filter(function(I){return I.task&&I.task.internalId===C})[0]},Object.defineProperty(D.prototype,"items",{get:function(){return this._viewItemList},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"itemCount",{get:function(){return this.items.length},enumerable:!1,configurable:!0}),D.prototype.getTaskVisibility=function(C){var I=this.findItem(C);return!!I&&I.getVisible()},D.prototype.getTaskSelected=function(C){var I=this.findItem(C);return!!I&&I.selected},Object.defineProperty(D.prototype,"noWorkingIntervals",{get:function(){return this._workTimeCalculator.noWorkingIntervals},enumerable:!1,configurable:!0}),D.prototype.updateRange=function(C){this._workTimeCalculator.updateRange(C)},D.prototype.taskHasChildrenByIndex=function(C){return this._viewItemList[C].children.length>0},D.prototype.taskHasChildren=function(C){var I=this.findItem(C);return I&&I.children.length>0},Object.defineProperty(D.prototype,"enableDependencyValidation",{get:function(){var C,I=this.owner&&this.owner.settings;return null===(C=I?.validation)||void 0===C?void 0:C.validateDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"parentAutoCalc",{get:function(){var C=this.owner&&this.owner.settings;return C&&C.validation&&C.validation.autoUpdateParentTasks},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"enablePredecessorGap",{get:function(){var C=this.owner&&this.owner.settings;return C&&C.validation&&C.validation.enablePredecessorGap},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"requireFirstLoadParentAutoCalc",{get:function(){return this.parentAutoCalc&&this.owner.requireFirstLoadParentAutoCalc()},enumerable:!1,configurable:!0}),D.prototype.isTaskToCalculateByChildren=function(C){return this.parentAutoCalc&&this.taskHasChildren(C)},D.prototype.hasTasks=function(){return this.tasks.length>0},D.prototype.getDataUpdateErrorCallback=function(){return this.owner.getDataUpdateErrorCallback&&this.owner.getDataUpdateErrorCallback()},D.prototype.convertPublicToInternalKey=function(C,I){var L=this.getItemByPublicId(C,I);return L&&L.internalId},D.prototype.convertInternalToPublicKey=function(C,I){var L=this.getItemByInternalId(C,I);return L&&L.id},D.prototype.getItemByPublicId=function(C,I){var L=I.toString();switch(C){case"task":return this.tasks.getItemByPublicId(L);case"dependency":return this.dependencies.getItemByPublicId(L);case"resource":return this.resources.getItemByPublicId(L);case"assignment":return this.assignments.getItemByPublicId(L)}return null},D.prototype.getItemByInternalId=function(C,I){switch(C){case"task":return this.tasks.getItemById(I);case"dependency":return this.dependencies.getItemById(I);case"resource":return this.resources.getItemById(I);case"assignment":return this.assignments.getItemById(I)}return null},D.prototype.findAssignment=function(C,I){var L=this.convertPublicToInternalKey("resource",C),N=this.convertPublicToInternalKey("task",I);return this.assignments.items.filter(function(G){return G.resourceId===L&&G.taskId===N})[0]},D.prototype.findAllTaskAssignments=function(C){return this.assignments.items.filter(function(I){return I.taskId===C})},D.prototype.getAllVisibleTaskIndices=function(C,I){var L,N=[];null!=C||(C=0),null!=I||(I=this._viewItemList.length-1);for(var G=C;G<=I;G++){var k=this._viewItemList[G];k?.getVisible()&&null!==(L=k?.task)&&void 0!==L&&L.isValid()&&N.push(G)}return N},D.prototype.getVisibleTasks=function(){var C=this;return this.tasks.items.filter(function(I){return I&&C.getTaskVisibility(I.internalId)&&I.isValid()})},D.prototype.getVisibleDependencies=function(){var C=this.getVisibleTasks().map(function(I){return I.internalId});return this.dependencies.items.filter(function(I){return I&&C.indexOf(I.successorId)>-1&&C.indexOf(I.predecessorId)>-1})},D.prototype.getVisibleResourceAssignments=function(){var C=this.getVisibleTasks().map(function(I){return I.internalId});return this.assignments.items.filter(function(I){return I&&C.indexOf(I.taskId)>-1})},D.prototype.getVisibleResources=function(){for(var C=[],I=this.getVisibleResourceAssignments(),L=0;L<I.length;L++){var N=this.getItemByInternalId("resource",I[L].resourceId);N&&-1===C.indexOf(N)&&C.push(N)}return C},D.prototype.getRootTaskId=function(){var C;return null!==(C=this.rootTaskId)&&void 0!==C||(this.rootTaskId=this.calculateRootTaskId()),this.rootTaskId},D.prototype.calculateRootTaskId=function(){var C=this.items[0];if(!C)return null;for(;C.parent&&C.task;)C=C.parent;return C.children[0].task.parentId},D.prototype.getTaskMinStart=function(){var C=this.owner.dataRange.start;return this.tasks.items.forEach(function(I){I.isValid()&&I.start.getTime()<C.getTime()&&(C=I.start)}),C},D.prototype.getTaskMaxEnd=function(){var C=this.owner.dataRange.end;return this.tasks.items.forEach(function(I){I.isValid()&&I.end.getTime()>C.getTime()&&(C=I.end)}),C},D.prototype.processServerInsertedKey=function(C,I,L){var N;L===h.GanttDataObjectNames.task&&this.tasks.invalidate(),L===h.GanttDataObjectNames.dependency&&(this.dependencies.invalidate(),this.updateVisibleItemDependencies()),L===h.GanttDataObjectNames.resource&&this.resources.invalidate(),L===h.GanttDataObjectNames.resourceAssignment&&this.assignments.invalidate(),null===(N=this.owner)||void 0===N||N.updateHistoryObsoleteInsertedKey(C,I,L)},D.prototype.onBeginDataObjectCreate=function(){var C,I;null===(I=(C=this.owner).lockUpdateWithReload)||void 0===I||I.call(C)},D.prototype.onEndDataObjectCreate=function(){var C,I;null===(I=(C=this.owner).unlockUpdateWithReload)||void 0===I||I.call(C)},D}();b.ViewVisualModel=w},858:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DateRange=void 0;var f=function(){function S(T,y){this.start=T,this.end=y}return S.prototype.equal=function(T){var y=!0;return(y=y&&this.start.getTime()===T.start.getTime())&&this.end.getTime()===T.end.getTime()},S}();b.DateRange=f},7880:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DateTimeUtils=void 0;var S=f(2753),T=f(9331),y=f(2491),d=f(858),c=f(7812),s=function(){function a(){}return a.compareDates=function(u,h){return u&&h?h.getTime()-u.getTime():-1},a.areDatesEqual=function(u,h){return 0==this.compareDates(u,h)},a.getMaxDate=function(u,h){return u||h?u?h&&this.compareDates(u,h)>0?h:u:h:null},a.getMinDate=function(u,h){return u||h?u?h?this.compareDates(u,h)>0?u:h:u:h:null},a.getDaysBetween=function(u,h){var g=Math.abs(h.getTime()-u.getTime());return Math.ceil(g/this.msInDay)},a.getWeeksBetween=function(u,h){var g=this.getDaysBetween(u,h),_=Math.floor(g/7);return u.getDay()>h.getDay()&&_++,_},a.getMonthsDifference=function(u,h){var g=this.compareDates(u,h),_=g>=0?u:h,x=g>=0?h:u;return 12*(x.getFullYear()-_.getFullYear())+(x.getMonth()-_.getMonth())},a.getYearsDifference=function(u,h){return Math.abs(h.getFullYear()-u.getFullYear())},a.getDayNumber=function(u){return Math.ceil(u.getTime()/this.msInDay)},a.getDateByDayNumber=function(u){var h=new Date(u*this.msInDay);return h.setHours(0),h.setMinutes(0),h.setSeconds(0),h},a.addDays=function(u,h){return new Date(u.getTime()+h*this.msInDay)},a.checkDayOfMonth=function(u,h){return u==h.getDate()},a.checkDayOfWeek=function(u,h){return u==h.getDay()},a.checkMonth=function(u,h){return u==h.getMonth()},a.checkYear=function(u,h){return u==h.getFullYear()},a.checkDayOfWeekOccurrenceInMonth=function(u,h,g){var _=this.getSpecificDayOfWeekInMonthDates(h,u.getFullYear(),u.getMonth());return this.areDatesEqual(u,g==c.DayOfWeekMonthlyOccurrence.Last?_[_.length-1]:_[g])},a.getFirstDayOfWeekInMonth=function(u,h){return new Date(u,h,1).getDay()},a.getSpecificDayOfWeekInMonthDates=function(u,h,g){for(var _=this.getFirstDayOfWeekInMonth(h,g),x=u>=_?u-_:u+7-_,w=new Array,D=new Date(h,g,x+1);D.getMonth()==g;)w.push(D),D=this.addDays(D,7);return w},a.getSpecificDayOfWeekInMonthDate=function(u,h,g,_){var x=this.getSpecificDayOfWeekInMonthDates(u,h,g);return _==c.DayOfWeekMonthlyOccurrence.Last?x[x.length-1]:x[_]},a.checkValidDayInMonth=function(u,h,g){return!(g<1||g>31||new Date(u,h,g).getMonth()!=h)},a.getNextMonth=function(u,h){return void 0===h&&(h=1),(u+h)%12},a.convertToDate=function(u){if(u instanceof Date)return new Date(u);var h=Date.parse(u);return isNaN(h)?null:new Date(h)},a.convertTimeRangeToDateRange=function(u,h){var g=this.getDateByDayNumber(h),_=g.getFullYear(),x=g.getMonth(),w=g.getDate(),D=u.start,C=new Date(_,x,w,D.hour,D.min,D.sec,D.msec),I=u.end,L=new Date(_,x,w,I.hour,I.min,I.sec,I.msec);return new d.DateRange(C,L)},a.convertToTimeRanges=function(u){var h=this;return u instanceof Array?u.map(function(g){return h.convertToTimeRange(g)}):this.parseTimeRanges(u)},a.convertToTimeRange=function(u){return u?u instanceof T.TimeRange?u:(0,y.isDefined)(u.start)&&(0,y.isDefined)(u.end)?new T.TimeRange(this.convertToTime(u.start),this.convertToTime(u.end)):this.parseTimeRange(u):null},a.convertToTime=function(u){return u?u instanceof S.Time?u:u instanceof Date?this.getTimeGromJsDate(u):this.parseTime(u):null},a.parseTimeRanges=function(u){var h=this;return u?u.split(/;|,/).map(function(g){return h.parseTimeRange(g)}).filter(function(g){return!!g}):null},a.parseTimeRange=function(u){if(!u)return null;var h=u.split("-"),g=h[0],_=h[1];return(0,y.isDefined)(g)&&(0,y.isDefined)(_)?new T.TimeRange(this.parseTime(g),this.parseTime(_)):null},a.parseTime=function(u){if(!u)return null;var h=u.split(":"),g=parseInt(h[0])||0,_=parseInt(h[1])||0,x=parseInt(h[2])||0,w=parseInt(h[3])||0;return new S.Time(g,_,x,w)},a.getTimeGromJsDate=function(u){if(!u)return null;var h=u.getHours(),g=u.getMinutes(),_=u.getSeconds(),x=u.getMilliseconds();return new S.Time(h,g,_,x)},a.caclTimeDifference=function(u,h){return h.getTimeInMilleconds()-u.getTimeInMilleconds()},a.areTimesEqual=function(u,h){return 0==this.caclTimeDifference(u,h)},a.getMaxTime=function(u,h){return u||h?u?h&&this.caclTimeDifference(u,h)>0?h:u:h:null},a.getMinTime=function(u,h){return u||h?u?h?this.caclTimeDifference(u,h)>0?u:h:u:h:null},a.getLastTimeOfDay=function(){return new S.Time(23,59,59,999)},a.msInDay=864e5,a}();b.DateTimeUtils=s},8719:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.DayOfWeek=void 0,(f=b.DayOfWeek||(b.DayOfWeek={}))[f.Sunday=0]="Sunday",f[f.Monday=1]="Monday",f[f.Tuesday=2]="Tuesday",f[f.Wednesday=3]="Wednesday",f[f.Thursday=4]="Thursday",f[f.Friday=5]="Friday",f[f.Saturday=6]="Saturday"},7812:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.DayOfWeekMonthlyOccurrence=void 0,(f=b.DayOfWeekMonthlyOccurrence||(b.DayOfWeekMonthlyOccurrence={}))[f.First=0]="First",f[f.Second=1]="Second",f[f.Third=2]="Third",f[f.Forth=3]="Forth",f[f.Last=4]="Last"},1805:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DayWorkingTimeInfo=void 0;var S=f(9331),T=f(7880),y=f(2753),d=function(){function c(s,a,u){void 0===s&&(s=0),void 0===a&&(a=!0),void 0===u&&(u=null),this._workingIntervals=new Array,this.dayNumber=s,this.isWorkDay=a,this.addWorkingIntervals(u)}return c.prototype.addWorkingIntervals=function(s){s&&(this._workingIntervals=this._workingIntervals.concat(s.filter(function(a){return!!a})),this.rearrangeWorkingIntervals())},c.prototype.rearrangeWorkingIntervals=function(){for(var s=0;s<this._workingIntervals.length;s++)this.concatWithIntersectedRanges(this._workingIntervals[s]);this.sortIntervals()},c.prototype.concatWithIntersectedRanges=function(s){var a=this;this.getIntersectedIntervals(s).forEach(function(u){s.concatWith(u),a.removeInterval(u)})},c.prototype.getIntersectedIntervals=function(s){return this._workingIntervals.filter(function(a){return a.hasIntersect(s)&&a!==s})},c.prototype.sortIntervals=function(){this._workingIntervals.sort(function(s,a){return T.DateTimeUtils.caclTimeDifference(a.start,s.start)})},c.prototype.removeInterval=function(s){var a=this._workingIntervals.indexOf(s);a>-1&&a<this._workingIntervals.length&&this._workingIntervals.splice(a,1)},c.prototype.clearIntervals=function(){this._workingIntervals.splice(0,this._workingIntervals.length)},Object.defineProperty(c.prototype,"workingIntervals",{get:function(){return this._workingIntervals.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"noWorkingIntervals",{get:function(){var s=new Array;if(this.isWorkDay&&0===this._workingIntervals.length)return s;var a=this._workingIntervals.map(function(x){return x.end});a.splice(0,0,new y.Time);var u=this._workingIntervals.map(function(x){return x.start});u.push(T.DateTimeUtils.getLastTimeOfDay());for(var h=0;h<a.length;h++){var g=a[h],_=u[h];T.DateTimeUtils.areTimesEqual(g,_)||s.push(new S.TimeRange(g,_))}return s},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isWorkDay",{get:function(){return this._isWorkDay},set:function(s){this._isWorkDay=s,s||this.clearIntervals()},enumerable:!1,configurable:!0}),c}();b.DayWorkingTimeInfo=d},3110:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.Month=void 0,(f=b.Month||(b.Month={}))[f.January=0]="January",f[f.February=1]="February",f[f.March=2]="March",f[f.April=3]="April",f[f.May=4]="May",f[f.June=5]="June",f[f.July=6]="July",f[f.August=7]="August",f[f.September=8]="September",f[f.October=9]="October",f[f.November=10]="November",f[f.December=11]="December"},7872:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.MonthInfo=void 0;var S=f(7880),T=function(){function y(d,c){this.month=d,this.year=c}return y.prototype.addMonths=function(d){var c=S.DateTimeUtils.getNextMonth(this.month,d),s=Math.floor(d/12);c<this.month&&++s,this.month=c,this.year+=s},y}();b.MonthInfo=T},4902:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Daily=void 0;var S=f(655),T=f(1789),y=f(7880),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.checkDate=function(a){return!0},s.prototype.checkInterval=function(a){return y.DateTimeUtils.getDaysBetween(this.start,a)%this.interval==0},s.prototype.calculatePointByInterval=function(a){var u=this.interval;return this.isRecurrencePoint(a)||(u-=y.DateTimeUtils.getDaysBetween(this.start,a)%this.interval),y.DateTimeUtils.addDays(a,u)},s.prototype.calculateNearestPoint=function(a){return y.DateTimeUtils.addDays(a,1)},s}(T.RecurrenceBase);b.Daily=d},4390:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Monthly=void 0;var S=f(655),T=f(1789),y=f(7880),d=f(7872),c=function(s){function a(){return null!==s&&s.apply(this,arguments)||this}return S.__extends(a,s),a.prototype.checkDate=function(u){return this._calculateByDayOfWeek?y.DateTimeUtils.checkDayOfWeekOccurrenceInMonth(u,this.dayOfWeekInternal,this.dayOfWeekOccurrenceInternal):y.DateTimeUtils.checkDayOfMonth(this.dayInternal,u)},a.prototype.checkInterval=function(u){return y.DateTimeUtils.getMonthsDifference(this.start,u)%this.interval==0},a.prototype.calculatePointByInterval=function(u){var h=this.start,g=y.DateTimeUtils.getMonthsDifference(h,u),_=Math.floor(g/this.interval)*this.interval,x=new d.MonthInfo(h.getMonth(),h.getFullYear());x.addMonths(_);var w=this.getSpecDayInMonth(x.year,x.month);return y.DateTimeUtils.compareDates(w,u)>=0&&(x.addMonths(this.interval),w=this.getSpecDayInMonth(x.year,x.month)),w},a.prototype.calculateNearestPoint=function(u){var h=u.getMonth(),g=u.getFullYear(),_=this.getSpecDayInMonth(g,h);if(y.DateTimeUtils.compareDates(_,u)>=0){var x=new d.MonthInfo(h,g);x.addMonths(1),_=this.getSpecDayInMonth(x.year,x.month)}return _},Object.defineProperty(a.prototype,"day",{get:function(){return this.dayInternal},set:function(u){this.dayInternal=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dayOfWeek",{get:function(){return this.dayOfWeekInternal},set:function(u){this.dayOfWeekInternal=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dayOfWeekOccurrence",{get:function(){return this.dayOfWeekOccurrenceInternal},set:function(u){this.dayOfWeekOccurrenceInternal=u},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"calculateByDayOfWeek",{get:function(){return this._calculateByDayOfWeek},set:function(u){this._calculateByDayOfWeek=u},enumerable:!1,configurable:!0}),a}(T.RecurrenceBase);b.Monthly=c},1789:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RecurrenceBase=void 0;var S=f(655),T=f(8719),y=f(7812),d=f(3110),c=f(2491),s=f(7880),a=f(9612),u=function(h){function g(_,x,w,D){void 0===_&&(_=null),void 0===x&&(x=null),void 0===w&&(w=1),void 0===D&&(D=0);var C=h.call(this)||this;return C._start=null,C._end=null,C._interval=1,C._occurrenceCount=0,C._dayOfWeek=0,C._day=1,C._dayOfWeekOccurrence=0,C._month=0,C._calculateByDayOfWeek=!1,C.start=_,C.end=x,C.interval=w,C.occurrenceCount=D,C}return S.__extends(g,h),g.prototype.assignFromObject=function(_){(0,c.isDefined)(_)&&(h.prototype.assignFromObject.call(this,_),this.start=s.DateTimeUtils.convertToDate(_.start),this.end=s.DateTimeUtils.convertToDate(_.end),(0,c.isDefined)(_.interval)&&(this.interval=_.interval),(0,c.isDefined)(_.occurrenceCount)&&(this.occurrenceCount=_.occurrenceCount),(0,c.isDefined)(_.dayOfWeek)&&(this.dayOfWeekInternal=a.RecurrenceFactory.getEnumValue(T.DayOfWeek,_.dayOfWeek)),(0,c.isDefined)(_.day)&&(this.dayInternal=_.day),(0,c.isDefined)(_.dayOfWeekOccurrence)&&(this.dayOfWeekOccurrenceInternal=a.RecurrenceFactory.getEnumValue(y.DayOfWeekMonthlyOccurrence,_.dayOfWeekOccurrence)),(0,c.isDefined)(_.month)&&(this.monthInternal=a.RecurrenceFactory.getEnumValue(d.Month,_.month)),(0,c.isDefined)(_.calculateByDayOfWeek)&&(this._calculateByDayOfWeek=!!_.calculateByDayOfWeek))},g.prototype.calculatePoints=function(_,x){if(!_||!x)return new Array;var w=s.DateTimeUtils.getMaxDate(_,this._start),D=s.DateTimeUtils.getMinDate(x,this._end);return this._occurrenceCount>0?this.calculatePointsByOccurrenceCount(w,D):this.calculatePointsByDateRange(w,D)},g.prototype.calculatePointsByOccurrenceCount=function(_,x){for(var w=new Array,D=this.getFirstPoint(_);D&&w.length<this._occurrenceCount&&s.DateTimeUtils.compareDates(D,x)>=0;)this.isRecurrencePoint(D)&&w.push(D),D=this.getNextPoint(D);return w},g.prototype.calculatePointsByDateRange=function(_,x){for(var w=new Array,D=this.getFirstPoint(_);D&&s.DateTimeUtils.compareDates(D,x)>=0;)this.isRecurrencePoint(D)&&w.push(D),D=this.getNextPoint(D);return w},g.prototype.getFirstPoint=function(_){return this.isRecurrencePoint(_)?_:this.getNextPoint(_)},g.prototype.isRecurrencePoint=function(_){return this.isDateInRange(_)&&this.checkDate(_)&&(!this.useIntervalInCalc()||this.checkInterval(_))},g.prototype.isDateInRange=function(_){return!(!_||this._start&&s.DateTimeUtils.compareDates(this.start,_)<0||0==this._occurrenceCount&&this.end&&s.DateTimeUtils.compareDates(_,this.end)<0)},g.prototype.useIntervalInCalc=function(){return this.interval>1&&!!this._start},g.prototype.getNextPoint=function(_){return this.isDateInRange(_)?this.useIntervalInCalc()?this.calculatePointByInterval(_):this.calculateNearestPoint(_):null},g.prototype.getSpecDayInMonth=function(_,x){return this._calculateByDayOfWeek?s.DateTimeUtils.getSpecificDayOfWeekInMonthDate(this.dayOfWeekInternal,_,x,this.dayOfWeekOccurrenceInternal):new Date(_,x,this.dayInternal)},Object.defineProperty(g.prototype,"dayInternal",{get:function(){return this._day},set:function(_){_>0&&_<=31&&(this._day=_)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"dayOfWeekInternal",{get:function(){return this._dayOfWeek},set:function(_){_>=T.DayOfWeek.Sunday&&_<=T.DayOfWeek.Saturday&&(this._dayOfWeek=_)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"dayOfWeekOccurrenceInternal",{get:function(){return this._dayOfWeekOccurrence},set:function(_){_>=y.DayOfWeekMonthlyOccurrence.First&&_<=y.DayOfWeekMonthlyOccurrence.Last&&(this._dayOfWeekOccurrence=_)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"monthInternal",{get:function(){return this._month},set:function(_){_>=d.Month.January&&_<=d.Month.December&&(this._month=_)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"start",{get:function(){return this._start},set:function(_){_&&(this._start=_,this._end&&_>this._end&&(this._end=_))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"end",{get:function(){return this._end},set:function(_){_&&(this._end=_,this._start&&_<this._start&&(this._start=_))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"occurrenceCount",{get:function(){return this._occurrenceCount},set:function(_){_<0&&(_=0),this._occurrenceCount=_},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"interval",{get:function(){return this._interval},set:function(_){_>0&&(this._interval=_)},enumerable:!1,configurable:!0}),g}(f(6124).DataObject);b.RecurrenceBase=u},9612:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RecurrenceFactory=void 0;var S=f(2491),T=f(4902),y=f(5475),d=f(4390),c=f(7515),s=function(){function a(){}return a.createRecurrenceByType=function(u){if(!u)return null;switch(u.toLowerCase()){case"daily":return new T.Daily;case"weekly":return new y.Weekly;case"monthly":return new d.Monthly;case"yearly":return new c.Yearly}return null},a.createRecurrenceFromObject=function(u){if(!u)return null;var h=this.createRecurrenceByType(u.type);return h&&h.assignFromObject(u),h},a.getEnumValue=function(u,h){if(!(0,S.isDefined)(u[h]))return null;var g=parseInt(h);return isNaN(g)?u[h]:g},a}();b.RecurrenceFactory=s},5475:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Weekly=void 0;var S=f(655),T=f(1789),y=f(7880),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.checkDate=function(a){return y.DateTimeUtils.checkDayOfWeek(this.dayOfWeekInternal,a)},s.prototype.checkInterval=function(a){return y.DateTimeUtils.getWeeksBetween(this.start,a)%this.interval==0},s.prototype.calculatePointByInterval=function(a){var u=y.DateTimeUtils.getWeeksBetween(this.start,a),h=Math.floor(u/this.interval);return(u%this.interval>0||a.getDay()>=this.dayOfWeekInternal)&&h++,this.calcNextPointWithWeekCount(this.start,h*this.interval)},s.prototype.calculateNearestPoint=function(a){var u=this.dayOfWeekInternal-a.getDay();return u>0?y.DateTimeUtils.addDays(new Date(a),u):this.calcNextPointWithWeekCount(a,1)},s.prototype.calcNextPointWithWeekCount=function(a,u){void 0===u&&(u=1);var h=7*u+this.dayOfWeekInternal-a.getDay();return y.DateTimeUtils.addDays(new Date(a),h)},Object.defineProperty(s.prototype,"dayOfWeek",{get:function(){return this.dayOfWeekInternal},set:function(a){this.dayOfWeekInternal=a},enumerable:!1,configurable:!0}),s}(T.RecurrenceBase);b.Weekly=d},7515:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Yearly=void 0;var S=f(655),T=f(1789),y=f(7880),d=function(c){function s(){return null!==c&&c.apply(this,arguments)||this}return S.__extends(s,c),s.prototype.checkDate=function(a){return!!y.DateTimeUtils.checkMonth(this.month,a)&&(this._calculateByDayOfWeek?y.DateTimeUtils.checkDayOfWeekOccurrenceInMonth(a,this.dayOfWeekInternal,this.dayOfWeekOccurrenceInternal):y.DateTimeUtils.checkDayOfMonth(this.dayInternal,a))},s.prototype.checkInterval=function(a){return y.DateTimeUtils.getYearsDifference(this.start,a)%this.interval==0},s.prototype.calculatePointByInterval=function(a){var u=y.DateTimeUtils.getYearsDifference(this.start,a),h=Math.floor(u/this.interval)*this.interval,g=this.start.getFullYear()+h,_=this.getSpecDayInMonth(g,this.monthInternal);return y.DateTimeUtils.compareDates(_,a)>=0&&(_=this.getSpecDayInMonth(g+=this.interval,this.monthInternal)),_},s.prototype.calculateNearestPoint=function(a){var u=a.getFullYear(),h=this.getSpecDayInMonth(u,this.monthInternal);return y.DateTimeUtils.compareDates(h,a)>=0&&(h=this.getSpecDayInMonth(++u,this.monthInternal)),h},Object.defineProperty(s.prototype,"month",{get:function(){return this.monthInternal},set:function(a){this.monthInternal=a},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"day",{get:function(){return this.dayInternal},set:function(a){this.dayInternal=a},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dayOfWeek",{get:function(){return this.dayOfWeekInternal},set:function(a){this.dayOfWeekInternal=a},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dayOfWeekOccurrence",{get:function(){return this.dayOfWeekOccurrenceInternal},set:function(a){this.dayOfWeekOccurrenceInternal=a},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"calculateByDayOfWeek",{get:function(){return this._calculateByDayOfWeek},set:function(a){this._calculateByDayOfWeek=a},enumerable:!1,configurable:!0}),s}(T.RecurrenceBase);b.Yearly=d},2753:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Time=void 0;var f=function(){function S(T,y,d,c){void 0===T&&(T=0),void 0===y&&(y=0),void 0===d&&(d=0),void 0===c&&(c=0),this._hour=0,this._min=0,this._sec=0,this._msec=0,this._fullmsec=0,this.hour=T,this.min=y,this.sec=d,this.msec=c}return Object.defineProperty(S.prototype,"hour",{get:function(){return this._hour},set:function(T){T>=0&&T<24&&(this._hour=T,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"min",{get:function(){return this._min},set:function(T){T>=0&&T<60&&(this._min=T,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"sec",{get:function(){return this._sec},set:function(T){T>=0&&T<60&&(this._sec=T,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"msec",{get:function(){return this._msec},set:function(T){T>=0&&T<1e3&&(this._msec=T,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),S.prototype.updateFullMilleconds=function(){this._fullmsec=1e3*(60*(60*this._hour+this._min)+this._sec)+this._msec},S.prototype.getTimeInMilleconds=function(){return this._fullmsec},S}();b.Time=f},9331:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TimeRange=void 0;var S=f(7880),T=function(){function y(d,c){S.DateTimeUtils.caclTimeDifference(d,c)>=0?(this._start=d,this._end=c):(this._start=c,this._end=d)}return Object.defineProperty(y.prototype,"start",{get:function(){return this._start},set:function(d){d&&S.DateTimeUtils.caclTimeDifference(d,this._end)>=0&&(this._start=d)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"end",{get:function(){return this._end},set:function(d){d&&S.DateTimeUtils.caclTimeDifference(this._start,d)>=0&&(this._end=d)},enumerable:!1,configurable:!0}),y.prototype.isTimeInRange=function(d){return S.DateTimeUtils.caclTimeDifference(this._start,d)>=0&&S.DateTimeUtils.caclTimeDifference(d,this._end)>=0},y.prototype.hasIntersect=function(d){return this.isTimeInRange(d.start)||this.isTimeInRange(d.end)||d.isTimeInRange(this.start)||d.isTimeInRange(this.end)},y.prototype.concatWith=function(d){return!!this.hasIntersect(d)&&(this.start=S.DateTimeUtils.getMinTime(this.start,d.start),this.end=S.DateTimeUtils.getMaxTime(this.end,d.end),!0)},y}();b.TimeRange=T},21:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.WorkingTimeCalculator=void 0;var S=f(4432),T=f(1805),y=f(7880),d=function(){function c(s,a){this._workingRules=new S.WorkingDayRuleCollection,this._workDayList=new Array,this._calculationRange=s,this._workingRules.importFromObject(a)}return c.prototype.calculateWorkDayList=function(){if(this._calculationRange){this.clearList();for(var s=this._workingRules.items,a=0;a<s.length;a++)this.processRule(s[a]);this.sortList()}},c.prototype.processRule=function(s){for(var a=s.recurrence.calculatePoints(this._calculationRange.start,this._calculationRange.end),u=function(_){var w=y.DateTimeUtils.getDayNumber(a[_]),D=h._workDayList.filter(function(C){return C.dayNumber==w})[0];D?(D.isWorkDay=D.isWorkDay&&s.isWorkDay,D.addWorkingIntervals(s.workTimeRanges)):h._workDayList.push(new T.DayWorkingTimeInfo(w,s.isWorkDay,s.workTimeRanges))},h=this,g=0;g<a.length;g++)u(g)},c.prototype.sortList=function(){this._workDayList.sort(function(s,a){return s.dayNumber-a.dayNumber})},c.prototype.clearList=function(){this._workDayList.splice(0,this._workDayList.length)},c.prototype.calculateNoWorkTimeIntervals=function(){var s=this,a=new Array;return 0==this._workDayList.length&&this.calculateWorkDayList(),this._workDayList.forEach(function(u){return a=a.concat(s.getNoWorkTimeRangesFromDay(u))}),this.concatJointedRanges(a)},c.prototype.concatJointedRanges=function(s){for(var a=new Array,u=0;u<s.length;u++){var h=s[u];a.length>0&&y.DateTimeUtils.compareDates(a[a.length-1].end,h.start)<2?a[a.length-1].end=h.end:a.push(h)}return a},c.prototype.getNoWorkTimeRangesFromDay=function(s){return s.noWorkingIntervals.map(function(a){return y.DateTimeUtils.convertTimeRangeToDateRange(a,s.dayNumber)})},Object.defineProperty(c.prototype,"noWorkingIntervals",{get:function(){return this._noWorkingIntervals||(this._noWorkingIntervals=this.calculateNoWorkTimeIntervals()),this._noWorkingIntervals.slice()},enumerable:!1,configurable:!0}),c.prototype.updateRange=function(s){this._calculationRange=s,this.invalidate()},c.prototype.invalidate=function(){this._noWorkingIntervals=null,this.clearList()},c}();b.WorkingTimeCalculator=d},8401:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.WorkingTimeRule=void 0;var S=f(655),T=f(6124),y=f(2491),d=f(7880),c=f(9612),s=f(4902),a=function(u){function h(g,_,x){void 0===g&&(g=null),void 0===_&&(_=!0),void 0===x&&(x=null);var w=u.call(this)||this;return w.isWorkDay=!0,w.workTimeRanges=new Array,w.recurrence=g,w.isWorkDay=_,x&&w.workTimeRanges.concat(x),w}return S.__extends(h,u),h.prototype.assignFromObject=function(g){if((0,y.isDefined)(g)){u.prototype.assignFromObject.call(this,g),this.recurrence=c.RecurrenceFactory.createRecurrenceByType(g.recurrenceType)||new s.Daily,(0,y.isDefined)(g.recurrence)&&this.recurrence.assignFromObject(g.recurrence),(0,y.isDefined)(g.isWorkDay)&&(this.isWorkDay=!!g.isWorkDay);var _=d.DateTimeUtils.convertToTimeRanges(g.workTimeRanges);_&&(this.workTimeRanges=_)}},h}(T.DataObject);b.WorkingTimeRule=a},6626:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttViewApi=void 0;var f=function(){function S(T){this.maxZoom=3,this._ganttView=T}return Object.defineProperty(S.prototype,"currentZoom",{get:function(){return this._ganttView.currentZoom},set:function(T){this._ganttView.currentZoom=T},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"renderHelper",{get:function(){return this._ganttView.renderHelper},enumerable:!1,configurable:!0}),S.prototype.getTaskAreaContainerWidth=function(){return this.renderHelper.getTaskAreaContainerWidth()},S.prototype.updateTickSizeWidth=function(){this._ganttView.updateTickSizeWidth()},Object.defineProperty(S.prototype,"settings",{get:function(){return this._ganttView.settings},enumerable:!1,configurable:!0}),S.prototype.resetAndUpdate=function(){this._ganttView.resetAndUpdate()},S.prototype.scrollToDateCore=function(T,y){this._ganttView.scrollToDateCore(T,y)},Object.defineProperty(S.prototype,"ganttOwner",{get:function(){return this._ganttView.ganttOwner},enumerable:!1,configurable:!0}),S.prototype.scrollLeftByViewType=function(){this._ganttView.scrollLeftByViewType()},Object.defineProperty(S.prototype,"dataRange",{get:function(){return this._ganttView.dataRange},enumerable:!1,configurable:!0}),S.prototype.calculateAutoViewType=function(T,y){return this._ganttView.calculateAutoViewType(T,y)},S.prototype.zoomIn=function(T){void 0===T&&(T=this.getTaskAreaContainerWidth()/2);var y=this.renderHelper.getTargetDateByPos(T),d=this.settings.viewTypeRange.min;this.currentZoom<this.maxZoom?(this.currentZoom++,this.updateTickSizeWidth(),this.resetAndUpdate()):this.settings.viewType>d&&(this.currentZoom=1,this.setViewType(this.settings.viewType-1,!1)),this.scrollToDateCore(y,-T)},S.prototype.zoomOut=function(T){void 0===T&&(T=this.renderHelper.getTaskAreaContainerWidth()/2);var y=this.renderHelper.getTargetDateByPos(T),d=this.settings.viewTypeRange.max;this.currentZoom>1?(this.currentZoom--,this.updateTickSizeWidth(),this.resetAndUpdate()):this.settings.viewType<d&&(this.currentZoom=this.maxZoom,this.setViewType(this.settings.viewType+1,!1)),this.scrollToDateCore(y,-T)},S.prototype.setViewType=function(T,y){void 0===y&&(y=!0),null==T&&(T=this.calculateAutoViewType(this.dataRange.start,this.dataRange.end)),this.settings.viewType!==T&&(this.settings.viewType=T,this.updateTickSizeWidth(),this.resetAndUpdate(),y&&this.scrollLeftByViewType(),this.ganttOwner.updateGanttViewType&&this.ganttOwner.updateGanttViewType(T))},S.prototype.setViewTypeRange=function(T,y){void 0!==T&&(this.settings.viewTypeRange.min=Math.min(T,y)),void 0!==y&&(this.settings.viewTypeRange.max=Math.max(T,y));var d=this.settings.viewTypeRange.min,c=this.settings.viewTypeRange.max,s=this.settings.viewType;d>s?this.setViewType(d):c<s&&this.setViewType(c)},S}();b.GanttViewApi=f},5098:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditController=void 0;var S=f(2449),T=f(858),y=f(6907),d=f(9279),c=f(1886),s=f(9080),a=f(9201),u=function(){function h(g){this.showInfoDelay=1e3,this.taskIndex=-1,this.successorIndex=-1,this.isEditingInProgress=!1,this.disableTaskEditBox=!1,this.isTaskEditBoxShown=!1,this.settings=g,this.createElements()}return Object.defineProperty(h.prototype,"taskId",{get:function(){return this.viewModel.items[this.taskIndex].task.internalId},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"successorId",{get:function(){return this.viewModel.items[this.successorIndex].task.internalId},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"task",{get:function(){return this.viewItem.task},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"viewItem",{get:function(){return this.viewModel.items[this.taskIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"renderHelper",{get:function(){return this.settings.getRenderHelper()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ganttSettings",{get:function(){return this.settings.getGanttSettings()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"viewModel",{get:function(){return this.settings.getViewModel()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"commandManager",{get:function(){return this.settings.getCommandManager()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"updateTaskCommand",{get:function(){return this.commandManager.updateTaskCommand},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"validationController",{get:function(){return this.settings.getValidationController()},enumerable:!1,configurable:!0}),h.prototype.raiseTaskMoving=function(g,_,x,w){return this.settings.getModelManipulator().dispatcher.raiseTaskMoving(g,_,x,w)},Object.defineProperty(h.prototype,"tooltip",{get:function(){var g;return null!==(g=this._tooltip)&&void 0!==g||(this._tooltip=new c.TaskEditTooltip(this.baseElement,this.tooltipSettings,this.renderHelper.elementTextHelperCultureInfo)),this._tooltip.tooltipSettings=this.tooltipSettings,this._tooltip},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tooltipSettings",{get:function(){var g=this;return s.TooltipSettings.parse({getHeaderHeight:this.settings.getRenderHelper().header.clientHeight,getTaskProgressTooltipContentTemplate:this.ganttSettings.taskProgressTooltipContentTemplate,getTaskTimeTooltipContentTemplate:this.ganttSettings.taskTimeTooltipContentTemplate,getTaskTooltipContentTemplate:this.ganttSettings.taskTooltipContentTemplate,destroyTemplate:function(_){g.settings.destroyTemplate(_)},formatDate:function(_){return g.settings.formatDate(_)},getTaskAreaContainer:function(){return g.settings.getRenderHelper().taskAreaContainer}})},enumerable:!1,configurable:!0}),h.prototype.show=function(g){if(!this.isEditingInProgress&&!this.disableTaskEditBox){this.taskIndex=g,this.hide(),this.changeWrapInfo(),this.baseElement.className=h.CLASSNAMES.TASK_EDIT_BOX,this.displayDependency(),this.task.isMilestone()&&!this.viewItem.isCustom?this.baseElement.className=this.baseElement.className+" milestone":(this.isTaskUpdateAllowed()||(this.baseElement.className=this.baseElement.className+" "+h.CLASSNAMES.TASK_EDIT_HIDE_UPDATING),this.viewItem.isCustom&&this.baseElement.classList.add(h.CLASSNAMES.TASK_EDIT_BOX_CUSTOM));var _=this.settings.getGanttSettings().editing.taskHoverDelay||0;this.taskDateRange=new T.DateRange(this.task.start,this.task.end),this.displayTaskEditBox(_),this.displayProgressEdit(),this.displayStartEndEditElements()}},h.prototype.displayStartEndEditElements=function(){!this.task.isMilestone()&&this.isTaskUpdateAllowed()&&this.canUpdateTask()?(this.startEdit.style.display="block",this.endEdit.style.display="block"):(this.startEdit.style.display="none",this.endEdit.style.display="none")},h.prototype.displayProgressEdit=function(){!this.viewItem.isCustom&&this.canUpdateTask()&&this.isTaskUpdateAllowed()&&this.wrapInfo.size.width>this.wrapInfo.size.height?(this.progressEdit.style.display="block",this.progressEdit.style.left=this.task.normalizedProgress/100*this.wrapInfo.size.width-this.progressEdit.offsetWidth/2+"px"):this.progressEdit.style.display="none"},h.prototype.displayDependency=function(){this.ganttSettings.editing.enabled&&this.ganttSettings.editing.allowDependencyInsert&&this.ganttSettings.showDependencies||(this.baseElement.className=this.baseElement.className+" hide-dependency")},h.prototype.changeWrapInfo=function(){this.updateWrapInfo(),this.wrapInfo.assignPosition(this.baseElement),this.wrapInfo.assignSize(this.baseElement)},h.prototype.displayTaskEditBox=function(g){var _=this;void 0===g&&(g=0);var x=function(){_.renderHelper.taskArea.appendChild(_.baseElement),_.isTaskEditBoxShown=!0};g?this.timerId=setTimeout(x,g):x()},h.prototype.endEditing=function(){this.isEditingInProgress=!1,this.hide()},h.prototype.hide=function(){this.isTaskEditBoxShown=!1;var g=this.baseElement.parentNode;g&&g.removeChild(this.baseElement),this.tooltip.hide(),clearTimeout(this.timerId)},h.prototype.cancel=function(){clearTimeout(this.timerId)},h.prototype.showTaskInfo=function(g,_){void 0===_&&(_=500),this.timerId&&(_=this.showInfoDelay),this.tooltip.showInfo(this.task,g,_)},h.prototype.updateWrapInfo=function(){this.wrapInfo=this.getTaskWrapperElementInfo(this.taskIndex),this.wrapInfo.position.x--},h.prototype.isAllowedToConnectTasks=function(g){var _;return this.validationController.canCreateDependency(this.taskId,null===(_=this.viewModel.items[g].task)||void 0===_?void 0:_.internalId)},h.prototype.showDependencySuccessor=function(g){if(this.isAllowedToConnectTasks(g)){this.successorIndex=g;var _=this.getTaskWrapperElementInfo(g);_.assignPosition(this.dependencySuccessorBaseElement),_.assignSize(this.dependencySuccessorBaseElement),_.assignSize(this.dependencySuccessorFrame),this.renderHelper.taskArea.appendChild(this.dependencySuccessorBaseElement)}},h.prototype.hideDependencySuccessor=function(){var g=this.dependencySuccessorBaseElement.parentNode;g&&g.removeChild(this.dependencySuccessorBaseElement),this.successorIndex=-1},h.prototype.processProgress=function(g){if(this.isTaskUpdateAllowed()){this.isEditingInProgress=!0;var x=0;g.x>this.wrapInfo.position.x&&(x=g.x<this.wrapInfo.position.x+this.wrapInfo.size.width?Math.round((g.x-this.wrapInfo.position.x)/this.baseElement.clientWidth*100):100),this.progressEdit.style.left=x/100*this.wrapInfo.size.width-this.progressEdit.offsetWidth/2+"px",this.tooltip.showProgress(x,y.DomUtils.getAbsolutePositionX(this.progressEdit)+this.progressEdit.offsetWidth/2)}},h.prototype.confirmProgress=function(){if(this.isTaskUpdateAllowed()){this.isEditingInProgress=!1;var g=Math.round((this.progressEdit.offsetLeft+this.progressEdit.offsetWidth/2)/this.wrapInfo.size.width*100);this.updateTaskCommand.execute(this.taskId,{progress:g})}},h.prototype.processEnd=function(g){if(this.isTaskUpdateAllowed()){this.baseElement.className=this.baseElement.className+" move",this.isEditingInProgress=!0;var _=g.x>this.wrapInfo.position.x?g.x:this.wrapInfo.position.x,x=_-this.wrapInfo.position.x;this.baseElement.style.width=(x<1?0:x)+"px";var w=this.task.start,D=this.renderHelper.gridLayoutCalculator.getDateByPos(_);D.setSeconds(0),D<w||x<1?this.taskDateRange.end.setTime(w.getTime()):this.taskDateRange.end=this.getCorrectedDate(this.task.end,D),this.tooltip.showTime(w,this.taskDateRange.end,y.DomUtils.getAbsolutePositionX(this.baseElement)+this.baseElement.clientWidth)}},h.prototype.confirmEnd=function(){this.isTaskUpdateAllowed()&&(this.baseElement.className=h.CLASSNAMES.TASK_EDIT_BOX,this.isEditingInProgress=!1,this.updateTaskCommand.execute(this.taskId,{end:this.taskDateRange.end}),this.hide(),this.updateWrapInfo())},h.prototype.processStart=function(g){if(this.isTaskUpdateAllowed()){this.baseElement.className=this.baseElement.className+" move",this.isEditingInProgress=!0;var _=g.x<this.wrapInfo.position.x+this.wrapInfo.size.width?g.x:this.wrapInfo.position.x+this.wrapInfo.size.width,x=this.wrapInfo.size.width-(_-this.wrapInfo.position.x);this.baseElement.style.left=_+"px",this.baseElement.style.width=(x<1?0:x)+"px";var w=this.task.end,D=this.renderHelper.gridLayoutCalculator.getDateByPos(_);D.setSeconds(0),D>w||x<1?this.taskDateRange.start.setTime(w.getTime()):this.taskDateRange.start=this.getCorrectedDate(this.task.start,D),this.tooltip.showTime(this.taskDateRange.start,w,y.DomUtils.getAbsolutePositionX(this.baseElement))}},h.prototype.confirmStart=function(){this.isTaskUpdateAllowed()&&(this.baseElement.className=h.CLASSNAMES.TASK_EDIT_BOX,this.isEditingInProgress=!1,this.updateTaskCommand.execute(this.taskId,{start:this.taskDateRange.start}),this.hide(),this.updateWrapInfo())},h.prototype.processMove=function(g){if(this.isTaskUpdateAllowed()&&this.isTaskEditBoxShown){this.baseElement.className=this.baseElement.className+" move";var _=this.baseElement.offsetLeft+g;this.baseElement.style.left=_+"px";var x=this.renderHelper.gridLayoutCalculator.getDateByPos(_);this.taskDateRange.start=this.getCorrectedDate(this.task.start,x);var w=a.DateUtils.getRangeMSPeriod(this.task.start,this.task.end);return this.taskDateRange.end=a.DateUtils.getDSTCorrectedTaskEnd(this.taskDateRange.start,w),this.isEditingInProgress=this.raiseTaskMoving(this.task,this.taskDateRange.start,this.taskDateRange.end,this.onTaskMovingCallback.bind(this)),this.isEditingInProgress&&this.tooltip.showTime(this.taskDateRange.start,this.taskDateRange.end,y.DomUtils.getAbsolutePositionX(this.baseElement)),this.isEditingInProgress}return!0},h.prototype.onTaskMovingCallback=function(g,_){if(this.taskDateRange.start!==g||this.taskDateRange.end!==_){var x=this.renderHelper.gridLayoutCalculator,w=x.getPosByDate(g),D=x.getPosByDate(_)-w;this.baseElement.style.left=w+"px",this.baseElement.style.width=(D<1?0:D)+"px",this.taskDateRange.start=g,this.taskDateRange.end=_}},h.prototype.confirmMove=function(){this.isTaskUpdateAllowed()&&(this.ganttSettings.editing.allowDependencyInsert||(this.baseElement.className=this.baseElement.className+" hide-dependency"),this.isEditingInProgress&&(this.baseElement.className=h.CLASSNAMES.TASK_EDIT_BOX,this.updateTaskCommand.execute(this.taskId,{start:this.taskDateRange.start,end:this.taskDateRange.end}),this.updateWrapInfo(),this.hide(),this.isEditingInProgress=!1))},h.prototype.getCorrectedDate=function(g,_){if(this.ganttSettings.viewType>S.ViewType.SixHours){var x=_.getFullYear(),w=_.getMonth(),D=_.getDate(),C=this.ganttSettings.viewType===S.ViewType.Days?_.getHours():g.getHours(),I=g.getMinutes(),L=g.getSeconds(),N=g.getMilliseconds();return new Date(x,w,D,C,I,L,N)}return _},h.prototype.startDependency=function(g){this.dependencyLine=document.createElement("DIV"),this.dependencyLine.className=h.CLASSNAMES.TASK_EDIT_DEPENDENCY_LINE,this.renderHelper.taskArea.appendChild(this.dependencyLine),this.startPosition=g},h.prototype.processDependency=function(g){this.isEditingInProgress=!0,this.drawline(this.startPosition,g)},h.prototype.endDependency=function(g){this.isEditingInProgress=!1,null!=g&&this.commandManager.createDependencyCommand.execute(this.task.internalId,this.successorId,g);var _=this.dependencyLine.parentNode;_&&_.removeChild(this.dependencyLine),this.dependencyLine=null,this.hideDependencySuccessor(),this.hide()},h.prototype.selectDependency=function(g){this.ganttSettings.editing.allowDependencyDelete&&(this.dependencyId=g)},h.prototype.isDependencySelected=function(g){return this.dependencyId&&this.dependencyId===g},h.prototype.deleteSelectedDependency=function(){this.dependencyId&&this.commandManager.removeDependencyCommand.execute(this.dependencyId)},h.prototype.getTaskWrapperElementInfo=function(g){var _=this.renderHelper.gridLayoutCalculator,x=_.getTaskWrapperElementInfo(g);return x.size.width=_.getTaskWidth(g),x.size.height=_.getTaskHeight(g),x},h.prototype.createElements=function(){this.baseElement=document.createElement("DIV"),this.baseFrame=document.createElement("DIV"),this.baseFrame.className=h.CLASSNAMES.TASK_EDIT_FRAME,this.baseElement.appendChild(this.baseFrame),this.progressEdit=document.createElement("DIV"),this.progressEdit.className=h.CLASSNAMES.TASK_EDIT_PROGRESS,this.baseFrame.appendChild(this.progressEdit),this.progressEdit.appendChild(document.createElement("DIV")),this.dependencyFinish=document.createElement("DIV"),this.dependencyFinish.classList.add(h.CLASSNAMES.TASK_EDIT_DEPENDENCY_RIGTH),d.Browser.TouchUI&&this.dependencyFinish.classList.add(h.CLASSNAMES.TASK_EDIT_TOUCH),this.baseFrame.appendChild(this.dependencyFinish),this.dependencyStart=document.createElement("DIV"),this.dependencyStart.classList.add(h.CLASSNAMES.TASK_EDIT_DEPENDENCY_LEFT),d.Browser.TouchUI&&this.dependencyStart.classList.add(h.CLASSNAMES.TASK_EDIT_TOUCH),this.baseFrame.appendChild(this.dependencyStart),this.startEdit=document.createElement("DIV"),this.startEdit.className=h.CLASSNAMES.TASK_EDIT_START,this.baseFrame.appendChild(this.startEdit),this.endEdit=document.createElement("DIV"),this.endEdit.className=h.CLASSNAMES.TASK_EDIT_END,this.baseFrame.appendChild(this.endEdit),this.dependencySuccessorBaseElement=document.createElement("DIV"),this.dependencySuccessorBaseElement.className=h.CLASSNAMES.TASK_EDIT_BOX_SUCCESSOR,this.dependencySuccessorFrame=document.createElement("DIV"),this.dependencySuccessorFrame.className=h.CLASSNAMES.TASK_EDIT_FRAME_SUCCESSOR,this.dependencySuccessorBaseElement.appendChild(this.dependencySuccessorFrame),this.dependencySuccessorStart=document.createElement("DIV"),this.dependencySuccessorStart.classList.add(h.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH),d.Browser.TouchUI&&this.dependencySuccessorStart.classList.add(h.CLASSNAMES.TASK_EDIT_TOUCH),this.dependencySuccessorFrame.appendChild(this.dependencySuccessorStart),this.dependencySuccessorFinish=document.createElement("DIV"),this.dependencySuccessorFinish.classList.add(h.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT),d.Browser.TouchUI&&this.dependencySuccessorFinish.classList.add(h.CLASSNAMES.TASK_EDIT_TOUCH),this.dependencySuccessorFrame.appendChild(this.dependencySuccessorFinish),this._tooltip=new c.TaskEditTooltip(this.baseElement,this.tooltipSettings,this.renderHelper.elementTextHelperCultureInfo),this.attachEvents()},h.prototype.attachEvents=function(){this.onMouseLeaveHandler=function(){this.isEditingInProgress||this.hide()}.bind(this),this.baseElement.addEventListener("mouseleave",this.onMouseLeaveHandler)},h.prototype.drawline=function(g,_){if(g.x>_.x){var x=_;_=g,g=x}var w=Math.atan((g.y-_.y)/(_.x-g.x));w=-(w=180*w/Math.PI);var D=Math.sqrt((g.x-_.x)*(g.x-_.x)+(g.y-_.y)*(g.y-_.y));this.dependencyLine.style.left=g.x+"px",this.dependencyLine.style.top=g.y+"px",this.dependencyLine.style.width=D+"px",this.dependencyLine.style.transform="rotate("+w+"deg)"},h.prototype.canUpdateTask=function(){return!this.viewModel.isTaskToCalculateByChildren(this.task.internalId)},h.prototype.isTaskUpdateAllowed=function(){var g=this.ganttSettings.editing;return g.enabled&&g.allowTaskUpdate},h.prototype.detachEvents=function(){var g;null===(g=this.baseElement)||void 0===g||g.removeEventListener("mouseleave",this.onMouseLeaveHandler)},h.CLASSNAMES={TASK_EDIT_BOX:"dx-gantt-task-edit-wrapper",TASK_EDIT_BOX_CUSTOM:"dx-gantt-task-edit-wrapper-custom",TASK_EDIT_FRAME:"dx-gantt-task-edit-frame",TASK_EDIT_PROGRESS:"dx-gantt-task-edit-progress",TASK_EDIT_DEPENDENCY_RIGTH:"dx-gantt-task-edit-dependency-r",TASK_EDIT_DEPENDENCY_LEFT:"dx-gantt-task-edit-dependency-l",TASK_EDIT_START:"dx-gantt-task-edit-start",TASK_EDIT_END:"dx-gantt-task-edit-end",TASK_EDIT_DEPENDENCY_LINE:"dx-gantt-task-edit-dependency-line",TASK_EDIT_BOX_SUCCESSOR:"dx-gantt-task-edit-wrapper-successor",TASK_EDIT_FRAME_SUCCESSOR:"dx-gantt-task-edit-frame-successor",TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH:"dx-gantt-task-edit-successor-dependency-r",TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT:"dx-gantt-task-edit-successor-dependency-l",TASK_EDIT_TOUCH:"dx-gantt-edit-touch",TASK_EDIT_HIDE_UPDATING:"hide-updating"},h}();b.TaskEditController=u},1886:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditTooltip=void 0;var S=f(6907),T=function(){function y(d,c,s){this.parentElement=d,this.cultureInfo=s,this.tooltipSettings=c}return Object.defineProperty(y.prototype,"baseElement",{get:function(){return this._baseElement||this.createTooltipContainer(),this._baseElement},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"headerHeight",{get:function(){return this.tooltipSettings.getHeaderHeight},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskAreaContainer",{get:function(){return this.tooltipSettings.getTaskAreaContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskTooltipContentTemplate",{get:function(){return this.tooltipSettings.getTaskTooltipContentTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskProgressTooltipContentTemplate",{get:function(){return this.tooltipSettings.getTaskProgressTooltipContentTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskTimeTooltipContentTemplate",{get:function(){return this.tooltipSettings.getTaskTimeTooltipContentTemplate},enumerable:!1,configurable:!0}),y.prototype.destroyTemplate=function(d){this.tooltipSettings.destroyTemplate(d)},y.prototype.formatDate=function(d){return this.tooltipSettings.formatDate(d)},y.prototype.createTooltipContainer=function(){this._baseElement=document.createElement("DIV"),this._baseElement.className=y.CLASSNAMES.TASK_EDIT_PROGRESS_STATUS,this.parentElement.appendChild(this._baseElement)},y.prototype.setDefaultTooltip=function(d){this.defaultTooltip=document.createElement("DIV"),this.defaultTooltip.className=y.CLASSNAMES.TASK_EDIT_TOOLTIP_DEFAULT;var c=document.createElement("DIV");c.className=y.CLASSNAMES.TASK_EDIT_TASK_TITLE;var s=document.createElement("SPAN");if(c.appendChild(s),this.defaultTooltip.appendChild(c),s.innerText=d.title,this.defaultTooltip.appendChild(this.getTimeContent(d.start,d.end)),!isNaN(d.progress)){var a=document.createElement("DIV");a.className=y.CLASSNAMES.TASK_EDIT_PROGRESS_STATUS_TIME;var u=document.createElement("SPAN"),h=document.createElement("SPAN");a.appendChild(u),a.appendChild(h),this.defaultTooltip.appendChild(a),u.innerText=(this.cultureInfo.progress?this.cultureInfo.progress:"Progress")+": ",h.innerText=d.progress+"%"}this.baseElement.appendChild(this.defaultTooltip)},y.prototype.setDefaultProgressTooltip=function(d){this.defaultTooltip=document.createElement("DIV"),this.defaultTooltip.className=y.CLASSNAMES.TASK_EDIT_TOOLTIP_DEFAULT,this.defaultTooltip.innerText=d+"%",this.baseElement.appendChild(this.defaultTooltip)},y.prototype.setDefaultTimeTooltip=function(d,c){this.defaultTooltip=document.createElement("DIV"),this.defaultTooltip.className=y.CLASSNAMES.TASK_EDIT_TOOLTIP_DEFAULT,this.defaultTooltip.appendChild(this.getTimeContent(d,c)),this.baseElement.appendChild(this.defaultTooltip)},y.prototype.showInfo=function(d,c,s){var a=this;void 0===s&&(s=0);var u=this.taskTooltipContentTemplate;this.destroyTemplate(this.baseElement),u?u(this.baseElement,d,function(){a.showTooltip(c,!1,s)}):(this.setDefaultTooltip(d),this.showTooltip(c,!1,s))},y.prototype.showProgress=function(d,c){var s=this,a=this.taskProgressTooltipContentTemplate;this.destroyTemplate(this.baseElement),a?a(this.baseElement,{progress:d},function(){s.showTooltip(c)}):(this.setDefaultProgressTooltip(d),this.show(c))},y.prototype.showTime=function(d,c,s){var a=this,u=this.taskTimeTooltipContentTemplate;this.destroyTemplate(this.baseElement),u?u(this.baseElement,{start:d,end:c},function(){a.showTooltip(s)}):(this.setDefaultTimeTooltip(d,c),this.show(s))},y.prototype.showTooltip=function(d,c,s){var a,u=this;if(void 0===c&&(c=!0),void 0===s&&(s=0),null===(a=this.baseElement)||void 0===a?void 0:a.innerHTML){var h=function(){u.show(d,c)};s?this.timerId=setTimeout(h,s):h()}},y.prototype.show=function(d,c){var s,a,u,h=this;void 0===c&&(c=!0),null===(s=this.defaultTooltip)||void 0===s||s.classList.remove(y.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_AFTER),null===(a=this.defaultTooltip)||void 0===a||a.classList.remove(y.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_BEFORE),this.baseElement.style.display="block";var g=this.getLeftPosition(d),_=this.needToShowUnderParent(),x=this.getTopPosition(_);null===(u=this.defaultTooltip)||void 0===u||u.classList.add(_?y.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_AFTER:y.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_BEFORE),this.baseElement.style.left=g+"px",this.baseElement.style.top=x+"px",c&&(this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){h.hide()},1500))},y.prototype.hide=function(){this.baseElement.style.display="none",this.destroyTemplate(this.baseElement),clearTimeout(this.timerId)},y.prototype.getTimeContent=function(d,c){var s=document.createElement("TABLE");s.className=y.CLASSNAMES.TASK_EDIT_PROGRESS_STATUS_TIME;var a=document.createElement("TBODY");s.appendChild(a);var u=document.createElement("TR"),h=document.createElement("TD"),g=document.createElement("TD"),_=document.createElement("TR"),x=document.createElement("TD"),w=document.createElement("TD");return u.appendChild(h),u.appendChild(g),_.appendChild(x),_.appendChild(w),a.appendChild(u),a.appendChild(_),h.innerText=(this.cultureInfo.start?this.cultureInfo.start:"Start")+": ",g.innerText=this.formatDate(d),x.innerText=(this.cultureInfo.end?this.cultureInfo.end:"End")+": ",w.innerText=this.formatDate(c),s},y.prototype.getLeftPosition=function(d){var c=d-S.DomUtils.getAbsolutePositionX(this.parentElement)-2*y.defaultArrowHeight;if(this.taskAreaContainer){var s=S.DomUtils.getAbsolutePositionX(this.taskAreaContainer.getElement())+this.taskAreaContainer.getWidth(),a=d+this.baseElement.clientWidth-s;a>0&&(c-=a)}return c},y.prototype.getTopPosition=function(d){return d?this.parentElement.clientHeight+y.defaultArrowHeight:-this.baseElement.clientHeight-y.defaultArrowHeight},y.prototype.needToShowUnderParent=function(){var d,c=S.DomUtils.getAbsolutePositionY(this.parentElement)-this.headerHeight-S.DomUtils.getDocumentScrollTop()-y.defaultHeightOffset,s=(null===(d=this.taskAreaContainer)||void 0===d?void 0:d.scrollTop)||0;return this.baseElement.clientHeight>c||this.baseElement.clientHeight>this.parentElement.offsetTop-s},y.CLASSNAMES={TASK_EDIT_PROGRESS_STATUS:"dx-gantt-task-edit-tooltip",TASK_EDIT_TOOLTIP_DEFAULT:"dx-gantt-task-edit-tooltip-default",TASK_EDIT_TASK_TITLE:"dx-gantt-task-title",TASK_EDIT_PROGRESS_STATUS_TIME:"dx-gantt-status-time",TASK_EDIT_TOOLTIP_ARROW_BEFORE:"dx-gantt-task-edit-tooltip-before",TASK_EDIT_TOOLTIP_ARROW_AFTER:"dx-gantt-task-edit-tooltip-after"},y.defaultArrowHeight=5,y.defaultHeightOffset=15,y}();b.TaskEditTooltip=T},3336:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttMovingHelper=void 0;var S=f(9279),T=f(3714),y=function(){function d(c){this.taskAreaContainer=c,this.movingInfo=null}return d.prototype.startMoving=function(c){this.movingInfo=this.calcMovingInfo(c),this.updateGanttAreaCursor(!0)},d.prototype.cancelMoving=function(){this.movingInfo=null},d.prototype.onMouseMove=function(c){this.move(c)},d.prototype.onMouseUp=function(c){this.cancelMoving(),this.updateGanttAreaCursor(!1)},d.prototype.move=function(c){this.updateScrollPosition(c)},d.prototype.updateScrollPosition=function(c){var s=Math.round(T.EvtUtils.getEventX(c)),a=Math.round(T.EvtUtils.getEventY(c)),u=s-this.movingInfo.eventX,h=a-this.movingInfo.eventY,g=u<0?-1:1,_=h<0?-1:1,x=g<0?this.movingInfo.maxRightDelta:this.movingInfo.maxLeftDelta,w=_<0?this.movingInfo.maxBottomDelta:this.movingInfo.maxTopDelta;Math.abs(u)>x&&(u=x*g),Math.abs(h)>w&&(h=w*_);var D=this.movingInfo.scrollLeft-u,C=this.movingInfo.scrollTop-h,I=this.taskAreaContainer;I.scrollLeft!==D&&(I.scrollLeft=D),I.scrollTop!==C&&(I.scrollTop=C)},d.prototype.calcMovingInfo=function(c){var s=this.taskAreaContainer;return{eventX:T.EvtUtils.getEventX(c),eventY:T.EvtUtils.getEventY(c),scrollLeft:s.scrollLeft,scrollTop:s.scrollTop,maxLeftDelta:s.scrollLeft,maxRightDelta:s.scrollWidth-s.scrollLeft-s.getElement().offsetWidth,maxTopDelta:s.scrollTop,maxBottomDelta:s.scrollHeight-s.scrollTop-s.getElement().offsetHeight}},d.prototype.updateGanttAreaCursor=function(c){var s=S.Browser.IE?"move":"grabbing";this.taskAreaContainer.getElement().style.cursor=c?s:"default"},d}();b.GanttMovingHelper=y},6958:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaStateController=void 0;var S=f(8900),T=f(6907),y=f(3714),d=f(5098),c=f(2449),s=f(5376),a=f(4264),u=f(9155),h=f(125),g=f(1404),_=f(6591),x=f(2395),w=f(7295),D=function(){function C(I,L,N){var G=this;this.position=new S.Point(-1,-1),this._pointers={},this._listener=I,this._listener.setHandler(g.TaskAreaStateEventNames.STATE_EXIT,function(){G.switchToDefaultState()}),this._listener.setHandler(g.TaskAreaStateEventNames.GET_POINTERS_INFO,function(k){return G.getPointersInfo(k.triggerEvent)}),this._taskArea=L,this._cellSize=N,this.switchToDefaultState()}return C.prototype.onKeyDown=function(I){this._state.onKeyDown(I)},C.prototype.onScroll=function(I){this._state.onScroll(I)},C.prototype.onContextMenu=function(I){this._state.onContextMenu(I)},C.prototype.onMouseWheel=function(I){I.ctrlKey&&(I.preventDefault(),I.stopPropagation(),this.switchState(_.TaskAreaZoomState)),this._state.onMouseWheel(I)},Object.defineProperty(C.prototype,"currentState",{get:function(){return this._state},enumerable:!1,configurable:!0}),C.prototype.onTaskPointerEnter=function(I){this._state.onTaskPointerEnter(I)},C.prototype.onTaskAreaPointerLeave=function(I){this._state.onTaskAreaLeave(I)},C.prototype.onDocumentPointerCancel=function(I){this._clearPointerInfo(I)},C.prototype.onDocumentPointerDown=function(I){this._updatePinterInfo(I),this.toggleStateOnPointerDown(I),this._state.onDocumentPointerDown(I)},C.prototype.onDocumentPointerMove=function(I){this._updatePinterInfo(I),this.toggleStateOnPointerMove(I),this._state.onDocumentPointerMove(I)},C.prototype.onDocumentPointerUp=function(I){this._clearPointerInfo(I),this._state.onDocumentPointerUp(I)},C.prototype.onTaskTouchStart=function(I){this._state.onTaskTouchStart(I)},C.prototype.onTouchStart=function(I){this.toggleStateOnPointerDown(I),this._state.onTouchStart(I)},C.prototype.onTouchEnd=function(I){this._state.onTouchEnd(I)},C.prototype.onTouchMove=function(I){this.toggleStateOnPointerMove(I),this._state.onTouchMove(I)},C.prototype.onClick=function(I){this._state.onClick(I)},C.prototype.onDblClick=function(I){this._state.onDblClick(I)},C.prototype.onTaskAreaMouseLeave=function(I){this._state.onTaskAreaLeave(I)},C.prototype.onTaskElementHover=function(I){this._state.onTaskHover(I)},C.prototype.onTaskElementLeave=function(I){this._state.onTaskLeave(I)},C.prototype.onMouseUp=function(I){this._state.onMouseUp(I)},C.prototype.onMouseMove=function(I){this._state.onMouseMove(I)},C.prototype.onMouseDown=function(I){switch(this.getTaskAreaEventSource(I)){case c.TaskAreaEventSource.TaskArea:this.processMouseDownOnTaskArea(I);break;case c.TaskAreaEventSource.TaskEdit_Frame:this.switchState(w.TaskMoveState);break;case c.TaskAreaEventSource.TaskEdit_Progress:case c.TaskAreaEventSource.TaskEdit_Start:case c.TaskAreaEventSource.TaskEdit_End:this.switchState(x.TaskEditState);break;case c.TaskAreaEventSource.TaskEdit_DependencyStart:case c.TaskAreaEventSource.TaskEdit_DependencyFinish:this.switchState(a.TaskAreaDependencyState)}this._state.onMouseDown(I)},Object.defineProperty(C.prototype,"taskArea",{get:function(){return this._taskArea},enumerable:!1,configurable:!0}),C.prototype.switchToDefaultState=function(){this._state=new s.TaskAreaDefaultState(this._listener,this.taskArea,this._cellSize)},C.prototype.switchState=function(I){this._state instanceof I||(this._state&&this._state.finish(),this._state=new I(this._listener,this.taskArea,this._cellSize),this._state.start())},C.prototype.processMouseDownOnTaskArea=function(I){y.EvtUtils.isLeftButtonPressed(I)&&!u.TaskAreaDomHelper.isConnectorLine(I)&&this.switchState(h.TaskAreaScrollState)},C.prototype.toggleStateOnPointerDown=function(I){var L=this.toggleStateWhenMultiOrOutsideTouch(I);if(this.position=new S.Point(y.EvtUtils.getEventX(I),y.EvtUtils.getEventY(I)),!L&&this._canStartDrag(I))switch(this.getTaskAreaEventSource(I)){case c.TaskAreaEventSource.TaskEdit_DependencyStart:case c.TaskAreaEventSource.TaskEdit_DependencyFinish:this.switchState(a.TaskAreaDependencyState);break;case c.TaskAreaEventSource.TaskEdit_Progress:case c.TaskAreaEventSource.TaskEdit_Start:case c.TaskAreaEventSource.TaskEdit_End:this.switchState(x.TaskEditState)}},C.prototype.toggleStateOnPointerMove=function(I){var L=this.toggleStateWhenMultiOrOutsideTouch(I),N=Math.abs(this.position.x-y.EvtUtils.getEventX(I))>1||Math.abs(this.position.y-y.EvtUtils.getEventY(I))>1;if(!L&&N&&this._canStartDrag(I)&&this._state instanceof s.TaskAreaDefaultState)switch(this.getTaskAreaEventSource(I)){case c.TaskAreaEventSource.TaskArea:this.checkEventInTaskEditFrameArea(I)?this.switchState(w.TaskMoveState):this.switchState(h.TaskAreaScrollState);break;case c.TaskAreaEventSource.TaskEdit_Frame:this.isTaskUpdateDisabled()?this.switchState(h.TaskAreaScrollState):this.switchState(w.TaskMoveState);break;case c.TaskAreaEventSource.TaskEdit_Progress:case c.TaskAreaEventSource.TaskEdit_Start:case c.TaskAreaEventSource.TaskEdit_End:this.switchState(x.TaskEditState)}},C.prototype.toggleStateWhenMultiOrOutsideTouch=function(I){var L=this._getActivePointersCount(I),N=!this.isInTaskArea(I),G=L>=2||N;return L>2||N?this.switchState(s.TaskAreaDefaultState):2===L&&this.switchState(_.TaskAreaZoomState),G},C.prototype.checkEventInTaskEditFrameArea=function(I){var L,N,G=this.getTaskEditFrameElement();if(this.isTaskUpdateDisabled()||!G)return!1;var k=I?.clientX||(null===(L=I?.touches[0])||void 0===L?void 0:L.clientX),U=I?.clientY||(null===(N=I?.touches[0])||void 0===N?void 0:N.clientY),B=G.getBoundingClientRect();return k>=B.left&&k<=B.left+B.width&&U>=B.top&&U<=B.top+B.height},C.prototype.isTaskUpdateDisabled=function(){return"false"===this._taskArea.getAttribute("task-edit-enabled")},C.prototype.isInTaskArea=function(I){return T.DomUtils.isItParent(this._taskArea,y.EvtUtils.getEventSource(I))},C.prototype.getTaskEditFrameElement=function(){return this._taskArea.getElementsByClassName(d.TaskEditController.CLASSNAMES.TASK_EDIT_FRAME)[0]},C.prototype._updatePinterInfo=function(I){this._pointers[I.pointerId]={pageX:I.pageX,pageY:I.pageY,pointerType:I.pointerType}},C.prototype._clearPointerInfo=function(I){delete this._pointers[I.pointerId]},C.prototype.isTouchEvent=function(I){return u.TaskAreaDomHelper.isTouchEvent(I)},C.prototype.isPointerEvent=function(I){return u.TaskAreaDomHelper.isPointerEvent(I)},C.prototype._getActivePointersCount=function(I){var L=this;return this.isTouchEvent(I)?I.touches.length:Object.keys(this._pointers).filter(function(N){return L._pointers[N].pointerType===I.pointerType}).length},C.prototype.getPointersInfo=function(I){var L=this,N=I?.pointerType,G=Object.keys(this._pointers).map(function(k){return L._pointers[k]});return N&&(G=G.filter(function(k){return k.pointerType===N})),G},C.prototype._canStartDrag=function(I){return!(this._getActivePointersCount(I)>1||u.TaskAreaDomHelper.isMousePointer(I)&&1!==I.buttons||u.TaskAreaDomHelper.isConnectorLine(I))},C.prototype.getTaskAreaEventSource=function(I){return u.TaskAreaDomHelper.getEventSource(y.EvtUtils.getEventSource(I))},C}();b.TaskAreaStateController=D},5376:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaDefaultState=void 0;var S=f(655),T=f(3714),y=f(9155),d=f(5867),c=f(1404),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S.__extends(u,a),u.prototype.finish=function(){this.clearTimers(),this.raiseEvent(c.TaskAreaStateEventNames.CONTEXTMENU_HIDE)},u.prototype.onMouseDownInternal=function(h){this.onPointerDownBase(h)},u.prototype.onDocumentPointerDownInternal=function(h){this.onPointerDownBase(h)},u.prototype.onDocumentPointerUpInternal=function(h){this.onPointerUpBase(h)},u.prototype.onDocumentPointerMoveInternal=function(h){this.clearTimers()},u.prototype.onTouchStartInternal=function(h){this.onPointerDownBase(h)},u.prototype.onTouchEndInternal=function(h){this.onPointerUpBase(h)},u.prototype.onTouchMoveInternal=function(h){this.clearTimers()},u.prototype.onPointerDownBase=function(h){var g=this;h.preventDefault(),this._lastTouchRowIndex=this.getClickedRowIndex(h),(this.isPointerEvent(h)?y.TaskAreaDomHelper.isMousePointer(h):this.isMouseEvent(h))?this.changeSelectionOnTouchDown(h):(setTimeout(function(){y.TaskAreaDomHelper.isMousePointer(h)||g.raiseEvent(c.TaskAreaStateEventNames.CONTEXTMENU_HIDE,h),g.changeSelectionOnTouchDown(h)},0),clearTimeout(this._contextMenuTimer),this._contextMenuTimer=setTimeout(function(){return g.showContextMenuOnTouchDown(h)},u.defaultContextMenuTimeout))},u.prototype.onPointerUpBase=function(h){var g=this;if(clearTimeout(this._contextMenuTimer),h.preventDefault(),this.canToEmulateClick(h)){var _=this.getClickedRowIndex(h),x=new Date;if(this._lastEmulatedClickTime)x.getTime()-this._lastEmulatedClickTime.getTime()<u.defaultDblClickTimeout&&(this.raiseEvent(c.TaskAreaStateEventNames.TASK_AREA_DBLCLICK,h,_),delete this._lastEmulatedClickTime);else{var w=!this.raiseEvent(c.TaskAreaStateEventNames.TASK_AREA_CLICK,h,_);clearTimeout(this._dblClickClearTimer),y.TaskAreaDomHelper.isMousePointer(h)&&this.raiseEvent(c.TaskAreaStateEventNames.CONTEXTMENU_HIDE,h),w||(this._lastEmulatedClickTime=x,this._dblClickClearTimer=setTimeout(function(){delete g._lastEmulatedClickTime},u.defaultDblClickClearTimeout))}}},u.prototype.canToEmulateClick=function(h){var g=!y.TaskAreaDomHelper.isConnectorLine(h)&&this.getClickedRowIndex(h)===this._lastTouchRowIndex;return g&&y.TaskAreaDomHelper.isMousePointer(h)&&g&&(g=2!==h.button),g},u.prototype.changeSelectionOnTouchDown=function(h){var g=y.TaskAreaDomHelper.isConnectorLine(h);g||this.raiseTaskSelection(h,this.getClickedRowIndex(h)),this.raiseDependencySelection(h,g?T.EvtUtils.getEventSource(h).getAttribute("dependency-id"):null)},u.prototype.showContextMenuOnTouchDown=function(h){var g=y.TaskAreaDomHelper.isConnectorLine(h);this.raiseEvent(c.TaskAreaStateEventNames.CONTEXTMENU_SHOW,h,this.getClickedRowIndex(h),{type:g?"dependency":"task"})},u.prototype.clearTimers=function(){clearTimeout(this._contextMenuTimer),clearTimeout(this._dblClickClearTimer),delete this._lastEmulatedClickTime},u.defaultContextMenuTimeout=3e3,u.defaultDblClickClearTimeout=100+(u.defaultDblClickTimeout=500),u}(d.TaskAreaStateBase);b.TaskAreaDefaultState=s},4264:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaDependencyState=b.dependencyMap=void 0;var S=f(655),T=f(8900),y=f(6907),d=f(3714),c=f(5950),s=f(2449),a=f(9155),u=f(5867),h=f(1404);b.dependencyMap=[],b.dependencyMap[s.TaskAreaEventSource.TaskEdit_DependencyStart]=[],b.dependencyMap[s.TaskAreaEventSource.TaskEdit_DependencyFinish]=[],b.dependencyMap[s.TaskAreaEventSource.TaskEdit_DependencyStart][s.TaskAreaEventSource.Successor_DependencyStart]=c.DependencyType.SS,b.dependencyMap[s.TaskAreaEventSource.TaskEdit_DependencyStart][s.TaskAreaEventSource.Successor_DependencyFinish]=c.DependencyType.SF,b.dependencyMap[s.TaskAreaEventSource.TaskEdit_DependencyFinish][s.TaskAreaEventSource.Successor_DependencyStart]=c.DependencyType.FS,b.dependencyMap[s.TaskAreaEventSource.TaskEdit_DependencyFinish][s.TaskAreaEventSource.Successor_DependencyFinish]=c.DependencyType.FF;var g=function(_){function x(){return null!==_&&_.apply(this,arguments)||this}return S.__extends(x,_),x.prototype.onMouseUp=function(w){this.onDependencyEndByMouse(w)},x.prototype.onMouseDownInternal=function(w){this.onDependencyStart(w)},x.prototype.onMouseMoveInternal=function(w){this.onDependencyMoveStep(w)},x.prototype.onTouchStartInternal=function(w){this.onDependencyStart(w)},x.prototype.onTouchEndInternal=function(w){this.onDependencyEndByTouch(w)},x.prototype.onTouchMoveInternal=function(w){this.onDependencyMoveStep(w)},x.prototype.onDocumentPointerDownInternal=function(w){this.onDependencyStart(w)},x.prototype.onDocumentPointerUpInternal=function(w){this.onDependencyEndByTouch(w)},x.prototype.onDocumentPointerMoveInternal=function(w){this.onDependencyMoveStep(w)},x.prototype.onDependencyStart=function(w){var D=d.EvtUtils.getEventSource(w);this.source=a.TaskAreaDomHelper.getEventSource(D);var C=this.getRelativePos(new T.Point(y.DomUtils.getAbsolutePositionX(D)+D.clientWidth/2,y.DomUtils.getAbsolutePositionY(D)+D.clientHeight/2));this.raiseEvent(h.TaskAreaStateEventNames.DEPENDENCY_START,w,null,{pos:C})},x.prototype.onDependencyMoveStep=function(w){w.preventDefault();var D=this.getRelativePos(new T.Point(d.EvtUtils.getEventX(w),d.EvtUtils.getEventY(w)));this.raiseEvent(h.TaskAreaStateEventNames.DEPENDENCY_PROCESS,w,this.getClickedRowIndex(w),{pos:D})},x.prototype.onDependencyEndByMouse=function(w){var D=a.TaskAreaDomHelper.getEventSource(d.EvtUtils.getEventSource(w));this.processEndDependency(w,D===s.TaskAreaEventSource.Successor_DependencyStart||D===s.TaskAreaEventSource.Successor_DependencyFinish?b.dependencyMap[this.source][D]:null)},x.prototype.onDependencyEndByTouch=function(w){var D=this.raiseEvent(h.TaskAreaStateEventNames.GET_DEPENDENCY_POINTS,w),C=this.getRelativePos(D.successorStart),I=this.getRelativePos(D.successorFinish),L=this.getRelativePos(new T.Point(d.EvtUtils.getEventX(w),d.EvtUtils.getEventY(w))),N=this.isTouchNearby(L,C)?s.TaskAreaEventSource.Successor_DependencyStart:this.isTouchNearby(L,I)?s.TaskAreaEventSource.Successor_DependencyFinish:null;this.processEndDependency(w,N===s.TaskAreaEventSource.Successor_DependencyStart||N===s.TaskAreaEventSource.Successor_DependencyFinish?b.dependencyMap[this.source][N]:null)},x.prototype.onTaskAreaLeaveInternal=function(w){this.processEndDependency(w,null)},x.prototype.processEndDependency=function(w,D){this.raiseEvent(h.TaskAreaStateEventNames.DEPENDENCY_END,w,null,{type:D}),this.raiseEvent(h.TaskAreaStateEventNames.STATE_EXIT,w)},x.prototype.isTouchNearby=function(w,D){return Math.abs(D.x-w.x)<=20&&Math.abs(D.y-w.y)<=20},x}(u.TaskAreaStateBase);b.TaskAreaDependencyState=g},9155:(P,b,f)=>{var S;Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaDomHelper=void 0;var T=f(6907),y=f(3714),d=f(5098),c=f(2449),s=f(1855),a=function(){function u(){}return u.getEventSource=function(h){var g,_=(h.nodeType===(null===(g=window?.Node)||void 0===g?void 0:g.ELEMENT_NODE)?h:h.parentNode).classList[0];return u.classToSource[_]||c.TaskAreaEventSource.TaskArea},u.isConnectorLine=function(h){var g=y.EvtUtils.getEventSource(h);return T.DomUtils.hasClassName(g,s.GridLayoutCalculator.CLASSNAMES.CONNECTOR_HORIZONTAL)||T.DomUtils.hasClassName(g,s.GridLayoutCalculator.CLASSNAMES.CONNECTOR_VERTICAL)},u.isTaskElement=function(h){var g=y.EvtUtils.getEventSource(h),_=u.classToSource[g.classList[0]];return _===c.TaskAreaEventSource.TaskEdit_Frame||_===c.TaskAreaEventSource.TaskEdit_Progress||_===c.TaskAreaEventSource.TaskEdit_Start||_===c.TaskAreaEventSource.TaskEdit_End||_===c.TaskAreaEventSource.TaskEdit_DependencyStart||_===c.TaskAreaEventSource.TaskEdit_DependencyFinish},u.isMouseEvent=function(h){return h instanceof MouseEvent},u.isTouchEvent=function(h){return window.TouchEvent&&h instanceof TouchEvent},u.isPointerEvent=function(h){return window.PointerEvent&&h instanceof PointerEvent},u.isMousePointer=function(h){return this.isPointerEvent(h)&&"mouse"===h.pointerType},u.classToSource=((S={})[d.TaskEditController.CLASSNAMES.TASK_EDIT_PROGRESS]=c.TaskAreaEventSource.TaskEdit_Progress,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_START]=c.TaskAreaEventSource.TaskEdit_Start,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_END]=c.TaskAreaEventSource.TaskEdit_End,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_FRAME]=c.TaskAreaEventSource.TaskEdit_Frame,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_DEPENDENCY_RIGTH]=c.TaskAreaEventSource.TaskEdit_DependencyStart,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_DEPENDENCY_LEFT]=c.TaskAreaEventSource.TaskEdit_DependencyFinish,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH]=c.TaskAreaEventSource.Successor_DependencyStart,S[d.TaskEditController.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT]=c.TaskAreaEventSource.Successor_DependencyFinish,S),u}();b.TaskAreaDomHelper=a},125:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaScrollState=void 0;var S=f(655),T=f(5867),y=f(1404),d=function(c){function s(){var a=null!==c&&c.apply(this,arguments)||this;return a._isStarted=!1,a}return S.__extends(s,c),s.prototype.finish=function(){this.raiseEvent(y.TaskAreaStateEventNames.TASK_AREA_END_MOVE,null)},s.prototype.onMouseUp=function(a){this.onEnd(a)},s.prototype.onMouseDownInternal=function(a){this.onBeforeStart(a)},s.prototype.onMouseMoveInternal=function(a){this.onMove(a)},s.prototype.onDocumentPointerUpInternal=function(a){this.onEnd(a)},s.prototype.onDocumentPointerMoveInternal=function(a){this.onMoveByPointer(a)},s.prototype.onTouchEndInternal=function(a){this.onEnd(a)},s.prototype.onTouchMoveInternal=function(a){this.onMoveByPointer(a)},s.prototype.onBeforeStart=function(a){a.preventDefault(),this.raiseDependencySelection(a,null),this.raiseEvent(y.TaskAreaStateEventNames.TASK_EDIT_END,a),this.raiseEvent(y.TaskAreaStateEventNames.TASK_AREA_START_MOVE,a),this._isStarted=!0},s.prototype.onMoveByPointer=function(a){this._isStarted?this.onMove(a):this.onBeforeStart(a)},s.prototype.onMove=function(a){a.preventDefault(),this.raiseEvent(y.TaskAreaStateEventNames.TASK_AREA_PROCESS_MOVE,a)},s.prototype.onEnd=function(a){a.preventDefault(),this.raiseEvent(y.TaskAreaStateEventNames.TASK_AREA_END_MOVE,a),this.raiseEvent(y.TaskAreaStateEventNames.STATE_EXIT,a),this._isStarted=!1},s}(T.TaskAreaStateBase);b.TaskAreaScrollState=d},5867:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaStateBase=void 0;var S=f(9279),T=f(8900),y=f(6907),d=f(3714),c=f(2153),s=f(3461),a=f(9155),u=f(1404),h=function(){function g(_,x,w){this.position=new T.Point(-1,-1),this.isCursorInArea=!1,this._listener=_,this._taskArea=x,this._cellSize=w}return g.prototype.start=function(){},g.prototype.finish=function(){},g.prototype.isTouchEvent=function(_){return a.TaskAreaDomHelper.isTouchEvent(_)},g.prototype.isPointerEvent=function(_){return a.TaskAreaDomHelper.isPointerEvent(_)},g.prototype.isMouseEvent=function(_){return a.TaskAreaDomHelper.isMouseEvent(_)},g.prototype.onMouseWheel=function(_){},g.prototype.onScroll=function(_){this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_SCROLL)},g.prototype.onKeyDown=function(_){this.isCursorInArea&&this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_KEY_DOWN,_,null,{code:this.getShortcutCode(_)})},g.prototype.onContextMenu=function(_){var x=this.getClickedRowIndex(_),w=a.TaskAreaDomHelper.isConnectorLine(_);w||this.raiseTaskSelection(_,x),_.stopPropagation(),_.preventDefault(),S.Browser.WebKitFamily&&(_.returnValue=!1),this.raiseEvent(u.TaskAreaStateEventNames.CONTEXTMENU_SHOW,_,x,{type:w?"dependency":"task"})},g.prototype.onTaskPointerEnter=function(_){this.onTaskPointerEnterBase(_)},g.prototype.onDocumentPointerMove=function(_){this.processPointerMove(_)},g.prototype.onDocumentPointerDown=function(_){this.processPointerDown(_)},g.prototype.onDocumentPointerUp=function(_){this.processPointerUp(_)},g.prototype.onTaskTouchStart=function(_){this.onTaskPointerEnterBase(_)},g.prototype.onTouchMove=function(_){this.processPointerMove(_)},g.prototype.onTouchStart=function(_){this.processPointerDown(_)},g.prototype.onTouchEnd=function(_){this.processPointerUp(_)},g.prototype.onMouseDown=function(_){this.processPointerDown(_)},g.prototype.onMouseUp=function(_){},g.prototype.onMouseMove=function(_){this.processPointerMove(_)},g.prototype.onTaskHover=function(_){this.onTaskPointerEnterBase(_)},g.prototype.onTaskLeave=function(_){this.raiseEvent(u.TaskAreaStateEventNames.TASK_LEAVE,_,this.getClickedRowIndex(_))},g.prototype.onClick=function(_){var x=this.getClickedRowIndex(_);this.raiseTaskSelection(_,x),this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_CLICK,_,x)},g.prototype.onDblClick=function(_){_.preventDefault(),this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_DBLCLICK,_,this.getClickedRowIndex(_))},g.prototype.onTaskAreaLeave=function(_){(!this.isPointerEvent(_)||a.TaskAreaDomHelper.isMousePointer(_))&&(this.isCursorInArea=!1,this.raiseEvent(u.TaskAreaStateEventNames.TASK_EDIT_END,_)),this.onTaskAreaLeaveInternal(_)},g.prototype.onTaskPointerEnterBase=function(_){this.isTouchEvent(_)||this.isPointerEvent(_)||_.preventDefault(),this.raiseEvent(u.TaskAreaStateEventNames.TASK_EDIT_START,_,this.getClickedRowIndex(_))},g.prototype.processPointerDown=function(_){var x=this.isTouchEvent(_),w=this.isPointerEvent(_);(x||w)&&this.checkAndProcessTouchOutsideArea(_)||(this.position=new T.Point(d.EvtUtils.getEventX(_),d.EvtUtils.getEventY(_)),(x||w)&&_.preventDefault(),x?this.onTouchStartInternal(_):w?this.onDocumentPointerDownInternal(_):this.onMouseDownInternal(_))},g.prototype.processPointerMove=function(_){var x,w=this.isTouchEvent(_),D=this.isPointerEvent(_);null!==(x=this.position)&&void 0!==x||(this.position=new T.Point(d.EvtUtils.getEventX(_),d.EvtUtils.getEventY(_)));var C=Math.abs(this.position.x-d.EvtUtils.getEventX(_))>2||Math.abs(this.position.y-d.EvtUtils.getEventY(_))>2;(!w&&!D||!this.checkAndProcessTouchOutsideArea(_))&&C&&((w||D)&&_.preventDefault(),this.isTouchEvent(_)?this.onTouchMoveInternal(_):this.isPointerEvent(_)?this.onDocumentPointerMoveInternal(_):(this.isCursorInArea=!0,this.onMouseMoveInternal(_)))},g.prototype.processPointerUp=function(_){this.checkAndProcessTouchOutsideArea(_)||(_.preventDefault(),this.isTouchEvent(_)?this.onTouchEndInternal(_):this.onDocumentPointerUpInternal(_))},g.prototype.onMouseDownInternal=function(_){},g.prototype.onMouseMoveInternal=function(_){},g.prototype.onDocumentPointerUpInternal=function(_){},g.prototype.onDocumentPointerDownInternal=function(_){},g.prototype.onDocumentPointerMoveInternal=function(_){},g.prototype.onTouchStartInternal=function(_){},g.prototype.onTouchEndInternal=function(_){},g.prototype.onTouchMoveInternal=function(_){},g.prototype.onTaskAreaLeaveInternal=function(_){},g.prototype.checkAndProcessTouchOutsideArea=function(_){var x=!this.isInTaskArea(_);return x&&this.raiseEvent(u.TaskAreaStateEventNames.TASK_EDIT_END,_),this.isCursorInArea=!x,x},g.prototype.raiseEvent=function(_,x,w,D){var C=new s.TaskAreaEventArgs(_,x,w,D),I=this._listener.getHandler(_);return I&&I(C)},g.prototype.raiseDependencySelection=function(_,x){this.raiseEvent(u.TaskAreaStateEventNames.DEPENDENCY_SELECTION,_,null,{key:x})},g.prototype.raiseTaskSelection=function(_,x){y.DomUtils.isItParent(this._taskArea,d.EvtUtils.getEventSource(_))&&!a.TaskAreaDomHelper.isConnectorLine(_)&&this.raiseEvent(u.TaskAreaStateEventNames.TASK_SELECTION,_,x)},g.prototype.getClickedRowIndex=function(_){if(!_)return-1;var x=d.EvtUtils.getEventY(_)-y.DomUtils.getAbsolutePositionY(this._taskArea);return Math.floor(x/this._cellSize.height)},g.prototype.getRelativePos=function(_){var x=y.DomUtils.getAbsolutePositionX(this._taskArea),w=y.DomUtils.getAbsolutePositionY(this._taskArea);return new T.Point(_.x-x,_.y-w)},g.prototype.isInTaskArea=function(_){return y.DomUtils.isItParent(this._taskArea,d.EvtUtils.getEventSource(_))},g.prototype.getShortcutCode=function(_){var x=c.KeyUtils.getEventKeyCode(_),w=0;return _.altKey&&(w|=c.ModifierKey.Alt),_.ctrlKey&&(w|=c.ModifierKey.Ctrl),_.shiftKey&&(w|=c.ModifierKey.Shift),_.metaKey&&S.Browser.MacOSPlatform&&(w|=c.ModifierKey.Meta),w|x},g}();b.TaskAreaStateBase=h},1404:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaStateEventNames=void 0;var f=function(){function S(){}return S.TASK_AREA_CLICK="taskAreaClick",S.TASK_AREA_DBLCLICK="taskAreaDblClick",S.TASK_AREA_SCROLL="taskAreaScroll",S.TASK_AREA_START_MOVE="taskAreaStartMove",S.TASK_AREA_PROCESS_MOVE="taskAreaProcessMove",S.TASK_AREA_END_MOVE="taskAreaEndMove",S.TASK_AREA_ZOOM_IN="taskAreaZoomIn",S.TASK_AREA_ZOOM_OUT="taskAreaZoomOut",S.CONTEXTMENU_SHOW="contextMenuShow",S.CONTEXTMENU_HIDE="contextMenuHide",S.DEPENDENCY_SELECTION="dependencySelection",S.STATE_EXIT="stateExit",S.TASK_SELECTION="taskSelection",S.TASK_EDIT_START="taskEditStart",S.TASK_EDIT_END="taskEditEnd",S.TASK_LEAVE="taskLeave",S.TASK_PROCESS_MOVE="taskProcessMove",S.TASK_END_MOVE="taskEndMove",S.TASK_PROCESS_PROGRESS="taskProcessProgress",S.TASK_END_PROGRESS="taskEndProgress",S.TASK_PROCESS_START="taskProcessStart",S.TASK_CONFIRM_START="taskConfirmStart",S.TASK_PROCESS_END="taskProcessEnd",S.TASK_CONFIRM_END="taskConfirmEnd",S.GET_DEPENDENCY_POINTS="getDependencyPoints",S.DEPENDENCY_START="dependencyStart",S.DEPENDENCY_PROCESS="dependencyProcess",S.DEPENDENCY_END="dependencyEnd",S.TASK_AREA_KEY_DOWN="taskAreaKeyDown",S.GET_POINTERS_INFO="getPointersInfo",S.GET_COORDINATES_REF_POINT="getCoordinatesRefPoint",S}();b.TaskAreaStateEventNames=f},6591:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaZoomState=void 0;var S=f(655),T=f(8900),y=f(3714),d=f(5596),c=f(5867),s=f(1404),a=function(u){function h(){var g=null!==u&&u.apply(this,arguments)||this;return g._isInZooming=!1,g}return S.__extends(h,u),h.prototype.onMouseWheel=function(g){g.ctrlKey&&(g.preventDefault(),g.stopPropagation(),this._isInZooming||this.processZoom(g,y.EvtUtils.getWheelDelta(g)>0,50))},h.prototype.onDocumentPointerUpInternal=function(g){this.onEndZoom(g)},h.prototype.onDocumentPointerMoveInternal=function(g){this.onTouchZoom(g)},h.prototype.onTouchEndInternal=function(g){this.onEndZoom(g)},h.prototype.onTouchMoveInternal=function(g){this.onTouchZoom(g)},h.prototype.onTouchZoom=function(g){var _;if(g.stopPropagation(),g.preventDefault(),!this._isInZooming){var x=this.getTouchDistance(g);null!==(_=this.prevDistance)&&void 0!==_||(this.prevDistance=x);var w=this.prevDistance-x;Math.abs(w)>3&&(this.processZoom(g,w>0,1e3),this.prevDistance=x)}},h.prototype.processZoom=function(g,_,x){var w=this;this._isInZooming=!0,setTimeout(function(){w._isInZooming=!1},x),this.raiseEvent(_?s.TaskAreaStateEventNames.TASK_AREA_ZOOM_IN:s.TaskAreaStateEventNames.TASK_AREA_ZOOM_OUT,g,null,{leftPos:this.getLeftPosition(g)})},h.prototype.onEndZoom=function(g){this.prevDistance=null,this.raiseEvent(s.TaskAreaStateEventNames.STATE_EXIT,g)},h.prototype.getTouchDistance=function(g){var _=this.GetTouchPoints(g);return this.getDistance(_[0],_[1])},h.prototype.GetTouchPoints=function(g){var _,x,w,D;if(this.isTouchEvent(g)){var C=g.touches;return[new T.Point(C[0].pageX,C[0].pageY),new T.Point(C[1].pageX,C[1].pageY)]}var I=this.raiseEvent(s.TaskAreaStateEventNames.GET_POINTERS_INFO,g);return[new T.Point(null===(_=I[0])||void 0===_?void 0:_.pageX,null===(x=I[0])||void 0===x?void 0:x.pageY),new T.Point(null===(w=I[1])||void 0===w?void 0:w.pageX,null===(D=I[1])||void 0===D?void 0:D.pageY)]},h.prototype.getDistance=function(g,_){return d.Metrics.euclideanDistance(g,_)},h.prototype.getLeftPosition=function(g){var _=0;return this.isTouchEvent(g)||this.isPointerEvent(g)?_=this.getZoomMiddlePoint(g).x:this.isMouseEvent(g)&&(_=this.getMouseZoomLeftPos(g)),_},h.prototype.getMouseZoomLeftPos=function(g){var _=this.raiseEvent(s.TaskAreaStateEventNames.GET_COORDINATES_REF_POINT);return y.EvtUtils.getEventX(g)-_.x},h.prototype.getZoomMiddlePoint=function(g){var _=this.raiseEvent(s.TaskAreaStateEventNames.GET_COORDINATES_REF_POINT),x=this.GetTouchPoints(g),w=this.convertScreenToChartCoordinates(x[0],_),D=this.convertScreenToChartCoordinates(x[1],_);return new T.Point((w.x+D.x)/2,(w.y+D.y)/2)},h.prototype.convertScreenToChartCoordinates=function(g,_){return new T.Point(g.x-_.x,g.y-_.y)},h}(c.TaskAreaStateBase);b.TaskAreaZoomState=a},6262:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskDragBaseState=void 0;var S=f(655),T=f(8900),y=f(3714),d=f(5867),c=f(1404),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S.__extends(u,a),u.prototype.onMouseDownInternal=function(h){this.onStart(h)},u.prototype.onMouseUp=function(h){this.onEnd(h)},u.prototype.onMouseMoveInternal=function(h){this.onDrag(h)},u.prototype.onTouchStartInternal=function(h){this.onStart(h)},u.prototype.onTouchEndInternal=function(h){this.onEnd(h)},u.prototype.onTouchMoveInternal=function(h){this.onDrag(h)},u.prototype.onDocumentPointerDownInternal=function(h){this.onStart(h)},u.prototype.onDocumentPointerUpInternal=function(h){this.onEnd(h)},u.prototype.onDocumentPointerMoveInternal=function(h){this.onDrag(h)},u.prototype.onStart=function(h){this.currentPosition=new T.Point(y.EvtUtils.getEventX(h),y.EvtUtils.getEventY(h)),this.raiseDependencySelection(h,null),this.onStartInternal(h)},u.prototype.onDrag=function(h){var g;h.preventDefault();var _=new T.Point(y.EvtUtils.getEventX(h),y.EvtUtils.getEventY(h));null!==(g=this.currentPosition)&&void 0!==g||(this.currentPosition=_),this.onDragInternal(_),this.currentPosition=_},u.prototype.onEnd=function(h){this.onEndInternal(h),this.raiseEvent(c.TaskAreaStateEventNames.STATE_EXIT,h)},u.prototype.onStartInternal=function(h){},u.prototype.onEndInternal=function(h){},u.prototype.onDragInternal=function(h){},u.prototype.finish=function(){this.raiseEvent(c.TaskAreaStateEventNames.TASK_EDIT_END)},u}(d.TaskAreaStateBase);b.TaskDragBaseState=s},2395:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditState=void 0;var S=f(655),T=f(3714),y=f(2449),d=f(9155),c=f(1404),s=function(a){function u(){return null!==a&&a.apply(this,arguments)||this}return S.__extends(u,a),u.prototype.onStartInternal=function(h){var g;null!==(g=this._source)&&void 0!==g||(this._source=d.TaskAreaDomHelper.getEventSource(T.EvtUtils.getEventSource(h)))},u.prototype.onEndInternal=function(h){this.raiseEvent(this.getEventOnEndKey(),h)},u.prototype.onDragInternal=function(h){var g=this.getRelativePos(h);this.raiseEvent(this.getEventOnDragKey(),null,null,{position:g})},u.prototype.getEventOnDragKey=function(){switch(this._source){case y.TaskAreaEventSource.TaskEdit_Start:return c.TaskAreaStateEventNames.TASK_PROCESS_START;case y.TaskAreaEventSource.TaskEdit_End:return c.TaskAreaStateEventNames.TASK_PROCESS_END;case y.TaskAreaEventSource.TaskEdit_Progress:return c.TaskAreaStateEventNames.TASK_PROCESS_PROGRESS}},u.prototype.getEventOnEndKey=function(){switch(this._source){case y.TaskAreaEventSource.TaskEdit_Start:return c.TaskAreaStateEventNames.TASK_CONFIRM_START;case y.TaskAreaEventSource.TaskEdit_End:return c.TaskAreaStateEventNames.TASK_CONFIRM_END;case y.TaskAreaEventSource.TaskEdit_Progress:return c.TaskAreaStateEventNames.TASK_END_PROGRESS}},u}(f(6262).TaskDragBaseState);b.TaskEditState=s},7295:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskMoveState=void 0;var S=f(655),T=f(1404),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.prototype.onEndInternal=function(s){this.raiseEvent(T.TaskAreaStateEventNames.TASK_END_MOVE,s)},c.prototype.onDragInternal=function(s){this.raiseEvent(T.TaskAreaStateEventNames.TASK_PROCESS_MOVE,null,null,{delta:s.x-this.currentPosition.x})||this.raiseEvent(T.TaskAreaStateEventNames.STATE_EXIT)},c}(f(6262).TaskDragBaseState);b.TaskMoveState=y},3461:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaEventArgs=void 0;var S=f(2491);b.TaskAreaEventArgs=function(y,d,c,s){this.rowIndex=-1,this.info={},this.eventName=y,this.triggerEvent=d,(0,S.isDefined)(c)&&(this.rowIndex=c),s&&(this.info=s)}},8269:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaEventsListener=void 0;var S=f(8900),T=f(2491),y=f(6907),d=f(3714),c=f(2153),s=f(3336),a=f(1404),u=function(){function h(g){this._owner=g}return Object.defineProperty(h.prototype,"taskEditController",{get:function(){var g;return null===(g=this._owner)||void 0===g?void 0:g.taskEditController},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"renderHelper",{get:function(){var g;return null===(g=this._owner)||void 0===g?void 0:g.renderHelper},enumerable:!1,configurable:!0}),h.prototype.getHandler=function(g){return this.handlers[g]},h.prototype.setHandler=function(g,_){this.handlers[g]=_},Object.defineProperty(h.prototype,"handlers",{get:function(){var g;return null!==(g=this._handlers)&&void 0!==g||(this._handlers=this.createTaskAreaEventHandlers()),this._handlers},enumerable:!1,configurable:!0}),h.prototype.createTaskAreaEventHandlers=function(){var g={};return g[a.TaskAreaStateEventNames.TASK_AREA_CLICK]=this.taskAreaClickHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_DBLCLICK]=this.taskAreaDblClickHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_SCROLL]=this.taskAreaScrollHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_START_MOVE]=this.taskAreaStartMoveHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_PROCESS_MOVE]=this.taskAreaProcessMoveHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_END_MOVE]=this.taskAreaEndMoveHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_ZOOM_IN]=this.taskAreaZoomInHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_ZOOM_OUT]=this.taskAreaZoomOutHandler.bind(this),g[a.TaskAreaStateEventNames.CONTEXTMENU_SHOW]=this.taskAreaContextMenuShowHandler.bind(this),g[a.TaskAreaStateEventNames.CONTEXTMENU_HIDE]=this.taskAreaContextMenuHideHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_SELECTION]=this.taskSelectionHandler.bind(this),g[a.TaskAreaStateEventNames.DEPENDENCY_SELECTION]=this.dependencySelectionHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_EDIT_START]=this.taskEditStartHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_EDIT_END]=this.taskEditEndHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_LEAVE]=this.taskLeaveHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_PROCESS_MOVE]=this.taskProcessMoveHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_END_MOVE]=this.taskEndMoveHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_PROCESS_PROGRESS]=this.taskProcessProgressHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_END_PROGRESS]=this.taskEndProgressHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_PROCESS_START]=this.taskProcessStartHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_CONFIRM_START]=this.taskConfirmStartHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_PROCESS_END]=this.taskProcessEndHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_CONFIRM_END]=this.taskConfirmEndHandler.bind(this),g[a.TaskAreaStateEventNames.GET_DEPENDENCY_POINTS]=this.getDependencyPoints.bind(this),g[a.TaskAreaStateEventNames.DEPENDENCY_START]=this.dependencyStartHandler.bind(this),g[a.TaskAreaStateEventNames.DEPENDENCY_END]=this.dependencyEndHandler.bind(this),g[a.TaskAreaStateEventNames.DEPENDENCY_PROCESS]=this.dependencyProcessHandler.bind(this),g[a.TaskAreaStateEventNames.TASK_AREA_KEY_DOWN]=this.onTaskAreaKeyDown.bind(this),g[a.TaskAreaStateEventNames.GET_COORDINATES_REF_POINT]=this.getCoordinatesRefPoint.bind(this),g[a.TaskAreaStateEventNames.STATE_EXIT]=function(){},g},h.prototype.taskAreaClickHandler=function(g){return this._owner.onTaskAreaClick(g.rowIndex,g.triggerEvent)},h.prototype.taskAreaDblClickHandler=function(g){this._owner.onTaskAreaDblClick(g.rowIndex,g.triggerEvent)},h.prototype.taskSelectionHandler=function(g){this._owner.onTaskSelectionChanged(g.rowIndex,g.triggerEvent)},h.prototype.taskAreaContextMenuShowHandler=function(g){this._owner.onTaskAreaContextMenu(g.rowIndex,g.triggerEvent,g.info.type)},h.prototype.taskAreaContextMenuHideHandler=function(){this._owner.hidePopupMenu()},h.prototype.taskAreaScrollHandler=function(g){this._owner.updateView()},h.prototype.dependencySelectionHandler=function(g){var _=g.info.key,x=this.taskEditController.dependencyId;(_!==x||!_&&(0,T.isDefined)(x))&&this._owner.selectDependency(_)},Object.defineProperty(h.prototype,"ganttMovingHelper",{get:function(){var g;return null!==(g=this._ganttMovingHelper)&&void 0!==g||(this._ganttMovingHelper=new s.GanttMovingHelper(this._owner.renderHelper.taskAreaContainer)),this._ganttMovingHelper},enumerable:!1,configurable:!0}),h.prototype.taskAreaStartMoveHandler=function(g){this.ganttMovingHelper.startMoving(g.triggerEvent)},h.prototype.taskAreaProcessMoveHandler=function(g){this.ganttMovingHelper.movingInfo&&(this.ganttMovingHelper.onMouseMove(g.triggerEvent),g.triggerEvent.preventDefault())},h.prototype.taskAreaEndMoveHandler=function(g){this.ganttMovingHelper.onMouseUp(g.triggerEvent)},h.prototype.taskAreaZoomInHandler=function(g){this._owner.zoomIn(g.info.leftPos)},h.prototype.taskAreaZoomOutHandler=function(g){this._owner.zoomOut(g.info.leftPos)},h.prototype.getCoordinatesRefPoint=function(g){var _=y.DomUtils.getAbsolutePositionX(this.renderHelper.taskAreaContainer.getElement()),x=y.DomUtils.getAbsolutePositionY(this.renderHelper.taskAreaContainer.getElement());return new S.Point(_,x)},h.prototype.taskEditStartHandler=function(g){this.taskEditController.show(g.rowIndex),this.taskEditController.showTaskInfo(d.EvtUtils.getEventX(g.triggerEvent))},h.prototype.taskLeaveHandler=function(g){this.taskEditController.cancel()},h.prototype.taskEditEndHandler=function(g){this.taskEditController.endEditing()},h.prototype.taskEndMoveHandler=function(g){this.taskEditController.confirmMove()},h.prototype.taskProcessMoveHandler=function(g){var _;return this.taskEditController.processMove(null!==(_=g.info.delta)&&void 0!==_?_:0)},h.prototype.taskEndProgressHandler=function(g){this.taskEditController.confirmProgress()},h.prototype.taskProcessProgressHandler=function(g){this.taskEditController.processProgress(g.info.position)},h.prototype.taskProcessStartHandler=function(g){this.taskEditController.processStart(g.info.position)},h.prototype.taskConfirmStartHandler=function(g){this.taskEditController.confirmStart()},h.prototype.taskProcessEndHandler=function(g){this.taskEditController.processEnd(g.info.position)},h.prototype.taskConfirmEndHandler=function(g){this.taskEditController.confirmEnd()},h.prototype.getDependencyPoints=function(g){var _={};return _.successorStart=new S.Point(y.DomUtils.getAbsolutePositionX(this.taskEditController.dependencySuccessorStart)+this.taskEditController.dependencySuccessorStart.clientWidth/2,y.DomUtils.getAbsolutePositionY(this.taskEditController.dependencySuccessorStart)+this.taskEditController.dependencySuccessorStart.clientHeight/2),_.successorFinish=new S.Point(y.DomUtils.getAbsolutePositionX(this.taskEditController.dependencySuccessorFinish)+this.taskEditController.dependencySuccessorFinish.clientWidth/2,y.DomUtils.getAbsolutePositionY(this.taskEditController.dependencySuccessorFinish)+this.taskEditController.dependencySuccessorFinish.clientHeight/2),_},h.prototype.dependencyStartHandler=function(g){this.taskEditController.startDependency(g.info.pos)},h.prototype.dependencyEndHandler=function(g){this.taskEditController.endDependency(g.info.type)},h.prototype.dependencyProcessHandler=function(g){this.taskEditController.processDependency(g.info.pos),this._owner.viewModel.tasks.items[g.rowIndex]&&this.taskEditController.showDependencySuccessor(g.rowIndex)},h.prototype.onTaskAreaKeyDown=function(g){var _=g.info.code;_==(c.ModifierKey.Ctrl|c.KeyCode.Key_z)&&this._owner.history.undo(),_==(c.ModifierKey.Ctrl|c.KeyCode.Key_y)&&this._owner.history.redo(),_==c.KeyCode.Delete&&this.taskEditController.deleteSelectedDependency()},h}();b.TaskAreaEventsListener=u},3682:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaManager=b.TOUCH_ACTION_NONE=void 0;var S=f(9279),T=f(6907),y=f(3714),d=f(6958);b.TOUCH_ACTION_NONE="dx-gantt-touch-action";var c=function(){function s(a,u,h){this._eventListener=a,this._taskArea=u,this._cellSize=h,this.attachEvents()}return s.prototype.attachEvents=function(){window.PointerEvent?this.attachPointerEvents():S.Browser.TouchUI?this.attachTouchEvents():this.attachMouseEvents(),this.attachCommonEvents()},s.prototype.detachEvents=function(){window.PointerEvent?this.detachPointerEvents():S.Browser.TouchUI?this.detachTouchEvents():this.detachMouseEvents(),this.detachCommonEvents()},s.prototype.attachEventsOnTask=function(a){window.PointerEvent?a?.addEventListener("pointerenter",this.onTaskPointerEnterHandler):S.Browser.TouchUI?a?.addEventListener("touchstart",this.onTaskTouchStartHandler):(a?.addEventListener("mouseenter",this.onTaskMouseEnterHandler),a?.addEventListener("mouseleave",this.onTaskMouseLeaveHandler))},s.prototype.detachEventsOnTask=function(a){window.PointerEvent?a?.removeEventListener("pointerenter",this.onTaskPointerEnterHandler):S.Browser.TouchUI?a?.removeEventListener("touchstart",this.onTaskTouchStartHandler):(a?.removeEventListener("mouseenter",this.onTaskMouseEnterHandler),a?.removeEventListener("mouseleave",this.onTaskMouseLeaveHandler))},s.prototype.attachCommonEvents=function(){this.taskAreaAddEventListener("contextmenu",this.onContextMenuHandler),this.taskAreaAddEventListener(y.EvtUtils.getMouseWheelEventName(),this.onMouseWheelHandler),this.taskAreaAddEventListener("scroll",this.onScrollHandler),document.addEventListener("keydown",this.onKeyDownHandler)},s.prototype.detachCommonEvents=function(){this.taskAreaRemoveEventListener("contextmenu",this.onContextMenuHandler),this.taskAreaRemoveEventListener(y.EvtUtils.getMouseWheelEventName(),this.onMouseWheelHandler),this.taskAreaRemoveEventListener("scroll",this.onScrollHandler),document.removeEventListener("keydown",this.onKeyDownHandler)},s.prototype.attachPointerEvents=function(){T.DomUtils.addClassName(this.taskArea,b.TOUCH_ACTION_NONE),document.addEventListener("pointerdown",this.onDocumentPointerDownHandler),document.addEventListener("pointerup",this.onDocumentPointerUpHandler),document.addEventListener("pointermove",this.onDocumentPointerMoveHandler),document.addEventListener("pointercancel",this.onDocumentPointerCancelUpHandler),this.taskAreaAddEventListener("pointerleave",this.onTaskAreaPointerLeaveHandler)},s.prototype.detachPointerEvents=function(){document.removeEventListener("pointerdown",this.onDocumentPointerDownHandler),document.removeEventListener("pointerup",this.onDocumentPointerUpHandler),document.removeEventListener("pointermove",this.onDocumentPointerMoveHandler),document.removeEventListener("pointercancel ",this.onDocumentPointerCancelUpHandler),this.taskAreaRemoveEventListener("pointerleave",this.onTaskAreaPointerLeaveHandler),T.DomUtils.removeClassName(this.taskArea,b.TOUCH_ACTION_NONE)},s.prototype.attachTouchEvents=function(){T.DomUtils.addClassName(this.taskArea,b.TOUCH_ACTION_NONE),document.addEventListener("touchstart",this.onTouchStartHandler),document.addEventListener("touchend",this.onTouchEndHandler),document.addEventListener("touchmove",this.onTouchMoveHandler)},s.prototype.detachTouchEvents=function(){document.removeEventListener("touchstart",this.onTouchStartHandler),document.removeEventListener("touchend",this.onTouchEndHandler),document.removeEventListener("touchmove",this.onTouchMoveHandler),T.DomUtils.removeClassName(this.taskArea,b.TOUCH_ACTION_NONE)},s.prototype.attachMouseEvents=function(){this.taskAreaAddEventListener("click",this.onMouseClickHandler),this.taskAreaAddEventListener("dblclick",this.onMouseDblClickHandler),this.taskAreaAddEventListener("mousedown",this.onMouseDownHandler),this.taskAreaAddEventListener("mouseleave",this.onTaskAreaMouseLeaveHandler),document.addEventListener("mousemove",this.onMouseMoveHandler),document.addEventListener("mouseup",this.onMouseUpHandler)},s.prototype.detachMouseEvents=function(){this.taskAreaRemoveEventListener("click",this.onMouseClickHandler),this.taskAreaRemoveEventListener("dblclick",this.onMouseDblClickHandler),this.taskAreaRemoveEventListener("mouseleave",this.onTaskAreaMouseLeaveHandler),this.taskAreaRemoveEventListener("mousedown",this.onMouseDownHandler),document.removeEventListener("mousemove",this.onMouseMoveHandler),document.removeEventListener("mouseup",this.onMouseUpHandler)},Object.defineProperty(s.prototype,"stateController",{get:function(){var a;return null!==(a=this._stateController)&&void 0!==a||(this._stateController=new d.TaskAreaStateController(this._eventListener,this._taskArea,this._cellSize)),this._stateController},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"taskArea",{get:function(){return this._taskArea},enumerable:!1,configurable:!0}),s.prototype.taskAreaAddEventListener=function(a,u){this.taskArea.addEventListener(a,u)},s.prototype.taskAreaRemoveEventListener=function(a,u){this.taskArea.removeEventListener(a,u)},Object.defineProperty(s.prototype,"onContextMenuHandler",{get:function(){var a,u=this;return null!==(a=this._onContextMenuHandler)&&void 0!==a||(this._onContextMenuHandler=function(h){u.stateController.onContextMenu(h)}),this._onContextMenuHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onMouseWheelHandler",{get:function(){var a,u=this;return null!==(a=this._onMouseWheelHandler)&&void 0!==a||(this._onMouseWheelHandler=function(h){u.stateController.onMouseWheel(h)}),this._onMouseWheelHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onScrollHandler",{get:function(){var a,u=this;return null!==(a=this._onScrollHandler)&&void 0!==a||(this._onScrollHandler=function(h){u.stateController.onScroll(h)}),this._onScrollHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onKeyDownHandler",{get:function(){var a,u=this;return null!==(a=this._onKeyDownHandler)&&void 0!==a||(this._onKeyDownHandler=function(h){u.stateController.onKeyDown(h)}),this._onKeyDownHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTaskPointerEnterHandler",{get:function(){var a,u=this;return null!==(a=this._onTaskPointerEnterHandler)&&void 0!==a||(this._onTaskPointerEnterHandler=function(h){u.stateController.onTaskPointerEnter(h)}),this._onTaskPointerEnterHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTaskAreaPointerLeaveHandler",{get:function(){var a,u=this;return null!==(a=this._onTaskAreaPointerLeaveHandler)&&void 0!==a||(this._onTaskAreaPointerLeaveHandler=function(h){u.stateController.onTaskAreaPointerLeave(h)}),this._onTaskAreaPointerLeaveHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onDocumentPointerDownHandler",{get:function(){var a,u=this;return null!==(a=this._onDocumentPointerDownHandler)&&void 0!==a||(this._onDocumentPointerDownHandler=function(h){u.stateController.onDocumentPointerDown(h)}),this._onDocumentPointerDownHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onDocumentPointerUpHandler",{get:function(){var a,u=this;return null!==(a=this._onDocumentPointerUpHandler)&&void 0!==a||(this._onDocumentPointerUpHandler=function(h){u.stateController.onDocumentPointerUp(h)}),this._onDocumentPointerUpHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onDocumentPointerCancelUpHandler",{get:function(){var a,u=this;return null!==(a=this._onDocumentPointerCancelHandler)&&void 0!==a||(this._onDocumentPointerCancelHandler=function(h){u.stateController.onDocumentPointerCancel(h)}),this._onDocumentPointerCancelHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onDocumentPointerMoveHandler",{get:function(){var a,u=this;return null!==(a=this._onDocumentPointerMoveHandler)&&void 0!==a||(this._onDocumentPointerMoveHandler=function(h){u.stateController.onDocumentPointerMove(h)}),this._onDocumentPointerMoveHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTouchStartHandler",{get:function(){var a,u=this;return null!==(a=this._onTouchStartHandler)&&void 0!==a||(this._onTouchStartHandler=function(h){u.stateController.onTouchStart(h)}),this._onTouchStartHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTouchEndHandler",{get:function(){var a,u=this;return null!==(a=this._onTouchEndHandler)&&void 0!==a||(this._onTouchEndHandler=function(h){u.stateController.onTouchEnd(h)}),this._onTouchEndHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTouchMoveHandler",{get:function(){var a,u=this;return null!==(a=this._onTouchMoveHandler)&&void 0!==a||(this._onTouchMoveHandler=function(h){u.stateController.onTouchMove(h)}),this._onTouchMoveHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTaskTouchStartHandler",{get:function(){var a,u=this;return null!==(a=this._onTaskTouchStartHandler)&&void 0!==a||(this._onTaskTouchStartHandler=function(h){u.stateController.onTaskTouchStart(h)}),this._onTaskTouchStartHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onMouseClickHandler",{get:function(){var a,u=this;return null!==(a=this._onMouseClickHandler)&&void 0!==a||(this._onMouseClickHandler=function(h){u.stateController.onClick(h)}),this._onMouseClickHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onMouseDblClickHandler",{get:function(){var a,u=this;return null!==(a=this._onMouseDblClickHandler)&&void 0!==a||(this._onMouseDblClickHandler=function(h){u.stateController.onDblClick(h)}),this._onMouseDblClickHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onMouseDownHandler",{get:function(){var a,u=this;return null!==(a=this._onMouseDownHandler)&&void 0!==a||(this._onMouseDownHandler=function(h){u.stateController.onMouseDown(h)}),this._onMouseDownHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTaskAreaMouseLeaveHandler",{get:function(){var a,u=this;return null!==(a=this._onTaskAreaMouseLeaveHandler)&&void 0!==a||(this._onTaskAreaMouseLeaveHandler=function(h){u.stateController.onTaskAreaMouseLeave(h)}),this._onTaskAreaMouseLeaveHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onMouseMoveHandler",{get:function(){var a,u=this;return null!==(a=this._onMouseMoveHandler)&&void 0!==a||(this._onMouseMoveHandler=function(h){u.stateController.onMouseMove(h)}),this._onMouseMoveHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onMouseUpHandler",{get:function(){var a,u=this;return null!==(a=this._onMouseUpHandler)&&void 0!==a||(this._onMouseUpHandler=function(h){u.stateController.onMouseUp(h)}),this._onMouseUpHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTaskMouseEnterHandler",{get:function(){var a,u=this;return null!==(a=this._onTaskMouseEnterHandler)&&void 0!==a||(this._onTaskMouseEnterHandler=function(h){u.stateController.onTaskElementHover(h)}),this._onTaskMouseEnterHandler},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTaskMouseLeaveHandler",{get:function(){var a,u=this;return null!==(a=this._onTaskMouseLeaveHandler)&&void 0!==a||(this._onTaskMouseLeaveHandler=function(h){u.stateController.onTaskElementLeave(h)}),this._onTaskMouseLeaveHandler},enumerable:!1,configurable:!0}),s.DBLCLICK_INTERVAL=300,s.MS_POINTER_ACTIVE_CLASS="ms-pointer-active",s}();b.TaskAreaManager=c},2366:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GanttView=void 0;var S=f(639),T=f(9279),y=f(7156),d=f(1284),c=f(858),s=f(7880),a=f(9201),u=f(9954),h=f(8695),g=f(6893),_=f(8725),x=f(2491),w=f(3452),D=f(9650),C=f(2978),I=f(1074),L=f(5351),N=f(6353),G=f(9057),k=f(5098),U=f(9640),B=f(8478),K=f(5846),J=f(2449),ie=f(1408),re=f(6626),q=f(3714),Y=f(6907),Z=f(8900),Q=f(8269),te=f(4730),pe=f(6124),z=function(){function oe(ae,ee,he){var de=this;this.currentSelectedTaskID="",this.isFocus=!1,this._updateWithModelReloadLockedCounter=0,this.scaleCount=2,this.tickSize=new N.Size(0,0),this.currentZoom=1,this.stripLinesUpdaterId=null,this.ganttOwner=ee,this.settings=L.Settings.parse(he),this.initValidationController(),this.renderHelper=new I.RenderHelper(this),this.renderHelper.initMarkup(ae),this.loadOptionsFromGanttOwner(),this.renderHelper.init(this.tickSize,this.range,this.settings.viewType,this.viewModel,this.settings.firstDayOfWeek),this.commandManager=new y.CommandManager(this),this.barManager=new S.BarManager(this.commandManager,this.ganttOwner.bars),this.initTaskEditController(),this.history=new _.History(this._getHistoryListener()),this.initFullScreenModeHelper(),this.updateView(),this._scrollTimeOut=setTimeout(function(){de.scrollLeftByViewType()},0),this.initializeStripLinesUpdater(),this.initGanttViewApi()}return oe.prototype.initGanttViewApi=function(){this.ganttViewApi=new re.GanttViewApi(this)},oe.prototype._getHistoryListener=function(){return{onTransactionStart:this.onHistoryTransactionStart.bind(this),onTransactionEnd:this.onHistoryTransactionEnd.bind(this)}},oe.prototype.onHistoryTransactionStart=function(){this.lockUpdateWithReload()},oe.prototype.onHistoryTransactionEnd=function(){this.unlockUpdateWithReload()},oe.prototype.lockUpdateWithReload=function(){this._updateWithModelReloadLockedCounter++},oe.prototype.unlockUpdateWithReload=function(){this._updateWithModelReloadLockedCounter--,0===this._updateWithModelReloadLockedCounter&&this._pendingUpdateInfo&&(this.updateWithDataReload(this._pendingUpdateInfo.keepExpandState),this._pendingUpdateInfo=null)},oe.prototype.initValidationController=function(){var ae=this,ee=K.ValidationControllerSettings.parse({getViewModel:function(){return ae.viewModel},getHistory:function(){return ae.history},getModelManipulator:function(){return ae.modelManipulator},getRange:function(){return ae.range},getValidationSettings:function(){return ae.settings.validation},updateOwnerInAutoParentMode:function(){ae.updateOwnerInAutoParentMode()},getIsValidateDependenciesRequired:function(){return ae.isValidateDependenciesRequired()}});this.validationController=new B.ValidationController(ee)},oe.prototype.initTaskEditController=function(){var ae=this,ee=U.TaskEditSettings.parse({destroyTemplate:function(he){ae.destroyTemplate(he)},formatDate:function(he){return ae.getDateFormat(he)},getRenderHelper:function(){return ae.renderHelper},getGanttSettings:function(){return ae.settings},getViewModel:function(){return ae.viewModel},getCommandManager:function(){return ae.commandManager},getModelManipulator:function(){return ae.modelManipulator},getValidationController:function(){return ae.validationController}});this.taskEditController=new k.TaskEditController(ee)},Object.defineProperty(oe.prototype,"taskAreaEventsListener",{get:function(){var ae;return null!==(ae=this._taskAreaEventsListener)&&void 0!==ae||(this._taskAreaEventsListener=new Q.TaskAreaEventsListener(this)),this._taskAreaEventsListener},enumerable:!1,configurable:!0}),oe.prototype.initFullScreenModeHelper=function(){var ae=this,ee=u.FullScreenHelperSettings.parse({getMainElement:function(){return ae.getOwnerControlMainElement()},adjustControl:function(){ae.adjustOwnerControl()}});this.fullScreenModeHelper=new h.FullScreenModeHelper(ee)},oe.prototype.getDateRange=function(ae,ee){var he=this.getVisibleAreaTime(),de=this.settings.startDateRange||a.DateUtils.adjustStartDateByViewType(new Date(ae.getTime()-he),this.settings.viewType,this.settings.firstDayOfWeek),ue=this.settings.endDateRange||a.DateUtils.adjustEndDateByViewType(new Date(ee.getTime()+he),this.settings.viewType,this.settings.firstDayOfWeek);return this.settings.startDateRange&&de>ue?ue=de:this.settings.endDateRange&&de>ue&&(de=ue),new c.DateRange(de,ue)},oe.prototype.getVisibleAreaTime=function(){return Math.ceil(this.renderHelper.getTaskAreaContainerWidth()/this.tickSize.width)*a.DateUtils.getTickTimeSpan(this.settings.viewType)},oe.prototype.zoomIn=function(ae){void 0===ae&&(ae=this.renderHelper.getTaskAreaContainerWidth()/2),this.ganttViewApi.zoomIn(ae)},oe.prototype.zoomOut=function(ae){void 0===ae&&(ae=this.renderHelper.getTaskAreaContainerWidth()/2),this.ganttViewApi.zoomOut(ae)},oe.prototype.scrollToDate=function(ae){if(ae){var ee=ae instanceof Date?a.DateUtils.getOrCreateUTCDate(ae):a.DateUtils.parse(ae);this.scrollToDateCore(ee,0)}},oe.prototype.showDialog=function(ae,ee,he,de){this.ganttOwner.showDialog(ae,ee,he,de)},oe.prototype.showPopupMenu=function(ae){this.ganttOwner.showPopupMenu(ae)},oe.prototype.hidePopupMenu=function(){this.ganttOwner.hidePopupMenu&&this.ganttOwner.hidePopupMenu()},oe.prototype.collapseAll=function(){this.ganttOwner.collapseAll()},oe.prototype.expandAll=function(){this.ganttOwner.expandAll()},oe.prototype.onGanttViewContextMenu=function(ae,ee,he){return this.ganttOwner.onGanttViewContextMenu(ae,ee,he)},oe.prototype.changeGanttTaskSelection=function(ae,ee){this.ganttOwner.changeGanttTaskSelection(ae,ee)},oe.prototype.hideTaskEditControl=function(){this.taskEditController.hide()},oe.prototype.scrollLeftByViewType=function(){var ae=a.DateUtils.roundStartDate(this.dataRange.start,this.settings.viewType);this.scrollToDateCore(ae,1)},oe.prototype.scrollToDateCore=function(ae,ee){this.renderHelper.setTaskAreaContainerScrollLeftToDate(ae,ee)},oe.prototype.onVisualModelChanged=function(){this.resetAndUpdate()},oe.prototype.initializeStripLinesUpdater=function(){var ae=this;this.settings.stripLines.showCurrentTime&&(this.stripLinesUpdaterId=setInterval(function(){ae.renderHelper.recreateStripLines()},Math.max(this.settings.stripLines.currentTimeUpdateInterval,100)))},oe.prototype.clearStripLinesUpdater=function(){this.stripLinesUpdaterId&&clearInterval(this.stripLinesUpdaterId),this.stripLinesUpdaterId=null},oe.prototype.getGanttViewStartDate=function(ae){if(!ae)return new Date;var ee=ae.map(function(he){return"string"==typeof he.start?new Date(he.start):he.start}).filter(function(he){return(0,x.isDefined)(he)});return ee.length>0?ee.reduce(function(he,de){return de<he?de:he},ee[0]):new Date},oe.prototype.getGanttViewEndDate=function(ae){if(!ae)return new Date;var ee=ae.map(function(he){return"string"==typeof he.end?new Date(he.end):he.end}).filter(function(he){return(0,x.isDefined)(he)});return ee.length>0?ee.reduce(function(he,de){return de>he?de:he},ee[0]):new Date},oe.prototype.getTask=function(ae){var ee=this.getViewItem(ae);return ee?.task},oe.prototype.getViewItem=function(ae){var ee;return null===(ee=this.viewModel)||void 0===ee?void 0:ee.items[ae]},oe.prototype.isValidateDependenciesRequired=function(){return this.settings.validation.validateDependencies&&this.settings.showDependencies},oe.prototype.updateTickSizeWidth=function(){this.tickSize.width=this.renderHelper.etalonScaleItemWidths*this.currentZoom},oe.prototype.updateView=function(){this.onBeginUpdateView(),this.renderHelper.setTimeScaleContainerScrollLeft(this.taskAreaContainerScrollLeft),this.processScroll(!1),this.processScroll(!0),this.ganttOwner.onGanttScroll(this.taskAreaContainerScrollTop),this.onEndUpdateView()},oe.prototype.onBeginUpdateView=function(){this[oe.taskAreaScrollTopKey]=this.renderHelper.taskAreaContainerScrollTop,this[oe.taskAreaScrollLeftKey]=this.renderHelper.taskAreaContainerScrollLeft},oe.prototype.onEndUpdateView=function(){delete this[oe.taskAreaScrollTopKey],delete this[oe.taskAreaScrollLeftKey],delete this[oe.taskTextHeightKey]},Object.defineProperty(oe.prototype,"taskAreaContainerScrollTop",{get:function(){var ae;return null!==(ae=this[oe.taskAreaScrollTopKey])&&void 0!==ae?ae:this.renderHelper.taskAreaContainerScrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"taskAreaContainerScrollLeft",{get:function(){var ae;return null!==(ae=this[oe.taskAreaScrollLeftKey])&&void 0!==ae?ae:this.renderHelper.taskAreaContainerScrollLeft},enumerable:!1,configurable:!0}),oe.prototype.processScroll=function(ae){this.hideTaskEditControl(),this.renderHelper.processScroll(ae)},oe.prototype.allowTaskAreaBorders=function(ae){return ae?this.settings.areHorizontalBordersEnabled:this.settings.areVerticalBordersEnabled},oe.prototype.getScaleItemText=function(ae,ee){return this.renderHelper.getScaleItemText(ae,ee)},oe.prototype.getTaskText=function(ae){return this.renderHelper.getTaskText(ae)},oe.prototype.rowHasChildren=function(ae){var ee=this.getViewItem(ae);return ee?.children.length>0},oe.prototype.rowHasSelection=function(ae){var ee=this.getViewItem(ae);return ee?.selected},oe.prototype.getAllVisibleTaskIndices=function(ae,ee){return this.viewModel.getAllVisibleTaskIndices(ae,ee)},oe.prototype.getVisibleDependencyKeysByTaskRange=function(ae){if(!this.settings.showDependencies)return[];var ee=this.viewModel,he=ae.map(function(de){return ee.tasks.items[de].internalId});return ee.dependencies.items.filter(function(de){return he.indexOf(de.successorId)>-1||he.indexOf(de.predecessorId)>-1}).map(function(de){return de.internalId})},oe.prototype.getTreeListTableStyle=function(){var ae,ee;return null===(ee=(ae=this.ganttOwner).getTreeListTableStyle)||void 0===ee?void 0:ee.call(ae)},oe.prototype.getTreeListColCount=function(){var ae,ee;return null===(ee=(ae=this.ganttOwner).getTreeListColCount)||void 0===ee?void 0:ee.call(ae)},oe.prototype.getTreeListHeaderInfo=function(ae){var ee,he;return null===(he=(ee=this.ganttOwner).getTreeListHeaderInfo)||void 0===he?void 0:he.call(ee,ae)},oe.prototype.getTreeListCellInfo=function(ae,ee,he){var de,ue;return null===(ue=(de=this.ganttOwner).getTreeListCellInfo)||void 0===ue?void 0:ue.call(de,ae,ee,he)},oe.prototype.getTreeListEmptyDataCellInfo=function(){var ae,ee;return null===(ee=(ae=this.ganttOwner).getTreeListEmptyDataCellInfo)||void 0===ee?void 0:ee.call(ae)},oe.prototype.exportToPdf=function(ae){var ee;return null!==(ee=ae.docCreateMethod)&&void 0!==ee||(ae.docCreateMethod=this.getDefaultPdfDocCreateMethod()),new C.PdfGanttExporter(new g.GanttExportCalculator(this,ae)).export()},oe.prototype.getDefaultPdfDocCreateMethod=function(){var ae;return null===(ae=window.jspdf)||void 0===ae?void 0:ae.jsPDF},oe.prototype.getTaskDependencies=function(ae){return this.viewModel.dependencies.items.filter(function(ee){return ee.predecessorId==ae||ee.successorId==ae})},oe.prototype.isHighlightRowElementAllowed=function(ae){var ee=this.getViewItem(ae);return ae%2!=0&&this.settings.areAlternateRowsEnabled||ee?.children.length>0},oe.prototype.calculateAutoViewType=function(ae,ee){var he=(ee.getTime()-ae.getTime())/36e5;return he>8760?J.ViewType.Years:he>720?J.ViewType.Months:he>168?J.ViewType.Weeks:he>24?J.ViewType.Days:he>6?J.ViewType.SixHours:he>1?J.ViewType.Hours:J.ViewType.TenMinutes},oe.prototype.getExternalTaskAreaContainer=function(ae){return this.ganttOwner.getExternalTaskAreaContainer(ae)},oe.prototype.prepareExternalTaskAreaContainer=function(ae,ee){return this.ganttOwner.prepareExternalTaskAreaContainer(ae,ee)},oe.prototype.getHeaderHeight=function(){return this.ganttOwner.getHeaderHeight()},oe.prototype.changeTaskExpanded=function(ae,ee){var he=this.getTaskByPublicId(ae);he&&this.viewModel.changeTaskExpanded(he.internalId,ee)},oe.prototype.expandTask=function(ae){this.viewModel.changeTaskExpanded(ae,!0)},oe.prototype.collapseTask=function(ae){this.viewModel.changeTaskExpanded(ae,!1)},oe.prototype.showTask=function(ae){this.viewModel.changeTaskVisibility(ae,!0)},oe.prototype.hideTask=function(ae){this.viewModel.changeTaskVisibility(ae,!1)},oe.prototype.getTaskVisibility=function(ae){return this.viewModel.getTaskVisibility(ae)},oe.prototype.unselectCurrentSelectedTask=function(){this.unselectTask(this.currentSelectedTaskID)},oe.prototype.getTaskSelected=function(ae){return this.viewModel.getTaskSelected(ae)},oe.prototype.setViewType=function(ae,ee){void 0===ee&&(ee=!0),this.ganttViewApi.setViewType(ae,ee)},oe.prototype.setViewTypeRange=function(ae,ee){this.ganttViewApi.setViewTypeRange(ae,ee)},oe.prototype.setTaskTitlePosition=function(ae){this.settings.taskTitlePosition!==ae&&(this.settings.taskTitlePosition=ae,this.resetAndUpdate())},oe.prototype.setShowResources=function(ae){this.settings.showResources!==ae&&(this.settings.showResources=ae,this.resetAndUpdate())},oe.prototype.toggleResources=function(){this.setShowResources(!this.settings.showResources)},oe.prototype.setShowDependencies=function(ae){this.settings.showDependencies!==ae&&(this.settings.showDependencies=ae,this.resetAndUpdate())},oe.prototype.toggleDependencies=function(){this.setShowDependencies(!this.settings.showDependencies)},oe.prototype.setFirstDayOfWeek=function(ae){this.settings.firstDayOfWeek!==ae&&(this.settings.firstDayOfWeek=ae,this.resetAndUpdate())},oe.prototype.setStartDateRange=function(ae){s.DateTimeUtils.areDatesEqual(this.settings.startDateRange,ae)||(this.settings.startDateRange=new Date(ae),this.resetAndUpdate())},oe.prototype.setEndDateRange=function(ae){s.DateTimeUtils.areDatesEqual(this.settings.endDateRange,ae)||(this.settings.endDateRange=new Date(ae),this.resetAndUpdate())},oe.prototype.loadOptionsFromGanttOwner=function(){var ae,ee=this;this.tickSize.height=this.ganttOwner.getRowHeight();var he=this.ganttOwner.getGanttTasksData();this.dataRange=new c.DateRange(this.getGanttViewStartDate(he),this.getGanttViewEndDate(he)),null==this.settings.viewType&&(this.settings.viewType=this.calculateAutoViewType(this.dataRange.start,this.dataRange.end)),this.updateTickSizeWidth(),this.range=this.getDateRange(this.dataRange.start,this.dataRange.end),this.dispatcher=new w.ModelChangesDispatcher;var de=this.ganttOwner.getModelChangesListener();de&&this.dispatcher.onModelChanged.add(de),this.viewModel=new ie.ViewVisualModel(this,he,this.ganttOwner.getGanttDependenciesData(),this.ganttOwner.getGanttResourcesData(),this.ganttOwner.getGanttResourceAssignmentsData(),this.range,this.ganttOwner.getGanttWorkTimeRules()),this.modelManipulator=new D.ModelManipulator(this.viewModel,this.dispatcher),null===(ae=this.history)||void 0===ae||ae.historyItems.forEach(function(ue){return ue.setModelManipulator(ee.modelManipulator)})},oe.prototype.resetAndUpdate=function(){this.range=this.getDateRange(this.dataRange.start,this.dataRange.end),this.viewModel.updateRange(this.range),this.renderHelper.resetAndUpdate(this.tickSize,this.range,this.settings.viewType,this.viewModel,this.settings.firstDayOfWeek),T.Browser.IE&&this.taskEditController.createElements(),this.updateView()},oe.prototype.cleanMarkup=function(){this.setNormalScreenMode(),this.renderHelper.taskAreaManagerDetachEvents(),this.taskEditController.detachEvents(),this.clearStripLinesUpdater(),this.renderHelper.reset(),clearTimeout(this._scrollTimeOut)},oe.prototype.checkAndProcessModelChanges=function(){var ae=this.ganttOwner.getGanttTasksData(),ee=this.viewModel.refreshTaskDataIfRequires(ae);return ee&&this.resetAndUpdate(),ee},oe.prototype.updateHistoryObsoleteInsertedKey=function(ae,ee,he){var de;null===(de=this.history)||void 0===de||de.updateObsoleteInsertedKey(ae,ee,he),he===pe.GanttDataObjectNames.dependency&&this.renderHelper.updateRenderedConnectorLinesId(ae,ee)},oe.prototype.updateRowHeights=function(ae){if(this.tickSize.height!==ae){this.tickSize.height=ae;var ee=this.renderHelper.getTaskAreaContainerScrollLeft();this.resetAndUpdate(),this.renderHelper.setTaskAreaContainerScrollLeft(ee)}},oe.prototype.selectTask=function(ae){this.selectDependency(null),this.viewModel.changeTaskSelected(ae,!0),this.currentSelectedTaskID=ae,this.updateBarManager()},oe.prototype.unselectTask=function(ae){this.viewModel.changeTaskSelected(ae,!1),this.updateBarManager()},oe.prototype.selectTaskById=function(ae){this.unselectCurrentSelectedTask();var ee=this.getTaskByPublicId(ae);ee&&this.selectTask(ee.internalId)},oe.prototype.selectDependency=function(ae){this.taskEditController.selectDependency(ae),this.renderHelper.createConnectorLines()},oe.prototype.getTaskAreaContainer=function(){return this.renderHelper.taskAreaContainer},oe.prototype.setWidth=function(ae){this.renderHelper.setMainElementWidth(ae)},oe.prototype.setHeight=function(ae){this.renderHelper.setMainElementHeight(ae)},oe.prototype.setAllowSelection=function(ae){this.settings.allowSelectTask=ae},oe.prototype.setEditingSettings=function(ae){this.settings.editing=ae,this.updateBarManager()},oe.prototype.setValidationSettings=function(ae){this.settings.validation=ae},oe.prototype.setRowLinesVisible=function(ae){this.settings.areHorizontalBordersEnabled=ae,this.renderHelper.prepareTaskAreaContainer(),this.resetAndUpdate()},oe.prototype.setStripLines=function(ae){this.settings.stripLines=G.StripLineSettings.parse(ae),this.clearStripLinesUpdater(),this.initializeStripLinesUpdater(),this.renderHelper.recreateStripLines()},oe.prototype.deleteTask=function(ae){var ee=this.getTaskByPublicId(ae.toString());ee&&this.commandManager.removeTaskCommand.execute(ee.internalId,!1,!0)},oe.prototype.insertTask=function(ae){if(ae){var ee=null!=ae.parentId?String(ae.parentId):null,he=this.getTaskByPublicId(ee),de=this.viewModel.getRootTaskId(),ue="string"==typeof ae.start?new Date(ae.start):ae.start,be="string"==typeof ae.end?new Date(ae.end):ae.end,ve={parentId:de&&ee===de?ee:he?.internalId,title:ae.title,start:ue,end:be,progress:parseInt(ae.progress)||0,color:ae.color};if(this.commandManager.createTaskCommand.execute(ve))return this.getLastInsertedTaskId()}return""},oe.prototype.updateTask=function(ae,ee){var he=this.getTaskByPublicId(ae.toString()),de=this._getTaskDataForUpdate(ee,he);de&&this.commandManager.updateTaskCommand.execute(he.internalId,de)},oe.prototype.getTaskData=function(ae){var ee=this.getTaskByPublicId(ae.toString());if(ee)return this.viewModel.getTaskObjectForDataSource(ee)},oe.prototype.insertDependency=function(ae){if(ae){var ee=String(ae.predecessorId),he=this.getTaskByPublicId(ee),de=String(ae.successorId),ue=this.getTaskByPublicId(de),be=ae.type;he&&ue&&this.validationController.canCreateDependency(ee,de)&&this.commandManager.createDependencyCommand.execute(he.internalId,ue.internalId,be)}},oe.prototype.deleteDependency=function(ae){var ee=this.viewModel.convertPublicToInternalKey("dependency",ae);(0,x.isDefined)(ee)&&this.commandManager.removeDependencyCommand.execute(ee)},oe.prototype.getDependencyData=function(ae){return this.viewModel.getDependencyObjectForDataSource(ae)},oe.prototype.insertResource=function(ae,ee){var he=this;ae&&this.commandManager.createResourceCommand.execute(String(ae.text),ae.color&&String(ae.color),function(de){if((0,x.isDefined)(ee))for(var ue=0;ue<ee.length;ue++)he.assignResourceToTask(de,ee[ue])})},oe.prototype.deleteResource=function(ae){var ee=this.viewModel.convertPublicToInternalKey("resource",ae);(0,x.isDefined)(ee)&&this.commandManager.removeResourceCommand.execute(ee)},oe.prototype.assignResourceToTask=function(ae,ee){var he=this.viewModel.convertPublicToInternalKey("resource",ae),de=this.viewModel.convertPublicToInternalKey("task",ee);(0,x.isDefined)(he)&&(0,x.isDefined)(de)&&this.commandManager.assignResourceCommand.execute(he,de)},oe.prototype.unassignResourceFromTask=function(ae,ee){var he=this.viewModel.findAssignment(ae,ee);he&&this.commandManager.deassignResourceCommand.execute(he.internalId)},oe.prototype.unassignAllResourcesFromTask=function(ae){var ee=this,he=this.viewModel.convertPublicToInternalKey("task",ae);this.viewModel.findAllTaskAssignments(he).forEach(function(de){return ee.commandManager.deassignResourceCommand.execute(de.internalId)})},oe.prototype.getResourceData=function(ae){return this.viewModel.getResourceObjectForDataSource(ae)},oe.prototype.getResourceAssignmentData=function(ae){return this.viewModel.getResourceAssignmentObjectForDataSource(ae)},oe.prototype.getTaskResources=function(ae){var ee=this.viewModel,he=ee.getItemByPublicId("task",ae);return he&&ee.getAssignedResources(he).items||[]},oe.prototype.getVisibleTaskKeys=function(){return this.viewModel.getVisibleTasks().map(function(ae){return ae.id})},oe.prototype.getVisibleDependencyKeys=function(){return this.viewModel.getVisibleDependencies().map(function(ae){return ae.id})},oe.prototype.getVisibleResourceKeys=function(){return this.viewModel.getVisibleResources().map(function(ae){return ae.id})},oe.prototype.getVisibleResourceAssignmentKeys=function(){return this.viewModel.getVisibleResourceAssignments().map(function(ae){return ae.id})},oe.prototype.getTasksExpandedState=function(){return this.viewModel.getTasksExpandedState()},oe.prototype.applyTasksExpandedState=function(ae){this.viewModel.applyTasksExpandedState(ae)},oe.prototype.updateWithDataReload=function(ae){if(this._updateWithModelReloadLockedCounter>0)this._pendingUpdateInfo={keepExpandState:ae};else{var ee=ae&&this.getTasksExpandedState();this.loadOptionsFromGanttOwner(),ae?this.applyTasksExpandedState(ee):this.resetAndUpdate();var he=te.DialogBase.activeInstance;he&&he.canRefresh&&"TaskEdit"===he.getDialogName()&&he.refresh(),this.dispatcher.notifyGanttViewUpdated()}},oe.prototype.onBrowserWindowResize=function(){this.fullScreenModeHelper.isInFullScreenMode?this.fullScreenModeHelper.adjustControlInFullScreenMode():this.adjustOwnerControl()},oe.prototype.getTaskTreeLine=function(ae){return this.viewModel.getTaskTreeLine(ae).reverse()},oe.prototype.isInFullScreenMode=function(){var ae;return!(null===(ae=this.fullScreenModeHelper)||void 0===ae||!ae.isInFullScreenMode)},oe.prototype.setFullScreenMode=function(){this.isInFullScreenMode()||this.fullScreenModeHelper.toggle()},oe.prototype.setNormalScreenMode=function(){this.isInFullScreenMode()&&this.fullScreenModeHelper.toggle()},oe.prototype.setTaskValue=function(ae,ee,he){var de=this.commandManager.updateTaskCommand,ue=this.getTaskByPublicId(ae),be={};return ue&&("title"===ee&&(be[ee]=he||""),"progress"===ee&&(be[ee]=he),"start"===ee&&(be[ee]=s.DateTimeUtils.getMinDate(he,ue.end)),"end"===ee&&(be[ee]=s.DateTimeUtils.getMaxDate(he,ue.start))),Object.keys(be).length>0&&de.execute(ue.internalId,be)},oe.prototype.getLastInsertedTaskId=function(){var ae=this.history.historyItems.filter(function(he){return he instanceof d.CreateTaskHistoryItem}),ee=ae[ae.length-1];return ee&&ee.insertedKey},oe.prototype.getTaskByPublicId=function(ae){return this.viewModel.tasks.getItemByPublicId(ae)},oe.prototype.getPrevTask=function(ae){var ee=this.viewModel.findItem(ae);if(!ee)return null;var he=(ee.parent||this.viewModel.root).children.indexOf(ee)-1;return he>-1?ee.parent.children[he].task:ee.parent.task},oe.prototype.getTaskIdByInternalId=function(ae){var ee=this.viewModel.findItem(ae),he=ee&&ee.task;return he?he.id:null},oe.prototype.isTaskHasChildren=function(ae){var ee=this.viewModel.findItem(ae);return ee&&ee.children.length>0},oe.prototype.requireFirstLoadParentAutoCalc=function(){var ae=this.ganttOwner;return ae.getRequireFirstLoadParentAutoCalc&&ae.getRequireFirstLoadParentAutoCalc()},oe.prototype.updateOwnerInAutoParentMode=function(){this.viewModel.parentAutoCalc&&this.dispatcher.notifyParentDataRecalculated(this.viewModel.getCurrentTaskData())},oe.prototype.getOwnerControlMainElement=function(){var ae=this.ganttOwner;return ae.getMainElement&&ae.getMainElement()},oe.prototype.adjustOwnerControl=function(){var ae=this.ganttOwner;ae.adjustControl&&ae.adjustControl()},oe.prototype.applySettings=function(ae,ee){void 0===ee&&(ee=!1);var he=L.Settings.parse(ae),de=ee||this.settings.equal(he);this.settings=he,de||this.resetAndUpdate()},oe.prototype.getDataUpdateErrorCallback=function(){var ae=this,ee=this.history,he=ee.getCurrentProcessingItemInfo();return function(){ae.dispatcher.lock(),ee.rollBackAndRemove(he),ae.dispatcher.unlock(),ae.updateBarManager()}},oe.prototype.setTaskTooltipContentTemplate=function(ae){this.settings.taskTooltipContentTemplate=ae},oe.prototype.setTaskProgressTooltipContentTemplate=function(ae){this.settings.taskProgressTooltipContentTemplate=ae},oe.prototype.setTaskTimeTooltipContentTemplate=function(ae){this.settings.taskTimeTooltipContentTemplate=ae},oe.prototype.setTaskContentTemplate=function(ae){this.settings.taskContentTemplate=ae},oe.prototype.updateBarManager=function(){this.barManager.updateItemsState([])},oe.prototype.onTaskAreaClick=function(ae,ee){var he,de=this.viewModel.items[ae];return de&&this.onTaskClick(null===(he=de.task)||void 0===he?void 0:he.id,ee)},oe.prototype.onTaskAreaDblClick=function(ae,ee){var he=this.viewModel.items[ae];he&&this.onTaskDblClick(he.task.id,ee)&&this.commandManager.showTaskEditDialog.execute(he.task)},oe.prototype.onTaskAreaContextMenu=function(ae,ee,he){var de,ue,ve=ee,le=this.viewModel,Ce="dependency"===he?le.convertInternalToPublicKey("dependency",q.EvtUtils.getEventSource(ee).getAttribute("dependency-id")):null===(ue=null===(de=le.items[ae])||void 0===de?void 0:de.task)||void 0===ue?void 0:ue.id;if(this.onGanttViewContextMenu(ee,Ce,he)){var ye={event:ee,type:he,key:Ce,position:new Z.Point(q.EvtUtils.getEventX(ve),q.EvtUtils.getEventY(ve))};this.showPopupMenu(ye)}},oe.prototype.onTaskSelectionChanged=function(ae,ee){var he=this,de=this.viewModel.items[ae];this.isFocus=Y.DomUtils.isItParent(this.renderHelper.taskArea,q.EvtUtils.getEventSource(ee)),de&&this.isFocus&&this.settings.allowSelectTask&&setTimeout(function(){he.changeGanttTaskSelection(de.task.id,!0)},0)},oe.prototype.onTaskClick=function(ae,ee){return!this.ganttOwner.onTaskClick||this.ganttOwner.onTaskClick(ae,ee)},oe.prototype.onTaskDblClick=function(ae,ee){return!this.ganttOwner.onTaskDblClick||this.ganttOwner.onTaskDblClick(ae,ee)},oe.prototype.getDateFormat=function(ae){return this.ganttOwner.getFormattedDateText?this.ganttOwner.getFormattedDateText(ae):this.getDefaultDateFormat(ae)},oe.prototype.getDefaultDateFormat=function(ae){return("0"+ae.getDate()).slice(-2)+"/"+("0"+(ae.getMonth()+1)).slice(-2)+"/"+ae.getFullYear()+" "+("0"+ae.getHours()).slice(-2)+":"+("0"+ae.getMinutes()).slice(-2)},oe.prototype.destroyTemplate=function(ae){this.ganttOwner.destroyTemplate?this.ganttOwner.destroyTemplate(ae):ae.innerHTML=""},oe.prototype.onTaskAreaSizeChanged=function(ae){this.ganttOwner.onTaskAreaSizeChanged&&this.ganttOwner.onTaskAreaSizeChanged(ae)},oe.prototype.showTaskEditDialog=function(){this.commandManager.showTaskEditDialog.execute()},oe.prototype.showTaskDetailsDialog=function(ae){var ee=this.getTaskByPublicId(ae);ee&&this.commandManager.showTaskEditDialog.execute(ee,!0)},oe.prototype.showResourcesDialog=function(){this.commandManager.showResourcesDialog.execute()},oe.prototype.getCommandByKey=function(ae){return this.commandManager.getCommand(ae)},oe.prototype._getTaskDataForUpdate=function(ae,ee){var he={};return ee&&ae&&((0,x.isDefined)(ae.title)&&ae.title!==ee.title&&(he.title=ae.title),(0,x.isDefined)(ae.progress)&&ae.progress!==ee.progress&&(he.progress=ae.progress),(0,x.isDefined)(ae.start)&&ae.start!==ee.start&&(he.start=ae.start),(0,x.isDefined)(ae.end)&&ae.end!==ee.end&&(he.end=ae.end),(0,x.isDefined)(ae.color)&&ae.color!==ee.color&&(he.color=ae.color)),Object.keys(he).length>0?he:null},oe.prototype.updateViewDataRange=function(){var ae=this.viewModel,ee=ae.getTaskMinStart(),he=ae.getTaskMaxEnd(),de=ee.getTime()<this.dataRange.start.getTime(),ue=he.getTime()>this.dataRange.end.getTime();de&&(this.dataRange.start=ee),ue&&(this.dataRange.end=he),(de||ue)&&this.resetAndUpdate()},oe.taskAreaScrollLeftKey=(oe.cachedPrefix="cached_")+"taskAreaScrollLeft",oe.taskAreaScrollTopKey=oe.cachedPrefix+"taskAreaScrollTop",oe.taskTextHeightKey=oe.cachedPrefix+"taskTextHeight",oe}();b.GanttView=z},2449:(P,b)=>{var f;Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaEventSource=b.TaskTitlePosition=b.Position=b.ViewType=void 0,(f=b.ViewType||(b.ViewType={}))[f.TenMinutes=0]="TenMinutes",f[f.Hours=1]="Hours",f[f.SixHours=2]="SixHours",f[f.Days=3]="Days",f[f.Weeks=4]="Weeks",f[f.Months=5]="Months",f[f.Quarter=6]="Quarter",f[f.Years=7]="Years",f[f.FiveYears=8]="FiveYears",function(f){f[f.Left=0]="Left",f[f.Top=1]="Top",f[f.Right=2]="Right",f[f.Bottom=3]="Bottom"}(b.Position||(b.Position={})),function(f){f[f.Inside=0]="Inside",f[f.Outside=1]="Outside",f[f.None=2]="None"}(b.TaskTitlePosition||(b.TaskTitlePosition={})),function(f){f[f.TaskArea=0]="TaskArea",f[f.TaskEdit_Frame=1]="TaskEdit_Frame",f[f.TaskEdit_Progress=2]="TaskEdit_Progress",f[f.TaskEdit_Start=3]="TaskEdit_Start",f[f.TaskEdit_End=4]="TaskEdit_End",f[f.TaskEdit_DependencyStart=5]="TaskEdit_DependencyStart",f[f.TaskEdit_DependencyFinish=6]="TaskEdit_DependencyFinish",f[f.Successor_Wrapper=7]="Successor_Wrapper",f[f.Successor_DependencyStart=8]="Successor_DependencyStart",f[f.Successor_DependencyFinish=9]="Successor_DependencyFinish"}(b.TaskAreaEventSource||(b.TaskAreaEventSource={}))},8877:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EtalonSizeValues=void 0,b.EtalonSizeValues=function(){this.scaleItemWidths={}}},8695:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.FullScreenModeHelper=void 0;var S=f(9279),T=f(2217),y=f(6907),d=function(){function c(s){this._isInFullScreenMode=!1,this.fullScreenTempVars={},this.settings=s}return Object.defineProperty(c.prototype,"isInFullScreenMode",{get:function(){return this._isInFullScreenMode},enumerable:!1,configurable:!0}),c.prototype.getMainElement=function(){return this.settings.getMainElement()},c.prototype.adjustControl=function(){this.settings.adjustControl()},c.prototype.toggle=function(){return this._isInFullScreenMode=!this._isInFullScreenMode,this._isInFullScreenMode?this.setFullScreenMode():this.setNormalMode(),!0},c.prototype.setFullScreenMode=function(){this.prepareFullScreenMode(),this.adjustControlInFullScreenMode()},c.prototype.prepareFullScreenMode=function(){var s=this.getMainElement();T.AttrUtils.changeElementStyleAttribute(s,"border-top-width","0px"),T.AttrUtils.changeElementStyleAttribute(s,"border-left-width","0px"),T.AttrUtils.changeElementStyleAttribute(s,"border-right-width","0px"),T.AttrUtils.changeElementStyleAttribute(s,"border-bottom-width","0px"),this.fullScreenTempVars.scrollTop=y.DomUtils.getDocumentScrollTop(),this.fullScreenTempVars.scrollLeft=y.DomUtils.getDocumentScrollLeft(),T.AttrUtils.changeElementStyleAttribute(s,"background-color","white"),T.AttrUtils.changeElementStyleAttribute(s,"position","fixed"),T.AttrUtils.changeElementStyleAttribute(s,"top","0px"),T.AttrUtils.changeElementStyleAttribute(s,"left","0px"),T.AttrUtils.changeElementStyleAttribute(s,"z-index","1010"),T.AttrUtils.changeElementStyleAttribute(document.documentElement,"position","static"),T.AttrUtils.changeElementStyleAttribute(document.documentElement,"overflow","hidden"),this.fullScreenTempVars.bodyMargin=document.body.style.margin,document.body.style.margin="0",this.fullScreenTempVars.width=s.style.width,this.fullScreenTempVars.height=s.style.height||s.clientHeight,window.self!==window.top&&this.requestFullScreen(document.body)},c.prototype.setNormalMode=function(){this.cancelFullScreen(document);var s=this.getMainElement();T.AttrUtils.restoreElementStyleAttribute(s,"left"),T.AttrUtils.restoreElementStyleAttribute(s,"top"),T.AttrUtils.restoreElementStyleAttribute(s,"background-color"),T.AttrUtils.restoreElementStyleAttribute(document.documentElement,"overflow"),T.AttrUtils.restoreElementStyleAttribute(document.documentElement,"position"),T.AttrUtils.restoreElementStyleAttribute(s,"z-index"),document.body.style.margin=this.fullScreenTempVars.bodyMargin,T.AttrUtils.restoreElementStyleAttribute(s,"position"),T.AttrUtils.restoreElementStyleAttribute(s,"border-top-width"),T.AttrUtils.restoreElementStyleAttribute(s,"border-left-width"),T.AttrUtils.restoreElementStyleAttribute(s,"border-right-width"),T.AttrUtils.restoreElementStyleAttribute(s,"border-bottom-width"),this.setHeight(this.fullScreenTempVars.height),this.setWidth(this.fullScreenTempVars.width),document.documentElement.scrollTop=this.fullScreenTempVars.scrollTop,document.documentElement.scrollLeft=this.fullScreenTempVars.scrollLeft,this.adjustControl()},c.prototype.adjustControlInFullScreenMode=function(){var s=0==document.documentElement.clientWidth?document.body.clientWidth:document.documentElement.clientWidth,a=0==document.documentElement.clientHeight?document.body.clientHeight:document.documentElement.clientHeight;this.setWidth(s),this.setHeight(a),this.adjustControl()},c.prototype.requestFullScreen=function(s){s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen&&s.msRequestFullscreen()},c.prototype.cancelFullScreen=function(s){S.Browser.Firefox&&!this.getFullScreenElement(s)||(s.webkitExitFullscreen?s.webkitExitFullscreen():s.mozCancelFullScreen?s.mozCancelFullScreen():s.msExitFullscreen?s.msExitFullscreen():s.exitFullscreen&&s.exitFullscreen())},c.prototype.getFullScreenElement=function(s){return s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement},c.prototype.setWidth=function(s){this.getMainElement().style.width=this.isNumber(s)?s+"px":s},c.prototype.setHeight=function(s){this.getMainElement().style.height=this.isNumber(s)?s+"px":s},c.prototype.isNumber=function(s){return!isNaN(parseFloat(s))&&isFinite(s)},c}();b.FullScreenModeHelper=d},1391:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GridElementInfo=void 0;var S=f(8900),T=f(6353),y=f(3604),d=function(){function c(s,a,u){this.id=c.id++,this.position=new S.Point(void 0,void 0),this.size=new T.Size(0,0),this.margins=new y.Margins(void 0,void 0,void 0,void 0),this.attr={},this.style={},this.additionalInfo={},s&&(this.className=s),a&&this.setPosition(a),u&&this.setSize(u)}return c.prototype.setSize=function(s){this.size.width=s.width,this.size.height=s.height},c.prototype.setPosition=function(s){this.position.x=s.x,this.position.y=s.y},c.prototype.assignToElement=function(s){this.assignPosition(s),this.assignSize(s),this.assignMargins(s),this.className&&(s.className=this.className)},c.prototype.assignPosition=function(s){null!=this.position.x&&(s.style.left=this.position.x+"px"),null!=this.position.y&&(s.style.top=this.position.y+"px")},c.prototype.assignSize=function(s){this.size.width&&(s.style.width=this.size.width+"px"),this.size.height&&(s.style.height=this.size.height+"px")},c.prototype.assignMargins=function(s){this.margins.left&&(s.style.marginLeft=this.margins.left+"px"),this.margins.top&&(s.style.marginTop=this.margins.top+"px"),this.margins.right&&(s.style.marginRight=this.margins.right+"px"),this.margins.bottom&&(s.style.marginBottom=this.margins.bottom+"px")},c.prototype.setAttribute=function(s,a){this.attr[s]=a},c.id=0,c}();b.GridElementInfo=d},1855:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.GridLayoutCalculator=void 0;var S=f(6353),T=f(858),y=f(2449),d=f(1391),c=f(8900),s=f(9201),a=f(1442),u=f(5950),h=f(7072),g=f(2491),_=function(){function x(){this.tileToDependencyMap=[],this.tileToNoWorkingIntervalsMap=[],this.minLineLength=10,this.resourceMaxWidth=500,this.minTaskWidth=2,this._taskWrapperPoints=Array(),this._taskElementInfoList=Array(),this._scaleCalculator=new h.ScaleCalculator}return x.prototype.setSettings=function(w,D,C,I,L,N,G,k){void 0===G&&(G=0),void 0===k&&(k=0),this.visibleTaskAreaSize=w,this.tickSize=D,this._viewType=N,this.range=I,this.verticalTickCount=L.itemCount,this.viewModel=L,this.elementSizeValues=C,this.taskHeight=C.taskHeight,this.parentTaskHeight=C.parentTaskHeight,this.milestoneWidth=C.milestoneWidth,this.scaleHeight=C.scaleItemHeight,this.arrowSize=new S.Size(C.connectorArrowWidth,C.connectorArrowWidth),this.lineThickness=C.connectorLineThickness,this.minConnectorSpaceFromTask=(this.tickSize.height-this.taskHeight)/2,this.tickTimeSpan=s.DateUtils.getTickTimeSpan(N),this.scrollBarHeight=G,this.createTileToNonWorkingIntervalsMap(),this._scaleCalculator.setSettings(I,N,D,k),this.reset()},Object.defineProperty(x.prototype,"viewType",{get:function(){return this._viewType},set:function(w){this._viewType!==w&&(this._viewType=w,this._scaleCalculator.setViewType(w))},enumerable:!1,configurable:!0}),x.prototype.reset=function(){this._taskWrapperPoints=new Array,this._taskElementInfoList=Array()},x.prototype.resetTaskInfo=function(w){delete this._taskWrapperPoints[w],delete this._taskElementInfoList[w]},x.prototype.getTaskAreaBorderInfo=function(w,D){var C=D?this.getVerticalGridLineHeight():this.getTotalWidth();return this.getGridBorderInfo(w,D,C)},x.prototype.getTotalWidth=function(){return this._scaleCalculator.scaleWidth},x.prototype.getScaleBorderInfo=function(w,D){var C=new d.GridElementInfo;return C.setPosition(new c.Point(this._scaleCalculator.getScaleBorderPosition(w,D),void 0)),C.setSize(new S.Size(0,this.scaleHeight)),C.className="dx-gantt-vb",C},x.prototype.getGridBorderInfo=function(w,D,C){var I=new d.GridElementInfo;return I.setPosition(this.getGridBorderPosition(w,D)),C&&I.setSize(this.getGridBorderSize(D,C)),I.className=D?"dx-gantt-vb":"dx-gantt-hb",I},x.prototype.getGridBorderPosition=function(w,D){var C=new c.Point(void 0,void 0),L=D?this._scaleCalculator.getScaleBorderPosition(w,this.viewType):(w+1)*this.tickSize.height;return D?C.x=L:C.y=L,C},x.prototype.getGridBorderSize=function(w,D){var C=new S.Size(0,0);return w?C.height=D:C.width=D,C},x.prototype.getScaleElementInfo=function(w,D){var C=new d.GridElementInfo,I=this.getScaleItemInfo(w,D);if(I){C.setPosition(I.position),C.setSize(I.size),C.className=this.getScaleItemClassName(D,C,this.getRenderedNoWorkingIntervals(C.position.x));var L=this._scaleCalculator.getScaleItems(D);(0===w||w===L.length-1)&&(C.style.overflowX="hidden",C.style.textOverflow="ellipsis"),C.additionalInfo.range=new T.DateRange(I.start,I.end)}return C},x.prototype.getScaleItemStart=function(w,D){return this._scaleCalculator.getScaleItemAdjustedStart(w,D)},x.prototype.getScaleItemClassName=function(w,D,C){var I="dx-gantt-si";return w.valueOf()==this.viewType.valueOf()&&this.isScaleItemInsideNoWorkingInterval(D,C)&&(I+=" dx-gantt-holiday-scaleItem"),I},x.prototype.getScaleItemInfo=function(w,D){return this._scaleCalculator.getScaleItem(w,D)},x.prototype.getScaleRangesInArea=function(w,D){var C=s.DateUtils.ViewTypeToScaleMap[this.viewType],I=this._scaleCalculator,L=Math.max(I.getScaleIndexByPos(w,C),0),N=I.getScaleIndexByPos(D,C);-1===N&&(N=I.topScaleItems.length-1);var G=Math.max(I.getScaleIndexByPos(w),0),k=I.getScaleIndexByPos(D);return-1===k&&(k=I.bottomScaleItems.length-1),[[L,N],[G,k]]},x.prototype.isScaleItemInsideNoWorkingInterval=function(w,D){for(var C=w.position.x,I=w.position.x+w.size.width,L=0;L<D.length;L++)if(C>=D[L].position.x&&I<=D[L].position.x+D[L].size.width)return!0;return!1},x.prototype.getScaleItemColSpan=function(w){return this._scaleCalculator.getScaleItemColSpan(w)},x.prototype.getTaskWrapperElementInfo=function(w){var D=new d.GridElementInfo;return D.className=this.getTaskWrapperClassName(w),D.setPosition(this.getTaskWrapperPoint(w)),D.setAttribute("task-index",w),D},x.prototype.getTaskWrapperClassName=function(w){var D="dx-gantt-taskWrapper",C=this.getViewItem(w);return C.task.isMilestone()&&!C.isCustom&&(D="dx-gantt-milestoneWrapper"),C.selected&&(D+=" dx-gantt-selectedTask"),D},x.prototype.getTaskWrapperPoint=function(w){if(!(0,g.isDefined)(this._taskWrapperPoints[w])){var D=this.getViewItem(w),C=this.getTaskHeight(w),I=w*this.tickSize.height+(this.tickSize.height-C)/2,L=new c.Point(this.getPosByDate(D.task.start),I);D.task.isMilestone()&&!D.isCustom&&(L.x-=C/2),this._taskWrapperPoints[w]=L}return this._taskWrapperPoints[w].clone()},x.prototype.getTaskElementInfo=function(w,D){if(void 0===D&&(D=!1),!(0,g.isDefined)(this._taskElementInfoList[w])){var C=new d.GridElementInfo,I=this.getTask(w),L=this.viewModel.parentAutoCalc&&this.viewModel.taskHasChildrenByIndex(w);if(!I.isMilestone()){var N=this.getTaskWidth(w);C.size.width=this.getCorrectedTaskWidthByRange(w,N),C.size.width<N&&(C.additionalInfo.taskCut=!0),D&&(C.size.height=this.getTaskHeight(w))}C.className=this.getTaskClassName(w,C.size.width),I.color&&(C.style.backgroundColor=I.color,L&&(C.style.borderLeftColor=I.color,C.style.borderRightColor=I.color,C.style.borderTopColor=I.color)),this._taskElementInfoList[w]=C}return this._taskElementInfoList[w]},x.prototype.getTaskClassName=function(w,D){var C=x.taskClassName,I=this.getViewItem(w),L=this.viewModel.parentAutoCalc&&this.viewModel.taskHasChildrenByIndex(w);return I.task.isMilestone()&&!I.isCustom?C+=" "+x.milestoneClassName:(D<=this.elementSizeValues.smallTaskWidth&&(C+=" "+x.smallTaskClassName),L&&(C+=this.getAutoCalcParentTaskClassName(I.task))),C},x.prototype.getAutoCalcParentTaskClassName=function(w){var D=" "+x.parentTaskClassName;return 0==w.progress&&(D+=" dx-gantt-noPrg"),w.progress>=100&&(D+=" dx-gantt-cmpl"),D},x.prototype.getTaskPoint=function(w){var D=this.getTaskWrapperPoint(w);return this.getTask(w).isMilestone()||(D.y+=this.elementSizeValues.taskWrapperTopPadding),D},x.prototype.getTaskSize=function(w){return new S.Size(this.getTaskWidth(w),this.getTaskHeight(w))},x.prototype.getTaskWidth=function(w){var D=this.getViewItem(w);return D.isCustom&&D.size.width?D.size.width:D.task.isMilestone()&&!D.isCustom?this.getTaskHeight(w):Math.max(this.getWidthByDateRange(D.task.start,D.task.end),this.minTaskWidth)},x.prototype.getTaskHeight=function(w){var D=this.getViewItem(w);return D.task.isMilestone()&&!D.isCustom?this.milestoneWidth:this.viewModel.isTaskToCalculateByChildren(D.task.internalId)?this.parentTaskHeight:D.isCustom&&D.size.height?D.size.height:this.taskHeight},x.prototype.getTask=function(w){var D=this.getViewItem(w);return D?.task},x.prototype.getViewItem=function(w){return this.viewModel.items[w]},x.prototype.getTaskProgressElementInfo=function(w){var D=new d.GridElementInfo;return D.className=x.taskProgressClassName,D.setSize(this.getTaskProgressSize(w)),D},x.prototype.getTaskProgressSize=function(w){var D=this.getTaskProgressWidth(w);return this.isTaskCutByRange(w)&&(D=this.getCorrectedTaskWidthByRange(w,D)),new S.Size(D,0)},x.prototype.getTaskProgressWidth=function(w){return this.getTaskWidth(w)*this.getTask(w).normalizedProgress/100},x.prototype.getTaskTextElementInfo=function(w,D){var C=new d.GridElementInfo;if(C.className=this.getTaskTextElementClassName(D),!D){var I=this.getTaskPoint(w).x;if(I<this.elementSizeValues.outsideTaskTextDefaultWidth){var L=Math.max(I,0);C.size.width=L,L>0?C.margins.left=-L:C.additionalInfo.hidden=!0}}return C},x.prototype.getTaskTextElementClassName=function(w){return x.taskTitleClassName.concat(" ",w?x.titleInClassName:x.titleOutClassName)},x.prototype.getTaskResourcesWrapperElementInfo=function(w){var D=new d.GridElementInfo,C=this.getTaskSize(w).width;return D.className="dx-gantt-taskResWrapper",D.setPosition(this.getTaskWrapperPoint(w)),D.position.x=D.position.x+C,D},x.prototype.getTaskResourceElementInfo=function(){var w=new d.GridElementInfo;return w.className=x.taskResourceClassName,w},x.prototype.getSelectionElementInfo=function(w){return this.getRowElementInfo(w,"dx-gantt-sel")},x.prototype.getSelectionPosition=function(w){var D=new c.Point(void 0,void 0);return D.y=w*this.tickSize.height,D},x.prototype.getSelectionSize=function(){return new S.Size(this.getTotalWidth(),this.tickSize.height)},x.prototype.getHighlightRowInfo=function(w){return this.getRowElementInfo(w,"dx-gantt-altRow")},x.prototype.getRowElementInfo=function(w,D){var C=new d.GridElementInfo;return C.className=D,C.setPosition(this.getSelectionPosition(w)),C.setSize(this.getSelectionSize()),C},x.prototype.getNoWorkingIntervalInfo=function(w){var D=new d.GridElementInfo;return D.className="dx-gantt-nwi",D.setPosition(this.getNoWorkingIntervalPosition(w.start)),D.setSize(this.getNoWorkingIntervalSize(w)),D},x.prototype.getNoWorkingIntervalPosition=function(w){var D=new c.Point(void 0,void 0);return D.x=this.getPosByDate(w),D},x.prototype.getNoWorkingIntervalSize=function(w){return new S.Size(this.getWidthByDateRange(w.start,w.end),this.getVerticalGridLineHeight())},x.prototype.getVerticalGridLineHeight=function(){return Math.max(this.visibleTaskAreaSize.height-this.scrollBarHeight,this.tickSize.height*this.verticalTickCount)},x.prototype.getConnectorInfo=function(w,D,C,I){for(var L=new Array,N=this.getConnectorPoints(D,C,I),G=0;G<N.length-1;G++)L.push(this.getConnectorLineInfo(w,N[G],N[G+1],0==G||G==N.length-2));return L.push(this.getArrowInfo(w,N,L,D,C)),this.checkAndCorrectConnectorLinesByRange(L),L.filter(function(k){return!!k})},x.prototype.getConnectorLineInfo=function(w,D,C,I){var L=new d.GridElementInfo,N=D.x==C.x;return L.className=this.getConnectorClassName(N),L.setPosition(this.getConnectorPosition(D,C)),L.setSize(this.getConnectorSize(D,C,N,I)),L.setAttribute("dependency-id",w),L},x.prototype.getConnectorClassName=function(w){return w?x.CLASSNAMES.CONNECTOR_VERTICAL:x.CLASSNAMES.CONNECTOR_HORIZONTAL},x.prototype.getConnectorPosition=function(w,D){return new c.Point(Math.min(w.x,D.x),Math.min(w.y,D.y))},x.prototype.getConnectorSize=function(w,D,C,I){var L=new S.Size(0,0),N=I?0:1;return C?L.height=Math.abs(D.y-w.y)+N:L.width=Math.abs(D.x-w.x)+N,L},x.prototype.getArrowInfo=function(w,D,C,I,L){var N=new d.GridElementInfo,G=this.findArrowLineInfo(C,I,L),k=this.getArrowPosition(D,I,L);return N.className=this.getArrowClassName(k),N.setPosition(this.getArrowPoint(G,k)),N.setAttribute("dependency-id",w),N},x.prototype.findArrowLineInfo=function(w,D,C){return w[D<C?w.length-1:0]},x.prototype.getArrowPosition=function(w,D,C){var I=w[D<C?w.length-2:1],L=w[D<C?w.length-1:0];return I.x==L.x?I.y>L.y?y.Position.Top:y.Position.Bottom:I.x>L.x?y.Position.Left:y.Position.Right},x.prototype.getArrowClassName=function(w){var D=x.arrowClassName;switch(w){case y.Position.Left:D=D.concat(" ",x.leftArrowClassName);break;case y.Position.Top:D=D.concat(" ",x.topArrowClassName);break;case y.Position.Right:D=D.concat(" ",x.rightArrowClassName);break;case y.Position.Bottom:D=D.concat(" ",x.bottomArrowClassName)}return D},x.prototype.getArrowPositionByClassName=function(w){return w.indexOf(x.leftArrowClassName)>-1?y.Position.Left:w.indexOf(x.topArrowClassName)>-1?y.Position.Top:w.indexOf(x.rightArrowClassName)>-1?y.Position.Right:w.indexOf(x.bottomArrowClassName)>-1?y.Position.Bottom:void 0},x.prototype.getArrowPoint=function(w,D){return new c.Point(this.getArrowX(w,D),this.getArrowY(w,D))},x.prototype.getArrowX=function(w,D){switch(D){case y.Position.Left:return w.position.x-this.arrowSize.width/2;case y.Position.Right:return w.position.x+w.size.width-this.arrowSize.width/2;case y.Position.Top:case y.Position.Bottom:return w.position.x-(this.arrowSize.width-this.lineThickness)/2}},x.prototype.getArrowY=function(w,D){switch(D){case y.Position.Top:return w.position.y-this.arrowSize.height/2;case y.Position.Bottom:return w.position.y+w.size.height-this.arrowSize.height/2;case y.Position.Left:case y.Position.Right:return w.position.y-(this.arrowSize.height-this.lineThickness)/2}},x.prototype.getPosByDate=function(w){return this.getWidthByDateRange(this.range.start,w)},x.prototype.getWidthByDateRange=function(w,D){return s.DateUtils.getRangeTickCount(w,D,this.viewType)*this.tickSize.width},x.prototype.getDateByPos=function(w){if(this.viewType===y.ViewType.Months||this.viewType===y.ViewType.Quarter)return this.getDateByPosInMonthBasedViewTypes(w);var D=w/this.tickSize.width,C=new Date(this.range.start);return s.DateUtils.getDSTCorrectedTaskEnd(C,D*this.tickTimeSpan)},x.prototype.getDateByPosInMonthBasedViewTypes=function(w){return this._scaleCalculator.getDateInScale(w)},x.prototype.getConnectorPoints=function(w,D,C){switch(C){case u.DependencyType.FS:return this.getFinishToStartConnectorPoints(w,D);case u.DependencyType.SF:return this.getStartToFinishConnectorPoints(w,D);case u.DependencyType.SS:return this.getStartToStartConnectorPoints(w,D);case u.DependencyType.FF:return this.getFinishToFinishConnectorPoints(w,D);default:return new Array}},x.prototype.getFinishToStartConnectorPoints=function(w,D){return w<D?this.getTask(w).end<=this.getTask(D).start?this.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskTopSide(w,D,!1):this.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskLeftSide(w,D,!1):this.getTask(w).end<=this.getTask(D).start?this.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskRightSide(D,w,!1):this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskRightSide(D,w,!0)},x.prototype.getFinishToFinishConnectorPoints=function(w,D){return w<D?this.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskRightSide(w,D):this.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskRightSide(D,w)},x.prototype.getStartToStartConnectorPoints=function(w,D){return w<D?this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskLeftSide(w,D):this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskLeftSide(D,w)},x.prototype.getStartToFinishConnectorPoints=function(w,D){return w<D?this.getTask(w).start>=this.getTask(D).end?this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskTopSide(w,D,!0):this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskRightSide(w,D,!1):this.getTask(w).start>=this.getTask(D).end?this.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskLeftSide(D,w,!0):this.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskLeftSide(D,w,!0)},x.prototype.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskTopSide=function(w,D,C){var I=new Array,L=this.getTaskPoint(w),N=this.getTaskPoint(D),G=this.getTaskRightCenter(L,w),k=this.getTask(D).isMilestone(),U=this.getTaskTopCenter(N,D),B=this.getHorizontalIndentFromTaskEdge(D,C);return I.push(new c.Point(Math.floor(G.x),Math.floor(G.y))),I.push(new c.Point(Math.floor(k?U.x:N.x+B),Math.floor(I[0].y))),I.push(new c.Point(Math.floor(I[1].x),Math.floor(U.y))),I},x.prototype.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskRightSide=function(w,D){var C=new Array,I=this.getTaskPoint(w),L=this.getTaskPoint(D),N=this.getTaskRightCenter(I,w),G=this.getTaskRightCenter(L,D);return C.push(new c.Point(Math.floor(N.x),Math.floor(N.y))),C.push(new c.Point(Math.floor(Math.max(N.x,G.x)+this.minLineLength),Math.floor(C[0].y))),C.push(new c.Point(Math.floor(C[1].x),Math.floor(G.y))),C.push(new c.Point(Math.floor(G.x),Math.floor(G.y))),C},x.prototype.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskLeftSide=function(w,D,C){var I=new Array,L=this.getTaskPoint(w),N=this.getTaskPoint(D),G=this.getTaskRightCenter(L,w),k=this.getTaskBottomCenter(L,w),U=this.getTaskLeftCenter(N,D),B=this.getTaskTopCenter(N,D),K=this.getViewItem(C?w:D),J=K.isCustom?(this.tickSize.height-K.size.height)/2:this.minConnectorSpaceFromTask;return I.push(new c.Point(Math.floor(G.x),Math.floor(G.y))),I.push(new c.Point(Math.floor(I[0].x+this.minLineLength),Math.floor(I[0].y))),I.push(new c.Point(Math.floor(I[1].x),Math.floor(C?k.y+J:B.y-J))),I.push(new c.Point(Math.floor(U.x-this.minLineLength),Math.floor(I[2].y))),I.push(new c.Point(Math.floor(I[3].x),Math.floor(U.y))),I.push(new c.Point(Math.floor(U.x),Math.floor(U.y))),I},x.prototype.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskRightSide=function(w,D,C){var I=new Array,L=this.getTaskPoint(w),N=this.getTaskPoint(D),G=this.getTaskBottomCenter(L,w),k=this.getTask(w).isMilestone(),U=this.getTaskRightCenter(N,D),B=this.getHorizontalIndentFromTaskEdge(w,C);return I.push(new c.Point(Math.floor(k?G.x:L.x+B),Math.floor(G.y))),I.push(new c.Point(Math.floor(I[0].x),Math.floor(U.y))),I.push(new c.Point(Math.floor(U.x),Math.floor(U.y))),I},x.prototype.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskLeftSide=function(w,D,C){var I=new Array,L=this.getTaskPoint(w),N=this.getTaskPoint(D),G=this.getTaskBottomCenter(L,w),k=this.getTask(w).isMilestone(),U=this.getTaskLeftCenter(N,D),B=this.getHorizontalIndentFromTaskEdge(w,C);return I.push(new c.Point(Math.floor(k?G.x:L.x+B),Math.floor(G.y))),I.push(new c.Point(Math.floor(I[0].x),Math.floor(U.y))),I.push(new c.Point(Math.floor(U.x),Math.floor(U.y))),I},x.prototype.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskTopSide=function(w,D,C){var I=new Array,L=this.getTaskPoint(w),N=this.getTaskPoint(D),G=this.getTaskLeftCenter(L,w),k=this.getTaskTopCenter(N,D),U=this.getTask(D).isMilestone(),B=this.getHorizontalIndentFromTaskEdge(D,C);return I.push(new c.Point(Math.floor(G.x),Math.floor(G.y))),I.push(new c.Point(Math.floor(U?k.x:N.x+B),Math.floor(I[0].y))),I.push(new c.Point(Math.floor(I[1].x),Math.floor(k.y))),I},x.prototype.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskRightSide=function(w,D,C){var I=new Array,L=this.getTaskPoint(w),N=this.getTaskPoint(D),G=this.getTaskLeftCenter(L,w),k=this.getTaskBottomCenter(L,w),U=this.getTaskRightCenter(N,D),B=this.getTaskTopCenter(N,D),K=this.getViewItem(C?w:D),J=K.isCustom?(this.tickSize.height-K.size.height)/2:this.minConnectorSpaceFromTask;return I.push(new c.Point(Math.floor(G.x),G.y)),I.push(new c.Point(Math.floor(I[0].x-this.minLineLength),I[0].y)),I.push(new c.Point(Math.floor(I[1].x),Math.floor(C?k.y+J:B.y-J))),I.push(new c.Point(Math.floor(U.x+this.minLineLength),Math.floor(I[2].y))),I.push(new c.Point(Math.floor(I[3].x),Math.floor(U.y))),I.push(new c.Point(Math.floor(U.x),Math.floor(U.y))),I},x.prototype.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskLeftSide=function(w,D){var C=new Array,I=this.getTaskPoint(w),L=this.getTaskPoint(D),N=this.getTaskLeftCenter(I,w),G=this.getTaskLeftCenter(L,D);return C.push(new c.Point(Math.floor(N.x),Math.floor(N.y))),C.push(new c.Point(Math.floor(Math.min(N.x,G.x)-this.minLineLength),Math.floor(C[0].y))),C.push(new c.Point(Math.floor(C[1].x),Math.floor(G.y))),C.push(new c.Point(Math.floor(G.x),Math.floor(G.y))),C},x.prototype.getTaskSidePoints=function(w){var D=this.getTaskPoint(w);return[this.getTaskLeftCenter(D,w),this.getTaskTopCenter(D,w),this.getTaskRightCenter(D,w),this.getTaskBottomCenter(D,w)]},x.prototype.getTaskLeftCenter=function(w,D){return new c.Point(w.x-this.getTaskEdgeCorrection(D),w.y+this.getTaskHeight(D)/2)},x.prototype.getTaskRightCenter=function(w,D){return new c.Point(w.x+this.getTaskWidth(D)+this.getTaskEdgeCorrection(D),w.y+this.getTaskHeight(D)/2)},x.prototype.getTaskTopCenter=function(w,D){return new c.Point(w.x+this.getTaskWidth(D)/2,w.y-this.getTaskEdgeCorrection(D))},x.prototype.getTaskBottomCenter=function(w,D){return new c.Point(w.x+this.getTaskWidth(D)/2,w.y+this.getTaskHeight(D)+this.getTaskEdgeCorrection(D))},x.prototype.getTaskEdgeCorrection=function(w){var D=this.getViewItem(w);return D.task.isMilestone()&&!D.isCustom?this.getTaskHeight(w)*(Math.sqrt(2)-1)/2:0},x.prototype.getHorizontalIndentFromTaskEdge=function(w,D){void 0===D&&(D=!1);var C=this.getTaskWidth(w),I=this.minLineLength<C/3?this.minLineLength:.2*C;return D?C-I:I},x.prototype.getRenderedRowColumnIndices=function(w,D){for(var C=D?this.visibleTaskAreaSize.height:this.visibleTaskAreaSize.width,I=D?this.getFirstVisibleGridCellIndex(w,this.tickSize.height):this.getFirstScaleVisibleIndex(w),L=D?this.getLastVisibleGridCellIndex(w,this.tickSize.height,C,this.verticalTickCount):this.getLastScaleVisibleIndex(w),N=new Array,G=I;G<=L;G++)N.push(G);return N},x.prototype.getRenderedScaleItemIndices=function(w,D){for(var C=w===this.viewType,I=this._scaleCalculator,L=D[0],N=D[D.length-1],G=C?L:I.getTopScaleIndexByBottomIndex(L),k=C?N:I.getTopScaleIndexByBottomIndex(N),U=new Array,B=G;B<=k;B++)U.push(B);return U},x.prototype.getFirstScaleVisibleIndex=function(w){return this._scaleCalculator.getFirstScaleIndexForRender(w)},x.prototype.getLastScaleVisibleIndex=function(w){return this._scaleCalculator.getLastScaleIndexForRender(w+this.visibleTaskAreaSize.width)},x.prototype.getFirstVisibleGridCellIndex=function(w,D){var C=Math.floor(w/D);return Math.max(C-10,0)},x.prototype.getLastVisibleGridCellIndex=function(w,D,C,I){var L=Math.floor((w+C)/D);return Math.min(L+10,I-1)},x.prototype.createTileToConnectorLinesMap=function(){this.tileToDependencyMap=[];for(var w=0;w<this.viewModel.items.length;w++)for(var D=0;D<this.viewModel.items[w].dependencies.length;D++)this.createConnecotInfo(this.viewModel.items[w].dependencies[D],this.viewModel.items[w].visibleIndex)},x.prototype.updateTileToConnectorLinesMap=function(w){this.tileToDependencyMap.forEach(function(L,N,G){G[N]=L.filter(function(k){return k.attr["dependency-id"]!=w})});var D=[],C=this.viewModel.items.filter(function(L){return L.dependencies.filter(function(N){return N.id==w}).length>0})[0];if(C){var I=C.dependencies.filter(function(L){return L.id===w})[0];D=this.createConnecotInfo(I,C.visibleIndex)}return D},x.prototype.createConnecotInfo=function(w,D){var C=this,G=this.getConnectorInfo(w.id,w.predecessor.visibleIndex,D,w.type);return G.forEach(function(k){C.addElementInfoToTileMap(k,C.tileToDependencyMap,!0)}),G},x.prototype.createTileToNonWorkingIntervalsMap=function(){this.tileToNoWorkingIntervalsMap=[];for(var w=0;w<this.viewModel.noWorkingIntervals.length;w++){var D=this.getAdjustedNoWorkingInterval(this.viewModel.noWorkingIntervals[w]);if(D){var C=this.getNoWorkingIntervalInfo(D);this.addElementInfoToTileMap(C,this.tileToNoWorkingIntervalsMap,!1)}}},x.prototype.getAdjustedNoWorkingInterval=function(w){return w.end.getTime()-w.start.getTime()<this.tickTimeSpan-1?null:new T.DateRange(s.DateUtils.getNearestScaleTickDate(w.start,this.range,this.tickTimeSpan,this.viewType),s.DateUtils.getNearestScaleTickDate(w.end,this.range,this.tickTimeSpan,this.viewType))},x.prototype.addElementInfoToTileMap=function(w,D,C){var I=C?w.position.y:w.position.x,L=C?w.size.height:w.size.width,N=2*(C?this.visibleTaskAreaSize.height:this.visibleTaskAreaSize.width);if(N>0)for(var G=Math.floor(I/N),k=Math.floor((I+L)/N),U=G;U<=k;U++)D[U]||(D[U]=new Array),D[U].push(w)},x.prototype.getRenderedConnectorLines=function(w){return this.getElementsInRenderedTiles(this.tileToDependencyMap,!0,w)},x.prototype.getRenderedNoWorkingIntervals=function(w){return this.getElementsInRenderedTiles(this.tileToNoWorkingIntervalsMap,!1,w)},x.prototype.getRenderedStripLines=function(w){var D=new Array,C=w.stripLines.map(function(B){return B.clone()});w.showCurrentTime&&C.push(new a.StripLine(new Date,null,w.currentTimeTitle,w.currentTimeCssClass,!0));for(var I=0,L=void 0;L=C[I];I++){var N=s.DateUtils.parse(L.start),G=L.end?s.DateUtils.parse(L.end):null;if(N>=this.range.start&&N<=this.range.end||G&&G>=this.range.start&&G<=this.range.end){var k=N>this.range.start?N:this.range.start,U=new d.GridElementInfo;U.size.height=this.getVerticalGridLineHeight(),U.position.x=this.getPosByDate(k),U.size.width=G?this.getWidthByDateRange(k,G<this.range.end?G:this.range.end):0,U.className=L.isCurrent?"dx-gantt-tc":G?"dx-gantt-ti":"dx-gantt-tm",U.className+=L.cssClass?" "+L.cssClass:"",U.attr.title=L.title,D.push(U)}}return D},x.prototype.getElementsInRenderedTiles=function(w,D,C){var I=new Array,L=D?this.visibleTaskAreaSize.height:this.visibleTaskAreaSize.width;if(L>0)for(var N=Math.floor(C/(2*L)),G=Math.floor((C+L)/(2*L)),k=N;k<=G;k++)w[k]&&w[k].forEach(function(U){-1===I.indexOf(U)&&I.push(U)});return I},x.prototype.isTaskInRenderedRange=function(w){var D=this.getViewItem(w),C=this.getTaskPoint(w);return D.task.isMilestone()?C.x+this.getTaskWidth(w)<this.getTotalWidth():C.x<this.getTotalWidth()},x.prototype.isTaskCutByRange=function(w){return!!this.getTaskElementInfo(w).additionalInfo.taskCut},x.prototype.checkAndCorrectElementDisplayByRange=function(w){w.parentElement.offsetLeft+w.offsetLeft+w.offsetWidth>this.getTotalWidth()&&(w.style.display="none")},x.prototype.checkAndCorrectArrowElementDisplayByRange=function(w){w.offsetLeft+w.offsetWidth>this.getTotalWidth()&&(w.style.display="none")},x.prototype.checkAndCorrectConnectorLinesByRange=function(w){if(w?.length)for(var D=this.getTotalWidth(),C=0;C<w.length;C++){var I=w[C],L=!I.size.width;I.position.x>D?delete w[C]:!L&&I.position.x+I.size.width>D&&(I.size.width=D-I.position.x)}},x.prototype.getCorrectedTaskWidthByRange=function(w,D){var C=this.getTotalWidth()-this.getTaskPoint(w).x;return Math.min(C,D)},x.taskClassName=(x.dxGanttPrefix="dx-gantt-")+"task",x.milestoneClassName=x.dxGanttPrefix+"milestone",x.smallTaskClassName=x.dxGanttPrefix+"smallTask",x.parentTaskClassName=x.dxGanttPrefix+"parent",x.taskProgressClassName=x.dxGanttPrefix+"tPrg",x.taskTitleClassName=x.dxGanttPrefix+"taskTitle",x.titleInClassName=x.dxGanttPrefix+"titleIn",x.titleOutClassName=x.dxGanttPrefix+"titleOut",x.taskResourceClassName=x.dxGanttPrefix+"taskRes",x.arrowClassName=x.dxGanttPrefix+"arrow",x.leftArrowClassName=x.dxGanttPrefix+"LA",x.topArrowClassName=x.dxGanttPrefix+"TA",x.rightArrowClassName=x.dxGanttPrefix+"RA",x.bottomArrowClassName=x.dxGanttPrefix+"BA",x.CLASSNAMES={CONNECTOR_VERTICAL:"dx-gantt-conn-v",CONNECTOR_HORIZONTAL:"dx-gantt-conn-h"},x}();b.GridLayoutCalculator=_},7072:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ScaleCalculator=b.ScaleItemInfo=void 0;var S=f(8900),T=f(6353),y=f(9201),d=f(2449),c=function(a,u,h,g){this.start=a,this.end=u,this.position=h,this.size=g};b.ScaleItemInfo=c;var s=function(){function a(){this.firstDayOfWeek=0}return a.prototype.setSettings=function(u,h,g,_){void 0===_&&(_=0),this.range=u,this.viewType=h,this.tickSize=g,this.firstDayOfWeek=_,this.reset()},a.prototype.setViewType=function(u){this.viewType=u,this.reset()},a.prototype.reset=function(){delete this._bottomScaleItems,delete this._topScaleItems,delete this._scaleWidth},a.prototype.getScaleIndexByPos=function(u,h){null!=h||(h=this.viewType);var g=h===this.viewType?this.bottomScaleItems:this.topScaleItems,_=-1;if(g.findIndex)_=g.findIndex(function(w){return u>=w.position.x&&u<=w.position.x+w.size.width});else{var x=g.filter(function(w){return u>=w.position.x&&u<=w.position.x+w.size.width})[0];x&&(_=g.indexOf(x))}return _},a.prototype.getScaleBorderPosition=function(u,h){var g=this.getScaleItems(h)[u];if(g)return g.position.x+g.size.width},a.prototype.getScaleItems=function(u){return u===this.viewType?this.bottomScaleItems:u===y.DateUtils.ViewTypeToScaleMap[this.viewType]?this.topScaleItems:null},a.prototype.getScaleItem=function(u,h){return this.getScaleItems(h)[u]},a.prototype.getScaleItemAdjustedStart=function(u,h){var g=this.getScaleItems(h)[u];if(u>0)return g.start;var _=h!==this.viewType,x=_?y.DateUtils.adjustStartDateByViewType(this.range.start,this.viewType,this.firstDayOfWeek):this.getAdjustedBottomScaleItemStart(g.start,h,this.firstDayOfWeek);if(_&&h===d.ViewType.Months){var w=this.range.start;x=new Date(w.getFullYear(),w.getMonth(),1)}if(_&&h===d.ViewType.FiveYears){var D=5*Math.trunc(x.getFullYear()/5);x=new Date(D,x.getMonth(),x.getDate())}return x},Object.defineProperty(a.prototype,"topScaleItems",{get:function(){var u;return null!==(u=this._topScaleItems)&&void 0!==u||(this._topScaleItems=this.calculateTopScale(y.DateUtils.ViewTypeToScaleMap[this.viewType])),this._topScaleItems},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"bottomScaleItems",{get:function(){var u;return null!==(u=this._bottomScaleItems)&&void 0!==u||(this._bottomScaleItems=this.calculateBottomScale(this.viewType)),this._bottomScaleItems},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"scaleWidth",{get:function(){var u;return null!==(u=this._scaleWidth)&&void 0!==u||(this._scaleWidth=this.calculateScaleWidth()),this._scaleWidth},enumerable:!1,configurable:!0}),a.prototype.getFirstScaleIndexForRender=function(u){var h=this.getScaleIndexByPos(u);return Math.max(h-10,0)},a.prototype.getLastScaleIndexForRender=function(u){var h=this.getScaleIndexByPos(u);return-1===h?this.bottomScaleItems.length-1:Math.min(h+10,this.bottomScaleItems.length-1)},a.prototype.getTopScaleIndexByBottomIndex=function(u){var h=this.bottomScaleItems[u];return h?this.getScaleIndexByPos(h.position.x,y.DateUtils.ViewTypeToScaleMap[this.viewType]):-1},a.prototype.calculateBottomScale=function(u){for(var h=new Array,g=this.tickSize.width,_=this.range.start,x=0;_.getTime()<this.range.end.getTime();){var w=this.getNextScaleDate(_,u),D=_.getTime()===this.range.start.getTime(),C=w.getTime()>=this.range.end.getTime(),I=D||C||u>d.ViewType.Hours&&y.DateUtils.hasDST()?this.getRangeTickCount(_,w)*g:g;h.push(new c(_,w,new S.Point(x,void 0),new T.Size(I,0))),_=w,x+=I}return h},a.prototype.calculateTopScale=function(u){for(var h=new Array,g=this.range.end.getTime(),_=this.range.start,x=0,w=0;_.getTime()<g;)for(var D=this.getNextScaleDate(_,u),C=D.getTime(),I=w;I<this.bottomScaleItems.length;I++){var L=this.bottomScaleItems[I],N=L.start.getTime(),G=L.end.getTime();if(C>=N&&C<=G){var k=(C-N)/(G-N)*L.size.width+L.position.x;h.push(new c(_,D,new S.Point(x,void 0),new T.Size(k-x,0))),w=I,x=k,_=D;break}}return h},a.prototype.getDateInScale=function(u){if(u<0){var h=u/this.tickSize.width,g=y.DateUtils.getTickTimeSpan(this.viewType);return new Date(this.range.start.getTime()+h*g)}for(var _=0;_<this.bottomScaleItems.length;_++){var x=this.bottomScaleItems[_],w=x.size.width,D=x.position.x;if(u>=D&&u<=D+w){var C=x.start.getTime();return h=(u-D)/w*(x.end.getTime()-C),new Date(x.start.getTime()+h)}}return new Date(this.range.end)},a.prototype.getNextScaleDate=function(u,h){var g;switch(h){case d.ViewType.TenMinutes:g=this.getNextDateInTenMinutesScale(u);break;case d.ViewType.Hours:g=this.getNextDateInHoursScale(u);break;case d.ViewType.SixHours:g=this.getNextDateInSixHoursScale(u);break;case d.ViewType.Days:g=this.getNextDateInDaysScale(u);break;case d.ViewType.Weeks:g=this.getNextDateInWeeksScale(u,this.firstDayOfWeek);break;case d.ViewType.Months:g=this.getNextDateInMonthsScale(u);break;case d.ViewType.Quarter:g=this.getNextDateInQuartersScale(u);break;case d.ViewType.Years:g=this.getNextDateInYearsScale(u);break;case d.ViewType.FiveYears:g=this.getNextDateInFiveYearsScale(u)}return g.getTime()>this.range.end.getTime()&&(g=this.range.end),g},a.prototype.getNextTimeBySpan=function(u,h){return(Math.trunc(u/h)+1)*h},a.prototype.getNextDateInTenMinutesScale=function(u){var h=this.getNextTimeBySpan(u.getMinutes(),10);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),h)},a.prototype.getNextDateInHoursScale=function(u){return new Date(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours()+1)},a.prototype.getNextDateInSixHoursScale=function(u){var h=this.getNextTimeBySpan(u.getHours(),6);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),h)},a.prototype.getNextDateInDaysScale=function(u){return new Date(u.getFullYear(),u.getMonth(),u.getDate()+1)},a.prototype.getNextDateInWeeksScale=function(u,h){return void 0===h&&(h=0),new Date(u.getFullYear(),u.getMonth(),u.getDate()-u.getDay()+h+7)},a.prototype.getNextDateInMonthsScale=function(u){return new Date(u.getFullYear(),u.getMonth()+1,1)},a.prototype.getNextDateInQuartersScale=function(u){var h=this.getNextTimeBySpan(u.getMonth(),3);return new Date(u.getFullYear(),h,1)},a.prototype.getNextDateInYearsScale=function(u){return new Date(u.getFullYear()+1,0,1)},a.prototype.getNextDateInFiveYearsScale=function(u){var h=this.getNextTimeBySpan(u.getFullYear(),5);return new Date(h,0,1)},a.prototype.getAdjustedBottomScaleItemStart=function(u,h,g){switch(void 0===g&&(g=0),h){case d.ViewType.TenMinutes:return new Date(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),10*Math.floor(u.getMinutes()/10));case d.ViewType.SixHours:return new Date(u.getFullYear(),u.getMonth(),u.getDate(),6*Math.floor(u.getHours()/6));case d.ViewType.Hours:return new Date(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours());case d.ViewType.Days:return new Date(u.getFullYear(),u.getMonth(),u.getDate());case d.ViewType.Weeks:return new Date(u.getFullYear(),u.getMonth(),u.getDate()-u.getDay()+g);case d.ViewType.Months:return new Date(u.getFullYear(),u.getMonth(),1);case d.ViewType.Quarter:return new Date(u.getFullYear(),3*Math.floor(u.getMonth()/3),1);case d.ViewType.Years:return new Date(u.getFullYear(),0,1);default:return new Date}},a.prototype.calculateScaleWidth=function(){return this.bottomScaleItems.reduce(function(u,h){return u+h.size.width},0)},a.prototype.getScaleItemColSpan=function(u){return u.valueOf()===this.viewType.valueOf()?1:this.viewType===d.ViewType.TenMinutes?6:this.viewType===d.ViewType.Hours?24:this.viewType===d.ViewType.SixHours?4:this.viewType===d.ViewType.Days?7:this.viewType===d.ViewType.Weeks?4.29:this.viewType===d.ViewType.Months?12:this.viewType===d.ViewType.Quarter?4:this.viewType===d.ViewType.Years?5:1},a.prototype.getRangeTickCount=function(u,h){return y.DateUtils.getRangeTickCount(u,h,this.viewType)},a}();b.ScaleCalculator=s},9377:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaContainer=void 0;var f=function(){function S(T,y){this.element=T,this.onScrollHandler=function(){y.updateView()},this.element.addEventListener("scroll",this.onScrollHandler)}return Object.defineProperty(S.prototype,"scrollTop",{get:function(){return this.element.scrollTop},set:function(T){this.element.scrollTop=T},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"scrollLeft",{get:function(){return this.element.scrollLeft},set:function(T){this.element.scrollLeft=T},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"scrollWidth",{get:function(){return this.element.scrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"scrollHeight",{get:function(){return this.element.scrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isExternal",{get:function(){return!1},enumerable:!1,configurable:!0}),S.prototype.getWidth=function(){return this.element.offsetWidth},S.prototype.getHeight=function(){return this.element.offsetHeight},S.prototype.getElement=function(){return this.element},S.prototype.detachEvents=function(){this.element.removeEventListener("scroll",this.onScrollHandler)},S}();b.TaskAreaContainer=f},6923:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ConnectorLinesRender=void 0;var S=f(658),T=f(1855),y=function(){function d(c){this._connectorLinesToElementsMap={},this._renderedConnectorLines=[],this._renderHelper=c}return Object.defineProperty(d.prototype,"taskEditController",{get:function(){return this._renderHelper.taskEditController},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskAreaContainerScrollTop",{get:function(){return this._renderHelper.ganttViewTaskAreaContainerScrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"connectorLinesToElementsMap",{get:function(){return this._connectorLinesToElementsMap},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"invalidTaskDependencies",{get:function(){return this._renderHelper.invalidTaskDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"showDependencies",{get:function(){return this._renderHelper.showDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"renderedConnectorLines",{get:function(){return this._renderedConnectorLines},enumerable:!1,configurable:!0}),d.prototype.reset=function(){this._connectorLinesToElementsMap={},this._renderedConnectorLines=[]},d.prototype.createConnectorLineElement=function(c){if(this.showDependencies){var s=c.attr["dependency-id"];if(!this.invalidTaskDependencies.some(function(h){return h.id==s})){this.taskEditController.isDependencySelected(s)&&(c.className=c.className+" active");var a=c.className.indexOf(T.GridLayoutCalculator.arrowClassName)>-1,u=S.RenderElementUtils.create(c,null,this.taskArea,this.connectorLinesToElementsMap);return a&&this.gridLayoutCalculator.checkAndCorrectArrowElementDisplayByRange(u),u}}},d.prototype.removeConnectorLineElement=function(c){S.RenderElementUtils.remove(c,null,this.taskArea,this.connectorLinesToElementsMap)},d.prototype.recreateConnectorLineElement=function(c,s){var a=this;void 0===s&&(s=!1);var u=[];this._renderedConnectorLines=this.renderedConnectorLines.filter(function(g){return g.attr["dependency-id"]!=c||(u.push(g),!1)});var h=u.length>0;u.forEach(function(g){a.removeConnectorLineElement(g)}),u=this.gridLayoutCalculator.updateTileToConnectorLinesMap(c),(h||s)&&u.forEach(function(g){a.createConnectorLineElement(g),a.renderedConnectorLines.push(g)})},d.prototype.recreateConnectorLineElements=function(){var c=this,s=this.gridLayoutCalculator.getRenderedConnectorLines(this.taskAreaContainerScrollTop);S.RenderElementUtils.recreate(this.renderedConnectorLines,s,function(a){c.removeConnectorLineElement(a)},function(a){c.createConnectorLineElement(a)}),this._renderedConnectorLines=s},d.prototype.updateRenderedConnectorLinesId=function(c,s){for(var a in this._renderedConnectorLines.forEach(function(h){h.attr["dependency-id"]===c&&(h.attr["dependency-id"]=s)}),this.connectorLinesToElementsMap)if(Object.prototype.hasOwnProperty.call(this.connectorLinesToElementsMap,a)){var u=this.connectorLinesToElementsMap[a];u.getAttribute("dependency-id")===c&&u.setAttribute("dependency-id",s)}this.gridLayoutCalculator.updateTileToConnectorLinesMap(c),this.gridLayoutCalculator.updateTileToConnectorLinesMap(s)},d}();b.ConnectorLinesRender=y},1419:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.CustomTaskRender=void 0;var S=f(2449),T=f(658),y=function(){function d(c,s){this._pendingTemplateFuncsToRender=[],this._renderHelper=c,this._taskRender=s}return Object.defineProperty(d.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"tickSize",{get:function(){return this._renderHelper.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskTitlePosition",{get:function(){return this._renderHelper.taskTitlePosition},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskElements",{get:function(){return this._taskRender.taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),d.prototype.getViewItem=function(c){return this._renderHelper.getViewItem(c)},d.prototype.getTask=function(c){return this._renderHelper.getTask(c)},d.prototype.destroyTemplate=function(c){this._renderHelper.destroyTemplate(c)},d.prototype.getTaskDependencies=function(c){return this._renderHelper.getTaskDependencies(c)},d.prototype.getTaskResources=function(c){return this._renderHelper.getTaskResources(c)},d.prototype.attachEventsOnTask=function(c){this._renderHelper.attachEventsOnTask(c)},d.prototype.recreateConnectorLineElement=function(c,s){void 0===s&&(s=!1),this._renderHelper.recreateConnectorLineElement(c,s)},d.prototype.createTaskSelectionElement=function(c){this._taskRender.createTaskSelectionElement(c)},d.prototype.createCustomTaskElement=function(c,s){if(this._saveTemplateFuncToStack(c,s),!this._hasRepeatedTemplateRenderCall(c)){var a=this.getViewItem(c);a.isCustom=!1;var u=document.createElement("DIV"),h=this.createCustomTaskInformation(c);a.isCustom=!0,s(u,h,this.onTaskTemplateContainerRendered.bind(this),c)}},d.prototype.onTaskTemplateContainerRendered=function(c,s){var a=this;if(this._hasRepeatedTemplateRenderCall(s)){c&&this._renderHelper.destroyTemplate(c);var u=this._getLastPendingTemplateFunc(s);setTimeout(function(){return a.createCustomTaskElement(s,u)})}else this.drawCustomTask(c,s);this._clearTemplateFuncsStack(s)},d.prototype._saveTemplateFuncToStack=function(c,s){var a,u;null!==(a=(u=this._pendingTemplateFuncsToRender)[c])&&void 0!==a||(u[c]=[]),this._pendingTemplateFuncsToRender[c].push(s)},d.prototype._clearTemplateFuncsStack=function(c){this._pendingTemplateFuncsToRender[c]=[]},d.prototype._hasRepeatedTemplateRenderCall=function(c){return this._pendingTemplateFuncsToRender[c].length>1},d.prototype._getLastPendingTemplateFunc=function(c){var s=this._pendingTemplateFuncsToRender[c];return s[s.length-1]},d.prototype.createCustomTaskWrapperElement=function(c,s){T.RenderElementUtils.create(s,c,this.taskArea,this.taskElements)},d.prototype.createCustomTaskVisualElement=function(c,s){return T.RenderElementUtils.create(s,c,this.taskElements[c])},d.prototype.drawCustomTask=function(c,s){var a=this;if(this.taskElements[s]){var u=this.getViewItem(s);if(u.visible=!!c.innerHTML,this.taskElements[s].innerHTML=c.innerHTML,u.size.height=this.taskElements[s].offsetHeight,u.size.width=this.taskElements[s].offsetWidth,this.destroyTemplate(this.taskElements[s]),this._taskRender.removeTaskElement(s),u.visible){var h=this.gridLayoutCalculator.getTaskWrapperElementInfo(s);this.createCustomTaskWrapperElement(s,h),this.taskElements[s].appendChild(c),this.attachEventsOnTask(s)}else{var g=this.getTaskDependencies(u.task.internalId);g.length&&(this._taskRender.addInvalidTaskDependencies(g),g.forEach(function(_){return a.recreateConnectorLineElement(_.internalId,!0)}))}this._taskRender.isHighlightRowElementAllowed(s)&&this._taskRender.createHighlightRowElement(s),u.selected&&this.createTaskSelectionElement(s)}},d.prototype.createCustomTaskInformation=function(c){var s=this.getTask(c),a=this.getViewItem(c),u=this.gridLayoutCalculator.getTaskWrapperElementInfo(c),h=this.gridLayoutCalculator.getTaskElementInfo(c,this.taskTitlePosition!==S.TaskTitlePosition.Inside);this.createCustomTaskWrapperElement(c,u);var g=this.createCustomTaskVisualElement(c,h);this._taskRender.createTaskTextElement(c,g);var _=this.getTaskResources(s.id);return{cellSize:this.tickSize,isMilestone:s.isMilestone(),isParent:!!a?.children.length,taskData:s,taskHTML:g,taskPosition:u.position,taskResources:_,taskSize:h.size}},d}();b.CustomTaskRender=y},9385:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EtalonsHelper=void 0;var S=f(6907),T=f(2449),y=f(1391),d=f(658),c=function(){function s(a){this._renderHelper=a}return Object.defineProperty(s.prototype,"mainElement",{get:function(){return this._renderHelper.mainElement},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"etalonSizeValues",{get:function(){return this._renderHelper.etalonSizeValues},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleCount",{get:function(){return this._renderHelper.scaleCount},enumerable:!1,configurable:!0}),s.prototype.getScaleItemTextTemplate=function(a){return this._renderHelper.getScaleItemTextTemplate(a)},s.prototype.getHeaderHeight=function(){return this._renderHelper.getHeaderHeight()},s.prototype.getSmallTaskWidth=function(a){return this._renderHelper.getSmallTaskWidth(a)},s.prototype.createEtalonElementsContainer=function(){var a=document.createElement("DIV");return a.style.visibility="hidden",a.style.position="absolute",a.style.left="-1000px",this.mainElement.appendChild(a),a},s.prototype.createEtalonElements=function(a){var u=[],h=d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-taskWrapper"),null,a),g=d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-task"),null,h);d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-taskTitle dx-gantt-titleIn"),null,g).innerText="WWW",u.push(h);var _=d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-taskWrapper"),null,a);d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-task dx-gantt-milestone"),null,_),u.push(_);for(var x=["dx-gantt-conn-h","dx-gantt-arrow","dx-gantt-si","dx-gantt-taskTitle dx-gantt-titleOut"],w=0;w<x.length;w++){var D=new y.GridElementInfo(x[w]);u.push(d.RenderElementUtils.create(D,null,a))}var C=d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-taskWrapper"),null,a),I=d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-task dx-gantt-parent"),null,C);return d.RenderElementUtils.create(new y.GridElementInfo("dx-gantt-taskTitle dx-gantt-titleIn"),null,I).innerText="WWW",u.push(C),u},s.prototype.calculateEtalonSizeValues=function(){var a=this.createEtalonElementsContainer(),u=this.createEtalonElements(a);this.calculateEtalonSizeValuesCore(u),this.mainElement.removeChild(a)},s.prototype.calculateEtalonSizeValuesCore=function(a){this.etalonSizeValues.taskHeight=a[0].firstChild.offsetHeight,this.etalonSizeValues.milestoneWidth=a[1].firstChild.offsetWidth,this.etalonSizeValues.taskWrapperTopPadding=S.DomUtils.pxToInt(S.DomUtils.getCurrentStyle(a[0]).paddingTop),this.etalonSizeValues.connectorLineThickness=S.DomUtils.getVerticalBordersWidth(a[2]),this.etalonSizeValues.connectorArrowWidth=S.DomUtils.getHorizontalBordersWidth(a[3]);for(var u=0;u<=T.ViewType.Years;u++)a[4].innerText=this.getScaleItemTextTemplate(u),this.etalonSizeValues.scaleItemWidths[u]=a[4].offsetWidth;this.etalonSizeValues.smallTaskWidth=this.getSmallTaskWidth(S.DomUtils.getCurrentStyle(a[0].firstChild.firstChild).paddingLeft),this.etalonSizeValues.outsideTaskTextDefaultWidth=S.DomUtils.pxToFloat(S.DomUtils.getCurrentStyle(a[5]).width),this.etalonSizeValues.scaleItemHeight=this.getHeaderHeight()/this.scaleCount,this.etalonSizeValues.parentTaskHeight=a[a.length-1].firstChild.offsetHeight},s}();b.EtalonsHelper=c},4289:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ScaleCellPreparedArguments=void 0;var f=function(){function S(T){this.info=T}return Object.defineProperty(S.prototype,"scaleIndex",{get:function(){var T;return null===(T=this.info)||void 0===T?void 0:T.scaleIndex},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"scaleType",{get:function(){var T;return null===(T=this.info)||void 0===T?void 0:T.scaleType},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"start",{get:function(){var T,y;return null===(y=null===(T=this.info)||void 0===T?void 0:T.range)||void 0===y?void 0:y.start},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"end",{get:function(){var T,y;return null===(y=null===(T=this.info)||void 0===T?void 0:T.range)||void 0===y?void 0:y.end},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"scaleElement",{get:function(){var T;return null===(T=this.info)||void 0===T?void 0:T.scaleElement},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"separatorElement",{get:function(){var T;return null===(T=this.info)||void 0===T?void 0:T.separatorElement},enumerable:!1,configurable:!0}),S}();b.ScaleCellPreparedArguments=f},2121:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.MainElementsRender=void 0;var f=function(){function S(){}return S.prototype.createMainElement=function(T){var y=document.createElement("DIV");return y.style.width=T.offsetWidth+"px",y.style.height=T.offsetHeight+"px",y},S.prototype.createHeader=function(){var T=document.createElement("DIV");return T.className="dx-gantt-header",T},S}();b.MainElementsRender=f},1027:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoWorkingIntervalRender=void 0;var S=f(658),T=function(){function y(d){this._noWorkingIntervalsToElementsMap={},this._renderedNoWorkingIntervals=[],this._renderHelper=d}return Object.defineProperty(y.prototype,"noWorkingIntervalsToElementsMap",{get:function(){return this._noWorkingIntervalsToElementsMap},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskAreaContainerScrollLeft",{get:function(){return this._renderHelper.ganttTaskAreaContainerScrollLeft},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"renderedNoWorkingIntervals",{get:function(){return this._renderedNoWorkingIntervals},set:function(d){this._renderedNoWorkingIntervals=d},enumerable:!1,configurable:!0}),y.prototype.reset=function(){this._noWorkingIntervalsToElementsMap={},this._renderedNoWorkingIntervals=[]},y.prototype.createNoWorkingIntervalElement=function(d){return S.RenderElementUtils.create(d,null,this.taskArea,this.noWorkingIntervalsToElementsMap)},y.prototype.removeNoWorkingIntervalElement=function(d){S.RenderElementUtils.remove(d,null,this.taskArea,this.noWorkingIntervalsToElementsMap)},y.prototype.recreateNoWorkingIntervalElements=function(){var d=this,c=this.gridLayoutCalculator.getRenderedNoWorkingIntervals(this.taskAreaContainerScrollLeft);S.RenderElementUtils.recreate(this.renderedNoWorkingIntervals,c,function(s){d.removeNoWorkingIntervalElement(s)},function(s){d.createNoWorkingIntervalElement(s)}),this.renderedNoWorkingIntervals=c},y}();b.NoWorkingIntervalRender=T},658:(P,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RenderElementUtils=void 0;var f=function(){function S(){}return S.create=function(T,y,d,c){var s=document.createElement("DIV");for(var a in T.assignToElement(s),d.appendChild(s),c&&(c instanceof Array&&null!==y?c[y]=s:c[T.id]=s),T.attr)Object.prototype.hasOwnProperty.call(T.attr,a)&&s.setAttribute(a,T.attr[a]);for(var a in T.style)Object.prototype.hasOwnProperty.call(T.style,a)&&(s.style[a]=T.style[a]);return s},S.remove=function(T,y,d,c){var s;c instanceof Array&&null!==y?(s=c[y],delete c[y]):(s=c[T.id],delete c[T.id]),s&&s.parentNode==d&&d.removeChild(s)},S.recreate=function(T,y,d,c){T.filter(function(s){return-1===y.indexOf(s)}).forEach(function(s){d(s)}),y.filter(function(s){return-1===T.indexOf(s)}).forEach(function(s){c(s)})},S}();b.RenderElementUtils=f},1074:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.RenderHelper=void 0;var S=f(6923),T=f(9385),y=f(8877),d=f(2366),c=f(1855),s=f(1027),a=f(4966),u=f(6700),h=f(8148),g=f(3682),_=f(2349),x=f(2290),w=f(2121),D=f(6353),C=f(9377),I=f(8380),L=function(){function N(G){this.hlRowElements=[],this.renderedColIndices=[],this.renderedRowIndices=[],this.invalidTaskDependencies=[],this.etalonSizeValues=new y.EtalonSizeValues,this._gridLayoutCalculator=new c.GridLayoutCalculator,this._ganttView=G,this._connectorLinesRender=new S.ConnectorLinesRender(this),this._etalonsHelper=new T.EtalonsHelper(this),this._noWorkingIntervalRender=new s.NoWorkingIntervalRender(this),this._resourceRender=new a.ResourseRender(this),this._scaleRender=new u.ScaleRender(this),this._stripLinesRender=new h.StripLinesRender(this),this._taskAreaRender=new _.TaskAreaRender(this),this._taskRender=new x.TaskRender(this),this._mainElementsRender=new w.MainElementsRender}return N.prototype.reset=function(){this.invalidTaskDependencies=[],this._taskAreaRender.reset(),this._taskRender.reset(),this._taskArea.innerHTML="",this._scaleRender.reset(),this.hlRowElements=[],this.renderedRowIndices=[],this.renderedColIndices=[],this._connectorLinesRender.reset(),this._stripLinesRender.reset(),this._noWorkingIntervalRender.reset()},N.prototype.createMainElement=function(G){this.mainElement=this._mainElementsRender.createMainElement(G),G.appendChild(this.mainElement)},N.prototype.createHeader=function(){this.header=this._mainElementsRender.createHeader(),this.mainElement.appendChild(this.header)},N.prototype.init=function(G,k,U,B,K){void 0===K&&(K=0),this._elementTextHelper.setFont(this.mainElement),this.setupHelpers(G,k,U,B,K),this.setSizeForTaskArea(),this.createTimeScale(),this._taskAreaManager=new g.TaskAreaManager(this._ganttView.taskAreaEventsListener,this.taskArea,this.tickSize)},N.prototype.initMarkup=function(G){this._elementTextHelper=new I.ElementTextHelper(this.ganttViewSettings.cultureInfo),this.createMainElement(G),this.createHeader(),this._etalonsHelper.calculateEtalonSizeValues(),this._taskAreaRender.createTaskAreaContainer()},N.prototype.processScroll=function(G){this._taskAreaRender.recreateTaskAreaBordersAndTaskElements(G),G?this._connectorLinesRender.recreateConnectorLineElements():(this._noWorkingIntervalRender.recreateNoWorkingIntervalElements(),this._stripLinesRender.recreateStripLines(),this._scaleRender.recreateScalesElements())},Object.defineProperty(N.prototype,"ganttViewSettings",{get:function(){return this._ganttView.settings},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskTextHeightKey",{get:function(){return d.GanttView.taskTextHeightKey},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"showResources",{get:function(){return this.ganttViewSettings.showResources},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"showDependencies",{get:function(){return this.ganttViewSettings.showDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"viewModelItems",{get:function(){return this._ganttView.viewModel.items},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"stripLines",{get:function(){return this.ganttViewSettings.stripLines},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"range",{get:function(){return this._ganttView.range},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"viewType",{get:function(){return this.ganttViewSettings.viewType},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskTitlePosition",{get:function(){return this.ganttViewSettings.taskTitlePosition},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"tickSize",{get:function(){return this._ganttView.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"ganttViewTaskAreaContainerScrollTop",{get:function(){return this._ganttView.taskAreaContainerScrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"ganttTaskAreaContainerScrollLeft",{get:function(){return this._ganttView.taskAreaContainerScrollLeft},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"scaleCount",{get:function(){return this._ganttView.scaleCount},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"areHorizontalBordersEnabled",{get:function(){return this.ganttViewSettings.areHorizontalBordersEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskEditController",{get:function(){return this._ganttView.taskEditController},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"dispatcher",{get:function(){return this._ganttView.dispatcher},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskArea",{get:function(){return this._taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskAreaManager",{get:function(){var G;return null!==(G=this._taskAreaManager)&&void 0!==G||(this._taskAreaManager=new g.TaskAreaManager(this._ganttView.taskAreaEventsListener,this.taskArea,this.tickSize)),this._taskAreaManager},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskAreaContainerScrollTop",{get:function(){return this._taskAreaRender.taskAreaContainer.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskAreaContainerScrollLeft",{get:function(){return this._taskAreaRender.taskAreaContainer.scrollLeft},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskAreaContainer",{get:function(){return this._taskAreaRender.taskAreaContainer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isExternalTaskAreaContainer",{get:function(){return this._taskAreaRender.taskAreaContainer.isExternal},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fakeTaskWrapper",{get:function(){return this._taskRender.fakeTaskWrapper},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"taskElements",{get:function(){return this._taskRender.taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"selectionElements",{get:function(){return this._taskRender.selectionElements},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"scaleElements",{get:function(){return this._scaleRender.scaleElements},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"scaleBorders",{get:function(){return this._scaleRender.scaleBorders},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"timeScaleContainer",{get:function(){return this._scaleRender.timeScaleContainer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"gridLayoutCalculator",{get:function(){return this._gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"etalonScaleItemWidths",{get:function(){return this.etalonSizeValues.scaleItemWidths[this.viewType]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"elementTextHelperCultureInfo",{get:function(){return this._elementTextHelper.cultureInfo},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"noWorkingIntervalsToElementsMap",{get:function(){return this._noWorkingIntervalRender.noWorkingIntervalsToElementsMap},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"stripLinesMap",{get:function(){return this._stripLinesRender.stripLinesMap},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"renderedConnectorLines",{get:function(){return this._connectorLinesRender.renderedConnectorLines},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"allConnectorLines",{get:function(){return this.gridLayoutCalculator.tileToDependencyMap.reduce(function(G,k){return G.concat(k)},[])},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"resourcesElements",{get:function(){return this._resourceRender.resourcesElements},enumerable:!1,configurable:!0}),N.prototype.setupHelpers=function(G,k,U,B,K){void 0===K&&(K=0);var J=new D.Size(this._taskAreaRender.taskAreaContainer.getWidth(),this._taskAreaRender.taskAreaContainer.getHeight()),ie=this._taskAreaRender.taskAreaContainer.getHeight()-this._taskAreaRender.taskAreaContainer.getElement().clientHeight;this._gridLayoutCalculator.setSettings(J,G,this.etalonSizeValues,k,B,U,ie,K),this._elementTextHelper.setSettings(k.start.getTime(),U,B.items)},N.prototype.resetAndUpdate=function(G,k,U,B,K){void 0===K&&(K=0);var J=this.getTaskAreaContainerScrollLeft();this.reset(),this.setupHelpers(G,k,U,B,K),this._scaleRender.createTimeScaleAreas(),this.setSizeForTaskArea(),this.setTaskAreaContainerScrollLeft(J)},N.prototype.createConnectorLines=function(){this._gridLayoutCalculator.createTileToConnectorLinesMap(),this._connectorLinesRender.recreateConnectorLineElements()},N.prototype.getTargetDateByPos=function(G){return this._gridLayoutCalculator.getDateByPos(this._taskAreaRender.taskAreaContainer.scrollLeft+G)},N.prototype.getExternalTaskAreaContainer=function(G){return this._ganttView.getExternalTaskAreaContainer(G)},N.prototype.prepareExternalTaskAreaContainer=function(G,k){return this._ganttView.prepareExternalTaskAreaContainer(G,k)},N.prototype.isAllowTaskAreaBorders=function(G){return this._ganttView.allowTaskAreaBorders(G)},N.prototype.getHeaderHeight=function(){return this._ganttView.getHeaderHeight()},N.prototype.getViewItem=function(G){return this._ganttView.getViewItem(G)},N.prototype.getTask=function(G){return this._ganttView.getTask(G)},N.prototype.hasTaskTemplate=function(){return!!this._ganttView.settings.taskContentTemplate},N.prototype.destroyTemplate=function(G){this._ganttView.destroyTemplate(G)},N.prototype.getTaskDependencies=function(G){return this._ganttView.getTaskDependencies(G)},N.prototype.getTaskResources=function(G){return this._ganttView.getTaskResources(G)},N.prototype.isHighlightRowElementAllowed=function(G){return this._ganttView.isHighlightRowElementAllowed(G)},N.prototype.updateRenderedConnectorLinesId=function(G,k){this._connectorLinesRender.updateRenderedConnectorLinesId(G,k)},N.prototype.recreateConnectorLineElement=function(G,k){void 0===k&&(k=!1),this._connectorLinesRender.recreateConnectorLineElement(G,k)},N.prototype.recreateConnectorLineElemensts=function(){this._connectorLinesRender.recreateConnectorLineElements()},N.prototype.setMainElementWidth=function(G){this.mainElement.style.width=G+"px"},N.prototype.setMainElementHeight=function(G){this.mainElement.style.height=G+"px"},N.prototype.createResources=function(G){this._resourceRender.createResourcesWrapperElement(G),this._resourceRender.createResources(G)},N.prototype.createTimeScale=function(){this._scaleRender.createTimeScaleContainer(this.header),this._scaleRender.createTimeScaleAreas()},N.prototype.setTimeScaleContainerScrollLeft=function(G){this._scaleRender.setTimeScaleContainerScrollLeft(G)},N.prototype.recreateStripLines=function(){this._stripLinesRender.recreateStripLines&&this._stripLinesRender.recreateStripLines()},N.prototype.createTaskArea=function(G){this._taskArea=this._taskAreaRender.createTaskArea(),this._taskArea.setAttribute("task-edit-enabled",this.isTaskUpdateAllowed().toString()),G.appendChild(this._taskArea)},N.prototype.isTaskUpdateAllowed=function(){var G=this.ganttViewSettings.editing;return G.enabled&&G.allowTaskUpdate},N.prototype.setSizeForTaskArea=function(){var G=this.getTaskAreaWidth(),k=this.getTaskAreaHeight();this._taskAreaRender.setSizeForTaskArea(G,k),this._ganttView.onTaskAreaSizeChanged({width:G,height:k})},N.prototype.getTaskAreaWidth=function(){return this.gridLayoutCalculator.getTotalWidth()},N.prototype.getTaskAreaHeight=function(){return this.gridLayoutCalculator.getVerticalGridLineHeight()},N.prototype.getTaskAreaContainerScrollLeft=function(){return this._taskAreaRender.taskAreaContainer.scrollLeft},N.prototype.setTaskAreaContainerScrollLeft=function(G){this._taskAreaRender.taskAreaContainer.scrollLeft=G},N.prototype.setTaskAreaContainerScrollLeftToDate=function(G,k){this._taskAreaRender.taskAreaContainer.scrollLeft=Math.round(this._gridLayoutCalculator.getPosByDate(G))+k},N.prototype.getTaskAreaContainer=function(G){return new C.TaskAreaContainer(G,this._ganttView)},N.prototype.prepareTaskAreaContainer=function(){this._taskAreaRender.prepareTaskAreaContainer()},N.prototype.getTaskAreaContainerWidth=function(){return this._taskAreaRender.taskAreaContainer.getWidth()},N.prototype.createHighlightRowElement=function(G){this._taskAreaRender.createHighlightRowElement(G)},N.prototype.getSmallTaskWidth=function(G){return this._taskRender.getSmallTaskWidth(G)},N.prototype.createTaskElement=function(G){this._taskRender.createTaskElement(G,this._ganttView.settings.taskContentTemplate)},N.prototype.removeTaskElement=function(G){this._taskRender.removeTaskElement(G)},N.prototype.recreateTaskElement=function(G){this._taskRender.recreateTaskElement(G)},N.prototype.createDefaultTaskElement=function(G){this._taskRender.createDefaultTaskElement(G)},N.prototype.getScaleItemText=function(G,k){var U=this._gridLayoutCalculator.getScaleItemStart(G,k);return this.getScaleItemTextByStart(U,k)},N.prototype.getScaleItemTextByStart=function(G,k){return this._elementTextHelper.getScaleItemText(G,k)},N.prototype.getTextWidth=function(G){return this._elementTextHelper.getTextWidth(G)},N.prototype.getTaskVisibility=function(G){return this.gridLayoutCalculator.isTaskInRenderedRange(G)&&this._elementTextHelper.getTaskVisibility(G)},N.prototype.getTaskResourcesVisibility=function(G){return this.getTaskVisibility(G)&&!this.gridLayoutCalculator.isTaskCutByRange(G)},N.prototype.getScaleItemTextTemplate=function(G){return this._elementTextHelper.getScaleItemTextTemplate(G)},N.prototype.getTaskText=function(G){return this._elementTextHelper.getTaskText(G)},N.prototype.taskAreaManagerDetachEvents=function(){this.taskAreaManager.detachEvents()},N.prototype.attachEventsOnTask=function(G){this.taskAreaManager.attachEventsOnTask(this._taskRender.taskElements[G])},N.prototype.detachEventsOnTask=function(G){this.taskAreaManager.detachEventsOnTask(this._taskRender.taskElements[G])},N}();b.RenderHelper=L},4966:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ResourseRender=void 0;var S=f(658),T=function(){function y(d){this._resourcesElements=[],this._renderHelper=d}return Object.defineProperty(y.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"resourcesElements",{get:function(){return this._resourcesElements},enumerable:!1,configurable:!0}),y.prototype.getViewItem=function(d){return this._renderHelper.getViewItem(d)},y.prototype.getTaskResourcesVisibility=function(d){return this._renderHelper.getTaskResourcesVisibility(d)},y.prototype.createResources=function(d){for(var c=this.getViewItem(d).resources.items,s=0;s<c.length;s++)this.createResourceElement(d,c[s])},y.prototype.createResourcesWrapperElement=function(d){var c=this.gridLayoutCalculator.getTaskResourcesWrapperElementInfo(d);S.RenderElementUtils.create(c,d,this.taskArea,this.resourcesElements),this.resourcesElements[d].style.display=this.getTaskResourcesVisibility(d)?"":"none"},y.prototype.createResourceElement=function(d,c){var s=this.gridLayoutCalculator.getTaskResourceElementInfo();c.color&&(s.style.backgroundColor=c.color);var a=S.RenderElementUtils.create(s,d,this.resourcesElements[d]);a.innerText=c.text,this.gridLayoutCalculator.checkAndCorrectElementDisplayByRange(a)},y}();b.ResourseRender=T},6700:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ScaleRender=void 0;var S=f(6907),T=f(2449),y=f(9201),d=f(4289),c=f(658),s=function(){function a(u){this._scaleBorders=[],this._scaleElements=[],this._renderedScaleItemIndices=[],this._timeScaleAreas=new Array,this._renderHelper=u}return Object.defineProperty(a.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"etalonSizeValues",{get:function(){return this._renderHelper.etalonSizeValues},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"timeScaleContainer",{get:function(){return this._timeScaleContainer},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"scaleCount",{get:function(){return this._renderHelper.scaleCount},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"range",{get:function(){return this._renderHelper.range},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"viewType",{get:function(){return this._renderHelper.viewType},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"timeScaleAreas",{get:function(){return this._timeScaleAreas},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"scaleElements",{get:function(){return this._scaleElements},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"scaleBorders",{get:function(){return this._scaleBorders},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"renderedColIndices",{get:function(){return this._renderHelper.renderedColIndices},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"renderedScaleItemIndices",{get:function(){return this._renderedScaleItemIndices},enumerable:!1,configurable:!0}),a.prototype.getScaleItemText=function(u,h){return this._renderHelper.getScaleItemText(u,h)},a.prototype.getTaskAreaWidth=function(){return this._renderHelper.getTaskAreaWidth()},a.prototype.reset=function(){this._scaleBorders=[],this._scaleElements=[],this._renderedScaleItemIndices=[],this._timeScaleAreas=[],this._timeScaleContainer.innerHTML=""},a.prototype.setTimeScaleContainerScrollLeft=function(u){this._timeScaleContainer.scrollLeft=u},a.prototype.createTimeScaleContainer=function(u){var h=document.createElement("DIV");h.className="dx-gantt-tsac",h.style.height=this.etalonSizeValues.scaleItemHeight*this.scaleCount+"px",this._timeScaleContainer=h,u.appendChild(this.timeScaleContainer)},a.prototype.createTimeScaleArea=function(){var u=document.createElement("DIV");return u.className="dx-gantt-tsa",u.style.width=this.getTaskAreaWidth()+"px",u.style.height=this.etalonSizeValues.scaleItemHeight+"px",this.timeScaleContainer.appendChild(u),this.timeScaleAreas.unshift(u),u},a.prototype.createTimeScaleAreas=function(){for(var u=0;u<this.scaleCount;u++)this.createTimeScaleArea()},a.prototype.createScaleElementCore=function(u,h,g,_){return _[g]||(_[g]=[]),c.RenderElementUtils.create(h,u,this.timeScaleAreas[g],_[g])},a.prototype.createScaleElement=function(u,h,g,_){var x=this._renderHelper.getTextWidth("a"),w=this.createScaleElementCore(u,_,h,this.scaleElements);if(w.style.lineHeight=this.etalonSizeValues.scaleItemHeight+"px",_?.size.width>5*x){var D=this.getScaleItemText(u,g);w.innerText=D,g===T.ViewType.Quarter&&(w.style.padding="0");var C=getComputedStyle(w);_.size.width-S.DomUtils.pxToInt(C.paddingLeft)-S.DomUtils.pxToInt(C.paddingRight)<this._renderHelper.getTextWidth(D)&&(w.title=D)}return w},a.prototype.createScaleBorder=function(u,h,g){var _=this.gridLayoutCalculator.getScaleBorderInfo(u,g);return this.createScaleElementCore(u,_,h,this.scaleBorders)},a.prototype.createScaleElementAndBorder=function(u,h,g){var _=this.gridLayoutCalculator.getScaleElementInfo(u,g),x=this.createScaleElement(u,h,g,_),w=this.createScaleBorder(u,h,g);this.onScaleCellPrepared(g,h,x,w,_.additionalInfo.range)},a.prototype.removeScaleElementAndBorder=function(u,h){c.RenderElementUtils.remove(null,u,this.timeScaleAreas[h],this.scaleElements[h]),c.RenderElementUtils.remove(null,u,this.timeScaleAreas[h],this.scaleBorders[h])},a.prototype.recreateScalesElements=function(){this.recreateScaleElements(this.viewType,0),this.recreateScaleElements(y.DateUtils.ViewTypeToScaleMap[this.viewType],1)},a.prototype.recreateScaleElements=function(u,h){var g=this,_=this.gridLayoutCalculator.getRenderedScaleItemIndices(u,this.renderedColIndices);c.RenderElementUtils.recreate(this.renderedScaleItemIndices[u-this.viewType]||[],_,function(w){g.removeScaleElementAndBorder(w,h)},function(w){g.createScaleElementAndBorder(w,h,u)}),this.renderedScaleItemIndices[u-this.viewType]=_},Object.defineProperty(a.prototype,"dispatcher",{get:function(){return this._renderHelper.dispatcher},enumerable:!1,configurable:!0}),a.prototype.onScaleCellPrepared=function(u,h,g,_,x){var w=new d.ScaleCellPreparedArguments({scaleType:u,scaleIndex:h,range:x,scaleElement:g,separatorElement:_});this.dispatcher.notifyScaleCellPrepared(w)},a}();b.ScaleRender=s},8148:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.StripLinesRender=void 0;var S=f(658),T=function(){function y(d){this._stripLinesMap=[],this._renderedStripLines=[],this._renderHelper=d}return Object.defineProperty(y.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"stripLinesMap",{get:function(){return this._stripLinesMap},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"renderedStripLines",{get:function(){return this._renderedStripLines},set:function(d){this._renderedStripLines=d},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"stripLines",{get:function(){return this._renderHelper.stripLines},enumerable:!1,configurable:!0}),y.prototype.reset=function(){this._renderedStripLines=[]},y.prototype.recreateStripLines=function(){var d=this,c=this.gridLayoutCalculator.getRenderedStripLines(this.stripLines);S.RenderElementUtils.recreate(this.renderedStripLines,c,function(s){S.RenderElementUtils.remove(s,null,d.taskArea,d.stripLinesMap)},function(s){return S.RenderElementUtils.create(s,null,d.taskArea,d.stripLinesMap)}),this.renderedStripLines=c},y}();b.StripLinesRender=T},2349:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskAreaRender=void 0;var S=f(6907),T=f(658),y=function(){function d(c){this._vertTaskAreaBorders=[],this._horTaskAreaBorders=[],this._isExternalTaskAreaContainer=!1,this._renderHelper=c}return Object.defineProperty(d.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"mainElement",{get:function(){return this._renderHelper.mainElement},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"etalonSizeValues",{get:function(){return this._renderHelper.etalonSizeValues},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"scaleCount",{get:function(){return this._renderHelper.scaleCount},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"tickSize",{get:function(){return this._renderHelper.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskAreaContainerScrollTop",{get:function(){return this._renderHelper.ganttViewTaskAreaContainerScrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskAreaContainerScrollLeft",{get:function(){return this._renderHelper.ganttTaskAreaContainerScrollLeft},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"areHorizontalBordersEnabled",{get:function(){return this._renderHelper.areHorizontalBordersEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"renderedRowIndices",{get:function(){return this._renderHelper.renderedRowIndices},set:function(c){this._renderHelper.renderedRowIndices=c},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"renderedColIndices",{get:function(){return this._renderHelper.renderedColIndices},set:function(c){this._renderHelper.renderedColIndices=c},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"vertTaskAreaBorders",{get:function(){return this._vertTaskAreaBorders},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"horTaskAreaBorders",{get:function(){return this._horTaskAreaBorders},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hlRowElements",{get:function(){return this._renderHelper.hlRowElements},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"taskAreaContainer",{get:function(){return this._taskAreaContainer},enumerable:!1,configurable:!0}),d.prototype.getExternalTaskAreaContainer=function(c){return this._renderHelper.getExternalTaskAreaContainer(c)},d.prototype.prepareExternalTaskAreaContainer=function(c,s){return this._renderHelper.prepareExternalTaskAreaContainer(c,s)},d.prototype.isAllowTaskAreaBorders=function(c){return this._renderHelper.isAllowTaskAreaBorders(c)},d.prototype.getTaskAreaContainerElement=function(){return this._taskAreaContainer.getElement()},d.prototype.initTaskAreaContainer=function(c){this._renderHelper.createTaskArea(c),this._taskAreaContainer=this.getExternalTaskAreaContainer(c),this._isExternalTaskAreaContainer=!!this._taskAreaContainer,null==this.taskAreaContainer&&(this._taskAreaContainer=this._renderHelper.getTaskAreaContainer(c))},d.prototype.createTaskElement=function(c){this._renderHelper.createTaskElement(c)},d.prototype.removeTaskElement=function(c){this._renderHelper.removeTaskElement(c)},d.prototype.reset=function(){this._horTaskAreaBorders=[],this._vertTaskAreaBorders=[]},d.prototype.prepareTaskAreaContainer=function(){var c="dx-gantt-tac-hb",s=this.getTaskAreaContainerElement();this.areHorizontalBordersEnabled?S.DomUtils.addClassName(s,c):S.DomUtils.removeClassName(s,c);var a=parseInt(getComputedStyle(s).getPropertyValue("margin-top"))||0,u="calc(100% - ".concat(this.etalonSizeValues.scaleItemHeight*this.scaleCount+a,"px)");this._isExternalTaskAreaContainer?this.prepareExternalTaskAreaContainer(s,{height:u}):s.style.height=u},d.prototype.createTaskAreaContainer=function(){var c=document.createElement("DIV");c.className="dx-gantt-tac",this.mainElement.appendChild(c),this.initTaskAreaContainer(c),this.prepareTaskAreaContainer()},d.prototype.createTaskAreaBorder=function(c,s){var a=this.gridLayoutCalculator.getTaskAreaBorderInfo(c,s);T.RenderElementUtils.create(a,c,this.taskArea,this.getTaskAreaBordersDictionary(s))},d.prototype.createTaskArea=function(){var c=document.createElement("DIV");return c.id="dx-gantt-ta",c},d.prototype.removeTaskAreaBorder=function(c,s){T.RenderElementUtils.remove(null,c,this.taskArea,this.getTaskAreaBordersDictionary(s))},d.prototype.createTaskAreaBorderAndTaskElement=function(c,s){this.isAllowTaskAreaBorders(s)&&this.createTaskAreaBorder(c,!s),s&&this.createTaskElement(c)},d.prototype.removeTaskAreaBorderAndTaskElement=function(c,s){this.isAllowTaskAreaBorders(s)&&this.removeTaskAreaBorder(c,!s),s&&this.removeTaskElement(c)},d.prototype.recreateTaskAreaBordersAndTaskElements=function(c){var s=this,u=this.gridLayoutCalculator.getRenderedRowColumnIndices(c?this.taskAreaContainerScrollTop:this.taskAreaContainerScrollLeft,c);T.RenderElementUtils.recreate(c?this.renderedRowIndices:this.renderedColIndices,u,function(g){s.removeTaskAreaBorderAndTaskElement(g,c)},function(g){s.createTaskAreaBorderAndTaskElement(g,c)}),c?this.renderedRowIndices=u:this.renderedColIndices=u,this.gridLayoutCalculator.createTileToConnectorLinesMap()},d.prototype.getTaskAreaBordersDictionary=function(c){return c?this.vertTaskAreaBorders:this.horTaskAreaBorders},d.prototype.setSizeForTaskArea=function(c,s){this.taskArea.style.width=c+"px",this.taskArea.style.height=s+"px"},d.prototype.createHighlightRowElement=function(c){var s=this.gridLayoutCalculator.getHighlightRowInfo(c);T.RenderElementUtils.create(s,c,this.taskArea,this.hlRowElements)},d}();b.TaskAreaRender=y},2290:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskRender=void 0;var S=f(6907),T=f(2449),y=f(1419),d=f(658),c=function(){function s(a){this._selectionElements=[],this._taskElements=[],this._renderHelper=a,this.customTaskRender=new y.CustomTaskRender(a,this)}return Object.defineProperty(s.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"taskElements",{get:function(){return this._taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"selectionElements",{get:function(){return this._selectionElements},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isExternalTaskAreaContainer",{get:function(){return this._renderHelper.isExternalTaskAreaContainer},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"resourcesElements",{get:function(){return this._renderHelper.resourcesElements},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hlRowElements",{get:function(){return this._renderHelper.hlRowElements},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"renderedRowIndices",{get:function(){return this._renderHelper.renderedRowIndices},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"taskTitlePosition",{get:function(){return this._renderHelper.taskTitlePosition},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"showResources",{get:function(){return this._renderHelper.showResources},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"areHorizontalBordersEnabled",{get:function(){return this._renderHelper.areHorizontalBordersEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"taskTextHeightKey",{get:function(){return this._renderHelper.taskTextHeightKey},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"viewModelItems",{get:function(){return this._renderHelper.viewModelItems},enumerable:!1,configurable:!0}),s.prototype.isHighlightRowElementAllowed=function(a){return this._renderHelper.isHighlightRowElementAllowed(a)},s.prototype.getTaskVisibility=function(a){return this._renderHelper.getTaskVisibility(a)},s.prototype.getTaskText=function(a){return this._renderHelper.getTaskText(a)},Object.defineProperty(s.prototype,"invalidTaskDependencies",{get:function(){return this._renderHelper.invalidTaskDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fakeTaskWrapper",{get:function(){var a;return null!==(a=this._fakeTaskWrapper)&&void 0!==a||(this._fakeTaskWrapper=this.createFakeTaskWrapper()),this._fakeTaskWrapper},enumerable:!1,configurable:!0}),s.prototype.getViewItem=function(a){return this._renderHelper.getViewItem(a)},s.prototype.getTask=function(a){return this._renderHelper.getTask(a)},s.prototype.createHighlightRowElement=function(a){this._renderHelper.createHighlightRowElement(a)},s.prototype.getTaskDependencies=function(a){return this._renderHelper.getTaskDependencies(a)},s.prototype.addInvalidTaskDependencies=function(a){this._renderHelper.invalidTaskDependencies=this._renderHelper.invalidTaskDependencies.concat(a)},s.prototype.removeInvalidTaskDependencies=function(a){this._renderHelper.invalidTaskDependencies=this._renderHelper.invalidTaskDependencies.filter(function(u){return u.predecessorId!=a||u.successorId!=a})},s.prototype.createResources=function(a){this.showResources&&this._renderHelper.createResources(a)},s.prototype.attachEventsOnTask=function(a){this._renderHelper.attachEventsOnTask(a)},s.prototype.detachEventsOnTask=function(a){this._renderHelper.detachEventsOnTask(a)},s.prototype.recreateConnectorLineElement=function(a,u){void 0===u&&(u=!1),this._renderHelper.recreateConnectorLineElement(a,u)},s.prototype.renderTaskElement=function(a){this._renderHelper.createTaskElement(a)},s.prototype.reset=function(){var a=this;this._taskElements.forEach(function(u,h){return a.removeTaskElement(h)}),this._selectionElements=[],this._taskElements=[]},s.prototype.createTaskWrapperElement=function(a){var u=this.gridLayoutCalculator.getTaskWrapperElementInfo(a);d.RenderElementUtils.create(u,a,this.taskArea,this.taskElements),this.taskElements[a].style.display=this.getTaskVisibility(a)?"":"none"},s.prototype.createTaskElement=function(a,u){var h=this.getViewItem(a);if(u&&this.customTaskRender.createCustomTaskElement(a,u),!h.task.isValid()||!h.visible){var g=this.getTaskDependencies(h.task.internalId);return this.addInvalidTaskDependencies(g),void(h.selected&&this.createTaskSelectionElement(a))}h.isCustom||this.createDefaultTaskElement(a)},s.prototype.createTaskVisualElement=function(a){var u=this.gridLayoutCalculator.getTaskElementInfo(a,this.taskTitlePosition!==T.TaskTitlePosition.Inside),h=d.RenderElementUtils.create(u,a,this.taskElements[a]);return this.attachEventsOnTask(a),h},s.prototype.createDefaultTaskElement=function(a){var u=this.getViewItem(a);this.isHighlightRowElementAllowed(a)&&this.createHighlightRowElement(a),u.selected&&this.createTaskSelectionElement(a),this.createTaskWrapperElement(a),this.taskTitlePosition===T.TaskTitlePosition.Outside&&this.createTaskTextElement(a,this.taskElements[a]);var h=this.createTaskVisualElement(a);u.task.isMilestone()||(this.taskTitlePosition===T.TaskTitlePosition.Inside&&this.createTaskTextElement(a,h),this.createTaskProgressElement(a,h)),this.createResources(a)},s.prototype.removeTaskElement=function(a){var u=this.getTask(a);if(u&&this.removeInvalidTaskDependencies(u.id),this.detachEventsOnTask(a),this._renderHelper.hasTaskTemplate()){var h=this.taskElements[a],g=h?.firstElementChild;g&&(this._renderHelper.destroyTemplate(g),h.removeChild(g))}d.RenderElementUtils.remove(null,a,this.taskArea,this.taskElements),d.RenderElementUtils.remove(null,a,this.taskArea,this.resourcesElements),d.RenderElementUtils.remove(null,a,this.taskArea,this.selectionElements),this.isHighlightRowElementAllowed(a)&&d.RenderElementUtils.remove(null,a,this.taskArea,this.hlRowElements),this.gridLayoutCalculator.resetTaskInfo(a)},s.prototype.recreateTaskElement=function(a){var u=this,h=this.renderedRowIndices.filter(function(x){return x===a}).length>0,g=this.getTask(a);if(g){h&&(this.removeTaskElement(a),this.renderTaskElement(a));var _=this.getTaskDependencies(g.internalId);_.length&&_.forEach(function(x){return u.recreateConnectorLineElement(x.internalId,!0)})}},s.prototype.createFakeTaskWrapper=function(){var a,u,h=null!==(u=null===(a=this.viewModelItems.filter(function(w){return w.task&&!w.task.isMilestone})[0])||void 0===a?void 0:a.visibleIndex)&&void 0!==u?u:0,g=this.gridLayoutCalculator,_=d.RenderElementUtils.create(g.getTaskWrapperElementInfo(h),null,this.taskArea),x=d.RenderElementUtils.create(g.getTaskElementInfo(h),null,_);return this.createTaskTextElement(h,x),this.createTaskProgressElement(h,x),_.style.display="none",_},s.prototype.createTaskProgressElement=function(a,u){var h=this.gridLayoutCalculator.getTaskProgressElementInfo(a);d.RenderElementUtils.create(h,a,u)},s.prototype.getTextWidth=function(a){return this._renderHelper.getTextWidth(a)},Object.defineProperty(s.prototype,"minTextWidth",{get:function(){var a;return null!==(a=this._minTextWidth)&&void 0!==a||(this._minTextWidth=5*this.getTextWidth("a")),this._minTextWidth},enumerable:!1,configurable:!0}),s.prototype.createTaskTextElement=function(a,u){var h,g,_=this.gridLayoutCalculator.getTaskTextElementInfo(a,this.taskTitlePosition===T.TaskTitlePosition.Inside);if(!_.additionalInfo.hidden){var x=d.RenderElementUtils.create(_,a,u),w=this.getTaskText(a);if(this.taskTitlePosition===T.TaskTitlePosition.Outside&&_.size.width>0){var D=getComputedStyle(x),C=_.size.width-S.DomUtils.pxToInt(D.paddingLeft);if(C>=this.minTextWidth){var I=S.DomUtils.pxToInt(D.paddingRight),L=w?this.getTextWidth(w):0;I&&L>C-I&&(I=Math.min(s.minTitleOutRightPadding,C-this.minTextWidth),x.style.paddingRight=I+"px"),L>C-I&&(x.style.overflowX="hidden",x.style.textOverflow="ellipsis")}else x.style.display="none"}w||(null!==(h=this[g=this.taskTextHeightKey])&&void 0!==h||(this[g]=this.getTaskTextHeight(x)),x.style.height=this[this.taskTextHeightKey]),x.innerText=w}},s.prototype.createTaskSelectionElement=function(a){var u=this.gridLayoutCalculator.getSelectionElementInfo(a);this.isExternalTaskAreaContainer&&!this.areHorizontalBordersEnabled&&u.size.height++,d.RenderElementUtils.create(u,a,this.taskArea,this.selectionElements)},s.prototype.getTaskTextHeight=function(a){a.innerText="WWW";var u=getComputedStyle(a).height;return a.innerText="",u},s.prototype.getSmallTaskWidth=function(a){var u=0;if(null!=a&&""!==a){var h=a.indexOf("rem");if(h>-1)try{u=parseFloat(a.substr(0,h))*parseFloat(getComputedStyle(document.documentElement).fontSize)}catch{}else u=S.DomUtils.pxToInt(a)}return 2*u},s.minTitleOutRightPadding=5,s}();b.TaskRender=c},2990:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.EditingSettings=void 0;var S=f(2491),T=function(){function y(){this.enabled=!1,this.allowDependencyDelete=!0,this.allowDependencyInsert=!0,this.allowTaskDelete=!0,this.allowTaskInsert=!0,this.allowTaskUpdate=!0,this.allowResourceDelete=!0,this.allowResourceInsert=!0,this.allowResourceUpdate=!0,this.allowTaskResourceUpdate=!0,this.taskHoverDelay=0}return y.parse=function(d){var c=new y;return d&&((0,S.isDefined)(d.enabled)&&(c.enabled=d.enabled),(0,S.isDefined)(d.allowDependencyDelete)&&(c.allowDependencyDelete=d.allowDependencyDelete),(0,S.isDefined)(d.allowDependencyInsert)&&(c.allowDependencyInsert=d.allowDependencyInsert),(0,S.isDefined)(d.allowTaskDelete)&&(c.allowTaskDelete=d.allowTaskDelete),(0,S.isDefined)(d.allowTaskInsert)&&(c.allowTaskInsert=d.allowTaskInsert),(0,S.isDefined)(d.allowTaskUpdate)&&(c.allowTaskUpdate=d.allowTaskUpdate),(0,S.isDefined)(d.allowResourceDelete)&&(c.allowResourceDelete=d.allowResourceDelete),(0,S.isDefined)(d.allowResourceInsert)&&(c.allowResourceInsert=d.allowResourceInsert),(0,S.isDefined)(d.allowResourceUpdate)&&(c.allowResourceUpdate=d.allowResourceUpdate),(0,S.isDefined)(d.allowTaskResourceUpdate)&&(c.allowTaskResourceUpdate=d.allowTaskResourceUpdate),(0,S.isDefined)(d.taskHoverDelay)&&(c.taskHoverDelay=d.taskHoverDelay)),c},y.prototype.equal=function(d){var c=!0;return(c=(c=(c=(c=(c=(c=(c=(c=(c=c&&this.enabled===d.enabled)&&this.allowDependencyDelete===d.allowDependencyDelete)&&this.allowDependencyInsert===d.allowDependencyInsert)&&this.allowTaskDelete===d.allowTaskDelete)&&this.allowTaskInsert===d.allowTaskInsert)&&this.allowTaskUpdate===d.allowTaskUpdate)&&this.allowResourceDelete===d.allowResourceDelete)&&this.allowResourceInsert===d.allowResourceInsert)&&this.allowResourceUpdate===d.allowResourceUpdate)&&this.allowTaskResourceUpdate===d.allowTaskResourceUpdate},y}();b.EditingSettings=T},9954:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.FullScreenHelperSettings=void 0;var S=f(2491),T=function(){function y(){}return y.parse=function(d){var c=new y;return d&&((0,S.isDefined)(d.getMainElement)&&(c.getMainElement=d.getMainElement),(0,S.isDefined)(d.adjustControl)&&(c.adjustControl=d.adjustControl)),c},y}();b.FullScreenHelperSettings=T},9640:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TaskEditSettings=void 0;var S=f(655),T=f(2491),y=function(d){function c(){return null!==d&&d.apply(this,arguments)||this}return S.__extends(c,d),c.parse=function(s){var a=new c;return s&&((0,T.isDefined)(s.getCommandManager)&&(a.getCommandManager=s.getCommandManager),(0,T.isDefined)(s.getViewModel)&&(a.getViewModel=s.getViewModel),(0,T.isDefined)(s.getGanttSettings)&&(a.getGanttSettings=s.getGanttSettings),(0,T.isDefined)(s.getRenderHelper)&&(a.getRenderHelper=s.getRenderHelper),(0,T.isDefined)(s.destroyTemplate)&&(a.destroyTemplate=s.destroyTemplate),(0,T.isDefined)(s.formatDate)&&(a.formatDate=s.formatDate),(0,T.isDefined)(s.getModelManipulator)&&(a.getModelManipulator=s.getModelManipulator),(0,T.isDefined)(s.getValidationController)&&(a.getValidationController=s.getValidationController)),a},c}(f(9080).TooltipSettings);b.TaskEditSettings=y},9080:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TooltipSettings=void 0;var S=f(2491),T=function(){function y(){}return y.parse=function(d){var c=new y;return d&&((0,S.isDefined)(d.getHeaderHeight)&&(c.getHeaderHeight=d.getHeaderHeight),(0,S.isDefined)(d.getTaskTooltipContentTemplate)&&(c.getTaskTooltipContentTemplate=d.getTaskTooltipContentTemplate),(0,S.isDefined)(d.getTaskProgressTooltipContentTemplate)&&(c.getTaskProgressTooltipContentTemplate=d.getTaskProgressTooltipContentTemplate),(0,S.isDefined)(d.getTaskTimeTooltipContentTemplate)&&(c.getTaskTimeTooltipContentTemplate=d.getTaskTimeTooltipContentTemplate),(0,S.isDefined)(d.destroyTemplate)&&(c.destroyTemplate=d.destroyTemplate),(0,S.isDefined)(d.formatDate)&&(c.formatDate=d.formatDate),(0,S.isDefined)(d.getTaskAreaContainer)&&(c.getTaskAreaContainer=d.getTaskAreaContainer)),c},y}();b.TooltipSettings=T},5846:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ValidationControllerSettings=void 0;var S=f(2491),T=function(){function y(){}return y.parse=function(d){var c=new y;return d&&((0,S.isDefined)(d.getViewModel)&&(c.getViewModel=d.getViewModel),(0,S.isDefined)(d.getHistory)&&(c.getHistory=d.getHistory),(0,S.isDefined)(d.getModelManipulator)&&(c.getModelManipulator=d.getModelManipulator),(0,S.isDefined)(d.getRange)&&(c.getRange=d.getRange),(0,S.isDefined)(d.getValidationSettings)&&(c.getValidationSettings=d.getValidationSettings),(0,S.isDefined)(d.updateOwnerInAutoParentMode)&&(c.updateOwnerInAutoParentMode=d.updateOwnerInAutoParentMode),(0,S.isDefined)(d.getIsValidateDependenciesRequired)&&(c.getIsValidateDependenciesRequired=d.getIsValidateDependenciesRequired)),c},y}();b.ValidationControllerSettings=T},5351:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.Settings=void 0;var S=f(2491),T=f(7880),y=f(2449),d=f(2990),c=f(9057),s=f(2762),a=f(9820),u=function(){function h(){this.viewType=void 0,this.taskTitlePosition=y.TaskTitlePosition.Inside,this.showResources=!0,this.showDependencies=!0,this.areHorizontalBordersEnabled=!0,this.areVerticalBordersEnabled=!0,this.areAlternateRowsEnabled=!0,this.allowSelectTask=!0,this.firstDayOfWeek=0,this.editing=new d.EditingSettings,this.validation=new s.ValidationSettings,this.stripLines=new c.StripLineSettings,this.viewTypeRange=new a.ViewTypeRangeSettings}return h.parse=function(g){var _=new h;return g&&((0,S.isDefined)(g.viewType)&&(_.viewType=g.viewType),(0,S.isDefined)(g.taskTitlePosition)&&(_.taskTitlePosition=g.taskTitlePosition),(0,S.isDefined)(g.showResources)&&(_.showResources=g.showResources),(0,S.isDefined)(g.showDependencies)&&(_.showDependencies=g.showDependencies),(0,S.isDefined)(g.areHorizontalBordersEnabled)&&(_.areHorizontalBordersEnabled=g.areHorizontalBordersEnabled),(0,S.isDefined)(g.areVerticalBordersEnabled)&&(_.areHorizontalBordersEnabled=g.areHorizontalBordersEnabled),(0,S.isDefined)(g.areAlternateRowsEnabled)&&(_.areAlternateRowsEnabled=g.areAlternateRowsEnabled),(0,S.isDefined)(g.allowSelectTask)&&(_.allowSelectTask=g.allowSelectTask),(0,S.isDefined)(g.firstDayOfWeek)&&(_.firstDayOfWeek=g.firstDayOfWeek),(0,S.isDefined)(g.startDateRange)&&(_.startDateRange=new Date(g.startDateRange)),(0,S.isDefined)(g.endDateRange)&&(_.endDateRange=new Date(g.endDateRange)),(0,S.isDefined)(g.editing)&&(_.editing=d.EditingSettings.parse(g.editing)),(0,S.isDefined)(g.validation)&&(_.validation=s.ValidationSettings.parse(g.validation)),(0,S.isDefined)(g.stripLines)&&(_.stripLines=c.StripLineSettings.parse(g.stripLines)),(0,S.isDefined)(g.viewTypeRange)&&(_.viewTypeRange=a.ViewTypeRangeSettings.parse(g.viewTypeRange)),(0,S.isDefined)(g.taskTooltipContentTemplate)&&(_.taskTooltipContentTemplate=g.taskTooltipContentTemplate),(0,S.isDefined)(g.taskProgressTooltipContentTemplate)&&(_.taskProgressTooltipContentTemplate=g.taskProgressTooltipContentTemplate),(0,S.isDefined)(g.taskTimeTooltipContentTemplate)&&(_.taskTimeTooltipContentTemplate=g.taskTimeTooltipContentTemplate),(0,S.isDefined)(g.taskContentTemplate)&&(_.taskContentTemplate=g.taskContentTemplate),(0,S.isDefined)(g.cultureInfo)&&(_.cultureInfo=g.cultureInfo)),_},h.prototype.equal=function(g){var _=!0;return(_=(_=(_=(_=(_=(_=(_=(_=(_=(_=(_=_&&this.viewType===g.viewType)&&this.taskTitlePosition===g.taskTitlePosition)&&this.showResources===g.showResources)&&this.showDependencies===g.showDependencies)&&this.areHorizontalBordersEnabled===g.areHorizontalBordersEnabled)&&this.areAlternateRowsEnabled===g.areAlternateRowsEnabled)&&this.allowSelectTask===g.allowSelectTask)&&this.editing.equal(g.editing))&&this.validation.equal(g.validation))&&this.stripLines.equal(g.stripLines))&&T.DateTimeUtils.areDatesEqual(this.startDateRange,g.startDateRange))&&T.DateTimeUtils.areDatesEqual(this.endDateRange,g.endDateRange)},h}();b.Settings=u},1442:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.StripLine=void 0;var S=f(2491),T=function(){function y(d,c,s,a,u){this.isCurrent=!1,this.start=d,this.end=c,this.title=s,this.cssClass=a,this.isCurrent=u}return y.parse=function(d){var c=new y;return d&&((0,S.isDefined)(d.start)&&(c.start=d.start),(0,S.isDefined)(d.end)&&(c.end=d.end),(0,S.isDefined)(d.title)&&(c.title=d.title),(0,S.isDefined)(d.cssClass)&&(c.cssClass=d.cssClass)),c},y.prototype.clone=function(){return new y(this.start,this.end,this.title,this.cssClass,this.isCurrent)},y.prototype.equal=function(d){var c=!0;return(c=(c=(c=c&&this.start==d.start)&&this.end==d.end)&&this.title==d.title)&&this.cssClass==d.cssClass},y}();b.StripLine=T},9057:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.StripLineSettings=void 0;var S=f(2491),T=f(1442),y=function(){function d(){this.showCurrentTime=!1,this.currentTimeUpdateInterval=6e4,this.stripLines=[]}return d.parse=function(c){var s=new d;if(c&&((0,S.isDefined)(c.showCurrentTime)&&(s.showCurrentTime=c.showCurrentTime),(0,S.isDefined)(c.currentTimeUpdateInterval)&&(s.currentTimeUpdateInterval=c.currentTimeUpdateInterval),(0,S.isDefined)(c.currentTimeTitle)&&(s.currentTimeTitle=c.currentTimeTitle),(0,S.isDefined)(c.currentTimeCssClass)&&(s.currentTimeCssClass=c.currentTimeCssClass),(0,S.isDefined)(c.stripLines)))for(var a=0;a<c.stripLines.length;a++)s.stripLines.push(T.StripLine.parse(c.stripLines[a]));return s},d.prototype.equal=function(c){var s=!0;if(s=(s=(s=(s=(s=s&&this.showCurrentTime==c.showCurrentTime)&&this.currentTimeUpdateInterval==c.currentTimeUpdateInterval)&&this.currentTimeTitle==c.currentTimeTitle)&&this.currentTimeCssClass==c.currentTimeCssClass)&&this.stripLines.length===c.stripLines.length)for(var a=0;a<c.stripLines.length;a++)s=s&&this.stripLines[a].equal(c.stripLines[a]);return s},d}();b.StripLineSettings=y},2762:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ValidationSettings=void 0;var S=f(2491),T=function(){function y(){this.validateDependencies=!1,this.autoUpdateParentTasks=!1,this.enablePredecessorGap=!1}return y.parse=function(d){var c=new y;return d&&((0,S.isDefined)(d.validateDependencies)&&(c.validateDependencies=d.validateDependencies),(0,S.isDefined)(d.autoUpdateParentTasks)&&(c.autoUpdateParentTasks=d.autoUpdateParentTasks),(0,S.isDefined)(d.enablePredecessorGap)&&(c.enablePredecessorGap=d.enablePredecessorGap)),c},y.prototype.equal=function(d){var c=!0;return(c=(c=c&&this.validateDependencies===d.validateDependencies)&&this.autoUpdateParentTasks===d.autoUpdateParentTasks)&&this.enablePredecessorGap===d.enablePredecessorGap},y}();b.ValidationSettings=T},9820:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ViewTypeRangeSettings=void 0;var S=f(2491),T=f(2449),y=function(){function d(){this.min=T.ViewType.TenMinutes,this.max=T.ViewType.Years}return d.parse=function(c){var s=new d;return c&&((0,S.isDefined)(c.min)&&(s.min=c.min),(0,S.isDefined)(c.max)&&(s.max=c.max)),s},d.prototype.equal=function(c){var s=!0;return(s=s&&this.min===c.min)&&this.max===c.max},d}();b.ViewTypeRangeSettings=y},9201:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DateUtils=void 0;var S=f(2449),T=function(){function y(){}var d;return y.getDaysInQuarter=function(c){var s=3*Math.floor(c.getMonth()/3);return[s,s+1,s+2].reduce(function(a,u){return a+y.getDaysInMonth(u,c.getFullYear())},0)},y.getDaysInMonth=function(c,s){return new Date(s,c+1,0).getDate()},y.getOffsetInMonths=function(c,s){return 12*(s.getFullYear()-c.getFullYear())+s.getMonth()-c.getMonth()},y.getOffsetInQuarters=function(c,s){return 4*(s.getFullYear()-c.getFullYear())+Math.floor(s.getMonth()/3)-Math.floor(c.getMonth()/3)},y.getNearestScaleTickDate=function(c,s,a,u){var h=new Date,g=s.start.getTime(),_=s.end.getTime();if(h.setTime(c.getTime()),c.getTime()<g)h.setTime(g);else if(c.getTime()>_)h.setTime(_);else if(this.needCorrectDate(c,g,a,u)){var x=this.getNearestLeftTickTime(c,g,a,u),w=this.getNextTickTime(x,a,u);Math.abs(c.getTime()-x)>Math.abs(c.getTime()-w)?h.setTime(w):h.setTime(x)}return h},y.needCorrectDate=function(c,s,a,u){return u==S.ViewType.Months?c.getTime()!==new Date(c.getFullYear(),c.getMonth(),1).getTime():(c.getTime()-s)%a!=0},y.getNearestLeftTickTime=function(c,s,a,u){return u==S.ViewType.Months?new Date(c.getFullYear(),c.getMonth(),1).getTime():s+Math.floor((c.getTime()-s)/a)*a},y.getNextTickTime=function(c,s,a){if(a==S.ViewType.Months){var u=new Date;return u.setTime(c),u.setMonth(u.getMonth()+1),u.getTime()}return c+s},y.adjustStartDateByViewType=function(c,s,a){switch(void 0===a&&(a=0),s){case S.ViewType.TenMinutes:return new Date(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours());case S.ViewType.SixHours:case S.ViewType.Hours:return new Date(c.getFullYear(),c.getMonth(),c.getDate());case S.ViewType.Days:case S.ViewType.Weeks:return new Date(c.getFullYear(),c.getMonth(),c.getDate()-c.getDay()+a);case S.ViewType.Months:case S.ViewType.Quarter:case S.ViewType.Years:return new Date(c.getFullYear(),0,1);default:return new Date}},y.adjustEndDateByViewType=function(c,s,a){switch(void 0===a&&(a=0),s){case S.ViewType.TenMinutes:return new Date(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours()+1);case S.ViewType.SixHours:case S.ViewType.Hours:return new Date(c.getFullYear(),c.getMonth(),c.getDate()+1);case S.ViewType.Days:case S.ViewType.Weeks:return new Date(c.getFullYear(),c.getMonth(),c.getDate()+7-c.getDay()+a);case S.ViewType.Months:case S.ViewType.Quarter:case S.ViewType.Years:return new Date(c.getFullYear()+1,0,1);default:return new Date}},y.roundStartDate=function(c,s){switch(s){case S.ViewType.TenMinutes:case S.ViewType.Hours:return new Date(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours()-1);case S.ViewType.SixHours:case S.ViewType.Days:return new Date(c.getFullYear(),c.getMonth(),c.getDate()-1);case S.ViewType.Weeks:return new Date(c.getFullYear(),c.getMonth(),c.getDate()-c.getDay());case S.ViewType.Months:return new Date(c.getFullYear(),c.getMonth()-1);case S.ViewType.Quarter:case S.ViewType.Years:return new Date(c.getFullYear()-1,0,1);default:return new Date}},y.getTickTimeSpan=function(c){switch(c){case S.ViewType.TenMinutes:return y.msPerHour/6;case S.ViewType.Hours:return y.msPerHour;case S.ViewType.SixHours:return 6*y.msPerHour;case S.ViewType.Days:return y.msPerDay;case S.ViewType.Weeks:return y.msPerWeek;case S.ViewType.Months:return y.msPerMonth;case S.ViewType.Quarter:return 3*y.msPerMonth;case S.ViewType.Years:return y.msPerYear}},y.getRangeTickCount=function(c,s,a){return a===S.ViewType.Months?this.getRangeTickCountInMonthsViewType(c,s):a===S.ViewType.Quarter?this.getRangeTickCountInQuarterViewType(c,s):y.getRangeMSPeriod(c,s)/y.getTickTimeSpan(a)},y.getRangeMSPeriod=function(c,s){return s.getTime()-y.getDSTTotalDelta(c,s)-c.getTime()},y.getRangeTickCountInMonthsViewType=function(c,s){var a=new Date(c.getFullYear(),c.getMonth(),1),u=new Date(s.getFullYear(),s.getMonth(),1);return y.getOffsetInMonths(a,u)+(s.getTime()-u.getTime())/(y.getDaysInMonth(s.getMonth(),s.getFullYear())*y.msPerDay)-(c.getTime()-a.getTime())/(y.getDaysInMonth(c.getMonth(),c.getFullYear())*y.msPerDay)},y.getRangeTickCountInQuarterViewType=function(c,s){var a=new Date(c.getFullYear(),3*Math.floor(c.getMonth()/3),1),u=new Date(s.getFullYear(),3*Math.floor(s.getMonth()/3),1);return y.getOffsetInQuarters(a,u)+(s.getTime()-u.getTime())/(y.getDaysInQuarter(u)*y.msPerDay)-(c.getTime()-a.getTime())/(y.getDaysInQuarter(a)*y.msPerDay)},y.parse=function(c){return"function"==typeof c?new Date(c()):new Date(c)},y.getOrCreateUTCDate=function(c){var s=c.getTimezoneOffset();return s?new Date(c.valueOf()+6e4*s):c},y.getTimezoneOffsetDiff=function(c,s){return s.getTimezoneOffset()-c.getTimezoneOffset()},y.getDSTDelta=function(c,s){var a=y.getTimezoneOffsetDiff(c,s)*y.msPerMinute;return a>0?a:0},y.getDSTTotalDelta=function(c,s){if(!y.hasDST())return 0;for(var a=c,u=0,h=a.getFullYear(),g=a.getMonth();a<s;){g>=5?(h++,g=0):g=5;var _=new Date(h,g,1);_>s&&(_=s),u+=y.getDSTDelta(a,_),a=_}return u},y.getDSTCorrectedTaskEnd=function(c,s){var a=c.getTime()+s,u=y.getDSTTotalDelta(c,new Date(a));return new Date(a+u)},y.hasDST=function(){var c=(new Date).getFullYear(),s=new Date(c,0,1),a=new Date(c,5,1);return 0!==y.getTimezoneOffsetDiff(s,a)},y.msPerMinute=6e4,y.msPerWeek=7*(y.msPerDay=24*(y.msPerHour=36e5)),y.msPerMonth=30*y.msPerDay,y.msPerYear=365*y.msPerDay,y.ViewTypeToScaleMap=((d={})[S.ViewType.TenMinutes]=S.ViewType.Hours,d[S.ViewType.Hours]=S.ViewType.Days,d[S.ViewType.SixHours]=S.ViewType.Days,d[S.ViewType.Days]=S.ViewType.Weeks,d[S.ViewType.Weeks]=S.ViewType.Months,d[S.ViewType.Months]=S.ViewType.Years,d[S.ViewType.Quarter]=S.ViewType.Years,d[S.ViewType.Years]=S.ViewType.FiveYears,d),y}();b.DateUtils=T},8380:(P,b,f)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ElementTextHelper=void 0;var S=f(6907),T=f(2449),y=f(9201),d=function(){function c(s){this.longestAbbrMonthName=null,this.longestMonthName=null,this.longestAbbrDayName=null;var a=document.createElement("canvas");this.textMeasureContext=a.getContext("2d"),this.cultureInfo=s}return c.prototype.setFont=function(s){var a=S.DomUtils.getCurrentStyle(s);this.textMeasureContext.font=a.font?a.font:a.fontStyle+" "+a.fontVariant+" "+a.fontWeight+" "+a.fontSize+" / "+a.lineHeight+" "+a.fontFamily},c.prototype.setSettings=function(s,a,u){this.startTime=s,this.viewType=a,this.modelItems=u},c.prototype.getScaleItemText=function(s,a){var u=this.viewType.valueOf()===a.valueOf();switch(a){case T.ViewType.TenMinutes:return this.getTenMinutesScaleItemText(s);case T.ViewType.Hours:case T.ViewType.SixHours:return this.getHoursScaleItemText(s);case T.ViewType.Days:return this.getDaysScaleItemText(s,u);case T.ViewType.Weeks:return this.getWeeksScaleItemText(s,u);case T.ViewType.Months:return this.getMonthsScaleItemText(s,u);case T.ViewType.Quarter:return this.getQuarterScaleItemText(s,u);case T.ViewType.Years:return this.getYearsScaleItemText(s);case T.ViewType.FiveYears:return this.getFiveYearsScaleItemText(s)}},c.prototype.getTenMinutesScaleItemText=function(s){var a=s.getMinutes()+1;return(10*Math.ceil(a/10)).toString()},c.prototype.getThirtyMinutesScaleItemText=function(s){return s.getMinutes()<30?"30":"60"},c.prototype.getHoursScaleItemText=function(s){var a=s.getHours(),u=this.getHourDisplayText(a),h=a<12?this.getAmText():this.getPmText();return this.getHoursScaleItemTextCore(u,h)},c.prototype.getDaysScaleItemText=function(s,a){return this.getDayTotalText(s,!0,a,a,!a)},c.prototype.getWeeksScaleItemText=function(s,a){var u=y.DateUtils.getDSTCorrectedTaskEnd(s,y.DateUtils.msPerWeek-y.DateUtils.msPerDay);return this.getWeeksScaleItemTextCore(this.getDayTotalText(s,a,!0,a,!a),this.getDayTotalText(u,a,!0,a,!a))},c.prototype.getMonthsScaleItemText=function(s,a){var u=this.getMonthNames(),h=a?"":s.getFullYear().toString();return this.getMonthsScaleItemTextCore(u[s.getMonth()],h)},c.prototype.getQuarterScaleItemText=function(s,a){var u=this.getQuarterNames(),h=a?"":s.getFullYear().toString();return this.getMonthsScaleItemTextCore(u[Math.floor(s.getMonth()/3)],h)},c.prototype.getYearsScaleItemText=function(s){return s.getFullYear().toString()},c.prototype.getFiveYearsScaleItemText=function(s){return s.getFullYear().toString()+" - "+(s.getFullYear()+4).toString()},c.prototype.getHourDisplayText=function(s){return this.hasAmPm()?(0==s?12:s<=12?s:s-12).toString():s<10?"0"+s:s.toString()},c.prototype.getDayTotalText=function(s,a,u,h,g){var _=h?this.getAbbrMonthNames():this.getMonthNames(),x=u?this.getAbbrDayNames():this.getDayNames(),w=a?x[s.getDay()]:"",D=s.getDate(),C=_[s.getMonth()],I=g?s.getFullYear().toString():"";return this.getDayTotalTextCore(w,D.toString(),C,I)},c.prototype.getTaskText=function(s){var a=this.modelItems[s];return a?a.task.title:""},c.prototype.getTaskVisibility=function(s){var a=this.modelItems[s];return!!a&&a.getVisible()},c.prototype.hasAmPm=function(){return this.getAmText().length>0||this.getPmText().length>0},c.prototype.getScaleItemTextTemplate=function(s){switch(s){case T.ViewType.TenMinutes:return"00";case T.ViewType.Hours:case T.ViewType.SixHours:return this.getHoursScaleItemTextCore("00",this.getAmText());case T.ViewType.Days:return this.getDayTextTemplate();case T.ViewType.Weeks:return this.getWeekTextTemplate();case T.ViewType.Months:return this.getMonthsScaleItemTextCore(this.getLongestMonthName(),"");case T.ViewType.Quarter:return"Q4";case T.ViewType.Years:return"0000"}},c.prototype.getDayTextTemplate=function(){return this.getDayTotalTextCore(this.getLongestAbbrDayName(),"00",this.getLongestAbbrMonthName(),"")},c.prototype.getWeekTextTemplate=function(){var s=this.getDayTextTemplate();return this.getWeeksScaleItemTextCore(s,s)},c.prototype.getHoursScaleItemTextCore=function(s,a){return s+":00"+(this.hasAmPm()?" "+a:"")},c.prototype.getDayTotalTextCore=function(s,a,u,h){var g=s.length>0?s+", ":"";return(g+=a+" "+u)+(h.length>0?" "+h:"")},c.prototype.getWeeksScaleItemTextCore=function(s,a){return s+" - "+a},c.prototype.getMonthsScaleItemTextCore=function(s,a){var u=s;return a.length>0&&(u+=" "+a),u},c.prototype.getLongestAbbrMonthName=function(){return null==this.longestAbbrMonthName&&(this.longestAbbrMonthName=this.getLongestText(this.getAbbrMonthNames())),this.longestAbbrMonthName},c.prototype.getLongestMonthName=function(){return null==this.longestMonthName&&(this.longestMonthName=this.getLongestText(this.getMonthNames())),this.longestMonthName},c.prototype.getLongestAbbrDayName=function(){return null==this.longestAbbrDayName&&(this.longestAbbrDayName=this.getLongestText(this.getAbbrDayNames())),this.longestAbbrDayName},c.prototype.getLongestText=function(s){var a=this,u="",h=0;return s.forEach(function(g){var _=a.getTextWidth(g);_>h&&(h=_,u=g)}),u},c.prototype.getTextWidth=function(s){return Math.round(this.textMeasureContext.measureText(s).width)},c.prototype.getAmText=function(){return this.cultureInfo.amText},c.prototype.getPmText=function(){return this.cultureInfo.pmText},c.prototype.getQuarterNames=function(){return this.cultureInfo.quarterNames},c.prototype.getMonthNames=function(){return this.cultureInfo.monthNames},c.prototype.getDayNames=function(){return this.cultureInfo.dayNames},c.prototype.getAbbrMonthNames=function(){return this.cultureInfo.abbrMonthNames},c.prototype.getAbbrDayNames=function(){return this.cultureInfo.abbrDayNames},c}();b.ElementTextHelper=d},655:(P,b,f)=>{f.r(b),f.d(b,{__assign:()=>y,__asyncDelegator:()=>G,__asyncGenerator:()=>N,__asyncValues:()=>k,__await:()=>L,__awaiter:()=>u,__classPrivateFieldGet:()=>ie,__classPrivateFieldSet:()=>re,__createBinding:()=>g,__decorate:()=>c,__exportStar:()=>_,__extends:()=>T,__generator:()=>h,__importDefault:()=>J,__importStar:()=>K,__makeTemplateObject:()=>U,__metadata:()=>a,__param:()=>s,__read:()=>w,__rest:()=>d,__spread:()=>D,__spreadArray:()=>I,__spreadArrays:()=>C,__values:()=>x});var S=function(q,Y){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Z,Q){Z.__proto__=Q}||function(Z,Q){for(var te in Q)Object.prototype.hasOwnProperty.call(Q,te)&&(Z[te]=Q[te])})(q,Y)};function T(q,Y){if("function"!=typeof Y&&null!==Y)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");function Z(){this.constructor=q}S(q,Y),q.prototype=null===Y?Object.create(Y):(Z.prototype=Y.prototype,new Z)}var y=function(){return y=Object.assign||function(q){for(var Y,Z=1,Q=arguments.length;Z<Q;Z++)for(var te in Y=arguments[Z])Object.prototype.hasOwnProperty.call(Y,te)&&(q[te]=Y[te]);return q},y.apply(this,arguments)};function d(q,Y){var Z={};for(var Q in q)Object.prototype.hasOwnProperty.call(q,Q)&&Y.indexOf(Q)<0&&(Z[Q]=q[Q]);if(null!=q&&"function"==typeof Object.getOwnPropertySymbols){var te=0;for(Q=Object.getOwnPropertySymbols(q);te<Q.length;te++)Y.indexOf(Q[te])<0&&Object.prototype.propertyIsEnumerable.call(q,Q[te])&&(Z[Q[te]]=q[Q[te]])}return Z}function c(q,Y,Z,Q){var te,pe=arguments.length,z=pe<3?Y:null===Q?Q=Object.getOwnPropertyDescriptor(Y,Z):Q;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)z=Reflect.decorate(q,Y,Z,Q);else for(var oe=q.length-1;oe>=0;oe--)(te=q[oe])&&(z=(pe<3?te(z):pe>3?te(Y,Z,z):te(Y,Z))||z);return pe>3&&z&&Object.defineProperty(Y,Z,z),z}function s(q,Y){return function(Z,Q){Y(Z,Q,q)}}function a(q,Y){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(q,Y)}function u(q,Y,Z,Q){return new(Z||(Z=Promise))(function(te,pe){function z(ee){try{ae(Q.next(ee))}catch(he){pe(he)}}function oe(ee){try{ae(Q.throw(ee))}catch(he){pe(he)}}function ae(ee){var he;ee.done?te(ee.value):(he=ee.value,he instanceof Z?he:new Z(function(de){de(he)})).then(z,oe)}ae((Q=Q.apply(q,Y||[])).next())})}function h(q,Y){var Z,Q,te,pe,z={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return pe={next:oe(0),throw:oe(1),return:oe(2)},"function"==typeof Symbol&&(pe[Symbol.iterator]=function(){return this}),pe;function oe(ae){return function(ee){return function(he){if(Z)throw new TypeError("Generator is already executing.");for(;z;)try{if(Z=1,Q&&(te=2&he[0]?Q.return:he[0]?Q.throw||((te=Q.return)&&te.call(Q),0):Q.next)&&!(te=te.call(Q,he[1])).done)return te;switch(Q=0,te&&(he=[2&he[0],te.value]),he[0]){case 0:case 1:te=he;break;case 4:return z.label++,{value:he[1],done:!1};case 5:z.label++,Q=he[1],he=[0];continue;case 7:he=z.ops.pop(),z.trys.pop();continue;default:if(!((te=(te=z.trys).length>0&&te[te.length-1])||6!==he[0]&&2!==he[0])){z=0;continue}if(3===he[0]&&(!te||he[1]>te[0]&&he[1]<te[3])){z.label=he[1];break}if(6===he[0]&&z.label<te[1]){z.label=te[1],te=he;break}if(te&&z.label<te[2]){z.label=te[2],z.ops.push(he);break}te[2]&&z.ops.pop(),z.trys.pop();continue}he=Y.call(q,z)}catch(de){he=[6,de],Q=0}finally{Z=te=0}if(5&he[0])throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}([ae,ee])}}}var g=Object.create?function(q,Y,Z,Q){void 0===Q&&(Q=Z),Object.defineProperty(q,Q,{enumerable:!0,get:function(){return Y[Z]}})}:function(q,Y,Z,Q){void 0===Q&&(Q=Z),q[Q]=Y[Z]};function _(q,Y){for(var Z in q)"default"===Z||Object.prototype.hasOwnProperty.call(Y,Z)||g(Y,q,Z)}function x(q){var Y="function"==typeof Symbol&&Symbol.iterator,Z=Y&&q[Y],Q=0;if(Z)return Z.call(q);if(q&&"number"==typeof q.length)return{next:function(){return q&&Q>=q.length&&(q=void 0),{value:q&&q[Q++],done:!q}}};throw new TypeError(Y?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(q,Y){var Z="function"==typeof Symbol&&q[Symbol.iterator];if(!Z)return q;var Q,te,pe=Z.call(q),z=[];try{for(;(void 0===Y||Y-- >0)&&!(Q=pe.next()).done;)z.push(Q.value)}catch(oe){te={error:oe}}finally{try{Q&&!Q.done&&(Z=pe.return)&&Z.call(pe)}finally{if(te)throw te.error}}return z}function D(){for(var q=[],Y=0;Y<arguments.length;Y++)q=q.concat(w(arguments[Y]));return q}function C(){for(var q=0,Y=0,Z=arguments.length;Y<Z;Y++)q+=arguments[Y].length;var Q=Array(q),te=0;for(Y=0;Y<Z;Y++)for(var pe=arguments[Y],z=0,oe=pe.length;z<oe;z++,te++)Q[te]=pe[z];return Q}function I(q,Y,Z){if(Z||2===arguments.length)for(var Q,te=0,pe=Y.length;te<pe;te++)!Q&&te in Y||(Q||(Q=Array.prototype.slice.call(Y,0,te)),Q[te]=Y[te]);return q.concat(Q||Array.prototype.slice.call(Y))}function L(q){return this instanceof L?(this.v=q,this):new L(q)}function N(q,Y,Z){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Q,te=Z.apply(q,Y||[]),pe=[];return Q={},z("next"),z("throw"),z("return"),Q[Symbol.asyncIterator]=function(){return this},Q;function z(de){te[de]&&(Q[de]=function(ue){return new Promise(function(be,ve){pe.push([de,ue,be,ve])>1||oe(de,ue)})})}function oe(de,ue){try{(be=te[de](ue)).value instanceof L?Promise.resolve(be.value.v).then(ae,ee):he(pe[0][2],be)}catch(ve){he(pe[0][3],ve)}var be}function ae(de){oe("next",de)}function ee(de){oe("throw",de)}function he(de,ue){de(ue),pe.shift(),pe.length&&oe(pe[0][0],pe[0][1])}}function G(q){var Y,Z;return Y={},Q("next"),Q("throw",function(te){throw te}),Q("return"),Y[Symbol.iterator]=function(){return this},Y;function Q(te,pe){Y[te]=q[te]?function(z){return(Z=!Z)?{value:L(q[te](z)),done:"return"===te}:pe?pe(z):z}:pe}}function k(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Y,Z=q[Symbol.asyncIterator];return Z?Z.call(q):(q=x(q),Y={},Q("next"),Q("throw"),Q("return"),Y[Symbol.asyncIterator]=function(){return this},Y);function Q(te){Y[te]=q[te]&&function(pe){return new Promise(function(z,oe){var ae,ee,he;ae=z,ee=oe,he=(pe=q[te](pe)).done,Promise.resolve(pe.value).then(function(ue){ae({value:ue,done:he})},ee)})}}}function U(q,Y){return Object.defineProperty?Object.defineProperty(q,"raw",{value:Y}):q.raw=Y,q}var B=Object.create?function(q,Y){Object.defineProperty(q,"default",{enumerable:!0,value:Y})}:function(q,Y){q.default=Y};function K(q){if(q&&q.__esModule)return q;var Y={};if(null!=q)for(var Z in q)"default"!==Z&&Object.prototype.hasOwnProperty.call(q,Z)&&g(Y,q,Z);return B(Y,q),Y}function J(q){return q&&q.__esModule?q:{default:q}}function ie(q,Y,Z,Q){if("a"===Z&&!Q)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof Y?q!==Y||!Q:!Y.has(q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===Z?Q:"a"===Z?Q.call(q):Q?Q.value:Y.get(q)}function re(q,Y,Z,Q,te){if("m"===Q)throw new TypeError("Private method is not writable");if("a"===Q&&!te)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof Y?q!==Y||!te:!Y.has(q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===Q?te.call(q,Z):te?te.value=Z:Y.set(q,Z),Z}}},M={};function W(P){var b=M[P];if(void 0!==b)return b.exports;var f=M[P]={exports:{}};return Ze[P](f,f.exports,W),f.exports}W.d=(P,b)=>{for(var f in b)W.o(b,f)&&!W.o(P,f)&&Object.defineProperty(P,f,{enumerable:!0,get:b[f]})},W.o=(P,b)=>Object.prototype.hasOwnProperty.call(P,b),W.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var o={};return(()=>{var P=o;Object.defineProperty(P,"__esModule",{value:!0}),P.GanttView=P.default=void 0,W(8721);var b=W(2366);Object.defineProperty(P,"default",{enumerable:!0,get:function(){return b.GanttView}}),Object.defineProperty(P,"GanttView",{enumerable:!0,get:function(){return b.GanttView}})})(),o})(),In.exports=M()},681:function(In){var W;W=()=>(()=>{var Ze={1674:(P,b,f)=>{"use strict";f.d(b,{Z:()=>G});var S=f(1233),T=f(3866),y=f(3398);function d(k){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(U){return typeof U}:function(U){return U&&"function"==typeof Symbol&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(k)}function s(k,U){for(var B=0;B<U.length;B++){var K=U[B];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(k,u(K.key),K)}}function u(k){var U=function h(k,U){if("object"!==d(k)||null===k)return k;var B=k[Symbol.toPrimitive];if(void 0!==B){var K=B.call(k,U||"default");if("object"!==d(K))return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===U?String:Number)(k)}(k,"string");return"symbol"===d(U)?U:String(U)}function g(){return g=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(U,B,K){var J=function _(k,U){for(;!Object.prototype.hasOwnProperty.call(k,U)&&null!==(k=N(k)););return k}(U,B);if(J){var ie=Object.getOwnPropertyDescriptor(J,B);return ie.get?ie.get.call(arguments.length<3?U:K):ie.value}},g.apply(this,arguments)}function w(k,U){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,J){return K.__proto__=J,K})(k,U)}function N(k){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)})(k)}var G=function(k){!function x(k,U){if("function"!=typeof U&&null!==U)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(U&&U.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),Object.defineProperty(k,"prototype",{writable:!1}),U&&w(k,U)}(B,k);var U=function D(k){var U=function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var J,K=N(k);if(U){var ie=N(this).constructor;J=Reflect.construct(K,arguments,ie)}else J=K.apply(this,arguments);return function C(k,U){if(U&&("object"===d(U)||"function"==typeof U))return U;if(void 0!==U)throw new TypeError("Derived constructors may only return object or undefined");return function I(k){if(void 0===k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}(k)}(this,J)}}(B);function B(K,J){var ie,re,q=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{allowedTags:[]};return function c(k,U){if(!(k instanceof U))throw new TypeError("Cannot call a class as a function")}(this,B),(re=U.call(this,K,J,q)).allowedTags=null!==(ie=q.allowedTags)&&void 0!==ie?ie:[],re}return function a(k,U,B){U&&s(k.prototype,U),B&&s(k,B),Object.defineProperty(k,"prototype",{writable:!1})}(B,[{key:"add",value:function(J,ie){return T.Mx.call(this,g(N(B.prototype),"add",this),J,ie)}},{key:"remove",value:function(J){return T.Mx.call(this,g(N(B.prototype),"remove",this),J)}},{key:"value",value:function(J){return T.Mx.call(this,g(N(B.prototype),"value",this),J)}},{key:"canAdd",value:function(J,ie){return T.ud.call(this,g(N(B.prototype),"canAdd",this),J,ie)}}],[{key:"keys",value:function(J){return(0,T.dj)(g(N(B),"keys",this),J,y.WT.attribute)}}]),B}(S.Attributor)},3866:(P,b,f)=>{"use strict";f.d(b,{Mx:()=>T,dj:()=>d,ud:()=>y});var S=f(3398);function T(c){var s=this.keyName;this.keyName=(0,S.mQ)(this.keyName);for(var a=arguments.length,u=new Array(a>1?a-1:0),h=1;h<a;h++)u[h-1]=arguments[h];var g=c.call.apply(c,[this].concat(u));return this.keyName=s,g}function y(c,s,a){return this.allowedTags.indexOf(s.tagName)>-1&&c.call(this,s,a)}function d(c,s,a){return c(s).map(function(u){return(0,S.jf)(s.tagName,u,a)})}},4569:(P,b,f)=>{"use strict";f.d(b,{Z:()=>G});var S=f(1233),T=f(3866),y=f(3398);function d(k){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(U){return typeof U}:function(U){return U&&"function"==typeof Symbol&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(k)}function s(k,U){for(var B=0;B<U.length;B++){var K=U[B];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(k,u(K.key),K)}}function u(k){var U=function h(k,U){if("object"!==d(k)||null===k)return k;var B=k[Symbol.toPrimitive];if(void 0!==B){var K=B.call(k,U||"default");if("object"!==d(K))return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===U?String:Number)(k)}(k,"string");return"symbol"===d(U)?U:String(U)}function g(){return g=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(U,B,K){var J=function _(k,U){for(;!Object.prototype.hasOwnProperty.call(k,U)&&null!==(k=N(k)););return k}(U,B);if(J){var ie=Object.getOwnPropertyDescriptor(J,B);return ie.get?ie.get.call(arguments.length<3?U:K):ie.value}},g.apply(this,arguments)}function w(k,U){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,J){return K.__proto__=J,K})(k,U)}function N(k){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)})(k)}var G=function(k){!function x(k,U){if("function"!=typeof U&&null!==U)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(U&&U.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),Object.defineProperty(k,"prototype",{writable:!1}),U&&w(k,U)}(B,k);var U=function D(k){var U=function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var J,K=N(k);if(U){var ie=N(this).constructor;J=Reflect.construct(K,arguments,ie)}else J=K.apply(this,arguments);return function C(k,U){if(U&&("object"===d(U)||"function"==typeof U))return U;if(void 0!==U)throw new TypeError("Derived constructors may only return object or undefined");return function I(k){if(void 0===k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}(k)}(this,J)}}(B);function B(K,J){var ie,re,q=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{allowedTags:[]};return function c(k,U){if(!(k instanceof U))throw new TypeError("Cannot call a class as a function")}(this,B),(re=U.call(this,K,J,q)).allowedTags=null!==(ie=q.allowedTags)&&void 0!==ie?ie:[],re}return function a(k,U,B){U&&s(k.prototype,U),B&&s(k,B),Object.defineProperty(k,"prototype",{writable:!1})}(B,[{key:"add",value:function(J,ie){return T.Mx.call(this,g(N(B.prototype),"add",this),J,ie)}},{key:"remove",value:function(J){return T.Mx.call(this,g(N(B.prototype),"remove",this),J)}},{key:"value",value:function(J){return T.Mx.call(this,g(N(B.prototype),"value",this),J)}},{key:"canAdd",value:function(J,ie){return T.ud.call(this,g(N(B.prototype),"canAdd",this),J,ie)}}],[{key:"keys",value:function(J){return(0,T.dj)(g(N(B),"keys",this),J,y.WT.style)}}]),B}(S.StyleAttributor)},3398:(P,b,f)=>{"use strict";f.d(b,{WT:()=>h,jf:()=>_,mQ:()=>x});var S=f(19),T=f(8252);function y(w){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(D){return typeof D}:function(D){return D&&"function"==typeof Symbol&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D})(w)}function d(w,D){var C=Object.keys(w);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(w);D&&(I=I.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),C.push.apply(C,I)}return C}function c(w){for(var D=1;D<arguments.length;D++){var C=null!=arguments[D]?arguments[D]:{};D%2?d(Object(C),!0).forEach(function(I){s(w,I,C[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(C)):d(Object(C)).forEach(function(I){Object.defineProperty(w,I,Object.getOwnPropertyDescriptor(C,I))})}return w}function s(w,D,C){return D=function a(w){var D=function u(w,D){if("object"!==y(w)||null===w)return w;var C=w[Symbol.toPrimitive];if(void 0!==C){var I=C.call(w,D||"default");if("object"!==y(I))return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===D?String:Number)(w)}(w,"string");return"symbol"===y(D)?D:String(D)}(D),D in w?Object.defineProperty(w,D,{value:C,enumerable:!0,configurable:!0,writable:!0}):w[D]=C,w}var h={attribute:"attr",style:"style"},g=c(c({},S.Sp.allowedTags.reduce(function(w,D){return w[D]={name:S.Sp.name,keyNamesSet:S.bc},w},{})),T.Pw.allowedTags.reduce(function(w,D){return w[D]={name:T.Pw.name,keyNamesSet:T.fU},w},{}));function _(w,D,C){var I=g[w];return I&&I.keyNamesSet.has(D)?"".concat(C).concat(I.name,"_").concat(D):D}function x(w){return w.replace(/([^]*_)/,"")}},6446:(P,b,f)=>{"use strict";f.d(b,{i2:()=>Q,qz:()=>te,E2:()=>pe,ZP:()=>Z});var S=f(9098),T=f.n(S),y=f(1233),d=f(4122),c=f(6603),s=f(8222),a=f(3398);function u(z,oe,ae,ee){return ae.map(he=>{const de=ee?(0,a.jf)(z,he,ee):he;return oe.scroll.query(de,y.Scope.ATTRIBUTE)}).filter(he=>he instanceof y.Attributor).reduce((he,de)=>(he[de.attrName]=de,he),{})}function g(z){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(oe){return typeof oe}:function(oe){return oe&&"function"==typeof Symbol&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe})(z)}function _(z,oe){var ae=Object.keys(z);if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(z);oe&&(ee=ee.filter(function(he){return Object.getOwnPropertyDescriptor(z,he).enumerable})),ae.push.apply(ae,ee)}return ae}function x(z){for(var oe=1;oe<arguments.length;oe++){var ae=null!=arguments[oe]?arguments[oe]:{};oe%2?_(Object(ae),!0).forEach(function(ee){w(z,ee,ae[ee])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(ae)):_(Object(ae)).forEach(function(ee){Object.defineProperty(z,ee,Object.getOwnPropertyDescriptor(ae,ee))})}return z}function w(z,oe,ae){return(oe=L(oe))in z?Object.defineProperty(z,oe,{value:ae,enumerable:!0,configurable:!0,writable:!0}):z[oe]=ae,z}function D(z,oe){if(!(z instanceof oe))throw new TypeError("Cannot call a class as a function")}function C(z,oe){for(var ae=0;ae<oe.length;ae++){var ee=oe[ae];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(z,L(ee.key),ee)}}function I(z,oe,ae){return oe&&C(z.prototype,oe),ae&&C(z,ae),Object.defineProperty(z,"prototype",{writable:!1}),z}function L(z){var oe=function N(z,oe){if("object"!==g(z)||null===z)return z;var ae=z[Symbol.toPrimitive];if(void 0!==ae){var ee=ae.call(z,oe||"default");if("object"!==g(ee))return ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===oe?String:Number)(z)}(z,"string");return"symbol"===g(oe)?oe:String(oe)}function G(){return G=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(oe,ae,ee){var he=function k(z,oe){for(;!Object.prototype.hasOwnProperty.call(z,oe)&&null!==(z=q(z)););return z}(oe,ae);if(he){var de=Object.getOwnPropertyDescriptor(he,ae);return de.get?de.get.call(arguments.length<3?oe:ee):de.value}},G.apply(this,arguments)}function U(z,oe){if("function"!=typeof oe&&null!==oe)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(oe&&oe.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),oe&&B(z,oe)}function B(z,oe){return(B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ee,he){return ee.__proto__=he,ee})(z,oe)}function K(z){var oe=function re(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var he,ee=q(z);if(oe){var de=q(this).constructor;he=Reflect.construct(ee,arguments,de)}else he=ee.apply(this,arguments);return function J(z,oe){if(oe&&("object"===g(oe)||"function"==typeof oe))return oe;if(void 0!==oe)throw new TypeError("Derived constructors may only return object or undefined");return function ie(z){if(void 0===z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}(z)}(this,he)}}function q(z){return(q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ae){return ae.__proto__||Object.getPrototypeOf(ae)})(z)}!function h(){y.AttributorStore.prototype.build=function(){const{tagName:z}=this.domNode,oe=y.Registry.find(this.domNode);if(null==oe)return;const ae=y.Attributor.keys(this.domNode),ee=y.ClassAttributor.keys(this.domNode),he=y.StyleAttributor.keys(this.domNode);this.attributes={...u(z,oe,ae,a.WT.attribute),...u(z,oe,ee),...u(z,oe,he,a.WT.style)}}}();var Z=function(z){U(ae,z);var oe=K(ae);function ae(ee,he){var de;return D(this,ae),(de=oe.call(this,ee,he)).cache={},de}return I(ae,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=te(this)),this.cache.delta}},{key:"deleteAt",value:function(he,de){G(q(ae.prototype),"deleteAt",this).call(this,he,de),this.cache={}}},{key:"formatAt",value:function(he,de,ue,be){de<=0||(this.scroll.query(ue,y.Scope.BLOCK)?he+de===this.length()&&this.format(ue,be):G(q(ae.prototype),"formatAt",this).call(this,he,Math.min(de,this.length()-he-1),ue,be),this.cache={})}},{key:"insertAt",value:function(he,de,ue){if(null!=ue)return G(q(ae.prototype),"insertAt",this).call(this,he,de,ue),void(this.cache={});if(0!==de.length){var be=de.split("\n"),ve=be.shift();ve.length>0&&(he<this.length()-1||null==this.children.tail?G(q(ae.prototype),"insertAt",this).call(this,Math.min(he,this.length()-1),ve):this.children.tail.insertAt(this.children.tail.length(),ve),this.cache={});var le=this;be.reduce(function(Ce,ye){return(le=le.split(Ce,!0)).insertAt(0,ye),ye.length},he+ve.length)}}},{key:"insertBefore",value:function(he,de){var ue=this.children.head;(!de||this.domNode.contains(de.domNode))&&G(q(ae.prototype),"insertBefore",this).call(this,he,de),ue instanceof d.Z&&ue.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=G(q(ae.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(he,de){G(q(ae.prototype),"moveChildren",this).call(this,he,de),this.cache={}}},{key:"optimize",value:function(he){G(q(ae.prototype),"optimize",this).call(this,he),this.cache={}}},{key:"path",value:function(he){return G(q(ae.prototype),"path",this).call(this,he,!0)}},{key:"removeChild",value:function(he){G(q(ae.prototype),"removeChild",this).call(this,he),this.cache={}}},{key:"split",value:function(he){var de=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(de&&(0===he||he>=this.length()-1)){var ue=this.clone();return 0===he?(this.parent.insertBefore(ue,this),this):(this.parent.insertBefore(ue,this.next),ue)}var be=G(q(ae.prototype),"split",this).call(this,he,de);return this.cache={},be}}]),ae}(y.BlockBlot);Z.blotName="block",Z.tagName="P",Z.defaultChild=d.Z,Z.allowedChildren=[d.Z,c.Z,y.EmbedBlot,s.Z];var Q=function(z){U(ae,z);var oe=K(ae);function ae(){return D(this,ae),oe.apply(this,arguments)}return I(ae,[{key:"attach",value:function(){G(q(ae.prototype),"attach",this).call(this),this.attributes=new y.AttributorStore(this.domNode)}},{key:"delta",value:function(){return(new(T())).insert(this.value(),x(x({},this.formats()),this.attributes.values()))}},{key:"format",value:function(he,de){var ue=this.scroll.query(he,y.Scope.BLOCK_ATTRIBUTE);null!=ue&&this.attributes.attribute(ue,de)}},{key:"formatAt",value:function(he,de,ue,be){this.format(ue,be)}},{key:"insertAt",value:function(he,de,ue){if("string"==typeof de&&de.endsWith("\n")){var be=this.scroll.create(Z.blotName);this.parent.insertBefore(be,0===he?this:this.next),be.insertAt(0,de.slice(0,-1))}else G(q(ae.prototype),"insertAt",this).call(this,he,de,ue)}}]),ae}(y.EmbedBlot);function te(z){var oe=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return z.descendants(y.LeafBlot).reduce(function(ae,ee){return 0===ee.length()?ae:ae.insert(ee.value(),pe(ee,{},oe))},new(T())).insert("\n",pe(z))}function pe(z){var oe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},ae=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==z||("function"==typeof z.formats&&(oe=x(x({},oe),z.formats()),ae&&delete oe["code-token"]),null==z.parent||"scroll"===z.parent.statics.blotName||z.parent.statics.scope!==z.statics.scope)?oe:pe(z.parent,oe,ae)}Q.scope=y.Scope.BLOCK_BLOT},4122:(P,b,f)=>{"use strict";function T(L){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(N){return typeof N}:function(N){return N&&"function"==typeof Symbol&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(L)}function d(L,N){for(var G=0;G<N.length;G++){var k=N[G];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(L,s(k.key),k)}}function s(L){var N=function a(L,N){if("object"!==T(L)||null===L)return L;var G=L[Symbol.toPrimitive];if(void 0!==G){var k=G.call(L,N||"default");if("object"!==T(k))return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===N?String:Number)(L)}(L,"string");return"symbol"===T(N)?N:String(N)}function h(L,N){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,U){return k.__proto__=U,k})(L,N)}function D(L){return(D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)})(L)}f.d(b,{Z:()=>I});var C=function(L){!function u(L,N){if("function"!=typeof N&&null!==N)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(N&&N.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),N&&h(L,N)}(G,L);var N=function g(L){var N=function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var U,k=D(L);if(N){var B=D(this).constructor;U=Reflect.construct(k,arguments,B)}else U=k.apply(this,arguments);return function _(L,N){if(N&&("object"===T(N)||"function"==typeof N))return N;if(void 0!==N)throw new TypeError("Derived constructors may only return object or undefined");return function x(L){if(void 0===L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(L)}(this,U)}}(G);function G(){return function y(L,N){if(!(L instanceof N))throw new TypeError("Cannot call a class as a function")}(this,G),N.apply(this,arguments)}return function c(L,N,G){N&&d(L.prototype,N),G&&d(L,G),Object.defineProperty(L,"prototype",{writable:!1})}(G,[{key:"optimize",value:function(){(this.prev||this.next)&&this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),G}(f(1233).EmbedBlot);C.blotName="break",C.tagName="BR";const I=C},3553:(P,b,f)=>{"use strict";function T(L){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(N){return typeof N}:function(N){return N&&"function"==typeof Symbol&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(L)}function y(L,N){for(var G=0;G<N.length;G++){var k=N[G];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(L,c(k.key),k)}}function c(L){var N=function s(L,N){if("object"!==T(L)||null===L)return L;var G=L[Symbol.toPrimitive];if(void 0!==G){var k=G.call(L,N||"default");if("object"!==T(k))return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===N?String:Number)(L)}(L,"string");return"symbol"===T(N)?N:String(N)}function h(L,N){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,U){return k.__proto__=U,k})(L,N)}function D(L){return(D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)})(L)}f.d(b,{Z:()=>I});var C=function(L){!function u(L,N){if("function"!=typeof N&&null!==N)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(N&&N.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),N&&h(L,N)}(G,L);var N=function g(L){var N=function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var U,k=D(L);if(N){var B=D(this).constructor;U=Reflect.construct(k,arguments,B)}else U=k.apply(this,arguments);return function _(L,N){if(N&&("object"===T(N)||"function"==typeof N))return N;if(void 0!==N)throw new TypeError("Derived constructors may only return object or undefined");return function x(L){if(void 0===L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(L)}(this,U)}}(G);function G(){return function a(L,N){if(!(L instanceof N))throw new TypeError("Cannot call a class as a function")}(this,G),N.apply(this,arguments)}return function d(L,N,G){return N&&y(L.prototype,N),G&&y(L,G),Object.defineProperty(L,"prototype",{writable:!1}),L}(G)}(f(1233).ContainerBlot);const I=C},3657:(P,b,f)=>{"use strict";f.d(b,{Z:()=>G});var S=f(1233),T=f(8222);function y(k){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(U){return typeof U}:function(U){return U&&"function"==typeof Symbol&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(k)}function c(k,U){for(var B=0;B<U.length;B++){var K=U[B];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(k,a(K.key),K)}}function a(k){var U=function u(k,U){if("object"!==y(k)||null===k)return k;var B=k[Symbol.toPrimitive];if(void 0!==B){var K=B.call(k,U||"default");if("object"!==y(K))return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===U?String:Number)(k)}(k,"string");return"symbol"===y(U)?U:String(U)}function h(){return h=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(U,B,K){var J=function g(k,U){for(;!Object.prototype.hasOwnProperty.call(k,U)&&null!==(k=L(k)););return k}(U,B);if(J){var ie=Object.getOwnPropertyDescriptor(J,B);return ie.get?ie.get.call(arguments.length<3?U:K):ie.value}},h.apply(this,arguments)}function x(k,U){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,J){return K.__proto__=J,K})(k,U)}function L(k){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)})(k)}var N=function(k){!function _(k,U){if("function"!=typeof U&&null!==U)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(U&&U.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),Object.defineProperty(k,"prototype",{writable:!1}),U&&x(k,U)}(B,k);var U=function w(k){var U=function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var J,K=L(k);if(U){var ie=L(this).constructor;J=Reflect.construct(K,arguments,ie)}else J=K.apply(this,arguments);return function D(k,U){if(U&&("object"===y(U)||"function"==typeof U))return U;if(void 0!==U)throw new TypeError("Derived constructors may only return object or undefined");return function C(k){if(void 0===k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}(k)}(this,J)}}(B);function B(K,J,ie){var re;return function d(k,U){if(!(k instanceof U))throw new TypeError("Cannot call a class as a function")}(this,B),(re=U.call(this,K,J)).selection=ie,re.textNode=document.createTextNode(B.CONTENTS),re.domNode.appendChild(re.textNode),re.savedLength=0,re}return function s(k,U,B){U&&c(k.prototype,U),B&&c(k,B),Object.defineProperty(k,"prototype",{writable:!1})}(B,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(J,ie){if(0===this.savedLength){for(var re=this,q=0;null!=re&&re.statics.scope!==S.Scope.BLOCK_BLOT;)q+=re.offset(re.parent),re=re.parent;null!=re&&(this.savedLength=B.CONTENTS.length,re.optimize(),re.formatAt(q,B.CONTENTS.length,J,ie),this.savedLength=0)}else h(L(B.prototype),"format",this).call(this,J,ie)}},{key:"index",value:function(J,ie){return J===this.textNode?0:h(L(B.prototype),"index",this).call(this,J,ie)}},{key:"length",value:function(){return this.savedLength}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){h(L(B.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(this.selection.composing||null==this.parent)return null;for(var J=this.selection.getNativeRange();null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);var te,ie=this.prev instanceof T.Z?this.prev:null,re=ie?ie.length():0,q=this.next instanceof T.Z?this.next:null,Y=q?q.text:"",Z=this.textNode,Q=Z.data.split(B.CONTENTS).join("");if(Z.data=B.CONTENTS,ie)te=ie,(Q||q)&&(ie.insertAt(ie.length(),Q+Y),q&&q.remove());else if(q)te=q,q.insertAt(0,Q);else{var pe=document.createTextNode(Q);te=this.scroll.create(pe),this.parent.insertBefore(te,this)}if(this.remove(),J){var z=function(he,de){return ie&&he===ie.domNode?de:he===Z?re+de-1:q&&he===q.domNode?re+Q.length+de:null},oe=z(J.start.node,J.start.offset),ae=z(J.end.node,J.end.offset);if(null!==oe&&null!==ae)return{startNode:te.domNode,startOffset:oe,endNode:te.domNode,endOffset:ae}}return null}},{key:"update",value:function(J,ie){var re=this;if(J.some(function(Y){return"characterData"===Y.type&&Y.target===re.textNode})){var q=this.restore();q&&(ie.range=q)}}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),B}(S.EmbedBlot);N.blotName="cursor",N.className="ql-cursor",N.tagName="span",N.CONTENTS="\ufeff";const G=N},7452:(P,b,f)=>{"use strict";f.d(b,{Z:()=>k});var S=f(1233),T=f(8222);function y(U){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(B){return typeof B}:function(B){return B&&"function"==typeof Symbol&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B})(U)}function c(U,B){for(var K=0;K<B.length;K++){var J=B[K];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(U,a(J.key),J)}}function a(U){var B=function u(U,B){if("object"!==y(U)||null===U)return U;var K=U[Symbol.toPrimitive];if(void 0!==K){var J=K.call(U,B||"default");if("object"!==y(J))return J;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===B?String:Number)(U)}(U,"string");return"symbol"===y(B)?B:String(B)}function h(){return h=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(B,K,J){var ie=function g(U,B){for(;!Object.prototype.hasOwnProperty.call(U,B)&&null!==(U=L(U)););return U}(B,K);if(ie){var re=Object.getOwnPropertyDescriptor(ie,K);return re.get?re.get.call(arguments.length<3?B:J):re.value}},h.apply(this,arguments)}function x(U,B){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,ie){return J.__proto__=ie,J})(U,B)}function L(U){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)})(U)}var N="\ufeff";const k=function(U){!function _(U,B){if("function"!=typeof B&&null!==B)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(B&&B.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),B&&x(U,B)}(K,U);var B=function w(U){var B=function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ie,J=L(U);if(B){var re=L(this).constructor;ie=Reflect.construct(J,arguments,re)}else ie=J.apply(this,arguments);return function D(U,B){if(B&&("object"===y(B)||"function"==typeof B))return B;if(void 0!==B)throw new TypeError("Derived constructors may only return object or undefined");return function C(U){if(void 0===U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}(U)}(this,ie)}}(K);function K(J,ie){var re;return function d(U,B){if(!(U instanceof B))throw new TypeError("Cannot call a class as a function")}(this,K),(re=B.call(this,J,ie)).contentNode=document.createElement("span"),re.contentNode.setAttribute("contenteditable",!1),Array.from(re.domNode.childNodes).forEach(function(q){re.contentNode.appendChild(q)}),re.leftGuard=document.createTextNode(N),re.rightGuard=document.createTextNode(N),re.domNode.appendChild(re.leftGuard),re.domNode.appendChild(re.contentNode),re.domNode.appendChild(re.rightGuard),re}return function s(U,B,K){B&&c(U.prototype,B),K&&c(U,K),Object.defineProperty(U,"prototype",{writable:!1})}(K,[{key:"index",value:function(ie,re){return ie===this.leftGuard?0:ie===this.rightGuard?1:h(L(K.prototype),"index",this).call(this,ie,re)}},{key:"restore",value:function(ie){var re,q,Y=ie.data.split(N).join("");if(ie===this.leftGuard)if(this.prev instanceof T.Z){var Z=this.prev.length();this.prev.insertAt(Z,Y),re={startNode:this.prev.domNode,startOffset:Z+Y.length}}else q=document.createTextNode(Y),this.parent.insertBefore(this.scroll.create(q),this),re={startNode:q,startOffset:Y.length};else ie===this.rightGuard&&(this.next instanceof T.Z?(this.next.insertAt(0,Y),re={startNode:this.next.domNode,startOffset:Y.length}):(q=document.createTextNode(Y),this.parent.insertBefore(this.scroll.create(q),this.next),re={startNode:q,startOffset:Y.length}));return ie.data=N,re}},{key:"update",value:function(ie,re){var q=this;ie.forEach(function(Y){if("characterData"===Y.type&&(Y.target===q.leftGuard||Y.target===q.rightGuard)){var Z=q.restore(Y.target);Z&&(re.range=Z)}})}}]),K}(S.EmbedBlot)},6603:(P,b,f)=>{"use strict";f.d(b,{Z:()=>k});var S=f(1233),T=f(4122),y=f(8222);function d(U){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(B){return typeof B}:function(B){return B&&"function"==typeof Symbol&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B})(U)}function s(U,B){for(var K=0;K<B.length;K++){var J=B[K];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(U,u(J.key),J)}}function u(U){var B=function h(U,B){if("object"!==d(U)||null===U)return U;var K=U[Symbol.toPrimitive];if(void 0!==K){var J=K.call(U,B||"default");if("object"!==d(J))return J;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===B?String:Number)(U)}(U,"string");return"symbol"===d(B)?B:String(B)}function g(){return g=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(B,K,J){var ie=function _(U,B){for(;!Object.prototype.hasOwnProperty.call(U,B)&&null!==(U=N(U)););return U}(B,K);if(ie){var re=Object.getOwnPropertyDescriptor(ie,K);return re.get?re.get.call(arguments.length<3?B:J):re.value}},g.apply(this,arguments)}function w(U,B){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,ie){return J.__proto__=ie,J})(U,B)}function N(U){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)})(U)}var G=function(U){!function x(U,B){if("function"!=typeof B&&null!==B)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(B&&B.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),B&&w(U,B)}(K,U);var B=function D(U){var B=function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ie,J=N(U);if(B){var re=N(this).constructor;ie=Reflect.construct(J,arguments,re)}else ie=J.apply(this,arguments);return function C(U,B){if(B&&("object"===d(B)||"function"==typeof B))return B;if(void 0!==B)throw new TypeError("Derived constructors may only return object or undefined");return function I(U){if(void 0===U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}(U)}(this,ie)}}(K);function K(){return function c(U,B){if(!(U instanceof B))throw new TypeError("Cannot call a class as a function")}(this,K),B.apply(this,arguments)}return function a(U,B,K){B&&s(U.prototype,B),K&&s(U,K),Object.defineProperty(U,"prototype",{writable:!1})}(K,[{key:"formatAt",value:function(ie,re,q,Y){if(K.compare(this.statics.blotName,q)<0&&this.scroll.query(q,S.Scope.BLOT)){var Z=this.isolate(ie,re);Y&&Z.wrap(q,Y)}else g(N(K.prototype),"formatAt",this).call(this,ie,re,q,Y)}},{key:"optimize",value:function(ie){if(g(N(K.prototype),"optimize",this).call(this,ie),this.parent instanceof K&&K.compare(this.statics.blotName,this.parent.statics.blotName)>0){var re=this.parent.isolate(this.offset(),this.length());this.moveChildren(re),re.wrap(this)}}}],[{key:"compare",value:function(ie,re){var q=K.order.indexOf(ie),Y=K.order.indexOf(re);return q>=0||Y>=0?q-Y:ie===re?0:ie<re?-1:1}}]),K}(S.InlineBlot);G.allowedChildren=[G,T.Z,S.EmbedBlot,y.Z],G.order=["cursor","inline","link","underline","strike","italic","bold","script","code"];const k=G},3272:(P,b,f)=>{"use strict";f.d(b,{Z:()=>Q});var S=f(1233),T=f(2069),y=f(6446),d=f(4122),c=f(3553),s=f(1969);function a(te){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(pe){return typeof pe}:function(pe){return pe&&"function"==typeof Symbol&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe})(te)}function u(te,pe){return function w(te){if(Array.isArray(te))return te}(te)||function x(te,pe){var z=null==te?null:typeof Symbol<"u"&&te[Symbol.iterator]||te["@@iterator"];if(null!=z){var oe,ae,ee,he,de=[],ue=!0,be=!1;try{if(ee=(z=z.call(te)).next,0===pe){if(Object(z)!==z)return;ue=!1}else for(;!(ue=(oe=ee.call(z)).done)&&(de.push(oe.value),de.length!==pe);ue=!0);}catch(ve){be=!0,ae=ve}finally{try{if(!ue&&null!=z.return&&(he=z.return(),Object(he)!==he))return}finally{if(be)throw ae}}return de}}(te,pe)||function g(te,pe){if(te){if("string"==typeof te)return _(te,pe);var z=Object.prototype.toString.call(te).slice(8,-1);if("Object"===z&&te.constructor&&(z=te.constructor.name),"Map"===z||"Set"===z)return Array.from(te);if("Arguments"===z||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return _(te,pe)}}(te,pe)||function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(te,pe){(null==pe||pe>te.length)&&(pe=te.length);for(var z=0,oe=new Array(pe);z<pe;z++)oe[z]=te[z];return oe}function C(te,pe){for(var z=0;z<pe.length;z++){var oe=pe[z];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(te,L(oe.key),oe)}}function L(te){var pe=function N(te,pe){if("object"!==a(te)||null===te)return te;var z=te[Symbol.toPrimitive];if(void 0!==z){var oe=z.call(te,pe||"default");if("object"!==a(oe))return oe;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===pe?String:Number)(te)}(te,"string");return"symbol"===a(pe)?pe:String(pe)}function G(){return G=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(pe,z,oe){var ae=function k(te,pe){for(;!Object.prototype.hasOwnProperty.call(te,pe)&&null!==(te=q(te)););return te}(pe,z);if(ae){var ee=Object.getOwnPropertyDescriptor(ae,z);return ee.get?ee.get.call(arguments.length<3?pe:oe):ee.value}},G.apply(this,arguments)}function B(te,pe){return(B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(oe,ae){return oe.__proto__=ae,oe})(te,pe)}function q(te){return(q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(z){return z.__proto__||Object.getPrototypeOf(z)})(te)}function Y(te){return te instanceof y.ZP||te instanceof y.i2}var Z=function(te){!function U(te,pe){if("function"!=typeof pe&&null!==pe)throw new TypeError("Super expression must either be null or a function");te.prototype=Object.create(pe&&pe.prototype,{constructor:{value:te,writable:!0,configurable:!0}}),Object.defineProperty(te,"prototype",{writable:!1}),pe&&B(te,pe)}(z,te);var pe=function K(te){var pe=function re(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ae,oe=q(te);if(pe){var ee=q(this).constructor;ae=Reflect.construct(oe,arguments,ee)}else ae=oe.apply(this,arguments);return function J(te,pe){if(pe&&("object"===a(pe)||"function"==typeof pe))return pe;if(void 0!==pe)throw new TypeError("Derived constructors may only return object or undefined");return function ie(te){if(void 0===te)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te}(te)}(this,ae)}}(z);function z(oe,ae,ee){var he,de=ee.emitter,ue=ee.toggleBlankClass;return function D(te,pe){if(!(te instanceof pe))throw new TypeError("Cannot call a class as a function")}(this,z),(he=pe.call(this,oe,ae)).emitter=de,he.toggleBlankClass=ue,he.batch=!1,he.optimize(),he.enable(),he.domNode.addEventListener("dragstart",function(be){return he.handleDragStart(be)}),he}return function I(te,pe,z){pe&&C(te.prototype,pe),z&&C(te,z),Object.defineProperty(te,"prototype",{writable:!1})}(z,[{key:"batchStart",value:function(){Array.isArray(this.batch)||(this.batch=[])}},{key:"batchEnd",value:function(){var ae=this.batch;this.batch=!1,this.update(ae)}},{key:"emitMount",value:function(ae){this.emitter.emit(T.Z.events.SCROLL_BLOT_MOUNT,ae)}},{key:"emitUnmount",value:function(ae){this.emitter.emit(T.Z.events.SCROLL_BLOT_UNMOUNT,ae)}},{key:"deleteAt",value:function(ae,ee){var de=u(this.line(ae),2),ue=de[0],be=de[1],Ce=u(this.line(ae+ee),1)[0];G(q(z.prototype),"deleteAt",this).call(this,ae,ee),null!=Ce&&ue!==Ce&&be>0&&(ue instanceof y.i2||Ce instanceof y.i2||(ue instanceof s.zW||Ce instanceof s.zW)&&ue.parent!==Ce.parent||(ue.moveChildren(Ce,Ce.children.head instanceof d.Z?null:Ce.children.head),ue.remove())),this.optimize()}},{key:"enable",value:function(){this.domNode.setAttribute("contenteditable",!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"formatAt",value:function(ae,ee,he,de){G(q(z.prototype),"formatAt",this).call(this,ae,ee,he,de),this.optimize()}},{key:"handleDragStart",value:function(ae){ae.preventDefault()}},{key:"insertAt",value:function(ae,ee,he){if(ae>=this.length())if(null==he||null==this.scroll.query(ee,S.Scope.BLOCK)){var de=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(de),null==he&&ee.endsWith("\n")?de.insertAt(0,ee.slice(0,-1),he):de.insertAt(0,ee,he)}else{var ue=this.scroll.create(ee,he);this.appendChild(ue)}else G(q(z.prototype),"insertAt",this).call(this,ae,ee,he);this.optimize()}},{key:"insertBefore",value:function(ae,ee){if(ae.statics.scope===S.Scope.INLINE_BLOT){var he=this.scroll.create(this.statics.defaultChild.blotName);he.appendChild(ae),G(q(z.prototype),"insertBefore",this).call(this,he,ee)}else G(q(z.prototype),"insertBefore",this).call(this,ae,ee)}},{key:"isEnabled",value:function(){return"true"===this.domNode.getAttribute("contenteditable")}},{key:"leaf",value:function(ae){return this.path(ae).pop()||[null,-1]}},{key:"line",value:function(ae){return ae===this.length()?this.line(ae-1):this.descendant(Y,ae)}},{key:"lines",value:function(){return function de(ue,be,ve){var le=[],Ce=ve;return ue.children.forEachAt(be,ve,function(ye,ge,fe){Y(ye)?le.push(ye):ye instanceof S.ContainerBlot&&(le=le.concat(de(ye,ge,Ce))),Ce-=fe}),le}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var ae=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],ee=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(G(q(z.prototype),"optimize",this).call(this,ae,ee),ae.length>0&&this.emitter.emit(T.Z.events.SCROLL_OPTIMIZE,ae,ee))}},{key:"path",value:function(ae){return G(q(z.prototype),"path",this).call(this,ae).slice(1)}},{key:"remove",value:function(){}},{key:"update",value:function(ae){var ee=this;if(this.batch)Array.isArray(ae)&&(this.batch=this.batch.concat(ae),this.toggleBlankClass());else{var he=T.Z.sources.USER;"string"==typeof ae&&(he=ae),Array.isArray(ae)||(ae=this.observer.takeRecords()),(ae=ae.filter(function(de){var be=ee.find(de.target,!0);return be&&be.scroll===ee})).length>0&&this.emitter.emit(T.Z.events.SCROLL_BEFORE_UPDATE,he,ae),G(q(z.prototype),"update",this).call(this,ae.concat([])),ae.length>0&&this.emitter.emit(T.Z.events.SCROLL_UPDATE,he,ae)}}}]),z}(S.ScrollBlot);Z.blotName="scroll",Z.className="ql-editor",Z.tagName="DIV",Z.defaultChild=y.ZP,Z.allowedChildren=[y.ZP,y.i2,c.Z];const Q=Z},8222:(P,b,f)=>{"use strict";function T(L){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(N){return typeof N}:function(N){return N&&"function"==typeof Symbol&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(L)}function y(L,N){for(var G=0;G<N.length;G++){var k=N[G];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(L,c(k.key),k)}}function c(L){var N=function s(L,N){if("object"!==T(L)||null===L)return L;var G=L[Symbol.toPrimitive];if(void 0!==G){var k=G.call(L,N||"default");if("object"!==T(k))return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===N?String:Number)(L)}(L,"string");return"symbol"===T(N)?N:String(N)}function h(L,N){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,U){return k.__proto__=U,k})(L,N)}function D(L){return(D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)})(L)}f.d(b,{Z:()=>C,b:()=>I});var C=function(L){!function u(L,N){if("function"!=typeof N&&null!==N)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(N&&N.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),N&&h(L,N)}(G,L);var N=function g(L){var N=function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var U,k=D(L);if(N){var B=D(this).constructor;U=Reflect.construct(k,arguments,B)}else U=k.apply(this,arguments);return function _(L,N){if(N&&("object"===T(N)||"function"==typeof N))return N;if(void 0!==N)throw new TypeError("Derived constructors may only return object or undefined");return function x(L){if(void 0===L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(L)}(this,U)}}(G);function G(){return function a(L,N){if(!(L instanceof N))throw new TypeError("Cannot call a class as a function")}(this,G),N.apply(this,arguments)}return function d(L,N,G){return N&&y(L.prototype,N),G&&y(L,G),Object.defineProperty(L,"prototype",{writable:!1}),L}(G)}(f(1233).TextBlot);function I(L){return L.replace(/[&<>"']/g,function(N){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[N]})}},2432:(P,b,f)=>{"use strict";f.d(b,{default:()=>C});var S=f(281),T=f(6446),y=f(4122),d=f(3553),c=f(3657),s=f(7452),a=f(6603),u=f(3272),h=f(8222),g=f(5635),_=f(2613),x=f(3071),w=f(3859),D=f(990);S.ZP.register({"blots/block":T.ZP,"blots/block/embed":T.i2,"blots/break":y.Z,"blots/container":d.Z,"blots/cursor":c.Z,"blots/embed":s.Z,"blots/inline":a.Z,"blots/scroll":u.Z,"blots/text":h.Z,"modules/clipboard":g.ZP,"modules/history":_.Z,"modules/keyboard":x.ZP,"modules/uploader":w.Z,"modules/input":D.Z});const C=S.ZP},6229:(P,b,f)=>{"use strict";f.d(b,{Z:()=>g});var S=f(7452),T=f(2069);function y(_){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(x){return typeof x}:function(x){return x&&"function"==typeof Symbol&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(_)}function c(_,x){for(var w=0;w<x.length;w++){var D=x[w];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(_,a(D.key),D)}}function a(_){var x=function u(_,x){if("object"!==y(_)||null===_)return _;var w=_[Symbol.toPrimitive];if(void 0!==w){var D=w.call(_,x||"default");if("object"!==y(D))return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===x?String:Number)(_)}(_,"string");return"symbol"===y(x)?x:String(x)}const g=function(){function _(x,w){var D=this;(function d(_,x){if(!(_ instanceof x))throw new TypeError("Cannot call a class as a function")})(this,_),this.scroll=x,this.emitter=w,this.isComposing=!1,x.domNode.addEventListener("compositionstart",function(C){D.isComposing||D.handleCompositionStart(C)}),x.domNode.addEventListener("compositionend",function(C){D.isComposing&&D.handleCompositionEnd(C)})}return function s(_,x,w){x&&c(_.prototype,x),w&&c(_,w),Object.defineProperty(_,"prototype",{writable:!1})}(_,[{key:"isCompositionInProgress",value:function(){return this.isComposing}},{key:"handleCompositionStart",value:function(w){var D=w.target instanceof Node?this.scroll.find(w.target,!0):null;D&&!(D instanceof S.Z)&&(this.emitter.emit(T.Z.events.COMPOSITION_BEFORE_START,w),this.scroll.batchStart(),this.emitter.emit(T.Z.events.COMPOSITION_START,w),this.isComposing=!0)}},{key:"handleCompositionEnd",value:function(w){this.emitter.emit(T.Z.events.COMPOSITION_BEFORE_END,w),this.scroll.batchEnd(),this.emitter.emit(T.Z.events.COMPOSITION_END,w),this.isComposing=!1}}]),_}()},2861:(P,b,f)=>{"use strict";f.d(b,{Z:()=>xe});var S=f(8805),T=f.n(S),y=f(2722),d=f.n(y),c=f(732),s=f.n(c),a=f(9098),u=f.n(a),h=f(1233),g=f(7800),_=f(3657),x=f(6446),w=f(4122),D=f(8222),I=f(5874);function G(Te,Ee){var Oe=Object.keys(Te);if(Object.getOwnPropertySymbols){var ze=Object.getOwnPropertySymbols(Te);Ee&&(ze=ze.filter(function($e){return Object.getOwnPropertyDescriptor(Te,$e).enumerable})),Oe.push.apply(Oe,ze)}return Oe}function k(Te){for(var Ee=1;Ee<arguments.length;Ee++){var Oe=null!=arguments[Ee]?arguments[Ee]:{};Ee%2?G(Object(Oe),!0).forEach(function(ze){U(Te,ze,Oe[ze])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Te,Object.getOwnPropertyDescriptors(Oe)):G(Object(Oe)).forEach(function(ze){Object.defineProperty(Te,ze,Object.getOwnPropertyDescriptor(Oe,ze))})}return Te}function U(Te,Ee,Oe){return(Ee=pe(Ee))in Te?Object.defineProperty(Te,Ee,{value:Oe,enumerable:!0,configurable:!0,writable:!0}):Te[Ee]=Oe,Te}function B(Te){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Ee){return typeof Ee}:function(Ee){return Ee&&"function"==typeof Symbol&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee})(Te)}function K(Te,Ee){return Y(Te)||function q(Te,Ee){var Oe=null==Te?null:typeof Symbol<"u"&&Te[Symbol.iterator]||Te["@@iterator"];if(null!=Oe){var ze,$e,Be,Ue,ot=[],st=!0,et=!1;try{if(Be=(Oe=Oe.call(Te)).next,0===Ee){if(Object(Oe)!==Oe)return;st=!1}else for(;!(st=(ze=Be.call(Oe)).done)&&(ot.push(ze.value),ot.length!==Ee);st=!0);}catch(Ke){et=!0,$e=Ke}finally{try{if(!st&&null!=Oe.return&&(Ue=Oe.return(),Object(Ue)!==Ue))return}finally{if(et)throw $e}}return ot}}(Te,Ee)||ie(Te,Ee)||J()}function J(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ie(Te,Ee){if(Te){if("string"==typeof Te)return re(Te,Ee);var Oe=Object.prototype.toString.call(Te).slice(8,-1);if("Object"===Oe&&Te.constructor&&(Oe=Te.constructor.name),"Map"===Oe||"Set"===Oe)return Array.from(Te);if("Arguments"===Oe||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return re(Te,Ee)}}function re(Te,Ee){(null==Ee||Ee>Te.length)&&(Ee=Te.length);for(var Oe=0,ze=new Array(Ee);Oe<Ee;Oe++)ze[Oe]=Te[Oe];return ze}function Y(Te){if(Array.isArray(Te))return Te}function Q(Te,Ee){for(var Oe=0;Oe<Ee.length;Oe++){var ze=Ee[Oe];ze.enumerable=ze.enumerable||!1,ze.configurable=!0,"value"in ze&&(ze.writable=!0),Object.defineProperty(Te,pe(ze.key),ze)}}function pe(Te){var Ee=function z(Te,Ee){if("object"!==B(Te)||null===Te)return Te;var Oe=Te[Symbol.toPrimitive];if(void 0!==Oe){var ze=Oe.call(Te,Ee||"default");if("object"!==B(ze))return ze;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Ee?String:Number)(Te)}(Te,"string");return"symbol"===B(Ee)?Ee:String(Ee)}var oe=/^[ -~]*$/,ae=function(){function Te(Ee){(function Z(Te,Ee){if(!(Te instanceof Ee))throw new TypeError("Cannot call a class as a function")})(this,Te),this.scroll=Ee,this.delta=this.getDelta(),this.immediateFormats=new Set}return function te(Te,Ee,Oe){Ee&&Q(Te.prototype,Ee),Oe&&Q(Te,Oe),Object.defineProperty(Te,"prototype",{writable:!1})}(Te,[{key:"addImmediateFormat",value:function(Oe){this.immediateFormats.add(Oe)}},{key:"applyDelta",value:function(Oe){var ze=this;this.scroll.update();var $e=this.scroll.length();this.scroll.batchStart();var Be=function ge(Te){return Te.reduce(function(Ee,Oe){if("string"==typeof Oe.insert){var ze=Oe.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return Ee.insert(ze,Oe.attributes)}return Ee.push(Oe)},new(u()))}(Oe),Ue=new(u());return Be.reduce(function(ot,st){var et=a.Op.length(st),Ke=st.attributes||{},Ye=!1;if(null!=st.insert){if(Ue.retain(et),"string"==typeof st.insert){var Pe=st.insert;Ye=!Pe.endsWith("\n")&&($e<=ot||ze.scroll.descendant(x.i2,ot)[0]),ze.scroll.insertAt(ot,Pe);var Re=K(ze.scroll.line(ot),2),Fe=Re[0],Xe=Re[1],tt=s()({},(0,x.E2)(Fe));if(Fe instanceof x.ZP){var At=K(Fe.descendant(h.LeafBlot,Xe),1)[0];tt=s()(tt,(0,x.E2)(At))}Ke=a.AttributeMap.diff(tt,Ke)||{}}else if("object"===B(st.insert)){var Tt=Object.keys(st.insert)[0];if(null==Tt)return ot;Ye=null!=ze.scroll.query(Tt,h.Scope.INLINE)&&($e<=ot||ze.scroll.descendant(x.i2,ot)[0]),ze.scroll.insertAt(ot,Tt,st.insert[Tt])}$e+=et}else Ue.push(st);var qt=Object.keys(Ke);ze.immediateFormats.forEach(function(En){qt.indexOf(En)>-1&&(ze.scroll.formatAt(ot,et,En,Ke[En]),delete Ke[En])}),Object.keys(Ke).forEach(function(En){ze.scroll.formatAt(ot,et,En,Ke[En])});var wt=Ye?1:0;return $e+=wt,Ue.delete(wt),ot+et+wt},0),Ue.reduce(function(ot,st){return"number"==typeof st.delete?(ze.scroll.deleteAt(ot,st.delete),ot):ot+a.Op.length(st)},0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(Be)}},{key:"deleteText",value:function(Oe,ze){return this.scroll.deleteAt(Oe,ze),this.update((new(u())).retain(Oe).delete(ze))}},{key:"formatLine",value:function(Oe,ze){var $e=this,Be=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(Be).forEach(function(ot){$e.scroll.lines(Oe,Math.max(ze,1)).forEach(function(st){st.format(ot,Be[ot])})}),this.scroll.optimize();var Ue=(new(u())).retain(Oe).retain(ze,T()(Be));return this.update(Ue)}},{key:"formatText",value:function(Oe,ze){var $e=this,Be=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(Be).forEach(function(ot){$e.scroll.formatAt(Oe,ze,ot,Be[ot])});var Ue=(new(u())).retain(Oe).retain(ze,T()(Be));return this.update(Ue)}},{key:"getContents",value:function(Oe,ze){return this.delta.slice(Oe,Oe+ze)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(Oe,ze){return Oe.concat(ze.delta())},new(u()))}},{key:"getFormat",value:function(Oe){var ze=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,$e=[],Be=[];0===ze?this.scroll.path(Oe).forEach(function(st){var Ke=K(st,1)[0];Ke instanceof x.ZP?$e.push(Ke):Ke instanceof h.LeafBlot&&Be.push(Ke)}):($e=this.scroll.lines(Oe,ze),Be=this.scroll.descendants(h.LeafBlot,Oe,ze));var ot=K([$e,Be].map(function(st){if(0===st.length)return{};for(var et=(0,x.E2)(st.shift());Object.keys(et).length>0;){var Ke=st.shift();if(null==Ke)return et;et=ve((0,x.E2)(Ke),et)}return et}),2);return Be=ot[1],k(k({},$e=ot[0]),Be)}},{key:"getHTML",value:function(Oe,ze){var Be=K(this.scroll.line(Oe),2),Ue=Be[0],ot=Be[1];return Ue.length()>ot+ze?he(Ue,ot,ze,!0):he(this.scroll,Oe,ze,!0)}},{key:"getText",value:function(Oe,ze){return this.getContents(Oe,ze).filter(function($e){return"string"==typeof $e.insert}).map(function($e){return $e.insert}).join("")}},{key:"insertEmbed",value:function(Oe,ze,$e){return this.scroll.insertAt(Oe,ze,$e),this.update((new(u())).retain(Oe).insert(U({},ze,$e)))}},{key:"insertText",value:function(Oe,ze){var $e=this,Be=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ze=ze.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(Oe,ze),Object.keys(Be).forEach(function(Ue){$e.scroll.formatAt(Oe,ze.length,Ue,Be[Ue])}),this.update((new(u())).retain(Oe).insert(ze,T()(Be)))}},{key:"isBlank",value:function(){if(0===this.scroll.children.length)return!0;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.scroll.children.length>1)return!1;var ze=this.scroll.children.head;return!(ze.statics.blotName!==x.ZP.blotName||ze.children.length>1)&&ze.children.head instanceof w.Z}},{key:"removeFormat",value:function(Oe,ze){var $e=this.getText(Oe,ze),Ue=K(this.scroll.line(Oe+ze),2),ot=Ue[0],st=Ue[1],et=0,Ke=new(u());null!=ot&&(et=ot.length()-st,Ke=ot.delta().slice(st,st+et-1).insert("\n"));var Pe=this.getContents(Oe,ze+et).diff((new(u())).insert($e).concat(Ke)),Se=(new(u())).retain(Oe).concat(Pe);return this.applyDelta(Se)}},{key:"update",value:function(Oe){var ze=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],$e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,Be=this.delta;if(1===ze.length&&"characterData"===ze[0].type&&ze[0].target.data.match(oe)&&this.scroll.find(ze[0].target)){var Ue=this.scroll.find(ze[0].target),ot=(0,x.E2)(Ue),st=Ue.offset(this.scroll),et=ze[0].oldValue.replace(_.Z.CONTENTS,""),Ke=(new(u())).insert(et),Ye=(new(u())).insert(Ue.value()),Pe=$e&&{oldRange:fe($e.oldRange,-st),newRange:fe($e.newRange,-st)};Oe=(new(u())).retain(st).concat(Ke.diff(Ye,Pe)).reduce(function(Re,Fe){return Fe.insert?Re.insert(Fe.insert,ot):Re.push(Fe)},new(u())),this.delta=Be.compose(Oe)}else this.delta=this.getDelta(),(!Oe||!d()(Be.compose(Oe),this.delta))&&(this.deltaContainsRetain(Be)||(Oe=Be.diff(this.delta,$e)));return Oe}},{key:"deltaContainsRetain",value:function(Oe){return Oe.ops.some(function(ze){return(0,I.Z)(ze.retain)})}}]),Te}();function ee(Te,Ee,Oe){if(0===Te.length){var Be=K(le(Oe.pop()),1)[0];return Ee<=0?"</li></".concat(Be,">"):"</li></".concat(Be,">").concat(ee([],Ee-1,Oe))}var Ue=function L(Te){return Y(Te)||function N(Te){if(typeof Symbol<"u"&&null!=Te[Symbol.iterator]||null!=Te["@@iterator"])return Array.from(Te)}(Te)||ie(Te)||J()}(Te),ot=Ue[0],st=ot.child,et=ot.offset,Ke=ot.length,Ye=ot.indent,Pe=ot.type,Se=Ue.slice(1),Fe=K(le(Pe,st),2),Xe=Fe[0],tt=Fe[1];if(Ye>Ee)return Oe.push(Pe),Ye===Ee+1?"<".concat(Xe,"><li").concat(tt,">").concat(he(st,et,Ke)).concat(ee(Se,Ye,Oe)):"<".concat(Xe,"><li>").concat(ee(Te,Ee+1,Oe));if(Ye===Ee&&Pe===Oe[Oe.length-1])return"</li><li".concat(tt,">").concat(he(st,et,Ke)).concat(ee(Se,Ye,Oe));var At=K(le(Oe.pop()),1);return"</li></".concat(At[0],">").concat(ee(Te,Ee-1,Oe))}function he(Te,Ee,Oe){var ze=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"==typeof Te.html)return Te.html(Ee,Oe);if(Te instanceof D.Z)return(0,D.b)(Te.value().slice(Ee,Ee+Oe));if(Te.children){if("list-container"===Te.statics.blotName){var $e=[];return Te.children.forEachAt(Ee,Oe,function(Se,Re,Fe){var Xe=Se.formats();$e.push({child:Se,offset:Re,length:Fe,indent:Xe.indent||0,type:Xe.list})}),ee($e,-1,[])}var Be=[];if(Te.children.forEachAt(Ee,Oe,function(Se,Re,Fe){Be.push(he(Se,Re,Fe))}),function de(Te,Ee){1===Te.length&&Te.head instanceof w.Z&&Ee.push("<br>")}(Te.children,Be),ze||"list"===Te.statics.blotName)return Be.join("");var Ue=function ue(Te){var Ee=Te.domNode.cloneNode(!0);return function be(Te,Ee){return["tableCellLine","tableHeaderCellLine","tableCell","tableHeaderCell"].includes(Te.statics.blotName)&&function C(Te,Ee){Te.classList.remove(Ee),0===Te.classList.length&&Te.removeAttribute("class")}(Ee,Te.statics.className),Ee}(Te,Ee)}(Te),Ke=K(Ue.outerHTML.split(">".concat(Ue.innerHTML,"<")),2),Ye=Ke[0],Pe=Ke[1];return 0===Ye.indexOf("<table")?"".concat(Ye.replace(/(\sdata-.+?=["'].*?["'])/g,""),">").concat(Be.join("").replace(/(\sdata-table.+?=["'].*?["'])/g,""),"<").concat(Pe):"".concat(Ye,">").concat(Be.join(""),"<").concat(Pe)}return Te.domNode.outerHTML}function ve(Te,Ee){return Object.keys(Ee).reduce(function(Oe,ze){return null==Te[ze]||(Ee[ze]===Te[ze]?Oe[ze]=Ee[ze]:Array.isArray(Ee[ze])?Ee[ze].indexOf(Te[ze])<0&&(Oe[ze]=Ee[ze].concat([Te[ze]])):Oe[ze]=[Ee[ze],Te[ze]]),Oe},{})}function le(Te,Ee){var Oe="ordered"===Te?"ol":"ul",ze=Ee?"".concat(function Ce(Te){var Ee=Te.domNode;if(!Ee.hasAttributes())return"";for(var Oe=Ee.attributes,ze=" ",$e=0;$e<Oe.length;$e+=1){var Be=Oe[$e].name,Ue=Oe[$e].value;"class"===Be&&(Ue=ye(Ue)),Ue.length&&-1===Be.indexOf("data-")&&(ze+="".concat(Be,'="').concat(Ue,'"'))}return ze.length>1?ze:""}(Ee)):"";switch(Te){case"checked":return[Oe,"".concat(ze,' data-list="checked"')];case"unchecked":return[Oe,"".concat(ze,' data-list="unchecked"')];default:return[Oe,ze]}}function ye(Te){return Te.replace(/ql-indent-\d/g,"").trim()}function fe(Te,Ee){return new g.e(Te.index+Ee,Te.length)}const xe=ae},2069:(P,b,f)=>{"use strict";f.d(b,{Z:()=>J});var S=f(3034),T=f.n(S),y=f(8034),d=f(2598);function s(ie){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(re){return typeof re}:function(re){return re&&"function"==typeof Symbol&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re})(ie)}function u(ie,re){for(var q=0;q<re.length;q++){var Y=re[q];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(ie,g(Y.key),Y)}}function g(ie){var re=function _(ie,re){if("object"!==s(ie)||null===ie)return ie;var q=ie[Symbol.toPrimitive];if(void 0!==q){var Y=q.call(ie,re||"default");if("object"!==s(Y))return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===re?String:Number)(ie)}(ie,"string");return"symbol"===s(re)?re:String(re)}function x(){return x=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(re,q,Y){var Z=function w(ie,re){for(;!Object.prototype.hasOwnProperty.call(ie,re)&&null!==(ie=k(ie)););return ie}(re,q);if(Z){var Q=Object.getOwnPropertyDescriptor(Z,q);return Q.get?Q.get.call(arguments.length<3?re:Y):Q.value}},x.apply(this,arguments)}function C(ie,re){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,Z){return Y.__proto__=Z,Y})(ie,re)}function k(ie){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)})(ie)}var U=(0,f(3122).Z)("quill:events");(0,y.Z)()&&["selectionchange","mousedown","mouseup","click"].forEach(function(ie){document.addEventListener(ie,function(){for(var re,q=arguments.length,Y=new Array(q),Z=0;Z<q;Z++)Y[Z]=arguments[Z];var Q=Y[0],z=((null==Q||null===(re=Q.target)||void 0===re?void 0:re.shadowRoot)??document).querySelectorAll(".ql-container");Array.from(z).forEach(function(oe){var ee,ae=d.Z.get(oe);ae&&ae.emitter&&(ee=ae.emitter).handleDOM.apply(ee,Y)})})});var K=function(ie){!function D(ie,re){if("function"!=typeof re&&null!==re)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(re&&re.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),Object.defineProperty(ie,"prototype",{writable:!1}),re&&C(ie,re)}(q,ie);var re=function I(ie){var re=function G(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Z,Y=k(ie);if(re){var Q=k(this).constructor;Z=Reflect.construct(Y,arguments,Q)}else Z=Y.apply(this,arguments);return function L(ie,re){if(re&&("object"===s(re)||"function"==typeof re))return re;if(void 0!==re)throw new TypeError("Derived constructors may only return object or undefined");return function N(ie){if(void 0===ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ie}(ie)}(this,Z)}}(q);function q(){var Y;return function a(ie,re){if(!(ie instanceof re))throw new TypeError("Cannot call a class as a function")}(this,q),(Y=re.call(this)).listeners={},Y.on("error",U.error),Y}return function h(ie,re,q){re&&u(ie.prototype,re),q&&u(ie,q),Object.defineProperty(ie,"prototype",{writable:!1})}(q,[{key:"emit",value:function(){for(var Z,Q,te=arguments.length,pe=new Array(te),z=0;z<te;z++)pe[z]=arguments[z];(Z=U.log).call.apply(Z,[U].concat(pe)),(Q=x(k(q.prototype),"emit",this)).call.apply(Q,[this].concat(pe))}},{key:"handleDOM",value:function(Z){for(var Q=arguments.length,te=new Array(Q>1?Q-1:0),pe=1;pe<Q;pe++)te[pe-1]=arguments[pe];(this.listeners[Z.type]||[]).forEach(function(z){var oe=z.node,ae=z.handler;(Z.target===oe||oe.contains(Z.target))&&ae.apply(void 0,[Z].concat(te))})}},{key:"listenDOM",value:function(Z,Q,te){this.listeners[Z]||(this.listeners[Z]=[]),this.listeners[Z].push({node:Q,handler:te})}}]),q}(T());K.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",CONTENT_SETTED:"content-setted",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"},K.sources={API:"api",SILENT:"silent",USER:"user"};const J=K},2598:(P,b,f)=>{"use strict";f.d(b,{Z:()=>S});const S=new WeakMap},3122:(P,b,f)=>{"use strict";f.d(b,{Z:()=>c});var S=["error","warn","log","info"],T="warn";function y(s){if(S.indexOf(s)<=S.indexOf(T)){for(var a,u=arguments.length,h=new Array(u>1?u-1:0),g=1;g<u;g++)h[g-1]=arguments[g];(a=console)[s].apply(a,h)}}function d(s){return S.reduce(function(a,u){return a[u]=y.bind(console,u,s),a},{})}y.level=d.level=function(s){T=s};const c=d},7094:(P,b,f)=>{"use strict";function S(h){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"==typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(h)}function T(h,g){for(var _=0;_<g.length;_++){var x=g[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,d(x.key),x)}}function y(h,g,_){return g&&T(h.prototype,g),_&&T(h,_),Object.defineProperty(h,"prototype",{writable:!1}),h}function d(h){var g=function c(h,g){if("object"!==S(h)||null===h)return h;var _=h[Symbol.toPrimitive];if(void 0!==_){var x=_.call(h,g||"default");if("object"!==S(x))return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===g?String:Number)(h)}(h,"string");return"symbol"===S(g)?g:String(g)}f.d(b,{Z:()=>u});var a=y(function h(g){var _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(function s(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,h),this.quill=g,this.options=_});a.DEFAULTS={};const u=a},281:(P,b,f)=>{"use strict";f.d(b,{ZP:()=>z});var S=f(9098),T=f.n(S),y=f(8805),d=f.n(y),c=f(732),s=f.n(c),a=f(1233),u=f(2861),h=f(2069),g=f(7094),_=f(7800),x=f(2598),w=f(3122),D=f(1690),C=f(5874),I=f(6229);function L(de){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ue){return typeof ue}:function(ue){return ue&&"function"==typeof Symbol&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(de)}function N(de,ue,be){return(ue=Y(ue))in de?Object.defineProperty(de,ue,{value:be,enumerable:!0,configurable:!0,writable:!0}):de[ue]=be,de}function G(de,ue){return function J(de){if(Array.isArray(de))return de}(de)||function K(de,ue){var be=null==de?null:typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(null!=be){var ve,le,Ce,ye,ge=[],fe=!0,xe=!1;try{if(Ce=(be=be.call(de)).next,0===ue){if(Object(be)!==be)return;fe=!1}else for(;!(fe=(ve=Ce.call(be)).done)&&(ge.push(ve.value),ge.length!==ue);fe=!0);}catch(Te){xe=!0,le=Te}finally{try{if(!fe&&null!=be.return&&(ye=be.return(),Object(ye)!==ye))return}finally{if(xe)throw le}}return ge}}(de,ue)||function U(de,ue){if(de){if("string"==typeof de)return B(de,ue);var be=Object.prototype.toString.call(de).slice(8,-1);if("Object"===be&&de.constructor&&(be=de.constructor.name),"Map"===be||"Set"===be)return Array.from(de);if("Arguments"===be||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(be))return B(de,ue)}}(de,ue)||function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(de,ue){(null==ue||ue>de.length)&&(ue=de.length);for(var be=0,ve=new Array(ue);be<ue;be++)ve[be]=de[be];return ve}function re(de,ue){for(var be=0;be<ue.length;be++){var ve=ue[be];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(de,Y(ve.key),ve)}}function Y(de){var ue=function Z(de,ue){if("object"!==L(de)||null===de)return de;var be=de[Symbol.toPrimitive];if(void 0!==be){var ve=be.call(de,ue||"default");if("object"!==L(ve))return ve;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===ue?String:Number)(de)}(de,"string");return"symbol"===L(ue)?ue:String(ue)}var Q=(0,w.Z)("quill"),te="style-data-key",pe=new a.Registry;a.ParentBlot.uiClass="ql-ui";var z=function(){function de(ue){var be=this,ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function ie(de,ue){if(!(de instanceof ue))throw new TypeError("Cannot call a class as a function")}(this,de),this.options=function oe(de,ue){if((ue=s()({container:de,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0}},ue)).theme&&ue.theme!==z.DEFAULTS.theme){if(ue.theme=z.import("themes/".concat(ue.theme)),null==ue.theme)throw new Error("Invalid theme ".concat(ue.theme,". Did you register it?"))}else ue.theme=D.Z;var be=d()(ue.theme.DEFAULTS);[be,ue].forEach(function(Ce){Ce.modules=Ce.modules||{},Object.keys(Ce.modules).forEach(function(ye){!0===Ce.modules[ye]&&(Ce.modules[ye]={})})});var le=Object.keys(be.modules).concat(Object.keys(ue.modules)).reduce(function(Ce,ye){var ge=z.import("modules/".concat(ye));return null==ge?Q.error("Cannot load ".concat(ye," module. Are you sure you registered it?")):Ce[ye]=ge.DEFAULTS||{},Ce},{});return null!=ue.modules&&ue.modules.toolbar&&ue.modules.toolbar.constructor!==Object&&(ue.modules.toolbar={container:ue.modules.toolbar}),ue=s()({},z.DEFAULTS,{modules:le},be,ue),["bounds","container","scrollingContainer"].forEach(function(Ce){"string"==typeof ue[Ce]&&(ue[Ce]=document.querySelector(ue[Ce]))}),ue.modules=Object.keys(ue.modules).reduce(function(Ce,ye){return ue.modules[ye]&&(Ce[ye]=ue.modules[ye]),Ce},{}),ue}(ue,ve),this.container=this.options.container,null==this.container)return Q.error("Invalid Quill container",ue);this.options.debug&&de.debug(this.options.debug);var le=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",x.Z.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new h.Z;var Ce=this.options.registry.query(a.ScrollBlot.blotName);this.scroll=new Ce(this.options.registry,this.root,{emitter:this.emitter,toggleBlankClass:this.toggleBlankClass.bind(this)}),this.editor=new u.Z(this.scroll),this.composition=new I.Z(this.scroll,this.emitter),this.selection=new _.Z(this.scroll,this.emitter,this.composition),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.init(),this.emitter.on(h.Z.events.EDITOR_CHANGE,function(ye){ye===h.Z.events.TEXT_CHANGE&&be.toggleBlankClass()}),this.emitter.on(h.Z.events.SCROLL_UPDATE,function(ye,ge){var fe=be.selection.lastRange,Ee=G(be.selection.getRange(),1)[0],Oe=fe&&Ee?{oldRange:fe,newRange:Ee}:void 0;ae.call(be,function(){return be.editor.update(null,ge,Oe)},ye)}),this.setContents(this.getInitialContent(le)),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}return function q(de,ue,be){ue&&re(de.prototype,ue),be&&re(de,be),Object.defineProperty(de,"prototype",{writable:!1})}(de,[{key:"getInitialContent",value:function(be){return this.clipboard.convert({html:"".concat(be,"<p><br></p>"),text:"\n"})}},{key:"toggleBlankClass",value:function(){var be=this.composition.isCompositionInProgress();this.root.classList.toggle("ql-blank",this.editor.isBlank(be))}},{key:"addContainer",value:function(be){var ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof be){var le=be;(be=document.createElement("div")).classList.add(le)}return this.container.insertBefore(be,ve),be}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(be,ve,le){var Ce=this,ge=G(ee(be,ve,le),4);return ae.call(this,function(){return Ce.editor.deleteText(be,ve)},le=ge[3],be=ge[0],-1*(ve=ge[1]))}},{key:"disable",value:function(){this.enable(!1)}},{key:"editReadOnly",value:function(be){this.allowReadOnlyEdits=!0;var ve=be();return this.allowReadOnlyEdits=!1,ve}},{key:"enable",value:function(){var be=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(be),this.container.classList.toggle("ql-disabled",!be)}},{key:"focus",value:function(){var be=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=be,this.scrollIntoView()}},{key:"format",value:function(be,ve){var le=this,Ce=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.Z.sources.API;return this.applyCompositionChanges(),ae.call(this,function(){var ye=le.getSelection(!0),ge=new(T());if(null==ye)return ge;if(le.scroll.query(be,a.Scope.BLOCK))ge=le.editor.formatLine(ye.index,ye.length,N({},be,ve));else{if(0===ye.length)return le.selection.format(be,ve),ge;ge=le.editor.formatText(ye.index,ye.length,N({},be,ve))}return le.setSelection(ye,h.Z.sources.SILENT),ge},Ce)}},{key:"formatLine",value:function(be,ve,le,Ce,ye){var fe,ge=this,Te=G(ee(be,ve,le,Ce,ye),4);return ve=Te[1],fe=Te[2],ae.call(this,function(){return ge.editor.formatLine(be,ve,fe)},ye=Te[3],be=Te[0],0)}},{key:"formatText",value:function(be,ve,le,Ce,ye){var fe,ge=this,Te=G(ee(be,ve,le,Ce,ye),4);return ve=Te[1],fe=Te[2],ae.call(this,function(){return ge.editor.formatText(be,ve,fe)},ye=Te[3],be=Te[0],0)}},{key:"getBounds",value:function(be){var le;le="number"==typeof be?this.selection.getBounds(be,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0):this.selection.getBounds(be.index,be.length);var Ce=this.container.getBoundingClientRect();return{bottom:le.bottom-Ce.top,height:le.height,left:le.left-Ce.left,right:le.right-Ce.left,top:le.top-Ce.top,width:le.width}}},{key:"getContents",value:function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-be,Ce=G(ee(be,ve),2);return this.editor.getContents(be=Ce[0],ve=Ce[1])}},{key:"getFormat",value:function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,C.Z)(be)?"number"==typeof be?this.editor.getFormat(be,ve):this.editor.getFormat(be.index,be.length):{}}},{key:"getIndex",value:function(be){return be.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(be){return this.scroll.leaf(be)}},{key:"getLine",value:function(be){return this.scroll.line(be)}},{key:"getLines",value:function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof be?this.scroll.lines(be.index,be.length):this.scroll.lines(be,ve)}},{key:"getModule",value:function(be){return this.theme.modules[be]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getSemanticHTML",value:function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-be,Ce=G(ee(be,ve),2);return this.editor.getHTML(be=Ce[0],ve=Ce[1])}},{key:"getText",value:function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-be,Ce=G(ee(be,ve),2);return this.editor.getText(be=Ce[0],ve=Ce[1])}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(be,ve,le){var Ce=this;return ae.call(this,function(){return Ce.editor.insertEmbed(be,ve,le)},arguments.length>3&&void 0!==arguments[3]?arguments[3]:de.sources.API,be)}},{key:"insertText",value:function(be,ve,le,Ce,ye){var fe,ge=this,Te=G(ee(be,0,le,Ce,ye),4);return fe=Te[2],ae.call(this,function(){return ge.editor.insertText(be,ve,fe)},ye=Te[3],be=Te[0],ve.length)}},{key:"isEnabled",value:function(){return this.scroll.isEnabled()}},{key:"off",value:function(){var be;return(be=this.emitter).off.apply(be,arguments)}},{key:"on",value:function(){var be;return(be=this.emitter).on.apply(be,arguments)}},{key:"once",value:function(){var be;return(be=this.emitter).once.apply(be,arguments)}},{key:"removeFormat",value:function(be,ve,le){var Ce=this,ge=G(ee(be,ve,le),4);return ve=ge[1],ae.call(this,function(){return Ce.editor.removeFormat(be,ve)},le=ge[3],be=ge[0])}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(be){var ve=this;return ae.call(this,function(){be=new(T())(be);var Ce=ve.getLength(),ye=ve.editor.deleteText(0,Ce),ge=ve.editor.applyDelta(be),fe=ve.editor.deleteText(ve.getLength()-1,1);return ve.emitter.emit(de.events.CONTENT_SETTED),ye.compose(ge).compose(fe)},arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.Z.sources.API)}},{key:"setSelection",value:function(be,ve,le){if(null==be)this.selection.setRange(null,ve||de.sources.API);else{var ye=G(ee(be,ve,le),4);be=ye[0],ve=ye[1],le=ye[3],this.selection.setRange(new _.e(Math.max(0,be),ve),le),le!==h.Z.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(be){var ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.Z.sources.API,le=(new(T())).insert(be);return this.setContents(le,ve)}},{key:"update",value:function(){var be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.Z.sources.USER,ve=this.scroll.update(be);return this.selection.update(be),ve}},{key:"updateContents",value:function(be){var ve=this,le=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.Z.sources.API;return ae.call(this,function(){return be=new(T())(be),ve.editor.applyDelta(be,le)},le,!0)}},{key:"applyCompositionChanges",value:function(){this.composition.handleCompositionEnd({})}}],[{key:"debug",value:function(be){!0===be&&(be="log"),w.Z.level(be)}},{key:"find",value:function(be){return x.Z.get(be)||pe.find(be)}},{key:"import",value:function(be){return null==this.imports[be]&&Q.error("Cannot import ".concat(be,". Are you sure it was registered?")),this.imports[be]}},{key:"register",value:function(be,ve){var le=this,Ce=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof be){var ye=be.attrName||be.blotName;"string"==typeof ye?this.register("formats/".concat(ye),be,ve):Object.keys(be).forEach(function(ge){le.register(ge,be[ge],ve)})}else null!=this.imports[be]&&!Ce&&Q.warn("Overwriting ".concat(be," with"),ve),this.imports[be]=ve,(0===be.indexOf("blots/")||0===be.indexOf("formats/"))&&"abstract"!==ve.blotName&&pe.register(ve),"function"==typeof ve.register&&ve.register(pe)}}]),de}();function ae(de,ue,be,ve){if(!this.isEnabled()&&ue===h.Z.sources.USER&&!this.allowReadOnlyEdits)return new(T());var le=null==be?null:this.getSelection(),Ce=this.editor.delta,ye=de();if(null!=le&&(!0===be&&(be=le.index),null==ve?le=he(le,ye,ue):0!==ve&&(le=he(le,be,ve,ue)),this.setSelection(le,h.Z.sources.SILENT)),ye.length()>0){var ge,xe,fe=[h.Z.events.TEXT_CHANGE,ye,Ce,ue];(ge=this.emitter).emit.apply(ge,[h.Z.events.EDITOR_CHANGE].concat(fe)),ue!==h.Z.sources.SILENT&&(xe=this.emitter).emit.apply(xe,fe)}return ye}function ee(de,ue,be,ve,le){var Ce={};return"number"==typeof de.index&&"number"==typeof de.length?"number"!=typeof ue?(le=ve,ve=be,be=ue,ue=de.length,de=de.index):(ue=de.length,de=de.index):"number"!=typeof ue&&(le=ve,ve=be,be=ue,ue=0),"object"===L(be)?(Ce=be,le=ve):"string"==typeof be&&(null!=ve?Ce[be]=ve:le=be),[de,ue,Ce,le=le||h.Z.sources.API]}function he(de,ue,be,ve){if(null==de)return null;var le,Ce;if(ue instanceof T()){var ge=G([de.index,de.index+de.length].map(function(Te){return ue.transformPosition(Te,ve!==h.Z.sources.USER)}),2);le=ge[0],Ce=ge[1]}else{var xe=G([de.index,de.index+de.length].map(function(Te){return Te<ue||Te===ue&&ve===h.Z.sources.USER?Te:be>=0?Te+be:Math.max(ue,Te+be)}),2);le=xe[0],Ce=xe[1]}return new _.e(le,Ce-le)}z.DEFAULTS={bounds:null,modules:{},placeholder:"",readOnly:!1,registry:pe,scrollingContainer:null,theme:"default"},z.events=h.Z.events,z.sources=h.Z.sources,z.version="1.7.1",z.MS_LIST_DATA_KEY="mso-list-data",z.replaceStyleAttribute=function(de){return de.replace(/(?:(<[a-z0-9]+\s*))([\s\S]*?)(>|\/>)/gi,function(be,ve,le,Ce){return ve+le.replace(/style\s*=/gi,"".concat(te,"="))+Ce})},z.restoreStyleAttribute=function(de){de.querySelectorAll("[".concat(te,"]")).forEach(function(ue){var be=ue.getAttribute(te);ue.style=be,ue.setAttribute(z.MS_LIST_DATA_KEY,be),ue.removeAttribute(te)})},z.imports={delta:T(),parchment:a,"core/module":g.Z,"core/theme":D.Z}},7800:(P,b,f)=>{"use strict";f.d(b,{Z:()=>q,e:()=>re});var S=f(1233),T=f(8805),y=f.n(T),d=f(2722),c=f.n(d),s=f(2069);function u(Z){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Q){return typeof Q}:function(Q){return Q&&"function"==typeof Symbol&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q})(Z)}function h(Z){return function x(Z){if(Array.isArray(Z))return I(Z)}(Z)||function _(Z){if(typeof Symbol<"u"&&null!=Z[Symbol.iterator]||null!=Z["@@iterator"])return Array.from(Z)}(Z)||C(Z)||function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(Z,Q){return function N(Z){if(Array.isArray(Z))return Z}(Z)||function L(Z,Q){var te=null==Z?null:typeof Symbol<"u"&&Z[Symbol.iterator]||Z["@@iterator"];if(null!=te){var pe,z,oe,ae,ee=[],he=!0,de=!1;try{if(oe=(te=te.call(Z)).next,0===Q){if(Object(te)!==te)return;he=!1}else for(;!(he=(pe=oe.call(te)).done)&&(ee.push(pe.value),ee.length!==Q);he=!0);}catch(ue){de=!0,z=ue}finally{try{if(!he&&null!=te.return&&(ae=te.return(),Object(ae)!==ae))return}finally{if(de)throw z}}return ee}}(Z,Q)||C(Z,Q)||function D(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(Z,Q){if(Z){if("string"==typeof Z)return I(Z,Q);var te=Object.prototype.toString.call(Z).slice(8,-1);if("Object"===te&&Z.constructor&&(te=Z.constructor.name),"Map"===te||"Set"===te)return Array.from(Z);if("Arguments"===te||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return I(Z,Q)}}function I(Z,Q){(null==Q||Q>Z.length)&&(Q=Z.length);for(var te=0,pe=new Array(Q);te<Q;te++)pe[te]=Z[te];return pe}function G(Z,Q){for(var te=0;te<Q.length;te++){var pe=Q[te];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(Z,U(pe.key),pe)}}function k(Z,Q,te){return Q&&G(Z.prototype,Q),te&&G(Z,te),Object.defineProperty(Z,"prototype",{writable:!1}),Z}function U(Z){var Q=function B(Z,Q){if("object"!==u(Z)||null===Z)return Z;var te=Z[Symbol.toPrimitive];if(void 0!==te){var pe=te.call(Z,Q||"default");if("object"!==u(pe))return pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Q?String:Number)(Z)}(Z,"string");return"symbol"===u(Q)?Q:String(Q)}function K(Z,Q){if(!(Z instanceof Q))throw new TypeError("Cannot call a class as a function")}var J=(0,f(3122).Z)("quill:selection");function ie(Z){return Z<0?0:Z}var re=k(function Z(Q){var te=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;K(this,Z),this.index=Q,this.length=te}),q=function(){function Z(Q,te,pe){var z=this;K(this,Z),this.emitter=te,this.scroll=Q,this.composition=pe,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new re(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){!z.mouseDown&&!z.composition.isCompositionInProgress()&&setTimeout(z.update.bind(z,s.Z.sources.USER),1)}),this.emitter.on(s.Z.events.SCROLL_BEFORE_UPDATE,function(){if(z.hasFocus()){var oe=z.getNativeRange();null!=oe&&oe.start.node!==z.cursor.textNode&&z.emitter.once(s.Z.events.SCROLL_UPDATE,function(){try{z.root.contains(oe.start.node)&&z.root.contains(oe.end.node)&&z.setNativeRange(oe.start.node,oe.start.offset,oe.end.node,oe.end.offset),z.update(s.Z.sources.SILENT)}catch{}})}}),this.emitter.on(s.Z.events.SCROLL_OPTIMIZE,function(oe,ae){if(ae.range){var ee=ae.range;z.setNativeRange(ee.startNode,ee.startOffset,ee.endNode,ee.endOffset),z.update(s.Z.sources.SILENT)}}),this.update(s.Z.sources.SILENT)}return k(Z,[{key:"handleDragging",value:function(){var te=this;this.emitter.listenDOM("mousedown",document.body,function(){te.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){te.mouseDown=!1,te.update(s.Z.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(te,pe){this.scroll.update();var z=this.getNativeRange();if(null!=z&&z.native.collapsed&&!this.scroll.query(te,S.Scope.BLOCK)){if(z.start.node!==this.cursor.textNode){var oe=this.scroll.find(z.start.node,!1);if(null==oe)return;if(oe instanceof S.LeafBlot){var ae=oe.split(z.start.offset);oe.parent.insertBefore(this.cursor,ae)}else oe.insertBefore(this.cursor,z.start.node);this.cursor.attach()}this.cursor.format(te,pe),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}},{key:"getBounds",value:function(te){var pe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,z=this.scroll.length();te=Math.min(te,z-1),pe=Math.min(te+pe,z-1)-te;var oe,ee=w(this.scroll.leaf(te),2),he=ee[0],de=ee[1];if(null==he)return null;var be=w(this.getPositionData(he,de,!0),2);oe=be[0],de=be[1];var ve=document.createRange();if(pe>0){ve.setStart(oe,de);var Ce=w(this.scroll.leaf(te+pe),2);if(null==(he=Ce[0]))return null;var ge=w(this.getPositionData(he,de=Ce[1],!0),2);return ve.setEnd(oe=ge[0],de=ge[1]),ve.getBoundingClientRect()}var xe,fe="left";if(oe instanceof Text){if(de<oe.data.length)ve.setStart(oe,de),ve.setEnd(oe,de+1);else{var Te=ie(de-1);ve.setStart(oe,Te),ve.setEnd(oe,de),fe="right"}xe=ve.getBoundingClientRect()}else xe=he.domNode.getBoundingClientRect(),de>0&&(fe="right");return{bottom:xe.top+xe.height,height:xe.height,left:xe[fe],right:xe[fe],top:xe.top,width:0}}},{key:"getNativeRange",value:function(){var te,pe,z=this.root.getRootNode(),oe=null!==(te=null===(pe=z.getSelection)||void 0===pe?void 0:pe.call(z))&&void 0!==te?te:document.getSelection();if(null==oe||oe.rangeCount<=0)return null;var ae=oe.getRangeAt(0);if(null==ae)return null;var ee=this.normalizeNative(ae);return J.info("getNativeRange",ee),ee}},{key:"getRange",value:function(){var te=this.getNativeRange();return null==te?[null,null]:[this.normalizedToRange(te),te]}},{key:"hasFocus",value:function(){var te=this.root.getRootNode();return te.activeElement===this.root||Y(this.root,te.activeElement)}},{key:"normalizedToRange",value:function(te){var pe=this,z=[[te.start.node,te.start.offset]];te.native.collapsed||z.push([te.end.node,te.end.offset]);var oe=z.map(function(he){var de=w(he,2),ue=de[0],be=de[1],ve=pe.scroll.find(ue,!0),le=ve.offset(pe.scroll);return 0===be?le:ve instanceof S.LeafBlot?le+ve.index(ue,be):le+ve.length()}),ae=Math.min(Math.max.apply(Math,h(oe)),this.scroll.length()-1),ee=Math.min.apply(Math,[ae].concat(h(oe)));return new re(ee,ae-ee)}},{key:"normalizeNative",value:function(te){if(!Y(this.root,te.startContainer)||!te.collapsed&&!Y(this.root,te.endContainer))return null;var pe={start:{node:te.startContainer,offset:te.startOffset},end:{node:te.endContainer,offset:te.endOffset},native:te};return[pe.start,pe.end].forEach(function(z){for(var oe=z.node,ae=z.offset;!(oe instanceof Text)&&oe.childNodes.length>0;)if(oe.childNodes.length>ae)oe=oe.childNodes[ae],ae=0;else{if(oe.childNodes.length!==ae)break;ae=(oe=oe.lastChild)instanceof Text?oe.data.length:oe.childNodes.length>0?oe.childNodes.length:oe.childNodes.length+1}z.node=oe,z.offset=ae}),pe}},{key:"rangeToNative",value:function(te){var pe=this,z=te.collapsed?[te.index]:[te.index,te.index+te.length],oe=[],ae=this.scroll.length();return z.forEach(function(ee,he){ee=Math.min(ae-1,ee);var ue=w(pe.scroll.leaf(ee),2),Ce=w(pe.getPositionData(ue[0],ue[1],0!==he),2);oe.push(Ce[0],Ce[1])}),oe.length<2?oe.concat(oe):oe}},{key:"getPositionData",value:function(te,pe,z){return te instanceof S.LeafBlot?te.position(pe,z):[te.domNode,pe]}},{key:"scrollIntoView",value:function(te){var pe=this.lastRange;if(null!=pe){var z=this.getBounds(pe.index,pe.length);if(null!=z){var oe=this.scroll.length()-1,he=w(this.scroll.line(Math.min(pe.index,oe)),1)[0],de=he;if(pe.length>0&&(de=w(this.scroll.line(Math.min(pe.index+pe.length,oe)),1)[0]),null!=he&&null!=de){var ve=te.getBoundingClientRect();z.top<ve.top?te.scrollTop-=ve.top-z.top:z.bottom>ve.bottom&&(te.scrollTop+=z.bottom-ve.bottom)}}}}},{key:"setNativeRange",value:function(te,pe){var z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:te,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:pe,ae=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(J.info("setNativeRange",te,pe,z,oe),null==te||null!=this.root.parentNode&&null!=te.parentNode&&null!=z.parentNode){var ee=document.getSelection();if(null!=ee)if(null!=te){this.hasFocus()||this.root.focus();var de=(this.getNativeRange()||{}).native;if(null==de||ae||te!==de.startContainer||pe!==de.startOffset||z!==de.endContainer||oe!==de.endOffset){"BR"===te.tagName&&(pe=Array.from(te.parentNode.childNodes).indexOf(te),te=te.parentNode),"BR"===z.tagName&&(oe=Array.from(z.parentNode.childNodes).indexOf(z),z=z.parentNode);var ue=document.createRange();pe=ie(pe),oe=ie(oe),ue.setStart(te,pe),ue.setEnd(z,oe),ee.removeAllRanges(),ee.addRange(ue)}}else ee.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(te){var pe=arguments.length>1&&void 0!==arguments[1]&&arguments[1],z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.Z.sources.API;if("string"==typeof pe&&(z=pe,pe=!1),J.info("setRange",te),null!=te){var oe=this.rangeToNative(te);this.setNativeRange.apply(this,h(oe).concat([pe]))}else this.setNativeRange(null);this.update(z)}},{key:"update",value:function(){var te=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Z.sources.USER,pe=this.lastRange,oe=w(this.getRange(),2),ee=oe[1];if(this.lastRange=oe[0],this.lastNative=ee,null!=this.lastRange&&(this.savedRange=this.lastRange),!c()(pe,this.lastRange)){var he;if(!this.composition.isCompositionInProgress()&&null!=ee&&ee.native.collapsed&&ee.start.node!==this.cursor.textNode){var de=this.cursor.restore();de&&this.setNativeRange(de.startNode,de.startOffset,de.endNode,de.endOffset)}var be,ue=[s.Z.events.SELECTION_CHANGE,y()(this.lastRange),y()(pe),te];(he=this.emitter).emit.apply(he,[s.Z.events.EDITOR_CHANGE].concat(ue)),te!==s.Z.sources.SILENT&&(be=this.emitter).emit.apply(be,ue)}}}]),Z}();function Y(Z,Q){return Q instanceof Text&&(Q=Q.parentNode),Z.contains(Q)}},1690:(P,b,f)=>{"use strict";function S(h){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"==typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(h)}function y(h,g){for(var _=0;_<g.length;_++){var x=g[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,c(x.key),x)}}function c(h){var g=function s(h,g){if("object"!==S(h)||null===h)return h;var _=h[Symbol.toPrimitive];if(void 0!==_){var x=_.call(h,g||"default");if("object"!==S(x))return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===g?String:Number)(h)}(h,"string");return"symbol"===S(g)?g:String(g)}f.d(b,{Z:()=>u});var a=function(){function h(g,_){(function T(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,h),this.quill=g,this.options=_,this.modules={}}return function d(h,g,_){g&&y(h.prototype,g),_&&y(h,_),Object.defineProperty(h,"prototype",{writable:!1})}(h,[{key:"init",value:function(){var _=this;Object.keys(this.options.modules).forEach(function(x){null==_.modules[x]&&_.addModule(x)})}},{key:"addModule",value:function(_){var x=this.quill.constructor.import("modules/".concat(_));return this.modules[_]=new x(this.quill,this.options.modules[_]||{}),this.modules[_]}}]),h}();a.DEFAULTS={modules:{}},a.themes={default:a};const u=a},715:(P,b,f)=>{"use strict";f.d(b,{HE:()=>c,dk:()=>d,if:()=>y});var S=f(1233),T={scope:S.Scope.BLOCK,whitelist:["right","center","justify"]},y=new S.Attributor("align","align",T),d=new S.ClassAttributor("align","ql-align",T),c=new S.StyleAttributor("align","text-align",T)},7898:(P,b,f)=>{"use strict";f.d(b,{Y:()=>y,w:()=>d});var S=f(1233),T=f(6039),y=new S.ClassAttributor("background","ql-bg",{scope:S.Scope.INLINE}),d=new T.OO("background","background-color",{scope:S.Scope.INLINE})},3991:(P,b,f)=>{"use strict";function T(G){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(G)}function d(G,k){for(var U=0;U<k.length;U++){var B=k[U];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(G,s(B.key),B)}}function s(G){var k=function a(G,k){if("object"!==T(G)||null===G)return G;var U=G[Symbol.toPrimitive];if(void 0!==U){var B=U.call(G,k||"default");if("object"!==T(B))return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===k?String:Number)(G)}(G,"string");return"symbol"===T(k)?k:String(k)}function u(){return u=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(k,U,B){var K=function h(G,k){for(;!Object.prototype.hasOwnProperty.call(G,k)&&null!==(G=I(G)););return G}(k,U);if(K){var J=Object.getOwnPropertyDescriptor(K,U);return J.get?J.get.call(arguments.length<3?k:B):J.value}},u.apply(this,arguments)}function _(G,k){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,K){return B.__proto__=K,B})(G,k)}function I(G){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)})(G)}f.d(b,{Z:()=>N});var L=function(G){!function g(G,k){if("function"!=typeof k&&null!==k)throw new TypeError("Super expression must either be null or a function");G.prototype=Object.create(k&&k.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),Object.defineProperty(G,"prototype",{writable:!1}),k&&_(G,k)}(U,G);var k=function x(G){var k=function C(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var K,B=I(G);if(k){var J=I(this).constructor;K=Reflect.construct(B,arguments,J)}else K=B.apply(this,arguments);return function w(G,k){if(k&&("object"===T(k)||"function"==typeof k))return k;if(void 0!==k)throw new TypeError("Derived constructors may only return object or undefined");return function D(G){if(void 0===G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G}(G)}(this,K)}}(U);function U(){return function y(G,k){if(!(G instanceof k))throw new TypeError("Cannot call a class as a function")}(this,U),k.apply(this,arguments)}return function c(G,k,U){k&&d(G.prototype,k),U&&d(G,U),Object.defineProperty(G,"prototype",{writable:!1})}(U,[{key:"optimize",value:function(K){u(I(U.prototype),"optimize",this).call(this,K),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return u(I(U),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),U}(f(6603).Z);L.blotName="bold",L.tagName=["STRONG","B"];const N=L},7309:(P,b,f)=>{"use strict";f.d(b,{EK:()=>ie,ZP:()=>J,se:()=>K});var S=f(6446),T=f(4122),y=f(3657),d=f(6603),c=f(8222),s=f(3553),a=f(281);function u(re){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(q){return typeof q}:function(q){return q&&"function"==typeof Symbol&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(re)}function h(re,q){if(!(re instanceof q))throw new TypeError("Cannot call a class as a function")}function g(re,q){for(var Y=0;Y<q.length;Y++){var Z=q[Y];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(re,x(Z.key),Z)}}function _(re,q,Y){return q&&g(re.prototype,q),Y&&g(re,Y),Object.defineProperty(re,"prototype",{writable:!1}),re}function x(re){var q=function w(re,q){if("object"!==u(re)||null===re)return re;var Y=re[Symbol.toPrimitive];if(void 0!==Y){var Z=Y.call(re,q||"default");if("object"!==u(Z))return Z;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===q?String:Number)(re)}(re,"string");return"symbol"===u(q)?q:String(q)}function D(){return D=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(q,Y,Z){var Q=function C(re,q){for(;!Object.prototype.hasOwnProperty.call(re,q)&&null!==(re=B(re)););return re}(q,Y);if(Q){var te=Object.getOwnPropertyDescriptor(Q,Y);return te.get?te.get.call(arguments.length<3?q:Z):te.value}},D.apply(this,arguments)}function I(re,q){if("function"!=typeof q&&null!==q)throw new TypeError("Super expression must either be null or a function");re.prototype=Object.create(q&&q.prototype,{constructor:{value:re,writable:!0,configurable:!0}}),Object.defineProperty(re,"prototype",{writable:!1}),q&&L(re,q)}function L(re,q){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Z,Q){return Z.__proto__=Q,Z})(re,q)}function N(re){var q=function U(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Q,Z=B(re);if(q){var te=B(this).constructor;Q=Reflect.construct(Z,arguments,te)}else Q=Z.apply(this,arguments);return function G(re,q){if(q&&("object"===u(q)||"function"==typeof q))return q;if(void 0!==q)throw new TypeError("Derived constructors may only return object or undefined");return function k(re){if(void 0===re)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re}(re)}(this,Q)}}function B(re){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Y){return Y.__proto__||Object.getPrototypeOf(Y)})(re)}var K=function(re){I(Y,re);var q=N(Y);function Y(){return h(this,Y),q.apply(this,arguments)}return _(Y,[{key:"code",value:function(Q,te){var pe=this.children.map(function(z){return z.length()<=1?"":z.domNode.textContent}).join("\n").slice(Q,Q+te);return(0,c.b)(pe)}},{key:"html",value:function(Q,te){return"<pre>\n".concat(this.code(Q,te),"\n</pre>")}}],[{key:"create",value:function(Q){var te=D(B(Y),"create",this).call(this,Q);return te.setAttribute("spellcheck",!1),te}}]),Y}(s.Z),J=function(re){I(Y,re);var q=N(Y);function Y(){return h(this,Y),q.apply(this,arguments)}return _(Y,null,[{key:"register",value:function(){a.ZP.register(K)}}]),Y}(S.ZP),ie=function(re){I(Y,re);var q=N(Y);function Y(){return h(this,Y),q.apply(this,arguments)}return _(Y)}(d.Z);ie.blotName="code",ie.tagName="CODE",J.blotName="code-block",J.className="ql-code-block",J.tagName="DIV",K.blotName="code-block-container",K.className="ql-code-block-container",K.tagName="DIV",K.allowedChildren=[J],J.allowedChildren=[c.Z,T.Z,y.Z],J.requiredContainer=K,J.TAB="  "},6039:(P,b,f)=>{"use strict";f.d(b,{HQ:()=>G,Hn:()=>N,OO:()=>L});var S=f(1233);function T(k){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(U){return typeof U}:function(U){return U&&"function"==typeof Symbol&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(k)}function d(k,U){for(var B=0;B<U.length;B++){var K=U[B];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(k,s(K.key),K)}}function s(k){var U=function a(k,U){if("object"!==T(k)||null===k)return k;var B=k[Symbol.toPrimitive];if(void 0!==B){var K=B.call(k,U||"default");if("object"!==T(K))return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===U?String:Number)(k)}(k,"string");return"symbol"===T(U)?U:String(U)}function u(){return u=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(U,B,K){var J=function h(k,U){for(;!Object.prototype.hasOwnProperty.call(k,U)&&null!==(k=I(k)););return k}(U,B);if(J){var ie=Object.getOwnPropertyDescriptor(J,B);return ie.get?ie.get.call(arguments.length<3?U:K):ie.value}},u.apply(this,arguments)}function _(k,U){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,J){return K.__proto__=J,K})(k,U)}function I(k){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)})(k)}var L=function(k){!function g(k,U){if("function"!=typeof U&&null!==U)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(U&&U.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),Object.defineProperty(k,"prototype",{writable:!1}),U&&_(k,U)}(B,k);var U=function x(k){var U=function C(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var J,K=I(k);if(U){var ie=I(this).constructor;J=Reflect.construct(K,arguments,ie)}else J=K.apply(this,arguments);return function w(k,U){if(U&&("object"===T(U)||"function"==typeof U))return U;if(void 0!==U)throw new TypeError("Derived constructors may only return object or undefined");return function D(k){if(void 0===k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}(k)}(this,J)}}(B);function B(){return function y(k,U){if(!(k instanceof U))throw new TypeError("Cannot call a class as a function")}(this,B),U.apply(this,arguments)}return function c(k,U,B){U&&d(k.prototype,U),B&&d(k,B),Object.defineProperty(k,"prototype",{writable:!1})}(B,[{key:"value",value:function(J){var ie=u(I(B.prototype),"value",this).call(this,J);if(0!==ie.indexOf("rgb("))return ie;var re=(ie=ie.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map(function(q){return"00".concat(parseInt(q,10).toString(16)).slice(-2)}).join("");return"#".concat(re)}}]),B}(S.StyleAttributor),N=new S.ClassAttributor("color","ql-color",{scope:S.Scope.INLINE}),G=new L("color","color",{scope:S.Scope.INLINE})},4048:(P,b,f)=>{"use strict";f.d(b,{H8:()=>c,IF:()=>y,hY:()=>d});var S=f(1233),T={scope:S.Scope.BLOCK,whitelist:["rtl"]},y=new S.Attributor("direction","dir",T),d=new S.ClassAttributor("direction","ql-direction",T),c=new S.StyleAttributor("direction","direction",T)},5832:(P,b,f)=>{"use strict";f.d(b,{H:()=>k,_:()=>N});var S=f(1233);function T(U){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(B){return typeof B}:function(B){return B&&"function"==typeof Symbol&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B})(U)}function d(U,B){for(var K=0;K<B.length;K++){var J=B[K];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(U,s(J.key),J)}}function s(U){var B=function a(U,B){if("object"!==T(U)||null===U)return U;var K=U[Symbol.toPrimitive];if(void 0!==K){var J=K.call(U,B||"default");if("object"!==T(J))return J;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===B?String:Number)(U)}(U,"string");return"symbol"===T(B)?B:String(B)}function u(){return u=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(B,K,J){var ie=function h(U,B){for(;!Object.prototype.hasOwnProperty.call(U,B)&&null!==(U=I(U)););return U}(B,K);if(ie){var re=Object.getOwnPropertyDescriptor(ie,K);return re.get?re.get.call(arguments.length<3?B:J):re.value}},u.apply(this,arguments)}function _(U,B){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,ie){return J.__proto__=ie,J})(U,B)}function I(U){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)})(U)}var L={scope:S.Scope.INLINE,whitelist:["serif","monospace"]},N=new S.ClassAttributor("font","ql-font",L),G=function(U){!function g(U,B){if("function"!=typeof B&&null!==B)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(B&&B.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),B&&_(U,B)}(K,U);var B=function x(U){var B=function C(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ie,J=I(U);if(B){var re=I(this).constructor;ie=Reflect.construct(J,arguments,re)}else ie=J.apply(this,arguments);return function w(U,B){if(B&&("object"===T(B)||"function"==typeof B))return B;if(void 0!==B)throw new TypeError("Derived constructors may only return object or undefined");return function D(U){if(void 0===U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}(U)}(this,ie)}}(K);function K(){return function y(U,B){if(!(U instanceof B))throw new TypeError("Cannot call a class as a function")}(this,K),B.apply(this,arguments)}return function c(U,B,K){B&&d(U.prototype,B),K&&d(U,K),Object.defineProperty(U,"prototype",{writable:!1})}(K,[{key:"value",value:function(ie){return u(I(K.prototype),"value",this).call(this,ie).replace(/["']/g,"")}}]),K}(S.StyleAttributor),k=new G("font","font-family",L)},7256:(P,b,f)=>{"use strict";function T(G){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(G)}function d(G,k){for(var U=0;U<k.length;U++){var B=k[U];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(G,s(B.key),B)}}function s(G){var k=function a(G,k){if("object"!==T(G)||null===G)return G;var U=G[Symbol.toPrimitive];if(void 0!==U){var B=U.call(G,k||"default");if("object"!==T(B))return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===k?String:Number)(G)}(G,"string");return"symbol"===T(k)?k:String(k)}function u(){return u=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(k,U,B){var K=function h(G,k){for(;!Object.prototype.hasOwnProperty.call(G,k)&&null!==(G=I(G)););return G}(k,U);if(K){var J=Object.getOwnPropertyDescriptor(K,U);return J.get?J.get.call(arguments.length<3?k:B):J.value}},u.apply(this,arguments)}function _(G,k){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,K){return B.__proto__=K,B})(G,k)}function I(G){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)})(G)}f.d(b,{N:()=>N,Z:()=>L});var L=function(G){!function g(G,k){if("function"!=typeof k&&null!==k)throw new TypeError("Super expression must either be null or a function");G.prototype=Object.create(k&&k.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),Object.defineProperty(G,"prototype",{writable:!1}),k&&_(G,k)}(U,G);var k=function x(G){var k=function C(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var K,B=I(G);if(k){var J=I(this).constructor;K=Reflect.construct(B,arguments,J)}else K=B.apply(this,arguments);return function w(G,k){if(k&&("object"===T(k)||"function"==typeof k))return k;if(void 0!==k)throw new TypeError("Derived constructors may only return object or undefined");return function D(G){if(void 0===G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G}(G)}(this,K)}}(U);function U(){return function y(G,k){if(!(G instanceof k))throw new TypeError("Cannot call a class as a function")}(this,U),k.apply(this,arguments)}return function c(G,k,U){k&&d(G.prototype,k),U&&d(G,U),Object.defineProperty(G,"prototype",{writable:!1})}(U,[{key:"format",value:function(K,J){K===this.statics.blotName&&J?this.domNode.setAttribute("href",this.constructor.sanitize(J)):u(I(U.prototype),"format",this).call(this,K,J)}}],[{key:"create",value:function(K){var J=u(I(U),"create",this).call(this,K);return J.setAttribute("href",this.sanitize(K)),J.setAttribute("rel","noopener noreferrer"),J.setAttribute("target","_blank"),J}},{key:"formats",value:function(K){return K.getAttribute("href")}},{key:"sanitize",value:function(K){return N(K,this.PROTOCOL_WHITELIST)?K:this.SANITIZED_URL}}]),U}(f(6603).Z);function N(G,k){var U=document.createElement("a");U.href=G;var B=U.href.slice(0,U.href.indexOf(":"));return k.indexOf(B)>-1}L.blotName="link",L.tagName="A",L.SANITIZED_URL="about:blank",L.PROTOCOL_WHITELIST=["http","https","mailto","tel"]},1629:(P,b,f)=>{"use strict";f.d(b,{Z:()=>y,m:()=>T});var S=f(1233),T=new S.ClassAttributor("size","ql-size",{scope:S.Scope.INLINE,whitelist:["small","large","huge"]}),y=new S.StyleAttributor("size","font-size",{scope:S.Scope.INLINE,whitelist:["10px","18px","32px"]})},1342:(P,b,f)=>{"use strict";f.d(b,{Du:()=>x,h6:()=>w,kk:()=>_,yA:()=>g});var S=f(6062),T=f(1801),y=f(8252);function d(D){return function u(D){if(Array.isArray(D))return h(D)}(D)||function a(D){if(typeof Symbol<"u"&&null!=D[Symbol.iterator]||null!=D["@@iterator"])return Array.from(D)}(D)||function s(D,C){if(D){if("string"==typeof D)return h(D,C);var I=Object.prototype.toString.call(D).slice(8,-1);if("Object"===I&&D.constructor&&(I=D.constructor.name),"Map"===I||"Set"===I)return Array.from(D);if("Arguments"===I||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return h(D,C)}}(D)||function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(D,C){(null==C||C>D.length)&&(C=D.length);for(var I=0,L=new Array(C);I<C;I++)L[I]=D[I];return L}var g=y.F1.map(function(D){return(0,S.Z)(y.Pw,D)}),_=y.Mu.map(function(D){return(0,T.Z)(y.Pw,D)}),x=_.reduce(function(D,C){return D[C.attrName]=C,D},{}),w=[].concat(d(g),d(_)).reduce(function(D,C){return D[C.keyName]=C,D},{})},8252:(P,b,f)=>{"use strict";f.d(b,{F1:()=>T,Mu:()=>y,Pw:()=>S,fU:()=>d});var S={name:"cell",allowedTags:["TH","TD","TR"]},T=["height","width"],y=["height","width","vertical-align","text-align","background-color","border","border-style","border-width","border-color","padding","padding-top","padding-right","padding-bottom","padding-left"],d=new Set([].concat(T,y))},6062:(P,b,f)=>{"use strict";f.d(b,{Z:()=>a});var S=f(1674),T=f(2141),y=f(3398),d=["name"];function a(u,h){var g=u.name,_=function c(u,h){if(null==u)return{};var _,x,g=function s(u,h){if(null==u)return{};var x,w,g={},_=Object.keys(u);for(w=0;w<_.length;w++)!(h.indexOf(x=_[w])>=0)&&(g[x]=u[x]);return g}(u,h);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(x=0;x<w.length;x++)!(h.indexOf(_=w[x])>=0)&&Object.prototype.propertyIsEnumerable.call(u,_)&&(g[_]=u[_])}return g}(u,d),x="".concat(g).concat((0,T.Z)(h)),w="".concat(y.WT.attribute).concat(g,"_").concat(h);return new S.Z(x,w,_)}},1801:(P,b,f)=>{"use strict";f.d(b,{Z:()=>w});var S=f(4569),T=f(2141),y=f(3398),d=["name","formatName"];function u(D,C){(null==C||C>D.length)&&(C=D.length);for(var I=0,L=new Array(C);I<C;I++)L[I]=D[I];return L}function w(D,C){var I=D.name,L=D.formatName,N=function _(D,C){if(null==D)return{};var L,N,I=function x(D,C){if(null==D)return{};var N,G,I={},L=Object.keys(D);for(G=0;G<L.length;G++)!(C.indexOf(N=L[G])>=0)&&(I[N]=D[N]);return I}(D,C);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(D);for(N=0;N<G.length;N++)!(C.indexOf(L=G[N])>=0)&&Object.prototype.propertyIsEnumerable.call(D,L)&&(I[L]=D[L])}return I}(D,d),k=function c(D,C){return function g(D){if(Array.isArray(D))return D}(D)||function h(D,C){var I=null==D?null:typeof Symbol<"u"&&D[Symbol.iterator]||D["@@iterator"];if(null!=I){var L,N,G,k,U=[],B=!0,K=!1;try{if(G=(I=I.call(D)).next,0===C){if(Object(I)!==I)return;B=!1}else for(;!(B=(L=G.call(I)).done)&&(U.push(L.value),U.length!==C);B=!0);}catch(J){K=!0,N=J}finally{try{if(!B&&null!=I.return&&(k=I.return(),Object(k)!==k))return}finally{if(K)throw N}}return U}}(D,C)||function a(D,C){if(D){if("string"==typeof D)return u(D,C);var I=Object.prototype.toString.call(D).slice(8,-1);if("Object"===I&&D.constructor&&(I=D.constructor.name),"Map"===I||"Set"===I)return Array.from(D);if("Arguments"===I||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return u(D,C)}}(D,C)||function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(C.split("-"),2),U=k[0],B=k[1],K="".concat(I).concat((0,T.Z)(L??U)).concat(B?(0,T.Z)(B):""),J="".concat(y.WT.style).concat(I,"_").concat(C);return new S.Z(K,J,N)}},319:(P,b,f)=>{"use strict";f.d(b,{Qu:()=>g,VT:()=>_,Zt:()=>w,li:()=>x});var S=f(6062),T=f(1801),y=f(19);function d(D){return function u(D){if(Array.isArray(D))return h(D)}(D)||function a(D){if(typeof Symbol<"u"&&null!=D[Symbol.iterator]||null!=D["@@iterator"])return Array.from(D)}(D)||function s(D,C){if(D){if("string"==typeof D)return h(D,C);var I=Object.prototype.toString.call(D).slice(8,-1);if("Object"===I&&D.constructor&&(I=D.constructor.name),"Map"===I||"Set"===I)return Array.from(D);if("Arguments"===I||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return h(D,C)}}(D)||function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(D,C){(null==C||C>D.length)&&(C=D.length);for(var I=0,L=new Array(C);I<C;I++)L[I]=D[I];return L}var g=y.N2.map(function(D){return(0,S.Z)(y.Sp,D)}),_=y.GX.map(function(D){return(0,T.Z)(y.Sp,D)}),x=_.reduce(function(D,C){return D[C.attrName]=C,D},{}),w=[].concat(d(g),d(_)).reduce(function(D,C){return D[C.keyName]=C,D},{})},19:(P,b,f)=>{"use strict";f.d(b,{GX:()=>y,N2:()=>T,Sp:()=>S,bc:()=>d});var S={name:"table",allowedTags:["TABLE"]},T=["height","width"],y=["height","width","text-align","background-color","border","border-style","border-width","border-color"],d=new Set([].concat(T,y))},8536:(P,b,f)=>{"use strict";function S(){return Math.random().toString(36).slice(2,6)}f.d(b,{Z:()=>S})},1969:(P,b,f)=>{"use strict";f.d(b,{KA:()=>ge,Lv:()=>Oe,RM:()=>xe,SC:()=>ye,iD:()=>ue,pj:()=>ve,xD:()=>Te,xJ:()=>Ee,xs:()=>le,zW:()=>de});var S=f(6446),T=f(4122),y=f(3553),d=f(5874),c=f(1342),s=f(319),a=f(8536),u=f(2795);function h($e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Be){return typeof Be}:function(Be){return Be&&"function"==typeof Symbol&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be})($e)}function g($e,Be){return function w($e){if(Array.isArray($e))return $e}($e)||function x($e,Be){var Ue=null==$e?null:typeof Symbol<"u"&&$e[Symbol.iterator]||$e["@@iterator"];if(null!=Ue){var ot,st,et,Ke,Ye=[],Pe=!0,Se=!1;try{if(et=(Ue=Ue.call($e)).next,0===Be){if(Object(Ue)!==Ue)return;Pe=!1}else for(;!(Pe=(ot=et.call(Ue)).done)&&(Ye.push(ot.value),Ye.length!==Be);Pe=!0);}catch(Re){Se=!0,st=Re}finally{try{if(!Pe&&null!=Ue.return&&(Ke=Ue.return(),Object(Ke)!==Ke))return}finally{if(Se)throw st}}return Ye}}($e,Be)||I($e,Be)||function _(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I($e,Be){if($e){if("string"==typeof $e)return G($e,Be);var Ue=Object.prototype.toString.call($e).slice(8,-1);if("Object"===Ue&&$e.constructor&&(Ue=$e.constructor.name),"Map"===Ue||"Set"===Ue)return Array.from($e);if("Arguments"===Ue||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return G($e,Be)}}function G($e,Be){(null==Be||Be>$e.length)&&(Be=$e.length);for(var Ue=0,ot=new Array(Be);Ue<Be;Ue++)ot[Ue]=$e[Ue];return ot}function k($e,Be){if(!($e instanceof Be))throw new TypeError("Cannot call a class as a function")}function U($e,Be){for(var Ue=0;Ue<Be.length;Ue++){var ot=Be[Ue];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty($e,K(ot.key),ot)}}function B($e,Be,Ue){return Be&&U($e.prototype,Be),Ue&&U($e,Ue),Object.defineProperty($e,"prototype",{writable:!1}),$e}function K($e){var Be=function J($e,Be){if("object"!==h($e)||null===$e)return $e;var Ue=$e[Symbol.toPrimitive];if(void 0!==Ue){var ot=Ue.call($e,Be||"default");if("object"!==h(ot))return ot;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Be?String:Number)($e)}($e,"string");return"symbol"===h(Be)?Be:String(Be)}function ie(){return ie=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(Be,Ue,ot){var st=function re($e,Be){for(;!Object.prototype.hasOwnProperty.call($e,Be)&&null!==($e=z($e)););return $e}(Be,Ue);if(st){var et=Object.getOwnPropertyDescriptor(st,Ue);return et.get?et.get.call(arguments.length<3?Be:ot):et.value}},ie.apply(this,arguments)}function q($e,Be){if("function"!=typeof Be&&null!==Be)throw new TypeError("Super expression must either be null or a function");$e.prototype=Object.create(Be&&Be.prototype,{constructor:{value:$e,writable:!0,configurable:!0}}),Object.defineProperty($e,"prototype",{writable:!1}),Be&&Y($e,Be)}function Y($e,Be){return(Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ot,st){return ot.__proto__=st,ot})($e,Be)}function Z($e){var Be=function pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var st,ot=z($e);if(Be){var et=z(this).constructor;st=Reflect.construct(ot,arguments,et)}else st=ot.apply(this,arguments);return function Q($e,Be){if(Be&&("object"===h(Be)||"function"==typeof Be))return Be;if(void 0!==Be)throw new TypeError("Derived constructors may only return object or undefined");return function te($e){if(void 0===$e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}($e)}(this,st)}}function z($e){return(z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ue){return Ue.__proto__||Object.getPrototypeOf(Ue)})($e)}var oe=["row","cell"],ee="data-table-";function he($e,Be,Ue){$e.forEachAt(Be,Ue,function(ot,st,et){ot.deleteAt(st,et)})}var de=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"optimize",value:function(){var st,et=this.domNode.getAttribute("".concat(ee,"row"));if(this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)){var Ke=this.domNode,Ye={row:et};Object.keys(c.Du).forEach(function(Fe){var Xe=Ke.dataset[Fe.toLowerCase()];Xe&&(Ye[Fe]=Xe)}),this.wrap(this.statics.requiredContainer.blotName,Ye)}for(var Pe=arguments.length,Se=new Array(Pe),Re=0;Re<Pe;Re++)Se[Re]=arguments[Re];(st=ie(z(Ue.prototype),"optimize",this)).call.apply(st,[this].concat(Se))}},{key:"format",value:function(st,et){"tableCellLine"===st&&null===et&&(et=this.formats().tableCellLine);var Ye=oe.indexOf(st)>-1;if(Ye||s.li[st]||c.Du[st]){var Se,Re,Pe="data-".concat(Ye?"table-":"").concat(st.toLowerCase());(0,u.Z)(this.domNode,Pe,et),c.Du[st]&&(null===(Se=this.cell())||void 0===Se||Se.format(st,et)),s.li[st]&&(null===(Re=this.cell())||void 0===Re||null===(Re=Re.table())||void 0===Re||Re.format(st,et))}else ie(z(Ue.prototype),"format",this).call(this,st,et)}},{key:"cell",value:function(){return"row"in this.parent?this.parent:null}}],[{key:"create",value:function(st){var et=ie(z(Ue),"create",this).call(this,st);return oe.forEach(function(Ke){var Ye,Pe="row"===Ke?Oe:ze;et.setAttribute("".concat(ee).concat(Ke),null!==(Ye=st?.[Ke])&&void 0!==Ye?Ye:Pe())}),et}},{key:"formats",value:function(st){return oe.reduce(function(et,Ke){var Ye="".concat(ee).concat(Ke);return st.hasAttribute(Ye)&&(et[Ke]=st.getAttribute(Ye)||void 0),et},{})}}]),Ue}(S.ZP);de.blotName="tableCellLine",de.className="ql-table-cell-line",de.tagName="P";var ue=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue)}(de);ue.blotName="tableHeaderCellLine",ue.className="ql-table-header-cell-line";var be=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"format",value:function(st,et){var Ke;null===(Ke=c.Du[st])||void 0===Ke||Ke.add(this.domNode,et)}},{key:"checkMerge",value:function(){if(ie(z(Ue.prototype),"checkMerge",this).call(this)&&null!=this.next.children.head){var st=this.children.head.formats()[this.children.head.statics.blotName],et=this.children.tail.formats()[this.children.tail.statics.blotName],Ke=this.next.children.head.formats()[this.next.children.head.statics.blotName],Ye=this.next.children.tail.formats()[this.next.children.tail.statics.blotName];return st.cell===et.cell&&st.cell===Ke.cell&&st.cell===Ye.cell}return!1}},{key:"formats",value:function(){return Ue.cellFormats(this.domNode)}},{key:"cellOffset",value:function(){return this.parent?this.parent.children.indexOf(this):-1}},{key:"row",value:function(){return"table"in this.parent?this.parent:null}},{key:"rowOffset",value:function(){return this.row()?this.row().rowOffset():-1}},{key:"table",value:function(){var st;return null===(st=this.row())||void 0===st?void 0:st.table()}},{key:"optimize",value:function(){var st,et,Ke=null!==(st=this.domNode.getAttribute("".concat(ee,"row")))&&void 0!==st?st:this.domNode.getAttribute("".concat(ee,"header-row"));this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName,{row:Ke});for(var Ye=arguments.length,Pe=new Array(Ye),Se=0;Se<Ye;Se++)Pe[Se]=arguments[Se];(et=ie(z(Ue.prototype),"optimize",this)).call.apply(et,[this].concat(Pe))}},{key:"deleteAt",value:function(st,et){he(this.children,st,et)}}],[{key:"create",value:function(st){var et=ie(z(Ue),"create",this).call(this,st);return st&&Object.keys(st).forEach(function(Ke){var Ye;null===(Ye=c.Du[Ke])||void 0===Ye||Ye.add(et,st[Ke])}),et}},{key:"cellFormats",value:function(st){var Ke,et={};return(st.hasAttribute("".concat(ee,"row"))||st.hasAttribute("".concat(ee,"header-row")))&&(et.row=null!==(Ke=st.getAttribute("".concat(ee,"row")))&&void 0!==Ke?Ke:st.getAttribute("".concat(ee,"header-row"))),Object.keys(c.Du).forEach(function(Ye){var Pe,Se=null===(Pe=st.firstElementChild)||void 0===Pe?void 0:Pe.dataset[Ye.toLowerCase()];Se&&(et[Ye]=Se)}),et}}]),Ue}(y.Z);be.tagName=["TD","TH"];var ve=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"format",value:function(st,et){"row"===st?(this.domNode.setAttribute("".concat(ee).concat(st),et),this.children.forEach(function(Ke){Ke.format(st,et)})):ie(z(Ue.prototype),"format",this).call(this,st,et)}}],[{key:"create",value:function(st){var et=ie(z(Ue),"create",this).call(this,st),Ke="".concat(ee,"row");return null!=st&&st.row&&et.setAttribute(Ke,st.row),et}}]),Ue}(be);ve.blotName="tableCell",ve.className="ql-table-data-cell",ve.dataAttribute="".concat(ee,"row"),ve.defaultChild=de;var le=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"format",value:function(st,et){"row"===st?(this.domNode.setAttribute("".concat(ee).concat(st),et),this.children.forEach(function(Ke){Ke.format(st,et)})):ie(z(Ue.prototype),"format",this).call(this,st,et)}}],[{key:"create",value:function(st){var et=ie(z(Ue),"create",this).call(this,st),Ke="".concat(ee,"header-row");return st&&st.row&&et.setAttribute(Ke,st.row),et}}]),Ue}(be);le.tagName=["TH","TD"],le.className="ql-table-header-cell",le.blotName="tableHeaderCell",le.dataAttribute="".concat(ee,"header-row"),le.defaultChild=ue;var Ce=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"checkMerge",value:function(){if(ie(z(Ue.prototype),"checkMerge",this).call(this)&&(0,d.Z)(this.next.children.head)){var st="row",et=this.children.head.formats(),Ke=this.children.tail.formats(),Ye=this.next.children.head.formats(),Pe=this.next.children.tail.formats();return et[st]===Ke[st]&&et[st]===Ye[st]&&et[st]===Pe[st]}return!1}},{key:"optimize",value:function(){for(var st,et=this,Ke=arguments.length,Ye=new Array(Ke),Pe=0;Pe<Ke;Pe++)Ye[Pe]=arguments[Pe];(st=ie(z(Ue.prototype),"optimize",this)).call.apply(st,[this].concat(Ye));var Se=this.childFormatName;this.children.forEach(function(Re){if((0,d.Z)(Re.next)){var Fe=Re.formats(),Xe=Re.next.formats();if(Fe[Se]!==Xe[Se]){var tt=et.splitAfter(Re);tt&&tt.optimize(),et.prev&&et.prev.optimize()}}})}},{key:"rowOffset",value:function(){return this.parent?this.parent.children.indexOf(this):-1}},{key:"table",value:function(){var st;return null===(st=this.parent)||void 0===st?void 0:st.parent}},{key:"formats",value:function(){var st={},et="".concat(ee,"row");return this.domNode.hasAttribute(et)&&(st[et]=this.domNode.getAttribute(et)),st}}],[{key:"create",value:function(st){var et=ie(z(Ue),"create",this).call(this,st);return null!=st&&st.row&&et.setAttribute("".concat(ee,"row"),st.row),et}}]),Ue}(y.Z);Ce.tagName="TR";var ye=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(ot,st){var et;return k(this,Ue),(et=Be.call(this,ot,st)).childFormatName="table",et}return B(Ue,[{key:"deleteAt",value:function(st,et){he(this.children,st,et)}}]),Ue}(Ce);ye.blotName="tableRow";var ge=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(ot,st){var et;return k(this,Ue),(et=Be.call(this,ot,st)).childFormatName="tableHeaderCell",et}return B(Ue)}(Ce);ge.blotName="tableHeaderRow";var fe=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"optimize",value:function(){var st;if(this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)){var et,Ke=(null===(et=this.children.head.children.head.children)||void 0===et||null===(et=et.head)||void 0===et?void 0:et.domNode)||null,Ye={};Ke&&Object.keys(s.li).forEach(function(Fe){var Xe=Ke.dataset[Fe.toLowerCase()];Xe&&(Ye[Fe]=Xe)}),this.wrap(this.statics.requiredContainer.blotName,Ye)}for(var Pe=arguments.length,Se=new Array(Pe),Re=0;Re<Pe;Re++)Se[Re]=arguments[Re];(st=ie(z(Ue.prototype),"optimize",this)).call.apply(st,[this].concat(Se))}}]),Ue}(y.Z),xe=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue)}(fe);xe.blotName="tableBody",xe.tagName="TBODY";var Te=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue)}(fe);Te.blotName="tableHeader",Te.tagName="THEAD";var Ee=function($e){q(Ue,$e);var Be=Z(Ue);function Ue(){return k(this,Ue),Be.apply(this,arguments)}return B(Ue,[{key:"balanceCells",value:function(){var st=this.descendants(ge),et=this.descendants(ye),Ke=this.getMaxTableColCount(st,et);this.balanceRows(Ke,st,le),this.balanceRows(Ke,et,ve)}},{key:"getMaxTableColCount",value:function(st,et){return Math.max(this.getMaxRowColCount(st),this.getMaxRowColCount(et))}},{key:"getMaxRowColCount",value:function(st){return Math.max.apply(Math,function D($e){return function N($e){if(Array.isArray($e))return G($e)}($e)||function L($e){if(typeof Symbol<"u"&&null!=$e[Symbol.iterator]||null!=$e["@@iterator"])return Array.from($e)}($e)||I($e)||function C(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(st.map(function(et){return et.children.length})))}},{key:"balanceRows",value:function(st,et,Ke){var Ye=this;et.forEach(function(Pe){new Array(st-Pe.children.length).fill(0).forEach(function(){var Se;(0,d.Z)(Pe.children.head)&&(Se=Ke.cellFormats(Pe.children.head.domNode));var Re=Ye.scroll.create(Ke.blotName,Se),Fe=Ye.scroll.create(Ke.allowedChildren[0].blotName,Se);Re.appendChild(Fe),Pe.appendChild(Re),Re.optimize()})})}},{key:"cells",value:function(st){return this.rows().map(function(et){return et.children.at(st)})}},{key:"deleteColumn",value:function(st){var et=this;[Te,xe].forEach(function(Ke){var Se=g(et.descendants(Ke),1)[0];!(0,d.Z)(Se)||!(0,d.Z)(Se.children.head)||Se.children.forEach(function(Re){var Fe=Re.children.at(st);(0,d.Z)(Fe)&&Fe.remove()})})}},{key:"insertColumn",value:function(st){var et=this;[Te,xe].forEach(function(Ke){var Se=g(et.descendants(Ke),1)[0];if((0,d.Z)(Se)&&(0,d.Z)(Se.children.head)){var Re=Ke===Te?le:ve,Fe=Ke===Te?ue:de;Se.children.forEach(function(Xe){var tt=Xe.children.at(st),vt=Fe.formats(Xe.children.head.children.head.domNode),qe=et.scroll.create(Re.blotName,{row:vt.row}),At=et.scroll.create(Fe.blotName,{row:vt.row}),Tt=et.scroll.create(T.Z.blotName);At.appendChild(Tt),qe.appendChild(At),Xe.insertBefore(qe,tt)})}})}},{key:"insertRow",value:function(st){var et=this,Pe=g(this.descendants(xe),1)[0];if((0,d.Z)(Pe)&&(0,d.Z)(Pe.children.head)){var Se=Oe(),Re=this.scroll.create(ye.blotName,{row:Se});Pe.children.head.children.forEach(function(){var Xe=et.scroll.create(ve.blotName,{row:Se}),tt=et.scroll.create(de.blotName,{row:Se}),vt=et.scroll.create(T.Z.blotName);tt.appendChild(vt),Xe.appendChild(tt),Re.appendChild(Xe)});var Fe=Pe.children.at(st);Pe.insertBefore(Re,Fe)}}},{key:"insertHeaderRow",value:function(){var st=this,Ye=g(this.descendants(Te),1)[0],Re=g(this.descendants(xe),1)[0];if(!(0,d.Z)(Ye)&&(0,d.Z)(Re)&&(0,d.Z)(Re.children.head)){var Fe=Oe(),Xe=this.scroll.create(Te.blotName),tt=this.scroll.create(ge.blotName),vt=this.children.at(0);Xe.appendChild(tt),Re.children.head.children.forEach(function(){var qe=st.scroll.create(le.blotName,{row:Fe}),At=st.scroll.create(ue.blotName,{row:Fe}),Tt=st.scroll.create(T.Z.blotName);At.appendChild(Tt),qe.appendChild(At),tt.appendChild(qe),qe.optimize()}),this.insertBefore(Xe,vt)}}},{key:"rows",value:function(){var st=this.children.head;return(0,d.Z)(st)?st.children.map(function(et){return et}):[]}},{key:"formats",value:function(){var st={},et=this.cells()[0].domNode.firstElementChild;return Object.keys(s.li).forEach(function(Ke){var Ye=et?.dataset[Ke.toLowerCase()];Ye&&(st[Ke]=Ye)}),st}},{key:"format",value:function(st,et){var Ke=s.li[st];if(Ke){var Ye="data-".concat(st.toLowerCase());this.cells().forEach(function(Pe){(0,u.Z)(Pe.children.head.domNode,Ye,et)}),Ke.add(this.domNode,et)}}}],[{key:"create",value:function(st){var et=ie(z(Ue),"create",this).call(this,st);return st&&Object.keys(st).forEach(function(Ke){var Ye;null===(Ye=s.li[Ke])||void 0===Ye||Ye.add(et,st[Ke])}),et}}]),Ue}(y.Z);function Oe(){return"row-".concat((0,a.Z)())}function ze(){return"cell-".concat((0,a.Z)())}Ee.blotName="tableContainer",Ee.tagName="TABLE",Ee.allowedChildren=[Te,xe],xe.requiredContainer=Ee,Te.requiredContainer=Ee,xe.allowedChildren=[ye],ye.requiredContainer=xe,ye.allowedChildren=[ve],ve.requiredContainer=ye,de.requiredContainer=ve,ve.allowedChildren=[de],Te.allowedChildren=[ge],ge.requiredContainer=Te,ue.requiredContainer=le,le.allowedChildren=[ue],ge.allowedChildren=[le],le.requiredContainer=ge},2795:(P,b,f)=>{"use strict";function S(T,y,d){d?T.setAttribute(y,d):T.removeAttribute(y)}f.d(b,{Z:()=>S})},5635:(P,b,f)=>{"use strict";f.d(b,{HI:()=>xe,PF:()=>Te,ZP:()=>fe,fw:()=>$e});var S=f(9098),T=f.n(S),y=f(1233),d=f(6446),c=f(281),s=f(3122),a=f(7094),u=f(715),h=f(7898),g=f(7309),_=f(6039),x=f(4048),w=f(5832),D=f(1629),C=f(3071),I=f(2141);function L(tt,vt){var qe=Object.keys(tt);if(Object.getOwnPropertySymbols){var At=Object.getOwnPropertySymbols(tt);vt&&(At=At.filter(function(Tt){return Object.getOwnPropertyDescriptor(tt,Tt).enumerable})),qe.push.apply(qe,At)}return qe}function N(tt){for(var vt=1;vt<arguments.length;vt++){var qe=null!=arguments[vt]?arguments[vt]:{};vt%2?L(Object(qe),!0).forEach(function(At){k(tt,At,qe[At])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(qe)):L(Object(qe)).forEach(function(At){Object.defineProperty(tt,At,Object.getOwnPropertyDescriptor(qe,At))})}return tt}function G(tt){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(vt){return typeof vt}:function(vt){return vt&&"function"==typeof Symbol&&vt.constructor===Symbol&&vt!==Symbol.prototype?"symbol":typeof vt})(tt)}function k(tt,vt,qe){return(vt=Q(vt))in tt?Object.defineProperty(tt,vt,{value:qe,enumerable:!0,configurable:!0,writable:!0}):tt[vt]=qe,tt}function U(tt,vt){return function re(tt){if(Array.isArray(tt))return tt}(tt)||function ie(tt,vt){var qe=null==tt?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(null!=qe){var At,Tt,qt,wt,En=[],ri=!0,Tn=!1;try{if(qt=(qe=qe.call(tt)).next,0===vt){if(Object(qe)!==qe)return;ri=!1}else for(;!(ri=(At=qt.call(qe)).done)&&(En.push(At.value),En.length!==vt);ri=!0);}catch(Jn){Tn=!0,Tt=Jn}finally{try{if(!ri&&null!=qe.return&&(wt=qe.return(),Object(wt)!==wt))return}finally{if(Tn)throw Tt}}return En}}(tt,vt)||function K(tt,vt){if(tt){if("string"==typeof tt)return J(tt,vt);var qe=Object.prototype.toString.call(tt).slice(8,-1);if("Object"===qe&&tt.constructor&&(qe=tt.constructor.name),"Map"===qe||"Set"===qe)return Array.from(tt);if("Arguments"===qe||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(qe))return J(tt,vt)}}(tt,vt)||function B(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(tt,vt){(null==vt||vt>tt.length)&&(vt=tt.length);for(var qe=0,At=new Array(vt);qe<vt;qe++)At[qe]=tt[qe];return At}function Y(tt,vt){for(var qe=0;qe<vt.length;qe++){var At=vt[qe];At.enumerable=At.enumerable||!1,At.configurable=!0,"value"in At&&(At.writable=!0),Object.defineProperty(tt,Q(At.key),At)}}function Q(tt){var vt=function te(tt,vt){if("object"!==G(tt)||null===tt)return tt;var qe=tt[Symbol.toPrimitive];if(void 0!==qe){var At=qe.call(tt,vt||"default");if("object"!==G(At))return At;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===vt?String:Number)(tt)}(tt,"string");return"symbol"===G(vt)?vt:String(vt)}function z(tt,vt){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(At,Tt){return At.__proto__=Tt,At})(tt,vt)}function ee(tt){if(void 0===tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function de(tt){return(de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(qe){return qe.__proto__||Object.getPrototypeOf(qe)})(tt)}var ue=(0,s.Z)("quill:clipboard"),le=[[3,Xe],[3,Se],["br",function st(tt,vt){return Te(vt,"\n")||vt.insert("\n"),vt}],[1,Se],[1,function ot(tt,vt,qe){var At=qe.query(tt);if(null==At)return vt;if(At.prototype instanceof y.EmbedBlot){var Tt={},qt=At.value(tt);if(null!=qt)return Tt[At.blotName]=qt,(new(T())).insert(Tt,At.formats(tt,qe))}else if(At.prototype instanceof y.BlockBlot&&!Te(vt,"\n")&&vt.insert("\n"),"function"==typeof At.formats)return xe(vt,At.blotName,At.formats(tt,qe));return vt}],[1,function Ue(tt,vt,qe){if(-1===["TD","TH","TR","TABLE"].indexOf(tt.tagName)){var At=y.Attributor.keys(tt),Tt=y.ClassAttributor.keys(tt),qt=y.StyleAttributor.keys(tt),wt={};if(At.concat(Tt).concat(qt).forEach(function(En){var ri=qe.query(En,y.Scope.ATTRIBUTE);null!=ri&&(wt[ri.attrName]=ri.value(tt),wt[ri.attrName])||(null!=(ri=ye[En])&&(ri.attrName===En||ri.keyName===En)&&(wt[ri.attrName]=ri.value(tt)||void 0),null!=(ri=ge[En])&&(ri.attrName===En||ri.keyName===En)&&(wt[(ri=ge[En]).attrName]=ri.value(tt)||void 0))}),Object.keys(wt).length>0)return xe(vt,wt)}return vt}],[1,function Re(tt,vt){var qe={},At=tt.style||{};return["height","width"].forEach(function(Tt){var qt=-1!==["TD","TH"].indexOf(tt.tagName),wt="TABLE"===tt.tagName;if((qt||wt)&&At[Tt]){var En="".concat(wt?"table":"cell").concat((0,I.Z)(Tt));qe[En]=At[Tt]}}),"italic"===At.fontStyle&&(qe.italic=!0),-1!==At.textDecoration.indexOf("underline")&&(qe.underline=!0),-1!==At.textDecoration.indexOf("line-through")&&(qe.strike=!0),(0===At.fontWeight.indexOf("bold")||parseInt(At.fontWeight,10)>=700)&&(qe.bold=!0),Object.keys(qe).length>0&&(vt=xe(vt,qe)),parseFloat(At.textIndent||0)>0?(new(T())).insert("\t").concat(vt):vt}],["li",function Ye(tt,vt,qe){var At=qe.query(tt);if(null==At||"list"!==At.blotName||!Te(vt,"\n"))return vt;for(var Tt=-1,qt=tt.parentNode;null!=qt;)-1!==["OL","UL"].indexOf(qt.tagName)&&(Tt+=1),qt=qt.parentNode;return Tt<=0?vt:vt.reduce(function(wt,En){return En.attributes&&"number"==typeof En.attributes.indent?wt.push(En):wt.insert(En.insert,N({indent:Tt},En.attributes||{}))},new(T()))}],["ol, ul",function Pe(tt,vt){return xe(vt,"list","OL"===tt.tagName?"ordered":"bullet")}],["pre",function et(tt,vt,qe){var At=qe.query("code-block");return xe(vt,"code-block",!At||At.formats(tt,qe))}],["b",Be.bind(Be,"bold")],["i",Be.bind(Be,"italic")],["strike",Be.bind(Be,"strike")],["style",function Ke(){return new(T())}]],Ce=[Xe,Se],ye=[u.if,x.IF].reduce(function(tt,vt){return tt[vt.keyName]=vt,tt},{}),ge=[u.HE,h.w,_.HQ,x.H8,w.H,D.Z].reduce(function(tt,vt){return tt[vt.keyName]=vt,tt},{}),fe=function(tt){!function pe(tt,vt){if("function"!=typeof vt&&null!==vt)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(vt&&vt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),vt&&z(tt,vt)}(qe,tt);var vt=function oe(tt){var vt=function he(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Tt,At=de(tt);if(vt){var qt=de(this).constructor;Tt=Reflect.construct(At,arguments,qt)}else Tt=At.apply(this,arguments);return function ae(tt,vt){if(vt&&("object"===G(vt)||"function"==typeof vt))return vt;if(void 0!==vt)throw new TypeError("Derived constructors may only return object or undefined");return ee(tt)}(this,Tt)}}(qe);function qe(At,Tt){var qt,wt;return function q(tt,vt){if(!(tt instanceof vt))throw new TypeError("Cannot call a class as a function")}(this,qe),(wt=vt.call(this,At,Tt)).quill.root.addEventListener("copy",function(En){return wt.onCaptureCopy(En,!1)}),wt.quill.root.addEventListener("cut",function(En){return wt.onCaptureCopy(En,!0)}),wt.quill.root.addEventListener("paste",wt.onCapturePaste.bind(ee(wt))),wt.matchers=[],wt.tableBlots=null!==(qt=Tt.tableBlots)&&void 0!==qt?qt:[],wt.multilineParagraph=!1,le.concat(wt.options.matchers).forEach(function(En){var ri=U(En,2);wt.addMatcher(ri[0],ri[1])}),wt}return function Z(tt,vt,qe){vt&&Y(tt.prototype,vt),qe&&Y(tt,qe),Object.defineProperty(tt,"prototype",{writable:!1})}(qe,[{key:"addMatcher",value:function(Tt,qt){this.matchers.push([Tt,qt])}},{key:"addTableBlot",value:function(Tt){this.tableBlots.push(Tt)}},{key:"convert",value:function(Tt){var qt=Tt.html,wt=Tt.text,En=Tt.keepLastNewLine,ri=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ri[g.ZP.blotName]?(new(T())).insert(wt,k({},g.ZP.blotName,ri[g.ZP.blotName])):qt?this.applyMatchers(qt,En,ri):this.applyTextMatchers(wt)}},{key:"applyTextMatchers",value:function(){var Tt=this,qt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(0===qt.length)return new(T());var wt=this.prepareTextMatching(),En=this.quill.root.ownerDocument.createElement("div");En.textContent=qt;var ri=En.childNodes[0];return wt.reduce(function(Tn,Jn){return Jn(ri,Tn,Tt.quill.scroll)},new(T()))}},{key:"applyMatchers",value:function(Tt,qt){var wt=this,En=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ri=c.ZP.replaceStyleAttribute(Tt),Tn=(new DOMParser).parseFromString(ri,"text/html");c.ZP.restoreStyleAttribute(Tn);var Jn=Tn.body,wi=new WeakMap,gi=U(this.prepareMatching(Jn,wi),2),Dt=$e(this.quill.scroll,Jn,gi[0],gi[1],wi,this.multilineParagraph);return qt||!Te(Dt,"\n")||null!=Dt.ops[Dt.ops.length-1].attributes&&!Object.values(En).some(function(cn){return wt.tableBlots.includes(cn)})?Dt:Dt.compose((new(T())).retain(Dt.length()-1).delete(1))}},{key:"dangerouslyPasteHTML",value:function(Tt,qt){var wt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.ZP.sources.API;if("string"==typeof Tt){var En=this.convert({html:Tt,text:""});this.quill.setContents(En,qt),this.quill.setSelection(0,c.ZP.sources.SILENT)}else{var ri=this.convert({html:qt,text:""});this.quill.updateContents((new(T())).retain(Tt).concat(ri),wt),this.quill.setSelection(Tt+ri.length(),c.ZP.sources.SILENT)}}},{key:"onCaptureCopy",value:function(Tt){var qt=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Tt.defaultPrevented){if(!Tt.clipboardData)return;Tt.preventDefault();var ri=U(this.quill.selection.getRange(),1)[0];if(null!=ri){var Tn=this.onCopy(ri,qt),Jn=Tn.html;Tt.clipboardData.setData("text/plain",Tn.text),Tt.clipboardData.setData("text/html",Jn),qt&&(this.raiseCallback("onCut",Tt),(0,C.WQ)({range:ri,quill:this.quill}))}}}},{key:"onCapturePaste",value:function(Tt){if(!Tt.defaultPrevented&&this.quill.isEnabled()){if(this.raiseCallback("onPaste",Tt),!Tt.clipboardData)return;Tt.preventDefault();var qt=this.quill.getSelection(!0);if(null!=qt){var wt=Tt.clipboardData.getData("text/html"),En=Array.from(Tt.clipboardData.files||[]);if(!wt&&En.length>0)return void this.quill.uploader.upload(qt,En);if(wt&&En.length>0){var Tn=(new DOMParser).parseFromString(wt,"text/html").body;if(1===Tn.childElementCount&&"IMG"===Tn.firstElementChild.tagName)return void this.quill.uploader.upload(qt,En)}var wi=Tt.clipboardData.getData("text/plain");this.onPaste(qt,{html:wt,text:wi,keepLastNewLine:!0})}}}},{key:"raiseCallback",value:function(Tt,qt){var wt=this.options[Tt];wt&&"function"==typeof wt&&wt(qt)}},{key:"onCopy",value:function(Tt){var qt=Tt.index,wt=Tt.length,En=this.quill.getText(qt,wt);return{html:this.quill.getSemanticHTML(qt,wt),text:En}}},{key:"onPaste",value:function(Tt,qt){var wt=qt.text,En=qt.html,ri=qt.keepLastNewLine,Tn=this.quill.getFormat(Tt.index),Jn=this.convert({text:wt,html:En,keepLastNewLine:ri},Tn);ue.log("onPaste",Jn,{text:wt,html:En});var wi=(new(T())).retain(Tt.index).delete(Tt.length).concat(Jn);this.quill.updateContents(wi,c.ZP.sources.USER),this.quill.setSelection(wi.length()-Tt.length,c.ZP.sources.SILENT),this.quill.scrollIntoView()}},{key:"prepareMatching",value:function(Tt,qt){var wt=[],En=[];return this.matchers.forEach(function(ri){var Tn=U(ri,2),Jn=Tn[0],wi=Tn[1];switch(Jn){case 3:En.push(wi);break;case 1:wt.push(wi);break;default:Array.from(Tt.querySelectorAll(Jn)).forEach(function(Bn){qt.has(Bn)?qt.get(Bn).push(wi):qt.set(Bn,[wi])})}}),[wt,En]}},{key:"prepareTextMatching",value:function(){var Tt=[Fe];return this.matchers.forEach(function(qt){var wt=U(qt,2),En=wt[0],ri=wt[1];-1===Ce.indexOf(ri)&&3===En&&Tt.push(ri)}),Tt}}]),qe}(a.Z);function xe(tt,vt,qe){return"object"===G(vt)?Object.keys(vt).reduce(function(At,Tt){return xe(At,Tt,vt[Tt])},tt):tt.reduce(function(At,Tt){if(Tt.attributes&&Tt.attributes[vt])return At.push(Tt);var qt=qe?k({},vt,qe):{};return At.insert(Tt.insert,N(N({},qt),Tt.attributes))},new(T()))}function Te(tt,vt){for(var qe="",At=tt.ops.length-1;At>=0&&qe.length<vt.length;--At){var Tt=tt.ops[At];if("string"!=typeof Tt.insert)break;qe=Tt.insert+qe}return qe.slice(-1*vt.length)===vt}function Ee(tt){return 0!==tt.childNodes.length&&-1!==["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].indexOf(tt.tagName.toLowerCase())}fe.DEFAULTS={matchers:[]};var Oe=new WeakMap;function ze(tt){return null!=tt&&(Oe.has(tt)||Oe.set(tt,"PRE"===tt.tagName||ze(tt.parentNode)),Oe.get(tt))}function $e(tt,vt,qe,At,Tt,qt){return vt.nodeType===vt.TEXT_NODE?At.reduce(function(wt,En){return En(vt,wt,tt)},new(T())):vt.nodeType===vt.ELEMENT_NODE?Array.from(vt.childNodes||[]).reduce(function(wt,En,ri,Tn){var Jn=$e(tt,En,qe,At,Tt,qt),wi=ri<Tn.length-1&&Tn[ri+1],Bn=wi&&wi.nodeType===vt.ELEMENT_NODE&&["ul","ol"].indexOf(wi.tagName.toLowerCase())>-1;En.nodeType===vt.ELEMENT_NODE&&(qt="br"===En.tagName.toLowerCase(),Jn=qe.reduce(function(Ai,pt){return pt(En,Ai,tt)},Jn),Jn=(Tt.get(En)||[]).reduce(function(Ai,pt){return pt(En,Ai,tt)},Jn));var gi=wt.concat(Jn);return qt&&Bn&&gi.insert("\n"),gi},new(T())):new(T())}function Be(tt,vt,qe){return xe(qe,tt,!0)}function Se(tt,vt,qe){if(!Te(vt,"\n")){if(Ee(tt))return vt.insert("\n");if(vt.length()>0&&tt.nextSibling)for(var At=tt.nextSibling;null!=At;){if(Ee(At))return vt.insert("\n");var Tt=qe.query(At);if(Tt?.prototype instanceof d.i2)return vt.insert("\n");At=At.firstChild}}return vt}function Fe(tt,vt){var qe=tt.data||"";return qe=qe.replace(/\r\n/g,"\n"),vt.insert(qe)}function Xe(tt,vt){var qe=tt.data;if("O:P"===tt.parentNode.tagName)return vt.insert(qe.trim());if(0===qe.trim().length&&-1!==qe.indexOf("\n"))return vt;if(!ze(tt)){var At=function(qt,wt){var En=wt.replace(/[^\u00a0]/g,"");return En.length<1&&qt?" ":En};qe=(qe=qe.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,At.bind(At,!0)),(null==tt.previousSibling&&Ee(tt.parentNode)||null!=tt.previousSibling&&Ee(tt.previousSibling))&&(qe=qe.replace(/^\s+/,At.bind(At,!1))),(null==tt.nextSibling&&Ee(tt.parentNode)||null!=tt.nextSibling&&Ee(tt.nextSibling))&&(qe=qe.replace(/\s+$/,At.bind(At,!1)))}return vt.insert(qe)}},2613:(P,b,f)=>{"use strict";f.d(b,{Z:()=>N});var S=f(1233),T=f(281),y=f(7094),d=f(8034);function c(B){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(K){return typeof K}:function(K){return K&&"function"==typeof Symbol&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K})(B)}function a(B,K){for(var J=0;J<K.length;J++){var ie=K[J];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(B,h(ie.key),ie)}}function h(B){var K=function g(B,K){if("object"!==c(B)||null===B)return B;var J=B[Symbol.toPrimitive];if(void 0!==J){var ie=J.call(B,K||"default");if("object"!==c(ie))return ie;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===K?String:Number)(B)}(B,"string");return"symbol"===c(K)?K:String(K)}function x(B,K){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie})(B,K)}function C(B){if(void 0===B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B}function L(B){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)})(B)}var N=function(B){!function _(B,K){if("function"!=typeof K&&null!==K)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(K&&K.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),Object.defineProperty(B,"prototype",{writable:!1}),K&&x(B,K)}(J,B);var K=function w(B){var K=function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var re,ie=L(B);if(K){var q=L(this).constructor;re=Reflect.construct(ie,arguments,q)}else re=ie.apply(this,arguments);return function D(B,K){if(K&&("object"===c(K)||"function"==typeof K))return K;if(void 0!==K)throw new TypeError("Derived constructors may only return object or undefined");return C(B)}(this,re)}}(J);function J(ie,re){var q;return function s(B,K){if(!(B instanceof K))throw new TypeError("Cannot call a class as a function")}(this,J),(q=K.call(this,ie,re)).lastRecorded=0,q.ignoreChange=!1,q.clear(),q.quill.on(T.ZP.events.EDITOR_CHANGE,function(Y,Z,Q,te){Y!==T.ZP.events.TEXT_CHANGE||q.ignoreChange||(q.options.userOnly&&te!==T.ZP.sources.USER?q.transform(Z):q.record(Z,Q))}),q.quill.keyboard.addBinding({key:"z",shortKey:!0},q.undo.bind(C(q))),q.quill.keyboard.addBinding({key:"z",shortKey:!0,shiftKey:!0},q.redo.bind(C(q))),(0,d.Z)()&&/Win/i.test(navigator.platform)&&q.quill.keyboard.addBinding({key:"y",shortKey:!0},q.redo.bind(C(q))),q.quill.root.addEventListener("beforeinput",function(Y){"historyUndo"===Y.inputType?(q.undo(),Y.preventDefault()):"historyRedo"===Y.inputType&&(q.redo(),Y.preventDefault())}),q}return function u(B,K,J){K&&a(B.prototype,K),J&&a(B,J),Object.defineProperty(B,"prototype",{writable:!1})}(J,[{key:"change",value:function(re,q){if(0!==this.stack[re].length){var Y=this.stack[re].pop(),Z=this.quill.getContents(),Q=Y.invert(Z);this.stack[q].push(Q),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(Y,T.ZP.sources.USER),this.ignoreChange=!1;var te=function U(B,K){var J=K.reduce(function(re,q){return re+(q.delete||0)},0),ie=K.length()-J;return function k(B,K){var J=K.ops[K.ops.length-1];return null!=J&&(null!=J.insert?"string"==typeof J.insert&&J.insert.endsWith("\n"):null!=J.attributes&&Object.keys(J.attributes).some(function(ie){return null!=B.query(ie,S.Scope.BLOCK)}))}(B,K)&&(ie-=1),ie}(this.quill.scroll,Y);this.quill.setSelection(te)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(re,q){if(0!==re.ops.length){this.stack.redo=[];var Y=re.invert(q),Z=Date.now();if(this.lastRecorded+this.options.delay>Z&&this.stack.undo.length>0){var Q=this.stack.undo.pop();Y=Y.compose(Q)}else this.lastRecorded=Z;0!==Y.length()&&(this.stack.undo.push(Y),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(re){G(this.stack.undo,re),G(this.stack.redo,re)}},{key:"undo",value:function(){this.change("undo","redo")}}]),J}(y.Z);function G(B,K){for(var J=K,ie=B.length-1;ie>=0;ie-=1){var re=B[ie];B[ie]=J.transform(re,!0),J=re.transform(J),0===B[ie].length()&&B.splice(ie,1)}}N.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1}},990:(P,b,f)=>{"use strict";f.d(b,{Z:()=>B});var S=f(9098),T=f.n(S),y=f(7094),d=f(281),c=f(3071);function s(K){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(J){return typeof J}:function(J){return J&&"function"==typeof Symbol&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J})(K)}function u(K,J){for(var ie=0;ie<J.length;ie++){var re=J[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,g(re.key),re)}}function g(K){var J=function _(K,J){if("object"!==s(K)||null===K)return K;var ie=K[Symbol.toPrimitive];if(void 0!==ie){var re=ie.call(K,J||"default");if("object"!==s(re))return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===J?String:Number)(K)}(K,"string");return"symbol"===s(J)?J:String(J)}function w(K,J){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(re,q){return re.__proto__=q,re})(K,J)}function N(K){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ie){return ie.__proto__||Object.getPrototypeOf(ie)})(K)}var G=["insertText","insertReplacementText"],k=function(K){!function x(K,J){if("function"!=typeof J&&null!==J)throw new TypeError("Super expression must either be null or a function");K.prototype=Object.create(J&&J.prototype,{constructor:{value:K,writable:!0,configurable:!0}}),Object.defineProperty(K,"prototype",{writable:!1}),J&&w(K,J)}(ie,K);var J=function D(K){var J=function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var q,re=N(K);if(J){var Y=N(this).constructor;q=Reflect.construct(re,arguments,Y)}else q=re.apply(this,arguments);return function C(K,J){if(J&&("object"===s(J)||"function"==typeof J))return J;if(void 0!==J)throw new TypeError("Derived constructors may only return object or undefined");return function I(K){if(void 0===K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}(K)}(this,q)}}(ie);function ie(re,q){var Y;return function a(K,J){if(!(K instanceof J))throw new TypeError("Cannot call a class as a function")}(this,ie),Y=J.call(this,re,q),re.root.addEventListener("beforeinput",function(Z){Y.handleBeforeInput(Z)}),/Android/i.test(navigator.userAgent)||re.on(d.ZP.events.COMPOSITION_BEFORE_START,function(){Y.handleCompositionStart()}),Y}return function h(K,J,ie){J&&u(K.prototype,J),ie&&u(K,ie),Object.defineProperty(K,"prototype",{writable:!1})}(ie,[{key:"deleteRange",value:function(q){(0,c.WQ)({range:q,quill:this.quill})}},{key:"replaceText",value:function(q){var Y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===q.length)return!1;if(Y){var Z=this.quill.getFormat(q.index,1);this.deleteRange(q),this.quill.updateContents((new(T())).retain(q.index).insert(Y,Z),d.ZP.sources.USER)}else this.deleteRange(q);return this.quill.setSelection(q.index+Y.length,0,d.ZP.sources.SILENT),!0}},{key:"handleBeforeInput",value:function(q){if(!this.quill.composition.isCompositionInProgress()&&!q.defaultPrevented&&G.includes(q.inputType)){var Y=q.getTargetRanges?q.getTargetRanges()[0]:null;if(Y&&!0!==Y.collapsed){var Z=function U(K){var J;return"string"==typeof K.data?K.data:null!==(J=K.dataTransfer)&&void 0!==J&&J.types.includes("text/plain")?K.dataTransfer.getData("text/plain"):null}(q);if(null!=Z){var Q=this.quill.selection.normalizeNative(Y),te=Q?this.quill.selection.normalizedToRange(Q):null;te&&this.replaceText(te,Z)&&q.preventDefault()}}}}},{key:"handleCompositionStart",value:function(){var q=this.quill.getSelection();q&&this.replaceText(q)}}]),ie}(y.Z);const B=k},3071:(P,b,f)=>{"use strict";f.d(b,{ZP:()=>ue,WQ:()=>ye});var S=f(8805),T=f.n(S),y=f(2722),d=f.n(y),c=f(9098),s=f.n(c),a=f(1233),u=f(281),h=f(3122),g=f(7094),_=f(8034);function w(ge){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(fe){return typeof fe}:function(fe){return fe&&"function"==typeof Symbol&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe})(ge)}function D(ge,fe){return function G(ge){if(Array.isArray(ge))return ge}(ge)||function N(ge,fe){var xe=null==ge?null:typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(null!=xe){var Te,Ee,Oe,ze,$e=[],Be=!0,Ue=!1;try{if(Oe=(xe=xe.call(ge)).next,0===fe){if(Object(xe)!==xe)return;Be=!1}else for(;!(Be=(Te=Oe.call(xe)).done)&&($e.push(Te.value),$e.length!==fe);Be=!0);}catch(ot){Ue=!0,Ee=ot}finally{try{if(!Be&&null!=xe.return&&(ze=xe.return(),Object(ze)!==ze))return}finally{if(Ue)throw Ee}}return $e}}(ge,fe)||function I(ge,fe){if(ge){if("string"==typeof ge)return L(ge,fe);var xe=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===xe&&ge.constructor&&(xe=ge.constructor.name),"Map"===xe||"Set"===xe)return Array.from(ge);if("Arguments"===xe||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe))return L(ge,fe)}}(ge,fe)||function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(ge,fe){(null==fe||fe>ge.length)&&(fe=ge.length);for(var xe=0,Te=new Array(fe);xe<fe;xe++)Te[xe]=ge[xe];return Te}function k(ge,fe){var xe=Object.keys(ge);if(Object.getOwnPropertySymbols){var Te=Object.getOwnPropertySymbols(ge);fe&&(Te=Te.filter(function(Ee){return Object.getOwnPropertyDescriptor(ge,Ee).enumerable})),xe.push.apply(xe,Te)}return xe}function U(ge){for(var fe=1;fe<arguments.length;fe++){var xe=null!=arguments[fe]?arguments[fe]:{};fe%2?k(Object(xe),!0).forEach(function(Te){B(ge,Te,xe[Te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ge,Object.getOwnPropertyDescriptors(xe)):k(Object(xe)).forEach(function(Te){Object.defineProperty(ge,Te,Object.getOwnPropertyDescriptor(xe,Te))})}return ge}function B(ge,fe,xe){return(fe=re(fe))in ge?Object.defineProperty(ge,fe,{value:xe,enumerable:!0,configurable:!0,writable:!0}):ge[fe]=xe,ge}function J(ge,fe){for(var xe=0;xe<fe.length;xe++){var Te=fe[xe];Te.enumerable=Te.enumerable||!1,Te.configurable=!0,"value"in Te&&(Te.writable=!0),Object.defineProperty(ge,re(Te.key),Te)}}function re(ge){var fe=function q(ge,fe){if("object"!==w(ge)||null===ge)return ge;var xe=ge[Symbol.toPrimitive];if(void 0!==xe){var Te=xe.call(ge,fe||"default");if("object"!==w(Te))return Te;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===fe?String:Number)(ge)}(ge,"string");return"symbol"===w(fe)?fe:String(fe)}function Z(ge,fe){return(Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Te,Ee){return Te.__proto__=Ee,Te})(ge,fe)}function oe(ge){return(oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(xe){return xe.__proto__||Object.getPrototypeOf(xe)})(ge)}var ae=(0,h.Z)("quill:keyboard"),ee={backspace:"backspace",tab:"tab",enter:"enter",escape:"escape",pageup:"pageUp",pagedown:"pageDown",end:"end",home:"home",arrowleft:"leftArrow",arrowup:"upArrow",arrowright:"rightArrow",arrowdown:"downArrow",delete:"del"," ":"space","*":"asterisk","-":"minus",alt:"alt",control:"control",shift:"shift",left:"leftArrow",up:"upArrow",right:"rightArrow",down:"downArrow",multiply:"asterisk",spacebar:"space",del:"del",subtract:"minus",esc:"escape"},he={8:"backspace",9:"tab",13:"enter",27:"escape",33:"pageUp",34:"pageDown",35:"end",36:"home",37:"leftArrow",38:"upArrow",39:"rightArrow",40:"downArrow",46:"del",32:"space",106:"asterisk",109:"minus",189:"minus",173:"minus",16:"shift",17:"control",18:"alt"},de=(0,_.Z)()&&/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",ue=function(ge){!function Y(ge,fe){if("function"!=typeof fe&&null!==fe)throw new TypeError("Super expression must either be null or a function");ge.prototype=Object.create(fe&&fe.prototype,{constructor:{value:ge,writable:!0,configurable:!0}}),Object.defineProperty(ge,"prototype",{writable:!1}),fe&&Z(ge,fe)}(xe,ge);var fe=function Q(ge){var fe=function z(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Ee,Te=oe(ge);if(fe){var Oe=oe(this).constructor;Ee=Reflect.construct(Te,arguments,Oe)}else Ee=Te.apply(this,arguments);return function te(ge,fe){if(fe&&("object"===w(fe)||"function"==typeof fe))return fe;if(void 0!==fe)throw new TypeError("Derived constructors may only return object or undefined");return function pe(ge){if(void 0===ge)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge}(ge)}(this,Ee)}}(xe);function xe(Te,Ee){var Oe;return function K(ge,fe){if(!(ge instanceof fe))throw new TypeError("Cannot call a class as a function")}(this,xe),(Oe=fe.call(this,Te,Ee)).bindings={},Object.keys(Oe.options.bindings).forEach(function(ze){Oe.options.bindings[ze]&&Oe.addBinding(Oe.options.bindings[ze])}),Oe.addInternalBindings(),Oe.listen(),Oe}return function ie(ge,fe,xe){fe&&J(ge.prototype,fe),xe&&J(ge,xe),Object.defineProperty(ge,"prototype",{writable:!1})}(xe,[{key:"addInternalBindings",value:function(){var Ee=this;this.quill.once(u.ZP.events.CONTENT_SETTED,function(){Ee.addBinding({key:"enter",shiftKey:null},Ee.handleEnter),Ee.addBinding({key:"enter",metaKey:null,ctrlKey:null,altKey:null},function(){}),(0,_.Z)()&&/Firefox/i.test(navigator.userAgent)?(Ee.addBinding({key:"backspace"},{collapsed:!0},Ee.handleBackspace),Ee.addBinding({key:"del"},{collapsed:!0},Ee.handleDelete)):(Ee.addBinding({key:"backspace"},{collapsed:!0,prefix:/^.?$/},Ee.handleBackspace),Ee.addBinding({key:"del"},{collapsed:!0,suffix:/^.?$/},Ee.handleDelete)),Ee.addBinding({key:"backspace"},{collapsed:!1},Ee.handleDeleteRange),Ee.addBinding({key:"del"},{collapsed:!1},Ee.handleDeleteRange),Ee.addBinding({key:"backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Ee.handleBackspace)})}},{key:"addBinding",value:function(Ee){var Oe=this,ze=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},$e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Be=function Ce(ge){if("string"==typeof ge||"number"==typeof ge)ge={key:ge};else{if("object"!==w(ge))return null;ge=T()(ge)}return ge.shortKey&&(ge[de]=ge.shortKey,delete ge.shortKey),ge}(Ee);if(null!=Be){"function"==typeof ze&&(ze={handler:ze}),"function"==typeof $e&&($e={handler:$e});var Ue=Be.which?"which":"key";(Array.isArray(Be[Ue])?Be[Ue]:[Be[Ue]]).forEach(function(st){var et=U(U(U({},Be),{},{key:st},ze),$e);Oe.bindings[et.key]=Oe.bindings[et.key]||[],Oe.bindings[et.key].push(et)})}else ae.warn("Attempted to add invalid keyboard binding",Be)}},{key:"listen",value:function(){var Ee=this;this.quill.root.addEventListener("keydown",function(Oe){if(!Oe.defaultPrevented&&!Oe.isComposing){Ee.raiseOnKeydownCallback(Oe);var ze=xe.normalizeKeyName(Oe),Be=(Ee.bindings[ze]||[]).concat(Ee.bindings[Oe.which]||[]).filter(function(wt){return xe.match(Oe,wt)});if(0!==Be.length){var Ue=Ee.quill.getSelection();if(null!=Ue&&Ee.quill.hasFocus()){var st=D(Ee.quill.getLine(Ue.index),2),et=st[0],Ke=st[1],Pe=D(Ee.quill.getLeaf(Ue.index),2),Se=Pe[0],Re=Pe[1],Xe=D(0===Ue.length?[Se,Re]:Ee.quill.getLeaf(Ue.index+Ue.length),2),tt=Xe[0],vt=Xe[1],qe=Se instanceof a.TextBlot?Se.value().slice(0,Re):"",At=tt instanceof a.TextBlot?tt.value().slice(vt):"",Tt={collapsed:0===Ue.length,empty:0===Ue.length&&et.length()<=1,format:Ee.quill.getFormat(Ue),line:et,offset:Ke,prefix:qe,suffix:At,event:Oe},qt=!1;Be.some(function(wt){if(null!=wt.collapsed&&wt.collapsed!==Tt.collapsed||null!=wt.empty&&wt.empty!==Tt.empty||null!=wt.offset&&wt.offset!==Tt.offset)return!1;if(Array.isArray(wt.format)){if(wt.format.every(function(Tn){return null==Tt.format[Tn]}))return!1}else if("object"===w(wt.format)&&!Object.keys(wt.format).every(function(Tn){return!0===wt.format[Tn]?null!=Tt.format[Tn]:!1===wt.format[Tn]?null==Tt.format[Tn]:d()(wt.format[Tn],Tt.format[Tn])}))return!1;if(null!=wt.prefix&&!wt.prefix.test(Tt.prefix)||null!=wt.suffix&&!wt.suffix.test(Tt.suffix))return!1;var En=wt.handler.call(Ee,Ue,Tt,wt),ri=En?.preventAfterAllMatches;return(qt=!0!==En||ri)&&!ri}),qt&&Oe.preventDefault()}}}})}},{key:"raiseOnKeydownCallback",value:function(Ee){var Oe=this.options.onKeydown;Oe&&"function"==typeof Oe&&Oe(Ee)}},{key:"handleBackspace",value:function(Ee,Oe){var ze=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Oe.prefix)?2:1;if(!(0===Ee.index||this.quill.getLength()<=1)){var $e={},ot=D(this.quill.getLine(Ee.index),1)[0],st=(new(s())).retain(Ee.index-ze).delete(ze);if(0===Oe.offset){var Ye=D(this.quill.getLine(Ee.index-1),1)[0];if(Ye){var Pe="block"===Ye.statics.blotName&&Ye.length()<=1,Se=Ye.statics.blotName.startsWith("table"),Re="block"===ot.statics.blotName&&ot.length()<=1;if(Se&&(Re&&ot.remove(),this.quill.setSelection(Ee.index-1)),!Pe&&!Se){var Fe=ot.formats(),Xe=this.quill.getFormat(Ee.index-1,1);if($e=c.AttributeMap.diff(Fe,Xe)||{},Object.keys($e).length>0){var tt=(new(s())).retain(Ee.index+ot.length()-2).retain(1,$e);st=st.compose(tt)}}}}this.quill.updateContents(st,u.ZP.sources.USER),this.quill.focus()}}},{key:"handleDelete",value:function(Ee,Oe){var ze=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Oe.suffix)?2:1;if(!(Ee.index>=this.quill.getLength()-ze)){var $e={},ot=D(this.quill.getLine(Ee.index),1)[0],st=(new(s())).retain(Ee.index).delete(ze);if(Oe.offset>=ot.length()-1){var Ye=D(this.quill.getLine(Ee.index+1),1)[0];if(Ye){var Pe=ot.formats(),Se=this.quill.getFormat(Ee.index,1);$e=c.AttributeMap.diff(Pe,Se)||{},Object.keys($e).length>0&&(st=st.retain(Ye.length()-1).retain(1,$e))}}this.quill.updateContents(st,u.ZP.sources.USER),this.quill.focus()}}},{key:"handleDeleteRange",value:function(Ee,Oe){this.raiseOnKeydownCallback(Oe.event),ye({range:Ee,quill:this.quill}),this.quill.focus()}},{key:"handleEnter",value:function(Ee,Oe){var ze=this,$e=Object.keys(Oe.format).reduce(function(Ke,Ye){return ze.quill.scroll.query(Ye,a.Scope.BLOCK)&&!Array.isArray(Oe.format[Ye])&&(Ke[Ye]=Oe.format[Ye]),Ke},{}),Be=(new(s())).retain(Ee.index).delete(Ee.length).insert("\n",$e);this.quill.updateContents(Be,u.ZP.sources.USER),this.quill.setSelection(Ee.index+1,u.ZP.sources.SILENT),this.quill.focus();var st=D(this.quill.getLine(Ee.index+1),1)[0],et=function x(ge){var xe=window.innerHeight,Te=ge.getBoundingClientRect();return Te.y<0||!(Te.bottom>=xe)&&null}(st.domNode);null!==et&&st.domNode.scrollIntoView(et),Object.keys(Oe.format).forEach(function(Ke){null==$e[Ke]&&(Array.isArray(Oe.format[Ke])||"code"===Ke||"link"===Ke||(ze.raiseOnKeydownCallback(Oe.event),ze.quill.format(Ke,Oe.format[Ke],u.ZP.sources.USER)))})}}],[{key:"match",value:function(Ee,Oe){return!["altKey","ctrlKey","metaKey","shiftKey"].some(function(ze){return!!Oe[ze]!==Ee[ze]&&null!==Oe[ze]})&&(Oe.key===xe.normalizeKeyName(Ee)||Oe.key===Ee.which)}},{key:"normalizeKeyName",value:function(Ee){var Oe=Ee.key,$e=!!Oe,Be=$e?Oe:Ee.which;return Be&&(Be=$e?ee[Be.toLowerCase()]||Be:he[Be]||String.fromCharCode(Be)),Be}}]),xe}(g.Z);function be(ge){return{key:"tab",shiftKey:!ge,format:{"code-block":!0},handler:function(xe){var Te=this.quill.scroll.query("code-block"),Ee=0===xe.length?this.quill.getLines(xe.index,1):this.quill.getLines(xe),Oe=xe.index,ze=xe.length;Ee.forEach(function($e,Be){ge?($e.insertAt(0,Te.TAB),0===Be?Oe+=Te.TAB.length:ze+=Te.TAB.length):0===$e.domNode.textContent.indexOf(Te.TAB)&&($e.deleteAt(0,Te.TAB.length),0===Be?Oe-=Te.TAB.length:ze-=Te.TAB.length)}),this.quill.update(u.ZP.sources.USER),this.quill.setSelection(Oe,ze,u.ZP.sources.SILENT)}}}function ve(ge,fe){return B(B({key:ge,shiftKey:fe,altKey:null},"leftArrow"===ge?"prefix":"suffix",/^$/),"handler",function(Ee){var Oe=Ee.index;return"rightArrow"===ge&&(Oe+=Ee.length+1),!(D(this.quill.getLeaf(Oe),1)[0]instanceof a.EmbedBlot&&("leftArrow"===ge?fe?this.quill.setSelection(Ee.index-1,Ee.length+1,u.ZP.sources.USER):this.quill.setSelection(Ee.index-1,u.ZP.sources.USER):fe?this.quill.setSelection(Ee.index,Ee.length+1,u.ZP.sources.USER):this.quill.setSelection(Ee.index+Ee.length+1,u.ZP.sources.USER),1))})}function le(ge,fe){return{key:ge[0],which:fe,shortKey:!0,handler:function(Te,Ee){return this.quill.format(ge,!Ee.format[ge],u.ZP.sources.USER),{preventAfterAllMatches:!0}}}}function ye(ge){var fe=ge.quill,xe=ge.range,Te=fe.getLines(xe),Ee={};if(Te.length>1){var Oe=Te[0].formats(),ze=Te[Te.length-1].formats();Ee=c.AttributeMap.diff(ze,Oe)||{}}fe.deleteText(xe,u.ZP.sources.USER),Object.keys(Ee).length>0&&fe.formatLine(xe.index,1,Ee,u.ZP.sources.USER),fe.setSelection(xe.index,u.ZP.sources.SILENT)}ue.DEFAULTS={bindings:{bold:le("bold",66),italic:le("italic",73),underline:le("underline",85),indent:{key:"tab",format:["blockquote","indent","list"],handler:function(fe,xe){return!(!xe.collapsed||0===xe.offset)||(this.quill.format("indent","+1",u.ZP.sources.USER),!1)}},outdent:{key:"tab",shiftKey:!0,format:["blockquote","indent","list"],handler:function(fe,xe){return!(!xe.collapsed||0===xe.offset)||(this.quill.format("indent","-1",u.ZP.sources.USER),!1)}},"outdent backspace":{key:"backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(fe,xe){null!=xe.format.indent?this.quill.format("indent","-1",u.ZP.sources.USER):null!=xe.format.list&&this.quill.format("list",!1,u.ZP.sources.USER)}},"indent code-block":be(!0),"outdent code-block":be(!1),"remove tab":{key:"tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(fe){this.quill.deleteText(fe.index-1,1,u.ZP.sources.USER)}},tab:{key:"tab",handler:function(fe,xe){var Te=xe.format;if(Te.tableCellLine||Te.tableHeaderCellLine||Te.tableHeaderCell||Te.table)return!0;this.quill.history.cutoff();var Oe=(new(s())).retain(fe.index).delete(fe.length).insert("\t");return this.quill.updateContents(Oe,u.ZP.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(fe.index+1,u.ZP.sources.SILENT),!1}},"blockquote empty enter":{key:"enter",collapsed:!0,format:["blockquote"],empty:!0,handler:function(){this.quill.format("blockquote",!1,u.ZP.sources.USER)}},"list empty enter":{key:"enter",collapsed:!0,format:["list"],empty:!0,handler:function(fe,xe){var Te={list:!1};xe.format.indent&&(Te.indent=!1),this.quill.formatLine(fe.index,fe.length,Te,u.ZP.sources.USER)}},"checklist enter":{key:"enter",collapsed:!0,format:{list:"checked"},handler:function(fe){var Te=D(this.quill.getLine(fe.index),2),Ee=Te[0],Oe=Te[1],ze=U(U({},Ee.formats()),{},{list:"checked"}),$e=(new(s())).retain(fe.index).insert("\n",ze).retain(Ee.length()-Oe-1).retain(1,{list:"unchecked"});this.quill.updateContents($e,u.ZP.sources.USER),this.quill.setSelection(fe.index+1,u.ZP.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:"enter",collapsed:!0,format:["header"],suffix:/^$/,handler:function(fe,xe){var Ee=D(this.quill.getLine(fe.index),2),Oe=Ee[0],ze=Ee[1],$e=(new(s())).retain(fe.index).insert("\n",xe.format).retain(Oe.length()-ze-1).retain(1,{header:null});this.quill.updateContents($e,u.ZP.sources.USER),this.quill.setSelection(fe.index+1,u.ZP.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:"space",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(fe,xe){if(null==this.quill.scroll.query("list"))return!0;var Be,Te=xe.prefix.length,Oe=D(this.quill.getLine(fe.index),2),ze=Oe[0],$e=Oe[1];if($e>Te)return!0;switch(xe.prefix.trim()){case"[]":case"[ ]":Be="unchecked";break;case"[x]":Be="checked";break;case"-":case"*":Be="bullet";break;default:Be="ordered"}this.quill.insertText(fe.index," ",u.ZP.sources.USER),this.quill.history.cutoff();var Ue=(new(s())).retain(fe.index-$e).delete(Te+1).retain(ze.length()-2-$e).retain(1,{list:Be});return this.raiseOnKeydownCallback(xe.event),this.quill.updateContents(Ue,u.ZP.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(fe.index-Te,u.ZP.sources.SILENT),!1}},"code exit":{key:"enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler:function(fe){for(var Te=D(this.quill.getLine(fe.index),2),Ee=Te[0],Oe=Te[1],ze=2,$e=Ee;null!=$e&&$e.length()<=1&&$e.formats()["code-block"];)if($e=$e.prev,(ze-=1)<=0){var Be=(new(s())).retain(fe.index+Ee.length()-Oe-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(Be,u.ZP.sources.USER),this.quill.setSelection(fe.index-1,u.ZP.sources.SILENT),!1}return!0}},"embed left":ve("leftArrow",!1),"embed left shift":ve("leftArrow",!0),"embed right":ve("rightArrow",!1),"embed right shift":ve("rightArrow",!0)}}},9072:(P,b,f)=>{"use strict";f.d(b,{ZP:()=>be});var S=f(9098),T=f.n(S),y=f(1233),d=f(6603),c=f(281),s=f(7094),a=f(6446),u=f(4122),h=f(3657),g=f(8222),_=f(7309),x=f(5635),w=f(8034);function D(ve){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(le){return typeof le}:function(le){return le&&"function"==typeof Symbol&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le})(ve)}function C(ve,le,Ce){return(le=ie(le))in ve?Object.defineProperty(ve,le,{value:Ce,enumerable:!0,configurable:!0,writable:!0}):ve[le]=Ce,ve}function G(ve,le){(null==le||le>ve.length)&&(le=ve.length);for(var Ce=0,ye=new Array(le);Ce<le;Ce++)ye[Ce]=ve[Ce];return ye}function B(ve,le){if(!(ve instanceof le))throw new TypeError("Cannot call a class as a function")}function K(ve,le){for(var Ce=0;Ce<le.length;Ce++){var ye=le[Ce];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(ve,ie(ye.key),ye)}}function J(ve,le,Ce){return le&&K(ve.prototype,le),Ce&&K(ve,Ce),Object.defineProperty(ve,"prototype",{writable:!1}),ve}function ie(ve){var le=function re(ve,le){if("object"!==D(ve)||null===ve)return ve;var Ce=ve[Symbol.toPrimitive];if(void 0!==Ce){var ye=Ce.call(ve,le||"default");if("object"!==D(ye))return ye;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===le?String:Number)(ve)}(ve,"string");return"symbol"===D(le)?le:String(le)}function q(ve,le){if("function"!=typeof le&&null!==le)throw new TypeError("Super expression must either be null or a function");ve.prototype=Object.create(le&&le.prototype,{constructor:{value:ve,writable:!0,configurable:!0}}),Object.defineProperty(ve,"prototype",{writable:!1}),le&&Y(ve,le)}function Y(ve,le){return(Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ye,ge){return ye.__proto__=ge,ye})(ve,le)}function Z(ve){var le=function pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ge,ye=ae(ve);if(le){var fe=ae(this).constructor;ge=Reflect.construct(ye,arguments,fe)}else ge=ye.apply(this,arguments);return function Q(ve,le){if(le&&("object"===D(le)||"function"==typeof le))return le;if(void 0!==le)throw new TypeError("Derived constructors may only return object or undefined");return te(ve)}(this,ge)}}function te(ve){if(void 0===ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve}function z(){return z=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(le,Ce,ye){var ge=function oe(ve,le){for(;!Object.prototype.hasOwnProperty.call(ve,le)&&null!==(ve=ae(ve)););return ve}(le,Ce);if(ge){var fe=Object.getOwnPropertyDescriptor(ge,Ce);return fe.get?fe.get.call(arguments.length<3?le:ye):fe.value}},z.apply(this,arguments)}function ae(ve){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ce){return Ce.__proto__||Object.getPrototypeOf(Ce)})(ve)}var ee=new y.ClassAttributor("code-token","hljs",{scope:y.Scope.INLINE}),he=function(ve){q(Ce,ve);var le=Z(Ce);function Ce(ye,ge,fe){var xe;return B(this,Ce),xe=le.call(this,ye,ge,fe),ee.add(xe.domNode,fe),xe}return J(Ce,[{key:"format",value:function(ge,fe){ge!==Ce.blotName?z(ae(Ce.prototype),"format",this).call(this,ge,fe):fe?ee.add(this.domNode,fe):(ee.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}},{key:"optimize",value:function(){for(var ge,fe=arguments.length,xe=new Array(fe),Te=0;Te<fe;Te++)xe[Te]=arguments[Te];(ge=z(ae(Ce.prototype),"optimize",this)).call.apply(ge,[this].concat(xe)),ee.value(this.domNode)||this.unwrap()}}],[{key:"formats",value:function(ge,fe){for(;null!=ge&&ge!==fe.domNode;){if(ge.classList&&ge.classList.contains(_.ZP.className))return z(ae(Ce),"formats",this).call(this,ge,fe);ge=ge.parentNode}}}]),Ce}(d.Z);he.blotName="code-token",he.className="ql-token";var de=function(ve){q(Ce,ve);var le=Z(Ce);function Ce(){return B(this,Ce),le.apply(this,arguments)}return J(Ce,[{key:"format",value:function(ge,fe){ge===this.statics.blotName&&fe?this.domNode.setAttribute("data-language",fe):z(ae(Ce.prototype),"format",this).call(this,ge,fe)}},{key:"replaceWith",value:function(ge,fe){return this.formatAt(0,this.length(),he.blotName,!1),z(ae(Ce.prototype),"replaceWith",this).call(this,ge,fe)}}],[{key:"create",value:function(ge){var fe=z(ae(Ce),"create",this).call(this,ge);return"string"==typeof ge&&fe.setAttribute("data-language",ge),fe}},{key:"formats",value:function(ge){return ge.getAttribute("data-language")||"plain"}},{key:"register",value:function(){}}]),Ce}(_.ZP),ue=function(ve){q(Ce,ve);var le=Z(Ce);function Ce(){return B(this,Ce),le.apply(this,arguments)}return J(Ce,[{key:"attach",value:function(){z(ae(Ce.prototype),"attach",this).call(this),this.forceNext=!1,this.scroll.emitMount(this)}},{key:"format",value:function(ge,fe){ge===de.blotName&&(this.forceNext=!0,this.children.forEach(function(xe){xe.format(ge,fe)}))}},{key:"formatAt",value:function(ge,fe,xe,Te){xe===de.blotName&&(this.forceNext=!0),z(ae(Ce.prototype),"formatAt",this).call(this,ge,fe,xe,Te)}},{key:"highlight",value:function(ge){var fe=this,xe=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=this.children.head){var Te=Array.from(this.domNode.childNodes).filter(function(Be){return Be!==fe.uiNode}),Ee="".concat(Te.map(function(Be){return Be.textContent}).join("\n"),"\n"),Oe=de.formats(this.children.head.domNode);if(xe||this.forceNext||this.cachedText!==Ee){if(Ee.trim().length>0||null==this.cachedText){var ze=this.children.reduce(function(Be,Ue){return Be.concat((0,a.qz)(Ue,!1))},new(T())),$e=ge(Ee,Oe);ze.diff($e).reduce(function(Be,Ue){var ot=Ue.retain,st=Ue.attributes;return ot?(st&&Object.keys(st).forEach(function(et){-1!==[de.blotName,he.blotName].indexOf(et)&&fe.formatAt(Be,ot,et,st[et])}),Be+ot):Be},0)}this.cachedText=Ee,this.forceNext=!1}}}},{key:"html",value:function(ge,fe){var Ee=function I(ve,le){return function U(ve){if(Array.isArray(ve))return ve}(ve)||function k(ve,le){var Ce=null==ve?null:typeof Symbol<"u"&&ve[Symbol.iterator]||ve["@@iterator"];if(null!=Ce){var ye,ge,fe,xe,Te=[],Ee=!0,Oe=!1;try{if(fe=(Ce=Ce.call(ve)).next,0===le){if(Object(Ce)!==Ce)return;Ee=!1}else for(;!(Ee=(ye=fe.call(Ce)).done)&&(Te.push(ye.value),Te.length!==le);Ee=!0);}catch(ze){Oe=!0,ge=ze}finally{try{if(!Ee&&null!=Ce.return&&(xe=Ce.return(),Object(xe)!==xe))return}finally{if(Oe)throw ge}}return Te}}(ve,le)||function N(ve,le){if(ve){if("string"==typeof ve)return G(ve,le);var Ce=Object.prototype.toString.call(ve).slice(8,-1);if("Object"===Ce&&ve.constructor&&(Ce=ve.constructor.name),"Map"===Ce||"Set"===Ce)return Array.from(ve);if("Arguments"===Ce||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce))return G(ve,le)}}(ve,le)||function L(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.children.find(ge),1)[0],Oe=Ee?de.formats(Ee.domNode):"plain";return'<pre data-language="'.concat(Oe,'">\n').concat(this.code(ge,fe),"\n</pre>")}},{key:"optimize",value:function(ge){if(z(ae(Ce.prototype),"optimize",this).call(this,ge),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){var fe=de.formats(this.children.head.domNode);fe!==this.uiNode.value&&(this.uiNode.value=fe)}}}]),Ce}(_.se);ue.allowedChildren=[de],de.requiredContainer=ue,de.allowedChildren=[he,h.Z,g.Z,u.Z];var be=function(ve){q(Ce,ve);var le=Z(Ce);function Ce(ye,ge){var fe;if(B(this,Ce),null==(fe=le.call(this,ye,ge)).options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");return fe.languages=fe.options.languages.reduce(function(xe,Te){return xe[Te.key]=!0,xe},{}),fe.highlightBlot=fe.highlightBlot.bind(te(fe)),fe.initListener(),fe.initTimer(),fe}return J(Ce,[{key:"initListener",value:function(){var ge=this;this.quill.on(c.ZP.events.SCROLL_BLOT_MOUNT,function(fe){if(fe instanceof ue){var xe=ge.quill.root.ownerDocument.createElement("select");ge.options.languages.forEach(function(Te){var Ee=Te.key,Oe=Te.label,ze=xe.ownerDocument.createElement("option");ze.textContent=Oe,ze.setAttribute("value",Ee),xe.appendChild(ze)}),xe.addEventListener("change",function(){fe.format(de.blotName,xe.value),ge.quill.root.focus(),ge.highlight(fe,!0)}),null==fe.uiNode&&(fe.attachUI(xe),fe.children.head&&(xe.value=de.formats(fe.children.head.domNode)))}})}},{key:"initTimer",value:function(){var ge=this,fe=null;this.quill.on(c.ZP.events.SCROLL_OPTIMIZE,function(){clearTimeout(fe),fe=setTimeout(function(){ge.highlight(),fe=null},ge.options.interval)})}},{key:"highlight",value:function(){var ge=this,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,xe=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.quill.selection.composing){this.quill.update(c.ZP.sources.USER);var Te=this.quill.getSelection();(null==fe?this.quill.scroll.descendants(ue):[fe]).forEach(function(Oe){Oe.highlight(ge.highlightBlot,xe)}),this.quill.update(c.ZP.sources.SILENT),null!=Te&&this.quill.setSelection(Te,c.ZP.sources.SILENT)}}},{key:"highlightBlot",value:function(ge){var fe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if("plain"===(fe=this.languages[fe]?fe:"plain"))return(0,g.b)(ge).split("\n").reduce(function(Te,Ee,Oe){return 0!==Oe&&Te.insert("\n",C({},_.ZP.blotName,fe)),Te.insert(Ee)},new(T()));var xe=this.quill.root.ownerDocument.createElement("div");return xe.classList.add(_.ZP.className),xe.innerHTML=this.options.hljs.highlight(fe,ge).value,(0,x.fw)(this.quill.scroll,xe,[function(Te,Ee){var Oe=ee.value(Te);return Oe?Ee.compose((new(T())).retain(Ee.length(),C({},he.blotName,Oe))):Ee}],[function(Te,Ee){return Te.data.split("\n").reduce(function(Oe,ze,$e){return 0!==$e&&Oe.insert("\n",C({},_.ZP.blotName,fe)),Oe.insert(ze)},Ee)}],new WeakMap)}}],[{key:"register",value:function(){c.ZP.register(he,!0),c.ZP.register(de,!0),c.ZP.register(ue,!0)}}]),Ce}(s.Z);be.DEFAULTS={hljs:(0,w.Z)()?window.hljs:null,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"Javascript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]}},867:(P,b,f)=>{"use strict";f.d(b,{Z:()=>de});var S=f(9098),T=f.n(S),y=f(1233),d=f(281),c=f(7094),s=f(1969),a=f(5874),u=f(5635),h=f(9466),g=f(7896),_=f(319),x=f(1342),w=f(2480);function D(ue){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(be){return typeof be}:function(be){return be&&"function"==typeof Symbol&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be})(ue)}function C(ue,be,ve){return(be=ie(be))in ue?Object.defineProperty(ue,be,{value:ve,enumerable:!0,configurable:!0,writable:!0}):ue[be]=ve,ue}function I(ue,be){return function U(ue){if(Array.isArray(ue))return ue}(ue)||function k(ue,be){var ve=null==ue?null:typeof Symbol<"u"&&ue[Symbol.iterator]||ue["@@iterator"];if(null!=ve){var le,Ce,ye,ge,fe=[],xe=!0,Te=!1;try{if(ye=(ve=ve.call(ue)).next,0===be){if(Object(ve)!==ve)return;xe=!1}else for(;!(xe=(le=ye.call(ve)).done)&&(fe.push(le.value),fe.length!==be);xe=!0);}catch(Ee){Te=!0,Ce=Ee}finally{try{if(!xe&&null!=ve.return&&(ge=ve.return(),Object(ge)!==ge))return}finally{if(Te)throw Ce}}return fe}}(ue,be)||function N(ue,be){if(ue){if("string"==typeof ue)return G(ue,be);var ve=Object.prototype.toString.call(ue).slice(8,-1);if("Object"===ve&&ue.constructor&&(ve=ue.constructor.name),"Map"===ve||"Set"===ve)return Array.from(ue);if("Arguments"===ve||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return G(ue,be)}}(ue,be)||function L(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(ue,be){(null==be||be>ue.length)&&(be=ue.length);for(var ve=0,le=new Array(be);ve<be;ve++)le[ve]=ue[ve];return le}function K(ue,be){for(var ve=0;ve<be.length;ve++){var le=be[ve];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ue,ie(le.key),le)}}function ie(ue){var be=function re(ue,be){if("object"!==D(ue)||null===ue)return ue;var ve=ue[Symbol.toPrimitive];if(void 0!==ve){var le=ve.call(ue,be||"default");if("object"!==D(le))return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===be?String:Number)(ue)}(ue,"string");return"symbol"===D(be)?be:String(be)}function Y(ue,be){return(Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,Ce){return le.__proto__=Ce,le})(ue,be)}function z(ue){return(z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ve){return ve.__proto__||Object.getPrototypeOf(ve)})(ue)}var oe=[null,null,null,-1],ee=function(ue){!function q(ue,be){if("function"!=typeof be&&null!==be)throw new TypeError("Super expression must either be null or a function");ue.prototype=Object.create(be&&be.prototype,{constructor:{value:ue,writable:!0,configurable:!0}}),Object.defineProperty(ue,"prototype",{writable:!1}),be&&Y(ue,be)}(ve,ue);var be=function Z(ue){var be=function pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Ce,le=z(ue);if(be){var ye=z(this).constructor;Ce=Reflect.construct(le,arguments,ye)}else Ce=le.apply(this,arguments);return function Q(ue,be){if(be&&("object"===D(be)||"function"==typeof be))return be;if(void 0!==be)throw new TypeError("Derived constructors may only return object or undefined");return function te(ue){if(void 0===ue)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ue}(ue)}(this,Ce)}}(ve);function ve(){var le;!function B(ue,be){if(!(ue instanceof be))throw new TypeError("Cannot call a class as a function")}(this,ve);for(var Ce=arguments.length,ye=new Array(Ce),ge=0;ge<Ce;ge++)ye[ge]=arguments[ge];return(le=be.call.apply(be,[this].concat(ye))).tableBlots=[s.zW.blotName,s.iD.blotName],le.tableBlots.forEach(function(fe){le.quill.editor.addImmediateFormat(fe)}),le.integrateClipboard(),le.addKeyboardHandlers(),le.listenBalanceCells(),le}return function J(ue,be,ve){be&&K(ue.prototype,be),ve&&K(ue,ve),Object.defineProperty(ue,"prototype",{writable:!1})}(ve,[{key:"integrateClipboard",value:function(){var Ce=this;this.tableBlots.forEach(function(ye){Ce.quill.clipboard.addTableBlot(ye)}),this.quill.clipboard.addMatcher("td, th",he),this.quill.clipboard.addMatcher("table",(0,g.F)(_.Zt)),this.quill.clipboard.addMatcher("td, th",(0,g.a)(x.h6))}},{key:"addKeyboardHandlers",value:function(){var Ce=this,ye=ve.keyboardBindings;Object.keys(ye).forEach(function(ge){ye[ge]&&Ce.quill.keyboard.addBinding(ye[ge])})}},{key:"balanceTables",value:function(){this.quill.scroll.descendants(s.xJ).forEach(function(Ce){Ce.balanceCells()})}},{key:"deleteColumn",value:function(){var ye=I(this.getTable(),3),ge=ye[0],fe=ye[2];(0,a.Z)(fe)&&(ge.deleteColumn(fe.cellOffset()),this.quill.update(d.ZP.sources.USER))}},{key:"deleteRow",value:function(){var ge=I(this.getTable(),2)[1];(0,a.Z)(ge)&&(ge.remove(),this.quill.update(d.ZP.sources.USER))}},{key:"deleteTable",value:function(){var ge=I(this.getTable(),1)[0];if((0,a.Z)(ge)){var fe=ge.offset();ge.remove(),this.quill.update(d.ZP.sources.USER),this.quill.setSelection(fe,d.ZP.sources.SILENT)}}},{key:"getTable",value:function(){var Ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(!(0,a.Z)(Ce))return oe;var ge=I(this.quill.getLine(Ce.index),2),fe=ge[0],xe=ge[1];if(!(0,a.Z)(fe)||-1===this.tableBlots.indexOf(fe.statics.blotName))return oe;var Te=fe.parent,Ee=Te.parent;return[Ee.parent.parent,Ee,Te,xe]}},{key:"insertColumn",value:function(Ce){var ye=this.quill.getSelection(),fe=I(this.getTable(ye),3),xe=fe[0],Te=fe[1],Ee=fe[2];if((0,a.Z)(Ee)){var Oe=Ee.cellOffset();xe.insertColumn(Oe+Ce),this.quill.update(d.ZP.sources.USER);var ze=Te.rowOffset();0===Ce&&(ze+=1),this.quill.setSelection(ye.index+ze,ye.length,d.ZP.sources.SILENT)}}},{key:"insertColumnLeft",value:function(){this.insertColumn(0)}},{key:"insertColumnRight",value:function(){this.insertColumn(1)}},{key:"insertRow",value:function(Ce){var ye=this.quill.getSelection(),fe=I(this.getTable(ye),3),xe=fe[0],Te=fe[1];if((0,a.Z)(fe[2])){var Oe=Te.rowOffset();xe.insertRow(Oe+Ce),this.quill.update(d.ZP.sources.USER),Ce>0?this.quill.setSelection(ye,d.ZP.sources.SILENT):this.quill.setSelection(ye.index+Te.children.length,ye.length,d.ZP.sources.SILENT)}}},{key:"insertRowAbove",value:function(){this.insertRow(0)}},{key:"insertRowBelow",value:function(){this.insertRow(1)}},{key:"insertHeaderRow",value:function(){var Ce=this.quill.getSelection(),ge=I(this.getTable(Ce),3),fe=ge[0];(0,a.Z)(ge[2])&&(fe.insertHeaderRow(),this.quill.update(d.ZP.sources.USER))}},{key:"insertTable",value:function(Ce,ye){var ge=this.quill.getSelection();if((0,a.Z)(ge)){var fe=new Array(Ce).fill(0).reduce(function(xe){var Te=(0,s.Lv)();return new Array(ye).fill("\n").forEach(function(Ee){xe.insert(Ee,{tableCellLine:{row:Te,cell:(0,s.Lv)()}})}),xe},(new(T())).retain(ge.index));this.quill.updateContents(fe,d.ZP.sources.USER),this.quill.setSelection(ge.index,d.ZP.sources.SILENT),this.balanceTables()}}},{key:"tableFormats",value:function(){return this.tableBlots}},{key:"listenBalanceCells",value:function(){var Ce=this;this.quill.on(d.ZP.events.SCROLL_OPTIMIZE,function(ye){ye.some(function(ge){return-1!==["TD","TH","TR","TBODY","THEAD","TABLE"].indexOf(ge.target.tagName)&&(Ce.quill.once(d.ZP.events.TEXT_CHANGE,function(fe,xe,Te){Te===d.ZP.sources.USER&&Ce.balanceTables()}),!0)})}),this.quill.on(d.ZP.events.CONTENT_SETTED,function(){Ce.quill.once(d.ZP.events.TEXT_CHANGE,function(){Ce.balanceTables()})})}}],[{key:"register",value:function(){d.ZP.register(s.zW,!0),d.ZP.register(s.iD,!0),d.ZP.register(s.xs,!0),d.ZP.register(s.pj,!0),d.ZP.register(s.KA,!0),d.ZP.register(s.SC,!0),d.ZP.register(s.RM,!0),d.ZP.register(s.xD,!0),d.ZP.register(s.xJ,!0),[_.li,x.Du].forEach(function(Ce){Object.keys(Ce).forEach(function(ye){d.ZP.register(C({},"formats/".concat(ye),Ce[ye]),!0)})})}}]),ve}(c.Z);function he(ue,be){var ve=ue.parentNode,Ce="THEAD"===ve.parentNode.tagName||null,ye=Array.from(("TABLE"===ve.parentNode.tagName?ve.parentNode:ve.parentNode.parentNode).querySelectorAll("tr")),ge=Array.from(ve.querySelectorAll("th,td")),fe=ye.indexOf(ve)+1,xe=ge.indexOf(ue)+1,Te=Ce?"tableHeaderCellLine":"tableCellLine";return 0===be.length()?be=(new(T())).insert("\n",C({},Te,{row:fe,cell:xe})):((0,u.PF)(be,"\n")||be.insert("\n"),(0,u.HI)(be,Te,{row:fe,cell:xe}))}ee.keyboardBindings={"table backspace":{key:"backspace",format:["tableCellLine","tableHeaderCellLine"],collapsed:!0,offset:0,handler:function(be){var Ce=I(this.quill.getLine(be.index),1)[0];return!(!Ce.prev||-1===["tableCellLine","tableHeaderCellLine"].indexOf(Ce.prev.statics.blotName))}},"table delete":{key:"del",format:["tableCellLine","tableHeaderCellLine"],collapsed:!0,suffix:/^$/,handler:function(){}},"table enter":{key:"enter",shiftKey:null,format:["tableCellLine","tableHeaderCellLine"],handler:function(be,ve){var le,Ce,ye=this,ge=this.quill.getModule("table");if(ge){var fe=this.quill,Ee=I(ge.getTable(be),1)[0];if(1===(null===(le=this.quill.selection)||void 0===le?void 0:le.lastNative.native.endContainer.nodeType)){var ze=Ee.offset();return void(0,w.Z)({quill:fe,index:ze,table:Ee})}if(null===(Ce=this.quill.selection)||void 0===Ce||!Ce.composing){be.length>0&&this.quill.scroll.deleteAt(be.index,be.length);var $e=Object.keys(ve.format).reduce(function(Be,Ue){return ye.quill.scroll.query(Ue,y.Scope.BLOCK)&&!Array.isArray(ve.format[Ue])&&(Be[Ue]=ve.format[Ue]),Be},{});this.quill.insertText(be.index,"\n",$e.tableCellLine,d.ZP.sources.USER),this.quill.setSelection(be.index+1,d.ZP.sources.SILENT),this.quill.focus(),Object.keys(ve.format).forEach(function(Be){null==$e[Be]&&(Array.isArray(ve.format[Be])||"link"!==Be&&ye.quill.format(Be,ve.format[Be],d.ZP.sources.USER))})}}}},"table tab":{key:"tab",shiftKey:null,format:["tableCellLine","tableHeaderCellLine"],handler:function(be,ve){var le=ve.event,Ce=ve.line,ye=Ce.offset(this.quill.scroll);this.quill.setSelection(le.shiftKey?ye-1:ye+Ce.length(),d.ZP.sources.USER)}},"table down":(0,h.Z)(!1,["tableCellLine","tableHeaderCellLine"]),"table up":(0,h.Z)(!0,["tableCellLine","tableHeaderCellLine"])};const de=ee},6054:(P,b,f)=>{"use strict";f.d(b,{Z:()=>Ai});var S=f(9098),T=f.n(S),y=f(281),d=f(7094),c=f(6446),s=f(3553),a=f(5874),u=f(319),h=f(8536),g=f(2795);function _(pt){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Dt){return typeof Dt}:function(Dt){return Dt&&"function"==typeof Symbol&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt})(pt)}function x(pt,Dt){return function C(pt){if(Array.isArray(pt))return pt}(pt)||function D(pt,Dt){var cn=null==pt?null:typeof Symbol<"u"&&pt[Symbol.iterator]||pt["@@iterator"];if(null!=cn){var dt,Et,hn,$n,Ln=[],Nt=!0,Gt=!1;try{if(hn=(cn=cn.call(pt)).next,0===Dt){if(Object(cn)!==cn)return;Nt=!1}else for(;!(Nt=(dt=hn.call(cn)).done)&&(Ln.push(dt.value),Ln.length!==Dt);Nt=!0);}catch(on){Gt=!0,Et=on}finally{try{if(!Nt&&null!=cn.return&&($n=cn.return(),Object($n)!==$n))return}finally{if(Gt)throw Et}}return Ln}}(pt,Dt)||N(pt,Dt)||function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(pt,Dt){if(pt){if("string"==typeof pt)return U(pt,Dt);var cn=Object.prototype.toString.call(pt).slice(8,-1);if("Object"===cn&&pt.constructor&&(cn=pt.constructor.name),"Map"===cn||"Set"===cn)return Array.from(pt);if("Arguments"===cn||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(cn))return U(pt,Dt)}}function U(pt,Dt){(null==Dt||Dt>pt.length)&&(Dt=pt.length);for(var cn=0,dt=new Array(Dt);cn<Dt;cn++)dt[cn]=pt[cn];return dt}function B(pt,Dt){if(!(pt instanceof Dt))throw new TypeError("Cannot call a class as a function")}function K(pt,Dt){for(var cn=0;cn<Dt.length;cn++){var dt=Dt[cn];dt.enumerable=dt.enumerable||!1,dt.configurable=!0,"value"in dt&&(dt.writable=!0),Object.defineProperty(pt,ie(dt.key),dt)}}function J(pt,Dt,cn){return Dt&&K(pt.prototype,Dt),cn&&K(pt,cn),Object.defineProperty(pt,"prototype",{writable:!1}),pt}function ie(pt){var Dt=function re(pt,Dt){if("object"!==_(pt)||null===pt)return pt;var cn=pt[Symbol.toPrimitive];if(void 0!==cn){var dt=cn.call(pt,Dt||"default");if("object"!==_(dt))return dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Dt?String:Number)(pt)}(pt,"string");return"symbol"===_(Dt)?Dt:String(Dt)}function q(){return q=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(Dt,cn,dt){var Et=function Y(pt,Dt){for(;!Object.prototype.hasOwnProperty.call(pt,Dt)&&null!==(pt=ae(pt)););return pt}(Dt,cn);if(Et){var hn=Object.getOwnPropertyDescriptor(Et,cn);return hn.get?hn.get.call(arguments.length<3?Dt:dt):hn.value}},q.apply(this,arguments)}function Z(pt,Dt){if("function"!=typeof Dt&&null!==Dt)throw new TypeError("Super expression must either be null or a function");pt.prototype=Object.create(Dt&&Dt.prototype,{constructor:{value:pt,writable:!0,configurable:!0}}),Object.defineProperty(pt,"prototype",{writable:!1}),Dt&&Q(pt,Dt)}function Q(pt,Dt){return(Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(dt,Et){return dt.__proto__=Et,dt})(pt,Dt)}function te(pt){var Dt=function oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Et,dt=ae(pt);if(Dt){var hn=ae(this).constructor;Et=Reflect.construct(dt,arguments,hn)}else Et=dt.apply(this,arguments);return function pe(pt,Dt){if(Dt&&("object"===_(Dt)||"function"==typeof Dt))return Dt;if(void 0!==Dt)throw new TypeError("Derived constructors may only return object or undefined");return function z(pt){if(void 0===pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pt}(pt)}(this,Et)}}function ae(pt){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(cn){return cn.__proto__||Object.getPrototypeOf(cn)})(pt)}var he="data-tablelite-",de=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn,[{key:"format",value:function(Et,hn){if(u.li[Et]){var $n,Ln="data-".concat(Et.toLowerCase());(0,g.Z)(this.domNode,Ln,hn),null===($n=this.row())||void 0===$n||null===($n=$n.table())||void 0===$n||$n.format(Et,hn)}else q(ae(cn.prototype),"format",this).call(this,Et,hn)}},{key:"cellOffset",value:function(){return this.parent?this.parent.children.indexOf(this):-1}},{key:"row",value:function(){return"table"in this.parent?this.parent:null}},{key:"rowOffset",value:function(){return this.row()?this.row().rowOffset():-1}},{key:"table",value:function(){var Et;return null===(Et=this.row())||void 0===Et?void 0:Et.table()}}],[{key:"create",value:function(Et){var hn=q(ae(cn),"create",this).call(this);return(0,g.Z)(hn,this.dataAttribute,Et??Te()),hn}},{key:"formats",value:function(Et){var hn=this.dataAttribute;if(Et.hasAttribute(hn))return Et.getAttribute(hn)}}]),cn}(c.ZP);de.tagName=["TD","TH"];var ue=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn,[{key:"format",value:function(Et,hn){Et===cn.blotName&&hn?this.domNode.setAttribute(cn.dataAttribute,hn):q(ae(cn.prototype),"format",this).call(this,Et,hn)}}]),cn}(de);ue.blotName="table",ue.dataAttribute="".concat(he,"row");var be=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn,[{key:"format",value:function(Et,hn){Et===cn.blotName&&hn?this.domNode.setAttribute(cn.dataAttribute,hn):q(ae(cn.prototype),"format",this).call(this,Et,hn)}}]),cn}(de);be.tagName=["TH","TD"],be.blotName="tableHeaderCell",be.dataAttribute="".concat(he,"header-row");var ve=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn,[{key:"checkMerge",value:function(){if(q(ae(cn.prototype),"checkMerge",this).call(this)&&(0,a.Z)(this.next.children.head)){var Et=this.childFormatName,hn=this.children.head.formats(),$n=this.children.tail.formats(),Ln=this.next.children.head.formats(),Nt=this.next.children.tail.formats();return hn[Et]===$n[Et]&&hn[Et]===Ln[Et]&&hn[Et]===Nt[Et]}return!1}},{key:"optimize",value:function(){for(var Et,hn=this,$n=arguments.length,Ln=new Array($n),Nt=0;Nt<$n;Nt++)Ln[Nt]=arguments[Nt];(Et=q(ae(cn.prototype),"optimize",this)).call.apply(Et,[this].concat(Ln));var Gt=this.childFormatName;this.children.forEach(function(on){if((0,a.Z)(on.next)){var sn=on.formats(),It=on.next.formats();if(sn[Gt]!==It[Gt]){var Ot=hn.splitAfter(on);Ot&&Ot.optimize(),hn.prev&&hn.prev.optimize()}}})}},{key:"rowOffset",value:function(){return this.parent?this.parent.children.indexOf(this):-1}},{key:"table",value:function(){var Et;return null===(Et=this.parent)||void 0===Et?void 0:Et.parent}}]),cn}(s.Z);ve.tagName="TR";var le=function(pt){Z(cn,pt);var Dt=te(cn);function cn(dt,Et){var hn;return B(this,cn),(hn=Dt.call(this,dt,Et)).childFormatName="table",hn}return J(cn)}(ve);le.blotName="tableRow";var Ce=function(pt){Z(cn,pt);var Dt=te(cn);function cn(dt,Et){var hn;return B(this,cn),(hn=Dt.call(this,dt,Et)).childFormatName="tableHeaderCell",hn}return J(cn)}(ve);Ce.blotName="tableHeaderRow";var ye=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn,[{key:"optimize",value:function(){var Et;if(this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)){var hn=this.children.head.children.head.domNode,$n={};Object.keys(u.li).forEach(function(on){var sn=hn.dataset[on.toLowerCase()];sn&&($n[on]=sn)}),this.wrap(this.statics.requiredContainer.blotName,$n)}for(var Ln=arguments.length,Nt=new Array(Ln),Gt=0;Gt<Ln;Gt++)Nt[Gt]=arguments[Gt];(Et=q(ae(cn.prototype),"optimize",this)).call.apply(Et,[this].concat(Nt))}}]),cn}(s.Z),ge=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn)}(ye);ge.blotName="tableBody",ge.tagName=["TBODY"];var fe=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn)}(ye);fe.blotName="tableHeader",fe.tagName=["THEAD"];var xe=function(pt){Z(cn,pt);var Dt=te(cn);function cn(){return B(this,cn),Dt.apply(this,arguments)}return J(cn,[{key:"balanceCells",value:function(){var Et=this.descendants(Ce),hn=this.descendants(le),$n=this.getMaxTableColCount(Et,hn);this.balanceRows($n,Et,be),this.balanceRows($n,hn,ue)}},{key:"getMaxTableColCount",value:function(Et,hn){return Math.max(this.getMaxRowColCount(Et),this.getMaxRowColCount(hn))}},{key:"getMaxRowColCount",value:function(Et){return Math.max.apply(Math,function I(pt){return function k(pt){if(Array.isArray(pt))return U(pt)}(pt)||function G(pt){if(typeof Symbol<"u"&&null!=pt[Symbol.iterator]||null!=pt["@@iterator"])return Array.from(pt)}(pt)||N(pt)||function L(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Et.map(function(hn){return hn.children.length})))}},{key:"balanceRows",value:function(Et,hn,$n){var Ln=this;hn.forEach(function(Nt){new Array(Et-Nt.children.length).fill(0).forEach(function(){var Gt;(0,a.Z)(Nt.children.head)&&(Gt=$n.formats(Nt.children.head.domNode));var on=Ln.scroll.create($n.blotName,Gt);Nt.appendChild(on),on.optimize()})})}},{key:"cells",value:function(Et){return this.rows().map(function(hn){return hn.children.at(Et)})}},{key:"deleteColumn",value:function(Et){var hn=this;[fe,ge].forEach(function($n){var Gt=x(hn.descendants($n),1)[0];!(0,a.Z)(Gt)||!(0,a.Z)(Gt.children.head)||Gt.children.forEach(function(on){var sn=on.children.at(Et);(0,a.Z)(sn)&&sn.remove()})})}},{key:"insertColumn",value:function(Et){var hn=this;[fe,ge].forEach(function($n){var Gt=x(hn.descendants($n),1)[0];if((0,a.Z)(Gt)&&(0,a.Z)(Gt.children.head)){var on=$n===fe?be:ue;Gt.children.forEach(function(sn){var It=sn.children.at(Et),Ot=on.formats(sn.children.head.domNode),zt=hn.scroll.create(on.blotName,Ot);sn.insertBefore(zt,It)})}})}},{key:"insertRow",value:function(Et){var hn=this,Nt=x(this.descendants(ge),1)[0];if((0,a.Z)(Nt)&&(0,a.Z)(Nt.children.head)){var Gt=Te(),on=this.scroll.create(le.blotName);Nt.children.head.children.forEach(function(){var It=hn.scroll.create(ue.blotName,Gt);on.appendChild(It)});var sn=Nt.children.at(Et);Nt.insertBefore(on,sn)}}},{key:"insertHeaderRow",value:function(){var Et=this,Ln=x(this.descendants(fe),1)[0],on=x(this.descendants(ge),1)[0];if(!(0,a.Z)(Ln)&&(0,a.Z)(on)&&(0,a.Z)(on.children.head)){var sn=Te(),It=this.scroll.create(fe.blotName),Ot=this.scroll.create(Ce.blotName),zt=this.children.at(0);It.appendChild(Ot),on.children.head.children.forEach(function(){var un=Et.scroll.create(be.blotName,sn);Ot.appendChild(un),un.optimize()}),this.insertBefore(It,zt)}}},{key:"rows",value:function(){var Et=this.children.head;return(0,a.Z)(Et)?Et.children.map(function(hn){return hn}):[]}},{key:"formats",value:function(){var Et={},hn=this.cells()[0].domNode;return Object.keys(u.li).forEach(function($n){var Ln=hn.dataset[$n.toLowerCase()];Ln&&(Et[$n]=Ln)}),Et}},{key:"format",value:function(Et,hn){var $n=u.li[Et];if($n){var Ln="data-".concat(Et.toLowerCase());this.cells().forEach(function(Nt){(0,g.Z)(Nt.domNode,Ln,hn)}),$n.add(this.domNode,hn)}}}],[{key:"create",value:function(Et){var hn=q(ae(cn),"create",this).call(this,Et);return Et&&Object.keys(Et).forEach(function($n){var Ln;null===(Ln=u.li[$n])||void 0===Ln||Ln.add(hn,Et[$n])}),hn}}]),cn}(s.Z);function Te(){return"row-".concat((0,h.Z)())}xe.blotName="tableContainer",xe.tagName="TABLE",xe.allowedChildren=[fe,ge],ge.requiredContainer=xe,fe.requiredContainer=xe,ge.allowedChildren=[le],le.requiredContainer=ge,le.allowedChildren=[ue],ue.requiredContainer=le,fe.allowedChildren=[Ce],Ce.requiredContainer=fe,Ce.allowedChildren=[be],be.requiredContainer=Ce;var Ee=f(5635),Oe=f(9466);function ze(pt){var Dt=pt.quill,dt=pt.range,Et=pt.index-1,hn=(new(T())).retain(Et).insert("\n");Dt.updateContents(hn,y.ZP.sources.USER),Dt.setSelection(dt.index+1,dt.length,y.ZP.sources.SILENT)}var $e=f(2480);function Be(pt,Dt,cn){return null==pt.prev&&null==pt.next?null==Dt.prev&&null==Dt.next?0===cn?-1:1:null==Dt.prev?-1:1:null==pt.prev?-1:null==pt.next?1:null}var Ue=f(7896),ot=f(1342);function st(pt){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Dt){return typeof Dt}:function(Dt){return Dt&&"function"==typeof Symbol&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt})(pt)}function Ke(pt,Dt){return function Fe(pt){if(Array.isArray(pt))return pt}(pt)||function Re(pt,Dt){var cn=null==pt?null:typeof Symbol<"u"&&pt[Symbol.iterator]||pt["@@iterator"];if(null!=cn){var dt,Et,hn,$n,Ln=[],Nt=!0,Gt=!1;try{if(hn=(cn=cn.call(pt)).next,0===Dt){if(Object(cn)!==cn)return;Nt=!1}else for(;!(Nt=(dt=hn.call(cn)).done)&&(Ln.push(dt.value),Ln.length!==Dt);Nt=!0);}catch(on){Gt=!0,Et=on}finally{try{if(!Nt&&null!=cn.return&&($n=cn.return(),Object($n)!==$n))return}finally{if(Gt)throw Et}}return Ln}}(pt,Dt)||function Pe(pt,Dt){if(pt){if("string"==typeof pt)return Se(pt,Dt);var cn=Object.prototype.toString.call(pt).slice(8,-1);if("Object"===cn&&pt.constructor&&(cn=pt.constructor.name),"Map"===cn||"Set"===cn)return Array.from(pt);if("Arguments"===cn||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(cn))return Se(pt,Dt)}}(pt,Dt)||function Ye(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(pt,Dt){(null==Dt||Dt>pt.length)&&(Dt=pt.length);for(var cn=0,dt=new Array(Dt);cn<Dt;cn++)dt[cn]=pt[cn];return dt}function tt(pt,Dt){for(var cn=0;cn<Dt.length;cn++){var dt=Dt[cn];dt.enumerable=dt.enumerable||!1,dt.configurable=!0,"value"in dt&&(dt.writable=!0),Object.defineProperty(pt,qe(dt.key),dt)}}function qe(pt){var Dt=function At(pt,Dt){if("object"!==st(pt)||null===pt)return pt;var cn=pt[Symbol.toPrimitive];if(void 0!==cn){var dt=cn.call(pt,Dt||"default");if("object"!==st(dt))return dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Dt?String:Number)(pt)}(pt,"string");return"symbol"===st(Dt)?Dt:String(Dt)}function qt(pt,Dt){return(qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(dt,Et){return dt.__proto__=Et,dt})(pt,Dt)}function Jn(pt){return(Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(cn){return cn.__proto__||Object.getPrototypeOf(cn)})(pt)}var wi=[null,null,null,-1],Bn=function(pt){!function Tt(pt,Dt){if("function"!=typeof Dt&&null!==Dt)throw new TypeError("Super expression must either be null or a function");pt.prototype=Object.create(Dt&&Dt.prototype,{constructor:{value:pt,writable:!0,configurable:!0}}),Object.defineProperty(pt,"prototype",{writable:!1}),Dt&&qt(pt,Dt)}(cn,pt);var Dt=function wt(pt){var Dt=function Tn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Et,dt=Jn(pt);if(Dt){var hn=Jn(this).constructor;Et=Reflect.construct(dt,arguments,hn)}else Et=dt.apply(this,arguments);return function En(pt,Dt){if(Dt&&("object"===st(Dt)||"function"==typeof Dt))return Dt;if(void 0!==Dt)throw new TypeError("Derived constructors may only return object or undefined");return function ri(pt){if(void 0===pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pt}(pt)}(this,Et)}}(cn);function cn(){var dt;!function Xe(pt,Dt){if(!(pt instanceof Dt))throw new TypeError("Cannot call a class as a function")}(this,cn);for(var Et=arguments.length,hn=new Array(Et),$n=0;$n<Et;$n++)hn[$n]=arguments[$n];return(dt=Dt.call.apply(Dt,[this].concat(hn))).tableBlots=[ue.blotName,be.blotName],dt.tableBlots.forEach(function(Ln){dt.quill.editor.addImmediateFormat(Ln)}),dt.integrateClipboard(),dt.addKeyboardHandlers(),dt.listenBalanceCells(),dt}return function vt(pt,Dt,cn){Dt&&tt(pt.prototype,Dt),cn&&tt(pt,cn),Object.defineProperty(pt,"prototype",{writable:!1})}(cn,[{key:"integrateClipboard",value:function(){var Et=this;this.tableBlots.forEach(function(hn){return Et.quill.clipboard.addTableBlot(hn)}),this.quill.clipboard.addMatcher("tr",gi),this.quill.clipboard.addMatcher("table",(0,Ue.F)(u.Zt)),this.quill.clipboard.addMatcher("td, th",(0,Ue.a)(ot.h6))}},{key:"addKeyboardHandlers",value:function(){var Et=this,hn=cn.keyboardBindings;Object.keys(hn).forEach(function($n){hn[$n]&&Et.quill.keyboard.addBinding(hn[$n])})}},{key:"balanceTables",value:function(){this.quill.scroll.descendants(xe).forEach(function(Et){Et.balanceCells()})}},{key:"deleteColumn",value:function(){var hn=Ke(this.getTable(),3),$n=hn[0],Ln=hn[2];(0,a.Z)(Ln)&&($n.deleteColumn(Ln.cellOffset()),this.quill.update(y.ZP.sources.USER))}},{key:"deleteRow",value:function(){var $n=Ke(this.getTable(),2)[1];(0,a.Z)($n)&&($n.remove(),this.quill.update(y.ZP.sources.USER))}},{key:"deleteTable",value:function(){var $n=Ke(this.getTable(),1)[0];if((0,a.Z)($n)){var Ln=$n.offset();$n.remove(),this.quill.update(y.ZP.sources.USER),this.quill.setSelection(Ln,y.ZP.sources.SILENT)}}},{key:"getTable",value:function(){var Et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(!(0,a.Z)(Et))return wi;var $n=Ke(this.quill.getLine(Et.index),2),Ln=$n[0],Nt=$n[1];if(!(0,a.Z)(Ln)||-1===this.tableBlots.indexOf(Ln.statics.blotName))return wi;var Gt=Ln.parent;return[Gt.parent.parent,Gt,Ln,Nt]}},{key:"insertColumn",value:function(Et){var hn=this.quill.getSelection(),Ln=Ke(this.getTable(hn),3),Nt=Ln[0],Gt=Ln[1],on=Ln[2];if((0,a.Z)(on)){var sn=on.cellOffset();Nt.insertColumn(sn+Et),this.quill.update(y.ZP.sources.USER);var It=Gt.rowOffset();0===Et&&(It+=1),this.quill.setSelection(hn.index+It,hn.length,y.ZP.sources.SILENT)}}},{key:"insertColumnLeft",value:function(){this.insertColumn(0)}},{key:"insertColumnRight",value:function(){this.insertColumn(1)}},{key:"insertRow",value:function(Et){var hn=this.quill.getSelection(),Ln=Ke(this.getTable(hn),3),Nt=Ln[0],Gt=Ln[1];if((0,a.Z)(Ln[2])){var sn=Gt.rowOffset();Nt.insertRow(sn+Et),this.quill.update(y.ZP.sources.USER),Et>0?this.quill.setSelection(hn,y.ZP.sources.SILENT):this.quill.setSelection(hn.index+Gt.children.length,hn.length,y.ZP.sources.SILENT)}}},{key:"insertRowAbove",value:function(){this.insertRow(0)}},{key:"insertRowBelow",value:function(){this.insertRow(1)}},{key:"insertHeaderRow",value:function(){var Et=this.quill.getSelection(),$n=Ke(this.getTable(Et),3),Ln=$n[0];(0,a.Z)($n[2])&&(Ln.insertHeaderRow(),this.quill.update(y.ZP.sources.USER))}},{key:"insertTable",value:function(Et,hn){var $n=this.quill.getSelection();if((0,a.Z)($n)){var Ln=new Array(Et).fill(0).reduce(function(Nt){var Gt=new Array(hn).fill("\n").join("");return Nt.insert(Gt,{table:Te()})},(new(T())).retain($n.index));this.quill.updateContents(Ln,y.ZP.sources.USER),this.quill.setSelection($n.index,y.ZP.sources.SILENT),this.balanceTables()}}},{key:"tableFormats",value:function(){return this.tableBlots}},{key:"listenBalanceCells",value:function(){var Et=this;this.quill.on(y.ZP.events.SCROLL_OPTIMIZE,function(hn){hn.some(function($n){return-1!==["TD","TH","TR","TBODY","THEAD","TABLE"].indexOf($n.target.tagName)&&(Et.quill.once(y.ZP.events.TEXT_CHANGE,function(Ln,Nt,Gt){Gt===y.ZP.sources.USER&&Et.balanceTables()}),!0)})}),this.quill.on(y.ZP.events.CONTENT_SETTED,function(){Et.quill.once(y.ZP.events.TEXT_CHANGE,function(){Et.balanceTables()})})}}],[{key:"register",value:function(){y.ZP.register(be,!0),y.ZP.register(ue,!0),y.ZP.register(Ce,!0),y.ZP.register(le,!0),y.ZP.register(ge,!0),y.ZP.register(fe,!0),y.ZP.register(xe,!0),[u.li,ot.Du].forEach(function(Et){Object.keys(Et).forEach(function(hn){y.ZP.register(function et(pt,Dt,cn){return(Dt=qe(Dt))in pt?Object.defineProperty(pt,Dt,{value:cn,enumerable:!0,configurable:!0,writable:!0}):pt[Dt]=cn,pt}({},"formats/".concat(hn),Et[hn]),!0)})})}}]),cn}(d.Z);function gi(pt,Dt){var dt="THEAD"===pt.parentNode.tagName||null,hn=Array.from(("TABLE"===pt.parentNode.tagName?pt.parentNode:pt.parentNode.parentNode).querySelectorAll("tr")).indexOf(pt)+1;return(0,Ee.HI)(Dt,dt?"tableHeaderCell":"table",hn)}Bn.keyboardBindings={"table backspace":{key:"backspace",format:["table","tableHeaderCell"],collapsed:!0,offset:0,handler:function(){}},"table delete":{key:"del",format:["table","tableHeaderCell"],collapsed:!0,suffix:/^$/,handler:function(){}},"table enter":{key:"enter",shiftKey:null,format:["table"],handler:function(Dt){var cn=this.quill.getModule("table");if(cn){var dt=this.quill,hn=Ke(cn.getTable(Dt),4),$n=hn[0],on=Be(hn[1],hn[2],hn[3]);if(null==on||on<0&&$n.children.length>1&&$n.children.head)return;var It=$n.offset();on<0?ze({quill:dt,index:It,range:Dt}):(0,$e.Z)({quill:dt,index:It,table:$n})}}},"table header enter":{key:"enter",shiftKey:null,format:["tableHeaderCell"],handler:function(Dt){var cn=this.quill.getModule("table");if(cn){var dt=this.quill,hn=Ke(cn.getTable(Dt),4),$n=hn[0],on=Be(hn[1],hn[2],hn[3]);if(null==on)return;var sn=$n.offset();on<0||on>0&&$n.children.length>1&&$n.children.tail?ze({quill:dt,index:sn,range:Dt}):(0,$e.Z)({quill:dt,index:sn,table:$n})}}},"table tab":{key:"tab",shiftKey:null,format:["table","tableHeaderCell"],handler:function(Dt,cn){var dt=cn.event,Et=cn.line,hn=Et.offset(this.quill.scroll);this.quill.setSelection(dt.shiftKey?hn-1:hn+Et.length(),y.ZP.sources.USER)}},"table down":(0,Oe.Z)(!1,["table","tableHeaderCell"]),"table up":(0,Oe.Z)(!0,["table","tableHeaderCell"])};const Ai=Bn},2480:(P,b,f)=>{"use strict";f.d(b,{Z:()=>d});var S=f(9098),T=f.n(S),y=f(281);function d(c){var s=c.quill,h=c.index+c.table.length(),g=(new(T())).retain(h).insert("\n");s.updateContents(g,y.ZP.sources.USER),s.setSelection(h,y.ZP.sources.USER)}},9466:(P,b,f)=>{"use strict";f.d(b,{Z:()=>T});var S=f(281);function T(y,d){return{key:y?"upArrow":"downArrow",collapsed:!0,format:d,handler:function(s,a){var u=y?"prev":"next",h=a.line,g=h.statics.blotName.indexOf("Line")>-1?h.parent:h,_=g.parent.parent[u],x=g.parent[u]||_?.children.head;if(null!=x){if("tableRow"===x.statics.blotName||"tableHeaderRow"===x.statics.blotName){for(var w=x.children.head,D=g;null!=D.prev;)D=D.prev,w=w.next;var C=w.offset(this.quill.scroll)+Math.min(a.offset,w.length()-1);this.quill.setSelection(C,0,S.ZP.sources.USER)}}else{var I=g.table()[u];null!=I&&this.quill.setSelection(y?I.offset(this.quill.scroll)+I.length()-1:I.offset(this.quill.scroll),0,S.ZP.sources.USER)}return!1}}}},7896:(P,b,f)=>{"use strict";f.d(b,{F:()=>w,a:()=>D});var S=f(1233),T=f(1674),y=f(4569),d=f(5635);function c(C){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(I){return typeof I}:function(I){return I&&"function"==typeof Symbol&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I})(C)}function s(C,I){var L=Object.keys(C);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(C);I&&(N=N.filter(function(G){return Object.getOwnPropertyDescriptor(C,G).enumerable})),L.push.apply(L,N)}return L}function a(C){for(var I=1;I<arguments.length;I++){var L=null!=arguments[I]?arguments[I]:{};I%2?s(Object(L),!0).forEach(function(N){u(C,N,L[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(L)):s(Object(L)).forEach(function(N){Object.defineProperty(C,N,Object.getOwnPropertyDescriptor(L,N))})}return C}function u(C,I,L){return I=function h(C){var I=function g(C,I){if("object"!==c(C)||null===C)return C;var L=C[Symbol.toPrimitive];if(void 0!==L){var N=L.call(C,I||"default");if("object"!==c(N))return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===I?String:Number)(C)}(C,"string");return"symbol"===c(I)?I:String(I)}(I),I in C?Object.defineProperty(C,I,{value:L,enumerable:!0,configurable:!0,writable:!0}):C[I]=L,C}function _(C,I,L,N){C[I]=!N&&C[I]?C[I]:L}function x(C,I,L,N,G,k){return C.filter(function(U){return!!U}).forEach(function(U){var B=L.query(U,S.Scope.ATTRIBUTE);if(null!==B){var K=B.value(I);if(K)return void _(G,B.attrName,K,k)}var J=N[U];if(null!=J&&(J.attrName===U||J.keyName===U)){var ie=J.value(I)||void 0;_(G,J.attrName,ie,k)}}),G}function w(C){return function(I,L,N){var G=T.Z.keys(I),k=y.Z.keys(I),U=a(a({},x(G,I,N,C,{},!0)),x(k,I,N,C,{},!0));return Object.keys(U).length>0?(0,d.HI)(L,U):L}}function D(C){return function(I,L,N){var G,k=T.Z.keys(I),U=y.Z.keys(I),B="TR"===(null===(G=I.parentNode)||void 0===G?void 0:G.tagName)?I.parentNode:void 0,K=a(a({},x(k,I,N,C,{},!0)),x(U,I,N,C,{},!0));return B&&(K=x(y.Z.keys(B),B,N,C,K,!1)),Object.keys(K).length>0?(0,d.HI)(L,K):L}}},3859:(P,b,f)=>{"use strict";f.d(b,{Z:()=>U});var S=f(9098),T=f.n(S),y=f(2069),d=f(7094),c=f(8034);function s(B){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(K){return typeof K}:function(K){return K&&"function"==typeof Symbol&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K})(B)}function h(B,K){for(var J=0;J<K.length;J++){var ie=K[J];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(B,_(ie.key),ie)}}function _(B){var K=function x(B,K){if("object"!==s(B)||null===B)return B;var J=B[Symbol.toPrimitive];if(void 0!==J){var ie=J.call(B,K||"default");if("object"!==s(ie))return ie;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===K?String:Number)(B)}(B,"string");return"symbol"===s(K)?K:String(K)}function D(B,K){return(D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie})(B,K)}function G(B){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)})(B)}var k=function(B){!function w(B,K){if("function"!=typeof K&&null!==K)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(K&&K.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),Object.defineProperty(B,"prototype",{writable:!1}),K&&D(B,K)}(J,B);var K=function C(B){var K=function N(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var re,ie=G(B);if(K){var q=G(this).constructor;re=Reflect.construct(ie,arguments,q)}else re=ie.apply(this,arguments);return function I(B,K){if(K&&("object"===s(K)||"function"==typeof K))return K;if(void 0!==K)throw new TypeError("Derived constructors may only return object or undefined");return function L(B){if(void 0===B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B}(B)}(this,re)}}(J);function J(ie,re){var q;return function u(B,K){if(!(B instanceof K))throw new TypeError("Cannot call a class as a function")}(this,J),(q=K.call(this,ie,re)).preventImageUploading(!1),q.addDragOverHandler(),q.addDropHandler(),q}return function g(B,K,J){K&&h(B.prototype,K),J&&h(B,J),Object.defineProperty(B,"prototype",{writable:!1})}(J,[{key:"addDragOverHandler",value:function(){if((0,c.Z)()){var re=window.navigator.userAgent.toLowerCase();(-1!==re.indexOf("msie ")||-1!==re.indexOf("trident/")||-1!==re.indexOf("edge/"))&&this.quill.root.addEventListener("dragover",function(Y){Y.preventDefault()})}}},{key:"addDropHandler",value:function(){var re=this;this.quill.root.addEventListener("drop",function(q){var Y=0===q.dataTransfer.files.length,Z=re.options.onDrop;if(Z&&"function"==typeof Z&&Z(q),!Y&&!re.preventImageUpload){var Q;if(q.preventDefault(),document.caretRangeFromPoint)Q=document.caretRangeFromPoint(q.clientX,q.clientY);else{if(!document.caretPositionFromPoint)return;var te=document.caretPositionFromPoint(q.clientX,q.clientY);(Q=document.createRange()).setStart(te.offsetNode,te.offset),Q.setEnd(te.offsetNode,te.offset)}var pe=re.quill.selection.normalizeNative(Q),z=re.quill.selection.normalizedToRange(pe);re.upload(z,q.dataTransfer.files)}})}},{key:"preventImageUploading",value:function(re){return typeof re<"u"&&(this.preventImageUpload=re),this.preventImageUpload}},{key:"upload",value:function(re,q,Y){var Z=this;if(!this.preventImageUpload||Y){var Q=[];Array.from(q).forEach(function(te){te&&-1!==Z.options.mimetypes.indexOf(te.type)&&Q.push(te)}),Q.length>0&&this.options.handler.call(this,re,Q,this.options.imageBlot)}}}]),J}(d.Z);k.DEFAULTS={mimetypes:["image/png","image/jpeg","image/pjpeg","image/gif","image/webp","image/bmp","image/svg+xml","image/vnd.microsoft.icon"],imageBlot:"image",handler:function(K,J,ie){var re=this,q=J.map(function(Y){return new Promise(function(Z){var Q=new FileReader;Q.onload=function(te){Z(te.target.result)},Q.readAsDataURL(Y)})});Promise.all(q).then(function(Y){var Z=Y.reduce(function(Q,te){return Q.insert(function a(B,K,J){return(K=_(K))in B?Object.defineProperty(B,K,{value:J,enumerable:!0,configurable:!0,writable:!0}):B[K]=J,B}({},ie,te))},(new(T())).retain(K.index).delete(K.length));re.quill.updateContents(Z,y.Z.sources.USER),re.quill.setSelection(K.index+Y.length,y.Z.sources.SILENT)})}};const U=k},2141:(P,b,f)=>{"use strict";function S(T){return T?T.substring(0,1).toUpperCase()+T.substring(1):""}f.d(b,{Z:()=>S})},8034:(P,b,f)=>{"use strict";f.d(b,{Z:()=>T});const T=function(){return typeof window<"u"}},5874:(P,b,f)=>{"use strict";function S(T){return null!=T}f.d(b,{Z:()=>S})},1233:(P,b,f)=>{"use strict";f.r(b),f.d(b,{Attributor:()=>K,AttributorStore:()=>z,BlockBlot:()=>be,ClassAttributor:()=>q,ContainerBlot:()=>N,EmbedBlot:()=>Ce,InlineBlot:()=>he,LeafBlot:()=>U,ParentBlot:()=>C,Registry:()=>h,Scope:()=>T,ScrollBlot:()=>Te,StyleAttributor:()=>te,TextBlot:()=>ze});var S=function($e){return $e[$e.TYPE=3]="TYPE",$e[$e.LEVEL=12]="LEVEL",$e[$e.ATTRIBUTE=13]="ATTRIBUTE",$e[$e.BLOT=14]="BLOT",$e[$e.INLINE=7]="INLINE",$e[$e.BLOCK=11]="BLOCK",$e[$e.BLOCK_BLOT=10]="BLOCK_BLOT",$e[$e.INLINE_BLOT=6]="INLINE_BLOT",$e[$e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",$e[$e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",$e[$e.ANY=15]="ANY",$e}(S||{});const T=S;var y=function(){function $e(){this.head=null,this.tail=null,this.length=0}return $e.prototype.append=function(){for(var Be=[],Ue=0;Ue<arguments.length;Ue++)Be[Ue]=arguments[Ue];if(this.insertBefore(Be[0],null),Be.length>1){var ot=Be.slice(1);this.append.apply(this,ot)}},$e.prototype.at=function(Be){for(var Ue=this.iterator(),ot=Ue();ot&&Be>0;)Be-=1,ot=Ue();return ot},$e.prototype.contains=function(Be){for(var Ue=this.iterator(),ot=Ue();ot;){if(ot===Be)return!0;ot=Ue()}return!1},$e.prototype.indexOf=function(Be){for(var Ue=this.iterator(),ot=Ue(),st=0;ot;){if(ot===Be)return st;st+=1,ot=Ue()}return-1},$e.prototype.insertBefore=function(Be,Ue){null!=Be&&(this.remove(Be),Be.next=Ue,null!=Ue?(Be.prev=Ue.prev,null!=Ue.prev&&(Ue.prev.next=Be),Ue.prev=Be,Ue===this.head&&(this.head=Be)):null!=this.tail?(this.tail.next=Be,Be.prev=this.tail,this.tail=Be):(Be.prev=null,this.head=this.tail=Be),this.length+=1)},$e.prototype.offset=function(Be){for(var Ue=0,ot=this.head;null!=ot;){if(ot===Be)return Ue;Ue+=ot.length(),ot=ot.next}return-1},$e.prototype.remove=function(Be){this.contains(Be)&&(null!=Be.prev&&(Be.prev.next=Be.next),null!=Be.next&&(Be.next.prev=Be.prev),Be===this.head&&(this.head=Be.next),Be===this.tail&&(this.tail=Be.prev),this.length-=1)},$e.prototype.iterator=function(Be){return void 0===Be&&(Be=this.head),function(){var Ue=Be;return null!=Be&&(Be=Be.next),Ue}},$e.prototype.find=function(Be,Ue){void 0===Ue&&(Ue=!1);for(var ot=this.iterator(),st=ot();st;){var et=st.length();if(Be<et||Ue&&Be===et&&(null==st.next||0!==st.next.length()))return[st,Be];Be-=et,st=ot()}return[null,0]},$e.prototype.forEach=function(Be){for(var Ue=this.iterator(),ot=Ue();ot;)Be(ot),ot=Ue()},$e.prototype.forEachAt=function(Be,Ue,ot){if(!(Ue<=0))for(var st=this.find(Be),Ye=Be-st[1],Pe=this.iterator(st[0]),Se=Pe();Se&&Ye<Be+Ue;){var Re=Se.length();Be>Ye?ot(Se,Be-Ye,Math.min(Ue,Ye+Re-Be)):ot(Se,0,Math.min(Re,Be+Ue-Ye)),Ye+=Re,Se=Pe()}},$e.prototype.map=function(Be){return this.reduce(function(Ue,ot){return Ue.push(Be(ot)),Ue},[])},$e.prototype.reduce=function(Be,Ue){for(var ot=this.iterator(),st=ot();st;)Ue=Be(Ue,st),st=ot();return Ue},$e}();const d=y;var c=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();const a=function($e){function Be(Ue){var ot=this;return(ot=$e.call(this,Ue="[Parchment] "+Ue)||this).message=Ue,ot.name=ot.constructor.name,ot}return c(Be,$e),Be}(Error);var u=function(){function $e(){this.attributes={},this.classes={},this.tags={},this.types={}}return $e.find=function(Be,Ue){if(void 0===Ue&&(Ue=!1),null==Be)return null;if(this.blots.has(Be))return this.blots.get(Be)||null;if(Ue){var ot=null;try{ot=Be.parentNode}catch{return null}return this.find(ot,Ue)}return null},$e.prototype.create=function(Be,Ue,ot){var st=this.query(Ue);if(null==st)throw new a("Unable to create ".concat(Ue," blot"));var et=st,Ke=Ue instanceof Node||Ue.nodeType===Node.TEXT_NODE?Ue:et.create(ot),Ye=new et(Be,Ke,ot);return $e.blots.set(Ye.domNode,Ye),Ye},$e.prototype.find=function(Be,Ue){return void 0===Ue&&(Ue=!1),$e.find(Be,Ue)},$e.prototype.query=function(Be,Ue){var st,ot=this;return void 0===Ue&&(Ue=T.ANY),"string"==typeof Be?st=this.types[Be]||this.attributes[Be]:Be instanceof Text||Be.nodeType===Node.TEXT_NODE?st=this.types.text:"number"==typeof Be?Be&T.LEVEL&T.BLOCK?st=this.types.block:Be&T.LEVEL&T.INLINE&&(st=this.types.inline):Be instanceof Element&&((Be.getAttribute("class")||"").split(/\s+/).some(function(Ke){return!!(st=ot.classes[Ke])}),st=st||this.tags[Be.tagName]),null==st?null:Ue&T.LEVEL&st.scope&&Ue&T.TYPE&st.scope?st:null},$e.prototype.register=function(){for(var Be=this,Ue=[],ot=0;ot<arguments.length;ot++)Ue[ot]=arguments[ot];if(Ue.length>1)return Ue.map(function(Ke){return Be.register(Ke)});var st=Ue[0];if("string"!=typeof st.blotName&&"string"!=typeof st.attrName)throw new a("Invalid definition");if("abstract"===st.blotName)throw new a("Cannot register abstract class");return this.types[st.blotName||st.attrName]=st,"string"==typeof st.keyName?this.attributes[st.keyName]=st:(null!=st.className&&(this.classes[st.className]=st),null!=st.tagName&&(st.tagName=Array.isArray(st.tagName)?st.tagName.map(function(Ke){return Ke.toUpperCase()}):st.tagName.toUpperCase(),(Array.isArray(st.tagName)?st.tagName:[st.tagName]).forEach(function(Ke){(null==Be.tags[Ke]||null==st.className)&&(Be.tags[Ke]=st)}))),st},$e.blots=new WeakMap,$e}();const h=u,_=function(){function $e(Be,Ue){this.scroll=Be,this.domNode=Ue,h.blots.set(Ue,this),this.prev=null,this.next=null}return $e.create=function(Be){if(null==this.tagName)throw new a("Blot definition missing tagName");var Ue;return Array.isArray(this.tagName)?("string"==typeof Be&&(Be=Be.toUpperCase(),parseInt(Be,10).toString()===Be&&(Be=parseInt(Be,10))),Ue="number"==typeof Be?document.createElement(this.tagName[Be-1]):this.tagName.indexOf(Be)>-1?document.createElement(Be):document.createElement(this.tagName[0])):Ue=document.createElement(this.tagName),this.className&&Ue.classList.add(this.className),Ue},Object.defineProperty($e.prototype,"statics",{get:function(){return this.constructor},enumerable:!1,configurable:!0}),$e.prototype.attach=function(){},$e.prototype.clone=function(){var Be=this.domNode.cloneNode(!1);return this.scroll.create(Be)},$e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),h.blots.delete(this.domNode)},$e.prototype.deleteAt=function(Be,Ue){this.isolate(Be,Ue).remove()},$e.prototype.formatAt=function(Be,Ue,ot,st){var et=this.isolate(Be,Ue);if(null!=this.scroll.query(ot,T.BLOT)&&st)et.wrap(ot,st);else if(null!=this.scroll.query(ot,T.ATTRIBUTE)){var Ke=this.scroll.create(this.statics.scope);et.wrap(Ke),Ke.format(ot,st)}},$e.prototype.insertAt=function(Be,Ue,ot){var st=null==ot?this.scroll.create("text",Ue):this.scroll.create(Ue,ot),et=this.split(Be);this.parent.insertBefore(st,et||void 0)},$e.prototype.isolate=function(Be,Ue){var ot=this.split(Be);if(null==ot)throw new Error("Attempt to isolate at end");return ot.split(Ue),ot},$e.prototype.length=function(){return 1},$e.prototype.offset=function(Be){return void 0===Be&&(Be=this.parent),null==this.parent||this===Be?0:this.parent.children.offset(this)+this.parent.offset(Be)},$e.prototype.optimize=function(Be){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)},$e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},$e.prototype.replaceWith=function(Be,Ue){var ot="string"==typeof Be?this.scroll.create(Be,Ue):Be;return null!=this.parent&&(this.parent.insertBefore(ot,this.next||void 0),this.remove()),ot},$e.prototype.split=function(Be,Ue){return 0===Be?this:this.next},$e.prototype.update=function(Be,Ue){},$e.prototype.wrap=function(Be,Ue){var ot="string"==typeof Be?this.scroll.create(Be,Ue):Be;if(null!=this.parent&&this.parent.insertBefore(ot,this.next||void 0),"function"!=typeof ot.appendChild)throw new a("Cannot wrap ".concat(Be));return ot.appendChild(this),ot},$e.blotName="abstract",$e}();var x=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();function w($e,Be){var Ue=Be.find($e);if(null==Ue)try{Ue=Be.create($e)}catch{Ue=Be.create(T.INLINE),Array.from($e.childNodes).forEach(function(st){Ue.domNode.appendChild(st)}),$e.parentNode&&$e.parentNode.replaceChild(Ue.domNode,$e),Ue.attach()}return Ue}const C=function($e){function Be(Ue,ot){var st=$e.call(this,Ue,ot)||this;return st.uiNode=null,st.build(),st}return x(Be,$e),Be.prototype.appendChild=function(Ue){this.insertBefore(Ue)},Be.prototype.attach=function(){$e.prototype.attach.call(this),this.children.forEach(function(Ue){Ue.attach()})},Be.prototype.attachUI=function(Ue){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=Ue,Be.uiClass&&this.uiNode.classList.add(Be.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)},Be.prototype.build=function(){var Ue=this;this.children=new d,Array.from(this.domNode.childNodes).filter(function(ot){return ot!==Ue.uiNode}).reverse().forEach(function(ot){try{var st=w(ot,Ue.scroll);Ue.insertBefore(st,Ue.children.head||void 0)}catch(et){if(et instanceof a)return;throw et}})},Be.prototype.deleteAt=function(Ue,ot){if(0===Ue&&ot===this.length())return this.remove();this.children.forEachAt(Ue,ot,function(st,et,Ke){st.deleteAt(et,Ke)})},Be.prototype.descendant=function(Ue,ot){void 0===ot&&(ot=0);var st=this.children.find(ot),et=st[0],Ke=st[1];return null==Ue.blotName&&Ue(et)||null!=Ue.blotName&&et instanceof Ue?[et,Ke]:et instanceof Be?et.descendant(Ue,Ke):[null,-1]},Be.prototype.descendants=function(Ue,ot,st){void 0===ot&&(ot=0),void 0===st&&(st=Number.MAX_VALUE);var et=[],Ke=st;return this.children.forEachAt(ot,st,function(Ye,Pe,Se){(null==Ue.blotName&&Ue(Ye)||null!=Ue.blotName&&Ye instanceof Ue)&&et.push(Ye),Ye instanceof Be&&(et=et.concat(Ye.descendants(Ue,Pe,Ke))),Ke-=Se}),et},Be.prototype.detach=function(){this.children.forEach(function(Ue){Ue.detach()}),$e.prototype.detach.call(this)},Be.prototype.enforceAllowedChildren=function(){var Ue=this,ot=!1;this.children.forEach(function(st){ot||Ue.statics.allowedChildren.some(function(Ke){return st instanceof Ke})||(st.statics.scope===T.BLOCK_BLOT?(null!=st.next&&Ue.splitAfter(st),null!=st.prev&&Ue.splitAfter(st.prev),st.parent.unwrap(),ot=!0):st instanceof Be?st.unwrap():st.remove())})},Be.prototype.formatAt=function(Ue,ot,st,et){this.children.forEachAt(Ue,ot,function(Ke,Ye,Pe){Ke.formatAt(Ye,Pe,st,et)})},Be.prototype.insertAt=function(Ue,ot,st){var et=this.children.find(Ue),Ke=et[0];if(Ke)Ke.insertAt(et[1],ot,st);else{var Pe=null==st?this.scroll.create("text",ot):this.scroll.create(ot,st);this.appendChild(Pe)}},Be.prototype.insertBefore=function(Ue,ot){null!=Ue.parent&&Ue.parent.children.remove(Ue);var st=null;this.children.insertBefore(Ue,ot||null),Ue.parent=this,null!=ot&&(st=ot.domNode),(this.domNode.parentNode!==Ue.domNode||this.domNode.nextSibling!==st)&&this.domNode.insertBefore(Ue.domNode,st),Ue.attach()},Be.prototype.length=function(){return this.children.reduce(function(Ue,ot){return Ue+ot.length()},0)},Be.prototype.moveChildren=function(Ue,ot){this.children.forEach(function(st){Ue.insertBefore(st,ot)})},Be.prototype.optimize=function(Ue){if($e.prototype.optimize.call(this,Ue),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){var ot=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(ot)}else this.remove()},Be.prototype.path=function(Ue,ot){void 0===ot&&(ot=!1);var st=this.children.find(Ue,ot),et=st[0],Ke=st[1],Ye=[[this,Ue]];return et instanceof Be?Ye.concat(et.path(Ke,ot)):(null!=et&&Ye.push([et,Ke]),Ye)},Be.prototype.removeChild=function(Ue){this.children.remove(Ue)},Be.prototype.replaceWith=function(Ue,ot){var st="string"==typeof Ue?this.scroll.create(Ue,ot):Ue;return st instanceof Be&&this.moveChildren(st),$e.prototype.replaceWith.call(this,st)},Be.prototype.split=function(Ue,ot){if(void 0===ot&&(ot=!1),!ot){if(0===Ue)return this;if(Ue===this.length())return this.next}var st=this.clone();return this.parent&&this.parent.insertBefore(st,this.next||void 0),this.children.forEachAt(Ue,this.length(),function(et,Ke,Ye){var Pe=et.split(Ke,ot);null!=Pe&&st.appendChild(Pe)}),st},Be.prototype.splitAfter=function(Ue){for(var ot=this.clone();null!=Ue.next;)ot.appendChild(Ue.next);return this.parent&&this.parent.insertBefore(ot,this.next||void 0),ot},Be.prototype.unwrap=function(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()},Be.prototype.update=function(Ue,ot){var st=this,et=[],Ke=[];Ue.forEach(function(Ye){Ye.target===st.domNode&&"childList"===Ye.type&&(et.push.apply(et,Ye.addedNodes),Ke.push.apply(Ke,Ye.removedNodes))}),Ke.forEach(function(Ye){if(!(null!=Ye.parentNode&&"IFRAME"!==Ye.tagName&&document.body.compareDocumentPosition(Ye)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var Pe=st.scroll.find(Ye);null!=Pe&&(null==Pe.domNode.parentNode||Pe.domNode.parentNode===st.domNode)&&Pe.detach()}}),et.filter(function(Ye){return Ye.parentNode===st.domNode||Ye===st.uiNode}).sort(function(Ye,Pe){return Ye===Pe?0:Ye.compareDocumentPosition(Pe)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(Ye){var Pe=null;null!=Ye.nextSibling&&(Pe=st.scroll.find(Ye.nextSibling));var Se=w(Ye,st.scroll);(Se.next!==Pe||null==Se.next)&&(null!=Se.parent&&Se.parent.removeChild(st),st.insertBefore(Se,Pe||void 0))}),this.enforceAllowedChildren()},Be.uiClass="",Be}(_);var I=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}(),L=function($e){function Be(){return null!==$e&&$e.apply(this,arguments)||this}return I(Be,$e),Be.prototype.checkMerge=function(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName},Be.prototype.deleteAt=function(Ue,ot){$e.prototype.deleteAt.call(this,Ue,ot),this.enforceAllowedChildren()},Be.prototype.formatAt=function(Ue,ot,st,et){$e.prototype.formatAt.call(this,Ue,ot,st,et),this.enforceAllowedChildren()},Be.prototype.insertAt=function(Ue,ot,st){$e.prototype.insertAt.call(this,Ue,ot,st),this.enforceAllowedChildren()},Be.prototype.optimize=function(Ue){$e.prototype.optimize.call(this,Ue),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())},Be.blotName="container",Be.scope=T.BLOCK_BLOT,Be}(C);const N=L;var G=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}(),k=function($e){function Be(){return null!==$e&&$e.apply(this,arguments)||this}return G(Be,$e),Be.value=function(Ue){return!0},Be.prototype.index=function(Ue,ot){return this.domNode===Ue||this.domNode.compareDocumentPosition(Ue)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(ot,1):-1},Be.prototype.position=function(Ue,ot){var et=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return Ue>0&&(et+=1),[this.parent.domNode,et]},Be.prototype.value=function(){var Ue;return(Ue={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,Ue},Be.scope=T.INLINE_BLOT,Be}(_);const U=k,K=function(){function $e(Be,Ue,ot){void 0===ot&&(ot={}),this.attrName=Be,this.keyName=Ue,this.scope=null!=ot.scope?ot.scope&T.LEVEL|T.TYPE&T.ATTRIBUTE:T.ATTRIBUTE,null!=ot.whitelist&&(this.whitelist=ot.whitelist)}return $e.keys=function(Be){return Array.from(Be.attributes).map(function(Ue){return Ue.name})},$e.prototype.add=function(Be,Ue){return!!this.canAdd(Be,Ue)&&(Be.setAttribute(this.keyName,Ue),!0)},$e.prototype.canAdd=function(Be,Ue){return null==this.whitelist||("string"==typeof Ue?this.whitelist.indexOf(Ue.replace(/["']/g,""))>-1:this.whitelist.indexOf(Ue)>-1)},$e.prototype.remove=function(Be){Be.removeAttribute(this.keyName)},$e.prototype.value=function(Be){var Ue=Be.getAttribute(this.keyName);return this.canAdd(Be,Ue)&&Ue?Ue:""},$e}();var J=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();function ie($e,Be){return($e.getAttribute("class")||"").split(/\s+/).filter(function(ot){return 0===ot.indexOf("".concat(Be,"-"))})}var re=function($e){function Be(){return null!==$e&&$e.apply(this,arguments)||this}return J(Be,$e),Be.keys=function(Ue){return(Ue.getAttribute("class")||"").split(/\s+/).map(function(ot){return ot.split("-").slice(0,-1).join("-")})},Be.prototype.add=function(Ue,ot){return!!this.canAdd(Ue,ot)&&(this.remove(Ue),Ue.classList.add("".concat(this.keyName,"-").concat(ot)),!0)},Be.prototype.remove=function(Ue){ie(Ue,this.keyName).forEach(function(st){Ue.classList.remove(st)}),0===Ue.classList.length&&Ue.removeAttribute("class")},Be.prototype.value=function(Ue){var st=(ie(Ue,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(Ue,st)?st:""},Be}(K);const q=re;var Y=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();function Z($e){var Be=$e.split("-"),Ue=Be.slice(1).map(function(ot){return ot[0].toUpperCase()+ot.slice(1)}).join("");return Be[0]+Ue}var Q=function($e){function Be(){return null!==$e&&$e.apply(this,arguments)||this}return Y(Be,$e),Be.keys=function(Ue){return(Ue.getAttribute("style")||"").split(";").map(function(ot){return ot.split(":")[0].trim()})},Be.prototype.add=function(Ue,ot){return!!this.canAdd(Ue,ot)&&(Ue.style[Z(this.keyName)]=ot,!0)},Be.prototype.remove=function(Ue){Ue.style[Z(this.keyName)]="",Ue.getAttribute("style")||Ue.removeAttribute("style")},Be.prototype.value=function(Ue){var ot=Ue.style[Z(this.keyName)];return this.canAdd(Ue,ot)?ot:""},Be}(K);const te=Q,z=function(){function $e(Be){this.attributes={},this.domNode=Be,this.build()}return $e.prototype.attribute=function(Be,Ue){Ue?Be.add(this.domNode,Ue)&&(null!=Be.value(this.domNode)?this.attributes[Be.attrName]=Be:delete this.attributes[Be.attrName]):(Be.remove(this.domNode),delete this.attributes[Be.attrName])},$e.prototype.build=function(){var Be=this;this.attributes={};var Ue=h.find(this.domNode);if(null!=Ue){var ot=K.keys(this.domNode),st=q.keys(this.domNode),et=te.keys(this.domNode);ot.concat(st).concat(et).forEach(function(Ke){var Ye=Ue.scroll.query(Ke,T.ATTRIBUTE);Ye instanceof K&&(Be.attributes[Ye.attrName]=Ye)})}},$e.prototype.copy=function(Be){var Ue=this;Object.keys(this.attributes).forEach(function(ot){var st=Ue.attributes[ot].value(Ue.domNode);Be.format(ot,st)})},$e.prototype.move=function(Be){var Ue=this;this.copy(Be),Object.keys(this.attributes).forEach(function(ot){Ue.attributes[ot].remove(Ue.domNode)}),this.attributes={}},$e.prototype.values=function(){var Be=this;return Object.keys(this.attributes).reduce(function(Ue,ot){return Ue[ot]=Be.attributes[ot].value(Be.domNode),Ue},{})},$e}();var oe=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();const he=function($e){function Be(Ue,ot){var st=$e.call(this,Ue,ot)||this;return st.attributes=new z(st.domNode),st}return oe(Be,$e),Be.formats=function(Ue,ot){var st=ot.query(Be.blotName);if(null==st||Ue.tagName!==st.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return Ue.tagName.toLowerCase()}},Be.prototype.format=function(Ue,ot){var st=this;if(Ue!==this.statics.blotName||ot){var et=this.scroll.query(Ue,T.INLINE);if(null==et)return;et instanceof K?this.attributes.attribute(et,ot):ot&&(Ue!==this.statics.blotName||this.formats()[Ue]!==ot)&&this.replaceWith(Ue,ot)}else this.children.forEach(function(Ke){Ke instanceof Be||(Ke=Ke.wrap(Be.blotName,!0)),st.attributes.copy(Ke)}),this.unwrap()},Be.prototype.formats=function(){var Ue=this.attributes.values(),ot=this.statics.formats(this.domNode,this.scroll);return null!=ot&&(Ue[this.statics.blotName]=ot),Ue},Be.prototype.formatAt=function(Ue,ot,st,et){null!=this.formats()[st]||this.scroll.query(st,T.ATTRIBUTE)?this.isolate(Ue,ot).format(st,et):$e.prototype.formatAt.call(this,Ue,ot,st,et)},Be.prototype.optimize=function(Ue){$e.prototype.optimize.call(this,Ue);var ot=this.formats();if(0===Object.keys(ot).length)return this.unwrap();var st=this.next;st instanceof Be&&st.prev===this&&function ae($e,Be){if(Object.keys($e).length!==Object.keys(Be).length)return!1;for(var Ue in $e)if($e[Ue]!==Be[Ue])return!1;return!0}(ot,st.formats())&&(st.moveChildren(this),st.remove())},Be.prototype.replaceWith=function(Ue,ot){var st=$e.prototype.replaceWith.call(this,Ue,ot);return this.attributes.copy(st),st},Be.prototype.update=function(Ue,ot){var st=this;$e.prototype.update.call(this,Ue,ot),Ue.some(function(Ke){return Ke.target===st.domNode&&"attributes"===Ke.type})&&this.attributes.build()},Be.prototype.wrap=function(Ue,ot){var st=$e.prototype.wrap.call(this,Ue,ot);return st instanceof Be&&this.attributes.move(st),st},Be.allowedChildren=[Be,U],Be.blotName="inline",Be.scope=T.INLINE_BLOT,Be.tagName="SPAN",Be}(C);var de=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();const be=function($e){function Be(Ue,ot){var st=$e.call(this,Ue,ot)||this;return st.attributes=new z(st.domNode),st}return de(Be,$e),Be.formats=function(Ue,ot){var st=ot.query(Be.blotName);if(null==st||Ue.tagName!==st.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return Ue.tagName.toLowerCase()}},Be.prototype.format=function(Ue,ot){var st=this.scroll.query(Ue,T.BLOCK);null!=st&&(st instanceof K?this.attributes.attribute(st,ot):Ue!==this.statics.blotName||ot?ot&&(Ue!==this.statics.blotName||this.formats()[Ue]!==ot)&&this.replaceWith(Ue,ot):this.replaceWith(Be.blotName))},Be.prototype.formats=function(){var Ue=this.attributes.values(),ot=this.statics.formats(this.domNode,this.scroll);return null!=ot&&(Ue[this.statics.blotName]=ot),Ue},Be.prototype.formatAt=function(Ue,ot,st,et){null!=this.scroll.query(st,T.BLOCK)?this.format(st,et):$e.prototype.formatAt.call(this,Ue,ot,st,et)},Be.prototype.insertAt=function(Ue,ot,st){if(null==st||null!=this.scroll.query(ot,T.INLINE))$e.prototype.insertAt.call(this,Ue,ot,st);else{var et=this.split(Ue);if(null==et)throw new Error("Attempt to insertAt after block boundaries");var Ke=this.scroll.create(ot,st);et.parent.insertBefore(Ke,et)}},Be.prototype.replaceWith=function(Ue,ot){var st=$e.prototype.replaceWith.call(this,Ue,ot);return this.attributes.copy(st),st},Be.prototype.update=function(Ue,ot){var st=this;$e.prototype.update.call(this,Ue,ot),Ue.some(function(Ke){return Ke.target===st.domNode&&"attributes"===Ke.type})&&this.attributes.build()},Be.blotName="block",Be.scope=T.BLOCK_BLOT,Be.tagName="P",Be.allowedChildren=[he,Be,U],Be}(C);var ve=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}(),le=function($e){function Be(){return null!==$e&&$e.apply(this,arguments)||this}return ve(Be,$e),Be.formats=function(Ue,ot){},Be.prototype.format=function(Ue,ot){$e.prototype.formatAt.call(this,0,this.length(),Ue,ot)},Be.prototype.formatAt=function(Ue,ot,st,et){0===Ue&&ot===this.length()?this.format(st,et):$e.prototype.formatAt.call(this,Ue,ot,st,et)},Be.prototype.formats=function(){return this.statics.formats(this.domNode,this.scroll)},Be}(U);const Ce=le;var ye=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}(),ge={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},xe=function($e){function Be(Ue,ot){var st=$e.call(this,null,ot)||this;return st.registry=Ue,st.scroll=st,st.build(),st.observer=new MutationObserver(function(et){st.update(et)}),st.observer.observe(st.domNode,ge),st.attach(),st}return ye(Be,$e),Be.prototype.create=function(Ue,ot){return this.registry.create(this,Ue,ot)},Be.prototype.find=function(Ue,ot){void 0===ot&&(ot=!1);var st=this.registry.find(Ue,ot);return st?st.scroll===this?st:ot?this.find(st.scroll.domNode.parentNode,!0):null:null},Be.prototype.query=function(Ue,ot){return void 0===ot&&(ot=T.ANY),this.registry.query(Ue,ot)},Be.prototype.register=function(){for(var Ue,ot=[],st=0;st<arguments.length;st++)ot[st]=arguments[st];return(Ue=this.registry).register.apply(Ue,ot)},Be.prototype.build=function(){null!=this.scroll&&$e.prototype.build.call(this)},Be.prototype.detach=function(){$e.prototype.detach.call(this),this.observer.disconnect()},Be.prototype.deleteAt=function(Ue,ot){this.update(),0===Ue&&ot===this.length()?this.children.forEach(function(st){st.remove()}):$e.prototype.deleteAt.call(this,Ue,ot)},Be.prototype.formatAt=function(Ue,ot,st,et){this.update(),$e.prototype.formatAt.call(this,Ue,ot,st,et)},Be.prototype.insertAt=function(Ue,ot,st){this.update(),$e.prototype.insertAt.call(this,Ue,ot,st)},Be.prototype.optimize=function(Ue,ot){var st=this;void 0===Ue&&(Ue=[]),void 0===ot&&(ot={}),$e.prototype.optimize.call(this,ot);for(var et=ot.mutationsMap||new WeakMap,Ke=Array.from(this.observer.takeRecords());Ke.length>0;)Ue.push(Ke.pop());for(var Ye=function Fe(Xe,tt){void 0===tt&&(tt=!0),null!=Xe&&Xe!==st&&null!=Xe.domNode.parentNode&&(et.has(Xe.domNode)||et.set(Xe.domNode,[]),tt&&Fe(Xe.parent))},Pe=function Fe(Xe){et.has(Xe.domNode)&&(Xe instanceof C&&Xe.children.forEach(Fe),et.delete(Xe.domNode),Xe.optimize(ot))},Se=Ue,Re=0;Se.length>0;Re+=1){if(Re>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(Se.forEach(function(Fe){var Xe=st.find(Fe.target,!0);null!=Xe&&(Xe.domNode===Fe.target&&("childList"===Fe.type?(Ye(st.find(Fe.previousSibling,!1)),Array.from(Fe.addedNodes).forEach(function(tt){var vt=st.find(tt,!1);Ye(vt,!1),vt instanceof C&&vt.children.forEach(function(qe){Ye(qe,!1)})})):"attributes"===Fe.type&&Ye(Xe.prev)),Ye(Xe))}),this.children.forEach(Pe),Ke=(Se=Array.from(this.observer.takeRecords())).slice();Ke.length>0;)Ue.push(Ke.pop())}},Be.prototype.update=function(Ue,ot){var st=this;void 0===ot&&(ot={}),Ue=Ue||this.observer.takeRecords();var et=new WeakMap;Ue.map(function(Ke){var Ye=st.find(Ke.target,!0);return null==Ye?null:et.has(Ye.domNode)?(et.get(Ye.domNode).push(Ke),null):(et.set(Ye.domNode,[Ke]),Ye)}).forEach(function(Ke){null!=Ke&&Ke!==st&&et.has(Ke.domNode)&&Ke.update(et.get(Ke.domNode)||[],ot)}),ot.mutationsMap=et,et.has(this.domNode)&&$e.prototype.update.call(this,et.get(this.domNode),ot),this.optimize(Ue,ot)},Be.blotName="scroll",Be.defaultChild=be,Be.allowedChildren=[be,N],Be.scope=T.BLOCK_BLOT,Be.tagName="DIV",Be}(C);const Te=xe;var Ee=function(){var $e=function(Ue,ot){return($e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(st,et){st.__proto__=et}||function(st,et){for(var Ke in et)Object.prototype.hasOwnProperty.call(et,Ke)&&(st[Ke]=et[Ke])})(Ue,ot)};return function(Be,Ue){if("function"!=typeof Ue&&null!==Ue)throw new TypeError("Class extends value "+String(Ue)+" is not a constructor or null");function ot(){this.constructor=Be}$e(Be,Ue),Be.prototype=null===Ue?Object.create(Ue):(ot.prototype=Ue.prototype,new ot)}}();const ze=function($e){function Be(Ue,ot){var st=$e.call(this,Ue,ot)||this;return st.text=st.statics.value(st.domNode),st}return Ee(Be,$e),Be.create=function(Ue){return document.createTextNode(Ue)},Be.value=function(Ue){return Ue.data},Be.prototype.deleteAt=function(Ue,ot){this.domNode.data=this.text=this.text.slice(0,Ue)+this.text.slice(Ue+ot)},Be.prototype.index=function(Ue,ot){return this.domNode===Ue?ot:-1},Be.prototype.insertAt=function(Ue,ot,st){null==st?(this.text=this.text.slice(0,Ue)+ot+this.text.slice(Ue),this.domNode.data=this.text):$e.prototype.insertAt.call(this,Ue,ot,st)},Be.prototype.length=function(){return this.text.length},Be.prototype.optimize=function(Ue){$e.prototype.optimize.call(this,Ue),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof Be&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},Be.prototype.position=function(Ue,ot){return void 0===ot&&(ot=!1),[this.domNode,Ue]},Be.prototype.split=function(Ue,ot){if(void 0===ot&&(ot=!1),!ot){if(0===Ue)return this;if(Ue===this.length())return this.next}var st=this.scroll.create(this.domNode.splitText(Ue));return this.parent.insertBefore(st,this.next||void 0),this.text=this.statics.value(this.domNode),st},Be.prototype.update=function(Ue,ot){var st=this;Ue.some(function(et){return"characterData"===et.type&&et.target===st.domNode})&&(this.text=this.statics.value(this.domNode))},Be.prototype.value=function(){return this.text},Be.blotName="text",Be.scope=T.INLINE_BLOT,Be}(U)},3034:function(P,b){"use strict";var f=Object.prototype.hasOwnProperty,S="~";function T(){}function y(a,u,h){this.fn=a,this.context=u,this.once=h||!1}function d(a,u,h,g,_){if("function"!=typeof h)throw new TypeError("The listener must be a function");var x=new y(h,g||a,_),w=S?S+u:u;return a._events[w]?a._events[w].fn?a._events[w]=[a._events[w],x]:a._events[w].push(x):(a._events[w]=x,a._eventsCount++),a}function c(a,u){0==--a._eventsCount?a._events=new T:delete a._events[u]}function s(){this._events=new T,this._eventsCount=0}Object.create&&(T.prototype=Object.create(null),(new T).__proto__||(S=!1)),s.prototype.eventNames=function(){var h,g,u=[];if(0===this._eventsCount)return u;for(g in h=this._events)f.call(h,g)&&u.push(S?g.slice(1):g);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},s.prototype.listeners=function(u){var g=this._events[S?S+u:u];if(!g)return[];if(g.fn)return[g.fn];for(var _=0,x=g.length,w=new Array(x);_<x;_++)w[_]=g[_].fn;return w},s.prototype.listenerCount=function(u){var g=this._events[S?S+u:u];return g?g.fn?1:g.length:0},s.prototype.emit=function(u,h,g,_,x,w){var D=S?S+u:u;if(!this._events[D])return!1;var L,N,C=this._events[D],I=arguments.length;if(C.fn){switch(C.once&&this.removeListener(u,C.fn,void 0,!0),I){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,h),!0;case 3:return C.fn.call(C.context,h,g),!0;case 4:return C.fn.call(C.context,h,g,_),!0;case 5:return C.fn.call(C.context,h,g,_,x),!0;case 6:return C.fn.call(C.context,h,g,_,x,w),!0}for(N=1,L=new Array(I-1);N<I;N++)L[N-1]=arguments[N];C.fn.apply(C.context,L)}else{var k,G=C.length;for(N=0;N<G;N++)switch(C[N].once&&this.removeListener(u,C[N].fn,void 0,!0),I){case 1:C[N].fn.call(C[N].context);break;case 2:C[N].fn.call(C[N].context,h);break;case 3:C[N].fn.call(C[N].context,h,g);break;case 4:C[N].fn.call(C[N].context,h,g,_);break;default:if(!L)for(k=1,L=new Array(I-1);k<I;k++)L[k-1]=arguments[k];C[N].fn.apply(C[N].context,L)}}return!0},s.prototype.on=function(u,h,g){return d(this,u,h,g,!1)},s.prototype.once=function(u,h,g){return d(this,u,h,g,!0)},s.prototype.removeListener=function(u,h,g,_){var x=S?S+u:u;if(!this._events[x])return this;if(!h)return c(this,x),this;var w=this._events[x];if(w.fn)w.fn===h&&(!_||w.once)&&(!g||w.context===g)&&c(this,x);else{for(var D=0,C=[],I=w.length;D<I;D++)(w[D].fn!==h||_&&!w[D].once||g&&w[D].context!==g)&&C.push(w[D]);C.length?this._events[x]=1===C.length?C[0]:C:c(this,x)}return this},s.prototype.removeAllListeners=function(u){var h;return u?this._events[h=S?S+u:u]&&c(this,h):(this._events=new T,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=S,s.EventEmitter=s,typeof P<"u"&&(P.exports=s)},1456:P=>{var b=-1,f=1,S=0;function T(N,G,k,U){if(N===G)return N?[[S,N]]:[];if(null!=k){var B=function I(N,G,k){var U="number"==typeof k?{index:k,length:0}:k.oldRange,B="number"==typeof k?null:k.newRange,K=N.length,J=G.length;if(0===U.length&&(null===B||0===B.length)){var ie=U.index,re=N.slice(0,ie),q=N.slice(ie),Y=B?B.index:null,Z=ie+J-K;if(!(null!==Y&&Y!==Z||Z<0||Z>J)){var Q=G.slice(0,Z);if((te=G.slice(Z))===q){var pe=Math.min(ie,Z);if((z=re.slice(0,pe))===(oe=Q.slice(0,pe)))return C(z,re.slice(pe),Q.slice(pe),q)}}if(null===Y||Y===ie){var he=ie,te=(Q=G.slice(0,he),G.slice(he));if(Q===re){var de=Math.min(K-he,J-he);if((ue=q.slice(q.length-de))===(be=te.slice(te.length-de)))return C(re,q.slice(0,q.length-de),te.slice(0,te.length-de),ue)}}}if(U.length>0&&B&&0===B.length){var z=N.slice(0,U.index),ue=N.slice(U.index+U.length);if(!(J<(pe=z.length)+(de=ue.length))){var oe=G.slice(0,pe),be=G.slice(J-de);if(z===oe&&ue===be)return C(z,N.slice(pe,K-de),G.slice(pe,J-de),ue)}}return null}(N,G,k);if(B)return B}var K=s(N,G),J=N.substring(0,K);K=a(N=N.substring(K),G=G.substring(K));var ie=N.substring(N.length-K),re=function y(N,G){var k;if(!N)return[[f,G]];if(!G)return[[b,N]];var U=N.length>G.length?N:G,B=N.length>G.length?G:N,K=U.indexOf(B);if(-1!==K)return k=[[f,U.substring(0,K)],[S,B],[f,U.substring(K+B.length)]],N.length>G.length&&(k[0][0]=k[2][0]=b),k;if(1===B.length)return[[b,N],[f,G]];var J=function u(N,G){var k=N.length>G.length?N:G,U=N.length>G.length?G:N;if(k.length<4||2*U.length<k.length)return null;function B(te,pe,z){for(var he,de,ue,be,oe=te.substring(z,z+Math.floor(te.length/4)),ae=-1,ee="";-1!==(ae=pe.indexOf(oe,ae+1));){var ve=s(te.substring(z),pe.substring(ae)),le=a(te.substring(0,z),pe.substring(0,ae));ee.length<le+ve&&(ee=pe.substring(ae-le,ae)+pe.substring(ae,ae+ve),he=te.substring(0,z-le),de=te.substring(z+ve),ue=pe.substring(0,ae-le),be=pe.substring(ae+ve))}return 2*ee.length>=te.length?[he,de,ue,be,ee]:null}var ie,re,q,Y,Z,K=B(k,U,Math.ceil(k.length/4)),J=B(k,U,Math.ceil(k.length/2));return K||J?(ie=J?K&&K[4].length>J[4].length?K:J:K,N.length>G.length?(re=ie[0],q=ie[1],Y=ie[2],Z=ie[3]):(Y=ie[0],Z=ie[1],re=ie[2],q=ie[3]),[re,q,Y,Z,ie[4]]):null}(N,G);if(J){var re=J[1],Y=J[3],Z=J[4],Q=T(J[0],J[2]),te=T(re,Y);return Q.concat([[S,Z]],te)}return function d(N,G){for(var k=N.length,U=G.length,B=Math.ceil((k+U)/2),K=B,J=2*B,ie=new Array(J),re=new Array(J),q=0;q<J;q++)ie[q]=-1,re[q]=-1;ie[K+1]=0,re[K+1]=0;for(var Y=k-U,Z=Y%2!=0,Q=0,te=0,pe=0,z=0,oe=0;oe<B;oe++){for(var ae=-oe+Q;ae<=oe-te;ae+=2){for(var ee=K+ae,de=(he=ae===-oe||ae!==oe&&ie[ee-1]<ie[ee+1]?ie[ee+1]:ie[ee-1]+1)-ae;he<k&&de<U&&N.charAt(he)===G.charAt(de);)he++,de++;if(ie[ee]=he,he>k)te+=2;else if(de>U)Q+=2;else if(Z&&(ue=K+Y-ae)>=0&&ue<J&&-1!==re[ue]&&he>=(be=k-re[ue]))return c(N,G,he,de)}for(var ve=-oe+pe;ve<=oe-z;ve+=2){for(var be,ue=K+ve,le=(be=ve===-oe||ve!==oe&&re[ue-1]<re[ue+1]?re[ue+1]:re[ue-1]+1)-ve;be<k&&le<U&&N.charAt(k-be-1)===G.charAt(U-le-1);)be++,le++;if(re[ue]=be,be>k)z+=2;else if(le>U)pe+=2;else if(!Z){var he;if((ee=K+Y-ve)>=0&&ee<J&&-1!==ie[ee]&&(de=K+(he=ie[ee])-ee,he>=(be=k-be)))return c(N,G,he,de)}}}return[[b,N],[f,G]]}(N,G)}(N=N.substring(0,N.length-K),G=G.substring(0,G.length-K));return J&&re.unshift([S,J]),ie&&re.push([S,ie]),h(re,U),re}function c(N,G,k,U){var B=N.substring(0,k),K=G.substring(0,U),J=N.substring(k),ie=G.substring(U),re=T(B,K),q=T(J,ie);return re.concat(q)}function s(N,G){if(!N||!G||N.charAt(0)!==G.charAt(0))return 0;for(var k=0,U=Math.min(N.length,G.length),B=U,K=0;k<B;)N.substring(K,B)==G.substring(K,B)?K=k=B:U=B,B=Math.floor((U-k)/2+k);return g(N.charCodeAt(B-1))&&B--,B}function a(N,G){if(!N||!G||N.slice(-1)!==G.slice(-1))return 0;for(var k=0,U=Math.min(N.length,G.length),B=U,K=0;k<B;)N.substring(N.length-B,N.length-K)==G.substring(G.length-B,G.length-K)?K=k=B:U=B,B=Math.floor((U-k)/2+k);return _(N.charCodeAt(N.length-B))&&B--,B}function h(N,G){N.push([S,""]);for(var ie,k=0,U=0,B=0,K="",J="";k<N.length;)if(k<N.length-1&&!N[k][1])N.splice(k,1);else switch(N[k][0]){case f:B++,J+=N[k][1],k++;break;case b:U++,K+=N[k][1],k++;break;case S:var re=k-B-U-1;if(G){if(re>=0&&w(N[re][1])){var q=N[re][1].slice(-1);if(N[re][1]=N[re][1].slice(0,-1),K=q+K,J=q+J,!N[re][1]){N.splice(re,1),k--;var Y=re-1;N[Y]&&N[Y][0]===f&&(B++,J=N[Y][1]+J,Y--),N[Y]&&N[Y][0]===b&&(U++,K=N[Y][1]+K,Y--),re=Y}}x(N[k][1])&&(q=N[k][1].charAt(0),N[k][1]=N[k][1].slice(1),K+=q,J+=q)}if(k<N.length-1&&!N[k][1]){N.splice(k,1);break}if(K.length>0||J.length>0){K.length>0&&J.length>0&&(0!==(ie=s(J,K))&&(re>=0?N[re][1]+=J.substring(0,ie):(N.splice(0,0,[S,J.substring(0,ie)]),k++),J=J.substring(ie),K=K.substring(ie)),0!==(ie=a(J,K))&&(N[k][1]=J.substring(J.length-ie)+N[k][1],J=J.substring(0,J.length-ie),K=K.substring(0,K.length-ie)));var Z=B+U;0===K.length&&0===J.length?(N.splice(k-Z,Z),k-=Z):0===K.length?(N.splice(k-Z,Z,[f,J]),k=k-Z+1):0===J.length?(N.splice(k-Z,Z,[b,K]),k=k-Z+1):(N.splice(k-Z,Z,[b,K],[f,J]),k=k-Z+2)}0!==k&&N[k-1][0]===S?(N[k-1][1]+=N[k][1],N.splice(k,1)):k++,B=0,U=0,K="",J=""}""===N[N.length-1][1]&&N.pop();var Q=!1;for(k=1;k<N.length-1;)N[k-1][0]===S&&N[k+1][0]===S&&(N[k][1].substring(N[k][1].length-N[k-1][1].length)===N[k-1][1]?(N[k][1]=N[k-1][1]+N[k][1].substring(0,N[k][1].length-N[k-1][1].length),N[k+1][1]=N[k-1][1]+N[k+1][1],N.splice(k-1,1),Q=!0):N[k][1].substring(0,N[k+1][1].length)==N[k+1][1]&&(N[k-1][1]+=N[k+1][1],N[k][1]=N[k][1].substring(N[k+1][1].length)+N[k+1][1],N.splice(k+1,1),Q=!0)),k++;Q&&h(N,G)}function g(N){return N>=55296&&N<=56319}function _(N){return N>=56320&&N<=57343}function x(N){return _(N.charCodeAt(0))}function w(N){return g(N.charCodeAt(N.length-1))}function C(N,G,k,U){return w(N)||x(U)?null:function D(N){for(var G=[],k=0;k<N.length;k++)N[k][1].length>0&&G.push(N[k]);return G}([[S,N],[b,G],[f,k],[S,U]])}function L(N,G,k){return T(N,G,k,!0)}L.INSERT=f,L.DELETE=b,L.EQUAL=S,P.exports=L},8805:(P,b,f)=>{P=f.nmd(P);var T="__lodash_hash_undefined__",y=9007199254740991,d="[object Arguments]",s="[object Boolean]",a="[object Date]",h="[object Function]",g="[object GeneratorFunction]",_="[object Map]",x="[object Number]",w="[object Object]",D="[object Promise]",C="[object RegExp]",I="[object Set]",L="[object String]",N="[object Symbol]",G="[object WeakMap]",k="[object ArrayBuffer]",U="[object DataView]",B="[object Float32Array]",K="[object Float64Array]",J="[object Int8Array]",ie="[object Int16Array]",re="[object Int32Array]",q="[object Uint8Array]",Y="[object Uint8ClampedArray]",Z="[object Uint16Array]",Q="[object Uint32Array]",pe=/\w*$/,z=/^\[object .+?Constructor\]$/,oe=/^(?:0|[1-9]\d*)$/,ae={};ae[d]=ae["[object Array]"]=ae[k]=ae[U]=ae[s]=ae[a]=ae[B]=ae[K]=ae[J]=ae[ie]=ae[re]=ae[_]=ae[x]=ae[w]=ae[C]=ae[I]=ae[L]=ae[N]=ae[q]=ae[Y]=ae[Z]=ae[Q]=!0,ae["[object Error]"]=ae[h]=ae[G]=!1;var he="object"==typeof self&&self&&self.Object===Object&&self,de="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g||he||Function("return this")(),ue=b&&!b.nodeType&&b,be=ue&&P&&!P.nodeType&&P,ve=be&&be.exports===ue;function le(bt,gn){return bt.set(gn[0],gn[1]),bt}function Ce(bt,gn){return bt.add(gn),bt}function fe(bt,gn,Kt,Mn){var _i=-1,Qi=bt?bt.length:0;for(Mn&&Qi&&(Kt=bt[++_i]);++_i<Qi;)Kt=gn(Kt,bt[_i],_i,bt);return Kt}function Ee(bt){var gn=!1;if(null!=bt&&"function"!=typeof bt.toString)try{gn=!!(bt+"")}catch{}return gn}function Oe(bt){var gn=-1,Kt=Array(bt.size);return bt.forEach(function(Mn,_i){Kt[++gn]=[_i,Mn]}),Kt}function ze(bt,gn){return function(Kt){return bt(gn(Kt))}}function $e(bt){var gn=-1,Kt=Array(bt.size);return bt.forEach(function(Mn){Kt[++gn]=Mn}),Kt}var bt,Be=Array.prototype,Ue=Function.prototype,ot=Object.prototype,st=de["__core-js_shared__"],et=(bt=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+bt:"",Ke=Ue.toString,Ye=ot.hasOwnProperty,Pe=ot.toString,Se=RegExp("^"+Ke.call(Ye).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=ve?de.Buffer:void 0,Fe=de.Symbol,Xe=de.Uint8Array,tt=ze(Object.getPrototypeOf,Object),vt=Object.create,qe=ot.propertyIsEnumerable,At=Be.splice,Tt=Object.getOwnPropertySymbols,qt=Re?Re.isBuffer:void 0,wt=ze(Object.keys,Object),En=ko(de,"DataView"),ri=ko(de,"Map"),Tn=ko(de,"Promise"),Jn=ko(de,"Set"),wi=ko(de,"WeakMap"),Bn=ko(Object,"create"),gi=Wt(En),Ai=Wt(ri),pt=Wt(Tn),Dt=Wt(Jn),cn=Wt(wi),dt=Fe?Fe.prototype:void 0,Et=dt?dt.valueOf:void 0;function hn(bt){var gn=-1,Kt=bt?bt.length:0;for(this.clear();++gn<Kt;){var Mn=bt[gn];this.set(Mn[0],Mn[1])}}function sn(bt){var gn=-1,Kt=bt?bt.length:0;for(this.clear();++gn<Kt;){var Mn=bt[gn];this.set(Mn[0],Mn[1])}}function ci(bt){var gn=-1,Kt=bt?bt.length:0;for(this.clear();++gn<Kt;){var Mn=bt[gn];this.set(Mn[0],Mn[1])}}function rn(bt){this.__data__=new sn(bt)}function Hn(bt,gn,Kt){var Mn=bt[gn];(!Ye.call(bt,gn)||!mi(Mn,Kt)||void 0===Kt&&!(gn in bt))&&(bt[gn]=Kt)}function ui(bt,gn){for(var Kt=bt.length;Kt--;)if(mi(bt[Kt][0],gn))return Kt;return-1}function ao(bt,gn,Kt,Mn,_i,Qi,Co){var $o;if(Mn&&($o=Qi?Mn(bt,_i,Qi,Co):Mn(bt)),void 0!==$o)return $o;if(!bn(bt))return bt;var sr=go(bt);if(sr){if($o=function Jr(bt){var gn=bt.length,Kt=bt.constructor(gn);return gn&&"string"==typeof bt[0]&&Ye.call(bt,"index")&&(Kt.index=bt.index,Kt.input=bt.input),Kt}(bt),!gn)return function Gr(bt,gn){var Kt=-1,Mn=bt.length;for(gn||(gn=Array(Mn));++Kt<Mn;)gn[Kt]=bt[Kt];return gn}(bt,$o)}else{var lr=or(bt),rr=lr==h||lr==g;if(pr(bt))return function Rt(bt,gn){if(gn)return bt.slice();var Kt=new bt.constructor(bt.length);return bt.copy(Kt),Kt}(bt,gn);if(lr==w||lr==d||rr&&!Qi){if(Ee(bt))return Qi?bt:{};if($o=function Wr(bt){return"function"!=typeof bt.constructor||_n(bt)?{}:function Wi(bt){return bn(bt)?vt(bt):{}}(tt(bt))}(rr?{}:bt),!gn)return function ei(bt,gn){return Yn(bt,er(bt),gn)}(bt,function bi(bt,gn){return bt&&Yn(gn,Ci(gn),bt)}($o,bt))}else{if(!ae[lr])return Qi?bt:{};$o=function Xr(bt,gn,Kt,Mn){var _i=bt.constructor;switch(gn){case k:return mn(bt);case s:case a:return new _i(+bt);case U:return function pi(bt,gn){var Kt=gn?mn(bt.buffer):bt.buffer;return new bt.constructor(Kt,bt.byteOffset,bt.byteLength)}(bt,Mn);case B:case K:case J:case ie:case re:case q:case Y:case Z:case Q:return function fr(bt,gn){var Kt=gn?mn(bt.buffer):bt.buffer;return new bt.constructor(Kt,bt.byteOffset,bt.length)}(bt,Mn);case _:return function Ti(bt,gn,Kt){return fe(gn?Kt(Oe(bt),!0):Oe(bt),le,new bt.constructor)}(bt,Mn,Kt);case x:case L:return new _i(bt);case C:return function lo(bt){var gn=new bt.constructor(bt.source,pe.exec(bt));return gn.lastIndex=bt.lastIndex,gn}(bt);case I:return function Eo(bt,gn,Kt){return fe(gn?Kt($e(bt),!0):$e(bt),Ce,new bt.constructor)}(bt,Mn,Kt);case N:return function Jo(bt){return Et?Object(Et.call(bt)):{}}(bt)}}(bt,lr,ao,gn)}}Co||(Co=new rn);var Pr=Co.get(bt);if(Pr)return Pr;if(Co.set(bt,$o),!sr)var wr=Kt?function Ii(bt){return function Ko(bt,gn,Kt){var Mn=gn(bt);return go(bt)?Mn:function ge(bt,gn){for(var Kt=-1,Mn=gn.length,_i=bt.length;++Kt<Mn;)bt[_i+Kt]=gn[Kt];return bt}(Mn,Kt(bt))}(bt,Ci,er)}(bt):Ci(bt);return function ye(bt,gn){for(var Kt=-1,Mn=bt?bt.length:0;++Kt<Mn&&!1!==gn(bt[Kt],Kt,bt););}(wr||bt,function(Fo,os){wr&&(Fo=bt[os=Fo]),Hn($o,os,ao(Fo,gn,Kt,Mn,os,bt,Co))}),$o}function mn(bt){var gn=new bt.constructor(bt.byteLength);return new Xe(gn).set(new Xe(bt)),gn}function Yn(bt,gn,Kt,Mn){Kt||(Kt={});for(var _i=-1,Qi=gn.length;++_i<Qi;){var Co=gn[_i],$o=Mn?Mn(Kt[Co],bt[Co],Co,Kt,bt):void 0;Hn(Kt,Co,void 0===$o?bt[Co]:$o)}return Kt}function co(bt,gn){var Kt=bt.__data__;return function dn(bt){var gn=typeof bt;return"string"==gn||"number"==gn||"symbol"==gn||"boolean"==gn?"__proto__"!==bt:null===bt}(gn)?Kt["string"==typeof gn?"string":"hash"]:Kt.map}function ko(bt,gn){var Kt=function Te(bt,gn){return bt?.[gn]}(bt,gn);return function xr(bt){return!(!bn(bt)||function an(bt){return!!et&&et in bt}(bt))&&(Vr(bt)||Ee(bt)?Se:z).test(Wt(bt))}(Kt)?Kt:void 0}hn.prototype.clear=function $n(){this.__data__=Bn?Bn(null):{}},hn.prototype.delete=function Ln(bt){return this.has(bt)&&delete this.__data__[bt]},hn.prototype.get=function Nt(bt){var gn=this.__data__;if(Bn){var Kt=gn[bt];return Kt===T?void 0:Kt}return Ye.call(gn,bt)?gn[bt]:void 0},hn.prototype.has=function Gt(bt){var gn=this.__data__;return Bn?void 0!==gn[bt]:Ye.call(gn,bt)},hn.prototype.set=function on(bt,gn){return this.__data__[bt]=Bn&&void 0===gn?T:gn,this},sn.prototype.clear=function It(){this.__data__=[]},sn.prototype.delete=function Ot(bt){var gn=this.__data__,Kt=ui(gn,bt);return!(Kt<0||(Kt==gn.length-1?gn.pop():At.call(gn,Kt,1),0))},sn.prototype.get=function zt(bt){var gn=this.__data__,Kt=ui(gn,bt);return Kt<0?void 0:gn[Kt][1]},sn.prototype.has=function un(bt){return ui(this.__data__,bt)>-1},sn.prototype.set=function Pn(bt,gn){var Kt=this.__data__,Mn=ui(Kt,bt);return Mn<0?Kt.push([bt,gn]):Kt[Mn][1]=gn,this},ci.prototype.clear=function Ei(){this.__data__={hash:new hn,map:new(ri||sn),string:new hn}},ci.prototype.delete=function Hi(bt){return co(this,bt).delete(bt)},ci.prototype.get=function mo(bt){return co(this,bt).get(bt)},ci.prototype.has=function xo(bt){return co(this,bt).has(bt)},ci.prototype.set=function vr(bt,gn){return co(this,bt).set(bt,gn),this},rn.prototype.clear=function en(){this.__data__=new sn},rn.prototype.delete=function Zn(bt){return this.__data__.delete(bt)},rn.prototype.get=function Di(bt){return this.__data__.get(bt)},rn.prototype.has=function po(bt){return this.__data__.has(bt)},rn.prototype.set=function nr(bt,gn){var Kt=this.__data__;if(Kt instanceof sn){var Mn=Kt.__data__;if(!ri||Mn.length<199)return Mn.push([bt,gn]),this;Kt=this.__data__=new ci(Mn)}return Kt.set(bt,gn),this};var er=Tt?ze(Tt,Object):function Mi(){return[]},or=function Zo(bt){return Pe.call(bt)};function Mr(bt,gn){return!!(gn=gn??y)&&("number"==typeof bt||oe.test(bt))&&bt>-1&&bt%1==0&&bt<gn}function _n(bt){var gn=bt&&bt.constructor;return bt===("function"==typeof gn&&gn.prototype||ot)}function Wt(bt){if(null!=bt){try{return Ke.call(bt)}catch{}try{return bt+""}catch{}}return""}function mi(bt,gn){return bt===gn||bt!=bt&&gn!=gn}(En&&or(new En(new ArrayBuffer(1)))!=U||ri&&or(new ri)!=_||Tn&&or(Tn.resolve())!=D||Jn&&or(new Jn)!=I||wi&&or(new wi)!=G)&&(or=function(bt){var gn=Pe.call(bt),Kt=gn==w?bt.constructor:void 0,Mn=Kt?Wt(Kt):void 0;if(Mn)switch(Mn){case gi:return U;case Ai:return _;case pt:return D;case Dt:return I;case cn:return G}return gn});var go=Array.isArray;function No(bt){return null!=bt&&function Lt(bt){return"number"==typeof bt&&bt>-1&&bt%1==0&&bt<=y}(bt.length)&&!Vr(bt)}var pr=qt||function Ki(){return!1};function Vr(bt){var gn=bn(bt)?Pe.call(bt):"";return gn==h||gn==g}function bn(bt){var gn=typeof bt;return!!bt&&("object"==gn||"function"==gn)}function Ci(bt){return No(bt)?function Xo(bt,gn){var Kt=go(bt)||function Si(bt){return function Sr(bt){return function jn(bt){return!!bt&&"object"==typeof bt}(bt)&&No(bt)}(bt)&&Ye.call(bt,"callee")&&(!qe.call(bt,"callee")||Pe.call(bt)==d)}(bt)?function xe(bt,gn){for(var Kt=-1,Mn=Array(bt);++Kt<bt;)Mn[Kt]=gn(Kt);return Mn}(bt.length,String):[],Mn=Kt.length,_i=!!Mn;for(var Qi in bt)(gn||Ye.call(bt,Qi))&&(!_i||"length"!=Qi&&!Mr(Qi,Mn))&&Kt.push(Qi);return Kt}(bt):function hr(bt){if(!_n(bt))return wt(bt);var gn=[];for(var Kt in Object(bt))Ye.call(bt,Kt)&&"constructor"!=Kt&&gn.push(Kt);return gn}(bt)}P.exports=function zn(bt){return ao(bt,!0,!0)}},2722:(P,b,f)=>{P=f.nmd(P);var T="__lodash_hash_undefined__",y=1,d=2,c=9007199254740991,s="[object Arguments]",a="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",_="[object Error]",x="[object Function]",w="[object GeneratorFunction]",D="[object Map]",C="[object Number]",I="[object Null]",L="[object Object]",N="[object Promise]",G="[object Proxy]",k="[object RegExp]",U="[object Set]",B="[object String]",J="[object Undefined]",ie="[object WeakMap]",re="[object ArrayBuffer]",q="[object DataView]",de=/^\[object .+?Constructor\]$/,ue=/^(?:0|[1-9]\d*)$/,be={};be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be[s]=be[a]=be[re]=be[h]=be[q]=be[g]=be[_]=be[x]=be[D]=be[C]=be[L]=be[k]=be[U]=be[B]=be[ie]=!1;var ve="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g,le="object"==typeof self&&self&&self.Object===Object&&self,Ce=ve||le||Function("return this")(),ye=b&&!b.nodeType&&b,ge=ye&&P&&!P.nodeType&&P,fe=ge&&ge.exports===ye,xe=fe&&ve.process,Te=function(){try{return xe&&xe.binding&&xe.binding("util")}catch{}}(),Ee=Te&&Te.isTypedArray;function $e(bt,gn){for(var Kt=-1,Mn=null==bt?0:bt.length;++Kt<Mn;)if(gn(bt[Kt],Kt,bt))return!0;return!1}function ot(bt,gn){return bt.has(gn)}function et(bt){var gn=-1,Kt=Array(bt.size);return bt.forEach(function(Mn,_i){Kt[++gn]=[_i,Mn]}),Kt}function Ye(bt){var gn=-1,Kt=Array(bt.size);return bt.forEach(function(Mn){Kt[++gn]=Mn}),Kt}var bt,Pe=Array.prototype,Re=Object.prototype,Fe=Ce["__core-js_shared__"],Xe=Function.prototype.toString,tt=Re.hasOwnProperty,vt=(bt=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||""))?"Symbol(src)_1."+bt:"",qe=Re.toString,At=RegExp("^"+Xe.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tt=fe?Ce.Buffer:void 0,qt=Ce.Symbol,wt=Ce.Uint8Array,En=Re.propertyIsEnumerable,ri=Pe.splice,Tn=qt?qt.toStringTag:void 0,Jn=Object.getOwnPropertySymbols,wi=Tt?Tt.isBuffer:void 0,Bn=function Ke(bt,gn){return function(Kt){return bt(gn(Kt))}}(Object.keys,Object),gi=er(Ce,"DataView"),Ai=er(Ce,"Map"),pt=er(Ce,"Promise"),Dt=er(Ce,"Set"),cn=er(Ce,"WeakMap"),dt=er(Object,"create"),Et=Wt(gi),hn=Wt(Ai),$n=Wt(pt),Ln=Wt(Dt),Nt=Wt(cn),Gt=qt?qt.prototype:void 0,on=Gt?Gt.valueOf:void 0;function sn(bt){var gn=-1,Kt=null==bt?0:bt.length;for(this.clear();++gn<Kt;){var Mn=bt[gn];this.set(Mn[0],Mn[1])}}function ci(bt){var gn=-1,Kt=null==bt?0:bt.length;for(this.clear();++gn<Kt;){var Mn=bt[gn];this.set(Mn[0],Mn[1])}}function rn(bt){var gn=-1,Kt=null==bt?0:bt.length;for(this.clear();++gn<Kt;){var Mn=bt[gn];this.set(Mn[0],Mn[1])}}function Xo(bt){var gn=-1,Kt=null==bt?0:bt.length;for(this.__data__=new rn;++gn<Kt;)this.add(bt[gn])}function bi(bt){var gn=this.__data__=new ci(bt);this.size=gn.size}function Rt(bt,gn){for(var Kt=bt.length;Kt--;)if(zn(bt[Kt][0],gn))return Kt;return-1}function pi(bt){return null==bt?void 0===bt?J:I:Tn&&Tn in Object(bt)?function or(bt){var gn=tt.call(bt,Tn),Kt=bt[Tn];try{bt[Tn]=void 0;var Mn=!0}catch{}var _i=qe.call(bt);return Mn&&(gn?bt[Tn]=Kt:delete bt[Tn]),_i}(bt):function _n(bt){return qe.call(bt)}(bt)}function Ti(bt){return bn(bt)&&pi(bt)==s}function lo(bt,gn,Kt,Mn,_i){return bt===gn||(null==bt||null==gn||!bn(bt)&&!bn(gn)?bt!=bt&&gn!=gn:function Eo(bt,gn,Kt,Mn,_i,Qi){var Co=Si(bt),$o=Si(gn),sr=Co?a:Wr(bt),lr=$o?a:Wr(gn),rr=(sr=sr==s?L:sr)==L,Pr=(lr=lr==s?L:lr)==L,wr=sr==lr;if(wr&&No(bt)){if(!No(gn))return!1;Co=!0,rr=!1}if(wr&&!rr)return Qi||(Qi=new bi),Co||jn(bt)?Yn(bt,gn,Kt,Mn,_i,Qi):function ei(bt,gn,Kt,Mn,_i,Qi,Co){switch(Kt){case q:if(bt.byteLength!=gn.byteLength||bt.byteOffset!=gn.byteOffset)return!1;bt=bt.buffer,gn=gn.buffer;case re:return!(bt.byteLength!=gn.byteLength||!Qi(new wt(bt),new wt(gn)));case h:case g:case C:return zn(+bt,+gn);case _:return bt.name==gn.name&&bt.message==gn.message;case k:case B:return bt==gn+"";case D:var $o=et;case U:if($o||($o=Ye),bt.size!=gn.size&&!(Mn&y))return!1;var lr=Co.get(bt);if(lr)return lr==gn;Mn|=d,Co.set(bt,gn);var rr=Yn($o(bt),$o(gn),Mn,_i,Qi,Co);return Co.delete(bt),rr;case"[object Symbol]":if(on)return on.call(bt)==on.call(gn)}return!1}(bt,gn,sr,Kt,Mn,_i,Qi);if(!(Kt&y)){var Fo=rr&&tt.call(bt,"__wrapped__"),os=Pr&&tt.call(gn,"__wrapped__");if(Fo||os){var fs=Fo?bt.value():bt,js=os?gn.value():gn;return Qi||(Qi=new bi),_i(fs,js,Kt,Mn,Qi)}}return!!wr&&(Qi||(Qi=new bi),function Ii(bt,gn,Kt,Mn,_i,Qi){var Co=Kt&y,$o=co(bt),sr=$o.length;if(sr!=co(gn).length&&!Co)return!1;for(var Pr=sr;Pr--;){var wr=$o[Pr];if(!(Co?wr in gn:tt.call(gn,wr)))return!1}var Fo=Qi.get(bt);if(Fo&&Qi.get(gn))return Fo==gn;var os=!0;Qi.set(bt,gn),Qi.set(gn,bt);for(var fs=Co;++Pr<sr;){var js=bt[wr=$o[Pr]],Ta=gn[wr];if(Mn)var es=Co?Mn(Ta,js,wr,gn,bt,Qi):Mn(js,Ta,wr,bt,gn,Qi);if(!(void 0===es?js===Ta||_i(js,Ta,Kt,Mn,Qi):es)){os=!1;break}fs||(fs="constructor"==wr)}if(os&&!fs){var gs=bt.constructor,Ca=gn.constructor;gs!=Ca&&"constructor"in bt&&"constructor"in gn&&!("function"==typeof gs&&gs instanceof gs&&"function"==typeof Ca&&Ca instanceof Ca)&&(os=!1)}return Qi.delete(bt),Qi.delete(gn),os}(bt,gn,Kt,Mn,_i,Qi))}(bt,gn,Kt,Mn,lo,_i))}function Yn(bt,gn,Kt,Mn,_i,Qi){var Co=Kt&y,$o=bt.length,sr=gn.length;if($o!=sr&&!(Co&&sr>$o))return!1;var lr=Qi.get(bt);if(lr&&Qi.get(gn))return lr==gn;var rr=-1,Pr=!0,wr=Kt&d?new Xo:void 0;for(Qi.set(bt,gn),Qi.set(gn,bt);++rr<$o;){var Fo=bt[rr],os=gn[rr];if(Mn)var fs=Co?Mn(os,Fo,rr,gn,bt,Qi):Mn(Fo,os,rr,bt,gn,Qi);if(void 0!==fs){if(fs)continue;Pr=!1;break}if(wr){if(!$e(gn,function(js,Ta){if(!ot(wr,Ta)&&(Fo===js||_i(Fo,js,Kt,Mn,Qi)))return wr.push(Ta)})){Pr=!1;break}}else if(Fo!==os&&!_i(Fo,os,Kt,Mn,Qi)){Pr=!1;break}}return Qi.delete(bt),Qi.delete(gn),Pr}function co(bt){return function mn(bt,gn,Kt){var Mn=gn(bt);return Si(bt)?Mn:function ze(bt,gn){for(var Kt=-1,Mn=gn.length,_i=bt.length;++Kt<Mn;)bt[_i+Kt]=gn[Kt];return bt}(Mn,Kt(bt))}(bt,Ci,Jr)}function ko(bt,gn){var Kt=bt.__data__;return function Mr(bt){var gn=typeof bt;return"string"==gn||"number"==gn||"symbol"==gn||"boolean"==gn?"__proto__"!==bt:null===bt}(gn)?Kt["string"==typeof gn?"string":"hash"]:Kt.map}function er(bt,gn){var Kt=function st(bt,gn){return bt?.[gn]}(bt,gn);return function Jo(bt){return!(!Lt(bt)||function dn(bt){return!!vt&&vt in bt}(bt))&&(pr(bt)?At:de).test(Wt(bt))}(Kt)?Kt:void 0}sn.prototype.clear=function It(){this.__data__=dt?dt(null):{},this.size=0},sn.prototype.delete=function Ot(bt){var gn=this.has(bt)&&delete this.__data__[bt];return this.size-=gn?1:0,gn},sn.prototype.get=function zt(bt){var gn=this.__data__;if(dt){var Kt=gn[bt];return Kt===T?void 0:Kt}return tt.call(gn,bt)?gn[bt]:void 0},sn.prototype.has=function un(bt){var gn=this.__data__;return dt?void 0!==gn[bt]:tt.call(gn,bt)},sn.prototype.set=function Pn(bt,gn){var Kt=this.__data__;return this.size+=this.has(bt)?0:1,Kt[bt]=dt&&void 0===gn?T:gn,this},ci.prototype.clear=function Ei(){this.__data__=[],this.size=0},ci.prototype.delete=function Hi(bt){var gn=this.__data__,Kt=Rt(gn,bt);return!(Kt<0||(Kt==gn.length-1?gn.pop():ri.call(gn,Kt,1),--this.size,0))},ci.prototype.get=function mo(bt){var gn=this.__data__,Kt=Rt(gn,bt);return Kt<0?void 0:gn[Kt][1]},ci.prototype.has=function xo(bt){return Rt(this.__data__,bt)>-1},ci.prototype.set=function vr(bt,gn){var Kt=this.__data__,Mn=Rt(Kt,bt);return Mn<0?(++this.size,Kt.push([bt,gn])):Kt[Mn][1]=gn,this},rn.prototype.clear=function en(){this.size=0,this.__data__={hash:new sn,map:new(Ai||ci),string:new sn}},rn.prototype.delete=function Zn(bt){var gn=ko(this,bt).delete(bt);return this.size-=gn?1:0,gn},rn.prototype.get=function Di(bt){return ko(this,bt).get(bt)},rn.prototype.has=function po(bt){return ko(this,bt).has(bt)},rn.prototype.set=function nr(bt,gn){var Kt=ko(this,bt),Mn=Kt.size;return Kt.set(bt,gn),this.size+=Kt.size==Mn?0:1,this},Xo.prototype.add=Xo.prototype.push=function Hn(bt){return this.__data__.set(bt,T),this},Xo.prototype.has=function ui(bt){return this.__data__.has(bt)},bi.prototype.clear=function ao(){this.__data__=new ci,this.size=0},bi.prototype.delete=function Wi(bt){var gn=this.__data__,Kt=gn.delete(bt);return this.size=gn.size,Kt},bi.prototype.get=function Ko(bt){return this.__data__.get(bt)},bi.prototype.has=function Zo(bt){return this.__data__.has(bt)},bi.prototype.set=function xr(bt,gn){var Kt=this.__data__;if(Kt instanceof ci){var Mn=Kt.__data__;if(!Ai||Mn.length<199)return Mn.push([bt,gn]),this.size=++Kt.size,this;Kt=this.__data__=new rn(Mn)}return Kt.set(bt,gn),this.size=Kt.size,this};var Jr=Jn?function(bt){return null==bt?[]:(bt=Object(bt),function Oe(bt,gn){for(var Kt=-1,Mn=null==bt?0:bt.length,_i=0,Qi=[];++Kt<Mn;){var Co=bt[Kt];gn(Co,Kt,bt)&&(Qi[_i++]=Co)}return Qi}(Jn(bt),function(gn){return En.call(bt,gn)}))}:function Mi(){return[]},Wr=pi;function Xr(bt,gn){return!!(gn=gn??c)&&("number"==typeof bt||ue.test(bt))&&bt>-1&&bt%1==0&&bt<gn}function Wt(bt){if(null!=bt){try{return Xe.call(bt)}catch{}try{return bt+""}catch{}}return""}function zn(bt,gn){return bt===gn||bt!=bt&&gn!=gn}(gi&&Wr(new gi(new ArrayBuffer(1)))!=q||Ai&&Wr(new Ai)!=D||pt&&Wr(pt.resolve())!=N||Dt&&Wr(new Dt)!=U||cn&&Wr(new cn)!=ie)&&(Wr=function(bt){var gn=pi(bt),Kt=gn==L?bt.constructor:void 0,Mn=Kt?Wt(Kt):"";if(Mn)switch(Mn){case Et:return q;case hn:return D;case $n:return N;case Ln:return U;case Nt:return ie}return gn});var mi=Ti(function(){return arguments}())?Ti:function(bt){return bn(bt)&&tt.call(bt,"callee")&&!En.call(bt,"callee")},Si=Array.isArray,No=wi||function Ki(){return!1};function pr(bt){if(!Lt(bt))return!1;var gn=pi(bt);return gn==x||gn==w||gn==u||gn==G}function Vr(bt){return"number"==typeof bt&&bt>-1&&bt%1==0&&bt<=c}function Lt(bt){var gn=typeof bt;return null!=bt&&("object"==gn||"function"==gn)}function bn(bt){return null!=bt&&"object"==typeof bt}var jn=Ee?function Ue(bt){return function(gn){return bt(gn)}}(Ee):function fr(bt){return bn(bt)&&Vr(bt.length)&&!!be[pi(bt)]};function Ci(bt){return function go(bt){return null!=bt&&Vr(bt.length)&&!pr(bt)}(bt)?function hr(bt,gn){var Kt=Si(bt),Mn=!Kt&&mi(bt),_i=!Kt&&!Mn&&No(bt),Qi=!Kt&&!Mn&&!_i&&jn(bt),Co=Kt||Mn||_i||Qi,$o=Co?function Be(bt,gn){for(var Kt=-1,Mn=Array(bt);++Kt<bt;)Mn[Kt]=gn(Kt);return Mn}(bt.length,String):[],sr=$o.length;for(var lr in bt)(gn||tt.call(bt,lr))&&(!Co||!("length"==lr||_i&&("offset"==lr||"parent"==lr)||Qi&&("buffer"==lr||"byteLength"==lr||"byteOffset"==lr)||Xr(lr,sr)))&&$o.push(lr);return $o}(bt):function Gr(bt){if(!function an(bt){var gn=bt&&bt.constructor;return bt===("function"==typeof gn&&gn.prototype||Re)}(bt))return Bn(bt);var gn=[];for(var Kt in Object(bt))tt.call(bt,Kt)&&"constructor"!=Kt&&gn.push(Kt);return gn}(bt)}P.exports=function Sr(bt,gn){return lo(bt,gn)}},732:(P,b,f)=>{P=f.nmd(P);var T="__lodash_hash_undefined__",c=9007199254740991,s="[object Arguments]",u="[object AsyncFunction]",x="[object Function]",w="[object GeneratorFunction]",I="[object Null]",L="[object Object]",N="[object Proxy]",B="[object Undefined]",ee=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,de={};de["[object Float32Array]"]=de["[object Float64Array]"]=de["[object Int8Array]"]=de["[object Int16Array]"]=de["[object Int32Array]"]=de["[object Uint8Array]"]=de["[object Uint8ClampedArray]"]=de["[object Uint16Array]"]=de["[object Uint32Array]"]=!0,de[s]=de["[object Array]"]=de["[object ArrayBuffer]"]=de["[object Boolean]"]=de["[object DataView]"]=de["[object Date]"]=de["[object Error]"]=de[x]=de["[object Map]"]=de["[object Number]"]=de[L]=de["[object RegExp]"]=de["[object Set]"]=de["[object String]"]=de["[object WeakMap]"]=!1;var Kt,ue="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g,be="object"==typeof self&&self&&self.Object===Object&&self,ve=ue||be||Function("return this")(),le=b&&!b.nodeType&&b,Ce=le&&P&&!P.nodeType&&P,ye=Ce&&Ce.exports===le,ge=ye&&ue.process,fe=function(){try{return Ce&&Ce.require&&Ce.require("util").types||ge&&ge.binding&&ge.binding("util")}catch{}}(),xe=fe&&fe.isTypedArray,Be=Array.prototype,ot=Object.prototype,st=ve["__core-js_shared__"],et=Function.prototype.toString,Ke=ot.hasOwnProperty,Ye=(Kt=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"",Pe=ot.toString,Se=et.call(Object),Re=RegExp("^"+et.call(Ke).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ye?ve.Buffer:void 0,Xe=ve.Symbol,tt=ve.Uint8Array,vt=Fe?Fe.allocUnsafe:void 0,qe=function $e(Kt,Mn){return function(_i){return Kt(Mn(_i))}}(Object.getPrototypeOf,Object),At=Object.create,Tt=ot.propertyIsEnumerable,qt=Be.splice,wt=Xe?Xe.toStringTag:void 0,En=function(){try{var Kt=fr(Object,"defineProperty");return Kt({},"",{}),Kt}catch{}}(),ri=Fe?Fe.isBuffer:void 0,Tn=Math.max,Jn=Date.now,wi=fr(ve,"Map"),Bn=fr(Object,"create"),gi=function(){function Kt(){}return function(Mn){if(!pr(Mn))return{};if(At)return At(Mn);Kt.prototype=Mn;var _i=new Kt;return Kt.prototype=void 0,_i}}();function Ai(Kt){var Mn=-1,_i=null==Kt?0:Kt.length;for(this.clear();++Mn<_i;){var Qi=Kt[Mn];this.set(Qi[0],Qi[1])}}function hn(Kt){var Mn=-1,_i=null==Kt?0:Kt.length;for(this.clear();++Mn<_i;){var Qi=Kt[Mn];this.set(Qi[0],Qi[1])}}function sn(Kt){var Mn=-1,_i=null==Kt?0:Kt.length;for(this.clear();++Mn<_i;){var Qi=Kt[Mn];this.set(Qi[0],Qi[1])}}function ci(Kt){var Mn=this.__data__=new hn(Kt);this.size=Mn.size}function en(Kt,Mn,_i){(void 0!==_i&&!_n(Kt[Mn],_i)||void 0===_i&&!(Mn in Kt))&&po(Kt,Mn,_i)}function Zn(Kt,Mn,_i){var Qi=Kt[Mn];(!Ke.call(Kt,Mn)||!_n(Qi,_i)||void 0===_i&&!(Mn in Kt))&&po(Kt,Mn,_i)}function Di(Kt,Mn){for(var _i=Kt.length;_i--;)if(_n(Kt[_i][0],Mn))return _i;return-1}function po(Kt,Mn,_i){"__proto__"==Mn&&En?En(Kt,Mn,{configurable:!0,enumerable:!0,value:_i,writable:!0}):Kt[Mn]=_i}Ai.prototype.clear=function pt(){this.__data__=Bn?Bn(null):{},this.size=0},Ai.prototype.delete=function Dt(Kt){var Mn=this.has(Kt)&&delete this.__data__[Kt];return this.size-=Mn?1:0,Mn},Ai.prototype.get=function cn(Kt){var Mn=this.__data__;if(Bn){var _i=Mn[Kt];return _i===T?void 0:_i}return Ke.call(Mn,Kt)?Mn[Kt]:void 0},Ai.prototype.has=function dt(Kt){var Mn=this.__data__;return Bn?void 0!==Mn[Kt]:Ke.call(Mn,Kt)},Ai.prototype.set=function Et(Kt,Mn){var _i=this.__data__;return this.size+=this.has(Kt)?0:1,_i[Kt]=Bn&&void 0===Mn?T:Mn,this},hn.prototype.clear=function $n(){this.__data__=[],this.size=0},hn.prototype.delete=function Ln(Kt){var Mn=this.__data__,_i=Di(Mn,Kt);return!(_i<0||(_i==Mn.length-1?Mn.pop():qt.call(Mn,_i,1),--this.size,0))},hn.prototype.get=function Nt(Kt){var Mn=this.__data__,_i=Di(Mn,Kt);return _i<0?void 0:Mn[_i][1]},hn.prototype.has=function Gt(Kt){return Di(this.__data__,Kt)>-1},hn.prototype.set=function on(Kt,Mn){var _i=this.__data__,Qi=Di(_i,Kt);return Qi<0?(++this.size,_i.push([Kt,Mn])):_i[Qi][1]=Mn,this},sn.prototype.clear=function It(){this.size=0,this.__data__={hash:new Ai,map:new(wi||hn),string:new Ai}},sn.prototype.delete=function Ot(Kt){var Mn=Jo(this,Kt).delete(Kt);return this.size-=Mn?1:0,Mn},sn.prototype.get=function zt(Kt){return Jo(this,Kt).get(Kt)},sn.prototype.has=function un(Kt){return Jo(this,Kt).has(Kt)},sn.prototype.set=function Pn(Kt,Mn){var _i=Jo(this,Kt),Qi=_i.size;return _i.set(Kt,Mn),this.size+=_i.size==Qi?0:1,this},ci.prototype.clear=function Ei(){this.__data__=new hn,this.size=0},ci.prototype.delete=function Hi(Kt){var Mn=this.__data__,_i=Mn.delete(Kt);return this.size=Mn.size,_i},ci.prototype.get=function mo(Kt){return this.__data__.get(Kt)},ci.prototype.has=function xo(Kt){return this.__data__.has(Kt)},ci.prototype.set=function vr(Kt,Mn){var _i=this.__data__;if(_i instanceof hn){var Qi=_i.__data__;if(!wi||Qi.length<199)return Qi.push([Kt,Mn]),this.size=++_i.size,this;_i=this.__data__=new sn(Qi)}return _i.set(Kt,Mn),this.size=_i.size,this};var nr=function Eo(Kt){return function(Mn,_i,Qi){for(var Co=-1,$o=Object(Mn),sr=Qi(Mn),lr=sr.length;lr--;){var rr=sr[Kt?lr:++Co];if(!1===_i($o[rr],rr,$o))break}return Mn}}();function Xo(Kt){return null==Kt?void 0===Kt?B:I:wt&&wt in Object(Kt)?function Gr(Kt){var Mn=Ke.call(Kt,wt),_i=Kt[wt];try{Kt[wt]=void 0;var Qi=!0}catch{}var Co=Pe.call(Kt);return Qi&&(Mn?Kt[wt]=_i:delete Kt[wt]),Co}(Kt):function Jr(Kt){return Pe.call(Kt)}(Kt)}function Hn(Kt){return Vr(Kt)&&Xo(Kt)==s}function Wi(Kt,Mn,_i,Qi,Co){Kt!==Mn&&nr(Mn,function($o,sr){if(Co||(Co=new ci),pr($o))!function Ko(Kt,Mn,_i,Qi,Co,$o,sr){var lr=Xr(Kt,_i),rr=Xr(Mn,_i),Pr=sr.get(rr);if(Pr)en(Kt,_i,Pr);else{var wr=$o?$o(lr,rr,_i+"",Kt,Mn,sr):void 0,Fo=void 0===wr;if(Fo){var os=zn(rr),fs=!os&&go(rr),js=!os&&!fs&&bn(rr);wr=rr,os||fs||js?zn(lr)?wr=lr:function Si(Kt){return Vr(Kt)&&mi(Kt)}(lr)?wr=function pi(Kt,Mn){var _i=-1,Qi=Kt.length;for(Mn||(Mn=Array(Qi));++_i<Qi;)Mn[_i]=Kt[_i];return Mn}(lr):fs?(Fo=!1,wr=function hr(Kt,Mn){if(Mn)return Kt.slice();var _i=Kt.length,Qi=vt?vt(_i):new Kt.constructor(_i);return Kt.copy(Qi),Qi}(rr,!0)):js?(Fo=!1,wr=function mn(Kt,Mn){var _i=Mn?function Rt(Kt){var Mn=new Kt.constructor(Kt.byteLength);return new tt(Mn).set(new tt(Kt)),Mn}(Kt.buffer):Kt.buffer;return new Kt.constructor(_i,Kt.byteOffset,Kt.length)}(rr,!0)):wr=[]:function Lt(Kt){if(!Vr(Kt)||Xo(Kt)!=L)return!1;var Mn=qe(Kt);if(null===Mn)return!0;var _i=Ke.call(Mn,"constructor")&&Mn.constructor;return"function"==typeof _i&&_i instanceof _i&&et.call(_i)==Se}(rr)||Wt(rr)?(wr=lr,Wt(lr)?wr=function jn(Kt){return function Ti(Kt,Mn,_i,Qi){var Co=!_i;_i||(_i={});for(var $o=-1,sr=Mn.length;++$o<sr;){var lr=Mn[$o],rr=Qi?Qi(_i[lr],Kt[lr],lr,_i,Kt):void 0;void 0===rr&&(rr=Kt[lr]),Co?po(_i,lr,rr):Zn(_i,lr,rr)}return _i}(Kt,Ci(Kt))}(lr):(!pr(lr)||No(lr))&&(wr=function Yn(Kt){return"function"!=typeof Kt.constructor||er(Kt)?{}:gi(qe(Kt))}(rr))):Fo=!1}Fo&&(sr.set(rr,wr),Co(wr,rr,Qi,$o,sr),sr.delete(rr)),en(Kt,_i,wr)}}(Kt,Mn,sr,_i,Wi,Qi,Co);else{var lr=Qi?Qi(Xr(Kt,sr),$o,sr+"",Kt,Mn,Co):void 0;void 0===lr&&(lr=$o),en(Kt,sr,lr)}},Ci)}var xr=En?function(Kt,Mn){return En(Kt,"toString",{configurable:!0,enumerable:!1,value:Ki(Mn),writable:!0})}:bt;function Jo(Kt,Mn){var _i=Kt.__data__;return function co(Kt){var Mn=typeof Kt;return"string"==Mn||"number"==Mn||"symbol"==Mn||"boolean"==Mn?"__proto__"!==Kt:null===Kt}(Mn)?_i["string"==typeof Mn?"string":"hash"]:_i.map}function fr(Kt,Mn){var _i=function ze(Kt,Mn){return Kt?.[Mn]}(Kt,Mn);return function ui(Kt){return!(!pr(Kt)||function ko(Kt){return!!Ye&&Ye in Kt}(Kt))&&(No(Kt)?Re:ee).test(function an(Kt){if(null!=Kt){try{return et.call(Kt)}catch{}try{return Kt+""}catch{}}return""}(Kt))}(_i)?_i:void 0}function ei(Kt,Mn){var _i=typeof Kt;return!!(Mn=Mn??c)&&("number"==_i||"symbol"!=_i&&he.test(Kt))&&Kt>-1&&Kt%1==0&&Kt<Mn}function er(Kt){var Mn=Kt&&Kt.constructor;return Kt===("function"==typeof Mn&&Mn.prototype||ot)}function Xr(Kt,Mn){if(("constructor"!==Mn||"function"!=typeof Kt[Mn])&&"__proto__"!=Mn)return Kt[Mn]}var Mr=function dn(Kt){var Mn=0,_i=0;return function(){var Qi=Jn(),Co=16-(Qi-_i);if(_i=Qi,Co>0){if(++Mn>=800)return arguments[0]}else Mn=0;return Kt.apply(void 0,arguments)}}(xr);function _n(Kt,Mn){return Kt===Mn||Kt!=Kt&&Mn!=Mn}var Wt=Hn(function(){return arguments}())?Hn:function(Kt){return Vr(Kt)&&Ke.call(Kt,"callee")&&!Tt.call(Kt,"callee")},zn=Array.isArray;function mi(Kt){return null!=Kt&&Sr(Kt.length)&&!No(Kt)}var go=ri||function gn(){return!1};function No(Kt){if(!pr(Kt))return!1;var Mn=Xo(Kt);return Mn==x||Mn==w||Mn==u||Mn==N}function Sr(Kt){return"number"==typeof Kt&&Kt>-1&&Kt%1==0&&Kt<=c}function pr(Kt){var Mn=typeof Kt;return null!=Kt&&("object"==Mn||"function"==Mn)}function Vr(Kt){return null!=Kt&&"object"==typeof Kt}var bn=xe?function Oe(Kt){return function(Mn){return Kt(Mn)}}(xe):function bi(Kt){return Vr(Kt)&&Sr(Kt.length)&&!!de[Xo(Kt)]};function Ci(Kt){return mi(Kt)?function rn(Kt,Mn){var _i=zn(Kt),Qi=!_i&&Wt(Kt),Co=!_i&&!Qi&&go(Kt),$o=!_i&&!Qi&&!Co&&bn(Kt),sr=_i||Qi||Co||$o,lr=sr?function Ee(Kt,Mn){for(var _i=-1,Qi=Array(Kt);++_i<Kt;)Qi[_i]=Mn(_i);return Qi}(Kt.length,String):[],rr=lr.length;for(var Pr in Kt)(Mn||Ke.call(Kt,Pr))&&(!sr||!("length"==Pr||Co&&("offset"==Pr||"parent"==Pr)||$o&&("buffer"==Pr||"byteLength"==Pr||"byteOffset"==Pr)||ei(Pr,rr)))&&lr.push(Pr);return lr}(Kt,!0):function ao(Kt){if(!pr(Kt))return function or(Kt){var Mn=[];if(null!=Kt)for(var _i in Object(Kt))Mn.push(_i);return Mn}(Kt);var Mn=er(Kt),_i=[];for(var Qi in Kt)"constructor"==Qi&&(Mn||!Ke.call(Kt,Qi))||_i.push(Qi);return _i}(Kt)}var Mi=function lo(Kt){return function Zo(Kt,Mn){return Mr(function Wr(Kt,Mn,_i){return Mn=Tn(void 0===Mn?Kt.length-1:Mn,0),function(){for(var Qi=arguments,Co=-1,$o=Tn(Qi.length-Mn,0),sr=Array($o);++Co<$o;)sr[Co]=Qi[Mn+Co];Co=-1;for(var lr=Array(Mn+1);++Co<Mn;)lr[Co]=Qi[Co];return lr[Mn]=_i(sr),function Te(Kt,Mn,_i){switch(_i.length){case 0:return Kt.call(Mn);case 1:return Kt.call(Mn,_i[0]);case 2:return Kt.call(Mn,_i[0],_i[1]);case 3:return Kt.call(Mn,_i[0],_i[1],_i[2])}return Kt.apply(Mn,_i)}(Kt,this,lr)}}(Kt,Mn,bt),Kt+"")}(function(Mn,_i){var Qi=-1,Co=_i.length,$o=Co>1?_i[Co-1]:void 0,sr=Co>2?_i[2]:void 0;for($o=Kt.length>3&&"function"==typeof $o?(Co--,$o):void 0,sr&&function Ii(Kt,Mn,_i){if(!pr(_i))return!1;var Qi=typeof Mn;return!!("number"==Qi?mi(_i)&&ei(Mn,_i.length):"string"==Qi&&Mn in _i)&&_n(_i[Mn],Kt)}(_i[0],_i[1],sr)&&($o=Co<3?void 0:$o,Co=1),Mn=Object(Mn);++Qi<Co;){var lr=_i[Qi];lr&&Kt(Mn,lr,Qi,$o)}return Mn})}(function(Kt,Mn,_i){Wi(Kt,Mn,_i)});function Ki(Kt){return function(){return Kt}}function bt(Kt){return Kt}P.exports=Mi},5143:(P,b,f)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});const S=f(8805),T=f(2722);var y,d;(d=y||(y={})).compose=function c(h={},g={},_=!1){"object"!=typeof h&&(h={}),"object"!=typeof g&&(g={});let x=S(g);_||(x=Object.keys(x).reduce((w,D)=>(null!=x[D]&&(w[D]=x[D]),w),{}));for(const w in h)void 0!==h[w]&&void 0===g[w]&&(x[w]=h[w]);return Object.keys(x).length>0?x:void 0},d.diff=function s(h={},g={}){"object"!=typeof h&&(h={}),"object"!=typeof g&&(g={});const _=Object.keys(h).concat(Object.keys(g)).reduce((x,w)=>(T(h[w],g[w])||(x[w]=void 0===g[w]?null:g[w]),x),{});return Object.keys(_).length>0?_:void 0},d.invert=function a(h={},g={}){h=h||{};const _=Object.keys(g).reduce((x,w)=>(g[w]!==h[w]&&void 0!==h[w]&&(x[w]=g[w]),x),{});return Object.keys(h).reduce((x,w)=>(h[w]!==g[w]&&void 0===g[w]&&(x[w]=null),x),_)},d.transform=function u(h,g,_=!1){if("object"!=typeof h)return g;if("object"!=typeof g)return;if(!_)return g;const x=Object.keys(g).reduce((w,D)=>(void 0===h[D]&&(w[D]=g[D]),w),{});return Object.keys(x).length>0?x:void 0},b.default=y},9098:(P,b,f)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.AttributeMap=b.OpIterator=b.Op=void 0;const S=f(1456),T=f(8805),y=f(2722),d=f(5143);b.AttributeMap=d.default;const c=f(6237);b.Op=c.default;const s=f(2849);b.OpIterator=s.default;const u=(g,_)=>{if("object"!=typeof g||null===g)throw new Error("cannot retain a "+typeof g);if("object"!=typeof _||null===_)throw new Error("cannot retain a "+typeof _);const x=Object.keys(g)[0];if(!x||x!==Object.keys(_)[0])throw new Error(`embed types not matched: ${x} != ${Object.keys(_)[0]}`);return[x,g[x],_[x]]};class h{constructor(_){this.ops=Array.isArray(_)?_:null!=_&&Array.isArray(_.ops)?_.ops:[]}static registerEmbed(_,x){this.handlers[_]=x}static unregisterEmbed(_){delete this.handlers[_]}static getHandler(_){const x=this.handlers[_];if(!x)throw new Error(`no handlers for embed type "${_}"`);return x}insert(_,x){const w={};return"string"==typeof _&&0===_.length?this:(w.insert=_,null!=x&&"object"==typeof x&&Object.keys(x).length>0&&(w.attributes=x),this.push(w))}delete(_){return _<=0?this:this.push({delete:_})}retain(_,x){if("number"==typeof _&&_<=0)return this;const w={retain:_};return null!=x&&"object"==typeof x&&Object.keys(x).length>0&&(w.attributes=x),this.push(w)}push(_){let x=this.ops.length,w=this.ops[x-1];if(_=T(_),"object"==typeof w){if("number"==typeof _.delete&&"number"==typeof w.delete)return this.ops[x-1]={delete:w.delete+_.delete},this;if("number"==typeof w.delete&&null!=_.insert&&(x-=1,w=this.ops[x-1],"object"!=typeof w))return this.ops.unshift(_),this;if(y(_.attributes,w.attributes)){if("string"==typeof _.insert&&"string"==typeof w.insert)return this.ops[x-1]={insert:w.insert+_.insert},"object"==typeof _.attributes&&(this.ops[x-1].attributes=_.attributes),this;if("number"==typeof _.retain&&"number"==typeof w.retain)return this.ops[x-1]={retain:w.retain+_.retain},"object"==typeof _.attributes&&(this.ops[x-1].attributes=_.attributes),this}}return x===this.ops.length?this.ops.push(_):this.ops.splice(x,0,_),this}chop(){const _=this.ops[this.ops.length-1];return _&&"number"==typeof _.retain&&!_.attributes&&this.ops.pop(),this}filter(_){return this.ops.filter(_)}forEach(_){this.ops.forEach(_)}map(_){return this.ops.map(_)}partition(_){const x=[],w=[];return this.forEach(D=>{(_(D)?x:w).push(D)}),[x,w]}reduce(_,x){return this.ops.reduce(_,x)}changeLength(){return this.reduce((_,x)=>x.insert?_+c.default.length(x):x.delete?_-x.delete:_,0)}length(){return this.reduce((_,x)=>_+c.default.length(x),0)}slice(_=0,x=1/0){const w=[],D=new s.default(this.ops);let C=0;for(;C<x&&D.hasNext();){let I;C<_?I=D.next(_-C):(I=D.next(x-C),w.push(I)),C+=c.default.length(I)}return new h(w)}compose(_){const x=new s.default(this.ops),w=new s.default(_.ops),D=[],C=w.peek();if(null!=C&&"number"==typeof C.retain&&null==C.attributes){let L=C.retain;for(;"insert"===x.peekType()&&x.peekLength()<=L;)L-=x.peekLength(),D.push(x.next());C.retain-L>0&&w.next(C.retain-L)}const I=new h(D);for(;x.hasNext()||w.hasNext();)if("insert"===w.peekType())I.push(w.next());else if("delete"===x.peekType())I.push(x.next());else{const L=Math.min(x.peekLength(),w.peekLength()),N=x.next(L),G=w.next(L);if(G.retain){const k={};if("number"==typeof N.retain)k.retain="number"==typeof G.retain?L:G.retain;else if("number"==typeof G.retain)null==N.retain?k.insert=N.insert:k.retain=N.retain;else{const B=null==N.retain?"insert":"retain",[K,J,ie]=u(N[B],G.retain),re=h.getHandler(K);k[B]={[K]:re.compose(J,ie,"retain"===B)}}const U=d.default.compose(N.attributes,G.attributes,"number"==typeof N.retain);if(U&&(k.attributes=U),I.push(k),!w.hasNext()&&y(I.ops[I.ops.length-1],k)){const B=new h(x.rest());return I.concat(B).chop()}}else"number"==typeof G.delete&&("number"==typeof N.retain||"object"==typeof N.retain&&null!==N.retain)&&I.push(G)}return I.chop()}concat(_){const x=new h(this.ops.slice());return _.ops.length>0&&(x.push(_.ops[0]),x.ops=x.ops.concat(_.ops.slice(1))),x}diff(_,x){if(this.ops===_.ops)return new h;const w=[this,_].map(N=>N.map(G=>{if(null!=G.insert)return"string"==typeof G.insert?G.insert:"\0";throw new Error("diff() called "+(N===_?"on":"with")+" non-document")}).join("")),D=new h,C=S(w[0],w[1],x),I=new s.default(this.ops),L=new s.default(_.ops);return C.forEach(N=>{let G=N[1].length;for(;G>0;){let k=0;switch(N[0]){case S.INSERT:k=Math.min(L.peekLength(),G),D.push(L.next(k));break;case S.DELETE:k=Math.min(G,I.peekLength()),I.next(k),D.delete(k);break;case S.EQUAL:k=Math.min(I.peekLength(),L.peekLength(),G);const U=I.next(k),B=L.next(k);y(U.insert,B.insert)?D.retain(k,d.default.diff(U.attributes,B.attributes)):D.push(B).delete(k)}G-=k}}),D.chop()}eachLine(_,x="\n"){const w=new s.default(this.ops);let D=new h,C=0;for(;w.hasNext();){if("insert"!==w.peekType())return;const I=w.peek(),L=c.default.length(I)-w.peekLength(),N="string"==typeof I.insert?I.insert.indexOf(x,L)-L:-1;if(N<0)D.push(w.next());else if(N>0)D.push(w.next(N));else{if(!1===_(D,w.next(1).attributes||{},C))return;C+=1,D=new h}}D.length()>0&&_(D,{},C)}invert(_){const x=new h;return this.reduce((w,D)=>{if(D.insert)x.delete(c.default.length(D));else{if("number"==typeof D.retain&&null==D.attributes)return x.retain(D.retain),w+D.retain;if(D.delete||"number"==typeof D.retain){const C=D.delete||D.retain;return _.slice(w,w+C).forEach(L=>{D.delete?x.push(L):D.retain&&D.attributes&&x.retain(c.default.length(L),d.default.invert(D.attributes,L.attributes))}),w+C}if("object"==typeof D.retain&&null!==D.retain){const C=_.slice(w,w+1),I=new s.default(C.ops).next(),[L,N,G]=u(D.retain,I.insert),k=h.getHandler(L);return x.retain({[L]:k.invert(N,G)},d.default.invert(D.attributes,I.attributes)),w+1}}return w},0),x.chop()}transform(_,x=!1){if(x=!!x,"number"==typeof _)return this.transformPosition(_,x);const w=_,D=new s.default(this.ops),C=new s.default(w.ops),I=new h;for(;D.hasNext()||C.hasNext();)if("insert"!==D.peekType()||!x&&"insert"===C.peekType())if("insert"===C.peekType())I.push(C.next());else{const L=Math.min(D.peekLength(),C.peekLength()),N=D.next(L),G=C.next(L);if(N.delete)continue;if(G.delete)I.push(G);else{const k=N.retain,U=G.retain;let B="object"==typeof U&&null!==U?U:L;if("object"==typeof k&&null!==k&&"object"==typeof U&&null!==U){const K=Object.keys(k)[0];if(K===Object.keys(U)[0]){const J=h.getHandler(K);J&&(B={[K]:J.transform(k[K],U[K],x)})}}I.retain(B,d.default.transform(N.attributes,G.attributes,x))}}else I.retain(c.default.length(D.next()));return I.chop()}transformPosition(_,x=!1){x=!!x;const w=new s.default(this.ops);let D=0;for(;w.hasNext()&&D<=_;){const C=w.peekLength(),I=w.peekType();w.next(),"delete"!==I?("insert"===I&&(D<_||!x)&&(_+=C),D+=C):_-=Math.min(C,_-D)}return _}}h.Op=c.default,h.OpIterator=s.default,h.AttributeMap=d.default,h.handlers={},b.default=h,P.exports=h,P.exports.default=h},6237:(P,b)=>{"use strict";var f;Object.defineProperty(b,"__esModule",{value:!0}),(f||(f={})).length=function T(y){return"number"==typeof y.delete?y.delete:"number"==typeof y.retain?y.retain:"object"==typeof y.retain&&null!==y.retain?1:"string"==typeof y.insert?y.insert.length:1},b.default=f},2849:(P,b,f)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});const S=f(6237);b.default=class T{constructor(d){this.ops=d,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(d){d||(d=1/0);const c=this.ops[this.index];if(c){const s=this.offset,a=S.default.length(c);if(d>=a-s?(d=a-s,this.index+=1,this.offset=0):this.offset+=d,"number"==typeof c.delete)return{delete:d};{const u={};return c.attributes&&(u.attributes=c.attributes),"number"==typeof c.retain?u.retain=d:"object"==typeof c.retain&&null!==c.retain?u.retain=c.retain:u.insert="string"==typeof c.insert?c.insert.substr(s,d):c.insert,u}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?S.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const d=this.ops[this.index];return d?"number"==typeof d.delete?"delete":"number"==typeof d.retain||"object"==typeof d.retain&&null!==d.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const d=this.offset,c=this.index,s=this.next(),a=this.ops.slice(this.index);return this.offset=d,this.index=c,[s].concat(a)}}return[]}}},1863:(P,b,f)=>{"use strict";var S=f(9731);P.exports=S},6572:(P,b,f)=>{"use strict";var S=f(4401);P.exports=S},2318:(P,b,f)=>{"use strict";var S=f(3661);P.exports=S},576:(P,b,f)=>{"use strict";var S=f(5606);P.exports=S},2327:(P,b,f)=>{"use strict";f(5445);var S=f(6731);P.exports=S("Array","fill")},3274:(P,b,f)=>{"use strict";f(9477),f(6272);var S=f(577);P.exports=S.Array.from},5339:(P,b,f)=>{"use strict";f(2947);var S=f(577);P.exports=S.Object.values},1189:(P,b,f)=>{"use strict";f(538);var S=f(6731);P.exports=S("String","endsWith")},5142:(P,b,f)=>{"use strict";f(297)},1019:(P,b,f)=>{"use strict";f(4660)},1183:(P,b,f)=>{"use strict";f(5275)},2570:(P,b,f)=>{"use strict";f(2839)},297:(P,b,f)=>{"use strict";var S=f(1863);P.exports=S},4660:(P,b,f)=>{"use strict";var S=f(6572);P.exports=S},5275:(P,b,f)=>{"use strict";var S=f(2318);P.exports=S},2839:(P,b,f)=>{"use strict";var S=f(576);P.exports=S},6324:(P,b,f)=>{"use strict";var S=f(2539),T=f(7471),y=TypeError;P.exports=function(d){if(S(d))return d;throw new y(T(d)+" is not a function")}},2162:(P,b,f)=>{"use strict";var S=f(2539),T=String,y=TypeError;P.exports=function(d){if("object"==typeof d||S(d))return d;throw new y("Can't set "+T(d)+" as a prototype")}},2572:(P,b,f)=>{"use strict";var S=f(5485),T=f(3830),y=f(8503).f,d=S("unscopables"),c=Array.prototype;void 0===c[d]&&y(c,d,{configurable:!0,value:T(null)}),P.exports=function(s){c[d][s]=!0}},8874:(P,b,f)=>{"use strict";var S=f(3988),T=String,y=TypeError;P.exports=function(d){if(S(d))return d;throw new y(T(d)+" is not an object")}},9236:(P,b,f)=>{"use strict";var S=f(6015),T=f(7234),y=f(3235);P.exports=function(c){for(var s=S(this),a=y(s),u=arguments.length,h=T(u>1?arguments[1]:void 0,a),g=u>2?arguments[2]:void 0,_=void 0===g?a:T(g,a);_>h;)s[h++]=c;return s}},8459:(P,b,f)=>{"use strict";var S=f(9794),T=f(2977),y=f(6015),d=f(9154),c=f(7024),s=f(6467),a=f(3235),u=f(3003),h=f(2387),g=f(7874),_=Array;P.exports=function(w){var D=y(w),C=s(this),I=arguments.length,L=I>1?arguments[1]:void 0,N=void 0!==L;N&&(L=S(L,I>2?arguments[2]:void 0));var U,B,K,J,ie,re,G=g(D),k=0;if(!G||this===_&&c(G))for(U=a(D),B=C?new this(U):_(U);U>k;k++)re=N?L(D[k],k):D[k],u(B,k,re);else for(ie=(J=h(D,G)).next,B=C?new this:[];!(K=T(ie,J)).done;k++)re=N?d(J,L,[K.value,k],!0):K.value,u(B,k,re);return B.length=k,B}},5644:(P,b,f)=>{"use strict";var S=f(7625),T=f(7234),y=f(3235),d=function(c){return function(s,a,u){var x,h=S(s),g=y(h),_=T(u,g);if(c&&a!=a){for(;g>_;)if((x=h[_++])!=x)return!0}else for(;g>_;_++)if((c||_ in h)&&h[_]===a)return c||_||0;return!c&&-1}};P.exports={includes:d(!0),indexOf:d(!1)}},9154:(P,b,f)=>{"use strict";var S=f(8874),T=f(8880);P.exports=function(y,d,c,s){try{return s?d(S(c)[0],c[1]):d(c)}catch(a){T(y,"throw",a)}}},3346:(P,b,f)=>{"use strict";var T=f(5485)("iterator"),y=!1;try{var d=0,c={next:function(){return{done:!!d++}},return:function(){y=!0}};c[T]=function(){return this},Array.from(c,function(){throw 2})}catch{}P.exports=function(s,a){try{if(!a&&!y)return!1}catch{return!1}var u=!1;try{var h={};h[T]=function(){return{next:function(){return{done:u=!0}}}},s(h)}catch{}return u}},4545:(P,b,f)=>{"use strict";var S=f(4038),T=S({}.toString),y=S("".slice);P.exports=function(d){return y(T(d),8,-1)}},2702:(P,b,f)=>{"use strict";var S=f(1923),T=f(2539),y=f(4545),c=f(5485)("toStringTag"),s=Object,a="Arguments"===y(function(){return arguments}());P.exports=S?y:function(h){var g,_,x;return void 0===h?"Undefined":null===h?"Null":"string"==typeof(_=function(h,g){try{return h[g]}catch{}}(g=s(h),c))?_:a?y(g):"Object"===(x=y(g))&&T(g.callee)?"Arguments":x}},1358:(P,b,f)=>{"use strict";var S=f(2623),T=f(3054),y=f(3037),d=f(8503);P.exports=function(c,s,a){for(var u=T(s),h=d.f,g=y.f,_=0;_<u.length;_++){var x=u[_];!S(c,x)&&(!a||!S(a,x))&&h(c,x,g(s,x))}}},6775:(P,b,f)=>{"use strict";var T=f(5485)("match");P.exports=function(y){var d=/./;try{"/./"[y](d)}catch{try{return d[T]=!1,"/./"[y](d)}catch{}}return!1}},6141:(P,b,f)=>{"use strict";var S=f(5202);P.exports=!S(function(){function T(){}return T.prototype.constructor=null,Object.getPrototypeOf(new T)!==T.prototype})},3585:P=>{"use strict";P.exports=function(b,f){return{value:b,done:f}}},8868:(P,b,f)=>{"use strict";var S=f(5007),T=f(8503),y=f(4238);P.exports=S?function(d,c,s){return T.f(d,c,y(1,s))}:function(d,c,s){return d[c]=s,d}},4238:P=>{"use strict";P.exports=function(b,f){return{enumerable:!(1&b),configurable:!(2&b),writable:!(4&b),value:f}}},3003:(P,b,f)=>{"use strict";var S=f(3164),T=f(8503),y=f(4238);P.exports=function(d,c,s){var a=S(c);a in d?T.f(d,a,y(0,s)):d[a]=s}},916:(P,b,f)=>{"use strict";var S=f(2539),T=f(8503),y=f(6614),d=f(2136);P.exports=function(c,s,a,u){u||(u={});var h=u.enumerable,g=void 0!==u.name?u.name:s;if(S(a)&&y(a,g,u),u.global)h?c[s]=a:d(s,a);else{try{u.unsafe?c[s]&&(h=!0):delete c[s]}catch{}h?c[s]=a:T.f(c,s,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return c}},2136:(P,b,f)=>{"use strict";var S=f(730),T=Object.defineProperty;P.exports=function(y,d){try{T(S,y,{value:d,configurable:!0,writable:!0})}catch{S[y]=d}return d}},5007:(P,b,f)=>{"use strict";var S=f(5202);P.exports=!S(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},8629:P=>{"use strict";var b="object"==typeof document&&document.all;P.exports={all:b,IS_HTMLDDA:typeof b>"u"&&void 0!==b}},2215:(P,b,f)=>{"use strict";var S=f(730),T=f(3988),y=S.document,d=T(y)&&T(y.createElement);P.exports=function(c){return d?y.createElement(c):{}}},932:P=>{"use strict";P.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7626:(P,b,f)=>{"use strict";var a,u,S=f(730),T=f(932),y=S.process,d=S.Deno,c=y&&y.versions||d&&d.version,s=c&&c.v8;s&&(u=(a=s.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&T&&(!(a=T.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=T.match(/Chrome\/(\d+)/))&&(u=+a[1]),P.exports=u},6731:(P,b,f)=>{"use strict";var S=f(730),T=f(4038);P.exports=function(y,d){return T(S[y].prototype[d])}},8552:P=>{"use strict";P.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2189:(P,b,f)=>{"use strict";var S=f(730),T=f(3037).f,y=f(8868),d=f(916),c=f(2136),s=f(1358),a=f(3455);P.exports=function(u,h){var D,C,I,L,N,g=u.target,_=u.global,x=u.stat;if(D=_?S:x?S[g]||c(g,{}):(S[g]||{}).prototype)for(C in h){if(L=h[C],I=u.dontCallGetSet?(N=T(D,C))&&N.value:D[C],!a(_?C:g+(x?".":"#")+C,u.forced)&&void 0!==I){if(typeof L==typeof I)continue;s(L,I)}(u.sham||I&&I.sham)&&y(L,"sham",!0),d(D,C,L,u)}}},5202:P=>{"use strict";P.exports=function(b){try{return!!b()}catch{return!0}}},9794:(P,b,f)=>{"use strict";var S=f(6192),T=f(6324),y=f(2865),d=S(S.bind);P.exports=function(c,s){return T(c),void 0===s?c:y?d(c,s):function(){return c.apply(s,arguments)}}},2865:(P,b,f)=>{"use strict";var S=f(5202);P.exports=!S(function(){var T=function(){}.bind();return"function"!=typeof T||T.hasOwnProperty("prototype")})},2977:(P,b,f)=>{"use strict";var S=f(2865),T=Function.prototype.call;P.exports=S?T.bind(T):function(){return T.apply(T,arguments)}},9895:(P,b,f)=>{"use strict";var S=f(5007),T=f(2623),y=Function.prototype,d=S&&Object.getOwnPropertyDescriptor,c=T(y,"name"),s=c&&"something"===function(){}.name,a=c&&(!S||S&&d(y,"name").configurable);P.exports={EXISTS:c,PROPER:s,CONFIGURABLE:a}},6589:(P,b,f)=>{"use strict";var S=f(4038),T=f(6324);P.exports=function(y,d,c){try{return S(T(Object.getOwnPropertyDescriptor(y,d)[c]))}catch{}}},6192:(P,b,f)=>{"use strict";var S=f(4545),T=f(4038);P.exports=function(y){if("Function"===S(y))return T(y)}},4038:(P,b,f)=>{"use strict";var S=f(2865),T=Function.prototype,y=T.call,d=S&&T.bind.bind(y,y);P.exports=S?d:function(c){return function(){return y.apply(c,arguments)}}},7300:(P,b,f)=>{"use strict";var S=f(730),T=f(2539);P.exports=function(d,c){return arguments.length<2?function(d){return T(d)?d:void 0}(S[d]):S[d]&&S[d][c]}},7874:(P,b,f)=>{"use strict";var S=f(2702),T=f(3923),y=f(2219),d=f(7817),s=f(5485)("iterator");P.exports=function(a){if(!y(a))return T(a,s)||T(a,"@@iterator")||d[S(a)]}},2387:(P,b,f)=>{"use strict";var S=f(2977),T=f(6324),y=f(8874),d=f(7471),c=f(7874),s=TypeError;P.exports=function(a,u){var h=arguments.length<2?c(a):u;if(T(h))return y(S(h,a));throw new s(d(a)+" is not iterable")}},3923:(P,b,f)=>{"use strict";var S=f(6324),T=f(2219);P.exports=function(y,d){var c=y[d];return T(c)?void 0:S(c)}},730:function(P,b,f){"use strict";var S=function(T){return T&&T.Math===Math&&T};P.exports=S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof f.g&&f.g)||S("object"==typeof this&&this)||function(){return this}()||Function("return this")()},2623:(P,b,f)=>{"use strict";var S=f(4038),T=f(6015),y=S({}.hasOwnProperty);P.exports=Object.hasOwn||function(c,s){return y(T(c),s)}},7467:P=>{"use strict";P.exports={}},845:(P,b,f)=>{"use strict";var S=f(7300);P.exports=S("document","documentElement")},2470:(P,b,f)=>{"use strict";var S=f(5007),T=f(5202),y=f(2215);P.exports=!S&&!T(function(){return 7!==Object.defineProperty(y("div"),"a",{get:function(){return 7}}).a})},6854:(P,b,f)=>{"use strict";var S=f(4038),T=f(5202),y=f(4545),d=Object,c=S("".split);P.exports=T(function(){return!d("z").propertyIsEnumerable(0)})?function(s){return"String"===y(s)?c(s,""):d(s)}:d},7821:(P,b,f)=>{"use strict";var S=f(4038),T=f(2539),y=f(6838),d=S(Function.toString);T(y.inspectSource)||(y.inspectSource=function(c){return d(c)}),P.exports=y.inspectSource},5378:(P,b,f)=>{"use strict";var x,w,D,S=f(2543),T=f(730),y=f(3988),d=f(8868),c=f(2623),s=f(6838),a=f(3511),u=f(7467),h="Object already initialized",g=T.TypeError;if(S||s.state){var L=s.state||(s.state=new(0,T.WeakMap));L.get=L.get,L.has=L.has,L.set=L.set,x=function(G,k){if(L.has(G))throw new g(h);return k.facade=G,L.set(G,k),k},w=function(G){return L.get(G)||{}},D=function(G){return L.has(G)}}else{var N=a("state");u[N]=!0,x=function(G,k){if(c(G,N))throw new g(h);return k.facade=G,d(G,N,k),k},w=function(G){return c(G,N)?G[N]:{}},D=function(G){return c(G,N)}}P.exports={set:x,get:w,has:D,enforce:function(G){return D(G)?w(G):x(G,{})},getterFor:function(G){return function(k){var U;if(!y(k)||(U=w(k)).type!==G)throw new g("Incompatible receiver, "+G+" required");return U}}}},7024:(P,b,f)=>{"use strict";var S=f(5485),T=f(7817),y=S("iterator"),d=Array.prototype;P.exports=function(c){return void 0!==c&&(T.Array===c||d[y]===c)}},2539:(P,b,f)=>{"use strict";var S=f(8629),T=S.all;P.exports=S.IS_HTMLDDA?function(y){return"function"==typeof y||y===T}:function(y){return"function"==typeof y}},6467:(P,b,f)=>{"use strict";var S=f(4038),T=f(5202),y=f(2539),d=f(2702),c=f(7300),s=f(7821),a=function(){},u=[],h=c("Reflect","construct"),g=/^\s*(?:class|function)\b/,_=S(g.exec),x=!g.test(a),w=function(I){if(!y(I))return!1;try{return h(a,u,I),!0}catch{return!1}},D=function(I){if(!y(I))return!1;switch(d(I)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return x||!!_(g,s(I))}catch{return!0}};D.sham=!0,P.exports=!h||T(function(){var C;return w(w.call)||!w(Object)||!w(function(){C=!0})||C})?D:w},3455:(P,b,f)=>{"use strict";var S=f(5202),T=f(2539),y=/#|\.prototype\./,d=function(h,g){var _=s[c(h)];return _===u||_!==a&&(T(g)?S(g):!!g)},c=d.normalize=function(h){return String(h).replace(y,".").toLowerCase()},s=d.data={},a=d.NATIVE="N",u=d.POLYFILL="P";P.exports=d},2219:P=>{"use strict";P.exports=function(b){return null==b}},3988:(P,b,f)=>{"use strict";var S=f(2539),T=f(8629),y=T.all;P.exports=T.IS_HTMLDDA?function(d){return"object"==typeof d?null!==d:S(d)||d===y}:function(d){return"object"==typeof d?null!==d:S(d)}},4708:P=>{"use strict";P.exports=!1},184:(P,b,f)=>{"use strict";var S=f(3988),T=f(4545),d=f(5485)("match");P.exports=function(c){var s;return S(c)&&(void 0!==(s=c[d])?!!s:"RegExp"===T(c))}},8820:(P,b,f)=>{"use strict";var S=f(7300),T=f(2539),y=f(7676),d=f(3713),c=Object;P.exports=d?function(s){return"symbol"==typeof s}:function(s){var a=S("Symbol");return T(a)&&y(a.prototype,c(s))}},8880:(P,b,f)=>{"use strict";var S=f(2977),T=f(8874),y=f(3923);P.exports=function(d,c,s){var a,u;T(d);try{if(!(a=y(d,"return"))){if("throw"===c)throw s;return s}a=S(a,d)}catch(h){u=!0,a=h}if("throw"===c)throw s;if(u)throw a;return T(a),s}},3450:(P,b,f)=>{"use strict";var S=f(344).IteratorPrototype,T=f(3830),y=f(4238),d=f(3506),c=f(7817),s=function(){return this};P.exports=function(a,u,h,g){var _=u+" Iterator";return a.prototype=T(S,{next:y(+!g,h)}),d(a,_,!1,!0),c[_]=s,a}},3174:(P,b,f)=>{"use strict";var S=f(2189),T=f(2977),y=f(4708),d=f(9895),c=f(2539),s=f(3450),a=f(8059),u=f(5502),h=f(3506),g=f(8868),_=f(916),x=f(5485),w=f(7817),D=f(344),C=d.PROPER,I=d.CONFIGURABLE,L=D.IteratorPrototype,N=D.BUGGY_SAFARI_ITERATORS,G=x("iterator"),k="keys",U="values",B="entries",K=function(){return this};P.exports=function(J,ie,re,q,Y,Z,Q){s(re,ie,q);var de,ue,be,te=function(ve){if(ve===Y&&ee)return ee;if(!N&&ve&&ve in oe)return oe[ve];switch(ve){case k:case U:case B:return function(){return new re(this,ve)}}return function(){return new re(this)}},pe=ie+" Iterator",z=!1,oe=J.prototype,ae=oe[G]||oe["@@iterator"]||Y&&oe[Y],ee=!N&&ae||te(Y),he="Array"===ie&&oe.entries||ae;if(he&&(de=a(he.call(new J)))!==Object.prototype&&de.next&&(!y&&a(de)!==L&&(u?u(de,L):c(de[G])||_(de,G,K)),h(de,pe,!0,!0),y&&(w[pe]=K)),C&&Y===U&&ae&&ae.name!==U&&(!y&&I?g(oe,"name",U):(z=!0,ee=function(){return T(ae,this)})),Y)if(ue={values:te(U),keys:Z?ee:te(k),entries:te(B)},Q)for(be in ue)(N||z||!(be in oe))&&_(oe,be,ue[be]);else S({target:ie,proto:!0,forced:N||z},ue);return(!y||Q)&&oe[G]!==ee&&_(oe,G,ee,{name:Y}),w[ie]=ee,ue}},344:(P,b,f)=>{"use strict";var _,x,w,S=f(5202),T=f(2539),y=f(3988),d=f(3830),c=f(8059),s=f(916),a=f(5485),u=f(4708),h=a("iterator"),g=!1;[].keys&&("next"in(w=[].keys())?(x=c(c(w)))!==Object.prototype&&(_=x):g=!0),!y(_)||S(function(){var C={};return _[h].call(C)!==C})?_={}:u&&(_=d(_)),T(_[h])||s(_,h,function(){return this}),P.exports={IteratorPrototype:_,BUGGY_SAFARI_ITERATORS:g}},7817:P=>{"use strict";P.exports={}},3235:(P,b,f)=>{"use strict";var S=f(3627);P.exports=function(T){return S(T.length)}},6614:(P,b,f)=>{"use strict";var S=f(4038),T=f(5202),y=f(2539),d=f(2623),c=f(5007),s=f(9895).CONFIGURABLE,a=f(7821),u=f(5378),h=u.enforce,g=u.get,_=String,x=Object.defineProperty,w=S("".slice),D=S("".replace),C=S([].join),I=c&&!T(function(){return 8!==x(function(){},"length",{value:8}).length}),L=String(String).split("String"),N=P.exports=function(G,k,U){"Symbol("===w(_(k),0,7)&&(k="["+D(_(k),/^Symbol\(([^)]*)\)/,"$1")+"]"),U&&U.getter&&(k="get "+k),U&&U.setter&&(k="set "+k),(!d(G,"name")||s&&G.name!==k)&&(c?x(G,"name",{value:k,configurable:!0}):G.name=k),I&&U&&d(U,"arity")&&G.length!==U.arity&&x(G,"length",{value:U.arity});try{U&&d(U,"constructor")&&U.constructor?c&&x(G,"prototype",{writable:!1}):G.prototype&&(G.prototype=void 0)}catch{}var B=h(G);return d(B,"source")||(B.source=C(L,"string"==typeof k?k:"")),G};Function.prototype.toString=N(function(){return y(this)&&g(this).source||a(this)},"toString")},3041:P=>{"use strict";var b=Math.ceil,f=Math.floor;P.exports=Math.trunc||function(T){var y=+T;return(y>0?f:b)(y)}},50:(P,b,f)=>{"use strict";var S=f(184),T=TypeError;P.exports=function(y){if(S(y))throw new T("The method doesn't accept regular expressions");return y}},3830:(P,b,f)=>{"use strict";var L,S=f(8874),T=f(3944),y=f(8552),d=f(7467),c=f(845),s=f(2215),a=f(3511),g="prototype",_="script",x=a("IE_PROTO"),w=function(){},D=function(G){return"<"+_+">"+G+"</"+_+">"},C=function(G){G.write(D("")),G.close();var k=G.parentWindow.Object;return G=null,k},N=function(){try{L=new ActiveXObject("htmlfile")}catch{}N=typeof document<"u"?document.domain&&L?C(L):function(){var U,G=s("iframe"),k="java"+_+":";return G.style.display="none",c.appendChild(G),G.src=String(k),(U=G.contentWindow.document).open(),U.write(D("document.F=Object")),U.close(),U.F}():C(L);for(var G=y.length;G--;)delete N[g][y[G]];return N()};d[x]=!0,P.exports=Object.create||function(k,U){var B;return null!==k?(w[g]=S(k),B=new w,w[g]=null,B[x]=k):B=N(),void 0===U?B:T.f(B,U)}},3944:(P,b,f)=>{"use strict";var S=f(5007),T=f(2268),y=f(8503),d=f(8874),c=f(7625),s=f(4254);b.f=S&&!T?Object.defineProperties:function(u,h){d(u);for(var D,g=c(h),_=s(h),x=_.length,w=0;x>w;)y.f(u,D=_[w++],g[D]);return u}},8503:(P,b,f)=>{"use strict";var S=f(5007),T=f(2470),y=f(2268),d=f(8874),c=f(3164),s=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",g="configurable",_="writable";b.f=S?y?function(w,D,C){if(d(w),D=c(D),d(C),"function"==typeof w&&"prototype"===D&&"value"in C&&_ in C&&!C[_]){var I=u(w,D);I&&I[_]&&(w[D]=C.value,C={configurable:g in C?C[g]:I[g],enumerable:h in C?C[h]:I[h],writable:!1})}return a(w,D,C)}:a:function(w,D,C){if(d(w),D=c(D),d(C),T)try{return a(w,D,C)}catch{}if("get"in C||"set"in C)throw new s("Accessors not supported");return"value"in C&&(w[D]=C.value),w}},3037:(P,b,f)=>{"use strict";var S=f(5007),T=f(2977),y=f(6251),d=f(4238),c=f(7625),s=f(3164),a=f(2623),u=f(2470),h=Object.getOwnPropertyDescriptor;b.f=S?h:function(_,x){if(_=c(_),x=s(x),u)try{return h(_,x)}catch{}if(a(_,x))return d(!T(y.f,_,x),_[x])}},5974:(P,b,f)=>{"use strict";var S=f(7862),y=f(8552).concat("length","prototype");b.f=Object.getOwnPropertyNames||function(c){return S(c,y)}},1526:(P,b)=>{"use strict";b.f=Object.getOwnPropertySymbols},8059:(P,b,f)=>{"use strict";var S=f(2623),T=f(2539),y=f(6015),d=f(3511),c=f(6141),s=d("IE_PROTO"),a=Object,u=a.prototype;P.exports=c?a.getPrototypeOf:function(h){var g=y(h);if(S(g,s))return g[s];var _=g.constructor;return T(_)&&g instanceof _?_.prototype:g instanceof a?u:null}},7676:(P,b,f)=>{"use strict";var S=f(4038);P.exports=S({}.isPrototypeOf)},7862:(P,b,f)=>{"use strict";var S=f(4038),T=f(2623),y=f(7625),d=f(5644).indexOf,c=f(7467),s=S([].push);P.exports=function(a,u){var x,h=y(a),g=0,_=[];for(x in h)!T(c,x)&&T(h,x)&&s(_,x);for(;u.length>g;)T(h,x=u[g++])&&(~d(_,x)||s(_,x));return _}},4254:(P,b,f)=>{"use strict";var S=f(7862),T=f(8552);P.exports=Object.keys||function(d){return S(d,T)}},6251:(P,b)=>{"use strict";var f={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,T=S&&!f.call({1:2},1);b.f=T?function(d){var c=S(this,d);return!!c&&c.enumerable}:f},5502:(P,b,f)=>{"use strict";var S=f(6589),T=f(8874),y=f(2162);P.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var s,d=!1,c={};try{(s=S(Object.prototype,"__proto__","set"))(c,[]),d=c instanceof Array}catch{}return function(u,h){return T(u),y(h),d?s(u,h):u.__proto__=h,u}}():void 0)},7830:(P,b,f)=>{"use strict";var S=f(5007),T=f(5202),y=f(4038),d=f(8059),c=f(4254),s=f(7625),u=y(f(6251).f),h=y([].push),g=S&&T(function(){var x=Object.create(null);return x[2]=2,!u(x,2)}),_=function(x){return function(w){for(var k,D=s(w),C=c(D),I=g&&null===d(D),L=C.length,N=0,G=[];L>N;)k=C[N++],(!S||(I?k in D:u(D,k)))&&h(G,x?[k,D[k]]:D[k]);return G}};P.exports={entries:_(!0),values:_(!1)}},532:(P,b,f)=>{"use strict";var S=f(2977),T=f(2539),y=f(3988),d=TypeError;P.exports=function(c,s){var a,u;if("string"===s&&T(a=c.toString)&&!y(u=S(a,c))||T(a=c.valueOf)&&!y(u=S(a,c))||"string"!==s&&T(a=c.toString)&&!y(u=S(a,c)))return u;throw new d("Can't convert object to primitive value")}},3054:(P,b,f)=>{"use strict";var S=f(7300),T=f(4038),y=f(5974),d=f(1526),c=f(8874),s=T([].concat);P.exports=S("Reflect","ownKeys")||function(u){var h=y.f(c(u)),g=d.f;return g?s(h,g(u)):h}},577:(P,b,f)=>{"use strict";var S=f(730);P.exports=S},6373:(P,b,f)=>{"use strict";var S=f(2219),T=TypeError;P.exports=function(y){if(S(y))throw new T("Can't call method on "+y);return y}},3506:(P,b,f)=>{"use strict";var S=f(8503).f,T=f(2623),d=f(5485)("toStringTag");P.exports=function(c,s,a){c&&!a&&(c=c.prototype),c&&!T(c,d)&&S(c,d,{configurable:!0,value:s})}},3511:(P,b,f)=>{"use strict";var S=f(6568),T=f(2858),y=S("keys");P.exports=function(d){return y[d]||(y[d]=T(d))}},6838:(P,b,f)=>{"use strict";var S=f(730),T=f(2136),y="__core-js_shared__",d=S[y]||T(y,{});P.exports=d},6568:(P,b,f)=>{"use strict";var S=f(4708),T=f(6838);(P.exports=function(y,d){return T[y]||(T[y]=void 0!==d?d:{})})("versions",[]).push({version:"3.34.0",mode:S?"pure":"global",copyright:"\xa9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6365:(P,b,f)=>{"use strict";var S=f(4038),T=f(3550),y=f(2532),d=f(6373),c=S("".charAt),s=S("".charCodeAt),a=S("".slice),u=function(h){return function(g,_){var C,I,x=y(d(g)),w=T(_),D=x.length;return w<0||w>=D?h?"":void 0:(C=s(x,w))<55296||C>56319||w+1===D||(I=s(x,w+1))<56320||I>57343?h?c(x,w):C:h?a(x,w,w+2):I-56320+(C-55296<<10)+65536}};P.exports={codeAt:u(!1),charAt:u(!0)}},3370:(P,b,f)=>{"use strict";var S=f(7626),T=f(5202),d=f(730).String;P.exports=!!Object.getOwnPropertySymbols&&!T(function(){var c=Symbol("symbol detection");return!d(c)||!(Object(c)instanceof Symbol)||!Symbol.sham&&S&&S<41})},7234:(P,b,f)=>{"use strict";var S=f(3550),T=Math.max,y=Math.min;P.exports=function(d,c){var s=S(d);return s<0?T(s+c,0):y(s,c)}},7625:(P,b,f)=>{"use strict";var S=f(6854),T=f(6373);P.exports=function(y){return S(T(y))}},3550:(P,b,f)=>{"use strict";var S=f(3041);P.exports=function(T){var y=+T;return y!=y||0===y?0:S(y)}},3627:(P,b,f)=>{"use strict";var S=f(3550),T=Math.min;P.exports=function(y){return y>0?T(S(y),9007199254740991):0}},6015:(P,b,f)=>{"use strict";var S=f(6373),T=Object;P.exports=function(y){return T(S(y))}},634:(P,b,f)=>{"use strict";var S=f(2977),T=f(3988),y=f(8820),d=f(3923),c=f(532),s=f(5485),a=TypeError,u=s("toPrimitive");P.exports=function(h,g){if(!T(h)||y(h))return h;var x,_=d(h,u);if(_){if(void 0===g&&(g="default"),x=S(_,h,g),!T(x)||y(x))return x;throw new a("Can't convert object to primitive value")}return void 0===g&&(g="number"),c(h,g)}},3164:(P,b,f)=>{"use strict";var S=f(634),T=f(8820);P.exports=function(y){var d=S(y,"string");return T(d)?d:d+""}},1923:(P,b,f)=>{"use strict";var y={};y[f(5485)("toStringTag")]="z",P.exports="[object z]"===String(y)},2532:(P,b,f)=>{"use strict";var S=f(2702),T=String;P.exports=function(y){if("Symbol"===S(y))throw new TypeError("Cannot convert a Symbol value to a string");return T(y)}},7471:P=>{"use strict";var b=String;P.exports=function(f){try{return b(f)}catch{return"Object"}}},2858:(P,b,f)=>{"use strict";var S=f(4038),T=0,y=Math.random(),d=S(1..toString);P.exports=function(c){return"Symbol("+(void 0===c?"":c)+")_"+d(++T+y,36)}},3713:(P,b,f)=>{"use strict";var S=f(3370);P.exports=S&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2268:(P,b,f)=>{"use strict";var S=f(5007),T=f(5202);P.exports=S&&T(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2543:(P,b,f)=>{"use strict";var S=f(730),T=f(2539),y=S.WeakMap;P.exports=T(y)&&/native code/.test(String(y))},5485:(P,b,f)=>{"use strict";var S=f(730),T=f(6568),y=f(2623),d=f(2858),c=f(3370),s=f(3713),a=S.Symbol,u=T("wks"),h=s?a.for||a:a&&a.withoutSetter||d;P.exports=function(g){return y(u,g)||(u[g]=c&&y(a,g)?a[g]:h("Symbol."+g)),u[g]}},5445:(P,b,f)=>{"use strict";var S=f(2189),T=f(9236),y=f(2572);S({target:"Array",proto:!0},{fill:T}),y("fill")},6272:(P,b,f)=>{"use strict";var S=f(2189),T=f(8459);S({target:"Array",stat:!0,forced:!f(3346)(function(c){Array.from(c)})},{from:T})},2947:(P,b,f)=>{"use strict";var S=f(2189),T=f(7830).values;S({target:"Object",stat:!0},{values:function(d){return T(d)}})},538:(P,b,f)=>{"use strict";var C,S=f(2189),T=f(6192),y=f(3037).f,d=f(3627),c=f(2532),s=f(50),a=f(6373),u=f(6775),h=f(4708),g=T("".endsWith),_=T("".slice),x=Math.min,w=u("endsWith");S({target:"String",proto:!0,forced:!(!h&&!w&&(C=y(String.prototype,"endsWith"),C&&!C.writable)||w)},{endsWith:function(I){var L=c(a(this));s(I);var N=arguments.length>1?arguments[1]:void 0,G=L.length,k=void 0===N?G:x(d(N),G),U=c(I);return g?g(L,U,k):_(L,k-U.length,k)===U}})},9477:(P,b,f)=>{"use strict";var S=f(6365).charAt,T=f(2532),y=f(5378),d=f(3174),c=f(3585),s="String Iterator",a=y.set,u=y.getterFor(s);d(String,"String",function(h){a(this,{type:s,string:T(h),index:0})},function(){var w,g=u(this),_=g.string,x=g.index;return x>=_.length?c(void 0,!0):(w=S(_,x),g.index+=w.length,c(w,!1))})},9731:(P,b,f)=>{"use strict";var S=f(2327);P.exports=S},4401:(P,b,f)=>{"use strict";var S=f(3274);P.exports=S},3661:(P,b,f)=>{"use strict";var S=f(5339);P.exports=S},5606:(P,b,f)=>{"use strict";var S=f(1189);P.exports=S}},M={};function W(P){var b=M[P];if(void 0!==b)return b.exports;var f=M[P]={id:P,loaded:!1,exports:{}};return Ze[P].call(f.exports,f,f.exports,W),f.loaded=!0,f.exports}W.n=P=>{var b=P&&P.__esModule?()=>P.default:()=>P;return W.d(b,{a:b}),b},W.d=(P,b)=>{for(var f in b)W.o(b,f)&&!W.o(P,f)&&Object.defineProperty(P,f,{enumerable:!0,get:b[f]})},W.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),W.o=(P,b)=>Object.prototype.hasOwnProperty.call(P,b),W.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})},W.nmd=P=>(P.paths=[],P.children||(P.children=[]),P);var o={};return(()=>{"use strict";W.d(o,{default:()=>Io}),W(1019),W(5142),W(1183),W(2570);var T=W(2432),y=W(715),d=W(4048),c=W(1233);function s(Pt){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function u(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,g(ai.key),ai)}}function g(Pt){var St=function _(Pt,St){if("object"!==s(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==s(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===s(St)?St:String(St)}function x(){return x=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(St,Dn,ai){var ro=function w(Pt,St){for(;!Object.prototype.hasOwnProperty.call(Pt,St)&&null!==(Pt=k(Pt)););return Pt}(St,Dn);if(ro){var jo=Object.getOwnPropertyDescriptor(ro,Dn);return jo.get?jo.get.call(arguments.length<3?St:ai):jo.value}},x.apply(this,arguments)}function C(Pt,St){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function k(Pt){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var U=function(Pt){!function D(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&C(Pt,St)}(Dn,Pt);var St=function I(Pt){var St=function G(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=k(Pt);if(St){var jo=k(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function L(Pt,St){if(St&&("object"===s(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function N(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function a(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function h(Pt,St,Dn){St&&u(Pt.prototype,St),Dn&&u(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,[{key:"add",value:function(ro,jo){if("+1"===jo||"-1"===jo){var ia=this.value(ro)||0;jo="+1"===jo?ia+1:ia-1}return 0===jo?(this.remove(ro),!0):x(k(Dn.prototype),"add",this).call(this,ro,jo)}},{key:"canAdd",value:function(ro,jo){return x(k(Dn.prototype),"canAdd",this).call(this,ro,jo)||x(k(Dn.prototype),"canAdd",this).call(this,ro,parseInt(jo,10))}},{key:"value",value:function(ro){return parseInt(x(k(Dn.prototype),"value",this).call(this,ro),10)||void 0}}]),Dn}(c.ClassAttributor);const K=new U("indent","ql-indent",{scope:c.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});var J=W(6446);function ie(Pt){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function re(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,Y(ai.key),ai)}}function Y(Pt){var St=function Z(Pt,St){if("object"!==ie(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==ie(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===ie(St)?St:String(St)}function pe(Pt,St){return(pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function he(Pt){return(he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var de=function(Pt){!function te(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&pe(Pt,St)}(Dn,Pt);var St=function z(Pt){var St=function ee(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=he(Pt);if(St){var jo=he(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function oe(Pt,St){if(St&&("object"===ie(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function ae(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function Q(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function q(Pt,St,Dn){return St&&re(Pt.prototype,St),Dn&&re(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1}),Pt}(Dn)}(J.ZP);de.blotName="blockquote",de.tagName="blockquote";const ue=de;function be(Pt){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function le(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,ye(ai.key),ai)}}function ye(Pt){var St=function ge(Pt,St){if("object"!==be(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==be(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===be(St)?St:String(St)}function xe(Pt,St){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function $e(Pt){return($e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var Be=function(Pt){!function fe(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&xe(Pt,St)}(Dn,Pt);var St=function Te(Pt){var St=function ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=$e(Pt);if(St){var jo=$e(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Ee(Pt,St){if(St&&("object"===be(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function Oe(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function ve(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function Ce(Pt,St,Dn){St&&le(Pt.prototype,St),Dn&&le(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,null,[{key:"formats",value:function(ro){return this.tagName.indexOf(ro.tagName)+1}}]),Dn}(J.ZP);Be.blotName="header",Be.tagName=["H1","H2","H3","H4","H5","H6"];const Ue=Be;var ot=W(3553),st=W(281);function et(Pt){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function Ke(){return Ke=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(St,Dn,ai){var ro=function Ye(Pt,St){for(;!Object.prototype.hasOwnProperty.call(Pt,St)&&null!==(Pt=wt(Pt)););return Pt}(St,Dn);if(ro){var jo=Object.getOwnPropertyDescriptor(ro,Dn);return jo.get?jo.get.call(arguments.length<3?St:ai):jo.value}},Ke.apply(this,arguments)}function Pe(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,Re(ai.key),ai)}}function Se(Pt,St,Dn){return St&&Pe(Pt.prototype,St),Dn&&Pe(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1}),Pt}function Re(Pt){var St=function Fe(Pt,St){if("object"!==et(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==et(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===et(St)?St:String(St)}function Xe(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}function tt(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&vt(Pt,St)}function vt(Pt,St){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function qe(Pt){var St=function qt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=wt(Pt);if(St){var jo=wt(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function At(Pt,St){if(St&&("object"===et(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function Tt(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}function wt(Pt){return(wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var En=function(Pt){tt(Dn,Pt);var St=qe(Dn);function Dn(){return Xe(this,Dn),St.apply(this,arguments)}return Se(Dn)}(ot.Z);En.blotName="list-container",En.tagName="OL";var ri=function(Pt){tt(Dn,Pt);var St=qe(Dn);function Dn(ai,ro){var jo;Xe(this,Dn),jo=St.call(this,ai,ro);var ia=ro.ownerDocument.createElement("span"),Sh=function(Ls){if(ai.isEnabled()){var Mu=jo.statics.formats(ro,ai);"checked"===Mu?(jo.format("list","unchecked"),Ls.preventDefault()):"unchecked"===Mu&&(jo.format("list","checked"),Ls.preventDefault())}};return ia.addEventListener("mousedown",Sh),ia.addEventListener("touchstart",Sh),jo.attachUI(ia),jo}return Se(Dn,[{key:"format",value:function(ro,jo){ro===this.statics.blotName&&jo?this.domNode.setAttribute("data-list",jo):Ke(wt(Dn.prototype),"format",this).call(this,ro,jo)}}],[{key:"create",value:function(ro){var jo=Ke(wt(Dn),"create",this).call(this);return jo.setAttribute("data-list",ro),jo}},{key:"formats",value:function(ro){return ro.getAttribute("data-list")||void 0}},{key:"register",value:function(){st.ZP.register(En)}}]),Dn}(J.ZP);ri.blotName="list",ri.tagName="LI",En.allowedChildren=[ri],ri.requiredContainer=En;var Tn=W(7898),Jn=W(6039),wi=W(5832),Bn=W(1629),gi=W(3991);function Ai(Pt){return(Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function pt(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,cn(ai.key),ai)}}function cn(Pt){var St=function dt(Pt,St){if("object"!==Ai(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==Ai(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===Ai(St)?St:String(St)}function $n(Pt,St){return($n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function sn(Pt){return(sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var It=function(Pt){!function hn(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&$n(Pt,St)}(Dn,Pt);var St=function Ln(Pt){var St=function on(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=sn(Pt);if(St){var jo=sn(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Nt(Pt,St){if(St&&("object"===Ai(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function Gt(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function Et(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function Dt(Pt,St,Dn){return St&&pt(Pt.prototype,St),Dn&&pt(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1}),Pt}(Dn)}(gi.Z);It.blotName="italic",It.tagName=["EM","I"];const Ot=It;var zt=W(7256),un=W(6603);function Pn(Pt){return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function Ei(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,mo(ai.key),ai)}}function mo(Pt){var St=function xo(Pt,St){if("object"!==Pn(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==Pn(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===Pn(St)?St:String(St)}function vr(){return vr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(St,Dn,ai){var ro=function rn(Pt,St){for(;!Object.prototype.hasOwnProperty.call(Pt,St)&&null!==(Pt=Hn(Pt)););return Pt}(St,Dn);if(ro){var jo=Object.getOwnPropertyDescriptor(ro,Dn);return jo.get?jo.get.call(arguments.length<3?St:ai):jo.value}},vr.apply(this,arguments)}function Zn(Pt,St){return(Zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function Hn(Pt){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var ui=function(Pt){!function en(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&Zn(Pt,St)}(Dn,Pt);var St=function Di(Pt){var St=function Xo(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=Hn(Pt);if(St){var jo=Hn(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function po(Pt,St){if(St&&("object"===Pn(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function nr(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function ci(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function Hi(Pt,St,Dn){St&&Ei(Pt.prototype,St),Dn&&Ei(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,null,[{key:"create",value:function(ro){return"super"===ro?document.createElement("sup"):"sub"===ro?document.createElement("sub"):vr(Hn(Dn),"create",this).call(this,ro)}},{key:"formats",value:function(ro){return"SUB"===ro.tagName?"sub":"SUP"===ro.tagName?"super":void 0}}]),Dn}(un.Z);ui.blotName="script",ui.tagName=["SUB","SUP"];const bi=ui;function ao(Pt){return(ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function Wi(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,Zo(ai.key),ai)}}function Zo(Pt){var St=function xr(Pt,St){if("object"!==ao(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==ao(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===ao(St)?St:String(St)}function mn(Pt,St){return(mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function Jo(Pt){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var fr=function(Pt){!function Rt(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&mn(Pt,St)}(Dn,Pt);var St=function pi(Pt){var St=function Eo(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=Jo(Pt);if(St){var jo=Jo(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Ti(Pt,St){if(St&&("object"===ao(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function lo(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function hr(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function Ko(Pt,St,Dn){return St&&Wi(Pt.prototype,St),Dn&&Wi(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1}),Pt}(Dn)}(gi.Z);fr.blotName="strike",fr.tagName=["S","STRIKE"];const Gr=fr;function Yn(Pt){return(Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function ei(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,co(ai.key),ai)}}function co(Pt){var St=function ko(Pt,St){if("object"!==Yn(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==Yn(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===Yn(St)?St:String(St)}function Jr(Pt,St){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function an(Pt){return(an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var _n=function(Pt){!function or(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&Jr(Pt,St)}(Dn,Pt);var St=function Wr(Pt){var St=function dn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=an(Pt);if(St){var jo=an(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Xr(Pt,St){if(St&&("object"===Yn(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function Mr(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function er(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function Ii(Pt,St,Dn){return St&&ei(Pt.prototype,St),Dn&&ei(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1}),Pt}(Dn)}(un.Z);_n.blotName="underline",_n.tagName="U";const Wt=_n;var zn=W(7452),mi=W(8034);function Si(Pt){return(Si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function No(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,pr(ai.key),ai)}}function pr(Pt){var St=function Vr(Pt,St){if("object"!==Si(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==Si(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===Si(St)?St:String(St)}function Lt(){return Lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(St,Dn,ai){var ro=function bn(Pt,St){for(;!Object.prototype.hasOwnProperty.call(Pt,St)&&null!==(Pt=Kt(Pt)););return Pt}(St,Dn);if(ro){var jo=Object.getOwnPropertyDescriptor(ro,Dn);return jo.get?jo.get.call(arguments.length<3?St:ai):jo.value}},Lt.apply(this,arguments)}function Ci(Pt,St){return(Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function Kt(Pt){return(Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var Mn=function(Pt){!function jn(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&Ci(Pt,St)}(Dn,Pt);var St=function Mi(Pt){var St=function gn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=Kt(Pt);if(St){var jo=Kt(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Ki(Pt,St){if(St&&("object"===Si(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function bt(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function go(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function Sr(Pt,St,Dn){St&&No(Pt.prototype,St),Dn&&No(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,[{key:"html",value:function(){var ro=this.value();return"<span>".concat(ro.formula,"</span>")}}],[{key:"create",value:function(ro){var jo=null;if((0,mi.Z)()&&(jo=window.katex),null==jo)throw new Error("Formula module requires KaTeX.");var ia=Lt(Kt(Dn),"create",this).call(this,ro);return"string"==typeof ro&&(jo.render(ro,ia,{throwOnError:!1,errorColor:"#f00"}),ia.setAttribute("data-value",ro)),ia}},{key:"value",value:function(ro){return ro.getAttribute("data-value")}}]),Dn}(zn.Z);Mn.blotName="formula",Mn.className="ql-formula",Mn.tagName="SPAN";const _i=Mn;function Qi(Pt){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function $o(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,lr(ai.key),ai)}}function lr(Pt){var St=function rr(Pt,St){if("object"!==Qi(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==Qi(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===Qi(St)?St:String(St)}function Pr(){return Pr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(St,Dn,ai){var ro=function wr(Pt,St){for(;!Object.prototype.hasOwnProperty.call(Pt,St)&&null!==(Pt=gs(Pt)););return Pt}(St,Dn);if(ro){var jo=Object.getOwnPropertyDescriptor(ro,Dn);return jo.get?jo.get.call(arguments.length<3?St:ai):jo.value}},Pr.apply(this,arguments)}function os(Pt,St){return(os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function gs(Pt){return(gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var Ca=["alt","height","width"],Ga=function(Pt){!function Fo(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&os(Pt,St)}(Dn,Pt);var St=function fs(Pt){var St=function es(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=gs(Pt);if(St){var jo=gs(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function js(Pt,St){if(St&&("object"===Qi(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function Ta(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function Co(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function sr(Pt,St,Dn){St&&$o(Pt.prototype,St),Dn&&$o(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,[{key:"format",value:function(ro,jo){Ca.indexOf(ro)>-1?jo?this.domNode.setAttribute(ro,jo):this.domNode.removeAttribute(ro):Pr(gs(Dn.prototype),"format",this).call(this,ro,jo)}}],[{key:"create",value:function(ro){var jo=Pr(gs(Dn),"create",this).call(this,ro);return"string"==typeof ro&&jo.setAttribute("src",this.sanitize(ro)),jo}},{key:"formats",value:function(ro){return Ca.reduce(function(jo,ia){return ro.hasAttribute(ia)&&(jo[ia]=ro.getAttribute(ia)),jo},{})}},{key:"match",value:function(ro){return/\.(jpe?g|gif|png)$/.test(ro)||/^data:image\/.+;base64/.test(ro)}},{key:"register",value:function(){(0,mi.Z)()&&/Firefox/i.test(navigator.userAgent)&&setTimeout(function(){document.execCommand("enableObjectResizing",!1,!1)},1)}},{key:"sanitize",value:function(ro){return(0,zt.N)(ro,["http","https","data"])?ro:"//:0"}},{key:"value",value:function(ro){return ro.getAttribute("src")}}]),Dn}(c.EmbedBlot);Ga.blotName="image",Ga.tagName="IMG";const Fi=Ga;function ct(Pt){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function nn(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,si(ai.key),ai)}}function si(Pt){var St=function vi(Pt,St){if("object"!==ct(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==ct(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===ct(St)?St:String(St)}function Ni(){return Ni=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(St,Dn,ai){var ro=function fo(Pt,St){for(;!Object.prototype.hasOwnProperty.call(Pt,St)&&null!==(Pt=rs(Pt)););return Pt}(St,Dn);if(ro){var jo=Object.getOwnPropertyDescriptor(ro,Dn);return jo.get?jo.get.call(arguments.length<3?St:ai):jo.value}},Ni.apply(this,arguments)}function Vo(Pt,St){return(Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function rs(Pt){return(rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var $r=["height","width"],Qa=function(Pt){!function Xi(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&Vo(Pt,St)}(Dn,Pt);var St=function Go(Pt){var St=function ms(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=rs(Pt);if(St){var jo=rs(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Er(Pt,St){if(St&&("object"===ct(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function Ts(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function Ut(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function kn(Pt,St,Dn){St&&nn(Pt.prototype,St),Dn&&nn(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,[{key:"format",value:function(ro,jo){$r.indexOf(ro)>-1?jo?this.domNode.setAttribute(ro,jo):this.domNode.removeAttribute(ro):Ni(rs(Dn.prototype),"format",this).call(this,ro,jo)}},{key:"html",value:function(){var jo=this.value().video;return'<a href="'.concat(jo,'">').concat(jo,"</a>")}}],[{key:"create",value:function(ro){var jo=Ni(rs(Dn),"create",this).call(this,ro);return jo.setAttribute("frameborder","0"),jo.setAttribute("allowfullscreen",!0),jo.setAttribute("src",this.sanitize(ro)),jo}},{key:"formats",value:function(ro){return $r.reduce(function(jo,ia){return ro.hasAttribute(ia)&&(jo[ia]=ro.getAttribute(ia)),jo},{})}},{key:"sanitize",value:function(ro){return zt.Z.sanitize(ro)}},{key:"value",value:function(ro){return ro.getAttribute("src")}}]),Dn}(J.i2);Qa.blotName="video",Qa.className="ql-video",Qa.tagName="IFRAME";const Gs=Qa;var Vl=W(7309),Ma=W(9072),Lo=W(867),Ms=W(9098),cl=W.n(Ms);function Fs(Pt){return(Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function Ld(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,Cn(ai.key),ai)}}function Cn(Pt){var St=function vn(Pt,St){if("object"!==Fs(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==Fs(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===Fs(St)?St:String(St)}function Kn(Pt,St){return(Kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function ya(Pt){return(ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}var Wa=function(Pt){!function Ht(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&Kn(Pt,St)}(Dn,Pt);var St=function yi(Pt){var St=function la(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=ya(Pt);if(St){var jo=ya(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Dr(Pt,St){if(St&&("object"===Fs(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return function us(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}(Pt)}(this,ro)}}(Dn);function Dn(){return function Hl(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),St.apply(this,arguments)}return function nd(Pt,St,Dn){St&&Ld(Pt.prototype,St),Dn&&Ld(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,[{key:"length",value:function(){return 1}},{key:"value",value:function(){return"\n"}},{key:"optimize",value:function(){!this.prev&&!this.next&&this.remove()}}],[{key:"value",value:function(){return"\n"}}]),Dn}(c.EmbedBlot);Wa.blotName="multilineBreak",Wa.tagName="BR";const ft=Wa;function jt(Pt){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function hi(Pt,St){for(var Dn=0;Dn<St.length;Dn++){var ai=St[Dn];ai.enumerable=ai.enumerable||!1,ai.configurable=!0,"value"in ai&&(ai.writable=!0),Object.defineProperty(Pt,to(ai.key),ai)}}function to(Pt){var St=function Yi(Pt,St){if("object"!==jt(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==jt(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===jt(St)?St:String(St)}function so(Pt,St){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ai,ro){return ai.__proto__=ro,ai})(Pt,St)}function Wo(Pt){if(void 0===Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt}function Bt(Pt){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Dn){return Dn.__proto__||Object.getPrototypeOf(Dn)})(Pt)}function kt(Pt){return Pt.nextSibling||Pt.previousSibling?(new(cl())).insert({multilineBreak:""}):(new(cl())).insert("\n")}const ti=function(Pt){!function uo(Pt,St){if("function"!=typeof St&&null!==St)throw new TypeError("Super expression must either be null or a function");Pt.prototype=Object.create(St&&St.prototype,{constructor:{value:Pt,writable:!0,configurable:!0}}),Object.defineProperty(Pt,"prototype",{writable:!1}),St&&so(Pt,St)}(Dn,Pt);var St=function To(Pt){var St=function ln(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ro,ai=Bt(Pt);if(St){var jo=Bt(this).constructor;ro=Reflect.construct(ai,arguments,jo)}else ro=ai.apply(this,arguments);return function Ji(Pt,St){if(St&&("object"===jt(St)||"function"==typeof St))return St;if(void 0!==St)throw new TypeError("Derived constructors may only return object or undefined");return Wo(Pt)}(this,ro)}}(Dn);function Dn(ai,ro){var jo;return function Nn(Pt,St){if(!(Pt instanceof St))throw new TypeError("Cannot call a class as a function")}(this,Dn),jo=St.call(this,ai,ro),st.ZP.register(function yn(Pt,St,Dn){return(St=to(St))in Pt?Object.defineProperty(Pt,St,{value:Dn,enumerable:!0,configurable:!0,writable:!0}):Pt[St]=Dn,Pt}({},"blots/multilineBreak",ft),!0),ai.keyboard.addBinding({key:"enter",shiftKey:!0},jo.enterHandler.bind(Wo(jo))),ai.keyboard.bindings.enter.unshift(ai.keyboard.bindings.enter.pop()),ai.clipboard.addMatcher("BR",kt),jo}return function xi(Pt,St,Dn){St&&hi(Pt.prototype,St),Dn&&hi(Pt,Dn),Object.defineProperty(Pt,"prototype",{writable:!1})}(Dn,[{key:"enterHandler",value:function(ro){var jo=this.quill.getLeaf(ro.index)[0],ia=this.quill.getLeaf(ro.index+1)[0];this.quill.insertEmbed(ro.index,"multilineBreak",!0,"user"),(null===ia||jo.parent!==ia.parent)&&this.quill.insertEmbed(ro.index,"multilineBreak",!0,"user"),this.quill.setSelection(ro.index+1,st.ZP.sources.SILENT)}}]),Dn}(W(7094).Z);var Ri=W(6054),Oi=W(1342),eo=W(319);function So(Pt){return(So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(St){return typeof St}:function(St){return St&&"function"==typeof Symbol&&St.constructor===Symbol&&St!==Symbol.prototype?"symbol":typeof St})(Pt)}function Oo(Pt,St){var Dn=Object.keys(Pt);if(Object.getOwnPropertySymbols){var ai=Object.getOwnPropertySymbols(Pt);St&&(ai=ai.filter(function(ro){return Object.getOwnPropertyDescriptor(Pt,ro).enumerable})),Dn.push.apply(Dn,ai)}return Dn}function Yo(Pt){for(var St=1;St<arguments.length;St++){var Dn=null!=arguments[St]?arguments[St]:{};St%2?Oo(Object(Dn),!0).forEach(function(ai){zo(Pt,ai,Dn[ai])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Pt,Object.getOwnPropertyDescriptors(Dn)):Oo(Object(Dn)).forEach(function(ai){Object.defineProperty(Pt,ai,Object.getOwnPropertyDescriptor(Dn,ai))})}return Pt}function zo(Pt,St,Dn){return St=function jr(Pt){var St=function qr(Pt,St){if("object"!==So(Pt)||null===Pt)return Pt;var Dn=Pt[Symbol.toPrimitive];if(void 0!==Dn){var ai=Dn.call(Pt,St||"default");if("object"!==So(ai))return ai;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===St?String:Number)(Pt)}(Pt,"string");return"symbol"===So(St)?St:String(St)}(St),St in Pt?Object.defineProperty(Pt,St,{value:Dn,enumerable:!0,configurable:!0,writable:!0}):Pt[St]=Dn,Pt}function bs(Pt,St){return St.reduce(function(Dn,ai){return Dn["".concat(Pt).concat(ai.attrName)]=ai,Dn},{})}T.default.register(Yo(Yo(Yo(Yo({"attributors/attribute/direction":d.IF},bs("attributors/attribute/",eo.Qu)),bs("attributors/attribute/",Oi.yA)),{},{"attributors/class/align":y.dk,"attributors/class/background":Tn.Y,"attributors/class/color":Jn.Hn,"attributors/class/direction":d.hY,"attributors/class/font":wi._,"attributors/class/size":Bn.m,"attributors/style/align":y.HE,"attributors/style/background":Tn.w,"attributors/style/color":Jn.HQ,"attributors/style/direction":d.H8,"attributors/style/font":wi.H,"attributors/style/size":Bn.Z},bs("attributors/style/",eo.VT)),bs("attributors/style/",Oi.kk)),!0),T.default.register({"formats/align":y.dk,"formats/direction":d.hY,"formats/indent":K,"formats/background":Tn.w,"formats/color":Jn.HQ,"formats/font":wi._,"formats/size":Bn.m,"formats/blockquote":ue,"formats/code-block":Vl.ZP,"formats/header":Ue,"formats/list":ri,"formats/bold":gi.Z,"formats/code":Vl.EK,"formats/italic":Ot,"formats/link":zt.Z,"formats/script":bi,"formats/strike":Gr,"formats/underline":Wt,"formats/formula":_i,"formats/image":Fi,"formats/video":Gs,"tableModules/lite":Ri.Z,"tableModules/main":Lo.Z,"modules/syntax":Ma.ZP,"modules/multiline":ti,"modules/table":Lo.Z},!0);const Io=T.default})(),o.default})(),In.exports=W()},6428:(In,Ze,M)=>{"use strict";M.d(Ze,{B5:()=>Be,M7:()=>Xe,qB:()=>Ee,LH:()=>ze,BF:()=>on,GC:()=>xe,PQ:()=>ye,WI:()=>pt,yy:()=>Tt,GT:()=>ri,D3:()=>fe,PZ:()=>Te,VI:()=>Ue,zk:()=>qe,j_:()=>oe,uN:()=>de,Bd:()=>be,JS:()=>Bn,fM:()=>Gt,BK:()=>Et,NP:()=>tt,SK:()=>At,Zh:()=>ge,tg:()=>cn,G3:()=>st,IZ:()=>ot,HO:()=>$n,Ai:()=>Oe,rx:()=>sn,rK:()=>he,nJ:()=>Nt,d0:()=>Dt});var W=M(5704),o=M(4270),P=M(6021),b=M(3090),f=M(6946),S=M(1830),T=M(1221),y=M(2614),d=M(6772),c=M(8360),s=M(9551),a=M(127);const u="dx-filterbuilder-range",h=`${u}-start`,g=`${u}-end`,_=`${u}-separator`,x="\u2013";function w(It,Ot){const zt=(0,W.A)("<div>").addClass(h),un=(0,W.A)("<div>").addClass(g);let Pn=It.value||[];const ci=function(Hi){return Hi&&Hi.length>0?Hi[0]:null},Ei=function(Hi){return Hi&&2===Hi.length?Hi[1]:null};Ot.append(zt),Ot.append((0,W.A)("<span>").addClass(_).text(x)),Ot.append(un),Ot.addClass(u),this._editorFactory.createEditor.call(this,zt,(0,b.X)({},It.field,It,{value:ci(Pn),parentType:"filterBuilder",setValue(Hi){Pn=[Hi,Ei(Pn)],It.setValue(Pn)}})),this._editorFactory.createEditor.call(this,un,(0,b.X)({},It.field,It,{value:Ei(Pn),parentType:"filterBuilder",setValue(Hi){Pn=[ci(Pn),Hi],It.setValue(Pn)}}))}function D(It,Ot){return{name:"between",caption:It,icon:"range",valueSeparator:x,dataTypes:["number","date","datetime"],editorTemplate:w.bind(Ot),notForLookup:!0}}const C={"=":"equal","<>":"notequal","<":"less","<=":"lessorequal",">":"greater",">=":"greaterorequal",notcontains:"doesnotcontain",contains:"contains",startswith:"startswith",endswith:"endswith",isblank:"isblank",isnotblank:"isnotblank"},I={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",isblank:"isBlank",isnotblank:"isNotBlank",between:"between"},L={getIconByFilterOperation:It=>C[It],getNameByFilterOperation:It=>I[It]},N="string",k="and",U="=",B="<>",K={number:["=","<>","<",">","<=",">=","isblank","isnotblank"],string:["contains","notcontains","startswith","endswith","=","<>","isblank","isnotblank"],date:["=","<>","<",">","<=",">=","isblank","isnotblank"],datetime:["=","<>","<",">","<=",">=","isblank","isnotblank"],boolean:["=","<>","isblank","isnotblank"],object:["isblank","isnotblank"]},J={date:"shortDate",datetime:"shortDateShortTime"},ie=["=","<>","isblank","isnotblank"],re=["caption","customizeText","dataField","dataType","editorTemplate","falseText","editorOptions","filterOperations","format","lookup","trueText","calculateFilterExpression","name"];function z(It){return It&&It.length>1&&"!"===It[0]&&!st(It)}function oe(It){return z(It)?It[1]:It}function he(It,Ot){let un;return function ee(It,Ot){-1!==Ot.indexOf("!")?z(It)||function(zt){const un=zt.slice(0);zt.length=0,zt.push("!",un)}(It):z(It)&&function(zt){const un=oe(zt);zt.length=0,[].push.apply(zt,un)}(It)}(It,Ot),function(Pn,ci){for(un=0;un<Pn.length;un++)Array.isArray(Pn[un])||(Pn[un]=ci)}(oe(It),Ot=-1===(Pn=Ot).indexOf("!")?Pn:Pn.substring(1)),It;var Pn}function de(It,Ot){const zt=be(It);return Ot.filter(un=>un.value===zt)[0]}function ue(It){if(st(It))return k;let Ot="";for(let zt=0;zt<It.length;zt++){const un=It[zt];if(!Array.isArray(un)){if(Ot&&Ot!==un)throw new y.sO.Error("E4019");"!"!==un&&(Ot=un)}}return Ot}function be(It){const Ot=oe(It);let zt=ue(Ot);return zt||(zt=k),Ot!==It&&(zt=`!${zt}`),zt}function Ce(It){const Ot=function le(It){return Array.isArray(It)&&It.length}(It.filterOperations)?It.filterOperations:function ve(It){return It.lookup&&ie||K[It.dataType||N]}(It);return(0,b.X)([],Ot)}function ye(It,Ot){const zt=L.getNameByFilterOperation(It);return Ot&&Ot[zt]?Ot[zt]:zt}function ge(It,Ot){for(let zt=0;zt<Ot.length;zt++)if(Ot[zt].value===It)return Ot[zt];throw new a.A.Error("E1048",It)}function fe(It,Ot){const zt=It.filter(un=>un.name===Ot);return zt.length?zt[0]:null}function xe(It,Ot,zt){const un=Ce(It),Pn=!!It.lookup;return zt.forEach(ci=>{if(!It.filterOperations&&-1===un.indexOf(ci.name)){const Ei=ci&&ci.dataTypes;(!Pn||!ci.notForLookup)&&Ei&&Ei.indexOf(It.dataType||N)>=0&&un.push(ci.name)}}),un.map(ci=>{const Ei=fe(zt,ci);return Ei?{icon:Ei.icon||"icon-none",text:Ei.caption||(0,f.Bc)(Ei.name),value:Ei.name,isCustom:!0}:{icon:L.getIconByFilterOperation(ci)||"icon-none",text:ye(ci,Ot),value:ci}})}function Te(It){return It.defaultFilterOperation||Ce(It)[0]}function Ee(It,Ot){const zt=[It.dataField,"",""];return Dt(zt,Te(It),Ot),zt}function Oe(It,Ot){const zt=oe(It),un=zt.indexOf(Ot);return zt.splice(un,1),1!==zt.length&&zt.splice(un,1),It}function ze(It){const Ot=Pe(It),zt=Ot?Se(It):It;return Ot?["!",[zt]]:[zt]}function Be(It,Ot){const zt=oe(Ot),un=be(zt);return 1===zt.length?zt.unshift(It):zt.push(It,un),Ot}function Ue(It,Ot){for(let un=0;un<Ot.length;un++)if(Ot[un].name===It||Ot[un].dataField.toLowerCase()===It.toLowerCase())return Ot[un];const zt=Bn(Ot,!0).filter(un=>un.dataField.toLowerCase()===It.toLowerCase());if(zt.length>0)return zt[0];throw new a.A.Error("E1047",It)}function ot(It){return!!Array.isArray(It)&&(It.length<2||Array.isArray(It[0])||Array.isArray(It[1]))}function st(It){return!!Array.isArray(It)&&It.length>1&&!Array.isArray(It[0])&&!Array.isArray(It[1])}function et(It,Ot,zt){zt=zt||k;const un=ue(It).toLowerCase()||zt;let Pn=[];for(let ci=0;ci<It.length;ci++)ot(It[ci])?(Pn.push(Xe(It[ci],Ot,zt)),Pn=Fe(Pn,un)):st(It[ci])&&(Pn.push(Ye(It[ci],Ot)),Pn=Fe(Pn,un));return 0===Pn.length&&(Pn=Fe(Pn,un)),Pn}function Ye(It,Ot){return function Ke(It,Ot){const zt=fe(Ot,It[1]);return zt&&zt.name===It[1]}(It,Ot)||It.length<3&&(It[2]=It[1],It[1]=U),It}function Pe(It){return-1!==It.indexOf("not")}function Se(It){return It.substring(3).toLowerCase()}function Re(It,Ot){const zt=Pe(Ot);return Ot=zt?Se(Ot):Ot,zt?["!",It,Ot]:[It,Ot]}function Fe(It,Ot){const zt=Pe(Ot);Ot=zt?Se(Ot):Ot,It.push(Ot);let un=It;return zt&&(un=["!",un]),un}function Xe(It,Ot,zt){return zt=zt||k,It?st(It=(0,b.X)(!0,[],It))?Re(Ye(It,Ot),zt):z(It)?["!",st(It[1])?Re(Ye(It[1],Ot),zt):z(It[1])?Re(Xe(It[1],Ot),zt):et(It[1],Ot,zt)]:et(It,Ot,zt):ze(zt)}function tt(It){return It.reduce((Ot,zt)=>{if((0,S.O9)(zt.dataField)){const un={};for(const Pn in zt)zt[Pn]&&re.includes(Pn)&&(un[Pn]=zt[Pn]);un.defaultCalculateFilterExpression=s.A.defaultCalculateFilterExpression,(0,S.O9)(un.dataType)||(un.dataType=N),(0,S.O9)(un.trueText)||(un.trueText=c.A.format("dxDataGrid-trueText")),(0,S.O9)(un.falseText)||(un.falseText=c.A.format("dxDataGrid-falseText")),Ot.push(un)}return Ot},[])}function vt(It,Ot,zt,un){const Pn=Ue(It[0],Ot),ci=Ye(It,zt),Ei=zt.length&&fe(zt,ci[1]);return Ei&&Ei.calculateFilterExpression?Ei.calculateFilterExpression.apply(Ei,[ci[2],Pn,Ot]):Pn.createFilterExpression?Pn.createFilterExpression.apply(Pn,[ci[2],ci[1],un]):Pn.calculateFilterExpression?Pn.calculateFilterExpression.apply(Pn,[ci[2],ci[1],un]):Pn.defaultCalculateFilterExpression.apply(Pn,[ci[2],ci[1],un])}function qe(It,Ot,zt,un){if(!(0,S.O9)(It))return null;if(z(It))return["!",qe(It[1],Ot,zt,un)];const Pn=oe(It);if(st(Pn))return vt(Pn,Ot,zt,un)||null;let Ei,ci=[];const Hi=be(Pn);for(let mo=0;mo<Pn.length;mo++)ot(Pn[mo])?(Ei=qe(Pn[mo],Ot,zt,un),Ei&&(mo&&ci.push(Hi),ci.push(Ei))):st(Pn[mo])&&(Ei=vt(Pn[mo],Ot,zt,un),Ei&&(ci.length&&ci.push(Hi),ci.push(Ei)));return 1===ci.length&&(ci=ci[0]),ci.length?ci:null}function At(It){const Ot=oe(It);let zt;if(0===Ot.length)return null;const un=[];for(zt=0;zt<Ot.length;zt++)if(ot(Ot[zt])){const Pn=At(Ot[zt]);Pn?Ot[zt]=Pn:un.push(Ot[zt])}else st(Ot[zt])&&(dt(Ot[zt])||un.push(Ot[zt]));for(zt=0;zt<un.length;zt++)Oe(Ot,un[zt]);return 1===Ot.length||(Ot.splice(Ot.length-1,1),1===Ot.length&&(It=function ae(It,Ot){return z(It)?It[1]=Ot:It=Ot,It}(It,Ot[0])),0===It.length)?null:It}function Tt(It,Ot,zt){if(""===Ot)return void zt("");const{lookup:un}=It;if(un.items)zt(un.calculateCellValue(Ot)||"");else{const Pn=(0,S.Tn)(un.dataSource)?un.dataSource({}):un.dataSource;new T.q(Pn).loadSingle(un.valueExpr,Ot).done(Ei=>{let Hi="";Ei&&(Hi=un.displayExpr?(0,o.Hz)(un.displayExpr)(Ei):Ei),It.customizeText&&(Hi=It.customizeText({value:Ot,valueText:Hi})),zt(Hi)}).fail(()=>{zt("")})}}function qt(It,Ot,zt,un,Pn){let ci;return ci=!0===Ot?It.trueText||c.A.format("dxDataGrid-trueText"):!1===Ot?It.falseText||c.A.format("dxDataGrid-falseText"):function pe(It,Ot){return d.A.format(Ot,It.format||J[It.dataType])}(It,Ot),It.customizeText&&(ci=It.customizeText.call(It,{value:Ot,valueText:ci,target:un})),zt&&zt.customizeText&&(ci=zt.customizeText.call(zt,{value:Ot,valueText:ci,field:It,target:un},Pn)),ci}function En(It){return""===It||null===It}function ri(It,Ot,zt){let un=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"filterBuilder";if(En(Ot))return"";if(Array.isArray(Ot)){const Pn=new P.cY;return P.z7.apply(this,function wt(It,Ot,zt,un){const Pn={values:Ot};return Ot.map(ci=>qt(It,ci,zt,un,Pn))}(It,Ot,zt,un)).done(function(){for(var ci=arguments.length,Ei=new Array(ci),Hi=0;Hi<ci;Hi++)Ei[Hi]=arguments[Hi];const mo=Ei.some(xo=>!En(xo))?Ei.map(xo=>En(xo)?"?":xo):"";Pn.resolve(mo)}),Pn}return qt(It,Ot,zt,un)}function Tn(It,Ot){return It.some(zt=>zt.dataField===Ot)}function Jn(It,Ot,zt){const{dataField:un}=zt;gi(un)&&(zt.parentId=Ai(un),!Tn(Ot,zt.parentId)&&!Tn(It,zt.parentId)&&Jn(It,Ot,{id:zt.parentId,dataType:"object",dataField:zt.parentId,caption:wi(zt.parentId,!0),filterOperations:["isblank","isnotblank"],defaultCalculateFilterExpression:s.A.defaultCalculateFilterExpression})),Ot.push(zt)}function wi(It,Ot){let zt="";if(Ot)It=It.substring(It.lastIndexOf(".")+1);else if(gi(It))return It.split(".").forEach((un,Pn,ci)=>{zt+=(0,f.Bc)(un),Pn!==ci.length-1&&(zt+=".")}),zt;return(0,f.Bc)(It)}function Bn(It,Ot){const zt=[];for(let un=0;un<It.length;un++){const Pn=(0,b.X)(!0,{caption:wi(It[un].dataField,Ot)},It[un]);Pn.id=Pn.name||Pn.dataField,Ot?Jn(It,zt,Pn):zt.push(Pn)}return zt}function gi(It){return-1!==It.lastIndexOf(".")}function Ai(It){return It.substring(0,It.lastIndexOf("."))}function pt(It,Ot){if(gi(It.dataField)){const zt=Ai(It.dataField);for(let un=0;un<Ot.length;un++)if(Ot[un].dataField===zt)return`${pt(Ot[un],Ot)}.${It.caption}`}return It.caption}function Dt(It,Ot,zt){let un=fe(zt,Ot);return un?(!1===un.hasValue?(It[1]=Ot,It.length=2):(It[1]=Ot,It[2]=""),It):("isblank"===Ot?(It[1]=U,It[2]=null):"isnotblank"===Ot?(It[1]=B,It[2]=null):(un=fe(zt,It[1]),(un||2===It.length||null===It[2])&&(It[2]=""),It[1]=Ot),It)}function cn(It){let Ot;return Ot=null===It[2]?It[1]===U?"isblank":"isnotblank":It[1],Ot}function dt(It){return""!==It[2]}function Et(It,Ot,zt){const un=(0,b.X)(!0,[],It);let Pn=-1;return un.some((ci,Ei)=>{if("between"===ci.name)return Pn=Ei,!0}),-1!==Pn?un[Pn]=(0,b.X)(D(Ot,zt),un[Pn]):un.unshift(D(Ot,zt)),un}function hn(It,Ot){return It[0]===Ot}function $n(It,Ot){return It&&0!==It.length?st(It)?hn(It,Ot)?null:It:Ln(It,[Ot],!1):null}function Ln(It,Ot,zt){const un=[];return It.forEach(Pn=>{st(Pn)?hn(Pn,Ot[0])?zt?(un.push(Ot),zt=!1):un.splice(un.length-1,1):un.push(Pn):(un.length||ot(Pn))&&un.push(Pn)}),0===un.length?null:(zt&&(un.push(k),un.push(Ot)),1===un.length?un[0]:un)}function Nt(It,Ot){return null===It||0===It.length?Ot:st(It)?hn(It,Ot[0])?Ot:[It,k,Ot]:be(It)!==k?[Ot,"and",It]:Ln(It,Ot,!0)}function Gt(It,Ot){return null===It||0===It.length?[]:st(It)?hn(It,Ot)?[It]:[]:be(It)!==k?[]:It.filter(Pn=>st(Pn)&&hn(Pn,Ot))}function on(It,Ot){return null!==It&&0!==It.length&&(st(It)?It[0]===Ot:It.some(zt=>(st(zt)||ot(zt))&&on(zt,Ot)))}const sn=function(It,Ot,zt){if(Array.isArray(Ot)){const un=Ot.length-1;It.empty(),Ot.forEach((Pn,ci)=>{(0,W.A)("<span>").addClass("dx-filterbuilder-text-part").text(Pn).appendTo(It),ci!==un&&(0,W.A)("<span>").addClass("dx-filterbuilder-text-separator").text(zt&&zt.valueSeparator?zt.valueSeparator:"|").addClass("dx-filterbuilder-text-separator-empty").appendTo(It)})}else It.text(Ot||c.A.format("dxFilterBuilder-enterValueText"))}},6218:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>et});var W=M(2925),o=M(5704),P=M(4859),b=M(6021),f=M(1832),S=M(3090),T=M(2660),y=M(1363),d=M(1830),c=M(778),s=M(4072),a=M(1110),u=M(9293),h=M(8360),g=M(6232),_=M(9212),x=M(3376),w=M(8736);const C="rowsView",L=["columnHeadersView",C,"footerView"],ue="dxDataGrid-ariaAdaptiveExpand";function le(Ke,Ye){return Ke._columnsController.getColumnId(Ye)}function ye(Ke,Ye){let Pe;const Se=(0,o.A)(Ke),Re=Ye.component.getController("adaptiveColumns");"data"===Ye.rowType?(Pe=(0,o.A)("<span>").addClass(Re.addWidgetPrefix("adaptive-more")),s.A.on(Pe,(0,u.b4)(c.U,"dxDataGridAdaptivity"),Re.createAction(()=>{Re.toggleExpandAdaptiveDetailRow(Ye.key)})),Pe.appendTo(Se)):w.A.setEmptyText(Se)}function ge(Ke){var Ye;const Pe=null===(Ye=Ke.data)||void 0===Ye?void 0:Ye.$nextCell;s.A.off(Pe,"focus",ge),s.A.trigger(Pe,"dxclick")}const et={defaultOptions:()=>({columnHidingEnabled:!1,onAdaptiveDetailRowPreparing:null}),controllers:{adaptiveColumns:class fe extends x.Ay.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._editingController=this.getController("editing"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._rowsView=this.getView("rowsView"),this._columnsController.addCommandColumn({type:"adaptive",command:"adaptive",visible:!0,adaptiveHidden:!0,cssClass:"dx-command-adaptive",alignment:"center",width:"auto",cellTemplate:ye,fixedPosition:"right"}),this._columnsController.columnsChanged.add(()=>{const Ye=!!this.updateHidingQueue(this._columnsController.getColumns()).length;this._columnsController.columnOption("command:adaptive","adaptiveHidden",!Ye,!0)}),this._hidingColumnsQueue=[],this._hiddenColumns=[],this.createAction("onAdaptiveDetailRowPreparing"),super.init()}optionChanged(Ye){"columnHidingEnabled"===Ye.name&&this._columnsController.columnOption("command:adaptive","adaptiveHidden",!Ye.value),super.optionChanged(Ye)}publicMethods(){return["isAdaptiveDetailRowExpanded","expandAdaptiveDetailRow","collapseAdaptiveDetailRow"]}_isRowEditMode(){return"row"===this._getEditMode()}_isItemModified(Ye,Pe){const Se=this._columnsController.getVisibleIndex(Ye.column.index),Re=this._dataController.getRowIndexByKey(Pe.key),Fe=this._dataController.items()[Re+1];return Fe&&Fe.modifiedValues&&(0,d.O9)(Fe.modifiedValues[Se])}_renderFormViewTemplate(Ye,Pe,Se){const Re=this,{column:Fe}=Ye,Xe=Re.createAction(()=>{Re._editingController.isEditing()&&s.A.trigger(Se,c.U)}),tt=Pe.row.data,vt=Fe.calculateCellValue(tt),qe=w.A.getDisplayValue(Fe,vt,tt,Pe.rowType),At=w.A.formatValue(qe,Fe),Tt=this._editingController.isCellOrBatchEditMode(),qt=Re._rowsView;if(Fe.allowEditing&&this._keyboardNavigationController.isKeyboardEnabled()&&(Se.attr("tabIndex",Re.option("tabIndex")),Tt&&(s.A.off(Se,"focus",Xe),s.A.on(Se,"focus",Xe))),Fe.cellTemplate){const wt=(0,S.X)({},Pe,{value:vt,displayValue:qe,text:At,column:Fe});qt.renderTemplate(Se,Fe.cellTemplate,wt,(0,f.A1)(Se)).done(()=>{qt._cellPrepared(Se,Pe)})}else{const wt=Se.get(0);Fe.encodeHtml?wt.textContent=At:wt.innerHTML=At,Se.addClass("dx-adaptive-item-text"),(!(0,d.O9)(At)||""===At)&&Se.html("&nbsp;"),Re._isRowEditMode()||Re._isItemModified(Ye,Pe)&&Se.addClass("dx-item-modified"),qt._cellPrepared(Se,Pe)}}_getTemplate(Ye,Pe,Se){const Re=this,{column:Fe}=Ye,Xe=this._editingController;return function(tt,vt){const qe=(0,o.A)(vt),At=Re._columnsController.getVisibleIndex(Fe.index),Tt=(0,S.X)({},Pe),qt=function(){const wt=Re._isItemEdited(Ye);Tt.value=Pe.row.values[At],wt||Fe.showEditorAlways?Xe.renderFormEditorTemplate(Tt,Ye,tt,qe,!wt):(Tt.column=Fe,Tt.columnIndex=At,Re._renderFormViewTemplate(Ye,Tt,qe))};if(qt(),Tt.watch){const wt=Tt.watch(()=>({isItemEdited:Re._isItemEdited(Ye),value:Pe.row.values[At]}),()=>{qe.contents().remove(),qe.removeClass("dx-adaptive-item-text"),qt()});s.A.on(qe,a.N,wt)}}}_isVisibleColumnsValid(Ye){return!(Ye<2||Ye.length-function(){let Pe=0;for(let Se=0;Se<Ye.length;Se++)Ye[Se].command&&Pe++;return Pe}()<=1)}_calculatePercentWidths(Ye,Pe){const Se=this;let Re=0;return Pe.forEach((Fe,Xe)=>{"adaptiveHidden"!==Ye[Xe]&&(Re+=Se._getItemPercentWidth(Fe))}),Re}_isPercentWidth(Ye){return(0,d.Kg)(Ye)&&Ye.endsWith("%")}_isColumnHidden(Ye){return this._hiddenColumns.filter(Pe=>Pe.index===Ye.index).length>0}_getAverageColumnsWidth(Ye,Pe,Se){const Re=this;let Fe=0,Xe=0;return Pe.forEach(tt=>{if(!Re._isColumnHidden(tt)){const{width:vt}=tt;(0,d.O9)(vt)&&!isNaN(parseFloat(vt))?Fe+=Re._isPercentWidth(vt)?Re._calculatePercentWidth({visibleIndex:tt.visibleIndex,columnsCount:Pe.length,columnsCanFit:Se,bestFitWidth:tt.bestFitWidth,columnWidth:vt,containerWidth:Ye}):parseFloat(vt):Xe++}}),(Ye-Fe)/Xe}_calculateColumnWidth(Ye,Pe,Se,Re){const Fe=le(this,Ye),Xe=this._columnsController.columnOption(Fe,"width"),tt=this._columnsController.columnOption(Fe,"bestFitWidth"),vt=Se.length;let qe;if(Xe&&"auto"!==Xe){if(!this._isPercentWidth(Xe))return parseFloat(Xe);qe=this._calculatePercentWidth({visibleIndex:Ye.visibleIndex,columnsCount:vt,columnsCanFit:Re,bestFitWidth:tt,columnWidth:Xe,containerWidth:Pe})}else qe=this.option("columnAutoWidth")||Ye.command?tt:this._getAverageColumnsWidth(Pe,Se,Re);return qe}_calculatePercentWidth(Ye){const Pe=Ye.visibleIndex<Ye.columnsCount-1&&Ye.columnsCanFit,Se=Ye.containerWidth*parseFloat(Ye.columnWidth)/100,Re=Ye.columnsCanFit&&Se<Ye.bestFitWidth?Ye.bestFitWidth:Se;return Pe?Ye.containerWidth*parseFloat(Ye.columnWidth)/100:Re}_getNotTruncatedColumnWidth(Ye,Pe,Se,Re){const Fe=le(this,Ye),Xe=this._columnsController.columnOption(Fe,"width"),tt=this._columnsController.columnOption(Fe,"bestFitWidth");if(Xe&&"auto"!==Xe&&!this._isPercentWidth(Xe))return parseFloat(Xe);const vt=this._calculateColumnWidth(Ye,Pe,Se,Re);return vt<tt?null:vt}_getItemPercentWidth(Ye){let Pe=0;return Ye.width&&this._isPercentWidth(Ye.width)&&(Pe=parseFloat(Ye.width)),Pe}_getCommandColumnsWidth(){const Ye=this,Pe=Ye._columnsController.getVisibleColumns();let Se=0;return(0,T.__)(Pe,(Re,Fe)=>{(Fe.index<0||Fe.command)&&(Se+=Ye._columnsController.columnOption(le(Ye,Fe),"bestFitWidth")||0)}),Se}_isItemEdited(Ye){if(this.isFormOrPopupEditMode())return!1;if(!this._isRowEditMode()){const Pe=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,Se=this._columnsController.getVisibleIndex(Ye.column.index);return this._editingController.isEditCell(Pe,Se)}{const Pe=this.option("editing.editRowKey");if((0,P.RL)(Pe,this._dataController.adaptiveExpandedKey()))return!0}}_getFormItemsByHiddenColumns(Ye){const Pe=[];return(0,T.__)(Ye,(Se,Re)=>{Pe.push({column:Re,name:Re.name,dataField:Re.dataField,visibleIndex:Re.visibleIndex})}),Pe}_getAdaptiveColumnVisibleIndex(Ye){for(let Pe=0;Pe<Ye.length;Pe++)if("adaptive"===Ye[Pe].command)return Pe}_hideAdaptiveColumn(Ye,Pe){const Se=this._getAdaptiveColumnVisibleIndex(Pe);(0,d.O9)(Se)&&(Ye[Se]="adaptiveHidden",this._hideVisibleColumn({isCommandColumn:!0,visibleIndex:Se}))}_showHiddenCellsInView(Ye){let{$cells:Pe,isCommandColumn:Se}=Ye,Re=this.addWidgetPrefix("hidden-column");Se?(Re="dx-command-adaptive-hidden",Pe.attr({tabIndex:0,"aria-hidden":null}).removeClass(Re)):Pe.removeClass(Re)}_showHiddenColumns(){for(let Ye=0;Ye<L.length;Ye++){const Pe=this.getView(L[Ye]);if(Pe&&Pe.isVisible()&&Pe.element()){const Se=Pe.name,Re=Pe.element().find(".dx-command-adaptive-hidden");this._showHiddenCellsInView({viewName:Se,$cells:Re,isCommandColumn:!0});const Fe=Pe.element().find(`.${this.addWidgetPrefix("hidden-column")}`);this._showHiddenCellsInView({viewName:Se,$cells:Fe})}}}_isCellValid(Ye){return Ye&&Ye.length&&!Ye.hasClass("dx-master-detail-cell")&&!Ye.hasClass("dx-group-cell")}_hideVisibleColumn(Ye){let{isCommandColumn:Pe,visibleIndex:Se}=Ye;const Re=this;L.forEach(Fe=>{const Xe=Re.getView(Fe);Xe&&Re._hideVisibleColumnInView({view:Xe,isCommandColumn:Pe,visibleIndex:Se})})}_hideVisibleColumnInView(Ye){let{view:Pe,isCommandColumn:Se,visibleIndex:Re}=Ye;const Fe=Pe.name;let Xe;const tt=this._columnsController.getVisibleColumns()[Re],vt=this._editingController&&this._editingController.getEditFormRowIndex();if(Pe&&Pe.isVisible()&&tt){const qe=Pe.getRowsCount(),At=Pe._getRowElements();for(let Tt=0;Tt<qe;Tt++)if(Tt!==vt||Fe!==C||"popup"===this.option("editing.mode")){const wt="columnHeadersView"===Fe?this._columnsController.getVisibleIndex(tt.index,Tt):Re;if(wt>=0){const En=At.eq(Tt);Xe=this._findCellElementInRow(En,wt),this._isCellValid(Xe)&&this._hideVisibleCellInView({viewName:Fe,isCommandColumn:Se,$cell:Xe})}}}}_findCellElementInRow(Ye,Pe){const Se=Ye.children();let Re=Pe,Fe=!1;if(Ye.hasClass("dx-group-row")){const tt=Ye.find(".dx-group-cell"),vt=tt.attr("colspan");if(tt.length&&(0,d.O9)(vt)){const qe=parseInt(vt);Pe>tt.index()+qe-1?Re=Pe-qe+1:Fe=!0}}return Fe?void 0:Se.eq(Re)}_hideVisibleCellInView(Ye){let{$cell:Pe,isCommandColumn:Se}=Ye;const Re=Se?"dx-command-adaptive-hidden":this.addWidgetPrefix("hidden-column");Pe.attr({tabIndex:-1,"aria-hidden":!0}).addClass(Re)}_getEditMode(){return this._editingController.getEditMode()}isFormOrPopupEditMode(){const Ye=this._getEditMode();return"form"===Ye||"popup"===Ye}hideRedundantColumns(Ye,Pe,Se){const Re=this;if(this._hiddenColumns=[],Re._isVisibleColumnsValid(Pe)&&Se.length){let Fe=0;const Xe=Re.component.$element();let tt=(0,y.RG)(Xe)-Re._getCommandColumnsWidth();const vt=function(){return Pe.filter(En=>!En.command&&0===this._hiddenColumns.filter(ri=>ri.index===En.index).length)}.bind(this);let qe=vt();const At=qe.length;let Tt,qt,wt;do{wt=!1,Fe=0;const En=Re._calculatePercentWidths(Ye,Pe),ri=En<100&&0!==En;for(Tt=0;Tt<Pe.length;Tt++){const Tn=Pe[Tt];let Jn=Re._getNotTruncatedColumnWidth(Tn,tt,qe,ri);const wi=le(Re,Tn),Bn=Re._columnsController.columnOption(wi,"width"),gi=Re._columnsController.columnOption(wi,"minWidth"),Ai=Re._columnsController.columnOption(wi,"bestFitWidth");if("adaptiveHidden"!==Ye[Tt]){if(!Jn&&!Tn.command&&!Tn.fixed){wt=!0;break}(!Bn||"auto"===Bn)&&(Jn=Math.max(Ai||0,gi||0)),("adaptive"!==Tn.command||qt)&&(Fe+=Jn)}else qt=!0}if(wt=wt||Fe>(0,y.RG)(Xe),wt){const Tn=Se.pop(),Jn=Re._columnsController.getVisibleIndex(Tn.index);tt+=Re._calculateColumnWidth(Tn,tt,qe,ri),Re._hideVisibleColumn({visibleIndex:Jn}),Ye[Jn]="adaptiveHidden",this._hiddenColumns.push(Tn),qe=vt()}}while(wt&&qe.length>1&&Se.length);At===qe.length&&Re._hideAdaptiveColumn(Ye,Pe)}else Re._hideAdaptiveColumn(Ye,Pe)}getAdaptiveDetailItems(){return this._$itemContents}getItemContentByColumnIndex(Ye){let Pe;for(let Se=0;Se<this._$itemContents.length;Se++){Pe=this._$itemContents.eq(Se);const Re=Pe.data("dx-form-item");if(Re&&Re.column&&this._columnsController.getVisibleIndex(Re.column.index)===Ye)return Pe}}toggleExpandAdaptiveDetailRow(Ye,Pe){this.isFormOrPopupEditMode()&&this._editingController.isEditing()||this._dataController.toggleExpandAdaptiveDetailRow(Ye,Pe)}createFormByHiddenColumns(Ye,Pe){const Se=this,Re=(0,o.A)(Ye),Fe={items:Se._getFormItemsByHiddenColumns(Se._hiddenColumns),formID:`dx-${new W.A}`},Xe=(0,_.gx)()?{colCount:2}:{};this.executeAction("onAdaptiveDetailRowPreparing",{formOptions:Fe}),Se._$itemContents=null,Se._form=Se._createComponent((0,o.A)("<div>").appendTo(Re),g.A,(0,S.X)(Xe,Fe,{customizeItem(tt){const vt=tt.column||Se._columnsController.columnOption(tt.name||tt.dataField);vt&&(tt.label=tt.label||{},tt.label.text=tt.label.text||vt.caption,tt.column=vt,tt.template=Se._getTemplate(tt,Pe,Se.updateForm.bind(Se))),Fe.customizeItem&&Fe.customizeItem.call(this,tt)},onContentReady(tt){Fe.onContentReady&&Fe.onContentReady.call(this,tt),Se._$itemContents=Re.find(".dx-field-item-content")}}))}hasAdaptiveDetailRowExpanded(){return(0,d.O9)(this._dataController.adaptiveExpandedKey())}updateForm(Ye){this.hasAdaptiveDetailRowExpanded()&&this._form&&(0,d.O9)(this._form._contentReadyAction)&&(Ye&&Ye.length?this._form.option("items",this._getFormItemsByHiddenColumns(Ye)):this._form.repaint())}updateHidingQueue(Ye){const Pe=this,Se=Ye.filter(Xe=>Xe.visible&&!Xe.type&&!Xe.fixed&&!((0,d.O9)(Xe.groupIndex)&&Xe.groupIndex>=0));let Re,Fe;if(Pe._hidingColumnsQueue=[],Pe.option("allowColumnResizing")&&"widget"===Pe.option("columnResizingMode"))return Pe._hidingColumnsQueue;for(Fe=0;Fe<Se.length;Fe++)(0,d.O9)(Se[Fe].hidingPriority)&&Se[Fe].hidingPriority>=0&&(Re=!0,Pe._hidingColumnsQueue[Se[Fe].hidingPriority]=Se[Fe]);if(Re)Pe._hidingColumnsQueue.reverse();else if(Pe.option("columnHidingEnabled"))for(Fe=0;Fe<Se.length;Fe++){const Xe=Pe._columnsController.getVisibleIndex(Se[Fe].index);Pe._hidingColumnsQueue[Xe]=Se[Fe]}return Pe._hidingColumnsQueue=Pe._hidingColumnsQueue.filter(Object),Pe._hidingColumnsQueue}getHiddenColumns(){return this._hiddenColumns}hasHiddenColumns(){return this._hiddenColumns.length>0}getHidingColumnsQueue(){return this._hidingColumnsQueue}isAdaptiveDetailRowExpanded(Ye){const Pe=this._dataController;return Pe.adaptiveExpandedKey()&&(0,P.RL)(Pe.adaptiveExpandedKey(),Ye)}expandAdaptiveDetailRow(Ye){this.hasAdaptiveDetailRowExpanded()||this.toggleExpandAdaptiveDetailRow(Ye)}collapseAdaptiveDetailRow(){this.hasAdaptiveDetailRowExpanded()&&this.toggleExpandAdaptiveDetailRow()}updateCommandAdaptiveAriaLabel(Ye,Pe){const Se=this._dataController.getRowIndexByKey(Ye);if(-1===Se)return;const Re=(0,o.A)(this.component.getRowElement(Se));this.setCommandAdaptiveAriaLabel(Re,Pe)}setCommandAdaptiveAriaLabel(Ye,Pe){Ye.find(".dx-command-adaptive").attr("aria-label",h.A.format(Pe))}}},extenders:{views:{rowsView:Ke=>class extends Ke{_getCellTemplate(Ye){const Pe=this,{column:Se}=Ye;return"detailAdaptive"===Ye.rowType&&"detail"===Se.command?function(Re,Fe){Pe._adaptiveColumnsController.createFormByHiddenColumns((0,o.A)(Re),Fe)}:super._getCellTemplate(Ye)}_createRow(Ye){const Pe=super._createRow.apply(this,arguments);return Ye&&"detailAdaptive"===Ye.rowType&&Ye.key===this._dataController.adaptiveExpandedKey()&&Pe.addClass("dx-adaptive-detail-row"),Pe}_renderCells(Ye,Pe){super._renderCells(Ye,Pe);const Se=this._adaptiveColumnsController,Re=Se.getHidingColumnsQueue().length,Fe=Se.getHiddenColumns().length;Re&&!Fe&&function Ce(Ke){return Ke.find("td:not(.dx-datagrid-hidden-column):not([class*='dx-command-'])")}(Ye).last().addClass("dx-last-data-cell"),"data"===Pe.row.rowType&&Se.setCommandAdaptiveAriaLabel(Ye,ue)}_getColumnIndexByElementCore(Ye){const Pe=Ye.closest(".dx-field-item-content");if(Pe.length&&Pe.closest(this.component.$element()).length){const Se=Pe.length?Pe.first().data("dx-form-item"):null;return Se&&Se.column&&this._columnsController.getVisibleIndex(Se.column.index)}return super._getColumnIndexByElementCore(Ye)}_cellPrepared(Ye,Pe){super._cellPrepared.apply(this,arguments),"detailAdaptive"!==Pe.row.rowType&&"adaptiveHidden"===Pe.column.visibleWidth&&Ye.addClass(this.addWidgetPrefix("hidden-column"))}getCell(Ye,Pe){const Se=this._dataController.items()[Ye?.rowIndex];if("detailAdaptive"===Se?.rowType){const Re=this._adaptiveColumnsController.getAdaptiveDetailItems();return super.getCell(Ye,Pe,Re)}return super.getCell.apply(this,arguments)}_getCellElement(Ye,Pe){const Se=this._dataController.items()[Ye];return Se&&"detailAdaptive"===Se.rowType?this._adaptiveColumnsController.getItemContentByColumnIndex(Pe):super._getCellElement.apply(this,arguments)}getContextMenuItems(Ye){var Pe;if(Ye.row&&"detailAdaptive"===Ye.row.rowType){const Se=this._columnHeadersView,Re=(0,o.A)(Ye.targetElement).closest(".dx-field-item-label").next().data("dx-form-item");return Ye.column=Re?Re.column:Ye.column,Se.getContextMenuItems&&Se.getContextMenuItems(Ye)}return null===(Pe=super.getContextMenuItems)||void 0===Pe?void 0:Pe.call(this,Ye)}isClickableElement(Ye){var Pe;return((null===(Pe=super.isClickableElement)||void 0===Pe?void 0:Pe.call(this,Ye))??!1)||!!Ye.closest(".dx-command-adaptive").length}}},controllers:{export:Ke=>class extends Ke{_updateColumnWidth(Ye,Pe){super._updateColumnWidth(Ye,"adaptiveHidden"===Ye.visibleWidth?Ye.bestFitWidth:Pe)}},columnsResizer:Ke=>class extends Ke{_pointCreated(Ye,Pe,Se){const Re=super._pointCreated(Ye,Pe,Se),Fe=Se[Ye.columnIndex]||{},Xe=this._getNextColumnIndex(Ye.columnIndex);return Re||"adaptiveHidden"===Fe.visibleWidth||Xe!==Ye.columnIndex+1&&(Se[Xe]||{}).command}_getNextColumnIndex(Ye){const Pe=this._columnsController.getVisibleColumns();let Se=super._getNextColumnIndex(Ye);for(;Pe[Se]&&"adaptiveHidden"===Pe[Se].visibleWidth;)Se++;return Se}},draggingHeader:Ke=>class extends Ke{_pointCreated(Ye,Pe,Se,Re){return super._pointCreated(Ye,Pe,Se,Re)||"adaptiveHidden"===(Pe[Ye.columnIndex-1]||{}).visibleWidth}},editing:Ke=>class extends Ke{_isRowEditMode(){return"row"===this.getEditMode()}_getFormEditItemTemplate(Ye,Pe){return"row"!==this.getEditMode()&&"detailAdaptive"===Ye.rowType?(Ye.columnIndex=this._columnsController.getVisibleIndex(Pe.index),this.getColumnTemplate(Ye)):super._getFormEditItemTemplate(Ye,Pe)}_closeEditItem(Ye){const Pe=Ye.closest(".dx-field-item-content"),Se=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,Re=Pe.length?Pe.first().data("dx-form-item"):null,Fe=Re&&Re.column&&this._columnsController.getVisibleIndex(Re.column.index);this.isEditCell(Se,Fe)||super._closeEditItem(Ye)}_beforeUpdateItems(Ye,Pe){if(!this._adaptiveColumnsController.isFormOrPopupEditMode()&&this._adaptiveColumnsController.hasHiddenColumns()){const Se=this._dataController.items(),Re=Se[Pe],Fe=w.A.getIndexByKey(this._dataController.adaptiveExpandedKey(),Se);this._isForceRowAdaptiveExpand=!this._adaptiveColumnsController.hasAdaptiveDetailRowExpanded(),Fe>=0&&Ye.push(Fe+1),Ye.push(Pe+1),this._dataController.adaptiveExpandedKey(Re.key)}}_afterInsertRow(Ye){super._afterInsertRow.apply(this,arguments),this._adaptiveColumnsController.hasHiddenColumns()&&(this._adaptiveColumnsController.toggleExpandAdaptiveDetailRow(Ye,this.isRowEditMode()),this._isForceRowAdaptiveExpand=!0)}_collapseAdaptiveDetailRow(){this._isRowEditMode()&&this._isForceRowAdaptiveExpand&&(this._adaptiveColumnsController.collapseAdaptiveDetailRow(),this._isForceRowAdaptiveExpand=!1)}_cancelEditAdaptiveDetailRow(){this._adaptiveColumnsController.hasHiddenColumns()&&this._collapseAdaptiveDetailRow()}_afterSaveEditData(){super._afterSaveEditData.apply(this,arguments);const Ye=new b.cY;return this._isRowEditMode()&&this._adaptiveColumnsController.hasHiddenColumns()?(0,b.z7)(this._validatingController.validate(!0)).done(Pe=>{Pe&&this._cancelEditAdaptiveDetailRow(),Ye.resolve()}):Ye.resolve(),Ye.promise()}_beforeCancelEditData(){super._beforeCancelEditData(),this._cancelEditAdaptiveDetailRow()}_getRowIndicesForCascadeUpdating(Ye){const Pe=super._getRowIndicesForCascadeUpdating.apply(this,arguments);return this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(Ye.key)&&Pe.push("detailAdaptive"===Ye.rowType?Ye.rowIndex-1:Ye.rowIndex+1),Pe}_beforeCloseEditCellInBatchMode(Ye){const Pe=this._dataController._adaptiveExpandedKey;if(Pe){const Se=w.A.getIndexByKey(Pe,this._dataController.items());Se>-1&&Ye.unshift(Se)}}editRow(Ye){return this._adaptiveColumnsController.isFormOrPopupEditMode()&&this._adaptiveColumnsController.collapseAdaptiveDetailRow(),super.editRow(Ye)}deleteRow(Ye){const Pe=this._dataController.getKeyByRowIndex(Ye);"batch"===this.getEditMode()&&this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(Pe)&&this._adaptiveColumnsController.collapseAdaptiveDetailRow(),super.deleteRow(Ye)}},resizing:Ke=>class extends Ke{dispose(){super.dispose.apply(this,arguments),clearTimeout(this._updateScrollableTimeoutID)}_needBestFit(){return super._needBestFit()||!!this._adaptiveColumnsController.getHidingColumnsQueue().length}_correctColumnWidths(Ye,Pe){const Se=this._adaptiveColumnsController,Re=Se.getHiddenColumns(),Fe=Se.updateHidingQueue(this._columnsController.getColumns());Se.hideRedundantColumns(Ye,Pe,Fe);const Xe=Se.getHiddenColumns();return Se.hasAdaptiveDetailRowExpanded()&&Re.length!==Xe.length&&Se.updateForm(Xe),!Xe.length&&Se.collapseAdaptiveDetailRow(),super._correctColumnWidths.apply(this,arguments)}_toggleBestFitMode(Ye){Ye&&this._adaptiveColumnsController._showHiddenColumns(),super._toggleBestFitMode(Ye)}_needStretch(){const Ye=this._adaptiveColumnsController;return super._needStretch.apply(this,arguments)||Ye.getHidingColumnsQueue().length||Ye.hasHiddenColumns()}},data:Ke=>class extends Ke{init(){super.init(),this._adaptiveExpandedKey=void 0}_processItems(Ye,Pe){const{changeType:Se}=Pe;if(Ye=super._processItems.apply(this,arguments),"loadingAll"===Se||!(0,d.O9)(this._adaptiveExpandedKey))return Ye;const Re=w.A.getIndexByKey(this._adaptiveExpandedKey,Ye),Fe=!1===this.option("scrolling.legacyMode");if(Re>=0){const Xe=Ye[Re];Ye.splice(Re+1,0,{visible:!0,rowType:"detailAdaptive",key:Xe.key,data:Xe.data,node:Xe.node,modifiedValues:Xe.modifiedValues,isNewRow:Xe.isNewRow,values:Xe.values})}else"refresh"===Se&&(!Fe||!Pe.repaintChangesOnly)&&(this._adaptiveExpandedKey=void 0);return Ye}_getRowIndicesForExpand(Ye){const Pe=super._getRowIndicesForExpand.apply(this,arguments);return this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(Ye)&&Pe.push(Pe[Pe.length-1]+1),Pe}adaptiveExpandedKey(Ye){if(!(0,d.O9)(Ye))return this._adaptiveExpandedKey;this._adaptiveExpandedKey=Ye}toggleExpandAdaptiveDetailRow(Ye,Pe){let Se=w.A.getIndexByKey(this._adaptiveExpandedKey,this._items),Re=w.A.getIndexByKey(Ye,this._items);Se>=0&&Se===Re&&!Pe&&(Ye=void 0,Re=-1);const Fe=this._adaptiveExpandedKey;this._adaptiveExpandedKey=Ye,Se>=0&&Se++,Re>=0&&Re++;const Xe=this.getRowIndexDelta();this.updateItems({allowInvisibleRowIndices:!0,changeType:"update",rowIndices:[Se-Xe,Re-Xe]}),this._adaptiveColumnsController.updateCommandAdaptiveAriaLabel(Ye,"dxDataGrid-ariaAdaptiveCollapse"),this._adaptiveColumnsController.updateCommandAdaptiveAriaLabel(Fe,ue)}},editorFactory:Ke=>class extends Ke{_needHideBorder(Ye){return super._needHideBorder(Ye)||Ye?.hasClass("dx-field-item-content")&&Ye?.find(".dx-checkbox").length}_getFocusCellSelector(){return`${super._getFocusCellSelector()}, .dx-adaptive-detail-row .dx-field-item > .dx-field-item-content`}_getRevertTooltipsSelector(){return`${super._getRevertTooltipsSelector()}, .dx-field-item-content .${this.addWidgetPrefix("revert-tooltip")}`}},columns:Ke=>class extends Ke{_isColumnVisible(Ye){return super._isColumnVisible(Ye)&&!Ye.adaptiveHidden}},keyboardNavigation:Ke=>class extends Ke{_isCellValid(Ye,Pe){return super._isCellValid(Ye,Pe)&&!Ye.hasClass(this.addWidgetPrefix("hidden-column"))&&!Ye.hasClass("dx-command-adaptive-hidden")}_processNextCellInMasterDetail(Ye,Pe){super._processNextCellInMasterDetail(Ye,Pe);const Se=this._editingController.isCellOrBatchEditMode();this._editingController.isEditing()&&Ye&&Se&&!this._isInsideEditForm(Ye)&&(s.A.off(Ye,"focus",ge),s.A.on(Ye,"focus",{$nextCell:Ye},ge),s.A.trigger(Pe,"focus"))}_isCellElement(Ye){return super._isCellElement(Ye)||Ye.hasClass("dx-adaptive-item-text")}}}}}},9820:(In,Ze,M)=>{"use strict";M.d(Ze,{CI:()=>re});var W=M(5973),o=M(5704),P=M(4859),b=M(3090),f=M(2660),S=M(1363),T=M(1830),y=M(8360),d=M(9012),c=M(8628),s=M(9212),a=M(1757),u=M(3376),h=M(9339);const G=["showInColumnChooser","caption","allowHiding","visible","cssClass","ownerBand"],re={defaultOptions:()=>({columnChooser:{enabled:!1,search:{enabled:!1,timeout:500,editorOptions:{}},selection:{allowSelectAll:!1,selectByClick:!1,recursive:!1},position:void 0,mode:"dragAndDrop",width:250,height:260,title:y.A.format("dxDataGrid-columnChooserTitle"),emptyPanelText:y.A.format("dxDataGrid-columnChooserEmptyText"),container:void 0}}),controllers:{columnChooser:class U extends u.Ay.ViewController{init(){super.init(),this._rowsView=this.getView("rowsView")}renderShowColumnChooserButton(Y){const Z=this,Q=Z.addWidgetPrefix("column-chooser-button"),te=Z.option("columnChooser.enabled"),pe=Y.find(`.${Q}`);let z;te?pe.length?pe.show():(z=(0,o.A)("<div>").addClass(Q).appendTo(Y),Z._createComponent(z,d.A,{icon:"column-chooser",onClick(){Z.getView("columnChooserView").showColumnChooser()},hint:Z.option("columnChooser.title"),integrationOptions:{}})):pe.hide()}getPosition(){const Y=this.option("columnChooser.position");return(0,T.O9)(Y)?Y:{my:"right bottom",at:"right bottom",of:this._rowsView&&this._rowsView.element(),collision:"fit",offset:"-2 -2",boundaryOffset:"2 2"}}}},views:{columnChooserView:class B extends h.n{optionChanged(Y){"columnChooser"===Y.name?(this._initializePopupContainer(),this.render(null,"full")):super.optionChanged(Y)}publicMethods(){return["showColumnChooser","hideColumnChooser"]}_resizeCore(){}_isWinDevice(){return!!W.A.real().win}_initializePopupContainer(){const Y=this,Z=Y.addWidgetPrefix("column-chooser"),Q=Y.element().addClass(Z),te=Y.option("columnChooser"),pe=this._columnChooserController.getPosition(),z=(0,s.ss)(),oe=(0,s.AE)(z),ae=(0,s.gx)(z),ee={visible:!1,shading:!1,showCloseButton:!1,dragEnabled:!0,resizeEnabled:!0,wrapperAttr:{class:Z},toolbarItems:[{text:te.title,toolbar:"top",location:oe||ae?"before":"center"}],position:pe,width:te.width,height:te.height,rtlEnabled:Y.option("rtlEnabled"),onHidden(){Y._isWinDevice()&&(0,o.A)("body").removeClass(Y.addWidgetPrefix("notouch-action"))},container:te.container};oe||ae?(0,b.X)(ee,{showCloseButton:!0}):ee.toolbarItems[ee.toolbarItems.length]={shortcut:"cancel"},(0,T.O9)(this._popupContainer)?this._popupContainer.option(ee):(Y._popupContainer=Y._createComponent(Q,c.A,ee),Y._popupContainer.on("optionChanged",he=>{"visible"===he.name&&Y.renderCompleted.fire()})),this.setPopupAttributes()}setPopupAttributes(){const Y=this.isSelectMode(),Z=this._columnsController.isBandColumnsUsed();this._popupContainer.setAria({role:"dialog",label:y.A.format("dxDataGrid-columnChooserTitle")}),this._popupContainer.$wrapper().toggleClass(this.addWidgetPrefix("column-chooser-mode-drag"),!Y).toggleClass(this.addWidgetPrefix("column-chooser-mode-select"),Y),this._popupContainer.$content().addClass(this.addWidgetPrefix("column-chooser-list")),Y&&!Z&&this._popupContainer.$content().addClass(this.addWidgetPrefix("column-chooser-plain"))}_renderCore(Y){if(this._popupContainer){const Z=!this.isSelectMode();this._columnChooserList&&"full"!==Y?Z&&this._updateItems():this._renderTreeView()}}_renderTreeView(){var Y,Z,Q;const te=this,pe=this._popupContainer.$content(),z=this.option("columnChooser"),oe=this.isSelectMode(),he={dataStructure:"plain",activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,itemTemplate:"item",showCheckBoxesMode:"none",rootValue:null,searchEnabled:(0,T.O9)(z.allowSearch)?z.allowSearch:null===(Y=z.search)||void 0===Y?void 0:Y.enabled,searchTimeout:(0,T.O9)(z.searchTimeout)?z.searchTimeout:null===(Z=z.search)||void 0===Z?void 0:Z.timeout,searchEditorOptions:null===(Q=z.search)||void 0===Q?void 0:Q.editorOptions};if(this._isWinDevice()&&(he.useNativeScrolling=!1),(0,b.X)(he,oe?this._prepareSelectModeConfig():this._prepareDragModeConfig()),this._columnChooserList)he.searchEnabled||(he.searchValue=""),this._columnChooserList.option(he),this._updateItems();else{this._columnChooserList=this._createComponent(pe,a.A,he),this._updateItems();let de=0;this._columnChooserList.on("optionChanged",ue=>{de=ue.component.getScrollable().scrollTop()}),this._columnChooserList.on("contentReady",ue=>{(0,P.OX)(()=>{ue.component.getScrollable().scrollTo({y:de}),te.renderCompleted.fire()})})}}_prepareDragModeConfig(){return{noDataText:this.option("columnChooser").emptyPanelText,activeStateEnabled:!1,hoverStateEnabled:!1,itemTemplate(Z,Q,te){(0,o.A)(te).text(Z.text).parent().addClass(Z.cssClass).addClass("dx-column-chooser-item")}}}_prepareSelectModeConfig(){const Y=this,Z=this.option("columnChooser.selection")??{};let Q=!1;return{selectByClick:Z.selectByClick,selectNodesRecursive:Z.recursive,showCheckBoxesMode:Z.allowSelectAll?"selectAll":"normal",onSelectionChanged:te=>{if(Q)return;const pe=(z=>{const oe=(ae,ee)=>ae.reduce((he,de)=>(he.push(de),de.children.length&&oe(de.children,he),he),ee);return oe(z,[])})(te.component.getNodes());var z;te.component.beginUpdate(),Q=!0,z=te,pe.filter(ae=>!1===ae.itemData.allowHiding).forEach(ae=>z.component.selectItem(ae.key)),te.component.endUpdate(),Q=!1,Y.component.beginUpdate(),this._isUpdatingColumnVisibility=!0,(z=>{z.forEach(oe=>{Y._columnsController.columnOption(oe.itemData.id,"visible",!1!==oe.selected)})})(pe),Y.component.endUpdate(),this._isUpdatingColumnVisibility=!1}}}_updateItems(){const Y=this.isSelectMode(),Q=function(q,Y){const Z=[],Q=q.isSelectMode(),te=q.option("columnChooser.selection.recursive");return Y.length&&(0,f.__)(Y,(pe,z)=>{const oe={text:z.caption,cssClass:z.cssClass,allowHiding:z.allowHiding,expanded:!0,id:z.index,disabled:!1===z.allowHiding,parentId:(0,T.O9)(z.ownerBand)?z.ownerBand:null};Q&&!(te&&z.hasColumns)&&(oe.selected=z.visible),Z.push(oe)}),Z}(this,this._columnsController.getChooserColumns(Y));this._columnChooserList.option("items",Q)}_updateItemsSelection(Y){const Z=Y?.map(Q=>this._columnsController.columnOption(Q));this._columnChooserList.beginUpdate(),Z?.forEach(Q=>{let{visible:te,index:pe}=Q;te?this._columnChooserList.selectItem(pe):this._columnChooserList.unselectItem(pe)}),this._columnChooserList.endUpdate()}_columnOptionChanged(Y){if(super._columnOptionChanged(Y),this.isSelectMode()&&this._columnChooserList&&!this._isUpdatingColumnVisibility){const{optionNames:Q}=Y,te=Q.visible&&1===Q.length,pe=(0,T.O9)(Y.columnIndex)?[Y.columnIndex]:Y.columnIndices;(G.some(oe=>Q[oe])||Y.changeTypes.columns&&Q.all)&&(this._updateItemsSelection(pe),te||this._updateItems())}}getColumnElements(){const Y=[],Z=this.isSelectMode(),Q=this._columnsController.getChooserColumns(Z),te=this._popupContainer&&this._popupContainer.$content(),pe=te&&te.find(".dx-treeview-node");return pe&&Q.forEach(z=>{const oe=pe.filter(`[data-item-id = '${z.index}']`),ae=oe.length?oe.children(".dx-column-chooser-item").get(0):null;Y.push(ae)}),(0,o.A)(Y)}getName(){return"columnChooser"}getColumns(){return this._columnsController.getChooserColumns()}allowDragging(Y){const Z=this._columnsController.isParentColumnVisible(Y.index),Q=!Y.visible&&Y.allowHiding;return this.isColumnChooserVisible()&&Z&&Q}allowColumnHeaderDragging(Y){return!this.isSelectMode()&&this.isColumnChooserVisible()&&Y.allowHiding}getBoundingRect(){const Y=this._popupContainer&&this._popupContainer.$overlayContent();if(Y&&Y.is(":visible")){const Z=Y.offset();return{left:Z.left,top:Z.top,right:Z.left+(0,S.Ot)(Y),bottom:Z.top+(0,S.P$)(Y)}}return null}showColumnChooser(){this._popupContainer||(this._initializePopupContainer(),this.render()),this._popupContainer.show(),this._isWinDevice()&&(0,o.A)("body").addClass(this.addWidgetPrefix("notouch-action"))}hideColumnChooser(){this._popupContainer&&this._popupContainer.hide()}isColumnChooserVisible(){const Y=this._popupContainer;return Y&&Y.option("visible")}isSelectMode(){return"select"===this.option("columnChooser.mode")}hasHiddenColumns(){const Y=this.option("columnChooser.enabled"),Z=this.getColumns().filter(Q=>!Q.visible);return Y&&Z.length}}},extenders:{views:{headerPanel:q=>class extends q{_getToolbarItems(){const Y=super._getToolbarItems();return this._appendColumnChooserItem(Y)}_appendColumnChooserItem(Y){const Z=this;if(Z.option("columnChooser.enabled")){const te=function(){Z.component.getView("columnChooserView").showColumnChooser()},pe=function(ae){(0,o.A)(ae.element).addClass(Z._getToolbarButtonClass(Z.addWidgetPrefix("column-chooser-button")))},z=Z.option("columnChooser.title");Y.push({widget:"dxButton",options:{icon:"column-chooser",onClick:te,hint:z,text:z,onInitialized:pe,elementAttr:{"aria-haspopup":"dialog"}},showText:"inMenu",location:"after",name:"columnChooserButton",locateInMenu:"auto",sortIndex:40})}return Y}optionChanged(Y){"columnChooser"===Y.name?(this._invalidate(),Y.handled=!0):super.optionChanged(Y)}isVisible(){const Y=this.option("columnChooser.enabled");return super.isVisible()||Y}},columnHeadersView:q=>class extends q{allowDragging(Y){const Z=!this._columnChooserView.isSelectMode(),Q=this._columnChooserView.isColumnChooserVisible();return Z&&Q&&Y.allowHiding||super.allowDragging(Y)}}},controllers:{columns:q=>class extends q{allowMoveColumn(Y,Z,Q,te){return("select"!==this.option("columnChooser.mode")||"columnChooser"!==te)&&super.allowMoveColumn(Y,Z,Q,te)}}}}}},9038:(In,Ze,M)=>{"use strict";M.d(Ze,{o:()=>oe});var W=M(4504),o=M(5704),P=M(36),b=M(3090),f=M(2660),S=M(4757),T=M(1363),y=M(8649),d=M(1830),c=M(4072),s=M(8573),a=M(8360),u=M(4602),h=M(8736),g=M(9339);const K=function(ae){let ee=-1;return(0,f.__)(ae,(he,de)=>{if("transparent"===de.command)return ee=he,!1}),ee},J=function(ae,ee,he){let de=0;if(ae&&ee&&he)for(let ue=0;ue<ae.length;ue++)"transparent"===ae[ue].command?de+=ae[ue].colspan:(ee[de]<he[ue]&&(ee[de]=he[ue]),de++);return ee},ie=ae=>class extends ae{init(){super.init(),this._isFixedTableRendering=!1,this._isFixedColumns=!1}_createCol(ee){return super._createCol(ee).toggleClass("dx-col-fixed",!(!this._isFixedTableRendering||!(ee.fixed||ee.command&&"transparent"!==ee.command)))}_correctColumnIndicesForFixedColumns(ee,he){const de=K(ee),ue=ee[de].colspan,be=he&&he.columnIndices;be&&(he.columnIndices=be.map(ve=>{if(ve)return ve.map(le=>le<de?le:le>=de+ue?le-ue+1:-1).filter(le=>le>=0)}))}_partialUpdateFixedTable(ee,he){const de=this._fixedTableElement,ue=this._getRowElementsCore(de);de.children("colgroup").replaceWith(this._createColGroup(ee));for(let ve=0;ve<he.length;ve++)this._partialUpdateFixedRow((0,o.A)(ue[ve]),ee,he[ve])}_partialUpdateFixedRow(ee,he,de){const ue=ee.get(0).childNodes,be=K(he),ve=he[be];let Ce,ye=this._columnsController.getColumnIndexOffset()+1,{colspan:ge}=ve;if(ee.hasClass("dx-master-detail-row")){var fe;ue[0].setAttribute("colspan",null===(fe=this._columnsController.getVisibleColumns())||void 0===fe?void 0:fe.length)}else{if(ee.hasClass("dx-group-row"))if(Ce=this._getGroupCellOptions({row:de,columns:this._columnsController.getVisibleColumns()}),de.summaryCells.length>0){const Te=this._getAlignByColumnCellCount(Ce.colspan,{columns:this._columnsController.getVisibleColumns(),row:de,isFixed:!0});ge=Ce.colspan-Te}else ge=Ce.colspan-Math.max(0,ue.length-(Ce.columnIndex+2));for(let xe=0;xe<ue.length;xe++){const Te=Ce?xe===Ce.columnIndex+1:xe===be;ue[xe].setAttribute("aria-colindex",ye),Te?(ue[xe].setAttribute("colspan",ge),ye+=ge):ye++}}}_renderTable(ee){let he;const de=this.getFixedColumns();this._isFixedColumns=!!de.length;const ue=super._renderTable(ee);if(this._isFixedColumns){var be;const le=ee?.change,Ce=this._getRowElements(this._fixedTableElement),ye=le?.virtualColumnsScrolling&&Ce.length===(null==le||null===(be=le.items)||void 0===be?void 0:be.length);if(this._isFixedTableRendering=!0,ye&&!0!==this.option("scrolling.legacyMode")){var ve;this._partialUpdateFixedTable(de,null==ee||null===(ve=ee.change)||void 0===ve?void 0:ve.items),this._isFixedTableRendering=!1}else{const ge=le?.columnIndices;this._correctColumnIndicesForFixedColumns(de,le),he=this._createTable(de),this._renderRows(he,(0,b.X)({},ee,{columns:de})),this._updateContent(he,le,!0),ge&&(le.columnIndices=ge),this._isFixedTableRendering=!1}}else this._fixedTableElement&&this._fixedTableElement.parent().remove(),this._fixedTableElement=null;return ue}_renderRow(ee,he){let de,{cells:ue}=he.row;if(super._renderRow.apply(this,arguments),this._isFixedTableRendering&&ue&&ue.length){de=0;const be=he.row.cells||[];ue=ue.slice(),he.row.cells=ue;for(let ve=0;ve<be.length;ve++)be[ve].column&&"transparent"===be[ve].column.command?de=(be[ve].column.colspan||1)-1:ue[ve+de]=be[ve]}}_createCell(ee){const he=this,{column:de}=ee,ue=de&&de.command,{rowType:be}=ee,ve=super._createCell.apply(he,arguments);let le,Ce,ye;(he._isFixedTableRendering||"filter"===be)&&(le=he.getFixedColumns(),ye=K(le),Ce=le[ye-1]),he._isFixedTableRendering?"transparent"===ue&&(ve.addClass("dx-pointer-events-none").toggleClass("dx-first-cell",0===ye||Ce&&"expand"===Ce.command).toggleClass("dx-last-cell",le.length&&ye===le.length-1),"freeSpace"!==be&&h.A.setEmptyText(ve)):"filter"===be&&ve.toggleClass("dx-first-cell",ee.columnIndex===ye);const ge=he.option("rowAlternationEnabled")&&ee.isAltRow,fe="multiple"===he.option("selection.mode")&&0===ee.columnIndex&&"header"===ee.rowType;return P.A.mozilla&&ee.column.fixed&&"group"!==ee.rowType&&!ge&&!fe&&ve.addClass("dx-col-fixed"),ve}_getContent(ee){var he;return ee?null===(he=this._fixedTableElement)||void 0===he?void 0:he.parent():super._getContent.apply(this,arguments)}_wrapTableInScrollContainer(ee,he){const de=super._wrapTableInScrollContainer.apply(this,arguments);return(this._isFixedTableRendering||he)&&de.addClass(this.addWidgetPrefix("content-fixed")),de}_renderCellContent(ee,he){let de;const{column:ue}=he,be=this._isFixedTableRendering,ve="group"===he.rowType&&(0,d.O9)(ue.groupIndex);if(be&&ve&&!ue.command&&!ue.groupCellTemplate&&ee.css("pointerEvents","none"),!be&&this._isFixedColumns){if(de=ue.fixed||ue.command&&!1!==ue.fixed,ve&&(de=!1,he.row.summaryCells&&he.row.summaryCells.length)){var le;const Ce=this._columnsController.getVisibleColumns(),ye=(null===(le=this._getAlignByColumnCellCount)||void 0===le?void 0:le.call(this,ue.colspan,{columns:Ce,row:he.row,isFixed:!0}))??0;if(ye>0){const ge=K(this._columnsController.getFixedColumns());de=Ce.length-ye<ge}}if(de){if(ue.command&&"buttons"!==ue.type||"group"===he.rowType)return void ee.html("&nbsp;").addClass(ue.cssClass);ee.addClass("dx-hidden-cell")}}"transparent"!==ue.command&&super._renderCellContent.apply(this,arguments)}_getCellElementsCore(ee){const he=super._getCellElementsCore.apply(this,arguments),de=he?.parent().hasClass("dx-group-row"),ue="columnHeadersView"===this.name?ee:void 0;if(this._fixedTableElement&&he){const be=this.getFixedColumns(ue),ve=this._getRowElements(this._fixedTableElement).eq(ee).children("td");(0,f.__)(ve,(le,Ce)=>{if(de)he[le]&&"hidden"!==Ce.style.visibility&&(he[le]=Ce);else{const ye=be[le];if(ye)if("transparent"===ye.command)ve.eq(le).hasClass("dx-master-detail-cell")&&(he[le]=Ce||he[le]);else{const ge=this._columnsController.getVisibleIndexByColumn(ye,ue);he[ge]=Ce||he[ge]}}})}return he}getColumnWidths(ee){const he=super.getColumnWidths(),de=this.getFixedColumns(),ue=this._fixedTableElement&&he.length?super.getColumnWidths(this._fixedTableElement):void 0;return J(de,he,ue)}getTableElement(ee){return(ee=this._isFixedTableRendering||ee)?this._fixedTableElement:super.getTableElement()}setTableElement(ee,he){this._isFixedTableRendering||he?this._fixedTableElement=ee.addClass("dx-pointer-events-none"):super.setTableElement(ee)}getColumns(ee){const he=this.getTableElement();return this._isFixedTableRendering?this.getFixedColumns(ee):super.getColumns(ee,he)}getRowIndex(ee){const he=this._fixedTableElement;return he&&he.find(ee).length?this._getRowElements(he).index(ee):super.getRowIndex(ee)}getTableElements(){let ee=super.getTableElements.apply(this,arguments);return this._fixedTableElement&&(ee=(0,o.A)([ee.get(0),this._fixedTableElement.get(0)])),ee}getFixedColumns(ee){return this._columnsController.getFixedColumns(ee)}getFixedColumnsOffset(){let he,ee={left:0,right:0};if(this._fixedTableElement){he=this.getTransparentColumnElement();const de=he.position();ee={left:de.left,right:(0,T.Ot)(this.element(),!0)-((0,T.Ot)(he,!0)+de.left)}}return ee}getTransparentColumnElement(){return this._fixedTableElement&&this._fixedTableElement.find(".dx-pointer-events-none").first()}getFixedTableElement(){return this._fixedTableElement}isFixedColumns(){return this._isFixedColumns}_resizeCore(){super._resizeCore(),this.synchronizeRows()}setColumnWidths(ee){var he;const{widths:de}=ee,ue=this._columnsController.getVisibleColumns(),be=de?.length&&ue.some(ye=>(0,d.O9)(ye.visibleWidth)),ve=null===(he=ee.optionNames)||void 0===he?void 0:he.width;if(super.setColumnWidths(ee),this._fixedTableElement){const fe=!de?.some(xe=>"auto"===xe||!(0,d.O9)(xe))||be&&this.isScrollbarVisible(!0)?this.getFixedColumns():ue;this.setFixedTableColumnWidths(fe,de)}const le=this.option("wordWrapEnabled");(be||ve&&le)&&this.synchronizeRows()}setFixedTableColumnWidths(ee,he){if(!this._fixedTableElement||!he)return;const de=this._fixedTableElement.children("colgroup").children("col");de.toArray().forEach(be=>be.removeAttribute("style"));let ue=0;ee.forEach(be=>{if(be.colspan)return void(ue+=be.colspan);const ve=(0,g.W)(he[ue]);(0,d.O9)(ve)&&(0,y.zj)(de.eq(ue),ve),ue+=1})}_getClientHeight(ee){const he=ee.getBoundingClientRect&&(0,S.N)(ee);return he&&he.height?he.height:ee.clientHeight}synchronizeRows(){const ee=[],he=[];let de,ue,be,ve;this.waitAsyncTemplates(!0).done(()=>{if(this._isFixedColumns&&this._tableElement&&this._fixedTableElement){const le=this._getClientHeight(this._tableElement.get(0)),Ce=this._getClientHeight(this._fixedTableElement.get(0));if(ue=this._getRowElements(this._tableElement),be=this._getRowElements(this._fixedTableElement),ve=this._findContentElement(),le!==Ce){for(ve&&ve.css("height",le),ue.css("height",""),be.css("height",""),de=0;de<ue.length;de++)ee.push(this._getClientHeight(ue.get(de))),he.push(this._getClientHeight(be.get(de)));for(de=0;de<ue.length;de++){const ye=ee[de],ge=he[de];ye>ge?be.eq(de).css("height",ye):ye<ge&&ue.eq(de).css("height",ge)}ve&&ve.css("height","")}}})}setScrollerSpacing(ee,he){const de=this.option("rtlEnabled");super.setScrollerSpacing(ee),this.element().children(`.${this.addWidgetPrefix("content-fixed")}`).css({paddingLeft:de?ee:"",paddingRight:de?"":ee})}},oe={defaultOptions:()=>({columnFixing:{enabled:!1,texts:{fix:a.A.format("dxDataGrid-columnFixingFix"),unfix:a.A.format("dxDataGrid-columnFixingUnfix"),leftPosition:a.A.format("dxDataGrid-columnFixingLeftPosition"),rightPosition:a.A.format("dxDataGrid-columnFixingRightPosition")}}}),extenders:{views:{columnHeadersView:ae=>class extends(ie(ae)){_getRowVisibleColumns(ee){return this._isFixedTableRendering?this.getFixedColumns(ee):super._getRowVisibleColumns(ee)}getContextMenuItems(ee){const{column:he}=ee,de=this.option("columnFixing");let ue=super.getContextMenuItems(ee);if(ee.row&&"header"===ee.row.rowType&&!0===de.enabled&&he&&he.allowFixing){const be=ve=>{switch(ve.itemData.value){case"none":this._columnsController.columnOption(he.index,"fixed",!1);break;case"left":this._columnsController.columnOption(he.index,{fixed:!0,fixedPosition:"left"});break;case"right":this._columnsController.columnOption(he.index,{fixed:!0,fixedPosition:"right"})}};ue=ue||[],ue.push({text:de.texts.fix,beginGroup:!0,items:[{text:de.texts.leftPosition,value:"left",disabled:he.fixed&&(!he.fixedPosition||"left"===he.fixedPosition),onItemClick:be},{text:de.texts.rightPosition,value:"right",disabled:he.fixed&&"right"===he.fixedPosition,onItemClick:be}]},{text:de.texts.unfix,value:"none",disabled:!he.fixed,onItemClick:be})}return ue}getFixedColumnElements(ee){const he=this;if((0,d.O9)(ee))return this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(ee).children();const de=he.getColumnElements(),ue=he.getTransparentColumnElement();if(de&&ue&&ue.length){const be=K(he.getFixedColumns());de.splice(be,ue.get(0).colSpan,ue.get(0))}return de}getColumnWidths(){const ee=this;let he;const de=super.getColumnWidths(),ue=ee.getFixedColumnElements(),be=ee.getFixedColumns();return ee._fixedTableElement&&(he=ue&&ue.length?ee._getWidths(ue):super.getColumnWidths(ee._fixedTableElement)),J(be,de,he)}},rowsView:ae=>class extends(ie(ae)){dispose(){super.dispose.apply(this,arguments),clearTimeout(this._fixedScrollTimeout)}optionChanged(ee){super.optionChanged(ee),"hoverStateEnabled"===ee.name&&this._isFixedColumns&&(ee.value?this._attachHoverEvents():this._detachHoverEvents())}_detachHoverEvents(){const ee=this.element();this._fixedTableElement&&this._tableElement&&c.A.off(ee,"mouseover mouseout",".dx-data-row")}_attachHoverEvents(){this._fixedTableElement&&this._tableElement&&c.A.on(this.element(),"mouseover mouseout",".dx-data-row",this.createAction(ee=>{const{event:he}=ee,de=this.getRowIndex((0,o.A)(he.target).closest(".dx-row")),ue="mouseover"===he.type;de>=0&&(this._tableElement&&this._getRowElements(this._tableElement).eq(de).toggleClass("dx-state-hover",ue),this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(de).toggleClass("dx-state-hover",ue))}))}_getScrollDelay(){var ee;return(null===(ee=this._resizingController)||void 0===ee?void 0:ee.hasResizeTimeout())?this.option("scrolling.updateTimeout"):P.A.mozilla?60:0}_findContentElement(ee){let he,de;const ue=this.addWidgetPrefix("content"),be=this.element();if(ee=this._isFixedTableRendering||ee,be&&ee){he=be.children(`.${ue}`);const ve=this.getScrollable();return!he.length&&ve&&(he=(0,o.A)("<div>").addClass(ue),c.A.on(he,"scroll",le=>{const{target:Ce}=le,ye=this._getScrollDelay();clearTimeout(this._fixedScrollTimeout),this._fixedScrollTimeout=setTimeout(()=>{de=(0,o.A)(Ce).scrollTop(),ve.scrollTo({y:de})},ye)}),c.A.on(he,s.U,le=>{const Ce=(0,o.A)(le.target).closest(".dx-scrollable");let ye=!1;if(ve&&ve.$element().is(Ce))ye=!0;else{const ge=Ce.length&&u.A.getInstance(Ce.get(0)),fe=ge&&ge.scrollHeight()-ge.clientHeight()>0;ye=ge&&!fe}if(ye){de=ve.scrollTop(),ve.scrollTo({y:de-le.delta});const ge=ve.scrollTop()+ve.clientHeight(),fe=ve.scrollHeight()+this.getScrollbarWidth();if(ve.scrollTop()>0&&ge<fe)return!1}}),he.appendTo(be)),he}return super._findContentElement()}_updateScrollable(){super._updateScrollable();const ee=this.getScrollable();if(null!=ee&&ee._disposed)return;const he=ee&&ee.scrollOffset().top;this._updateFixedTablePosition(he)}_renderContent(ee,he,de){return this._isFixedTableRendering||de?ee.empty().addClass(`${this.addWidgetPrefix("content")} ${this.addWidgetPrefix("content-fixed")}`).append(he):super._renderContent(ee,he)}_getGroupCellOptions(ee){return super._getGroupCellOptions(this._isFixedTableRendering?(0,b.X)({},ee,{columns:this._columnsController.getVisibleColumns()}):ee)}_renderGroupedCells(ee,he){return super._renderGroupedCells(ee,(0,b.X)({},he,{columns:this._columnsController.getVisibleColumns()}))}_renderGroupSummaryCells(ee,he){super._renderGroupSummaryCells(ee,this._isFixedTableRendering?(0,b.X)({},he,{columns:this._columnsController.getVisibleColumns()}):he)}_hasAlignByColumnSummaryItems(ee,he){const de=super._hasAlignByColumnSummaryItems.apply(this,arguments),ue=he.columns[ee];return he.isFixed?ue.fixed&&(de||"right"===ue.fixedPosition):de&&(!this._isFixedColumns||!ue.fixed)}_renderGroupSummaryCellsCore(ee,he,de,ue){let be;if(this._isFixedTableRendering){he.isFixed=!0,be=this._getAlignByColumnCellCount(de,he),he.isFixed=!1;const ve=he.columns.length-be;he=(0,b.X)({},he,{columns:this.getFixedColumns()});const le=K(he.columns);ve<le?(be-=he.columns[le].colspan-1||0,de-=he.columns[le].colspan-1||0):ue>0&&ee.css("visibility","hidden"),ue=be}super._renderGroupSummaryCellsCore(ee,he,de,ue)}_getSummaryCellIndex(ee,he){if(this._isFixedTableRendering){const de=K(he);return ee>de&&(ee+=he[de].colspan-1),ee}return super._getSummaryCellIndex.apply(this,arguments)}_renderCore(ee){this._detachHoverEvents();const he=super._renderCore(ee),de=this._isFixedColumns;return this.element().toggleClass("dx-fixed-columns",de),this.option("hoverStateEnabled")&&de&&this._attachHoverEvents(),he}setAriaOwns(ee,he,de){if(de){var ue;const be=this.addWidgetPrefix("content-fixed"),ve=null===(ue=this.element())||void 0===ue?void 0:ue.children(`.${be}`),le=this.getFixedTableElement();ve.length&&null!=le&&le.length&&this.setAria("owns",`${ee??""} ${le.attr("id")??""} ${he??""}`.trim(),ve)}else super.setAriaOwns.apply(this,arguments)}setRowsOpacity(ee,he){super.setRowsOpacity(ee,he);const de=this._getRowElements(this._fixedTableElement);this._setRowsOpacityCore(de,this.getFixedColumns(),ee,he)}getCellIndex(ee){const he=this._fixedTableElement;let de=0;if(he&&ee.is("td")&&ee.closest(he).length){const ue=this.getFixedColumns();return(0,f.__)(ue,(be,ve)=>{if(be===ee[0].cellIndex)return!1;ve.colspan?de+=ve.colspan:de++}),de}return super.getCellIndex.apply(this,arguments)}_updateFixedTablePosition(ee,he){if(this._fixedTableElement&&this._tableElement){let de;this._fixedTableElement.parent().scrollTop(ee),he&&this._editorFactoryController&&(de=this._editorFactoryController.focus(),de&&this._editorFactoryController.focus(de))}}setScrollerSpacing(ee,he){const de=this,ue={marginBottom:0},be=de.element().children(`.${this.addWidgetPrefix("content-fixed")}`);be.length&&de._fixedTableElement&&(be.css(ue),de._fixedTableElement.css(ue),ue[de.option("rtlEnabled")?"marginLeft":"marginRight"]=ee,ue.marginBottom=he,(de._scrollable&&de._scrollable.option("useNative")?be:de._fixedTableElement).css(ue))}_getElasticScrollTop(ee){let he=0;if(ee.scrollOffset.top<0)he=-ee.scrollOffset.top;else if(ee.reachedBottom){const de=(0,o.A)(ee.component.content()),ue=(0,o.A)(ee.component.container()),be=Math.max(de.get(0).clientHeight-ue.get(0).clientHeight,0);he=Math.min(be-ee.scrollOffset.top,0)}return Math.floor(he)}_applyElasticScrolling(ee){if(this._fixedTableElement){const he=this._getElasticScrollTop(ee);0!==Math.ceil(he)?(0,W.Cy)(this._fixedTableElement,{top:he}):this._fixedTableElement.css("transform","")}}_handleScroll(ee){this._updateFixedTablePosition(ee.scrollOffset.top,!0),this._applyElasticScrolling(ee),super._handleScroll(ee)}_updateContentPosition(ee){super._updateContentPosition.apply(this,arguments),ee||this._updateFixedTablePosition(this._scrollTop)}_afterRowPrepared(ee){this._isFixedTableRendering||super._afterRowPrepared(ee)}_scrollToElement(ee){super._scrollToElement(ee,this.getFixedColumnsOffset())}},footerView:ae=>class extends(ie(ae)){}},controllers:{draggingHeader:ae=>class extends ae{_generatePointsByColumns(ee){const he=ee.columns,{targetDraggingPanel:de}=ee;if(de&&"headers"===de.getName()&&de.isFixedColumns()&&ee.sourceColumn.fixed){ee.rowIndex||(ee.columnElements=de.getFixedColumnElements(0)),ee.columns=de.getFixedColumns(ee.rowIndex);const ue=super._generatePointsByColumns(ee);return function(ae,ee,he){const de=K(ee),ue=ae.length-ee.length;(0,f.__)(he,(be,ve)=>{ve.index>de&&(ve.columnIndex+=ue,ve.index+=ue)})}(he,ee.columns,ue),ue}return super._generatePointsByColumns(ee)}_pointCreated(ee,he,de,ue){const be=super._pointCreated.apply(this,arguments),ve=he[ee.columnIndex],le=this._columnHeadersView.getTransparentColumnElement();if(!be&&"headers"===de&&le&&le.length){const Ce=(0,S.N)(le.get(0));return ue&&ue.fixed?"right"===ue.fixedPosition?ee.x<Ce.right:ee.x>Ce.left:!(!ve||!ve.fixed||"right"===ve.fixedPosition)||ee.x<Ce.left||ee.x>Ce.right}return be}},columnsResizer:ae=>class extends ae{_generatePointsByColumns(){const ee=this,he=ee._columnsController,de=he&&ee._columnsController.getVisibleColumns(),ue=he&&ee._columnsController.getFixedColumns(),be=K(ue),ve=de.length-ue.length,le=ee._columnHeadersView.getFixedColumnElements();super._generatePointsByColumns(),le&&le.length>0&&(ee._pointsByFixedColumns=h.A.getPointsByColumns(le,Ce=>(Ce.index>be&&(Ce.columnIndex+=ve,Ce.index+=ve),ee._pointCreated(Ce,de.length,de))))}_getTargetPoint(ee,he,de){const ue=this._columnHeadersView.getTransparentColumnElement();if(ue&&ue.length){const be=(0,S.N)(ue.get(0));if(he<=be.left||he>=be.right)return super._getTargetPoint(this._pointsByFixedColumns,he,de)}return super._getTargetPoint(ee,he,de)}},resizing:ae=>class extends ae{_setAriaOwns(){var ee,he,de;super._setAriaOwns.apply(this,arguments);const ue=null===(ee=this._columnHeadersView)||void 0===ee?void 0:ee.getFixedTableElement(),be=null===(he=this._footerView)||void 0===he?void 0:he.getFixedTableElement();null===(de=this._rowsView)||void 0===de||de.setAriaOwns(ue?.attr("id"),be?.attr("id"),!0)}},keyboardNavigation:ae=>class extends ae{_toggleInertAttr(ee){var he;const de=null===(he=this._rowsView)||void 0===he?void 0:he.getFixedContentElement();ee?de?.attr("inert",!0):de?.removeAttr("inert")}}}}}},6622:(In,Ze,M)=>{"use strict";M.d(Ze,{J:()=>q});var W=M(6054),o=M(5704),P=M(3090),b=M(2660),f=M(1363),S=M(1830),T=M(4072),y=M(8360),d=M(1009),c=M(9339);const J=function(Y,Z,Q){const te=(0,o.A)("<div>").addClass(Y.addWidgetPrefix("text-content"));Y.setAria("role","presentation",te),ie(Y,Z,Q.column,te);const pe=Y.option("showColumnLines"),z=Y.getController("columns").getHeaderContentAlignment(Q.column.alignment);return te[pe||"right"===z?"appendTo":"prependTo"](Z)};function ie(Y,Z,Q,te){const pe=Y._getIndicatorElements(Z,!0),z=Y._getIndicatorElements(Z),oe=pe&&pe.length,ae=Y._getColumnAlignment(Q.alignment),ee=`.${Y._getIndicatorClassName("sort")}`,he=`.${Y._getIndicatorClassName("sortIndex")}`,de=z.filter(ee),ue=z.children().filter(he);(te=te||Z.children(`.${Y.addWidgetPrefix("text-content")}`)).toggleClass("dx-text-content-alignment-"+ae,oe>0).toggleClass("dx-text-content-alignment-"+("left"===ae?"right":"left"),oe>0&&"center"===Q.alignment).toggleClass("dx-sort-indicator",!!de.length).toggleClass("dx-sort-index-indicator",!!ue.length).toggleClass("dx-header-filter-indicator",!!z.filter(`.${Y._getIndicatorClassName("headerFilter")}`).length)}const q={defaultOptions:()=>({showColumnHeaders:!0,cellHintEnabled:!0}),views:{columnHeadersView:class re extends c.n{init(){super.init(),this._headerPanelView=this.getView("headerPanel"),this._headerFilterController=this.getController("headerFilter"),this._dataController=this.getController("data")}_createTable(){const Z=super._createTable.apply(this,arguments);return T.A.on(Z,"mousedown selectstart",this.createAction(Q=>{const{event:te}=Q;te.shiftKey&&te.preventDefault()})),Z}_isLegacyKeyboardNavigation(){return this.option("useLegacyKeyboardNavigation")}_getDefaultTemplate(Z){const Q=this;return function(te,pe){const{caption:z}=Z,oe=!Z.command||z&&"expand"!==Z.command;"empty"===Z.command?Q._renderEmptyMessage(te,pe):oe?J(Q,te,pe).text(z):Z.command&&te.html("&nbsp;")}}_renderEmptyMessage(Z,Q){const te=this._getEmptyHeaderText();if(!te)return void Z.html("&nbsp;");const pe=J(this,Z,Q);if(te.includes("{0}")){const[oe,ae]=te.split("{0}"),ee=y.A.format("dxDataGrid-emptyHeaderColumnChooserText"),he=this._columnChooserView,de=(0,o.A)("<a>").text(ee).addClass("dx-link");T.A.on(de,"click",this.createAction(()=>he.showColumnChooser())),pe.append(W.A.createTextNode(oe)).append(de).append(W.A.createTextNode(ae))}else pe.text(te)}_getEmptyHeaderText(){const Z=!!this._columnChooserView.hasHiddenColumns(),Q=!!this._headerPanelView.hasGroupedColumns();switch(!0){case Z&&Q:return y.A.format("dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText");case Q:return y.A.format("dxDataGrid-emptyHeaderWithGroupPanelText");case Z:return y.A.format("dxDataGrid-emptyHeaderWithColumnChooserText");default:return""}}_getHeaderTemplate(Z){return Z.headerCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(Z)}}_processTemplate(Z,Q){const te=this;let pe;const{column:z}=Q,oe=super._processTemplate(Z);return pe="header"===Q.rowType&&oe&&z.headerCellTemplate&&!z.command?{render(ae){const ee=J(te,ae.container,ae.model);oe.render((0,P.X)({},ae,{container:ee}))}}:oe,pe}_handleDataChanged(Z){"refresh"===Z.changeType&&(this._isGroupingChanged||this._requireReady)&&(this._isGroupingChanged=!1,this.render())}_renderCell(Z,Q){const te=super._renderCell(Z,Q);return"header"===Q.row.rowType&&(te.addClass("dx-cell-focus-disabled"),this._isLegacyKeyboardNavigation()||Q.column&&!Q.column.type&&te.attr("tabindex",this.option("tabindex")||0)),te}_setCellAriaAttributes(Z,Q){super._setCellAriaAttributes(Z,Q),"header"===Q.rowType&&(Q.column.type||this.setAria("role","columnheader",Z),Q.column&&!Q.column.command&&!Q.column.isBand&&(Z.attr("id",Q.column.headerId),this.setAria("label",`${y.A.format("dxDataGrid-ariaColumn")} ${Q.column.caption}`,Z)))}_createRow(Z){const Q=super._createRow.apply(this,arguments);return Q.toggleClass("dx-column-lines",this.option("showColumnLines")),"header"===Z.rowType&&(Q.addClass("dx-header-row"),this._isLegacyKeyboardNavigation()||(0,d.j)("columnHeaders",this,Q,"td",this._handleActionKeyDown.bind(this))),Q}_processHeaderAction(Z,Q){}_handleActionKeyDown(Z){const{event:Q}=Z,te=(0,o.A)(Q.target);if(this._lastActionElement=Q.target,te.is(".dx-header-filter")){const pe=this._headerFilterController,z=te.closest("td"),oe=this.getColumnIndexByElement(z);oe>=0&&pe.showHeaderFilterMenu(oe,!1)}else{const pe=te.closest(".dx-row");this._processHeaderAction(Q,pe)}Q.preventDefault()}_renderCore(){const Z=this.element(),Q={};if(this._tableElement&&!this._dataController.isLoaded()&&!this._hasRowElements)return;Z.addClass(this.addWidgetPrefix("headers")).toggleClass(this.addWidgetPrefix("nowrap"),!this.option("wordWrapEnabled")).empty(),this.setAria("role","presentation",Z);const te=this._updateContent(this._renderTable({change:Q}),Q);return this.getRowCount()>1&&Z.addClass("dx-header-multi-row"),super._renderCore.apply(this,arguments),te}_renderRows(){const Z=this;(Z._dataController.isLoaded()||Z._hasRowElements)&&(super._renderRows.apply(Z,arguments),Z._hasRowElements=!0)}_renderRow(Z,Q){const te=1===this.getRowCount()?null:Q.row.rowIndex;Q.columns=this.getColumns(te),super._renderRow(Z,Q)}_createCell(Z){const{column:Q}=Z,te=super._createCell.apply(this,arguments);return Q.rowspan>1&&"header"===Z.rowType&&te.attr("rowSpan",Q.rowspan),te}_getRows(){const Z=[],Q=this.getRowCount();if(this.option("showColumnHeaders"))for(let te=0;te<Q;te++)Z.push({rowType:"header",rowIndex:te});return Z}_getCellTemplate(Z){if("header"===Z.rowType)return this._getHeaderTemplate(Z.column)}_columnOptionChanged(Z){const{changeTypes:Q}=Z,{optionNames:te}=Z;Q.grouping||Q.groupExpanding?Q.grouping&&(this._isGroupingChanged=!0):(super._columnOptionChanged(Z),(te.width||te.visible)&&this.resizeCompleted.fire())}_isElementVisible(Z){return Z&&Z.visible}_alignCaptionByCenter(Z){let Q=this._getIndicatorContainer(Z,!0);Q&&Q.length&&(Q.filter(".dx-visibility-hidden").remove(),Q=this._getIndicatorContainer(Z),Q.clone().addClass("dx-visibility-hidden").css("float","").insertBefore(Z.children(`.${this.addWidgetPrefix("text-content")}`)))}_updateCell(Z,Q){"header"===Q.rowType&&"center"===Q.column.alignment&&this._alignCaptionByCenter(Z),super._updateCell.apply(this,arguments)}_updateIndicator(Z,Q,te){const pe=super._updateIndicator.apply(this,arguments);return"center"===Q.alignment&&this._alignCaptionByCenter(Z),ie(this,Z,Q),pe}_getIndicatorContainer(Z,Q){const te=super._getIndicatorContainer(Z);return Q?te:te.filter(":not(.dx-visibility-hidden)")}_isSortableElement(Z){return!0}getHeadersRowHeight(){const Z=this.getTableElement(),Q=Z&&Z.find(".dx-header-row");return Q&&Q.toArray().reduce((te,pe)=>te+(0,f.Oq)(pe),0)||0}getHeaderElement(Z){const Q=this.getColumnElements();return Q&&Q.eq(Z)}getColumnElements(Z,Q){const te=this;let pe;const z=te._columnsController,oe=te.getRowCount();if(te.option("showColumnHeaders")){if(oe>1&&(!(0,S.O9)(Z)||(0,S.O9)(Q))){const ae=[],ee=(0,S.O9)(Q)?z.getChildrenByBandColumn(Q,!0):z.getVisibleColumns();return(0,b.__)(ee,(he,de)=>{const ue=(0,S.O9)(Z)?Z:z.getRowIndex(de.index);pe=te._getCellElement(ue,z.getVisibleIndex(de.index,ue)),pe&&ae.push(pe.get(0))}),(0,o.A)(ae)}if(!Z||Z<oe)return te.getCellElements(Z||0)}}getColumnIndexByElement(Z){const Q=this.getCellIndex(Z),te=Z.closest(".dx-row"),{rowIndex:pe}=te[0],z=this.getColumns(pe)[Q];return z?z.index:-1}getVisibleColumnIndex(Z,Q){const te=this.getColumns()[Z];return te?this._columnsController.getVisibleIndex(te.index,Q):-1}getColumnWidths(){const Z=this.getColumnElements();return Z&&Z.length?this._getWidths(Z):super.getColumnWidths.apply(this,arguments)}allowDragging(Z){const Q=Z&&this._columnsController.getRowIndex(Z.index),te=this.getColumns(Q);return(this.option("allowColumnReordering")??this._columnsController.isColumnOptionUsed("allowReordering"))&&Z.allowReordering&&te.length>1}getBoundingRect(){const Q=this.getColumnElements();return Q&&Q.length?{top:this.getTableElement().offset().top}:null}getName(){return"headers"}getColumnCount(){const Z=this.getColumnElements();return Z?Z.length:0}isVisible(){return this.option("showColumnHeaders")}optionChanged(Z){const Q=this;switch(Z.name){case"showColumnHeaders":case"wordWrapEnabled":case"showColumnLines":Q._invalidate(!0,!0),Z.handled=!0;break;default:super.optionChanged(Z)}}getHeight(){return this.getElementHeight()}getContextMenuItems(Z){const Q=this,{column:te}=Z;if(Z.row&&("header"===Z.row.rowType||"detailAdaptive"===Z.row.rowType)){const pe=Q.option("sorting");if(pe&&"none"!==pe.mode&&te&&te.allowSorting){const z=function(oe){setTimeout(()=>{Q._columnsController.changeSortOrder(te.index,oe.itemData.value)})};return[{text:pe.ascendingText,value:"asc",disabled:"asc"===te.sortOrder,icon:"context-menu-sort-asc",onItemClick:z},{text:pe.descendingText,value:"desc",disabled:"desc"===te.sortOrder,icon:"context-menu-sort-desc",onItemClick:z},{text:pe.clearText,value:"none",disabled:!te.sortOrder,icon:"context-menu-sort-none",onItemClick:z}]}}}getRowCount(){return this._columnsController&&this._columnsController.getRowCount()}setRowsOpacity(Z,Q,te){let pe,z;const oe=this.getRowCount(),ae=this._columnsController.getColumns(),ee=ae&&ae[Z],he=ee&&ee.isBand&&ee.index,de=(ue,be)=>{ue.ownerBand===he&&(z.eq(be).css({opacity:Q}),ue.isBand&&this.setRowsOpacity(ue.index,Q,pe+1))};if((0,S.O9)(he))for(pe=te=te||0;pe<oe;pe++)z=this.getCellElements(pe),z&&this.getColumns(pe).forEach(de)}}}}},4316:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>S,A:()=>T});var W=M(5704),o=M(3090),P=M(4757);const S=y=>class extends y{_applyColumnState(d){var c;const s=this.option("rtlEnabled"),a=this._getColumnAlignment(d.column.alignment,s),u=(0,o.X)(!0,{columnAlignment:a},d),h=u.rootElement.hasClass("dx-group-panel-item"),g=this._createIndicatorContainer(u,h),_=(0,W.A)("<span>").addClass(this._getIndicatorClassName(d.name)),x=null===(c=this.component)||void 0===c?void 0:c.getController("columns"),w=x?.getHeaderContentAlignment(a)||a;return u.container=g,u.indicator=_,this._renderIndicator(u),g[!h&&d.showColumnLines||"left"!==w?"prependTo":"appendTo"](d.rootElement),_}_getIndicatorClassName(d){}_getColumnAlignment(d,c){return c=c||this.option("rtlEnabled"),d&&"center"!==d?d:(0,P.n)(c)}_createIndicatorContainer(d,c){let s=this._getIndicatorContainer(d.rootElement);const a="left"===d.columnAlignment?"right":"left";return s.length||(s=(0,W.A)("<div>").addClass("dx-column-indicators")),this.setAria("role","presentation",s),s.css("float",d.showColumnLines&&!c?a:null)}_getIndicatorContainer(d){return d&&d.find(".dx-column-indicators")}_getIndicatorElements(d){const c=this._getIndicatorContainer(d);return c&&c.children()}_renderIndicator(d){const c=d.container,s=d.indicator;c&&s&&c.append(s)}_updateIndicators(d){const c=this,s=c.getColumns(),a=c.getColumnElements();let u;if(a&&s.length===a.length)for(let h=0;h<s.length;h++){u=a.eq(h),c._updateIndicator(u,s[h],d);const g=u.parent().data("options");g&&g.cells&&(g.cells[u.index()].column=s[h])}}_updateIndicator(d,c,s){if(!c.command)return this._applyColumnState({name:s,rootElement:d,column:c,showColumnLines:this.option("showColumnLines")})}},T=S},4169:(In,Ze,M)=>{"use strict";M.d(Ze,{_:()=>hn,a:()=>$n});var W=M(5737),o=M(3686),P=M(5704),b=M(8684),f=M(4270),S=M(6021),T=M(3090),y=M(6946),d=M(2660),c=M(6509),s=M(1830),a=M(6234),u=M(6569),h=M(1221),g=M(5335),_=M(9061),x=M(8360),w=M(9551),D=M(127),C=M(3376),I=M(8736);const L=["filterValues","filterType","fixed","fixedPosition"],N=["visibleIndex","dataField","name","dataType","width","visible","sortOrder","lastSortOrder","sortIndex","groupIndex","filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","added"].concat(L),G={visibleWidth:!0,bestFitWidth:!0,bufferedFilterValue:!0},U=Number.MAX_SAFE_INTEGER||9007199254740991,B="groupExpand",J=/columns\[(\d+)\]\.?/gi,ie={visible:!0,showInColumnChooser:!0},re={number:["=","<>","<",">","<=",">=","between"],string:["contains","notcontains","startswith","endswith","=","<>"],date:["=","<>","<",">","<=",">=","between"],datetime:["=","<>","<",">","<=",">=","between"]},q={visibleIndex:!0,groupIndex:!0,grouped:!0,sortIndex:!0,sortOrder:!0},Y="group",Z="columnChooser";var Q=M(5345),te=M(4859),pe=M(4761),z=M(4757),oe=M(1520);const ae=function(Ln){Ln.filterOperations=Ln.defaultFilterOperations};let ee=1;const he=function(Ln,Nt,Gt,on){let sn={};if(Nt){(0,s.Kg)(Nt)&&(Nt={dataField:Nt}),Ln.setName(Nt);let It={};if(Nt.command)It=(0,c.tm)(sn,Nt);else{sn=Ln.getCommonSettings(Nt),Gt&&Gt.name&&Gt.dataField&&(Nt=(0,T.X)({},Nt,{dataField:Gt.dataField}));const Ot=Ln._createCalculatedColumnOptions(Nt,on);Nt.type||(It={headerId:"dx-col-"+ee++}),It=(0,c.tm)(It,ie),(0,c.tm)(It,sn),(0,c.tm)(It,Ot),(0,c.tm)(It,Nt),(0,c.tm)(It,{selector:null})}return Nt.filterOperations===Nt.defaultFilterOperations&&ae(It),It}},de=function(Ln,Nt,Gt,on){let sn=[];return Nt&&(0,d.__)(Nt,(It,Ot)=>{const zt=(on??0)+sn.length,un=Ln._columnsUserState&&Ke(Ot,Ln._columnsUserState[zt])&&Ln._columnsUserState[zt],Pn=he(Ln,Ot,un,Gt);Pn&&(Gt&&(Pn.ownerBand=Gt),sn.push(Pn),Pn.columns&&(sn=sn.concat(de(Ln,Pn.columns,Pn,sn.length)),delete Pn.columns,Pn.hasColumns=!0))}),sn},ue=function(Ln,Nt){const Gt=[];let on=Nt[Ln];for(;on;)Gt.unshift(on),on=Nt[Ln=on.index];return Gt},be=function(Ln,Nt,Gt){let on=[];const sn=Nt[Ln];if(sn)for(let It=0;It<sn.length;It++){const Ot=sn[It];(!(0,s.O9)(Ot.groupIndex)||Ot.showWhenGrouped)&&(on.push(Ot),Gt&&Ot.isBand&&(on=on.concat(be(Ot.index,Nt,Gt))))}return on},Ce=function(Ln,Nt){let Gt=0;const on=Ln.getChildrenByBandColumn(Nt,!0);return(0,d.__)(on,(sn,It)=>{It.isBand?(It.colspan=It.colspan||Ce(Ln,It.index),Gt+=It.colspan||1):Gt+=1}),Gt},ge=function(Ln){let Nt=(0,s.NW)(Ln);return"string"!==Nt&&"boolean"!==Nt&&"number"!==Nt&&"date"!==Nt&&"object"!==Nt&&(Nt=void 0),Nt},fe=function(Ln,Nt){switch(Ln){case"date":case"datetime":return pe.A.getDateSerializationFormat(Nt);case"number":if((0,s.Kg)(Nt))return"string";if((0,s.kf)(Nt))return null}},xe=function(Ln,Nt){Ln.deserializeValue||(I.A.isDateType(Nt)&&(Ln.deserializeValue=function(Gt){return pe.A.deserializeDate(Gt)},Ln.serializeValue=function(Gt){return(0,s.Kg)(Gt)?Gt:pe.A.serializeDate(Gt,this.serializationFormat)}),"number"===Nt&&(Ln.deserializeValue=function(Gt){const on=parseFloat(Gt);return isNaN(on)?Gt:on},Ln.serializeValue=function(Gt,on){return"filter"===on?Gt:(0,s.O9)(Gt)&&"string"===this.serializationFormat?Gt.toString():Gt}))},Ee=function(Ln){return!0===Ln.value?this.trueText||"true":!1===Ln.value?this.falseText||"false":Ln.valueText||""},Oe=function(Ln){if("boolean"===Ln)return Ee},$e=function(Ln){(0,d.__)(Ln._columns,(Nt,Gt)=>{Gt.index=Nt}),(0,d.__)(Ln._columns,(Nt,Gt)=>{(0,s.Gv)(Gt.ownerBand)&&(Gt.ownerBand=Gt.ownerBand.index)}),(0,d.__)(Ln._commandColumns,(Nt,Gt)=>{Gt.index=-(Nt+1)})},Be=function(Ln,Nt){(0,Q.Il)(Ln._columns,"groupIndex",Nt,Gt=>{const{grouped:on}=Gt;return delete Gt.grouped,on})},st=function(Ln,Nt,Gt){const on=(0,s.Gv)(Nt)?Nt.rowIndex:null,sn=Gt===Y?Ln.getGroupColumns():Gt===Z?Ln.getChooserColumns():Ln.getVisibleColumns(on);let It;return Nt=(0,s.Gv)(Nt)?Nt.columnIndex:Nt,It=sn[Nt],It&&It.type===B&&(It=Ln._columns.filter(Ot=>It.type===Ot.type)[0]||It),It&&(0,s.O9)(It.index)?It.index:-1};function Ke(Ln,Nt){return Ln&&Nt&&Nt.name===(Ln.name||Ln.dataField)&&(Nt.dataField===Ln.dataField||Ln.name)}const Ye=function(Ln){const Nt=Ln._columnsUserState,Gt=Ln._ignoreColumnOptionNames||[],on=Ln._columns,sn={};let It=[],Ot=!0;const zt=[];let un,Pn,ci;function Ei(mo,xo){if(xo)for(let vr=0;vr<N.length;vr++){const rn=N[vr];Gt.includes(rn)||("dataType"===rn?mo[rn]=mo[rn]||xo[rn]:L.includes(rn)?rn in xo&&(mo[rn]=xo[rn]):("selectedFilterOperation"===rn&&xo[rn]&&(mo.defaultSelectedFilterOperation=mo[rn]||null),mo[rn]=xo[rn]))}}function Hi(mo,xo){const vr=xo.name||xo.dataField;let rn=sn[vr]||0;for(let en=0;en<mo.length;en++)if(Ke(xo,mo[en])){if(!rn)return sn[vr]=sn[vr]||0,sn[vr]++,en;rn--}return-1}if(Nt){for(ci=0;ci<on.length;ci++)Pn=Hi(Nt,on[ci]),Ot=Ot&&Pn>=0,zt.push(Pn);for(ci=0;ci<on.length;ci++)un=on[ci],Pn=zt[ci],(Ln._hasUserState||Ot)&&Ei(un,Nt[Pn]),Pn>=0&&(0,s.O9)(Nt[Pn].initialIndex)?It[Pn]=un:It.push(un);let mo=!1;for(ci=0;ci<Nt.length;ci++){const xo=Nt[ci];xo.added&&Hi(on,xo)<0&&(un=he(Ln,xo.added),Ei(un,xo),It.push(un),xo.added.columns&&(mo=!0))}mo&&($e(Ln),It=de(Ln,It)),Re(Ln,It)}},Pe=function(Ln,Nt){$e(Ln),Be(Ln,Nt),function(Ln,Nt){(0,d.__)(Ln._columns,(Gt,on)=>{(0,s.O9)(on.sortIndex)&&!At(on.sortOrder)&&delete on.sortIndex}),(0,Q.Il)(Ln._columns,"sortIndex",Nt,Gt=>!(0,s.O9)(Gt.groupIndex)&&At(Gt.sortOrder))}(Ln,Nt),Dt(Ln),function(Ln,Nt){let Gt;const on=[],sn=Ln.getBandColumnsCache(),It=[],Ot=Ln._columns.filter(zt=>!zt.command);for(let zt=0;zt<Ot.length;zt++)Gt=Ot[zt],ue(zt,sn.columnParentByIndex).length?It.push(Gt):on.push(Gt);(0,Q.Il)(It,"visibleIndex",Nt),(0,Q.Il)(on,"visibleIndex",Nt)}(Ln,Nt)},Se=function(Ln){Ln.resetColumnsCache()};function Re(Ln,Nt){Ln._previousColumns=Ln._columns,Ln._columns=Nt,Se(Ln),Ln.updateColumnDataTypes()}const Fe=function(Ln,Nt,Gt,on){const sn=Ln._columnChanges||{optionNames:{length:0},changeTypes:{length:0},columnIndex:on};Gt=(Gt=Gt||"all").split(".")[0];const{changeTypes:It}=sn;Nt&&!It[Nt]&&(It[Nt]=!0,It.length++);const{optionNames:Ot}=sn;Gt&&!Ot[Gt]&&(Ot[Gt]=!0,Ot.length++),(void 0===on||on!==sn.columnIndex)&&((0,s.O9)(on)&&(sn.columnIndices??(sn.columnIndices=[]),(0,s.O9)(sn.columnIndex)&&sn.columnIndices.push(sn.columnIndex),sn.columnIndices.push(on)),delete sn.columnIndex),Ln._columnChanges=sn,Se(Ln)},Xe=function(Ln){const Nt=Ln.option("onColumnsChanging"),Gt=Ln._columnChanges;var sn;Ln.isInitialized()&&!Ln._updateLockCount&&Gt&&(Nt&&(Ln._updateLockCount++,Nt((0,T.X)({component:Ln.component},Gt)),Ln._updateLockCount--),Ln._columnChanges=void 0,(sn=Gt.optionNames)&&["dataField","lookup","dataType","columns"].some(It=>sn[It])?(Ln._reinitAfterLookupChanges=Gt?.optionNames.lookup,Ln.reinit(),Ln._reinitAfterLookupChanges=void 0):Ln.columnsChanged.fire(Gt))},qe=function(Ln,Nt,Gt,on,sn){const It=(0,f.Hz)(Gt),Ot=Nt.index;let zt,un,Pn;if(3===arguments.length)return It(Nt,{functionsAsIs:!0});const ci=It(Nt,{functionsAsIs:!0});if(!(0,te.RL)(ci,on,{maxDepth:5})){"groupIndex"===Gt||"calculateGroupValue"===Gt?(un="grouping",function(Ln,Nt,Gt,on){if(Gt>=0)on>=0||(Nt.lastSortOrder=Nt.sortOrder);else{const It=Ln.option("sorting.mode");let Ot=Nt.lastSortOrder;"single"===It&&Ln._columns.some(un=>un!==Nt&&(0,s.O9)(un.sortIndex))&&(Ot=void 0),Nt.sortOrder=Ot}}(Ln,Nt,on,ci)):un="sortIndex"===Gt||"sortOrder"===Gt||"calculateSortValue"===Gt?"sorting":"columns";const Ei=(0,f.vL)(Gt);Ei(Nt,on,{functionsAsIs:!0});const Hi=function(Ln,Nt){let on,Gt=[];const sn=Ln.getBandColumnsCache(),It=function(Ot){return Ot.ownerBand===Nt.ownerBand};if(sn.isPlain){const Ot=Ln._columns.indexOf(Nt);Ot>=0&&(Gt=[`columns[${Ot}]`])}else for(on=Ln._columns.filter(It);on.length&&-1!==on.indexOf(Nt);)Gt.unshift(`columns[${on.indexOf(Nt)}]`),on=(Nt=sn.columnParentByIndex[Nt.index])?Ln._columns.filter(It):[];return Gt.join(".")}(Ln,Nt);q[Gt]&&(Pe(Ln,Nt),on=It(Nt)),("name"===Gt||"allowEditing"===Gt)&&Ln._checkColumns(),!(0,s.O9)(ci)&&!(0,s.O9)(on)&&0!==Gt.indexOf("buffer")&&(sn=!0),sn?Se(Ln):(!N.includes(Gt)&&"visibleWidth"!==Gt&&(zt=Ln.option("columns"),Pn=Ln.getColumnByPath(Hi,zt),(0,s.Kg)(Pn)&&(Pn=zt[Ot]={dataField:Pn}),Pn&&Ke(Pn,Nt)&&Ei(Pn,on,{functionsAsIs:!0})),Fe(Ln,un,Gt,Ot)),Hi&&function(Ln,Nt){const{value:Gt}=Nt,{optionName:on}=Nt,{prevValue:sn}=Nt,{fullOptionName:It}=Nt,Ot=`${It}.${on}`;!G[on]&&Ln._skipProcessingColumnsChange!==Ot&&(Ln._skipProcessingColumnsChange=Ot,Ln.component._notifyOptionChanged(Ot,Gt,sn),Ln._skipProcessingColumnsChange=!1)}(Ln,{fullOptionName:Hi,optionName:Gt,value:on,prevValue:ci})}};function At(Ln){return"asc"===Ln||"desc"===Ln}const qt=function(Ln,Nt){if(!this.dataField)return;const Gt=this.dataField.split("."),on=Gt.length-1;this.serializeValue&&(Nt=this.serializeValue(Nt));for(let sn=0;sn<on;sn++){const It=Gt[sn];Ln=Ln[It]=Ln[It]||{}}Ln[Gt[on]]=Nt},wt=function(Ln,Nt,Gt){const on=[];return Ln[Nt=Nt||0]&&(0,d.__)(Ln[Nt],(sn,It)=>{(It.ownerBand===Gt||It.type===B)&&(It.isBand&&It.colspan?on.push.apply(on,wt(Ln,Nt+1,It.index)):(!It.command||Nt<1)&&on.push(It))}),on},ri=(Ln,Nt)=>!!Ln._columns.filter(on=>on.type===Nt.type).length,Tn=function(Ln,Nt){const Gt=Ln.option("rtlEnabled");return Nt.command&&!ri(Ln,Nt)||!Nt.fixedPosition?Gt?"right":"left":Nt.fixedPosition},Jn=function(Ln,Nt,Gt,on){let sn;const It=this.getRowCount();let Ot=Ln[on]&&Ln[on].rowspan,zt=Nt.filter(un=>un.type===Gt);return Ln.forEach((un,Pn)=>{un.type===Gt&&(sn=Pn,Ot=Ln[Pn+1]?Ln[Pn+1].rowspan:It)}),Ot>1&&(zt=(0,d.Tj)(zt,un=>(0,T.X)({},un,{rowspan:Ot}))),zt.unshift.apply(zt,(0,s.O9)(sn)?[sn,1]:[on,0]),Ln.splice.apply(Ln,zt),Ot||1},Bn=function(Ln,Nt){let Gt=Ln?Ln.toString():"0";for(;Gt.length<Nt;)Gt=`0${Gt}`;return Gt},gi=(Ln,Nt,Gt,on)=>{let sn,It,Ot=Nt.slice().map(Ei=>(0,T.X)({},Ei));const zt=Ln._isColumnFixing();let un=Gt.slice().map(Ei=>(0,T.X)({fixed:zt},Ei));const Pn=Ei=>Gt.reduce((Hi,mo,xo)=>mo.type===(on&&Ei.type===B?"expand":Ei.type)||mo.command===Ei.command?xo:Hi,-1),ci=Ei=>Ei.command!==Gt[It].command;for(let Ei=0;Ei<Nt.length;Ei++)sn=Nt[Ei],It=sn&&(sn.type||sn.command)?Pn(sn):-1,It>=0&&(on?(Ot[Ei]=(0,T.X)({fixed:zt},Gt[It],sn),sn.type!==B&&(un=un.filter(ci))):Ot[Ei]=(0,T.X)({},sn,Gt[It],sn.type===B&&{visibleIndex:sn.visibleIndex,index:sn.index,headerId:sn.headerId,allowFixing:0===sn.groupIndex,allowReordering:0===sn.groupIndex,groupIndex:sn.groupIndex}));return Nt.length&&on&&un.length&&(Ot=Ot.concat(un)),Ot},Ai=(Ln,Nt)=>(0,s.O9)(Nt.fixed)||!Nt.type?Nt.fixed:Ln._isColumnFixing(),Dt=Ln=>{Ln._bandColumnsCache=void 0},cn=(Ln,Nt)=>{const Gt=(0,s.Kg)(Nt)&&Nt.substr(0,Nt.indexOf(":"));let on;if(void 0!==Nt)return Gt&&(Nt=Nt.substr(Gt.length+1)),Gt?on=Ln.filter(sn=>`${sn[Gt]}`===Nt)[0]:["index","name","dataField","caption"].some(sn=>(on=Ln.filter(It=>It[sn]===Nt)[0],!!on)),on};class hn extends C.Ay.Controller{init(Nt){this._dataController=this.getController("data"),this._focusController=this.getController("focus"),this._stateStoringController=this.getController("stateStoring");const Gt=this.option("columns");this._commandColumns=this._commandColumns||[],this._columns=this._columns||[],this._isColumnsFromOptions=!!Gt,this._isColumnsFromOptions?(Re(this,Gt?de(this,Gt):[]),Ye(this)):Re(this,this._columnsUserState?de(this,this._columnsUserState):this._columns),function(Ln){const Nt=Ln._getExpandColumnOptions();Ln.addCommandColumn(Nt)}(this),this._dataSourceApplied?this.applyDataSource(this._dataSource,!0,Nt):Pe(this),this._checkColumns()}_getExpandColumnOptions(){return{type:"expand",command:"expand",width:"auto",cssClass:"dx-command-expand",allowEditing:!1,allowGrouping:!1,allowSorting:!1,allowResizing:!1,allowReordering:!1,allowHiding:!1}}_getFirstItems(Nt){let Gt,on=[];const sn=function(It,Ot){if(!It||!Ot)return It;for(let zt=0;zt<It.length;zt++){const un=sn(It[zt].items||It[zt].collapsedItems,Ot-1);if(un&&un.length)return un}};return Nt&&Nt.items().length>0&&(Gt=I.A.normalizeSortingInfo(Nt.group()).length,on=sn(Nt.items(),Gt)||[]),on}_endUpdateCore(){!this._skipProcessingColumnsChange&&Xe(this)}callbackNames(){return["columnsChanged"]}getColumnByPath(Nt,Gt){let sn;const It=[];return Nt.replace(J,(Ot,zt)=>(It.push(parseInt(zt)),"")),It.length&&(sn=Gt?It.reduce((Ot,zt)=>Ot&&Ot.columns&&Ot.columns[zt],{columns:Gt}):function(Ln,Nt){let Gt,on;const It=function(Ot){return Ot.ownerBand===(Gt?Gt.index:void 0)};if(Ln.getBandColumnsCache().isPlain)Gt=Ln._columns[Nt[0]];else{on=Ln._columns.filter(It);for(let Ot=0;Ot<Nt.length;Ot++)Gt=on[Nt[Ot]],Gt&&(on=Ln._columns.filter(It))}return Gt}(this,It)),sn}optionChanged(Nt){let Gt;switch(Nt.name){case"adaptColumnWidthByRatio":Nt.handled=!0;break;case"dataSource":Nt.value!==Nt.previousValue&&!this.option("columns")&&(!Array.isArray(Nt.value)||!Array.isArray(Nt.previousValue))&&(this._columns=[]);break;case"columns":Gt=this._skipProcessingColumnsChange,Nt.handled=!0,this._skipProcessingColumnsChange||(Nt.name===Nt.fullName?(this._columnsUserState=null,this._ignoreColumnOptionNames=null,this.init()):(this._columnOptionChanged(Nt),Gt=!0)),Gt&&this._updateRequireResize(Nt);break;case"commonColumnSettings":case"columnAutoWidth":case"allowColumnResizing":case"allowColumnReordering":case"columnFixing":case"grouping":case"groupPanel":case"regenerateColumnsByVisibleItems":case"customizeColumns":case"columnHidingEnabled":case"dateSerializationFormat":case"columnResizingMode":case"columnMinWidth":case"columnWidth":Nt.handled=!0,this.reinit("columnWidth"===Nt.fullName&&["width"]);break;case"rtlEnabled":this.reinit();break;default:super.optionChanged(Nt)}}_columnOptionChanged(Nt){let Gt={};const on=this.getColumnByPath(Nt.fullName),sn=Nt.fullName.replace(J,"");on&&(sn?Gt[sn]=Nt.value:Gt=Nt.value,this._skipProcessingColumnsChange=Nt.fullName,this.columnOption(on.index,Gt),this._skipProcessingColumnsChange=!1)}_updateRequireResize(Nt){const{component:Gt}=this;"width"===Nt.fullName.replace(J,"")&&Gt._updateLockCount&&(Gt._requireResize=!0)}publicMethods(){return["addColumn","deleteColumn","columnOption","columnCount","clearSorting","clearGrouping","getVisibleColumns","getVisibleColumnIndex"]}applyDataSource(Nt,Gt,on){const sn=this,It=Nt&&Nt.isLoaded();if(sn._dataSource=Nt,!sn._dataSourceApplied||0===sn._dataSourceColumnsCount||Gt||sn.option("regenerateColumnsByVisibleItems")){if(It){if(!sn._isColumnsFromOptions){const Ot=function(Ln,Nt){const Gt=Ln._getFirstItems(Nt);let on;const sn={},It=[];for(let Ot=0;Ot<Gt.length;Ot++)if(Gt[Ot])for(on in Gt[Ot])(!(0,s.Tn)(Gt[Ot][on])||a.A.isWrapped(Gt[Ot][on]))&&(sn[on]=!0);for(on in sn)if(0!==on.indexOf("__")){const Ot=he(Ln,on);It.push(Ot)}return It}(sn,Nt);Ot.length&&(Re(sn,Ot),sn._dataSourceColumnsCount=sn._columns.length,Ye(sn))}return sn.updateColumns(Nt,Gt,on)}sn._dataSourceApplied=!1,Pe(sn)}else if(It&&!sn.isAllDataTypesDefined(!0)&&sn.updateColumnDataTypes(Nt))return Fe(sn,"columns"),Xe(sn),(new S.cY).reject().promise()}reset(){this._dataSource=null,this._dataSourceApplied=!1,this._dataSourceColumnsCount=void 0,this.reinit()}resetColumnsCache(){this._visibleColumns=void 0,this._fixedColumns=void 0,this._rowCount=void 0,Dt(this)}reinit(Nt){this._columnsUserState=this.getUserState(),this._ignoreColumnOptionNames=Nt||null,this.init(),Nt&&(this._ignoreColumnOptionNames=null)}isInitialized(){return!!this._columns.length||!!this.option("columns")}isDataSourceApplied(){return this._dataSourceApplied}getCommonSettings(Nt){const Gt=(!Nt||!Nt.type)&&this.option("commonColumnSettings")||{},on=this.option("grouping")??{},sn=this.option("groupPanel")??{};return(0,T.X)({allowFixing:this.option("columnFixing.enabled"),allowResizing:this.option("allowColumnResizing")||void 0,allowReordering:this.option("allowColumnReordering"),minWidth:this.option("columnMinWidth"),width:this.option("columnWidth"),autoExpandGroup:on.autoExpandAll,allowCollapsing:on.allowCollapsing,allowGrouping:sn.allowColumnDragging&&sn.visible||on.contextMenuEnabled},Gt)}isColumnOptionUsed(Nt){for(let Gt=0;Gt<this._columns.length;Gt++)if(this._columns[Gt][Nt])return!0}isAllDataTypesDefined(Nt){const Gt=this._columns;if(!Gt.length)return!1;for(let on=0;on<Gt.length;on++)if((Gt[on].dataField||Gt[on].calculateCellValue!==Gt[on].defaultCalculateCellValue)&&(!Gt[on].dataType||Nt&&Gt[on].deserializeValue&&void 0===Gt[on].serializationFormat))return!1;return!0}getColumns(){return this._columns}isBandColumnsUsed(){return this.getColumns().some(Nt=>Nt.isBand)}getGroupColumns(){const Nt=[];return(0,d.__)(this._columns,function(){(0,s.O9)(this.groupIndex)&&(Nt[this.groupIndex]=this)}),Nt}_shouldReturnVisibleColumns(){return!0}_compileVisibleColumns(Nt){return this._visibleColumns=this._visibleColumns||this._compileVisibleColumnsCore(),Nt=(0,s.O9)(Nt)?Nt:this._visibleColumns.length-1,this._visibleColumns[Nt]||[]}getVisibleColumns(Nt,Gt){return this._shouldReturnVisibleColumns()?this._compileVisibleColumns.apply(this,arguments):[]}getFixedColumns(Nt){return this._fixedColumns=this._fixedColumns||this._getFixedColumnsCore(),Nt=(0,s.O9)(Nt)?Nt:this._fixedColumns.length-1,this._fixedColumns[Nt]||[]}getFilteringColumns(){return this.getColumns().filter(Nt=>(Nt.dataField||Nt.name)&&(Nt.allowFiltering||Nt.allowHeaderFiltering)).map(Nt=>{const Gt=(0,T.X)(!0,{},Nt);return(0,s.O9)(Gt.dataField)||(Gt.dataField=Gt.name),Gt.filterOperations=Nt.filterOperations!==Nt.defaultFilterOperations?Gt.filterOperations:null,Gt})}getColumnIndexOffset(){return 0}_getFixedColumnsCore(){const Nt=this,Gt=[],on=Nt.getRowCount(),It={command:"transparent"};let zt,un,Pn,Ot=0;if(Nt._isColumnFixing())for(let ci=0;ci<=on;ci++){zt=0,Pn=null,un=null;const Ei=Nt.getVisibleColumns(ci,!0);for(let Hi=0;Hi<Ei.length;Hi++){const mo=Ei[Hi-1],xo=Ei[Hi];xo.fixed?mo&&mo.fixed&&Tn(Nt,mo)!==Tn(Nt,xo)?(0,s.O9)(un)||(un=Hi):Pn=xo.fixedPosition:(0===ci&&(xo.isBand&&xo.colspan?Ot+=xo.colspan:Ot++),zt++,(0,s.O9)(un)||(un=Hi))}if(0===ci&&(0===zt||zt>=Ei.length))return[];(0,s.O9)(un)||(un="right"===Pn?0:Ei.length),Gt[ci]=Ei.slice(0),It.colspan||(It.colspan=Ot),Gt[ci].splice(un,zt,It)}return Gt.map(ci=>ci.map(Ei=>{const Hi=(0,W.A)({},Ei);return Hi.headerId&&(Hi.headerId+="-fixed"),Hi}))}_isColumnFixing(){let Nt=this.option("columnFixing.enabled");return!Nt&&(0,d.__)(this._columns,(Gt,on)=>{if(on.fixed)return Nt=!0,!1}),Nt}_getExpandColumnsCore(){return this.getGroupColumns()}getExpandColumns(){let Gt,Nt=this._getExpandColumnsCore();const on=Nt.filter(zt=>0===zt.groupIndex)[0],sn=on&&on.fixed,It=this._isColumnFixing(),Ot=this.option("rtlEnabled");return Nt.length&&(Gt=this.columnOption("command:expand")),Nt=(0,d.Tj)(Nt,zt=>(0,T.X)({},zt,{visibleWidth:null,minWidth:null,cellTemplate:(0,s.O9)(zt.groupIndex)?null:zt.cellTemplate,headerCellTemplate:null,fixed:!(!(0,s.O9)(zt.groupIndex)||!sn)||It,fixedPosition:Ot?"right":"left"},Gt,{index:zt.index,type:zt.type||B})),Nt}getBandColumnsCache(){if(!this._bandColumnsCache){const Nt=this._columns,Gt={},on={};let sn=!0;Nt.forEach(It=>{const{ownerBand:Ot}=It;let zt=(0,s.Gv)(Ot)?Ot.index:Ot;const un=Nt[zt];It.hasColumns&&(sn=!1),It.colspan&&(It.colspan=void 0),It.rowspan&&(It.rowspan=void 0),un?on[It.index]=un:zt=-1,Gt[zt]=Gt[zt]||[],Gt[zt].push(It)}),this._bandColumnsCache={isPlain:sn,columnChildrenByIndex:Gt,columnParentByIndex:on}}return this._bandColumnsCache}_isColumnVisible(Nt){return Nt.visible&&this.isParentColumnVisible(Nt.index)}_isColumnInGroupPanel(Nt){return(0,s.O9)(Nt.groupIndex)&&!Nt.showWhenGrouped}hasVisibleDataColumns(){return this._columns.some(Gt=>{const on=this._isColumnVisible(Gt),sn=this._isColumnInGroupPanel(Gt);return on&&!sn&&!Gt.command})}_compileVisibleColumnsCore(){const Nt=this.getBandColumnsCache(),Gt=gi(this,this._columns,this._commandColumns,!0);!function(Ln,Nt,Gt){let on;for(let sn=0;sn<Nt.length;sn++){const It=Nt[sn];(It.visible||It.command)&&(It.isBand&&(It.colspan=It.colspan||Ce(Ln,It.index)),(!It.isBand||!It.colspan)&&(on=Ln.getRowCount(),!It.command&&(!(0,s.O9)(It.groupIndex)||It.showWhenGrouped)&&(on-=ue(It.index,Gt.columnParentByIndex).length),on>1&&(It.rowspan=on)))}}(this,Gt,Nt);const on=this._getIndexedColumns(Gt),sn=this._getVisibleColumnsFromIndexed(on);return!this.hasVisibleDataColumns()&&this._columns.length&&sn[sn.length-1].push({command:"empty"}),sn}_getIndexedColumns(Nt){const Gt=this.option("rtlEnabled"),on=this.getRowCount(),sn=function(Ln){let Nt;for(Nt=0;Ln>1;Nt++)Ln/=10;return Nt}(Nt.length),It=this.getBandColumnsCache(),Ot=[],zt=[];for(let un=0;un<on;un+=1)zt[un]=[{}],Ot[un]=[{},{},{}];return Nt.forEach(un=>{let ci,{visibleIndex:Pn}=un;const Ei=ue(un.index,It.columnParentByIndex),Hi=this._isColumnVisible(un),mo=this._isColumnInGroupPanel(un);if(Hi&&!mo){const rn=Ei.length;var xo,vr;if(Pn<0)Pn=-Pn,ci=zt[rn];else if(un.fixed=(null===(xo=Ei[0])||void 0===xo?void 0:xo.fixed)??un.fixed,un.fixedPosition=(null===(vr=Ei[0])||void 0===vr?void 0:vr.fixedPosition)??un.fixedPosition,un.fixed){const en=!!un.command&&!ri(this,un);let Zn="right"===un.fixedPosition;Gt&&!en&&(Zn=!Zn),ci=Zn?Ot[rn][2]:Ot[rn][0]}else ci=Ot[rn][1];if(Ei.length){Pn=Bn(Pn,sn);for(let en=Ei.length-1;en>=0;en-=1)Pn=Bn(Ei[en].visibleIndex,sn)+Pn}ci[Pn]=ci[Pn]||[],ci[Pn].push(un)}}),{positiveIndexedColumns:Ot,negativeIndexedColumns:zt}}_getVisibleColumnsFromIndexed(Nt){let{positiveIndexedColumns:Gt,negativeIndexedColumns:on}=Nt;const sn=[],It=this.getRowCount(),Ot=gi(this,this.getExpandColumns(),this._columns);let zt=0,un=0;for(let Pn=0;Pn<It;Pn+=1){sn.push([]),(0,c.ap)(on[Pn],(Hi,mo)=>{sn[Pn].unshift.apply(sn[Pn],mo)});const ci=sn[Pn].length;Gt[Pn].forEach(Hi=>{(0,c.ap)(Hi,(mo,xo)=>{sn[Pn].push.apply(sn[Pn],xo)})}),un<=Pn&&(un+=Jn.call(this,sn[Pn],Ot,"detailExpand",ci)),zt<=Pn&&(zt+=Jn.call(this,sn[Pn],Ot,B,ci))}return sn.push(wt(sn)),sn}getInvisibleColumns(Nt,Gt){const on=this;let It,sn=[];return(0,d.__)(Nt=Nt||on._columns,(Ot,zt)=>{if(zt.ownerBand===Gt){if(zt.isBand)return It=zt.visible?on.getInvisibleColumns(on.getChildrenByBandColumn(zt.index),zt.index):on.getChildrenByBandColumn(zt.index),void(It.length&&(sn.push(zt),sn=sn.concat(It)));zt.visible||sn.push(zt)}}),sn}getChooserColumns(Nt){return((Ln,Nt)=>{if("asc"!==Nt&&"desc"!==Nt)return Ln;const Gt="asc"===Nt?1:-1;return Ln.sort((on,sn)=>Gt*(on.caption||"").localeCompare(sn.caption||"")),Ln})((Nt?this.getColumns():this.getInvisibleColumns()).filter(It=>It.showInColumnChooser),this.option("columnChooser.sortOrder"))}allowMoveColumn(Nt,Gt,on,sn){const It=st(this,Nt,on),Ot=this._columns[It];return!(!Ot||!(Ot.allowReordering||Ot.allowGrouping||Ot.allowHiding))&&(on===sn?on!==Z&&(Nt=(0,s.Gv)(Nt)?Nt.columnIndex:Nt)!==(Gt=(0,s.Gv)(Gt)?Gt.columnIndex:Gt)&&Nt+1!==Gt:on===Y&&sn!==Z||sn===Y?Ot&&Ot.allowGrouping:on!==Z&&sn!==Z||Ot&&Ot.allowHiding)}moveColumn(Nt,Gt,on,sn){const It=this,Ot={};let zt;const un=st(It,Nt,on),Pn=st(It,Gt,sn);let ci;if(un>=0){const Ei=It._columns[un];if(Gt=(0,s.Gv)(Gt)?Gt.columnIndex:Gt,ci=Pn>=0?It._columns[Pn].groupIndex:-1,(0,s.O9)(Ei.groupIndex)&&on===Y&&(ci>Ei.groupIndex&&ci--,sn!==Y?Ot.groupIndex=void 0:(zt=Ei.groupIndex,delete Ei.groupIndex,Be(It))),sn===Y)Ot.groupIndex=function(Ln,Nt,Gt){const on=Ln.getGroupColumns();let sn;if(Gt>=0)for(sn=0;sn<on.length;sn++)on[sn].groupIndex>=Gt&&on[sn].groupIndex++;else for(Gt=0,sn=0;sn<on.length;sn++)Gt=Math.max(Gt,on[sn].groupIndex+1);return Gt}(It,0,ci),Ei.groupIndex=zt;else if(Gt>=0){const mo=It._columns[Pn];Ot.visibleIndex=!mo||Ei.ownerBand!==mo.ownerBand||Ai(It,Ei)^Ai(It,mo)?U:mo.visibleIndex}const Hi=sn!==Z;Ei.visible!==Hi&&(Ot.visible=Hi),It.columnOption(Ei.index,Ot)}}changeSortOrder(Nt,Gt){const sn={},It=this.option("sorting"),Ot=It&&It.mode,Pn=this._columns[Nt];("single"===Ot||"multiple"===Ot)&&Pn&&Pn.allowSorting&&(("single"===Ot||!Gt)&&!(0,s.O9)(Pn.groupIndex)&&(0,d.__)(this._columns,function(ci){ci!==Nt&&this.sortOrder&&((0,s.O9)(this.groupIndex)||delete this.sortOrder,delete this.sortIndex)}),At(Gt)?Pn.sortOrder!==Gt&&(sn.sortOrder=Gt):"none"===Gt?Pn.sortOrder&&(sn.sortIndex=void 0,sn.sortOrder=void 0):function(ci){if("ctrl"===Gt){if(!("sortOrder"in ci)||!("sortIndex"in ci))return!1;sn.sortOrder=void 0,sn.sortIndex=void 0}else sn.sortOrder=(0,s.O9)(ci.groupIndex)||(0,s.O9)(ci.sortIndex)?"desc"===ci.sortOrder?"asc":"desc":"asc"}(Pn)),this.columnOption(Pn.index,sn)}getSortDataSourceParameters(Nt){const Gt=[],on=[];return(0,d.__)(this._columns,function(){(this.dataField||this.selector||this.calculateCellValue)&&(0,s.O9)(this.sortIndex)&&!(0,s.O9)(this.groupIndex)&&(Gt[this.sortIndex]=this)}),(0,d.__)(Gt,function(){if(At(this&&this.sortOrder)){const It={selector:this.calculateSortValue||this.displayField||this.calculateDisplayValue||Nt&&this.selector||this.dataField||this.calculateCellValue,desc:"desc"===this.sortOrder};this.sortingMethod&&(It.compare=this.sortingMethod.bind(this)),on.push(It)}}),on.length>0?on:null}getGroupDataSourceParameters(Nt){const Gt=[];return(0,d.__)(this.getGroupColumns(),function(){const on=this.calculateGroupValue||this.displayField||this.calculateDisplayValue||Nt&&this.selector||this.dataField||this.calculateCellValue;if(on){const sn={selector:on,desc:"desc"===this.sortOrder,isExpanded:!!this.autoExpandGroup};this.sortingMethod&&(sn.compare=this.sortingMethod.bind(this)),Gt.push(sn)}}),Gt.length>0?Gt:null}refresh(Nt){const Gt=[];return(0,d.__)(this._columns,function(){const{lookup:on}=this;if(on&&!this.calculateDisplayValue){if(Nt&&on.valueMap)return;on.update&&Gt.push(on.update())}}),S.z7.apply(P.A,Gt).done(Se.bind(null,this))}_updateColumnOptions(Nt,Gt){var on,sn;const It=this._reinitAfterLookupChanges&&(null===(on=this._previousColumns)||void 0===on?void 0:on[Gt]);Nt.selector=Nt.selector??(un=>Nt.calculateCellValue(un)),Nt.selector.columnIndex=Gt,Nt.selector.originalCallback=It?(null===(sn=this._previousColumns[Gt].selector)||void 0===sn?void 0:sn.originalCallback)??Nt.selector:Nt.selector,(0,d.__)(["calculateSortValue","calculateGroupValue","calculateDisplayValue"],(un,Pn)=>{const ci=Nt[Pn];if((0,s.Tn)(ci))if(ci.originalCallback)Nt[Pn].context.column=Nt;else{const Ei={column:Nt};Nt[Pn]=function(Hi){return ci.call(Ei.column,Hi)},Nt[Pn].originalCallback=ci,Nt[Pn].columnIndex=Gt,Nt[Pn].context=Ei}}),(0,s.Kg)(Nt.calculateDisplayValue)&&(Nt.displayField=Nt.calculateDisplayValue,Nt.calculateDisplayValue=(0,f.Hz)(Nt.displayField)),Nt.calculateDisplayValue&&(Nt.displayValueMap=Nt.displayValueMap||{}),xe(Nt,Nt.dataType);const{lookup:Ot}=Nt;Ot&&xe(Ot,Ot.dataType);const zt=Ot?Ot.dataType:Nt.dataType;zt&&(Nt.alignment=Nt.alignment||function(Ln,Nt){switch(Ln){case"number":return"right";case"boolean":return"center";default:return(0,z.n)(Nt)}}(zt,this.option("rtlEnabled")),Nt.format=Nt.format||I.A.getFormatByDataType(zt),Nt.customizeText=Nt.customizeText||Oe(zt),Nt.defaultFilterOperations=Nt.defaultFilterOperations||!Ot&&re[zt]||[],(0,s.O9)(Nt.filterOperations)||ae(Nt),Nt.defaultFilterOperation=Nt.filterOperations&&Nt.filterOperations[0]||"=",Nt.showEditorAlways=(0,s.O9)(Nt.showEditorAlways)?Nt.showEditorAlways:"boolean"===zt&&!Nt.cellTemplate&&!Nt.lookup)}updateColumnDataTypes(Nt){const Gt=this,on=Gt.option("dateSerializationFormat"),sn=Gt._getFirstItems(Nt);let It=!1;return(0,d.__)(Gt._columns,(Ot,zt)=>{let un,Pn,ci,Ei,Hi;const{lookup:mo}=zt;if(I.A.isDateType(zt.dataType)&&void 0===zt.serializationFormat&&(zt.serializationFormat=on),mo&&I.A.isDateType(mo.dataType)&&void 0===zt.serializationFormat&&(mo.serializationFormat=on),zt.calculateCellValue&&sn.length){if(!zt.dataType||mo&&!mo.dataType){for(un=0;un<sn.length;un++)Pn=zt.calculateCellValue(sn[un]),zt.dataType||(Hi=ge(Pn),ci=ci||Hi,ci&&Hi&&ci!==Hi&&(ci="string")),mo&&!mo.dataType&&(Hi=ge(I.A.getDisplayValue(zt,Pn,sn[un])),Ei=Ei||Hi,Ei&&Hi&&Ei!==Hi&&(Ei="string"));(ci||Ei)&&(ci&&(zt.dataType=ci),mo&&Ei&&(mo.dataType=Ei),It=!0)}if(void 0===zt.serializationFormat||mo&&void 0===mo.serializationFormat)for(un=0;un<sn.length;un++)Pn=zt.calculateCellValue(sn[un],!0),void 0===zt.serializationFormat&&(zt.serializationFormat=fe(zt.dataType,Pn)),mo&&void 0===mo.serializationFormat&&(mo.serializationFormat=fe(mo.dataType,mo.calculateCellValue(Pn,!0)))}Gt._updateColumnOptions(zt,Ot)}),It}_customizeColumns(Nt){const on=this.option("customizeColumns");on&&(Nt.some(It=>(0,s.Gv)(It.ownerBand))&&Pe(this),on(Nt),Re(this,de(this,Nt)))}updateColumns(Nt,Gt,on){if(Gt||this.updateSortingGrouping(Nt),!Nt||Nt.isLoaded()){const sn=Nt?Nt.sort()||[]:this.getSortDataSourceParameters(),It=Nt?Nt.group()||[]:this.getGroupDataSourceParameters(),Ot=Nt?.lastLoadOptions().filter;on||this._customizeColumns(this._columns),Pe(this);const zt=this._columns;return(0,S.z7)(this.refresh(!0)).always(()=>{this._columns===zt&&(this._updateChanges(Nt,{sorting:sn,grouping:It,filtering:Ot}),Xe(this))})}}_updateChanges(Nt,Gt){Nt&&(this.updateColumnDataTypes(Nt),this._dataSourceApplied=!0),I.A.equalSortParameters(Gt.sorting,this.getSortDataSourceParameters())||Fe(this,"sorting"),I.A.equalSortParameters(Gt.grouping,this.getGroupDataSourceParameters())||Fe(this,"grouping"),this._dataController&&!I.A.equalFilterParameters(Gt.filtering,this._dataController.getCombinedFilter())&&Fe(this,"filtering"),Fe(this,"columns")}updateSortingGrouping(Nt,Gt){const on=this;let sn,It;const Ot=function(zt,un,Pn){(0,d.__)(zt,(ci,Ei)=>{if(delete Ei[Pn],un)for(let Hi=0;Hi<un.length;Hi++){const{selector:mo}=un[Hi],{isExpanded:xo}=un[Hi];if(mo===Ei.dataField||mo===Ei.name||mo===Ei.displayField||mo===Ei.selector||mo===Ei.calculateCellValue||mo===Ei.calculateGroupValue||mo===Ei.calculateDisplayValue){Ei.sortOrder=Gt?"sortOrder"in Ei?Ei.sortOrder:un[Hi].desc?"desc":"asc":Ei.sortOrder||(un[Hi].desc?"desc":"asc"),void 0!==xo&&(Ei.autoExpandGroup=xo),Ei[Pn]=Hi;break}}})};if(Nt){sn=I.A.normalizeSortingInfo(Nt.sort());const zt=I.A.normalizeSortingInfo(Nt.group()),un=on.getGroupDataSourceParameters(),Pn=on.getSortDataSourceParameters(),ci=!I.A.equalSortParameters(zt,un,!0),Ei=!ci&&!I.A.equalSortParameters(zt,un);on._columns.length||((0,d.__)(zt,(Hi,mo)=>{on._columns.push(mo.selector)}),(0,d.__)(sn,(Hi,mo)=>{(0,s.Tn)(mo.selector)||on._columns.push(mo.selector)}),Re(on,de(on,on._columns))),(Gt||!un&&!on._hasUserState)&&(ci||Ei)&&(Ot(on._columns,zt,"groupIndex"),Gt&&(ci&&Fe(on,"grouping"),Ei&&Fe(on,"groupExpanding"),It=!0)),(Gt||!Pn&&!on._hasUserState)&&!I.A.equalSortParameters(sn,Pn)&&(Ot(on._columns,sn,"sortIndex"),Gt&&(Fe(on,"sorting"),It=!0)),It&&Xe(on)}}updateFilter(Nt,Gt,on,sn){const It=this;if(!Array.isArray(Nt))return Nt;if(on=void 0!==(Nt=(0,T.X)([],Nt)).columnIndex?Nt.columnIndex:on,sn=void 0!==Nt.filterValue?Nt.filterValue:sn,(0,s.Kg)(Nt[0])&&"!"!==Nt[0]){const Ot=It.columnOption(Nt[0]);Gt?(0,o.A)().forceIsoDateParsing&&Ot&&Ot.serializeValue&&Nt.length>1&&(Nt[Nt.length-1]=Ot.serializeValue(Nt[Nt.length-1],"filter")):Ot&&Ot.selector&&(Nt[0]=Ot.selector,Nt[0].columnIndex=Ot.index)}else(0,s.Tn)(Nt[0])&&(Nt[0].columnIndex=on,Nt[0].filterValue=sn,Nt[0].selectedFilterOperation=Nt.selectedFilterOperation);for(let Ot=0;Ot<Nt.length;Ot++)Nt[Ot]=It.updateFilter(Nt[Ot],Gt,on,sn);return Nt}columnCount(){return this._columns?this._columns.length:0}columnOption(Nt,Gt,on,sn){const It=this,Ot=It._columns.concat(It._commandColumns),zt=cn(Ot,Nt);if(zt){if(1===arguments.length)return(0,T.X)({},zt);if((0,s.Kg)(Gt)){if(2===arguments.length)return qe(It,zt,Gt);qe(It,zt,Gt,on,sn)}else(0,s.Gv)(Gt)&&(0,d.__)(Gt,(un,Pn)=>{qe(It,zt,un,Pn,sn)});Xe(It)}}clearSorting(){const Nt=this,Gt=this.columnCount();Nt.beginUpdate();for(let on=0;on<Gt;on++)Nt.columnOption(on,"sortOrder",void 0),delete cn(Nt._columns,on).sortOrder;Nt.endUpdate()}clearGrouping(){const Nt=this,Gt=this.columnCount();Nt.beginUpdate();for(let on=0;on<Gt;on++)Nt.columnOption(on,"groupIndex",void 0);Nt.endUpdate()}getVisibleIndex(Nt,Gt){const on=this.getVisibleColumns(Gt);for(let sn=on.length-1;sn>=0;sn--)if(on[sn].index===Nt)return sn;return-1}getVisibleIndexByColumn(Nt,Gt){const on=this.getVisibleColumns(Gt),sn=on.filter(It=>It.index===Nt.index&&It.command===Nt.command)[0];return on.indexOf(sn)}getVisibleColumnIndex(Nt,Gt){const on=this.columnOption(Nt,"index");return this.getVisibleIndex(on,Gt)}addColumn(Nt){const Gt=this;let on=he(Gt,Nt);const sn=Gt._columns.length;Gt._columns.push(on),on.isBand&&(Gt._columns=de(Gt,Gt._columns),on=Gt._columns[sn]),on.added=Nt,Pe(Gt,on),Gt.updateColumns(Gt._dataSource),Gt._checkColumns()}deleteColumn(Nt){const Gt=this,on=Gt.columnOption(Nt);if(on&&on.index>=0){if((Ln=Gt._columns).forEach(Nt=>{(0,s.O9)(Nt.ownerBand)&&(Nt.ownerBand=Ln[Nt.ownerBand])}),Gt._columns.splice(on.index,1),on.isBand){const sn=Gt.getChildrenByBandColumn(on.index).map(It=>It.index);Gt._columns=Gt._columns.filter(It=>sn.indexOf(It.index)<0)}Pe(Gt),Gt.updateColumns(Gt._dataSource)}var Ln}addCommandColumn(Nt){let Gt=this._commandColumns.filter(on=>on.command===Nt.command)[0];Gt||(Gt=Nt,this._commandColumns.push(Gt))}getUserState(){const Nt=this._columns,Gt=[];let on;function sn(It,Ot){void 0!==Nt[on][Ot]&&(Gt[on][Ot]=Nt[on][Ot])}for(on=0;on<Nt.length;on++)Gt[on]={},(0,d.__)(N,sn);return Gt}setName(Nt){Nt.name=Nt.name||Nt.dataField||Nt.type}setUserState(Nt){const Gt=this,on=Gt._dataSource;let sn=Gt.option("stateStoring.ignoreColumnOptionNames");if(Nt?.forEach(this.setName),!sn){sn=[];const It=Gt.getCommonSettings();Gt.option("columnChooser.enabled")||sn.push("visible"),"none"===Gt.option("sorting.mode")&&sn.push("sortIndex","sortOrder"),It.allowGrouping||sn.push("groupIndex"),It.allowFixing||sn.push("fixed","fixedPosition"),It.allowResizing||sn.push("width","visibleWidth");const Ot=!Gt.option("filterPanel.visible");!Gt.option("filterRow.visible")&&Ot&&sn.push("filterValue","selectedFilterOperation"),!Gt.option("headerFilter.visible")&&Ot&&sn.push("filterValues","filterType")}Gt._columnsUserState=Nt,Gt._ignoreColumnOptionNames=sn,Gt._hasUserState=!!Nt,Fe(Gt,"filtering"),Gt.init(!0),on&&(on.sort(Gt.getSortDataSourceParameters()),on.group(Gt.getGroupDataSourceParameters()))}_checkColumns(){const Nt={};let Gt=!1;const on=[];this._columns.forEach(sn=>{var It;const{name:Ot}=sn,zt=null===(It=sn.columns)||void 0===It?void 0:It.length,un=sn.allowEditing&&(sn.dataField||sn.setCellValue)&&!zt;Ot?(Nt[Ot]&&on.push(`"${Ot}"`),Nt[Ot]=!0):un&&(Gt=!0)}),on.length&&D.A.log("E1059",on.join(", ")),Gt&&D.A.log("E1060")}_createCalculatedColumnOptions(Nt,Gt){let on={},{dataField:sn}=Nt;if((Array.isArray(Nt.columns)&&Nt.columns.length||Nt.isBand)&&(on.isBand=!0,sn=null),sn){if((0,s.Kg)(sn)){const It=(0,f.Hz)(sn);on={caption:(0,y.Bc)(sn),calculateCellValue(Ot,zt){const un=It(Ot);return this.deserializeValue&&!zt?this.deserializeValue(un):un},setCellValue:qt,parseValue(Ot){const zt=this;let un,Pn;return"number"===zt.dataType?(0,s.Kg)(Ot)&&zt.format?un=function(Ln,Nt){const Gt=oe.A.parse(Ln);if((0,s.kf)(Gt)){const on=oe.A.format(Gt,Nt),sn=oe.A.format(Gt,"decimal");if(on===Ln||sn===Ln)return Gt}}(Ot.trim(),zt.format):(0,s.O9)(Ot)&&(0,s.kf)(Ot)&&(un=Number(Ot)):"boolean"===zt.dataType?Ot===zt.trueText?un=!0:Ot===zt.falseText&&(un=!1):I.A.isDateType(zt.dataType)?(Pn=_.A.parse(Ot,zt.format),Pn&&(un=Pn)):un=Ot,un}}}on.allowFiltering=!0}else on.allowFiltering=!!Nt.calculateFilterExpression;return on.calculateFilterExpression=function(){return w.A.defaultCalculateFilterExpression.apply(this,arguments)},on.defaultFilterOperation="=",on.createFilterExpression=function(It,Ot){let zt;return this.calculateFilterExpression&&(zt=this.calculateFilterExpression.apply(this,arguments)),(0,s.Tn)(zt)&&(zt=[zt,"=",!0]),zt&&(zt.columnIndex=this.index,zt.filterValue=It,zt.selectedFilterOperation=Ot),zt},(!sn||!(0,s.Kg)(sn))&&(0,T.X)(!0,on,{allowSorting:!1,allowGrouping:!1,calculateCellValue:()=>null}),Gt&&(on.allowFixing=!1),Nt.dataType&&(on.userDataType=Nt.dataType),Nt.selectedFilterOperation&&!("defaultSelectedFilterOperation"in on)&&(on.defaultSelectedFilterOperation=Nt.selectedFilterOperation),Nt.lookup&&(on.lookup={calculateCellValue(It,Ot){return this.valueExpr&&(It=this.valueMap&&this.valueMap[It]),this.deserializeValue&&!Ot?this.deserializeValue(It):It},updateValueMap(){if(this.valueMap={},this.items){const It=(0,f.Hz)(this.valueExpr),Ot=(0,f.Hz)(this.displayExpr);for(let zt=0;zt<this.items.length;zt++){const un=this.items[zt],Pn=Ot(un);this.valueMap[It(un)]=Pn,this.dataType=this.dataType||ge(Pn)}}},update(){const It=this;let{dataSource:Ot}=It;if(Ot)if((0,s.Tn)(Ot)&&!a.A.isWrapped(Ot)&&(Ot=Ot({})),(0,s.Qd)(Ot)||Ot instanceof u.A||Array.isArray(Ot)){if(It.valueExpr){const zt=(0,g.ho)(Ot);return zt.paginate=!1,Ot=new h.q(zt),Ot.load().done(un=>{It.items=un,It.updateValueMap&&It.updateValueMap()})}}else D.A.log("E1016");else It.updateValueMap&&It.updateValueMap()}}),on.resizedCallbacks=(0,b.A)(),Nt.resized&&on.resizedCallbacks.add(Nt.resized.bind(Nt)),(0,d.__)(on,It=>{if((0,s.Tn)(on[It])&&0!==It.indexOf("default")){const Ot=`default${It.charAt(0).toUpperCase()}${It.substr(1)}`;on[Ot]=on[It]}}),on}getRowCount(){return this._rowCount=this._rowCount||function(Ln){let Nt=1;const Gt=Ln.getBandColumnsCache(),{columnParentByIndex:on}=Gt;return Ln._columns.forEach(sn=>{const It=ue(sn.index,on),Ot=It.filter(zt=>!zt.visible);sn.visible&&!Ot.length&&(Nt=Math.max(Nt,It.length+1))}),Nt}(this),this._rowCount}getRowIndex(Nt,Gt){const on=this._columns[Nt],sn=this.getBandColumnsCache();return on&&(Gt||on.visible&&!on.command&&!(0,s.O9)(on.groupIndex))?ue(Nt,sn.columnParentByIndex).length:0}getChildrenByBandColumn(Nt,Gt){const on=this.getBandColumnsCache(),sn=be(Nt,on.columnChildrenByIndex,!Gt);return Gt?sn.filter(It=>It.visible&&!It.command).sort((It,Ot)=>It.visibleIndex-Ot.visibleIndex):sn}isParentBandColumn(Nt,Gt){let on=!1;const sn=this._columns[Nt],It=this.getBandColumnsCache(),Ot=sn&&ue(Nt,It.columnParentByIndex);return Ot&&(0,d.__)(Ot,(zt,un)=>{if(un.index===Gt)return on=!0,!1}),on}isParentColumnVisible(Nt){let Gt=!0;const on=this.getBandColumnsCache(),sn=Nt>=0&&ue(Nt,on.columnParentByIndex);return sn&&(0,d.__)(sn,(It,Ot)=>(Gt=Gt&&Ot.visible,Gt)),Gt}getColumnId(Nt){return Nt.command&&Nt.type===B?ri(this,Nt)?`type:${Nt.type}`:`command:${Nt.command}`:Nt.index}getCustomizeTextByDataType(Nt){return Oe(Nt)}getHeaderContentAlignment(Nt){return this.option("rtlEnabled")?"left"===Nt?"right":"left":Nt}}const $n={defaultOptions:()=>({commonColumnSettings:{allowFiltering:!0,allowHiding:!0,allowSorting:!0,allowEditing:!0,encodeHtml:!0,trueText:x.A.format("dxDataGrid-trueText"),falseText:x.A.format("dxDataGrid-falseText")},allowColumnReordering:!1,allowColumnResizing:!1,columnResizingMode:"nextColumn",columnMinWidth:void 0,columnWidth:void 0,adaptColumnWidthByRatio:!0,columns:void 0,regenerateColumnsByVisibleItems:!1,customizeColumns:null,dateSerializationFormat:void 0}),controllers:{columns:hn}}},5918:(In,Ze,M)=>{"use strict";M.d(Ze,{Qu:()=>be});var W=M(2583),o=M(6054),P=M(5704),b=M(8684),f=M(3090),S=M(2660),T=M(4757),y=M(1363),d=M(1830),c=M(4072),s=M(8664),a=M(9209),u=M(9293),h=M(7358),g=M(3376),_=M(8736);const w="columns-separator-transparent",K="dxDataGridResizingReordering",q=function(ve){return ve.option("allowColumnResizing")||ve.getController("columns").isColumnOptionUsed("allowResizing")},Y=function(ve){return ve.option("allowColumnReordering")||ve.getController("columns").isColumnOptionUsed("allowReordering")};class Q extends g.Ay.View{_renderSeparator(){}_renderCore(le){const Ce=super._renderCore(le);return this._isShown=!0,this._renderSeparator(),this.hide(),Ce}show(){this._isShown=!0}hide(){this._isShown=!1}height(le){const Ce=this.element();if(Ce){if(!(0,d.O9)(le))return(0,y.Oq)(Ce);(0,y.k$)(Ce,le)}}width(le){const Ce=this.element();if(Ce){if(!(0,d.O9)(le))return(0,y.RG)(Ce);(0,y.zj)(Ce,le)}}}const oe=function(ve){return"widget"!==ve.option("columnResizingMode")},be={views:{columnsSeparatorView:class te extends Q{init(){super.init(),this._tablePositionController=this.getController("tablePosition"),this._init()}dispose(){this._unsubscribeFromCallback(),super.dispose()}optionChanged(le){"allowColumnResizing"===le.name&&(le.value?(this._init(),this._invalidate(),this.hide(!0)):(this._unsubscribeFromCallback(),this._isTransparent=q(this),this.hide(!0))),super.optionChanged(le)}_renderSeparator(){super._renderSeparator(),this.element().addClass(this.addWidgetPrefix("columns-separator"))}_subscribeToCallback(){const le=this;let Ce;le._positionChanged=function(ye){Ce=le.element(),Ce&&(Ce.css({top:ye.top}),(0,y.k$)(Ce,ye.height))},le._tablePositionController.positionChanged.add(le._positionChanged)}_unsubscribeFromCallback(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)}_init(){this._isTransparent=q(this),this.isVisible()&&this._subscribeToCallback()}isVisible(){return this.option("showColumnHeaders")&&(Y(this)||q(this))}show(){const Ce=this.element();Ce&&!this._isShown&&(this._isTransparent?Ce.removeClass(this.addWidgetPrefix(w)):Ce.show()),super.show()}hide(le){const Ce=this.element(),ye=this.addWidgetPrefix(w);Ce&&(this._isShown||le)&&(this._isTransparent?(Ce.addClass(ye),Ce.css("left",""),Ce.show()):(Ce.hasClass(ye)&&Ce.removeClass(ye),Ce.hide())),super.hide()}moveByX(le){const Ce=this.element();Ce&&Ce.css("left",null===le?0:le-this._parentElement().offset().left)}changeCursor(le){le=(0,d.O9)(le)?le:"";const Ce=this.element();Ce&&Ce.css("cursor",le)}},blockSeparatorView:class pe extends Q{init(){super.init(),this.getController("data").loadingChanged.add(Ce=>{Ce||this.hide()})}_renderSeparator(){super._renderSeparator(),this.element().addClass("dx-block-separator").html("&nbsp;")}hide(){const Ce=this._parentElement(),ye=this.element();ye&&this._isShown&&ye.css("display","none"),Ce&&!Ce.children(".dx-block-separator").length&&Ce.prepend(this.element()),super.hide()}isVisible(){const le=this.option("groupPanel"),Ce=this.option("columnChooser");return le&&le.visible||Ce&&Ce.enabled}show(le){const Ce=this.element();if(Ce&&!this._isShown)switch(le){case"group":this.element().css("display","block");break;case"columnChooser":ye={width:"100%",display:"block"},W.A.stop(Ce,!0),W.A.animate(Ce,{type:"slide",from:{width:0,display:ye.display},to:ye,duration:300,easing:"swing"});break;default:Ce.css("display","")}var ye;super.show()}},draggingHeaderView:class z extends g.Ay.View{init(){super.init();const le=this.getController("data");this._controller=this.getController("draggingHeader"),this._columnsResizerViewController=this.getController("columnsResizer"),this._columnsController=this.getController("columns"),this._isDragging=!1,le.loadingChanged.add(Ce=>{const ye=this.element();!Ce&&ye&&ye.hide()})}isDragging(){return this._isDragging}_getDraggingPanelByPos(le){let Ce;return(0,S.__)(this._dragOptions.draggingPanels,(ye,ge)=>{if(ge){const fe=ge.getBoundingRect();if(fe&&(void 0===fe.bottom||le.y<fe.bottom)&&(void 0===fe.top||le.y>fe.top)&&(void 0===fe.left||le.x>fe.left)&&(void 0===fe.right||le.x<fe.right))return Ce=ge,!1}}),Ce}_renderCore(){this.element().addClass(`${this.addWidgetPrefix("drag-header")} ${this.addWidgetPrefix("text-content")} dx-widget`).hide()}_resetTargetColumnOptions(){const le=this._dropOptions;le.targetColumnIndex=-1,delete le.targetColumnElement,delete le.isLast,delete le.posX,delete le.posY}_getVisibleIndexObject(le,Ce){return(0,d.O9)(le)?{columnIndex:Ce,rowIndex:le}:Ce}dispose(){const le=this.element();this._dragOptions=null,le&&le.parent().find(`.${this.addWidgetPrefix("drag-header")}`).remove()}isVisible(){const le=this._columnsController.getCommonSettings();return this.option("showColumnHeaders")&&(Y(this)||le.allowGrouping||le.allowHiding)}dragHeader(le){const{columnElement:Ce}=le,ye=!!le.sourceColumn.type;this._isDragging=!0,this._dragOptions=le,this._dropOptions={sourceIndex:le.index,sourceColumnIndex:this._getVisibleIndexObject(le.rowIndex,le.columnIndex),sourceColumnElement:le.columnElement,sourceLocation:le.sourceLocation};const ge=o.A.getDocument();this._onSelectStart=ge.onselectstart,ge.onselectstart=function(){return!1},this._controller.drag(this._dropOptions),this.element().css({textAlign:Ce&&Ce.css("textAlign"),height:Ce&&(ye&&Ce.get(0).clientHeight||(0,y.Oq)(Ce)),width:Ce&&(ye&&Ce.get(0).clientWidth||(0,y.RG)(Ce)),whiteSpace:Ce&&Ce.css("whiteSpace")}).addClass(this.addWidgetPrefix("drag-action")).toggleClass("dx-drag-command-cell",ye).text(ye?"":le.sourceColumn.caption),this.element().appendTo(h.A.getSwatchContainer(Ce))}moveHeader(le){const Ce=le.event,{that:ye}=Ce.data,ge=(0,u.rw)(Ce),fe=!!ye._columnsResizerViewController&&ye._columnsResizerViewController.isResizing(),xe=ye._dragOptions;if(ye._isDragging&&!fe){const Te=ye.element(),Ee=Math.abs(ge.x-xe.columnElement.offset().left-xe.deltaX),Oe=Math.abs(ge.y-xe.columnElement.offset().top-xe.deltaY);(Te.is(":visible")||Ee>5||Oe>5)&&(Te.show(),Te.css({left:ge.x-xe.deltaX,top:ge.y-xe.deltaY}),ye.dockHeader(ge)),Ce.preventDefault()}}dockHeader(le){const Ce=this,ye=Ce._getDraggingPanelByPos(le),ge=Ce._controller,fe=Ce._dropOptions,xe=Ce._dragOptions;if(ye){const Te=Ce.option("rtlEnabled"),Ee="columnChooser"===ye.getName(),Oe=Ee?"y":"x",ze=ye.getName(),$e="headers"===ze?xe.rowIndex:void 0,{sourceColumn:Be}=xe,Ue=ye.getColumnElements($e,Be?.ownerBand)||[],ot=xe.pointsByTarget=xe.pointsByTarget||{},st="columnChooser"===ze?[]:ot[ze]||ge._generatePointsByColumns((0,f.X)({},xe,{targetDraggingPanel:ye,columns:ye.getColumns($e),columnElements:Ue,isVerticalOrientation:Ee,startColumnIndex:"headers"===ze&&(0,P.A)(Ue[0]).index()}));if(ot[ze]=st,fe.targetLocation=ze,st.length>0)for(let et=0;et<st.length;et++){const Ke=st[et+1]&&(st[et][Oe]+st[et+1][Oe])/2;if(void 0===Ke||(Te&&"x"===Oe?le[Oe]>Ke:le[Oe]<Ke)){fe.targetColumnIndex=Ce._getVisibleIndexObject($e,st[et].columnIndex),Ue[et]?(fe.targetColumnElement=Ue.eq(et),fe.isLast=!1):(fe.targetColumnElement=Ue.last(),fe.isLast=!0),fe.posX=st[et].x,fe.posY=st[et].y,ge.dock(fe);break}}else Ce._resetTargetColumnOptions(),ge.dock(fe)}}dropHeader(le){const Ce=le.event,{that:ye}=Ce.data,ge=ye._controller;ye.element().hide(),ge&&ye._isDragging&&ge.drop(ye._dropOptions),ye.element().appendTo(ye._parentElement()),ye._dragOptions=null,ye._dropOptions=null,ye._isDragging=!1,o.A.getDocument().onselectstart=ye._onSelectStart||null}},trackerView:class Z extends g.Ay.View{init(){super.init(),this._tablePositionController=this.getController("tablePosition"),this._subscribeToCallback()}dispose(){this._unsubscribeFromCallback(),super.dispose()}optionChanged(le){"allowColumnResizing"===le.name&&(this._unsubscribeFromCallback(),le.value&&(this._subscribeToCallback(),this._invalidate())),super.optionChanged(le)}_renderCore(){const le=super._renderCore();return this.element().addClass(this.addWidgetPrefix("tracker")),this.hide(),le}_unsubscribeFromCallback(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)}_subscribeToCallback(){const le=this;le._positionChanged=function(Ce){const ye=le.element();ye&&ye.hasClass(le.addWidgetPrefix("tracker"))&&(ye.css({top:Ce.top}),(0,y.k$)(ye,Ce.height))},this._tablePositionController.positionChanged.add(le._positionChanged)}isVisible(){return q(this)}show(){this.element().show()}hide(){this.element()&&this.element().hide()}setHeight(le){(0,y.k$)(this.element(),le)}}},controllers:{draggingHeader:class he extends g.Ay.ViewController{init(){super.init(),this._columnsController=this.getController("columns"),this._tablePositionController=this.getController("tablePosition"),this._columnHeadersView=this.getView("columnHeadersView"),this._columnsSeparatorView=this.getView("columnsSeparatorView"),this._draggingHeaderView=this.getView("draggingHeaderView"),this._rowsView=this.getView("rowsView"),this._blockSeparatorView=this.getView("blockSeparatorView"),this._headerPanelView=this.getView("headerPanel"),this._columnChooserView=this.getView("columnChooserView");const le=()=>{if(this._draggingHeaderView){const Ce=[this._columnChooserView,this._columnHeadersView,this._headerPanelView];this._unsubscribeFromEvents(this._draggingHeaderView,Ce),this._subscribeToEvents(this._draggingHeaderView,Ce)}};this._columnHeadersView.renderCompleted.add(le),this._headerPanelView&&this._headerPanelView.renderCompleted.add(le),this._columnChooserView&&this._columnChooserView.renderCompleted.add(le)}dispose(){this._draggingHeaderView&&this._unsubscribeFromEvents(this._draggingHeaderView,[this._columnChooserView,this._columnHeadersView,this._headerPanelView])}_generatePointsByColumns(le){const Ce=this;return this.isCustomGroupColumnPosition=this.checkIsCustomGroupColumnPosition(le),_.A.getPointsByColumns(le.columnElements,ge=>Ce._pointCreated(ge,le.columns,le.targetDraggingPanel.getName(),le.sourceColumn),le.isVerticalOrientation,le.startColumnIndex)}checkIsCustomGroupColumnPosition(le){let Ce=!0;for(let ye=0;ye<le.columns.length;ye+=1){const ge=le.columns[ye];if("expand"===ge.command&&!Ce)return!0;ge.command||(Ce=!1)}return!1}_pointCreated(le,Ce,ye,ge){const fe=Ce[le.columnIndex],xe=Ce[le.columnIndex-1],Te="expand"===xe?.command,Ee="expand"===fe?.command&&"expand"!==xe?.command,Oe=ge&&!ge.allowReordering,ze=!(null!=fe&&fe.allowReordering||null!=xe&&xe.allowReordering);switch(ye){case"columnChooser":return!0;case"headers":if(Oe)return!0;if(!Ee)return Te||ze;if(this.isCustomGroupColumnPosition)return!1;for(;"expand"===(null===($e=Ce[le.columnIndex])||void 0===$e?void 0:$e.command);){var $e;le.columnIndex+=1}return!1;default:return 0===Ce.length}}_subscribeToEvents(le,Ce){const ye=this;(0,S.__)(Ce,(ge,fe)=>{if(fe){let xe;const Te=fe.getRowCount?fe.getRowCount():1,Ee=fe.getName(),Oe=function(ze,$e){if(!$e)return;const Be=(0,P.A)($e),Ue=xe[ze];Ue&&fe.allowDragging(Ue)&&(Be.addClass(ye.addWidgetPrefix("drag-action")),c.A.on(Be,(0,u.b4)(s.ni,K),ye.createAction(ot=>{const st=ot.event,et=(0,u.rw)(st);le.dragHeader({deltaX:et.x-(0,P.A)(st.currentTarget).offset().left,deltaY:et.y-(0,P.A)(st.currentTarget).offset().top,sourceColumn:Ue,index:Ue.index,columnIndex:ze,columnElement:Be,sourceLocation:Ee,draggingPanels:Ce,rowIndex:ye._columnsController.getRowIndex(Ue.index,!0)})})),c.A.on(Be,(0,u.b4)(s.Cy,K),{that:le},ye.createAction(le.moveHeader)),c.A.on(Be,(0,u.b4)(s._N,K),{that:le},ye.createAction(le.dropHeader)))};for(let ze=0;ze<Te;ze++){const $e=fe.getColumnElements(ze)||[];$e.length&&(xe=fe.getColumns(ze)||[],(0,S.__)($e,Oe))}}})}_unsubscribeFromEvents(le,Ce){const ye=this;(0,S.__)(Ce,(ge,fe)=>{if(fe){const xe=fe.getColumnElements()||[];(0,S.__)(xe,(Te,Ee)=>{const Oe=(0,P.A)(Ee);c.A.off(Oe,(0,u.b4)(s.ni,K)),c.A.off(Oe,(0,u.b4)(s.Cy,K)),c.A.off(Oe,(0,u.b4)(s._N,K)),Oe.removeClass(ye.addWidgetPrefix("drag-action"))})}})}_getSeparator(le){return"headers"===le?this._columnsSeparatorView:this._blockSeparatorView}hideSeparators(le){const Ce=this._blockSeparatorView,ye=this._columnsSeparatorView;this._animationColumnIndex=void 0,Ce&&Ce.hide(),"block"!==le&&ye&&ye.hide()}allowDrop(le){return this._columnsController.allowMoveColumn(le.sourceColumnIndex,le.targetColumnIndex,le.sourceLocation,le.targetLocation)}drag(le){const{sourceIndex:Ce}=le,{sourceLocation:ye}=le,{sourceColumnElement:ge}=le,fe=this._columnHeadersView,xe=this._rowsView;ge&&(ge.css({opacity:.5}),"headers"===ye&&(fe&&fe.setRowsOpacity(Ce,.5),xe&&xe.setRowsOpacity(Ce,.5)))}dock(le){const Ce=this,ye=(0,d.Gv)(le.targetColumnIndex)?le.targetColumnIndex.columnIndex:le.targetColumnIndex,{sourceLocation:ge}=le,{targetLocation:fe}=le,xe=Ce._getSeparator(fe),Te=ye>=0;Ce._columnHeadersView.element().find(".dx-header-row").toggleClass(Ce.addWidgetPrefix("drop-highlight"),"headers"!==ge&&"headers"===fe&&!Te),xe&&(Ce.allowDrop(le)&&Te?"group"===fe||"columnChooser"===fe?Ce._animationColumnIndex!==ye&&(Ce.hideSeparators(),xe.element()[le.isLast?"insertAfter":"insertBefore"](le.targetColumnElement),Ce._animationColumnIndex=ye,xe.show(fe)):(Ce.hideSeparators("block"),Ce._tablePositionController.update(le.posY),xe.moveByX(le.posX-xe.width()),xe.show()):Ce.hideSeparators())}drop(le){const{sourceColumnElement:Ce}=le;if(Ce&&(Ce.css({opacity:""}),this._columnHeadersView.setRowsOpacity(le.sourceIndex,""),this._rowsView.setRowsOpacity(le.sourceIndex,""),this._columnHeadersView.element().find(".dx-header-row").removeClass(this.addWidgetPrefix("drop-highlight"))),this.allowDrop(le)){const ye=this._getSeparator(le.targetLocation);ye&&ye.hide(),this._columnsController.moveColumn(le.sourceColumnIndex,le.targetColumnIndex,le.sourceLocation,le.targetLocation)}}},tablePosition:class ee extends g.Ay.ViewController{constructor(le){super(le),this.positionChanged=(0,b.A)()}init(){super.init(),this._columnsResizerController=this.getController("columnsResizer"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView"),this._pagerView=this.getView("pagerView"),this._rowsView.resizeCompleted.add(()=>{if(this.option("allowColumnResizing")){const le=this._columnsResizerController._targetPoint;this.update(le?le.y:null)}})}update(le){const Ce={},ye=this._columnHeadersView.element(),ge=ye&&ye.offset(),fe=ge&&ge.top||0,xe=(0,d.O9)(le)?Math.abs(le-fe):0,Te=this._columnHeadersView?this._columnHeadersView.getHeight():0,Ee=this._rowsView.getScrollbarWidth(!0),Oe=this._rowsView?this._rowsView.height()-Ee:0,ze=this.component.getView("draggingHeaderView");Ce.height=Te,(this._columnsResizerController.isResizing()||ze.isDragging())&&(Ce.height+=Oe-xe),null!==le&&ye&&ye.length&&(Ce.top=ye[0].offsetTop+xe),this.positionChanged.fire(Ce)}},columnsResizer:class ae extends g.Ay.ViewController{init(){this._subscribesToCallbacks=[],q(this)&&this._init()}dispose(){this._unsubscribes(),super.dispose()}optionChanged(le){super.optionChanged(le),"allowColumnResizing"===le.name&&(le.value?(this._init(),this._subscribeToEvents()):this._unsubscribes())}_isHeadersRowArea(le){if(this._columnHeadersView){const Ce=this._columnHeadersView.element();if(Ce){const ye=Ce.offset().top,ge=this._columnHeadersView.getHeadersRowHeight();return le>=ye&&le<=ye+ge}}return!1}_isRtlParentStyle(){var le;return this.option("rtlEnabled")&&"rtl"===(null===(le=this._$parentContainer)||void 0===le?void 0:le.parent().css("direction"))}_pointCreated(le,Ce,ye){const ge=oe(this),fe=this.option("rtlEnabled"),xe=this._isRtlParentStyle(),Te=ge||!fe||xe?1:0;if(le.index>=Te&&le.index<Ce+(ge||fe&&!xe?0:1)){le.columnIndex-=Te;const Ee=ye[le.columnIndex]||{};return!(ge?Ee.allowResizing&&(ye[le.columnIndex+1]||{}).allowResizing:Ee.allowResizing)}return!0}_getTargetPoint(le,Ce,ye){if(le)for(let ge=0;ge<le.length;ge++)if((le[ge].x!==le[0].x||!le[ge+1]||le[ge].x!==le[ge+1].x)&&le[ge].x-ye<=Ce&&Ce<=le[ge].x+ye)return le[ge];return null}_moveSeparator(le){var Ce;const ye=le.event,ge=ye.data,fe=ge._columnsSeparatorView.width(),xe=oe(ge),Te=fe/2,Ee=ge._$parentContainer.offset(),Oe=Ee.left,ze=(0,u.rw)(ye),$e=ge.option("rtlEnabled"),Be=this._isRtlParentStyle(),Ue=null===(Ce=ge._draggingHeaderView)||void 0===Ce?void 0:Ce.isDragging();if(ge._isResizing&&ge._resizingInfo){if((Oe<=ze.x||!xe&&Be)&&(!xe||ze.x<=Oe+(0,y.RG)(ge._$parentContainer))&&ge._updateColumnsWidthIfNeeded(ze.x)){const ot=ge._columnHeadersView.getColumnElements().eq(ge._resizingInfo.currentColumnIndex),st=ot[0];if(st){const et=st.getBoundingClientRect().width;ge._columnsSeparatorView.moveByX(ot.offset().left+((xe||Be)&&$e?0:et)),ge._tablePositionController.update(ge._targetPoint.y),ye.preventDefault()}}}else Ue||(ge._isHeadersRowArea(ze.y)?(ge._previousParentOffset&&(ge._previousParentOffset.left!==Ee.left||ge._previousParentOffset.top!==Ee.top)&&ge.pointsByColumns(null),ge._targetPoint=ge._getTargetPoint(ge.pointsByColumns(),ze.x,fe),ge._previousParentOffset=Ee,ge._isReadyResizing=!1,ge._targetPoint?(ge._columnsSeparatorView.changeCursor("col-resize"),ge._columnsSeparatorView.moveByX(ge._targetPoint.x-Te),ge._tablePositionController.update(ge._targetPoint.y),ge._isReadyResizing=!0,ye.preventDefault()):(ge._columnsSeparatorView.changeCursor(),ge._columnsSeparatorView.moveByX(null))):(ge.pointsByColumns(null),ge._isReadyResizing=!1,ge._columnsSeparatorView.changeCursor(),ge._columnsSeparatorView.moveByX(null)))}_endResizing(le){const ye=le.event.data;ye._isResizing&&(ye.pointsByColumns(null),ye._resizingInfo=null,ye._columnsSeparatorView.hide(),ye._columnsSeparatorView.changeCursor(),ye._trackerView.hide(),ye._isReadyResizing=!1,ye._isResizing=!1)}_getNextColumnIndex(le){return le+1}_setupResizingInfo(le){const Ce=this._targetPoint.columnIndex,ye=this._getNextColumnIndex(Ce),ge=this._columnHeadersView.getHeaderElement(Ce),fe=this._columnHeadersView.getHeaderElement(ye);this._resizingInfo={startPosX:le,currentColumnIndex:Ce,currentColumnWidth:ge&&ge.length>0?(0,T.N)(ge[0]).width:0,nextColumnIndex:ye,nextColumnWidth:fe&&fe.length>0?(0,T.N)(fe[0]).width:0}}_startResizing(le){const Ce=le.event,ye=Ce.data,ge=(0,u.rw)(Ce);if((0,u.kH)(Ce)&&(ye._isHeadersRowArea(ge.y)?(ye._targetPoint=ye._getTargetPoint(ye.pointsByColumns(),ge.x,10),ye._targetPoint&&(ye._columnsSeparatorView.moveByX(ye._targetPoint.x-ye._columnsSeparatorView.width()/2),ye._isReadyResizing=!0)):ye._isReadyResizing=!1),ye._isReadyResizing){ye._setupResizingInfo(ge.x),ye._isResizing=!0,ye._tablePositionController.update(ye._targetPoint.y),ye._columnsSeparatorView.show(),ye._trackerView.show();const fe=ye.component.getScrollable();fe&&ye._isRtlParentStyle()&&(ye._scrollRight=(0,y.RG)(fe.$content())-(0,y.RG)(fe.container())-fe.scrollLeft()),Ce.preventDefault(),Ce.stopPropagation()}this.isResizing()&&this._editorFactoryController.loseFocus()}_generatePointsByColumns(){const le=this,Ce=le._columnsController?le._columnsController.getVisibleColumns():[],ye=le._columnHeadersView.getColumnElements();let ge=[];ye&&ye.length>0&&(ge=_.A.getPointsByColumns(ye,fe=>le._pointCreated(fe,ye.length,Ce))),le._pointsByColumns=ge}_unsubscribeFromEvents(){this._moveSeparatorHandler&&c.A.off(o.A.getDocument(),(0,u.b4)(a.A.move,K),this._moveSeparatorHandler),this._startResizingHandler&&c.A.off(this._$parentContainer,(0,u.b4)(a.A.down,K),this._startResizingHandler),this._endResizingHandler&&(c.A.off(this._columnsSeparatorView.element(),(0,u.b4)(a.A.up,K),this._endResizingHandler),c.A.off(o.A.getDocument(),(0,u.b4)(a.A.up,K),this._endResizingHandler))}_subscribeToEvents(){this._moveSeparatorHandler=this.createAction(this._moveSeparator),this._startResizingHandler=this.createAction(this._startResizing),this._endResizingHandler=this.createAction(this._endResizing),c.A.on(o.A.getDocument(),(0,u.b4)(a.A.move,K),this,this._moveSeparatorHandler),c.A.on(this._$parentContainer,(0,u.b4)(a.A.down,K),this,this._startResizingHandler),c.A.on(this._columnsSeparatorView.element(),(0,u.b4)(a.A.up,K),this,this._endResizingHandler),c.A.on(o.A.getDocument(),(0,u.b4)(a.A.up,K),this,this._endResizingHandler)}_updateColumnsWidthIfNeeded(le){let Ce,ye=!1,ge=this._rowsView.contentWidth();const fe=this._resizingInfo,xe=this._columnsController,Te=xe.getVisibleColumns(),Ee=this._columnsSeparatorView.width(),Oe=oe(this),ze=Oe&&this.option("adaptColumnWidthByRatio")&&!this.option("columnAutoWidth"),$e=this.option("rtlEnabled"),Be=this._isRtlParentStyle(),Ue=Te[fe.currentColumnIndex],ot=Te[fe.nextColumnIndex];function st(Pe){return(0,d.Kg)(Pe)&&Pe.endsWith("%")}function et(Pe,Se,Re,Fe){if(Pe){const Xe=Pe.width;Xe&&(Fe=st(Xe)),Fe?(xe.columnOption(Pe.index,"visibleWidth",Se),xe.columnOption(Pe.index,"width",`${(Se/Re*100).toFixed(3)}%`)):(xe.columnOption(Pe.index,"visibleWidth",null),xe.columnOption(Pe.index,"width",Se))}}Ce=le-fe.startPosX,(Oe||Be)&&$e&&(Ce=-Ce);let{cellWidth:Ke,nextCellWidth:Ye}=function(Pe){let Se,Re,Fe;const Xe=fe.currentColumnWidth+Pe,tt=Ue&&Ue.minWidth||Ee,vt={};return Xe>=tt?vt.cellWidth=Xe:(vt.cellWidth=tt,Fe=!0),Oe&&(Re=fe.nextColumnWidth-Pe,Se=ot&&ot.minWidth||Ee,Re>=Se?vt.nextCellWidth=Fe?fe.nextColumnWidth-(Pe+tt-Xe):Re:(vt.nextCellWidth=Se,vt.cellWidth=fe.currentColumnWidth+(Pe-Se+Re))),vt}(Ce);if(ye=Ue.width!==Ke,ye){if(xe.beginUpdate(),Ke=Math.floor(Ke),ge=function(Pe,Se){if(Se.every(Fe=>Fe.width)){const Fe=Se.reduce((Xe,tt)=>(st(tt.width)&&(Xe+=parseFloat(tt.width)),Xe),0);Fe>100&&(Pe=Pe/Fe*100)}return Pe}(ge,Te),et(Ue,Ke,ge,ze),Oe)Ye=Math.floor(Ye),et(ot,Ye,ge,ze);else{const Pe=this._columnHeadersView.getColumnWidths();if(Pe[fe.currentColumnIndex]=Ke,!(Pe.reduce((Re,Fe)=>Re+Fe,0)>this._rowsView.contentWidth())){const Re=_.A.getLastResizableColumnIndex(Te);Re>=0&&xe.columnOption(Te[Re].index,"visibleWidth","auto")}for(let Re=0;Re<Pe.length;Re++)Te[Re]&&Te[Re]!==Ue&&void 0===Te[Re].width&&xe.columnOption(Te[Re].index,"width",Pe[Re])}if(xe.endUpdate(),!Oe){this.component.updateDimensions();const Pe=this.component.getScrollable();if(Pe&&Be){const Se=(0,y.RG)(Pe.$content())-(0,y.RG)(Pe.container())-this._scrollRight;Pe.scrollTo({left:Se})}}}return ye}_subscribeToCallback(le,Ce){le.add(Ce),this._subscribesToCallbacks.push({callback:le,handler:Ce})}_unsubscribeFromCallbacks(){for(let le=0;le<this._subscribesToCallbacks.length;le++){const Ce=this._subscribesToCallbacks[le];Ce.callback.remove(Ce.handler)}this._subscribesToCallbacks=[]}_unsubscribes(){this._unsubscribeFromEvents(),this._unsubscribeFromCallbacks()}_init(){const le=()=>{this._isResizing||this.pointsByColumns(null)},Ce=fe=>{this._scrollLeft!==fe.left&&(this._scrollLeft=fe.left,this.pointsByColumns(null))};this._columnsSeparatorView=this.getView("columnsSeparatorView"),this._columnHeadersView=this.getView("columnHeadersView"),this._trackerView=this.getView("trackerView"),this._rowsView=this.getView("rowsView"),this._columnsController=this.getController("columns"),this._tablePositionController=this.getController("tablePosition"),this._editorFactoryController=this.getController("editorFactory"),this._draggingHeaderView=this.component.getView("draggingHeaderView"),this._$parentContainer=this.component.$element(),this._subscribeToCallback(this._columnHeadersView.renderCompleted,le),this._subscribeToCallback(this._columnHeadersView.resizeCompleted,le),this._subscribeToCallback(this._columnsSeparatorView.renderCompleted,()=>{this._unsubscribeFromEvents(),this._subscribeToEvents()}),this._subscribeToCallback(this._rowsView.renderCompleted,()=>{this._rowsView.scrollChanged.remove(Ce),this._rowsView.scrollChanged.add(Ce)});let ye=0!==this._rowsView.getScrollbarWidth(),ge=0;this._subscribeToCallback(this._tablePositionController.positionChanged,fe=>{if(this._isResizing&&!this._rowsView.isResizing){const xe=0!==this._rowsView.getScrollbarWidth();ye!==xe||ge&&ge!==fe.height?(ye=xe,ge=fe.height,this.component.updateDimensions()):this._rowsView.updateFreeSpaceRowHeight()}ge=fe.height})}isResizing(){return this._isResizing}pointsByColumns(le){if(void 0===le)return this._pointsByColumns||this._generatePointsByColumns(),this._pointsByColumns;this._pointsByColumns=le}}},extenders:{views:{rowsView:ve=>class extends ve{_needUpdateRowHeight(le){const Ce=this.option("wordWrapEnabled"),ye=this._columnsResizerController.isResizing();return super._needUpdateRowHeight.apply(this,arguments)||le>0&&!!Ce&&!!ye}}},controllers:{editorFactory:ve=>class extends ve{renderFocusOverlay(){if(!this._columnsResizerController.isResizing())return super.renderFocusOverlay.apply(this,arguments)}}}}}},5494:(In,Ze,M)=>{"use strict";M.d(Ze,{pL:()=>s});var W=M(9522),o=M(5704),P=M(2660),b=M(784),f=M(3376);const T={columnHeadersView:"header",rowsView:"content",footerView:"footer",headerPanel:"headerPanel"},y=["columnHeadersView","rowsView","footerView","headerPanel"],s={defaultOptions:()=>({onContextMenuPreparing:null}),controllers:{contextMenu:class d extends f.Ay.ViewController{init(){this.createAction("onContextMenuPreparing")}getContextMenuItems(u){if(!u)return!1;const h=this,g=(0,o.A)(u.target);let _,x,w,D;return(0,P.__)(y,function(){const C=h.getView(this);if(_=C&&C.element(),_&&(_.is(g)||_.find(g).length)){var I;w=g.closest(".dx-row > td, .dx-row > tr"),x=w.parent();const L=C.getRowIndex(x),N=w[0]&&w[0].cellIndex,G=x.data("options"),k={event:u,targetElement:(0,W.cc)(g),target:T[this],rowIndex:L,row:C._getRows()[L],columnIndex:N,column:null==G||null===(I=G.cells)||void 0===I||null===(I=I[N])||void 0===I?void 0:I.column};if(k.items=C.getContextMenuItems&&C.getContextMenuItems(k),h.executeAction("onContextMenuPreparing",k),h._contextMenuPrepared(k),D=k.items,D)return!1}}),D}_contextMenuPrepared(u){}}},views:{contextMenuView:class c extends f.Ay.View{init(){super.init(),this._contextMenuController=this.getController("contextMenu")}_renderCore(){const u=this.element().addClass("dx-context-menu");this.setAria("role","presentation",u),this._createComponent(u,b.A,{onPositioning:h=>{const{event:g}=h,_=h.component,x=this._contextMenuController.getContextMenuItems(g);x?(_.option("items",x),g.stopPropagation()):h.cancel=!0},onItemClick(h){var g,_;null===(g=h.itemData)||void 0===g||null===(_=g.onItemClick)||void 0===_||_.call(g,h)},cssClass:this.getWidgetContainerClass(),target:this.component.$element()})}}}}},8483:(In,Ze,M)=>{"use strict";M.d(Ze,{P:()=>k,X:()=>U});var W=M(5704),o=M(9965),P=M(4859),b=M(6021),f=M(3090),S=M(2660),T=M(1830),y=M(1614),d=M(2440),c=M(127),s=M(3376),a=M(8736),u=M(1221),h=M(5335),g=M(8299);const x="_dataSourceChangedHandler",I="_getSpecificDataSourceOption",L="_normalizeDataSource",N=B=>class extends B{postCtor(){this.on("disposing",()=>{this._disposeDataSource()})}_refreshDataSource(){this._initDataSource(),this._loadDataSource()}_initDataSource(){let J,ie,K=I in this?this[I]():this.option("dataSource");this._disposeDataSource(),K&&(K instanceof u.q?(this._isSharedDataSource=!0,this._dataSource=K):(J="_dataSourceOptions"in this?this._dataSourceOptions():{},ie=this._dataSourceType?this._dataSourceType():u.q,K=(0,h.ho)(K,{fromUrlLoadMode:"_dataSourceFromUrlLoadMode"in this&&this._dataSourceFromUrlLoadMode()}),this._dataSource=new ie((0,f.X)(!0,{},J,K))),L in this&&(this._dataSource=this[L](this._dataSource)),this._addDataSourceHandlers(),this._initDataController())}_initDataController(){var K;const J=null===(K=this.option)||void 0===K?void 0:K.call(this,"_dataController");this._dataController=J||new g.A(this._dataSource)}_addDataSourceHandlers(){x in this&&this._addDataSourceChangeHandler(),"_dataSourceLoadErrorHandler"in this&&this._addDataSourceLoadErrorHandler(),"_dataSourceLoadingChangedHandler"in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()}_addReadyWatcher(){this.readyWatcher=function(K){this._ready&&this._ready(!K)}.bind(this),this._dataSource.on("loadingChanged",this.readyWatcher)}_addDataSourceChangeHandler(){const K=this._dataSource;this._proxiedDataSourceChangedHandler=function(J){this[x](K.items(),J)}.bind(this),K.on("changed",this._proxiedDataSourceChangedHandler)}_addDataSourceLoadErrorHandler(){this._proxiedDataSourceLoadErrorHandler=this._dataSourceLoadErrorHandler.bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)}_addDataSourceLoadingChangedHandler(){this._proxiedDataSourceLoadingChangedHandler=this._dataSourceLoadingChangedHandler.bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)}_loadDataSource(){const K=this._dataSource;K&&(K.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():K.load())}_loadSingle(K,J){return K="this"===K?this._dataSource.key()||"this":K,this._dataSource.loadSingle(K,J)}_isLastPage(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize}_isDataSourceLoading(){return this._dataSource&&this._dataSource.isLoading()}_disposeDataSource(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._proxiedDataSourceChangedHandler&&this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._proxiedDataSourceLoadErrorHandler&&this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._proxiedDataSourceLoadingChangedHandler&&this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler),this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)}getDataSource(){return this._dataSource||null}},G=function(B,K,J){const ie=B._dataSource;if(ie){if(void 0!==J){if(B._getPagingOptionValue(K)!==J){"pageSize"===K&&ie.pageIndex(0),ie[K](J),B._skipProcessingPagingChange=!0,B.option(`paging.${K}`,J),B._skipProcessingPagingChange=!1;const q=ie.pageIndex();return B._isPaging="pageIndex"===K,ie["pageIndex"===K?"load":"reload"]().done(()=>{B._isPaging=!1,B.pageChanged.fire(q)})}return(0,b.cY)().resolve().promise()}return ie[K]()}return 0};class k extends(N(s.Ay.Controller)){init(){this._items=[],this._cachedProcessedItems=null,this._columnsController=this.getController("columns"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._editingController=this.getController("editing"),this._editorFactoryController=this.getController("editorFactory"),this._errorHandlingController=this.getController("errorHandling"),this._filterSyncController=this.getController("filterSync"),this._applyFilterController=this.getController("applyFilter"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._focusController=this.getController("focus"),this._headerFilterController=this.getController("headerFilter"),this._selectionController=this.getController("selection"),this._stateStoringController=this.getController("stateStoring"),this._validatingController=this.getController("validating"),this._isPaging=!1,this._currentOperationTypes=null,this._dataChangedHandler=K=>{this._currentOperationTypes=this._dataSource.operationTypes(),this._handleDataChanged(K),this._currentOperationTypes=null},this._columnsChangedHandler=this._handleColumnsChanged.bind(this),this._loadingChangedHandler=this._handleLoadingChanged.bind(this),this._loadErrorHandler=this._handleLoadError.bind(this),this._customizeStoreLoadOptionsHandler=this._handleCustomizeStoreLoadOptions.bind(this),this._changingHandler=this._handleChanging.bind(this),this._dataPushedHandler=this._handleDataPushed.bind(this),this._columnsController.columnsChanged.add(this._columnsChangedHandler),this._isLoading=!1,this._isCustomLoading=!1,this._repaintChangesOnly=void 0,this._changes=[],this.createAction("onDataErrorOccurred"),this.dataErrorOccurred.add(K=>this.executeAction("onDataErrorOccurred",{error:K})),this._refreshDataSource(),this.postCtor()}_getPagingOptionValue(K){return this._dataSource[K]()}callbackNames(){return["changed","loadingChanged","dataErrorOccurred","pageChanged","dataSourceChanged","pushed"]}callbackFlags(K){if("dataErrorOccurred"===K)return{stopOnFalse:!0}}publicMethods(){return["_disposeDataSource","beginCustomLoading","byKey","clearFilter","endCustomLoading","filter","getCombinedFilter","getDataByKeys","getDataSource","getKeyByRowIndex","getRowIndexByKey","getVisibleRows","keyOf","pageCount","pageIndex","pageSize","refresh","repaintRows","totalCount"]}reset(){this._columnsController.reset(),this._items=[],this._refreshDataSource()}_handleDataSourceChange(K){if(K.value===K.previousValue||this.option("columns")&&Array.isArray(K.value)&&Array.isArray(K.previousValue)){if(K.value!==K.previousValue){const ie=this.store();ie&&(ie._array=K.value)}return this.needToRefreshOnDataSourceChange(K)&&this.refresh(this.option("repaintChangesOnly")),!0}return!1}needToRefreshOnDataSourceChange(K){return!0}optionChanged(K){const J=this;let ie,re;function q(){K.handled=!0}if("dataSource"===K.name&&K.name===K.fullName&&this._handleDataSourceChange(K))q();else switch(K.name){case"cacheEnabled":case"repaintChangesOnly":case"highlightChanges":case"loadingTimeout":q();break;case"remoteOperations":case"keyExpr":case"dataSource":case"scrolling":q(),J.reset();break;case"paging":if(ie=J.dataSource(),ie&&(re=J._setPagingOptions(ie),re)){const Y=ie.pageIndex();this._isPaging=re.isPageIndexChanged,ie.load().done(()=>{this._isPaging=!1,J.pageChanged.fire(Y)})}q();break;case"rtlEnabled":J.reset();break;case"columns":ie=J.dataSource(),ie&&ie.isLoading()&&K.name===K.fullName&&(this._useSortingGroupingFromColumns=!0,ie.load());break;default:super.optionChanged(K)}}isReady(){return!this._isLoading}getDataSource(){return this._dataSource&&this._dataSource._dataSource}getCombinedFilter(K){return this.combinedFilter(void 0,K)}combinedFilter(K,J){if(!this._dataSource)return K;let ie=K??this._dataSource.filter();if(this._columnsController.isDataSourceApplied()||this._columnsController.isAllDataTypesDefined()){const Y=this._calculateAdditionalFilter();ie=Y?a.A.combineFilters([Y,ie]):ie}const q=this._dataSource.remoteOperations().filtering||J;return ie=this._columnsController.updateFilter(ie,q),ie}waitReady(){return this._updateLockCount?(this._readyDeferred=new b.cY,this._readyDeferred):(0,b.z7)()}_endUpdateCore(){const K=this._changes;if(K.length){this._changes=[];const J=K.every(ie=>ie.repaintChangesOnly);this.updateItems(1===K.length?K[0]:{repaintChangesOnly:J})}this._readyDeferred&&(this._readyDeferred.resolve(),this._readyDeferred=null)}_handleCustomizeStoreLoadOptions(K){var J;const ie=this._columnsController,re=this._dataSource,{storeLoadOptions:q}=K;K.isCustomLoading&&!q.isLoadingAll||(q.filter=this.combinedFilter(q.filter),1===(null===(J=q.filter)||void 0===J?void 0:J.length)&&"!"===q.filter[0]&&(K.data=[],K.extra=K.extra||{},K.extra.totalCount=0),ie.isDataSourceApplied()||ie.updateColumnDataTypes(re),this._columnsUpdating=!0,ie.updateSortingGrouping(re,!this._useSortingGroupingFromColumns),this._columnsUpdating=!1,q.sort=ie.getSortDataSourceParameters(),q.group=ie.getGroupDataSourceParameters(),re.sort(q.sort),re.group(q.group),q.sort=ie.getSortDataSourceParameters(!re.remoteOperations().sorting),K.group=ie.getGroupDataSourceParameters(!re.remoteOperations().grouping))}_handleColumnsChanged(K){const J=this,{changeTypes:ie}=K,{optionNames:re}=K;let q,Y,Z;const Q=function(te){var pe;J._columnsController.columnsChanged.remove(Q),J.updateItems({repaintChangesOnly:!1,virtualColumnsScrolling:null==te||null===(pe=te.changeTypes)||void 0===pe?void 0:pe.virtualColumnsScrolling})};if(ie.sorting||ie.grouping)J._dataSource&&!J._columnsUpdating&&(J._dataSource.group(J._columnsController.getGroupDataSourceParameters()),J._dataSource.sort(J._columnsController.getSortDataSourceParameters()),J.reload());else if(ie.columns&&(Y=J._columnsController.columnOption(K.columnIndex,"filterValues"),(re.filterValues||re.filterType&&Array.isArray(Y)||re.filterValue||re.selectedFilterOperation||re.allowFiltering)&&(q=J._columnsController.columnOption(K.columnIndex,"filterValue"),(Array.isArray(Y)||void 0===K.columnIndex||(0,T.O9)(q)||!re.selectedFilterOperation||re.filterValue)&&(J._applyFilter(),Z=!0)),!J._needApplyFilter&&!a.A.checkChanges(re,["width","visibleWidth","filterValue","bufferedFilterValue","selectedFilterOperation","filterValues","filterType"])&&J._columnsController.columnsChanged.add(Q),(0,T.O9)(re.visible))){const te=J._columnsController.columnOption(K.columnIndex);te&&((0,T.O9)(te.filterValue)||(0,T.O9)(te.filterValues))&&(J._applyFilter(),Z=!0)}!Z&&ie.filtering&&!this._needApplyFilter&&J.reload()}_handleDataChanged(K){const J=this,ie=J._dataSource,re=J._columnsController;let q=!1;this._useSortingGroupingFromColumns=!1,ie&&!J._isDataSourceApplying&&(J._isDataSourceApplying=!0,(0,b.z7)(J._columnsController.applyDataSource(ie)).done(()=>{J._isLoading&&J._handleLoadingChanged(!1),q&&K&&K.isDelayed&&(K.isDelayed=!1),J._isDataSourceApplying=!1;const Y=J._needApplyFilter;J._needApplyFilter=!1,Y&&!J._isAllDataTypesDefined&&(()=>{const Z=J._calculateAdditionalFilter();return Z&&Z.length})()?(c.A.log("W1005",J.component.NAME),J._applyFilter()):J.updateItems(K,!0)}).fail(()=>{J._isDataSourceApplying=!1}),J._isDataSourceApplying&&(q=!0,J._handleLoadingChanged(!0)),J._needApplyFilter=!J._columnsController.isDataSourceApplied(),J._isAllDataTypesDefined=re.isAllDataTypesDefined())}_handleLoadingChanged(K){this._isLoading=K,this._fireLoadingChanged()}_handleLoadError(K){this.dataErrorOccurred.fire(K)}_handleDataPushed(K){this.pushed.fire(K)}fireError(){for(var K=arguments.length,J=new Array(K),ie=0;ie<K;ie++)J[ie]=arguments[ie];this.dataErrorOccurred.fire(c.A.Error.apply(c.A,J))}_setPagingOptions(K){const J=this.option("paging.pageIndex"),ie=this.option("paging.pageSize"),re=this.option("paging.enabled"),q=this.option("scrolling.mode"),Y="infinite"===q,Q=re||"virtual"===q||Y;let te=!1,pe=!1,z=!1;return K.requireTotalCount(!Y),void 0!==re&&K.paginate()!==Q&&(K.paginate(Q),te=!0),void 0!==ie&&K.pageSize()!==ie&&(K.pageSize(ie),pe=!0),void 0!==J&&K.pageIndex()!==J&&(K.pageIndex(J),z=!0),!!(te||pe||z)&&{isPaginateChanged:te,isPageSizeChanged:pe,isPageIndexChanged:z}}_getSpecificDataSourceOption(){const K=this.option("dataSource");return Array.isArray(K)?{store:{type:"array",data:K,key:this.option("keyExpr")}}:K}_initDataSource(){const K=this,J=this._dataSource;super._initDataSource();const ie=K._dataSource;if(K._useSortingGroupingFromColumns=!0,K._cachedProcessedItems=null,ie){const re=K._setPagingOptions(ie);this._isPaging=re?.isPageIndexChanged,K.setDataSource(ie)}else J&&K.updateItems()}_loadDataSource(){const K=this,J=K._dataSource,ie=new b.cY;return(0,b.z7)(this._columnsController.refresh(!0)).always(()=>{J?J.load().done(function(){K._isPaging=!1,ie.resolve.apply(ie,arguments)}).fail(ie.reject):ie.resolve()}),ie.promise()}_beforeProcessItems(K){return K.slice(0)}getRowIndexDelta(){return 0}getDataIndex(K){const J=this._items,ie="append"===K.changeType&&J.length>0?J[J.length-1]:null;return(0,T.O9)(ie?.dataIndex)?ie.dataIndex+1:0}_processItems(K,J){const ie=this,re=ie.getRowIndexDelta(),{changeType:q}=J,Q={visibleColumns:ie._columnsController.getVisibleColumns(null,"loadingAll"===q),dataIndex:this.getDataIndex(J)},te=[];return(0,S.__)(K,(pe,z)=>{(0,T.O9)(z)&&(Q.rowIndex=pe-re,z=ie._processItem(z,Q),te.push(z))}),te}_processItem(K,J){return K=this._generateDataItem(K,J),(K=this._processDataItem(K,J)).dataIndex=J.dataIndex++,K}_generateDataItem(K,J){return{rowType:"data",data:K,key:this.keyOf(K)}}_processDataItem(K,J){return K.values=this.generateDataValues(K.data,J.visibleColumns),K}generateDataValues(K,J,ie){const re=[];let q;for(let Y=0;Y<J.length;Y++){const Z=J[Y];q=ie?void 0:null,Z.command||(Z.calculateCellValue?q=Z.calculateCellValue(K):Z.dataField&&(q=K[Z.dataField])),re.push(q)}return re}_applyChange(K){const J=this;"update"===K.changeType?J._applyChangeUpdate(K):J.items().length&&K.repaintChangesOnly&&"refresh"===K.changeType?J._applyChangesOnly(K):"refresh"===K.changeType&&J._applyChangeFull(K)}_applyChangeFull(K){this._items=K.items.slice(0)}_getRowIndices(K){const J=K.rowIndices.slice(0),ie=this.getRowIndexDelta();J.sort((re,q)=>re-q);for(let re=0;re<J.length;re++){let q=J[re];K.allowInvisibleRowIndices&&(q+=ie),q<0&&(J.splice(re,1),re--)}return J}_applyChangeUpdate(K){const J=this,{items:ie}=K,re=J._getRowIndices(K),q=J.getRowIndexDelta(),Y=J.option("repaintChangesOnly");let te,Z=-1,Q=0;K.items=[],K.rowIndices=[],K.columnIndices=[],K.changeTypes=[];const pe=function(z,oe,ae){let ee=z&&oe&&(0,P.RL)(z.key,oe.key);return ee&&ae&&(ee=z.rowType===oe.rowType&&("detail"!==oe.rowType||z.isEditing===oe.isEditing)),ee};(0,S.__)(re,(z,oe)=>{let ae;if(Z===(oe+=Q+q))return;Z=oe;const ee=J._items[oe],he=J._items[oe+1],de=ie[oe],ue=ie[oe+1],be=pe(ee,he)||pe(de,ue);if(de&&(de.rowIndex=oe,K.items.push(de)),ee&&de&&pe(ee,de,be))te="update",J._items[oe]=de,ee.visible!==de.visible?K.items.splice(-1,1,{visible:de.visible}):Y&&!K.isFullUpdate&&(ae=J._partialUpdateRow(ee,de,oe-q));else if(de&&!ee||ue&&pe(ee,ue,be))te="insert",J._items.splice(oe,0,de),Q++;else if(ee&&!de||he&&pe(de,he,be))te="remove",J._items.splice(oe,1),Q--,Z=-1;else{if(!de)return;te="update",J._items[oe]=de}K.rowIndices.push(oe-q),K.changeTypes.push(te),K.columnIndices.push(ae)})}_isCellChanged(K,J,ie,re,q){if(JSON.stringify(K.values[re])!==JSON.stringify(J.values[re]))return!0;function Y(Z,Q){return!!Z.modifiedValues&&void 0!==Z.modifiedValues[Q]}return Y(K,re)!==Y(J,re)}_getChangedColumnIndices(K,J,ie,re){let q;if(K.rowType===J.rowType){if("group"!==J.rowType&&"groupFooter"!==J.rowType&&(q=[],"detail"!==J.rowType))for(let Y=0;Y<K.values.length;Y++)this._isCellChanged(K,J,ie,Y,re)&&q.push(Y);"group"===J.rowType&&K.cells&&J.isExpanded===K.isExpanded&&J.data.isContinuation===K.data.isContinuation&&J.data.isContinuationOnNextPage===K.data.isContinuationOnNextPage&&(q=K.cells.map((Z,Q)=>{var te;return"groupExpand"!==(null===(te=Z.column)||void 0===te?void 0:te.type)?Q:-1}).filter(Z=>Z>=0))}return q}_partialUpdateRow(K,J,ie,re){var q;let Y=this._getChangedColumnIndices(K,J,ie,re);return null!==(q=Y)&&void 0!==q&&q.length&&this.option("dataRowTemplate")&&(Y=void 0),Y&&(K.cells&&K.cells.forEach((Z,Q)=>{!(Y.indexOf(Q)>=0)&&Z&&Z.update&&Z.update(J)}),J.update=K.update,J.watch=K.watch,J.cells=K.cells,re&&(J.oldValues=K.values),K.update&&K.update(J)),Y}_isItemEquals(K,J){if(JSON.stringify(K.values)!==JSON.stringify(J.values)||["modified","isNewRow","removed","isEditing"].some(Z=>K[Z]!==J[Z]))return!1;if("group"===K.rowType||"groupFooter"===K.rowType){var ie,re,q,Y;const Z=K.isExpanded===J.isExpanded,Q=JSON.stringify(K.summaryCells)===JSON.stringify(J.summaryCells),te=(null===(ie=K.data)||void 0===ie?void 0:ie.isContinuation)===(null===(re=J.data)||void 0===re?void 0:re.isContinuation)&&(null===(q=K.data)||void 0===q?void 0:q.isContinuationOnNextPage)===(null===(Y=J.data)||void 0===Y?void 0:Y.isContinuationOnNextPage);if(!Z||!Q||!te)return!1}return!0}_applyChangesOnly(K){const J=[],ie=[],re=[],q=[],Y={},Z=K?.isLiveUpdate??!0;function Q(oe){if(oe)return`${oe.rowType},${JSON.stringify(oe.key)}`}const te=this._items,pe=te.slice();K.items.forEach((oe,ae)=>{const ee=Q(oe);Y[ee]=ae,oe.rowIndex=ae});const z=(0,o.p)(pe,K.items,Q,(oe,ae)=>!!this._isItemEquals(oe,ae)&&(oe.cells&&(oe.update&&oe.update(ae),oe.cells.forEach(ee=>{ee&&ee.update&&ee.update(ae,!0)})),!0));z?(z.forEach(oe=>{switch(oe.type){case"update":{const{index:ae}=oe,ee=oe.data,{oldItem:he}=oe,de=this._partialUpdateRow(he,ee,ae,Z);J.push(ae),re.push("update"),q.push(ee),te[ae]=ee,ie.push(de);break}case"insert":J.push(oe.index),re.push("insert"),q.push(oe.data),ie.push(void 0),te.splice(oe.index,0,oe.data);break;case"remove":J.push(oe.index),re.push("remove"),te.splice(oe.index,1),q.push(oe.oldItem),ie.push(void 0)}}),K.repaintChangesOnly=!0,K.changeType="update",K.rowIndices=J,K.columnIndices=ie,K.changeTypes=re,K.items=q,pe.length&&(K.isLiveUpdate=!0),this._correctRowIndices(oe=>{const ae=this._rowIndexOffset||0,ee=this.getRowIndexOffset(),de=Q(pe[oe-ae]),ue=Y[de];return ue>=0?ue+ee-oe:0})):this._applyChangeFull(K)}_correctRowIndices(K){}_afterProcessItems(K,J){return K}_updateItemsCore(K){let J;const ie=this._dataSource;if(K.changeType=K.changeType||"refresh",ie){const q=this._cachedProcessedItems;K.useProcessedItemsCache&&q?J=q:(J=K.items||ie.items(),J=this._beforeProcessItems(J),J=this._processItems(J,K),this._cachedProcessedItems=J),J=this._afterProcessItems(J,K),K.items=J;const Y=this._items.length===J.length&&this._items;this._applyChange(K);const Z=this.getRowIndexDelta();(0,S.__)(this._items,(Q,te)=>{te.rowIndex=Q-Z,Y&&(te.cells=Y[Q].cells??[]);const pe=J[Q];pe&&(te.loadIndex=pe.loadIndex)}),this._rowIndexOffset=this.getRowIndexOffset()}else this._items=[]}_handleChanging(K){const J=this.getVisibleRows();this.dataSource()&&K.changes.forEach(re=>{if("insert"===re.type&&re.index>=0){let q=0;for(let Y=0;Y<re.index;Y++){const Z=J[Y];Z&&("data"===Z.rowType||"group"===Z.rowType)&&q++}re.index=q}})}updateItems(K,J){K=K||{};const ie=this;if(void 0!==ie._repaintChangesOnly)K.repaintChangesOnly=K.repaintChangesOnly??ie._repaintChangesOnly,K.needUpdateDimensions=K.needUpdateDimensions||ie._needUpdateDimensions;else if(K.changes)K.repaintChangesOnly=ie.option("repaintChangesOnly");else if(J){const re=ie.dataSource().operationTypes();K.repaintChangesOnly=re&&!re.grouping&&!re.filtering&&ie.option("repaintChangesOnly"),K.isDataChanged=!0,re&&(re.reload||re.paging||re.groupExpanding)&&(K.needUpdateDimensions=!0)}!ie._updateLockCount||K.cancel?(ie._updateItemsCore(K),!K.cancel&&ie._fireChanged(K)):ie._changes.push(K)}loadingOperationTypes(){const K=this.dataSource();return K&&K.loadingOperationTypes()||{}}_fireChanged(K){this._currentOperationTypes&&(K.operationTypes=this._currentOperationTypes,this._currentOperationTypes=null),(0,P.zE)(()=>{this.changed.fire(K)})}isLoading(){return this._isLoading||this._isCustomLoading}_fireLoadingChanged(){this.loadingChanged.fire(this.isLoading(),this._loadingText)}_calculateAdditionalFilter(){return null}_applyFilter(){const K=this._dataSource;return K?(K.pageIndex(0),this._isFilterApplying=!0,this.reload().done(()=>{this._isFilterApplying&&this.pageChanged.fire()})):(new b.cY).resolve()}resetFilterApplying(){this._isFilterApplying=!1}filter(K){const J=this._dataSource,ie=J&&J.filter();if(0===arguments.length)return ie;K=arguments.length>1?Array.prototype.slice.call(arguments,0):K,!a.A.equalFilterParameters(ie,K)&&(J&&J.filter(K),this._applyFilter())}clearFilter(K){const J=this,ie=J._columnsController,re=function(q){const Y=ie.columnCount();for(let Z=0;Z<Y;Z++)ie.columnOption(Z,q,void 0)};if(J.component.beginUpdate(),arguments.length>0)switch(K){case"dataSource":J.filter(null);break;case"search":J.searchByText("");break;case"header":re("filterValues");break;case"row":re("filterValue")}else J.filter(null),J.searchByText(""),re("filterValue"),re("bufferedFilterValue"),re("filterValues");J.component.endUpdate()}_fireDataSourceChanged(){const K=this,J=function(){K.changed.remove(J),K.dataSourceChanged.fire()};K.changed.add(J)}_getDataSourceAdapter(){}_createDataSourceAdapterCore(K,J){const re=this._getDataSourceAdapter().create(this.component);return re.init(K,J),re}isLocalStore(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.store())instanceof y.A}isCustomStore(K){return(K=K||this.store())instanceof d.A}_createDataSourceAdapter(K){let J=this.option("remoteOperations");const ie=K.store(),re={filtering:!0,sorting:!0,paging:!0,grouping:!0,summary:!0};return(0,T.Gv)(J)&&J.groupPaging&&(J=(0,f.X)({},re,J)),"auto"===J&&(J=this.isLocalStore(ie)||this.isCustomStore(ie)?{}:{filtering:!0,sorting:!0,paging:!0}),!0===J&&(J=re),this._createDataSourceAdapterCore(K,J)}setDataSource(K){const J=this,ie=J._dataSource;!K&&ie&&(ie.cancelAll(),ie.changed.remove(J._dataChangedHandler),ie.loadingChanged.remove(J._loadingChangedHandler),ie.loadError.remove(J._loadErrorHandler),ie.customizeStoreLoadOptions.remove(J._customizeStoreLoadOptionsHandler),ie.changing.remove(J._changingHandler),ie.pushed.remove(J._dataPushedHandler),ie.dispose(J._isSharedDataSource)),K&&(K=J._createDataSourceAdapter(K)),J._dataSource=K,K&&(J._fireDataSourceChanged(),J._isLoading=!K.isLoaded(),J._needApplyFilter=!0,J._isAllDataTypesDefined=J._columnsController.isAllDataTypesDefined(),K.changed.add(J._dataChangedHandler),K.loadingChanged.add(J._loadingChangedHandler),K.loadError.add(J._loadErrorHandler),K.customizeStoreLoadOptions.add(J._customizeStoreLoadOptionsHandler),K.changing.add(J._changingHandler),K.pushed.add(J._dataPushedHandler))}items(K){return this._items}isEmpty(){return!this.items().length}pageCount(){return this._dataSource?this._dataSource.pageCount():1}dataSource(){return this._dataSource}store(){const K=this._dataSource;return K&&K.store()}loadAll(K){let J=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const ie=this,re=new b.cY,q=ie._dataSource;if(q)if(K){const Y={data:K,isCustomLoading:!0,storeLoadOptions:{isLoadingAll:!0},loadOptions:{filter:J?null:ie.getCombinedFilter(),group:q.group(),sort:q.sort()}};q._handleDataLoaded(Y),(0,b.z7)(Y.data).done(Z=>{var Q;Z=ie._beforeProcessItems(Z),re.resolve(ie._processItems(Z,{changeType:"loadingAll"}),null===(Q=Y.extra)||void 0===Q?void 0:Q.summary)}).fail(re.reject)}else if(q.isLoading())re.reject();else{const Y=(0,f.X)({},q.loadOptions(),{isLoadingAll:!0,requireTotalCount:!1});q.load(Y).done((Z,Q)=>{Z=ie._beforeProcessItems(Z),Z=ie._processItems(Z,{changeType:"loadingAll"}),re.resolve(Z,Q&&Q.summary)}).fail(re.reject)}else re.resolve([]);return re}getKeyByRowIndex(K,J){const ie=this.items(J)[K];if(ie)return ie.key}getRowIndexByKey(K,J){return a.A.getIndexByKey(K,this.items(J))}keyOf(K){const J=this.store();if(J)return J.keyOf(K)}byKey(K){const J=this.store(),ie=this.getRowIndexByKey(K);let re;if(J)return ie>=0&&(re=(new b.cY).resolve(this.items()[ie].data)),re||J.byKey(K)}key(){const K=this.store();if(K)return K.key()}getRowIndexOffset(K){return 0}getDataByKeys(K){const J=this,ie=new b.cY,re=[],q=[];return(0,S.__)(K,(Y,Z)=>{re.push(J.byKey(Z).done(Q=>{q[Y]=Q}))}),b.z7.apply(W.A,re).always(()=>{ie.resolve(q)}),ie}pageIndex(K){return G(this,"pageIndex",K)}pageSize(K){return G(this,"pageSize",K)}beginCustomLoading(K){this._isCustomLoading=!0,this._loadingText=K||"",this._fireLoadingChanged()}endCustomLoading(){this._isCustomLoading=!1,this._loadingText=void 0,this._fireLoadingChanged()}refresh(K){!0===K?K={reload:!0,changesOnly:!0}:K||(K={lookup:!0,selection:!0,reload:!0});const J=this,ie=J.getDataSource(),{changesOnly:re}=K,q=new b.cY,Y=function(){J._repaintChangesOnly=!!re};return(0,b.z7)(!K.lookup||J._columnsController.refresh()).always(()=>{K.load||K.reload?(ie&&ie.on("customizeLoadResult",Y),(0,b.z7)(J.reload(K.reload,re)).always(()=>{ie&&ie.off("customizeLoadResult",Y),J._repaintChangesOnly=void 0}).done(q.resolve).fail(q.reject)):(J.updateItems({repaintChangesOnly:K.changesOnly}),q.resolve())}),q.promise()}getVisibleRows(){return this.items()}_disposeDataSource(){this._dataSource&&this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher),this.setDataSource(null)}dispose(){this._disposeDataSource(),super.dispose()}repaintRows(K,J){((K=Array.isArray(K)?K:[K]).length>1||(0,T.O9)(K[0]))&&this.updateItems({changeType:"update",rowIndices:K,isFullUpdate:!J})}skipProcessingPagingChange(K){return this._skipProcessingPagingChange&&("paging.pageIndex"===K||"paging.pageSize"===K)}getUserState(){return{searchText:this.option("searchPanel.text"),pageIndex:this.pageIndex(),pageSize:this.pageSize()}}getCachedStoreData(){return this._dataSource&&this._dataSource.getCachedStoreData()}isLastPageLoaded(){return this.pageIndex()===this.pageCount()-1}load(){var K;return null===(K=this._dataSource)||void 0===K?void 0:K.load()}reload(K,J){var ie;return null===(ie=this._dataSource)||void 0===ie?void 0:ie.reload(K,J)}push(){for(var K,J=arguments.length,ie=new Array(J),re=0;re<J;re++)ie[re]=arguments[re];return null===(K=this._dataSource)||void 0===K?void 0:K.push(...ie)}itemsCount(){var K;return this._dataSource?null===(K=this._dataSource)||void 0===K?void 0:K.itemsCount():0}totalItemsCount(){var K;return this._dataSource?null===(K=this._dataSource)||void 0===K?void 0:K.totalItemsCount():0}hasKnownLastPage(){var K;return!this._dataSource||(null===(K=this._dataSource)||void 0===K?void 0:K.hasKnownLastPage())}isLoaded(){var K;return!this._dataSource||(null===(K=this._dataSource)||void 0===K?void 0:K.isLoaded())}totalCount(){var K;return this._dataSource?null===(K=this._dataSource)||void 0===K?void 0:K.totalCount():0}hasLoadOperation(){var K;const J=(null===(K=this._dataSource)||void 0===K?void 0:K.operationTypes())??{};return Object.keys(J).some(ie=>J[ie])}}const U={defaultOptions:()=>({loadingTimeout:0,dataSource:null,cacheEnabled:!0,repaintChangesOnly:!1,highlightChanges:!1,onDataErrorOccurred:null,remoteOperations:"auto",paging:{enabled:!0,pageSize:void 0,pageIndex:void 0}}),controllers:{data:k}}},810:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>N});var W=M(8684),o=M(4859),P=M(6021),b=M(3090),f=M(2660),S=M(1830),T=M(1614),y=M(2946),d=M(3376),c=M(8736),s=M(5737);const a=function(G,k){if(G&&(G=G.slice(0),k))for(let U=0;U<G.length;U++)G[U]=(0,b.X)({key:G[U].key},G[U]),G[U].items=a(G[U].items,k-1);return G},u=function(G,k,U){let B={reload:!0,fullReload:!0};return k&&(B={sorting:!c.A.equalSortParameters(G.sort,k.sort),grouping:!c.A.equalSortParameters(G.group,k.group,!0),groupExpanding:!c.A.equalSortParameters(G.group,k.group)||k.groupExpand,filtering:!c.A.equalFilterParameters(G.filter,k.filter),pageIndex:G.pageIndex!==k.pageIndex,skip:G.skip!==k.skip,take:G.take!==k.take,pageSize:G.pageSize!==k.pageSize,fullReload:U,reload:!1,paging:!1},B.reload=U||B.sorting||B.grouping||B.filtering,B.paging=B.pageIndex||B.pageSize||B.take),B},_=function(G,k){const U=c.A.normalizeSortingInfo(G.group||G.storeLoadOptions.group||G.loadOptions.group).length,B=[];if(x(B,G,U))return B;k&&C(B,G,U)},x=function(G,k,U,B){var K;const{storeLoadOptions:J}=k,ie=k.take??J.take??0,re=null===(K=k.cachedData)||void 0===K?void 0:K.items;if(ie&&re){const q=k.skip??J.skip??0;for(let Y=0;Y<ie;Y+=1){const Z=B?ie-1-Y:Y,Q=Z+q,te=re[Q];if(void 0===te&&Q in re)return!0;const pe=w(k,te,U,Z,ie);if(!pe)return!1;G.push(pe)}return!0}return!1},w=function(G,k,U,B,K){return U&&k?D(k,U,0===B&&G.skips||[],B===K-1&&G.takes||[]):k},D=function(G,k,U,B){if(k&&G){const K=(0,s.A)({},G),J=U[0]||0,ie=B[0],{items:re}=G;if(re){if(void 0===ie&&!re[J])return;K.items=[],U.length&&(K.isContinuation=!0),ie&&(K.isContinuationOnNextPage=G.count>ie);for(let q=0;void 0===ie?re[q+J]:q<ie;q+=1){const Z=q+1===ie,Q=D(re[q+J],k-1,0===q?U.slice(1):[],Z?B.slice(1):[]);if(void 0===Q)return;K.items.push(Q)}}return K}return G},C=function(G,k,U){const B=G.length,{storeLoadOptions:K}=k;if(void 0!==K.skip&&K.take&&!U){const J=[];x(J,k,U,!0);const ie=J.length;(B||ie)&&(k.skip=k.skip??K.skip,k.take=k.take??K.take),B&&(K.skip+=B,K.take-=B,k.cachedDataPartBegin=G),ie&&(K.take-=ie,k.cachedDataPartEnd=J.reverse())}},L=function(G,k,U,B){if(U&&k){const K=(0,s.A)({},k);delete K.isContinuation,delete K.isContinuationOnNextPage;const J=B[0]||0;return k.items&&(K.items=G?.items||{},k.items.forEach((ie,re)=>{const q=re+J,Y=0===re?B.slice(1):[];K.items[q]=L(K.items[q],ie,U-1,Y)})),K}return k};class N extends d.Ay.Controller{init(k,U){const B=this;B._dataSource=k,B._remoteOperations=U||{},B._isLastPage=!k.isLastPage(),B._hasLastPage=!1,B._currentTotalCount=0,B._cachedData={items:{}},B._lastOperationTypes={},B._eventsStrategy=k._eventsStrategy,B._totalCountCorrection=0,B._isLoadingAll=!1,B.changed=(0,W.A)(),B.loadingChanged=(0,W.A)(),B.loadError=(0,W.A)(),B.customizeStoreLoadOptions=(0,W.A)(),B.changing=(0,W.A)(),B.pushed=(0,W.A)(),B._dataChangedHandler=B._handleDataChanged.bind(B),B._customizeStoreLoadOptionsHandler=B._handleCustomizeStoreLoadOptions.bind(B),B._dataLoadedHandler=B._handleDataLoaded.bind(B),B._loadingChangedHandler=B._handleLoadingChanged.bind(B),B._loadErrorHandler=B._handleLoadError.bind(B),B._pushHandler=B._handlePush.bind(B),B._changingHandler=B._handleChanging.bind(B),k.on("changed",B._dataChangedHandler),k.on("customizeStoreLoadOptions",B._customizeStoreLoadOptionsHandler),k.on("customizeLoadResult",B._dataLoadedHandler),k.on("loadingChanged",B._loadingChangedHandler),k.on("loadError",B._loadErrorHandler),k.on("changing",B._changingHandler),k.store().on("beforePush",B._pushHandler),(0,f.__)(k,(K,J)=>{!B[K]&&(0,S.Tn)(J)&&(B[K]=function(){return this._dataSource[K].apply(this._dataSource,arguments)})})}dispose(k){const U=this._dataSource,B=U.store();U.off("changed",this._dataChangedHandler),U.off("customizeStoreLoadOptions",this._customizeStoreLoadOptionsHandler),U.off("customizeLoadResult",this._dataLoadedHandler),U.off("loadingChanged",this._loadingChangedHandler),U.off("loadError",this._loadErrorHandler),U.off("changing",this._changingHandler),B&&B.off("beforePush",this._pushHandler),k||U.dispose()}remoteOperations(){return this._remoteOperations}refresh(k,U){const B=this,K=B._dataSource;U.reload&&(B.resetCurrentTotalCount(),B._isLastPage=!K.paginate(),B._hasLastPage=B._isLastPage)}resetCurrentTotalCount(){this._currentTotalCount=0,this._totalCountCorrection=0}resetCache(){this._cachedStoreData=void 0,this._cachedPagingData=void 0}resetPagesCache(k){this._cachedData={items:{}}}_needClearStoreDataCache(){const k=this.remoteOperations(),U=u(this._lastLoadOptions||{},{});return!Object.keys(k).every(K=>!U[K]||!k[K])}push(k,U){const B=this.store();this._needClearStoreDataCache()&&(this._cachedStoreData=void 0),this._cachedPagingData=void 0,this.resetPagesCache(!0),this._cachedStoreData&&(0,y.VK)({keyInfo:B,data:this._cachedStoreData,changes:k}),U||this._applyBatch(k),this.pushed.fire(k)}getDataIndexGetter(){if(!this._dataIndexGetter){let k,U;const B=this.store();this._dataIndexGetter=K=>{if(!k||U&&U!==this._cachedStoreData){U=this._cachedStoreData||[],k={};for(let ie=0;ie<U.length;ie++)k[(0,o.GP)(B.keyOf(U[ie]))]=ie}return k[(0,o.GP)(B.keyOf(K))]}}return this._dataIndexGetter}_getKeyInfo(){return this.store()}_needToCopyDataObject(){return!0}_applyBatch(k,U){const B=this._getKeyInfo(),K=this._dataSource,J=c.A.normalizeSortingInfo(this.group()).length,ie="reshape"===this.option("editing.refreshMode"),re="virtual"===this.option("scrolling.mode");k=k.filter(Q=>!K.paginate()||"insert"!==Q.type||void 0!==Q.index);const q=()=>J?this.itemsCount():this.items().length,Y=q();(0,y.VK)({keyInfo:B,data:this._items,changes:k,groupCount:J,useInsertIndex:!0,skipCopying:!this._needToCopyDataObject()}),(0,y.VK)({keyInfo:B,data:K.items(),changes:k,groupCount:J,useInsertIndex:!0,skipCopying:!this._needToCopyDataObject()}),(this._currentTotalCount>0||(U||!ie)&&re)&&(this._totalCountCorrection+=q()-Y),k.splice(0,k.length)}_handlePush(k){let{changes:U}=k;this.push(U,!0)}_handleChanging(k){this.changing.fire(k),this._applyBatch(k.changes,!0)}_needCleanCacheByOperation(k,U){const B=["filtering","sorting","paging"],K=B.indexOf(k);return(K>=0?B.slice(K):[k]).some(ie=>U[ie])}_customizeRemoteOperations(k,U){let B=this._cachedStoreData,K=this._cachedPagingData,J=this._cachedData;(k.storeLoadOptions.filter&&!k.remoteOperations.filtering||k.storeLoadOptions.sort&&!k.remoteOperations.sorting)&&(k.remoteOperations={filtering:k.remoteOperations.filtering,summary:k.remoteOperations.summary}),U.fullReload?(B=void 0,K=void 0,J={items:{}}):(U.reload?(K=void 0,J={items:{}}):U.groupExpanding&&(J={items:{}}),(0,f.__)(U,(ie,re)=>{re&&this._needCleanCacheByOperation(ie,k.remoteOperations)&&(B=void 0,K=void 0)})),K&&(k.remoteOperations.paging=!1),k.cachedStoreData=B,k.cachedPagingData=K,k.cachedData=J,k.isCustomLoading||(this._cachedStoreData=B,this._cachedPagingData=K,this._cachedData=J)}_handleCustomizeStoreLoadOptions(k){var U;this._handleDataLoading(k),0!==(null===(U=k.data)||void 0===U?void 0:U.length)&&(k.data=_(k,!0)||k.cachedStoreData)}_handleDataLoading(k){const U=this._dataSource,B=this._lastLoadOptions;this.customizeStoreLoadOptions.fire(k),k.delay=this.option("loadingTimeout"),k.originalStoreLoadOptions=k.storeLoadOptions,k.remoteOperations=(0,b.X)({},this.remoteOperations());const K=!this.isLoaded()&&!this._isRefreshing;this.option("integrationOptions.renderedOnServer")&&!this.isLoaded()&&(k.delay=void 0);const J=(0,b.X)({pageIndex:this.pageIndex(),pageSize:this.pageSize()},k.storeLoadOptions),ie=u(J,B,K);if(this._customizeRemoteOperations(k,ie),!k.isCustomLoading){const re=this._isRefreshing;k.pageIndex=U.pageIndex(),k.lastLoadOptions=J,k.operationTypes=ie,this._loadingOperationTypes=ie,this._isRefreshing=!0,(0,P.z7)(re||this._isRefreshed||this.refresh(k,ie)).done(()=>{this._lastOperationId===k.operationId&&(this._isRefreshed=!0,this.load().always(()=>{this._isRefreshed=!1}))}).fail(()=>{U.cancel(k.operationId)}).always(()=>{this._isRefreshing=!1}),U.cancel(this._lastOperationId),this._lastOperationId=k.operationId,this._isRefreshing&&U.cancel(this._lastOperationId)}this._handleDataLoadingCore(k)}_handleDataLoadingCore(k){const{remoteOperations:U}=k;k.loadOptions={};const B=k.cachedData.extra,K={filter:!U.filtering,sort:!U.sorting,group:!U.grouping,summary:!U.summary,skip:!U.paging,take:!U.paging,requireTotalCount:B&&"totalCount"in B||!U.paging,langParams:!U.filtering||!U.sorting};(0,f.__)(k.storeLoadOptions,(J,ie)=>{K[J]&&(k.loadOptions[J]=ie,delete k.storeLoadOptions[J])}),B&&(k.extra=B)}_handleDataLoaded(k){const{loadOptions:U}=k,B=k.remoteOperations&&!k.remoteOperations.paging,{cachedData:K}=k,{storeLoadOptions:J}=k,ie=!1!==this.option("cacheEnabled")&&J,re=ie&&!k.isCustomLoading&&K&&(!B||J.group),q=ie&&B,Y=q&&!k.isCustomLoading;if(!U)return void this._dataSource.cancel(k.operationId);B&&(k.skip=U.skip,k.take=U.take,delete U.skip,delete U.take),U.group&&(U.group=k.group||U.group);const Z=c.A.normalizeSortingInfo(k.group||J.group||U.group).length;var Q;k.cachedDataPartBegin&&(k.data=k.cachedDataPartBegin.concat(k.data)),k.cachedDataPartEnd&&(k.data=k.data.concat(k.cachedDataPartEnd)),re&&_(k)||(q&&k.cachedPagingData?k.data=a(k.cachedPagingData,Z):(Y&&(this._cachedStoreData?k.mergeStoreLoadData&&(k.data=this._cachedStoreData=this._cachedStoreData.concat(k.data)):this._cachedStoreData=a(k.data,c.A.normalizeSortingInfo(J.group).length)),new T.A(k.data).load(U).done(te=>{k.data=te,Y&&(this._cachedPagingData=a(k.data,Z))}).fail(te=>{k.data=(new P.cY).reject(te)})),U.requireTotalCount&&B&&(k.extra=(0,S.Qd)(k.extra)?k.extra:{},k.extra.totalCount=k.data.length),k.extra&&k.extra.totalCount>=0&&(!1===J.requireTotalCount||!1===U.requireTotalCount)&&(k.extra.totalCount=-1),!U.data&&(J.requireTotalCount||((null===(Q=k.extra)||void 0===Q?void 0:Q.totalCount)??-1)>=0)&&(this._totalCountCorrection=0),this._handleDataLoadedCore(k),re&&(K.extra=K.extra||(0,b.X)({},k.extra),(0,P.z7)(k.data).done(te=>{!function(G,k,U){const{storeLoadOptions:B}=G,K=G.skip??B.skip??0,J=G.take??B.take??0;for(let ie=0;ie<J;ie+=1){const re=ie+K,q=G.cachedData.items;q[re]=L(q[re],k[ie],U,0===ie&&G.skips||[])}}(k,te,Z)}))),(0,P.z7)(k.data).done(()=>{k.lastLoadOptions&&(this._lastLoadOptions=k.lastLoadOptions,Object.keys(k.operationTypes).forEach(te=>{this._lastOperationTypes[te]=this._lastOperationTypes[te]||k.operationTypes[te]}))}),k.storeLoadOptions=k.originalStoreLoadOptions}_handleDataLoadedCore(k){k.remoteOperations&&!k.remoteOperations.paging&&Array.isArray(k.data)&&(void 0!==k.skip&&(k.data=k.data.slice(k.skip)),void 0!==k.take&&(k.data=k.data.slice(0,k.take)))}_handleLoadingChanged(k){this.loadingChanged.fire(k)}_handleLoadError(k){this.loadError.fire(k),this.changed.fire({changeType:"loadError",error:k})}_loadPageSize(){return this.pageSize()}_handleDataChanged(k){let U;const B=this._dataSource;let K=!1;const J=!k||(0,S.O9)(k.changeType),ie=this.itemsCount();J&&(this._isLastPage=!ie||!this._loadPageSize()||ie<this._loadPageSize(),this._isLastPage&&(this._hasLastPage=!0)),B.totalCount()>=0?B.pageIndex()>=this.pageCount()&&(B.pageIndex(this.pageCount()-1),this.pageIndex(B.pageIndex()),this.resetPagesCache(),B.load(),K=!0):J&&(U=B.pageIndex()*this.pageSize()+ie,U>this._currentTotalCount&&(this._currentTotalCount=U,(0===B.pageIndex()||!this.option("scrolling.legacyMode"))&&(this._totalCountCorrection=0)),0===ie&&B.pageIndex()>=this.pageCount()&&(B.pageIndex(this.pageCount()-1),"infinite"!==this.option("scrolling.mode")&&(B.load(),K=!0))),K||(this._operationTypes=this._lastOperationTypes,this._lastOperationTypes={},this.component._optionCache={},this.changed.fire(k),this.component._optionCache=void 0)}_scheduleCustomLoadCallbacks(k){const U=this;U._isCustomLoading=!0,k.always(()=>{U._isCustomLoading=!1})}loadingOperationTypes(){return this._loadingOperationTypes}operationTypes(){return this._operationTypes}lastLoadOptions(){return this._lastLoadOptions||{}}isLastPage(){return this._isLastPage}_dataSourceTotalCount(){return this._dataSource.totalCount()}_changeRowExpandCore(k){}changeRowExpand(k){}totalCount(){return parseInt((this._currentTotalCount||this._dataSourceTotalCount())+this._totalCountCorrection)}totalCountCorrection(){return this._totalCountCorrection}items(){}itemsCount(){return this._dataSource.items().length}totalItemsCount(){return this.totalCount()}pageSize(){const k=this._dataSource;return arguments.length||k.paginate()?k.pageSize.apply(k,arguments):0}pageCount(){const k=this.totalItemsCount()-this._totalCountCorrection,U=this.pageSize();return U&&k>0?Math.max(1,Math.ceil(k/U)):1}hasKnownLastPage(){return this._hasLastPage||this._dataSource.totalCount()>=0}loadFromStore(k,U){const B=this._dataSource,K=new P.cY;if(B)return(U=U||B.store()).load(k).done((J,ie)=>{J&&!Array.isArray(J)&&Array.isArray(J.data)&&(ie=J,J=J.data),K.resolve(J,ie)}).fail(K.reject),K}isCustomLoading(){return!!this._isCustomLoading}load(k){const U=this,B=U._dataSource,K=new P.cY;if(k){const J=B.store(),ie=B.loadOptions(),re={storeLoadOptions:(0,b.X)({},k,{langParams:ie?.langParams}),isCustomLoading:!0};return(0,f.__)(J._customLoadOptions()||[],(q,Y)=>{Y in re.storeLoadOptions||(re.storeLoadOptions[Y]=ie[Y])}),this._isLoadingAll=k.isLoadingAll,U._scheduleCustomLoadCallbacks(K),B._scheduleLoadCallbacks(K),U._handleCustomizeStoreLoadOptions(re),function(G,k){(0,S.O9)(k)?(0,o.uG)(G,k):G()}(()=>{if(!B.store())return K.reject("canceled");(0,P.z7)(re.data||U.loadFromStore(re.storeLoadOptions)).done((q,Y)=>{re.data=q,re.extra=Y||{},U._handleDataLoaded(re),k.requireTotalCount&&void 0===re.extra.totalCount&&(re.extra.totalCount=J.totalCount(re.storeLoadOptions)),(0,P.z7)(re.data,re.extra.totalCount).done((Z,Q)=>{re.extra.totalCount=Q,K.resolve(Z,re.extra)}).fail(K.reject)}).fail(K.reject)},U.option("loadingTimeout")),K.fail(function(){U._eventsStrategy.fireEvent("loadError",arguments)}).always(()=>{this._isLoadingAll=!1}).promise()}return B.load()}reload(k){return k?this._dataSource.reload():this._dataSource.load()}getCachedStoreData(){return this._cachedStoreData}isLoaded(){}pageIndex(k){}}},6253:(In,Ze,M)=>{"use strict";M.d(Ze,{A2:()=>be,AV:()=>C,BL:()=>S,BX:()=>ee,CA:()=>K,CN:()=>h,D9:()=>s,G3:()=>T,HG:()=>Ee,Lb:()=>ve,MN:()=>q,Mc:()=>z,Mw:()=>G,NT:()=>ye,OM:()=>pe,OQ:()=>Oe,Os:()=>N,Q6:()=>Y,QN:()=>st,Qz:()=>c,VQ:()=>Ue,X9:()=>Q,Xe:()=>I,Xh:()=>te,Z8:()=>ze,Zm:()=>le,aT:()=>Ke,al:()=>Pe,bO:()=>oe,cK:()=>Ye,cy:()=>x,do:()=>y,dx:()=>de,eN:()=>w,gJ:()=>Z,gM:()=>ge,gU:()=>f,gn:()=>g,iK:()=>ue,iq:()=>$e,jP:()=>he,kd:()=>d,lR:()=>et,nN:()=>k,oJ:()=>Ce,oX:()=>D,pO:()=>U,pR:()=>L,qB:()=>fe,qR:()=>B,r8:()=>xe,sN:()=>P,se:()=>u,su:()=>o,tp:()=>a,uz:()=>b,vo:()=>ot,vw:()=>Te,wi:()=>J,yP:()=>re,yQ:()=>ie,yu:()=>ae,yx:()=>_});var W=M(4602);const o="dx-editor-cell",P="dx-row",b="dx-cell-modified",f="dx-selection",S="edit-form",T="insert",y="remove",d="editing.popup",c="editing.form",s="editing.editRowKey",a="editing.editColumnName",u="targetComponent",h="input:not([type='hidden'])",g=`[tabindex]:not([disabled]), ${h}:not([disabled])`,_="batch",x="row",w="cell",D="form",C="popup",I="first",L="last",N="pageBottom",G="pageTop",k="viewportBottom",U="viewportTop",B=["batch","row","cell","form","popup"],K=["row","form","popup"],J=["batch","cell"],ie=["batch","row","cell"],re=["row","form"],q="readonly",Y="dx-link",Z="dx-link-icon",Q="dx-selection",te="dx-edit-button",pe="dx-command-edit",z="dx-command-edit-with-icons",oe="__DX_INSERT_INDEX__",ae="dx-row-inserted",ee="dx-row-modified",he="dx-cell-modified",de="dxDataGridEditing",ue="dx-cell-focus-disabled",be="update",ve="click",le={save:"dx-link-save",cancel:"dx-link-cancel",edit:"dx-link-edit",undelete:"dx-link-undelete",delete:"dx-link-delete",add:"dx-link-add"},Ce={save:"save",cancel:"revert",edit:"edit",undelete:"revert",delete:"trash",add:"add"},ye={edit:"editRow",delete:"deleteRow",undelete:"undeleteRow",save:"saveEditData",cancel:"cancelEditData",add:"addRowByRowIndex"},ge={add:"allowAdding",edit:"allowUpdating",delete:"allowDeleting"},fe=["edit","save","cancel","delete","undelete"],xe="editing.changes",Te="focus-overlay",Ee="addrow-button",Oe="dx-dropdowneditor-overlay",ze="dx-data-row",$e="dx-row-removed",Ue="edit-form-item",ot="edit-popup",st="edit-popup-form",et=W.A.IS_RENOVATED_WIDGET?"dx-scrollable":"dx-scrollable-container",Ke="dx-button",Ye="form-buttons-container",Pe="dx-edit-row"},8970:(In,Ze,M)=>{"use strict";M.d(Ze,{B:()=>K,l:()=>re});var W=M(5737),o=M(5973),P=M(6054),b=M(2925),f=M(5704),S=M(4859),T=M(6021),y=M(1832),d=M(3090),c=M(8535),s=M(2660),a=M(6509),u=M(1830),h=M(2946),g=M(778),_=M(4072),x=M(9209),w=M(1110),D=M(9293),C=M(8360),I=M(8761),L=M(9212),N=M(3376),G=M(8736),k=M(6253),U=M(5572);const K=q=>class extends q{reload(Y,Z){return!Z&&this._editingController.refresh(),super.reload.apply(this,arguments)}repaintRows(){if(!this._editingController.isSaving())return super.repaintRows.apply(this,arguments)}_updateEditRow(Y){const Z=this.option(k.D9),te=Y[G.A.getIndexByKey(Z,Y)];var pe;te&&(te.isEditing=!0,null===(pe=this._updateEditItem)||void 0===pe||pe.call(this,te))}_updateItemsCore(Y){super._updateItemsCore(Y),this._updateEditRow(this.items(!0))}_applyChangeUpdate(Y){this._updateEditRow(Y.items),super._applyChangeUpdate(Y)}_applyChangesOnly(Y){this._updateEditRow(Y.items),super._applyChangesOnly(Y)}_processItems(Y,Z){return Y=this._editingController.processItems(Y,Z),super._processItems(Y,Z)}_processDataItem(Y,Z){return this._editingController.processDataItem(Y,Z,this.generateDataValues),super._processDataItem(Y,Z)}_processItem(Y,Z){return(Y=super._processItem(Y,Z)).isNewRow&&(Z.dataIndex--,delete Y.dataIndex),Y}_getChangedColumnIndices(Y,Z,Q,te){if(Y.isNewRow===Z.isNewRow&&Y.removed===Z.removed)return super._getChangedColumnIndices.apply(this,arguments)}_isCellChanged(Y,Z,Q,te,pe){const z=Y.cells&&Y.cells[te],oe=this._editingController&&this._editingController.isEditCell(Q,te);return(!pe||!oe)&&(!(!z||!z.column||z.column.showEditorAlways||z.isEditing===oe)||super._isCellChanged.apply(this,arguments))}needToRefreshOnDataSourceChange(Y){return!(Array.isArray(Y.value)&&Y.value===Y.previousValue&&this._editingController.isSaving())}_handleDataSourceChange(Y){const Z=super._handleDataSourceChange(Y),Q=this.option("editing.changes"),te=Y.value;if(Array.isArray(te)&&Q.length){const pe=te.map(ee=>this.keyOf(ee)),z=Q.filter(ee=>"insert"===ee.type||pe.some(he=>(0,S.RL)(ee.key,he)));z.length!==Q.length&&this.option("editing.changes",z);const oe=this.option("editing.editRowKey");!z.some(ee=>"insert"===ee.type&&(0,S.RL)(oe,ee.key))&&pe.every(ee=>!(0,S.RL)(oe,ee))&&this.option("editing.editRowKey",null)}return Z}},re={defaultOptions:()=>({editing:{mode:"row",refreshMode:"full",newRowPosition:k.pO,allowAdding:!1,allowUpdating:!1,allowDeleting:!1,useIcons:!1,selectTextOnEditStart:!1,confirmDelete:!0,texts:{editRow:C.A.format("dxDataGrid-editingEditRow"),saveAllChanges:C.A.format("dxDataGrid-editingSaveAllChanges"),saveRowChanges:C.A.format("dxDataGrid-editingSaveRowChanges"),cancelAllChanges:C.A.format("dxDataGrid-editingCancelAllChanges"),cancelRowChanges:C.A.format("dxDataGrid-editingCancelRowChanges"),addRow:C.A.format("dxDataGrid-editingAddRow"),deleteRow:C.A.format("dxDataGrid-editingDeleteRow"),undeleteRow:C.A.format("dxDataGrid-editingUndeleteRow"),confirmDeleteMessage:C.A.format("dxDataGrid-editingConfirmDeleteMessage"),confirmDeleteTitle:""},form:{colCount:2},popup:{},startEditAction:"click",editRowKey:null,editColumnName:null,changes:[]},useLegacyColumnButtonTemplate:!1}),controllers:{editing:class B extends N.Ay.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._validatingController=this.getController("validating"),this._editorFactoryController=this.getController("editorFactory"),this._focusController=this.getController("focus"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._columnsResizerController=this.getController("columnsResizer"),this._errorHandlingController=this.getController("errorHandling"),this._rowsView=this.getView("rowsView"),this._headerPanelView=this.getView("headerPanel"),this._lastOperation=null,this._changes=[],this._deferreds&&this._deferreds.forEach(Y=>{Y.reject("cancel")}),this._deferreds=[],this._dataChangedHandler||(this._dataChangedHandler=this._handleDataChanged.bind(this),this._dataController.changed.add(this._dataChangedHandler)),this._saveEditorHandler||(this.createAction("onInitNewRow",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserting",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserted",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditingStart",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdating",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdated",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceling",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceled",{excludeValidators:["disabled","readOnly"]})),this._updateEditColumn(),this._updateEditButtons(),this._internalState||(this._internalState=[]),this.component._optionsByReference[k.D9]=!0,this.component._optionsByReference[k.r8]=!0}getEditMode(){const Y=this.option("editing.mode")??k.cy;return k.qR.includes(Y)?Y:k.cy}isCellBasedEditMode(){const Y=this.getEditMode();return k.wi.includes(Y)}_getDefaultEditorTemplate(){return(Y,Z)=>{const Q=(0,f.A)("<div>").appendTo(Y),te=(0,d.X)({},Z.column,{value:Z.value,setValue:Z.setValue,row:Z.row,parentType:"dataRow",width:null,readOnly:!Z.setValue,isOnForm:Z.isOnForm,id:Z.id});k.yQ.includes(this.getEditMode())&&(te["aria-labelledby"]=Z.column.headerId),this._editorFactoryController.createEditor(Q,te)}}_getNewRowPosition(){const Y=this.option("editing.newRowPosition");if("virtual"===this.option("scrolling.mode"))switch(Y){case k.Mw:return k.pO;case k.Os:return k.nN;default:return Y}return Y}getChanges(){return this.option(k.r8)}getInsertRowCount(){return this.option(k.r8).filter(Z=>"insert"===Z.type).length}resetChanges(){const Y=this.getChanges();Y?.length&&this._silentOption(k.r8,[])}_getInternalData(Y){return this._internalState.filter(Z=>(0,S.RL)(Z.key,Y))[0]}_addInternalData(Y){const Z=this._getInternalData(Y.key);return Z?(0,d.X)(Z,Y):(this._internalState.push(Y),Y)}_getOldData(Y){var Z;return null===(Z=this._getInternalData(Y))||void 0===Z?void 0:Z.oldData}getUpdatedData(Y){const Z=this._dataController.keyOf(Y),Q=this.getChanges(),te=G.A.getIndexByKey(Z,Q);return Q[te]?(0,h.lj)(Y,Q[te].data):Y}getInsertedData(){return this.getChanges().filter(Y=>Y.data&&Y.type===k.G3).map(Y=>Y.data)}getRemovedData(){return this.getChanges().filter(Y=>this._getOldData(Y.key)&&Y.type===k.do).map(Y=>this._getOldData(Y.key))}_fireDataErrorOccurred(Y){if("cancel"===Y)return;const Z=this.getPopupContent();this._dataController.dataErrorOccurred.fire(Y,Z)}_needToCloseEditableCell(Y){}_closeEditItem(Y){}_handleDataChanged(Y){}_isDefaultButtonVisible(Y,Z){let Q=!0;switch(Y.name){case"delete":Q=this.allowDeleting(Z);break;case"undelete":Q=!1}return Q}isPopupEditMode(){return this.option("editing.mode")===k.AV}_isButtonVisible(Y,Z){const{visible:Q}=Y;return(0,u.O9)(Q)?(0,u.Tn)(Q)?Q.call(Y,{component:Z.component,row:Z.row,column:Z.column}):Q:this._isDefaultButtonVisible(Y,Z)}_isButtonDisabled(Y,Z){const{disabled:Q}=Y;return(0,u.Tn)(Q)?Q.call(Y,{component:Z.component,row:Z.row,column:Z.column}):!!Q}_getButtonConfig(Y,Z){const Q=(0,u.Gv)(Y)?Y:{},te=(0,U.i_)(Y),pe=(0,U.N5)(Z),z=k.NT[te],oe=this.option("editing"),ae=k.gM[te],ee=!ae||oe[ae];return(0,d.X)({name:te,text:pe[te],cssClass:k.Zm[te]},{onClick:z&&(he=>{const{event:de}=he;de.stopPropagation(),de.preventDefault(),setTimeout(()=>{Z.row&&ee&&this[z]&&this[z](Z.row.rowIndex)})})},Q)}_getEditingButtons(Y){let Z;const Q=!!Y.column.buttons;let te=(Y.column.buttons||[]).slice();return Q?(Z=(0,U.nh)(te,"edit"),Z>=0&&((0,U.nh)(te,"save")<0&&te.splice(Z+1,0,"save"),(0,U.nh)(te,"cancel")<0&&te.splice((0,U.nh)(te,"save")+1,0,"cancel")),Z=(0,U.nh)(te,"delete"),Z>=0&&(0,U.nh)(te,"undelete")<0&&te.splice(Z+1,0,"undelete")):te=k.qB.slice(),te.map(pe=>this._getButtonConfig(pe,Y))}_renderEditingButtons(Y,Z,Q,te){Z.forEach(pe=>{this._isButtonVisible(pe,Q)&&this._createButton(Y,pe,Q,te)})}_getEditCommandCellTemplate(){return(Y,Z,Q)=>{const te=(0,f.A)(Y);if("data"===Z.rowType){const pe=this._getEditingButtons(Z);if(this._renderEditingButtons(te,pe,Z,Q),Z.watch){const z=Z.watch(()=>pe.map(oe=>({visible:this._isButtonVisible(oe,Z),disabled:this._isButtonDisabled(oe,Z)})),()=>{te.empty(),this._renderEditingButtons(te,pe,Z)});_.A.on(te,w.N,z)}}else G.A.setEmptyText(te)}}isRowBasedEditMode(){const Y=this.getEditMode();return k.CA.includes(Y)}getFirstEditableColumnIndex(){let Y;const Z=this._columnsController.getVisibleColumns();return(0,s.__)(Z,(Q,te)=>{if(te.allowEditing)return Y=Q,!1}),Y}getFirstEditableCellInRow(Y){var Z;const Q=this.getFirstEditableColumnIndex();return null===(Z=this._rowsView)||void 0===Z?void 0:Z._getCellElement(Y||0,Q)}getFocusedCellInRow(Y){return this.getFirstEditableCellInRow(Y)}getIndexByKey(Y,Z){return G.A.getIndexByKey(Y,Z)}hasChanges(Y){const Z=this.getChanges();let Q=!1;for(let te=0;te<Z?.length;te++)if(Z[te].type&&(!(0,u.O9)(Y)||this._dataController.getRowIndexByKey(Z[te].key)===Y)){Q=!0;break}return Q}dispose(){super.dispose(),clearTimeout(this._inputFocusTimeoutID),_.A.off(P.A.getDocument(),x.A.up,this._pointerUpEditorHandler),_.A.off(P.A.getDocument(),x.A.down,this._pointerDownEditorHandler),_.A.off(P.A.getDocument(),g.U,this._saveEditorHandler)}_silentOption(Y,Z){"editing.changes"===Y&&(this._changes=(0,a.tm)([],Z)),super._silentOption(Y,Z)}optionChanged(Y){if("editing"===Y.name){const{fullName:Z}=Y;Z===k.D9?this._handleEditRowKeyChange(Y):Z===k.r8?(0,S.RL)(Y.value,this._changes,{maxDepth:4})||(this._changes=(0,a.tm)([],Y.value),this._handleChangesChange(Y)):Y.handled||(this._columnsController.reinit(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey()),Y.handled=!0}else super.optionChanged(Y)}_handleEditRowKeyChange(Y){const Z=this._dataController.getRowIndexByKey(Y.value),Q=this._getEditRowIndexCorrection(),te=this._dataController.getRowIndexByKey(Y.previousValue)+Q;(0,u.O9)(Y.value)?Y.value!==Y.previousValue&&this._editRowFromOptionChanged(Z,te):this.cancelEditData()}_handleChangesChange(Y){const Z=this._dataController;!Y.value.length&&!Y.previousValue.length||(Y.value.forEach(te=>{if("insert"===te.type)this._addInsertInfo(te);else{var pe;const z=Z.getCachedStoreData()||(null===(pe=Z.items())||void 0===pe?void 0:pe.map(ae=>ae.data)),oe=G.A.getIndexByKey(te.key,z,Z.key());this._addInternalData({key:te.key,oldData:z[oe]})}}),Z.updateItems({repaintChangesOnly:!0,isLiveUpdate:!1,isOptionChanged:!0}))}publicMethods(){return["addRow","deleteRow","undeleteRow","editRow","saveEditData","cancelEditData","hasEditData"]}refresh(){(0,u.O9)(this._pageIndex)&&this._refreshCore.apply(this,arguments)}_refreshCore(Y){}isEditing(){return(0,u.O9)(this.option(k.D9))}isEditRow(Y){return!1}_setEditRowKey(Y,Z){Z?this._silentOption(k.D9,Y):this.option(k.D9,Y),this._refocusEditCell&&(this._refocusEditCell=!1,this._focusEditingCell())}_setEditRowKeyByIndex(Y,Z){const Q=this._dataController.getKeyByRowIndex(Y);void 0!==Q?this._setEditRowKey(Q,Z):this._dataController.fireError("E1043")}getEditRowIndex(){return this._getVisibleEditRowIndex()}getEditFormRowIndex(){return-1}isEditRowByIndex(Y){const Z=this._dataController.getKeyByRowIndex(Y);return(0,u.O9)(Z)&&(0,S.RL)(this.option(k.D9),Z)&&this._getVisibleEditRowIndex()===Y}isEditCell(Y,Z){return this.isEditRowByIndex(Y)&&this._getVisibleEditColumnIndex()===Z}getPopupContent(){}_isProcessedItem(Y){return!1}_getInsertRowIndex(Y,Z,Q){let te=-1;const pe=this._dataController,z=this._getInsertAfterOrBeforeKey(Z);return(0,u.O9)(z)||0!==Y.length?(0,u.O9)(z)&&Y.some((oe,ae)=>{const ee=Q||this._isProcessedItem(oe);if((0,u.Gv)(oe)&&(ee||(0,u.O9)(oe[k.bO])?(0,S.RL)(oe.key,z)&&(te=ae):(0,S.RL)(pe.keyOf(oe),z)&&(te=ae)),te>=0){const he=Y[te+1];return he&&("detail"===he.rowType||"detailAdaptive"===he.rowType)&&(0,u.O9)(Z.insertAfterKey)?void 0:((0,u.O9)(Z.insertAfterKey)&&(te+=1),!0)}}):te=0,te}_generateNewItem(Y){var Z;const Q={key:Y},te=null===(Z=this._getInternalData(Y))||void 0===Z?void 0:Z.insertInfo;return null!=te&&te[k.bO]&&(Q[k.bO]=te[k.bO]),Q}_getLoadedRowIndex(Y,Z,Q){let te=this._getInsertRowIndex(Y,Z,Q);const pe=this._dataController;if(te<0){const z=this._getNewRowPosition(),oe=pe.pageIndex(),ae=this._getInsertAfterOrBeforeKey(Z);z===k.pR||0!==oe||(0,u.O9)(ae)?z===k.pR&&pe.isLastPageLoaded()&&(te=Y.length):te=0}return te}processItems(Y,Z){const{changeType:Q}=Z;return this.update(Q),this.getChanges().forEach(pe=>{var z;if(pe.type!==k.G3)return;let{key:ae}=pe,ee=null===(z=this._getInternalData(ae))||void 0===z?void 0:z.insertInfo;(!(0,u.O9)(ae)||!(0,u.O9)(ee))&&(ee=this._addInsertInfo(pe),ae=ee.key);const he=this._getLoadedRowIndex(Y,pe),de=this._generateNewItem(ae);he>=0&&Y.splice(he,0,de)}),Y}processDataItem(Y,Z,Q){const te=Z.visibleColumns,pe=Y.data[k.bO]?Y.data.key:Y.key,z=this.getChanges(),oe=G.A.getIndexByKey(pe,z);Y.isEditing=!1,oe>=0&&this._processDataItemCore(Y,z[oe],pe,te,Q)}_processDataItemCore(Y,Z,Q,te,pe){const{data:z,type:oe}=Z;switch(oe){case k.G3:Y.isNewRow=!0,Y.key=Q,Y.data=z;break;case k.A2:Y.modified=!0,Y.oldData=Y.data,Y.data=(0,h.lj)(Y.data,z),Y.modifiedValues=pe(z,te,!0);break;case k.do:Y.removed=!0}}_initNewRow(Y){if(this.executeAction("onInitNewRow",Y),Y.promise){const Z=new T.cY;return(0,T.z7)((0,T.Sx)(Y.promise)).done(Z.resolve).fail((0,U.HQ)(Z)).fail(Q=>this._fireDataErrorOccurred(Q)),Z}}_createInsertInfo(){const Y={};return Y[k.bO]=this._getInsertIndex(),Y}_addInsertInfo(Y,Z){var Q;let te;Y.key=this.getChangeKeyValue(Y);const{key:pe}=Y;if(te=null===(Q=this._getInternalData(pe))||void 0===Q?void 0:Q.insertInfo,!(0,u.O9)(te)){const z=this._getInsertAfterOrBeforeKey(Y);te=this._createInsertInfo(),(0,u.O9)(z)||this._setInsertAfterOrBeforeKey(Y,Z)}return this._addInternalData({insertInfo:te,key:pe}),{insertInfo:te,key:pe}}getChangeKeyValue(Y){if((0,u.O9)(Y.key))return Y.key;const Z=this._dataController.key();let Q;return Y.data&&Z&&!Array.isArray(Z)&&(Q=Y.data[Z]),(0,u.O9)(Q)||(Q=(0,U.fV)()),Q}_setInsertAfterOrBeforeKey(Y,Z){const Q=this.getView("rowsView"),te=this._dataController,pe=te.items(!0),z=this._getNewRowPosition();switch(z){case k.Xe:case k.pR:break;case k.Mw:case k.Os:if(pe.length){const oe=z===k.Mw?0:pe.length-1;Y[0===oe?"insertBeforeKey":"insertAfterKey"]=pe[oe].key}break;default:{let ae=z===k.nN?Q?.getBottomVisibleItemIndex():Q?.getTopVisibleItemIndex();const ee=te.getVisibleRows()[ae];ee&&(!ee.isEditing&&"detail"===ee.rowType||"detailAdaptive"===ee.rowType)&&ae++;const he=te.getKeyByRowIndex(ae);(0,u.O9)(he)&&(Y.insertBeforeKey=he)}}}_getInsertIndex(){let Y=0;return this.getChanges().forEach(Z=>{var Q;const te=null===(Q=this._getInternalData(Z.key))||void 0===Q?void 0:Q.insertInfo;(0,u.O9)(te)&&Z.type===k.G3&&te[k.bO]>Y&&(Y=te[k.bO])}),Y+1}_getInsertAfterOrBeforeKey(Y){return Y.insertAfterKey??Y.insertBeforeKey}_getPageIndexToInsertRow(){const Y=this._getNewRowPosition(),Z=this._dataController,Q=Z.pageIndex(),te=Z.pageCount()-1;return Y===k.Xe&&0!==Q?0:Y===k.pR&&Q!==te?te:-1}addRow(Y){const Z=this._dataController;return Z.store()?this._addRow(Y):(Z.fireError("E1052",this.component.NAME),(new T.cY).reject())}_addRow(Y){const Q=this._dataController.store(),te=Q&&Q.key(),pe={data:{}},z=this._getVisibleEditRowIndex(),oe=new T.cY;return this.refresh({allowCancelEditing:!0}),this._allowRowAdding()?(te||(pe.data.__KEY__=String(new b.A)),(0,T.z7)(this._initNewRow(pe,Y)).done(()=>{this._allowRowAdding()?(0,T.z7)(this._addRowCore(pe.data,Y,z)).done(oe.resolve).fail(oe.reject):oe.reject("cancel")}).fail(oe.reject),oe.promise()):((0,T.z7)(this._navigateToNewRow(z)).done(oe.resolve).fail(oe.reject),oe.promise())}_allowRowAdding(Y){return!(this._getInsertIndex()>1)}_addRowCore(Y,Z,Q){const te={data:Y,type:k.G3},pe=this._getVisibleEditRowIndex(),z=this._addInsertInfo(te,Z),{key:oe}=z;return this._setEditRowKey(oe,!0),this._addChange(te),this._navigateToNewRow(Q,te,pe)}_navigateToNewRow(Y,Z,Q){const te=new T.cY,pe=this._dataController;if(Q=Q??-1,!(Z=Z??this.getChanges().filter(he=>he.type===k.G3)[0]))return te.reject("cancel").promise();const z=this._getPageIndexToInsertRow();let oe=this._getLoadedRowIndex(pe.items(),Z,!0);const ae=he=>{var de;(0,T.z7)(null===(de=this._focusController)||void 0===de?void 0:de.navigateToRow(he)).done(()=>{oe=pe.getRowIndexByKey(Z.key),te.resolve()})},ee=this._getInsertAfterOrBeforeKey(Z);return z>=0?pe.pageIndex(z).done(()=>{ae(Z.key)}).fail(te.reject):oe<0&&(0,u.O9)(ee)?ae(ee):(pe.updateItems({changeType:"update",rowIndices:[Y,Q,oe]}),oe=pe.getRowIndexByKey(Z.key),oe<0?ae(Z.key):te.resolve()),te.done(()=>{var he;null===(he=this._rowsView)||void 0===he||he.waitAsyncTemplates(!0).done(()=>{this._showAddedRow(oe),this._afterInsertRow(Z.key)})}),te.promise()}_showAddedRow(Y){this._focusFirstEditableCellInRow(Y)}_beforeFocusElementInRow(Y){}_focusFirstEditableCellInRow(Y){var Z;const Q=this._dataController,te=Q.getKeyByRowIndex(Y),pe=this.getFirstEditableCellInRow(Y);null===(Z=this._keyboardNavigationController)||void 0===Z||Z.focus(pe),this.option("focusedRowKey",te),this._editCellInProgress=!0,this._delayedInputFocus(pe,()=>{Y=Q.getRowIndexByKey(te),this._editCellInProgress=!1,this._beforeFocusElementInRow(Y)})}_isEditingStart(Y){return this.executeAction("onEditingStart",Y),Y.cancel}_beforeUpdateItems(Y,Z){}_getVisibleEditColumnIndex(){const Y=this.option(k.tp);return(0,u.O9)(Y)?this._columnsController.getVisibleColumnIndex(Y):-1}_setEditColumnNameByIndex(Y,Z){var Q;const te=this._columnsController.getVisibleColumns();this._setEditColumnName(null===(Q=te[Y])||void 0===Q?void 0:Q.name,Z)}_setEditColumnName(Y,Z){Z?this._silentOption(k.tp,Y):this.option(k.tp,Y)}_resetEditColumnName(){this._setEditColumnName(null,!0)}_getEditColumn(){const Y=this.option(k.tp);return this._getColumnByName(Y)}_getColumnByName(Y){const Z=this._columnsController.getVisibleColumns();let Q;return(0,u.O9)(Y)&&Z.some(te=>{if(te.name===Y)return Q=te,!0}),Q}_getVisibleEditRowIndex(Y){const Z=this._dataController,Q=this.option(k.D9),te=Z.getRowIndexByKey(Q);return-1===te?te:te+this._getEditRowIndexCorrection(Y)}_getEditRowIndexCorrection(Y){const Z=Y?this._getColumnByName(Y):this._getEditColumn();return"adaptiveHidden"===Z?.visibleWidth?1:0}_resetEditRowKey(){this._refocusEditCell=!1,this._setEditRowKey(null,!0)}_resetEditIndices(){this._resetEditColumnName(),this._resetEditRowKey()}editRow(Y){const Z=this._dataController,te=Z.items()[Y],pe={data:te&&te.data,cancel:!1},z=this._getVisibleEditRowIndex();if(te){if(Y===z)return!0;if(void 0===te.key)return void this._dataController.fireError("E1043");te.isNewRow||(pe.key=te.key),!this._isEditingStart(pe)&&(this.resetChanges(),this.init(),this._resetEditColumnName(),this._pageIndex=Z.pageIndex(),this._addInternalData({key:te.key,oldData:te.oldData??te.data}),this._setEditRowKey(te.key))}}_editRowFromOptionChanged(Y,Z){const Q=[Z,Y];this._beforeUpdateItems(Q,Y,Z),this._editRowFromOptionChangedCore(Q,Y)}_editRowFromOptionChangedCore(Y,Z,Q){this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:Y,cancel:Q})}_focusEditorIfNeed(){}_showEditPopup(Y,Z){}_repaintEditPopup(){}_getEditPopupHiddenHandler(){return Y=>{this.isEditing()&&this.cancelEditData()}}_getPopupEditFormTemplate(Y){}_getSaveButtonConfig(){const Y={text:this.option("editing.texts.saveRowChanges"),onClick:this.saveEditData.bind(this)};return(0,L.Ft)((0,L.ss)())&&(Y.stylingMode="contained",Y.type="default"),Y}_getCancelButtonConfig(){const Y={text:this.option("editing.texts.cancelRowChanges"),onClick:this.cancelEditData.bind(this)};return(0,L.Ft)((0,L.ss)())&&(Y.stylingMode="outlined"),Y}_removeInternalData(Y){const Z=this._getInternalData(Y),Q=this._internalState.indexOf(Z);Q>-1&&this._internalState.splice(Q,1)}_updateInsertAfterOrBeforeKeys(Y,Z){const Q=Y[Z];Y.forEach(te=>{const pe=this._getInsertAfterOrBeforeKey(te);(0,S.RL)(pe,Q.key)&&(te[(0,u.O9)(te.insertAfterKey)?"insertAfterKey":"insertBeforeKey"]=this._getInsertAfterOrBeforeKey(Q))})}_removeChange(Y){if(Y>=0){const Z=[...this.getChanges()],{key:Q}=Z[Y];this._removeInternalData(Q),this._updateInsertAfterOrBeforeKeys(Z,Y),Z.splice(Y,1),this._silentOption(k.r8,Z),(0,S.RL)(this.option(k.D9),Q)&&this._resetEditIndices()}}executeOperation(Y,Z){this._lastOperation&&this._lastOperation.reject(),this._lastOperation=Y,this.waitForDeferredOperations().done(()=>{"rejected"!==Y.state()&&(Z(),this._lastOperation=null)}).fail(()=>{Y.reject(),this._lastOperation=null})}waitForDeferredOperations(){return(0,T.z7)(...this._deferreds)}_processCanceledEditingCell(){}_repaintEditCell(Y,Z,Q){!Y||!Y.showEditorAlways||Z&&!Z.showEditorAlways?(this._editCellInProgress=!0,this._needFocusEditor=!0,this._editorFactoryController.loseFocus(),this._dataController.updateItems({changeType:"update",rowIndices:[Q,this._getVisibleEditRowIndex()]})):Y!==Z&&(this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:[]}))}_delayedInputFocus(Y,Z,Q){const te=()=>{if(Z&&Z(),Y){const pe=Y.find(k.gn).first();G.A.focusAndSelectElement(this,pe)}this._beforeFocusCallback=null};o.A.real().ios||o.A.real().android?te():(this._beforeFocusCallback&&this._beforeFocusCallback(),clearTimeout(this._inputFocusTimeoutID),Q&&(this._beforeFocusCallback=Z),this._inputFocusTimeoutID=setTimeout(te))}_focusEditingCell(Y,Z,Q){const te=this._getVisibleEditColumnIndex();(Z=Z||this._rowsView&&this._rowsView._getCellElement(this._getVisibleEditRowIndex(),te))&&this._delayedInputFocus(Z,Y,Q)}deleteRow(Y){this._checkAndDeleteRow(Y)}_checkAndDeleteRow(Y){const Z=this.option("editing"),Q=Z?.texts,te=Z?.confirmDelete,pe=Q?.confirmDeleteMessage,z=this._dataController.items()[Y],oe=!this.isEditing()||z.isNewRow;if(z&&oe)if(te&&pe){const ae=Q&&Q.confirmDeleteTitle,ee=(0,u.O9)(ae)&&ae.length>0;(0,I.lJ)(pe,ae,ee).done(he=>{he&&this._deleteRowCore(Y)})}else this._deleteRowCore(Y)}_deleteRowCore(Y){const Q=this._dataController.items()[Y],te=Q&&Q.key,pe=this._getVisibleEditRowIndex();this.refresh();const z=this.getChanges(),oe=G.A.getIndexByKey(te,z);return oe>=0?z[oe].type===k.G3?this._removeChange(oe):this._addChange({key:te,type:k.do}):this._addChange({key:te,oldData:Q.data,type:k.do}),this._afterDeleteRow(Y,pe)}_afterDeleteRow(Y,Z){return this.saveEditData()}undeleteRow(Y){const Z=this._dataController,Q=Z.items()[Y],te=this._getVisibleEditRowIndex(),pe=Q&&Q.key,z=this.getChanges();if(Q){const oe=G.A.getIndexByKey(pe,z);if(oe>=0){const{data:ae}=z[oe];(0,u.RI)(ae)?this._removeChange(oe):this._addChange({key:pe,type:k.A2}),Z.updateItems({changeType:"update",rowIndices:[te,Y]})}}}_fireOnSaving(){const Y={cancel:!1,promise:null,changes:[...this.getChanges()]};this.executeAction("onSaving",Y);const Z=new T.cY;return(0,T.z7)((0,T.Sx)(Y.promise)).done(()=>{Z.resolve(Y)}).fail(Q=>{(0,U.HQ)(Z),this._fireDataErrorOccurred(Q),Z.resolve({cancel:!0})}),Z}_executeEditingAction(Y,Z,Q){if(this.component._disposed)return null;const te=new T.cY;return this.executeAction(Y,Z),(0,T.z7)((0,T.Sx)(Z.cancel)).done(pe=>{pe?setTimeout(()=>{te.resolve("cancel")}):Q(Z).done(te.resolve).fail((0,U.HQ)(te))}).fail((0,U.HQ)(te)),te}_processChanges(Y,Z,Q,te){const pe=this._dataController.store();(0,s.__)(te,(z,oe)=>{const ae=this._getOldData(oe.key),{data:ee,type:he}=oe,de=(0,W.A)({},oe);let ue,be;if(!this._beforeSaveEditData(oe,z)){switch(he){case k.do:be={data:ae,key:oe.key,cancel:!1},ue=this._executeEditingAction("onRowRemoving",be,()=>pe.remove(oe.key).done(ve=>{Q.push({type:"remove",key:ve})}));break;case k.G3:be={data:ee,cancel:!1},ue=this._executeEditingAction("onRowInserting",be,()=>pe.insert(be.data).done((ve,le)=>{(0,u.O9)(le)&&(de.key=le),ve&&(0,u.Gv)(ve)&&ve!==be.data&&(de.data=ve),Q.push({type:"insert",data:ve,index:0})}));break;case k.A2:be={newData:ee,oldData:ae,key:oe.key,cancel:!1},ue=this._executeEditingAction("onRowUpdating",be,()=>pe.update(oe.key,be.newData).done((ve,le)=>{ve&&(0,u.Gv)(ve)&&ve!==be.newData&&(de.data=ve),Q.push({type:"update",key:le,data:ve})}))}if(te[z]=de,ue){const ve=new T.cY;ue.always(le=>{Z.push({key:oe.key,result:le})}).always(ve.resolve),Y.push(ve.promise())}}})}_processRemoveIfError(Y,Z){const Q=Y[Z];return Q?.type===k.do&&Z>=0&&Y.splice(Z,1),!0}_processRemove(Y,Z,Q){const te=Y[Z];if(!Q||!te||te.type===k.do)return this._processRemoveCore(Y,Z,!Q||!te)}_processRemoveCore(Y,Z,Q){return Z>=0&&Y.splice(Z,1),!0}_processSaveEditDataResult(Y){let Z=!1;const Q=[...this.getChanges()],te=Q.length;for(let pe=0;pe<Y.length;pe++){const z=Y[pe].result,oe="cancel"===z,ae=G.A.getIndexByKey(Y[pe].key,Q),ee=Q[ae];if(z&&z instanceof Error){if(ee&&this._addInternalData({key:ee.key,error:z}),this._fireDataErrorOccurred(z),this._processRemoveIfError(Q,ae))break}else this._processRemove(Q,ae,oe)&&(Z=!oe)}return Q.length<te&&this._silentOption(k.r8,Q),Z}_fireSaveEditDataEvents(Y){(0,s.__)(Y,(Z,Q)=>{let{data:te,key:pe,type:z}=Q;const oe=this._addInternalData({key:pe}),ae={key:pe,data:te};switch(oe.error&&(ae.error=oe.error),z){case k.do:this.executeAction("onRowRemoved",(0,d.X)({},ae,{data:oe.oldData}));break;case k.G3:this.executeAction("onRowInserted",ae);break;case k.A2:this.executeAction("onRowUpdated",ae)}}),this.executeAction("onSaved",{changes:Y})}saveEditData(){const Y=new T.cY;return this.waitForDeferredOperations().done(()=>{this.isSaving()?this._resolveAfterSave(Y):(0,T.z7)(this._beforeSaveEditData()).done(Z=>{Z?this._resolveAfterSave(Y,{cancel:Z}):(this._saving=!0,this._saveEditDataInner().always(()=>{this._saving=!1,this._refocusEditCell&&this._focusEditingCell()}).done(Y.resolve).fail(Y.reject))}).fail(Y.reject)}).fail(Y.reject),Y.promise()}_resolveAfterSave(Y){let{cancel:Z,error:Q}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,T.z7)(this._afterSaveEditData(Z)).done(()=>{Y.resolve(Q)}).fail(Y.reject)}_saveEditDataInner(){const Y=new T.cY,Z=[],Q=[],te=[],pe=this._dataController.dataSource();return(0,T.z7)(this._fireOnSaving()).done(z=>{let{cancel:oe,changes:ae}=z;return oe?Y.resolve().promise():(this._processChanges(Q,Z,te,ae),Q.length?(this._refocusEditCell=!0,pe?.beginLoading(),(0,T.z7)(...Q).done(()=>{this._processSaveEditDataResult(Z)?this._endSaving(te,ae,Y):(pe?.endLoading(),Y.resolve())}).fail(ee=>{pe?.endLoading(),Y.resolve(ee)}),Y.always(()=>{this._refocusEditCell=!0}).promise()):void this._cancelSaving(Y))}).fail(Y.reject),Y.promise()}_beforeEndSaving(Y){this._resetEditIndices()}_endSaving(Y,Z,Q){const te=this._dataController.dataSource();this._beforeEndSaving(Z),te?.endLoading(),this._refreshDataAfterSave(Y,Z,Q)}_cancelSaving(Y){this.executeAction("onSaved",{changes:[]}),this._resolveAfterSave(Y)}_refreshDataAfterSave(Y,Z,Q){const te=this._dataController,pe=this.option("editing.refreshMode"),z="reshape"!==pe&&"repaint"!==pe;z||te.push(Y),(0,T.z7)(te.refresh({selection:z,reload:z,load:"reshape"===pe,changesOnly:this.option("repaintChangesOnly")})).always(()=>{this._fireSaveEditDataEvents(Z)}).done(()=>{this._resolveAfterSave(Q)}).fail(oe=>{this._resolveAfterSave(Q,{error:oe})})}isSaving(){return this._saving}_updateEditColumn(){const Y=this._isEditColumnVisible(),Z=this.option("editing.useIcons"),Q=k.OM+(Z?` ${k.Mc}`:"");this._columnsController.addCommandColumn({type:"buttons",command:"edit",visible:Y,cssClass:Q,width:"auto",alignment:"center",cellTemplate:this._getEditCommandCellTemplate(),fixedPosition:"right"}),this._columnsController.columnOption("command:edit",{visible:Y,cssClass:Q})}_isEditColumnVisible(){return this.option("editing").allowDeleting}_isEditButtonDisabled(){const Y=this.hasChanges();return!((0,u.O9)(this.option("editing.editRowKey"))||Y)}_updateEditButtons(){const Y=this._isEditButtonDisabled();this._headerPanelView&&(this._headerPanelView.setToolbarItemDisabled("saveButton",Y),this._headerPanelView.setToolbarItemDisabled("revertButton",Y))}_applyModified(Y,Z){Y&&Y.addClass(k.jP)}_beforeCloseEditCellInBatchMode(Y){}cancelEditData(){const Y=this.getChanges(),Z={cancel:!1,changes:Y};this.executeAction("onEditCanceling",Z),Z.cancel||(this._cancelEditDataCore(),this.executeAction("onEditCanceled",{changes:Y}))}_cancelEditDataCore(){const Y=this._getVisibleEditRowIndex();this._beforeCancelEditData(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey(),this._afterCancelEditData(Y)}_afterCancelEditData(Y){this._dataController.updateItems({repaintChangesOnly:this.option("repaintChangesOnly")})}_hideEditPopup(){}hasEditData(){return this.hasChanges()}update(Y){const Z=this._dataController;Z&&this._pageIndex!==Z.pageIndex()&&("refresh"===Y&&this.refresh({isPageChanged:!0}),this._pageIndex=Z.pageIndex()),this._updateEditButtons()}_getRowIndicesForCascadeUpdating(Y,Z){return Z?[]:[Y.rowIndex]}addDeferred(Y){this._deferreds.includes(Y)||(this._deferreds.push(Y),Y.always(()=>{const Z=this._deferreds.indexOf(Y);Z>=0&&this._deferreds.splice(Z,1)}))}_prepareChange(Y,Z,Q){var te;const pe={},z=null===(te=Y.row)||void 0===te?void 0:te.data,oe=Y.key,ae=new T.cY;return void 0!==oe&&(Y.value=Z,(0,T.Sx)(Y.column.setCellValue(pe,Z,(0,d.X)(!0,{},z),Q)).done(()=>{ae.resolve({data:pe,key:oe,oldData:z,type:k.A2})}).fail((0,U.HQ)(ae)).fail(he=>this._fireDataErrorOccurred(he)),(0,u.O9)(Q)&&Y.column.displayValueMap&&(Y.column.displayValueMap[Z]=Q),this._updateRowValues(Y),this.addDeferred(ae)),ae}_updateRowValues(Y){if(Y.values){const Z=this._dataController,Q=Z.getRowIndexByKey(Y.key),te=Z.getVisibleRows()[Q];te&&(Y.row.values=te.values,Y.values=te.values),Y.values[Y.columnIndex]=Y.value}}updateFieldValue(Y,Z,Q,te){const pe=Y.key,z=new T.cY;return void 0===pe&&this._dataController.fireError("E1043"),Y.column.setCellValue?this._prepareChange(Y,Z,Q).done(oe=>{(0,T.z7)(this._applyChange(Y,oe,te)).always(()=>{z.resolve()})}):z.resolve(),z.promise()}_focusPreviousEditingCellIfNeed(Y){if(this.hasEditData()&&!this.isEditCell(Y.rowIndex,Y.columnIndex))return this._focusEditingCell(),this._updateEditRow(Y.row,!0),!0}_needUpdateRow(Y){const Z=this._columnsController.getVisibleColumns();Y||(Y=this._getEditColumn());const Q=Y&&Y.setCellValue!==Y.defaultSetCellValue,te=Z.some(pe=>pe.calculateCellValue!==pe.defaultCalculateCellValue);return Q||te}_applyChange(Y,Z,Q){const te=(0,W.A)({},Y,{forceUpdateRow:Q});return this._addChange(Z,te),this._updateEditButtons(),this._applyChangeCore(Y,te.forceUpdateRow)}_applyChangeCore(Y,Z){const Q=Y.column.setCellValue!==Y.column.defaultSetCellValue,{row:te}=Y;te&&(Z||Q?this._updateEditRow(te,Z,Q):te.update&&te.update())}_updateEditRowCore(Y,Z,Q){this._dataController.updateItems({changeType:"update",rowIndices:this._getRowIndicesForCascadeUpdating(Y,Z)})}_updateEditRow(Y,Z,Q){Z?this._updateRowImmediately(Y,Z,Q):this._updateRowWithDelay(Y,Q)}_updateRowImmediately(Y,Z,Q){this._updateEditRowCore(Y,!Z,Q),this._validateEditFormAfterUpdate(Y,Q),Z||this._focusEditingCell()}_updateRowWithDelay(Y,Z){const Q=new T.cY;this.addDeferred(Q),setTimeout(()=>{var te;const pe=(null===(te=this._editForm)||void 0===te?void 0:te.element())||this.component.$element().get(0),z=(0,f.A)(P.A.getActiveElement(pe)),oe=this._rowsView.getCellIndex(z,Y.rowIndex);let ae=z.get(0);const ee=G.A.getSelectionRange(ae);if(this._updateEditRowCore(Y,!1,Z),this._validateEditFormAfterUpdate(Y,Z),oe>=0){const he=this._rowsView._getCellElement(Y.rowIndex,oe);this._delayedInputFocus(he,()=>{setTimeout(()=>{var de;ae=P.A.getActiveElement(null===(de=this.component.$element())||void 0===de?void 0:de.get(0)),ee.selectionStart>=0&&G.A.setSelectionRange(ae,ee)})})}Q.resolve()})}_validateEditFormAfterUpdate(){}_addChange(Y,Z){var Q;const te=Z?.row,pe=[...this.getChanges()];let z=G.A.getIndexByKey(Y.key,pe);z<0&&(z=pe.length,this._addInternalData({key:Y.key,oldData:Y.oldData}),delete Y.oldData,pe.push(Y));const oe=(0,W.A)({},pe[z]);return oe&&(Y.data&&(oe.data=(0,h.lj)(oe.data,Y.data)),(!oe.type||!Y.data)&&Y.type&&(oe.type=Y.type),te&&(te.oldData=this._getOldData(te.key),te.data=(0,h.lj)(te.data,Y.data))),pe[z]=oe,this._silentOption(k.r8,pe),Z&&oe!==(null===(Q=this.getChanges())||void 0===Q?void 0:Q[z])&&(Z.forceUpdateRow=!0),oe}_getFormEditItemTemplate(Y,Z){return Z.editCellTemplate||this._getDefaultEditorTemplate()}getColumnTemplate(Y){const{column:Z}=Y,Q=Y.row&&Y.row.rowIndex;let te;const pe=this.isRowBasedEditMode(),z=this.isEditRow(Q),oe=this.isEditCell(Q,Y.columnIndex);let ae;return!(Z.showEditorAlways||Z.setCellValue&&(z&&Z.allowEditing||oe))||"data"!==Y.rowType&&"detailAdaptive"!==Y.rowType||Z.command?"detail"===Z.command&&"detail"===Y.rowType&&z&&(te=null==this?void 0:this.getEditFormTemplate(Y)):(((this.allowUpdating(Y)||z)&&Z.allowEditing||oe)&&(z||!pe)&&(Z.showEditorAlways&&!pe&&(ae={cancel:!1,key:Y.row.isNewRow?void 0:Y.row.key,data:Y.row.data,column:Z},this._isEditingStart(ae)),(!ae||!ae.cancel)&&(Y.setValue=(he,de)=>{this.updateFieldValue(Y,he,de)})),te=Z.editCellTemplate||this._getDefaultEditorTemplate()),te}_createButton(Y,Z,Q,te){let pe=k.oJ[Z.name];const z=this.option("editing.useIcons"),oe=this.option("useLegacyColumnButtonTemplate");let ae=(0,f.A)("<a>").attr("href","#").addClass(k.Q6).addClass(Z.cssClass);if(Z.template&&oe)this._rowsView.renderTemplate(Y,Z.template,Q,!0);else{if(Z.template)ae=(0,f.A)("<span>").addClass(Z.cssClass);else if(z&&pe||Z.icon){pe=Z.icon||pe;const ee=c.F(pe);"image"===ee||"svg"===ee?ae=c.N(pe).addClass(Z.cssClass):ae.addClass(`dx-icon${"dxIcon"===ee?"-":" "}${pe}`).attr("title",Z.text),ae.addClass(k.gJ),Y.addClass(k.Mc);const he=this.getButtonLocalizationNames()[Z.name];he&&ae.attr("aria-label",C.A.format(he))}else ae.text(Z.text);(0,u.O9)(Z.hint)&&ae.attr("title",Z.hint),this._isButtonDisabled(Z,Q)?ae.addClass("dx-state-disabled"):(!Z.template||Z.onClick)&&_.A.on(ae,(0,D.b4)("click",k.dx),this.createAction(ee=>{var he;null===(he=Z.onClick)||void 0===he||he.call(Z,(0,d.X)({},ee,{row:Q.row,column:Q.column})),ee.event.preventDefault(),ee.event.stopPropagation()})),Y.append(ae),Z.template&&(Q.renderAsync=!1,this._rowsView.renderTemplate(ae,Z.template,Q,!0,te))}}getButtonLocalizationNames(){return{edit:"dxDataGrid-editingEditRow",save:"dxDataGrid-editingSaveRowChanges",delete:"dxDataGrid-editingDeleteRow",undelete:"dxDataGrid-editingUndeleteRow",cancel:"dxDataGrid-editingCancelRowChanges"}}prepareButtonItem(Y,Z,Q,te){const pe=this.option("editing.texts")??{},oe={revert:"cancel",save:"save",addRow:"addrow"}[Z],ae={revert:pe.cancelAllChanges,save:pe.saveAllChanges,addRow:pe.addRow}[Z],ee=("save"===oe||"cancel"===oe)&&this._isEditButtonDisabled();return{widget:"dxButton",options:{onInitialized:he=>{(0,f.A)(he.element).addClass(Y._getToolbarButtonClass(`${k.Xh} ${this.addWidgetPrefix(oe)}-button`))},icon:`edit-button-${oe}`,disabled:ee,onClick:()=>{setTimeout(()=>{this[Q]()})},text:ae,hint:ae},showText:"inMenu",name:`${Z}Button`,location:"after",locateInMenu:"auto",sortIndex:te}}prepareEditButtons(Y){const Q=[];return(this.option("editing")??{}).allowAdding&&Q.push(this.prepareButtonItem(Y,"addRow","addRow",20)),Q}highlightDataCell(Y,Z){this.shouldHighlightCell(Z)&&Y.addClass(k.jP)}_afterInsertRow(Y){}_beforeSaveEditData(Y){if(Y&&!(0,u.O9)(Y.key)&&(0,u.O9)(Y.type))return!0}_afterSaveEditData(){}_beforeCancelEditData(){}_allowEditAction(Y,Z){let Q=this.option(`editing.${Y}`);return(0,u.Tn)(Q)&&(Q=Q({component:this.component,row:Z.row})),Q}allowUpdating(Y,Z){const Q=this.option("editing.startEditAction")??k.Lb;return(!(arguments.length>1)||Q===Z||"down"===Z)&&this._allowEditAction("allowUpdating",Y)}allowDeleting(Y){return this._allowEditAction("allowDeleting",Y)}isCellModified(Y){var Z,Q;const{columnIndex:te}=Y;let pe=null==Y||null===(Z=Y.row)||void 0===Z||null===(Z=Z.modifiedValues)||void 0===Z?void 0:Z[te];return null!=Y&&null!==(Q=Y.row)&&void 0!==Q&&Q.isNewRow&&(pe=Y.value),void 0!==pe}isNewRowInEditMode(){const Y=this._getVisibleEditRowIndex(),Z=this._dataController.items();return Y>=0&&Z[Y].isNewRow}_isRowDeleteAllowed(){}shouldHighlightCell(Y){return this.isCellModified(Y)&&Y.column.setCellValue&&(this.getEditMode()!==k.cy||!Y.row.isEditing)}}},extenders:{controllers:{data:K},views:{rowsView:q=>class extends q{getCellIndex(Y,Z){if(!Y.is("td")&&Z>=0){const Q=this.getCellElements(Z);let te=-1;return(0,s.__)(Q,(pe,z)=>{(0,f.A)(z).find(Y).length&&(te=pe)}),te}return super.getCellIndex.apply(this,arguments)}publicMethods(){return super.publicMethods().concat(["cellValue"])}_getCellTemplate(Y){return this._editingController.getColumnTemplate(Y)||super._getCellTemplate(Y)}_createRow(Y){const Z=super._createRow.apply(this,arguments);if(Y){const Q=!!Y.removed,te=!!Y.isNewRow,pe=!!Y.modified;te&&Z.addClass(k.yu),pe&&Z.addClass(k.BX),(te||Q)&&Z.removeClass(k.X9)}return Z}_getColumnIndexByElement(Y){let Z=Y.closest("table");const Q=this.getTableElements();for(;Z.length&&!Q.filter(Z).length;)Y=Z.closest("td"),Z=Y.closest("table");return this._getColumnIndexByElementCore(Y)}_getColumnIndexByElementCore(Y){const Z=Y.closest(`.${k.sN}> td:not(.dx-master-detail-cell)`);return this.getCellIndex(Z)}_editCellByClick(Y,Z){const Q=this._editingController,te=(0,f.A)(Y.event.target),pe=this._getColumnIndexByElement(te),z=this._dataController.items()[Y.rowIndex],oe=Q.allowUpdating({row:z},Z)||z&&z.isNewRow,ae=this._columnsController.getVisibleColumns()[pe],ee=Q.isEditCell(Y.rowIndex,pe),he=oe&&ae&&(ae.allowEditing||ee),de=this.option("editing.startEditAction")||"click",ue=ae&&ae.showEditorAlways;if(ee)return!0;if("down"===Z)return(o.A.real().ios||o.A.real().android)&&(0,y.GX)(),ue&&he&&Q.editCell(Y.rowIndex,pe);if("click"===Z&&"dblClick"===de&&this._pointerDownTarget===te.get(0)){const ve=z?.isNewRow;Q.closeEditCell(!1,ve)}return he&&Z===de?Q.editCell(Y.rowIndex,pe)||Q.isEditRow(Y.rowIndex):void 0}_rowPointerDown(Y){this._pointerDownTarget=Y.event.target,this._pointerDownTimeout=setTimeout(()=>{this._editCellByClick(Y,"down")})}_rowClickTreeListHack(Y){super._rowClick.apply(this,arguments)}_rowClick(Y){const Z=(0,f.A)(Y.rowElement).hasClass(this.addWidgetPrefix(k.BL));Y.event[k.se]=this.component,!this._editCellByClick(Y,"click")&&!Z&&super._rowClick.apply(this,arguments)}_rowDblClickTreeListHack(Y){super._rowDblClick.apply(this,arguments)}_rowDblClick(Y){this._editCellByClick(Y,"dblClick")||super._rowDblClick.apply(this,arguments)}_cellPrepared(Y,Z){var Q;const te=this._editingController,pe=!!Z.column.command,z=Z.setValue,oe=te.isEditRow(Z.rowIndex),ae=(0,U.d5)(oe,Z);if((0,U.TG)(oe,Z)){const{alignment:he}=Z.column;Y.toggleClass(this.addWidgetPrefix(k.MN),!z).toggleClass(k.iK,!z),he&&Y.find(k.CN).first().css("textAlign",he)}ae&&this._editCellPrepared(Y);const ee=!(null===(Q=Z.column)||void 0===Q||!Q.cellTemplate);Z.column&&!pe&&(!ee||te.shouldHighlightCell(Z))&&te.highlightDataCell(Y,Z),super._cellPrepared.apply(this,arguments)}_getCellOptions(Y){const Z=super._getCellOptions(Y),{columnIndex:Q,row:te}=Y;return Z.isEditing=this._editingController.isEditCell(Z.rowIndex,Z.columnIndex),Z.removed=te.removed,te.modified&&(Z.modified=void 0!==te.modifiedValues[Q]),Z}_setCellAriaAttributes(Y,Z){super._setCellAriaAttributes(Y,Z),Z.removed&&this.setAria("roledescription",C.A.format("dxDataGrid-ariaDeletedCell"),Y),Z.modified&&this.setAria("roledescription",C.A.format("dxDataGrid-ariaModifiedCell"),Y),Z.column.allowEditing&&!Z.removed&&!Z.modified&&"data"===Z.rowType&&Z.column.calculateCellValue===Z.column.defaultCalculateCellValue&&this._editingController.isCellBasedEditMode()&&this.setAria("roledescription",C.A.format("dxDataGrid-ariaEditableCell"),Y)}_createCell(Y){const Z=super._createCell(Y),Q=this._editingController.isEditRow(Y.rowIndex);return(0,U.TG)(Q,Y)&&Z.addClass(k.su),Z}cellValue(Y,Z,Q,te){const pe=this.getCellOptions(Y,Z);if(pe){if(void 0===Q)return pe.value;this._editingController.updateFieldValue(pe,Q,te,!0)}}dispose(){super.dispose.apply(this,arguments),clearTimeout(this._pointerDownTimeout)}_renderCore(){return super._renderCore.apply(this,arguments),this.waitAsyncTemplates(!0).done(()=>{this._editingController._focusEditorIfNeed()})}_editCellPrepared(){}_formItemPrepared(){}},headerPanel:q=>class extends q{optionChanged(Y){const{fullName:Z}=Y;switch(Y.name){case"editing":Z&&![k.kd,k.r8,k.tp,k.D9].some(pe=>pe===Z)&&this._invalidate(),super.optionChanged(Y);break;case"useLegacyColumnButtonTemplate":Y.handled=!0;break;default:super.optionChanged(Y)}}_getToolbarItems(){const Y=super._getToolbarItems();return this._editingController.prepareEditButtons(this).concat(Y)}isVisible(){const Y=this._editingController.option("editing");return super.isVisible()||Y?.allowAdding}}}}}},933:(In,Ze,M)=>{"use strict";M.d(Ze,{W:()=>w});var W=M(6054),o=M(5704),P=M(4859),b=M(6021),f=M(1832),S=M(1830),T=M(2946),y=M(778),d=M(4072),c=M(3535),s=M(9209),a=M(9293),u=M(6253),h=M(5572);const w={extenders:{controllers:{editing:D=>class extends D{init(){const C=!this._saveEditorHandler;if(super.init(),C){let I,L;this._pointerUpEditorHandler=()=>{var N;L=null===(N=this._columnsResizerController)||void 0===N?void 0:N.isResizing()},this._pointerDownEditorHandler=N=>I=(0,o.A)(N.target),this._saveEditorHandler=this.createAction(function(N){const{event:G}=N,k=(0,o.A)(G.target),U=G[u.se],{component:B}=this;if((!(0,h.Xl)(I)||I.is(k))&&this.isCellOrBatchEditMode()&&!this._editCellInProgress){const J=K(k)||K(U?.$element()),ie=U&&!U._disposed&&U!==this.component,re=!!k.closest(`.${this.addWidgetPrefix(u.HG)}`).length,q=k.hasClass(this.addWidgetPrefix(u.vw)),Y=this.isCellEditMode();!L&&!J&&!q&&!(re&&Y&&this.isEditing())&&((0,f.A1)(k)||ie)&&this._closeEditItem.bind(this)(k)}function K(J){if(!J)return!1;const ie=J.closest(`.${u.OQ}`),re=B.$element();return ie.length>0&&0===re.closest(ie).length}}),d.A.on(W.A.getDocument(),s.A.up,this._pointerUpEditorHandler),d.A.on(W.A.getDocument(),s.A.down,this._pointerDownEditorHandler),d.A.on(W.A.getDocument(),y.U,this._saveEditorHandler)}}isCellEditMode(){return this.option("editing.mode")===u.eN}isBatchEditMode(){return this.option("editing.mode")===u.yx}isCellOrBatchEditMode(){return this.isCellEditMode()||this.isBatchEditMode()}_needToCloseEditableCell(C){const I=this.component.$element();let L=this.isEditing();if((!I||C.closest(I).length)&&C.closest(`.${u.Z8}`).length){const U=C.closest(`.${u.sN}> td`),B=this._rowsView.getRowIndex(U.parent()),K=this._rowsView.getCellElements(B);if(null!=K&&K.length){var G;const J=K.index(U),re=null===(G=this._columnsController.getVisibleColumns()[J])||void 0===G?void 0:G.allowEditing,q=this.isEditCell(B,J);L=L&&!re&&!q}}return L||super._needToCloseEditableCell(C)}_closeEditItem(C){this._needToCloseEditableCell(C)&&this.closeEditCell()}_focusEditorIfNeed(){if(this._needFocusEditor&&this.isCellOrBatchEditMode()){var C;const I=this._getVisibleEditColumnIndex(),L=null===(C=this._rowsView)||void 0===C?void 0:C._getCellElement(this._getVisibleEditRowIndex(),I);this._refocusEditCell=!1,clearTimeout(this._inputFocusTimeoutID),L&&!L.find(":focus").length?this._focusEditingCell(()=>{this._editCellInProgress=!1},L,!0):this._editCellInProgress=!1,this._needFocusEditor=!1}else super._focusEditorIfNeed()}isEditing(){if(this.isCellOrBatchEditMode()){const C=(0,S.O9)(this.option(u.D9)),I=(0,S.O9)(this.option(u.tp));return C&&I}return super.isEditing()}_handleEditColumnNameChange(C){const I=this._getVisibleEditRowIndex(C.previousValue);if(this.isCellOrBatchEditMode()&&-1!==I&&(0,S.O9)(C.value)&&C.value!==C.previousValue){const L=this._columnsController.getVisibleColumnIndex(C.value),N=this._columnsController.getVisibleColumnIndex(C.previousValue);this._editCellFromOptionChanged(L,N,I)}}_addRow(C){if(this.isCellEditMode()&&this.hasChanges()){const I=new b.cY;return this.saveEditData().done(()=>{this.hasChanges()?I.reject("cancel"):this.addRow(C).done(I.resolve).fail(I.reject)}),I.promise()}return super._addRow(C)}editCell(C,I){return this._editCell({rowIndex:C,columnIndex:I})}_editCell(C){const I=new b.cY;let L;return this.executeOperation(I,()=>{L=this._editCellCore(C),(0,b.z7)(L).done(I.resolve).fail(I.reject)}),void 0!==L?L:I.promise()}_editCellCore(C){const I=this._dataController,L=(0,S.O9)(C.oldColumnIndex)||(0,S.O9)(C.oldRowIndex),{columnIndex:N,rowIndex:G,column:k,item:U}=this._getNormalizedEditCellOptions(C),B={data:U?.data,cancel:!1,column:k};if(void 0!==U.key){if(k&&("data"===U.rowType||"detailAdaptive"===U.rowType)&&!U.removed&&this.isCellOrBatchEditMode()){if(!L&&this.isEditCell(G,N))return!0;const K=G+I.getRowIndexOffset();return(0,b.z7)(this._beforeEditCell(G,N,U)).done(J=>{J||this._prepareEditCell(B,U,N,K)||this._processCanceledEditingCell()})}return!1}this._dataController.fireError("E1043")}_beforeEditCell(C,I,L){if(this.isCellEditMode()&&!L.isNewRow&&this.hasChanges()){const N=new b.cY;return this.saveEditData().always(()=>{N.resolve(this.hasChanges())}),this.addDeferred(N),N}return!1}publicMethods(){return super.publicMethods().concat(["editCell","closeEditCell"])}_getNormalizedEditCellOptions(C){let{oldColumnIndex:I,oldRowIndex:L,columnIndex:N,rowIndex:G}=C;const k=this._columnsController,U=k.getVisibleColumns(),K=this._dataController.items()[G];let J;return J=(0,S.O9)(I)?U[I]:this._getEditColumn(),(0,S.O9)(L)||(L=this._getVisibleEditRowIndex()),(0,S.Kg)(N)&&(N=k.columnOption(N,"index"),N=k.getVisibleIndex(N)),{oldColumn:J,columnIndex:N,oldRowIndex:L,rowIndex:G,column:U[N],item:K}}_prepareEditCell(C,I,L,N){return I.isNewRow||(C.key=I.key),!this._isEditingStart(C)&&(this._pageIndex=this._dataController.pageIndex(),this._setEditRowKey(I.key),this._setEditColumnNameByIndex(L),C.column.showEditorAlways||this._addInternalData({key:I.key,oldData:I.oldData??I.data}),!0)}closeEditCell(C,I){let L=(0,b.z7)();const N=this._getVisibleEditRowIndex();if(this.isCellOrBatchEditMode()){const G=new b.cY;L=new b.cY,this.executeOperation(G,()=>{this._closeEditCellCore(C,N,I).always(L.resolve)})}return L.promise()}_closeEditCellCore(C,I,L){const N=this._dataController,G=new b.cY,k=G.promise();if(this.isCellEditMode()&&this.hasChanges()){if(!L)return this.saveEditData().done(U=>{this.hasChanges()?G.resolve():this.closeEditCell(!!U).always(G.resolve)}),k}else if(this._resetEditRowKey(),this._resetEditColumnName(),I>=0){const U=[I];this._beforeCloseEditCellInBatchMode(U),C||N.updateItems({changeType:"update",rowIndices:U})}return G.resolve(),k}_resetModifiedClassCells(C){if(this.isBatchEditMode()){const I=this._columnsController.getVisibleColumns().length;C.forEach(L=>{let{key:N}=L;const G=this._dataController.getRowIndexByKey(N);for(let k=0;k<I;k++){const U=this._rowsView._getCellElement(G,k);U?.removeClass(u.uz)}})}}_prepareChange(C,I,L){const N=(0,o.A)(C.cellElement);return this.isBatchEditMode()&&void 0!==C.key&&this._applyModified(N,C),super._prepareChange(C,I,L)}_cancelSaving(C){const I=this._dataController;this.isCellOrBatchEditMode()&&(this.isBatchEditMode()&&this._resetEditIndices(),I.updateItems()),super._cancelSaving(C)}optionChanged(C){const{fullName:I}=C;"editing"===C.name&&I===u.tp?(this._handleEditColumnNameChange(C),C.handled=!0):super.optionChanged(C)}_editCellFromOptionChanged(C,I,L){const N=this._columnsController.getVisibleColumns();C>-1&&(0,P.zE)(()=>{this._repaintEditCell(N[C],N[I],L)})}_handleEditRowKeyChange(C){if(this.isCellOrBatchEditMode()){const L=this._getVisibleEditColumnIndex(),N=this._getEditRowIndexCorrection(),G=this._dataController.getRowIndexByKey(C.previousValue)+N;var I;(0,S.O9)(C.value)&&C.value!==C.previousValue&&(null===(I=this._editCellFromOptionChanged)||void 0===I||I.call(this,L,L,G))}else super._handleEditRowKeyChange(C)}deleteRow(C){if(this.isCellEditMode()&&this.isEditing()){const{isNewRow:I}=this._dataController.items()[C],L=this._dataController.getKeyByRowIndex(C);this.closeEditCell(null,I).always(()=>{C=this._dataController.getRowIndexByKey(L),this._checkAndDeleteRow(C)})}else super.deleteRow(C)}_checkAndDeleteRow(C){this.isBatchEditMode()?this._deleteRowCore(C):super._checkAndDeleteRow(C)}_refreshCore(C){const{isPageChanged:I}=C??{},L=this.isBatchEditMode()||I&&"virtual"!==this.option("scrolling.mode");this.isCellOrBatchEditMode()?L&&(this._resetEditColumnName(),this._resetEditRowKey()):super._refreshCore(C)}_allowRowAdding(C){return!!this.isBatchEditMode()||super._allowRowAdding(C)}_afterDeleteRow(C,I){const L=this._dataController;return this.isBatchEditMode()?(L.updateItems({changeType:"update",rowIndices:[I,C]}),(new b.cY).resolve()):super._afterDeleteRow(C,I)}_updateEditRow(C,I,L){this.isCellOrBatchEditMode()?this._updateRowImmediately(C,I,L):super._updateEditRow(C,I,L)}_isDefaultButtonVisible(C,I){if(this.isCellOrBatchEditMode()){const L=this.isBatchEditMode();switch(C.name){case"save":case"cancel":case"edit":return!1;case"delete":return super._isDefaultButtonVisible(C,I)&&(!L||!I.row.removed);case"undelete":return L&&this.allowDeleting(I)&&I.row.removed;default:return super._isDefaultButtonVisible(C,I)}}return super._isDefaultButtonVisible(C,I)}_isRowDeleteAllowed(){return super._isRowDeleteAllowed()||this.isBatchEditMode()}_beforeEndSaving(C){var I;this.isCellEditMode()?"update"!==(null===(I=C[0])||void 0===I?void 0:I.type)&&super._beforeEndSaving(C):(this.isBatchEditMode()&&this._resetModifiedClassCells(C),super._beforeEndSaving(C))}prepareEditButtons(C){const I=this.option("editing")??{},L=super.prepareEditButtons(C);return(I.allowUpdating||I.allowAdding||I.allowDeleting)&&this.isBatchEditMode()&&(L.push(this.prepareButtonItem(C,"save","saveEditData",21)),L.push(this.prepareButtonItem(C,"revert","cancelEditData",22))),L}_saveEditDataInner(){var C;const I=this._dataController.getVisibleRows()[this.getEditRowIndex()],L=this._getEditColumn(),N=L?.showEditorAlways;let k;return this.isCellEditMode()&&!(null!=I&&I.isNewRow)&&N&&(k=new b.cY,this.addDeferred(k)),super._saveEditDataInner().always(null===(C=k)||void 0===C?void 0:C.resolve)}_applyChange(C,I,L){const N=this.isCellEditMode()&&C.row&&!C.row.isNewRow,{showEditorAlways:G}=C.column,k=C.column.setCellValue!==C.column.defaultSetCellValue;return G&&!L&&N&&this.hasEditData()&&!this.isEditCell(C.rowIndex,C.columnIndex)?(this._focusEditingCell(),void this._updateEditRow(C.row,!0,k)):super._applyChange(C,I,L)}_applyChangeCore(C,I){const{showEditorAlways:L}=C.column,N=this.isCellEditMode()&&C.row&&!C.row.isNewRow;if(L&&!I){if(N)return this._setEditRowKey(C.row.key,!0),this._setEditColumnNameByIndex(C.columnIndex,!0),this.saveEditData();if(this.isBatchEditMode())return I=this._needUpdateRow(C.column),super._applyChangeCore(C,I)}return super._applyChangeCore(C,I)}_processDataItemCore(C,I,L,N,G){const{data:k,type:U}=I;this.isBatchEditMode()&&U===u.do&&(C.data=(0,T.lj)(C.data,k)),super._processDataItemCore(C,I,L,N,G)}_processRemoveCore(C,I,L){if(!this.isBatchEditMode()||L)return super._processRemoveCore(C,I,L)}_processRemoveIfError(C,I){if(!this.isBatchEditMode())return super._processRemoveIfError(C,I)}_beforeFocusElementInRow(C){super._beforeFocusElementInRow(C);const I=C>=0?C:0,L=this.getFirstEditableColumnIndex();L>=0&&this.editCell(I,L)}}},views:{rowsView:D=>class extends D{_createTable(){const C=super._createTable.apply(this,arguments),I=this._editingController;return I.isCellOrBatchEditMode()&&this.option("editing.allowUpdating")&&d.A.on(C,(0,a.b4)(c.A.name,"dxDataGridRowsView"),`td:not(.${u.su})`,this.createAction(()=>{I.isEditing()&&I.closeEditCell()})),C}_createRow(C){const I=super._createRow.apply(this,arguments);if(C){const N=!!C.removed;this._editingController.isBatchEditMode()&&N&&I.addClass(u.iq)}return I}},headerPanel:D=>class extends D{isVisible(){const C=this._editingController.option("editing");return super.isVisible()||C&&(C.allowUpdating||C.allowDeleting)&&C.mode===u.yx}}}}}},2255:(In,Ze,M)=>{"use strict";M.d(Ze,{I:()=>L});var W=M(5973),o=M(2925),P=M(5704),b=M(4859),f=M(6021),S=M(1832),T=M(3090),y=M(2660),d=M(1830),c=M(4072),s=M(1110),a=M(9012),u=M(6232),h=M(8628),g=M(4602),_=M(8736),x=M(6253),w=M(5572);const L={extenders:{controllers:{editing:N=>class extends N{init(){this._editForm=null,this._updateEditFormDeferred=null,super.init()}isEditRow(G){return!this.isPopupEditMode()&&super.isEditRow(G)}isFormOrPopupEditMode(){return this.isPopupEditMode()||this.isFormEditMode()}isFormEditMode(){return this.option("editing.mode")===x.oX}getFirstEditableColumnIndex(){const G=this._firstFormItem;if(this.isFormEditMode()&&G){const k=this.option(x.D9),U=this._dataController.getRowIndexByKey(k),B=this._rowsView.getCellElements(U);return this._rowsView._getEditFormEditorVisibleIndex(B,G.column)}return super.getFirstEditableColumnIndex()}getEditFormRowIndex(){return this.isFormOrPopupEditMode()?this._getVisibleEditRowIndex():super.getEditFormRowIndex()}_isEditColumnVisible(){const G=super._isEditColumnVisible(),k=this.option("editing");return this.isFormOrPopupEditMode()&&k.allowUpdating||G}_handleDataChanged(G){if(this.isPopupEditMode()){var k,U;const B=this.option("editing.editRowKey"),K=null==G||null===(k=G.items)||void 0===k?void 0:k.some(ie=>(0,b.RL)(ie.key,B)),J=(null===(U=G.changeTypes)||void 0===U?void 0:U.length)&&G.changeTypes.every(ie=>"insert"===ie);("refresh"===G.changeType||K&&G.isOptionChanged)&&!J&&this._repaintEditPopup()}super._handleDataChanged(G)}getPopupContent(){var G;const k=null===(G=this._editPopup)||void 0===G?void 0:G.option("visible");if(this.isPopupEditMode()&&k)return this._$popupContent}_showAddedRow(G){this.isPopupEditMode()?this._showEditPopup(G):super._showAddedRow(G)}_cancelEditDataCore(){super._cancelEditDataCore(),this.isPopupEditMode()&&this._hideEditPopup()}_updateEditRowCore(G,k,U){const B=this._editForm;if(this.isPopupEditMode())if(this.option("repaintChangesOnly")){var K;null===(K=G.update)||void 0===K||K.call(G,G),this._rowsView.renderDelayedTemplates()}else B&&(this._updateEditFormDeferred=(new f.cY).done(()=>B.repaint()),this._updateLockCount||this._updateEditFormDeferred.resolve());else super._updateEditRowCore(G,k,U)}_showEditPopup(G,k){const U="desktop"!==W.A.current().deviceType,B=this.addWidgetPrefix(x.vo),K=(0,T.X)({showTitle:!1,fullScreen:U,wrapperAttr:{class:B},toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getSaveButtonConfig()},{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getCancelButtonConfig()}],contentTemplate:this._getPopupEditFormTemplate(G)},this.option(x.kd));if(!this._editPopup){const J=(0,P.A)("<div>").appendTo(this.component.$element()).addClass(B);this._editPopup=this._createComponent(J,h.A),this._editPopup.on("hiding",this._getEditPopupHiddenHandler()),this._editPopup.on("shown",ie=>{var re;c.A.trigger(ie.component.$content().find(x.gn).not(`.${x.lR}`).first(),"focus"),k&&(null===(re=this._editForm)||void 0===re||re.repaint())})}this._editPopup.option(K),this._editPopup.show(),super._showEditPopup(G,k)}_getPopupEditFormTemplate(G){const k=this.component.getVisibleRows()[G],U={row:k,values:k.values,rowType:k.rowType,key:k.key,rowIndex:G};return this._rowsView._addWatchMethod(U,k),B=>{const K=this.getEditFormTemplate(),J=this._createComponent((0,P.A)("<div>").appendTo(B),g.A);this._$popupContent=(0,P.A)(J.content()),K(this._$popupContent,U,{isPopupForm:!0}),this._rowsView.renderDelayedTemplates(),(0,P.A)(B).parent().attr("aria-label",this.localize("dxDataGrid-ariaEditForm"))}}_repaintEditPopup(){const G=this._getVisibleEditRowIndex();if(G>=0){var k,U;const B=null===(k=this._editPopup)||void 0===k?void 0:k.option("animation");null===(U=this._editPopup)||void 0===U||U.option("animation",null),this._showEditPopup(G,!0),void 0!==B&&this._editPopup.option("animation",B)}}_hideEditPopup(){var G;null===(G=this._editPopup)||void 0===G||G.option("visible",!1)}optionChanged(G){if("editing"===G.name&&this.isFormOrPopupEditMode()){const{fullName:k}=G;0===k.indexOf(x.Qz)?(this._handleFormOptionChange(G),G.handled=!0):0===k.indexOf(x.kd)&&(this._handlePopupOptionChange(G),G.handled=!0)}super.optionChanged(G)}_handleFormOptionChange(G){var k;if(this.isFormEditMode()){const U=this._getVisibleEditRowIndex();U>=0&&this._dataController.updateItems({changeType:"update",rowIndices:[U]})}else null!==(k=this._editPopup)&&void 0!==k&&k.option("visible")&&0===G.fullName.indexOf(x.Qz)&&this._repaintEditPopup()}_handlePopupOptionChange(G){const k=this._editPopup;if(k){const U=G.fullName.slice(x.kd.length+1);U?k.option(U,G.value):k.option(G.value)}}renderFormEditorTemplate(G,k,U,B,K){const J=this,ie=(0,P.A)(B),{column:re}=k,q=(0,w.AU)(k),Y=G?.row,Z=Y?.data,Q=U.component,te=re.calculateCellValue(Z),pe=_.A.getDisplayValue(re,te,Z,Y?.rowType),{label:z,labelMark:oe,labelMode:ae}=U.editorOptions||{},ee=(0,T.X)({},G,{data:Z,cellElement:null,isOnForm:!0,item:k,id:Q.getItemID(k.name||k.dataField),column:(0,T.X)({},re,{editorType:q,editorOptions:(0,T.X)({label:z,labelMark:oe,labelMode:ae},re.editorOptions,k.editorOptions)}),columnIndex:re.index,setValue:!K&&re.allowEditing&&function(de,ue){J.updateFieldValue(ee,de,ue)}});ee.value=te,ee.displayValue=pe,ee.text=re.command?"":_.A.formatValue(pe,re);const he=this._getFormEditItemTemplate.bind(this)(ee,re);return this._rowsView.renderTemplate(ie,he,ee,!!(0,S.A1)(ie)).done(()=>{this._rowsView._updateCell(ie,ee)}),ee}getFormEditorTemplate(G,k){const U=this.component.columnOption(k.name||k.dataField);return(B,K)=>{const J=(0,P.A)(K),{row:ie}=G;if(null!=ie&&ie.watch){const re=ie.watch(()=>U.selector(ie.data),()=>{var q;let Y=J.find(".dx-widget").first(),Z=Y.data("dxValidator");const Q=null===(q=Z)||void 0===q?void 0:q.option();J.contents().remove(),G=this.renderFormEditorTemplate.bind(this)(G,k,B,J),Y=J.find(".dx-widget").first(),Z=Y.data("dxValidator"),Q&&!Z&&Y.dxValidator({validationRules:Q.validationRules,validationGroup:Q.validationGroup,dataGetter:Q.dataGetter})});c.A.on(J,s.N,re)}G=this.renderFormEditorTemplate.bind(this)(G,k,B,J)}}getEditFormOptions(G){var k;const U=null===(k=this._getValidationGroupsInForm)||void 0===k?void 0:k.call(this,G),B=this.option("editing.form.customizeItem"),K=this.addWidgetPrefix(x.VQ);let J=this.option("editing.form.items");const ie={};if(J)(0,w.Lx)(J,re=>{const q=re?.name||re?.dataField;q&&(ie[q]=!!re.editorType)});else{const re=this._columnsController.getColumns();J=[],(0,y.__)(re,(q,Y)=>{!Y.isBand&&!Y.type&&J.push({column:Y,name:Y.name,dataField:Y.dataField})})}return(0,T.X)({},U,{items:J,formID:`dx-${new o.A}`,customizeItem:re=>{let q;const Y=re.name||re.dataField;if((re.column||Y)&&(q=re.column||this._columnsController.columnOption(re.name?`name:${re.name}`:`dataField:${re.dataField}`)),q){if(re.label=re.label||{},re.label.text=re.label.text||q.caption,"boolean"===q.dataType&&void 0===re.label.visible){const Q=this.option("editing.form.labelMode");("floating"===Q||"static"===Q)&&(re.label.visible=!0)}re.template=re.template||this.getFormEditorTemplate(G,re),re.column=q,re.isCustomEditorType=ie[Y],q.formItem&&(0,T.X)(re,q.formItem),void 0===re.isRequired&&q.validationRules&&(re.isRequired=q.validationRules.some(Q=>"required"===Q.type),re.validationRules=[]);const Z=!(0,d.O9)(re.visible)||re.visible;!this._firstFormItem&&Z&&(this._firstFormItem=re)}B?.call(this,re),re.cssClass=(0,d.Kg)(re.cssClass)?`${re.cssClass} ${K}`:K}})}getEditFormTemplate(){return(G,k,U)=>{const B=this.option(x.Qz),K=this.getEditFormOptions(k),J=(0,P.A)("<div>").appendTo(G),ie=U?.isPopupForm;if(this._firstFormItem=void 0,ie&&J.addClass(this.addWidgetPrefix(x.QN)),this._editForm=this._createComponent(J,u.A,(0,T.X)({},B,K)),!ie){const re=(0,P.A)("<div>").addClass(this.addWidgetPrefix(x.cK)).appendTo(G);this._createComponent((0,P.A)("<div>").appendTo(re),a.A,this._getSaveButtonConfig()),this._createComponent((0,P.A)("<div>").appendTo(re),a.A,this._getCancelButtonConfig())}this._editForm.on("contentReady",()=>{var re;this._rowsView.renderDelayedTemplates(),null===(re=this._editPopup)||void 0===re||re.repaint()})}}getEditForm(){return this._editForm}_endUpdateCore(){var G;null===(G=this._updateEditFormDeferred)||void 0===G||G.resolve()}_beforeEndSaving(G){var k;super._beforeEndSaving(G),this.isPopupEditMode()&&(null===(k=this._editPopup)||void 0===k||k.hide())}_processDataItemCore(G,k,U,B,K){const{type:J}=k;this.isPopupEditMode()&&J===x.G3&&(G.visible=!1),super._processDataItemCore(G,k,U,B,K)}_editRowFromOptionChangedCore(G,k){const U=this.isPopupEditMode();super._editRowFromOptionChangedCore(G,k,U),U&&this._showEditPopup(k)}},data:N=>class extends N{_updateEditItem(G){this._editingController.isFormEditMode()&&(G.rowType="detail")}_getChangedColumnIndices(G,k,U,B){if(!1!==B||!k.isEditing||!this._editingController.isFormEditMode())return super._getChangedColumnIndices.apply(this,arguments)}}},views:{rowsView:N=>class extends N{_renderCellContent(G,k){"data"===k.rowType&&this._editingController.isPopupEditMode()&&!1===k.row.visible||super._renderCellContent.apply(this,arguments)}getCellElements(G){const k=super.getCellElements(G),U=this._editingController,B=U.getEditForm();return U.getEditFormRowIndex()===G&&k&&B?B.$element().find(`.${this.addWidgetPrefix(x.VQ)}, .${x.aT}`):k}_getVisibleColumnIndex(G,k,U){if(this._editingController.getEditFormRowIndex()===k&&(0,d.Kg)(U)){const K=this._columnsController.columnOption(U);return this._getEditFormEditorVisibleIndex(G,K)}return super._getVisibleColumnIndex.apply(this,arguments)}_getEditFormEditorVisibleIndex(G,k){let U=-1;return(0,y.__)(G,(B,K)=>{const J=(0,P.A)(K).find(".dx-field-item-content").data("dx-form-item");if(null!=J&&J.column&&k&&J.column.index===k.index)return U=B,!1}),U}_isFormItem(G){const k="detail"===G.rowType||"detailAdaptive"===G.rowType,U="data"===G.rowType&&this._editingController.isPopupEditMode();return(k||U)&&G.item}_updateCell(G,k){this._isFormItem(k)?this._formItemPrepared(k,G):super._updateCell(G,k)}_updateContent(){const G=this._editingController,k=G.getEditForm(),U=k?.option("validationGroup");return super._updateContent.apply(this,arguments).done(()=>{const K=G.getEditForm();U&&K&&K!==k&&K.option("validationGroup",U)})}}}}}},225:(In,Ze,M)=>{"use strict";M.d(Ze,{a:()=>S});var W=M(4859),o=M(6253);const S={extenders:{controllers:{editing:T=>class extends T{isRowEditMode(){return this.getEditMode()===o.cy}_afterCancelEditData(y){const d=this._dataController;this.isRowBasedEditMode()&&y>=0?d.updateItems({changeType:"update",rowIndices:[y,y+1]}):super._afterCancelEditData(y)}_isDefaultButtonVisible(y,d){const c=this.isRowBasedEditMode(),a=!this.isPopupEditMode()&&d.row&&(0,W.RL)(d.row.key,this.option(o.D9));if(c)switch(y.name){case"edit":return!a&&this.allowUpdating(d);case"delete":return super._isDefaultButtonVisible(y,d)&&!a;case"save":case"cancel":return a;default:return super._isDefaultButtonVisible(y,d)}return super._isDefaultButtonVisible(y,d)}isEditRow(y){return this.isRowBasedEditMode()&&this.isEditRowByIndex(y)}_cancelSaving(y){this.isRowBasedEditMode()&&(this.hasChanges()||this._cancelEditDataCore()),super._cancelSaving(y)}_refreshCore(y){const{allowCancelEditing:d}=y??{};if(this.isRowBasedEditMode()){const c=this.getChanges().filter(s=>"update"===s.type).length>0;this.init(),d&&c&&this._cancelEditDataCore()}super._refreshCore(y)}_isEditColumnVisible(){const y=super._isEditColumnVisible(),d=this.option("editing"),c=this.isRowEditMode();return y||c&&(d.allowUpdating||d.allowAdding)}_focusEditorIfNeed(){const y=this.getEditMode();if(this._needFocusEditor){if(o.yP.includes(y)){const d=this.getFocusedCellInRow(this._getVisibleEditRowIndex());this._delayedInputFocus(d,()=>{d&&this.component.focus(d)})}this._needFocusEditor=!1}}},data:T=>class extends T{_getChangedColumnIndices(y,d,c,s){if(!this._editingController.isRowBasedEditMode()||y.isEditing===d.isEditing)return super._getChangedColumnIndices.apply(this,arguments)}}},views:{rowsView:T=>class extends T{_createRow(y){const d=super._createRow.apply(this,arguments);return y&&this._editingController.isEditRow(y.rowIndex)&&(d.addClass(o.al),d.removeClass(o.gU),"detail"===y.rowType&&d.addClass(this.addWidgetPrefix(o.BL))),d}_update(y){super._update(y),"updateSelection"===y.changeType&&this.getTableElements().children("tbody").children(`.${o.al}`).removeClass(o.gU)}}}}}},5572:(In,Ze,M)=>{"use strict";M.d(Ze,{AU:()=>h,HQ:()=>f,Lx:()=>g,MF:()=>c,N5:()=>y,TG:()=>T,Xl:()=>u,d5:()=>S,fV:()=>d,i_:()=>a,nh:()=>s});var W=M(2925),o=M(1830);const f=function(_){return function(x){const w=x instanceof Error?x:new Error(x&&String(x)||"Unknown error");_.reject(w)}},S=function(_,x){return x.isEditing||_&&x.column.allowEditing},T=function(_,x){const w=!!x.column.command,D=S(_,x);return"data"===x.rowType&&!w&&(D||x.column.showEditorAlways)},y=_=>{const x=_.component.option("editing.texts")||{};return{save:x.saveRowChanges,cancel:x.cancelRowChanges,edit:x.editRow,undelete:x.undeleteRow,delete:x.deleteRow,add:x.addRowToNode}},d=()=>`_DX_KEY_${new W.A}`,c=_=>"string"==typeof _&&_.startsWith("_DX_KEY_")&&44===_.length,s=(_,x)=>{let w=-1;return _.some((D,C)=>{if(a(D)===x)return w=C,!0}),w};function a(_){return(0,o.Gv)(_)?_.name:_}function u(_){return _&&(_.is("input")||_.is("textarea"))}const h=_=>{var x;const{column:w}=_;return _.isCustomEditorType?_.editorType:null===(x=w.formItem)||void 0===x?void 0:x.editorType},g=(_,x)=>{_.forEach(w=>{w.items||w.tabs?g(w.items||w.tabs,x):x(w)})}},476:(In,Ze,M)=>{"use strict";M.d(Ze,{k:()=>ie});var W=M(6870),o=M(6054),P=M(5704),b=M(36),f=M(3090),S=M(4757),T=M(1363),y=M(778),d=M(4072),c=M(9209),s=M(9293),a=M(3771),u=M(3376),h=M(8736);const k="dxDataGridEditorFactory",U=(0,s.b4)([c.A.down,"focusin",y.U].join(" "),k),B="dx-hidden",K=(0,a.A)(u.Ay.ViewController),ie={defaultOptions:()=>({}),controllers:{editorFactory:class J extends K{init(){this.createAction("onEditorPreparing",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onEditorPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this._columnsResizerController=this.getController("columnsResizer"),this._editingController=this.getController("editing"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._columnsController=this.getController("columns"),this._validatingController=this.getController("validating"),this._rowsView=this.getView("rowsView"),this._updateFocusHandler=this._updateFocusHandler||this.createAction(this._updateFocus.bind(this)),this._subscribedContainerRoot=this._getContainerRoot(),d.A.on(this._subscribedContainerRoot,U,this._updateFocusHandler),this._attachContainerEventHandlers()}dispose(){clearTimeout(this._focusTimeoutID),clearTimeout(this._updateFocusTimeoutID),d.A.off(this._subscribedContainerRoot,U,this._updateFocusHandler)}_getFocusedElement(q){const Z=["td[tabindex]:focus",this.option("focusedRowEnabled")?"tr[tabindex]:focus":"tr[tabindex]:not(.dx-data-row):focus","input:focus","button:focus","textarea:focus","div[tabindex]:focus",".dx-lookup-field:focus",".dx-checkbox:focus",".dx-switch:focus",".dx-dropdownbutton .dx-buttongroup:focus",".dx-adaptive-item-text:focus"].join(","),Q=q.find(Z);return this.elementIsInsideGrid(Q)&&Q}_getFocusCellSelector(){return".dx-row > td"}_updateFocusCore(){const q=this.component&&this.component.$element();if(q){let Y=this._getFocusedElement(q);if(Y&&Y.length){let Z;if(!Y.hasClass("dx-cell-focus-disabled")&&!Y.hasClass("dx-row")){const Q=Y.closest(`${this._getFocusCellSelector()}, .dx-cell-focus-disabled`);Q.get(0)!==Y.get(0)&&(Z=this._needHideBorder(Q),Y=Q)}if(Y.length&&!Y.hasClass("dx-cell-focus-disabled"))return void this.focus(Y,Z)}}this.loseFocus()}_needHideBorder(q){const Y=this._rowsView.element(),Z=q.closest(Y).length>0,Q=this._editingController.isEditing();return q.hasClass("dx-editor-inline-block")||Z&&!Q}_updateFocus(q){const Y=this,Z=q&&q.event&&(0,P.A)(q.event.target).hasClass(Y.addWidgetPrefix("focus-overlay"));Y._isFocusOverlay=Y._isFocusOverlay||Z,clearTimeout(Y._updateFocusTimeoutID),Y._updateFocusTimeoutID=setTimeout(()=>{delete Y._updateFocusTimeoutID,Y._isFocusOverlay||Y._updateFocusCore(),Y._isFocusOverlay=!1})}_updateFocusOverlaySize(q,Y){q.hide();const Z=W.A.calculate(q,(0,f.X)({collision:"fit"},Y));Z.h.oversize>0&&(0,T.iT)(q,(0,T.Ot)(q)-Z.h.oversize),Z.v.oversize>0&&(0,T.NG)(q,(0,T.P$)(q)-Z.v.oversize),q.show()}callbackNames(){return["focused"]}focus(q,Y){const Z=this;if(void 0===q)return Z._$focusedElement;q&&(q.is(Z._$focusedElement)||Z._$focusedElement&&Z._$focusedElement.removeClass("dx-focused"),Z._$focusedElement=q,clearTimeout(Z._focusTimeoutID),Z._focusTimeoutID=setTimeout(()=>{delete Z._focusTimeoutID,Z.renderFocusOverlay(q,Y),q.addClass("dx-focused"),Z.focused.fire(q)}))}refocus(){const q=this.focus();this.focus(q)}renderFocusOverlay(q,Y){const Z=this;if(h.A.isElementInCurrentGrid(this,q))if(Z._$focusOverlay||(Z._$focusOverlay=(0,P.A)("<div>").addClass(Z.addWidgetPrefix("focus-overlay"))),Y)Z._$focusOverlay.addClass(B);else if(q.length){const Q=b.A.mozilla?"right bottom":"left top",te=q.closest(`.${Z.addWidgetPrefix("content")}`),pe=(0,S.N)(q.get(0)),z=q.hasClass(this.addWidgetPrefix("invalid")),oe=q.hasClass("dx-cell-modified")&&!z;Z._$focusOverlay.removeClass(B).toggleClass("dx-focused-cell-invalid",z).toggleClass("dx-focused-cell-modified",oe).appendTo(te),(0,T.NG)(Z._$focusOverlay,pe.bottom-pe.top+1),(0,T.iT)(Z._$focusOverlay,pe.right-pe.left+1);const ae={precise:!0,my:Q,at:Q,of:q,boundary:te.length&&te};Z._updateFocusOverlaySize(Z._$focusOverlay,ae),W.A.setup(Z._$focusOverlay,ae),Z._$focusOverlay.css("visibility","visible")}}resize(){const q=this._$focusedElement;q&&this.focus(q)}loseFocus(q){this._$focusedElement&&this._$focusedElement.removeClass("dx-focused"),this._$focusedElement=null,this._$focusOverlay&&this._$focusOverlay.addClass(B)}_getContainerRoot(){var q;const Y=null===(q=this.component)||void 0===q?void 0:q.$element(),Z=o.A.getRootNode(Y?.get(0));return Z.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||Z.host?Z:o.A.getDocument()}_attachContainerEventHandlers(){const q=this,Y=q.component&&q.component.$element();Y&&d.A.on(Y,(0,s.b4)("keydown",k),Z=>{"tab"===(0,s.YD)(Z)&&q._updateFocusHandler(Z)})}}}}},7228:(In,Ze,M)=>{"use strict";M.d(Ze,{y:()=>u});var W=M(5704),o=M(2660),P=M(778),b=M(4072),f=M(8360),S=M(3376);const u={defaultOptions:()=>({errorRowEnabled:!0}),controllers:{errorHandling:class s extends S.Ay.ViewController{init(){this._resizingController=this.getController("resizing"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView")}_createErrorRow(g,_){let x,w;const D=this._renderErrorMessage(g);return _?(x=(0,W.A)("<tr>").attr("role","row").addClass("dx-error-row"),w=(0,W.A)("<div>").addClass("dx-closebutton").addClass(this.addWidgetPrefix("action")),b.A.on(w,P.U,this.createAction(C=>{var I,L;const N=C.event;let G;const k=(0,W.A)(N.currentTarget).closest(".dx-error-row").index();N.stopPropagation(),(0,o.__)(_,(U,B)=>{G=(0,W.A)(B).children("tbody").children("tr").eq(k),this.removeErrorRow(G)}),null===(I=this._resizingController)||void 0===I||null===(L=I.fireContentReadyAction)||void 0===L||L.call(I)})),(0,W.A)("<td>").attr({colSpan:this._columnsController.getVisibleColumns().length,role:"gridcell"}).prepend(w).append(D).appendTo(x),x):D}_renderErrorMessage(g){const _=g.url?g.message.replace(g.url,""):g.message||g,x=(0,W.A)("<div>").attr("role","alert").attr("aria-roledescription",f.A.format("dxDataGrid-ariaError")).addClass("dx-error-message").text(_);return g.url&&(0,W.A)("<a>").attr("href",g.url).text(g.url).appendTo(x),x}renderErrorRow(g,_,x){var w,D;const C=this;let I,L;if(x)return x.find(".dx-error-message").remove(),I=C._createErrorRow(g),x.prepend(I),I;const N=_>=0||!C._columnHeadersView.isVisible()?C._rowsView:C._columnHeadersView,G=N.getTableElements();return(0,o.__)(G,(k,U)=>{if(I=C._createErrorRow(g,G),L=L||I,_>=0){const B=N._getRowElements((0,W.A)(U)).eq(_);C.removeErrorRow(B.next()),I.insertAfter(B)}else{const B=(0,W.A)(U).children("tbody"),K=B.children("tr");C._columnHeadersView.isVisible()?(C.removeErrorRow(K.last()),(0,W.A)(U).append(I)):(C.removeErrorRow(K.first()),B.first().prepend(I))}}),null===(w=this._resizingController)||void 0===w||null===(D=w.fireContentReadyAction)||void 0===D||D.call(w),L}removeErrorRow(g){if(!g){const _=this._columnHeadersView&&this._columnHeadersView.element();if(!(g=_&&_.find(".dx-error-row"))||!g.length){const x=this._rowsView.element();g=x&&x.find(".dx-error-row")}}g&&g.hasClass("dx-error-row")&&g.remove()}optionChanged(g){"errorRowEnabled"===g.name?g.handled=!0:super.optionChanged(g)}}},extenders:{controllers:{data:h=>class extends h{init(){super.init(),this.dataErrorOccurred.add((g,_)=>{this.option("errorRowEnabled")&&this._errorHandlingController.renderErrorRow(g,void 0,_)}),this.changed.add(g=>{var _,x;g&&"loadError"===g.changeType||!this._editingController||this._editingController.hasChanges()||null===(_=this._errorHandlingController)||void 0===_||null===(x=_.removeErrorRow)||void 0===x||x.call(_)})}}}}}},6480:(In,Ze,M)=>{"use strict";M.d(Ze,{s:()=>c});var W=M(5704),o=M(3090),P=M(8360),b=M(8941),f=M(8628),S=M(9994),T=M(8953),y=M(3376);const c={defaultOptions:()=>({filterBuilder:{groupOperationDescriptions:{and:P.A.format("dxFilterBuilder-and"),or:P.A.format("dxFilterBuilder-or"),notAnd:P.A.format("dxFilterBuilder-notAnd"),notOr:P.A.format("dxFilterBuilder-notOr")},filterOperationDescriptions:{between:P.A.format("dxFilterBuilder-filterOperationBetween"),equal:P.A.format("dxFilterBuilder-filterOperationEquals"),notEqual:P.A.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:P.A.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:P.A.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:P.A.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:P.A.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:P.A.format("dxFilterBuilder-filterOperationStartsWith"),contains:P.A.format("dxFilterBuilder-filterOperationContains"),notContains:P.A.format("dxFilterBuilder-filterOperationNotContains"),endsWith:P.A.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:P.A.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:P.A.format("dxFilterBuilder-filterOperationIsNotBlank")}},filterBuilderPopup:{}}),views:{filterBuilderView:class d extends y.Ay.View{init(){super.init(),this._columnsController=this.getController("columns"),this._filterSyncController=this.getController("filterSync")}optionChanged(a){switch(a.name){case"filterBuilder":case"filterBuilderPopup":this._invalidate(),a.handled=!0;break;default:super.optionChanged(a)}}_renderCore(){this._updatePopupOptions()}_updatePopupOptions(){this.option("filterBuilderPopup.visible")?this._initPopup():this._filterBuilderPopup&&this._filterBuilderPopup.hide()}_disposePopup(){this._filterBuilderPopup&&(this._filterBuilderPopup.dispose(),this._filterBuilderPopup=void 0),this._filterBuilder&&(this._filterBuilder.dispose(),this._filterBuilder=void 0)}_initPopup(){const a=this;a._disposePopup(),a._filterBuilderPopup=a._createComponent(a.element(),f.A,(0,o.X)({title:P.A.format("dxDataGrid-filterBuilderPopupTitle"),contentTemplate:u=>a._getPopupContentTemplate(u),onOptionChanged(u){"visible"===u.name&&a.option("filterBuilderPopup.visible",u.value)},toolbarItems:a._getPopupToolbarItems()},a.option("filterBuilderPopup"),{onHidden(){(0,T.Dy)(a),a._disposePopup()}}))}_getPopupContentTemplate(a){const u=(0,W.A)(a),h=(0,W.A)("<div>").appendTo((0,W.A)(a));this._filterBuilder=this._createComponent(h,b.A,(0,o.X)({value:this.option("filterValue"),fields:this._columnsController.getFilteringColumns()},this.option("filterBuilder"),{customOperations:this._filterSyncController.getCustomFilterOperations()})),this._createComponent(u,S.A,{direction:"both"})}_getPopupToolbarItems(){const a=this;return[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:P.A.format("OK"),onClick(){const u=a._filterBuilder.option("value");a.option("filterValue",u),a._filterBuilderPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:P.A.format("Cancel"),onClick(){a._filterBuilderPopup.hide()}}}]}}}}},7973:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>C});var W=M(5704),o=M(6021),P=M(6946),b=M(1830),f=M(4072),S=M(8360),T=M(3480),y=M(6428),d=M(1009),c=M(3376),s=M(8736);const C={defaultOptions:()=>({filterPanel:{visible:!1,filterEnabled:!0,texts:{createFilter:S.A.format("dxDataGrid-filterPanelCreateFilter"),clearFilter:S.A.format("dxDataGrid-filterPanelClearFilter"),filterEnabledHint:S.A.format("dxDataGrid-filterPanelFilterEnabledHint")}}}),views:{filterPanelView:class w extends c.Ay.View{init(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._filterSyncController=this.getController("filterSync"),this._dataController.dataSourceChanged.add(()=>this.render())}isVisible(){return this.option("filterPanel.visible")&&this._dataController.dataSource()}_renderCore(){const L=this.element();if(L.empty(),!this._columnsController.getColumns().length)return;L.addClass(this.addWidgetPrefix("filter-panel"));const G=(0,W.A)("<div>").addClass(this.addWidgetPrefix("filter-panel-left")).appendTo(L);this._renderFilterBuilderText(L,G)}_renderFilterBuilderText(L,N){const G=this._getFilterElement(),k=this._getTextElement();if(this.option("filterValue")||this._filterValueBuffer){const U=this._getCheckElement(),B=this._getRemoveButtonElement();return N.append(U).append(G).append(k),void L.append(B)}N.append(G).append(k)}_getCheckElement(){const L=this,N=(0,W.A)("<div>").addClass(this.addWidgetPrefix("filter-panel-checkbox"));return L._createComponent(N,T.A,{value:L.option("filterPanel.filterEnabled"),onValueChanged(G){L.option("filterPanel.filterEnabled",G.value)}}),N.attr("title",this.option("filterPanel.texts.filterEnabledHint")),N}_getFilterElement(){const L=this,N=(0,W.A)("<div>").addClass("dx-icon-filter");return f.A.on(N,"click",()=>L._showFilterBuilder()),(0,d.j)("filterPanel",L,N,void 0,()=>L._showFilterBuilder()),L._addTabIndexToElement(N),N}_getTextElement(){const L=this,N=(0,W.A)("<div>").addClass(L.addWidgetPrefix("filter-panel-text"));let G;const k=L.option("filterValue");return k?(0,o.z7)(L.getFilterText(k,this._filterSyncController.getCustomFilterOperations())).done(U=>{const B=L.option("filterPanel.customizeText");if(B){const K=B({component:L.component,filterValue:k,text:U});"string"==typeof K&&(U=K)}N.text(U)}):(G=L.option("filterPanel.texts.createFilter"),N.text(G)),f.A.on(N,"click",()=>L._showFilterBuilder()),(0,d.j)("filterPanel",L,N,void 0,()=>L._showFilterBuilder()),L._addTabIndexToElement(N),N}_showFilterBuilder(){this.option("filterBuilderPopup.visible",!0)}_getRemoveButtonElement(){const L=this,N=()=>L.option("filterValue",null),G=(0,W.A)("<div>").addClass(L.addWidgetPrefix("filter-panel-clear-filter")).text(L.option("filterPanel.texts.clearFilter"));return f.A.on(G,"click",N),(0,d.j)("filterPanel",this,G,void 0,N),L._addTabIndexToElement(G),G}_addTabIndexToElement(L){if(!this.option("useLegacyKeyboardNavigation")){const N=this.option("tabindex")||0;L.attr("tabindex",N)}}optionChanged(L){switch(L.name){case"filterValue":this._invalidate(),this.option("filterPanel.filterEnabled",!0),L.handled=!0;break;case"filterPanel":this._invalidate(),L.handled=!0;break;default:super.optionChanged(L)}}_getConditionText(L,N,G){let k=`[${L}] ${N}`;return(0,b.O9)(G)&&(k+=G),k}_getValueMaskedText(L){return Array.isArray(L)?`('${L.join("', '")}')`:` '${L}'`}_getValueText(L,N,G){const k=new o.cY,U=N&&N.customizeText;if((0,b.O9)(G)||U)if(!U&&L.lookup)(0,y.yy)(L,G,B=>{k.resolve(this._getValueMaskedText(B))});else{const B=Array.isArray(G)?G:s.A.getDisplayValue(L,G,null);(0,o.z7)((0,y.GT)(L,B,N,"filterPanel")).done(K=>{k.resolve(this._getValueMaskedText(K))})}else k.resolve("");return k.promise()}getConditionText(L,N){const G=this,k=L[1],U=new o.cY,B=(0,y.D3)(N.customOperations,k);let K;const J=(0,y.VI)(L[0],N.columns),ie=J.caption||"",re=L[2];return K=B?B.caption||(0,P.Bc)(B.name):(0,y.PQ)(null===re?"="===k?"isblank":"isnotblank":k,N.filterOperationDescriptions),this._getValueText(J,B,re).done(q=>{U.resolve(G._getConditionText(ie,K,q))}),U}getGroupText(L,N,G){const k=this,U=new o.cY,B=[],K=(0,y.Bd)(L);return L.forEach(J=>{(0,y.G3)(J)?B.push(k.getConditionText(J,N)):(0,y.IZ)(J)&&B.push(k.getGroupText(J,N,!0))}),o.z7.apply(this,B).done(function(){let J;for(var ie=arguments.length,re=new Array(ie),q=0;q<ie;q++)re[q]=arguments[q];J=K.startsWith("!")?`${N.groupOperationDescriptions[`not${K.substring(1,2).toUpperCase()}${K.substring(2)}`].split(" ")[0]} ${re[0]}`:re.join(` ${N.groupOperationDescriptions[K]} `),G&&(J=`(${J})`),U.resolve(J)}),U}getFilterText(L,N){const G={customOperations:N,columns:this._columnsController.getFilteringColumns(),filterOperationDescriptions:this.option("filterBuilder.filterOperationDescriptions"),groupOperationDescriptions:this.option("filterBuilder.groupOperationDescriptions")};return(0,y.G3)(L)?this.getConditionText(L,G):this.getGroupText(L,G)}}},extenders:{controllers:{data:I=>class extends I{optionChanged(L){"filterPanel"===L.name?(this._applyFilter(),L.handled=!0):super.optionChanged(L)}}}}}},9095:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>Ee});var W=M(5737),o=M(5704),P=M(4859),b=M(3090),f=M(2660),S=M(1363),T=M(1830),y=M(4072),d=M(9293),c=M(8360),s=M(6620),a=M(6314),u=M(3949),h=M(8953),g=M(3376),_=M(8736);const x={"=":"filter-operation-equals","<>":"filter-operation-not-equals","<":"filter-operation-less","<=":"filter-operation-less-equal",">":"filter-operation-greater",">=":"filter-operation-greater-equal",default:"filter-operation-default",notcontains:"filter-operation-not-contains",contains:"filter-operation-contains",startswith:"filter-operation-starts-with",endswith:"filter-operation-ends-with",between:"filter-operation-between"},w={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",between:"between"},te="input:not([type='hidden'])",pe=["date","datetime","number"],z=c.A.format("dxDataGrid-ariaSearchBox");function oe(Oe){return"onClick"===Oe.option("filterRow.applyFilter")}const ae=function(Oe){const ze=Oe&&Oe.children(),$e=ze&&ze.data("dxComponents"),Be=$e&&$e.length&&ze.data($e[0]);return Be instanceof s.A?Be:null},ee=function(Oe,ze){let $e="",Be="";const Ue=he(Oe,ze),ot=_.A.getFormatOptionsByColumn(ze,"filterRow");return Array.isArray(Ue)?($e=_.A.formatValue(Ue[0],ot),Be=_.A.formatValue(Ue[1],ot),""!==Be&&($e+=` - ${Be}`)):(0,T.O9)(Ue)&&($e=_.A.formatValue(Ue,ot)),$e};function he(Oe,ze){if(ze)return oe(Oe)&&void 0!==ze.bufferedFilterValue?ze.bufferedFilterValue:ze.filterValue}const de=function(Oe,ze){if(ze)return oe(Oe)&&void 0!==ze.bufferedSelectedFilterOperation?ze.bufferedSelectedFilterOperation:ze.selectedFilterOperation},be=function(Oe,ze,$e){const Be=Oe._columnsController.columnOption(ze),Ue=he(Oe,Be),ot=$e.closest(`.${Oe.addWidgetPrefix("filter-range-overlay")}`).length,st=$e.hasClass(Oe.addWidgetPrefix("filter-range-start"));return Ue&&Array.isArray(Ue)&&"between"===de(Oe,Be)?st?Ue[0]:Ue[1]:!ot&&function(Oe,ze){return!(ze&&pe.includes(ze.dataType)&&Array.isArray(Oe))&&void 0!==Oe}(Ue,Be)?Ue:null},Ee={defaultOptions:()=>({syncLookupFilterValues:!0,filterRow:{visible:!1,showOperationChooser:!0,showAllText:c.A.format("dxDataGrid-filterRowShowAllText"),resetOperationText:c.A.format("dxDataGrid-filterRowResetOperationText"),applyFilter:"auto",applyFilterText:c.A.format("dxDataGrid-applyFilterText"),operationDescriptions:{equal:c.A.format("dxDataGrid-filterRowOperationEquals"),notEqual:c.A.format("dxDataGrid-filterRowOperationNotEquals"),lessThan:c.A.format("dxDataGrid-filterRowOperationLess"),lessThanOrEqual:c.A.format("dxDataGrid-filterRowOperationLessOrEquals"),greaterThan:c.A.format("dxDataGrid-filterRowOperationGreater"),greaterThanOrEqual:c.A.format("dxDataGrid-filterRowOperationGreaterOrEquals"),startsWith:c.A.format("dxDataGrid-filterRowOperationStartsWith"),contains:c.A.format("dxDataGrid-filterRowOperationContains"),notContains:c.A.format("dxDataGrid-filterRowOperationNotContains"),endsWith:c.A.format("dxDataGrid-filterRowOperationEndsWith"),between:c.A.format("dxDataGrid-filterRowOperationBetween"),isBlank:c.A.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:c.A.format("dxFilterBuilder-filterOperationIsNotBlank")},betweenStartText:c.A.format("dxDataGrid-filterRowOperationBetweenStartText"),betweenEndText:c.A.format("dxDataGrid-filterRowOperationBetweenEndText")}}),controllers:{applyFilter:class ge extends g.Ay.ViewController{init(){this._columnsController=this.getController("columns")}_getHeaderPanel(){return this._headerPanel||(this._headerPanel=this.getView("headerPanel")),this._headerPanel}setHighLight(ze,$e){oe(this)&&(ze&&ze.toggleClass("dx-highlight-outline",$e)&&ze.closest(".dx-editor-cell").toggleClass("dx-filter-modified",$e),this._getHeaderPanel().enableApplyButton($e))}applyFilter(){const ze=this._columnsController.getColumns();this._columnsController.beginUpdate();for(let $e=0;$e<ze.length;$e++){const Be=ze[$e];void 0!==Be.bufferedFilterValue&&(this._columnsController.columnOption($e,"filterValue",Be.bufferedFilterValue),Be.bufferedFilterValue=void 0),void 0!==Be.bufferedSelectedFilterOperation&&(this._columnsController.columnOption($e,"selectedFilterOperation",Be.bufferedSelectedFilterOperation),Be.bufferedSelectedFilterOperation=void 0)}this._columnsController.endUpdate(),this.removeHighLights()}removeHighLights(){if(oe(this)){const ze=this.getView("columnHeadersView").element();ze.find(`.${this.addWidgetPrefix("filter-row")} .dx-highlight-outline`).removeClass("dx-highlight-outline"),ze.find(`.${this.addWidgetPrefix("filter-row")} .dx-filter-modified`).removeClass("dx-filter-modified"),this._getHeaderPanel().enableApplyButton(!1)}}setCurrentColumnForFiltering(ze){this._currentColumn=ze}getCurrentColumnForFiltering(){return this._currentColumn}}},extenders:{controllers:{data:Oe=>class extends Oe{skipCalculateColumnFilters(){return!1}_calculateAdditionalFilter(){if(this.skipCalculateColumnFilters())return super._calculateAdditionalFilter();const ze=[super._calculateAdditionalFilter()],$e=this._columnsController.getVisibleColumns(null,!0),Be=this._applyFilterController;return(0,f.__)($e,function(){var Ue;const ot=(null===(Ue=Be.getCurrentColumnForFiltering())||void 0===Ue?void 0:Ue.index)===this.index;if(this.allowFiltering&&this.calculateFilterExpression&&(0,T.O9)(this.filterValue)&&!ot){const st=this.createFilterExpression(this.filterValue,this.selectedFilterOperation||this.defaultFilterOperation,"filterRow");ze.push(st)}}),_.A.combineFilters(ze)}},columnsResizer:Oe=>class extends Oe{_startResizing(){const ze=this;if(super._startResizing.apply(ze,arguments),ze.isResizing()){const $e=ze._columnHeadersView.getFilterRangeOverlayInstance();if($e){const Be=$e.$element().closest("td").index();(Be===ze._targetPoint.columnIndex||Be===ze._targetPoint.columnIndex+1)&&$e.$content().hide()}}}_endResizing(){const ze=this;let $e;if(ze.isResizing()){const Be=ze._columnHeadersView.getFilterRangeOverlayInstance();Be&&($e=Be.$element().closest("td"),ze._columnHeadersView._updateFilterRangeOverlay({width:(0,S.Ot)($e,!0)+1}),Be.$content().show())}super._endResizing.apply(ze,arguments)}},editing:Oe=>class extends Oe{updateFieldValue(ze){return ze.column.lookup&&(this._needUpdateLookupDataSource=!0),super.updateFieldValue.apply(this,arguments)}_afterSaveEditData(ze){var $e;return this._needUpdateLookupDataSource&&!ze&&(null===($e=this.getView("columnHeadersView"))||void 0===$e||$e.updateLookupDataSource()),this._needUpdateLookupDataSource=!1,super._afterSaveEditData.apply(this,arguments)}_afterCancelEditData(){return this._needUpdateLookupDataSource=!1,super._afterCancelEditData.apply(this,arguments)}}},views:{columnHeadersView:Oe=>class extends Oe{init(){super.init(),this._applyFilterViewController=this.getController("applyFilter")}optionChanged(ze){switch(ze.name){case"filterRow":case"showColumnLines":this._invalidate(!0,!0),ze.handled=!0;break;case"syncLookupFilterValues":ze.value?this.updateLookupDataSource():this.render(),ze.handled=!0;break;default:super.optionChanged(ze)}}_updateEditorValue(ze,$e){const Be=ae($e);Be&&Be.option("value",be(this,ze.index,$e))}_columnOptionChanged(ze){const $e=this,{optionNames:Be}=ze;let Ue,ot,st,et;if(_.A.checkChanges(Be,["filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","filterValues","filterType"])&&void 0!==ze.columnIndex){const Ke=$e._columnsController.getVisibleIndex(ze.columnIndex),Ye=$e._columnsController.columnOption(ze.columnIndex);if(Ue=$e._getCellElement($e.element().find(`.${$e.addWidgetPrefix("filter-row")}`).index(),Ke)??(0,o.A)(),ot=Ue.find(".dx-editor-container").first(),Be.filterValue||Be.bufferedFilterValue){$e._updateEditorValue(Ye,ot);const Pe=Ue.find(`.${$e.addWidgetPrefix("filter-range-overlay")}`).data("dxOverlay");Pe&&(st=Pe.$content().find(".dx-editor-container"),$e._updateEditorValue(Ye,st.first()),$e._updateEditorValue(Ye,st.last())),(!Pe||!Pe.option("visible"))&&$e._updateFilterRangeContent(Ue,ee($e,Ye))}(Be.selectedFilterOperation||Be.bufferedSelectedFilterOperation)&&Ke>=0&&Ye&&(et=Ue.find(".dx-menu"),et.length&&($e._updateFilterOperationChooser(et,Ye,ot),"between"===de($e,Ye)?$e._renderFilterRangeContent(Ue,Ye):ot.find(".dx-filter-range-content").length&&($e._renderEditor(ot,$e._getEditorOptions(ot,Ye)),$e._hideFilterRange())))}else super._columnOptionChanged(ze)}_renderCore(){return this._filterRangeOverlayInstance=null,super._renderCore.apply(this,arguments)}_resizeCore(){var ze;super._resizeCore.apply(this,arguments),null===(ze=this._filterRangeOverlayInstance)||void 0===ze||ze.repaint()}isFilterRowVisible(){return this._isElementVisible(this.option("filterRow"))}isVisible(){return super.isVisible()||this.isFilterRowVisible()}_initFilterRangeOverlay(ze,$e){const Be=this,Ue={},ot=ze.find(".dx-editor-container"),st=Be.addWidgetPrefix("filter-range-overlay"),et=(0,o.A)("<div>").addClass(st).appendTo(ze);return Be._createComponent(et,u.A,{height:"auto",shading:!1,showTitle:!1,focusStateEnabled:!1,hideOnOutsideClick:!0,wrapperAttr:{class:st},animation:!1,position:{my:"top",at:"top",of:ot.length&&ot||ze,offset:"0 -1"},contentTemplate(Ke){let Ye,Pe=(0,o.A)("<div>").addClass(`dx-editor-container ${Be.addWidgetPrefix("filter-range-start")}`).appendTo(Ke);return $e=Be._columnsController.columnOption($e.index),Ye=Be._getEditorOptions(Pe,$e),Ye.sharedData=Ue,Be._renderEditor(Pe,Ye),y.A.on(Pe.find(te),"keydown",Se=>{let Re=ze.find("[tabindex]").not(Se.target).first();"tab"===(0,d.YD)(Se)&&Se.shiftKey&&(Se.preventDefault(),Be._hideFilterRange(),Re.length||(Re=ze.prev().find("[tabindex]").last()),y.A.trigger(Re,"focus"))}),Pe=(0,o.A)("<div>").addClass(`dx-editor-container ${Be.addWidgetPrefix("filter-range-end")}`).appendTo(Ke),Ye=Be._getEditorOptions(Pe,$e),Ye.sharedData=Ue,Be._renderEditor(Pe,Ye),y.A.on(Pe.find(te),"keydown",Se=>{"tab"===(0,d.YD)(Se)&&!Se.shiftKey&&(Se.preventDefault(),Be._hideFilterRange(),y.A.trigger(ze.next().find("[tabindex]").first(),"focus"))}),(0,o.A)(Ke).addClass(Be.getWidgetContainerClass())},onShown(Ke){const Ye=Ke.component.$content().find(".dx-editor-container").first();y.A.trigger(Ye.find(te),"focus")},onHidden(){$e=Be._columnsController.columnOption($e.index),ze.find(".dx-menu").parent().addClass("dx-editor-with-menu"),"between"===de(Be,$e)&&(Be._updateFilterRangeContent(ze,ee(Be,$e)),Be.component.updateDimensions())}})}_updateFilterRangeOverlay(ze){const $e=this._filterRangeOverlayInstance;$e&&$e.option(ze)}_showFilterRange(ze,$e){const Be=this,Ue=ze.children(`.${Be.addWidgetPrefix("filter-range-overlay")}`);let ot=Ue.length&&Ue.data("dxOverlay");!ot&&$e&&(ot=Be._initFilterRangeOverlay(ze,$e)),ot.option("visible")||(Be._filterRangeOverlayInstance&&Be._filterRangeOverlayInstance.hide(),Be._filterRangeOverlayInstance=ot,Be._updateFilterRangeOverlay({width:(0,S.Ot)(ze,!0)+1}),Be._filterRangeOverlayInstance&&Be._filterRangeOverlayInstance.show())}_hideFilterRange(){const ze=this._filterRangeOverlayInstance;ze&&ze.hide()}getFilterRangeOverlayInstance(){return this._filterRangeOverlayInstance}_createRow(ze){const $e=super._createRow(ze);return"filter"===ze.rowType&&($e.addClass(this.addWidgetPrefix("filter-row")),this.option("useLegacyKeyboardNavigation")||y.A.on($e,"keydown",Be=>(0,h.sf)("filterRow",this,Be))),$e}_getRows(){const ze=super._getRows();return this.isFilterRowVisible()&&ze.push({rowType:"filter"}),ze}_renderFilterCell(ze,$e){const Be=this,{column:Ue}=$e,ot=(0,o.A)(ze);Be.component.option("showColumnHeaders")&&Be.setAria("describedby",Ue.headerId,ot),Be.setAria("label",c.A.format("dxDataGrid-ariaFilterCell"),ot),ot.addClass("dx-editor-cell");const st=(0,o.A)("<div>").appendTo(ot),et=(0,o.A)("<div>").addClass("dx-editor-container").appendTo(st);if("between"===de(Be,Ue))Be._renderFilterRangeContent(ot,Ue);else{const Ye=Be._getEditorOptions(et,Ue);Be._renderEditor(et,Ye)}const{alignment:Ke}=Ue;Ke&&"center"!==Ke&&ot.find(te).first().css("textAlign",Ue.alignment),Ue.filterOperations&&Ue.filterOperations.length&&Be._renderFilterOperationChooser(st,Ue,et)}_renderCellContent(ze,$e){const Be=this,{column:Ue}=$e;if("filter"===$e.rowType)if(Ue.command)ze.html("&nbsp;");else if(Ue.allowFiltering)return void Be.renderTemplate(ze,Be._renderFilterCell.bind(Be),$e).done(()=>{Be._updateCell(ze,$e)});super._renderCellContent.apply(this,arguments)}_getEditorOptions(ze,$e){const Be=this,Ue={editorOptions:{inputAttr:Be._getFilterInputAccessibilityAttributes($e)}},ot=(0,b.X)(Ue,$e,{value:be(Be,$e.index,ze),parentType:"filterRow",showAllText:Be.option("filterRow.showAllText"),updateValueTimeout:"onClick"===Be.option("filterRow.applyFilter")?0:700,width:null,setValue(st,et){!function(Oe,ze){const $e=""===ze.value?null:ze.value,Be=ze.container,Ue=Oe._columnsController.columnOption(ze.column.index),ot=be(Oe,Ue.index,Be);if(!(0,T.O9)(ot)&&!(0,T.O9)($e))return;Oe._applyFilterViewController.setHighLight(Be,ot!==$e);const st=oe(Oe)?"bufferedFilterValue":"filterValue",et=function(Oe,ze,$e,Be){if("between"===de(Oe,$e)){const Ue=he(Oe,$e);return Be.hasClass(Oe.addWidgetPrefix("filter-range-start"))?[ze,Array.isArray(Ue)?Ue[1]:void 0]:[Array.isArray(Ue)?Ue[0]:Ue,ze]}return ze}(Oe,$e,Ue,Be),Ke="between"===de(Oe,Ue),Ye=ze.notFireEvent||Ke&&Array.isArray(et)&&et.includes(void 0);Oe._columnsController.columnOption(Ue.index,st,et,Ye)}(Be,{column:$e,value:st,container:ze,notFireEvent:et})}});return"between"===de(Be,$e)&&(ot.placeholder=ze.hasClass(Be.addWidgetPrefix("filter-range-start"))?Be.option("filterRow.betweenStartText"):Be.option("filterRow.betweenEndText")),ot}_getFilterInputAccessibilityAttributes(ze){const $e=c.A.format("dxDataGrid-ariaFilterCell");return this.component.option("showColumnHeaders")?{"aria-label":$e,"aria-describedby":ze.headerId}:{"aria-label":$e}}_renderEditor(ze,$e){ze.empty();const Be=(0,o.A)("<div>").appendTo(ze),Ue=this._dataController.dataSource();if($e.lookup&&this.option("syncLookupFilterValues")){this._applyFilterViewController.setCurrentColumnForFiltering($e);const ot=this._dataController.getCombinedFilter();this._applyFilterViewController.setCurrentColumnForFiltering(null);const st=_.A.getWrappedLookupDataSource($e,Ue,ot),et=(0,W.A)({},$e,{lookup:(0,W.A)({},$e.lookup,{dataSource:st})});return this._editorFactoryController.createEditor(Be,et)}return this._editorFactoryController.createEditor(Be,$e)}_renderFilterRangeContent(ze,$e){const Be=this,Ue=ze.find(".dx-editor-container").first();Ue.empty();const ot=(0,o.A)("<div>").addClass("dx-filter-range-content").attr("tabindex",this.option("tabIndex"));y.A.on(ot,"focusin",()=>{Be._showFilterRange(ze,$e)}),ot.appendTo(Ue),Be._updateFilterRangeContent(ze,ee(Be,$e))}_updateFilterRangeContent(ze,$e){const Be=ze.find(".dx-filter-range-content");Be.length&&(""===$e?Be.html("&nbsp;"):Be.text($e))}_updateFilterOperationChooser(ze,$e,Be){const Ue=this;let ot;const st=function(){const Ke=a.A.getInstance(ze);Ke&&Ke.option("focusedElement",null),ot&&Ue._focusEditor(Be)},et=this._editorFactoryController;Ue._createComponent(ze,a.A,{integrationOptions:{},activeStateEnabled:!1,selectionMode:"single",cssClass:`${Ue.getWidgetContainerClass()} dx-cell-focus-disabled dx-filter-menu`,showFirstSubmenuMode:"onHover",hideSubmenuOnMouseLeave:!0,items:[{disabled:!($e.filterOperations&&$e.filterOperations.length),icon:x[de(Ue,$e)||"default"],selectable:!1,items:Ue._getFilterOperationMenuItems($e)}],onItemRendered:Ke=>{let{itemElement:Ye}=Ke;this.setAria("label",z,(0,o.A)(Ye))},onItemClick(Ke){const Ye=Ke.itemData.name,Pe=de(Ue,$e);let Se=!1;const Re=oe(Ue),Fe={};if(!(Ke.itemData.items||Ye&&Ye===Pe)){if(Ye?(Fe[Re?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=Ye,("between"===Ye||"between"===Pe)&&(Se="between"===Ye,Fe[Re?"bufferedFilterValue":"filterValue"]=null)):(Fe[Re?"bufferedFilterValue":"filterValue"]=null,Fe[Re?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=$e.defaultSelectedFilterOperation||null),Ue._columnsController.columnOption($e.index,Fe),Ue._applyFilterViewController.setHighLight(Be,!0),!Ye){const Xe=ae(Be);Xe&&"dxDateBox"===Xe.NAME&&!Xe.option("isValid")&&(Xe.clear(),Xe.option("isValid",!0))}Se?Ue._showFilterRange(Be.closest(".dx-editor-cell"),$e):Ue._focusEditor(Be)}},onSubmenuShowing(){ot=Ue._isEditorFocused(Be),et.loseFocus()},onSubmenuHiding(){y.A.trigger(ze,"blur"),st()},onContentReady(Ke){y.A.on(ze,"blur",()=>{Ke.component._hideSubmenuAfterTimeout(),st()})},rtlEnabled:Ue.option("rtlEnabled")})}_isEditorFocused(ze){return ze.hasClass("dx-focused")||ze.parents(".dx-focused").length}_focusEditor(ze){this._editorFactoryController.focus(ze),y.A.trigger(ze.find(te),"focus")}_renderFilterOperationChooser(ze,$e,Be){let ot;this.option("filterRow.showOperationChooser")&&(ze.addClass("dx-editor-with-menu"),ot=(0,o.A)("<div>").prependTo(ze),this._updateFilterOperationChooser(ot,$e,Be))}_getFilterOperationMenuItems(ze){const $e=this;let Be=[{}];const Ue=$e.option("filterRow"),ot=Ue&&Ue.operationDescriptions||{};if(ze.filterOperations&&ze.filterOperations.length){const st=ze.filterOperations.filter(et=>(0,T.O9)(w[et]));Be=(0,f.Tj)(st,et=>{const Ke=w[et];return{name:et,selected:(de($e,ze)||ze.defaultFilterOperation)===et,text:ot[Ke],icon:x[et]}}),Be.push({name:null,text:Ue&&Ue.resetOperationText,icon:x.default})}return Be}_handleDataChanged(ze){var $e,Be,Ue,ot,st;const et=null===($e=this._dataController)||void 0===$e||null===(Be=$e.dataSource)||void 0===Be?void 0:Be.call($e),Ke=null==et||null===(Ue=et.lastLoadOptions)||void 0===Ue?void 0:Ue.call(et);var Ye;super._handleDataChanged.apply(this,arguments),(null!==(ot=ze.operationTypes)&&void 0!==ot&&ot.filtering||null!==(st=ze.operationTypes)&&void 0!==st&&st.fullReload)&&this.updateLookupDataSource((null===(Ye=ze.operationTypes)||void 0===Ye?void 0:Ye.filtering)||Ke?.filter)}updateLookupDataSource(ze){if(!this.option("syncLookupFilterValues")||!this.element())return;const $e=this._columnsController.getVisibleColumns(),Be=this._dataController.dataSource(),Ue=this._applyFilterViewController,ot=this.element().find(`.${this.addWidgetPrefix("filter-row")}`).index();-1!==ot&&$e.forEach((st,et)=>{if(!st.lookup||st.calculateCellValue!==st.defaultCalculateCellValue)return;const Ke=this._getCellElement(ot,et),Ye=ae(Ke?.find(".dx-editor-container"));if(Ye){Ue.setCurrentColumnForFiltering(st);const Pe=this._dataController.getCombinedFilter()||null;Ue.setCurrentColumnForFiltering(null);const Se=Ye.option("dataSource");if(!ze||!(0,P.RL)(Se.__dataGridSourceFilter||null,Pe)){const Fe=_.A.getWrappedLookupDataSource(st,Be,Pe);Ye.option("dataSource",Fe)}}})}},headerPanel:Oe=>class extends Oe{init(){super.init(),this._dataController=this.getController("data"),this._applyFilterViewController=this.getController("applyFilter")}optionChanged(ze){"filterRow"===ze.name?(this._invalidate(),ze.handled=!0):super.optionChanged(ze)}_getToolbarItems(){const ze=super._getToolbarItems();return this._prepareFilterItem().concat(ze)}_prepareFilterItem(){const ze=this,$e=[];if(ze._isShowApplyFilterButton()){const Be=ze.option("filterRow.applyFilterText"),Ke={widget:"dxButton",options:{icon:"apply-filter",disabled:!ze._columnsController.getColumns().filter(Ye=>void 0!==Ye.bufferedFilterValue).length,onClick:function(){ze._applyFilterViewController.applyFilter()},hint:Be,text:Be,onInitialized:function(Ye){(0,o.A)(Ye.element).addClass(ze._getToolbarButtonClass("dx-apply-button"))}},showText:"inMenu",name:"applyFilterButton",location:"after",locateInMenu:"auto",sortIndex:10};$e.push(Ke)}return $e}_isShowApplyFilterButton(){const ze=this.option("filterRow");return!(null==ze||!ze.visible)&&"onClick"===ze.applyFilter}enableApplyButton(ze){this.setToolbarItemDisabled("applyFilterButton",!ze)}isVisible(){return super.isVisible()||this._isShowApplyFilterButton()}}}}}},6010:(In,Ze,M)=>{"use strict";M.d(Ze,{a:()=>ie});var W=M(6021),o=M(1830),P=M(9551),b=M(127),f=M(6428),S=M(3376),T=M(8736),y=M(5704),d=M(3090),c=M(1221),s=M(8360);function a(re){const q=function(Q,te){return te?`${te}/${Q}`:Q},Y=function(Q,te){let pe=[];return Q.forEach(z=>{if(z.items){const oe=Y(z.items,q(z.text,te));pe=pe.concat(oe)}z.selected&&pe.push(q(z.text,te))}),pe},Z=re&&re.getController("headerFilter");return{dataTypes:["string","date","datetime","number","boolean","object"],calculateFilterExpression:function(Q,te,pe){const z=[],oe=Q.length-1;return Q&&Q.forEach((ae,ee)=>{if((0,f.G3)(ae)||(0,f.IZ)(ae)){const he=(0,f.zk)(ae,pe,[],"headerFilter");z.push(he)}else{const he=(0,f.zk)([te.dataField,"=",ae],pe,[],"headerFilter");z.push(he)}ee!==oe&&z.push("or")}),1===z.length?z[0]:z},editorTemplate(Q,te){const pe=(0,y.A)("<div>").addClass("dx-filterbuilder-item-value-text").appendTo(te),z=(0,d.X)(!0,{},re.columnOption(Q.field.dataField));return(0,f.rx)(pe,Q.text&&Q.text.split("|")),z.filterType="include",z.filterValues=Q.value?Q.value.slice():[],Z.showHeaderFilterMenuBase({columnElement:pe,column:z,apply(){Q.setValue(this.filterValues),Z.hideHeaderFilterMenu(),Q.closeEditor()},onHidden(){Q.closeEditor()},isFilterBuilder:!0}),te},customizeText:function(Q,te){te=te||{};const{value:pe}=Q;let z=re.columnOption(Q.field.dataField);const oe=z&&z.headerFilter,ae=z&&z.lookup,ee=te.values||[pe];if(oe&&oe.dataSource||ae&&ae.dataSource){const de=new W.cY,ue=te.items||new W.cY;if(!te.items){z=(0,d.X)({},z,{filterType:"include",filterValues:ee});const be=Z.getDataSource(z);be.paginate=!1;const ve=new c.q(be),le=ve.store().key();if(le){const{values:Ce}=te;if(Ce&&Ce.length>1){const ye=Ce.reduce((ge,fe)=>(ge.length&&ge.push("or"),ge.push([le,"=",fe]),ge),[]);ve.filter(ye)}else ve.filter([le,"=",Q.value])}else Q.field.calculateDisplayValue&&b.A.log("W1017");te.items=ue,ve.load().done(ue.resolve)}return ue.done(be=>{const ve=ee.indexOf(Q.value);de.resolve(Y(be,null)[ve])}),de}return Z.getHeaderItemText(pe,z,0,re.option("headerFilter"))}}}function h(re){const q=a(re);return(0,d.X)({},q,{calculateFilterExpression(Y,Z,Q){const te=q.calculateFilterExpression(Y,Z,Q);return te&&0!==te.length?"!"===te[0]?te:["!",te]:null},name:"noneof",icon:"unselectall",caption:s.A.format("dxFilterBuilder-filterOperationNoneOf")})}const g=["=","<>","<","<=",">",">=","notcontains","contains","startswith","endswith","between"];function w(re){return re.name||re.dataField}const I=function(re){const q=re.filterValues||[];return!P.A.getGroupInterval(re)&&!(re.headerFilter&&re.headerFilter.dataSource)||1===q.length&&null===q[0]},N=function(re){if((0,o.O9)(re.filterValue)){const Y=re.selectedFilterOperation||re.defaultFilterOperation||(0,f.PZ)(re);return[w(re),Y,re.filterValue]}return null},G=function(re){let q,Y;const{filterValues:Z}=re;return Z?(1===Z.length&&I(re)&&!Array.isArray(Z[0])?(q="exclude"===re.filterType?"<>":"=",Y=Z[0]):(q="exclude"===re.filterType?"noneof":"anyof",Y=Z),[w(re),q,Y]):null},k=function(re,q,Y){const Z=function(re,q){if(!re)return{filterType:"include",filterValues:void 0};let Y;const Z=re[1],Q=re[2],te=Array.isArray(Q);if(!te&&!I(q))return{filterType:"include",filterValues:void 0};switch(Z){case"anyof":case"=":Y="include";break;case"noneof":case"<>":Y="exclude";break;default:return{filterType:"include",filterValues:void 0}}return{filterType:Y,filterValues:te?Q:[Q]}}(Y,q);re.columnOption(w(q),Z)},U=function(re,q,Y){let Z,Q=Y?.[1];const te=Y?.[2],pe=q.filterOperations||q.defaultFilterOperations;(!pe||pe.indexOf(Q)>=0||Q===q.defaultFilterOperation)&&g.includes(Q)&&null!==te?(Q===q.defaultFilterOperation&&!(0,o.O9)(q.selectedFilterOperation)&&(Q=q.selectedFilterOperation),Z={filterValue:te,selectedFilterOperation:Q}):Z={filterValue:void 0,selectedFilterOperation:void 0},re.columnOption(w(q),Z)},ie={defaultOptions:()=>({filterValue:null,filterSyncEnabled:"auto"}),controllers:{filterSync:class B extends S.Ay.Controller{init(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._dataController.isFilterSyncActive()&&(this._columnsController.isAllDataTypesDefined()?this._initSync():this._dataController.dataSourceChanged.add(()=>this._initSync()))}publicMethods(){return["getCustomFilterOperations"]}syncFilterValue(){const q=this,Y=this._columnsController.getFilteringColumns();this._skipSyncColumnOptions=!0,Y.forEach(Z=>{const Q=(0,f.fM)(q.option("filterValue"),w(Z));if(1===Q.length){const te=Q[0];k(this._columnsController,Z,te),U(this._columnsController,Z,te)}else(0,o.O9)(Z.filterValues)&&k(this._columnsController,Z,null),(0,o.O9)(Z.filterValue)&&U(this._columnsController,Z,null)}),this._skipSyncColumnOptions=!1}_initSync(){const q=this._columnsController.getColumns(),Y=this._dataController.pageIndex();if(function D(re){re.forEach(q=>{const Y=w(q);if(!(0,o.O9)(Y)&&q.allowFiltering)throw new b.A.Error("E1049",q.caption)})}(q),!this.option("filterValue")){const Z=this._columnsController.getFilteringColumns(),Q=this.getFilterValueFromColumns(Z);this._silentOption("filterValue",Q)}this.syncFilterValue(),this._dataController.pageIndex(Y)}_getSyncFilterRow(q,Y){const Z=N(Y);return(0,o.O9)(Z)?(0,f.nJ)(q,Z):(0,f.HO)(q,w(Y))}_getSyncHeaderFilter(q,Y){const Z=G(Y);return Z?(0,f.nJ)(q,Z):(0,f.HO)(q,w(Y))}getFilterValueFromColumns(q){if(!this._dataController.isFilterSyncActive())return null;const Y=["and"];return q&&q.forEach(Z=>{const Q=G(Z),te=N(Z);Q&&(0,f.B5)(Q,Y),te&&(0,f.B5)(te,Y)}),(0,f.SK)(Y)}syncFilterRow(q,Y){this.option("filterValue",this._getSyncFilterRow(this.option("filterValue"),q))}syncHeaderFilter(q){this.option("filterValue",this._getSyncHeaderFilter(this.option("filterValue"),q))}getCustomFilterOperations(){const q=this.option("filterBuilder.customOperations")??[];return[(re=this.component,(0,d.X)(a(re),{name:"anyof",icon:"selectall",caption:s.A.format("dxFilterBuilder-filterOperationAnyOf")})),h(this.component)].concat(q);var re}}},extenders:{controllers:{data:re=>class extends re{optionChanged(q){switch(q.name){case"filterValue":this._applyFilter(),this.isFilterSyncActive()&&this._filterSyncController.syncFilterValue(),q.handled=!0;break;case"filterSyncEnabled":q.handled=!0;break;case"columns":if(this.isFilterSyncActive()){const Y=this._columnsController.getColumnByPath(q.fullName);if(Y&&!this._filterSyncController._skipSyncColumnOptions){const Z=this._parseColumnPropertyName(q.fullName);this._filterSyncController._skipSyncColumnOptions=!0,"filterType"===Z?("exclude"===q.value||"exclude"===q.previousValue)&&this._filterSyncController.syncHeaderFilter(Y):"filterValues"===Z?this._filterSyncController.syncHeaderFilter(Y):["filterValue","selectedFilterOperation"].includes(Z)&&this._filterSyncController.syncFilterRow(Y,Y.filterValue),this._filterSyncController._skipSyncColumnOptions=!1}}super.optionChanged(q);break;default:super.optionChanged(q)}}isFilterSyncActive(){const q=this.option("filterSyncEnabled");return"auto"===q?this.option("filterPanel.visible"):q}skipCalculateColumnFilters(){return((0,o.O9)(this.option("filterValue"))||this._filterSyncController._skipSyncColumnOptions)&&this.isFilterSyncActive()}_calculateAdditionalFilter(){if(!1===this.option("filterPanel.filterEnabled"))return super._calculateAdditionalFilter();const q=[super._calculateAdditionalFilter()],Y=this._columnsController.getFilteringColumns();let Z=this.option("filterValue");if(this.isFilterSyncActive()){const pe=this._headerFilterController.getCurrentColumn(),z=this._applyFilterController.getCurrentColumnForFiltering(),oe=pe||z;(pe||(0,o.O9)(z?.filterValue))&&Z&&(Z=(0,f.HO)(Z,w(oe)))}const Q=this._filterSyncController.getCustomFilterOperations(),te=(0,f.zk)(Z,Y,Q,"filterBuilder");return te&&q.push(te),T.A.combineFilters(q)}_parseColumnPropertyName(q){const Y=q.match(/.*\.(.*)/);return Y?Y[1]:null}clearFilter(q){this.component.beginUpdate(),arguments.length>0?("filterValue"===q&&this.option("filterValue",null),super.clearFilter(q)):(this.option("filterValue",null),super.clearFilter()),this.component.endUpdate()}_applyFilter(){return this._filterSyncController._skipSyncColumnOptions?(new W.cY).resolve():super._applyFilter.apply(this,arguments)}}},views:{columnHeadersView:re=>class extends re{optionChanged(q){"filterValue"===q.name?this._updateHeaderFilterIndicators():super.optionChanged(q)}_isHeaderFilterEmpty(q){return this._dataController.isFilterSyncActive()?!(0,f.BF)(this.option("filterValue"),w(q)):super._isHeaderFilterEmpty(q)}_needUpdateFilterIndicators(){return!this._dataController.isFilterSyncActive()}}}}}},7214:(In,Ze,M)=>{"use strict";M.d(Ze,{h:()=>N});var W=M(5704),o=M(4859),P=M(6021),b=M(2660),f=M(1830),S=M(5572),T=M(3376),y=M(8736),d=M(4761);const N={defaultOptions:()=>({focusedRowEnabled:!1,autoNavigateToFocusedRow:!0,focusedRowKey:null,focusedRowIndex:-1,focusedColumnIndex:-1}),controllers:{focus:class _ extends T.Ay.ViewController{getKeyboardController(){return this.getController("keyboardNavigation")}getDataController(){return this.getController("data")}init(){this.component._optionsByReference.focusedRowKey=!0}optionChanged(k){const{name:U,value:B,previousValue:K}=k;switch(U){case"focusedRowIndex":this._focusRowByIndex(B),this.getKeyboardController()._fireFocusedRowChanged(),k.handled=!0;break;case"focusedRowKey":if(Array.isArray(B)&&JSON.stringify(B)===JSON.stringify(K))return;this._focusRowByKey(B),this.getKeyboardController()._fireFocusedRowChanged(),k.handled=!0;break;case"focusedColumnIndex":case"focusedRowEnabled":case"autoNavigateToFocusedRow":k.handled=!0;break;default:super.optionChanged(k)}}publicMethods(){return["navigateToRow","isRowFocused"]}isAutoNavigateToFocusedRow(){return"infinite"!==this.option("scrolling.mode")&&this.option("autoNavigateToFocusedRow")}_focusRowByIndex(k,U){this.option("focusedRowEnabled")&&((k=void 0!==k?k:this.option("focusedRowIndex"))<0?this.isAutoNavigateToFocusedRow()&&this._resetFocusedRow():this._focusRowByIndexCore(k,U))}_focusRowByIndexCore(k,U){const B=this.getDataController().pageSize(),K=()=>{if(this._isValidFocusedRowIndex(k)){let J=k-this.getDataController().getRowIndexOffset(!0);if(!U||U.paging&&!U.filtering){const re=this.getDataController()._getLastItemIndex();J=Math.min(J,re)}const ie=this.getDataController().getKeyByRowIndex(J,!0);(0,f.O9)(ie)&&!this.isRowFocused(ie)&&this.option("focusedRowKey",ie)}};if(B>=0)if(this._isLocalRowIndex(k))K();else{const J=Math.floor(k/this.getDataController().pageSize());(0,P.z7)(this.getDataController().pageIndex(J),this.getDataController().waitReady()).done(()=>{K()})}}_isLocalRowIndex(k){if(this.getKeyboardController()._isVirtualScrolling()){const B=Math.floor(k/this.getDataController().pageSize()),K=this.getDataController().virtualItemsCount(),J=K?K.begin:-1,ie=this.getDataController().getVisibleRows().length+this.getDataController().getRowIndexOffset(),re=Math.ceil(ie/this.getDataController().pageSize());return J<=k&&re>B}return!0}_setFocusedRowKeyByIndex(k){if(this._isValidFocusedRowIndex(k)){const U=Math.min(k-this.getDataController().getRowIndexOffset(),this.getDataController().items().length-1),B=this.getDataController().getKeyByRowIndex(U);(0,f.O9)(B)&&!this.isRowFocused(B)&&this.option("focusedRowKey",B)}}_focusRowByKey(k){(0,f.O9)(k)?this._navigateToRow(k,!0):this._resetFocusedRow()}_resetFocusedRow(){const k=this.option("focusedRowKey"),U=(0,f.O9)(k);!U&&this.option("focusedRowIndex")<0||(U&&this.option("focusedRowKey",null),this.getKeyboardController().setFocusedRowIndex(-1),this.option("focusedRowIndex",-1),this.getDataController().updateItems({changeType:"updateFocusedRow",focusedRowKey:null}),this.getKeyboardController()._fireFocusedRowChanged())}_isValidFocusedRowIndex(k){const U=this.getDataController().getVisibleRows()[k];return!U||"data"===U.rowType||"group"===U.rowType}navigateToRow(k){return this.isAutoNavigateToFocusedRow()||this.option("focusedRowIndex",-1),this._navigateToRow(k)}_navigateToRow(k,U){const B=this,K=B.isAutoNavigateToFocusedRow(),J=new P.cY;if(void 0===k||!this.getDataController().dataSource())return J.reject().promise();const ie=B.getFocusedRowIndexByKey(k);return!K&&U||ie>=0?B._navigateTo(k,J,U):this.getDataController().getPageIndexByKey(k).done(re=>{re<0?J.resolve(-1):re===this.getDataController().pageIndex()?this.getDataController().reload().done(()=>{B.isRowFocused(k)&&this.getDataController().getRowIndexByKey(k)>=0?J.resolve(B.getFocusedRowIndexByKey(k)):B._navigateTo(k,J,U)}).fail(J.reject):this.getDataController().pageIndex(re).done(()=>{B._navigateTo(k,J,U)}).fail(J.reject)}).fail(J.reject),J.promise()}_navigateTo(k,U,B){const K=this.getDataController().getRowIndexByKey(k),J=y.A.isVirtualRowRendering(this);this.isAutoNavigateToFocusedRow()&&J&&K<0?this._navigateToVirtualRow(k,U,B):this._navigateToVisibleRow(k,U,B)}_navigateToVisibleRow(k,U,B){if(B)this._triggerUpdateFocusedRow(k,U);else{const K=this.getFocusedRowIndexByKey(k);this.getView("rowsView").scrollToRowElement(k,U).done(()=>{U.resolve(K)})}}_navigateToVirtualRow(k,U,B){const K=this.getDataController()._rowsScrollController,J=y.A.getIndexByKey(k,this.getDataController().items(!0)),ie=this.getView("rowsView").getScrollable();if(K&&ie&&J>=0){const re=J+this.getDataController().getRowIndexOffset(!0),q=K.getItemOffset(re),Y=()=>{this.getDataController().totalCount()&&!this.getDataController().items().length||(this.component.off("contentReady",Y),B?this._triggerUpdateFocusedRow(k,U):U.resolve(re))};this.component.on("contentReady",Y),this.getView("rowsView").scrollTopPosition(q)}else U.resolve(-1)}_triggerUpdateFocusedRow(k,U){const B=this.getFocusedRowIndexByKey(k);if(this._isValidFocusedRowIndex(B)){let K;this.option("focusedRowEnabled")?this.getDataController().updateItems({changeType:"updateFocusedRow",focusedRowKey:k}):K=this.getView("rowsView").scrollToRowElement(k),(0,P.z7)(K).done(()=>{this.getKeyboardController().setFocusedRowIndex(B),U&&U.resolve(B)})}else U&&U.resolve(-1)}getFocusedRowIndexByKey(k){const U=this.getDataController().getRowIndexByKey(k,!0);return U>=0?U+this.getDataController().getRowIndexOffset(!0):-1}_focusRowByKeyOrIndex(){const k=this.option("focusedRowKey");let U=this.option("focusedRowIndex");if((0,f.O9)(k)){const B=this.getDataController().getRowIndexByKey(k);B>=0?(this.getKeyboardController()._isVirtualScrolling()&&(U=B+this.getDataController().getRowIndexOffset()),this.getKeyboardController().setFocusedRowIndex(U),this._triggerUpdateFocusedRow(k)):this._navigateToRow(k,!0).done(K=>{U>=0&&K<0?this._focusRowByIndex():U<0&&K>=0&&this.getKeyboardController().setFocusedRowIndex(K)})}else U>=0&&this._focusRowByIndex(U)}isRowFocused(k){const U=this.option("focusedRowKey");if((0,f.O9)(U))return(0,o.RL)(k,this.option("focusedRowKey"))}updateFocusedRow(k){const U=this,B=k.focusedRowIndex??U.getDataController().getRowIndexByKey(k.focusedRowKey),K=U.getView("rowsView");let J,ie;(0,b.__)(K.getTableElements(),(re,q)=>{const Y=0===re;J=(0,W.A)(q),U._clearPreviousFocusedRow(J,B);const Z=U._prepareFocusedRow({changedItem:U.getDataController().getVisibleRows()[B],$tableElement:J,focusedRowIndex:B});Y&&(ie=Z)}),!k.preventScroll&&ie&&K.scrollToElementVertically(ie)}_clearPreviousFocusedRow(k,U){const B=k.find(".dx-row.dx-row-focused").filter((K,J)=>{const ie=(0,W.A)(J).closest(`.${this.addWidgetPrefix("table")}`);return k.is(ie)});B.removeClass("dx-row-focused").removeClass("dx-cell-focus-disabled").removeAttr("tabindex"),B.children("td").removeAttr("tabindex"),0!==U&&(0,W.A)(this.getView("rowsView").getRowElement(0)).removeClass("dx-cell-focus-disabled").removeAttr("tabIndex")}_prepareFocusedRow(k){let U;const{changedItem:B}=k;if(B&&("data"===B.rowType||"group"===B.rowType)){const{focusedRowIndex:K}=k,{$tableElement:J}=k,ie=this.option("tabindex")||0,re=this.getView("rowsView");U=(0,W.A)(re._getRowElements(J).eq(K)),U.addClass("dx-row-focused").attr("tabindex",ie)}return U}}},extenders:{controllers:{keyboardNavigation:G=>class extends G{init(){const k=this.option("focusedRowIndex"),U=this.option("focusedColumnIndex");this.createAction("onFocusedRowChanging",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedRowChanged",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedCellChanging",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedCellChanged",{excludeValidators:["disabled","readOnly"]}),super.init(),this.setRowFocusType(),this._focusedCellPosition={},(0,f.O9)(k)&&k>=0&&(this._focusedCellPosition.rowIndex=k),(0,f.O9)(U)&&U>=0&&(this._focusedCellPosition.columnIndex=U)}setFocusedRowIndex(k){super.setFocusedRowIndex(k),this.option("focusedRowIndex",k)}setFocusedColumnIndex(k){super.setFocusedColumnIndex(k),this.option("focusedColumnIndex",k)}_escapeKeyHandler(k,U){return U||!this.option("focusedRowEnabled")?super._escapeKeyHandler(k,U):!!this.isCellFocusType()&&(this.setRowFocusType(),this._focus(this._getCellElementFromTarget(k.originalEvent.target),!0),!0)}_updateFocusedCellPosition(k,U){const B=super._updateFocusedCellPosition(k,U);return B&&B.columnIndex>=0&&this._fireFocusedCellChanged(k),B}},editorFactory:G=>class extends G{renderFocusOverlay(k,U){var B;const K=this.option("focusedRowEnabled");let J;K&&null!==(B=this._keyboardNavigationController)&&void 0!==B&&B.isRowFocusType()&&!this._editingController.isEditing()?K&&"row"===this._keyboardNavigationController._getElementType(k)&&!k.hasClass("dx-row-focused")&&(J=this._keyboardNavigationController.getFirstValidCellInRow(k),this._keyboardNavigationController.focus(J)):super.renderFocusOverlay(k,U)}},columns:G=>class extends G{getSortDataSourceParameters(k,U){let B=super.getSortDataSourceParameters.apply(this,arguments);const K=this._dataController._dataSource,J=this._dataController.store();let ie=J&&J.key();const re=K&&K.remoteOperations()||{},q=Object.keys(re).every(Y=>!re[Y]);if(ie&&(this.option("focusedRowEnabled")&&!1!==this._focusController.isAutoNavigateToFocusedRow()||U)){ie=Array.isArray(ie)?ie:[ie];const Y=ie.filter(Z=>!this.columnOption(Z,"sortOrder"));Y.length&&(B=B||[],q?B.push({selector:K.getDataIndexGetter(),desc:!1}):Y.forEach(Z=>B.push({selector:Z,desc:!1})))}return B}},data:G=>class extends G{_applyChange(k){if(!k||"updateFocusedRow"!==k.changeType)return super._applyChange.apply(this,arguments)}_fireChanged(k){if(super._fireChanged(k),this.option("focusedRowEnabled")&&this._dataSource){const B="update"===k.changeType&&k.repaintChangesOnly&&k.changeTypes&&k.changeTypes.indexOf("remove")>=0;"refresh"===k.changeType&&k.items.length||B?(this._updatePageIndexes(),this._updateFocusedRow(k)):"append"===k.changeType||"prepend"===k.changeType?this._updatePageIndexes():"update"===k.changeType&&k.repaintChangesOnly&&this._updateFocusedRow(k)}}_updatePageIndexes(){const k=this._lastRenderingPageIndex||0,U=this._rowsScrollController?this._rowsScrollController.pageIndex():0;this._lastRenderingPageIndex=U,this._isPagingByRendering=U!==k}isPagingByRendering(){return this._isPagingByRendering}_updateFocusedRow(k){const U=k.operationTypes||{},{reload:B,fullReload:K,pageIndex:J,paging:ie}=U,re=this._keyboardNavigationController._isVirtualScrolling(),q=ie&&!re,Y=this.option("focusedRowKey"),Z=this._focusController.isAutoNavigateToFocusedRow();if(B&&!1===J&&!K&&(0,f.O9)(Y))this._focusController._navigateToRow(Y,!0).done(te=>{te<0&&this._focusController._focusRowByIndex(void 0,U)});else if(q&&Z){const te=this.getRowIndexByKey(Y),pe=this.option("focusedRowIndex");pe>=0&&(pe===te||!(te>=0))&&this._focusController._focusRowByIndex(pe,U)}else q&&!Z&&this.getRowIndexByKey(Y)<0?this.option("focusedRowIndex",-1):U.fullReload&&this._focusController._focusRowByKeyOrIndex()}getPageIndexByKey(k){const U=this,B=new P.cY;return U.getGlobalRowIndexByKey(k).done(K=>{B.resolve(K>=0?Math.floor(K/U.pageSize()):-1)}).fail(B.reject),B.promise()}getGlobalRowIndexByKey(k){return this._dataSource.group()?this._calculateGlobalRowIndexByGroupedData(k):this._calculateGlobalRowIndexByFlatData(k)}_calculateGlobalRowIndexByFlatData(k,U,B){const K=this,J=new P.cY,ie=K._dataSource;if(Array.isArray(k)||(0,S.MF)(k))return J.resolve(-1).promise();let re=K._generateFilterByKey(k);return ie.load({filter:K._concatWithCombinedFilter(re),skip:0,take:1}).done(q=>{q.length>0?(re=K._generateOperationFilterByKey(k,q[0],B),ie.load({filter:K._concatWithCombinedFilter(re,U),skip:0,take:1,requireTotalCount:!0}).done((Y,Z)=>{J.resolve(Z.totalCount)})):J.resolve(-1)}),J.promise()}_concatWithCombinedFilter(k,U){const B=this.getCombinedFilter();return y.A.combineFilters([k,B,U])}_generateBooleanFilter(k,U,B){const{desc:K}=B;switch(!0){case!1===U&&K:return[k,"=",!0];case!1===U&&!K:return[k,"=",null];case!0===U&&!K:case!(0,f.Lm)(U)&&K:return[k,"<>",U];default:return}}_generateOperationFilterByKey(k,U,B){const K=this,J=K.option("dateSerializationFormat"),ie=K._dataSource.remoteOperations().filtering,re=K._dataSource.remoteOperations().sorting;let q=K._generateFilterByKey(k,"<"),Y=K._columnsController.getSortDataSourceParameters(!ie,!0);if(B){const Z=K._columnsController.getGroupDataSourceParameters(!ie);Z&&(Y=Y?Z.concat(Y):Z)}return Y&&Y.slice().reverse().forEach(Z=>{const{selector:Q,desc:te,compare:pe}=Z,{getter:z,rawValue:oe,safeValue:ae}=((G,k,U)=>{let{isRemoteFiltering:B,dateSerializationFormat:K,getSelector:J}=U;const{selector:ie}=G,re=(0,f.Tn)(ie)?ie:J(ie),q=re?re(k):k[ie];return{getter:re,rawValue:q,safeValue:B&&(0,f.$P)(q)?d.A.serializeDate(q,K):q}})(Z,U,{isRemoteFiltering:ie,dateSerializationFormat:J,getSelector:ee=>K._columnsController.columnOption(ee,"selector")});if(q=[[Q,"=",ae],"and",q],null===oe||(0,f.Lm)(oe)){const ee=K._generateBooleanFilter(Q,ae,te);ee&&(q=[ee,"or",q])}else{const ee=te?">":"<";let he;pe&&!re?he=de=>"<"===ee?pe(oe,z(de))>=1:pe(oe,z(de))<=-1:(he=[Q,ee,ae],te||(he=[he,"or",[Q,"=",null]])),q=[he,"or",q]}}),q}_generateFilterByKey(k,U){const B=this._dataSource.key();let K=[];if(U||(U="="),Array.isArray(B))for(let J=0;J<B.length;++J){const ie=k[B[J]];ie&&(K.length>0&&K.push("and"),K.push([B[J],U,ie]))}else K=[B,U,k];return K}_getLastItemIndex(){return this.items(!0).length-1}},editing:G=>class extends G{_deleteRowCore(k){const U=super._deleteRowCore.apply(this,arguments),B=this._dataController.getKeyByRowIndex(k);U.done(()=>{const K=this._dataController.getRowIndexByKey(B),J=this._dataController.getVisibleRows();-1===K&&!J.length&&this._focusController._resetFocusedRow()})}}},views:{rowsView:G=>class extends G{_createRow(k){const U=super._createRow.apply(this,arguments);return this.option("focusedRowEnabled")&&k&&this._focusController.isRowFocused(k.key)&&U.addClass("dx-row-focused"),U}_checkRowKeys(k){if(super._checkRowKeys.apply(this,arguments),this.option("focusedRowEnabled")&&this.option("dataSource")){const U=this._dataController.store();U&&!U.key()&&this._dataController.fireError("E1042","Row focusing")}}_update(k){"updateFocusedRow"===k.changeType?this.option("focusedRowEnabled")&&this._focusController.updateFocusedRow(k):super._update(k)}updateFocusElementTabIndex(k,U){this.option("focusedRowEnabled")?this._setFocusedRowElementTabIndex(U):super.updateFocusElementTabIndex(k)}_setFocusedRowElementTabIndex(k){const U=this.option("focusedRowKey"),B=this.option("tabIndex")??0,K=this._columnsController;let J=this._dataController.getRowIndexByKey(U),ie=this.option("focusedColumnIndex");const re=this._findRowElementForTabIndex(),q=this._dataController.dataSource(),Y=q?.operationTypes(),Z=!Y||Y.paging;(0,f.O9)(this._scrollToFocusOnResize)||(this._scrollToFocusOnResize=()=>{this.scrollToElementVertically(this._findRowElementForTabIndex()),this.resizeCompleted.remove(this._scrollToFocusOnResize)}),re.attr("tabIndex",B);const Q=this.option("focusedRowIndex")-this._dataController.getRowIndexOffset(!0);!Z&&J<0&&Q>=0&&this._focusController.updateFocusedRow({focusedRowIndex:Q,preventScroll:k}),J>=0&&!k&&(ie<0&&(ie=0),J+=this._dataController.getRowIndexOffset(),ie+=K.getColumnIndexOffset(),this._keyboardNavigationController.setFocusedCellPosition(J,ie),this._focusController.isAutoNavigateToFocusedRow()&&!Z&&!this._dataController.isPagingByRendering()&&(this.resizeCompleted.remove(this._scrollToFocusOnResize),this.resizeCompleted.add(this._scrollToFocusOnResize)))}_findRowElementForTabIndex(){const k=this.option("focusedRowKey"),U=this._dataController.getRowIndexByKey(k);return(0,W.A)(this.getRowElement(U>=0?U:0))}scrollToRowElement(k){const U=this._dataController.getRowIndexByKey(k),B=(0,W.A)(this.getRow(U));return this.scrollToElementVertically(B)}scrollToElementVertically(k){const U=this.getScrollable();if(U&&k.length){const B=U.getScrollElementPosition(k,"vertical");return this.scrollTopPosition(B)}return(new P.cY).resolve()}scrollTopPosition(k){const U=new P.cY,B=this.getScrollable();if(B){const K=B.scrollTop(),J=()=>{B.off("scroll",J),U.resolve()};if(k!==K)return B.on("scroll",J),this._dataController.resetFilterApplying(),B.scrollTo({top:k}),U.promise()}return U.resolve()}}}}}},3918:(In,Ze,M)=>{"use strict";M.d(Ze,{Qy:()=>ie});var W=M(5737),o=M(4270),P=M(6021),b=M(3090),f=M(2660),S=M(4757),T=M(1830),y=M(5335),d=M(1541),c=M(1435),s=M(778),a=M(4072),u=M(9061),h=M(8360),g=M(8953),_=M(9551),x=M(3376),w=M(8736),D=M(546);const C={month:re=>u.A.getMonthNames()[re-1],quarter:re=>u.A.format(new Date(2e3,3*re-1),"quarter")};function I(re,q,Y){return q=q||[],Y=Y||[],re.forEach(Z=>{if((0,T.O9)(Z.key)){if(q.push(1===q.length?Z.key-1:Z.key),Z.items)I(Z.items,q,Y);else{const te=new Date(Date.UTC.apply(Date,q));Y.push(te)}q.pop()}else Y.push(null)}),Y}function L(re,q){const Y=I(re),Z=(0,d.A)(Y),Q=w.A.getHeaderFilterGroupParameters((0,W.A)({},q,{calculateCellValue:te=>te}));return c.A.queryByOptions(Z,{group:Q}).toArray()}const ie={defaultOptions:()=>({syncLookupFilterValues:!0,headerFilter:{visible:!1,width:252,height:325,allowSelectAll:!0,search:{enabled:!1,timeout:500,mode:"contains",editorOptions:{}},texts:{emptyValue:h.A.format("dxDataGrid-headerFilterEmptyValue"),ok:h.A.format("dxDataGrid-headerFilterOK"),cancel:h.A.format("dxDataGrid-headerFilterCancel")}}}),controllers:{headerFilter:class k extends x.Ay.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._headerFilterView=this.getView("headerFilterView")}_updateSelectedState(q,Y){let Z=q.length;const Q="exclude"===Y.filterType;for(;Z--;){const te=q[Z];"items"in q[Z]&&this._updateSelectedState(q[Z].items,Y),(0,D.NX)(te,w.A.getIndexByKey(q[Z].value,Y.filterValues,null)>-1,Q)}}_normalizeGroupItem(q,Y,Z){let Q,te;const{path:pe}=Z,{valueSelector:z}=Z,{displaySelector:oe}=Z,{column:ae}=Z;return z&&oe?(Q=z(q),te=oe(q)):(Q=q.key,te=Q),q=(0,T.Gv)(q)?(0,b.X)({},q):{},pe.push(Q),q.value=1===pe.length?pe[0]:pe.join("/"),q.text=this.getHeaderItemText(te,ae,Y,Z.headerFilterOptions),q}getHeaderItemText(q,Y,Z,Q){let te=w.A.formatValue(q,function(re,q,Y){const Z=_.A.getGroupInterval(q),Q=w.A.getFormatOptionsByColumn(q,"headerFilter");return Z&&(Q.groupInterval=Z[Y],w.A.isDateType(q.dataType)?Q.format=C[Z[Y]]:"number"===q.dataType&&(Q.getDisplayFormat=function(){const te={format:q.format,target:"headerFilter"},pe=w.A.formatValue(re,te),oe=w.A.formatValue(re+Z[Y],te);return pe&&oe?`${pe} - ${oe}`:""})),Q}(q,Y,Z));return te||(te=Q.texts.emptyValue),te}_processGroupItems(q,Y,Z,Q){const te=this;let pe,z;const{column:oe}=Q,{lookup:ae}=oe,{level:ee}=Q;Z=Z||[],Y=Y||0,ae&&(pe=(0,o.Hz)(ae.displayExpr),z=(0,o.Hz)(ae.valueExpr));for(let he=0;he<q.length;he++)q[he]=te._normalizeGroupItem(q[he],Y,{column:Q.column,headerFilterOptions:Q.headerFilterOptions,displaySelector:pe,valueSelector:z,path:Z}),"items"in q[he]&&(Y!==ee&&(0,T.O9)(q[he].value)?te._processGroupItems(q[he].items,Y+1,Z,Q):delete q[he].items),Z.pop()}getDataSource(q){var Y;const Z=this._dataController.dataSource(),Q=Z?.remoteOperations().grouping,te=w.A.getHeaderFilterGroupParameters(q,Q),pe=null===(Y=q.headerFilter)||void 0===Y?void 0:Y.dataSource,z=this.option("headerFilter");let oe=!1;const ae={component:this.component};if(!Z)return;if((0,T.O9)(pe)&&!(0,T.Tn)(pe))ae.dataSource=(0,y.ho)(pe);else if(q.lookup)if(oe=!0,this.option("syncLookupFilterValues")){this._currentColumn=q;const de=this._dataController.getCombinedFilter();this._currentColumn=null,ae.dataSource=w.A.getWrappedLookupDataSource(q,Z,de)}else ae.dataSource=w.A.normalizeLookupDataSource(q.lookup);else{const de=Array.isArray(te)?te.length-1:0;this._currentColumn=q;const ue=this._dataController.getCombinedFilter();this._currentColumn=null,ae.dataSource={filter:ue,group:te,useDefaultSearch:!0,load:be=>{const ve=new P.cY;return be.dataField=q.dataField||q.name,Z.load(be).done(le=>{Q&&function N(re){return"Z"===re?.slice(-1)||"'Z'"===re?.slice(-3)}(q.serializationFormat)&&de>3&&(le=L(le,q)),he._processGroupItems(le,null,null,{level:de,column:q,headerFilterOptions:z}),ve.resolve(le)}).fail(ve.reject),ve}}}(0,T.Tn)(pe)&&pe.call(q,ae);const ee=ae.dataSource.postProcess,he=this;return ae.dataSource.postProcess=function(de){let ue=de;return oe&&(ue=ue.filter(be=>null!==be[q.lookup.valueExpr]),0===this.pageIndex()&&!this.searchValue()&&(ue=ue.slice(0),ue.unshift(null)),he._processGroupItems(ue,null,null,{level:0,column:q,headerFilterOptions:z})),ue=ee&&ee.call(this,ue)||ue,he._updateSelectedState(ue,q),ue},ae.dataSource}getCurrentColumn(){return this._currentColumn}showHeaderFilterMenu(q,Y){const Z=this._columnsController,Q=(0,b.X)(!0,{},this._columnsController.getColumns()[q]);if(Q){const te=Z.getVisibleIndex(q),z=this.getView(Y?"headerPanel":"columnHeadersView").getColumnElements().eq(Y?Q.groupIndex:te);this.showHeaderFilterMenuBase({columnElement:z,column:Q,applyFilter:!0,apply(){Z.columnOption(q,{filterValues:this.filterValues,filterType:this.filterType})}})}}showHeaderFilterMenuBase(q){const Y=this,{column:Z}=q;if(Z){const Q=_.A.getGroupInterval(Z),te=Y._dataController.dataSource(),pe=te&&te.remoteOperations().filtering,z=q.onHidden;(0,b.X)(q,Z,{type:Q&&Q.length>1?"tree":"list",remoteFiltering:pe,onShowing:oe=>{const ae=oe.component.$overlayContent().dxResizable("instance");ae&&ae.option("onResizeEnd",ee=>{let he=this._columnsController.columnOption(q.dataField,"headerFilter");he=he||{},he.width=ee.width,he.height=ee.height,this._columnsController.columnOption(q.dataField,"headerFilter",he,!0)})},onHidden:()=>{z?.(),(0,g.Dy)(this)}}),q.dataSource=Y.getDataSource(q),q.isFilterBuilder&&(q.dataSource.filter=null,q.alignment="right"),Y._headerFilterView.showHeaderFilterMenu(q.columnElement,q)}}hideHeaderFilterMenu(){this._headerFilterView.hideHeaderFilterMenu()}}},views:{headerFilterView:D.$k},extenders:{controllers:{data:re=>class extends re{skipCalculateColumnFilters(){return!1}_calculateAdditionalFilter(){if(this.skipCalculateColumnFilters())return super._calculateAdditionalFilter();const q=[super._calculateAdditionalFilter()],Y=this._columnsController.getVisibleColumns(null,!0),Q=this._headerFilterController.getCurrentColumn();return(0,f.__)(Y,(te,pe)=>{let z;if((!Q||Q.index!==pe.index)&&(0,D.PK)(pe)&&pe.calculateFilterExpression&&Array.isArray(pe.filterValues)&&pe.filterValues.length){let oe=[];(0,f.__)(pe.filterValues,(ae,ee)=>{Array.isArray(ee)?z=ee:(pe.deserializeValue&&!w.A.isDateType(pe.dataType)&&"number"!==pe.dataType&&(ee=pe.deserializeValue(ee)),z=pe.createFilterExpression(ee,"=","headerFilter")),z&&(z.columnIndex=pe.index),oe.push(z)}),oe=w.A.combineFilters(oe,"or"),q.push("exclude"===pe.filterType?["!",oe]:oe)}}),w.A.combineFilters(q)}}},views:{columnHeadersView:re=>class extends((0,D.v2)(re)){_renderCellContent(q,Y){const Z=this;let Q;const{column:te}=Y;!te.command&&(0,D.PK)(te)&&Z.option("headerFilter.visible")&&"header"===Y.rowType&&(Q=Z._applyColumnState({name:"headerFilter",rootElement:q,column:te,showColumnLines:Z.option("showColumnLines")}),Q&&Z._subscribeToIndicatorEvent(Q,te,"headerFilter")),super._renderCellContent.apply(this,arguments)}_subscribeToIndicatorEvent(q,Y,Z){"headerFilter"===Z&&a.A.on(q,s.U,this.createAction(Q=>{Q.event.stopPropagation(),(0,g.Z7)(q,this),this._headerFilterController.showHeaderFilterMenu(Y.index,!1)}))}_updateIndicator(q,Y,Z){const Q=super._updateIndicator(q,Y,Z);Q&&this._subscribeToIndicatorEvent(Q,Y,Z)}_updateHeaderFilterIndicators(){this.option("headerFilter.visible")&&this._updateIndicators("headerFilter")}_needUpdateFilterIndicators(){return!0}_columnOptionChanged(q){const{optionNames:Y}=q,Z=w.A.checkChanges(Y,["filterValues","filterValue"]),Q=w.A.checkChanges(Y,["filterValues","filterType"]);(Z||Q)&&this._needUpdateFilterIndicators()&&this._updateHeaderFilterIndicators(),Q||super._columnOptionChanged(q)}},headerPanel:re=>class extends((0,D.v2)(re)){_createGroupPanelItem(q,Y){const Z=this,Q=super._createGroupPanelItem.apply(Z,arguments);let te;return!Y.command&&(0,D.PK)(Y)&&Z.option("headerFilter.visible")&&(te=Z._applyColumnState({name:"headerFilter",rootElement:Q,column:{alignment:(0,S.n)(Z.option("rtlEnabled")),filterValues:Y.filterValues,allowHeaderFiltering:!0,caption:Y.caption},showColumnLines:!0}),te&&a.A.on(te,s.U,Z.createAction(pe=>{const{event:z}=pe;z.stopPropagation(),this._headerFilterController.showHeaderFilterMenu(Y.index,!0)}))),Q}}}}}},546:(In,Ze,M)=>{"use strict";M.d(Ze,{$k:()=>C,NX:()=>D,PK:()=>I,v2:()=>L}),M(6998),M(5470);var P=M(5704),b=M(3090),f=M(2660),S=M(1830),T=M(8360),y=M(6828),d=M(8628),c=M(1757),s=M(3376),a=M(8736);function _(N){N=N||[];for(let G=0;G<N.length;G++)N[G].selected=!1,_(N[G].items)}function x(N){const G="dxTreeView"===N.NAME?".dx-treeview-select-all-item":".dx-list-select-all-checkbox";return N.$element().find(G).dxCheckBox("instance")}function w(N,G){if(N.component.option("searchValue"))return;const k=x(N.component);k&&G&&G.length&&k.option("value",void 0)}function D(N,G,k){if(G^k){if(N.selected=!0,k&&N.items)for(let U=0;U<N.items.length;U++)if(!N.items[U].selected){N.selected=void 0;break}}else(k||N.selected)&&(N.selected=!1,_(N.items))}class C extends s.Ay.View{getPopupContainer(){return this._popupContainer}getListComponent(){return this._listComponent}applyHeaderFilter(G){const k=this.getListComponent(),U=k.option("searchValue"),B=x(k),K=!U&&!G.isFilterBuilder&&B?.option("value"),J=[],ie=function(re,q,Y){(0,f.__)(q,(Z,Q)=>{if(void 0!==Q.selected&&!!Q.selected^Y){const te=k._getNode(Q),z=k._hasChildren(te)&&Q.items&&Q.items.some(oe=>oe.selected);if(!U||!z)return void re.push(Q.value)}Q.items&&Q.items.length&&ie(re,Q.items,Y)})};K?("tree"===G.type&&(G.filterType="exclude"),Array.isArray(G.filterValues)&&(G.filterValues=[])):"tree"===G.type&&(G.filterType&&(G.filterType="include"),ie(J,k.option("items"),!1),G.filterValues=J),G.filterValues&&!G.filterValues.length&&(G.filterValues=null),G.apply(),this.hideHeaderFilterMenu()}showHeaderFilterMenu(G,k){const U=this;if(k){U._initializePopupContainer(k);const B=U.getPopupContainer();U.hideHeaderFilterMenu(),U.updatePopup(G,k),B.show()}}hideHeaderFilterMenu(){const G=this.getPopupContainer();G&&G.hide()}updatePopup(G,k){const U=this,B=this.option("showColumnLines"),K="right"===k.alignment^!B?"left":"right";U._popupContainer.setAria({role:"dialog",label:T.A.format("dxDataGrid-headerFilterLabel")}),U._popupContainer&&(U._cleanPopupContent(),U._popupContainer.option("position",{my:`${K} top`,at:`${K} bottom`,of:G,collision:"fit fit"}))}_getSearchExpr(G,k){const{lookup:U}=G,{useDefaultSearchExpr:B}=G,K=k.dataSource,J=k.search.searchExpr;if(J)return J;if(B||(0,S.O9)(K)&&!(0,S.Tn)(K))return"text";if(U)return U.displayExpr||"this";if(G.dataSource){const{group:ie}=G.dataSource;if(Array.isArray(ie)&&ie.length>0)return ie[0].selector;if((0,S.Tn)(ie)&&!G.remoteFiltering)return ie}return G.dataField||G.selector}_cleanPopupContent(){this._popupContainer&&this._popupContainer.$content().empty()}_initializePopupContainer(G){const k=this,U=k.element(),B=this._normalizeHeaderFilterOptions(G),{height:K,width:J}=B,ie={width:J,height:K,visible:!1,shading:!1,showTitle:!1,showCloseButton:!1,hideOnParentScroll:!1,dragEnabled:!1,hideOnOutsideClick:!0,wrapperAttr:{class:"dx-header-filter-menu"},focusStateEnabled:!1,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:B.texts.ok,onClick(){k.applyHeaderFilter(G)}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:B.texts.cancel,onClick(){k.hideHeaderFilterMenu()}}}],resizeEnabled:!0,onShowing(re){re.component.$content().parent().addClass("dx-dropdowneditor-overlay"),k._initializeListContainer(G,B),G.onShowing&&G.onShowing(re)},onShown(){k.getListComponent().focus()},onHidden:G.onHidden,onInitialized(re){const{component:q}=re;q.option("animation",q._getDefaultOptions().animation)}};(0,S.O9)(k._popupContainer)?k._popupContainer.option(ie):k._popupContainer=k._createComponent(U,d.A,ie)}_initializeListContainer(G,k){const U=this,B=U._popupContainer.$content(),K=!G.isFilterBuilder&&k.allowSelectAll,J={searchEnabled:k.search.enabled,searchTimeout:k.search.timeout,searchEditorOptions:k.search.editorOptions,searchMode:k.search.mode||"",dataSource:G.dataSource,onContentReady(){U.renderCompleted.fire()},itemTemplate(re,q,Y){const Z=(0,P.A)(Y);return G.encodeHtml?Z.text(re.text):Z.html(re.text)}};function ie(re){"searchValue"===re.fullName&&K&&!1!==U.option("headerFilter.hideSelectAllOnSearch")&&("tree"===G.type?re.component.option("showCheckBoxesMode",re.value?"normal":"selectAll"):re.component.option("selectionMode",re.value?"multiple":"all"))}U._listComponent="tree"===G.type?U._createComponent((0,P.A)("<div>").appendTo(B),c.A,(0,b.X)(J,{showCheckBoxesMode:K?"selectAll":"normal",onOptionChanged:ie,keyExpr:"id"})):U._createComponent((0,P.A)("<div>").appendTo(B),y.A,(0,b.X)(J,{searchExpr:U._getSearchExpr(G,k),pageLoadMode:"scrollBottom",showSelectionControls:!0,selectionMode:K?"all":"multiple",onOptionChanged:ie,onSelectionChanged(re){const q=re.component.option("items"),Y=re.component.option("selectedItems");if(!re.component._selectedItemsUpdating&&!re.component.option("searchValue")&&!G.isFilterBuilder){const Z=G.filterValues||[];0===Y.length&&q.length&&(Z.length<=1||"exclude"===G.filterType&&Z.length===q.length-1)?(G.filterType="include",G.filterValues=[]):Y.length===q.length&&(G.filterType="exclude",G.filterValues=[])}(0,f.__)(q,(Z,Q)=>{const te=a.A.getIndexByKey(Q,Y,null)>=0;if(!!Q.selected!==te){Q.selected=te,G.filterValues=G.filterValues||[];const z=a.A.getIndexByKey(Q.value,G.filterValues,null);z>=0&&G.filterValues.splice(z,1),te^"exclude"===G.filterType&&G.filterValues.push(Q.value)}}),w(re,G.filterValues)},onContentReady(re){const{component:q}=re,Y=q.option("items"),Z=[];(0,f.__)(Y,function(){this.selected&&Z.push(this)}),q._selectedItemsUpdating=!0,q.option("selectedItems",Z),q._selectedItemsUpdating=!1,w(re,G.filterValues)}}))}_normalizeHeaderFilterOptions(G){const k=this.option("headerFilter")||{},U=G.headerFilter||{};return(0,b.X)(!0,{},k,{search:{enabled:k.allowSearch,timeout:k.searchTimeout}},U,{search:{enabled:U.allowSearch,mode:U.searchMode,timeout:U.searchTimeout}})}_renderCore(){this.element().addClass("dx-header-filter-menu")}}const I=function(N){return(0,S.O9)(N.allowHeaderFiltering)?N.allowHeaderFiltering:N.allowFiltering},L=N=>class extends N{optionChanged(G){if("headerFilter"===G.name){const k="columnHeadersView"===this.name;this._invalidate(k,k),G.handled=!0}else super.optionChanged(G)}_applyColumnState(G){let k;const{rootElement:U}=G,{column:B}=G;if("headerFilter"===G.name){if(U.find(".dx-header-filter").remove(),I(B)){k=super._applyColumnState(G).toggleClass("dx-header-filter-empty",this._isHeaderFilterEmpty(B)),this.option("useLegacyKeyboardNavigation")||k.attr("tabindex",this.option("tabindex")||0);const K=T.A.format("dxDataGrid-headerFilterIndicatorLabel",B.caption);k.attr("aria-label",K),k.attr("aria-haspopup","dialog"),k.attr("role","button")}return k}return super._applyColumnState(G)}_isHeaderFilterEmpty(G){return!G.filterValues||!G.filterValues.length}_getIndicatorClassName(G){return"headerFilter"===G?"dx-header-filter":super._getIndicatorClassName(G)}_renderIndicator(G){const k=G.container,U=G.indicator;if("headerFilter"===G.name){const B=this.option("rtlEnabled");if(k.children().length&&(!B&&"right"===G.columnAlignment||B&&"left"===G.columnAlignment))return void k.prepend(U)}super._renderIndicator(G)}}},8956:(In,Ze,M)=>{"use strict";M.d(Ze,{k:()=>g});var W=M(5737),o=M(5704),P=M(4270),b=M(3090),f=M(1830),S=M(8360),T=M(3651),y=M(9339);const a=["addRowButton","applyFilterButton","columnChooserButton","exportButton","groupPanel","revertButton","saveButton","searchPanel"],g={defaultOptions:()=>({}),views:{headerPanel:class u extends y.n{init(){super.init(),this._editingController=this.getController("editing"),this._headerFilterController=this.getController("headerFilter"),this.createAction("onToolbarPreparing",{excludeValidators:["disabled","readOnly"]})}_getToolbarItems(){return[]}_getButtonContainer(){return(0,o.A)("<div>").addClass(this.addWidgetPrefix("toolbar-button"))}_getToolbarButtonClass(x){const w=x?` ${x}`:"";return this.addWidgetPrefix("toolbar-button")+w}_getToolbarOptions(){const x=this.option("toolbar"),w={toolbarOptions:{items:this._getToolbarItems(),visible:x?.visible,disabled:x?.disabled,onItemRendered(C){const I=C.itemData.onItemRendered;I&&I(C)}}},D=x?.items;if(w.toolbarOptions.items=this._normalizeToolbarItems(w.toolbarOptions.items,D),this.executeAction("onToolbarPreparing",w),w.toolbarOptions&&!(0,f.O9)(w.toolbarOptions.visible)){const C=w.toolbarOptions.items;w.toolbarOptions.visible=!(null==C||!C.length)}return w.toolbarOptions}_normalizeToolbarItems(x,w){x.forEach(N=>{if(!a.includes(N.name))throw new Error(`Default toolbar item '${N.name}' is not added to DEFAULT_TOOLBAR_ITEM_NAMES`)});const D={location:"after"},C=Array.isArray(w);if(!(0,f.O9)(w))return x;C||(w=[w]);const I={};x.forEach(N=>{I[N.name]=N});const L=w.map(N=>((0,f.Kg)(N)&&(N={name:N}),(0,f.O9)(N.name)&&((0,f.O9)(I[N.name])?N=(0,b.X)(!0,{},I[N.name],N):a.includes(N.name)&&(N=(0,W.A)({},N,{visible:!1}))),(0,b.X)(!0,{},D,N)));return C?L:L[0]}_renderCore(){if(this._toolbar)this._toolbar.option(this._toolbarOptions);else{const x=this.element();x.addClass(this.addWidgetPrefix("header-panel"));const w=S.A.format(this.component.NAME+"-ariaToolbar"),D=(0,o.A)("<div>").attr("aria-label",w).appendTo(x);this._toolbar=this._createComponent(D,T.A,this._toolbarOptions)}}_columnOptionChanged(){}_handleDataChanged(){this._requireReady&&this.render()}_isDisabledDefinedByUser(x){var w;const D=null===(w=this.option("toolbar"))||void 0===w?void 0:w.items,C=D?.find(I=>I?.name===x);return(0,f.O9)(C?.disabled)}render(){this._toolbarOptions=this._getToolbarOptions(),super.render.apply(this,arguments)}setToolbarItemDisabled(x,w){const D=this._toolbar,C=this._isDisabledDefinedByUser(x);if(!D||C)return;const L=(D.option("items")??[]).findIndex(G=>G.name===x);if(L<0)return;const N=D.option(`items[${L}]`);D.option(`items[${L}].disabled`,w),N.options&&D.option(`items[${L}].options.disabled`,w)}updateToolbarDimensions(){var x;null===(x=this._toolbar)||void 0===x||x.updateDimensions()}getHeaderPanel(){return this.element()}getHeight(){return this.getElementHeight()}optionChanged(x){if("onToolbarPreparing"===x.name&&(this._invalidate(),x.handled=!0),"toolbar"===x.name){const I=(0,P.u7)(x.fullName),L=x.fullName.replace(/^toolbar\./,"");if(1===I.length)this._invalidate();else if("items"===I[1]){if(2===I.length){var w;const N=this._getToolbarOptions();null===(w=this._toolbar)||void 0===w||w.option("items",N.items)}else if(3===I.length){var D;const N=this._normalizeToolbarItems(this._getToolbarItems(),x.value);null===(D=this._toolbar)||void 0===D||D.option(L,N)}else if(I.length>=4){var C;null===(C=this._toolbar)||void 0===C||C.option(L,x.value)}}else this._invalidate();x.handled=!0}super.optionChanged(x)}isVisible(){return!(!this._toolbarOptions||!this._toolbarOptions.visible)}allowDragging(){}hasGroupedColumns(){}}},extenders:{controllers:{resizing:_=>class extends _{_updateDimensionsCore(){super._updateDimensionsCore.apply(this,arguments),this.getView("headerPanel").updateToolbarDimensions()}}}}}},1076:(In,Ze,M)=>{"use strict";M.d(Ze,{S:()=>gi});var W=M(4859),o=M(6054),P=M(9522),b=M(5704),f=M(36),S=M(6021),T=M(1363),y=M(1830),d=M(778),c=M(4072),s=M(9209),a=M(1294),u=M(9293),h=M(8953),g=M(402);const _=(Ai,pt)=>Ai.length===pt.length&&!Object.keys(Ai).some(Dt=>Ai[Dt]!==pt[Dt]),x=(Ai,pt)=>(0,W.RL)(Ai,pt,{maxDepth:4}),D={compareType:"reference"},C=function(Ai){let{compareType:pt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D,Dt=null;return function(){for(var cn=arguments.length,dt=new Array(cn),Et=0;Et<cn;Et++)dt[Et]=arguments[Et];if(!Dt){const hn=Ai(...dt);return Dt=((Ai,pt,Dt,cn)=>{let dt=Ai,Et=pt;return function(){for(var hn=arguments.length,$n=new Array(hn),Ln=0;Ln<hn;Ln++)$n[Ln]=arguments[Ln];return cn($n,dt)||(dt=$n,Et=Dt(...dt)),Et}})(dt,hn,Ai,"reference"===pt?_:x),hn}return Dt(...dt)}};var I=M(6253),L=M(3376),N=M(8736);const k="rowsview",J="dx-data-row",Y="dx-master-detail-row",Z="dx-freespace-row",te="dx-master-detail-cell",oe="dx-command-expand",ee="dx-command-select",he="dx-command-edit",de="[class^=dx-command]",ue="dx-cell-focus-disabled",ve="dx-state-focused",ye="dx-focused",ge="delete",fe='\n  input:not([type="hidden"]):not([disabled]),\n  textarea:not([disabled]),\n  a:not([disabled]),\n  select:not([disabled]),\n  button:not([disabled]),\n  [tabindex]:not([disabled]),\n  .dx-checkbox:not([disabled],.dx-state-readonly)\n',xe=`${fe}, .dx-dropdowneditor-icon`,ze="columnHeadersView",Be=["shift","control","alt"];var Ke=M(5973);function Pe(Ai){return Ai&&Ai.hasClass("dx-group-row")}function Xe(Ai){return Ai&&Ai.hasClass(J)}function vt(Ai,pt){return!Ai._isRowEditMode()&&pt&&!pt.hasClass(ee)&&pt.hasClass(I.su)}function qe(Ai){return(0,y.O9)(Ai)&&Ai.length>0}function At(){return"desktop"!==Ke.A.current().deviceType}function Tt(Ai){return!!Ai.parent(".dx-header-row").length}var En=M(3760);const gi={defaultOptions:()=>({useLegacyKeyboardNavigation:!1,keyboardNavigation:{enabled:!0,enterKeyAction:"startEdit",enterKeyDirection:"none",editOnKeyPress:!1}}),controllers:{keyboardNavigation:class ri extends L.Ay.ViewController{init(){var pt,Dt;this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._editingController=this.getController("editing"),this._headerPanel=this.getView("headerPanel"),this._rowsView=this.getView("rowsView"),this._columnsController=this.getController("columns"),this._editorFactory=this.getController("editorFactory"),this._focusController=this.getController("focus"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._columnResizerController=this.getController("columnsResizer"),this._memoFireFocusedCellChanged=C(this._memoFireFocusedCellChanged.bind(this),{compareType:"value"}),this._memoFireFocusedRowChanged=C(this._memoFireFocusedRowChanged.bind(this),{compareType:"value"}),this.focusedHandlerWithContext=this.focusedHandlerWithContext||this.focusedHandler.bind(this),this.renderCompletedWithContext=this.renderCompletedWithContext||this.renderCompleted.bind(this),this.rowsViewFocusHandlerContext=this.rowsViewFocusHandlerContext||this.rowsViewFocusHandler.bind(this),this.rowsViewFocusOutHandlerContext=this.rowsViewFocusOutHandlerContext??this.rowsViewFocusOutHandler.bind(this),this._updateFocusTimeout=null,this._fastEditingStarted=!1,this._focusedCellPosition={},this._canceledCellPosition=null,this.isKeyboardEnabled()?(h.rK(),null===(pt=this._editorFactory)||void 0===pt||pt.focused.add(this.focusedHandlerWithContext),this.createAction("onKeyDown")):(h.WX(),null===(Dt=this._editorFactory)||void 0===Dt||Dt.focused.remove(this.focusedHandlerWithContext)),this.initViewHandlers(),this.initDocumentHandlers()}dispose(){super.dispose(),this._resetFocusedView(),a.QJ.off(this._keyDownListener),c.A.off(o.A.getDocument(),(0,u.b4)(s.A.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),clearTimeout(this._updateFocusTimeout),h.WX()}focusedHandler(pt){this.setupFocusedView(),this._isNeedScroll&&pt.is(":visible")&&this._focusedView&&this._focusedView.getScrollable()&&(this._focusedView._scrollToElement(pt),this._isNeedScroll=!1)}rowsViewFocusHandler(pt){const Dt=(0,b.A)(pt.target),cn=(0,b.A)(pt.relatedTarget).closest(this._rowsView.element()).length,dt=Dt.is("a");if(pt.relatedTarget&&dt&&!cn&&this._isEventInCurrentGrid(pt)){let $n=this._getFocusedCell();$n=qe($n)?$n:this._rowsView.getCellElements(0).filter("[tabindex]").eq(0),Dt.closest($n).length||(pt.preventDefault(),c.A.trigger($n,"focus"))}const Et=Dt.is("td"),hn=(this.option("focusedRowIndex")??-1)<0;Et&&hn&&this._updateFocusedCellPosition(Dt)}rowsViewFocusOutHandler(){this._toggleInertAttr(!1)}subscribeToRowsViewFocusEvent(){var pt;const Dt=null===(pt=this._rowsView)||void 0===pt?void 0:pt.element();c.A.on(Dt,"focusin",this.rowsViewFocusHandlerContext),c.A.on(Dt,"focusout",this.rowsViewFocusOutHandlerContext)}unsubscribeFromRowsViewFocusEvent(){var pt;const Dt=null===(pt=this._rowsView)||void 0===pt?void 0:pt.element();c.A.off(Dt,"focusin",this.rowsViewFocusHandlerContext),c.A.off(Dt,"focusout",this.rowsViewFocusOutHandlerContext)}renderCompleted(pt){const Dt=this._rowsView.element(),cn=!pt||"refresh"===pt.changeType,dt=this._focusedView&&this._focusedView.name===this._rowsView.name;let Et=!1;const hn=pt&&("append"===pt.changeType||"prepend"===pt.changeType),Ln=(0,b.A)(o.A.getRootNode(Dt.get&&Dt.get(0))).find(":focus"),Nt=!Ln.length||Ln.closest(Dt).length;this.unsubscribeFromRowsViewFocusEvent(),this.subscribeToRowsViewFocusEvent(),this.initPointerEventHandler(),this.initKeyDownHandler(),this._setRowsViewAttributes(),dt&&Nt&&(Et=this._isNeedFocus?!hn:this._isHiddenFocus&&cn&&!(null!=pt&&pt.virtualColumnsScrolling),Et&&this._updateFocus(!0))}initViewHandlers(){var pt;this.unsubscribeFromRowsViewFocusEvent(),this.unsubscribeFromPointerEvent(),this.unsubscribeFromKeyDownEvent(),null===(pt=this._rowsView)||void 0===pt||null===(pt=pt.renderCompleted)||void 0===pt||pt.remove(this.renderCompletedWithContext),this.isKeyboardEnabled()&&this._rowsView.renderCompleted.add(this.renderCompletedWithContext)}initDocumentHandlers(){const pt=o.A.getDocument();this._documentClickHandler=this._documentClickHandler||this.createAction(Dt=>{const cn=(0,b.A)(Dt.event.target),dt=this._isEventInCurrentGrid(Dt.event)&&cn.closest(`.${this.addWidgetPrefix(k)}`).length,Et=cn.closest(".dx-dropdowneditor-overlay").length,hn=!!this._columnResizerController&&this._columnResizerController.isResizing();!dt&&!Et&&!hn&&(!(this._focusedView&&cn.parents().filter(this._focusedView.element()).length>0)&&this._resetFocusedCell(!0),this._resetFocusedView())}),c.A.off(pt,(0,u.b4)(s.A.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),this.isKeyboardEnabled()&&c.A.on(pt,(0,u.b4)(s.A.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler)}_setRowsViewAttributes(){const pt=this._getRowsViewElement();!this._dataController.getVisibleRows().length&&this._applyTabIndexToElement(pt)}unsubscribeFromPointerEvent(){const pt=At()?d.U:s.A.down,Dt=this._getRowsViewElement();this._pointerEventAction&&c.A.off(Dt,(0,u.b4)(pt,"dxDataGridKeyboardNavigation"),this._pointerEventAction)}subscribeToPointerEvent(){const pt=At()?d.U:s.A.down,Dt=this._getRowsViewElement(),cn=`.${I.sN} > td, .${I.sN}`;c.A.on(Dt,(0,u.b4)(pt,"dxDataGridKeyboardNavigation"),cn,this._pointerEventAction)}initPointerEventHandler(){this._pointerEventAction=this._pointerEventAction||this.createAction(this._pointerEventHandler),this.unsubscribeFromPointerEvent(),this.subscribeToPointerEvent()}unsubscribeFromKeyDownEvent(){a.QJ.off(this._keyDownListener)}subscribeToKeyDownEvent(){const pt=this._getRowsViewElement();this._keyDownListener=a.QJ.on(pt,null,Dt=>this._keyDownHandler(Dt))}initKeyDownHandler(){this._keyDownListener&&this.unsubscribeFromKeyDownEvent(),this.subscribeToKeyDownEvent()}optionChanged(pt){switch(pt.name){case"keyboardNavigation":"keyboardNavigation.enabled"===pt.fullName&&this.init(),pt.handled=!0;break;case"useLegacyKeyboardNavigation":this.init(),pt.handled=!0;break;default:super.optionChanged(pt)}}isRowFocusType(){return"row"===this.focusType}isCellFocusType(){return"cell"===this.focusType}setRowFocusType(){this.option("focusedRowEnabled")&&(this.focusType="row")}setCellFocusType(){this.focusType="cell"}_keyDownHandler(pt){var Dt;let cn=!0;this._isNeedFocus=!0,this._isNeedScroll=!0;let dt=this._processOnKeyDown(pt);const Et=null===(Dt=this._editingController)||void 0===Dt?void 0:Dt.isEditing(),{originalEvent:hn}=pt;if(hn.isDefaultPrevented())return this._isNeedFocus=!1,void(this._isNeedScroll=!1);if(!Be.includes(pt.keyName)&&this._updateFocusedCellPositionByTarget(hn.target),!dt){switch(pt.keyName){case"leftArrow":case"rightArrow":this._leftRightKeysHandler(pt,Et),dt=!0;break;case"upArrow":case"downArrow":pt.ctrl?h.sf("rowsView",this,hn):this._upDownKeysHandler(pt,Et),dt=!0;break;case"pageUp":case"pageDown":this._pageUpDownKeyHandler(pt),dt=!0;break;case"space":dt=this._spaceKeyHandler(pt,Et);break;case"A":(0,u.By)(pt.originalEvent)?(this._ctrlAKeyHandler(pt,Et),dt=!0):dt=this._beginFastEditing(pt.originalEvent);break;case"tab":this._tabKeyHandler(pt,Et),dt=!0;break;case"enter":this._enterKeyHandler(pt,Et),dt=!0;break;case"escape":dt=this._escapeKeyHandler(pt,Et);break;case"F":(0,u.By)(pt.originalEvent)?(this._ctrlFKeyHandler(pt),dt=!0):dt=this._beginFastEditing(pt.originalEvent);break;case"F2":this._f2KeyHandler(),dt=!0;break;case"del":case"backspace":this._isFastEditingAllowed()&&!this._isFastEditingStarted()&&(dt=this._beginFastEditing(hn,!0))}!dt&&!this._beginFastEditing(hn)&&(this._isNeedFocus=!1,this._isNeedScroll=!1,cn=!1),cn&&hn.stopPropagation()}}_processOnKeyDown(pt){const{originalEvent:Dt}=pt,cn={handled:!1,event:Dt};return this.executeAction("onKeyDown",cn),pt.ctrl=Dt.ctrlKey,pt.alt=Dt.altKey,pt.shift=Dt.shiftKey,!!cn.handled}_closeEditCell(){const pt=(0,S.cY)();return setTimeout(()=>{this._editingController.closeEditCell().always(pt.resolve)}),pt}_leftRightKeysHandler(pt,Dt){const cn=this.getVisibleRowIndex(),dt=pt.originalEvent,Et=this._focusedView&&this._focusedView.getRow(cn),hn=this._getDirectionCodeByKey(pt.keyName),$n=this._isFastEditingStarted();if((!Dt||$n)&&Xe(Et)){this.setCellFocusType(),$n&&this._closeEditCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(hn);const Nt=this._getNextCell(hn);qe(Nt)&&this._arrowKeysHandlerFocusCell(dt,Nt,hn),dt&&dt.preventDefault()}}isInsideMasterDetail(pt){const Dt=pt.closest(`.${te}`);return!!Dt.get(0)&&this.elementIsInsideGrid(Dt)&&!pt.is(Dt)}_upDownKeysHandler(pt,Dt){var cn,dt;const Et=this.getVisibleRowIndex(),hn=this._focusedView&&this._focusedView.getRow(Et),$n=pt.originalEvent,Ln="upArrow"===pt.keyName,Nt=this._dataController.dataSource(),Gt=null===(cn=this._editingController)||void 0===cn||null===(dt=cn.isEditRowByIndex)||void 0===dt?void 0:dt.call(cn,Et),on=this._isFastEditingStarted(),sn=this.isInsideMasterDetail((0,b.A)($n?.target));if((!Gt||!Dt||on)&&hn&&!function Fe(Ai){return Ai&&Ai.hasClass(Y)&&Ai.hasClass("edit-form")}(hn)&&!sn){if(on&&this._closeEditCell(),!this._navigateNextCell($n,pt.keyName)&&this._isVirtualRowRender()&&Ln&&Nt&&!Nt.isLoading()){const Ot=(0,T.P$)(hn);this._scrollBy(0,-Ot,this._focusedCellPosition.rowIndex-1,$n)}$n&&$n.preventDefault()}}_pageUpDownKeyHandler(pt){const Dt=this._dataController.pageIndex(),cn=this._dataController.pageCount(),dt=this.option("paging.enabled"),Et="pageUp"===pt.keyName,hn=Et?-1:1,$n=this._rowsView.getScrollable();dt&&!this._isVirtualScrolling()?(Et?Dt>0:Dt<cn-1)&&!this._isVirtualScrolling()&&(this._dataController.pageIndex(Dt+hn),pt.originalEvent.preventDefault()):$n&&(0,T.Oq)($n.container())<(0,T.Oq)($n.$content())&&(this._scrollBy(0,(0,T.Oq)($n.container())*hn),pt.originalEvent.preventDefault())}_spaceKeyHandler(pt,Dt){const cn=this.getVisibleRowIndex(),dt=(0,b.A)(pt.originalEvent&&pt.originalEvent.target);if(this.option("selection")&&"none"!==this.option("selection").mode&&!Dt){const Et="row"===this._getElementType(dt)&&this.isRowFocusType()&&Xe(dt);return dt.hasClass(ee)&&"onClick"===this.option("selection.showCheckBoxesMode")&&this._selectionController.startSelectionWithCheckboxes(),!!(Et||dt.parent().hasClass(J)||dt.hasClass(this.addWidgetPrefix(k)))&&(this._selectionController.changeItemSelection(cn,{shift:pt.shift,control:pt.ctrl}),pt.originalEvent.preventDefault(),!0)}return this._beginFastEditing(pt.originalEvent)}_ctrlAKeyHandler(pt,Dt){!Dt&&!pt.alt&&"multiple"===this.option("selection.mode")&&this.option("selection.allowSelectAll")&&(this._selectionController.selectAll(),pt.originalEvent.preventDefault())}_toggleInertAttr(pt){}_tabKeyHandler(pt,Dt){const cn=this.option("editing"),dt=pt.shift?"previous":"next",Et=(0,y.O9)(this._focusedCellPosition)&&!(0,y.RI)(this._focusedCellPosition),hn=pt.shift&&this._isFirstValidCell(this._focusedCellPosition),$n=!pt.shift&&this._isLastValidCell(this._focusedCellPosition);let Ln=!Et||hn||$n;const Nt=pt.originalEvent.target,Gt=this._focusedView&&this._focusedView.element();if(!this._handleTabKeyOnMasterDetailCell(Nt,dt)){if((0,b.A)(Gt).addClass(ve),cn&&Nt&&!Ln)if((0,b.A)(Nt).hasClass(this.addWidgetPrefix(k))&&this._resetFocusedCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(dt),Dt){if(!this._editingCellTabHandler(pt,dt))return}else this._targetCellTabHandler(pt,dt)&&(Ln=!0);Ln?($n&&this._toggleInertAttr(!0),this._editorFactory.loseFocus(),this._editingController.isEditing()&&!this._isRowEditMode()&&(this._resetFocusedCell(!0),this._resetFocusedView(),this._closeEditCell())):pt.originalEvent.preventDefault()}}_getMaxHorizontalOffset(){const pt=this.component.getScrollable();return pt?pt.scrollWidth()-(0,T.RG)(this._rowsView.element()):0}_isColumnRendered(pt){const Dt=this._columnsController.getVisibleColumns(null,!0),cn=this._columnsController.getVisibleColumns(),dt=Dt[pt];let Et=!1;return dt&&(Et=cn.indexOf(dt)>=0),Et}_isFixedColumn(pt){const cn=this._columnsController.getVisibleColumns(null,!0)[pt];return!!cn&&!!cn.fixed}_isColumnVirtual(pt){const Dt=pt-this._columnsController.getColumnIndexOffset(),dt=this._columnsController.getVisibleColumns()[Dt];return!!dt&&"virtual"===dt.command}_processVirtualHorizontalPosition(pt){const Dt=this.component.getScrollable(),cn=this.getColumnIndex();let dt,Et=0,hn=!1;switch(pt){case"next":case"nextInRow":{const $n=this._getVisibleColumnCount();dt=cn+1,Et=this.option("rtlEnabled")?this._getMaxHorizontalOffset():0,hn="next"===pt?$n===dt||this._isFixedColumn(cn)&&!this._isColumnRendered(dt):$n>dt&&this._isFixedColumn(cn)&&!this._isColumnRendered(dt);break}case"previous":case"previousInRow":if(dt=cn-1,Et=this.option("rtlEnabled")?0:this._getMaxHorizontalOffset(),"previous"===pt){const $n=this._columnsController.getColumnIndexOffset();hn=dt<0&&0===$n||this._isFixedColumn(cn)&&!this._isColumnRendered(dt)}else hn=dt>=0&&this._isFixedColumn(cn)&&!this._isColumnRendered(dt)}hn?Dt.scrollTo({left:Et}):(0,y.O9)(dt)&&(0,y.O9)(pt)&&this._isColumnVirtual(dt)&&(Et=this._getHorizontalScrollPositionOffset(pt),0!==Et&&Dt.scrollBy({left:Et,top:0}))}_getHorizontalScrollPositionOffset(pt){let Dt=0;const cn=this._getCell(this._focusedCellPosition),dt=cn&&(0,T.Ot)(cn);if(dt>0){const Et=this.option("rtlEnabled")?-1:1;Dt="nextInRow"===pt||"next"===pt?dt*Et:dt*Et*-1}return Dt}_editingCellTabHandler(pt,Dt){const cn=pt.originalEvent.target;let Et,dt=this._getCellElementFromTarget(cn);const hn=pt.originalEvent,$n=this._getElementType(cn);if(dt.is(de))return!this._targetCellTabHandler(pt,Dt);this._updateFocusedCellPosition(dt);const Ln=this._getNextCellByTabKey(hn,Dt,$n);if(dt=Ln.$cell,!dt||this._handleTabKeyOnMasterDetailCell(dt,Dt))return!1;const Nt=this._getColumnByCellElement(dt),Gt=dt.parent(),on=this._getRowIndex(Gt),sn=this._dataController.items()[on];if(Nt&&Nt.allowEditing){const Ot=!sn||"data"===sn.rowType;Et=this._editingController.allowUpdating({row:sn})?Ot:sn&&sn.isNewRow}return Et||this._closeEditCell(),this._focusCell(dt,!Ln.isHighlighted)&&(!this._isRowEditMode()&&Et?this._editFocusedCell():this._focusInteractiveElement(dt,pt.shift)),!0}_targetCellTabHandler(pt,Dt){const cn=pt.originalEvent;let dt=cn.target,Et=this._getElementType(dt),hn=this._getCellElementFromTarget(dt);const $n="cell"===Et&&this._getInteractiveElement(hn,!pt.shift);let Ln=!1;if(!vt(this,hn)&&null!=$n&&$n.length&&dt!==$n.get(0))Ln=!0;else{void 0===this._focusedCellPosition.rowIndex&&(0,b.A)(dt).hasClass(I.sN)&&this._updateFocusedCellPosition(hn),Et=this._getElementType(dt),this.isRowFocusType()&&(this.setCellFocusType(),"row"===Et&&Xe((0,b.A)(dt))&&(dt=this.getFirstValidCellInRow((0,b.A)(dt)),Et=this._getElementType(dt)));const Nt=this._getNextCellByTabKey(cn,Dt,Et);if(hn=Nt.$cell,!hn||(hn=this._checkNewLineTransition(cn,hn),!hn))return!1;this._focusCell(hn,!Nt.isHighlighted),vt(this,hn)||this._focusInteractiveElement(hn,pt.shift)}return Ln}_getNextCellByTabKey(pt,Dt,cn){let dt=this._getNextCell(Dt,cn);const Et=dt&&this._fireFocusedCellChanging(pt,dt,!0);return!Et||Et.cancel?{}:(Et.$newCellElement&&(dt=Et.$newCellElement),{$cell:dt,isHighlighted:Et.isHighlighted})}_checkNewLineTransition(pt,Dt){const cn=this.getVisibleRowIndex(),dt=Dt.parent();if(cn!==this._getRowIndex(dt)){const Et=this._getCellPosition(Dt),hn=this._fireFocusedRowChanging(pt,dt);if(hn.cancel)return;hn.rowIndexChanged&&Et&&(this.setFocusedColumnIndex(Et.columnIndex),Dt=this._getFocusedCell())}return Dt}_enterKeyHandler(pt,Dt){var cn,dt;const Et=this.getVisibleRowIndex(),hn=this._dataController.getKeyByRowIndex(Et),$n=null===(cn=this._focusedView)||void 0===cn?void 0:cn.getRow(Et),Ln=this._getFocusedCell(),Nt=this.option("grouping.allowCollapsing")&&Pe($n),Gt=this.option("masterDetail.enabled")&&Ln?.hasClass(oe),on=Ln?.hasClass("dx-command-adaptive");if(Nt||Gt){const sn=this._dataController.items()[Et],It=sn?.data&&!sn.data.isContinuation;(0,y.O9)(hn)&&It&&this._dataController.changeRowExpand(hn)}else on?(this._adaptiveColumnsController.toggleExpandAdaptiveDetailRow(hn),this._updateFocusedCellPosition(Ln)):null!==(dt=this.getMasterDetailCell(Ln))&&void 0!==dt&&dt.is(Ln)?Ln.is(":focus")&&this.focusFirstInteractiveElementInside(Ln):null!=Ln&&Ln.hasClass(he)||this._processEnterKeyForDataCell(pt,Dt)}focusFirstInteractiveElementInside(pt){pt.find(fe).get(0).focus()}_processEnterKeyForDataCell(pt,Dt){const cn=this._getEnterKeyDirection(pt),dt=this._allowEditingOnEnterKey();Dt||!dt&&cn?this._handleEnterKeyEditingCell(pt.originalEvent).done(()=>{"next"===cn||"previous"===cn?this._targetCellTabHandler(pt,cn):("upArrow"===cn||"downArrow"===cn)&&this._navigateNextCell(pt.originalEvent,cn)}):dt&&this._startEditing(pt)}_getEnterKeyDirection(pt){const Dt=this.option("keyboardNavigation.enterKeyDirection"),cn=pt.shift;return"column"===Dt?cn?"upArrow":"downArrow":"row"===Dt?cn?"previous":"next":void 0}_handleEnterKeyEditingCell(pt){const Dt=(0,S.cY)(),{target:cn}=pt,dt=this._getCellElementFromTarget(cn),Et=this._isRowEditMode();return this._updateFocusedCellPosition(dt),Et?(this._focusEditFormCell(dt),setTimeout(this._editingController.saveEditData.bind(this._editingController)),Dt.resolve()):(c.A.trigger((0,b.A)(cn),"change"),this._closeEditCell().always(Dt.resolve),pt.preventDefault()),Dt}_escapeKeyHandler(pt,Dt){const cn=this._getCellElementFromTarget(pt.originalEvent.target);if(Dt)return this._updateFocusedCellPosition(cn),this._isRowEditMode()?(this._focusEditFormCell(cn),this._editingController.cancelEditData(),0===this._dataController.items().length&&(this._resetFocusedCell(),this._editorFactory.loseFocus())):"cell"===this._editingController.getEditMode()?this._editingController.cancelEditData():this._closeEditCell(),pt.originalEvent.preventDefault(),!0;const dt=this.getMasterDetailCell(cn);return!!dt&&(this._focusCell(dt),!0)}_ctrlFKeyHandler(pt){if(this.option("searchPanel.visible")){const Dt=this._headerPanel.getSearchTextEditor();Dt&&(Dt.focus(),pt.originalEvent.preventDefault())}}_f2KeyHandler(){const pt=this._editingController.isEditing(),Dt=this.getVisibleRowIndex(),cn=this._focusedView&&this._focusedView.getRow(Dt);!pt&&Xe(cn)&&this._startEditing()}_navigateNextCell(pt,Dt){const cn=this._getNextCell(Dt),dt=this._getDirectionCodeByKey(Dt);return!(!cn||!this._isCellValid(cn))&&this._arrowKeysHandlerFocusCell(pt,cn,dt)}_arrowKeysHandlerFocusCell(pt,Dt,cn){const Et=this._fireFocusChangingEvents(pt,Dt,"prevRow"===cn||"nextRow"===cn,!0);return Dt=Et.$newCellElement,!(Et.cancel||!this._isCellValid(Dt)||(this._focus(Dt,!Et.isHighlighted),0))}_beginFastEditing(pt,Dt){if(!this._isFastEditingAllowed()||pt.altKey||pt.ctrlKey||this._editingController.isEditing())return!1;if(Dt)this._startEditing(pt,ge);else{const{key:cn}=pt,dt=pt.keyCode||pt.which,Et=cn||dt&&String.fromCharCode(dt);Et&&(1===Et.length||Et===ge)&&this._startEditing(pt,Et)}return!0}_pointerEventHandler(pt){var Dt;const cn=pt.event||pt;let dt=(0,b.A)(cn.currentTarget);const Et=null===(Dt=this._rowsView)||void 0===Dt?void 0:Dt.element(),hn=dt.parent(),$n=(0,b.A)(cn.target).is(fe),Ln=!!(0,b.A)(cn.target).closest(".dx-revert-button").length,Nt=dt.hasClass(oe);this._isEventInCurrentGrid(cn)&&(Ln||!this._isCellValid(dt,!$n)&&!Nt?dt.is("td")&&this._resetFocusedCell():(dt=this._isInsideEditForm(dt)?(0,b.A)(cn.target):dt,this._focusView(),(0,b.A)(Et).removeClass(ve),hn.hasClass(Z)?(this._updateFocusedCellPosition(dt),this._applyTabIndexToElement(this._focusedView.element()),this._focusedView.focus(!0)):this.getMasterDetailCell(dt)?this._updateFocusedCellPosition(dt):this._clickTargetCellHandler(cn,dt)))}_clickTargetCellHandler(pt,Dt){const cn=this._getColumnByCellElement(Dt),dt=this._isCellEditMode();this.setCellFocusType();const Et=this._fireFocusChangingEvents(pt,Dt,!0);if(Dt=Et.$newCellElement,Et.cancel)this.setRowFocusType(),this.setFocusedRowIndex(Et.prevRowIndex),this._editingController.isEditing()&&dt&&this._closeEditCell();else{if(Et.resetFocusedRow)return void this._focusController._resetFocusedRow();if(Et.rowIndexChanged&&(Dt=this._getFocusedCell()),!Et.isHighlighted&&!dt&&this.setRowFocusType(),this._updateFocusedCellPosition(Dt),this._allowRowUpdating()&&dt&&cn&&cn.allowEditing)this._isNeedFocus=!1,this._isHiddenFocus=!1;else{Dt=this._getFocusedCell();const hn=pt&&(0,b.A)(pt.target).closest(`${xe}, td`),$n=hn&&hn.not(Dt).is(xe),Nt=!(cn&&!cn.command&&Dt.hasClass(I.su))&&(!Et.isHighlighted||$n);this._focus(Dt,Nt,$n)}}}_allowRowUpdating(){const pt=this.getVisibleRowIndex(),Dt=this._dataController.items()[pt];return this._editingController.allowUpdating({row:Dt},"click")}focus(pt){let Dt;const cn=this.option("focusedRowEnabled"),dt=this._isCellElement((0,b.A)(pt));pt||(Dt=".dx-datagrid-rowsview .dx-row[tabindex]",cn||(Dt+=", .dx-datagrid-rowsview .dx-row > td[tabindex]"),pt=this.component.$element().find(Dt).first()),pt&&this._focusElement((0,b.A)(pt),dt)}getFocusedView(){return this._focusedView}setupFocusedView(){this.isKeyboardEnabled()&&!(0,y.O9)(this._focusedView)&&this._focusView()}_focusElement(pt,Dt){const cn=(0,b.A)(this._getRowsViewElement()),dt=pt.closest(cn),Et=this.isRowFocusType();let hn={};!dt.length||this._isCellElement(pt)&&!this._isCellValid(pt)||(this._focusView(),this._isNeedFocus=!0,this._isNeedScroll=!0,(this._isCellElement(pt)||Pe(pt))&&(this.setCellFocusType(),hn=this._fireFocusChangingEvents(null,pt,!0,Dt),pt=hn.$newCellElement,Et&&!hn.isHighlighted&&this.setRowFocusType()),hn.cancel||(this._focus(pt,!hn.isHighlighted),this._focusInteractiveElement(pt)))}_getFocusedViewByElement(pt){const Dt=this.getFocusedView(),cn=Dt&&(0,b.A)(Dt.element());return pt&&0!==pt.closest(cn).length}_focusView(){this._focusedView=this._rowsView}_resetFocusedView(){this.setRowFocusType(),this._focusedView=null}_focusInteractiveElement(pt,Dt){if(!pt)return;const cn=this._getInteractiveElement(pt,Dt);N.A.focusAndSelectElement(this,cn)}_focus(pt,Dt,cn){const dt=pt&&!pt.hasClass(I.sN)?pt.closest(`.${I.sN}`):pt;if(dt&&function tt(Ai){return!Ai||Ai.hasClass(Z)||Ai.hasClass("dx-virtual-row")}(dt))return;const Et=this._focusedView,hn=Et&&Et.element();let $n;this._isHiddenFocus=Dt;const Ln=Pe(dt)||function Se(Ai){return Ai&&Ai.hasClass("dx-datagrid-group-footer")}(dt)||this.isRowFocusType();Ln?($n=dt,Et&&this.setFocusedRowIndex(this._getRowIndex(dt))):this._isCellElement(pt)&&($n=pt,this._updateFocusedCellPosition(pt)),$n&&(hn&&hn.find(".dx-row[tabindex], .dx-row > td[tabindex]").filter((Nt,Gt)=>N.A.isElementInCurrentGrid(this,(0,b.A)(Gt))).not($n).removeClass(ue).removeClass(ye).removeAttr("tabindex"),c.A.one($n,"blur",Nt=>{Nt.relatedTarget&&$n.removeClass(ue).removeClass(ye)}),cn||(this._applyTabIndexToElement($n),c.A.trigger($n,"focus")),Dt?($n.addClass(ue),Ln&&pt.addClass(ue)):this._editorFactory.focus($n))}_updateFocus(pt){this._updateFocusTimeout=setTimeout(()=>{if(this._needFocusEditingCell())return void this._editingController._focusEditingCell();let Dt=this._getFocusedCell();const cn=this._editingController.isEditing();if((!this.getMasterDetailCell(Dt)||this._isRowEditMode())&&(this._hasSkipRow(Dt.parent())&&(Dt=this._getNextCell(this._focusedCellPosition&&this._focusedCellPosition.rowIndex>0?"upArrow":"downArrow")),qe(Dt)))if(Dt.is("td")||Dt.hasClass(this.addWidgetPrefix("edit-form-item"))){const dt=Dt.is(de),Et=Dt.find(":focus"),hn=qe(Et),$n=this._getColumnByCellElement(Dt);if(!pt&&dt||!this._editorFactory.focus())!hn&&(this._isNeedFocus||this._isHiddenFocus)&&this._focus(Dt,this._isHiddenFocus);else{if(dt&&hn)return void N.A.focusAndSelectElement(this,Et);!hn&&this._focus(Dt)}cn&&(null==$n||!$n.showEditorAlways)&&this._focusInteractiveElement.bind(this)(Dt)}else c.A.trigger(Dt,"focus")})}_getColumnByCellElement(pt){const cn=this._rowsView.getCellIndex(pt)+this._columnsController.getColumnIndexOffset();return this._columnsController.getVisibleColumns(null,!0)[cn]}_needFocusEditingCell(){const pt=this._editingController.getEditMode()===I.eN,Dt=this._editingController.getEditMode()===I.yx,cn=pt&&this._editingController.hasChanges(),dt=Dt&&this._editingController.isNewRowInEditMode(),Et=this._getFocusedCell();return(0===Et.children().length||Et.find(I.gn).length>0)&&(cn||dt)}_getFocusedCell(){return(0,b.A)(this._getCell(this._focusedCellPosition))}_updateFocusedCellPositionByTarget(pt){var Dt;if("row"===this._getElementType(pt)&&(0,y.O9)(null===(Dt=this._focusedCellPosition)||void 0===Dt?void 0:Dt.columnIndex)){const dt=(0,b.A)(pt);this._focusedView&&Pe(dt)&&this.setFocusedRowIndex(this._getRowIndex(dt))}else this._updateFocusedCellPosition(this._getCellElementFromTarget(pt))}_updateFocusedCellPosition(pt,Dt){const cn=this._getCellPosition(pt,Dt);return cn&&(!pt.length||cn.rowIndex>=0&&cn.columnIndex>=0)&&this.setFocusedCellPosition(cn.rowIndex,cn.columnIndex),cn}_getFocusedColumnIndexOffset(pt){let Dt=0;const cn=this._columnsController.getVisibleColumns()[pt];return cn&&cn.fixed?Dt=this._getFixedColumnIndexOffset(cn):pt>=0&&(Dt=this._columnsController.getColumnIndexOffset()),Dt}_getFixedColumnIndexOffset(pt){return function qt(Ai,pt){return Ai.option("rtlEnabled")?!("right"===pt.fixedPosition||(0,y.O9)(pt.command)&&!(0,y.O9)(pt.fixedPosition)):!(!(0,y.O9)(pt.fixedPosition)||"left"===pt.fixedPosition)}(this,pt)?this._getVisibleColumnCount()-this._columnsController.getVisibleColumns().length:0}_getCellPosition(pt,Dt){let cn;const dt=qe(pt)&&pt.closest("tr");if(qe(dt)){const Et=this._getRowIndex(dt);return cn=this._rowsView.getCellIndex(pt,Et),cn+=this._getFocusedColumnIndexOffset(cn),Dt&&(cn="previous"===Dt?cn-1:cn+1,cn=this._applyColumnIndexBoundaries(cn)),{rowIndex:Et,columnIndex:cn}}}_focusCell(pt,Dt){if(this._isCellValid(pt))return this._focus(pt,Dt),!0}_focusEditFormCell(pt){pt.hasClass(te)&&this._editorFactory.focus(pt,!0)}_resetFocusedCell(pt){var Dt;const cn=this._getFocusedCell();qe(cn)&&cn.removeAttr("tabindex"),this._isNeedFocus=!1,this._isNeedScroll=!1,this._focusedCellPosition={},clearTimeout(this._updateFocusTimeout),null===(Dt=this._focusedView)||void 0===Dt||Dt.renderFocusState({preventScroll:pt})}restoreFocusableElement(pt,Dt){const cn=this;let dt,Et;const hn=(0,y.O9)(pt),$n=this._rowsView.element(),{columnIndex:Ln}=cn._focusedCellPosition,Nt=cn._dataController.getRowIndexOffset();pt=hn?pt:this._rowsView.getTopVisibleItemIndex()+Nt,hn?(Et=this._rowsView.getRow(pt-Nt),dt=cn._fireFocusedRowChanging(Dt,Et),!dt.cancel&&dt.rowIndexChanged&&(pt=dt.newRowIndex)):(cn._editorFactory.loseFocus(),cn._applyTabIndexToElement($n),c.A.trigger($n,"focus")),(!hn||!dt.cancel)&&cn.setFocusedCellPosition(pt,Ln),hn&&cn._updateFocus()}_getNewPositionByCode(pt,Dt,cn){let hn,{columnIndex:dt}=pt,{rowIndex:Et}=pt;if(void 0===pt.rowIndex&&"next"===cn)return{columnIndex:0,rowIndex:0};switch(cn){case"nextInRow":case"next":hn=this._getVisibleColumnCount(),dt<hn-1&&"row"!==Dt&&this._hasValidCellAfterPosition({columnIndex:dt,rowIndex:Et})?dt++:!this._isLastRow(Et)&&"next"===cn&&(dt=0,Et++);break;case"previousInRow":case"previous":dt>0&&"row"!==Dt&&this._hasValidCellBeforePosition({columnIndex:dt,rowIndex:Et})?dt--:Et>0&&"previous"===cn&&(Et--,hn=this._getVisibleColumnCount(),dt=hn-1);break;case"upArrow":Et=Et>0?Et-1:Et;break;case"downArrow":Et=this._isLastRow(Et)?Et:Et+1}return{columnIndex:dt,rowIndex:Et}}setFocusedCellPosition(pt,Dt){this.setFocusedRowIndex(pt),this.setFocusedColumnIndex(Dt)}setFocusedRowIndex(pt){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.rowIndex=pt}setFocusedColumnIndex(pt){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.columnIndex=pt}getRowIndex(){return this._focusedCellPosition?this._focusedCellPosition.rowIndex:-1}getColumnIndex(){return this._focusedCellPosition?this._focusedCellPosition.columnIndex:-1}getVisibleRowIndex(){var pt;const Dt=null===(pt=this._focusedCellPosition)||void 0===pt?void 0:pt.rowIndex;return!(0,y.O9)(Dt)||Dt<0?-1:Dt-this._dataController.getRowIndexOffset()}getVisibleColumnIndex(){var pt;const Dt=null===(pt=this._focusedCellPosition)||void 0===pt?void 0:pt.columnIndex;return(0,y.O9)(Dt)?Dt-this._columnsController.getColumnIndexOffset():-1}_applyColumnIndexBoundaries(pt){const Dt=this._getVisibleColumnCount();return pt<0?pt=0:pt>=Dt&&(pt=Dt-1),pt}_isCellByPositionValid(pt){const Dt=(0,b.A)(this._getCell(pt));return this._isCellValid(Dt)}_isLastRow(pt){const Dt=this._dataController;return this._isVirtualRowRender()?pt>=Dt.getMaxRowIndex():pt===Math.max(...Dt.items().map((dt,Et)=>!1!==dt.visible?Et:-1))}_isFirstValidCell(pt){let Dt=!1;return 0===pt.rowIndex&&pt.columnIndex>=0&&(Dt=Dt||!this._hasValidCellBeforePosition(pt)),Dt}_hasValidCellBeforePosition(pt){let{columnIndex:Dt}=pt,cn=!1;for(;Dt>0&&!cn;){const dt={columnIndex:--Dt,rowIndex:pt.rowIndex};cn=this._isCellByPositionValid(dt)}return cn}_hasValidCellAfterPosition(pt){let{columnIndex:Dt}=pt,cn=!1;const dt=this._getVisibleColumnCount();for(;Dt<dt-1&&!cn;){const Et={columnIndex:++Dt,rowIndex:pt.rowIndex};cn=this._isCellByPositionValid(Et)}return cn}_isLastValidCell(pt){const Dt=pt.columnIndex>=0?pt.columnIndex+1:0,{rowIndex:cn}=pt,dt={columnIndex:Dt,rowIndex:cn},Et=this._dataController.getVisibleRows(),hn=Et&&Et[cn];return!!this._isLastRow(cn)&&(("group"===hn?.rowType||"groupFooter"===hn?.rowType)&&pt.columnIndex>0||pt.columnIndex===this._getVisibleColumnCount()-1||!this._isCellByPositionValid(dt)&&this._isLastValidCell(dt))}_isCellValid(pt,Dt){if(qe(pt)){const cn=pt.parent(),dt=this._rowsView.getCellIndex(pt)+this._columnsController.getColumnIndexOffset(),Et=this._getColumnByCellElement(pt),hn=this._getVisibleColumnCount(),$n=this._editingController,Ln=function Re(Ai){return Ai&&Ai.hasClass(Y)}(cn),Nt=Et&&Et.showWhenGrouped,Gt=Et&&!pt.hasClass(oe)&&Xe(cn),on=function(){return!Ln&&Et&&(!(0,y.O9)(Et.groupIndex)||Nt&&Gt)||parseInt(pt.attr("colspan"),10)>1};if(void 0!==pt.attr("dx-drag-cell"))return!1;if(this.getMasterDetailCell(pt))return!0;if(hn>dt&&on()){const It=this._dataController.items(),Ot=this._rowsView.getRowIndex(cn),zt=It[Ot],un=$n&&this._isCellEditMode()&&$n.isEditing(),Pn=$n&&$n.isEditRow(Ot),ci=Pn||un;return Et.command?this._isLegacyNavigation()?!ci&&"expand"===Et.command:!un&&(Pn?"select"!==Et.command:!ci):(!un||!zt||"data"===zt.rowType)&&(!ci||Et.allowEditing||Dt)}}}getFirstValidCellInRow(pt,Dt){const cn=this,dt=pt.find("> td");let Et,hn;for(let $n=Dt=Dt||0;$n<dt.length;++$n)if(Et=dt.eq($n),cn._isCellValid(Et)){hn=Et;break}return hn}_getNextCell(pt,Dt,cn){const dt=cn||this._focusedCellPosition,Et=this.isRowFocusType(),hn=Et||["next","previous"].includes(pt);let $n,Ln;if(this._focusedView&&dt){const Nt=this._getNewPositionByCode(dt,Dt,pt);$n=(0,b.A)(this._getCell(Nt));const Gt="previous"===pt?this._isFirstValidCell(Nt):this._isLastValidCell(Nt);if(qe($n)&&!this._isCellValid($n)&&this._isCellInRow(Nt,hn)&&!Gt&&($n=Et?this.getFirstValidCellInRow($n.parent(),Nt.columnIndex):this._getNextCell(pt,"cell",Nt)),Ln=qe($n)&&$n.parent(),this._hasSkipRow(Ln)){const on=this._getRowIndex(Ln);if(this._isLastRow(on))return null;$n=this._getNextCell(pt,"row",{columnIndex:dt.columnIndex,rowIndex:on})}return qe($n)?$n:null}return null}_startEditing(pt,Dt){const cn=this._focusedCellPosition,dt=this.getVisibleRowIndex(),Et=this.getVisibleColumnIndex(),hn=this._dataController.items()[dt],$n=this._columnsController.getVisibleColumns()[Et];this._isAllowEditing(hn,$n)&&(this._isRowEditMode()?this._editingController.editRow(dt):cn&&this._startEditCell(pt,Dt))}_isAllowEditing(pt,Dt){return this._editingController.allowUpdating({row:pt})&&Dt&&Dt.allowEditing}_editFocusedCell(){const pt=this.getVisibleRowIndex(),Dt=this.getVisibleColumnIndex();return this._editingController.editCell(pt,Dt)}_startEditCell(pt,Dt){this._fastEditingStarted=(0,y.O9)(Dt);const cn=this._editFocusedCell(),dt=(0,y.uF)(cn);if(!this._isFastEditingStarted()||!dt&&!cn)return;const hn=dt&&Dt===ge?"":Dt,$n=dt?cn:(0,S.cY)().resolve(),Ln=this._rowsView.waitAsyncTemplates(!0);(0,S.z7)($n,Ln).done(()=>{this._editingCellHandler(pt,hn)})}_editingCellHandler(pt,Dt){var cn;const dt=this._getFocusedCell().find(fe).eq(0),Et=dt.get(0);if(!Et)return;const hn=(0,u.lh)(pt,{type:"keydown",target:Et}),$n=(0,u.lh)(pt,{type:"keypress",target:Et}),Ln=(0,u.lh)(pt,{type:"input",target:Et});Ln.originalEvent&&(Ln.originalEvent=(0,u.lh)(Ln.originalEvent,{data:Dt})),null===(cn=Et.select)||void 0===cn||cn.call(Et),c.A.trigger(dt,hn),hn.isDefaultPrevented()||(c.A.trigger(dt,$n),$n.isDefaultPrevented())||setTimeout(()=>{const Gt=this._getKeyPressInputValue(dt,Dt);dt.val(Gt);const on=dt.closest(".dx-widget");c.A.off(on,"focusout"),c.A.one(on,"focusout",()=>{c.A.trigger(dt,"change")}),c.A.trigger(dt,Ln)},f.A.mozilla?25:0)}_getKeyPressInputValue(pt,Dt){const cn=pt.val();return"-"===Dt&&"-0"===cn?"-0":Dt}_fireFocusChangingEvents(pt,Dt,cn,dt){let Et={};const hn=this._getCellPosition(Dt)??{};return this.isCellFocusType()&&(Et=this._fireFocusedCellChanging(pt,Dt,dt),Et.cancel||(hn.columnIndex=Et.newColumnIndex,hn.rowIndex=Et.newRowIndex,dt=Et.isHighlighted,Dt=(0,b.A)(this._getCell(hn)))),!Et.cancel&&cn&&Dt&&(Et=this._fireFocusedRowChanging(pt,Dt.parent()),Et.cancel||(hn.rowIndex=Et.newRowIndex,Et.isHighlighted=dt)),Et.$newCellElement=(0,b.A)(this._getCell(hn)),Et.$newCellElement.length||(Et.$newCellElement=Dt),Et}_fireFocusedCellChanging(pt,Dt,cn){const dt=this.option("focusedColumnIndex"),Et=this.option("focusedRowIndex"),hn=this._getCellPosition(Dt),$n=hn?hn.columnIndex:-1,Ln=hn?hn.rowIndex:-1,on={cellElement:Dt,prevColumnIndex:dt,prevRowIndex:Et,newColumnIndex:$n,newRowIndex:Ln,rows:this._dataController.getVisibleRows(),columns:this._columnsController.getVisibleColumns(),event:pt,isHighlighted:cn||!1,cancel:!1};return this._canceledCellPosition=null,this.executeAction("onFocusedCellChanging",on),(on.newColumnIndex!==$n||on.newRowIndex!==Ln)&&(on.$newCellElement=(0,b.A)(this._getCell({columnIndex:on.newColumnIndex,rowIndex:on.newRowIndex}))),on.cancel&&(this._canceledCellPosition={rowIndex:Ln,columnIndex:$n}),on}_fireFocusedCellChanged(pt){const Dt=this._rowsView.getCellIndex(pt),cn=pt?.parent().data("options"),dt=cn?.key;this._memoFireFocusedCellChanged(dt,Dt)}_memoFireFocusedCellChanged(pt,Dt){const cn=this._getFocusedCell(),dt=this._getRowIndex(cn?.parent()),Et=Math.min(dt-this._dataController.getRowIndexOffset(),this._dataController.items().length-1);if(this._editingController.isEditCell(Et,Dt))return;const $n=this._dataController.items()[Et],Ln=this._columnsController.getVisibleColumns()[Dt];this.executeAction("onFocusedCellChanged",{cellElement:cn?(0,P.cc)(cn):void 0,columnIndex:Dt,rowIndex:dt,row:$n,column:Ln})}_fireFocusedRowChanging(pt,Dt){const cn=this._getRowIndex(Dt),dt=this.option("focusedRowIndex"),Et=this._dataController.loadingOperationTypes(),hn={rowElement:Dt,prevRowIndex:dt,newRowIndex:cn,event:pt,rows:this._dataController.getVisibleRows(),cancel:!1},$n=Et.sorting||Et.grouping||Et.filtering||Et.paging;return!this._dataController||this._dataController.isLoading()&&$n?(hn.cancel=!0,hn):(this.option("focusedRowEnabled")&&(this.executeAction("onFocusedRowChanging",hn),!hn.cancel&&hn.newRowIndex!==cn&&(hn.resetFocusedRow=hn.newRowIndex<0,hn.resetFocusedRow||this.setFocusedRowIndex(hn.newRowIndex),hn.rowIndexChanged=!0)),hn)}_fireFocusedRowChanged(){var pt;const Dt=this.option("focusedRowEnabled"),cn=this.option("focusedRowKey"),dt=null===(pt=this._focusController)||void 0===pt?void 0:pt.getFocusedRowIndexByKey(cn);!Dt||(0,y.O9)(cn)&&dt<0||this._memoFireFocusedRowChanged(cn,dt)}_memoFireFocusedRowChanged(pt,Dt){const cn=Dt-this._dataController.getRowIndexOffset();this.executeAction("onFocusedRowChanged",{rowElement:Dt<0?void 0:this._rowsView.getRowElement(cn),rowIndex:Dt,row:Dt<0?void 0:this._dataController.getVisibleRows()[cn]})}_isEventInCurrentGrid(pt){return N.A.isElementInCurrentGrid(this,(0,b.A)(pt.target))}_isRowEditMode(){const pt=this._editingController.getEditMode();return pt===I.cy||pt===I.oX}_isCellEditMode(){const pt=this._editingController.getEditMode();return pt===I.eN||pt===I.yx}_isFastEditingAllowed(){return this._isCellEditMode()&&this.option("keyboardNavigation.editOnKeyPress")}_getInteractiveElement(pt,Dt){const cn=pt.find(fe).filter(":visible");return Dt?cn.last():cn.first()}_applyTabIndexToElement(pt){const Dt=this.option("tabIndex")??0;pt.attr("tabindex",Dt)}_getCell(pt){if(this._focusedView&&pt){const Dt=this._dataController.getRowIndexOffset(),cn=this._columnsController.getVisibleColumns(null,!0)[pt.columnIndex],dt=cn&&cn.fixed?this._getFixedColumnIndexOffset(cn):this._columnsController.getColumnIndexOffset();return this._focusedView.getCell({rowIndex:pt.rowIndex>=0?pt.rowIndex-Dt:-1,columnIndex:pt.columnIndex>=0?pt.columnIndex-dt:-1})}}_getRowIndex(pt){let Dt=this._rowsView.getRowIndex(pt);return Dt>=0&&(Dt+=this._dataController.getRowIndexOffset()),Dt}_hasSkipRow(pt){const Dt=pt&&pt.get(0);return Dt&&"none"===Dt.style.display}_allowEditingOnEnterKey(){return"startEdit"===this.option("keyboardNavigation.enterKeyAction")}_isLegacyNavigation(){return this.option("useLegacyKeyboardNavigation")}_getDirectionCodeByKey(pt){let Dt;switch(pt){case"upArrow":Dt="prevRow";break;case"downArrow":Dt="nextRow";break;case"leftArrow":Dt=this.option("rtlEnabled")?"nextInRow":"previousInRow";break;case"rightArrow":Dt=this.option("rtlEnabled")?"previousInRow":"nextInRow"}return Dt}_isVirtualScrolling(){const pt=this.option("scrolling.mode");return"virtual"===pt||"infinite"===pt}_isVirtualRowRender(){return this._isVirtualScrolling()||N.A.isVirtualRowRendering(this)}_isVirtualColumnRender(){return"virtual"===this.option("scrolling.columnRenderingMode")}_scrollBy(pt,Dt,cn,dt){const Et=this,hn=this._rowsView.getScrollable();if(Et._focusedCellPosition){const $n=function(){hn.off("scroll",$n),setTimeout(Et.restoreFocusableElement.bind(Et,cn,dt))};hn.on("scroll",$n)}return hn.scrollBy({left:pt,top:Dt})}_isInsideEditForm(pt){const Dt=(0,b.A)(pt).closest(`.${this.addWidgetPrefix(I.BL)}`);return Dt.length&&this.elementIsInsideGrid(Dt)}getMasterDetailCell(pt){const Dt=(0,b.A)(pt).closest(`.${te}`);return Dt.length&&this.elementIsInsideGrid(Dt)?Dt:null}_processNextCellInMasterDetail(pt,Dt){!this._isInsideEditForm(pt)&&pt&&this._applyTabIndexToElement(pt)}_handleTabKeyOnMasterDetailCell(pt,Dt){if(this.getMasterDetailCell(pt)){this._updateFocusedCellPosition((0,b.A)(pt),Dt);const cn=this._getNextCell(Dt,"row");return this._processNextCellInMasterDetail(cn,(0,b.A)(pt)),!0}return!1}_getElementType(pt){return(0,b.A)(pt).is("tr")?"row":"cell"}_isFastEditingStarted(){return this._isFastEditingAllowed()&&this._fastEditingStarted}_getVisibleColumnCount(){return this._columnsController.getVisibleColumns(null,!0).length}_isCellInRow(pt,Dt){const{columnIndex:cn}=pt,dt=this._getVisibleColumnCount();return Dt?cn>=0&&cn<=dt-1:cn>0&&cn<dt-1}_isCellElement(pt){return pt.length&&"TD"===pt[0].tagName}_getCellElementFromTarget(pt){const Dt=this._getElementType(pt),cn=(0,b.A)(pt);let dt;return dt="cell"===Dt?cn.closest(`.${I.sN} > td`):cn.children().not(`.${oe}`).first(),dt}_getRowsViewElement(){var pt;return null===(pt=this._rowsView)||void 0===pt?void 0:pt.element()}isKeyboardEnabled(){return this.option("keyboardNavigation.enabled")}_processCanceledEditCellPosition(pt,Dt){if(this._canceledCellPosition){const cn=this._canceledCellPosition.rowIndex===pt&&this._canceledCellPosition.columnIndex===Dt;return this._canceledCellPosition=null,cn}}updateFocusedRowIndex(){const pt=this._dataController,Dt=this.getVisibleRowIndex(),cn=pt.items(),dt=cn.length?cn.length-1:-1,Et=pt.getRowIndexOffset();dt>=0&&Dt>dt&&this.setFocusedRowIndex(dt+Et)}}},extenders:{views:{rowsView:Ai=>class extends Ai{_rowClick(pt){const Dt=this._editingController.getEditRowIndex(),cn=this._keyboardNavigationController.isKeyboardEnabled();Dt===pt.rowIndex&&this._keyboardNavigationController.setCellFocusType(),(At()||!cn)&&this.option("focusedRowEnabled")&&this._triggerPointerDownEventHandler(pt,!cn),super._rowClick.apply(this,arguments)}_triggerPointerDownEventHandler(pt,Dt){const{originalEvent:cn}=pt.event;if(cn){const dt=(0,b.A)(cn.target),Et=this.getCellIndex(dt),hn=this._columnsController.getVisibleColumns()[Et],$n=this._dataController.items()[pt.rowIndex];if(this._keyboardNavigationController._isAllowEditing($n,hn)||Dt){const Ln=(0,u.lh)(cn,{currentTarget:cn.target});this._keyboardNavigationController._pointerEventHandler(Ln)}}}renderFocusState(pt){super.renderFocusState(pt);const{preventScroll:Dt,pageSizeChanged:cn}=pt??{},dt=this.element();dt&&!(0,g.in)(dt)&&dt.attr("tabindex",null),cn&&this._keyboardNavigationController.updateFocusedRowIndex();let Et=this._keyboardNavigationController.getVisibleRowIndex();(!(0,y.O9)(Et)||Et<0)&&(Et=0);const hn=this.getCellElements(Et);this._keyboardNavigationController.isKeyboardEnabled()&&null!=hn&&hn.length&&this.updateFocusElementTabIndex(hn,Dt)}updateFocusElementTabIndex(pt,Dt){const cn=pt.eq(0).parent();if(Pe(cn))this._keyboardNavigationController._applyTabIndexToElement(cn);else{let dt=this._keyboardNavigationController.getColumnIndex();(!(0,y.O9)(dt)||dt<0)&&(dt=0),this._updateFocusedCellTabIndex(pt,dt)}}_updateFocusedCellTabIndex(pt,Dt){const cn=this._keyboardNavigationController,dt=pt?pt.length:-1,Et=function($n){const Ln=!!cn.getMasterDetailCell($n),Nt=cn._isCellValid($n);if(!Ln&&Nt&&cn._isCellElement($n))return cn._applyTabIndexToElement($n),cn.setCellFocusType(),!0},hn=((Ai,pt)=>Ai.filter((Ai=>[`[aria-colindex="${Ai+1}"]`,":not([dx-drag-cell])",":not([aria-hidden=true])"].join(""))(pt)).first())(pt,Dt);if(hn.length)Et(hn);else{dt<=Dt&&(Dt=dt-1);for(let $n=Dt;$n<dt&&!Et((0,b.A)(pt[$n]));++$n);}}renderDelayedTemplates(pt){super.renderDelayedTemplates.apply(this,arguments),this.waitAsyncTemplates().done(()=>{this._renderFocusByChange(pt)})}_renderFocusByChange(pt){var Dt;const{operationTypes:cn,repaintChangesOnly:dt}=pt??{},{fullReload:Et,pageSize:hn}=cn??{},$n=!(null==pt||null===(Dt=pt.changeTypes)||void 0===Dt||!Dt.find(Ln=>"insert"===Ln||"remove"===Ln));if(!pt||!dt||Et||hn||$n){const Ln=function wt(Ai){const pt=Ai.getController("keyboardNavigation");return!!pt._isVirtualScrolling()&&Ai.option("focusedRowIndex")===pt.getRowIndex()}(this);this.renderFocusState({preventScroll:Ln,pageSizeChanged:hn})}}_renderCore(pt){const Dt=super._renderCore.apply(this,arguments);return this._renderFocusByChange(pt),Dt}_editCellPrepared(pt){var Dt;const cn=this._getEditorInstance(pt),dt=null===(Dt=this._keyboardNavigationController)||void 0===Dt?void 0:Dt._isFastEditingStarted();cn&&dt&&this._handleEditingNavigationMode(cn),super._editCellPrepared.apply(this,arguments)}_handleEditingNavigationMode(pt){["downArrow","upArrow"].forEach(cn=>{const dt=pt._supportedKeys()[cn];pt.registerKeyHandler(cn,Et=>{if("true"===pt._input().attr("aria-expanded"))return dt&&dt.call(pt,Et)})}),pt.registerKeyHandler("leftArrow",W.lQ),pt.registerKeyHandler("rightArrow",W.lQ),"dxDateBox"===pt.NAME&&pt.option("useMaskBehavior")&&pt.registerKeyHandler("enter",W.lQ)}_getEditorInstance(pt){const Dt=pt.find(".dx-texteditor").eq(0);return N.A.getWidgetInstance(Dt)}}},controllers:{editing:Ai=>class extends Ai{editCell(pt,Dt){if(this._keyboardNavigationController._processCanceledEditCellPosition(pt,Dt))return!1;const cn=super.editCell(pt,Dt);return cn&&this._keyboardNavigationController.setupFocusedView(),cn}editRow(pt){const Dt=this._keyboardNavigationController.getVisibleColumnIndex(),cn=this._columnsController.getVisibleColumns()[Dt];(cn&&cn.type||this.option("editing.mode")===I.oX)&&this._keyboardNavigationController._resetFocusedCell(),super.editRow(pt)}addRow(pt){return this._keyboardNavigationController.setupFocusedView(),this._keyboardNavigationController.setCellFocusType(),super.addRow.apply(this,arguments)}getFocusedCellInRow(pt){let Dt=super.getFocusedCellInRow(pt);const cn=this._dataController.getRowIndexOffset(),dt=this._keyboardNavigationController._focusedCellPosition.rowIndex-cn;if(this._keyboardNavigationController.isKeyboardEnabled()&&dt===pt){const Et=this._keyboardNavigationController._getFocusedCell();qe(Et)&&!Et.hasClass(he)&&(Dt=Et)}return Dt}_processCanceledEditingCell(){this.closeEditCell().done(()=>{this._keyboardNavigationController._updateFocus()})}closeEditCell(){const pt=this._keyboardNavigationController;pt._fastEditingStarted=!1;const Dt=super.closeEditCell.apply(this,arguments);return pt._updateFocus(),Dt}_delayedInputFocus(){this._keyboardNavigationController._isNeedScroll=!0,super._delayedInputFocus.apply(this,arguments)}_isEditingStart(){const pt=super._isEditingStart.apply(this,arguments);if(pt&&!this._keyboardNavigationController._isNeedFocus){const Dt=this._keyboardNavigationController._getFocusedCell();this._keyboardNavigationController._focus(Dt,!0)}return pt}},data:Ai=>class extends Ai{_correctRowIndices(pt){const Dt=this._keyboardNavigationController._focusedCellPosition;if(super._correctRowIndices.apply(this,arguments),Dt&&Dt.rowIndex>=0){const cn=pt(Dt.rowIndex);cn&&(Dt.rowIndex+=cn,this._editorFactoryController.refocus())}}getMaxRowIndex(){let pt=this.items().length-1;const Dt=this.virtualItemsCount();return Dt&&(pt+=this.getRowIndexOffset()+Dt.end),pt}},adaptiveColumns:Ai=>class extends Ai{_showHiddenCellsInView(pt){let{viewName:Dt,$cells:cn,isCommandColumn:dt}=pt;super._showHiddenCellsInView.apply(this,arguments),Dt===ze&&!dt&&cn.each((Et,hn)=>{const $n=(0,b.A)(hn);Tt($n)&&$n.attr("tabindex",0)})}_hideVisibleCellInView(pt){let{viewName:Dt,$cell:cn,isCommandColumn:dt}=pt;super._hideVisibleCellInView.apply(this,arguments),Dt===ze&&!dt&&Tt(cn)&&cn.removeAttr("tabindex")}_hideVisibleColumnInView(pt){let{view:Dt,isCommandColumn:cn,visibleIndex:dt}=pt;super._hideVisibleColumnInView({view:Dt,isCommandColumn:cn,visibleIndex:dt}),"rowsView"===Dt.name&&this._rowsView.renderFocusState(null)}},keyboardNavigation:En.g}}}},3760:(In,Ze,M)=>{"use strict";M.d(Ze,{g:()=>P});var W=M(5704),o=M(1830);const P=b=>class extends b{rowsViewFocusHandler(f){const S=(0,W.A)(f.target);this.translateFocusIfNeed(f,S),super.rowsViewFocusHandler(f)}rowsViewFocusOutHandler(){super.rowsViewFocusOutHandler(),this.makeScrollableFocusableIfNeed()}translateFocusIfNeed(f,S){const T=this.isScrollableNeedFocusable(),y=this._isFixedColumn(0);if(!T||!y)return;const d=this._rowsView.getCell({rowIndex:0,columnIndex:0}),c=!!d.attr("tabindex"),s=S.is(this._$firstNotFixedCell);c&&s&&(f.preventDefault(),this._focus(d))}renderCompleted(f){this._$firstNotFixedCell=this.getFirstNotFixedCell(),this.makeScrollableFocusableIfNeed(),super.renderCompleted(f)}_focus(f,S,T){super._focus(f,S,T),this.makeScrollableFocusableIfNeed()}_tabKeyHandler(f,S){const y=!((0,o.O9)(this._focusedCellPosition)&&!(0,o.RI)(this._focusedCellPosition))||!f.shift&&this._isLastValidCell(this._focusedCellPosition)||f.shift&&this._isFirstValidCell(this._focusedCellPosition),d=this.isScrollableNeedFocusable();var c;y&&d&&(null===(c=this._$firstNotFixedCell)||void 0===c||c.removeAttr("tabIndex")),super._tabKeyHandler(f,S)}getFirstNotFixedCell(){const S=this._columnsController.getVisibleColumns().findIndex(T=>{let{fixed:y}=T;return!y});return-1===S?void 0:this._rowsView._getCellElement(0,S)}isScrollableNeedFocusable(){var f,S;const T=!!this._rowsView.getScrollable(),y=!(null===(f=this._rowsView._fixedTableElement)||void 0===f||!f.length),d=!(null===(S=this._rowsView.getCellElements(0))||void 0===S||!S.length);return T&&y&&d}makeScrollableFocusableIfNeed(){!this.isScrollableNeedFocusable()||!this._$firstNotFixedCell||this._applyTabIndexToElement(this._$firstNotFixedCell)}}},1009:(In,Ze,M)=>{"use strict";M.d(Ze,{j:()=>o});var W=M(8953);const o=function(P,b,f,S,T){const y=b.getController("keyboardNavigation");b.option("useLegacyKeyboardNavigation")||y&&!y.isKeyboardEnabled()||(b.createAction("onKeyDown"),W.js(P,b,f,S,T,d=>{b.executeAction("onKeyDown",d)}))}},5155:(In,Ze,M)=>{"use strict";M.d(Ze,{Q:()=>o});var W=M(3090);function o(P,b){const f=a=>a||1,S=[],T=(P[0]||[]).reduce((a,u)=>a+f(u.colspan),0),y=(a=>{let u=0,h=0;return()=>{const g=a[u]||[],_=g[h++];return h>=g.length&&(u++,h=0),_&&(_.colspan=f(_.colspan),_.rowspan=f(_.rowspan)),_}})(P),d=(a,u,h)=>{if((S[a]=S[a]||[])[u]=h,h.colspan>1||h.rowspan>1){const _=(0,W.X)({},h,b);for(let x=1;x<h.colspan;x++)d(a,u+x,_);for(let x=1;x<h.rowspan;x++)for(let w=0;w<h.colspan;w++)d(a+x,u+w,_)}};let c=y(),s=0;for(;c;){for(let a=0;a<T&&c;a++)S[s]&&S[s][a]||(d(s,a,c),a+=c.colspan-1,c=y());s++}return S}},3376:(In,Ze,M)=>{"use strict";M.d(Ze,{Ay:()=>K});var W=M(5737),o=M(5704),P=M(8684),b=M(4859),f=M(2660),S=M(1830),T=M(6110),y=M(8360),d=M(127),c=M(9144);const s=["rowsView"],g=(J,ie)=>{const re=Object.values(J).find(q=>{var Y;return null==q||null===(Y=q.element())||void 0===Y?void 0:Y.hasClass(ie)});return re?.element()??null};class D{constructor(ie){const re=this;re._updateLockCount=0,re.component=ie,re._actions={},re._actionConfigs={},(0,f.__)(this.callbackNames()||[],function(q,Y){const Z=re.callbackFlags(Y)||{};Z.unique=!0,Z.syncStrategy=!0,re[this]=(0,P.A)(Z)})}_endUpdateCore(){}init(){}callbackNames(){}callbackFlags(ie){}publicMethods(){return[]}beginUpdate(){this._updateLockCount++}endUpdate(){this._updateLockCount>0&&(this._updateLockCount--,this._updateLockCount||this._endUpdateCore())}option(ie){const{component:re}=this,q=re._optionCache;return 1===arguments.length&&q?(ie in q||(q[ie]=re.option(ie)),q[ie]):re.option.apply(re,arguments)}_silentOption(ie,re){const{component:q}=this,Y=q._optionCache;return Y&&(Y[ie]=re),q._setOptionWithoutOptionChange(ie,re)}localize(ie){const re=this.component._optionCache;return re?(ie in re||(re[ie]=y.A.format(ie)),re[ie]):y.A.format(ie)}on(ie,re){return this.component.on.apply(this.component,arguments)}off(){return this.component.off.apply(this.component,arguments)}optionChanged(ie){ie.name in this._actions&&(this.createAction(ie.name,this._actionConfigs[ie.name]),ie.handled=!0)}getAction(ie){return this._actions[ie]}setAria(ie,re,q){const Y=q.get(0),Z="role"!==ie&&"id"!==ie?"aria-":"";Y.setAttribute?Y.setAttribute(Z+ie,re):q.attr(Z+ie,re)}_createComponent(ie,re,q){return this.component._createComponent(ie,re,q)}getController(ie){return this.component._controllers[ie]}createAction(ie,re){if((0,S.Tn)(ie)){const q=this.component._createAction(ie.bind(this),re);return function(Y){q({event:Y})}}this._actions[ie]=this.component._createActionByOption(ie,re),this._actionConfigs[ie]=re}executeAction(ie,re){const q=this._actions[ie];return q&&q(re)}dispose(){const ie=this;(0,f.__)(ie.callbackNames()||[],function(){ie[this].empty()})}addWidgetPrefix(ie){return`dx-${this.component.NAME.slice(2).toLowerCase()}${ie?`-${ie}`:""}`}getWidgetContainerClass(){return this.addWidgetPrefix("dxDataGrid"===this.component.NAME?null:"container")}elementIsInsideGrid(ie){return ie.closest(`.${this.getWidgetContainerClass()}`).parent().is(this.component.$element())}}class C extends D{}class L extends D{constructor(ie){super(ie),this.renderCompleted=(0,P.A)(),this.resizeCompleted=(0,P.A)()}_isReady(){return this.component.isReady()}_endUpdateCore(){super._endUpdateCore(),!this._isReady()&&this._requireReady&&(this._requireRender=!1,this.component._requireResize=!1),this._requireRender&&(this._requireRender=!1,this.render(this._$parent))}_invalidate(ie,re){this._requireRender=!0,this.component._requireResize=(0,T.Vd)()&&(this.component._requireResize||ie),this._requireReady=this._requireReady||re}_renderCore(ie){}_resizeCore(){}_parentElement(){return this._$parent}element(){return this._$element}getElementHeight(){const ie=this.element();if(!ie)return 0;const re=parseFloat(ie.css("marginTop"))||0,q=parseFloat(ie.css("marginBottom"))||0,{offsetHeight:Y}=ie.get(0);return Y+re+q}isVisible(){return!0}getTemplate(ie){return this.component._getTemplate(ie)}getView(ie){return this.component._views[ie]}_getBorderedViews(){return{columnHeadersView:this.component._views.columnHeadersView,rowsView:this.component._views.rowsView,filterPanelView:this.component._views.filterPanelView,footerView:this.component._views.footerView}}render(ie,re){let q=this._$element;const Y=this.isVisible();if((q||ie)&&(this._requireReady=!1,q||(q=this._$element=(0,o.A)("<div>").appendTo(ie),this._$parent=ie),q.toggleClass("dx-hidden",!Y),this.component._views&&((J,ie)=>{if(!((J,ie)=>{var re;if(!Object.keys(ie).includes(J))return!1;const{rowsView:q}=ie,Y=(0,c.A)(ie,s);return!!(0,S.O9)(null==q||null===(re=q.element)||void 0===re?void 0:re.call(q))&&Object.values(Y).filter(Z=>{var Q;return null==Z||null===(Q=Z.isVisible)||void 0===Q?void 0:Q.call(Z)}).every(Z=>(0,S.O9)(Z?.element()))})(J,ie))return;const re=g(ie,"dx-bordered-top-view"),q=g(ie,"dx-bordered-bottom-view"),Y=(J=>{let{columnHeadersView:ie,rowsView:re}=J;return null!=ie&&ie.isVisible()?ie.element():re.element()})(ie),Z=(J=>{let{filterPanelView:ie,footerView:re,rowsView:q}=J;return null!=ie&&ie.isVisible()?ie.element():null!=re&&re.isVisible()?re.element():q.element()})(ie);re&&!re.is(Y)&&re.removeClass("dx-bordered-top-view"),q&&!q.is(Z)&&q.removeClass("dx-bordered-bottom-view"),Y.hasClass("dx-bordered-top-view")||Y.addClass("dx-bordered-top-view"),Z.hasClass("dx-bordered-bottom-view")||Z.addClass("dx-bordered-bottom-view")})(this.name,this._getBorderedViews()),Y)){this.component._optionCache={};const Z=this._renderCore(re);this.component._optionCache=void 0,Z?Z.done(()=>{this.renderCompleted.fire(re)}):this.renderCompleted.fire(re)}}resize(){this.isResizing=!0,this._resizeCore(),this.resizeCompleted.fire(),this.isResizing=!1}focus(ie){this.element().get(0).focus({preventScroll:ie})}}function G(J){const re={};return Object.entries(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forEach(q=>{let[Y,Z]=q;const Q=J[Y];Q&&(re[Y]=(0,S.Tn)(Z)?Z(Q):Q.inherit(Z))}),re}const K={modules:[],View:L,ViewController:class I extends C{getView(ie){return this.component._views[ie]}getViews(){return this.component._views}},Controller:C,registerModule(J,ie){const{modules:re}=this;for(let q=0;q<re.length;q++)if(re[q].name===J)return;ie.name=J,re.push(ie)},registerModulesOrder(J){this.modulesOrder=J},unregisterModule(J){this.modules=(0,b.VM)(this.modules,ie=>ie.name!==J)},processModules:function U(J,ie){const{modules:re}=ie,{modulesOrder:q}=ie;function Y(oe){const ae={};return(0,f.__)(oe,(ee,he)=>{const de=new he(J);de.name=ee,function k(J,ie,re){const q=re.publicMethods();q&&(0,f.__)(q,(Y,Z)=>{if(!re[Z])throw d.A.Error("E1006",ie,Z);if(J[Z])throw d.A.Error("E1005",Z);J[Z]=function(){return re[Z](...arguments)}})}(J,ee,de),ae[ee]=de}),ae}q&&re.sort((oe,ae)=>{let ee=q.indexOf(oe.name),he=q.indexOf(ae.name);return ee<0&&(ee=1e6),he<0&&(he=1e6),ee-he});const Z={},Q={};re.forEach(oe=>{let{name:ae,controllers:ee={},views:he={}}=oe;Object.entries(ee).forEach(de=>{let[ue,be]=de;if(Z[ue])throw d.A.Error("E1001",ae,ue);if(!(be?.prototype instanceof C))throw d.A.Error("E1002",ae,ue);Z[ue]=be}),Object.entries(he).forEach(de=>{let[ue,be]=de;if(Q[ue])throw d.A.Error("E1003",ae,ue);if(!(be?.prototype instanceof L))throw d.A.Error("E1004",ae,ue);Q[ue]=be})});const te=re.filter(oe=>{let{extenders:ae}=oe;return!!ae}),pe=te.reduce((oe,ae)=>{let{extenders:ee}=ae;return(0,W.A)({},oe,G(oe,ee?.controllers))},Z),z=te.reduce((oe,ae)=>{let{extenders:ee}=ae;return(0,W.A)({},oe,G(oe,ee?.views))},Q);J._controllers=Y(pe),J._views=Y(z)},callModuleItemsMethod:function(J,ie,re){re=re||[],J._controllers&&(0,f.__)(J._controllers,function(){this[ie]&&this[ie].apply(this,re)}),J._views&&(0,f.__)(J._views,function(){this[ie]&&this[ie].apply(this,re)})}}},8736:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>he});var W=M(5737),o=M(5704),P=M(4859),b=M(4270),f=M(6021),S=M(3090),T=M(2660),y=M(4757),d=M(1363),c=M(9495),s=M(1830),a=M(6234),u=M(6110),h=M(1221),g=M(5335),_=M(9916),x=M(4072),w=M(6772),D=M(7281),C=M(9551);const re={year:de=>de&&de.getFullYear(),month:de=>de&&de.getMonth()+1,day:de=>de&&de.getDate(),quarter:de=>de&&Math.floor(de.getMonth()/3)+1,hour:de=>de&&de.getHours(),minute:de=>de&&de.getMinutes(),second:de=>de&&de.getSeconds()},q=function(){const ue=this.calculateCellValue(arguments[1]);if(!(0,s.O9)(ue))return null;if(Z(this.dataType))return re[arguments[0]](ue);if("number"===this.dataType){const be=arguments[0];return Math.floor(Number(ue)/be)*be}},Y=function(de,ue){return(0,s.Tn)(de)&&(0,s.Tn)(ue)&&de.originalCallback&&ue.originalCallback?de.originalCallback===ue.originalCallback&&de.columnIndex===ue.columnIndex:de===ue};function Z(de){return"date"===de||"datetime"===de}const Q=function(de){de.get(0).textContent="\xa0"},te=function(de){const ue=(0,_.st)(de=de||[]);for(let be=0;be<de.length;be++)de&&de[be]&&void 0!==de[be].isExpanded&&(ue[be].isExpanded=de[be].isExpanded),de&&de[be]&&void 0!==de[be].groupInterval&&(ue[be].groupInterval=de[be].groupInterval);return ue},pe=function(de,ue){const be=w.A.format(de,ue.format)||de&&de.toString()||"",ve={value:de,valueText:ue.getDisplayFormat?ue.getDisplayFormat(be):be,target:ue.target||"row",groupInterval:ue.groupInterval};return ue.customizeText?ue.customizeText.call(ue,ve):ve.valueText},z=function(de,ue){const be=de.displayFormat||de.columnCaption&&ue[`${de.summaryType}OtherColumn`]||ue[de.summaryType];return pe(de.value,{format:de.valueFormat,getDisplayFormat:ve=>be?(0,c.GP)(be,ve,de.columnCaption):ve,customizeText:de.customizeText})},oe=function(de){const ue=de.data&&de.data(),be=ue&&ue.dxComponents,ve=be&&be[0];return ve&&ue[ve]},ae=function(de,ue){if(Array.isArray(de)&&Array.isArray(ue)){if(de.length!==ue.length)return!1;for(let be=0;be<de.length;be++)if(!ae(de[be],ue[be]))return!1;return!0}return(0,s.Tn)(de)&&de.columnIndex>=0&&(0,s.Tn)(ue)&&ue.columnIndex>=0?de.columnIndex===ue.columnIndex&&(0,b.ao)(de.filterValue)===(0,b.ao)(ue.filterValue)&&(0,b.ao)(de.selectedFilterOperation)===(0,b.ao)(ue.selectedFilterOperation):(0,b.ao)(de)==(0,b.ao)(ue)},he={renderNoDataText(de){if(!(de=de||this.element()))return;const be=this.addWidgetPrefix("nodata");let ve=de.find(`.${be}`).last();const le=this._dataController.isEmpty(),Ce=this._dataController.isLoading();ve.length||(ve=(0,o.A)("<span>").addClass(be)),ve.parent().is(de)||ve.appendTo(de),le&&!Ce?ve.removeClass("dx-hidden").text(this._getNoDataText()):ve.addClass("dx-hidden")},renderLoadPanel(de,ue,be){const ve=this;let le;ve._loadPanel&&ve._loadPanel.$element().remove(),le=ve.option("loadPanel"),le&&("auto"===le.enabled?!be:le.enabled)?(le=(0,S.X)({shading:!1,message:le.text,container:ue},le),ve._loadPanel=ve._createComponent((0,o.A)("<div>").appendTo(ue),D.A,le)):ve._loadPanel=null},calculateLoadPanelPosition(de){const ue=(0,o.A)((0,u.zk)());return(0,d.Oq)(de)>(0,d.Oq)(ue)?{of:ue,boundary:de,collision:"fit"}:{of:de}},getIndexByKey(de,ue,be){let ve=-1;if(void 0!==de&&Array.isArray(ue)){be=arguments.length<=2?"key":be;for(let le=0;le<ue.length;le++){const Ce=(0,s.O9)(be)?ue[le][be]:ue[le];if((0,P.RL)(de,Ce)){ve=le;break}}}return ve},combineFilters(de,ue){let be=[];ue=ue||"and";for(let le=0;le<de.length;le++){var ve;if(de[le]){if(1===(null===(ve=de[le])||void 0===ve?void 0:ve.length)&&"!"===de[le][0]){if("and"===ue)return["!"];if("or"===ue)continue}be.length&&be.push(ue),be.push(de[le])}}if(1===be.length&&(be=be[0]),be.length)return be},checkChanges(de,ue){let be=0;for(let ve=0;ve<ue.length;ve++)de[ue[ve]]&&be++;return de.length&&de.length===be},equalFilterParameters:ae,proxyMethod(de,ue,be){de[ue]||(de[ue]=function(){const ve=this._dataSource;return ve?ve[ue].apply(ve,arguments):be})},formatValue:pe,getFormatOptionsByColumn:(de,ue)=>({format:de.format,getDisplayFormat:de.getDisplayFormat,customizeText:de.customizeText,target:ue,trueText:de.trueText,falseText:de.falseText}),getDisplayValue:(de,ue,be,ve)=>de.displayValueMap&&void 0!==de.displayValueMap[ue]?de.displayValueMap[ue]:de.calculateDisplayValue&&be&&"group"!==ve?de.calculateDisplayValue(be):!de.lookup||"group"===ve&&(de.calculateGroupValue||de.calculateDisplayValue)?ue:de.lookup.calculateCellValue(ue),getGroupRowSummaryText(de,ue){let be="(";for(let ve=0;ve<de.length;ve++)be+=(ve>0?", ":"")+z(de[ve],ue);return be+")"},getSummaryText:z,normalizeSortingInfo:te,getFormatByDataType(de){switch(de){case"date":return"shortDate";case"datetime":return"shortDateShortTime";default:return}},getHeaderFilterGroupParameters(de,ue){let be=[];const ve=de.dataField||de.name,le=C.A.getGroupInterval(de);return le?((0,T.__)(le,(Ce,ye)=>{be.push(ue?{selector:ve,groupInterval:ye,isExpanded:Ce<le.length-1}:q.bind(de,ye))}),be):(ue?be=[{selector:ve,isExpanded:!1}]:(be=function(Ce){let ye=de.calculateCellValue(Ce);return(void 0===ye||""===ye)&&(ye=null),ye},de.sortingMethod&&(be=[{selector:be,compare:de.sortingMethod.bind(de)}])),be)},equalSortParameters(de,ue,be){if(de=te(de),ue=te(ue),Array.isArray(de)&&Array.isArray(ue)){if(de.length!==ue.length)return!1;for(let ve=0;ve<de.length;ve++)if(!Y(de[ve].selector,ue[ve].selector)||de[ve].desc!==ue[ve].desc||de[ve].groupInterval!==ue[ve].groupInterval||!be&&!!de[ve].isExpanded!=!!ue[ve].isExpanded)return!1;return!0}return(!de||!de.length)==(!ue||!ue.length)},getPointsByColumns(de,ue,be,ve){const le=de.length;let ye,ge,Ce=!1,fe=ve||0;const xe=[];let Te;for(let Ee=0;Ee<=le;Ee++){Ee<le&&(ye=de.eq(Ee),ge=ye.offset(),Te="rtl"===ye.css("direction"));const Oe={index:fe,x:ge?ge.left+(!be&&Te^Ee===le?(0,y.N)(ye[0]).width:0):0,y:ge?ge.top+(be&&Ee===le?(0,y.N)(ye[0]).height:0):0,columnIndex:fe};if(!be&&Ee>0){const ze=de.eq(Ee-1).offset();ze.top<Oe.y&&(Oe.y=ze.top)}ue&&(Ce=ue(Oe)),Ce||xe.push(Oe),fe++}return xe},getExpandCellTemplate:()=>({allowRenderToDetachedContainer:!0,render(de,ue){const be=(0,o.A)(de);if(!(0,s.O9)(ue.value)||ue.data&&ue.data.isContinuation||ue.row.isNewRow)Q(be);else{const ve=ue.component.getView("rowsView");be.addClass("dx-datagrid-expand").addClass("dx-selection-disabled"),(0,o.A)("<div>").addClass(ue.value?"dx-datagrid-group-opened":"dx-datagrid-group-closed").appendTo(be),ve.setAria("label",ve.localize(ue.value?"dxDataGrid-ariaCollapse":"dxDataGrid-ariaExpand"),be)}}}),setEmptyText:Q,isDateType:Z,getSelectionRange(de){try{if(de)return{selectionStart:de.selectionStart,selectionEnd:de.selectionEnd}}catch{}return{}},setSelectionRange(de,ue){try{de&&de.setSelectionRange&&de.setSelectionRange(ue.selectionStart,ue.selectionEnd)}catch{}},focusAndSelectElement(de,ue){const be=ue.is(":focus");x.A.trigger(ue,"focus");const ve=de.option("editing.selectTextOnEditStart"),le=ue.get(0);if(!be&&ve&&ue.is(".dx-texteditor-input")&&!ue.is("[readonly]")){const Ce=oe(ue.closest(".dx-texteditor"));(0,f.z7)(Ce&&Ce._loadItemDeferred).done(()=>{le.select()})}},getWidgetInstance:oe,getLastResizableColumnIndex(de,ue){const be=de.some(le=>le&&!le.command&&!le.fixed&&!1!==le.allowResizing);let ve;for(ve=de.length-1;de[ve];ve--){const le=de[ve];if(!(le.command||le.fixed||"adaptiveHidden"===(ue&&ue[ve])||be&&!1===le.allowResizing))break}return ve},isElementInCurrentGrid:(de,ue)=>!(!ue||!ue.length)&&ue.closest(`.${de.getWidgetContainerClass()}`).parent().is(de.component.$element()),isVirtualRowRendering(de){const ue=de.option("scrolling.rowRenderingMode"),be="virtual"===de.option("scrolling.mode"),ve="infinite"===de.option("scrolling.mode");return!(!1!==de.option("scrolling.legacyMode")||!be&&!ve)||"virtual"===ue},getPixelRatio:de=>de.devicePixelRatio||1,getContentHeightLimit(de){return de.mozilla?8e6:15e6/this.getPixelRatio((0,u.zk)())},normalizeLookupDataSource(de){let ue;return de.items?ue=de.items:(ue=de.dataSource,(0,s.Tn)(ue)&&!a.A.isWrapped(ue)&&(ue=ue({}))),(0,g.ho)(ue)},getWrappedLookupDataSource(de,ue,be){if(!ue)return[];const ve=this.normalizeLookupDataSource(de.lookup);if(de.calculateCellValue!==de.defaultCalculateCellValue)return ve;const le=ue.remoteOperations().groupPaging,Ce=de.displayField&&(0,s.Kg)(de.displayField);let ye,ge,fe;const xe=(Ee,Oe)=>{const ze=Oe.skip??0;return Ee.slice(ze,Oe.take?ze+Oe.take:Ee.length)};return(0,W.A)({},ve,{__dataGridSourceFilter:be,load:Ee=>{const Oe=new f.cY;return(ze=>{const $e=function ee(de){return Array.isArray(de)||(de=[de]),de.map((ue,be)=>(0,s.Kg)(ue)?{selector:ue,isExpanded:be<de.length-1}:ue)}(Ce?[de.dataField,de.displayField]:de.dataField),Be=new f.cY;return ye&&(!le||ze.skip===fe&&ze.take===ge)?Be.resolve(xe(ye,ze)):(fe=ze.skip,ge=ze.take,ue.load({filter:be,group:$e,take:le?ze.take:void 0,skip:le?ze.skip:void 0}).done(ot=>{ye=ot,Be.resolve(le?ot:xe(ot,ze))}).fail(Be.fail)),Be})(Ee).done(ze=>{if(0===ze.length)return void Oe.resolve([]);const $e=this.combineFilters(ze.flatMap(Ue=>Ue.key).map(Ue=>[de.lookup.valueExpr,Ue]),"or");new h.q((0,W.A)({},ve,Ee,{filter:this.combineFilters([$e,Ee.filter],"and"),paginate:!1})).load().done(Oe.resolve).fail(Oe.fail)}).fail(Oe.fail),Oe},key:de.lookup.valueExpr,byKey(Ee){const Oe=(0,f.cY)();return this.load({filter:[de.lookup.valueExpr,"=",Ee]}).done(ze=>{Oe.resolve(ze[0])}),Oe.promise()}})},logHeaderFilterDeprecatedWarningIfNeed(de){const ue=de._logDeprecatedOptionWarning.bind(de);(0,s.O9)(de.option("headerFilter.allowSearch"))&&ue("headerFilter.allowSearch",{since:"23.1",alias:"headerFilter.search.enabled"}),(0,s.O9)(de.option("headerFilter.searchTimeout"))&&ue("headerFilter.searchTimeout",{since:"23.1",alias:"headerFilter.search.timeout"});const be="dxPivotGrid"===de.NAME?"dataSource.fields":"columns",ve=de.option(be);if(!Array.isArray(ve))return;const le=Ce=>{Ce.forEach(ye=>{var ge;const fe=ye.headerFilter||{};(0,s.O9)(fe.allowSearch)&&ue(`${be}[].headerFilter.allowSearch`,{since:"23.1",alias:`${be}[].headerFilter.search.enabled`}),(0,s.O9)(fe.searchMode)&&ue(`${be}[].headerFilter.searchMode`,{since:"23.1",alias:`${be}[].headerFilter.search.mode`}),null!==(ge=ye.columns)&&void 0!==ge&&ge.length&&le(ye.columns)})};le(ve)}}},1610:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(4859),o=M(3090),P=M(2660),b=M(1830),f=M(7080);class T extends f.A{_getDefaultOptions(){const d=super._getDefaultOptions();return(0,P.__)(this.getGridCoreHelper().modules,function(){(0,b.Tn)(this.defaultOptions)&&(0,o.X)(!0,d,this.defaultOptions())}),d}_init(){this._activeStateUnit=".dx-row",super._init()}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,o.X)(this._deprecatedOptions,{"columnChooser.allowSearch":{since:"23.1",message:'Use the "columnChooser.search.enabled" option instead'},"columnChooser.searchTimeout":{since:"23.1",message:'Use the "columnChooser.search.timeout" option instead'}})}_clean(){}_optionChanged(d){this.getGridCoreHelper().callModuleItemsMethod(this,"optionChanged",[d]),d.handled||super._optionChanged(d)}_dimensionChanged(){this.updateDimensions(!0)}_visibilityChanged(d){d&&this.updateDimensions()}_renderContentImpl(){this.getView("gridView").update()}_renderContent(){const d=this;(0,W.zE)(()=>{d._renderContentImpl()})}_dispose(){super._dispose(),this.getGridCoreHelper().callModuleItemsMethod(this,"dispose")}isReady(){return this.getController("data").isReady()}getController(d){return this._controllers[d]}getView(d){return this._views[d]}getGridCoreHelper(){}beginUpdate(){super.beginUpdate(),this.getGridCoreHelper().callModuleItemsMethod(this,"beginUpdate")}endUpdate(){this.getGridCoreHelper().callModuleItemsMethod(this,"endUpdate"),super.endUpdate()}}},1781:(In,Ze,M)=>{"use strict";M.d(Ze,{g:()=>w,o:()=>g});var W=M(5704),o=M(4859),P=M(6021),b=M(2660),f=M(1363),S=M(1830),T=M(8360),y=M(8736);const h=function(D){D._expandedItems=[],D._isExpandAll=D.option("masterDetail.autoExpandAll")},g=D=>class extends D{init(){h(this),super.init()}expandAll(C){const I=this;C<0?(I._isExpandAll=!0,I._expandedItems=[],I.updateItems()):super.expandAll.apply(I,arguments)}collapseAll(C){const I=this;C<0?(I._isExpandAll=!1,I._expandedItems=[],I.updateItems()):super.collapseAll.apply(I,arguments)}isRowExpandedHack(){return super.isRowExpanded.apply(this,arguments)}isRowExpanded(C){const I=this,L=y.A.getIndexByKey(C,I._expandedItems);return Array.isArray(C)?super.isRowExpanded.apply(I,arguments):!!(I._isExpandAll^(L>=0&&I._expandedItems[L].visible))}_getRowIndicesForExpand(C){const I=this.getRowIndexByKey(C);return[I,I+1]}_changeRowExpandCore(C){const I=this;let L;if(Array.isArray(C))L=super._changeRowExpandCore.apply(I,arguments);else{const N=y.A.getIndexByKey(C,I._expandedItems);if(N>=0){const{visible:G}=I._expandedItems[N];I._expandedItems[N].visible=!G}else I._expandedItems.push({key:C,visible:!0});I.updateItems({changeType:"update",rowIndices:I._getRowIndicesForExpand(C)}),L=(new P.cY).resolve()}return L}_processDataItemHack(){return super._processDataItem.apply(this,arguments)}_processDataItem(C,I){const L=super._processDataItem.apply(this,arguments);return L.isExpanded=this.isRowExpanded(L.key),void 0===I.detailColumnIndex&&(I.detailColumnIndex=-1,(0,b.__)(I.visibleColumns,(N,G)=>{if("expand"===G.command&&!(0,S.O9)(G.groupIndex))return I.detailColumnIndex=N,!1})),I.detailColumnIndex>=0&&(L.values[I.detailColumnIndex]=L.isExpanded),L}_processItemsHack(){return super._processItems.apply(this,arguments)}_processItems(C,I){const L=this,{changeType:N}=I,G=[];return C=super._processItems.apply(L,arguments),"loadingAll"===N?C:("refresh"===N&&(L._expandedItems=(0,o.VM)(L._expandedItems,k=>k.visible)),(0,b.__)(C,(k,U)=>{G.push(U);const B=y.A.getIndexByKey(U.key,L._expandedItems);"data"===U.rowType&&(U.isExpanded||B>=0)&&!U.isNewRow&&G.push({visible:U.isExpanded,rowType:"detail",key:U.key,data:U.data,values:[]})}),G)}optionChanged(C){const I=this;let L,N;if("masterDetail"===C.name){switch(C.name="dataSource",C.fullName){case"masterDetail":{const G=C.value||{},k=C.previousValue||{};L=G.enabled!==k.enabled,N=G.autoExpandAll!==k.autoExpandAll;break}case"masterDetail.template":h(I);break;case"masterDetail.enabled":L=!0;break;case"masterDetail.autoExpandAll":N=!0}(L||N)&&h(I)}super.optionChanged(C)}},w={defaultOptions:()=>({masterDetail:{enabled:!1,autoExpandAll:!1,template:null}}),extenders:{controllers:{columns:D=>class extends D{_getExpandColumnsCore(){const C=super._getExpandColumnsCore();return this.option("masterDetail.enabled")&&C.push({type:"detailExpand",cellTemplate:y.A.getExpandCellTemplate()}),C}},data:g,resizing:D=>class extends D{fireContentReadyAction(){super.fireContentReadyAction.apply(this,arguments),this._updateParentDataGrids(this.component.$element())}_updateParentDataGrids(C){const I=C.closest(".dx-master-detail-row");I.length&&(0,P.z7)(this._updateMasterDataGrid(I,C)).done(()=>{this._updateParentDataGrids(I.parent())})}_updateMasterDataGrid(C,I){const L=(0,W.A)(C).data("options"),N=(0,W.A)(C).closest(`.${this.getWidgetContainerClass()}`).parent().data("dxDataGrid");if(L&&N)return this._updateMasterDataGridCore(N,L)}_updateMasterDataGridCore(C,I){const L=(0,P.cY)();if(C.getView("rowsView").isFixedColumns())this._updateFixedMasterDetailGrids(C,I.rowIndex,(0,W.A)(I.rowElement)).done(L.resolve);else{if(!0===C.option("scrolling.useNative"))return void C.updateDimensions().done(()=>L.resolve(!0));const N=C.getScrollable();N?N?.update().done(()=>L.resolve()):L.resolve()}return L.promise()}_updateFixedMasterDetailGrids(C,I,L){const N=(0,P.cY)(),G=(0,W.A)(C.getRowElement(I)),k=(0,W.A)(C.getView("rowsView").getTableElements()),U=2===G?.length&&(0,f.Oq)(G.eq(0))!==(0,f.Oq)(G.eq(1)),B=2===k?.length&&(0,f.Oq)(k.eq(0))!==(0,f.Oq)(k.eq(1));if(U||B){const K=(0,f.RG)(L);return C.updateDimensions().done(()=>{const J=this.option("columnAutoWidth")&&!0===C.option("scrolling.useNative"),ie=J&&K!==(0,f.RG)(L);J&&ie?this.updateDimensions().done(()=>N.resolve(!0)):N.resolve(!0)}),N.promise()}return(0,P.cY)().resolve()}_toggleBestFitMode(C){if(super._toggleBestFitMode.apply(this,arguments),this.option("masterDetail.template")){const I=this._rowsView.getTableElement();I&&I.find(".dx-master-detail-cell").css("maxWidth",C?0:"")}}}},views:{rowsView:D=>class extends D{_getCellTemplate(C){const I=this,{column:L}=C,N=this._editingController,G=N&&N.isEditRow(C.rowIndex);let k;return k="detail"!==L.command||G?super._getCellTemplate.apply(I,arguments):I.option("masterDetail.template")||{allowRenderToDetachedContainer:!1,render:I._getDefaultTemplate(L)},k}_isDetailRow(C){return C&&C.rowType&&0===C.rowType.indexOf("detail")}_createRow(C){const I=super._createRow.apply(this,arguments);return C&&this._isDetailRow(C)&&(this.option("showRowLines")&&I.addClass("dx-row-lines"),I.addClass("dx-master-detail-row"),(0,S.O9)(C.visible)&&I.toggle(C.visible)),I}_renderCells(C,I){const{row:L}=I;let N;const G=this._columnsController.getVisibleColumns();L.rowType&&this._isDetailRow(L)?this._needRenderCell(0,I.columnIndices)&&(N=this._renderCell(C,{value:null,row:L,rowIndex:L.rowIndex,column:{command:"detail"},columnIndex:0,change:I.change}),N.addClass("dx-cell-focus-disabled").addClass("dx-master-detail-cell").attr("colSpan",G.length),L.isEditing||N.attr("aria-roledescription",T.A.format("dxDataGrid-masterDetail"))):super._renderCells.apply(this,arguments)}}}}}},8645:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>dn});var W=M(1830),o=M(6110),P=M(8360),b=M(1973),f=M(4505);class S extends f.A{_optionChanged(_n){switch(_n.name){case"pageIndex":{const Wt=this.option("pageIndexChanged");Wt&&Wt(_n.value);break}case"pageSize":{const Wt=this.option("pageSizeChanged");Wt&&Wt(_n.value);break}}super._optionChanged(_n)}}var T=M(9144),y=M(5737),d=M(5328),c=M(5652),s=M(1773),u=M(6847);function h(an,_n){const Wt=function a(an){var _n;const Wt=(0,o.zk)();return an?null===(_n=Wt.getComputedStyle)||void 0===_n?void 0:_n.call(Wt,an):null}(_n)??{};return(0,u.R)(Wt[an])}function _(an){return h("marginLeft",an)+h("marginRight",an)+h("width",an)}function x(an){return h("minWidth",an)}const w=["contentTemplate","pagerProps"];const N={},G=an=>an&&(an.defaultProps?_n=>(0,d._B)((0,d.sO)(2,an,(0,y.A)({},_n))):an);let k=(()=>{class an extends c.JP{constructor(Wt){super(Wt),this.parentRef=(0,d._3)(),this.pageSizesRef=(0,d._3)(),this.infoTextRef=(0,d._3)(),this.pagesRef=(0,d._3)(),this.actualIsLargeDisplayMode=!0,this.actualInfoTextVisible=!0,this.state={infoTextVisible:!0,isLargeDisplayMode:!0},this.subscribeToResize=this.subscribeToResize.bind(this),this.effectUpdateChildProps=this.effectUpdateChildProps.bind(this),this.updateAdaptivityProps=this.updateAdaptivityProps.bind(this)}createEffects(){return[new c.Lt(this.subscribeToResize,[this.state.infoTextVisible,this.state.isLargeDisplayMode]),new c.Lt(this.effectUpdateChildProps,[this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])]}updateEffects(){var Wt,zn;null===(Wt=this._effects[0])||void 0===Wt||Wt.update([this.state.infoTextVisible,this.state.isLargeDisplayMode]),null===(zn=this._effects[1])||void 0===zn||zn.update([this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])}subscribeToResize(){const Wt=()=>{this.parentWidth>0&&this.updateAdaptivityProps()};return s.A.add(Wt),()=>{s.A.remove(Wt)}}effectUpdateChildProps(){this.parentWidth>0&&this.updateAdaptivityProps()}get contentAttributes(){const{className:Wt,displayMode:zn,gridCompatibility:mi,hasKnownLastPage:Si,infoText:go,label:No,lightModeEnabled:Sr,maxPagesCount:pr,onKeyDown:Vr,pageCount:Lt,pageIndex:bn,pageIndexChange:jn,pageSize:Ci,pageSizeChange:Mi,pageSizes:Ki,pagesCountText:bt,pagesNavigatorVisible:gn,rtlEnabled:Kt,showInfo:Mn,showNavigationButtons:_i,showPageSizes:Qi,totalCount:Co,visible:$o}=this.props.pagerProps;return(0,y.A)({},this.restAttributes,{pageSize:Ci,pageIndex:bn,pageIndexChange:jn,pageSizeChange:Mi,gridCompatibility:mi,className:Wt,showInfo:Mn,infoText:go,lightModeEnabled:Sr,displayMode:zn,maxPagesCount:pr,pageCount:Lt,pagesCountText:bt,visible:$o,hasKnownLastPage:Si,pagesNavigatorVisible:gn,showPageSizes:Qi,pageSizes:Ki,rtlEnabled:Kt,showNavigationButtons:_i,totalCount:Co,onKeyDown:Vr,label:No})}get parentWidth(){return this.parentRef.current?_(this.parentRef.current):0}updateAdaptivityProps(){const Wt=function L(an){let{info:_n,pageSizes:Wt,pages:zn,parent:mi}=an;const Si=function g(an){const _n=h("paddingLeft",an)+h("paddingRight",an);return h("width",an)-_n}(mi),go=_(Wt),No=_(_n),Sr=_(zn);return{parent:Si,pageSizes:go,info:No+h("marginLeft",_n)+h("marginRight",_n),pages:Sr}}({parent:this.parentRef.current,pageSizes:this.pageSizesRef.current,info:this.infoTextRef.current,pages:this.pagesRef.current});if(this.actualInfoTextVisible!==this.state.infoTextVisible||this.actualIsLargeDisplayMode!==this.state.isLargeDisplayMode)return;const zn=!(0,W.O9)(this.elementsWidth);zn&&(this.elementsWidth={}),(zn||this.state.isLargeDisplayMode)&&(this.elementsWidth.pageSizes=Wt.pageSizes,this.elementsWidth.pages=Wt.pages),(zn||this.state.infoTextVisible)&&(this.elementsWidth.info=Wt.info),this.actualIsLargeDisplayMode=function C(an){let{pageSizes:_n,pages:Wt,parent:zn}=an;return zn-(_n+Wt)>0}((0,y.A)({parent:Wt.parent},{pageSizes:this.elementsWidth.pageSizes,pages:this.elementsWidth.pages})),this.actualInfoTextVisible=function I(an){let{info:_n,pageSizes:Wt,pages:zn,parent:mi}=an;return mi-(Wt+zn+_n)>0}((0,y.A)({},Wt,{info:this.elementsWidth.info})),this.setState(mi=>({infoTextVisible:this.actualInfoTextVisible})),this.setState(mi=>({isLargeDisplayMode:this.actualIsLargeDisplayMode}))}get restAttributes(){return(0,T.A)(this.props,w)}render(){const Wt=this.props;return(an=>{let{contentAttributes:_n,infoTextRef:Wt,infoTextVisible:zn,isLargeDisplayMode:mi,pageSizesRef:Si,pagesRef:go,parentRef:No,props:{contentTemplate:Sr}}=an;return Sr((0,y.A)({rootElementRef:No,pageSizesRef:Si,infoTextRef:Wt,pagesRef:go,infoTextVisible:zn,isLargeDisplayMode:mi},_n))})({props:(0,y.A)({},Wt,{contentTemplate:G(Wt.contentTemplate)}),infoTextVisible:this.state.infoTextVisible,isLargeDisplayMode:this.state.isLargeDisplayMode,parentRef:this.parentRef,pageSizesRef:this.pageSizesRef,infoTextRef:this.infoTextRef,pagesRef:this.pagesRef,contentAttributes:this.contentAttributes,parentWidth:this.parentWidth,updateAdaptivityProps:this.updateAdaptivityProps,restAttributes:this.restAttributes})}}return an.defaultProps=N,an})();const U={gridCompatibility:!0,showInfo:!1,displayMode:"adaptive",maxPagesCount:10,pageCount:10,visible:!0,hasKnownLastPage:!0,pagesNavigatorVisible:"auto",showPageSizes:!0,pageSizes:Object.freeze([5,10]),showNavigationButtons:!1,totalCount:0,get label(){return P.A.format("dxPager-ariaLabel")}},B=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(U),Object.getOwnPropertyDescriptors({defaultPageSize:5,pageSizeChange:()=>{},defaultPageIndex:1,pageIndexChange:()=>{}}))),K=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(U),Object.getOwnPropertyDescriptors({pageSize:5,pageIndex:1})));var J=M(9495);const ie=["infoText","pageCount","pageIndex","rootElementRef","totalCount"],Z={get pageIndex(){return K.pageIndex},get pageCount(){return K.pageCount},get totalCount(){return K.totalCount}};let Q=(()=>{class an extends c.eh{constructor(Wt){super(Wt),this.state={}}get infoText(){return(this.props.infoText??"")||P.A.getFormatter("dxPager-infoText")()}get text(){const{pageCount:Wt,pageIndex:zn,totalCount:mi}=this.props;return(0,J.GP)(this.infoText,(zn+1).toString(),Wt.toString(),mi.toString())}get restAttributes(){return(0,T.A)(this.props,ie)}render(){return(an=>{let{props:{rootElementRef:_n},text:Wt}=an;return(0,d.bF)(1,"div","dx-info",Wt,0,null,null,_n)})({props:(0,y.A)({},this.props),infoText:this.infoText,text:this.text,restAttributes:this.restAttributes})}}return an.defaultProps=Z,an})();var te=M(2047);const pe=(0,c.q6)(void 0),z=["children","className","label","onClick","selected","tabIndex"],ae={className:"",label:"",tabIndex:0,selected:!1};let ee=(()=>{class an extends c.JP{get keyboardContext(){return this.context[pe.id]?this.context[pe.id]:pe.defaultValue}constructor(Wt){super(Wt),this.state={},this.widgetRef=(0,d._3)(),this.keyboardEffect=this.keyboardEffect.bind(this),this.subscribeToClick=this.subscribeToClick.bind(this)}createEffects(){return[new c.Lt(this.keyboardEffect,[this.keyboardContext,this.props.onClick]),new c.Lt(this.subscribeToClick,[this.props.onClick])]}updateEffects(){var Wt,zn;null===(Wt=this._effects[0])||void 0===Wt||Wt.update([this.keyboardContext,this.props.onClick]),null===(zn=this._effects[1])||void 0===zn||zn.update([this.props.onClick])}keyboardEffect(){return this.keyboardContext.registerKeyboardAction(this.widgetRef.current,this.props.onClick)}subscribeToClick(){return(0,te.Ao)(this.widgetRef.current,this.props.onClick)}get restAttributes(){return(0,T.A)(this.props,z)}render(){return(an=>{let{props:{children:_n,className:Wt,label:zn,selected:mi,tabIndex:Si},widgetRef:go}=an;return(0,d.bF)(1,"div",Wt,_n,0,{tabIndex:Si,role:"button","aria-label":zn,"aria-current":mi?"page":void 0},null,go)})({props:(0,y.A)({},this.props),widgetRef:this.widgetRef,keyboardContext:this.keyboardContext,restAttributes:this.restAttributes})}}return an.defaultProps=ae,an})();var xe=M(6628);const Te=["className","index","onClick","selected"],Oe={index:0,selected:!1,className:"dx-page"};let ze=(()=>{class an extends c.eh{constructor(Wt){super(Wt),this.state={}}get label(){return(0,J.GP)(P.A.getFormatter("dxPager-page"),this.value)}get value(){return this.props.index+1}get className(){const{selected:Wt}=this.props;return(0,xe.g)({[`${this.props.className}`]:!!this.props.className,"dx-selection":!!Wt})}get restAttributes(){return(0,T.A)(this.props,Te)}render(){return(an=>{let{className:_n,label:Wt,props:{onClick:zn,selected:mi},value:Si}=an;return(0,d.sO)(2,ee,{className:_n,label:Wt,onClick:zn,selected:mi,children:Si})})({props:(0,y.A)({},this.props),label:this.label,value:this.value,className:this.className,restAttributes:this.restAttributes})}}return an.defaultProps=Oe,an})();var $e=M(1848);const Be=["pageIndexes"],Ue=["maxPagesCount","pageCount","pageIndex","pageIndexChange"];function Ke(an,_n,Wt){return 1===an?"high":an+_n===Wt-1?"low":"both"}function Ye(an,_n,Wt){let zn=[],mi=[];switch(Wt){case"none":zn=[...an];break;case"both":zn=[0,"low",...an,"high",_n-1],mi=an.slice(1,-1);break;case"high":zn=[0,...an,"high",_n-1],mi=an.slice(0,-1);break;case"low":zn=[0,"low",...an,_n-1],mi=an.slice(1)}return{slidingWindowIndexes:an,indexesForReuse:mi,pageIndexes:zn}}function Pe(an,_n,Wt,zn){const mi=[];for(let Si=0;Si<_n;Si+=1)mi.push(Si+an);return Ye(mi,Wt,zn)}const Se={get pageIndex(){return K.pageIndex},get maxPagesCount(){return K.maxPagesCount},get pageCount(){return K.pageCount}};let Re=(()=>{class an extends c.eh{get config(){return this.context[$e.Q.id]?this.context[$e.Q.id]:$e.Q.defaultValue}constructor(Wt){super(Wt),this.state={},this.canReuseSlidingWindow=this.canReuseSlidingWindow.bind(this),this.generatePageIndexes=this.generatePageIndexes.bind(this),this.isSlidingWindowMode=this.isSlidingWindowMode.bind(this),this.onPageClick=this.onPageClick.bind(this)}get slidingWindowState(){return this.slidingWindowStateHolder||{indexesForReuse:[],slidingWindowIndexes:[]}}canReuseSlidingWindow(Wt,zn){const{indexesForReuse:mi}=this.slidingWindowState,Si=mi.slice(-1)[0]<Wt-1,go=mi.includes(zn);return Si&&go}generatePageIndexes(){const{pageCount:Wt,pageIndex:zn}=this.props;let mi=0;const{slidingWindowIndexes:Si}=this.slidingWindowState;mi=zn===Si[0]?zn-1:zn===Si[Si.length-1]?zn+2-4:zn<4?1:zn>=Wt-4?Wt-4-1:zn-1;const No=Pe(mi,4,Wt,Ke(mi,4,Wt)),{pageIndexes:Sr}=No,pr=(0,T.A)(No,Be);return this.slidingWindowStateHolder=pr,Sr}isSlidingWindowMode(){const{maxPagesCount:Wt,pageCount:zn}=this.props;return zn<=4||zn<=Wt}onPageClick(Wt){this.props.pageIndexChange(Wt)}get pageIndexes(){const{pageCount:Wt}=this.props;if(this.isSlidingWindowMode())return Pe(0,Wt,Wt,"none").pageIndexes;if(this.canReuseSlidingWindow(Wt,this.props.pageIndex)){const{slidingWindowIndexes:zn}=this.slidingWindowState;return Ye(zn,Wt,Ke(zn[0],4,Wt)).pageIndexes}return this.generatePageIndexes()}get pages(){var Wt;const{pageIndex:zn}=this.props,mi=go=>{const No="low"===go||"high"===go?null:{index:go,onClick:()=>this.onPageClick(go),selected:zn===go};return{key:go.toString(),pageProps:No}};return(null!==(Wt=this.config)&&void 0!==Wt&&Wt.rtlEnabled?[...this.pageIndexes].reverse():this.pageIndexes).map(go=>mi(go))}get restAttributes(){return(0,T.A)(this.props,Ue)}render(){return(an=>{let{pages:_n}=an;const Wt=_n.map(zn=>{let{key:mi,pageProps:Si}=zn;return Si?(0,d.sO)(2,ze,{index:Si.index,selected:Si.selected,onClick:Si.onClick},mi):(0,d.bF)(1,"div","dx-separator",". . .",16,null,mi)});return(0,d.nl)(Wt,0)})({props:(0,y.A)({},this.props),config:this.config,pageIndexes:this.pageIndexes,pages:this.pages,restAttributes:this.restAttributes})}}return an.defaultProps=Se,an})();var Fe=M(9810),Xe=M(807),tt=M(1257),vt=M(5973);const qe={hoverStateEnabled:!0,activeStateEnabled:!0,get focusStateEnabled(){return"desktop"===vt.A.real().deviceType&&!vt.A.isSimulator()}};var At=M(9212);const Tt={label:"",get labelMode(){return(0,At.gx)((0,At.ss)())?"floating":"static"}},qt=["accessKey","activeStateEnabled","className","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","invalidValueMessage","isDirty","isValid","label","labelMode","max","min","mode","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","showSpinButtons","step","tabIndex","useLargeSpinButtons","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"],ri=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(tt.eH),Object.getOwnPropertyDescriptors({defaultValue:0,isReactComponentWrapper:!0}))),Tn={get defaultValue(){return ri.defaultValue},get readOnly(){return ri.readOnly},get name(){return ri.name},get validationError(){return ri.validationError},get validationErrors(){return ri.validationErrors},get validationMessageMode(){return ri.validationMessageMode},get validationMessagePosition(){return ri.validationMessagePosition},get validationStatus(){return ri.validationStatus},get isValid(){return ri.isValid},get isDirty(){return ri.isDirty},get inputAttr(){return ri.inputAttr},get className(){return ri.className},get activeStateEnabled(){return qe.activeStateEnabled},get disabled(){return ri.disabled},get focusStateEnabled(){return qe.focusStateEnabled},get hoverStateEnabled(){return qe.hoverStateEnabled},get tabIndex(){return ri.tabIndex},get visible(){return ri.visible},get label(){return Tt.label},get labelMode(){return Tt.labelMode},isReactComponentWrapper:!0};let Jn=(()=>{class an extends c.eh{constructor(Wt){super(Wt),this.state={value:void 0!==this.props.value?this.props.value:this.props.defaultValue}}get componentProps(){return(0,y.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value})}get restAttributes(){const Wt=(0,y.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value});return(0,T.A)(Wt,qt)}render(){return(an=>{let{componentProps:_n,restAttributes:Wt}=an;return(0,d._B)((0,d.sO)(2,Xe.FU,(0,y.A)({componentType:Fe.A,componentProps:_n,templateNames:[]},Wt)))})({props:(0,y.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}return an.defaultProps=Tn,an})();function Bn(an,_n){return an+10*Math.max(..._n).toString().length}const gi=["inputAttr","pageCount","pageIndex","pageIndexChange","pagesCountText"],Et={inputAttr:Object.freeze({"aria-label":P.A.format("dxPager-ariaPageNumber")})},hn={get pageIndex(){return K.pageIndex},get pageCount(){return K.pageCount},get inputAttr(){return Et.inputAttr}};let $n=(()=>{class an extends c.JP{constructor(Wt){super(Wt),this.pageIndexRef=(0,d._3)(),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this),this.selectLastPageIndex=this.selectLastPageIndex.bind(this),this.valueChange=this.valueChange.bind(this)}createEffects(){return[new c.Lt(this.updateWidth,[this.state.minWidth])]}updateEffects(){var Wt;null===(Wt=this._effects[0])||void 0===Wt||Wt.update([this.state.minWidth])}updateWidth(){var Wt;const zn=null===(Wt=this.pageIndexRef.current)||void 0===Wt?void 0:Wt.querySelector(".dx-page-index");this.setState(mi=>({minWidth:zn&&x(zn)||mi.minWidth}))}get value(){return this.props.pageIndex+1}get width(){const{pageCount:Wt}=this.props;return Bn(this.state.minWidth,[Wt])}get pagesCountText(){return(this.props.pagesCountText??"")||P.A.getFormatter("dxPager-pagesCountText")()}selectLastPageIndex(){this.props.pageIndexChange(this.props.pageCount-1)}valueChange(Wt){this.props.pageIndexChange(Wt-1)}get restAttributes(){return(0,T.A)(this.props,gi)}render(){return(an=>{let{pageIndexRef:_n,pagesCountText:Wt,props:{inputAttr:zn,pageCount:mi},selectLastPageIndex:Si,value:go,valueChange:No,width:Sr}=an;return(0,d.bF)(1,"div","dx-light-pages",[(0,d.sO)(2,Jn,{className:"dx-page-index",min:1,max:Math.max(mi,go),width:Sr,value:go,valueChange:No,inputAttr:zn}),(0,d.bF)(1,"span","dx-info  dx-info-text",Wt,0),(0,d.sO)(2,ze,{className:"dx-pages-count",selected:!1,index:mi-1,onClick:Si})],4,null,null,_n)})({props:(0,y.A)({},this.props),pageIndexRef:this.pageIndexRef,value:this.value,width:this.width,pagesCountText:this.pagesCountText,selectLastPageIndex:this.selectLastPageIndex,valueChange:this.valueChange,restAttributes:this.restAttributes})}}return an.defaultProps=hn,an})();const Ln=["hasKnownLastPage","isLargeDisplayMode","maxPagesCount","pageCount","pageIndex","pageIndexChange","pagesCountText","showNavigationButtons","totalCount"],zt={nextEnabledClass:"dx-navigate-button dx-next-button",prevEnabledClass:"dx-navigate-button dx-prev-button",nextDisabledClass:"dx-button-disable dx-navigate-button dx-next-button",prevDisabledClass:"dx-button-disable dx-navigate-button dx-prev-button"},un={next:"prev",prev:"next"},Hi={get pageIndex(){return K.pageIndex},get maxPagesCount(){return K.maxPagesCount},get pageCount(){return K.pageCount},get hasKnownLastPage(){return K.hasKnownLastPage},get showNavigationButtons(){return K.showNavigationButtons},get totalCount(){return K.totalCount},get isLargeDisplayMode(){return true}};let mo=(()=>{class an extends c.eh{get config(){return this.context[$e.Q.id]?this.context[$e.Q.id]:$e.Q.defaultValue}constructor(Wt){super(Wt),this.state={},this.__getterCache={},this.pageIndexChange=this.pageIndexChange.bind(this),this.getButtonProps=this.getButtonProps.bind(this),this.canNavigateToPage=this.canNavigateToPage.bind(this),this.getNextPageIndex=this.getNextPageIndex.bind(this),this.canNavigateTo=this.canNavigateTo.bind(this),this.navigateToPage=this.navigateToPage.bind(this)}pageIndexChange(Wt){this.canNavigateToPage(Wt)&&this.props.pageIndexChange(Wt)}getButtonProps(Wt){var zn;const mi=null!==(zn=this.config)&&void 0!==zn&&zn.rtlEnabled?un[Wt]:Wt,Si=this.canNavigateTo(mi);return{className:zt[`${Wt}${Si?"Enabled":"Disabled"}Class`],tabIndex:Si?0:-1,navigate:()=>this.navigateToPage(mi)}}canNavigateToPage(Wt){return this.props.hasKnownLastPage?Wt>=0&&Wt<=this.props.pageCount-1:Wt>=0}getNextPageIndex(Wt){return this.props.pageIndex+function ci(an){return"next"===an?1:-1}(Wt)}canNavigateTo(Wt){return this.canNavigateToPage(this.getNextPageIndex(Wt))}navigateToPage(Wt){this.pageIndexChange(this.getNextPageIndex(Wt))}get renderPrevButton(){const{isLargeDisplayMode:Wt,showNavigationButtons:zn}=this.props;return!Wt||zn}get renderNextButton(){return this.renderPrevButton||!this.props.hasKnownLastPage}get prevButtonProps(){return void 0!==this.__getterCache.prevButtonProps?this.__getterCache.prevButtonProps:this.__getterCache.prevButtonProps=this.getButtonProps("prev")}get nextButtonProps(){return void 0!==this.__getterCache.nextButtonProps?this.__getterCache.nextButtonProps:this.__getterCache.nextButtonProps=this.getButtonProps("next")}get restAttributes(){return(0,T.A)(this.props,Ln)}componentWillUpdate(Wt,zn,mi){(this.context[$e.Q.id]!==mi[$e.Q.id]||this.props.hasKnownLastPage!==Wt.hasKnownLastPage||this.props.pageCount!==Wt.pageCount||this.props.pageIndex!==Wt.pageIndex||this.props.pageIndexChange!==Wt.pageIndexChange)&&(this.__getterCache.prevButtonProps=void 0),(this.context[$e.Q.id]!==mi[$e.Q.id]||this.props.hasKnownLastPage!==Wt.hasKnownLastPage||this.props.pageCount!==Wt.pageCount||this.props.pageIndex!==Wt.pageIndex||this.props.pageIndexChange!==Wt.pageIndexChange)&&(this.__getterCache.nextButtonProps=void 0)}render(){return(an=>{let{nextButtonProps:_n,pageIndexChange:Wt,prevButtonProps:zn,props:{isLargeDisplayMode:mi,maxPagesCount:Si,pageCount:go,pageIndex:No,pagesCountText:Sr},renderNextButton:pr,renderPrevButton:Vr}=an;return(0,d.nl)([Vr&&(0,d.sO)(2,ee,{label:P.A.getFormatter("dxPager-prevPage")(),className:zn.className,tabIndex:zn.tabIndex,onClick:zn.navigate}),mi&&(0,d.sO)(2,Re,{maxPagesCount:Si,pageCount:go,pageIndex:No,pageIndexChange:Wt}),!mi&&(0,d.sO)(2,$n,{pageCount:go,pageIndex:No,pageIndexChange:Wt,pagesCountText:Sr}),pr&&(0,d.sO)(2,ee,{label:P.A.getFormatter("dxPager-nextPage")(),className:_n.className,tabIndex:_n.tabIndex,onClick:_n.navigate})],0)})({props:(0,y.A)({},this.props),config:this.config,pageIndexChange:this.pageIndexChange,renderPrevButton:this.renderPrevButton,renderNextButton:this.renderNextButton,prevButtonProps:this.prevButtonProps,nextButtonProps:this.nextButtonProps,restAttributes:this.restAttributes})}}return an.defaultProps=Hi,an})();var xo=M(6520);const vr=["accessKey","activeStateEnabled","className","dataSource","defaultValue","disabled","displayExpr","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","isDirty","isValid","label","labelMode","name","onClick","onFocusIn","onKeyDown","placeholder","readOnly","rtlEnabled","searchEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","valueExpr","visible","width"],en=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(tt.eH),Object.getOwnPropertyDescriptors({placeholder:"",hoverStateEnabled:!0,searchEnabled:!1,defaultValue:null,isReactComponentWrapper:!0}))),Zn={get placeholder(){return en.placeholder},get hoverStateEnabled(){return qe.hoverStateEnabled},get searchEnabled(){return en.searchEnabled},get defaultValue(){return en.defaultValue},get readOnly(){return en.readOnly},get name(){return en.name},get validationError(){return en.validationError},get validationErrors(){return en.validationErrors},get validationMessageMode(){return en.validationMessageMode},get validationMessagePosition(){return en.validationMessagePosition},get validationStatus(){return en.validationStatus},get isValid(){return en.isValid},get isDirty(){return en.isDirty},get inputAttr(){return en.inputAttr},get className(){return en.className},get activeStateEnabled(){return qe.activeStateEnabled},get disabled(){return en.disabled},get focusStateEnabled(){return qe.focusStateEnabled},get tabIndex(){return en.tabIndex},get visible(){return en.visible},get label(){return Tt.label},get labelMode(){return Tt.labelMode},isReactComponentWrapper:!0};let Di=(()=>{class an extends c.eh{constructor(Wt){super(Wt),this.state={value:void 0!==this.props.value?this.props.value:this.props.defaultValue}}get componentProps(){return(0,y.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value})}get restAttributes(){const Wt=(0,y.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value});return(0,T.A)(Wt,vr)}render(){return(an=>{let{componentProps:_n,restAttributes:Wt}=an;return(0,d._B)((0,d.sO)(2,Xe.FU,(0,y.A)({componentType:xo.A,componentProps:_n,templateNames:["dropDownButtonTemplate","groupTemplate","itemTemplate"]},Wt)))})({props:(0,y.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}return an.defaultProps=Zn,an})();const po=["inputAttr","pageSize","pageSizeChange","pageSizes","parentRef"],Xo={inputAttr:Object.freeze({"aria-label":P.A.format("dxPager-ariaPageSize")})},Hn={get pageSize(){return K.pageSize},get inputAttr(){return Xo.inputAttr}};let ui=(()=>{class an extends c.JP{constructor(Wt){super(Wt),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this)}createEffects(){return[new c.Lt(this.updateWidth,[this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes,this.props.inputAttr])]}updateEffects(){var Wt;null===(Wt=this._effects[0])||void 0===Wt||Wt.update([this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes,this.props.inputAttr])}updateWidth(){this.setState(Wt=>({minWidth:x(this.props.parentRef.current)||Wt.minWidth}))}get width(){return Bn(this.state.minWidth,this.props.pageSizes.map(Wt=>Wt.value))}get restAttributes(){return(0,T.A)(this.props,po)}render(){return(an=>{let{props:{inputAttr:_n,pageSize:Wt,pageSizeChange:zn,pageSizes:mi},width:Si}=an;return(0,d.sO)(2,Di,{displayExpr:"text",valueExpr:"value",dataSource:mi,value:Wt,valueChange:zn,width:Si,inputAttr:_n})})({props:(0,y.A)({},this.props),width:this.width,restAttributes:this.restAttributes})}}return an.defaultProps=Hn,an})();const bi=["pageSize","pageSizeChange","pageSizes"],Ko={get pageSize(){return K.pageSize}};let Zo=(()=>{class an extends c.eh{constructor(Wt){super(Wt),this.state={},this.__getterCache={},this.onPageSizeChange=this.onPageSizeChange.bind(this)}get pageSizesText(){return void 0!==this.__getterCache.pageSizesText?this.__getterCache.pageSizesText:this.__getterCache.pageSizesText=(()=>{const{pageSize:Wt,pageSizes:zn}=this.props;return zn.map((mi,Si)=>{let{text:go,value:No}=mi;return{className:(0,xe.g)({[No===Wt?"dx-page-size dx-selection":"dx-page-size"]:!0,"dx-first-child":0===Si}),click:this.onPageSizeChange(No),label:(0,J.GP)(P.A.getFormatter("dxPager-pageSize"),No||P.A.getFormatter("dxPager-pageSizesAllText")),text:go}})})()}onPageSizeChange(Wt){return()=>(this.props.pageSizeChange(Wt),this.props.pageSize)}get restAttributes(){return(0,T.A)(this.props,bi)}componentWillUpdate(Wt,zn,mi){(this.props.pageSize!==Wt.pageSize||this.props.pageSizes!==Wt.pageSizes||this.props.pageSizeChange!==Wt.pageSizeChange)&&(this.__getterCache.pageSizesText=void 0)}render(){return(an=>{let{pageSizesText:_n}=an;return(0,d.nl)(_n.map(Wt=>{let{className:zn,click:mi,label:Si,text:go}=Wt;return(0,d.sO)(2,ee,{className:zn,label:Si,onClick:mi,children:go},go)}),0)})({props:(0,y.A)({},this.props),pageSizesText:this.pageSizesText,restAttributes:this.restAttributes})}}return an.defaultProps=Ko,an})();const xr=["isLargeDisplayMode","pageSize","pageSizeChange","pageSizes","rootElementRef"],pi={get pageSize(){return K.pageSize},get pageSizes(){return K.pageSizes},get isLargeDisplayMode(){return true}};let Ti=(()=>{class an extends c.JP{constructor(Wt){super(Wt),this.state={},this.htmlRef=(0,d._3)(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this)}createEffects(){return[new c.Lt(this.setRootElementRef,[])]}setRootElementRef(){const{rootElementRef:Wt}=this.props;Wt&&(Wt.current=this.htmlRef.current)}get normalizedPageSizes(){return void 0!==this.__getterCache.normalizedPageSizes?this.__getterCache.normalizedPageSizes:this.__getterCache.normalizedPageSizes=(()=>{const{pageSizes:Wt}=this.props;return Wt.map(zn=>"all"===zn||0===zn?{text:P.A.getFormatter("dxPager-pageSizesAllText")(),value:0}:{text:String(zn),value:zn})})()}get restAttributes(){return(0,T.A)(this.props,xr)}componentWillUpdate(Wt,zn,mi){super.componentWillUpdate(),this.props.pageSizes!==Wt.pageSizes&&(this.__getterCache.normalizedPageSizes=void 0)}render(){return(an=>{let{htmlRef:_n,normalizedPageSizes:Wt,props:{isLargeDisplayMode:zn,pageSize:mi,pageSizeChange:Si}}=an;return(0,d.bF)(1,"div","dx-page-sizes",[zn&&(0,d.sO)(2,Zo,{pageSizes:Wt,pageSize:mi,pageSizeChange:Si}),!zn&&(0,d.sO)(2,ui,{parentRef:_n,pageSizes:Wt,pageSize:mi,pageSizeChange:Si})],0,null,null,_n)})({props:(0,y.A)({},this.props),htmlRef:this.htmlRef,normalizedPageSizes:this.normalizedPageSizes,restAttributes:this.restAttributes})}}return an.defaultProps=pi,an})();var lo=M(2673),Eo=M(8953);const Jo=["className","displayMode","gridCompatibility","hasKnownLastPage","infoText","infoTextRef","infoTextVisible","isLargeDisplayMode","label","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pageSizesRef","pagesCountText","pagesNavigatorVisible","pagesRef","rootElementRef","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],Gr=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(K),Object.getOwnPropertyDescriptors({infoTextVisible:!0,isLargeDisplayMode:!0})));let Yn=(()=>{class an extends c.JP{constructor(Wt){super(Wt),this.state={},this.widgetRootElementRef=(0,d._3)(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this),this.createFakeInstance=this.createFakeInstance.bind(this)}createEffects(){return[new c.Lt(this.setRootElementRef,[])]}getChildContext(){return(0,y.A)({},this.context,{[pe.id]:this.keyboardAction||pe.defaultValue})}setRootElementRef(){const{rootElementRef:Wt}=this.props;Wt&&(Wt.current=this.widgetRootElementRef.current)}createFakeInstance(){return{option:()=>!1,element:()=>this.widgetRootElementRef.current,_createActionByOption:()=>Wt=>{var zn,mi;null===(zn=(mi=this.props).onKeyDown)||void 0===zn||zn.call(mi,Wt)}}}get keyboardAction(){return void 0!==this.__getterCache.keyboardAction?this.__getterCache.keyboardAction:this.__getterCache.keyboardAction={registerKeyboardAction:(Wt,zn)=>{const mi=this.createFakeInstance();return(0,Eo.js)("pager",mi,Wt,void 0,zn)}}}get infoVisible(){const{infoTextVisible:Wt,showInfo:zn}=this.props;return zn&&Wt}get pageIndexSelectorVisible(){return 0!==this.props.pageSize}get normalizedDisplayMode(){const{displayMode:Wt,lightModeEnabled:zn}=this.props;return"adaptive"===Wt&&void 0!==zn?zn?"compact":"full":Wt}get pagesContainerVisible(){return!!this.props.pagesNavigatorVisible&&this.props.pageCount>0}get pagesContainerVisibility(){if("auto"===this.props.pagesNavigatorVisible&&1===this.props.pageCount&&this.props.hasKnownLastPage)return"hidden"}get isLargeDisplayMode(){const Wt=this.normalizedDisplayMode;let zn=!1;return zn="adaptive"===Wt?this.props.isLargeDisplayMode:"full"===Wt,zn}get classes(){return(0,xe.g)({[`${this.props.className}`]:!!this.props.className,"dx-pager":!0,"dx-light-mode":!this.isLargeDisplayMode})}get aria(){return{role:"navigation",label:this.props.label}}get restAttributes(){return(0,T.A)(this.props,Jo)}componentWillUpdate(Wt,zn,mi){super.componentWillUpdate(),this.props.onKeyDown!==Wt.onKeyDown&&(this.__getterCache.keyboardAction=void 0)}render(){return(an=>{let{aria:_n,classes:Wt,infoVisible:zn,isLargeDisplayMode:mi,pageIndexSelectorVisible:Si,pagesContainerVisibility:go,pagesContainerVisible:No,props:{hasKnownLastPage:Sr,infoText:pr,infoTextRef:Vr,maxPagesCount:Lt,pageCount:bn,pageIndex:jn,pageIndexChange:Ci,pageSize:Mi,pageSizeChange:Ki,pageSizes:bt,pageSizesRef:gn,pagesCountText:Kt,pagesRef:Mn,rtlEnabled:_i,showNavigationButtons:Qi,showPageSizes:Co,totalCount:$o,visible:sr},restAttributes:lr,widgetRootElementRef:rr}=an;return(0,d._B)((0,d.sO)(2,lo.x0,(0,y.A)({rootElementRef:rr,rtlEnabled:_i,classes:Wt,visible:sr,aria:_n},lr,{children:[Co&&(0,d.sO)(2,Ti,{rootElementRef:gn,isLargeDisplayMode:mi,pageSize:Mi,pageSizeChange:Ki,pageSizes:bt}),No&&(0,d.bF)(1,"div","dx-pages",[zn&&(0,d.sO)(2,Q,{rootElementRef:Vr,infoText:pr,pageCount:bn,pageIndex:jn,totalCount:$o}),Si&&(0,d.bF)(1,"div","dx-page-indexes",(0,d.sO)(2,mo,{hasKnownLastPage:Sr,isLargeDisplayMode:mi,maxPagesCount:Lt,pageCount:bn,pageIndex:jn,pageIndexChange:Ci,pagesCountText:Kt,showNavigationButtons:Qi,totalCount:$o}),2,null,null,Mn)],0,{style:(0,c.gs)({visibility:go})})]})))})({props:(0,y.A)({},this.props),widgetRootElementRef:this.widgetRootElementRef,keyboardAction:this.keyboardAction,infoVisible:this.infoVisible,pageIndexSelectorVisible:this.pageIndexSelectorVisible,pagesContainerVisible:this.pagesContainerVisible,pagesContainerVisibility:this.pagesContainerVisibility,isLargeDisplayMode:this.isLargeDisplayMode,classes:this.classes,aria:this.aria,restAttributes:this.restAttributes})}}return an.defaultProps=Gr,an})();const ei=["className","defaultPageIndex","defaultPageSize","displayMode","gridCompatibility","hasKnownLastPage","infoText","label","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pagesCountText","pagesNavigatorVisible","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"];let co=(()=>{class an extends c.oe{constructor(Wt){super(Wt),this.__getterCache={},this.state={pageSize:void 0!==this.props.pageSize?this.props.pageSize:this.props.defaultPageSize,pageIndex:void 0!==this.props.pageIndex?this.props.pageIndex:this.props.defaultPageIndex},this.pageIndexChange=this.pageIndexChange.bind(this),this.pageSizeChange=this.pageSizeChange.bind(this)}createEffects(){return[(0,c.h2)()]}pageIndexChange(Wt){if(this.props.gridCompatibility){let zn;this.setState(mi=>(zn=Wt+1,{pageIndex:zn})),this.props.pageIndexChange(zn)}else{let zn;this.setState(mi=>(zn=Wt,{pageIndex:zn})),this.props.pageIndexChange(zn)}}get pageIndex(){return this.props.gridCompatibility?(void 0!==this.props.pageIndex?this.props.pageIndex:this.state.pageIndex)-1:void 0!==this.props.pageIndex?this.props.pageIndex:this.state.pageIndex}pageSizeChange(Wt){{let zn;this.setState(mi=>(zn=Wt,{pageSize:zn})),this.props.pageSizeChange(zn)}}get className(){return this.props.gridCompatibility?(0,xe.g)({"dx-datagrid-pager":!0,[`${this.props.className}`]:!!this.props.className}):this.props.className}get pagerProps(){return void 0!==this.__getterCache.pagerProps?this.__getterCache.pagerProps:this.__getterCache.pagerProps=(0,y.A)({},(0,y.A)({},this.props,{pageSize:void 0!==this.props.pageSize?this.props.pageSize:this.state.pageSize,pageIndex:void 0!==this.props.pageIndex?this.props.pageIndex:this.state.pageIndex}),{className:this.className,pageIndex:this.pageIndex,pageIndexChange:Wt=>this.pageIndexChange(Wt),pageSizeChange:Wt=>this.pageSizeChange(Wt)})}get restAttributes(){const Wt=(0,y.A)({},this.props,{pageSize:void 0!==this.props.pageSize?this.props.pageSize:this.state.pageSize,pageIndex:void 0!==this.props.pageIndex?this.props.pageIndex:this.state.pageIndex});return(0,T.A)(Wt,ei)}componentWillUpdate(Wt,zn,mi){super.componentWillUpdate(),(this.props!==Wt||this.props.gridCompatibility!==Wt.gridCompatibility||this.props.className!==Wt.className||this.state.pageIndex!==zn.pageIndex||this.props.pageIndex!==Wt.pageIndex||this.props.pageIndexChange!==Wt.pageIndexChange||this.props.pageSizeChange!==Wt.pageSizeChange)&&(this.__getterCache.pagerProps=void 0)}render(){return(an=>{let{pagerProps:_n,restAttributes:Wt}=an;return(0,d._B)((0,d.sO)(2,k,(0,y.A)({contentTemplate:Yn,pagerProps:_n},Wt)))})({props:(0,y.A)({},this.props,{pageSize:void 0!==this.props.pageSize?this.props.pageSize:this.state.pageSize,pageIndex:void 0!==this.props.pageIndex?this.props.pageIndex:this.state.pageIndex}),pageIndexChange:this.pageIndexChange,pageIndex:this.pageIndex,pageSizeChange:this.pageSizeChange,className:this.className,pagerProps:this.pagerProps,restAttributes:this.restAttributes})}}return an.defaultProps=B,an})();class ko extends S{getProps(){const _n=super.getProps();return _n.onKeyDown=this._wrapKeyDownHandler(_n.onKeyDown),_n}get _propsInfo(){return{twoWay:[["pageSize","defaultPageSize","pageSizeChange"],["pageIndex","defaultPageIndex","pageIndexChange"]],allowNull:[],elements:[],templates:[],props:["defaultPageSize","pageSizeChange","defaultPageIndex","pageIndexChange","gridCompatibility","className","showInfo","infoText","lightModeEnabled","displayMode","maxPagesCount","pageCount","pagesCountText","visible","hasKnownLastPage","pagesNavigatorVisible","showPageSizes","pageSizes","rtlEnabled","showNavigationButtons","totalCount","label","onKeyDown","pageSize","pageIndex"]}}get _viewComponent(){return co}}(0,b.A)("dxPager",ko);const er=ko;var or=M(3376);const Xr=function(an){return 1+(parseInt(an.pageIndex())||0)},dn={defaultOptions:()=>({pager:{visible:"auto",showPageSizeSelector:!1,allowedPageSizes:"auto",label:P.A.format("dxPager-ariaLabel")}}),views:{pagerView:class Mr extends or.Ay.View{init(){const _n=this.getController("data");_n.changed.add(Wt=>{if(Wt&&Wt.repaintChangesOnly){const zn=this._pager;zn?zn.option({pageIndex:Xr(_n),pageSize:_n.pageSize(),pageCount:_n.pageCount(),totalCount:_n.totalCount(),hasKnownLastPage:_n.hasKnownLastPage()}):this.render()}else(!Wt||"update"!==Wt.changeType&&"updateSelection"!==Wt.changeType&&"updateFocusedRow"!==Wt.changeType)&&(this._pager=null,this.render())})}dispose(){this._pager=null}optionChanged(_n){const{name:Wt}=_n,zn="pager"===Wt,mi="paging"===Wt,Si="dataSource"===Wt,go="scrolling"===Wt,No=this.getController("data");if(zn||mi||go||Si){if(_n.handled=!0,No.skipProcessingPagingChange(_n.fullName))return;(zn||mi)&&(this._pageSizes=null),Si||(this._pager=null,this._invalidate(),(0,o.Vd)()&&zn&&this.component&&this.component.resize())}}_renderCore(){const _n=this,Wt=_n.element().addClass(_n.addWidgetPrefix("pager")),zn=_n.option("pager")??{},mi=_n.getController("data"),Si=_n.getController("keyboardNavigation"),go={maxPagesCount:10,pageIndex:Xr(mi),pageCount:mi.pageCount(),pageSize:mi.pageSize(),showPageSizes:zn.showPageSizeSelector,showInfo:zn.showInfo,displayMode:zn.displayMode,pagesNavigatorVisible:zn.visible,showNavigationButtons:zn.showNavigationButtons,label:zn.label,pageSizes:_n.getPageSizes(),totalCount:mi.totalCount(),hasKnownLastPage:mi.hasKnownLastPage(),pageIndexChanged(No){mi.pageIndex()!==No-1&&mi.pageIndex(No-1)},pageSizeChanged(No){mi.pageSize(No)},onKeyDown:No=>Si&&Si.executeAction("onKeyDown",No),useLegacyKeyboardNavigation:this.option("useLegacyKeyboardNavigation"),useKeyboard:this.option("keyboardNavigation.enabled")};(0,W.O9)(zn.infoText)&&(go.infoText=zn.infoText),this._pager?this._pager.repaint():(0,o.Vd)()?this._pager=_n._createComponent(Wt,er,go):Wt.addClass("dx-pager").html('<div class="dx-pages"><div class="dx-page"></div></div>')}getPager(){return this._pager}getPageSizes(){const _n=this,Wt=_n.getController("data"),zn=_n.option("pager"),mi=zn&&zn.allowedPageSizes,Si=Wt.pageSize();return(!(0,W.O9)(_n._pageSizes)||!_n._pageSizes.includes(Si))&&(_n._pageSizes=[],zn&&(Array.isArray(mi)?_n._pageSizes=mi:mi&&Si>1&&(_n._pageSizes=[Math.floor(Si/2),Si,2*Si]))),_n._pageSizes}isVisible(){const _n=this.getController("data"),Wt=this.option("pager");let zn=Wt&&Wt.visible;const mi=this.option("scrolling");return"auto"===zn&&(zn=(!mi||"virtual"!==mi.mode&&"infinite"!==mi.mode)&&(_n.pageCount()>1||_n.isLoaded()&&!_n.hasKnownLastPage())),!!zn}getHeight(){return this.getElementHeight()}}}}},931:(In,Ze,M)=>{"use strict";M.d(Ze,{e:()=>u});var W=M(5704),o=M(3090),P=M(4859),b=M(1363),f=M(1830),S=M(3125),T=M(8736);const u={defaultOptions:()=>({rowDragging:{showDragIcons:!0,dropFeedbackMode:"indicate",allowReordering:!1,allowDropInsideItem:!1}}),extenders:{views:{rowsView:h=>class extends h{init(){super.init.apply(this,arguments),this._updateHandleColumn()}optionChanged(g){"rowDragging"===g.name&&(this._updateHandleColumn(),this._invalidate(!0,!0),g.handled=!0),super.optionChanged.apply(this,arguments)}_allowReordering(){const g=this.option("rowDragging");return!(!g||!(g.allowReordering||g.allowDropInsideItem||g.group))}_updateHandleColumn(){const g=this.option("rowDragging"),_=this._allowReordering(),x=this._columnsController,w=_&&g.showDragIcons;x?.addCommandColumn({type:"drag",command:"drag",visibleIndex:-2,alignment:"center",elementAttr:[{name:"dx-drag-cell",value:""}],cssClass:"dx-command-drag",width:"auto",cellTemplate:this._getHandleTemplate(),visible:w}),x?.columnOption("type:drag","visible",w)}_renderContent(){const g=this.option("rowDragging"),_=this._allowReordering(),x=super._renderContent.apply(this,arguments),w=this._isFixedTableRendering,D=w?"_sortableFixed":"_sortable",C=w?"_sortable":"_sortableFixed",I=G=>{var k;null===(k=this._sortableFixed)||void 0===k||k.$element().css("pointerEvents",G?"auto":"")},L=".dx-row:not(.dx-freespace-row):not(.dx-virtual-row):not(.dx-header-row):not(.dx-footer-row)",N=this.option("dataRowTemplate")?`> table > tbody${L}`:`> table > tbody > ${L}`;return(_||this[D])&&x.length&&(this[D]=this._createComponent(x,S.A,(0,o.X)({component:this.component,contentTemplate:null,filter:N,cursorOffset:G=>{const{event:k}=G,U=(0,W.A)(this.element()).offset();return{x:k.pageX-U.left}},onDraggableElementShown:G=>{if(g.dragTemplate)return;const U=(0,W.A)(G.dragElement).children(".dx-widget").data(this.component.NAME);this._synchronizeScrollLeftPosition(U)},dragTemplate:this._getDraggableRowTemplate(),handle:g.showDragIcons&&".dx-command-drag",dropFeedbackMode:"indicate"},g,{onDragStart:G=>{var k,U;null===(k=this.getController("keyboardNavigation"))||void 0===k||k._resetFocusedCell();const B=G.component.getVisibleRows()[G.fromIndex];G.itemData=B&&B.data,G.cancel=!_||!(B&&"data"===B.rowType),null===(U=g.onDragStart)||void 0===U||U.call(g,G)},onDragEnter:G=>{G.fromComponent!==G.toComponent&&I(!0)},onDragLeave:()=>{I(!1)},onDragEnd:G=>{var k;I(!1),null===(k=g.onDragEnd)||void 0===k||k.call(g,G)},onAdd:G=>{var k;I(!1),null===(k=g.onAdd)||void 0===k||k.call(g,G)},dropFeedbackMode:g.dropFeedbackMode,onOptionChanged:G=>{this._sortableFixed&&("fromIndex"===G.name||"toIndex"===G.name)&&this[C].option(G.name,G.value)}})),x.toggleClass("dx-scrollable-container",w),x.toggleClass("dx-sortable-without-handle",_&&!g.showDragIcons)),x}_renderCore(g){super._renderCore.apply(this,arguments),g&&"update"===g.changeType&&g.repaintChangesOnly&&T.A.isVirtualRowRendering(this)&&(0,P.OX)(()=>{this._updateSortable()})}_updateSortable(){const g=this._dataController.getRowIndexOffset(),_=g-this._previousOffset;[this._sortable,this._sortableFixed].forEach(x=>{const w=x?.option("toIndex");(0,f.O9)(w)&&(0,f.O9)(this._previousOffset)&&x?.option("toIndex",w-_),x?.option("offset",g),x?.update()}),this._previousOffset=g}_resizeCore(){super._resizeCore.apply(this,arguments),this._updateSortable()}_getDraggableGridOptions(g){const _=this.option(),x=this.getColumns(),w=(0,W.A)(this.getRowElement(g.rowIndex));return{dataSource:[{id:1,parentId:0}],showBorders:!0,showColumnHeaders:!1,scrolling:{useNative:!1,showScrollbar:"never"},pager:{visible:!1},loadingTimeout:null,columnFixing:_.columnFixing,columnAutoWidth:_.columnAutoWidth,showColumnLines:_.showColumnLines,columns:x.map(D=>({width:D.width||D.visibleWidth,fixed:D.fixed,fixedPosition:D.fixedPosition})),onRowPrepared:D=>{const C=D.component.getView("rowsView");(0,W.A)(D.rowElement).replaceWith(w.eq(C._isFixedTableRendering?1:0).clone())}}}_synchronizeScrollLeftPosition(g){const _=g?.getScrollable();_?.scrollTo({x:this._scrollLeft})}_getDraggableRowTemplate(){return g=>{const _=this.component.$element(),x=(0,W.A)("<div>");(0,b.zj)(x,(0,b.RG)(_));const w=this._dataController.items(),C=this._getDraggableGridOptions(w&&w[g.fromIndex]);return this._createComponent(x,this.component.NAME,C),x.find(".dx-gridbase-container").children(`:not(.${this.addWidgetPrefix("rowsview")})`).hide(),x.addClass(this.addWidgetPrefix("dragview")),x}}_getHandleTemplate(){return(h=>(g,_)=>{const x=(0,W.A)(g);if("data"===_.rowType)return x.addClass("dx-cell-focus-disabled"),(0,W.A)("<span>").addClass(h("drag-icon"));T.A.setEmptyText(x)})(g=>this.addWidgetPrefix(g))}}}}}},2896:(In,Ze,M)=>{"use strict";M.d(Ze,{J:()=>_});var W=M(6054),o=M(5704),P=M(4270),b=M(1541),f=M(8360),S=M(8736);function s(x){return!!(x.allowSearch??x.allowFiltering)}function a(x,w){const{lookup:D}=x;return x.parseValue?D?x.parseValue.call(D,w):x.parseValue(w):w}const _={defaultOptions:()=>({searchPanel:{visible:!1,width:160,placeholder:f.A.format("dxDataGrid-searchPanelPlaceholder"),highlightSearchText:!0,highlightCaseSensitive:!1,text:"",searchVisibleColumnsOnly:!1}}),extenders:{controllers:{data:x=>class extends x{optionChanged(w){switch(w.fullName){case"searchPanel.text":case"searchPanel":this._applyFilter(),w.handled=!0;break;default:super.optionChanged(w)}}publicMethods(){return super.publicMethods().concat(["searchByText"])}_calculateAdditionalFilter(){const w=super._calculateAdditionalFilter(),D=this.calculateSearchFilter(this.option("searchPanel.text"));return S.A.combineFilters([w,D])}searchByText(w){this.option("searchPanel.text",w)}calculateSearchFilter(w){let D,C;const I=this._columnsController.getColumns(),L=this.option("searchPanel.searchVisibleColumnsOnly");let N;const G=[];if(!w)return null;function k(U){const B=(0,P.Hz)(N.valueExpr);for(let K=0;K<U.length;K++){const J=B(U[K]);G.push(C.createFilterExpression(J,null,"search"))}}for(D=0;D<I.length;D++)if(C=I[D],(!L||C.visible)&&s(C)&&C.calculateFilterExpression){N=C.lookup;const U=a(C,w);N&&N.items?(0,b.A)(N.items).filter(C.createFilterExpression.call({dataField:N.displayExpr,dataType:N.dataType,calculateFilterExpression:C.calculateFilterExpression},U,null,"search")).enumerate().done(k):void 0!==U&&G.push(C.createFilterExpression(U,null,"search"))}return 0===G.length?["!"]:S.A.combineFilters(G,"or")}}},views:{headerPanel:x=>class extends x{optionChanged(w){if("searchPanel"===w.name){if("searchPanel.text"===w.fullName){const D=this.getSearchTextEditor();D&&D.option("value",w.value)}else this._invalidate();w.handled=!0}else super.optionChanged(w)}_getToolbarItems(){const w=super._getToolbarItems();return this._prepareSearchItem(w)}_prepareSearchItem(w){const D=this,C=this._dataController,I=this.option("searchPanel");return I&&I.visible&&w.push({template(N,G,k){const U=(0,o.A)("<div>").addClass(D.addWidgetPrefix("search-panel")).appendTo(k);D._editorFactoryController.createEditor(U,{width:I.width,placeholder:I.placeholder,parentType:"searchPanel",value:D.option("searchPanel.text"),updateValueTimeout:700,setValue(B){C.searchByText(B)},editorOptions:{inputAttr:{"aria-label":f.A.format(`${D.component.NAME}-ariaSearchInGrid`)}}}),D.resize()},name:"searchPanel",location:"after",locateInMenu:"never",sortIndex:40}),w}getSearchTextEditor(){const w=this,D=w.element(),C=D.find(`.${w.addWidgetPrefix("search-panel")}`).filter(function(){return(0,o.A)(this).closest(`.${w.addWidgetPrefix("header-panel")}`).is(D)});return C.length?C.dxTextBox("instance"):null}isVisible(){const w=this.option("searchPanel");return super.isVisible()||!(null==w||!w.visible)}},rowsView:x=>class extends x{init(){super.init.apply(this,arguments),this._searchParams=[],this._dataController=this.getController("data")}dispose(){clearTimeout(this._highlightTimer),super.dispose()}_getFormattedSearchText(w,D){const C=a(w,D),I=S.A.getFormatOptionsByColumn(w,"search");return S.A.formatValue(C,I)}_getStringNormalizer(){var w,D,C;const I=this.option("searchPanel.highlightCaseSensitive"),L=null===(w=this._dataController)||void 0===w||null===(D=w.getDataSource)||void 0===D?void 0:D.call(w),N=null==L||null===(C=L.loadOptions)||void 0===C||null===(C=C.call(L))||void 0===C?void 0:C.langParams;return G=>(0,P.ao)(G,I,N)}_findHighlightingTextNodes(w,D,C){var I;const L=this;let G,N=D.parent();const k=this._getStringNormalizer(),U=k(C),B=[];if(N.length){if(w)if(w.groupIndex>=0&&!w.showWhenGrouped)G=D;else{const K=L._columnsController.getVisibleIndex(w.index);G=N.children("td").eq(K).find("*")}}else N=(0,o.A)("<div>").append(D);return G=null!==(I=G)&&void 0!==I&&I.length?G:N.find("*"),G.each((K,J)=>{const ie=(0,o.A)(J).contents();for(let re=0;re<ie.length;re++){const q=ie.get(re);3===q.nodeType&&k(q.textContent??q.nodeValue??"").includes(U)&&B.push(q)}}),B}_highlightSearchTextCore(w,D){const I=(0,o.A)("<span>").addClass(this.addWidgetPrefix("search-text")),L=w.text(),N=w[0],G=this._getStringNormalizer(),k=G(L).indexOf(G(D));if(k>=0)return N.textContent?N.textContent=L.substr(0,k):N.nodeValue=L.substr(0,k),w.after(I.text(L.substr(k,D.length))),w=(0,o.A)(W.A.createTextNode(L.substr(k+D.length))).insertAfter(I),this._highlightSearchTextCore(w,D)}_highlightSearchText(w,D,C){const I=this,L=this._getStringNormalizer();let N=I.option("searchPanel.text");D&&C&&(N=N&&I._getFormattedSearchText(C,N)),N&&I.option("searchPanel.highlightSearchText")&&I._findHighlightingTextNodes(C,w,N).forEach(k=>{D?L((0,o.A)(k).text())===L(N??"")&&(0,o.A)(k).replaceWith((0,o.A)("<span>").addClass(I.addWidgetPrefix("search-text")).text((0,o.A)(k).text())):I._highlightSearchTextCore((0,o.A)(k),N)})}_renderCore(){const w=super._renderCore.apply(this,arguments);return(this.option().rowTemplate||this.option("dataRowTemplate"))&&(this.option("templatesRenderAsynchronously")?(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout(()=>{this._highlightSearchText(this.getTableElement())})):this._highlightSearchText(this.getTableElement())),w}_updateCell(w,D){const{column:C}=D,L="string"!==(C.lookup&&C.lookup.dataType||C.dataType);s(C)&&!D.isOnForm&&(this.option("templatesRenderAsynchronously")?(this._searchParams.length||(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout(()=>{this._searchParams.forEach(N=>{this._highlightSearchText.apply(this,N)}),this._searchParams=[]})),this._searchParams.push([w,L,C])):this._highlightSearchText(w,L,C)),super._updateCell(w,D)}}}}}},3530:(In,Ze,M)=>{"use strict";M.d(Ze,{$O:()=>te,Py:()=>Y,nx:()=>pe,tO:()=>Q});var W=M(5704),o=M(4859),P=M(6021),b=M(3090),f=M(2660),S=M(7007),T=M(1830),y=M(2946),d=M(778),c=M(4072),s=M(3535),a=M(9293),u=M(8360),h=M(127),g=M(9658),_=M(3376),x=M(8736);const U="selection.showCheckBoxesMode",B="selection.mode",K=function(z,oe){const ae=z.getView("rowsView"),ee=z.getController("selection"),he=(0,W.A)(oe.target).closest(".dx-data-row"),de=ae.getRowIndex(he);de<0||("onLongTap"===z.option(U)?ee.isSelectionWithCheckboxes()?ee.stopSelectionWithCheckboxes():ee.startSelectionWithCheckboxes():("onClick"===z.option(U)&&ee.startSelectionWithCheckboxes(),"always"!==z.option(U)&&ee.changeItemSelection(de,{control:!0})))},ie=(z,oe)=>{const{component:ae}=oe,ee=ae.getView("rowsView");ae.option("renderAsync")&&!ae.option("selection.deferred")&&(oe.value=ae.isRowSelected(oe.row.key)),ee.renderSelectCheckBoxContainer((0,W.A)(z),oe)},re=(z,oe)=>{const{column:ae}=oe,ee=(0,W.A)(z),he=oe.component.getView("columnHeadersView");ee.addClass("dx-editor-cell"),he._renderSelectAllCheckBox(ee,ae),he._attachSelectAllCheckBoxClickEvent(ee)},Y=z=>class extends z{init(){const oe=this.option("selection.deferred");super.init.apply(this,arguments),oe&&this._selectionController._updateCheckboxesState({isDeferredMode:!0,selectionFilter:this.option("selectionFilter")})}_loadDataSource(){const oe=this;return super._loadDataSource().always(()=>{oe._selectionController.refresh()})}_processDataItem(oe,ae){const ee=this._selectionController.isSelectColumnVisible(),he=ae.isDeferredSelection=void 0===ae.isDeferredSelection?this.option("selection.deferred"):ae.isDeferredSelection,de=super._processDataItem.apply(this,arguments);if(de.isSelected=this._selectionController.isRowSelected(he?de.data:de.key),ee&&de.values)for(let ue=0;ue<ae.visibleColumns.length;ue++)if("select"===ae.visibleColumns[ue].command){de.values[ue]=de.isSelected;break}return de}refresh(oe){const ae=this,ee=new P.cY;return super.refresh.apply(this,arguments).done(()=>{!oe||oe.selection?ae._selectionController.refresh().done(ee.resolve).fail(ee.reject):ee.resolve()}).fail(ee.reject),ee.promise()}_handleDataChanged(oe){const ae=this.hasLoadOperation();super._handleDataChanged.apply(this,arguments),ae&&!this._repaintChangesOnly&&this._selectionController.focusedItemIndex(-1)}_applyChange(oe){if(!oe||"updateSelection"!==oe.changeType)return super._applyChange.apply(this,arguments);oe.items.forEach((ae,ee)=>{const he=this._items[ee];he&&(he.isSelected=ae.isSelected,he.values=ae.values)})}_endUpdateCore(){const oe=this._changes;if(oe.length>1&&oe.every(ee=>"updateSelection"===ee.changeType)){const ee=oe.map(he=>he.itemIndexes||[]).reduce((he,de)=>he.concat(de));this._changes=[{changeType:"updateSelection",itemIndexes:ee}]}super._endUpdateCore.apply(this,arguments)}},Q=z=>class extends z{init(){super.init(),this._selectionController.selectionChanged.add(this._updateSelectAllValue.bind(this))}_updateSelectAllValue(){const oe=this,ae=oe.element(),ee=ae&&ae.find(".dx-select-checkbox");if(ae&&ee.length&&"multiple"===oe.option("selection.mode")){const he=oe._selectionController.isSelectAll(),de=!1!==he,ue=oe.option("selection.allowSelectAll")?!oe._dataController.isEmpty():de;ee.dxCheckBox("instance").option({visible:ue,value:he})}}_handleDataChanged(oe){super._handleDataChanged(oe),(!oe||"refresh"===oe.changeType||oe.repaintChangesOnly&&"update"===oe.changeType)&&this.waitAsyncTemplates().done(()=>{this._updateSelectAllValue()})}_renderSelectAllCheckBox(oe,ae){const ee=this,he=ee._dataController.isEmpty(),de=(0,W.A)("<div>").appendTo(oe).addClass("dx-select-checkbox");return ee.setAria("label",u.A.format("dxDataGrid-ariaSelectAll"),de),ee._editorFactoryController.createEditor(de,(0,b.X)({},ae,{parentType:"headerRow",dataType:"boolean",value:this._selectionController.isSelectAll(),editorOptions:{visible:!he&&(ee.option("selection.allowSelectAll")||!1!==this._selectionController.isSelectAll())},tabIndex:ee.option("useLegacyKeyboardNavigation")?-1:ee.option("tabIndex")||0,setValue:(ue,be)=>{const ve=ee.option("selection.allowSelectAll");be.component.option("visible",ve||!1!==be.component.option("value")),be.event&&this._selectionController.isSelectAll()!==ue&&(be.value&&!ve?be.component.option("value",!1):be.value?this._selectionController.selectAll():this._selectionController.deselectAll(),be.event.preventDefault())}})),de}_attachSelectAllCheckBoxClickEvent(oe){c.A.on(oe,d.U,this.createAction(ae=>{const{event:ee}=ae;(0,W.A)(ee.target).closest(".dx-select-checkbox").length||c.A.trigger((0,W.A)(ee.currentTarget).children(".dx-select-checkbox"),d.U),ee.preventDefault()}))}},te=z=>class extends z{renderSelectCheckBoxContainer(oe,ae){"data"!==ae.rowType||ae.row.isNewRow?x.A.setEmptyText(oe):(oe.addClass("dx-editor-cell"),this._attachCheckBoxClickEvent(oe),this._renderSelectCheckBox(oe,ae))}_renderSelectCheckBox(oe,ae){const ee=(0,W.A)("<div>").addClass("dx-select-checkbox").appendTo(oe);return this.setAria("label",u.A.format("dxDataGrid-ariaSelectRow"),ee),this._editorFactoryController.createEditor(ee,(0,b.X)({},ae.column,{parentType:"dataRow",dataType:"boolean",lookup:null,value:ae.value,setValue(he,de){var ue;"keydown"===(null==de||null===(ue=de.event)||void 0===ue?void 0:ue.type)&&c.A.trigger(de.element,d.U,de)},row:ae.row})),ee}_attachCheckBoxClickEvent(oe){c.A.on(oe,d.U,this.createAction(function(ae){const{event:ee}=ae,he=this.getRowIndex((0,W.A)(ee.currentTarget).closest(".dx-row"));he>=0&&(this._selectionController.startSelectionWithCheckboxes(),this._selectionController.changeItemSelection(he,{shift:ee.shiftKey}),(0,W.A)(ee.target).closest(".dx-select-checkbox").length&&this._dataController.updateItems({changeType:"updateSelection",itemIndexes:[he]}))}))}_update(oe){const ae=this,ee=ae.getTableElements();"updateSelection"===oe.changeType?ee.length>0&&((0,f.__)(ee,(he,de)=>{(0,f.__)(oe.itemIndexes||[],(ue,be)=>{let ve;if(oe.items[be]&&(ve=ae._getRowElements((0,W.A)(de)).eq(be),ve.length)){const{isSelected:le}=oe.items[be];ve.toggleClass("dx-selection",void 0!==le&&le).find(".dx-select-checkbox").dxCheckBox("option","value",le),ae.setAria("selected",le,ve)}})}),ae._updateCheckboxesClass()):super._update(oe)}_createTable(){const oe=this,ae=oe.option("selection.mode"),ee=super._createTable.apply(oe,arguments);return"none"!==ae&&(("onLongTap"===oe.option(U)||!S.touch)&&c.A.on(ee,(0,a.b4)(s.A.name,"dxDataGridRowsView"),".dx-data-row",oe.createAction(he=>{K(oe.component,he.event),he.event.stopPropagation()})),c.A.on(ee,"mousedown selectstart",oe.createAction(he=>{const{event:de}=he;de.shiftKey&&de.preventDefault()}))),ee}_createRow(oe){const ae=super._createRow.apply(this,arguments);if(oe){const{isSelected:ee}=oe;ee&&ae.addClass("dx-selection"),"none"!==this.option(B)&&this.setAria("selected",ee,ae)}return ae}_rowClickForTreeList(oe){super._rowClick(oe)}_rowClick(oe){const ee=oe.event,he=(0,W.A)(ee.target).closest(".dx-selection-disabled").length;this.isClickableElement((0,W.A)(ee.target))||(!he&&("multiple"!==this.option(B)||"always"!==this.option(U))&&this._selectionController.changeItemSelection(oe.rowIndex,{control:(0,a.By)(ee),shift:ee.shiftKey})&&(ee.preventDefault(),oe.handled=!0),super._rowClick(oe))}isClickableElement(oe){return!!oe.closest(".dx-command-select").length}_renderCore(oe){const ae=super._renderCore(oe);return this._updateCheckboxesClass(),ae}_updateCheckboxesClass(){const oe=this.getTableElements(),ae=this._selectionController.isSelectColumnVisible()&&!this._selectionController.isSelectionWithCheckboxes();(0,f.__)(oe,(ee,he)=>{(0,W.A)(he).toggleClass("dx-select-checkboxes-hidden",ae)})}},pe={defaultOptions:()=>({selection:{mode:"none",showCheckBoxesMode:"onClick",allowSelectAll:!0,selectAllMode:"allPages",deferred:!1,maxFilterLengthInRequest:1500,alwaysSelectByShift:!1},selectionFilter:[],selectedRowKeys:[]}),controllers:{selection:class q extends _.Ay.Controller{init(){const{deferred:oe,selectAllMode:ae,mode:ee}=this.option("selection")??{};"infinite"===this.option("scrolling.mode")&&!oe&&"multiple"===ee&&"allPages"===ae&&h.A.log("W1018"),this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._stateStoringController=this.getController("stateStoring"),this._selectionMode=ee,this._isSelectionWithCheckboxes=!1,this._selection=this._createSelection(),this._updateSelectColumn(),this.createAction("onSelectionChanged",{excludeValidators:["disabled","readOnly"]}),this._dataPushedHandler||(this._dataPushedHandler=this._handleDataPushed.bind(this),this._dataController.pushed.add(this._dataPushedHandler))}_handleDataPushed(oe){this._deselectRemovedOnPush(oe),this._updateSelectedOnPush(oe)}_deselectRemovedOnPush(oe){const ae=this.option("selection.deferred");let ee=oe.filter(he=>"remove"===he.type).map(he=>he.key);if(ae){const he=this._dataController.items().filter(de=>de.isSelected).map(de=>de.key);ee=ee.filter(de=>he.find(ue=>(0,o.RL)(ue,de)))}ee.length&&this.deselectRows(ee)}_updateSelectedOnPush(oe){if(this.option("selection.deferred"))return;const ee=oe.filter(de=>"update"===de.type),he=this.getSelectedRowsData();(0,y.VK)({keyInfo:this._selection.options,data:he,changes:ee})}_getSelectionConfig(){const oe=this._dataController,ae=this._columnsController,ee=this.option("selection")??{},{deferred:he}=ee,de=this.option("scrolling.mode"),ue="virtual"===de||"infinite"===de,be=this.option("selection.allowSelectAll"),ve=this.option("scrolling.legacyMode");return{selectedKeys:this.option("selectedRowKeys"),mode:this._selectionMode,deferred:he,alwaysSelectByShift:ee.alwaysSelectByShift,maxFilterLengthInRequest:ee.maxFilterLengthInRequest,selectionFilter:this.option("selectionFilter"),ignoreDisabledItems:!0,isVirtualPaging:ue,allowLoadByRange(){const le=ae.getGroupColumns().length>0;return ue&&!ve&&!le&&be&&!he},key:()=>oe?.key(),keyOf:le=>oe?.keyOf(le),dataFields(){var le;return null===(le=oe.dataSource())||void 0===le?void 0:le.select()},load(le){var Ce;return(null===(Ce=oe.dataSource())||void 0===Ce?void 0:Ce.load(le))||(new P.cY).resolve([])},plainItems:le=>oe.items(!0),isItemSelected:le=>le.selected,isSelectableItem:le=>"data"===le?.rowType&&!le.isNewRow,getItemData:le=>(0,T.O9)(le?.rowType)?le?.oldData||le?.data:le,filter:()=>oe.getCombinedFilter(he),totalCount:()=>oe.totalCount(),getLoadOptions(le,Ce,ye){var ge;const{sort:fe,filter:xe}=(null===(ge=oe.dataSource())||void 0===ge?void 0:ge.lastLoadOptions())??{};let Te=Math.min(le,Ce),Ee=Math.max(le,Ce);return(0,T.O9)(ye)&&(Te=Math.min(ye,Te),Ee=Math.max(ye,Ee)),{skip:Te,take:Ee-Te+1,filter:xe,sort:fe}},onSelectionChanged:this._updateSelectedItems.bind(this)}}_updateSelectColumn(){const oe=this._columnsController,ae=this.isSelectColumnVisible();oe.addCommandColumn({type:"selection",command:"select",visible:ae,visibleIndex:-1,dataType:"boolean",alignment:"center",cssClass:"dx-command-select",width:"auto",cellTemplate:ie,headerCellTemplate:re}),oe.columnOption("command:select","visible",ae)}_createSelection(){const oe=this._getSelectionConfig();return new g.A(oe)}_fireSelectionChanged(oe){const ae=this.option("selection.deferred")?{selectionFilter:this.option("selectionFilter")}:{selectedRowKeys:this.option("selectedRowKeys")};this.selectionChanged.fire(ae),oe&&this.executeAction("onSelectionChanged",oe)}_updateCheckboxesState(oe){const{isDeferredMode:ae}=oe,{selectionFilter:ee}=oe,{selectedItemKeys:he}=oe,{removedItemKeys:de}=oe;"onClick"===this.option(U)&&((ae?ee&&function(z,oe){let ae=0;const ee=z._dataController.store(),he=ee&&ee.key(),de=Array.isArray(he);if(!oe.length)return!1;if(de&&Array.isArray(oe[0])&&"and"===oe[1]){for(let ue=0;ue<oe.length;ue++)if(Array.isArray(oe[ue])){if(oe[ue][0]!==he[ae]||"="!==oe[ue][1])return!0;ae++}return!1}return he!==oe[0]}(this,ee):he.length>1)?this.startSelectionWithCheckboxes():(ae?ee&&!ee.length:0===he.length&&de.length)&&this.stopSelectionWithCheckboxes())}_updateSelectedItems(oe){const ae=this;let ee;const he=ae.option("selection.deferred"),de=ae._selection.selectionFilter(),ue=ae._dataController,be=ue.items(!0),ve=ue.items();if(!be)return;const le=ae.isSelectionWithCheckboxes(),Ce=ae.getChangedItemIndexes(be),ye=ae.getChangedItemIndexes(ve);ae._updateCheckboxesState({selectedItemKeys:oe.selectedItemKeys,removedItemKeys:oe.removedItemKeys,selectionFilter:de,isDeferredMode:he}),(Ce.length||le!==ae.isSelectionWithCheckboxes())&&ue.updateItems({changeType:"updateSelection",itemIndexes:ye}),he?(ae.option("selectionFilter",de),ee={}):(oe.addedItemKeys.length||oe.removedItemKeys.length)&&(ae._selectedItemsInternalChange=!0,ae.option("selectedRowKeys",oe.selectedItemKeys.slice(0)),ae._selectedItemsInternalChange=!1,ee={selectedRowsData:oe.selectedItems.slice(0),selectedRowKeys:oe.selectedItemKeys.slice(0),currentSelectedRowKeys:oe.addedItemKeys.slice(0),currentDeselectedRowKeys:oe.removedItemKeys.slice(0)}),ae._fireSelectionChanged(ee)}getChangedItemIndexes(oe){const ae=this,ee=[],he=this.option("selection.deferred");for(let de=0,{length:ue}=oe;de<ue;de++){const be=oe[de],ve=ae.isRowSelected(he?be.data:be.key);ae._selection.isDataItem(be)&&be.isSelected!==ve&&ee.push(de)}return ee}callbackNames(){return["selectionChanged"]}optionChanged(oe){switch(super.optionChanged(oe),oe.name){case"selection":{const ae=this._selectionMode;if(this.init(),"selection.showCheckBoxesMode"!==oe.fullName){const ee=this._selectionMode;let he=this.option("selectedRowKeys");ae!==ee&&("single"===ee?he.length>1&&(he=[he[0]]):"multiple"!==ee&&(he=[])),this.selectRows(he).always(()=>{this._fireSelectionChanged()})}this._columnsController.updateColumns(),oe.handled=!0;break}case"selectionFilter":this._selection.selectionFilter(oe.value),oe.handled=!0;break;case"selectedRowKeys":{const ae=oe.value||[];Array.isArray(ae)&&!this._selectedItemsInternalChange&&(this.component.getDataSource()||!ae.length)&&this.selectRows(ae),oe.handled=!0;break}}}publicMethods(){return["selectRows","deselectRows","selectRowsByIndexes","getSelectedRowKeys","getSelectedRowsData","clearSelection","selectAll","deselectAll","startSelectionWithCheckboxes","stopSelectionWithCheckboxes","isRowSelected"]}isRowSelected(oe){return this._selection.isItemSelected(oe)}isSelectColumnVisible(){return"multiple"===this.option(B)&&("always"===this.option(U)||"onClick"===this.option(U)||this._isSelectionWithCheckboxes)}_isOnePageSelectAll(){return"page"===this.option("selection.selectAllMode")}isSelectAll(){return this._selection.getSelectAllState(this._isOnePageSelectAll())}selectAll(){return"onClick"===this.option(U)&&this.startSelectionWithCheckboxes(),this._selection.selectAll(this._isOnePageSelectAll())}deselectAll(){return this._selection.deselectAll(this._isOnePageSelectAll())}clearSelection(){return this.selectedItemKeys([])}refresh(){const oe=this.option("selectedRowKeys")??[];return!this.option("selection.deferred")&&oe.length?this.selectedItemKeys(oe):(new P.cY).resolve().promise()}selectedItemKeys(oe,ae,ee,he){return this._selection.selectedItemKeys(oe,ae,ee,he)}getSelectedRowKeys(oe){return this._selection.getSelectedItemKeys()}selectRows(oe,ae){return this.selectedItemKeys(oe,ae)}deselectRows(oe){return this.selectedItemKeys(oe,!0,!0)}selectRowsByIndexes(oe){const ae=this._dataController.items(),ee=[];return Array.isArray(oe)||(oe=Array.prototype.slice.call(arguments,0)),(0,f.__)(oe,function(){const he=ae[this];he&&"data"===he.rowType&&ee.push(he.key)}),this.selectRows(ee)}getSelectedRowsData(oe){return this._selection.getSelectedItems()}loadSelectedItemsWithFilter(){return this._selection.loadSelectedItemsWithFilter()}changeItemSelection(oe,ae,ee){ae=ae||{},this.isSelectionWithCheckboxes()&&(ae.control=!0);const he=oe+this._dataController.getRowIndexOffset()-this._dataController.getRowIndexOffset(!0);return this._selection.changeItemSelection(he,ae,ee)}focusedItemIndex(oe){if(!(0,T.O9)(oe))return this._selection._focusedItemIndex;this._selection._focusedItemIndex=oe}isSelectionWithCheckboxes(){return"multiple"===this.option(B)&&("always"===this.option(U)||this._isSelectionWithCheckboxes)}startSelectionWithCheckboxes(){return"multiple"===this.option(B)&&!this.isSelectionWithCheckboxes()&&(this._isSelectionWithCheckboxes=!0,this._updateSelectColumn(),!0)}stopSelectionWithCheckboxes(){return!!this._isSelectionWithCheckboxes&&(this._isSelectionWithCheckboxes=!1,this._updateSelectColumn(),!0)}}},extenders:{controllers:{data:Y,contextMenu:z=>class extends z{_contextMenuPrepared(oe){const ae=oe.event;ae.originalEvent&&"dxhold"!==ae.originalEvent.type||oe.items&&oe.items.length>0||K(this,ae)}}},views:{columnHeadersView:Q,rowsView:te}}}},1282:(In,Ze,M)=>{"use strict";M.d(Ze,{L:()=>s});var W=M(5704),o=M(1830),P=M(778),b=M(4072),f=M(9293),S=M(8360),T=M(3392);const s={defaultOptions:()=>({sorting:{mode:"single",ascendingText:S.A.format("dxDataGrid-sortingAscendingText"),descendingText:S.A.format("dxDataGrid-sortingDescendingText"),clearText:S.A.format("dxDataGrid-sortingClearText"),showSortIndexes:!0}}),extenders:{views:{columnHeadersView:a=>class extends((0,T.A)(a)){optionChanged(u){"sorting"===u.name?(this._invalidate(),u.handled=!0):super.optionChanged(u)}_createRow(u){const h=super._createRow(u);return"header"===u.rowType&&b.A.on(h,(0,f.b4)(P.U,"dxDataGridColumnHeadersView"),"td",this.createAction(g=>{this._processHeaderAction(g.event,h)})),h}_processHeaderAction(u,h){if((0,W.A)(u.currentTarget).parent().get(0)!==h.get(0))return;const g=this;let _=null;const x=(0,W.A)(u.currentTarget),w=x.parent().index();let D=-1;[].slice.call(g.getCellElements(w)).some((k,U)=>{if(k===x.get(0))return D=U,!0});const I=g._columnsController.getVisibleColumns(w)[D],L=g.getController("editing"),N=g.option("editing.mode");L&&L.isEditing()&&("batch"===N||"cell"===N)||!g._isSortableElement((0,W.A)(u.target))||I&&!(0,o.O9)(I.groupIndex)&&!I.command&&(u.shiftKey?_="shift":(0,f.By)(u)&&(_="ctrl"),setTimeout(()=>{g._columnsController.changeSortOrder(I.index,_)}))}_renderCellContent(u,h){const{column:_}=h;!_.command&&"header"===h.rowType&&this._applyColumnState({name:"sort",rootElement:u,column:_,showColumnLines:this.option("showColumnLines")}),super._renderCellContent.apply(this,arguments)}_columnOptionChanged(u){const{changeTypes:h}=u;1===h.length&&h.sorting?this._updateIndicators("sort"):super._columnOptionChanged(u)}},headerPanel:a=>class extends((0,T.A)(a)){optionChanged(u){"sorting"===u.name?(this._invalidate(),u.handled=!0):super.optionChanged(u)}_createGroupPanelItem(u,h){const g=this,_=super._createGroupPanelItem(...arguments);return b.A.on(_,(0,f.b4)(P.U,"dxDataGridHeaderPanel"),g.createAction(()=>{g._processGroupItemAction(h.index)})),g._applyColumnState({name:"sort",rootElement:_,column:{alignment:g.option("rtlEnabled")?"right":"left",allowSorting:h.allowSorting,sortOrder:"desc"===h.sortOrder?"desc":"asc",isGrouped:!0},showColumnLines:!0}),_}_processGroupItemAction(u){setTimeout(()=>this.getController("columns").changeSortOrder(u))}}}}}},3392:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>a});var W=M(5704),o=M(1830),P=M(8360);const a=u=>class extends u{_applyColumnState(h){const g=this;let _,x;const w=g.option("sorting.mode"),{rootElement:D}=h,{column:C}=h,I=g._getIndicatorContainer(D);if("sort"===h.name){D.find(".dx-sort").remove(),!I.children().length&&I.remove();const L="none"!==w&&C.allowSorting,N=g.getController&&!!g.getController("columns").columnOption("sortIndex:1");return!(0,o.O9)(C.groupIndex)&&(L||(0,o.O9)(C.sortOrder))&&(_="asc"===C.sortOrder?"ascending":"descending",x=super._applyColumnState(h).toggleClass("dx-sort-up","asc"===C.sortOrder).toggleClass("dx-sort-down","desc"===C.sortOrder),N&&g.option("sorting.showSortIndexes")&&C.sortIndex>=0&&((0,W.A)("<span>").addClass("dx-sort-index-icon").text(C.sortIndex+1).appendTo(x),x.addClass("dx-sort-index")),L&&h.rootElement.addClass(g.addWidgetPrefix("action"))),this._setAriaSortAttribute(C,_,D,N),x}return super._applyColumnState(h)}_setAriaSortAttribute(h,g,_,x){if(_.removeAttr("aria-roledescription"),h.isGrouped){let w=this.localize("dxDataGrid-ariaNotSortedColumn");(0,o.O9)(h.sortOrder)&&(w=this.localize("asc"===h.sortOrder?"dxDataGrid-ariaSortedAscendingColumn":"dxDataGrid-ariaSortedDescendingColumn")),this.setAria("roledescription",w,_)}else if((0,o.O9)(h.sortOrder)){if(this.setAria("sort",g,_),x&&h.sortIndex>=0){const w=P.A.format("dxDataGrid-ariaColumnHeader"),D=P.A.format("dxDataGrid-ariaSortIndex",h.sortIndex+1);this.setAria("roledescription",`${w}, ${D}`,_)}}else this.setAria("sort","none",_)}_getIndicatorClassName(h){return"sort"===h?"dx-sort":"sortIndex"===h?"dx-sort-index-icon":super._getIndicatorClassName(h)}_renderIndicator(h){const{column:g}=h,_=h.container,x=h.indicator;if("sort"===h.name){const w=this.option("rtlEnabled");if((0,o.O9)(g.sortOrder)||x&&x.addClass("dx-sort-none"),_.children().length&&(!w&&"left"===h.columnAlignment||w&&"right"===h.columnAlignment))return void _.prepend(x)}super._renderIndicator(h)}_updateIndicator(h,g,_){if("sort"!==_||!(0,o.O9)(g.groupIndex))return super._updateIndicator.apply(this,arguments)}_getIndicatorElements(h,g){const _=super._getIndicatorElements(h);return g?_:_&&_.not(".dx-sort-none")}}},9262:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>g});var W=M(4859),o=M(6021),P=M(3090),b=M(1830),f=M(2658);const g={defaultOptions:()=>({stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3}}),controllers:{stateStoring:f._},extenders:{views:{rowsView:_=>class extends _{init(){super.init(),this._dataController.stateLoaded.add(()=>{if(this._dataController.isLoaded()&&!this._dataController.getDataSource()){this.setLoading(!1),this.renderNoDataText();const x=this.component.getView("columnHeadersView");x&&x.render(),this.component._fireContentReadyAction()}})}}},controllers:{stateStoring:_=>class extends _{init(){return super.init.apply(this,arguments),(_=>{const x=_.getController("columns"),w=_.getController("selection"),D=_.getController("export"),C=_.getController("data");x&&x.columnsChanged.add(()=>{_.updateState({columns:x.getUserState()})}),w&&w.selectionChanged.add(I=>{_.updateState({selectedRowKeys:I.selectedRowKeys,selectionFilter:I.selectionFilter})}),C&&(_._initialPageSize=_.option("paging.pageSize"),_._initialFilterValue=_.option("filterValue"),C.changed.add(()=>{const I=(_=>{const x=_.getView("pagerView"),w=_.getController("data"),D={allowedPageSizes:x?x.getPageSizes():void 0,filterPanel:{filterEnabled:_.option("filterPanel.filterEnabled")},filterValue:_.option("filterValue"),focusedRowKey:_.option("focusedRowEnabled")?_.option("focusedRowKey"):void 0};return(0,P.X)(D,w.getUserState())})(_);_.updateState(I)})),D&&D.selectionOnlyChanged.add(()=>{_.updateState({exportSelectionOnly:D.selectionOnly()})})})(this),this}isLoading(){return super.isLoading()||this.getDataController().isStateLoading()}state(x){const w=super.state.apply(this,arguments);return void 0!==x&&this.applyState((0,P.X)(!0,{},x)),w}updateState(x){if(this.isEnabled()){const w=this.state(),D=(0,P.X)({},w,x),C=(0,W.GP)(w),I=(0,W.GP)(D);(0,W.RL)(C,I)||(x=(0,P.X)(!0,{},x),(0,P.X)(this._state,x),this.save())}else(0,P.X)(this._state,x)}applyState(x){var w;const{allowedPageSizes:D}=x,{searchText:C}=x,{selectedRowKeys:I}=x,{selectionFilter:L}=x,N=this.option("scrolling.mode"),G="virtual"===N||"infinite"===N,k=!0===this.option("pager.visible")&&this.option("pager.showPageSizeSelector"),U=null===(w=this.getView("rowsView"))||void 0===w?void 0:w.hasHeight();this.component.beginUpdate(),this.getColumnsController()&&this.getColumnsController().setUserState(x.columns),this.getExportController()&&this.getExportController().selectionOnly(x.exportSelectionOnly),this.option("selection.deferred")||this.option("selectedRowKeys",I||[]),this.option("selectionFilter",L),D&&"auto"===this.option("pager.allowedPageSizes")&&(this.option("pager").allowedPageSizes=D),this.option("focusedRowEnabled")&&(this.option("focusedRowIndex",-1),this.option("focusedRowKey",x.focusedRowKey||null)),this.component.endUpdate(),this.option("searchPanel.text",C||""),this.option("filterValue",((_,x)=>{const w=_.getController("filterSync"),D=_.getController("columns");return w?x.columns||void 0!==x.filterValue?x.filterValue||w.getFilterValueFromColumns(x.columns):_._initialFilterValue||w.getFilterValueFromColumns(D.getColumns()):null})(this,x)),this.option("filterPanel.filterEnabled",!x.filterPanel||x.filterPanel.filterEnabled),this.option("paging.pageIndex",(!G||U)&&x.pageIndex||0),this.option("paging.pageSize",G&&!k||!(0,b.O9)(x.pageSize)?this._initialPageSize:x.pageSize),this.getDataController()&&this.getDataController().reset()}},columns:_=>class extends _{_shouldReturnVisibleColumns(){return super._shouldReturnVisibleColumns.apply(this,arguments)&&(!this._stateStoringController.isEnabled()||this._stateStoringController.isLoaded())}},data:_=>class extends _{dispose(){clearTimeout(this._restoreStateTimeoutID),super.dispose()}callbackNames(){return super.callbackNames().concat(["stateLoaded"])}_refreshDataSource(){if(this._stateStoringController.isEnabled()&&!this._stateStoringController.isLoaded()){clearTimeout(this._restoreStateTimeoutID);const x=new o.cY;return this._restoreStateTimeoutID=setTimeout(()=>{this._stateStoringController.load().always(()=>{this._restoreStateTimeoutID=null}).done(()=>{super._refreshDataSource(),this.stateLoaded.fire(),x.resolve()}).fail(w=>{this.stateLoaded.fire(),this._handleLoadError(w||"Unknown error"),x.reject()})}),x.promise()}this.isStateLoading()||super._refreshDataSource()}isLoading(){return super.isLoading()||this._stateStoringController.isLoading()}isStateLoading(){return(0,b.O9)(this._restoreStateTimeoutID)}isLoaded(){return super.isLoaded()&&!this.isStateLoading()}},selection:_=>class extends _{_fireSelectionChanged(x){const w=this.option("selection.deferred");this._stateStoringController.isLoading()&&w||super._fireSelectionChanged.apply(this,arguments)}}}}}},2658:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>g,_:()=>h});var W=M(6021),o=M(3090),P=M(2660),b=M(4129),f=M(1830),S=M(6110),T=M(4072),y=M(127),d=M(3376);const c=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/,s=function(_){_&&(0,P.__)(_,(x,w)=>{if((0,f.Qd)(w)||Array.isArray(w))s(w);else if("string"==typeof w){const D=c.exec(w);D&&(_[x]=new Date(Date.UTC(+D[1],+D[2]-1,+D[3],+D[4],+D[5],+D[6])))}})},a=function(_){const x="sessionStorage"===_.type?(0,b.s)():(0,S.zk)().localStorage;if(!x)throw new Error("E1007");return x},u=function(_){return(0,f.O9)(_.storageKey)?_.storageKey:"storage"};class h extends d.Ay.ViewController{getDataController(){return this.getController("data")}getExportController(){return this.getController("export")}getColumnsController(){return this.getController("columns")}init(){return this._state={},this._isLoaded=!1,this._isLoading=!1,this._windowUnloadHandler=()=>{void 0!==this._savingTimeoutID&&this._saveState(this.state())},T.A.on((0,S.zk)(),"unload",this._windowUnloadHandler),this}optionChanged(x){const w=this;"stateStoring"===x.name?(w.isEnabled()&&!w.isLoading()&&w.load(),x.handled=!0):super.optionChanged(x)}dispose(){clearTimeout(this._savingTimeoutID),T.A.off((0,S.zk)(),"unload",this._windowUnloadHandler)}_loadState(){const x=this.option("stateStoring");if("custom"===x.type)return x.customLoad&&x.customLoad();try{return JSON.parse(a(x).getItem(u(x)))}catch(w){y.A.log("W1022","State storing",w.message)}}_saveState(x){const w=this.option("stateStoring");if("custom"!==w.type)try{a(w).setItem(u(w),JSON.stringify(x))}catch(D){y.A.log(D.message)}else w.customSave&&w.customSave(x)}publicMethods(){return["state"]}isEnabled(){return this.option("stateStoring.enabled")}isLoaded(){return this._isLoaded}isLoading(){return this._isLoading}load(){this._isLoading=!0;const x=(0,W.Sx)(this._loadState());return x.always(()=>{this._isLoaded=!0,this._isLoading=!1}).done(w=>{null!==w&&!(0,f.RI)(w)&&this.state(w)}),x}state(x){const w=this;if(!arguments.length)return(0,o.X)(!0,{},w._state);w._state=(0,o.X)({},x),s(w._state)}save(){const x=this;clearTimeout(x._savingTimeoutID),x._savingTimeoutID=setTimeout(()=>{x._saveState(x.state()),x._savingTimeoutID=void 0},x.option("stateStoring.savingTimeout"))}}const g={StateStoringController:h}},4394:(In,Ze,M)=>{"use strict";M.d(Ze,{WY:()=>ot});var W=M(5704),o=M(36),P=M(4859),b=M(6021),f=M(3090),S=M(2660),T=M(1363),y=M(9495),d=M(1830),c=M(2946),s=M(4072),a=M(9209),u=M(8360),h=M(9012),g=M(2359),_=M(3949),x=M(9212),w=M(3777),D=M(8025),C=M(402),I=M(127),L=M(6253),N=M(3376),G=M(8736);const pe="__DX_INSERT_INDEX__",oe="row",ee="batch",he="cell",be=["popup","form"],fe=function(st){return(0,d.O9)(st)&&"cancel"!==st},xe=function(st,et){return void 0!==st||void 0===st&&et&&!et.isNewRow},ot={defaultOptions:()=>({editing:{texts:{validationCancelChanges:u.A.format("dxDataGrid-validationCancelChanges")}}}),controllers:{validating:class Te extends N.Ay.Controller{constructor(){super(...arguments),this._isValidationInProgress=!1,this._disableApplyValidationResults=!1}init(){this._editingController=this.getController("editing"),this._editorFactoryController=this.getController("editorFactory"),this._columnsController=this.getController("columns"),this.createAction("onRowValidating"),this._validationState||this.initValidationState()}initValidationState(){this._validationState=[],this._validationStateCache={}}_rowIsValidated(et){const Ke=this._getValidationData(et?.key);return!!Ke&&!!Ke.validated}_getValidationData(et,Ke){const Ye=(0,P.GP)(et),Pe=(0,d.Gv)(Ye);let Se;return Se=Pe?this._validationState.filter(Re=>(0,P.RL)(Re.key,et))[0]:this._validationStateCache[Ye],!Se&&Ke&&(Se={key:et,isValid:!0},this._validationState.push(Se),Pe||(this._validationStateCache[Ye]=Se)),Se}_getBrokenRules(et,Ke){let Ye;return Ye=Ke?Ke.brokenRules||Ke.brokenRule&&[Ke.brokenRule]:et.brokenRules||[],Ye}_rowValidating(et,Ke){const Ye=new b.cY,Pe=this._editingController.getChangeByKey(et?.key),Se=this._getBrokenRules(et,Ke),Fe={brokenRules:Se,isValid:Ke?Ke.isValid:et.isValid,key:Pe.key,newData:Pe.data,oldData:this._editingController._getOldData(Pe.key),promise:null,errorText:this.getHiddenValidatorsErrorText(Se)};return this.executeAction("onRowValidating",Fe),(0,b.z7)((0,b.Sx)(Fe.promise)).always(()=>{et.isValid=Fe.isValid,et.errorText=Fe.errorText,Ye.resolve(Fe)}),Ye.promise()}getHiddenValidatorsErrorText(et){const Ke=[];return(0,S.__)(et,(Ye,Pe)=>{const{column:Se}=Pe,Re=Se&&void 0!==Se.groupIndex&&!Se.showWhenGrouped,Fe=Se&&Se.visible;!Pe.validator.$element().parent().length&&(!Fe||Re)&&Ke.push(Pe.message)}),Ke.join(", ")}validate(et){let Ke=!0;const Ye=this._editingController,Pe=new b.cY,Se=[],Re=Ye.getEditMode();if(et=et||Re===oe,this._isValidationInProgress)return Pe.resolve(!1).promise();if(this._isValidationInProgress=!0,et){Ye.addDeferred(Pe);const Fe=Ye.getChanges();(0,S.__)(Fe,(Xe,tt)=>{let{type:vt,key:qe}=tt;if("remove"!==vt){const At=this._getValidationData(qe,!0),Tt=this.validateGroup(At);Se.push(Tt),Tt.done(qt=>{At.validated=!0,Ke=Ke&&qt.isValid})}})}else if(this._currentCellValidator){const Fe=this.validateGroup(this._currentCellValidator._findGroup());Se.push(Fe),Fe.done(Xe=>{Ke=Xe.isValid})}return(0,b.z7)(...Se).done(()=>{this._isValidationInProgress=!1,Pe.resolve(Ke)}),Pe.promise()}validateGroup(et){var Ke;const Ye=new b.cY,Pe=et&&w.A.getGroupConfig(et);let Se;return null!=Pe&&Pe.validators.length&&(this.resetRowValidationResults(et),Se=w.A.validateGroup(et)),(0,b.z7)((null===(Ke=Se)||void 0===Ke?void 0:Ke.complete)||Se).done(Re=>{(0,b.z7)(this._rowValidating(et,Re)).done(Ye.resolve)}),Ye.promise()}isRowDataModified(et){return!(0,d.RI)(et.data)}updateValidationState(et){const Ke=this._editingController.getEditMode(),{key:Ye}=et,Pe=this._getValidationData(Ye,!0);if(be.includes(Ke))Pe.isValid=!0;else{if("insert"===et.type&&!this.isRowDataModified(et))return void(Pe.isValid=!0);if(this.setDisableApplyValidationResults(!0),w.A.getGroupConfig(Pe)){const Re=w.A.validateGroup(Pe);(0,b.z7)(Re.complete||Re).done(Fe=>{Pe.isValid=Fe.isValid,Pe.brokenRules=Fe.brokenRules})}else(!Pe.brokenRules||!Pe.brokenRules.length)&&(Pe.isValid=!0);this.setDisableApplyValidationResults(!1)}}setValidator(et){this._currentCellValidator=et}renderCellPendingIndicator(et){let Ke=et.find(".dx-pending-indicator");if(!Ke.length){const Ye=et;Ke=(0,W.A)("<div>").appendTo(Ye).addClass("dx-pending-indicator"),this._createComponent(Ke,g.A),et.addClass("dx-validation-pending")}}disposeCellPendingIndicator(et){const Ke=et.find(".dx-pending-indicator");if(Ke.length){const Ye=g.A.getInstance(Ke);Ye&&(Ye.dispose(),Ye.$element().remove()),et.removeClass("dx-validation-pending")}}validationStatusChanged(et){const{validator:Ke}=et,Ye=Ke.option("validationGroup"),{column:Pe}=Ke.option("dataGetter")();this.updateCellValidationResult({rowKey:Ye.key,columnIndex:Pe.index,validationResult:et})}validatorInitialized(et){et.component.on("validating",this.validationStatusChanged.bind(this)),et.component.on("validated",this.validationStatusChanged.bind(this))}validatorDisposing(et){const Ke=et.component,Ye=Ke.option("validationGroup"),{column:Pe}=Ke.option("dataGetter")(),Se=this.getCellValidationResult({rowKey:Ye?.key,columnIndex:Pe.index});fe(Se)&&"pending"===Se.status&&this.cancelCellValidationResult({change:Ye,columnIndex:Pe.index})}applyValidationResult(et,Ke){const{validator:Ye}=Ke,Pe=Ye.option("validationGroup"),{column:Se}=Ye.option("dataGetter")();if(Ke.brokenRules&&Ke.brokenRules.forEach(Re=>{Re.columnIndex=Se.index,Re.column=Se}),et){const Re=this.getCellValidationResult({rowKey:Pe.key,columnIndex:Se.index}),Fe=fe(Re)&&Re.disabledPendingId===Ke.id;if(this._disableApplyValidationResults||Fe)return;if("invalid"===Ke.status){const tt=et.find(":focus");(0,C.in)(tt)||(s.A.trigger(tt,"focus"),s.A.trigger(tt,a.A.down))}const Xe=!Se.editCellTemplate&&this._editorFactoryController.getEditorInstance(et);"pending"===Ke.status?Xe?Xe.option("validationStatus","pending"):this.renderCellPendingIndicator(et):Xe?Xe.option("validationStatus","valid"):this.disposeCellPendingIndicator(et),et.toggleClass(this.addWidgetPrefix("invalid"),"invalid"===Ke.status)}}_syncInternalEditingData(et){var Ke;const Ye=this._editingController,Pe=Ye.getChangeByKey(et.key),Se=Ye._getOldData(et.key),Re=null===(Ke=et.row)||void 0===Ke?void 0:Ke.oldData;Pe&&Re&&!Se&&Ye._addInternalData({key:et.key,oldData:Re})}createValidator(et,Ke){const Ye=this._editingController,{column:Pe}=et;let{showEditorAlways:Se}=Pe;if((0,d.O9)(Pe.command)||!Pe.validationRules||!Array.isArray(Pe.validationRules)||!Pe.validationRules.length)return;let Fe=Ye.getIndexByKey(et.key,Ye.getChanges())>-1;if(!Fe){var Xe;Se||(Se=((null===(Xe=this._columnsController)||void 0===Xe?void 0:Xe.getVisibleColumns())||[]).some(Tt=>Tt.showEditorAlways));const vt=(0,P.RL)(this.option("editing.editRowKey"),et.key),qe=Ye.isCellOrBatchEditMode()&&Ye.allowUpdating({row:et.row});var tt;Fe=vt||qe&&Se,qe&&Se&&Ye._addInternalData({key:et.key,oldData:(null===(tt=et.row)||void 0===tt?void 0:tt.oldData)??et.data})}if(Fe){if(Ke&&!Ke.length)return void I.A.log("E1050");this._syncInternalEditingData(et);const vt=this._getValidationData(et.key,!0),qe=()=>{const qt=Ye.getChangeByKey(vt?.key),wt=Pe.calculateCellValue(qt?.data||{});return void 0!==wt?wt:et.value},At=Ke&&Ke.hasClass("dx-widget");Ke&&Ke.addClass(this.addWidgetPrefix("validator"));const Tt=new D.A(Ke||(0,W.A)("<div>"),{name:Pe.caption,validationRules:(0,f.X)(!0,[],Pe.validationRules),validationGroup:vt,adapter:At?null:{getValue:qe,applyValidationResults:qt=>{this.applyValidationResult(Ke,qt)}},dataGetter(){const qt=vt?.key,wt=Ye.getChangeByKey(qt),En=Ye._getOldData(qt);return{data:(0,c.lj)(En,wt?.data),column:Pe}},onInitialized:this.validatorInitialized.bind(this),onDisposing:this.validatorDisposing.bind(this)});if(At){const qt=Tt.option("adapter");if(qt){const wt=qt.bypass,En=()=>et.row.isNewRow&&!this._isValidationInProgress&&!Ye.isCellModified(et);qt.getValue=qe,qt.validationRequestsCallbacks=[],qt.bypass=()=>wt.call(qt)||En()}}return Tt}}setDisableApplyValidationResults(et){this._disableApplyValidationResults=et}getDisableApplyValidationResults(){return this._disableApplyValidationResults}isCurrentValidatorProcessing(et){let{rowKey:Ke,columnIndex:Ye}=et;return this._currentCellValidator&&(0,P.RL)(this._currentCellValidator.option("validationGroup").key,Ke)&&this._currentCellValidator.option("dataGetter")().column.index===Ye}validateCell(et){const Ke={rowKey:et.option("validationGroup").key,columnIndex:et.option("dataGetter")().column.index,validationResult:null};let Ye=this.getCellValidationResult(Ke);const Pe=fe(Ye),Se=et.option("adapter");if(Pe){const Fe=Se.getValue();(0,P.RL)(Fe,Ye.value)||(Ye=et.validate())}else Ye=et.validate();const Re=new b.cY;return Pe&&"pending"===Ye.status&&(this.updateCellValidationResult(Ke),Se.applyValidationResults(Ye)),(0,b.z7)(Ye.complete||Ye).done(Fe=>{Pe&&Se.applyValidationResults(Fe),Re.resolve(Fe)}),Re.promise()}updateCellValidationResult(et){let{rowKey:Ke,columnIndex:Ye,validationResult:Pe}=et;const Se=this._getValidationData(Ke);if(!Se)return;let Re;if(Se.validationResults||(Se.validationResults={}),Pe){if(Re=(0,f.X)({},Pe),Se.validationResults[Ye]=Re,"pending"===Pe.status&&(this._editingController.getEditMode()===he&&(Re.deferred=new b.cY,Re.complete.always(()=>{Re.deferred.resolve()}),this._editingController.addDeferred(Re.deferred)),this._disableApplyValidationResults))return void(Re.disabledPendingId=Pe.id)}else Re=Se.validationResults[Ye];Re&&Re.disabledPendingId&&delete Re.disabledPendingId}getCellValidationResult(et){var Ke;let{rowKey:Ye,columnIndex:Pe}=et;const Se=this._getValidationData(Ye,!0);return null==Se||null===(Ke=Se.validationResults)||void 0===Ke?void 0:Ke[Pe]}removeCellValidationResult(et){let{change:Ke,columnIndex:Ye}=et;const Pe=this._getValidationData(Ke?.key);Pe&&Pe.validationResults&&(this.cancelCellValidationResult({change:Ke,columnIndex:Ye}),delete Pe.validationResults[Ye])}cancelCellValidationResult(et){let{change:Ke,columnIndex:Ye}=et;const Pe=this._getValidationData(Ke.key);if(Ke&&Pe.validationResults){const Se=Pe.validationResults[Ye];Se&&(Se.deferred&&Se.deferred.reject("cancel"),Pe.validationResults[Ye]="cancel")}}resetRowValidationResults(et){et&&(et.validationResults&&delete et.validationResults,delete et.validated)}isInvalidCell(et){let{rowKey:Ke,columnIndex:Ye}=et;const Pe=this.getCellValidationResult({rowKey:Ke,columnIndex:Ye});return fe(Pe)&&"invalid"===Pe.status}getCellValidator(et){let{rowKey:Ke,columnIndex:Ye}=et;const Pe=this._getValidationData(Ke),Se=Pe&&w.A.getGroupConfig(Pe),Re=Se&&Se.validators;return Re&&Re.filter(Fe=>{const{column:Xe}=Fe.option("dataGetter")();return!!Xe&&Xe.index===Ye})[0]}setCellValidationStatus(et){const Ke=this.getCellValidationResult({rowKey:et.key,columnIndex:et.column.index});(0,d.O9)(Ke)?et.validationStatus="cancel"!==Ke?Ke.status:"cancel":delete et.validationStatus}}},extenders:{controllers:{editing:st=>class extends st{processDataItemTreeListHack(et){super.processDataItem.apply(this,arguments)}processItemsTreeListHack(et,Ke){return super.processItems.apply(this,arguments)}_addChange(et){const Ke=super._addChange.apply(this,arguments);return Ke&&"remove"!==et.type&&this._validatingController.updateValidationState(Ke),Ke}_handleChangesChange(et){super._handleChangesChange.apply(this,arguments),et.value.forEach(Ke=>{void 0===this._validatingController._getValidationData(Ke.key)&&this._validatingController.updateValidationState(Ke)})}_updateRowAndPageIndices(){const et=this,Ke=et.getView("rowsView").getTopVisibleItemIndex();let Ye=Ke;(0,S.__)(et.getChanges(),(Pe,Se)=>{let{key:Re,type:Fe}=Se;const Xe=this._validatingController._getValidationData(Re);Xe&&!Xe.isValid&&Xe.pageIndex!==et._pageIndex&&(Xe.pageIndex=et._pageIndex,Xe.rowIndex="insert"===Fe?Ke:Ye,Ye++)})}_getValidationGroupsInForm(et){return{validationGroup:this._validatingController._getValidationData(et.key,!0)}}_validateEditFormAfterUpdate(et,Ke){Ke&&this._editForm&&this._editForm.validate(),super._validateEditFormAfterUpdate.apply(this,arguments)}_prepareEditCell(et){const Ke=super._prepareEditCell.apply(this,arguments);return Ke&&et.column.showEditorAlways&&this._validatingController.updateValidationState({key:et.key}),Ke}processItems(et,Ke){const Ye=this.getChanges(),Pe=(Re,Fe)=>{let Xe=-1;const tt="insert"===Re.type,{key:vt}=Re;return(0,S.__)(Fe,(qe,At)=>{if((0,P.RL)(vt,tt?At.key:this._dataController.keyOf(At)))return Xe=qe,!1}),Xe},Se=(et=super.processItems(et,Ke)).length;return this.getEditMode()===ee&&"prepend"!==Ke&&"append"!==Ke&&Ye.forEach(Re=>{const{key:Fe}=Re,Xe=this._validatingController._getValidationData(Fe);Xe&&Re.type&&Xe.pageIndex===this._pageIndex&&Re?.pageIndex!==this._pageIndex&&function(tt,vt){const qe={key:tt.key};if(Pe(tt,et)>=0)return;vt.rowIndex=vt.rowIndex>Se?vt.rowIndex%Se:vt.rowIndex;const{rowIndex:Tt}=vt;qe[pe]=1,et.splice(Tt,0,qe)}(Re,Xe)}),et}processDataItem(et){const Ke=et.data[pe],Ye=Ke?et.data.key:et.key;if(this.getEditMode()===ee&&Ke&&Ye){const Se=this.getChanges(),Re=G.A.getIndexByKey(Ye,Se);if(Re>=0){const Fe=Se[Re];if("insert"!==Fe.type){const Xe=this._getOldData(Fe.key);et.data=(0,f.X)(!0,{},Xe,Fe.data),et.key=Ye}}}super.processDataItem.apply(this,arguments)}_createInvisibleColumnValidators(et){const Ke=this,Ye=this._columnsController.getColumns(),Pe=this._columnsController.getInvisibleColumns().filter(Xe=>!Xe.isBand),Se=this._columnsController.getGroupColumns().filter(Xe=>!Xe.showWhenGrouped&&-1===Pe.indexOf(Xe)),Re=[],Fe=(Xe,tt)=>this._dataController.getRowIndexByKey(tt)>=0&&Pe.indexOf(Xe)<0;return Pe.push(...Se),be.includes(this.getEditMode())||(0,S.__)(Ye,(Xe,tt)=>{et.forEach(vt=>{let qe;if(!Fe(tt,vt.key)){if("insert"===vt.type)qe=vt.data;else if("update"===vt.type){const At=Ke._getOldData(vt.key);if(!(0,d.O9)(At))return;qe=(0,c.lj)(At,vt.data)}if(qe){const At=this._validatingController.createValidator({column:tt,key:vt.key,value:tt.calculateCellValue(qe)});At&&Re.push(At)}}})}),function(){Re.forEach(Xe=>{Xe.dispose()})}}_beforeSaveEditData(et,Ke){let Ye=super._beforeSaveEditData.apply(this,arguments);const Pe=this._validatingController._getValidationData(et?.key);if(et)Ye=Ye||!("remove"===et.type||Pe.isValid);else{const Se=this._createInvisibleColumnValidators(this.getChanges());Ye=new b.cY,this.executeOperation(Ye,()=>{this._validatingController.validate(!0).done(Re=>{switch(Se(),this._updateRowAndPageIndices(),this.getEditMode()){case he:Re||this._focusEditingCell();break;case ee:Re||(this._resetEditRowKey(),this._resetEditColumnName(),this._dataController.updateItems())}Ye.resolve(!Re)})})}return Ye.promise?Ye.promise():Ye}_beforeEditCell(et,Ke,Ye){const Pe=super._beforeEditCell(et,Ke,Ye);if(this.getEditMode()===he){const Se=this._rowsView._getCellElement(et,Ke),Re=Se&&Se.data("dxValidator"),Fe=Se&&Se.closest(".dx-row").data("options"),Xe=Re&&Re.option("adapter").getValue();if(Re&&xe(Xe,Fe)){const tt=new b.cY;return(0,b.z7)(this._validatingController.validateCell(Re),Pe).done((vt,qe)=>{tt.resolve("valid"===vt.status&&qe)}),tt.promise()}if(!Re)return Pe}return!1}_afterSaveEditData(et){let Ke;const Ye=this.getEditMode()===he;if((0,S.__)(this.getChanges(),(Pe,Se)=>{const Re=this._showErrorRow(Se);Ke=Ke||Re}),Ke){const Pe=this._rowsView.getScrollable();Pe&&(Pe.update(),Pe.scrollToElement(Ke))}if(et&&Ye&&this._needUpdateRow()){const Pe=this.getEditRowIndex();this._dataController.updateItems({changeType:"update",rowIndices:[Pe]}),this._focusEditingCell()}else if(!et){let Pe=!0;Ye&&(Pe=!(this._columnsController.getColumns().filter(Fe=>{var Xe;return Fe.showEditorAlways&&(null===(Xe=Fe.validationRules)||void 0===Xe?void 0:Xe.length)>0}).length>0)),Pe&&this._validatingController.initValidationState()}}_handleDataChanged(et){const Ke=this._validatingController._validationState;"standard"===this.option("scrolling.mode")&&this.resetRowAndPageIndices(),"prepend"===et.changeType&&(0,S.__)(Ke,(Ye,Pe)=>{Pe.rowIndex+=et.items.length}),super._handleDataChanged(et)}resetRowAndPageIndices(){(0,S.__)(this._validatingController._validationState,(Ke,Ye)=>{Ye.pageIndex!==this._pageIndex&&(delete Ye.pageIndex,delete Ye.rowIndex)})}_beforeCancelEditData(){this._validatingController.initValidationState(),super._beforeCancelEditData()}_showErrorRow(et){let Ke;const Ye=this._dataController.items(),Pe=this.getIndexByKey(et.key,Ye),Se=this._validatingController._getValidationData(et.key);if((null==Se||!Se.isValid)&&null!=Se&&Se.errorText&&Pe>=0)return Ke=this.getPopupContent(),this._errorHandlingController&&this._errorHandlingController.renderErrorRow(Se?.errorText,Pe,Ke)}updateFieldValue(et){const Ke=new b.cY;return this._validatingController.removeCellValidationResult({change:this.getChangeByKey(et.key),columnIndex:et.column.index}),super.updateFieldValue.apply(this,arguments).done(()=>{const Ye=this._validatingController.getCellValidator({rowKey:et.key,columnIndex:et.column.index});(0,b.z7)(Ye&&this._validatingController.validateCell(Ye)).done(Pe=>{this._editorFactoryController.refocus(),Ke.resolve(Pe)})}),Ke.promise()}highlightDataCell(et,Ke){super.highlightDataCell.apply(this,arguments),this._validatingController.setCellValidationStatus(Ke);const Ye=!!Ke.setValue,Pe=this.isCellModified(Ke),Se=(0,d.O9)(Ke.validationStatus);if(Pe&&Ke.column.setCellValue||Ye&&!Pe&&!Ke.row.isNewRow&&Se){const Fe=et.data("dxValidator");Fe&&(0,b.z7)(this._validatingController.validateCell(Fe)).done(()=>{this._validatingController.setCellValidationStatus(Ke)})}}getChangeByKey(et){const Ke=this.getChanges();return Ke[G.A.getIndexByKey(et,Ke)]}isCellModified(et){const Ke=super.isCellModified(et),Ye=this.getChangeByKey(et.key),Pe=!!et.row&&this._validatingController.isInvalidCell({rowKey:et.key,columnIndex:et.column.index});return Ke||this._validatingController._rowIsValidated(Ye)&&Pe}},editorFactory:st=>class extends st{_showRevertButton(et){var Ke,Ye;let Pe=null===(Ke=this._revertTooltip)||void 0===Ke?void 0:Ke.$element();var Se;if(!et||!et.length)return null===(Se=Pe)||void 0===Se||Se.remove(),void(this._revertTooltip=void 0);if(et.find(Pe).length)return;const Re=et.closest(`.${this.addWidgetPrefix("content")}`).parent(),Fe=this.addWidgetPrefix("revert-tooltip");null===(Ye=Pe)||void 0===Ye||Ye.remove(),Pe=(0,W.A)("<div>").addClass(Fe).appendTo(et);const Xe={animation:null,visible:!0,width:"auto",height:"auto",shading:!1,container:Re,propagateOutsideClick:!0,hideOnOutsideClick:!1,wrapperAttr:{class:Fe},contentTemplate:()=>{const tt=(0,W.A)("<div>").addClass("dx-revert-button"),vt={icon:"revert",hint:this.option("editing.texts.validationCancelChanges"),elementAttr:{id:"dxRevertButton","aria-label":u.A.format("dxDataGrid-ariaRevertButton")},onClick:()=>{this._editingController.cancelEditData()}};return new h.A(tt,vt).$element()},position:{my:"left top",at:"right top",offset:"1 0",collision:"flip",boundaryOffset:"0 0",boundary:this._rowsView.element(),of:et},onPositioned:this._positionedHandler.bind(this)};this._revertTooltip=new _.A(Pe,Xe)}_hideFixedGroupCell(et,Ke){let Ye,Pe;const Se=this._rowsView.isFixedColumns(),Re=this._editingController.isFormOrPopupEditMode();if(Se&&!Re){const Fe=et.closest(".dx-row").next().data("options");Fe&&"group"===Fe.rowType&&(Ye=(0,W.A)(this._rowsView.getRowElement(Fe.rowIndex)).last(),Pe=Ye.find(".dx-group-cell"),Pe.length&&"hidden"!==Pe.get(0).style.visibility&&(Pe.css("visibility","hidden"),Ke.onDisposing=function(){Pe.css("visibility","")}))}}_positionedHandler(et,Ke){if(!et.component.__skipPositionProcessing){const Ye=(0,W.A)(et.element).hasClass(this.addWidgetPrefix("revert-tooltip")),Pe=!Ye&&this._rowsView.updateFreeSpaceRowHeight(),Se=this._normalizeValidationMessagePositionAndMaxWidth(et,Ye,Ke);et.component.__skipPositionProcessing=!(!Pe&&!Se),Se?et.component.option(Se):Pe&&et.component.repaint()}}_showValidationMessage(et,Ke,Ye){var Pe;const Se=et.find(".dx-dropdowneditor-overlay").data("dxPopup"),Re=Se&&Se.option("visible"),Fe=Re?"top right":`top ${Ye}`,Xe=Re?"top left":`bottom ${Ye}`,vt=(null===(Pe=this._columnsController.getFixedColumns())||void 0===Pe?void 0:Pe.length)>0?this.getView("rowsView").element():et.closest(`.${this.addWidgetPrefix("content")}`);let qe="";Ke&&Ke.forEach(wt=>{qe+=(qe.length?"<br/>":"")+(0,y.o4)(wt)});const At=this.addWidgetPrefix("invalid-message");this._rowsView.element().find(`.${At}`).remove();const Tt=(0,W.A)("<div>").addClass("dx-invalid-message").addClass("dx-invalid-message-always").addClass(At).html(qe).appendTo(et),qt={container:vt,shading:!1,width:"auto",height:"auto",visible:!0,animation:!1,propagateOutsideClick:!0,hideOnOutsideClick:!1,wrapperAttr:{id:"dxInvalidMessage",class:`dx-invalid-message dx-invalid-message-always ${At}`},position:{collision:"flip",boundary:this._rowsView.element(),boundaryOffset:"0 0",offset:{x:0,y:!Re&&o.A.mozilla?-1:0},my:Fe,at:Xe,of:et},onPositioned:wt=>{this._positionedHandler(wt,Re),this._shiftValidationMessageIfNeed(wt.component.$content(),et)}};this._hideFixedGroupCell(et,qt),new _.A(Tt,qt)}_hideValidationMessage(){var et;const Ke=null===(et=this._rowsView.element())||void 0===et?void 0:et.find(this._getValidationMessagesSelector());Ke?.remove()}_normalizeValidationMessagePositionAndMaxWidth(et,Ke,Ye){const Pe=this._columnsController.getFixedColumns();if(!Pe||!Pe.length)return;let Se;const Re=!Ke&&function(st,et){const Ke=(0,W.A)(et).closest("tr").index(),Ye=(0,W.A)(st._rowsView.getRowElement(Ke)).first().children().filter(":not(.dx-hidden-cell)");return st._rowsView._getWidths(Ye).reduce((Pe,Se)=>Pe+Se,0)}(this,et.element),Fe=et.component.$content(),Xe=(0,T.Ot)(Fe,!0),tt=!Ke&&Xe>Re,vt=this._rowsView.getCellIndex((0,W.A)(et.element).closest("td")),qe=function(st){let et,Ke;return st.some((Ye,Pe)=>{if("transparent"===Ye.command)return et=0===Pe?-1:Pe,Ke=Pe===st.length-1?-1:Pe+Ye.colspan-1,!0}),{startColumnIndex:et,endColumnIndex:Ke}}(Pe);return Ke||vt!==qe.startColumnIndex&&!tt?vt===qe.endColumnIndex&&(Se={collision:"none flip",my:"top right",at:Ke||Ye?"top left":"bottom right"},Ke&&(Se.offset="-1 0")):Se={collision:"none flip",my:"top left",at:Ye?"top right":"bottom left"},Se&&{position:Se,maxWidth:tt?Re-2:void 0}}_shiftValidationMessageIfNeed(et,Ke){const Ye=this._revertTooltip&&this._revertTooltip.$content();if(!Ye)return;const Pe=et.offset(),Se=Ye.offset();if(Pe.top===Se.top&&Pe.left+(0,T.RG)(et)>Se.left){const Re=(0,T.RG)(Ye)+2;et.css("left",Se.left<Ke.offset().left?-Re:Re)}}_getRevertTooltipsSelector(){return`.dx-editor-cell .${this.addWidgetPrefix("revert-tooltip")}`}_getValidationMessagesSelector(){const et=this.addWidgetPrefix("invalid-message");return`.dx-editor-cell .${et}, .dx-cell-modified .${et}`}loseFocus(et){et||this._validatingController.setValidator(null),super.loseFocus()}updateCellState(et,Ke,Ye){var Pe;const Se=et?.closest(this._getFocusCellSelector()),Re=null!=Se&&Se.is("td")?Se:null,Fe=Se?.closest(".dx-row").data("options"),Xe=Fe?this._editingController.getChangeByKey(Fe.key):null,tt=Re&&this._columnsController.getVisibleColumns()[Re.index()],vt=void 0!==(null==Xe||null===(Pe=Xe.data)||void 0===Pe?void 0:Pe[tt?.name])&&!this._editingController.isSaving(),qe=[];if(this._editingController.getEditMode()===he&&("invalid"===Ke?.status||vt?(this._showRevertButton(Se),qe.push("dxRevertButton")):this._revertTooltip&&this._revertTooltip.$element().remove()),Ke&&"invalid"===Ke.status&&Re&&tt&&Ke&&Ke.brokenRules){const Tt=[];Ke.brokenRules.forEach(qt=>{qt.message&&Tt.push(qt.message)}),Tt.length&&(this._showValidationMessage(Se,Tt,tt.alignment||"left"),qe.push("dxInvalidMessage"))}this._updateAriaValidationAttributes(Se,qe),!Ye&&this._rowsView.element()&&this._rowsView.updateFreeSpaceRowHeight()}_updateAriaValidationAttributes(et,Ke){if(0===Ke.length)return;const Ye=this._editingController.getEditMode();if([he,ee,oe].includes(Ye)){const Se=this._getCurrentFocusElement(et);Se.attr("aria-labelledby",Ke.join(" ")),Se.attr("aria-invalid",!0)}}_getCurrentFocusElement(et){return this._editingController.isEditing()?et.find(L.CN).first():et}focus(et,Ke){if(!arguments.length)return super.focus();if(this._hideValidationMessage(),null!=et&&et.hasClass("dx-row")||null!=et&&et.hasClass("dx-master-detail-cell"))return super.focus(et,Ke);const Ye=et?.closest(this._getFocusCellSelector()),Pe=Ye&&(Ye.data("dxValidator")||et.find(`.${this.addWidgetPrefix("validator")}`).eq(0).data("dxValidator")),Se=Ye&&Ye.closest(".dx-row").data("options"),Re=Se?this._editingController.getChangeByKey(Se.key):null;let Fe;if(Pe){this._validatingController.setValidator(Pe);const Xe=Pe.option("adapter").getValue();if(xe(Xe,Se)||this._validatingController._rowIsValidated(Re))return this._editingController.waitForDeferredOperations().done(()=>{this._rowsView.isElementInside(et)&&(0,b.z7)(this._validatingController.validateCell(Pe)).done(vt=>{Fe=vt;const{column:qe}=Fe.validator.option("dataGetter")();Re&&qe&&!this._validatingController.isCurrentValidatorProcessing({rowKey:Re.key,columnIndex:qe.index})||(!(0,x.Ft)((0,x.ss)())&&"invalid"===Fe.status&&(Ke=!0),this.updateCellState(et,Fe,Ke),super.focus.call(this,et,Ke))})}),super.focus(et,Ke)}return this.updateCellState(et,Fe,Ke),super.focus(et,Ke)}getEditorInstance(et){const Ke=et.find(".dx-texteditor").eq(0);return G.A.getWidgetInstance(Ke)}},data:st=>class extends st{_getValidationStatus(et){return(fe(et)?et.status:et)||"valid"}_isCellChanged(et,Ke,Ye,Pe,Se){var Re,Fe;const Xe=null===(Re=et.cells)||void 0===Re?void 0:Re[Pe],tt=this._getValidationStatus({status:Xe?.validationStatus}),vt=this._validatingController.getCellValidationResult({rowKey:et.key,columnIndex:Pe}),qe=this._validatingController._getValidationData(et.key),At=this._getValidationStatus(vt),Tt=JSON.stringify(Ke.modifiedValues)!==JSON.stringify(et.modifiedValues),qt=tt!==At&&Tt,wt=(0,W.A)(Xe?.cellElement).hasClass(this.addWidgetPrefix("invalid")),En=null==Xe||null===(Fe=Xe.column.validationRules)||void 0===Fe?void 0:Fe.length;return!!(et.isEditing!==Ke.isEditing&&En||qt||qe.isValid&&wt)||super._isCellChanged.apply(this,arguments)}}},views:{rowsView:st=>class extends st{updateFreeSpaceRowHeight(et){let Ye,Pe,Se;const Re=this.element(),Fe=Re&&Re.find(`.${this.addWidgetPrefix("invalid-message")} .dx-overlay-content`);if(super.updateFreeSpaceRowHeight(et),Fe&&Fe.length&&(Ye=this._getRowElements(),Se=this._getFreeSpaceRowElements(et),Pe=Se.first(),Pe&&1===Ye.length&&(!Pe.is(":visible")||(0,T.P$)(Fe)>(0,T.P$)(Pe))))return Se.show(),(0,T.k$)(Se,(0,T.P$)(Fe)),!0}_formItemPrepared(et,Ke){super._formItemPrepared.apply(this,arguments),(0,P.OX)(()=>{const Ye=Ke.find(".dx-widget").first();Ye.length&&!Ye.children().length||this._validatingController.createValidator(et,Ye)})}_cellPrepared(et,Ke){this._editingController.isFormOrPopupEditMode()||this._validatingController.createValidator(Ke,et),super._cellPrepared.apply(this,arguments)}_restoreErrorRow(et){this._editingController&&this._editingController.hasChanges()&&this._getRowElements(et).each((Ke,Ye)=>{const Pe=(0,W.A)(Ye).data("options");if(Pe){const Se=this._editingController.getChangeByKey(Pe.key);Se&&this._editingController._showErrorRow(Se)}})}}}}}},9339:(In,Ze,M)=>{"use strict";M.d(Ze,{W:()=>Ce,n:()=>ye});var W=M(6054),o=M(9522),P=M(5397),b=M(2925),f=M(5704),S=M(36),T=M(4859),y=M(6021),d=M(3090),c=M(2660),s=M(4757),a=M(1363),u=M(8649),h=M(7007),g=M(1830),_=M(6110),x=M(778),w=M(4072),D=M(1395),C=M(9209),I=M(1110),L=M(4316),N=M(3376),G=M(8736);const Q="dx-master-detail-row",ae="dxCellHintVisible",he={render(ge){ge.container.append(ge.content)}},ue=function(ge){return"auto"===ge?"":(0,g.kf)(ge)?`${ge}px`:ge},be=function(ge,fe,xe){ge.style.width=ge.style.maxWidth="auto"===fe.width?"":xe},le=function(ge){ge.resolve()},Ce=ge=>"number"==typeof ge?`${ge.toFixed(3)}px`:"adaptiveHidden"===ge?"0.0001px":ge;class ye extends((0,L.$)(N.Ay.View)){init(){this._scrollLeft=-1,this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._columnChooserController=this.getController("columnChooser"),this._editorFactoryController=this.getController("editorFactory"),this._selectionController=this.getController("selection"),this._columnChooserView=this.getView("columnChooserView"),this._delayedTemplates=[],this._templateDeferreds=new Set,this._templatesCache={},this._templateTimeouts=new Set,this.createAction("onCellClick"),this.createAction("onRowClick"),this.createAction("onCellDblClick"),this.createAction("onRowDblClick"),this.createAction("onCellHoverChanged",{excludeValidators:["disabled","readOnly"]}),this.createAction("onCellPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onRowPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering",afterExecute:fe=>{this._afterRowPrepared(fe)}}),this._columnsController.columnsChanged.add(this._columnOptionChanged.bind(this)),this._dataController&&this._dataController.changed.add(this._handleDataChanged.bind(this))}dispose(){if((0,_.Vd)()){var fe,xe;const Te=(0,_.zk)();null===(fe=this._templateTimeouts)||void 0===fe||fe.forEach(Ee=>Te.clearTimeout(Ee)),null===(xe=this._templateTimeouts)||void 0===xe||xe.clear()}}optionChanged(fe){switch(super.optionChanged(fe),fe.name){case"cellHintEnabled":case"onCellPrepared":case"onRowPrepared":case"onCellHoverChanged":this._invalidate(!0,!0),fe.handled=!0;break;case"keyboardNavigation":"keyboardNavigation.enabled"===fe.fullName&&this._invalidate(!0,!0),fe.handled=!0}}_createScrollableOptions(){const fe=this.option("scrolling");let xe=this.option("scrolling.useNative");const Te=(0,d.X)({},fe,{direction:"both",bounceEnabled:!1,useKeyboard:!1});return void 0===xe&&(xe=!0),"auto"===xe?(delete Te.useNative,delete Te.useSimulatedScrollbar):(Te.useNative=!!xe,Te.useSimulatedScrollbar=!xe),Te}_updateCell(fe,xe){xe.rowType&&this._cellPrepared(fe,xe)}_needToSetCellWidths(){return this.option("columnAutoWidth")}_createCell(fe){const{column:xe}=fe,Te=xe.alignment||(0,s.n)(this.option("rtlEnabled")),Ee=this._needToSetCellWidths(),Oe=W.A.createElement("td");Oe.style.textAlign=Te;const ze=(0,f.A)(Oe);return"data"===fe.rowType&&xe.headerId&&!xe.type&&this.component.option("showColumnHeaders")&&this.setAria("describedby",xe.headerId,ze),xe.cssClass&&ze.addClass(xe.cssClass),Array.isArray(xe.elementAttr)&&xe.elementAttr.forEach($e=>{let{name:Be,value:Ue}=$e;ze.attr(Be,Ue)}),"expand"===xe.command&&(ze.addClass(xe.cssClass),ze.addClass(this.addWidgetPrefix("group-space"))),xe.colspan>1?ze.attr("colSpan",xe.colspan):!xe.isBand&&"auto"!==xe.visibleWidth&&Ee&&((xe.width||xe.minWidth)&&(Oe.style.minWidth=ue(xe.minWidth||xe.width)),xe.width&&be(Oe,xe,ue(xe.width))),ze}_createRow(fe,xe){const Te=(0,f.A)(`<${xe=xe||"tr"}>`).addClass("dx-row");return"tr"===xe&&this.setAria("role","row",Te),Te}_isAltRow(fe){return fe&&fe.dataIndex%2==1}_createTable(fe,xe){const Te=(0,f.A)("<table>").addClass(this.addWidgetPrefix("table")).addClass(this.addWidgetPrefix("table-fixed"));if(fe&&!xe?(Te.attr("id",`dx-${new b.A}`).append(this._createColGroup(fe)),S.A.safari&&Te.append((0,f.A)("<thead>").append("<tr>")),this.setAria("role","presentation",Te)):this.setAria("hidden",!0,Te),this.setAria("role","presentation",(0,f.A)("<tbody>").appendTo(Te)),xe)return Te;S.A.mozilla&&w.A.on(Te,"mousedown","td",Oe=>{Oe.ctrlKey&&Oe.preventDefault()}),this.option("cellHintEnabled")&&w.A.on(Te,"mousemove",".dx-row > td",this.createAction(Oe=>{const ze=Oe.event,$e=(0,f.A)(ze.target),Be=(0,f.A)(ze.currentTarget),Ue=Be.parent(),ot=this._columnsController.getVisibleColumns(),st=Ue.data("options"),et=Be.index(),Ke=st&&st.cells&&st.cells[et],Ye=Ke?Ke.column:ot[et],Pe=Ue.hasClass("dx-header-row"),Se=Ue.hasClass("dx-data-row"),Re=Ue.hasClass(Q),Fe=Ue.hasClass("dx-group-row"),Xe=Ue.hasClass(this.addWidgetPrefix("filter-row")),tt=Se&&(!Ye||Ye.cellTemplate);!Re&&!Xe&&!(Se&&Ke&&(st.isEditing||Ke.isEditing||Ye?.showEditorAlways))&&!tt&&(!Pe||Ye&&!Ye.headerCellTemplate)&&(!Fe||!(!Ye||Ye.groupIndex&&Ye.groupCellTemplate))&&($e.data(ae)&&($e.removeAttr("title"),$e.data(ae,!1)),$e[0].scrollWidth-$e[0].clientWidth>0&&!(0,g.O9)($e.attr("title"))&&($e.attr("title",$e.text()),$e.data(ae,!0)))}));const Ee=Oe=>{const ze=(0,f.A)(Oe.currentTarget),$e=(0,f.A)(Oe.target).closest(".dx-field-item-content"),Be=ze.parent(),Ue=Be.data("options"),ot=Ue&&Ue.cells&&Ue.cells[ze.index()];if(!ze.closest("table").is(Oe.delegateTarget))return;const st=(0,d.X)({},ot,{cellElement:(0,o.cc)(ze),event:Oe,eventType:Oe.type});if(st.rowIndex=this.getRowIndex(Be),$e.length){const et=$e.data("dx-form-item");et.column&&(st.column=et.column,st.columnIndex=this._columnsController.getVisibleIndex(st.column.index))}return st};return w.A.on(Te,"mouseover",".dx-row > td",Oe=>{const ze=Ee(Oe);ze&&this.executeAction("onCellHoverChanged",ze)}),w.A.on(Te,"mouseout",".dx-row > td",Oe=>{const ze=Ee(Oe);ze&&this.executeAction("onCellHoverChanged",ze)}),w.A.on(Te,x.U,".dx-row > td",Oe=>{const ze=Ee(Oe);ze&&this.executeAction("onCellClick",ze)}),w.A.on(Te,D.U,".dx-row > td",Oe=>{const ze=Ee(Oe);ze&&this.executeAction("onCellDblClick",ze)}),function(ge,fe){let xe,Te,Ee;function Oe(ze){return setTimeout(()=>{xe=Te=null},ze)}w.A.on(fe,"touchstart touchend",".dx-row",ze=>{clearTimeout(Ee),"touchstart"===ze.type?(xe=ze.target,Te=ze.currentTarget,Ee=Oe(1e3)):Ee=Oe()}),w.A.on(fe,[x.U,D.U,C.A.down].join(" "),".dx-row",ge.createAction(ze=>{const{event:$e}=ze;xe&&($e.target=xe,$e.currentTarget=Te),(0,f.A)($e.target).closest("a").length||(ze.rowIndex=ge.getRowIndex($e.currentTarget),ze.rowIndex>=0&&(ze.rowElement=(0,o.cc)((0,f.A)($e.currentTarget)),ze.columns=ge.getColumns(),$e.type===C.A.down?ge._rowPointerDown(ze):$e.type===x.U?ge._rowClick(ze):ge._rowDblClick(ze)))}))}(this,Te),Te}_rowPointerDown(fe){}_rowClick(){}_rowDblClick(){}_createColGroup(fe){const xe=(0,f.A)("<colgroup>");for(let Te=0;Te<fe.length;Te++){const Ee=fe[Te].colspan||1;for(let Oe=0;Oe<Ee;Oe++)xe.append(this._createCol(fe[Te]))}return xe}_createCol(fe){let xe=fe.visibleWidth||fe.width;"adaptiveHidden"===xe&&(xe="0.0001px");const Te=(0,f.A)("<col>");return(0,u.zj)(Te,xe),Te}renderDelayedTemplates(fe){const xe=this._delayedTemplates,Te=xe.filter(Oe=>!Oe.async),Ee=xe.filter(Oe=>Oe.async);this._delayedTemplates=[],this._renderDelayedTemplatesCore(Te,!1,fe),this._renderDelayedTemplatesCoreAsync(Ee)}_renderDelayedTemplatesCoreAsync(fe){if(fe.length){const xe=(0,_.zk)().setTimeout(()=>{this._templateTimeouts.delete(xe),this._renderDelayedTemplatesCore(fe,!0)});this._templateTimeouts.add(xe)}}_renderDelayedTemplatesCore(fe,xe,Te){const Ee=new Date;for(;fe.length;){const Oe=fe.shift(),{options:ze}=Oe,$e=W.A.getRootNode((0,f.A)(ze.container).get(0)),Be=this.needWaitAsyncTemplates();if((!xe||(0,f.A)(ze.container).closest($e).length||Be)&&(Te&&(ze.change=Te),Oe.template.render(ze)),xe&&new Date-Ee>30){this._renderDelayedTemplatesCoreAsync(fe);break}}!fe.length&&this._delayedTemplates.length&&this.renderDelayedTemplates()}_processTemplate(fe,xe){const Te=this;let Ee;if(fe&&fe.render&&!(0,g.Kb)(fe))Ee={allowRenderToDetachedContainer:fe.allowRenderToDetachedContainer,render(Oe){fe.render(Oe.container,Oe.model,Oe.change),Oe.deferred&&Oe.deferred.resolve()}};else if((0,g.Tn)(fe))Ee={render(Oe){const ze=fe((0,o.cc)(Oe.container),Oe.model,Oe.change);ze&&(ze.nodeType||(0,g.Kb)(ze))&&Oe.container.append(ze),Oe.deferred&&Oe.deferred.resolve()}};else{const Oe=(0,g.Kg)(fe)?fe:(0,f.A)(fe).attr("id");Oe?(Te._templatesCache[Oe]||(Te._templatesCache[Oe]=Te.getTemplate(fe)),Ee=Te._templatesCache[Oe]):Ee=Te.getTemplate(fe)}return Ee}renderTemplate(fe,xe,Te,Ee,Oe){const ze=this._processTemplate(xe,Te),{column:$e}=Te,Be="data"===Te.rowType,Ue=new y.cY,ot={container:fe,model:Te,deferred:Ue,onRendered:()=>{this.isDisposed()?Ue.reject():Ue.resolve()}};if(ze){Te.component=this.component;const st=$e&&($e.renderAsync&&Be||this.option("renderAsync")&&(!1!==$e.renderAsync&&($e.command||$e.showEditorAlways)&&Be||"filter"===Te.rowType)),et=Te.renderAsync??st;!ze.allowRenderToDetachedContainer&&!Ee||et?this._delayedTemplates.push({template:ze,options:ot,async:et}):ze.render(ot),this._templateDeferreds.add(Ue),w.A.on(fe,I.N,le.bind(null,Ue))}else Ue.reject();return Ue.promise().always(()=>{this._templateDeferreds.delete(Ue)})}_getBodies(fe){return(0,f.A)(fe).children("tbody").not(".dx-header").not(".dx-footer")}_needWrapRow(fe){var xe;return!!this.option().rowTemplate&&!(null===(xe=this._getBodies(fe))||void 0===xe||!xe.filter(".dx-row").length)}_wrapRowIfNeed(fe,xe,Te){if(this._needWrapRow(Te?fe||this._tableElement:this._tableElement||fe)){const ze=(0,f.A)("<tbody>").addClass(xe.attr("class"));return this.setAria("role","presentation",ze),ze.append(xe)}return xe}_appendRow(fe,xe,Te){(Te=Te||he).render({content:xe,container:fe})}_resizeCore(){const fe=this._scrollLeft;fe>=0&&(this._scrollLeft=0,this.scrollTo({left:fe}))}_renderCore(fe){const xe=this.element().parent();(!xe||xe.parent().length)&&this.renderDelayedTemplates(fe)}_renderTable(fe){(fe=fe||{}).columns=this._columnsController.getVisibleColumns();const xe=fe.change&&fe.change.changeType,Te=this._createTable(fe.columns,"append"===xe||"prepend"===xe||"update"===xe);return this._renderRows(Te,fe),Te}_renderRows(fe,xe){const Te=this,Ee=Te._getRows(xe.change),Oe=xe.change&&xe.change.columnIndices||[],ze=xe.change&&xe.change.changeTypes||[];for(let $e=0;$e<Ee.length;$e++)Te._renderRow(fe,(0,d.X)({row:Ee[$e],columnIndices:Oe[$e],changeType:ze[$e]},xe))}_renderRow(fe,xe){xe.columnIndices||(xe.row.cells=[]);const Te=this._createRow(xe.row),Ee=this._wrapRowIfNeed(fe,Te);"remove"!==xe.changeType&&this._renderCells(Te,xe),this._appendRow(fe,Ee);const Oe=(0,d.X)({columns:xe.columns},xe.row);this._addWatchMethod(Oe,xe.row),this._rowPrepared(Ee,Oe,xe.row)}_needRenderCell(fe,xe){return!xe||xe.indexOf(fe)>=0}_renderCells(fe,xe){const Te=this;let Ee=0;const{row:Oe}=xe,{columns:ze}=xe;for(let $e=0;$e<ze.length;$e++)this._needRenderCell($e,xe.columnIndices)&&Te._renderCell(fe,(0,d.X)({column:ze[$e],columnIndex:Ee,value:Oe.values&&Oe.values[Ee],oldValue:Oe.oldValues&&Oe.oldValues[Ee]},xe)),ze[$e].colspan>1?Ee+=ze[$e].colspan:Ee++}_updateCells(fe,xe,Te){const Ee=fe.children(),Oe=xe.children(),ze=this.option("highlightChanges"),$e=this.addWidgetPrefix("cell-updated-animation");Te.forEach((Be,Ue)=>{const ot=Ee.eq(Be),st=Oe.eq(Ue);ot.replaceWith(st),ze&&!st.hasClass("dx-command-expand")&&st.addClass($e)}),function(ge,fe){if(!ge||!fe)return;const xe=ge.attributes,Te=fe.attributes;let Ee;for(Ee=0;Ee<xe.length;Ee++){const Oe=xe[Ee].nodeName;fe.hasAttribute(Oe)||ge.removeAttribute(Oe)}for(Ee=0;Ee<Te.length;Ee++)ge.setAttribute(Te[Ee].nodeName,Te[Ee].nodeValue)}(fe.get(0),xe.get(0))}_setCellAriaAttributes(fe,xe){if("freeSpace"!==xe.rowType){this.setAria("role","gridcell",fe);const Te=this._columnsController.getColumnIndexOffset();this.setAria("colindex",xe.columnIndex+Te+1,fe)}}_renderCell(fe,xe){const Te=this._getCellOptions(xe);if(xe.columnIndices){if(xe.row.cells){const Oe=xe.row.cells.findIndex(ze=>ze.columnIndex===Te.columnIndex);xe.row.cells[Oe]=Te}}else xe.row.cells.push(Te);const Ee=this._createCell(Te);return this._setCellAriaAttributes(Ee,Te),this._renderCellContent(Ee,Te,xe),fe.get(0).appendChild(Ee.get(0)),Ee}_renderCellContent(fe,xe,Te){const Ee=this._getCellTemplate(xe);(0,y.z7)(!Ee||this.renderTemplate(fe,Ee,xe,void 0,Te.change)).done(()=>{this._updateCell(fe,xe)})}_getCellTemplate(fe){}_getRows(fe){return[]}_getCellOptions(fe){const xe={column:fe.column,columnIndex:fe.columnIndex,rowType:fe.row.rowType,isAltRow:this._isAltRow(fe.row)};return this._addWatchMethod(xe),xe}_addWatchMethod(fe,xe){if(!this.option("repaintChangesOnly"))return;const Te=[];return(xe=xe||fe).watch=xe.watch||function(Ee,Oe,ze){let $e=Ee(xe.data);const Be=function(Ue){Ue&&ze&&ze(Ue);const ot=Ee(xe.data);JSON.stringify($e)!==JSON.stringify(ot)&&(Ue&&Oe(ot),$e=ot)};return Te.push(Be),function(){const Ue=Te.indexOf(Be);Ue>=0&&Te.splice(Ue,1)}},xe.update=xe.update||function(Ee,Oe){Ee&&(this.data=fe.data=Ee.data,this.rowIndex=fe.rowIndex=Ee.rowIndex,this.dataIndex=fe.dataIndex=Ee.dataIndex,this.isExpanded=fe.isExpanded=Ee.isExpanded,fe.row&&!Oe&&(fe.row=Ee)),Te.forEach(ze=>{ze(Ee)})},xe!==fe&&(fe.watch=xe.watch.bind(xe)),fe}_cellPrepared(fe,xe){xe.cellElement=(0,o.cc)((0,f.A)(fe)),this.executeAction("onCellPrepared",xe)}_rowPrepared(fe,xe,Te){(0,P.p)(fe.get(0),"options",xe),xe.rowElement=(0,o.cc)(fe),this.executeAction("onRowPrepared",xe)}_columnOptionChanged(fe){const{optionNames:xe}=fe;if(G.A.checkChanges(xe,["width","visibleWidth"])){const Ee=this._columnsController.getVisibleColumns().map(Oe=>Oe.visibleWidth||Oe.width);this.setColumnWidths({widths:Ee,optionNames:xe})}else this._requireReady||this.render()}getCellIndex(fe,xe){return fe.length?fe[0].cellIndex:-1}getTableElements(){return this._tableElement||(0,f.A)()}getTableElement(fe){return this._tableElement}setTableElement(fe,xe){this._tableElement=fe}_afterRowPrepared(fe){}_handleDataChanged(fe){}callbackNames(){return["scrollChanged"]}_updateScrollLeftPosition(){const fe=this._scrollLeft;fe>=0&&(this._scrollLeft=0,this.scrollTo({left:fe}))}scrollTo(fe){const xe=this.element(),Te=xe&&xe.children(`.${this.addWidgetPrefix("scroll-container")}`).not(`.${this.addWidgetPrefix("content-fixed")}`);(0,g.O9)(fe)&&(0,g.O9)(fe.left)&&this._scrollLeft!==fe.left&&(this._scrollLeft=fe.left,Te&&Te.scrollLeft(fe.left))}_getContent(fe){var xe;return null===(xe=this._tableElement)||void 0===xe?void 0:xe.parent()}_removeContent(fe){const xe=this._getContent(fe);null!=xe&&xe.length&&xe.remove()}_wrapTableInScrollContainer(fe,xe){const Te=(0,f.A)("<div>"),Ee=this.option("scrolling.useNative");return(!1===Ee||"auto"===Ee&&!h.nativeScrolling)&&Te.addClass(this.addWidgetPrefix("scrollable-simulated")),w.A.on(Te,"scroll",()=>{const Oe=Te.scrollLeft();Oe!==this._scrollLeft&&this.scrollChanged.fire({left:Oe},this.name)}),Te.addClass(this.addWidgetPrefix("content")).addClass(this.addWidgetPrefix("scroll-container")).append(fe).appendTo(this.element()),this.setAria("role","presentation",Te),Te}needWaitAsyncTemplates(){return this.option("templatesRenderAsynchronously")&&!1===this.option("renderAsync")}waitAsyncTemplates(){let fe=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const xe=new y.cY;if(!fe&&!this.needWaitAsyncTemplates())return xe.resolve();const Ee=()=>y.z7.apply(this,Array.from(this._templateDeferreds)).done(()=>{this.isDisposed()?xe.reject():this._templateDeferreds.size>0?Ee():xe.resolve()}).fail(xe.reject);return Ee(),xe.promise()}_updateContent(fe,xe,Te){return this.waitAsyncTemplates().done(()=>{this._removeContent(Te),this.setTableElement(fe,Te),this._wrapTableInScrollContainer(fe,Te)})}_findContentElement(fe){}_getWidths(fe){if(!fe)return[];const xe=[];return fe.toArray().forEach(Ee=>{let Oe=Ee.offsetWidth;if(Ee.getBoundingClientRect){const ze=(0,s.N)(Ee);ze.width>Ee.offsetWidth-1&&(Oe=ze.width)}xe.push(Oe)}),xe}getColumnWidths(fe){if((this.option("forceApplyBindings")||T.lQ)(),fe=fe??this.getTableElement()){const xe=fe.children("tbody:not(.dx-header)").children();for(let Te=0;Te<xe.length;Te++){const Ee=xe.eq(Te),Oe=Ee.hasClass("dx-group-row"),ze=Ee.hasClass(Q),$e=Ee.hasClass("dx-error-row");if(!("none"===Ee.get(0).style.display||Ee.hasClass("dx-state-invisible")||Oe||ze||$e)){const ot=Ee.children("td");return this._getWidths(ot)}}}return[]}getVisibleColumnIndex(fe,xe){return fe}setColumnWidths(fe){let{widths:xe}=fe;const Ee=this.getTableElement();if(null==Ee||!Ee.length||!xe)return;const Oe=this.getColumns(),ze=this._needToSetCellWidths(),$e=Ee.children("colgroup").children("col");$e.toArray().forEach(Be=>Be.removeAttribute("style")),Oe.forEach((Be,Ue)=>{if(ze&&Be.width&&!Be.command){const st=ue(Be.visibleWidth||Be.width),et=ue(Be.minWidth||st),Ke=Ee.children().children(".dx-row").not(`.${Q}`);for(let Ye=0;Ye<Ke.length;Ye++){const Pe=this.getVisibleColumnIndex(Ue,Ye);if(Pe>=0){const Se=Ke.eq(Ye),Re=Se.hasClass("dx-group-row")?Se.find(`td[aria-colindex='${Pe+1}']:not(.dx-group-cell)`):Se.find("td").eq(Pe);if(Re.length){const Fe=Re.get(0);be(Fe,Be,st),Fe.style.minWidth=et}}}}const ot=Ce(xe[Ue]);(0,g.O9)(ot)&&(0,u.zj)($e.eq(Ue),ot)})}getCellElements(fe){return this._getCellElementsCore(fe)}_getCellElementsCore(fe){return fe<0?void 0:this._getRowElements().eq(fe).children()}_getCellElement(fe,xe){const Te=this.getCellElements(fe),Ee=this._getVisibleColumnIndex(Te,fe,xe);if(null==Te||!Te.length||Ee<0)return;const Oe=Te.eq(Ee);return Oe.length>0?Oe:void 0}_getRowElement(fe){const xe=this;let Te=(0,f.A)();const Ee=xe.getTableElements();if(c.__(Ee,(Oe,ze)=>{Te=Te.add(xe._getRowElements((0,f.A)(ze)).eq(fe))}),Te.length)return Te}getCellElement(fe,xe){const Te=this._getCellElement(fe,xe);if(Te)return(0,o.cc)(Te)}getRowElement(fe){const xe=this._getRowElement(fe);let Te=[];if(xe&&!(0,o.cc)(xe).get)for(let Ee=0;Ee<xe.length;Ee++)Te.push(xe[Ee]);else Te=xe;return Te}_getVisibleColumnIndex(fe,xe,Te){if((0,g.Kg)(Te)){const Ee=this._columnsController.columnOption(Te,"index");return this._columnsController.getVisibleIndex(Ee)}return Te}getColumnElements(){}getColumns(fe,xe){return this._columnsController.getVisibleColumns(fe)}getCell(fe,xe,Te){const Ee=xe||this._getRowElements();let Oe;var ze;if(Ee.length>0&&fe.rowIndex>=0&&("virtual"!==this.option("scrolling.mode")&&"virtual"!==this.option("scrolling.rowRenderingMode")&&(fe.rowIndex=fe.rowIndex<Ee.length?fe.rowIndex:Ee.length-1),Oe=Te||this.getCellElements(fe.rowIndex),(null===(ze=Oe)||void 0===ze?void 0:ze.length)>0))return Oe.eq(Oe.length>fe.columnIndex?fe.columnIndex:Oe.length-1)}getRowsCount(){const fe=this.getTableElement();return fe&&1===fe.length?fe[0].rows.length:0}_getRowElementsCore(fe){if(fe=fe||this.getTableElement()){const Te=(this.option().rowTemplate||this.option("dataRowTemplate"))&&fe.find("> tbody.dx-row");return Te&&Te.length?Te:fe.find("> tbody > .dx-row, > .dx-row")}return(0,f.A)()}_getRowElements(fe){return this._getRowElementsCore(fe)}getRowIndex(fe){return this._getRowElements().index(fe)}getBoundingRect(){}getName(){}setScrollerSpacing(fe){const xe=this.element(),Te=this.option("rtlEnabled");xe&&xe.css({paddingLeft:Te?fe:"",paddingRight:Te?"":fe})}isScrollbarVisible(fe){const xe=this.element(),Te=this._tableElement;return!(!xe||!Te)&&(fe?(0,a.Ot)(Te)-(0,a.RG)(xe)>0:(0,a.P$)(Te)-(0,a.Oq)(xe)>0)}isDisposed(){var fe;return null===(fe=this.component)||void 0===fe?void 0:fe._disposed}}},7992:(In,Ze,M)=>{"use strict";M.d(Ze,{Oz:()=>ie,my:()=>Y});var W=M(6054),o=M(5704),P=M(36),b=M(4859),f=M(6021),S=M(2660),T=M(4757),y=M(1363),d=M(1830),c=M(6110),s=M(8360),a=M(8953);var g=M(3376),_=M(8736);const N=["columnsSeparatorView","blockSeparatorView","trackerView","headerPanel","columnHeadersView","rowsView","footerView","columnChooserView","filterPanelView","pagerView","draggingHeaderView","contextMenuView","errorView","headerFilterView","filterBuilderView"],k=function(Z){return(0,d.Kg)(Z)&&Z.endsWith("%")},B=function(Z,Q){const te=Z._rowsView.contentWidth();return te-Z._getTotalWidth(Q,te)},K=function(Z,Q,te,pe){return B(Z,pe.map((z,oe)=>oe===Q?te:z))};class ie extends g.Ay.ViewController{init(){this._prevContentMinHeight=null,this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._editorFactoryController=this.getController("editorFactory"),this._footerView=this.getView("footerView"),this._rowsView=this.getView("rowsView"),this._gridView=this.getView("gridView")}_initPostRenderHandlers(){this._refreshSizesHandler||(this._refreshSizesHandler=Q=>{let te=(new f.cY).resolve(null);const pe=Q?.changeType,z=Q?.isDelayed,oe=pe&&"updateSelection"!==pe&&"updateFocusedRow"!==pe&&"pageIndex"!==pe&&!z;this._dataController.changed.remove(this._refreshSizesHandler),this._checkSize()&&(te=this._refreshSizes(Q)),oe&&(0,f.z7)(te).done(()=>{this._setAriaLabel(),this.fireContentReadyAction()})},this._dataController.changed.add(()=>{this._dataController.changed.add(this._refreshSizesHandler)}))}_refreshSizes(Q){let te=(new f.cY).resolve(null);const pe=Q?.changeType,z=Q?.isDelayed,oe=this._dataController.items();if(Q&&"refresh"!==pe&&"prepend"!==pe&&"append"!==pe){if("update"===pe){var ae;if(0===(null===(ae=Q.changeTypes)||void 0===ae?void 0:ae.length))return te;!(oe.length>1||"insert"!==Q.changeTypes[0])||0===oe.length&&"remove"===Q.changeTypes[0]||Q.needUpdateDimensions?te=this.resize():(te=new f.cY,this._waitAsyncTemplates().done(()=>{(0,b.OX)(()=>(0,b.zE)(()=>(0,b.OX)(()=>{this._setScrollerSpacing(),this._rowsView.resize(),te.resolve()})))}).fail(te.reject))}}else z||(te=this.resize());return te}fireContentReadyAction(){this.component._fireContentReadyAction()}_getWidgetAriaLabel(){return"dxDataGrid-ariaDataGrid"}_setAriaLabel(){var Q;const te=(null===(Q=this._columnsController)||void 0===Q||null===(Q=Q._columns)||void 0===Q?void 0:Q.filter(ee=>{let{visible:he}=ee;return!!he}).length)??0,pe=Math.max(0,this._dataController.totalItemsCount()),z=this._getWidgetAriaLabel(),oe=s.A.format(z,pe,te),ae=this.component.$element().children(".dx-gridbase-container");this.component.setAria("label",oe,ae),this._gridView.setWidgetA11yStatusText(oe)}_getBestFitWidths(){var Q;const te=this._rowsView,pe=this._columnHeadersView;let z=te.getColumnWidths();if(null===(Q=z)||void 0===Q||!Q.length){var oe;const ae=pe.getTableElement();pe.setTableElement(null===(oe=te.getTableElement())||void 0===oe?void 0:oe.children(".dx-header")),z=pe.getColumnWidths(),pe.setTableElement(ae)}return z}_setVisibleWidths(Q,te){const pe=this._columnsController;pe.beginUpdate(),(0,S.__)(Q,(z,oe)=>{const ae=pe.getColumnId(oe);pe.columnOption(ae,"visibleWidth",te[z])}),pe.endUpdate()}_toggleBestFitModeForView(Q,te,pe){if(!Q||!Q.isVisible())return;const z=this._rowsView.getTableElements(),oe=Q.getTableElements();(0,S.__)(z,(ae,ee)=>{let he;const de=(0,o.A)(ee),ue=oe.eq(ae);ue&&ue.length&&(he=pe?ue.children("tbody").appendTo(de):de.children(`.${te}`).appendTo(ue),he.toggleClass(te,pe),he.toggleClass(this.addWidgetPrefix("best-fit"),pe))})}_toggleBestFitMode(Q){const te=this._rowsView.getTableElement(),pe=this._rowsView.getTableElements().eq(1);te&&(te.css("tableLayout",Q?"auto":"fixed"),te.children("colgroup").css("display",Q?"none":""),(0,S.__)(pe.find("tr.dx-group-row"),(z,oe)=>{(0,o.A)(oe).css("display",Q?"none":"")}),pe.toggleClass(this.addWidgetPrefix("table-fixed"),!Q),this._toggleBestFitModeForView(this._columnHeadersView,"dx-header",Q),this._toggleBestFitModeForView(this._footerView,"dx-footer",Q),this._needStretch()&&(te.get(0).style.width=Q?"auto":""))}_toggleContentMinHeight(Q){const te=this._rowsView.getScrollable(),pe=this._rowsView._findContentElement();!1===te?.option("useNative")&&(!0===Q&&(this._prevContentMinHeight=pe.get(0).style.minHeight),(0,d.O9)(this._prevContentMinHeight)&&pe.css({minHeight:Q?_.A.getContentHeightLimit(P.A):this._prevContentMinHeight}))}_synchronizeColumns(){const Q=this._columnsController,te=Q.getVisibleColumns(),pe=this.option("columnAutoWidth"),z=this.option("wordWrapEnabled"),oe=te.some(Ce=>!(0,d.O9)(Ce.width));let he,be,ve,ae=this._needBestFit(),ee=!1,de=!1,ue=[];!ae&&(0,S.__)(te,(Ce,ye)=>{if("auto"===ye.width)return ae=!0,!1}),(0,S.__)(te,(Ce,ye)=>{if(ye.minWidth)return ee=!0,!1}),this._setVisibleWidths(te,[]);const le=this.component.$element();ae&&(be=W.A.getActiveElement(le.get(0)),ve=_.A.getSelectionRange(be),this._toggleBestFitMode(!0),he=!0),this._toggleContentMinHeight(z),le&&le.get(0)&&this._maxWidth&&(delete this._maxWidth,le[0].style.maxWidth=""),(0,b.OX)(()=>{ae?(ue=this._getBestFitWidths(),(0,S.__)(te,(Ce,ye)=>{const ge=Q.getColumnId(ye);Q.columnOption(ge,"bestFitWidth",ue[Ce],!0)})):ee&&(ue=this._getBestFitWidths()),(0,S.__)(te,function(Ce){const{width:ye}=this;var Z;"auto"!==ye&&((0,d.O9)(ye)?ue[Ce]=(0,d.kf)(ye)||(0,d.Kg)(Z=ye)&&Z.endsWith("px")?parseFloat(ye):ye:pe||(ue[Ce]=void 0))}),he&&(this._toggleBestFitMode(!1),he=!1,be&&be!==W.A.getActiveElement()&&((0,T.N)(be).bottom<0||function(Z,Q){a.zY(Z,!0),_.A.setSelectionRange(Z,Q)}(be,ve))),de=this._correctColumnWidths(ue,te),pe&&(function(){let Ce;(0,S.__)(te,(ye,ge)=>{"groupExpand"===ge.type&&(Ce=ue[ye])}),(0,S.__)(te,(ye,ge)=>{"groupExpand"===ge.type&&Ce&&(ue[ye]=Ce)})}(),this._needStretch()&&this._processStretch(ue,te)),(0,b.zE)(()=>{(ae||de||oe)&&this._setVisibleWidths(te,ue),z&&this._toggleContentMinHeight(!1)})})}_needBestFit(){return this.option("columnAutoWidth")}_needStretch(){return this._columnsController.getVisibleColumns().some(Q=>"auto"===Q.width&&!Q.command)}_getAverageColumnsWidth(Q){return B(this,Q)/Q.filter(z=>void 0===z).length}_correctColumnWidths(Q,te){const pe=this;let z,oe=!1,ae=!1,ee=!1;const he=pe.component.$element(),de=pe._hasWidth;for(z=0;z<te.length;z++){const ue=z,be=te[ue],ve="adaptiveHidden"===Q[ue];let le=Q[ue];const{minWidth:Ce}=be;Ce&&(void 0===le?le=pe._getAverageColumnsWidth(Q):k(le)&&K(pe,ue,Ce,Q)<0&&(le=-1));const ye=pe._getRealColumnWidth(ue,Q.map((ge,fe)=>ue===fe?le:ge));Ce&&!ve&&ye<Ce&&(Q[ue]=Ce,ee=!0,z=-1),(0,d.O9)(be.width)||(ae=!0),k(be.width)&&(oe=!0)}if(!ae&&Q.length){const ue=pe._rowsView.element(),be=pe._rowsView.contentWidth(),ve=pe._rowsView.getScrollbarWidth(),le=pe._getTotalWidth(Q,be);if(le<be){const Ce=_.A.getLastResizableColumnIndex(te,Q);if(Ce>=0&&(Q[Ce]="auto",ee=!0,!1===de&&!oe)){const ye=pe.option("showBorders")?Math.ceil((0,y.Ot)(ue)-(0,y.hh)(ue)):0;pe._maxWidth=le+ve+ye,he.css("maxWidth",pe._maxWidth)}}}return ee}_processStretch(Q,te){const pe=this._rowsView.contentWidth(),z=this._getTotalWidth(Q,pe),oe={length:0};if(!Q.length)return;(0,S.__)(te,function(de){(this.width||"adaptiveHidden"===Q[de])&&(oe[de]=!0,oe.length++)});const ae=pe-z,ee=Math.floor(ae/(Q.length-oe.length));let he=ae-ee*(Q.length-oe.length);if(ae>=0)for(let de=0;de<Q.length;de++)oe[de]||(Q[de]+=ee,he>0&&(he<1?(Q[de]+=he,he=0):(Q[de]++,he--)))}_getRealColumnWidth(Q,te,pe){let z=1;const oe=te[Q];if(!k(oe))return parseFloat(oe);const ae=te.reduce((ue,be,ve)=>k(be)?ue+parseFloat(be):ue,0),ee=te.reduce((ue,be)=>!be||"adaptiveHidden"===be||k(be)?ue:ue+parseFloat(be),0),he=(pe=pe||this._rowsView.contentWidth())-ee,de=ae*pe/100;return ee>0&&de+ee>=pe&&(z=de>he?he/de:1),parseFloat(oe)*pe*z/100}_getTotalWidth(Q,te){let pe=0;for(let z=0;z<Q.length;z++){const oe=Q[z];oe&&"adaptiveHidden"!==oe&&(pe+=this._getRealColumnWidth(z,Q,te))}return Math.ceil(pe)}_getGroupElement(){return this.component.$element().children().get(0)}updateSize(Q){const te=this,pe=(0,o.A)(Q),z=te.addWidgetPrefix("important-margin");if(void 0===te._hasHeight&&pe&&pe.is(":visible")&&(0,y.RG)(pe)){const oe=pe.children(`.${te.getWidgetContainerClass()}`);oe.length&&oe.detach(),te._hasHeight=!!(0,y.Oq)(pe);const ae=(0,y.RG)(pe);pe.addClass(z),te._hasWidth=(0,y.RG)(pe)===ae,pe.removeClass(z),oe.length&&oe.appendTo(pe)}}publicMethods(){return["resize","updateDimensions"]}_waitAsyncTemplates(){var Q,te,pe;return(0,f.z7)(null===(Q=this._columnHeadersView)||void 0===Q?void 0:Q.waitAsyncTemplates(!0),null===(te=this._rowsView)||void 0===te?void 0:te.waitAsyncTemplates(!0),null===(pe=this._footerView)||void 0===pe?void 0:pe.waitAsyncTemplates(!0))}resize(){if(this.component._requireResize)return(new f.cY).resolve();const Q=new f.cY;return this._waitAsyncTemplates().done(()=>{(0,f.z7)(this.updateDimensions()).done(Q.resolve).fail(Q.reject)}).fail(Q.reject),Q.promise()}updateDimensions(Q){const te=this;if(te._initPostRenderHandlers(),!te._checkSize(Q))return;const pe=te._resizeDeferred,z=te._resizeDeferred=new f.cY;return(0,f.z7)(pe).always(()=>{(0,b.zE)(()=>{te._dataController.isLoaded()&&te._synchronizeColumns(),te._resetGroupElementHeight(),(0,b.OX)(()=>{(0,b.zE)(()=>{(0,b.OX)(()=>{te._updateDimensionsCore()})})})}).done(z.resolve).fail(z.reject)}),z.promise()}_resetGroupElementHeight(){const Q=this._getGroupElement(),te=this._rowsView.getScrollable();Q&&Q.style.height&&(!te||!te.scrollTop())&&(Q.style.height="")}_checkSize(Q){const te=this.component.$element(),pe=te.is(":visible"),z=this._lastWidth!==(0,y.RG)(te)||this._lastHeight!==(0,y.Oq)(te)||this._devicePixelRatio!==(0,c.zk)().devicePixelRatio;return pe&&(!Q||z)}_setScrollerSpacingCore(){const Q=this,te=Q._rowsView.getScrollbarWidth(),pe=Q._rowsView.getScrollbarWidth(!0);(0,b.zE)(()=>{Q._columnHeadersView&&Q._columnHeadersView.setScrollerSpacing(te),Q._footerView&&Q._footerView.setScrollerSpacing(te),Q._rowsView.setScrollerSpacing(te,pe)})}_setScrollerSpacing(){const Q=this._rowsView.getScrollable(),te=!0===this.option("scrolling.useNative");!Q||te?(0,b.zE)(()=>{(0,b.OX)(()=>{this._setScrollerSpacingCore()})}):this._setScrollerSpacingCore()}_setAriaOwns(){var Q,te,pe;const z=null===(Q=this._columnHeadersView)||void 0===Q?void 0:Q.getTableElement(),oe=null===(te=this._footerView)||void 0===te?void 0:te.getTableElement();null===(pe=this._rowsView)||void 0===pe||pe.setAriaOwns(z?.attr("id"),oe?.attr("id"))}_updateDimensionsCore(){const Q=this,te=Q._dataController,pe=Q._rowsView,z=Q.component.$element(),oe=this._getGroupElement(),ae=(0,y.Oq)(z),ee=Q.option("height")??z.get(0).style.height,he=!!ee&&"auto"!==ee,de=parseInt(z.css("maxHeight")),ue=de&&ae>=de,be=oe&&oe.scrollHeight===oe.offsetHeight;Q.updateSize(z),(0,b.zE)(()=>{pe.hasHeight(Q._hasHeight||!!de||he),this._setAriaOwns(),ue&&!be&&(0,o.A)(oe).css("height",de),te.isLoaded()?(0,b.OX)(()=>{Q._updateLastSizes(z),Q._setScrollerSpacing(),(0,S.__)(N,(le,Ce)=>{const ye=Q.getView(Ce);ye&&ye.resize()}),this._editorFactoryController&&this._editorFactoryController.resize()}):pe.setLoading(te.isLoading())})}_updateLastSizes(Q){this._lastWidth=(0,y.RG)(Q),this._lastHeight=(0,y.Oq)(Q),this._devicePixelRatio=(0,c.zk)().devicePixelRatio}optionChanged(Q){switch(Q.name){case"width":case"height":this.component._renderDimensions(),this.resize();case"renderAsync":return void(Q.handled=!0);default:super.optionChanged(Q)}}}const Y={defaultOptions:()=>({showBorders:!1,renderAsync:!1}),controllers:{resizing:ie,synchronizeScrolling:class re extends g.Ay.ViewController{_scrollChangedHandler(Q,te,pe){for(let z=0;z<Q.length;z++)Q[z]&&Q[z].name!==pe&&Q[z].scrollTo({left:te.left,top:te.top})}init(){const Q=[this.getView("columnHeadersView"),this.getView("footerView"),this.getView("rowsView")];for(let te=0;te<Q.length;te++){const pe=Q[te];pe&&pe.scrollChanged.add(this._scrollChangedHandler.bind(this,Q))}}}},views:{gridView:class q extends g.Ay.View{init(){this._resizingController=this.getController("resizing"),this._dataController=this.getController("data")}_endUpdateCore(){this.component._requireResize&&(this.component._requireResize=!1,this._resizingController.resize())}getView(Q){return this.component._views[Q]}element(){return this._groupElement}optionChanged(Q){(0,d.O9)(this._groupElement)&&"showBorders"===Q.name?(this._groupElement.toggleClass(this.addWidgetPrefix("borders"),!!Q.value),Q.handled=!0):super.optionChanged(Q)}_renderViews(Q){const te=this;(0,S.__)(N,(pe,z)=>{const oe=te.getView(z);oe&&oe.render(Q)})}_getTableRoleName(){return"group"}render(Q){const te=!this._groupElement,pe=this._groupElement||(0,o.A)("<div>").addClass(this.getWidgetContainerClass());pe.addClass("dx-gridbase-container"),pe.toggleClass(this.addWidgetPrefix("borders"),!!this.option("showBorders")),this.setAria("role","presentation",Q),this.component.setAria("role",this._getTableRoleName(),pe),this._rootElement=Q||this._rootElement,te&&(this._groupElement=pe,(0,c.Vd)()&&this._resizingController.updateSize(Q),pe.appendTo(Q)),this._a11yGeneralStatusElement||(this._a11yGeneralStatusElement=(Z=>{let{statusText:Q}={};return(0,o.A)("<div>").text(Q??"").addClass("dx-gridbase-a11y-status-container").attr("role","status")})(),this._a11yGeneralStatusElement.attr("e2e-a11y-general-status-container","true"),this._rootElement.append(this._a11yGeneralStatusElement)),this._renderViews(pe)}update(){const Q=this;Q._rootElement&&Q._groupElement&&(this._resizingController.resize(),Q._dataController.isLoaded()&&Q._resizingController.fireContentReadyAction())}setWidgetA11yStatusText(Q){var te;null===(te=this._a11yGeneralStatusElement)||void 0===te||te.text(Q)}}},VIEW_NAMES:N}},2391:(In,Ze,M)=>{"use strict";M.d(Ze,{E:()=>ee,x:()=>ae});var W=M(5737),o=M(5704),P=M(36),b=M(4859),f=M(4270),S=M(3090),T=M(2660),y=M(4757),d=M(1363),c=M(9495),s=M(8649),a=M(1830),u=M(6110),h=M(4072),g=M(1110),_=M(8360),x=M(4602),w=M(8736),D=M(9339);const U="dx-freespace-row",ie="dx-last-row-border";function Q(he){return he?Math.round(he.scrollWidth()-he.clientWidth()):0}function te(he){let{rowType:de,column:ue}=he;return"group"===de&&(0,a.O9)(ue.groupIndex)&&!ue.showWhenGrouped&&!ue.command}function pe(he){let{element:de,watch:ue,getter:be,callBack:ve}=he;if(ue){const le=ue(be,ve);h.A.on(de,g.N,le)}}const z=function(he,de){const ue=(0,c.Im)(de.text)&&"data"===de.rowType,{text:be}=de,ve=he.get(0);ue?w.A.setEmptyText(he):de.column.encodeHtml?ve.textContent=be:ve.innerHTML=be};class ae extends D.n{init(){super.init(),this._editingController=this.getController("editing"),this._resizingController=this.getController("resizing"),this._columnsResizerController=this.getController("columnsResizer"),this._focusController=this.getController("focus"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._validatingController=this.getController("validating"),this._errorHandlingController=this.getController("errorHandling"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowHeight=0,this._scrollTop=0,this._scrollLeft=-1,this._scrollRight=0,this._hasHeight=void 0,this._contentChanges=[],this._dataController.loadingChanged.add((de,ue)=>{this.setLoading(de,ue)}),this._dataController.dataSourceChanged.add(()=>{this._scrollLeft>=0&&!this._dataController.isLoading()&&this._handleScroll({component:this.getScrollable(),forceUpdateScrollPosition:!0,scrollOffset:{top:this._scrollTop,left:this._scrollLeft}})})}_getDefaultTemplate(de){return"empty"===de.command?function(ue){ue.html("&nbsp;")}:z}renderFocusState(de){}_getDefaultGroupTemplate(de){const ue=this.option("summary.texts");return function(be,ve){const{data:le}=ve;let Ce=`${ve.column.caption}: ${ve.text}`;const ye=be.get(0);ve.summaryItems&&ve.summaryItems.length&&(Ce+=` ${w.A.getGroupRowSummaryText(ve.summaryItems,ue)}`),le&&(ve.groupContinuedMessage&&ve.groupContinuesMessage?Ce+=` (${ve.groupContinuedMessage}. ${ve.groupContinuesMessage})`:ve.groupContinuesMessage?Ce+=` (${ve.groupContinuesMessage})`:ve.groupContinuedMessage&&(Ce+=` (${ve.groupContinuedMessage})`)),de.encodeHtml?ye.textContent=Ce:ye.innerHTML=Ce}}_update(de){}_updateCell(de,ue){te(ue)&&de.addClass("dx-group-cell"),super._updateCell.apply(this,arguments)}_getCellTemplate(de){const{column:be}=de;let ve;return ve=te(de)?be.groupCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultGroupTemplate(be)}:("data"===de.rowType||be.command)&&be.cellTemplate?be.cellTemplate:{allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(be)},ve}_createRow(de,ue){const be=super._createRow.apply(this,arguments);if(de){const ve="group"===de.rowType,le="data"===de.rowType;le&&be.addClass("dx-data-row"),le&&this.option("showRowLines")&&be.addClass("dx-row-lines"),this.option("showColumnLines")&&be.addClass("dx-column-lines"),!1===de.visible&&be.hide(),ve&&(be.addClass("dx-group-row"),this.setAriaExpandedAttribute(be,de))}return be}_rowPrepared(de,ue,be){"data"===ue.rowType&&(this.option("rowAlternationEnabled")&&(this._isAltRow(be)&&de.addClass("dx-row-alt"),pe({element:de.get(0),watch:ue.watch,getter:()=>this._isAltRow(be),callBack:ve=>{de.toggleClass("dx-row-alt",ve)}})),this._setAriaRowIndex(ue,de),pe({element:de.get(0),watch:ue.watch,getter:()=>ue.rowIndex,callBack:()=>this._setAriaRowIndex(ue,de)})),super._rowPrepared.apply(this,arguments)}_setAriaRowIndex(de,ue){if(!ue.is("tr"))return;const{component:be}=this,ve="standard"===be.option("scrolling.mode")&&!w.A.isVirtualRowRendering(be);let le=de.rowIndex+1;ve?le=be.pageIndex()*be.pageSize()+le:le+=this._dataController.getRowIndexOffset(),this.setAria("rowindex",le,ue)}setAriaExpandedAttribute(de,ue){const be=this.localize(ue.isExpanded?"dxDataGrid-ariaExpandedRow":"dxDataGrid-ariaCollapsedRow");this.setAria("roledescription",be,de)}_afterRowPrepared(de){const ue=de.args[0],be=this._dataController,ve=be.getVisibleRows()[ue.rowIndex],le=this.option("integrationOptions.watchMethod");if(!ue.data||"data"!==ue.rowType||ue.isNewRow||!this.option("twoWayBindingEnabled")||!le||!ve)return;const Ce=le(()=>be.generateDataValues(ue.data,ue.columns),()=>{be.repaintRows([ve.rowIndex],this.option("repaintChangesOnly"))},{deep:!0,skipImmediate:!0});h.A.on(ue.rowElement,g.N,Ce)}_renderScrollable(de){const ue=this,be=ue.element();if(be.children().length||be.append("<div>"),(de||!ue._loadPanel)&&ue._renderLoadPanel(be,be.parent(),ue._dataController.isLocalStore()),(de||!ue.getScrollable())&&ue._dataController.isLoaded()){const ve=ue.getColumns();let le=!0;for(let Ce=0;Ce<ve.length;Ce++)if(!ve[Ce].width&&!ve[Ce].minWidth){le=!1;break}(ue.option("columnAutoWidth")||ue._hasHeight||le||ue._columnsController._isColumnFixing())&&ue._renderScrollableCore(be)}}_handleScroll(de){const ue=this.option("rtlEnabled"),be=de.component.option("useNative");this._scrollTop=de.scrollOffset.top,this._scrollLeft=de.scrollOffset.left;let ve=de.scrollOffset.left;ue&&(this._scrollRight=Q(de.component)-this._scrollLeft,be&&(ve=-this._scrollRight),this.isScrollbarVisible(!0)||(this._scrollLeft=-1)),this.scrollChanged.fire((0,W.A)({},de.scrollOffset,{left:ve}),this.name)}_renderScrollableCore(de){const ue=this._createScrollableOptions(),be=this._handleScroll.bind(this);ue.onScroll=be,this._scrollable=this._createComponent(de,x.A,ue),this._scrollableContainer=this._scrollable&&(0,o.A)(this._scrollable.container())}_renderLoadPanel(){for(var de=arguments.length,ue=new Array(de),be=0;be<de;be++)ue[be]=arguments[be];return w.A.renderLoadPanel.apply(this,arguments)}_renderContent(de,ue,be){return de.empty().append(ue),this._findContentElement()}_updateContent(de,ue,be){return this._contentChanges.push({newTableElement:de,change:ue,isFixedTableRendering:be}),this.waitAsyncTemplates().done(()=>{const ve=this._contentChanges;this._contentChanges=[],ve.forEach(le=>{let{newTableElement:Ce,change:ye,isFixedTableRendering:ge}=le;const fe=this.getTableElement(ge),xe=this._findContentElement(ge),Te=ye?.changeType,Ee=[],Oe=this.option("highlightChanges"),ze=this.addWidgetPrefix("row-inserted-animation");"update"===Te?((0,T.__)(ye.rowIndices,($e,Be)=>{var Ue;const ot=this._getRowElements(Ce).eq($e),st=null===(Ue=ye.changeTypes)||void 0===Ue?void 0:Ue[$e],et=ye.items&&ye.items[$e];Ee.push(()=>{const Ke=this._getRowElements(fe),Ye=Ke.eq(Be);switch(st){case"update":if(et){var Pe;const Se=null===(Pe=ye.columnIndices)||void 0===Pe?void 0:Pe[$e];(0,a.O9)(et.visible)&&et.visible!==Ye.is(":visible")?Ye.toggle(et.visible):Se?this._updateCells(Ye,ot,Se):Ye.replaceWith(ot)}break;case"insert":if(Ke.length)Ye.length?ot.insertBefore(Ye):ot.insertAfter(Ke.last());else if(fe){const Se=ot.is("tbody")?fe:fe.children("tbody");ot.prependTo(Se)}Oe&&ye.isLiveUpdate&&ot.addClass(ze);break;case"remove":Ye.remove()}})}),(0,T.__)(Ee,function(){this()}),Ce.remove()):(this.setTableElement(Ce,ge),xe.addClass(this.addWidgetPrefix("content")),this._setGridRole(xe),this._renderContent(xe,Ce,ge))})}).fail(()=>{this._contentChanges=[]})}_getGridRoleName(){return"grid"}_setGridRole(de){var ue;const be=!(null!==(ue=this._dataController)&&void 0!==ue&&ue.isEmpty()),ve=this._getGridRoleName();null!=de&&de.length&&be&&this.setAria("role",ve,de)}_createEmptyRow(de,ue,be){const ve=this;let le;const Ce=ve._createRow(),ye=ue?this.getFixedColumns():this.getColumns();Ce.addClass(de).toggleClass("dx-column-lines",ve.option("showColumnLines"));for(let ge=0;ge<ye.length;ge++)le=ve._createCell({column:ye[ge],rowType:"freeSpace",columnIndex:ge,columns:ye}),(0,a.kf)(be)&&le.css("height",be),Ce.append(le);return ve.setAria("role","presentation",Ce),Ce}getFixedColumns(){throw new Error("Method not implemented.")}_appendEmptyRow(de,ue,be){const ve=this._getBodies(de),le=!ve.length||ue.is("tbody"),Ce=le?de:ve;if("top"===be){if(Ce.first().prepend(ue),le){const ye=Ce.children("colgroup");Ce.prepend(ye)}}else Ce.last().append(ue)}_renderFreeSpaceRow(de,ue){let be=this._createEmptyRow(U);be=this._wrapRowIfNeed(de,be,"refresh"===ue?.changeType),this._appendEmptyRow(de,be)}_checkRowKeys(de){const ue=this,be=ue._getRows(de),ve=ue._dataController.store()&&ue._dataController.store().key();ve&&be.some(le=>{if("data"===le.rowType&&void 0===le.key)return ue._dataController.fireError("E1046",ve),!0})}_needUpdateRowHeight(de){return de>0&&!this._rowHeight}_getRowsHeight(de){return(de=de||this._tableElement).children("tbody").children().not(".dx-virtual-row").not(`.${U}`).toArray().reduce((be,ve)=>be+(0,y.N)(ve).height,0)}_updateRowHeight(){const de=this,ue=de.getTableElement(),be=de._dataController.items().length;if(ue&&de._needUpdateRowHeight(be)){const ve=de._getRowsHeight(ue);de._rowHeight=ve/be}}_findContentElement(de){let ue=this.element();const be=this.getScrollable();if(ue)return be&&(ue=(0,o.A)(be.content())),ue.children().first()}_getRowElements(de){const ue=super._getRowElements(de);return ue&&ue.not(`.${U}`)}_getFreeSpaceRowElements(de){const ue=de||this.getTableElements();return ue&&ue.children("tbody").children(`.${U}`)}_getNoDataText(){return this.option("noDataText")}_rowClick(de){const ue=this._dataController.items()[de.rowIndex]||{};this.executeAction("onRowClick",(0,S.X)({evaluate:be=>(0,f.Hz)(be)(ue.data)},de,ue))}_rowDblClick(de){const ue=this._dataController.items()[de.rowIndex]||{};this.executeAction("onRowDblClick",(0,S.X)({},de,ue))}_getColumnsCountBeforeGroups(de){for(let ue=0;ue<de.length;ue++)if("groupExpand"===de[ue].type)return ue;return 0}_getGroupCellOptions(de){const ue=this._getColumnsCountBeforeGroups(de.columns),be=(de.row.groupIndex||0)+ue;return{columnIndex:be,colspan:de.columns.length-be-1}}_needWrapRow(){return super._needWrapRow.apply(this,arguments)||!!this.option("dataRowTemplate")}_renderCells(de,ue){"group"===ue.row.rowType?this._renderGroupedCells(de,ue):ue.row.values&&super._renderCells(de,ue)}_renderGroupedCells(de,ue){const{row:be}=ue;let ve;const{columns:le}=ue,{rowIndex:Ce}=be;let ye;const ge=this._getGroupCellOptions(ue);for(let Te=0;Te<=ge.columnIndex;Te++)Te===ge.columnIndex&&le[Te].allowCollapsing&&"infinite"!==ue.scrollingMode?(ye=!!be.isExpanded,ve=le[Te]):(ye=null,ve={command:"expand",cssClass:le[Te].cssClass}),this._needRenderCell(Te,ue.columnIndices)&&this._renderCell(de,{value:ye,row:be,rowIndex:Ce,column:ve,columnIndex:Te,columnIndices:ue.columnIndices,change:ue.change});const fe=(0,y.n)(this.option("rtlEnabled")),xe=(0,S.X)({},le[ge.columnIndex],{command:null,type:null,cssClass:null,width:null,showWhenGrouped:!1,alignment:fe});ge.colspan>1&&(xe.colspan=ge.colspan),this._needRenderCell(ge.columnIndex+1,ue.columnIndices)&&this._renderCell(de,{value:be.values[be.groupIndex],row:be,rowIndex:Ce,column:xe,columnIndex:ge.columnIndex+1,columnIndices:ue.columnIndices,change:ue.change})}_renderRows(de,ue){const be=this,ve=be.option("scrolling.mode");super._renderRows(de,(0,S.X)({scrollingMode:ve},ue)),be._checkRowKeys(ue.change),be._renderFreeSpaceRow(de,ue.change),be._hasHeight||be.updateFreeSpaceRowHeight(de)}_renderDataRowByTemplate(de,ue,be){const{row:ve}=ue,le=(0,S.X)({columns:ue.columns},ve),Ce=this._createRow(ve,"tbody");Ce.appendTo(de),this.renderTemplate(Ce,be,le,!0,ue.change),this._rowPrepared(Ce,le,ue.row)}_renderRow(de,ue){const{row:be}=ue,{rowTemplate:ve}=this.option(),le=this.option("dataRowTemplate");"data"===be.rowType&&le?this._renderDataRowByTemplate(de,ue,le):"data"!==be.rowType&&"group"!==be.rowType||(0,a.O9)(be.groupIndex)||!ve?super._renderRow(de,ue):this.renderTemplate(de,ve,(0,S.X)({columns:ue.columns},be),!0)}_renderTable(de){const ue=this,be=super._renderTable(de),ve=function(){const le=ue.getScrollable();le&&ue.element().closest((0,u.zk)().document).length&&(ue.resizeCompleted.remove(ve),le._visibilityChanged(!0))};return(0,a.O9)(ue.getTableElement())?ue._renderScrollable():(ue.setTableElement(be),ue._renderScrollable(!0),ue.resizeCompleted.add(ve)),be}_createTable(){const de=super._createTable.apply(this,arguments);return(this.option().rowTemplate||this.option().dataRowTemplate)&&de.appendTo(this.component.$element()),de}_renderCore(de){const ue=this.element();ue.addClass(this.addWidgetPrefix("rowsview")).toggleClass(this.addWidgetPrefix("nowrap"),!this.option("wordWrapEnabled")),ue.toggleClass("dx-empty",this._dataController.isEmpty()),this.setAria("role","presentation",ue);const be=this._renderTable({change:de}),ve=this._updateContent(be,de);return super._renderCore(de),this._lastColumnWidths=null,ve}_getRows(de){return de&&de.items||this._dataController.items()}_getCellOptions(de){const ue=this,{column:be}=de,{row:ve}=de,{data:le}=ve,Ce=ve&&ve.summaryCells,{value:ye}=de,ge=w.A.getDisplayValue(be,ye,le,ve.rowType),fe=super._getCellOptions(de);if(fe.value=ye,fe.oldValue=de.oldValue,fe.displayValue=ge,fe.row=ve,fe.key=ve.key,fe.data=le,fe.rowType=ve.rowType,fe.values=ve.values,fe.text=be.command?"":w.A.formatValue(ge,be),fe.rowIndex=ve.rowIndex,fe.summaryItems=Ce&&Ce[de.columnIndex],fe.resized=be.resizedCallbacks,(0,a.O9)(be.groupIndex)&&!be.command){const xe=ue.option("grouping.texts"),Te=ue.option("scrolling.mode");"virtual"!==Te&&"infinite"!==Te&&(fe.groupContinuesMessage=le&&le.isContinuationOnNextPage&&xe&&xe.groupContinuesMessage,fe.groupContinuedMessage=le&&le.isContinuation&&xe&&xe.groupContinuedMessage)}return fe}_setRowsOpacityCore(de,ue,be,ve){const le=this._columnsController,Ce=le.getColumns(),ye=Ce&&Ce[be],ge=ye&&ye.isBand&&ye.index;(0,T.__)(de,(fe,xe)=>{if(!(0,o.A)(xe).hasClass("dx-group-row"))for(let Te=0;Te<ue.length&&(!((0,a.kf)(ge)&&le.isParentBandColumn(ue[Te].index,ge)||ue[Te].index===be)||(de.eq(fe).children().eq(Te).css({opacity:ve}),(0,a.kf)(ge)));Te++);})}_getDevicePixelRatio(){return(0,u.zk)().devicePixelRatio}renderNoDataText(){return w.A.renderNoDataText.apply(this,arguments)}getCellOptions(de,ue){const be=this._dataController.items()[de];let ve,le;return be&&(le=(0,a.Kg)(ue)?this._columnsController.columnOption(ue):this._columnsController.getVisibleColumns()[ue],le&&(ve=this._getCellOptions({value:le.calculateCellValue(be.data),rowIndex:be.rowIndex,row:be,column:le}))),ve}getRow(de){if(de>=0){const ue=this._getRowElements();if(ue.length>de)return(0,o.A)(ue[de])}}updateFreeSpaceRowHeight(de){const ue=this._dataController,be=ue.items(!0).length,ve=this._findContentElement(),le=this._getFreeSpaceRowElements(de);if(le&&ve&&ue.totalCount()>=0){let Ce=!1;if(be>0)if(this._hasHeight)le.hide(),(0,b.OX)(()=>{const ye=this.getScrollbarWidth(!0),ge=(0,d.Oq)(this.element())-ye,xe=ge-(0,d.P$)(ve)>0,Te=this._getRowsHeight(ve.children().first()),Ee=de||this.getTableElements(),$e=ge-Te-Math.ceil(parseFloat(Ee.css("borderTopWidth")))-this._getHeightCorrection();xe&&(0,b.zE)(()=>{le.css("height",$e),Ce=!0,le.show()}),(0,b.zE)(()=>this._updateLastRowBorder(Ce))});else{const ye=ue.pageSize()-be,ge=this.option("scrolling.mode");ye>0&&ue.pageCount()>1&&"virtual"!==ge&&"infinite"!==ge&&((0,s.k$)(le,ye*this._rowHeight),Ce=!0),!Ce&&de?(0,s.k$)(le,0):le.toggle(Ce),this._updateLastRowBorder(Ce)}else le.css("height",0),le.show(),this._updateLastRowBorder(!0)}}_getHeightCorrection(){const de=P.A.webkit&&this._getDevicePixelRatio()>=2,ue=P.A.chrome&&P.A.version>=91,be=P.A.mozilla&&P.A.version>=70&&!this.option("showRowLines");return de||be||ue?1:0}_columnOptionChanged(de){const{optionNames:ue}=de;de.changeTypes.grouping||(ue.width||ue.visibleWidth)&&(super._columnOptionChanged(de),this._fireColumnResizedCallbacks())}getScrollable(){return this._scrollable}_handleDataChanged(de){const ue=this;switch(de.changeType){case"refresh":case"prepend":case"append":case"update":ue.render(null,de);break;default:ue._update(de)}}publicMethods(){return["isScrollbarVisible","getTopVisibleRowData","getScrollbarWidth","getCellElement","getRowElement","getScrollable"]}contentWidth(){return(0,d.RG)(this.element())-this.getScrollbarWidth()}getScrollbarWidth(de){const ue=this._scrollableContainer&&this._scrollableContainer.get(0);let be=0;return ue&&(de?(be=ue.clientHeight?ue.offsetHeight-ue.clientHeight:0,be+=function(he){const de=he.getScrollable();return de?Math.ceil(parseFloat((0,o.A)(de.content()).css("paddingBottom"))):0}(this)):be=ue.clientWidth?ue.offsetWidth-ue.clientWidth:0),be>0?be:0}_fireColumnResizedCallbacks(){const de=this._lastColumnWidths||[],ue=[],be=this.getColumns();for(let ve=0;ve<be.length;ve++)ue[ve]=be[ve].visibleWidth,be[ve].resizedCallbacks&&!(0,a.O9)(be[ve].groupIndex)&&de[ve]!==ue[ve]&&be[ve].resizedCallbacks.fire(ue[ve]);this._lastColumnWidths=ue}_updateLastRowBorder(de){this.option("showBorders")&&!de?this.element().addClass(ie):this.element().removeClass(ie)}_updateScrollable(){const de=x.A.getInstance(this.element());de&&(de.update(),(de.option("useNative")||null==de||!de.isRenovated())&&this._updateHorizontalScrollPosition())}_updateHorizontalScrollPosition(){const de=this.getScrollable(),ue=de&&de.scrollOffset().left;if(this.option("rtlEnabled")){const ve=Q(de);ve-ue!==this._scrollRight&&(this._scrollLeft=ve-this._scrollRight)}this._scrollLeft>=0&&ue!==this._scrollLeft&&de.scrollTo({x:this._scrollLeft})}_resizeCore(){const de=this;de._fireColumnResizedCallbacks(),de._updateRowHeight(),(0,b.zE)(()=>{de._renderScrollable(),de.renderNoDataText(),de.updateFreeSpaceRowHeight(),(0,b.OX)(()=>{de._updateScrollable()})})}scrollTo(de){const ue=this.element(),be=ue&&x.A.getInstance(ue);be&&be.scrollTo(de)}height(de){const be=this.element();if(0===arguments.length)return be?(0,d.P$)(be,!0):0;(0,a.O9)(de)&&be&&(this.hasHeight("auto"!==de),(0,s.k$)(be,de))}hasHeight(de){if(0===arguments.length)return!!this._hasHeight;this._hasHeight=de}setLoading(de,ue){const be=this;let ve=be._loadPanel;const le=be._dataController,Ce=be.option("loadPanel")||{},ye=le.isLoaded()?Ce.animation:null,ge=be.element();if((0,u.Vd)()&&(!ve&&void 0!==ue&&le.isLocalStore()&&"auto"===Ce.enabled&&ge&&(be._renderLoadPanel(ge,ge.parent()),ve=be._loadPanel),ve)){const fe={message:ue||Ce.text,animation:ye,visible:de};de&&(fe.position=w.A.calculateLoadPanelPosition(ge)),clearTimeout(be._hideLoadingTimeoutID),ve.option("visible")&&!de?be._hideLoadingTimeoutID=setTimeout(()=>{ve.option(fe)},200):ve.option(fe)}}setRowsOpacity(de,ue){const be=this._getRowElements().not(".dx-group-row")||[];this._setRowsOpacityCore(be,this.getColumns(),de,ue)}_getCellElementsCore(de){const ue=super._getCellElementsCore.apply(this,arguments);if(ue){const be=ue.filter(".dx-group-cell").index();if(be>=0&&ue.length>be+1)return ue.slice(0,be+1)}return ue}_getBoundaryVisibleItemIndex(de,ue){const be=this;let ve=0,le=0,Ce=0,ye=be._scrollTop;const ge=be._findContentElement(),fe=ge&&ge.offset().top,xe=this._dataController.items(),Te=be.getTableElement();if(xe.length&&Te){const Ee=be._getRowElements(Te).filter(":visible");for(de||(ye+=(0,d.P$)(this._hasHeight?this.element():(0,u.zk)())),ve=0;ve<xe.length;ve++){le=Ce;const Oe=(0,o.A)(Ee).eq(ve);if(Oe.length&&(Ce=Oe.offset(),Ce=(de?Ce.top:Ce.top+(0,d.P$)(Oe))-fe,Ce>ye)){ve&&(ue||2*ye<Math.round(Ce+le))&&ve--;break}}ve&&ve===xe.length&&ve--}return ve}getTopVisibleItemIndex(de){return this._getBoundaryVisibleItemIndex(!0,de)}getBottomVisibleItemIndex(de){return this._getBoundaryVisibleItemIndex(!1,de)}getTopVisibleRowData(){const de=this.getTopVisibleItemIndex(),ue=this._dataController.items();if(ue[de])return ue[de].data}_scrollToElement(de,ue){const be=this.getScrollable();be&&be.scrollToElement(de,ue)}optionChanged(de){const ue=this;switch(super.optionChanged(de),de.name){case"wordWrapEnabled":case"showColumnLines":case"showRowLines":case"rowAlternationEnabled":case"rowTemplate":case"dataRowTemplate":case"twoWayBindingEnabled":ue._invalidate(!0,!0),de.handled=!0;break;case"scrolling":ue._rowHeight=null,ue._tableElement=null,de.handled=!0;break;case"rtlEnabled":ue._rowHeight=null,ue._tableElement=null;break;case"loadPanel":ue._tableElement=null,ue._invalidate(!0,"loadPanel.enabled"!==de.fullName),de.handled=!0;break;case"noDataText":ue.renderNoDataText(),de.handled=!0}}setAriaOwns(de,ue,be){const ve=this._findContentElement(),le=this.getTableElement();null!=le&&le.length&&this.setAria("owns",`${de??""} ${le.attr("id")??""} ${ue??""}`.trim(),ve)}dispose(){super.dispose(),clearTimeout(this._hideLoadingTimeoutID),this._scrollable&&this._scrollable.dispose()}setScrollerSpacing(de,ue){}getFixedContentElement(){var de;const ue=this.addWidgetPrefix("content-fixed");return null===(de=this.element())||void 0===de?void 0:de.children(`.${ue}`)}_restoreErrorRow(de){}isElementInside(de){return de.closest(`.${this.addWidgetPrefix("rowsview")}`).is(this.element())}}const ee={defaultOptions:()=>({hoverStateEnabled:!1,scrolling:{useNative:"auto"},loadPanel:{enabled:"auto",text:_.A.format("Loading"),width:200,height:90,showIndicator:!0,indicatorSrc:"",showPane:!0},dataRowTemplate:null,columnAutoWidth:!1,noDataText:_.A.format("dxDataGrid-noDataText"),wordWrapEnabled:!1,showColumnLines:!0,showRowLines:!1,rowAlternationEnabled:!1,activeStateEnabled:!1,twoWayBindingEnabled:!0}),views:{rowsView:ae}}},4318:(In,Ze,M)=>{"use strict";M.d(Ze,{j:()=>u});var W=M(36),o=M(1363),P=M(1830),b=M(6110),f=M(8736),S=M(2);const y=h=>class extends h{_needToSetCellWidths(){let g=super._needToSetCellWidths();return!g&&this._columnsController.isVirtualMode()&&(g=this._columnsController.getColumns().some(x=>"auto"===x.width)),g}},s=function(h){return h.map(g=>g.visibleWidth||parseFloat(g.width)||50)},u={defaultOptions:()=>({scrolling:{columnRenderingMode:"standard",columnPageSize:5,columnRenderingThreshold:300}}),extenders:{controllers:{columns:h=>class extends h{init(){super.init.apply(this,arguments),this._resizingController=this.getController("resizing"),this._beginPageIndex=null,this._endPageIndex=null,this._position??(this._position=0),this._virtualVisibleColumns={}}dispose(){clearTimeout(this._changedTimeout),super.dispose.apply(this,arguments)}resetColumnsCache(){super.resetColumnsCache(),this._virtualVisibleColumns={}}getBeginPageIndex(g){const _=this.getVisibleColumns(void 0,!0),x=s(_);let w=0;for(let D=0;D<x.length;D++){if(w>=g)return Math.floor(D/this.getColumnPageSize());w+=x[D]}return 0}getTotalWidth(){const g=this.option("width");return"number"==typeof g?g:this._resizingController._lastWidth||(0,o.Ot)(this.component.$element())}getEndPageIndex(g){const _=this.getVisibleColumns(void 0,!0),x=s(_);let w=0;g+=this.getTotalWidth();for(let D=0;D<x.length;D++){if(w>=g)return Math.ceil(D/this.getColumnPageSize());w+=x[D]}return Math.ceil(x.length/this.getColumnPageSize())}getColumnPageSize(){return this.option("scrolling.columnPageSize")}_fireColumnsChanged(){const g=new Date;this.columnsChanged.fire({optionNames:{all:!0,length:1},changeTypes:{columns:!0,virtualColumnsScrolling:!0,length:2}}),this._renderTime=new Date-g}getScrollingTimeout(){const g=this.option("scrolling.columnRenderingThreshold"),_=this.option("scrolling.renderAsync");let x=0;return(!(0,P.O9)(_)&&this._renderTime>g||_)&&(x=this.option("scrolling.timeout")),x}setScrollPosition(g){const _=this.getScrollingTimeout();_>0?(clearTimeout(this._changedTimeout),this._changedTimeout=setTimeout(()=>{this._setScrollPositionCore(g)},_)):this._setScrollPositionCore(g)}isVirtualMode(){return(0,b.Vd)()&&"virtual"===this.option("scrolling.columnRenderingMode")}resize(){this._setScrollPositionCore(this._position)}_setScrollPositionCore(g){const _=this;if(_.isVirtualMode()){const x=_.getBeginPageIndex(g),w=_.getEndPageIndex(g),D=g<_._position?_._beginPageIndex>x:_._endPageIndex<w;_._position=g,D&&(_._beginPageIndex=x,_._endPageIndex=w,_._fireColumnsChanged())}}getFixedColumns(g,_){const x=super.getFixedColumns(g);if(this.isVirtualMode()&&!_&&x.length){const w=x.map(D=>D.command).indexOf("transparent");return x[w].colspan=this.getVisibleColumns().length-super.getFixedColumns().length+1,x}return x}_compileVisibleColumns(g,_){var x;if(_||!this.isVirtualMode()||!this._shouldReturnVisibleColumns())return super._compileVisibleColumns(g);null!==(x=this._columns)&&void 0!==x&&x.length&&!(0,P.O9)(this._beginPageIndex)&&!(0,P.O9)(this._endPageIndex)&&(this._beginPageIndex=this.getBeginPageIndex(this._position),this._endPageIndex=this.getEndPageIndex(this._position));const w=this._beginPageIndex,D=this._endPageIndex,C=`${g}-${w}-${D}`;if(this._virtualVisibleColumns[C])return this._virtualVisibleColumns[C];let I=super._compileVisibleColumns();const L=this.getRowCount(),N=this.getColumnPageSize();let G=w*N,k=D*N;const U=this.getFixedColumns(void 0,!0),B=U.map(te=>te.command).indexOf("transparent"),K=U.length?B:0;let J=I.slice(0,K);const ie=I.slice(K,G),re=s(ie).reduce((te,pe)=>te+pe,0);re||(G=0);const q=U.length?U.length-B-1:0;let Y=I.slice(I.length-q);const Z=I.slice(k,I.length-q),Q=s(Z).reduce((te,pe)=>te+pe,0);if(Q||(k=I.length),L>1&&"number"==typeof g){const te=[];for(let pe=0;pe<=L;pe++)te.push(super._compileVisibleColumns(pe));J=(0,S.i)(te,0,J.length)[g]||[],Y=(0,S.i)(te,I.length-Y.length,I.length)[g]||[],I=(0,S.i)(te,G,k)[g]||[]}else I=I.slice(G,k);return re&&(I.unshift({command:"virtual",type:"virtual",width:re}),I=J.concat(I)),Q&&(I.push({command:"virtual",type:"virtual",width:Q}),I=I.concat(Y)),this._virtualVisibleColumns[C]=I,I}getColumnIndexOffset(){let g=0;if(this._beginPageIndex>0){const x=this.getFixedColumns().map(D=>D.command).indexOf("transparent"),w=x>=0?x:0;g=this._beginPageIndex*this.getColumnPageSize()-w-1}return g>0?g:0}}},views:{columnHeadersView:h=>class extends(y(h)){_renderCore(){const g=super._renderCore.apply(this,arguments);return this._columnsController.isVirtualMode()&&this._updateScrollLeftPosition(),g}},rowsView:h=>class extends(y(h)){_resizeCore(){super._resizeCore.apply(this,arguments),this._columnsController.resize()}_handleScroll(g){const _=this.getScrollable();let{left:x}=g.scrollOffset;super._handleScroll.apply(this,arguments),this.option("rtlEnabled")&&_&&(x=(0,o.RG)(_.$content())-(0,o.RG)(_.$element())-x),this._columnsController.setScrollPosition(x)}_renderCore(g){if(null!=g&&g.virtualColumnsScrolling){var _,x;const w=this._findContentElement(),D=null===(_=this._columnsController)||void 0===_?void 0:_.getFixedColumns(),C=null===(x=this._scrollable)||void 0===x?void 0:x.option("useNative");if(null!=D&&D.length){w.css({minHeight:C?(0,o.Oq)(w):f.A.getContentHeightLimit(W.A)});const I=()=>{this.resizeCompleted.remove(I),w.css({minHeight:""})};this.resizeCompleted.add(I)}}return super._renderCore.apply(this,arguments)}}}}}},2:(In,Ze,M)=>{"use strict";M.d(Ze,{i:()=>P,z:()=>o});var W=M(3090);function o(b,f,S,T,y,d){d=d||[],(T=T||[])[S=S||0]=T[S]||0;const c=b[S];let u,a=0;if(c){for(u=d[S]+1||0;u<c.length;u++){const h=c[u],g=u+T[S],_=h.colspan||1;if(o(b,f,S+(h.rowspan||1),T,_,d),T[S]+=_-1,a+=_,h.rowspan)for(let x=S+1;x<S+h.rowspan;x++)T[x]=T[x]||0,T[x]+=h.colspan||1;if(!1===f(h,g,S,u)||void 0!==y&&a>=y)break}d[S]=u}}function P(b,f,S){const T=[];o(b,(y,d,c)=>{let a,s=y;const u=s.colspan||1,h=d+u-1>=f&&d<S;if(T[c]=T[c]||[],h)d<f?(a=u-(f-d),d=f):a=u,d+a>S&&(a=S-d),a!==u&&(s=(0,W.X)({},s,{colspan:a})),T[c].push(s);else if(d>S)return!1});for(let y=0;y<T.length;y++)T[y]=T[y]||[];return T}},830:(In,Ze,M)=>{"use strict";M.d(Ze,{f4:()=>oe,p:()=>te,yo:()=>Q});var W=M(5704),o=M(36),P=M(6021),b=M(1832),f=M(2660),S=M(4757),T=M(1363),y=M(1830),d=M(6110),c=M(2359),s=M(127),a=M(8736),u=M(1948);const _="dx-freespace-row",N="scrolling.legacyMode",k=["beginPageIndex","endPageIndex","pageIndex"],U=function(ae){return"virtual"===ae.option("scrolling.mode")},B=function(ae){return"infinite"===ae.option("scrolling.mode")},K=function(ae){return U(ae)||B(ae)},J=function(ae,ee,he,de){for(let ue=0;ue<ee+1;ue++){const be=ae[he?ae.length-1-ue:ue];be&&!de(be,ue===ee,he)&&ee++}return ee},ie=function(ae,ee){return"data"===ae.rowType&&!ae.isNewRow||"group"===ae.rowType&&ee.isGroupItemCountable(ae.data)},q=function(ae){const ee=ae._virtualScrollController.beginPageIndex(-1);U(ae)&&(ee<0||ae.viewportSize()>=0&&ae.getViewportItemIndex()>=0&&(ee*ae.pageSize()>ae.getViewportItemIndex()||ee*ae.pageSize()+ae.itemsCount()<ae.getViewportItemIndex()+ae.viewportSize())&&ae._dataSource.isLoading()?ae._isLoading||(ae._isLoading=!0,ae.loadingChanged.fire(!0)):ae._isLoading&&(ae._isLoading=!1,ae.loadingChanged.fire(!1)))},Y=function(ae,ee,he){if(!1===ae.option(N)&&k.includes(ee)){const ue=ae._dataSource;return ue.pageIndex.apply(ue,he)}const de=ae._virtualScrollController;return de[ee].apply(de,he)},Z=function(ae,ee){const he=ae.toArray().map(ue=>(0,W.A)(ue).parent(`.${ee}`).get(0)).filter(ue=>ue);he.length&&(ae=(0,W.A)(he));const de=ee===_?ae.length-1:ae.length;for(let ue=0;ue<de;ue++)ae.eq(ue).remove()},Q=ae=>class extends ae{init(){super.init.apply(this,arguments),this._items=[],this._totalCount=-1,this._isLoaded=!0,this._loadPageCount=1,this._virtualScrollController=new u.XZ(this.component,this._getVirtualScrollDataOptions())}dispose(){this._virtualScrollController.dispose(),super.dispose.apply(this,arguments)}_getVirtualScrollDataOptions(){const ee=this;return{pageSize:()=>ee.pageSize(),totalItemsCount:()=>ee.totalItemsCount(),hasKnownLastPage:()=>ee.hasKnownLastPage(),pageIndex:he=>ee._dataSource.pageIndex(he),isLoading:()=>ee._dataSource.isLoading()&&!ee.isCustomLoading(),pageCount:()=>ee.pageCount(),load:()=>ee._dataSource.load(),updateLoading(){q(ee)},itemsCount:()=>ee.itemsCount(!0),items:()=>ee._dataSource.items(),viewportItems:he=>(he&&(ee._items=he),ee._items),onChanged(he){ee.changed.fire(he)},changingDuration:()=>ee.isLoading()?300:ee._renderTime||0}}_handleLoadingChanged(ee){!1!==this.option(N)?((!U(this)||this._isLoadingAll)&&(this._isLoading=ee,super._handleLoadingChanged.apply(this,arguments)),this._startLoadTime=ee?new Date:void 0):super._handleLoadingChanged.apply(this,arguments)}_handleLoadError(){!1!==this.option(N)&&(this._isLoading=!1,this.loadingChanged.fire(!1)),super._handleLoadError.apply(this,arguments)}_handleDataChanged(ee){if(!1===this.option(N))return this._items=this._dataSource.items().slice(),this._totalCount=this._dataSourceTotalCount(!0),void super._handleDataChanged.apply(this,arguments);const he=super._handleDataChanged.bind(this);this._virtualScrollController.handleDataChanged(he,ee)}_customizeRemoteOperations(ee,he){const de=!1===this.option(N);let ue=this.option("scrolling.renderAsync");(0,y.O9)(ue)||(ue=this._renderTime>=this.option("scrolling.renderingThreshold")),(U(this)||B(this)&&de)&&!he.reload&&(he.skip||de)&&!ue&&(ee.delay=void 0),super._customizeRemoteOperations.apply(this,arguments)}items(){return this._items}_dataSourceTotalCount(ee){return!1===this.option(N)&&U(this)&&!ee?this._totalCount:super._dataSourceTotalCount()}itemsCount(ee){return ee||!1===this.option(N)?super.itemsCount():this._virtualScrollController.itemsCount()}load(ee){return!1===this.option(N)||ee?super.load(ee):this._virtualScrollController.load()}isLoading(){return!1===this.option(N)?this._dataSource.isLoading():this._isLoading}isLoaded(){return this._dataSource.isLoaded()&&this._isLoaded}resetPagesCache(ee){ee||this._virtualScrollController.reset(!0),super.resetPagesCache.apply(this,arguments)}_changeRowExpandCore(){const ee=super._changeRowExpandCore.apply(this,arguments);return!1===this.option(N)||(this.resetPagesCache(),q(this)),ee}reload(){this._dataSource.pageIndex(this.pageIndex());const ee=this._virtualScrollController;if(!1!==this.option(N)&&ee){const he=new P.cY;return super.reload.apply(this,arguments).done(de=>{const ue=ee.getDelayDeferred();ue?ue.done(he.resolve).fail(he.reject):he.resolve(de)}).fail(he.reject),he}return super.reload.apply(this,arguments)}refresh(ee,he){if(!1!==this.option(N)){const{storeLoadOptions:de}=ee,ue=this._dataSource;he.reload?(this._virtualScrollController.reset(),ue.items().length=0,this._isLoaded=!1,q(this),this._isLoaded=!0,B(this)?(this.pageIndex(0),ue.pageIndex(0),de.pageIndex=0,ee.pageIndex=0,de.skip=0):(ue.pageIndex(this.pageIndex()),ue.paginate()&&(ee.pageIndex=this.pageIndex(),de.skip=this.pageIndex()*this.pageSize()))):B(this)&&de.skip&&this._totalCountCorrection<0&&(de.skip+=this._totalCountCorrection)}return super.refresh.apply(this,arguments)}loadPageCount(ee){if(!(0,y.O9)(ee))return this._loadPageCount;this._loadPageCount=ee}_handleDataLoading(ee){const he=this.loadPageCount(),de=this.pageSize(),ue=!1===this.option(N),{storeLoadOptions:be}=ee,ve=(0,y.O9)(be.take);ee.loadPageCount=he,!ee.isCustomLoading&&ue&&ve&&he>1&&de>0&&(be.take=he*de),super._handleDataLoading.apply(this,arguments)}_loadPageSize(){return super._loadPageSize.apply(this,arguments)*this.loadPageCount()}beginPageIndex(){return Y(this,"beginPageIndex",[...arguments])}endPageIndex(){return Y(this,"endPageIndex",[...arguments])}pageIndex(ee){return Y(this,"pageIndex",[...arguments])}virtualItemsCount(){return Y(this,"virtualItemsCount",[...arguments])}getContentOffset(){return Y(this,"getContentOffset",[...arguments])}getVirtualContentSize(){return Y(this,"getVirtualContentSize",[...arguments])}setContentItemSizes(){return Y(this,"setContentItemSizes",[...arguments])}setViewportPosition(){return Y(this,"setViewportPosition",[...arguments])}getViewportItemIndex(){return Y(this,"getViewportItemIndex",[...arguments])}setViewportItemIndex(ee){return Y(this,"setViewportItemIndex",[...arguments])}getItemIndexByPosition(){return Y(this,"getItemIndexByPosition",[...arguments])}viewportSize(){return Y(this,"viewportSize",[...arguments])}viewportItemSize(){return Y(this,"viewportItemSize",[...arguments])}getItemSize(){return Y(this,"getItemSize",[...arguments])}getItemSizes(){return Y(this,"getItemSizes",[...arguments])}loadIfNeed(){return Y(this,"loadIfNeed",[...arguments])}},te=ae=>class extends ae{dispose(){const ee=this._rowsScrollController;ee&&ee.dispose(),super.dispose.apply(this,arguments)}_refreshDataSource(){const ee=super._refreshDataSource.apply(this,arguments)||(new P.cY).resolve().promise();return ee.done(this.initVirtualRows.bind(this)),ee}_loadDataSource(){if(this._rowsScrollController&&K(this)){var ee;const{loadPageCount:he}=(0,y.O9)(this._loadViewportParams)?this.getLoadPageParams():{loadPageCount:0};he>=1&&(null===(ee=this._dataSource)||void 0===ee||ee.loadPageCount(he))}return super._loadDataSource.apply(this,arguments)}getRowPageSize(){const ee=this.option("scrolling.rowPageSize"),he=this.pageSize();return he&&he<ee?he:ee}reload(){const ee=this._rowsScrollController||this._dataSource,he=ee&&ee.getItemIndexByPosition(),de=super.reload.apply(this,arguments);return de&&de.done(()=>{if(U(this)||a.A.isVirtualRowRendering(this)){const be=this.getRowIndexOffset(),ve=Math.floor(he)-be,{component:le}=this,Ce=le.getScrollable&&le.getScrollable(),ye=this.dataSource().operationTypes().sorting;if(Ce&&!ye&&ve>=0){var ue;const ge=le.getRowElement(ve),fe=ge&&ge[0]&&(0,W.A)(ge[0]);let xe=fe&&(null===(ue=fe.position())||void 0===ue?void 0:ue.top);const Te=o.A.chrome&&Number(o.A.version??0)>=91;xe&&xe>(o.A.mozilla||Te?1:0)&&(xe=Math.round(xe+(0,T.P$)(fe)*(he%1)),Ce.scrollTo({y:xe}))}}})}initVirtualRows(){const ee=a.A.isVirtualRowRendering(this);if(this._allItems=null,this._loadViewportParams=null,"virtual"!==this.option("scrolling.mode")&&!ee||!ee||!1!==this.option(N)&&!this.option("scrolling.rowPageSize"))return this._visibleItems=null,void(this._rowsScrollController=null);const he=!U(this)&&this.pageIndex()>=this.pageCount()?this.pageCount()-1:this.pageIndex();this._rowPageIndex=Math.ceil(he*this.pageSize()/this.getRowPageSize()),this._visibleItems=!1===this.option(N)?null:[],this._viewportChanging=!1,this._needUpdateViewportAfterLoading=!1,this._rowsScrollController||(this._rowsScrollController=new u.XZ(this.component,this._getRowsScrollDataOptions(),!0),this._rowsScrollController.positionChanged.add(()=>{var de;if(!1===this.option(N))return this._viewportChanging=!0,this.loadViewport(),void(this._viewportChanging=!1);null===(de=this._dataSource)||void 0===de||de.setViewportItemIndex(this._rowsScrollController.getViewportItemIndex())})),!1===this.option(N)&&this._updateLoadViewportParams(),this.isLoaded()&&!1!==this.option(N)&&this._rowsScrollController.load()}isViewportChanging(){return this._viewportChanging}_getRowsScrollDataOptions(){const ee=this,he=function(de){return ie(de,ee._dataSource)};return{pageSize:()=>ee.getRowPageSize(),loadedOffset(){var de;return U(ee)&&(null===(de=ee._dataSource)||void 0===de?void 0:de.lastLoadOptions().skip)||0},loadedItemCount:()=>ee._itemCount,totalItemsCount:()=>K(ee)?ee.totalItemsCount():!1===ee.option(N)?ee._itemCount:ee._items.filter(he).length,hasKnownLastPage:()=>!1!==ee.option(N)||ee.hasKnownLastPage(),pageIndex:de=>(void 0!==de&&(ee._rowPageIndex=de),ee._rowPageIndex),isLoading:()=>ee.isLoading(),pageCount(){return Math.ceil(this.totalItemsCount()/this.pageSize())||1},load(){ee._rowsScrollController.pageIndex()>=this.pageCount()&&(ee._rowPageIndex=this.pageCount()-1,ee._rowsScrollController.pageIndex(ee._rowPageIndex)),(this.items().length||!this.totalItemsCount())&&ee._rowsScrollController.handleDataChanged(de=>{(de=de||{}).changeType=de.changeType||"refresh",de.items=de.items||ee._visibleItems,ee._visibleItems.forEach((ue,be)=>{ue.rowIndex=be}),ee._fireChanged(de)})},updateLoading(){},itemsCount(){return this.items(!0).length},correctCount:(de,ue,be)=>J(de,ue,be,(ve,le,Ce)=>ve.isNewRow?le&&!Ce:le&&Ce?!ve.isNewRow:he(ve)),items(de){let ue=ee._items;if(ee.option(N)){const be=ee.dataSource(),ve=be?.virtualItemsCount(),le=ve?ve.begin:0,Ce=ee.getRowPageSize();let ye=ee._rowPageIndex*Ce-le,ge=Ce;if(ye<0)return[];ye&&(ye=this.correctCount(ue,ye),ue=ue.slice(ye)),ge&&(ge=this.correctCount(ue,ge),ue=ue.slice(0,ge))}return de?ue.filter(he):ue},viewportItems:de=>(de&&!1!==ee.option(N)&&(ee._visibleItems=de),ee._visibleItems),onChanged(){},changingDuration(){const de=ee.dataSource();return null!=de&&de.isLoading()&&!1!==ee.option(N)?300:de?._renderTime||0}}}_updateItemsCore(ee){const he=this.getRowIndexDelta();if(super._updateItemsCore.apply(this,arguments),!1===this.option(N)&&a.A.isVirtualRowRendering(this))return void("update"===ee.changeType&&0===ee.rowIndices.length&&ee.cancelEmptyChanges&&(ee.cancel=!0));const de=this._rowsScrollController;if(de){const ue=this._visibleItems,be="refresh"===ee.changeType||ee.isLiveUpdate;if("append"===ee.changeType&&ee.items&&!ee.items.length)return;be||"append"===ee.changeType||"prepend"===ee.changeType?(ee.cancel=!0,be&&de.reset(!0),de.load()):("update"===ee.changeType?ee.rowIndices.forEach((ve,le)=>{const Ce=ee.changeTypes[le],ye=ee.items[le];"update"===Ce?ue[ve]=ye:"insert"===Ce?ue.splice(ve,0,ye):"remove"===Ce&&ue.splice(ve,1)}):(ue.forEach((ve,le)=>{ue[le]=this._items[le+he]||ue[le]}),ee.items=ue),function(ae){ae.forEach((ee,he)=>{ee.rowIndex=he})}(ue))}}_updateLoadViewportParams(){const ee=this._rowsScrollController.getViewportParams(),he=this.pageSize();if(ee&&!K(this)&&he>0){const de=this.pageIndex()*he;ee.skip+=de}this._loadViewportParams=ee}_processItems(){const ee=super._processItems.apply(this,arguments);if(!1===this.option(N)){const he=this._dataSource;let ue,be,ve,de=he?.lastLoadOptions().skip??0,le=!1,Ce=[];ee.forEach(ye=>{const{rowType:ge}=ye,fe=ie(ye,he),xe="group"===ge&&(ue||fe||"group"!==be&&de>0),Te="data"===ge&&fe&&(ue||"group"!==be);!ye.isNewRow&&(0,y.O9)(ue)&&(xe||Te)&&!(ve&&!le)&&de++,(xe||Te)&&(le=!0),ye.isNewRow?Ce.push(ye):(Ce.forEach(Ee=>{Ee.loadIndex=de}),Ce=[]),ye.loadIndex=de,ue=fe,be=ge,ve=ye.isNewRow}),Ce.forEach(ye=>{ye.loadIndex=de})}return ee}_afterProcessItems(ee){if(this._itemCount=ee.filter(he=>ie(he,this._dataSource)).length,(0,y.O9)(this._loadViewportParams)){this._updateLoadViewportParams();let he=ee;if(this._allItems=ee,ee.length){const{skipForCurrentPage:de}=this.getLoadPageParams(!0),ue=ee[0].loadIndex+de,{take:be}=this._loadViewportParams;he=ee.filter(ve=>ve.loadIndex>=ue&&(ve.loadIndex<ue+be||ve.isNewRow&&ve.loadIndex===ue&&0===be))}return he}return super._afterProcessItems.apply(this,arguments)}_applyChange(ee){const he=this,{items:de}=ee,{changeType:ue}=ee;let{removeCount:be}=ee;switch(be&&(be=J(he._items,be,"prepend"===ue,(le,Ce)=>"data"===le.rowType&&!le.isNewRow||"group"===le.rowType&&(he._dataSource.isGroupItemCountable(le.data)||Ce)),ee.removeCount=be),ue){case"prepend":he._items.unshift.apply(he._items,de),be&&he._items.splice(-be);break;case"append":he._items.push.apply(he._items,de),be&&he._items.splice(0,be);break;default:super._applyChange(ee)}}items(ee){return ee?this._allItems||this._items:this._visibleItems||this._items}getRowIndexDelta(){let ee=0;if(this.option(N)){const he=this._visibleItems;he&&he[0]&&(ee=this._items.indexOf(he[0]))}return ee<0?0:ee}getRowIndexOffset(ee,he){let de=0;const ue=this.dataSource(),be=this._rowsScrollController,ve=!1===this.option(N),le=K(this);if(be&&!ee)if(ve&&(0,y.O9)(this._loadViewportParams)){const{skipForCurrentPage:ye,pageIndex:ge}=this.getLoadPageParams(!0),fe=this.items(!0);if(de=le?ge*this.pageSize():0,fe.length){const xe=fe[0].loadIndex;de+=fe.filter(Te=>Te.loadIndex<xe+ye).length}}else de=be.beginPageIndex()*be.pageSize();else if(le&&ve&&ue){var Ce;const ye=ue.lastLoadOptions();de=he&&null!==(Ce=ye.skips)&&void 0!==Ce&&Ce.length?ye.skips.reduce((ge,fe)=>ge+fe,0):ye.skip??0}else U(this)&&ue&&(de=ue.beginPageIndex()*ue.pageSize());return de}getDataIndex(){return!1===this.option(N)?this.getRowIndexOffset(!0,!0):super.getDataIndex.apply(this,arguments)}viewportSize(){const ee=this._rowsScrollController,he=this._dataSource,de=ee?.viewportSize.apply(ee,arguments);return!1===this.option(N)?de:he?.viewportSize.apply(he,arguments)}viewportHeight(ee,he){var de;null===(de=this._rowsScrollController)||void 0===de||de.viewportHeight(ee,he)}viewportItemSize(){const ee=this._rowsScrollController,he=this._dataSource,de=ee?.viewportItemSize.apply(ee,arguments);return!1===this.option(N)?de:he?.viewportItemSize.apply(he,arguments)}setViewportPosition(){const ee=this._rowsScrollController,he=this._dataSource;this._isPaging=!1,ee?ee.setViewportPosition.apply(ee,arguments):he?.setViewportPosition.apply(he,arguments)}setContentItemSizes(ee){const he=this._rowsScrollController,de=this._dataSource,ue=he?.setContentItemSizes(ee);return!1===this.option(N)?ue:de?.setContentItemSizes(ee)}getPreloadedRowCount(){const ee=this.option("scrolling.preloadedRowCount"),he=this.option("scrolling.preloadEnabled");if((0,y.O9)(ee))return ee;const de=this.viewportSize();return he?2*de:de}getLoadPageParams(ee){var he,de;const ue=this.pageSize(),be=this._loadViewportParams,ve=null===(he=this._dataSource)||void 0===he?void 0:he.lastLoadOptions(),le=ve?.pageIndex||0,Ce=ve?.take||0,ye=this._rowsScrollController.isScrollingBack(),ge=ye?this.getPreloadedRowCount():0,fe=ye?0:this.getPreloadedRowCount(),xe=(null===(de=this._dataSource)||void 0===de?void 0:de.totalCountCorrection())||0,Te=Math.max(0,be.skip-ge),Ee=ee?le:Math.floor(ue?Te/ue:0),ze=be.skip-Ee*ue,Ue=Math.ceil(ue?(ee?Ce:be.take+ze+fe-xe)/ue:0);return{pageIndex:Ee,loadPageCount:Math.max(1,Ue),skipForCurrentPage:Math.max(0,ze)}}_updateVisiblePageIndex(ee){if(!this._rowsScrollController)return;if((0,y.O9)(ee))return this._silentOption("paging.pageIndex",ee),void this.pageChanged.fire();const he=this._rowsScrollController.getViewportItemIndex(),de=Math.floor(he/this.pageSize());this.pageIndex()!==de&&(this._silentOption("paging.pageIndex",de),this.updateItems({changeType:"pageIndex"}))}_getChangedLoadParams(){const ee=this.getLoadPageParams(!0),{pageIndex:he,loadPageCount:de}=this.getLoadPageParams(),ue=this._pageIndexIsValid(he);let be=null;return!this._isLoading&&ue&&(he!==ee.pageIndex||de!==ee.loadPageCount)&&(be={pageIndex:he,loadPageCount:de}),be}_pageIndexIsValid(ee){let he=!0;return(B(this)&&this.hasKnownLastPage()||U(this))&&(he=ee*this.pageSize()<this.totalItemsCount()),he}_loadItems(ee,he){const de=K(this),ue=this._dataSource,be=this._getChangedLoadParams(),ve=ue?.loadPageCount()??0,le=this.pageSize()*ve,Ce=ue?.pageIndex()??0,ye=be?.pageIndex===Ce,ge=B(this)&&this.totalItemsCount()<le,fe="repaint"===this.option("editing.refreshMode");let Te=!1;if(!ue||de&&ee&&(fe&&he||be?.pageIndex>Ce||ye&&ge))return Te;if(de&&this._isLoading&&(this._needUpdateViewportAfterLoading=!0),de&&be){Te=!0,ue.pageIndex(be.pageIndex),ue.loadPageCount(be.loadPageCount),this._repaintChangesOnly=!0,this._needUpdateDimensions=!0;const Ee=this._viewportChanging;this.load().always(()=>{this._repaintChangesOnly=void 0,this._needUpdateDimensions=void 0}).done(()=>{const Oe=this.pageCount()>0&&this.pageIndex()===this.pageCount()-1;(Ee||Oe)&&this._updateVisiblePageIndex(),this._needUpdateViewportAfterLoading&&(this._needUpdateViewportAfterLoading=!1,this.loadViewport({checkLoadedParamsOnly:!0}))})}return Te}loadViewport(ee){const{checkLoadedParamsOnly:he,checkLoading:de,viewportIsNotFilled:ue}=ee??{};if(K(this)||a.A.isVirtualRowRendering(this)){var ve;this._updateLoadViewportParams();const Ce=this._loadItems(de,!ue),ye=null===(ve=this._dataSource)||void 0===ve?void 0:ve.isCustomLoading();if(!(Ce||de&&!ye&&this._isLoading||he)){var le;const xe=!(null!==(le=this._editingController)&&void 0!==le&&null!==(le=le.getChanges())&&void 0!==le&&le.length);this.updateItems({repaintChangesOnly:!0,needUpdateDimensions:!0,useProcessedItemsCache:xe,cancelEmptyChanges:!0})}}}updateViewport(){var ee;const he=this.viewportSize(),de=this.items().length,ue=he>de,be=(null===(ee=this._loadViewportParams)||void 0===ee?void 0:ee.take)??0,ve=this._rowsScrollController,le=ve?.getViewportParams().take;(ue||be<le)&&!this._isPaging&&de&&this.loadViewport({checkLoading:!0,viewportIsNotFilled:ue})}loadIfNeed(){if(!1===this.option(N))return;const ee=this._rowsScrollController;ee&&ee.loadIfNeed();const he=this._dataSource;return he&&he.loadIfNeed()}getItemSize(){const ee=this._rowsScrollController;if(ee)return ee.getItemSize.apply(ee,arguments);const he=this._dataSource;return he&&he.getItemSize.apply(he,arguments)}getItemSizes(){const ee=this._rowsScrollController;if(ee)return ee.getItemSizes.apply(ee,arguments);const he=this._dataSource;return he&&he.getItemSizes.apply(he,arguments)}getContentOffset(){const ee=this._rowsScrollController;if(ee)return ee.getContentOffset.apply(ee,arguments);const he=this._dataSource;return he&&he.getContentOffset.apply(he,arguments)}refresh(ee){const he=this._dataSource;return he&&ee&&ee.load&&B(this)&&he.resetCurrentTotalCount(),super.refresh.apply(this,arguments)}topItemIndex(){var ee;return null===(ee=this._loadViewportParams)||void 0===ee?void 0:ee.skip}bottomItemIndex(){const ee=this._loadViewportParams;return ee&&ee.skip+ee.take}virtualItemsCount(){const ee=this._rowsScrollController;if(ee)return ee.virtualItemsCount.apply(ee,arguments);const he=this._dataSource;return he?.virtualItemsCount.apply(he,arguments)}pageIndex(ee){const he=K(this),de=this._rowsScrollController;return!1===this.option(N)&&he&&de&&void 0===ee?this.option("paging.pageIndex")??0:super.pageIndex.apply(this,arguments)}_fireChanged(ee){super._fireChanged.apply(this,arguments);const{operationTypes:he}=ee;if(!1===this.option(N)&&K(this)&&he){const{fullReload:de,pageIndex:ue}=he;ee.isDataChanged&&!de&&ue&&this._updateVisiblePageIndex(this._dataSource.pageIndex())}}_getPagingOptionValue(ee){let he=super._getPagingOptionValue.apply(this,arguments);return!1===this.option(N)&&K(this)&&(he=this[ee]()),he}isEmpty(){return!1===this.option(N)?!this.items(!0).length:super.isEmpty.apply(this,arguments)}isLastPageLoaded(){let ee=!1;if(!1===this.option(N)&&K(this)){const{pageIndex:he,loadPageCount:de}=this.getLoadPageParams(!0);ee=he+de>=this.pageCount()}else ee=super.isLastPageLoaded.apply(this,arguments);return ee}reset(){this._itemCount=0,this._allItems=null,super.reset.apply(this,arguments)}_applyFilter(){var ee;return null===(ee=this._dataSource)||void 0===ee||ee.loadPageCount(1),super._applyFilter.apply(this,arguments)}getVirtualContentSize(){var ee;return null===(ee=this._dataSource)||void 0===ee?void 0:ee.getVirtualContentSize.apply(this._dataSource,arguments)}setViewportItemIndex(){var ee;return null===(ee=this._dataSource)||void 0===ee?void 0:ee.setViewportItemIndex.apply(this._dataSource,arguments)}},oe={defaultOptions:()=>({scrolling:{timeout:300,updateTimeout:300,minTimeout:0,renderingThreshold:100,removeInvisiblePages:!0,rowPageSize:5,prerenderedRowChunkSize:1,mode:"standard",preloadEnabled:!1,rowRenderingMode:"standard",loadTwoPagesOnStart:!1,legacyMode:!1,prerenderedRowCount:1}}),extenders:{controllers:{data:te,resizing:ae=>class extends ae{dispose(){super.dispose.apply(this,arguments),clearTimeout(this._resizeTimeout)}_updateMasterDataGridCore(ee){return(0,P.z7)(super._updateMasterDataGridCore.apply(this,arguments)).done(he=>{const de=U(ee)&&!1===ee.option(N);!he&&de&&ee.getScrollable()&&ee.updateDimensions()})}hasResizeTimeout(){return!!this._resizeTimeout}resize(){let ee;if(U(this)||a.A.isVirtualRowRendering(this)){clearTimeout(this._resizeTimeout),this._resizeTimeout=null;const he=new Date-this._lastTime,de=this.option("scrolling.updateTimeout");this._lastTime&&he<de?(ee=new P.cY,this._resizeTimeout=setTimeout(()=>{this._resizeTimeout=null,super.resize.apply(this).done(ee.resolve).fail(ee.reject),this._lastTime=new Date},de),this._lastTime=new Date):(ee=super.resize.apply(this),this._dataController.isLoaded()&&(this._lastTime=new Date))}else ee=super.resize.apply(this);return ee}}},views:{rowsView:ae=>class extends ae{init(){var ee;super.init(),this._dataController.pageChanged.add(he=>{const de=this._scrollTop;this.scrollToPage(he??this._dataController.pageIndex()),!1===this.option(N)&&this._scrollTop===de&&this._dataController.updateViewport()}),this._dataController.dataSourceChanged.add(()=>{!this._scrollTop&&this._scrollToCurrentPageOnResize()}),null===(ee=this._dataController.stateLoaded)||void 0===ee||ee.add(()=>{this._scrollToCurrentPageOnResize()}),this._scrollToCurrentPageOnResize()}dispose(){clearTimeout(this._scrollTimeoutID),super.dispose()}_scrollToCurrentPageOnResize(){if(this._dataController.pageIndex()>0){const ee=()=>{this.resizeCompleted.remove(ee),this.scrollToPage(this._dataController.pageIndex())};this.resizeCompleted.add(ee)}}scrollToPage(ee){const he=this._dataController?this._dataController.pageSize():0;let de;if(U(this)||B(this)){const ue=this._dataController.getItemSize(),be=this._dataController.getItemSizes(),ve=ee*he;de=ve*ue;for(const le in be)parseInt(le)<ve&&(de+=be[le]-ue)}else de=0;this.scrollTo({y:de,x:this._scrollLeft})}renderDelayedTemplates(){this.waitAsyncTemplates().done(()=>{this._updateContentPosition(!0)}),super.renderDelayedTemplates.apply(this,arguments)}_renderCore(ee){const he=new Date,de=super._renderCore.apply(this,arguments),ue=this._dataController._dataSource;if(ue&&ee){const be=ee.items?ee.items.length:20,ve=this._dataController.viewportSize()||20;ue._renderTime=a.A.isVirtualRowRendering(this)&&be>0&&!1!==this.option(N)?(new Date-he)*ve/be:new Date-he}return de}_getRowElements(ee){const he=super._getRowElements(ee);return he&&he.not(".dx-virtual-row")}_removeRowsElements(ee,he,de){let ue=this._getRowElements(ee).toArray();ue="append"===de?ue.slice(0,he):ue.slice(-he),ue.map(be=>{const ve=(0,W.A)(be);this._errorHandlingController&&this._errorHandlingController.removeErrorRow(ve.next()),ve.remove()})}_updateContent(ee,he){let de;const ue=this._findContentElement(),be=he&&he.changeType,ve=(0,P.cY)(),le=ue.children().first();return"append"===be||"prepend"===be?this.waitAsyncTemplates().done(()=>{const Ce=this._getBodies(ee);1===Ce.length?this._getBodies(le)["append"===be?"append":"prepend"](Ce.children()):Ce["append"===be?"appendTo":"prependTo"](le),ee.remove(),de=this._getFreeSpaceRowElements(le),Z(de,_),he.removeCount&&this._removeRowsElements(le,he.removeCount,be),this._restoreErrorRow(le),ve.resolve()}).fail(ve.reject):super._updateContent.apply(this,arguments).done(()=>{"update"===be&&this._restoreErrorRow(le),ve.resolve()}).fail(ve.reject),ve.promise().done(()=>{this._updateBottomLoading()})}_addVirtualRow(ee,he,de,ue){if(!ue)return;let be=this._createEmptyRow("dx-virtual-row",he,ue);be=this._wrapRowIfNeed(ee,be),this._appendEmptyRow(ee,be,de)}_updateContentItemSizes(){const ee=this._getRowHeights(),he=this._correctRowHeights(ee);this._dataController.setContentItemSizes(he)}_updateViewportSize(ee,he){(0,y.O9)(ee)||(ee=(0,T.P$)(this._hasHeight?this.element():(0,d.zk)())),this._dataController.viewportHeight(ee,he)}_getRowHeights(){var ee,he;const de=null===(ee=this._editingController)||void 0===ee||null===(he=ee.isPopupEditMode)||void 0===he?void 0:he.call(ee);let ue=this._getRowElements(this._tableElement).toArray();return de&&(ue=ue.filter(be=>!(0,W.A)(be).hasClass("dx-row-inserted"))),ue.map(be=>(0,S.N)(be).height)}_correctRowHeights(ee){const he=this._dataController,de=he._dataSource,ue=[],be=he.getVisibleRows();let ve=0,le=!0,Ce=-1;for(let ye=0;ye<ee.length;ye++){const ge=be[ye];(0,y.O9)(ge)&&(!1===this.option(N)?(Ce>=0&&Ce!==ge.loadIndex&&(ue.push(ve),ve=0),Ce=ge.loadIndex):ie(ge,de)&&(le?le=!1:(ue.push(ve),ve=0)),ve+=ee[ye])}return ve>0&&ue.push(ve),ue}_updateContentPosition(ee){if(this._dataController.viewportItemSize(this._rowHeight||20),U(this)||a.A.isVirtualRowRendering(this)){ee||this._updateContentItemSizes();const de=this._dataController.getContentOffset("begin"),ue=this._dataController.getContentOffset("end"),be=this.getTableElements(),ve=be.children("tbody").children(".dx-virtual-row");Z(ve,"dx-virtual-row"),be.each((le,Ce)=>{const ye=le>0,ge=this._isFixedTableRendering;this._isFixedTableRendering=ye,this._addVirtualRow((0,W.A)(Ce),ye,"top",de),this._addVirtualRow((0,W.A)(Ce),ye,"bottom",ue),this._isFixedTableRendering=ge})}}_isTableLinesDisplaysCorrect(ee){return ee.find(".dx-column-lines").length>0===this.option("showColumnLines")}_isColumnElementsEqual(ee,he){let de=ee.length===he.length;return de&&(0,f.__)(ee,(ue,be)=>{if(be.style.width!==he[ue].style.width)return de=!1,de}),de}_getCellClasses(ee){const he=[],{cssClass:de}=ee,ue="expand"===ee.command;return de&&he.push(de),ue&&he.push(this.addWidgetPrefix("group-space")),he}_findBottomLoadPanel(ee){const he=ee||this.element(),de=he&&he.find(`.${this.addWidgetPrefix("bottom-load-panel")}`);if(de&&de.length)return de}_updateBottomLoading(){const ee=this,he=U(this),de=B(this),ue=!ee._dataController.hasKnownLastPage()&&ee._dataController.isLoaded()&&(he||de),be=ee._findContentElement(),ve=ee._findBottomLoadPanel(be);ue?ve||(0,W.A)("<div>").addClass(ee.addWidgetPrefix("bottom-load-panel")).append(ee._createComponent((0,W.A)("<div>"),c.A,{elementAttr:{role:null,"aria-label":null}}).$element()).appendTo(be):ve&&ve.remove()}_handleScroll(ee){const he=!0===this.option(N);(this._scrollTop!==ee.scrollOffset.top||ee.forceUpdateScrollPosition)&&(this._hasHeight||!he&&0===ee.scrollOffset.top)&&this._rowHeight&&(this._scrollTop=ee.scrollOffset.top,(U(this)||"standard"!==this.option("scrolling.rowRenderingMode"))&&!1===this.option(N)&&(this._updateContentItemSizes(),this._updateViewportSize(null,this._scrollTop)),this._dataController.setViewportPosition(ee.scrollOffset.top)),super._handleScroll.apply(this,arguments)}_needUpdateRowHeight(ee){return super._needUpdateRowHeight.apply(this,arguments)||ee>0&&B(this)&&!a.A.isVirtualRowRendering(this)}_updateRowHeight(){if(super._updateRowHeight.apply(this,arguments),this._rowHeight){this._updateContentPosition();const ee=(0,T.P$)(this._hasHeight?this.element():(0,d.zk)());!1===this.option(N)?(this._updateViewportSize(ee),this._dataController.updateViewport()):this._dataController.viewportSize(Math.ceil(ee/this._rowHeight))}}updateFreeSpaceRowHeight(){const ee=super.updateFreeSpaceRowHeight.apply(this,arguments);return ee&&this._updateContentPosition(),ee}setLoading(ee,he){const de=this._dataController,ue=de.pageIndex()>0&&de.isLoaded()&&!!this._findBottomLoadPanel();!1===this.option(N)&&ee&&de.isViewportChanging()||(ue&&(ee=!1),super.setLoading.call(this,ee,he))}throwHeightWarningIfNeed(){void 0!==this._hasHeight&&!this._hasHeight&&K(this)&&!this._heightWarningIsThrown&&(this._heightWarningIsThrown=!0,s.A.log("W1025"))}_resizeCore(){const ee=this,he=ee.element();super._resizeCore(),this.throwHeightWarningIfNeed(),ee.component.$element()&&!ee._windowScroll&&(0,b.A1)(he)&&(ee._windowScroll=(0,u.Qr)(he,de=>{!ee._hasHeight&&ee._rowHeight&&ee._dataController.setViewportPosition(de)},ee.component.$element()),ee.on("disposing",()=>{ee._windowScroll.dispose()})),!1!==this.option(N)&&ee.loadIfNeed()}loadIfNeed(){var ee,he;null===(ee=this._dataController)||void 0===ee||null===(he=ee.loadIfNeed)||void 0===he||he.call(ee)}_restoreErrorRow(ee){var he;!1===this.option(N)&&(null===(he=this._errorHandlingController)||void 0===he||he.removeErrorRow()),super._restoreErrorRow.apply(this,arguments)}}}}}},1948:(In,Ze,M)=>{"use strict";M.d(Ze,{XZ:()=>J,Ay:()=>ie,Qr:()=>K});var W=M(6870),o=M(5704),P=M(36),b=M(8684),f=M(6021),S=M(2660),T=M(1830),y=M(6110),d=M(4072),c=M(8736);const s="scrolling.legacyMode",a=re=>re.option("scrolling.loadTwoPagesOnStart")||re._controller.isVirtual()||re._controller.getViewportItemIndex()>0,u=re=>re._cache.length?re._cache[0].pageIndex:-1,h=re=>re._cache.length?re._cache[re._cache.length-1].pageIndex:-1,g=(re,q,Y)=>{re._isChangedFiring=!0,q(Y),re._isChangedFiring=!1},_=(re,q,Y)=>{if(re._isDelayChanged)return re._isDelayChanged=!1,g(re,q,Y),!0},w=(re,q)=>{const Y=re.option("scrolling.preloadEnabled");let Z=(re=>{const q=re._dataOptions.pageSize();if(re.option("scrolling.preventPreload"))return 0;let Z=re._controller.viewportSize();if(re._controller.isVirtualMode()&&re.option("scrolling.removeInvisiblePages")){Z=0;const Q=re._controller.viewportSize()*re._controller.viewportItemSize();let te=re._controller.getContentOffset();const pe=re._controller.getViewportPosition(),z=re._controller.virtualItemsCount(),oe=re._dataOptions.totalItemsCount();for(let ae=z.begin;ae<oe&&!(te>=pe+Q);ae++)te+=re._controller.getItemSizes()[ae]||re._controller.viewportItemSize(),te>=pe&&Z++}return q&&Z>0?Math.ceil(Z/q):1})(re);const Q=re._controller.isAppendMode();return Z&&(q?Z=Y?1:0:(Y&&Z++,(Q||!a(re))&&Z--)),Z},I=(re,q,Y,Z,Q)=>{const te=re._dataOptions,pe=te.items().slice();let z=(0,T.Gv)(Y)?Y:void 0;const oe="prepend"===Y,ae=te.viewportItems();Y&&(0,T.Kg)(Y)&&!re._isDelayChanged&&(z={changeType:Y,items:pe},Q&&(z.removeCount=Q.itemsCount,z.removeCount&&te.correctCount&&(z.removeCount=te.correctCount(ae,z.removeCount,oe))));let ee=Q?Q.itemsLength:0;ee&&te.correctCount&&(ee=te.correctCount(ae,ee,oe)),"append"===Y?(ae.push.apply(ae,pe),Q&&ae.splice(0,ee)):oe?(ae.unshift.apply(ae,pe),Q&&ae.splice(-ee)):re._dataOptions.viewportItems(pe),te.updateLoading(),re._lastPageIndex=re.pageIndex(),re._isDelayChanged=Z,Z||g(re,q,z)};class L{constructor(q,Y){this._dataOptions=Y,this._controller=q,this._pageIndex=this._lastPageIndex=Y.pageIndex(),this._cache=[],this._loadingPageIndexes={}}option(){return this._controller.option.apply(this._controller,arguments)}viewportItemIndexChanged(q){const Y=this._dataOptions.pageSize(),Z=this._dataOptions.pageCount(),Q=this._controller.isVirtualMode(),te=this._controller.isAppendMode(),pe=this._dataOptions.totalItemsCount();let z;if(Y&&(Q||te)&&pe>=0){const oe=this._controller.viewportSize();if(oe&&q+oe>=pe&&!this._controller.isVirtual())if(this._dataOptions.hasKnownLastPage()){z=Z-1;const ae=pe%Y;z>0&&ae>0&&ae<oe&&z--}else z=Z;else{z=Math.floor(q/Y);const ae=Z-1;z=Math.max(z,0),z=Math.min(z,ae)}return this.pageIndex(z),this.load()}}pageIndex(q){const Y=this._controller.isVirtualMode(),Z=this._controller.isAppendMode();return!1!==this.option(s)&&(Y||Z)?(void 0!==q&&(this._pageIndex=q),this._pageIndex):this._dataOptions.pageIndex(q)}beginPageIndex(q){let Y=u(this);return Y<0&&(Y=void 0!==q?q:this.pageIndex()),Y}endPageIndex(){const q=h(this);return q>0?q:this._lastPageIndex}pageSize(){return this._dataOptions.pageSize()}load(){const q=this._dataOptions;let Y;const Z=this._controller.isVirtualMode(),Q=this._controller.isAppendMode();if(!1!==this.option(s)&&(Z||Q)){const te=(re=>{let q=-1;const Y=u(re),Z=re._dataOptions;return Y<0?q=re._pageIndex:re._cache[re._pageIndex-Y]?Y>=0&&re._controller.viewportSize()>=0&&(Y>0&&(h(re)+1===Z.pageCount()&&re._cache.length<w(re)+1||re._pageIndex===Y&&w(re,!0))&&(q=Y-1),q<0&&Y+re._cache.length<=re._pageIndex+w(re)&&(q=Y+re._cache.length)):q=re._pageIndex,re._loadingPageIndexes[q]&&(q=-1),q})(this);if(te>=0){const pe=((re,q)=>{const Y=re._dataOptions;if(q===re.pageIndex()||!Y.isLoading()&&q<Y.pageCount()||!Y.hasKnownLastPage()&&q===Y.pageCount())return Y.pageIndex(q),re._loadingPageIndexes[q]=!0,(0,f.z7)(Y.load()).always(()=>{re._loadingPageIndexes[q]=!1})})(this,te);pe&&(Y=new f.cY,pe.done(()=>{const z=this._delayDeferred;z?z.done(Y.resolve).fail(Y.reject):Y.resolve()}).fail(Y.reject),q.updateLoading())}}else Y=q.load();return!Y&&this._lastPageIndex!==this.pageIndex()&&this._dataOptions.onChanged({changeType:"pageIndex"}),Y||(new f.cY).resolve()}loadIfNeed(){const q=this._controller.isVirtualMode(),Y=this._controller.isAppendMode();if((q||Y)&&!this._dataOptions.isLoading()&&(!this._isChangedFiring||this._controller.isVirtual())){const Z=this._controller.getViewportPosition();Z>0?this._controller._setViewportPositionCore(Z):this.load()}}handleDataChanged(q,Y){const Z=this._dataOptions;let te,pe,Q=this._cache.length;const z=this._controller.isVirtualMode(),oe=this._controller.isAppendMode();if(Y&&Y.changes)g(this,q,Y);else if(!1!==this.option(s)&&(z||oe)){const ae=u(this);if(ae>=0&&(z&&ae+this._cache.length!==Z.pageIndex()&&ae-1!==Z.pageIndex()&&(Q=0,this._cache=[]),oe))if(0===Z.pageIndex())this._cache=[];else if(Z.pageIndex()<h(this))return void g(this,q,{changeType:"append",items:[]});const ee={pageIndex:Z.pageIndex(),itemsLength:Z.items(!0).length,itemsCount:this.itemsCount(!0)};let he;this.option("scrolling.removeInvisiblePages")&&z?pe=this._cache.length>Math.max(w(this)+(this.option("scrolling.preloadEnabled")?1:0),2):_(this,q,{isDelayed:!0}),ae===Z.pageIndex()+1?(pe&&(he=this._cache.pop()),te="prepend",this._cache.unshift(ee)):(pe&&(he=this._cache.shift()),te="append",this._cache.push(ee));const de=z&&0===Q&&a(this);I(this,q,this._cache.length>1?te:void 0,de,he),this._delayDeferred=this.load().done(()=>{_(this,q)&&this.load()})}else I(this,q,Y)}getDelayDeferred(){return this._delayDeferred}itemsCount(q){let Y=0;const Z=this._controller.isVirtualMode();return!q&&Z?this._cache.forEach(Q=>{Y+=Q.itemsCount}):Y=this._dataOptions.itemsCount(),Y}virtualItemsCount(){let q=u(this);q<0&&(q=this._dataOptions.pageIndex());const Y=q*this._dataOptions.pageSize(),Z=this._cache.length*this._dataOptions.pageSize();return{begin:Y,end:Math.max(0,this._dataOptions.totalItemsCount()-Z-Y)}}reset(){this._loadingPageIndexes={},this._cache=[]}}const k="scrolling.legacyMode",U=re=>"virtual"===re.option("scrolling.mode")||re._isVirtual;function K(re,q,Y){let Z;const Q=[],te=[],pe=[];function z(he){const de=he.element?he.$element():he,ue=W.A.offset(de);return ue?he.scrollTop()-(ue.top-re.offset().top):re.offset().top}const oe={on(he,de,ue){he.on("scroll",ue)},off(he,de,ue){he.off("scroll",ue)}};function ae(he){const de="#document"===he.get(0).nodeName,ue=he.get(0).nodeType===(0,y.zk)().Node.ELEMENT_NODE;let be=he.data("dxScrollable"),ve=oe;if(!be&&(be=de&&(0,o.A)((0,y.zk)())||ue&&"auto"===he.css("overflowY")&&he,ve=d.A,!be))return;const le=function(Ce){return function(){let ye=Ce.scrollTop()-z(Ce);ye=ye>0?ye:0,q(ye)}}(be);ve.on(be,"scroll",le),te.push(Ce=>{const ye=z(be);Ce-ye>=0&&be[be.scrollTo?"scrollTo":"scrollTop"](Ce+ye)}),Q.push(be),pe.push(()=>{ve.off(be,"scroll",le)})}for(Z=(Y=Y||re).parent();Z.length;Z=(0,o.A)((he=Z).get(0).parentNode??he.get(0).host))ae(Z);var he;return{scrollTo(he){(0,S.__)(te,(de,ue)=>{ue(he)})},dispose(){(0,S.__)(pe,(he,de)=>{de()})}}}class J{constructor(q,Y,Z){this._dataOptions=Y,this.component=q,this._viewportSize=!1===q.option(k)?15:0,this._viewportItemSize=20,this._viewportItemIndex=0,this._position=0,this._isScrollingBack=!1,this._contentSize=0,this._itemSizes={},this._sizeRatio=1,this._isVirtual=Z,this.positionChanged=(0,b.A)(),this._dataLoader=new L(this,this._dataOptions)}getItemSizes(){return this._itemSizes}option(q,Y){return this.component.option.apply(this.component,arguments)}isVirtual(){return this._isVirtual}virtualItemsCount(){if(U(this)){const q=this._dataOptions,Y=q.totalItemsCount();if(!1===this.option(k)&&-1!==Y){const Z=this.getViewportParams(),Q=q.loadedOffset(),te=q.loadedItemCount(),pe=Math.max(Z.skip,Q),z=Math.min(Z.take,te);return{begin:pe,end:Math.max(Y-(pe+z),0)}}return this._dataLoader.virtualItemsCount.apply(this._dataLoader,arguments)}}getScrollingTimeout(){const q=this.option("scrolling.renderAsync");let Y=0;return(0,T.O9)(q)?q&&(Y=this.option("scrolling.timeout")??0):(Y=Math.min(this.option("scrolling.timeout")||0,this._dataOptions.changingDuration()),Y<this.option("scrolling.renderingThreshold")&&(Y=this.option("scrolling.minTimeout")||0)),Y}setViewportPosition(q){const Y=new f.cY,Z=this.getScrollingTimeout();return clearTimeout(this._scrollTimeoutID),Z>0?this._scrollTimeoutID=setTimeout(()=>{this._setViewportPositionCore(q),Y.resolve()},Z):(this._setViewportPositionCore(q),Y.resolve()),Y.promise()}getViewportPosition(){return this._position}getItemIndexByPosition(q,Y,Z){q=q??this._position;const Q=this.getItemSize();let te=0,pe=0;const z=Object.keys(this._itemSizes).concat(-1);for(let oe=0;oe<z.length&&te<q;oe++){const ae=parseInt(z[oe]);let ee=(q-te)/Q;if(ae<0||pe+ee<ae){pe+=ee,this._sizeRatio<1&&(0,T.O9)(Y)&&(pe=Y+Z/this._viewportItemSize);break}ee=ae-pe,te+=ee*Q,pe+=ee;const he=this._itemSizes[ae];te+=he,pe+=te<q?1:(q-te+he)/he}return Math.round(50*pe)/50}isScrollingBack(){return this._isScrollingBack}_setViewportPositionCore(q){const Y=this._position||0;this._position=q,Y!==this._position&&(this._isScrollingBack=this._position<Y);const Z=this.getItemIndexByPosition(),Q=this.setViewportItemIndex(Z);return this.positionChanged.fire(),Q}setContentItemSizes(q){const Y=this.virtualItemsCount();if(this._contentSize=q.reduce((Z,Q)=>Z+Q,0),Y){q.forEach((te,pe)=>{this._itemSizes[Y.begin+pe]=te});const Z=(Y.begin+Y.end+this.itemsCount())*this._viewportItemSize,Q=c.A.getContentHeightLimit(P.A);this._sizeRatio=Z>Q?Q/Z:1}}getItemSize(){return this._viewportItemSize*this._sizeRatio}getItemOffset(q,Y){const Z=this.virtualItemsCount();let Q=q;if(!Z)return 0;let te=0;const pe=this._dataOptions.totalItemsCount();return Object.keys(this._itemSizes).forEach(z=>{Q&&(Y?z>=pe-q:z<q)&&(te+=this._itemSizes[z],Q--)}),Math.floor(te+Q*this._viewportItemSize*this._sizeRatio)}getContentOffset(q){const Y="end"===q,Z=this.virtualItemsCount();return Z?this.getItemOffset(Y?Z.end:Z.begin,Y):0}getVirtualContentSize(){return this.virtualItemsCount()?this.getContentOffset("begin")+this.getContentOffset("end")+this._contentSize:0}getViewportItemIndex(){return this._viewportItemIndex}setViewportItemIndex(q){if(this._viewportItemIndex=q,!1!==this.option(k))return this._dataLoader.viewportItemIndexChanged.apply(this._dataLoader,arguments)}viewportItemSize(q){return void 0!==q&&(this._viewportItemSize=q),this._viewportItemSize}viewportSize(q){return void 0!==q&&(this._viewportSize=q),this._viewportSize}viewportHeight(q,Y){const Z=Y??this._position,Q=this.getItemIndexByPosition(Z),te=this.getItemIndexByPosition(Z+q,Q,q);this.viewportSize(Math.ceil(te-Q)),!(0,T.O9)(Y)&&this._viewportItemIndex!==Q&&this._setViewportPositionCore(Z)}reset(q){this._dataLoader.reset(),q||(this._itemSizes={})}subscribeToWindowScrollEvents(q){this._windowScroll=this._windowScroll||K(q,Y=>{this.viewportItemSize()&&this.setViewportPosition(Y)})}dispose(){clearTimeout(this._scrollTimeoutID),this._windowScroll&&this._windowScroll.dispose(),this._windowScroll=null}scrollTo(q){this._windowScroll&&this._windowScroll.scrollTo(q)}isVirtualMode(){return U(this)}isAppendMode(){return"infinite"===(re=this).option("scrolling.mode")&&!re._isVirtual;var re}getViewportParams(){const q="virtual"===this.option("scrolling.mode"),Y=this._dataOptions.totalItemsCount(),Q=this._dataOptions.hasKnownLastPage()&&this._viewportItemIndex>Y?Y:this._viewportItemIndex,te=this._viewportSize+Q,pe=this.option("scrolling.prerenderedRowChunkSize")||1,z=this.isScrollingBack(),oe=this.option("scrolling.prerenderedRowCount")??1,ee=z?0:oe,he=Math.floor(Math.max(0,Q-(z?oe:0))/pe)*pe;let de=Math.ceil((te+ee-he)/pe)*pe;if(q){const ue=Math.max(0,Y-he);de=Math.min(de,ue)}return{skip:he,take:de}}itemsCount(){let q=0;return q=this.option(k)?this._dataLoader.itemsCount.apply(this._dataLoader,arguments):this._dataOptions.itemsCount(),q}pageIndex(){return this._dataLoader.pageIndex(...arguments)}beginPageIndex(){return this._dataLoader.beginPageIndex(...arguments)}endPageIndex(){return this._dataLoader.endPageIndex(...arguments)}pageSize(){return this._dataLoader.pageSize(...arguments)}load(){return this._dataLoader.load(...arguments)}loadIfNeed(){return this._dataLoader.loadIfNeed(...arguments)}handleDataChanged(){return this._dataLoader.handleDataChanged(...arguments)}getDelayDeferred(){return this._dataLoader.getDelayDeferred()}}const ie={VirtualScrollController:J}},5213:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ve});var W=M(5737),o=M(6870),P=M(4504),b=M(1973),f=M(6054),S=M(7631),T=M(9522),y=M(5704),d=M(8412),c=M(4859),s=M(6021),a=M(3090),u=M(6946),h=M(4757),g=M(1363),_=M(9495),x=M(1830),w=M(4017),D=M(6110),C=M(4072),I=M(8664),L=M(9209),N=M(9293),G=M(912);const k=(0,D.zk)(),B="dxDraggable",K=(0,N.b4)(I.ni,B),J=(0,N.b4)(I.Cy,B),ie=(0,N.b4)(I._N,B),re=(0,N.b4)(I.Ve,B),q=(0,N.b4)(I.qG,B),Y=(0,N.b4)(L.A.down,B),Z=(0,N.b4)("keydown",B);let te,pe;const oe=le=>({x:le.pageX-(0,y.A)(k).scrollLeft(),y:le.pageY-(0,y.A)(k).scrollTop()});class de{constructor(Ce,ye){this._$scrollableAtPointer=null,this._preventScroll=!0,this._component=ye,"vertical"===Ce?(this._scrollValue="scrollTop",this._overFlowAttr="overflowY",this._sizeAttr="height",this._scrollSizeProp="scrollHeight",this._clientSizeProp="clientHeight",this._limitProps={start:"top",end:"bottom"}):(this._scrollValue="scrollLeft",this._overFlowAttr="overflowX",this._sizeAttr="width",this._scrollSizeProp="scrollWidth",this._clientSizeProp="clientWidth",this._limitProps={start:"left",end:"right"})}updateScrollable(Ce,ye){let ge=!1;Ce.some(fe=>{const xe=(0,y.A)(fe),Te=xe.hasClass("dx-overlay-wrapper"),Ee=xe.hasClass("dx-overlay-content");return!(!Te&&!Ee)||(ge=this._trySetScrollable(fe,ye),ge)}),ge||(this._$scrollableAtPointer=null,this._scrollSpeed=0)}isScrolling(){return!!this._scrollSpeed}isScrollable(Ce){return("auto"===Ce.css(this._overFlowAttr)||Ce.hasClass("dx-scrollable-container"))&&Ce.prop(this._scrollSizeProp)>Math.ceil("width"===this._sizeAttr?(0,g.RG)(Ce):(0,g.Oq)(Ce))}_trySetScrollable(Ce,ye){const ge=this,fe=(0,y.A)(Ce);let xe;const Te=ge._component.option("scrollSensitivity");let Ee=ge.isScrollable(fe);return Ee&&(xe=ge._calculateDistanceToBorders(fe,ye),Te>xe[ge._limitProps.start]?ge._preventScroll||(ge._scrollSpeed=-ge._calculateScrollSpeed(xe[ge._limitProps.start]),ge._$scrollableAtPointer=fe):Te>xe[ge._limitProps.end]?ge._preventScroll||(ge._scrollSpeed=ge._calculateScrollSpeed(xe[ge._limitProps.end]),ge._$scrollableAtPointer=fe):(Ee=!1,ge._preventScroll=!1)),Ee}_calculateDistanceToBorders(Ce,ye){const ge=Ce.get(0);let fe;return ge?(fe=(0,h.N)(ge),{left:ye.x-fe.left,top:ye.y-fe.top,right:fe.right-ye.x,bottom:fe.bottom-ye.y}):{}}_calculateScrollSpeed(Ce){const ye=this._component,ge=ye.option("scrollSensitivity"),fe=ye.option("scrollSpeed");return Math.ceil(((ge-Ce)/ge)**2*fe)}scrollByStep(){const Ce=this;if(Ce._$scrollableAtPointer&&Ce._scrollSpeed){if(Ce._$scrollableAtPointer.hasClass("dx-scrollable-container")){const ge=Ce._$scrollableAtPointer.closest(".dx-scrollable"),fe=ge.data("dxScrollable")||ge.data("dxScrollView");if(fe){const xe=fe.scrollOffset()[Ce._limitProps.start]+Ce._scrollSpeed;fe.scrollTo({[Ce._limitProps.start]:xe})}}else{const ge=Ce._$scrollableAtPointer[Ce._scrollValue]()+Ce._scrollSpeed;Ce._$scrollableAtPointer[Ce._scrollValue](ge)}const ye=Ce._component._dragMoveArgs;ye&&Ce._component._dragMoveHandler(ye)}}reset(){this._$scrollableAtPointer=null,this._scrollSpeed=0,this._preventScroll=!0}isOutsideScrollable(Ce,ye){if(!Ce)return!1;const ge=(0,h.N)(Ce.get(0)),fe=ge[this._limitProps.start],xe=ge[this._sizeAttr],Te=oe(ye),Ee="width"===this._sizeAttr?Te.x:Te.y;return Ee<fe||Ee>fe+xe}}const ue=G.A.inherit({ctor(le){this.callBase(),this._strategy=le},_step(){const le=this._strategy._horizontalScrollHelper,Ce=this._strategy._verticalScrollHelper;le&&le.scrollByStep(),Ce&&Ce.scrollByStep()}}),be=S.A.inherit({reset:c.lQ,dragMove:c.lQ,dragEnter:c.lQ,dragLeave:c.lQ,dragEnd(le){return this._getSourceDraggable()._fireRemoveEvent(le),(0,s.cY)().resolve()},_fireRemoveEvent:c.lQ,_getDefaultOptions(){return(0,a.X)(this.callBase(),{onDragStart:null,onDragMove:null,onDragEnd:null,onDragEnter:null,onDragLeave:null,onDragCancel:null,onCancelByEsc:!1,onDrop:null,immediate:!0,dragDirection:"both",boundary:void 0,boundOffset:0,allowMoveByClick:!1,itemData:null,container:void 0,dragTemplate:void 0,contentTemplate:"content",handle:"",filter:"",clone:!1,autoScroll:!0,scrollSpeed:30,scrollSensitivity:60,group:void 0,data:void 0})},_setOptionsByReference(){this.callBase.apply(this,arguments),(0,a.X)(this._optionsByReference,{component:!0,group:!0,itemData:!0,data:!0})},_init(){this.callBase(),this._attachEventHandlers(),this._scrollAnimator=new ue(this),this._horizontalScrollHelper=new de("horizontal",this),this._verticalScrollHelper=new de("vertical",this),this._initScrollTop=0,this._initScrollLeft=0},_normalizeCursorOffset:le=>((0,x.Gv)(le)&&(le={h:le.x,v:le.y}),{left:(le=(0,c.T6)(le).map(Ce=>parseFloat(Ce)))[0],top:1===le.length?le[0]:le[1]}),_getNormalizedCursorOffset(le,Ce){return(0,x.Tn)(le)&&(le=le.call(this,Ce)),this._normalizeCursorOffset(le)},_calculateElementOffset(le){let Ce,ye;const{event:ge}=le,fe=(0,y.A)(le.itemElement),xe=(0,y.A)(le.dragElement),Te=this._dragElementIsCloned(),Ee=this.option("cursorOffset");let Oe={left:0,top:0};const ze=this._initialLocate=(0,P.x5)(xe);return(Te||le.initialOffset||Ee)&&(Ce=le.initialOffset||fe.offset(),Ee&&(Oe=this._getNormalizedCursorOffset(Ee,le),isFinite(Oe.left)&&(Ce.left=ge.pageX),isFinite(Oe.top)&&(Ce.top=ge.pageY)),ye=xe.offset(),Ce.top-=ye.top+(Oe.top||0)-ze.top,Ce.left-=ye.left+(Oe.left||0)-ze.left),Ce},_initPosition(le){const Ce=(0,y.A)(le.dragElement),ye=this._calculateElementOffset(le);ye&&this._move(ye,Ce),this._startPosition=(0,P.x5)(Ce)},_startAnimator(){this._scrollAnimator.inProgress()||this._scrollAnimator.start()},_stopAnimator(){this._scrollAnimator.stop()},_addWidgetPrefix(le){return(0,u._k)(this.NAME)+(le?`-${le}`:"")},_getItemsSelector(){return this.option("filter")||""},_$content(){const le=this.$element(),Ce=le.children(".dx-template-wrapper");return Ce.length?Ce:le},_attachEventHandlers(){if(this.option("disabled"))return;let le=this._$content(),Ce=this._getItemsSelector();const ye=this.option("allowMoveByClick"),ge={direction:this.option("dragDirection"),immediate:this.option("immediate"),checkDropTarget:(fe,xe)=>{const Te=this.option("group"),Ee=this._getSourceDraggable().option("group"),Oe=this._getScrollable(fe);return!this._verticalScrollHelper.isOutsideScrollable(Oe,xe)&&!this._horizontalScrollHelper.isOutsideScrollable(Oe,xe)&&Ee&&Ee===Te}};ye&&(le=this._getArea(),C.A.on(le,Y,ge,this._pointerDownHandler.bind(this))),">"===Ce[0]&&(Ce=Ce.slice(1)),C.A.on(le,K,Ce,ge,this._dragStartHandler.bind(this)),C.A.on(le,J,ge,this._dragMoveHandler.bind(this)),C.A.on(le,ie,ge,this._dragEndHandler.bind(this)),C.A.on(le,re,ge,this._dragEnterHandler.bind(this)),C.A.on(le,q,ge,this._dragLeaveHandler.bind(this)),this.option("onCancelByEsc")&&C.A.on(le,Z,this._keydownHandler.bind(this))},_dragElementIsCloned(){return this._$dragElement&&this._$dragElement.hasClass(this._addWidgetPrefix("clone"))},_getDragTemplateArgs(le,Ce){return{container:(0,T.cc)(Ce),model:{itemData:this.option("itemData"),itemElement:(0,T.cc)(le)}}},_createDragElement(le){let Ce=le;const ye=this.option("clone"),ge=this._getContainer();let fe=this.option("dragTemplate");return fe?(fe=this._getTemplate(fe),Ce=(0,y.A)("<div>").appendTo(ge),fe.render(this._getDragTemplateArgs(le,Ce))):ye&&(Ce=(0,y.A)("<div>").appendTo(ge),le.clone().css({width:le.css("width"),height:le.css("height")}).appendTo(Ce)),Ce.toggleClass(this._addWidgetPrefix("clone"),Ce.get(0)!==le.get(0)).toggleClass("dx-rtl",this.option("rtlEnabled"))},_resetDragElement(){this._dragElementIsCloned()?this._$dragElement.remove():this._toggleDraggingClass(!1),this._$dragElement=null},_resetSourceElement(){this._toggleDragSourceClass(!1),this._$sourceElement=null},_detachEventHandlers(){C.A.off(this._$content(),`.${B}`),C.A.off(this._getArea(),`.${B}`)},_move(le,Ce){(0,P.Cy)(Ce||this._$dragElement,le)},_getDraggableElement(le){const Ce=this._getSourceElement();if(Ce)return Ce;if(this.option("allowMoveByClick"))return this.$element();let ge=(0,y.A)(le&&le.target);const fe=this._getItemsSelector();if(">"===fe[0]){const xe=this._$content().find(fe);xe.is(ge)||(ge=ge.closest(xe))}return ge},_getSourceElement(){return this._getSourceDraggable()._$sourceElement},_pointerDownHandler(le){if((0,N.eT)(le))return;const Ce={},ye=this.$element(),ge=this.option("dragDirection");("horizontal"===ge||"both"===ge)&&(Ce.left=le.pageX-ye.offset().left+(0,P.x5)(ye).left-(0,g.RG)(ye)/2),("vertical"===ge||"both"===ge)&&(Ce.top=le.pageY-ye.offset().top+(0,P.x5)(ye).top-(0,g.Oq)(ye)/2),this._move(Ce,ye),this._getAction("onDragMove")(this._getEventArgs(le))},_isValidElement(le,Ce){const ye=this.option("handle"),ge=(0,y.A)(le.originalEvent&&le.originalEvent.target);return!(ye&&!ge.closest(ye).length||!Ce.length||Ce.is(".dx-state-disabled, .dx-state-disabled *"))},_dragStartHandler(le){const Ce=this._getDraggableElement(le);if(this.dragInProgress=!0,!this._isValidElement(le,Ce))return void(le.cancel=!0);if(this._$sourceElement)return;const ye=this._getDragStartArgs(le,Ce);if(this._getAction("onDragStart")(ye),ye.cancel)return void(le.cancel=!0);this.option("itemData",ye.itemData),this._setSourceDraggable(),this._$sourceElement=Ce;let ge=Ce.offset();!this._hasClonedDraggable()&&this.option("autoScroll")&&(this._initScrollTop=this._getScrollableScrollTop(),this._initScrollLeft=this._getScrollableScrollLeft(),ge=this._getDraggableElementOffset(ge.left,ge.top));const fe=this._$dragElement=this._createDragElement(Ce);this._toggleDraggingClass(!0),this._toggleDragSourceClass(!0),this._setGestureCoverCursor(fe.children());const xe="fixed"===fe.css("position");this._initPosition((0,a.X)({},ye,{dragElement:fe.get(0),initialOffset:xe&&ge})),this._getAction("onDraggableElementShown")((0,W.A)({},ye,{dragElement:fe}));const Te=this._getArea(),Ee=this._getAreaOffset(Te),Oe=this._getBoundOffset(),ze=(0,g.Ot)(Te),$e=(0,g.P$)(Te),Be=(0,g.RG)(fe),Ue=(0,g.Oq)(fe),ot=fe.offset().left-Ee.left,st=fe.offset().top-Ee.top;Te.length&&(le.maxLeftOffset=ot-Oe.left,le.maxRightOffset=ze-ot-Be-Oe.right,le.maxTopOffset=st-Oe.top,le.maxBottomOffset=$e-st-Ue-Oe.bottom),this.option("autoScroll")&&this._startAnimator()},_getAreaOffset:le=>le&&o.A.offset(le)||{left:0,top:0},_toggleDraggingClass(le){this._$dragElement&&this._$dragElement.toggleClass(this._addWidgetPrefix("dragging"),le)},_toggleDragSourceClass(le,Ce){const ye=Ce||this._$sourceElement;ye&&ye.toggleClass(this._addWidgetPrefix("source"),le)},_setGestureCoverCursor(le){(0,y.A)(".dx-gesture-cover").css("cursor",le.css("cursor"))},_getBoundOffset(){let le=this.option("boundOffset");return(0,x.Tn)(le)&&(le=le.call(this)),(0,_.oN)(le)},_getArea(){let le=this.option("boundary");return(0,x.Tn)(le)&&(le=le.call(this)),(0,y.A)(le)},_getContainer(){let le=this.option("container");return void 0===le&&(le=(0,w.Uq)()),(0,y.A)(le)},_getDraggableElementOffset(le,Ce){var ye,ge;const fe=this._initScrollTop,xe=this._initScrollLeft,Te=this._getScrollableScrollTop(),Ee=this._getScrollableScrollLeft(),ze="fixed"===(0,y.A)(this.element()).css("position"),$e={left:((null===(ye=this._startPosition)||void 0===ye?void 0:ye.left)??0)+le,top:((null===(ge=this._startPosition)||void 0===ge?void 0:ge.top)??0)+Ce};return ze||this._hasClonedDraggable()?$e:{left:(0,x.kf)(Ee)?$e.left+Ee-xe:$e.left,top:(0,x.kf)(Te)?$e.top+Te-fe:$e.top}},_hasClonedDraggable(){return this.option("clone")||this.option("dragTemplate")},_dragMoveHandler(le){if(this._dragMoveArgs=le,!this._$dragElement)return void(le.cancel=!0);const Ce=this._getDraggableElementOffset(le.offset.x,le.offset.y);this._move(Ce),this._updateScrollable(le);const ye=this._getEventArgs(le);this._getAction("onDragMove")(ye),!0!==ye.cancel&&this._getTargetDraggable().dragMove(le,scrollBy)},_updateScrollable(le){const Ce=this;if(Ce.option("autoScroll")){const ye=oe(le),ge=f.A.elementsFromPoint(ye.x,ye.y,this.$element().get(0));Ce._verticalScrollHelper.updateScrollable(ge,ye),Ce._horizontalScrollHelper.updateScrollable(ge,ye)}},_getScrollable(le){let Ce;return le.parents().toArray().some(ye=>{const ge=(0,y.A)(ye);return!(!this._horizontalScrollHelper.isScrollable(ge)&&!this._verticalScrollHelper.isScrollable(ge)||(Ce=ge,0))}),Ce},_getScrollableScrollTop(){var le;return(null===(le=this._getScrollable((0,y.A)(this.element())))||void 0===le?void 0:le.scrollTop())??0},_getScrollableScrollLeft(){var le;return(null===(le=this._getScrollable((0,y.A)(this.element())))||void 0===le?void 0:le.scrollLeft())??0},_defaultActionArgs(){const le=this.callBase.apply(this,arguments),Ce=this.option("component");return Ce&&(le.component=Ce,le.element=Ce.element()),le},_getEventArgs(le){const Ce=this._getSourceDraggable(),ye=this._getTargetDraggable();return{event:le,itemData:Ce.option("itemData"),itemElement:(0,T.cc)(Ce._$sourceElement),fromComponent:Ce.option("component")||Ce,toComponent:ye.option("component")||ye,fromData:Ce.option("data"),toData:ye.option("data")}},_getDragStartArgs(le,Ce){const ye=this._getEventArgs(le);return{event:ye.event,itemData:ye.itemData,itemElement:Ce,fromData:ye.fromData}},_revertItemToInitialPosition(){!this._dragElementIsCloned()&&this._move(this._initialLocate,this._$sourceElement)},_dragEndHandler(le){const Ce=(0,s.cY)(),ye=this._getEventArgs(le),ge=this._getEventArgs(le),fe=this._getTargetDraggable();let xe=!0;this.dragInProgress=!1;try{this._getAction("onDragEnd")(ye)}finally{(0,s.z7)((0,s.Sx)(ye.cancel)).done(Te=>{if(!Te&&(fe!==this&&fe._getAction("onDrop")(ge),!ge.cancel))return xe=!1,void(0,s.z7)((0,s.Sx)(fe.dragEnd(ye))).always(Ce.resolve);Ce.resolve()}).fail(Ce.resolve),Ce.done(()=>{xe&&this._revertItemToInitialPosition(),this._resetDragOptions(fe)})}},_isTargetOverAnotherDraggable(le){const Ce=this._getSourceDraggable();if(this===Ce)return!1;const ye=Ce._$dragElement,ge=Ce.$element(),fe=this.$element(),xe=oe(le),Ee=f.A.elementsFromPoint(xe.x,xe.y,this.element()).filter(Be=>{const Ue=(0,y.A)(Be);return!!Ue.hasClass(this._addWidgetPrefix())&&!Ue.closest(ye).length})[0],Oe=this._getSourceElement(),ze=Ee===ge.get(0),$e=(0,y.A)(Ee).closest(Oe).length;return!Ee||Ee===fe.get(0)&&!ze&&!$e},_dragEnterHandler(le){this._fireDragEnterEvent(le),this._isTargetOverAnotherDraggable(le)&&this._setTargetDraggable(),this._getSourceDraggable().dragEnter(le)},_dragLeaveHandler(le){this._fireDragLeaveEvent(le),this._resetTargetDraggable(),this!==this._getSourceDraggable()&&this.reset(),this._getSourceDraggable().dragLeave(le)},_keydownHandler(le){this.dragInProgress&&"Escape"===le.key&&this._keydownEscapeHandler(le)},_keydownEscapeHandler(le){var Ce;if(!this._getSourceElement())return;const ge=this._getEventArgs(le);if(this._getAction("onDragCancel")(ge),ge.cancel)return;this.dragInProgress=!1,null===(Ce=pe)||void 0===Ce||Ce._toggleDraggingClass(!1),this._detachEventHandlers(),this._revertItemToInitialPosition();const fe=this._getTargetDraggable();this._resetDragOptions(fe),this._attachEventHandlers()},_getAction(le){return this[`_${le}Action`]||this._createActionByOption(le)},_getAnonymousTemplateName:()=>"content",_initTemplates(){this.option("contentTemplate")&&(this._templateManager.addDefaultTemplates({content:new d.A}),this.callBase.apply(this,arguments))},_render(){this.callBase(),this.$element().addClass(this._addWidgetPrefix());const le=this._templateManager.anonymousTemplateName===this.option("contentTemplate"),Ce=this._getTemplateByOption("contentTemplate");Ce&&(0,y.A)(Ce.render({container:this.element(),transclude:le}))},_optionChanged(le){const{name:Ce}=le;switch(Ce){case"onDragStart":case"onDragMove":case"onDragEnd":case"onDrop":case"onDragEnter":case"onDragLeave":case"onDragCancel":case"onDraggableElementShown":this[`_${Ce}Action`]=this._createActionByOption(Ce);break;case"dragTemplate":case"contentTemplate":case"container":case"clone":case"scrollSensitivity":case"scrollSpeed":case"boundOffset":case"handle":case"group":case"data":case"itemData":break;case"allowMoveByClick":case"dragDirection":case"disabled":case"boundary":case"filter":case"immediate":this._resetDragElement(),this._detachEventHandlers(),this._attachEventHandlers();break;case"onCancelByEsc":this._keydownHandler();break;case"autoScroll":this._verticalScrollHelper.reset(),this._horizontalScrollHelper.reset();break;default:this.callBase(le)}},_getTargetDraggable(){return te||this},_getSourceDraggable(){return pe||this},_setTargetDraggable(){const le=this.option("group"),Ce=this._getSourceDraggable();le&&le===Ce.option("group")&&(te=this)},_setSourceDraggable(){pe=this},_resetSourceDraggable(){pe=null},_resetTargetDraggable(){te=null},_resetDragOptions(le){this.reset(),le.reset(),this._stopAnimator(),this._horizontalScrollHelper.reset(),this._verticalScrollHelper.reset(),this._resetDragElement(),this._resetSourceElement(),this._resetTargetDraggable(),this._resetSourceDraggable()},_dispose(){this.callBase(),this._detachEventHandlers(),this._resetDragElement(),this._resetTargetDraggable(),this._resetSourceDraggable(),this._$sourceElement=null,this._stopAnimator()},_fireDragEnterEvent(le){const Ce=this._getEventArgs(le);this._getAction("onDragEnter")(Ce)},_fireDragLeaveEvent(le){const Ce=this._getEventArgs(le);this._getAction("onDragLeave")(Ce)}});(0,b.A)(B,be);const ve=be},4972:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(4481);M(8732),M(1609);const y=W.A},8732:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ge});var W=M(5737),o=M(9510),P=M(6054),b=M(9522),f=M(2925),S=M(5704),T=M(5944),y=M(4859),d=M(4270),c=M(6021),s=M(3090),a=M(2660),u=M(1363),h=M(4162),g=M(1830),_=M(5801),x=M(778),w=M(5656),D=M(4072),C=M(3535),I=M(9209),L=M(9293),N=M(8360),G=M(402),k=M(7080),U=M(5107);const K="dx-item",oe=/^([^.]+\[\d+\]\.)+([\w.]+)$/,ye=k.A.inherit({_activeStateUnit:`.${K}`,_supportedKeys(){const fe=function(xe,Te){(0,L.By)(Te)||(Te.preventDefault(),Te.stopPropagation(),this._moveFocus(xe,Te))};return(0,s.X)(this.callBase(),{space:function(xe){xe.preventDefault(),this._enterKeyHandler(xe)},enter:this._enterKeyHandler,leftArrow:fe.bind(this,"left"),rightArrow:fe.bind(this,"right"),upArrow:fe.bind(this,"up"),downArrow:fe.bind(this,"down"),pageUp:fe.bind(this,"up"),pageDown:fe.bind(this,"down"),home:fe.bind(this,"first"),end:fe.bind(this,"last")})},_enterKeyHandler(fe){const xe=(0,S.A)(this.option("focusedElement"));if(!xe.length)return;const Te=this._getItemData(xe);null!=Te&&Te.onClick&&this._itemEventHandlerByHandler(xe,Te.onClick,{event:fe}),this._itemClickHandler((0,s.X)({},fe,{target:xe.get(0),currentTarget:xe.get(0)}))},_getDefaultOptions(){return(0,s.X)(this.callBase(),{selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,onFocusedItemChanged:null,noDataText:N.A.format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,dataSource:null,_dataController:null,_itemAttributes:{},itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedElement:null,displayExpr:void 0,disabledExpr:fe=>fe?fe.disabled:void 0,visibleExpr:fe=>fe?fe.visible:void 0})},_init(){this._compileDisplayGetter(),this._initDataController(),this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_compileDisplayGetter(){const fe=this.option("displayExpr");this._displayGetter=fe?(0,d.Hz)(this.option("displayExpr")):void 0},_initTemplates(){this._initItemsFromMarkup(),this._initDefaultItemTemplate(),this.callBase()},_getAnonymousTemplateName:()=>"item",_initDefaultItemTemplate(){const fe=this._getFieldsMap();this._templateManager.addDefaultTemplates({item:new T.U((xe,Te)=>{(0,g.Qd)(Te)?this._prepareDefaultItemTemplate(Te,xe):(fe&&(0,g.Tn)(fe.text)&&(Te=fe.text(Te)),xe.text(String((0,y.YD)(Te,""))))},this._getBindableFields(),this.option("integrationOptions.watchMethod"),fe)})},_getBindableFields:()=>["text","html"],_getFieldsMap(){if(this._displayGetter)return{text:this._displayGetter}},_prepareDefaultItemTemplate(fe,xe){(0,g.O9)(fe.text)&&xe.text(fe.text),(0,g.O9)(fe.html)&&xe.html(fe.html)},_initItemsFromMarkup(){const fe=(0,h.zD)(this.$element(),"dxItem");if(!fe.length||this.option("items").length)return;const xe=fe.map(Te=>{let{element:Ee,options:Oe}=Te;return/\S/.test(Ee.innerHTML)&&!Oe.template?Oe.template=this._prepareItemTemplate(Ee):(0,S.A)(Ee).remove(),Oe});this.option("items",xe)},_prepareItemTemplate(fe){const xe="tmpl-"+new f.A,Te=(0,S.A)(fe).detach().clone().removeAttr("data-options").addClass("dx-template-wrapper");return this._saveTemplate(xe,Te),xe},_dataSourceOptions:()=>({paginate:!1}),_cleanRenderedItems(){this._renderedItemsCount=0},_focusTarget(){return this.$element()},_focusInHandler(fe){if(this.callBase.apply(this,arguments),!this._isFocusTarget(fe.target))return;const xe=(0,S.A)(this.option("focusedElement"));if(xe.length)this._setFocusedItem(xe);else{const Te=this._getActiveItem();Te.length&&this.option("focusedElement",(0,b.cc)(Te))}},_focusOutHandler(){this.callBase.apply(this,arguments);const fe=(0,S.A)(this.option("focusedElement"));this._updateFocusedItemState(fe,!1)},_findActiveTarget(fe){return fe.find(this._activeStateUnit)},_getActiveItem(fe){const xe=(0,S.A)(this.option("focusedElement"));if(xe.length)return xe;let Te=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0;const Ee=this._getActiveElement();return Te<0&&(Te=fe?Ee.length-1:0),Ee.eq(Te)},_moveFocus(fe){const xe=this._getAvailableItems();let Te;switch(fe){case"pageup":case"up":Te=this._prevItem(xe);break;case"pagedown":case"down":Te=this._nextItem(xe);break;case"right":Te=this.option("rtlEnabled")?this._prevItem(xe):this._nextItem(xe);break;case"left":Te=this.option("rtlEnabled")?this._nextItem(xe):this._prevItem(xe);break;case"first":Te=xe.first();break;case"last":Te=xe.last();break;default:return!1}0!==Te.length&&this.option("focusedElement",(0,b.cc)(Te))},_getVisibleItems(fe){return(fe=fe||this._itemElements()).filter(":visible")},_getAvailableItems(fe){return this._getVisibleItems(fe)},_prevItem(fe){const xe=this._getActiveItem(),Te=fe.index(xe),Ee=fe.last();let Oe=(0,S.A)(fe[Te-1]);const ze=this.option("loopItemFocus");return 0===Oe.length&&ze&&(Oe=Ee),Oe},_nextItem(fe){const xe=this._getActiveItem(!0),Te=fe.index(xe),Ee=fe.first();let Oe=(0,S.A)(fe[Te+1]);const ze=this.option("loopItemFocus");return 0===Oe.length&&ze&&(Oe=Ee),Oe},_selectFocusedItem(fe){this.selectItem(fe)},_updateFocusedItemState(fe,xe,Te){const Ee=(0,S.A)(fe);Ee.length&&(this._refreshActiveDescendant(),this._refreshItemId(Ee,Te),this._toggleFocusClass(xe,Ee)),this._updateParentActiveDescendant()},_refreshActiveDescendant(fe){this.setAria("activedescendant",(0,g.O9)(this.option("focusedElement"))?this.getFocusedItemId():null,fe)},_refreshItemId(fe,xe){!xe&&this.option("focusedElement")?this.setAria("id",this.getFocusedItemId(),fe):this.setAria("id",null,fe)},_isDisabled:fe=>fe&&"true"===(0,S.A)(fe).attr("aria-disabled"),_setFocusedItem(fe){if(!fe||!fe.length)return;this._updateFocusedItemState(fe,!0),this.onFocusedItemChanged(this.getFocusedItemId());const{selectOnFocus:xe}=this.option(),Te=this._isDisabled(fe);xe&&!Te&&this._selectFocusedItem(fe)},_findItemElementByItem(fe){let xe=(0,S.A)();const Te=this;return this.itemElements().each(function(){const Ee=(0,S.A)(this);if(Ee.data(Te._itemDataKey())===fe)return xe=Ee,!1}),xe},_getIndexByItem(fe){return this.option("items").indexOf(fe)},_itemOptionChanged(fe,xe,Te,Ee){const Oe=this._findItemElementByItem(fe);Oe.length&&(this.constructor.ItemClass.getInstance(Oe).setDataField(xe,Te)||this._refreshItem(Oe,fe),"disabled"===xe&&Te&&this._resetItemFocus(Oe))},_resetItemFocus(fe){fe.is(this.option("focusedElement"))&&this.option("focusedElement",null)},_refreshItem(fe){const xe=this._getItemData(fe),Te=fe.data(this._itemIndexKey());this._renderItem(this._renderedItemsCount+Te,xe,null,fe)},_updateParentActiveDescendant:y.lQ,_optionChanged(fe){if("items"===fe.name){const xe=fe.fullName.match(oe);if(xe&&xe.length){const Te=xe[xe.length-1],Ee=fe.fullName.replace(`.${Te}`,""),Oe=this.option(Ee);return void this._itemOptionChanged(Oe,Te,fe.value,fe.previousValue)}}switch(fe.name){case"items":case"_itemAttributes":case"itemTemplateProperty":case"useItemTextAsTitle":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._renderEmptyMessage();break;case"noDataText":case"encodeNoDataText":this._renderEmptyMessage();break;case"itemTemplate":case"visibleExpr":case"disabledExpr":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"onFocusedItemChanged":this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged");break;case"focusedElement":this._updateFocusedItemState(fe.previousValue,!1,!0),this._setFocusedItem((0,S.A)(fe.value));break;case"displayExpr":this._compileDisplayGetter(),this._initDefaultItemTemplate(),this._invalidate();break;default:this.callBase(fe)}},_invalidate(){return this.option("focusedElement",null),this.callBase.apply(this,arguments)},_loadNextPage(){return this._expectNextPageLoading(),this._dataController.loadNextPage()},_expectNextPageLoading(){this._startIndexForAppendedItems=0},_expectLastItemLoading(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler(fe){const xe=this.option("items");this._initialized&&xe&&this._shouldAppendItems()?(this._renderedItemsCount=xe.length,(!this._isLastPage()||-1!==this._startIndexForAppendedItems)&&(this.option().items=xe.concat(fe.slice(this._startIndexForAppendedItems))),this._forgetNextPageLoading(),this._refreshContent()):this.option("items",fe.slice())},_refreshContent(){this._prepareContent(),this._renderContent()},_dataSourceLoadErrorHandler(){this._forgetNextPageLoading(),this.option("items",this.option("items"))},_shouldAppendItems(){return null!=this._startIndexForAppendedItems&&this._allowDynamicItemsAppend()},_allowDynamicItemsAppend:()=>!1,_clean(){this._cleanFocusState(),this._cleanItemContainer(),this._inkRipple&&delete this._inkRipple,this._resetActiveState()},_cleanItemContainer(){(0,S.A)(this._itemContainer()).empty()},_dispose(){this.callBase(),clearTimeout(this._itemFocusTimeout)},_refresh(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer(){return this.$element()},_itemClass:()=>K,_itemContentClass(){return this._itemClass()+"-content"},_selectedItemClass:()=>"dx-item-selected",_itemResponseWaitClass:()=>"dx-item-response-wait",_itemSelector(){return`.${this._itemClass()}`},_itemDataKey:()=>"dxItemData",_itemIndexKey:()=>"dxItemIndex",_itemElements(){return this._itemContainer().find(this._itemSelector())},_initMarkup(){this.callBase(),this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged"),this.$element().addClass("dx-collection"),this._prepareContent()},_prepareContent:(0,y.Mb)(function(){this._renderContentImpl()}),_renderContent(){this._fireContentReadyAction()},_render(){this.callBase(),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_getPointerEvent:()=>I.A.down,_attachClickEvent(){const fe=this._itemSelector(),xe=this._getPointerEvent(),Te=(0,L.b4)(x.U,this.NAME),Ee=(0,L.b4)(xe,this.NAME),Oe=new o.A(ze=>{const{event:$e}=ze;this._itemPointerDownHandler($e)});D.A.off(this._itemContainer(),Te,fe),D.A.off(this._itemContainer(),Ee,fe),D.A.on(this._itemContainer(),Te,fe,ze=>this._itemClickHandler(ze)),D.A.on(this._itemContainer(),Ee,fe,ze=>{Oe.execute({element:(0,S.A)(ze.target),event:ze})})},_itemClickHandler(fe,xe,Te){this._itemDXEventHandler(fe,"onItemClick",xe,Te)},_itemPointerDownHandler(fe){this.option("focusStateEnabled")&&(this._itemFocusHandler=function(){if(clearTimeout(this._itemFocusTimeout),this._itemFocusHandler=null,fe.isDefaultPrevented())return;const xe=(0,S.A)(fe.target),Te=xe.closest(this._itemElements()),Ee=this._closestFocusable(xe);Te.length&&this._isFocusTarget(Ee?.get(0))&&this.option("focusedElement",(0,b.cc)(Te))}.bind(this),this._itemFocusTimeout=setTimeout(this._forcePointerDownFocus.bind(this)))},_closestFocusable(fe){if(fe.is(G.nq))return fe;for(fe=fe.parent();fe.length&&!P.A.isDocument(fe.get(0))&&!P.A.isDocumentFragment(fe.get(0));){if(fe.is(G.nq))return fe;fe=fe.parent()}},_forcePointerDownFocus(){this._itemFocusHandler&&this._itemFocusHandler()},_updateFocusState(){this.callBase.apply(this,arguments),this._forcePointerDownFocus()},_attachHoldEvent(){const fe=this._itemContainer(),xe=this._itemSelector(),Te=(0,L.b4)(C.A.name,this.NAME);D.A.off(fe,Te,xe),D.A.on(fe,Te,xe,{timeout:this._getHoldTimeout()},this._itemHoldHandler.bind(this))},_getHoldTimeout(){return this.option("itemHoldTimeout")},_shouldFireHoldEvent(){return this.hasActionSubscription("onItemHold")},_itemHoldHandler(fe){this._shouldFireHoldEvent()?this._itemDXEventHandler(fe,"onItemHold"):fe.cancel=!0},_attachContextMenuEvent(){const fe=this._itemContainer(),xe=this._itemSelector(),Te=(0,L.b4)(w.U,this.NAME);D.A.off(fe,Te,xe),D.A.on(fe,Te,xe,this._itemContextMenuHandler.bind(this))},_shouldFireContextMenuEvent(){return this.hasActionSubscription("onItemContextMenu")},_itemContextMenuHandler(fe){this._shouldFireContextMenuEvent()?this._itemDXEventHandler(fe,"onItemContextMenu"):fe.cancel=!0},_renderContentImpl(){const fe=this.option("items")||[];this._renderItems(this._renderedItemsCount?fe.slice(this._renderedItemsCount):fe)},_renderItems(fe){fe.length&&(0,a.__)(fe,(xe,Te)=>{this._renderItem(this._renderedItemsCount+xe,Te)}),this._renderEmptyMessage()},_getItemsContainer(){return this._itemContainer()},_setAttributes(fe){const xe=(0,W.A)({},this.option("_itemAttributes")),{class:Te}=xe;if(Te){const Ee=fe.get(0).className;xe.class=[Ee,Te].join(" ")}fe.attr(xe)},_renderItem(fe,xe,Te,Ee){const Oe=fe?.item??fe;Te=Te||this._getItemsContainer();const ze=this._renderItemFrame(Oe,xe,Te,Ee);this._setElementData(ze,xe,Oe),this._setAttributes(ze),this._attachItemClickEvent(xe,ze);const $e=this._getItemContent(ze),Be=this._renderItemContent({index:Oe,itemData:xe,container:(0,b.cc)($e),contentClass:this._itemContentClass(),defaultTemplateName:this.option("itemTemplate")}),Ue=this;return(0,c.z7)(Be).done(ot=>{Ue._postprocessRenderItem({itemElement:ze,itemContent:ot,itemData:xe,itemIndex:Oe}),Ue._executeItemRenderAction(fe,xe,(0,b.cc)(ze))}),ze},_getItemContent(fe){const xe=fe.find(".dx-item-content-placeholder");return xe.removeClass("dx-item-content-placeholder"),xe},_attachItemClickEvent(fe,xe){!fe||!fe.onClick||D.A.on(xe,x.U,Te=>{this._itemEventHandlerByHandler(xe,fe.onClick,{event:Te})})},_renderItemContent(fe){const xe=this._getItemTemplateName(fe),Te=this._getTemplate(xe);this._addItemContentClasses(fe);const Ee=(0,S.A)(this._createItemByTemplate(Te,fe));return Ee.hasClass("dx-template-wrapper")?this._renderItemContentByNode(fe,Ee):fe.container},_renderItemContentByNode(fe,xe){return(0,S.A)(fe.container).replaceWith(xe),fe.container=(0,b.cc)(xe),this._addItemContentClasses(fe),xe},_addItemContentClasses(fe){const xe=[K+"-content",fe.contentClass];(0,S.A)(fe.container).addClass(xe.join(" "))},_appendItemToContainer(fe,xe,Te){xe.appendTo(fe)},_renderItemFrame(fe,xe,Te,Ee){const Oe=(0,S.A)("<div>");if(new this.constructor.ItemClass(Oe,this._itemOptions(),xe||{}),Ee&&Ee.length?Ee.replaceWith(Oe):this._appendItemToContainer.call(this,Te,Oe,fe),this.option("useItemTextAsTitle")){const ze=this._displayGetter?this._displayGetter(xe):xe;Oe.attr("title",ze)}return Oe},_itemOptions(){const fe=this;return{watchMethod:()=>fe.option("integrationOptions.watchMethod"),owner:fe,fieldGetter(xe){const Te=fe.option(`${xe}Expr`);return(0,d.Hz)(Te)}}},_postprocessRenderItem:y.lQ,_executeItemRenderAction(fe,xe,Te){this._getItemRenderAction()({itemElement:Te,itemIndex:fe,itemData:xe})},_setElementData(fe,xe,Te){fe.addClass([K,this._itemClass()].join(" ")).data(this._itemDataKey(),xe).data(this._itemIndexKey(),Te)},_createItemRenderAction(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["disabled","readOnly"],category:"rendering"})},_getItemRenderAction(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName(fe){const xe=fe.itemData,Te=fe.templateProperty||this.option("itemTemplateProperty");return xe&&xe[Te]||fe.defaultTemplateName},_createItemByTemplate(fe,xe){return fe.render({model:xe.itemData,container:xe.container,index:xe.index,onRendered:this._onItemTemplateRendered(fe,xe)})},_onItemTemplateRendered:()=>y.lQ,_emptyMessageContainer(){return this._itemContainer()},_renderEmptyMessage(fe){fe=fe||this.option("items");const xe=this.option("noDataText"),Te=!xe||fe&&fe.length||this._dataController.isLoading();Te&&this._$noData&&(this._$noData.remove(),this._$noData=null,this.setAria("label",void 0)),Te||(this._$noData=this._$noData||(0,S.A)("<div>").addClass("dx-empty-message"),this._$noData.appendTo(this._emptyMessageContainer()),this.option("encodeNoDataText")?this._$noData.text(xe):this._$noData.html(xe)),this.$element().toggleClass("dx-empty-collection",!Te)},_itemDXEventHandler(fe,xe,Te,Ee){this._itemEventHandler(fe.target,xe,(0,s.X)(Te,{event:fe}),Ee)},_itemEventHandler(fe,xe,Te,Ee){const Oe=this._createActionByOption(xe,(0,s.X)({validatingTargetName:"itemElement"},Ee));return this._itemEventHandlerImpl(fe,Oe,Te)},_itemEventHandlerByHandler(fe,xe,Te,Ee){const Oe=this._createAction(xe,(0,s.X)({validatingTargetName:"itemElement"},Ee));return this._itemEventHandlerImpl(fe,Oe,Te)},_itemEventHandlerImpl(fe,xe,Te){const Ee=this._closestItemElement((0,S.A)(fe)),Oe=(0,s.X)({},Te);return xe((0,s.X)(Te,this._extendActionArgs(Ee),Oe))},_extendActionArgs(fe){return{itemElement:(0,b.cc)(fe),itemIndex:this._itemElements().index(fe),itemData:this._getItemData(fe)}},_closestItemElement(fe){return(0,S.A)(fe).closest(this._itemSelector())},_getItemData(fe){return(0,S.A)(fe).data(this._itemDataKey())},_getSummaryItemsSize(fe,xe,Te){let Ee=0;return xe&&(0,a.__)(xe,(Oe,ze)=>{"width"===fe?Ee+=(0,u.Ot)(ze,Te||!1):"height"===fe&&(Ee+=(0,u.P$)(ze,Te||!1))}),Ee},getFocusedItemId(){return this._focusedItemId||(this._focusedItemId=`dx-${new f.A}`),this._focusedItemId},itemElements(){return this._itemElements()},itemsContainer(){return this._itemContainer()}}).include(_.A);ye.ItemClass=U.A;const ge=ye},1129:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(5704),o=M(4859),P=M(4270),b=M(6021),f=M(3090),S=M(2660),T=M(1830),y=M(1221),d=M(5335),c=M(4072),s=M(127),a=M(9658),u=M(8732),h=M(1694);const x=function(C){return-1!==C},D=u.A.inherit({_setOptionsByReference(){this.callBase(),(0,f.X)(this._optionsByReference,{selectedItem:!0})},_getDefaultOptions(){return(0,f.X)(this.callBase(),{selectionMode:"none",selectionRequired:!1,selectByClick:!0,selectedItems:[],selectedItemKeys:[],maxFilterLengthInRequest:1500,keyExpr:null,selectedIndex:-1,selectedItem:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},ctor(C,I){this._userOptions=I||{},this.callBase(C,I)},_init(){this._initEditStrategy(),this.callBase(),this._initKeyGetter(),this._initSelectionModule()},_initKeyGetter(){this._keyGetter=(0,P.Hz)(this.option("keyExpr"))},_getKeysByItems(C){return this._editStrategy.getKeysByItems(C)},_getItemsByKeys(C,I){return this._editStrategy.getItemsByKeys(C,I)},_getKeyByIndex(C){return this._editStrategy.getKeyByIndex(C)},_getIndexByKey(C){return this._editStrategy.getIndexByKey(C)},_getIndexByItemData(C){return this._editStrategy.getIndexByItemData(C)},_isKeySpecified(){return!!this._dataController.key()},_getCombinedFilter(){return this._dataController.filter()},key(){return this.option("keyExpr")?this.option("keyExpr"):this._dataController.key()},keyOf(C){let I=C;return this.option("keyExpr")?I=this._keyGetter(C):this._dataController.store()&&(I=this._dataController.keyOf(C)),I},_nullValueSelectionSupported:()=>!1,_initSelectionModule(){const C=this,{itemsGetter:I}=C._editStrategy;this._selection=new a.A({allowNullValue:this._nullValueSelectionSupported(),mode:this.option("selectionMode"),maxFilterLengthInRequest:this.option("maxFilterLengthInRequest"),equalByReference:!this._isKeySpecified(),onSelectionChanged(L){(L.addedItemKeys.length||L.removedItemKeys.length)&&(C.option("selectedItems",C._getItemsByKeys(L.selectedItemKeys,L.selectedItems)),C._updateSelectedItems(L))},filter:C._getCombinedFilter.bind(C),totalCount(){const L=C.option("items"),N=C._dataController.totalCount();return N>=0?N:C._getItemsCount(L)},key:C.key.bind(C),keyOf:C.keyOf.bind(C),load(L){var N;const G=C._dataController;return L.customQueryParams=null===(N=G.loadOptions())||void 0===N?void 0:N.customQueryParams,L.userData=G.userData(),G.store()?G.loadFromStore(L).done(k=>{if(C._disposed)return;const U=(0,d.Xp)(k).data;G.applyMapFunction(U)}):(0,b.cY)().resolve(this.plainItems())},dataFields:()=>C._dataController.select(),plainItems:I.bind(C._editStrategy)})},_getItemsCount(C){return C.reduce((I,L)=>I+(L.items?this._getItemsCount(L.items):1),0)},_initEditStrategy(){this._editStrategy=new(0,h.A)(this)},_getSelectedItemIndices(C){const I=this,L=[];return C=C||this._selection.getSelectedItemKeys(),I._editStrategy.beginCache(),(0,S.__)(C,(N,G)=>{const k=I._getIndexByKey(G);x(k)&&L.push(k)}),I._editStrategy.endCache(),L},_initMarkup(){this._rendering=!0,this._dataController.isLoading()||this._syncSelectionOptions().done(()=>this._normalizeSelectedItems()),this.callBase()},_render(){this.callBase(),this._rendering=!1},_fireContentReadyAction(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions(C){let I,L,N,G;switch(C=C||this._chooseSelectOption()){case"selectedIndex":I=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),(0,T.O9)(I)?(this._setOptionWithoutOptionChange("selectedItems",[I]),this._setOptionWithoutOptionChange("selectedItem",I),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([I]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(G=this.option("selectedItems")||[],L=G.length?this._editStrategy.getIndexByItemData(G[0]):-1,this.option("selectionRequired")&&!x(L))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",G[0]),this._setOptionWithoutOptionChange("selectedIndex",L),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(G));break;case"selectedItem":if(I=this.option("selectedItem"),L=this._editStrategy.getIndexByItemData(I),this.option("selectionRequired")&&!x(L))return this._syncSelectionOptions("selectedIndex");(0,T.O9)(I)?(this._setOptionWithoutOptionChange("selectedItems",[I]),this._setOptionWithoutOptionChange("selectedIndex",L),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([I]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",-1));break;case"selectedItemKeys":if(N=this.option("selectedItemKeys"),this.option("selectionRequired")){const k=this._getIndexByKey(N[0]);if(!x(k))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(N)}return(0,b.cY)().resolve().promise()},_chooseSelectOption(){let C="selectedIndex";const I=function(L){const N=this.option(L);return(0,T.O9)(N)&&N.length||L in this._userOptions}.bind(this);return I("selectedItems")?C="selectedItems":I("selectedItem")?C="selectedItem":I("selectedItemKeys")&&(C="selectedItemKeys"),C},_compareKeys(C,I){if(C.length!==I.length)return!1;for(let L=0;L<I.length;L++)if(C[L]!==I[L])return!1;return!0},_normalizeSelectedItems(){if("none"===this.option("selectionMode"))this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems");else if("single"===this.option("selectionMode")){const C=this.option("selectedItems");if(C.length>1||!C.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){const I=this._selection.getSelectedItems();let L=void 0===C[0]?I[0]:C[0];return void 0===L&&(L=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&L&&L.items&&(L.items=[L.items[0]]),this._selection.setSelection(this._getKeysByItems([L])),this._setOptionWithoutOptionChange("selectedItems",[L]),this._syncSelectionOptions("selectedItems")}this._selection.setSelection(this._getKeysByItems(C))}else{const C=this._getKeysByItems(this.option("selectedItems")),I=this._selection.getSelectedItemKeys();this._compareKeys(I,C)||this._selection.setSelection(C)}return(0,b.cY)().resolve().promise()},_itemClickHandler(C){let I=(0,b.cY)().resolve();const{callBase:L}=this;this._createAction(N=>{I=this._itemSelectHandler(N.event)??I},{validatingTargetName:"itemElement"})({itemElement:(0,W.A)(C.currentTarget),event:C}),I.always(()=>{L.apply(this,arguments)})},_itemSelectHandler(C){var I;let L;if(this.option("selectByClick"))return this.isItemSelected(C.currentTarget)?this.unselectItem(C.currentTarget):L=this.selectItem(C.currentTarget),null===(I=L)||void 0===I?void 0:I.promise()},_selectedItemElement(C){return this._itemElements().eq(C)},_postprocessRenderItem(C){if("none"!==this.option("selectionMode")){const I=(0,W.A)(C.itemElement),L=this._editStrategy.getNormalizedIndex(I),N=this._isItemSelected(L);this._processSelectableItem(I,N)}},_processSelectableItem(C,I){C.toggleClass(this._selectedItemClass(),I),this._setAriaSelectionAttribute(C,String(I))},_updateSelectedItems(C){const I=this,{addedItemKeys:L}=C,{removedItemKeys:N}=C;if(I._rendered&&(L.length||N.length)){const G=I._selectionChangePromise;if(!I._rendering){const k=[];let U;const B=[];I._editStrategy.beginCache();for(let K=0;K<L.length;K++)U=I._getIndexByKey(L[K]),k.push(U),I._addSelection(U);for(let K=0;K<N.length;K++)U=I._getIndexByKey(N[K]),B.push(U),I._removeSelection(U);I._editStrategy.endCache(),I._updateSelection(k,B)}(0,b.z7)(G).done(()=>{I._fireSelectionChangeEvent(C.addedItems,C.removedItems)})}},_fireSelectionChangeEvent(C,I){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:C,removedItems:I})},_updateSelection:o.lQ,_setAriaSelectionAttribute(C,I){this.setAria("selected",I,C)},_removeSelection(C){const I=this._editStrategy.getItemElement(C);x(C)&&(this._processSelectableItem(I,!1),c.A.triggerHandler(I,"stateChanged",!1))},_addSelection(C){const I=this._editStrategy.getItemElement(C);x(C)&&(this._processSelectableItem(I,!0),c.A.triggerHandler(I,"stateChanged",!0))},_isItemSelected(C){const I=this._getKeyByIndex(C);return this._selection.isItemSelected(I,{checkPending:!0})},_optionChanged(C){switch(C.name){case"selectionMode":this._invalidate();break;case"dataSource":(!C.value||Array.isArray(C.value)&&!C.value.length)&&this.option("selectedItemKeys",[]),this.callBase(C);break;case"selectedIndex":case"selectedItem":case"selectedItems":case"selectedItemKeys":this._syncSelectionOptions(C.name).done(()=>this._normalizeSelectedItems());break;case"keyExpr":this._initKeyGetter();break;case"selectionRequired":this._normalizeSelectedItems();break;case"selectByClick":case"onSelectionChanged":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"maxFilterLengthInRequest":break;default:this.callBase(C)}},_clearSelectedItems(){this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems")},_waitDeletingPrepare(C){if(C.data("dxItemDeleting"))return(0,b.cY)().resolve().promise();C.data("dxItemDeleting",!0);const I=(0,b.cY)(),L={cancel:!1},N=this._itemEventHandler(C,"onItemDeleting",L,{excludeValidators:["disabled","readOnly"]});return(0,b.z7)(N).always(function(G){const k=!N,U=!k&&"resolved"===N.state(),K=k||U&&!arguments.length||U&&G;(0,b.z7)((0,b.Sx)(L.cancel)).always(()=>{C.data("dxItemDeleting",!1)}).done(J=>{K&&!J?I.resolve():I.reject()}).fail(I.reject)}),I.promise()},_deleteItemFromDS(C){const I=this._dataController,L=(0,b.cY)(),N=this.option("disabled"),G=I.store();if(!G)return(0,b.cY)().resolve().promise();if(!G.remove)throw s.A.Error("E1011");return this.option("disabled",!0),G.remove(I.keyOf(this._getItemData(C))).done(k=>{void 0!==k?L.resolve():L.reject()}).fail(()=>{L.reject()}),L.always(()=>{this.option("disabled",N)}),L},_tryRefreshLastPage(){const C=(0,b.cY)();return this._isLastPage()||this.option("grouped")?C.resolve():this._refreshLastPage().done(()=>{C.resolve()}),C.promise()},_refreshLastPage(){return this._expectLastItemLoading(),this._dataController.load()},_updateSelectionAfterDelete(C){const I=this._getKeyByIndex(C);this._selection.deselect([I])},_updateIndicesAfterIndex(C){const I=this._itemElements();for(let L=C+1;L<I.length;L++)(0,W.A)(I[L]).data(this._itemIndexKey(),L-1)},_simulateOptionChange(C){const I=this.option(C);I instanceof y.q||this._optionChangedAction({name:C,fullName:C,value:I})},isItemSelected(C){return this._isItemSelected(this._editStrategy.getNormalizedIndex(C))},selectItem(C){if("none"===this.option("selectionMode"))return;const I=this._editStrategy.getNormalizedIndex(C);if(!x(I))return;const L=this._getKeyByIndex(I);if(this._selection.isItemSelected(L))return;if("single"===this.option("selectionMode"))return this._selection.setSelection([L]);const N=this.option("selectedItemKeys")||[];return this._selection.setSelection([...N,L],[L])},unselectItem(C){const I=this._editStrategy.getNormalizedIndex(C);if(!x(I))return;const L=this._selection.getSelectedItemKeys();if(this.option("selectionRequired")&&L.length<=1)return;const N=this._getKeyByIndex(I);this._selection.isItemSelected(N,{checkPending:!0})&&this._selection.deselect([N])},_deleteItemElementByIndex(C){this._updateSelectionAfterDelete(C),this._updateIndicesAfterIndex(C),this._editStrategy.deleteItemAtIndex(C)},_afterItemElementDeleted(C,I){const L=this._dataController.getDataSource()?"dataSource":"items";this._simulateOptionChange(L),this._itemEventHandler(C,"onItemDeleted",I,{beforeExecute(){C.remove()},excludeValidators:["disabled","readOnly"]}),this._renderEmptyMessage()},deleteItem(C){const I=this,L=(0,b.cY)(),N=this._editStrategy.getItemElement(C),G=this._editStrategy.getNormalizedIndex(C),k=this._itemResponseWaitClass();return x(G)?this._waitDeletingPrepare(N).done(()=>{N.addClass(k);const U=I._extendActionArgs(N);I._deleteItemFromDS(N).done(()=>{I._deleteItemElementByIndex(G),I._afterItemElementDeleted(N,U),I._tryRefreshLastPage().done(()=>{L.resolveWith(I)})}).fail(()=>{N.removeClass(k),L.rejectWith(I)})}).fail(()=>{L.rejectWith(I)}):L.rejectWith(I),L.promise()},reorderItem(C,I){const L=(0,b.cY)(),N=this,G=this._editStrategy,k=G.getItemElement(C),U=G.getItemElement(I),B=G.getNormalizedIndex(C),K=G.getNormalizedIndex(I),J=this._dataController.getDataSource()?"dataSource":"items";return x(B)&&x(K)&&B!==K?L.resolveWith(this):L.rejectWith(this),L.promise().done(function(){U[G.itemPlacementFunc(B,K)](k),G.moveItemAtIndexToIndex(B,K),this._updateIndicesAfterIndex(B),N.option("selectedItems",N._getItemsByKeys(N._selection.getSelectedItemKeys(),N._selection.getSelectedItems())),"items"===J&&N._simulateOptionChange(J),N._itemEventHandler(k,"onItemReordered",{fromIndex:G.getIndex(B),toIndex:G.getIndex(K)},{excludeValidators:["disabled","readOnly"]})})}})},1694:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>c});var W=M(3538),o=M(6054),P=M(5704),b=M(4859),f=M(1830);const{abstract:S}=W.A,c=W.A.inherit({ctor(s){this._collectionWidget=s},getIndexByItemData:S,getItemDataByIndex:S,getKeysByItems:S,getItemsByKeys:S,itemsGetter:S,getKeyByIndex(s){const a=this._denormalizeItemIndex(s);return this.getKeysByItems([this.getItemDataByIndex(a)])[0]},_equalKeys(s,a){return this._collectionWidget._isKeySpecified()?(0,b.RL)(s,a):s===a},beginCache(){this._cache={}},endCache(){this._cache=null},getIndexByKey:S,getNormalizedIndex(s){return this._isNormalizedItemIndex(s)?s:this._isItemIndex(s)?this._normalizeItemIndex(s):this._isNode(s)?this._getNormalizedItemIndex(s):this._normalizeItemIndex(this.getIndexByItemData(s))},getIndex(s){return this._isNormalizedItemIndex(s)?this._denormalizeItemIndex(s):this._isItemIndex(s)?s:this._isNode(s)?this._denormalizeItemIndex(this._getNormalizedItemIndex(s)):this.getIndexByItemData(s)},getItemElement(s){if(this._isNormalizedItemIndex(s))return this._getItemByNormalizedIndex(s);if(this._isItemIndex(s))return this._getItemByNormalizedIndex(this._normalizeItemIndex(s));if(this._isNode(s))return(0,P.A)(s);const a=this._normalizeItemIndex(this.getIndexByItemData(s));return this._getItemByNormalizedIndex(a)},_isNode:s=>o.A.isNode(s&&(0,f.Kb)(s)?s.get(0):s),deleteItemAtIndex:S,itemPlacementFunc(s,a){return this._itemsFromSameParent(s,a)&&s<a?"after":"before"},moveItemAtIndexToIndex:S,_isNormalizedItemIndex:s=>"number"==typeof s&&Math.round(s)===s,_isItemIndex:S,_getNormalizedItemIndex:S,_normalizeItemIndex:S,_denormalizeItemIndex:S,_getItemByNormalizedIndex:S,_itemsFromSameParent:S}).inherit({_getPlainItems(){return this._collectionWidget.option("items")||[]},getIndexByItemData(s){const a=this._collectionWidget.keyOf.bind(this._collectionWidget);return a?this.getIndexByKey(a(s)):this._getPlainItems().indexOf(s)},getItemDataByIndex(s){return this._getPlainItems()[s]},deleteItemAtIndex(s){this._getPlainItems().splice(s,1)},itemsGetter(){return this._getPlainItems()},getKeysByItems(s){const a=this._collectionWidget.keyOf.bind(this._collectionWidget);let u=s;if(a){u=[];for(let h=0;h<s.length;h++)u.push(a(s[h]))}return u},getIndexByKey(s){const a=this._cache,u=a&&a.keys||this.getKeysByItems(this._getPlainItems());if(a&&!a.keys&&(a.keys=u),"object"!=typeof s)return u.indexOf(s);for(let h=0,{length:g}=u;h<g;h++)if(this._equalKeys(s,u[h]))return h;return-1},getItemsByKeys:(s,a)=>(a||s).slice(),moveItemAtIndexToIndex(s,a){const u=this._getPlainItems(),h=u[s];u.splice(s,1),u.splice(a,0,h)},_isItemIndex:s=>"number"==typeof s&&Math.round(s)===s,_getNormalizedItemIndex(s){return this._collectionWidget._itemElements().index(s)},_normalizeItemIndex:s=>s,_denormalizeItemIndex:s=>s,_getItemByNormalizedIndex(s){return s>-1?this._collectionWidget._itemElements().eq(s):null},_itemsFromSameParent:()=>!0})},8299:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>f});var W=M(4859),o=M(6021);const P={load:()=>(0,o.cY)().reject(),loadSingle:()=>(0,o.cY)().reject(),loadFromStore:()=>(0,o.cY)().reject(),loadNextPage:()=>(0,o.cY)().reject(),loadOptions:W.lQ,userData:W.lQ,cancel:W.lQ,cancelAll:W.lQ,filter:W.lQ,addSearchFilter:W.lQ,group:W.lQ,paginate:W.lQ,pageSize:W.lQ,pageIndex:W.lQ,resetDataSourcePageIndex:W.lQ,totalCount:W.lQ,isLastPage:W.lQ,isLoading:W.lQ,isLoaded:W.lQ,searchValue:W.lQ,searchOperation:W.lQ,searchExpr:W.lQ,select:W.lQ,key:W.lQ,keyOf:W.lQ,store:W.lQ,items:W.lQ,applyMapFunction:W.lQ,getDataSource:W.lQ,reload:W.lQ,on:W.lQ,off:W.lQ},f=class b{constructor(T){if(!T)return P;this._dataSource=T}load(){return this._dataSource.load()}loadSingle(T,y){return arguments.length<2&&(y=T,T=this.key()),this._dataSource.loadSingle(T,y)}loadFromStore(T){return this.store().load(T)}loadNextPage(){return this.pageIndex(1+this.pageIndex()),this.load()}loadOptions(){return this._dataSource.loadOptions()}userData(){return this._dataSource._userData}cancel(T){this._dataSource.cancel(T)}cancelAll(){this._dataSource.cancelAll()}filter(T){return this._dataSource.filter(T)}addSearchFilter(T){this._dataSource._addSearchFilter(T)}group(T){return this._dataSource.group(T)}paginate(){return this._dataSource.paginate()}pageSize(){return this._dataSource._pageSize}pageIndex(T){return this._dataSource.pageIndex(T)}resetDataSourcePageIndex(){this.pageIndex()&&(this.pageIndex(0),this.load())}totalCount(){return this._dataSource.totalCount()}isLastPage(){return this._dataSource.isLastPage()||!this._dataSource._pageSize}isLoading(){return this._dataSource.isLoading()}isLoaded(){return this._dataSource.isLoaded()}searchValue(T){return arguments.length?this._dataSource.searchValue(T):this._dataSource.searchValue()}searchOperation(T){return this._dataSource.searchOperation(T)}searchExpr(T){return arguments.length?this._dataSource.searchExpr(T):this._dataSource.searchExpr()}select(){return this._dataSource.select(...arguments)}key(){return this._dataSource.key()}keyOf(T){return this.store().keyOf(T)}store(){return this._dataSource.store()}items(){return this._dataSource.items()}applyMapFunction(T){return this._dataSource._applyMapFunction(T)}getDataSource(){return this._dataSource||null}reload(){return this._dataSource.reload()}on(T,y){this._dataSource.on(T,y)}off(T,y){this._dataSource.off(T,y)}}},5107:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>c});var W=M(3538),o=M(5704),P=M(2660),b=M(8879);const d=W.A.inherit({ctor(s,a,u){this._$element=s,this._options=a,this._rawData=u,(0,b.UK)(s,this,this._dispose),this._render()},_render(){const s=(0,o.A)("<div>").addClass("dx-item-content-placeholder");this._$element.append(s),this._watchers=[],this._renderWatchers()},_renderWatchers(){this._startWatcher("disabled",this._renderDisabled.bind(this)),this._startWatcher("visible",this._renderVisible.bind(this))},_startWatcher(s,a){const u=this._rawData,h=this._options.fieldGetter(s),g=function(s,a,u){const h=function(){let g;return function(_){g!==_&&(u(_,g),g=_)}}();return{dispose:s(a,h),force(){h(a())}}}(this._options.watchMethod(),()=>h(u),(_,x)=>{this._dirty=!0,a(_,x)});this._watchers.push(g)},setDataField(){if(this._dirty=!1,(0,P.__)(this._watchers,(s,a)=>{a.force()}),this._dirty)return!0},_renderDisabled(s,a){this._$element.toggleClass("dx-state-disabled",!!s),this._$element.attr("aria-disabled",!!s),this._updateOwnerFocus(s)},_updateOwnerFocus(s){const a=this._options.owner;a&&s&&a._resetItemFocus(this._$element)},_renderVisible(s,a){this._$element.toggleClass("dx-state-invisible",void 0!==s&&!s)},_dispose(){(0,P.__)(this._watchers,(s,a)=>{a.dispose()})}});d.getInstance=function(s){return(0,b.pV)(s,this)};const c=d},9430:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>fe});var W=M(4504),o=M(851),P=M(1973),b=M(5973),f=M(2925),S=M(5704),T=M(3090),y=M(1363),d=M(778),c=M(4072),s=M(9293),a=M(8360),u=M(3312),h=M(6620),g=M(9810),_=M(8910);const D="dx-colorview-container-row",G="dx-colorview-palette-gradient",k="dx-colorview-palette-gradient-white",U="dx-colorview-palette-gradient-black",de="dx-colorview-color-preview",ve="dx-colorview-color-preview-color-current",le="dx-colorview-color-preview-color-new",ge=h.A.inherit({_supportedKeys(){const xe=this.option("rtlEnabled"),Te=this,Ee=function(Ke){let Ye=100/Te._paletteWidth;return Ke.shiftKey&&(Ye*=Te.option("keyStep")),Ye=Ye>1?Ye:1,Math.round(Ye)},Oe=function(Ke){let Ye=Te._currentColor.hsv.s+Ke;Ye>100?Ye=100:Ye<0&&(Ye=0),Te._currentColor.hsv.s=Ye,Be()},ze=function(Ke){let Ye=100/Te._paletteHeight;return Ke.shiftKey&&(Ye*=Te.option("keyStep")),Ye=Ye>1?Ye:1,Math.round(Ye)},$e=function(Ke){let Ye=Te._currentColor.hsv.v+Ke;Ye>100?Ye=100:Ye<0&&(Ye=0),Te._currentColor.hsv.v=Ye,Be()};function Be(){Te._placePaletteHandle(),Te._updateColorFromHsv(Te._currentColor.hsv.h,Te._currentColor.hsv.s,Te._currentColor.hsv.v)}const Ue=function(Ke){let Ye=360/(Te._hueScaleWrapperHeight-Te._hueScaleHandleHeight);return Ke.shiftKey&&(Ye*=Te.option("keyStep")),Ye=Ye>1?Ye:1,Ye},ot=function(Ke){Te._currentColor.hsv.h+=Ke,Te._placeHueScaleHandle();const Ye=(0,W.x5)(Te._$hueScaleHandle);Te._updateColorHue(Ye.top+Te._hueScaleHandleHeight/2)},st=function(Ke){let Ye=1/Te._alphaChannelScaleWorkWidth;return Ke.shiftKey&&(Ye*=Te.option("keyStep")),Ye=Ye>.01?Ye:.01,Ye=xe?-Ye:Ye,Ye},et=function(Ke){Te._currentColor.a+=Ke,Te._placeAlphaChannelHandle();const Ye=(0,W.x5)(Te._$alphaChannelHandle);Te._calculateColorTransparencyByScaleWidth(Ye.left+Te._alphaChannelHandleWidth/2)};return(0,T.X)(this.callBase(),{upArrow(Ke){Ke.preventDefault(),Ke.stopPropagation(),(0,s.By)(Ke)?this._currentColor.hsv.h<=360&&!this._isTopColorHue&&(this._saveValueChangeEvent(Ke),ot(Ue(Ke))):this._currentColor.hsv.v<100&&(this._saveValueChangeEvent(Ke),$e(ze(Ke)))},downArrow(Ke){Ke.preventDefault(),Ke.stopPropagation(),(0,s.By)(Ke)?this._currentColor.hsv.h>=0&&(this._isTopColorHue&&(this._currentColor.hsv.h=360),this._saveValueChangeEvent(Ke),ot(-Ue(Ke))):this._currentColor.hsv.v>0&&(this._saveValueChangeEvent(Ke),$e(-ze(Ke)))},rightArrow(Ke){Ke.preventDefault(),Ke.stopPropagation(),(0,s.By)(Ke)?(xe?this._currentColor.a<1:this._currentColor.a>0&&this.option("editAlphaChannel"))&&(this._saveValueChangeEvent(Ke),et(-st(Ke))):this._currentColor.hsv.s<100&&(this._saveValueChangeEvent(Ke),Oe(Ee(Ke)))},leftArrow(Ke){Ke.preventDefault(),Ke.stopPropagation(),(0,s.By)(Ke)?(xe?this._currentColor.a>0:this._currentColor.a<1&&this.option("editAlphaChannel"))&&(this._saveValueChangeEvent(Ke),et(st(Ke))):this._currentColor.hsv.s>0&&(this._saveValueChangeEvent(Ke),Oe(-Ee(Ke)))},enter(Ke){this._fireEnterKeyPressed(Ke)}})},_getDefaultOptions(){return(0,T.X)(this.callBase(),{value:null,matchValue:null,onEnterKeyPressed:void 0,editAlphaChannel:!1,keyStep:1,stylingMode:void 0})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===b.A.real().deviceType&&!b.A.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this._initColorAndOpacity(),this._initEnterKeyPressedAction()},_initEnterKeyPressedAction(){this._onEnterKeyPressedAction=this._createActionByOption("onEnterKeyPressed")},_fireEnterKeyPressed(xe){this._onEnterKeyPressedAction&&this._onEnterKeyPressedAction({event:xe})},_initColorAndOpacity(){this._setCurrentColor(this.option("value"))},_setCurrentColor(xe){const Te=new o.A(xe=xe||"#000000");Te.colorIsInvalid?(this._currentColor||(this._currentColor=new o.A("#000000")),this.option("value",this._currentColor.baseColor)):(!this._currentColor||this._makeRgba(this._currentColor)!==this._makeRgba(Te))&&(this._currentColor=Te,this._$currentColor&&this._makeTransparentBackground(this._$currentColor,Te))},_setBaseColor(xe){const Ee=new o.A(xe||"#000000");Ee.colorIsInvalid||this._makeRgba(this.option("matchValue")!==this._makeRgba(Ee))&&this._$baseColor&&this._makeTransparentBackground(this._$baseColor,Ee)},_initMarkup(){this.callBase(),this.$element().addClass("dx-colorview"),this._renderColorPickerContainer()},_render(){this.callBase(),this._renderPalette(),this._renderHueScale(),this._renderControlsContainer(),this._renderControls(),this._renderAlphaChannelElements()},_makeTransparentBackground(xe,Te){Te instanceof o.A||(Te=new o.A(Te)),xe.css("backgroundColor",this._makeRgba(Te))},_makeRgba:xe=>(xe instanceof o.A||(xe=new o.A(xe)),`rgba(${[xe.r,xe.g,xe.b,xe.a].join(", ")})`),_renderValue(){this.callBase(this.option("editAlphaChannel")?this._makeRgba(this._currentColor):this.option("value"))},_renderColorPickerContainer(){const xe=this.$element();this._$colorPickerContainer=(0,S.A)("<div>").addClass("dx-colorview-container").appendTo(xe),this._renderHtmlRows()},_renderHtmlRows(xe){const Te=this._$colorPickerContainer.find(`.${D}`),Ee=Te.length;let ze=Ee-(this.option("editAlphaChannel")?2:1);if(ze>0&&Te.eq(-1).remove(),ze<0){ze=Math.abs(ze);const $e=[];let Be;for(Be=0;Be<ze;Be++)$e.push((0,S.A)("<div>").addClass(D));if(Ee)for(Be=0;Be<$e.length;Be++)Te.eq(0).after($e[Be]);else this._$colorPickerContainer.append($e)}},_renderHtmlCellInsideRow:(xe,Te,Ee)=>(0,S.A)("<div>").addClass("dx-colorview-container-cell").addClass(Ee).appendTo(Te.find(`.${D}`).eq(xe)),_renderPalette(){const xe=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer,"dx-colorview-palette-cell"),Te=(0,S.A)("<div>").addClass([G,k].join(" ")),Ee=(0,S.A)("<div>").addClass([G,U].join(" "));this._$palette=(0,S.A)("<div>").addClass("dx-colorview-palette").css("backgroundColor",this._currentColor.getPureColor().toHex()).appendTo(xe),this._paletteHeight=(0,y.Oq)(this._$palette),this._paletteWidth=(0,y.RG)(this._$palette),this._renderPaletteHandle(),this._$palette.append([Te,Ee])},_renderPaletteHandle(){this._$paletteHandle=(0,S.A)("<div>").addClass("dx-colorview-palette-handle").appendTo(this._$palette);const xe=`dx-${new f.A}`;this.setAria({id:xe,role:"application"},this._$paletteHandle),this.setAria("activedescendant",xe,this.option("target")),this._createComponent(this._$paletteHandle,u.A,{contentTemplate:null,boundary:this._$palette,allowMoveByClick:!0,boundOffset:function(){return-this._paletteHandleHeight/2}.bind(this),onDragMove:Ee=>{let{event:Oe}=Ee;const ze=(0,W.x5)(this._$paletteHandle);this._updateByDrag=!0,this._saveValueChangeEvent(Oe),this._updateColorFromHsv(this._currentColor.hsv.h,this._calculateColorSaturation(ze),this._calculateColorValue(ze))}}),this._paletteHandleWidth=(0,y.RG)(this._$paletteHandle),this._paletteHandleHeight=(0,y.Oq)(this._$paletteHandle),this._placePaletteHandle()},_placePaletteHandle(){(0,W.Cy)(this._$paletteHandle,{left:Math.round(this._paletteWidth*this._currentColor.hsv.s/100-this._paletteHandleWidth/2),top:Math.round(this._paletteHeight-this._paletteHeight*this._currentColor.hsv.v/100-this._paletteHandleHeight/2)})},_calculateColorValue(xe){const Te=Math.floor(xe.top+this._paletteHandleHeight/2);return 100-Math.round(100*Te/this._paletteHeight)},_calculateColorSaturation(xe){const Te=Math.floor(xe.left+this._paletteHandleWidth/2);return Math.round(100*Te/this._paletteWidth)},_updateColorFromHsv(xe,Te,Ee){const{a:Oe}=this._currentColor;this._currentColor=new o.A(`hsv(${[xe,Te,Ee].join(",")})`),this._currentColor.a=Oe,this._updateColorParamsAndColorPreview(),this.applyColor()},_renderHueScale(){const xe=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer,"dx-colorview-hue-scale-cell");this._$hueScaleWrapper=(0,S.A)("<div>").addClass("dx-colorview-hue-scale-wrapper").appendTo(xe),this._$hueScale=(0,S.A)("<div>").addClass("dx-colorview-hue-scale").appendTo(this._$hueScaleWrapper),this._hueScaleHeight=(0,y.Oq)(this._$hueScale),this._hueScaleWrapperHeight=(0,y.P$)(this._$hueScaleWrapper),this._renderHueScaleHandle()},_renderHueScaleHandle(){this._$hueScaleHandle=(0,S.A)("<div>").addClass("dx-colorview-hue-scale-handle").appendTo(this._$hueScaleWrapper),this._createComponent(this._$hueScaleHandle,u.A,{contentTemplate:null,boundary:this._$hueScaleWrapper,allowMoveByClick:!0,dragDirection:"vertical",onDragMove:xe=>{let{event:Te}=xe;this._updateByDrag=!0,this._saveValueChangeEvent(Te),this._updateColorHue((0,W.x5)(this._$hueScaleHandle).top+this._hueScaleHandleHeight/2)}}),this._hueScaleHandleHeight=(0,y.Oq)(this._$hueScaleHandle),this._placeHueScaleHandle()},_placeHueScaleHandle(){const xe=this._hueScaleWrapperHeight,Te=this._hueScaleHandleHeight;let Ee=(xe-Te)*(360-this._currentColor.hsv.h)/360;xe<Ee+Te&&(Ee=xe-Te),Ee<0&&(Ee=0),(0,W.Cy)(this._$hueScaleHandle,{top:Math.round(Ee)})},_updateColorHue(xe){let Te=360-Math.round(360*(xe-this._hueScaleHandleHeight/2)/(this._hueScaleWrapperHeight-this._hueScaleHandleHeight));const Ee=this._currentColor.hsv.s,Oe=this._currentColor.hsv.v;this._isTopColorHue=!1,Te=Te<0?0:Te,Te>=360&&(this._isTopColorHue=!0,Te=0),this._updateColorFromHsv(Te,Ee,Oe),this._$palette.css("backgroundColor",this._currentColor.getPureColor().toHex())},_renderControlsContainer(){const xe=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer);this._$controlsContainer=(0,S.A)("<div>").addClass("dx-colorview-controls-container").appendTo(xe)},_renderControls(){this._renderColorsPreview(),this._renderRgbInputs(),this._renderHexInput()},_renderColorsPreview(){const xe=(0,S.A)("<div>").addClass("dx-colorview-color-preview-container").appendTo(this._$controlsContainer),Te=(0,S.A)("<div>").addClass("dx-colorview-color-preview-container-inner").appendTo(xe);this._$currentColor=(0,S.A)("<div>").addClass([de,le].join(" ")),this._$baseColor=(0,S.A)("<div>").addClass([de,ve].join(" ")),this._makeTransparentBackground(this._$baseColor,this.option("matchValue")),this._makeTransparentBackground(this._$currentColor,this._currentColor),Te.append([this._$baseColor,this._$currentColor])},_renderAlphaChannelElements(){this.option("editAlphaChannel")&&(this._$colorPickerContainer.find(`.${D}`).eq(1).addClass("dx-colorview-alpha-channel-row"),this._renderAlphaChannelScale(),this._renderAlphaChannelInput())},_renderRgbInputs(){this._rgbInputsWithLabels=[this._renderEditorWithLabel({editorType:g.A,value:this._currentColor.r,onValueChanged:this._updateColor.bind(this,!1),labelText:"R",labelAriaText:a.A.format("dxColorView-ariaRed"),labelClass:"dx-colorview-label-red"}),this._renderEditorWithLabel({editorType:g.A,value:this._currentColor.g,onValueChanged:this._updateColor.bind(this,!1),labelText:"G",labelAriaText:a.A.format("dxColorView-ariaGreen"),labelClass:"dx-colorview-label-green"}),this._renderEditorWithLabel({editorType:g.A,value:this._currentColor.b,onValueChanged:this._updateColor.bind(this,!1),labelText:"B",labelAriaText:a.A.format("dxColorView-ariaBlue"),labelClass:"dx-colorview-label-blue"})],this._$controlsContainer.append(this._rgbInputsWithLabels),this._rgbInputs=[this._rgbInputsWithLabels[0].find(".dx-numberbox").dxNumberBox("instance"),this._rgbInputsWithLabels[1].find(".dx-numberbox").dxNumberBox("instance"),this._rgbInputsWithLabels[2].find(".dx-numberbox").dxNumberBox("instance")]},_renderEditorWithLabel(xe){const Te=(0,S.A)("<div>"),Ee=(0,S.A)("<label>").addClass(xe.labelClass).text(`${xe.labelText}:`).append(Te);c.A.off(Ee,d.U),c.A.on(Ee,d.U,Be=>{Be.preventDefault()});const{editorType:Oe}=xe,ze=(0,T.X)({value:xe.value,onValueChanged:xe.onValueChanged,onKeyboardHandled:Be=>this._keyboardHandler(Be)},{stylingMode:this.option("stylingMode")});return Oe===g.A&&(ze.min=xe.min||0,ze.max=xe.max||255,ze.step=xe.step||1),new Oe(Te,ze).registerKeyHandler("enter",Be=>{this._fireEnterKeyPressed(Be)}),this.setAria("label",xe.labelAriaText,Te),Ee},hexInputOptions(){return{editorType:_.A,value:this._currentColor.toHex().replace("#",""),onValueChanged:this._updateColor.bind(this,!0),labelClass:"dx-colorview-label-hex",labelText:"#",labelAriaText:a.A.format("dxColorView-ariaHex")}},_renderHexInput(){this._hexInput=_.A.getInstance(this._renderEditorWithLabel(this.hexInputOptions()).appendTo(this._$controlsContainer).find(".dx-textbox"));const xe=`dx-${new f.A}`,Te=this._$controlsContainer.find(".dx-colorview-label-hex").find(".dx-texteditor-input");this.setAria("id",xe,Te),this.setAria("labelledby",xe,this._$paletteHandle)},_renderAlphaChannelScale(){const xe=this._renderHtmlCellInsideRow(1,this._$colorPickerContainer,"dx-colorview-alpha-channel-cell"),Te=(0,S.A)("<div>").addClass("dx-colorview-alpha-channel-border").appendTo(xe),Ee=(0,S.A)("<div>").addClass("dx-colorview-alpha-channel-wrapper").appendTo(Te);this._$alphaChannelScale=(0,S.A)("<div>").addClass("dx-colorview-alpha-channel-scale").appendTo(Ee),this._makeCSSLinearGradient(this._$alphaChannelScale),this._renderAlphaChannelHandle(xe)},_makeCSSLinearGradient(xe){const Te=this._currentColor,Ee=`${Te.r},${Te.g},${Te.b}`,Oe=this.option("rtlEnabled");xe.css("backgroundImage",`linear-gradient(-90deg, rgba(${Ee}, ${Oe?"1":"0"}), rgba(${Ee}, ${Oe?"0":"1"}))`)},_renderAlphaChannelInput(){const xe=this,Te=this._renderHtmlCellInsideRow(1,this._$colorPickerContainer);xe._alphaChannelInput=this._renderEditorWithLabel({editorType:g.A,value:this._currentColor.a,max:1,step:.1,onValueChanged(Ee){let{value:Oe}=Ee;Oe=xe._currentColor.isValidAlpha(Oe)?Oe:xe._currentColor.a,Ee.event&&xe._saveValueChangeEvent(Ee.event),xe._updateColorTransparency(Oe),xe._placeAlphaChannelHandle()},labelClass:"dx-colorview-alpha-channel-label",labelText:"Alpha",labelAriaText:a.A.format("dxColorView-ariaAlpha")}).appendTo(Te).find(".dx-numberbox").dxNumberBox("instance")},_updateColorTransparency(xe){this._currentColor.a=xe,this.applyColor()},_renderAlphaChannelHandle(xe){this._$alphaChannelHandle=(0,S.A)("<div>").addClass("dx-colorview-alpha-channel-handle").appendTo(xe),this._createComponent(this._$alphaChannelHandle,u.A,{contentTemplate:null,boundary:xe,allowMoveByClick:!0,dragDirection:"horizontal",onDragMove:Te=>{let{event:Ee}=Te;this._updateByDrag=!0;const ze=(0,W.x5)(this._$alphaChannelHandle).left+this._alphaChannelHandleWidth/2;this._saveValueChangeEvent(Ee),this._calculateColorTransparencyByScaleWidth(ze)}}),this._alphaChannelHandleWidth=(0,y.RG)(this._$alphaChannelHandle),this._alphaChannelScaleWorkWidth=(0,y.RG)(xe)-this._alphaChannelHandleWidth,this._placeAlphaChannelHandle()},_calculateColorTransparencyByScaleWidth(xe){let Te=(xe-this._alphaChannelHandleWidth/2)/this._alphaChannelScaleWorkWidth;const Ee=this.option("rtlEnabled");Te=Ee?Te:1-Te,xe>=this._alphaChannelScaleWorkWidth+this._alphaChannelHandleWidth/2?Te=Ee?1:0:Te<1&&(Te=Te.toFixed(2));const Oe=this._alphaChannelInput.option("value");Te=Math.max(Te,0),Te=Math.min(Te,1),Te===Oe?this._updateByDrag=!1:this._alphaChannelInput.option("value",Te)},_placeAlphaChannelHandle(){let xe=this._alphaChannelScaleWorkWidth*(1-this._currentColor.a);xe<0&&(xe=0),this._alphaChannelScaleWorkWidth<xe&&(xe=this._alphaChannelScaleWorkWidth),(0,W.Cy)(this._$alphaChannelHandle,{left:this.option("rtlEnabled")?this._alphaChannelScaleWorkWidth-xe:xe})},applyColor(){const xe=this.option("value"),Te=this.option("editAlphaChannel")?this._makeRgba(this._currentColor):this._currentColor.toHex();this._makeTransparentBackground(this._$currentColor,this._currentColor),Te===xe?this._updateByDrag=!1:this.option("value",Te)},cancelColor(){this._initColorAndOpacity(),this._refreshMarkup()},_updateColor(xe,Te){let Ee,Oe;xe?Oe=this._validateHex(`#${this._hexInput.option("value")}`):(Ee=this._validateRgb(),this._alphaChannelInput?(Ee.push(this._alphaChannelInput.option("value")),Oe=`rgba(${Ee.join(", ")})`):Oe=`rgb(${Ee.join(", ")})`),this._suppressEditorsValueUpdating||(this._currentColor=new o.A(Oe),this._saveValueChangeEvent(Te.event),this.applyColor(),this._refreshMarkup())},_validateHex(xe){return this._currentColor.isValidHex(xe)?xe:this._currentColor.toHex()},_validateRgb(){let xe=this._rgbInputs[0].option("value"),Te=this._rgbInputs[1].option("value"),Ee=this._rgbInputs[2].option("value");return this._currentColor.isValidRGB(xe,Te,Ee)||(xe=this._currentColor.r,Te=this._currentColor.g,Ee=this._currentColor.b),[xe,Te,Ee]},_refreshMarkup(){this._placeHueScaleHandle(),this._placePaletteHandle(),this._updateColorParamsAndColorPreview(),this._$palette.css("backgroundColor",this._currentColor.getPureColor().toHex()),this._$alphaChannelHandle&&(this._updateColorTransparency(this._currentColor.a),this._placeAlphaChannelHandle())},_updateColorParamsAndColorPreview(){this._suppressEditorsValueUpdating=!0,this._hexInput.option("value",this._currentColor.toHex().replace("#","")),this._rgbInputs[0].option("value",this._currentColor.r),this._rgbInputs[1].option("value",this._currentColor.g),this._rgbInputs[2].option("value",this._currentColor.b),this._suppressEditorsValueUpdating=!1,this.option("editAlphaChannel")&&(this._makeCSSLinearGradient.call(this,this._$alphaChannelScale),this._alphaChannelInput.option("value",this._currentColor.a))},_optionChanged(xe){const{value:Te}=xe;switch(xe.name){case"value":this._setCurrentColor(Te),this._updateByDrag||this._refreshMarkup(),this._updateByDrag=!1,this.callBase(xe);break;case"matchValue":this._setBaseColor(Te);break;case"onEnterKeyPressed":this._initEnterKeyPressedAction();break;case"editAlphaChannel":this._$colorPickerContainer&&(this._renderHtmlRows("editAlphaChannel"),this._renderAlphaChannelElements());break;case"keyStep":break;case"stylingMode":this._renderControls();break;default:this.callBase(xe)}}});(0,P.A)("dxColorView",ge);const fe=ge},8630:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>xe});var W=M(2583),o=M(6870),P=M(1973),b=M(5973),f=M(6054),S=M(9522),T=M(2925),y=M(5704),d=M(4859),c=M(6021),s=M(1832),a=M(3090),u=M(2660),h=M(1363),g=M(1830),_=M(6110),x=M(5656),w=M(4072),D=M(3535),C=M(9293),I=M(3949),L=M(4602),N=M(9212),G=M(6410);const be=["onShowing","onShown","onSubmenuCreated","onHiding","onHidden","onPositioning","onLeftFirstItem","onLeftLastItem","onCloseRootSubmenu","onExpandLastSubmenu"],ve=["up","down","first","last"],ge=(0,_.zk)();class fe extends G.A{getShowEvent(Ee){return(0,g.Gv)(Ee)?null!==Ee.name?Ee.name??"dxcontextmenu":null:Ee}getShowDelay(Ee){return(0,g.Gv)(Ee)&&Ee.delay}_getDefaultOptions(){return(0,a.X)(super._getDefaultOptions(),{showEvent:"dxcontextmenu",hideOnOutsideClick:!0,position:{at:"top left",my:"top left"},onShowing:null,onShown:null,onSubmenuCreated:null,onHiding:null,onHidden:null,onPositioning:null,submenuDirection:"auto",visible:!1,target:void 0,onLeftFirstItem:null,onLeftLastItem:null,onCloseRootSubmenu:null,onExpandLastSubmenu:null})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>!(0,_.Vd)(),options:{animation:null}}])}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,a.X)(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.2",alias:"hideOnOutsideClick"}})}_initActions(){this._actions={},(0,u.__)(be,(Ee,Oe)=>{this._actions[Oe]=this._createActionByOption(Oe)||d.lQ})}_setOptionsByReference(){super._setOptionsByReference(),(0,a.X)(this._optionsByReference,{animation:!0,selectedItem:!0})}_focusInHandler(){}_itemContainer(){return this._overlay?this._overlay.$content():(0,y.A)()}_eventBindingTarget(){return this._itemContainer()}itemsContainer(){return this._overlay?this._overlay.$content():void 0}_supportedKeys(){return(0,a.X)(super._supportedKeys(),{space:()=>{const Ee=(0,y.A)(this.option("focusedElement"));this.hide(),Ee.length&&this._isSelectionEnabled()&&this.selectItem(Ee[0])},escape:this.hide})}_getActiveItem(Ee){const Oe=this._getAvailableItems(),ze=Oe.filter(".dx-state-focused"),$e=Oe.filter(".dx-state-hover");return $e.closest(".dx-menu-items-container").find(".dx-menu-item").index(ze)>=0?ze:$e.length?$e:super._getActiveItem()}_moveFocus(Ee){const Oe=this._getItemsByLocation(Ee),ze=this._getActiveItem(!0),$e=this.itemsContainer().find(".dx-state-hover"),Ue=!(!(0,y.A)(this.option("focusedElement")).length&&!$e.length);let ot;switch(Ee){case"up":ot=Ue?this._prevItem(Oe):ze,this._setFocusedElement(ot),ze.is(Oe.first())&&this._actions.onLeftFirstItem(ze);break;case"down":ot=Ue?this._nextItem(Oe):ze,this._setFocusedElement(ot),ze.is(Oe.last())&&this._actions.onLeftLastItem(ze);break;case"right":ot=this.option("rtlEnabled")?this._hideSubmenuHandler():this._expandSubmenuHandler(Oe,Ee),this._setFocusedElement(ot);break;case"left":ot=this.option("rtlEnabled")?this._expandSubmenuHandler(Oe,Ee):this._hideSubmenuHandler(),this._setFocusedElement(ot);break;case"first":ot=Oe.first(),this._setFocusedElement(ot);break;case"last":ot=Oe.last(),this._setFocusedElement(ot);break;default:return super._moveFocus(Ee)}}_setFocusedElement(Ee){Ee&&0!==Ee.length&&(this.option("focusedElement",(0,S.cc)(Ee)),this._scrollToElement(Ee))}_scrollToElement(Ee){const ze=Ee.closest(".dx-scrollable").dxScrollable("instance");ze?.scrollToElement(Ee)}_getItemsByLocation(Ee){const Oe=this._getActiveItem(!0);let ze;return ve.includes(Ee)&&(ze=Oe.closest(".dx-menu-items-container").children().children()),ze=this._getAvailableItems(ze),ze}_getAriaTarget(){return this.$element()}_refreshActiveDescendant(){if((0,g.O9)(this._overlay)){const Ee=this._overlay.$content();super._refreshActiveDescendant(Ee)}}_hideSubmenuHandler(){const Ee=this._getActiveItem(!0),Oe=Ee.parents(".dx-menu-item-expanded").first();if(Oe.length)return this._hideSubmenusOnSameLevel(Oe),this._hideSubmenu(Ee.closest(".dx-submenu")),Oe;this._actions.onCloseRootSubmenu(Ee)}_expandSubmenuHandler(Ee,Oe){const ze=this._getActiveItem(!0),$e=this._getItemData(ze),Be=this._dataAdapter.getNodeByItem($e),Ue=this._hasSubmenu(Be),ot=ze.children(".dx-submenu");if(Ue&&!ze.hasClass("dx-state-disabled"))return(!ot.length||"hidden"===ot.css("visibility"))&&this._showSubmenu(ze),this._nextItem(this._getItemsByLocation(Oe));this._actions.onExpandLastSubmenu(ze)}_clean(){this._overlay&&(this._overlay.$element().remove(),this._overlay=null),this._detachShowContextMenuEvents(this._getTarget()),super._clean()}_initMarkup(){this.$element().addClass("dx-has-context-menu"),super._initMarkup()}_render(){super._render(),this._renderVisibility(this.option("visible")),this._addWidgetClass()}_isTargetOutOfComponent(Ee){return!(0!==(0,y.A)(Ee).closest(".dx-context-menu").length)}_focusOutHandler(Ee){const{relatedTarget:Oe}=Ee;Oe&&this._isTargetOutOfComponent(Oe)&&this.hide(),super._focusOutHandler(Ee)}_renderContentImpl(){this._detachShowContextMenuEvents(this._getTarget()),this._attachShowContextMenuEvents()}_attachKeyboardEvents(){!this._keyboardListenerId&&this._focusTarget().length&&super._attachKeyboardEvents()}_renderContextMenuOverlay(){if(this._overlay)return;const Ee=this._getOverlayOptions();this._overlay=this._createComponent((0,y.A)("<div>").appendTo(this._$element),I.A,Ee);const Oe=this._overlay.$content();Oe.addClass("dx-context-menu"),this._addCustomCssClass(Oe),this._addPlatformDependentClass(Oe),this._attachContextMenuEvent()}preventShowingDefaultContextMenuAboveOverlay(){const Ee=this._itemContainer(),Oe=(0,C.b4)(x.U,this.NAME);w.A.off(Ee,Oe,".dx-submenu"),w.A.on(Ee,Oe,".dx-submenu",ze=>{ze.stopPropagation(),ze.preventDefault(),w.A.off(Ee,Oe,".dx-submenu")})}_itemContextMenuHandler(Ee){super._itemContextMenuHandler(Ee),Ee.stopPropagation()}_addPlatformDependentClass(Ee){b.A.current().phone&&Ee.addClass("dx-menu-phone-overlay")}_detachShowContextMenuEvents(Ee){const Oe=this.getShowEvent(this.option("showEvent"));if(!Oe)return;const ze=(0,C.b4)(Oe,this.NAME);this._showContextMenuEventHandler?w.A.off(f.A.getDocument(),ze,Ee,this._showContextMenuEventHandler):w.A.off((0,y.A)(Ee),ze)}_attachShowContextMenuEvents(){const Ee=this._getTarget(),Oe=this.getShowEvent(this.option("showEvent"));if(!Oe)return;const ze=(0,C.b4)(Oe,this.NAME);let $e=this._createAction(Ue=>{const ot=this.getShowDelay(this.option("showEvent"));ot?setTimeout(()=>this._show(Ue.event),ot):this._show(Ue.event)},{validatingTargetName:"target"});const Be=Ue=>$e({event:Ue,target:(0,y.A)(Ue.currentTarget)});$e=this._createAction($e),(0,g.Kb)(Ee)||Ee.nodeType||(0,g.l6)(Ee)?(this._showContextMenuEventHandler=void 0,w.A.on(Ee,ze,Be)):(this._showContextMenuEventHandler=Be,w.A.on(f.A.getDocument(),ze,Ee,this._showContextMenuEventHandler))}_hoverEndHandler(Ee){super._hoverEndHandler(Ee),Ee.stopPropagation()}_renderDimensions(){}_renderContainer(Ee,Oe){const ze=Oe||this._itemContainer();(Ee=(0,y.A)("<div>")).appendTo(ze).addClass("dx-submenu").css("visibility",Oe?"hidden":"visible"),Ee.parent().hasClass("dx-overlay-content")||this._addCustomCssClass(Ee);const $e=super._renderContainer(Ee);return Oe?$e:this.option("width")?$e.css("minWidth",this.option("width")):this.option("height")?$e.css("minHeight",this.option("height")):$e}_renderSubmenuItems(Ee,Oe){this._renderItems(this._getChildNodes(Ee),Oe);const ze=Oe.children(".dx-submenu");this._actions.onSubmenuCreated({itemElement:(0,S.cc)(Oe),itemData:Ee.internalFields.item,submenuElement:(0,S.cc)(ze)}),this._initScrollable(ze),this.setAria({role:"menu"},ze)}_getOverlayOptions(){const Ee=this.option("position");return{focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),innerOverlay:!0,hideOnOutsideClick:ze=>this._hideOnOutsideClickHandler(ze),propagateOutsideClick:!0,hideOnParentScroll:!0,deferRendering:!1,position:{at:Ee.at,my:Ee.my,of:this._getTarget(),collision:"flipfit"},shading:!1,showTitle:!1,height:"auto",width:"auto",onShown:this._overlayShownActionHandler.bind(this),onHiding:this._overlayHidingActionHandler.bind(this),onHidden:this._overlayHiddenActionHandler.bind(this),visualContainer:ge}}_overlayShownActionHandler(Ee){this._actions.onShown(Ee)}_overlayHidingActionHandler(Ee){this._actions.onHiding(Ee),Ee.cancel||(this._hideAllShownSubmenus(),this._setOptionWithoutOptionChange("visible",!1))}_overlayHiddenActionHandler(Ee){this._actions.onHidden(Ee)}_shouldHideOnOutsideClick(Ee){const{closeOnOutsideClick:Oe,hideOnOutsideClick:ze}=this.option();return(0,g.Tn)(ze)?ze(Ee):(0,g.Tn)(Oe)?Oe(Ee):ze||Oe}_hideOnOutsideClickHandler(Ee){if(!this._shouldHideOnOutsideClick(Ee))return!1;if(f.A.isDocument(Ee.target))return!0;const Oe=this._getActiveItemsContainer(Ee.target),ze=this._getItemsContainers(),$e=this._searchActiveItem(Ee.target),Be=this.$element().parents(".dx-menu-item"),Ue=$e[0]===Be[0]&&$e.length&&Be.length;return!(this._isIncludeOverlay(Oe,ze)&&$e.length||Ue)||("onClick"===this._getShowSubmenuMode()&&this._hideAllShownChildSubmenus($e),!1)}_getActiveItemsContainer(Ee){return(0,y.A)(Ee).closest(".dx-menu-items-container")}_getItemsContainers(){return this._overlay.$content().find(".dx-menu-items-container")}_searchActiveItem(Ee){return(0,y.A)(Ee).closest(".dx-menu-item").eq(0)}_isIncludeOverlay(Ee,Oe){let ze=!1;return(0,u.__)(Oe,($e,Be)=>{Ee.is(Be)&&!ze&&(ze=!0)}),ze}_hideAllShownChildSubmenus(Ee){const Oe=Ee.find(".dx-submenu"),ze=(0,a.X)([],this._shownSubmenus);Oe.length>0&&(0,u.__)(ze,($e,Be)=>{const Ue=this._searchActiveItem(Be.context).parent();Ue.parent().is(Ee.parent().parent())&&!Ue.is(Ee.parent())&&this._hideSubmenu(Be)})}_initScrollable(Ee){this._createComponent(Ee,L.A,{useKeyboard:!1,_onVisibilityChanged:Oe=>{Oe.scrollTo(0)}})}_setSubMenuHeight(Ee,Oe,ze){const $e=Ee.find(".dx-menu-items-container"),Be=(0,h.P$)($e),Ue=this._getMaxHeight(Oe,!ze),ot=Math.min(Be,Ue);Ee.css("height",ze?ot:"100%")}_getMaxHeight(Ee){let Oe=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const ze=(0,h.P$)(ge),$e=(0,g.Kb)(Ee),Be=f.A.getDocument();if(!$e||Ee.length&&Ee[0]===Be)return ze;const ot=Ee[0].getBoundingClientRect().top,st=(0,h.P$)(Ee);return(Oe?Math.max(ot,ze-ot-st):Math.max(ot+st,ze-ot))-10}_dimensionChanged(){this._shownSubmenus&&this._shownSubmenus.forEach(Ee=>{const Oe=Ee.closest(".dx-menu-item");this._setSubMenuHeight(Ee,Oe,!0),this._scrollToElement(Oe);const ze=this._getSubmenuPosition(Oe);o.A.setup(Ee,ze)})}_getSubmenuBorderWidth(){return(0,N.Nt)((0,N.ss)())?0:1}_showSubmenu(Ee){const Oe=this._dataAdapter.getNodeByItem(this._getItemData(Ee));if(this._hideSubmenusOnSameLevel(Ee),!this._hasSubmenu(Oe))return;let ze=Ee.children(".dx-submenu");const $e=ze.length;super._showSubmenu(Ee),$e||(this._renderSubmenuItems(Oe,Ee),ze=Ee.children(".dx-submenu")),this._setSubMenuHeight(ze,Ee,!0),this._isSubmenuVisible(ze)||this._drawSubmenu(Ee)}_hideSubmenusOnSameLevel(Ee){const Oe=Ee.parent(".dx-menu-item-wrapper").siblings().find(".dx-menu-item-expanded");Oe.length&&(Oe.removeClass("dx-menu-item-expanded"),this._hideSubmenu(Oe.find(".dx-submenu")))}_hideSubmenuGroup(Ee){this._isSubmenuVisible(Ee)&&this._hideSubmenuCore(Ee)}_isSubmenuVisible(Ee){return"visible"===Ee.css("visibility")}_drawSubmenu(Ee){const Oe=this.option("animation")?this.option("animation").show:{},ze=Ee.children(".dx-submenu"),$e=this._getSubmenuPosition(Ee);this._overlay&&this._overlay.option("visible")&&((0,g.O9)(this._shownSubmenus)||(this._shownSubmenus=[]),this._shownSubmenus.includes(ze)||this._shownSubmenus.push(ze),Oe&&W.A.stop(ze),o.A.setup(ze,$e),Oe&&((0,g.Qd)(Oe.to)&&(Oe.to.position=$e),this._animate(ze,Oe)),ze.css("visibility","visible"))}_animate(Ee,Oe){W.A.animate(Ee,Oe)}_getSubmenuPosition(Ee){const Oe=this.option("submenuDirection").toLowerCase(),$e={collision:"flip",of:Ee.parent(".dx-menu-item-wrapper"),offset:{h:0,v:-1}};switch(Oe){case"left":$e.at="left top",$e.my="right top";break;case"right":$e.at="right top",$e.my="left top";break;default:this.option("rtlEnabled")?($e.at="left top",$e.my="right top"):($e.at="right top",$e.my="left top")}return $e}_updateSubmenuVisibilityOnClick(Ee){if(!Ee.args.length)return;const{itemData:Oe}=Ee.args[0],ze=this._dataAdapter.getNodeByItem(Oe);if(!ze)return;const $e=(0,y.A)(Ee.args[0].itemElement);let Be=$e.find(".dx-submenu");if(this._hasSubmenu(ze)&&!Be.length&&(this._renderSubmenuItems(ze,$e),Be=$e.find(".dx-submenu")),($e.context!==Be.context||"visible"!==Be.css("visibility"))&&(this._updateSelectedItemOnClick(Ee),Oe&&!Oe.disabled&&(!Oe||!1!==Oe.closeMenuOnClick)))if(0===Be.length){const st=(0,y.A)($e.parents(".dx-submenu")[0]);this._hideSubmenu(st),!Ee.canceled&&this._overlay&&this._overlay.option("visible")&&this.option("visible",!1)}else this._shownSubmenus&&this._shownSubmenus.length>0&&this._shownSubmenus[0].is(Be)&&this._hideSubmenu(Be),this._showSubmenu($e)}_hideSubmenu(Ee){const Oe=(0,a.X)([],this._shownSubmenus);(0,u.__)(Oe,(ze,$e)=>{(Ee.is($e)||(0,s.gR)(Ee[0],$e[0]))&&($e.parent().removeClass("dx-menu-item-expanded"),this._hideSubmenuCore($e))})}_hideSubmenuCore(Ee){const Oe=this._shownSubmenus.indexOf(Ee),ze=this.option("animation")?this.option("animation").hide:null;Oe>=0&&this._shownSubmenus.splice(Oe,1),this._stopAnimate(Ee),ze&&this._animate(Ee,ze),Ee.css("visibility","hidden"),Ee.dxScrollable("instance").scrollTo(0),this.option("focusedElement",null)}_stopAnimate(Ee){W.A.stop(Ee,!0)}_hideAllShownSubmenus(){const Ee=(0,a.X)([],this._shownSubmenus);this._overlay.$content().find(".dx-menu-item-expanded").removeClass("dx-menu-item-expanded"),(0,u.__)(Ee,(ze,$e)=>{this._hideSubmenu($e)})}_visibilityChanged(Ee){Ee&&this._renderContentImpl()}_optionChanged(Ee){if(be.includes(Ee.name))this._initActions();else switch(Ee.name){case"visible":this._renderVisibility(Ee.value);break;case"showEvent":case"position":case"submenuDirection":this._invalidate();break;case"target":Ee.previousValue&&this._detachShowContextMenuEvents(Ee.previousValue),this._invalidate();break;case"closeOnOutsideClick":case"hideOnOutsideClick":break;default:super._optionChanged(Ee)}}_renderVisibility(Ee){return Ee?this._show():this._hide()}_toggleVisibility(){}_show(Ee){const Oe={jQEvent:Ee};let ze=(0,c.cY)().reject().promise();if(this._actions.onShowing(Oe),Oe.cancel)return ze;const $e=this._positionContextMenu(Ee);if($e){var Be;this._overlay||(this._renderContextMenuOverlay(),this._overlay.$content().addClass(this._widgetClass()),this._renderFocusState(),this._attachHoverEvents(),this._attachClickEvent(),this._renderItems(this._dataAdapter.getRootNodes()));const Ue=(0,y.A)(this._overlay.content()).children(".dx-submenu");this._setOptionWithoutOptionChange("visible",!0),this._overlay.option({height:()=>this._getMaxHeight($e.of),maxHeight:()=>{const ot=Ue.find(".dx-menu-items-container"),st=this._getSubmenuBorderWidth();return(0,h.P$)(ot)+2*st},position:$e}),Ue.length&&this._setSubMenuHeight(Ue,$e.of,!1),ze=this._overlay.show(),Ee&&Ee.stopPropagation(),this._setAriaAttributes(),(null==Ee||null===(Be=Ee.originalEvent)||void 0===Be?void 0:Be.type)===D.A.name&&this.preventShowingDefaultContextMenuAboveOverlay()}return ze}_renderItems(Ee,Oe){super._renderItems(Ee,Oe);const ze=(0,y.A)(this._overlay.content()).children(".dx-submenu");ze.length&&this._initScrollable(ze)}_setAriaAttributes(){this._overlayContentId=`dx-${new T.A}`,this.setAria("owns",this._overlayContentId),this.setAria({id:this._overlayContentId,role:"menu"},this._overlay.$content())}_cleanAriaAttributes(){this._overlay&&this.setAria("id",null,this._overlay.$content()),this.setAria("owns",void 0)}_getTarget(){return this.option("target")||this.option("position").of||(0,y.A)(f.A.getDocument())}_getContextMenuPosition(){return(0,a.X)({},this.option("position"),{of:this._getTarget()})}_positionContextMenu(Ee){let Oe=this._getContextMenuPosition();const ze=this._isInitialOptionValue("position"),$e=this._createActionByOption("onPositioning");Ee&&Ee.preventDefault&&ze&&(Oe.of=Ee);const Be={position:Oe,event:Ee};return $e(Be),Be.cancel?Oe=null:Be.event&&(Be.event.cancel=!0,Ee.preventDefault()),Oe}_refresh(){if((0,_.Vd)())if(this._overlay){const Ee=this._overlay.option("position");super._refresh(),this._overlay&&this._overlay.option("position",Ee)}else super._refresh();else super._refresh()}_hide(){let Ee;return this._overlay&&(Ee=this._overlay.hide(),this._setOptionWithoutOptionChange("visible",!1)),this._cleanAriaAttributes(),this.option("focusedElement",null),Ee||(0,c.cY)().reject().promise()}toggle(Ee){const Oe=this.option("visible");return this._renderVisibility(Ee=void 0===Ee?!Oe:Ee)}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}}(0,P.A)("dxContextMenu",fe);const xe=fe},6410:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>oe});var W=M(5973),o=M(5704),P=M(4859),b=M(3090),f=M(2660),S=M(1830),T=M(9524),y=M(7794);M(4972);const s=y.A;var a=M(5107),u=M(1694);const g=class h extends u.A{_getPlainItems(){return(0,f.Tj)(this._collectionWidget.option("items"),function ee(he){return he.items?[he].concat((0,f.Tj)(he.items,ee)):he})}_stringifyItem(ee){return JSON.stringify(ee,(he,de)=>"template"===he?this._getTemplateString(de):de)}_getTemplateString(ee){let he;return he="object"==typeof ee?(0,o.A)(ee).text():ee.toString(),he}},D="dx-menu-item",C=`${D}-content`,I=`${D}-selected`,L=`${D}-wrapper`,G=`${D}-expanded`,B=`${D}-has-text`,K=`${D}-has-icon`,J=`${D}-has-submenu`,ie=`${D}-popout`,re=`${ie}-container`,q=`${D}-text`,Z={show:50,hide:300},Q=`${q}-with-url`,oe=(()=>{class ae extends s{_getDefaultOptions(){return(0,b.X)(super._getDefaultOptions(),{items:[],cssClass:"",activeStateEnabled:!0,showSubmenuMode:{name:"onHover",delay:{show:50,hide:300}},animation:{show:{type:"fade",from:0,to:1,duration:100},hide:{type:"fade",from:1,to:0,duration:100}},selectByClick:!1,focusOnSelectedItem:!1,keyExpr:null,_itemAttributes:{role:"menuitem"},useInkRipple:!1})}_itemDataKey(){return"dxMenuItemDataKey"}_itemClass(){return D}_setAriaSelectionAttribute(he,de){}_selectedItemClass(){return I}_widgetClass(){return"dx-menu-base"}_focusTarget(){return this._itemContainer()}_clean(){this.option("focusedElement",null),super._clean()}_supportedKeys(){return(0,b.X)(super._supportedKeys(),{space:()=>{const he=(0,o.A)(this.option("focusedElement"));!he.length||!this._isSelectionEnabled()||this.selectItem(he[0])},pageUp:P.lQ,pageDown:P.lQ})}_isSelectionEnabled(){return"single"===this.option("selectionMode")}_init(){this._activeStateUnit=`.${D}`,super._init(),this._renderSelectedItem(),this._initActions()}_getLinkContainer(he,de,ue){const{linkAttr:be,url:ve}=ue;return he?.addClass("dx-icon-with-url"),de?.addClass(Q),super._getLinkContainer(he,de,{linkAttr:be,url:ve})}_addContent(he,de){const{html:ue,url:be}=de;if(be){he.html(ue);const ve=this._getLinkContainer(this._getIconContainer(de),this._getTextContainer(de),de);he.append(ve)}else super._addContent(he,de);he.append(this._getPopoutContainer(de)),this._addContentClasses(de,he.parent())}_getTextContainer(he){const{text:de}=he;if(!de)return;const ue=(0,o.A)("<span>").addClass(q),be=(0,S.Qd)(he)?de:String(he);return ue.text(be)}_getItemExtraPropNames(){return["url","linkAttr"]}_getPopoutContainer(he){const{items:de}=he;let ue;if(de&&de.length){const be=(0,o.A)("<div>").addClass(ie);ue=(0,o.A)("<span>").addClass(re).append(be)}return ue}_getDataAdapterOptions(){return{rootValue:0,multipleSelection:!1,recursiveSelection:!1,recursiveExpansion:!1,searchValue:""}}_selectByItem(he){if(!he)return;const de=this._dataAdapter.getNodeByItem(he);this._dataAdapter.toggleSelection(de.internalFields.key,!0)}_renderSelectedItem(){const he=this._dataAdapter.getSelectedNodesKeys(),de=he.length&&he[0],ue=this.option("selectedItem");if(!de)return void this._selectByItem(ue);const be=this._dataAdapter.getNodeByKey(de);if(!1!==be.selectable){if(!ue)return void this.option("selectedItem",be.internalFields.item);ue!==be.internalFields.item&&(this._dataAdapter.toggleSelection(de,!1),this._selectByItem(ue))}}_initActions(){}_initMarkup(){super._initMarkup(),this.option("useInkRipple")&&this._renderInkRipple()}_renderInkRipple(){this._inkRipple=(0,T.XX)()}_toggleActiveState(he,de,ue){if(super._toggleActiveState.apply(this,arguments),!this._inkRipple)return;const be={element:he,event:ue};de?this._inkRipple.showWave(be):this._inkRipple.hideWave(be)}_getShowSubmenuMode(){let he=this.option("showSubmenuMode");return he=(0,S.Gv)(he)?he.name:he,this._isDesktopDevice()?he:"onClick"}_initSelectedItems(){}_isDesktopDevice(){return"desktop"===W.A.real().deviceType}_initEditStrategy(){this._editStrategy=new g(this)}_addCustomCssClass(he){he.addClass(this.option("cssClass"))}_itemWrapperSelector(){return`.${L}`}_hoverStartHandler(he){const de=this._getItemElementByEventArgs(he);!de||this._isItemDisabled(de)||(he.stopPropagation(),"onHover"===this._getShowSubmenuMode()&&(clearTimeout(this._showSubmenusTimeout),this._showSubmenusTimeout=setTimeout(this._showSubmenu.bind(this,de),this._getSubmenuDelay("show"))))}_getAvailableItems(he){return super._getAvailableItems(he).filter(function(){return"hidden"!==(0,o.A)(this).css("visibility")})}_isItemDisabled(he){return this._disabledGetter(he.data(this._itemDataKey()))}_showSubmenu(he){this._addExpandedClass(he)}_addExpandedClass(he){(0,o.A)(he).addClass(G)}_getSubmenuDelay(he){const{delay:de}=this.option("showSubmenuMode");return(0,S.O9)(de)?(0,S.Gv)(de)?de[he]:de:Z[he]}_getItemElementByEventArgs(he){let de=(0,o.A)(he.target);if(de.hasClass(this._itemClass())||de.get(0)===he.currentTarget)return de;for(;!de.hasClass(this._itemClass());)if(de=de.parent(),de.hasClass("dx-submenu"))return null;return de}_hoverEndHandler(he){clearTimeout(this._showSubmenusTimeout)}_hasSubmenu(he){return he&&he.internalFields.childrenKeys.length}_renderContentImpl(){this._renderItems(this._dataAdapter.getRootNodes())}_renderItems(he,de){if(!he.length)return;this.hasIcons=!1;const ue=this._renderContainer(this.$element(),de);let be=-1,ve=-1;(0,f.__)(he,(le,Ce)=>{const ye=!1!==Ce.visible;ye&&be<0&&(be=le),be<le&&(Ce.beginGroup||le===ve)&&(ve=ye?le:le+1),le===ve&&be<le&&this._renderSeparator(ue),this._renderItem(le,Ce,ue)}),this.hasIcons||ue.addClass("dx-menu-no-icons")}_renderContainer(he,de){const ue=(0,o.A)("<ul>");return this.setAria("role","none",ue),ue.appendTo(he).addClass("dx-menu-items-container")}_createDOMElement(he){const de=(0,o.A)("<li>");return this.setAria("role","none",de),de.appendTo(he).addClass(L)}_renderItem(he,de,ue,be){const{items:ve=[]}=this.option(),le=be??this._createDOMElement(ue);ve[he+1]&&ve[he+1].beginGroup&&le.addClass("dx-menu-last-group-item");const Ce=super._renderItem(he,de.internalFields.item,le);de.internalFields.item===this.option("selectedItem")&&Ce.addClass(I),Ce.attr("tabIndex",-1),this._hasSubmenu(de)&&this.setAria("haspopup","true",Ce)}_renderItemFrame(he,de,ue){const be=ue.children(`.${D}`);return be.length?be:super._renderItemFrame.apply(this,arguments)}_refreshItem(he,de){const ue=this._dataAdapter.getNodeByItem(de),be=he.data(this._itemIndexKey()),ve=he.closest("ul"),le=he.closest("li");this._renderItem(be,ue,ve,le)}_addContentClasses(he,de){const be=!!he.icon,ve=!!he.items&&!!he.items.length;de.toggleClass(B,!!he.text&&!!he.text.length),de.toggleClass(K,be),this.hasIcons||(this.hasIcons=be),de.toggleClass(J,ve)}_getItemContent(he){let de=super._getItemContent(he);return de.length||(de=he.children(`.${C}`)),de}_postprocessRenderItem(he){const de=(0,o.A)(he.itemElement),ue=this._dataAdapter.getSelectedNodesKeys();ue.length&&this._selectedGetter(he.itemData)&&this._isItemSelectable(he.itemData)&&this._dataAdapter.getNodeByItem(he.itemData).internalFields.key===ue[0]?(de.addClass(this._selectedItemClass()),this._setAriaSelectionAttribute(de,"true")):this._setAriaSelectionAttribute(de,"false")}_isItemSelectable(he){return!1!==he.selectable}_renderSeparator(he){(0,o.A)("<li>").appendTo(he).addClass("dx-menu-separator")}_itemClickHandler(he){if(he._skipHandling)return;const de=this._createAction(this._updateSubmenuVisibilityOnClick.bind(this));this._itemDXEventHandler(he,"onItemClick",{},{beforeExecute:this._itemClick,afterExecute:de.bind(this)}),he._skipHandling=!0}_itemClick(he){const{event:de,itemData:ue}=he.args[0],be=this._getItemElementByEventArgs(de),ve=be&&be.find(".dx-item-url").get(0);ue.url&&ve&&ve.click()}_updateSubmenuVisibilityOnClick(he){this._updateSelectedItemOnClick(he),"onClick"===this._getShowSubmenuMode()&&this._addExpandedClass(he.args[0].itemElement)}_updateSelectedItemOnClick(he){const de=he.args?he.args[0]:he;if(!this._isItemSelectAllowed(de.itemData))return;const ue=this._dataAdapter.getSelectedNodesKeys(),be=ue.length&&this._dataAdapter.getNodeByKey(ue[0]);be&&this._toggleItemSelection(be,!1),be&&be.internalFields.item===de.itemData?(this._fireSelectionChangeEvent(null,this.option("selectedItem")),this._setOptionWithoutOptionChange("selectedItem",null)):this.selectItem(de.itemData)}_isItemSelectAllowed(he){const de=this._isSelectionEnabled()&&this.option("selectByClick");return!this._isContainerEmpty()&&de&&this._isItemSelectable(he)&&!this._itemsGetter(he)}_isContainerEmpty(){return this._itemContainer().is(":empty")}_syncSelectionOptions(){return(0,P.TA)()}_optionChanged(he){switch(he.name){case"showSubmenuMode":break;case"selectedItem":{const de=this._dataAdapter.getNodeByItem(he.value),ue=this._dataAdapter.getSelectedNodesKeys()[0];if(de&&de.internalFields.key!==ue){if(!1===de.selectable)break;ue&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(ue),!1),this._toggleItemSelection(de,!0),this._updateSelectedItems()}break}case"cssClass":case"position":case"selectByClick":case"animation":case"useInkRipple":this._invalidate();break;default:super._optionChanged(he)}}_toggleItemSelection(he,de){const ue=this._getElementByItem(he.internalFields.item);ue&&(0,o.A)(ue).toggleClass(I),this._dataAdapter.toggleSelection(he.internalFields.key,de)}_getElementByItem(he){let de;return(0,f.__)(this._itemElements(),(ue,be)=>(0,o.A)(be).data(this._itemDataKey())!==he||(de=be,!1)),de}_updateSelectedItems(he,de){(he||de)&&this._fireSelectionChangeEvent(de,he)}_fireSelectionChangeEvent(he,de){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:[he],removedItems:[de]})}selectItem(he){const de=he.nodeType?this._getItemData(he):he,ue=this._dataAdapter.getSelectedNodesKeys()[0],be=this.option("selectedItem"),ve=this._dataAdapter.getNodeByItem(de);ve.internalFields.key!==ue&&(ue&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(ue),!1),this._toggleItemSelection(ve,!0),this._updateSelectedItems(be,de),this._setOptionWithoutOptionChange("selectedItem",de))}unselectItem(he){const de=he.nodeType?this._getItemData(he):he,ue=this._dataAdapter.getNodeByItem(de),be=this.option("selectedItem");ue.internalFields.selected&&(this._toggleItemSelection(ue,!1),this._updateSelectedItems(be,null),this._setOptionWithoutOptionChange("selectedItem",null))}}return ae.ItemClass=a.A,ae})()},6229:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s});var W=M(4859),o=M(676),P=M(3090),b=M(1830),f=M(8360),S=M(3086),T=M(9212);const s=M(6717).A.inherit({NAME:"Calendar",getDefaultOptions(){return(0,P.X)(this.callBase(),{todayButtonText:f.A.format("dxCalendar-todayButtonText")})},supportedKeys(){const a=function(u){return!!this.option("opened")&&(u.preventDefault(),!0)};return{rightArrow(){if(this.option("opened"))return!0},leftArrow(){if(this.option("opened"))return!0},enter:function(u){if(this.dateBox.option("opened")){if(u.preventDefault(),this._widget.option("zoomLevel")===this._widget.option("maxZoomLevel")){const h=this._getContouredValue(),g=this._lastActionElement,_=this._closeDropDownByEnter();return _&&h&&"calendar"===g&&this.dateBoxValue(h,u),_&&this.dateBox.close(),this.dateBox._valueChangeEventHandler(u),!_}return!0}this.dateBox._valueChangeEventHandler(u)}.bind(this),home:a,end:a}},getDisplayFormat:a=>a||"shortdate",_closeDropDownByEnter:()=>!0,_getWidgetName:()=>S.A,_getContouredValue(){return this._widget._view.option("contouredDate")},getKeyboardListener(){return this._widget},_getWidgetOptions(){const a=this.dateBox.option("disabledDates");return(0,P.X)(this.dateBox.option("calendarOptions"),{value:this.dateBoxValue()||null,selectionMode:"single",dateSerializationFormat:null,min:this.dateBox.dateOption("min"),max:this.dateBox.dateOption("max"),onValueChanged:this._valueChangedHandler.bind(this),onCellClick:this._cellClickHandler.bind(this),disabledDates:(0,b.Tn)(a)?this._injectComponent(a.bind(this.dateBox)):a,onContouredChanged:this._refreshActiveDescendant.bind(this),skipFocusCheck:!0})},_injectComponent(a){const u=this;return function(h){return(0,P.X)(h,{component:u.dateBox}),a(h)}},_refreshActiveDescendant(a){this._lastActionElement="calendar",this.dateBox.setAria("activedescendant",a.actionValue)},_getTodayButtonConfig(){const a=this.dateBox.option("buttonsLocation"),h="default"===a?["bottom","center"]:(0,W.T6)(a),g=(0,T.gx)()?"text":"outlined";return{widget:"dxButton",toolbar:h[0],location:"after"===h[1]?"before":h[1],options:{onClick:_=>{this._widget._toTodayView(_)},text:this.dateBox.option("todayButtonText"),elementAttr:{class:"dx-button-today"},stylingMode:g}}},_isCalendarVisible(){const{calendarOptions:a}=this.dateBox.option();return(0,b.RI)(a)||!1!==a.visible},_getPopupToolbarItems(a){return"useButtons"===this.dateBox.option("applyValueMode")&&this._isCalendarVisible()?[this._getTodayButtonConfig(),...a]:a},popupConfig:a=>(0,P.X)(!0,a,{position:{collision:"flipfit flip"},width:"auto"}),_valueChangedHandler(a){const{value:u}=a,h=a.previousValue;o.A.sameDate(u,h)&&o.A.sameHoursAndMinutes(u,h)||"instantly"===this.dateBox.option("applyValueMode")&&this.dateBoxValue(this.getValue(),a.event)},_updateValue(){this._widget&&this._widget.option("value",this.dateBoxValue())},textChangedHandler(){this._lastActionElement="input",this.dateBox.option("opened")&&this._widget&&this._updateValue(!0)},_cellClickHandler(a){const{dateBox:u}=this;"instantly"===u.option("applyValueMode")&&(u.option("opened",!1),this.dateBoxValue(this.getValue(),a.event))}})},6717:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(3538),o=M(5704),P=M(4859),b=M(4072),f=M(9061);const{abstract:S}=W.A,y=W.A.inherit({ctor(d){this.dateBox=d},widgetOption(){return this._widget&&this._widget.option.apply(this._widget,arguments)},_renderWidget(d){d=d||(0,o.A)("<div>"),this._widget=this._createWidget(d),this._widget.$element().appendTo(this._getWidgetContainer())},_createWidget(d){const c=this._getWidgetName(),s=this._getWidgetOptions();return this.dateBox._createComponent(d,c,s)},_getWidgetOptions:S,_getWidgetName:S,getDefaultOptions:()=>({mode:"text"}),getDisplayFormat:S,supportedKeys:P.lQ,getKeyboardListener:P.lQ,customizeButtons:P.lQ,getParsedText:(d,c)=>f.A.parse(d,c)||f.A.parse(d),renderInputMinMax:P.lQ,renderOpenedState(){this._updateValue()},popupConfig:S,_dimensionChanged(){var d;null===(d=this._getPopup())||void 0===d||d.repaint()},renderPopupContent(){const d=this._getPopup();this._renderWidget();const c=d.$content().parent();b.A.off(c,"mousedown"),b.A.on(c,"mousedown",this._preventFocusOnPopup.bind(this))},_preventFocusOnPopup(d){d.preventDefault()},_getWidgetContainer(){return this._getPopup().$content()},_getPopup(){return this.dateBox._popup},popupShowingHandler:P.lQ,popupHiddenHandler:P.lQ,_updateValue(){this._widget&&this._widget.option("value",this.dateBoxValue())},useCurrentDateByDefault:P.lQ,getDefaultDate:()=>new Date,textChangedHandler:P.lQ,renderValue(){this.dateBox.option("opened")&&this._updateValue()},getValue(){return this._widget.option("value")},isAdaptivityChanged:()=>!1,dispose(){const d=this._getPopup();d&&d.$content().empty()},dateBoxValue(){return arguments.length?this.dateBox.dateValue.apply(this.dateBox,arguments):this.dateBox.dateOption.apply(this.dateBox,["value"])}})},5257:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>c});var W=M(5704),o=M(3090),P=M(4072),b=M(8360),f=M(9012),S=M(974);class c extends S.A{constructor(a,u,h){super(a,u,h),this.currentTemplate=null}_attachEvents(a){const{editor:u}=this;a.option("onClick",h=>{var g;(null!==(g=u._shouldCallOpenHandler)&&void 0!==g&&g.call(u)||!u.option("openOnFieldClick"))&&u._openHandler(h)}),P.A.on(a.$element(),"mousedown",h=>{u.$element().is(".dx-state-focused")&&h.preventDefault()})}_create(){const{editor:a}=this,u=(0,W.A)("<div>"),h=this._getOptions();this._addToContainer(u);const g=a._createComponent(u,f.A,(0,o.X)({},h,{elementAttr:{"aria-label":b.A.format("dxDropDownEditor-selectLabel")}}));return this._legacyRender(a.$element(),u,h.visible),{$element:u,instance:g}}_getOptions(){const{editor:a}=this,u=this._isVisible(),g={focusStateEnabled:!1,hoverStateEnabled:!1,activeStateEnabled:!1,useInkRipple:!1,disabled:a.option("readOnly"),visible:u};return this._addTemplate(g),g}_isVisible(){const{editor:a}=this;return super._isVisible()&&a.option("showDropDownButton")}_legacyRender(a,u,h){a.toggleClass("dx-dropdowneditor-button-visible",h),u&&u.removeClass("dx-button").removeClass("dx-button-mode-contained").addClass("dx-dropdowneditor-button")}_isSameTemplate(){return this.editor.option("dropDownButtonTemplate")===this.currentTemplate}_addTemplate(a){this._isSameTemplate()||(a.template=this.editor._getTemplateByOption("dropDownButtonTemplate"),this.currentTemplate=this.editor.option("dropDownButtonTemplate"))}update(){if(super.update()){const{editor:u,instance:h}=this,g=u.$element(),_=this._getOptions();h?.option(_),this._legacyRender(g,h?.$element(),_.visible)}}}},3684:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>pe});var W=M(6870),o=M(4504),P=M(1973),b=M(5973),f=M(9522),S=M(2925),T=M(5704),y=M(5645),d=M(4859),c=M(3090),s=M(2660),a=M(4757),u=M(1830),h=M(6110),g=M(778),_=M(4072),x=M(9293),w=M(8360),D=M(8628),C=M(8910),I=M(402),L=M(127),N=M(7080),G=M(5257),k=M(2773);const B="dx-dropdowneditor-input-wrapper",J="dx-dropdowneditor-overlay",Q="ios"===b.A.current().platform,te=C.A.inherit({_supportedKeys(){return(0,c.X)({},this.callBase(),{tab(z){if(!this.option("opened"))return;if(!this._popup.getFocusableElements().length)return void this.close();const oe=z.shiftKey?this._getLastPopupElement():this._getFirstPopupElement();oe&&(_.A.trigger(oe,"focus"),oe.select()),z.preventDefault()},escape(z){return this.option("opened")&&z.preventDefault(),this.close(),!0},upArrow(z){return!(!(0,x.By)(z)&&(z.preventDefault(),z.stopPropagation(),z.altKey)&&(this.close(),1))},downArrow(z){return!(!(0,x.By)(z)&&(z.preventDefault(),z.stopPropagation(),z.altKey)&&(this._validatedOpening(),1))},enter(z){return this.option("opened")&&(z.preventDefault(),this._valueChangeEventHandler(z)),!0}})},_getDefaultButtons(){return this.callBase().concat([{name:"dropDown",Ctor:G.A}])},_getDefaultOptions(){return(0,c.X)(this.callBase(),{value:null,onOpened:null,onClosed:null,opened:!1,acceptCustomValue:!0,applyValueMode:"instantly",deferRendering:!0,activeStateEnabled:!0,dropDownButtonTemplate:"dropDownButton",fieldTemplate:null,openOnFieldClick:!1,showDropDownButton:!0,buttons:void 0,dropDownOptions:{showTitle:!1},popupPosition:this._getDefaultPopupPosition(),onPopupInitialized:null,applyButtonText:w.A.format("OK"),cancelButtonText:w.A.format("Cancel"),buttonsLocation:"default",useHiddenSubmitElement:!1,validationMessagePosition:"auto"})},_useTemplates:()=>!0,_getDefaultPopupPosition(z){const oe=(0,a.n)(z);return{offset:{h:0,v:-1},my:`${oe} top`,at:`${oe} bottom`,collision:"flip flip"}},_defaultOptionsRules(){return this.callBase().concat([{device:z=>"generic"===z.platform,options:{popupPosition:{offset:{v:0}}}}])},_inputWrapper(){return this.$element().find(`.${B}`).first()},_init(){this.callBase(),this._initVisibilityActions(),this._initPopupInitializedAction(),this._updatePopupPosition(this.option("rtlEnabled")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_updatePopupPosition(z){const{my:oe,at:ae}=this._getDefaultPopupPosition(z),ee=this.option("popupPosition");this.option("popupPosition",(0,c.X)({},ee,{my:oe,at:ae}))},_initVisibilityActions(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]}),this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})},_initPopupInitializedAction(){this._popupInitializedAction=this._createActionByOption("onPopupInitialized",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){this._renderSubmitElement(),this.callBase(),this.$element().addClass("dx-dropdowneditor"),this.setAria("role",this._getAriaRole())},_render(){this.callBase(),this._renderOpenHandler(),this._attachFocusOutHandler(),this._renderOpenedState()},_renderContentImpl(){this.option("deferRendering")||this._createPopup()},_renderInput(){this.callBase(),this._renderTemplateWrapper(),this._wrapInput(),this._setDefaultAria()},_wrapInput(){this._$container=this.$element().wrapInner((0,T.A)("<div>").addClass(B)).children().eq(0)},_getAriaHasPopup:()=>"true",_getAriaAutocomplete:()=>"none",_getAriaRole:()=>"combobox",_setDefaultAria(){this.setAria({haspopup:this._getAriaHasPopup(),autocomplete:this._getAriaAutocomplete(),role:this._getAriaRole()})},_readOnlyPropValue(){return!this._isEditable()||this.callBase()},_cleanFocusState(){this.callBase(),this.option("fieldTemplate")&&this._detachFocusEvents()},_getFieldTemplate(){return this.option("fieldTemplate")&&this._getTemplateByOption("fieldTemplate")},_renderMask(){this.option("fieldTemplate")||this.callBase()},_renderField(){const z=this._getFieldTemplate();z&&this._renderTemplatedField(z,this._fieldRenderData())},_renderPlaceholder(){this._getFieldTemplate()||this.callBase()},_renderValue(){this.option("useHiddenSubmitElement")&&this._setSubmitValue(),this.callBase().always(this._renderField.bind(this))},_getButtonsContainer(){return this._getFieldTemplate()?this._$container:this._$textEditorContainer},_renderTemplateWrapper(){this._getFieldTemplate()&&(this._$templateWrapper||(this._$templateWrapper=(0,T.A)("<div>").addClass("dx-dropdowneditor-field-template-wrapper").prependTo(this.$element())))},_renderTemplatedField(z,oe){const ae=(0,I.in)(this._input());this._detachKeyboardEvents(),this._detachFocusEvents(),this._$textEditorContainer.remove(),this._$templateWrapper.empty();const ee=this._$templateWrapper;z.render({model:oe,container:(0,f.cc)(ee),onRendered:()=>{if(!this.$element().find(ee).length)return;const de=this._input();if(!de.length)throw L.A.Error("E1010");this._integrateInput(),ae&&_.A.trigger(de,"focus")}})},_integrateInput(){var z;const{isValid:oe}=this.option();this._renderFocusState(),this._refreshValueChangeEvent(),this._refreshEvents(),this._refreshEmptinessEvent(),this._setDefaultAria(),this._setFieldAria(),this._toggleValidationClasses(!oe),null===(z=this.option("_onMarkupRendered"))||void 0===z||z()},_refreshEmptinessEvent(){_.A.off(this._input(),"input blur",this._toggleEmptinessEventHandler),this._renderEmptinessEvent()},_fieldRenderData(){return this.option("value")},_initTemplates(){this._templateManager.addDefaultTemplates({dropDownButton:new y.l(z=>{const oe=(0,T.A)("<div>").addClass("dx-dropdowneditor-icon");(0,T.A)(z.container).append(oe)})}),this.callBase()},_renderOpenHandler(){const z=this._inputWrapper(),oe=(0,x.b4)(g.U,this.NAME),ae=this.option("openOnFieldClick");_.A.off(z,oe),_.A.on(z,oe,this._getInputClickHandler(ae)),this.$element().toggleClass("dx-dropdowneditor-field-clickable",ae),ae&&(this._openOnFieldClickAction=this._createAction(this._openHandler.bind(this)))},_attachFocusOutHandler(){Q&&(this._detachFocusOutEvents(),_.A.on(this._inputWrapper(),(0,x.b4)("focusout",this.NAME),z=>{const oe=z.relatedTarget;oe&&this.option("opened")&&this._isTargetOutOfComponent(oe)&&this.close()}))},_isTargetOutOfComponent(z){const oe=this.content?(0,T.A)(this.content()).closest(`.${J}`):this._$popup;return 0===(0,T.A)(z).closest(`.${J}`,oe).length},_detachFocusOutEvents(){Q&&_.A.off(this._inputWrapper(),(0,x.b4)("focusout",this.NAME))},_getInputClickHandler(z){return z?oe=>{this._executeOpenAction(oe)}:()=>{this._focusInput()}},_openHandler(){this._toggleOpenState()},_executeOpenAction(z){this._openOnFieldClickAction({event:z})},_keyboardEventBindingTarget(){return this._input()},_focusInput(){return!this.option("disabled")&&(this.option("focusStateEnabled")&&!(0,I.in)(this._input())&&(this._resetCaretPosition(),_.A.trigger(this._input(),"focus")),!0)},_resetCaretPosition(){let z=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const oe=this._input().get(0);if(oe){const{value:ae}=oe,ee=(0,u.O9)(ae)&&(z||this._isEditable())?ae.length:0;this._caret({start:ee,end:ee},!0)}},_isEditable(){return this.option("acceptCustomValue")},_toggleOpenState(z){this._focusInput()&&(this.option("readOnly")||(z=arguments.length?z:!this.option("opened"),this.option("opened",z)))},_getControlsAria(){return this._popup&&this._popupContentId},_renderOpenedState(){const z=this.option("opened");z&&this._createPopup(),this.$element().toggleClass("dx-dropdowneditor-active",z),this._setPopupOption("visible",z);const oe={expanded:z,controls:this._getControlsAria()};this.setAria(oe),this.setAria("owns",z?this._popupContentId:void 0,this.$element())},_createPopup(){this._$popup||(this._$popup=(0,T.A)("<div>").addClass(J).appendTo(this.$element()),this._renderPopup(),this._renderPopupContent(),this._setPopupAriaLabel())},_setPopupAriaLabel(){const z=this._popup.$overlayContent();this.setAria("label","Dropdown",z)},_renderPopupContent:d.lQ,_renderPopup(){const z=(0,c.X)(this._popupConfig(),this._options.cache("dropDownOptions"));delete z.closeOnOutsideClick,this._popup=this._createComponent(this._$popup,D.A,z),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this._attachPopupKeyHandler(),this._contentReadyHandler(),this._setPopupContentId(this._popup.$content()),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_attachPopupKeyHandler(){_.A.on(this._popup.$overlayContent(),(0,x.b4)("keydown",this.NAME),z=>this._popupKeyHandler(z))},_popupKeyHandler(z){switch((0,x.YD)(z)){case"tab":this._popupTabHandler(z);break;case"escape":this._popupEscHandler(z)}},_popupTabHandler(z){const oe=(0,T.A)(z.target),ae=z.shiftKey&&oe.is(this._getFirstPopupElement());(!z.shiftKey&&oe.is(this._getLastPopupElement())||ae)&&(_.A.trigger(this.field(),"focus"),z.preventDefault())},_popupEscHandler(){_.A.trigger(this._input(),"focus"),this.close()},_setPopupContentId(z){this._popupContentId=`dx-${new S.A}`,this.setAria("id",this._popupContentId,z)},_contentReadyHandler:d.lQ,_popupConfig(){return{onInitialized:this._getPopupInitializedHandler(),position:(0,c.X)(this.option("popupPosition"),{of:this.$element()}),showTitle:this.option("dropDownOptions.showTitle"),_ignoreFunctionValueDeprecation:!0,width:()=>(0,k.v)(this.$element()),height:"auto",shading:!1,hideOnParentScroll:!0,hideOnOutsideClick:z=>this._closeOutsideDropDownHandler(z),animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,dragEnabled:!1,toolbarItems:this._getPopupToolbarItems(),onPositioned:this._popupPositionedHandler.bind(this),fullScreen:!1,contentTemplate:null,_hideOnParentScrollTarget:this.$element(),_wrapperClassExternal:J,_ignorePreventScrollEventsDeprecation:!0}},_popupInitializedHandler:d.lQ,_getPopupInitializedHandler(){const z=this.option("onPopupInitialized");return oe=>{this._popupInitializedHandler(oe),z&&this._popupInitializedAction({popup:oe.component})}},_dimensionChanged(){!(0,h.Vd)()||this.$element().is(":visible")?this._updatePopupWidth():this.close()},_updatePopupWidth(){void 0===(0,k.b)(this.option("dropDownOptions.width"))&&this._setPopupOption("width",()=>(0,k.v)(this.$element()))},_popupPositionedHandler(z){var oe;const{labelMode:ae,stylingMode:ee}=this.option();if(!this._popup)return;const he=this._popup.$overlayContent(),de=null===(oe=z.position)||void 0===oe||null===(oe=oe.v)||void 0===oe?void 0:oe.flip,ue="hidden"!==ae&&"outside"!==ae&&"outlined"===ee;if(z.position&&he.toggleClass("dx-dropdowneditor-overlay-flipped",de),de&&ue&&this._label.isVisible()){const be=this._label.$element();(0,o.Cy)(he,{top:(0,o.x5)(he).top-parseInt(be.css("fontSize"))})}},_popupShowingHandler:d.lQ,_popupHidingHandler(){this.option("opened",!1)},_popupShownHandler(){var z;this._openAction(),null===(z=this._validationMessage)||void 0===z||z.option("positionSide",this._getValidationMessagePositionSide())},_popupHiddenHandler(){var z;this._closeAction(),null===(z=this._validationMessage)||void 0===z||z.option("positionSide",this._getValidationMessagePositionSide())},_getValidationMessagePositionSide(){const z=this.option("validationMessagePosition");if("auto"!==z)return z;let oe="bottom";if(this._popup&&this._popup.option("visible")){const{top:ae}=W.A.setup(this.$element()),{top:ee}=W.A.setup(this._popup.$content());oe=ae+this.option("popupPosition").offset.v>ee?"bottom":"top"}return oe},_closeOutsideDropDownHandler(z){let{target:oe}=z;const ae=(0,T.A)(oe),ee=this.getButton("dropDown"),he=ee&&ee.$element(),de=!!ae.closest(this.$element()).length,ue=!!ae.closest(he).length;return!de&&!ue},_clean(){delete this._openOnFieldClickAction,delete this._$templateWrapper,this._$popup&&(this._$popup.remove(),delete this._$popup,delete this._popup),this.callBase()},_setPopupOption(z,oe){this._setWidgetOption("_popup",arguments)},_validatedOpening(){this.option("readOnly")||this._toggleOpenState(!0)},_getPopupToolbarItems(){return"useButtons"===this.option("applyValueMode")?this._popupToolbarItemsConfig():[]},_getFirstPopupElement(){return(0,T.A)(this._popup.getFocusableElements()).first()},_getLastPopupElement(){return(0,T.A)(this._popup.getFocusableElements()).last()},_popupToolbarItemsConfig(){const z=[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText")}},{shortcut:"cancel",options:{onClick:this._cancelButtonHandler.bind(this),text:this.option("cancelButtonText")}}];return this._applyButtonsLocation(z)},_applyButtonsLocation(z){const oe=this.option("buttonsLocation"),ae=z;if("default"!==oe){const ee=(0,d.T6)(oe);(0,s.__)(ae,(he,de)=>{(0,c.X)(de,{toolbar:ee[0],location:ee[1]})})}return ae},_applyButtonHandler(){this.close(),this.option("focusStateEnabled")&&this.focus()},_cancelButtonHandler(){this.close(),this.option("focusStateEnabled")&&this.focus()},_popupOptionChanged(z){const oe=N.A.getOptionsFromContainer(z);this._setPopupOption(oe);const ae=Object.keys(oe);(ae.includes("width")||ae.includes("height"))&&this._dimensionChanged()},_renderSubmitElement(){this.option("useHiddenSubmitElement")&&(this._$submitElement=(0,T.A)("<input>").attr("type","hidden").appendTo(this.$element()))},_setSubmitValue(){this._getSubmitElement().val(this.option("value"))},_getSubmitElement(){return this.option("useHiddenSubmitElement")?this._$submitElement:this.callBase()},_dispose(){this._detachFocusOutEvents(),this.callBase()},_optionChanged(z){var oe;switch(z.name){case"width":case"height":this.callBase(z),null===(oe=this._popup)||void 0===oe||oe.repaint();break;case"opened":this._renderOpenedState();break;case"onOpened":case"onClosed":this._initVisibilityActions();break;case"onPopupInitialized":this._initPopupInitializedAction();break;case"fieldTemplate":case"acceptCustomValue":case"openOnFieldClick":this._invalidate();break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"dropDownOptions":this._popupOptionChanged(z),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;case"popupPosition":break;case"deferRendering":(0,h.Vd)()&&this._createPopup();break;case"applyValueMode":case"applyButtonText":case"cancelButtonText":case"buttonsLocation":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"useHiddenSubmitElement":this._$submitElement&&(this._$submitElement.remove(),this._$submitElement=void 0),this._renderSubmitElement();break;case"rtlEnabled":this._updatePopupPosition(z.value),this.callBase(z);break;default:this.callBase(z)}},open(){this.option("opened",!0)},close(){this.option("opened",!1)},field(){return(0,f.cc)(this._input())},content(){return this._popup?this._popup.content():null}});(0,P.A)("dxDropDownEditor",te);const pe=te},2773:(In,Ze,M)=>{"use strict";M.d(Ze,{b:()=>b,v:()=>P});var W=M(1363),o=M(6110);const P=function(f){if((0,o.Vd)())return(0,W.Ot)(f)},b=function(f){return null===f&&(f=void 0),"function"==typeof f&&(f=f()),f}},8496:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>b});var W=M(6620);M(1609);const b=W.A},8073:(In,Ze,M)=>{"use strict";M.d(Ze,{i:()=>Pe});var W=M(2583),o=M(5973),P=M(9522),b=M(2925),f=M(5704),S=M(5944),T=M(4859),y=M(4270),d=M(6021),c=M(3090),s=M(8535),a=M(2660),u=M(1363),h=M(7007),g=M(1830),_=M(6110),x=M(778),w=M(4072),D=M(8842),C=M(9293),I=M(8360),L=M(6946),N=M(6847);function k(Fe,Xe){const tt=function G(Fe){var Xe,tt;return Fe&&(0,_.Vd)()?null===(Xe=(tt=(0,_.zk)()).getComputedStyle)||void 0===Xe?void 0:Xe.call(tt,Fe):null}(Fe);return tt?(0,N.R)(tt[`margin${(0,L.Ns)(Xe)}`]):0}var ie=M(9012),re=M(6067),q=M(9994),Y=M(9212),Z=M(9524),Q=M(2170),te=M(8790);const ue=M(5107).A.inherit({_renderWatchers(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this)),this._startWatcher("showChevron",this._renderShowChevron.bind(this))},_renderBadge(Fe){if(this._$element.children(".dx-list-item-badge-container").remove(),!Fe)return;const Xe=(0,f.A)("<div>").addClass("dx-list-item-badge-container").append((0,f.A)("<div>").addClass("dx-list-item-badge").addClass("dx-badge").text(Fe)),tt=this._$element.children(".dx-list-item-chevron-container").first();tt.length>0?Xe.insertBefore(tt):Xe.appendTo(this._$element)},_renderShowChevron(Fe){if(this._$element.children(".dx-list-item-chevron-container").remove(),!Fe)return;const Xe=(0,f.A)("<div>").addClass("dx-list-item-chevron-container"),tt=(0,f.A)("<div>").addClass("dx-list-item-chevron");Xe.append(tt).appendTo(this._$element)}}),Ke=(0,y.Hz)("items");const Pe=re.A.inherit({_activeStateUnit:[".dx-list-item",".dx-list-select-all"].join(","),_supportedKeys(){const Fe=this,Xe=function(vt){let qe=tt(vt);qe.is(Fe.option("focusedElement"))&&(function(Tt,qt){let wt=Tt.position().top;"prev"===qt&&(wt=Tt.position().top-(0,u.Oq)(Fe.$element())+(0,u.P$)(Tt)),Fe.scrollTo(wt)}(qe,vt),qe=tt(vt)),Fe.option("focusedElement",(0,P.cc)(qe)),Fe.scrollToItem(qe)};function tt(vt){const qe=Fe.scrollTop(),At=(0,u.Oq)(Fe.$element());let Tt=(0,f.A)(Fe.option("focusedElement")),qt=!0;if(!Tt.length)return(0,f.A)();for(;qt;){const wt=Tt[vt]();if(!wt.length)break;const En=wt.position().top+(0,u.P$)(wt)/2;qt=En<At+qe&&En>qe,qt&&(Tt=wt)}return Tt}return(0,c.X)(this.callBase(),{leftArrow:T.lQ,rightArrow:T.lQ,pageUp:()=>(Xe("prev"),!1),pageDown:()=>(Xe("next"),!1)})},_getDefaultOptions(){return(0,c.X)(this.callBase(),{hoverStateEnabled:!0,pullRefreshEnabled:!1,scrollingEnabled:!0,selectByClick:!0,showScrollbar:"onScroll",useNativeScrolling:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,pullingDownText:I.A.format("dxList-pullingDownText"),pulledDownText:I.A.format("dxList-pulledDownText"),refreshingText:I.A.format("dxList-refreshingText"),pageLoadingText:I.A.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:I.A.format("dxList-nextButtonText"),onItemSwipe:null,grouped:!1,onGroupRendered:null,collapsibleGroups:!1,groupTemplate:"group",indicateLoading:!0,activeStateEnabled:!0,_itemAttributes:{role:"option"},useInkRipple:!1,wrapItemText:!1,_swipeEnabled:!0,showChevronExpr:Fe=>Fe?Fe.showChevron:void 0,badgeExpr:Fe=>Fe?Fe.badge:void 0})},_defaultOptionsRules(){const Fe=(0,Y.ss)();return this.callBase().concat((0,Q.M)(),[{device:()=>!h.nativeScrolling,options:{useNativeScrolling:!1}},{device:Xe=>!h.nativeScrolling&&!o.A.isSimulator()&&"desktop"===o.A.real().deviceType&&"generic"===Xe.platform,options:{showScrollbar:"onHover",pageLoadMode:"nextButton"}},{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,Y.gx)(Fe),options:{useInkRipple:!0}},{device:()=>(0,Y.Nt)(Fe),options:{pullingDownText:"",pulledDownText:"",refreshingText:"",pageLoadingText:""}}])},_visibilityChanged(Fe){Fe&&this._updateLoadingState(!0)},_itemClass:()=>"dx-list-item",_itemDataKey:()=>"dxListItemData",_itemContainer(){return this._$container},_getItemsContainer(){return this._$listContainer},_cleanItemContainer(){this.callBase();const Fe=this._getItemsContainer();(0,f.A)(Fe).empty(),Fe.appendTo(this._$container)},_saveSelectionChangeEvent(Fe){this._selectionChangeEventInstance=Fe},_getSelectionChangeEvent(){return this._selectionChangeEventInstance},_refreshItemElements(){this._itemElementsCache=this.option("grouped")?this._getItemsContainer().children(".dx-list-group").children(".dx-list-group-body").children(this._itemSelector()):this._getItemsContainer().children(this._itemSelector())},_modifyByChanges(){this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},reorderItem(Fe,Xe){return this.callBase(Fe,Xe).done(function(){this._refreshItemElements()})},deleteItem(Fe){return this.callBase(Fe).done(function(){this._refreshItemElements()})},_itemElements(){return this._itemElementsCache},_itemSelectHandler(Fe){if("single"!==this.option("selectionMode")||!this.isItemSelected(Fe.currentTarget))return this.callBase(Fe)},_allowDynamicItemsAppend:()=>!0,_init(){this.callBase(),this._dataController.resetDataSourcePageIndex(),this._$container=this.$element(),this._$listContainer=(0,f.A)("<div>").addClass("dx-list-items"),this._initScrollView(),this._feedbackShowTimeout=70,this._createGroupRenderAction()},_scrollBottomMode(){return"scrollBottom"===this.option("pageLoadMode")},_nextButtonMode(){return"nextButton"===this.option("pageLoadMode")},_dataSourceOptions(){const Fe=this._scrollBottomMode(),Xe=this._nextButtonMode();return(0,c.X)(this.callBase(),{paginate:(0,T.YD)(Fe||Xe,!0)})},_getGroupedOption(){return this.option("grouped")},_getGroupContainerByIndex(Fe){return this._getItemsContainer().find(".dx-list-group").eq(Fe).find(".dx-list-group-body")},_dataSourceFromUrlLoadMode:()=>"raw",_initScrollView(){const Fe=this.option("scrollingEnabled"),Xe=Fe&&this.option("pullRefreshEnabled"),tt=Fe&&this._scrollBottomMode()&&!!this._dataController.getDataSource();this._scrollView=this._createComponent(this.$element(),function Se(){return q.A}(),{height:this.option("height"),width:this.option("width"),disabled:this.option("disabled")||!Fe,onScroll:this._scrollHandler.bind(this),onPullDown:Xe?this._pullDownHandler.bind(this):null,onReachBottom:tt?this._scrollBottomHandler.bind(this):null,showScrollbar:this.option("showScrollbar"),useNative:this.option("useNativeScrolling"),bounceEnabled:this.option("bounceEnabled"),scrollByContent:this.option("scrollByContent"),scrollByThumb:this.option("scrollByThumb"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),reachBottomText:this.option("pageLoadingText"),useKeyboard:!1}),this._$container=(0,f.A)(this._scrollView.content()),this._$listContainer.appendTo(this._$container),this._toggleWrapItemText(this.option("wrapItemText")),this._createScrollViewActions()},_toggleWrapItemText(Fe){this._$listContainer.toggleClass("dx-wrap-item-text",Fe)},_createScrollViewActions(){this._scrollAction=this._createActionByOption("onScroll"),this._pullRefreshAction=this._createActionByOption("onPullRefresh"),this._pageLoadingAction=this._createActionByOption("onPageLoading")},_scrollHandler(Fe){this._scrollAction&&this._scrollAction(Fe)},_initTemplates(){this._templateManager.addDefaultTemplates({group:new S.U((Fe,Xe)=>{(0,g.Qd)(Xe)?Xe.key&&Fe.text(Xe.key):Fe.text(String(Xe))},["key"],this.option("integrationOptions.watchMethod"))}),this.callBase()},_prepareDefaultItemTemplate(Fe,Xe){if(this.callBase(Fe,Xe),Fe.icon){const tt=(0,s.N)(Fe.icon).addClass("dx-list-item-icon"),vt=(0,f.A)("<div>").addClass("dx-list-item-icon-container");vt.append(tt),Xe.prepend(vt)}},_getBindableFields:()=>["text","html","icon"],_updateLoadingState(Fe){const Xe=this._dataController,tt=this._scrollBottomMode()&&Fe&&!Xe.isLoading()&&!this._isLastPage();this._shouldContinueLoading(tt)?this._infiniteDataLoading():(this._scrollView.release(!tt&&!Xe.isLoading()),this._toggleNextButton(this._shouldRenderNextButton()&&!this._isLastPage()),this._loadIndicationSuppressed(!1))},_shouldRenderNextButton(){return this._nextButtonMode()&&this._dataController.isLoaded()},_isDataSourceFirstLoadCompleted(Fe){return(0,g.O9)(Fe)&&(this._isFirstLoadCompleted=Fe),this._isFirstLoadCompleted},_dataSourceLoadingChangedHandler(Fe){this._loadIndicationSuppressed()||(Fe&&this.option("indicateLoading")?this._showLoadingIndicatorTimer=setTimeout(()=>{var vt;(this._itemElements().length||this._isDataSourceFirstLoadCompleted())&&(null===(vt=this._scrollView)||void 0===vt||vt.startLoading())}):(clearTimeout(this._showLoadingIndicatorTimer),this._scrollView&&this._scrollView.finishLoading()),Fe||this._isDataSourceFirstLoadCompleted(!1))},_dataSourceChangedHandler(){!this._shouldAppendItems()&&(0,_.Vd)()&&this._scrollView&&this._scrollView.scrollTo(0),this.callBase.apply(this,arguments),this._isDataSourceFirstLoadCompleted(!0)},_refreshContent(){this._prepareContent(),this._fireContentReadyAction()},_hideLoadingIfLoadIndicationOff(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_loadIndicationSuppressed(Fe){if(!arguments.length)return this._isLoadIndicationSuppressed;this._isLoadIndicationSuppressed=Fe},_scrollViewIsFull(){const Fe=this._scrollView;return!Fe||(0,u.Oq)(Fe.content())>(0,u.Oq)(Fe.container())},_pullDownHandler(Fe){this._pullRefreshAction(Fe);const Xe=this._dataController;Xe.getDataSource()&&!Xe.isLoading()?(this._clearSelectedItems(),Xe.pageIndex(0),Xe.reload()):this._updateLoadingState()},_shouldContinueLoading(Fe){var Xe;const tt=(0,u.Oq)(this._scrollView.content())-(0,u.Oq)(this._scrollView.container())<((null===(Xe=this._scrollView.scrollOffset())||void 0===Xe?void 0:Xe.top)??0);return Fe&&(!this._scrollViewIsFull()||tt)},_infiniteDataLoading(){this.$element().is(":visible")&&(clearTimeout(this._loadNextPageTimer),this._loadNextPageTimer=setTimeout(()=>{this._loadNextPage()}))},_scrollBottomHandler(Fe){this._pageLoadingAction(Fe),this._dataController.isLoading()||this._isLastPage()?this._updateLoadingState():this._loadNextPage()},_renderItems(Fe){this.option("grouped")?((0,a.__)(Fe,this._renderGroup.bind(this)),this._attachGroupCollapseEvent(),this._renderEmptyMessage(),(0,Y.gx)()&&this.attachGroupHeaderInkRippleEvents()):this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},_attachGroupCollapseEvent(){const Fe=(0,C.b4)(x.U,this.NAME),Xe=this.$element(),tt=this.option("collapsibleGroups");Xe.toggleClass("dx-list-collapsible-groups",tt),w.A.off(Xe,Fe,".dx-list-group-header"),tt&&w.A.on(Xe,Fe,".dx-list-group-header",vt=>{this._createAction(qe=>{const At=(0,f.A)(qe.event.currentTarget).parent();this._collapseGroupHandler(At),this.option("focusStateEnabled")&&this.option("focusedElement",(0,P.cc)(At.find(".dx-list-item").eq(0)))},{validatingTargetName:"element"})({event:vt})})},_collapseGroupHandler(Fe,Xe){const tt=(0,d.cY)();if(Fe.hasClass("dx-list-group-collapsed")===Xe)return tt.resolve();const vt=Fe.children(".dx-list-group-body"),qe=(0,u.P$)(vt);let At=0;return 0===qe&&((0,u.k$)(vt,"auto"),At=(0,u.P$)(vt)),Fe.toggleClass("dx-list-group-collapsed",Xe),W.A.animate(vt,{type:"custom",from:{height:qe},to:{height:At},duration:200,complete:function(){this.updateDimensions(),this._updateLoadingState(!0),tt.resolve()}.bind(this)}),tt.promise()},_dataSourceLoadErrorHandler(){this._forgetNextPageLoading(),this._initialized&&(this._renderEmptyMessage(),this._updateLoadingState())},_initMarkup(){this._itemElementsCache=(0,f.A)(),this.$element().addClass("dx-list"),this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.setAria({role:"group",roledescription:"list"},this.$element()),this.setAria({role:"application"},this._focusTarget()),this._setListAria()},_setListAria(){const{items:Fe,allowItemDeleting:Xe}=this.option(),tt=I.A.format(Xe?"dxList-listAriaLabel-deletable":"dxList-listAriaLabel");this.setAria(null!=Fe&&Fe.length?{role:"listbox",label:tt}:{role:void 0,label:void 0},this._$listContainer)},_focusTarget(){return this._itemContainer()},_renderInkRipple(){this._inkRipple=(0,Z.XX)()},_toggleActiveState(Fe,Xe,tt){this.callBase.apply(this,arguments);const vt=this;if(!this._inkRipple)return;const qe={element:Fe,event:tt};Xe?(0,Y.gx)()?this._inkRippleTimer=setTimeout(()=>{vt._inkRipple.showWave(qe)},35):vt._inkRipple.showWave(qe):(clearTimeout(this._inkRippleTimer),this._inkRipple.hideWave(qe))},_postprocessRenderItem(Fe){this._refreshItemElements(),this.callBase.apply(this,arguments),this.option("_swipeEnabled")&&this._attachSwipeEvent((0,f.A)(Fe.itemElement))},_attachSwipeEvent(Fe){const Xe=(0,C.b4)(D._N,this.NAME);w.A.on(Fe,Xe,this._itemSwipeEndHandler.bind(this))},_itemSwipeEndHandler(Fe){this._itemDXEventHandler(Fe,"onItemSwipe",{direction:Fe.offset<0?"left":"right"})},_nextButtonHandler(Fe){this._pageLoadingAction(Fe);const Xe=this._dataController;Xe.getDataSource()&&!Xe.isLoading()&&(this._scrollView.toggleLoading(!0),this._$nextButton.detach(),this._loadIndicationSuppressed(!0),this._loadNextPage())},_renderGroup(Fe,Xe){const tt=(0,f.A)("<div>").addClass("dx-list-group").appendTo(this._getItemsContainer()),vt=`dx-${(new b.A).toString()}`;this.setAria({role:"group",labelledby:vt},tt);const At=(0,f.A)("<div>").addClass("dx-list-group-header").attr("id",vt).appendTo(tt),Tt=this.option("groupTemplate"),qt=this._getTemplate(Xe.template||Tt,Xe,Fe,At),wt={index:Fe,itemData:Xe,container:(0,P.cc)(At)};this._createItemByTemplate(qt,wt),(0,f.A)("<div>").addClass("dx-list-group-header-indicator").prependTo(At),this._renderingGroupIndex=Fe;const En=(0,f.A)("<div>").addClass("dx-list-group-body").appendTo(tt);(0,a.__)(Ke(Xe)||[],(ri,Tn)=>{this._renderItem({group:Fe,item:ri},Tn,En)}),this._groupRenderAction({groupElement:(0,P.cc)(tt),groupIndex:Fe,groupData:Xe})},downInkRippleHandler(Fe){this._toggleActiveState((0,f.A)(Fe.currentTarget),!0,Fe)},upInkRippleHandler(Fe){this._toggleActiveState((0,f.A)(Fe.currentTarget),!1)},attachGroupHeaderInkRippleEvents(){const Fe=this.$element();this._downInkRippleHandler=this._downInkRippleHandler||this.downInkRippleHandler.bind(this),this._upInkRippleHandler=this._upInkRippleHandler||this.upInkRippleHandler.bind(this);const Xe=[Fe,"dxpointerdown",".dx-list-group-header",this._downInkRippleHandler],tt=[Fe,"dxpointerup dxpointerout",".dx-list-group-header",this._upInkRippleHandler];w.A.off(...Xe),w.A.on(...Xe),w.A.off(...tt),w.A.on(...tt)},_createGroupRenderAction(){this._groupRenderAction=this._createActionByOption("onGroupRendered")},_clean(){clearTimeout(this._inkRippleTimer),this._$nextButton&&(this._$nextButton.remove(),this._$nextButton=null),this.callBase.apply(this,arguments)},_dispose(){this._isDataSourceFirstLoadCompleted(!1),clearTimeout(this._holdTimer),clearTimeout(this._loadNextPageTimer),clearTimeout(this._showLoadingIndicatorTimer),this.callBase()},_toggleDisabledState(Fe){this.callBase(Fe),this._scrollView.option("disabled",Fe||!this.option("scrollingEnabled"))},_toggleNextButton(Fe){const Xe=this._dataController,tt=this._getNextButton();this.$element().toggleClass("dx-has-next",Fe),Fe&&Xe.isLoaded()&&tt.appendTo(this._itemContainer()),Fe||tt.detach()},_getNextButton(){return this._$nextButton||(this._$nextButton=this._createNextButton()),this._$nextButton},_createNextButton(){const Fe=(0,f.A)("<div>").addClass("dx-list-next-button"),Xe=(0,f.A)("<div>").appendTo(Fe);return this._createComponent(Xe,ie.A,{text:this.option("nextButtonText"),onClick:this._nextButtonHandler.bind(this),type:(0,Y.Nt)()?"default":void 0,integrationOptions:{}}),Fe},_moveFocus(){this.callBase.apply(this,arguments),this.scrollToItem(this.option("focusedElement"))},_refresh(){if((0,_.Vd)()){const Fe=this._scrollView.scrollTop();this.callBase(),Fe&&this._scrollView.scrollTo(Fe)}else this.callBase()},_optionChanged(Fe){switch(Fe.name){case"pageLoadMode":this._toggleNextButton(Fe.value),this._initScrollView();break;case"dataSource":this.callBase(Fe),this._initScrollView(),this._isDataSourceFirstLoadCompleted(!1);break;case"items":this.callBase(Fe),this._isDataSourceFirstLoadCompleted(!1);break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"showScrollbar":case"bounceEnabled":case"scrollByContent":case"scrollByThumb":case"useNativeScrolling":case"scrollingEnabled":case"pullRefreshEnabled":this._initScrollView(),this._updateLoadingState(!0);break;case"nextButtonText":case"onItemSwipe":case"useInkRipple":case"grouped":case"collapsibleGroups":case"groupTemplate":case"showChevronExpr":case"badgeExpr":this._invalidate();break;case"onScroll":case"onPullRefresh":case"onPageLoading":this._createScrollViewActions();break;case"wrapItemText":this._toggleWrapItemText(Fe.value);break;case"onGroupRendered":this._createGroupRenderAction();break;case"width":case"height":this.callBase(Fe),this._scrollView.option(Fe.name,Fe.value),this._scrollView.update();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;case"visible":this.callBase(Fe),this._scrollView.update();break;case"rtlEnabled":this._initScrollView(),this.callBase(Fe);break;case"_swipeEnabled":case"selectByClick":break;default:this.callBase(Fe)}},_extendActionArgs(Fe){if(!this.option("grouped"))return this.callBase(Fe);const Xe=Fe.closest(".dx-list-group"),tt=Xe.find(".dx-list-item");return(0,c.X)(this.callBase(Fe),{itemIndex:{group:Xe.index(),item:tt.index(Fe)}})},expandGroup(Fe){const Xe=(0,d.cY)(),tt=this._getItemsContainer().find(".dx-list-group").eq(Fe);return this._collapseGroupHandler(tt,!1).done(()=>{Xe.resolveWith(this)}),Xe.promise()},collapseGroup(Fe){const Xe=(0,d.cY)(),tt=this._getItemsContainer().find(".dx-list-group").eq(Fe);return this._collapseGroupHandler(tt,!0).done(()=>{Xe.resolveWith(this)}),Xe},updateDimensions(){const Fe=this,Xe=(0,d.cY)();return Fe._scrollView?Fe._scrollView.update().done(()=>{!Fe._scrollViewIsFull()&&Fe._updateLoadingState(!0),Xe.resolveWith(Fe)}):Xe.resolveWith(Fe),Xe.promise()},reload(){this.callBase(),this.scrollTo(0),this._pullDownHandler()},repaint(){this.scrollTo(0),this.callBase()},scrollTop(){return this._scrollView.scrollOffset().top},clientHeight(){return this._scrollView.clientHeight()},scrollHeight(){return this._scrollView.scrollHeight()},scrollBy(Fe){this._scrollView.scrollBy(Fe)},scrollTo(Fe){this._scrollView.scrollTo(Fe)},scrollToItem(Fe){const Xe=this._editStrategy.getItemElement(Fe),tt=Xe?.get(0);this._scrollView.scrollToElement(tt,{bottom:k(tt,"bottom")})},_dimensionChanged(){this.updateDimensions()}}).include(te.A);Pe.ItemClass=ue},5651:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>u});var W=M(3538),o=M(5704),P=M(4859),b=M(1363),f=M(4072),S=M(8842),T=M(9293);const y="dxListEditDecorator",d=(0,T.b4)(S.ni,y),c=(0,T.b4)(S.By,y),s=(0,T.b4)(S._N,y),u=W.A.inherit({ctor(h){this._list=h,this._init()},_init:P.lQ,_shouldHandleSwipe:!1,_attachSwipeEvent(h){const g={itemSizeFunc:function(){return this._clearSwipeCache&&(this._itemWidthCache=(0,b.RG)(this._list.$element()),this._clearSwipeCache=!1),this._itemWidthCache}.bind(this)};f.A.on(h.$itemElement,d,g,this._itemSwipeStartHandler.bind(this)),f.A.on(h.$itemElement,c,this._itemSwipeUpdateHandler.bind(this)),f.A.on(h.$itemElement,s,this._itemSwipeEndHandler.bind(this))},_itemSwipeStartHandler(h){const g=(0,o.A)(h.currentTarget);g.is(".dx-state-disabled, .dx-state-disabled *")?h.cancel=!0:(clearTimeout(this._list._inkRippleTimer),this._swipeStartHandler(g,h))},_itemSwipeUpdateHandler(h){const g=(0,o.A)(h.currentTarget);this._swipeUpdateHandler(g,h)},_itemSwipeEndHandler(h){const g=(0,o.A)(h.currentTarget);this._swipeEndHandler(g,h),this._clearSwipeCache=!0},beforeBag:P.lQ,afterBag:P.lQ,_commonOptions(){return{activeStateEnabled:this._list.option("activeStateEnabled"),hoverStateEnabled:this._list.option("hoverStateEnabled"),focusStateEnabled:this._list.option("focusStateEnabled")}},modifyElement(h){this._shouldHandleSwipe&&(this._attachSwipeEvent(h),this._clearSwipeCache=!0)},afterRender:P.lQ,handleClick:P.lQ,handleKeyboardEvents:P.lQ,handleEnterPressing:P.lQ,handleContextMenu:P.lQ,_swipeStartHandler:P.lQ,_swipeUpdateHandler:P.lQ,_swipeEndHandler:P.lQ,visibilityChange:P.lQ,getExcludedSelectors:P.lQ,dispose:P.lQ})},2476:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o={_menuEnabled(){return!!this._menuItems().length},_menuItems(){return this._list.option("menuItems")},_deleteEnabled(){return this._list.option("allowItemDeleting")},_fireMenuAction(P,b){this._list._itemEventHandlerByHandler(P,b,{},{excludeValidators:["disabled","readOnly"]})}}},1605:(In,Ze,M)=>{"use strict";M.d(Ze,{k:()=>P,u:()=>o});var W=M(3090);const o={};function P(b,f,S){const T=o,y={};y[b]=T[b]?T[b]:{},y[b][f]=S,(0,W.X)(T,y)}},4292:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>pe});var W=M(5704),o=M(3090),P=M(9293),b=M(8360),f=M(8073),S=M(3538),T=M(4859),y=M(2660),d=M(127),c=M(1605);const s=[],a=function(z,oe,ae){s.push({enabled:z,decoratorType:oe,decoratorSubType:ae})};a(function(){return this.option("menuItems").length},()=>"menu",function(){return this.option("menuMode")}),a(function(){return!this.option("menuItems").length&&this.option("allowItemDeleting")},function(){const z=this.option("itemDeleteMode");return"toggle"===z||"slideButton"===z||"swipe"===z||"static"===z?"delete":"menu"},function(){let z=this.option("itemDeleteMode");return"slideItem"===z&&(z="slide"),z}),a(function(){return"none"!==this.option("selectionMode")&&this.option("showSelectionControls")},()=>"selection",()=>"default"),a(function(){return this.option("itemDragging.allowReordering")||this.option("itemDragging.allowDropInsideItem")||this.option("itemDragging.group")},()=>"reorder",()=>"default");const I=S.A.inherit({ctor(z){this._list=z,this._fetchRequiredDecorators()},dispose(){this._decorators&&this._decorators.length&&(0,y.__)(this._decorators,(z,oe)=>{oe.dispose()})},_fetchRequiredDecorators(){this._decorators=[],(0,y.__)(s,(z,oe)=>{if(oe.enabled.call(this._list)){const ee=oe.decoratorType.call(this._list),he=oe.decoratorSubType.call(this._list),de=this._createDecorator(ee,he);this._decorators.push(de)}})},_createDecorator(z,oe){return new(this._findDecorator(z,oe))(this._list)},_findDecorator(z,oe){var ae;const ee=null===(ae=c.u[z])||void 0===ae?void 0:ae[oe];if(!ee)throw d.A.Error("E1012",z,oe);return ee},modifyItemElement(z){const oe=(0,W.A)(z.itemElement),ae={$itemElement:oe};this._prependBeforeBags(oe,ae),this._appendAfterBags(oe,ae),this._applyDecorators("modifyElement",ae)},afterItemsRendered(){this._applyDecorators("afterRender")},_prependBeforeBags(z,oe){const ae=this._collectDecoratorsMarkup("beforeBag",oe,"dx-list-item-before-bag");z.prepend(ae)},_appendAfterBags(z,oe){const ae=this._collectDecoratorsMarkup("afterBag",oe,"dx-list-item-after-bag");z.append(ae)},_collectDecoratorsMarkup(z,oe,ae){const ee=(0,W.A)("<div>");return(0,y.__)(this._decorators,function(){const he=(0,W.A)("<div>").addClass(ae);this[z]((0,o.X)({$container:he},oe)),he.children().length&&ee.append(he)}),ee.children()},_applyDecorators(z,oe){(0,y.__)(this._decorators,function(){this[z](oe)})},_handlerExists(z){if(!this._decorators)return!1;const oe=this._decorators,{length:ae}=oe;for(let ee=0;ee<ae;ee++)if(oe[ee][z]!==T.lQ)return!0;return!1},_eventHandler(z,oe,ae){if(!this._decorators)return!1;let ee=!1;const he=this._decorators,{length:de}=he;for(let ue=0;ue<de&&(ee=he[ue][z](oe,ae),!ee);ue++);return ee},handleClick(z,oe){return this._eventHandler("handleClick",z,oe)},handleKeyboardEvents(z,oe){return this._eventHandler("handleKeyboardEvents",z,oe)},handleEnterPressing(z){return this._eventHandler("handleEnterPressing",z)},contextMenuHandlerExists(){return this._handlerExists("handleContextMenu")},handleContextMenu(z,oe){return this._eventHandler("handleContextMenu",z,oe)},getExcludedItemSelectors(){const z=[];return this._applyDecorators("getExcludedSelectors",z),z.join(",")}});var L=M(1830),N=M(1541),G=M(1435),k=M(1694);const ie=function(z){return(z.group<<20)+z.item},re=function(z){return{group:z>>20,item:1048575&z}},Y=k.A.inherit({_groupElements(){return this._collectionWidget._itemContainer().find(".dx-list-group")},_groupItemElements:z=>z.find(".dx-list-item"),getIndexByItemData(z){const oe=this._collectionWidget.option("items");let ae=!1;return!!z&&(z.items&&z.items.length&&(z=z.items[0]),(0,y.__)(oe,(ee,he)=>{if(!he.items||((0,y.__)(he.items,(de,ue)=>ue!==z||(ae={group:ee,item:de},!1)),ae))return!1}),ae)},getItemDataByIndex(z){const oe=this._collectionWidget.option("items");return(0,L.kf)(z)?this.itemsGetter()[z]:z&&oe[z.group]&&oe[z.group].items[z.item]||null},itemsGetter(){let z=[];const oe=this._collectionWidget.option("items");for(let ae=0;ae<oe.length;ae++)oe[ae]&&oe[ae].items?z=z.concat(oe[ae].items):z.push(oe[ae]);return z},deleteItemAtIndex(z){const oe=re(z);this._collectionWidget.option("items")[oe.group].items.splice(oe.item,1)},getKeysByItems(z){let ae,oe=[];for(ae=0;ae<z.length;ae++)z[ae]&&z[ae].items?oe=oe.concat(z[ae].items):oe.push(z[ae]);const ee=[];for(ae=0;ae<oe.length;ae++)ee.push(this._collectionWidget.keyOf(oe[ae]));return ee},getIndexByKey(z,oe){const ae=oe||this._collectionWidget.option("items");let ee=-1;const he=this;return(0,y.__)(ae,(de,ue)=>{if(ue.items&&((0,y.__)(ue.items,(be,ve)=>{const le=he._collectionWidget.keyOf(ve);if(he._equalKeys(le,z))return ee={group:de,item:be},!1}),-1!==ee))return!1}),ee},_getGroups(z){const ae=this._collectionWidget._dataController.group();return ae?G.A.queryByOptions((0,N.A)(z),{group:ae}).toArray():this._collectionWidget.option("items")},getItemsByKeys(z,oe){const ae=[],ee=this._getGroups(oe),he={},de=ue=>{const be=this.getIndexByKey(ue,ee),ve=be&&ee[be.group];if(ve)return{groupKey:ve.key,item:ve.items[be.item]}};return(0,y.__)(z,(ue,be)=>{const ve=de(be);if(!ve)return;const{groupKey:le}=ve,{item:Ce}=ve;let ye=he[le];ye||(ye={key:le,items:[]},he[le]=ye,ae.push(ye)),ye.items.push(Ce)}),ae},moveItemAtIndexToIndex(z,oe){const ae=this._collectionWidget.option("items"),ee=re(z),he=re(oe),de=ae[ee.group].items,ue=ae[he.group].items,be=de[ee.item];de.splice(ee.item,1),ue.splice(he.item,0,be)},_isItemIndex:z=>z&&(0,L.kf)(z.group)&&(0,L.kf)(z.item),_getNormalizedItemIndex(z){const oe=(0,W.A)(z),ae=oe.closest(".dx-list-group");return ae.length?ie({group:this._groupElements().index(ae),item:this._groupItemElements(ae).index(oe)}):-1},_normalizeItemIndex:z=>ie(z),_denormalizeItemIndex:z=>re(z),_getItemByNormalizedIndex(z){const oe=re(z),ae=this._groupElements().eq(oe.group);return this._groupItemElements(ae).eq(oe.item)},_itemsFromSameParent:(z,oe)=>re(z).group===re(oe).group}),pe=f.i.inherit({_supportedKeys(){const z=this,oe=this.callBase(),ae=(ee,he)=>{const de=this._editStrategy,ue=this.option("focusedElement"),be=de.getNormalizedIndex(ue);if(be!==this._getLastItemIndex()||!this._dataController.isLoading())if(ee.shiftKey&&z.option("itemDragging.allowReordering")){const Ce=de.getItemElement(be+(he?-1:1));this.reorderItem(ue,Ce),this.scrollToItem(ue),ee.preventDefault()}else this._editProvider.handleKeyboardEvents(be,he)||(he?oe.upArrow(ee):oe.downArrow(ee))};return(0,o.X)({},oe,{del:ee=>{z.option("allowItemDeleting")&&(ee.preventDefault(),z.deleteItem(z.option("focusedElement")))},upArrow:ee=>ae(ee,!0),downArrow:ee=>ae(ee),enter:function(ee){this._editProvider.handleEnterPressing(ee)||oe.enter.apply(this,arguments)},space:function(ee){this._editProvider.handleEnterPressing(ee)||oe.space.apply(this,arguments)}})},_updateSelection(){this._editProvider.afterItemsRendered(),this.callBase()},_getLastItemIndex(){return this._itemElements().length-1},_refreshItemElements(){this.callBase();const z=this._editProvider.getExcludedItemSelectors();z.length&&(this._itemElementsCache=this._itemElementsCache.not(z))},_isItemStrictEquals(z,oe){const ae=z&&z.__dx_key__;return!(ae&&!this.key()&&this._selection.isItemSelected(ae))&&this.callBase(z,oe)},_getDefaultOptions(){return(0,o.X)(this.callBase(),{showSelectionControls:!1,selectionMode:"none",selectAllMode:"page",onSelectAllValueChanged:null,selectAllText:b.A.format("dxList-selectAll"),menuItems:[],menuMode:"context",allowItemDeleting:!1,itemDeleteMode:"static",itemDragging:{}})},_defaultOptionsRules(){return this.callBase().concat([{device:z=>"ios"===z.platform,options:{menuMode:"slide",itemDeleteMode:"slideItem"}},{device:{platform:"android"},options:{itemDeleteMode:"swipe"}}])},_init(){this.callBase(),this._initEditProvider()},_initDataSource(){this.callBase(),this._isPageSelectAll()||this._dataSource&&this._dataSource.requireTotalCount(!0)},_isPageSelectAll(){return"page"===this.option("selectAllMode")},_initEditProvider(){this._editProvider=new I(this)},_disposeEditProvider(){this._editProvider&&this._editProvider.dispose()},_refreshEditProvider(){this._disposeEditProvider(),this._initEditProvider()},_initEditStrategy(){this.option("grouped")?this._editStrategy=new Y(this):this.callBase()},_initMarkup(){this._refreshEditProvider(),this.callBase()},_renderItems(){this.callBase(...arguments),this._editProvider.afterItemsRendered()},_selectedItemClass:()=>"dx-list-item-selected",_itemResponseWaitClass:()=>"dx-list-item-response-wait",_itemClickHandler(z){const oe=(0,W.A)(z.currentTarget);oe.is(".dx-state-disabled, .dx-state-disabled *")||this._editProvider.handleClick(oe,z)||(this._saveSelectionChangeEvent(z),this.callBase(...arguments))},_shouldFireContextMenuEvent(){return this.callBase(...arguments)||this._editProvider.contextMenuHandlerExists()},_itemHoldHandler(z){const oe=(0,W.A)(z.currentTarget);oe.is(".dx-state-disabled, .dx-state-disabled *")||((0,P.kH)(z)&&this._editProvider.handleContextMenu(oe,z)?z.handledByEditProvider=!0:this.callBase(...arguments))},_getItemContainer(z){if(this.option("grouped")){var oe;const ae=null===(oe=this._editStrategy.getIndexByItemData(z))||void 0===oe?void 0:oe.group;return this._getGroupContainerByIndex(ae)}return this.callBase(z)},_itemContextMenuHandler(z){const oe=(0,W.A)(z.currentTarget);oe.is(".dx-state-disabled, .dx-state-disabled *")||(z.handledByEditProvider||!this._editProvider.handleContextMenu(oe,z)?this.callBase(...arguments):z.preventDefault())},_postprocessRenderItem(z){this.callBase(...arguments),this._editProvider.modifyItemElement(z)},_clean(){this._disposeEditProvider(),this.callBase()},focusListItem(z){const oe=this._editStrategy.getItemElement(z);this.option("focusedElement",oe),this.focus(),this.scrollToItem(this.option("focusedElement"))},_optionChanged(z){switch(z.name){case"selectAllMode":this._initDataSource(),this._dataController.pageIndex(0),this._dataController.load();break;case"grouped":this._clearSelectedItems(),delete this._renderingGroupIndex,this._initEditStrategy(),this.callBase(z);break;case"showSelectionControls":case"menuItems":case"menuMode":case"allowItemDeleting":case"itemDeleteMode":case"itemDragging":case"selectAllText":this._invalidate();break;case"onSelectAllValueChanged":break;default:this.callBase(z)}},selectAll(){return this._selection.selectAll(this._isPageSelectAll())},unselectAll(){return this._selection.deselectAll(this._isPageSelectAll())},isSelectAll(){return this._selection.getSelectAllState(this._isPageSelectAll())},getFlatIndexByItemElement(z){return this._itemElements().index(z)},getItemElementByFlatIndex(z){const oe=this._itemElements();return z<0||z>=oe.length?(0,W.A)():oe.eq(z)},getItemByIndex(z){return this._editStrategy.getItemDataByIndex(z)},deleteItem(z){const oe=this._editStrategy,ae=oe.getNormalizedIndex(z),ee=this.option("focusedElement"),he=this.option("focusStateEnabled"),de=ee?oe.getNormalizedIndex(ee):ae,be=de===this._getLastItemIndex()||ae<de?de-1:de;return this.callBase(z).done(function(){he&&this.focusListItem(be)})}})},1636:(In,Ze,M)=>{"use strict";var W=M(5704),o=M(1363),P=M(8360),b=M(3949),f=M(8073),S=M(5651),T=M(2476),y=M(1605);const d="dx-list-context-menu";(0,y.k)("menu","context",S.A.inherit({_init(){const s=(0,W.A)("<div>").addClass(d);this._list.$element().append(s),this._menu=this._renderOverlay(s)},_renderOverlay(s){return this._list._createComponent(s,b.A,{shading:!1,deferRendering:!0,hideOnParentScroll:!0,hideOnOutsideClick:a=>!(0,W.A)(a.target).closest(`.${d}`).length,animation:{show:{type:"slide",duration:300,from:{height:0,opacity:1},to:{height:function(){return(0,o.P$)(this._$menuList)}.bind(this),opacity:1}},hide:{type:"slide",duration:0,from:{opacity:1},to:{opacity:0}}},_ignoreFunctionValueDeprecation:!0,height:function(){return this._$menuList?(0,o.P$)(this._$menuList):0}.bind(this),width:function(){return(0,o.Ot)(this._list.$element())}.bind(this),onContentReady:this._renderMenuContent.bind(this)})},_renderMenuContent(s){const a=s.component.$content(),u=this._menuItems().slice();this._deleteEnabled()&&u.push({text:P.A.format("dxListEditDecorator-delete"),action:this._deleteItem.bind(this)}),this._$menuList=(0,W.A)("<div>"),this._list._createComponent(this._$menuList,f.i,{items:u,onItemClick:this._menuItemClickHandler.bind(this),height:"auto",integrationOptions:{}}),a.addClass("dx-list-context-menucontent"),a.append(this._$menuList)},_menuItemClickHandler(s){this._menu.hide(),this._fireMenuAction(this._$itemWithMenu,s.itemData.action)},_deleteItem(){this._list.deleteItem(this._$itemWithMenu)},handleContextMenu(s){return this._$itemWithMenu=s,this._menu.option({position:{my:"top",at:"bottom",of:s,collision:"flip"}}),this._menu.show(),!0},dispose(){this._menu&&this._menu.$element().remove(),this.callBase.apply(this,arguments)}}).include(T.A))},4055:(In,Ze,M)=>{"use strict";M(1636);var o=M(2583),P=M(5704),b=M(1363),f=M(8360),S=M(9012),T=M(9212),y=M(4859),d=M(4451),c=M(4072),s=M(9209),a=M(9293),u=M(5651);const{abstract:h}=u.A,g="dxListEditDecorator",_=(0,a.b4)(s.A.down,g),x=(0,a.b4)(d.vu,g),D="dx-list-switchable-delete-ready",N="dx-list-switchable-menu-item-shield-positioning",B=u.A.inherit({_init(){this._$topShield=(0,P.A)("<div>").addClass("dx-list-switchable-delete-top-shield"),this._$bottomShield=(0,P.A)("<div>").addClass("dx-list-switchable-delete-bottom-shield"),this._$itemContentShield=(0,P.A)("<div>").addClass("dx-list-switchable-delete-item-content-shield"),c.A.on(this._$topShield,_,this._cancelDeleteReadyItem.bind(this)),c.A.on(this._$bottomShield,_,this._cancelDeleteReadyItem.bind(this)),this._list.$element().append(this._$topShield.toggle(!1)).append(this._$bottomShield.toggle(!1))},handleClick(){return this._cancelDeleteReadyItem()},_cancelDeleteReadyItem(){return!!this._$readyToDeleteItem&&(this._cancelDelete(this._$readyToDeleteItem),!0)},_cancelDelete(Be){this._toggleDeleteReady(Be,!1)},_toggleDeleteReady(Be,Ue){void 0===Ue&&(Ue=!this._isReadyToDelete(Be)),this._toggleShields(Be,Ue),this._toggleScrolling(Ue),this._cacheReadyToDeleteItem(Be,Ue),this._animateToggleDelete(Be,Ue)},_isReadyToDelete:Be=>Be.hasClass(D),_toggleShields(Be,Ue){this._list.$element().toggleClass("dx-list-switchable-menu-shield-positioning",Ue),this._$topShield.toggle(Ue),this._$bottomShield.toggle(Ue),Ue&&this._updateShieldsHeight(Be),this._toggleContentShield(Be,Ue)},_updateShieldsHeight(Be){const Ue=this._list.$element(),ot=Ue.offset().top,st=(0,b.P$)(Ue),Ye=Be.offset().top-ot,Pe=st-(0,b.P$)(Be)-Ye;(0,b.k$)(this._$topShield,Math.max(Ye,0)),(0,b.k$)(this._$bottomShield,Math.max(Pe,0))},_toggleContentShield(Be,Ue){Ue?Be.find(".dx-list-item-content").first().append(this._$itemContentShield):this._$itemContentShield.detach()},_toggleScrolling(Be){const Ue=this._list.$element().dxScrollView("instance");Be?Ue.on("start",this._cancelScrolling):Ue.off("start",this._cancelScrolling)},_cancelScrolling(Be){Be.event.cancel=!0},_cacheReadyToDeleteItem(Be,Ue){Ue?this._$readyToDeleteItem=Be:delete this._$readyToDeleteItem},_animateToggleDelete(Be,Ue){Ue?(this._enablePositioning(Be),this._prepareDeleteReady(Be),this._animatePrepareDeleteReady(Be),c.A.off(Be,s.A.up)):(this._forgetDeleteReady(Be),this._animateForgetDeleteReady(Be).done(this._disablePositioning.bind(this,Be)))},_enablePositioning(Be){Be.addClass(N),c.A.on(Be,x,y.lQ),c.A.one(Be,s.A.up,this._disablePositioning.bind(this,Be))},_disablePositioning(Be){Be.removeClass(N),c.A.off(Be,x)},_prepareDeleteReady(Be){Be.addClass(D)},_forgetDeleteReady(Be){Be.removeClass(D)},_animatePrepareDeleteReady:h,_animateForgetDeleteReady:h,_getDeleteButtonContainer(Be){return(Be=Be||this._$readyToDeleteItem).children(".dx-list-switchable-delete-button-container")},_deleteItem(Be){this._getDeleteButtonContainer(Be=Be||this._$readyToDeleteItem).detach(),!Be.is(".dx-state-disabled, .dx-state-disabled *")&&this._list.deleteItem(Be).always(this._cancelDelete.bind(this,Be))},_isRtlEnabled(){return this._list.option("rtlEnabled")},dispose(){this._$topShield&&this._$topShield.remove(),this._$bottomShield&&this._$bottomShield.remove(),this.callBase.apply(this,arguments)}});var K=M(1605);const Z=B.inherit({_init(){this.callBase.apply(this,arguments);const Be=(0,P.A)("<div>").addClass("dx-list-switchable-delete-button-container"),Ue=(0,P.A)("<div>").addClass("dx-list-switchable-delete-button-wrapper"),ot=(0,P.A)("<div>").addClass("dx-list-switchable-delete-button-inner-wrapper"),st=(0,P.A)("<div>").addClass("dx-list-switchable-delete-button");this._list._createComponent(st,S.A,{text:f.A.format("dxListEditDecorator-delete"),type:"danger",stylingMode:(0,T.Nt)()?"text":"contained",onClick:function(et){this._deleteItem(),et.event.stopPropagation()}.bind(this),integrationOptions:{},elementAttr:{role:null,"aria-label":null},tabIndex:-1}),Be.append(Ue),Ue.append(ot),ot.append(st),this._$buttonContainer=Be},_enablePositioning(Be){this.callBase.apply(this,arguments),o.A.stop(this._$buttonContainer,!0),this._$buttonContainer.appendTo(Be)},_disablePositioning(){this.callBase.apply(this,arguments),this._$buttonContainer.detach()},_animatePrepareDeleteReady(){const Be=this._isRtlEnabled(),Ue=(0,b.RG)(this._list.$element()),ot=this._buttonWidth();return o.A.animate(this._$buttonContainer,{type:"custom",duration:200,from:{right:Be?Ue:-ot},to:{right:Be?Ue-ot:0}})},_animateForgetDeleteReady(){const Be=this._isRtlEnabled(),Ue=(0,b.RG)(this._list.$element()),ot=this._buttonWidth();return o.A.animate(this._$buttonContainer,{type:"custom",duration:200,from:{right:Be?Ue-ot:0},to:{right:Be?Ue:-ot}})},_buttonWidth(){return this._buttonContainerWidth||(this._buttonContainerWidth=(0,b.Ot)(this._$buttonContainer)),this._buttonContainerWidth},dispose(){this._$buttonContainer&&this._$buttonContainer.remove(),this.callBase.apply(this,arguments)}});(0,K.k)("delete","toggle",Z.inherit({beforeBag(Be){const{$itemElement:Ue}=Be,{$container:ot}=Be,st=(0,P.A)("<div>").addClass("dx-list-toggle-delete-switch");this._list._createComponent(st,S.A,{icon:"toggle-delete",onClick:function(et){o.A.stop(this._$buttonContainer,!1),this._toggleDeleteReady(Ue),et.event.stopPropagation()}.bind(this),integrationOptions:{},elementAttr:{role:null,"aria-label":null},tabIndex:-1}),ot.addClass("dx-list-toggle-delete-switch-container"),ot.append(st)}})),(0,K.k)("delete","slideButton",Z.inherit({_shouldHandleSwipe:!0,_swipeEndHandler(Be,Ue){return 0!==Ue.targetOffset&&(o.A.stop(this._$buttonContainer,!1),this._toggleDeleteReady(Be)),!0}}));var z=M(4504),oe=M(778),ae=M(6362),ee=M(2476);const he="dxListEditDecorator",de=(0,a.b4)(oe.U,he),ue=(0,a.b4)(d.vu,he),le="dx-list-slide-menu-content",ge="dx-list-slide-menu-button";(0,K.k)("menu","slide",B.inherit({_shouldHandleSwipe:!0,_init(){this.callBase.apply(this,arguments),this._$buttonsContainer=(0,P.A)("<div>").addClass("dx-list-slide-menu-buttons-container"),c.A.on(this._$buttonsContainer,ue,y.lQ),this._$buttons=(0,P.A)("<div>").addClass("dx-list-slide-menu-buttons").appendTo(this._$buttonsContainer),this._renderMenu(),this._renderDeleteButton()},_renderMenu(){if(!this._menuEnabled())return;const Be=this._menuItems();if(1===Be.length){const Ue=Be[0];this._renderMenuButton(Ue.text,ot=>{ot.stopPropagation(),this._fireAction(Ue)})}else{const Ue=(0,P.A)("<div>").addClass("dx-list-slide-menu");this._menu=this._list._createComponent(Ue,ae.A,{showTitle:!1,items:Be,onItemClick:function(st){this._fireAction(st.itemData)}.bind(this),integrationOptions:{}}),Ue.appendTo(this._list.$element());const ot=this._renderMenuButton(f.A.format("dxListEditDecorator-more"),st=>{st.stopPropagation(),this._menu.show()});this._menu.option("target",ot)}},_renderMenuButton(Be,Ue){const ot=(0,P.A)("<div>").addClass(ge).addClass("dx-list-slide-menu-button-menu").text(Be);return this._$buttons.append(ot),c.A.on(ot,de,Ue),ot},_renderDeleteButton(){if(!this._deleteEnabled())return;const Be=(0,P.A)("<div>").addClass(ge).addClass("dx-list-slide-menu-button-delete").text((0,T.Nt)()?"":f.A.format("dxListEditDecorator-delete"));c.A.on(Be,de,Ue=>{Ue.stopPropagation(),this._deleteItem()}),this._$buttons.append(Be)},_fireAction(Be){this._fireMenuAction((0,P.A)(this._cachedNode),Be.action),this._cancelDeleteReadyItem()},modifyElement(Be){this.callBase.apply(this,arguments);const{$itemElement:Ue}=Be;Ue.addClass("dx-list-slide-menu-wrapper");const ot=(0,P.A)("<div>").addClass(le);Ue.wrapInner(ot)},_getDeleteButtonContainer(){return this._$buttonsContainer},handleClick(Be,Ue){return!!(0,P.A)(Ue.target).closest(`.${le}`).length&&this.callBase.apply(this,arguments)},_swipeStartHandler(Be){this._enablePositioning(Be),this._cacheItemData(Be),this._setPositions(this._getPositions(0))},_swipeUpdateHandler(Be,Ue){const st=this._isRtlEnabled()?-1:1,et=this._isReadyToDelete(Be);if(this._getCurrentPositions().content===this._getStartPositions().content&&!et&&Ue.offset*st>0)return void(Ue.cancel=!0);const Ye=this._cachedItemWidth*Ue.offset,Pe=et?-this._cachedButtonWidth*st:0,Re=(Ye+Pe)*st<0?Math.abs((Ye+Pe)/this._cachedButtonWidth):0;return this._setPositions(this._getPositions(Re)),!0},_getStartPositions(){const Be=this._isRtlEnabled();return{content:0,buttonsContainer:Be?-this._cachedButtonWidth:this._cachedItemWidth,buttons:-this._cachedButtonWidth*(Be?-1:1)}},_getPositions(Be){const ot=this._isRtlEnabled()?-1:1,st=this._getStartPositions();return{content:st.content-Be*this._cachedButtonWidth*ot,buttonsContainer:st.buttonsContainer-Math.min(Be,1)*this._cachedButtonWidth*ot,buttons:st.buttons+Math.min(Be,1)*this._cachedButtonWidth*ot}},_getCurrentPositions(){return{content:(0,z.x5)(this._$cachedContent).left,buttonsContainer:(0,z.x5)(this._$buttonsContainer).left,buttons:(0,z.x5)(this._$buttons).left}},_setPositions(Be){(0,z.Cy)(this._$cachedContent,{left:Be.content}),(0,z.Cy)(this._$buttonsContainer,{left:Be.buttonsContainer}),(0,z.Cy)(this._$buttons,{left:Be.buttons})},_cacheItemData(Be){Be[0]!==this._cachedNode&&(this._$cachedContent=Be.find(`.${le}`),this._cachedItemWidth=(0,b.Ot)(Be),this._cachedButtonWidth=this._cachedButtonWidth||(0,b.Ot)(this._$buttons),(0,b.zj)(this._$buttonsContainer,this._cachedButtonWidth),this._$cachedContent.length&&(this._cachedNode=Be[0]))},_minButtonContainerLeftOffset(){return this._cachedItemWidth-this._cachedButtonWidth},_swipeEndHandler(Be,Ue){this._cacheItemData(Be);const ot=this._isRtlEnabled()?1:-1,st=this._cachedItemWidth*Ue.offset,et=!this._isReadyToDelete(Be)&&st*ot>.2*this._cachedButtonWidth;return this._toggleDeleteReady(Be,Ue.targetOffset===ot&&et),!0},_enablePositioning(Be){o.A.stop(this._$cachedContent,!0),this.callBase.apply(this,arguments),this._$buttonsContainer.appendTo(Be)},_disablePositioning(){this.callBase.apply(this,arguments),this._$buttonsContainer.detach()},_animatePrepareDeleteReady(){return this._animateToPositions(this._getPositions(1))},_animateForgetDeleteReady(Be){return this._cacheItemData(Be),this._animateToPositions(this._getPositions(0))},_animateToPositions(Be){const Ue=this,ot=this._getCurrentPositions(),st=Math.min(Math.abs(ot.content-Be.content)/this._cachedButtonWidth,1);return o.A.animate(this._$cachedContent,{from:ot,to:Be,easing:"cubic-bezier(0.075, 0.82, 0.165, 1)",duration:400*st,strategy:"frame",draw(et){Ue._setPositions(et)}})},dispose(){this._menu&&this._menu.$element().remove(),this._$buttonsContainer&&this._$buttonsContainer.remove(),this.callBase.apply(this,arguments)}}).include(ee.A)),(0,K.k)("delete","static",u.A.inherit({afterBag(Be){const{$itemElement:Ue}=Be,{$container:ot}=Be,st=(0,P.A)("<div>").addClass("dx-list-static-delete-button");this._list._createComponent(st,S.A,{icon:"remove",onClick:function(et){et.event.stopPropagation(),this._deleteItem(Ue)}.bind(this),integrationOptions:{},elementAttr:{role:null,"aria-label":null},tabIndex:-1}),ot.addClass("dx-list-static-delete-button-container").append(st)},_deleteItem(Be){Be.is(".dx-state-disabled, .dx-state-disabled *")||this._list.deleteItem(Be)}}));var $e=M(6021);(0,K.k)("delete","swipe",u.A.inherit({_shouldHandleSwipe:!0,_renderItemPosition(Be,Ue,ot){const st=(0,$e.cY)(),et=Ue*this._itemElementWidth;return ot?o.A.animate(Be,{to:{left:et},type:"slide",complete(){st.resolve(Be,Ue)}}):((0,z.Cy)(Be,{left:et}),st.resolve()),st.promise()},_swipeStartHandler(Be){return this._itemElementWidth=(0,b.RG)(Be),!0},_swipeUpdateHandler(Be,Ue){return this._renderItemPosition(Be,Ue.offset),!0},_swipeEndHandler(Be,Ue){return this._renderItemPosition(Be,Ue.targetOffset,!0).done((st,et)=>{Math.abs(et)&&this._list.deleteItem(st).fail(()=>{this._renderItemPosition(st,0,!0)})}),!0}}))},6998:(In,Ze,M)=>{"use strict";var W=M(8910);M(6853).A.setEditorClass(W.A)},5470:(In,Ze,M)=>{"use strict";var W=M(5704),o=M(3090),P=M(778),b=M(4072),f=M(9293),S=M(8360),T=M(3480),y=M(1973),d=M(5973);const _=M(6620).A.inherit({_supportedKeys(){return(0,o.X)(this.callBase(),{space:function(q){q.preventDefault(),this._clickAction({event:q})}})},_getDefaultOptions(){return(0,o.X)(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,value:!1})},_canValueBeChangedByClick:()=>!0,_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===d.A.real().deviceType&&!d.A.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this.$element().addClass("dx-radiobutton")},_initMarkup(){this.callBase(),this._renderIcon(),this._renderCheckedState(this.option("value")),this._renderClick(),this.setAria("role","radio")},_renderIcon(){this._$icon=(0,W.A)("<div>").addClass("dx-radiobutton-icon"),(0,W.A)("<div>").addClass("dx-radiobutton-icon-dot").appendTo(this._$icon),this.$element().append(this._$icon)},_renderCheckedState(q){this.$element().toggleClass("dx-radiobutton-checked",q).find(".dx-radiobutton-icon").toggleClass("dx-radiobutton-icon-checked",q),this.setAria("checked",q)},_renderClick(){const q=(0,f.b4)(P.U,this.NAME);this._clickAction=this._createAction(Y=>{this._clickHandler(Y.event)}),b.A.off(this.$element(),q),b.A.on(this.$element(),q,Y=>{this._clickAction({event:Y})})},_clickHandler(q){this._saveValueChangeEvent(q),this.option("value",!0)},_optionChanged(q){"value"===q.name?(this._renderCheckedState(q.value),this.callBase(q)):this.callBase(q)}});(0,y.A)("dxRadioButton",_);const w=_;var D=M(127),C=M(5651),I=M(1605);const L="dx-list-select-decorator-enabled",re=(0,f.b4)(P.U,"dxListEditDecorator");(0,I.k)("selection","default",C.A.inherit({_init(){this.callBase.apply(this,arguments);const q=this._list.option("selectionMode");this._singleStrategy="single"===q,this._containerClass=this._singleStrategy?"dx-list-select-radiobutton-container":"dx-list-select-checkbox-container",this._controlClass=this._singleStrategy?"dx-list-select-radiobutton":"dx-list-select-checkbox",this._controlWidget=this._singleStrategy?w:T.A,this._list.$element().addClass(L)},beforeBag(q){const{$itemElement:Y}=q,Z=q.$container.addClass(this._containerClass),Q=(0,W.A)("<div>").addClass(this._controlClass).appendTo(Z);new this._controlWidget(Q,(0,o.X)(this._commonOptions(),{value:this._isSelected(Y),elementAttr:{"aria-label":"Check State"},focusStateEnabled:!1,hoverStateEnabled:!1,onValueChanged:function(te){te.event&&this._list._saveSelectionChangeEvent(te.event),this._processCheckedState(Y,te.value),te.event&&te.event.stopPropagation()}.bind(this)}))},modifyElement(q){this.callBase.apply(this,arguments);const{$itemElement:Y}=q,Z=this._controlWidget.getInstance(Y.find(`.${this._controlClass}`));b.A.on(Y,"stateChanged",(Q,te)=>{Z.option("value",te)})},_updateSelectAllState(){this._$selectAll&&this._selectAllCheckBox.option("value",this._list.isSelectAll())},afterRender(){"all"===this._list.option("selectionMode")&&(this._$selectAll?this._updateSelectAllState():this._renderSelectAll())},handleKeyboardEvents(q,Y){const Z=!Y,Q=this._list,te=this._$selectAll,pe=Q._getLastItemIndex();return!(!te||!(Y&&0===q||Z&&q===pe)||(Q.option("focusedElement",te),Q.scrollToItem(Q.option("focusedElement")),0))},handleEnterPressing(q){if(this._$selectAll&&this._$selectAll.hasClass("dx-state-focused"))return q.target=this._$selectAll.get(0),this._list._saveSelectionChangeEvent(q),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value")),!0},_renderSelectAll(){this._$selectAll=(0,W.A)("<div>").addClass("dx-list-select-all");const q=this._list._supportedKeys().downArrow.bind(this._list),Y=(0,W.A)("<div>").addClass("dx-list-select-all-checkbox").appendTo(this._$selectAll);this._selectAllCheckBox=this._list._createComponent(Y,T.A,{elementAttr:{"aria-label":S.A.format("dxList-selectAll")},focusStateEnabled:!1,hoverStateEnabled:!1}),this._selectAllCheckBox.registerKeyHandler("downArrow",q),(0,W.A)("<div>").addClass("dx-list-select-all-label").text(this._list.option("selectAllText")).appendTo(this._$selectAll),this._list.itemsContainer().prepend(this._$selectAll),this._updateSelectAllState(),this._updateSelectAllAriaLabel(),this._attachSelectAllHandler()},_attachSelectAllHandler(){this._selectAllCheckBox.option("onValueChanged",this._selectAllHandler.bind(this)),b.A.off(this._$selectAll,re),b.A.on(this._$selectAll,re,this._selectAllClickHandler.bind(this))},_updateSelectAllAriaLabel(){if(!this._$selectAll)return;const{value:q}=this._selectAllCheckBox.option(),Z=void 0===q?"half checked":q?"checked":"not checked",Q=`${S.A.format("dxList-selectAll")}, ${Z}`;this._$selectAll.attr({"aria-label":Q})},_selectAllHandler(q){q.event&&q.event.stopPropagation(),q.event&&this._list._saveSelectionChangeEvent(q.event);const{value:Y}=this._selectAllCheckBox.option();Y?this._selectAllItems():!1===Y&&this._unselectAllItems(),this._updateSelectAllAriaLabel(),this._list._createActionByOption("onSelectAllValueChanged")({value:Y})},_checkSelectAllCapability(){const q=this._list,Y=q._dataController;return!("allPages"===q.option("selectAllMode")&&q.option("grouped")&&!Y.group()&&(D.A.log("W1010"),1))},_selectAllItems(){this._checkSelectAllCapability()&&this._list._selection.selectAll("page"===this._list.option("selectAllMode"))},_unselectAllItems(){this._checkSelectAllCapability()&&this._list._selection.deselectAll("page"===this._list.option("selectAllMode"))},_selectAllClickHandler(q){this._list._saveSelectionChangeEvent(q),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value"))},_isSelected(q){return this._list.isItemSelected(q)},_processCheckedState(q,Y){Y?this._list.selectItem(q):this._list.unselectItem(q)},dispose(){this._disposeSelectAll(),this._list.$element().removeClass(L),this.callBase.apply(this,arguments)},_disposeSelectAll(){this._$selectAll&&(this._$selectAll.remove(),this._$selectAll=null)}}))},2806:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>c});var W=M(1973),o=M(2925),P=M(5704),b=M(3090),f=M(1830);const d=M(3608).A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{toolbarItems:[],showCloseButton:!1,enableBodyScroll:!0,showTitle:!1,title:null,titleTemplate:null,onTitleRendered:null,bottomTemplate:null,preventScrollEvents:!1,propagateOutsideClick:!0})},_render(){this.$element().addClass("dx-tooltip"),this.$wrapper().addClass("dx-tooltip-wrapper"),this.callBase()},_renderContent(){this.callBase(),this._toggleAriaAttributes()},_toggleAriaDescription(s){const a=(0,P.A)(this.option("target")),u=s?this._contentId:void 0;(0,f.l6)(a.get(0))||this.setAria("describedby",u,a)},_toggleAriaAttributes(){this._contentId=`dx-${new o.A}`,this.$overlayContent().attr({id:this._contentId}),this._toggleAriaDescription(!0)}});(0,W.A)("dxTooltip",d);const c=d},612:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>a});var W=M(2583),o=M(1973),P=M(5704),b=M(3090),f=M(6110);const s=M(6620).A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{min:0,max:100,value:0})},_initMarkup(){this.$element().addClass("dx-trackbar"),this._renderWrapper(),this._renderContainer(),this._renderRange(),this._renderValue(),this._setRangeStyles(),this.callBase()},_render(){this.callBase(),this._setRangeStyles(this._rangeStylesConfig())},_renderWrapper(){this._$wrapper=(0,P.A)("<div>").addClass("dx-trackbar-wrapper").appendTo(this.$element())},_renderContainer(){this._$bar=(0,P.A)("<div>").addClass("dx-trackbar-container").appendTo(this._$wrapper)},_renderRange(){this._$range=(0,P.A)("<div>").addClass("dx-trackbar-range").appendTo(this._$bar)},_renderValue(){const u=this.option("value"),h=this.option("min"),g=this.option("max");if(h>g)return;if(u<h)return this.option("value",h),void(this._currentRatio=0);if(u>g)return this.option("value",g),void(this._currentRatio=1);const _=h===g?0:(u-h)/(g-h);!this._needPreventAnimation&&this._setRangeStyles({width:100*_+"%"}),this.setAria({valuemin:this.option("min"),valuemax:g,valuenow:u}),this._currentRatio=_},_rangeStylesConfig(){return{width:100*this._currentRatio+"%"}},_setRangeStyles(u){W.A.stop(this._$range),u?this._needPreventAnimation||!(0,f.Vd)()||W.A.animate(this._$range,{type:"custom",duration:100,to:u}):this._$range.css({width:0})},_optionChanged(u){switch(u.name){case"value":this._renderValue(),this.callBase(u);break;case"max":case"min":this._renderValue();break;default:this.callBase(u)}},_dispose(){W.A.stop(this._$range),this.callBase()}});(0,o.A)("dxTrackBar",s);const a=s},5811:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>U});var W=M(3538),o=M(7251),P=M(6101),b=M(4859),f=M(6021),S=M(3090),T=M(2660),y=M(1830),d=M(8360),c=M(1520);const s=/^[\d\w.+_-]+@[\d\w._-]+\.[\w]+$/i;class u{constructor(){this.NAME="base"}defaultMessage(K){return d.A.getFormatter(`validation-${this.NAME}`)(K)}defaultFormattedMessage(K){return d.A.getFormatter(`validation-${this.NAME}-formatted`)(K)}_isValueEmpty(K){return!N.required.validate(K,{})}validate(K,J){const ie=Array.isArray(K)?K:[K];let re=!0;return ie.length?ie.every(q=>(re=this._validate(q,J),re)):re=this._validate(null,J),re}}class w extends u{constructor(){super(),this.NAME="custom"}validate(K,J){if(J.ignoreEmptyValue&&this._isValueEmpty(K))return!0;const{validator:ie}=J,re=ie&&(0,y.Tn)(ie.option)&&ie.option("dataGetter"),q=(0,y.Tn)(re)&&re(),Y={value:K,validator:ie,rule:J};return q&&(0,S.X)(Y,q),J.validationCallback(Y)}}const N={required:new class h extends u{constructor(){super(),this.NAME="required"}_validate(K,J){return!(!(0,y.O9)(K)||!1===K)&&(K=String(K),(J.trim||!(0,y.O9)(J.trim))&&(K=K.trim()),""!==K)}},numeric:new class g extends u{constructor(){super(),this.NAME="numeric"}_validate(K,J){return!(!1===J.ignoreEmptyValue||!this._isValueEmpty(K))||(J.useCultureSettings&&(0,y.Kg)(K)?!isNaN(c.A.parse(K)):(0,y.kf)(K))}},range:new class _ extends u{constructor(){super(),this.NAME="range"}_validate(K,J){if(!1!==J.ignoreEmptyValue&&this._isValueEmpty(K))return!0;const ie=N.numeric.validate(K,J),re=(0,y.O9)(K)&&""!==K,q=ie?parseFloat(K):re&&K.valueOf(),{min:Y}=J,{max:Z}=J;if(!ie&&!(0,y.$P)(K)&&!re)return!1;if((0,y.O9)(Y))return(0,y.O9)(Z)?q>=Y&&q<=Z:q>=Y;if((0,y.O9)(Z))return q<=Z;throw o.A.Error("E0101")}},stringLength:new class x extends u{constructor(){super(),this.NAME="stringLength"}_validate(K,J){return K=String(K??""),(J.trim||!(0,y.O9)(J.trim))&&(K=K.trim()),!(!J.ignoreEmptyValue||!this._isValueEmpty(K))||N.range.validate(K.length,(0,S.X)({},J))}},custom:new w,async:new class D extends w{constructor(){super(),this.NAME="async"}validate(K,J){if((0,y.O9)(J.reevaluate)||(0,S.X)(J,{reevaluate:!0}),J.ignoreEmptyValue&&this._isValueEmpty(K))return!0;const{validator:ie}=J,re=ie&&(0,y.Tn)(ie.option)&&ie.option("dataGetter"),q=(0,y.Tn)(re)&&re(),Y={value:K,validator:ie,rule:J};q&&(0,S.X)(Y,q);const Z=J.validationCallback(Y);if(!(0,y.yL)(Z))throw o.A.Error("E0103");return this._getWrappedPromise((0,f.Sx)(Z).promise())}_getWrappedPromise(K){const J=(0,f.cY)();return K.then(ie=>{J.resolve(ie)},ie=>{const re={isValid:!1};(0,y.O9)(ie)&&((0,y.Kg)(ie)?re.message=ie:(0,y.Gv)(ie)&&(0,y.O9)(ie.message)&&(0,y.Kg)(ie.message)&&(re.message=ie.message)),J.resolve(re)}),J.promise()}},compare:new class C extends u{constructor(){super(),this.NAME="compare"}_validate(K,J){if(!J.comparisonTarget)throw o.A.Error("E0102");if(J.ignoreEmptyValue&&this._isValueEmpty(K))return!0;(0,S.X)(J,{reevaluate:!0});const ie=J.comparisonTarget();switch(J.comparisonType||"=="){case"==":return K==ie;case"!=":return K!=ie;case"===":return K===ie;case"!==":return K!==ie;case">":return K>ie;case">=":return K>=ie;case"<":return K<ie;case"<=":return K<=ie}}},pattern:new class I extends u{constructor(){super(),this.NAME="pattern"}_validate(K,J){if(!1!==J.ignoreEmptyValue&&this._isValueEmpty(K))return!0;let{pattern:ie}=J;return(0,y.Kg)(ie)&&(ie=new RegExp(ie)),ie.test(K)}},email:new class L extends u{constructor(){super(),this.NAME="email"}_validate(K,J){return!(!1===J.ignoreEmptyValue||!this._isValueEmpty(K))||N.pattern.validate(K,(0,S.X)({},J,{pattern:s}))}}},G=W.A.inherit({ctor(B,K){this.group=B,this.validators=[],this._isRemovable=K,this._pendingValidators=[],this._onValidatorStatusChanged=this._onValidatorStatusChanged.bind(this),this._resetValidationInfo(),this._eventsStrategy=new P.h(this)},validate(){const B={isValid:!0,brokenRules:[],validators:[],status:"valid",complete:null};return this._unsubscribeFromAllChangeEvents(),this._pendingValidators=[],this._resetValidationInfo(),(0,T.__)(this.validators,(K,J)=>{const ie=J.validate();B.isValid=B.isValid&&ie.isValid,ie.brokenRules&&(B.brokenRules=B.brokenRules.concat(ie.brokenRules)),B.validators.push(J),"pending"===ie.status&&this._addPendingValidator(J),this._subscribeToChangeEvents(J)}),this._pendingValidators.length?B.status="pending":(B.status=B.isValid?"valid":"invalid",this._unsubscribeFromAllChangeEvents(),this._raiseValidatedEvent(B)),this._updateValidationInfo(B),(0,S.X)({},this._validationInfo.result)},_subscribeToChangeEvents(B){B.on("validating",this._onValidatorStatusChanged),B.on("validated",this._onValidatorStatusChanged)},_unsubscribeFromChangeEvents(B){B.off("validating",this._onValidatorStatusChanged),B.off("validated",this._onValidatorStatusChanged)},_unsubscribeFromAllChangeEvents(){(0,T.__)(this.validators,(B,K)=>{this._unsubscribeFromChangeEvents(K)})},_updateValidationInfo(B){this._validationInfo.result=B,"pending"===B.status&&(this._validationInfo.deferred||(this._validationInfo.deferred=(0,f.cY)(),this._validationInfo.result.complete=this._validationInfo.deferred.promise()))},_addPendingValidator(B){(0,b.VM)(this._pendingValidators,J=>J===B)[0]||this._pendingValidators.push(B)},_removePendingValidator(B){const K=this._pendingValidators.indexOf(B);K>=0&&this._pendingValidators.splice(K,1)},_orderBrokenRules(B){let K=[];return(0,T.__)(this.validators,(J,ie)=>{const re=(0,b.VM)(B,q=>q.validator===ie);re.length&&(K=K.concat(re))}),K},_updateBrokenRules(B){if(!this._validationInfo.result)return;let{brokenRules:K}=this._validationInfo.result;const J=(0,b.VM)(K,ie=>ie.validator!==B.validator);B.brokenRules&&(K=J.concat(B.brokenRules)),this._validationInfo.result.brokenRules=this._orderBrokenRules(K)},_onValidatorStatusChanged(B){"pending"!==B.status?this._resolveIfComplete(B):this._addPendingValidator(B.validator)},_resolveIfComplete(B){if(this._removePendingValidator(B.validator),this._updateBrokenRules(B),!this._pendingValidators.length){if(this._unsubscribeFromAllChangeEvents(),!this._validationInfo.result)return;this._validationInfo.result.status=0===this._validationInfo.result.brokenRules.length?"valid":"invalid",this._validationInfo.result.isValid="valid"===this._validationInfo.result.status;const K=(0,S.X)({},this._validationInfo.result,{complete:null}),{deferred:J}=this._validationInfo;this._validationInfo.deferred=null,this._raiseValidatedEvent(K),J&&setTimeout(()=>{J.resolve(K)})}},_raiseValidatedEvent(B){this._eventsStrategy.fireEvent("validated",[B])},_resetValidationInfo(){this._validationInfo={result:null,deferred:null}},_synchronizeValidationInfo(){this._validationInfo.result&&(this._validationInfo.result.validators=this.validators)},removeRegisteredValidator(B){const K=this.validators.indexOf(B);K>-1&&(this.validators.splice(K,1),this._synchronizeValidationInfo(),this._resolveIfComplete({validator:B}))},registerValidator(B){this.validators.includes(B)||(this.validators.push(B),this._synchronizeValidationInfo())},reset(){(0,T.__)(this.validators,(B,K)=>{K.reset()}),this._pendingValidators=[],this._resetValidationInfo()},on(B,K){return this._eventsStrategy.on(B,K),this},off(B,K){return this._eventsStrategy.off(B,K),this}}),k={groups:[],getGroupConfig(B){const K=(0,b.VM)(this.groups,J=>J.group===B);if(K.length)return K[0]},findGroup(B,K){var J;const re=(null===(J=B.data())||void 0===J||null===(J=J.dxComponents)||void 0===J?void 0:J.includes("dxValidationGroup"))&&B.dxValidationGroup("instance");if(re)return re;const q=B.parents(".dx-validationgroup").first();return q.length?q.dxValidationGroup("instance"):K},initGroups(){this.groups=[],this.addGroup(void 0,!1)},addGroup(B){let K=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],J=this.getGroupConfig(B);return J||(J=new G(B,K),this.groups.push(J)),J},removeGroup(B){const K=this.getGroupConfig(B),J=this.groups.indexOf(K);return J>-1&&this.groups.splice(J,1),K},_setDefaultMessage(B){const{rule:K,validator:J,name:ie}=B;(0,y.O9)(K.message)||(K.message=J.defaultFormattedMessage&&(0,y.O9)(ie)?J.defaultFormattedMessage(ie):J.defaultMessage())},_addBrokenRule(B){const{result:K,rule:J}=B;K.brokenRule||(K.brokenRule=J),K.brokenRules||(K.brokenRules=[]),K.brokenRules.push(J)},validate(B,K,J){var ie;let re={name:J,value:B,brokenRule:null,brokenRules:null,isValid:!0,validationRules:K,pendingRules:null,status:"valid",complete:null};const q=null==K||null===(ie=K[0])||void 0===ie?void 0:ie.validator,Y=[];return(0,T.__)(K||[],(Z,Q)=>{const te=N[Q.type];let pe;if(!te)throw o.A.Error("E0100");return(0,y.O9)(Q.isValid)&&Q.value===B&&!Q.reevaluate?!!Q.isValid||(re.isValid=!1,this._addBrokenRule({result:re,rule:Q}),!1):(Q.value=B,"async"===Q.type?(Y.push({rule:Q,ruleValidator:te}),!0):(pe=te.validate(B,Q),Q.isValid=pe,pe||(re.isValid=!1,this._setDefaultMessage({rule:Q,validator:te,name:J}),this._addBrokenRule({result:re,rule:Q})),!!Q.isValid&&void 0))}),re.isValid&&!re.brokenRules&&Y.length&&(re=this._validateAsyncRules({value:B,items:Y,result:re,name:J})),this._synchronizeGroupValidationInfo(q,re),re.status=re.pendingRules?"pending":re.isValid?"valid":"invalid",re},_synchronizeGroupValidationInfo(B,K){if(!B)return;const J=k.getGroupConfig(B._validationGroup);J._updateBrokenRules.call(J,{validator:B,brokenRules:K.brokenRules??[]})},_validateAsyncRules(B){let{result:K,value:J,items:ie,name:re}=B;const q=[];return(0,T.__)(ie,(Y,Z)=>{const Q=Z.ruleValidator.validate(J,Z.rule);if((0,y.yL)(Q)){K.pendingRules||(K.pendingRules=[]),K.pendingRules.push(Z.rule);const te=Q.then(pe=>{const z=this._getPatchedRuleResult(pe);return this._updateRuleConfig({rule:Z.rule,ruleResult:z,validator:Z.ruleValidator,name:re}),z});q.push(te)}else this._updateRuleConfig({rule:Z.rule,ruleResult:this._getPatchedRuleResult(Q),validator:Z.ruleValidator,name:re})}),q.length&&(K.complete=Promise.all(q).then(Y=>this._getAsyncRulesResult({result:K,values:Y}))),K},_updateRuleConfig(B){let{rule:K,ruleResult:J,validator:ie,name:re}=B;K.isValid=J.isValid,J.isValid||((0,y.O9)(J.message)&&(0,y.Kg)(J.message)&&J.message.length?K.message=J.message:this._setDefaultMessage({rule:K,validator:ie,name:re}))},_getPatchedRuleResult(B){let K;return(0,y.Gv)(B)?(K=(0,S.X)({},B),(0,y.O9)(K.isValid)||(K.isValid=!0)):K={isValid:!(0,y.Lm)(B)||B},K},_getAsyncRulesResult(B){let{values:K,result:J}=B;return(0,T.__)(K,(ie,re)=>{!1===re.isValid&&(J.isValid=re.isValid,this._addBrokenRule({result:J,rule:J.pendingRules[ie]}))}),J.pendingRules=null,J.complete=null,J.status=J.isValid?"valid":"invalid",J},registerValidatorInGroup(B,K){const J=k.addGroup(B);J.registerValidator.call(J,K)},removeRegisteredValidator(B,K){const J=k.getGroupConfig(B);J&&(J.removeRegisteredValidator.call(J,K),0===J.validators.length&&J._isRemovable&&this.removeGroup(B))},initValidationOptions(B){const K={};return B&&["isValid","validationStatus","validationError","validationErrors"].forEach(ie=>{ie in B&&(0,S.X)(K,this.synchronizeValidationOptions({name:ie,value:B[ie]},B))}),K},synchronizeValidationOptions(B,K){let{name:J,value:ie}=B;switch(J){case"validationStatus":{const re="valid"===ie||"pending"===ie;return K.isValid!==re?{isValid:re}:{}}case"isValid":{const{validationStatus:re}=K;let q=re;return ie&&"invalid"===re?q="valid":!ie&&"invalid"!==re&&(q="invalid"),q!==re?{validationStatus:q}:{}}case"validationErrors":{const re=ie&&ie.length?ie[0]:null;return K.validationError!==re?{validationError:re}:{}}case"validationError":{const{validationErrors:re}=K;if(!ie&&re)return{validationErrors:null};if(ie&&!re)return{validationErrors:[ie]};if(ie&&re&&ie!==re[0])return re[0]=ie,{validationErrors:re.slice()}}}return{}},validateGroup(B){const K=k.getGroupConfig(B);if(!K)throw o.A.Error("E0110");return K.validate()},resetGroup(B){const K=k.getGroupConfig(B);if(!K)throw o.A.Error("E0110");return K.reset()}};k.initGroups();const U=k},2978:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>a});var W=M(1973),o=M(4859),P=M(3090),b=M(2660),f=M(4072),S=M(4481),T=M(5811);const s=S.A.inherit({_getDefaultOptions(){return(0,P.X)(this.callBase(),{focusStateEnabled:!1,noDataText:null})},_setOptionsByReference(){this.callBase(),(0,P.X)(this._optionsByReference,{validationGroup:!0})},_init(){this.callBase(),this._initGroupRegistration()},_initGroupRegistration(){const u=this.$element(),h=this.option("validationGroup")||T.A.findGroup(u,this._modelByElement(u)),g=T.A.addGroup(h,!0);this._unsubscribeGroup(),this._groupWasInit=!0,this._validationGroup=h,this.groupSubscription=this._groupValidationHandler.bind(this),g.on("validated",this.groupSubscription)},_unsubscribeGroup(){const u=T.A.getGroupConfig(this._validationGroup);u&&u.off("validated",this.groupSubscription)},_getOrderedItems(u,h){let g=[];return(0,b.__)(u,(_,x)=>{const w=(0,o.VM)(h,D=>{if(D.validator===x)return!0});w.length&&(g=g.concat(w))}),g},_groupValidationHandler(u){const h=this._getOrderedItems(u.validators,(0,b.Tj)(u.brokenRules,g=>({text:g.message,validator:g.validator,index:g.index})));this.validators=u.validators,(0,b.__)(this.validators,(g,_)=>{if(_._validationSummary!==this){let x=this._itemValidationHandler.bind(this);const w=function(){_.off("validated",x),_._validationSummary=null,x=null};_.on("validated",x),_.on("disposing",w),_._validationSummary=this}}),this.option("items",h)},_itemValidationHandler(u){let{isValid:h,validator:g,brokenRules:_}=u,x=this.option("items"),w=!1,D=0;for(;D<x.length;){const C=x[D];if(C.validator===g){const I=(0,o.VM)(_||[],L=>L.index===C.index)[0];if(h||!I){x.splice(D,1),w=!0;continue}I.message!==C.text&&(C.text=I.message,w=!0)}D++}(0,b.__)(_,(C,I)=>{(0,o.VM)(x,N=>N.validator===g&&N.index===I.index)[0]||(x.push({text:I.message,validator:g,index:I.index}),w=!0)}),w&&(x=this._getOrderedItems(this.validators,x),this.option("items",x))},_initMarkup(){this.$element().addClass("dx-validationsummary"),this.callBase()},_optionChanged(u){"validationGroup"===u.name?this._initGroupRegistration():this.callBase(u)},_itemClass:()=>"dx-validationsummary-item",_itemDataKey:()=>"dx-validationsummary-item-data",_postprocessRenderItem(u){f.A.on(u.itemElement,"click",()=>{u.itemData.validator&&u.itemData.validator.focus&&u.itemData.validator.focus()})},_dispose(){this.callBase(),this._unsubscribeGroup()},refreshValidationGroup(){this._initGroupRegistration()}});(0,W.A)("dxValidationSummary",s);const a=s},597:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(1973),o=M(7631),P=M(5397),b=M(2925),f=M(8684),S=M(6021),T=M(3090),y=M(2660),d=M(127),c=M(5811);const u=M(3538).A.inherit({ctor(C,I){this.editor=C,this.validator=I,this.validationRequestsCallbacks=[];const L=N=>{this.validationRequestsCallbacks.forEach(G=>G(N))};C.validationRequest.add(L),C.on("disposing",()=>{C.validationRequest.remove(L)})},getValue(){return this.editor.option("value")},getCurrentValidationError(){return this.editor.option("validationError")},bypass(){return this.editor.option("disabled")},applyValidationResults(C){this.editor.option({validationErrors:C.brokenRules,validationStatus:C.status})},reset(){this.editor.clear()},focus(){this.editor.focus()}}),w=o.A.inherit({_initOptions(C){this.callBase.apply(this,arguments),this.option(c.A.initValidationOptions(C))},_getDefaultOptions(){return(0,T.X)(this.callBase(),{validationRules:[]})},_init(){this.callBase(),this._initGroupRegistration(),this.focused=(0,f.A)(),this._initAdapter(),this._validationInfo={result:null,deferred:null,skipValidation:!1}},_initGroupRegistration(){const C=this._findGroup();this._groupWasInit||this.on("disposing",I=>{c.A.removeRegisteredValidator(I.component._validationGroup,I.component)}),(!this._groupWasInit||this._validationGroup!==C)&&(c.A.removeRegisteredValidator(this._validationGroup,this),this._groupWasInit=!0,this._validationGroup=C,c.A.registerValidatorInGroup(C,this))},_setOptionsByReference(){this.callBase(),(0,T.X)(this._optionsByReference,{validationGroup:!0})},_getEditor(){const C=this.$element()[0];return(0,P.p)(C,"dx-validation-target")},_initAdapter(){const C=this._getEditor();let I=this.option("adapter");if(!I){if(C)return I=new u(C,this),I.validationRequestsCallbacks.push(N=>{this._validationInfo.skipValidation||this.validate(N)}),void this.option("adapter",I);throw d.A.Error("E0120")}const L=I.validationRequestsCallbacks;L&&L.push(N=>{this.validate(N)})},_toggleRTLDirection(C){var I;const L=(null===(I=this.option("adapter"))||void 0===I||null===(I=I.editor)||void 0===I?void 0:I.option("rtlEnabled"))??C;this.callBase(L)},_initMarkup(){this.$element().addClass("dx-validator"),this.callBase()},_render(){this.callBase(),this._toggleAccessibilityAttributes()},_toggleAccessibilityAttributes(){const C=this._getEditor();if(C){const L=(this.option("validationRules")||[]).some(N=>{let{type:G}=N;return"required"===G})||null;C.isInitialized()&&C.setAria("required",L),C.option("_onMarkupRendered",()=>{C.setAria("required",L)})}},_visibilityChanged(C){C&&this._initGroupRegistration()},_optionChanged(C){switch(C.name){case"validationGroup":return void this._initGroupRegistration();case"validationRules":return this._resetValidationRules(),this._toggleAccessibilityAttributes(),void(void 0!==this.option("isValid")&&this.validate());case"adapter":this._initAdapter();break;case"isValid":case"validationStatus":this.option(c.A.synchronizeValidationOptions(C,this.option()));break;default:this.callBase(C)}},_getValidationRules(){return this._validationRules||(this._validationRules=(0,y.Tj)(this.option("validationRules"),(C,I)=>(0,T.X)({},C,{validator:this,index:I}))),this._validationRules},_findGroup(){const C=this.$element();return this.option("validationGroup")||c.A.findGroup(C,this._modelByElement(C))},_resetValidationRules(){delete this._validationRules},validate(C){const I=this.option("adapter"),L=this.option("name"),N=I.bypass&&I.bypass(),G=C&&void 0!==C.value?C.value:I.getValue(),k=I.getCurrentValidationError&&I.getCurrentValidationError(),U=this._getValidationRules(),B=this._validationInfo&&this._validationInfo.result;if(B&&"pending"===B.status&&B.value===G)return(0,T.X)({},B);let K;return N?K={isValid:!0,status:"valid"}:k&&k.editorSpecific?(k.validator=this,K={isValid:!1,status:"invalid",brokenRule:k,brokenRules:[k]}):K=c.A.validate(G,U,L),K.id=(new b.A).toString(),this._applyValidationResult(K,I),K.complete&&K.complete.then(J=>{J.id===this._validationInfo.result.id&&this._applyValidationResult(J,I)}),(0,T.X)({},this._validationInfo.result)},reset(){const C=this.option("adapter");this._validationInfo.skipValidation=!0,C.reset(),this._validationInfo.skipValidation=!1,this._resetValidationRules(),this._applyValidationResult({id:null,isValid:!0,brokenRule:null,brokenRules:null,pendingRules:null,status:"valid",complete:null},C)},_updateValidationResult(C){if(this._validationInfo.result&&this._validationInfo.result.id===C.id)for(const I in C)"id"!==I&&"complete"!==I&&(this._validationInfo.result[I]=C[I]);else this._validationInfo.result=(0,T.X)({},C,{complete:this._validationInfo.deferred&&this._validationInfo.result.complete})},_applyValidationResult(C,I){const L=this._createActionByOption("onValidated",{excludeValidators:["readOnly"]});if(C.validator=this,this._updateValidationResult(C),I.applyValidationResults&&I.applyValidationResults(this._validationInfo.result),this.option({validationStatus:this._validationInfo.result.status}),"pending"===this._validationInfo.result.status)return this._validationInfo.deferred||(this._validationInfo.deferred=(0,S.cY)(),this._validationInfo.result.complete=this._validationInfo.deferred.promise()),void this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);"pending"!==this._validationInfo.result.status&&(L(C),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(C),this._validationInfo.deferred=null))},focus(){const C=this.option("adapter");C&&C.focus&&C.focus()},_useTemplates:()=>!1});(0,W.A)("dxValidator",w);const D=w},5417:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s,g:()=>d});var W=M(6870),o=M(4504),P=M(5704),b=M(3090),f=M(1830),S=M(6110),T=M(7358);const y=(0,S.zk)(),d={top:{my:"top center",at:"top center"},bottom:{my:"bottom center",at:"bottom center"},right:{my:"right center",at:"right center"},left:{my:"left center",at:"left center"},center:{my:"center",at:"center"},"right bottom":{my:"right bottom",at:"right bottom"},"right top":{my:"right top",at:"right top"},"left bottom":{my:"left bottom",at:"left bottom"},"left top":{my:"left top",at:"left top"}},c={h:0,v:0};class s{constructor(u){let{position:h,container:g,visualContainer:_,$root:x,$content:w,$wrapper:D,onPositioned:C,onVisualPositionChanged:I,restorePosition:L,_fixWrapperPosition:N,_skipContentPositioning:G}=u;this._props={position:h,container:g,visualContainer:_,restorePosition:L,onPositioned:C,onVisualPositionChanged:I,_fixWrapperPosition:N,_skipContentPositioning:G},this._$root=x,this._$content=w,this._$wrapper=D,this._$markupContainer=void 0,this._$visualContainer=void 0,this._shouldRenderContentInitialPosition=!0,this._visualPosition=void 0,this._initialPosition=void 0,this._previousVisualPosition=void 0,this.updateContainer(g),this.updatePosition(h),this.updateVisualContainer(_)}get $container(){return this.updateContainer(),this._$markupContainer}get $visualContainer(){return this._$visualContainer}get position(){return this._position}set fixWrapperPosition(u){this._props._fixWrapperPosition=u,this.styleWrapperPosition()}set restorePosition(u){this._props.restorePosition=u}restorePositionOnNextRender(u){this._shouldRenderContentInitialPosition=u||!this._visualPosition}openingHandled(){this.restorePositionOnNextRender(this._props.restorePosition)}updatePosition(u){this._props.position=u,this._position=this._normalizePosition(u),this.updateVisualContainer()}updateContainer(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._props.container;this._props.container=u,this._$markupContainer=u?(0,P.A)(u):T.A.getSwatchContainer(this._$root),this.updateVisualContainer(this._props.visualContainer)}updateVisualContainer(){this._props.visualContainer=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._props.visualContainer,this._$visualContainer=this._getVisualContainer()}detectVisualPositionChange(u){this._updateVisualPositionValue(),this._raisePositionedEvents(u)}positionContent(){this._shouldRenderContentInitialPosition?this._renderContentInitialPosition():((0,o.Cy)(this._$content,this._visualPosition),this.detectVisualPositionChange())}positionWrapper(){this._$visualContainer&&W.A.setup(this._$wrapper,{my:"top left",at:"top left",of:this._$visualContainer})}styleWrapperPosition(){const h=(0,f.l6)(this.$visualContainer.get(0))||this._props._fixWrapperPosition?"fixed":"absolute";this._$wrapper.css("position",h)}_updateVisualPositionValue(){this._previousVisualPosition=this._visualPosition,this._visualPosition=(0,o.x5)(this._$content)}_renderContentInitialPosition(){this._renderBoundaryOffset(),(0,o.fw)(this._$content);const u=this._$wrapper.css("overflow");if(this._$wrapper.css("overflow","hidden"),!this._props._skipContentPositioning){const h=W.A.setup(this._$content,this._position);this._initialPosition=h}this._$wrapper.css("overflow",u),this.detectVisualPositionChange()}_raisePositionedEvents(u){const h=this._previousVisualPosition,g=this._visualPosition;(h?.top!==g.top||h?.left!==g.left)&&this._props.onVisualPositionChanged({previousPosition:h,position:g,event:u}),this._props.onPositioned({position:this._initialPosition})}_renderBoundaryOffset(){const u=this._position??{boundaryOffset:c};this._$content.css("margin",`${u.v}px ${u.h}px`)}_getVisualContainer(){var u,h;const g=this._props.container,_=this._props.visualContainer,x=(0,f.xH)(null===(u=this._props.position)||void 0===u?void 0:u.of)?this._props.position.of.target:null===(h=this._props.position)||void 0===h?void 0:h.of;return(0,P.A)(_||g||x||y)}_normalizePosition(u){const h={boundaryOffset:c};return(0,f.O9)(u)?(0,b.X)(!0,{},h,this._positionToObject(u)):h}_positionToObject(u){return(0,f.Kg)(u)?(0,b.X)({},d[u]):u}}},6163:(In,Ze,M)=>{"use strict";M.d(Ze,{J:()=>S});var W=M(5704),o=M(1363),P=M(1830),b=M(6110);const S=(T,y)=>{const d=(0,W.A)((0,b.zk)()),{top:c}=T.offset();let s;if((0,P.kf)(y)){if(y<c)return c-y;s=(0,o.yV)(d)-y+d.scrollTop()}else{const a=c-d.scrollTop(),u=(0,o.yV)(d)-a-(0,o.P$)(T);s=Math.max(a,u)}return.9*s}},3183:(In,Ze,M)=>{"use strict";M.d(Ze,{C0:()=>T,E3:()=>b,TF:()=>S,vt:()=>f});var W=M(4859);let o=1500,P=[];const b=d=>(o=(0,W.YD)(d,o),o),f=function(){let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const{length:c}=P,s=(c?P[c-1]:d)+1;return P.push(s),s},S=d=>{const c=P.indexOf(d);c>=0&&P.splice(c,1)},T=d=>P.length&&P[P.length-1]===d},5742:(In,Ze,M)=>{"use strict";M.d(Ze,{X:()=>D,B:()=>I});var W=M(5737),o=M(9144),P=M(6870),b=M(4859),f=M(3090),S=M(1363),T=M(1830);const y={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"};var _=M(5417);const x=["shading","target","$arrow"],w={left:-1,top:-1,center:0,right:1,bottom:1},D={top:{my:"bottom center",at:"top center",collision:"fit flip"},bottom:{my:"top center",at:"bottom center",collision:"fit flip"},right:{my:"left center",at:"right center",collision:"flip fit"},left:{my:"right center",at:"left center",collision:"flip fit"}},C={h:10,v:10};class I extends _.A{constructor(N){let{shading:G,target:k,$arrow:U}=N;super((0,o.A)(N,x)),this._props=(0,W.A)({},this._props,{shading:G,target:k}),this._$arrow=U,this._positionSide=void 0,this.updatePosition(this._props.position)}positionWrapper(){this._props.shading&&this._$wrapper.css({top:0,left:0})}updateTarget(N){this._props.target=N,this.updatePosition(this._props.position)}_renderBoundaryOffset(){}_getContainerPosition(){const N=(0,b.Li)(this._position.offset||"");let{h:G,v:k}=N;const U=this._isVerticalSide(),B=this._isHorizontalSide();if(U||B){const q=(this._isPopoverInside()?-1:1)*w[this._positionSide]*((U?(0,S.Oq)(this._$arrow):(0,S.RG)(this._$arrow))-this._getContentBorderWidth(this._positionSide));U?k+=q:G+=q}return(0,f.X)({},this._position,{offset:`${G} ${k}`})}_getContentBorderWidth(N){const G=this._$content.css(y[N]);return parseInt(G)||0}_isPopoverInside(){const N=P.A.setup.normalizeAlign(this._position.my),G=P.A.setup.normalizeAlign(this._position.at);return N.h===G.h&&N.v===G.v}_isVerticalSide(){let N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._positionSide;return"top"===N||"bottom"===N}_isHorizontalSide(){let N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._positionSide;return"left"===N||"right"===N}_getDisplaySide(N){const G=P.A.setup.normalizeAlign(N.my),k=P.A.setup.normalizeAlign(N.at),U=w[G.h]===w[k.h]&&w[G.v]===w[k.v]?-1:1;return Math.abs(w[G.h]-U*w[k.h])>Math.abs(w[G.v]-U*w[k.v])?k.h:k.v}_normalizePosition(N){const G={of:this._props.target,boundaryOffset:C};let k;return k=(0,T.O9)(N)?(0,f.X)(!0,{},G,this._positionToObject(N)):G,this._positionSide=this._getDisplaySide(k),k}_positionToObject(N){return(0,T.Kg)(N)?(0,f.X)({},D[N]):N}}},912:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>S});var W=M(608),o=M(3538),P=M(4859);const{abstract:b}=o.A,S=o.A.inherit({ctor(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=this._stepCore.bind(this)},start(){this._stopped=!1,this._finished=!1,this._stepCore()},stop(){this._stopped=!0,(0,W.u)(this._stepAnimationFrame)},_stepCore(){if(!this._isStopped())return this._isFinished()?(this._finished=!0,void this._complete()):(this._step(),void(this._stepAnimationFrame=(0,W.x)(this._proxiedStepCore)));this._stop()},_step:b,_isFinished:P.lQ,_stop:P.lQ,_complete:P.lQ,_isStopped(){return this._stopped},inProgress(){return!(this._stopped||this._finished)}})},2170:(In,Ze,M)=>{"use strict";M.d(Ze,{M:()=>P});var W=M(5973),o=M(7007);const P=function(){return[{device:()=>!o.nativeScrolling,options:{useNative:!1}},{device:b=>!W.A.isSimulator()&&"desktop"===W.A.real().deviceType&&"generic"===b.platform,options:{bounceEnabled:!1,scrollByThumb:!0,scrollByContent:o.touch,showScrollbar:"onHover"}}]}},1037:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>te});var W=M(1973),o=M(5973),P=M(7631),b=M(9522),f=M(5704),S=M(36),T=M(4859),y=M(6021),d=M(3090),c=M(1363),s=M(7007),a=M(1830),u=M(6110),h=M(4072),g=M(7940),_=M(9293),x=M(5737),w=M(6946),D=M(7508),C=M(8813),L=M(2170),N=M(2823),G=M(316);const k="dxScrollable",q="vertical",Y="horizontal",Z="both",Q=P.A.inherit({_getDefaultOptions(){return(0,d.X)(this.callBase(),{disabled:!1,onScroll:null,direction:q,showScrollbar:"onScroll",useNative:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,onUpdated:null,onStart:null,onEnd:null,onBounce:null,useSimulatedScrollbar:!1,useKeyboard:!0,inertiaEnabled:!0,updateManually:!1,_onVisibilityChanged:T.lQ})},_defaultOptionsRules(){return this.callBase().concat((0,L.M)(),[{device:()=>s.nativeScrolling&&"android"===o.A.real().platform&&!S.A.mozilla,options:{useSimulatedScrollbar:!0}}])},_initOptions(pe){this.callBase(pe),"useSimulatedScrollbar"in pe||this._setUseSimulatedScrollbar()},_setUseSimulatedScrollbar(){this.initialOption("useSimulatedScrollbar")||this.option("useSimulatedScrollbar",!this.option("useNative"))},_init(){this.callBase(),this._initScrollableMarkup(),this._locked=!1},_visibilityChanged(pe){pe?(this.update(),this._updateRtlPosition(),this._savedScrollOffset&&this.scrollTo(this._savedScrollOffset),delete this._savedScrollOffset,this.option("_onVisibilityChanged")(this)):this._savedScrollOffset=this.scrollOffset()},_initScrollableMarkup(){const pe=this.$element().addClass("dx-scrollable"),z=this._$container=(0,f.A)("<div>").addClass("dx-scrollable-container"),oe=this._$wrapper=(0,f.A)("<div>").addClass("dx-scrollable-wrapper");(this._$content=(0,f.A)("<div>").addClass("dx-scrollable-content")).append(pe.contents()).appendTo(z),z.appendTo(oe),oe.appendTo(pe)},_dimensionChanged(){this.update(),this._updateRtlPosition()},_initMarkup(){this.callBase(),this._renderDirection()},_render(){this._renderStrategy(),this._attachEventHandlers(),this._renderDisabledState(),this._createActions(),this.update(),this.callBase(),this._updateRtlPosition(!0)},_updateRtlPosition(pe){this._strategy.updateRtlPosition(pe)},_getMaxOffset(){const{scrollWidth:pe,clientWidth:z,scrollHeight:oe,clientHeight:ae}=(0,f.A)(this.container()).get(0);return{left:pe-z,top:oe-ae}},_attachEventHandlers(){const pe=this._strategy,z={getDirection:pe.getDirection.bind(pe),validate:this._validate.bind(this),isNative:this.option("useNative"),scrollTarget:this._$container};h.A.off(this._$wrapper,`.${k}`),h.A.on(this._$wrapper,(0,_.b4)(g.A.init,k),z,this._initHandler.bind(this)),h.A.on(this._$wrapper,(0,_.b4)(g.A.start,k),pe.handleStart.bind(pe)),h.A.on(this._$wrapper,(0,_.b4)(g.A.move,k),pe.handleMove.bind(pe)),h.A.on(this._$wrapper,(0,_.b4)(g.A.end,k),pe.handleEnd.bind(pe)),h.A.on(this._$wrapper,(0,_.b4)(g.A.cancel,k),pe.handleCancel.bind(pe)),h.A.on(this._$wrapper,(0,_.b4)(g.A.stop,k),pe.handleStop.bind(pe)),h.A.off(this._$container,`.${k}`),h.A.on(this._$container,(0,_.b4)("scroll",k),pe.handleScroll.bind(pe))},_validate(pe){return!this._isLocked()&&(this._updateIfNeed(),this._moveIsAllowed(pe))},_moveIsAllowed(pe){return this._strategy.validate(pe)},handleMove(pe){this._strategy.handleMove(pe)},_prepareDirections(pe){this._strategy._prepareDirections(pe)},_initHandler(){const pe=this._strategy;pe.handleInit.apply(pe,arguments)},_renderDisabledState(){this.$element().toggleClass("dx-scrollable-disabled",this.option("disabled")),this.option("disabled")?this._lock():this._unlock()},_renderDirection(){this.$element().removeClass(`dx-scrollable-${Y}`).removeClass(`dx-scrollable-${q}`).removeClass(`dx-scrollable-${Z}`).addClass(`dx-scrollable-${this.option("direction")}`)},_renderStrategy(){this._createStrategy(),this._strategy.render(),this.$element().data("dxScrollableStrategy",this._strategy)},_createStrategy(){this._strategy=this.option("useNative")?new N.A(this):new G.G(this)},_createActions(){this._strategy&&this._strategy.createActions()},_clean(){this._strategy&&this._strategy.dispose()},_optionChanged(pe){switch(pe.name){case"onStart":case"onEnd":case"onUpdated":case"onScroll":case"onBounce":this._createActions();break;case"direction":this._resetInactiveDirection(),this._invalidate();break;case"useNative":this._setUseSimulatedScrollbar(),this._invalidate();break;case"inertiaEnabled":case"scrollByThumb":case"bounceEnabled":case"useKeyboard":case"showScrollbar":case"useSimulatedScrollbar":this._invalidate();break;case"disabled":this._renderDisabledState(),this._strategy&&this._strategy.disabledChanged();break;case"updateManually":case"scrollByContent":case"_onVisibilityChanged":break;case"width":this.callBase(pe),this._updateRtlPosition();break;default:this.callBase(pe)}},_resetInactiveDirection(){const pe=this._getInactiveProp();if(!pe||!(0,u.Vd)())return;const z=this.scrollOffset();z[pe]=0,this.scrollTo(z)},_getInactiveProp(){const pe=this.option("direction");return pe===q?"left":pe===Y?"top":void 0},_location(){return this._strategy.location()},_normalizeLocation(pe){if((0,a.Qd)(pe)){const oe=(0,T.YD)(pe.left,pe.x),ae=(0,T.YD)(pe.top,pe.y);return{left:(0,a.O9)(oe)?-oe:void 0,top:(0,a.O9)(ae)?-ae:void 0}}const z=this.option("direction");return{left:z!==q?-pe:void 0,top:z!==Y?-pe:void 0}},_isLocked(){return this._locked},_lock(){this._locked=!0},_unlock(){this.option("disabled")||(this._locked=!1)},_isDirection(pe){const z=this.option("direction");return pe===q?z!==Y:pe===Y?z!==q:z===pe},_updateAllowedDirection(){const pe=this._strategy._allowedDirections();this._allowedDirectionValue=this._isDirection(Z)&&pe.vertical&&pe.horizontal?Z:this._isDirection(Y)&&pe.horizontal?Y:this._isDirection(q)&&pe.vertical?q:null},_allowedDirection(){return this._allowedDirectionValue},$content(){return this._$content},content(){return(0,b.cc)(this._$content)},container(){return(0,b.cc)(this._$container)},scrollOffset(){return this._strategy._getScrollOffset()},_isRtlNativeStrategy(){const{useNative:pe,rtlEnabled:z}=this.option();return pe&&z},scrollTop(){return this.scrollOffset().top},scrollLeft(){return this.scrollOffset().left},clientHeight(){return(0,c.Oq)(this._$container)},scrollHeight(){return(0,c.P$)(this.$content())},clientWidth(){return(0,c.RG)(this._$container)},scrollWidth(){return(0,c.Ot)(this.$content())},update(){if(this._strategy)return(0,y.z7)(this._strategy.update()).done(()=>{this._updateAllowedDirection()})},scrollBy(pe){((pe=this._normalizeLocation(pe)).top||pe.left)&&(this._updateIfNeed(),this._strategy.scrollBy(pe))},scrollTo(pe){pe=this._normalizeLocation(pe),this._updateIfNeed();let z=this._location();this.option("useNative")||(pe=this._strategy._applyScaleRatio(pe),z=this._strategy._applyScaleRatio(z)),this._isRtlNativeStrategy()&&(z.left-=this._getMaxOffset().left);const oe=this._normalizeLocation({left:z.left-(0,T.YD)(pe.left,z.left),top:z.top-(0,T.YD)(pe.top,z.top)});!oe.top&&!oe.left||this._strategy.scrollBy(oe)},scrollToElement(pe,z){const oe=(0,f.A)(pe),ae=this.$content().find(pe).length,ee=oe.parents(".dx-scrollable").length-oe.parents(".dx-scrollable-content").length==0;if(!ae||!ee)return;const he={top:0,left:0},de=this.option("direction");de!==q&&(he.left=this.getScrollElementPosition(oe,Y,z)),de!==Y&&(he.top=this.getScrollElementPosition(oe,q,z)),this.scrollTo(he)},getScrollElementPosition(pe,z,oe){const ae=this.scrollOffset();return function I(pe,z,oe,ae,ee){const he=(0,x.A)({top:0,left:0,right:0,bottom:0},ee),de=z===C.lm,ue=de?"top":"left",be=de?"bottom":"right",ve=de?"height":"width",le=oe[`offset${(0,w.Ns)(ve)}`],Ce=oe[`client${(0,w.Ns)(ve)}`],ye=oe.getBoundingClientRect()[ve],ge=pe.getBoundingClientRect()[ve];let fe=1;Math.abs(ye-le)>1&&(fe=ye/le);const xe=(0,D.Y)(C.JU,pe)[ue]/fe,Te=ae[ue],Ee=Te-xe+he[ue],Oe=Te-xe-ge/fe+Ce-he[be];return Ee<=0&&Oe>=0?Te:Te-(Math.abs(Ee)>Math.abs(Oe)?Oe:Ee)}(pe.get(0),z,(0,f.A)(this.container()).get(0),ae,oe)},_updateIfNeed(){this.option("updateManually")||this.update()},_useTemplates:()=>!1,isRenovated:()=>!!Q.IS_RENOVATED_WIDGET});(0,W.A)(k,Q);const te=Q},2823:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>w});var W=M(3538),o=M(5973),P=M(5704),b=M(4859),f=M(2660),S=M(1363),T=M(4072),y=M(9293),d=M(179);const c="dxNativeScrollable",h="vertical",g="horizontal",w=W.A.inherit({ctor(D){this._init(D)},_init(D){this._component=D,this._$element=D.$element(),this._$container=(0,P.A)(D.container()),this._$content=D.$content(),this._direction=D.option("direction"),this._useSimulatedScrollbar=D.option("useSimulatedScrollbar"),this.option=D.option.bind(D),this._createActionByOption=D._createActionByOption.bind(D),this._isLocked=D._isLocked.bind(D),this._isDirection=D._isDirection.bind(D),this._allowedDirection=D._allowedDirection.bind(D),this._getMaxOffset=D._getMaxOffset.bind(D),this._isRtlNativeStrategy=D._isRtlNativeStrategy.bind(D)},render(){const C=o.A.real().platform;this._$element.addClass("dx-scrollable-native").addClass(`dx-scrollable-native-${C}`).toggleClass("dx-scrollable-scrollbars-hidden",!this._isScrollbarVisible()),this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._renderScrollbars()},updateRtlPosition(D){D&&this.option("rtlEnabled")&&this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._moveScrollbars()},_renderScrollbars(){this._scrollbars={},this._hideScrollbarTimeout=0,this._$element.addClass("dx-scrollable-scrollbar-simulated"),this._renderScrollbar(h),this._renderScrollbar(g)},_renderScrollbar(D){this._isDirection(D)&&(this._scrollbars[D]=new d.A((0,P.A)("<div>").appendTo(this._$element),{direction:D,expandable:this._component.option("scrollByThumb")}))},handleInit:b.lQ,handleStart:b.lQ,handleMove(D){this._isLocked()?D.cancel=!0:this._allowedDirection()&&(D.originalEvent.isScrollingEvent=!0)},handleEnd:b.lQ,handleCancel:b.lQ,handleStop:b.lQ,_eachScrollbar(D){D=D.bind(this),(0,f.__)(this._scrollbars||{},(C,I)=>{D(I,C)})},createActions(){this._scrollAction=this._createActionByOption("onScroll"),this._updateAction=this._createActionByOption("onUpdated")},_createActionArgs(){const{left:D,top:C}=this.location();return{event:this._eventForUserAction,scrollOffset:this._getScrollOffset(),reachedLeft:this._isRtlNativeStrategy()?this._isReachedRight(-D):this._isReachedLeft(D),reachedRight:this._isRtlNativeStrategy()?this._isReachedLeft(-Math.abs(D)):this._isReachedRight(D),reachedTop:this._isDirection(h)?Math.round(C)>=0:void 0,reachedBottom:this._isDirection(h)?Math.round(Math.abs(C)-this._getMaxOffset().top)>=0:void 0}},_getScrollOffset(){const{top:D,left:C}=this.location();return{top:-D,left:this._normalizeOffsetLeft(-C)}},_normalizeOffsetLeft(D){return this._isRtlNativeStrategy()?this._getMaxOffset().left+D:D},_isReachedLeft(D){return this._isDirection(g)?Math.round(D)>=0:void 0},_isReachedRight(D){return this._isDirection(g)?Math.round(Math.abs(D)-this._getMaxOffset().left)>=0:void 0},_isScrollbarVisible(){const{showScrollbar:D}=this.option();return"never"!==D&&!1!==D},handleScroll(D){this._eventForUserAction=D,this._moveScrollbars(),this._scrollAction(this._createActionArgs())},_moveScrollbars(){const{top:D,left:C}=this._getScrollOffset();this._eachScrollbar(I=>{I.moveTo({top:-D,left:-C}),I.option("visible",!0)}),this._hideScrollbars()},_hideScrollbars(){clearTimeout(this._hideScrollbarTimeout),this._hideScrollbarTimeout=setTimeout(()=>{this._eachScrollbar(D=>{D.option("visible",!1)})},500)},location(){return{left:-this._$container.scrollLeft(),top:-this._$container.scrollTop()}},disabledChanged:b.lQ,update(){this._update(),this._updateAction(this._createActionArgs())},_update(){this._updateDimensions(),this._updateScrollbars()},_updateDimensions(){this._containerSize={height:(0,S.Oq)(this._$container),width:(0,S.RG)(this._$container)},this._componentContentSize={height:(0,S.Oq)(this._component.$content()),width:(0,S.RG)(this._component.$content())},this._contentSize={height:(0,S.Oq)(this._$content),width:(0,S.RG)(this._$content)}},_updateScrollbars(){this._eachScrollbar(function(D,C){const I=C===h?"height":"width";D.option({containerSize:this._containerSize[I],contentSize:this._componentContentSize[I]}),D.update()})},_allowedDirections(){return{vertical:this._isDirection(h)&&this._contentSize.height>this._containerSize.height,horizontal:this._isDirection(g)&&this._contentSize.width>this._containerSize.width}},dispose(){const{className:D}=this._$element.get(0),C=new RegExp("dx-scrollable-native\\S*","g");C.test(D)&&this._$element.removeClass(D.match(C).join(" ")),T.A.off(this._$element,`.${c}`),T.A.off(this._$container,`.${c}`),this._removeScrollbars(),clearTimeout(this._hideScrollbarTimeout)},_removeScrollbars(){this._eachScrollbar(D=>{D.$element().remove()})},scrollBy(D){const C=this.location();this._$container.scrollTop(Math.round(-C.top-D.top)),this._$container.scrollLeft(Math.round(-C.left-D.left))},validate(D){return!(this.option("disabled")||(0,y.X1)(D)&&this._isScrolledInMaxDirection(D)||!this._allowedDirection())},_isScrolledInMaxDirection(D){const C=this._$container.get(0);let I;return I=D.delta>0?D.shiftKey?!C.scrollLeft:!C.scrollTop:D.shiftKey?C.scrollLeft>=this._getMaxOffset().left:C.scrollTop>=this._getMaxOffset().top,I},getDirection(){return this._allowedDirection()}})},316:(In,Ze,M)=>{"use strict";M.d(Ze,{G:()=>de,H:()=>ae});var W=M(4504),o=M(3538),P=M(6054),b=M(5704),f=M(4859),S=M(6021),T=M(3090),y=M(6946),d=M(2660),c=M(4757),s=M(1363),a=M(1830),u=M(6110),h=M(4072),g=M(9293),_=M(912),x=M(179);const w="dxSimulatedScrollable",C=`${w}Cursor`,I=`${w}Keyboard`,k="vertical",U="horizontal",te=(1-.92**(400/Math.round(1e3/60)))/(1-.92),z=_.A.inherit({ctor(ue){this.callBase(),this.scroller=ue},VELOCITY_LIMIT:1,_isFinished(){return Math.abs(this.scroller._velocity)<=this.VELOCITY_LIMIT},_step(){this.scroller._scrollStep(this.scroller._velocity),this.scroller._velocity*=this._acceleration()},_acceleration(){return this.scroller._inBounds()?.92:.5},_complete(){this.scroller._scrollComplete()}}),oe=z.inherit({VELOCITY_LIMIT:.2,_isFinished(){return this.scroller._crossBoundOnNextStep()||this.callBase()},_acceleration:()=>.92,_complete(){this.scroller._move(this.scroller._bounceLocation),this.callBase()}}),ae=o.A.inherit({ctor(ue){this._initOptions(ue),this._initAnimators(),this._initScrollbar()},_initOptions(ue){this._location=0,this._topReached=!1,this._bottomReached=!1,this._axis=ue.direction===U?"x":"y",this._prop=ue.direction===U?"left":"top",this._dimension=ue.direction===U?"width":"height",this._scrollProp=ue.direction===U?"scrollLeft":"scrollTop",(0,d.__)(ue,(be,ve)=>{this[`_${be}`]=ve})},_initAnimators(){this._inertiaAnimator=new z(this),this._bounceAnimator=new oe(this)},_initScrollbar(){this._scrollbar=new x.A((0,b.A)("<div>").appendTo(this._$container),{direction:this._direction,visible:this._scrollByThumb,visibilityMode:this._visibilityModeNormalize(this._scrollbarVisible),expandable:this._scrollByThumb}),this._$scrollbar=this._scrollbar.$element()},_visibilityModeNormalize:ue=>!0===ue?"onScroll":!1===ue?"never":ue,_scrollStep(ue){const be=this._location;this._location+=ue,this._suppressBounce(),this._move(),!(Math.abs(be-this._location)<1)&&h.A.triggerHandler(this._$container,{type:"scroll"})},_suppressBounce(){this._bounceEnabled||this._inBounds(this._location)||(this._velocity=0,this._location=this._boundLocation())},_boundLocation(ue){return ue=void 0!==ue?ue:this._location,Math.max(Math.min(ue,this._maxOffset),this._minOffset)},_move(ue){this._location=void 0!==ue?ue*this._getScaleRatio():this._location,this._moveContent(),this._moveScrollbar()},_moveContent(){const ue=this._location;this._$container[this._scrollProp](-ue/this._getScaleRatio()),this._moveContentByTranslator(ue)},_getScaleRatio(){if((0,u.Vd)()&&!this._scaleRatio){const ue=this._$element.get(0),be=this._getRealDimension(ue,this._dimension),ve=this._getBaseDimension(ue,this._dimension);this._scaleRatio=Math.round(be/ve*100)/100}return this._scaleRatio||1},_getRealDimension:(ue,be)=>Math.round((0,c.N)(ue)[be]),_getBaseDimension:(ue,be)=>ue[`offset${(0,y.Ns)(be)}`],_moveContentByTranslator(ue){let be;const ve=-this._maxScrollPropValue;if(be=ue>0?ue:ue<=ve?ue-ve:ue%1,this._translateOffset===be)return;const le={};le[this._prop]=be,this._translateOffset=be,0!==be?(0,W.Cy)(this._$content,le):(0,W.fw)(this._$content)},_moveScrollbar(){this._scrollbar.moveTo(this._location)},_scrollComplete(){this._inBounds()&&(this._hideScrollbar(),this._completeDeferred&&this._completeDeferred.resolve()),this._scrollToBounds()},_scrollToBounds(){this._inBounds()||(this._bounceAction(),this._setupBounce(),this._bounceAnimator.start())},_setupBounce(){const be=(this._bounceLocation=this._boundLocation())-this._location;this._velocity=be/te},_inBounds(ue){return this._boundLocation(ue=void 0!==ue?ue:this._location)===ue},_crossBoundOnNextStep(){const ue=this._location,be=ue+this._velocity;return ue<this._minOffset&&be>=this._minOffset||ue>this._maxOffset&&be<=this._maxOffset},_initHandler(ue){this._stopScrolling(),this._prepareThumbScrolling(ue)},_stopScrolling:(0,f.Mb)(function(){this._hideScrollbar(),this._inertiaAnimator.stop(),this._bounceAnimator.stop()}),_prepareThumbScrolling(ue){if((0,g.X1)(ue.originalEvent))return;const be=(0,b.A)(ue.originalEvent.target),ve=this._isScrollbar(be);ve&&this._moveToMouseLocation(ue),this._thumbScrolling=ve||this._isThumb(be),this._crossThumbScrolling=!this._thumbScrolling&&this._isAnyThumbScrolling(be),this._thumbScrolling&&this._scrollbar.feedbackOn()},_isThumbScrollingHandler(ue){return this._isThumb(ue)},_moveToMouseLocation(ue){const be=ue[`page${this._axis.toUpperCase()}`]-this._$element.offset()[this._prop],ve=this._location+be/this._containerToContentRatio()-(0,s.Oq)(this._$container)/2;this._scrollStep(-Math.round(ve))},_startHandler(){this._showScrollbar()},_moveHandler(ue){this._crossThumbScrolling||(this._thumbScrolling&&(ue[this._axis]=-Math.round(ue[this._axis]/this._containerToContentRatio())),this._scrollBy(ue))},_scrollBy(ue){ue=ue[this._axis],this._inBounds()||(ue*=.5),this._scrollStep(ue)},_scrollByHandler(ue){this._scrollBy(ue),this._scrollComplete()},_containerToContentRatio(){return this._scrollbar.containerToContentRatio()},_endHandler(ue){return this._completeDeferred=(0,S.cY)(),this._velocity=ue[this._axis],this._inertiaHandler(),this._resetThumbScrolling(),this._completeDeferred.promise()},_inertiaHandler(){this._suppressInertia(),this._inertiaAnimator.start()},_suppressInertia(){(!this._inertiaEnabled||this._thumbScrolling)&&(this._velocity=0)},_resetThumbScrolling(){this._thumbScrolling=!1,this._crossThumbScrolling=!1},_stopHandler(){this._thumbScrolling&&this._scrollComplete(),this._resetThumbScrolling(),this._scrollToBounds()},_disposeHandler(){this._stopScrolling(),this._$scrollbar.remove()},_updateHandler(){this._update(),this._moveToBounds()},_update(){return this._stopScrolling(),(0,f.OX)(()=>{this._resetScaleRatio(),this._updateLocation(),this._updateBounds(),this._updateScrollbar(),(0,f.zE)(()=>{this._moveScrollbar(),this._scrollbar.update()})})},_resetScaleRatio(){this._scaleRatio=null},_updateLocation(){this._location=((0,W.x5)(this._$content)[this._prop]-this._$container[this._scrollProp]())*this._getScaleRatio()},_updateBounds(){this._maxOffset=this._getMaxOffset(),this._minOffset=this._getMinOffset()},_getMaxOffset:()=>0,_getMinOffset(){return this._maxScrollPropValue=Math.max(this._contentSize()-this._containerSize(),0),-this._maxScrollPropValue},_updateScrollbar:(0,f.a0)(function(){const ue=this._containerSize(),be=this._contentSize(),ve=this._getBaseDimension(this._$container.get(0),this._dimension),le=this._getBaseDimension(this._$content.get(0),this._dimension);(0,f.zE)(()=>{this._scrollbar.option({containerSize:ue,contentSize:be,baseContainerSize:ve,baseContentSize:le,scaleRatio:this._getScaleRatio()})})}),_moveToBounds:(0,f.Mb)((0,f.a0)((0,f.Mb)(function(){const ue=this._boundLocation(),be=ue!==this._location;this._location=ue,this._move(),be&&this._scrollAction()}))),_createActionsHandler(ue){this._scrollAction=ue.scroll,this._bounceAction=ue.bounce},_showScrollbar(){this._scrollbar.option("visible",!0)},_hideScrollbar(){this._scrollbar.option("visible",!1)},_containerSize(){return this._getRealDimension(this._$container.get(0),this._dimension)},_contentSize(){const ue="hidden"===this._$content.css(`overflow${this._axis.toUpperCase()}`);let be=this._getRealDimension(this._$content.get(0),this._dimension);if(!ue){const ve=this._$content[0][`scroll${(0,y.Ns)(this._dimension)}`]*this._getScaleRatio();be=Math.max(ve,be)}return be},_validateEvent(ue){const be=(0,b.A)(ue.originalEvent.target);return this._isThumb(be)||this._isScrollbar(be)},_isThumb(ue){return this._scrollByThumb&&this._scrollbar.isThumb(ue)},_isScrollbar(ue){return this._scrollByThumb&&ue&&ue.is(this._$scrollbar)},_reachedMin(){return Math.round(this._location-this._minOffset)<=0},_reachedMax(){return Math.round(this._location-this._maxOffset)>=0},_cursorEnterHandler(){this._resetScaleRatio(),this._updateScrollbar(),this._scrollbar.cursorEnter()},_cursorLeaveHandler(){this._scrollbar.cursorLeave()},dispose:f.lQ});let ee,he;const de=o.A.inherit({ctor(ue){this._init(ue)},_init(ue){this._component=ue,this._$element=ue.$element(),this._$container=(0,b.A)(ue.container()),this._$wrapper=ue._$wrapper,this._$content=ue.$content(),this.option=ue.option.bind(ue),this._createActionByOption=ue._createActionByOption.bind(ue),this._isLocked=ue._isLocked.bind(ue),this._isDirection=ue._isDirection.bind(ue),this._allowedDirection=ue._allowedDirection.bind(ue),this._getMaxOffset=ue._getMaxOffset.bind(ue)},render(){this._$element.addClass("dx-scrollable-simulated"),this._createScrollers(),this.option("useKeyboard")&&this._$container.prop("tabIndex",0),this._attachKeyboardHandler(),this._attachCursorHandlers()},_createScrollers(){this._scrollers={},this._isDirection(U)&&this._createScroller(U),this._isDirection(k)&&this._createScroller(k),this._$element.toggleClass("dx-scrollable-scrollbars-alwaysvisible","always"===this.option("showScrollbar"))},_createScroller(ue){this._scrollers[ue]=new ae(this._scrollerOptions(ue))},_scrollerOptions(ue){return{direction:ue,$content:this._$content,$container:this._$container,$wrapper:this._$wrapper,$element:this._$element,scrollByThumb:this.option("scrollByThumb"),scrollbarVisible:this.option("showScrollbar"),bounceEnabled:this.option("bounceEnabled"),inertiaEnabled:this.option("inertiaEnabled"),isAnyThumbScrolling:this._isAnyThumbScrolling.bind(this)}},_applyScaleRatio(ue){for(const be in this._scrollers){const ve=this._getPropByDirection(be);(0,a.O9)(ue[ve])&&(ue[ve]*=this._scrollers[be]._getScaleRatio())}return ue},_isAnyThumbScrolling(ue){let be=!1;return this._eventHandler("isThumbScrolling",ue).done((ve,le)=>{be=ve||le}),be},handleInit(ue){this._suppressDirections(ue),this._eventForUserAction=ue,this._eventHandler("init",ue)},_suppressDirections(ue){(0,g.X1)(ue.originalEvent)?this._prepareDirections(!0):(this._prepareDirections(),this._eachScroller(function(be,ve){const le=(0,b.A)(ue.originalEvent.target),Ce=be._validateEvent(ue)||this.option("scrollByContent")&&this._isContent(le);this._validDirections[ve]=Ce}))},_isContent(ue){return!!ue.closest(this._$element).length},_prepareDirections(ue){ue=ue||!1,this._validDirections={},this._validDirections[U]=ue,this._validDirections[k]=ue},_eachScroller(ue){ue=ue.bind(this),(0,d.__)(this._scrollers,(be,ve)=>{ue(ve,be)})},handleStart(ue){this._eventForUserAction=ue,this._eventHandler("start").done(this._startAction)},_saveActive(){he=this},_resetActive(){he===this&&(he=null)},handleMove(ue){if(this._isLocked())return ue.cancel=!0,void this._resetActive();this._saveActive(),ue.preventDefault&&ue.preventDefault(),this._adjustDistance(ue,ue.delta),this._eventForUserAction=ue,this._eventHandler("move",ue.delta)},_adjustDistance(ue,be){be.x*=this._validDirections[U],be.y*=this._validDirections[k];const ve=this._tryGetDevicePixelRatio();ve&&(0,g.X1)(ue.originalEvent)&&(be.x=Math.round(be.x/ve*100)/100,be.y=Math.round(be.y/ve*100)/100)},_tryGetDevicePixelRatio(){if((0,u.Vd)())return(0,u.zk)().devicePixelRatio},handleEnd(ue){return this._resetActive(),this._refreshCursorState(ue.originalEvent&&ue.originalEvent.target),this._adjustDistance(ue,ue.velocity),this._eventForUserAction=ue,this._eventHandler("end",ue.velocity).done(this._endAction)},handleCancel(ue){return this._resetActive(),this._eventForUserAction=ue,this._eventHandler("end",{x:0,y:0})},handleStop(){this._resetActive(),this._eventHandler("stop")},handleScroll(){this._updateRtlConfig(),this._scrollAction()},_attachKeyboardHandler(){h.A.off(this._$element,`.${I}`),!this.option("disabled")&&this.option("useKeyboard")&&h.A.on(this._$element,(0,g.b4)("keydown",I),this._keyDownHandler.bind(this))},_keyDownHandler(ue){if(clearTimeout(this._updateHandlerTimeout),this._updateHandlerTimeout=setTimeout(()=>{"tab"===(0,g.YD)(ue)&&this._eachScroller(ve=>{ve._updateHandler()})}),!this._$container.is(P.A.getActiveElement(this._$container.get(0))))return;let be=!0;switch((0,g.YD)(ue)){case"downArrow":this._scrollByLine({y:1});break;case"upArrow":this._scrollByLine({y:-1});break;case"rightArrow":this._scrollByLine({x:1});break;case"leftArrow":this._scrollByLine({x:-1});break;case"pageDown":this._scrollByPage(1);break;case"pageUp":this._scrollByPage(-1);break;case"home":this._scrollToHome();break;case"end":this._scrollToEnd();break;default:be=!1}be&&(ue.stopPropagation(),ue.preventDefault())},_scrollByLine(ue){const be=this._tryGetDevicePixelRatio();let ve=40;be&&(ve=Math.abs(ve/be*100)/100),this.scrollBy({top:(ue.y||0)*-ve,left:(ue.x||0)*-ve})},_scrollByPage(ue){const be=this._wheelProp(),ve=this._dimensionByProp(be),le={};le[be]=ue*-("width"===ve?s.RG:s.Oq)(this._$container),this.scrollBy(le)},_dimensionByProp:ue=>"left"===ue?"width":"height",_getPropByDirection:ue=>ue===U?"left":"top",_scrollToHome(){const be={};be[this._wheelProp()]=0,this._component.scrollTo(be)},_scrollToEnd(){const ue=this._wheelProp(),ve={},le="width"===this._dimensionByProp(ue)?s.RG:s.Oq;ve[ue]=le(this._$content)-le(this._$container),this._component.scrollTo(ve)},createActions(){this._startAction=this._createActionHandler("onStart"),this._endAction=this._createActionHandler("onEnd"),this._updateAction=this._createActionHandler("onUpdated"),this._createScrollerActions()},_createScrollerActions(){this._scrollAction=this._createActionHandler("onScroll"),this._bounceAction=this._createActionHandler("onBounce"),this._eventHandler("createActions",{scroll:this._scrollAction,bounce:this._bounceAction})},_createActionHandler(ue){const be=this._createActionByOption(ue);return()=>{be((0,T.X)(this._createActionArgs(),arguments))}},_createActionArgs(){const{horizontal:ue,vertical:be}=this._scrollers,ve=this._getScrollOffset();return this._scrollOffset={top:be&&ve.top,left:ue&&ve.left},{event:this._eventForUserAction,scrollOffset:this._scrollOffset,reachedLeft:ue&&ue._reachedMax(),reachedRight:ue&&ue._reachedMin(),reachedTop:be&&be._reachedMax(),reachedBottom:be&&be._reachedMin()}},_getScrollOffset(){return{top:-this.location().top,left:-this.location().left}},_eventHandler(ue){const be=[].slice.call(arguments).slice(1),ve=(0,d.Tj)(this._scrollers,le=>le[`_${ue}Handler`].apply(le,be));return S.z7.apply(b.A,ve).promise()},location(){const ue=(0,W.x5)(this._$content);return ue.top-=this._$container.scrollTop(),ue.left-=this._$container.scrollLeft(),ue},disabledChanged(){this._attachCursorHandlers()},_attachCursorHandlers(){h.A.off(this._$element,`.${C}`),!this.option("disabled")&&this._isHoverMode()&&(h.A.on(this._$element,(0,g.b4)("mouseenter",C),this._cursorEnterHandler.bind(this)),h.A.on(this._$element,(0,g.b4)("mouseleave",C),this._cursorLeaveHandler.bind(this)))},_isHoverMode(){return"onHover"===this.option("showScrollbar")},_cursorEnterHandler(ue){(ue=ue||{}).originalEvent=ue.originalEvent||{},!he&&!ue.originalEvent._hoverHandled&&(ee&&ee._cursorLeaveHandler(),ee=this,this._eventHandler("cursorEnter"),ue.originalEvent._hoverHandled=!0)},_cursorLeaveHandler(ue){ee!==this||he===ee||(this._eventHandler("cursorLeave"),ee=null,this._refreshCursorState(ue&&ue.relatedTarget))},_refreshCursorState(ue){if(!this._isHoverMode()&&(!ue||he))return;const ve=(0,b.A)(ue).closest(".dx-scrollable-simulated:not(.dx-state-disabled)"),le=ve.length&&ve.data("dxScrollableStrategy");ee&&ee!==le&&ee._cursorLeaveHandler(),le&&le._cursorEnterHandler()},update(){const ue=this._eventHandler("update").done(this._updateAction);return(0,S.z7)(ue,(0,f.OX)(()=>{const be=this._allowedDirections();return(0,f.zE)(()=>{let ve=be.vertical?"pan-x":"";ve=be.horizontal?"pan-y":ve,ve=be.vertical&&be.horizontal?"none":ve,this._$container.css("touchAction",ve)}),(0,S.z7)().promise()}))},_allowedDirections(){const ue=this.option("bounceEnabled"),be=this._scrollers[k],ve=this._scrollers[U];return{vertical:be&&(be._minOffset<0||ue),horizontal:ve&&(ve._minOffset<0||ue)}},_updateBounds(){this._scrollers[U]&&this._scrollers[U]._updateBounds()},_isHorizontalAndRtlEnabled(){return this.option("rtlEnabled")&&this.option("direction")!==k},updateRtlPosition(ue){if(ue&&(this._rtlConfig={scrollRight:0,clientWidth:this._$container.get(0).clientWidth,windowPixelRatio:this._getWindowDevicePixelRatio()}),this._updateBounds(),this._isHorizontalAndRtlEnabled()){let be=this._getMaxOffset().left-this._rtlConfig.scrollRight;be<=0&&(be=0,this._rtlConfig.scrollRight=this._getMaxOffset().left),this._getScrollOffset().left!==be&&(this._rtlConfig.skipUpdating=!0,this._component.scrollTo({left:be}),this._rtlConfig.skipUpdating=!1)}},_updateRtlConfig(){if(this._isHorizontalAndRtlEnabled()&&!this._rtlConfig.skipUpdating){const{clientWidth:ue,scrollLeft:be}=this._$container.get(0),ve=this._getWindowDevicePixelRatio();this._rtlConfig.windowPixelRatio===ve&&this._rtlConfig.clientWidth===ue&&(this._rtlConfig.scrollRight=this._getMaxOffset().left-be),this._rtlConfig.clientWidth=ue,this._rtlConfig.windowPixelRatio=ve}},_getWindowDevicePixelRatio:()=>(0,u.Vd)()?(0,u.zk)().devicePixelRatio:1,scrollBy(ue){const be=this._scrollers[k],ve=this._scrollers[U];be&&(ue.top=be._boundLocation(ue.top+be._location)-be._location),ve&&(ue.left=ve._boundLocation(ue.left+ve._location)-ve._location),this._prepareDirections(!0),this._startAction(),this._eventHandler("scrollBy",{x:ue.left,y:ue.top}),this._endAction(),this._updateRtlConfig()},validate(ue){return!((0,g.X1)(ue)&&(0,g.By)(ue)||this.option("disabled"))&&(!!this.option("bounceEnabled")||((0,g.X1)(ue)?this._validateWheel(ue):this._validateMove(ue)))},_validateWheel(ue){const be=this._scrollers[this._wheelDirection(ue)],ve=be._reachedMin(),le=be._reachedMax();let xe=(!ve||!le)&&(!ve&&!le||ve&&ue.delta>0||le&&ue.delta<0);return xe=xe||void 0!==this._validateWheelTimer,xe&&(clearTimeout(this._validateWheelTimer),this._validateWheelTimer=setTimeout(()=>{this._validateWheelTimer=void 0},500)),xe},_validateMove(ue){return!(!this.option("scrollByContent")&&!(0,b.A)(ue.target).closest(".dx-scrollable-scrollbar").length)&&this._allowedDirection()},getDirection(ue){return(0,g.X1)(ue)?this._wheelDirection(ue):this._allowedDirection()},_wheelProp(){return this._wheelDirection()===U?"left":"top"},_wheelDirection(ue){switch(this.option("direction")){case U:return U;case k:return k;default:return ue&&ue.shiftKey?U:k}},dispose(){this._resetActive(),ee===this&&(ee=null),this._eventHandler("dispose"),this._detachEventHandlers(),this._$element.removeClass("dx-scrollable-simulated"),this._eventForUserAction=null,clearTimeout(this._validateWheelTimer),clearTimeout(this._updateHandlerTimeout)},_detachEventHandlers(){h.A.off(this._$element,`.${C}`),h.A.off(this._$container,`.${I}`)}})},179:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>N});var W=M(4504),o=M(6054),P=M(5704),b=M(4859),f=M(3090),S=M(2720),T=M(1830),y=M(4072),d=M(9209),c=M(9293),s=M(7080);const a="dxScrollbar",w="horizontal";let I=null;const L=s.A.inherit({_getDefaultOptions(){return(0,f.X)(this.callBase(),{direction:null,visible:!1,activeStateEnabled:!1,visibilityMode:"onScroll",containerSize:0,contentSize:0,expandable:!0,scaleRatio:1})},_init(){this.callBase(),this._isHovered=!1},_initMarkup(){this._renderThumb(),this.callBase()},_render(){this.callBase(),this._renderDirection(),this._update(),this._attachPointerDownHandler(),this.option("hoverStateEnabled",this._isHoverMode()),this.$element().toggleClass("dx-scrollbar-hoverable",this.option("hoverStateEnabled"))},_renderThumb(){this._$thumb=(0,P.A)("<div>").addClass("dx-scrollable-scroll"),(0,P.A)("<div>").addClass("dx-scrollable-scroll-content").appendTo(this._$thumb),this.$element().addClass("dx-scrollable-scrollbar").append(this._$thumb)},isThumb(G){return!!this.$element().find(G).length},_isHoverMode(){const G=this.option("visibilityMode");return("onHover"===G||"always"===G)&&this.option("expandable")},_renderDirection(){const G=this.option("direction");this.$element().addClass(`dx-scrollbar-${G}`),this._dimension=G===w?"width":"height",this._prop=G===w?"left":"top"},_attachPointerDownHandler(){y.A.on(this._$thumb,(0,c.b4)(d.A.down,a),this.feedbackOn.bind(this))},feedbackOn(){this.$element().addClass("dx-scrollable-scrollbar-active"),I=this},feedbackOff(){this.$element().removeClass("dx-scrollable-scrollbar-active"),I=null},cursorEnter(){this._isHovered=!0,this._needScrollbar()&&this.option("visible",!0)},cursorLeave(){this._isHovered=!1,this.option("visible",!1)},_renderDimensions(){this._$thumb.css({width:this.option("width"),height:this.option("height")})},_toggleVisibility(G){"onScroll"===this.option("visibilityMode")&&this._$thumb.css("opacity"),G=this._adjustVisibility(G),this.option().visible=G,this._$thumb.toggleClass("dx-state-invisible",!G)},_adjustVisibility(G){if(this._baseContainerToContentRatio&&!this._needScrollbar())return!1;switch(this.option("visibilityMode")){case"onScroll":break;case"onHover":G=G||!!this._isHovered;break;case"never":G=!1;break;case"always":G=!0}return G},moveTo(G){if(this._isHidden())return;(0,T.Qd)(G)&&(G=G[this._prop]||0);const k={};k[this._prop]=this._calculateScrollBarPosition(G),(0,W.Cy)(this._$thumb,k)},_calculateScrollBarPosition(G){return-G*this._thumbRatio},_update(){const G=Math.round(this.option("containerSize")),k=Math.round(this.option("contentSize"));let U=Math.round(this.option("baseContainerSize")),B=Math.round(this.option("baseContentSize"));isNaN(U)&&(U=G,B=k),this._baseContainerToContentRatio=B?U/B:U,this._realContainerToContentRatio=k?G/k:G;const K=Math.round(Math.max(Math.round(G*this._realContainerToContentRatio),15));this._thumbRatio=(G-K)/(this.option("scaleRatio")*(k-G)),this.option(this._dimension,K/this.option("scaleRatio")),this.$element().css("display",this._needScrollbar()?"":"none")},_isHidden(){return"never"===this.option("visibilityMode")},_needScrollbar(){return!this._isHidden()&&this._baseContainerToContentRatio<1},containerToContentRatio(){return this._realContainerToContentRatio},_normalizeSize(G){return(0,T.Qd)(G)?G[this._dimension]||0:G},_clean(){this.callBase(),this===I&&(I=null),y.A.off(this._$thumb,`.${a}`)},_optionChanged(G){if(!this._isHidden())switch(G.name){case"containerSize":case"contentSize":this.option()[G.name]=this._normalizeSize(G.value),this._update();break;case"baseContentSize":case"baseContainerSize":case"scaleRatio":this._update();break;case"visibilityMode":case"direction":this._invalidate();break;default:this.callBase.apply(this,arguments)}},update:(0,b.Mb)(function(){this._adjustVisibility()&&this.option("visible",!0)})});S.A.add(()=>{y.A.subscribeGlobal(o.A.getDocument(),(0,c.b4)(d.A.up,a),()=>{I&&I.feedbackOff()})});const N=L},9658:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>u});var W=M(4859),o=M(6021),P=M(3090),b=M(1830),f=M(1541),S=M(127);class T{constructor(g){this.options=g,this._setOption("disabledItemKeys",[]),this._clearItemKeys()}_clearItemKeys(){this._setOption("addedItemKeys",[]),this._setOption("removedItemKeys",[]),this._setOption("removedItems",[]),this._setOption("addedItems",[])}validate(){}_setOption(g,_){this.options[g]=_}onSelectionChanged(){const{addedItemKeys:g}=this.options,{removedItemKeys:_}=this.options,{addedItems:x}=this.options,{removedItems:w}=this.options,{selectedItems:D}=this.options,{selectedItemKeys:C}=this.options,I=this.options.onSelectionChanged||W.lQ;this._clearItemKeys(),I({selectedItems:D,selectedItemKeys:C,addedItemKeys:g,removedItemKeys:_,addedItems:x,removedItems:w})}equalKeys(g,_){return this.options.equalByReference&&(0,b.Gv)(g)&&(0,b.Gv)(_)?g===_:(0,W.RL)(g,_)}getSelectableItems(g){return g.filter(_=>!(null!=_&&_.disabled))}_clearSelection(g,_,x,w){return g=g||[],g=Array.isArray(g)?g:[g],this.validate(),this.selectedItemKeys(g,_,x,w)}_removeTemplateProperty(g){return Array.isArray(g)?g.map(_=>this._removeTemplateProperty(_)):((0,b.Gv)(g)&&delete g.template,g)}_loadFilteredData(g,_,x,w){const D=encodeURI(JSON.stringify(this._removeTemplateProperty(g))).length,C=this.options.maxFilterLengthInRequest&&D>this.options.maxFilterLengthInRequest,I=(0,o.cY)(),L={filter:C?void 0:g,select:C?this.options.dataFields():x||this.options.dataFields()};return g&&0===g.length?I.resolve([]):this.options.load(L).done(N=>{let G=(0,b.Qd)(N)?N.data:N;_&&!w?G=G.filter(_):C&&(G=(0,f.A)(G).filter(g).toArray()),I.resolve(G)}).fail(I.reject.bind(I)),I}updateSelectedItemKeyHash(g){for(let _=0;_<g.length;_++){const x=(0,W.GP)(g[_]);(0,b.Gv)(x)||(this.options.keyHashIndices[x]=this.options.keyHashIndices[x]||[],this.options.keyHashIndices[x].push(_))}}_isAnyItemSelected(g){for(let _=0;_<g.length;_++)if(this.options.isItemSelected(g[_]))return;return!1}_getFullSelectAllState(){const g=this.options.plainItems(),_=this.options.filter();let x=this.options.ignoreDisabledItems?this.options.selectedItems:this.options.selectedItems.filter(C=>!(null!=C&&C.disabled));_&&(x=(0,f.A)(x).filter(_).toArray());const w=x.length,D=g.length-this.getSelectableItems(g).length;return w?w>=this.options.totalCount()-D||void 0:this._isAnyItemSelected(g)}_getVisibleSelectAllState(){const g=this.getSelectableItems(this.options.plainItems());let _=!1,x=!1;for(let w=0;w<g.length;w++){const D=g[w],C=this.options.getItemData(D),I=this.options.keyOf(C);this.options.isSelectableItem(D)&&(this.isItemKeySelected(I)?_=!0:x=!0)}return!!_&&(!x||void 0)}}class y extends T{getSelectedItems(){return this._loadFilteredData(this.options.selectionFilter)}getSelectedItemKeys(){const g=(0,o.cY)(),_=this,x=this.options.key(),w=(0,b.Kg)(x)?[x]:x;return this._loadFilteredData(this.options.selectionFilter,null,w).done(D=>{const C=D.map(I=>_.options.keyOf(I));g.resolve(C)}).fail(g.reject),g.promise()}selectedItemKeys(g,_,x,w){if(w){const D=this.options.filter();!D||JSON.stringify(D)===JSON.stringify(this.options.selectionFilter)&&x?this._setOption("selectionFilter",x?[]:null):this._addSelectionFilter(x,D,w)}else{_||this._setOption("selectionFilter",[]);for(let D=0;D<g.length;D++)x?this.removeSelectedItem(g[D]):this.addSelectedItem(g[D],w,!_)}return this.onSelectionChanged(),(0,o.cY)().resolve()}setSelectedItems(g){this._setOption("selectionFilter",null);for(let _=0;_<g.length;_++)this.addSelectedItem(g[_])}isItemDataSelected(g){return this.isItemKeySelected(g)}isItemKeySelected(g){const{selectionFilter:_}=this.options;return!_||!!(0,f.A)([g]).filter(_).toArray().length}_getKeyExpr(){const g=this.options.key();return Array.isArray(g)&&1===g.length?g[0]:g}_normalizeKey(g){const _=this.options.key();return Array.isArray(_)&&1===_.length?g[_[0]]:g}_getFilterByKey(g){const _=this._getKeyExpr();let x=[_,"=",this._normalizeKey(g)];if(Array.isArray(_)){x=[];for(let w=0;w<_.length;w++)x.push([_[w],"=",g[_[w]]]),w!==_.length-1&&x.push("and")}return x}addSelectedItem(g,_,x){const w=this._getFilterByKey(g);this._addSelectionFilter(!1,w,_,x)}removeSelectedItem(g){const _=this._getFilterByKey(g);this._addSelectionFilter(!0,_)}validate(){const{key:g}=this.options;if(g&&void 0===g())throw S.A.Error("E1042","Deferred selection")}_findSubFilter(g,_){if(!g)return-1;const x=JSON.stringify(_);for(let w=0;w<g.length;w++){const D=g[w];if(D&&JSON.stringify(D)===x)return w}return-1}_isLastSubFilter(g,_){return!(!g||!_||this._findSubFilter(g,_)!==g.length-1&&0!==this._findSubFilter([g],_))}_addFilterOperator(g,_){return g.length>1&&(0,b.Kg)(g[1])&&g[1]!==_&&(g=[g]),g.length&&g.push(_),g}_denormalizeFilter(g){return g&&(0,b.Kg)(g[0])&&(g=[g]),g}_isOnlyNegativeFiltersLeft(g){return g.every((_,x)=>x%2==0?Array.isArray(_)&&"!"===_[0]:"and"===_)}_addSelectionFilter(g,_,x,w){var D;const C=this,I=g?["!",_]:_,L=g?"and":"or";let N=!0,G=C.options.selectionFilter||[];if(G=C._denormalizeFilter(G),null!==(D=G)&&void 0!==D&&D.length&&!w){const k=C._removeSameFilter(G,_,g,x),U=C._removeSameFilter(G,_,!g);g&&(-1!==k||-1!==U)&&this._isOnlyNegativeFiltersLeft(G)&&(G=[]);const K=this._isKeyFilter(_)&&this._hasKeyFiltersOnlyStartingFromIndex(G,U);N=_.length&&!K}N&&(G=C._addFilterOperator(G,L),G.push(I)),G=C._normalizeFilter(G),C._setOption("selectionFilter",g||G.length?G:null)}_normalizeFilter(g){return g&&1===g.length&&(g=g[0]),g}_removeFilterByIndex(g,_,x){const w=g[1];g.splice(_>0?_-1:_,2),x&&"and"===w&&g.splice(0,g.length)}_isSimpleKeyFilter(g,_){return 3===g.length&&g[0]===_&&"="===g[1]}_isKeyFilter(g){if(2===g.length&&"!"===g[0])return this._isKeyFilter(g[1]);const _=this._getKeyExpr();if(Array.isArray(_)){if(g.length!==2*_.length-1)return!1;for(let x=0;x<_.length;x++)if(x>0&&"and"!==g[2*x-1]||!this._isSimpleKeyFilter(g[2*x],_[x]))return!1;return!0}return this._isSimpleKeyFilter(g,_)}_hasKeyFiltersOnlyStartingFromIndex(g,_){if(_>=0){for(let x=_;x<g.length;x++)if("string"!=typeof g[x]&&!this._isKeyFilter(g[x]))return!1;return!0}return!1}_removeSameFilter(g,_,x,w){if(_=x?["!",_]:_,JSON.stringify(_)===JSON.stringify(g))return g.splice(0,g.length),0;const D=this._findSubFilter(g,_);if(D>=0)return this._removeFilterByIndex(g,D,w),D;for(let C=0;C<g.length;C++)if(Array.isArray(g[C])&&g[C].length>2){const I=this._removeSameFilter(g[C],_,!1,w);if(I>=0)return g[C].length?1===g[C].length&&(g[C]=g[C][0]):this._removeFilterByIndex(g,C,w),I}return-1}getSelectAllState(){const g=this.options.filter();let{selectionFilter:_}=this.options;if(!_)return!0;if(!_.length)return!1;if(g&&g.length){if(_=this._denormalizeFilter(_),this._isLastSubFilter(_,g))return!0;if(this._isLastSubFilter(_,["!",g]))return!1}}loadSelectedItemsWithFilter(){const g=this.options.filter(),{selectionFilter:_}=this.options;return this._loadFilteredData(g?[g,"and",_]:_)}}var d=M(5345),c=M(9965),s=M(7271);class a extends T{constructor(g){super(g),this._initSelectedItemKeyHash()}_initSelectedItemKeyHash(){this._setOption("keyHashIndices",this.options.equalByReference?null:{})}getSelectedItemKeys(){return this.options.selectedItemKeys.slice(0)}getSelectedItems(){return this.options.selectedItems.slice(0)}_preserveSelectionUpdate(g,_){const{keyOf:x}=this.options;let w,D,C;if(!x)return;const I=_&&g.length>1&&!this.options.equalByReference;for(I&&(w={}),C=0;C<g.length;C++){const L=g[C],N=x(L);_?(D=this.removeSelectedItem(N,w,L?.disabled),w&&D>=0&&(w[D]=!0)):this.addSelectedItem(N,L)}I&&this._batchRemoveSelectedItems(w)}_batchRemoveSelectedItems(g){const _=this.options.selectedItemKeys.slice(0),x=this.options.selectedItems.slice(0);this.options.selectedItemKeys.length=0,this.options.selectedItems.length=0;for(let w=0;w<_.length;w++)g[w]||(this.options.selectedItemKeys.push(_[w]),this.options.selectedItems.push(x[w]));this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(this.options.selectedItemKeys)}_loadSelectedItemsCore(g,_,x,w){let D=arguments.length>4&&void 0!==arguments[4]&&arguments[4],C=(0,o.cY)();const I=this.options.key();if(!g.length&&!x)return C.resolve([]),C;if(x&&_&&!w)return C.resolve(this.getSelectedItems()),C;const L=new s.H(g,x),N=L.getCombinedFilter(I,w,D);let G=[];if(_){const{selectedItems:B}=this.options;G=N&&g.length!==B.length?(0,f.A)(B).filter(N).toArray():B.slice(0)}let k=G.length?G:this.options.plainItems(!0).filter(this.options.isSelectableItem).map(this.options.getItemData);const U=L.getLocalFilter(this.options.keyOf,this.equalKeys.bind(this),this.options.equalByReference,I);return k=k.filter(U),G.length||!x&&k.length===g.length?C.resolve(k):C=this._loadFilteredData(N,U,null,x),C}_replaceSelectionUpdate(g){const _=[],{keyOf:x}=this.options;if(x){for(let w=0;w<g.length;w++){const C=x(g[w]);_.push(C)}this.setSelectedItems(_,g)}}_warnOnIncorrectKeys(g){const{allowNullValue:_}=this.options;for(let x=0;x<g.length;x++){const w=g[x];(!_||null!==w)&&!this.isItemKeySelected(w)&&S.A.log("W1002",w)}}_isMultiSelectEnabled(){const{mode:g}=this.options;return"all"===g||"multiple"===g}_requestInProgress(){var g;return"pending"===(null===(g=this._lastLoadDeferred)||void 0===g?void 0:g.state())}_concatRequestsItems(g,_,x,w){let D;const C=_?g:[];return D=w||(0,d.R3)(g,this.options.selectedItemKeys),{addedItems:x.added.concat(D),removedItems:x.removed.concat(C),keys:g}}_collectLastRequestData(g,_,x,w){const D=_&&x,C={added:[],removed:[]},I=this._isMultiSelectEnabled();let L=I?this._lastRequestData:{};return I&&(this._shouldMergeWithLastRequest&&(D?(this._lastLoadDeferred.reject(),L={}):(0,c.V)(g,this.options.selectedItemKeys)||(C.added=L.addedItems,C.removed=L.removedItems,_||this._lastLoadDeferred.reject())),L=this._concatRequestsItems(g,_,C,this._shouldMergeWithLastRequest?void 0:w)),L}_updateKeysByLastRequestData(g,_,x){let w=g;var D,C;return this._isMultiSelectEnabled()&&this._shouldMergeWithLastRequest&&!_&&!x&&(w=(0,d.R3)(g.concat(null===(D=this._lastRequestData)||void 0===D?void 0:D.addedItems),null===(C=this._lastRequestData)||void 0===C?void 0:C.removedItems),w=(0,d.Gn)(w)),w}_loadSelectedItems(g,_,x,w){let D=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const C=this,I=(0,o.cY)(),L=C.options.filter();return this._shouldMergeWithLastRequest=this._requestInProgress(),this._lastRequestData=this._collectLastRequestData(g,_,x,w),(0,o.z7)(C._lastLoadDeferred).always(()=>{const N=C._updateKeysByLastRequestData(g,_,x);C._shouldMergeWithLastRequest=!1,C._loadSelectedItemsCore(N,_,x,L,D).done(I.resolve).fail(I.reject)}),C._lastLoadDeferred=I,I}selectedItemKeys(g,_,x,w,D){const I=this,L=I._loadSelectedItems(g,x,w,D,arguments.length>5&&void 0!==arguments[5]&&arguments[5]);return L.done(N=>{_?I._preserveSelectionUpdate(N,x):I._replaceSelectionUpdate(N),I.onSelectionChanged()}),L}addSelectedItem(g,_){if((0,b.O9)(_)&&!this.options.ignoreDisabledItems&&_.disabled)return void(-1===this.options.disabledItemKeys.indexOf(g)&&this.options.disabledItemKeys.push(g));const x=this._getKeyHash(g);-1===this._indexOfSelectedItemKey(x)&&(!(0,b.Gv)(x)&&this.options.keyHashIndices&&(this.options.keyHashIndices[x]=[this.options.selectedItemKeys.length]),this.options.selectedItemKeys.push(g),this.options.addedItemKeys.push(g),this.options.addedItems.push(_),this.options.selectedItems.push(_))}_getSelectedIndexByKey(g,_){const{selectedItemKeys:x}=this.options;for(let w=0;w<x.length;w++)if((!_||!_[w])&&this.equalKeys(x[w],g))return w;return-1}_getSelectedIndexByHash(g,_){let x=this.options.keyHashIndices[g];return x&&x.length>1&&_&&(x=x.filter(w=>!_[w])),x&&x[0]>=0?x[0]:-1}_indexOfSelectedItemKey(g,_){let x;return x=this.options.equalByReference?this.options.selectedItemKeys.indexOf(g):(0,b.Gv)(g)?this._getSelectedIndexByKey(g,_):this._getSelectedIndexByHash(g,_),x}_shiftSelectedKeyIndices(g){for(let _=g;_<this.options.selectedItemKeys.length;_++){const w=(0,W.GP)(this.options.selectedItemKeys[_]),D=this.options.keyHashIndices[w];if(D)for(let C=0;C<D.length;C++)D[C]>g&&D[C]--}}removeSelectedItem(g,_,x){if(!this.options.ignoreDisabledItems&&x)return;const w=this._getKeyHash(g),D=!!_,C=this._indexOfSelectedItemKey(w,_);if(C<0||(this.options.removedItemKeys.push(g),this.options.removedItems.push(this.options.selectedItems[C]),D)||(this.options.selectedItemKeys.splice(C,1),this.options.selectedItems.splice(C,1),(0,b.Gv)(w)||!this.options.keyHashIndices))return C;const I=this.options.keyHashIndices[w];return I&&(I.shift(),I.length||delete this.options.keyHashIndices[w],this._shiftSelectedKeyIndices(C)),C}_updateAddedItemKeys(g,_){for(let x=0;x<g.length;x++)this.isItemKeySelected(g[x])||(this.options.addedItemKeys.push(g[x]),this.options.addedItems.push(_[x]))}_updateRemovedItemKeys(g,_,x){for(let w=0;w<_.length;w++)this.isItemKeySelected(_[w])||(this.options.removedItemKeys.push(_[w]),this.options.removedItems.push(x[w]))}_isItemSelectionInProgress(g,_){return!!(_&&this._lastRequestData&&this._requestInProgress())&&(this._lastRequestData.addedItems??[]).includes(g)}_getKeyHash(g){return this.options.equalByReference?g:(0,W.GP)(g)}setSelectedItems(g,_){this._updateAddedItemKeys(g,_);const x=this.options.selectedItemKeys,w=this.options.selectedItems;this.options.equalByReference||(this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(g)),this._setOption("selectedItemKeys",g),this._setOption("selectedItems",_),this._updateRemovedItemKeys(g,x,w)}isItemDataSelected(g){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const x=this.options.keyOf(g);return this.isItemKeySelected(x,_)}isItemKeySelected(g){let x=this._isItemSelectionInProgress(g,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).checkPending);if(!x){const w=this._getKeyHash(g);x=-1!==this._indexOfSelectedItemKey(w)}return x}getSelectAllState(g){return g?this._getVisibleSelectAllState():this._getFullSelectAllState()}loadSelectedItemsWithFilter(){const g=this.options.key(),_=this.getSelectedItemKeys(),x=this.options.filter();if(!_.length)return(0,o.cY)().resolve([]);const D=new s.H(_).getCombinedFilter(g,x,!0);return this._loadFilteredData(D)}}class u{constructor(g){this.options=(0,P.X)(this._getDefaultOptions(),g,{selectedItemKeys:g.selectedKeys||[]}),this._selectionStrategy=this.options.deferred?new y(this.options):new a(this.options),this._focusedItemIndex=-1,this.options.equalByReference||this._selectionStrategy.updateSelectedItemKeyHash(this.options.selectedItemKeys)}_getDefaultOptions(){return{allowNullValue:!1,deferred:!1,equalByReference:!1,mode:"multiple",selectedItems:[],selectionFilter:[],maxFilterLengthInRequest:0,onSelectionChanged:W.lQ,key:W.lQ,keyOf:g=>g,load:()=>(0,o.cY)().resolve([]),totalCount:()=>-1,isSelectableItem:()=>!0,isItemSelected:()=>!1,getItemData:g=>g,dataFields:W.lQ,filter:W.lQ}}validate(){this._selectionStrategy.validate()}getSelectedItemKeys(){return this._selectionStrategy.getSelectedItemKeys()}getSelectedItems(){return this._selectionStrategy.getSelectedItems()}selectionFilter(g){if(void 0===g)return this.options.selectionFilter;const _=this.options.selectionFilter!==g&&JSON.stringify(this.options.selectionFilter)!==JSON.stringify(g);this.options.selectionFilter=g,_&&this.onSelectionChanged()}setSelection(g,_){return this.selectedItemKeys(g,!1,!1,!1,_)}select(g){return this.selectedItemKeys(g,!0)}deselect(g){return this.selectedItemKeys(g,!0,!0)}selectedItemKeys(g,_,x,w,D){return g=g??[],g=Array.isArray(g)?g:[g],this.validate(),this._selectionStrategy.selectedItemKeys(g,_,x,w,D)}clearSelection(){return this.selectedItemKeys([])}_addSelectedItem(g,_){this._selectionStrategy.addSelectedItem(_,g)}_removeSelectedItem(g){this._selectionStrategy.removeSelectedItem(g)}_setSelectedItems(g,_){this._selectionStrategy.setSelectedItems(g,_)}onSelectionChanged(){this._selectionStrategy.onSelectionChanged()}changeItemSelection(g,_,x){var w,D;let C;const I=this.options.plainItems(),L=I[g];let N;const{isVirtualPaging:G}=this.options,k=null===(w=(D=this.options).allowLoadByRange)||void 0===w?void 0:w.call(D),{alwaysSelectByShift:U}=this.options;let B,K=!1,J=!1;const ie=Z=>Z>=0&&!I.filter(Q=>Q.loadIndex===Z).length;if(G&&(0,b.O9)(L)&&(k&&(B=L.loadIndex-g,g=L.loadIndex),K=ie(this._focusedItemIndex),(0,b.O9)(this._shiftFocusedItemIndex)&&(J=ie(this._shiftFocusedItemIndex))),!this.isSelectable()||!this.isDataItem(L))return!1;const re=this.options.getItemData(L),q=this.options.keyOf(re);let Y=(_=_||{}).shift;if(!1===U&&Y&&(Y=!1!==k||!K&&!J),Y&&"multiple"===this.options.mode&&this._focusedItemIndex>=0)k&&(K||J)?(C=g!==this._shiftFocusedItemIndex||this._focusedItemIndex!==this._shiftFocusedItemIndex,C&&(N=this.changeItemSelectionWhenShiftKeyInVirtualPaging(g))):C=this.changeItemSelectionWhenShiftKeyPressed(g,I,B);else if(_.control){if(this._resetItemSelectionWhenShiftKeyPressed(),!x){const Z=this._selectionStrategy.isItemDataSelected(re);"single"===this.options.mode&&this.clearSelectedItems(),Z?this._removeSelectedItem(q):this._addSelectedItem(re,q)}C=!0}else{this._resetItemSelectionWhenShiftKeyPressed();const Z=this._selectionStrategy.equalKeys(this.options.selectedItemKeys[0],q);(1!==this.options.selectedItemKeys.length||!Z)&&(this._setSelectedItems([q],[re]),C=!0)}return C?((0,o.z7)(N).done(()=>{this._focusedItemIndex=g,!x&&this.onSelectionChanged()}),!0):void 0}isDataItem(g){return this.options.isSelectableItem(g)}isSelectable(){return"single"===this.options.mode||"multiple"===this.options.mode}isItemDataSelected(g){return this._selectionStrategy.isItemDataSelected(g,{checkPending:!0})}isItemSelected(g,_){return this._selectionStrategy.isItemKeySelected(g,_)}_resetItemSelectionWhenShiftKeyPressed(){delete this._shiftFocusedItemIndex}_resetFocusedItemIndex(){this._focusedItemIndex=-1}changeItemSelectionWhenShiftKeyInVirtualPaging(g){const _=this.options.getLoadOptions(g,this._focusedItemIndex,this._shiftFocusedItemIndex),x=(0,o.cY)(),w=_.skip;return this.options.load(_).done(D=>{this.changeItemSelectionWhenShiftKeyPressed(g,D,w),x.resolve()}),x.promise()}changeItemSelectionWhenShiftKeyPressed(g,_,x){let D,w=!1;const C=(0,b.O9)(x);let I=C?this._focusedItemIndex-x:this._focusedItemIndex;const{keyOf:L}=this.options,N=_[I],G=this.options.getItemData(N),k=L(G),U=N&&this.isItemDataSelected(G);let B,K,J,ie;if((0,b.O9)(this._shiftFocusedItemIndex)||(this._shiftFocusedItemIndex=this._focusedItemIndex),this._shiftFocusedItemIndex!==this._focusedItemIndex)for(D=this._focusedItemIndex<this._shiftFocusedItemIndex?1:-1,J=C?this._focusedItemIndex-x:this._focusedItemIndex,ie=C?this._shiftFocusedItemIndex-x:this._shiftFocusedItemIndex,I=J;I!==ie;I+=D)(C||this.isDataItem(_[I]))&&(K=L(this.options.getItemData(_[I])),this._removeSelectedItem(K),w=!0);if(g!==this._shiftFocusedItemIndex)for(D=g<this._shiftFocusedItemIndex?1:-1,J=C?g-x:g,ie=C?this._shiftFocusedItemIndex-x:this._shiftFocusedItemIndex,I=J;I!==ie;I+=D)(C||this.isDataItem(_[I]))&&(B=this.options.getItemData(_[I]),K=L(B),this._addSelectedItem(B,K),w=!0);return(C||this.isDataItem(N))&&!U&&(this._addSelectedItem(G,k),w=!0),w}clearSelectedItems(){this._setSelectedItems([],[])}selectAll(g){return this._resetFocusedItemIndex(),g?this._onePageSelectAll(!1):this.selectedItemKeys([],!0,!1,!0)}deselectAll(g){return this._resetFocusedItemIndex(),g?this._onePageSelectAll(!0):this.selectedItemKeys([],!0,!0,!0)}_onePageSelectAll(g){const _=this._selectionStrategy.getSelectableItems(this.options.plainItems());for(let x=0;x<_.length;x++){const w=_[x];if(this.isDataItem(w)){const D=this.options.getItemData(w),C=this.options.keyOf(D),I=this.isItemSelected(C);!I&&!g&&this._addSelectedItem(D,C),I&&g&&this._removeSelectedItem(C)}}return this.onSelectionChanged(),(0,o.cY)().resolve()}getSelectAllState(g){return this._selectionStrategy.getSelectAllState(g)}loadSelectedItemsWithFilter(){return this._selectionStrategy.loadSelectedItemsWithFilter()}}},8790:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});var W=M(1830);const P={_getSpecificDataSourceOption(){let b=this.option("dataSource"),f=!1,S={};return this._getGroupedOption()&&(b=>Array.isArray(b)&&b.every(f=>2===Object.keys(f).length&&"key"in f&&"items"in f&&Array.isArray(f.items)))(b)&&(S=b.reduce((T,y)=>{const d=y.items.map(c=>((0,W.Gv)(c)||(c={text:c},f=!0),"key"in c||(c.key=y.key),c));return T.concat(d)},[]),b={store:{type:"array",data:S},group:{selector:"key",keepInitialKeyOrder:!0}},f&&(b.searchExpr="text")),b}}},8571:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(5704),o=M(3090),P=M(7080),b=M(1520),f=M(8787),S=M(6870),T=M(4504),y=M(1830),d=M(5742);const c={top:{my:"bottom center",at:"top center",collision:"fit none"},bottom:{my:"top center",at:"bottom center",collision:"fit none"}},s={h:2,v:1};class u extends d.B{_normalizePosition(I){const L=this._props.target,N=L?.closest(".dx-slider"),G={of:L,boundaryOffset:s,boundary:N?.get(0)},k=(0,o.X)(!0,{},G,this._positionToObject(I));return this._positionSide=this._getDisplaySide(k),k}_renderContentInitialPosition(){super._renderContentInitialPosition(),this._fitIntoSlider()}_fitIntoSlider(){const{collisionSide:I,oversize:L}=S.A.calculate(this._$content,this._position).h,{left:N}=this._visualPosition;(0,T.Cy)(this._$content,{left:N+("left"===I?1:-1)*L}),this._updateVisualPositionValue()}_positionToObject(I){return(0,y.Kg)(I)?(0,o.X)({},c[I]):I}}const _=f.A.inherit({_getDefaultOptions(){return(0,o.X)(this.callBase(),{visible:!1,position:"top",hideOnOutsideClick:!1,hideTopOverlayHandler:null,hideOnParentScroll:!1,animation:null,arrowPosition:null,templatesRenderAsynchronously:!1,_fixWrapperPosition:!1,useResizeObserver:!1,showMode:"onHover",format:C=>C,value:0})},_initMarkup(){this.callBase(),this._attachToMarkup(this.option("visible")),this._toggleShowModeClass()},_renderContent(){this.callBase(),this._renderContentText()},_toggleAriaAttributes(){},_renderContentText(){const{value:C,format:I}=this.option(),L=b.A.format(C??0,I);this.$content().text(L),this._renderPosition()},_toggleShowModeClass(){const C="onHover"===this.option("showMode");this.option("target").toggleClass("dx-slider-tooltip-visible-on-hover",C)},_initPositionController(){this._positionController=new u(this._getPositionControllerConfig())},_attachToMarkup(C){const I=this.option("target");C?this.$element().appendTo(I):this.$element().detach()},_optionChanged(C){const{name:I,value:L}=C;switch(I){case"visible":this._attachToMarkup(L),this.callBase(C);break;case"showMode":this._toggleShowModeClass();break;case"format":case"value":this._renderContentText();break;default:this.callBase(C)}},updatePosition(){this._renderPosition()}}),D=P.A.inherit({_getDefaultOptions(){return(0,o.X)(this.callBase(),{hoverStateEnabled:!1,value:0,tooltip:{enabled:!1,format:C=>C,position:"top",showMode:"onHover"}})},_initMarkup(){this.callBase(),this.$element().addClass("dx-slider-handle"),this.setAria({role:"slider",valuenow:this.option("value"),label:"Slider"})},_render(){this.callBase(),this._renderTooltip()},_renderTooltip(){const{tooltip:C,value:I}=this.option(),{position:L,format:N,enabled:G,showMode:k}=C,U=(0,W.A)("<div>");this._sliderTooltip=this._createComponent(U,_,{target:this.$element(),container:U,position:L,visible:G,showMode:k,format:N,value:I})},_clean(){this.callBase(),this._sliderTooltip=null},_updateTooltipOptions(C){var I;const L=P.A.getOptionsFromContainer(C);this._setWidgetOption("_sliderTooltip",[L]),null===(I=this._sliderTooltip)||void 0===I||I.option("visible",L.enabled)},_optionChanged(C){const{name:I,value:L}=C;switch(I){case"value":var N;null===(N=this._sliderTooltip)||void 0===N||N.option("value",L),this.setAria("valuenow",L);break;case"tooltip":this._updateTooltipOptions(C);break;default:this.callBase(C)}},updateTooltipPosition(){var C;null===(C=this._sliderTooltip)||void 0===C||C.updatePosition()},repaint(){var C;null===(C=this._sliderTooltip)||void 0===C||C.repaint()}})},9281:(In,Ze,M)=>{"use strict";M.d(Ze,{Ax:()=>Y,po:()=>q,WU:()=>Z});var W=M(3686),o=M(5704),P=M(3090),b=M(1363),f=M(4072),S=M(9212),T=M(7358),y=M(127),d=M(8535),c=M(1830),s=M(778),a=M(9293),u=M(3949),h=M(9524);const L=class I extends u.A{_getDefaultOptions(){return(0,P.X)(super._getDefaultOptions(),{shading:!1,useInkRipple:!1,callOverlayRenderShading:!1,width:"auto",zIndex:1500,_observeContentResize:!1})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,S.gx)(),options:{useInkRipple:!0}}])}_moveToContainer(){this._$wrapper.appendTo(this.$element()),this._$content.appendTo(this._$wrapper)}_render(){this.$element().addClass("dx-fa-button"),this._renderIcon(),this._renderLabel(),super._render(),this.option("useInkRipple")&&this._renderInkRipple(),this._renderClick()}_renderLabel(){this._$label&&this._$label.remove();const te=this.option("label");if(!te)return void(this._$label=null);const pe=(0,o.A)("<div>").addClass("dx-fa-button-label"),z=(0,o.A)("<div>").addClass("dx-fa-button-label-wrapper");this._$label=z.prependTo(this.$content()).append(pe.text(te)),this.$content().toggleClass("dx-fa-button-content-reverse",this._isPositionLeft(this.option("parentPosition")))}_isPositionLeft(te){let pe="";return te&&((0,c.Qd)(te)&&te.at?pe=te.at.x?te.at.x:te.at:"string"==typeof te&&(pe=te)),"left"===pe.split(" ")[0]}_renderButtonIcon(te,pe,z){te&&te.remove(),te=(0,o.A)("<div>").addClass(z);const oe=(0,d.N)(pe);return te.append(oe).appendTo(this.$content()),te}_renderIcon(){this._$icon=this._renderButtonIcon(this._$icon,this._options.silent("icon"),"dx-fa-button-icon")}_renderWrapper(){this._options.silent("callOverlayRenderShading")&&super._renderWrapper()}_getVisibleActions(te){return(te||this.option("actions")||[]).filter(z=>z.option("visible"))}_getActionComponent(){return 1===this._getVisibleActions().length?this._getVisibleActions()[0]:this.option("actionComponent")||this.option("actions")[0]}_initContentReadyAction(){this._contentReadyAction=this._getActionComponent()._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]},!0)}_fireContentReadyAction(){this._contentReadyAction({actionElement:this.$element()})}_updateZIndexStackPosition(){const te=this.option("zIndex");this._$wrapper.css("zIndex",te),this._$content.css("zIndex",te)}_setClickAction(){const te=(0,a.b4)(s.U,this.NAME),pe=this.$element().find(".dx-overlay-content");f.A.off(pe,te),f.A.on(pe,te,z=>{const oe={event:z,actionElement:this.element(),element:this._getActionComponent().$element()};this._clickAction(oe)})}_defaultActionArgs(){return{component:this._getActionComponent()}}_renderClick(){this._clickAction=this._getActionComponent()._createActionByOption("onClick"),this._setClickAction()}_renderInkRipple(){this._inkRipple=(0,h.XX)()}_getInkRippleContainer(){return this._$icon}_toggleActiveState(te,pe,z){if(super._toggleActiveState.apply(this,arguments),!this._inkRipple)return;const oe={element:this._getInkRippleContainer(),event:z};pe?this._inkRipple.showWave(oe):this._inkRipple.hideWave(oe)}_optionChanged(te){switch(te.name){case"icon":this._renderIcon();break;case"onClick":this._renderClick();break;case"label":this._renderLabel();break;case"visible":this._currentVisible=te.previousValue,te.value?this._show():this._hide();break;case"useInkRipple":this._render();break;default:super._optionChanged(te)}}},{getSwatchContainer:N}=T.A;let J=null;const ie=Q=>{const{animation:te,actionComponent:pe,actionVisible:z,actions:oe,activeStateEnabled:ae,direction:ee,elementAttr:he,hint:de,hoverStateEnabled:ue,icon:be,id:ve,index:le,label:Ce,onClick:ye,onContentReady:ge,parentPosition:fe,position:xe,visible:Te,zIndex:Ee}=Q.option();return(0,P.X)({},{animation:te,actionComponent:pe,actionVisible:z,actions:oe,activeStateEnabled:ae,direction:ee,elementAttr:he,hint:de,hoverStateEnabled:ue,icon:be,id:ve,index:le,label:Ce,onClick:ye,onContentReady:ge,parentPosition:fe,position:xe,visible:Te,zIndex:Ee},{onInitialized:null,onDisposing:null})};class re extends L{_getDefaultOptions(){const te={icon:"add",closeIcon:"close",position:{at:"right bottom",my:"right bottom",offset:{x:-16,y:-16}},maxSpeedDialActionCount:5,hint:"",label:"",direction:"auto",actions:[],activeStateEnabled:!0,hoverStateEnabled:!0,indent:(0,S.ip)()?49:55,childIndent:40,childOffset:(0,S.ip)()?2:9,callOverlayRenderShading:!0,hideOnOutsideClick:!0};return(0,P.X)(super._getDefaultOptions(),(0,P.X)(te,(0,W.A)().floatingActionButtonConfig,{shading:!1}))}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,S.Ft)()&&!(0,S.ip)(),options:{indent:60,childIndent:60,childOffset:0}},{device:()=>(0,S.Ft)()&&(0,S.ip)(),options:{indent:48,childIndent:48,childOffset:0}},{device:()=>(0,S.gx)()&&!(0,S.ip)(),options:{indent:72,childIndent:56,childOffset:8}},{device:()=>(0,S.gx)()&&(0,S.ip)(),options:{indent:58,childIndent:48,childOffset:1}}])}_render(){this.$element().addClass("dx-fa-button-main"),super._render(),this._moveToContainer(),this._renderCloseIcon(),this._renderClick()}_renderLabel(){super._renderLabel(),this.$element().toggleClass("dx-fa-button-with-label",!!this._$label)}_renderIcon(){super._renderIcon(),this.$element().toggleClass("dx-fa-button-without-icon",!this.option("icon"))}_renderCloseIcon(){this._$closeIcon=this._renderButtonIcon(this._$closeIcon,this._options.silent("closeIcon"),"dx-fa-button-icon-close"),this._$closeIcon.addClass("dx-state-invisible")}_renderClick(){this._clickAction=1===this._getVisibleActions().length?this._getActionComponent()._createActionByOption("onClick"):this._createAction(this._clickHandler.bind(this)),this._setClickAction()}_getVisibleActions(te){return(te||this.option("actions")).filter(z=>z.option("visible"))}_getCurrentOptions(te){var pe;const z=null===(pe=J)||void 0===pe?void 0:pe._getVisibleActions(te),oe=this._getDefaultOptions();return delete oe.closeOnOutsideClick,1===z.length?(0,P.X)(ie(z[0]),{position:this._getPosition()}):(0,P.X)(oe,{visible:0!==z.length})}_clickHandler(){var te;const pe=this._actionItems.filter(oe=>oe.option("actionVisible")).sort((oe,ae)=>oe.option("index")-ae.option("index"));if(1===pe.length)return;const z=pe.length-1;for(let oe=0;oe<pe.length;oe++)pe[oe].option("animation",this._getActionAnimation(pe[oe],oe,z)),pe[oe].option("position",this._getActionPosition(pe,oe)),pe[oe]._$wrapper.css("position",this._$wrapper.css("position")),pe[oe].toggle();null!==(te=(0,W.A)().floatingActionButtonConfig)&&void 0!==te&&te.shading&&(this._isShadingShown=!this.option("shading"),this.option("shading",this._isShadingShown)),this._$icon.toggleClass("dx-state-invisible"),this._$closeIcon.toggleClass("dx-state-invisible")}_updateZIndexStackPosition(){super._updateZIndexStackPosition(),this._overlayStack().push(this)}_renderActions(){const te=this.option("actions");if(this._actionItems&&this._actionItems.length&&(this._actionItems.forEach(pe=>{pe.dispose(),pe.$element().remove()}),this._actionItems=[]),this._actionItems=[],1!==te.length)for(let pe=0;pe<te.length;pe++){const z=te[pe],oe=(0,o.A)("<div>").appendTo(N(z.$element()));f.A.off(oe,"click"),f.A.on(oe,"click",()=>{this._clickHandler()}),z._options.silent("actionComponent",z),z._options.silent("parentPosition",this._getPosition()),z._options.silent("actionVisible",z._options.silent("visible")),this._actionItems.push(this._createComponent(oe,L,(0,P.X)({},ie(z),{visible:!1})))}}_getActionAnimation(te,pe,z){return te._options.silent("animation.show.delay",30*pe),te._options.silent("animation.hide.delay",30*(z-pe)),te._options.silent("animation")}_getDirectionIndex(te,pe){if("auto"===pe){const z=(0,b.Oq)(this.$content()),oe=this.initialOption("indent")+this.initialOption("childIndent")*te.length-z,ae=this.$content().offset().top;return oe<ae||ae>=(0,b.Oq)(this._positionController._$wrapperCoveredElement)-z-ae?-1:1}return"down"!==pe?-1:1}_getActionPosition(te,pe){const z=te[pe],oe=this.initialOption("childOffset"),ae=z._options.silent("label")&&!this._$label?this._isPositionLeft(this._getPosition())?oe:-oe:0,ee=this.initialOption("indent")+this.initialOption("childIndent")*pe,he=this._getDirectionIndex(te,this.option("direction"))*ee,de=z._options.silent("label")?this._isPositionLeft(this._getPosition())?"left":"right":"center";return{of:this.$content(),at:de,my:de,offset:{x:ae,y:he}}}_outsideClickHandler(te){this._isShadingShown&&(0,o.A)(te.target)[0]===this._$wrapper[0]&&(te.preventDefault(),this._clickHandler())}_setPosition(){this.option("visible")&&(this._hide(),this._show())}_getPosition(){return this._getDefaultOptions().position}_getInkRippleContainer(){return this.$content()}_optionChanged(te){switch(te.name){case"actions":this._isVisible()&&(this._renderIcon(),this._renderLabel()),this._renderCloseIcon(),this._renderClick(),this._renderActions();break;case"maxSpeedDialActionCount":this._renderActions();break;case"closeIcon":this._renderCloseIcon();break;case"position":super._optionChanged(te),this._setPosition();break;case"label":this._isVisible()&&this._renderLabel(),this._setPosition();break;case"icon":this._isVisible()&&this._renderIcon();break;default:super._optionChanged(te)}}}function q(Q){Q._options.silent("onInitializing",null);let te=!1;if(J){const pe=J.option("actions");if(pe.forEach(z=>{if(z._options.silent("id")===Q._options.silent("id"))return te=!0,Q}),delete J._options.position,te)J.option(1===pe.length?(0,P.X)({},ie(pe[0]),{actions:pe,position:J._getPosition()}):(0,P.X)(J._getCurrentOptions(pe),{actions:pe}));else{if(J._getVisibleActions(pe).length>=J.option("maxSpeedDialActionCount"))return Q.dispose(),void y.A.log("W1014");pe.push(Q),J.option((0,P.X)(J._getCurrentOptions(pe),{actions:pe}))}}else{const pe=(0,o.A)("<div>").appendTo(N(Q.$element()));J=Q._createComponent(pe,re,(0,P.X)({},ie(Q),{actions:[Q]}))}}function Y(Q){if(!J)return;let te=J.option("actions");const pe=te.length;te=te.filter(z=>z._options.silent("id")!==Q),pe!==te.length&&(te.length?J.option(1===te.length?(0,P.X)({},ie(te[0]),{actions:te}):{actions:te}):(J.dispose(),J.$element().remove(),J=null))}function Z(){if(!J)return;const Q=J._getVisibleActions(),te=1===Q.length?Q[0].option("icon"):J._getDefaultOptions().icon,pe=1===Q.length?Q[0].option("label"):J._getDefaultOptions().label;J.option({actions:J.option("actions"),icon:te,closeIcon:J._getDefaultOptions().closeIcon,position:J._getPosition(),label:pe,maxSpeedDialActionCount:J._getDefaultOptions().maxSpeedDialActionCount,direction:J._getDefaultOptions().direction})}},5685:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>u});var W=M(5704),o=M(778),P=M(4072),b=M(9209),f=M(9293),S=M(974);const T=b.A.down;class u extends S.A{_create(){const g=(0,W.A)("<span>").addClass("dx-clear-button-area").append((0,W.A)("<span>").addClass("dx-icon").addClass("dx-icon-clear"));return this._addToContainer(g),this.update(!0),{instance:g,$element:g}}_isVisible(){const{editor:g}=this;return g._isClearButtonVisible()}_attachEvents(g,_){const{editor:x}=this,w=x.NAME;P.A.on(_,(0,f.b4)(T,w),D=>{D.preventDefault(),"mouse"!==D.pointerType&&x._clearValueHandler(D)}),P.A.on(_,(0,f.b4)(o.U,w),D=>x._clearValueHandler(D))}_legacyRender(g,_){g.toggleClass("dx-show-clear-button",_)}update(){!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&super.update();const{editor:_,instance:x}=this,w=_.$element(),D=this._isVisible();x&&x.toggleClass("dx-state-invisible",!D),this._legacyRender(w,D)}}},221:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>cn});var W=M(1973),o=M(5704),P=M(4859),b=M(3090),f=M(2660),S=M(9495),T=M(1830),y=M(4072),d=M(8573),c=M(9293),s=M(8360),a=M(402),u=M(3686),h=M(5973),g=M(6054),_=M(2925),x=M(2013),w=M(6021),D=M(1363),C=M(9209),I=M(6620),L=M(2359),N=M(9212),G=M(127),k=M(5685),U=M(6110),B=M(778),K=M(4451),J=M(1134),oe=M(7525);const xe=["KeyDown","KeyPress","KeyUp","Change","Cut","Copy","Paste","Input"],Te=["tab","enter","shift","control","alt","escape","pageUp","pageDown","end","home","leftArrow","upArrow","rightArrow","downArrow"];let Ee=class z{constructor(Et){this.NAME="dxLabel",this._props=Et,this._id=`dx-texteditor-label-${new _.A}`,this._render(),this._toggleMarkupVisibility()}_isVisible(){return!!this._props.text&&"hidden"!==this._props.mode}_render(){this._$before=(0,o.A)("<div>").addClass("dx-label-before"),this._$labelSpan=(0,o.A)("<span>"),this._$label=(0,o.A)("<div>").addClass("dx-label").append(this._$labelSpan),this._$after=(0,o.A)("<div>").addClass("dx-label-after"),this._$root=(0,o.A)("<div>").addClass("dx-texteditor-label").attr("id",this._id).append(this._$before).append(this._$label).append(this._$after),this._updateMark(),this._updateText(),this._updateBeforeWidth(),this._updateMaxWidth()}_toggleMarkupVisibility(){const Et=this._isVisible();this._updateEditorBeforeButtonsClass(Et),this._updateEditorLabelClass(Et),Et?this._$root.appendTo(this._props.$editor):this._$root.detach(),this._attachEvents()}_attachEvents(){const Et=(0,c.b4)(B.U,this.NAME),hn=(0,c.b4)(J.n,this.NAME),$n=(0,c.b4)(K.vu,this.NAME);y.A.off(this._$labelSpan,Et),y.A.off(this._$labelSpan,hn),y.A.off(this._$labelSpan,$n),this._isVisible()&&this._isOutsideMode()&&(y.A.on(this._$labelSpan,Et,Ln=>{""===(0,U.zk)().getSelection().toString()&&(this._props.onClickHandler(),Ln.preventDefault())}),y.A.on(this._$labelSpan,hn,Ln=>{this._props.onHoverHandler(Ln)}),y.A.on(this._$labelSpan,$n,Ln=>{this._props.onActiveHandler(Ln)}))}_updateEditorLabelClass(Et){this._props.$editor.removeClass("dx-texteditor-with-floating-label").removeClass("dx-texteditor-label-outside").removeClass("dx-texteditor-with-label"),Et&&(this._props.$editor.addClass("floating"===this._props.mode?"dx-texteditor-with-floating-label":"dx-texteditor-with-label"),this._isOutsideMode()&&this._props.$editor.addClass("dx-texteditor-label-outside"))}_isOutsideMode(){return"outside"===this._props.mode}_updateEditorBeforeButtonsClass(){let Et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible();this._props.$editor.removeClass("dx-texteditor-with-before-buttons"),Et&&this._props.$editor.addClass(this._props.containsButtonsBefore?"dx-texteditor-with-before-buttons":"")}_updateMark(){this._$labelSpan.attr("data-mark",this._props.mark)}_updateText(){this._$labelSpan.text(this._props.text)}_updateBeforeWidth(){if(this._isVisible()){const Et=this._props.beforeWidth??this._props.getBeforeWidth();this._$before.css({width:Et}),this._updateLabelTransform()}}_updateLabelTransform(){let Et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._$labelSpan.css("transform",""),this._isVisible()&&this._isOutsideMode()){const $n=(this._props.rtlEnabled?1:-1)*((0,D.RG)(this._$before)+Et);this._$labelSpan.css("transform",`translateX(${$n}px)`)}}_updateMaxWidth(){if(this._isVisible()&&!this._isOutsideMode()){const Et=this._props.containerWidth??this._props.getContainerWidth();this._$label.css({maxWidth:Et})}}$element(){return this._$root}isVisible(){return this._isVisible()}getId(){if(this._isVisible())return this._id}updateMode(Et){this._props.mode=Et,this._toggleMarkupVisibility(),this._updateBeforeWidth(),this._updateMaxWidth()}updateText(Et){this._props.text=Et,this._updateText(),this._toggleMarkupVisibility(),this._updateBeforeWidth(),this._updateMaxWidth()}updateMark(Et){this._props.mark=Et,this._updateMark()}updateContainsButtonsBefore(Et){this._props.containsButtonsBefore=Et,this._updateEditorBeforeButtonsClass()}updateBeforeWidth(Et){this._props.beforeWidth=Et,this._updateBeforeWidth()}updateMaxWidth(Et){this._props.containerWidth=Et,this._updateMaxWidth()}};function Oe(dt){if((0,T.O9)(dt)&&!Array.isArray(dt))throw G.A.Error("E1053")}const $e=I.A.inherit({ctor(dt,Et){Et&&Oe(Et.buttons),this._buttonCollection=new oe.A(this,this._getDefaultButtons()),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._labelContainerElement=null,this.callBase.apply(this,arguments)},_getDefaultOptions(){return(0,b.X)(this.callBase(),{buttons:void 0,value:"",spellcheck:!1,showClearButton:!1,valueChangeEvent:"change",placeholder:"",inputAttr:{},onFocusIn:null,onFocusOut:null,onKeyDown:null,onKeyUp:null,onChange:null,onInput:null,onCut:null,onCopy:null,onPaste:null,onEnterKey:null,mode:"text",hoverStateEnabled:!0,focusStateEnabled:!0,text:void 0,displayValueFormatter:dt=>(0,T.O9)(dt)&&!1!==dt?dt:"",stylingMode:(0,u.A)().editorStylingMode||"outlined",showValidationMark:!0,label:"",labelMode:"static",labelMark:""})},_defaultOptionsRules(){return this.callBase().concat([{device(){const dt=(0,N.ss)();return(0,N.gx)(dt)},options:{labelMode:"floating",stylingMode:(0,u.A)().editorStylingMode||"filled"}},{device(){const dt=(0,N.ss)();return(0,N.Ft)(dt)},options:{labelMode:"outside"}}])},_getDefaultButtons:()=>[{name:"clear",Ctor:k.A}],_isClearButtonVisible(){return this.option("showClearButton")&&!this.option("readOnly")},_input(){return this.$element().find(".dx-texteditor-input").first()},_isFocused(){return(0,a.in)(this._input())||this.callBase()},_inputWrapper(){return this.$element()},_buttonsContainer(){return this._inputWrapper().find(".dx-texteditor-buttons-container").eq(0)},_isControlKey:dt=>Te.includes(dt),_renderStylingMode(){this.callBase(),this._updateButtonsStyling(this.option("stylingMode"))},_initMarkup(){this.$element().addClass("dx-texteditor"),this._renderInput(),this._renderButtonContainers(),this._renderStylingMode(),this._renderInputType(),this._renderPlaceholder(),this._renderProps(),this.callBase(),this._renderValue(),this._renderLabel()},_render(){this.callBase(),this._refreshValueChangeEvent(),this._refreshEvents(),this._renderEnterKeyAction(),this._renderEmptinessEvent()},_renderInput(){this._$textEditorContainer=(0,o.A)("<div>").addClass("dx-texteditor-container").appendTo(this.$element()),this._$textEditorInputContainer=(0,o.A)("<div>").addClass("dx-texteditor-input-container").appendTo(this._$textEditorContainer),this._$textEditorInputContainer.append(this._createInput())},_getInputContainer(){return this._$textEditorInputContainer},_renderPendingIndicator(){this.$element().addClass("dx-validation-pending");const dt=this._getInputContainer(),Et=(0,o.A)("<div>").addClass("dx-pending-indicator").appendTo(dt);this._pendingIndicator=this._createComponent(Et,L.A)},_disposePendingIndicator(){this._pendingIndicator&&(this._pendingIndicator.dispose(),this._pendingIndicator.$element().remove(),this._pendingIndicator=null,this.$element().removeClass("dx-validation-pending"))},_renderValidationState(){this.callBase(),"pending"===this.option("validationStatus")?(!this._pendingIndicator&&this._renderPendingIndicator(),this._showValidMark=!1):("invalid"===this.option("validationStatus")&&(this._showValidMark=!1),!this._showValidMark&&!0===this.option("showValidationMark")&&(this._showValidMark="valid"===this.option("validationStatus")&&!!this._pendingIndicator),this._disposePendingIndicator()),this._toggleValidMark()},_getButtonsContainer(){return this._$textEditorContainer},_renderButtonContainers(){const dt=this.option("buttons"),Et=this._getButtonsContainer();this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(dt,Et),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(dt,Et)},_cleanButtonContainers(){var dt,Et;null===(dt=this._$beforeButtonsContainer)||void 0===dt||dt.remove(),null===(Et=this._$afterButtonsContainer)||void 0===Et||Et.remove(),this._buttonCollection.clean()},_clean(){this._buttonCollection.clean(),this._disposePendingIndicator(),this._unobserveLabelContainerResize(),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._$textEditorContainer=null,this.callBase()},_createInput(){const dt=(0,o.A)("<input>");return this._applyInputAttributes(dt,this.option("inputAttr")),dt},_setSubmitElementName(dt){const Et=this.option("inputAttr.name");return this.callBase(dt||Et||"")},_applyInputAttributes(dt,Et){const hn=(0,b.X)(this._getDefaultAttributes(),Et);dt.attr(hn).addClass("dx-texteditor-input"),this._setInputMinHeight(dt)},_setInputMinHeight(dt){dt.css("minHeight",this.option("height")?"0":"")},_getPlaceholderAttr(){const{ios:dt,mac:Et}=h.A.real(),{placeholder:hn}=this.option();return hn||(dt||Et?" ":null)},_getDefaultAttributes(){return{autocomplete:"off",placeholder:this._getPlaceholderAttr()}},_updateButtons(dt){this._buttonCollection.updateButtons(dt)},_updateButtonsStyling(dt){(0,f.__)(this.option("buttons"),(Et,hn)=>{let{options:$n,name:Ln}=hn;if($n&&!$n.stylingMode&&this.option("visible")){const Nt=this.getButton(Ln);Nt.option&&Nt.option("stylingMode","underlined"===dt?"text":"contained")}})},_renderValue(){return this._renderInputValue().promise()},_renderInputValue(dt){dt=dt??this.option("value");let Et=this.option("text");const hn=this.option("displayValue"),$n=this.option("displayValueFormatter");return void 0!==hn&&null!==dt?Et=$n(hn):(0,T.O9)(Et)||(Et=$n(dt)),this.option("text",Et),this._input().val()!==((0,T.O9)(Et)?Et:"")?this._renderDisplayText(Et):this._toggleEmptinessEventHandler(),(0,w.cY)().resolve()},_renderDisplayText(dt){this._input().val(dt),this._toggleEmptinessEventHandler()},_isValueValid(){if(this._input().length){const{validity:dt}=this._input().get(0);if(dt)return dt.valid}return!0},_toggleEmptiness(dt){this.$element().toggleClass("dx-texteditor-empty",dt),this._togglePlaceholder(dt)},_togglePlaceholder(dt){this.$element().find(".dx-placeholder").eq(0).toggleClass("dx-state-invisible",!dt)},_renderProps(){this._toggleReadOnlyState(),this._toggleSpellcheckState(),this._toggleTabIndex()},_toggleDisabledState(dt){this.callBase.apply(this,arguments),this._input().prop("disabled",dt)},_toggleTabIndex(){const dt=this._input(),Et=this.option("disabled"),hn=this.option("focusStateEnabled");Et||!hn?dt.attr("tabIndex",-1):dt.removeAttr("tabIndex")},_toggleReadOnlyState(){this._input().prop("readOnly",this._readOnlyPropValue()),this.callBase()},_readOnlyPropValue(){return this.option("readOnly")},_toggleSpellcheckState(){this._input().prop("spellcheck",this.option("spellcheck"))},_unobserveLabelContainerResize(){this._labelContainerElement&&(x.A.unobserve(this._labelContainerElement),this._labelContainerElement=null)},_getLabelContainer(){return this._input()},_getLabelContainerWidth(){return(0,D.RG)(this._getLabelContainer())},_getLabelBeforeWidth(){return(this._$beforeButtonsContainer&&(0,D.RG)(this._$beforeButtonsContainer))??0},_updateLabelWidth(){this._label.updateBeforeWidth(this._getLabelBeforeWidth()),this._label.updateMaxWidth(this._getLabelContainerWidth())},_getFieldElement(){return this._getLabelContainer()},_setFieldAria(dt){var Et;const hn=this.option("inputAttr"),$n=hn?.["aria-label"],Ln=null===(Et=this._label)||void 0===Et?void 0:Et.getId(),Nt=$n?void 0:Ln;(Nt||dt)&&this.setAria({labelledby:Nt,label:$n},this._getFieldElement())},_renderLabel(){this._unobserveLabelContainerResize(),this._labelContainerElement=(0,o.A)(this._getLabelContainer()).get(0);const{label:dt,labelMode:Et,labelMark:hn,rtlEnabled:$n}=this.option(),Ln={onClickHandler:()=>{this.focus()},onHoverHandler:Nt=>{Nt.stopPropagation()},onActiveHandler:Nt=>{Nt.stopPropagation()},$editor:this.$element(),text:dt,mark:hn,mode:Et,rtlEnabled:$n,containsButtonsBefore:!!this._$beforeButtonsContainer,getContainerWidth:()=>this._getLabelContainerWidth(),getBeforeWidth:()=>this._getLabelBeforeWidth()};this._label=new Ee(Ln),this._setFieldAria(),this._labelContainerElement&&x.A.observe(this._labelContainerElement,this._updateLabelWidth.bind(this))},_renderPlaceholder(){this._renderPlaceholderMarkup(),this._attachPlaceholderEvents()},_renderPlaceholderMarkup(){this._$placeholder&&(this._$placeholder.remove(),this._$placeholder=null);const dt=this._input(),Et=this.option("placeholder"),hn={id:Et?`dx-${new _.A}`:void 0,"data-dx_placeholder":Et},$n=this._$placeholder=(0,o.A)("<div>").attr(hn);$n.insertAfter(dt),$n.addClass("dx-placeholder")},_attachPlaceholderEvents(){const dt=(0,c.b4)(C.A.up,this.NAME);y.A.on(this._$placeholder,dt,()=>{y.A.trigger(this._input(),"focus")}),this._toggleEmptinessEventHandler()},_placeholder(){return this._$placeholder||(0,o.A)()},_clearValueHandler(dt){const Et=this._input();dt.stopPropagation(),this._saveValueChangeEvent(dt),this._clearValue(),!this._isFocused()&&y.A.trigger(Et,"focus"),y.A.trigger(Et,"input")},_clearValue(){this.clear()},_renderEvents(){const dt=this._input();(0,f.__)(xe,(Et,hn)=>{if(this.hasActionSubscription(`on${hn}`)){const $n=this._createActionByOption(`on${hn}`,{excludeValidators:["readOnly"]});y.A.on(dt,(0,c.b4)(hn.toLowerCase(),this.NAME),Ln=>{this._disposed||$n({event:Ln})})}})},_refreshEvents(){const dt=this._input();(0,f.__)(xe,(Et,hn)=>{y.A.off(dt,(0,c.b4)(hn.toLowerCase(),this.NAME))}),this._renderEvents()},_keyPressHandler(){this.option("text",this._input().val())},_keyDownHandler(dt){const Et=this._input(),hn=dt.ctrlKey&&"enter"===(0,c.YD)(dt),$n=Et.val()!==this.option("value");hn&&$n&&y.A.trigger(Et,"change")},_getValueChangeEventOptionName:()=>"valueChangeEvent",_renderValueChangeEvent(){const dt=(0,c.b4)(this._renderValueEventName(),`${this.NAME}TextChange`),Et=(0,c.b4)(this.option(this._getValueChangeEventOptionName()),`${this.NAME}ValueChange`),hn=(0,c.b4)("keydown",`${this.NAME}TextChange`),$n=this._input();y.A.on($n,dt,this._keyPressHandler.bind(this)),y.A.on($n,Et,this._valueChangeEventHandler.bind(this)),y.A.on($n,hn,this._keyDownHandler.bind(this))},_cleanValueChangeEvent(){const dt=`.${this.NAME}ValueChange`,Et=`.${this.NAME}TextChange`;y.A.off(this._input(),dt),y.A.off(this._input(),Et)},_refreshValueChangeEvent(){this._cleanValueChangeEvent(),this._renderValueChangeEvent()},_renderValueEventName:()=>"input change keypress",_focusTarget(){return this._input()},_focusEventTarget(){return this.element()},_isInput(dt){return dt===this._input().get(0)},_preventNestedFocusEvent(dt){if(dt.isDefaultPrevented())return!0;let Et=this._isNestedTarget(dt.relatedTarget);return"focusin"===dt.type?Et=Et&&this._isNestedTarget(dt.target)&&!this._isInput(dt.target):Et||this._toggleFocusClass(!1,this.$element()),Et&&dt.preventDefault(),Et},_isNestedTarget(dt){return!!this.$element().find(dt).length},_focusClassTarget(){return this.$element()},_focusInHandler(dt){this._preventNestedFocusEvent(dt),this.callBase.apply(this,arguments)},_focusOutHandler(dt){this._preventNestedFocusEvent(dt),this.callBase.apply(this,arguments)},_toggleFocusClass(dt,Et){this.callBase(dt,this._focusClassTarget(Et))},_hasFocusClass(dt){return this.callBase((0,o.A)(dt||this.$element()))},_renderEmptinessEvent(){const dt=this._input();y.A.on(dt,"input blur",this._toggleEmptinessEventHandler.bind(this))},_toggleEmptinessEventHandler(){const dt=this._input().val(),Et=(""===dt||null===dt)&&this._isValueValid();this._toggleEmptiness(Et)},_valueChangeEventHandler(dt,Et){this.option("readOnly")||(this._saveValueChangeEvent(dt),this.option("value",arguments.length>1?Et:this._input().val()),this._saveValueChangeEvent(void 0))},_renderEnterKeyAction(){this._enterKeyAction=this._createActionByOption("onEnterKey",{excludeValidators:["readOnly"]}),y.A.off(this._input(),"keyup.onEnterKey.dxTextEditor"),y.A.on(this._input(),"keyup.onEnterKey.dxTextEditor",this._enterKeyHandlerUp.bind(this))},_enterKeyHandlerUp(dt){this._disposed||"enter"===(0,c.YD)(dt)&&this._enterKeyAction({event:dt})},_updateValue(){this._options.silent("text",null),this._renderValue()},_dispose(){this._enterKeyAction=void 0,this.callBase()},_getSubmitElement(){return this._input()},_hasActiveElement(){return this._input().is(g.A.getActiveElement(this._input()[0]))},_optionChanged(dt){const{name:Et,fullName:hn,value:$n}=dt,Ln=Et.replace("on","");if(xe.includes(Ln))this._refreshEvents();else switch(Et){case"valueChangeEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onValueChanged":this._createValueChangeAction();break;case"focusStateEnabled":this.callBase(dt),this._toggleTabIndex();break;case"spellcheck":this._toggleSpellcheckState();break;case"mode":this._renderInputType();break;case"onEnterKey":this._renderEnterKeyAction();break;case"placeholder":this._renderPlaceholder(),this._setFieldAria(!0),this._input().attr({placeholder:this._getPlaceholderAttr()});break;case"label":this._label.updateText($n),this._setFieldAria(!0);break;case"labelMark":this._label.updateMark($n);break;case"labelMode":this._label.updateMode($n),this._setFieldAria();break;case"width":this.callBase(dt),this._label.updateMaxWidth(this._getLabelContainerWidth());break;case"readOnly":case"disabled":this._updateButtons(),this.callBase(dt);break;case"showClearButton":this._updateButtons(["clear"]);break;case"text":case"showValidationMark":break;case"value":this._updateValue(),this.callBase(dt);break;case"inputAttr":this._applyInputAttributes(this._input(),this.option(Et));break;case"stylingMode":this._renderStylingMode(),this._updateLabelWidth();break;case"buttons":hn===Et&&Oe($n),this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")),this._updateLabelWidth(),this._label.updateContainsButtonsBefore(!!this._$beforeButtonsContainer);break;case"visible":this.callBase(dt),$n&&this.option("buttons")&&(this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")));break;case"displayValueFormatter":this._invalidate();break;default:this.callBase(dt)}},_renderInputType(){this._setInputType(this.option("mode"))},_setInputType(dt){const Et=this._input();"search"===dt&&(dt="text");try{Et.prop("type",dt)}catch{Et.prop("type","text")}},getButton(dt){return this._buttonCollection.getButton(dt)},focus(){y.A.trigger(this._input(),"focus")},clear(){this._showValidMark&&(this._showValidMark=!1,this._renderValidationState());const dt=this._getDefaultOptions();this.option("value")===dt.value?(this._options.silent("text",""),this._renderValue()):this.option("value",dt.value)},_resetToInitialValue(){this.option("value")===this._initialValue?(this._options.silent("text",this._initialValue),this._renderValue()):this.callBase(),this._disposePendingIndicator(),this._showValidMark=!1,this._toggleValidMark()},_toggleValidMark(){this.$element().toggleClass("dx-valid",!!this._showValidMark)},reset(){arguments.length?this.callBase(arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0):this.callBase()},on(dt,Et){const hn=this.callBase(dt,Et),$n=dt.charAt(0).toUpperCase()+dt.substr(1);return xe.includes($n)&&this._refreshEvents(),hn}});class Ue{constructor(Et){this._value=" ",(0,b.X)(this,Et)}next(Et){if(!arguments.length)return this._next;this._next=Et}_prepareHandlingArgs(Et,hn){hn=hn||{};const $n=Object.prototype.hasOwnProperty.call(Et,"value")?"value":"text";return Et[$n]=hn.str??Et[$n],Et.start=hn.start??Et.start,Et.length=hn.length??Et.length,Et.index+=1,Et}first(Et){return Et=Et||0,this.next().first(Et+1)}isAccepted(Et){return!1}adjustedCaret(Et,hn,$n){return hn?this._adjustedForward(Et,0,$n):this._adjustedBackward(Et,0,$n)}_adjustedForward(Et,hn,$n){}_adjustedBackward(Et,hn,$n){}isValid(Et){}reset(){}clear(Et){}text(){}value(){}rawValue(){}handle(Et){}}class ot extends Ue{next(){}handle(){return 0}text(){return""}value(){return""}first(){return 0}rawValue(){return""}adjustedCaret(){return 0}isValid(){return!0}}class st extends Ue{text(){return(" "!==this._value?this._value:this.maskChar)+this.next().text()}value(){return this._value+this.next().value()}rawValue(){return this._value+this.next().rawValue()}handle(Et){const hn=Object.prototype.hasOwnProperty.call(Et,"value")?Et.value:Et.text;if(!hn||!hn.length||!Et.length)return 0;if(Et.start)return this.next().handle(this._prepareHandlingArgs(Et,{start:Et.start-1}));const $n=hn[0],Ln=hn.substring(1);return this._tryAcceptChar($n,Et),this._accepted()?this.next().handle(this._prepareHandlingArgs(Et,{str:Ln,length:Et.length-1}))+1:this.handle(this._prepareHandlingArgs(Et,{str:Ln,length:Et.length-1}))}clear(Et){this._tryAcceptChar(" ",Et),this.next().clear(this._prepareHandlingArgs(Et))}reset(){this._accepted(!1),this.next().reset()}_tryAcceptChar(Et,hn){if(this._accepted(!1),!this._isAllowed(Et,hn))return;const $n=" "===Et?this.maskChar:Et;hn.fullText=hn.fullText.substring(0,hn.index)+$n+hn.fullText.substring(hn.index+1),this._accepted(!0),this._value=Et}_accepted(Et){if(!arguments.length)return!!this._isAccepted;this._isAccepted=!!Et}first(Et){return" "===this._value?Et||0:super.first(Et)}_isAllowed(Et,hn){return" "===Et||this._isValid(Et,hn)}_isValid(Et,hn){const{allowedChars:$n}=this;return $n instanceof RegExp?$n.test(Et):(0,T.Tn)($n)?$n(Et,hn.index,hn.fullText):Array.isArray($n)?$n.includes(Et):$n===Et}isAccepted(Et){return 0===Et?this._accepted():this.next().isAccepted(Et-1)}_adjustedForward(Et,hn,$n){return hn>=Et?hn:this.next()._adjustedForward(Et,hn+1,$n)||hn+1}_adjustedBackward(Et,hn){return hn>=Et-1?Et:this.next()._adjustedBackward(Et,hn+1)||hn+1}isValid(Et){return this._isValid(this._value,Et)&&this.next().isValid(this._prepareHandlingArgs(Et))}}class et extends st{value(){return this.next().value()}handle(Et){const hn=Object.prototype.hasOwnProperty.call(Et,"value"),$n=hn?Et.value:Et.text;if(!$n.length||!Et.length)return 0;if(Et.start||hn)return this.next().handle(this._prepareHandlingArgs(Et,{start:Et.start&&Et.start-1}));const Ln=$n[0],Nt=$n.substring(1);this._tryAcceptChar(Ln);const Gt=this._isAllowed(Ln)?this._prepareHandlingArgs(Et,{str:Nt,length:Et.length-1}):Et;return this.next().handle(Gt)+1}clear(Et){this._accepted(!1),this.next().clear(this._prepareHandlingArgs(Et))}_tryAcceptChar(Et){this._accepted(this._isValid(Et))}_isValid(Et){return Et===this.maskChar}first(Et){return Et=Et||0,this.next().first(Et+1)}_adjustedForward(Et,hn,$n){return hn>=Et&&$n===this.maskChar?hn:Et===hn+1&&this._accepted()?Et:this.next()._adjustedForward(Et,hn+1,$n)}_adjustedBackward(Et,hn){return hn>=Et-1?0:this.next()._adjustedBackward(Et,hn+1)}isValid(Et){return this.next().isValid(this._prepareHandlingArgs(Et))}}var Ke=M(36),Ye=M(1832);const Fe=["deleteContentBackward","deleteSoftLineBackward","deleteContent","deleteHardLineBackward"],Xe=["historyUndo","historyRedo"],tt=["focusIn","focusOut","input","paste","cut","drop","beforeInput"];class qe{constructor(Et){this.editor=Et}_editorOption(){return this.editor.option(...arguments)}_editorInput(){return this.editor._input()}_editorCaret(Et){if(!Et)return this.editor._caret();this.editor._caret(Et)}_attachChangeEventHandler(){if(!this._editorOption("valueChangeEvent").split(" ").includes("change"))return;const Et=this._editorInput(),hn=(0,c.b4)("blur beforedeactivate","dxMask");y.A.on(Et,hn,$n=>{this.editor._changeHandler($n)})}_beforeInputHandler(){this._previousText=this._editorOption("text"),this._prevCaret=this._editorCaret()}_inputHandler(Et){const{originalEvent:hn}=Et;if(!hn)return;const{inputType:$n}=hn;if(Xe.includes($n))this._handleHistoryInputEvent();else if(Fe.includes($n))this._handleBackwardDeleteInputEvent();else{const Ln=this._editorCaret();if(!Ln.end)return;this._clearSelectedText(),this._autoFillHandler(hn),this._editorCaret(Ln),this._handleInsertTextInputEvent(hn.data)}this._editorOption("text")===this._previousText&&Et.stopImmediatePropagation()}_handleHistoryInputEvent(){const Et=this._editorCaret();this._updateEditorMask({start:Et.start,length:Et.end-Et.start,text:""}),this._editorCaret(this._prevCaret)}_handleBackwardDeleteInputEvent(){this._clearSelectedText();const Et=this._editorCaret();this.editor.setForwardDirection(),this.editor._adjustCaret(),this._editorCaret().start!==Et.start&&(this.editor.setBackwardDirection(),this.editor._adjustCaret())}_clearSelectedText(){var Et,hn;const $n=(null===(Et=this._prevCaret)||void 0===Et?void 0:Et.end)-(null===(hn=this._prevCaret)||void 0===hn?void 0:hn.start)||1,Ln=this._editorCaret();var dt;this._isAutoFill()||(this.editor.setBackwardDirection(),this._updateEditorMask({start:Ln.start,length:$n,text:(dt=$n," ".repeat(dt))}))}_handleInsertTextInputEvent(Et){var hn;const $n=Et??"";this.editor.setForwardDirection(),this._updateEditorMask({start:(null===(hn=this._prevCaret)||void 0===hn?void 0:hn.start)??0,length:$n.length||1,text:$n})||this._editorCaret(this._prevCaret)}_updateEditorMask(Et){const hn=Et.text.length,$n=this.editor._handleChain(Et);if(this.editor._displayMask(),this.editor.isForwardDirection()){const{start:Ln,end:Nt}=this._editorCaret(),Gt=$n-hn;$n>1&&1===hn&&this._editorCaret({start:Ln+Gt,end:Nt+Gt}),this.editor._adjustCaret()}return!!$n}_focusInHandler(){if(this.editor._showMaskPlaceholder(),this.editor.setForwardDirection(),!this.editor._isValueEmpty()&&this._editorOption("isValid"))this.editor._adjustCaret();else{const Et=this.editor._maskRulesChain.first();this._caretTimeout=setTimeout(()=>{this._editorCaret({start:Et,end:Et})},0)}}_focusOutHandler(Et){this.editor._changeHandler(Et),"onFocus"===this._editorOption("showMaskMode")&&this.editor._isValueEmpty()&&(this._editorOption("text",""),this.editor._renderDisplayText(""))}_delHandler(Et){const{editor:hn}=this;hn._maskKeyHandler(Et,()=>{hn._hasSelection()||hn._handleKey(" ")})}_cutHandler(Et){const hn=this._editorCaret(),$n=this._editorInput().val().substring(hn.start,hn.end);this.editor._maskKeyHandler(Et,()=>(0,Ye.KR)(Et,$n))}_dropHandler(){this._clearDragTimer(),this._dragTimer=setTimeout(()=>{const Et=this.editor._convertToValue(this._editorInput().val());this._editorOption("value",Et)})}_pasteHandler(Et){const{editor:hn}=this;if(this._editorOption("disabled"))return;const $n=this._editorCaret();hn._maskKeyHandler(Et,()=>{const Ln=(0,Ye.KR)(Et),Nt=hn._maskRulesChain.text().substring($n.end),Gt=hn._handleChain({text:Ln,start:$n.start,length:Ln.length}),on=$n.start+Gt;hn._handleChain({text:Nt,start:on,length:Nt.length}),hn._caret({start:on,end:on})})}_autoFillHandler(Et){const{editor:hn}=this,$n=this._editorInput().val();this._inputHandlerTimer=setTimeout(()=>{this._isAutoFill()&&(hn._maskKeyHandler(Et,()=>{hn._handleChain({text:$n,start:0,length:$n.length})}),hn._validateMask())})}_isAutoFill(){const Et=this._editorInput();if(Ke.A.webkit){const hn=Et.get(0);return hn?.matches(":-webkit-autofill")??!1}return!1}_clearDragTimer(){clearTimeout(this._dragTimer)}_clearTimers(){this._clearDragTimer(),clearTimeout(this._caretTimeout),clearTimeout(this._inputHandlerTimer)}getHandler(Et){return hn=>{var $n;null===($n=this[`_${Et}Handler`])||void 0===$n||$n.call(this,hn)}}attachEvents(){const Et=this._editorInput();tt.forEach(hn=>{const $n=(0,c.b4)(hn.toLowerCase(),"dxMask");y.A.on(Et,$n,this.getHandler(hn))}),this._attachChangeEventHandler()}detachEvents(){this._clearTimers(),y.A.off(this._editorInput(),".dxMask")}clean(){this._clearTimers()}}const Tt=M(699).A,wi={0:/[0-9]/,9:/[0-9\s]/,"#":/[-+0-9\s]/,L:dt=>gi(dt),l:dt=>gi(dt)||Ai(dt),C:/\S/,c:/./,A:dt=>gi(dt)||Bn(dt),a:dt=>gi(dt)||Bn(dt)||Ai(dt)};function Bn(dt){return/[0-9]/.test(dt)}function gi(dt){const Et=dt.charCodeAt();return Et>64&&Et<91||Et>96&&Et<123||Et>127}function Ai(dt){return" "===dt}const Dt=$e.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{mask:"",maskChar:"_",maskRules:{},maskInvalidMessage:s.A.format("validation-mask"),useMaskedValue:!1,showMaskMode:"always"})},_supportedKeys(){const dt=this,Et={del:dt._maskStrategy.getHandler("del"),enter:dt._changeHandler},hn=dt.callBase();return(0,f.__)(Et,($n,Ln)=>{const Nt=hn[$n];hn[$n]=function(Gt){dt.option("mask")&&Ln.call(dt,Gt),Nt&&Nt(Gt)}}),hn},_getSubmitElement(){return this.option("mask")?this._$hiddenElement:this.callBase()},_init(){this.callBase(),this._initMaskStrategy()},_initMaskStrategy(){this._maskStrategy=new qe(this)},_initMarkup(){this._renderHiddenElement(),this.callBase()},_attachMouseWheelEventHandlers(){if(this._onMouseWheel===P.lQ)return;const Et=this._input(),hn=(0,c.b4)(d.U,this.NAME),$n=this._createAction(Ln=>{const{event:Nt}=Ln;(0,a.in)(Et)&&!(0,c.By)(Nt)&&(this._onMouseWheel(Nt),Nt.preventDefault(),Nt.stopPropagation())});y.A.off(Et,hn),y.A.on(Et,hn,Ln=>{$n({event:Ln})})},_onMouseWheel:P.lQ,_useMaskBehavior(){return!!this.option("mask")},_attachDropEventHandler(){if(!this._useMaskBehavior())return;const Et=(0,c.b4)("drop",this.NAME),hn=this._input();y.A.off(hn,Et),y.A.on(hn,Et,$n=>$n.preventDefault())},_render(){this._attachMouseWheelEventHandlers(),this._renderMask(),this.callBase(),this._attachDropEventHandler()},_renderHiddenElement(){this.option("mask")&&(this._$hiddenElement=(0,o.A)("<input>").attr("type","hidden").appendTo(this._inputWrapper()))},_removeHiddenElement(){this._$hiddenElement&&this._$hiddenElement.remove()},_renderMask(){this.$element().removeClass("dx-texteditor-masked"),this._maskRulesChain=null,this._maskStrategy.detachEvents(),this.option("mask")&&(this.$element().addClass("dx-texteditor-masked"),this._maskStrategy.attachEvents(),this._parseMask(),this._renderMaskedValue())},_changeHandler(dt){const Et=this._input(),hn=Et.val();if(hn===this._changedValue)return;this._changedValue=hn;const $n=(0,c.lh)(dt,{type:"change"});y.A.trigger(Et,$n)},_parseMask(){this._maskRules=(0,b.X)({},wi,this.option("maskRules")),this._maskRulesChain=this._parseMaskRule(0)},_parseMaskRule(dt){const Et=this.option("mask");if(dt>=Et.length)return new ot;const hn=Et[dt],$n="\\"===hn,Ln=$n?new et({maskChar:Et[dt+1]}):this._getMaskRule(hn);return Ln.next(this._parseMaskRule(dt+1+$n)),Ln},_getMaskRule(dt){let Et;return(0,f.__)(this._maskRules,(hn,$n)=>{if(hn===dt)return Et={pattern:hn,allowedChars:$n},!1}),(0,T.O9)(Et)?new st((0,b.X)({maskChar:this.option("maskChar")||" "},Et)):new et({maskChar:dt})},_renderMaskedValue(){if(!this._maskRulesChain)return;const dt=this.option("value")||"";this._maskRulesChain.clear(this._normalizeChainArguments());const Et={length:dt.length};Et[this._isMaskedValueMode()?"text":"value"]=dt,this._handleChain(Et),this._displayMask()},_replaceSelectedText:(dt,Et,hn)=>void 0===hn?dt:dt.slice(0,Et.start)+hn+dt.slice(Et.end),_isMaskedValueMode(){return this.option("useMaskedValue")},_displayMask(dt){dt=dt||this._caret(),this._renderValue(),this._caret(dt)},_isValueEmpty(){return(0,S.Im)(this._value)},_shouldShowMask(){return"onFocus"!==this.option("showMaskMode")||(0,a.in)(this._input())||!this._isValueEmpty()},_showMaskPlaceholder(){if(this._shouldShowMask()){const dt=this._maskRulesChain.text();this.option("text",dt),"onFocus"===this.option("showMaskMode")&&this._renderDisplayText(dt)}},_renderValue(){if(this._maskRulesChain&&(this._showMaskPlaceholder(),this._$hiddenElement)){const dt=this._maskRulesChain.value(),Et=(0,S.Im)(dt)?"":this._getPreparedValue();this._$hiddenElement.val(Et)}return this.callBase()},_getPreparedValue(){return this._convertToValue().replace(/\s+$/,"")},_valueChangeEventHandler(dt){this._maskRulesChain?(this._saveValueChangeEvent(dt),this.option("value",this._getPreparedValue())):this.callBase.apply(this,arguments)},_isControlKeyFired(dt){return this._isControlKey((0,c.YD)(dt))||(0,c.By)(dt)},_handleChain(dt){const Et=this._maskRulesChain.handle(this._normalizeChainArguments(dt));return this._updateMaskInfo(),Et},_normalizeChainArguments(dt){return(dt=dt||{}).index=0,dt.fullText=this._maskRulesChain.text(),dt},_convertToValue(dt){return this._isMaskedValueMode()?this._replaceMaskCharWithEmpty(dt||this._textValue||""):dt||this._value||""},_replaceMaskCharWithEmpty(dt){return dt.replace(new RegExp(this.option("maskChar"),"g")," ")},_maskKeyHandler(dt,Et){if(this.option("readOnly"))return;this.setForwardDirection(),dt.preventDefault(),this._handleSelection();const hn=this._input().val(),$n=()=>{hn!==this._input().val()&&y.A.trigger(this._input(),"input")},Ln=Et();Ln?Ln.then($n):(this.setForwardDirection(),this._adjustCaret(),this._displayMask(),this._maskRulesChain.reset(),$n())},_handleKey(dt,Et){this._direction(Et||"forward"),this._adjustCaret(dt),this._handleKeyChain(dt),this._moveCaret()},_handleSelection(){if(!this._hasSelection())return;const dt=this._caret(),Et=new Array(dt.end-dt.start+1).join(" ");this._handleKeyChain(Et)},_handleKeyChain(dt){const Et=this._caret(),hn=this.isForwardDirection()?Et.start:Et.start-1,$n=this.isForwardDirection()?Et.end:Et.end-1;this._handleChain({text:dt,start:hn,length:hn===$n?1:$n-hn})},_tryMoveCaretBackward(){this.setBackwardDirection();const dt=this._caret().start;return this._adjustCaret(),!dt||dt!==this._caret().start},_adjustCaret(dt){const Et=this._caret().start,hn=this.isForwardDirection(),$n=this._maskRulesChain.adjustedCaret(Et,hn,dt);this._caret({start:$n,end:$n})},_moveCaret(){const dt=this._caret().start,Et=dt+(this.isForwardDirection()?0:-1),hn=this._maskRulesChain.isAccepted(Et)?dt+(this.isForwardDirection()?1:-1):dt;this._caret({start:hn,end:hn})},_caret(dt,Et){const hn=this._input();if(hn.length){if(!arguments.length)return Tt(hn);Tt(hn,dt,Et)}},_hasSelection(){const dt=this._caret();return dt.start!==dt.end},_direction(dt){if(!arguments.length)return this._typingDirection;this._typingDirection=dt},setForwardDirection(){this._direction("forward")},setBackwardDirection(){this._direction("backward")},isForwardDirection(){return"forward"===this._direction()},_updateMaskInfo(){this._textValue=this._maskRulesChain.text(),this._value=this._maskRulesChain.value()},_clean(){this._maskStrategy&&this._maskStrategy.clean(),this.callBase()},_validateMask(){if(!this._maskRulesChain)return;const dt=(0,S.Im)(this.option("value"))||this._maskRulesChain.isValid(this._normalizeChainArguments());this.option({isValid:dt,validationError:dt?null:{editorSpecific:!0,message:this.option("maskInvalidMessage")}})},_updateHiddenElement(){this._removeHiddenElement(),this.option("mask")&&(this._input().removeAttr("name"),this._renderHiddenElement()),this._setSubmitElementName(this.option("name"))},_updateMaskOption(){this._updateHiddenElement(),this._renderMask(),this._validateMask(),this._refreshValueChangeEvent()},_processEmptyMask(dt){if(dt)return;const Et=this.option("value");this.option({text:Et,isValid:!0,validationError:null}),this.validationRequest.fire({value:Et,editor:this}),this._renderValue()},_optionChanged(dt){switch(dt.name){case"mask":this._updateMaskOption(),this._processEmptyMask(dt.value);break;case"maskChar":case"maskRules":case"useMaskedValue":this._updateMaskOption();break;case"value":this._renderMaskedValue(),this._validateMask(),this.callBase(dt),this._changedValue=this._input().val();break;case"maskInvalidMessage":break;case"showMaskMode":this.option("text",""),this._renderValue();break;default:this.callBase(dt)}},clear(){const{value:dt}=this._getDefaultOptions();this.option("value")===dt&&this._renderMaskedValue(),this.callBase()}});(0,W.A)("dxTextEditor",Dt);const cn=Dt},699:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s});var W=M(5973),o=M(6054),P=M(5704),b=M(1830);const{ios:f,mac:S}=W.A.real(),T=f||S,s=function(a,u){let h=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(a=(0,P.A)(a).get(0),!(0,b.O9)(u))return function(a){let u;try{u={start:a.selectionStart,end:a.selectionEnd}}catch{u={start:0,end:0}}return u}(a);!h&&T&&o.A.getActiveElement(a)!==a||function(a,u){const h=o.A.getBody();if(h.contains(a)||h.contains(a.getRootNode().host))try{a.selectionStart=u.start,a.selectionEnd=u.end}catch{}}(a,u)}},4647:(In,Ze,M)=>{"use strict";M.d(Ze,{N:()=>b,f:()=>P});var W=M(5704),o=M(9293);const P=function(f,S,T){const y=(0,W.A)(f),d=T?y.scrollLeft():y.scrollTop(),c=T?"Width":"Height",u=y.prop(`scroll${c}`)-y.prop(`client${c}`)-d|0;return(0!==d||0!==u)&&(!!(0===d&&S>=0||0===u&&S<=0||d>0&&u>0)||void 0)},b=function(f,S){const T=(0,W.A)(f);return{validate(y){if((0,o.X1)(y)&&(!S||(0,W.A)(y.target).is(f)))return!!P(T,-y.delta,y.shiftKey)&&(y._needSkipEvent=!0,!0)}}}},974:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});var W=M(5704);class o{constructor(b,f,S){this.instance=null,this.$container=null,this.$placeMarker=null,this.editor=f,this.name=b,this.options=S||{}}_addPlaceMarker(b){this.$placeMarker=(0,W.A)("<div>").appendTo(b)}_addToContainer(b){const{$placeMarker:f,$container:S}=this;f?f.replaceWith(b):b.appendTo(S)}_attachEvents(b,f){throw"Not implemented"}_create(){throw"Not implemented"}_isRendered(){return!!this.instance}_isVisible(){const{editor:b,options:f}=this;return f.visible||!b.option("readOnly")}_isDisabled(){throw"Not implemented"}_shouldRender(){return this._isVisible()&&!this._isRendered()}dispose(){const{instance:b,$placeMarker:f}=this;b&&(b.dispose?b.dispose():b.remove(),this.instance=null),f&&f.remove()}render(){let b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$container;if(this.$container=b,this._isVisible()){const{instance:f,$element:S}=this._create();this.instance=f,this._attachEvents(f,S)}else this._addPlaceMarker(b)}update(){return this._shouldRender()&&this.render(),!!this.instance}}},7525:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>g});var W=M(5704),o=M(3090),P=M(127),b=M(778),f=M(4072),S=M(1134),T=M(9012),y=M(974);class c extends y.A{_attachEvents(x,w){const{editor:D}=this;f.A.on(w,S.n,()=>{D.$element().addClass("dx-custom-button-hovered")}),f.A.on(w,S._,()=>{D.$element().removeClass("dx-custom-button-hovered")}),f.A.on(w,b.U,C=>{C.stopPropagation()})}_create(){const{editor:x}=this,w=(0,W.A)("<div>");return this._addToContainer(w),{$element:w,instance:x._createComponent(w,T.A,(0,o.X)({},this.options,{ignoreParentReadOnly:!0,disabled:this._isDisabled(),integrationOptions:this._prepareIntegrationOptions(x)}))}}_prepareIntegrationOptions(x){return(0,o.X)({},x.option("integrationOptions"),{skipTemplates:["content"]})}update(){const x=super.update();return this.instance&&this.instance.option("disabled",this._isDisabled()),x}_isVisible(){const{editor:x}=this;return x.option("visible")}_isDisabled(){return void 0!==this.options.disabled?this.instance?this.instance.option("disabled"):this.options.disabled:this.editor.option("readOnly")}}function u(_,x){if(-1!==_.indexOf(x))throw P.A.Error("E1055",x);_.push(x)}class g{constructor(x,w){this.buttons=[],this.defaultButtonsInfo=w,this.editor=x}_compileButtonInfo(x){const w=[];return x.map(D=>{const C="string"==typeof D;if(C||function a(_){(()=>{if(!_||"object"!=typeof _||Array.isArray(_))throw P.A.Error("E1053")})(),(()=>{if(!("name"in _))throw P.A.Error("E1054")})(),(()=>{const{name:x}=_;if("string"!=typeof x)throw P.A.Error("E1055")})(),(()=>{const{location:x}=_;"location"in _&&"after"!==x&&"before"!==x&&(_.location="after")})()}(D),C||function h(_,x){return!!x.find(w=>w.name===_)}(D.name,this.defaultButtonsInfo)){const N=this.defaultButtonsInfo.find(G=>{let{name:k}=G;return k===D||k===D.name});if(!N)throw P.A.Error("E1056",this.editor.NAME,D);return u(w,D),N}const{name:L}=D;return u(w,L),(0,o.X)(D,{Ctor:c})})}_createButton(x){const{Ctor:w,options:D,name:C}=x,I=new w(C,this.editor,D);return this.buttons.push(I),I}_renderButtons(x,w,D){let C=null;return(x?this._compileButtonInfo(x):this.defaultButtonsInfo).forEach(L=>{const{location:N="after"}=L;N===D&&this._createButton(L).render((C=C??(0,W.A)("<div>").addClass("dx-texteditor-buttons-container"),"before"===D?w.prepend(C):w.append(C),C))}),C}clean(){this.buttons.forEach(x=>x.dispose()),this.buttons=[]}getButton(x){const w=this.buttons.find(D=>{let{name:C}=D;return C===x});return w&&w.instance}renderAfterButtons(x,w){return this._renderButtons(x,w,"after")}renderBeforeButtons(x,w){return this._renderButtons(x,w,"before")}updateButtons(x){this.buttons.forEach(w=>{(!x||-1!==x.indexOf(w.name))&&w.update()})}}},6148:(In,Ze,M)=>{"use strict";M.d(Ze,{l:()=>W});const W="dx-toolbar"},1074:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>pe});var W=M(5737),o=M(2583),P=M(1973),b=M(5704),f=M(5944),S=M(2660),T=M(4757),y=M(1363),d=M(1830),c=M(9212),s=M(4859),a=M(6021);const _=M(1129).A.inherit({_initMarkup(){this._deferredItems=[],this.callBase()},_renderItemContent(z){const oe=(0,a.cY)(),ae=(0,a.cY)();this._deferredItems[z.index]=ae;const ee=this.callBase.call(this,z);return ae.done(()=>{oe.resolve(ee)}),oe.promise()},_onItemTemplateRendered(z,oe){return()=>{this._deferredItems[oe.index].resolve()}},_postProcessRenderItems:s.lQ,_renderItemsAsync(){const z=(0,a.cY)();return a.z7.apply(this,this._deferredItems).done(()=>{this._postProcessRenderItems(),z.resolve()}),z.promise()},_clean(){this.callBase(),this._deferredItems=[]}});M(4972);const D=_;var C=M(6148);class te extends D{_getSynchronizableOptionsForCreateComponent(){return super._getSynchronizableOptionsForCreateComponent().filter(oe=>"disabled"!==oe)}_initTemplates(){super._initTemplates();const oe=new f.U((ae,ee,he)=>{if((0,d.Qd)(ee)){const{text:de,html:ue,widget:be}=ee;de&&ae.text(de).wrapInner("<div>"),ue&&ae.html(ue),"dxDropDownButton"===be&&(ee.options=ee.options??{},(0,d.O9)(ee.options.stylingMode)||(ee.options.stylingMode=this.option("useFlatButtons")?"text":"contained")),"dxButton"===be&&(this.option("useFlatButtons")&&(ee.options=ee.options??{},ee.options.stylingMode=ee.options.stylingMode??"text"),this.option("useDefaultButtons")&&(ee.options=ee.options??{},ee.options.type=ee.options.type??"default"))}else ae.text(String(ee));this._getTemplate("dx-polymorph-widget").render({container:ae,model:he,parent:this})},["text","html","widget","options"],this.option("integrationOptions.watchMethod"));this._templateManager.addDefaultTemplates({item:oe,menuItem:oe})}_getDefaultOptions(){return(0,W.A)({},super._getDefaultOptions(),{renderAs:"topToolbar",grouped:!1,useFlatButtons:!1,useDefaultButtons:!1})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,c.Nt)(),options:{useFlatButtons:!0}}])}_itemContainer(){return this._$toolbarItemsContainer.find([".dx-toolbar-before",".dx-toolbar-center",".dx-toolbar-after"].join(","))}_itemClass(){return"dx-toolbar-item"}_itemDataKey(){return"dxToolbarItemDataKey"}_dimensionChanged(oe){this._disposed||(this._arrangeItems(),this._applyCompactMode())}_initMarkup(){this._renderToolbar(),this._renderSections(),super._initMarkup()}_render(){super._render(),this._renderItemsAsync(),this._updateDimensionsInMaterial()}_postProcessRenderItems(){this._arrangeItems()}_renderToolbar(){this.$element().addClass(C.l),this._$toolbarItemsContainer=(0,b.A)("<div>").addClass("dx-toolbar-items-container").appendTo(this.$element()),this.setAria("role","toolbar")}_renderSections(){const oe=this._$toolbarItemsContainer;(0,S.__)(["before","center","after"],(ae,ee)=>{const he=`dx-toolbar-${ee}`;oe.find(`.${he}`).length||(this[`_$${ee}Section`]=(0,b.A)("<div>").addClass(he).attr("role","presentation").appendTo(oe))})}_arrangeItems(oe){var ae,ee;const he=oe??(0,y.RG)(this.$element());this._$centerSection.css({margin:"0 auto",float:"none"});const de=(0,T.N)(null===(ae=this._$beforeSection)||void 0===ae?void 0:ae.get(0)),ue=(0,T.N)(null===(ee=this._$afterSection)||void 0===ee?void 0:ee.get(0));this._alignCenterSection(de,ue,he);const be=this._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0),ve=be.parent();if(!be.length)return;const le=de.width?de.width:be.position().left,Ce=ve.hasClass("dx-toolbar-before")?0:le,ye=ve.hasClass("dx-toolbar-after")?0:ue.width;let ge=0;ve.children().not(".dx-toolbar-label").each((Te,Ee)=>{ge+=(0,y.Ot)(Ee)});const xe=Math.max(he-ge-Ce-ye,0);if(ve.hasClass("dx-toolbar-before"))this._alignSection(this._$beforeSection,xe);else{const Te=(0,y.Ot)(be)-(0,y.RG)(be);be.css("maxWidth",xe-Te)}}_alignCenterSection(oe,ae,ee){var he;this._alignSection(this._$centerSection,ee-oe.width-ae.width);const de=this.option("rtlEnabled"),ue=de?ae:oe,be=de?oe:ae,ve=(0,T.N)(null===(he=this._$centerSection)||void 0===he?void 0:he.get(0));(ue.right>ve.left||ve.right>be.left)&&this._$centerSection.css({marginLeft:ue.width,marginRight:be.width,float:ue.width>be.width?"none":"right"})}_alignSection(oe,ae){let he=oe.find(".dx-toolbar-label").toArray();ae-=this._getCurrentLabelsPaddings(he);const de=this._getCurrentLabelsWidth(he),ue=Math.abs(de-ae);ae<de?(he=he.reverse(),this._alignSectionLabels(he,ue,!1)):this._alignSectionLabels(he,ue,!0)}_alignSectionLabels(oe,ae,ee){const he=function(de){return(0,T.N)(de).width};for(let de=0;de<oe.length;de++){const ue=(0,b.A)(oe[de]),be=Math.ceil(he(oe[de]));let ve;ee&&ue.css("maxWidth","inherit");const le=Math.ceil(ee?he(oe[de]):be);if(!(le<ae)){ve=ee?be+ae:be-ae,ue.css("maxWidth",ve);break}ve=ee?le:0,ae-=le,ue.css("maxWidth",ve)}}_applyCompactMode(){const oe=(0,b.A)(this.element());oe.removeClass("dx-toolbar-compact"),this.option("compactMode")&&this._getSummaryItemsSize("width",this._itemElements(),!0)>(0,y.RG)(oe)&&oe.addClass("dx-toolbar-compact")}_getCurrentLabelsWidth(oe){let ae=0;return oe.forEach(ee=>{ae+=(0,y.Ot)(ee)}),ae}_getCurrentLabelsPaddings(oe){let ae=0;return oe.forEach(ee=>{ae+=(0,y.Ot)(ee)-(0,y.RG)(ee)}),ae}_renderItem(oe,ae,ee,he){const be=!!(ae.text??ae.html),ve=super._renderItem(oe,ae,ee??this[`_$${ae.location??"center"}Section`],he);return ve.toggleClass("dx-toolbar-button",!be).toggleClass("dx-toolbar-label",be).addClass(ae.cssClass),ve}_renderGroupedItems(){(0,S.__)(this.option("items"),(oe,ae)=>{const ee=ae.items,he=(0,b.A)("<div>").addClass("dx-toolbar-group"),de=ae.location??"center";!ee||!ee.length||((0,S.__)(ee,(ue,be)=>{this._renderItem(ue,be,he,null)}),this._$toolbarItemsContainer.find(`.dx-toolbar-${de}`).append(he))})}_renderItems(oe){this.option("grouped")&&oe.length&&oe[0].items?this._renderGroupedItems():super._renderItems(oe)}_getToolbarItems(){return this.option("items")??[]}_renderContentImpl(){const oe=this._getToolbarItems();this.$element().toggleClass("dx-toolbar-mini",0===oe.length),this._renderItems(this._renderedItemsCount?oe.slice(this._renderedItemsCount):oe),this._applyCompactMode()}_renderEmptyMessage(){}_clean(){this._$toolbarItemsContainer.children().empty(),this.$element().empty(),delete this._$beforeSection,delete this._$centerSection,delete this._$afterSection}_visibilityChanged(oe){oe&&this._arrangeItems()}_isVisible(){return(0,y.RG)(this.$element())>0&&(0,y.Oq)(this.$element())>0}_getIndexByItem(oe){return this._getToolbarItems().indexOf(oe)}_itemOptionChanged(oe,ae,ee,he){super._itemOptionChanged(oe,ae,ee,he),this._arrangeItems()}_optionChanged(oe){const{name:ae}=oe;switch(ae){case"width":super._optionChanged(oe),this._dimensionChanged();break;case"renderAs":case"useFlatButtons":case"useDefaultButtons":this._invalidate();break;case"compactMode":this._applyCompactMode();break;case"grouped":break;default:super._optionChanged(oe)}}_dispose(){super._dispose(),clearTimeout(this._waitParentAnimationTimeout)}_updateDimensionsInMaterial(){if((0,c.gx)()){const oe=()=>new Promise(ee=>{const he=()=>{let ue=!0;return this.$element().parents().each((be,ve)=>{if(o.A.isAnimating((0,b.A)(ve)))return ue=!1,!1}),ue&&ee(),ue},de=()=>{clearTimeout(this._waitParentAnimationTimeout),this._waitParentAnimationTimeout=setTimeout(()=>he()||de(),15)};de()}),ae=()=>{const ee=this.$element().find(".dx-toolbar-label"),he=[];return ee.each((de,ue)=>{const be=(0,b.A)(ue).text(),ve=(0,b.A)(ue).css("fontWeight");he.push((0,c.ro)(be,ve))}),Promise.all(he)};Promise.all([oe(),ae()]).then(()=>{this._dimensionChanged()})}}}(0,P.A)("dxToolbarBase",te);const pe=te},1609:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});const P=M(7080).A},608:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>d,x:()=>y});var W=M(6110),o=M(4356);const P=(0,W.Vd)()?(0,W.zk)():{};let f=function(c){return setTimeout(c,16.666666666666668)},S=function(c){clearTimeout(c)};const T=(0,o.A)(function(){const c=P.requestAnimationFrame||P.webkitRequestAnimationFrame||P.mozRequestAnimationFrame||P.oRequestAnimationFrame||P.msRequestAnimationFrame,s=P.cancelAnimationFrame||P.webkitCancelAnimationFrame||P.mozCancelAnimationFrame||P.oCancelAnimationFrame||P.msCancelAnimationFrame;c&&s&&(f=c,S=s)});function y(){return T(),f.apply(P,arguments)}function d(){T(),S.apply(P,arguments)}},2583:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Se});var W=M(5704),o=M(6110),P=M(4072),b=M(7251),f=M(9522),S=M(3090),T=M(1830),y=M(2660),d=M(4504);const c=/cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,s={linear:"cubic-bezier(0, 0, 1, 1)",swing:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)"};let u={};const h=function(Re){let Xe,Fe=(Re=s[Re]||Re).match(c);Fe||(Xe="linear",Fe=s[Xe].match(c)),Fe=Fe.slice(1,5);for(let vt=0;vt<Fe.length;vt++)Fe[vt]=parseFloat(Fe[vt]);const tt=Xe||"cubicbezier_"+Fe.join("_").replace(/\./g,"p");return(0,T.Tn)(u[tt])||(u[tt]=function(vt,qe,At,Tt,qt){return Tt*function(Re,Fe,Xe,tt){const vt=3*Re,qe=3*(Xe-Re)-vt,At=1-vt-qe,Tt=3*Fe,qt=3*(tt-Fe)-Tt,wt=1-Tt-qt,En=function(Tn){return Tn*(vt+Tn*(qe+Tn*At))},ri=function(Tn){return vt+Tn*(2*qe+3*Tn*At)};return function(Tn){return(Jn=function(Jn){let gi,wi=Jn,Bn=0;for(;Bn<14&&(gi=En(wi)-Jn,!(Math.abs(gi)<.001));)wi-=gi/ri(wi),Bn++;return wi}(Tn))*(Tt+Jn*(qt+Jn*wt));var Jn}}(Fe[0],Fe[1],Fe[2],Fe[3])(qe/qt)+At}),tt};var x=M(608),w=M(7007),D=M(6870),C=M(1110),I=M(9293),L=M(6021),N=M(4859);const G=(0,o.zk)(),k=(0,I.b4)(C.N,"dxFX"),U=/^([+-])=(.*)/i,B="dxAnimData",K="dxAnimQueue",ie={initAnimation:function(Re,Fe){Re.css({transitionProperty:"none"}),"string"==typeof Fe.from?Re.addClass(Fe.from):Ke(Re,Fe.from);const Xe=this,tt=new L.cY,vt=Fe.cleanupWhen;Fe.transitionAnimation={deferred:tt,finish:function(){Xe._finishTransition(Re),vt?(0,L.z7)(tt,vt).always(function(){Xe._cleanup(Re,Fe)}):Xe._cleanup(Re,Fe),tt.resolveWith(Re,[Fe,Re])}},this._completeAnimationCallback(Re,Fe).done(function(){Fe.transitionAnimation.finish()}).fail(function(){tt.rejectWith(Re,[Fe,Re])}),Fe.duration||Fe.transitionAnimation.finish(),Re.css("transform")},animate:function(Re,Fe){return this._startAnimation(Re,Fe),Fe.transitionAnimation.deferred.promise()},_completeAnimationCallback:function(Re,Fe){const Xe=this,tt=Date.now()+Fe.delay,vt=new L.cY,qe=new L.cY,At=new L.cY;let Tt;const qt=(0,w.transitionEndEventName)()+".dxFX";Fe.transitionAnimation.cleanup=function(){clearTimeout(Tt),clearTimeout(wt),P.A.off(Re,qt),P.A.off(Re,k)},P.A.one(Re,qt,function(){Date.now()-tt>=Fe.duration&&qe.reject()}),P.A.off(Re,k),P.A.on(Re,k,function(){Xe.stop(Re,Fe),vt.reject()});const wt=setTimeout(function(){Tt=setTimeout(function(){At.reject()},Fe.duration+Fe.delay+Pe._simulatedTransitionEndDelay),(0,L.z7)(qe,At).fail(function(){vt.resolve()}.bind(this))});return vt.promise()},_startAnimation:function(Re,Fe){Re.css({transitionProperty:"all",transitionDelay:Fe.delay+"ms",transitionDuration:Fe.duration+"ms",transitionTimingFunction:Fe.easing}),"string"==typeof Fe.to?Re[0].className+=" "+Fe.to:Fe.to&&Ke(Re,Fe.to)},_finishTransition:function(Re){Re.css("transition","none")},_cleanup:function(Re,Fe){Fe.transitionAnimation.cleanup(),"string"==typeof Fe.from&&(Re.removeClass(Fe.from),Re.removeClass(Fe.to))},stop:function(Re,Fe,Xe){Fe&&(Xe?Fe.transitionAnimation.finish():((0,T.Qd)(Fe.to)&&(0,y.__)(Fe.to,function(tt){Re.css(tt,Re.css(tt))}),this._finishTransition(Re),this._cleanup(Re,Fe)))}},re={initAnimation:function(Re,Fe){Ke(Re,Fe.from)},animate:function(Re,Fe){const Xe=new L.cY,tt=this;return Fe?((0,y.__)(Fe.to,function(vt){void 0===Fe.from[vt]&&(Fe.from[vt]=tt._normalizeValue(Re.css(vt)))}),Fe.to.transform&&(Fe.from.transform=tt._parseTransform(Fe.from.transform),Fe.to.transform=tt._parseTransform(Fe.to.transform)),Fe.frameAnimation={to:Fe.to,from:Fe.from,currentValue:Fe.from,easing:h(Fe.easing),duration:Fe.duration,startTime:(new Date).valueOf(),finish:function(){this.currentValue=this.to,this.draw(),(0,x.u)(Fe.frameAnimation.animationFrameId),Xe.resolve()},draw:function(){if(Fe.draw)return void Fe.draw(this.currentValue);const vt=(0,S.X)({},this.currentValue);vt.transform&&(vt.transform=(0,y.Tj)(vt.transform,function(qe,At){return"translate"===At?(0,d.Oj)(qe):"scale"===At?"scale("+qe+")":"rotate"===At.substr(0,At.length-1)?At+"("+qe+"deg)":void 0}).join(" ")),Re.css(vt)}},Fe.delay?(Fe.frameAnimation.startTime+=Fe.delay,Fe.frameAnimation.delayTimeout=setTimeout(function(){tt._startAnimation(Re,Fe)},Fe.delay)):tt._startAnimation(Re,Fe),Xe.promise()):Xe.reject().promise()},_startAnimation:function(Re,Fe){P.A.off(Re,k),P.A.on(Re,k,function(){Fe.frameAnimation&&(0,x.u)(Fe.frameAnimation.animationFrameId)}),this._animationStep(Re,Fe)},_parseTransform:function(Re){const Fe={};return(0,y.__)(Re.match(/\w+\d*\w*\([^)]*\)\s*/g),function(Xe,tt){const vt=(0,d.g)(tt),qe=tt.match(/scale\((.+?)\)/),At=tt.match(/(rotate.)\((.+)deg\)/);vt&&(Fe.translate=vt),qe&&qe[1]&&(Fe.scale=parseFloat(qe[1])),At&&At[1]&&(Fe[At[1]]=parseFloat(At[2]))}),Fe},stop:function(Re,Fe,Xe){const tt=Fe&&Fe.frameAnimation;tt&&((0,x.u)(tt.animationFrameId),clearTimeout(tt.delayTimeout),Xe&&tt.finish(),delete Fe.frameAnimation)},_animationStep:function(Re,Fe){const Xe=Fe&&Fe.frameAnimation;if(!Xe)return;const tt=(new Date).valueOf();if(tt>=Xe.startTime+Xe.duration)return void Xe.finish();Xe.currentValue=this._calcStepValue(Xe,tt-Xe.startTime),Xe.draw();const vt=this;Xe.animationFrameId=(0,x.x)(function(){vt._animationStep(Re,Fe)})},_calcStepValue:function(Re,Fe){const Xe=function(tt,vt){const qe=Array.isArray(vt)?[]:{};return(0,y.__)(vt,function(At,Tt){if("string"==typeof Tt&&!1===parseFloat(Tt))return!0;qe[At]="object"==typeof Tt?Xe(tt[At],Tt):function(qt){const wt=Fe/Re.duration,En=Fe,ri=1*tt[qt],Tn=vt[qt]-tt[qt],Jn=Re.duration;return function _(Re){return u[Re]}(Re.easing)(wt,En,ri,Tn,Jn)}(At)}),qe};return Xe(Re.from,Re.to)},_normalizeValue:function(Re){const Fe=parseFloat(Re);return!1===Fe?Re:Fe}},q={initAnimation:function(){},animate:function(){return(new L.cY).resolve().promise()},stop:N.lQ,isSynchronous:!0},Z=function(Re,Fe,Xe,tt){(0,y.__)(["from","to"],function(){if(!Xe(Re[this]))throw b.A.Error("E0010",Fe,this,tt)})},Q=function(Re,Fe){return Z(Re,Fe,function(Xe){return(0,T.Qd)(Xe)},"a plain object")},oe={top:{my:"bottom center",at:"top center"},bottom:{my:"top center",at:"bottom center"},right:{my:"left center",at:"right center"},left:{my:"right center",at:"left center"}},ae={validateConfig:function(Re){Q(Re,"slide")},setup:function(Re,Fe){const Xe=(0,d.x5)(Re);if("slide"!==Fe.type){const tt="slideIn"===Fe.type?Fe.from:Fe.to;tt.position=(0,S.X)({of:G},oe[Fe.direction]),et(Re,tt)}this._setUpConfig(Xe,Fe.from),this._setUpConfig(Xe,Fe.to),(0,d.IL)(Re)},_setUpConfig:function(Re,Fe){Fe.left="left"in Fe?Fe.left:"+=0",Fe.top="top"in Fe?Fe.top:"+=0",this._initNewPosition(Re,Fe)},_initNewPosition:function(Re,Fe){const Xe={left:Fe.left,top:Fe.top};delete Fe.left,delete Fe.top;let tt=this._getRelativeValue(Xe.left);void 0!==tt?Xe.left=tt+Re.left:Fe.left=0,tt=this._getRelativeValue(Xe.top),void 0!==tt?Xe.top=tt+Re.top:Fe.top=0,Fe.transform=(0,d.Oj)({x:Xe.left,y:Xe.top})},_getRelativeValue:function(Re){let Fe;if("string"==typeof Re&&(Fe=U.exec(Re)))return parseInt(Fe[1]+"1")*Fe[2]}},ee={setup:function(Re,Fe){const Xe=Fe.from,tt=Fe.to,vt="fadeOut"===Fe.type?1:0,qe="fadeOut"===Fe.type?0:1;let At=(0,T.Qd)(Xe)?String(Xe.opacity??vt):String(Xe),Tt=(0,T.Qd)(tt)?String(tt.opacity??qe):String(tt);switch(Fe.skipElementInitialStyles||(At=Re.css("opacity")),Fe.type){case"fadeIn":Tt=1;break;case"fadeOut":Tt=0}Fe.from={visibility:"visible",opacity:At},Fe.to={opacity:Tt}}},de={custom:{setup:function(){}},slide:ae,slideIn:ae,slideOut:ae,fade:ee,fadeIn:ee,fadeOut:ee,pop:{validateConfig:function(Re){Q(Re,"pop")},setup:function(Re,Fe){const Xe=Fe.from,tt=Fe.to,vt="opacity"in Xe?Xe.opacity:Re.css("opacity"),qe="opacity"in tt?tt.opacity:1,At="scale"in Xe?Xe.scale:0,Tt="scale"in tt?tt.scale:1;Fe.from={opacity:vt};const qt=(0,d.ro)(Re);Fe.from.transform=this._getCssTransform(qt,At),Fe.to={opacity:qe},Fe.to.transform=this._getCssTransform(qt,Tt)},_getCssTransform:function(Re,Fe){return(0,d.Oj)(Re)+"scale("+Fe+")"}},css:{validateConfig:function(Re){!function(Re,Fe){Z(Re,"css",function(Xe){return"string"==typeof Xe},"a string")}(Re)},setup:function(){}}},be={type:"custom",from:{},to:{},duration:400,start:N.lQ,complete:N.lQ,easing:"ease",delay:0},ve={duration:400,easing:"ease",delay:0};function le(){const Re=this.element,Fe=this.config;if(et(Re,Fe.from),et(Re,Fe.to),this.configurator.setup(Re,Fe),Re.data(B,this),Pe.off&&(Fe.duration=0,Fe.delay=0),this.strategy.initAnimation(Re,Fe),Fe.start){const Xe=(0,f.cc)(Re);Fe.start.apply(this,[Xe,Fe])}}const ye=function(){const Re=this,Fe=Re.element,Xe=Re.config;return Re.isStarted=!0,Re.strategy.animate(Fe,Xe).done(function(){!function(Re){const Fe=Re.element,Xe=Re.config;if(Fe.removeData(B),Xe.complete){const tt=(0,f.cc)(Fe);Xe.complete.apply(this,[tt,Xe])}Re.deferred.resolveWith(this,[Fe,Xe])}(Re)}).fail(function(){Re.deferred.rejectWith(this,[Fe,Xe])})},ge=function(Re){const Fe=this,Xe=Fe.element,tt=Fe.config;clearTimeout(Fe.startTimeout),Fe.isStarted||Fe.start(),Fe.strategy.stop(Xe,tt,Re)},fe=(0,I.b4)(C.N,"dxFXStartAnimation"),Te=function(Re,Fe){const tt=(0,S.X)(!0,{},"css"===Fe.type?ve:be,Fe),vt=function(Re){const Fe=de[Re.type];if(!Fe)throw b.A.Error("E0011",Re.type);return Fe}(tt),qe=function(Re){Re=Re||{};const Fe={transition:(0,w.transition)()?ie:re,frame:re,noAnimation:q};let Xe=Re.strategy||"transition";return"css"===Re.type&&!(0,w.transition)()&&(Xe="noAnimation"),Fe[Xe]}(tt),At={element:(0,W.A)(Re),config:tt,configurator:vt,strategy:qe,isSynchronous:qe.isSynchronous,setup:le,start:ye,stop:ge,deferred:new L.cY};return(0,T.Tn)(vt.validateConfig)&&vt.validateConfig(tt),function(Re){P.A.off(Re.element,fe),P.A.on(Re.element,fe,function(){Pe.stop(Re.element)}),Re.deferred.always(function(){P.A.off(Re.element,fe)})}(At),At};function ze(Re){return Re.data(K)||[]}const Be=function(Re){Re.removeData(K)};function Ue(Re){return!!Re.data(B)}function ot(Re,Fe){if(!(Fe=ze(Re)).length)return;const Xe=Fe.shift();0===Fe.length&&Be(Re),function st(Re){return Re.setup(),Pe.off||Re.isSynchronous?Re.start():Re.startTimeout=setTimeout(function(){Re.start()}),Re.deferred.promise()}(Xe).done(function(){Ue(Re)||ot(Re)})}function et(Re,Fe){if(!Fe||!Fe.position)return;const Xe=(0,W.A)(G);let tt=0,vt=0;const qe=D.A.calculate(Re,Fe.position),At=Re.offset(),Tt=Re.position();Tt.top>At.top&&(vt=Xe.scrollTop()),Tt.left>At.left&&(tt=Xe.scrollLeft()),(0,S.X)(Fe,{left:qe.h.location-At.left+Tt.left-tt,top:qe.v.location-At.top+Tt.top-vt}),delete Fe.position}function Ke(Re,Fe){(0,y.__)(Fe,function(Xe,tt){try{Re.css(Xe,(0,T.Tn)(tt)?tt():tt)}catch{}})}const Pe={off:!1,animationTypes:de,animate:function(Re,Fe){const Xe=(0,W.A)(Re);if(!Xe.length)return(new L.cY).resolve().promise();const tt=Te(Xe,Fe);return function Oe(Re,Fe){const Xe=ze(Re);(function $e(Re,Fe){Re.data(K,Fe)})(Re,Xe),Xe.push(Fe),Ue(Re)||ot(Re,Xe)}(Xe,tt),tt.deferred.promise()},createAnimation:Te,isAnimating:Ue,stop:function(Re,Fe){const Xe=(0,W.A)(Re),tt=ze(Xe);(0,y.__)(tt,function(qe,At){At.config.delay=0,At.config.duration=0,At.isSynchronous=!0}),Ue(Xe)||ot(Xe,tt);const vt=Xe.data(B);vt&&vt.stop(Fe),Xe.removeData(B),Be(Xe)},_simulatedTransitionEndDelay:100},Se=Pe},6870:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>z});var W=M(1363),o=M(5704),P=M(4859),b=M(2660),f=M(6110),S=M(6054),T=M(1830),y=M(3090),d=M(4757),c=M(36),s=M(4504),a=M(7007),u=M(5973),h=M(8649);const g=(0,f.zk)(),_=/left|right/,x=/top|bottom/,w=/fit|flip|none/,D=/scale\(.+?\)/,C=c.A.safari,I=function(oe){const ae={h:"center",v:"center"},ee=(0,P.T6)(oe);return ee&&(0,b.__)(ee,function(){const he=String(this).toLowerCase();_.test(he)?ae.h=he:x.test(he)&&(ae.v=he)}),ae},L=function(oe,ae){return(0,P.Li)(oe,ae)},G=function(oe){switch(oe){case"center":return.5;case"right":case"bottom":return 1;default:return 0}},k=function(oe){switch(oe){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return oe}},U=function(oe,ae){let ee=0;return oe.myLocation<ae.min&&(ee+=ae.min-oe.myLocation),oe.myLocation>ae.max&&(ee+=oe.myLocation-ae.max),ee},B=function(oe,ae,ee){return ae.myLocation<ee.min?"h"===oe?"left":"top":ae.myLocation>ee.max?"h"===oe?"right":"bottom":"none"},K=function(oe){oe.myLocation=oe.atLocation+G(oe.atAlign)*oe.atSize-G(oe.myAlign)*oe.mySize+oe.offset},J={fit:function(oe,ae){let ee=!1;oe.myLocation>ae.max&&(oe.myLocation=ae.max,ee=!0),oe.myLocation<ae.min&&(oe.myLocation=ae.min,ee=!0),oe.fit=ee},flip:function(oe,ae){if(oe.flip=!1,("center"!==oe.myAlign||"center"!==oe.atAlign)&&(oe.myLocation<ae.min||oe.myLocation>ae.max)){const ee=(0,y.X)({},oe,{myAlign:k(oe.myAlign),atAlign:k(oe.atAlign),offset:-oe.offset});K(ee),ee.oversize=U(ee,ae),(ee.myLocation>=ae.min&&ee.myLocation<=ae.max||oe.oversize>ee.oversize)&&(oe.myLocation=ee.myLocation,oe.oversize=ee.oversize,oe.flip=!0)}},flipfit:function(oe,ae){this.flip(oe,ae),this.fit(oe,ae)},none:function(oe){oe.oversize=0}};let ie;const re=function(){const oe=(0,o.A)("<div>").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo((0,o.A)("body")),ae=oe.get(0).offsetWidth-oe.get(0).clientWidth;oe.remove(),ie=ae},q={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},Y=function(oe,ae){const ee=(0,o.A)(oe),he=ee.offset(),de=(0,y.X)(!0,{},q,{h:{location:he.left},v:{location:he.top}});if(!ae)return de;const ue=I(ae.my),be=I(ae.at);let ve=(0,o.A)(ae.of).length&&ae.of||g;const le=L(ae.offset,ae.precise),Ce=function(oe){const ae=(0,P.T6)(oe);let ee=String(ae&&ae[0]).toLowerCase(),he=String(ae&&ae[1]).toLowerCase();return w.test(ee)||(ee="none"),w.test(he)||(he=ee),{h:ee,v:he}}(ae.collision),ye=ae.boundary,ge=L(ae.boundaryOffset,ae.precise),fe={mySize:(0,W.Ot)(ee),myAlign:ue.h,atAlign:be.h,offset:le.h,collision:Ce.h,boundaryOffset:ge.h},xe={mySize:(0,W.P$)(ee),myAlign:ue.v,atAlign:be.v,offset:le.v,collision:Ce.v,boundaryOffset:ge.v};if(ve.preventDefault)fe.atLocation=ve.pageX,xe.atLocation=ve.pageY,fe.atSize=0,xe.atSize=0;else if(ve=(0,o.A)(ve),(0,T.l6)(ve[0]))fe.atLocation=ve.scrollLeft(),xe.atLocation=ve.scrollTop(),"phone"===u.A.real().deviceType&&ve[0].visualViewport?(fe.atLocation=Math.max(fe.atLocation,ve[0].visualViewport.offsetLeft),xe.atLocation=Math.max(xe.atLocation,ve[0].visualViewport.offsetTop),fe.atSize=ve[0].visualViewport.width,xe.atSize=ve[0].visualViewport.height):(fe.atSize=ve[0].innerWidth>ve[0].outerWidth?ve[0].innerWidth:(0,W.RG)(ve),xe.atSize=ve[0].innerHeight>ve[0].outerHeight||C?ve[0].innerHeight:(0,W.Oq)(ve));else if(9===ve[0].nodeType)fe.atLocation=0,xe.atLocation=0,fe.atSize=(0,W.RG)(ve),xe.atSize=(0,W.Oq)(ve);else{const Oe=(0,d.N)(ve.get(0)),ze=Q(ve);fe.atLocation=ze.left,xe.atLocation=ze.top,fe.atSize=Math.max(Oe.width,(0,W.Ot)(ve)),xe.atSize=Math.max(Oe.height,(0,W.P$)(ve))}K(fe),K(xe);const Te=function(){const Oe=(0,o.A)(g),ze=(0,W.RG)(Oe),$e=(0,W.Oq)(Oe);let Be=Oe.scrollLeft(),Ue=Oe.scrollTop();const ot=S.A.getDocumentElement(),st=a.touch?ot.clientWidth/ze:1,et=a.touch?ot.clientHeight/$e:1;void 0===ie&&re();let Ke=ze,Ye=$e;if(ye&&!(0,T.l6)(ye)){const Pe=(0,o.A)(ye),Se=Pe.offset();Be=Se.left,Ue=Se.top,Ke=(0,W.RG)(Pe),Ye=(0,W.Oq)(Pe)}return{h:{min:Be+fe.boundaryOffset,max:Be+Ke/st-fe.mySize-fe.boundaryOffset},v:{min:Ue+xe.boundaryOffset,max:Ue+Ye/et-xe.mySize-xe.boundaryOffset}}}();fe.oversize=U(fe,Te.h),xe.oversize=U(xe,Te.v),fe.collisionSide=B("h",fe,Te.h),xe.collisionSide=B("v",xe,Te.v),J[fe.collision]&&J[fe.collision](fe,Te.h),J[xe.collision]&&J[xe.collision](xe,Te.v);const Ee=function(Oe){return ae.precise?Oe:Math.round(Oe)};return(0,y.X)(!0,de,{h:{location:Ee(fe.myLocation),oversize:Ee(fe.oversize),fit:fe.fit,flip:fe.flip,collisionSide:fe.collisionSide},v:{location:Ee(xe.myLocation),oversize:Ee(xe.oversize),fit:xe.fit,flip:xe.flip,collisionSide:xe.collisionSide},precise:ae.precise}),de},Z=function(oe,ae,ee,he){const de=(0,T.O9)(oe.style)&&!S.A.isNode(oe.style),ue=he?ee.replace(ae,""):ee;if(de)(0,h.eC)(oe,ue,!1);else{const be=S.A.createAttribute("style");be.value=ue,oe.setAttributeNode(be)}},Q=function(oe){var ae,ee;let he=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe;const de=he.get(0);if(!de)return oe.offset();const ue=(null===(ae=de.getAttribute)||void 0===ae?void 0:ae.call(de,"style"))||"",be=null===(ee=ue.match(D))||void 0===ee?void 0:ee[0];let ve;return be?(Z(de,be,ue,!0),ve=Q(oe,he.parent()),Z(de,be,ue,!1)):ve=Q(oe,he.parent()),ve},te=function(oe,ae){const ee=(0,o.A)(oe);if(!ae)return ee.offset();(0,s.fw)(ee,!0);const he=Q(ee),de=ae.h&&ae.v?ae:Y(ee,ae),ue=function(be){return ae.precise?be:Math.round(be)};return(0,s.Cy)(ee,{left:de.h.location-ue(he.left),top:de.v.location-ue(he.top)}),de};te.inverseAlign||(te.inverseAlign=k),te.normalizeAlign||(te.normalizeAlign=I);const z={calculateScrollbarWidth:re,calculate:Y,setup:te,offset:function(oe){return oe=(0,o.A)(oe).get(0),(0,T.l6)(oe)?null:oe&&"pageY"in oe&&"pageX"in oe?{top:oe.pageY,left:oe.pageX}:(0,o.A)(oe).offset()}}},4504:(In,Ze,M)=>{"use strict";M.d(Ze,{Cy:()=>u,IL:()=>c,Oj:()=>s,fw:()=>h,g:()=>g,ro:()=>a,x5:()=>T});var W=M(5704),o=M(5397),P=M(1830);const f=/matrix(3d)?\((.+?)\)/,S=/translate(?:3d)?\((.+?)\)/,T=function(_){_=(0,W.A)(_);const x=a(_);return{left:x.x,top:x.y}};function y(_){return"string"===(0,P.NW)(_)&&"%"===_[_.length-1]}function d(_,x){_.length&&(0,o.p)(_.get(0),"dxTranslator",x)}const c=function(_){_.length&&(0,o.jf)(_.get(0),"dxTranslator")},s=function(_){return _.x=_.x||0,_.y=_.y||0,"translate("+(y(_.x)?_.x:_.x+"px")+", "+(y(_.y)?_.y:_.y+"px")+")"},a=function(_){let x=_.length?(0,o.p)(_.get(0),"dxTranslator"):null;if(!x){let D=(_.css("transform")||s({x:0,y:0})).match(f);const C=D&&D[1];D?(D=D[2].split(","),"3d"===C?D=D.slice(12,15):(D.push(0),D=D.slice(4,7))):D=[0,0,0],x={x:parseFloat(D[0]),y:parseFloat(D[1]),z:parseFloat(D[2])},d(_,x)}return x},u=function(_,x){_=(0,W.A)(_);const w=x.left,D=x.top;let C;void 0===w?(C=a(_),C.y=D||0):void 0===D?(C=a(_),C.x=w||0):(C={x:w||0,y:D||0,z:0},d(_,C)),_.css({transform:s(C)}),(y(w)||y(D))&&c(_)},h=function(_,x){let w;_=(0,W.A)(_);const D={left:0,top:0,transform:"none"};x&&(w=_.css("transition"),D.transition="none"),_.css(D),c(_),x&&(_.get(0),_.css("transition",w))},g=function(_){let x=_.match(S);if(x&&x[1])return x=x[1].split(","),x={x:parseFloat(x[0]),y:parseFloat(x[1]),z:parseFloat(x[2])},x}},851:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>w});const W={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},o=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(D){return[parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3],10)]}},{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*\.*\d+)\)$/,process:function(D){return[parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3],10),parseFloat(D[4])]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(D){return[parseInt(D[1],16),parseInt(D[2],16),parseInt(D[3],16)]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(D){return[parseInt(D[1],16),parseInt(D[2],16),parseInt(D[3],16),Number((parseInt(D[4],16)/255).toFixed(2))]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(D){return[parseInt(D[1]+D[1],16),parseInt(D[2]+D[2],16),parseInt(D[3]+D[3],16),Number((parseInt(D[4]+D[4],16)/255).toFixed(2))]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(D){return[parseInt(D[1]+D[1],16),parseInt(D[2]+D[2],16),parseInt(D[3]+D[3],16)]}},{re:/^hsv\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(D){const C=parseInt(D[1],10),I=parseInt(D[2],10),L=parseInt(D[3],10),N=d(C,I,L);return[N[0],N[1],N[2],1,[C,I,L]]}},{re:/^hsl\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(D){const C=parseInt(D[1],10),I=parseInt(D[2],10),L=parseInt(D[3],10),N=g(C,I,L);return[N[0],N[1],N[2],1,null,[C,I,L]]}}],P=Math.round;function b(D){let C;this.baseColor=D,D&&(C=String(D).toLowerCase().replace(/ /g,""),C=W[C]?"#"+W[C]:C,C=function f(D){if("transparent"===D)return[0,0,0,0];let C=0;const I=o.length;let L;for(;C<I;++C)if(L=o[C].re.exec(D),L)return o[C].process(L);return null}(C)),C||(this.colorIsInvalid=!0),C=C||{},this.r=S(C[0]),this.g=S(C[1]),this.b=S(C[2]),this.a=S(C[3],1,1),this.hsv=C[4]?{h:C[4][0],s:C[4][1],v:C[4][2]}:function y(D,C,I){const L=Math.max(D,C,I),N=Math.min(D,C,I),G=L-N;let k,U,B=L;if(U=0===L?0:1-N/L,L===N)k=0;else switch(L){case D:k=(C-I)/G*60,C<I&&(k+=360);break;case C:k=(I-D)/G*60+120;break;case I:k=(D-C)/G*60+240}return U*=100,B*=100/255,{h:Math.round(k),s:Math.round(U),v:Math.round(B)}}(this.r,this.g,this.b),this.hsl=C[5]?{h:C[5][0],s:C[5][1],l:C[5][2]}:function s(D,C,I){D=_(D,255),C=_(C,255),I=_(I,255);const L=Math.max(D,C,I),N=Math.min(D,C,I),G=L+N;let k,U;const B=G/2;if(L===N)k=U=0;else{const K=L-N;U=B>.5?K/(2-G):K/G,k=function c(D,C,I,L){switch(Math.max(D,C,I)){case D:return(C-I)/L+(C<I?6:0);case C:return(I-D)/L+2;case I:return(D-C)/L+4}}(D,C,I,K),k/=6}return{h:P(360*k),s:P(100*U),l:P(100*B)}}(this.r,this.g,this.b)}function S(D,C,I){return C=C||0,I=I||255,D<0||isNaN(D)?C:D>I?I:D}function d(D,C,I){const N=(100-C)*I/100,G=D%60/60*(I-N),k=N+G,U=I-G;let B,K,J;switch(Math.floor(D%360/60)){case 0:B=I,K=k,J=N;break;case 1:B=U,K=I,J=N;break;case 2:B=N,K=I,J=k;break;case 3:B=N,K=U,J=I;break;case 4:B=k,K=N,J=I;break;case 5:B=I,K=N,J=U}return[Math.round(2.55*B),Math.round(2.55*K),Math.round(2.55*J)]}function a(D,C){let I=C;return"r"===D&&(I=C+1/3),"b"===D&&(I=C-1/3),I}function h(D,C,I){return I=function u(D){return D<0&&(D+=1),D>1&&(D-=1),D}(I),I<1/6?D+6*(C-D)*I:I<.5?C:I<2/3?D+(C-D)*(2/3-I)*6:D}function g(D,C,I){let L,N,G;if(D=_(D,360),C=_(C,100),I=_(I,100),0===C)L=N=G=I;else{const k=I<.5?I*(1+C):I+C-I*C,U=2*I-k;L=h(U,k,a("r",D)),N=h(U,k,a("g",D)),G=h(U,k,a("b",D))}return[P(255*L),P(255*N),P(255*G)]}function _(D,C){return D=Math.min(C,Math.max(0,parseFloat(D))),Math.abs(D-C)<1e-6?1:D%C/parseFloat(C)}function x(D,C,I){return C=C||0,I=I||255,!(D%1!=0||D<C||D>I||"number"!=typeof D||isNaN(D))}b.prototype={constructor:b,highlight:function(D){return this.alter(D=D||10).toHex()},darken:function(D){return this.alter(-(D=D||10)).toHex()},alter:function(D){const C=new b;return C.r=S(this.r+D),C.g=S(this.g+D),C.b=S(this.b+D),C},blend:function(D,C){const I=D instanceof b?D:new b(D),L=new b;return L.r=S(P(this.r*(1-C)+I.r*C)),L.g=S(P(this.g*(1-C)+I.g*C)),L.b=S(P(this.b*(1-C)+I.b*C)),L},toHex:function(){return function T(D,C,I){return"#"+(16777216|D<<16|C<<8|I).toString(16).slice(1)}(this.r,this.g,this.b)},getPureColor:function(){return new b("rgb("+d(this.hsv.h,100,100).join(",")+")")},isValidHex:function(D){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(D)},isValidRGB:function(D,C,I){return!(!x(D)||!x(C)||!x(I))},isValidAlpha:function(D){return!(isNaN(D)||D<0||D>1||"number"!=typeof D)},colorIsInvalid:!1,fromHSL:function(D){const C=new b,I=g(D.h,D.s,D.l);return C.r=I[0],C.g=I[1],C.b=I[2],C}};const w=b},9510:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>f});var W=M(5704),o=M(6110),P=M(1830),b=M(2660);let f=(()=>{class T{constructor(d,c){c=c||{},this._action=d,this._context=c.context||(0,o.zk)(),this._beforeExecute=c.beforeExecute,this._afterExecute=c.afterExecute,this._component=c.component,this._validatingTargetName=c.validatingTargetName;const s=this._excludeValidators={};if(c.excludeValidators)for(let a=0;a<c.excludeValidators.length;a++)s[c.excludeValidators[a]]=!0}execute(){const d={action:this._action,args:Array.prototype.slice.call(arguments),context:this._context,component:this._component,validatingTargetName:this._validatingTargetName,cancel:!1,handled:!1},c=this._beforeExecute,s=this._afterExecute,a=d.args[0]||{};if(!this._validateAction(d)||(c?.call(this._context,d),d.cancel))return;const u=this._executeAction(d);return a.cancel?void 0:(s?.call(this._context,d),u)}_validateAction(d){const c=this._excludeValidators,{executors:s}=T;for(const u in s)if(!c[u]){var a;const h=s[u];if(null===(a=h.validate)||void 0===a||a.call(h,d),d.cancel)return!1}return!0}_executeAction(d){let c;const{executors:s}=T;for(const u in s){var a;const h=s[u];if(null===(a=h.execute)||void 0===a||a.call(h,d),d.handled){c=d.result;break}}return c}static registerExecutor(d,c){(0,P.Qd)(d)?(0,b.__)(d,T.registerExecutor):T.executors[d]=c}static unregisterExecutor(){for(var d=arguments.length,c=new Array(d),s=0;s<d;s++)c[s]=arguments[s];(0,b.__)(c,function(){delete T.executors[this]})}}return T.executors={},T})();const S=T=>y=>{if(!y.args.length)return;const d=y.args[0],c=d[y.validatingTargetName]||d.element;c&&T((0,W.A)(c))&&(y.cancel=!0)};f.registerExecutor({disabled:{validate:S(T=>T.is(".dx-state-disabled, .dx-state-disabled *"))},readOnly:{validate:S(T=>T.is(".dx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)"))},undefined:{execute:T=>{T.action||(T.result=void 0,T.handled=!0)}},func:{execute:T=>{(0,P.Tn)(T.action)&&(T.result=T.action.call(T.context,T.args[0]),T.handled=!0)}}})},3538:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s});var W=M(7251),o=M(1830);const P=function(a,u,h){return function(){const g=this.callBase;this.callBase=a[u];try{return h.apply(this,arguments)}finally{this.callBase=g}}},f=function(a){const u=this;let h,g,_;if(!a)return u;for(g in a)_=a[g],h="function"==typeof u.prototype[g]&&"function"==typeof _,u.prototype[g]=h?P(u.parent.prototype,g,_):_;return u},S=function(){const a=this;let u,h,g;const _=Object.prototype.hasOwnProperty.bind(a);for(!_("_includedCtors")&&!_("_includedPostCtors")&&(a._includedCtors=a._includedCtors.slice(0),a._includedPostCtors=a._includedPostCtors.slice(0)),g=0;g<arguments.length;g++)for(h in u=arguments[g],u.ctor&&a._includedCtors.push(u.ctor),u.postCtor&&a._includedPostCtors.push(u.postCtor),u)"ctor"===h||"postCtor"===h||"default"===h||(a.prototype[h]=u[h]);return a},T=function(a){if(!Object.prototype.hasOwnProperty.bind(this)("parent")&&this.parent){const g=Object.getPrototypeOf(this);return g===a||g.subclassOf(a)}return this.parent===a||!(!this.parent||!this.parent.subclassOf)&&this.parent.subclassOf(a)},y=function(){throw W.A.Error("E0001")},d=function(){const a=Object.prototype.hasOwnProperty;return function(u,h){for(const g in u){if(!a.call(u,g))return;h[g]=u[g]}}}(),c=function(){};c.inherit=function(a){const u=function(){if(!this||(0,o.l6)(this)||"function"!=typeof this.constructor)throw W.A.Error("E0003");const h=this,g=h.ctor,_=h.constructor._includedCtors,x=h.constructor._includedPostCtors;let w;for(w=0;w<_.length;w++)_[w].call(h);for(g&&g.apply(h,arguments),w=0;w<x.length;w++)x[w].call(h)};return u.prototype=function(a){const u=function(){};return u.prototype=a.prototype,new u}(this),d(this,u),u.inherit=this.inherit,u.abstract=y,u.redefine=f,u.include=S,u.subclassOf=T,u.parent=this,u._includedCtors=this._includedCtors?this._includedCtors.slice(0):[],u._includedPostCtors=this._includedPostCtors?this._includedPostCtors.slice(0):[],u.prototype.constructor=u,u.redefine(a),u},c.abstract=y;const s=c},5021:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>N});var W=M(3686),o=M(3090),P=M(5737),b=M(1830),f=M(4859),S=M(4270),T=M(5866),y=M(5170);const d={},c={};class s{constructor(k,U){this._options=k,this._optionsByReference=U}_setByReference(k,U){(0,o.X)(!0,k,U);for(const B in this._optionsByReference)Object.prototype.hasOwnProperty.call(U,B)&&(k[B]=U[B])}_setPreparedValue(k,U,B,K){const J=this.get(this._options,k,!1);if(!(0,T.a)(J,U)){const ie=(0,S.u7)(k);!K&&this._changingCallback(k,J,U),c[k]=c[k]||(0,S.vL)(k),c[k](this._options,U,{functionsAsIs:!0,merge:(0,b.O9)(B)?B:!this._optionsByReference[k],unwrapObservables:ie.length>1&&!!this._optionsByReference[ie[0]]}),!K&&this._changedCallback(k,U,J)}}_prepareRelevantNames(k,U,B,K){if((0,b.Qd)(B))for(const J in B)this._prepareRelevantNames(k,`${U}.${J}`,B[J]);this._namePreparedCallbacks(k,U,B,K)}get(){let k=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._options,U=arguments.length>1?arguments[1]:void 0,B=arguments.length>2?arguments[2]:void 0;return d[U]=d[U]||(0,S.Hz)(U),d[U](k,{functionsAsIs:!0,unwrapObservables:B})}set(k,U,B,K){k=(0,y.a5)(k,U);for(const J in k)this._prepareRelevantNames(k,J,k[J],K);for(const J in k)this._setPreparedValue(J,k[J],B,K)}onRelevantNamesPrepared(k){this._namePreparedCallbacks=k}onChanging(k){this._changingCallback=k}onChanged(k){this._changedCallback=k}dispose(){this._changingCallback=f.lQ,this._changedCallback=f.lQ}}class a{constructor(k,U,B,K){this._default=U,this._deprecated=K,this._deprecatedNames=[],this._initDeprecatedNames(),this._optionManager=new s(k,B),this._optionManager.onRelevantNamesPrepared((J,ie,re,q)=>this._setRelevantNames(J,ie,re,q)),this._cachedOptions={},this._rules=[]}set _initial(k){this._initialOptions=k}get _initial(){if(!this._initialOptions){const k=this._getByRules(this.silent("defaultOptionsRules"));this._initialOptions=this._default,this._optionManager._setByReference(this._initialOptions,k)}return this._initialOptions}_initDeprecatedNames(){for(const k in this._deprecated)this._deprecatedNames.push(k)}_getByRules(k){return k=Array.isArray(k)?this._rules.concat(k):this._rules,(0,y.a6)(k)}_notifyDeprecated(k){const U=this._deprecated[k];U&&this._deprecatedCallback(k,U)}_setRelevantNames(k,U,B,K){if(U){const J=this._normalizeName(U,K);J&&J!==U&&(this._setField(k,J,B),this._clearField(k,U))}}_setField(k,U,B){let K="",J=null;do{K=K?`.${K}`:"",K=(0,y.MO)(U)+K,J=(U=(0,y.E1)(U))?this._optionManager.get(k,U,!1):k}while(!J);J[K]=B}_clearField(k,U){delete k[U];const B=(0,y.E1)(U),K=B?this._optionManager.get(k,B,!1):k;K&&delete K[(0,y.MO)(U)]}_normalizeName(k,U){if(this._deprecatedNames.length&&k)for(let B=0;B<this._deprecatedNames.length;B++)if(this._deprecatedNames[B]===k){const K=this._deprecated[k];if(K)return!U&&this._notifyDeprecated(k),K.alias||k}return k}addRules(k){this._rules=k.concat(this._rules)}applyRules(k){const U=this._getByRules(k);this.silent(U)}dispose(){this._deprecatedCallback=f.lQ,this._startChangeCallback=f.lQ,this._endChangeCallback=f.lQ,this._optionManager.dispose()}onChanging(k){this._optionManager.onChanging(k)}onChanged(k){this._optionManager.onChanged(k)}onDeprecated(k){this._deprecatedCallback=k}onStartChange(k){this._startChangeCallback=k}onEndChange(k){this._endChangeCallback=k}isInitial(k){const U=this.silent(k),B=this.initial(k);return(0,b.Tn)(U)&&(0,b.Tn)(B)?U.toString()===B.toString():(0,f.RL)(U,B)}initial(k){return(0,y.Ov)(this._initial,k)}option(k,U){if(arguments.length<2&&"object"!==(0,b.NW)(k))return this._optionManager.get(void 0,this._normalizeName(k));this._startChangeCallback();try{this._optionManager.set(k,U)}finally{this._endChangeCallback()}}silent(k,U){if(arguments.length<2&&"object"!==(0,b.NW)(k))return this._optionManager.get(void 0,k,void 0,!0);this._optionManager.set(k,U,void 0,!0)}reset(k){if(k){const B=(0,S.u7)(k).reduce((J,ie)=>J?J[ie]:this.initial(ie),null),K=(0,b.Gv)(B)?(0,P.A)({},B):B;this._optionManager.set(k,K,!1)}}getAliasesByName(k){return Object.keys(this._deprecated).filter(U=>k===this._deprecated[U].alias)}isDeprecated(k){return Object.prototype.hasOwnProperty.call(this._deprecated,k)}cache(k,U){if(arguments.length<2)return this._cachedOptions[k];this._cachedOptions[k]=(0,o.X)(this._cachedOptions[k],U)}}var u=M(3538),h=M(9510),g=M(7251),_=M(8684),x=M(6101),w=M(8879),D=M(6021);class C{constructor(){this._postponedOperations={}}add(k,U,B){if(k in this._postponedOperations)B&&this._postponedOperations[k].promises.push(B);else{const K=new D.cY;this._postponedOperations[k]={fn:U,completePromise:K,promises:B?[B]:[]}}return this._postponedOperations[k].completePromise.promise()}callPostponedOperations(){for(const k in this._postponedOperations){const U=this._postponedOperations[k];(0,b.O9)(U)&&(U.promises&&U.promises.length?(0,D.z7)(...U.promises).done(U.fn).then(U.completePromise.resolve):U.fn().done(U.completePromise.resolve))}this._postponedOperations={}}}const I=G=>G.charAt(2).toLowerCase()+G.substr(3),L=G=>0===G.indexOf("_",0),N=u.A.inherit({_setDeprecatedOptions(){this._deprecatedOptions={}},_getDeprecatedOptions(){return this._deprecatedOptions},_getDefaultOptions:()=>({onInitialized:null,onOptionChanged:null,onDisposing:null,defaultOptionsRules:null}),_defaultOptionsRules:()=>[],_setOptionsByDevice(G){this._options.applyRules(G)},_convertRulesToOptions:G=>(0,y.a6)(G),_isInitialOptionValue(G){return this._options.isInitial(G)},_setOptionsByReference(){this._optionsByReference={}},_getOptionsByReference(){return this._optionsByReference},ctor(){let G=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{_optionChangedCallbacks:k,_disposingCallbacks:U}=G;this.NAME=(0,w.UU)(this.constructor),this._eventsStrategy=x.h.create(this,G.eventsStrategy),this._updateLockCount=0,this._optionChangedCallbacks=k||(0,_.A)(),this._disposingCallbacks=U||(0,_.A)(),this.postponedOperations=new C,this._createOptions(G)},_createOptions(G){this.beginUpdate();try{this._setOptionsByReference(),this._setDeprecatedOptions(),this._options=new a(this._getDefaultOptions(),this._getDefaultOptions(),this._getOptionsByReference(),this._getDeprecatedOptions()),this._options.onChanging((k,U,B)=>this._initialized&&this._optionChanging(k,U,B)),this._options.onDeprecated((k,U)=>this._logDeprecatedOptionWarning(k,U)),this._options.onChanged((k,U,B)=>this._notifyOptionChanged(k,U,B)),this._options.onStartChange(()=>this.beginUpdate()),this._options.onEndChange(()=>this.endUpdate()),this._options.addRules(this._defaultOptionsRules()),G&&G.onInitializing&&G.onInitializing.apply(this,[G]),this._setOptionsByDevice(G.defaultOptionsRules),this._initOptions(G)}finally{this.endUpdate()}},_initOptions(G){this.option(G)},_init(){this._createOptionChangedAction(),this.on("disposing",G=>{this._disposingCallbacks.fireWith(this,[G])})},_logDeprecatedOptionWarning(G,k){g.A.log("W0001",this.NAME,G,k.since,k.message||`Use the '${k.alias}' option instead`)},_logDeprecatedComponentWarning(G,k){g.A.log("W0000",this.NAME,G,`Use the '${k}' widget instead`)},_createOptionChangedAction(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled","readOnly"]})},_createDisposingAction(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled","readOnly"]})},_optionChanged(G){switch(G.name){case"onDisposing":case"onInitialized":case"defaultOptionsRules":break;case"onOptionChanged":this._createOptionChangedAction()}},_dispose(){this._optionChangedCallbacks.empty(),this._createDisposingAction(),this._disposingAction(),this._eventsStrategy.dispose(),this._options.dispose(),this._disposed=!0},_lockUpdate(){this._updateLockCount++},_unlockUpdate(){this._updateLockCount=Math.max(this._updateLockCount-1,0)},_isUpdateAllowed(){return 0===this._updateLockCount},_isInitializingRequired(){return!this._initializing&&!this._initialized},isInitialized(){return this._initialized},_commitUpdate(){this.postponedOperations.callPostponedOperations(),this._isInitializingRequired()&&this._initializeComponent()},_initializeComponent(){this._initializing=!0;try{this._init()}finally{this._initializing=!1,this._lockUpdate(),this._createActionByOption("onInitialized",{excludeValidators:["disabled","readOnly"]})(),this._unlockUpdate(),this._initialized=!0}},instance(){return this},beginUpdate:function(){this._lockUpdate()},endUpdate:function(){this._unlockUpdate(),this._isUpdateAllowed()&&this._commitUpdate()},_optionChanging:f.lQ,_notifyOptionChanged(G,k,U){if(this._initialized){const B=[G].concat(this._options.getAliasesByName(G));for(let K=0;K<B.length;K++){const J=B[K],ie={name:(0,S.u7)(J)[0],fullName:J,value:k,previousValue:U};L(J)||(this._optionChangedCallbacks.fireWith(this,[(0,o.X)(this._defaultActionArgs(),ie)]),this._optionChangedAction((0,o.X)({},ie))),!this._disposed&&this._cancelOptionChange!==J&&this._optionChanged(ie)}}},initialOption(G){return this._options.initial(G)},_defaultActionConfig(){return{context:this,component:this}},_defaultActionArgs(){return{component:this}},_createAction(G,k){let U;return B=>((0,b.O9)(B)||(B={}),(0,b.Qd)(B)||(B={actionValue:B}),U=U||new h.A(G,(0,o.X)({},k,this._defaultActionConfig())),U.execute.call(U,(0,o.X)(B,this._defaultActionArgs())))},_createActionByOption(G,k){var U=this;let B,K,J;k=(0,o.X)({},k);const ie=function(){if(!K){if(k=k||{},"string"!=typeof G)throw g.A.Error("E0008");0===G.indexOf("on")&&(K=I(G)),J=U.option(G)}if(B||J||k.beforeExecute||k.afterExecute||U._eventsStrategy.hasEvent(K)){if(!B){const Q=k.beforeExecute;k.beforeExecute=function(){for(var te=arguments.length,pe=new Array(te),z=0;z<te;z++)pe[z]=arguments[z];Q&&Q.apply(U,pe),U._eventsStrategy.fireEvent(K,pe[0].args)},B=U._createAction(J,k)}for(var q=arguments.length,Y=new Array(q),Z=0;Z<q;Z++)Y[Z]=arguments[Z];return(0,W.A)().wrapActionsBeforeExecute?((U.option("beforeActionExecute")||f.lQ)(U,B,k)||B).apply(U,Y):B.apply(U,Y)}};return(0,W.A)().wrapActionsBeforeExecute?ie:(this.option("onActionCreated")||f.lQ)(this,ie,k)||ie},on(G,k){return this._eventsStrategy.on(G,k),this},off(G,k){return this._eventsStrategy.off(G,k),this},hasActionSubscription:function(G){return!!this._options.silent(G)||this._eventsStrategy.hasEvent(I(G))},isOptionDeprecated(G){return this._options.isDeprecated(G)},_setOptionWithoutOptionChange(G,k){this._cancelOptionChange=G,this.option(G,k),this._cancelOptionChange=!1},_getOptionValue(G,k){const U=this.option(G);return(0,b.Tn)(U)?U.bind(k)():U},option(){return this._options.option(...arguments)},resetOption(G){this.beginUpdate(),this._options.reset(G),this.endUpdate()}})},1973:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(5704);const P=new(M(8167).A);var b=M(7251),f=M(8879);P.add(function(d,c){W.A.fn[d]=function(s){let u;if("string"==typeof s){const h=s,g=[].slice.call(arguments).slice(1);this.each(function(){const _=c.getInstance(this);if(!_)throw b.A.Error("E0009",d);const w=_[h].apply(_,g);void 0===u&&(u=w)})}else this.each(function(){const h=c.getInstance(this);h?h.option(s):new c(this,s)}),u=this;return u}});const y=function(d,c,s){s?c[d]=s:s=c,(0,f.UU)(s,d),P.fire(d,s)}},3686:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(3090),o=M(7251);const P={rtlEnabled:!1,defaultCurrency:"USD",defaultUseCurrencyAccountingStyle:!0,oDataFilterToLower:!0,serverDecimalSeparator:".",decimalSeparator:".",thousandsSeparator:",",forceIsoDateParsing:!0,wrapActionsBeforeExecute:!0,useLegacyStoreResult:!1,useJQuery:void 0,editorStylingMode:void 0,useLegacyVisibleIndex:!1,floatingActionButtonConfig:{icon:"add",closeIcon:"close",label:"",position:{at:"right bottom",my:"right bottom",offset:{x:-16,y:-16}},maxSpeedDialActionCount:5,shading:!1,direction:"auto"},optionsParser:y=>{"{"!==y.trim().charAt(0)&&(y="{"+y+"}");try{return JSON.parse(y)}catch(d){try{return JSON.parse(b(y))}catch{throw o.A.Error("E3018",d,y)}}}},b=y=>y.replace(/'/g,'"').replace(/,\s*([\]}])/g,"$1").replace(/([{,])\s*([^":\s]+)\s*:/g,'$1"$2":'),f=["decimalSeparator","thousandsSeparator"],S=function(){if(!arguments.length)return P;const y=arguments.length<=0?void 0:arguments[0];f.forEach(d=>{y[d]&&o.A.log("W0003","config",d,"19.2",`Now, the ${d} is selected based on the specified locale.`)}),(0,W.X)(P,y)};typeof DevExpress<"u"&&DevExpress.config&&S(DevExpress.config);const T=S},5973:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>L});var W=M(1363),o=M(5704),P=M(6110),b=M(3090),f=M(1830),S=M(7251),T=M(8684),y=M(2720),d=M(1773),c=M(6101),s=M(4129),a=M(4017),u=M(3686);const h=(0,P.zk)(),g={iPhone:"iPhone",iPhone5:"iPhone",iPhone6:"iPhone",iPhone6plus:"iPhone",iPad:"iPad",iPadMini:"iPad Mini",androidPhone:"Android Mobile",androidTablet:"Android",msSurface:"Windows ARM Tablet PC",desktop:"desktop"},_={deviceType:"desktop",platform:"generic",version:[],phone:!1,tablet:!1,android:!1,ios:!1,generic:!0,grade:"A",mac:!1},x={generic(N){const G=/windows phone/i.test(N)||N.match(/WPDesktop/),k=!G&&/Windows(.*)arm(.*)Tablet PC/i.test(N),U=!G&&!k&&/msapphost/i.test(N),B=/((intel|ppc) mac os x)/.test(N.toLowerCase());return G||k||U||B?{deviceType:G?"phone":k?"tablet":"desktop",platform:"generic",version:[],grade:"A",mac:B}:null},appleTouchDevice(N){const G=(0,P.w3)(),k=/Macintosh/i.test(N)&&G?.maxTouchPoints>2;if(!/ip(hone|od|ad)/i.test(N)&&!k)return null;const B=/ip(hone|od)/i.test(N),K=N.match(/os\s{0,}X? (\d+)_(\d+)_?(\d+)?/i);return{deviceType:B?"phone":"tablet",platform:"ios",version:K?[parseInt(K[1],10),parseInt(K[2],10),parseInt(K[3]||0,10)]:[],grade:480===h.screen.height?"B":"A"}},android(N){const G=/android|htc_|silk/i.test(N),k=/windows phone/i.test(N);if(!G||k)return null;const U=/mobile/i.test(N),B=N.match(/android (\d+)\.?(\d+)?\.?(\d+)?/i),K=B?[parseInt(B[1],10),parseInt(B[2]||0,10),parseInt(B[3]||0,10)]:[];return{deviceType:U?"phone":"tablet",platform:"android",version:K,grade:K.length>1&&(K[0]<4||4===K[0]&&K[1]<4)?"B":"A"}}},w=[x.appleTouchDevice,x.android,x.generic],C=new class D{constructor(G){this._window=G?.window||h,this._realDevice=this._getDevice(),this._currentDevice=void 0,this._currentOrientation=void 0,this._eventsStrategy=new c.h(this),this.changed=(0,T.A)(),(0,P.Vd)()&&(y.A.add(this._recalculateOrientation.bind(this)),d.A.add(this._recalculateOrientation.bind(this)))}current(G){if(G)return this._currentDevice=this._getDevice(G),this._forced=!0,void this.changed.fire();if(!this._currentDevice){G=void 0;try{G=this._getDeviceOrNameFromWindowScope()}catch{G=this._getDeviceNameFromSessionStorage()}finally{G||(G=this._getDeviceNameFromSessionStorage()),G&&(this._forced=!0)}this._currentDevice=this._getDevice(G)}return this._currentDevice}real(G){return(0,b.X)({},this._realDevice)}orientation(){return this._currentOrientation}isForced(){return this._forced}isRippleEmulator(){return!!this._window.tinyHippos}_getCssClasses(G){const k=[],U=this._realDevice;return(G=G||this.current()).deviceType&&(k.push(`dx-device-${G.deviceType}`),"desktop"!==G.deviceType&&k.push("dx-device-mobile")),k.push(`dx-device-${U.platform}`),U.version&&U.version.length&&k.push(`dx-device-${U.platform}-${U.version[0]}`),this.isSimulator()&&k.push("dx-simulator"),(0,u.A)().rtlEnabled&&k.push("dx-rtl"),k}attachCssClasses(G,k){this._deviceClasses=this._getCssClasses(k).join(" "),(0,o.A)(G).addClass(this._deviceClasses)}detachCssClasses(G){(0,o.A)(G).removeClass(this._deviceClasses)}isSimulator(){try{return this._isSimulator||(0,P.Vd)()&&this._window.top!==this._window.self&&this._window.top["dx-force-device"]||this.isRippleEmulator()}catch{return!1}}forceSimulator(){this._isSimulator=!0}_getDevice(G){if("genericPhone"===G&&(G={deviceType:"phone",platform:"generic",generic:!0}),(0,f.Qd)(G))return this._fromConfig(G);{let k;if(G){if(k=g[G],!k)throw S.A.Error("E0005")}else k=(0,P.w3)().userAgent;return this._fromUA(k)}}_getDeviceOrNameFromWindowScope(){let G;return(0,P.Vd)()&&(this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"])&&(G=this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"]),G}_getDeviceNameFromSessionStorage(){const G=(0,s.s)();if(!G)return;const k=G.getItem("dx-force-device");try{return JSON.parse(k)}catch{return k}}_fromConfig(G){const k=(0,b.X)({},_,this._currentDevice,G);return(0,b.X)(k,{phone:"phone"===k.deviceType,tablet:"tablet"===k.deviceType,android:"android"===k.platform,ios:"ios"===k.platform,generic:"generic"===k.platform})}_fromUA(G){for(let k=0;k<w.length;k+=1){const B=(0,w[k])(G);if(B)return this._fromConfig(B)}return _}_changeOrientation(){const G=(0,o.A)(this._window),k=(0,W.Oq)(G)>(0,W.RG)(G)?"portrait":"landscape";this._currentOrientation!==k&&(this._currentOrientation=k,this._eventsStrategy.fireEvent("orientationChanged",[{orientation:k}]))}_recalculateOrientation(){const G=(0,W.RG)(this._window);this._currentWidth!==G&&(this._currentWidth=G,this._changeOrientation())}on(G,k){return this._eventsStrategy.on(G,k),this}off(G,k){return this._eventsStrategy.off(G,k),this}},I=(0,a.Uq)();I&&C.attachCssClasses(I),a.WV.add((N,G)=>{C.detachCssClasses(G),C.attachCssClasses(N)});const L=C},6054:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>d});var W=M(1926),o=M(4859),P=M(7713);const y={querySelectorAll:(c,s)=>c.querySelectorAll(s),elementMatches(c,s){return(c.matches||c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector||(u=>{const h=c.document||c.ownerDocument;if(!h)return!1;const g=this.querySelectorAll(h,u);for(let _=0;_<g.length;_++)if(g[_]===c)return!0})).call(c,s)},createElement(c,s){return(s=s||this._document).createElement(c)},createElementNS(c,s,a){return(a=a||this._document).createElementNS(c,s)},createTextNode(c,s){return(s=s||this._document).createTextNode(c)},createAttribute(c,s){return(s=s||this._document).createAttribute(c)},isNode:c=>c&&"object"==typeof c&&"nodeType"in c&&"nodeName"in c,isElementNode:c=>c&&1===c.nodeType,isTextNode:c=>c&&3===c.nodeType,isDocument:c=>c&&9===c.nodeType,isDocumentFragment:c=>c&&11===c.nodeType,removeElement(c){const s=c&&c.parentNode;s&&s.removeChild(c)},insertElement(c,s,a){c&&s&&c!==s&&(a?c.insertBefore(s,a):c.appendChild(s))},getAttribute:(c,s)=>c.getAttribute(s),setAttribute(c,s,a){"style"===s?c.style.cssText=a:c.setAttribute(s,a)},removeAttribute(c,s){c.removeAttribute(s)},setProperty(c,s,a){c[s]=a},setText(c,s){c&&(c.textContent=s)},setClass(c,s,a){1===c.nodeType&&s&&(a?c.classList.add(s):c.classList.remove(s))},setStyle(c,s,a){c.style[s]=a||""},_document:typeof document>"u"?void 0:document,getDocument(){return this._document},getActiveElement(c){return this.getRootNode(c).activeElement},getRootNode(c){var s;return(null==c||null===(s=c.getRootNode)||void 0===s?void 0:s.call(c))??this._document},getBody(){return this._document.body},createDocumentFragment(){return this._document.createDocumentFragment()},getDocumentElement(){return this._document.documentElement},getLocation(){return this._document.location},getSelection(){return this._document.selection},getReadyState(){return this._document.readyState},getHead(){return this._document.head},hasDocumentProperty(c){return c in this._document},listen:(c,s,a,u)=>c&&"addEventListener"in c?(c.addEventListener(s,a,u),()=>{c.removeEventListener(s,a)}):o.lQ,elementsFromPoint(c,s,a){const u=this.getRootNode(a);return u.host?(0,P.c)(c,s,u):u.elementsFromPoint(c,s)}},d=(0,W.A)(y)},7631:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>It});var W=M(5704),o=M(3686),P=M(7251),b=M(1773),f=M(5021),S=M(1830),T=M(4859),y=M(3090),d=M(5645),c=M(8412),s=M(4162);const _=new d.l(Ot=>{let{model:zt,parent:un}=Ot;const Pn=zt.widget;if(!Pn)return(0,W.A)();const ci=(0,W.A)("<div>"),Ei=zt.options||{};return un?un._createComponent(ci,Pn,Ei):ci[Pn](Ei),ci});class x{constructor(zt,un){this._tempTemplates=[],this._defaultTemplates={},this._anonymousTemplateName=un||"template",this._createElement=zt||s.SN,this._createTemplateIfNeeded=this._createTemplateIfNeeded.bind(this)}static createDefaultOptions(){return{integrationOptions:{watchMethod:function(zt,un){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipImmediate||un(zt()),T.lQ},templates:{"dx-polymorph-widget":_},useDeferUpdateForTemplates:!0}}}get anonymousTemplateName(){return this._anonymousTemplateName}addDefaultTemplates(zt){this._defaultTemplates=(0,y.X)({},this._defaultTemplates,zt)}dispose(){this._tempTemplates.forEach(zt=>{zt.template.dispose&&zt.template.dispose()}),this._tempTemplates=[]}extractTemplates(zt){return{templates:this._extractTemplates(zt),anonymousTemplateMeta:this._extractAnonymousTemplate(zt)}}_extractTemplates(zt){const un=(0,s.zD)(zt,"dxTemplate"),Pn=(0,s.pK)(un);return un.forEach(ci=>{let{element:Ei,options:{name:Hi}}=ci;Ei===Pn[Hi]?(0,W.A)(Ei).addClass("dx-template-wrapper").detach():(0,W.A)(Ei).remove()}),Object.keys(Pn).map(ci=>({name:ci,template:this._createTemplate(Pn[ci])}))}_extractAnonymousTemplate(zt){const un=zt.contents().detach();return un.filter((ci,Ei)=>{const Hi=3===Ei.nodeType,mo=(0,W.A)(Ei).text().trim().length<1;return!(Hi&&mo)}).length>0?{template:this._createTemplate(un),name:this._anonymousTemplateName}:{}}_createTemplateIfNeeded(zt){const un=this._tempTemplates.filter(ci=>ci.source===(0,s.AY)(zt))[0];if(un)return un.template;const Pn=this._createTemplate(zt);return this._tempTemplates.push({template:Pn,source:(0,s.AY)(zt)}),Pn}_createTemplate(zt){return this._createElement((0,s.I3)(zt))}getTemplate(zt,un,Pn,ci){let{isAsyncTemplate:Ei,skipTemplates:Hi}=Pn;return(0,S.Tn)(zt)?new d.l(mo=>{const xo=zt.apply(ci,(0,s.jJ)(mo));if(!(0,S.O9)(xo))return new c.A;let vr=!1;const rn=(0,s.Xl)(xo,Zn=>Zn.nodeType||(0,S.Kb)(Zn)&&!(0,W.A)(Zn).is("script")?new d.l(()=>Zn):(vr=!0,this._createTemplate(Zn)),un,Ei,Hi,this._defaultTemplates),en=rn.render(mo);return vr&&rn.dispose&&rn.dispose(),en}):(0,s.Xl)(zt,this._createTemplateIfNeeded,un,Ei,Hi,this._defaultTemplates)}}var w=M(8879),D=M(7713),C=M(5397),I=M(2660),L=M(9522),N=M(6110),G=M(1294),k=M(5737),U=M(9144),B=M(9274);const ie=[];function q(Ot){const{major:zt,minor:un,patch:Pn}=Ot;return[zt,un,Pn].join(".")}function Y(Ot){const[zt,un,Pn]=Ot.split(".").map(Number);return{major:zt,minor:un,patch:Pn}}function ae(Ot){return new Uint8Array(atob(Ot).split("").map(zt=>zt.charCodeAt(0)))}function le(Ot,zt){return(Ot<<zt|Ot>>>32-zt)>>>0}function Ce(Ot,zt){const un=new Uint8Array(Ot.length+zt.length);return un.set(Ot,0),un.set(zt,Ot.length),un}const ye={e:65537,n:new Uint8Array([200,219,153,203,140,7,228,253,193,243,62,137,139,60,68,242,48,142,113,88,185,235,253,105,80,74,32,170,96,74,111,250,7,205,154,3,146,115,153,53,45,132,123,56,61,208,184,201,63,24,109,223,0,179,169,102,139,224,73,233,45,173,138,66,98,88,69,76,177,111,113,218,192,33,101,152,25,134,34,173,32,82,230,44,247,200,253,170,192,246,30,12,96,205,100,249,181,93,0,231])},fe="3021300906052b0e03021a05000414";function xe(Ot){const zt=(8*ye.n.length+6)/8,un=Ce(function ee(Ot){var zt;return new Uint8Array((null===(zt=Ot.match(/.{1,2}/g))||void 0===zt?void 0:zt.map(un=>parseInt(un,16)))??[])}(fe),Ot);if(un.length+10>zt)throw Error("Key is too short for SHA1 signing algorithm");const Pn=new Uint8Array(zt-un.length);return Pn.fill(255,0,Pn.length-1),Pn[0]=0,Pn[1]=1,Pn[Pn.length-1]=0,Ce(Pn,un)}function Oe(Ot){const zt=function Ee(Ot){const zt=new Uint8Array(Ot.length+1);zt.set(function he(Ot){const zt=new Uint8Array(Ot.length);for(let un=0;un<Ot.length;un+=1)zt[un]=255&Ot.charCodeAt(un);return zt}(Ot)),zt[zt.length-1]=128;const un=function ue(Ot){const zt=new Uint32Array(1+(Ot.length-1>>2));for(let un=0;un<Ot.length;un+=1)zt[un>>2]|=Ot[un]<<8*(3-un%4);return zt}(new Uint8Array(zt)),Pn=new Uint32Array(16*Math.ceil((un.length+2)/16));return Pn.set(un,0),Pn[Pn.length-1]=8*(zt.length-1),Pn}(Ot),un=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]);for(let Pn=0;Pn<zt.length;Pn+=16){const ci=new Uint32Array(80);for(let rn=0;rn<16;rn+=1)ci[rn]=zt[Pn+rn];for(let rn=16;rn<80;rn+=1){const en=ci[rn-3]^ci[rn-8]^ci[rn-14]^ci[rn-16];ci[rn]=en<<1|en>>>31}let Ei=un[0],Hi=un[1],mo=un[2],xo=un[3],vr=un[4];for(let rn=0;rn<80;rn+=1){const[en,Zn]=rn<20?[Hi&mo|~Hi&xo,1518500249]:rn<40?[Hi^mo^xo,1859775393]:rn<60?[Hi&mo|Hi&xo|mo&xo,2400959708]:[Hi^mo^xo,3395469782],Di=le(Ei,5)+en+vr+Zn+ci[rn];vr=xo,xo=mo,mo=le(Hi,30),Hi=Ei,Ei=Di}un[0]+=Ei,un[1]+=Hi,un[2]+=mo,un[3]+=xo,un[4]+=vr}return function de(Ot){const zt=new Uint8Array(4*Ot.length);for(let un=0;un<zt.length;un+=1)zt[un]=Ot[un>>2]>>>8*(3-un%4);return zt}(un)}const $e=()=>typeof HTMLElement<"u",Be=$e()?HTMLElement:class{},ot_trigger="dx-license-trigger",ot_panel="dx-license",st_buyNow="buy-now",st_version="version",et={opacity:"1",visibility:"visible","clip-path":"none",filter:"none"},Ke=(0,k.A)({},et,{width:"100%",height:"auto","line-height":"normal",display:"block","z-index":"1500",position:"static",transform:"translate(0px, 0px)","background-color":"#FF7200",border:"none",margin:"auto","box-sizing":"border-box","text-align":"center"}),Ye=(0,k.A)({},Ke,{display:"flex","align-items":"center","flex-direction":"row",position:"relative",top:"0px",left:"0px",padding:"0.5rem"}),Pe={width:"1rem",cursor:"pointer",height:"1rem"},Se=(0,k.A)({},et,{display:"inline",position:"static",padding:"0px",margin:"0px",color:"white","font-family":"'Segoe UI','Open Sans Condensed',-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif","font-size":"0.875rem","font-wight":"600"});function Re(Ot,zt){const un=zt?(0,k.A)({},Ot,zt):Ot;return Object.keys(un).reduce((Pn,ci)=>`${Pn}${[ci,`${un[ci]} !important;`].join(": ")}`,"")}let Fe=(()=>{class Ot extends Be{constructor(){var un,Pn,ci,Ei,Hi;super(),this._observer=null,this._inReassign=!1,this._hidden=!1,this._spanStyles=Re(Se,null===(un=Ot.customStyles)||void 0===un?void 0:un.textStyles),this._linkStyles=Re(Se,null===(Pn=Ot.customStyles)||void 0===Pn?void 0:Pn.linkStyles),this._containerStyles=Re(Ye,null===(ci=Ot.customStyles)||void 0===ci?void 0:ci.containerStyles),this._contentStyles=Re(Ke,null===(Ei=Ot.customStyles)||void 0===Ei?void 0:Ei.contentStyles),this._buttonStyles=Re(Pe,null===(Hi=Ot.customStyles)||void 0===Hi?void 0:Hi.contentStyles)}_createSpan(un){const Pn=document.createElement("span");return Pn.innerText=un,Pn.style.cssText=this._spanStyles,Pn}_createLink(un,Pn){const ci=document.createElement("a");return ci.innerText=un,ci.style.cssText=this._linkStyles,ci.href=Pn,ci.target="_blank",ci}_createButton(){const un=document.createElement("div");un.style.cssText=this._buttonStyles;const Pn=document.createElementNS("http://www.w3.org/2000/svg","polygon"),ci=document.createElementNS("http://www.w3.org/2000/svg","svg");return Pn.setAttribute("points","13.4 12.7 8.7 8 13.4 3.4 12.6 2.6 8 7.3 3.4 2.6 2.6 3.4 7.3 8 2.6 12.6 3.4 13.4 8 8.7 12.7 13.4 13.4 12.7"),Pn.style.cssText=Re({fill:"#fff",opacity:".5","stroke-width":"0px"}),ci.setAttribute("id","Layer_1"),ci.setAttribute("data-name","Layer 1"),ci.setAttribute("version","1.1"),ci.setAttribute("viewBox","0 0 16 16"),ci.style.cssText=Re({"vertical-align":"baseline"}),ci.appendChild(Pn),un.appendChild(ci),un.onclick=()=>{this._hidden=!0,this.style.cssText=Re({display:"none"})},un}_createContentContainer(){const un=document.createElement("div");return un.style.cssText=this._contentStyles,un.append(this._createSpan("For evaluation purposes only. Redistribution not authorized. Please "),this._createLink("purchase a license",this.getAttribute(st_buyNow)),this._createSpan(` to continue use of DevExpress product libraries (v${this.getAttribute(st_version)}).`)),un}_reassignComponent(){this.innerHTML="",this.style.cssText=this._containerStyles,this.append(this._createContentContainer(),this._createButton())}connectedCallback(){this._reassignComponent(),this._observer||(this._observer=new MutationObserver(()=>{var un;this._hidden?null===(un=this._observer)||void 0===un||un.disconnect():this._inReassign?this._inReassign=!1:(this._inReassign=!0,this._reassignComponent())}),this._observer.observe(this,{childList:!0,attributes:!0,subtree:!0}))}disconnectedCallback(){setTimeout(()=>{document.getElementsByTagName(ot_panel).length||document.body.prepend(this)},100)}}return Ot.customStyles=void 0,Ot})();class Xe extends Be{connectedCallback(){if(this.style.cssText=Re({display:"none"}),!document.getElementsByTagName(ot_panel).length){const un=document.createElement(ot_panel);un.setAttribute(st_version,this.getAttribute(st_version)),un.setAttribute(st_buyNow,this.getAttribute(st_buyNow)),un.setAttribute("data-permanent","true"),document.body.prepend(un)}}}var Tt,Ot;(Ot=Tt||(Tt={})).corrupted="corrupted",Ot.verified="verified",Ot.internal="internal";const qt=["customerId","maxVersionAllowed","format","internalUsageId"],En=3,Jn={kind:Tt.corrupted,error:"general"},wi={kind:Tt.corrupted,error:"verification"},Bn={kind:Tt.corrupted,error:"decoding"},gi={kind:Tt.corrupted,error:"deserialization"},Ai={kind:Tt.corrupted,error:"payload"},pt={kind:Tt.corrupted,error:"version"};let Dt=!1;function Et(Ot){return isNaN(Ot)||Ot<En}function hn(Ot){let{licenseKey:zt,version:un}=Ot,Pn=!1;try{Pn=Et(un.patch);const{major:ci,minor:Ei}=Pn?function z(Ot){let{major:zt,minor:un,patch:Pn}=Ot;return 1===un?{major:zt-1,minor:2,patch:Pn}:{major:zt,minor:un-1,patch:Pn}}(un):un;if(!zt)return{preview:Pn,error:"W0019"};const Hi=function dt(Ot){if(void 0===Ot)return Jn;const zt=Ot.split(".");if(2!==zt.length||0===zt[0].length||0===zt[1].length)return Jn;if(!function cn(Ot){let{text:zt,signature:un}=Ot;return function Te(Ot){try{const zt=BigInt(0),un=BigInt(1),Pn=BigInt(8),ci=(en,Zn,Di)=>{let po=un,nr=en,Xo=Zn;for(;Xo;)Xo&un&&(po=po*nr%Di),nr=nr*nr%Di,Xo>>=un;return po},Ei=en=>en.reduce((Zn,Di)=>(Zn<<Pn)+BigInt(Di),zt),Hi=Ei(Ot.actual);return ci(Ei(Ot.signature),BigInt(Ot.key.e),Ei(Ot.key.n))===Hi}catch{return!0}}({key:ye,signature:ae(un),actual:xe(Oe(zt))})}({text:zt[0],signature:zt[1]}))return wi;let un="";try{un=atob(zt[0])}catch{return Bn}let Pn={};try{Pn=JSON.parse(un)}catch{return gi}const{customerId:ci,maxVersionAllowed:Ei,format:Hi,internalUsageId:mo}=Pn,xo=(0,U.A)(Pn,qt);return void 0!==mo?{kind:Tt.internal,internalUsageId:mo}:void 0===ci||void 0===Ei||void 0===Hi?Ai:1!==Hi?pt:{kind:Tt.verified,payload:(0,k.A)({customerId:ci,maxVersionAllowed:Ei},xo)}}(zt);return Hi.kind===Tt.corrupted?{preview:Pn,error:"W0021"}:Hi.kind===Tt.internal?{preview:Pn,internal:!0,error:"ivFX-RTa20yT88msMzvP6g"===Hi.internalUsageId?void 0:"W0020"}:ci&&Ei?10*ci+Ei>Hi.payload.maxVersionAllowed?{preview:Pn,error:"W0020"}:{preview:Pn,error:void 0}:{preview:Pn,error:"W0021"}}catch{return{preview:Pn,error:"W0021"}}}function Ln(){return Dt}const Gt_validateLicense=function $n(Ot){if(Dt)return;Dt=!0;const un=Y(arguments.length>1&&void 0!==arguments[1]?arguments[1]:B.o),Pn=function oe(Ot){const zt=ie.filter(un=>!function pe(Ot,zt){return Ot.major===zt.major&&Ot.minor===zt.minor&&Ot.patch===zt.patch}(Y(un.version),Ot));return!zt.length||(P.A.log("W0023",function te(Ot){return Ot.map(zt=>`${zt.packageName}: ${zt.version}`).join("\n")}([{packageName:"devextreme",version:q(Ot)},...zt])),!1)}(un),{internal:ci,error:Ei}=hn({licenseKey:Ot,version:un});if(!Pn&&ci)return;Ei&&!ci&&function qe(Ot,zt,un){$e()&&function vt(Ot,zt,un){!function tt(Ot){customElements.get(ot_trigger)||(Fe.customStyles=Ot,customElements.define(ot_trigger,Xe),customElements.define(ot_panel,Fe))}(un);const Pn=document.createElement(ot_trigger);Pn.setAttribute(st_buyNow,Ot),Pn.setAttribute(st_version,zt),document.body.appendChild(Pn)}(Ot,zt,un)}((0,o.A)().buyNowLink??"https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeJQuery.aspx",B.o);const Hi=Et(un.patch);Ei?P.A.log(Hi?"W0022":Ei):Hi&&!ci&&P.A.log("W0022")},{abstract:on}=f.u,sn=f.u.inherit({_getDefaultOptions(){return(0,y.X)(this.callBase(),{width:void 0,height:void 0,rtlEnabled:(0,o.A)().rtlEnabled,elementAttr:{},disabled:!1,integrationOptions:{}},this._useTemplates()?x.createDefaultOptions():{})},ctor(Ot,zt){this._customClass=null,this._createElement(Ot),(0,w.UK)(this._$element,this,this._dispose),this.callBase(zt);const un=Ln();Gt_validateLicense((0,o.A)().licenseKey),!un&&Ln()&&(0,o.A)({licenseKey:""})},_createElement(Ot){this._$element=(0,W.A)(Ot)},_getSynchronizableOptionsForCreateComponent:()=>["rtlEnabled","disabled","templatesRenderAsynchronously"],_checkFunctionValueDeprecation:function(Ot){this.option("_ignoreFunctionValueDeprecation")||Ot.forEach(zt=>{(0,S.Tn)(this.option(zt))&&P.A.log("W0017",zt)})},_visibilityChanged:on,_dimensionChanged:on,_init(){this.callBase(),this._checkFunctionValueDeprecation(["width","height","maxHeight","maxWidth","minHeight","minWidth","popupHeight","popupWidth"]),this._attachWindowResizeCallback(),this._initTemplateManager()},_setOptionsByDevice(Ot){this.callBase([].concat(this.constructor._classCustomRules||[],Ot||[]))},_isInitialOptionValue(Ot){return!(this.constructor._classCustomRules&&Object.prototype.hasOwnProperty.call(this._convertRulesToOptions(this.constructor._classCustomRules),Ot))&&this.callBase(Ot)},_attachWindowResizeCallback(){if(this._isDimensionChangeSupported()){const Ot=this._windowResizeCallBack=this._dimensionChanged.bind(this);b.A.add(Ot)}},_isDimensionChangeSupported(){return this._dimensionChanged!==on},_renderComponent(){(0,D.m)(this.$element()),this._initMarkup(),(0,N.Vd)()&&this._render()},_initMarkup(){const{rtlEnabled:Ot}=this.option()||{};this._renderElementAttributes(),this._toggleRTLDirection(Ot),this._renderVisibilityChange(),this._renderDimensions()},_render(){this._attachVisibilityChangeHandlers()},_renderElementAttributes(){const{elementAttr:Ot}=this.option()||{},zt=(0,y.X)({},Ot),un=zt.class;delete zt.class,this.$element().attr(zt).removeClass(this._customClass).addClass(un),this._customClass=un},_renderVisibilityChange(){this._isDimensionChangeSupported()&&this._attachDimensionChangeHandlers(),this._isVisibilityChangeSupported()&&this.$element().addClass("dx-visibility-change-handler")},_renderDimensions(){const Ot=this.$element(),zt=Ot.get(0),un=this._getOptionValue("width",zt),Pn=this._getOptionValue("height",zt);this._isCssUpdateRequired(zt,Pn,un)&&Ot.css({width:null===un?"":un,height:null===Pn?"":Pn})},_isCssUpdateRequired:(Ot,zt,un)=>!!((0,S.O9)(un)||(0,S.O9)(zt)||Ot.style.width||Ot.style.height),_attachDimensionChangeHandlers(){const Ot=this.$element(),zt=`${this.NAME}VisibilityChange`;G.XR.off(Ot,{namespace:zt}),G.XR.on(Ot,()=>this._dimensionChanged(),{namespace:zt})},_attachVisibilityChangeHandlers(){if(this._isVisibilityChangeSupported()){const Ot=this.$element(),zt=`${this.NAME}VisibilityChange`;this._isHidden=!this._isVisible(),G.XD.off(Ot,{namespace:zt}),G.XD.on(Ot,()=>this._checkVisibilityChanged("shown"),()=>this._checkVisibilityChanged("hiding"),{namespace:zt})}},_isVisible(){return this.$element().is(":visible")},_checkVisibilityChanged(Ot){this._isVisible()&&("hiding"!==Ot||this._isHidden?"shown"===Ot&&this._isHidden&&(this._isHidden=!1,this._visibilityChanged(!0)):(this._visibilityChanged(!1),this._isHidden=!0))},_isVisibilityChangeSupported(){return this._visibilityChanged!==on&&(0,N.Vd)()},_clean:T.lQ,_modelByElement(){const{modelByElement:Ot}=this.option(),zt=this.$element();return Ot?Ot(zt):void 0},_invalidate(){if(this._isUpdateAllowed())throw P.A.Error("E0007");this._requireRefresh=!0},_refresh(){this._clean(),this._renderComponent()},_dispose(){this._templateManager&&this._templateManager.dispose(),this.callBase(),this._clean(),this._detachWindowResizeCallback()},_detachWindowResizeCallback(){this._isDimensionChangeSupported()&&b.A.remove(this._windowResizeCallBack)},_toggleRTLDirection(Ot){this.$element().toggleClass("dx-rtl",Ot)},_createComponent(Ot,zt){let un=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const Pn=(0,T.VM)(this._getSynchronizableOptionsForCreateComponent(),xo=>!(xo in un)),{integrationOptions:ci}=this.option();let{nestedComponentOptions:Ei}=this.option();Ei=Ei||T.lQ;const Hi=(0,y.X)({integrationOptions:ci},Ei(this));let mo;if(Pn.forEach(xo=>Hi[xo]=this.option(xo)),this._extendConfig(un,Hi),(0,S.Kg)(zt)?mo=(0,W.A)(Ot)[zt](un)[zt]("instance"):Ot&&(mo=zt.getInstance(Ot),mo?mo.option(un):mo=new zt(Ot,un)),mo){const xo=vr=>{let{name:rn,value:en}=vr;Pn.includes(rn)&&mo.option(rn,en)};this.on("optionChanged",xo),mo.on("disposing",()=>this.off("optionChanged",xo))}return mo},_extendConfig(Ot,zt){(0,I.__)(zt,(un,Pn)=>{!Object.prototype.hasOwnProperty.call(Ot,un)&&(Ot[un]=Pn)})},_defaultActionConfig(){const Ot=this.$element(),zt=this._modelByElement(Ot);return(0,y.X)(this.callBase(),{context:zt})},_defaultActionArgs(){const Ot=this.$element(),zt=this._modelByElement(Ot),un=this.element();return(0,y.X)(this.callBase(),{element:un,model:zt})},_optionChanged(Ot){switch(Ot.name){case"width":case"height":this._renderDimensions();break;case"rtlEnabled":this._invalidate();break;case"elementAttr":this._renderElementAttributes();break;case"disabled":case"integrationOptions":break;default:this.callBase(Ot)}},_removeAttributes(Ot){const zt=Ot.attributes;for(let un=zt.length-1;un>=0;un--){const Pn=zt[un];if(Pn){const{name:ci}=Pn;(!ci.indexOf("aria-")||-1!==ci.indexOf("dx-")||"role"===ci||"style"===ci||"tabindex"===ci)&&Ot.removeAttribute(ci)}}},_removeClasses(Ot){Ot.className=Ot.className.split(" ").filter(zt=>0!==zt.lastIndexOf("dx-",0)).join(" ")},_updateDOMComponent(Ot){Ot?this._renderComponent():this._requireRefresh&&(this._requireRefresh=!1,this._refresh())},endUpdate(){const Ot=this._isInitializingRequired();this.callBase(),this._isUpdateAllowed()&&this._updateDOMComponent(Ot)},$element(){return this._$element},element(){const Ot=this.$element();return(0,L.cc)(Ot)},dispose(){const Ot=this.$element().get(0);(0,C.Gf)(Ot,!0),Ot.textContent="",this._removeAttributes(Ot),this._removeClasses(Ot)},resetOption(Ot){if(this.callBase(Ot),"width"===Ot||"height"===Ot){const zt=this.initialOption(Ot);!(0,S.O9)(zt)&&this.$element().css(Ot,"")}},_getAnonymousTemplateName(){},_initTemplateManager(){if(this._templateManager||!this._useTemplates())return;const{integrationOptions:Ot={}}=this.option(),{createTemplate:zt}=Ot;this._templateManager=new x(zt,this._getAnonymousTemplateName()),this._initTemplates()},_initTemplates(){const{templates:Ot,anonymousTemplateMeta:zt}=this._templateManager.extractTemplates(this.$element()),un=this.option(`integrationOptions.templates.${zt.name}`);Ot.forEach(Pn=>{let{name:ci,template:Ei}=Pn;this._options.silent(`integrationOptions.templates.${ci}`,Ei)}),zt.name&&!un&&(this._options.silent(`integrationOptions.templates.${zt.name}`,zt.template),this._options.silent("_hasAnonymousTemplateContent",!0))},_getTemplateByOption(Ot){return this._getTemplate(this.option(Ot))},_getTemplate(Ot){const zt=this.option("integrationOptions.templates"),un=this.option("templatesRenderAsynchronously"),Pn=this.option("integrationOptions.skipTemplates");return this._templateManager.getTemplate(Ot,zt,{isAsyncTemplate:un,skipTemplates:Pn},this)},_saveTemplate(Ot,zt){this._setOptionWithoutOptionChange("integrationOptions.templates."+Ot,this._templateManager._createTemplate(zt))},_useTemplates:()=>!0});sn.getInstance=function(Ot){return(0,w.pV)((0,W.A)(Ot),this)},sn.defaultOptions=function(Ot){this._classCustomRules=this._classCustomRules||[],this._classCustomRules.push(Ot)};const It=sn},9522:(In,Ze,M)=>{"use strict";M.d(Ze,{cc:()=>P});let o=function W(f){return f&&f.get?f.get(0):f};function P(f){return o(f)}},5397:(In,Ze,M)=>{"use strict";M.d(Ze,{Gf:()=>_,jf:()=>g,p:()=>s,z:()=>a});var W=M(6054),o=M(4072),P=M(8167);const b=new WeakMap;let f;const S=new P.A;let T=function(){};function s(){return f.data.apply(this,arguments)}function a(x){T=x}function g(x,w){return f.removeData.call(this,x,w)}function _(x,w){if(!W.A.isElementNode(x))return;const D=x.getElementsByTagName("*");f.cleanData(D),w&&f.cleanData([x])}!function(x){S.fire(x),f=x;const w=f.cleanData;f.cleanData=function(D){T(D);return w.call(this,D)}}({data:function(){const x=arguments[0],w=arguments[1],D=arguments[2];if(!x)return;let C=b.get(x);return C||(C={},b.set(x,C)),void 0===w?C:2===arguments.length?C[w]:(C[w]=D,D)},removeData:function(x,w){if(x)if(void 0===w)b.delete(x);else{const D=b.get(x);D&&delete D[w]}},cleanData:function(x){for(let w=0;w<x.length;w++)o.A.off(x[w]),b.delete(x[w])}})},7251:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=(0,M(7754).A)({E0001:"Method is not implemented",E0002:"Member name collision: {0}",E0003:"A class must be instantiated using the 'new' keyword",E0004:"The NAME property of the component is not specified",E0005:"Unknown device",E0006:"Unknown endpoint key is requested",E0007:"'Invalidate' method is called outside the update transaction",E0008:"Type of the option name is not appropriate to create an action",E0009:"Component '{0}' has not been initialized for an element",E0010:"Animation configuration with the '{0}' type requires '{1}' configuration as {2}",E0011:"Unknown animation type '{0}'",E0012:"jQuery version is too old. Please upgrade jQuery to 1.10.0 or later",E0013:"KnockoutJS version is too old. Please upgrade KnockoutJS to 2.3.0 or later",E0014:"The 'release' method shouldn't be called for an unlocked Lock object",E0015:"Queued task returned an unexpected result",E0017:"Event namespace is not defined",E0018:"DevExpress.ui.DevExpressPopup widget is required",E0020:"Template engine '{0}' is not supported",E0021:"Unknown theme is set: {0}",E0022:"LINK[rel=DevExpress-theme] tags must go before DevExpress included scripts",E0023:"Template name is not specified",E0024:"DevExtreme bundle already included",E0025:"Unexpected argument type",E0100:"Unknown validation type is detected",E0101:"Misconfigured range validation rule is detected",E0102:"Misconfigured comparison validation rule is detected",E0103:"validationCallback of an asynchronous rule should return a jQuery or a native promise",E0110:"Unknown validation group is detected",E0120:"Adapter for a DevExpressValidator component cannot be configured",E0121:"The 'customItem' parameter of the 'onCustomItemCreating' function is empty or contains invalid data. Assign a custom object or a Promise that is resolved after the item is created.",W0000:"'{0}' is deprecated in {1}. {2}",W0001:"{0} - '{1}' option is deprecated in {2}. {3}",W0002:"{0} - '{1}' method is deprecated in {2}. {3}",W0003:"{0} - '{1}' property is deprecated in {2}. {3}",W0004:"Timeout for theme loading is over: {0}",W0005:"'{0}' event is deprecated in {1}. {2}",W0006:"Invalid recurrence rule: '{0}'",W0007:"'{0}' Globalize culture is not defined",W0008:"Invalid view name: '{0}'",W0009:"Invalid time zone name: '{0}'",W0010:"{0} is deprecated in {1}. {2}",W0011:"Number parsing is invoked while the parser is not defined",W0012:"Date parsing is invoked while the parser is not defined",W0013:"'{0}' file is deprecated in {1}. {2}",W0014:"{0} - '{1}' type is deprecated in {2}. {3}",W0015:"Instead of returning a value from the '{0}' function, write it into the '{1}' field of the function's parameter.",W0016:'The "{0}" option does not accept the "{1}" value since v{2}. {3}.',W0017:'Setting the "{0}" property with a function is deprecated since v21.2',W0018:'Setting the "position" property with a function is deprecated since v21.2',W0019:"DevExtreme: Unable to Locate a Valid License Key.\n\nIf you are using a 30-day trial version of DevExtreme, you must uninstall all copies of DevExtreme once your 30-day trial period expires. For terms and conditions that govern use of DevExtreme UI components/libraries, please refer to the DevExtreme End User License Agreement: https://js.devexpress.com/EULAs/DevExtremeComplete.\n\nTo use DevExtreme in a commercial project, you must purchase a license. For pricing/licensing options, please visit: https://js.devexpress.com/Buy.\n\nIf you have licensing-related questions or need help with a purchase, please email clientservices@devexpress.com.\n\n",W0020:"DevExtreme: License Key Has Expired.\n\nA mismatch exists between the license key used and the DevExtreme version referenced in this project.\n\nTo proceed, you can:\n\u2022 use a version of DevExtreme linked to your license key: https://www.devexpress.com/ClientCenter/DownloadManager\n\u2022 renew your DevExpress Subscription: https://www.devexpress.com/buy/renew (once you renew your subscription, you will be entitled to product updates and support service as defined in the DevExtreme End User License Agreement)\n\nIf you have licensing-related questions or need help with a renewal, please email clientservices@devexpress.com.\n\n",W0021:"DevExtreme: License Key Verification Has Failed.\n\nTo verify your DevExtreme license, make certain to specify a correct key in the GlobalConfig. If you continue to encounter this error, please visit https://www.devexpress.com/ClientCenter/DownloadManager to obtain a valid license key.\n\nIf you have a valid license and this problem persists, please submit a support ticket via the DevExpress Support Center. We will be happy to follow-up: https://supportcenter.devexpress.com/ticket/create.\n\n",W0022:"DevExtreme: Pre-release software. Not suitable for commercial use.\n\nPre-release software may contain deficiencies and as such, should not be considered for use or integrated in any mission critical application.\n\n",W0023:"DevExtreme: the following 'devextreme' package version does not match versions of other DevExpress products used in this application:\n\n{0}\n\nInteroperability between different versions of the products listed herein cannot be guaranteed.\n\n"})},6101:(In,Ze,M)=>{"use strict";M.d(Ze,{h:()=>b});var W=M(8684),o=M(2660),P=M(1830);class b{constructor(S){let T=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._events={},this._owner=S,this._options=T}static create(S,T){return T?(0,P.Tn)(T)?T(S):T:new b(S)}hasEvent(S){const T=this._events[S];return!!T&&T.has()}fireEvent(S,T){const y=this._events[S];return y&&y.fireWith(this._owner,T),this._owner}on(S,T){if((0,P.Qd)(S))(0,o.__)(S,(y,d)=>{this.on(y,d)});else{let y=this._events[S];y||(y=(0,W.A)({syncStrategy:this._options.syncStrategy}),this._events[S]=y),(y.originalAdd||y.add).call(y,T)}}off(S,T){const y=this._events[S];y&&((0,P.Tn)(T)?y.remove(T):y.empty())}dispose(){(0,o.__)(this._events,(S,T)=>{T.empty()})}}},2925:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});const P=M(3538).A.inherit({ctor:function(b){b&&(b=String(b)),this._value=this._normalize(b||this._generate())},_normalize:function(b){for(b=b.replace(/[^a-f0-9]/gi,"").toLowerCase();b.length<32;)b+="0";return[b.substr(0,8),b.substr(8,4),b.substr(12,4),b.substr(16,4),b.substr(20,12)].join("-")},_generate:function(){let b="";for(let f=0;f<32;f++)b+=Math.round(15*Math.random()).toString(16);return b},toString:function(){return this._value},valueOf:function(){return this._value},toJSON:function(){return this._value}})},5690:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>f});var W=M(6110),o=M(1926);const P=(0,W.zk)(),f=(0,o.A)({getXhr:function(){return new P.XMLHttpRequest}})},4267:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(5328),o=M(5652),P=M(9446),b=M(6054),f=M(5397),S=M(1926);const T=d=>{const{parentNode:c}=d;if(c){const s=d.nextSibling;(0,f.Gf)(d),c.$V=d.$V,(0,W.XX)(null,c),c.insertBefore(d,s),d.innerHTML="",delete c.$V}delete d.$V},y=(0,S.A)({createElement:(d,c)=>(0,P.n)(d,c),remove:T,onAfterRender:()=>{o.R3.callEffects()},onPreRender:()=>{o.R3.lock()},render:(d,c,s,a)=>{if(a)(0,W.XX)((0,P.n)(d,c),s);else{const{parentNode:u}=s,h=s?.nextSibling,g=b.A.createElement("div");g.appendChild(s);const _=b.A.createDocumentFragment().appendChild(g);!!s.$V&&T(s),(0,o.Qv)((0,P.n)(d,c),_),s.$V=_.$V,u&&u.insertBefore(s,h)}}})},8167:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});var W=M(2660),o=M(8684);class P{constructor(){this.memory=[],this.callbacks=(0,o.A)()}add(f){(0,W.__)(this.memory,(S,T)=>f.apply(f,T)),this.callbacks.add(f)}remove(f){this.callbacks.remove(f)}fire(){for(var f=arguments.length,S=new Array(f),T=0;T<f;T++)S[T]=arguments[T];this.memory.push(S),this.callbacks.fire.apply(this.callbacks,S)}}},5170:(In,Ze,M)=>{"use strict";M.d(Ze,{E1:()=>s,MO:()=>c,Ov:()=>a,a5:()=>y,a6:()=>T,gO:()=>u});var W=M(5973),o=M(1830),P=M(4859),b=M(3090),f=M(4270);const S={},T=h=>{const g=W.A.current();return h.reduce((_,x)=>{let{device:w,options:D}=x;const C=w||{};return((0,o.Tn)(C)?C(g):d(g,C))&&(0,b.X)(!0,_,D),_},{})},y=(h,g)=>"string"!=typeof h?h:{[h]:g},d=(h,g)=>(0,o.RI)(g)||(0,P.hm)(h,[g]).length>0,c=h=>h.substr(h.lastIndexOf(".")+1),s=h=>h.substr(0,h.lastIndexOf(".")),a=function(h,g){return S[g]=S[g]||(0,f.Hz)(g),S[g](h,{functionsAsIs:!0})},u=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]}},5704:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(5397),o=M(6054),P=M(6110),b=M(1830),f=M(8649),S=M(1363),T=M(4781);const y=(0,P.zk)();let d;const c=function(C,I){return C?"string"==typeof C?"body"===C?(this[0]=I?I.body:o.A.getBody(),this.length=1,this):(I=I||o.A.getDocument(),"<"===C[0]?(this[0]=o.A.createElement(C.slice(1,-1),I),this.length=1,this):([].push.apply(this,o.A.querySelectorAll(I,C)),this)):o.A.isNode(C)||(0,b.l6)(C)?(this[0]=C,this.length=1,this):Array.isArray(C)?([].push.apply(this,C),this):d(C.toArray?C.toArray():[C]):(this.length=0,this)};d=function(C,I){return new c(C,I)},d.fn={dxRenderer:!0};const s=function(C,I){for(let L=0;L<this.length;L++){const N=d(this[L]);N[C].apply(N,I)}return this},a=function(C,I,L){null!=L&&!1!==L?o.A.setAttribute(C,I,L):o.A.removeAttribute(C,I)};(c.prototype=d.fn).show=function(){return this.toggle(!0)},c.prototype.hide=function(){return this.toggle(!1)},c.prototype.toggle=function(C){return this[0]&&this.toggleClass("dx-state-invisible",!C),this},c.prototype.attr=function(C,I){if(this.length>1&&arguments.length>1)return s.call(this,"attr",arguments);if(!this[0])return(0,b.Gv)(C)||void 0!==I?this:void 0;if(!this[0].getAttribute)return this.prop(C,I);if("string"==typeof C&&1===arguments.length)return this[0].getAttribute(C)??void 0;if((0,b.Qd)(C))for(const L in C)this.attr(L,C[L]);else a(this[0],C,I);return this},c.prototype.removeAttr=function(C){return this[0]&&o.A.removeAttribute(this[0],C),this},c.prototype.prop=function(C,I){if(!this[0])return this;if("string"==typeof C&&1===arguments.length)return this[0][C];if((0,b.Qd)(C))for(const L in C)this.prop(L,C[L]);else o.A.setProperty(this[0],C,I);return this},c.prototype.addClass=function(C){return this.toggleClass(C,!0)},c.prototype.removeClass=function(C){return this.toggleClass(C,!1)},c.prototype.hasClass=function(C){if(!this[0]||void 0===this[0].className)return!1;const I=C.split(" ");for(let L=0;L<I.length;L++)if(this[0].classList){if(this[0].classList.contains(I[L]))return!0}else if((((0,b.Kg)(this[0].className)?this[0].className:o.A.getAttribute(this[0],"class"))||"").split(" ").indexOf(I[L])>=0)return!0;return!1},c.prototype.toggleClass=function(C,I){if(this.length>1)return s.call(this,"toggleClass",arguments);if(!this[0]||!C)return this;I=void 0===I?!this.hasClass(C):I;const L=C.split(" ");for(let N=0;N<L.length;N++)o.A.setClass(this[0],L[N],I);return this},c.prototype.html=function(C){return arguments.length?(this.empty(),"string"==typeof C&&!(0,T.a)(C)||"number"==typeof C?(this[0].innerHTML=C,this):this.append((0,T.B)(C))):this[0].innerHTML};const u=function(C,I){if(this[0]&&C){"string"==typeof C?C=(0,T.B)(C):C.nodeType?C=[C]:(0,b.kf)(C)&&(C=[o.A.createTextNode(C)]);for(let L=0;L<C.length;L++){const N=C[L];let G=this[0];"TABLE"===G.tagName&&"TR"===N.tagName&&G.tBodies&&G.tBodies.length&&(G=G.tBodies[0]),o.A.insertElement(G,N.nodeType?N:N[0],I)}}},h=function(C,I){if(this[0]&&this[0].style&&!(null===I||"number"==typeof I&&isNaN(I))){C=(0,f.jA)(C);for(let L=0;L<this.length;L++)this[L].style[C]=(0,f.CC)(C,I)}};c.prototype.css=function(C,I){if((0,b.Kg)(C)){if(2!==arguments.length){if(!this[0])return;C=(0,f.jA)(C);const L=y.getComputedStyle(this[0])[C]||this[0].style[C];return(0,b.kf)(L)?L.toString():L}h.call(this,C,I)}else if((0,b.Qd)(C))for(const L in C)h.call(this,L,C[L]);return this},c.prototype.prepend=function(C){if(arguments.length>1){for(let I=0;I<arguments.length;I++)this.prepend(arguments[I]);return this}return u.apply(this,[C,this[0].firstChild]),this},c.prototype.append=function(C){if(arguments.length>1){for(let I=0;I<arguments.length;I++)this.append(arguments[I]);return this}return u.apply(this,[C]),this},c.prototype.prependTo=function(C){if(this.length>1){for(let I=this.length-1;I>=0;I--)d(this[I]).prependTo(C);return this}return(C=d(C))[0]&&o.A.insertElement(C[0],this[0],C[0].firstChild),this},c.prototype.appendTo=function(C){return this.length>1?s.call(this,"appendTo",arguments):(o.A.insertElement(d(C)[0],this[0]),this)},c.prototype.insertBefore=function(C){return C&&C[0]&&o.A.insertElement(C[0].parentNode,this[0],C[0]),this},c.prototype.insertAfter=function(C){return C&&C[0]&&o.A.insertElement(C[0].parentNode,this[0],C[0].nextSibling),this},c.prototype.before=function(C){return this[0]&&o.A.insertElement(this[0].parentNode,C[0],this[0]),this},c.prototype.after=function(C){return this[0]&&o.A.insertElement(this[0].parentNode,C[0],this[0].nextSibling),this},c.prototype.wrap=function(C){if(this[0]){const I=d(C);I.insertBefore(this),I.append(this)}return this},c.prototype.wrapInner=function(C){const I=this.contents();return I.length?I.wrap(C):this.append(C),this},c.prototype.replaceWith=function(C){if(C&&C[0])return C.is(this)?this:(C.insertBefore(this),this.remove(),C)},c.prototype.remove=function(){return this.length>1?s.call(this,"remove",arguments):((0,W.Gf)(this[0],!0),o.A.removeElement(this[0]),this)},c.prototype.detach=function(){return this.length>1?s.call(this,"detach",arguments):(o.A.removeElement(this[0]),this)},c.prototype.empty=function(){return this.length>1?s.call(this,"empty",arguments):((0,W.Gf)(this[0]),o.A.setText(this[0],""),this)},c.prototype.clone=function(){const C=[];for(let I=0;I<this.length;I++)C.push(this[I].cloneNode(!0));return d(C)},c.prototype.text=function(C){if(!arguments.length){let L="";for(let N=0;N<this.length;N++)L+=this[N]&&this[N].textContent||"";return L}const I=(0,b.Tn)(C)?C():C;return(0,W.Gf)(this[0],!1),o.A.setText(this[0],(0,b.O9)(I)?I:""),this},c.prototype.val=function(C){return 1===arguments.length?this.prop("value",(0,b.O9)(C)?C:""):this.prop("value")},c.prototype.contents=function(){if(!this[0])return d();const C=[];return C.push.apply(C,this[0].childNodes),d(C)},c.prototype.find=function(C){const I=d();if(!C)return I;const L=[];let N;if("string"==typeof C)for(C=C.trim(),N=0;N<this.length;N++){const G=this[N];if(o.A.isElementNode(G)){const k=G.getAttribute("id");let U=k||"dx-query-children";k||a(G,"id",U),U="[id='"+U+"'] ";const B=U+C.replace(/([^\\])(,)/g,"$1, "+U);L.push.apply(L,o.A.querySelectorAll(G,B)),a(G,"id",k)}else(o.A.isDocument(G)||o.A.isDocumentFragment(G))&&L.push.apply(L,o.A.querySelectorAll(G,C))}else for(N=0;N<this.length;N++)C=o.A.isNode(C)?C:C[0],this[N]!==C&&this[N].contains(C)&&L.push(C);return I.add(L)};const g=function(C,I){return!(I=I.host??I).nodeType||!!(I.offsetWidth||I.offsetHeight||I.getClientRects().length)};c.prototype.filter=function(C){if(!C)return d();if(":visible"===C)return this.filter(g);if(":hidden"===C)return this.filter(function(L,N){return!g(0,N)});const I=[];for(let L=0;L<this.length;L++){const N=this[L];if(o.A.isElementNode(N)&&"string"===(0,b.NW)(C))o.A.elementMatches(N,C)&&I.push(N);else if(o.A.isNode(C)||(0,b.l6)(C))C===N&&I.push(N);else if((0,b.Tn)(C))C.call(N,L,N)&&I.push(N);else for(let G=0;G<C.length;G++)C[G]===N&&I.push(N)}return d(I)},c.prototype.not=function(C){const I=[],L=this.filter(C).toArray();for(let N=0;N<this.length;N++)-1===L.indexOf(this[N])&&I.push(this[N]);return d(I)},c.prototype.is=function(C){return!!this.filter(C).length},c.prototype.children=function(C){let I=[];for(let L=0;L<this.length;L++){const N=this[L]?this[L].childNodes:[];for(let G=0;G<N.length;G++)o.A.isElementNode(N[G])&&I.push(N[G])}return I=d(I),C?I.filter(C):I},c.prototype.siblings=function(){const C=this[0];if(!C||!C.parentNode)return d();const I=[],L=C.parentNode.childNodes||[];for(let N=0;N<L.length;N++){const G=L[N];o.A.isElementNode(G)&&G!==C&&I.push(G)}return d(I)},c.prototype.each=function(C){for(let I=0;I<this.length&&!1!==C.call(this[I],I,this[I]);I++);},c.prototype.index=function(C){return C?(C=d(C),this.toArray().indexOf(C[0])):this.parent().children().index(this)},c.prototype.get=function(C){return this[C<0?this.length+C:C]},c.prototype.eq=function(C){return d(this[C=C<0?this.length+C:C])},c.prototype.first=function(){return this.eq(0)},c.prototype.last=function(){return this.eq(-1)},c.prototype.select=function(){for(let C=0;C<this.length;C+=1)this[C].select&&this[C].select();return this},c.prototype.parent=function(C){if(!this[0])return d();const I=d(this[0].parentNode);return!C||I.is(C)?I:d()},c.prototype.parents=function(C){const I=[];let L=this.parent();for(;L&&L[0]&&!o.A.isDocument(L[0]);)o.A.isElementNode(L[0])&&(!C||L.is(C))&&I.push(L.get(0)),L=L.parent();return d(I)},c.prototype.closest=function(C){if(this.is(C))return this;let I=this.parent();for(;I&&I.length;){if(I.is(C))return I;I=I.parent()}return d()},c.prototype.next=function(C){if(!this[0])return d();let I=d(this[0].nextSibling);if(!arguments.length)return I;for(;I&&I.length;){if(I.is(C))return I;I=I.next()}return d()},c.prototype.prev=function(){return this[0]?d(this[0].previousSibling):d()},c.prototype.add=function(C){const I=d(C),L=this.toArray();for(let N=0;N<I.length;N++){const G=I[N];-1===L.indexOf(G)&&L.push(G)}return d(L)};const _=[];c.prototype.splice=function(){return d(_.splice.apply(this,arguments))},c.prototype.slice=function(){return d(_.slice.apply(this,arguments))},c.prototype.toArray=function(){return _.slice.call(this)},c.prototype.offset=function(){if(this[0])return(0,S.A3)(this[0])},c.prototype.offsetParent=function(){if(!this[0])return d();let C=d(this[0].offsetParent);for(;C[0]&&"static"===C.css("position");)C=d(C[0].offsetParent);return C=C[0]?C:d(o.A.getDocumentElement()),C},c.prototype.position=function(){if(!this[0])return;let C;const I=parseFloat(this.css("marginTop")),L=parseFloat(this.css("marginLeft"));if("fixed"===this.css("position"))return C=this[0].getBoundingClientRect(),{top:C.top-I,left:C.left-L};C=this.offset();const N=this.offsetParent();let G={top:0,left:0};return"HTML"!==N[0].nodeName&&(G=N.offset()),G={top:G.top+parseFloat(N.css("borderTopWidth")),left:G.left+parseFloat(N.css("borderLeftWidth"))},{top:C.top-G.top-I,left:C.left-G.left-L}},[{name:"scrollLeft",offsetProp:"pageXOffset",scrollWindow:function(C,I){C.scrollTo(I,C.pageYOffset)}},{name:"scrollTop",offsetProp:"pageYOffset",scrollWindow:function(C,I){C.scrollTo(C.pageXOffset,I)}}].forEach(function(C){const I=C.name;c.prototype[I]=function(L){if(!this[0])return;const N=(0,S.OP)(this[0]);return void 0===L?N?N[C.offsetProp]:this[0][I]:(N?C.scrollWindow(N,L):this[0][I]=L,this)}}),c.prototype.data=function(C,I){if(this[0])return arguments.length<2?W.p.call(d,this[0],C):(W.p.call(d,this[0],C,I),this)},c.prototype.removeData=function(C){return this[0]&&(0,W.jf)(this[0],C),this};const x=function(){return d.apply(this,arguments)};Object.defineProperty(x,"fn",{enumerable:!0,configurable:!0,get:function(){return d.fn},set:function(C){d.fn=C}});const D=x},2013:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(4859),o=M(6110);const P=(0,o.zk)(),b={observe:W.lQ,unobserve:W.lQ,disconnect:W.lQ},T=new class f{constructor(){if(!(0,o.Vd)()||!P.ResizeObserver)return b;this._callbacksMap=new Map,this._observer=new P.ResizeObserver(d=>{d.forEach(c=>{var s;null===(s=this._callbacksMap.get(c.target))||void 0===s||s(c)})})}observe(d,c){this._callbacksMap.set(d,c),this._observer.observe(d)}unobserve(d){this._callbacksMap.delete(d),this._observer.unobserve(d)}disconnect(){this._callbacksMap.clear(),this._observer.disconnect()}}},5944:(In,Ze,M)=>{"use strict";M.d(Ze,{U:()=>T});var W=M(5704),o=M(6776),P=M(4072),b=M(1110),f=M(1830);class T extends o.o{constructor(d,c,s,a){super(),this._render=d,this._fields=c,this._fieldsMap=a||{},this._watchMethod=s}_renderCore(d){const c=(0,W.A)(d.container),s=function(y,d,c,s,a){let u;const h=(g=y,d(()=>g,function(g){u&&u(),(0,f.sO)(g)?a(g):u=function(_,x,w,D,C){const I={},L=w.slice(),N=w.map(function(G){const k=D[G];return x(k?()=>k(_):()=>_[G],function(U){if(I[G]=U,L.length){const B=L.indexOf(G);B>=0&&L.splice(B,1)}L.length||C(I)})});return function(){N.forEach(G=>G())}}(g,d,c,s,a)}));var g;return function(){u&&u(),h&&h()}}(d.model,this._watchMethod,this._fields,this._fieldsMap,a=>{c.empty(),this._render(c,a,d.model)});return P.A.on(c,b.N,s),c.contents()}}},7591:(In,Ze,M)=>{"use strict";M.d(Ze,{M:()=>o});var W=M(6776);class o extends W.o{constructor(b){super(),this.name=b}}},8412:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});var W=M(5704),o=M(6776);class P extends o.o{_renderCore(){return(0,W.A)()}}},5645:(In,Ze,M)=>{"use strict";M.d(Ze,{l:()=>P});var W=M(6776),o=M(1832);class P extends W.o{constructor(f){super(),this._render=f}_renderCore(f){return(0,o.ki)(this._render(f))}}},6776:(In,Ze,M)=>{"use strict";M.d(Ze,{o:()=>y});var W=M(5704),o=M(6054),P=M(8684),b=M(1832),f=M(9229),S=M(7251);const T=(0,P.A)({syncStrategy:!0});class y{render(c){const s=(c=c||{}).onRendered;let a;return delete c.onRendered,a=c.renovated&&c.transclude&&this._element?(0,W.A)("<div>").append(this._element).contents():this._renderCore(c),this._ensureResultInContainer(a,c.container),T.fire(a,c.container),s&&s(),a}_ensureResultInContainer(c,s){if(!s)return;const a=(0,W.A)(s),u=(0,b.gR)(a.get(0),c.get(0));a.append(c),!u&&(0,b.gR)(o.A.getBody(),a.get(0))&&(0,f.I9)(c)}_renderCore(){throw S.A.Error("E0001")}}},1113:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Z});var W=M(6021),o=M(5690),P=M(6110),b=M(1830),f=M(1926),S=M(3090),T=M(6054);const y=(0,P.zk)(),d=function(Q){const te=T.A.createElement("script");for(const pe in Q)te[pe]=Q[pe];return te},c=function(Q){return T.A.getHead().appendChild(Q)},s=function(Q){Q.parentNode.removeChild(Q)},a=function(Q){const te=d({text:Q});c(te),s(te)};function h(Q){return(Q.method||"GET").toUpperCase()}const L=(0,P.zk)(),N="success",G="error",Z=(0,f.A)({sendRequest:function(Q){const te=o.A.getXhr(),pe=new W.cY,z=pe.promise(),oe=!(0,b.O9)(Q.async)||Q.async,ae=Q.dataType,ee=Q.timeout||0;let he;Q.crossDomain=function(Q){if(!(0,P.Vd)())return!0;let te=!1;const pe=T.A.createElement("a"),z=T.A.createElement("a");pe.href=y.location.href;try{z.href=Q,z.href=z.href,te=pe.protocol+"//"+pe.host!=z.protocol+"//"+z.host}catch{te=!0}return te}(Q.url);const de="jsonp"===ae||"script"===ae;void 0===Q.cache&&(Q.cache=!de);const ue=function(Q){if("jsonp"===Q.dataType){const te=Math.random().toString().replace(/\D/g,""),pe=Q.jsonpCallback||"dxCallback"+Date.now()+"_"+te,z=Q.jsonp||"callback";return Q.data=Q.data||{},Q.data[z]=pe,pe}}(Q),be=function(Q){const te=Q.headers||{};return te["Content-Type"]=te["Content-Type"]||function(Q){let te;return Q.data&&!Q.upload&&"GET"!==h(Q)&&(te="application/x-www-form-urlencoded;charset=utf-8"),Q.contentType||te}(Q),te.Accept=te.Accept||function(Q){const te=Q.dataType||"*",pe="text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",z={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",jsonp:pe,script:pe};return(0,S.a)(z,Q.accepts,!0),z[te]?z[te]+("*"!==te?", */*; q=0.01":""):z["*"]}(Q),!Q.crossDomain&&!te["X-Requested-With"]&&(te["X-Requested-With"]="XMLHttpRequest"),te}(Q),ve=function(Q,te){let pe=Q.data;const z="string"==typeof pe;let oe=Q.url||y.location.href;return!z&&!Q.cache&&(pe=pe||{},pe._=Date.now()),pe&&!Q.upload&&(z||(pe=function(Q){const te=[];for(const pe in Q){let z=Q[pe];void 0!==z&&(null===z&&(z=""),"function"==typeof z&&(z=z()),te.push(encodeURIComponent(pe)+"="+encodeURIComponent(z)))}return te.join("&")}(pe)),"GET"===h(Q)?(""!==pe&&(oe+=(oe.indexOf("?")>-1?"&":"?")+pe),pe=null):te["Content-Type"]&&te["Content-Type"].indexOf("application/x-www-form-urlencoded")>-1&&(pe=pe.replace(/%20/g,"+"))),{url:oe,parameters:pe}}(Q,be),le=ve.url,Ce=ve.parameters;if(ue&&(L[ue]=function(ye){pe.resolve(ye,N,te)}),Q.crossDomain&&de){const ye=function(){pe.reject(te,G)},ge=function(){"jsonp"!==ae&&pe.resolve(null,N,te)};return function(Q){const te=d({src:Q});return new Promise(function(pe,z){const oe={load:pe,error:z},ae=function(ee){oe[ee.type](),s(te)};for(const ee in oe)T.A.listen(te,ee,ae);c(te)})}(le).then(ge,ye),z}if(Q.crossDomain&&!("withCredentials"in te))return pe.reject(te,G),z;if(te.open(h(Q),le,oe,Q.username,Q.password),oe&&(te.timeout=ee,he=function(Q,te){return Q&&setTimeout(function(){te.customStatus="timeout",te.abort()},Q)}(ee,te)),te.onreadystatechange=function(ye){4===te.readyState&&(clearTimeout(he),function(Q){return 200<=Q&&Q<300}(te.status)?function(Q){return 204!==Q}(te.status)?function(Q,te,pe){const z=function(Q){return Q.responseType&&"text"!==Q.responseType||"string"!=typeof Q.responseText?Q.response:Q.responseText}(te);switch(pe){case"jsonp":a(z);break;case"script":a(z),Q.resolve(z,N,te);break;case"json":try{Q.resolve(JSON.parse(z),N,te)}catch(oe){Q.reject(te,"parsererror",oe)}break;default:Q.resolve(z,N,te)}}(pe,te,ae):pe.resolve(null,"nocontent",te):pe.reject(te,te.customStatus||G))},Q.upload&&(te.upload.onprogress=Q.upload.onprogress,te.upload.onloadstart=Q.upload.onloadstart,te.upload.onabort=Q.upload.onabort),Q.xhrFields)for(const ye in Q.xhrFields)te[ye]=Q.xhrFields[ye];"arraybuffer"===Q.responseType&&(te.responseType=Q.responseType);for(const ye in be)Object.prototype.hasOwnProperty.call(be,ye)&&(0,b.O9)(be[ye])&&te.setRequestHeader(ye,be[ye]);return Q.beforeSend&&Q.beforeSend(te),te.send(Ce),z.abort=function(){te.abort()},z}})},5345:(In,Ze,M)=>{"use strict";M.d(Ze,{$z:()=>c,BO:()=>f,Gn:()=>S,Il:()=>d,R3:()=>y,_N:()=>T});var W=M(1830),o=M(6509),P=M(3686);function b(s){return s.reduce((a,u)=>{const h=(a.get(u)??0)+1;return a.set(u,h),a},new Map)}const f=function(s){return Array.isArray(s)?s:[s]},S=function(s){return[...new Set(s)]},T=function(s,a){const u=b(a);return s.filter(h=>{const g=u.get(h);return g&&u.set(h,g-1),g})},y=function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const u=b(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]);return s.filter(h=>{const g=u.get(h);return g&&u.set(h,g-1),!g})},d=function(s,a,u,h){const g={},{useLegacyVisibleIndex:_}=(0,P.A)();let x=0;const w=D=>!(0,W.O9)(D[a])&&(!h||h(D));s.forEach(D=>{const C=D[a];C>=0?(g[C]=g[C]||[],D===u?g[C].unshift(D):g[C].push(D)):D[a]=void 0}),_||s.forEach(D=>{if(w(D)){for(;g[x];)x++;g[x]=[D],x++}}),x=0,(0,o.ap)(g,function(D,C){C.forEach(I=>{D>=0&&(I[a]=x++)})}),_&&s.forEach(D=>{w(D)&&(D[a]=x++)})},c=(s,a)=>s.reduce((u,h)=>{const g=a(h);return u[g]=u[g]??[],u[g].push(h),u},{})},9965:(In,Ze,M)=>{"use strict";M.d(Ze,{V:()=>b,p:()=>f});var W=M(1830);const o=function(S,T){const y=T(S);if((0,W.Gv)(y))try{return JSON.stringify(y)}catch{return y}return y},P=function(S,T,y,d){return T[y[o(S,d)]]},b=function(S,T){if(S.length!==T.length)return!1;for(let y=0;y<T.length;y++)if(S[y]!==T[y])return!1;return!0},f=function(S,T,y,d){const c={},s={};let a=0,u=0;const h=[];S.forEach(function(_,x){const w=o(_,y);c[w]=x}),T.forEach(function(_,x){const w=o(_,y);s[w]=x});const g=Math.max(S.length,T.length);for(let _=0;_<g+a;_++){const x=T[_],w=_-a+u,D=S[w];if(!x||D&&!P(D,T,s,y))D&&(h.push({type:"remove",key:y(D),index:_,oldItem:D}),u++,_--);else{const I=o(x,y),L=c[I],N=S[L];if(N){if(L!==w)return;d(N,x)||h.push({type:"update",data:x,key:y(x),index:_,oldItem:N})}else a++,h.push({type:"insert",data:x,index:_})}}return h}},36:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(3090);const P=(0,M(6110).w3)(),b=/(webkit)[ /]([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))/,S=y=>{y=y.toLowerCase();const d={},c=b.exec(y)||y.indexOf("compatible")<0&&f.exec(y)||[];let s=c[1],a=c[2];return"webkit"===s&&(d.webkit=!0,y.indexOf("chrome")>=0||y.indexOf("crios")>=0?(s="chrome",a=/(?:chrome|crios)\/(\d+\.\d+)/.exec(y),a=a&&a[1]):y.indexOf("fxios")>=0?(s="mozilla",a=/fxios\/(\d+\.\d+)/.exec(y),a=a&&a[1]):y.indexOf("safari")>=0&&/version|phantomjs/.test(y)?(s="safari",a=/(?:version|phantomjs)\/([0-9.]+)/.exec(y),a=a&&a[1]):(s="unknown",a=/applewebkit\/([0-9.]+)/.exec(y),a=a&&a[1])),s&&(d[s]=!0,d.version=a),d},T=(0,W.X)({_fromUA:S},S(P.userAgent))},4356:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=function(P){let b,f=function(){return b=P.apply(this,arguments),f=function(){return b},b};return function(){return f.apply(this,arguments)}}},8684:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});const W=function(b){this._options=b||{},this._list=[],this._queue=[],this._firing=!1,this._fired=!1,this._firingIndexes=[]};W.prototype._fireCore=function(b,f){const S=this._firingIndexes,T=this._list,y=this._options.stopOnFalse,d=S.length;for(S[d]=0;S[d]<T.length&&(!1!==T[S[d]].apply(b,f)||!y);S[d]++);S.pop()},W.prototype.add=function(b){return"function"==typeof b&&(!this._options.unique||!this.has(b))&&this._list.push(b),this},W.prototype.remove=function(b){const f=this._list,S=this._firingIndexes,T=f.indexOf(b);if(T>-1&&(f.splice(T,1),this._firing&&S.length))for(let y=0;y<S.length;y++)T<=S[y]&&S[y]--;return this},W.prototype.has=function(b){const f=this._list;return b?f.indexOf(b)>-1:!!f.length},W.prototype.empty=function(b){return this._list=[],this},W.prototype.fireWith=function(b,f){const S=this._queue;if(f=(f=f||[]).slice?f.slice():f,this._options.syncStrategy)this._firing=!0,this._fireCore(b,f);else{if(S.push([b,f]),this._firing)return;for(this._firing=!0;S.length;){const T=S.shift();this._fireCore(T[0],T[1])}}return this._firing=!1,this._fired=!0,this},W.prototype.fire=function(){this.fireWith(this,arguments)},W.prototype.fired=function(){return this._fired};const P=function(b){return new W(b)}},4859:(In,Ze,M)=>{"use strict";M.d(Ze,{EG:()=>B,GP:()=>k,Li:()=>G,Mb:()=>x,Nt:()=>U,OX:()=>_,RL:()=>Q,T6:()=>I,TA:()=>J,VM:()=>ie,YD:()=>y,a0:()=>w,hm:()=>D,l5:()=>L,lQ:()=>K,uG:()=>d,zE:()=>g});var W=M(5737),o=M(3686),P=M(2925),b=M(6021),f=M(4270),S=M(2660),T=M(1830);const y=function(te,pe){return(0,T.O9)(te)?te:pe},d=function(te,pe){const z=new b.cY,oe=pe||this,ae={promise:z.promise(),abort:function(){clearTimeout(ee),z.rejectWith(oe)}},ee=(arguments[2]||setTimeout)(function(){const he=te.call(oe);he&&he.done&&(0,T.Tn)(he.done)?he.done(function(){z.resolveWith(oe)}):z.resolveWith(oe)},"number"==typeof pe?pe:0);return ae},c=[],s=[],a=[];let u;const h=function(te,pe,z){if(u&&u!==te)return c.push(pe),s.push(te),z=z||new b.cY,a.push(z),z;{const oe=u,ae=a.length;u=te;let ee=pe();return ee||(a.length>ae?ee=b.z7.apply(this,a.slice(ae)):z&&z.resolve()),u=oe,z&&ee&&ee.done&&ee.done(z.resolve).fail(z.reject),!u&&c.length&&("render"===s.shift()?g:_)(c.shift(),a.shift()),ee||(0,b.z7)()}},g=function(te,pe){return h("render",te,pe)},_=function(te,pe){return h("update",te,pe)},x=function(te){return function(){const pe=this;return h("render",function(){return te.call(pe)})}},w=function(te){return function(){const pe=this;return h("update",function(){return te.call(pe)})}},D=function(te,pe,z){const oe=[];let ae=0;return(0,S.__)(pe,(ee,he)=>{let de=0;const ue=z?z(he):he;(0,S.__)(te,(be,ve)=>{const le=ue[be];if(void 0!==le)return C(le,ve)?void de++:(de=-1,!1)}),!(de<ae)&&(de>ae&&(oe.length=0,ae=de),oe.push(he))}),oe},C=function(te,pe){if(Array.isArray(te)&&Array.isArray(pe)){let z=!1;return(0,S.__)(te,(oe,ae)=>{if(ae!==pe[oe])return z=!0,!1}),!z}return te===pe},I=function(te){switch((0,T.NW)(te)){case"string":return te.split(/\s+/,2);case"object":return[te.x??te.h,te.y??te.v];case"number":return[te];case"array":return te;default:return null}},L=function(te){let pe=(0,T.Kg)(te)?te:te.toString();const z=pe.match(/[^a-zA-Z0-9_]/g);return z&&(0,S.__)(z,(oe,ae)=>{pe=pe.replace(ae,"__"+ae.charCodeAt()+"__")}),pe},G=function(te,pe){const z=I(te);let oe=pe?parseFloat(z&&z[0]):parseInt(z&&z[0],10),ae=pe?parseFloat(z&&z[1]):parseInt(z&&z[1],10);return isFinite(oe)||(oe=0),isFinite(ae)||(ae=oe),{h:oe,v:ae}},k=function(te){if(te instanceof P.A)return te.toString();if((0,T.Gv)(te)||Array.isArray(te))try{const pe=JSON.stringify(te);return"{}"===pe?te:pe}catch{return te}return te},U=function(te){return te.replace(/[[\]{}\-()*+?.\\^$|\s]/g,"\\$&")},B=function(te){const pe=(0,o.A)().serverDecimalSeparator;return(0,T.O9)(te)&&(te=te.toString().replace(".",pe)),te},K=function(){},J=function(){return(new b.cY).resolve().promise()},ie=function(te,pe,z){const oe=[];let ae;const ee=!z;for(let he=0;he<te.length;he++)ae=!!pe(te[he],he),ae===ee&&oe.push(te[he]);return oe},Y={maxDepth:3,strict:!0},Z=(te,pe,z,oe)=>{const{strict:ae,maxDepth:ee}=oe,he=(0,f.ao)(te,!0),de=(0,f.ao)(pe,!0);switch(!0){case ae?he===de:he==de:case z>=ee:return!0;case(0,T.Gv)(he)&&(0,T.Gv)(de):return((te,pe,z,oe)=>{const ae=Object.keys(te),ee=Object.keys(pe);if(ae.length!==ee.length)return!1;const he=new Set(ee);return!ae.some(de=>!he.has(de)||!Z(te[de],pe[de],z+1,oe))})(he,de,z,oe);case Array.isArray(he)&&Array.isArray(de):return((te,pe,z,oe)=>te.length===pe.length&&!te.some((ae,ee)=>!Z(ae,pe[ee],z+1,(0,W.A)({},oe,{strict:!0}))))(he,de,z,oe);default:return!1}},Q=function(te,pe){const oe=(0,W.A)({},Y,arguments.length>2&&void 0!==arguments[2]?arguments[2]:Y);return Z(te,pe,0,oe)}},5866:(In,Ze,M)=>{"use strict";M.d(Ze,{a:()=>f});var W=M(6054),o=M(4270),P=M(1830);const f=function(S,T){return S=(0,o.ao)(S,!0),T=(0,o.ao)(T,!0),S&&T&&(0,P.Kb)(S)&&(0,P.Kb)(T)?T.is(S):S!=S&&T!=T||(0===S&&0===T?function(S,T){return 1/S==1/T}(S,T):!(null!==S&&"object"==typeof S&&!W.A.isElementNode(S))&&S===T)}},8181:(In,Ze,M)=>{"use strict";M.d(Ze,{v:()=>b});var W=M(1830);const o=function(){},P=function(S){return typeof console>"u"||!(0,W.Tn)(console[S])?o:console[S].bind(console)},b={log:P("log"),info:P("info"),warn:P("warn"),error:P("error")}},4270:(In,Ze,M)=>{"use strict";M.d(Ze,{Hz:()=>_,ao:()=>C,u7:()=>s,vL:()=>D});var W=M(7251),o=M(3538),P=M(6509),b=M(1830),f=M(2660),S=M(6234);const T=S.A.unwrap,y=S.A.isWrapped,d=S.A.assign,s=function(I){return function(I){return I.replace(/\[/g,".").replace(/\]/g,"")}(I).split(".")},u=function(I,L,N,G){if("this"===L)throw new W.A.Error("E4016");const k=I[L];G.unwrapObservables&&y(k)?d(k,N):I[L]=N},h=function(I){return(I=I||{}).unwrapObservables=void 0===I.unwrapObservables||I.unwrapObservables,I};function g(I,L){return L.unwrapObservables?T(I):I}const _=function(I){if(arguments.length>1&&(I=[].slice.call(arguments)),!I||"this"===I)return function(L){return L};if("string"==typeof I){const L=s(I);return function(N,G){const k=(G=h(G)).functionsAsIs,U="defaultValue"in G;let B=g(N,G);for(let K=0;K<L.length;K++){if(!B){if(null==B&&U)return G.defaultValue;break}const J=L[K];if(U&&(0,b.Gv)(B)&&!(J in B))return G.defaultValue;let ie=g(B[J],G);!k&&(0,b.Tn)(ie)&&(ie=ie.call(B)),B=ie}return B}}return Array.isArray(I)?function x(I){const L={};for(let N=0,G=I.length;N<G;N++){const k=I[N];L[k]=_(k)}return function(N,G){let k;return(0,f.__)(L,function(U){const B=this(N,G);if(void 0===B)return;let K=k||(k={});const J=U.split("."),ie=J.length-1;for(let re=0;re<ie;re++){const q=J[re];q in K||(K[q]={}),K=K[q]}K[J[ie]]=B}),k}}(I):(0,b.Tn)(I)?I:void 0},w=function(I,L,N,G){if((0,b.O9)(N))return N;const k={};return u(I,L,k,G),k},D=function(I){const L=(I=s(I||"this")).length-1;return function(N,G,k){let U=g(N,k=h(k));I.forEach(function(B,K){let J=function(I,L,N){return g("this"===L?I:I[L],N=N||{})}(U,B,k);const ie=!k.functionsAsIs&&(0,b.Tn)(J)&&!y(J);K===L?k.merge&&(0,b.Qd)(G)&&(!(0,b.O9)(J)||(0,b.Qd)(J))?(J=w(U,B,J,k),(0,P.tm)(J,G,!1,!0)):ie?U[B](G):u(U,B,G,k):(J=w(U,B,J,k),ie&&(J=J.call(U)),U=J)})}},C=function(I,L){var N;let G=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(I instanceof Date)return I.getTime();if(I&&I instanceof o.A&&I.valueOf)return I.valueOf();if("case"!==(null==G||null===(N=G.collatorOptions)||void 0===N?void 0:N.sensitivity)&&!L&&"string"==typeof I){var U;if("base"===(null==G||null===(U=G.collatorOptions)||void 0===U?void 0:U.sensitivity)){const B=/[\u0300-\u036f]/g;I=I.normalize("NFD").replace(B,"")}return null!=G&&G.locale?I.toLocaleLowerCase(G.locale):I.toLowerCase()}return I}},676:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>vt});var W=M(1830),o=M(3012),P=M(2660),b=M(6946);const f={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,quarter:7776e6,year:31536e6};function S(qe){return f[qe]}const T=7,s=["millisecond","second","minute","hour","day","week","month","quarter","year"],h=function(qe){let At,Tt,qt;const wt=["millisecond","second","minute","hour","day","month","year"],En={};for(At=wt.length-1;At>=0;At--)qt=wt[At],Tt=Math.floor(qe/S(qt)),Tt>0&&(En[qt+"s"]=Tt,qe-=_(qt,Tt));return En};function _(qe,At){return S(qe)*At}function x(qe){let Tt,At=-1;return(0,W.Kg)(qe)?qe:(0,W.Gv)(qe)?((0,P.__)(qe,function(qt,wt){for(Tt=0;Tt<s.length;Tt++)wt&&(qt===s[Tt]+"s"||qt===s[Tt])&&At<Tt&&(At=Tt)}),s[At]):""}const w={millisecond:"millisecond",second:"longtime",minute:"shorttime",hour:"shorttime",day:"day",week:"day",month:"month",quarter:"quarter",year:"year"},C=function(qe){return Math.floor(qe/3)},I=function(qe){return 3*C(qe)};function L(qe,At,Tt,qt){qe=new Date(qe.getTime());const wt=new Date(qe.getTime());let En,ri;const Tn=x(At);switch(Tn){case"second":qe=new Date(1e3*Math.floor(wt.getTime()/1e3));break;case"minute":qe=new Date(6e4*Math.floor(wt.getTime()/6e4));break;case"hour":qe=new Date(36e5*Math.floor(wt.getTime()/36e5));break;case"year":qe.setMonth(0);case"month":qe.setDate(1);case"day":qe.setHours(0,0,0,0);break;case"week":(qe=ge(qe,qt||0)).setHours(0,0,0,0);break;case"quarter":En=I(qe.getMonth()),ri=qe.getMonth(),qe.setDate(1),qe.setHours(0,0,0,0),ri!==En&&qe.setMonth(En)}return Tt&&"hour"!==Tn&&"minute"!==Tn&&"second"!==Tn&&Ke(wt,qe),qe}function N(qe){return L(qe,"day")}function U(qe,At,Tt){const qt=new Date(qe.getTime()),wt=(0,W.Kg)(At)?z(At.toLowerCase()):(0,W.kf)(At)?h(At):At;return wt.years&&qt.setFullYear(qt.getFullYear()+wt.years*Tt),wt.quarters&&qt.setMonth(qt.getMonth()+3*wt.quarters*Tt),wt.months&&qt.setMonth(qt.getMonth()+wt.months*Tt),wt.weeks&&qt.setDate(qt.getDate()+7*wt.weeks*Tt),wt.days&&qt.setDate(qt.getDate()+wt.days*Tt),wt.hours&&qt.setTime(qt.getTime()+36e5*wt.hours*Tt),wt.minutes&&qt.setTime(qt.getTime()+6e4*wt.minutes*Tt),wt.seconds&&qt.setTime(qt.getTime()+1e3*wt.seconds*Tt),wt.milliseconds&&qt.setTime(qt.getTime()+wt.milliseconds*Tt),qt}const B=function(qe,At,Tt){const qt=Tt?-1:1;return(0,W.$P)(qe)?U(qe,At,qt):(0,o.Ai)(qe+At*qt,At)};function Y(qe){return Fe(qe.getFullYear(),qe.getMonth()+1,0).getDate()}function z(qe){const At={};switch(qe){case"year":At.years=1;break;case"month":At.months=1;break;case"quarter":At.months=3;break;case"week":At.weeks=1;break;case"day":At.days=1;break;case"hour":At.hours=1;break;case"minute":At.minutes=1;break;case"second":At.seconds=1;break;case"millisecond":At.milliseconds=1}return At}function ae(qe,At){return ee(qe,At)&&qe.getMonth()===At.getMonth()}function ee(qe,At){return qe&&At&&qe.getFullYear()===At.getFullYear()}function be(qe){return qe&&qe.getFullYear()-qe.getFullYear()%100}function ve(qe){return qe&&qe.getFullYear()-qe.getFullYear()%10}function ge(qe,At){const Tt=(qe.getDay()-At+T)%T,qt=new Date(qe);return qt.setDate(qe.getDate()-Tt),qt}function fe(qe){return Date.UTC(qe.getFullYear(),qe.getMonth(),qe.getDate())}function Te(qe){return new Date(qe,0,1)}function Ee(qe){return new Date(qe,11,31)}function Oe(qe,At){let Tt=qe.getDay()-At+1;return Tt<=0&&(Tt+=T),Tt}function et(qe,At,Tt){let qt=qe;return(0,W.O9)(qe)?((0,W.O9)(At)&&qe<At&&(qt=At),(0,W.O9)(Tt)&&qe>Tt&&(qt=Tt),qt):qe}function Ke(qe,At){if(!(0,W.O9)(qe))return;const Tt=At.getHours()-qe.getHours();if(0===Tt)return;const qt=1===Tt||-23===Tt?-1:1,wt=new Date(At.getTime()+36e5*qt);(qt>0||wt.getDate()===At.getDate())&&At.setTime(wt.getTime())}function Pe(qe,At){return 60*(At.getTimezoneOffset()-qe.getTimezoneOffset())*1e3}const Fe=function(qe){const At=new Date(...arguments);return At.setFullYear(qe),At},tt={dateUnitIntervals:s,convertMillisecondsToDateUnits:h,dateToMilliseconds:function(qe){let At=0;return(0,W.Gv)(qe)&&(0,P.__)(qe,function(Tt,qt){At+=_(Tt.substr(0,Tt.length-1),qt)}),(0,W.Kg)(qe)&&(At=_(qe,1)),At},getNextDateUnit:function(qe,At){switch(x(qe)){case"millisecond":return"second";case"second":return"minute";case"minute":return"hour";case"hour":return"day";case"day":return At?"week":"month";case"week":return"month";case"month":return"quarter";case"quarter":case"year":return"year";default:return 0}},convertDateUnitToMilliseconds:_,getDateUnitInterval:x,getDateFormatByTickInterval:function D(qe){return w[x(qe)]||""},getDatesDifferences:function(qe,At){let Tt=0;const qt={year:qe.getFullYear()!==At.getFullYear(),month:qe.getMonth()!==At.getMonth(),day:qe.getDate()!==At.getDate(),hour:qe.getHours()!==At.getHours(),minute:qe.getMinutes()!==At.getMinutes(),second:qe.getSeconds()!==At.getSeconds(),millisecond:qe.getMilliseconds()!==At.getMilliseconds()};return(0,P.__)(qt,function(wt,En){En&&Tt++}),0===Tt&&0!==Pe(qe,At)&&(qt.hour=!0,Tt++),qt.count=Tt,qt},correctDateWithUnitBeginning:L,trimTime:N,setToDayEnd:function(qe){const At=N(qe);return At.setDate(At.getDate()+1),new Date(At.getTime()-1)},roundDateByStartDayHour:function(qe,At){const Tt=this.dateTimeFromDecimal(At),qt=new Date(qe);return(qe.getHours()===Tt.hours&&qe.getMinutes()<Tt.minutes||qe.getHours()<Tt.hours)&&qt.setHours(Tt.hours,Tt.minutes,0,0),qt},dateTimeFromDecimal:function(qe){return{hours:Math.floor(qe),minutes:qe%1*60}},addDateInterval:U,addInterval:B,getSequenceByInterval:function(qe,At,Tt){const qt=[];let wt;for(qt.push((0,W.$P)(qe)?new Date(qe.getTime()):qe),wt=qe;wt<At;)wt=B(wt,Tt),qt.push(wt);return qt},getDateIntervalByString:z,sameHoursAndMinutes:function he(qe,At){return qe&&At&&qe.getHours()===At.getHours()&&qe.getMinutes()===At.getMinutes()},sameDate:function oe(qe,At){return ae(qe,At)&&qe.getDate()===At.getDate()},sameMonthAndYear:ae,sameMonth:ae,sameYear:ee,sameDecade:function(qe,At){if(!(0,W.O9)(qe)||!(0,W.O9)(At))return;const Tt=qe.getFullYear()-qe.getFullYear()%10,qt=At.getFullYear()-At.getFullYear()%10;return qe&&At&&Tt===qt},sameCentury:function(qe,At){if(!(0,W.O9)(qe)||!(0,W.O9)(At))return;const Tt=qe.getFullYear()-qe.getFullYear()%100,qt=At.getFullYear()-At.getFullYear()%100;return qe&&At&&Tt===qt},getDifferenceInMonth:function(qe){let At=1;return"year"===qe&&(At=12),"decade"===qe&&(At=120),"century"===qe&&(At=1200),At},getDifferenceInMonthForCells:function(qe){let At=1;return"decade"===qe&&(At=12),"century"===qe&&(At=120),At},getFirstYearInDecade:ve,getFirstDecadeInCentury:be,getShortDateFormat:function(){return"yyyy/MM/dd"},getViewFirstCellDate:function(qe,At){return"month"===qe?Fe(At.getFullYear(),At.getMonth(),1):"year"===qe?Fe(At.getFullYear(),0,At.getDate()):"decade"===qe?Fe(ve(At),At.getMonth(),At.getDate()):"century"===qe?Fe(be(At),At.getMonth(),At.getDate()):void 0},getViewLastCellDate:function(qe,At){return"month"===qe?Fe(At.getFullYear(),At.getMonth(),Y(At)):"year"===qe?Fe(At.getFullYear(),11,At.getDate()):"decade"===qe?Fe(ve(At)+9,At.getMonth(),At.getDate()):"century"===qe?Fe(be(At)+90,At.getMonth(),At.getDate()):void 0},getViewDown:function(qe){switch(qe){case"century":return"decade";case"decade":return"year";case"year":return"month"}},getViewUp:function(qe){switch(qe){case"month":return"year";case"year":return"decade";case"decade":return"century"}},getLastMonthDay:Y,getLastMonthDate:function(qe){if((0,W.O9)(qe))return Fe(qe.getFullYear(),qe.getMonth()+1,0)},getFirstMonthDate:function(qe){if((0,W.O9)(qe))return Fe(qe.getFullYear(),qe.getMonth(),1)},getFirstWeekDate:ge,getWeekNumber:function ze(qe,At,Tt){const qt=Oe(Te(qe.getFullYear()),At),wt=Oe(Ee(qe.getFullYear()),At),En=T-qt+1;let ri=Math.ceil((function xe(qe){const At=fe(qe)-fe(Te(qe.getFullYear()));return 1+Math.floor(At/S("day"))}(qe)-En)/7);switch(Tt){case"fullWeek":return En===T&&ri++,0===ri?ze(Ee(qe.getFullYear()-1),At,Tt):ri;case"firstDay":return En>0&&ri++,(ri>52&&!(7===qt||7===wt)||54===ri)&&(ri=1),ri;case"firstFourDays":return En>3&&ri++,ri>52&&!(4===qt||4===wt)&&(ri=1),0===ri?ze(Ee(qe.getFullYear()-1),At,Tt):ri}},normalizeDateByWeek:function(qe,At){const Tt=tt.getDatesInterval(qe,At,"day");let qt=new Date(qe);return Tt>=6&&(qt=new Date(qt.setDate(qt.getDate()+7))),qt},getQuarter:C,getFirstQuarterMonth:I,dateInRange:function(qe,At,Tt,qt){return"date"===qt&&(At=At&&tt.correctDateWithUnitBeginning(At,"day"),Tt=Tt&&tt.correctDateWithUnitBeginning(Tt,"day"),qe=qe&&tt.correctDateWithUnitBeginning(qe,"day")),et(qe,At,Tt)===qe},intervalsOverlap:function(qe){const{firstMin:At,firstMax:Tt,secondMin:qt,secondMax:wt}=qe;return At<=qt&&qt<=Tt||At>qt&&At<wt||At<wt&&Tt>wt},roundToHour:function(qe){const At=new Date(qe.getTime());return At.setHours(At.getHours()+1),At.setMinutes(0),At},normalizeDate:et,getViewMinBoundaryDate:function(qe,At){const Tt=Fe(At.getFullYear(),At.getMonth(),1);return"month"===qe||(Tt.setMonth(0),"year"===qe)||("decade"===qe&&Tt.setFullYear(ve(At)),"century"===qe&&Tt.setFullYear(be(At))),Tt},getViewMaxBoundaryDate:function(qe,At){const Tt=new Date(At);return Tt.setDate(Y(At)),"month"===qe||(Tt.setMonth(11),Tt.setDate(Y(Tt)),"year"===qe)||("decade"===qe&&Tt.setFullYear(ve(At)+9),"century"===qe&&Tt.setFullYear(be(At)+99)),Tt},fixTimezoneGap:Ke,getTimezonesDifference:Pe,makeDate:function(qe){return new Date(qe)},getDatesInterval:function(qe,At,Tt){const qt=At.getTime()-qe.getTime(),wt=S(Tt)||1;return Math.floor(qt/wt)},getDatesOfInterval:function(qe,At,Tt){const qt=[];let wt=new Date(qe.getTime());for(;wt<At;)qt.push(new Date(wt.getTime())),wt=this.addInterval(wt,Tt);return qt},createDateWithFullYear:Fe,getMachineTimezoneName:()=>typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:null,sameView:function(qe,At,Tt){return tt[(0,b.PT)("same "+qe)](At,Tt)}},vt=tt},4761:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>I});var W=M(3686),o=M(5870),P=M(5259),b=M(1830);const y=/^(\d{4,})(-)?(\d{2})(-)?(\d{2})(?:T(\d{2})(:)?(\d{2})?(:)?(\d{2}(?:\.(\d{1,3})\d*)?)?)?(Z|([+-])(\d{2})(:)?(\d{2})?)?$/,d=/^(\d{2}):(\d{2})(:(\d{2}))?$/,c=["","yyyy","","MM","","dd","THH","","mm","","ss",".SSS"],s=/^(\d{4})\/(\d{2})\/(\d{2})$/,u=function(L,N){let G;return(0,b.Kg)(L)&&!N&&(G=function _(L){let N=L.match(y);if(!N)return N=L.match(d),N?new Date(0,0,0,h(N[1]),h(N[2]),h(N[4])):void 0;const G=h(N[1]),k=--N[3],U=N[5];let B=0,K=0;B=h(N[14]),K=h(N[16]),"-"===N[13]&&(B=-B,K=-K);const ie=h(N[6])-B,re=h(N[8])-K,q=h(N[10]),Y=h(Z=(Z=N[11])||"")*Math.pow(10,3-Z.length);var Z;return(Z=>(G<100&&Z.setFullYear(G),Z))(N[12]?new Date(Date.UTC(G,k,U,ie,re,q,Y)):new Date(G,k,U,ie,re,q,Y))}(L)),G||function g(L){const N="yyyy/MM/dd"===C(L),G=!(0,b.$P)(L)&&Date.parse(L);if(!G&&N){const k=L.match(s);if(k){const U=new Date(h(k[1]),h(k[2]),h(k[3]));return U.setFullYear(h(k[1])),U.setMonth(h(k[2])-1),U.setDate(h(k[3])),U}}return(0,b.kf)(G)?new Date(G):L}(L)};function h(L){return+L||0}const C=function(L){if("number"==typeof L)return"number";if((0,b.Kg)(L)){let N;return(0,W.A)().forceIsoDateParsing&&(N=function(L,N){let G=L.match(y),k="";if(!G)return G=L.match(d),G?G[3]?"HH:mm:ss":"HH:mm":void 0;for(let U=1;U<c.length;U++)G[U]&&(k+=c[U]||G[U]);return"Z"===G[12]&&(k+="'Z'"),G[14]&&(k+=G[15]?"xxx":G[16]?"xx":"x"),k}(L)),N||(L.indexOf(":")>=0?"yyyy/MM/dd HH:mm:ss":"yyyy/MM/dd")}return L?null:void 0},I={dateParser:u,deserializeDate:function(L){return"number"==typeof L?new Date(L):u(L,!(0,W.A)().forceIsoDateParsing)},serializeDate:function(L,N){return N?(0,b.$P)(L)?"number"===N?L&&L.valueOf?L.valueOf():null:(0,o.f)(N,P.A)(L):null:L},getDateSerializationFormat:C}},6021:(In,Ze,M)=>{"use strict";M.d(Ze,{Sx:()=>S,cY:()=>d,z7:()=>c});var W=M(1830),o=M(3090),P=M(8684);const b=[{method:"resolve",handler:"done",state:"resolved"},{method:"reject",handler:"fail",state:"rejected"},{method:"notify",handler:"progress"}];let f=function(){const s=this;this._state="pending",this._promise={},b.forEach(function(a){const u=a.method;this[u+"Callbacks"]=(0,P.A)(),this[u]=function(){return this[u+"With"](this._promise,arguments)}.bind(this),this._promise[a.handler]=function(h){if(!h)return this;const g=s[u+"Callbacks"];return g.fired()?h.apply(s[u+"Context"],s[u+"Args"]):g.add(function(_,x){h.apply(_,x)}.bind(this)),this}}.bind(this)),this._promise.always=function(a){return this.done(a).fail(a)},this._promise.catch=function(a){return this.then(null,a)},this._promise.then=function(a,u){const h=new f;return["done","fail"].forEach(function(g){const _="done"===g?a:u;this[g](function(){if(!_)return void h["done"===g?"resolve":"reject"].apply(this,arguments);const x=_&&_.apply(this,arguments);(0,W.uF)(x)?x.done(h.resolve).fail(h.reject):(0,W.yL)(x)?x.then(h.resolve,h.reject):h.resolve.apply(this,(0,W.O9)(x)?[x]:arguments)})}.bind(this)),h.promise()},this._promise.state=function(){return s._state},this._promise.promise=function(a){return a?(0,o.X)(a,s._promise):s._promise},this._promise.promise(this)};function S(s,a){if((0,W.uF)(s))return s;if((0,W.yL)(s)){const u=new f;return s.then(function(){u.resolveWith.apply(u,[a].concat([[].slice.call(arguments)]))},function(){u.rejectWith.apply(u,[a].concat([[].slice.call(arguments)]))}),u}return(new f).resolveWith(a,[s])}b.forEach(function(s){const a=s.method,u=s.state;f.prototype[a+"With"]=function(h,g){const _=this[a+"Callbacks"];return"pending"===this.state()&&(this[a+"Args"]=g,this[a+"Context"]=h,u&&(this._state=u),_.fire(h,g),"pending"!==u&&(this.resolveCallbacks.empty(),this.rejectCallbacks.empty())),this}});let T=function(){if(1===arguments.length)return S(arguments[0]);const s=[].slice.call(arguments),a=[];let u=0;const h=new f,g=function(_){return function(x){a[_]=this,s[_]=arguments.length>1?[].slice.call(arguments):x,u++,u===s.length&&h.resolveWith(a,s)}};for(let _=0;_<s.length;_++)(0,W.uF)(s[_])?s[_].promise().done(g(_)).fail(h.reject):u++;return u===s.length&&h.resolveWith(a,s),h.promise()};function d(){return new f}function c(){return T.apply(this,arguments)}},1926:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>f});var W=M(3090),o=M(1830),P=M(2660),b=M(3538);function f(S){const T=b.A.inherit(S);let y=T,d=new y(S);const c={},s=function(a,u){(0,P.__)(a,function(h){(0,o.Tn)(d[h])?(u||!S[h])&&(S[h]=function(){return d[h].apply(S,arguments)}):(u&&(c[h]=S[h]),S[h]=d[h])})};return s(S,!0),S.inject=function(a){y=y.inherit(a),d=new y,s(a)},S.resetInjection=function(){(0,W.X)(S,c),y=T,d=new T},S}},1832:(In,Ze,M)=>{"use strict";M.d(Ze,{A1:()=>w,D2:()=>g,GX:()=>y,KR:()=>u,bG:()=>x,gR:()=>h,ki:()=>a,tc:()=>c,wr:()=>d});var W=M(6054),o=M(5704),P=M(2660),b=M(1830),f=M(6110);const S=(0,f.zk)(),y=()=>{const D=W.A.getActiveElement();var C;D&&D!==W.A.getBody()&&(null===(C=D.blur)||void 0===C||C.call(D))},d=()=>{const D=S.getSelection();if(D&&"Caret"!==D.type)if(D.empty)D.empty();else if(D.removeAllRanges)try{D.removeAllRanges()}catch{}},c=(D,C)=>{const I=(0,o.A)(D),L=(0,o.A)(C);if(I[0]===L[0])return I[0];const N=I.parents(),G=L.parents();for(let U=-Math.min(N.length,G.length);U<0;U++)if(N.get(U)===G.get(U))return N.get(U)},a=D=>{let C=(0,b.O9)(D)&&(D.nodeType||(0,b.Kb)(D))?(0,o.A)(D):(0,o.A)("<div>").html(D).contents();return 1===C.length&&(C.is("script")?C=a(C.html().trim()):C.is("table")&&(C=C.children("tbody").contents())),C},u=(D,C)=>{const I=D.originalEvent&&D.originalEvent.clipboardData||S.clipboardData;if(!C)return I&&I.getData("Text");I&&I.setData("Text",C)},h=(D,C)=>!!C&&((0,b.l6)(D)?h(D.document,C):D.contains(C)||h(D,(D=>{if(!D.getRootNode)return;const C=D.getRootNode().host;return(0,b.Kg)(C)?void 0:C})(C))),g=(D,C,I)=>{const L=S.getComputedStyle((0,o.A)(D).get(0)),N=I&&I.includePaddings;return(0,o.A)("<div>").text(C).css({fontStyle:L.fontStyle,fontVariant:L.fontVariant,fontWeight:L.fontWeight,fontSize:L.fontSize,fontFamily:L.fontFamily,letterSpacing:L.letterSpacing,border:L.border,paddingTop:N?L.paddingTop:"",paddingRight:N?L.paddingRight:"",paddingBottom:N?L.paddingBottom:"",paddingLeft:N?L.paddingLeft:"",visibility:"hidden",whiteSpace:"pre",position:"absolute",float:"left"})},x=(D,C)=>{if(C&&C[0])return C.is(D)?D:((0,P.__)(C,(I,L)=>{((D,C)=>{C&&W.A.insertElement(D.parentNode,C,D)})(D[0],L)}),D.remove(),C)},w=D=>{const C=D?.get(0),I=C?.getRootNode().host;return!!(0,o.A)(I||C).closest((0,f.zk)().document).length}},7754:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>S});var W=M(3090),o=M(8181),P=M(9495);const f="https://js.devexpress.com/error/"+M(9274).r.split(".").slice(0,2).join("_")+"/";function S(T,y){const d={ERROR_MESSAGES:(0,W.X)(y,T),Error:function(){return function(u){const h=u[0],g=c(h,u=u.slice(1)),_=a(h),x=s(h,g);return(0,W.X)(new Error(x),{__id:h,__details:g,url:_})}([].slice.call(arguments))},log:function(u){let h="log";/^E\d+$/.test(u)?h="error":/^W\d+$/.test(u)&&(h="warn"),o.v[h]("log"===h?u:function(g){const _=g[0];return s(_,c(_,g=g.slice(1)))}([].slice.call(arguments)))}};function c(u,h){return h=[d.ERROR_MESSAGES[u]].concat(h),P.GP.apply(this,h).replace(/\.*\s*?$/,"")}function s(u,h){const g=null!=u&&u.startsWith("W")?"warning":"error";return P.GP.apply(this,["{0} - {1}.\n\nFor additional information on this {2} message, see: {3}",u,h,g,a(u)])}function a(u){return f+u}return d}},3090:(In,Ze,M)=>{"use strict";M.d(Ze,{X:()=>P,a:()=>o});var W=M(1830);const o=function(b,f,S){b=b||{};for(const T in f)Object.prototype.hasOwnProperty.call(f,T)&&(!(T in b)||S)&&(b[T]=f[T]);return b},P=function(b){let f=1,S=!1;for("boolean"==typeof(b=b||{})&&(S=b,b=arguments[1]||{},f++);f<arguments.length;f++){const T=arguments[f];if(null!=T)for(const y in T){const d=b[y],c=T[y];let a,s=!1;"__proto__"===y||"constructor"===y||b===c||(S&&c&&((0,W.Qd)(c)||(s=Array.isArray(c)))?(a=s?d&&Array.isArray(d)?d:[]:d&&(0,W.Qd)(d)?d:{},b[y]=P(S,a,c)):void 0!==c&&(b[y]=c))}}return b}},4781:(In,Ze,M)=>{"use strict";M.d(Ze,{B:()=>b,a:()=>f});var W=M(6054);const o=/<([a-z][^/\0>\x20\t\r\n\f]+)/i,P={default:{tagsCount:0,startTags:"",endTags:""},thead:{tagsCount:1,startTags:"<table>",endTags:"</table>"},td:{tagsCount:3,startTags:"<table><tbody><tr>",endTags:"</tr></tbody></table>"},col:{tagsCount:2,startTags:"<table><colgroup>",endTags:"</colgroup></table>"},tr:{tagsCount:2,startTags:"<table><tbody>",endTags:"</tbody></table>"}};P.tbody=P.colgroup=P.caption=P.tfoot=P.thead,P.th=P.td;const b=function(S){if("string"!=typeof S)return null;let y=W.A.createDocumentFragment().appendChild(W.A.createElement("div"));const d=o.exec(S),c=d&&d[1].toLowerCase(),s=P[c]||P.default;y.innerHTML=s.startTags+S+s.endTags;for(let a=0;a<s.tagsCount;a++)y=y.lastChild;return[...y.childNodes]},f=function(S){const T=o.exec(S);return T&&T[1]in P}},8535:(In,Ze,M)=>{"use strict";M.d(Ze,{F:()=>b,N:()=>f});var W=M(5704);const b=S=>!(!S||"string"!=typeof S)&&(/^\s*<svg[^>]*>(.|\r?\n)*?<\/svg>\s*$/i.test(S)?"svg":/data:.*base64|\.|[^<\s]\/{1,1}/.test(S)?"image":/^[\w-_]+$/.test(S)?"dxIcon":!!/^\s?([\w-_:]\s?)+$/.test(S)&&"fontIcon"),f=S=>{switch(b(S)){case"image":return(0,W.A)("<img>").attr("src",S).addClass("dx-icon");case"fontIcon":return(0,W.A)("<i>").addClass(`dx-icon ${S}`);case"dxIcon":return(0,W.A)("<i>").addClass(`dx-icon dx-icon-${S}`);case"svg":return(0,W.A)("<i>").addClass("dx-icon dx-svg-icon").append(S);default:return null}}},6946:(In,Ze,M)=>{"use strict";M.d(Ze,{Bc:()=>s,I3:()=>y,Ns:()=>d,PT:()=>T,_k:()=>f});var W=M(2660);const o=function(a){return null==a?"":String(a)},P=function(a){return o(a).charAt(0).toUpperCase()+a.substr(1)},b=function(a){return o(a).replace(/([a-z\d])([A-Z])/g,"$1 $2").split(/[\s_-]+/)},f=function(a){return(0,W.Tj)(b(a),function(u){return u.toLowerCase()}).join("-")},T=function(a,u){return(0,W.Tj)(b(a),function(h,g){return h=h.toLowerCase(),(u||g>0)&&(h=P(h)),h}).join("")},y=function(a){return P(f(a).replace(/-/g," "))},d=function(a){return(0,W.Tj)(b(a),function(u){return P(u.toLowerCase())}).join(" ")},c=["0","1","2","3","4","5","6","7","8","9"],s=function(a){const u=[];let h,g,_=!1,x=!1;for(h=0;h<a.length;h++)g=a.charAt(h),x=g===g.toUpperCase()&&"-"!==g&&")"!==g&&"/"!==g||g in c,"_"===g||"."===g?(g=" ",x=!0):0===h?(g=g.toUpperCase(),x=!0):!_&&x&&u.length>0&&u.push(" "),u.push(g),_=x;return u.join("")}},2660:(In,Ze,M)=>{"use strict";M.d(Ze,{Tj:()=>W,__:()=>o,iW:()=>P});const W=(b,f)=>{if(Array.isArray(b))return b.map(f);const S=[];for(const T in b)S.push(f(b[T],T));return S},o=(b,f)=>{if(b){if("length"in b)for(let S=0;S<b.length&&!1!==f.call(b[S],S,b[S]);S++);else for(const S in b)if(!1===f.call(b[S],S,b[S]))break;return b}},P=(b,f)=>{if(b&&"length"in b&&0!==b.length)for(let S=b.length-1;S>=0&&!1!==f.call(b[S],S,b[S]);S--);}},3012:(In,Ze,M)=>{"use strict";M.d(Ze,{Ai:()=>d,BU:()=>u,Ke:()=>f,T0:()=>T,UN:()=>g,XV:()=>c,_S:()=>o,ar:()=>_,cB:()=>a,df:()=>P,oz:()=>h,r4:()=>b});var W=M(1830);const o=function(x){return 0===x?0:x/Math.abs(x)},P=function(x,w,D){const C=!w&&0!==w,I=!D&&0!==D;return C&&(w=I?x:Math.min(x,D)),I&&(D=C?x:Math.max(x,w)),Math.min(Math.max(x,w),D)},b=function(x,w,D){return x>=w&&x<=D};function f(x){return Math.abs(parseInt(x.toExponential().split("e")[1]))}function T(x,w){const D=function S(x){const w=x.toExponential().split("e"),D=parseFloat(w[0]);return{exponent:parseInt(w[1]),mantissa:D}}(x);return parseFloat(`${D.mantissa}e${D.exponent+w}`)}function d(x,w){let D=c(w||0)+2;const C=x.toString().split("."),I=x,L=Math.abs(x);let N;const G=(0,W.O4)(x),k=L>1?10:0;return 1===C.length?x:(G||((0,W.O4)(w)&&(D=C[0].length+f(w)),x=(x=L)-Math.floor(x)+k),D=function y(){return"0.000300"!==3e-4.toPrecision(3)}()&&f(x)>6||D>7?15:7,G||(N=parseFloat(x.toPrecision(D)).toString().split("."),N[0]!==k.toString())?parseFloat(I.toPrecision(D)):parseFloat(C[0]+"."+N[1]))}function c(x){const w=x.toString();if(w.indexOf(".")<0)return 0;const D=w.split("."),C=D[1].indexOf("e");return C>=0?C:D[1].length}function s(x,w){if(x<0&&w%2!=1)return NaN;const D=Math.pow(Math.abs(x),1/w);return w%2==1&&x<0?-D:D}function a(x,w,D,C){if(Math.abs(x)<1e-8){if(x=w,w=D,D=C,Math.abs(x)<1e-8)return x=w,w=D,Math.abs(x)<1e-8?[]:[-w/x];const k=w*w-4*x*D;return Math.abs(k)<1e-8?[-w/(2*x)]:k>0?[(-w+Math.sqrt(k))/(2*x),(-w-Math.sqrt(k))/(2*x)]:[]}const I=(3*x*D-w*w)/(3*x*x),L=(2*w*w*w-9*x*w*D+27*x*x*C)/(27*x*x*x);let N,G;if(Math.abs(I)<1e-8)N=[s(-L,3)];else if(Math.abs(L)<1e-8)N=[0].concat(I<0?[Math.sqrt(-I),-Math.sqrt(-I)]:[]);else{const k=L*L/4+I*I*I/27;if(Math.abs(k)<1e-8)N=[-1.5*L/I,3*L/I];else if(k>0)G=s(-L/2-Math.sqrt(k),3),N=[G-I/(3*G)];else{G=2*Math.sqrt(-I/3);const U=Math.acos(3*L/I/G)/3,B=2*Math.PI/3;N=[G*Math.cos(U),G*Math.cos(U-B),G*Math.cos(U-2*B)]}}for(let k=0;k<N.length;k++)N[k]-=w/(3*x);return N}function u(x){return Math.trunc?Math.trunc(x):x>0?Math.floor(x):Math.ceil(x)}function h(x,w,D){if(w===parseInt(w))return x%w;const C=_(x/w,D);return(C-parseInt(C))*w}function g(x){var w;const D=x.toString();return(null===(w=D.split(".")[1])||void 0===w?void 0:w.length)||parseInt(D.split("e-")[1])||0}function _(x){return parseFloat(x.toFixed(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0))}},6509:(In,Ze,M)=>{"use strict";M.d(Ze,{ap:()=>b,o8:()=>P,tm:()=>S});var W=M(1830),o=M(6234);const P=function(){function T(){}return function(y){return T.prototype=y,new T}}(),b=function(T,y){const d=[];let c,s;for(c in T)Object.prototype.hasOwnProperty.call(T,c)&&d.push(c);for(d.sort(function(a,u){const h=(0,W.kf)(a),g=(0,W.kf)(u);return h&&g?a-u:h&&!g?-1:!h&&g?1:a<u?-1:a>u?1:0}),s=0;s<d.length;s++)c=d[s],y(c,T[c])},f=function(T,y,d,c){!c&&o.A.isWrapped(T[y])?o.A.assign(T[y],d):T[y]=d},S=function(T,y,d,c){let s,a;for(const u in y)if(s=T[u],a=y[u],"__proto__"!==u&&"constructor"!==u&&T!==a){if((0,W.Qd)(a)){const h=d?(0,W.Gv)(s):(0,W.Qd)(s);a=S(h?s:{},a,d,c)}void 0!==a&&s!==a&&f(T,u,a,c)}return T}},4757:(In,Ze,M)=>{"use strict";M.d(Ze,{N:()=>b,n:()=>P});var W=M(3686),o=M(1830);const P=f=>f??(0,W.A)().rtlEnabled?"right":"left",b=f=>(0,o.l6)(f)?{width:f.outerWidth,height:f.outerHeight}:f.getBoundingClientRect()},8879:(In,Ze,M)=>{"use strict";M.d(Ze,{UK:()=>c,UU:()=>d,pV:()=>s});var W=M(5397),o=M(4072),P=M(1830),b=M(1110);const T=new WeakMap;let y=0;const d=function(a,u){if(!(0,P.O9)(u)){if(!T.has(a)){const h="dxPrivateComponent"+y++;return T.set(a,h),h}return T.get(a)}T.set(a,u)};function c(a,u,h){const g=(0,W.p)(a.get(0)),_=d(u.constructor);g[_]=u,h&&o.A.one(a,b.N,function(){h.call(u)}),g.dxComponents||(g.dxComponents=[]),g.dxComponents.push(_)}function s(a,u){const h=d(u);return(0,W.p)(a.get(0),h)}},2720:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(6054),o=M(1926),P=M(6110),b=M(4356);let f=[];const S=(0,b.A)(()=>{const d=W.A.listen(W.A.getDocument(),"DOMContentLoaded",()=>{T.fire(),d()})}),T={add:d=>{const c=(0,P.Vd)();c&&"loading"!==W.A.getReadyState()?d():(f.push(d),c&&S())},fire:()=>{f.forEach(d=>d()),f=[]}},y=(0,o.A)(T)},1773:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(6110),o=M(6054),P=M(8684),b=M(2720),f=M(4356);const T=function(){let y;const d=(0,P.A)(),c=d.add,s=d.remove;if(!(0,W.Vd)())return d;const a=function(){const _=(0,W.zk)();return{width:_.innerWidth,height:_.innerHeight}},u=function(){const _=a();if(_.width===y.width&&_.height===y.height)return;let x;_.width===y.width&&(x="height"),_.height===y.height&&(x="width"),y=_,d.fire(x)},h=(0,f.A)(function(){y=a()});let g;return d.add=function(){const _=c.apply(d,arguments);return h(),b.A.add(function(){!g&&d.has()&&(g=o.A.listen((0,W.zk)(),"resize",u))}),_},d.remove=function(){const _=s.apply(d,arguments);return!d.has()&&g&&(g(),g=void 0),_},d}()},7271:(In,Ze,M)=>{"use strict";M.d(Ze,{H:()=>b});var W=M(4859),o=M(1830),P=M(4270);const b=function(f,S){let T;this.getLocalFilter=function(a,u,h,g){return c.bind(this,u=void 0===u?W.RL:u,a,h,g)},this.getExpr=function(a){if(!a)return;let u;return f.forEach(function(h,g){let _;u=u||[],g>0&&u.push(S?"and":"or"),_=(0,o.Kg)(a)?s(a,h):function(x,w){const D=[];for(let C=0,I=x.length;C<I;C++){const L=x[C],N=(0,P.Hz)(L),k=s(L,w&&N(w));if(!k)break;C>0&&D.push(S?"or":"and"),D.push(k)}return D}(a,h),u.push(_)}),u&&1===u.length&&(u=u[0]),u},this.getCombinedFilter=function(a,u){let h=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const g=this.getExpr(a);let _=g;return(h||S)&&u&&(g?(_=[],_.push(g),_.push(u)):_=u),_};const y=function(a,u){if(!T){T={};const h=d(f,a,u);for(let g=0;g<h.length;g++)T[(0,W.GP)(h[g])]=!0}return T},d=function(a,u,h){return Array.isArray(h)?a.map(g=>u(g)):a};function c(a,u,h,g,_){const x=u(_);let w,D;if(!h&&(w=(0,W.GP)(x),!(0,o.Gv)(w)))return y(u,g)[w]?!S:!!S;for(D=0;D<f.length;D++)if(a(f[D],x))return!S;return!!S}function s(a,u){if(void 0!==u)return[a,S?"<>":"=",u]}}},7713:(In,Ze,M)=>{"use strict";M.d(Ze,{c:()=>d,m:()=>S});const W="dx-";let o=null;function P(c){try{return new CSSStyleSheet}catch{const a=c.ownerDocument.createElement("style");return c.appendChild(a),a.sheet}}function b(c,s,a){for(let u=0;u<s.length;u++){const h=s[u];try{for(let g=0;g<h.cssRules.length;g++)f(c,h.cssRules[g],a)}catch{}}}function f(c,s,a){var u,h,g,_;(a||(null===(u=s.selectorText)||void 0===u?void 0:u.includes(W))||(null===(h=s.cssRules)||void 0===h||null===(h=h[0])||void 0===h||null===(h=h.selectorText)||void 0===h?void 0:h.includes(W))||(null===(g=s.name)||void 0===g?void 0:g.startsWith(W))||"DXIcons"===(null===(_=s.style)||void 0===_?void 0:_.fontFamily))&&c.insertRule(s.cssText,c.cssRules.length)}function S(c){var s;const a=c.get(0),u=null===(s=a.getRootNode)||void 0===s?void 0:s.call(a);if(null==u||!u.host)return;o||(o=P(u),b(o,a.ownerDocument.styleSheets,!1));const h=P(u);b(h,u.styleSheets,!0),u.adoptedStyleSheets=[o,h]}function T(c,s,a){const u=c.getBoundingClientRect();return u&&s>=u.left&&s<u.right&&a>=u.top&&a<u.bottom}function d(c,s,a){const u=function y(){let c=0;const s=[];return{push(a){return s.push(a),this},shift:()=>(c++,s[c-1]),get length(){return s.length-c},get items(){return s}}}().push(a);for(;u.length;){const g=u.shift();for(let _=0;_<g.childNodes.length;_++){const x=g.childNodes[_];x.nodeType===Node.ELEMENT_NODE&&T(x,c,s)&&"none"!==getComputedStyle(x).pointerEvents&&u.push(x)}}const h=u.items.reverse();return h.pop(),h}},1363:(In,Ze,M)=>{"use strict";M.d(Ze,{A3:()=>pe,GU:()=>T,NG:()=>ie,OP:()=>te,Oq:()=>k,Ot:()=>B,P$:()=>J,RG:()=>N,d6:()=>w,dh:()=>x,gP:()=>C,hP:()=>g,hh:()=>re,iT:()=>K,k$:()=>U,pD:()=>D,yV:()=>Y,zj:()=>G});var W=M(6110),o=M(6054),P=M(1830);const b=(0,W.zk)(),f=["auto","none","inherit","initial"],S=function(z,oe){let ae=0;return oe.forEach(function(ee){ae+=parseFloat(z[ee])||0}),ae},T=function(z,oe){const ae="width"===z?"Left":"Top",ee="width"===z?"Right":"Bottom";return{padding:S(oe,["padding"+ae,"padding"+ee]),border:S(oe,["border"+ae+"Width","border"+ee+"Width"]),margin:S(oe,["margin"+ae,"margin"+ee])}},y=function(z){var oe;const ae=(null==z||null===(oe=z.ownerDocument)||void 0===oe?void 0:oe.defaultView)||b;return ae.getComputedStyle&&ae.getComputedStyle(z)},d=function(z,oe,ae,ee){var he;return oe?.[ae]||(null===(he=z.style)||void 0===he?void 0:he[ae])||ee},c={content:0,padding:1,border:2,margin:3,"content-box":0,"border-box":2},s={width:["left","right"],height:["top","bottom"]};function a(z,oe,ae,ee){const he=(ue,be,ve)=>parseFloat(d(ue,be,ve,"0"))||0,de="border"===ae?"-width":"";return he(z,ee,`${ae}-${s[oe][0]}${de}`)+he(z,ee,`${ae}-${s[oe][1]}${de}`)}const g=function(z,oe,ae){return z.indexOf("px")>0?z=parseInt(z.replace("px","")):z.indexOf("%")>0?z=parseInt(z.replace("%",""))*function(z){return(0,P.l6)(z)?z.innerHeight:z.offsetHeight}(oe)/100:isNaN(z)?z.indexOf("vh")>0?z=b.innerHeight/100*parseInt(z.replace("vh","")):ae&&z.indexOf("em")>0&&(z=parseFloat(z.replace("em",""))*parseFloat(b.getComputedStyle(ae).fontSize)):z=parseInt(z),z},_=function(z,oe,ae){return z?f.indexOf(z)>-1?oe?null:z:((0,P.Kg)(z)&&(z=g(z,ae)),(0,P.kf)(z)?Math.max(0,z+oe):"calc("+z+(oe<0?" - ":" ")+Math.abs(oe)+"px)"):null},x=function(z,oe,ae){const ee=_(z,oe,ae);return null!==ee?ee:"none"},w=function(z,oe,ae){const ee=_(z,oe,ae);return null!==ee?ee:0},D=function(z,oe){if(!z)return 0;const ae=T("height",b.getComputedStyle(z));return ae.padding+ae.border+(oe?ae.margin:0)},C=function(z){if(z){const oe=z.getBoundingClientRect();if(oe.height)return oe.height}return 0};function L(z,oe,ae){return 2===arguments.length?Q(oe,z):Q(oe,z,ae)}const N=z=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("width",...oe)}(z),G=(z,oe)=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("width",...oe)}(z,oe),k=z=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("height",...oe)}(z),U=(z,oe)=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("height",...oe)}(z,oe),B=(z,oe)=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("outerWidth",...oe)}(z,oe||!1),K=(z,oe)=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("outerWidth",...oe)}(z,oe),J=(z,oe)=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("outerHeight",...oe)}(z,oe||!1),ie=(z,oe)=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("outerHeight",...oe)}(z,oe),re=z=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("innerWidth",...oe)}(z),Y=z=>function(){for(var z=arguments.length,oe=new Array(z),ae=0;ae<z;ae++)oe[ae]=arguments[ae];return L("innerHeight",...oe)}(z),Q=function(z,oe,ae){const ee=oe.toLowerCase().indexOf("width")>=0?"Width":"Height",he=ee.toLowerCase(),de=0===oe.indexOf("outer"),ue=0===oe.indexOf("inner"),be=2===arguments.length||"boolean"==typeof ae;if((0,P.Kb)(z)){if(z.length>1&&!be){for(let ve=0;ve<z.length;ve++)Q(z[ve],oe,ae);return}z=z[0]}if(z){if((0,P.l6)(z))return de?z["inner"+ee]:o.A.getDocumentElement()["client"+ee];if(o.A.isDocument(z)){const ve=o.A.getDocumentElement(),le=o.A.getBody();return Math.max(le["scroll"+ee],le["offset"+ee],ve["scroll"+ee],ve["offset"+ee],ve["client"+ee])}if(be){let ve="content";return de&&(ve=ae?"margin":"border"),ue&&(ve="padding"),function(z,oe,ae){const ee="width"===oe?"offsetWidth":"offsetHeight",he=y(z);let de=d(z,he,oe);(""===de||"auto"===de)&&(de=z[ee]),de=parseFloat(de)||0;const ue=d(z,he,"boxSizing","content-box");let ve=c[ae||ue],le=c[ue];if(void 0===ve||void 0===le)throw new Error;if(le===ve)return de;const Ce=Math.sign(ve-le);let ye=!1,ge=!1,fe=!1,xe=!1;1===Ce&&(ve+=1,le+=1);for(let Te=le;Te!==ve;Te+=Ce)switch(Te){case c.content:break;case c.padding:ye=Ce*a(z,oe,"padding",he);break;case c.border:ge=Ce*a(z,oe,"border",he);break;case c.margin:fe=Ce*a(z,oe,"margin",he)}if(ye||ge){const Te=(!1===ye?Ce*a(z,oe,"padding",he):ye)+(!1===ge?Ce*a(z,oe,"border",he):ge);xe=Ce*Math.max(0,Math.floor(z[ee]-de-Ce*Te))||0}return de+fe+ye+ge+xe}(z,he,ve)}if((0,P.kf)(ae)){const ve=y(z),le=T(he,ve),Ce="border-box"===ve.boxSizing;ae=Number(ae),de?ae-=Ce?0:le.border+le.padding:ue?ae+=Ce?le.border:-le.padding:Ce&&(ae+=le.border+le.padding)}return ae+=(0,P.kf)(ae)?"px":"",o.A.setStyle(z,he,ae),null}},te=z=>(0,P.l6)(z)?z:z.defaultView,pe=z=>{if(!z.getClientRects().length)return{top:0,left:0};const oe=z.getBoundingClientRect(),ae=te(z.ownerDocument),ee=z.ownerDocument.documentElement;return{top:oe.top+ae.pageYOffset-ee.clientTop,left:oe.left+ae.pageXOffset-ee.clientLeft}}},4129:(In,Ze,M)=>{"use strict";M.d(Ze,{s:()=>P});const o=(0,M(6110).zk)(),P=function(){let b;try{b=o.sessionStorage}catch{}return b}},9495:(In,Ze,M)=>{"use strict";M.d(Ze,{GP:()=>f,Im:()=>S,o4:()=>o,oN:()=>b});var W=M(1830);const o=function(){const T=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(y){return String(y).replace(T[0],"&amp;").replace(T[1],"&quot;").replace(T[2],"&#39;").replace(T[3],"&lt;").replace(T[4],"&gt;")}}(),b=function(T){const y=function(T){switch(typeof T){case"string":return T.split(/\s+/,4);case"object":return[T.x||T.h||T.left,T.y||T.v||T.top,T.x||T.h||T.right,T.y||T.v||T.bottom];case"number":return[T];default:return T}}(T);let d=parseInt(y&&y[0],10),c=parseInt(y&&y[1],10),s=parseInt(y&&y[2],10),a=parseInt(y&&y[3],10);return isFinite(d)||(d=0),isFinite(c)||(c=d),isFinite(s)||(s=d),isFinite(a)||(a=c),{top:c,right:s,bottom:a,left:d}};function f(T){for(var y=arguments.length,d=new Array(y>1?y-1:0),c=1;c<y;c++)d[c-1]=arguments[c];return(0,W.Tn)(T)?T(...d):(d.forEach((s,a)=>{(0,W.Kg)(s)&&(s=s.replace(/\$/g,"$$$$"));const u=new RegExp("\\{"+a+"\\}","gm");T=T.replace(u,s)}),T)}const S=function(){const T=/\s/g;return function(y){return!y||!y.replace(T,"")}}()},8649:(In,Ze,M)=>{"use strict";M.d(Ze,{CC:()=>u,Rb:()=>c,eC:()=>x,jA:()=>d,k$:()=>_,zj:()=>g});var W=M(6946),o=M(4356),P=M(1830),b=M(6054);const f=["","Webkit","Moz","O","Ms"],S={"":"",Webkit:"-webkit-",Moz:"-moz-",O:"-o-",ms:"-ms-"},T=(0,o.A)(function(){return b.A.createElement("dx").style}),d=function(w){if(w in T())return w;const D=w;w=w.charAt(0).toUpperCase()+w.substr(1);for(let C=1;C<f.length;C++){const I=f[C].toLowerCase()+w;if(I in T())return I}return D},c=function(w){return function(w,D){let C;w=(0,W.PT)(w,!0);for(let I=0,L=f.length;I<L;I++){const N=f[I],G=N+w;if(C=D((0,W.PT)(G),N),void 0===C&&(C=D(G,N)),void 0!==C)break}return C||""}(w,function(D,C){if(D in T())return S[C]})},s=["fillOpacity","columnCount","flexGrow","flexShrink","fontWeight","lineHeight","opacity","zIndex","zoom"],u=function(w,D){return(0,P.kf)(D)&&-1===s.indexOf(w)&&(D+="px"),D},h=function(w,D,C){if(w){C=(0,P.kf)(C)?C+="px":C;for(let I=0;I<w.length;++I)w[I].style[D]=C}},g=function(w,D){h(w,"width",D)},_=function(w,D){h(w,"height",D)},x=function(w,D){(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&[].slice.call(w.style).forEach(L=>{w.style.removeProperty(L)}),D.split(";").forEach(I=>{const L=I.split(":").map(N=>N.trim());if(2===L.length){const[N,G]=L;w.style[N]=G}})}},7007:(In,Ze,M)=>{"use strict";M.r(Ze),M.d(Ze,{animation:()=>D,inputType:()=>c,nativeScrolling:()=>C,pointerEvents:()=>h,styleProp:()=>f.jA,stylePropPrefix:()=>f.Rb,supportProp:()=>y,touch:()=>_,touchEvents:()=>u,transition:()=>x,transitionEndEventName:()=>w});var W=M(6054),o=M(4356),P=M(6110),b=M(5973),f=M(8649);const{maxTouchPoints:S}=(0,P.w3)(),T={webkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},y=function(I){return!!(0,f.jA)(I)},c=function(I){if("text"===I)return!0;const L=W.A.createElement("input");try{return L.setAttribute("type",I),L.value="wrongValue",!L.value}catch{return!1}},u=(L=S,((I=P.i5)("ontouchstart")||!!L)&&!I("callPhantom")),h=function(I){return I("PointerEvent")}(P.i5),_=u||h&&!!S,x=(0,o.A)(function(){return y("transition")}),w=(0,o.A)(function(){return T[(0,f.jA)("transition")]}),D=(0,o.A)(function(){return y("animation")}),C=function(){const{platform:I,mac:L}=b.A.real();return"ios"===I||"android"===I||L}();var I,L},4162:(In,Ze,M)=>{"use strict";M.d(Ze,{Xl:()=>ie,SN:()=>K,zD:()=>I,jJ:()=>k,pK:()=>L,AY:()=>B,I3:()=>U});var W=M(5737),o=M(3686),P=M(5973),b=M(9522),f=M(7251),S=M(5704),T=M(7591),y=M(8412),d=M(6776),c=M(1832),s=M(1830);const a={};let u;function _(){return u}(function h(re,q){a[re]=q})("default",{compile:re=>(0,c.ki)(re),render:(re,q,Y)=>re.clone()}),function g(re){if((0,s.Kg)(re)){if(u=a[re],!u)throw f.A.Error("E0020",re)}else u=re}("default");class x extends d.o{constructor(q){super(),this._element=q}_renderCore(q){const Y=q.transclude;return!Y&&!this._compiledTemplate&&(this._compiledTemplate=_().compile(this._element)),(0,S.A)("<div>").append(Y?this._element:_().render(this._compiledTemplate,q.model,q.index)).contents()}source(){return(0,S.A)(this._element).clone()}}var w=M(5345),D=M(4859),C=M(3090);const I=(re,q)=>{const Y=(0,S.A)(re).contents().filter(`[data-options*="${q}"]`);return[].slice.call(Y).map(Z=>{const Q=(0,S.A)(Z).attr("data-options")||"";return{element:Z,options:(0,o.A)().optionsParser(Q)[q]}}).filter(Z=>!!Z.options)},L=re=>{const q=(0,w.$z)(re,Z=>Z.options.name);if(q[void 0])throw f.A.Error("E0023");const Y={};return Object.keys(q).forEach(Z=>{var Q;const te=null===(Q=(0,D.hm)(P.A.current(),q[Z],pe=>pe.options)[0])||void 0===Q?void 0:Q.element;te&&(Y[Z]=te)}),Y},N=re=>{const q=re.render.bind(re);return(0,C.X)({},re,{render(Y){const Z=q(Y);return Y&&Y.onRendered&&Y.onRendered(),Z}})},k=re=>{const q=[];return"model"in re&&q.push(re.model),"index"in re&&q.push(re.index),q.push(re.container),q},U=re=>"string"==typeof re?(0,c.ki)(re):re,B=re=>(0,s.Kb)(re)&&re[0]||re,K=re=>new x(re),ie=(re,q,Y,Z,Q,te)=>null==re?new y.A:re instanceof T.M?te[re.name]:re instanceof d.o?re:(0,s.Tn)(re.render)&&!(0,s.Kb)(re)?Z?re:N(re):re.nodeType||(0,s.Kb)(re)?q((0,S.A)(re)):((re,q,Y,Z)=>{let Q=null;return(!Z||-1===Z.indexOf(re))&&(Q=q[re],Q&&!(Q instanceof d.o)&&((0,s.Tn)(Q.render)&&(Q=(re=>{const q=re.render.bind(re);return(0,C.X)({},re,{render(Y){const Z=(0,S.A)(Y.container);return q((0,W.A)({},Y,{container:(0,b.cc)(Z)}))}})})(Q)),Y||(Q=N(Q)))),Q})(re,Y,Z,Q)||te[re]||q(re)},1830:(In,Ze,M)=>{"use strict";M.d(Ze,{$P:()=>f,Gv:()=>c,Kb:()=>g,Kg:()=>y,Lm:()=>P,NW:()=>o,O4:()=>b,O9:()=>S,Qd:()=>a,RI:()=>s,Tn:()=>T,kf:()=>d,l6:()=>h,sO:()=>u,uF:()=>x,xH:()=>w,yL:()=>_});const W={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string"},o=function(D){if(null===D)return"null";const C=Object.prototype.toString.call(D);return"object"==typeof D?W[C]||"object":typeof D},P=function(D){return"boolean"==typeof D},b=function(D){return d(D)&&-1!==D.toString().indexOf("e")},f=function(D){return"date"===o(D)},S=function(D){return null!=D},T=function(D){return"function"==typeof D},y=function(D){return"string"==typeof D},d=function(D){return"number"==typeof D&&isFinite(D)||!isNaN(D-parseFloat(D))},c=function(D){return"object"===o(D)},s=function(D){let C;for(C in D)return!1;return!0},a=function(D){if(!D||"object"!==o(D))return!1;const C=Object.getPrototypeOf(D);if(!C)return!0;const I=Object.hasOwnProperty.call(C,"constructor")&&C.constructor;return"function"==typeof I&&Object.toString.call(I)===Object.toString.call(Object)},u=function(D){return-1===["object","array","function"].indexOf(o(D))},h=function(D){return null!=D&&D===D.window},g=function(D){return!(!D||!D.jquery&&!D.dxRenderer)},_=function(D){return!!D&&T(D.then)},x=function(D){return!!D&&T(D.done)&&T(D.fail)},w=function(D){return!(!D||!D.preventDefault)}},6234:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});var W=M(8181);const P=(0,M(1926).A)({isWrapped:function(){return!1},isWritableWrapped:function(){return!1},wrap:function(b){return b},unwrap:function(b){return b},assign:function(){W.v.error("Method 'assign' should not be used for not wrapped variables. Use 'isWrapped' method for ensuring.")}})},6548:(In,Ze,M)=>{"use strict";function W(o,P,b){function f(T){return"string"==typeof T?T.split("."):"number"==typeof T?[T]:T}o=f(o),P=f(P);let S=Math.max(o.length,P.length);isFinite(b)&&(S=Math.min(S,b));for(let T=0;T<S;T++){const y=parseInt(o[T]||0,10),d=parseInt(P[T]||0,10);if(y<d)return-1;if(y>d)return 1}return 0}M.d(Ze,{U:()=>W})},4017:(In,Ze,M)=>{"use strict";M.d(Ze,{Uq:()=>T,WV:()=>f,s$:()=>y});var W=M(5704),o=M(2720),P=M(8684);const b=o.A.add,f=(0,P.A)();let S=(0,W.A)();const T=function(){let d;return function(c){if(!arguments.length)return d;const s=(0,W.A)(c);S=s;const a=!!s.length,u=T();d=a?s:(0,W.A)("body"),f.fire(a?T():(0,W.A)(),u)}}();function y(){return S}b(function(){T(".dx-viewport")})},6110:(In,Ze,M)=>{"use strict";M.d(Ze,{Vd:()=>P,i5:()=>T,ne:()=>d,w3:()=>c,zY:()=>y,zk:()=>f});var W=M(6054);let o=typeof window<"u";const P=()=>o;let b=P()?window:void 0;b||(b={},b.window=b);const f=()=>b,T=s=>P()&&s in b,y=s=>s<768?"xs":s<992?"sm":s<1200?"md":"lg",d=s=>(s||y)(W.A.getDocumentElement().clientWidth),c=()=>P()?b.navigator:{userAgent:""}},9274:(In,Ze,M)=>{"use strict";M.d(Ze,{o:()=>o,r:()=>W});const W="24.1.4",o="24.1.4"},6569:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>_});var W=M(5737),o=M(3538),P=M(6101),b=M(2660),f=M(2614),S=M(9916),T=M(4270),y=M(1435),d=M(6021),c=M(4859),s=M(1830);const a=o.A.abstract,u=y.A.queryByOptions,h={},g=o.A.inherit({_langParams:{},ctor:function(x){const w=this;x=x||{},this._eventsStrategy=new P.h(this),(0,b.__)(["onLoaded","onLoading","onInserted","onInserting","onUpdated","onUpdating","onPush","onRemoved","onRemoving","onModified","onModifying"],function(D,C){C in x&&w.on(C.slice(2).toLowerCase(),x[C])}),this._key=x.key,this._errorHandler=x.errorHandler,this._useDefaultSearch=!0},_clearCache:c.lQ,_customLoadOptions:function(){return null},key:function(){return this._key},keyOf:function(x){return this._keyGetter||(this._keyGetter=(0,T.Hz)(this.key())),this._keyGetter(x)},_requireKey:function(){if(!this.key())throw f.sO.Error("E4005")},load:function(x){const w=this;return this._eventsStrategy.fireEvent("loading",[x=x||{}]),this._withLock(this._loadImpl(x)).done(function(D){w._eventsStrategy.fireEvent("loaded",[D,x])})},_loadImpl:function(x){return(0,s.RI)(this._langParams)||((x=x||{})._langParams=(0,W.A)({},this._langParams,x._langParams)),u(this.createQuery(x),x).enumerate()},_withLock:function(x){const w=new d.cY;return x.done(function(){const D=this,C=arguments;S.D9.promise().done(function(){w.resolveWith(D,C)})}).fail(function(){w.rejectWith(this,arguments)}),w},createQuery:a,totalCount:function(x){return this._totalCountImpl(x)},_totalCountImpl:function(x){return u(this.createQuery(x),x,!0).count()},byKey:function(x,w){return this._addFailHandlers(this._withLock(this._byKeyImpl(x,w)))},_byKeyImpl:a,insert:function(x){const w=this;return w._eventsStrategy.fireEvent("modifying"),w._eventsStrategy.fireEvent("inserting",[x]),w._addFailHandlers(w._insertImpl(x).done(function(D,C){w._eventsStrategy.fireEvent("inserted",[D,C]),w._eventsStrategy.fireEvent("modified")}))},_insertImpl:a,update:function(x,w){const D=this;return D._eventsStrategy.fireEvent("modifying"),D._eventsStrategy.fireEvent("updating",[x,w]),D._addFailHandlers(D._updateImpl(x,w).done(function(){D._eventsStrategy.fireEvent("updated",[x,w]),D._eventsStrategy.fireEvent("modified")}))},_updateImpl:a,push:function(x){const w={changes:x,waitFor:[]};this._eventsStrategy.fireEvent("beforePushAggregation",[w]),(0,d.z7)(...w.waitFor).done(()=>{this._pushImpl(x),this._eventsStrategy.fireEvent("beforePush",[{changes:x}]),this._eventsStrategy.fireEvent("push",[x])})},_pushImpl:c.lQ,remove:function(x){const w=this;return w._eventsStrategy.fireEvent("modifying"),w._eventsStrategy.fireEvent("removing",[x]),w._addFailHandlers(w._removeImpl(x).done(function(D){w._eventsStrategy.fireEvent("removed",[D]),w._eventsStrategy.fireEvent("modified")}))},_removeImpl:a,_addFailHandlers:function(x){return x.fail(this._errorHandler).fail(f.H4)},on(x,w){return this._eventsStrategy.on(x,w),this},off(x,w){return this._eventsStrategy.off(x,w),this}});g.create=function(x,w){if(!(x in h))throw f.sO.Error("E4020",x);return new h[x](w)},g.registerClass=function(x,w){return w&&(h[w]=x),x},g.inherit=function(x){return function(w,D){const C=x.apply(this,[w]);return g.registerClass(C,D),C}}(g.inherit);const _=g},2735:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>C});var W=M(3538),o=M(1830),P=M(2660),b=M(4270),f=M(6021),S=M(2614),T=M(9916);const y=W.A.inherit({toArray:function(){const I=[];for(this.reset();this.next();)I.push(this.current());return I},countable:function(){return!1}}),d=y.inherit({ctor:function(I){this.array=I,this.index=-1},next:function(){return this.index+1<this.array.length&&(this.index++,!0)},current:function(){return this.array[this.index]},reset:function(){this.index=-1},toArray:function(){return this.array.slice(0)},countable:function(){return!0},count:function(){return this.array.length}}),c=y.inherit({ctor:function(I){this.iter=I},next:function(){return this.iter.next()},current:function(){return this.iter.current()},reset:function(){return this.iter.reset()}}),s=c.inherit({ctor:function(I,L){this.callBase(I),this.index=-1,this.mapper=L},current:function(){return this.mapper(this.callBase(),this.index)},next:function(){const I=this.callBase();return I&&this.index++,I}}),u=y.inherit({ctor:function(I,L,N,G){this.langParams=I.langParams,I instanceof s||((I=new s(I,this._wrap)).langParams=this.langParams),this.iter=I,this.rules=[{getter:L,desc:N,compare:G,langParams:this.langParams}]},thenBy:function(I,L,N){const G=new u(this.sortedIter||this.iter,I,L,N);return this.sortedIter||(G.rules=this.rules.concat(G.rules)),G},next:function(){return this._ensureSorted(),this.sortedIter.next()},current:function(){return this._ensureSorted(),this.sortedIter.current()},reset:function(){delete this.sortedIter},countable:function(){return this.sortedIter||this.iter.countable()},count:function(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted:function(){const I=this;I.sortedIter||((0,P.__)(I.rules,function(){this.getter=(0,b.Hz)(this.getter)}),I.sortedIter=new s(new d(this.iter.toArray().sort(function(L,N){return I._compare(L,N)})),I._unwrap))},_wrap:function(I,L){return{index:L,value:I}},_unwrap:function(I){return I.value},_getDefaultCompare:I=>(L,N)=>function(I,L,N){return(0,o.Kg)(I)&&(0,o.Kg)(L)&&(null!=N&&N.locale||null!=N&&N.collatorOptions)?new Intl.Collator(N?.locale||void 0,N?.collatorOptions||void 0).compare(I,L):(I=(0,b.ao)(I,!1,N),L=(0,b.ao)(L,!1,N),null===I&&null!==L?-1:null!==I&&null===L||void 0===I&&void 0!==L?1:void 0!==I&&void 0===L||I<L?-1:I>L?1:0)}(L,N,I),_compare:function(I,L){const N=I.index,G=L.index;if((I=I.value)===(L=L.value))return N-G;for(let k=0,U=this.rules.length;k<U;k++){const B=this.rules[k],K=B.getter(I),J=B.getter(L),re=(B.compare||this._getDefaultCompare(B.langParams))(K,J);if(re)return B.desc?-re:re}return N-G}}),h=function(){let I={};const L=B=>(0,b.ao)(B,!1,I),G=function(B){var K;return(0,o.O9)(B)?null!==(K=I)&&void 0!==K&&K.locale?B.toLocaleString(I.locale):B.toString():""};function k(B,K,J){return function(ie){ie=L(B(ie));let re=U(K)?ie===K:ie==K;return J&&(re=!re),re}}function U(B){return""===B||0===B||!1===B}return function(B,K){return I=K||{},(0,o.Tn)(B)?B:(0,T.$A)(B)?function(B){if((0,T.Im)(B))return(re=>{const q=(0,b.Hz)(re[0][0]),Y=re.reduce((Z,Q,te)=>(te%2==0&&Z.push(L(Q[2])),Z),[]);return Z=>{const Q=L(q(Z));return Y.some(te=>U(te)?Q===te:Q==te)}})(B);const K=[];let J=!1,ie=!1;return(0,P.__)(B,function(){if(Array.isArray(this)||(0,o.Tn)(this)){if(K.length>1&&J!==ie)throw new S.sO.Error("E4019");K.push(h(this,I)),J=ie,ie=!0}else ie=(0,T.LO)(this)}),function(re){let q=J;for(let Y=0;Y<K.length;Y++)if(K[Y](re)!==J){q=!J;break}return q}}(B):(0,T.bF)(B)?function(J){const ie=J[0],re=h(J[1],I);if("!"===ie)return function(q){return!re(q)};throw S.sO.Error("E4003",ie)}(B):function(J){J=(0,T.aE)(J);const ie=(0,b.Hz)(J[0]),re=J[1];let q=J[2];q=L(q);const Y=(Z,Q)=>(Z=L(ie(Z)),(null!=q&&null!=Z||q===Z)&&Q(Z,q));switch(re.toLowerCase()){case"=":return k(ie,q);case"<>":return k(ie,q,!0);case">":return Z=>Y(Z,(Q,te)=>Q>te);case"<":return Z=>Y(Z,(Q,te)=>Q<te);case">=":return Z=>Y(Z,(Q,te)=>Q>=te);case"<=":return Z=>Y(Z,(Q,te)=>Q<=te);case"startswith":return function(Z){return 0===L(G(ie(Z))).indexOf(q)};case"endswith":return function(Z){const Q=L(G(ie(Z))),te=G(q);if(Q.length<te.length)return!1;const pe=Q.lastIndexOf(q);return-1!==pe&&pe===Q.length-q.length};case"contains":return function(Z){return L(G(ie(Z))).indexOf(q)>-1};case"notcontains":return function(Z){return-1===L(G(ie(Z))).indexOf(q)}}throw S.sO.Error("E4003",re)}(B)}}(),g=c.inherit({ctor:function(I,L){this.callBase(I),this.langParams=I.langParams,this.criteria=h(L,this.langParams)},next:function(){for(;this.iter.next();)if(this.criteria(this.current()))return!0;return!1}}),_=y.inherit({ctor:function(I,L){this.iter=I,this.getter=L},next:function(){return this._ensureGrouped(),this.groupedIter.next()},current:function(){return this._ensureGrouped(),this.groupedIter.current()},reset:function(){delete this.groupedIter},countable:function(){return!!this.groupedIter},count:function(){return this.groupedIter.count()},_ensureGrouped:function(){if(this.groupedIter)return;const I={},L=[],N=this.iter,G=(0,b.Hz)(this.getter);for(N.reset();N.next();){const k=N.current(),U=G(k);U in I?I[U].push(k):(I[U]=[k],L.push(U))}this.groupedIter=new d((0,P.Tj)(L,function(k){return{key:k,items:I[k]}}))}}),x=c.inherit({ctor:function(I,L){this.callBase(I),this.getter=(0,b.Hz)(L)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),w=c.inherit({ctor:function(I,L,N){this.callBase(I),this.skip=Math.max(0,L),this.take=Math.max(0,N),this.pos=0},next:function(){if(this.pos>=this.skip+this.take)return!1;for(;this.pos<this.skip&&this.iter.next();)this.pos++;return this.pos++,this.iter.next()},reset:function(){this.callBase(),this.pos=0},countable:function(){return this.iter.countable()},count:function(){return Math.min(this.iter.count()-this.skip,this.take)}}),D=function(I,L){L=L||{},I instanceof y||(I=new d(I)),L.langParams&&(I.langParams=L.langParams);const N=function(J){const ie=L.errorHandler;ie&&ie(J),(0,S.H4)(J)},G=function(J){const ie=(new f.cY).fail(N);let re;const q=J.step,Y=J.finalize;try{I.reset(),re="seed"in J?J.seed:I.next()?I.current():NaN;let Z=re;for(;I.next();)Z=q(Z,I.current());ie.resolve(Y?Y(Z):Z)}catch(Z){ie.reject(Z)}return ie.promise()},k=function(J){return G(T.zL[J])},U=function(J){return!(0,o.Tn)(J)&&!Array.isArray(J)&&(J=[].slice.call(arguments)),K(new x(I,J))},B=function(J){return U((0,b.Hz)(J))};function K(J){return D(J,L)}return{toArray:function(){return I.toArray()},enumerate:function(){const J=(new f.cY).fail(N);try{J.resolve(I.toArray())}catch(ie){J.reject(ie)}return J.promise()},setLangParams(J){I.langParams=J},sortBy:function(J,ie,re){return K(new u(I,J,ie,re))},thenBy:function(J,ie,re){if(I instanceof u)return K(I.thenBy(J,ie,re));throw S.sO.Error("E4004")},filter:function(J){return Array.isArray(J)||(J=[].slice.call(arguments)),K(new g(I,J))},slice:function(J,ie){return void 0===ie&&(ie=Number.MAX_VALUE),K(new w(I,J,ie))},select:U,groupBy:function(J){return K(new _(I,J))},aggregate:function(J,ie,re){return G(arguments.length<2?{step:arguments[0]}:{seed:J,step:ie,finalize:re})},count:function(){if(I.countable()){const J=(new f.cY).fail(N);try{J.resolve(I.count())}catch(ie){J.reject(ie)}return J.promise()}return k("count")},sum:function(J){return J?B(J).sum():k("sum")},min:function(J){return J?B(J).min():k("min")},max:function(J){return J?B(J).max():k("max")},avg:function(J){return J?B(J).avg():k("avg")}}},C=D},1614:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(9916),o=M(1541),P=M(2614),b=M(6569),f=M(2946);const T=b.A.inherit({ctor:function(y){y=Array.isArray(y)?{data:y}:y||{},this.callBase(y);const d=y.data;if(d&&!Array.isArray(d))throw P.sO.Error("E4006");this._array=d||[]},createQuery:function(){return(0,o.A)(this._array,{errorHandler:this._errorHandler})},_byKeyImpl:function(y){const d=(0,f.Xb)(this,this._array,y);return-1===d?(0,W.OE)(P.sO.Error("E4009")):(0,W.DO)(this._array[d])},_insertImpl:function(y){return(0,f.Yr)(this,this._array,y)},_pushImpl:function(y){(0,f.VK)({keyInfo:this,data:this._array,changes:y})},_updateImpl:function(y,d){return(0,f.yo)(this,this._array,y,d)},_removeImpl:function(y){return(0,f.TF)(this,this._array,y)},clear:function(){this._eventsStrategy.fireEvent("modifying"),this._array=[],this._eventsStrategy.fireEvent("modified")}},"array")},2946:(In,Ze,M)=>{"use strict";M.d(Ze,{TF:()=>G,VK:()=>D,Xb:()=>k,Yr:()=>N,lj:()=>w,yo:()=>L});var W=M(5737),o=M(1830),P=M(3686),b=M(2925),f=M(3090),S=M(2614),T=M(6509),d=(M(4270),M(9916));function s(U,B,K,J){let ie,re;if(J){for(let q=0;q<B.length;q++)if(ie=B[q].items||B[q].collapsedItems||[],re=s(U,ie||[],K,J-1),re)return re}else if(k(U,B,K)>=0)return B}function a(U,B,K,J){return J?s(U,B,K,J)||[]:B}function _(U,B,K){U._dataByKeyMap&&(U._dataByKeyMap[JSON.stringify(B)]=K,U._dataByKeyMapLength+=K?1:-1)}function x(U,B,K){K=K||new WeakMap;const J=U?Object.create(Object.getPrototypeOf(U)):{};U&&K.set(U,J);const ie=(0,W.A)({},U);(0,T.tm)(J,ie,!0,!0);for(const re in ie){const q=ie[re],Y=B?.[re];(0,o.Gv)(q)&&!(0,o.Qd)(q)&&(0,o.Gv)(Y)&&!K.has(q)&&(J[re]=x(q,Y,K))}for(const re in J){const q=J[re];(0,o.Gv)(q)&&K.has(q)&&(J[re]=K.get(q))}return J}function w(U,B){const K=x(U,B);return(0,T.tm)(K,B,!0,!0)}function D(U){let{keyInfo:B,data:K,changes:J,groupCount:ie,useInsertIndex:re,immutable:q,disableCache:Y,logError:Z,skipCopying:Q}=U;const te=!0===q?[...K]:K;return J.forEach(pe=>{const z="insert"===pe.type?te:a(B,te,pe.key,ie);switch(!Y&&function u(U,B){if(U.key()&&(!B._dataByKeyMap||B._dataByKeyMapLength!==B.length)){const K={},J=B.length;for(let ie=0;ie<J;ie++)K[JSON.stringify(U.keyOf(B[ie]))]=B[ie];B._dataByKeyMap=K,B._dataByKeyMapLength=J}}(B,z),pe.type){case"update":L(B,z,pe.key,pe.data,!0,q,Z);break;case"insert":N(B,z,pe.data,re&&(0,o.O9)(pe.index)?pe.index:-1,!0,Z,Q);break;case"remove":G(B,z,pe.key,!0,Z)}}),te}function C(U,B,K){return U?B&&S.sO.log(K):(0,d.OE)(S.sO.Error(K))}function L(U,B,K,J,ie,re,q){let Y;const Z=U.key();if(Z){if(function c(U,B){let K;const J="string"==typeof B?B.split():B.slice();for(;J.length;)if(K=J.shift(),K in U)return!0;return!1}(J,Z)&&!(0,d.t7)(Z,K,U.keyOf(J)))return C(ie,q,"E4017");if(Y=function h(U,B){if(U._dataByKeyMap)return U._dataByKeyMap[JSON.stringify(B)]}(B,K),!Y){const Q=k(U,B,K);if(Q<0)return C(ie,q,"E4009");if(Y=B[Q],!0===re&&(0,o.O9)(Y)){const te=w(Y,J);return B[Q]=te,!ie&&(0,d.DO)(te,K)}}}else Y=K;if((0,T.tm)(Y,J,!0),!ie)return(0,P.A)().useLegacyStoreResult?(0,d.DO)(K,J):(0,d.DO)(Y,K)}function N(U,B,K,J,ie,re,q){let Y;const Z=U.key(),Q=(0,o.Qd)(K)&&!q?(0,f.X)({},K):K;if(Z){if(Y=U.keyOf(Q),void 0===Y||"object"==typeof Y&&(0,o.RI)(Y)){if(Array.isArray(Z))throw S.sO.Error("E4007");Y=Q[Z]=String(new b.A)}else if(void 0!==B[k(U,B,Y)])return C(ie,re,"E4008")}else Y=Q;if(J>=0?B.splice(J,0,Q):B.push(Q),_(B,Y,Q),!ie)return(0,d.DO)((0,P.A)().useLegacyStoreResult?K:Q,Y)}function G(U,B,K,J,ie){const re=k(U,B,K);return re>-1&&(B.splice(re,1),_(B,K,null)),J?re<0?C(J,ie,"E4009"):void 0:(0,d.DO)(K)}function k(U,B,K){const J=U.key();if(!function g(U,B){return!U._dataByKeyMap||U._dataByKeyMap[JSON.stringify(B)]}(B,K))return-1;for(let ie=0,re=B.length;ie<re;ie++)if((0,d.t7)(J,U.keyOf(B[ie]),K))return ie;return-1}},2440:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>J});var W=M(5704),o=M(9916),P=M(2946),b=M(1830),f=M(3686),S=M(2614),T=M(6569),y=M(2735),d=M(1435),c=M(6021);const s="totalCount",a="load",u="byKey",h="insert",g="update",_="remove";function x(ie){return ie&&(0,b.Tn)(ie.then)}function w(ie){return(new c.cY).resolve(ie).promise()}function D(ie,re){if(!(0,b.Tn)(re))throw S.sO.Error("E4011",ie)}function C(ie){throw S.sO.Error("E4012",ie)}function I(ie){return function(re){let q;q=re instanceof Error?re:new Error(function(Y){const Z=Y[0];return Z&&Z.getResponseHeader?(0,o.m9)(Z,Y[1]):null}(arguments)||re&&String(re)||"Unknown error"),q.message!==o.SR&&ie.reject(q)}}function L(ie,re){const q=ie._loadFunc;let Y;return D(a,q),Y=q.apply(ie,[re]),Array.isArray(Y)?Y=w(Y):null==Y?Y=w([]):x(Y)||C(a),(0,c.Sx)(Y)}function k(ie,re,q,Y){if(re.__rawData)Y(re.__rawData);else{const Z=re.__rawDataPromise||L(re,q);re._cacheRawData&&(re.__rawDataPromise=Z),Z.always(function(){delete re.__rawDataPromise}).done(function(Q){re._cacheRawData&&(re.__rawData=Q),Y(Q)}).fail(Q=>{var te;const pe=I(ie);null===(te=re._errorHandler)||void 0===te||te.call(re,Q),pe(Q)})}}function U(ie,re,q,Y){const Z={};"userData"in(q=q||{})&&(Z.userData=q.userData),k(ie,re,Z,function(Q){const te=(0,y.A)(Q,{errorHandler:re._errorHandler});let pe,z;const oe=[];let ae,ee;Y||(pe=d.A.queryByOptions(te,q),pe===te?ae=Q.slice(0):oe.push(pe.enumerate().done(function(he){ae=he}))),(q.requireTotalCount||Y)&&(z=d.A.queryByOptions(te,q,!0),z===te?ee=Q.length:oe.push(z.count().done(function(he){ee=he}))),c.z7.apply(W.A,oe).done(function(){Y?ie.resolve(ee):q.requireTotalCount?ie.resolve(ae,{totalCount:ee}):ie.resolve(ae)}).fail(function(he){ie.reject(he)})})}const J=T.A.inherit({ctor:function(ie){this.callBase(ie=ie||{}),this._useDefaultSearch=!!ie.useDefaultSearch||"raw"===ie.loadMode,this._loadMode=ie.loadMode,this._cacheRawData=!1!==ie.cacheRawData,this._loadFunc=ie[a],this._totalCountFunc=ie[s],this._byKeyFunc=ie[u],this._insertFunc=ie[h],this._updateFunc=ie[g],this._removeFunc=ie[_]},_clearCache(){delete this.__rawData},createQuery:function(){throw S.sO.Error("E4010")},clearRawDataCache:function(){this._clearCache()},_totalCountImpl:function(ie){let re=new c.cY;return"raw"!==this._loadMode||this._totalCountFunc?(function N(ie,re){const q=ie._totalCountFunc;let Y;if(!(0,b.Tn)(q))throw S.sO.Error("E4021");return Y=q.apply(ie,[re]),x(Y)||(Y=Number(Y),isFinite(Y)||C(s),Y=w(Y)),(0,c.Sx)(Y)}(this,ie).done(function(q){re.resolve(Number(q))}).fail(I(re)),re=this._addFailHandlers(re)):U(re,this,ie,!0),re.promise()},_pushImpl:function(ie){this.__rawData&&(0,P.VK)({keyInfo:this,data:this.__rawData,changes:ie})},_loadImpl:function(ie){let re=new c.cY;return"raw"===this._loadMode?U(re,this,ie,!1):(L(this,ie).done(function(q,Y){re.resolve(q,Y)}).fail(I(re)),re=this._addFailHandlers(re)),re.promise()},_byKeyImpl:function(ie,re){const q=new c.cY;return this._byKeyViaLoad()?(this._requireKey(),function B(ie,re,q){k(ie,re,{},function(Y){const Z=re.key();let Q;for(let te=0,pe=Y.length;te<pe;te++)if(Q=Y[te],(0,o.t7)(Z,re.keyOf(Y[te]),q))return void ie.resolve(Q);ie.reject(S.sO.Error("E4009"))})}(q,this,ie)):function G(ie,re,q){const Y=ie._byKeyFunc;let Z;return D(u,Y),Z=Y.apply(ie,[re,q]),x(Z)||(Z=w(Z)),(0,c.Sx)(Z)}(this,ie,re).done(function(Y){q.resolve(Y)}).fail(I(q)),q.promise()},_byKeyViaLoad:function(){return"raw"===this._loadMode&&!this._byKeyFunc},_insertImpl:function(ie){const re=this,q=re._insertFunc;let Y;const Z=new c.cY;return D(h,q),Y=q.apply(re,[ie]),x(Y)||(Y=w(Y)),(0,c.Sx)(Y).done(function(Q){(0,f.A)().useLegacyStoreResult?Z.resolve(ie,Q):Z.resolve(Q||ie,re.keyOf(Q))}).fail(I(Z)),Z.promise()},_updateImpl:function(ie,re){const q=this._updateFunc;let Y;const Z=new c.cY;return D(g,q),Y=q.apply(this,[ie,re]),x(Y)||(Y=w(Y)),(0,c.Sx)(Y).done(function(Q){(0,f.A)().useLegacyStoreResult?Z.resolve(ie,re):Z.resolve(Q||re,ie)}).fail(I(Z)),Z.promise()},_removeImpl:function(ie){const re=this._removeFunc;let q;const Y=new c.cY;return D(_,re),q=re.apply(this,[ie]),x(q)||(q=w()),(0,c.Sx)(q).done(function(){Y.resolve(ie)}).fail(I(Y)),Y.promise()}})},6285:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(1221).q},1221:(In,Ze,M)=>{"use strict";M.d(Ze,{q:()=>w});var W=M(5737),o=M(3538),P=M(3090),b=M(4859),f=M(2660),S=M(1830),T=M(9916),y=M(2946),d=M(2440),c=M(6101),s=M(2614),a=M(7251),u=M(6021);function h(D){let C=[],I=!1;function L(){for(;C.length;){I=!0;const G=C.shift()();if(void 0!==G){if(G.then)return void(0,u.z7)(G).always(L);throw a.A.Error("E0015")}}I=!1}return{add:function(N,G){D?(C[0]&&G&&G(C[0]),C=[N]):C.push(N),I||L()},busy:function(){return I}}}h();var _=M(5335);class x{constructor(){this._counter=-1,this._deferreds={}}add(C){return this._counter++,this._deferreds[this._counter]=C,this._counter}remove(C){return delete this._deferreds[C]}cancel(C){return C in this._deferreds&&(this._deferreds[C].reject(_.uK),!0)}cancelAll(){for(;this._counter>-1;)this.cancel(this._counter),this._counter--}}const w=o.A.inherit({ctor(D){if(D=(0,_.ho)(D),this._eventsStrategy=new c.h(this,{syncStrategy:!0}),this._store=D.store,this._changedTime=0,0!==D.pushAggregationTimeout){let L,N;const G=(0,T.oK)(k=>{L.resolve(),(0,u.z7)(...N).done(()=>this._onPush(k)),N=void 0,L=void 0},void 0===D.pushAggregationTimeout?()=>5*this._changedTime:D.pushAggregationTimeout);this._onPushHandler=k=>{this._aggregationTimeoutId=G(k.changes),L||(L=new u.cY),N=k.waitFor,k.waitFor.push(L.promise())},this._store.on("beforePushAggregation",this._onPushHandler)}else this._onPushHandler=I=>this._onPush(I),this._store.on("push",this._onPushHandler);this._storeLoadOptions=this._extractLoadOptions(D),this._mapFunc=D.map,this._postProcessFunc=D.postProcess,this._pageIndex=void 0!==D.pageIndex?D.pageIndex:0,this._pageSize=void 0!==D.pageSize?D.pageSize:20,this._loadingCount=0,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in D?D.searchValue:null,this._searchOperation=D.searchOperation||"contains",this._searchExpr=D.searchExpr,this._paginate=D.paginate,this._reshapeOnPush=D.reshapeOnPush??!1,(0,f.__)(["onChanged","onLoadError","onLoadingChanged","onCustomizeLoadResult","onCustomizeStoreLoadOptions"],(I,L)=>{L in D&&this.on(L.substr(2,1).toLowerCase()+L.substr(3),D[L])}),this._operationManager=new x,this._init()},_init(){this._items=[],this._userData={},this._totalCount=-1,this._isLoaded=!1,(0,S.O9)(this._paginate)||(this._paginate=!this.group()),this._isLastPage=!this._paginate},dispose(){var D;this._store.off("beforePushAggregation",this._onPushHandler),this._store.off("push",this._onPushHandler),this._eventsStrategy.dispose(),clearTimeout(this._aggregationTimeoutId),null===(D=this._delayedLoadTask)||void 0===D||D.abort(),this._operationManager.cancelAll(),delete this._store,delete this._items,delete this._delayedLoadTask,this._disposed=!0},_extractLoadOptions(D){const C={};let I=["sort","filter","langParams","select","group","requireTotalCount"];const L=this._store._customLoadOptions();return L&&(I=I.concat(L)),(0,f.__)(I,function(){C[this]=D[this]}),C},loadOptions(){return this._storeLoadOptions},items(){return this._items},pageIndex(D){if(!(0,S.kf)(D))return this._pageIndex;this._pageIndex=D,this._isLastPage=!this._paginate},paginate(D){if(!(0,S.Lm)(D))return this._paginate;this._paginate!==D&&(this._paginate=D,this.pageIndex(0))},pageSize(D){if(!(0,S.kf)(D))return this._pageSize;this._pageSize=D},isLastPage(){return this._isLastPage},generateStoreLoadOptionAccessor(D){return C=>{const I=(0,_.Rc)(C);if(void 0===I)return this._storeLoadOptions[D];this._storeLoadOptions[D]=I}},sort(){for(var D=arguments.length,C=new Array(D),I=0;I<D;I++)C[I]=arguments[I];return this.generateStoreLoadOptionAccessor("sort")(C)},filter(){const D=(0,_.Rc)(arguments);if(void 0===D)return this._storeLoadOptions.filter;this._storeLoadOptions.filter=D,this.pageIndex(0)},group(){for(var D=arguments.length,C=new Array(D),I=0;I<D;I++)C[I]=arguments[I];return this.generateStoreLoadOptionAccessor("group")(C)},select(){for(var D=arguments.length,C=new Array(D),I=0;I<D;I++)C[I]=arguments[I];return this.generateStoreLoadOptionAccessor("select")(C)},requireTotalCount(D){if(!(0,S.Lm)(D))return this._storeLoadOptions.requireTotalCount;this._storeLoadOptions.requireTotalCount=D},searchValue(D){if(arguments.length<1)return this._searchValue;this._searchValue=D,this.pageIndex(0)},searchOperation(D){if(!(0,S.Kg)(D))return this._searchOperation;this._searchOperation=D,this.pageIndex(0)},searchExpr(D){const C=arguments.length;if(0===C)return this._searchExpr;C>1&&(D=[].slice.call(arguments)),this._searchExpr=D,this.pageIndex(0)},store(){return this._store},key(){var D;return null===(D=this._store)||void 0===D?void 0:D.key()},totalCount(){return this._totalCount},isLoaded(){return this._isLoaded},isLoading(){return this._loadingCount>0},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_createLoadQueue:()=>h(),_changeLoadingCount(D){const C=this.isLoading();this._loadingCount+=D;const I=this.isLoading();C^I&&this._eventsStrategy.fireEvent("loadingChanged",[I])},_scheduleLoadCallbacks(D){this.beginLoading(),D.always(()=>{this.endLoading()})},_scheduleFailCallbacks(D){var C=this;D.fail(function(){for(var I=arguments.length,L=new Array(I),N=0;N<I;N++)L[N]=arguments[N];L[0]!==_.uK&&C._eventsStrategy.fireEvent("loadError",L)})},_fireChanged(D){const C=new Date;this._eventsStrategy.fireEvent("changed",D),this._changedTime=new Date-C},_scheduleChangedCallbacks(D){D.done(()=>this._fireChanged())},loadSingle(D,C){const I=new u.cY,L=this.key(),N=this._store,G=this._createStoreLoadOptions();return this._scheduleFailCallbacks(I),arguments.length<2&&(C=D,D=L),delete G.skip,delete G.group,delete G.refresh,delete G.pageIndex,delete G.searchString,(D===L||N instanceof d.A&&!N._byKeyViaLoad()?N.byKey(C,G):(G.take=1,G.filter=G.filter?[G.filter,[D,C]]:[D,C],N.load(G))).fail(I.reject).done(k=>{const U=Array.isArray(k)&&!k.length;!(0,S.O9)(k)||U?I.reject(new s.sO.Error("E4009")):(Array.isArray(k)||(k=[k]),I.resolve(this._applyMapFunction(k)[0]))}),I.promise()},load(){const D=new u.cY,C=()=>{if(!this._disposed&&(0,_.mm)(D))return this._loadFromStore(I,D)};this._scheduleLoadCallbacks(D),this._scheduleFailCallbacks(D),this._scheduleChangedCallbacks(D);const I=this._createLoadOperation(D);return this._eventsStrategy.fireEvent("customizeStoreLoadOptions",[I]),this._loadQueue.add(()=>("number"==typeof I.delay?this._delayedLoadTask=(0,b.uG)(C,I.delay):C(),D.promise())),D.promise({operationId:I.operationId})},_onPush(D){if(this._reshapeOnPush)this.load();else{const C={changes:D};this._eventsStrategy.fireEvent("changing",[C]);const I=this.group(),L=this.items();let N=0,G=this.paginate()||I?D.filter(k=>"update"===k.type):D;I&&(N=Array.isArray(I)?I.length:1),this._mapFunc&&G.forEach(k=>{"insert"===k.type&&(k.data=this._mapFunc(k.data))}),C.postProcessChanges&&(G=C.postProcessChanges(G)),(0,y.VK)({keyInfo:this.store(),data:L,changes:G,groupCount:N,useInsertIndex:!0}),this._fireChanged([{changes:D}])}},_createLoadOperation(D){const C=this._operationManager.add(D),I=this._createStoreLoadOptions();return this._store&&!(0,S.RI)(I?.langParams)&&(this._store._langParams=(0,W.A)({},this._store._langParams,I.langParams)),D.always(()=>this._operationManager.remove(C)),{operationId:C,storeLoadOptions:I}},reload(){return this.store()._clearCache(),this._init(),this.load()},cancel(D){return this._operationManager.cancel(D)},cancelAll(){return this._operationManager.cancelAll()},_addSearchOptions(D){this._disposed||(this.store()._useDefaultSearch?this._addSearchFilter(D):(D.searchOperation=this._searchOperation,D.searchValue=this._searchValue,D.searchExpr=this._searchExpr))},_createStoreLoadOptions(){const D=(0,P.X)({},this._storeLoadOptions);return this._addSearchOptions(D),this._paginate&&this._pageSize&&(D.skip=this._pageIndex*this._pageSize,D.take=this._pageSize),D.userData=this._userData,D},_addSearchFilter(D){const C=this._searchValue,I=this._searchOperation;let L=this._searchExpr;const N=[];C&&(L||(L="this"),Array.isArray(L)||(L=[L]),(0,f.__)(L,function(G,k){N.length&&N.push("or"),N.push([k,I,C])}),D.filter=D.filter?[N,D.filter]:N)},_loadFromStore(D,C){const I=(L,N)=>{if(this._disposed||!(0,_.mm)(C))return;const G=(0,P.X)((0,_.Xp)(L,N),D);this._eventsStrategy.fireEvent("customizeLoadResult",[G]),(0,u.z7)(G.data).done(k=>{G.data=k,this._processStoreLoadResult(G,C)}).fail(C.reject)};return D.data?(new u.cY).resolve(D.data).done(I):this.store().load(D.storeLoadOptions).done(I).fail(C.reject)},_processStoreLoadResult(D,C){let I=D.data,L=D.extra;const N=D.storeLoadOptions,G=()=>(this._isLoaded=!0,this._totalCount=isFinite(L.totalCount)?L.totalCount:-1,C.resolve(I,L));this._disposed||(I=this._applyPostProcessFunction(this._applyMapFunction(I)),(0,S.Gv)(L)||(L={}),this._items=I,(!I.length||!this._paginate||this._pageSize&&I.length<this._pageSize)&&(this._isLastPage=!0),N.requireTotalCount&&!isFinite(L.totalCount)?(()=>{this.store().totalCount(N).done(function(U){L.totalCount=U,G()}).fail(C.reject)})():G())},_applyMapFunction(D){return this._mapFunc?(0,_.Kl)(D,this._mapFunc,this.group()):D},_applyPostProcessFunction(D){return this._postProcessFunc?this._postProcessFunc(D):D},on(D,C){return this._eventsStrategy.on(D,C),this},off(D,C){return this._eventsStrategy.off(D,C),this}})},5335:(In,Ze,M)=>{"use strict";M.d(Ze,{Kl:()=>x,Rc:()=>h,Xp:()=>w,ho:()=>L,mm:()=>u,uK:()=>a});var W=M(5737),o=M(9144),P=M(1113),b=M(6569),f=M(1614),S=M(2660),T=M(2440),y=M(3090),d=M(1830),c=M(9916);const s=["items"],a="canceled",u=N=>"pending"===N.state(),h=N=>{switch(N.length){case 0:return;case 1:return N[0]}return[].slice.call(N)},_=(N,G,k)=>Array.isArray(N)?G?((N,G,k)=>(0,S.Tj)(N,U=>{const B=(0,o.A)(U,s);return(0,W.A)({},B,{items:_(U.items,G-1,k)})}))(N,G,k):(0,S.Tj)(N,k):N,x=(N,G,k)=>{const U=k?(0,c.st)(k).length:0;return _(N,U,G)},w=(N,G)=>{var k;return null!==(k=N)&&void 0!==k&&k.data&&(G=N,N=N.data),Array.isArray(N)||(N=[N]),{data:N,extra:G}},D=N=>{const G={};return(0,S.__)(["useDefaultSearch","key","load","loadMode","cacheRawData","byKey","lookup","totalCount","insert","update","remove"],function(){G[this]=N[this],delete N[this]}),new T.A(G)},I=(N,G)=>new T.A({load:()=>P.A.sendRequest({url:N,dataType:"json"}),loadMode:G?.fromUrlLoadMode}),L=(N,G)=>{let k;return"string"==typeof N&&(N={paginate:!1,store:I(N,G)}),void 0===N&&(N=[]),void 0===(N=Array.isArray(N)||N instanceof b.A?{store:N}:(0,y.X)({},N)).store&&(N.store=[]),k=N.store,"load"in N?k=D(N):Array.isArray(k)?k=new f.A(k):(0,d.Qd)(k)&&(k=(N=>{const G=N.type;return delete N.type,b.A.create(G,N)})((0,y.X)({},k))),N.store=k,N}},2614:(In,Ze,M)=>{"use strict";M.d(Ze,{H4:()=>f,sO:()=>P});var W=M(7754),o=M(7251);const P=(0,W.A)(o.A.ERROR_MESSAGES,{E4000:"[DevExpress.data]: {0}",E4001:"Unknown aggregating function is detected: '{0}'",E4002:"Unsupported OData protocol version is used",E4003:"Unknown filter operation is used: {0}",E4004:"The thenby() method is called before the sortby() method",E4005:"Store requires a key expression for this operation",E4006:"ArrayStore 'data' option must be an array",E4007:"Compound keys cannot be auto-generated",E4008:"Attempt to insert an item with a duplicated key",E4009:"Data item cannot be found",E4010:"CustomStore does not support creating queries",E4011:"Custom Store method is not implemented or is not a function: {0}",E4012:"Custom Store method returns an invalid value: {0}",E4013:"Local Store requires the 'name' configuration option is specified",E4014:"Unknown data type is specified for ODataStore: {0}",E4015:"Unknown entity name or alias is used: {0}",E4016:"The compileSetter(expr) method is called with 'self' passed as a parameter",E4017:"Keys cannot be modified",E4018:"The server has returned a non-numeric value in a response to an item count request",E4019:"Mixing of group operators inside a single group of filter expression is not allowed",E4020:"Unknown store type is detected: {0}",E4021:"The server response does not provide the totalCount value",E4022:"The server response does not provide the groupCount value",E4023:"Could not parse the following XML: {0}",E4024:"String function {0} cannot be used with the data field {1} of type {2}.",W4000:"Data returned from the server has an incorrect structure",W4001:'The {0} field is listed in both "keyType" and "fieldTypes". The value of "fieldTypes" is used.',W4002:"Data loading has failed for some cells due to the following error: {0}"});const f=function(T){var y;null===(y=null)||void 0===y||y(T)}},1541:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s});var W=M(2735),o=M(3568),P=M(2614),b=M(2660),f=M(1830),S=M(6021);const T=function(a,u,h){h=h||[],u=u||{};const g=function(w,D){return{name:w,args:D}},_=function(w){const D=new S.cY;let C,I,L,N,G;const k=function(B){const K=u.errorHandler;K&&K(B),(0,P.H4)(B),D.reject(B)};function U(B){switch(B.name){case"sortBy":return G=[B.args],!0;case"thenBy":if(!G)throw P.sO.Error("E4004");return G.push(B.args),!0}return!1}try{C=u.adapter,(0,f.Tn)(C)||(C=o.A[C]),I=C(u),L=[].concat(h).concat(w);const B=I.optimize;for(B&&B(L);L.length;){if(N=L[0],!U(N)){if(G){L.unshift(g("multiSort",[G])),G=null;continue}if("enumerate"!==String(N.name)&&(!I[N.name]||!1===I[N.name].apply(I,N.args)))break}L.shift()}(function(){const K=L[0],J=[];K&&"multiSort"===K.name&&(L.shift(),(0,b.__)(K.args[0],function(){J.push(g(J.length?"thenBy":"sortBy",this))})),L=J.concat(L)})(),I.exec(a).done(function(K,J){if(L.length){let ie=(0,W.A)(K,{errorHandler:u.errorHandler});(0,b.__)(L,function(){ie=ie[this.name].apply(ie,this.args)}),ie.done(D.resolve).fail(D.reject)}else D.resolve(K,J)}).fail(k)}catch(B){k(B)}return D.promise()},x={};return(0,b.__)(["sortBy","thenBy","filter","slice","select","groupBy"],function(){const w=String(this);x[w]=function(){return T(a,u,h.concat(g(w,arguments)))}}),(0,b.__)(["count","min","max","sum","avg","aggregate","enumerate"],function(){const w=String(this);x[w]=function(){return _.call(this,g(w,arguments))}}),x},d={array:W.A,remote:T},s=function(){const a=Array.isArray(arguments[0])?"array":"remote";return d[a].apply(this,arguments)}},3568:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>W});const W={}},1435:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>d});var W=M(4859),o=M(3090),P=M(2660),b=M(2735),f=M(9916);function S(c,s){return c=c.groupBy(s[0].selector),s.length>1&&(c=c.select(function(a){return(0,o.X)({},a,{items:S((0,b.A)(a.items),s.slice(1)).toArray()})})),c}function T(c,s){const a=[];return(0,P.__)(c,function(u,h){(0,W.VM)(s,function(_){return h.selector===_.selector}).length<1&&a.push(h)}),a.concat(s)}const d={multiLevelGroup:S,arrangeSortingInfo:T,queryByOptions:function y(c,s,a){var u;const h=(s=s||{}).filter;var g,_;if(null!==(u=s)&&void 0!==u&&u.langParams&&(null===(g=(_=c).setLangParams)||void 0===g||g.call(_,s.langParams)),h&&(c=c.filter(h)),a)return c;let x=s.sort;const w=s.select;let D=s.group;const C=s.skip,I=s.take;return D&&(D=(0,f.st)(D),D.keepInitialKeyOrder=!!s.group.keepInitialKeyOrder),(x||D)&&(x=(0,f.st)(x||[]),D&&!D.keepInitialKeyOrder&&(x=T(D,x)),(0,P.__)(x,function(L){c=c[L?"thenBy":"sortBy"](this.selector,this.desc,this.compare)})),w&&(c=c.select(w)),D&&(c=S(c,D)),(I||C)&&(c=c.slice(C||0,I)),c}}},9916:(In,Ze,M)=>{"use strict";M.d(Ze,{$A:()=>G,D9:()=>h,DO:()=>k,Im:()=>N,LO:()=>_,OE:()=>U,SR:()=>d,aE:()=>c,bF:()=>I,m9:()=>a,oK:()=>K,st:()=>s,t7:()=>x,zL:()=>u});var W=M(1830),o=M(6054),P=M(2720),b=M(6110),f=M(2660),S=M(6021),T=M(4859);const y=P.A.add,d="DEVEXTREME_XHR_ERROR_UNLOAD",c=function(J){return[J[0],J.length<3?"=":String(J[1]).toLowerCase(),J.length<2||J[J.length-1]]},s=function(J){return Array.isArray(J)||(J=[J]),(0,f.Tj)(J,function(ie){const re={selector:(0,W.Tn)(ie)||"string"==typeof ie?ie:ie.getter||ie.field||ie.selector,desc:!(!ie.desc&&"d"!==String(ie.dir).charAt(0).toLowerCase())};return ie.compare&&(re.compare=ie.compare),re})},a=function(){const J={timeout:"Network connection timeout",error:"Unspecified network error",parsererror:"Unexpected server response"};let ie;return y(function(){const re=(0,b.zk)();o.A.listen(re,"beforeunload",function(){ie=!0})}),function(re,q){return ie?d:re.status<400?J[Y=q]||Y:re.statusText;var Y}}(),u={count:{seed:0,step:function(J){return 1+J}},sum:{seed:0,step:function(J,ie){return J+ie}},min:{step:function(J,ie){return ie<J?ie:J}},max:{step:function(J,ie){return ie>J?ie:J}},avg:{seed:[0,0],step:function(J,ie){return[J[0]+ie,J[1]+1]},finalize:function(J){return J[1]?J[0]/J[1]:NaN}}},h=function(){let ie,J=0;return{obtain:function(){0===J&&(ie=new S.cY),J++},release:function(){J--,J<1&&ie.resolve()},promise:function(){return(0===J?(new S.cY).resolve():ie).promise()},reset:function(){J=0,ie&&ie.resolve()}}}();function _(J){return/^(and|&&|&)$/i.test(J)}const x=function(J,ie,re){if(Array.isArray(J)){const q=(0,f.Tj)(ie,function(Z,Q){return Q});let Y;for(let Z=0;Z<q.length;Z++)if(Y=q[Z],!(0,T.RL)(ie[Y],re[Y],{strict:!1}))return!1;return!0}return(0,T.RL)(ie,re,{strict:!1})},I=function(J){return"!"===J[0]&&Array.isArray(J[1])},N=function(J){if(J.length>2&&Array.isArray(J[0])&&"or"===J[1]&&"string"==typeof J[0][0]&&"="===J[0][1]){const[ie]=J[0];return!J.find((re,q)=>q%2!=0?"or"!==re:!Array.isArray(re)||3!==re.length||re[0]!==ie||"="!==re[1])}return!1},G=function(J){const ie=J[0],re=J[1];return!!(Array.isArray(ie)||(0,W.Tn)(ie)&&(Array.isArray(re)||(0,W.Tn)(re)||function(J){return"and"===J||"or"===J}(re)))},k=function(){const J=new S.cY;return J.resolve.apply(J,arguments).promise()},U=function(){const J=new S.cY;return J.reject.apply(J,arguments).promise()};function K(J,ie){let re=[];const q=function B(J,ie){let re;return function(){return re||(re=setTimeout(()=>{re=void 0,J.call(this)},(0,W.Tn)(ie)?ie():ie)),re}}(function(){J.call(this,re),re=[]},ie);return function(Y){return Array.isArray(Y)&&re.push(...Y),q.call(this,re)}}},5801:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>u});var W=M(1221),o=M(3090),P=M(5335),b=M(8299);const S="_dataSourceChangedHandler",c="_getSpecificDataSourceOption",s="_normalizeDataSource",u={postCtor:function(){this.on("disposing",function(){this._disposeDataSource()}.bind(this))},_refreshDataSource:function(){this._initDataSource(),this._loadDataSource()},_initDataSource:function(){let g,_,h=c in this?this[c]():this.option("dataSource");this._disposeDataSource(),h&&(h instanceof W.q?(this._isSharedDataSource=!0,this._dataSource=h):(g="_dataSourceOptions"in this?this._dataSourceOptions():{},_=this._dataSourceType?this._dataSourceType():W.q,h=(0,P.ho)(h,{fromUrlLoadMode:"_dataSourceFromUrlLoadMode"in this&&this._dataSourceFromUrlLoadMode()}),this._dataSource=new _((0,o.X)(!0,{},g,h))),s in this&&(this._dataSource=this[s](this._dataSource)),this._addDataSourceHandlers(),this._initDataController())},_initDataController:function(){var h;const g=null===(h=this.option)||void 0===h?void 0:h.call(this,"_dataController");this._dataController=g||new b.A(this._dataSource)},_addDataSourceHandlers:function(){S in this&&this._addDataSourceChangeHandler(),"_dataSourceLoadErrorHandler"in this&&this._addDataSourceLoadErrorHandler(),"_dataSourceLoadingChangedHandler"in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()},_addReadyWatcher:function(){this.readyWatcher=function(h){this._ready&&this._ready(!h)}.bind(this),this._dataSource.on("loadingChanged",this.readyWatcher)},_addDataSourceChangeHandler:function(){const h=this._dataSource;this._proxiedDataSourceChangedHandler=function(g){this[S](h.items(),g)}.bind(this),h.on("changed",this._proxiedDataSourceChangedHandler)},_addDataSourceLoadErrorHandler:function(){this._proxiedDataSourceLoadErrorHandler=this._dataSourceLoadErrorHandler.bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)},_addDataSourceLoadingChangedHandler:function(){this._proxiedDataSourceLoadingChangedHandler=this._dataSourceLoadingChangedHandler.bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)},_loadDataSource:function(){const h=this._dataSource;h&&(h.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():h.load())},_loadSingle:function(h,g){return h="this"===h?this._dataSource.key()||"this":h,this._dataSource.loadSingle(h,g)},_isLastPage:function(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize},_isDataSourceLoading:function(){return this._dataSource&&this._dataSource.isLoading()},_disposeDataSource:function(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._proxiedDataSourceChangedHandler&&this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._proxiedDataSourceLoadErrorHandler&&this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._proxiedDataSourceLoadingChangedHandler&&this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler),this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)},getDataSource:function(){return this._dataSource||null}}},778:(In,Ze,M)=>{"use strict";M.d(Ze,{U:()=>_});var W=M(5704),o=M(4072),P=M(5973),b=M(6054),f=M(1832),T=(M(608),M(9293)),y=M(1110);function d(N){return N&&[N.target,N.delegateTarget,N.relatedTarget,N.currentTarget].filter(G=>!!G)}var a=M(2432),u=M(9209),h=M(1208),g=M(6211);const _="dxclick";let w=null,D=null;const C=()=>{D=null},I=function(N){const G=N.originalEvent;(!N.which||1===N.which)&&!w&&!(D===G||G&&G.DXCLICK_FIRED)&&(G&&(G.DXCLICK_FIRED=!0),((N,G)=>{o.A.off(d(N),y.N,G)})(D,C),D=G,((N,G)=>{o.A.one(d(N),y.N,G)})(D,C),(0,T.rC)({type:"dxclick",originalEvent:N}))},L=h.A.inherit({ctor:function(N){this.callBase(N),o.A.on(this.getElement(),"click",I)},start:function(N){w=null},cancel:function(){w=!0},dispose:function(){o.A.off(this.getElement(),"click",I)}});(function(){if(!P.A.real().generic){let G=null,k=!1;const U=function(q){return(0,W.A)(q).is("input, textarea, select, button ,:focus, :focus *")},B=function(q){G=q.target,k=q.isDefaultPrevented()},K=function(q){const Y=(0,a.w)(q);return(0,W.A)(Y)},J=function(q){const Y=K(q);!k&&G&&!Y.is(G)&&!(0,W.A)(G).is("label")&&U(Y)&&(0,f.GX)(),G=null,k=!1},ie="NATIVE_CLICK_FIXER",re=b.A.getDocument();o.A.subscribeGlobal(re,(0,T.b4)(u.A.down,ie),B),o.A.subscribeGlobal(re,(0,T.b4)("click",ie),J)}})(),(0,g.A)({emitter:L,bubble:!0,events:["dxclick"]})},5656:(In,Ze,M)=>{"use strict";M.d(Ze,{U:()=>h});var W=M(5704),o=M(4072),P=M(7007),b=M(5973),f=M(3538),S=M(9961),T=M(9293),y=M(3535);const c=(0,T.b4)("contextmenu","dxContexMenu"),s=(0,T.b4)(y.A.name,"dxContexMenu"),u=f.A.inherit({setup:function(g){const _=(0,W.A)(g);o.A.on(_,c,this._contextMenuHandler.bind(this)),(P.touch||b.A.isSimulator())&&o.A.on(_,s,this._holdHandler.bind(this))},_holdHandler:function(g){(0,T.Er)(g)&&!b.A.isSimulator()||this._fireContextMenu(g)},_contextMenuHandler:function(g){this._fireContextMenu(g)},_fireContextMenu:function(g){return(0,T.rC)({type:"dxcontextmenu",originalEvent:g})},teardown:function(g){o.A.off(g,".dxContexMenu")}});(0,S.A)("dxcontextmenu",new u);const h="dxcontextmenu"},4451:(In,Ze,M)=>{"use strict";M.d(Ze,{s2:()=>_,vu:()=>d});var W=M(3538),o=M(4859),P=M(1832),b=M(5973),f=M(9293),S=M(9209),T=M(1208),y=M(6211);const d="dxactive",u=W.A.inherit({ctor:function(x,w){this._timeout=x,this._fire=w},start:function(){const x=this;this._schedule(function(){x.force()})},_schedule:function(x){this.stop(),this._timer=setTimeout(x,this._timeout)},stop:function(){clearTimeout(this._timer)},force:function(){this._fired||(this.stop(),this._fire(),this._fired=!0)},fired:function(){return this._fired}});let h;const g=T.A.inherit({ctor:function(){this.callBase.apply(this,arguments),this._active=new u(0,o.lQ),this._inactive=new u(0,o.lQ)},configure:function(x,w){switch(w){case"dxactive":x.activeTimeout=x.timeout;break;case"dxinactive":x.inactiveTimeout=x.timeout}this.callBase(x)},start:function(x){if(h){const w=(0,P.gR)(this.getElement().get(0),h.getElement().get(0)),D=!h._active.fired();if(w&&D)return void this._cancel();h._inactive.force()}h=this,this._initEvents(x),this._active.start()},_initEvents:function(x){const w=this,D=this._getEmitterTarget(x),C=(0,f.Er)(x),L=b.A.isSimulator()||!C,N=(0,o.YD)(this.activeTimeout,30),G=(0,o.YD)(this.inactiveTimeout,400);this._active=new u(L?N:0,function(){w._fireEvent("dxactive",x,{target:D})}),this._inactive=new u(L?G:0,function(){w._fireEvent("dxinactive",x,{target:D}),h=null})},cancel:function(x){this.end(x)},end:function(x){const w=x.type!==S.A.up;w?this._active.stop():this._active.force(),this._inactive.start(),w&&this._inactive.force()},dispose:function(){this._active.stop(),this._inactive.stop(),h===this&&(h=null),this.callBase()},lockInactive:function(){return this._active.force(),this._inactive.stop(),h=null,this._cancel(),this._inactive.force.bind(this._inactive)}});g.lock=function(x){const w=h?h.lockInactive():o.lQ;x.done(w)},(0,y.A)({emitter:g,events:["dxactive","dxinactive"]});const _=g.lock},1208:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(5704),o=M(4859),P=M(3538),b=M(8684),f=M(3090),S=M(9293);const y=P.A.inherit({ctor:function(d){this._$element=(0,W.A)(d),this._cancelCallback=(0,b.A)(),this._acceptCallback=(0,b.A)()},getElement:function(){return this._$element},validate:function(d){return!(0,S.X1)(d)},validatePointers:function(d){return 1===(0,S.Ic)(d)},allowInterruptionByMouseWheel:function(){return!0},configure:function(d){(0,f.X)(this,d)},addCancelCallback:function(d){this._cancelCallback.add(d)},removeCancelCallback:function(){this._cancelCallback.empty()},_cancel:function(d){this._cancelCallback.fire(this,d)},addAcceptCallback:function(d){this._acceptCallback.add(d)},removeAcceptCallback:function(){this._acceptCallback.empty()},_accept:function(d){this._acceptCallback.fire(this,d)},_requestAccept:function(d){this._acceptRequestEvent=d},_forgetAccept:function(){this._accept(this._acceptRequestEvent),this._acceptRequestEvent=null},start:o.lQ,move:o.lQ,end:o.lQ,cancel:o.lQ,reset:function(){this._acceptRequestEvent&&this._accept(this._acceptRequestEvent)},_fireEvent:function(d,c,s){const a=(0,f.X)({type:d,originalEvent:c,target:this._getEmitterTarget(c),delegateTarget:this.getElement().get(0)},s);return(c=(0,S.rC)(a)).cancel&&this._cancel(c),c},_getEmitterTarget:function(d){return(this.delegateSelector?(0,W.A)(d.target).closest(this.delegateSelector):this.getElement()).get(0)},dispose:o.lQ})},6211:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(5704),o=M(2720),P=M(6054),b=M(4072),f=M(5397),S=M(3538),T=M(3090),y=M(2660),d=M(9961),c=M(9293),s=M(9209),a=M(8573);const u="dxEventManager",_=new(S.A.inherit({ctor:function(){this._attachHandlers(),this.reset(),this._proxiedCancelHandler=this._cancelHandler.bind(this),this._proxiedAcceptHandler=this._acceptHandler.bind(this)},_attachHandlers:function(){o.A.add(function(){const C=P.A.getDocument();b.A.subscribeGlobal(C,(0,c.b4)(s.A.down,u),this._pointerDownHandler.bind(this)),b.A.subscribeGlobal(C,(0,c.b4)(s.A.move,u),this._pointerMoveHandler.bind(this)),b.A.subscribeGlobal(C,(0,c.b4)([s.A.up,s.A.cancel].join(" "),u),this._pointerUpHandler.bind(this)),b.A.subscribeGlobal(C,(0,c.b4)(a.U,u),this._mouseWheelHandler.bind(this))}.bind(this))},_eachEmitter:function(C){const I=this._activeEmitters||[];let L=0;for(;I.length>L;){const N=I[L];if(!1===C(N))break;I[L]===N&&L++}},_applyToEmitters:function(C,I){this._eachEmitter(function(L){L[C].call(L,I)})},reset:function(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter:function(C){this._proxiedCancelHandler(C)},_pointerDownHandler:function(C){(0,c.Er)(C)&&C.which>1||this._updateEmitters(C)},_updateEmitters:function(C){this._isSetChanged(C)&&(this._cleanEmitters(C),this._fetchEmitters(C))},_isSetChanged:function(C){const I=this._closestEmitter(C),L=this._emittersSet||[];let N=I.length!==L.length;return(0,y.__)(I,function(G,k){return N=N||L[G]!==k,!N}),this._emittersSet=I,N},_closestEmitter:function(C){const I=this,L=[];let N=(0,W.A)(C.target);function G(k,U){U&&U.validatePointers(C)&&U.validate(C)&&(U.addCancelCallback(I._proxiedCancelHandler),U.addAcceptCallback(I._proxiedAcceptHandler),L.push(U))}for(;N.length;){const k=(0,f.p)(N.get(0),"dxEmitter")||[];(0,y.__)(k,G),N=N.parent()}return L},_acceptHandler:function(C,I){const L=this;this._eachEmitter(function(N){N!==C&&L._cancelEmitter(N,I)})},_cancelHandler:function(C,I){this._cancelEmitter(C,I)},_cancelEmitter:function(C,I){const L=this._activeEmitters;I?C.cancel(I):C.reset(),C.removeCancelCallback(),C.removeAcceptCallback();const N=L.indexOf(C);N>-1&&L.splice(N,1)},_cleanEmitters:function(C){this._applyToEmitters("end",C),this.reset(C)},_fetchEmitters:function(C){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",C)},_pointerMoveHandler:function(C){this._applyToEmitters("move",C)},_pointerUpHandler:function(C){this._updateEmitters(C)},_mouseWheelHandler:function(C){this._allowInterruptionByMouseWheel()&&(C.pointers=[null],this._pointerDownHandler(C),this._adjustWheelEvent(C),this._pointerMoveHandler(C),C.pointers=[],this._pointerUpHandler(C))},_allowInterruptionByMouseWheel:function(){let C=!0;return this._eachEmitter(function(I){return C=I.allowInterruptionByMouseWheel()&&C,C}),C},_adjustWheelEvent:function(C){let I=null;if(this._eachEmitter(function(k){if(!k.gesture)return;const U=k.getDirection(C);return"horizontal"!==U&&!C.shiftKey||"vertical"!==U&&C.shiftKey?(I=k,!1):void 0}),!I)return;const L=I.getDirection(C);C["both"===L&&!C.shiftKey||"vertical"===L?"pageY":"pageX"]+=C.delta},isActive:function(C){let I=!1;return this._eachEmitter(function(L){I=I||L.getElement().is(C)}),I}})),D=function(C){const I=C.emitter,L=C.events[0],N=C.events;(0,y.__)(N,function(G,k){(0,d.A)(k,{noBubble:!C.bubble,setup:function(U){const B=(0,f.p)(U,"dxEmitterSubscription")||{},K=(0,f.p)(U,"dxEmitter")||{},J=K[L]||new I(U);B[k]=!0,K[L]=J,(0,f.p)(U,"dxEmitter",K),(0,f.p)(U,"dxEmitterSubscription",B)},add:function(U,B){(0,f.p)(U,"dxEmitter")[L].configure((0,T.X)({delegateSelector:B.selector},B.data),B.type)},teardown:function(U){const B=(0,f.p)(U,"dxEmitterSubscription"),K=(0,f.p)(U,"dxEmitter"),J=K[L];delete B[k];let ie=!0;(0,y.__)(N,function(re,q){return ie=ie&&!B[q],ie}),ie&&(_.isActive(U)&&_.resetEmitter(J),J&&J.dispose(),delete K[L])}})})}},9961:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>b});var W=M(2660),o=M(7110);const P=function(f,S){const T={};"noBubble"in S&&(T.noBubble=S.noBubble),"bindType"in S&&(T.bindType=S.bindType),"delegateType"in S&&(T.delegateType=S.delegateType),(0,W.__)(["setup","teardown","add","remove","trigger","handle","_default","dispose"],function(y,d){S[d]&&(T[d]=function(){const c=[].slice.call(arguments);return c.unshift(this),S[d].apply(S,c)})}),o.A.fire(f,T)};P.callbacks=o.A;const b=P},7110:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=new(M(8167).A)},4072:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ve});var W=M(7110),o=M(3090),P=M(2432),b=M(6054),f=M(6110),S=M(1926),T=M(1830),y=M(8684),d=M(7251);const c=["pageX","pageY","screenX","screenY","clientX","clientY"];var u=M(4356);const h=(0,f.zk)(),g="dxEmptyEventType",_={mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},x={focusin:"focus",focusout:"blur"},w=["blur","focus","load"],D=["touchmove","wheel","mousewheel","touchstart"];function I(le,Ce){return!(0,T.l6)(le)&&"#document"!==le.nodeName&&b.A.elementMatches(le,Ce)}const L=new WeakMap;let G,N=0;const k=function(){const le={};return W.A.add(function(Ce,ye){le[Ce]=ye}),{getField:function(Ce,ye){return le[Ce]&&le[Ce][ye]},callMethod:function(Ce,ye,ge,fe){return le[Ce]&&le[Ce][ye]&&le[Ce][ye].apply(ge,fe)}}}(),U=(0,S.A)({on:K(Q(oe(function(le,Ce,ye,ge,fe){q(le,Ce).addHandler(fe,ye,ge)}))),one:K(Q(function(le,Ce,ye,ge,fe){const xe=function(){U.off(le,Ce,ye,xe),fe.apply(this,arguments)};U.on(le,Ce,ye,ge,xe)})),off:K(function te(le){return function(Ce,ye,ge,fe){"function"==typeof ge&&(fe=ge,ge=void 0),le(Ce,ye,ge,fe)}}(oe(function(le,Ce,ye,ge){q(le,Ce).removeHandler(ge,ye)}))),trigger:K(pe(function(le,Ce,ye){const ge=Ce.type,fe=q(le,Ce.type);if(k.callMethod(ge,"trigger",le,[Ce,ye]),fe.callHandlers(Ce,ye),!k.getField(ge,"noBubble")&&!Ce.isPropagationStopped()&&-1===w.indexOf(ge)){const Te=[],Ee=function(ze){const $e=ze.parentNode??((0,T.Gv)(ze.host)?ze.host:null);$e&&(Te.push($e),Ee($e))};Ee(le),Te.push(h);let Oe=0;for(;Te[Oe]&&!Ce.isPropagationStopped();)q(Te[Oe],Ce.type).callHandlers((0,o.X)(Ce,{currentTarget:Te[Oe]}),ye),Oe++}(le.nodeType||(0,T.l6)(le))&&(k.callMethod(ge,"_default",le,[Ce,ye]),function ae(le,Ce){const ye=x[le]||le;(function(ge,fe){return"click"===ge&&"a"===fe.localName})(le,Ce)||(0,T.Tn)(Ce[ye])&&(G=le,Ce[ye](),G=void 0)}(ge,le))})),triggerHandler:K(pe(function(le,Ce,ye){q(le,Ce.type).callHandlers(Ce,ye)}))});function B(le,Ce){const ye=le[0];if(ye)if(b.A.isNode(ye)||(0,T.l6)(ye))Ce.apply(U,le);else{if((0,T.Kg)(ye)||!("length"in ye))throw d.A.Error("E0025");{const ge=Array.prototype.slice.call(le,0);Array.prototype.forEach.call(ye,function(fe){ge[0]=fe,B(ge,Ce)})}}}function K(le){return function(){B(arguments,le)}}const ie=(0,u.A)(function J(){let le=!1;try{const Ce=Object.defineProperty({},"passive",{get:function(){return le=!0,!0}});h.addEventListener("test",null,Ce)}catch{}return le}),re=(le,Ce)=>(0,T.l6)(le)?re(le.document,Ce):le.contains?le.contains(Ce):!!(Ce.compareDocumentPosition(le)&Ce.DOCUMENT_POSITION_CONTAINS);function q(le,Ce){let ye=L.get(le);const ge=(Ce=Ce||"").split("."),fe=ge.slice(1),xe=!!ge[0];Ce=ge[0]||g,ye||(ye={},L.set(le,ye)),ye[Ce]||(ye[Ce]={handleObjects:[],nativeHandler:null});const Te=ye[Ce];return{addHandler:function(Ee,Oe,ze){const $e=function(et,Ke){const Ye=[et],Pe=et.currentTarget,Se=et.relatedTarget;let Re,Fe;Ce in _&&(Re=Se&&Pe&&(Se===Pe||re(Pe,Se))),void 0!==Ke&&Ye.push(Ke),k.callMethod(Ce,"handle",le,[et,ze]),Re||(Fe=Ee.apply(Pe,Ye)),!1===Fe&&(et.preventDefault(),et.stopPropagation())},Be={handler:Ee,wrappedHandler:function(et,Ke){if(!G||et.type!==G)if(et.data=ze,et.delegateTarget=le,Oe){let Pe=et.target;for(;Pe&&Pe!==le;)I(Pe,Oe)&&(et.currentTarget=Pe,$e(et,Ke)),Pe=Pe.parentNode}else{var Ye;if(et.currentTarget=et.delegateTarget||et.target,null!==(Ye=et.target)&&void 0!==Ye&&Ye.shadowRoot){const Se=(0,P.w)(et);et.target=Se}$e(et,Ke)}},selector:Oe,type:Ce,data:ze,namespace:fe.join("."),namespaces:fe,guid:++N};Te.handleObjects.push(Be);let st,ot=1===Te.handleObjects.length&&xe;ot&&(ot=!k.callMethod(Ce,"setup",le,[ze,fe,Ee])),ot&&(Te.nativeHandler=function Y(le){return function(Ce,ye){const ge=q(this,le);Ce=U.Event(Ce),ge.callHandlers(Ce,ye)}}(Ce),ie()&&D.indexOf(Ce)>-1&&(st={passive:!1}),Te.removeListener=b.A.listen(le,_[Ce]||Ce,Te.nativeHandler,st)),k.callMethod(Ce,"add",le,[Be])},removeHandler:function(Ee,Oe){const ze=function(Be){const Ue=ye[Be];if(!Ue.handleObjects.length)return void delete ye[Be];let ot;Ue.handleObjects=Ue.handleObjects.filter(function(Ke){const Ye=fe.length&&!Z(Ke.namespaces,fe)||Ee&&Ke.handler!==Ee||Oe&&Ke.selector!==Oe;return Ye||(ot=Ke.handler,k.callMethod(Be,"remove",le,[Ke])),Ye}),!Ue.handleObjects.length&&Be!==g&&(k.callMethod(Be,"teardown",le,[fe,ot]),Ue.nativeHandler&&Ue.removeListener(),delete ye[Be])};if(xe)ze(Ce);else for(const Be in ye)ze(Be);0===Object.keys(ye).length&&L.delete(le)},callHandlers:function(Ee,Oe){let ze=!1;const $e=function(Be){ze||(!fe.length||Z(Be.namespaces,fe))&&(Be.wrappedHandler(Ee,Oe),ze=Ee.isImmediatePropagationStopped())};Te.handleObjects.forEach($e),fe.length&&ye[g]&&ye[g].handleObjects.forEach($e)}}}function Z(le,Ce){for(let ye=0;ye<Ce.length;ye++)if(le.indexOf(Ce[ye])<0)return!1;return!0}function Q(le){return function(Ce,ye,ge,fe,xe){xe||(xe=fe,fe=void 0),"string"!=typeof ge&&(fe=ge,ge=void 0),!xe&&"string"==typeof ye&&(xe=fe||ge,ge=void 0,fe=void 0),le(Ce,ye,ge,fe,xe)}}function pe(le){return function(Ce,ye,ge){"string"==typeof ye&&(ye={type:ye}),ye.target||(ye.target=Ce),ye.currentTarget=Ce,ye.delegateTarget||(ye.delegateTarget=Ce),!ye.type&&ye.originalEvent&&(ye.type=ye.originalEvent.type),le(Ce,ye instanceof U.Event?ye:U.Event(ye),ge)}}function oe(le){const Ce=function(ye,ge){if(ge&&ge.indexOf(" ")>-1){const fe=Array.prototype.slice.call(arguments,0);ge.split(" ").forEach(function(xe){fe[1]=xe,le.apply(this,fe)})}else le.apply(this,arguments)};return function(ye,ge){if("object"==typeof ge){const fe=Array.prototype.slice.call(arguments,0);for(const xe in ge)fe[1]=xe,fe[fe.length-1]=ge[xe],Ce.apply(this,fe)}else Ce.apply(this,arguments)}}function ee(le){return null==(Ce=le).which&&0===Ce.type.indexOf("key")?null!=le.charCode?le.charCode:le.keyCode:function(Ce){return!Ce.which&&void 0!==Ce.button&&/^(?:mouse|pointer|contextmenu|drag|drop)|click/.test(Ce.type)}(le)?{1:1,2:3,3:1,4:2}[le.button]:le.which;var Ce}function he(le){le&&(U.Event=le,U.Event.prototype=le.prototype)}function de(le,Ce,ye){Object.defineProperty(ye||U.Event.prototype,le,{enumerable:!0,configurable:!0,get:function(){return this.originalEvent&&Ce(this.originalEvent)},set:function(ge){Object.defineProperty(this,le,{enumerable:!0,configurable:!0,writable:!0,value:ge})}})}he(function z(le){return U.Event=function(Ce,ye){if(!(this instanceof U.Event))return new U.Event(Ce,ye);Ce||(Ce={}),"string"==typeof Ce&&(Ce={type:Ce}),ye||(ye={}),le.call(this,Ce,ye)},Object.assign(U.Event.prototype,{_propagationStopped:!1,_immediatePropagationStopped:!1,_defaultPrevented:!1,isPropagationStopped:function(){return!!(this._propagationStopped||this.originalEvent&&this.originalEvent.propagationStopped)},stopPropagation:function(){this._propagationStopped=!0,this.originalEvent&&this.originalEvent.stopPropagation()},isImmediatePropagationStopped:function(){return this._immediatePropagationStopped},stopImmediatePropagation:function(){this.stopPropagation(),this._immediatePropagationStopped=!0,this.originalEvent&&this.originalEvent.stopImmediatePropagation()},isDefaultPrevented:function(){return!!(this._defaultPrevented||this.originalEvent&&this.originalEvent.defaultPrevented)},preventDefault:function(){this._defaultPrevented=!0,this.originalEvent&&this.originalEvent.preventDefault()}}),U.Event}(function(le,Ce){var ye;le instanceof U.Event||(0,f.Vd)()&&le instanceof h.Event||(null===(ye=le.view)||void 0===ye?void 0:ye.Event)&&le instanceof le.view.Event?(this.originalEvent=le,this.type=le.type,this.currentTarget=void 0,Object.prototype.hasOwnProperty.call(le,"isTrusted")&&(this.isTrusted=le.isTrusted),this.timeStamp=le.timeStamp||Date.now()):Object.assign(this,le),de("which",ee,this),0===le.type.indexOf("touch")&&(delete Ce.pageX,delete Ce.pageY),Object.assign(this,Ce),this.guid=++N})),["target","relatedTarget","delegateTarget","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","shiftKey","view","char","code","charCode","key","keyCode","button","buttons","offsetX","offsetY","pointerId","pointerType","targetTouches","toElement","touches"].forEach(le=>de(le,Ce=>Ce[le])),function a(le){c.forEach(function(Ce){le(Ce,function(ye){return function(le,Ce){if(Ce[le]&&!Ce.touches||!Ce.touches)return Ce[le];const ye=Ce.touches.length?Ce.touches:Ce.changedTouches;return ye.length?ye[0][le]:void 0}(Ce,ye)})},this)}(de);const ue=(0,y.A)(),be=(0,y.A)();U.set=function(le){ue.fire(),U.inject(le),he(le.Event),be.fire()},U.subscribeGlobal=function(){B(arguments,Q(function(){const le=arguments;U.on.apply(this,le),ue.add(function(){const Ce=Array.prototype.slice.call(le,0);Ce.splice(3,1),U.off.apply(this,Ce)}),be.add(function(){U.on.apply(this,le)})}))},U.forcePassiveFalseEventNames=D,U.passiveEventHandlersSupported=ie;const ve=U},7426:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s});var W=M(5704),o=M(4072),P=M(3538),b=M(9293);const y="KeyboardProcessor",d=a=>({keyName:(0,b.YD)(a),key:a.key,code:a.code,ctrl:a.ctrlKey,location:a.location,metaKey:a.metaKey,shift:a.shiftKey,alt:a.altKey,which:a.which,originalEvent:a}),c=P.A.inherit({_keydown:(0,b.b4)("keydown",y),_compositionStart:(0,b.b4)("compositionstart",y),_compositionEnd:(0,b.b4)("compositionend",y),ctor:function(a){(a=a||{}).element&&(this._element=(0,W.A)(a.element)),a.focusTarget&&(this._focusTarget=a.focusTarget),this._handler=a.handler,this._element&&(this._processFunction=u=>{const h=(0,W.A)(this._focusTarget).toArray(),g=this._focusTarget&&this._focusTarget!==u.target&&!h.includes(u.target),_=this._isComposingJustFinished&&229===u.which||this._isComposing||g;this._isComposingJustFinished=!1,_||this.process(u)},this._toggleProcessingWithContext=this.toggleProcessing.bind(this),o.A.on(this._element,this._keydown,this._processFunction),o.A.on(this._element,this._compositionStart,this._toggleProcessingWithContext),o.A.on(this._element,this._compositionEnd,this._toggleProcessingWithContext))},dispose:function(){this._element&&(o.A.off(this._element,this._keydown,this._processFunction),o.A.off(this._element,this._compositionStart,this._toggleProcessingWithContext),o.A.off(this._element,this._compositionEnd,this._toggleProcessingWithContext)),this._element=void 0,this._handler=void 0},process:function(a){this._handler(d(a))},toggleProcessing:function(a){let{type:u}=a;this._isComposing="compositionstart"===u,this._isComposingJustFinished=!this._isComposing}});c.createKeyDownOptions=d;const s=c},8573:(In,Ze,M)=>{"use strict";M.d(Ze,{U:()=>f});var W=M(5704),o=M(4072),P=M(9961),b=M(9293);const f="dxmousewheel",c={setup:function(s){const a=(0,W.A)(s);o.A.on(a,(0,b.b4)("wheel","dxWheel"),c._wheelHandler.bind(c))},teardown:function(s){o.A.off(s,".dxWheel")},_wheelHandler:function(s){const{deltaMode:a,deltaY:u,deltaX:h,deltaZ:g}=s.originalEvent;(0,b.rC)({type:f,originalEvent:s,delta:this._normalizeDelta(u,a),deltaX:h,deltaY:u,deltaZ:g,deltaMode:a,pointerType:"mouse"}),s.stopPropagation()},_normalizeDelta(s){return 0===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)?-s:-30*s}};(0,P.A)(f,c)},1395:(In,Ze,M)=>{"use strict";M.d(Ze,{U:()=>T});var W=M(3538),o=M(6054),P=M(1832),b=M(778),f=M(4072),S=M(9293);const T="dxdblclick",d=(0,S.b4)(b.U,"dxDblClick"),a=new(W.A.inherit({ctor(){this._handlerCount=0,this._forgetLastClick()},_forgetLastClick(){this._firstClickTarget=null,this._lastClickTimeStamp=-300},add(){this._handlerCount<=0&&f.A.on(o.A.getDocument(),d,this._clickHandler.bind(this)),this._handlerCount+=1},_clickHandler(h){const g=h.timeStamp||Date.now(),_=g-this._lastClickTimeStamp;!(_<0)&&_<300?((0,S.rC)({type:"dxdblclick",target:(0,P.tc)(this._firstClickTarget,h.target),originalEvent:h}),this._forgetLastClick()):(this._firstClickTarget=h.target,this._lastClickTimeStamp=g,clearTimeout(this._lastClickClearTimeout),this._lastClickClearTimeout=setTimeout(()=>{this._forgetLastClick()},600))},remove(){this._handlerCount-=1,this._handlerCount<=0&&(this._forgetLastClick(),f.A.off(o.A.getDocument(),d,void 0),clearTimeout(this._lastClickClearTimeout),this._handlerCount=0)}}));(0,M(9961).A)(T,a)},8664:(In,Ze,M)=>{"use strict";M.d(Ze,{Cy:()=>s,Ve:()=>u,_N:()=>a,gv:()=>g,ni:()=>c,qG:()=>h});var W=M(5704),o=M(5397),P=M(5345),b=M(2660),f=M(1832),S=M(9961),T=M(9293),y=M(9659),d=M(6211);const c="dxdragstart",s="dxdrag",a="dxdragend",u="dxdragenter",h="dxdragleave",g="dxdrop",x=[],w=[],D=[],C={setup:function(U,B){x.includes(U)||(x.push(U),w.push([]),D.push(B||{}))},add:function(U,B){const K=x.indexOf(U);this.updateEventsCounter(U,B.type,1);const J=B.selector;w[K].includes(J)||w[K].push(J)},updateEventsCounter:function(U,B,K){if([u,h,g].indexOf(B)>-1){const J=(0,o.p)(U,"dxDragEventsCount")||0;(0,o.p)(U,"dxDragEventsCount",Math.max(0,J+K))}},remove:function(U,B){this.updateEventsCounter(U,B.type,-1)},teardown:function(U){if(!(0,o.p)(U,"dxDragEventsCount")){const K=x.indexOf(U);x.splice(K,1),w.splice(K,1),D.splice(K,1),(0,o.jf)(U,"dxDragEventsCount")}}};(0,S.A)(u,C),(0,S.A)(h,C),(0,S.A)(g,C);const k=y.A.inherit({ctor:function(U){this.callBase(U),this.direction="both"},_init:function(U){this._initEvent=U},_start:function(U){if(U=this._fireEvent("dxdragstart",this._initEvent),this._maxLeftOffset=U.maxLeftOffset,this._maxRightOffset=U.maxRightOffset,this._maxTopOffset=U.maxTopOffset,this._maxBottomOffset=U.maxBottomOffset,U.targetElements||null===U.targetElements){const B=(0,P.BO)(U.targetElements||[]);this._dropTargets=b.Tj(B,function(K){return(0,W.A)(K).get(0)})}else this._dropTargets=x},_move:function(U){const B=(0,T.rw)(U),K=this._calculateOffset(B);U=this._fireEvent("dxdrag",U,{offset:K}),this._processDropTargets(U),U._cancelPreventDefault||U.preventDefault()},_calculateOffset:function(U){return{x:this._calculateXOffset(U),y:this._calculateYOffset(U)}},_calculateXOffset:function(U){return"vertical"!==this.direction?this._fitOffset(U.x-this._startEventData.x,this._maxLeftOffset,this._maxRightOffset):0},_calculateYOffset:function(U){return"horizontal"!==this.direction?this._fitOffset(U.y-this._startEventData.y,this._maxTopOffset,this._maxBottomOffset):0},_fitOffset:function(U,B,K){return null!=B&&(U=Math.max(U,-B)),null!=K&&(U=Math.min(U,K)),U},_processDropTargets:function(U){const B=this._findDropTarget(U);B===this._currentDropTarget||(this._fireDropTargetEvent(U,h),this._currentDropTarget=B,this._fireDropTargetEvent(U,u))},_fireDropTargetEvent:function(U,B){if(!this._currentDropTarget)return;const K={type:B,originalEvent:U,draggingElement:this._$element.get(0),target:this._currentDropTarget};(0,T.rC)(K)},_findDropTarget:function(U){const B=this;let K;return b.__(x,function(J,ie){if(!B._checkDropTargetActive(ie))return;const re=(0,W.A)(ie);b.__(function(U){const B=x.indexOf(U.get(0)),K=w[B].filter(ie=>ie);let J=U.find(K.join(", "));return w[B].includes(void 0)&&(J=J.add(U)),J}(re),function(q,Y){const Z=(0,W.A)(Y);B._checkDropTarget(function(U){const B=x.indexOf(U.get(0));return D[B]}(re),Z,(0,W.A)(K),U)&&(K=Y)})}),K},_checkDropTargetActive:function(U){let B=!1;return b.__(this._dropTargets,function(K,J){return B=B||J===U||(0,f.gR)(J,U),!B}),B},_checkDropTarget:function(U,B,K,J){if(B.get(0)===(0,W.A)(J.target).get(0))return!1;const re=function(U,B){return U.itemPositionFunc?U.itemPositionFunc(B):B.offset()}(U,B);if(J.pageX<re.left||J.pageY<re.top)return!1;const q=function(U,B){return U.itemSizeFunc?U.itemSizeFunc(B):{width:B.get(0).getBoundingClientRect().width,height:B.get(0).getBoundingClientRect().height}}(U,B);return!(J.pageX>re.left+q.width||J.pageY>re.top+q.height||K.length&&K.closest(B).length||U.checkDropTarget&&!U.checkDropTarget(B,J))&&B},_end:function(U){const B=(0,T.rw)(U);this._fireEvent("dxdragend",U,{offset:this._calculateOffset(B)}),this._fireDropTargetEvent(U,g),delete this._currentDropTarget}});(0,d.A)({emitter:k,events:["dxdragstart","dxdrag","dxdragend"]})},9659:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>k});var W=M(5704),o=M(4072),P=M(5973),b=M(8649),f=M(4356),S=M(1832),T=M(2720),y=M(3012),d=M(4859),c=M(1830),s=M(9293),a=M(1208);const u=T.A.add,h=Math.abs;let w=10;const L=(0,f.A)(function(){const U="desktop"===P.A.real().deviceType;if(!(0,b.jA)("pointer-events")||!U)return d.lQ;const B=(0,W.A)("<div>").addClass("dx-gesture-cover").css("pointerEvents","none");return o.A.subscribeGlobal(B,"dxmousewheel",function(K){K.preventDefault()}),u(function(){B.appendTo("body")}),function(K,J){B.css("pointerEvents",K?"all":"none"),K&&B.css("cursor",J)}}),G=a.A.inherit({gesture:!0,configure:function(U){this.getElement().css("msTouchAction",U.immediate?"pinch-zoom":""),this.callBase(U)},allowInterruptionByMouseWheel:function(){return 2!==this._stage},getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=0},start:function(U){U._needSkipEvent||(0,s.eT)(U)?this._cancel(U):(this._startEvent=(0,s.lh)(U),this._startEventData=(0,s.rw)(U),this._stage=1,this._init(U),this._setupImmediateTimer())},_setupImmediateTimer:function(){if(clearTimeout(this._immediateTimer),this._immediateAccepted=!1,this.immediate){if(0===this.immediateTimeout)return void(this._immediateAccepted=!0);this._immediateTimer=setTimeout(function(){this._immediateAccepted=!0}.bind(this),this.immediateTimeout??180)}},move:function(U){if(1===this._stage&&this._directionConfirmed(U)){if(this._stage=2,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(U),this._adjustStartEvent(U),this._start(this._startEvent),0===this._stage)return;this._requestAccept(U),this._move(U),this._forgetAccept()}else 2===this._stage&&(this._clearSelection(U),this._move(U))},_directionConfirmed:function(U){const B=this._getTouchBoundary(U),K=(0,s.nm)(this._startEventData,(0,s.rw)(U)),J=h(K.x),ie=h(K.y),re=this._validateMove(B,J,ie),q=this._validateMove(B,ie,J),Y=this.getDirection(U);return"both"===Y&&(re||q)||"horizontal"===Y&&re||"vertical"===Y&&q||this._immediateAccepted},_validateMove:function(U,B,K){return B&&B>=U&&(!this.immediate||B>=K)},_getTouchBoundary:function(U){return this.immediate||(0,s.X1)(U)?0:w},_adjustStartEvent:function(U){const B=this._getTouchBoundary(U),K=(0,s.nm)(this._startEventData,(0,s.rw)(U));this._startEvent.pageX+=(0,y._S)(K.x)*B,this._startEvent.pageY+=(0,y._S)(K.y)*B},_resetActiveElement:function(){"ios"===P.A.real().platform&&this.getElement().find(":focus").length&&(0,S.GX)()},_toggleGestureCover:function(U){this._toggleGestureCoverImpl(U)},_toggleGestureCoverImpl:function(U){2===this._stage&&function(U,B){L()(U,B)}(U,this.getElement().css("cursor"))},_clearSelection:function(U){(0,s.X1)(U)||(0,s.kH)(U)||(0,S.wr)()},end:function(U){this._toggleGestureCover(!1),2===this._stage?this._end(U):1===this._stage&&this._stop(U),this._stage=0},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:d.lQ,_start:d.lQ,_move:d.lQ,_stop:d.lQ,_end:d.lQ});G.initialTouchBoundary=w,G.touchBoundary=function(U){if(!(0,c.O9)(U))return w;w=U};const k=G},7940:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>L});var W=M(4072),o=M(3538),P=M(9293),b=M(9659),f=M(6211),S=M(608),T=M(5973);const y=o.A.abstract,d=T.A.real(),x=o.A.inherit(function(){const N=(0,P.b4)("scroll","dxScrollEmitter");return{ctor:function(G){this._element=G,this._locked=!1,this._proxiedScroll=k=>{this._disposed||this._scroll(k)},W.A.on(this._element,N,this._proxiedScroll)},_scroll:y,check:function(G,k){this._locked&&k()},dispose:function(){this._disposed=!0,W.A.off(this._element,N,this._proxiedScroll)}}}()),w=x.inherit({ctor:function(N,G){this.callBase(N),this._timeout=G},_scroll:function(){this._prepare(),this._forget()},_prepare:function(){this._timer&&this._clearTimer(),this._locked=!0},_clearTimer:function(){clearTimeout(this._timer),this._locked=!1,this._timer=null},_forget:function(){const N=this;this._timer=setTimeout(function(){N._clearTimer()},this._timeout)},dispose:function(){this.callBase(),this._clearTimer()}}),D=w.inherit({ctor:function(N){this.callBase(N,400),this._lastWheelDirection=null},check:function(N,G){this._checkDirectionChanged(N),this.callBase(N,G)},_checkDirectionChanged:function(N){if(!(0,P.X1)(N))return void(this._lastWheelDirection=null);const G=N.shiftKey||!1,k=null!==this._lastWheelDirection&&G!==this._lastWheelDirection;this._lastWheelDirection=G,this._locked=this._locked&&!k}});let C=w.inherit({ctor:function(N){this.callBase(N,400)}});!function(){const{ios:N,android:G}=d;(N||G)&&(C=x.inherit({_scroll:function(){this._locked=!0;const k=this;(0,S.u)(this._scrollFrame),this._scrollFrame=(0,S.x)(function(){k._locked=!1})},check:function(k,U){(0,S.u)(this._scrollFrame),(0,S.u)(this._checkFrame);const B=this,K=this.callBase;this._checkFrame=(0,S.x)(function(){K.call(B,k,U),B._locked=!1})},dispose:function(){this.callBase(),(0,S.u)(this._scrollFrame),(0,S.u)(this._checkFrame)}}))}();const I=b.A.inherit(function(){const N=Math.round(16.666666666666668);return{ctor:function(G){this.callBase.apply(this,arguments),this.direction="both",this._pointerLocker=new C(G),this._wheelLocker=new D(G)},validate:function(){return!0},configure:function(G){G.scrollTarget&&(this._pointerLocker.dispose(),this._wheelLocker.dispose(),this._pointerLocker=new C(G.scrollTarget),this._wheelLocker=new D(G.scrollTarget)),this.callBase(G)},_init:function(G){this._wheelLocker.check(G,function(){(0,P.X1)(G)&&this._accept(G)}.bind(this)),this._pointerLocker.check(G,function(){const k=this.isNative&&(0,P.Er)(G);!(0,P.X1)(G)&&!k&&this._accept(G)}.bind(this)),this._fireEvent("dxscrollinit",G),this._prevEventData=(0,P.rw)(G)},move:function(G){this.callBase.apply(this,arguments),G.isScrollingEvent=this.isNative||G.isScrollingEvent},_start:function(G){this._savedEventData=(0,P.rw)(G),this._fireEvent("dxscrollstart",G),this._prevEventData=(0,P.rw)(G)},_move:function(G){const k=(0,P.rw)(G);this._fireEvent("dxscroll",G,{delta:(0,P.nm)(this._prevEventData,k)}),(0,P.nm)(this._savedEventData,k).time>200&&(this._savedEventData=this._prevEventData),this._prevEventData=(0,P.rw)(G)},_end:function(G){const k=(0,P.nm)(this._prevEventData,(0,P.rw)(G));let U={x:0,y:0};if(!(0,P.X1)(G)&&k.time<100){const B=(0,P.nm)(this._savedEventData,this._prevEventData),K=N/B.time;U={x:B.x*K,y:B.y*K}}this._fireEvent("dxscrollend",G,{velocity:U})},_stop:function(G){this._fireEvent("dxscrollstop",G)},cancel:function(G){this.callBase.apply(this,arguments),this._fireEvent("dxscrollcancel",G)},dispose:function(){this.callBase.apply(this,arguments),this._pointerLocker.dispose(),this._wheelLocker.dispose()},_clearSelection:function(){if(!this.isNative)return this.callBase.apply(this,arguments)},_toggleGestureCover:function(){if(!this.isNative)return this.callBase.apply(this,arguments)}}}());(0,f.A)({emitter:I,events:["dxscrollinit","dxscrollstart","dxscroll","dxscrollend","dxscrollstop","dxscrollcancel"]});const L={init:"dxscrollinit",start:"dxscrollstart",move:"dxscroll",end:"dxscrollend",stop:"dxscrollstop",cancel:"dxscrollcancel",scroll:"scroll"}},6790:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>u});var W=M(8842),o=M(4072),P=M(7631),b=M(2660),f=M(9293),S=M(3090),T=M(8879);const c={onStart:W.ni,onUpdated:W.By,onEnd:W._N,onCancel:"dxswipecancel"},a=P.A.inherit({_getDefaultOptions:function(){return(0,S.X)(this.callBase(),{elastic:!0,immediate:!1,immediateTimeout:180,direction:"horizontal",itemSizeFunc:null,onStart:null,onUpdated:null,onEnd:null,onCancel:null})},_render:function(){this.callBase(),this.$element().addClass("dx-swipeable"),this._attachEventHandlers()},_attachEventHandlers:function(){if(this._detachEventHandlers(),this.option("disabled"))return;const h=this.NAME;this._createEventData(),(0,b.__)(c,function(g,_){const x=this._createActionByOption(g,{context:this});_=(0,f.b4)(_,h),o.A.on(this.$element(),_,this._eventData,function(w){return x({event:w})})}.bind(this))},_createEventData:function(){this._eventData={elastic:this.option("elastic"),itemSizeFunc:this.option("itemSizeFunc"),direction:this.option("direction"),immediate:this.option("immediate"),immediateTimeout:this.option("immediateTimeout")}},_detachEventHandlers:function(){o.A.off(this.$element(),".dxSwipeable")},_optionChanged:function(h){switch(h.name){case"disabled":case"onStart":case"onUpdated":case"onEnd":case"onCancel":case"elastic":case"immediate":case"itemSizeFunc":case"direction":this._detachEventHandlers(),this._attachEventHandlers();break;case"rtlEnabled":break;default:this.callBase(h)}},_useTemplates:function(){return!1}});(0,T.UU)(a,"dxSwipeable");const u=a},3535:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>d});var W=M(9293),o=M(1208),P=M(6211);const b=Math.abs,y=o.A.inherit({start:function(c){this._startEventData=(0,W.rw)(c),this._startTimer(c)},_startTimer:function(c){const s="timeout"in this?this.timeout:750;this._holdTimer=setTimeout(function(){this._requestAccept(c),this._fireEvent("dxhold",c,{target:c.target}),this._forgetAccept()}.bind(this),s)},move:function(c){this._touchWasMoved(c)&&this._cancel(c)},_touchWasMoved:function(c){const s=(0,W.nm)(this._startEventData,(0,W.rw)(c));return b(s.x)>5||b(s.y)>5},end:function(){this._stopTimer()},_stopTimer:function(){clearTimeout(this._holdTimer)},cancel:function(){this._stopTimer()},dispose:function(){this._stopTimer()}});(0,P.A)({emitter:y,bubble:!0,events:["dxhold"]});const d={name:"dxhold"}},1134:(In,Ze,M)=>{"use strict";M.d(Ze,{_:()=>a,n:()=>d});var W=M(4072),o=M(5397),P=M(3538),b=M(5973),f=M(9961),S=M(9293),T=M(9209);const d="dxhoverstart",c=(0,S.b4)(T.A.enter,"dxHoverStart"),a="dxhoverend",u=(0,S.b4)(T.A.leave,"dxHoverEnd"),h=P.A.inherit({noBubble:!0,ctor:function(){this._handlerArrayKeyPath=this._eventNamespace+"_HandlerStore"},setup:function(x){(0,o.p)(x,this._handlerArrayKeyPath,{})},add:function(x,w){const D=this,C=function(I){D._handler(I)};W.A.on(x,this._originalEventName,w.selector,C),(0,o.p)(x,this._handlerArrayKeyPath)[w.guid]=C},_handler:function(x){(0,S.kH)(x)||b.A.isSimulator()||(0,S.rC)({type:this._eventName,originalEvent:x,delegateTarget:x.delegateTarget})},remove:function(x,w){const D=(0,o.p)(x,this._handlerArrayKeyPath)[w.guid];W.A.off(x,this._originalEventName,w.selector,D)},teardown:function(x){(0,o.jf)(x,this._handlerArrayKeyPath)}}),g=h.inherit({ctor:function(){this._eventNamespace="dxHoverStart",this._eventName=d,this._originalEventName=c,this.callBase()},_handler:function(x){(x.pointers||[]).length||this.callBase(x)}}),_=h.inherit({ctor:function(){this._eventNamespace="dxHoverEnd",this._eventName=a,this._originalEventName=u,this.callBase()}});(0,f.A)(d,new g),(0,f.A)(a,new _)},1216:(In,Ze,M)=>{"use strict";M.d(Ze,{Jh:()=>T,tY:()=>S,xH:()=>P});var W=M(4072);const P=W.A.one,S=W.A.triggerHandler,T=W.A.Event},9209:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ee});var W=M(3686),o=M(7007),P=M(2660),b=M(5973),f=M(9961),S=M(3090),T=M(4072),y=M(36),d=M(6054),c=M(3538),s=M(9293),a=M(2432);const g=c.A.inherit({ctor:function(he,de){this._eventName=he,this._originalEvents=(0,s.b4)(de,"dxPointerEvents"),this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble:function(){const he=this._eventName;return"dxpointerenter"===he||"dxpointerleave"===he},_handler:function(he){const de=this._getDelegateTarget(he),ue={type:this._eventName,pointerType:he.pointerType||(0,s.KN)(he),originalEvent:he,delegateTarget:de,timeStamp:y.A.mozilla?(new Date).getTime():he.timeStamp},be=(0,a.w)(he);return ue.target=be,this._fireEvent(ue)},_getDelegateTarget:function(he){let de;return this.noBubble&&(de=he.delegateTarget),de},_fireEvent:function(he){return(0,s.rC)(he)},_setSelector:function(he){this._selector=this.noBubble&&he?he.selector:null},_getSelector:function(){return this._selector},setup:function(){return!0},add:function(he,de){if(this._handlerCount<=0||this.noBubble){he=this.noBubble?he:d.A.getDocument(),this._setSelector(de);const ue=this;T.A.on(he,this._originalEvents,this._getSelector(),function(be){ue._handler(be)})}this.noBubble||this._handlerCount++},remove:function(he){this._setSelector(he),this.noBubble||this._handlerCount--},teardown:function(he){this._handlerCount&&!this.noBubble||(he=this.noBubble?he:d.A.getDocument(),".dxPointerEvents"!==this._originalEvents&&T.A.off(he,this._originalEvents,this._getSelector()))},dispose:function(he){he=this.noBubble?he:d.A.getDocument(),T.A.off(he,this._originalEvents)}}),x=function(he){const de=[];return(0,P.__)(he.touches,function(ue,be){de.push((0,S.X)({pointerId:be.identifier},be))}),{pointers:de,pointerId:he.changedTouches[0].identifier}},D=g.inherit({ctor:function(){this.callBase.apply(this,arguments),this._pointerId=0},_handler:function(he){if(function(he){return"ios"===b.A.real().platform&&("dxpointerdown"===he||"dxpointerup"===he)}(this._eventName)){const de=he.changedTouches[0];if(this._pointerId===de.identifier&&0!==this._pointerId)return;this._pointerId=de.identifier}return this.callBase.apply(this,arguments)},_fireEvent:function(he){return this.callBase((0,S.X)(x(he.originalEvent),he))}});D.map={dxpointerdown:"touchstart",dxpointermove:"touchmove",dxpointerup:"touchend",dxpointercancel:"touchcancel",dxpointerover:"",dxpointerout:"",dxpointerenter:"",dxpointerleave:""},D.normalize=x;const C=D;var I=M(2720);const L=function(he,de){I.A.add(function(){he.split(" ").forEach(function(ue){d.A.listen(d.A.getDocument(),ue,de,!0)})})},G=function(he,de,ue){ue=ue||function(){};let be=[];const ve=function(Ce){let ye=-1;return(0,P.__)(be,function(ge,fe){return!de(Ce,fe)||(ye=ge,!1)}),ye},le=function(Ce){const ye=ve(Ce);ye>-1&&be.splice(ye,1)};L(he.dxpointerdown,function(Ce){-1===ve(Ce)&&(ue(Ce),be.push(Ce))}),L(he.dxpointermove,function(Ce){be[ve(Ce)]=Ce}),L(he.dxpointerup,le),L(he.dxpointercancel,le),this.pointers=function(){return be},this.reset=function(){be=[]}},k={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},U=function(he){return he.pointerId=1,{pointers:B.pointers(),pointerId:1}};let B,K=!1;const J=function(){K||(B=new G(k,function(){return!0}),K=!0)},ie=g.inherit({ctor:function(){this.callBase.apply(this,arguments),J()},_fireEvent:function(he){return this.callBase((0,S.X)(U(he.originalEvent),he))}});ie.map=k,ie.normalize=U,ie.activate=J,ie.resetObserver=function(){B.reset()};const re=ie;let Y=!1;const Q=g.inherit({EVENT_LOCK_TIMEOUT:100,ctor:function(){this.callBase.apply(this,arguments),Y||(re.activate(),Y=!0)},_handler:function(he){const de=(0,s.Er)(he);if(de||(this._skipNextEvents=!0),!de||!this._mouseLocked){if(de&&this._skipNextEvents){this._skipNextEvents=!1,this._mouseLocked=!0,clearTimeout(this._unlockMouseTimer);const ue=this;return void(this._unlockMouseTimer=setTimeout(function(){ue._mouseLocked=!1},this.EVENT_LOCK_TIMEOUT))}return this.callBase(he)}},_fireEvent:function(he){const de=(0,s.Er)(he.originalEvent)?re.normalize:C.normalize;return this.callBase((0,S.X)(de(he.originalEvent),he))},dispose:function(){this.callBase(),this._skipNextEvents=!1,this._mouseLocked=!1,clearTimeout(this._unlockMouseTimer)}});Q.map={dxpointerdown:"touchstart mousedown",dxpointermove:"touchmove mousemove",dxpointerup:"touchend mouseup",dxpointercancel:"touchcancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},Q.resetObserver=re.resetObserver;const te=Q,z=((he,de)=>{let{tablet:ue,phone:be}=de;const ve=function ae(){const he=(0,W.A)().pointerEventStrategy;return{"mouse-and-touch":te,touch:C,mouse:re}[he]}();return ve||(!he.touch||ue||be?he.touch?C:re:te)})(o,b.A.real());(0,P.__)(z.map,(he,de)=>{(0,f.A)(he,new z(he,de))});const ee={down:"dxpointerdown",up:"dxpointerup",move:"dxpointermove",cancel:"dxpointercancel",enter:"dxpointerenter",leave:"dxpointerleave",over:"dxpointerover",out:"dxpointerout"}},1110:(In,Ze,M)=>{"use strict";M.d(Ze,{N:()=>f});var W=M(5704),o=M(5397),P=M(4072),b=M(9961);const f="dxremove",S="dxRemoveEvent";(0,o.z)(function(T){T=[].slice.call(T);for(let y=0;y<T.length;y++){const d=(0,W.A)(T[y]);d.prop(S)&&(d[0][S]=null,P.A.triggerHandler(d,"dxremove"))}}),(0,b.A)("dxremove",{noBubble:!0,setup:function(T){(0,W.A)(T).prop(S,!0)}})},1294:(In,Ze,M)=>{"use strict";M.d(Ze,{PT:()=>y,QJ:()=>_,Rz:()=>s,XC:()=>c,XD:()=>d,XR:()=>T,jM:()=>a,vu:()=>S});var W=M(4072),o=M(7426),P=M(9293);function b(x,w){return w?(0,P.b4)(x,w):x}function f(x,w){return"function"==typeof x?x(w):x.execute(w)}const S={on:(x,w,D,C)=>{const{selector:I,showTimeout:L,hideTimeout:N,namespace:G}=C;W.A.on(x,b("dxactive",G),I,{timeout:L},k=>f(w,{event:k,element:k.currentTarget})),W.A.on(x,b("dxinactive",G),I,{timeout:N},k=>f(D,{event:k,element:k.currentTarget}))},off:(x,w)=>{let{namespace:D,selector:C}=w;W.A.off(x,b("dxactive",D),C),W.A.off(x,b("dxinactive",D),C)}},T={on:function(x,w){let{namespace:D}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};W.A.on(x,b("dxresize",D),w)},off:function(x){let{namespace:w}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W.A.off(x,b("dxresize",w))}},y={on:(x,w,D,C)=>{let{selector:I,namespace:L}=C;W.A.on(x,b("dxhoverend",L),I,N=>D(N)),W.A.on(x,b("dxhoverstart",L),I,N=>f(w,{element:N.target,event:N}))},off:(x,w)=>{let{selector:D,namespace:C}=w;W.A.off(x,b("dxhoverstart",C),D),W.A.off(x,b("dxhoverend",C),D)}},d={on:(x,w,D,C)=>{let{namespace:I}=C;W.A.on(x,b("dxhiding",I),D),W.A.on(x,b("dxshown",I),w)},off:(x,w)=>{let{namespace:D}=w;W.A.off(x,b("dxhiding",D)),W.A.off(x,b("dxshown",D))}},c={on:(x,w,D,C)=>{let{namespace:I}=C;W.A.on(x,b("focusin",I),w),W.A.on(x,b("focusout",I),D)},off:(x,w)=>{let{namespace:D}=w;W.A.off(x,b("focusin",D)),W.A.off(x,b("focusout",D))},trigger:x=>W.A.trigger(x,"focus")},s={on:function(x,w){let{namespace:D}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};W.A.on(x,b("dxclick",D),w)},off:function(x){let{namespace:w}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W.A.off(x,b("dxclick",w))}},a={on:function(x,w){let{namespace:D}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};W.A.on(x,b("click",D),w)},off:function(x){let{namespace:w}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W.A.off(x,b("click",w))}};let u=0;const h={},_={on:(x,w,D)=>{const C="keyboardProcessorId"+u++;return h[C]=new o.A({element:x,focusTarget:w,handler:D}),C},off:x=>{x&&h[x]&&(h[x].dispose(),delete h[x])},_getProcessor:x=>h[x]}},8842:(In,Ze,M)=>{"use strict";M.d(Ze,{By:()=>S,_N:()=>T,ni:()=>f});var W=M(1363),o=M(9293),P=M(9659),b=M(6211);const f="dxswipestart",S="dxswipe",T="dxswipeend",c={horizontal:{defaultItemSizeFunc:function(){return(0,W.RG)(this.getElement())},getBounds:function(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio:function(a){return((0,o.rw)(a).x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,a)},isFastSwipe:function(a){const u=(0,o.rw)(a);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(u.x-this._tickData.x)>=u.time-this._tickData.time}},vertical:{defaultItemSizeFunc:function(){return(0,W.Oq)(this.getElement())},getBounds:function(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio:function(a){return((0,o.rw)(a).y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,a)},isFastSwipe:function(a){const u=(0,o.rw)(a);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(u.y-this._tickData.y)>=u.time-this._tickData.time}}},s=P.A.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:10,ctor:function(a){this.callBase(a),this.direction="horizontal",this.elastic=!0},_getStrategy:function(){return c[this.direction]},_defaultItemSizeFunc:function(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc:function(){return this.itemSizeFunc||this._defaultItemSizeFunc},_init:function(a){this._tickData=(0,o.rw)(a)},_start:function(a){this._savedEventData=(0,o.rw)(a),(a=this._fireEvent("dxswipestart",a)).cancel||(this._maxLeftOffset=a.maxLeftOffset,this._maxRightOffset=a.maxRightOffset,this._maxTopOffset=a.maxTopOffset,this._maxBottomOffset=a.maxBottomOffset)},_move:function(a){const u=this._getStrategy(),h=(0,o.rw)(a);let g=u.calcOffsetRatio.call(this,a);g=this._fitOffset(g,this.elastic),h.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=h),this._fireEvent("dxswipe",a,{offset:g}),!1!==a.cancelable&&a.preventDefault()},_end:function(a){const u=this._getStrategy(),h=u.calcOffsetRatio.call(this,a),g=u.isFastSwipe.call(this,a);let _=h,x=this._calcTargetOffset(h,g);_=this._fitOffset(_,this.elastic),x=this._fitOffset(x,!1),this._fireEvent("dxswipeend",a,{offset:_,targetOffset:x})},_fitOffset:function(a,u){const g=this._getStrategy().getBounds.call(this);return a<-g[0]?u?(-2*g[0]+a)/3:-g[0]:a>g[1]?u?(2*g[1]+a)/3:g[1]:a},_calcTargetOffset:function(a,u){let h;return u?(h=Math.ceil(Math.abs(a)),a<0&&(h=-h)):h=Math.round(a),h}});(0,b.A)({emitter:s,events:["dxswipestart","dxswipe","dxswipeend"]})},2432:(In,Ze,M)=>{"use strict";M.d(Ze,{w:()=>W});const W=o=>{var P,b;const f=o.originalEvent;if(!f)return o.target;if(null===(P=f.target)||void 0===P||!P.shadowRoot)return f.target;const T=f.path??(null===(b=f.composedPath)||void 0===b?void 0:b.call(f));return T?.[0]??o.target}},9293:(In,Ze,M)=>{"use strict";M.d(Ze,{b4:()=>te,lh:()=>q,rw:()=>G,nm:()=>k,KN:()=>x,rC:()=>Y,Pg:()=>Q,Ic:()=>U,By:()=>pe,X1:()=>C,_0:()=>N,Er:()=>D,EE:()=>w,kH:()=>I,eT:()=>ie,YD:()=>Z});var W=M(5704),o=M(7251);const P=(z,oe)=>{if(!oe)throw o.A.Error("E0017");return Array.isArray(z)?z.map(ae=>P(ae,oe)).join(" "):-1!==z.indexOf(" ")?P(z.split(/\s+/g),oe):`${z}.${oe}`},b=P;var f=M(4072),S=M(2660),T=M(3090),y=M(402);const d={backspace:"backspace",tab:"tab",enter:"enter",escape:"escape",pageup:"pageUp",pagedown:"pageDown",end:"end",home:"home",arrowleft:"leftArrow",arrowup:"upArrow",arrowright:"rightArrow",arrowdown:"downArrow",delete:"del"," ":"space",f:"F",a:"A","*":"asterisk","-":"minus",alt:"alt",control:"control",shift:"shift"},c={8:"backspace",9:"tab",13:"enter",27:"escape",33:"pageUp",34:"pageDown",35:"end",36:"home",37:"leftArrow",38:"upArrow",39:"rightArrow",40:"downArrow",46:"del",32:"space",70:"F",65:"A",106:"asterisk",109:"minus",189:"minus",173:"minus",16:"shift",17:"control",18:"alt"},s={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i};const h=z=>"dx"===x(z),_=z=>"touch"===x(z),x=z=>{let{type:oe}=z,ae="other";return(0,S.__)(s,function(ee){if(this.test(oe))return ae=ee,!1}),ae},w=z=>"pointer"===x(z),D=z=>(z=>"mouse"===x(z))(z)||(w(z)||h(z))&&"mouse"===z.pointerType,C=z=>z&&"dxmousewheel"===z.type,I=z=>_(z)||(w(z)||h(z))&&"touch"===z.pointerType,N=z=>{let{screenX:oe,offsetX:ae,pageX:ee}=z;return 0===oe&&!ae&&0===ee},G=z=>{let{pageX:oe,pageY:ae,timeStamp:ee}=z;return{x:oe,y:ae,time:ee}},k=(z,oe)=>({x:oe.x-z.x,y:oe.y-z.y,time:oe.time-z.time||1}),U=z=>{const{originalEvent:oe,pointers:ae}=z;return _(z)?(oe.touches||[]).length:h(z)?(ae||[]).length:0};const ie=z=>{const{target:oe}=z,ae=(0,W.A)(oe),ee=oe?.isContentEditable||oe?.hasAttribute("contenteditable"),he=ae.is("input, textarea, select")||ee;return C(z)?!(ae.is("textarea")&&ae.hasClass("dx-texteditor-input")||ee)&&ae.is("input[type='number'], textarea, select")&&ae.is(":focus"):D(z)?he||z.which>1:I(z)?he&&(0,y.in)(ae):void 0},q=(z,oe)=>{const ae=(z=>f.A.Event(z,z))(z);return oe&&(0,T.X)(ae,oe),ae},Y=z=>{const{originalEvent:oe,delegateTarget:ae}=z,ee=q(oe,z);return f.A.trigger(ae||ee.target,ee),ee},Z=z=>{let{key:oe,which:ae}=z;const ee=d[oe?.toLowerCase()]||oe,he=c[ae];return he&&ee===oe?he:!ee&&ae?String.fromCharCode(ae):ee},Q=z=>{let{key:oe,which:ae}=z;return oe||String.fromCharCode(ae)},te=b,pe=z=>{let{ctrlKey:oe,metaKey:ae}=z;return oe||ae}},9229:(In,Ze,M)=>{"use strict";M.d(Ze,{EH:()=>f,I9:()=>b,ho:()=>S});var W=M(5704),o=M(4072);const P=function(T){return function(y){const d=(0,W.A)(y||"body"),c=d.filter(".dx-visibility-change-handler").add(d.find(".dx-visibility-change-handler"));for(let s=0;s<c.length;s++)o.A.triggerHandler(c[s],T)}},b=P("dxshown"),f=P("dxhiding"),S=P("dxresize")},6772:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(1830),o=M(676),P=M(1520),b=M(9061),f=M(1926);M(9461);const T=(0,f.A)({format:function(y,d){const c=(0,W.Kg)(d)&&""!==d||(0,W.Qd)(d)||(0,W.Tn)(d),s=(0,W.kf)(y)||(0,W.$P)(y);return c&&s?(0,W.Tn)(d)?d(y):((0,W.Kg)(d)&&(d={type:d}),(0,W.kf)(y)?P.A.format(y,d):(0,W.$P)(y)?b.A.format(y,d):void 0):(0,W.O9)(y)?y.toString():""},getTimeFormat:function(y){return y?"longtime":"shorttime"},_normalizeFormat:function(y){return Array.isArray(y)?1===y.length?y[0]:function(d){return y.map(function(c){return b.A.format(d,c)}).join(" ")}:y},getDateFormatByDifferences:function(y,d){const c=[],s=d&&y.millisecond&&!(y.year||y.month||y.day);return s?c.push(function(u){return u.getSeconds()+u.getMilliseconds()/1e3+"s"}):y.millisecond&&c.push("millisecond"),(y.hour||y.minute||!s&&y.second)&&c.unshift(this.getTimeFormat(y.second)),y.year&&y.month&&y.day?d&&"month"===d?"monthandyear":(c.unshift("shortdate"),this._normalizeFormat(c)):y.year&&y.month?"monthandyear":y.year&&y.quarter?"quarterandyear":y.year?"year":y.quarter?"quarter":y.month&&y.day?(c.unshift(d?function(u){return b.A.getMonthNames("abbreviated")[u.getMonth()]+" "+b.A.format(u,"day")}:"monthandday"),this._normalizeFormat(c)):y.month?"month":y.day?(c.unshift(d?"day":function(u){return b.A.format(u,"dayofweek")+", "+b.A.format(u,"day")}),this._normalizeFormat(c)):this._normalizeFormat(c)},getDateFormatByTicks:function(y){let d,c,s;if(y.length>1)for(d=o.A.getDatesDifferences(y[0],y[1]),s=1;s<y.length-1;s++)c=o.A.getDatesDifferences(y[s],y[s+1]),d.count<c.count&&(d=c);else d={year:!0,month:!0,day:!0,hour:y[0].getHours()>0,minute:y[0].getMinutes()>0,second:y[0].getSeconds()>0,millisecond:y[0].getMilliseconds()>0};return this.getDateFormatByDifferences(d)},getDateFormatByTickInterval:function(y,d,c){let s;const a=function(g,_,x){switch(_){case"year":case"quarter":g.month=x;case"month":g.day=x;case"week":case"day":g.hour=x;case"hour":g.minute=x;case"minute":g.second=x;case"second":g.millisecond=x}};c=(0,W.Kg)(c)?c.toLowerCase():c;const u=o.A.getDatesDifferences(y,d);return y!==d&&(g=u,_=y>d?d:y,!(x=y>d?y:d).getMilliseconds()&&x.getSeconds()?x.getSeconds()-_.getSeconds()==1&&(g.millisecond=!0,g.second=!1):!x.getSeconds()&&x.getMinutes()?x.getMinutes()-_.getMinutes()==1&&(g.second=!0,g.minute=!1):!x.getMinutes()&&x.getHours()?x.getHours()-_.getHours()==1&&(g.minute=!0,g.hour=!1):!x.getHours()&&x.getDate()>1?x.getDate()-_.getDate()==1&&(g.hour=!0,g.day=!1):1===x.getDate()&&x.getMonth()?x.getMonth()-_.getMonth()==1&&(g.day=!0,g.month=!1):!x.getMonth()&&x.getFullYear()&&x.getFullYear()-_.getFullYear()==1&&(g.month=!0,g.year=!1)),s=o.A.getDateUnitInterval(u),a(u,s,!0),s=o.A.getDateUnitInterval(c||"second"),a(u,s,!1),u[{week:"day"}[s]||s]=!0,this.getDateFormatByDifferences(u);var g,_,x}})},2923:(In,Ze,M)=>{"use strict";M.d(Ze,{Hg:()=>S,Yq:()=>s,ZV:()=>d,fH:()=>T});var W=M(7280),o=M(8360),P=M(1520),b=M(9061);M(9461);const S=W.A.locale.bind(W.A),T=o.A.load.bind(o.A),d=(o.A.format.bind(o.A),P.A.format.bind(P.A)),s=(P.A.parse.bind(P.A),b.A.format.bind(b.A));b.A.parse.bind(b.A)},7280:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>S});var W=M(1926);const o={"en-150":"en-001","en-AG":"en-001","en-AI":"en-001","en-AU":"en-001","en-BB":"en-001","en-BM":"en-001","en-BS":"en-001","en-BW":"en-001","en-BZ":"en-001","en-CC":"en-001","en-CK":"en-001","en-CM":"en-001","en-CX":"en-001","en-CY":"en-001","en-DG":"en-001","en-DM":"en-001","en-ER":"en-001","en-FJ":"en-001","en-FK":"en-001","en-FM":"en-001","en-GB":"en-001","en-GD":"en-001","en-GG":"en-001","en-GH":"en-001","en-GI":"en-001","en-GM":"en-001","en-GY":"en-001","en-HK":"en-001","en-IE":"en-001","en-IL":"en-001","en-IM":"en-001","en-IN":"en-001","en-IO":"en-001","en-JE":"en-001","en-JM":"en-001","en-KE":"en-001","en-KI":"en-001","en-KN":"en-001","en-KY":"en-001","en-LC":"en-001","en-LR":"en-001","en-LS":"en-001","en-MG":"en-001","en-MO":"en-001","en-MS":"en-001","en-MT":"en-001","en-MU":"en-001","en-MV":"en-001","en-MW":"en-001","en-MY":"en-001","en-NA":"en-001","en-NF":"en-001","en-NG":"en-001","en-NR":"en-001","en-NU":"en-001","en-NZ":"en-001","en-PG":"en-001","en-PK":"en-001","en-PN":"en-001","en-PW":"en-001","en-RW":"en-001","en-SB":"en-001","en-SC":"en-001","en-SD":"en-001","en-SG":"en-001","en-SH":"en-001","en-SL":"en-001","en-SS":"en-001","en-SX":"en-001","en-SZ":"en-001","en-TC":"en-001","en-TK":"en-001","en-TO":"en-001","en-TT":"en-001","en-TV":"en-001","en-TZ":"en-001","en-UG":"en-001","en-VC":"en-001","en-VG":"en-001","en-VU":"en-001","en-WS":"en-001","en-ZA":"en-001","en-ZM":"en-001","en-ZW":"en-001","en-AT":"en-150","en-BE":"en-150","en-CH":"en-150","en-DE":"en-150","en-DK":"en-150","en-FI":"en-150","en-NL":"en-150","en-SE":"en-150","en-SI":"en-150","hi-Latn":"en-IN","es-AR":"es-419","es-BO":"es-419","es-BR":"es-419","es-BZ":"es-419","es-CL":"es-419","es-CO":"es-419","es-CR":"es-419","es-CU":"es-419","es-DO":"es-419","es-EC":"es-419","es-GT":"es-419","es-HN":"es-419","es-MX":"es-419","es-NI":"es-419","es-PA":"es-419","es-PE":"es-419","es-PR":"es-419","es-PY":"es-419","es-SV":"es-419","es-US":"es-419","es-UY":"es-419","es-VE":"es-419",nb:"no",nn:"no","pt-AO":"pt-PT","pt-CH":"pt-PT","pt-CV":"pt-PT","pt-FR":"pt-PT","pt-GQ":"pt-PT","pt-GW":"pt-PT","pt-LU":"pt-PT","pt-MO":"pt-PT","pt-MZ":"pt-PT","pt-ST":"pt-PT","pt-TL":"pt-PT","az-Arab":"und","az-Cyrl":"und","bal-Latn":"und","blt-Latn":"und","bm-Nkoo":"und","bs-Cyrl":"und","byn-Latn":"und","cu-Glag":"und","dje-Arab":"und","dyo-Arab":"und","en-Dsrt":"und","en-Shaw":"und","ff-Adlm":"und","ff-Arab":"und","ha-Arab":"und","iu-Latn":"und","kk-Arab":"und","ks-Deva":"und","ku-Arab":"und","ky-Arab":"und","ky-Latn":"und","ml-Arab":"und","mn-Mong":"und","mni-Mtei":"und","ms-Arab":"und","pa-Arab":"und","sat-Deva":"und","sd-Deva":"und","sd-Khoj":"und","sd-Sind":"und","shi-Latn":"und","so-Arab":"und","sr-Latn":"und","sw-Arab":"und","tg-Arab":"und","ug-Cyrl":"und","uz-Arab":"und","uz-Cyrl":"und","vai-Latn":"und","wo-Arab":"und","yo-Arab":"und","yue-Hans":"und","zh-Hant":"und","zh-Hant-MO":"zh-Hant-HK"},b=(T,y)=>{const d=T[y];return d?"root"!==d&&d:y.substr(0,y.lastIndexOf("-"))},S=(0,W.A)({locale:(()=>{let T="en";return y=>{if(!y)return T;T=y}})(),getValueByClosestLocale:function(T){let c,y=this.locale(),d=T(y);for(;!d&&!c;)y=b(o,y),y?d=T(y):c=!0;return void 0===d&&"en"!==y?T("en"):d}})},9461:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});var W=M(3090);const o={_formatNumberCore:function(P,b,f){if("currency"===b){f.precision=f.precision||0;let S=this.format(P,(0,W.X)({},f,{type:"fixedpoint"}));const T=this.getCurrencySymbol().symbol.replace(/\$/g,"$$$$");return S=S.replace(/^(\D*)(\d.*)/,"$1"+T+"$2"),S}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(){return{symbol:"$"}},getOpenXmlCurrencyFormat:function(){return"$#,##0{0}_);\\($#,##0{0}\\)"}}},9061:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Z});var W=M(1926),o=M(1830),P=M(2660),b=M(7251),f=M(5870),S=M(53),T=M(1013),y=M(5259);const d={"af-NA":1,agq:1,ak:1,ar:6,"ar-EH":1,"ar-ER":1,"ar-KM":1,"ar-LB":1,"ar-MA":1,"ar-MR":1,"ar-PS":1,"ar-SO":1,"ar-SS":1,"ar-TD":1,"ar-TN":1,asa:1,ast:1,az:1,"az-Cyrl":1,bas:1,be:1,bem:1,bez:1,bg:1,bm:1,br:1,bs:1,"bs-Cyrl":1,ca:1,ce:1,cgg:1,ckb:6,cs:1,cy:1,da:1,de:1,dje:1,dsb:1,dua:1,dyo:1,ee:1,el:1,"en-001":1,"en-AE":6,"en-BI":1,"en-MP":1,"en-MV":5,"en-SD":6,eo:1,es:1,et:1,eu:1,ewo:1,fa:6,ff:1,"ff-Adlm":1,fi:1,fo:1,fr:1,"fr-DJ":6,"fr-DZ":6,"fr-SY":6,fur:1,fy:1,ga:1,gd:1,gl:1,gsw:1,gv:1,ha:1,hr:1,hsb:1,hu:1,hy:1,ia:1,ig:1,is:1,it:1,jgo:1,jmc:1,ka:1,kab:6,kde:1,kea:1,khq:1,kk:1,kkj:1,kl:1,"ko-KP":1,ksb:1,ksf:1,ksh:1,ku:1,kw:1,ky:1,lag:1,lb:1,lg:1,ln:1,lrc:6,lt:1,lu:1,lv:1,"mas-TZ":1,mfe:1,mg:1,mgo:1,mi:1,mk:1,mn:1,ms:1,mua:1,mzn:6,naq:1,nds:1,nl:1,nmg:1,nnh:1,no:1,nus:1,nyn:1,os:1,pcm:1,pl:1,ps:6,"pt-AO":1,"pt-CH":1,"pt-CV":1,"pt-GQ":1,"pt-GW":1,"pt-LU":1,"pt-ST":1,"pt-TL":1,"qu-BO":1,"qu-EC":1,rm:1,rn:1,ro:1,rof:1,ru:1,rw:1,rwk:1,sah:1,sbp:1,sc:1,se:1,ses:1,sg:1,shi:1,"shi-Latn":1,si:1,sk:1,sl:1,smn:1,so:1,"so-DJ":6,sq:1,sr:1,"sr-Latn":1,sv:1,sw:1,"ta-LK":1,"ta-MY":1,teo:1,tg:1,"ti-ER":1,tk:1,to:1,tr:1,tt:1,twq:1,tzm:1,uk:1,uz:1,"uz-Arab":6,"uz-Cyrl":1,vai:1,"vai-Latn":1,vi:1,vun:1,wae:1,wo:1,xog:1,yav:1,yi:1,yo:1,zgh:1};var c=M(7280),s=M(1520),a=M(3090);const u=/[\u200E\u200F]/g,h=/[\u202F]/g,g=Q=>te=>{if(!Q.timeZoneName){const pe=te.getFullYear(),z=String(pe).length<3,ee=new Date(Date.UTC(z?pe+400:pe,te.getMonth(),te.getDate(),te.getHours(),te.getMinutes(),te.getSeconds(),te.getMilliseconds()));return z&&ee.setFullYear(pe),w(ee,(0,a.X)({timeZone:"UTC"},Q))}return w(te,Q)},_={},x=Q=>{const te=c.A.locale()+"/"+JSON.stringify(Q);return _[te]||(_[te]=new Intl.DateTimeFormat(c.A.locale(),Q).format),_[te]};function w(Q,te){return x(te)(Q).replace(u,"").replace(h," ")}const D=Q=>new Intl.NumberFormat(c.A.locale()).format(Q),C=(()=>{const Q={};return te=>{if(!(te in Q)){if("0"===D(0))return Q[te]=!1,!1;Q[te]={};for(let pe=0;pe<10;++pe)Q[te][D(pe)]=pe}return Q[te]}})(),I=Q=>{const te=C(c.A.locale());return te?Q.split("").map(pe=>pe in te?String(te[pe]):pe).join(""):Q},L=Q=>Q.replace(/(\D)0+(\d)/g,"$1$2"),G=Q=>Q.replace("d\u2019","de "),k={day:{day:"numeric"},date:{year:"numeric",month:"long",day:"numeric"},dayofweek:{weekday:"long"},longdate:{weekday:"long",year:"numeric",month:"long",day:"numeric"},longdatelongtime:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},longtime:{hour:"numeric",minute:"numeric",second:"numeric"},month:{month:"long"},monthandday:{month:"long",day:"numeric"},monthandyear:{year:"numeric",month:"long"},shortdate:{},shorttime:{hour:"numeric",minute:"numeric"},shortyear:{year:"2-digit"},year:{year:"numeric"}};Object.defineProperty(k,"shortdateshorttime",{get:function(){const Q=Intl.DateTimeFormat(c.A.locale()).resolvedOptions();return{year:Q.year,month:Q.month,day:Q.day,hour:"numeric",minute:"numeric"}}});const B={standalone:function(Q,te){const pe=new Date(1999,Q,13,1);return g({month:te})(pe)},format:function(Q,te){const pe=new Date(0,Q,13,1),oe=G(g({day:"numeric",month:te})(pe)).split(" ").filter(ae=>ae.indexOf("13")<0);return 1===oe.length?oe[0]:2===oe.length?oe[0].length>oe[1].length?oe[0]:oe[1]:B.standalone(Q,te)}},K={engine:function(){return"intl"},getMonthNames:function(Q,te){const pe={wide:"long",abbreviated:"short",narrow:"narrow"}[Q||"wide"];return te="format"===te?te:"standalone",Array.apply(null,new Array(12)).map((z,oe)=>B[te](oe,pe))},getDayNames:function(Q){return pe={wide:"long",abbreviated:"short",short:"narrow",narrow:"narrow"}[Q||"wide"],Array.apply(null,new Array(7)).map((z,oe)=>g({weekday:pe})(new Date(0,0,oe)));var pe},getPeriodNames:function(){const Q=g({hour:"numeric",hour12:!0});return[1,13].map(te=>{const pe=D(1),z=Q(new Date(0,0,1,te)).split(pe);return 2!==z.length?"":(z[0].length>z[1].length?z[0]:z[1]).trim()})},format:function(Q,te){if(!Q)return;if(!te)return Q;"function"!=typeof te&&!te.formatter&&(te=te.type||te);const pe=(Q=>"string"==typeof Q&&k[Q.toLowerCase()])(te);if(pe)return g(pe)(Q);const z=typeof te;return te.formatter||"function"===z||"string"===z?this.callBase.apply(this,arguments):g(te)(Q)},parse:function(Q,te){let pe;return te&&!te.parser&&"string"==typeof Q&&(Q=G(Q),pe=z=>G(this.format(z,te))),this.callBase(Q,pe||te)},_parseDateBySimpleFormat:function(Q,te){Q=I(Q);const pe=this.getFormatParts(te),z=Q.split(/\D+/).filter(ee=>ee.length>0);if(pe.length!==z.length)return;const oe=this._generateDateArgs(pe,z),ae=ee=>{const he=(de=oe,new Date(de.year,de.month,de.day,(de.hours+(ee?12:0))%24,de.minutes,de.seconds));var de;if(((Q,te)=>L(Q)===L(te))(I(this.format(he,te)),Q))return he};return ae(!1)||ae(!0)},_generateDateArgs:function(Q,te){const pe=new Date,z={year:pe.getFullYear(),month:pe.getMonth(),day:pe.getDate(),hours:0,minutes:0,seconds:0};return Q.forEach((oe,ae)=>{let he=parseInt(te[ae],10);"month"===oe&&(he-=1),z[oe]=he}),z},formatUsesMonthName:function(Q){return"object"!=typeof Q||Q.type||Q.format?this.callBase.apply(this,arguments):"long"===Q.month},formatUsesDayName:function(Q){return"object"!=typeof Q||Q.type||Q.format?this.callBase.apply(this,arguments):"long"===Q.weekday},getTimeSeparator:function(){return I(w(new Date(2001,1,1,11,11),{hour:"numeric",minute:"numeric",hour12:!1})).replace(/\d/g,"")},getFormatParts:function(Q){if("string"==typeof Q)return this.callBase(Q);const te=(0,a.X)({},k[Q.toLowerCase()]),pe=new Date(2001,2,4,5,6,7);let z=g(te)(pe);return z=I(z),[{name:"year",value:1},{name:"month",value:3},{name:"day",value:4},{name:"hours",value:5},{name:"minutes",value:6},{name:"seconds",value:7}].map(oe=>({name:oe.name,index:z.indexOf(oe.value)})).filter(oe=>oe.index>-1).sort((oe,ae)=>oe.index-ae.index).map(oe=>oe.name)}},ie=typeof Intl<"u",re={shortdate:"M/d/y",shorttime:"h:mm a",longdate:"EEEE, MMMM d, y",longtime:"h:mm:ss a",monthandday:"MMMM d",monthandyear:"MMMM y",quarterandyear:"QQQ y",day:"d",year:"y",shortdateshorttime:"M/d/y, h:mm a",longdatelongtime:"EEEE, MMMM d, y, h:mm:ss a",month:"LLLL",shortyear:"yy",dayofweek:"EEEE",quarter:"QQQ",hour:"HH",minute:"mm",second:"ss",millisecond:"SSS","datetime-local":"yyyy-MM-ddTHH':'mm':'ss"},q={year:["y","yy","yyyy"],day:["d","dd"],month:["M","MM","MMM","MMMM"],hours:["H","HH","h","hh","ah"],minutes:["m","mm"],seconds:["s","ss"],milliseconds:["S","SS","SSS"]},Y=(0,W.A)({engine:function(){return"base"},_getPatternByFormat:function(Q){return re[Q.toLowerCase()]},_expandPattern:function(Q){return this._getPatternByFormat(Q)||Q},formatUsesMonthName:function(Q){return-1!==this._expandPattern(Q).indexOf("MMMM")},formatUsesDayName:function(Q){return-1!==this._expandPattern(Q).indexOf("EEEE")},getFormatParts:function(Q){const te=this._getPatternByFormat(Q)||Q,pe=[];return(0,P.__)(te.split(/\W+/),(z,oe)=>{(0,P.__)(q,(ae,ee)=>{ee.includes(oe)&&pe.push(ae)})}),pe},getMonthNames:function(Q){return y.A.getMonthNames(Q)},getDayNames:function(Q){return y.A.getDayNames(Q)},getQuarterNames:function(Q){return y.A.getQuarterNames(Q)},getPeriodNames:function(Q){return y.A.getPeriodNames(Q)},getTimeSeparator:function(){return":"},is24HourFormat:function(Q){const te=new Date(2017,0,20,11,0,0,0),pe=new Date(2017,0,20,23,0,0,0),z=this.format(te,Q),oe=this.format(pe,Q);for(let ae=0;ae<z.length;ae++)if(z[ae]!==oe[ae])return!isNaN(parseInt(z[ae]))},format:function(Q,te){if(!Q)return;if(!te)return Q;let pe;if("function"==typeof te)pe=te;else if(te.formatter)pe=te.formatter;else if((0,o.Kg)(te=te.type||te))return te=re[te.toLowerCase()]||te,s.A.convertDigits((0,f.f)(te,this)(Q));return pe?pe(Q):void 0},parse:function(Q,te){const pe=this;let z,oe;if(!Q)return;if(!te)return this.parse(Q,"shortdate");if(te.parser)return te.parser(Q);if("string"!=typeof te||re[te.toLowerCase()]){oe=ee=>{const he=pe.format(ee,te);return s.A.convertDigits(he,!0)};try{z=(0,S.g)(oe)}catch{}}else z=te;if(z)return Q=s.A.convertDigits(Q,!0),(0,T.SQ)(z,this)(Q);b.A.log("W0012");const ae=new Date(Q);return ae&&!isNaN(ae.getTime())?ae:void 0},firstDayOfWeekIndex:function(){const Q=c.A.getValueByClosestLocale(te=>d[te]);return void 0===Q?0:Q}});ie&&Y.inject(K);const Z=Y},5259:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(2660);const o=["January","February","March","April","May","June","July","August","September","October","November","December"],P=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["AM","PM"],f=["Q1","Q2","Q3","Q4"],S=(y,d)=>{const c={abbreviated:3,short:2,narrow:1};return(0,W.Tj)(y,s=>s.substr(0,c[d]))},T={getMonthNames:function(y){return S(o,y)},getDayNames:function(y){return S(P,y)},getQuarterNames:function(y){return f},getPeriodNames:function(y){return b}}},53:(In,Ze,M)=>{"use strict";M.d(Ze,{g:()=>h});var W=M(1520);const P=" .,:;/\\<>()-[]\u060c",f=function(g){const _=g&&W.A.convertDigits(g,!1).charCodeAt(0),x=W.A.convertDigits("0",!1).charCodeAt(0);return x<=_&&_<x+10},S=function(g,_,x,w){const D=g[x],C=g[x+1];if(!w&&("."===D||" "===D&&". m."===g.slice(x-1,x+3)||"-"===D&&!f(C)))return!0;const I=w&&_.some(L=>g[x]!==L[x]);return P.indexOf(D)<0&&w===f(D)&&(!w||I)},T=function(g,_){if(!f(g[_]))for(;_>0&&!f(g[_-1])&&("."===g[_-1]||P.indexOf(g[_-1])<0);)_--;return _},s=function(g,_){return Array.isArray(g)?g.map(function(x){return(_(x)||"").toString()}):(_(g)||"").toString()},a=/[a-zA-Z]/g,h=function(g){const _=[],x=s(new Date(2009,8,8,6,5,4),g),w=x.split("").map(function(L,N){return N});let D=x;const C={},I=[{date:new Date(2009,8,8,6,5,4,111),pattern:"S"},{date:new Date(2009,8,8,6,5,2),pattern:"s"},{date:new Date(2009,8,8,6,2,4),pattern:"m"},{date:new Date(2009,8,8,18,5,4),pattern:"H",isDigit:!0},{date:new Date(2009,8,8,2,5,4),pattern:"h",isDigit:!0},{date:new Date(2009,8,8,18,5,4),pattern:"a",isDigit:!1},{date:new Date(2009,8,1,6,5,4),pattern:"d"},{date:[new Date(2009,8,2,6,5,4),new Date(2009,8,3,6,5,4),new Date(2009,8,4,6,5,4)],pattern:"E"},{date:new Date(2009,9,6,6,5,4),pattern:"M"},{date:new Date(1998,8,8,6,5,4),pattern:"y"}];if(D&&(I.forEach(function(L){const N=function(g,_,x,w){let D=0;const C=[],I=function(L){return g[D]!==L[D]&&(void 0===w||f(g[D])===w)};for(Array.isArray(_)||(_=[_]),D=0;D<g.length;D++)if(x.indexOf(D)<0&&_.filter(I).length){D=T(g,D);do{if(w=f(g[D]),!C.length&&!w&&f(_[0][D]))break;C.push(D),x.unshift(D),D++}while(g[D]&&S(g,_,D,w));break}return 1===C.length&&("0"===g[x[0]-1]||"\u0660"===g[x[0]-1])&&x.unshift(x[0]-1),C}(x,s(L.date,g),_,L.isDigit),G="M"!==L.pattern||C.d?L.pattern:"L";D=function(g,_,x,w){let D,C,I;if(!f(g[_[0]]||"0")){const L=Math.max(_.length<=3?3:4,x.length);for(;_.length>L;){for(C=_.pop(),I=w[C],w[C]=-1,D=C+1;D<w.length;D++)w[D]--;g=g.substr(0,I)+g.substr(I+1)}for(C=_[_.length-1]+1,I=C<w.length?w[C]:C;_.length<L;){for(_.push(_[_.length-1]+1),D=C;D<w.length;D++)w[D]++;g=g.substr(0,I)+" "+g.substr(I)}}return g=function(g,_,x,w){const D=_[0],C=D<w.length?w[D]:D;return _.forEach(function(I,L){g=g.substr(0,C+L)+(x.length>1?x[L]:x)+g.substr(C+L+1)}),1===_.length&&(g=(g=g.replace("0"+x,x+x)).replace("\u0660"+x,x+x)),g}(g,_,x,w),g}(D,N,G,w),C[G]=N.length}),D=function(g,_,x,w){const D=_.split("").map(function(C,I){return x.indexOf(I)<0&&(C.match(a)||"'"===C)?w[I]:-1});return g.split("").map(function(C,I){let L=C;const N=D.indexOf(I)>=0,G=I>0&&D.indexOf(I-1)>=0,k=D.indexOf(I+1)>=0;return N&&(G||(L="'"+L),k||(L+="'")),L}).join("")}(D,x,_,w),_.length))return D}},5870:(In,Ze,M)=>{"use strict";function W(f,S){for(;f.length<S;)f="0"+f;return f}M.d(Ze,{f:()=>b});const o={3:"abbreviated",4:"wide",5:"narrow"},P={y:function(f,S,T){let y=f[T?"getUTCFullYear":"getFullYear"]();return 2===S&&(y%=100),W(y.toString(),S)},M:function(f,S,T,y){const d=f[T?"getUTCMonth":"getMonth"](),c=o[S];return c?y.getMonthNames(c,"format")[d]:W((d+1).toString(),Math.min(S,2))},L:function(f,S,T,y){const d=f[T?"getUTCMonth":"getMonth"](),c=o[S];return c?y.getMonthNames(c,"standalone")[d]:W((d+1).toString(),Math.min(S,2))},Q:function(f,S,T,y){const d=f[T?"getUTCMonth":"getMonth"](),c=Math.floor(d/3),s=o[S];return s?y.getQuarterNames(s)[c]:W((c+1).toString(),Math.min(S,2))},E:function(f,S,T,y){const d=f[T?"getUTCDay":"getDay"]();return y.getDayNames(o[S<3?3:S])[d]},a:function(f,S,T,y){const c=f[T?"getUTCHours":"getHours"]()<12?0:1;return y.getPeriodNames(o[S])[c]},d:function(f,S,T){return W(f[T?"getUTCDate":"getDate"]().toString(),Math.min(S,2))},H:function(f,S,T){return W(f[T?"getUTCHours":"getHours"]().toString(),Math.min(S,2))},h:function(f,S,T){return W((f[T?"getUTCHours":"getHours"]()%12||12).toString(),Math.min(S,2))},m:function(f,S,T){return W(f[T?"getUTCMinutes":"getMinutes"]().toString(),Math.min(S,2))},s:function(f,S,T){return W(f[T?"getUTCSeconds":"getSeconds"]().toString(),Math.min(S,2))},S:function(f,S,T){return W(f[T?"getUTCMilliseconds":"getMilliseconds"]().toString(),3).substr(0,S)},x:function(f,S,T){const y=T?0:f.getTimezoneOffset(),d=y>0?"-":"+",c=Math.abs(y),a=c%60,u=W(Math.floor(c/60).toString(),2),h=W(a.toString(),2);return d+u+(S>=3?":":"")+(S>1||a?h:"")},X:function(f,S,T){return T||!f.getTimezoneOffset()?"Z":P.x(f,S,T)},Z:function(f,S,T){return P.X(f,S>=5?3:2,T)}},b=function(f,S){return function(T){let y,d,c,u,s=0,a=!1,h="";if(!T)return null;if(!f)return T;const g="Z"===f[f.length-1]||"'Z'"===f.slice(-3);for(y=0;y<f.length;y++)c=f[y],d=P[c],u=c===f[y+1],s++,u||(d&&!a&&(h+=d(T,s,g,S)),s=0),"'"!==c||u?(a||!d)&&(h+=c):a=!a,"'"===c&&u&&y++;return h}}},1013:(In,Ze,M)=>{"use strict";M.d(Ze,{SQ:()=>N,rt:()=>x,wu:()=>h});var W=M(4859),o=M(8181);const P={3:"abbreviated",4:"wide",5:"narrow"},b=function(G,k){return G>2?Object.keys(P).map(function(U){return["format","standalone"].map(function(B){return k.getMonthNames(P[U],B).join("|")}).join("|")}).join("|"):2===G?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},f={":":function(G,k){const U=G>1?`{${G}}`:"";let B=(0,W.Nt)(k.getTimeSeparator());return":"!==B&&(B=`${B}|:`),`${B}${U}`},y:function(G){return 2===G?`[0-9]{${G}}`:"[0-9]+?"},M:b,L:b,Q:function(G,k){return G>2?k.getQuarterNames(P[G],"format").join("|"):"0?[1-4]"},E:function(G,k){return"\\D*"},a:function(G,k){return k.getPeriodNames(P[G<3?3:G],"format").join("|")},d:function(G){return 2===G?"3[01]|[12][0-9]|0?[1-9]":"0??[1-9]|[12][0-9]|3[01]"},H:function(G){return 2===G?"2[0-3]|1[0-9]|0?[0-9]":"0??[0-9]|1[0-9]|2[0-3]"},h:function(G){return 2===G?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},m:function(G){return 2===G?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},s:function(G){return 2===G?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},S:function(G){return`[0-9]{1,${G}}`},w:function(G){return 2===G?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"}},S=Number,T=function(G,k){return G.map(U=>U.toLowerCase()).indexOf(k.toLowerCase())},y=function(G,k,U){return k>2?["format","standalone"].map(function(B){return Object.keys(P).map(function(K){const J=U.getMonthNames(P[K],B);return T(J,G)})}).reduce(function(B,K){return B.concat(K)}).filter(function(B){return B>=0})[0]:S(G)-1},d={y:function(G,k){const U=S(G);return 2===k?U<30?2e3+U:1900+U:U},M:y,L:y,Q:function(G,k,U){return k>2?U.getQuarterNames(P[k],"format").indexOf(G):S(G)-1},E:function(G,k,U){const B=U.getDayNames(P[k<3?3:k],"format");return T(B,G)},a:function(G,k,U){const B=U.getPeriodNames(P[k<3?3:k],"format");return T(B,G)},d:S,H:S,h:S,m:S,s:S,S:function(G,k){for(k=Math.max(k,3),G=G.slice(0,3);k<3;)G+="0",k++;return S(G)}},c=["y","M","d","h","m","s","S"],s={y:"setFullYear",M:"setMonth",L:"setMonth",a:function(G,k,U){let B=G.getHours();const K=U.h;void 0!==K&&K!==B&&B--,k||12!==B?k&&12!==B&&(B+=12):B=0,G.setHours(B)},d:"setDate",H:"setHours",h:"setHours",m:"setMinutes",s:"setSeconds",S:"setMilliseconds"},a=function(G,k){const U=G[k];if(!U)return 0;let B=0;do{k++,B++}while(G[k]===U);return B},u=function(G,k){let U="";for(let B=0;B<k;B++)U+=G;return U},h=function(G,k){let K,U="",B="";const J=[],ie=function(){B&&(J.push(`'${B}'`),U+=`${(0,W.Nt)(B)})`,B="")};for(let re=0;re<G.length;re++){const q=G[re],Z=f[q];if("'"!==q||(K=!K,"'"===G[re-1]))if(Z&&!K){const Q=a(G,re),te=u(q,Q);ie(),J.push(te),U+=`(${Z(Q,k)})`,re+=Q-1}else B||(U+="("),B+=q}return ie(),_(J)||o.v.warn(`The following format may be parsed incorrectly: ${G}.`),{patterns:J,regexp:new RegExp(`^${U}$`,"i")}},g=["d","H","h","m","s","w","M","L","Q"],_=function(G){const k=K=>{if(!K)return!1;const J=K[0];return["y","S"].includes(J)||g.includes(J)&&K.length<3};let U=!0,B=0;return G.every((K,J,ie)=>{return k(K)&&("S"!==(re=K)[0]&&2!==re.length&&(U=++B<2),k(ie[J+1])||(B=0)),U;var re})},x=function(){return s},N=function(G,k){const U=h(G,k);return function(B){const K=U.regexp.exec(B);if(K){const J=new Date,ie=new Date(J.getFullYear(),0,1),re=function(G){return G.map(function(k){return"'"===k[0]?"":"H"===k[0]?"h":k[0]})}(U.patterns),q=function(G){const k=G.map(function(U){return c.indexOf(U)});return Math.max.apply(Math,k)}(re),Y=function(G){const k=G.filter(function(U){return c.indexOf(U)<0});return c.concat(k)}(re),Z={};return Y.forEach(function(Q,te){if(!Q||te<c.length&&te>q)return;const pe=re.indexOf(Q);pe>=0?function(G,k,U,B,K){const J=k[0],ie=s[J],re=d[J];if(ie&&re){const q=re(U,k.length,B);K[k]=q,G[ie]?G[ie](q):ie(G,q,K)}}(ie,U.patterns[pe],K[pe+1],k,Z):function(G,k,U){const B=s[k],J=U["g"+B.substr(1)]();G[B](J)}(ie,Q,J)}),ie}return null}}},1271:(In,Ze,M)=>{"use strict";M.d(Ze,{f:()=>w,g:()=>L});var W=M(3012),o=M(749);const P={thousandsSeparator:",",decimalSeparator:"."},b="'";function d(N){return N.toString().split("").reverse().join("")}function s(N){return N.replace(/'.+'/g,"")}function a(N){if(!N)return 0;const G=s(N);return G.length-G.replace(/[#]/g,"").length}function u(N){if(!N)return 0;const G=s(N);return G.length-G.replace(/[0]/g,"").length}function h(N,G,k){if(!N)return"";for(N.length>k&&(N=N.substr(0,k));N.length>G&&"0"===N.slice(-1);)N=N.substr(0,N.length-1);for(;N.length<G;)N+="0";return N}function _(N,G){return N.split(b).map(function(k,U){const B=U%2;return!k&&B?b:B?k:k.replace(/[,#0]+/,G)}).join("")}function w(N,G){return G=G||P,function(k){if("number"!=typeof k||isNaN(k))return"";const U=function y(N){const G=N.split(";");return 1===G.length&&G.push("-"+G[0]),G}(N),K=k>0||1/k==1/0,J=U[K?0:1],ie=function x(N){let G=!1;for(let k=0;k<N.length;k++)if("'"===N[k]&&(G=!G),"."===N[k]&&!G)return k;return N.length}(J),re=[J.substr(0,ie),J.substr(ie+1)],q=u(re[1]),Y=q+a(re[1]);(function c(N){return-1!==N.indexOf("%")&&!N.match(/'[^']*%[^']*'/g)})(J)&&(k=(0,W.T0)(k,2)),K||(k=-k);const Z=u(re[0]),Q=a(re[0])||G.unlimitedIntegerDigits?void 0:Z,te=Math.floor(k).toString().length,pe=(0,W.df)(Y,0,15-te),z=function T(N){return N.split(",").slice(1).map(function(G){let k=0;return G.split("").filter(function(U,B){return k+="'"===U,!("#"!==U&&"0"!==U||k%2)}).length})}(re[0]).reverse(),oe=(0,o.M)(k,pe<0?0:pe).split(".");let ae=h(d(oe[0]),Z,Q);const ee=h(oe[1],q,Y);ae=function g(N,G,k){if(!G.length)return N;const U=[];let B=0;for(;N;){const K=G[B];if(!K)break;U.push(N.slice(0,K)),N=N.slice(K),B<G.length-1&&B++}return U.join(k)}(ae,z,G.thousandsSeparator);const he=d(_(d(re[0]),ae)),de=Y?_(re[1],ee):"";return he+(de.match(/\d/)?G.decimalSeparator:"")+de}}function D(N,G,k){const U=(G?.01:1)*parseFloat(N)||0;return k?-U:U}function C(N,G,k,U){let K,J,ie,B=N;do{ie&&(K=J.length===ie.length?"0":"1",N=U?K+N:N+K),J=ie||G(D(B,k)),B=U?"1"+B:B+"1",ie=G(D(B,k))}while(J!==ie&&(U?J.length===ie.length:J.length<=ie.length));if(U&&ie.length>J.length){const re=-1===G(12345).indexOf("12345");do{N="1"+N}while(re&&D(N,k)<1e5)}return N}function I(N,G,k,U){let B=G(D(N,k,U));const K=N.split("."),re=G(D(K[0]+".3"+K[1].slice(1),k,U)).indexOf("3")-1;return B=B.replace(/(\d)\D(\d)/g,"$1,$2"),re>=0&&(B=B.slice(0,re)+"."+B.slice(re+1)),B=B.replace(/1+/,"1").replace(/1/g,"#"),k||(B=B.replace(/%/g,"'%'")),B}function L(N){let G=".";const k=N(1).indexOf("100")>=0;G=C(G,N,k,!0),G=C(G,N,k,!1);const U=I(G,N,k,!1),B=I(G,N,k,!0);return B==="-"+U?U:U+";"+B}},8360:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>s});var W=M(1926),o=M(3090),P=M(9495),b=M(6946),f=M(7280);const T=(0,o.X)(!0,{},{en:{Yes:"Yes",No:"No",Cancel:"Cancel",Close:"Close",Clear:"Clear",Done:"Done",Loading:"Loading...",Select:"Select...",Search:"Search",Back:"Back",OK:"OK","dxCollectionWidget-noDataText":"No data to display","dxDropDownEditor-selectLabel":"Select","validation-required":"Required","validation-required-formatted":"{0} is required","validation-numeric":"Value must be a number","validation-numeric-formatted":"{0} must be a number","validation-range":"Value is out of range","validation-range-formatted":"{0} is out of range","validation-stringLength":"The length of the value is not correct","validation-stringLength-formatted":"The length of {0} is not correct","validation-custom":"Value is invalid","validation-custom-formatted":"{0} is invalid","validation-async":"Value is invalid","validation-async-formatted":"{0} is invalid","validation-compare":"Values do not match","validation-compare-formatted":"{0} does not match","validation-pattern":"Value does not match pattern","validation-pattern-formatted":"{0} does not match pattern","validation-email":"Email is invalid","validation-email-formatted":"{0} is invalid","validation-mask":"Value is invalid","dxLookup-searchPlaceholder":"Minimum character number: {0}","dxList-pullingDownText":"Pull down to refresh...","dxList-pulledDownText":"Release to refresh...","dxList-refreshingText":"Refreshing...","dxList-pageLoadingText":"Loading...","dxList-nextButtonText":"More","dxList-selectAll":"Select All","dxList-listAriaLabel":"Items","dxList-listAriaLabel-deletable":"Deletable items","dxListEditDecorator-delete":"Delete","dxListEditDecorator-more":"More","dxScrollView-pullingDownText":"Pull down to refresh...","dxScrollView-pulledDownText":"Release to refresh...","dxScrollView-refreshingText":"Refreshing...","dxScrollView-reachBottomText":"Loading...","dxDateBox-simulatedDataPickerTitleTime":"Select time","dxDateBox-simulatedDataPickerTitleDate":"Select date","dxDateBox-simulatedDataPickerTitleDateTime":"Select date and time","dxDateBox-validation-datetime":"Value must be a date or time","dxDateRangeBox-invalidStartDateMessage":"Start value must be a date","dxDateRangeBox-invalidEndDateMessage":"End value must be a date","dxDateRangeBox-startDateOutOfRangeMessage":"Start date is out of range","dxDateRangeBox-endDateOutOfRangeMessage":"End date is out of range","dxDateRangeBox-startDateLabel":"Start Date","dxDateRangeBox-endDateLabel":"End Date","dxFileUploader-selectFile":"Select a file","dxFileUploader-dropFile":"or Drop a file here","dxFileUploader-bytes":"bytes","dxFileUploader-kb":"KB","dxFileUploader-Mb":"MB","dxFileUploader-Gb":"GB","dxFileUploader-upload":"Upload","dxFileUploader-uploaded":"Uploaded","dxFileUploader-readyToUpload":"Ready to upload","dxFileUploader-uploadAbortedMessage":"Upload cancelled","dxFileUploader-uploadFailedMessage":"Upload failed","dxFileUploader-invalidFileExtension":"File type is not allowed","dxFileUploader-invalidMaxFileSize":"File is too large","dxFileUploader-invalidMinFileSize":"File is too small","dxRangeSlider-ariaFrom":"From","dxRangeSlider-ariaTill":"Till","dxSwitch-switchedOnText":"ON","dxSwitch-switchedOffText":"OFF","dxForm-optionalMark":"optional","dxForm-requiredMessage":"{0} is required","dxNumberBox-invalidValueMessage":"Value must be a number","dxNumberBox-noDataText":"No data","dxDataGrid-emptyHeaderWithColumnChooserText":"Use {0} to display columns","dxDataGrid-emptyHeaderWithGroupPanelText":"Drag a column from the group panel here","dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText":"Use {0} or drag a column from the group panel","dxDataGrid-emptyHeaderColumnChooserText":"column chooser","dxDataGrid-columnChooserTitle":"Column Chooser","dxDataGrid-columnChooserEmptyText":"Drag a column here to hide it","dxDataGrid-groupContinuesMessage":"Continues on the next page","dxDataGrid-groupContinuedMessage":"Continued from the previous page","dxDataGrid-groupHeaderText":"Group by This Column","dxDataGrid-ungroupHeaderText":"Ungroup","dxDataGrid-ungroupAllText":"Ungroup All","dxDataGrid-editingEditRow":"Edit","dxDataGrid-editingSaveRowChanges":"Save","dxDataGrid-editingCancelRowChanges":"Cancel","dxDataGrid-editingDeleteRow":"Delete","dxDataGrid-editingUndeleteRow":"Undelete","dxDataGrid-editingConfirmDeleteMessage":"Are you sure you want to delete this record?","dxDataGrid-validationCancelChanges":"Cancel changes","dxDataGrid-groupPanelEmptyText":"Drag a column header here to group by that column","dxDataGrid-noDataText":"No data","dxDataGrid-searchPanelPlaceholder":"Search...","dxDataGrid-filterRowShowAllText":"(All)","dxDataGrid-filterRowResetOperationText":"Reset","dxDataGrid-filterRowOperationEquals":"Equals","dxDataGrid-filterRowOperationNotEquals":"Does not equal","dxDataGrid-filterRowOperationLess":"Less than","dxDataGrid-filterRowOperationLessOrEquals":"Less than or equal to","dxDataGrid-filterRowOperationGreater":"Greater than","dxDataGrid-filterRowOperationGreaterOrEquals":"Greater than or equal to","dxDataGrid-filterRowOperationStartsWith":"Starts with","dxDataGrid-filterRowOperationContains":"Contains","dxDataGrid-filterRowOperationNotContains":"Does not contain","dxDataGrid-filterRowOperationEndsWith":"Ends with","dxDataGrid-filterRowOperationBetween":"Between","dxDataGrid-filterRowOperationBetweenStartText":"Start","dxDataGrid-filterRowOperationBetweenEndText":"End","dxDataGrid-ariaSearchBox":"Search box","dxDataGrid-applyFilterText":"Apply filter","dxDataGrid-trueText":"true","dxDataGrid-falseText":"false","dxDataGrid-sortingAscendingText":"Sort Ascending","dxDataGrid-sortingDescendingText":"Sort Descending","dxDataGrid-sortingClearText":"Clear Sorting","dxDataGrid-ariaNotSortedColumn":"Not sorted column","dxDataGrid-ariaSortedAscendingColumn":"Column sorted in ascending order","dxDataGrid-ariaSortedDescendingColumn":"Column sorted in descending order","dxDataGrid-ariaSortIndex":"Sort index {0}","dxDataGrid-editingSaveAllChanges":"Save changes","dxDataGrid-editingCancelAllChanges":"Discard changes","dxDataGrid-editingAddRow":"Add a row","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Min of {1} is {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Max of {1} is {0}","dxDataGrid-summaryAvg":"Avg: {0}","dxDataGrid-summaryAvgOtherColumn":"Avg of {1} is {0}","dxDataGrid-summarySum":"Sum: {0}","dxDataGrid-summarySumOtherColumn":"Sum of {1} is {0}","dxDataGrid-summaryCount":"Count: {0}","dxDataGrid-columnFixingFix":"Fix","dxDataGrid-columnFixingUnfix":"Unfix","dxDataGrid-columnFixingLeftPosition":"To the left","dxDataGrid-columnFixingRightPosition":"To the right","dxDataGrid-exportTo":"Export","dxDataGrid-exportToExcel":"Export to Excel file","dxDataGrid-exporting":"Exporting...","dxDataGrid-excelFormat":"Excel file","dxDataGrid-selectedRows":"Selected rows","dxDataGrid-exportSelectedRows":"Export selected rows to {0}","dxDataGrid-exportAll":"Export all data to {0}","dxDataGrid-headerFilterLabel":"Filter options","dxDataGrid-headerFilterIndicatorLabel":"Show filter options for column '{0}'","dxDataGrid-headerFilterEmptyValue":"(Blanks)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Cancel","dxDataGrid-ariaAdaptiveCollapse":"Hide additional data","dxDataGrid-ariaAdaptiveExpand":"Display additional data","dxDataGrid-ariaColumn":"Column","dxDataGrid-ariaColumnHeader":"Column header","dxDataGrid-ariaValue":"Value","dxDataGrid-ariaError":"Error","dxDataGrid-ariaRevertButton":"Press Escape to discard the changes","dxDataGrid-ariaFilterCell":"Filter cell","dxDataGrid-ariaCollapse":"Collapse","dxDataGrid-ariaModifiedCell":"Modified","dxDataGrid-ariaDeletedCell":"Deleted","dxDataGrid-ariaEditableCell":"Editable","dxDataGrid-ariaExpand":"Expand","dxDataGrid-ariaCollapsedRow":"Collapsed row","dxDataGrid-ariaExpandedRow":"Expanded row","dxDataGrid-ariaDataGrid":"Data grid with {0} rows and {1} columns","dxDataGrid-ariaSearchInGrid":"Search in the data grid","dxDataGrid-ariaSelectAll":"Select all","dxDataGrid-ariaSelectRow":"Select row","dxDataGrid-ariaToolbar":"Data grid toolbar","dxDataGrid-ariaEditForm":"Edit form","dxDataGrid-filterBuilderPopupTitle":"Filter Builder","dxDataGrid-filterPanelCreateFilter":"Create Filter","dxDataGrid-filterPanelClearFilter":"Clear","dxDataGrid-filterPanelFilterEnabledHint":"Enable the filter","dxDataGrid-masterDetail":"Cell with details","dxTreeList-ariaTreeList":"Tree list with {0} rows and {1} columns","dxTreeList-ariaSearchInGrid":"Search in the tree list","dxTreeList-ariaToolbar":"Tree list toolbar","dxTreeList-editingAddRowToNode":"Add","dxPager-infoText":"Page {0} of {1} ({2} items)","dxPager-pagesCountText":"of","dxPager-pageSize":"Items per page: {0}","dxPager-pageSizesAllText":"All","dxPager-page":"Page {0}","dxPager-prevPage":"Previous Page","dxPager-nextPage":"Next Page","dxPager-ariaLabel":"Page Navigation","dxPager-ariaPageSize":"Page size","dxPager-ariaPageNumber":"Page number","dxPivotGrid-grandTotal":"Grand Total","dxPivotGrid-total":"{0} Total","dxPivotGrid-fieldChooserTitle":"Field Chooser","dxPivotGrid-showFieldChooser":"Show Field Chooser","dxPivotGrid-expandAll":"Expand All","dxPivotGrid-collapseAll":"Collapse All","dxPivotGrid-sortColumnBySummary":'Sort "{0}" by This Column',"dxPivotGrid-sortRowBySummary":'Sort "{0}" by This Row',"dxPivotGrid-removeAllSorting":"Remove All Sorting","dxPivotGrid-dataNotAvailable":"N/A","dxPivotGrid-rowFields":"Row Fields","dxPivotGrid-columnFields":"Column Fields","dxPivotGrid-dataFields":"Data Fields","dxPivotGrid-filterFields":"Filter Fields","dxPivotGrid-allFields":"All Fields","dxPivotGrid-columnFieldArea":"Drop Column Fields Here","dxPivotGrid-dataFieldArea":"Drop Data Fields Here","dxPivotGrid-rowFieldArea":"Drop Row Fields Here","dxPivotGrid-filterFieldArea":"Drop Filter Fields Here","dxScheduler-editorLabelTitle":"Subject","dxScheduler-editorLabelStartDate":"Start Date","dxScheduler-editorLabelEndDate":"End Date","dxScheduler-editorLabelDescription":"Description","dxScheduler-editorLabelRecurrence":"Repeat","dxScheduler-openAppointment":"Open appointment","dxScheduler-recurrenceNever":"Never","dxScheduler-recurrenceMinutely":"Every minute","dxScheduler-recurrenceHourly":"Hourly","dxScheduler-recurrenceDaily":"Daily","dxScheduler-recurrenceWeekly":"Weekly","dxScheduler-recurrenceMonthly":"Monthly","dxScheduler-recurrenceYearly":"Yearly","dxScheduler-recurrenceRepeatEvery":"Repeat Every","dxScheduler-recurrenceRepeatOn":"Repeat On","dxScheduler-recurrenceEnd":"End repeat","dxScheduler-recurrenceAfter":"After","dxScheduler-recurrenceOn":"On","dxScheduler-recurrenceRepeatMinutely":"minute(s)","dxScheduler-recurrenceRepeatHourly":"hour(s)","dxScheduler-recurrenceRepeatDaily":"day(s)","dxScheduler-recurrenceRepeatWeekly":"week(s)","dxScheduler-recurrenceRepeatMonthly":"month(s)","dxScheduler-recurrenceRepeatYearly":"year(s)","dxScheduler-switcherDay":"Day","dxScheduler-switcherWeek":"Week","dxScheduler-switcherWorkWeek":"Work Week","dxScheduler-switcherMonth":"Month","dxScheduler-switcherAgenda":"Agenda","dxScheduler-switcherTimelineDay":"Timeline Day","dxScheduler-switcherTimelineWeek":"Timeline Week","dxScheduler-switcherTimelineWorkWeek":"Timeline Work Week","dxScheduler-switcherTimelineMonth":"Timeline Month","dxScheduler-recurrenceRepeatOnDate":"on date","dxScheduler-recurrenceRepeatCount":"occurrence(s)","dxScheduler-allDay":"All day","dxScheduler-confirmRecurrenceEditTitle":"Edit Recurring Appointment","dxScheduler-confirmRecurrenceDeleteTitle":"Delete Recurring Appointment","dxScheduler-confirmRecurrenceEditMessage":"Do you want to edit only this appointment or the whole series?","dxScheduler-confirmRecurrenceDeleteMessage":"Do you want to delete only this appointment or the whole series?","dxScheduler-confirmRecurrenceEditSeries":"Edit series","dxScheduler-confirmRecurrenceDeleteSeries":"Delete series","dxScheduler-confirmRecurrenceEditOccurrence":"Edit appointment","dxScheduler-confirmRecurrenceDeleteOccurrence":"Delete appointment","dxScheduler-noTimezoneTitle":"No timezone","dxScheduler-moreAppointments":"{0} more","dxCalendar-currentDay":"Today","dxCalendar-currentMonth":"Current month","dxCalendar-currentYear":"Current year","dxCalendar-currentYearRange":"Current year range","dxCalendar-todayButtonText":"Today","dxCalendar-ariaWidgetName":"Calendar","dxCalendar-previousMonthButtonLabel":"Previous month","dxCalendar-previousYearButtonLabel":"Previous year","dxCalendar-previousDecadeButtonLabel":"Previous decade","dxCalendar-previousCenturyButtonLabel":"Previous century","dxCalendar-nextMonthButtonLabel":"Next month","dxCalendar-nextYearButtonLabel":"Next year","dxCalendar-nextDecadeButtonLabel":"Next decade","dxCalendar-nextCenturyButtonLabel":"Next century","dxCalendar-captionMonthLabel":"Month selection","dxCalendar-captionYearLabel":"Year selection","dxCalendar-captionDecadeLabel":"Decade selection","dxCalendar-captionCenturyLabel":"Century selection","dxCalendar-selectedDate":"The selected date is {0}","dxCalendar-selectedDateRange":"The selected date range is from {0} to {1}","dxColorView-ariaRed":"Red","dxColorView-ariaGreen":"Green","dxColorView-ariaBlue":"Blue","dxColorView-ariaAlpha":"Transparency","dxColorView-ariaHex":"Color code","dxTagBox-selected":"{0} selected","dxTagBox-allSelected":"All selected ({0})","dxTagBox-moreSelected":"{0} more","dxTagBox-tagRoleDescription":"Tag. Press the delete button to remove this tag","vizExport-printingButtonText":"Print","vizExport-titleMenuText":"Exporting/Printing","vizExport-exportButtonText":"{0} file","dxFilterBuilder-and":"And","dxFilterBuilder-or":"Or","dxFilterBuilder-notAnd":"Not And","dxFilterBuilder-notOr":"Not Or","dxFilterBuilder-addCondition":"Add Condition","dxFilterBuilder-addGroup":"Add Group","dxFilterBuilder-enterValueText":"<enter a value>","dxFilterBuilder-filterOperationEquals":"Equals","dxFilterBuilder-filterOperationNotEquals":"Does not equal","dxFilterBuilder-filterOperationLess":"Is less than","dxFilterBuilder-filterOperationLessOrEquals":"Is less than or equal to","dxFilterBuilder-filterOperationGreater":"Is greater than","dxFilterBuilder-filterOperationGreaterOrEquals":"Is greater than or equal to","dxFilterBuilder-filterOperationStartsWith":"Starts with","dxFilterBuilder-filterOperationContains":"Contains","dxFilterBuilder-filterOperationNotContains":"Does not contain","dxFilterBuilder-filterOperationEndsWith":"Ends with","dxFilterBuilder-filterOperationIsBlank":"Is blank","dxFilterBuilder-filterOperationIsNotBlank":"Is not blank","dxFilterBuilder-filterOperationBetween":"Is between","dxFilterBuilder-filterOperationAnyOf":"Is any of","dxFilterBuilder-filterOperationNoneOf":"Is none of","dxHtmlEditor-dialogColorCaption":"Change Font Color","dxHtmlEditor-dialogBackgroundCaption":"Change Background Color","dxHtmlEditor-dialogLinkCaption":"Add Link","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Text","dxHtmlEditor-dialogLinkTargetField":"Open link in new window","dxHtmlEditor-dialogImageCaption":"Add Image","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Alternate text","dxHtmlEditor-dialogImageWidthField":"Width (px)","dxHtmlEditor-dialogImageHeightField":"Height (px)","dxHtmlEditor-dialogInsertTableRowsField":"Rows","dxHtmlEditor-dialogInsertTableColumnsField":"Columns","dxHtmlEditor-dialogInsertTableCaption":"Insert Table","dxHtmlEditor-dialogUpdateImageCaption":"Update Image","dxHtmlEditor-dialogImageUpdateButton":"Update","dxHtmlEditor-dialogImageAddButton":"Add","dxHtmlEditor-dialogImageSpecifyUrl":"From the Web","dxHtmlEditor-dialogImageSelectFile":"From This Device","dxHtmlEditor-dialogImageKeepAspectRatio":"Keep Aspect Ratio","dxHtmlEditor-dialogImageEncodeToBase64":"Encode to Base64","dxHtmlEditor-heading":"Heading","dxHtmlEditor-normalText":"Normal text","dxHtmlEditor-background":"Background Color","dxHtmlEditor-bold":"Bold","dxHtmlEditor-color":"Font Color","dxHtmlEditor-font":"Font","dxHtmlEditor-italic":"Italic","dxHtmlEditor-link":"Add Link","dxHtmlEditor-image":"Add Image","dxHtmlEditor-size":"Size","dxHtmlEditor-strike":"Strikethrough","dxHtmlEditor-subscript":"Subscript","dxHtmlEditor-superscript":"Superscript","dxHtmlEditor-underline":"Underline","dxHtmlEditor-blockquote":"Blockquote","dxHtmlEditor-header":"Header","dxHtmlEditor-increaseIndent":"Increase Indent","dxHtmlEditor-decreaseIndent":"Decrease Indent","dxHtmlEditor-orderedList":"Ordered List","dxHtmlEditor-bulletList":"Bullet List","dxHtmlEditor-alignLeft":"Align Left","dxHtmlEditor-alignCenter":"Align Center","dxHtmlEditor-alignRight":"Align Right","dxHtmlEditor-alignJustify":"Align Justify","dxHtmlEditor-codeBlock":"Code Block","dxHtmlEditor-variable":"Add Variable","dxHtmlEditor-undo":"Undo","dxHtmlEditor-redo":"Redo","dxHtmlEditor-clear":"Clear Formatting","dxHtmlEditor-insertTable":"Insert Table","dxHtmlEditor-insertHeaderRow":"Insert Header Row","dxHtmlEditor-insertRowAbove":"Insert Row Above","dxHtmlEditor-insertRowBelow":"Insert Row Below","dxHtmlEditor-insertColumnLeft":"Insert Column Left","dxHtmlEditor-insertColumnRight":"Insert Column Right","dxHtmlEditor-deleteColumn":"Delete Column","dxHtmlEditor-deleteRow":"Delete Row","dxHtmlEditor-deleteTable":"Delete Table","dxHtmlEditor-cellProperties":"Cell Properties","dxHtmlEditor-tableProperties":"Table Properties","dxHtmlEditor-insert":"Insert","dxHtmlEditor-delete":"Delete","dxHtmlEditor-border":"Border","dxHtmlEditor-style":"Style","dxHtmlEditor-width":"Width","dxHtmlEditor-height":"Height","dxHtmlEditor-borderColor":"Color","dxHtmlEditor-tableBackground":"Background","dxHtmlEditor-dimensions":"Dimensions","dxHtmlEditor-alignment":"Alignment","dxHtmlEditor-horizontal":"Horizontal","dxHtmlEditor-vertical":"Vertical","dxHtmlEditor-paddingVertical":"Vertical Padding","dxHtmlEditor-paddingHorizontal":"Horizontal Padding","dxHtmlEditor-pixels":"Pixels","dxHtmlEditor-list":"List","dxHtmlEditor-ordered":"Ordered","dxHtmlEditor-bullet":"Bullet","dxHtmlEditor-align":"Align","dxHtmlEditor-center":"Center","dxHtmlEditor-left":"Left","dxHtmlEditor-right":"Right","dxHtmlEditor-indent":"Indent","dxHtmlEditor-justify":"Justify","dxHtmlEditor-borderStyleNone":"none","dxHtmlEditor-borderStyleHidden":"hidden","dxHtmlEditor-borderStyleDotted":"dotted","dxHtmlEditor-borderStyleDashed":"dashed","dxHtmlEditor-borderStyleSolid":"solid","dxHtmlEditor-borderStyleDouble":"double","dxHtmlEditor-borderStyleGroove":"groove","dxHtmlEditor-borderStyleRidge":"ridge","dxHtmlEditor-borderStyleInset":"inset","dxHtmlEditor-borderStyleOutset":"outset","dxFileManager-newDirectoryName":"Untitled directory","dxFileManager-rootDirectoryName":"Files","dxFileManager-errorNoAccess":"Access Denied. Operation could not be completed.","dxFileManager-errorDirectoryExistsFormat":"Directory '{0}' already exists.","dxFileManager-errorFileExistsFormat":"File '{0}' already exists.","dxFileManager-errorFileNotFoundFormat":"File '{0}' not found.","dxFileManager-errorDirectoryNotFoundFormat":"Directory '{0}' not found.","dxFileManager-errorWrongFileExtension":"File extension is not allowed.","dxFileManager-errorMaxFileSizeExceeded":"File size exceeds the maximum allowed size.","dxFileManager-errorInvalidSymbols":"This name contains invalid characters.","dxFileManager-errorDefault":"Unspecified error.","dxFileManager-errorDirectoryOpenFailed":"The directory cannot be opened","dxFileManager-commandCreate":"New directory","dxFileManager-commandRename":"Rename","dxFileManager-commandMove":"Move to","dxFileManager-commandCopy":"Copy to","dxFileManager-commandDelete":"Delete","dxFileManager-commandDownload":"Download","dxFileManager-commandUpload":"Upload files","dxFileManager-commandRefresh":"Refresh","dxFileManager-commandThumbnails":"Thumbnails View","dxFileManager-commandDetails":"Details View","dxFileManager-commandClearSelection":"Clear selection","dxFileManager-commandShowNavPane":"Toggle navigation pane","dxFileManager-dialogDirectoryChooserMoveTitle":"Move to","dxFileManager-dialogDirectoryChooserMoveButtonText":"Move","dxFileManager-dialogDirectoryChooserCopyTitle":"Copy to","dxFileManager-dialogDirectoryChooserCopyButtonText":"Copy","dxFileManager-dialogRenameItemTitle":"Rename","dxFileManager-dialogRenameItemButtonText":"Save","dxFileManager-dialogCreateDirectoryTitle":"New directory","dxFileManager-dialogCreateDirectoryButtonText":"Create","dxFileManager-dialogDeleteItemTitle":"Delete","dxFileManager-dialogDeleteItemButtonText":"Delete","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Are you sure you want to delete {0}?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Are you sure you want to delete {0} items?","dxFileManager-dialogButtonCancel":"Cancel","dxFileManager-editingCreateSingleItemProcessingMessage":"Creating a directory inside {0}","dxFileManager-editingCreateSingleItemSuccessMessage":"Created a directory inside {0}","dxFileManager-editingCreateSingleItemErrorMessage":"Directory was not created","dxFileManager-editingCreateCommonErrorMessage":"Directory was not created","dxFileManager-editingRenameSingleItemProcessingMessage":"Renaming an item inside {0}","dxFileManager-editingRenameSingleItemSuccessMessage":"Renamed an item inside {0}","dxFileManager-editingRenameSingleItemErrorMessage":"Item was not renamed","dxFileManager-editingRenameCommonErrorMessage":"Item was not renamed","dxFileManager-editingDeleteSingleItemProcessingMessage":"Deleting an item from {0}","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"Deleting {0} items from {1}","dxFileManager-editingDeleteSingleItemSuccessMessage":"Deleted an item from {0}","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"Deleted {0} items from {1}","dxFileManager-editingDeleteSingleItemErrorMessage":"Item was not deleted","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} items were not deleted","dxFileManager-editingDeleteCommonErrorMessage":"Some items were not deleted","dxFileManager-editingMoveSingleItemProcessingMessage":"Moving an item to {0}","dxFileManager-editingMoveMultipleItemsProcessingMessage":"Moving {0} items to {1}","dxFileManager-editingMoveSingleItemSuccessMessage":"Moved an item to {0}","dxFileManager-editingMoveMultipleItemsSuccessMessage":"Moved {0} items to {1}","dxFileManager-editingMoveSingleItemErrorMessage":"Item was not moved","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} items were not moved","dxFileManager-editingMoveCommonErrorMessage":"Some items were not moved","dxFileManager-editingCopySingleItemProcessingMessage":"Copying an item to {0}","dxFileManager-editingCopyMultipleItemsProcessingMessage":"Copying {0} items to {1}","dxFileManager-editingCopySingleItemSuccessMessage":"Copied an item to {0}","dxFileManager-editingCopyMultipleItemsSuccessMessage":"Copied {0} items to {1}","dxFileManager-editingCopySingleItemErrorMessage":"Item was not copied","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} items were not copied","dxFileManager-editingCopyCommonErrorMessage":"Some items were not copied","dxFileManager-editingUploadSingleItemProcessingMessage":"Uploading an item to {0}","dxFileManager-editingUploadMultipleItemsProcessingMessage":"Uploading {0} items to {1}","dxFileManager-editingUploadSingleItemSuccessMessage":"Uploaded an item to {0}","dxFileManager-editingUploadMultipleItemsSuccessMessage":"Uploaded {0} items to {1}","dxFileManager-editingUploadSingleItemErrorMessage":"Item was not uploaded","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} items were not uploaded","dxFileManager-editingUploadCanceledMessage":"Canceled","dxFileManager-editingDownloadSingleItemErrorMessage":"Item was not downloaded","dxFileManager-editingDownloadMultipleItemsErrorMessage":"{0} items were not downloaded","dxFileManager-listDetailsColumnCaptionName":"Name","dxFileManager-listDetailsColumnCaptionDateModified":"Date Modified","dxFileManager-listDetailsColumnCaptionFileSize":"File Size","dxFileManager-listThumbnailsTooltipTextSize":"Size","dxFileManager-listThumbnailsTooltipTextDateModified":"Date Modified","dxFileManager-notificationProgressPanelTitle":"Progress","dxFileManager-notificationProgressPanelEmptyListText":"No operations","dxFileManager-notificationProgressPanelOperationCanceled":"Canceled","dxDiagram-categoryGeneral":"General","dxDiagram-categoryFlowchart":"Flowchart","dxDiagram-categoryOrgChart":"Org Chart","dxDiagram-categoryContainers":"Containers","dxDiagram-categoryCustom":"Custom","dxDiagram-commandExportToSvg":"Export to SVG","dxDiagram-commandExportToPng":"Export to PNG","dxDiagram-commandExportToJpg":"Export to JPEG","dxDiagram-commandUndo":"Undo","dxDiagram-commandRedo":"Redo","dxDiagram-commandFontName":"Font Name","dxDiagram-commandFontSize":"Font Size","dxDiagram-commandBold":"Bold","dxDiagram-commandItalic":"Italic","dxDiagram-commandUnderline":"Underline","dxDiagram-commandTextColor":"Font Color","dxDiagram-commandLineColor":"Line Color","dxDiagram-commandLineWidth":"Line Width","dxDiagram-commandLineStyle":"Line Style","dxDiagram-commandLineStyleSolid":"Solid","dxDiagram-commandLineStyleDotted":"Dotted","dxDiagram-commandLineStyleDashed":"Dashed","dxDiagram-commandFillColor":"Fill Color","dxDiagram-commandAlignLeft":"Align Left","dxDiagram-commandAlignCenter":"Align Center","dxDiagram-commandAlignRight":"Align Right","dxDiagram-commandConnectorLineType":"Connector Line Type","dxDiagram-commandConnectorLineStraight":"Straight","dxDiagram-commandConnectorLineOrthogonal":"Orthogonal","dxDiagram-commandConnectorLineStart":"Connector Line Start","dxDiagram-commandConnectorLineEnd":"Connector Line End","dxDiagram-commandConnectorLineNone":"None","dxDiagram-commandConnectorLineArrow":"Arrow","dxDiagram-commandFullscreen":"Full Screen","dxDiagram-commandUnits":"Units","dxDiagram-commandPageSize":"Page Size","dxDiagram-commandPageOrientation":"Page Orientation","dxDiagram-commandPageOrientationLandscape":"Landscape","dxDiagram-commandPageOrientationPortrait":"Portrait","dxDiagram-commandPageColor":"Page Color","dxDiagram-commandShowGrid":"Show Grid","dxDiagram-commandSnapToGrid":"Snap to Grid","dxDiagram-commandGridSize":"Grid Size","dxDiagram-commandZoomLevel":"Zoom Level","dxDiagram-commandAutoZoom":"Auto Zoom","dxDiagram-commandFitToContent":"Fit to Content","dxDiagram-commandFitToWidth":"Fit to Width","dxDiagram-commandAutoZoomByContent":"Auto Zoom by Content","dxDiagram-commandAutoZoomByWidth":"Auto Zoom by Width","dxDiagram-commandSimpleView":"Simple View","dxDiagram-commandCut":"Cut","dxDiagram-commandCopy":"Copy","dxDiagram-commandPaste":"Paste","dxDiagram-commandSelectAll":"Select All","dxDiagram-commandDelete":"Delete","dxDiagram-commandBringToFront":"Bring to Front","dxDiagram-commandSendToBack":"Send to Back","dxDiagram-commandLock":"Lock","dxDiagram-commandUnlock":"Unlock","dxDiagram-commandInsertShapeImage":"Insert Image...","dxDiagram-commandEditShapeImage":"Change Image...","dxDiagram-commandDeleteShapeImage":"Delete Image","dxDiagram-commandLayoutLeftToRight":"Left-to-right","dxDiagram-commandLayoutRightToLeft":"Right-to-left","dxDiagram-commandLayoutTopToBottom":"Top-to-bottom","dxDiagram-commandLayoutBottomToTop":"Bottom-to-top","dxDiagram-unitIn":"in","dxDiagram-unitCm":"cm","dxDiagram-unitPx":"px","dxDiagram-dialogButtonOK":"OK","dxDiagram-dialogButtonCancel":"Cancel","dxDiagram-dialogInsertShapeImageTitle":"Insert Image","dxDiagram-dialogEditShapeImageTitle":"Change Image","dxDiagram-dialogEditShapeImageSelectButton":"Select image","dxDiagram-dialogEditShapeImageLabelText":"or drop a file here","dxDiagram-uiExport":"Export","dxDiagram-uiProperties":"Properties","dxDiagram-uiSettings":"Settings","dxDiagram-uiShowToolbox":"Show Toolbox","dxDiagram-uiSearch":"Search","dxDiagram-uiStyle":"Style","dxDiagram-uiLayout":"Layout","dxDiagram-uiLayoutTree":"Tree","dxDiagram-uiLayoutLayered":"Layered","dxDiagram-uiDiagram":"Diagram","dxDiagram-uiText":"Text","dxDiagram-uiObject":"Object","dxDiagram-uiConnector":"Connector","dxDiagram-uiPage":"Page","dxDiagram-shapeText":"Text","dxDiagram-shapeRectangle":"Rectangle","dxDiagram-shapeEllipse":"Ellipse","dxDiagram-shapeCross":"Cross","dxDiagram-shapeTriangle":"Triangle","dxDiagram-shapeDiamond":"Diamond","dxDiagram-shapeHeart":"Heart","dxDiagram-shapePentagon":"Pentagon","dxDiagram-shapeHexagon":"Hexagon","dxDiagram-shapeOctagon":"Octagon","dxDiagram-shapeStar":"Star","dxDiagram-shapeArrowLeft":"Left Arrow","dxDiagram-shapeArrowUp":"Up Arrow","dxDiagram-shapeArrowRight":"Right Arrow","dxDiagram-shapeArrowDown":"Down Arrow","dxDiagram-shapeArrowUpDown":"Up Down Arrow","dxDiagram-shapeArrowLeftRight":"Left Right Arrow","dxDiagram-shapeProcess":"Process","dxDiagram-shapeDecision":"Decision","dxDiagram-shapeTerminator":"Terminator","dxDiagram-shapePredefinedProcess":"Predefined Process","dxDiagram-shapeDocument":"Document","dxDiagram-shapeMultipleDocuments":"Multiple Documents","dxDiagram-shapeManualInput":"Manual Input","dxDiagram-shapePreparation":"Preparation","dxDiagram-shapeData":"Data","dxDiagram-shapeDatabase":"Database","dxDiagram-shapeHardDisk":"Hard Disk","dxDiagram-shapeInternalStorage":"Internal Storage","dxDiagram-shapePaperTape":"Paper Tape","dxDiagram-shapeManualOperation":"Manual Operation","dxDiagram-shapeDelay":"Delay","dxDiagram-shapeStoredData":"Stored Data","dxDiagram-shapeDisplay":"Display","dxDiagram-shapeMerge":"Merge","dxDiagram-shapeConnector":"Connector","dxDiagram-shapeOr":"Or","dxDiagram-shapeSummingJunction":"Summing Junction","dxDiagram-shapeContainerDefaultText":"Container","dxDiagram-shapeVerticalContainer":"Vertical Container","dxDiagram-shapeHorizontalContainer":"Horizontal Container","dxDiagram-shapeCardDefaultText":"Person's Name","dxDiagram-shapeCardWithImageOnLeft":"Card with Image on the Left","dxDiagram-shapeCardWithImageOnTop":"Card with Image on the Top","dxDiagram-shapeCardWithImageOnRight":"Card with Image on the Right","dxGantt-dialogTitle":"Title","dxGantt-dialogStartTitle":"Start","dxGantt-dialogEndTitle":"End","dxGantt-dialogProgressTitle":"Progress","dxGantt-dialogResourcesTitle":"Resources","dxGantt-dialogResourceManagerTitle":"Resource Manager","dxGantt-dialogTaskDetailsTitle":"Task Details","dxGantt-dialogEditResourceListHint":"Edit Resource List","dxGantt-dialogEditNoResources":"No resources","dxGantt-dialogButtonAdd":"Add","dxGantt-contextMenuNewTask":"New Task","dxGantt-contextMenuNewSubtask":"New Subtask","dxGantt-contextMenuDeleteTask":"Delete Task","dxGantt-contextMenuDeleteDependency":"Delete Dependency","dxGantt-dialogTaskDeleteConfirmation":"Deleting a task also deletes all its dependencies and subtasks. Are you sure you want to delete this task?","dxGantt-dialogDependencyDeleteConfirmation":"Are you sure you want to delete the dependency from the task?","dxGantt-dialogResourcesDeleteConfirmation":"Deleting a resource also deletes it from tasks to which this resource is assigned. Are you sure you want to delete these resources? Resources: {0}","dxGantt-dialogConstraintCriticalViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. How would you like to proceed?","dxGantt-dialogCancelOperationMessage":"Cancel the operation","dxGantt-dialogDeleteDependencyMessage":"Delete the dependency","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"Move the task and keep the dependency","dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. How would you like to proceed?","dxGantt-dialogDeleteDependenciesMessage":"Delete the dependency relations","dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"Move the task and keep the dependencies","dxGantt-undo":"Undo","dxGantt-redo":"Redo","dxGantt-expandAll":"Expand All","dxGantt-collapseAll":"Collapse All","dxGantt-addNewTask":"Add New Task","dxGantt-deleteSelectedTask":"Delete Selected Task","dxGantt-zoomIn":"Zoom In","dxGantt-zoomOut":"Zoom Out","dxGantt-fullScreen":"Full Screen","dxGantt-quarter":"Q{0}","dxGantt-sortingAscendingText":"Sort Ascending","dxGantt-sortingDescendingText":"Sort Descending","dxGantt-sortingClearText":"Clear Sorting","dxGantt-showResources":"Show Resources","dxGantt-showDependencies":"Show Dependencies","dxGantt-dialogStartDateValidation":"Start date must be after {0}","dxGantt-dialogEndDateValidation":"End date must be after {0}","dxGallery-itemName":"Gallery item","dxMultiView-elementAriaRoleDescription":"MultiView","dxMultiView-elementAriaLabel":"Use the arrow keys or swipe to navigate between views","dxMultiView-itemAriaRoleDescription":"View","dxMultiView-itemAriaLabel":"{0} of {1}","dxSplitter-resizeHandleAriaLabel":"Split bar"}}),d={},s=(0,W.A)({engine:function(){return"base"},_dictionary:T,load:function(a){(0,o.X)(!0,this._dictionary,a)},_localizablePrefix:"@",setup:function(a){this._localizablePrefix=a},localizeString:function(a){const u=this,h=new RegExp("(^|[^a-zA-Z_0-9"+u._localizablePrefix+"-]+)("+u._localizablePrefix+"{1,2})([a-zA-Z_0-9-]+)","g"),g=u._localizablePrefix+u._localizablePrefix;return a.replace(h,(_,x,w,D)=>{const C=u._localizablePrefix+D;let I;return w!==g&&(I=u.format(D)),I||(d[D]=(0,b.I3)(D)),x+(I||C)})},getMessagesByLocales:function(){return this._dictionary},getDictionary:function(a){return a?d:(0,o.X)({},d,this.getMessagesByLocales()[f.A.locale()])},getFormatter:function(a){return this._getFormatterBase(a)||this._getFormatterBase(a,"en")},_getFormatterBase:function(a,u){const h=f.A.getValueByClosestLocale(g=>((a,u)=>{var h;return a[u]||u?.toLowerCase&&(null===(h=Object.entries(a).find(g=>{let[_]=g;return _.toLowerCase()===u.toLowerCase()}))||void 0===h?void 0:h[1])||{}})(this._dictionary,g)[a]);if(h)return function(){const g=1===arguments.length&&Array.isArray(arguments[0])?arguments[0].slice(0):Array.prototype.slice.call(arguments,0);return g.unshift(h),P.GP.apply(this,g)}},format:function(a){const u=this.getFormatter(a),h=Array.prototype.slice.call(arguments,1);return u&&u.apply(this,h)||""}})},1520:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>B});var W=M(1926),o=M(4859),P=M(2660),b=M(1830),f=M(1271),S=M(3686),T=M(7251),y=M(749),d=M(9461),c=M(7280);const a={af:"\xa4#,##0.00;(\xa4#,##0.00)","af-NA":"\xa4#,##0.00;(\xa4#,##0.00)",agq:"#,##0.00\xa4",ak:"\xa4#,##0.00",am:"\xa4#,##0.00;(\xa4#,##0.00)",ar:"\xa4#,##0.00;(\xa4#,##0.00)","ar-AE":"\xa4#,##0.00;(\xa4#,##0.00)","ar-BH":"\xa4#,##0.00;(\xa4#,##0.00)","ar-DJ":"\xa4#,##0.00;(\xa4#,##0.00)","ar-DZ":"\xa4#,##0.00;(\xa4#,##0.00)","ar-EG":"\xa4#,##0.00;(\xa4#,##0.00)","ar-EH":"\xa4#,##0.00;(\xa4#,##0.00)","ar-ER":"\xa4#,##0.00;(\xa4#,##0.00)","ar-IL":"\xa4#,##0.00;(\xa4#,##0.00)","ar-IQ":"\xa4#,##0.00;(\xa4#,##0.00)","ar-JO":"\xa4#,##0.00;(\xa4#,##0.00)","ar-KM":"\xa4#,##0.00;(\xa4#,##0.00)","ar-KW":"\xa4#,##0.00;(\xa4#,##0.00)","ar-LB":"\xa4#,##0.00;(\xa4#,##0.00)","ar-LY":"\xa4#,##0.00;(\xa4#,##0.00)","ar-MA":"\xa4#,##0.00;(\xa4#,##0.00)","ar-MR":"\xa4#,##0.00;(\xa4#,##0.00)","ar-OM":"\xa4#,##0.00;(\xa4#,##0.00)","ar-PS":"\xa4#,##0.00;(\xa4#,##0.00)","ar-QA":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SA":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SD":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SO":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SS":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SY":"\xa4#,##0.00;(\xa4#,##0.00)","ar-TD":"\xa4#,##0.00;(\xa4#,##0.00)","ar-TN":"\xa4#,##0.00;(\xa4#,##0.00)","ar-YE":"\xa4#,##0.00;(\xa4#,##0.00)",as:"\xa4\xa0#,##,##0.00",asa:"#,##0.00\xa0\xa4",ast:"#,##0.00\xa0\xa4",az:"#,##0.00\xa0\xa4","az-Cyrl":"#,##0.00\xa0\xa4","az-Latn":"#,##0.00\xa0\xa4",bas:"#,##0.00\xa0\xa4",be:"#,##0.00\xa0\xa4","be-tarask":"#,##0.00\xa0\xa4",bem:"\xa4#,##0.00;(\xa4#,##0.00)",bez:"#,##0.00\xa4",bg:"0.00\xa0\xa4;(0.00\xa0\xa4)",bm:"\xa4#,##0.00;(\xa4#,##0.00)",bn:"#,##,##0.00\xa4;(#,##,##0.00\xa4)","bn-IN":"#,##,##0.00\xa4;(#,##,##0.00\xa4)",bo:"\xa4\xa0#,##0.00","bo-IN":"\xa4\xa0#,##0.00",br:"#,##0.00\xa0\xa4",brx:"\xa4\xa0#,##,##0.00",bs:"#,##0.00\xa0\xa4","bs-Cyrl":"#,##0.00\xa0\xa4","bs-Latn":"#,##0.00\xa0\xa4",ca:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-AD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-ES-valencia":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-FR":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-IT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",ccp:"#,##,##0.00\xa4;(#,##,##0.00\xa4)","ccp-IN":"#,##,##0.00\xa4;(#,##,##0.00\xa4)",ce:"#,##0.00\xa0\xa4",ceb:"\xa4#,##0.00;(\xa4#,##0.00)",cgg:"\xa4#,##0.00",chr:"\xa4#,##0.00;(\xa4#,##0.00)",ckb:"\xa4\xa0#,##0.00","ckb-IR":"\xa4\xa0#,##0.00",cs:"#,##0.00\xa0\xa4",cy:"\xa4#,##0.00;(\xa4#,##0.00)",da:"#,##0.00\xa0\xa4","da-GL":"#,##0.00\xa0\xa4",dav:"\xa4#,##0.00;(\xa4#,##0.00)",de:"#,##0.00\xa0\xa4","de-AT":"#,##0.00\xa0\xa4","de-BE":"#,##0.00\xa0\xa4","de-CH":"#,##0.00\xa0\xa4","de-IT":"#,##0.00\xa0\xa4","de-LI":"#,##0.00\xa0\xa4","de-LU":"#,##0.00\xa0\xa4",dje:"#,##0.00\xa4",doi:"\xa4#,##0.00",dsb:"#,##0.00\xa0\xa4",dua:"#,##0.00\xa0\xa4",dyo:"#,##0.00\xa0\xa4",dz:"\xa4#,##,##0.00",ebu:"\xa4#,##0.00;(\xa4#,##0.00)",ee:"\xa4#,##0.00;(\xa4#,##0.00)","ee-TG":"\xa4#,##0.00;(\xa4#,##0.00)",el:"#,##0.00\xa0\xa4","el-CY":"#,##0.00\xa0\xa4",en:"\xa4#,##0.00;(\xa4#,##0.00)","en-001":"\xa4#,##0.00;(\xa4#,##0.00)","en-150":"#,##0.00\xa0\xa4","en-AE":"\xa4#,##0.00;(\xa4#,##0.00)","en-AG":"\xa4#,##0.00;(\xa4#,##0.00)","en-AI":"\xa4#,##0.00;(\xa4#,##0.00)","en-AS":"\xa4#,##0.00;(\xa4#,##0.00)","en-AT":"\xa4\xa0#,##0.00","en-AU":"\xa4#,##0.00;(\xa4#,##0.00)","en-BB":"\xa4#,##0.00;(\xa4#,##0.00)","en-BE":"#,##0.00\xa0\xa4","en-BI":"\xa4#,##0.00;(\xa4#,##0.00)","en-BM":"\xa4#,##0.00;(\xa4#,##0.00)","en-BS":"\xa4#,##0.00;(\xa4#,##0.00)","en-BW":"\xa4#,##0.00;(\xa4#,##0.00)","en-BZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-CA":"\xa4#,##0.00;(\xa4#,##0.00)","en-CC":"\xa4#,##0.00;(\xa4#,##0.00)","en-CH":"\xa4\xa0#,##0.00;\xa4-#,##0.00","en-CK":"\xa4#,##0.00;(\xa4#,##0.00)","en-CM":"\xa4#,##0.00;(\xa4#,##0.00)","en-CX":"\xa4#,##0.00;(\xa4#,##0.00)","en-CY":"\xa4#,##0.00;(\xa4#,##0.00)","en-DE":"#,##0.00\xa0\xa4","en-DG":"\xa4#,##0.00;(\xa4#,##0.00)","en-DK":"#,##0.00\xa0\xa4","en-DM":"\xa4#,##0.00;(\xa4#,##0.00)","en-ER":"\xa4#,##0.00;(\xa4#,##0.00)","en-FI":"#,##0.00\xa0\xa4","en-FJ":"\xa4#,##0.00;(\xa4#,##0.00)","en-FK":"\xa4#,##0.00;(\xa4#,##0.00)","en-FM":"\xa4#,##0.00;(\xa4#,##0.00)","en-GB":"\xa4#,##0.00;(\xa4#,##0.00)","en-GD":"\xa4#,##0.00;(\xa4#,##0.00)","en-GG":"\xa4#,##0.00;(\xa4#,##0.00)","en-GH":"\xa4#,##0.00;(\xa4#,##0.00)","en-GI":"\xa4#,##0.00;(\xa4#,##0.00)","en-GM":"\xa4#,##0.00;(\xa4#,##0.00)","en-GU":"\xa4#,##0.00;(\xa4#,##0.00)","en-GY":"\xa4#,##0.00;(\xa4#,##0.00)","en-HK":"\xa4#,##0.00;(\xa4#,##0.00)","en-IE":"\xa4#,##0.00;(\xa4#,##0.00)","en-IL":"\xa4#,##0.00;(\xa4#,##0.00)","en-IM":"\xa4#,##0.00;(\xa4#,##0.00)","en-IN":"\xa4#,##0.00;(\xa4#,##0.00)","en-IO":"\xa4#,##0.00;(\xa4#,##0.00)","en-JE":"\xa4#,##0.00;(\xa4#,##0.00)","en-JM":"\xa4#,##0.00;(\xa4#,##0.00)","en-KE":"\xa4#,##0.00;(\xa4#,##0.00)","en-KI":"\xa4#,##0.00;(\xa4#,##0.00)","en-KN":"\xa4#,##0.00;(\xa4#,##0.00)","en-KY":"\xa4#,##0.00;(\xa4#,##0.00)","en-LC":"\xa4#,##0.00;(\xa4#,##0.00)","en-LR":"\xa4#,##0.00;(\xa4#,##0.00)","en-LS":"\xa4#,##0.00;(\xa4#,##0.00)","en-MG":"\xa4#,##0.00;(\xa4#,##0.00)","en-MH":"\xa4#,##0.00;(\xa4#,##0.00)","en-MO":"\xa4#,##0.00;(\xa4#,##0.00)","en-MP":"\xa4#,##0.00;(\xa4#,##0.00)","en-MS":"\xa4#,##0.00;(\xa4#,##0.00)","en-MT":"\xa4#,##0.00;(\xa4#,##0.00)","en-MU":"\xa4#,##0.00;(\xa4#,##0.00)","en-MV":"\xa4\xa0#,##0.00","en-MW":"\xa4#,##0.00;(\xa4#,##0.00)","en-MY":"\xa4#,##0.00;(\xa4#,##0.00)","en-NA":"\xa4#,##0.00;(\xa4#,##0.00)","en-NF":"\xa4#,##0.00;(\xa4#,##0.00)","en-NG":"\xa4#,##0.00;(\xa4#,##0.00)","en-NL":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","en-NR":"\xa4#,##0.00;(\xa4#,##0.00)","en-NU":"\xa4#,##0.00;(\xa4#,##0.00)","en-NZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-PG":"\xa4#,##0.00;(\xa4#,##0.00)","en-PH":"\xa4#,##0.00;(\xa4#,##0.00)","en-PK":"\xa4#,##0.00;(\xa4#,##0.00)","en-PN":"\xa4#,##0.00;(\xa4#,##0.00)","en-PR":"\xa4#,##0.00;(\xa4#,##0.00)","en-PW":"\xa4#,##0.00;(\xa4#,##0.00)","en-RW":"\xa4#,##0.00;(\xa4#,##0.00)","en-SB":"\xa4#,##0.00;(\xa4#,##0.00)","en-SC":"\xa4#,##0.00;(\xa4#,##0.00)","en-SD":"\xa4#,##0.00;(\xa4#,##0.00)","en-SE":"#,##0.00\xa0\xa4","en-SG":"\xa4#,##0.00;(\xa4#,##0.00)","en-SH":"\xa4#,##0.00;(\xa4#,##0.00)","en-SI":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","en-SL":"\xa4#,##0.00;(\xa4#,##0.00)","en-SS":"\xa4#,##0.00;(\xa4#,##0.00)","en-SX":"\xa4#,##0.00;(\xa4#,##0.00)","en-SZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-TC":"\xa4#,##0.00;(\xa4#,##0.00)","en-TK":"\xa4#,##0.00;(\xa4#,##0.00)","en-TO":"\xa4#,##0.00;(\xa4#,##0.00)","en-TT":"\xa4#,##0.00;(\xa4#,##0.00)","en-TV":"\xa4#,##0.00;(\xa4#,##0.00)","en-TZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-UG":"\xa4#,##0.00;(\xa4#,##0.00)","en-UM":"\xa4#,##0.00;(\xa4#,##0.00)","en-VC":"\xa4#,##0.00;(\xa4#,##0.00)","en-VG":"\xa4#,##0.00;(\xa4#,##0.00)","en-VI":"\xa4#,##0.00;(\xa4#,##0.00)","en-VU":"\xa4#,##0.00;(\xa4#,##0.00)","en-WS":"\xa4#,##0.00;(\xa4#,##0.00)","en-ZA":"\xa4#,##0.00;(\xa4#,##0.00)","en-ZM":"\xa4#,##0.00;(\xa4#,##0.00)","en-ZW":"\xa4#,##0.00;(\xa4#,##0.00)",eo:"\xa4\xa0#,##0.00",es:"#,##0.00\xa0\xa4","es-419":"\xa4#,##0.00","es-AR":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","es-BO":"\xa4#,##0.00","es-BR":"\xa4#,##0.00","es-BZ":"\xa4#,##0.00","es-CL":"\xa4#,##0.00","es-CO":"\xa4#,##0.00","es-CR":"\xa4#,##0.00","es-CU":"\xa4#,##0.00","es-DO":"\xa4#,##0.00;(\xa4#,##0.00)","es-EA":"#,##0.00\xa0\xa4","es-EC":"\xa4#,##0.00","es-GQ":"#,##0.00\xa0\xa4","es-GT":"\xa4#,##0.00","es-HN":"\xa4#,##0.00","es-IC":"#,##0.00\xa0\xa4","es-MX":"\xa4#,##0.00","es-NI":"\xa4#,##0.00","es-PA":"\xa4#,##0.00","es-PE":"\xa4#,##0.00","es-PH":"#,##0.00\xa0\xa4","es-PR":"\xa4#,##0.00","es-PY":"\xa4#,##0.00","es-SV":"\xa4#,##0.00","es-US":"\xa4#,##0.00","es-UY":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","es-VE":"\xa4#,##0.00",et:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",eu:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",ewo:"#,##0.00\xa0\xa4",fa:"\u200e\xa4\xa0#,##0.00;\u200e(\xa4\xa0#,##0.00)","fa-AF":"\xa4\xa0#,##0.00;\u200e(\xa4\xa0#,##0.00)",ff:"#,##0.00\xa0\xa4","ff-Adlm":"\xa4\xa0#,##0.00","ff-Adlm-BF":"\xa4\xa0#,##0.00","ff-Adlm-CM":"\xa4\xa0#,##0.00","ff-Adlm-GH":"\xa4\xa0#,##0.00","ff-Adlm-GM":"\xa4\xa0#,##0.00","ff-Adlm-GW":"\xa4\xa0#,##0.00","ff-Adlm-LR":"\xa4\xa0#,##0.00","ff-Adlm-MR":"\xa4\xa0#,##0.00","ff-Adlm-NE":"\xa4\xa0#,##0.00","ff-Adlm-NG":"\xa4\xa0#,##0.00","ff-Adlm-SL":"\xa4\xa0#,##0.00","ff-Adlm-SN":"\xa4\xa0#,##0.00","ff-Latn":"#,##0.00\xa0\xa4","ff-Latn-BF":"#,##0.00\xa0\xa4","ff-Latn-CM":"#,##0.00\xa0\xa4","ff-Latn-GH":"#,##0.00\xa0\xa4","ff-Latn-GM":"#,##0.00\xa0\xa4","ff-Latn-GN":"#,##0.00\xa0\xa4","ff-Latn-GW":"#,##0.00\xa0\xa4","ff-Latn-LR":"#,##0.00\xa0\xa4","ff-Latn-MR":"#,##0.00\xa0\xa4","ff-Latn-NE":"#,##0.00\xa0\xa4","ff-Latn-NG":"#,##0.00\xa0\xa4","ff-Latn-SL":"#,##0.00\xa0\xa4",fi:"#,##0.00\xa0\xa4",fil:"\xa4#,##0.00;(\xa4#,##0.00)",fo:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fo-DK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",fr:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BE":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BI":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BJ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BL":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CG":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CH":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CI":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CM":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-DJ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-DZ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GN":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GP":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GQ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-HT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-KM":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-LU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MC":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MG":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-ML":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MQ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MR":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-NC":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-NE":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-PF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-PM":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-RE":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-RW":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-SC":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-SN":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-SY":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-TD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-TG":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-TN":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-VU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-WF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-YT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",fur:"\xa4\xa0#,##0.00",fy:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",ga:"\xa4#,##0.00;(\xa4#,##0.00)","ga-GB":"\xa4#,##0.00;(\xa4#,##0.00)",gd:"\xa4#,##0.00;(\xa4#,##0.00)",gl:"#,##0.00\xa0\xa4",gsw:"#,##0.00\xa0\xa4","gsw-FR":"#,##0.00\xa0\xa4","gsw-LI":"#,##0.00\xa0\xa4",gu:"\xa4#,##,##0.00;(\xa4#,##,##0.00)",guz:"\xa4#,##0.00;(\xa4#,##0.00)",gv:"\xa4#,##0.00",ha:"\xa4\xa0#,##0.00","ha-GH":"\xa4\xa0#,##0.00","ha-NE":"\xa4\xa0#,##0.00",haw:"\xa4#,##0.00;(\xa4#,##0.00)",he:"#,##0.00\xa0\xa4",hi:"\xa4#,##,##0.00","hi-Latn":"\xa4#,##,##0.00",hr:"#,##0.00\xa0\xa4","hr-BA":"#,##0.00\xa0\xa4",hsb:"#,##0.00\xa0\xa4",hu:"#,##0.00\xa0\xa4",hy:"#,##0.00\xa0\xa4",ia:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",id:"\xa4#,##0.00",ig:"\xa4#,##0.00;(\xa4#,##0.00)",ii:"\xa4\xa0#,##0.00",is:"#,##0.00\xa0\xa4",it:"#,##0.00\xa0\xa4","it-CH":"#,##0.00\xa0\xa4","it-SM":"#,##0.00\xa0\xa4","it-VA":"#,##0.00\xa0\xa4",ja:"\xa4#,##0.00;(\xa4#,##0.00)",jgo:"\xa4\xa0#,##0.00",jmc:"\xa4#,##0.00",jv:"\xa4\xa0#,##0.00",ka:"#,##0.00\xa0\xa4",kab:"#,##0.00\xa4",kam:"\xa4#,##0.00;(\xa4#,##0.00)",kde:"\xa4#,##0.00;(\xa4#,##0.00)",kea:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",kgp:"\xa4\xa0#,##0.00",khq:"#,##0.00\xa4",ki:"\xa4#,##0.00;(\xa4#,##0.00)",kk:"#,##0.00\xa0\xa4",kkj:"\xa4\xa0#,##0.00",kl:"\xa4#,##0.00;\xa4-#,##0.00",kln:"\xa4#,##0.00;(\xa4#,##0.00)",km:"#,##0.00\xa4;(#,##0.00\xa4)",kn:"\xa4#,##0.00;(\xa4#,##0.00)",ko:"\xa4#,##0.00;(\xa4#,##0.00)","ko-KP":"\xa4#,##0.00;(\xa4#,##0.00)",kok:"\xa4#,##0.00;(\xa4#,##0.00)",ks:"\xa4#,##0.00","ks-Arab":"\xa4#,##0.00","ks-Deva":"\xa4\xa0#,##0.00",ksb:"#,##0.00\xa4",ksf:"#,##0.00\xa0\xa4",ksh:"#,##0.00\xa0\xa4",ku:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",kw:"\xa4#,##0.00",ky:"#,##0.00\xa0\xa4",lag:"\xa4\xa0#,##0.00",lb:"#,##0.00\xa0\xa4",lg:"#,##0.00\xa4",lkt:"\xa4\xa0#,##0.00",ln:"#,##0.00\xa0\xa4","ln-AO":"#,##0.00\xa0\xa4","ln-CF":"#,##0.00\xa0\xa4","ln-CG":"#,##0.00\xa0\xa4",lo:"\xa4#,##0.00;\xa4-#,##0.00",lrc:"\xa4\xa0#,##0.00","lrc-IQ":"\xa4\xa0#,##0.00",lt:"#,##0.00\xa0\xa4",lu:"#,##0.00\xa4",luo:"#,##0.00\xa4",luy:"\xa4#,##0.00;\xa4-\xa0#,##0.00",lv:"#,##0.00\xa0\xa4",mai:"\xa4\xa0#,##0.00",mas:"\xa4#,##0.00;(\xa4#,##0.00)","mas-TZ":"\xa4#,##0.00;(\xa4#,##0.00)",mer:"\xa4#,##0.00;(\xa4#,##0.00)",mfe:"\xa4\xa0#,##0.00",mg:"\xa4#,##0.00",mgh:"\xa4\xa0#,##0.00",mgo:"\xa4\xa0#,##0.00",mi:"\xa4\xa0#,##0.00",mk:"#,##0.00\xa0\xa4",ml:"\xa4#,##0.00;(\xa4#,##0.00)",mn:"\xa4\xa0#,##0.00",mni:"\xa4\xa0#,##0.00","mni-Beng":"\xa4\xa0#,##0.00",mr:"\xa4#,##0.00;(\xa4#,##0.00)",ms:"\xa4#,##0.00;(\xa4#,##0.00)","ms-BN":"\xa4#,##0.00;(\xa4#,##0.00)","ms-ID":"\xa4#,##0.00","ms-SG":"\xa4#,##0.00;(\xa4#,##0.00)",mt:"\xa4#,##0.00",mua:"\xa4#,##0.00;(\xa4#,##0.00)",my:"\xa4\xa0#,##0.00",mzn:"\xa4\xa0#,##0.00",naq:"\xa4#,##0.00",nb:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nb-SJ":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",nd:"\xa4#,##0.00;(\xa4#,##0.00)",nds:"\xa4\xa0#,##0.00","nds-NL":"\xa4\xa0#,##0.00",ne:"\xa4\xa0#,##,##0.00","ne-IN":"\xa4\xa0#,##,##0.00",nl:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-AW":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-BE":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-BQ":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-CW":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-SR":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-SX":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",nmg:"#,##0.00\xa0\xa4",nn:"#,##0.00\xa0\xa4",nnh:"\xa4\xa0#,##0.00",no:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",nus:"\xa4#,##0.00;(\xa4#,##0.00)",nyn:"\xa4#,##0.00",om:"\xa4#,##0.00","om-KE":"\xa4#,##0.00",or:"\xa4#,##0.00;(\xa4#,##0.00)",os:"\xa4\xa0#,##0.00","os-RU":"\xa4\xa0#,##0.00",pa:"\xa4\xa0#,##0.00","pa-Arab":"\xa4\xa0#,##0.00","pa-Guru":"\xa4\xa0#,##0.00",pcm:"\xa4#,##0.00",pl:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",ps:"\xa4#,##0.00;(\xa4#,##0.00)","ps-PK":"\xa4#,##0.00;(\xa4#,##0.00)",pt:"\xa4\xa0#,##0.00","pt-AO":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-CH":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-CV":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-GQ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-GW":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-LU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-MO":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-MZ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-PT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-ST":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-TL":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",qu:"\xa4\xa0#,##0.00","qu-BO":"\xa4\xa0#,##0.00","qu-EC":"\xa4\xa0#,##0.00",rm:"#,##0.00\xa0\xa4",rn:"#,##0.00\xa4",ro:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ro-MD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",rof:"\xa4#,##0.00",ru:"#,##0.00\xa0\xa4","ru-BY":"#,##0.00\xa0\xa4","ru-KG":"#,##0.00\xa0\xa4","ru-KZ":"#,##0.00\xa0\xa4","ru-MD":"#,##0.00\xa0\xa4","ru-UA":"#,##0.00\xa0\xa4",rw:"\xa4\xa0#,##0.00",rwk:"#,##0.00\xa4",sa:"\xa4\xa0#,##0.00",sah:"#,##0.00\xa0\xa4",saq:"\xa4#,##0.00;(\xa4#,##0.00)",sat:"\xa4\xa0#,##0.00","sat-Olck":"\xa4\xa0#,##0.00",sbp:"#,##0.00\xa4",sc:"#,##0.00\xa0\xa4",sd:"\xa4\xa0#,##0.00","sd-Arab":"\xa4\xa0#,##0.00","sd-Deva":"\xa4\xa0#,##0.00",se:"#,##0.00\xa0\xa4","se-FI":"#,##0.00\xa0\xa4","se-SE":"#,##0.00\xa0\xa4",seh:"#,##0.00\xa4",ses:"#,##0.00\xa4",sg:"\xa4#,##0.00;\xa4-#,##0.00",shi:"#,##0.00\xa4","shi-Latn":"#,##0.00\xa4","shi-Tfng":"#,##0.00\xa4",si:"\xa4#,##0.00;(\xa4#,##0.00)",sk:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",sl:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",smn:"#,##0.00\xa0\xa4",sn:"\xa4#,##0.00;(\xa4#,##0.00)",so:"\xa4#,##0.00;(\xa4#,##0.00)","so-DJ":"\xa4#,##0.00;(\xa4#,##0.00)","so-ET":"\xa4#,##0.00;(\xa4#,##0.00)","so-KE":"\xa4#,##0.00;(\xa4#,##0.00)",sq:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sq-MK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sq-XK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",sr:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl-BA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl-ME":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl-XK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn-BA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn-ME":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn-XK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",su:"\xa4#,##0.00","su-Latn":"\xa4#,##0.00",sv:"#,##0.00\xa0\xa4","sv-AX":"#,##0.00\xa0\xa4","sv-FI":"#,##0.00\xa0\xa4",sw:"\xa4\xa0#,##0.00","sw-CD":"\xa4\xa0#,##0.00","sw-KE":"\xa4\xa0#,##0.00","sw-UG":"\xa4\xa0#,##0.00",ta:"\xa4#,##0.00;(\xa4#,##0.00)","ta-LK":"\xa4#,##0.00;(\xa4#,##0.00)","ta-MY":"\xa4#,##0.00;(\xa4#,##0.00)","ta-SG":"\xa4#,##0.00;(\xa4#,##0.00)",te:"\xa4#,##0.00;(\xa4#,##0.00)",teo:"\xa4#,##0.00;(\xa4#,##0.00)","teo-KE":"\xa4#,##0.00;(\xa4#,##0.00)",tg:"#,##0.00\xa0\xa4",th:"\xa4#,##0.00;(\xa4#,##0.00)",ti:"\xa4#,##0.00","ti-ER":"\xa4#,##0.00",tk:"#,##0.00\xa0\xa4",to:"\xa4\xa0#,##0.00",tr:"\xa4#,##0.00;(\xa4#,##0.00)","tr-CY":"\xa4#,##0.00;(\xa4#,##0.00)",tt:"#,##0.00\xa0\xa4",twq:"#,##0.00\xa4",tzm:"#,##0.00\xa0\xa4",ug:"\xa4#,##0.00;(\xa4#,##0.00)",uk:"#,##0.00\xa0\xa4",und:"\xa4\xa0#,##0.00",ur:"\xa4#,##0.00;(\xa4#,##0.00)","ur-IN":"\xa4#,##0.00;(\xa4#,##0.00)",uz:"#,##0.00\xa0\xa4","uz-Arab":"\xa4\xa0#,##0.00","uz-Cyrl":"#,##0.00\xa0\xa4","uz-Latn":"#,##0.00\xa0\xa4",vai:"\xa4#,##0.00;(\xa4#,##0.00)","vai-Latn":"\xa4#,##0.00;(\xa4#,##0.00)","vai-Vaii":"\xa4#,##0.00;(\xa4#,##0.00)",vi:"#,##0.00\xa0\xa4",vun:"\xa4#,##0.00",wae:"\xa4\xa0#,##0.00",wo:"\xa4\xa0#,##0.00",xh:"\xa4#,##0.00",xog:"#,##0.00\xa0\xa4",yav:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",yi:"\xa4\xa0#,##0.00",yo:"\xa4#,##0.00;(\xa4#,##0.00)","yo-BJ":"\xa4#,##0.00;(\xa4#,##0.00)",yrl:"\xa4\xa0#,##0.00","yrl-CO":"\xa4\xa0#,##0.00","yrl-VE":"\xa4\xa0#,##0.00",yue:"\xa4#,##0.00;(\xa4#,##0.00)","yue-Hans":"\xa4#,##0.00;(\xa4#,##0.00)","yue-Hant":"\xa4#,##0.00;(\xa4#,##0.00)",zgh:"#,##0.00\xa4",zh:"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans-HK":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans-MO":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans-SG":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hant":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hant-HK":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hant-MO":"\xa4#,##0.00;(\xa4#,##0.00)",zu:"\xa4#,##0.00;(\xa4#,##0.00)"},u=["standard","accounting"],g=/([^\s0]+)?(\s*)0*[.,]*0*(\s*)([^\s0]+)?/,_={},x=K=>{const J=c.A.locale()+"/"+JSON.stringify(K);return _[J]||(_[J]=new Intl.NumberFormat(c.A.locale(),K).format),_[J]},D={engine:function(){return"intl"},_formatNumberCore:function(K,J,ie){return"exponential"===J?this.callBase.apply(this,arguments):x(this._normalizeFormatConfig(J,ie,K))(K)},_normalizeFormatConfig:function(K,J,ie){let re;if("decimal"===K){const q=String(ie).split(".")[1];re={minimumIntegerDigits:J.precision||void 0,useGrouping:!1,maximumFractionDigits:q&&q.length,round:ie<0?"ceil":"floor"}}else re=this._getPrecisionConfig(J.precision);if("percent"===K)re.style="percent";else if("currency"===K){const q=J.useCurrencyAccountingStyle??(0,S.A)().defaultUseCurrencyAccountingStyle;re.style="currency",re.currency=J.currency||(0,S.A)().defaultCurrency,re.currencySign=u[+q]}return re},_getPrecisionConfig:function(K){let J;return J=null===K?{minimumFractionDigits:0,maximumFractionDigits:20}:{minimumFractionDigits:K||0,maximumFractionDigits:K||0},J},format:function(K,J){return"number"!=typeof K?K:("default"===(J=this._normalizeFormat(J)).currency&&(J.currency=(0,S.A)().defaultCurrency),J&&("function"==typeof J||J.type||J.formatter)?this.callBase.apply(this,arguments):x(J)(K))},_getCurrencySymbolInfo:function(K){const J=(K=>new Intl.NumberFormat(c.A.locale(),{style:"currency",currency:K}))(K);return this._extractCurrencySymbolInfo(J.format(0))},_extractCurrencySymbolInfo:function(K){const J=g.exec(K)||[];return{position:J[1]?"before":"after",symbol:J[1]||J[4]||"",delimiter:J[2]||J[3]||""}},getCurrencySymbol:function(K){return K||(K=(0,S.A)().defaultCurrency),{symbol:this._getCurrencySymbolInfo(K).symbol}},getOpenXmlCurrencyFormat:function(K){const J=K||(0,S.A)().defaultCurrency;return((K,J)=>{if(!J)return;let ie=K;if("string"==typeof K){ie="";for(let Y=0;Y<K.length;Y++)"$"!==K[Y]&&(ie+="\\"),ie+=K[Y]}const re={".00":"{0}","'":"\\'","\\(":"\\(","\\)":"\\)"," ":"\\ ",'"':"&quot;","\\\xa4":ie},q=J.split(";");for(let Y=0;Y<q.length;Y++)for(const Z in re)Object.prototype.hasOwnProperty.call(re,Z)&&(q[Y]=q[Y].replace(new RegExp(Z,"g"),re[Z]));return 2===q.length?q[0]+"_);"+q[1]:q[0]})(this._getCurrencySymbolInfo(J).symbol,c.A.getValueByClosestLocale(q=>a[q]))}},C=typeof Intl<"u",N=["currency","fixedpoint","exponential","percent","decimal"],G={1:"K",2:"M",3:"B",4:"T"},k={largenumber:"auto",thousands:1,millions:2,billions:3,trillions:4},U=(0,W.A)({engine:function(){return"base"},numericFormats:N,defaultLargeNumberFormatPostfixes:G,_parseNumberFormatString:function(K){const J={};if(!K||"string"!=typeof K)return;const ie=K.toLowerCase().split(" ");return(0,P.__)(ie,(re,q)=>{N.includes(q)?J.formatType=q:q in k&&(J.power=k[q])}),J.power&&!J.formatType&&(J.formatType="fixedpoint"),J.formatType?J:void 0},_calculateNumberPower:function(K,J,ie,re){let q=Math.abs(K),Y=0;if(q>1)for(;q&&q>=J&&(void 0===re||Y<re);)Y++,q/=J;else if(q>0&&q<1)for(;q<1&&(void 0===ie||Y>ie);)Y--,q*=J;return Y},_getNumberByPower:function(K,J,ie){let re=K;for(;J>0;)re/=ie,J--;for(;J<0;)re*=ie,J++;return re},_formatNumber:function(K,J,ie){"auto"===J.power&&(J.power=this._calculateNumberPower(K,1e3,0,4)),J.power&&(K=this._getNumberByPower(K,J.power,1e3));const re=this.defaultLargeNumberFormatPostfixes[J.power]||"";let q=this._formatNumberCore(K,J.formatType,ie);return q=q.replace(/(\d|.$)(\D*)$/,"$1"+re+"$2"),q},_formatNumberExponential:function(K,J){let ie=this._calculateNumberPower(K,10),re=this._getNumberByPower(K,ie,10);void 0===J.precision&&(J.precision=1),re.toFixed(J.precision||0)>=10&&(ie++,re/=10);const q=(ie>=0?"+":"")+ie.toString();return this._formatNumberCore(re,"fixedpoint",J)+"E"+q},_addZeroes:function(K,J){const ie=Math.pow(10,J),re=K<0?"-":"";let q=(K=(Math.abs(K)*ie>>>0)/ie).toString();for(;q.length<J;)q="0"+q;return re+q},_addGroupSeparators:function(K){const J=K.toString().split(".");return J[0].replace(/\B(?=(\d{3})+(?!\d))/g,(0,S.A)().thousandsSeparator)+(J[1]?(0,S.A)().decimalSeparator+J[1]:"")},_formatNumberCore:function(K,J,ie){return"exponential"===J?this._formatNumberExponential(K,ie):("decimal"!==J&&null!==ie.precision&&(ie.precision=ie.precision||0),"percent"===J&&(K*=100),void 0!==ie.precision&&(K="decimal"===J?this._addZeroes(K,ie.precision):null===ie.precision?K.toPrecision():(0,y.M)(K,ie.precision)),K="decimal"!==J?this._addGroupSeparators(K):K.toString().replace(".",(0,S.A)().decimalSeparator),"percent"===J&&(K+="%"),K)},_normalizeFormat:function(K){return K?("function"==typeof K||(0,b.Qd)(K)||(K={type:K}),K):{}},_getSeparators:function(){return{decimalSeparator:this.getDecimalSeparator(),thousandsSeparator:this.getThousandsSeparator()}},getThousandsSeparator:function(){return this.format(1e4,"fixedPoint")[2]},getDecimalSeparator:function(){return this.format(1.2,{type:"fixedPoint",precision:1})[1]},convertDigits:function(K,J){const ie=this.format(90,"decimal");if("string"!=typeof K||"0"===ie[1])return K;const re=J?ie[1]:"0",q=J?"0":ie[1],Z=new RegExp("["+re+"-"+(J?ie[0]:"9")+"]","g");return K.replace(Z,Q=>String.fromCharCode(Q.charCodeAt(0)+(q.charCodeAt(0)-re.charCodeAt(0))))},getNegativeEtalonRegExp:function(K){const J=this._getSeparators(),ie=new RegExp("[0-9"+(0,o.Nt)(J.decimalSeparator+J.thousandsSeparator)+"]+","g");let re=this.format(-1,K).replace(ie,"1");return["\\","(",")","[","]","*","+","$","^","?","|","{","}"].forEach(q=>{re=re.replace(new RegExp(`\\${q}`,"g"),`\\${q}`)}),re=re.replace(/ /g,"\\s"),re=re.replace(/1/g,".*"),new RegExp(re,"g")},getSign:function(K,J){if(!J)return"-"===K.replace(/[^0-9-]/g,"").charAt(0)?-1:1;const ie=this.getNegativeEtalonRegExp(J);return K.match(ie)?-1:1},format:function(K,J){if("number"!=typeof K||"number"==typeof J)return K;if("function"==typeof(J=J&&J.formatter||J))return J(K);(J=this._normalizeFormat(J)).type||(J.type="decimal");const ie=this._parseNumberFormatString(J.type);if(!ie){const re=this._getSeparators();return re.unlimitedIntegerDigits=J.unlimitedIntegerDigits,this.convertDigits((0,f.f)(J.type,re)(K))}return this._formatNumber(K,ie,J)},parse:function(K,J){if(!K)return;if(J&&J.parser)return J.parser(K);K=this.convertDigits(K,!0),J&&"string"!=typeof J&&T.A.log("W0011");const ie=this.getDecimalSeparator(),re=new RegExp("[^0-9"+(0,o.Nt)(ie)+"]","g"),q=K.replace(re,"").replace(ie,".").replace(/\.$/g,"");if("."===q||""===q)return null;if(this._calcSignificantDigits(q)>15)return NaN;let Y=+q*this.getSign(K,J);J=this._normalizeFormat(J);const Z=this._parseNumberFormatString(J.type);let Q=Z?.power;if(Q){if("auto"===Q){const te=K.match(/\d(K|M|B|T)/);te&&(Q=Object.keys(G).find(pe=>G[pe]===te[1]))}Y*=Math.pow(10,3*Q)}return"percent"===Z?.formatType&&(Y/=100),Y},_calcSignificantDigits:function(K){const[J,ie]=K.split("."),re=Y=>{let Z=-1;for(let Q=0;Q<Y.length;Q++)if("0"!==Y[Q]){Z=Q;break}return Z>-1?Y.length-Z:0};let q=0;return J&&(q+=re(J.split(""))),ie&&(q+=re(ie.split("").reverse())),q}});U.inject(d.A),C&&U.inject(D);const B=U},749:(In,Ze,M)=>{"use strict";M.d(Ze,{M:()=>f});var W=M(3012);const o=10;function f(S,T){const y=T||0;return(y>0?function b(S,T){const y=Math.pow(o,T);return function P(S){return(0,W._S)(S)*Math.round(Math.abs(S))}((0,W.T0)(S,T))/y}(...arguments):S).toFixed(y)}},1848:(In,Ze,M)=>{"use strict";M.d(Ze,{Q:()=>o});const o=(0,M(5652).q6)(void 0)},4505:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ie});var W=M(5737),o=M(5328),P=M(7426),b=M(4267),f=M(5704),S=M(6054),T=M(7631),y=M(3090),d=M(9522),c=M(1830),s=M(9144),a=M(5652),u=M(1832);const h=(re,q)=>Object.keys(re).length===Object.keys(q).length&&Object.keys(re).every(Y=>re[Y]===q[Y]),g=["isEqual"];class C extends a.JP{constructor(q){super(q),this.renderTemplate=this.renderTemplate.bind(this)}renderTemplate(){const q=(0,o.UV)(this.$LI,!0);if(null==q||!q.parentNode)return()=>{};const Y=q.parentNode,Z=(0,f.A)(Y),Q=Z.contents().toArray(),te=function w(re,q){const{data:Y,index:Z}=re.model??{data:{}};Y&&Object.keys(Y).forEach(te=>{Y[te]&&S.A.isNode(Y[te])&&(Y[te]=(0,d.cc)((0,f.A)(Y[te])))});const Q=re.template.render((0,W.A)({container:q,transclude:re.transclude},{renovated:re.renovated},re.transclude?{}:{model:Y},!re.transclude&&Number.isFinite(Z)?{index:Z}:{}));return void 0===Q?[]:function _(re){return!!re.toArray}(Q)?Q.toArray():[(0,f.A)(Q).get(0)]}(this.props,(0,d.cc)(Z));return(0,u.bG)((0,f.A)(q),(0,f.A)(te)),()=>{const pe=(0,f.A)(Y).contents().toArray();(function D(re,q){q.forEach(Y=>{!re.find(Q=>Y===Q)&&Y.parentNode&&(0,f.A)(Y).remove()})})(Q,pe),Y.appendChild(q)}}shouldComponentUpdate(q){const{model:Y,template:Z}=this.props,{isEqual:Q,model:te,template:pe}=q,z=Q??h;if(Z!==pe)return!0;if(!(0,c.O9)(Y)||!(0,c.O9)(te))return Y!==te;const{data:oe,index:ae}=Y,{data:ee,index:he}=te;return ae!==he||!z(oe,ee)}createEffects(){return[new a.Lt(this.renderTemplate,[this.props.template,this.props.model])]}updateEffects(){this._effects[0].update([this.props.template,this.props.model])}componentWillUnmount(){}render(){return null}}var I=M(4270);function L(re){return Array.isArray(re)?[...re]:(0,W.A)({},re)}function N(re,q,Y){const Z=L(Y.length>0&&q&&re!==q?q:re),Q=Y[0];return Y.length>1?Z[Q]=N(re[Q],q?.[Q],Y.slice(1)):Q&&(Z[Q]=(0,c.Qd)(re[Q])?L(re[Q]):re[Q]),Z}function G(re,q,Y,Z){const Q=q[Y],te=re[Y];re[Y]=(0,c.Qd)(Q)||Y!==Z&&Array.isArray(Q)?N(Q,te,(0,I.u7)(Z).slice(1)):Q}M(778),M(4451),M(1134);const K=(re,q)=>Y=>{Object.prototype.hasOwnProperty.call(re,Y)&&void 0===re[Y]&&(re[Y]=q(Y))};let J=(()=>{class re extends T.A{get _propsInfo(){return{allowNull:[],twoWay:[],elements:[],templates:[],props:[]}}constructor(Y,Z){super(Y,Z),this._shouldRaiseContentReady=!1,this.validateKeyDownHandler()}validateKeyDownHandler(){if(this.getSupportedKeyNames().length>0&&"function"!=typeof this._viewComponent.prototype.keyDown)throw Error("Component's declaration must have 'keyDown' method.")}get viewRef(){var Y;return null===(Y=this._viewRef)||void 0===Y?void 0:Y.current}_checkContentReadyOption(Y){const Z=this._getContentReadyOptions().reduce((Q,te)=>(Q[te]=!0,Q),{});return this._checkContentReadyOption=Q=>!!Z[Q],this._checkContentReadyOption(Y)}_getContentReadyOptions(){return["rtlEnabled"]}_fireContentReady(){this._actionsMap.onContentReady({})}_getDefaultOptions(){const Y=this._getViewComponentDefaultProps();return(0,y.X)(!0,super._getDefaultOptions(),Y,this._propsInfo.twoWay.reduce((Z,Q)=>{let[te,pe,z]=Q;return(0,W.A)({},Z,{[te]:Y[pe],[z]:oe=>this.option(te,oe)})},{}),this._propsInfo.templates.reduce((Z,Q)=>(0,W.A)({},Z,{[Q]:null}),{}))}_getUnwrappedOption(){const Y={};return Object.keys(this.option()).forEach(Z=>{Y[Z]=this.option(Z)}),Y}_initializeComponent(){var Y;super._initializeComponent(),null===(Y=this._templateManager)||void 0===Y||Y.addDefaultTemplates(this.getDefaultTemplates());const Z=this._getUnwrappedOption();this._props=this._optionsWithDefaultTemplates(Z),this._propsInfo.templates.forEach(Q=>{this._componentTemplates[Q]=this._createTemplateComponent(this._props[Q])}),Object.keys(this._getActionConfigsFull()).forEach(Q=>this._addAction(Q)),this._viewRef=(0,o._3)(),this.defaultKeyHandlers=this._createDefaultKeyHandlers()}_initMarkup(){const Y=this.getProps();this._renderWrapper(Y)}_renderWrapper(Y){const Z=this.$element()[0];this._isNodeReplaced||b.A.onPreRender(),b.A.render(this._viewComponent,Y,Z,this._isNodeReplaced),this._isNodeReplaced||(this._isNodeReplaced=!0,b.A.onAfterRender(),this._shouldRaiseContentReady=!0),this._shouldRaiseContentReady&&(this._fireContentReady(),this._shouldRaiseContentReady=!1)}_silent(Y,Z){this._options.silent(Y,Z)}_render(){}_removeWidget(){b.A.remove(this.$element()[0])}_dispose(){this._removeWidget(),super._dispose()}get elementAttr(){const Y=this.$element()[0];if(!this._elementAttr){const{attributes:te}=Y,pe=Array.from(te).filter(z=>{var oe;return!this._propsInfo.templates.includes(z.name)&&(null===(oe=te[z.name])||void 0===oe?void 0:oe.specified)}).reduce((z,oe)=>{let{name:ae,value:ee}=oe;const he=z;return he[ae]=""===ee&&ae in Y?Y[ae]:ee,he},{});this._elementAttr=pe,this._storedClasses=Y.getAttribute("class")||""}const Z=Y.style,Q={};for(let te=0;te<Z.length;te+=1)Q[Z[te]]=Z.getPropertyValue(Z[te]);return this._elementAttr.style=Q,this._elementAttr.class=this._storedClasses,this._elementAttr}_getAdditionalActionConfigs(){return{onContentReady:{excludeValidators:["disabled","readOnly"]}}}_getAdditionalProps(){return[]}_patchOptionValues(Y){const{allowNull:Z,elements:Q,props:te,twoWay:pe}=this._propsInfo,z=this._getViewComponentDefaultProps(),oe=Object.keys(z),ae=this._getDefaultOptions(),{children:ee,onKeyboardHandled:he,ref:de}=Y,be={ref:de,children:ee,onKeyDown:he?(ve,le)=>{he(le)}:void 0};return[...te,...this._getAdditionalProps()].forEach(ve=>{Object.prototype.hasOwnProperty.call(Y,ve)&&(be[ve]=Y[ve])}),Z.forEach(K(be,()=>null)),oe.forEach(K(be,ve=>ae[ve])),pe.forEach(ve=>{let[le,Ce]=ve;K(be,()=>ae[Ce])(le)}),Q.forEach(ve=>{if(ve in be){const le=be[ve];(0,c.Kb)(le)&&(be[ve]=this._patchElementParam(le))}}),be}getSupportedKeyNames(){return[]}prepareStyleProp(Y){return"string"==typeof Y.style?(0,W.A)({},Y,{style:{},cssText:Y.style}):Y}getProps(){const{elementAttr:Y}=this.option(),Z=this._patchOptionValues((0,W.A)({},this._props,{ref:this._viewRef,children:this._extractDefaultSlot(),aria:this._aria}));return this._propsInfo.templates.forEach(Q=>{Z[Q]=this._componentTemplates[Q]}),this.prepareStyleProp((0,W.A)({},Z,this.elementAttr,Y,{className:[...(this.elementAttr.class??"").split(" "),...(Y?.class??"").split(" ")].filter((Q,te,pe)=>Q&&pe.indexOf(Q)===te).join(" ").trim(),class:""},this._actionsMap))}_getActionConfigs(){return{}}_getActionConfigsFull(){return(0,W.A)({},this._getActionConfigs(),this._getAdditionalActionConfigs())}getDefaultTemplates(){const Y=Object.values(this._templatesInfo),Z={};return Y.forEach(Q=>{Z[Q]="dx-renovation-template-mock"}),Z}get _templatesInfo(){return{}}_optionsWithDefaultTemplates(Y){const Z=Object.entries(this._templatesInfo).reduce((Q,te)=>{let[pe,z]=te;return(0,W.A)({},Q,{[pe]:Y[pe]??z})},{});return(0,W.A)({},Y,Z)}_init(){super._init(),this.customKeyHandlers={},this._actionsMap={},this._aria={},this._componentTemplates={}}_createDefaultKeyHandlers(){const Y={};return this.getSupportedKeyNames().forEach(Q=>{Y[Q]=te=>this.viewRef.keyDown(P.A.createKeyDownOptions(te))}),Y}_addAction(Y,Z){let Q=Z;if(!Q){const te=this._createActionByOption(Y,this._getActionConfigsFull()[Y]);Q=pe=>(Object.keys(pe).forEach(z=>{(0,c.O9)(pe[z])&&S.A.isNode(pe[z])&&(pe[z]=(0,d.cc)((0,f.A)(pe[z])))}),te(pe))}this._actionsMap[Y]=Q}_optionChanged(Y){const{fullName:Z,name:Q,previousValue:te,value:pe}=Y;G(this._props,this.option(),Q,Z),this._propsInfo.templates.includes(Q)&&pe!==te&&(this._componentTemplates[Q]=this._createTemplateComponent(pe)),Q&&this._getActionConfigsFull()[Q]&&this._addAction(Q),this._shouldRaiseContentReady=this._shouldRaiseContentReady||this._checkContentReadyOption(Z),super._optionChanged(Y),this._invalidate()}_extractDefaultSlot(){return this.option("_hasAnonymousTemplateContent")?b.A.createElement(C,{template:this._getTemplate(this._templateManager.anonymousTemplateName),transclude:!0,renovated:!0}):null}_createTemplateComponent(Y){if(!Y)return;const Z=this._getTemplate(Y);return(0,c.Kg)(Z)&&"dx-renovation-template-mock"===Z?void 0:Q=>b.A.createElement(C,function x(re,q){const Y={template:q,model:(0,W.A)({},re)},Z=re.data??{},{isEqual:Q}=Z,te=(0,s.A)(Z,g);return Q&&(Y.model.data=te,Y.isEqual=Q),Y}(Q,Z))}_wrapKeyDownHandler(Y){return Z=>{const{keyName:Q,originalEvent:te,which:pe}=Z,z=this.customKeyHandlers,oe=z[Q]||z[pe];return void 0===oe||oe.bind(this)(te,Z)?Y?.(te,Z):(te.cancel=!0,te)}}_toPublicElement(Y){return(0,d.cc)((0,f.A)(Y))}_patchElementParam(Y){try{const Z=(0,f.A)(Y),Q=Z?.get(0);return null!=Q&&Q.nodeType?Q:Y}catch{return Y}}repaint(){this._isNodeReplaced=!1,this._shouldRaiseContentReady=!0,this._removeWidget(),this._refresh()}_supportedKeys(){return(0,W.A)({},this.defaultKeyHandlers,this.customKeyHandlers)}registerKeyHandler(Y,Z){this.customKeyHandlers[Y]=Z}setAria(Y,Z){this._aria[Y]=Z,this._initMarkup()}_getViewComponentDefaultProps(){return this._viewComponent.defaultProps||{}}}return re.IS_RENOVATED_WIDGET=!1,re})();const ie=J;J.IS_RENOVATED_WIDGET=!0},9641:(In,Ze,M)=>{"use strict";M.d(Ze,{s:()=>W});const W={className:"",activeStateEnabled:!1,disabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,tabIndex:0,visible:!0}},807:(In,Ze,M)=>{"use strict";M.d(Ze,{FU:()=>I});var W=M(9144),o=M(5737),P=M(5328),b=M(5652),f=M(1848),S=M(1830);const T=["dataSource","selectedRowKeys"],y={integrationOptions:!0};function d(L,N,G){return{path:L,value:N,previousValue:G}}function c(L,N,G,k,U,B){if(y[k])return;const K=(0,S.NW)(N),J=(0,S.NW)(G);if(N!==G)if(K!==J)L.push(d(k,G,N));else if("object"===K)if((0,S.Qd)(G)){const ie=a(N,G,U,B);L.push(...ie.map(re=>(0,o.A)({},re,{path:`${k}.${re.path}`})))}else L.push(d(k,G,N));else if("array"===K)if(B.some(re=>U.includes(re))&&N!==G)L.push(d(k,G,N));else if(N.length!==G.length)L.push(d(k,G,N));else{const re=a(N,G,U,B);[].push.apply(L,re.map(q=>(0,o.A)({},q,{path:`${k}${q.path}`})))}else L.push(d(k,G,N))}const s=L=>(N,G,k,U)=>{const B=[],K=Array.isArray(N)?J=>{c(B,N[J],G[J],`[${J}]`,`${k}.${J}`,U)}:J=>{c(B,N[J],G[J],J,`${k}.${J}`,U)};return L(N).forEach(K),Object.keys(G).filter(J=>!Object.prototype.hasOwnProperty.call(N,J)&&N[J]!==G[J]).forEach(J=>{B.push({path:J,value:G[J],previousValue:N[J]})}),B},a=s(L=>Object.keys(L)),u={key:!0,ref:!0,children:!0,style:!0},h=s(L=>Object.keys(L).filter(N=>!u[N])),_=["valueChange"],x=["componentProps","componentType","templateNames"],w=L=>Object.keys(L).reduce((N,G)=>(void 0!==L[G]&&(N[G]=L[G]),N),{}),C={};let I=(()=>{class L extends b.JP{get config(){return this.context[f.Q.id]?this.context[f.Q.id]:f.Q.defaultValue}constructor(G){super(G),this.state={},this.widgetRef=(0,P._3)(),this.getInstance=this.getInstance.bind(this),this.setupWidget=this.setupWidget.bind(this),this.updateWidget=this.updateWidget.bind(this)}createEffects(){return[new b.Lt(this.setupWidget,[]),new b.Lt(this.updateWidget,[this.props.componentProps,this.config,this.props.templateNames])]}updateEffects(){var G;null===(G=this._effects[1])||void 0===G||G.update([this.props.componentProps,this.config,this.props.templateNames])}setupWidget(){const G=new this.props.componentType(this.widgetRef.current,this.properties);return this.instance=G,()=>{G.dispose(),this.instance=null}}updateWidget(){const G=this.getInstance();if(!G)return;const k=function g(L,N){return h(L,N,"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:T)}(this.prevProps||{},this.properties);k.length&&(G.beginUpdate(),k.forEach(U=>{let{path:B,value:K}=U;G.option(B,K)}),G.endUpdate()),this.prevProps=this.properties}get properties(){var G;const k=w(this.props.componentProps),{valueChange:U}=k,B=(0,W.A)(k,_),K=(0,o.A)({rtlEnabled:!(null===(G=this.config)||void 0===G||!G.rtlEnabled),isRenovated:!0},B);return U&&(K.onValueChanged=ie=>{let{value:re}=ie;return U(re)}),this.props.templateNames.forEach(ie=>{(0,b.rJ)(ie,K,this)&&(K[ie]=(re,q,Y)=>{(0,b.Xm)(this.props.componentProps[ie],{item:re,index:q,container:Y},this)})}),K}get restAttributes(){return(0,W.A)(this.props,x)}getInstance(){return this.instance}render(){return(L=>{let{props:{componentProps:{className:N}},restAttributes:G,widgetRef:k}=L;return w((0,P.bF)(1,"div",N,null,1,(0,o.A)({},G),null,k))})({props:(0,o.A)({},this.props),widgetRef:this.widgetRef,config:this.config,properties:this.properties,restAttributes:this.restAttributes})}}return L.defaultProps=C,L})()},2673:(In,Ze,M)=>{"use strict";M.d(Ze,{x0:()=>re,b7:()=>ie});var W=M(9144),o=M(5737),P=M(5328),b=M(5652),T=(M(778),M(1134),M(1830)),y=M(1294),d=M(2047),c=M(6628),s=M(3090),a=M(8649),u=M(9641),h=M(1848);const g=["children","rtlEnabled"],x={};let w=(()=>{class q extends b.eh{constructor(Z){super(Z),this.state={},this.__getterCache={}}getChildContext(){return(0,o.A)({},this.context,{[h.Q.id]:this.config||h.Q.defaultValue})}get config(){return void 0!==this.__getterCache.config?this.__getterCache.config:this.__getterCache.config={rtlEnabled:this.props.rtlEnabled}}get restAttributes(){return(0,W.A)(this.props,g)}componentWillUpdate(Z,Q,te){this.props.rtlEnabled!==Z.rtlEnabled&&(this.__getterCache.config=void 0)}render(){return(q=>q.props.children)({props:(0,o.A)({},this.props),config:this.config,restAttributes:this.restAttributes})}}return q.defaultProps=x,q})();var D=M(3686),L=M(1773),N=M(7251),G=M(6054);const k=["_feedbackHideTimeout","_feedbackShowTimeout","accessKey","activeStateEnabled","activeStateUnit","addWidgetClass","aria","children","className","classes","cssText","disabled","focusStateEnabled","height","hint","hoverStateEnabled","name","onActive","onClick","onDimensionChanged","onFocusIn","onFocusOut","onHoverEnd","onHoverStart","onInactive","onKeyDown","onRootElementRendered","onVisibilityChange","rootElementRef","rtlEnabled","tabIndex","visible","width"],ie=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(u.s),Object.getOwnPropertyDescriptors({_feedbackHideTimeout:400,_feedbackShowTimeout:30,cssText:"",aria:Object.freeze({}),classes:"",name:"",addWidgetClass:!0})));let re=(()=>{class q extends b.oe{get config(){return this.context[h.Q.id]?this.context[h.Q.id]:h.Q.defaultValue}constructor(Z){super(Z),this.widgetElementRef=(0,P._3)(),this.state={active:!1,focused:!1,hovered:!1},this.setRootElementRef=this.setRootElementRef.bind(this),this.activeEffect=this.activeEffect.bind(this),this.inactiveEffect=this.inactiveEffect.bind(this),this.clickEffect=this.clickEffect.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.focusInEffect=this.focusInEffect.bind(this),this.focusOutEffect=this.focusOutEffect.bind(this),this.hoverStartEffect=this.hoverStartEffect.bind(this),this.hoverEndEffect=this.hoverEndEffect.bind(this),this.keyboardEffect=this.keyboardEffect.bind(this),this.resizeEffect=this.resizeEffect.bind(this),this.windowResizeEffect=this.windowResizeEffect.bind(this),this.visibilityEffect=this.visibilityEffect.bind(this),this.checkDeprecation=this.checkDeprecation.bind(this),this.applyCssTextEffect=this.applyCssTextEffect.bind(this)}createEffects(){return[new b.Lt(this.setRootElementRef,[]),new b.Lt(this.activeEffect,[this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),new b.Lt(this.inactiveEffect,[this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),new b.Lt(this.clickEffect,[this.props.disabled,this.props.name,this.props.onClick]),new b.Lt(this.focusInEffect,[this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),new b.Lt(this.focusOutEffect,[this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),new b.Lt(this.hoverStartEffect,[this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),new b.Lt(this.hoverEndEffect,[this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),new b.Lt(this.keyboardEffect,[this.props.focusStateEnabled,this.props.onKeyDown]),new b.Lt(this.resizeEffect,[this.props.name,this.props.onDimensionChanged]),new b.Lt(this.windowResizeEffect,[this.props.onDimensionChanged]),new b.Lt(this.visibilityEffect,[this.props.name,this.props.onVisibilityChange]),new b.Lt(this.checkDeprecation,[this.props.height,this.props.width]),new b.Lt(this.applyCssTextEffect,[this.props.cssText]),(0,b.h2)()]}updateEffects(){var Z,Q,te,pe,z,oe,ae,ee,he,de,ue,be,ve;null===(Z=this._effects[1])||void 0===Z||Z.update([this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),null===(Q=this._effects[2])||void 0===Q||Q.update([this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),null===(te=this._effects[3])||void 0===te||te.update([this.props.disabled,this.props.name,this.props.onClick]),null===(pe=this._effects[4])||void 0===pe||pe.update([this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),null===(z=this._effects[5])||void 0===z||z.update([this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),null===(oe=this._effects[6])||void 0===oe||oe.update([this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),null===(ae=this._effects[7])||void 0===ae||ae.update([this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),null===(ee=this._effects[8])||void 0===ee||ee.update([this.props.focusStateEnabled,this.props.onKeyDown]),null===(he=this._effects[9])||void 0===he||he.update([this.props.name,this.props.onDimensionChanged]),null===(de=this._effects[10])||void 0===de||de.update([this.props.onDimensionChanged]),null===(ue=this._effects[11])||void 0===ue||ue.update([this.props.name,this.props.onVisibilityChange]),null===(be=this._effects[12])||void 0===be||be.update([this.props.height,this.props.width]),null===(ve=this._effects[13])||void 0===ve||ve.update([this.props.cssText])}setRootElementRef(){const{onRootElementRendered:Z,rootElementRef:Q}=this.props;Q&&(Q.current=this.widgetElementRef.current),Z?.(this.widgetElementRef.current)}activeEffect(){const{_feedbackShowTimeout:Z,activeStateEnabled:Q,activeStateUnit:te,disabled:pe,onActive:z}=this.props;if(Q&&!pe)return(0,d.wD)(this.widgetElementRef.current,ae=>{this.setState(ee=>({active:!0})),z?.(ae)},{timeout:Z,selector:te},"UIFeedback")}inactiveEffect(){const{_feedbackHideTimeout:Z,activeStateEnabled:Q,activeStateUnit:te,onInactive:pe}=this.props;if(Q)return(0,d.Lh)(this.widgetElementRef.current,oe=>{this.state.active&&(this.setState(ae=>({active:!1})),pe?.(oe))},{timeout:Z,selector:te},"UIFeedback")}clickEffect(){const{disabled:Z,name:Q,onClick:te}=this.props,pe=Q;if(te&&!Z)return y.Rz.on(this.widgetElementRef.current,te,{namespace:pe}),()=>y.Rz.off(this.widgetElementRef.current,{namespace:pe})}focusInEffect(){const{disabled:Z,focusStateEnabled:Q,name:te,onFocusIn:pe}=this.props;if(Q&&!Z)return(0,d.lT)(this.widgetElementRef.current,oe=>{oe.isDefaultPrevented()||(this.setState(ae=>({focused:!0})),pe?.(oe))},null,`${te}Focus`)}focusOutEffect(){const{focusStateEnabled:Z,name:Q,onFocusOut:te}=this.props;if(Z)return(0,d.oo)(this.widgetElementRef.current,z=>{!z.isDefaultPrevented()&&this.state.focused&&(this.setState(oe=>({focused:!1})),te?.(z))},null,`${Q}Focus`)}hoverStartEffect(){const{activeStateUnit:Z,disabled:Q,hoverStateEnabled:te,onHoverStart:pe}=this.props;if(te&&!Q)return(0,d.mg)(this.widgetElementRef.current,oe=>{!this.state.active&&this.setState(ae=>({hovered:!0})),pe?.(oe)},{selector:Z},"UIFeedback")}hoverEndEffect(){const{activeStateUnit:Z,hoverStateEnabled:Q,onHoverEnd:te}=this.props;if(Q)return(0,d.Jj)(this.widgetElementRef.current,z=>{this.state.hovered&&(this.setState(oe=>({hovered:!1})),te?.(z))},{selector:Z},"UIFeedback")}keyboardEffect(){const{focusStateEnabled:Z,onKeyDown:Q}=this.props;if(Z&&Q){const te=y.QJ.on(this.widgetElementRef.current,this.widgetElementRef.current,pe=>Q(pe));return()=>y.QJ.off(te)}}resizeEffect(){const Z=`${this.props.name}VisibilityChange`,{onDimensionChanged:Q}=this.props;if(Q)return y.XR.on(this.widgetElementRef.current,Q,{namespace:Z}),()=>y.XR.off(this.widgetElementRef.current,{namespace:Z})}windowResizeEffect(){const{onDimensionChanged:Z}=this.props;if(Z)return L.A.add(Z),()=>{L.A.remove(Z)}}visibilityEffect(){const{name:Z,onVisibilityChange:Q}=this.props,te=`${Z}VisibilityChange`;if(Q)return y.XD.on(this.widgetElementRef.current,()=>Q(!0),()=>Q(!1),{namespace:te}),()=>y.XD.off(this.widgetElementRef.current,{namespace:te})}checkDeprecation(){const{height:Z,width:Q}=this.props;(0,T.Tn)(Q)&&N.A.log("W0017","width"),(0,T.Tn)(Z)&&N.A.log("W0017","height")}applyCssTextEffect(){const{cssText:Z}=this.props;""!==Z&&(this.widgetElementRef.current.style.cssText=Z)}get shouldRenderConfigProvider(){const{rtlEnabled:Z}=this.props;return function I(q,Y){const Z=(0,T.O9)(q),Q=(0,T.O9)((0,D.A)().rtlEnabled)&&!Z&&!(0,T.O9)(Y?.rtlEnabled);return Z&&q!==Y?.rtlEnabled||Q}(Z,this.config)}get rtlEnabled(){const{rtlEnabled:Z}=this.props;return function C(q,Y){return void 0!==q?q:void 0!==Y?.rtlEnabled?Y.rtlEnabled:(0,D.A)().rtlEnabled}(Z,this.config)}get attributes(){const{aria:Z,disabled:Q,focusStateEnabled:te,visible:pe}=this.props,z=te&&!Q&&this.props.accessKey;return(0,o.A)({},(0,s.X)({},z&&{accessKey:z}),(q=>Object.keys(q).reduce((Y,Z)=>q[Z]?(0,o.A)({},Y,{["role"===Z||"id"===Z?Z:`aria-${Z}`]:String(q[Z])}):Y,{}))((0,o.A)({},Z,{disabled:Q,hidden:!pe})),(0,s.X)({},this.restAttributes))}get styles(){const{height:Z,width:Q}=this.props,te=this.restAttributes.style||{},pe=(0,a.CC)("width",(0,T.Tn)(Q)?Q():Q),z=(0,a.CC)("height",(0,T.Tn)(Z)?Z():Z);return(0,o.A)({},te,{height:z??te.height,width:pe??te.width})}get cssClasses(){const{activeStateEnabled:Z,addWidgetClass:Q,className:te,classes:pe,disabled:z,focusStateEnabled:oe,hoverStateEnabled:ae,onVisibilityChange:ee,visible:he}=this.props,de=!!oe&&!z,ue=!!ae&&!z,be=!!Z&&!z,ve={"dx-widget":!!Q,[String(pe)]:!!pe,[String(te)]:!!te,"dx-state-disabled":!!z,"dx-state-invisible":!he,"dx-state-focused":!!this.state.focused&&de,"dx-state-active":!!this.state.active&&be,"dx-state-hover":!!this.state.hovered&&ue&&!this.state.active,"dx-rtl":!!this.rtlEnabled,"dx-visibility-change-handler":!!ee};return(0,c.g)(ve)}get tabIndex(){const{disabled:Z,focusStateEnabled:Q,tabIndex:te}=this.props;return Q&&!Z?te:void 0}get restAttributes(){return(0,W.A)(this.props,k)}focus(){y.XC.trigger(this.widgetElementRef.current)}blur(){const Z=G.A.getActiveElement(this.widgetElementRef.current);this.widgetElementRef.current===Z&&Z.blur()}activate(){this.setState(Z=>({active:!0}))}deactivate(){this.setState(Z=>({active:!1}))}render(){return(q=>{const Y=(0,P._B)((0,P.bF)(1,"div",q.cssClasses,q.props.children,0,(0,o.A)({},q.attributes,{tabIndex:q.tabIndex,title:q.props.hint,style:(0,b.gs)(q.styles)}),null,q.widgetElementRef));return q.shouldRenderConfigProvider?(0,P.sO)(2,w,{rtlEnabled:q.rtlEnabled,children:Y}):Y})({props:(0,o.A)({},this.props),active:this.state.active,focused:this.state.focused,hovered:this.state.hovered,widgetElementRef:this.widgetElementRef,config:this.config,shouldRenderConfigProvider:this.shouldRenderConfigProvider,rtlEnabled:this.rtlEnabled,attributes:this.attributes,styles:this.styles,cssClasses:this.cssClasses,tabIndex:this.tabIndex,restAttributes:this.restAttributes})}}return q.defaultProps=ie,q})()},1257:(In,Ze,M)=>{"use strict";M.d(Ze,{KE:()=>I,eH:()=>D});var W=M(9144),o=M(5737),P=M(5328),b=M(5652),f=M(2925),S=M(2673),T=M(9641),y=M(6628),d=M(1144),c=M(807);const s=["accessKey","activeStateEnabled","boundary","className","contentId","disabled","focusStateEnabled","height","hint","hoverStateEnabled","mode","offset","onClick","onKeyDown","positionSide","rtlEnabled","tabIndex","target","validationErrors","visible","visualContainer","width"],u=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(T.s),Object.getOwnPropertyDescriptors({mode:"auto",positionSide:"top",offset:Object.freeze({h:0,v:0}),isReactComponentWrapper:!0})));let h=(()=>{class k extends b.eh{constructor(B){super(B),this.state={}}get componentProps(){return this.props}get restAttributes(){return(0,W.A)(this.props,s)}render(){return(k=>{let{componentProps:U,restAttributes:B}=k;return(0,P._B)((0,P.sO)(2,c.FU,(0,o.A)({componentType:d.A,componentProps:U,templateNames:[]},B)))})({props:(0,o.A)({},this.props),componentProps:this.componentProps,restAttributes:this.restAttributes})}}return k.defaultProps=u,k})();M(5170);const _=["accessKey","activeStateEnabled","aria","children","className","classes","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","isDirty","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"],D=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(T.s),Object.getOwnPropertyDescriptors({readOnly:!1,name:"",validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"bottom",validationStatus:"valid",isValid:!0,isDirty:!1,inputAttr:Object.freeze({}),defaultValue:null,valueChange:()=>{}}))),C={get readOnly(){return D.readOnly},get name(){return D.name},get validationError(){return D.validationError},get validationErrors(){return D.validationErrors},get validationMessageMode(){return D.validationMessageMode},get validationMessagePosition(){return D.validationMessagePosition},get validationStatus(){return D.validationStatus},get isValid(){return D.isValid},get isDirty(){return D.isDirty},get inputAttr(){return D.inputAttr},get defaultValue(){return D.defaultValue},get valueChange(){return D.valueChange},get className(){return D.className},get activeStateEnabled(){return D.activeStateEnabled},get disabled(){return D.disabled},get focusStateEnabled(){return D.focusStateEnabled},get hoverStateEnabled(){return D.hoverStateEnabled},get tabIndex(){return D.tabIndex},get visible(){return D.visible},get aria(){return S.b7.aria},get classes(){return S.b7.classes}};class I extends b.oe{constructor(U){super(U),this.widgetRef=(0,P._3)(),this.rootElementRef=(0,P._3)(),this.__getterCache={},this.state={validationMessageGuid:`dx-${new f.A}`,isValidationMessageVisible:!1,value:void 0!==this.props.value?this.props.value:this.props.defaultValue},this.updateValidationMessageVisibility=this.updateValidationMessageVisibility.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onFocusIn=this.onFocusIn.bind(this)}createEffects(){return[new b.Lt(this.updateValidationMessageVisibility,[this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors]),(0,b.h2)()]}updateEffects(){var U;null===(U=this._effects[0])||void 0===U||U.update([this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors])}updateValidationMessageVisibility(){this.setState(U=>({isValidationMessageVisible:this.shouldShowValidationMessage}))}onFocusIn(U){const{onFocusIn:B}=this.props;B?.(U)}get cssClasses(){return`${(k=>{const{classes:U,isValid:B,readOnly:K}=k,J={"dx-state-readonly":!!K,"dx-invalid":!B,[String(U)]:!!U};return(0,y.g)(J)})((0,o.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}))}`}get shouldShowValidationMessage(){const{isValid:U,validationStatus:B}=this.props;return!(U&&"invalid"!==B)&&(this.validationErrors??[]).length>0}get aria(){const{isValid:U,readOnly:B}=this.props,K={readonly:B?"true":"false",invalid:U?"false":"true"};return this.shouldShowValidationMessage&&(K.describedBy=this.state.validationMessageGuid),(0,o.A)({},K,this.props.aria)}get validationErrors(){return void 0!==this.__getterCache.validationErrors?this.__getterCache.validationErrors:this.__getterCache.validationErrors=(()=>{const{validationError:U,validationErrors:B}=this.props;let K=B&&[...B];return!K&&U&&(K=[(0,o.A)({},U)]),K})()}get validationMessageTarget(){var U;return null===(U=this.rootElementRef)||void 0===U?void 0:U.current}get restAttributes(){const U=(0,o.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value});return(0,W.A)(U,_)}focus(){this.widgetRef.current.focus()}blur(){this.widgetRef.current.blur()}componentWillUpdate(U,B,K){super.componentWillUpdate(),(this.props.validationError!==U.validationError||this.props.validationErrors!==U.validationErrors)&&(this.__getterCache.validationErrors=void 0)}render(){return(k=>{const{aria:U,cssClasses:B,isValidationMessageVisible:K,onFocusIn:J,props:{accessKey:ie,activeStateEnabled:re,children:q,className:Y,disabled:Z,focusStateEnabled:Q,height:te,hint:pe,hoverStateEnabled:z,onClick:oe,onKeyDown:ae,rtlEnabled:ee,tabIndex:he,validationMessageMode:de,validationMessagePosition:ue,visible:be,width:ve},restAttributes:le,rootElementRef:Ce,validationErrors:ye,validationMessageGuid:ge,validationMessageTarget:fe,widgetRef:xe}=k;return(0,P._B)((0,P.sO)(2,S.x0,(0,o.A)({rootElementRef:Ce,aria:U,classes:B,activeStateEnabled:re,focusStateEnabled:Q,hoverStateEnabled:z,accessKey:ie,className:Y,rtlEnabled:ee,hint:pe,disabled:Z,height:te,width:ve,onFocusIn:J,onClick:oe,onKeyDown:ae,tabIndex:he,visible:be},le,{children:(0,P.nl)([q,K&&(0,P.sO)(2,h,{validationErrors:ye,mode:de,positionSide:ue,rtlEnabled:ee,target:fe,boundary:fe,visualContainer:fe,contentId:ge})],0)}),null,xe))})({props:(0,o.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}),validationMessageGuid:this.state.validationMessageGuid,isValidationMessageVisible:this.state.isValidationMessageVisible,rootElementRef:this.rootElementRef,widgetRef:this.widgetRef,onFocusIn:this.onFocusIn,cssClasses:this.cssClasses,shouldShowValidationMessage:this.shouldShowValidationMessage,aria:this.aria,validationErrors:this.validationErrors,validationMessageTarget:this.validationMessageTarget,restAttributes:this.restAttributes})}}I.defaultProps=C},8813:(In,Ze,M)=>{"use strict";M.d(Ze,{JU:()=>S,fK:()=>P,ig:()=>b,lm:()=>o});const o="vertical",P="horizontal",b="both",S="dx-scrollable-content"},7508:(In,Ze,M)=>{"use strict";function W(o,P){const b={left:0,top:0};let f=P;for(;null!==(S=f)&&void 0!==S&&S.offsetParent&&!f.classList.contains(o);){var S;const T=f.offsetParent,y=f.getBoundingClientRect(),d=T.getBoundingClientRect();b.left+=y.left-d.left,b.top+=y.top-d.top,f=f.offsetParent}return b}M.d(Ze,{Y:()=>W})},662:(In,Ze,M)=>{"use strict";M.d(Ze,{D:()=>o});var W=M(8813);class o{constructor(b){this.DIRECTION_HORIZONTAL="horizontal",this.DIRECTION_VERTICAL="vertical",this.DIRECTION_BOTH="both",this.direction=b??W.lm}get isHorizontal(){return this.direction===W.fK||this.direction===W.ig}get isVertical(){return this.direction===W.lm||this.direction===W.ig}get isBoth(){return this.direction===W.ig}}},6628:(In,Ze,M)=>{"use strict";function W(o){return Object.keys(o).filter(P=>o[P]).join(" ")}M.d(Ze,{g:()=>W})},2047:(In,Ze,M)=>{"use strict";M.d(Ze,{Ao:()=>T,Jj:()=>G,Lh:()=>L,lT:()=>k,mg:()=>N,oo:()=>U,wD:()=>I});var W=M(4072),o=M(778),P=M(9293),b=M(7940),f=M(9209);function S(B){return(K,J,ie,re)=>{const q=re?(0,P.b4)(B,re):B;if(J)return W.A.on(K,q,ie,J),()=>{W.A.off(K,q,J)}}}const T=S(o.U),I=(S(b.A.scroll),S(b.A.init),S(b.A.start),S(b.A.move),S(b.A.end),S(b.A.stop),S(b.A.cancel),S(f.A.down),S(f.A.up),S(f.A.move),S("mouseenter"),S("mouseleave"),S("keydown"),S("dxactive")),L=S("dxinactive"),N=S("dxhoverstart"),G=S("dxhoverend"),k=S("focusin"),U=S("focusout")},6847:(In,Ze,M)=>{"use strict";function W(o){return o?Number(o.replace("px","")):0}M.d(Ze,{R:()=>W})},6362:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>k});var W=M(1973),o=M(5704),P=M(5944),b=M(4859),f=M(6021),S=M(3090),T=M(6110),y=M(8360),d=M(9012),c=M(4481),s=M(3608),a=M(8628);const u=(0,T.zk)(),N=c.A.inherit({_getDefaultOptions(){return(0,S.X)(this.callBase(),{usePopover:!1,target:null,title:"",showTitle:!0,showCancelButton:!0,cancelText:y.A.format("Cancel"),onCancelClick:null,visible:!1,noDataText:"",focusStateEnabled:!1,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios",tablet:!0},options:{usePopover:!0}}])},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new P.U((U,B)=>{const K=new d.A((0,o.A)("<div>"),(0,S.X)({onClick:B&&B.click,stylingMode:B&&B.stylingMode||"outlined"},B));U.append(K.$element())},["disabled","icon","text","type","onClick","click","stylingMode"],this.option("integrationOptions.watchMethod"))})},_itemContainer(){return this._$itemContainer},_itemClass:()=>"dx-actionsheet-item",_itemDataKey:()=>"dxActionSheetItemData",_toggleVisibility:b.lQ,_renderDimensions:b.lQ,_initMarkup(){this.callBase(),this.$element().addClass("dx-actionsheet"),this._createItemContainer()},_render(){this._renderPopup()},_createItemContainer(){this._$itemContainer=(0,o.A)("<div>").addClass("dx-actionsheet-container"),this._renderDisabled()},_renderDisabled(){this._$itemContainer.toggleClass("dx-state-disabled",this.option("disabled"))},_renderPopup(){this._$popup=(0,o.A)("<div>").appendTo(this.$element()),this._isPopoverMode()?this._createPopover():this._createPopup(),this._renderPopupTitle(),this._mapPopupOption("visible")},_mapPopupOption(U){this._popup&&this._popup.option(U,this.option(U))},_isPopoverMode(){return this.option("usePopover")&&this.option("target")},_renderPopupTitle(){this._mapPopupOption("showTitle"),this._popup&&this._popup.$wrapper().toggleClass("dx-actionsheet-without-title",!this.option("showTitle"))},_clean(){this._$popup&&this._$popup.remove(),this.callBase()},_overlayConfig(){return{onInitialized:function(U){this._popup=U.component}.bind(this),disabled:!1,showTitle:!0,title:this.option("title"),deferRendering:!0,onContentReady:this._popupContentReadyAction.bind(this),onHidden:this.hide.bind(this)}},_createPopover(){this._createComponent(this._$popup,s.A,(0,S.X)(this._overlayConfig(),{width:this.option("width")||200,height:this.option("height")||"auto",target:this.option("target")})),this._popup.$overlayContent().attr("role","dialog"),this._popup.$wrapper().addClass("dx-actionsheet-popover-wrapper")},_createPopup(){this._createComponent(this._$popup,a.A,(0,S.X)(this._overlayConfig(),{dragEnabled:!1,width:this.option("width")||"100%",height:this.option("height")||"auto",showCloseButton:!1,position:{my:"bottom",at:"bottom",of:u},animation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom",of:u}},to:{position:{my:"bottom",at:"bottom",of:u}}},hide:{type:"slide",duration:400,from:{position:{my:"bottom",at:"bottom",of:u}},to:{position:{my:"top",at:"bottom",of:u}}}}})),this._popup.$wrapper().addClass("dx-actionsheet-popup-wrapper")},_popupContentReadyAction(){this._popup.$content().append(this._$itemContainer),this._attachClickEvent(),this._attachHoldEvent(),this._prepareContent(),this._renderContent(),this._renderCancelButton()},_renderCancelButton(){if(!this._isPopoverMode()&&(this._$cancelButton&&this._$cancelButton.remove(),this.option("showCancelButton"))){const U=this._createActionByOption("onCancelClick")||b.lQ,B=this;this._$cancelButton=(0,o.A)("<div>").addClass("dx-actionsheet-cancel").appendTo(this._popup&&this._popup.$content()),this._createComponent(this._$cancelButton,d.A,{disabled:!1,stylingMode:"outlined",text:this.option("cancelText"),onClick(K){const J={event:K,cancel:!1};U(J),J.cancel||B.hide()},integrationOptions:{}})}},_attachItemClickEvent:b.lQ,_itemClickHandler(U){this.callBase(U),(0,o.A)(U.target).is(".dx-state-disabled, .dx-state-disabled *")||this.hide()},_itemHoldHandler(U){this.callBase(U),(0,o.A)(U.target).is(".dx-state-disabled, .dx-state-disabled *")||this.hide()},_optionChanged(U){switch(U.name){case"width":case"height":case"visible":case"title":this._mapPopupOption(U.name);break;case"disabled":this._renderDisabled();break;case"showTitle":this._renderPopupTitle();break;case"showCancelButton":case"onCancelClick":case"cancelText":this._renderCancelButton();break;case"target":case"usePopover":case"items":this._invalidate();break;default:this.callBase(U)}},toggle(U){const B=this,K=(0,f.cY)();return B._popup.toggle(U).done(()=>{B.option("visible",U),K.resolveWith(B)}),K.promise()},show(){return this.toggle(!0)},hide(){return this.toggle(!1)}});(0,W.A)("dxActionSheet",N);const k=N},625:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>U});var W=M(1973),o=M(5704),P=M(3090),b=M(6946),f=M(2660),S=M(8649),T=M(1830),y=M(6110),d=M(4481),c=M(5107);const _={row:"minWidth",col:"minHeight"},x={row:"maxWidth",col:"maxHeight"},w={start:"flex-start",end:"flex-end",center:"center","space-between":"space-between","space-around":"space-around"},D={start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"},C={row:"row",col:"column"},I=(B,K,J)=>{if(J=(0,S.CC)(K,J),B.style[(0,S.jA)(K)]=J,!(0,y.Vd)()){if(""===J||!(0,T.O9)(J))return;const re=`${(0,b._k)(K)}: ${J};`;(0,S.eC)(B,re,!1)}};class L extends c.A{_renderVisible(K,J){super._renderVisible(K),(0,T.O9)(J)&&this._options.fireItemStateChangedAction({name:"visible",state:K,oldState:J})}}class N{constructor(K,J){this._$element=K,this._option=J}renderBox(){this._$element.css({display:`${(0,S.Rb)("flexDirection")}flex`}),I(this._$element.get(0),"flexDirection",C[this._option("direction")])}renderAlign(){this._$element.css({justifyContent:this._normalizedAlign()})}_normalizedAlign(){const K=this._option("align");return K in w?w[K]:K}renderCrossAlign(){this._$element.css({alignItems:this._normalizedCrossAlign()})}_normalizedCrossAlign(){const K=this._option("crossAlign");return K in D?D[K]:K}renderItems(K){const J=(0,S.Rb)("flexDirection"),ie=this._option("direction");(0,f.__)(K,function(){const re=(0,o.A)(this),q=re.data("dxBoxItemData");re.css({display:`${J}flex`}).css(x[ie],q.maxSize||"none").css(_[ie],q.minSize||"0"),I(re.get(0),"flexBasis",q.baseSize||0),I(re.get(0),"flexGrow",q.ratio),I(re.get(0),"flexShrink",(0,T.O9)(q.shrink)?q.shrink:1),re.children().each((Y,Z)=>{(0,o.A)(Z).css({width:"auto",height:"auto",display:`${(0,S.Rb)("flexDirection")}flex`,flexBasis:0}),I(Z,"flexGrow",1),I(Z,"flexDirection",(0,o.A)(Z)[0].style.flexDirection||"column")})})}}let G=(()=>{class B extends d.A{_getDefaultOptions(){return(0,P.X)(super._getDefaultOptions(),{direction:"row",align:"start",crossAlign:"stretch",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,_queue:void 0})}_itemClass(){return"dx-box-item"}_itemDataKey(){return"dxBoxItemData"}_itemElements(){return this._itemContainer().children(this._itemSelector())}_init(){super._init(),this.$element().addClass("dx-box-flex"),this._initLayout(),this._initBoxQueue()}_initLayout(){this._layout=new N(this.$element(),this.option.bind(this))}_initBoxQueue(){this._queue=this.option("_queue")||[]}_queueIsNotEmpty(){return!this.option("_queue")&&!!this._queue.length}_pushItemToQueue(J,ie){this._queue.push({$item:J,config:ie})}_shiftItemFromQueue(){return this._queue.shift()}_initMarkup(){this.$element().addClass("dx-box"),this._layout.renderBox(),super._initMarkup(),this._renderAlign(),this._renderActions()}_renderActions(){this._onItemStateChanged=this._createActionByOption("onItemStateChanged")}_renderAlign(){this._layout.renderAlign(),this._layout.renderCrossAlign()}_renderItems(J){for(super._renderItems(J);this._queueIsNotEmpty();){const ie=this._shiftItemFromQueue();this._createComponent(ie.$item,B,(0,P.X)({itemTemplate:this.option("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this.option("onItemHold"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),_queue:this._queue},ie.config))}this._layout.renderItems(this._itemElements())}_renderItemContent(J){const ie=J.itemData&&J.itemData.node;return ie?this._renderItemContentByNode(J,ie):super._renderItemContent(J)}_postprocessRenderItem(J){const ie=J.itemData.box;ie&&this._pushItemToQueue(J.itemContent,ie)}_createItemByTemplate(J,ie){return ie.itemData.box?J.source?J.source():(0,o.A)():super._createItemByTemplate(J,ie)}_itemOptionChanged(J,ie,re,q){"visible"===ie&&this._onItemStateChanged({name:ie,state:re,oldState:!1!==q}),super._itemOptionChanged(J,ie,re)}_optionChanged(J){switch(J.name){case"_queue":case"direction":this._invalidate();break;case"align":this._layout.renderAlign();break;case"crossAlign":this._layout.renderCrossAlign();break;default:super._optionChanged(J)}}_itemOptions(){const J=super._itemOptions();return J.fireItemStateChangedAction=ie=>{this._onItemStateChanged(ie)},J}}return B.ItemClass=L,B})();(0,W.A)("dxBox",G);const U=G},9012:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ae});var W=M(1973),o=M(5737),P=M(3777),b=M(4505),f=M(8535);class S extends b.A{get _validationGroupConfig(){return P.A.getGroupConfig(this._findGroup())}getDefaultTemplateNames(){return["content"]}getSupportedKeyNames(){return["space","enter"]}getProps(){const he=super.getProps();return he.onClick=ue=>{let{event:be}=ue;this._clickAction({event:be,validationGroup:this._validationGroupConfig})},"svg"===(0,f.F)(he.icon)&&(he.iconTemplate=this._createTemplateComponent(()=>he.icon)),he}get _templatesInfo(){return{template:"content"}}_toggleActiveState(he,de){const ue=this.viewRef;de?ue.activate():ue.deactivate()}_getSubmitAction(){let he=!0,de="valid";return this._createAction(ue=>{let{event:be,submitInput:ve}=ue;if(he){const le=this._validationGroupConfig;if(void 0!==le&&""!==le){const Ce=le.validate();de=Ce.status,"pending"===Ce.status&&(he=!1,this.option("disabled",!0),Ce.complete.then(ye=>{let{status:ge}=ye;this.option("disabled",!1),de=ge,"valid"===de&&ve.click(),he=!0}))}}"valid"!==de&&be.preventDefault(),be.stopPropagation()})}_initializeComponent(){super._initializeComponent(),this._addAction("onSubmit",this._getSubmitAction()),this._clickAction=this._createClickAction()}_initMarkup(){super._initMarkup();const he=this.$element().find(".dx-button-content").first(),de=he.children().filter(".dx-template-wrapper"),ue=he.children().filter(".dx-button-submit-input");de.length&&(de.addClass("dx-button-content"),de.append(ue),he.replaceWith(de))}_patchOptionValues(he){return super._patchOptionValues((0,o.A)({},he,{templateData:he._templateData}))}_findGroup(){const he=this.$element(),de=this.option("validationGroup");return void 0!==de&&""!==de?de:P.A.findGroup(he,this._modelByElement(he))}_createClickAction(){return this._createActionByOption("onClick",{excludeValidators:["readOnly"]})}_optionChanged(he){"onClick"===he.name&&(this._clickAction=this._createClickAction()),super._optionChanged(he)}}var T=M(9144),y=M(5328),d=M(5652),c=M(5170),s=M(5973),a=M(9212),u=M(1294),h=M(6628),g=M(6946);const _=["iconTemplate","position","source"],w={position:"left",source:""},D=ee=>ee&&(ee.defaultProps?he=>(0,y._B)((0,y.sO)(2,ee,(0,o.A)({},he))):ee);let C=(()=>{class ee extends d.eh{constructor(de){super(de),this.state={}}get sourceType(){return(0,f.F)(this.props.source)}get cssClass(){return"left"!==this.props.position?"dx-icon-right":""}get iconClassName(){const de={"dx-icon":!0,[this.cssClass]:!!this.cssClass},{source:ue}=this.props;return"dxIcon"===this.sourceType?(0,h.g)((0,o.A)({},de,{[`dx-icon-${ue}`]:!0})):"fontIcon"===this.sourceType?(0,h.g)((0,o.A)({},de,{[String(ue)]:!!ue})):"image"===this.sourceType?(0,h.g)(de):"svg"===this.sourceType?(0,h.g)((0,o.A)({},de,{"dx-svg-icon":!0})):""}get restAttributes(){return(0,T.A)(this.props,_)}render(){const de=this.props;return(ee=>{let{iconClassName:he,props:{iconTemplate:de,source:ue},sourceType:be}=ee;return(0,y.nl)(["dxIcon"===be&&(0,y.bF)(1,"i",he),"fontIcon"===be&&(0,y.bF)(1,"i",he),"image"===be&&(0,y.bF)(1,"img",he,null,1,{alt:"",src:ue}),de&&(0,y.bF)(1,"i",he,de({}),0)],0)})({props:(0,o.A)({},de,{iconTemplate:D(de.iconTemplate)}),sourceType:this.sourceType,cssClass:this.cssClass,iconClassName:this.iconClassName,restAttributes:this.restAttributes})}}return ee.defaultProps=w,ee})();var I=M(9524);const L=["config"],G={config:Object.freeze({})};let k=(()=>{class ee extends d.eh{constructor(de){super(de),this.state={},this.__getterCache={},this.hideWave=this.hideWave.bind(this),this.showWave=this.showWave.bind(this)}get getConfig(){return void 0!==this.__getterCache.getConfig?this.__getterCache.getConfig:this.__getterCache.getConfig=(()=>{const{config:de}=this.props;return(0,I.pw)(de)})()}get restAttributes(){return(0,T.A)(this.props,L)}hideWave(de){(0,I.SK)(this.getConfig,de)}showWave(de){(0,I.vF)(this.getConfig,de)}componentWillUpdate(de,ue,be){this.props.config!==de.config&&(this.__getterCache.getConfig=void 0)}render(){return(ee=>(0,y._B)((0,y.bF)(1,"div","dx-inkripple",null,1,(0,o.A)({},ee.restAttributes))))({props:(0,o.A)({},this.props),getConfig:this.getConfig,restAttributes:this.restAttributes})}}return ee.defaultProps=G,ee})();var U=M(2673),B=M(9641),K=M(8360);const J=["accessKey","activeStateEnabled","children","className","disabled","focusStateEnabled","height","hint","hoverStateEnabled","icon","iconPosition","iconTemplate","onClick","onKeyDown","onSubmit","pressed","rtlEnabled","stylingMode","tabIndex","template","templateData","text","type","useInkRipple","useSubmitBehavior","visible","width"],ie=["outlined","text","contained"],Y=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(B.s),Object.getOwnPropertyDescriptors({activeStateEnabled:!0,hoverStateEnabled:!0,icon:"",iconPosition:"left",stylingMode:"contained",text:"",type:"normal",useInkRipple:!1,useSubmitBehavior:!1,templateData:Object.freeze({})}))),Z=(0,c.gO)([{device:()=>"desktop"===s.A.real().deviceType&&!s.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,a.gx)((0,a.ss)()),options:{useInkRipple:!0}}]),Q=ee=>ee&&(ee.defaultProps?he=>(0,y._B)((0,y.sO)(2,ee,(0,o.A)({},he))):ee);class te extends d.oe{constructor(he){super(he),this.state={},this.contentRef=(0,y._3)(),this.inkRippleRef=(0,y._3)(),this.submitInputRef=(0,y._3)(),this.widgetRef=(0,y._3)(),this.__getterCache={},this.focus=this.focus.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.submitEffect=this.submitEffect.bind(this),this.onActive=this.onActive.bind(this),this.onInactive=this.onInactive.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this),this.emitClickEvent=this.emitClickEvent.bind(this)}createEffects(){return[new d.Lt(this.submitEffect,[this.props.onSubmit,this.props.useSubmitBehavior]),(0,d.h2)()]}updateEffects(){var he;null===(he=this._effects[0])||void 0===he||he.update([this.props.onSubmit,this.props.useSubmitBehavior])}submitEffect(){const{onSubmit:he,useSubmitBehavior:de}=this.props;if(de&&he)return u.jM.on(this.submitInputRef.current,ue=>he({event:ue,submitInput:this.submitInputRef.current}),{namespace:"UIFeedback"}),()=>u.jM.off(this.submitInputRef.current,{namespace:"UIFeedback"})}onActive(he){const{useInkRipple:de}=this.props;de&&this.inkRippleRef.current.showWave({element:this.contentRef.current,event:he})}onInactive(he){const{useInkRipple:de}=this.props;de&&this.inkRippleRef.current.hideWave({element:this.contentRef.current,event:he})}onWidgetClick(he){const{onClick:de,useSubmitBehavior:ue}=this.props;de?.({event:he}),ue&&this.submitInputRef.current.click()}keyDown(he){const{onKeyDown:de}=this.props,{keyName:ue,originalEvent:be,which:ve}=he,le=de?.(he);if(null!=le&&le.cancel)return le;("space"===ue||"space"===ve||"enter"===ue||"enter"===ve)&&(be.preventDefault(),this.emitClickEvent())}emitClickEvent(){this.contentRef.current.click()}get aria(){const{icon:he,text:de}=this.props;let ue=de??"";if(!de&&he)switch((0,f.F)(he)){case"image":{const le=/^(?!(?:https?:\/\/)|(?:ftp:\/\/)|(?:www\.))[^\s]+$/;ue=!he.includes("base64")&&le.test(he)?he.replace(/.+\/([^.]+)\..+$/,"$1"):"";break}case"dxIcon":ue=K.A.format((0,g.PT)(he,!0))||he;break;case"fontIcon":ue=he;break;case"svg":var be;ue=(null===(be=/<title>(.*?)<\/title>/.exec(he))||void 0===be?void 0:be[1])??""}return(0,o.A)({role:"button"},ue?{label:ue}:{})}get cssClasses(){return(ee=>{const{icon:he,iconPosition:de,stylingMode:ue,text:be,type:ve}=ee,Ce={"dx-button":!0,[`dx-button-mode-${ue&&ie.includes(ue)?ue:"contained"}`]:!0,[`dx-button-${ve??"normal"}`]:!0,"dx-button-has-text":!!be,"dx-button-has-icon":!!he,"dx-button-icon-right":"left"!==de};return(0,h.g)(Ce)})(this.props)}get iconSource(){const{icon:he}=this.props;return he??""}get inkRippleConfig(){return void 0!==this.__getterCache.inkRippleConfig?this.__getterCache.inkRippleConfig:this.__getterCache.inkRippleConfig=(()=>{const{icon:he,text:de}=this.props;return!de&&he?{isCentered:!0,useHoldAnimation:!1,waveSizeCoefficient:1}:{}})()}get buttonTemplateData(){const{icon:he,templateData:de,text:ue}=this.props;return(0,o.A)({icon:he,text:ue},de)}get restAttributes(){return(0,T.A)(this.props,J)}focus(){this.widgetRef.current.focus()}activate(){this.widgetRef.current.activate()}deactivate(){this.widgetRef.current.deactivate()}componentWillUpdate(he,de,ue){super.componentWillUpdate(),(this.props.icon!==he.icon||this.props.text!==he.text)&&(this.__getterCache.inkRippleConfig=void 0)}render(){const he=this.props;return(ee=>{const{children:he,iconPosition:de,iconTemplate:ue,template:be,text:ve}=ee.props,le=!ee.props.template&&!he&&""!==ve,Ce="left"===de,ye=!ee.props.template&&!he&&(ee.iconSource||ee.props.iconTemplate)&&(0,y.sO)(2,C,{source:ee.iconSource,position:de,iconTemplate:ue});return(0,y._B)((0,y.sO)(2,U.x0,(0,o.A)({accessKey:ee.props.accessKey,activeStateEnabled:ee.props.activeStateEnabled,aria:ee.aria,className:ee.props.className,classes:ee.cssClasses,disabled:ee.props.disabled,focusStateEnabled:ee.props.focusStateEnabled,height:ee.props.height,hint:ee.props.hint,hoverStateEnabled:ee.props.hoverStateEnabled,onActive:ee.onActive,onClick:ee.onWidgetClick,onInactive:ee.onInactive,onKeyDown:ee.keyDown,rtlEnabled:ee.props.rtlEnabled,tabIndex:ee.props.tabIndex,visible:ee.props.visible,width:ee.props.width},ee.restAttributes,{children:(0,y.bF)(1,"div","dx-button-content",[ee.props.template&&be({data:ee.buttonTemplateData}),!ee.props.template&&he,Ce&&ye,le&&(0,y.bF)(1,"span","dx-button-text",ve,0),!Ce&&ye,ee.props.useSubmitBehavior&&(0,y.bF)(64,"input","dx-button-submit-input",null,1,{type:"submit",tabIndex:-1},null,ee.submitInputRef),ee.props.useInkRipple&&(0,y.sO)(2,k,{config:ee.inkRippleConfig},null,ee.inkRippleRef)],0,null,null,ee.contentRef)}),null,ee.widgetRef))})({props:(0,o.A)({},he,{template:Q(he.template),iconTemplate:Q(he.iconTemplate)}),contentRef:this.contentRef,submitInputRef:this.submitInputRef,inkRippleRef:this.inkRippleRef,widgetRef:this.widgetRef,onActive:this.onActive,onInactive:this.onInactive,onWidgetClick:this.onWidgetClick,keyDown:this.keyDown,emitClickEvent:this.emitClickEvent,aria:this.aria,cssClasses:this.cssClasses,iconSource:this.iconSource,inkRippleConfig:this.inkRippleConfig,buttonTemplateData:this.buttonTemplateData,restAttributes:this.restAttributes})}}te.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(Y),Object.getOwnPropertyDescriptors((0,o.A)({},(0,c.a6)(Z)))));const pe=[];class oe extends S{getProps(){const he=super.getProps();return he.onKeyDown=this._wrapKeyDownHandler(he.onKeyDown),he}focus(){var he;return null===(he=this.viewRef)||void 0===he?void 0:he.focus(...arguments)}activate(){var he;return null===(he=this.viewRef)||void 0===he?void 0:he.activate(...arguments)}deactivate(){var he;return null===(he=this.viewRef)||void 0===he?void 0:he.deactivate(...arguments)}_getActionConfigs(){return{onClick:{excludeValidators:["readOnly"]},onSubmit:{}}}get _propsInfo(){return{twoWay:[],allowNull:[],elements:["onSubmit"],templates:["template","iconTemplate"],props:["activeStateEnabled","hoverStateEnabled","icon","iconPosition","onClick","onSubmit","pressed","stylingMode","template","iconTemplate","text","type","useInkRipple","useSubmitBehavior","templateData","className","accessKey","disabled","focusStateEnabled","height","hint","onKeyDown","rtlEnabled","tabIndex","visible","width"]}}get _viewComponent(){return te}}(0,W.A)("dxButton",oe),oe.defaultOptions=function z(ee){pe.push(ee),te.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(te.defaultProps),Object.getOwnPropertyDescriptors((0,c.a6)(Z)),Object.getOwnPropertyDescriptors((0,c.a6)(pe))))};const ae=oe},4308:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>C});var W=M(1973),o=M(5704),P=M(5944),b=M(3090),f=M(1830),S=M(9012),T=M(4481),y=M(7080);const h="dx-buttongroup-item-has-width",_={contained:"dx-buttongroup-mode-contained",outlined:"dx-buttongroup-mode-outlined",text:"dx-buttongroup-mode-text"},x=T.A.inherit({_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new P.U((I,L,N)=>{this._prepareItemStyles(I);const G=this.option("buttonTemplate");this._createComponent(I,S.A,(0,b.X)({},N,L,this._getBasicButtonOptions(),{_templateData:this._hasCustomTemplate(G)?N:{},template:N.template||G}))},["text","type","icon","disabled","visible","hint"],this.option("integrationOptions.watchMethod"))})},_getBasicButtonOptions(){return{focusStateEnabled:!1,onClick:null,hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode")}},_getDefaultOptions(){return(0,b.X)(this.callBase(),{itemTemplateProperty:null})},_hasCustomTemplate(I){return(0,f.Tn)(I)||this.option("integrationOptions.templates")[I]},_selectedItemClass:()=>"dx-item-selected dx-state-selected",_prepareItemStyles(I){const L=I.data("dxItemIndex");0===L&&I.addClass("dx-buttongroup-first-item");const N=this.option("items");N&&L===N.length-1&&I.addClass("dx-buttongroup-last-item"),I.addClass("dx-shape-standard")},_renderItemContent(I){return I.container=(0,o.A)(I.container).parent(),this.callBase(I)},_setAriaSelectionAttribute(I,L){this.setAria("pressed",L,I)},_renderItemContentByNode(I,L){return I.container=(0,o.A)(I.container.children().first()),this.callBase(I,L)},_focusTarget(){return this.$element().parent()},_keyboardEventBindingTarget(){return this._focusTarget()},_refreshContent(){this._prepareContent(),this._renderContent()},_itemClass:()=>"dx-buttongroup-item",_itemSelectHandler(I){"single"===this.option("selectionMode")&&this.isItemSelected(I.currentTarget)||this.callBase(I)}}),w=y.A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{hoverStateEnabled:!0,focusStateEnabled:!0,selectionMode:"single",selectedItems:[],selectedItemKeys:[],stylingMode:"contained",keyExpr:"text",items:[],buttonTemplate:"content",onSelectionChanged:null,onItemClick:null})},_init(){this.callBase(),this._createItemClickAction()},_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_initMarkup(){this.setAria("role","group"),this.$element().addClass("dx-buttongroup"),this._renderStylingMode(),this._renderButtons(),this._syncSelectionOptions(),this.callBase()},_renderStylingMode(){const{stylingMode:I}=this.option();for(const L in _)this.$element().removeClass(_[L]);this.$element().addClass(_[I]??_.contained)},_fireSelectionChangeEvent(I,L){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:I,removedItems:L})},_renderButtons(){const I=(0,o.A)("<div>").addClass("dx-buttongroup-wrapper").appendTo(this.$element()),L=this.option("selectedItems"),N={selectionMode:this.option("selectionMode"),items:this.option("items"),keyExpr:this.option("keyExpr"),buttonTemplate:this.option("buttonTemplate"),scrollingEnabled:!1,selectedItemKeys:this.option("selectedItemKeys"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode"),accessKey:this.option("accessKey"),tabIndex:this.option("tabIndex"),noDataText:"",selectionRequired:!1,onItemRendered:G=>{const k=this.option("width");(0,f.O9)(k)&&(0,o.A)(G.itemElement).addClass(h)},onSelectionChanged:G=>{this._syncSelectionOptions(),this._fireSelectionChangeEvent(G.addedItems,G.removedItems)},onItemClick:G=>{this._itemClickAction(G)}};(0,f.O9)(L)&&L.length&&(N.selectedItems=L),this._buttonsCollection=this._createComponent(I,x,N)},_syncSelectionOptions(){this._setOptionWithoutOptionChange("selectedItems",this._buttonsCollection.option("selectedItems")),this._setOptionWithoutOptionChange("selectedItemKeys",this._buttonsCollection.option("selectedItemKeys"))},_optionChanged(I){switch(I.name){case"stylingMode":case"selectionMode":case"keyExpr":case"buttonTemplate":case"items":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":case"tabIndex":this._invalidate();break;case"selectedItemKeys":case"selectedItems":this._buttonsCollection.option(I.name,I.value);break;case"onItemClick":this._createItemClickAction();break;case"onSelectionChanged":break;case"width":this.callBase(I),this._buttonsCollection.itemElements().toggleClass(h,!!I.value);break;default:this.callBase(I)}}});(0,W.A)("dxButtonGroup",w);const C=w},3086:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>vr});var W=M(5737),o=M(2583),P=M(4504),b=M(1973),f=M(5973),S=M(2925),T=M(5704),y=M(5645),d=M(4859),c=M(676),s=M(4761),a=M(3090),u=M(3012),h=M(1363),g=M(1830),_=M(6110),x=M(4072),w=M(6790),D=M(1134),C=M(9293),I=M(9061),L=M(8360),N=M(9012),G=M(6620),k=M(9212);const B=class U{constructor(en){this.calendar=en}dateOption(en){return this.calendar._dateOption(en)}dateValue(en,Zn){this.calendar._dateValue(en,Zn)}skipNavigate(){this.calendar._skipNavigate=!0}updateAriaSelected(en,Zn){this.calendar._updateAriaSelected(en,Zn),en[0]&&this.calendar.option("currentDate").getTime()===en[0].getTime()&&this.calendar._updateAriaId(en[0])}processValueChanged(en,Zn){var Di,po;(0,g.O9)(en)&&!Array.isArray(en)&&(en=[en]),(0,g.O9)(Zn)&&!Array.isArray(Zn)&&(Zn=[Zn]),en=(null===(Di=en)||void 0===Di?void 0:Di.map(nr=>this._convertToDate(nr)))||[],Zn=(null===(po=Zn)||void 0===po?void 0:po.map(nr=>this._convertToDate(nr)))||[],this._updateViewsValue(en),this.updateAriaSelected(en,Zn),this._currentDateChanged||this.calendar._initCurrentDate(),this._currentDateChanged=!1}_isDateDisabled(en){const Zn=this.calendar._dateOption("min"),Di=this.calendar._dateOption("max"),po=(0,g.O9)(Zn)&&en<Zn&&!c.A.sameDate(Zn,en),nr=(0,g.O9)(Di)&&en>Di&&!c.A.sameDate(Di,en);return this.calendar._view.isDateDisabled(en)||po||nr}_getLowestDateInArray(en){if(en.length)return new Date(Math.min(...en))}_convertToDate(en){return this.calendar._convertToDate(en)}_isMaxZoomLevel(){return this.calendar._isMaxZoomLevel()}_updateViewsOption(en,Zn){this.calendar._updateViewsOption(en,Zn)}_updateViewsValue(en){this._updateViewsOption("value",en)}_updateCurrentDate(en){this.calendar.option("currentDate",en??new Date)}_shouldHandleWeekNumberClick(){const{selectionMode:en,selectWeekOnClick:Zn}=this.calendar.option();return Zn&&"single"!==en}};var ie=M(1609);const ae=class oe extends ie.A{_getDefaultOptions(){return(0,W.A)({},super._getDefaultOptions(),{onClick:void 0,onCaptionClick:void 0,type:"normal",stylingMode:"outlined",text:""})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,k.gx)(),options:{type:"default",stylingMode:"text"}},{device:()=>(0,k.Ft)(),options:{type:"normal",stylingMode:"text"}}])}_init(){super._init(),this._initActions()}_initActions(){this._clickAction=this._createActionByOption("onClick"),this._captionClickAction=this._createActionByOption("onCaptionClick")}_initMarkup(){super._initMarkup(),(0,T.A)(this.element()).addClass("dx-calendar-navigator"),this._renderButtons(),this._renderCaption()}_renderButtons(){const{rtlEnabled:en,type:Zn,stylingMode:Di,focusStateEnabled:po}=this.option();this._prevButton=this._createComponent((0,T.A)("<div>"),N.A,{focusStateEnabled:po,icon:en?"chevronright":"chevronleft",onClick:ui=>{this._clickAction({direction:-1,event:ui})},type:Zn,stylingMode:Di,integrationOptions:{}});const nr=(0,T.A)(this._prevButton.element()).addClass("dx-calendar-navigator-previous-view").addClass("dx-calendar-navigator-previous-month");this._nextButton=this._createComponent((0,T.A)("<div>"),N.A,{focusStateEnabled:po,icon:en?"chevronleft":"chevronright",onClick:ui=>{this._clickAction({direction:1,event:ui})},type:Zn,stylingMode:Di,integrationOptions:{}});const Xo=(0,T.A)(this._nextButton.element()).addClass("dx-calendar-navigator-next-view").addClass("dx-calendar-navigator-next-month");this._caption=this._createComponent((0,T.A)("<div>").addClass("dx-calendar-caption-button"),N.A,{focusStateEnabled:po,onClick:ui=>{this._captionClickAction({event:ui})},type:Zn,stylingMode:Di,template:(ui,bi)=>{const{text:ao}=this.option();ao.split(" - ").forEach(Ko=>{(0,T.A)(bi).append((0,T.A)("<span>").addClass("dx-button-text").text(Ko))})},integrationOptions:{}});const Hn=this._caption.$element();this.$element().append(nr,Hn,Xo)}_renderCaption(){var en;null===(en=this._caption)||void 0===en||en.option("text",this.option("text"))}toggleButton(en,Zn){const po=this[`_${en}Button`];po&&(po.option("disabled",Zn),po.$element().toggleClass("dx-calendar-disabled-navigator-link",Zn))}_optionChanged(en){"text"===en.name?this._renderCaption():super._optionChanged(en)}};var ve=M(6054),le=M(9522),Ce=M(5397),ye=M(778),ge=M(7080);const{abstract:fe}=ge.A,Xe="td:not(.dx-calendar-week-number-cell)",tt=(0,C.b4)(ye.U,"dxCalendar"),vt=(0,C.b4)(D.n,"dxCalendar"),Tt={month:L.A.format("dxCalendar-currentDay"),year:L.A.format("dxCalendar-currentMonth"),decade:L.A.format("dxCalendar-currentYear"),century:L.A.format("dxCalendar-currentYearRange")},ri=ge.A.inherit({_getViewName:()=>"base",_getDefaultOptions(){return(0,a.X)(this.callBase(),{date:new Date,focusStateEnabled:!1,cellTemplate:null,disabledDates:null,onCellClick:null,onCellHover:null,onWeekNumberClick:null,rowCount:3,colCount:4,allowValueSelection:!0,_todayDate:()=>new Date})},_initMarkup(){this.callBase(),this._renderImpl()},_renderImpl(){this.$element().append(this._createTable()),this._createDisabledDatesHandler(),this._renderBody(),this._renderContouredDate(),this._renderValue(),this._renderRange(),this._renderEvents(),this._updateTableAriaLabel()},_getLocalizedWidgetName:()=>L.A.format("dxCalendar-ariaWidgetName"),_getSingleModeAriaLabel(){const{value:rn}=this.option(),en=this._getLocalizedWidgetName(),Zn=I.A.format(rn,"date");return`${en}. ${L.A.format("dxCalendar-selectedDate",Zn)}`},_getRangeModeAriaLabel(){const{value:rn}=this.option(),en=this._getLocalizedWidgetName(),[Zn,Di]=rn,po=I.A.format(Zn,"date"),nr=I.A.format(Di,"date");return`${en}. ${Zn&&Di?L.A.format("dxCalendar-selectedDateRange",po,nr):L.A.format("dxCalendar-selectedDate",po??nr)}`},_getMultipleModeAriaLabel(){return this._getLocalizedWidgetName()},_getTableAriaLabel(){const{value:rn,selectionMode:en}=this.option();if(!rn||Array.isArray(rn)&&!rn.filter(Boolean).length)return this._getLocalizedWidgetName();switch(en){case"single":return this._getSingleModeAriaLabel();case"range":return this._getRangeModeAriaLabel();case"multiple":return this._getMultipleModeAriaLabel()}},_updateTableAriaLabel(){const rn=this._getTableAriaLabel();this.setAria({label:rn},this._$table)},_createTable(){return this._$table=(0,T.A)("<table>"),this.setAria({role:"grid"},this._$table),this._$table},_renderBody(){this.$body=(0,T.A)("<tbody>").appendTo(this._$table);const rn={cellDate:this._getFirstCellData(),prevCellDate:null};for(let en=0,Zn=this.option("rowCount");en<Zn;en++){rn.row=this._createRow();for(let Di=0,po=this.option("colCount");Di<po;Di++)this._renderCell(rn,Di);this._renderWeekNumberCell(rn)}},_createRow(){const rn=ve.A.createElement("tr");return this.setAria("role","row",(0,T.A)(rn)),this.$body.get(0).appendChild(rn),rn},_createCell(rn,en){const Zn=ve.A.createElement("td"),Di=(0,T.A)(Zn);return Zn.className=this._getClassNameByDate(rn,en),Zn.setAttribute("data-value",s.A.serializeDate(rn,c.A.getShortDateFormat())),(0,Ce.p)(Zn,"dxDateValueKey",rn),this.setAria({role:"gridcell",selected:!1,label:this.getCellAriaLabel(rn)},Di),{cell:Zn,$cell:Di}},_renderCell(rn,en){const{cellDate:Zn,prevCellDate:Di,row:po}=rn;Di&&c.A.fixTimezoneGap(Di,Zn),rn.prevCellDate=Zn;const{cell:nr,$cell:Xo}=this._createCell(Zn,en),Hn=this.option("cellTemplate");(0,T.A)(po).append(nr),Hn?Hn.render(this._prepareCellTemplateData(Zn,en,Xo)):nr.innerHTML=this._getCellText(Zn),rn.cellDate=this._getNextCellData(Zn)},_getClassNameByDate(rn,en){let Zn="dx-calendar-cell";return this._isTodayCell(rn)&&(Zn+=" dx-calendar-today"),(this._isDateOutOfRange(rn)||this.isDateDisabled(rn))&&(Zn+=" dx-calendar-empty-cell"),this._isOtherView(rn)&&(Zn+=" dx-calendar-other-view"),"range"===this.option("selectionMode")&&(0===en&&(Zn+=" dx-calendar-cell-start-in-row"),en===this.option("colCount")-1&&(Zn+=" dx-calendar-cell-end-in-row"),this._isStartDayOfMonth(rn)&&(Zn+=" dx-calendar-cell-start"),this._isEndDayOfMonth(rn)&&(Zn+=" dx-calendar-cell-end")),Zn},_prepareCellTemplateData(rn,en,Zn){const Di=rn instanceof Date;return{model:{text:Di?this._getCellText(rn):rn,date:Di?rn:void 0,view:this._getViewName()},container:(0,le.cc)(Zn),index:en}},_renderEvents(){this._createCellClickAction(),x.A.off(this._$table,tt),x.A.on(this._$table,tt,Xe,en=>{(0,T.A)(en.currentTarget).hasClass("dx-calendar-empty-cell")||this._cellClickAction({event:en,value:(0,T.A)(en.currentTarget).data("dxDateValueKey")})});const{selectionMode:rn}=this.option();x.A.off(this._$table,vt),"range"===rn&&(this._createCellHoverAction(),x.A.on(this._$table,vt,Xe,en=>{(0,T.A)(en.currentTarget).hasClass("dx-calendar-empty-cell")||this._cellHoverAction({event:en,value:(0,T.A)(en.currentTarget).data("dxDateValueKey")})})),"single"!==rn&&(this._createWeekNumberCellClickAction(),x.A.on(this._$table,tt,".dx-calendar-week-number-cell",en=>{const Zn=(0,T.A)(en.currentTarget).closest("tr"),Di=Zn.find(".dx-calendar-cell").first().data("dxDateValueKey"),po=Zn.find(".dx-calendar-cell").last().data("dxDateValueKey"),nr=[...c.A.getDatesOfInterval(Di,po,864e5),po];this._weekNumberCellClickAction({event:en,rowDates:nr})}))},_createCellClickAction(){this._cellClickAction=this._createActionByOption("onCellClick")},_createCellHoverAction(){this._cellHoverAction=this._createActionByOption("onCellHover")},_createWeekNumberCellClickAction(){this._weekNumberCellClickAction=this._createActionByOption("onWeekNumberClick")},_createDisabledDatesHandler(){const rn=this.option("disabledDates");this._disabledDatesHandler=Array.isArray(rn)?this._getDefaultDisabledDatesHandler(rn):rn||d.lQ},_getDefaultDisabledDatesHandler:()=>d.lQ,_isTodayCell:fe,_isDateOutOfRange:fe,isDateDisabled(rn){const en={date:rn,view:this._getViewName()};return this._disabledDatesHandler(en)},_isOtherView:fe,_isStartDayOfMonth:fe,_isEndDayOfMonth:fe,_getCellText:fe,_getFirstCellData:fe,_getNextCellData:fe,_renderContouredDate(rn){if(!this.option("focusStateEnabled"))return;rn=rn||this.option("contouredDate");const en=this._getContouredCell(),Zn=this._getCellByDate(rn);en.removeClass("dx-calendar-contoured-date"),rn&&Zn.addClass("dx-calendar-contoured-date")},_getContouredCell(){return this._$table.find(".dx-calendar-contoured-date")},_renderValue(){if(!this.option("allowValueSelection"))return;let rn=this.option("value");Array.isArray(rn)||(rn=[rn]),this._updateSelectedClass(rn)},_updateSelectedClass(rn){var en;this._isRangeMode()&&!this._isMonthView()||(null===(en=this._$selectedCells)||void 0===en||en.forEach(Zn=>{Zn.removeClass("dx-calendar-selected-date")}),this._$selectedCells=rn.map(Zn=>this._getCellByDate(Zn)),this._$selectedCells.forEach(Zn=>{Zn.addClass("dx-calendar-selected-date")}))},_renderRange(){var rn,en,Zn,Di,po,nr,Xo,Hn;const{allowValueSelection:ui,value:bi,range:ao}=this.option();!ui||!this._isRangeMode()||!this._isMonthView()||(null===(rn=this._$rangeCells)||void 0===rn||rn.forEach(Wi=>{Wi.removeClass("dx-calendar-cell-in-range")}),null===(en=this._$hoveredRangeCells)||void 0===en||en.forEach(Wi=>{Wi.removeClass("dx-calendar-cell-range-hover")}),null===(Zn=this._$rangeStartHoverCell)||void 0===Zn||Zn.removeClass("dx-calendar-cell-range-hover-start"),null===(Di=this._$rangeEndHoverCell)||void 0===Di||Di.removeClass("dx-calendar-cell-range-hover-end"),null===(po=this._$rangeStartDateCell)||void 0===po||po.removeClass("dx-calendar-range-start-date"),null===(nr=this._$rangeEndDateCell)||void 0===nr||nr.removeClass("dx-calendar-range-end-date"),this._$rangeCells=ao.map(Wi=>this._getCellByDate(Wi)),this._$rangeStartDateCell=this._getCellByDate(bi[0]),this._$rangeEndDateCell=this._getCellByDate(bi[1]),this._$rangeCells.forEach(Wi=>{Wi.addClass("dx-calendar-cell-in-range")}),null===(Xo=this._$rangeStartDateCell)||void 0===Xo||Xo.addClass("dx-calendar-range-start-date"),null===(Hn=this._$rangeEndDateCell)||void 0===Hn||Hn.addClass("dx-calendar-range-end-date"))},_renderHoveredRange(){var rn,en,Zn,Di,po;const{allowValueSelection:nr,hoveredRange:Xo}=this.option();!nr||!this._isRangeMode()||!this._isMonthView()||(null===(rn=this._$hoveredRangeCells)||void 0===rn||rn.forEach(Hn=>{Hn.removeClass("dx-calendar-cell-range-hover")}),null===(en=this._$rangeStartHoverCell)||void 0===en||en.removeClass("dx-calendar-cell-range-hover-start"),null===(Zn=this._$rangeEndHoverCell)||void 0===Zn||Zn.removeClass("dx-calendar-cell-range-hover-end"),this._$hoveredRangeCells=Xo.map(Hn=>this._getCellByDate(Hn)),this._$rangeStartHoverCell=this._getCellByDate(Xo[0]),this._$rangeEndHoverCell=this._getCellByDate(Xo[Xo.length-1]),this._$hoveredRangeCells.forEach(Hn=>{Hn.addClass("dx-calendar-cell-range-hover")}),null===(Di=this._$rangeStartHoverCell)||void 0===Di||Di.addClass("dx-calendar-cell-range-hover-start"),null===(po=this._$rangeEndHoverCell)||void 0===po||po.addClass("dx-calendar-cell-range-hover-end"))},_isMonthView(){return"month"===this.option("zoomLevel")},_isRangeMode(){return"range"===this.option("selectionMode")},_getCurrentDateFormat:()=>null,getCellAriaLabel(rn){const en=this._getViewName(),Zn=this._isTodayCell(rn),Di=this._getCurrentDateFormat(),po=Di?I.A.format(rn,Di):this._getCellText(rn);return Zn?`${po}. ${Tt[en]}`:po},_getFirstAvailableDate(){let rn=this.option("date");const en=this.option("min");return rn=c.A.getViewFirstCellDate(this._getViewName(),rn),new Date(en&&rn<en?en:rn)},_getCellByDate:fe,isBoundary:fe,_optionChanged(rn){const{name:en,value:Zn}=rn;switch(en){case"value":this._renderValue(),this._updateTableAriaLabel();break;case"range":this._renderRange();break;case"hoveredRange":this._renderHoveredRange();break;case"contouredDate":this._renderContouredDate(Zn);break;case"onCellClick":this._createCellClickAction();break;case"onCellHover":this._createCellHoverAction();break;case"min":case"max":case"disabledDates":case"cellTemplate":case"selectionMode":this._invalidate();break;case"_todayDate":this._renderBody();break;default:this.callBase(rn)}}}),Ai={month:ri.inherit({_getViewName:()=>"month",_getCurrentDateFormat:()=>"longdate",_getDefaultOptions(){return(0,a.X)(this.callBase(),{firstDayOfWeek:0,rowCount:6,colCount:7})},_renderImpl(){this.callBase(),this._renderHeader()},_renderBody(){this.callBase(),this._$table.find(".dx-calendar-other-view").addClass("dx-calendar-other-month")},_renderFocusTarget:d.lQ,_renderHeader(){const rn=(0,T.A)("<tr>"),en=(0,T.A)("<thead>").append(rn);this._$table.prepend(en);for(let Zn=0,Di=this.option("colCount");Zn<Di;Zn++)this._renderHeaderCell(Zn,rn);this.option("showWeekNumbers")&&this._renderWeekHeaderCell(rn)},_renderHeaderCell(rn,en){const{firstDayOfWeek:Zn}=this.option(),{full:Di,abbreviated:po}=this._getDayCaption(Zn+rn),nr=(0,T.A)("<th>").attr({scope:"col",abbr:Di}).text(po);en.append(nr)},_renderWeekHeaderCell(rn){const en=(0,T.A)("<th>").attr({scope:"col",abbr:"WeekNumber",class:"dx-week-number-header"});rn.prepend(en)},_renderWeekNumberCell(rn){const{showWeekNumbers:en,cellTemplate:Zn,selectionMode:Di,selectWeekOnClick:po}=this.option();if(!en)return;const nr=this._getWeekNumber(rn.prevCellDate),Xo=ve.A.createElement("td"),Hn=(0,T.A)(Xo);Xo.className="dx-calendar-week-number-cell","single"!==Di&&po&&Hn.addClass("dx-calendar-week-selection"),Zn?Zn.render(this._prepareCellTemplateData(nr,-1,Hn)):Xo.innerHTML=nr,rn.row.prepend(Xo),this.setAria({role:"gridcell",label:`Week ${nr}`},Hn)},_getWeekNumber(rn){const{weekNumberRule:en,firstDayOfWeek:Zn}=this.option();return c.A.getWeekNumber(rn,Zn,"auto"===en?1===Zn?"firstFourDays":"firstDay":en)},getNavigatorCaption(){return I.A.format(this.option("date"),"monthandyear")},_isTodayCell(rn){const en=this.option("_todayDate")();return c.A.sameDate(rn,en)},_isDateOutOfRange(rn){const en=this.option("min"),Zn=this.option("max");return!c.A.dateInRange(rn,en,Zn,"date")},_isOtherView(rn){return rn.getMonth()!==this.option("date").getMonth()},_isStartDayOfMonth(rn){return c.A.sameDate(rn,c.A.getFirstMonthDate(this.option("date")))},_isEndDayOfMonth(rn){return c.A.sameDate(rn,c.A.getLastMonthDate(this.option("date")))},_getCellText:rn=>I.A.format(rn,"d"),_getDayCaption(rn){const Zn=rn%this.option("colCount");return{full:I.A.getDayNames()[Zn],abbreviated:I.A.getDayNames("abbreviated")[Zn]}},_getFirstCellData(){const{firstDayOfWeek:rn}=this.option(),en=c.A.getFirstMonthDate(this.option("date"));let Zn=rn-en.getDay();const Di=this.option("colCount");return Zn>=0&&(Zn-=Di),en.setDate(en.getDate()+Zn),en},_getNextCellData:rn=>((rn=new Date(rn)).setDate(rn.getDate()+1),rn),_getCellByDate(rn){return this._$table.find(`td[data-value='${s.A.serializeDate(rn,c.A.getShortDateFormat())}']`)},isBoundary(rn){return c.A.sameMonthAndYear(rn,this.option("min"))||c.A.sameMonthAndYear(rn,this.option("max"))},_getDefaultDisabledDatesHandler:rn=>function(en){if(rn.some(Di=>c.A.sameDate(Di,en.date)))return!0}}),year:ri.inherit({_getViewName:()=>"year",_getCurrentDateFormat:()=>"monthandyear",_isTodayCell(rn){const en=this.option("_todayDate")();return c.A.sameMonthAndYear(rn,en)},_isDateOutOfRange(rn){return!c.A.dateInRange(rn,c.A.getFirstMonthDate(this.option("min")),c.A.getLastMonthDate(this.option("max")))},_isOtherView:()=>!1,_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText:rn=>I.A.getMonthNames("abbreviated")[rn.getMonth()],_getFirstCellData(){const rn=this.option("date"),en=new Date(rn);return en.setDate(1),en.setMonth(0),en},_getNextCellData:rn=>((rn=new Date(rn)).setMonth(rn.getMonth()+1),rn),_getCellByDate(rn){const en=new Date(rn);return en.setDate(1),this._$table.find(`td[data-value='${s.A.serializeDate(en,c.A.getShortDateFormat())}']`)},getNavigatorCaption(){return I.A.format(this.option("date"),"yyyy")},isBoundary(rn){return c.A.sameYear(rn,this.option("min"))||c.A.sameYear(rn,this.option("max"))},_renderWeekNumberCell:d.lQ}),decade:ri.inherit({_getViewName:()=>"decade",_isTodayCell(rn){const en=this.option("_todayDate")();return c.A.sameYear(rn,en)},_isDateOutOfRange(rn){const en=this.option("min"),Zn=this.option("max");return!c.A.dateInRange(rn.getFullYear(),en&&en.getFullYear(),Zn&&Zn.getFullYear())},_isOtherView(rn){const en=new Date(rn);return en.setMonth(1),!c.A.sameDecade(en,this.option("date"))},_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText:rn=>I.A.format(rn,"yyyy"),_getFirstCellData(){const rn=c.A.getFirstYearInDecade(this.option("date"))-1;return c.A.createDateWithFullYear(rn,0,1)},_getNextCellData:rn=>((rn=new Date(rn)).setFullYear(rn.getFullYear()+1),rn),getNavigatorCaption(){const rn=this.option("date"),en=c.A.getFirstYearInDecade(rn),Zn=new Date(rn),Di=new Date(rn);return Zn.setFullYear(en),Di.setFullYear(en+9),`${I.A.format(Zn,"yyyy")}-${I.A.format(Di,"yyyy")}`},_isValueOnCurrentView:(rn,en)=>c.A.sameDecade(rn,en),_getCellByDate(rn){const en=new Date(rn);return en.setDate(1),en.setMonth(0),this._$table.find(`td[data-value='${s.A.serializeDate(en,c.A.getShortDateFormat())}']`)},isBoundary(rn){return c.A.sameDecade(rn,this.option("min"))||c.A.sameDecade(rn,this.option("max"))},_renderWeekNumberCell:d.lQ}),century:ri.inherit({_getViewName:()=>"century",_isTodayCell(rn){const en=this.option("_todayDate")();return c.A.sameDecade(rn,en)},_isDateOutOfRange(rn){const en=c.A.getFirstYearInDecade(rn),Zn=c.A.getFirstYearInDecade(this.option("min")),Di=c.A.getFirstYearInDecade(this.option("max"));return!c.A.dateInRange(en,Zn,Di)},_isOtherView(rn){const en=new Date(rn);return en.setMonth(1),!c.A.sameCentury(en,this.option("date"))},_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText(rn){const en=I.A.format(rn,"yyyy"),Zn=new Date(rn);return Zn.setFullYear(Zn.getFullYear()+9),`${en} - ${I.A.format(Zn,"yyyy")}`},_getFirstCellData(){const rn=c.A.getFirstDecadeInCentury(this.option("date"))-10;return c.A.createDateWithFullYear(rn,0,1)},_getNextCellData:rn=>((rn=new Date(rn)).setFullYear(rn.getFullYear()+10),rn),_getCellByDate(rn){const en=new Date(rn);return en.setDate(1),en.setMonth(0),en.setFullYear(c.A.getFirstYearInDecade(en)),this._$table.find(`td[data-value='${s.A.serializeDate(en,c.A.getShortDateFormat())}']`)},getNavigatorCaption(){const rn=this.option("date"),en=c.A.getFirstDecadeInCentury(rn),Zn=new Date(rn),Di=new Date(rn);return Zn.setFullYear(en),Di.setFullYear(en+99),`${I.A.format(Zn,"yyyy")}-${I.A.format(Di,"yyyy")}`},isBoundary(rn){return c.A.sameCentury(rn,this.option("min"))||c.A.sameCentury(rn,this.option("max"))},_renderWeekNumberCell:d.lQ})},Pn=(0,C.b4)(D._,"dxCalendar"),ci={month:3,year:2,decade:1,century:0},Hi={SingleSelection:class ue extends B{constructor(en){super(en),this.NAME="SingleSelection"}getViewOptions(){return{value:this.dateOption("value"),range:[],selectionMode:"single"}}selectValue(en,Zn){this.skipNavigate(),this.dateValue(en,Zn)}updateAriaSelected(en,Zn){en??(en=[this.dateOption("value")]),Zn??(Zn=[]),super.updateAriaSelected(en,Zn)}getDefaultCurrentDate(){return this.dateOption("value")}restoreValue(){this.calendar.option("value",null)}_updateViewsValue(en){this._updateViewsOption("value",en[0])}},MultipleSelection:class K extends B{constructor(en){super(en),this.NAME="MultiSelection"}getViewOptions(){return{value:this.dateOption("value"),range:[],selectionMode:"multiple",onWeekNumberClick:this._shouldHandleWeekNumberClick()?this._weekNumberClickHandler.bind(this):null}}selectValue(en,Zn){const Di=[...this.dateOption("value")],po=Di.findIndex(nr=>nr?.toDateString()===en.toDateString());po>-1?Di.splice(po,1):Di.push(en),this.skipNavigate(),this._updateCurrentDate(en),this._currentDateChanged=!0,this.dateValue(Di,Zn)}updateAriaSelected(en,Zn){en??(en=this.dateOption("value")),Zn??(Zn=[]),super.updateAriaSelected(en,Zn)}getDefaultCurrentDate(){const en=this.dateOption("value").filter(Zn=>Zn);return this._getLowestDateInArray(en)}restoreValue(){this.calendar.option("value",[])}_weekNumberClickHandler(en){let{rowDates:Zn,event:Di}=en;const po=Zn.filter(nr=>!this._isDateDisabled(nr));this.dateValue(po,Di)}},RangeSelection:class he extends B{constructor(en){super(en),this.NAME="RangeSelection"}getViewOptions(){const en=this._getValue();return{value:en,range:this._getDaysInRange(en[0],en[1]),selectionMode:"range",onCellHover:this._cellHoverHandler.bind(this),onWeekNumberClick:this._shouldHandleWeekNumberClick()?this._weekNumberClickHandler.bind(this):null}}selectValue(en,Zn){const[Di,po]=this._getValue();this.skipNavigate(),this._updateCurrentDate(en),this._currentDateChanged=!0,!0===this.calendar.option("_allowChangeSelectionOrder")?(this.calendar._valueSelected=!0,"startDate"===this.calendar.option("_currentSelection")?this.calendar._convertToDate(en)>this.calendar._convertToDate(po)?this.dateValue([en,null],Zn):this.dateValue([en,po],Zn):this.calendar._convertToDate(en)>=this.calendar._convertToDate(Di)?this.dateValue([Di,en],Zn):this.dateValue([en,null],Zn)):this.dateValue(!Di||po?[en,null]:Di<en?[Di,en]:[en,Di],Zn)}updateAriaSelected(en,Zn){en??(en=this._getValue()),Zn??(Zn=[]),super.updateAriaSelected(en,Zn)}processValueChanged(en,Zn){super.processValueChanged(en,Zn);const Di=this._getRange();this._updateViewsOption("range",Di)}getDefaultCurrentDate(){const{_allowChangeSelectionOrder:en,_currentSelection:Zn}=this.calendar.option(),Di=this.dateOption("value");if(en){if("startDate"===Zn&&Di[0])return Di[0];if("endDate"===Zn&&Di[1])return Di[1]}const po=Di.filter(nr=>nr);return this._getLowestDateInArray(po)}restoreValue(){this.calendar.option("value",[null,null])}_getValue(){const en=this.dateOption("value");if(!en.length)return en;let[Zn,Di]=en;return Zn&&Di&&Zn>Di&&([Zn,Di]=[Di,Zn]),[Zn,Di]}_getRange(){const[en,Zn]=this._getValue();return this._getDaysInRange(en,Zn)}_getDaysInRange(en,Zn){if(!en||!Zn)return[];const{currentDate:Di,viewsCount:po}=this.calendar.option(),nr=this.calendar._isAdditionalViewDate(Di),Xo=c.A.getFirstMonthDate(c.A.addDateInterval(Di,"month",nr?-2:-1)),Hn=c.A.getLastMonthDate(c.A.addDateInterval(Di,"month",nr?1:po)),ui=new Date(Math.max(Xo,en)),bi=new Date(Math.min(Hn,Zn));return[...c.A.getDatesOfInterval(ui,bi,864e5),bi]}_cellHoverHandler(en){const Zn=this._isMaxZoomLevel(),[Di,po]=this._getValue(),{_allowChangeSelectionOrder:nr,_currentSelection:Xo}=this.calendar.option();if(Zn){if(!Di||po||nr&&"startDate"===Xo){if(Di||!po||nr&&"endDate"===Xo){if(Di&&po){if("startDate"===Xo&&en.value<Di)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(en.value,Di));if("endDate"===Xo&&en.value>po)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(po,en.value))}}else if(en.value<po)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(en.value,po))}else if(en.value>Di)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(Di,en.value));this._updateViewsOption("hoveredRange",[])}}_weekNumberClickHandler(en){let{rowDates:Zn,event:Di}=en;const po=Zn.filter(Xo=>!this._isDateDisabled(Xo));this.dateValue(po.length?[po[0],po[po.length-1]]:[null,null],Di)}}},mo=G.A.inherit({_activeStateUnit:".dx-calendar-cell",_getDefaultOptions(){return(0,a.X)(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,currentDate:new Date,value:null,dateSerializationFormat:void 0,min:new Date(1e3,0),max:new Date(3e3,0),firstDayOfWeek:void 0,viewsCount:1,zoomLevel:"month",maxZoomLevel:"month",minZoomLevel:"century",selectionMode:"single",selectWeekOnClick:!0,showTodayButton:!1,showWeekNumbers:!1,weekNumberRule:"auto",cellTemplate:"cell",disabledDates:null,onCellClick:null,onContouredChanged:null,skipFocusCheck:!1,_todayDate:()=>new Date})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===f.A.real().deviceType&&!f.A.isSimulator(),options:{focusStateEnabled:!0}}])},_supportedKeys(){return(0,a.X)(this.callBase(),{rightArrow(rn){rn.preventDefault(),(0,C.By)(rn)?this._waitRenderView(1):this._moveCurrentDateByOffset(1*this._getRtlCorrection())},leftArrow(rn){rn.preventDefault(),(0,C.By)(rn)?this._waitRenderView(-1):this._moveCurrentDateByOffset(-1*this._getRtlCorrection())},upArrow(rn){if(rn.preventDefault(),(0,C.By)(rn))this._navigateUp();else{if(o.A.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(-1*this._view.option("colCount"))}},downArrow(rn){if(rn.preventDefault(),(0,C.By)(rn))this._navigateDown();else{if(o.A.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(1*this._view.option("colCount"))}},home(rn){rn.preventDefault();const en=this.option("zoomLevel"),Zn=this.option("currentDate"),Di=this._dateOption("min");if(this._view.isDateDisabled(Zn))return;const po=c.A.sameView(en,Zn,Di)?Di:c.A.getViewFirstCellDate(en,Zn);this._moveToClosestAvailableDate(po)},end(rn){rn.preventDefault();const en=this.option("zoomLevel"),Zn=this.option("currentDate"),Di=this._dateOption("max");if(this._view.isDateDisabled(Zn))return;const po=c.A.sameView(en,Zn,Di)?Di:c.A.getViewLastCellDate(en,Zn);this._moveToClosestAvailableDate(po)},pageUp(rn){rn.preventDefault(),this._waitRenderView(-1*this._getRtlCorrection())},pageDown(rn){rn.preventDefault(),this._waitRenderView(1*this._getRtlCorrection())},tab:d.lQ,enter:this._enterKeyHandler})},_enterKeyHandler(rn){if(this._isMaxZoomLevel()){if(!this._view.isDateDisabled(this.option("currentDate"))){const en=this._updateTimeComponent(this.option("currentDate"));this._selectionStrategy.selectValue(en,rn)}}else this._navigateDown()},_getSerializationFormat(rn){const en=this.option(rn||"value");return this.option("dateSerializationFormat")?this.option("dateSerializationFormat"):(0,g.kf)(en)?"number":(0,g.Kg)(en)?s.A.getDateSerializationFormat(en):void 0},_convertToDate:rn=>s.A.deserializeDate(rn),_dateValue(rn,en){if(en){if("keydown"===en.type){const Zn=this._view._getContouredCell().get(0);en.target=Zn}this._saveValueChangeEvent(en)}this._dateOption("value",rn)},_dateOption(rn,en){const Zn="value"===rn&&!this._isSingleMode(),Di=this.option("value");if(1===arguments.length)return Zn?(Di??[]).map(Xo=>this._convertToDate(Xo)):this._convertToDate(this.option(rn));const po=this._getSerializationFormat(rn),nr=Zn?en?.map(Xo=>s.A.serializeDate(Xo,po))||[]:s.A.serializeDate(en,po);this.option(rn,nr)},_isSingleMode(){return"single"===this.option("selectionMode")},_shiftDate(rn,en,Zn,Di){switch(rn){case"month":en.setDate(en.getDate()+Zn*Di);break;case"year":en.setMonth(en.getMonth()+Zn*Di);break;case"decade":en.setFullYear(en.getFullYear()+Zn*Di);break;case"century":en.setFullYear(en.getFullYear()+10*Zn*Di)}},_moveCurrentDateByOffset(rn){const en=this.option("currentDate");let Zn=new Date(en);const Di=this.option("zoomLevel");this._shiftDate(Di,Zn,rn,1);const po=this._getMaxDate(),nr=this._getMinDate();let Xo=this._areDatesInNeighborView(Di,Zn,en),Hn=(0,u.r4)(Zn,nr,po)&&Xo;const ui=new Date(Zn);for(;Hn;){if(!this._view.isDateDisabled(ui)){Zn=ui;break}this._shiftDate(Di,ui,rn,1),Xo=this._areDatesInNeighborView(Di,ui,en),Hn=(0,u.r4)(ui,nr,po)&&Xo}if(this._view.isDateDisabled(en)||this._view.isDateDisabled(Zn)){const bi=rn>0?1:-1;(1===bi?this._isNextViewDisabled():this._isPrevViewDisabled())?this._moveToClosestAvailableDate(Zn):this._waitRenderView(bi)}else this._skipNavigate=!0,this.option("currentDate",Zn)},_isNextViewDisabled(){return this._navigator._nextButton.option("disabled")},_isPrevViewDisabled(){return this._navigator._prevButton.option("disabled")},_areDatesInSameView(rn,en,Zn){switch(rn){case"month":return en.getMonth()===Zn.getMonth();case"year":return en.getYear()===Zn.getYear();case"decade":return parseInt(en.getYear()/10)===parseInt(Zn.getYear()/10);case"century":return parseInt(en.getYear()/100)===parseInt(Zn.getYear()/100)}},_areDatesInNeighborView(rn,en,Zn){switch(rn){case"month":return((Di,po)=>{const nr=Math.abs(Di-po);return Math.min(nr,12-nr)})(en.getMonth(),Zn.getMonth())<=1;case"year":return Math.abs(en.getYear()-Zn.getYear())<=1;case"decade":return Math.abs(en.getYear()-Zn.getYear())<=10;case"century":return Math.abs(en.getYear()-Zn.getYear())<=100}},_moveToClosestAvailableDate(){let rn=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option("currentDate"),en=new Date(rn);const Zn=this.option("zoomLevel"),Di=!this._isDateNotAvailable(en);let Xo,Hn,po=Di,nr=Di;const ui=new Date(en),bi=new Date(en);do{if(po){en=ui;break}if(nr){en=bi;break}this._shiftDate(Zn,ui,1,1),this._shiftDate(Zn,bi,1,-1),Xo=this._areDatesInSameView(Zn,ui,rn),Hn=this._areDatesInSameView(Zn,bi,rn),po=Xo&&!this._isDateNotAvailable(ui),nr=Hn&&!this._isDateNotAvailable(bi)}while(Xo||Hn);this.option("currentDate",en)},_isDateNotAvailable(rn){const en=this._getMaxDate(),Zn=this._getMinDate();return!(0,u.r4)(rn,Zn,en)||this._view.isDateDisabled(rn)},_init(){this.callBase(),this._initSelectionStrategy(),this._correctZoomLevel(),this._initCurrentDate(),this._initActions()},_initSelectionStrategy(){const rn=this._getSelectionStrategyName();(!this._selectionStrategy||this._selectionStrategy.NAME!==rn)&&(this._selectionStrategy=new(0,Hi[rn])(this))},_refreshSelectionStrategy(){this._initSelectionStrategy(),this._selectionStrategy.restoreValue(),this._refresh()},_getSelectionStrategyName(){switch(this.option("selectionMode")){case"multiple":return"MultipleSelection";case"range":return"RangeSelection";default:return"SingleSelection"}},_correctZoomLevel(){const rn=this.option("minZoomLevel"),en=this.option("maxZoomLevel"),Zn=this.option("zoomLevel");ci[en]<ci[rn]||(ci[Zn]>ci[en]?this.option("zoomLevel",en):ci[Zn]<ci[rn]&&this.option("zoomLevel",rn))},_initCurrentDate(){const rn=this._getNormalizedDate(this._selectionStrategy.getDefaultCurrentDate())??this._getNormalizedDate(this.option("currentDate"));this.option("currentDate",rn)},_getNormalizedDate(rn){return rn=c.A.normalizeDate(rn,this._getMinDate(),this._getMaxDate()),(0,g.O9)(rn)?this._getDate(rn):rn},_initActions(){this._cellClickAction=this._createActionByOption("onCellClick"),this._onContouredChanged=this._createActionByOption("onContouredChanged")},_initTemplates(){this._templateManager.addDefaultTemplates({cell:new y.l(rn=>{const en=rn.model;(0,T.A)(rn.container).append((0,T.A)("<span>").text(en&&en.text||String(en)))})}),this.callBase()},_updateCurrentDate(rn){if(o.A.isAnimating(this._$viewsWrapper)&&o.A.stop(this._$viewsWrapper,!0),this._getMinDate()>this._getMaxDate())return void this.option("currentDate",new Date);const Di=this._getNormalizedDate(rn);if(rn.getTime()!==Di.getTime())return void this.option("currentDate",new Date(Di));let po=this._getViewsOffset(this._view.option("date"),Di);0!==po&&!this._isMaxZoomLevel()&&this._isOtherViewCellClicked&&(po=0),this._view&&0!==po&&!this._suppressNavigation?this._additionalView?po>2||po<-1?(this._refreshViews(),this._setViewContoured(Di),this._updateAriaId(Di),this._renderNavigator()):1===po&&this._skipNavigate?(this._setViewContoured(Di),this._updateAriaId(Di)):this._navigate(po,Di):this._navigate(po,Di):(this._renderNavigator(),this._setViewContoured(Di),this._updateAriaId(Di)),this._skipNavigate=!1},_isAdditionalViewDate(rn){return!!this._additionalView&&rn>=this._additionalView._getFirstAvailableDate()},_getActiveView(rn){return this._isAdditionalViewDate(rn)?this._additionalView:this._view},_setViewContoured(rn){var en;(this.option("skipFocusCheck")||(0,T.A)(this._$viewsWrapper).is(":focus"))&&(this._view.option("contouredDate",null),null===(en=this._additionalView)||void 0===en||en.option("contouredDate",null),(this._isAdditionalViewDate(rn)?this._additionalView:this._view).option("contouredDate",rn))},_getMinDate(){return this.option("_rangeMin")||(this.min||(this.min=this._dateOption("min")||new Date(1e3,0)),this.min)},_getMaxDate(){return this.option("_rangeMax")||(this.max||(this.max=this._dateOption("max")||new Date(3e3,0)),this.max)},_getViewsOffset(rn,en){const Zn=this.option("zoomLevel");if("month"===Zn)return this._getMonthsOffset(rn,en);let Di;switch(Zn){case"century":Di=100;break;case"decade":Di=10;break;default:Di=1}return parseInt(en.getFullYear()/Di)-parseInt(rn.getFullYear()/Di)},_getMonthsOffset:(rn,en)=>12*(en.getFullYear()-rn.getFullYear())+(en.getMonth()-rn.getMonth()),_waitRenderView(rn){if(this._alreadyViewRender)return;this._alreadyViewRender=!0;const en=this._getDateByOffset(rn*this._getRtlCorrection());this._moveToClosestAvailableDate(en),this._waitRenderViewTimeout=setTimeout(()=>{this._alreadyViewRender=!1})},_getRtlCorrection(){return this.option("rtlEnabled")?-1:1},_getDateByOffset(rn,en){const Zn=(en=this._getDate(en??this.option("currentDate"))).getDate(),Di=c.A.getDifferenceInMonth(this.option("zoomLevel"))*rn;en.setDate(1),en.setMonth(en.getMonth()+Di);const po=c.A.getLastMonthDate(en).getDate();return en.setDate(Zn>po?po:Zn),en},_focusTarget(){return this._$viewsWrapper},_focusEventTarget(){return this.$element()},_initMarkup(){this._renderSubmitElement();const rn=this.$element();rn.addClass("dx-calendar"),rn.toggleClass("dx-calendar-range","range"===this.option("selectionMode")),this._renderBody(),rn.append(this.$body),this._renderViews(),this._renderNavigator(),this.callBase(),this._renderEvents(),rn.prepend(this._navigator.$element()),this._renderSwipeable(),this._renderFooter(),this._selectionStrategy.updateAriaSelected(),this._updateAriaId(),this._updateNavigatorLabels(),this.setAria("role","application"),this._moveToClosestAvailableDate()},_render(){this.callBase(),this._setViewContoured(this.option("currentDate"))},_renderBody(){this._$viewsWrapper||(this.$body=(0,T.A)("<div>").addClass("dx-calendar-body"),this._$viewsWrapper=(0,T.A)("<div>").addClass("dx-calendar-views-wrapper"),this.$body.append(this._$viewsWrapper))},_setAriaReadonly:d.lQ,_getKeyboardListeners(){return this.callBase().concat([this._view])},_renderViews(){this.$element().addClass(`dx-calendar-view-${this.option("zoomLevel")}`);const{currentDate:rn,viewsCount:en}=this.option();if(this.$element().toggleClass("dx-calendar-multiview",en>1),this._view=this._renderSpecificView(rn),(0,_.Vd)()){const Zn=this._getDateByOffset(-1,rn);this._beforeView=this._isViewAvailable(Zn)?this._renderSpecificView(Zn):null;const Di=this._getDateByOffset(en,rn);Di.setDate(1),this._afterView=this._isViewAvailable(Di)?this._renderSpecificView(Di):null}en>1&&(this._additionalView=this._renderSpecificView(this._getDateByOffset(1,rn))),this._translateViews()},_renderSpecificView(rn){const{zoomLevel:en}=this.option(),Zn=Ai[en],Di=(0,T.A)("<div>").appendTo(this._$viewsWrapper),po=this._viewConfig(rn);return this._createComponent(Di,Zn,po)},_viewConfig(rn){let en=this.option("disabledDates");return en=(0,g.Tn)(en)?this._injectComponent(en.bind(this)):en,(0,W.A)({},this._selectionStrategy.getViewOptions(),{date:rn,min:this._getMinDate(),max:this._getMaxDate(),firstDayOfWeek:this.option("firstDayOfWeek")??I.A.firstDayOfWeekIndex(),showWeekNumbers:this.option("showWeekNumbers"),selectWeekOnClick:this.option("selectWeekOnClick"),weekNumberRule:this.option("weekNumberRule"),zoomLevel:this.option("zoomLevel"),tabIndex:void 0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),disabledDates:en,onCellClick:this._cellClickHandler.bind(this),cellTemplate:this._getTemplateByOption("cellTemplate"),allowValueSelection:this._isMaxZoomLevel(),_todayDate:this.option("_todayDate")})},_renderEvents(){x.A.off(this._$viewsWrapper,Pn),"range"===this.option("selectionMode")&&x.A.on(this._$viewsWrapper,Pn,null,()=>{this._updateViewsOption("hoveredRange",[])})},_injectComponent(rn){const en=this;return function(Zn){return(0,a.X)(Zn,{component:en}),rn(Zn)}},_isViewAvailable(rn){const en=this.option("zoomLevel"),Zn=c.A.getViewMinBoundaryDate(en,this._getMinDate()),Di=c.A.getViewMaxBoundaryDate(en,this._getMaxDate());return c.A.dateInRange(rn,Zn,Di)},_translateViews(){const{viewsCount:rn}=this.option();(0,P.Cy)(this._view.$element(),{left:0,top:0}),this._moveViewElement(this._beforeView,-1),this._moveViewElement(this._afterView,rn),this._moveViewElement(this._additionalView,1)},_moveViewElement(rn,en){rn&&(0,P.Cy)(rn.$element(),{left:this._getViewPosition(en),top:0})},_getViewPosition(rn){return 100*rn*(this.option("rtlEnabled")?-1:1)+"%"},_cellClickHandler(rn){const en=this.option("zoomLevel"),Zn=c.A.getViewDown(en),Di=this._isMaxZoomLevel();if(Zn&&!Di)this._navigateDown(rn.event.currentTarget);else{const po=this._updateTimeComponent(rn.value);this._selectionStrategy.selectValue(po,rn.event),this._cellClickAction(rn)}},_updateTimeComponent(rn){const en=new Date(rn),Zn=this._dateOption("value");return Zn&&this._isSingleMode()&&(en.setHours(Zn.getHours()),en.setMinutes(Zn.getMinutes()),en.setSeconds(Zn.getSeconds()),en.setMilliseconds(Zn.getMilliseconds())),en},_isMaxZoomLevel(){return this.option("zoomLevel")===this.option("maxZoomLevel")},_navigateDown(rn){const en=this.option("zoomLevel");if(this._isMaxZoomLevel())return;const Zn=c.A.getViewDown(en);if(!Zn)return;let Di=this._view.option("contouredDate")||this._view.option("date");rn&&(Di=(0,T.A)(rn).data("dxDateValueKey")),this._isOtherViewCellClicked=!0,this.option("currentDate",Di),this.option("zoomLevel",Zn),this._isOtherViewCellClicked=!1,this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate")))},_renderNavigator(){this._navigator||(this._navigator=new ae((0,T.A)("<div>"),this._navigatorConfig())),this._navigator.option("text",this._getViewsCaption(this._view,this._additionalView)),this._updateButtonsVisibility()},_navigatorConfig(){const{focusStateEnabled:rn,rtlEnabled:en}=this.option();return{text:this._getViewsCaption(this._view,this._additionalView),onClick:this._navigatorClickHandler.bind(this),onCaptionClick:this._navigateUp.bind(this),focusStateEnabled:rn,rtlEnabled:en,tabIndex:void 0}},_navigatorClickHandler(rn){const{currentDate:en,viewsCount:Zn}=this.option();let Di=rn.direction;if(Zn>1){const nr=this._isAdditionalViewDate(en);(nr&&Di<0||!nr&&Di>0)&&(Di*=2)}const po=this._getDateByOffset(Di,en);this._moveToClosestAvailableDate(po)},_navigateUp(){const rn=this.option("zoomLevel"),en=c.A.getViewUp(rn);!en||this._isMinZoomLevel(rn)||(this.option("zoomLevel",en),this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate"))))},_isMinZoomLevel(rn){const en=this._getMinDate(),Zn=this._getMaxDate();return c.A.sameView(rn,en,Zn)||this.option("minZoomLevel")===rn},_updateButtonsVisibility(){this._navigator.toggleButton("next",!(0,g.O9)(this._afterView)),this._navigator.toggleButton("prev",!(0,g.O9)(this._beforeView))},_renderSwipeable(){this._swipeable||(this._swipeable=this._createComponent(this.$element(),w.A,{onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._viewWidth.bind(this)}))},_swipeStartHandler(rn){o.A.stop(this._$viewsWrapper,!0);const{viewsCount:en}=this.option();this._toggleGestureCoverCursor("grabbing"),rn.event.maxLeftOffset=this._getRequiredView("next")?1/en:0,rn.event.maxRightOffset=this._getRequiredView("prev")?1/en:0},_toggleGestureCoverCursor(rn){(0,T.A)(".dx-gesture-cover").css("cursor",rn)},_getRequiredView(rn){let en;const Zn=this.option("rtlEnabled");return"next"===rn?en=Zn?this._beforeView:this._afterView:"prev"===rn&&(en=Zn?this._afterView:this._beforeView),en},_swipeUpdateHandler(rn){const{offset:en}=rn.event;(0,P.Cy)(this._$viewsWrapper,{left:en*this._viewWidth(),top:0}),this._updateNavigatorCaption(en)},_swipeEndHandler(rn){this._toggleGestureCoverCursor("auto");const{currentDate:en,rtlEnabled:Zn}=this.option(),{targetOffset:Di}=rn.event,po=Di?Di/Math.abs(Di):0,Xo=this._isAdditionalViewDate(en)&&(Zn?-1===po:1===po);if(0===po)return void this._animateWrapper(0,250);const Hn=-po*this._getRtlCorrection()*(Xo?2:1);let ui=this._getDateByOffset(Hn);this._isDateInInvalidRange(ui)&&(ui=po>=0?new Date(this._getMinDate()):new Date(this._getMaxDate())),this.option("currentDate",ui)},_viewWidth(){return this._viewWidthValue||(this._viewWidthValue=(0,h.RG)(this.$element())/this.option("viewsCount")),this._viewWidthValue},_updateNavigatorCaption(rn){rn*=this._getRtlCorrection();const en=this.option("viewsCount")>1;let Zn,Di;rn>.5&&this._beforeView?(Zn=this._beforeView,Di=en&&this._view):rn<-.5&&this._afterView?(Zn=en?this._additionalView:this._afterView,Di=en?this._afterView:null):(Zn=this._view,Di=en?this._additionalView:null),this._navigator.option("text",this._getViewsCaption(Zn,Di))},_getViewsCaption(rn,en){let Zn=rn.getNavigatorCaption();const{viewsCount:Di}=this.option();return Di>1&&en&&(Zn=`${Zn} - ${en.getNavigatorCaption()}`),Zn},_isDateInInvalidRange(rn){if(this._view.isBoundary(rn))return;const en=this._getMinDate(),Zn=this._getMaxDate(),Di=c.A.normalizeDate(rn,en,Zn);return Di===en||Di===Zn},_renderFooter(){const rn=this.option("showTodayButton");if(rn){const en=this._createComponent((0,T.A)("<div>"),N.A,{focusStateEnabled:this.option("focusStateEnabled"),text:L.A.format("dxCalendar-todayButtonText"),onClick:Zn=>{this._toTodayView(Zn)},type:(0,k.Ft)()?"normal":"default",stylingMode:(0,k.Ft)()?"outlined":"text",integrationOptions:{}}).$element().addClass("dx-calendar-today-button");this._$footer=(0,T.A)("<div>").addClass("dx-calendar-footer").append(en),this.$element().append(this._$footer)}this.$element().toggleClass("dx-calendar-with-footer",rn)},_renderSubmitElement(){this._$submitElement=(0,T.A)("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(rn){const en=this._convertToDate(rn);this._getSubmitElement().val(s.A.serializeDate(en,"yyyy-MM-dd"))},_getSubmitElement(){return this._$submitElement},_animateShowView(){o.A.stop(this._view.$element(),!0),this._popAnimationView(this._view,.6,1,250),this.option("viewsCount")>1&&(o.A.stop(this._additionalView.$element(),!0),this._popAnimationView(this._additionalView,.6,1,250))},_popAnimationView:(rn,en,Zn,Di)=>o.A.animate(rn.$element(),{type:"pop",from:{scale:en,opacity:en},to:{scale:Zn,opacity:Zn},duration:Di}),_navigate(rn,en){if(0!==rn&&1!==Math.abs(rn)&&this._isViewAvailable(en)){const Xo=this._renderSpecificView(en);rn>0?(this._afterView&&this._afterView.$element().remove(),this._afterView=Xo):(this._beforeView&&this._beforeView.$element().remove(),this._beforeView=Xo),this._translateViews()}const po=-this._getRtlCorrection()*(rn>0?1:rn<0?-1:0)*this._viewWidth();this._$viewsWrapper.position().left!==po&&(this._preventViewChangeAnimation?this._wrapperAnimationEndHandler(rn,en):this._animateWrapper(po,250).done(this._wrapperAnimationEndHandler.bind(this,rn,en)))},_animateWrapper(rn,en){return o.A.animate(this._$viewsWrapper,{type:"slide",from:{left:this._$viewsWrapper.position().left},to:{left:rn},duration:en})},_getDate:rn=>new Date(rn),_toTodayView(rn){const en=new Date;this._isMaxZoomLevel()?this._selectionStrategy.selectValue(en,rn.event):(this._preventViewChangeAnimation=!0,this.option("zoomLevel",this.option("maxZoomLevel")),this._selectionStrategy.selectValue(en,rn.event),this._animateShowView(),this._preventViewChangeAnimation=!1)},_wrapperAnimationEndHandler(rn,en){this._rearrangeViews(rn),this._translateViews(),this._resetLocation(),this._renderNavigator(),this._setViewContoured(en),this._updateAriaId(en),this._selectionStrategy.updateAriaSelected()},_rearrangeViews(rn){var en;if(0===rn)return;const{viewsCount:Zn}=this.option();let Di,po,nr,Xo,Hn;if(rn<0?(Di=1,po="_beforeView",nr="_afterView",Xo="_view",Hn=1===Zn?"_view":"_additionalView"):(Di=-1,po="_afterView",nr="_beforeView",Xo=1===Zn?"_view":"_additionalView",Hn="_view"),!this[po])return;const ui=this[po].option("date");null===(en=this[nr])||void 0===en||en.$element().remove(),this[nr]=this._renderSpecificView(this._getDateByOffset(Di*Zn,ui)),this[Hn].$element().remove(),1===Zn?this[Hn]=this[po]:(this[Hn]=this[Xo],this[Xo]=this[po]);const bi=this._getDateByOffset(-Di,ui);this[po]=this._isViewAvailable(bi)?this._renderSpecificView(bi):null},_resetLocation(){(0,P.Cy)(this._$viewsWrapper,{left:0,top:0})},_clean(){this.callBase(),this._clearViewWidthCache(),delete this._$viewsWrapper,delete this._navigator,delete this._$footer},_clearViewWidthCache(){delete this._viewWidthValue},_disposeViews(){this._view.$element().remove(),this._beforeView&&this._beforeView.$element().remove(),this._additionalView&&this._additionalView.$element().remove(),this._afterView&&this._afterView.$element().remove(),delete this._view,delete this._additionalView,delete this._beforeView,delete this._afterView,delete this._skipNavigate},_dispose(){clearTimeout(this._waitRenderViewTimeout),this.callBase()},_refreshViews(){this._resetActiveState(),this._disposeViews(),this._renderViews()},_visibilityChanged(){this._translateViews()},_shouldSkipFocusEvent(rn){const{target:en,relatedTarget:Zn}=rn;return(0,T.A)(en).parents(".dx-calendar").length&&(0,T.A)(Zn).parents(".dx-calendar").length},_focusInHandler(rn){(0,T.A)(rn.target).is(this._$viewsWrapper)&&this._setViewContoured(this.option("currentDate")),!this._shouldSkipFocusEvent(rn)&&(this.callBase.apply(this,arguments),this._toggleFocusClass(!0,this.$element()))},_focusOutHandler(rn){var en;(0,T.A)(rn.target).is(this._$viewsWrapper)&&(this._view.option("contouredDate",null),null===(en=this._additionalView)||void 0===en||en.option("contouredDate",null)),this._shouldSkipFocusEvent(rn)||(this.callBase.apply(this,arguments),this._toggleFocusClass(!1,this.$element()))},_updateViewsOption(rn,en){var Zn,Di,po;this._view.option(rn,en),null===(Zn=this._additionalView)||void 0===Zn||Zn.option(rn,en),null===(Di=this._beforeView)||void 0===Di||Di.option(rn,en),null===(po=this._afterView)||void 0===po||po.option(rn,en)},_setViewsMinOption(rn){this._restoreViewsMinMaxOptions(),this.option("_rangeMin",this._convertToDate(rn)),this._updateViewsOption("min",this._getMinDate())},_setViewsMaxOption(rn){this._restoreViewsMinMaxOptions(),this.option("_rangeMax",this._convertToDate(rn)),this._updateViewsOption("max",this._getMaxDate())},_restoreViewsMinMaxOptions(){this._resetActiveState(),this.option({_rangeMin:null,_rangeMax:null}),this._updateViewsOption("min",this._getMinDate()),this._updateViewsOption("max",this._getMaxDate())},_updateNavigatorLabels(){let rn=this.option("zoomLevel");rn=rn.charAt(0).toUpperCase()+rn.slice(1);const en=this._navigator._caption.option("text"),Zn=L.A.format(`dxCalendar-previous${rn}ButtonLabel`),Di=L.A.format(`dxCalendar-caption${rn}Label`),po=L.A.format(`dxCalendar-next${rn}ButtonLabel`);this.setAria("label",Zn,this._navigator._prevButton.$element()),this.setAria("label",`${en}. ${Di}`,this._navigator._caption.$element()),this.setAria("label",po,this._navigator._nextButton.$element())},_updateAriaSelected(rn,en){en.forEach(Zn=>{this.setAria("selected",!1,this._view._getCellByDate(Zn))}),rn.forEach(Zn=>{this.setAria("selected",!0,this._view._getCellByDate(Zn))}),this.option("viewsCount")>1&&(en.forEach(Zn=>{this.setAria("selected",!1,this._additionalView._getCellByDate(Zn))}),rn.forEach(Zn=>{this.setAria("selected",!0,this._additionalView._getCellByDate(Zn))}))},_updateAriaId(rn){rn=rn??this.option("currentDate");const en=`dx-${new S.A}`,Di=this._getActiveView(rn)._getCellByDate(rn);this.setAria("id",en,Di),this.setAria("activedescendant",en),this._onContouredChanged(en)},_suppressingNavigation(rn,en){this._suppressNavigation=!0,rn.apply(this,en),delete this._suppressNavigation},_optionChanged(rn){const{value:en,previousValue:Zn}=rn;switch(rn.name){case"width":this.callBase(rn),this._clearViewWidthCache();break;case"min":case"max":this.min=void 0,this.max=void 0,this._suppressingNavigation(this._updateCurrentDate,[this.option("currentDate")]),this._refreshViews(),this._renderNavigator();break;case"selectionMode":this._refreshSelectionStrategy(),this._initCurrentDate();break;case"selectWeekOnClick":case"_todayDate":case"showWeekNumbers":case"weekNumberRule":this._refreshViews();break;case"firstDayOfWeek":this._refreshViews(),this._updateButtonsVisibility();break;case"focusStateEnabled":case"disabledDates":case"dateSerializationFormat":case"cellTemplate":case"showTodayButton":this._invalidate();break;case"currentDate":this.setAria("id",void 0,this._view._getCellByDate(Zn)),this._updateCurrentDate(en);break;case"zoomLevel":this.$element().removeClass(`dx-calendar-view-${Zn}`),this._correctZoomLevel(),this._refreshViews(),this._renderNavigator(),this._updateAriaId(),this._updateNavigatorLabels();break;case"minZoomLevel":case"maxZoomLevel":this._correctZoomLevel(),this._updateButtonsVisibility();break;case"value":this._selectionStrategy.processValueChanged(en,Zn),this._setSubmitValue(en),this.callBase(rn);break;case"viewsCount":this._refreshViews(),this._renderNavigator();break;case"onCellClick":this._view.option("onCellClick",en);break;case"onContouredChanged":this._onContouredChanged=this._createActionByOption("onContouredChanged");break;case"skipFocusCheck":break;default:this.callBase(rn)}},getContouredDate(){return this._view.option("contouredDate")}});(0,b.A)("dxCalendar",mo);const vr=mo},3480:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>he});var W=M(1973),o=M(1830),P=M(4505),b=M(3777),f=M(3090),S=M(5704),T=M(5397),y=M(8684),d=M(6620);const s="dx-invalid-message-auto",a="dx-validation-target";class u extends P.A{getProps(){const ue=super.getProps();return ue.onFocusIn=()=>{if("auto"===this.option("validationMessageMode")){const ve=(0,S.A)(function c(de,ue){var be;return((null===(be=de.getRootNode)||void 0===be?void 0:be.call(de))??document).querySelector(ue)}(this.element(),".dx-invalid-message.dx-overlay-wrapper"));ve?.removeClass(s);const le=150;this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>{ve?.addClass(s)},le)}},ue.saveValueChangeEvent=be=>{this._valueChangeEventInstance=be},ue}_createElement(ue){super._createElement(ue),this.showValidationMessageTimeout=void 0,this.validationRequest=(0,y.A)(),(0,T.p)(this.$element()[0],a,this)}_render(){var ue;null===(ue=this.option("_onMarkupRendered"))||void 0===ue||ue()}_init(){super._init(),this._initialValue=this.option("value")}_initializeComponent(){super._initializeComponent(),this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})}_initOptions(ue){super._initOptions(ue),this.option(b.A.initValidationOptions(ue))}_getDefaultOptions(){return(0,f.X)(super._getDefaultOptions(),{validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})}_bindInnerWidgetOptions(ue,be){const ve=(0,f.X)({},ue.option()),le=()=>this._silent(be,ve);le(),ue.on("optionChanged",le)}_raiseValidation(ue,be){const ve=!(0,o.O9)(ue)&&!(0,o.O9)(be);ue!==be&&!ve&&this.validationRequest.fire({value:ue,editor:this})}_raiseValueChangeAction(ue,be){var ve;null===(ve=this._valueChangeAction)||void 0===ve||ve.call(this,{element:this.$element(),previousValue:be,value:ue,event:this._valueChangeEventInstance}),this._valueChangeEventInstance=void 0}_optionChanged(ue){const{name:be,previousValue:ve,value:le}=ue;switch(be&&void 0!==this._getActionConfigs()[be]&&this._addAction(be),be){case"value":this._raiseValidation(le,ve),this.option("isDirty",this._initialValue!==le),this._raiseValueChangeAction(le,ve);break;case"onValueChanged":this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]});break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(b.A.synchronizeValidationOptions(ue,this.option()))}super._optionChanged(ue)}clear(){const{value:ue}=this._getDefaultOptions();this.option({value:ue})}reset(){arguments.length&&(this._initialValue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0),this.option("value",this._initialValue),this.option("isDirty",!1),this.option("isValid",!0)}_dispose(){super._dispose(),(0,T.p)(this.element(),a,null),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout)}}const h=d.A.isEditor,g=de=>h(de)||de instanceof u;u.isEditor=g,d.A.isEditor=g;class _ extends u{_useTemplates(){return!1}_isFocused(){return this.$element()[0].classList.contains("dx-state-focused")}getSupportedKeyNames(){return["space"]}getProps(){const ue=super.getProps();return null!==ue.value&&(ue.value=!!ue.value),ue}}var x=M(9144),w=M(5737),D=M(5328),C=M(5652),I=M(5973),L=M(1257),N=M(6628),G=M(8649);M(9212);const U=["size"],K={};let J=(()=>{class de extends C.eh{constructor(be){super(be),this.state={},this.elementRef=(0,D._3)(),this.__getterCache={}}get cssStyles(){return void 0!==this.__getterCache.cssStyles?this.__getterCache.cssStyles:this.__getterCache.cssStyles=(()=>{const{size:be}=this.props;return{fontSize:(0,G.CC)("fontSize",be)}})()}get restAttributes(){return(0,x.A)(this.props,U)}componentWillUpdate(be,ve,le){this.props.size!==be.size&&(this.__getterCache.cssStyles=void 0)}render(){return(de=>{const{cssStyles:ue,elementRef:be}=de;return(0,D.bF)(1,"span","dx-checkbox-icon",null,1,{style:(0,C.gs)(ue)},null,be)})({props:(0,w.A)({},this.props),elementRef:this.elementRef,cssStyles:this.cssStyles,restAttributes:this.restAttributes})}}return de.defaultProps=K,de})();var ie=M(2673),re=M(5170);const q=["accessKey","activeStateEnabled","aria","className","defaultValue","disabled","enableThreeStateBehavior","focusStateEnabled","height","hint","hoverStateEnabled","iconSize","inputAttr","isDirty","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","saveValueChangeEvent","tabIndex","text","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"],Q=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(L.eH),Object.getOwnPropertyDescriptors({text:"",enableThreeStateBehavior:!1,activeStateEnabled:!0,hoverStateEnabled:!0,get focusStateEnabled(){return"desktop"===I.A.real().deviceType&&!I.A.isSimulator()},defaultValue:!1,valueChange:()=>{}}))),te={get text(){return Q.text},get enableThreeStateBehavior(){return Q.enableThreeStateBehavior},get activeStateEnabled(){return Q.activeStateEnabled},get hoverStateEnabled(){return Q.hoverStateEnabled},get focusStateEnabled(){return Q.focusStateEnabled},get defaultValue(){return Q.defaultValue},get valueChange(){return Q.valueChange},get readOnly(){return Q.readOnly},get name(){return Q.name},get validationError(){return Q.validationError},get validationErrors(){return Q.validationErrors},get validationMessageMode(){return Q.validationMessageMode},get validationMessagePosition(){return Q.validationMessagePosition},get validationStatus(){return Q.validationStatus},get isValid(){return Q.isValid},get isDirty(){return Q.isDirty},get inputAttr(){return Q.inputAttr},get className(){return Q.className},get disabled(){return Q.disabled},get tabIndex(){return Q.tabIndex},get visible(){return Q.visible},get aria(){return ie.b7.aria}};class pe extends C.oe{constructor(ue){super(ue),this.editorRef=(0,D._3)(),this.state={value:void 0!==this.props.value?this.props.value:this.props.defaultValue},this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this)}createEffects(){return[(0,C.h2)()]}onWidgetClick(ue){const{enableThreeStateBehavior:be,readOnly:ve,saveValueChangeEvent:le}=this.props;if(!ve)if(le?.(ue),be){let Ce;this.setState(ye=>(Ce=null===(void 0!==this.props.value?this.props.value:ye.value)||!(void 0!==this.props.value?this.props.value:ye.value)&&null,{value:Ce})),this.props.valueChange(Ce)}else{let Ce;this.setState(ye=>(Ce=!(void 0!==this.props.value?this.props.value:ye.value),{value:Ce})),this.props.valueChange(Ce)}}keyDown(ue){const{onKeyDown:be}=this.props,{keyName:ve,originalEvent:le,which:Ce}=ue,ye=be?.(ue);if(null!=ye&&ye.cancel)return ye;("space"===ve||"space"===Ce)&&(le.preventDefault(),this.onWidgetClick(le))}get cssClasses(){return(de=>{const{text:ue,value:be}=de;return(0,N.g)({"dx-checkbox":!0,"dx-checkbox-checked":!0===be,"dx-checkbox-has-text":!!ue,"dx-checkbox-indeterminate":null===be})})((0,w.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}))}get aria(){return(0,w.A)({},{role:"checkbox",checked:null===(void 0!==this.props.value?this.props.value:this.state.value)?"mixed":`${!0===(void 0!==this.props.value?this.props.value:this.state.value)}`},this.props.aria)}get restAttributes(){const ue=(0,w.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value});return(0,x.A)(ue,q)}focus(){this.editorRef.current.focus()}blur(){this.editorRef.current.blur()}render(){return(de=>{const{aria:ue,cssClasses:be,editorRef:ve,keyDown:le,onWidgetClick:Ce,props:{accessKey:ye,activeStateEnabled:ge,className:fe,disabled:xe,focusStateEnabled:Te,height:Ee,hint:Oe,hoverStateEnabled:ze,iconSize:$e,isValid:Be,name:Ue,onFocusIn:ot,readOnly:st,rtlEnabled:et,tabIndex:Ke,text:Ye,validationError:Pe,validationErrors:Se,validationMessageMode:Re,validationMessagePosition:Fe,validationStatus:Xe,value:tt,visible:vt,width:qe},restAttributes:At}=de;return(0,D._B)((0,D.sO)(2,L.KE,(0,w.A)({aria:ue,classes:be,onClick:Ce,onKeyDown:le,accessKey:ye,activeStateEnabled:ge,focusStateEnabled:Te,hoverStateEnabled:ze,className:fe,disabled:xe,readOnly:st,hint:Oe,height:Ee,width:qe,rtlEnabled:et,tabIndex:Ke,visible:vt,validationError:Pe,validationErrors:Se,validationMessageMode:Re,validationMessagePosition:Fe,validationStatus:Xe,isValid:Be,onFocusIn:ot},At,{children:(0,D.nl)([(0,D._B)((0,D.bF)(64,"input",null,null,1,(0,w.A)({type:"hidden",value:`${tt}`},Ue&&{name:Ue}))),(0,D.bF)(1,"div","dx-checkbox-container",[(0,D.sO)(2,J,{size:$e,isChecked:!0===tt}),Ye&&(0,D.bF)(1,"span","dx-checkbox-text",Ye,0)],0)],4)}),null,ve))})({props:(0,w.A)({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}),editorRef:this.editorRef,onWidgetClick:this.onWidgetClick,keyDown:this.keyDown,cssClasses:this.cssClasses,aria:this.aria,restAttributes:this.restAttributes})}}pe.defaultProps=te;const oe=[];class ee extends _{getProps(){const ue=super.getProps();return ue.onKeyDown=this._wrapKeyDownHandler(ue.onKeyDown),ue}focus(){var ue;return null===(ue=this.viewRef)||void 0===ue?void 0:ue.focus(...arguments)}blur(){var ue;return null===(ue=this.viewRef)||void 0===ue?void 0:ue.blur(...arguments)}_getActionConfigs(){return{onFocusIn:{},onClick:{}}}get _propsInfo(){return{twoWay:[["value","defaultValue","valueChange"]],allowNull:["defaultValue","validationError","validationErrors","value"],elements:[],templates:[],props:["text","iconSize","enableThreeStateBehavior","activeStateEnabled","hoverStateEnabled","focusStateEnabled","saveValueChangeEvent","defaultValue","valueChange","readOnly","name","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","isValid","isDirty","inputAttr","onFocusIn","className","accessKey","disabled","height","hint","onClick","onKeyDown","rtlEnabled","tabIndex","visible","width","aria","value"]}}get _viewComponent(){return pe}}(0,W.A)("dxCheckBox",ee),ee.defaultOptions=function ae(de){oe.push(de),pe.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(pe.defaultProps),Object.getOwnPropertyDescriptors(function z(de){const ue=["value"];return Object.keys(de).reduce((be,ve)=>{const le=de[ve];return be[ue.some(ye=>ye===ve)?"default"+ve.charAt(0).toUpperCase()+ve.slice(1):ve]=le,be},{})}((0,re.a6)(oe)))))};const he=ee},4481:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(1129).A},6067:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>u});var W=M(6054),o=M(5704),P=M(9965),b=M(4859),f=M(6021),S=M(3090),T=M(2660),y=M(2946),d=M(9916);const u=M(1129).A.inherit({_getDefaultOptions(){return(0,S.X)(this.callBase(),{repaintChangesOnly:!1})},ctor(){var h;this.callBase.apply(this,arguments),this._customizeStoreLoadOptions=g=>{this._dataController.getDataSource()&&!this._dataController.isLoaded()&&(this._correctionIndex=0),this._correctionIndex&&g.storeLoadOptions&&(g.storeLoadOptions.skip+=this._correctionIndex)},null===(h=this._dataController)||void 0===h||h.on("customizeStoreLoadOptions",this._customizeStoreLoadOptions)},reload(){this._correctionIndex=0},_init(){this.callBase(),this._refreshItemsCache(),this._correctionIndex=0},_findItemElementByKey(h){let g=(0,o.A)();const _=this.key();return this.itemElements().each((x,w)=>{const D=(0,o.A)(w),C=this._getItemData(D);if(_?(0,d.t7)(_,this.keyOf(C),h):this._isItemEquals(C,h))return g=D,!1}),g},_dataSourceChangedHandler(h,g){null!=g&&g.changes?this._modifyByChanges(g.changes):(this.callBase(h,g),this._refreshItemsCache())},_isItemEquals(h,g){h&&h.__dx_key__&&(h=h.data);try{return JSON.stringify(h)===JSON.stringify(g)}catch{return h===g}},_isItemStrictEquals(h,g){return this._isItemEquals(h,g)},_shouldAddNewGroup(h,g){let _=!1;return this.option("grouped")&&(h.length||(_=!0),(0,T.__)(h,(x,w)=>{"insert"===w.type&&(_=!0,(0,T.__)(g,(D,C)=>{if(void 0!==w.data.key&&w.data.key===C.key)return _=!1,!1}))})),_},_partialRefresh(){if(this.option("repaintChangesOnly")){const h=_=>_&&void 0!==_.__dx_key__?_.__dx_key__:this.keyOf(_),g=(0,P.p)(this._itemsCache,this._editStrategy.itemsGetter(),h,this._isItemStrictEquals.bind(this));if(g&&this._itemsCache.length&&!this._shouldAddNewGroup(g,this._itemsCache))return this._modifyByChanges(g,!0),this._renderEmptyMessage(),!0;this._refreshItemsCache()}return!1},_refreshItemsCache(){if(this.option("repaintChangesOnly")){const h=this._editStrategy.itemsGetter();try{this._itemsCache=(0,S.X)(!0,[],h),this.key()||(this._itemsCache=this._itemsCache.map((g,_)=>({__dx_key__:h[_],data:g})))}catch{this._itemsCache=(0,S.X)([],h)}}},_dispose(){this._dataController.off("customizeStoreLoadOptions",this._customizeStoreLoadOptions),this.callBase()},_updateByChange(h,g,_,x){if(x)this._renderItem(_.index,_.data,null,this._findItemElementByKey(_.key));else{const w=g[(0,y.Xb)(h,g,_.key)];w&&(0,y.yo)(h,g,_.key,_.data).done(()=>{this._renderItem(g.indexOf(w),w,null,this._findItemElementByKey(_.key))})}},_insertByChange(h,g,_,x){(0,f.z7)(x||(0,y.Yr)(h,g,_.data,_.index)).done(()=>{this._beforeItemElementInserted(_),this._renderItem(_.index??g.length,_.data),this._afterItemElementInserted(),this._correctionIndex++})},_updateSelectionAfterRemoveByChange(h){const g=this.option("selectedIndex");g>h?this.option("selectedIndex",g-1):g===h&&1===this.option("selectedItems").length?this.option("selectedItems",[]):this._normalizeSelectedItems()},_beforeItemElementInserted(h){const g=this.option("selectedIndex");h.index<=g&&this.option("selectedIndex",g+1)},_afterItemElementInserted:b.lQ,_removeByChange(h,g,_,x){const w=x?_.index:(0,y.Xb)(h,g,_.key);if(x?_.oldItem:g[w]){const C=this._findItemElementByKey(_.key),I=this._extendActionArgs(C);this._waitDeletingPrepare(C).done(()=>{x?(this._updateIndicesAfterIndex(w-1),this._afterItemElementDeleted(C,I),this._updateSelectionAfterRemoveByChange(w)):(this._deleteItemElementByIndex(w),this._afterItemElementDeleted(C,I))}),this._correctionIndex--}},_modifyByChanges(h,g){const _=this._editStrategy.itemsGetter(),x={key:this.key.bind(this),keyOf:this.keyOf.bind(this)},w=this._dataController,D=w.paginate(),C=w.group();(D||C)&&(h=h.filter(I=>"insert"!==I.type||void 0!==I.index)),h.forEach(I=>this[`_${I.type}ByChange`](x,_,I,g)),this._renderedItemsCount=_.length,this._refreshItemsCache(),this._fireContentReadyAction()},_appendItemToContainer(h,g,_){const x=h.children(this._itemSelector()).get(_);W.A.insertElement(h.get(0),g.get(0),x)},_optionChanged(h){switch(h.name){case"items":this._partialRefresh(h.value)||this.callBase(h);break;case"dataSource":(!this.option("repaintChangesOnly")||!h.value)&&this.option("items",[]),this.callBase(h);break;case"repaintChangesOnly":break;default:this.callBase(h)}}})},2148:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>L});var W=M(851),o=M(1973),P=M(5704),b=M(3090),f=M(3684),S=M(9430);const s="dx-colorbox-color-is-not-defined",w=S.A.prototype,D={makeTransparentBackground:w._makeTransparentBackground.bind(w),makeRgba:w._makeRgba.bind(w)},C=f.A.inherit({_supportedKeys(){const N=function(G){if(G.stopPropagation(),this.option("opened"))return G.preventDefault(),!0};return(0,b.X)(this.callBase(),{enter:this._enterKeyHandler,leftArrow:N,rightArrow:N,upArrow:function(G){return this.option("opened")?!G.altKey||(this.close(),!1):(G.preventDefault(),!1)},downArrow:function(G){return this.option("opened")||G.altKey?!(!this.option("opened")&&G.altKey&&(this._validatedOpening(),1)):(G.preventDefault(),!1)}})},_getDefaultOptions(){return(0,b.X)(this.callBase(),{editAlphaChannel:!1,applyValueMode:"useButtons",keyStep:1,fieldTemplate:null,buttonsLocation:"bottom after"})},_popupHidingHandler(){this.callBase(),"useButtons"===this.option("applyValueMode")&&this._updateColorViewValue(this.option("value"))},_popupConfig(){return(0,b.X)(this.callBase(),{width:""})},_contentReadyHandler(){this._createColorView(),this._addPopupBottomClasses()},_addPopupBottomClasses(){const N=this._popup.bottomToolbar();N&&(N.addClass("dx-colorview-container-cell").addClass("dx-colorview-button-cell").find(".dx-toolbar-items-container").addClass("dx-colorview-buttons-container"),N.find(".dx-popup-done").addClass("dx-colorview-apply-button"),N.find(".dx-popup-cancel").addClass("dx-colorview-cancel-button"))},_createColorView(){this._popup.$overlayContent().addClass("dx-colorbox-overlay");const N=(0,P.A)("<div>").appendTo(this._popup.$content());this._colorView=this._createComponent(N,S.A,this._colorViewConfig())},_applyNewColor(N){this.option("value",N),N&&D.makeTransparentBackground(this._$colorResultPreview,N),this._colorViewEnterKeyPressed&&(this.close(),this._colorViewEnterKeyPressed=!1)},_colorViewConfig(){const N=this;return{value:N.option("value"),matchValue:N.option("value"),editAlphaChannel:N.option("editAlphaChannel"),applyValueMode:N.option("applyValueMode"),focusStateEnabled:N.option("focusStateEnabled"),stylingMode:this.option("stylingMode"),target:this._input(),onEnterKeyPressed(G){let{event:k}=G;N._colorViewEnterKeyPressed=!0,N._colorView.option("value")!==N.option("value")&&(N._saveValueChangeEvent(k),N._applyNewColor(N._colorView.option("value")),N.close())},onValueChanged(G){let{event:k,value:U,previousValue:B}=G;const K="instantly"===N.option("applyValueMode");D.makeRgba(U)===B||!K&&!N._colorViewEnterKeyPressed||N._shouldSaveEmptyValue||(k&&N._saveValueChangeEvent(k),N._applyNewColor(U))}}},_enterKeyHandler(N){const G=this._input().val(),{value:k,editAlphaChannel:U}=this.option(),B=k&&U?D.makeRgba(k):k;if(!G)return!1;if(!new W.A(G).colorIsInvalid){if(G!==B&&(this._applyColorFromInput(G),this._saveValueChangeEvent(N),this.option("value",this.option("editAlphaChannel")?D.makeRgba(G):G)),this._colorView){const J=this._colorView.option("value");k!==J&&(this._saveValueChangeEvent(N),this.option("value",J))}return this.close(),!1}this._input().val(B)},_applyButtonHandler(N){this._saveValueChangeEvent(N.event),this._applyNewColor(this._colorView.option("value")),this.callBase()},_cancelButtonHandler(){this._resetInputValue(),this.callBase()},_getKeyboardListeners(){return this.callBase().concat([this._colorView])},_init(){this.callBase()},_initMarkup(){this.$element().addClass("dx-colorbox"),this.callBase()},_renderInput(){this.callBase(),this._input().addClass("dx-colorbox-input"),this._renderColorPreview()},_renderColorPreview(){this.$element().wrapInner((0,P.A)("<div>").addClass("dx-colorbox-input-container")),this._$colorBoxInputContainer=this.$element().children().eq(0),this._$colorResultPreview=(0,P.A)("<div>").addClass("dx-colorbox-color-result-preview").appendTo(this._$textEditorInputContainer),this.option("value")?D.makeTransparentBackground(this._$colorResultPreview,this.option("value")):this._$colorBoxInputContainer.addClass(s)},_renderValue(){const{value:N,editAlphaChannel:G}=this.option(),U=N&&G?D.makeRgba(N):N;return this.option("text",U),this.callBase()},_resetInputValue(){const N=this._input(),G=this.option("value");N.val(G),this._updateColorViewValue(G)},_updateColorViewValue(N){this._colorView&&this._colorView.option({value:N,matchValue:N})},_valueChangeEventHandler(N){let G=this._input().val();G&&(G=this._applyColorFromInput(G),this._updateColorViewValue(G)),this.callBase(N,G)},_applyColorFromInput(N){const{editAlphaChannel:G}=this.option();return new W.A(N).colorIsInvalid?(this._resetInputValue(),this.option("value")):G?D.makeRgba(N):N},_clean(){this.callBase(),delete this._shouldSaveEmptyValue},_optionChanged(N){const{value:G}=N,{name:k}=N;switch(k){case"value":this._$colorBoxInputContainer.toggleClass(s,!G),G?D.makeTransparentBackground(this._$colorResultPreview,G):this._$colorResultPreview.removeAttr("style"),null===G&&(this._shouldSaveEmptyValue=!0),this._updateColorViewValue(G),this._shouldSaveEmptyValue=!1,this.callBase(N);break;case"applyButtonText":case"cancelButtonText":this.callBase(N),this._popup&&this._addPopupBottomClasses();break;case"editAlphaChannel":case"keyStep":this._colorView&&this._colorView.option(k,G);break;default:this.callBase(N)}}});(0,o.A)("dxColorBox",C);const L=C},784:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(8630).A},1175:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Ga});var W=M(6622),o=M(5737),P=M(3376),b=M(8736);const f=(0,o.A)({},P.Ay,b.A,{modules:[]});f.registerModule("columnHeaders",W.J);var T=M(3090),y=M(4169);f.registerModule("columns",{defaultOptions:()=>(0,T.X)(!0,{},y.a.defaultOptions(),{commonColumnSettings:{allowExporting:!0}}),controllers:y.a.controllers});var d=M(127),c=M(8483);let a=M(810).A;const u={extend(Fi){a=Fi(a)},create:Fi=>new a(Fi)};f.registerModule("data",{defaultOptions:c.X.defaultOptions,controllers:{data:class h extends c.P{_getDataSourceAdapter(){return u}_getSpecificDataSourceOption(){const ct=this.option("dataSource");return ct&&!Array.isArray(ct)&&this.option("keyExpr")&&d.A.log("W1011"),super._getSpecificDataSourceOption()}}}});var g=M(1282);f.registerModule("sorting",g.L);var _=M(2391);f.registerModule("rows",_.E);var w=M(5494);f.registerModule("contextMenu",w.pL);var D=M(7228);f.registerModule("errorHandling",D.y);var C=M(7992);f.registerModule("gridView",C.my);var I=M(8956);f.registerModule("headerPanel",I.k);var N=M(1973),G=M(5704),k=M(36),U=M(8181),B=M(1830),K=M(9212),J=M(1610);f.registerModulesOrder(["stateStoring","columns","selection","editorFactory","columnChooser","grouping","editing","editingRowBased","editingFormBased","editingCellBased","masterDetail","validating","adaptivity","data","virtualScrolling","columnHeaders","filterRow","headerPanel","headerFilter","sorting","search","rows","pager","columnsResizingReordering","contextMenu","keyboardNavigation","errorHandling","summary","columnFixing","export","gridView"]);class re extends J.A{_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:{platform:"ios"},options:{showRowLines:!0}},{device:()=>(0,K.Nt)(),options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0},selection:{showCheckBoxesMode:"always"}}},{device:()=>k.A.webkit,options:{loadingTimeout:30,loadPanel:{animation:{show:{easing:"cubic-bezier(1, 0, 1, 0)",duration:500,from:{opacity:0},to:{opacity:1}}}}}},{device:ct=>"desktop"!==ct.deviceType,options:{grouping:{expandMode:"rowClick"}}}])}_init(){super._init(),b.A.logHeaderFilterDeprecatedWarningIfNeed(this),f.processModules(this,f),f.callModuleItemsMethod(this,"init")}_initMarkup(){super._initMarkup.apply(this,arguments),this.getView("gridView").render(this.$element())}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,T.X)(this._deprecatedOptions,{useKeyboard:{since:"19.2",alias:"keyboardNavigation.enabled"},rowTemplate:{since:"21.2",message:'Use the "dataRowTemplate" option instead'}})}static registerModule(ct,Ut){f.registerModule(ct,Ut)}getGridCoreHelper(){return f}_getTemplate(ct){let Ut=ct;return(0,B.Kg)(Ut)&&Ut.startsWith("#")&&(Ut=(0,G.A)(ct),U.v.warn("Specifying grid templates with the jQuery selector name is now deprecated. Use the DOM Node or the jQuery object that references this selector instead.")),super._getTemplate(Ut)}focus(ct){this.getController("keyboardNavigation").focus(ct)}}(0,N.A)("dxDataGrid",re);const q=re;var Y=M(9262);f.registerModule("stateStoring",Y.u);var Z=M(3530);f.registerModule("selection",Z.nx);var Q=M(9820);f.registerModule("columnChooser",Q.CI);var z=M(5973),oe=M(6021),ae=M(2660),ee=M(1363),he=M(8360),de=M(8953),ue=M(1009),be=M(2614),ve=M(9916);function le(Fi,ct){const Ut=(0,ve.st)(ct.group),nn=[];for(let kn=0;kn<Fi.length;kn++)nn.push([Ut[kn].selector,"=",Fi[kn]]);return ct.filter&&nn.push(ct.filter),b.A.combineFilters(nn)}function Ce(Fi,ct,Ut){const nn=(0,ve.st)(ct.group);let kn=[];for(let si=Ut?Fi.length-1:0;si<Fi.length;si++){const vi=[];for(let Ni=0;Ni<=si;Ni++){const{selector:fo}=nn[Ni];if(si!==Ni||null!==Fi[Ni]&&!1!==Fi[Ni]&&!0!==Fi[Ni]){const Xi=[fo,si===Ni?nn[Ni].desc?">":"<":"=",Fi[Ni]];vi.push("<"===Xi[1]?[Xi,"or",[fo,"=",null]]:Xi)}else!1===Fi[Ni]?vi.push([fo,"=",!!nn[Ni].desc||null]):(Fi[Ni]?!nn[Ni].desc:nn[Ni].desc)?vi.push([fo,"<>",Fi[Ni]]):(vi.push([fo,"<>",null]),vi.push([fo,"=",null]))}kn.push(f.combineFilters(vi))}return kn=f.combineFilters(kn,"or"),f.combineFilters([kn,ct.filter])}const ye=function(Fi,ct){const{hash:Ut}=Fi;return Ut&&Ut[JSON.stringify(ct)]},ge=function(Fi,ct){let kn,Ut=0,nn=Fi.length-1;if(!Fi.length)return 0;do{const si=nn+Ut>>1;Fi[si].offset>ct?nn=si:Ut=si}while(nn-Ut>1);for(kn=Ut;kn<=nn&&!(Fi[kn].offset>ct);kn++);return kn},fe=function(Fi,ct,Ut){for(let nn=0;nn<Fi.length;nn++)ct+1>=Ut?Fi[nn].children=[]:fe(Fi[nn].children,ct+1,Ut)},xe=function(Fi,ct,Ut){let nn=0;if(ct)if(Ut)for(let kn=0;kn<ct.length;kn++)Fi.isGroupItemCountable(ct[kn])&&nn++,nn+=xe(Fi,ct[kn].items,Ut-1);else nn=ct.length;return nn};class Te{constructor(ct){this._dataSource=ct,this.reset()}reset(){this._groupsInfo=[],this._totalCountCorrection=0}totalCountCorrection(){return this._totalCountCorrection}updateTotalItemsCount(ct){this._totalCountCorrection=ct||0}isGroupItemCountable(ct){return!this._isVirtualPaging()||!ct.isContinuation}_isVirtualPaging(){const ct=this._dataSource.option("scrolling.mode");return"virtual"===ct||"infinite"===ct}itemsCount(){const Ut=this._dataSource._dataSource,nn=f.normalizeSortingInfo(Ut.group()||[]).length;return xe(this,Ut.items(),nn)}foreachGroups(ct,Ut,nn,kn,si){const vi=this;return function Ni(fo,Xi,Vo,Go){const Er=[];function Ts(rs,$r,Qa,Gs){const Vl=$r&&rs($r,Qa);return Vl&&Gs.push(Vl),Vl}for(let rs=0;rs<fo.length;rs++){if(Go.push(fo[rs].data),!Vo&&!1===Ts(Xi,fo[rs].data,Go,Er))return!1;if(!fo[rs].data||fo[rs].data.isExpanded||nn){const{children:$r}=fo[rs],Qa=$r.length&&Ni($r,Xi,Vo,Go);if(Qa&&Er.push(Qa),!1===Qa)return!1}if(Vo&&!1===Ts(Xi,fo[rs].data,Go,Er))return!1;(!fo[rs].data||fo[rs].data.offset!==fo[rs].offset)&&(kn=!0),Go.pop()}const ms=si&&Go.slice(0);return kn&&oe.z7.apply(G.A,Er).always(()=>{vi._updateGroupInfoOffsets(fo,ms)})}(vi._groupsInfo,ct,Ut,[])}_updateGroupInfoOffsets(ct,Ut){Ut=Ut||[];for(let nn=0;nn<ct.length;nn++){const kn=ct[nn];if(kn.data&&kn.data.offset!==kn.offset){kn.offset=kn.data.offset;for(let si=0;si<Ut.length;si++)Ut[si].offset=kn.offset}}ct.sort((nn,kn)=>nn.offset-kn.offset)}findGroupInfo(ct){let Ut,nn=this._groupsInfo;for(let kn=0;nn&&kn<ct.length;kn++)Ut=ye(nn,ct[kn]),nn=Ut&&Ut.children;return Ut&&Ut.data}addGroupInfo(ct){const Ut=this;let nn;const{path:kn}=ct;let si=Ut._groupsInfo;for(let vi=0;vi<kn.length;vi++){if(nn=ye(si,kn[vi]),!nn){nn={key:kn[vi],offset:ct.offset,data:{offset:ct.offset,isExpanded:!0,path:kn.slice(0,vi+1)},children:[]};const Ni=ge(si,ct.offset);si.splice(Ni,0,nn),si.hash=si.hash||{},si.hash[JSON.stringify(nn.key)]=nn}vi===kn.length-1&&(nn.data=ct,nn.offset!==ct.offset&&Ut._updateGroupInfoOffsets(si)),si=nn.children}}allowCollapseAll(){return!0}refresh(ct){const Ut=this,{storeLoadOptions:nn}=ct,kn=(0,ve.st)(nn.group||[]),si="_group"in Ut?(0,ve.st)(Ut._group||[]):kn;let vi=Math.min(si.length,kn.length);Ut._group=nn.group;for(let Ni=0;Ni<vi;Ni++)if(si[Ni].selector!==kn[Ni].selector){vi=Ni;break}vi?fe(Ut._groupsInfo,0,vi):Ut.reset()}handleDataLoading(){}handleDataLoaded(ct,Ut){Ut(ct)}handleDataLoadedCore(ct,Ut){Ut(ct)}}function Ee(Fi,ct,Ut,nn){if(nn=nn||0,ct>1&&Ut>0){let kn=Fi-Math.floor(Fi/ct)*ct||ct;return kn+=Ut-nn-2,kn<0&&(kn+=ct),Math.floor(kn/(ct-nn-1))}return 0}const Oe=function(Fi,ct,Ut){return Fi.foreachGroups((nn,kn)=>{if(nn.isExpanded)return ct(nn,kn)},!0,!1,Ut,Ut)},ze=function(Fi,ct,Ut,nn,kn,si,vi){let Ni;if(nn.items=nn.items||[],nn.paths=nn.paths||[],nn.count=nn.count||0,nn.lastCount=nn.lastCount||0,Ut)for(let fo=0;fo<ct.length;fo++){const Xi=ct[fo];if(void 0!==Xi.items){if(kn.push(Xi.key),si)Ni=!0;else{const Vo=Fi.findGroupInfo(kn);Ni=Vo&&Vo.isExpanded}Ni?Xi.items?ze(Fi,Xi.items,Ut-1,nn,kn,si,vi):1===Ut&&Xi.count&&(!si||vi)&&(nn.items.push(Xi),nn.paths.push(kn.slice(0)),nn.count+=nn.lastCount,nn.lastCount=Xi.count):(Xi.collapsedItems=Xi.items,Xi.items=null),kn.pop()}}},$e=function(Fi,ct,Ut,nn,kn){const si=Fi.findGroupInfo(nn);let vi;si?(Ut?si.count=ct.count>0?ct.count:ct.items&&ct.items.length||0:ct.count=si.count||ct.count,si.offset=kn):(Ut&&(vi=ct.count>0?ct.count:ct.items.length),Fi.addGroupInfo({isExpanded:Fi._isGroupExpanded(nn.length-1),path:nn.slice(0),offset:kn,count:vi||0}))},Be=function(Fi,ct,Ut,nn,kn,si,vi){const fo=(ct.group?ct.group.length:0)===nn;let Er,Vo=0,Go=0;if(kn=kn||0,si=si||[],ct.remoteOperations.paging&&!vi&&(Vo=0===kn?ct.skip||0:ct.skips[kn-1]||0),kn>=nn)return Ut.length;for(let Ts=0;Ts<Ut.length;Ts++){const ms=Ut[Ts];if(ms){if(si.push(ms.key),!ms.count&&!ms.items||void 0===ms.items||($e(Fi,ms,fo,si,Vo+Ts),Er=ms.items?Be(Fi,ct,ms.items,nn,kn+1,si,Ts):ms.count||-1,Er<0))return-1;Go+=Er,si.pop()}}return Go},Ue=function(Fi,ct){return Fi&&Fi.length&&Fi[ct]&&!!Fi[ct].isExpanded},ot=function(Fi,ct,Ut){let nn,kn=Ut;for(let si=0;si<Fi.length;si++)nn=Fi[si].offset+1,si>0&&(nn+=Fi[si-1].childrenTotalCount,ct&&(nn+=Ee(kn,ct,nn,si-1)*si)),kn+=nn;return kn};function st(Fi,ct,Ut,nn){const kn=ct.items[nn],si=Fi.skips&&Fi.skips[Ut],vi=Fi.takes&&Fi.takes[Ut],Ni=nn===ct.items.length-1,fo=0===nn,Vo=kn.count>vi+(fo&&si||0);fo&&void 0!==si&&(kn.isContinuation=!0),Ni&&void 0!==vi&&Vo&&(kn.isContinuationOnNextPage=!0)}function Ke(Fi){return!Array.isArray(Fi)}function Ye(Fi){Ke(Fi.data)||(Fi.data=new oe.cY)}function Pe(Fi,ct,Ut,nn,kn,si){ct.isCustomLoading||(ze(Fi,si,Ut,nn={},[]),function et(Fi,ct,Ut){const nn=Ut-1,kn=Fi.group?Fi.group.length:0;ct.skip=Fi.skips&&Fi.skips[nn],Fi.takes&&void 0!==Fi.takes[nn]&&(ct.take=kn===Ut&&ct.count?ct.count-(ct.skip||0):0,ct.take+=Fi.takes[nn])}(ct,nn,Ut)),nn.paths.length&&(ct.group?ct.group.length:0)-Ut>0?(Ye(ct),function Se(Fi,ct,Ut,nn,kn,si){const vi=ct.group||[],Ni=vi[kn+1],fo=[];(0,ae.__)(Ut.paths,Xi=>{var Vo;const Go={requireTotalCount:!1,requireGroupCount:!0,group:[Ni],groupSummary:ct.storeLoadOptions.groupSummary,filter:le(Ut.paths[Xi],{filter:ct.storeLoadOptions.filter,group:vi}),select:ct.storeLoadOptions.select,langParams:null===(Vo=ct.storeLoadOptions)||void 0===Vo?void 0:Vo.langParams};0===Xi&&(Go.skip=Ut.skip||0),Xi===Ut.paths.length-1&&(Go.take=Ut.take);const Er=0===Go.take?[]:Fi._dataSource.loadFromStore(Go);(0,oe.z7)(Er).done(Ts=>{const ms=Ut.items[Xi];st(ct,Ut,kn,Xi),ms.items=Ts}),fo.push(Er)}),oe.z7.apply(null,fo).done(()=>{Be(Fi,ct,si,nn+1),Pe(Fi,ct,nn+1,Ut,kn+1,si)})}(Fi,ct,nn,Ut,kn,si)):nn.paths.length&&ct.storeLoadOptions.group?(Ye(ct),function Re(Fi,ct,Ut,nn){const kn=[],si=ct.group||[];(0,ae.__)(Ut.paths,(Xi,Vo)=>{kn.push(le(Vo,{group:ct.isCustomLoading?ct.storeLoadOptions.group:si}))});let{filter:vi}=ct.storeLoadOptions;ct.storeLoadOptions.isLoadingAll||(vi=f.combineFilters([vi,f.combineFilters(kn,"or")]));const Ni=(0,T.X)({},ct.storeLoadOptions,{requireTotalCount:!1,requireGroupCount:!1,group:null,sort:si.concat(f.normalizeSortingInfo(ct.storeLoadOptions.sort||[])),filter:vi}),fo=Fi._dataSource.isLastLevelGroupItemsPagingLocal();fo||(Ni.skip=Ut.skip,Ni.take=Ut.take),(0,oe.z7)(0===Ut.take?[]:Fi._dataSource.loadFromStore(Ni)).done(Xi=>{fo&&(Xi=Fi._dataSource.sortLastLevelGroupItems(Xi,si,Ut.paths),Xi=Ut.skip?Xi.slice(Ut.skip):Xi,Xi=Ut.take?Xi.slice(0,Ut.take):Xi),(0,ae.__)(Ut.items,(Vo,Go)=>{const Ts=Xi.splice(0,Go.count-(0===Vo&&Ut.skip||0));st(ct,Ut,si.length-1,Vo),Go.items=Ts}),ct.data.resolve(nn)}).fail(ct.data.reject)}(Fi,ct,nn,si)):Ke(ct.data)&&ct.data.resolve(si)}const Fe=function(Fi,ct){const Ut=new oe.cY,nn=!(!ct.group||!ct.group.length),kn=(0,T.X)({skip:0,take:1,requireGroupCount:nn,requireTotalCount:!nn},ct,{group:nn?ct.group:null});return Fi.load(kn).done((si,vi)=>{const Ni=vi&&(nn?vi.groupCount:vi.totalCount);isFinite(Ni)?Ut.resolve(Ni):Ut.reject(be.sO.Error(nn?"E4022":"E4021"))}).fail(Ut.reject.bind(Ut)),Ut};class Xe extends Te{updateTotalItemsCount(ct){let Ut=0;const nn=ct.extra&&ct.extra.totalCount||0,kn=ct.extra&&ct.extra.groupCount||0,si=this._dataSource.pageSize(),vi=this._isVirtualPaging();Oe(this,Ni=>{Ni.childrenTotalCount=0}),Oe(this,(Ni,fo)=>{const Xi=ot(fo,vi?0:si,Ut);let Vo=Ni.count+Ni.childrenTotalCount;vi||(Vo+=Ee(Xi,si,Vo,fo.length-1)),fo[fo.length-2]?fo[fo.length-2].childrenTotalCount+=Vo:Ut+=Vo}),super.updateTotalItemsCount(Ut-nn+kn)}_isGroupExpanded(ct){const Ut=this._dataSource.group();return Ue(Ut,ct)}_updatePagingOptions(ct,Ut){const kn=this._isVirtualPaging(),si=this._dataSource.pageSize(),vi=[],Ni=[];let fo=0,Xi=0;ct.take&&(Oe(this,Vo=>{Vo.childrenTotalCount=0,Vo.skipChildrenTotalCount=0}),Oe(this,(Vo,Go)=>{let Er,Ts=0,ms=0;const rs=ot(Go,kn?0:si,Xi);let $r=0,Qa=0,Gs=Vo.count+Vo.childrenTotalCount,Vl=Gs;Ut&&Ut(Vo,rs);const Ma=ct.skip-rs;rs<=ct.skip+ct.take&&Gs&&(Er=ct.take,kn||($r=Ee(rs,si,Gs,Go.length-1),Gs+=$r*Go.length,Vl+=$r,si&&Ma>=0&&(Ts=Go.length,ms=Go.length-1,Qa=Math.floor(Ma/si))),Ma>=0?(rs+Gs>ct.skip&&vi.unshift(Ma-Qa*Ts-Vo.skipChildrenTotalCount),rs+Gs>=ct.skip+Er&&Ni.unshift(Er-Ts-Vo.childrenTotalCount+Vo.skipChildrenTotalCount)):rs+Gs>=ct.skip+Er&&Ni.unshift(Er+Ma-Vo.childrenTotalCount)),rs<=ct.skip&&(Go[Go.length-2]?Go[Go.length-2].skipChildrenTotalCount+=Math.min(Vl,Ma+1-Qa*ms):fo+=Math.min(Vl,Ma+1)),rs<=ct.skip+Er&&(Gs=Math.min(Vl,Ma+Er-(Qa+1)*ms),Go[Go.length-2]?Go[Go.length-2].childrenTotalCount+=Gs:Xi+=Gs)}),ct.skip-=fo,ct.take-=Xi-fo),ct.skips=vi,ct.takes=Ni}changeRowExpand(ct){const Ut=this.findGroupInfo(ct),nn=this._dataSource,kn=nn.remoteOperations().groupPaging,si=f.normalizeSortingInfo(nn.group());return Ut?(Ut.isExpanded=!Ut.isExpanded,kn&&Ut.isExpanded&&ct.length<si.length?Fe(nn,{filter:le(ct,{filter:nn.lastLoadOptions().filter,group:nn.group()}),group:[si[ct.length]],select:nn.select()}).done(vi=>{Ut.count=vi}):(new oe.cY).resolve()):(new oe.cY).reject()}handleDataLoading(ct){const Ut=this,{storeLoadOptions:nn}=ct,kn=f.normalizeSortingInfo(nn.group||ct.loadOptions.group);if(!ct.isCustomLoading&&kn.length){if(ct.remoteOperations.grouping){const si=Ut._dataSource.remoteOperations().paging;nn.group=f.normalizeSortingInfo(nn.group),nn.group.forEach((vi,Ni)=>{vi.isExpanded=!(si&&Ni===nn.group.length-1)})}ct.group=ct.group||kn,ct.remoteOperations.paging?(ct.skip=nn.skip,ct.take=nn.take,nn.requireGroupCount=!0,nn.group=kn.slice(0,1),Ut._updatePagingOptions(ct),nn.skip=ct.skip,nn.take=ct.take):(ct.skip=ct.loadOptions.skip,ct.take=ct.loadOptions.take,Ut._updatePagingOptions(ct))}}handleDataLoadedCore(ct,Ut){const nn=this,kn=f.normalizeSortingInfo(ct.storeLoadOptions.group||ct.loadOptions.group).length,si=ct.group?ct.group.length:0;let vi;const Ni={};if(ct.isCustomLoading)Ut(ct),ze(nn,ct.data,kn,Ni,[],ct.isCustomLoading,ct.storeLoadOptions.isLoadingAll);else{if(ct.remoteOperations.paging||nn.foreachGroups(fo=>{fo.count=0}),vi=Be(nn,ct,ct.data,kn),vi<0)return void(ct.data=(new oe.cY).reject(d.A.Error("E1037")));if(ct.remoteOperations.paging||kn&&ct.extra&&ct.loadOptions.requireTotalCount&&(ct.extra.totalCount=vi,ct.extra.groupCount=ct.data.length),si&&ct.storeLoadOptions.requireGroupCount&&!isFinite(ct.extra.groupCount))return void(ct.data=(new oe.cY).reject(be.sO.Error("E4022")));nn.updateTotalItemsCount(ct),ct.remoteOperations.paging||(nn._updatePagingOptions(ct),ct.lastLoadOptions.skips=ct.skips,ct.lastLoadOptions.takes=ct.takes),Ut(ct),ct.remoteOperations.paging||nn._processPaging(ct,kn)}Pe(nn,ct,kn,Ni,0,ct.data)}_processSkips(ct,Ut,nn){if(!nn)return;const kn=ct[0],si=Ut[0],vi=kn&&kn.items;void 0!==si&&(kn.isContinuation=!0,vi&&(kn.items=vi.slice(si),this._processSkips(kn.items,Ut.slice(1),nn-1)))}_processTakes(ct,Ut,nn,kn,si){if(!kn||!ct)return;si=si||[];const vi=ct[ct.length-1];let Ni=vi&&vi.items;const fo=nn[0];vi&&(void 0!==fo&&(vi.count-(vi.isContinuation&&Ut[0]||0)||Ni.length)>fo&&(vi.isContinuationOnNextPage=!0,si.forEach(Go=>{Go.isContinuationOnNextPage=!0}),Ni&&(Ni=Ni.slice(0,fo),vi.items=Ni)),si.push(vi),this._processTakes(Ni,Ut.slice(1),nn.slice(1),kn-1,si))}_processPaging(ct,Ut){this._processSkips(ct.data,ct.skips,Ut),this._processTakes(ct.data,ct.skips,ct.takes,Ut)}isLastLevelGroupItemsPagingLocal(){return!1}sortLastLevelGroupItems(ct){return ct}refresh(ct,Ut){const nn=this,kn=nn._dataSource,{storeLoadOptions:si}=ct,vi=ct.group||ct.storeLoadOptions.group,Ni=f.normalizeSortingInfo(nn._group);let fo,Xi;function Vo(Go,Er){Er.length===Xi+1&&(Go.isExpanded=fo)}for(Xi=0;Xi<Ni.length;Xi++)fo=Ue(vi,Xi),Ue(nn._group,Xi)!==fo&&nn.foreachGroups(Vo);if(super.refresh.apply(this,arguments),vi&&ct.remoteOperations.paging&&Ut.reload)return Oe(nn,Go=>{const Er=Fe(kn,{filter:le(Go.path,{filter:si.filter,group:vi}),group:vi.slice(Go.path.length),select:si.select}),Ts=Fe(kn,{filter:Ce(Go.path,{filter:si.filter,group:vi},!0),group:vi.slice(Go.path.length-1,Go.path.length),select:si.select});return(0,oe.z7)(Ts,Er).done((ms,rs)=>{ms=parseInt(ms.length?ms[0]:ms),rs=parseInt(rs.length?rs[0]:rs),Go.offset=ms,Go.count!==rs&&(Go.count=rs,nn.updateTotalItemsCount(ct))})},!0)}}var tt=M(4270),vt=M(1541),qe=M(1435);const At=function(Fi,ct){const Ut=new oe.cY,nn=(0,T.X)({skip:0,take:1,requireTotalCount:!0},ct);return Fi.load(nn).done((kn,si)=>{Ut.resolve(si&&si.totalCount)}).fail(Ut.reject.bind(Ut)),Ut},Tt=function(Fi,ct,Ut){return Fi.foreachGroups(nn=>{if(!nn.isExpanded)return ct(nn)},!1,!1,Ut,!0)},qt=function(Fi,ct){let Ut=0,nn=ct||0;return ct&&(Tt(Fi,kn=>{if(kn.offset-Ut>=ct)return!1;Ut+=kn.count-1}),nn+=Ut),nn},wt=function(Fi,ct,Ut,nn,kn,si){let vi=0,Ni=!1;for(let fo=0;fo<ct.length;fo++){const Xi=ct[fo];if(void 0!==Xi.items){Ut.push(Xi.key);const Vo=Fi.findGroupInfo(Ut);if(Vo&&!Vo.isExpanded)Xi.collapsedItems=Xi.items,Xi.items=null,nn+=Vo.count,--si<0&&vi++,kn&&(Ni=!0);else if(Xi.items){const Go=wt(Fi,Xi.items,Ut,nn,kn,si);kn&&(Go.offset-nn>1?Xi.isContinuation=!0:Ni=!0),nn=Go.offset,(si=Go.take)<0&&(Xi.items.length?Xi.isContinuationOnNextPage=!0:vi++)}Ut.pop()}else kn&&(Ni=!0),nn++,--si<0&&vi++;kn=!1}return Ni&&ct.splice(0,1),vi&&ct.splice(-vi,vi),{offset:nn,take:si}},En=function(Fi,ct){if(Fi.length!==ct.length)return!1;for(let Ut=0;Ut<Fi.length;Ut++)if(!(0,ve.t7)(null,Fi[Ut],ct[Ut]))return!1;return!0},ri=function(Fi,ct,Ut,nn,kn){if(ct){for(let si=0;si<ct.length;si++){const vi=ct[si];if("key"in vi&&void 0!==vi.items){Ut.push(vi.key),kn&&En(kn.path,Ut)&&!vi.isContinuation&&(kn.offset=nn);const Ni=Fi.findGroupInfo(Ut);Ni&&!vi.isContinuation&&(Ni.offset=nn),Ni&&!Ni.isExpanded?nn+=Ni.count:nn=ri(Fi,vi.items,Ut,nn,kn),Ut.pop()}else nn++}return nn}},wi=function(Fi,ct){let Ut=Fi.count||Fi.items.length;if(!Fi.count&&ct>1){Ut=0;for(let nn=0;nn<Fi.items.length;nn++)Ut+=wi(Fi.items[nn],ct-1)}return Ut};class Bn extends Te{handleDataLoading(ct){const{storeLoadOptions:Ut}=ct,nn=[];let vi,kn=0,si=!1;const{group:Ni}=ct.loadOptions;let fo=0;if(function(Fi,ct){if(ct.group){const Ut=f.normalizeSortingInfo(ct.group),nn=f.normalizeSortingInfo(Fi.sort);Fi.sort=qe.A.arrangeSortingInfo(Ut,nn),delete ct.group}}(Ut,ct.loadOptions),ct.group=ct.group||Ni,ct.isCustomLoading)return;const Xi=(0,T.X)({},Ut);Xi.skip=qt(this,Ut.skip),Xi.skip&&Xi.take&&Ni&&(Xi.skip--,Xi.take++,si=!0),Xi.take&&Ni&&(vi=Xi.take,Xi.take++),Tt(this,Vo=>{if(Vo.offset>=Xi.skip+Xi.take+fo)return!1;Vo.offset>=Xi.skip+fo&&Vo.count&&(fo+=Vo.count-1,nn.push(Vo),kn+=Vo.count)}),(0,ae.__)(nn,function(){Xi.filter=function(Fi,ct,Ut){const nn=f.normalizeSortingInfo(Ut||ct.group);let kn=[];for(let si=0;si<Fi.length;si++){const vi=[];for(let Ni=0;Ni<=si;Ni++)vi.push([nn[Ni].selector,si===Ni?"<>":"=",Fi[Ni]]);kn.push(f.combineFilters(vi))}return kn=f.combineFilters(kn,"or"),f.combineFilters([kn,ct.filter])}(this.path,Xi,Ni)}),ct.storeLoadOptions=Xi,ct.collapsedGroups=nn,ct.collapsedItemsCount=kn,ct.skip=Xi.skip||0,ct.skipFirstItem=si,ct.take=vi}handleDataLoaded(ct,Ut){const nn=this,{collapsedGroups:kn}=ct,si=f.normalizeSortingInfo(ct.group),vi=si.length;function Ni(fo,Xi,Vo,Go,Er){if(!fo||!Xi.length||!Vo.length)return;let Ts,ms;const rs=(0,tt.ao)(Xi[0],!0);for(ms=0;ms<fo.length&&(Ts=(0,tt.ao)(fo[ms].key,!0),!(Er>=Go.offset||rs===Ts));ms++)Er+=wi(fo[ms],Vo.length);(!fo.length||rs!==Ts)&&fo.splice(ms,0,{key:Xi[0],items:[],count:1===Xi.length?Go.count:void 0}),Ni(fo[ms].items,Xi.slice(1),Vo.slice(1),Go,Er)}if(ct.collapsedItemsCount&&ct.extra&&ct.extra.totalCount>=0&&(ct.extra._totalCountWasIncreasedByCollapsedItems||(ct.extra.totalCount+=ct.collapsedItemsCount,ct.extra._totalCountWasIncreasedByCollapsedItems=!0)),Ut(ct),vi){let{data:fo}=ct;const Xi=(0,vt.A)(fo);if(qe.A.multiLevelGroup(Xi,si).enumerate().done(Vo=>{fo=Vo}),kn)for(let Vo=0;Vo<kn.length;Vo++)Ni(fo,kn[Vo].path,si,kn[Vo],ct.skip);ct.isCustomLoading||wt(nn,fo,[],ct.skip,ct.skipFirstItem,ct.take),ct.data=fo}}isGroupItemCountable(ct){return null===ct.items}updateTotalItemsCount(){let ct=0;Tt(this,Ut=>{Ut.count&&(ct-=Ut.count-1)}),super.updateTotalItemsCount(ct)}changeRowExpand(ct){const Ut=this,nn=Ut._dataSource,kn=nn.beginPageIndex?nn.beginPageIndex():nn.pageIndex(),si=nn.items(),vi=qt(Ut,kn*nn.pageSize());let fo,Ni=Ut.findGroupInfo(ct);return fo=Ni&&!Ni.isExpanded?(new oe.cY).resolve(Ni.count):At(nn,{filter:le(ct,{filter:nn.filter(),group:nn.group()})}),(0,oe.z7)(fo).done(Xi=>{Xi=parseInt(Xi.length?Xi[0]:Xi),Ni?(ri(Ut,si,[],vi),Ni.isExpanded=!Ni.isExpanded,Ni.count=Xi):(Ni={offset:-1,count:Xi,path:ct,isExpanded:!1},ri(Ut,si,[],vi,Ni),Ni.offset>=0&&Ut.addGroupInfo(Ni)),Ut.updateTotalItemsCount()}).fail(function(){nn._eventsStrategy.fireEvent("loadError",arguments)})}allowCollapseAll(){return!1}refresh(ct,Ut){const nn=this,{storeLoadOptions:kn}=ct,si=nn._dataSource;if(super.refresh.apply(this,arguments),Ut.reload)return Tt(nn,vi=>{const Ni=At(si,{filter:le(vi.path,kn)}),fo=At(si,{filter:Ce(vi.path,kn)});return(0,oe.z7)(fo,Ni).done((Xi,Vo)=>{Xi=parseInt(Xi.length?Xi[0]:Xi),Vo=parseInt(Vo.length?Vo[0]:Vo),vi.offset=Xi,vi.count!==Vo&&(vi.count=Vo,nn.updateTotalItemsCount())})},!0)}}u.extend(Fi=>class extends Fi{init(){super.init.apply(this,arguments),this._initGroupingHelper()}_initGroupingHelper(ct){const Ut=this._grouping,nn=this.option("grouping.autoExpandAll"),kn=this.option("focusedRowEnabled"),si=ct?ct.remoteOperations:this.remoteOperations();si.filtering&&si.sorting&&si.paging&&!si.grouping&&(nn||!kn)?(!Ut||Ut instanceof Xe)&&(this._grouping=new Bn(this)):(!Ut||Ut instanceof Bn)&&(this._grouping=new Xe(this))}totalItemsCount(){const ct=super.totalItemsCount();return ct>0&&this._dataSource.group()&&this._dataSource.requireTotalCount()?ct+this._grouping.totalCountCorrection():ct}itemsCount(){return this._dataSource.group()?this._grouping.itemsCount()||0:super.itemsCount.apply(this,arguments)}allowCollapseAll(){return this._grouping.allowCollapseAll()}isGroupItemCountable(ct){return this._grouping.isGroupItemCountable(ct)}isRowExpanded(ct){const Ut=this._grouping.findGroupInfo(ct);return Ut?Ut.isExpanded:!this._grouping.allowCollapseAll()}collapseAll(ct){return this._collapseExpandAll(ct,!1)}expandAll(ct){return this._collapseExpandAll(ct,!0)}_collapseExpandAll(ct,Ut){const nn=this,kn=nn._dataSource,si=kn.group(),vi=f.normalizeSortingInfo(si||[]);if(vi.length){for(let Ni=0;Ni<vi.length;Ni++)void 0===ct||ct===Ni?vi[Ni].isExpanded=Ut:si&&si[Ni]&&(vi[Ni].isExpanded=si[Ni].isExpanded);kn.group(vi),nn._grouping.foreachGroups((Ni,fo)=>{(void 0===ct||ct===fo.length-1)&&(Ni.isExpanded=Ut)},!1,!0),nn.resetPagesCache()}return!0}refresh(){return super.refresh.apply(this,arguments),this._grouping.refresh.apply(this._grouping,arguments)}changeRowExpand(ct){const nn=this._dataSource;if(nn.group())return nn.beginLoading(),this._lastLoadOptions&&(this._lastLoadOptions.groupExpand=!0),this._changeRowExpandCore(ct).always(()=>{nn.endLoading()})}_changeRowExpandCore(ct){return this._grouping.changeRowExpand(ct)}_hasGroupLevelsExpandState(ct,Ut){if(ct&&Array.isArray(ct))for(let nn=0;nn<ct.length;nn++)if(ct[nn].isExpanded===Ut)return!0}_customizeRemoteOperations(ct,Ut){const{remoteOperations:nn}=ct;ct.storeLoadOptions.group?(nn.grouping&&!ct.isCustomLoading&&(!nn.groupPaging||this._hasGroupLevelsExpandState(ct.storeLoadOptions.group,!0))&&(nn.paging=!1),!nn.grouping&&(!nn.sorting||!nn.filtering||ct.isCustomLoading||this._hasGroupLevelsExpandState(ct.storeLoadOptions.group,!1))&&(nn.paging=!1)):!ct.isCustomLoading&&nn.paging&&Ut.grouping&&this.resetCache(),super._customizeRemoteOperations.apply(this,arguments)}_handleDataLoading(ct){return super._handleDataLoading(ct),this._initGroupingHelper(ct),this._grouping.handleDataLoading(ct)}_handleDataLoaded(ct){return this._grouping.handleDataLoaded(ct,super._handleDataLoaded.bind(this))}_handleDataLoadedCore(ct){return this._grouping.handleDataLoadedCore(ct,super._handleDataLoadedCore.bind(this))}});const Nt=function(Fi,ct){const Ut=this._columnsController;switch(ct.itemData.value){case"group":{const nn=Ut._dataSource.group()||[];Ut.columnOption(Fi.dataField,"groupIndex",nn.length);break}case"ungroup":Ut.columnOption(Fi.dataField,"groupIndex",-1);break;case"ungroupAll":this.component.clearGrouping()}},Gt=Fi=>{const ct=Fi?.visible;return"auto"===ct?"desktop"===z.A.current().deviceType:!!ct},on=(Fi,ct)=>Gt(Fi)&&!(!Fi?.allowColumnDragging||!ct.allowGrouping);f.registerModule("grouping",{defaultOptions:()=>({grouping:{autoExpandAll:!0,allowCollapsing:!0,contextMenuEnabled:!1,expandMode:"buttonClick",texts:{groupContinuesMessage:he.A.format("dxDataGrid-groupContinuesMessage"),groupContinuedMessage:he.A.format("dxDataGrid-groupContinuedMessage"),groupByThisColumn:he.A.format("dxDataGrid-groupHeaderText"),ungroup:he.A.format("dxDataGrid-ungroupHeaderText"),ungroupAll:he.A.format("dxDataGrid-ungroupAllText")}},groupPanel:{visible:!1,emptyPanelText:he.A.format("dxDataGrid-groupPanelEmptyText"),allowColumnDragging:!0}}),extenders:{controllers:{data:Fi=>class extends Fi{init(){super.init(),this.createAction("onRowExpanding"),this.createAction("onRowExpanded"),this.createAction("onRowCollapsing"),this.createAction("onRowCollapsed")}_beforeProcessItems(ct){const Ut=this._columnsController.getGroupColumns();return(ct=super._beforeProcessItems(ct)).length&&Ut.length&&(ct=this._processGroupItems(ct,Ut.length)),ct}_processItem(ct,Ut){return(0,B.O9)(ct.groupIndex)&&(0,B.Kg)(ct.rowType)&&0===ct.rowType.indexOf("group")?(ct=this._processGroupItem(ct,Ut),Ut.dataIndex=0):ct=super._processItem.apply(this,arguments),ct}_processGroupItem(ct,Ut){return ct}_processGroupItems(ct,Ut,nn){const kn=this,si=kn._columnsController.getGroupColumns(),vi=si[si.length-Ut];if(!nn){const fo=kn.option("scrolling.mode");nn={collectContinuationItems:"virtual"!==fo&&"infinite"!==fo,resultItems:[],path:[],values:[]}}const{resultItems:Ni}=nn;if(nn.data&&(nn.collectContinuationItems||!nn.data.isContinuation)&&Ni.push({rowType:"group",data:nn.data,groupIndex:nn.path.length-1,isExpanded:!!nn.data.items,key:nn.path.slice(0),values:nn.values.slice(0)}),ct)if(0===Ut)Ni.push.apply(Ni,ct);else for(let fo=0;fo<ct.length;fo++){const Xi=ct[fo];Xi&&"items"in Xi?(nn.data=Xi,nn.path.push(Xi.key),nn.values.push(vi&&vi.deserializeValue&&!vi.calculateDisplayValue?vi.deserializeValue(Xi.key):Xi.key),kn._processGroupItems(Xi.items,Ut-1,nn),nn.data=void 0,nn.path.pop(),nn.values.pop()):Ni.push(Xi)}return Ni}publicMethods(){return super.publicMethods().concat(["collapseAll","expandAll","isRowExpanded","expandRow","collapseRow"])}collapseAll(ct){const Ut=this._dataSource;Ut&&Ut.collapseAll(ct)&&(Ut.pageIndex(0),Ut.reload())}expandAll(ct){const Ut=this._dataSource;Ut&&Ut.expandAll(ct)&&(Ut.pageIndex(0),Ut.reload())}changeRowExpand(ct){const Ut=this,nn=Ut.isRowExpanded(ct),kn={key:ct,expanded:nn};return Ut.executeAction(nn?"onRowCollapsing":"onRowExpanding",kn),kn.cancel?(new oe.cY).resolve():(0,oe.z7)(Ut._changeRowExpandCore(ct)).done(()=>{kn.expanded=!nn,Ut.executeAction(nn?"onRowCollapsed":"onRowExpanded",kn)})}_changeRowExpandCore(ct){const Ut=this,nn=this._dataSource,kn=new oe.cY;return nn?(0,oe.z7)(nn.changeRowExpand(ct)).done(()=>{Ut.load().done(kn.resolve).fail(kn.reject)}).fail(kn.reject):kn.resolve(),kn}isRowExpanded(ct){const Ut=this._dataSource;return Ut&&Ut.isRowExpanded(ct)}expandRow(ct){return this.isRowExpanded(ct)?(new oe.cY).resolve():this.changeRowExpand(ct)}collapseRow(ct){return this.isRowExpanded(ct)?this.changeRowExpand(ct):(new oe.cY).resolve()}optionChanged(ct){"grouping"===ct.name&&(ct.name="dataSource"),super.optionChanged(ct)}},columns:Fi=>class extends Fi{_getExpandColumnOptions(){const ct=super._getExpandColumnOptions.apply(this,arguments);return ct.cellTemplate=f.getExpandCellTemplate(),ct}},editing:Fi=>class extends Fi{_isProcessedItem(ct){return(0,B.O9)(ct.groupIndex)&&(0,B.Kg)(ct.rowType)&&0===ct.rowType.indexOf("group")}}},views:{headerPanel:Fi=>class extends Fi{_getToolbarItems(){const ct=super._getToolbarItems();return this._appendGroupingItem(ct)}_appendGroupingItem(ct){if(this._isGroupPanelVisible()){let Ut=!1;ct.push({template:()=>{const kn=(0,G.A)("<div>").addClass("dx-datagrid-group-panel");return this._updateGroupPanelContent(kn),(0,ue.j)("groupPanel",this,kn,void 0,this._handleActionKeyDown.bind(this)),kn},name:"groupPanel",onItemRendered:()=>{Ut&&this.renderCompleted.fire(),Ut=!0},location:"before",locateInMenu:"never",sortIndex:1}),this.updateToolbarDimensions()}return ct}_handleActionKeyDown(ct){const{event:Ut}=ct,nn=(0,G.A)(Ut.target),kn=nn.closest(".dx-group-panel-item").index(),si=this._columnsController.getGroupColumns()[kn],vi=si&&si.index;nn.is(".dx-header-filter")?this._headerFilterController.showHeaderFilterMenu(vi,!0):this._processGroupItemAction(vi),Ut.preventDefault()}_isGroupPanelVisible(){return Gt(this.option("groupPanel"))}_renderGroupPanelItems(ct,Ut){const nn=this;ct.empty(),(0,ae.__)(Ut,(kn,si)=>{nn._createGroupPanelItem(ct,si)}),(0,de.Dy)(this)}_createGroupPanelItem(ct,Ut){const nn=(0,G.A)("<div>").addClass(Ut.cssClass).addClass("dx-group-panel-item").data("columnData",Ut).appendTo(ct).text(Ut.caption);return(0,de.Mo)(this,nn),nn}_columnOptionChanged(ct){if(!this._requireReady&&!f.checkChanges(ct.optionNames,["width","visibleWidth"])){const Ut=this.element(),nn=Ut&&Ut.find(".dx-datagrid-group-panel");nn&&nn.length&&(this._updateGroupPanelContent(nn),this.updateToolbarDimensions(),this.renderCompleted.fire())}super._columnOptionChanged()}_updateGroupPanelContent(ct){const Ut=this.getColumns(),nn=this.option("groupPanel");this._renderGroupPanelItems(ct,Ut),nn.allowColumnDragging&&!Ut.length&&((0,G.A)("<div>").addClass("dx-group-panel-message").text(nn.emptyPanelText).appendTo(ct),ct.closest(".dx-toolbar-item").addClass("dx-toolbar-label"),ct.closest(".dx-toolbar-label").css("maxWidth","none"))}allowDragging(ct){const Ut=this.option("groupPanel");return on(Ut,ct)}getColumnElements(){const ct=this.element();return ct&&ct.find(".dx-group-panel-item")}getColumns(){return this._columnsController.getGroupColumns()}getBoundingRect(){const ct=this.element();if(ct&&ct.find(".dx-datagrid-group-panel").length){const Ut=ct.offset();return{top:Ut.top,bottom:Ut.top+(0,ee.Oq)(ct)}}return null}getName(){return"group"}getContextMenuItems(ct){const Ut=this,nn=Ut.option("grouping.contextMenuEnabled"),kn=(0,G.A)(ct.targetElement).closest(".dx-group-panel-item");let si;if(kn.length&&(ct.column=kn.data("columnData")),nn&&ct.column){const{column:vi}=ct;if(!(0,B.O9)(vi.allowGrouping)||vi.allowGrouping){const fo=(0,B.O9)(vi.groupIndex)&&vi.groupIndex>-1,Xi=Ut.option("grouping.texts"),Vo=Nt.bind(Ut,vi);si=[{text:Xi.ungroup,value:"ungroup",disabled:!fo,onItemClick:Vo},{text:Xi.ungroupAll,value:"ungroupAll",onItemClick:Vo}]}}return si}isVisible(){return super.isVisible()||this._isGroupPanelVisible()}hasGroupedColumns(){return this._isGroupPanelVisible()&&!!this.getColumns().length}optionChanged(ct){"groupPanel"===ct.name?(this._invalidate(),ct.handled=!0):super.optionChanged(ct)}},rowsView:Fi=>class extends Fi{getContextMenuItems(ct){const Ut=this;let kn;if(Ut.option("grouping.contextMenuEnabled")&&ct.row&&"group"===ct.row.rowType){const vi=Ut._columnsController.columnOption(`groupIndex:${ct.row.groupIndex}`);if(vi&&vi.allowGrouping){const Ni=Ut.option("grouping.texts"),fo=Nt.bind(Ut,vi);kn=[],kn.push({text:Ni.ungroup,value:"ungroup",onItemClick:fo},{text:Ni.ungroupAll,value:"ungroupAll",onItemClick:fo})}}return kn}_rowClick(ct){const nn=this.option("grouping.expandMode"),si="infinite"!==this.option("scrolling.mode")&&"rowClick"===nn&&(0,G.A)(ct.event.target).closest(".dx-group-row").length,vi=(0,G.A)(ct.event.target).closest(".dx-datagrid-expand").length;(si||vi)&&this._changeGroupRowState(ct),super._rowClick(ct)}_changeGroupRowState(ct){const Ut=this._dataController.items()[ct.rowIndex],nn=this._columnsController.columnOption(`groupIndex:${Ut.groupIndex}`,"allowCollapsing");("data"===Ut.rowType||"group"===Ut.rowType&&!1!==nn)&&(this._dataController.changeRowExpand(Ut.key,!0),ct.event.preventDefault(),ct.handled=!0)}},columnHeadersView:Fi=>class extends Fi{getContextMenuItems(ct){const Ut=this,nn=Ut.option("grouping.contextMenuEnabled");let kn=super.getContextMenuItems(ct);if(nn&&ct.row&&("header"===ct.row.rowType||"detailAdaptive"===ct.row.rowType)){const{column:si}=ct;if(!si.command&&(!(0,B.O9)(si.allowGrouping)||si.allowGrouping)){const vi=Ut.option("grouping.texts"),Ni=(0,B.O9)(si.groupIndex)&&si.groupIndex>-1,fo=Nt.bind(Ut,si);kn=kn||[],kn.push({text:vi.groupByThisColumn,value:"group",beginGroup:!0,disabled:Ni,onItemClick:fo}),si.showWhenGrouped&&kn.push({text:vi.ungroup,value:"ungroup",disabled:!Ni,onItemClick:fo}),kn.push({text:vi.ungroupAll,value:"ungroupAll",onItemClick:fo})}}return kn}allowDragging(ct){const Ut=this.option("groupPanel");return on(Ut,ct)||super.allowDragging(ct)}}}}});var zt=M(1781);f.registerModule("masterDetail",zt.g);var un=M(476);f.registerModule("editorFactory",un.k);var Pn=M(8970);f.registerModule("editing",(0,o.A)({},Pn.l,{extenders:(0,o.A)({},Pn.l.extenders,{controllers:(0,o.A)({},Pn.l.extenders.controllers,{data:Fi=>class extends((0,Pn.B)(Fi)){_changeRowExpandCore(ct){const Ut=this._editingController;return Array.isArray(ct)&&Ut&&Ut.refresh(),super._changeRowExpandCore.apply(this,arguments)}}})})}));var Ei=M(225);f.registerModule("editingRowBased",Ei.a);var Hi=M(2255);f.registerModule("editingFormBased",Hi.I);var mo=M(933);f.registerModule("editingCellBased",mo.W);var xo=M(4394);f.registerModule("validating",xo.WY);var vr=M(830);f.registerModule("virtualScrolling",vr.f4),u.extend(vr.yo);var rn=M(9095);f.registerModule("filterRow",rn.$);var en=M(3918);f.registerModule("headerFilter",en.Qy);var Zn=M(6010);f.registerModule("filterSync",Zn.a);var Di=M(6480);f.registerModule("filterBuilder",Di.s);var po=M(7973);f.registerModule("filterPanel",po.$);var nr=M(2896);f.registerModule("search",nr.J);var Xo=M(8645);f.registerModule("pager",Xo.u);var Hn=M(5918);f.registerModule("columnsResizingReordering",Hn.Qu);var hr=M(1076);f.registerModule("keyboardNavigation",hr.S);var Rt=M(4859),mn=M(9339);function pi(Fi,ct,Ut,nn){let kn=0;if(Fi<ct)for(;kn<Ut.items.length;kn++)pi(Fi+1,ct,Ut.items[kn],nn);Fi===ct&&nn(Ut)}function Ti(Fi,ct){let Ut;if("map"in Fi)return Fi.map(ct);const nn=new Array(Fi.length);for(Ut in Fi)nn[Ut]=ct(Fi[Ut],Ut);return nn}function Jo(Fi){const ct=(0,tt.Hz)(Fi.selector),Ut=!("skipEmptyValues"in Fi)||Fi.skipEmptyValues;let{aggregator:nn}=Fi;if("string"==typeof nn&&(nn=ve.zL[nn],!nn))throw be.sO.Error("E4001",Fi.aggregator);return{selector:ct,aggregator:nn,skipEmptyValues:Ut}}class fr{constructor(ct){this._data=ct.data,this._groupLevel=ct.groupLevel||0,this._totalAggregates=Ti(ct.totalAggregates||[],Jo),this._groupAggregates=Ti(ct.groupAggregates||[],Jo),this._totals=[]}calculate(){this._totalAggregates.length&&this._calculateTotals(0,{items:this._data}),this._groupAggregates.length&&this._groupLevel>0&&this._calculateGroups({items:this._data})}totalAggregates(){return this._totals}_aggregate(ct,Ut,nn){const kn=Ut.items?Ut.items.length:0;for(let si=0;si<ct.length;si++)if(ct[si].aggregator!==ve.zL.count)for(let vi=0;vi<kn;vi++)this._accumulate(si,ct[si],nn,Ut.items[vi]);else nn[si]=(nn[si]||0)+kn}_calculateTotals(ct,Ut){if(0===ct&&(this._totals=this._seed(this._totalAggregates)),ct===this._groupLevel)this._aggregate(this._totalAggregates,Ut,this._totals);else for(let nn=0;nn<Ut.items.length;nn++)this._calculateTotals(ct+1,Ut.items[nn]);0===ct&&(this._totals=this._finalize(this._totalAggregates,this._totals))}_calculateGroups(ct){const Ut=this._groupLevel;let nn=Ut+1;const kn=this._seed.bind(this,this._groupAggregates),si=this._aggregate.bind(this,this._groupAggregates),vi=this._finalize.bind(this,this._groupAggregates);function Ni(fo){fo.aggregates=kn(nn-1),nn===Ut?si(fo,fo.aggregates):pi(nn,Ut,fo,Xi=>{si(Xi,fo.aggregates)}),fo.aggregates=vi(fo.aggregates)}for(;--nn>0;)pi(0,nn,ct,Ni)}_seed(ct,Ut){return Ti(ct,nn=>{const{aggregator:kn}=nn;return"seed"in kn?(0,B.Tn)(kn.seed)?kn.seed(Ut):kn.seed:NaN})}_accumulate(ct,Ut,nn,kn){const si=Ut.selector(kn),{aggregator:vi}=Ut,{skipEmptyValues:Ni}=Ut;Ni&&function lo(Fi){return Fi!=Fi||""===Fi||null==Fi}(si)||(nn[ct]=nn[ct]!=nn[ct]?si:vi.step(nn[ct],si))}_finalize(ct,Ut){return Ti(ct,(nn,kn)=>{const si=nn.aggregator.finalize;return si?si(Ut[kn]):Ut[kn]})}}const Xr=function(Fi,ct){const Ut=(0,G.A)(Fi),{column:nn}=ct,{summaryItems:kn}=ct,si=[];if(!nn.command&&kn){for(let vi=0;vi<kn.length;vi++){const Ni=kn[vi],fo=f.getSummaryText(Ni,ct.summaryTexts);si.push((0,G.A)("<div>").css("textAlign",Ni.alignment||nn.alignment).addClass("dx-datagrid-summary-item").addClass("dx-datagrid-text-content").addClass(Ni.cssClass).toggleClass("dx-datagrid-group-text-content","group"===ct.rowType).text(fo).attr("aria-label",`${nn.caption} ${fo}`))}Ut.append(si)}},Mr=function(Fi,ct){const Ut=Fi.option("summary.texts")||{};return{totalItem:ct.row,summaryItems:ct.row.summaryCells[ct.columnIndex],summaryTexts:Ut}},dn=function(Fi){return Fi.summary||Fi.aggregates||[]},an=function(Fi){return Fi.option("summary.recalculateWhileEditing")},_n=function(Fi,ct,Ut,nn){nn=nn||[];for(let kn=0;kn<Fi.length;kn++)nn.push(Fi[kn].key),1===ct?Ut(nn,Fi[kn].items):_n(Fi[kn].items,ct-1,Ut,nn),nn.pop()},Wt=function(Fi,ct,Ut){return Ut?Wt(Fi,ct.map(nn=>({items:[nn]}),Ut-1)):Fi.concat(ct)},zn=function(Fi,ct,Ut){return Ut?Fi.map(nn=>{const kn={},si=zn(nn.items||[],ct,Ut-1);return Object.defineProperty(kn,"aggregates",{get:()=>nn.aggregates,set:vi=>{nn.aggregates=vi}}),(0,T.X)(kn,nn,{items:si})}):Fi.filter(nn=>ct.indexOf(nn)<0)},mi=function(Fi,ct,Ut){if(!Fi||!ct.length)return Fi;const kn=Ut[0];let si;return ct[0]&&kn&&kn.length&&(si=(0,vt.A)(Fi),(0,ae.__)(kn,function(vi){si=0===vi?si.sortBy(this.selector,this.desc):si.thenBy(this.selector,this.desc)}),si.enumerate().done(vi=>{Fi=vi})),ct=ct.slice(1),Ut=Ut.slice(1),ct.length&&Ut.length&&(0,ae.__)(Fi,function(){this.items=mi(this.items,ct,Ut)}),Fi},Si=function(Fi,ct,Ut){const nn=Ut&&Ut.sortByGroups&&Ut.sortByGroups();return nn&&nn.length?mi(Fi,ct,nn):Fi},go=function(Fi,ct,Ut,nn){let kn;if(an(Fi)){const si=Fi._editingController;if(si){const vi=si.getInsertedData();vi.length&&(Ut=Wt(Ut,vi,nn));const Ni=si.getRemovedData();Ni.length&&(Ut=zn(Ut,Ni,nn))}}return ct&&(kn=new fr({totalAggregates:ct.totalAggregates,groupAggregates:ct.groupAggregates,data:Ut,groupLevel:nn}),kn.calculate()),kn?kn.totalAggregates():[]};u.extend(Fi=>class extends Fi{init(){super.init.apply(this,arguments),this._editingController=this.getController("editing"),this._totalAggregates=[],this._summaryGetter=Rt.lQ}summaryGetter(ct){if(!arguments.length)return this._summaryGetter;(0,B.Tn)(ct)&&(this._summaryGetter=ct)}summary(ct){if(!arguments.length)return this._summaryGetter();this._summaryGetter=function(){return ct}}totalAggregates(){return this._totalAggregates}isLastLevelGroupItemsPagingLocal(){const ct=this.summary(),Ut=ct?.sortByGroups();return Ut?.length}sortLastLevelGroupItems(ct,Ut,nn){const kn=qe.A.multiLevelGroup((0,vt.A)(ct),Ut).toArray();let si=[];return nn.forEach(vi=>{_n(kn,Ut.length,(Ni,fo)=>{vi.toString()===Ni.toString()&&(si=si.concat(fo))})}),si}_customizeRemoteOperations(ct){const Ut=this.summary();Ut&&(ct.remoteOperations.summary?(!ct.isCustomLoading||ct.storeLoadOptions.isLoadingAll)&&(ct.storeLoadOptions.group&&(ct.remoteOperations.grouping?ct.storeLoadOptions.groupSummary=Ut.groupAggregates:Ut.groupAggregates.length&&(ct.remoteOperations.paging=!1)),ct.storeLoadOptions.totalSummary=Ut.totalAggregates):(Ut.totalAggregates.length||Ut.groupAggregates.length&&ct.storeLoadOptions.group)&&(ct.remoteOperations.paging=!1)),super._customizeRemoteOperations.apply(this,arguments);const nn=ct.cachedData.extra;null!=nn&&nn.summary&&!ct.isCustomLoading&&(ct.storeLoadOptions.totalSummary=void 0)}_handleDataLoadedCore(ct){const Ut=(0,ve.st)(ct.storeLoadOptions.group||ct.loadOptions.group||[]),nn=ct.remoteOperations||{},kn=this.summaryGetter()(nn);if(!ct.isCustomLoading||ct.storeLoadOptions.isLoadingAll)if(nn.summary)!nn.paging&&Ut.length&&kn&&(nn.grouping||go(this,{groupAggregates:kn.groupAggregates},ct.data,Ut.length),ct.data=Si(ct.data,Ut,kn));else if(!nn.paging&&kn){var si;const vi=ct.operationTypes||{};if(!Object.keys(vi).some(fo=>vi[fo])||null===(si=ct.cachedData)||void 0===si||null===(si=si.extra)||void 0===si||!si.summary||Ut.length&&kn.groupAggregates.length){const fo=go(this,kn,ct.data,Ut.length);ct.extra=(0,B.Qd)(ct.extra)?ct.extra:{},ct.extra.summary=fo,ct.cachedData&&(ct.cachedData.extra=ct.extra)}ct.data=Si(ct.data,Ut,kn)}ct.isCustomLoading||(this._totalAggregates=ct.extra&&ct.extra.summary||this._totalAggregates),super._handleDataLoadedCore(ct)}}),f.registerModule("summary",{defaultOptions:()=>({summary:{groupItems:void 0,totalItems:void 0,calculateCustomSummary:void 0,skipEmptyValues:!0,recalculateWhileEditing:!1,texts:{sum:he.A.format("dxDataGrid-summarySum"),sumOtherColumn:he.A.format("dxDataGrid-summarySumOtherColumn"),min:he.A.format("dxDataGrid-summaryMin"),minOtherColumn:he.A.format("dxDataGrid-summaryMinOtherColumn"),max:he.A.format("dxDataGrid-summaryMax"),maxOtherColumn:he.A.format("dxDataGrid-summaryMaxOtherColumn"),avg:he.A.format("dxDataGrid-summaryAvg"),avgOtherColumn:he.A.format("dxDataGrid-summaryAvgOtherColumn"),count:he.A.format("dxDataGrid-summaryCount")}},sortByGroupSummaryInfo:void 0}),views:{footerView:class No extends mn.n{_getRows(){return this._dataController.footerItems()}_getCellOptions(ct){return(0,T.X)(super._getCellOptions(ct),Mr(this,ct))}_renderCellContent(ct,Ut){Xr(ct,Ut),super._renderCellContent.apply(this,arguments)}_renderCore(ct){let Ut=!1;const nn=this._dataController.footerItems()[0];(!ct||!ct.columnIndices)&&(this.element().empty().addClass("dx-datagrid-total-footer").toggleClass("dx-datagrid-nowrap",!this.option("wordWrapEnabled")),Ut=!0),nn&&nn.summaryCells&&nn.summaryCells.length&&(this._updateContent(this._renderTable({change:ct}),ct),Ut&&this._updateScrollLeftPosition())}_updateContent(ct,Ut){return Ut&&"update"===Ut.changeType&&Ut.columnIndices?this.waitAsyncTemplates().done(()=>{const nn=this.getTableElement().find(".dx-row"),kn=ct.find(".dx-row");this._updateCells(nn,kn,Ut.columnIndices[0])}):super._updateContent.apply(this,arguments)}_rowClick(ct){const Ut=this._dataController.footerItems()[ct.rowIndex]||{};this.executeAction("onRowClick",(0,T.X)({},ct,Ut))}_columnOptionChanged(ct){const{optionNames:Ut}=ct;ct.changeTypes.grouping||(Ut.width||Ut.visibleWidth)&&super._columnOptionChanged(ct)}_handleDataChanged(ct){const{changeType:Ut}=ct;"update"===ct.changeType&&ct.repaintChangesOnly?ct.totalColumnIndices?ct.totalColumnIndices.length&&this.render(null,{changeType:"update",columnIndices:[ct.totalColumnIndices]}):this.render():("refresh"===Ut||"append"===Ut||"prepend"===Ut)&&this.render()}_createRow(ct){const Ut=super._createRow.apply(this,arguments);return"totalFooter"===ct.rowType&&(Ut.addClass("dx-footer-row"),Ut.addClass("dx-cell-focus-disabled"),Ut.attr("tabindex",0)),Ut}getHeight(){return this.getElementHeight()}isVisible(){return!!this._dataController.footerItems().length}}},extenders:{controllers:{data:Fi=>class extends Fi{_isDataColumn(ct){return ct&&(!(0,B.O9)(ct.groupIndex)||ct.showWhenGrouped)}_isGroupFooterVisible(){const ct=this.option("summary.groupItems")||[];for(let Ut=0;Ut<ct.length;Ut++){const nn=ct[Ut],kn=this._columnsController.columnOption(nn.showInColumn||nn.column);if(nn.showInGroupFooter&&this._isDataColumn(kn))return!0}return!1}_processGroupItems(ct,Ut,nn){const kn=nn&&nn.data,si=super._processGroupItems.apply(this,arguments);return nn&&(void 0===nn.isGroupFooterVisible&&(nn.isGroupFooterVisible=this._isGroupFooterVisible()),kn&&kn.items&&nn.isGroupFooterVisible&&(nn.collectContinuationItems||!kn.isContinuationOnNextPage)&&si.push({rowType:"groupFooter",key:nn.path.slice(),data:kn,groupIndex:nn.path.length-1,values:[]})),si}_processGroupItem(ct,Ut){const nn=this;if(Ut.summaryGroupItems||(Ut.summaryGroupItems=nn.option("summary.groupItems")||[]),"group"===ct.rowType){let kn=-1,si=-1;(0,ae.__)(Ut.visibleColumns,function(vi){ct.groupIndex===this.groupIndex&&(kn=this.index),vi>0&&"expand"===Ut.visibleColumns[vi-1].command&&"expand"!==this.command&&(si=this.index)}),ct.summaryCells=this._calculateSummaryCells(Ut.summaryGroupItems,dn(ct.data),Ut.visibleColumns,(vi,Ni)=>vi.showInGroupFooter?-1:vi.alignByColumn&&Ni&&!(0,B.O9)(Ni.groupIndex)&&Ni.index!==si?Ni.index:kn,!0)}return"groupFooter"===ct.rowType&&(ct.summaryCells=this._calculateSummaryCells(Ut.summaryGroupItems,dn(ct.data),Ut.visibleColumns,(kn,si)=>kn.showInGroupFooter&&nn._isDataColumn(si)?si.index:-1)),ct}_calculateSummaryCells(ct,Ut,nn,kn,si){const vi=this,Ni=[],fo={};return(0,ae.__)(ct,(Xi,Vo)=>{const Go=vi._columnsController.columnOption(Vo.column),Er=Vo.showInColumn&&vi._columnsController.columnOption(Vo.showInColumn)||Go,Ts=kn(Vo,Er);if(Ts>=0){fo[Ts]||(fo[Ts]=[]);const ms=Ut[Xi];if(ms==ms){let rs;(0,B.O9)(Vo.valueFormat)?rs=Vo.valueFormat:"count"!==Vo.summaryType&&(rs=f.getFormatByDataType(Go&&Go.dataType)),fo[Ts].push((0,T.X)({},Vo,{value:(0,B.Kg)(ms)&&Go&&Go.deserializeValue?Go.deserializeValue(ms):ms,valueFormat:rs,columnCaption:Go&&Go.index!==Ts?Go.caption:void 0}))}}}),(0,B.RI)(fo)||nn.forEach((Xi,Vo)=>{const Go=nn[Vo-1];Ni.push(fo[!si||"expand"!==Go?.command&&"expand"!==Xi.command?Xi.index:Go?.index]||[])}),Ni}_getSummaryCells(ct,Ut){const nn=this;return nn._calculateSummaryCells(ct,Ut,nn._columnsController.getVisibleColumns(),(si,vi)=>nn._isDataColumn(vi)?vi.index:-1)}_updateItemsCore(ct){const Ut=this;let nn;const kn=Ut._dataSource,si=Ut._footerItems,vi=si&&si[0]&&si[0].summaryCells,Ni=Ut.option("summary.totalItems");if(Ut._footerItems=[],kn&&Ni&&Ni.length){const fo=kn.totalAggregates();nn=Ut._getSummaryCells(Ni,fo),ct&&ct.repaintChangesOnly&&vi&&(ct.totalColumnIndices=nn.map((Xi,Vo)=>JSON.stringify(Xi)!==JSON.stringify(vi[Vo])?Vo:-1).filter(Xi=>Xi>=0)),nn.length&&Ut._footerItems.push({rowType:"totalFooter",summaryCells:nn})}super._updateItemsCore(ct)}_prepareUnsavedDataSelector(ct){if(an(this)){const Ut=this._editingController;if(Ut)return function(nn){return nn=Ut.getUpdatedData(nn),ct(nn)}}return ct}_prepareAggregateSelector(ct,Ut){return ct=this._prepareUnsavedDataSelector(ct),"avg"===Ut||"sum"===Ut?function(nn){const kn=ct(nn);return(0,B.O9)(kn)?Number(kn):kn}:ct}_getAggregates(ct,Ut){const nn=this;let kn=nn.option("summary.calculateCustomSummary");const si=nn.option("summary.skipEmptyValues");return(0,ae.Tj)(ct||[],vi=>{const Ni=this._columnsController.columnOption(vi.column),fo=Ni&&Ni.calculateCellValue?Ni.calculateCellValue.bind(Ni):(0,tt.Hz)(Ni?Ni.dataField:vi.column);let Xi=vi.summaryType||"count";const Vo=(0,B.O9)(vi.skipEmptyValues)?vi.skipEmptyValues:si;if(Ut)return{selector:vi.column,summaryType:Xi};const Go=nn._prepareAggregateSelector(fo,Xi);if("custom"===Xi){kn||(d.A.log("E1026"),kn=function(){});const Er={component:nn.component,name:vi.name};kn(Er),Er.summaryProcess="calculate",Xi={seed:Ts=>(Er.summaryProcess="start",Er.totalValue=void 0,Er.groupIndex=Ts,delete Er.value,kn(Er),Er.totalValue),step:(Ts,ms)=>(Er.summaryProcess="calculate",Er.totalValue=Ts,Er.value=ms,kn(Er),Er.totalValue),finalize:Ts=>(Er.summaryProcess="finalize",Er.totalValue=Ts,delete Er.value,kn(Er),Er.totalValue)}}return{selector:Go,aggregator:Xi,skipEmptyValues:Vo}})}_addSortInfo(ct,Ut,nn,kn){if(Ut){const{groupIndex:si}=Ut;kn=kn||Ut.sortOrder,(0,B.O9)(si)&&(ct[si]=ct[si]||[],ct[si].push({selector:nn,desc:"desc"===kn}))}}_findSummaryItem(ct,Ut){let nn=-1;return(0,B.O9)(Ut)&&(0,ae.__)(ct||[],function(kn){if(this.name===Ut||kn===Ut||this.summaryType===Ut||this.column===Ut||function(si){const{summaryType:vi}=si,{column:Ni}=si;return vi&&Ni&&`${vi}_${Ni}`}(this)===Ut)return nn=kn,!1}),nn}_getSummarySortByGroups(ct,Ut){const nn=this,kn=nn._columnsController,si=kn.getGroupColumns(),vi=[];if(Ut&&Ut.length)return(0,ae.__)(ct||[],function(){const{sortOrder:Ni}=this;let{groupColumn:fo}=this;const Xi=nn._findSummaryItem(Ut,this.summaryItem);if(Xi<0)return;const Vo=function(Go){return dn(Go)[Xi]};(0,B.O9)(fo)?(fo=kn.columnOption(fo),nn._addSortInfo(vi,fo,Vo,Ni)):(0,ae.__)(si,(Go,Er)=>{nn._addSortInfo(vi,Er,Vo,Ni)})}),vi}_createDataSourceAdapterCore(ct,Ut){const nn=this,kn=super._createDataSourceAdapterCore(ct,Ut);return kn.summaryGetter(si=>nn._getSummaryOptions(si||Ut)),kn}_getSummaryOptions(ct){const Ut=this,nn=Ut.option("summary.groupItems"),kn=Ut.option("summary.totalItems"),si=Ut.option("sortByGroupSummaryInfo"),vi=Ut._getAggregates(nn,ct&&ct.grouping&&ct.summary),Ni=Ut._getAggregates(kn,ct&&ct.summary);if(vi.length||Ni.length)return{groupAggregates:vi,totalAggregates:Ni,sortByGroups:function(){return Ut._getSummarySortByGroups(si,nn)}}}publicMethods(){const ct=super.publicMethods();return ct.push("getTotalSummaryValue"),ct}getTotalSummaryValue(ct){const Ut=this._findSummaryItem(this.option("summary.totalItems"),ct),nn=this._dataSource.totalAggregates();if(nn.length&&Ut>-1)return nn[Ut]}optionChanged(ct){("summary"===ct.name||"sortByGroupSummaryInfo"===ct.name)&&(ct.name="dataSource"),super.optionChanged(ct)}init(){this._footerItems=[],super.init()}footerItems(){return this._footerItems}},editing:Fi=>class extends Fi{_refreshSummary(){an(this)&&!this.isSaving()&&this._dataController.refresh({load:!0,changesOnly:!0})}_addChange(ct){const Ut=super._addChange.apply(this,arguments);return ct.type&&this._refreshSummary(),Ut}_removeChange(){const ct=super._removeChange.apply(this,arguments);return this._refreshSummary(),ct}cancelEditData(){const ct=super.cancelEditData.apply(this,arguments);return this._refreshSummary(),ct}}},views:{rowsView:Fi=>class extends Fi{_createRow(ct){const Ut=super._createRow.apply(this,arguments);return ct&&Ut.addClass("groupFooter"===ct.rowType?"dx-datagrid-group-footer":""),Ut}_renderCells(ct,Ut){super._renderCells.apply(this,arguments),"group"===Ut.row.rowType&&Ut.row.summaryCells&&Ut.row.summaryCells.length&&this._renderGroupSummaryCells(ct,Ut)}_hasAlignByColumnSummaryItems(ct,Ut){return!(0,B.O9)(Ut.columns[ct].groupIndex)&&Ut.row.summaryCells[ct].length}_getAlignByColumnCellCount(ct,Ut){let nn=0;for(let kn=1;kn<ct;kn++)nn=this._hasAlignByColumnSummaryItems(Ut.row.summaryCells.length-kn,Ut)?kn:nn;return nn}_renderGroupSummaryCells(ct,Ut){const nn=ct.children().last(),kn=Number(nn.attr("colSpan"))||1,si=this._getAlignByColumnCellCount(kn,Ut);this._renderGroupSummaryCellsCore(nn,Ut,kn,si)}_renderGroupSummaryCellsCore(ct,Ut,nn,kn){if(kn>0){ct.attr("colSpan",nn-kn);for(let si=0;si<kn;si++){const vi=Ut.columns.length-kn+si;this._renderCell(ct.parent(),(0,T.X)({column:Ut.columns[vi],columnIndex:this._getSummaryCellIndex(vi,Ut.columns)},Ut))}}}_getSummaryCellIndex(ct,Ut){return ct}_getCellTemplate(ct){return!ct.column.command&&!(0,B.O9)(ct.column.groupIndex)&&ct.summaryItems&&ct.summaryItems.length?Xr:super._getCellTemplate(ct)}_getCellOptions(ct){const nn=super._getCellOptions(ct);return ct.row.summaryCells?(0,T.X)(nn,Mr(this,ct)):nn}}}}});var bn=M(9038);f.registerModule("columnFixing",bn.o);var jn=M(6218);f.registerModule("adaptivity",jn.A);var Ci=M(4318);f.registerModule("virtualColumns",Ci.j),M(9012),M(4083);var bt=M(4757),gn=M(9495),Kt=M(6828),Mn=M(5155);class Pr{constructor(ct,Ut,nn){this._exportController=ct,this._initialColumnWidthsByColumnIndex=Ut,this._selectedRowsOnly=nn}_getGroupValue(ct){const{key:Ut,data:nn,rowType:kn,groupIndex:si,summaryCells:vi}=ct,Ni=this._options.groupColumns[si],fo=f.getDisplayValue(Ni,Ni.deserializeValue?Ni.deserializeValue(Ut[si]):Ut[si],nn,kn);let Xi=`${Ni.caption}: ${f.formatValue(fo,Ni)}`;return vi&&vi[0]&&vi[0].length&&(Xi+=` ${f.getGroupRowSummaryText(vi[0],this._options.summaryTexts)}`),Xi}_correctCellIndex(ct){return ct}_initOptions(){const ct=this._exportController,Ut=ct._columnsController.getGroupColumns();this._options={columns:ct._getColumns(this._initialColumnWidthsByColumnIndex),groupColumns:Ut,items:this._selectedRowsOnly||ct._selectionOnly?ct._getSelectedItems():ct._getAllItems(),isHeadersVisible:ct.option("showColumnHeaders"),summaryTexts:ct.option("summary.texts"),rtlEnabled:ct.option("rtlEnabled")}}getHeaderStyles(){return[{bold:!0,alignment:"center"},{bold:!0,alignment:"left"},{bold:!0,alignment:"right"}]}getGroupRowStyle(){return{bold:!0,alignment:(0,bt.n)(this._options.rtlEnabled)}}getColumnStyles(){const ct=[];return this.getColumns().forEach(Ut=>{ct.push({alignment:Ut.alignment||"left",format:Ut.format,dataType:Ut.dataType})}),ct}getStyles(){return[...this.getHeaderStyles(),...this.getColumnStyles(),this.getGroupRowStyle()]}_getTotalCellStyleId(ct){var Ut;const nn=(null===(Ut=this.getColumns()[ct])||void 0===Ut?void 0:Ut.alignment)||"right";return this.getHeaderStyles().map(kn=>kn.alignment).indexOf(nn)}getStyleId(ct,Ut){return ct<this.getHeaderRowCount()?0:this.isTotalCell(ct-this.getHeaderRowCount(),Ut)?this._getTotalCellStyleId(Ut):this.isGroupRow(ct-this.getHeaderRowCount())?this.getHeaderStyles().length+this.getColumns().length:Ut+this.getHeaderStyles().length}getColumns(ct){const{columns:Ut}=this._options;return ct?Ut:Ut[Ut.length-1]}getColumnsWidths(){const ct=this.getColumns();return(0,B.O9)(ct)?ct.map(Ut=>Ut.width):void 0}getRowsCount(){return this._options.items.length+this.getHeaderRowCount()}getHeaderRowCount(){return this.isHeadersVisible()?this._options.columns.length-1:0}isGroupRow(ct){return ct<this._options.items.length&&"group"===this._options.items[ct].rowType}getGroupLevel(ct){const Ut=this._options.items[ct-this.getHeaderRowCount()],nn=Ut&&Ut.groupIndex;return Ut&&"totalFooter"===Ut.rowType?0:(0,B.O9)(nn)?nn:this._options.groupColumns.length}getCellType(ct,Ut){const nn=this.getColumns();if(ct<this.getHeaderRowCount())return"string";if(ct-=this.getHeaderRowCount(),Ut<nn.length){const kn=this._options.items.length&&this._options.items[ct],si=nn[Ut];return kn&&"data"===kn.rowType&&isFinite(kn.values[this._correctCellIndex(Ut)])&&!(0,B.O9)(si.customizeText)?(0,B.O9)(si.lookup)?si.lookup.dataType:si.dataType:"string"}}ready(){this._initOptions();const ct=this._options;return(0,oe.z7)(ct.items).done(Ut=>{ct.items=Ut}).fail(()=>{ct.items=[]})}_convertFromGridGroupSummaryItems(ct){if((0,B.O9)(ct)&&ct.length>0)return ct.map(Ut=>({value:Ut.value,name:Ut.name}))}getCellData(ct,Ut,nn){let kn,si;const vi={cellSourceData:{},value:kn},Ni=this.getColumns(),fo=this._correctCellIndex(Ut);if(ct<this.getHeaderRowCount())si=this.getColumns(!0)[ct][Ut],vi.cellSourceData.rowType="header",vi.cellSourceData.column=si&&si.gridColumn,vi.value=si&&si.caption;else{ct-=this.getHeaderRowCount();const Xi=this._options.items.length&&this._options.items[ct];if(Xi){const Vo=Xi.values;switch(vi.cellSourceData.rowType=Xi.rowType,vi.cellSourceData.column=Ni[Ut]&&Ni[Ut].gridColumn,Xi.rowType){case"groupFooter":case"totalFooter":fo<Vo.length&&(kn=Vo[fo],(0,B.O9)(kn)?(vi.cellSourceData.value=kn.value,vi.cellSourceData.totalSummaryItemName=kn.name,vi.value=f.getSummaryText(kn,this._options.summaryTexts)):vi.cellSourceData.value=void 0);break;case"group":if(vi.cellSourceData.groupIndex=Xi.groupIndex,Ut<1)vi.cellSourceData.column=this._options.groupColumns[Xi.groupIndex],vi.cellSourceData.value=Xi.key[Xi.groupIndex],vi.cellSourceData.groupSummaryItems=this._convertFromGridGroupSummaryItems(Xi.summaryCells[0]),vi.value=this._getGroupValue(Xi);else{const Go=Xi.values[fo];if(Array.isArray(Go)){vi.cellSourceData.groupSummaryItems=this._convertFromGridGroupSummaryItems(Go),kn="";for(let Er=0;Er<Go.length;Er++)kn+=(Er>0?nn?"\n":" \n ":"")+f.getSummaryText(Go[Er],this._options.summaryTexts);vi.value=kn}else vi.cellSourceData.value=void 0}break;default:if(si=Ni[Ut],si){const Go=Vo[fo],Er=f.getDisplayValue(si,Go,Xi.data,Xi.rowType);vi.value=!isFinite(Er)||(0,B.O9)(si.customizeText)?nn&&(0,B.O9)(si.customizeText)&&si.customizeText===this._exportController._columnsController.getCustomizeTextByDataType("boolean")?Er:f.formatValue(Er,si):Er,vi.cellSourceData.value=Go}vi.cellSourceData.data=Xi.data}}}return vi}isHeadersVisible(){return this._options.isHeadersVisible}isTotalCell(ct,Ut){const{items:nn}=this._options,kn=nn[ct],si=this._correctCellIndex(Ut);return kn&&"groupFooter"===kn.rowType||"totalFooter"===kn.rowType||kn.summaryCells&&kn.summaryCells[si]&&kn.summaryCells[si].length>0&&kn.summaryCells[si][0].alignByColumn}getCellMerging(ct,Ut){const{columns:nn}=this._options,kn=nn[ct]&&nn[ct][Ut];return kn?{colspan:(kn.exportColspan||1)-1,rowspan:(kn.rowspan||1)-1}:{colspan:0,rowspan:0}}getFrozenArea(){return{x:0,y:this.getHeaderRowCount()}}}f.registerModule("export",{defaultOptions:()=>({export:{enabled:!1,fileName:"DataGrid",formats:["xlsx"],allowExportSelectedData:!1,texts:{exportTo:he.A.format("dxDataGrid-exportTo"),exportAll:he.A.format("dxDataGrid-exportAll"),exportSelectedRows:he.A.format("dxDataGrid-exportSelectedRows")}}}),controllers:{export:class wr extends f.ViewController{init(){this.throwWarningIfNoOnExportingEvent(),this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._rowsView=this.getView("rowsView"),this._headersView=this.getView("columnHeadersView"),this.createAction("onExporting",{excludeValidators:["disabled","readOnly"]})}_getEmptyCell(){return{caption:"",colspan:1,rowspan:1}}_updateColumnWidth(ct,Ut){ct.width=Ut}_getColumns(ct){let nn,kn,Ut=[];const si=this._columnsController,vi=si.getRowCount();for(nn=0;nn<=vi;nn++){const Ni=[];let fo;if(kn=si.getVisibleColumns(nn,!0),nn===vi)if(this._updateLockCount)fo=ct;else{const Xi=this._getColumnWidths(this._headersView,this._rowsView);if(Xi&&Xi.length){fo={};for(let Vo=0;Vo<kn.length;Vo++)fo[kn[Vo].index]=Xi[Vo]}}for(let Xi=0;Xi<kn.length;Xi++){const Vo=(0,T.X)({},kn[Xi],{dataType:"datetime"===kn[Xi].dataType?"date":kn[Xi].dataType,gridColumn:kn[Xi]});if(this._needColumnExporting(Vo)){const Go=this._calculateExportColspan(Vo);(0,B.O9)(Go)&&(Vo.exportColspan=Go),fo&&this._updateColumnWidth(Vo,fo[Vo.index]),Ni.push(Vo)}}Ut.push(Ni)}return kn=Ut[vi],Ut=(0,Mn.Q)(Ut.slice(0,-1),this._getEmptyCell()),Ut.push(kn),Ut}_calculateExportColspan(ct){if(!ct.isBand)return;const Ut=this._columnsController.getChildrenByBandColumn(ct.index,!0);return(0,B.O9)(Ut)?Ut.reduce((nn,kn)=>this._needColumnExporting(kn)?nn+(this._calculateExportColspan(kn)||1):nn,0):void 0}_needColumnExporting(ct){return!ct.command&&(ct.allowExporting||void 0===ct.allowExporting)}_getFooterSummaryItems(ct,Ut){const nn=[];let kn=1,si=0;do{const vi=[];for(let Ni=0;Ni<ct.length;Ni++){const fo=ct[Ni],Xi=fo.length;kn<Xi&&(kn=Xi),vi.push(fo[si])}nn.push({values:vi,rowType:Ut?"totalFooter":"groupFooter"})}while(si++<kn-1);return nn}_hasSummaryGroupFooters(){const ct=this.option("summary.groupItems");if((0,B.O9)(ct))for(let Ut=0;Ut<ct.length;Ut++)if(ct[Ut].showInGroupFooter)return!0;return!1}_getItemsWithSummaryGroupFooters(ct){let Ut=[],nn=[],kn=[];for(let si=0;si<ct.length;si++){const vi=ct[si];"groupFooter"===vi.rowType?(kn=this._getFooterSummaryItems(vi.summaryCells),Ut=Ut.concat(nn,kn),nn=[]):nn.push(vi)}return Ut.length?Ut:nn}_updateGroupValuesWithSummaryByColumn(ct){let Ut=[];for(let nn=0;nn<ct.length;nn++){const kn=ct[nn],{summaryCells:si}=kn;if("group"===kn.rowType&&si&&si.length>1){const vi=kn.values.length;for(let Ni=1;Ni<si.length;Ni++)for(let fo=0;fo<si[Ni].length;fo++){const Xi=si[Ni][fo];Xi&&Xi.alignByColumn&&(Array.isArray(Ut[Ni-vi])||(Ut[Ni-vi]=[]),Ut[Ni-vi].push(Xi))}Ut.length>0&&(kn.values.push(...Ut),Ut=[])}}}_processUnExportedItems(ct){const Ut=this._columnsController.getVisibleColumns(null,!0),nn=this._columnsController.getGroupColumns();let kn,si;for(let vi=0;vi<ct.length;vi++){const Ni=ct[vi];let fo=!1;kn=[],si=[];for(let Xi=0;Xi<Ut.length;Xi++){const Vo=Ut[Xi];if(fo||(fo=["detailExpand","buttons"].includes(Vo.type)),this._needColumnExporting(Vo)&&(Ni.values&&kn.push("group"!==Ni.rowType||kn.length?Ni.values[Xi]:Ni.key[Ni.groupIndex]),Ni.summaryCells))if("group"!==Ni.rowType||si.length)si.push(Ni.summaryCells[Xi]);else{const Go=Xi-nn.length+Ni.groupIndex;si.push(Ni.summaryCells[fo?Go:Go+1])}}kn.length&&(Ni.values=kn),si.length&&(Ni.summaryCells=si)}}_getAllItems(ct){let Ut=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const nn=this,kn=new oe.cY,si=this._dataController.footerItems(),vi=si.length&&si[0],Ni=nn.option("summary.totalItems");let fo;return(0,oe.z7)(ct).done(Xi=>{this._dataController.loadAll(Xi,Ut).done((Vo,Go)=>{nn._updateGroupValuesWithSummaryByColumn(Vo),nn._hasSummaryGroupFooters()&&(Vo=nn._getItemsWithSummaryGroupFooters(Vo)),fo=vi&&vi.summaryCells,(0,B.O9)(Go)&&Ni&&(fo=nn._getSummaryCells(Ni,Go));const Er=vi&&nn._getFooterSummaryItems(fo,!0);Er&&(Vo=Vo.concat(Er)),nn._processUnExportedItems(Vo),kn.resolve(Vo)}).fail(kn.reject)}).fail(kn.reject),kn}_getSummaryCells(ct,Ut){return this._dataController._calculateSummaryCells(ct,Ut,this._columnsController.getVisibleColumns(null,!0),(nn,kn)=>this._dataController._isDataColumn(kn)?kn.index:-1)}_getSelectedItems(){return this.needLoadItemsOnExportingSelectedItems()?this._getAllItems(this._selectionController.loadSelectedItemsWithFilter(),!0):this._getAllItems(this._selectionController.getSelectedRowsData())}_getColumnWidths(ct,Ut){return ct&&ct.isVisible()?ct.getColumnWidths():Ut.getColumnWidths()}throwWarningIfNoOnExportingEvent(){var ct,Ut;const nn=null===(ct=(Ut=this.component).hasActionSubscription)||void 0===ct?void 0:ct.call(Ut,"onExporting");this.option("export.enabled")&&!nn&&d.A.log("W1024")}callbackNames(){return["selectionOnlyChanged"]}getDataProvider(ct){const Ut=this._getColumnWidths(this._headersView,this._rowsView);let nn;if(Ut&&Ut.length){nn={};const kn=this._columnsController.getVisibleColumns(this._columnsController.getRowCount(),!0);for(let si=0;si<kn.length;si++)nn[kn[si].index]=Ut[si]}return new Pr(this,nn,ct)}exportTo(ct,Ut){this._selectionOnly=ct;const nn=this.getAction("onExporting"),kn={rtlEnabled:this.option("rtlEnabled"),selectedRowsOnly:!!ct,format:Ut,fileName:"DataGrid",cancel:!1};(0,B.Tn)(nn)&&nn(kn)}publicMethods(){return["getDataProvider"]}selectionOnly(ct){if(!(0,B.O9)(ct))return this._isSelectedRows;this._isSelectedRows=ct,this.selectionOnlyChanged.fire()}optionChanged(ct){super.optionChanged(ct),"export"===ct.name&&this.throwWarningIfNoOnExportingEvent()}needLoadItemsOnExportingSelectedItems(){return this.option("loadItemsOnExportingSelectedItems")??this._dataController._dataSource.remoteOperations().filtering}}},extenders:{controllers:{editing:Fi=>class extends Fi{callbackNames(){const ct=super.callbackNames();return(0,B.O9)(ct)?ct.push("editingButtonsUpdated"):["editingButtonsUpdated"]}_updateEditButtons(){super._updateEditButtons(),this.editingButtonsUpdated.fire()}}},views:{headerPanel:Fi=>class extends Fi{_getToolbarItems(){const ct=super._getToolbarItems(),Ut=this._getExportToolbarButton();return Ut&&(ct.push(Ut),this._correctItemsPosition(ct)),ct}_getExportToolbarButton(){const ct=this._getExportToolbarItems();if(0===ct.length)return null;const Ut=this._needDisableExportButton(),nn={name:"exportButton",location:"after",locateInMenu:"auto",sortIndex:30,options:{items:ct},disabled:Ut};if(1===ct.length){const kn=(0,o.A)({},ct[0],{hint:ct[0].text,elementAttr:{class:"dx-datagrid-export-button"}});nn.widget="dxButton",nn.showText="inMenu",nn.options=kn}else{const kn={icon:"export",displayExpr:"text",items:ct,hint:this.option("export.texts.exportTo"),elementAttr:{class:"dx-datagrid-export-button"},dropDownOptions:{width:"auto",_wrapperClassExternal:"dx-datagrid-export-menu"}};nn.options=kn,nn.widget="dxDropDownButton",nn.menuItemTemplate=(si,vi,Ni)=>{this._createComponent((0,G.A)(Ni),Kt.A,{items:ct})}}return nn}_getExportToolbarItems(){const ct=this.option("export"),Ut=this.option("export.texts"),nn=this.option("export.formats")??[];if(!ct.enabled)return[];const kn=[];return nn.forEach(si=>{let vi=si.toUpperCase(),Ni="export";"xlsx"===si&&(vi="Excel",Ni="xlsxfile"),"pdf"===si&&(Ni="pdffile"),kn.push({text:(0,gn.GP)(Ut.exportAll,vi),icon:Ni,onClick:()=>{this._exportController.exportTo(!1,si)}}),ct.allowExportSelectedData&&kn.push({text:(0,gn.GP)(Ut.exportSelectedRows,vi),icon:"exportselected",onClick:()=>{this._exportController.exportTo(!0,si)}})}),kn}_correctItemsPosition(ct){ct.sort((Ut,nn)=>Ut.sortIndex-nn.sortIndex)}_isExportButtonVisible(){return this.option("export.enabled")}optionChanged(ct){super.optionChanged(ct),"export"===ct.name&&(ct.handled=!0,this._invalidate())}_needDisableExportButton(){const ct=!this._columnsController.hasVisibleDataColumns(),Ut=this._editingController.hasChanges();return ct||Ut}_columnOptionChanged(ct){if(super._columnOptionChanged(ct),f.checkChanges(ct.optionNames,["groupIndex","visible","all"])){const nn=this._needDisableExportButton();this.setToolbarItemDisabled("exportButton",nn)}}init(){super.init(),this._exportController=this.getController("export"),this._editingController.editingButtonsUpdated.add(()=>{const ct=this._needDisableExportButton();this.setToolbarItemDisabled("exportButton",ct)})}isVisible(){return super.isVisible()||this._isExportButtonVisible()}}}}});var fs=M(7214);const js=Number.MAX_SAFE_INTEGER||9007199254740991;f.registerModule("focus",(0,o.A)({},fs.h,{extenders:(0,o.A)({},fs.h.extenders,{controllers:(0,o.A)({},fs.h.extenders.controllers,{data:Fi=>class extends(fs.h.extenders.controllers.data(Fi)){changeRowExpand(ct,Ut){return this.option("focusedRowEnabled")&&Array.isArray(ct)&&this.isRowExpanded(ct)&&(!Ut||!this._keyboardNavigationController.isKeyboardEnabled())&&this._isFocusedRowInsideGroup(ct)&&this.option("focusedRowKey",ct),super.changeRowExpand(ct,Ut)}_isFocusedRowInsideGroup(ct){const Ut=this.option("focusedRowKey"),nn=this.getRowIndexByKey(Ut),kn=nn>=0&&this.getVisibleRows()[nn],si=this._columnsController.getGroupDataSourceParameters(!0);if(kn)for(let vi=0;vi<ct.length;++vi)if((0,tt.Hz)(si[vi]&&si[vi].selector)(kn.data)!==ct[vi])return!1;return!0}_getGroupPath(ct,Ut){const nn=[];let kn=[ct];for(;kn&&kn[0]&&Ut;){const si=kn[0];void 0!==si.key&&nn.push(si.key),kn=si.items,Ut--}return nn}_expandGroupByPath(ct,Ut,nn){const kn=new oe.cY;return nn++,ct.expandRow(Ut.slice(0,nn)).done(()=>{nn===Ut.length?kn.resolve():ct._expandGroupByPath(ct,Ut,nn).done(kn.resolve).fail(kn.reject)}).fail(kn.reject),kn.promise()}_calculateGlobalRowIndexByGroupedData(ct){const Ut=this,nn=Ut._dataSource,kn=Ut._generateFilterByKey(ct),si=new oe.cY,vi=Array.isArray(ct),Ni=nn.group();return vi?si.resolve(-1).promise():nn._grouping._updatePagingOptions?(nn.load({filter:Ut._concatWithCombinedFilter(kn),group:Ni}).done(fo=>{if(!fo||0===fo.length||!(0,B.O9)(fo[0].key)||-1===fo[0].key)return si.resolve(-1).promise();const Xi=Ut._getGroupPath(fo[0],Ni.length);Ut._expandGroupByPath(Ut,Xi,0).done(()=>{Ut._calculateExpandedRowGlobalIndex(si,ct,Xi,Ni)}).fail(si.reject)}).fail(si.reject),si.promise()):(Ut._calculateGlobalRowIndexByFlatData(ct,null,!0).done(si.resolve).fail(si.reject),si)}_calculateExpandedRowGlobalIndex(ct,Ut,nn,kn){const si=le(nn,{group:kn}),vi=this._dataSource,Ni=this.option("scrolling.mode"),fo="virtual"===Ni||"infinite"===Ni,Xi=vi.pageSize();let Vo;vi._grouping._updatePagingOptions({skip:0,take:js},(Go,Er)=>{(0,Rt.RL)(Go.path,nn)&&(Vo=Er)}),this._calculateGlobalRowIndexByFlatData(Ut,si).done(Go=>{let Er,Ts;Go<0?ct.resolve(-1):(Er=(Vo%Xi||Xi)+Go-nn.length,Ts=fo?0:Math.floor(Er/(Xi-nn.length))*nn.length,Er=Vo+Go+Ts,ct.resolve(Er))}).fail(ct.reject)}}})})}));var es=M(931);f.registerModule("rowDragging",es.e);const gs=q;M(8941);const Ga=gs},8638:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>hr});var W=M(1973),o=M(5973),P=M(36),b=M(1832),f=M(3090),S=M(3012),T=M(1830),y=M(4072),d=M(9293),c=M(9061),s=M(5259),a=M(53),u=M(1013),h=M(1520),g=M(3686),_=M(676),x=M(4761),w=M(2660),D=M(7007),C=M(6110),I=M(8360),L=M(3684),N=M(6229),G=M(5704),k=M(1363),U=M(625);const B=["year","day","month","day"],K=["hours","minutes","seconds","milliseconds"],Y={SUPPORTED_FORMATS:["date","time","datetime"],ONE_MINUTE:6e4,ONE_DAY:864e5,ONE_YEAR:31536e6,MIN_DATEVIEW_DEFAULT_DATE:new Date(1900,0,1),MAX_DATEVIEW_DEFAULT_DATE:function(){const Rt=new Date;return new Date(Rt.getFullYear()+50,Rt.getMonth(),Rt.getDate(),23,59,59)}(),FORMATS_INFO:{date:{getStandardPattern:()=>"yyyy-MM-dd",components:B},time:{getStandardPattern:()=>"HH:mm",components:K},datetime:{getStandardPattern(){let Rt;return function(){const mn=(0,G.A)("<input>").attr("type","datetime");mn.val("2000-01-01T01:01Z"),mn.val()&&(Rt="yyyy-MM-ddTHH:mmZ")}(),Rt||(Rt="yyyy-MM-ddTHH:mm:ssZ"),Y.FORMATS_INFO.datetime.getStandardPattern=function(){return Rt},Rt},components:[...B,...K]},"datetime-local":{getStandardPattern:()=>"yyyy-MM-ddTHH:mm:ss",components:[...B,"hours","minutes","seconds"]}},FORMATS_MAP:{date:"shortdate",time:"shorttime",datetime:"shortdateshorttime"},SUBMIT_FORMATS_MAP:{date:"date",time:"time",datetime:"datetime-local"},toStandardDateFormat(Rt,mn){const pi=Y.FORMATS_INFO[mn].getStandardPattern();return x.A.serializeDate(Rt,pi)},fromStandardDateFormat(Rt){const mn=x.A.dateParser(Rt);return(0,T.$P)(mn)?mn:void 0},getMaxMonthDay:(Rt,mn)=>new Date(Rt,mn+1,0).getDate(),mergeDates(Rt,mn,pi){if(!mn)return mn||null;if(!Rt||isNaN(Rt.getTime())){const Eo=new Date(null);Rt=new Date(Eo.getFullYear(),Eo.getMonth(),Eo.getDate())}const Ti=new Date(Rt.valueOf());return(0,w.__)(Y.FORMATS_INFO[pi].components,function(){const Eo=Y.DATE_COMPONENTS_INFO[this];Ti[Eo.setter](mn[Eo.getter]())}),Ti},getLongestCaptionIndex(Rt){let Ti,mn=0,pi=0;for(Ti=0;Ti<Rt.length;++Ti)Rt[Ti].length>pi&&(mn=Ti,pi=Rt[Ti].length);return mn},formatUsesMonthName:Rt=>c.A.formatUsesMonthName(Rt),formatUsesDayName:Rt=>c.A.formatUsesDayName(Rt),getLongestDate(Rt,mn,pi){const Ti=function(Rt){const mn=typeof Rt;return"string"===mn?"format":"object"===mn&&void 0!==Rt.type?Rt.type:null}(Rt);let lo=9;(!Ti||Y.formatUsesMonthName(Ti))&&(lo=Y.getLongestCaptionIndex(mn));const Eo=new Date(1888,lo,21,23,59,59,999);if(!Ti||Y.formatUsesDayName(Ti)){const Jo=Eo.getDate()-Eo.getDay()+Y.getLongestCaptionIndex(pi);Eo.setDate(Jo)}return Eo},normalizeTime(Rt){Rt.setSeconds(0),Rt.setMilliseconds(0)}};Y.DATE_COMPONENTS_INFO={year:{getter:"getFullYear",setter:"setFullYear",formatter(Rt,mn){const pi=new Date(mn.getTime());return pi.setFullYear(Rt),c.A.format(pi,"yyyy")},startValue:void 0,endValue:void 0},day:{getter:"getDate",setter:"setDate",formatter(Rt,mn){const pi=new Date(mn.getTime());return pi.setDate(Rt),c.A.format(pi,"d")},startValue:1,endValue:void 0},month:{getter:"getMonth",setter:"setMonth",formatter:Rt=>c.A.getMonthNames()[Rt],startValue:0,endValue:11},hours:{getter:"getHours",setter:"setHours",formatter:Rt=>c.A.format(new Date(0,0,0,Rt),"hour"),startValue:0,endValue:23},minutes:{getter:"getMinutes",setter:"setMinutes",formatter:Rt=>c.A.format(new Date(0,0,0,0,Rt),"minute"),startValue:0,endValue:59},seconds:{getter:"getSeconds",setter:"setSeconds",formatter:Rt=>c.A.format(new Date(0,0,0,0,0,Rt),"second"),startValue:0,endValue:59},milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",formatter:Rt=>c.A.format(new Date(0,0,0,0,0,0,Rt),"millisecond"),startValue:0,endValue:999}};const Z=Y;var Q=M(6620),te=M(9810),pe=M(6520);const le=function(Rt,mn,pi){Ce(Rt,mn,pi)},Ce=function(Rt,mn,pi){Rt.css("transform",`rotate(${mn}deg) translate(0,${pi}px)`)},ye=Q.A.inherit({_getDefaultOptions(){return(0,f.X)(this.callBase(),{value:new Date(Date.now()),use24HourFormat:!0,_showClock:!0,_arrowOffset:5,stylingMode:void 0})},_getValue(){return this.option("value")||new Date},_init(){this.callBase(),this.$element().addClass("dx-timeview")},_render(){this.callBase(),this._renderBox(),this._updateTime()},_renderBox(){const Rt=(0,G.A)("<div>").appendTo(this.$element()),mn=[];this.option("_showClock")&&mn.push({ratio:1,shrink:0,baseSize:"auto",template:this._renderClock.bind(this)}),mn.push({ratio:0,shrink:0,baseSize:"auto",template:this._renderField.bind(this)}),this._createComponent(Rt,U.A,{height:"100%",width:"100%",direction:"col",items:mn})},_renderClock(Rt,mn,pi){this._$hourArrow=(0,G.A)("<div>").addClass("dx-timeview-hourarrow"),this._$minuteArrow=(0,G.A)("<div>").addClass("dx-timeview-minutearrow");const Ti=(0,G.A)(pi);Ti.addClass("dx-timeview-clock").append(this._$hourArrow).append(this._$minuteArrow),this.setAria("role","presentation",Ti)},_updateClock(){const Rt=this._getValue(),mn=Rt.getHours()/12*360+Rt.getMinutes()/60*30,pi=Rt.getMinutes()/60*360;le(this._$hourArrow,mn,this.option("_arrowOffset")),le(this._$minuteArrow,pi,this.option("_arrowOffset"))},_getBoxItems(Rt){const mn=[{ratio:0,shrink:0,baseSize:"auto",template:()=>this._hourBox.$element()},{ratio:0,shrink:0,baseSize:"auto",template:(0,G.A)("<div>").addClass("dx-timeview-time-separator").text(c.A.getTimeSeparator())},{ratio:0,shrink:0,baseSize:"auto",template:()=>this._minuteBox.$element()}];return Rt&&mn.push({ratio:0,shrink:0,baseSize:"auto",template:()=>this._format12.$element()}),mn},_renderField(){const Rt=!this.option("use24HourFormat");return this._createHourBox(Rt),this._createMinuteBox(),Rt&&this._createFormat12Box(),this._createComponent((0,G.A)("<div>").addClass("dx-timeview-field"),U.A,{direction:"row",align:"center",crossAlign:"center",items:this._getBoxItems(Rt)}).$element()},_createHourBox(Rt){(this._hourBox=this._createComponent((0,G.A)("<div>"),te.A,(0,f.X)({min:-1,max:Rt?13:24,value:this._getValue().getHours(),onValueChanged:this._onHourBoxValueChanged.bind(this),onKeyboardHandled:pi=>this._keyboardHandler(pi)},this._getNumberBoxConfig()))).setAria("label","hours")},_isPM(){return!this.option("use24HourFormat")&&1===this._format12.option("value")},_onHourBoxValueChanged(Rt){let{value:mn,component:pi}=Rt;const Ti=this._getValue(),lo=new Date(Ti);let Eo=this._convertMaxHourToMin(mn);pi.option("value",Eo),this._isPM()&&(Eo+=12),lo.setHours(Eo),Z.normalizeTime(lo),this.option("value",lo)},_convertMaxHourToMin(Rt){const mn=this.option("use24HourFormat")?24:12;return(mn+Rt)%mn},_createMinuteBox(){(this._minuteBox=this._createComponent((0,G.A)("<div>"),te.A,(0,f.X)({min:-1,max:60,value:this._getValue().getMinutes(),onKeyboardHandled:mn=>this._keyboardHandler(mn),onValueChanged:mn=>{let{value:pi,component:Ti}=mn;const lo=(60+pi)%60;Ti.option("value",lo);const Eo=new Date(this._getValue());Eo.setMinutes(lo),Z.normalizeTime(Eo),this.option("value",Eo)}},this._getNumberBoxConfig()))).setAria("label","minutes")},_createFormat12Box(){const Rt=c.A.getPeriodNames();(this._format12=this._createComponent((0,G.A)("<div>").addClass("dx-timeview-format12"),pe.A,{items:[{value:-1,text:Rt[0]},{value:1,text:Rt[1]}],valueExpr:"value",displayExpr:"text",onKeyboardHandled:pi=>this._keyboardHandler(pi),onValueChanged:pi=>{let{value:Ti}=pi;const lo=this._getValue().getHours(),Eo=new Date(this._getValue());Eo.setHours((lo+12*Ti)%24),this.option("value",Eo)},value:this._getValue().getHours()>=12?1:-1,stylingMode:this.option("stylingMode")})).setAria("label","type")},_refreshFormat12(){if(this.option("use24HourFormat"))return;const Ti=this._getValue().getHours()>=12?1:-1;this._silentEditorValueUpdate(this._format12,Ti)},_silentEditorValueUpdate(Rt,mn){Rt&&(Rt._suppressValueChangeAction(),Rt.option("value",mn),Rt._resumeValueChangeAction())},_getNumberBoxConfig(){return{showSpinButtons:!0,displayValueFormatter:Rt=>(Rt<10?"0":"")+Rt,stylingMode:this.option("stylingMode")}},_normalizeHours(Rt){return this.option("use24HourFormat")?Rt:Rt%12||12},_updateField(){const Rt=this._normalizeHours(this._getValue().getHours());this._silentEditorValueUpdate(this._hourBox,Rt),this._silentEditorValueUpdate(this._minuteBox,this._getValue().getMinutes()),this._refreshFormat12()},_updateTime(){this.option("_showClock")&&this._updateClock(),this._updateField()},_visibilityChanged(Rt){Rt&&this._updateTime()},_optionChanged(Rt){switch(Rt.name){case"value":this._updateTime(),this.callBase(Rt);break;case"_arrowOffset":break;case"use24HourFormat":case"_showClock":case"stylingMode":this._invalidate();break;default:this.callBase(Rt)}}});(0,W.A)("dxTimeView",ye);const ge=ye,fe=(0,C.zk)(),Ee="dx-datebox-datetime-time-side",ze=N.A.inherit({NAME:"CalendarWithTime",getDefaultOptions(){return(0,f.X)(this.callBase(),{applyValueMode:"useButtons",buttonsLocation:"bottom after","dropDownOptions.showTitle":!1})},_closeDropDownByEnter(){return _.A.sameDate(this._getContouredValue(),this.widgetOption("value"))},getDisplayFormat:Rt=>Rt||"shortdateshorttime",_is24HourFormat(){return c.A.is24HourFormat(this.getDisplayFormat(this.dateBox.option("displayFormat")))},_getContouredValue(){const Rt=this.callBase();return this._updateDateTime(Rt)},_renderWidget(){this.callBase(),this._timeView=this.dateBox._createComponent((0,G.A)("<div>"),ge,{value:this.dateBoxValue(),_showClock:!this._isShrinkView(),use24HourFormat:this._is24HourFormat(),onValueChanged:this._valueChangedHandler.bind(this),stylingMode:this.dateBox.option("stylingMode")})},renderOpenedState(){this.callBase();const Rt=this._getPopup();Rt&&Rt.$wrapper().toggleClass("dx-datebox-adaptivity-mode",this._isSmallScreen()),clearTimeout(this._repaintTimer),this._repaintTimer=setTimeout(()=>{this._getPopup()&&this._getPopup().repaint()},0)},isAdaptivityChanged(){const Rt=this._isShrinkView(),mn=this._currentAdaptiveMode;return Rt!==mn?(this._currentAdaptiveMode=Rt,void 0!==mn):this.callBase()},_updateValue(Rt){let mn=this.dateBoxValue();!mn&&!Rt&&(mn=new Date,Z.normalizeTime(mn)),this.callBase(),this._timeView&&(mn&&this._timeView.option("value",mn),this._timeView.option("use24HourFormat",this._is24HourFormat()))},_isSmallScreen:()=>(0,k.RG)(fe)<=573,_isShrinkView(){return!this.dateBox.option("showAnalogClock")||this.dateBox.option("adaptivityEnabled")&&this._isSmallScreen()},_getBoxItems(){const Rt=[{ratio:0,shrink:0,baseSize:"auto",name:"calendar"}];return this._isShrinkView()||Rt.push({ratio:0,shrink:0,baseSize:"auto",name:"time"}),Rt},renderPopupContent(){this.callBase(),this._currentAdaptiveMode=this._isShrinkView();const Rt=this._getPopup().$content();this._box=this.dateBox._createComponent((0,G.A)("<div>").appendTo(Rt),U.A,{direction:"row",crossAlign:"stretch",items:this._getBoxItems(),itemTemplate:function(mn,pi,Ti){const lo=(0,G.A)("<div>");switch(mn.name){case"calendar":lo.append(this._widget.$element()),this._isShrinkView()&&(this._timeView.$element().addClass(Ee),lo.append(this._timeView.$element()));break;case"time":lo.append(this._timeView.$element()),(0,G.A)(Ti).addClass(Ee)}return lo}.bind(this)})},popupConfig(Rt){const mn=this.callBase(Rt);return(0,f.X)(mn,{width:"auto"})},_preventFocusOnPopup(Rt){(0,G.A)(Rt.target).hasClass("dx-texteditor-input")||(this.callBase.apply(this,arguments),this.dateBox._hasFocusClass()||this.dateBox.focus())},_updateDateTime(Rt){const mn=this._timeView.option("value");return Rt.setHours(mn.getHours(),mn.getMinutes(),mn.getSeconds(),mn.getMilliseconds()),Rt},getValue(){let Rt=this._widget.option("value")??this._widget.getContouredDate();return Rt=Rt?new Date(Rt):new Date,this._updateDateTime(Rt)},dispose(){clearTimeout(this._removeMinWidthTimer),clearTimeout(this._repaintTimer),this.callBase()}});var $e=M(6717),Be=M(2583),Ue=M(4504),ot=M(778),st=M(4859),et=M(662),Ye=M(1037);class qe extends Ye.A{_getDefaultOptions(){return(0,f.X)(super._getDefaultOptions(),{showScrollbar:"never",useNative:!1,selectedIndex:0,bounceEnabled:!1,items:[],showOnClick:!1,onClick:null,onSelectedIndexChanged:null,scrollByContent:!0})}_init(){super._init(),this.option("onVisibilityChange",this._visibilityChangedHandler.bind(this)),this.option("onEnd",this._endActionHandler.bind(this))}_render(){super._render(),this._renderSelectedItemFrame(),this.$element().addClass("dx-dateviewroller"),this._renderContainerClick(),this._renderItems(),this._renderSelectedValue(),this._renderItemsClick(),this._renderWheelEvent(),this._renderSelectedIndexChanged()}_renderSelectedIndexChanged(){this._selectedIndexChanged=this._createActionByOption("onSelectedIndexChanged")}_renderWheelEvent(){y.A.on((0,G.A)(this.container()),"dxmousewheel",mn=>{this._isWheelScrolled=!0})}_renderContainerClick(){if(!this.option("showOnClick"))return;const mn=(0,d.b4)(ot.U,this.NAME),pi=this._createActionByOption("onClick");y.A.off((0,G.A)(this.container()),mn),y.A.on((0,G.A)(this.container()),mn,Ti=>{pi({event:Ti})})}_renderItems(){const mn=this.option("items")||[];let pi=(0,G.A)();(0,G.A)(this.content()).empty(),mn.forEach(Ti=>{pi=pi.add((0,G.A)("<div>").addClass("dx-dateview-item").append(Ti))}),(0,G.A)(this.content()).append(pi),this._$items=pi,this.update()}_renderSelectedItemFrame(){(0,G.A)("<div>").addClass("dx-dateview-item-selected-frame").append((0,G.A)("<div>").addClass("dx-dateview-item-selected-border")).appendTo((0,G.A)(this.container()))}_renderSelectedValue(mn){const pi=this._fitIndex(mn??this.option("selectedIndex"));this._moveTo({top:this._getItemPosition(pi)}),this._renderActiveStateItem()}_fitIndex(mn){const Ti=(this.option("items")||[]).length;return mn>=Ti?Ti-1:mn<0?0:mn}_getItemPosition(mn){return Math.round(this._itemHeight()*mn)}_renderItemsClick(){const mn=this._getItemSelector(),pi=(0,d.b4)(ot.U,this.NAME);y.A.off(this.$element(),pi,mn),y.A.on(this.$element(),pi,mn,this._itemClickHandler.bind(this))}_getItemSelector(){return".dx-dateview-item"}_itemClickHandler(mn){this.option("selectedIndex",this._itemElementIndex(mn.currentTarget))}_itemElementIndex(mn){return this._itemElements().index(mn)}_itemElements(){return this.$element().find(this._getItemSelector())}_renderActiveStateItem(){const mn=this.option("selectedIndex");(0,w.__)(this._$items,function(pi){(0,G.A)(this).toggleClass("dx-dateview-item-selected",mn===pi)})}_shouldScrollToNeighborItem(){return"desktop"===o.A.real().deviceType&&this._isWheelScrolled}_moveTo(mn){const{top:pi,left:Ti}=function Ke(Rt,mn){if((0,T.Qd)(Rt)){const lo=(0,st.YD)(Rt.left,Rt.x),Eo=(0,st.YD)(Rt.top,Rt.y);return{left:(0,T.O9)(lo)?lo:void 0,top:(0,T.O9)(Eo)?Eo:void 0}}const{isHorizontal:pi,isVertical:Ti}=new et.D(mn);return{left:pi&&(0,T.O9)(Rt)?Rt:void 0,top:Ti&&(0,T.O9)(Rt)?Rt:void 0}}(mn),lo=this.scrollOffset(),Eo={x:lo.left-Ti,y:lo.top-pi};if(this._isVisible()&&(Eo.x||Eo.y))if(this._prepareDirections(!0),this._animation&&!this._shouldScrollToNeighborItem()){const Jo=this;Be.A.stop((0,G.A)(this.content())),Be.A.animate((0,G.A)(this.content()),{duration:200,type:"slide",to:{top:Math.floor(Eo.y)},complete(){(0,Ue.fw)((0,G.A)(Jo.content())),Jo.handleMove({delta:Eo})}}),delete this._animation}else this.handleMove({delta:Eo})}_validate(mn){return this._moveIsAllowed(mn)}_fitSelectedIndexInRange(mn){const pi=this.option("items").length;return Math.max(Math.min(mn,pi-1),0)}_isInNullNeighborhood(mn){return-.1<=mn&&mn<=.1}_getSelectedIndexAfterScroll(mn){const lo=this.scrollOffset().top-mn*this._itemHeight();return this._isInNullNeighborhood(lo)?mn:this._fitSelectedIndexInRange(mn+(lo>0?1:-1))}_getNewSelectedIndex(mn){if(this._shouldScrollToNeighborItem())return this._getSelectedIndexAfterScroll(mn);this._animation=!0;const pi=this.scrollOffset().top/this._itemHeight();return Math.round(pi)}_endActionHandler(){const mn=this.option("selectedIndex"),pi=this._getNewSelectedIndex(mn);pi===mn?this._renderSelectedValue(pi):this.option("selectedIndex",pi),this._isWheelScrolled=!1}_itemHeight(){const mn=this._$items.first();return(0,k.Oq)(mn)}_toggleActive(mn){this.$element().toggleClass("dx-state-active",mn)}_isVisible(){return(0,G.A)(this.container()).is(":visible")}_fireSelectedIndexChanged(mn,pi){this._selectedIndexChanged({value:mn,previousValue:pi,event:void 0})}_visibilityChanged(mn){super._visibilityChanged(mn),this._visibilityChangedHandler(mn)}_visibilityChangedHandler(mn){mn&&(this._visibilityTimer=setTimeout(()=>{this._renderSelectedValue(this.option("selectedIndex"))})),this.toggleActiveState(!1)}toggleActiveState(mn){this.$element().toggleClass("dx-dateviewroller-current",mn)}_refreshSelectedIndex(){const mn=this.option("selectedIndex"),pi=this._fitIndex(mn);pi===mn?this._renderActiveStateItem():this.option("selectedIndex",pi)}_optionChanged(mn){switch(mn.name){case"selectedIndex":this._fireSelectedIndexChanged(mn.value,mn.previousValue),this._renderSelectedValue(mn.value);break;case"items":this._renderItems(),this._refreshSelectedIndex();break;case"onClick":case"showOnClick":this._renderContainerClick();break;case"onSelectedIndexChanged":this._renderSelectedIndexChanged();break;default:super._optionChanged(mn)}}_dispose(){clearTimeout(this._visibilityTimer),super._dispose()}}(0,W.A)("dxDateViewRoller",qe);const At=qe,wi=Q.A.inherit({_valueOption(){const Rt=this.option("value"),mn=new Date(Rt);return!Rt||isNaN(mn)?this._getDefaultDate():mn},_getDefaultDate(){const Rt=new Date;return"date"===this.option("type")?new Date(Rt.getFullYear(),Rt.getMonth(),Rt.getDate()):Rt},_getDefaultOptions(){return(0,f.X)(this.callBase(),{minDate:Z.MIN_DATEVIEW_DEFAULT_DATE,maxDate:Z.MAX_DATEVIEW_DEFAULT_DATE,type:"date",value:new Date,applyCompactClass:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:Rt=>"desktop"!==Rt.deviceType,options:{applyCompactClass:!0}}])},_render(){this.callBase(),this.$element().addClass("dx-dateview"),this._toggleFormatClasses(this.option("type")),this._toggleCompactClass()},_toggleFormatClasses(Rt,mn){this.$element().addClass(`dx-dateview-${Rt}`),mn&&this.$element().removeClass(`dx-dateview-${mn}`)},_toggleCompactClass(){this.$element().toggleClass("dx-dateview-compact",this.option("applyCompactClass"))},_wrapper(){return this._$wrapper},_renderContentImpl(){this._$wrapper=(0,G.A)("<div>").addClass("dx-dateview-wrapper"),this._renderRollers(),this._$wrapper.appendTo(this.$element())},_renderRollers(){this._$rollersContainer||(this._$rollersContainer=(0,G.A)("<div>").addClass("dx-dateview-rollers")),this._$rollersContainer.empty(),this._createRollerConfigs(),this._rollers={};const Rt=this;(0,w.__)(Rt._rollerConfigs,mn=>{const pi=(0,G.A)("<div>").appendTo(Rt._$rollersContainer).addClass(`dx-dateviewroller-${Rt._rollerConfigs[mn].type}`);Rt._rollers[Rt._rollerConfigs[mn].type]=Rt._createComponent(pi,At,{items:Rt._rollerConfigs[mn].displayItems,selectedIndex:Rt._rollerConfigs[mn].selectedIndex,showScrollbar:"never",scrollByContent:!0,onStart(Ti){const lo=Ti.component;lo._toggleActive(!0),Rt._setActiveRoller(Rt._rollerConfigs[mn],lo.option("selectedIndex"))},onEnd(Ti){Ti.component._toggleActive(!1)},onClick(Ti){const lo=Ti.component;lo._toggleActive(!0),Rt._setActiveRoller(Rt._rollerConfigs[mn],lo.option("selectedIndex")),Rt._setRollerState(Rt._rollerConfigs[mn],lo.option("selectedIndex")),lo._toggleActive(!1)},onSelectedIndexChanged(Ti){Rt._setRollerState(Rt._rollerConfigs[mn],Ti.component.option("selectedIndex"))}})}),Rt._$rollersContainer.appendTo(Rt._wrapper())},_createRollerConfigs(Rt){const mn=this;Rt=Rt||mn.option("type"),mn._rollerConfigs={},c.A.getFormatParts(Z.FORMATS_MAP[Rt]).forEach(pi=>{mn._createRollerConfig(pi)})},_createRollerConfig(Rt){const mn=Z.DATE_COMPONENTS_INFO[Rt],pi=this._calculateRollerConfigValueRange(Rt),{startValue:Ti}=pi,{endValue:lo}=pi,{formatter:Eo}=mn,Jo=this._getCurrentDate(),fr={type:Rt,setValue:mn.setter,valueItems:[],displayItems:[],getIndex:Gr=>Gr[mn.getter]()-Ti};for(let Gr=Ti;Gr<=lo;Gr++)fr.valueItems.push(Gr),fr.displayItems.push(Eo(Gr,Jo));fr.selectedIndex=fr.getIndex(Jo),this._rollerConfigs[Rt]=fr},_setActiveRoller(Rt){const mn=Rt&&this._rollers[Rt.type];(0,w.__)(this._rollers,function(){this.toggleActiveState(this===mn)})},_updateRollersPosition(){const Rt=this;(0,w.__)(this._rollers,function(mn){const pi=Rt._rollerConfigs[mn].getIndex(Rt._getCurrentDate());this.option("selectedIndex",pi)})},_setRollerState(Rt,mn){if(mn!==Rt.selectedIndex){const pi=Rt.valueItems[mn],{setValue:Ti}=Rt;let lo=new Date(this._getCurrentDate()),Eo=lo.getDate();const Jo=this.option("minDate"),fr=this.option("maxDate");"month"===Rt.type?Eo=Math.min(Eo,Z.getMaxMonthDay(lo.getFullYear(),pi)):"year"===Rt.type&&(Eo=Math.min(Eo,Z.getMaxMonthDay(pi,lo.getMonth()))),lo.setDate(Eo),lo[Ti](pi);const Gr=_.A.normalizeDate(lo,Jo,fr);lo=Z.mergeDates(Gr,lo,"time"),lo=_.A.normalizeDate(lo,Jo,fr),this.option("value",lo),Rt.selectedIndex=mn}"year"===Rt.type&&this._refreshRollers(),"month"===Rt.type&&(this._refreshRoller("day"),this._refreshRoller("hours"))},_refreshRoller(Rt){const mn=this._rollers[Rt];if(mn){this._createRollerConfig(Rt);const pi=this._rollerConfigs[Rt];("day"===Rt||pi.displayItems.toString()!==mn.option("items").toString())&&mn.option({items:pi.displayItems,selectedIndex:pi.selectedIndex})}},_getCurrentDate(){const Rt=this._valueOption(),mn=this.option("minDate"),pi=this.option("maxDate");return _.A.normalizeDate(Rt,mn,pi)},_calculateRollerConfigValueRange(Rt){const mn=this._getCurrentDate(),pi=this.option("minDate"),Ti=this.option("maxDate"),lo=_.A.sameYear(mn,pi),Eo=lo&&mn.getMonth()===pi.getMonth(),Jo=_.A.sameYear(mn,Ti),fr=Jo&&mn.getMonth()===Ti.getMonth(),Gr=Eo&&mn.getDate()===pi.getDate(),Yn=fr&&mn.getDate()===Ti.getDate(),ei=Z.DATE_COMPONENTS_INFO[Rt];let{startValue:Ii}=ei,{endValue:co}=ei;return"year"===Rt&&(Ii=pi.getFullYear(),co=Ti.getFullYear()),"month"===Rt&&(lo&&(Ii=pi.getMonth()),Jo&&(co=Ti.getMonth())),"day"===Rt&&(co=Z.getMaxMonthDay(mn.getFullYear(),mn.getMonth()),lo&&Eo&&(Ii=pi.getDate()),Jo&&fr&&(co=Ti.getDate())),"hours"===Rt&&(Ii=Gr?pi.getHours():Ii,co=Yn?Ti.getHours():co),{startValue:Ii,endValue:co}},_refreshRollers(){this._refreshRoller("month"),this._refreshRoller("day"),this._refreshRoller("hours")},_optionChanged(Rt){switch(Rt.name){case"minDate":case"maxDate":case"type":this._renderRollers(),this._toggleFormatClasses(Rt.value,Rt.previousValue);break;case"visible":this.callBase(Rt),Rt.value&&this._renderRollers();break;case"value":this.option("value",this._valueOption()),this._refreshRollers(),this._updateRollersPosition();break;default:this.callBase(Rt)}},_clean(){this.callBase(),delete this._$rollersContainer}});(0,W.A)("dxDateView",wi);const Bn=wi,gi=(0,C.zk)(),pt=$e.A.inherit({NAME:"DateView",getDefaultOptions(){return(0,f.X)(this.callBase(),{openOnFieldClick:!0,applyButtonText:I.A.format("OK"),"dropDownOptions.showTitle":!0})},getDisplayFormat(Rt){return Rt||Z.FORMATS_MAP[this.dateBox.option("type")]},popupConfig(Rt){return{toolbarItems:this.dateBox._popupToolbarItemsConfig(),onInitialized:Rt.onInitialized,defaultOptionsRules:[{device:{platform:"android"},options:{width:333,height:331}},{device(mn){const{platform:pi}=mn;return"generic"===pi||"ios"===pi},options:{width:"auto",height:"auto"}},{device(mn){const{platform:pi}=mn,{phone:Ti}=mn;return"generic"===pi&&Ti},options:{width:333,maxWidth:"100%",maxHeight:"100%",height:"auto",position:{collision:"flipfit flip"}}},{device:{platform:"ios",phone:!0},options:{width:"100%",position:{my:"bottom",at:"bottom",of:gi}}}]}},_renderWidget(){if((0,D.inputType)(this.dateBox.option("mode"))&&this.dateBox._isNativeType()||this.dateBox.option("readOnly"))return void(this._widget&&(this._widget.$element().remove(),this._widget=null));const Rt=this._getPopup();if(this._widget)this._widget.option(this._getWidgetOptions());else{const mn=(0,G.A)("<div>").appendTo(Rt.$content());this._widget=this._createWidget(mn)}this._widget.$element().appendTo(this._getWidgetContainer())},_getWidgetName:()=>Bn,renderOpenedState(){this.callBase(),this._widget&&this._widget.option("value",this._widget._getCurrentDate())},_getWidgetOptions(){return{value:this.dateBoxValue()||new Date,type:this.dateBox.option("type"),minDate:this.dateBox.dateOption("min")||new Date(1900,0,1),maxDate:this.dateBox.dateOption("max")||new Date(Date.now()+50*Z.ONE_YEAR),onDisposing:function(){this._widget=null}.bind(this)}}});M(5470);var cn=M(6828),dt=M(2773);const Et=(0,C.zk)(),$n={min:new Date(0,0,0,0,0),max:new Date(0,0,0,23,59)},Nt=$e.A.inherit({NAME:"List",supportedKeys:()=>({space:st.lQ,home:st.lQ,end:st.lQ}),getDefaultOptions(){return(0,f.X)(this.callBase(),{applyValueMode:"instantly"})},getDisplayFormat:Rt=>Rt||"shorttime",popupConfig:Rt=>Rt,getValue(){const Rt=this._widget.option("selectedIndex");return-1===Rt?this.dateBox.option("value"):this._getDateByItemData(this._widgetItems[Rt])},useCurrentDateByDefault:()=>!0,getDefaultDate:()=>new Date(null),popupShowingHandler(){this.dateBox._dimensionChanged()},_renderWidget(){this.callBase(),this._refreshItems()},_getWidgetName:()=>cn.A,_getWidgetOptions(){return{itemTemplate:this._timeListItemTemplate.bind(this),onItemClick:this._listItemClickHandler.bind(this),tabIndex:-1,onFocusedItemChanged:this._refreshActiveDescendant.bind(this),selectionMode:"single"}},_refreshActiveDescendant(Rt){this.dateBox.setAria("activedescendant",""),this.dateBox.setAria("activedescendant",Rt.actionValue)},_refreshItems(){this._widgetItems=this._getTimeListItems(),this._widget.option("items",this._widgetItems)},renderOpenedState(){this._widget&&(this._widget.option("focusedElement",null),this._setSelectedItemsByValue(),this._widget.option("templatesRenderAsynchronously")?this._asyncScrollTimeout=setTimeout(this._scrollToSelectedItem.bind(this)):this._scrollToSelectedItem())},dispose(){this.callBase(),clearTimeout(this._asyncScrollTimeout)},_updateValue(){this._widget&&(this._refreshItems(),this._setSelectedItemsByValue(),this._scrollToSelectedItem())},_setSelectedItemsByValue(){const Rt=this.dateBoxValue(),mn=this._getDateIndex(Rt);-1===mn?this._widget.option("selectedItems",[]):this._widget.option("selectedIndex",mn)},_scrollToSelectedItem(){this._widget.scrollToItem(this._widget.option("selectedIndex"))},_getDateIndex(Rt){let mn=-1;for(let pi=0,Ti=this._widgetItems.length;pi<Ti;pi++)if(this._areDatesEqual(Rt,this._widgetItems[pi])){mn=pi;break}return mn},_areDatesEqual:(Rt,mn)=>(0,T.$P)(Rt)&&(0,T.$P)(mn)&&Rt.getHours()===mn.getHours()&&Rt.getMinutes()===mn.getMinutes(),_getTimeListItems(){let Rt=this.dateBox.dateOption("min")||this._getBoundaryDate("min");const mn=this.dateBox.dateOption("max")||this._getBoundaryDate("max"),pi=this.dateBox.dateOption("value")||null;let Ti=mn-Rt;const lo=Rt.getMinutes()%this.dateBox.option("interval");return Ti<0?[]:(Ti>Z.ONE_DAY&&(Ti=Z.ONE_DAY),pi-Rt<Z.ONE_DAY||(Rt=this._getBoundaryDate("min"),Rt.setMinutes(lo),pi&&Math.abs(pi-mn)<Z.ONE_DAY&&(Ti=(60*mn.getHours()+Math.abs(mn.getMinutes()-lo))*Z.ONE_MINUTE)),this._getRangeItems(Rt,new Date(Rt),Ti))},_getRangeItems(Rt,mn,pi){const Ti=[],lo=this.dateBox.option("interval");for(;mn-Rt<=pi;)Ti.push(new Date(mn)),mn.setMinutes(mn.getMinutes()+lo);return Ti},_getBoundaryDate(Rt){const mn=$n[Rt],pi=new Date((0,st.YD)(this.dateBox.dateOption("value"),0));return new Date(pi.getFullYear(),pi.getMonth(),pi.getDate(),mn.getHours(),mn.getMinutes())},_timeListItemTemplate(Rt){const mn=this.dateBox.option("displayFormat");return c.A.format(Rt,this.getDisplayFormat(mn))},_listItemClickHandler(Rt){if("useButtons"===this.dateBox.option("applyValueMode"))return;const mn=this._getDateByItemData(Rt.itemData);this.dateBox.option("opened",!1),this.dateBoxValue(mn,Rt.event)},_getDateByItemData(Rt){let mn=this.dateBox.option("value");const pi=Rt.getHours(),Ti=Rt.getMinutes(),lo=Rt.getSeconds(),Eo=Rt.getFullYear(),Jo=Rt.getMonth(),fr=Rt.getDate();return mn?(mn=this.dateBox.option("dateSerializationFormat")?x.A.deserializeDate(mn):new Date(mn),mn.setHours(pi),mn.setMinutes(Ti),mn.setSeconds(lo),mn.setFullYear(Eo),mn.setMonth(Jo),mn.setDate(fr)):mn=new Date(Eo,Jo,fr,pi,Ti,0,0),mn},getKeyboardListener(){return this._widget},_updatePopupHeight(){const Rt=(0,dt.b)(this.dateBox.option("dropDownOptions.height"));if(void 0===Rt||"auto"===Rt){this.dateBox._setPopupOption("height","auto");const mn=(0,k.P$)(this._widget.$element()),pi=.45*(0,k.Oq)(Et);this.dateBox._setPopupOption("height",Math.min(mn,pi))}this.dateBox._timeList&&this.dateBox._timeList.updateDimensions()},getParsedText(Rt,mn){let pi=this.callBase(Rt,mn);return pi&&(pi=Z.mergeDates(pi,new Date(null),"date")),pi}}),on=$e.A.inherit({NAME:"Native",popupConfig:Rt=>(0,f.X)({},Rt,{width:"auto"}),getParsedText(Rt){return Rt?"datetime"===this.dateBox.option("type")?new Date(Rt.replace(/-/g,"/").replace("T"," ").split(".")[0]):Z.fromStandardDateFormat(Rt):null},renderPopupContent:st.lQ,_getWidgetName:st.lQ,_getWidgetOptions:st.lQ,_getDateBoxType(){let Rt=this.dateBox.option("type");return Z.SUPPORTED_FORMATS.includes(Rt)?"datetime"===Rt&&!(0,D.inputType)(Rt)&&(Rt="datetime-local"):Rt="date",Rt},customizeButtons(){const Rt=this.dateBox.getButton("dropDown");o.A.real().android&&Rt&&Rt.on("click",()=>{this.dateBox._input().get(0).click()})},getDefaultOptions(){return{mode:this._getDateBoxType()}},getDisplayFormat(Rt){const mn=this._getDateBoxType();return Rt||Z.FORMATS_MAP[mn]},renderInputMinMax(Rt){Rt.attr({min:x.A.serializeDate(this.dateBox.dateOption("min"),"yyyy-MM-dd"),max:x.A.serializeDate(this.dateBox.dateOption("max"),"yyyy-MM-dd")})}}),sn=(0,C.zk)(),Ei={calendar:"calendar",rollers:"rollers",list:"list",native:"native"},Hi={date:"date",datetime:"datetime",time:"time"},xo={Calendar:N.A,DateView:pt,Native:on,CalendarWithTime:ze,List:Nt},rn=L.A.inherit({_supportedKeys(){return(0,f.X)(this.callBase(),this._strategy.supportedKeys())},_renderButtonContainers(){this.callBase.apply(this,arguments),this._strategy.customizeButtons()},_getDefaultOptions(){return(0,f.X)(this.callBase(),{type:"date",showAnalogClock:!0,value:null,dateSerializationFormat:void 0,min:void 0,max:void 0,displayFormat:null,interval:30,disabledDates:null,pickerType:Ei.calendar,invalidDateMessage:I.A.format("dxDateBox-validation-datetime"),dateOutOfRangeMessage:I.A.format("validation-range"),applyButtonText:I.A.format("OK"),adaptivityEnabled:!1,calendarOptions:{},useHiddenSubmitElement:!0,_showValidationIcon:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{"dropDownOptions.showTitle":!0}},{device:{platform:"android"},options:{buttonsLocation:"bottom after"}},{device(){const Rt=o.A.real(),{platform:mn}=Rt;return"ios"===mn||"android"===mn},options:{pickerType:Ei.native}},{device:{platform:"generic",deviceType:"desktop"},options:{buttonsLocation:"bottom after"}}])},_initOptions(Rt){this._userOptions=(0,f.X)({},Rt),this.callBase(Rt),this._updatePickerOptions()},_updatePickerOptions(){let Rt=this.option("pickerType");const mn=this.option("type");Rt===Ei.list&&(mn===Hi.datetime||mn===Hi.date)&&(Rt=Ei.calendar),mn===Hi.time&&Rt===Ei.calendar&&(Rt=Ei.list),this._pickerType=Rt,this._setShowDropDownButtonOption()},_setShowDropDownButtonOption(){const{platform:Rt}=o.A.real(),mn="android"===Rt&&P.A.mozilla,pi=this._isNativeType();let Ti="generic"!==Rt||!pi;pi&&mn&&(Ti=!1),this.option({showDropDownButton:Ti})},_init(){this._initStrategy(),this.option((0,f.X)({},this._strategy.getDefaultOptions(),this._userOptions)),delete this._userOptions,this.callBase()},_toLowerCaseFirstLetter:Rt=>Rt.charAt(0).toLowerCase()+Rt.substr(1),_initStrategy(){const Rt=this._getStrategyName(this._getFormatType());this._strategy&&this._strategy.NAME===Rt||(this._strategy=new(0,xo[Rt])(this))},_getFormatType(){const Rt=this.option("type"),mn=/h|m|s/g.test(Rt);let Ti="";return/d|M|Y/g.test(Rt)&&(Ti+=Hi.date),mn&&(Ti+=Hi.time),Ti},_getStrategyName(Rt){const mn=this._pickerType;return mn===Ei.rollers?"DateView":mn===Ei.native?"Native":Rt===Hi.date?"Calendar":Rt===Hi.datetime?"CalendarWithTime":"List"},_initMarkup(){this.$element().addClass("dx-datebox"),this.callBase(),this._refreshFormatClass(),this._refreshPickerTypeClass(),this._strategy.renderInputMinMax(this._input())},_render(){this.callBase(),this._formatValidationIcon()},_renderDimensions(){this.callBase(),this.$element().toggleClass("dx-auto-width",!this.option("width")),this._updatePopupWidth(),this._updatePopupHeight()},_dimensionChanged(){this.callBase(),this._updatePopupHeight()},_updatePopupHeight(){var Rt,mn;this._popup&&(null===(Rt=(mn=this._strategy)._updatePopupHeight)||void 0===Rt||Rt.call(mn))},_refreshFormatClass(){const Rt=this.$element();(0,w.__)(Hi,(mn,pi)=>{Rt.removeClass(`dx-datebox-${pi}`)}),Rt.addClass(`dx-datebox-${this.option("type")}`)},_refreshPickerTypeClass(){const Rt=this.$element();(0,w.__)(Ei,(mn,pi)=>{Rt.removeClass(`dx-datebox-${pi}`)}),Rt.addClass(`dx-datebox-${this._pickerType}`)},_formatValidationIcon(){if(!(0,C.Vd)())return;const Rt=this._input().get(0),mn=this.option("rtlEnabled"),pi=this._getClearButtonWidth(),Ti=this._getLongestElementDimensions(),lo=parseFloat(sn.getComputedStyle(Rt).width)-pi,Eo=Ti.width>lo,{style:Jo}=Rt;this.$element().toggleClass("dx-show-invalid-badge",!Eo&&this.option("_showValidationIcon")),Eo?(void 0===this._storedPadding&&(this._storedPadding=mn?Ti.leftPadding:Ti.rightPadding),mn?Jo.paddingLeft=0:Jo.paddingRight=0):mn?Jo.paddingLeft=`${this._storedPadding}px`:Jo.paddingRight=`${this._storedPadding}px`},_getClearButtonWidth(){let Rt=0;if(this._isClearButtonVisible()&&""===this._input().val()){const mn=this.$element().find(".dx-clear-button-area").get(0);Rt=parseFloat(sn.getComputedStyle(mn).width)}return Rt},_getLongestElementDimensions(){const Rt=this._strategy.getDisplayFormat(this.option("displayFormat")),mn=c.A.format(Z.getLongestDate(Rt,c.A.getMonthNames(),c.A.getDayNames()),Rt),pi=this._input(),Ti=pi.get(0),lo=(0,b.D2)(pi,mn),Jo=void 0!==this._storedPadding?this._storedPadding:0;lo.appendTo(this.$element());const fr=parseFloat(sn.getComputedStyle(lo.get(0)).width),Gr=parseFloat(sn.getComputedStyle(Ti).paddingRight),Yn=parseFloat(sn.getComputedStyle(Ti).paddingLeft),ei=fr+Yn+Gr+Jo;return lo.remove(),{width:ei,leftPadding:Yn,rightPadding:Gr}},_getKeyboardListeners(){return this.callBase().concat([this._strategy&&this._strategy.getKeyboardListener()])},_renderPopup(){this.callBase(),this._popup.$wrapper().addClass("dx-datebox-wrapper"),this._renderPopupWrapper()},_getPopupToolbarItems(){var Rt,mn;const pi=this.callBase();return(null===(Rt=(mn=this._strategy)._getPopupToolbarItems)||void 0===Rt?void 0:Rt.call(mn,pi))??pi},_popupConfig(){const Rt=this.callBase();return(0,f.X)(this._strategy.popupConfig(Rt),{title:this._getPopupTitle(),dragEnabled:!1})},_renderPopupWrapper(){if(!this._popup)return;const Rt=this.$element(),mn=(0,f.X)({},Hi,Ei);(0,w.__)(mn,(pi,Ti)=>{Rt.removeClass(`dx-datebox-wrapper-${Ti}`)}),this._popup.$wrapper().addClass(`dx-datebox-wrapper-${this.option("type")}`).addClass(`dx-datebox-wrapper-${this._pickerType}`).addClass("dx-dropdowneditor-overlay")},_renderPopupContent(){this.callBase(),this._strategy.renderPopupContent()},_popupShowingHandler(){this.callBase(),this._strategy.popupShowingHandler()},_popupShownHandler(){this.callBase(),this._strategy.renderOpenedState()},_popupHiddenHandler(){this.callBase(),this._strategy.renderOpenedState(),this._strategy.popupHiddenHandler()},_visibilityChanged(Rt){Rt&&this._formatValidationIcon()},_clearValueHandler(Rt){this.option("text",""),this.callBase(Rt)},_readOnlyPropValue(){if(this._pickerType===Ei.rollers)return!0;const{platform:Rt}=o.A.real();return!this._isNativeType()||"ios"!==Rt&&"android"!==Rt?this.callBase():this.option("readOnly")},_isClearButtonVisible(){return this.callBase()&&!this._isNativeType()},_renderValue(){const Rt=this.dateOption("value");return this.option("text",this._getDisplayedText(Rt)),this._strategy.renderValue(),this.callBase()},_setSubmitValue(){const Rt=this.dateOption("value"),mn=this.option("dateSerializationFormat"),pi=Z.SUBMIT_FORMATS_MAP[this.option("type")],Ti=mn?x.A.serializeDate(Rt,mn):Z.toStandardDateFormat(Rt,pi);this._getSubmitElement().val(Ti)},_getDisplayedText(Rt){const mn=this.option("mode");let pi;if("text"===mn){const Ti=this._strategy.getDisplayFormat(this.option("displayFormat"));pi=c.A.format(Rt,Ti)}else{const Ti=this._getFormatByMode(mn);pi=Ti?c.A.format(Rt,Ti):Z.toStandardDateFormat(Rt,mn)}return pi},_getFormatByMode:Rt=>(0,D.inputType)(Rt)?null:Z.FORMATS_MAP[Rt],_valueChangeEventHandler(Rt){const{text:mn,type:pi,validationError:Ti}=this.option(),lo=this.dateOption("value");if(mn===this._getDisplayedText(lo))return void this._recallInternalValidation(lo,Ti);const Eo=this._getParsedDate(mn),Jo=lo??this._getDateByDefault(),fr=Z.mergeDates(Jo,Eo,pi);if(this._applyInternalValidation(Eo&&"time"===pi?fr:Eo).isValid){const Yn=this._getDisplayedText(fr);Jo&&fr&&Jo.getTime()===fr.getTime()&&Yn!==mn?this._renderValue():this.dateValue(fr,Rt)}},_recallInternalValidation(Rt,mn){(!mn||mn.editorSpecific)&&(this._applyInternalValidation(Rt),this._applyCustomValidation(Rt))},_getDateByDefault(){return this._strategy.useCurrentDateByDefault()&&this._strategy.getDefaultDate()},_getParsedDate(Rt){const mn=this._strategy.getDisplayFormat(this.option("displayFormat"));return this._strategy.getParsedText(Rt,mn)??void 0},_applyInternalValidation(Rt){const pi=!!this.option("text")&&null!==Rt,Ti=!!Rt&&(0,T.$P)(Rt)&&!isNaN(Rt.getTime()),lo=Ti&&_.A.dateInRange(Rt,this.dateOption("min"),this.dateOption("max"),this.option("type")),Eo=!pi&&!Rt||lo;let Jo="";return Ti?lo||(Jo=this.option("dateOutOfRangeMessage")):Jo=this.option("invalidDateMessage"),this._updateInternalValidationState(Eo,Jo),{isValid:Eo,isDate:Ti}},_updateInternalValidationState(Rt,mn){this.option({isValid:Rt,validationError:Rt?null:{editorSpecific:!0,message:mn}})},_applyCustomValidation(Rt){this.validationRequest.fire({editor:this,value:this._serializeDate(Rt)})},_isValueChanged(Rt){const mn=this.dateOption("value");return(mn&&mn.getTime())!==(Rt&&Rt.getTime())},_isTextChanged(Rt){return this.option("text")!==(Rt&&this._getDisplayedText(Rt)||"")},_renderProps(){this.callBase(),this._input().attr("autocomplete","off")},_renderOpenedState(){this._isNativeType()||this.callBase(),this._strategy.isAdaptivityChanged()&&this._refreshStrategy()},_getPopupTitle(){const Rt=this.option("placeholder");if(Rt)return Rt;const mn=this.option("type");return mn===Hi.time?I.A.format("dxDateBox-simulatedDataPickerTitleTime"):mn===Hi.date||mn===Hi.datetime?I.A.format("dxDateBox-simulatedDataPickerTitleDate"):""},_refreshStrategy(){this._strategy.dispose(),this._initStrategy(),this.option(this._strategy.getDefaultOptions()),this._refresh()},_applyButtonHandler(Rt){const mn=this._strategy.getValue();this.dateValue(mn,Rt.event),this.callBase()},_dispose(){var Rt;this.callBase(),null===(Rt=this._strategy)||void 0===Rt||Rt.dispose()},_isNativeType(){return this._pickerType===Ei.native},_updatePopupTitle(){var Rt;null===(Rt=this._popup)||void 0===Rt||Rt.option("title",this._getPopupTitle())},_optionChanged(Rt){switch(Rt.name){case"showClearButton":case"buttons":case"isValid":case"readOnly":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"pickerType":this._updatePickerOptions({pickerType:Rt.value}),this._refreshStrategy(),this._refreshPickerTypeClass(),this._invalidate();break;case"type":this._updatePickerOptions({format:Rt.value}),this._refreshStrategy(),this._refreshFormatClass(),this._renderPopupWrapper(),this._formatValidationIcon(),this._updateValue();break;case"placeholder":this.callBase.apply(this,arguments),this._updatePopupTitle();break;case"min":case"max":{const mn=this.option("isValid");this._applyInternalValidation(this.dateOption("value")),mn||this._applyCustomValidation(this.dateOption("value")),this._invalidate();break}case"dateSerializationFormat":case"interval":case"disabledDates":case"calendarOptions":this._invalidate();break;case"displayFormat":this.option("text",this._getDisplayedText(this.dateOption("value"))),this._renderInputValue();break;case"text":this._strategy.textChangedHandler(Rt.value),this.callBase.apply(this,arguments);break;case"showDropDownButton":this._formatValidationIcon(),this.callBase.apply(this,arguments);break;case"todayButtonText":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"invalidDateMessage":case"dateOutOfRangeMessage":case"adaptivityEnabled":case"showAnalogClock":case"_showValidationIcon":break;default:this.callBase.apply(this,arguments)}},_getSerializationFormat(){const Rt=this.option("value");return this.option("dateSerializationFormat")&&(0,g.A)().forceIsoDateParsing?this.option("dateSerializationFormat"):(0,T.kf)(Rt)?"number":(0,T.Kg)(Rt)?x.A.getDateSerializationFormat(Rt):void 0},_updateValue(Rt){this.callBase(),this._applyInternalValidation(Rt??this.dateOption("value"))},dateValue(Rt,mn){const pi=this._isValueChanged(Rt);return pi&&mn&&this._saveValueChangeEvent(mn),pi||(this._isTextChanged(Rt)?this._updateValue(Rt):""===this.option("text")&&this._applyCustomValidation(Rt)),this.dateOption("value",Rt)},dateOption(Rt,mn){if(1===arguments.length)return x.A.deserializeDate(this.option(Rt));this.option(Rt,this._serializeDate(mn))},_serializeDate(Rt){const mn=this._getSerializationFormat();return x.A.serializeDate(Rt,mn)},_clearValue(){const Rt=this.option("value");this.callBase(),null===Rt&&this._applyCustomValidation(null)},clear(){const Rt=this.option("value");this.callBase(),null===Rt&&this._applyInternalValidation(null)}}),en=Rt=>Rt.getMonth()+1,Zn=(Rt,mn)=>{const pi=Rt.getDate(),Ti=Hn("M",Rt),lo=(0,S.df)(parseInt(mn),Ti.min,Ti.max);Rt.setMonth(lo-1,1);const{min:Eo,max:Jo}=Hn("dM",Rt),fr=(0,S.df)(pi,Eo,Jo);Rt.setDate(fr)},Di={a:Rt=>Rt.getHours()<12?0:1,E:"getDay",y:"getFullYear",M:en,L:en,d:"getDate",H:"getHours",h:"getHours",m:"getMinutes",s:"getSeconds",S:"getMilliseconds"},po=(0,f.X)({},(0,u.rt)(),{a:(Rt,mn)=>{const pi=Rt.getHours();pi>=12!=!!parseInt(mn)&&Rt.setHours((pi+12)%24)},d:(Rt,mn)=>{mn>Hn("dM",Rt).max&&Rt.setMonth(Rt.getMonth()+1),Rt.setDate(mn)},h:(Rt,mn)=>{const pi=Rt.getHours()>=12;Rt.setHours(+mn%12+(pi?12:0))},M:Zn,L:Zn,E:(Rt,mn)=>{mn<0||Rt.setDate(Rt.getDate()-Rt.getDay()+parseInt(mn))},y:(Rt,mn)=>{const pi=Rt.getFullYear(),Ti=String(mn).length,lo=String(Hn("y",Rt).max).length,Eo=parseInt(String(pi).substr(0,lo-Ti)+mn);Rt.setFullYear(Eo)}}),nr=Rt=>Di[Rt]||(()=>Rt),Hn=(Rt,mn,pi)=>{const Ti={y:{min:0,max:9999},M:{min:1,max:12},L:{min:1,max:12},d:{min:1,max:31},dM:{min:1,max:new Date(mn.getFullYear(),mn.getMonth()+1,0).getDate()},E:{min:0,max:6},H:{min:0,max:23},h:{min:1,max:12},m:{min:0,max:59},s:{min:0,max:59},S:{min:0,max:999},a:{min:0,max:1}};return Ti[pi||Rt]||Ti.getAmPm},Zo=rn.inherit({_supportedKeys(Rt){const mn=this.callBase(Rt),pi=lo=>{const Eo=mn[(0,d.YD)(lo)];return Eo&&Eo.apply(this,[lo])},Ti=(lo,Eo)=>this._shouldUseOriginalHandler(lo)?pi.apply(this,[lo]):Eo.apply(this,[lo]);return(0,f.X)({},mn,{del:lo=>Ti(lo,Eo=>{this._revertPart(1),this._isAllSelected()||Eo.preventDefault()}),backspace:lo=>Ti(lo,Eo=>{this._revertPart(-1),this._isAllSelected()||Eo.preventDefault()}),home:lo=>Ti(lo,Eo=>{this._selectFirstPart(),Eo.preventDefault()}),end:lo=>Ti(lo,Eo=>{this._selectLastPart(),Eo.preventDefault()}),escape:lo=>Ti(lo,Eo=>{this._revertChanges(Eo)}),enter:lo=>Ti(lo,()=>{this._enterHandler()}),leftArrow:lo=>Ti(lo,Eo=>{this._selectNextPart(-1),Eo.preventDefault()}),rightArrow:lo=>Ti(lo,Eo=>{this._selectNextPart(1),Eo.preventDefault()}),upArrow:lo=>Ti(lo,Eo=>{this._upDownArrowHandler(1),Eo.preventDefault()}),downArrow:lo=>Ti(lo,Eo=>{this._upDownArrowHandler(-1),Eo.preventDefault()})})},_shouldUseOriginalHandler(Rt){const mn=this.option("opened")&&Rt&&!["backspace","del"].includes((0,d.YD)(Rt));return!this._useMaskBehavior()||mn||Rt&&Rt.altKey},_upDownArrowHandler(Rt){this._setNewDateIfEmpty();const mn=this._getActivePartValue(this._initialMaskValue),Ti=this._getActivePartValue()-mn;this._loadMaskValue(this._initialMaskValue),this._changePartValue(Ti+Rt,!0)},_changePartValue(Rt,mn){const pi=this._getActivePartProp("pattern");/^a{1,5}$/.test(pi)?this._toggleAmPm():this._partIncrease(Rt,mn)},_toggleAmPm(){const Rt=this._getActivePartProp("text"),pi=1^s.A.getPeriodNames().indexOf(Rt);this._setActivePartValue(pi)},_getDefaultOptions(){return(0,f.X)(this.callBase(),{useMaskBehavior:!1,emptyDateValue:new Date(2e3,0,1,0,0,0)})},_isSingleCharKey(Rt){let{originalEvent:mn,alt:pi}=Rt;const Ti=mn.data||mn.key;return"string"==typeof Ti&&1===Ti.length&&!pi&&!(0,d.By)(mn)},_isSingleDigitKey(Rt){var mn;const pi=null===(mn=Rt.originalEvent)||void 0===mn?void 0:mn.data;return 1===pi?.length&&parseInt(pi,10)},_useBeforeInputEvent:()=>o.A.real().android,_keyInputHandler(Rt,mn){const pi=this._input().val();this._processInputKey(mn),Rt.preventDefault(),pi!==this._input().val()&&y.A.trigger(this._input(),"input")},_keyboardHandler(Rt){let{key:mn}=Rt.originalEvent;const pi=this.callBase(Rt);return!this._useMaskBehavior()||this._useBeforeInputEvent()||(P.A.chrome&&"Process"===Rt.key&&0===Rt.code.indexOf("Digit")?(mn=Rt.code.replace("Digit",""),this._processInputKey(mn),this._maskInputHandler=()=>{this._renderSelectedPart()}):this._isSingleCharKey(Rt)&&this._keyInputHandler(Rt.originalEvent,mn)),pi},_maskBeforeInputHandler(Rt){this._maskInputHandler=null;const{inputType:mn}=Rt.originalEvent;"insertCompositionText"===mn&&(this._maskInputHandler=()=>{this._renderSelectedPart()});const pi="deleteContentBackward"===mn;if(pi||"deleteContentForward"===mn){const Eo=pi?-1:1;this._maskInputHandler=()=>{this._revertPart(),this._selectNextPart(Eo)}}if(this._useMaskBehavior()&&this._isSingleCharKey(Rt))return this._keyInputHandler(Rt,Rt.originalEvent.data),!0},_keyPressHandler(Rt){const{originalEvent:mn}=Rt;"insertCompositionText"===mn?.inputType&&this._isSingleDigitKey(Rt)&&(this._processInputKey(mn.data),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()),this.callBase(Rt),this._maskInputHandler&&(this._maskInputHandler(),this._maskInputHandler=null)},_processInputKey(Rt){this._isAllSelected()&&(this._activePartIndex=0),this._setNewDateIfEmpty(),isNaN(parseInt(Rt))?this._searchString(Rt):this._searchNumber(Rt)},_isAllSelected(){const Rt=this._caret();return Rt.end-Rt.start===this.option("text").length},_getFormatPattern(){if(this._formatPattern)return this._formatPattern;const Rt=this._strategy.getDisplayFormat(this.option("displayFormat"));return this._formatPattern=(0,T.Kg)(Rt)&&!c.A._getPatternByFormat(Rt)?Rt:(0,a.g)(pi=>c.A.format(pi,Rt)),this._formatPattern},_setNewDateIfEmpty(){if(!this._maskValue){const Rt="time"===this.option("type")?new Date(null):new Date;this._maskValue=Rt,this._initialMaskValue=Rt,this._renderDateParts()}},_partLimitsReached(Rt){const mn=String(Rt).length,pi=this._getActivePartProp("pattern").length,lo=1===pi?mn:Math.min(pi,mn),Eo=this._searchValue.length===lo,Jo=parseInt(`${this._searchValue}0`)>Rt;return Eo||Jo},_searchNumber(Rt){const{max:mn}=this._getActivePartLimits(),pi=String(mn).length;this._searchValue=(this._searchValue+Rt).substr(-pi),isNaN(this._searchValue)&&(this._searchValue=Rt),this._setActivePartValue(this._searchValue),this._partLimitsReached(mn)&&this._selectNextPart(1)},_searchString(Rt){if(!isNaN(parseInt(this._getActivePartProp("text"))))return;const mn=this._getActivePartProp("limits")(this._maskValue),pi=this._searchValue+Rt.toLowerCase(),Ti=mn.max-mn.min;for(let lo=0;lo<=Ti;lo++)if(this._loadMaskValue(this._initialMaskValue),this._changePartValue(lo+1),0===this._getActivePartProp("text").toLowerCase().indexOf(pi))return void(this._searchValue=pi);this._setNewDateIfEmpty(),this._searchValue&&(this._clearSearchValue(),this._searchString(Rt))},_clearSearchValue(){this._searchValue=""},_revertPart(Rt){if(!this._isAllSelected()){const mn=this._getActivePartValue(this.option("emptyDateValue"));this._setActivePartValue(mn),this._selectNextPart(Rt)}this._clearSearchValue()},_useMaskBehavior(){return this.option("useMaskBehavior")&&"text"===this.option("mode")},_prepareRegExpInfo(){this._regExpInfo=(0,u.wu)(this._getFormatPattern(),c.A);const{regexp:Rt}=this._regExpInfo,{source:mn}=Rt,{flags:pi}=Rt,Ti=new RegExp(/(\{[0-9]+,?[0-9]*\})/),lo=mn.split(Ti).map(Eo=>Ti.test(Eo)?Eo:h.A.convertDigits(Eo,!1)).join("");this._regExpInfo.regexp=new RegExp(lo,pi)},_initMaskState(){this._activePartIndex=0,this._formatPattern=null,this._prepareRegExpInfo(),this._loadMaskValue()},_renderMask(){this.callBase(),this._detachMaskEvents(),this._clearMaskState(),this._useMaskBehavior()&&(this._attachMaskEvents(),this._initMaskState(),this._renderDateParts())},_renderDateParts(){if(!this._useMaskBehavior())return;const Rt=this.option("text")||this._getDisplayedText(this._maskValue);Rt&&(this._dateParts=((Rt,mn)=>{const pi=mn.regexp.exec(Rt);let Ti=0,lo=0;const Eo=[];for(let Jo=1;Jo<pi.length;Jo++){Ti=lo,lo=Ti+pi[Jo].length;const fr=mn.patterns[Jo-1].replace(/^'|'$/g,""),Gr=nr(fr[0]);Eo.push({index:Jo-1,isStub:fr===pi[Jo],caret:{start:Ti,end:lo},pattern:fr,text:pi[Jo],limits:function(){for(var Yn=arguments.length,ei=new Array(Yn),Ii=0;Ii<Yn;Ii++)ei[Ii]=arguments[Ii];return Hn(fr[0],...ei)},setter:po[fr[0]]||st.lQ,getter:Gr})}return Eo})(Rt,this._regExpInfo),this._input().is(":hidden")||this._selectNextPart())},_detachMaskEvents(){y.A.off(this._input(),".dateBoxMask")},_attachMaskEvents(){y.A.on(this._input(),(0,d.b4)("dxclick","dateBoxMask"),this._maskClickHandler.bind(this)),y.A.on(this._input(),(0,d.b4)("paste","dateBoxMask"),this._maskPasteHandler.bind(this)),y.A.on(this._input(),(0,d.b4)("drop","dateBoxMask"),()=>{this._renderSelectedPart()}),y.A.on(this._input(),(0,d.b4)("compositionend","dateBoxMask"),this._maskCompositionEndHandler.bind(this)),this._useBeforeInputEvent()&&y.A.on(this._input(),(0,d.b4)("beforeinput","dateBoxMask"),this._maskBeforeInputHandler.bind(this))},_renderSelectedPart(){this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()},_selectLastPart(){this.option("text")&&(this._activePartIndex=this._dateParts.length,this._selectNextPart(-1))},_selectFirstPart(){this.option("text")&&(this._activePartIndex=-1,this._selectNextPart(1))},_onMouseWheel(Rt){this._useMaskBehavior()&&this._partIncrease(Rt.delta>0?1:-1,Rt)},_selectNextPart(){let Rt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this.option("text")||this._disposed)return;Rt&&(this._initialMaskValue=new Date(this._maskValue));let mn=(0,S.df)(this._activePartIndex+Rt,0,this._dateParts.length-1);if(this._dateParts[mn].isStub){if(!(0===mn&&Rt<0||mn===this._dateParts.length-1&&Rt>0))return void this._selectNextPart(Rt>=0?Rt+1:Rt-1);mn=this._activePartIndex}this._activePartIndex!==mn&&this._clearSearchValue(),this._activePartIndex=mn,this._caret(this._getActivePartProp("caret"))},_getRealLimitsPattern(){if("d"===this._getActivePartProp("pattern")[0])return"dM"},_getActivePartLimits(Rt){return this._getActivePartProp("limits")(this._maskValue,Rt&&this._getRealLimitsPattern())},_getActivePartValue(Rt){Rt=Rt||this._maskValue;const mn=this._getActivePartProp("getter");return(0,T.Tn)(mn)?mn(Rt):Rt[mn]()},_addLeadingZeroes(Rt){const mn=this._searchValue.match(/^0+/),pi=this._getActivePartLimits(),Ti=String(pi.max).length;return((mn&&mn[0]||"")+String(Rt)).substr(-Ti)},_setActivePartValue(Rt,mn){mn=mn||this._maskValue;const pi=this._getActivePartProp("setter"),Ti=this._getActivePartLimits();Rt=(0,S.r4)(Rt,Ti.min,Ti.max)?Rt:Rt%10,Rt=this._addLeadingZeroes((0,S.df)(Rt,Ti.min,Ti.max)),(0,T.Tn)(pi)?pi(mn,Rt):mn[pi](Rt),this._renderDisplayText(this._getDisplayedText(mn)),this._renderDateParts()},_getActivePartProp(Rt){if(this._dateParts&&this._dateParts[this._activePartIndex])return this._dateParts[this._activePartIndex][Rt]},_loadMaskValue(){let Rt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dateOption("value");this._maskValue=Rt&&new Date(Rt),this._initialMaskValue=Rt&&new Date(Rt)},_saveMaskValue(){const Rt=this._maskValue&&new Date(this._maskValue);Rt&&"date"===this.option("type")&&Rt.setHours(0,0,0,0),this._initialMaskValue=new Date(Rt),this.dateOption("value",Rt)},_revertChanges(){this._loadMaskValue(),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts()},_renderDisplayText(Rt){this.callBase(Rt),this._useMaskBehavior()&&this.option("text",Rt)},_partIncrease(Rt,mn){this._setNewDateIfEmpty();const{max:pi,min:Ti}=this._getActivePartLimits(mn);let lo=Rt+this._getActivePartValue();lo>pi?lo=this._applyLimits(lo,{limitBase:Ti,limitClosest:pi,max:pi}):lo<Ti&&(lo=this._applyLimits(lo,{limitBase:pi,limitClosest:Ti,max:pi})),this._setActivePartValue(lo)},_applyLimits(Rt,mn){let{limitBase:pi,limitClosest:Ti,max:lo}=mn;const Eo=(Rt-Ti)%lo;return Eo?pi+Eo-1*(0,S._S)(Eo):Ti},_maskClickHandler(){this._loadMaskValue(this._maskValue),this.option("text")&&(this._activePartIndex=((Rt,mn)=>{for(let pi=0;pi<Rt.length;pi++)if(!Rt[pi].isStub&&Rt[pi].caret.end>=mn)return pi;return null})(this._dateParts,this._caret().start),this._isAllSelected()||((0,T.O9)(this._activePartIndex)?this._caret(this._getActivePartProp("caret")):this._selectLastPart()))},_maskCompositionEndHandler(Rt){this._input().val(this._getDisplayedText(this._maskValue)),this._selectNextPart(),this._maskInputHandler=()=>{this._renderSelectedPart()}},_maskPasteHandler(Rt){const mn=this._replaceSelectedText(this.option("text"),this._caret(),(0,b.KR)(Rt)),pi=c.A.parse(mn,this._getFormatPattern());pi&&this._isDateValid(pi)&&(this._maskValue=pi,this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts(),this._selectNextPart()),Rt.preventDefault()},_isDateValid:Rt=>(0,T.$P)(Rt)&&!isNaN(Rt),_isValueDirty(){const Rt=this.dateOption("value");return(this._maskValue&&this._maskValue.getTime())!==(Rt&&Rt.getTime())},_fireChangeEvent(){this._clearSearchValue(),this._isValueDirty()&&y.A.trigger(this._input(),"change")},_enterHandler(){this._fireChangeEvent(),this._selectNextPart(1)},_focusOutHandler(Rt){this._useMaskBehavior()&&!Rt.isDefaultPrevented()?(this._fireChangeEvent(),this.callBase(Rt),this._selectFirstPart(Rt)):this.callBase(Rt)},_valueChangeEventHandler(Rt){const mn=this.option("text");this._useMaskBehavior()?(this._saveValueChangeEvent(Rt),mn?null===this._maskValue&&this._loadMaskValue(mn):this._maskValue=null,this._saveMaskValue()):this.callBase(Rt)},_optionChanged(Rt){switch(Rt.name){case"useMaskBehavior":this._renderMask();break;case"displayFormat":case"mode":this.callBase(Rt),this._renderMask();break;case"value":this._loadMaskValue(),this.callBase(Rt),this._renderDateParts();break;case"emptyDateValue":break;default:this.callBase(Rt)}},_clearMaskState(){this._clearSearchValue(),delete this._dateParts,delete this._activePartIndex,delete this._maskValue},clear(){this._clearMaskState(),this._activePartIndex=0,this.callBase()},_clean(){this.callBase(),this._detachMaskEvents(),this._clearMaskState()}});(0,W.A)("dxDateBox",Zo);const hr=Zo},8761:(In,Ze,M)=>{"use strict";M.d(Ze,{lJ:()=>Z,Ie:()=>q});var W=M(5737),o=M(9510),P=M(3686),b=M(5973),f=M(2925),S=M(5704),T=M(4859),y=M(6021),d=M(1832),c=M(3090),s=M(1363),a=M(1830),u=M(4017),h=M(6110),g=M(4072),_=M(8360),x=M(8628),w=M(9212),D=M(127);const C=(0,h.zk)(),I={text:"OK",onClick:()=>!0},q=function(Q){const te=(0,y.cY)();Q=Q||{};const pe=(0,S.A)("<div>").addClass("dx-dialog").appendTo((0,u.Uq)()),oe="messageHtml"in Q;"message"in Q&&D.A.log("W1013");const ae=String(oe?Q.messageHtml:Q.message),ee=Q.title?null:new f.A,he=(0,S.A)("<div>").addClass("dx-dialog-message").html(ae).attr("id",ee),de=[],ue=new x.A(pe,(0,c.X)({title:Q.title??"",showTitle:(0,T.YD)(Q.showTitle,!0),dragEnabled:(0,T.YD)(Q.dragEnabled,!0),height:"auto",width:Q.width,showCloseButton:Q.showCloseButton||!1,ignoreChildEvents:!1,container:pe,visualContainer:C,dragAndResizeArea:C,onContentReady(le){le.component.$content().addClass("dx-dialog-content").append(he),ee&&le.component.$overlayContent().attr("aria-labelledby",ee)},onShowing(le){le.component.bottomToolbar().addClass("dx-dialog-buttons").find(".dx-button").addClass("dx-dialog-button"),(0,d.GX)()},onShown(le){const Ce=le.component.bottomToolbar().find(".dx-button").first();g.A.trigger(Ce,"focus")},onHiding(){te.reject()},onHidden(le){let{element:Ce}=le;(0,S.A)(Ce).remove()},animation:{show:{type:"pop",duration:400},hide:{type:"pop",duration:400,to:{opacity:0,scale:0},from:{opacity:1,scale:1}}},rtlEnabled:(0,P.A)().rtlEnabled,position:{boundaryOffset:{h:10,v:0}}},Q.popupOptions));function ve(le){te.resolve(le),ue.hide()}return(Q.buttons||[I]).forEach(le=>{const Ce=new o.A(le.onClick,{context:ue});de.push({toolbar:"bottom",location:b.A.current().android?"after":"center",widget:"dxButton",options:(0,W.A)({},le,{onClick(){ve(Ce.execute(...arguments))}})})}),ue.option("toolbarItems",de),ue.$wrapper().addClass("dx-dialog-wrapper"),Q.position&&ue.option("position",Q.position),ue.$wrapper().addClass("dx-dialog-root"),{show:function(){if("phone"===b.A.real().deviceType){const Ce=(0,s.Oq)(C)>(0,s.RG)(C)?"90%":"60%";ue.option({width:Ce})}return ue.show(),te.promise()},hide:ve}},Z=function(Q){let te=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",pe=arguments.length>2?arguments[2]:void 0;const z=(0,a.Qd)(Q)?Q:{title:te,messageHtml:Q,showTitle:pe,buttons:[(0,W.A)({text:_.A.format("Yes"),onClick:()=>!0},(0,w.Ft)()?{stylingMode:"contained",type:"default"}:{}),(0,W.A)({text:_.A.format("No"),onClick:()=>!1},(0,w.Ft)()?{stylingMode:"outlined",type:"default"}:{})],dragEnabled:pe};return q(z).show()}},3312:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(5213).A},215:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ee});var W=M(2583),o=M(1973),P=M(9522),b=M(5704),f=M(8412),S=M(6021),T=M(3090),y=M(4757),d=M(1830),c=M(6110),s=M(778),a=M(4072),u=M(9229),h=M(7080),g=M(6946);const _={moveTo(he){const{$element:de}=he,{position:ue}=he,ve={};let le;switch(he.direction||"left"){case"right":ve.transform=`translate(${ue}px, 0px)`,le="custom";break;case"left":ve.left=ue,le="slide";break;case"top":case"bottom":ve.top=ue,le="slide"}W.A.animate(de,{type:le,to:ve,duration:he.duration,complete:he.complete})},margin(he){const{$element:de}=he,{margin:ue}=he,ve={};ve[`margin${(0,g.PT)(he.direction||"left",!0)}`]=ue,W.A.animate(de,{to:ve,duration:he.duration,complete:he.complete})},fade(he,de,ue,be){W.A.animate(he,{type:"fade",to:de.to,from:de.from,duration:ue,complete:be})},size(he){const{$element:de}=he,{size:ue}=he,be=he.direction||"left",ve=he.marginTop||0,{duration:le}=he,Ce={};"right"===be||"left"===be?Ce.width=ue:Ce.height=ue,"bottom"===be&&(Ce.marginTop=ve),W.A.animate(de,{to:Ce,duration:le,complete:he.complete})},complete(he){W.A.stop(he,!0)}};var x=M(4504),w=M(4859),D=M(1363),C=M(3949);const L=class I{constructor(de){this._drawer=de}getDrawerInstance(){return this._drawer}renderPanelContent(de){const ue=this.getDrawerInstance(),be=ue._getTemplate(ue.option("template"));be&&be.render({container:ue.content(),onRendered:()=>{de.resolve()}})}renderPosition(de,ue){const be=(0,S.cY)(),ve=(0,S.cY)(),le=this.getDrawerInstance();de&&S.z7.apply(b.A,[be,ve]).done(()=>{le._animationCompleteHandler()}),this._internalRenderPosition(de,be),de||le.resizeViewContent(),this.renderShaderVisibility(de,ue,ve)}_getPanelOffset(de){const ue=this.getDrawerInstance(),be=ue.isHorizontalDirection()?ue.getRealPanelWidth():ue.getRealPanelHeight();return de?-(be-ue.getMaxSize()):-(be-ue.getMinSize())}_getPanelSize(de){return de?this.getDrawerInstance().getMaxSize():this.getDrawerInstance().getMinSize()}renderShaderVisibility(de,ue,be){const ve=this.getDrawerInstance(),le=ve.option("opened"),Ce=le?{from:0,to:1}:{from:1,to:0};de?_.fade((0,b.A)(ve._$shader),Ce,ue,()=>{this._drawer._toggleShaderVisibility(le),be.resolve()}):(ve._toggleShaderVisibility(le),ve._$shader.css("opacity",Ce.to))}getPanelContent(){return(0,b.A)(this.getDrawerInstance().content())}setPanelSize(de){this.refreshPanelElementSize(de)}refreshPanelElementSize(de){const ue=this.getDrawerInstance(),be=this._getPanelSize(ue.option("opened"));ue.isHorizontalDirection()?(0,D.zj)((0,b.A)(ue.content()),de?ue.getRealPanelWidth():be):(0,D.k$)((0,b.A)(ue.content()),de?ue.getRealPanelHeight():be)}isViewContentFirst(){return!1}onPanelContentRendered(){}},G=class N extends L{renderPanelContent(de){delete this._initialPosition;const ue=this.getDrawerInstance(),{opened:be,minSize:ve}=ue.option();ue._overlay=ue._createComponent(ue.content(),C.A,{shading:!1,container:ue.content(),visualContainer:ue.getOverlayTarget(),position:this._getOverlayPosition(),width:be?"auto":ve||0,height:"100%",templatesRenderAsynchronously:ue.option("templatesRenderAsynchronously"),animation:{show:{duration:0}},onPositioned:function(le){this._fixOverlayPosition(le.component.$content())}.bind(this),contentTemplate:ue.option("template"),onContentReady:le=>{de.resolve(),this._processOverlayZIndex(le.component.content())},visible:!0,propagateOutsideClick:!0})}_fixOverlayPosition(de){const ue=(0,w.YD)(this._initialPosition,{left:0,top:0});(0,x.Cy)(de,ue),"right"===this.getDrawerInstance().calcTargetPosition()&&de.css("left","auto"),"bottom"===this.getDrawerInstance().calcTargetPosition()&&(de.css("top","auto"),de.css("bottom","0px"))}_getOverlayPosition(){const de=this.getDrawerInstance(),ue=de.calcTargetPosition();let be={};switch(ue){case"left":be={my:"top left",at:"top left"};break;case"right":be={my:de.option("rtlEnabled")?"top left":"top right",at:"top right"};break;case"top":case"bottom":be={my:ue,at:ue}}return be.of=de.getOverlayTarget(),be}refreshPanelElementSize(de){const ue=this.getDrawerInstance(),be=ue.getOverlay();ue.isHorizontalDirection()?(be.option("height","100%"),be.option("width",de?ue.getRealPanelWidth():this._getPanelSize(ue.option("opened")))):(be.option("width",(0,D.RG)(ue.getOverlayTarget())),be.option("height",de?ue.getRealPanelHeight():this._getPanelSize(ue.option("opened"))))}onPanelContentRendered(){this._updateViewContentStyles()}_updateViewContentStyles(){const de=this.getDrawerInstance();(0,b.A)(de.viewContent()).css(`padding${(0,g.PT)(de.calcTargetPosition(),!0)}`,de.option("minSize")),(0,b.A)(de.viewContent()).css("transform","inherit")}_internalRenderPosition(de,ue){const be=this.getDrawerInstance(),ve=(0,b.A)(be.content()),le=be.getOverlay().$content(),Ce=be.option("revealMode"),ye=be.calcTargetPosition(),ge=this._getPanelSize(be.option("opened")),fe=this._getPanelOffset(be.option("opened"))*be._getPositionCorrection(),xe=be.getRealPanelHeight()-ge;this._updateViewContentStyles(),de?"slide"===Ce?(this._initialPosition=be.isHorizontalDirection()?{left:fe}:{top:fe},_.moveTo({complete:()=>{ue.resolve()},duration:be.option("animationDuration"),direction:ye,$element:ve,position:fe})):"expand"===Ce&&(this._initialPosition=be.isHorizontalDirection()?{left:0}:{top:0},(0,x.Cy)(le,this._initialPosition),_.size({complete:()=>{ue.resolve()},duration:be.option("animationDuration"),direction:ye,$element:le,size:ge,marginTop:xe})):"slide"===Ce?(this._initialPosition=be.isHorizontalDirection()?{left:fe}:{top:fe},(0,x.Cy)(ve,this._initialPosition)):"expand"===Ce&&(this._initialPosition=be.isHorizontalDirection()?{left:0}:{top:0},(0,x.Cy)(le,this._initialPosition),be.isHorizontalDirection()?(0,b.A)(le).css("width",ge):((0,b.A)(le).css("height",ge),"bottom"===ye&&(0,b.A)(le).css("marginTop",xe)))}getPanelContent(){return(0,b.A)(this.getDrawerInstance().getOverlay().content())}_processOverlayZIndex(de){const be=(0,b.A)(de).get(0).style.zIndex||1;this.getDrawerInstance().setZIndex(be)}isViewContentFirst(de){return"right"===de||"bottom"===de}},U=class k extends L{_internalRenderPosition(de,ue){const be=this.getDrawerInstance(),ve=this._getPanelSize(!0),le=this._getPanelSize(be.option("opened"))*be._getPositionCorrection();if((0,b.A)(be.content()).css(be.isHorizontalDirection()?"width":"height",ve),be.getMinSize()){let Ce="padding";switch(be.calcTargetPosition()){case"left":Ce+="Right";break;case"right":Ce+="Left";break;case"top":Ce+="Bottom";break;case"bottom":Ce+="Top"}(0,b.A)(be.viewContent()).css(Ce,be.getMinSize())}de?_.moveTo({$element:(0,b.A)(be.viewContent()),position:le,direction:be.calcTargetPosition(),duration:be.option("animationDuration"),complete:()=>{ue.resolve()}}):be.isHorizontalDirection()?(0,x.Cy)((0,b.A)(be.viewContent()),{left:le}):(0,x.Cy)((0,b.A)(be.viewContent()),{top:le})}onPanelContentRendered(){(0,b.A)(this.getDrawerInstance().viewContent()).addClass("dx-theme-background-color")}},K=class B extends L{_internalRenderPosition(de,ue){const be=this.getDrawerInstance(),ve=be.calcTargetPosition(),le=(0,b.A)(be.content()),Ce=this._getPanelSize(be.option("opened")),ye=this._getPanelOffset(be.option("opened")),ge=be.option("revealMode");de?"slide"===ge?_.margin({complete:()=>{ue.resolve()},$element:le,duration:be.option("animationDuration"),direction:ve,margin:ye}):"expand"===ge&&_.size({complete:()=>{ue.resolve()},$element:le,duration:be.option("animationDuration"),direction:ve,size:Ce}):"slide"===ge?le.css(`margin${(0,g.PT)(ve,!0)}`,ye):"expand"===ge&&le.css(be.isHorizontalDirection()?"width":"height",Ce)}isViewContentFirst(de,ue){return(ue?"left"===de:"right"===de)||"bottom"===de}},oe=h.A.inherit({_getDefaultOptions(){return(0,T.X)(this.callBase(),{position:"left",opened:!1,minSize:null,maxSize:null,shading:!1,template:"panel",openedStateMode:"shrink",revealMode:"slide",animationEnabled:!0,animationDuration:400,closeOnOutsideClick:!1,contentTemplate:"content"})},_init(){this.callBase(),this._initStrategy(),this.$element().addClass("dx-drawer"),this._whenAnimationCompleted=void 0,this._whenPanelContentRendered=void 0,this._whenPanelContentRefreshed=void 0,this._$wrapper=(0,b.A)("<div>").addClass("dx-drawer-wrapper"),this._$viewContentWrapper=(0,b.A)("<div>").addClass("dx-drawer-content"),this._$wrapper.append(this._$viewContentWrapper),this.$element().append(this._$wrapper)},_initStrategy(){switch(this.option("openedStateMode")){case"push":default:this._strategy=new U(this);break;case"shrink":this._strategy=new K(this);break;case"overlap":this._strategy=new G(this)}},_getAnonymousTemplateName:()=>"content",_initTemplates(){const he={};he.panel=new f.A,he.content=new f.A,this._templateManager.addDefaultTemplates(he),this.callBase()},_viewContentWrapperClickHandler(he){let de=this.option("closeOnOutsideClick");(0,d.Tn)(de)&&(de=de(he)),de&&this.option("opened")&&(this.stopAnimations(),this.option("shading")&&he.preventDefault(),this.hide())},_initMarkup(){this.callBase(),this._toggleOpenedStateClass(this.option("opened")),this._renderPanelContentWrapper(),this._refreshOpenedStateModeClass(),this._refreshRevealModeClass(),this._renderShader(),this._refreshPositionClass(),this._whenPanelContentRendered=(0,S.cY)(),this._strategy.renderPanelContent(this._whenPanelContentRendered),this._strategy.onPanelContentRendered(),this._renderViewContent(),a.A.off(this._$viewContentWrapper,s.U),a.A.on(this._$viewContentWrapper,s.U,this._viewContentWrapperClickHandler.bind(this)),this._refreshWrapperChildrenOrder()},_render(){this._initMinMaxSize(),this.callBase(),this._whenPanelContentRendered.always(()=>{this._initMinMaxSize(),this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!0),this._removePanelManualPosition()})},_removePanelManualPosition(){this._$panelContentWrapper.attr("manualposition")&&(this._$panelContentWrapper.removeAttr("manualPosition"),this._$panelContentWrapper.css({position:"",top:"",left:"",right:"",bottom:""}))},_togglePanelContentHiddenClass(){const he=()=>{const{minSize:de,opened:ue}=this.option();this._$panelContentWrapper.toggleClass("dx-drawer-panel-content-hidden",!de&&!ue)};this._whenAnimationCompleted&&!this.option("opened")?(0,S.z7)(this._whenAnimationCompleted).done(he):he()},_renderPanelContentWrapper(){const{openedStateMode:he,opened:de,minSize:ue}=this.option();this._$panelContentWrapper=(0,b.A)("<div>").addClass("dx-drawer-panel-content"),this._togglePanelContentHiddenClass();const be=this.calcTargetPosition();"push"===he&&["top","bottom"].includes(be)&&this._$panelContentWrapper.addClass("dx-drawer-panel-content-push-top-or-bottom"),"overlap"!==he&&!de&&!ue&&(this._$panelContentWrapper.attr("manualposition",!0),this._$panelContentWrapper.css({position:"absolute",top:"-10000px",left:"-10000px",right:"auto",bottom:"auto"})),this._$wrapper.append(this._$panelContentWrapper)},_refreshOpenedStateModeClass(he){he&&this.$element().removeClass(`dx-drawer-${he}`),this.$element().addClass(`dx-drawer-${this.option("openedStateMode")}`)},_refreshPositionClass(he){he&&this.$element().removeClass(`dx-drawer-${he}`),this.$element().addClass(`dx-drawer-${this.calcTargetPosition()}`)},_refreshWrapperChildrenOrder(){const he=this.calcTargetPosition();this._strategy.isViewContentFirst(he,this.option("rtlEnabled"))?this._$wrapper.prepend(this._$viewContentWrapper):this._$wrapper.prepend(this._$panelContentWrapper)},_refreshRevealModeClass(he){he&&this.$element().removeClass(`dx-drawer-${he}`),this.$element().addClass(`dx-drawer-${this.option("revealMode")}`)},_renderViewContent(){const he=this.option("contentTemplate"),de=this._getTemplate(he);if(de){const ue=de.render({container:this.viewContent(),noModel:!0,transclude:this._templateManager.anonymousTemplateName===he});ue.hasClass("ng-scope")&&(0,b.A)(this._$viewContentWrapper).children().not(".dx-drawer-shader").replaceWith(ue)}},_renderShader(){this._$shader=this._$shader||(0,b.A)("<div>").addClass("dx-drawer-shader"),this._$shader.appendTo(this.viewContent()),this._toggleShaderVisibility(this.option("opened"))},_initSize(){this._initMinMaxSize()},_initMinMaxSize(){const he=this.isHorizontalDirection()?this.getRealPanelWidth():this.getRealPanelHeight();this._maxSize=this.option("maxSize")||he,this._minSize=this.option("minSize")||0},calcTargetPosition(){const he=this.option("position"),de=this.option("rtlEnabled");let ue=he;return"before"===he?ue=de?"right":"left":"after"===he&&(ue=de?"left":"right"),ue},getOverlayTarget(){return this._$wrapper},getOverlay(){return this._overlay},getMaxSize(){return this._maxSize},getMinSize(){return this._minSize},getRealPanelWidth(){return(0,c.Vd)()?(0,d.O9)(this.option("templateSize"))?this.option("templateSize"):(0,y.N)(this._getPanelTemplateElement()).width:0},getRealPanelHeight(){return(0,c.Vd)()?(0,d.O9)(this.option("templateSize"))?this.option("templateSize"):(0,y.N)(this._getPanelTemplateElement()).height:0},_getPanelTemplateElement(){const he=this._strategy.getPanelContent();let de=he;return he.children().length&&(de=he.children().eq(0),he.hasClass("dx-overlay-content")&&de.hasClass("dx-template-wrapper")&&de.children().length&&(de=de.children().eq(0))),de.get(0)},getElementHeight(he){const de=he.children();return de.length?(0,y.N)(de.eq(0).get(0)).height:(0,y.N)(he.get(0)).height},isHorizontalDirection(){const he=this.calcTargetPosition();return"left"===he||"right"===he},stopAnimations(he){W.A.stop(this._$shader,he),W.A.stop((0,b.A)(this.content()),he),W.A.stop((0,b.A)(this.viewContent()),he);const de=this.getOverlay();de&&W.A.stop((0,b.A)(de.$content()),he)},setZIndex(he){this._$shader.css("zIndex",he-1),this._$panelContentWrapper.css("zIndex",he)},resizeContent(){},resizeViewContent(){(0,u.ho)(this.viewContent())},_isInvertedPosition(){const he=this.calcTargetPosition();return"right"===he||"bottom"===he},_renderPosition(he,de,ue){if(this.stopAnimations(ue),!(0,c.Vd)())return;(0,b.A)(this.viewContent()).css("paddingLeft",0),(0,b.A)(this.viewContent()).css("paddingRight",0),(0,b.A)(this.viewContent()).css("paddingTop",0),(0,b.A)(this.viewContent()).css("paddingBottom",0);let be=this.option("animationEnabled");!0===de&&(be=!1),he&&this._toggleShaderVisibility(he),this._strategy.renderPosition(be,this.option("animationDuration"))},_animationCompleteHandler(){this.resizeViewContent(),this._whenAnimationCompleted&&this._whenAnimationCompleted.resolve()},_getPositionCorrection(){return this._isInvertedPosition()?-1:1},_dispose(){_.complete((0,b.A)(this.viewContent())),this.callBase()},_visibilityChanged(he){he&&this._dimensionChanged()},_dimensionChanged(){this._initMinMaxSize(),this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!0)},_toggleShaderVisibility(he){this.option("shading")?(this._$shader.toggleClass("dx-state-invisible",!he),this._$shader.css("visibility",he?"visible":"hidden")):this._$shader.toggleClass("dx-state-invisible",!0)},_toggleOpenedStateClass(he){this.$element().toggleClass("dx-drawer-opened",he)},_refreshPanel(){(0,b.A)(this.viewContent()).css("left",0),(0,b.A)(this.viewContent()).css("transform","translate(0px, 0px)"),(0,b.A)(this.viewContent()).removeClass("dx-theme-background-color"),this._removePanelContentWrapper(),this._removeOverlay(),this._renderPanelContentWrapper(),this._refreshWrapperChildrenOrder(),this._whenPanelContentRefreshed=(0,S.cY)(),this._strategy.renderPanelContent(this._whenPanelContentRefreshed),this._strategy.onPanelContentRendered(),(0,c.Vd)()&&this._whenPanelContentRefreshed.always(()=>{this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!0,!0),this._removePanelManualPosition()})},_clean(){this._cleanFocusState(),this._removePanelContentWrapper(),this._removeOverlay()},_removePanelContentWrapper(){this._$panelContentWrapper&&this._$panelContentWrapper.remove()},_removeOverlay(){this._overlay&&(this._overlay.dispose(),delete this._overlay,delete this._$panelContentWrapper)},_optionChanged(he){switch(he.name){case"width":this.callBase(he),this._dimensionChanged();break;case"opened":this._renderPosition(this.option("opened")),this._toggleOpenedStateClass(he.value),this._togglePanelContentHiddenClass();break;case"position":this._refreshPositionClass(he.previousValue),this._refreshWrapperChildrenOrder(),this._invalidate();break;case"contentTemplate":case"template":this._invalidate();break;case"openedStateMode":this._initStrategy(),this._refreshOpenedStateModeClass(he.previousValue),this._refreshPanel();break;case"minSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!0),this._togglePanelContentHiddenClass();break;case"maxSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!0);break;case"revealMode":this._refreshRevealModeClass(he.previousValue),this._refreshPanel();break;case"shading":this._toggleShaderVisibility(this.option("opened"));break;case"animationEnabled":case"animationDuration":case"closeOnOutsideClick":break;default:this.callBase(he)}},content(){return(0,P.cc)(this._$panelContentWrapper)},viewContent(){return(0,P.cc)(this._$viewContentWrapper)},show(){return this.toggle(!0)},hide(){return this.toggle(!1)},toggle(he){const de=void 0===he?!this.option("opened"):he;return this._whenAnimationCompleted=(0,S.cY)(),this.option("opened",de),this._whenAnimationCompleted.promise()}});(0,o.A)("dxDrawer",oe);const ee=oe},4083:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>z});var W=M(5737),o=M(1973),P=M(9522),b=M(2925),f=M(5704),S=M(5645),T=M(4859),y=M(4270),d=M(6021),c=M(3090),s=M(8535),a=M(1830),u=M(1614),h=M(1221),g=M(5335);const w=class _{constructor(ae,ee){let{key:he}=ee;this._isSharedDataSource=!1,this._keyExpr=he,this.updateDataSource(ae)}_updateDataSource(ae){if(ae)if(ae instanceof h.q)this._isSharedDataSource=!0,this._dataSource=ae;else{const ee=(0,g.ho)(ae);this._dataSource=new h.q((0,c.X)(!0,{},{},ee))}}_updateDataSourceByItems(ae){this._dataSource=new h.q({store:new u.A({key:this.key(),data:ae}),pageSize:0})}_disposeDataSource(){this._dataSource&&(this._isSharedDataSource?this._isSharedDataSource=!1:this._dataSource.dispose(),delete this._dataSource)}load(){return this._dataSource.load()}loadSingle(ae,ee){if(!this._dataSource)return(new d.cY).reject();let he=ae,de=ee;return arguments.length<2&&(de=ae,he=this.key()),this._dataSource.loadSingle(he,de)}loadFromStore(ae){return this.store().load(ae)}loadNextPage(){return this.pageIndex(1+this.pageIndex()),this.load()}loadOptions(){return this._dataSource.loadOptions()}userData(){return this._dataSource._userData}cancel(ae){this._dataSource.cancel(ae)}cancelAll(){this._dataSource.cancelAll()}filter(ae){return this._dataSource.filter(ae)}addSearchFilter(ae){this._dataSource._addSearchFilter(ae)}group(ae){return this._dataSource.group(ae)}paginate(){return this._dataSource.paginate()}pageSize(){return this._dataSource._pageSize}pageIndex(ae){return this._dataSource.pageIndex(void 0===ae?void 0:ae)}resetDataSource(){this._disposeDataSource()}resetDataSourcePageIndex(){this.pageIndex()&&(this.pageIndex(0),this.load())}updateDataSource(ae,ee){const he=ae??this.items();ee&&(this._keyExpr=ee),this._disposeDataSource(),Array.isArray(he)?this._updateDataSourceByItems(he):this._updateDataSource(he)}totalCount(){return this._dataSource.totalCount()}isLastPage(){return this._dataSource.isLastPage()||!this._dataSource._pageSize}isLoading(){return this._dataSource.isLoading()}isLoaded(){return this._dataSource.isLoaded()}searchValue(ae){return this._dataSource.searchValue(ae)}searchOperation(ae){return this._dataSource.searchOperation(ae)}searchExpr(ae){return this._dataSource.searchExpr(ae)}select(){for(var ae=arguments.length,ee=new Array(ae),he=0;he<ae;he++)ee[he]=arguments[he];return this._dataSource.select(ee)}key(){var ae;const ee=null===(ae=this._dataSource)||void 0===ae?void 0:ae.key();return(0,a.O9)(ee)&&"this"===this._keyExpr?ee:this._keyExpr}keyOf(ae){return this.store().keyOf(ae)}store(){return this._dataSource.store()}items(){var ae;return null===(ae=this._dataSource)||void 0===ae?void 0:ae.items()}applyMapFunction(ae){return this._dataSource._applyMapFunction(ae)}getDataSource(){return this._dataSource??null}reload(){return this._dataSource.reload()}on(ae,ee){this._dataSource.on(ae,ee)}off(ae,ee){this._dataSource.off(ae,ee)}};var D=M(8360),C=M(4308),I=M(6828),L=M(8628),N=M(7080),G=M(2773);const te=N.A.inherit({_getDefaultOptions(){return(0,c.X)(this.callBase(),{itemTemplate:"item",keyExpr:"this",displayExpr:void 0,selectedItem:null,selectedItemKey:null,stylingMode:"outlined",deferRendering:!0,noDataText:D.A.format("dxCollectionWidget-noDataText"),useSelectMode:!1,splitButton:!1,showArrowIcon:!0,template:null,text:"",type:"normal",icon:void 0,onButtonClick:null,onSelectionChanged:null,onItemClick:null,opened:!1,items:null,dataSource:null,focusStateEnabled:!0,hoverStateEnabled:!0,dropDownOptions:{},dropDownContentTemplate:"content",wrapItemText:!1,useItemTextAsTitle:!0,grouped:!1,groupTemplate:"group",buttonGroupOptions:{}})},_setOptionsByReference(){this.callBase(),(0,c.X)(this._optionsByReference,{selectedItem:!0})},_init(){this.callBase(),this._createItemClickAction(),this._createActionClickAction(),this._createSelectionChangedAction(),this._initDataController(),this._compileKeyGetter(),this._compileDisplayGetter(),this._options.cache("buttonGroupOptions",this.option("buttonGroupOptions")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_initDataController(){const oe=this.option("dataSource");this._dataController=new w(oe??this.option("items"),{key:this.option("keyExpr")})},_initTemplates(){this._templateManager.addDefaultTemplates({content:new S.l(oe=>{const ae=(0,f.A)(oe.container),ee=(0,f.A)("<div>").appendTo(ae);this._list=this._createComponent(ee,I.A,this._listOptions()),this._list.registerKeyHandler("escape",this._escHandler.bind(this)),this._list.registerKeyHandler("tab",this._escHandler.bind(this)),this._list.registerKeyHandler("leftArrow",this._escHandler.bind(this)),this._list.registerKeyHandler("rightArrow",this._escHandler.bind(this))})}),this.callBase()},_compileKeyGetter(){this._keyGetter=(0,y.Hz)(this._dataController.key())},_compileDisplayGetter(){this._displayGetter=(0,y.Hz)(this.option("displayExpr"))},_initMarkup(){this.callBase(),this.$element().addClass("dx-dropdownbutton"),this._renderButtonGroup(),this._updateArrowClass(),(0,a.O9)(this.option("selectedItemKey"))&&this._loadSelectedItem().done(this._updateActionButton.bind(this))},_renderFocusTarget:T.lQ,_render(){(!this.option("deferRendering")||this.option("opened"))&&this._renderPopup(),this.callBase()},_renderContentImpl(){return this._popup&&this._renderPopupContent(),this.callBase()},_loadSelectedItem(){var oe;null===(oe=this._loadSingleDeferred)||void 0===oe||oe.reject();const ae=(0,d.cY)();if(this._list&&void 0!==this._lastSelectedItemData){const he=this.option("useSelectMode")?this._list.option("selectedItem"):this._lastSelectedItemData;return ae.resolve(he)}this._lastSelectedItemData=void 0;const ee=this.option("selectedItemKey");return this._dataController.loadSingle(ee).done(ae.resolve).fail(()=>{ae.reject(null)}),this._loadSingleDeferred=ae,ae.promise()},_createActionClickAction(){this._actionClickAction=this._createActionByOption("onButtonClick")},_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")},_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_fireSelectionChangedAction(oe){let{previousValue:ae,value:ee}=oe;this._selectionChangedAction({item:ee,previousItem:ae})},_fireItemClickAction(oe){let{event:ae,itemElement:ee,itemData:he}=oe;return this._itemClickAction({event:ae,itemElement:ee,itemData:this._actionItem||he})},_getButtonTemplate(){const{template:oe,splitButton:ae,showArrowIcon:ee}=this.option();return oe||(ae||!ee?"content":(he,de)=>{let{text:ue,icon:be}=he;const ve=(0,s.N)(be),le=ue?(0,f.A)("<span>").text(ue).addClass("dx-button-text"):void 0,Ce=(0,s.N)("spindown").addClass("dx-icon-right");(0,f.A)(de).append(ve,le,Ce)})},_getActionButtonConfig(){const{icon:oe,text:ae,type:ee,splitButton:he}=this.option(),de={text:ae,icon:oe,type:ee,template:this._getButtonTemplate(),elementAttr:{class:"dx-dropdownbutton-action"}};return he&&(de.elementAttr.role="menuitem"),de},_getSpinButtonConfig(){const{type:oe}=this.option();return{type:oe,icon:"spindown",elementAttr:{class:"dx-dropdownbutton-toggle",role:"menuitem"}}},_getButtonGroupItems(){const{splitButton:oe}=this.option(),ae=[this._getActionButtonConfig()];return oe&&ae.push(this._getSpinButtonConfig()),ae},_buttonGroupItemClick(oe){let{event:ae,itemData:ee}=oe;const he="dx-dropdownbutton-action"===ee.elementAttr.class;"dx-dropdownbutton-toggle"===ee.elementAttr.class?this.toggle():he&&(this._actionClickAction({event:ae,selectedItem:this.option("selectedItem")}),this.option("splitButton")||this.toggle())},_getButtonGroupOptions(){const{accessKey:oe,focusStateEnabled:ae,hoverStateEnabled:ee,splitButton:he,stylingMode:de,tabIndex:ue}=this.option();return(0,c.X)({items:this._getButtonGroupItems(),width:"100%",height:"100%",selectionMode:"none",focusStateEnabled:ae,hoverStateEnabled:ee,stylingMode:de,accessKey:oe,tabIndex:ue,elementAttr:{role:he?"menu":"group"},onItemClick:this._buttonGroupItemClick.bind(this),onKeyboardHandled:ve=>this._keyboardHandler(ve)},this._options.cache("buttonGroupOptions"))},_renderPopupContent(){const oe=this._popup.$content(),ae=this._getTemplateByOption("dropDownContentTemplate");return oe.empty(),this._popupContentId=`dx-${new b.A}`,this.setAria("id",this._popupContentId,oe),ae.render({container:(0,P.cc)(oe),model:this.option("items")||this._dataController.getDataSource()})},_popupOptions(){const oe=this.option("rtlEnabled")?"right":"left";return(0,c.X)({dragEnabled:!1,focusStateEnabled:!1,deferRendering:this.option("deferRendering"),hideOnOutsideClick:ae=>{const ee=this.$element();return!(0,f.A)(ae.target).closest(".dx-dropdownbutton").is(ee)},showTitle:!1,animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},_ignoreFunctionValueDeprecation:!0,width:()=>(0,G.v)(this.$element()),height:"auto",shading:!1,position:{of:this.$element(),collision:"flipfit",my:`${oe} top`,at:`${oe} bottom`},_wrapperClassExternal:"dx-dropdowneditor-overlay"},this._options.cache("dropDownOptions"),{visible:this.option("opened")})},_listOptions(){const oe=this.option("selectedItemKey"),ae=this.option("useSelectMode");return{selectionMode:ae?"single":"none",wrapItemText:this.option("wrapItemText"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:()=>this._fireContentReadyAction(),selectedItemKeys:(0,a.O9)(oe)&&ae?[oe]:[],grouped:this.option("grouped"),groupTemplate:this.option("groupTemplate"),keyExpr:this._dataController.key(),noDataText:this.option("noDataText"),displayExpr:this.option("displayExpr"),itemTemplate:this.option("itemTemplate"),items:this.option("items"),dataSource:this._dataController.getDataSource(),onItemClick:ee=>{this.option("useSelectMode")||(this._lastSelectedItemData=ee.itemData),this.option("selectedItemKey",this._keyGetter(ee.itemData)),!1!==this._fireItemClickAction(ee)&&(this.toggle(!1),this._buttonGroup.focus())}}},_upDownKeyHandler(){return this._popup&&this._popup.option("visible")&&this._list?this._list.focus():this.open(),!0},_escHandler(){return this.close(),this._buttonGroup.focus(),!0},_tabHandler(){return this.close(),!0},_renderPopup(){const oe=(0,f.A)("<div>");this.$element().append(oe),this._popup=this._createComponent(oe,L.A,this._popupOptions()),this._popup.$content().addClass("dx-dropdownbutton-content"),this._popup.$wrapper().addClass("dx-dropdownbutton-popup-wrapper"),this._popup.$overlayContent().attr("aria-label","Dropdown"),this._popup.on("hiding",this._popupHidingHandler.bind(this)),this._popup.on("showing",this._popupShowingHandler.bind(this)),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_popupHidingHandler(){this.option("opened",!1),this._updateAriaAttributes(!1)},_popupOptionChanged(oe){const ae=N.A.getOptionsFromContainer(oe);this._setPopupOption(ae);const ee=Object.keys(ae);(ee.includes("width")||ee.includes("height"))&&this._dimensionChanged()},_dimensionChanged(){void 0===(0,G.b)(this.option("dropDownOptions.width"))&&this._setPopupOption("width",()=>(0,G.v)(this.$element()))},_setPopupOption(oe,ae){this._setWidgetOption("_popup",arguments)},_popupShowingHandler(){this.option("opened",!0),this._updateAriaAttributes(!0)},_setElementAria(oe){this.setAria({owns:oe?this._popupContentId:void 0},this.$element())},_setButtonsAria(oe){const ae={expanded:oe,haspopup:"listbox"},ee={};this.option("text")||(ee.label="dropdownbutton"),this._getButtons().each((he,de)=>{this.setAria(0===he?(0,W.A)({},ee,ae):ae,(0,f.A)(de))})},_updateAriaAttributes(oe){this._setElementAria(oe),this._setButtonsAria(oe)},_getButtons(){return this._buttonGroup.$element().find(".dx-button")},_renderButtonGroup(){const oe=this._buttonGroup&&this._buttonGroup.$element()||(0,f.A)("<div>");this._buttonGroup||this.$element().append(oe),this._buttonGroup=this._createComponent(oe,C.A,this._getButtonGroupOptions()),this._buttonGroup.registerKeyHandler("downArrow",this._upDownKeyHandler.bind(this)),this._buttonGroup.registerKeyHandler("tab",this._tabHandler.bind(this)),this._buttonGroup.registerKeyHandler("upArrow",this._upDownKeyHandler.bind(this)),this._buttonGroup.registerKeyHandler("escape",this._escHandler.bind(this)),this._bindInnerWidgetOptions(this._buttonGroup,"buttonGroupOptions"),this._updateAriaAttributes(this.option("opened"))},_updateArrowClass(){const oe=this.option("splitButton")||this.option("showArrowIcon");this.$element().toggleClass("dx-dropdownbutton-has-arrow",oe)},toggle(oe){return this._popup||(this._renderPopup(),this._renderContent()),this._popup.toggle(oe)},open(){return this.toggle(!0)},close(){return this.toggle(!1)},_setListOption(oe,ae){this._list&&this._list.option(oe,ae)},_getDisplayValue(oe){const ee=(0,a.Gv)(oe)?this._displayGetter(oe):oe;return(0,a.Gv)(ee)?"":String((0,T.YD)(ee,""))},_updateActionButton(oe){this.option("useSelectMode")&&this.option({text:this._getDisplayValue(oe),icon:(0,a.Qd)(oe)?oe.icon:void 0}),this._setOptionWithoutOptionChange("selectedItem",oe),this._setOptionWithoutOptionChange("selectedItemKey",this._keyGetter(oe))},_clean(){this._list&&this._list.$element().remove(),this._popup&&this._popup.$element().remove()},_selectedItemKeyChanged(oe){this._setListOption("selectedItemKeys",this.option("useSelectMode")&&(0,a.O9)(oe)?[oe]:[]);const ae=this.option("selectedItem");this._loadSelectedItem().always(ee=>{this._updateActionButton(ee),this._displayGetter(ae)!==this._displayGetter(ee)&&this._fireSelectionChangedAction({previousValue:ae,value:ee})})},_updateButtonGroup(oe,ae){this._buttonGroup.option(oe,ae),this._updateAriaAttributes(this.option("opened"))},_actionButtonOptionChanged(oe){let{name:ae,value:ee}=oe;const he={};he[ae]=ee,this._updateButtonGroup("items[0]",(0,c.X)({},this._getActionButtonConfig(),he)),this._popup&&this._popup.repaint()},_selectModeChanged(oe){if(oe){this._setListOption("selectionMode","single");const ae=this.option("selectedItemKey");this._setListOption("selectedItemKeys",(0,a.O9)(ae)?[ae]:[]),this._selectedItemKeyChanged(this.option("selectedItemKey"))}else this._setListOption("selectionMode","none"),this.option({selectedItemKey:void 0,selectedItem:void 0}),this._actionButtonOptionChanged({text:this.option("text")})},_updateItemCollection(oe){const ae=this.option("selectedItemKey");this._setListOption("selectedItem",null),this._setWidgetOption("_list",[oe]),(0,a.O9)(ae)&&this._loadSelectedItem().done(ee=>{this._setListOption("selectedItemKeys",[ae]),this._setListOption("selectedItem",ee)}).fail(ee=>{this._setListOption("selectedItemKeys",[])}).always(this._updateActionButton.bind(this))},_updateDataController(oe){this._dataController.updateDataSource(oe,this.option("keyExpr")),this._updateKeyExpr()},_updateKeyExpr(){this._compileKeyGetter(),this._setListOption("keyExpr",this._dataController.key())},focus(){this._buttonGroup.focus()},_optionChanged(oe){var ae;const{name:ee,value:he}=oe;switch(ee){case"useSelectMode":this._selectModeChanged(he);break;case"splitButton":this._updateArrowClass(),this._renderButtonGroup();break;case"displayExpr":this._compileDisplayGetter(),this._setListOption(ee,he),this._updateActionButton(this.option("selectedItem"));break;case"keyExpr":this._updateDataController();break;case"buttonGroupOptions":this._innerWidgetOptionChanged(this._buttonGroup,oe);break;case"dropDownOptions":if("dropDownOptions.visible"===oe.fullName)break;void 0!==oe.value.visible&&delete oe.value.visible,this._popupOptionChanged(oe),this._innerWidgetOptionChanged(this._popup,oe);break;case"opened":this.toggle(he);break;case"focusStateEnabled":case"hoverStateEnabled":this._setListOption(ee,he),this._updateButtonGroup(ee,he),this.callBase(oe);break;case"items":this._updateDataController(this.option("items")),this._updateItemCollection(ee);break;case"dataSource":this._dataController.updateDataSource(he),this._updateKeyExpr(),this._updateItemCollection(ee);break;case"icon":case"text":this._actionButtonOptionChanged(oe);break;case"showArrowIcon":this._updateArrowClass(),this._renderButtonGroup(),this._popup&&this._popup.repaint();break;case"width":case"height":this.callBase(oe),null===(ae=this._popup)||void 0===ae||ae.repaint();break;case"stylingMode":case"tabIndex":this._updateButtonGroup(ee,he);break;case"type":this._updateButtonGroup("items",this._getButtonGroupItems());break;case"itemTemplate":case"grouped":case"noDataText":case"groupTemplate":case"wrapItemText":case"useItemTextAsTitle":this._setListOption(ee,he);break;case"dropDownContentTemplate":this._renderContent();break;case"selectedItemKey":this._selectedItemKeyChanged(he);break;case"selectedItem":break;case"onItemClick":this._createItemClickAction();break;case"onButtonClick":this._createActionClickAction();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"deferRendering":this.toggle(this.option("opened"));break;case"template":this._renderButtonGroup();break;default:this.callBase(oe)}},getDataSource(){return this._dataController.getDataSource()}});(0,o.A)("dxDropDownButton",te);const z=te},1010:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>re});var W=M(1973),o=M(5973),P=M(2925),b=M(5704),f=M(7591),S=M(4859),T=M(6021),y=M(3090),d=M(2660),c=M(1363),s=M(1830),a=M(6110),u=M(1541),h=M(4072),g=M(9293),_=M(8360),x=M(5267),w=M(6828),D=M(127),C=M(8790),I=M(3684);const L=(0,a.zk)(),B=["startswith","contains","endwith","notcontains"],K="android"!==o.A.real().platform,J=I.A.inherit({_supportedKeys(){const q=this.callBase();return(0,y.X)({},q,{tab(Y){if(this._allowSelectItemByTab()){this._saveValueChangeEvent(Y);const Z=(0,b.A)(this._list.option("focusedElement"));Z.length&&this._setSelectedElement(Z)}q.tab.apply(this,arguments)},space:S.lQ,home:S.lQ,end:S.lQ})},_allowSelectItemByTab(){return this.option("opened")&&"instantly"===this.option("applyValueMode")},_setSelectedElement(q){const Y=this._valueGetter(this._list._getItemData(q));this._setValue(Y)},_setValue(q){this.option("value",q)},_getDefaultOptions(){return(0,y.X)(this.callBase(),(0,y.X)(x.A._dataExpressionDefaultOptions(),{displayValue:void 0,searchEnabled:!1,searchMode:"contains",searchTimeout:500,minSearchLength:0,searchExpr:null,valueChangeEvent:"input change keyup",selectedItem:null,noDataText:_.A.format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,onSelectionChanged:null,onItemClick:S.lQ,showDataBeforeSearch:!1,grouped:!1,groupTemplate:"group",popupPosition:{my:"left top",at:"left bottom",offset:{h:0,v:0},collision:"flip"},wrapItemText:!1,useItemTextAsTitle:!1}))},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{popupPosition:{offset:{v:-1}}}},{device:{platform:"generic"},options:{buttonsLocation:"bottom center"}}])},_setOptionsByReference(){this.callBase(),(0,y.X)(this._optionsByReference,{value:!0,selectedItem:!0,displayValue:!0})},_init(){this.callBase(),this._initDataExpressions(),this._initActions(),this._setListDataSource(),this._validateSearchMode(),this._clearSelectedItem(),this._initItems()},_setListFocusedElementOptionChange(){this._list._updateParentActiveDescendant=this._updateActiveDescendant.bind(this)},_initItems(){const{items:q}=this.option();q&&!q.length&&this._dataSource&&(this.option().items=this._dataSource.items())},_initActions(){this._initContentReadyAction(),this._initSelectionChangedAction(),this._initItemClickAction()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})},_initItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new f.M("item")})},_isEditable(){return this.callBase()||this.option("searchEnabled")},_saveFocusOnWidget(){this._list&&this._list.initialOption("focusStateEnabled")&&this._focusInput()},_fitIntoRange:(q,Y,Z)=>q>Z?Y:q<Y?Z:q,_items(){const q=this._getPlainItems(!this._list&&this._dataSource.items());return new u.A(q).filter("disabled","<>",!0).toArray()},_calcNextItem(q){const Y=this._items();return Y[this._fitIntoRange(this._getSelectedIndex()+q,0,Y.length-1)]},_getSelectedIndex(){const q=this._items(),Y=this.option("selectedItem");let Z=-1;return(0,d.__)(q,(Q,te)=>{if(this._isValueEquals(te,Y))return Z=Q,!1}),Z},_createPopup(){this.callBase(),this._updateCustomBoundaryContainer(),this._popup.$wrapper().addClass(this._popupWrapperClass());const q=this._popup.$content();h.A.off(q,"mouseup"),h.A.on(q,"mouseup",this._saveFocusOnWidget.bind(this))},_updateCustomBoundaryContainer(){const q=this.option("dropDownOptions.container"),Y=q&&(0,b.A)(q);if(Y&&Y.length&&!(0,s.l6)(Y.get(0))){const Z=[].slice.call(Y.parents());Z.unshift(Y.get(0)),(0,d.__)(Z,(Q,te)=>te!==(0,b.A)("body").get(0)&&("hidden"===L.getComputedStyle(te).overflowY?(this._$customBoundaryContainer=(0,b.A)(te),!1):void 0))}},_popupWrapperClass:()=>"dx-dropdownlist-popup-wrapper",_renderInputValue(){const q=this._getCurrentValue();return this._rejectValueLoading(),this._loadInputValue(q,this._setSelectedItem.bind(this)).always(this.callBase.bind(this,q))},_loadInputValue(q,Y){return this._loadItem(q).always(Y)},_getItemFromPlain(q,Y){let Z,Q;return Y&&"object"!=typeof q&&(Y.itemByValue||(Y.itemByValue={},Z=this._getPlainItems(),Z.forEach(function(te){Y.itemByValue[this._valueGetter(te)]=te},this)),Q=Y.itemByValue[q]),Q||(Z=this._getPlainItems(),Q=(0,S.VM)(Z,te=>this._isValueEquals(this._valueGetter(te),q))[0]),Q},_loadItem(q,Y){const Z=this._getItemFromPlain(q,Y);return void 0!==Z?(0,T.cY)().resolve(Z).promise():this._loadValue(q)},_getPlainItems(q){let Y=[];q=q||this.option("items")||this._dataSource.items()||[];for(let Z=0;Z<q.length;Z++)q[Z]&&q[Z].items?Y=Y.concat(q[Z].items):Y.push(q[Z]);return Y},_updateActiveDescendant(q){var Y;const Z=this.option("opened"),Q=null===(Y=this._list)||void 0===Y?void 0:Y.getFocusedItemId(),te=(0,b.A)(`#${Q}`).length>0;this.setAria({activedescendant:Z&&te&&Q||null},q)},_setSelectedItem(q){const Y=this._displayValue(q);this.option("selectedItem",(0,S.YD)(q,null)),this.option("displayValue",Y)},_displayValue(q){return this._displayGetter(q)},_refreshSelected(){const q={};this._listItemElements().each((Y,Z)=>{const Q=(0,b.A)(Z),te=this._valueGetter(Q.data("dxListItemData"));this._isSelectedValue(te,q)?this._list.selectItem(Q):this._list.unselectItem(Q)})},_popupShownHandler(){this.callBase(),this._setFocusPolicy()},_setFocusPolicy(){!this.option("focusStateEnabled")||!this._list||this._list.option("focusedElement",null)},_isSelectedValue(q){return this._isValueEquals(q,this.option("value"))},_validateSearchMode(){const q=this.option("searchMode"),Y=q.toLowerCase();if(!B.includes(Y))throw D.A.Error("E1019",q)},_clearSelectedItem(){this.option("selectedItem",null)},_processDataSourceChanging(){this._initDataController(),this._setListOption("_dataController",this._dataController),this._setListDataSource(),this._renderInputValue().fail(()=>{this._isCustomValueAllowed()||this._clearSelectedItem()})},_isCustomValueAllowed(){return this.option("displayCustomValue")},clear(){this.callBase(),this._clearFilter(),this._clearSelectedItem()},_listItemElements(){return this._$list?this._$list.find(".dx-list-item"):(0,b.A)()},_popupConfig(){return(0,y.X)(this.callBase(),{templatesRenderAsynchronously:!1,autoResizeEnabled:!1,maxHeight:this._getMaxHeight.bind(this)})},_renderPopupContent(){this.callBase(),this._renderList()},_getKeyboardListeners(){const q=this._canListHaveFocus();return this.callBase().concat([!q&&this._list])},_renderList(){this._listId=`dx-${(new P.A)._value}`;const q=(0,b.A)("<div>").attr("id",this._listId).appendTo(this._popup.$content());this._$list=q,this._list=this._createComponent(q,w.A,this._listConfig()),this._refreshList(),this._renderPreventBlurOnListClick(),this._setListFocusedElementOptionChange()},_renderPreventBlurOnListClick(){const q=(0,g.b4)("mousedown","dxDropDownList");h.A.off(this._$list,q),h.A.on(this._$list,q,Y=>Y.preventDefault())},_getControlsAria(){return this._list&&this._listId},_renderOpenedState(){this.callBase(),this._list&&this._updateActiveDescendant(),this.setAria("owns",this._popup&&this._popupContentId)},_getAriaHasPopup:()=>"listbox",_refreshList(){this._list&&this._shouldRefreshDataSource()&&this._setListDataSource()},_shouldRefreshDataSource(){return!!this._list.option("dataSource")!==this._needPassDataSourceToList()},_isDesktopDevice:()=>"desktop"===o.A.real().deviceType,_listConfig(){const q={selectionMode:"single",_templates:this.option("_templates"),templateProvider:this.option("templateProvider"),noDataText:this.option("noDataText"),encodeNoDataText:this.option("encodeNoDataText"),grouped:this.option("grouped"),wrapItemText:this.option("wrapItemText"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:this._listContentReadyHandler.bind(this),itemTemplate:this.option("itemTemplate"),indicateLoading:!1,keyExpr:this._getCollectionKeyExpr(),displayExpr:this._displayGetterExpr(),groupTemplate:this.option("groupTemplate"),onItemClick:this._listItemClickAction.bind(this),dataSource:this._getDataSource(),_dataController:this._dataController,hoverStateEnabled:!!this._isDesktopDevice()&&this.option("hoverStateEnabled"),focusStateEnabled:!!this._isDesktopDevice()&&this.option("focusStateEnabled")};return this._canListHaveFocus()||(q.tabIndex=null),q},_canListHaveFocus:()=>!1,_getDataSource(){return this._needPassDataSourceToList()?this._dataSource:null},_dataSourceOptions:()=>({paginate:!1}),_getGroupedOption(){return this.option("grouped")},_dataSourceFromUrlLoadMode:()=>"raw",_listContentReadyHandler(){this._list=this._list||this._$list.dxList("instance"),this.option("deferRendering")||this._refreshSelected(),this._updatePopupWidth(),this._updateListDimensions(),this._contentReadyAction()},_setListOption(q,Y){this._setWidgetOption("_list",arguments)},_listItemClickAction(q){this._listItemClickHandler(q),this._itemClickAction(q)},_listItemClickHandler:S.lQ,_setListDataSource(){this._list&&(this._setListOption("dataSource",this._getDataSource()),this._needPassDataSourceToList()||this._setListOption("items",[]))},_needPassDataSourceToList(){return this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded()},_isMinSearchLengthExceeded(){return this._searchValue().toString().length>=this.option("minSearchLength")},_needClearFilter(){return!this._canKeepDataSource()&&this._needPassDataSourceToList()},_canKeepDataSource(){const q=this._isMinSearchLengthExceeded();return this._dataController.isLoaded()&&this.option("showDataBeforeSearch")&&this.option("minSearchLength")&&!q&&!this._isLastMinSearchLengthExceeded},_searchValue(){return this._input().val()||""},_getSearchEvent(){return(0,g.b4)("input",`${this.NAME}Search`)},_getCompositionStartEvent(){return(0,g.b4)("compositionstart",`${this.NAME}CompositionStart`)},_getCompositionEndEvent(){return(0,g.b4)("compositionend",`${this.NAME}CompositionEnd`)},_getSetFocusPolicyEvent(){return(0,g.b4)("input",`${this.NAME}FocusPolicy`)},_renderEvents(){this.callBase(),h.A.on(this._input(),this._getSetFocusPolicyEvent(),()=>{this._setFocusPolicy()}),this._shouldRenderSearchEvent()&&(h.A.on(this._input(),this._getSearchEvent(),q=>{this._searchHandler(q)}),K&&(h.A.on(this._input(),this._getCompositionStartEvent(),()=>{this._isTextCompositionInProgress(!0)}),h.A.on(this._input(),this._getCompositionEndEvent(),q=>{this._isTextCompositionInProgress(void 0),this._searchHandler(q,this._searchValue())})))},_shouldRenderSearchEvent(){return this.option("searchEnabled")},_refreshEvents(){h.A.off(this._input(),this._getSearchEvent()),h.A.off(this._input(),this._getSetFocusPolicyEvent()),K&&(h.A.off(this._input(),this._getCompositionStartEvent()),h.A.off(this._input(),this._getCompositionEndEvent())),this.callBase()},_isTextCompositionInProgress(q){if(!arguments.length)return this._isTextComposition;this._isTextComposition=q},_searchHandler(q,Y){if(this._isTextCompositionInProgress())return;if(!this._isMinSearchLengthExceeded())return void this._searchCanceled();const Z=this.option("searchTimeout");Z?(this._clearSearchTimer(),this._searchTimer=setTimeout(()=>{this._searchDataSource(Y)},Z)):this._searchDataSource(Y)},_searchCanceled(){this._clearSearchTimer(),this._needClearFilter()&&this._filterDataSource(null),this._refreshList()},_searchDataSource(){let q=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._searchValue();this._filterDataSource(q)},_filterDataSource(q){this._clearSearchTimer();const Y=this._dataController;Y.searchExpr(this.option("searchExpr")||this._displayGetterExpr()),Y.searchOperation(this.option("searchMode")),Y.searchValue(q),Y.load().done(this._dataSourceFiltered.bind(this,q))},_clearFilter(){const q=this._dataController;q.searchValue()&&q.searchValue(null)},_dataSourceFiltered(){this._isLastMinSearchLengthExceeded=this._isMinSearchLengthExceeded(),this._refreshList(),this._refreshPopupVisibility()},_shouldOpenPopup(){return this._hasItemsToShow()},_refreshPopupVisibility(){if(this.option("readOnly")||!this._searchValue())return;const q=this._shouldOpenPopup();q&&!this._isFocused()||(this.option("opened",q),q&&(this._updatePopupWidth(),this._updateListDimensions()))},_dataSourceChangedHandler(q){0===this._dataController.pageIndex()?this.option().items=q:this.option().items=this.option().items.concat(q)},_hasItemsToShow(){const Z=(this._dataController.items()||[]).length;return!(!this._needPassDataSourceToList()||!Z)},_clearSearchTimer(){clearTimeout(this._searchTimer),delete this._searchTimer},_popupShowingHandler(){this._updatePopupWidth(),this._updateListDimensions()},_dimensionChanged(){this.callBase(),this._updateListDimensions()},_needPopupRepaint(){const q=this._dataController,Y=q.pageIndex(),Z=(0,s.O9)(this._pageIndex)&&Y<=this._pageIndex||q.isLastPage()&&!this._list._scrollViewIsFull();return this._pageIndex=Y,Z},_updateListDimensions(){this._popup&&(this._needPopupRepaint()&&this._popup.repaint(),this._list&&this._list.updateDimensions())},_getMaxHeight(){const q=this.$element(),Y=this._$customBoundaryContainer,Z=q.offset().top-(Y?Y.offset().top:0),Q=(0,c.P$)(L),te=Y?Math.min((0,c.P$)(Y),Q):Q,pe=Math.max(Z,te-Z-(0,c.P$)(q));return Math.min(.5*te,pe)},_clean(){this._list&&delete this._list,delete this._isLastMinSearchLengthExceeded,this.callBase()},_dispose(){this._clearSearchTimer(),this.callBase()},_setCollectionWidgetOption(){this._setListOption.apply(this,arguments)},_setSubmitValue(){const q=this.option("value"),Y=this._shouldUseDisplayValue(q)?this._displayGetter(q):q;this._getSubmitElement().val(Y)},_shouldUseDisplayValue(q){return"this"===this.option("valueExpr")&&(0,s.Gv)(q)},_optionChanged(q){switch(this._dataExpressionOptionChanged(q),q.name){case"hoverStateEnabled":case"focusStateEnabled":this._isDesktopDevice()&&this._setListOption(q.name,q.value),this.callBase(q);break;case"items":this.option("dataSource")||this._processDataSourceChanging();break;case"dataSource":this._processDataSourceChanging();break;case"valueExpr":this._renderValue(),this._setListOption("keyExpr",this._getCollectionKeyExpr());break;case"displayExpr":this._renderValue(),this._setListOption("displayExpr",this._displayGetterExpr());break;case"searchMode":this._validateSearchMode();break;case"minSearchLength":this._refreshList();break;case"searchEnabled":case"showDataBeforeSearch":case"searchExpr":this._invalidate();break;case"onContentReady":this._initContentReadyAction();break;case"onSelectionChanged":this._initSelectionChangedAction();break;case"onItemClick":this._initItemClickAction();break;case"grouped":case"groupTemplate":case"wrapItemText":case"noDataText":case"encodeNoDataText":case"useItemTextAsTitle":this._setListOption(q.name);break;case"displayValue":this.option("text",q.value);break;case"itemTemplate":case"searchTimeout":break;case"selectedItem":q.previousValue!==q.value&&this._selectionChangedAction({selectedItem:q.value});break;default:this.callBase(q)}}}).include(x.A,C.A);(0,W.A)("dxDropDownList",J);const re=J},6620:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>U});var W=M(5397),o=M(2925),P=M(5704),b=M(8684),f=M(4859),S=M(1832),T=M(3090),y=M(6110),d=M(4072),c=M(9293),s=M(3777),a=M(1144),u=M(7080);const h="dx-invalid-message-auto",w="dx-validation-target",L=["outlined","filled","underlined"],N={validationMessageMode:"mode",validationMessagePosition:"positionSide",validationMessageOffset:"offset",validationBoundary:"boundary"},G=u.A.inherit({ctor(){this.showValidationMessageTimeout=null,this.validationRequest=(0,b.A)(),this.callBase.apply(this,arguments)},_createElement(B){this.callBase(B);const K=this.$element();K&&(0,W.p)(K[0],w,this)},_initOptions(B){this.callBase.apply(this,arguments),this.option(s.A.initValidationOptions(B))},_init(){this._initialValue=this.option("value"),this.callBase(),this._options.cache("validationTooltipOptions",this.option("validationTooltipOptions")),this.$element().addClass("dx-show-invalid-badge")},_getDefaultOptions(){return(0,T.X)(this.callBase(),{value:null,name:"",onValueChanged:null,readOnly:!1,isValid:!0,validationError:null,validationErrors:null,validationStatus:"valid",validationMessageMode:"auto",validationMessagePosition:"bottom",validationBoundary:void 0,validationMessageOffset:{h:0,v:0},validationTooltipOptions:{},_showValidationMessage:!0,isDirty:!1})},_attachKeyboardEvents(){this.option("readOnly")||this.callBase()},_setOptionsByReference(){this.callBase(),(0,T.X)(this._optionsByReference,{validationError:!0})},_createValueChangeAction(){this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})},_suppressValueChangeAction(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction(){this._valueChangeActionSuppressed=!1},_initMarkup(){var B;this._toggleReadOnlyState(),this._setSubmitElementName(this.option("name")),this.callBase(),this._renderValidationState(),null===(B=this.option("_onMarkupRendered"))||void 0===B||B()},_raiseValueChangeAction(B,K){this._valueChangeAction||this._createValueChangeAction(),this._valueChangeAction(this._valueChangeArgs(B,K))},_valueChangeArgs(B,K){return{value:B,previousValue:K,event:this._valueChangeEventInstance}},_saveValueChangeEvent(B){this._valueChangeEventInstance=B},_focusInHandler(B){const K="auto"===this.option("validationMessageMode");if(this._canValueBeChangedByClick()&&K){var J;const ie=null===(J=this._validationMessage)||void 0===J?void 0:J.$wrapper();ie?.removeClass(h),clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>ie?.addClass(h),150)}return this.callBase(B)},_canValueBeChangedByClick:()=>!1,_getStylingModePrefix:()=>"dx-editor-",_renderStylingMode(){const B=this.option("stylingMode"),K=this._getStylingModePrefix(),J=L.map(re=>K+re);J.forEach(re=>this.$element().removeClass(re));let ie=K+B;if(!J.includes(ie)){const re=this._getDefaultOptions().stylingMode,q=this._convertRulesToOptions(this._defaultOptionsRules()).stylingMode;ie=K+(q||re)}this.$element().addClass(ie)},_getValidationErrors(){let B=this.option("validationErrors");return!B&&this.option("validationError")&&(B=[this.option("validationError")]),B},_disposeValidationMessage(){this._$validationMessage&&(this._$validationMessage.remove(),this.setAria("describedby",null),this._$validationMessage=void 0,this._validationMessage=void 0)},_toggleValidationClasses(B){this.$element().toggleClass("dx-invalid",B),this.setAria("invalid",B||void 0)},_renderValidationState(){const B=this.option("isValid")&&"invalid"!==this.option("validationStatus"),K=this._getValidationErrors(),J=this.$element();if(this._toggleValidationClasses(!B),(0,y.Vd)()&&!1!==this.option("_showValidationMessage")&&(this._disposeValidationMessage(),!B&&K)){const{validationMessageMode:ie,validationMessageOffset:re,validationBoundary:q,rtlEnabled:Y}=this.option();this._$validationMessage=(0,P.A)("<div>").appendTo(J);const Z=`dx-${new o.A}`;this.setAria("describedby",Z),this._validationMessage=new a.A(this._$validationMessage,(0,T.X)({validationErrors:K,rtlEnabled:Y,target:this._getValidationMessageTarget(),visualContainer:J,mode:ie,positionSide:this._getValidationMessagePosition(),offset:re,boundary:q,contentId:Z},this._options.cache("validationTooltipOptions"))),this._bindInnerWidgetOptions(this._validationMessage,"validationTooltipOptions")}},_getValidationMessagePosition(){return this.option("validationMessagePosition")},_getValidationMessageTarget(){return this.$element()},_toggleReadOnlyState(){const B=this.option("readOnly");this._toggleBackspaceHandler(B),this.$element().toggleClass("dx-state-readonly",!!B),this._setAriaReadonly(B)},_setAriaReadonly(B){this.setAria("readonly",B||void 0)},_toggleBackspaceHandler(B){const K=this._keyboardEventBindingTarget(),J=(0,c.b4)("keydown","editorReadOnly");d.A.off(K,J),B&&d.A.on(K,J,ie=>{"backspace"===(0,c.YD)(ie)&&ie.preventDefault()})},_dispose(){const B=this.$element()[0];(0,W.p)(B,w,null),clearTimeout(this.showValidationMessageTimeout),this._disposeValidationMessage(),this.callBase()},_setSubmitElementName(B){const K=this._getSubmitElement();K&&(B.length>0?K.attr("name",B):K.removeAttr("name"))},_getSubmitElement:()=>null,_setValidationMessageOption(B){var K;let{name:J,value:ie}=B;null===(K=this._validationMessage)||void 0===K||K.option(N[J]?N[J]:J,ie)},_hasActiveElement:f.lQ,_optionChanged(B){var K;switch(B.name){case"onValueChanged":this._createValueChangeAction();break;case"readOnly":this._toggleReadOnlyState(),this._refreshFocusState();break;case"value":B.value!=B.previousValue&&(this.option("isDirty",this._initialValue!==B.value),this.validationRequest.fire({value:B.value,editor:this})),this._valueChangeActionSuppressed||(this._raiseValueChangeAction(B.value,B.previousValue),this._saveValueChangeEvent(void 0));break;case"width":this.callBase(B),null===(K=this._validationMessage)||void 0===K||K.updateMaxWidth();break;case"name":this._setSubmitElementName(B.value);break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(s.A.synchronizeValidationOptions(B,this.option())),this._renderValidationState();break;case"validationBoundary":case"validationMessageMode":case"validationMessagePosition":case"validationMessageOffset":this._setValidationMessageOption(B);break;case"rtlEnabled":this._setValidationMessageOption(B),this.callBase(B);break;case"validationTooltipOptions":this._innerWidgetOptionChanged(this._validationMessage,B);break;case"_showValidationMessage":case"isDirty":break;default:this.callBase(B)}},_resetToInitialValue(){this.option("value",this._initialValue)},blur(){this._hasActiveElement()&&(0,S.GX)()},clear(){const B=this._getDefaultOptions();this.option("value",B.value)},reset(){arguments.length&&(this._initialValue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0),this._resetToInitialValue(),this.option("isDirty",!1),this.option("isValid",!0)}});G.isEditor=B=>B instanceof G;const U=G},5267:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>a});var W=M(4859),o=M(4270),P=M(6021),b=M(3090),f=M(1830),S=M(6234),T=M(1614),y=M(1221),d=M(5801);const a=(0,b.X)({},d.A,{_dataExpressionDefaultOptions:()=>({items:[],dataSource:null,itemTemplate:"item",value:null,valueExpr:"this",displayExpr:void 0}),_initDataExpressions(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource(){this.option("dataSource")||(this._dataSource=new y.q({store:new T.A(this.option("items")),pageSize:0}),this._initDataController())},_compileDisplayGetter(){this._displayGetter=(0,o.Hz)(this._displayGetterExpr())},_displayGetterExpr(){return this.option("displayExpr")},_compileValueGetter(){this._valueGetter=(0,o.Hz)(this._valueGetterExpr())},_valueGetterExpr(){return this.option("valueExpr")||"this"},_loadValue(u){const h=(0,P.cY)();return u=this._unwrappedValue(u),(0,f.O9)(u)?(this._loadSingle(this._valueGetterExpr(),u).done(g=>{this._isValueEquals(this._valueGetter(g),u)?h.resolve(g):h.reject()}).fail(()=>{h.reject()}),this._loadValueDeferred=h,h.promise()):h.reject().promise()},_rejectValueLoading(){var u;null===(u=this._loadValueDeferred)||void 0===u||u.reject({shouldSkipCallback:!0})},_getCurrentValue(){return this.option("value")},_unwrappedValue(u){return(u=u??this._getCurrentValue())&&this._dataSource&&"this"===this._valueGetterExpr()&&(u=this._getItemKey(u)),S.A.unwrap(u)},_getItemKey(u){const h=this._dataSource.key();if(Array.isArray(h)){const g={};for(let _=0,x=h.length;_<x;_++)g[h[_]]=u[h[_]];return g}return h&&"object"==typeof u&&(u=u[h]),u},_isValueEquals(u,h){const g=this._dataSource&&this._dataSource.key();let _=this._compareValues(u,h);return!_&&g&&(0,f.O9)(u)&&(0,f.O9)(h)&&(_=Array.isArray(g)?this._compareByCompositeKey(u,h,g):this._compareByKey(u,h,g)),_},_compareByCompositeKey(u,h,g){const _=f.Gv;if(!_(u)||!_(h))return!1;for(let x=0,w=g.length;x<w;x++)if(u[g[x]]!==h[g[x]])return!1;return!0},_compareByKey(u,h,g){const _=S.A.unwrap,x=(0,W.YD)(_(u[g]),u),w=(0,W.YD)(_(h[g]),h);return this._compareValues(x,w)},_compareValues:(u,h)=>(0,o.ao)(u,!0)===(0,o.ao)(h,!0),_initDynamicTemplates:W.lQ,_setCollectionWidgetItemTemplate(){this._initDynamicTemplates(),this._setCollectionWidgetOption("itemTemplate",this.option("itemTemplate"))},_getCollectionKeyExpr(){const u=this.option("valueExpr");return(0,f.Kg)(u)&&"this"!==u||(0,f.Tn)(u)?u:null},_dataExpressionOptionChanged(u){switch(u.name){case"items":this._itemsToDataSource(),this._setCollectionWidgetOption("items");break;case"dataSource":this._initDataSource();break;case"itemTemplate":this._setCollectionWidgetItemTemplate();break;case"valueExpr":this._compileValueGetter();break;case"displayExpr":this._compileDisplayGetter(),this._initDynamicTemplates(),this._setCollectionWidgetOption("displayExpr")}}})},5730:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>st});var W=M(1973),o=M(5973),P=M(6054),b=M(2925),f=M(5704),S=M(1113),T=M(8684),y=M(6021),d=M(3090),c=M(2660),s=M(1363),a=M(1830),u=M(6110),h=M(778),g=M(4072),_=M(9293),x=M(8360),w=M(9012),D=M(357),C=M(9212),I=M(8496);const L=(0,u.zk)(),ge=()=>!!L.FormData;class fe extends I.A{_supportedKeys(){const Ke=Ye=>{Ye.preventDefault();const Pe=this._selectButton.$element();g.A.trigger(Pe,h.U)};return(0,d.X)(super._supportedKeys(),{space:Ke,enter:Ke})}_setOptionsByReference(){super._setOptionsByReference(),(0,d.X)(this._optionsByReference,{value:!0})}_getDefaultOptions(){return(0,d.X)(super._getDefaultOptions(),{chunkSize:0,value:[],selectButtonText:x.A.format("dxFileUploader-selectFile"),uploadButtonText:x.A.format("dxFileUploader-upload"),labelText:x.A.format("dxFileUploader-dropFile"),name:"files[]",multiple:!1,accept:"",uploadUrl:"/",allowCanceling:!0,showFileList:!0,progress:0,dialogTrigger:void 0,dropZone:void 0,readyToUploadMessage:x.A.format("dxFileUploader-readyToUpload"),uploadedMessage:x.A.format("dxFileUploader-uploaded"),uploadFailedMessage:x.A.format("dxFileUploader-uploadFailedMessage"),uploadAbortedMessage:x.A.format("dxFileUploader-uploadAbortedMessage"),uploadMode:"instantly",uploadMethod:"POST",uploadHeaders:{},uploadCustomData:{},onBeforeSend:null,onUploadStarted:null,onUploaded:null,onFilesUploaded:null,onProgress:null,onUploadError:null,onUploadAborted:null,onDropZoneEnter:null,onDropZoneLeave:null,allowedFileExtensions:[],maxFileSize:0,minFileSize:0,inputAttr:{},invalidFileExtensionMessage:x.A.format("dxFileUploader-invalidFileExtension"),invalidMaxFileSizeMessage:x.A.format("dxFileUploader-invalidMaxFileSize"),invalidMinFileSizeMessage:x.A.format("dxFileUploader-invalidMinFileSize"),extendSelection:!0,validationMessageMode:"always",uploadFile:null,uploadChunk:null,abortUpload:null,validationMessageOffset:{h:0,v:0},hoverStateEnabled:!0,useNativeInputClick:!1,useDragOver:!0,nativeDropSupported:!0,_uploadButtonType:"normal",_buttonStylingMode:"contained"})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}},{device:[{platform:"android"}],options:{validationMessageOffset:{v:0}}},{device:()=>"desktop"!==o.A.real().deviceType,options:{useDragOver:!1}},{device:()=>!ge(),options:{uploadMode:"useForm"}},{device:()=>"desktop"!==o.A.real().deviceType,options:{nativeDropSupported:!1}},{device:()=>(0,C.gx)(),options:{_uploadButtonType:"default"}},{device:()=>(0,C.Ft)(),options:{_buttonStylingMode:"text"}}])}_initOptions(Ke){const Ye="labelText"in Ke;super._initOptions(Ke),!Ye&&!this._shouldDragOverBeRendered()&&this.option("labelText","")}_init(){super._init(),this._initFileInput(),this._initLabel(),this._setUploadStrategy(),this._createFiles(),this._createBeforeSendAction(),this._createUploadStartedAction(),this._createUploadedAction(),this._createFilesUploadedAction(),this._createProgressAction(),this._createUploadErrorAction(),this._createUploadAbortedAction(),this._createDropZoneEnterAction(),this._createDropZoneLeaveAction()}_setUploadStrategy(){if(this.option("chunkSize")>0){const Ke=this.option("uploadChunk");this._uploadStrategy=Ke&&(0,a.Tn)(Ke)?new ze(this):new Oe(this)}else{const Ke=this.option("uploadFile");this._uploadStrategy=Ke&&(0,a.Tn)(Ke)?new Ue(this):new Be(this)}}_initFileInput(){this._isCustomClickEvent=!1;const{multiple:Ke,accept:Ye,hint:Pe}=this.option();this._$fileInput||(this._$fileInput=(0,f.A)("<input>").attr("type","file"),g.A.on(this._$fileInput,"change",this._inputChangeHandler.bind(this)),g.A.on(this._$fileInput,"click",Re=>(Re.stopPropagation(),this._resetInputValue(),this.option("useNativeInputClick")||this._isCustomClickEvent)));const Se={multiple:Ke,accept:Ye,tabIndex:-1};(0,a.O9)(Pe)&&(Se.title=Pe),this._$fileInput.prop(Se)}_inputChangeHandler(){if(this._doPreventInputChange)return;const Ke=this._$fileInput.val().replace(/^.*\\/,""),Ye=this._$fileInput.prop("files");if(Ye&&!Ye.length&&"useForm"!==this.option("uploadMode"))return;const Pe=Ye?this._getFiles(Ye):[{name:Ke}];this._changeValue(Pe),"instantly"===this.option("uploadMode")&&this._uploadFiles()}_shouldFileListBeExtended(){return"useForm"!==this.option("uploadMode")&&this.option("extendSelection")&&this.option("multiple")}_changeValue(Ke){const Ye=this._shouldFileListBeExtended()?this.option("value").slice():[];this.option("value",Ye.concat(Ke))}_getFiles(Ke){const Ye=[];return(0,c.__)(Ke,(Pe,Se)=>Ye.push(Se)),Ye}_getFile(Ke){const Ye=(0,a.kf)(Ke)?this.option("value")[Ke]:Ke;return this._files.filter(Pe=>Pe.value===Ye)[0]}_initLabel(){this._$inputLabel||(this._$inputLabel=(0,f.A)("<div>")),this._updateInputLabelText()}_updateInputLabelText(){const Ke=this._isInteractionDisabled()?"":this.option("labelText");this._$inputLabel.text(Ke)}_focusTarget(){return this.$element().find(".dx-fileuploader-button")}_getSubmitElement(){return this._$fileInput}_initMarkup(){super._initMarkup(),this.$element().addClass("dx-fileuploader"),this._renderWrapper(),this._renderInputWrapper(),this._renderSelectButton(),this._renderInputContainer(),this._renderUploadButton(),this._preventRecreatingFiles=!0,this._activeDropZone=null}_render(){this._preventRecreatingFiles=!1,this._attachDragEventHandlers(this._$inputWrapper),this._attachDragEventHandlers(this.option("dropZone")),this._renderFiles(),super._render()}_createFileProgressBar(Ke){Ke.progressBar=this._createProgressBar(Ke.value.size),Ke.progressBar.$element().appendTo(Ke.$file),this._initStatusMessage(Ke),this._ensureCancelButtonInitialized(Ke)}_setStatusMessage(Ke,Ye){setTimeout(()=>{this.option("showFileList")&&Ke.$statusMessage&&(Ke.$statusMessage.text(Ye),Ke.$statusMessage.css("display",""),Ke.progressBar.$element().remove())},400)}_getUploadAbortedStatusMessage(){return"instantly"===this.option("uploadMode")?this.option("uploadAbortedMessage"):this.option("readyToUploadMessage")}_createFiles(){const Ke=this.option("value");this._files&&(0===Ke?.length||!this._shouldFileListBeExtended())&&(this._preventFilesUploading(this._files),this._files=null),this._files||(this._files=[]),(0,c.__)(Ke?.slice(this._files.length),(Ye,Pe)=>{const Se=this._createFile(Pe);this._validateFile(Se),this._files.push(Se)})}_preventFilesUploading(Ke){Ke.forEach(Ye=>this._uploadStrategy.abortUpload(Ye))}_validateFile(Ke){Ke.isValidFileExtension=this._validateFileExtension(Ke),Ke.isValidMinSize=this._validateMinFileSize(Ke),Ke.isValidMaxSize=this._validateMaxFileSize(Ke)}_validateFileExtension(Ke){const Ye=this.option("allowedFileExtensions"),Pe=this.option("accept"),Se=this._getAllowedFileTypes(Pe),Re=Ke.value.name.substring(Ke.value.name.lastIndexOf(".")).toLowerCase();if(0!==Pe?.length&&!this._isFileTypeAllowed(Ke.value,Se))return!1;if(0===Ye?.length)return!0;for(let Fe=0;Fe<Ye.length;Fe++)if(Re===Ye[Fe].toLowerCase())return!0;return!1}_validateMaxFileSize(Ke){const Ye=Ke.value.size,Pe=this.option("maxFileSize");return!(Pe>0)||Ye<=Pe}_validateMinFileSize(Ke){const Ye=Ke.value.size,Pe=this.option("minFileSize");return!(Pe>0)||Ye>=Pe}_createBeforeSendAction(){this._beforeSendAction=this._createActionByOption("onBeforeSend",{excludeValidators:["readOnly"]})}_createUploadStartedAction(){this._uploadStartedAction=this._createActionByOption("onUploadStarted",{excludeValidators:["readOnly"]})}_createUploadedAction(){this._uploadedAction=this._createActionByOption("onUploaded",{excludeValidators:["readOnly"]})}_createFilesUploadedAction(){this._filesUploadedAction=this._createActionByOption("onFilesUploaded",{excludeValidators:["readOnly"]})}_createProgressAction(){this._progressAction=this._createActionByOption("onProgress",{excludeValidators:["readOnly"]})}_createUploadAbortedAction(){this._uploadAbortedAction=this._createActionByOption("onUploadAborted",{excludeValidators:["readOnly"]})}_createUploadErrorAction(){this._uploadErrorAction=this._createActionByOption("onUploadError",{excludeValidators:["readOnly"]})}_createDropZoneEnterAction(){this._dropZoneEnterAction=this._createActionByOption("onDropZoneEnter")}_createDropZoneLeaveAction(){this._dropZoneLeaveAction=this._createActionByOption("onDropZoneLeave")}_createFile(Ke){return{value:Ke,loadedSize:0,onProgress:(0,T.A)(),onAbort:(0,T.A)(),onLoad:(0,T.A)(),onError:(0,T.A)(),onLoadStart:(0,T.A)(),isValidFileExtension:!0,isValidMaxSize:!0,isValidMinSize:!0,isValid(){return this.isValidFileExtension&&this.isValidMaxSize&&this.isValidMinSize},isInitialized:!1}}_resetFileState(Ke){Ke.isAborted=!1,Ke.uploadStarted=!1,Ke.isStartLoad=!1,Ke.loadedSize=0,Ke.chunksData=void 0,Ke.request=void 0}_renderFiles(){var Ke;const Ye=this.option("value");this._$filesContainer?(!this._shouldFileListBeExtended()||0===Ye?.length)&&this._$filesContainer.empty():this._$filesContainer=(0,f.A)("<div>").addClass("dx-fileuploader-files-container").appendTo(this._$content);const Pe=this.option("showFileList");Pe&&(0,c.__)(this._files,(Se,Re)=>{Re.$file||this._renderFile(Re)}),this.$element().toggleClass("dx-fileuploader-show-file-list",Pe),this._toggleFileUploaderEmptyClassName(),this._updateFileNameMaxWidth(),null===(Ke=this._validationMessage)||void 0===Ke||Ke.repaint()}_renderFile(Ke){const{value:Ye}=Ke,Pe=(0,f.A)("<div>").addClass("dx-fileuploader-file-container").appendTo(this._$filesContainer);this._renderFileButtons(Ke,Pe),Ke.$file=(0,f.A)("<div>").addClass("dx-fileuploader-file").appendTo(Pe);const Se=(0,f.A)("<div>").addClass("dx-fileuploader-file-info").appendTo(Ke.$file);Ke.$statusMessage=(0,f.A)("<div>").addClass("dx-fileuploader-file-status-message").appendTo(Ke.$file),(0,f.A)("<div>").addClass("dx-fileuploader-file-name").text(Ye.name).appendTo(Se),(0,a.O9)(Ye.size)&&(0,f.A)("<div>").addClass("dx-fileuploader-file-size").text(this._getFileSize(Ye.size)).appendTo(Se),Ke.isValid()?Ke.$statusMessage.text(this.option("readyToUploadMessage")):(Ke.isValidFileExtension||Ke.$statusMessage.append(this._createValidationElement("invalidFileExtensionMessage")),Ke.isValidMaxSize||Ke.$statusMessage.append(this._createValidationElement("invalidMaxFileSizeMessage")),Ke.isValidMinSize||Ke.$statusMessage.append(this._createValidationElement("invalidMinFileSizeMessage")),Pe.addClass("dx-fileuploader-invalid"))}_createValidationElement(Ke){return(0,f.A)("<span>").text(this.option(Ke))}_updateFileNameMaxWidth(){const Ke=this.option("allowCanceling")&&"useForm"!==this.option("uploadMode")?1:0,Ye="useButtons"===this.option("uploadMode")?1:0,Pe=(0,s.RG)(this._$filesContainer.find(".dx-fileuploader-file-container").first())||(0,s.RG)(this._$filesContainer),Se=this._$filesContainer.find(".dx-fileuploader-button-container").eq(0),Re=(0,s.RG)(Se)*(Ke+Ye),Fe=this._$filesContainer.find(".dx-fileuploader-file-size").eq(0),Xe=Fe.text();Fe.text("1000 Mb");const tt=(0,s.RG)(Fe);Fe.text(Xe),this._$filesContainer.find(".dx-fileuploader-file-name").css("maxWidth",Pe-Re-tt)}_renderFileButtons(Ke,Ye){const Pe=this._getCancelButton(Ke);Pe&&Ye.append(Pe);const Se=this._getUploadButton(Ke);Se&&Ye.append(Se)}_getCancelButton(Ke){if("useForm"===this.option("uploadMode"))return null;const{allowCanceling:Ye,readOnly:Pe,hoverStateEnabled:Se,_buttonStylingMode:Re}=this.option();return Ke.cancelButton=this._createComponent((0,f.A)("<div>").addClass("dx-fileuploader-button dx-fileuploader-cancel-button"),w.A,{onClick:()=>this._removeFile(Ke),icon:"close",visible:Ye,disabled:Pe,integrationOptions:{},hoverStateEnabled:Se,stylingMode:Re}),(0,f.A)("<div>").addClass("dx-fileuploader-button-container").append(Ke.cancelButton.$element())}_getUploadButton(Ke){if(!Ke.isValid()||"useButtons"!==this.option("uploadMode"))return null;const{hoverStateEnabled:Ye,_buttonStylingMode:Pe}=this.option();return Ke.uploadButton=this._createComponent((0,f.A)("<div>").addClass("dx-fileuploader-button dx-fileuploader-upload-button"),w.A,{onClick:()=>this._uploadFile(Ke),icon:"upload",hoverStateEnabled:Ye,stylingMode:Pe}),Ke.onLoadStart.add(()=>Ke.uploadButton.option({visible:!1,disabled:!0})),Ke.onAbort.add(()=>Ke.uploadButton.option({visible:!0,disabled:!1})),(0,f.A)("<div>").addClass("dx-fileuploader-button-container").append(Ke.uploadButton.$element())}_removeFile(Ke){var Ye;null===(Ye=Ke.$file)||void 0===Ye||Ye.parent().remove(),this._files.splice(this._files.indexOf(Ke),1);const Pe=this.option("value").slice();Pe.splice(Pe.indexOf(Ke.value),1),this._preventRecreatingFiles=!0,this.option("value",Pe),this._preventRecreatingFiles=!1,this._toggleFileUploaderEmptyClassName(),this._resetInputValue(!0)}removeFile(Ke){if("useForm"===this.option("uploadMode")||!(0,a.O9)(Ke))return;const Ye=this._getFile(Ke);Ye&&(Ye.uploadStarted&&this._preventFilesUploading([Ye]),this._removeFile(Ye))}_toggleFileUploaderEmptyClassName(){this.$element().toggleClass("dx-fileuploader-empty",!this._files.length||this._hasInvalidFile(this._files))}_hasInvalidFile(Ke){for(let Ye=0;Ye<Ke.length;Ye++)if(!Ke[Ye].isValid())return!0;return!1}_getFileSize(Ke){let Ye=0;const Pe=[x.A.format("dxFileUploader-bytes"),x.A.format("dxFileUploader-kb"),x.A.format("dxFileUploader-Mb"),x.A.format("dxFileUploader-Gb")],Se=Pe.length-1;for(;Ye<Se&&Ke>=1024;)Ke/=1024,Ye++;return`${Math.round(Ke)} ${Pe[Ye]}`}_renderSelectButton(){const Ke=(0,f.A)("<div>").addClass("dx-fileuploader-button").appendTo(this._$inputWrapper);this._selectButton=this._createComponent(Ke,w.A,{text:this.option("selectButtonText"),focusStateEnabled:!1,integrationOptions:{},disabled:this.option("readOnly"),hoverStateEnabled:this.option("hoverStateEnabled")}),this._selectFileDialogHandler=this._selectButtonClickHandler.bind(this),"desktop"===o.A.real().deviceType?this._selectButton.option("onClick",this._selectFileDialogHandler):this._attachSelectFileDialogHandler(this._selectButton.$element()),this._attachSelectFileDialogHandler(this.option("dialogTrigger"))}_selectButtonClickHandler(){if(!this.option("useNativeInputClick")){if(this._isInteractionDisabled())return!1;this._isCustomClickEvent=!0,g.A.trigger(this._$fileInput,"click"),this._isCustomClickEvent=!1}}_attachSelectFileDialogHandler(Ke){(0,a.O9)(Ke)&&(this._detachSelectFileDialogHandler(Ke),g.A.on((0,f.A)(Ke),"click",this._selectFileDialogHandler))}_detachSelectFileDialogHandler(Ke){(0,a.O9)(Ke)&&g.A.off((0,f.A)(Ke),"click",this._selectFileDialogHandler)}_renderUploadButton(){if("useButtons"!==this.option("uploadMode"))return;const Ke=(0,f.A)("<div>").addClass("dx-fileuploader-button").addClass("dx-fileuploader-upload-button").appendTo(this._$content);this._uploadButton=this._createComponent(Ke,w.A,{text:this.option("uploadButtonText"),onClick:this._uploadButtonClickHandler.bind(this),type:this.option("_uploadButtonType"),integrationOptions:{},hoverStateEnabled:this.option("hoverStateEnabled")})}_uploadButtonClickHandler(){this._uploadFiles()}_shouldDragOverBeRendered(){return!this.option("readOnly")&&("useForm"!==this.option("uploadMode")||this.option("nativeDropSupported"))}_isInteractionDisabled(){return this.option("readOnly")||this.option("disabled")}_renderInputContainer(){this._$inputContainer=(0,f.A)("<div>").addClass("dx-fileuploader-input-container").appendTo(this._$inputWrapper),this._$fileInput.addClass("dx-fileuploader-input"),this._renderInput();const Ke=`dx-fileuploader-input-label-${new b.A}`;this._$inputLabel.attr("id",Ke).addClass("dx-fileuploader-input-label").appendTo(this._$inputContainer),this.setAria("labelledby",Ke,this._$fileInput)}_renderInput(){this.option("useNativeInputClick")?this._selectButton.option("template",this._selectButtonInputTemplate.bind(this)):(this._$fileInput.appendTo(this._$inputContainer),this._selectButton.option("template","content")),this._applyInputAttributes(this.option("inputAttr"))}_selectButtonInputTemplate(Ke,Ye){const Pe=(0,f.A)(Ye),Se=(0,f.A)("<span>").addClass("dx-button-text").text(Ke.text);return Pe.append(Se).append(this._$fileInput),Pe}_renderInputWrapper(){this._$inputWrapper=(0,f.A)("<div>").addClass("dx-fileuploader-input-wrapper").appendTo(this._$content)}_detachDragEventHandlers(Ke){(0,a.O9)(Ke)&&g.A.off((0,f.A)(Ke),(0,_.b4)("",this.NAME))}_attachDragEventHandlers(Ke){const Ye=Ke!==this._$inputWrapper;!(0,a.O9)(Ke)||!this._shouldDragOverBeRendered()||(this._detachDragEventHandlers(Ke),Ke=(0,f.A)(Ke),g.A.on(Ke,(0,_.b4)("dragenter",this.NAME),this._dragEnterHandler.bind(this,Ye)),g.A.on(Ke,(0,_.b4)("dragover",this.NAME),this._dragOverHandler.bind(this,Ye)),g.A.on(Ke,(0,_.b4)("dragleave",this.NAME),this._dragLeaveHandler.bind(this,Ye)),g.A.on(Ke,(0,_.b4)("drop",this.NAME),this._dropHandler.bind(this,Ye)))}_applyInputAttributes(Ke){this._$fileInput.attr(Ke)}_useInputForDrop(){return this.option("nativeDropSupported")&&"useForm"===this.option("uploadMode")}_getDropZoneElement(Ke,Ye){let Pe=Ke?Array.from((0,f.A)(this.option("dropZone"))):[this._$inputWrapper];return Pe=Pe.map(Se=>(0,f.A)(Se).get(0)),Pe[Pe.indexOf(Ye.currentTarget)]}_dragEnterHandler(Ke,Ye){if(this.option("disabled"))return!1;this._useInputForDrop()||Ye.preventDefault();const Pe=this._getDropZoneElement(Ke,Ye);(0,a.O9)(Pe)&&this._shouldRaiseDragOver(Ye,Pe)&&(this._activeDropZone=Pe,this._tryToggleDropZoneActive(!0,Ke,Ye))}_shouldRaiseDragOver(Ke,Ye){return null===this._activeDropZone&&this.isMouseOverElement(Ke,Ye,!1)&&Ke.originalEvent.dataTransfer.types.find(Pe=>"Files"===Pe)}_dragOverHandler(Ke,Ye){if(this._useInputForDrop()||Ye.preventDefault(),Ye.originalEvent.dataTransfer.dropEffect="copy",!Ke){const Pe=this._getDropZoneElement(!1,Ye);this._shouldRaiseDragOver(Ye,Pe)&&this._dragEnterHandler(!1,Ye),this._shouldRaiseDragLeave(Ye,!1)&&this._dragLeaveHandler(!1,Ye)}}_dragLeaveHandler(Ke,Ye){this._useInputForDrop()||Ye.preventDefault(),this._shouldRaiseDragLeave(Ye,Ke)&&(this._tryToggleDropZoneActive(!1,Ke,Ye),this._activeDropZone=null)}_shouldRaiseDragLeave(Ke,Ye){return null!==this._activeDropZone&&!this.isMouseOverElement(Ke,this._activeDropZone,!Ye,-1)}_tryToggleDropZoneActive(Ke,Ye,Pe){const Se=Ke?"addClass":"removeClass";this[Ke?"_dropZoneEnterAction":"_dropZoneLeaveAction"]({event:Pe,dropZoneElement:this._activeDropZone}),Ye||this.$element()[Se]("dx-fileuploader-dragover")}_dropHandler(Ke,Ye){if(this._activeDropZone=null,Ke||this.$element().removeClass("dx-fileuploader-dragover"),this._useInputForDrop()||Ke&&this._isInteractionDisabled())return;Ye.preventDefault();const Se=this._getFiles(Ye.originalEvent.dataTransfer.files);!this.option("multiple")&&Se.length>1||0===Se.length||(this._changeValue(Se),"instantly"===this.option("uploadMode")&&this._uploadFiles())}_areAllFilesLoaded(){return this._files.every(Ke=>!Ke.isValid()||Ke._isError||Ke._isLoaded||Ke.isAborted)}_handleAllFilesUploaded(){this._recalculateProgress(),this._areAllFilesLoaded()&&this._filesUploadedAction()}_getAllowedFileTypes(Ke){return Ke.length?Ke.split(",").map(Ye=>Ye.trim()):[]}_isFileTypeAllowed(Ke,Ye){for(let Pe=0,Se=Ye.length;Pe<Se;Pe++){let Re=Ye[Pe];if("."===Re[0]){if(Re=Re.replace(".","\\."),Ke.name.match(new RegExp(`${Re}$`,"i")))return!0}else if(Re=Re.replace(new RegExp("\\*","g"),""),Ke.type.match(new RegExp(Re,"i")))return!0}return!1}_renderWrapper(){const Ke=(0,f.A)("<div>").addClass("dx-fileuploader-wrapper").appendTo(this.$element()),Ye=(0,f.A)("<div>").addClass("dx-fileuploader-container").appendTo(Ke);this._$content=(0,f.A)("<div>").addClass("dx-fileuploader-content").appendTo(Ye)}_clean(){this._$fileInput.detach(),delete this._$filesContainer,this._detachSelectFileDialogHandler(this.option("dialogTrigger")),this._detachDragEventHandlers(this.option("dropZone")),this._files&&this._files.forEach(Ke=>{Ke.$file=null,Ke.$statusMessage=null}),super._clean()}abortUpload(Ke){if("useForm"!==this.option("uploadMode"))if((0,a.O9)(Ke)){const Ye=this._getFile(Ke);Ye&&this._preventFilesUploading([Ye])}else this._preventFilesUploading(this._files)}upload(Ke){if("useForm"!==this.option("uploadMode"))if((0,a.O9)(Ke)){const Ye=this._getFile(Ke);Ye&&ge()&&this._uploadFile(Ye)}else this._uploadFiles()}_uploadFiles(){ge()&&(0,c.__)(this._files,(Ke,Ye)=>this._uploadFile(Ye))}_uploadFile(Ke){this._uploadStrategy.upload(Ke)}_updateProgressBar(Ke,Ye){Ke.progressBar&&Ke.progressBar.option({value:Ye.loaded,showStatus:!0}),this._progressAction({file:Ke.value,segmentSize:Ye.currentSegmentSize,bytesLoaded:Ye.loaded,bytesTotal:Ye.total,event:Ye.event,request:Ke.request})}_updateTotalProgress(Ke,Ye){let Pe=0;(0,a.O9)(Ke)&&(this._files.length>0&&this._areAllFilesLoaded()&&0===Ke&&0===Ye?Pe=this._getProgressValue(1):Ke&&(Pe=this._getProgressValue(Ye/Ke))),this.option("progress",Pe),this._setLoadedSize(Ye)}_getProgressValue(Ke){return Math.floor(100*Ke)}_initStatusMessage(Ke){Ke.$statusMessage.css("display","none")}_ensureCancelButtonInitialized(Ke){if(Ke.isInitialized)return;Ke.cancelButton.option("onClick",()=>{this._preventFilesUploading([Ke]),this._removeFile(Ke)});const Ye=()=>{setTimeout(()=>{Ke.cancelButton.option({visible:!1})},400)};Ke.onLoad.add(Ye),Ke.onError.add(Ye)}_createProgressBar(Ke){return this._createComponent((0,f.A)("<div>"),D.A,{value:void 0,min:0,max:Ke,statusFormat:Ye=>`${this._getProgressValue(Ye)}%`,showStatus:!1,statusPosition:"right"})}_getTotalFilesSize(){return this._totalFilesSize||(this._totalFilesSize=0,(0,c.__)(this._files,(Ke,Ye)=>{this._totalFilesSize+=Ye.value.size})),this._totalFilesSize}_getTotalLoadedFilesSize(){return this._totalLoadedFilesSize||(this._totalLoadedFilesSize=0,(0,c.__)(this._files,(Ke,Ye)=>{this._totalLoadedFilesSize+=Ye.loadedSize})),this._totalLoadedFilesSize}_setLoadedSize(Ke){this._totalLoadedFilesSize=Ke}_recalculateProgress(){this._totalFilesSize=0,this._totalLoadedFilesSize=0,this._updateTotalProgress(this._getTotalFilesSize(),this._getTotalLoadedFilesSize())}isMouseOverElement(Ke,Ye,Pe){let Se=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!Ye)return!1;const Re=Pe?parseFloat(L.getComputedStyle(Ye,":before").height):0,Fe=Pe?parseFloat(L.getComputedStyle(Ye,":after").height):0,Xe=(0,s.A3)(Ye).left,tt=(0,s.A3)(Ye).top+Re,vt=Ye.offsetWidth,qe=Ye.offsetHeight-Re-Fe,At=this._getEventX(Ke),Tt=this._getEventY(Ke);return At+Se>=Xe&&At-Se<Xe+vt&&Tt+Se>=tt&&Tt-Se<tt+qe}_getEventX(Ke){return(0,_.kH)(Ke)?this._getTouchEventX(Ke):Ke.clientX+this._getDocumentScrollLeft()}_getEventY(Ke){return(0,_.kH)(Ke)?this._getTouchEventY(Ke):Ke.clientY+this._getDocumentScrollTop()}_getTouchEventX(Ke){let Ye=null;return Ke.changedTouches.length>0?Ye=Ke.changedTouches:Ke.targetTouches.length>0&&(Ye=Ke.targetTouches),Ye?Ye[0].pageX:0}_getTouchEventY(Ke){let Ye=null;return Ke.changedTouches.length>0?Ye=Ke.changedTouches:Ke.targetTouches.length>0&&(Ye=Ke.targetTouches),Ye?Ye[0].pageY:0}_getDocumentScrollTop(){const Ke=P.A.getDocument();return Ke.documentElement.scrollTop||Ke.body.scrollTop}_getDocumentScrollLeft(){const Ke=P.A.getDocument();return Ke.documentElement.scrollLeft||Ke.body.scrollLeft}_updateReadOnlyState(){const Ke=this.option("readOnly");this._selectButton.option("disabled",Ke),this._files.forEach(Ye=>{var Pe;return null===(Pe=Ye.cancelButton)||void 0===Pe?void 0:Pe.option("disabled",Ke)}),this._updateInputLabelText(),this._attachDragEventHandlers(this._$inputWrapper)}_updateHoverState(){var Ke,Ye;const Pe=this.option("hoverStateEnabled");null===(Ke=this._selectButton)||void 0===Ke||Ke.option("hoverStateEnabled",Pe),null===(Ye=this._uploadButton)||void 0===Ye||Ye.option("hoverStateEnabled",Pe),this._files.forEach(Se=>{var Re,Fe;null===(Re=Se.uploadButton)||void 0===Re||Re.option("hoverStateEnabled",Pe),null===(Fe=Se.cancelButton)||void 0===Fe||Fe.option("hoverStateEnabled",Pe)})}_optionChanged(Ke){const{name:Ye,value:Pe,previousValue:Se}=Ke;switch(Ye){case"height":case"width":this._updateFileNameMaxWidth(),super._optionChanged(Ke);break;case"value":!Pe.length&&this._$fileInput.val(""),this._preventRecreatingFiles||(this._createFiles(),this._renderFiles()),this._recalculateProgress(),super._optionChanged(Ke);break;case"name":case"hint":this._initFileInput(),super._optionChanged(Ke);break;case"accept":this._initFileInput();break;case"multiple":this._initFileInput(),Ke.value||this.clear();break;case"readOnly":this._updateReadOnlyState(),super._optionChanged(Ke);break;case"disabled":this._updateInputLabelText(),super._optionChanged(Ke);break;case"selectButtonText":this._selectButton.option("text",Pe);break;case"uploadButtonText":this._uploadButton&&this._uploadButton.option("text",Pe);break;case"_uploadButtonType":this._uploadButton&&this._uploadButton.option("type",Pe);break;case"_buttonStylingMode":this._files.forEach(Re=>{var Fe,Xe;null===(Fe=Re.uploadButton)||void 0===Fe||Fe.option("stylingMode",Pe),null===(Xe=Re.cancelButton)||void 0===Xe||Xe.option("stylingMode",Pe)});break;case"dialogTrigger":this._detachSelectFileDialogHandler(Se),this._attachSelectFileDialogHandler(Pe);break;case"dropZone":this._detachDragEventHandlers(Se),this._attachDragEventHandlers(Pe);break;case"maxFileSize":case"minFileSize":case"allowedFileExtensions":case"invalidFileExtensionMessage":case"invalidMaxFileSizeMessage":case"invalidMinFileSizeMessage":case"readyToUploadMessage":case"uploadedMessage":case"uploadFailedMessage":case"uploadAbortedMessage":case"nativeDropSupported":this._invalidate();break;case"labelText":this._updateInputLabelText();break;case"showFileList":this._preventRecreatingFiles||this._renderFiles();break;case"uploadFile":case"uploadChunk":case"chunkSize":this._setUploadStrategy();break;case"abortUpload":case"uploadUrl":case"progress":case"uploadMethod":case"uploadHeaders":case"uploadCustomData":case"extendSelection":break;case"hoverStateEnabled":this._updateHoverState(),super._optionChanged(Ke);break;case"allowCanceling":case"uploadMode":this.clear(),this._invalidate();break;case"onBeforeSend":this._createBeforeSendAction();break;case"onUploadStarted":this._createUploadStartedAction();break;case"onUploaded":this._createUploadedAction();break;case"onFilesUploaded":this._createFilesUploadedAction();break;case"onProgress":this._createProgressAction();break;case"onUploadError":this._createUploadErrorAction();break;case"onUploadAborted":this._createUploadAbortedAction();break;case"onDropZoneEnter":this._createDropZoneEnterAction();break;case"onDropZoneLeave":this._createDropZoneLeaveAction();break;case"useNativeInputClick":this._renderInput();break;case"useDragOver":this._attachDragEventHandlers(this._$inputWrapper);break;case"inputAttr":this._applyInputAttributes(this.option(Ye));break;default:super._optionChanged(Ke)}}_resetInputValue(Ke){"useForm"===this.option("uploadMode")&&!Ke||(this._doPreventInputChange=!0,this._$fileInput.val(""),this._doPreventInputChange=!1)}clear(){this.option("value",[])}}class xe{constructor(Ke,Ye){this.file=Ke,this.chunkSize=Ye,this.index=0}read(){if(!this.file)return null;const Ke=this.createBlobResult(this.file,this.index,this.chunkSize);return Ke.isCompleted&&(this.file=null),this.index++,Ke}createBlobResult(Ke,Ye,Pe){const Se=Ye*Pe;return{blob:this.sliceFile(Ke,Se,Pe),index:Ye,isCompleted:Se+Pe>=Ke.size}}sliceFile(Ke,Ye,Pe){return Ke.slice?Ke.slice(Ye,Ye+Pe):Ke.webkitSlice?Ke.webkitSlice(Ye,Ye+Pe):null}}class Te{constructor(Ke){this.fileUploader=Ke}upload(Ke){Ke.isInitialized&&Ke.isAborted&&this.fileUploader._resetFileState(Ke),Ke.isValid()&&!Ke.uploadStarted&&(this._prepareFileBeforeUpload(Ke),this._uploadCore(Ke))}abortUpload(Ke){if(!(Ke._isError||Ke._isLoaded||Ke.isAborted)&&Ke.uploadStarted&&(Ke.isAborted=!0,Ke.request&&Ke.request.abort(),this._isCustomCallback("abortUpload"))){const Ye=this.fileUploader.option("abortUpload"),Pe=this._createUploadArgument(Ke);let Se=null;try{const Re=Ye(Ke.value,Pe);Se=(0,y.Sx)(Re)}catch(Re){Se=(0,y.cY)().reject(Re).promise()}Se.done(()=>Ke.onAbort.fire()).fail(Re=>this._handleFileError(Ke,Re))}}_beforeSend(Ke,Ye){const Pe=this._createUploadArgument(Ye);this.fileUploader._beforeSendAction({request:Ke,file:Ye.value,uploadInfo:Pe}),Ye.request=Ke}_createUploadArgument(Ke){}_uploadCore(Ke){}_isCustomCallback(Ke){const Ye=this.fileUploader.option(Ke);return Ye&&(0,a.Tn)(Ye)}_handleProgress(Ke,Ye){Ke._isError||(Ke._isProgressStarted=!0,this._handleProgressCore(Ke,Ye))}_handleProgressCore(Ke,Ye){}_handleFileError(Ke,Ye){Ke._isError=!0,Ke.onError.fire(Ye)}_prepareFileBeforeUpload(Ke){var Ye;Ke.$file&&(null===(Ye=Ke.progressBar)||void 0===Ye||Ye.dispose(),this.fileUploader._createFileProgressBar(Ke)),Ke.isInitialized||(Ke.onLoadStart.add(this._onUploadStarted.bind(this,Ke)),Ke.onLoad.add(this._onLoadedHandler.bind(this,Ke)),Ke.onError.add(this._onErrorHandler.bind(this,Ke)),Ke.onAbort.add(this._onAbortHandler.bind(this,Ke)),Ke.onProgress.add(this._onProgressHandler.bind(this,Ke)),Ke.isInitialized=!0)}_shouldHandleError(Ke,Ye){return(this._isStatusError(Ye.status)||!Ke._isProgressStarted)&&!Ke.isAborted}_isStatusError(Ke){return Ke>=400&&Ke<500||Ke>=500&&Ke<600}_onUploadStarted(Ke,Ye){Ke.uploadStarted=!0,this.fileUploader._uploadStartedAction({file:Ke.value,event:Ye,request:Ke.request})}_onAbortHandler(Ke,Ye){const Pe={file:Ke.value,event:Ye,request:Ke.request,message:this.fileUploader._getUploadAbortedStatusMessage()};this.fileUploader._uploadAbortedAction(Pe),this.fileUploader._setStatusMessage(Ke,Pe.message),this.fileUploader._handleAllFilesUploaded()}_onErrorHandler(Ke,Ye){const Pe={file:Ke.value,event:void 0,request:Ke.request,error:Ye,message:this.fileUploader.option("uploadFailedMessage")};this.fileUploader._uploadErrorAction(Pe),this.fileUploader._setStatusMessage(Ke,Pe.message),this.fileUploader._handleAllFilesUploaded()}_onLoadedHandler(Ke,Ye){const Pe={file:Ke.value,event:Ye,request:Ke.request,message:this.fileUploader.option("uploadedMessage")};Ke._isLoaded=!0,this.fileUploader._uploadedAction(Pe),this.fileUploader._setStatusMessage(Ke,Pe.message),this.fileUploader._handleAllFilesUploaded()}_onProgressHandler(Ke,Ye){if(Ke){const Pe=this.fileUploader._getTotalFilesSize(),Se=this.fileUploader._getTotalLoadedFilesSize(),Re=Math.min(Ye.loaded,Ke.value.size),Fe=Re-Ke.loadedSize;Ke.loadedSize=Re,this.fileUploader._updateTotalProgress(Pe,Se+Fe),this.fileUploader._updateProgressBar(Ke,this._getLoadedData(Re,Ye.total,Fe,Ye))}}_getLoadedData(Ke,Ye,Pe,Se){return{loaded:Ke,total:Ye,currentSegmentSize:Pe}}_extendFormData(Ke){const Ye=this.fileUploader.option("uploadCustomData");for(const Pe in Ye)Object.prototype.hasOwnProperty.call(Ye,Pe)&&(0,a.O9)(Ye[Pe])&&Ke.append(Pe,Ye[Pe])}}class Ee extends Te{constructor(Ke){super(Ke),this.chunkSize=this.fileUploader.option("chunkSize")}_uploadCore(Ke){const Ye=Ke.value,Pe={name:Ye.name,loadedBytes:0,type:Ye.type,blobReader:new xe(Ye,this.chunkSize),guid:new b.A,fileSize:Ye.size,count:this._getFileChunksCount(Ye),customData:{}};Ke.chunksData=Pe,this._sendChunk(Ke,Pe)}_getFileChunksCount(Ke){return 0===Ke.size?1:Math.ceil(Ke.size/this.chunkSize)}_sendChunk(Ke,Ye){const Pe=Ye.blobReader.read();Ye.currentChunk=Pe,Pe&&this._sendChunkCore(Ke,Ye,Pe).done(()=>{Ke.isAborted||(Ye.loadedBytes+=Pe.blob.size,Ke.onProgress.fire({loaded:Ye.loadedBytes,total:Ke.value.size}),Pe.isCompleted&&Ke.onLoad.fire(),setTimeout(()=>this._sendChunk(Ke,Ye)))}).fail(Se=>{this._shouldHandleError(Ke,Se)&&this._handleFileError(Ke,Se)})}_sendChunkCore(Ke,Ye,Pe){}_tryRaiseStartLoad(Ke){Ke.isStartLoad||(Ke.isStartLoad=!0,Ke.onLoadStart.fire())}_getEvent(Ke){return null}_createUploadArgument(Ke){return this._createChunksInfo(Ke.chunksData)}_createChunksInfo(Ke){return{bytesUploaded:Ke.loadedBytes,chunkCount:Ke.count,customData:Ke.customData,chunkBlob:Ke.currentChunk.blob,chunkIndex:Ke.currentChunk.index}}}class Oe extends Ee{_sendChunkCore(Ke,Ye,Pe){return S.A.sendRequest({url:this.fileUploader.option("uploadUrl"),method:this.fileUploader.option("uploadMethod"),headers:this.fileUploader.option("uploadHeaders"),beforeSend:Se=>this._beforeSend(Se,Ke),upload:{onprogress:Se=>this._handleProgress(Ke,Se),onloadstart:()=>this._tryRaiseStartLoad(Ke),onabort:()=>Ke.onAbort.fire()},data:this._createFormData({fileName:Ye.name,blobName:this.fileUploader.option("name"),blob:Pe.blob,index:Pe.index,count:Ye.count,type:Ye.type,guid:Ye.guid,size:Ye.fileSize})})}_createFormData(Ke){const Ye=new L.FormData;return Ye.append(Ke.blobName,Ke.blob),Ye.append("chunkMetadata",JSON.stringify({FileName:Ke.fileName,Index:Ke.index,TotalCount:Ke.count,FileSize:Ke.size,FileType:Ke.type,FileGuid:Ke.guid})),this._extendFormData(Ye),Ye}}class ze extends Ee{_sendChunkCore(Ke,Ye){this._tryRaiseStartLoad(Ke);const Pe=this._createChunksInfo(Ye),Se=this.fileUploader.option("uploadChunk");try{const Re=Se(Ke.value,Pe);return(0,y.Sx)(Re)}catch(Re){return(0,y.cY)().reject(Re).promise()}}_shouldHandleError(Ke,Ye){return!0}}class $e extends Te{_uploadCore(Ke){Ke.loadedSize=0,this._uploadFile(Ke).done(()=>{Ke.isAborted||Ke.onLoad.fire()}).fail(Ye=>{this._shouldHandleError(Ke,Ye)&&this._handleFileError(Ke,Ye)})}_uploadFile(Ke){}_handleProgressCore(Ke,Ye){Ke.onProgress.fire(Ye)}_getLoadedData(Ke,Ye,Pe,Se){const Re=super._getLoadedData(Ke,Ye,Pe,Se);return Re.event=Se,Re}}class Be extends $e{_uploadFile(Ke){return S.A.sendRequest({url:this.fileUploader.option("uploadUrl"),method:this.fileUploader.option("uploadMethod"),headers:this.fileUploader.option("uploadHeaders"),beforeSend:Ye=>this._beforeSend(Ye,Ke),upload:{onprogress:Ye=>this._handleProgress(Ke,Ye),onloadstart:()=>Ke.onLoadStart.fire(),onabort:()=>Ke.onAbort.fire()},data:this._createFormData(this.fileUploader.option("name"),Ke.value)})}_createFormData(Ke,Ye){const Pe=new L.FormData;return Pe.append(Ke,Ye,Ye.name),this._extendFormData(Pe),Pe}}class Ue extends $e{_uploadFile(Ke){Ke.onLoadStart.fire();const Ye=Se=>{this._handleProgress(Ke,{loaded:Se,total:Ke.value.size})},Pe=this.fileUploader.option("uploadFile");try{const Se=Pe(Ke.value,Ye);return(0,y.Sx)(Se)}catch(Se){return(0,y.cY)().reject(Se).promise()}}_shouldHandleError(Ke,Ye){return!0}}(0,W.A)("dxFileUploader",fe);const st=fe},8941:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>le});var W=M(1973),o=M(6054),P=M(5704),b=M(6021),f=M(3090),S=M(1830),T=M(4072),y=M(9293),d=M(8360),c=M(8628),s=M(3771),a=M(1757),u=M(7080),h=M(6163),g=M(6428);const N="dx-filterbuilder-action-icon",Q="dx-state-active",pe="filterBuilder",he=[{name:"onEditorPreparing",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onEditorPrepared",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onValueChanged",config:{excludeValidators:["disabled","readOnly"]}}],de={and:"and",or:"or",notAnd:"!and",notOr:"!or"},ue=(0,s.A)(class{});class be extends u.A{_getDefaultOptions(){return(0,f.X)(super._getDefaultOptions(),{onEditorPreparing:null,onEditorPrepared:null,onValueChanged:null,fields:[],groupOperations:["and","or","notAnd","notOr"],maxGroupLevel:void 0,value:null,allowHierarchicalFields:!1,groupOperationDescriptions:{and:d.A.format("dxFilterBuilder-and"),or:d.A.format("dxFilterBuilder-or"),notAnd:d.A.format("dxFilterBuilder-notAnd"),notOr:d.A.format("dxFilterBuilder-notOr")},customOperations:[],closePopupOnTargetScroll:!0,filterOperationDescriptions:{between:d.A.format("dxFilterBuilder-filterOperationBetween"),equal:d.A.format("dxFilterBuilder-filterOperationEquals"),notEqual:d.A.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:d.A.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:d.A.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:d.A.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:d.A.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:d.A.format("dxFilterBuilder-filterOperationStartsWith"),contains:d.A.format("dxFilterBuilder-filterOperationContains"),notContains:d.A.format("dxFilterBuilder-filterOperationNotContains"),endsWith:d.A.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:d.A.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:d.A.format("dxFilterBuilder-filterOperationIsNotBlank")}})}_optionChanged(ye){switch(ye.name){case"closePopupOnTargetScroll":break;case"onEditorPreparing":case"onEditorPrepared":case"onValueChanged":this._initActions();break;case"customOperations":this._initCustomOperations(),this._invalidate();break;case"fields":case"maxGroupLevel":case"groupOperations":case"allowHierarchicalFields":case"groupOperationDescriptions":case"filterOperationDescriptions":this._invalidate();break;case"value":if(ye.value!==ye.previousValue){const ge=this._disableInvalidateForValue;ge||(this._initModel(),this._invalidate()),this._disableInvalidateForValue=!1,this.executeAction("onValueChanged",{value:ye.value,previousValue:ye.previousValue}),this._disableInvalidateForValue=ge}break;default:super._optionChanged(ye)}}getFilterExpression(){const ye=this._getNormalizedFields(),ge=(0,f.X)(!0,[],this._model);return(0,g.zk)((0,g.SK)(ge),ye,this._customOperations,pe)}_getNormalizedFields(){return(0,g.NP)(this.option("fields"))}_updateFilter(){this._disableInvalidateForValue=!0;const ye=(0,f.X)(!0,[],this._model),ge=(0,g.SK)(ye),fe=(0,g.SK)(this._getModel(this.option("value")));JSON.stringify(fe)!==JSON.stringify(ge)&&this.option("value",ge),this._disableInvalidateForValue=!1,this._fireContentReadyAction()}_init(){this._initCustomOperations(),this._initModel(),this._initEditorFactory(),this._initActions(),super._init()}_initEditorFactory(){this._editorFactory=new ue}_initCustomOperations(){this._customOperations=(0,g.BK)(this.option("customOperations"),this.option("filterOperationDescriptions.between"),this)}_getDefaultGroupOperation(){var ye;return(null===(ye=this.option("groupOperations"))||void 0===ye?void 0:ye[0])??de.and}_getModel(ye){return(0,g.M7)(ye,this._customOperations,this._getDefaultGroupOperation())}_initModel(){this._model=this._getModel(this.option("value"))}_initActions(){const ye=this;ye._actions={},he.forEach(ge=>{const fe=(0,f.X)({},ge.config);ye._actions[ge.name]=ye._createActionByOption(ge.name,fe)})}executeAction(ye,ge){const fe=this._actions[ye];return fe&&fe(ge)}_initMarkup(){this.$element().addClass("dx-filterbuilder"),super._initMarkup(),this._createGroupElementByCriteria(this._model).appendTo(this.$element())}_createConditionElement(ye,ge){return(0,P.A)("<div>").addClass("dx-filterbuilder-group").append(this._createConditionItem(ye,ge))}_createGroupElementByCriteria(ye,ge){let fe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const xe=this._createGroupElement(ye,ge,fe),Te=xe.find(".dx-filterbuilder-group-content"),Ee=(0,g.j_)(ye);for(let Oe=0;Oe<Ee.length;Oe++){const ze=Ee[Oe];(0,g.IZ)(ze)?this._createGroupElementByCriteria(ze,ye,fe+1).appendTo(Te):(0,g.G3)(ze)&&this._createConditionElement(ze,ye).appendTo(Te)}return xe}_createGroupElement(ye,ge,fe){const xe=(0,P.A)("<div>").addClass("dx-filterbuilder-group-item"),Te=(0,P.A)("<div>").addClass("dx-filterbuilder-group-content"),Ee=(0,P.A)("<div>").addClass("dx-filterbuilder-group").append(xe).append(Te);return null!=ge&&this._createRemoveButton(()=>{(0,g.Ai)(ge,ye),Ee.remove(),this._updateFilter()}).appendTo(xe),this._createGroupOperationButton(ye).appendTo(xe),this._createAddButton(()=>{const Oe=(0,g.LH)(this._getDefaultGroupOperation());(0,g.B5)(Oe,ye),this._createGroupElement(Oe,ye,fe+1).appendTo(Te),this._updateFilter()},()=>{const Oe=this.option("fields")[0],ze=(0,g.qB)(Oe,this._customOperations);(0,g.B5)(ze,ye),this._createConditionElement(ze,ye).appendTo(Te),this._updateFilter()},fe).appendTo(xe),Ee}_createButton(ye){return(0,P.A)("<div>").text(ye)}_createGroupOperationButton(ye){const ge=this._getGroupOperations(ye);let fe=(0,g.uN)(ye,ge);const xe=fe.text,Te=ge&&ge.length<2?this._createButton(xe).addClass("dx-state-disabled"):this._createButtonWithMenu({caption:xe,menu:{items:ge,displayExpr:"text",keyExpr:"value",onItemClick:Ee=>{fe!==Ee.itemData&&((0,g.rK)(ye,Ee.itemData.value),Te.text(Ee.itemData.text),fe=Ee.itemData,this._updateFilter())},onContentReady(Ee){Ee.component.selectItem(fe)},cssClass:"dx-filterbuilder-group-operations"}});return Te.addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-group-operation").attr("tabindex",0)}_createButtonWithMenu(ye){const ge=this,fe=function(){ge.$element().find(`.${Q}`).removeClass(Q),ge.$element().find(".dx-overlay .dx-treeview").remove(),ge.$element().find(".dx-overlay").remove()},xe=this.option("rtlEnabled"),Te=xe?"right":"left",Ee=this._createButton(ye.caption);var Oe;return(0,f.X)(ye.menu,{focusStateEnabled:!0,selectionMode:"single",onItemClick:(Oe=ye.menu.onItemClick,function(ze){Oe(ze),"dxclick"===ze.event.type&&fe()}),onHiding(){Ee.removeClass(Q)},position:{my:`${Te} top`,at:`${Te} bottom`,offset:"0 1",of:Ee,collision:"flip"},animation:null,onHidden(){fe()},cssClass:`dx-filterbuilder-overlay ${ye.menu.cssClass}`,rtlEnabled:xe}),ye.popup={onShown(ze){const $e=(0,P.A)(ze.component.content()).find(".dx-treeview"),Be=$e.dxTreeView("instance");T.A.on($e,"keyup keydown",Ue=>{const ot=(0,y.YD)(Ue);("keydown"===Ue.type&&"tab"===ot||"keyup"===Ue.type&&("escape"===ot||"enter"===ot))&&(ze.component.hide(),T.A.trigger(ye.menu.position.of,"focus"))}),Be.focus(),Be.option("focusedElement",null)}},this._subscribeOnClickAndEnterKey(Ee,()=>{fe(),ge._createPopupWithTreeView(ye,ge.$element()),Ee.addClass(Q)}),Ee}_hasValueButton(ye){const ge=(0,g.D3)(this._customOperations,ye[1]);return ge?!1!==ge.hasValue:null!==ye[2]}_createOperationButtonWithMenu(ye,ge){const fe=this,xe=(0,g.GC)(ge,this.option("filterOperationDescriptions"),this._customOperations);let Te=(0,g.Zh)((0,g.tg)(ye),xe);const Ee=this._createButtonWithMenu({caption:Te.text,menu:{items:xe,displayExpr:"text",onItemRendered(Oe){Oe.itemData.isCustom&&(0,P.A)(Oe.itemElement).addClass("dx-filterbuilder-menu-custom-operation")},onContentReady(Oe){Oe.component.selectItem(Te)},onItemClick:Oe=>{if(Te!==Oe.itemData){Te=Oe.itemData,(0,g.d0)(ye,Te.value,fe._customOperations);const ze=Ee.siblings().filter(".dx-filterbuilder-item-value");fe._hasValueButton(ye)?(0!==ze.length&&ze.remove(),fe._createValueButton(ye,ge).appendTo(Ee.parent())):ze.remove(),Ee.text(Te.text),this._updateFilter()}},cssClass:"dx-filterbuilder-operations"}}).addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-item-operation").attr("tabindex",0);return Ee}_createOperationAndValueButtons(ye,ge,fe){this._createOperationButtonWithMenu(ye,ge).appendTo(fe),this._hasValueButton(ye)&&this._createValueButton(ye,ge).appendTo(fe)}_createFieldButtonWithMenu(ye,ge,fe){const xe=this,Te=this.option("allowHierarchicalFields"),Ee=(0,g.JS)(ye,Te);let Oe=(0,g.VI)(fe.name||fe.dataField,Ee);const ze=function(Be,Ue){return Te?(0,g.WI)(Be,Ue):Be.caption},$e=this._createButtonWithMenu({caption:ze(Oe,Ee),menu:{items:Ee,dataStructure:"plain",keyExpr:"id",parentId:"parentId",displayExpr:"caption",onItemClick:Be=>{if(Oe!==Be.itemData){Oe=Be.itemData,ge[0]=Oe.name||Oe.dataField,ge[2]="object"===Oe.dataType?null:"",(0,g.d0)(ge,(0,g.PZ)(Oe),xe._customOperations),$e.siblings().filter(".dx-filterbuilder-text").remove(),xe._createOperationAndValueButtons(ge,Oe,$e.parent());const Ue=ze(Oe,Be.component.option("items"));$e.text(Ue),this._updateFilter()}},onContentReady(Be){Be.component.selectItem(Oe)},cssClass:"dx-filterbuilder-fields"}}).addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-item-field").attr("tabindex",0);return $e}_createConditionItem(ye,ge){const fe=(0,P.A)("<div>").addClass("dx-filterbuilder-group-item"),xe=this._getNormalizedFields(),Te=(0,g.VI)(ye[0],xe);return this._createRemoveButton(()=>{(0,g.Ai)(ge,ye),1===fe.parent().children().length?fe.parent().remove():fe.remove(),this._updateFilter()}).appendTo(fe),this._createFieldButtonWithMenu(xe,ye,Te).appendTo(fe),this._createOperationAndValueButtons(ye,Te,fe),fe}_getGroupOperations(ye){let ge=this.option("groupOperations");const fe=this.option("groupOperationDescriptions");return(!ge||!ge.length)&&(ge=[(0,g.Bd)(ye).replace("!","not")]),ge.map(xe=>({text:fe[xe],value:de[xe]}))}_createRemoveButton(ye){const ge=(0,P.A)("<div>").addClass(N).addClass("dx-icon-remove").addClass("dx-filterbuilder-action").attr("tabindex",0);return this._subscribeOnClickAndEnterKey(ge,ye),ge}_createAddButton(ye,ge,fe){let xe;const Te=this.option("maxGroupLevel");return(0,S.O9)(Te)&&fe>=Te?(xe=this._createButton(),this._subscribeOnClickAndEnterKey(xe,ge)):xe=this._createButtonWithMenu({menu:{items:[{caption:d.A.format("dxFilterBuilder-addCondition"),click:ge},{caption:d.A.format("dxFilterBuilder-addGroup"),click:ye}],displayExpr:"caption",onItemClick(Ee){Ee.itemData.click()},cssClass:"dx-filterbuilder-add-condition"}}),xe.addClass(N).addClass("dx-icon-plus").addClass("dx-filterbuilder-action").attr("tabindex",0)}_createValueText(ye,ge,fe){const xe=this,Te=(0,P.A)("<div>").html("&nbsp;").addClass("dx-filterbuilder-item-value-text").attr("tabindex",0).appendTo(fe),Ee=ye[2],Oe=(0,g.D3)(xe._customOperations,ye[1]);return!Oe&&ge.lookup?(0,g.yy)(ge,Ee,ze=>{(0,g.rx)(Te,ze)}):(0,b.z7)((0,g.GT)(ge,Ee,Oe)).done(ze=>{(0,g.rx)(Te,ze,Oe)}),xe._subscribeOnClickAndEnterKey(Te,ze=>{"keyup"===ze.type&&ze.stopPropagation(),xe._createValueEditorWithEvents(ye,ge,fe)}),Te}_updateConditionValue(ye,ge,fe){ye[2]!==ge&&(ye[2]=ge),fe(),this._updateFilter()}_addDocumentKeyUp(ye,ge){let fe=!1,xe=!1;const Te=o.A.getDocument(),Ee=ze=>{fe||xe?xe=!1:ge(ze)};T.A.on(Te,"keyup",Ee);const Oe=ye.find("input");T.A.on(Oe,"compositionstart",()=>{fe=!0}),T.A.on(Oe,"compositionend",()=>{fe=!1,xe=!0}),T.A.on(Oe,"keydown",ze=>{229!==ze.which&&(xe=!1)}),this._documentKeyUpHandler=Ee}_addDocumentClick(ye,ge){const fe=o.A.getDocument(),xe=Te=>{this._isFocusOnEditorParts(ye,Te.target)||(T.A.trigger(ye.find("input"),"change"),ge())};T.A.on(fe,"dxpointerdown",xe),this._documentClickHandler=xe}_isFocusOnEditorParts(ye,ge){const fe=ge||o.A.getActiveElement();return(0,P.A)(fe).closest(ye.children()).length||(0,P.A)(fe).closest(".dx-dropdowneditor-overlay").length}_removeEvents(){const ye=o.A.getDocument();(0,S.O9)(this._documentKeyUpHandler)&&T.A.off(ye,"keyup",this._documentKeyUpHandler),(0,S.O9)(this._documentClickHandler)&&T.A.off(ye,"dxpointerdown",this._documentClickHandler)}_dispose(){this._removeEvents(),super._dispose()}_createValueEditorWithEvents(ye,ge,fe){let xe=ye[2];const Te=()=>(fe.empty(),this._removeEvents(),this._createValueText(ye,ge,fe)),Ee=()=>{this._updateConditionValue(ye,xe,()=>{Te()})},Oe={value:""===xe?null:xe,filterOperation:(0,g.tg)(ye),setValue($e){xe=null===$e?"":$e},closeEditor:Ee,text:fe.text()};fe.empty();const ze=this._createValueEditor(fe,ge,Oe);T.A.trigger(ze.find("input").not(":hidden").eq(0),"focus"),this._removeEvents(),this._addDocumentClick(ze,Ee),this._addDocumentKeyUp(ze,$e=>{const Be=(0,y.YD)($e);if("tab"===Be){if(this._isFocusOnEditorParts(ze))return;this._updateConditionValue(ye,xe,()=>{Te(),$e.shiftKey&&T.A.trigger(fe.prev(),"focus")})}"escape"===Be&&T.A.trigger(Te(),"focus"),"enter"===Be&&this._updateConditionValue(ye,xe,()=>{T.A.trigger(Te(),"focus")})}),this._fireContentReadyAction()}_createValueButton(ye,ge){const fe=(0,P.A)("<div>").addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-item-value");return this._createValueText(ye,ge,fe),fe}_createValueEditor(ye,ge,fe){const xe=(0,P.A)("<div>").attr("tabindex",0).appendTo(ye),Te=(0,g.D3)(this._customOperations,fe.filterOperation),Ee=Te&&Te.editorTemplate?Te.editorTemplate:ge.editorTemplate;return Ee?this._getTemplate(Ee).render({model:(0,f.X)({field:ge},fe),container:xe}):this._editorFactory.createEditor.call(this,xe,(0,f.X)({},ge,fe,{parentType:pe})),xe}_createPopupWithTreeView(ye,ge){const fe=this,xe=(0,P.A)("<div>").addClass(ye.menu.cssClass).appendTo(ge);this._createComponent(xe,c.A,{onHiding:ye.menu.onHiding,onHidden:ye.menu.onHidden,rtlEnabled:ye.menu.rtlEnabled,position:ye.menu.position,animation:ye.menu.animation,contentTemplate(Te){const Ee=(0,P.A)("<div>").appendTo(Te);fe._createComponent(Ee,a.A,ye.menu),this.repaint()},_ignoreFunctionValueDeprecation:!0,maxHeight:()=>(0,h.J)(ye.menu.position.of),visible:!0,focusStateEnabled:!1,preventScrollEvents:!1,hideOnParentScroll:this.option("closePopupOnTargetScroll"),hideOnOutsideClick:!0,onShown:ye.popup.onShown,shading:!1,width:"auto",height:"auto",showTitle:!1,_wrapperClassExternal:ye.menu.cssClass})}_subscribeOnClickAndEnterKey(ye,ge){T.A.on(ye,"dxclick",ge),T.A.on(ye,"keyup",fe=>{"enter"===(0,y.YD)(fe)&&ge(fe)})}}(0,W.A)("dxFilterBuilder",be);const le=be},6232:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Mr});var W=M(5737),T=(M(8910),M(9810),M(3480),M(8638),M(9012),M(1973)),y=M(5704),d=M(5345),c=M(4270),s=M(3090),a=M(2660),u=M(1363),h=M(1830),g=M(6234),_=M(6110),x=M(4072),w=M(1110),D=M(8360),C=M(5444),I=M(7080);function B(dn){let{$parent:an,rootElementCssClassList:_n}=dn;return(0,y.A)("<div>").addClass("dx-field-empty-item").html("&nbsp;").addClass(_n.join(" ")).appendTo(an)}var K=M(9522),J=M(6946),ie=M(9495),re=M(778),q=M(9212),Y=M(8025),Z=M(127);const pe="dx-form-group",ae="dx-col-",ee="dx-field-item",he="dx-layout-manager-one-col",de="dx-field-item-label-content",be="dx-field-item-label",ve="dx-field-item-content",Ce="dx-root-simple-item",Te="dx-field-item-tab",Ee="dx-group-colcount-",Oe="group-col-count",Be="simple";var Ue=M(2925);const ot=["dxTagBox","dxRangeSlider","dxDateRangeBox"],st=["dxRangeSlider","dxSlider"],et=["dxCalendar","dxCheckBox","dxHtmlEditor","dxRadioGroup","dxRangeSlider","dxSlider","dxSwitch"];function Pe(dn,an){let{showRequiredMark:_n,requiredMark:Wt,showOptionalMark:zn,optionalMark:mi}=dn;return{showRequiredMark:_n&&an,requiredMark:Wt,showOptionalMark:zn&&!an,optionalMark:mi}}const tt="dx-field-item-required-mark",qe="dx-field-item-optional-mark";function En(dn){let an=0;const _n=dn.children.length;for(let Wt=0;Wt<_n;Wt++)an+=dn.children[Wt].offsetWidth;return an}const wi="dx-field-item-content-wrapper",dt="dx-template-wrapper",Et="dx-validation-target",hn="dx-invalid";function $n(dn){let{$parent:an,rootElementCssClassList:_n,formOrLayoutManager:Wt,createComponentCallback:zn,labelOptions:mi,labelNeedBaselineAlign:Si,labelLocation:go,needRenderLabel:No,formLabelLocation:Sr,item:pr,editorOptions:Vr,isSimpleItem:Lt,isRequired:bn,template:jn,helpID:Ci,labelID:Mi,name:Ki,helpText:bt,requiredMessageTemplate:gn,validationGroup:Kt}=dn;const Mn=(0,y.A)("<div>").addClass(_n.join(" ")).appendTo(an);Mn.addClass(bn?"dx-field-item-required":"dx-field-item-optional"),Lt&&Mn.addClass("dx-flex-layout"),Lt&&Si&&Mn.addClass("dx-field-item-label-align");const _i=(0,y.A)("<div>");_i.data("dx-form-item",pr),_i.addClass(ve).addClass("dx-field-item-content-location-"+{right:"left",left:"right",top:"bottom"}[Sr]);let Co,Qi=null;if(No&&(mi.labelTemplate&&(mi.labelTemplateData=on(pr,Vr,Wt)),Qi=function Tt(dn){let{text:an,id:_n,location:Wt,alignment:zn,labelID:mi=null,markOptions:Si={},labelTemplate:go,labelTemplateData:No,onLabelTemplateRendered:Sr}=dn;if((!(0,h.O9)(an)||an.length<=0)&&!(0,h.O9)(go))return null;const pr=(0,y.A)("<label>").addClass(`${be} dx-field-item-label-location-${Wt}`).attr("for",_n).attr("id",mi).css("textAlign",zn),Vr=(0,y.A)("<span>").addClass(de);let Lt=(0,y.A)("<span>").addClass("dx-field-item-label-text").text(an);return go&&(Lt=(0,y.A)("<div>").addClass("dx-field-item-custom-label-content"),No.text=an,go.render({container:(0,K.cc)(Lt),model:No,onRendered(){Sr?.()}})),pr.append(Vr.append(Lt,function qt(dn){const an=function Ye(dn){let{showRequiredMark:an,requiredMark:_n,showOptionalMark:Wt,optionalMark:zn}=dn;return an||Wt?"\xa0"+(an?_n:zn):""}(dn);return""===an?null:(0,y.A)("<span>").addClass(dn.showRequiredMark?tt:qe).text(an)}(Si)))}(mi)),Qi){const{editorType:lr}=pr;Mn.append(Qi),("top"===go||"left"===go)&&Mn.append(_i),"right"===go&&Mn.prepend(_i),Mn.addClass("top"===go?"dx-label-v-align":"dx-label-h-align"),("dxCheckBox"===lr||"dxSwitch"===lr)&&x.A.on(Qi,re.U,()=>{x.A.trigger(_i.children(),re.U)});const Pr=["dxCheckBox","dxSwitch","dxRadioGroup"].includes(lr),wr=mi.alignment;!jn&&Pr&&"top"===go&&("left"===wr||!wr)&&_i.addClass("dx-toggle-controls-paddings")}else Mn.append(_i);if(jn)jn.render({container:(0,K.cc)(_i),model:on(pr,Vr,Wt),onRendered(){const rr=function Nt(dn){var an;return dn?.data(Et)||(null==dn||null===(an=dn.parent)||void 0===an||null===(an=an.call(dn))||void 0===an?void 0:an.data(Et))}(Ln(_i));Gt(rr)}});else{const lr=(0,y.A)("<div>").appendTo(_i);try{Co=zn(lr,pr.editorType,Vr),Co.setAria("describedby",Ci),Mi&&Co.setAria("labelledby",Mi),Co.setAria("required",bn)}catch(rr){Z.A.log("E1035",rr.message)}}const $o=Ln(_i),sr=$o&&$o.data(Et);if(sr){const lr=pr.label&&pr.label.text,rr=lr?null:Ki,Pr=lr?pr.label.text:rr&&(0,J.Bc)(rr);let wr;if(Lt)if(pr.validationRules)wr=pr.validationRules;else{const Fo=(0,ie.GP)(gn,Pr||"");wr=pr.isRequired?[{type:"required",message:Fo}]:null}Array.isArray(wr)&&wr.length&&zn($o,Y.A,{validationRules:wr,validationGroup:Kt,dataGetter:()=>({formItem:pr})}),Gt(sr)}return bt&&Lt&&_i.parent().append((0,y.A)("<div>").addClass(wi).append(_i).append((0,y.A)("<div>").addClass("dx-field-item-help-text").attr("id",Ci).text(bt))),{$fieldEditorContainer:_i,$rootElement:Mn,widgetInstance:Co}}function Ln(dn){const an=dn.children().first();return an.hasClass(dt)?an.children().first():an}function Gt(dn){if(dn&&(0,q.Nt)()){const an=`.${wi}`,_n=Wt=>{let{element:zn,component:mi}=Wt;const{isValid:Si,validationMessageMode:go}=mi.option();(0,y.A)(zn).parents(an).toggleClass(hn,!1===Si&&(mi._isFocused()||"always"===go))};dn.on("optionChanged",Wt=>{"isValid"===Wt.name&&_n(Wt)}),dn.on("focusIn",_n).on("focusOut",_n).on("enterKey",_n)}}function on(dn,an,_n){return{dataField:dn.dataField,editorType:dn.editorType,editorOptions:an,component:_n,name:dn.name}}class sn{constructor(){this._map={}}_findWidgetInstance(an){let _n;return(0,a.__)(this._map,(Wt,zn)=>{let{widgetInstance:mi,item:Si}=zn;if(an(Si))return _n=mi,!1}),_n}_findFieldByCondition(an,_n){let Wt;return(0,a.__)(this._map,(zn,mi)=>{if(an(mi))return Wt="guid"===_n?zn:mi[_n],!1}),Wt}clear(){this._map={}}removeItemsByItems(an){(0,a.__)(an.getItems(),_n=>this.removeItemByKey(_n))}removeItemByKey(an){delete this._map[an]}add(an){const _n=an.guid||new Ue.A;return this._map[_n]=an,_n}addItemsOrExtendFrom(an){an.each((_n,Wt)=>{this._map[_n]?(Wt.widgetInstance&&(this._map[_n].widgetInstance=Wt.widgetInstance),this._map[_n].$itemContainer=Wt.$itemContainer):this.add({item:Wt.item,widgetInstance:Wt.widgetInstance,guid:_n,$itemContainer:Wt.$itemContainer})})}extendRunTimeItemInfoByKey(an,_n){this._map[an]&&(this._map[an]=(0,s.X)(this._map[an],_n))}findWidgetInstanceByItem(an){return this._findWidgetInstance(_n=>_n===an)}findGroupOrTabLayoutManagerByPath(an){return this._findFieldByCondition(_n=>{let{path:Wt}=_n;return Wt===an},"layoutManager")}findKeyByPath(an){return this._findFieldByCondition(_n=>{let{path:Wt}=_n;return Wt===an},"guid")}findWidgetInstanceByName(an){return this._findWidgetInstance(_n=>an===_n.name)}findWidgetInstanceByDataField(an){return this._findWidgetInstance(_n=>an===((0,h.Kg)(_n)?_n:_n.dataField))}findItemContainerByItem(an){for(const _n in this._map)if(this._map[_n].item===an)return this._map[_n].$itemContainer;return null}findItemIndexByItem(an){return this._findFieldByCondition(_n=>{let{item:Wt}=_n;return Wt===an},"itemIndex")}findPreparedItemByItem(an){return this._findFieldByCondition(_n=>{let{item:Wt}=_n;return Wt===an},"preparedItem")}getItems(){return this._map}each(an){(0,a.__)(this._map,(_n,Wt)=>{an(_n,Wt)})}removeItemsByPathStartWith(an){Object.keys(this._map).filter(zn=>!!this._map[zn].path&&this._map[zn].path.indexOf(an,0)>-1).forEach(zn=>this.removeItemByKey(zn))}}const ci=I.A.inherit({_getDefaultOptions(){return(0,s.X)(this.callBase(),{layoutData:{},readOnly:!1,colCount:1,colCountByScreen:void 0,labelLocation:"left",onFieldDataChanged:null,onEditorEnterKey:null,customizeItem:null,alignItemLabels:!0,minColWidth:200,showRequiredMark:!0,screenByWidth:null,showOptionalMark:!1,requiredMark:"*",labelMode:"outside",optionalMark:D.A.format("dxForm-optionalMark"),requiredMessage:D.A.getFormatter("dxForm-requiredMessage")})},_setOptionsByReference(){this.callBase(),(0,s.X)(this._optionsByReference,{layoutData:!0,validationGroup:!0})},_init(){const dn=this.option("layoutData");this.callBase(),this._itemWatchers=[],this._itemsRunTimeInfo=new sn,this._updateReferencedOptions(dn),this._initDataAndItems(dn)},_dispose(){this.callBase(),this._cleanItemWatchers()},_initDataAndItems(dn){this._syncDataWithItems(),this._updateItems(dn)},_syncDataWithItems(){const dn=this.option("layoutData"),an=this.option("items");(0,h.O9)(an)&&an.forEach(_n=>{if(_n.dataField&&void 0===this._getDataByField(_n.dataField)){let Wt;_n.editorOptions&&(Wt=_n.editorOptions.value),((0,h.O9)(Wt)||_n.dataField in dn)&&this._updateFieldValue(_n.dataField,Wt)}})},_getDataByField(dn){return dn?this.option(`layoutData.${dn}`):null},_isCheckboxUndefinedStateEnabled(dn){let{allowIndeterminateState:an,editorType:_n,dataField:Wt}=dn;if(!0===an&&"dxCheckBox"===_n){const zn=["layoutData",...Wt.split(".")],mi=zn.pop(),Si=this.option(zn.join("."));return Si&&mi in Si}return!1},_updateFieldValue(dn,an){const _n=this.option("layoutData");let Wt=an;!g.A.isWrapped(_n[dn])&&(0,h.O9)(dn)?this.option(`layoutData.${dn}`,Wt):g.A.isWritableWrapped(_n[dn])&&(Wt=(0,h.Tn)(Wt)?Wt():Wt,_n[dn](Wt)),this._triggerOnFieldDataChanged({dataField:dn,value:Wt})},_triggerOnFieldDataChanged(dn){this._createActionByOption("onFieldDataChanged")(dn)},_updateItems(dn){const an=this,_n=this.option("items"),Wt=(0,h.O9)(_n),zn=an.option("customizeItem"),mi=Wt?_n:this._generateItemsByData(dn);if((0,h.O9)(mi)){const Si=[];(0,a.__)(mi,(go,No)=>{an._isAcceptableItem(No)&&(No=an._processItem(No),zn&&zn(No),(0,h.Gv)(No)&&!1!==g.A.unwrap(No.visible)&&Si.push(No))}),(!an._itemWatchers.length||!Wt)&&an._updateItemWatchers(mi),this._setItems(Si),this._sortItems()}},_cleanItemWatchers(){this._itemWatchers.forEach(dn=>{dn()}),this._itemWatchers=[]},_updateItemWatchers(dn){const an=this,_n=an._getWatch();dn.forEach(Wt=>{(0,h.Gv)(Wt)&&(0,h.O9)(Wt.visible)&&(0,h.Tn)(_n)&&an._itemWatchers.push(_n(()=>g.A.unwrap(Wt.visible),()=>{an._updateItems(an.option("layoutData")),an.repaint()},{skipImmediate:!0}))})},_generateItemsByData(dn){const an=[];return(0,h.O9)(dn)&&(0,a.__)(dn,_n=>{an.push({dataField:_n})}),an},_isAcceptableItem(dn){const _n=this._getDataByField(dn.dataField||dn);return!((0,h.Tn)(_n)&&!g.A.isWrapped(_n))},_processItem(dn){if("string"==typeof dn&&(dn={dataField:dn}),"object"==typeof dn&&!dn.itemType&&(dn.itemType=Be),!(0,h.O9)(dn.editorType)&&(0,h.O9)(dn.dataField)){const an=this._getDataByField(dn.dataField);dn.editorType=(0,h.O9)(an)?this._getEditorTypeByDataType((0,h.NW)(an)):"dxTextBox"}return"dxCheckBox"===dn.editorType&&(dn.allowIndeterminateState=dn.allowIndeterminateState??!0),dn},_getEditorTypeByDataType(dn){switch(dn){case"number":return"dxNumberBox";case"date":return"dxDateBox";case"boolean":return"dxCheckBox";default:return"dxTextBox"}},_sortItems(){(0,d.Il)(this._items,"visibleIndex"),this._sortIndexes()},_sortIndexes(){this._items.sort((dn,an)=>{const _n=dn.visibleIndex,Wt=an.visibleIndex;let zn;return zn=_n>Wt?1:_n<Wt?-1:0,zn})},_initMarkup(){this._itemsRunTimeInfo.clear(),this.$element().addClass("dx-layout-manager"),this.callBase(),this._renderResponsiveBox()},_renderResponsiveBox(){const dn=this,an=[];if(dn._items&&dn._items.length){const _n=dn._getColCount(),Wt=(0,y.A)("<div>").appendTo(dn.$element());dn._prepareItemsWithMerging(_n);const zn=dn._generateLayoutItems();dn._responsiveBox=dn._createComponent(Wt,C.A,dn._getResponsiveBoxConfig(zn,_n,an)),(0,_.Vd)()||dn._renderTemplates(an)}},_itemStateChangedHandler(dn){this._refresh()},_renderTemplates(dn){const an=this;let _n=0;dn.forEach(Wt=>{var zn;let{item:mi}=Wt;null!=mi&&null!==(zn=mi.label)&&void 0!==zn&&zn.template&&_n++}),(0,a.__)(dn,(Wt,zn)=>{switch(zn.itemType){case"empty":B(zn);break;case"button":an._renderButtonItem(zn);break;default:an._renderFieldItem(zn,_n)}})},_getResponsiveBoxConfig(dn,an,_n){const Wt=this,zn=Wt.option("colCountByScreen"),mi=zn&&zn.xs;return{onItemStateChanged:this._itemStateChangedHandler.bind(this),onLayoutChanged(){const Si=Wt.option("onLayoutChanged"),go=Wt.isSingleColumnMode();Si&&(Wt.$element().toggleClass(he,go),Si(go))},onContentReady(Si){(0,_.Vd)()&&Wt._renderTemplates(_n),Wt.option("onLayoutChanged")&&Wt.$element().toggleClass(he,Wt.isSingleColumnMode(Si.component))},itemTemplate(Si,go,No){if(!Si.location)return;const Sr=(0,y.A)(No),Vr=Wt._items[Si.location.col+Si.location.row*an];if(!Vr)return;const Lt=[Vr.cssClass];Sr.toggleClass("dx-single-column-item-content",Wt.isSingleColumnMode(this)),0===Si.location.row&&Lt.push("dx-first-row"),0===Si.location.col&&Lt.push("dx-first-col"),Vr.itemType===Be&&Wt.option("isRoot")&&Sr.addClass(Ce);const bn=Si.location.col===an-1||Si.location.col+Si.location.colspan===an,jn=Wt._getRowsCount(),Ci=Si.location.row===jn-1;bn&&Lt.push("dx-last-col"),Ci&&Lt.push("dx-last-row"),"empty"!==Vr.itemType&&(Lt.push(ee),Lt.push(Wt.option("cssItemClass")),(0,h.O9)(Vr.col)&&Lt.push(`dx-col-${Vr.col}`)),_n.push({itemType:Vr.itemType,item:Vr,$parent:Sr,rootElementCssClassList:Lt})},cols:Wt._generateRatio(an),rows:Wt._generateRatio(Wt._getRowsCount(),!0),dataSource:dn,screenByWidth:Wt.option("screenByWidth"),singleColumnScreen:!mi&&"xs"}},_getColCount(){let dn=this.option("colCount");const an=this.option("colCountByScreen");if(an){let _n=this.option("form").getTargetScreenFactor();_n||(_n=(0,_.Vd)()?(0,_.ne)(this.option("screenByWidth")):"lg"),dn=an[_n]||dn}if("auto"===dn){if(this._cashedColCount)return this._cashedColCount;this._cashedColCount=dn=this._getMaxColCount()}return dn<1?1:dn},_getMaxColCount(){if(!(0,_.Vd)())return 1;const dn=this.option("minColWidth"),an=(0,u.RG)(this.$element()),_n=this._items.length,Wt=Math.floor(an/dn)||1;return _n<Wt?_n:Wt},isCachedColCountObsolete(){return this._cashedColCount&&this._getMaxColCount()!==this._cashedColCount},_prepareItemsWithMerging(dn){const an=this._items.slice(0);let _n,Wt,mi,Si,zn=[];for(Si=0;Si<an.length;Si++)if(_n=an[Si],zn.push(_n),(this.option("alignItemLabels")||_n.alignItemLabels||_n.colSpan)&&(_n.col=this._getColByIndex(zn.length-1,dn)),_n.colSpan>1&&_n.col+_n.colSpan<=dn){for(Wt=[],mi=0;mi<_n.colSpan-1;mi++)Wt.push({merged:!0});zn=zn.concat(Wt)}else delete _n.colSpan;this._setItems(zn)},_getColByIndex:(dn,an)=>dn%an,_setItems(dn){this._items=dn,this._cashedColCount=null},_generateLayoutItems(){const dn=this._items,an=this._getColCount(),_n=[];let Wt,zn;for(zn=0;zn<dn.length;zn++)if(Wt=dn[zn],!Wt.merged){const mi={location:{row:parseInt(zn/an),col:this._getColByIndex(zn,an)}};(0,h.O9)(Wt.disabled)&&(mi.disabled=Wt.disabled),(0,h.O9)(Wt.visible)&&(mi.visible=Wt.visible),(0,h.O9)(Wt.colSpan)&&(mi.location.colspan=Wt.colSpan),(0,h.O9)(Wt.rowSpan)&&(mi.location.rowspan=Wt.rowSpan),_n.push(mi)}return _n},_renderEmptyItem(dn){B({$container:dn})},_renderButtonItem(dn){let{item:an,$parent:_n,rootElementCssClassList:Wt}=dn;const{$rootElement:zn,buttonInstance:mi}=function N(dn){let{item:an,$parent:_n,rootElementCssClassList:Wt,validationGroup:zn,createComponentCallback:mi}=dn;const Si=(0,y.A)("<div>").appendTo(_n).addClass(Wt.join(" ")).addClass("dx-field-button-item").css("textAlign",function G(dn){return(0,h.O9)(dn)?dn:"right"}(an.horizontalAlignment));return _n.css("justifyContent",function k(dn){switch(dn){case"center":return"center";case"bottom":return"flex-end";default:return"flex-start"}}(an.verticalAlignment)),{$rootElement:Si,buttonInstance:mi((0,y.A)("<div>").appendTo(Si),"dxButton",(0,s.X)({validationGroup:zn},an.buttonOptions))}}({item:an,$parent:_n,rootElementCssClassList:Wt,validationGroup:this.option("validationGroup"),createComponentCallback:this._createComponent.bind(this)});this._itemsRunTimeInfo.add({item:an,widgetInstance:mi,guid:an.guid,$itemContainer:zn})},_renderFieldItem(dn,an){var _n,Wt;let{item:zn,$parent:mi,rootElementCssClassList:Si}=dn;const go=this._getDataByField(zn.dataField);let No=!1;if(void 0===go){const{allowIndeterminateState:jn,editorType:Ci,dataField:Mi}=zn;No=this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:jn,editorType:Ci,dataField:Mi})}const Sr=zn.dataField||zn.name,pr=this._getFormOrThis(),{$fieldEditorContainer:Vr,widgetInstance:Lt,$rootElement:bn}=$n(function Ke(dn){let{$parent:an,rootElementCssClassList:_n,formOrLayoutManager:Wt,createComponentCallback:zn,item:mi,template:Si,labelTemplate:go,name:No,formLabelLocation:Sr,requiredMessageTemplate:pr,validationGroup:Vr,editorValue:Lt,canAssignUndefinedValueToEditor:bn,editorValidationBoundary:jn,editorStylingMode:Ci,showColonAfterLabel:Mi,managerLabelLocation:Ki,itemId:bt,managerMarkOptions:gn,labelMode:Kt,onLabelTemplateRendered:Mn}=dn;const _i=(0,h.O9)(mi.isRequired)?mi.isRequired:!!function Re(dn){let an;return dn&&dn.length&&(0,a.__)(dn,(_n,Wt)=>{if("required"===Wt.type)return an=!0,!1}),an}(mi.validationRules),Qi=mi.itemType===Be,Co=mi.helpText?`dx-${new Ue.A}`:null,$o=function Fe(dn){let{item:an,id:_n,isRequired:Wt,managerMarkOptions:zn,showColonAfterLabel:mi,labelLocation:Si,labelTemplate:go,formLabelMode:No,onLabelTemplateRendered:Sr}=dn;const pr=et.includes(an.editorType),Vr=(0,s.X)({showColon:mi,location:Si,id:_n,visible:"outside"===No||pr&&"hidden"!==No,isRequired:Wt},an?an.label:{},{markOptions:Pe(zn,Wt),labelTemplate:go,onLabelTemplateRendered:Sr});return["dxRadioGroup","dxCheckBox","dxLookup","dxSlider","dxRangeSlider","dxSwitch","dxHtmlEditor","dxDateRangeBox"].includes(an.editorType)&&(Vr.labelID=`dx-label-${new Ue.A}`),!Vr.text&&an.dataField&&(Vr.text=(0,J.Bc)(an.dataField)),Vr.text&&(Vr.textWithoutColon=Vr.text,Vr.text+=Vr.showColon?":":""),Vr}({item:mi,id:bt,isRequired:_i,managerMarkOptions:gn,showColonAfterLabel:Mi,labelLocation:Ki,formLabelMode:Kt,labelTemplate:go,onLabelTemplateRendered:Mn}),sr=$o.visible&&($o.text||$o.labelTemplate&&Qi),{location:lr,labelID:rr}=$o,Pr="top"!==lr&&["dxTextArea","dxRadioGroup","dxCalendar","dxHtmlEditor"].includes(mi.editorType),wr=function Se(dn){let{editorType:an,defaultEditorName:_n,editorValue:Wt,canAssignUndefinedValueToEditor:zn,externalEditorOptions:mi,editorInputId:Si,editorValidationBoundary:go,editorStylingMode:No,formLabelMode:Sr,labelText:pr,labelMark:Vr}=dn;const Lt={};(void 0!==Wt||zn)&&(Lt.value=Wt),ot.includes(an)&&(Lt.value=Lt.value||[]);let bn=mi?.labelMode;(0,h.O9)(bn)||(bn="outside"===Sr?"hidden":Sr);const jn=mi?.stylingMode||No,Ci=st.includes(an),Mi=(0,s.X)(!0,Lt,mi,{inputAttr:{id:Si},validationBoundary:go,stylingMode:jn,label:Ci?mi?.label:pr,labelMode:bn,labelMark:Vr});return mi&&(Mi.dataSource&&(Mi.dataSource=mi.dataSource),Mi.items&&(Mi.items=mi.items)),_n&&!Mi.name&&(Mi.name=_n),Mi}({editorType:mi.editorType,editorValue:Lt,defaultEditorName:mi.dataField,canAssignUndefinedValueToEditor:bn,externalEditorOptions:mi.editorOptions,editorInputId:bt,editorValidationBoundary:jn,editorStylingMode:Ci,formLabelMode:Kt,labelText:$o.textWithoutColon,labelMark:$o.markOptions.showRequiredMark?"\xa0"+$o.markOptions.requiredMark:""});return{$parent:an,rootElementCssClassList:_n,formOrLayoutManager:Wt,createComponentCallback:zn,labelOptions:$o,labelNeedBaselineAlign:Pr,labelLocation:lr,needRenderLabel:sr,item:mi,isSimpleItem:Qi,isRequired:_i,template:Si,helpID:Co,labelID:rr,name:No,helpText:!$o.markOptions.showOptionalMark||$o.visible||"hidden"===wr.labelMode||(0,h.O9)(mi.helpText)?mi.helpText:$o.markOptions.optionalMark,formLabelLocation:Sr,requiredMessageTemplate:pr,validationGroup:Vr,editorOptions:wr}}({$parent:mi,rootElementCssClassList:Si,item:zn,name:Sr,editorValue:go,canAssignUndefinedValueToEditor:No,formOrLayoutManager:this._getFormOrThis(),createComponentCallback:this._createComponent.bind(this),formLabelLocation:this.option("labelLocation"),requiredMessageTemplate:this.option("requiredMessage"),validationGroup:this.option("validationGroup"),editorValidationBoundary:this.option("validationBoundary"),editorStylingMode:this.option("form")&&this.option("form").option("stylingMode"),showColonAfterLabel:this.option("showColonAfterLabel"),managerLabelLocation:this.option("labelLocation"),template:zn.template?this._getTemplate(zn.template):null,labelTemplate:null!==(_n=zn.label)&&void 0!==_n&&_n.template?this._getTemplate(zn.label.template):null,itemId:this.option("form")&&this.option("form").getItemID(Sr),managerMarkOptions:this._getMarkOptions(),labelMode:this.option("labelMode"),onLabelTemplateRendered:()=>{this._incTemplateRenderedCallCount(),this._shouldAlignLabelsOnTemplateRendered(pr,an)&&pr._alignLabels(this,this.isSingleColumnMode(pr))}}));null===(Wt=this.option("onFieldItemRendered"))||void 0===Wt||Wt(),Lt&&zn.dataField&&this._bindDataField(Lt,zn.dataField,zn.editorType,Vr),this._itemsRunTimeInfo.add({item:zn,widgetInstance:Lt,guid:zn.guid,$itemContainer:bn})},_incTemplateRenderedCallCount(){this._labelTemplateRenderedCallCount=(this._labelTemplateRenderedCallCount??0)+1},_shouldAlignLabelsOnTemplateRendered(dn,an){return dn.option("templatesRenderAsynchronously")&&this._labelTemplateRenderedCallCount===an},_getMarkOptions(){return{showRequiredMark:this.option("showRequiredMark"),requiredMark:this.option("requiredMark"),showOptionalMark:this.option("showOptionalMark"),optionalMark:this.option("optionalMark")}},_getFormOrThis(){return this.option("form")||this},_bindDataField(dn,an,_n,Wt){const zn=this._getFormOrThis();dn.on("enterKey",mi=>{zn._createActionByOption("onEditorEnterKey")((0,s.X)(mi,{dataField:an}))}),this._createWatcher(dn,Wt,an),this.linkEditorToDataField(dn,an,_n)},_createWatcher(dn,an,_n){const Wt=this,zn=Wt._getWatch();if(!(0,h.Tn)(zn))return;const mi=zn(()=>Wt._getDataByField(_n),()=>{const Si=Wt._getDataByField(_n);if("dxTagBox"===dn.NAME){const go=dn.option("value");if(Si!==go&&function(No,Sr){if(!Array.isArray(No)||!Array.isArray(Sr)||No.length!==Sr.length)return!1;for(let pr=0;pr<No.length;pr++)if(No[pr]!==Sr[pr])return!1;return!0}(Si,go))return}dn.option("value",Si)},{deep:!0,skipImmediate:!0},{createWatcherDataField:_n});x.A.on(an,w.N,mi)},_getWatch(){if(!(0,h.O9)(this._watch)){const dn=this.option("form");this._watch=dn&&dn.option("integrationOptions.watchMethod")}return this._watch},_createComponent(dn,an,_n){const Wt=this.option("readOnly");let zn=Object.hasOwn(_n,"readOnly");const mi=this.callBase(dn,an,(0,W.A)({},_n,{readOnly:zn?_n.readOnly:Wt}));let Si=!1;return mi.on("optionChanged",go=>{"readOnly"===go.name&&!Si&&(zn=!0)}),this.on("optionChanged",go=>{"readOnly"===go.name&&!zn&&(Si=!0,mi.option(go.name,go.value),Si=!1)}),mi},_generateRatio(dn,an){const _n=[];let Wt,zn;for(zn=0;zn<dn;zn++)Wt={ratio:1},an&&(Wt.baseSize="auto"),_n.push(Wt);return _n},_getRowsCount(){return Math.ceil(this._items.length/this._getColCount())},_updateReferencedOptions(dn){const an=this.option("layoutData");(0,h.Gv)(an)&&Object.getOwnPropertyNames(an).forEach(_n=>delete this._optionsByReference[`layoutData.${_n}`]),(0,h.Gv)(dn)&&Object.getOwnPropertyNames(dn).forEach(_n=>this._optionsByReference[`layoutData.${_n}`]=!0)},_clearWidget(dn){this._disableEditorValueChangedHandler=!0,dn.clear(),this._disableEditorValueChangedHandler=!1,dn.option("isValid",!0)},_optionChanged(dn){if(0!==dn.fullName.search("layoutData."))switch(dn.name){case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":this._cashedRequiredConfig=null,this._invalidate();break;case"layoutData":this._updateReferencedOptions(dn.value),this.option("items")?(0,h.RI)(dn.value)||this._itemsRunTimeInfo.each((an,_n)=>{if((0,h.O9)(_n.item)){const{dataField:Wt}=_n.item;if(Wt&&(0,h.O9)(_n.widgetInstance)){const mi=(0,c.Hz)(Wt)(dn.value),{allowIndeterminateState:Si,editorType:go}=_n.item;void 0!==mi||this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:Si,editorType:go,dataField:Wt})?_n.widgetInstance.option("value",mi):this._clearWidget(_n.widgetInstance)}}}):(this._initDataAndItems(dn.value),this._invalidate());break;case"items":this._cleanItemWatchers(),this._initDataAndItems(dn.value),this._invalidate();break;case"alignItemLabels":case"labelLocation":case"labelMode":case"requiredMessage":this._invalidate();break;case"customizeItem":this._updateItems(this.option("layoutData")),this._invalidate();break;case"colCount":case"colCountByScreen":this._resetColCount();break;case"minColWidth":"auto"===this.option("colCount")&&this._resetColCount();break;case"readOnly":case"onFieldDataChanged":break;case"width":this.callBase(dn),"auto"===this.option("colCount")&&this._resetColCount();break;default:this.callBase(dn)}},_resetColCount(){this._cashedColCount=null,this._invalidate()},linkEditorToDataField(dn,an){this.on("optionChanged",_n=>{_n.fullName===`layoutData.${an}`&&dn._setOptionWithoutOptionChange("value",_n.value)}),dn.on("valueChanged",_n=>{const Wt=(0,h.Gv)(_n.value)||Array.isArray(_n.value);!this._disableEditorValueChangedHandler&&(!Wt||_n.value!==_n.previousValue)&&this._updateFieldValue(an,_n.value)})},_dimensionChanged(){"auto"===this.option("colCount")&&this.isCachedColCountObsolete()&&this._eventsStrategy.fireEvent("autoColCountChanged")},updateData(dn,an){const _n=this;(0,h.Gv)(dn)?(0,a.__)(dn,(Wt,zn)=>{_n._updateFieldValue(Wt,zn)}):"string"==typeof dn&&_n._updateFieldValue(dn,an)},getEditor(dn){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(dn)||this._itemsRunTimeInfo.findWidgetInstanceByName(dn)},isSingleColumnMode(dn){const an=this._responsiveBox||dn;if(an)return an.option("currentScreenFactor")===an.option("singleColumnScreen")},getItemsRunTimeInfo(){return this._itemsRunTimeInfo}});(0,T.A)("dxLayoutManager",ci),M(643),M(3600);var xo=M(3686),vr=M(2013),rn=M(4859),en=M(6021),Zn=M(9229),Di=M(6620),po=M(4602),nr=M(1168),Xo=M(3777),Hn=M(6148),ui=M(5397),bi=M(3538);class ao{constructor(an){this._options=an,this._itemsRunTimeInfo=this._options.itemsRunTimeInfo}findInstance(){return this._itemsRunTimeInfo.findWidgetInstanceByItem(this._options.item)}findItemContainer(){return this._itemsRunTimeInfo.findItemContainerByItem(this._options.item)}findPreparedItem(){return this._itemsRunTimeInfo.findPreparedItemByItem(this._options.item)}tryExecute(){bi.A.abstract()}}const Wi=(dn,an)=>`${an?"tabs":"items"}[${dn}]`,Ko=(dn,an)=>(0,h.O9)(dn)&&(0,h.O9)(an)?`${dn}.${an}`:dn||an,Zo=dn=>dn?dn.replace(/\s/g,""):void 0,hr=(dn,an)=>`${dn}.${an}`,Rt=dn=>{const an=dn.split(".");return an[an.length-1].replace(/\[\d+]/,"")},pi=dn=>dn.indexOf("tabs")>-1,Ti=(dn,an,_n)=>{const Wt=dn.indexOf(an);if(Wt>-1)return Wi(Wt,_n);for(let zn=0;zn<dn.length;zn++){const mi=dn[zn],Si=mi.tabs||mi.items;if(Si){const go=Ti(Si,an,mi.tabs);if(go)return Ko(Wi(zn,_n),go)}}};class Eo extends ao{tryExecute(){const{value:an}=this._options,_n=this.findInstance();return!!_n&&(_n.option(an),!0)}}class Jo extends ao{tryExecute(){const an=this.findInstance();if(an){const{optionName:_n,item:Wt,value:zn}=this._options,mi=this._itemsRunTimeInfo.findItemIndexByItem(Wt);if(mi>=0)return an.option(hr(`items[${mi}]`,_n),zn),!0}return!1}}class fr extends ao{tryExecute(){return!1}}class Gr extends ao{tryExecute(){const an=this.findPreparedItem();return!(null==an||!an._prepareGroupItemTemplate||!an._renderGroupContentTemplate||(an._prepareGroupItemTemplate(this._options.item.template),an._renderGroupContentTemplate(),0))}}class Yn extends ao{tryExecute(){const an=this.findInstance();if(an){const{value:_n}=this._options;return an.option("dataSource",_n),!0}return!1}}class ei extends ao{tryExecute(){const{item:an}=this._options,_n=this.findInstance(),Wt=_n&&(0,ui.p)(_n.$element()[0],"dxValidator");if(Wt&&an){const zn=go=>"required"===go.type,mi=(Wt.option("validationRules")||[]).some(zn),Si=(an.validationRules||[]).some(zn);if(!mi&&!Si||mi&&Si)return Wt.option("validationRules",an.validationRules),!0}return!1}}class Ii extends ao{tryExecute(){const an=this.findItemContainer(),{previousValue:_n,value:Wt}=this._options;return!!an&&(an.removeClass(_n).addClass(Wt),!0)}}const or=["items","isRequired","validationRules","visible"],Jr=I.A.inherit({_init(){this.callBase(),this._dirtyFields=new Set,this._cachedColCountOptions=[],this._itemsRunTimeInfo=new sn,this._groupsColCount=[],this._attachSyncSubscriptions()},_getDefaultOptions(){return(0,s.X)(this.callBase(),{formID:`dx-${new Ue.A}`,formData:{},colCount:1,screenByWidth:_.zY,colCountByScreen:void 0,labelLocation:"left",readOnly:!1,onFieldDataChanged:null,customizeItem:null,onEditorEnterKey:null,minColWidth:200,alignItemLabels:!0,alignItemLabelsInAllGroups:!0,alignRootItemLabels:!0,showColonAfterLabel:!0,showRequiredMark:!0,showOptionalMark:!1,requiredMark:"*",optionalMark:D.A.format("dxForm-optionalMark"),requiredMessage:D.A.getFormatter("dxForm-requiredMessage"),showValidationSummary:!1,items:void 0,scrollingEnabled:!1,validationGroup:void 0,stylingMode:(0,xo.A)().editorStylingMode,labelMode:"outside",isDirty:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>(0,q.Nt)(),options:{labelLocation:"top"}},{device:()=>(0,q.gx)(),options:{showColonAfterLabel:!1}}])},_setOptionsByReference(){this.callBase(),(0,s.X)(this._optionsByReference,{formData:!0,validationGroup:!0})},_getGroupColCount:dn=>parseInt(dn.attr(Oe)),_applyLabelsWidthByCol(dn,an){let _n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function wt(dn,an,_n){const zn=dn.find(`${an} > .${be}:not(.dx-field-item-label-location-top) > .${de}`),mi=zn.length;let Si,go,No=0;for(go=0;go<mi;go++)Si=En(zn[go]),Si>No&&(No=Si);for(go=0;go<mi;go++)zn[go].style.width=`${No}px`}(dn,`.${_n.inOneColumn?ee:ae+an}${_n.excludeTabbed?`:not(.${Te})`:""}`)},_applyLabelsWidth(dn,an,_n,Wt,zn){Wt=_n?1:Wt||this._getGroupColCount(dn);const mi={excludeTabbed:an,inOneColumn:_n};let Si;for(Si=0;Si<Wt;Si++)this._applyLabelsWidthByCol(dn,Si,mi,zn)},_getGroupElementsInColumn(dn,an,_n){const Wt=(0,h.O9)(_n)?`.${Ee}${_n}`:"";return dn.find(`.${ae}${an} > .${ve} > .${pe}${Wt}`)},_applyLabelsWidthWithGroups(dn,an,_n,Wt){if(!0===this.option("alignRootItemLabels")){const mi=dn.find(`.${Ce}`);for(let Si=0;Si<an;Si++)this._applyLabelsWidthByCol(mi,Si,_n,Wt)}if(this.option("alignItemLabelsInAllGroups"))this._applyLabelsWidthWithNestedGroups(dn,an,_n,Wt);else{const mi=this.$element().find(`.${pe}`);let Si;for(Si=0;Si<mi.length;Si++)this._applyLabelsWidth(mi.eq(Si),_n,void 0,void 0,Wt)}},_applyLabelsWidthWithNestedGroups(dn,an,_n,Wt){const zn={excludeTabbed:_n};let mi,Si,go,No;for(mi=0;mi<an;mi++)for(No=this._getGroupElementsInColumn(dn,mi),this._applyLabelsWidthByCol(No,0,zn,Wt),Si=0;Si<this._groupsColCount.length;Si++){No=this._getGroupElementsInColumn(dn,mi,this._groupsColCount[Si]);const Sr=this._getGroupColCount(No);for(go=1;go<Sr;go++)this._applyLabelsWidthByCol(No,go,zn,Wt)}},_labelLocation(){return this.option("labelLocation")},_alignLabelsInColumn(dn){let{layoutManager:an,inOneColumn:_n,$container:Wt,excludeTabbed:zn,items:mi}=dn;if(!(0,_.Vd)()||"top"===this._labelLocation())return;const Si=Pe(an._getMarkOptions());_n?this._applyLabelsWidth(Wt,zn,!0,void 0,Si):this._checkGrouping(mi)?this._applyLabelsWidthWithGroups(Wt,an._getColCount(),zn,Si):this._applyLabelsWidth(Wt,zn,!1,an._getColCount(),Si)},_prepareFormData(){(0,h.O9)(this.option("formData"))||this.option("formData",{})},_setStylingModeClass(){"underlined"===this.option("stylingMode")&&this.$element().addClass("dx-form-styling-mode-underlined")},_initMarkup(){Xo.A.addGroup(this._getValidationGroup(),!1),this._clearCachedInstances(),this._prepareFormData(),this.$element().addClass("dx-form"),this._setStylingModeClass(),this.callBase(),this.setAria("role","form",this.$element()),this.option("scrollingEnabled")&&this._renderScrollable(),this._renderLayout(),this._renderValidationSummary(),this._lastMarkupScreenFactor=this._targetScreenFactor||this._getCurrentScreenFactor(),this._attachResizeObserverSubscription()},_attachResizeObserverSubscription(){if((0,_.Vd)()){const dn=this.$element().get(0);vr.A.unobserve(dn),vr.A.observe(dn,()=>{this._resizeHandler()})}},_resizeHandler(){this._cachedLayoutManagers.length&&(0,a.__)(this._cachedLayoutManagers,(dn,an)=>{var _n;null===(_n=an.option("onLayoutChanged"))||void 0===_n||_n(an.isSingleColumnMode())})},_getCurrentScreenFactor(){return(0,_.Vd)()?(0,_.ne)(this.option("screenByWidth")):"lg"},_clearCachedInstances(){this._itemsRunTimeInfo.clear(),this._cachedLayoutManagers=[]},_alignLabels(dn,an){this._alignLabelsInColumn({$container:this.$element(),layoutManager:dn,excludeTabbed:!0,items:this.option("items"),inOneColumn:an}),(0,Zn.ho)(this.$element().find(`.${Hn.l}`))},_clean(){this._clearValidationSummary(),this.callBase(),this._groupsColCount=[],this._cachedColCountOptions=[],this._lastMarkupScreenFactor=void 0,vr.A.unobserve(this.$element().get(0))},_renderScrollable(){const dn=this.option("useNativeScrolling");this._scrollable=new po.A(this.$element(),{useNative:!!dn,useSimulatedScrollbar:!dn,useKeyboard:!1,direction:"both",bounceEnabled:!1})},_getContent(){return this.option("scrollingEnabled")?(0,y.A)(this._scrollable.content()):this.$element()},_clearValidationSummary(){var dn;null===(dn=this._$validationSummary)||void 0===dn||dn.remove(),this._$validationSummary=void 0,this._validationSummary=void 0},_renderValidationSummary(){this._clearValidationSummary(),this.option("showValidationSummary")&&(this._$validationSummary=(0,y.A)("<div>").addClass("dx-form-validation-summary").appendTo(this._getContent()),this._validationSummary=this._$validationSummary.dxValidationSummary({validationGroup:this._getValidationGroup()}).dxValidationSummary("instance"))},_prepareItems(dn,an,_n,Wt){if(dn){const zn=[];for(let mi=0;mi<dn.length;mi++){let Si=dn[mi];const go=Ko(_n,Wi(mi,Wt)),No={item:Si,itemIndex:mi,path:go},Sr=this._itemsRunTimeInfo.add(No);if((0,h.Kg)(Si)&&(Si={dataField:Si}),(0,h.Gv)(Si)){const pr=(0,W.A)({},Si);No.preparedItem=pr,pr.guid=Sr,this._tryPrepareGroupItemCaption(pr),this._tryPrepareGroupItem(pr),this._tryPrepareTabbedItem(pr,go),this._tryPrepareItemTemplate(pr),an&&(pr.cssItemClass=Te),pr.items&&(pr.items=this._prepareItems(pr.items,an,go)),zn.push(pr)}else zn.push(Si)}return zn}},_tryPrepareGroupItemCaption(dn){"group"===dn.itemType&&(dn._prepareGroupCaptionTemplate=an=>{dn.captionTemplate&&(dn.groupCaptionTemplate=this._getTemplate(an)),dn.captionTemplate=this._itemGroupTemplate.bind(this,dn)},dn._prepareGroupCaptionTemplate(dn.captionTemplate))},_tryPrepareGroupItem(dn){"group"===dn.itemType&&(dn.alignItemLabels=(0,rn.YD)(dn.alignItemLabels,!0),dn._prepareGroupItemTemplate=an=>{dn.template&&(dn.groupContentTemplate=this._getTemplate(an)),dn.template=this._itemGroupTemplate.bind(this,dn)},dn._prepareGroupItemTemplate(dn.template))},_tryPrepareTabbedItem(dn,an){"tabbed"===dn.itemType&&(dn.template=this._itemTabbedTemplate.bind(this,dn),dn.tabs=this._prepareItems(dn.tabs,!0,an,!0))},_tryPrepareItemTemplate(dn){dn.template&&(dn.template=this._getTemplate(dn.template))},_checkGrouping(dn){if(dn)for(let an=0;an<dn.length;an++)if("group"===dn[an].itemType)return!0},_renderLayout(){const dn=this;let an=dn.option("items");const _n=dn._getContent();an=dn._prepareItems(an),dn._rootLayoutManager=dn._renderLayoutManager(_n,this._createLayoutManagerOptions(an,{isRoot:!0,colCount:dn.option("colCount"),alignItemLabels:dn.option("alignItemLabels"),screenByWidth:this.option("screenByWidth"),colCountByScreen:this.option("colCountByScreen"),onLayoutChanged(Wt){dn._alignLabels.bind(dn)(dn._rootLayoutManager,Wt)},onContentReady(Wt){dn._alignLabels(Wt.component,Wt.component.isSingleColumnMode())}}))},_tryGetItemsForTemplate:dn=>dn.items||[],_itemTabbedTemplate(dn,an,_n){const Wt=(0,y.A)("<div>").appendTo(_n),zn=(0,s.X)({},dn.tabPanelOptions,{dataSource:dn.tabs,onItemRendered:go=>{var No,Sr;null===(No=dn.tabPanelOptions)||void 0===No||null===(Sr=No.onItemRendered)||void 0===Sr||Sr.call(No,go),(0,Zn.I9)(go.itemElement)},itemTemplate:(go,No,Sr)=>{const pr=(0,y.A)(Sr),Vr=(0,rn.YD)(go.alignItemLabels,!0),Lt=this._renderLayoutManager(pr,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(go),{colCount:go.colCount,alignItemLabels:Vr,screenByWidth:this.option("screenByWidth"),colCountByScreen:go.colCountByScreen,cssItemClass:go.cssItemClass,onLayoutChanged:bn=>{this._alignLabelsInColumn({$container:pr,layoutManager:Lt,items:go.items,inOneColumn:bn})}}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(go.guid,{layoutManager:Lt}),Vr&&this._alignLabelsInColumn({$container:pr,layoutManager:Lt,items:go.items,inOneColumn:Lt.isSingleColumnMode()})}}),mi=(go,No)=>{Array.isArray(go)&&go.forEach(Sr=>this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(Sr.guid,{widgetInstance:No}))},Si=this._createComponent(Wt,nr.A,zn);(0,y.A)(_n).parent().addClass("dx-field-item-has-tabs"),Si.on("optionChanged",go=>{"dataSource"===go.fullName&&mi(go.value,go.component)}),mi([{guid:dn.guid},...dn.tabs??[]],Si)},_itemGroupCaptionTemplate(dn,an,_n){if(dn.groupCaptionTemplate){const Wt=(0,y.A)("<div>").addClass("dx-form-group-custom-caption").attr("id",_n).appendTo(an);return dn._renderGroupCaptionTemplate=()=>{dn.groupCaptionTemplate.render({model:{component:this,caption:dn.caption,name:dn.name},container:(0,K.cc)(Wt)})},void dn._renderGroupCaptionTemplate()}dn.caption&&(0,y.A)("<span>").addClass("dx-form-group-caption").text(dn.caption).attr("id",_n).appendTo(an)},_itemGroupContentTemplate(dn,an){const _n=(0,y.A)("<div>").addClass("dx-form-group-content").appendTo(an);if(dn.groupContentTemplate)dn._renderGroupContentTemplate=()=>{_n.empty();const Wt={formData:this.option("formData"),component:this};dn.groupContentTemplate.render({model:Wt,container:(0,K.cc)(_n)})},dn._renderGroupContentTemplate();else{const Wt=this._renderLayoutManager(_n,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(dn),{colCount:dn.colCount,colCountByScreen:dn.colCountByScreen,alignItemLabels:dn.alignItemLabels,cssItemClass:dn.cssItemClass}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(dn.guid,{layoutManager:Wt});const zn=Wt._getColCount();this._groupsColCount.includes(zn)||this._groupsColCount.push(zn),an.addClass(Ee+zn),an.attr(Oe,zn)}},_itemGroupTemplate(dn,an,_n){const{id:Wt}=an.editorOptions.inputAttr,zn=(0,y.A)("<div>").toggleClass("dx-form-group-with-caption",(0,h.O9)(dn.caption)&&dn.caption.length).addClass(pe).appendTo(_n);this.setAria({role:"group",labelledby:Wt},zn),(0,y.A)(_n).parent().addClass("dx-field-item-has-group"),this._itemGroupCaptionTemplate(dn,zn,Wt),this._itemGroupContentTemplate(dn,zn)},_createLayoutManagerOptions(dn,an){return function lo(dn){let{form:an,$formElement:_n,formOptions:Wt,items:zn,validationGroup:mi,extendedLayoutManagerOptions:Si,onFieldDataChanged:go,onContentReady:No,onDisposing:Sr,onFieldItemRendered:pr}=dn;return(0,s.X)({form:an,items:zn,$formElement:_n,validationGroup:mi,onFieldDataChanged:go,onContentReady:No,onDisposing:Sr,onFieldItemRendered:pr,validationBoundary:Wt.scrollingEnabled?_n:void 0,scrollingEnabled:Wt.scrollingEnabled,showRequiredMark:Wt.showRequiredMark,showOptionalMark:Wt.showOptionalMark,requiredMark:Wt.requiredMark,optionalMark:Wt.optionalMark,requiredMessage:Wt.requiredMessage,screenByWidth:Wt.screenByWidth,layoutData:Wt.formData,labelLocation:Wt.labelLocation,customizeItem:Wt.customizeItem,minColWidth:Wt.minColWidth,showColonAfterLabel:Wt.showColonAfterLabel,onEditorEnterKey:Wt.onEditorEnterKey,labelMode:Wt.labelMode},{isRoot:Si.isRoot,colCount:Si.colCount,alignItemLabels:Si.alignItemLabels,cssItemClass:Si.cssItemClass,colCountByScreen:Si.colCountByScreen,onLayoutChanged:Si.onLayoutChanged,width:Si.width})}({form:this,formOptions:this.option(),$formElement:this.$element(),items:dn,validationGroup:this._getValidationGroup(),extendedLayoutManagerOptions:an,onFieldDataChanged:_n=>{this._isDataUpdating||this._triggerOnFieldDataChanged(_n)},onContentReady:_n=>{this._itemsRunTimeInfo.addItemsOrExtendFrom(_n.component._itemsRunTimeInfo),an.onContentReady&&an.onContentReady(_n)},onDisposing:_n=>{let{component:Wt}=_n;const zn=Wt.getItemsRunTimeInfo();this._itemsRunTimeInfo.removeItemsByItems(zn)},onFieldItemRendered:()=>{var _n;null===(_n=this._validationSummary)||void 0===_n||_n.refreshValidationGroup()}})},_renderLayoutManager(dn,an){this._cachedColCountOptions.push({colCountByScreen:(0,s.X)({lg:an.colCount,md:an.colCount,sm:an.colCount,xs:1},an.colCountByScreen)});const Wt=(0,y.A)("<div>");Wt.appendTo(dn);const zn=this._createComponent(Wt,"dxLayoutManager",an);return zn.on("autoColCountChanged",()=>{this._clearAutoColCountChangedTimeout(),this.autoColCountChangedTimeoutId=setTimeout(()=>!this._disposed&&this._refresh(),0)}),this._cachedLayoutManagers.push(zn),zn},_getValidationGroup(){return this.option("validationGroup")||this},_createComponent(dn,an,_n){return this._extendConfig(_n=_n||{},{readOnly:this.option("readOnly")}),this.callBase(dn,an,_n)},_attachSyncSubscriptions(){const dn=this;dn.on("optionChanged",an=>{const _n=an.fullName;"formData"===_n&&((0,h.O9)(an.value)||dn._options.silent("formData",an.value={}),dn._triggerOnFieldDataChangedByDataSet(an.value)),dn._cachedLayoutManagers.length&&(0,a.__)(dn._cachedLayoutManagers,(Wt,zn)=>{"formData"===_n&&(dn._isDataUpdating=!0,zn.option("layoutData",an.value),dn._isDataUpdating=!1),("readOnly"===an.name||"disabled"===an.name)&&zn.option(_n,an.value)})})},_optionChanged(dn){const an=dn.fullName.split(".");an.length>1&&-1!==an[0].search("items")&&this._itemsOptionChangedHandler(dn)||an.length>1&&-1!==an[0].search("formData")&&this._formDataOptionChangedHandler(dn)||this._defaultOptionChangedHandler(dn)},_defaultOptionChangedHandler(dn){switch(dn.name){case"formData":this.option("items")?(0,h.RI)(dn.value)&&this._clear():this._invalidate();break;case"onFieldDataChanged":case"alignRootItemLabels":case"readOnly":case"isDirty":break;case"items":case"colCount":case"onEditorEnterKey":case"labelLocation":case"labelMode":case"alignItemLabels":case"showColonAfterLabel":case"customizeItem":case"alignItemLabelsInAllGroups":case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":case"requiredMessage":case"scrollingEnabled":case"formID":case"colCountByScreen":case"screenByWidth":case"stylingMode":this._invalidate();break;case"showValidationSummary":this._renderValidationSummary();break;case"minColWidth":"auto"===this.option("colCount")&&this._invalidate();break;case"width":this.callBase(dn),this._rootLayoutManager.option(dn.name,dn.value),this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode());break;case"validationGroup":Xo.A.removeGroup(dn.previousValue||this),this._invalidate();break;default:this.callBase(dn)}},_itemsOptionChangedHandler(dn){const an=dn.fullName.split("."),{value:_n}=dn,Wt=this._getItemPath(an),zn=this.option(Wt),mi=dn.fullName.replace(`${Wt}.`,""),Si=mi.split(".")[0].replace(/\[\d+]/,""),go=this._tryCreateItemOptionAction(Si,zn,zn[Si],dn.previousValue,Wt);let No=this._tryExecuteItemOptionAction(go)||this._tryChangeLayoutManagerItemOption(dn.fullName,_n);if(!No&&zn){this._changeItemOption(zn,mi,_n);const Sr=this._generateItemsFromData(this.option("items"));this.option("items",Sr),No=!0}return No},_formDataOptionChangedHandler(dn){const an=dn.fullName.split("."),{value:_n}=dn,Wt=an.slice(1).join("."),zn=this.getEditor(Wt);return zn?zn.option("value",_n):this._triggerOnFieldDataChanged({dataField:Wt,value:_n}),!0},_tryCreateItemOptionAction(dn,an,_n,Wt,zn){return"tabs"===dn&&(this._itemsRunTimeInfo.removeItemsByPathStartWith(`${zn}.tabs`),_n=this._prepareItems(_n,!0,zn,!0)),((dn,an)=>{switch(dn){case"editorOptions":case"buttonOptions":return new Eo(an);case"validationRules":return new ei(an);case"cssClass":return new Ii(an);case"badge":case"disabled":case"icon":case"tabTemplate":case"title":return new Jo((0,s.X)(an,{optionName:dn}));case"tabs":return new Yn(an);case"template":{var _n,Wt;const zn=(null==an||null===(_n=an.item)||void 0===_n?void 0:_n.itemType)??(null===(Wt=an.itemsRunTimeInfo.findPreparedItemByItem(an?.item))||void 0===Wt?void 0:Wt.itemType);return"simple"===zn?new fr(an):"group"===zn?new Gr(an):new Jo((0,s.X)(an,{optionName:dn}))}default:return null}})(dn,{item:an,value:_n,previousValue:Wt,itemsRunTimeInfo:this._itemsRunTimeInfo})},_tryExecuteItemOptionAction:dn=>dn&&dn.tryExecute(),_updateValidationGroupAndSummaryIfNeeded(dn){const an=Rt(dn);var _n;or.includes(an)&&(Xo.A.addGroup(this._getValidationGroup(),!1),this.option("showValidationSummary"))&&(null===(_n=this._validationSummary)||void 0===_n||_n.refreshValidationGroup())},_setLayoutManagerItemOption(dn,an,_n,Wt){if(this._updateLockCount>0){!dn._updateLockCount&&dn.beginUpdate();const mi=this._itemsRunTimeInfo.findKeyByPath(Wt);this.postponedOperations.add(mi,()=>(!dn._disposed&&dn.endUpdate(),(0,en.cY)().resolve()))}const zn=mi=>{if(mi.component.off("contentReady",zn),pi(Wt)){const Si=(dn=>{const an=dn.split("."),_n=[...an];for(let Wt=an.length-1;Wt>=0;Wt--){if(pi(an[Wt]))return _n.join(".");_n.splice(Wt,1)}return""})(Wt),go=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(Si);go&&this._alignLabelsInColumn({items:go.option("items"),layoutManager:go,$container:go.$element(),inOneColumn:go.isSingleColumnMode()})}else this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())};dn.on("contentReady",zn),dn.option(an,_n),this._updateValidationGroupAndSummaryIfNeeded(an)},_tryChangeLayoutManagerItemOption(dn,an){const _n=dn.split("."),Wt=Rt(dn);if("items"===Wt&&_n.length>1){const zn=this._getItemPath(_n),mi=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(zn);if(mi){this._itemsRunTimeInfo.removeItemsByItems(mi.getItemsRunTimeInfo());const Si=this._prepareItems(an,!1,zn);return this._setLayoutManagerItemOption(mi,Wt,Si,zn),!0}}else if(_n.length>2){const zn=_n.length-2,mi=this._getItemPath(_n.slice(0,zn)),Si=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(mi);if(Si){const go=hr(_n[zn],Wt);if("editorType"===Wt&&Si.option(go)!==an)return!1;if("visible"===Wt){const No=this.option(hr(mi,"items"));if(No&&No.length){const Sr=Si.option("items");No.forEach((pr,Vr)=>{Sr[Vr].visibleIndex=pr.visibleIndex})}}return this._setLayoutManagerItemOption(Si,go,an,mi),!0}}return!1},_tryChangeLayoutManagerItemOptions(dn,an){let _n;return this.beginUpdate(),(0,a.__)(an,(Wt,zn)=>{if(_n=this._tryChangeLayoutManagerItemOption(hr(dn,Wt),zn),!_n)return!1}),this.endUpdate(),_n},_getItemPath(dn){let _n,an=dn[0];for(_n=1;_n<dn.length&&-1!==dn[_n].search(/items\[\d+]|tabs\[\d+]/);_n++)an+=`.${dn[_n]}`;return an},_triggerOnFieldDataChanged(dn){this._updateIsDirty(dn.dataField),this._createActionByOption("onFieldDataChanged")(dn)},_triggerOnFieldDataChangedByDataSet(dn){dn&&(0,h.Gv)(dn)&&Object.keys(dn).forEach(an=>{this._triggerOnFieldDataChanged({dataField:an,value:dn[an]})})},_updateFieldValue(dn,an){if((0,h.O9)(this.option("formData"))){const _n=this.getEditor(dn);this.option(`formData.${dn}`,an),_n&&_n.option("value")!==an&&_n.option("value",an)}},_generateItemsFromData(dn){const an=this.option("formData"),_n=[];return!dn&&(0,h.O9)(an)&&(0,a.__)(an,Wt=>{_n.push({dataField:Wt})}),dn&&(0,a.__)(dn,(Wt,zn)=>{(0,h.Gv)(zn)?_n.push(zn):_n.push({dataField:zn})}),_n},_getItemByField(dn,an){const _n=this,Wt=(0,h.Gv)(dn)?dn:_n._getFieldParts(dn),{fieldName:zn}=Wt,{fieldPath:mi}=Wt;let Si;return an.length&&(0,a.__)(an,(go,No)=>{const{itemType:Sr}=No;if(mi.length){const pr=mi.slice();No=_n._getItemByFieldPath(pr,zn,No)}else if("group"===Sr&&!No.caption&&!No.name||"tabbed"===Sr&&!No.name){const pr=_n._getSubItemField(Sr);No.items=_n._generateItemsFromData(No.items),No=_n._getItemByField({fieldName:zn,fieldPath:mi},No[pr])}if(((dn,an)=>!!dn&&(dn.dataField===an||dn.name===an||Zo(dn.title)===an||"group"===dn.itemType&&Zo(dn.caption)===an))(No,zn))return Si=No,!1}),Si},_getFieldParts(dn){let an=dn,_n=an.indexOf(".");const Wt=[];for(;-1!==_n;)Wt.push(an.substr(0,_n)),an=an.substr(_n+1),_n=an.indexOf(".");return{fieldName:an,fieldPath:Wt.reverse()}},_getItemByFieldPath(dn,an,_n){const Wt=this,{itemType:zn}=_n,mi=Wt._getSubItemField(zn),Si="group"===zn||"tabbed"===zn||_n.title;let go;do{if(!Si)break;{const No=_n.name||_n.caption||_n.title,Sr=(0,h.O9)(No),pr=Zo(No);let Vr;if(_n[mi]=Wt._generateItemsFromData(_n[mi]),Sr&&(Vr=dn.pop()),!dn.length&&(go=Wt._getItemByField(an,_n[mi]),go))break;(!Sr||Sr&&pr===Vr)&&dn.length&&(go=Wt._searchItemInEverySubItem(dn,an,_n[mi]))}}while(dn.length&&!(0,h.O9)(go));return go},_getSubItemField:dn=>"tabbed"===dn?"tabs":"items",_searchItemInEverySubItem(dn,an,_n){const Wt=this;let zn;return(0,a.__)(_n,(mi,Si)=>{if(zn=Wt._getItemByFieldPath(dn.slice(),an,Si),zn)return!1}),zn||(zn=!1),zn},_changeItemOption(dn,an,_n){(0,h.Gv)(dn)&&(dn[an]=_n)},_dimensionChanged(){const dn=this._getCurrentScreenFactor();this._lastMarkupScreenFactor!==dn&&(this._isColCountChanged(this._lastMarkupScreenFactor,dn)&&(this._targetScreenFactor=dn,this._refresh(),this._targetScreenFactor=void 0),this._lastMarkupScreenFactor=dn)},_isColCountChanged(dn,an){let _n=!1;return(0,a.__)(this._cachedColCountOptions,(Wt,zn)=>{if(zn.colCountByScreen[dn]!==zn.colCountByScreen[an])return _n=!0,!1}),_n},_refresh(){x.A.trigger(this.$element().find(".dx-state-focused > :not(.dx-dropdowneditor-input-wrapper) input, .dx-state-focused textarea"),"change"),this.callBase()},_updateIsDirty(dn){const an=this.getEditor(dn);an&&(an.option("isDirty")?this._dirtyFields.add(dn):this._dirtyFields.delete(dn),this.option("isDirty",!!this._dirtyFields.size))},updateRunTimeInfoForEachEditor(dn){this._itemsRunTimeInfo.each((an,_n)=>{const{widgetInstance:Wt}=_n;(0,h.O9)(Wt)&&Di.A.isEditor(Wt)&&dn(Wt)})},_clear(){this.updateRunTimeInfoForEachEditor(dn=>{dn.clear(),dn.option("isValid",!0)}),Xo.A.resetGroup(this._getValidationGroup())},_updateData(dn,an,_n){const Wt=this,zn=_n?an:dn;(0,h.Gv)(zn)?(0,a.__)(zn,(mi,Si)=>{Wt._updateData(_n?`${dn}.${mi}`:mi,Si,(0,h.Gv)(Si))}):(0,h.Kg)(dn)&&Wt._updateFieldValue(dn,an)},registerKeyHandler(dn,an){this.callBase(dn,an),this._itemsRunTimeInfo.each((_n,Wt)=>{(0,h.O9)(Wt.widgetInstance)&&Wt.widgetInstance.registerKeyHandler(dn,an)})},_focusTarget(){return this.$element().find(`.${ve} [tabindex]`).first()},_visibilityChanged(){this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())},_clearAutoColCountChangedTimeout(){this.autoColCountChangedTimeoutId&&(clearTimeout(this.autoColCountChangedTimeoutId),this.autoColCountChangedTimeoutId=void 0)},_dispose(){this._clearAutoColCountChangedTimeout(),Xo.A.removeGroup(this._getValidationGroup()),this.callBase()},clear(){this._clear()},resetValues(){this._clear()},reset(dn){this.updateRunTimeInfoForEachEditor(an=>{const _n=an.option("name");dn&&_n in dn?an.reset(dn[_n]):an.reset()}),this._renderValidationSummary()},updateData(dn,an){this._updateData(dn,an)},getEditor(dn){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(dn)||this._itemsRunTimeInfo.findWidgetInstanceByName(dn)},getButton(dn){return this._itemsRunTimeInfo.findWidgetInstanceByName(dn)},updateDimensions(){const dn=this,an=(0,en.cY)();return dn._scrollable?dn._scrollable.update().done(()=>{an.resolveWith(dn)}):an.resolveWith(dn),an.promise()},itemOption(dn,an,_n){const Wt=this._generateItemsFromData(this.option("items")),zn=this._getItemByField(dn,Wt),mi=Ti(Wt,zn);if(zn)switch(arguments.length){case 1:return zn;case 3:{const Si=this._tryCreateItemOptionAction(an,zn,_n,zn[an],mi);this._changeItemOption(zn,an,_n);const go=hr(mi,an);!this._tryExecuteItemOptionAction(Si)&&!this._tryChangeLayoutManagerItemOption(go,_n)&&this.option("items",Wt);break}default:if((0,h.Gv)(an)&&!this._tryChangeLayoutManagerItemOptions(mi,an)){let Si;(0,a.__)(an,(go,No)=>{const Sr=this._tryCreateItemOptionAction(go,zn,No,zn[go],mi);this._changeItemOption(zn,go,No),!Si&&!this._tryExecuteItemOptionAction(Sr)&&(Si=!0)}),Si&&this.option("items",Wt)}}},validate(){return Xo.A.validateGroup(this._getValidationGroup())},getItemID(dn){return`dx_${this.option("formID")}_${dn||new Ue.A}`},getTargetScreenFactor(){return this._targetScreenFactor}});(0,T.A)("dxForm",Jr);const Mr=Jr},7794:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>J});var W=M(5737),o=M(5973),P=M(5704),b=M(5944),f=M(4859),S=M(4270),T=M(3090),y=M(8535),d=M(2660),c=M(1830),s=M(4481),a=M(3538),u=M(1541),h=M(1435),g=M(8910),_=M(127),x=M(6853);const D=a.A.inherit({ctor(){this._dataStructure=[],this._itemsCount=0,this._visibleItemsCount=0},_indexByKey:{},_convertItemsToNodes(ie,re){const q=this;(0,d.__)(ie,(Y,Z)=>{const Q=(0,c.O9)(re)?re:q._getParentId(Z),te=q._convertItemToNode(Z,Q);q._dataStructure.push(te),q._checkForDuplicateId(te.internalFields.key),q._indexByKey[te.internalFields.key]=q._dataStructure.length-1,q._itemHasChildren(Z)&&q._convertItemsToNodes(q._dataAccessors.getters.items(Z),te.internalFields.key)})},_checkForDuplicateId(ie){if((0,c.O9)(this._indexByKey[ie]))throw _.A.Error("E1040",ie)},_getParentId(ie){return"plain"===this._dataType?this._dataAccessors.getters.parentKey(ie):void 0},_itemHasChildren(ie){if("plain"===this._dataType)return;const re=this._dataAccessors.getters.items(ie);return re&&re.length},_getUniqueKey(ie){const re=this._dataAccessors.getters.key,q=re(ie);return re&&(q||0===q)&&(0,c.sO)(q)?q:this.getItemsCount()},_convertItemToNode(ie,re){this._itemsCount++,!1!==ie.visible&&this._visibleItemsCount++;const q={internalFields:{disabled:this._dataAccessors.getters.disabled(ie,{defaultValue:!1}),expanded:this._dataAccessors.getters.expanded(ie,{defaultValue:!1}),selected:this._dataAccessors.getters.selected(ie,{defaultValue:!1}),key:this._getUniqueKey(ie),parentKey:(0,c.O9)(re)?re:this._rootValue,item:this._makeObjectFromPrimitive(ie),childrenKeys:[]}};return(0,T.X)(q,ie),delete q.items,q},setChildrenKeys(){const ie=this;(0,d.__)(this._dataStructure,(re,q)=>{if(q.internalFields.parentKey===ie._rootValue)return;const Y=ie.getParentNode(q);Y&&Y.internalFields.childrenKeys.push(q.internalFields.key)})},_makeObjectFromPrimitive(ie){if((0,c.sO)(ie)){const re=ie;this._dataAccessors.setters.key(ie={},re)}return ie},_convertToPublicNode(ie,re){if(!ie)return null;const q={text:this._dataAccessors.getters.display(ie),key:ie.internalFields.key,selected:ie.internalFields.selected,expanded:ie.internalFields.expanded,disabled:ie.internalFields.disabled,parent:re||null,itemData:ie.internalFields.item,children:[],items:[]};return q.parent&&(q.parent.children.push(q),q.parent.items.push(q)),q},convertToPublicNodes(ie,re){if(!ie.length)return[];const q=this,Y=[];return(0,d.__)(ie,(Z,Q)=>{Q=(0,c.sO)(Q)?q._getByKey(Q):Q;const te=q._convertToPublicNode(Q,re);te.children=q.convertToPublicNodes(Q.internalFields.childrenKeys,te),Y.push(te),Q.internalFields.publicNode=te}),Y},setDataAccessors(ie){this._dataAccessors=ie},_getByKey(ie){return this._dataStructure[this.getIndexByKey(ie)]||null},getParentNode(ie){return this._getByKey(ie.internalFields.parentKey)},getByKey(ie,re){if(null==re)return null;let q=null;const Y=this;return Q=re,(0,d.__)(ie,(te,pe)=>{if((pe.internalFields&&pe.internalFields.key||Y._dataAccessors.getters.key(pe)).toString()===Q.toString())return q=pe,!1}),q;var Q},getItemsCount(){return this._itemsCount},getVisibleItemsCount(){return this._visibleItemsCount},updateIndexByKey(){const ie=this;this._indexByKey={},(0,d.__)(this._dataStructure,(re,q)=>{ie._checkForDuplicateId(q.internalFields.key),ie._indexByKey[q.internalFields.key]=re})},updateChildrenKeys(){this._indexByKey={},this.removeChildrenKeys(),this.updateIndexByKey(),this.setChildrenKeys()},removeChildrenKeys(){this._indexByKey={},(0,d.__)(this._dataStructure,(ie,re)=>{re.internalFields.childrenKeys=[]})},getIndexByKey(ie){return this._indexByKey[ie]},createPlainStructure(ie,re,q){return this._itemsCount=0,this._visibleItemsCount=0,this._rootValue=re,this._dataType=q,this._indexByKey={},this._convertItemsToNodes(ie),this.setChildrenKeys(),this._dataStructure}}),C="expanded",I="selected";x.A.setEditorClass(g.A);const G=a.A.inherit({ctor(ie){this.options={},(0,T.X)(this.options,this._defaultOptions(),ie),this.options.dataConverter.setDataAccessors(this.options.dataAccessors),this._selectedNodesKeys=[],this._expandedNodesKeys=[],this._dataStructure=[],this._createInternalDataStructure(),this.getTreeNodes()},setOption(ie,re){this.options[ie]=re,"recursiveSelection"===ie&&this._updateSelection()},_defaultOptions:()=>({dataAccessors:void 0,items:[],multipleSelection:!0,recursiveSelection:!1,recursiveExpansion:!1,rootValue:0,searchValue:"",dataType:"tree",searchMode:"contains",dataConverter:new D,onNodeChanged:f.lQ,sort:null}),_createInternalDataStructure(){this._initialDataStructure=this.options.dataConverter.createPlainStructure(this.options.items,this.options.rootValue,this.options.dataType),this._dataStructure=this.options.searchValue.length?this.search(this.options.searchValue):this._initialDataStructure,this.options.dataConverter._dataStructure=this._dataStructure,this._updateSelection(),this._updateExpansion()},_updateSelection(){this.options.recursiveSelection&&(this._setChildrenSelection(),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(I)},_updateExpansion(ie){this.options.recursiveExpansion&&(ie?this._updateOneBranch(ie):this._setParentExpansion()),this._expandedNodesKeys=this._updateNodesKeysArray(C)},_updateNodesKeysArray(ie){const re=this;let q=[];return(0,d.__)(re._getDataBySelectionMode(),(Y,Z)=>{re._isNodeVisible(Z)&&Z.internalFields[ie]&&(ie===C||re.options.multipleSelection?q.push(Z.internalFields.key):(q.length&&re.toggleSelection(q[0],!1,!0),q=[Z.internalFields.key]))}),q},_getDataBySelectionMode(){return this.options.multipleSelection?this.getData():this.getFullData()},_isNodeVisible:ie=>!1!==ie.internalFields.item.visible,_getByKey(ie,re){return ie===this._dataStructure?this.options.dataConverter._getByKey(re):this.options.dataConverter.getByKey(ie,re)},_setChildrenSelection(){const ie=this;(0,d.__)(this._dataStructure,(re,q)=>{if(!q.internalFields.childrenKeys.length)return;const Y=q.internalFields.selected;!0===Y&&ie._toggleChildrenSelection(q,Y)})},_setParentSelection(){const ie=this;(0,d.__)(this._dataStructure,(re,q)=>{ie.options.dataConverter.getParentNode(q)&&q.internalFields.parentKey!==ie.options.rootValue&&ie._iterateParents(q,Z=>{const Q=ie._calculateSelectedState(Z);ie._setFieldState(Z,I,Q)})})},_setParentExpansion(){const ie=this;(0,d.__)(this._dataStructure,(re,q)=>{q.internalFields.expanded&&ie._updateOneBranch(q.internalFields.key)})},_updateOneBranch(ie){const re=this,q=this.getNodeByKey(ie);re._iterateParents(q,Y=>{re._setFieldState(Y,C,!0)})},_iterateChildren(ie,re,q,Y){if(!(0,c.Tn)(q))return;const Z=this,Q=ie.internalFields.key;-1===(Y=Y||[]).indexOf(Q)&&(Y.push(Q),(0,d.__)(ie.internalFields.childrenKeys,(te,pe)=>{const z=Z.getNodeByKey(pe);q(z),z.internalFields.childrenKeys.length&&re&&Z._iterateChildren(z,re,q,Y)}))},_iterateParents(ie,re,q){if(ie.internalFields.parentKey===this.options.rootValue||!(0,c.Tn)(re))return;q=q||[];const{key:Y}=ie.internalFields;if(-1===q.indexOf(Y)){q.push(Y);const Z=this.options.dataConverter.getParentNode(ie);Z&&(re(Z),Z.internalFields.parentKey!==this.options.rootValue&&this._iterateParents(Z,re,q))}},_calculateSelectedState(ie){const re=ie.internalFields.childrenKeys.length;let q=0,Y=0,Z=!1;for(let Q=0;Q<=re-1;Q++){const te=this.getNodeByKey(ie.internalFields.childrenKeys[Q]),z=te.internalFields.selected;!1===te.internalFields.item.visible?Y++:z?q++:void 0===z&&(q+=.5)}return q&&(Z=q===re-Y||void 0),Z},_toggleChildrenSelection(ie,re){const q=this;this._iterateChildren(ie,!0,Y=>{q._isNodeVisible(Y)&&q._setFieldState(Y,I,re)})},_setFieldState(ie,re,q){ie.internalFields[re]!==q&&(ie.internalFields[re]=q,ie.internalFields.publicNode&&(ie.internalFields.publicNode[re]=q),this.options.dataAccessors.setters[re](ie.internalFields.item,q),this.options.onNodeChanged(ie))},_markChildren(ie){const re=this;(0,d.__)(ie,(q,Y)=>{const Z=re.getIndexByKey(Y),Q=re.getNodeByKey(Y);re._dataStructure[Z]=0,Q.internalFields.childrenKeys.length&&re._markChildren(Q.internalFields.childrenKeys)})},_removeNode(ie){const re=this.getNodeByKey(ie);this._dataStructure[this.getIndexByKey(ie)]=0,this._markChildren(re.internalFields.childrenKeys);const q=this;let Y=0;const Z=(0,T.X)([],this._dataStructure);(0,d.__)(Z,(Q,te)=>{te||(q._dataStructure.splice(Q-Y,1),Y++)})},_addNode(ie){const{dataConverter:re}=this.options,q=re._convertItemToNode(ie,this.options.dataAccessors.getters.parentKey(ie));this._dataStructure=this._dataStructure.concat(q),this._initialDataStructure=this._initialDataStructure.concat(q),re._dataStructure=re._dataStructure.concat(q)},_updateFields(){this.options.dataConverter.updateChildrenKeys(),this._updateSelection(),this._updateExpansion()},getSelectedNodesKeys(){return this._selectedNodesKeys},getExpandedNodesKeys(){return this._expandedNodesKeys},getData(){return this._dataStructure},getFullData(){return this._initialDataStructure},getNodeByItem(ie){let re=null;return(0,d.__)(this._dataStructure,(q,Y)=>{if(Y.internalFields.item===ie)return re=Y,!1}),re},getNodesByItems(ie){const re=this,q=[];return(0,d.__)(ie,(Y,Z)=>{const Q=re.getNodeByItem(Z);Q&&q.push(Q)}),q},getNodeByKey(ie,re){return this._getByKey(re||this._getDataBySelectionMode(),ie)},getTreeNodes(){return this.options.dataConverter.convertToPublicNodes(this.getRootNodes())},getItemsCount(){return this.options.dataConverter.getItemsCount()},getVisibleItemsCount(){return this.options.dataConverter.getVisibleItemsCount()},getPublicNode:ie=>ie.internalFields.publicNode,getRootNodes(){return this.getChildrenNodes(this.options.rootValue)},getChildrenNodes(ie){return(0,u.A)(this._dataStructure,{langParams:this.options.langParams}).filter(["internalFields.parentKey",ie]).toArray()},getIndexByKey(ie){return this.options.dataConverter.getIndexByKey(ie)},addItem(ie){this._addNode(ie),this._updateFields()},removeItem(ie){this._removeNode(ie),this._updateFields()},toggleSelection(ie,re,q){const Y=this._isSingleModeUnselect(re),Z=this._getByKey(q||Y?this._initialDataStructure:this._dataStructure,ie);this._setFieldState(Z,I,re),this.options.recursiveSelection&&!q&&(re?this._setChildrenSelection():this._toggleChildrenSelection(Z,re),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(I)},_isSingleModeUnselect(ie){return!this.options.multipleSelection&&!ie},toggleNodeDisabledState(ie,re){const q=this.getNodeByKey(ie);this._setFieldState(q,"disabled",re)},toggleSelectAll(ie){if(!(0,c.O9)(ie))return;const re=this,q=re._selectedNodesKeys[re._selectedNodesKeys.length-1],Y=re._isSingleModeUnselect(ie)?this._initialDataStructure:this._dataStructure;(0,d.__)(Y,(Z,Q)=>{re._isNodeVisible(Q)&&re._setFieldState(Q,I,ie)}),re._selectedNodesKeys=re._updateNodesKeysArray(I),!ie&&re.options.selectionRequired&&re.toggleSelection(q,!0)},isAllSelected(){return!!this.getSelectedNodesKeys().length&&(this.getSelectedNodesKeys().length===this.getVisibleItemsCount()||void 0)},toggleExpansion(ie,re){const q=this.getNodeByKey(ie);this._setFieldState(q,C,re),re&&this._updateExpansion(ie),this._expandedNodesKeys=this._updateNodesKeysArray(C)},isFiltered(ie){return!this.options.searchValue.length||!!this._filterDataStructure(this.options.searchValue,[ie]).length},_createCriteria(ie,re,q){const Y=[];return Array.isArray(ie)?((0,d.__)(ie,(Z,Q)=>{Y.push([Q,q,re],"or")}),Y.pop(),Y):[ie,q,re]},_filterDataStructure(ie,re){const q=this.options.searchExpr||this.options.dataAccessors.getters.display,Y=x.A.getOperationBySearchMode(this.options.searchMode),Z=this._createCriteria(q,ie,Y);return(0,u.A)(re=re||this._initialDataStructure,{langParams:this.options.langParams}).filter(Z).toArray()},search(ie){const re=this;let q=this._filterDataStructure(ie);const{dataConverter:Y}=this.options;return function Z(Q,te){const{length:pe}=Q;for(;te<pe;){const z=Q[te];if(z.internalFields.parentKey===re.options.rootValue){te++;continue}const oe=Y.getParentNode(z);oe?(oe.internalFields.expanded||re._setFieldState(oe,C,!0),Q.includes(oe)?te++:(Q.splice(te,0,oe),Z(Q,te))):(_.A.log("W1007",z.internalFields.parentKey,z.internalFields.key),te++)}}(q,0),this.options.sort&&(q=h.A.queryByOptions((0,u.A)(q),{sort:this.options.sort,langParams:this.options.langParams}).toArray()),Y._indexByKey={},(0,d.__)(q,(Z,Q)=>{Q.internalFields.childrenKeys=[],Y._indexByKey[Q.internalFields.key]=Z}),Y._dataStructure=q,Y.setChildrenKeys(),Y._dataStructure}}),J=s.A.inherit({_getDefaultOptions(){return(0,T.X)(this.callBase(),{keyExpr:"id",displayExpr:"text",selectedExpr:"selected",disabledExpr:"disabled",itemsExpr:"items",hoverStateEnabled:!0,parentIdExpr:"parentId",expandedExpr:"expanded"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this._initAccessors(),this._initDataAdapter(),this._initDynamicTemplates()},_initDataSource(){this.callBase(),this._dataSource&&this._dataSource.paginate(!1)},_initDataAdapter(){const ie=this._createDataAdapterAccessors();this._dataAdapter=new G((0,T.X)({dataAccessors:{getters:ie.getters,setters:ie.setters},items:this.option("items")},this._getDataAdapterOptions()))},_getDataAdapterOptions:f.lQ,_getItemExtraPropNames:f.lQ,_initDynamicTemplates(){const ie=["text","html","items","icon"].concat(this._getItemExtraPropNames());this._templateManager.addDefaultTemplates({item:new b.U(this._addContent.bind(this),ie,this.option("integrationOptions.watchMethod"),{text:this._displayGetter,items:this._itemsGetter})})},_addContent(ie,re){ie.html(re.html).append(this._getIconContainer(re)).append(this._getTextContainer(re))},_getLinkContainer(ie,re,q){let{linkAttr:Y,url:Z}=q;const Q=(0,c.Gv)(Y)?Y:{};return(0,P.A)("<a>").addClass("dx-item-url").attr((0,W.A)({},Q,{href:Z})).append(ie).append(re)},_getIconContainer(ie){if(!ie.icon)return;const re=(0,y.N)(ie.icon);if(re.is("img")){const q=this.NAME.startsWith("dxPrivateComponent")?"":`${this.NAME} `;re.attr("alt",`${q}item icon`)}return re},_getTextContainer:ie=>(0,P.A)("<span>").text(ie.text),_initAccessors(){const ie=this;(0,d.__)(this._getAccessors(),(re,q)=>{ie._compileAccessor(q)}),this._compileDisplayGetter()},_getAccessors:()=>["key","selected","items","disabled","parentId","expanded"],_getChildNodes(ie){const re=this,q=[];return(0,d.__)(ie.internalFields.childrenKeys,(Y,Z)=>{const Q=re._dataAdapter.getNodeByKey(Z);q.push(Q)}),q},_hasChildren:ie=>ie&&ie.internalFields.childrenKeys.length,_compileAccessor(ie){const re=`_${ie}Getter`,q=`_${ie}Setter`,Y=this.option(`${ie}Expr`);return Y?(0,c.Tn)(Y)?(this[q]=function(Z,Q){Z[Y()]=Q},void(this[re]=function(Z){return Z[Y()]})):(this[re]=(0,S.Hz)(Y),void(this[q]=(0,S.vL)(Y))):(this[re]=f.lQ,void(this[q]=f.lQ))},_createDataAdapterAccessors(){const ie=this,re={getters:{},setters:{}};return(0,d.__)(this._getAccessors(),(q,Y)=>{const Q=`_${Y}Setter`,te="parentId"===Y?"parentKey":Y;re.getters[te]=ie[`_${Y}Getter`],re.setters[te]=ie[Q]}),re.getters.display=this._displayGetter?this._displayGetter:q=>q.text,re},_initMarkup(){this.callBase(),this._addWidgetClass()},_addWidgetClass(){this._focusTarget().addClass(this._widgetClass())},_widgetClass:f.lQ,_renderItemFrame(ie,re){const q=this.callBase.apply(this,arguments);return q.toggleClass("dx-state-disabled",!!this._disabledGetter(re)),q},_optionChanged(ie){switch(ie.name){case"displayExpr":case"keyExpr":this._initAccessors(),this._initDynamicTemplates(),this.repaint();break;case"itemsExpr":case"selectedExpr":case"disabledExpr":case"expandedExpr":case"parentIdExpr":this._initAccessors(),this._initDataAdapter(),this.repaint();break;case"items":this._initDataAdapter(),this.callBase(ie);break;default:this.callBase(ie)}}})},6828:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>S});var W=M(6853);const b=M(4292).A.inherit(W.A).inherit({_addWidgetPrefix:T=>`dx-list-${T}`,_getCombinedFilter(){const T=this._dataController,y={filter:T.filter()};T.addSearchFilter(y);const{filter:d}=y;return d},_initDataSource(){const T=this.option("searchValue"),y=this.option("searchExpr"),d=this.option("searchMode");this.callBase();const c=this._dataController;T&&T.length&&c.searchValue(T),d.length&&c.searchOperation(W.A.getOperationBySearchMode(d)),y&&c.searchExpr(y)}});(0,M(1973).A)("dxList",b);const S=b},2359:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>I});var W=M(1973),o=M(5973),P=M(5704),b=M(3090),f=M(1363),S=M(7007),T=M(6110),y=M(8360),d=M(9212),c=M(7080);const s=(0,T.w3)(),D=c.A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{indicatorSrc:"",activeStateEnabled:!1,hoverStateEnabled:!1,_animatingSegmentCount:1,_animatingSegmentInner:!1})},_defaultOptionsRules(){const L=(0,d.ss)();return this.callBase().concat([{device:()=>"android"===o.A.real().platform&&!/chrome/i.test(s.userAgent),options:{viaImage:!0}},{device:()=>(0,d.Nt)(L),options:{_animatingSegmentCount:2,_animatingSegmentInner:!0}},{device:()=>(0,d.AE)(L),options:{_animatingSegmentCount:7}}])},_useTemplates:()=>!1,_init(){this.callBase(),this.$element().addClass("dx-loadindicator");const N={role:"alert",label:y.A.format("Loading")};this.setAria(N)},_initMarkup(){this.callBase(),this._renderWrapper(),this._renderIndicatorContent(),this._renderMarkup()},_renderWrapper(){this._$wrapper=(0,P.A)("<div>").addClass("dx-loadindicator-wrapper"),this.$element().append(this._$wrapper)},_renderIndicatorContent(){this._$content=(0,P.A)("<div>").addClass("dx-loadindicator-content"),this._$wrapper.append(this._$content)},_renderMarkup(){const{viaImage:L,indicatorSrc:N}=this.option();!(0,S.animation)()||L||N?this._renderMarkupForImage():this._renderMarkupForAnimation()},_renderMarkupForAnimation(){const L=this.option("_animatingSegmentInner");this._$indicator=(0,P.A)("<div>").addClass("dx-loadindicator-icon"),this._$content.append(this._$indicator);for(let N=this.option("_animatingSegmentCount");N>=0;--N){const G=(0,P.A)("<div>").addClass("dx-loadindicator-segment").addClass("dx-loadindicator-segment"+N);L&&G.append((0,P.A)("<div>").addClass("dx-loadindicator-segment-inner")),this._$indicator.append(G)}},_renderMarkupForImage(){const{indicatorSrc:L}=this.option();L?(this._$wrapper.addClass("dx-loadindicator-image"),this._$wrapper.css("backgroundImage",`url(${L})`)):(0,S.animation)()&&this._renderMarkupForAnimation()},_renderDimensions(){this.callBase(),this._updateContentSizeForAnimation()},_updateContentSizeForAnimation(){if(!this._$indicator)return;let L=this.option("width"),N=this.option("height");if(L||N){L=(0,f.RG)(this.$element()),N=(0,f.Oq)(this.$element());const G=Math.min(N,L);this._$wrapper.css({height:G,width:G,fontSize:G})}},_clean(){this.callBase(),this._removeMarkupForAnimation(),this._removeMarkupForImage()},_removeMarkupForAnimation(){this._$indicator&&(this._$indicator.remove(),delete this._$indicator)},_removeMarkupForImage(){this._$wrapper.css("backgroundImage","none")},_optionChanged(L){switch(L.name){case"_animatingSegmentCount":case"_animatingSegmentInner":case"indicatorSrc":this._invalidate();break;default:this.callBase(L)}}});(0,W.A)("dxLoadIndicator",D);const I=D},7281:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(1973),o=M(5704),P=M(4859),b=M(6021),f=M(3090),S=M(8360),T=M(2359),y=M(3949),d=M(9212);const x=y.A.inherit({_supportedKeys(){return(0,f.X)(this.callBase(),{escape:P.lQ})},_getDefaultOptions(){return(0,f.X)(this.callBase(),{message:S.A.format("Loading"),width:222,height:90,animation:null,showIndicator:!0,indicatorSrc:"",showPane:!0,delay:0,templatesRenderAsynchronously:!1,hideTopOverlayHandler:null,focusStateEnabled:!1,propagateOutsideClick:!0,preventScrollEvents:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"generic"},options:{shadingColor:"transparent"}},{device:()=>(0,d.gx)(),options:{message:"",width:60,height:60,maxHeight:60,maxWidth:60}},{device:()=>(0,d.Ft)(),options:{width:"auto",height:"auto"}}])},_init(){this.callBase.apply(this,arguments)},_render(){this.callBase(),this.$element().addClass("dx-loadpanel"),this.$wrapper().addClass("dx-loadpanel-wrapper"),this._updateWrapperAria()},_updateWrapperAria(){if(this.$wrapper().removeAttr("aria-label").removeAttr("role"),!this.option("showIndicator")){const I=this._getAriaAttributes();this.$wrapper().attr(I)}},_getAriaAttributes(){const{message:C}=this.option();return{role:"alert","aria-label":C||S.A.format("Loading")}},_renderContentImpl(){this.callBase(),this.$content().addClass("dx-loadpanel-content"),this._$loadPanelContentWrapper=(0,o.A)("<div>").addClass("dx-loadpanel-content-wrapper"),this._$loadPanelContentWrapper.appendTo(this.$content()),this._togglePaneVisible(),this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage()},_show(){const C=this.option("delay");if(!C)return this.callBase();const I=(0,b.cY)(),L=this.callBase.bind(this);return this._clearShowTimeout(),this._showTimeout=setTimeout(()=>{L().done(()=>{I.resolve()})},C),I.promise()},_hide(){return this._clearShowTimeout(),this.callBase()},_clearShowTimeout(){clearTimeout(this._showTimeout)},_renderMessage(){if(!this._$loadPanelContentWrapper)return;const C=this.option("message");if(!C)return;const I=(0,o.A)("<div>").addClass("dx-loadpanel-message").text(C);this._$loadPanelContentWrapper.append(I)},_renderLoadIndicator(){!this._$loadPanelContentWrapper||!this.option("showIndicator")||(this._$indicator||(this._$indicator=(0,o.A)("<div>").addClass("dx-loadpanel-indicator").appendTo(this._$loadPanelContentWrapper)),this._createComponent(this._$indicator,T.A,{elementAttr:this._getAriaAttributes(),indicatorSrc:this.option("indicatorSrc")}))},_cleanPreviousContent(){this.$content().find(".dx-loadpanel-message").remove(),this.$content().find(".dx-loadpanel-indicator").remove(),delete this._$indicator},_togglePaneVisible(){this.$content().toggleClass("dx-loadpanel-pane-hidden",!this.option("showPane"))},_optionChanged(C){switch(C.name){case"delay":break;case"message":case"showIndicator":this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage(),this._updateWrapperAria();break;case"showPane":this._togglePaneVisible();break;case"indicatorSrc":this._renderLoadIndicator();break;default:this.callBase(C)}},_dispose(){this._clearShowTimeout(),this.callBase()}});(0,W.A)("dxLoadPanel",x);const D=x},6314:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>xe});var W=M(1973),o=M(9522),P=M(5704),b=M(4859),f=M(3090),S=M(2660),T=M(1363),y=M(1830),d=M(4072),c=M(1134),s=M(9209),a=M(9293),u=M(9012),h=M(3949),g=M(1757),_=M(6410),x=M(6163),D=(M(784),M(6870)),C=M(8630);const G=class N extends C.A{_getDefaultOptions(){return(0,f.X)(super._getDefaultOptions(),{orientation:"horizontal",tabIndex:null,onHoverStart:b.lQ})}_initDataAdapter(){this._dataAdapter=this.option("_dataAdapter"),this._dataAdapter||super._initDataAdapter()}_renderContentImpl(){this._renderContextMenuOverlay(),super._renderContentImpl();const Ee=this._dataAdapter.getNodeByKey(this.option("_parentKey"));Ee&&this._renderItems(this._getChildNodes(Ee)),this._renderDelimiter()}_renderDelimiter(){this.$contentDelimiter=(0,P.A)("<div>").appendTo(this._itemContainer()).addClass("dx-context-menu-content-delimiter")}_getOverlayOptions(){return(0,f.X)(!0,super._getOverlayOptions(),{onPositioned:this._overlayPositionedActionHandler.bind(this),position:{precise:!0}})}_overlayPositionedActionHandler(Ee){this._showDelimiter(Ee)}_hoverEndHandler(Ee){super._hoverEndHandler(Ee),this._toggleFocusClass(!1,Ee.currentTarget)}_isMenuHorizontal(){return"horizontal"===this.option("orientation")}_hoverStartHandler(Ee){this.option("onHoverStart")(Ee),super._hoverStartHandler(Ee),this._toggleFocusClass(!0,Ee.currentTarget)}_drawSubmenu(Ee){this._actions.onShowing({rootItem:(0,o.cc)(Ee),submenu:this}),super._drawSubmenu(Ee),this._actions.onShown({rootItem:(0,o.cc)(Ee),submenu:this})}_hideSubmenu(Ee){this._actions.onHiding({cancel:!0,rootItem:(0,o.cc)(Ee),submenu:this}),super._hideSubmenu(Ee),this._actions.onHidden({rootItem:(0,o.cc)(Ee),submenu:this})}_showDelimiter(Ee){if(!this.$contentDelimiter)return;const Oe=this._itemContainer().children(".dx-submenu").eq(0),ze=this.option("position").of.find(".dx-context-menu-container-border"),$e={of:Oe,precise:!0},Be=Ee.position,Ue=Be.v.location,ot=Be.h.location,st=ze.offset(),et=Math.round(st.left),Ke=Math.round(st.top),Ye=(0,T.RG)(ze),Pe=(0,T.Oq)(ze),Se=(0,T.RG)(Oe),Re=(0,T.Oq)(Oe);this.$contentDelimiter.css("display","block"),(0,T.zj)(this.$contentDelimiter,this._isMenuHorizontal()?Ye<Se?Ye:Se:3),(0,T.k$)(this.$contentDelimiter,this._isMenuHorizontal()?3:Pe<Re?Pe:Re),this._isMenuHorizontal()?Ue>Ke?Math.round(ot)===et?($e.offset="0 -2.5",$e.at=$e.my="left top"):($e.offset="0 -2.5",$e.at=$e.my="right top"):((0,T.k$)(this.$contentDelimiter,5),Math.round(ot)===et?($e.offset="0 5",$e.at=$e.my="left bottom"):($e.offset="0 5",$e.at=$e.my="right bottom")):ot>et?Math.round(Ue)===Ke?($e.offset="-2.5 0",$e.at=$e.my="left top"):($e.offset="-2.5 0",$e.at=$e.my="left bottom"):Math.round(Ue)===Ke?($e.offset="2.5 0",$e.at=$e.my="right top"):($e.offset="2.5 0",$e.at=$e.my="right bottom"),D.A.setup(this.$contentDelimiter,$e)}_getContextMenuPosition(){return this.option("position")}isOverlayVisible(){return this._overlay.option("visible")}getOverlayContent(){return this._overlay.$content()}},z="dx-menu-adaptive-mode",ae=`${z}-overlay-wrapper`,Ce={show:50,hide:300},ye=["onSubmenuShowing","onSubmenuShown","onSubmenuHiding","onSubmenuHidden","onItemContextMenu","onItemClick","onSelectionChanged","onItemRendered"];class ge extends _.A{_getDefaultOptions(){return(0,f.X)(super._getDefaultOptions(),{orientation:"horizontal",submenuDirection:"auto",showFirstSubmenuMode:{name:"onClick",delay:{show:50,hide:300}},hideSubmenuOnMouseLeave:!1,onSubmenuShowing:null,onSubmenuShown:null,onSubmenuHiding:null,onSubmenuHidden:null,adaptivityEnabled:!1})}_setOptionsByReference(){super._setOptionsByReference(),(0,f.X)(this._optionsByReference,{animation:!0,selectedItem:!0})}_itemElements(){const Ee=super._itemElements(),Oe=this._submenuItemElements();return Ee.add(Oe)}_submenuItemElements(){let Ee=[];const Oe=this._submenus.length&&this._submenus[0];return Oe&&Oe.itemsContainer()&&(Ee=Oe.itemsContainer().find(".dx-menu-item")),Ee}_focusTarget(){return this.$element()}_isMenuHorizontal(){return"horizontal"===this.option("orientation")}_moveFocus(Ee){const Oe=this._getAvailableItems(),ze=this._isMenuHorizontal(),$e=this._getActiveItem(!0);let Be,Ue,ot,st;switch(Ee){case"up":Ue=ze?"showSubmenu":this._getItemsNavigationOperation("prevItem"),Be=ze?$e:Oe,ot=this._getKeyboardNavigationAction(Ue,Be),st=ot();break;case"down":Ue=ze?"showSubmenu":this._getItemsNavigationOperation("nextItem"),Be=ze?$e:Oe,ot=this._getKeyboardNavigationAction(Ue,Be),st=ot();break;case"right":Ue=ze?this._getItemsNavigationOperation("nextItem"):"showSubmenu",Be=ze?Oe:$e,ot=this._getKeyboardNavigationAction(Ue,Be),st=ot();break;case"left":Ue=ze?this._getItemsNavigationOperation("prevItem"):"showSubmenu",Be=ze?Oe:$e,ot=this._getKeyboardNavigationAction(Ue,Be),st=ot();break;default:return super._moveFocus(Ee)}st&&0!==st.length&&this.option("focusedElement",(0,o.cc)(st))}_getItemsNavigationOperation(Ee){let Oe=Ee;return this.option("rtlEnabled")&&(Oe="prevItem"===Ee?"nextItem":"prevItem"),Oe}_getKeyboardNavigationAction(Ee,Oe){let ze=b.lQ;switch(Ee){case"showSubmenu":Oe.hasClass("dx-state-disabled")||(ze=this._showSubmenu.bind(this,Oe));break;case"nextItem":ze=this._nextItem.bind(this,Oe);break;case"prevItem":ze=this._prevItem.bind(this,Oe)}return ze}_clean(){super._clean(),this.option("templatesRenderAsynchronously")&&clearTimeout(this._resizeEventTimer)}_visibilityChanged(Ee){Ee&&(this._menuItemsWidth||this._updateItemsWidthCache(),this._dimensionChanged())}_isAdaptivityEnabled(){return this.option("adaptivityEnabled")&&"horizontal"===this.option("orientation")}_updateItemsWidthCache(){const Ee=this.$element().find("ul").first().children("li").children(".dx-menu-item");this._menuItemsWidth=this._getSummaryItemsSize("width",Ee,!0)}_dimensionChanged(){if(!this._isAdaptivityEnabled())return;const Ee=(0,T.Ot)(this.$element());this._toggleAdaptiveMode(this._menuItemsWidth>Ee)}_init(){super._init(),this._submenus=[]}_initActions(){this._actions={},(0,S.__)(ye,(Ee,Oe)=>{this._actions[Oe]=this._createActionByOption(Oe)})}_initMarkup(){this._visibleSubmenu=null,this.$element().addClass("dx-menu"),super._initMarkup(),this._addCustomCssClass(this.$element()),this.setAria("role","menubar")}_render(){super._render(),this._initAdaptivity()}_isTargetOutOfComponent(Ee){const Oe=0!==(0,P.A)(Ee).closest(".dx-menu").length,ze=0!==(0,P.A)(Ee).closest(".dx-context-menu").length;return!(Oe||ze)}_focusOutHandler(Ee){const{relatedTarget:Oe}=Ee;Oe&&this._isTargetOutOfComponent(Oe)&&this._hideVisibleSubmenu(),super._focusOutHandler(Ee)}_renderHamburgerButton(){return this._hamburger=new u.A((0,P.A)("<div>").addClass("dx-menu-hamburger-button"),{icon:"menu",activeStateEnabled:!1,onClick:this._toggleTreeView.bind(this)}),this._hamburger.$element()}_toggleTreeView(Ee){(0,y.Qd)(Ee)&&(Ee=!this._overlay.option("visible")),this._overlay.option("visible",Ee),Ee&&this._treeView.focus(),this._toggleHamburgerActiveState(Ee)}_toggleHamburgerActiveState(Ee){this._hamburger&&this._hamburger.$element().toggleClass("dx-state-active",Ee)}_toggleAdaptiveMode(Ee){const Oe=this.$element().find(".dx-menu-horizontal"),ze=this.$element().find(`.${z}`);Ee?this._hideVisibleSubmenu():(this._treeView&&this._treeView.collapseAll(),this._overlay&&this._toggleTreeView(Ee)),Oe.toggle(!Ee),ze.toggle(Ee)}_removeAdaptivity(){this._$adaptiveContainer&&(this._toggleAdaptiveMode(!1),this._$adaptiveContainer.remove(),this._$adaptiveContainer=null,this._treeView=null,this._hamburger=null,this._overlay=null)}_treeviewItemClickHandler(Ee){this._actions.onItemClick(Ee),Ee.node.children.length||this._toggleTreeView(!1)}_getAdaptiveOverlayOptions(){const Oe=this.option("rtlEnabled")?"right":"left";return{_ignoreFunctionValueDeprecation:!0,maxHeight:()=>(0,x.J)(this.$element()),deferRendering:!1,shading:!1,animation:!1,hideOnParentScroll:!0,onHidden:()=>{this._toggleHamburgerActiveState(!1)},height:"auto",hideOnOutsideClick:ze=>!(0,P.A)(ze.target).closest(".dx-menu-hamburger-button").length,position:{collision:"flipfit",at:`bottom ${Oe}`,my:`top ${Oe}`,of:this._hamburger.$element()}}}_getTreeViewOptions(){const Ee={};return(0,S.__)(["rtlEnabled","width","accessKey","activeStateEnabled","animation","dataSource","disabled","displayExpr","displayExpr","focusStateEnabled","hint","hoverStateEnabled","itemsExpr","items","itemTemplate","selectedExpr","selectionMode","tabIndex","visible"],(Oe,ze)=>{Ee[ze]=this.option(ze)}),(0,S.__)(["onItemContextMenu","onSelectionChanged","onItemRendered"],(Oe,ze)=>{Ee[ze]=$e=>{this._actions[ze]($e)}}),(0,f.X)(Ee,{dataSource:this.getDataSource(),animationEnabled:!!this.option("animation"),onItemClick:this._treeviewItemClickHandler.bind(this),onItemExpanded:Oe=>{this._overlay.repaint(),this._actions.onSubmenuShown(Oe)},onItemCollapsed:Oe=>{this._overlay.repaint(),this._actions.onSubmenuHidden(Oe)},selectNodesRecursive:!1,selectByClick:this.option("selectByClick"),expandEvent:"click",_supportItemUrl:!0})}_initAdaptivity(){if(!this._isAdaptivityEnabled())return;this._$adaptiveContainer=(0,P.A)("<div>").addClass(z);const Ee=this._renderHamburgerButton();this._treeView=this._createComponent((0,P.A)("<div>"),g.A,this._getTreeViewOptions()),this._overlay=this._createComponent((0,P.A)("<div>"),h.A,this._getAdaptiveOverlayOptions()),this._overlay.$content().append(this._treeView.$element()).addClass(z).addClass(this.option("cssClass")),this._overlay.$wrapper().addClass(ae),this._$adaptiveContainer.append(Ee),this._$adaptiveContainer.append(this._overlay.$element()),this.$element().append(this._$adaptiveContainer),this._updateItemsWidthCache(),this._dimensionChanged()}_getDelay(Ee){const{delay:Oe}=this.option("showFirstSubmenuMode");return(0,y.O9)(Oe)?(0,y.Gv)(Oe)?Oe[Ee]:Oe:Ce[Ee]}_keyboardHandler(Ee){return super._keyboardHandler(Ee,!!this._visibleSubmenu)}_renderContainer(){const Ee=(0,P.A)("<div>");return Ee.appendTo(this.$element()).addClass(this._isMenuHorizontal()?"dx-menu-horizontal":"dx-menu-vertical"),super._renderContainer(Ee)}_renderSubmenuItems(Ee,Oe){const ze=this._createSubmenu(Ee,Oe);return this._submenus.push(ze),this._renderBorderElement(Oe),ze}_getKeyboardListeners(){return super._getKeyboardListeners().concat(this._visibleSubmenu)}_createSubmenu(Ee,Oe){const ze=(0,P.A)("<div>").addClass("dx-context-menu").appendTo(Oe),$e=this._getChildNodes(Ee),Be=this._createComponent(ze,G,(0,f.X)(this._getSubmenuOptions(),{_dataAdapter:this._dataAdapter,_parentKey:Ee.internalFields.key,items:$e,onHoverStart:this._clearTimeouts.bind(this),position:this.getSubmenuPosition(Oe)}));return this._attachSubmenuHandlers(Oe,Be),Be}_getSubmenuOptions(){const Ee=(0,P.A)("<div>"),Oe=this._isMenuHorizontal();return{itemTemplate:this.option("itemTemplate"),target:Ee,orientation:this.option("orientation"),selectionMode:this.option("selectionMode"),cssClass:this.option("cssClass"),selectByClick:this.option("selectByClick"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),showSubmenuMode:this.option("showSubmenuMode"),displayExpr:this.option("displayExpr"),disabledExpr:this.option("disabledExpr"),selectedExpr:this.option("selectedExpr"),itemsExpr:this.option("itemsExpr"),onFocusedItemChanged:ze=>{ze.component.option("visible")&&this.option("focusedElement",ze.component.option("focusedElement"))},onSelectionChanged:this._nestedItemOnSelectionChangedHandler.bind(this),onItemClick:this._nestedItemOnItemClickHandler.bind(this),onItemRendered:this._nestedItemOnItemRenderedHandler.bind(this),onLeftFirstItem:Oe?null:this._moveMainMenuFocus.bind(this,"prevItem"),onLeftLastItem:Oe?null:this._moveMainMenuFocus.bind(this,"nextItem"),onCloseRootSubmenu:this._moveMainMenuFocus.bind(this,Oe?"prevItem":null),onExpandLastSubmenu:Oe?this._moveMainMenuFocus.bind(this,"nextItem"):null}}_getShowFirstSubmenuMode(){if(!this._isDesktopDevice())return"onClick";const Ee=this.option("showFirstSubmenuMode");return(0,y.Gv)(Ee)?Ee.name:Ee}_moveMainMenuFocus(Ee){const Oe=this._getAvailableItems(),ze=Oe.length,$e=Oe.filter(".dx-menu-item-expanded").eq(0);let Be=Oe.index($e);this._hideSubmenu(this._visibleSubmenu),Be+="prevItem"===Ee?-1:1,Be>=ze?Be=0:Be<0&&(Be=ze-1);const Ue=Oe.eq(Be);this.option("focusedElement",(0,o.cc)(Ue))}_nestedItemOnSelectionChangedHandler(Ee){const Oe=Ee.addedItems.length&&Ee.addedItems[0],ze=G.getInstance(Ee.element),{onSelectionChanged:$e}=this._actions;$e(Ee),Oe&&this._clearSelectionInSubmenus(Oe[0],ze),this._clearRootSelection(),this._setOptionWithoutOptionChange("selectedItem",Oe)}_clearSelectionInSubmenus(Ee,Oe){const ze=!arguments.length;(0,S.__)(this._submenus,($e,Be)=>{const Ue=Be._itemContainer(),ot=!Ue.is(Oe&&Oe._itemContainer()),st=Ue.find(`.${this._selectedItemClass()}`);if(ot&&st.length||ze){st.removeClass(this._selectedItemClass());const et=this._getItemData(st);et&&(et.selected=!1),Be._clearSelectedItems()}})}_clearRootSelection(){const Ee=this.$element().find(".dx-menu-items-container").first().children().children().filter(`.${this._selectedItemClass()}`);Ee.length&&(this._getItemData(Ee).selected=!1,Ee.removeClass(this._selectedItemClass()))}_nestedItemOnItemClickHandler(Ee){this._actions.onItemClick(Ee)}_nestedItemOnItemRenderedHandler(Ee){this._actions.onItemRendered(Ee)}_attachSubmenuHandlers(Ee,Oe){const $e=Oe.getOverlayContent().find(".dx-submenu"),Be=(0,a.b4)(c._,`${this.NAME}_submenu`);Oe.option({onShowing:this._submenuOnShowingHandler.bind(this,Ee,Oe),onShown:this._submenuOnShownHandler.bind(this,Ee,Oe),onHiding:this._submenuOnHidingHandler.bind(this,Ee,Oe),onHidden:this._submenuOnHiddenHandler.bind(this,Ee,Oe)}),(0,S.__)($e,(Ue,ot)=>{d.A.off(ot,Be),d.A.on(ot,Be,null,this._submenuMouseLeaveHandler.bind(this,Ee))})}_submenuOnShowingHandler(Ee,Oe,ze){let{rootItem:$e}=ze;const Be=Ee.children(".dx-context-menu-container-border"),Ue=this._getVisibilityChangeEventParams($e,Oe,Ee);this._actions.onSubmenuShowing(Ue),Be.show(),Ee.addClass("dx-menu-item-expanded")}_submenuOnShownHandler(Ee,Oe,ze){let{rootItem:$e}=ze;const Be=this._getVisibilityChangeEventParams($e,Oe,Ee);this._actions.onSubmenuShown(Be)}_submenuOnHidingHandler(Ee,Oe,ze){const $e=Ee.children(".dx-context-menu-container-border"),Be=this._getVisibilityChangeEventParams(ze.rootItem,Oe,Ee,!0);ze.itemData=Be.itemData,ze.rootItem=Be.rootItem,ze.submenuContainer=Be.submenuContainer,ze.submenu=Be.submenu,this._actions.onSubmenuHiding(ze),ze.cancel||(this._visibleSubmenu===Oe&&(this._visibleSubmenu=null),$e.hide(),Ee.removeClass("dx-menu-item-expanded"))}_submenuOnHiddenHandler(Ee,Oe,ze){let{rootItem:$e}=ze;const Be=this._getVisibilityChangeEventParams($e,Oe,Ee,!0);this._actions.onSubmenuHidden(Be)}_getVisibilityChangeEventParams(Ee,Oe,ze,$e){let Be,Ue;if(Ee){const ot=$e?(0,P.A)(Ee).closest(".dx-menu-item")[0]:Ee;Be=this._getItemData(ot),Ue=(0,P.A)(ot).find(".dx-submenu").first()}else{const ot=(0,P.A)(Oe._overlay.content());Be=this._getItemData(ze),Ue=ot.find(".dx-submenu").first()}return{itemData:Be,rootItem:(0,o.cc)(ze),submenuContainer:(0,o.cc)(Ue),submenu:Oe}}_submenuMouseLeaveHandler(Ee,Oe){const ze=(0,P.A)(Oe.relatedTarget).parents(".dx-context-menu")[0],$e=this._getSubmenuByRootElement(Ee).getOverlayContent()[0];this.option("hideSubmenuOnMouseLeave")&&ze!==$e&&(this._clearTimeouts(),setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide")))}_hideSubmenuAfterTimeout(){if(!this._visibleSubmenu)return;const Ee=(0,P.A)(this._visibleSubmenu.$element().context).hasClass("dx-state-hover"),Oe=this._visibleSubmenu.getOverlayContent().find(".dx-state-hover").length;!this._visibleSubmenu.getOverlayContent().get(0).querySelector(":hover")&&!Oe&&!Ee&&this._visibleSubmenu.hide()}_getSubmenuByRootElement(Ee){if(!Ee)return!1;const Oe=Ee.children(".dx-context-menu");return Oe.length&&G.getInstance(Oe)}getSubmenuPosition(Ee){const Oe=this._isMenuHorizontal(),ze=this.option("submenuDirection").toLowerCase(),$e=this.option("rtlEnabled"),Be={collision:"flip",of:Ee,precise:!0};switch(ze){case"leftortop":Be.at="left top",Be.my=Oe?"left bottom":"right top";break;case"rightorbottom":Be.at=Oe?"left bottom":"right top",Be.my="left top";break;default:Oe?(Be.at=$e?"right bottom":"left bottom",Be.my=$e?"right top":"left top"):(Be.at=$e?"left top":"right top",Be.my=$e?"right top":"left top")}return Be}_renderBorderElement(Ee){(0,P.A)("<div>").appendTo(Ee).addClass("dx-context-menu-container-border").hide()}_itemPointerDownHandler(Ee){(0,P.A)(Ee.target).closest(this._itemElements()).hasClass("dx-menu-item-has-submenu")?this.option("focusedElement",null):super._itemPointerDownHandler(Ee)}_hoverStartHandler(Ee){const Oe=(0,a.b4)(s.A.move,this.NAME),ze=this._getItemElementByEventArgs(Ee),$e=this._dataAdapter.getNodeByItem(this._getItemData(ze)),Be=(0,y.O9)(Ee.buttons)&&1===Ee.buttons||!(0,y.O9)(Ee.buttons)&&1===Ee.which;if(!this._isItemDisabled(ze)){if(d.A.off(ze,Oe),!this._hasChildren($e))return void(this._showSubmenuTimer=setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide")));if("onHover"===this._getShowFirstSubmenuMode()&&!Be){const Ue=this._getSubmenuByElement(ze);this._clearTimeouts(),Ue.isOverlayVisible()||(d.A.on(ze,Oe,this._itemMouseMoveHandler.bind(this)),this._showSubmenuTimer=this._getDelay("hide"))}}}_hoverEndHandler(Ee){const Oe=this._getItemElementByEventArgs(Ee),ze=(0,P.A)(Ee.relatedTarget);super._hoverEndHandler(Ee),this._clearTimeouts(),!this._isItemDisabled(Oe)&&(ze.hasClass("dx-context-menu-content-delimiter")||this.option("hideSubmenuOnMouseLeave")&&!ze.hasClass("dx-menu-items-container")&&(this._hideSubmenuTimer=setTimeout(()=>{this._hideSubmenuAfterTimeout()},this._getDelay("hide"))))}_hideVisibleSubmenu(){return!!this._visibleSubmenu&&(this._hideSubmenu(this._visibleSubmenu),!0)}_showSubmenu(Ee){const Oe=this._getSubmenuByElement(Ee);this._visibleSubmenu!==Oe&&this._hideVisibleSubmenu(),Oe&&(this._clearTimeouts(),this.focus(),Oe.show(),this.option("focusedElement",Oe.option("focusedElement"))),this._visibleSubmenu=Oe,this._hoveredRootItem=Ee}_hideSubmenu(Ee){Ee&&Ee.hide(),this._visibleSubmenu===Ee&&(this._visibleSubmenu=null),this._hoveredRootItem=null}_itemMouseMoveHandler(Ee){if(Ee.pointers&&Ee.pointers.length)return;const Oe=(0,P.A)(Ee.currentTarget);(0,y.O9)(this._showSubmenuTimer)&&(this._clearTimeouts(),this._showSubmenuTimer=setTimeout(()=>{const ze=this._getSubmenuByElement(Oe);ze&&!ze.isOverlayVisible()&&this._showSubmenu(Oe)},this._getDelay("show")))}_clearTimeouts(){clearTimeout(this._hideSubmenuTimer),clearTimeout(this._showSubmenuTimer)}_getSubmenuByElement(Ee,Oe){const ze=this._getSubmenuByRootElement(Ee);if(ze)return ze;Oe=Oe??this._getItemData(Ee);const $e=this._dataAdapter.getNodeByItem(Oe);return this._hasChildren($e)&&this._renderSubmenuItems($e,Ee)}_updateSubmenuVisibilityOnClick(Ee){const Oe=Ee.args.length&&Ee.args[0];if(!Oe||this._disabledGetter(Oe.itemData))return;const ze=(0,P.A)(Oe.itemElement),$e=this._getSubmenuByElement(ze,Oe.itemData);if(this._updateSelectedItemOnClick(Ee),this._visibleSubmenu){if(this._visibleSubmenu===$e)return void("onClick"===this.option("showFirstSubmenuMode")&&this._hideSubmenu(this._visibleSubmenu));this._hideSubmenu(this._visibleSubmenu)}$e&&($e.isOverlayVisible()||this._showSubmenu(ze))}_optionChanged(Ee){if(ye.includes(Ee.name))this._initActions();else switch(Ee.name){case"orientation":case"submenuDirection":this._invalidate();break;case"showFirstSubmenuMode":case"hideSubmenuOnMouseLeave":break;case"showSubmenuMode":this._changeSubmenusOption(Ee.name,Ee.value);break;case"adaptivityEnabled":Ee.value?this._initAdaptivity():this._removeAdaptivity();break;case"width":this._isAdaptivityEnabled()&&(this._treeView.option(Ee.name,Ee.value),this._overlay.option(Ee.name,Ee.value)),super._optionChanged(Ee),this._dimensionChanged();break;case"animation":this._isAdaptivityEnabled()&&this._treeView.option("animationEnabled",!!Ee.value),super._optionChanged(Ee);break;default:this._isAdaptivityEnabled()&&(Ee.name===Ee.fullName||"items"===Ee.name)&&this._treeView.option(Ee.fullName,Ee.value),super._optionChanged(Ee)}}_changeSubmenusOption(Ee,Oe){(0,S.__)(this._submenus,(ze,$e)=>{$e.option(Ee,Oe)})}selectItem(Ee){this._hideSubmenu(this._visibleSubmenu),super.selectItem(Ee)}unselectItem(Ee){this._hideSubmenu(this._visibleSubmenu),super.selectItem(Ee)}}(0,W.A)("dxMenu",ge);const xe=ge},3951:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ie});var W=M(4504),o=M(1973),P=M(5973),b=M(9522),f=M(5704),S=M(4859),T=M(6021),y=M(3090),d=M(3012),c=M(1363),s=M(1830),a=M(6790),u=M(9229),h=M(8360),g=M(6067),_=M(2583);const x={move(re,q){(0,W.Cy)(re,{left:q})}},w={moveTo(re,q,Y,Z){_.A.animate(re,{type:"slide",to:{left:q},duration:Y,complete:Z})},complete(re){_.A.stop(re,!0)}},U=re=>+re,K=g.A.inherit({_activeStateUnit:".dx-multiview-item",_supportedKeys(){return(0,y.X)(this.callBase(),{pageUp:S.lQ,pageDown:S.lQ})},_getDefaultOptions(){return(0,y.X)(this.callBase(),{selectedIndex:0,swipeEnabled:!0,animationEnabled:!0,loop:!1,deferRendering:!0,loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===P.A.real().deviceType&&!P.A.isSimulator(),options:{focusStateEnabled:!0}}])},_itemClass:()=>"dx-multiview-item",_itemDataKey:()=>"dxMultiViewItemData",_itemContainer(){return this._$itemContainer},_itemElements(){return this._itemContainer().children(this._itemSelector())},_itemWidth(){return this._itemWidthValue||(this._itemWidthValue=(0,c.RG)(this._$wrapper)),this._itemWidthValue},_clearItemWidthCache(){delete this._itemWidthValue},_itemsCount(){return this.option("items").length},_normalizeIndex(re){const q=this._itemsCount();return re<0&&(re+=q),re>=q&&(re-=q),re},_getRTLSignCorrection(){return this.option("rtlEnabled")?-1:1},_init(){this.callBase.apply(this,arguments);const re=this.$element();re.addClass("dx-multiview"),this._$wrapper=(0,f.A)("<div>").addClass("dx-multiview-wrapper"),this._$wrapper.appendTo(re),this._$itemContainer=(0,f.A)("<div>").addClass("dx-multiview-item-container"),this._$itemContainer.appendTo(this._$wrapper),this.option("loopItemFocus",this.option("loop")),this._findBoundaryIndices(),this._initSwipeable()},_initMarkup(){this._deferredItems=[],this.callBase();const re=this._getSelectedItemIndices();this._updateItemsVisibility(re[0]),this._setElementAria(),this._setItemsAria()},_afterItemElementDeleted(re,q){this.callBase(re,q),this._deferredItems&&this._deferredItems.splice(q.itemIndex,1)},_beforeItemElementInserted(re){this.callBase.apply(this,arguments),this._deferredItems&&this._deferredItems.splice(re.index,0,null)},_executeItemRenderAction(re,q,Y){re=(this.option("items")||[]).indexOf(q),this.callBase(re,q,Y)},_renderItemContent(re){const q=(0,T.cY)(),Y=this,{callBase:Z}=this,Q=(0,T.cY)();return Q.done(()=>{const te=Z.call(Y,re);q.resolve(te)}),this._deferredItems[re.index]=Q,this.option("deferRendering")||Q.resolve(),q.promise()},_render(){this.callBase(),(0,S.zE)(()=>{const re=this._getSelectedItemIndices();this._updateItems(re[0])})},_getElementAria:()=>({role:"group",roledescription:h.A.format("dxMultiView-elementAriaRoleDescription"),label:h.A.format("dxMultiView-elementAriaLabel")}),_setElementAria(){const re=this._getElementAria();this.setAria(re,this.$element())},_setItemsAria(){const re=this._itemElements(),q=this._itemsCount();re.each((Y,Z)=>{const Q=this._getItemAria({itemIndex:Y,itemsCount:q});this.setAria(Q,(0,f.A)(Z))})},_getItemAria(re){let{itemIndex:q,itemsCount:Y}=re;return{role:"group",roledescription:h.A.format("dxMultiView-itemAriaRoleDescription"),label:h.A.format("dxMultiView-itemAriaLabel",q+1,Y)}},_updateItems(re,q){this._updateItemsPosition(re,q),this._updateItemsVisibility(re,q)},_modifyByChanges(){this.callBase.apply(this,arguments);const re=this._getSelectedItemIndices();this._updateItemsVisibility(re[0])},_updateItemsPosition(re,q){const Y=this._itemElements(),Z=(0,s.O9)(q)?-this._animationDirection(q,re):void 0,Q=Y.eq(re);x.move(Q,0),(0,s.O9)(q)&&x.move(Y.eq(q),100*Z+"%")},_updateItemsVisibility(re,q){this._itemElements().each((Z,Q)=>{const te=(0,f.A)(Q),pe=Z!==re&&Z!==q;pe||this._renderSpecificItem(Z),te.toggleClass("dx-multiview-item-hidden",pe),this.setAria("hidden",pe||void 0,te)})},_renderSpecificItem(re){const q=this._itemElements().eq(re),Y=q.find(this._itemContentClass()).length>0;(0,s.O9)(re)&&!Y&&(this._deferredItems[re].resolve(),(0,u.ho)(q))},_refreshItem(re,q){this.callBase(re,q),this._updateItemsVisibility(this.option("selectedIndex"))},_setAriaSelectionAttribute:S.lQ,_updateSelection(re,q){const Y=re[0],Z=q[0];w.complete(this._$itemContainer),this._updateItems(Z,Y);const Q=this._animationDirection(Y,Z);this._animateItemContainer(Q*this._itemWidth(),()=>{x.move(this._$itemContainer,0),this._updateItems(Y),(0,c.RG)(this._$itemContainer)})},_animateItemContainer(re,q){const Y=this.option("animationEnabled")?200:0;w.moveTo(this._$itemContainer,re,Y,q)},_animationDirection(re,q){const Y=(re=>(0,W.x5)(this._$itemContainer).left)(),Z=(q-re)*this._getRTLSignCorrection()*this._getItemFocusLoopSignCorrection();return(0,d._S)(0!==Y?Y:Z)},_getSwipeDisabledState(){return!this.option("swipeEnabled")||this._itemsCount()<=1},_initSwipeable(){this._createComponent(this.$element(),a.A,{disabled:this._getSwipeDisabledState(),elastic:!1,itemSizeFunc:this._itemWidth.bind(this),onStart:re=>this._swipeStartHandler(re.event),onUpdated:re=>this._swipeUpdateHandler(re.event),onEnd:re=>this._swipeEndHandler(re.event)})},_findBoundaryIndices(){const re=this.option("items");let q,Y;re.forEach((Z,Q)=>{Z?.disabled||(q??(q=Q),Y=Q)}),this._boundaryIndices={firstAvailableIndex:q??0,lastAvailableIndex:Y??re.length-1,firstTrueIndex:0,lastTrueIndex:re.length-1}},_swipeStartHandler(re){w.complete(this._$itemContainer);const q=this.option("selectedIndex"),Y=this.option("loop"),{firstAvailableIndex:Z,lastAvailableIndex:Q}=this._boundaryIndices,te=this.option("rtlEnabled");re.maxLeftOffset=U(Y||(te?q>Z:q<Q)),re.maxRightOffset=U(Y||(te?q<Q:q>Z)),this._swipeDirection=null},_swipeUpdateHandler(re){const{offset:q}=re,Y=(0,d._S)(q)*this._getRTLSignCorrection();if(x.move(this._$itemContainer,q*this._itemWidth()),Y!==this._swipeDirection){this._swipeDirection=Y;const Z=this.option("selectedIndex"),Q=this._normalizeIndex(Z-Y);this._updateItems(Z,Q)}},_findNextAvailableIndex(re,q){const{items:Y,loop:Z}=this.option(),{firstAvailableIndex:Q,lastAvailableIndex:te,firstTrueIndex:pe,lastTrueIndex:z}=this._boundaryIndices,oe=[pe,Q].includes(re),ae=[z,te].includes(re);if(Z){if(oe&&q<0)return te;if(ae&&q>0)return Q}for(let ee=re+q;ee>=Q&&ee<=te;ee+=q)if(!Y[ee].disabled)return ee;return re},_swipeEndHandler(re){const q=re.targetOffset*this._getRTLSignCorrection();if(q){const Y=this._findNextAvailableIndex(this.option("selectedIndex"),-q);this.option("selectedIndex",Y);const Z=this.itemElements().filter(".dx-item-selected");this.option("focusStateEnabled")&&this.option("focusedElement",(0,b.cc)(Z))}else this._animateItemContainer(0,S.lQ)},_getItemFocusLoopSignCorrection(){return this._itemFocusLooped?-1:1},_moveFocus(){this.callBase.apply(this,arguments),this._itemFocusLooped=!1},_prevItem(re){const q=this.callBase.apply(this,arguments);return this._itemFocusLooped=q.is(re.last()),q},_nextItem(re){const q=this.callBase.apply(this,arguments);return this._itemFocusLooped=q.is(re.first()),q},_dimensionChanged(){this._clearItemWidthCache()},_visibilityChanged(re){re&&this._dimensionChanged()},_updateSwipeDisabledState(){const re=this._getSwipeDisabledState();a.A.getInstance(this.$element()).option("disabled",re)},_dispose(){delete this._boundaryIndices,this.callBase()},_optionChanged(re){const{value:q}=re;switch(re.name){case"loop":this.option("loopItemFocus",q);break;case"animationEnabled":break;case"swipeEnabled":this._updateSwipeDisabledState();break;case"deferRendering":this._invalidate();break;case"items":this._updateSwipeDisabledState(),this._findBoundaryIndices(),this.callBase(re);break;default:this.callBase(re)}}});(0,o.A)("dxMultiView",K);const ie=K},8992:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(5704),o=M(3090),P=M(1830),b=M(4017),f=M(6110),S=M(1728);const T=(0,f.zk)();let y=null;const d={},_=(C,I)=>{let{toastWidth:L,toastHeight:N,windowHeight:G,windowWidth:k}=I;switch(C){case"top left":return{top:10,left:10};case"top right":return{top:10,right:10};case"bottom left":return{bottom:10,left:10};case"bottom right":return{bottom:10,right:10};case"top center":return{top:10,left:Math.round(k/2-L/2)};case"left center":return{top:Math.round(G/2-N/2),left:10};case"right center":return{top:Math.round(G/2-N/2),right:10};case"center":return{top:Math.round(G/2-N/2),left:Math.round(k/2-L/2)};default:return{bottom:10,left:Math.round(k/2-L/2)}}},x=(C,I,L)=>{const{toastWidth:N,toastHeight:G,windowHeight:k,windowWidth:U}=L;switch(C.replace(/-push|-stack/g,"")){case"up":return{bottom:I.bottom??k-G-I.top,top:"",left:I.left??"",right:I.right??""};case"down":return{top:I.top??k-G-I.bottom,bottom:"",left:I.left??"",right:I.right??""};case"left":return{right:I.right??U-N-I.left,left:"",top:I.top??"",bottom:I.bottom??""};case"right":return{left:I.left??U-N-I.right,right:"",top:I.top??"",bottom:I.bottom??""}}},D=function c(C,I,L){const N=(0,P.Qd)(C)?C:{message:C},G=(0,P.Qd)(I)?I:void 0,k=(0,P.Qd)(I)?void 0:I,{onHidden:U}=N;if(null!=G&&G.position){const{position:B}=G,K=G.direction||(C=>(0,P.Kg)(C)&&C.includes("top")?"down-push":"up-push")(B),J=(0,P.Kg)(B)?B:`${B.top}-${B.left}-${B.bottom}-${B.right}`,{onShowing:ie}=N,re=(C=>d[C]||(C=>{const I=(0,W.A)("<div>").appendTo((0,b.Uq)());return d[C]=I,I})(C))(J);((C,I)=>{const L=`dx-toast-stack dx-toast-stack-${I}-direction`;C.removeAttr("class").addClass(L)})(re,K),(0,o.X)(N,{container:re,_skipContentPositioning:!0,onShowing(q){((C,I,L)=>{const{offsetWidth:N,offsetHeight:G}=C.children().first().get(0),k={toastWidth:N,toastHeight:G,windowHeight:T.innerHeight,windowWidth:T.innerWidth},U=(0,P.Kg)(L)?_(L,k):L,B=x(I,U,k);C.css(B)})(re,K,B),ie?.(q)}})}(0,o.X)(N,{type:k,displayTime:L,onHidden(B){(0,W.A)(B.element).remove(),U?.(B)}}),y=(0,W.A)("<div>").appendTo((0,b.Uq)()),new S.A(y,N).show()}},9810:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Fe});var W=M(1973),o=M(5973),P=M(4859),b=M(3090),f=M(3012),S=M(1830),T=M(4072),y=M(1395),d=M(9293),c=M(1271),s=M(1520),a=M(6054),u=M(5704),h=M(36),g=M(6021),_=M(8360);const w=M(221).A;var D=M(9209),C=M(974),I=M(4451),L=M(3535),N=M(7080);const B="dxNumberBox",K=(0,d.b4)(D.A.up,B),J=(0,d.b4)(D.A.cancel,B),re=N.A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{direction:"up",onChange:null,activeStateEnabled:!0,hoverStateEnabled:!0})},_initMarkup(){this.callBase();const Xe=`dx-numberbox-spin-${this.option("direction")}`;this.$element().addClass("dx-numberbox-spin-button").addClass(Xe),this._spinIcon=(0,u.A)("<div>").addClass(`${Xe}-icon`).appendTo(this.$element())},_render(){this.callBase();const Xe=(0,d.b4)(D.A.down,this.NAME),tt=this.$element();T.A.off(tt,Xe),T.A.on(tt,Xe,this._spinDownHandler.bind(this)),this._spinChangeHandler=this._createActionByOption("onChange")},_spinDownHandler(Xe){Xe.preventDefault(),this._clearTimer(),T.A.on(this.$element(),L.A.name,()=>{this._feedBackDeferred=(0,g.cY)(),(0,I.s2)(this._feedBackDeferred),this._spinChangeHandler({event:Xe}),this._holdTimer=setInterval(this._spinChangeHandler,100,{event:Xe})});const tt=a.A.getDocument();T.A.on(tt,K,this._clearTimer.bind(this)),T.A.on(tt,J,this._clearTimer.bind(this)),this._spinChangeHandler({event:Xe})},_dispose(){this._clearTimer(),this.callBase()},_clearTimer(){T.A.off(this.$element(),L.A.name);const Xe=a.A.getDocument();T.A.off(Xe,K),T.A.off(Xe,J),this._feedBackDeferred&&this._feedBackDeferred.resolve(),this._holdTimer&&clearInterval(this._holdTimer)},_optionChanged(Xe){switch(Xe.name){case"onChange":case"direction":this._invalidate();break;default:this.callBase(Xe)}}});class Q extends C.A{_attachEvents(tt,vt){const{editor:qe}=this,At=(0,d.b4)(D.A.down,qe.NAME),Tt=vt.children(),qt=qe._createAction(wt=>qe._spinButtonsPointerDownHandler(wt));T.A.off(vt,At),T.A.on(vt,At,wt=>qt({event:wt})),re.getInstance(Tt.eq(0)).option("onChange",wt=>qe._spinUpChangeHandler(wt)),re.getInstance(Tt.eq(1)).option("onChange",wt=>qe._spinDownChangeHandler(wt))}_create(){const{editor:tt}=this,vt=(0,u.A)("<div>").addClass("dx-numberbox-spin-container"),qe=(0,u.A)("<div>").appendTo(vt),At=(0,u.A)("<div>").appendTo(vt),Tt=this._getOptions();return this._addToContainer(vt),tt._createComponent(qe,re,(0,b.X)({direction:"up"},Tt)),tt._createComponent(At,re,(0,b.X)({direction:"down"},Tt)),this._legacyRender(tt.$element(),this._isTouchFriendly(),Tt.visible),{instance:vt,$element:vt}}_getOptions(){const{editor:tt}=this;return{visible:this._isVisible(),disabled:tt.option("disabled")}}_isVisible(){const{editor:tt}=this;return super._isVisible()&&tt.option("showSpinButtons")}_isTouchFriendly(){const{editor:tt}=this;return tt.option("showSpinButtons")&&tt.option("useLargeSpinButtons")}_legacyRender(tt,vt,qe){tt.toggleClass("dx-numberbox-spin-touch-friendly",vt),tt.toggleClass("dx-numberbox-spin",qe)}update(){if(super.update()){const{editor:vt,instance:qe}=this,At=vt.$element(),Tt=this._isVisible(),qt=this._isTouchFriendly(),wt=qe.children(),En=re.getInstance(wt.eq(0)),ri=re.getInstance(wt.eq(1)),Tn=this._getOptions();En.option(Tn),ri.option(Tn),this._legacyRender(At,qt,Tt)}}}const te=Math,z=["tab","del","backspace","leftArrow","rightArrow","home","end","enter"],ee=w.inherit({_supportedKeys(){return(0,b.X)(this.callBase(),{upArrow(Xe){(0,d.By)(Xe)||(Xe.preventDefault(),Xe.stopPropagation(),this._spinUpChangeHandler(Xe))},downArrow(Xe){(0,d.By)(Xe)||(Xe.preventDefault(),Xe.stopPropagation(),this._spinDownChangeHandler(Xe))},enter(){}})},_getDefaultOptions(){return(0,b.X)(this.callBase(),{value:0,min:void 0,max:void 0,step:1,showSpinButtons:!1,useLargeSpinButtons:!0,mode:"text",invalidValueMessage:_.A.format("dxNumberBox-invalidValueMessage"),buttons:void 0})},_useTemplates:()=>!1,_getDefaultButtons(){return this.callBase().concat([{name:"spins",Ctor:Q}])},_isSupportInputMode(){const Xe=parseFloat(h.A.version);return h.A.chrome&&Xe>=66||h.A.safari&&Xe>=12},_defaultOptionsRules(){return this.callBase().concat([{device:()=>o.A.real().generic&&!o.A.isSimulator(),options:{useLargeSpinButtons:!1}},{device:function(){return"desktop"!==o.A.real().deviceType&&!this._isSupportInputMode()}.bind(this),options:{mode:"number"}}])},_initMarkup(){this._renderSubmitElement(),this.$element().addClass("dx-numberbox"),this.callBase()},_getDefaultAttributes(){const Xe=this.callBase();return Xe.inputmode="decimal",Xe},_renderContentImpl(){this.option("isValid")&&this._validateValue(this.option("value")),this.setAria("role","spinbutton")},_renderSubmitElement(){this._$submitElement=(0,u.A)("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(Xe){this._getSubmitElement().val((0,P.EG)(Xe))},_getSubmitElement(){return this._$submitElement},_keyPressHandler(Xe){this.callBase(Xe);const tt=(0,d.Pg)(Xe);if(!/[\d.,eE\-+]/.test(tt)){const qe=(0,d.YD)(Xe);return(0,d.By)(Xe)||qe&&z.includes(qe)?void 0:(Xe.preventDefault(),!1)}this._keyPressed=!0},_onMouseWheel(Xe){this._spinValueChange(Xe.delta>0?1:-1,Xe)},_renderValue(){const Xe=this._input().val(),tt=this.option("value");(!Xe.length||Number(Xe)!==tt)&&(this._forceValueRender(),this._toggleEmptinessEventHandler());const vt=(0,S.O9)(tt)?null:_.A.format("dxNumberBox-noDataText");return this.setAria({valuenow:(0,P.YD)(tt,""),valuetext:vt}),this.option("text",this._input().val()),this._updateButtons(),(0,g.cY)().resolve()},_forceValueRender(){const Xe=this.option("value"),tt=Number(Xe),vt=isNaN(tt)?"":this._applyDisplayValueFormatter(Xe);this._renderDisplayText(vt)},_applyDisplayValueFormatter(Xe){return this.option("displayValueFormatter")(Xe)},_renderProps(){this._input().prop({min:this.option("min"),max:this.option("max"),step:this.option("step")}),this.setAria({valuemin:(0,P.YD)(this.option("min"),""),valuemax:(0,P.YD)(this.option("max"),"")})},_spinButtonsPointerDownHandler(){const Xe=this._input();!this.option("useLargeSpinButtons")&&a.A.getActiveElement()!==Xe[0]&&T.A.trigger(Xe,"focus")},_spinUpChangeHandler(Xe){this.option("readOnly")||this._spinValueChange(1,Xe.event||Xe)},_spinDownChangeHandler(Xe){this.option("readOnly")||this._spinValueChange(-1,Xe.event||Xe)},_spinValueChange(Xe,tt){const vt=parseFloat(this.option("step"));if(0===vt)return;let qe=parseFloat(this._normalizeInputValue())||0;qe=this._correctRounding(qe,vt*Xe);const At=this.option("min"),Tt=this.option("max");(0,S.O9)(At)&&(qe=Math.max(At,qe)),(0,S.O9)(Tt)&&(qe=Math.min(Tt,qe)),this._saveValueChangeEvent(tt),this.option("value",qe)},_correctRounding(Xe,tt){const vt=/[,.](.*)/,qe=vt.test(Xe),At=vt.test(tt);if(qe||At){const Tt=qe?vt.exec(Xe)[0].length:0,qt=At?vt.exec(tt)[0].length:0,wt=te.max(Tt,qt);return this._round(Xe+tt,wt)}return Xe+tt},_round(Xe,tt){const vt=10**(tt=tt||0);return Xe*=vt,Math.round(Xe)/vt},_renderValueChangeEvent(){this.callBase();const Xe=(0,d.b4)("focusout","NumberBoxForceValueChange");T.A.off(this.element(),Xe),T.A.on(this.element(),Xe,this._forceRefreshInputValue.bind(this))},_forceRefreshInputValue(){if("number"===this.option("mode"))return;const Xe=this._input(),tt=this._applyDisplayValueFormatter(this.option("value"));Xe.val(null),Xe.val(tt)},_valueChangeEventHandler(Xe){const tt=this._input(),vt=this._normalizeText(),qe=this._parseValue(vt),At="."!==vt&&"-"!==vt;!this._isValueValid()||this._validateValue(qe)?(At&&this.callBase(Xe,isNaN(qe)?null:qe),this._applyValueBoundaries(vt,qe),this.validationRequest.fire({value:qe,editor:this})):tt.val(this._applyDisplayValueFormatter(qe))},_applyValueBoundaries(Xe,tt){const vt=this._isValueIncomplete(Xe),qe=this._isValueInRange(Xe);!vt&&!qe&&null!==tt&&Number(Xe)!==tt&&this._input().val(this._applyDisplayValueFormatter(tt))},_replaceCommaWithPoint:Xe=>Xe.replace(",","."),_inputIsInvalid(){const Xe="number"===this.option("mode"),tt=this._input().get(0).validity;return Xe&&tt&&tt.badInput},_renderDisplayText(Xe){this._inputIsInvalid()||this.callBase(Xe)},_isValueIncomplete:Xe=>/(^-$)|(^-?\d*\.$)|(\d+e-?$)/i.test(Xe),_isValueInRange(Xe){return(0,f.r4)(Xe,this.option("min"),this.option("max"))},_isNumber(Xe){return null!==this._parseValue(Xe)},_validateValue(Xe){const tt=this._normalizeText(),vt=this._isValueValid();let qe=!0;const At=this._isNumber(tt);return isNaN(Number(Xe))&&(qe=!1),!Xe&&vt?qe=!0:!At&&!vt&&(qe=!1),this.option({isValid:qe,validationError:qe?null:{editorSpecific:!0,message:this.option("invalidValueMessage")}}),qe},_normalizeInputValue(){return this._parseValue(this._normalizeText())},_normalizeText(){const Xe=this._input().val().trim();return this._replaceCommaWithPoint(Xe)},_parseValue(Xe){const tt=parseFloat(Xe);return isNaN(tt)?null:(0,f.df)(tt,this.option("min"),this.option("max"))},_clearValue(){this._inputIsInvalid()&&(this._input().val(""),this._validateValue()),this.callBase()},clear(){null===this.option("value")?(this.option("text",""),this._input().length&&this._renderValue()):this.option("value",null)},_optionChanged(Xe){switch(Xe.name){case"value":this._validateValue(Xe.value),this._setSubmitValue(Xe.value),this.callBase(Xe),this._resumeValueChangeAction();break;case"step":this._renderProps();break;case"min":case"max":this._renderProps(),this.option("value",this._parseValue(this.option("value")));break;case"showSpinButtons":case"useLargeSpinButtons":this._updateButtons(["spins"]);break;case"invalidValueMessage":break;default:this.callBase(Xe)}}}),he=function(Xe){let tt=0,vt=0;for(let qe=0;qe<Xe.length;++qe)if("'"===Xe[qe]&&tt++,"."===Xe[qe]&&(++vt,tt%2==0))return{occurrence:vt,index:qe};return{occurrence:1,index:-1}},de=function(Xe,tt,vt){let qe=-1;for(;vt--&&qe++<Xe.length;)qe=Xe.indexOf(tt,qe);return qe},ue=function(Xe,tt){return-1===tt?[Xe]:[Xe.slice(0,tt),Xe.slice(tt+1)]},ve=function(Xe,tt){if("string"==typeof tt){const vt=tt.split(";"),qe=s.A.getSign(Xe,tt);vt[1]=vt[1]||`-${vt[0]}`,tt=(tt=vt[qe<0?1:0]).replace(/'([^']*)'/g,En=>En.split("").map(()=>" ").join("").substr(2));const Tt=/^[^#0.,]*/.exec(tt)[0].length,qt=/[^#0.,]*$/.exec(tt)[0].length;return{start:Tt,end:Xe.length-qt}}return{start:0,end:Xe.length}},le=function(Xe,tt){const vt=s.A.getDecimalSeparator(),qe=new RegExp(`[^0-9${(0,P.Nt)(vt)}]`,"g");return tt.slice(0,Xe).replace(qe,"").length},Ce=function(Xe){return Xe.split("").reverse().join("")},ye=function(Xe,tt){if(!Xe)return-1;const vt=/[0-9]/g;let qe=1,At=null,Tt=vt.exec(tt);for(;Tt;){if(At=Tt.index,qe>=Xe)return At;qe++,Tt=vt.exec(tt)}return null===At?tt.length:At},fe=function(Xe,tt){return void 0===Xe.start&&(Xe={start:Xe,end:Xe}),{start:Xe.start+tt,end:Xe.end+tt}};function Oe(Xe,tt,vt){Xe=fe(Xe,0);const qe=ve(tt,vt);return{start:(0,f.df)(Xe.start,qe.start,qe.end),end:(0,f.df)(Xe.end,qe.start,qe.end)}}const Se=ee.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{useMaskBehavior:!0,format:null})},_isDeleteKey:Xe=>"del"===Xe,_supportedKeys(){return this._useMaskBehavior()?(0,b.X)(this.callBase(),{minus:this._revertSign.bind(this),del:this._removeHandler.bind(this),backspace:this._removeHandler.bind(this),leftArrow:this._arrowHandler.bind(this,-1),rightArrow:this._arrowHandler.bind(this,1),home:this._moveCaretToBoundaryEventHandler.bind(this,1),enter:this._updateFormattedValue.bind(this),end:this._moveCaretToBoundaryEventHandler.bind(this,-1)}):this.callBase()},_getTextSeparatorIndex(Xe){const tt=s.A.getDecimalSeparator(),vt=he(this.option("format")).occurrence;return de(Xe,tt,vt)},_focusInHandler(Xe){this._preventNestedFocusEvent(Xe)||(this.clearCaretTimeout(),this._caretTimeout=setTimeout(()=>{this._caretTimeout=void 0;const tt=this._caret();if(tt.start===tt.end&&this._useMaskBehavior()){const vt=this._getInputVal(),qe=this._getTextSeparatorIndex(vt);qe>=0?this._caret({start:qe,end:qe}):this._moveCaretToBoundaryEventHandler(-1,Xe)}},0)),this.callBase(Xe)},_focusOutHandler(Xe){const tt=!this._preventNestedFocusEvent(Xe);tt&&(this._focusOutOccurs=!0,this._useMaskBehavior()&&this._updateFormattedValue()),this.callBase(Xe),tt&&(this._focusOutOccurs=!1)},_hasValueBeenChanged(Xe){const tt=this._getFormatPattern(),vt=this.option("value");return(this._format(vt,tt)||"")!==Xe},_updateFormattedValue(){const Xe=this._getInputVal();this._hasValueBeenChanged(Xe)&&(this._updateParsedValue(),this._adjustParsedValue(),this._setTextByParsedValue(),this._parsedValue!==this.option("value")&&T.A.trigger(this._input(),"change"))},_arrowHandler(Xe,tt){if(!this._useMaskBehavior())return;const vt=this._getInputVal(),qe=this._getFormatPattern();let At=fe(this._caret(),Xe);(function(Xe,tt,vt){const qe=Oe(Xe=fe(Xe,0),tt,vt);return Xe.start>=qe.start&&Xe.end<=qe.end})(At,vt,qe)||(At=1===Xe?At.end:At.start,tt.preventDefault(),this._caret(Oe(At,vt,qe)))},_moveCaretToBoundary(Xe){const tt=ve(this._getInputVal(),this._getFormatPattern()),vt=fe(1===Xe?tt.start:tt.end,0);this._caret(vt)},_moveCaretToBoundaryEventHandler(Xe,tt){!this._useMaskBehavior()||tt&&tt.shiftKey||(this._moveCaretToBoundary(Xe),tt&&tt.preventDefault())},_shouldMoveCaret(Xe,tt){const vt=s.A.getDecimalSeparator(),qe=Xe.charAt(tt.end)===vt;return(this._lastKey===vt||"."===this._lastKey||","===this._lastKey)&&qe},_getInputVal(){return s.A.convertDigits(this._input().val(),!0)},_keyboardHandler(Xe){if(this.clearCaretTimeout(),this._lastKey=s.A.convertDigits((0,d.Pg)(Xe),!0),this._lastKeyName=(0,d.YD)(Xe),!this._shouldHandleKey(Xe.originalEvent))return this.callBase(Xe);const tt=this._getInputVal(),vt=this._caret();let qe;qe="minus"===this._lastKeyName?"":110===Xe.which?s.A.getDecimalSeparator():this._lastKey;const At=this._tryParse(tt,vt,qe);return this._shouldMoveCaret(tt,vt)&&(this._moveCaret(1),Xe.originalEvent.preventDefault()),void 0===At?"minus"!==this._lastKeyName&&Xe.originalEvent.preventDefault():this._parsedValue=At,this.callBase(Xe)},_keyPressHandler(Xe){this._useMaskBehavior()||this.callBase(Xe)},_removeHandler(Xe){const tt=this._caret(),vt=this._getInputVal();let{start:qe}=tt,{end:At}=tt;this._lastKey=(0,d.Pg)(Xe),this._lastKeyName=(0,d.YD)(Xe);const Tt=this._isDeleteKey(this._lastKeyName),qt=!Tt;if(qe===At){if(!(qt&&qe>0||Tt&&qe<vt.length))return void Xe.preventDefault();Tt&&At++,qt&&qe--}const wt=vt.slice(qe,At);if(this._isStub(wt))return this._moveCaret(Tt?1:-1),(this._parsedValue<0||1/this._parsedValue==-1/0)&&(this._revertSign(Xe),this._setTextByParsedValue(),this.option("valueChangeEvent").split(" ").includes("input")&&T.A.trigger(this._input(),"input")),void Xe.preventDefault();const En=s.A.getDecimalSeparator();if(wt===En){const Tn=vt.indexOf(En);return void(this._isNonStubAfter(Tn+1)&&(this._moveCaret(Tt?1:-1),Xe.preventDefault()))}if(At-qe<vt.length&&this._replaceSelectedText(vt,{start:qe,end:At},"").search(/[0-9]/)<0&&this._isValueInRange(0))return void(this._parsedValue=this._parsedValue<0||1/this._parsedValue==-1/0?-0:0);const ri=this._tryParse(vt,{start:qe,end:At},"");void 0===ri?Xe.preventDefault():this._parsedValue=ri},_isPercentFormat(){return-1!==this._getFormatPattern().replace(/'[^']+'/g,"").indexOf("%")},_parse(Xe,tt){const vt=this.option("format"),qe=(0,S.Tn)(vt.parser),At=qe?vt.parser:s.A.parse;let Tt=0;if(!qe){const qt=he(tt).index,wt=this._getTextSeparatorIndex(Xe),En=-1!==qt?qt:tt.length,ri=-1!==wt?wt:Xe.length;ri>En&&-1===tt.indexOf("#")&&(Tt=ri-En)}return At(Xe=Xe.substr(Tt),tt)},_format(Xe,tt){const vt=this.option("format"),qe=vt?.formatter||vt,At=(0,S.Tn)(qe)?qe:s.A.format;return null===Xe?"":At(Xe,tt)},_getFormatPattern(){return this._currentFormat||this._updateFormat(),this._currentFormat},_updateFormat(){const Xe=this.option("format"),tt=(0,S.Tn)(Xe?.parser),vt=(0,S.Kg)(Xe)&&(Xe.includes("0")||Xe.includes("#"));this._currentFormat=tt||vt||"exponential"===Xe||"exponential"===Xe?.type?Xe:(0,c.g)(Tt=>{const qt=this._format(Tt,Xe);return s.A.convertDigits(qt,!0)})},_getFormatForSign(Xe){const tt=this._getFormatPattern();if((0,S.Kg)(tt)){const qe=tt.split(";"),At=s.A.getSign(Xe,tt);return qe[1]=qe[1]||`-${qe[0]}`,At<0?qe[1]:qe[0]}return s.A.getSign(Xe)<0?"-":""},_removeStubs(Xe,tt){const vt=this._getFormatForSign(Xe),qe=s.A.getThousandsSeparator(),At=this._getStubs(vt);let Tt=Xe;if(At.length){const qt=At[0],wt=new RegExp(`(${(0,P.Nt)(At[1]||"")})$`,"g"),En=new RegExp(`[-${(0,P.Nt)(tt?"":qe)}]`,"g");Tt=Tt.replace(qt,"").replace(wt,"").replace(En,"")}return Tt},_getStubs(Xe){const tt=/[^']([#0.,]+)/g.exec(Xe),vt=tt&&tt[0].trim();return Xe.split(vt).map(qe=>qe.replace(/'/g,""))},_truncateToPrecision(Xe,tt){if((0,S.O9)(Xe)){const vt=Xe.toString(),qe=vt.indexOf(".");if(vt&&qe>-1){const At=parseFloat(vt.substr(0,qe+tt+1));return isNaN(At)?Xe:At}}return Xe},_tryParse(Xe,tt,vt){const qe=tt.start!==tt.end,At=qe&&0===tt.start&&tt.end===Xe.length,Tt=s.A.getDecimalSeparator();if(At&&vt===Tt)return 0;const qt=this._replaceSelectedText(Xe,tt,vt),wt=this._getFormatPattern();let En=this._getParsedValue(qt,wt);const ri=!wt.parser&&this._getPrecisionLimits(qt).max,Jn=vt===Tt&&0===ri,wi=!qe&&!(En!==this._parsedValue)&&"-"!==vt&&this._isStub(vt);return Jn||wi||(""===this._removeStubs(qt)&&(En=Math.abs(0*this._parsedValue)),isNaN(En))?void 0:(En=ri?this._truncateToPrecision(null===En?this._parsedValue:En,ri):En,!wt.parser&&this._isPercentFormat()?function(Xe,tt){return Xe&&(0,f.Ai)(Xe/100,tt)}(En,ri):En)},_getParsedValue(Xe,tt){const vt=s.A.getSign(Xe,tt?.formatter||tt),qe=this._removeStubs(Xe,!0),At=this._parse(qe,tt),Tt=At<0?-1:1;return(0,S.kf)(At)&&vt!==Tt?vt*At:At},_isValueIncomplete(Xe){if(!this._useMaskBehavior())return this.callBase(Xe);const tt=this._caret(),vt=s.A.getDecimalSeparator(),qe=this._getTextSeparatorIndex(Xe),At=qe>=0&&qe<tt.start,Tt=this._removeStubs(Xe,!0).split(vt);if(!At||2!==Tt.length)return!1;const qt=Tt[1].length,En=!!this._getFormatPattern().parser,ri=!En&&this._getPrecisionLimits(this._getFormatPattern(),Xe),Tn=!!En||(0,f.r4)(qt,ri.min,ri.max),Jn="0"===Tt[1].charAt(qt-1);return Tn&&(Jn||!qt)},_isValueInRange(Xe){const tt=(0,P.YD)(this.option("min"),-1/0),vt=(0,P.YD)(this.option("max"),1/0);return(0,f.r4)(Xe,tt,vt)},_setInputText(Xe){const tt=s.A.convertDigits(Xe,!0),vt=function(Xe,tt,vt,qe){vt=fe(vt,0);const At=s.A.getDecimalSeparator(),Tt=function Te(Xe){return 1===Xe.length&&!!Xe.match(/^[,.][0-9]*$/g)}(Xe),qt=he(qe).occurrence,wt=Tt?0:de(Xe,At,qt),En=de(tt,At,qt),ri=ue(Xe,wt),Tn=ue(tt,En);if(-1!==wt&&vt.start>wt){const cn=le(vt.start-wt-1,ri[1]);return Oe(Tn[1]?En+1+ye(cn,Tn[1])+1:tt.length,tt,qe)}const wi=function(Xe){return Xe.replace(/[^0-9e]+$/,"")}(Tn[0]),gi=le(ri[0].length-vt.start,Ce(ri[0])),Ai=ye(gi,Ce(wi));return Oe(wi.length-(Ai+1),tt,qe)}(this._getInputVal(),tt,this._caret(),this._getFormatPattern());this._input().val(Xe),this._toggleEmptinessEventHandler(),this._formattedValue=Xe,this._focusOutOccurs||this._caret(vt)},_useMaskBehavior(){return!!this.option("format")&&this.option("useMaskBehavior")},_renderInputType(){const Xe="number"===this.option("mode"),tt="desktop"===o.A.real().deviceType;this._useMaskBehavior()&&Xe?this._setInputType(tt||this._isSupportInputMode()?"text":"tel"):this.callBase()},_isChar:Xe=>(0,S.Kg)(Xe)&&1===Xe.length,_moveCaret(Xe){if(!Xe)return;const vt=Oe(fe(this._caret(),Xe),this._getInputVal(),this._getFormatPattern());this._caret(vt)},_shouldHandleKey(Xe){const tt=(0,d.YD)(Xe),vt=(0,d.By)(Xe)||Xe.altKey||Xe.shiftKey||!this._isChar(tt),qe="minus"===tt;return this._useMaskBehavior()&&!vt&&!qe},_renderInput(){this.callBase(),this._renderFormatter()},_renderFormatter(){this._clearCache(),this._detachFormatterEvents(),this._useMaskBehavior()&&this._attachFormatterEvents()},_detachFormatterEvents(){T.A.off(this._input(),".dxNumberFormatter")},_isInputFromPaste(Xe){const tt=Xe.originalEvent&&Xe.originalEvent.inputType;return(0,S.O9)(tt)?"insertFromPaste"===tt:this._isValuePasted},_attachFormatterEvents(){const Xe=this._input();T.A.on(Xe,(0,d.b4)("input","dxNumberFormatter"),tt=>{this._formatValue(tt),this._isValuePasted=!1}),T.A.on(Xe,(0,d.b4)("dxclick","dxNumberFormatter"),()=>{this._caretTimeout||(this._caretTimeout=setTimeout(()=>{this._caretTimeout=void 0,this._caret(Oe(this._caret(),this._getInputVal(),this._getFormatPattern()))},0))}),T.A.on(Xe,y.U,()=>{this.clearCaretTimeout()})},clearCaretTimeout(){clearTimeout(this._caretTimeout),this._caretTimeout=void 0},_forceRefreshInputValue(){if(!this._useMaskBehavior())return this.callBase()},_isNonStubAfter(Xe){const tt=this._getInputVal().slice(Xe);return tt&&!this._isStub(tt,!0)},_isStub(Xe,tt){const qe=`^[^0-9${(0,P.Nt)(s.A.getDecimalSeparator())}]+$`;return new RegExp(qe,"g").test(Xe)&&(tt||this._isChar(Xe))},_parseValue(Xe){return this._useMaskBehavior()?this._parsedValue:this.callBase(Xe)},_getPrecisionLimits(Xe){const tt=this._getFormatForSign(Xe),vt=he(tt).index,qe=(ue(tt,vt)[1]||"").replace(/[^#0]/g,"");return{min:qe.replace(/^(0*)#*/,"$1").length,max:qe.length}},_revertSign(Xe){if(!this._useMaskBehavior())return;const tt=this._caret();if(tt.start!==tt.end){if("minus"===(0,d.YD)(Xe))return void this._applyRevertedSign(Xe,tt,!0);this._caret(Oe(0,this._getInputVal(),this._getFormatPattern()))}this._applyRevertedSign(Xe,tt)},_applyRevertedSign(Xe,tt,vt){const qe=-1*(0,P.YD)(this._parsedValue,null);if((this._isValueInRange(qe)||0===qe)&&(this._parsedValue=qe,vt)){const At=this._getFormatPattern(),Tt=this._getInputVal();this._setTextByParsedValue(),Xe.preventDefault();const qt=this._getInputVal(),wt=function(Xe,tt,vt){const qe=ve(Xe,vt);return ve(tt,vt).start-qe.start}(Tt,qt,At),En=Oe(tt=fe(tt,wt),qt,At);this._caret(En)}},_removeMinusFromText(Xe,tt){return"minus"===this._lastKeyName&&"-"===Xe.charAt(tt.start-1)?this._replaceSelectedText(Xe,{start:tt.start-1,end:tt.start},""):Xe},_setTextByParsedValue(){const Xe=this._getFormatPattern(),tt=this._parseValue(),vt=this._format(tt,Xe)||"";this._setInputText(vt)},_formatValue(Xe){let tt=this._getInputVal();const vt=this._caret(),qe=this._removeMinusFromText(tt,vt),At=qe!==tt;if(tt=qe,!this._isInputFromPaste(Xe)&&this._isValueIncomplete(qe))return this._formattedValue=tt,void(At&&this._setTextByParsedValue());if(s.A.convertDigits(this._formattedValue,!0)!==tt){const qt=this._tryParse(tt,vt,"");(0,S.O9)(qt)&&(this._parsedValue=qt)}this._setTextByParsedValue()},_renderDisplayText(){this._useMaskBehavior()?this._toggleEmptinessEventHandler():this.callBase.apply(this,arguments)},_renderValue(){return this._useMaskBehavior()&&(this._parsedValue=this.option("value"),this._setTextByParsedValue()),this.callBase()},_updateParsedValue(){const Xe=this._getInputVal();this._parsedValue=this._tryParse(Xe,this._caret())},_adjustParsedValue(){if(!this._useMaskBehavior())return;const tt=this._removeStubs(this._getInputVal())?this._parseValue():null;this._parsedValue=(0,S.kf)(tt)?(0,f.df)(tt,this.option("min"),this.option("max")):tt},_valueChangeEventHandler(Xe){if(!this._useMaskBehavior())return this.callBase(Xe);const tt=this._caret();this._saveValueChangeEvent(Xe),this._lastKey=null,this._lastKeyName=null,this._updateParsedValue(),this._adjustParsedValue(),this.option("value",this._parsedValue),tt&&this._caret(tt)},_optionChanged(Xe){switch(Xe.name){case"format":case"useMaskBehavior":this._renderInputType(),this._updateFormat(),this._renderFormatter(),this._renderValue(),this._refreshValueChangeEvent(),this._refreshEvents();break;case"min":case"max":this._adjustParsedValue(),this.callBase(Xe);break;default:this.callBase(Xe)}},_clearCache(){delete this._formattedValue,delete this._lastKey,delete this._lastKeyName,delete this._parsedValue,delete this._focusOutOccurs,clearTimeout(this._caretTimeout),delete this._caretTimeout},_clean(){this._clearCache(),this.callBase()}});(0,W.A)("dxNumberBox",Se);const Fe=Se},3949:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Ce});var W=M(2583),o=M(1973),P=M(5973),b=M(6054),f=M(9522),S=M(7251),T=M(5704),y=M(8412),d=M(36),c=M(4859),s=M(6021),a=M(1832),u=M(3090),h=M(2660),g=M(2720),_=M(1363),x=M(1830),w=M(4017),D=M(6110),C=M(4072),I=M(8664),L=M(9209),N=M(1294),G=M(9293),k=M(9229);const U=function(){let ye=[];return{add:function(ge){ye.includes(ge)||ye.push(ge)},remove:function(ge){const fe=ye.indexOf(ge);-1!==fe&&ye.splice(fe,1)},fire:function(){const ge=ye.pop(),fe=!!ge;return fe&&ge(),fe},hasCallback:function(){return ye.length>0}}}();var B=M(402),K=M(127),J=M(7080),ie=M(5417),re=M(3183);const q=g.A.add,Y=(0,D.zk)(),Z=w.WV,de=[];q(()=>{C.A.subscribeGlobal(b.A.getDocument(),L.A.down,ye=>{for(let ge=de.length-1;ge>=0;ge--)if(!de[ge]._proxiedDocumentDownHandler(ye))return})});const ve=J.A.inherit({_supportedKeys(){return(0,u.X)(this.callBase(),{escape(){this.hide()}})},_getDefaultOptions(){return(0,u.X)(this.callBase(),{activeStateEnabled:!1,visible:!1,deferRendering:!0,shading:!0,shadingColor:"",wrapperAttr:{},position:(0,u.X)({},ie.g.center),width:"80vw",minWidth:null,maxWidth:null,height:"80vh",minHeight:null,maxHeight:null,animation:{show:{type:"pop",duration:300,from:{scale:.55}},hide:{type:"pop",duration:300,from:{opacity:1,scale:1},to:{opacity:0,scale:.55}}},closeOnOutsideClick:!1,hideOnOutsideClick:!1,_ignorePreventScrollEventsDeprecation:!1,onShowing:null,onShown:null,onHiding:null,onHidden:null,contentTemplate:"content",innerOverlay:!1,restorePosition:!0,container:void 0,visualContainer:void 0,hideTopOverlayHandler:()=>{this.hide()},hideOnParentScroll:!1,preventScrollEvents:!0,onPositioned:null,propagateOutsideClick:!1,ignoreChildEvents:!0,_checkParentVisibility:!0,_hideOnParentScrollTarget:void 0,_fixWrapperPosition:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>!(0,D.Vd)(),options:{width:null,height:null,animation:null,_checkParentVisibility:!1}}])},_setOptionsByReference(){this.callBase(),(0,u.X)(this._optionsByReference,{animation:!0})},$wrapper(){return this._$wrapper},_eventBindingTarget(){return this._$content},_setDeprecatedOptions(){this.callBase(),(0,u.X)(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.1",alias:"hideOnOutsideClick"}})},ctor(ye,ge){this.callBase(ye,ge),ge&&"preventScrollEvents"in ge&&!ge._ignorePreventScrollEventsDeprecation&&this._logDeprecatedPreventScrollEventsInfo()},_logDeprecatedPreventScrollEventsInfo(){this._logDeprecatedOptionWarning("preventScrollEvents",{since:"23.1",message:"If you enable this option, end-users may experience scrolling issues."})},_init(){this.callBase(),this._initActions(),this._initHideOnOutsideClickHandler(),this._initTabTerminatorHandler(),this._customWrapperClass=null,this._$wrapper=(0,T.A)("<div>").addClass("dx-overlay-wrapper"),this._$content=(0,T.A)("<div>").addClass("dx-overlay-content"),this._initInnerOverlayClass(),this.$element().addClass("dx-overlay"),this._$wrapper.attr("data-bind","dxControlsDescendantBindings: true"),this._toggleViewPortSubscription(!0),this._initHideTopOverlayHandler(this.option("hideTopOverlayHandler")),this._parentsScrollSubscriptionInfo={handler:ge=>{this._hideOnParentsScrollHandler(ge)}},this.warnPositionAsFunction()},warnPositionAsFunction(){(0,x.Tn)(this.option("position"))&&S.A.log("W0018")},_initInnerOverlayClass(){this._$content.toggleClass("dx-inner-overlay",this.option("innerOverlay"))},_initHideTopOverlayHandler(ye){this._hideTopOverlayHandler=ye},_getActionsList:()=>["onShowing","onShown","onHiding","onHidden","onPositioned","onVisualPositionChanged"],_initActions(){this._actions={};const ye=this._getActionsList();(0,h.__)(ye,(ge,fe)=>{this._actions[fe]=this._createActionByOption(fe,{excludeValidators:["disabled","readOnly"]})||c.lQ})},_initHideOnOutsideClickHandler(){var ye=this;this._proxiedDocumentDownHandler=function(){return ye._documentDownHandler(...arguments)}},_initMarkup(){this.callBase(),this._renderWrapperAttributes(),this._initPositionController()},_documentDownHandler(ye){this._showAnimationProcessing&&this._stopAnimation();const ge=(0,T.A)(Y.document).is(ye.target)||(0,a.gR)(Y.document,ye.target),fe=(0,T.A)(ye.target).closest(".dx-inner-overlay").length;return ge&&!fe&&!(this._$content.is(ye.target)||(0,a.gR)(this._$content.get(0),ye.target))&&this._shouldHideOnOutsideClick(ye)&&this._outsideClickHandler(ye),this.option("propagateOutsideClick")},_shouldHideOnOutsideClick(ye){const{hideOnOutsideClick:ge}=this.option();return(0,x.Tn)(ge)?ge(ye):ge},_outsideClickHandler(ye){this.option("shading")&&ye.preventDefault(),this.hide()},_getAnonymousTemplateName:()=>"content",_initTemplates(){this._templateManager.addDefaultTemplates({content:new y.A}),this.callBase()},_isTopOverlay(){const ye=this._overlayStack();for(let ge=ye.length-1;ge>=0;ge--){const fe=ye[ge]._findTabbableBounds();if(fe.first||fe.last)return ye[ge]===this}return!1},_overlayStack:()=>de,_zIndexInitValue:()=>ve.baseZIndex(),_toggleViewPortSubscription(ye){var ge=this;Z.remove(this._viewPortChangeHandle),ye&&(this._viewPortChangeHandle=function(){ge._viewPortChangeHandler(...arguments)},Z.add(this._viewPortChangeHandle))},_viewPortChangeHandler(){this._positionController.updateContainer(this.option("container")),this._refresh()},_renderWrapperAttributes(){const{wrapperAttr:ye}=this.option(),ge=(0,u.X)({},ye),fe=ge.class;delete ge.class,this.$wrapper().attr(ge).removeClass(this._customWrapperClass).addClass(fe),this._customWrapperClass=fe},_renderVisibilityAnimate(ye){return this._stopAnimation(),ye?this._show():this._hide()},_getAnimationConfig(){return this._getOptionValue("animation",this)},_toggleBodyScroll:c.lQ,_animateShowing(){var ye=this;const ge=this._getAnimationConfig()??{},fe=this._normalizeAnimation(ge.show,"to"),xe=fe?.start??c.lQ,Te=fe?.complete??c.lQ;this._animate(fe,function(){if(!ye._isAnimationPaused){ye.option("focusStateEnabled")&&C.A.trigger(ye._focusTarget(),"focus");for(var Ee=arguments.length,Oe=new Array(Ee),ze=0;ze<Ee;ze++)Oe[ze]=arguments[ze];Te.call(ye,...Oe),ye._showAnimationProcessing=!1,ye._isHidden=!1,ye._actions.onShown(),ye._toggleSafariScrolling(),ye._showingDeferred.resolve()}},function(){if(!ye._isAnimationPaused){for(var Ee=arguments.length,Oe=new Array(Ee),ze=0;ze<Ee;ze++)Oe[ze]=arguments[ze];xe.call(ye,...Oe),ye._showAnimationProcessing=!0}})},_processShowingHidingCancel(ye,ge,fe){(0,x.yL)(ye)?ye.then(xe=>{xe?fe():ge()}).catch(()=>ge()):ye?fe():ge()},_show(){if(this._showingDeferred=(0,s.cY)(),this._parentHidden=this._isParentHidden(),this._showingDeferred.done(()=>{delete this._parentHidden}),this._parentHidden)return this._isHidden=!0,this._showingDeferred.resolve();if(this._currentVisible)return(0,s.cY)().resolve().promise();if(this._currentVisible=!0,this._isHidingActionCanceled)delete this._isHidingActionCanceled,this._showingDeferred.reject();else{const ye=()=>{this._stopAnimation(),this._toggleBodyScroll(this.option("enableBodyScroll")),this._toggleVisibility(!0),this._$content.css("visibility","hidden"),this._$content.toggleClass("dx-state-invisible",!1),this._updateZIndexStackPosition(!0),this._positionController.openingHandled(),this._renderContent();const ge={cancel:!1};this._actions.onShowing(ge),this._processShowingHidingCancel(ge.cancel,()=>{this._$content.css("visibility",""),this._renderVisibility(!0),this._animateShowing()},()=>{this._toggleVisibility(!1),this._$content.css("visibility",""),this._$content.toggleClass("dx-state-invisible",!0),this._isShowingActionCanceled=!0,this._moveFromContainer(),this._toggleBodyScroll(!0),this.option("visible",!1),this._showingDeferred.resolve()})};this.option("templatesRenderAsynchronously")?(this._stopShowTimer(),this._asyncShowTimeout=setTimeout(ye)):ye()}return this._showingDeferred.promise()},_normalizeAnimation(ye,ge){return ye&&(ye=(0,u.X)({type:"slide",skipElementInitialStyles:!0},ye),(0,x.Gv)(ye[ge])&&(0,u.X)(ye[ge],{position:this._positionController.position})),ye},_animateHiding(){var ye=this;const ge=this._getAnimationConfig()??{},fe=this._normalizeAnimation(ge.hide,"from"),xe=fe?.start??c.lQ,Te=fe?.complete??c.lQ;this._animate(fe,function(){var Ee;ye._$content.css("pointerEvents",""),ye._renderVisibility(!1);for(var Oe=arguments.length,ze=new Array(Oe),$e=0;$e<Oe;$e++)ze[$e]=arguments[$e];Te.call(ye,...ze),ye._hideAnimationProcessing=!1,null===(Ee=ye._actions)||void 0===Ee||Ee.onHidden(),ye._hidingDeferred.resolve()},function(){ye._$content.css("pointerEvents","none");for(var Ee=arguments.length,Oe=new Array(Ee),ze=0;ze<Ee;ze++)Oe[ze]=arguments[ze];xe.call(ye,...Oe),ye._hideAnimationProcessing=!0})},_hide(){if(!this._currentVisible)return(0,s.cY)().resolve().promise();this._currentVisible=!1,this._hidingDeferred=(0,s.cY)();const ye={cancel:!1};return this._isShowingActionCanceled?(delete this._isShowingActionCanceled,this._hidingDeferred.reject()):(this._actions.onHiding(ye),this._toggleSafariScrolling(),this._toggleBodyScroll(!0),this._processShowingHidingCancel(ye.cancel,()=>{this._forceFocusLost(),this._toggleShading(!1),this._toggleSubscriptions(!1),this._stopShowTimer(),this._animateHiding()},()=>{this._isHidingActionCanceled=!0,this._toggleBodyScroll(this.option("enableBodyScroll")),this.option("visible",!0),this._hidingDeferred.resolve()})),this._hidingDeferred.promise()},_forceFocusLost(){const ye=b.A.getActiveElement();this._$content.find(ye).length&&(0,a.GX)()},_animate(ye,ge,fe){ye?W.A.animate(this._$content,(0,u.X)({},ye,{start:fe=fe||ye.start||c.lQ,complete:ge})):ge()},_stopAnimation(){W.A.stop(this._$content,!0)},_renderVisibility(ye){ye&&this._isParentHidden()||(this._currentVisible=ye,this._stopAnimation(),ye||(0,k.EH)(this._$content),ye?(this._checkContainerExists(),this._moveToContainer(),this._renderGeometry(),(0,k.I9)(this._$content),(0,k.ho)(this._$content)):(this._toggleVisibility(ye),this._$content.toggleClass("dx-state-invisible",!ye),this._updateZIndexStackPosition(ye),this._moveFromContainer()),this._toggleShading(ye),this._toggleSubscriptions(ye))},_updateZIndexStackPosition(ye){const ge=this._overlayStack(),fe=ge.indexOf(this);ye?(-1===fe&&(this._zIndex=re.vt(this._zIndexInitValue()),ge.push(this)),this._$wrapper.css("zIndex",this._zIndex),this._$content.css("zIndex",this._zIndex)):-1!==fe&&(ge.splice(fe,1),re.TF(this._zIndex))},_toggleShading(ye){this._$wrapper.toggleClass("dx-overlay-shader",ye&&this.option("shading")),this._$wrapper.css("backgroundColor",this.option("shading")?this.option("shadingColor"):""),this._toggleTabTerminator(ye&&this.option("shading"))},_initTabTerminatorHandler(){var ye=this;this._proxiedTabTerminatorHandler=function(){ye._tabKeyHandler(...arguments)}},_toggleTabTerminator(ye){const ge=(0,G.b4)("keydown",this.NAME);ye?C.A.on(b.A.getDocument(),ge,this._proxiedTabTerminatorHandler):C.A.off(b.A.getDocument(),ge,this._proxiedTabTerminatorHandler)},_findTabbableBounds(){const ye=this._$wrapper.find("*"),ge=ye.length-1,fe={first:null,last:null};for(let xe=0;xe<=ge&&(!fe.first&&ye.eq(xe).is(B.Kr)&&(fe.first=ye.eq(xe)),!fe.last&&ye.eq(ge-xe).is(B.Kr)&&(fe.last=ye.eq(ge-xe)),!fe.first||!fe.last);xe++);return fe},_tabKeyHandler(ye){if("tab"!==(0,G.YD)(ye)||!this._isTopOverlay())return;const ge=this._findTabbableBounds(),fe=ge.first,xe=ge.last,Te=!ye.shiftKey&&ye.target===xe.get(0),Ee=ye.shiftKey&&ye.target===fe.get(0),Oe=0===ge.length,ze=!(0,a.gR)(this._$wrapper.get(0),ye.target);if(Te||Ee||Oe||ze){ye.preventDefault();const $e=ye.shiftKey?xe:fe;C.A.trigger($e,"focusin"),C.A.trigger($e,"focus")}},_toggleSubscriptions(ye){(0,D.Vd)()&&(this._toggleHideTopOverlayCallback(ye),this._toggleHideOnParentsScrollSubscription(ye))},_toggleHideTopOverlayCallback(ye){this._hideTopOverlayHandler&&(ye?U.add(this._hideTopOverlayHandler):U.remove(this._hideTopOverlayHandler))},_toggleHideOnParentsScrollSubscription(ye){const ge=(0,G.b4)("scroll",this.NAME),{prevTargets:fe,handler:xe}=this._parentsScrollSubscriptionInfo??{};C.A.off(fe,ge,xe);const Te=this.option("hideOnParentScroll");if(ye&&Te){let Ee=this._getHideOnParentScrollTarget().parents();"desktop"===P.A.real().deviceType&&(Ee=Ee.add(Y)),C.A.on(Ee,ge,xe),this._parentsScrollSubscriptionInfo.prevTargets=Ee}},_hideOnParentsScrollHandler(ye){let ge=!1;const fe=this.option("hideOnParentScroll");(0,x.Tn)(fe)&&(ge=fe(ye)),!ge&&!this._showAnimationProcessing&&this.hide()},_getHideOnParentScrollTarget(){const ye=(0,T.A)(this.option("_hideOnParentScrollTarget"));return ye.length?ye:this._$wrapper},_render(){this.callBase(),this._appendContentToElement(),this._renderVisibilityAnimate(this.option("visible"))},_appendContentToElement(){this._$content.parent().is(this.$element())||this._$content.appendTo(this.$element())},_renderContent(){const ye=!this._currentVisible&&this.option("deferRendering");this.option("visible")&&this._isParentHidden()?this._isHidden=!0:this._contentAlreadyRendered||ye||(this._contentAlreadyRendered=!0,this._appendContentToElement(),this.callBase())},_isParentHidden(){if(!this.option("_checkParentVisibility"))return!1;if(void 0!==this._parentHidden)return this._parentHidden;const ye=this.$element().parent();if(ye.is(":visible"))return!1;let ge=!1;return ye.add(ye.parents()).each((fe,xe)=>{if("none"===(0,T.A)(xe).css("display"))return ge=!0,!1}),ge||!b.A.getBody().contains(ye.get(0))},_renderContentImpl(){const ye=(0,s.cY)(),ge=this.option("contentTemplate"),fe=this._getTemplate(ge),xe=this._templateManager.anonymousTemplateName===ge;return fe&&fe.render({container:(0,f.cc)(this.$content()),noModel:!0,transclude:xe,onRendered:()=>{ye.resolve(),this.option("templatesRenderAsynchronously")&&this._dimensionChanged()}}),this._toggleWrapperScrollEventsSubscription(this.option("preventScrollEvents")),ye.done(()=>{this.option("visible")&&this._moveToContainer()}),ye.promise()},_getPositionControllerConfig(){const{container:ye,visualContainer:ge,_fixWrapperPosition:fe,restorePosition:xe,_skipContentPositioning:Te}=this.option();return{container:ye,visualContainer:ge,$root:this.$element(),$content:this._$content,$wrapper:this._$wrapper,onPositioned:this._actions.onPositioned,onVisualPositionChanged:this._actions.onVisualPositionChanged,restorePosition:xe,_fixWrapperPosition:fe,_skipContentPositioning:Te}},_initPositionController(){this._positionController=new ie.A(this._getPositionControllerConfig())},_toggleWrapperScrollEventsSubscription(ye){const ge=(0,G.b4)(I.Cy,this.NAME);C.A.off(this._$wrapper,ge),ye&&C.A.on(this._$wrapper,ge,{validate:()=>!0,getDirection:()=>"both",_toggleGestureCover(fe){fe||this._toggleGestureCoverImpl(fe)},_clearSelection:c.lQ,isNative:!0},fe=>{const{originalEvent:xe}=fe.originalEvent,{type:Te}=xe||{},Ee="wheel"===Te,Oe="mousemove"===Te,ze=Ee&&!(0,G.By)(fe);fe._cancelPreventDefault=!0,xe&&!1!==fe.cancelable&&(!Oe&&!Ee||ze)&&fe.preventDefault()})},_moveFromContainer(){this._$content.appendTo(this.$element()),this._$wrapper.detach()},_checkContainerExists(){const ye=this._positionController.$container;void 0!==ye&&(ye.length>0||K.A.log("W1021",this.NAME))},_moveToContainer(){this._$wrapper.appendTo(this._positionController.$container),this._$content.appendTo(this._$wrapper)},_renderGeometry(ye){const{visible:ge}=this.option();ge&&(0,D.Vd)()&&(this._stopAnimation(),this._renderGeometryImpl())},_renderGeometryImpl(){this._positionController.updatePosition(this._getOptionValue("position")),this._renderWrapper(),this._renderDimensions(),this._renderPosition()},_renderPosition(){this._positionController.positionContent()},_isAllWindowCovered(){return(0,x.l6)(this._positionController.$visualContainer.get(0))&&this.option("shading")},_toggleSafariScrolling(){const ye=this.option("visible"),ge=(0,T.A)(b.A.getBody()),fe="ios"===P.A.real().platform&&d.A.safari,xe=this._isAllWindowCovered(),Te=ge.hasClass("dx-prevent-safari-scrolling");fe&&(!Te||ye&&xe&&!this._disposed?!Te&&ye&&xe&&(this._cachedBodyScrollTop=Y.pageYOffset,ge.addClass("dx-prevent-safari-scrolling")):(ge.removeClass("dx-prevent-safari-scrolling"),Y.scrollTo(0,this._cachedBodyScrollTop),this._cachedBodyScrollTop=void 0))},_renderWrapper(){this._positionController.styleWrapperPosition(),this._renderWrapperDimensions(),this._positionController.positionWrapper()},_renderWrapperDimensions(){const{$visualContainer:ye}=this._positionController,ge=b.A.getDocumentElement(),fe=(0,x.l6)(ye.get(0)),xe=fe?ge.clientWidth:(0,_.Ot)(ye),Te=fe?Y.innerHeight:(0,_.P$)(ye);this._$wrapper.css({width:xe,height:Te})},_renderDimensions(){const ye=this._$content.get(0);this._$content.css({minWidth:this._getOptionValue("minWidth",ye),maxWidth:this._getOptionValue("maxWidth",ye),minHeight:this._getOptionValue("minHeight",ye),maxHeight:this._getOptionValue("maxHeight",ye),width:this._getOptionValue("width",ye),height:this._getOptionValue("height",ye)})},_focusTarget(){return this._$content},_attachKeyboardEvents(){this._keyboardListenerId=N.QJ.on(this._$content,null,ye=>this._keyboardHandler(ye))},_keyboardHandler(ye){((0,T.A)(ye.originalEvent.target).is(this._$content)||!this.option("ignoreChildEvents"))&&this.callBase(...arguments)},_isVisible(){return this.option("visible")},_visibilityChanged(ye){ye?this.option("visible")&&this._renderVisibilityAnimate(ye):this._renderVisibilityAnimate(ye)},_dimensionChanged(){this._renderGeometry()},_clean(){const ye=this.option();!this._contentAlreadyRendered&&!ye.isRenovated&&this.$content().empty(),this._renderVisibility(!1),this._stopShowTimer(),this._cleanFocusState()},_stopShowTimer(){this._asyncShowTimeout&&clearTimeout(this._asyncShowTimeout),this._asyncShowTimeout=null},_dispose(){W.A.stop(this._$content,!1),clearTimeout(this._deferShowTimer),this._toggleViewPortSubscription(!1),this._toggleSubscriptions(!1),this._updateZIndexStackPosition(!1),this._toggleTabTerminator(!1),this._actions=null,this._parentsScrollSubscriptionInfo=null,this.callBase(),this._toggleSafariScrolling(),this.option("visible")&&re.TF(this._zIndex),this._$wrapper.remove(),this._$content.remove()},_toggleRTLDirection(ye){this._$content.toggleClass("dx-rtl",ye)},_optionChanged(ye){const{value:ge,name:fe}=ye;if(this._getActionsList().includes(fe))this._initActions();else switch(fe){case"animation":case"closeOnOutsideClick":case"hideOnOutsideClick":case"propagateOutsideClick":break;case"shading":this._toggleShading(this.option("visible")),this._toggleSafariScrolling();break;case"shadingColor":this._toggleShading(this.option("visible"));break;case"width":case"height":case"minWidth":case"maxWidth":case"minHeight":case"maxHeight":this._renderGeometry();break;case"position":this._positionController.updatePosition(this.option("position")),this._positionController.restorePositionOnNextRender(!0),this._renderGeometry(),this._toggleSafariScrolling();break;case"visible":this._renderVisibilityAnimate(ge).done(()=>{var xe;return null===(xe=this._animateDeferred)||void 0===xe?void 0:xe.resolveWith(this)}).fail(()=>{var xe;return null===(xe=this._animateDeferred)||void 0===xe?void 0:xe.reject()});break;case"container":this._positionController.updateContainer(ge),this._invalidate(),this._toggleSafariScrolling();break;case"visualContainer":this._positionController.updateVisualContainer(ge),this._renderWrapper(),this._toggleSafariScrolling();break;case"innerOverlay":this._initInnerOverlayClass();break;case"deferRendering":case"contentTemplate":this._contentAlreadyRendered=!1,this._clean(),this._invalidate();break;case"hideTopOverlayHandler":this._toggleHideTopOverlayCallback(!1),this._initHideTopOverlayHandler(ge),this._toggleHideTopOverlayCallback(this.option("visible"));break;case"hideOnParentScroll":case"_hideOnParentScrollTarget":this._toggleHideOnParentsScrollSubscription(this.option("visible"));break;case"rtlEnabled":this._contentAlreadyRendered=!1,this.callBase(ye);break;case"_fixWrapperPosition":this._positionController.fixWrapperPosition=ge;break;case"wrapperAttr":this._renderWrapperAttributes();break;case"restorePosition":this._positionController.restorePosition=ge;break;case"preventScrollEvents":this._logDeprecatedPreventScrollEventsInfo(),this._toggleWrapperScrollEventsSubscription(ge);break;default:this.callBase(ye)}},toggle(ye){ye=void 0===ye?!this.option("visible"):ye;const ge=(0,s.cY)();if(ye===this.option("visible"))return ge.resolveWith(this,[ye]).promise();const fe=(0,s.cY)();return this._animateDeferred=fe,this.option("visible",ye),fe.promise().done(()=>{delete this._animateDeferred,ge.resolveWith(this,[this.option("visible")])}).fail(()=>{delete this._animateDeferred,ge.reject()}),ge.promise()},$content(){return this._$content},show(){return this.toggle(!0)},hide(){return this.toggle(!1)},content(){return(0,f.cc)(this._$content)},repaint(){this._contentAlreadyRendered?(this._positionController.restorePositionOnNextRender(!0),this._renderGeometry({forceStopAnimation:!0}),(0,k.ho)(this._$content)):this.callBase()}});ve.baseZIndex=ye=>re.E3(ye),(0,o.A)("dxOverlay",ve);const Ce=ve},3608:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>re});var W=M(6870),o=M(4504),P=M(1973),b=M(6054),f=M(9522),S=M(5704),T=M(3090),y=M(3012),d=M(4757),c=M(1363),s=M(1830),a=M(6110),u=M(4072),h=M(9293),g=M(8628),_=M(9212),x=M(127),w=M(5742);const N={left:"right",top:"bottom",right:"left",bottom:"top",center:"center"},G=function(q){return(0,s.Gv)(q)?q.name:q},k=function(q,Y){const Z=q.option(Y);return G(Z)},B=function(q,Y){const{target:Z,shading:Q,disabled:te,hideEvent:pe}=q.option(),z=(0,s.Kg)(Z),oe=Q&&"hide"===Y,ae=oe?null:k(q,`${Y}Event`);if(oe&&pe&&x.A.log("W1020"),!ae||te)return;const ee=(0,h.b4)(ae,q.NAME),he=q._createAction(function(){const be=function(q,Y){const Z=q.option(Y);return(0,s.Gv)(Z)&&Z.delay}(q,`${Y}Event`);this._clearEventsTimeouts(),be?this._timeouts[Y]=setTimeout(()=>{q[Y]()},be):q[Y]()}.bind(q),{validatingTargetName:"target"}),de=function(be){he({event:be,target:(0,S.A)(be.currentTarget)})},ue=`_${Y}EventHandler`;if(z)q[ue]=de,u.A.on(b.A.getDocument(),ee,Z,de);else{const be=(0,f.cc)((0,S.A)(Z));q[ue]=void 0,u.A.on(be,ee,de)}},K=function(q,Y,Z,Q){let te=Q||k(q,`${Z}Event`);if(!te)return;te=(0,h.b4)(te,q.NAME);const pe=`_${Z}EventHandler`;q[pe]?u.A.off(b.A.getDocument(),te,Y,q[pe]):u.A.off((0,f.cc)((0,S.A)(Y)),te)},J=g.A.inherit({_getDefaultOptions(){return(0,T.X)(this.callBase(),{target:void 0,shading:!1,position:(0,T.X)({},w.X.bottom),hideOnOutsideClick:!0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",from:1,to:0}},showTitle:!1,width:"auto",height:"auto",dragEnabled:!1,resizeEnabled:!1,fullScreen:!1,hideOnParentScroll:!0,arrowPosition:"",arrowOffset:0,_fixWrapperPosition:!0})},_defaultOptionsRules:()=>[{device:{platform:"ios"},options:{arrowPosition:{boundaryOffset:{h:20,v:-10},collision:"fit"}}},{device:()=>!(0,a.Vd)(),options:{animation:null}},{device:()=>(0,_.Nt)(),options:{useFlatToolbarButtons:!0}},{device:()=>(0,_.gx)(),options:{useDefaultToolbarButtons:!0,showCloseButton:!1}}],_init(){var q;this.callBase(),this._renderArrow(),this._timeouts={},this.$element().addClass("dx-popover"),this.$wrapper().addClass("dx-popover-wrapper");const Y=null===(q=this.option("toolbarItems"))||void 0===q?void 0:q.length;this.setAria("role",Y?"dialog":"tooltip")},_render(){this.callBase.apply(this,arguments),this._detachEvents(this.option("target")),this._attachEvents()},_detachEvents(q){K(this,q,"show"),K(this,q,"hide")},_attachEvents(){B(this,"show"),B(this,"hide")},_renderArrow(){this._$arrow=(0,S.A)("<div>").addClass("dx-popover-arrow").prependTo(this.$overlayContent())},_documentDownHandler(q){return!this._isOutsideClick(q)||this.callBase(q)},_isOutsideClick(q){return!(0,S.A)(q.target).closest(this.option("target")).length},_animate(q){q&&q.to&&"object"==typeof q.to&&(0,T.X)(q.to,{position:this._getContainerPosition()}),this.callBase.apply(this,arguments)},_stopAnimation(){this.callBase.apply(this,arguments)},_renderTitle(){this.$wrapper().toggleClass("dx-popover-without-title",!this.option("showTitle")),this.callBase()},_renderPosition(){let q=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.callBase(),this._renderOverlayPosition(q),this._actions.onPositioned()},_renderOverlayPosition(q){this._resetOverlayPosition(q),this._updateContentSize(q);const Y=this._getContainerPosition(),Z=W.A.setup(this.$overlayContent(),Y),Q=this._getSideByLocation(Z);this._togglePositionClass(`dx-position-${Q}`),this._toggleFlippedClass(Z.h.flip,Z.v.flip),(this._isHorizontalSide()||this._isVerticalSide())&&this._renderArrowPosition(Q)},_resetOverlayPosition(q){this._setContentHeight(q),this._togglePositionClass(`dx-position-${this._positionController._positionSide}`),(0,o.Cy)(this.$overlayContent(),{left:0,top:0}),this._$arrow.css({top:"auto",right:"auto",bottom:"auto",left:"auto"})},_updateContentSize(q){if(!this.$content()||!q)return;const Y=W.A.calculate(this.$overlayContent(),this._getContainerPosition());if(Y.h.oversize>0&&this._isHorizontalSide()&&!Y.h.fit){const Z=(0,c.RG)(this.$overlayContent())-Y.h.oversize;(0,c.zj)(this.$overlayContent(),Z)}if(Y.v.oversize>0&&this._isVerticalSide()&&!Y.v.fit){const Z=(0,c.Oq)(this.$overlayContent())-Y.v.oversize,Q=(0,c.Oq)(this.$content())-Y.v.oversize;(0,c.k$)(this.$overlayContent(),Z),(0,c.k$)(this.$content(),Q)}},_getContainerPosition(){return this._positionController._getContainerPosition()},_getHideOnParentScrollTarget(){return(0,S.A)(this._positionController._position.of||this.callBase())},_getSideByLocation(q){const Y=q.v.flip,Z=q.h.flip;return this._isVerticalSide()&&Y||this._isHorizontalSide()&&Z||this._isPopoverInside()?N[this._positionController._positionSide]:this._positionController._positionSide},_togglePositionClass(q){this.$wrapper().removeClass("dx-position-left dx-position-right dx-position-top dx-position-bottom").addClass(q)},_toggleFlippedClass(q,Y){this.$wrapper().toggleClass("dx-popover-flipped-horizontal",q).toggleClass("dx-popover-flipped-vertical",Y)},_renderArrowPosition(q){const Y=(0,d.N)(this._$arrow.get(0)),Z=-(this._isVerticalSide(q)?Y.height:Y.width);this._$arrow.css(N[q],Z);const Q=this._isVerticalSide(q)?"left":"top",te=this._isVerticalSide(q)?"width":"height",pe=(0,S.A)(this._positionController._position.of),z=W.A.offset(pe)||{top:0,left:0},oe=W.A.offset(this.$overlayContent()),ae=Y[te],ee=oe[Q],he=(0,d.N)(this.$overlayContent().get(0))[te],de=z[Q],ue=pe.get(0),be=ue&&!ue.preventDefault?(0,d.N)(ue)[te]:0,ve=Math.max(ee,de),le=Math.min(ee+he,de+be);let Ce;Ce="start"===this.option("arrowPosition")?ve-ee:"end"===this.option("arrowPosition")?le-ee-ae:(ve+le)/2-ee-ae/2;const ye=this._positionController._getContentBorderWidth(q),ge=(0,y.df)(Ce-ye+this.option("arrowOffset"),ye,he-ae-2*ye);this._$arrow.css(Q,ge)},_isPopoverInside(){return this._positionController._isPopoverInside()},_setContentHeight(q){q&&this.callBase()},_getPositionControllerConfig(){const{shading:q,target:Y}=this.option();return(0,T.X)({},this.callBase(),{target:Y,shading:q,$arrow:this._$arrow})},_initPositionController(){this._positionController=new w.B(this._getPositionControllerConfig())},_renderWrapperDimensions(){this.option("shading")&&this.$wrapper().css({width:"100%",height:"100%"})},_isVerticalSide(q){return this._positionController._isVerticalSide(q)},_isHorizontalSide(q){return this._positionController._isHorizontalSide(q)},_clearEventTimeout(q){clearTimeout(this._timeouts[q])},_clearEventsTimeouts(){this._clearEventTimeout("show"),this._clearEventTimeout("hide")},_clean(){this._detachEvents(this.option("target")),this.callBase.apply(this,arguments)},_optionChanged(q){switch(q.name){case"arrowPosition":case"arrowOffset":this._renderGeometry();break;case"fullScreen":q.value&&this.option("fullScreen",!1);break;case"target":q.previousValue&&this._detachEvents(q.previousValue),this._positionController.updateTarget(q.value),this._invalidate();break;case"showEvent":case"hideEvent":{const Y=q.name.substring(0,4),Z=G(q.previousValue);this.hide(),K(this,this.option("target"),Y,Z),B(this,Y);break}case"visible":this._clearEventTimeout(q.value?"show":"hide"),this.callBase(q);break;default:this.callBase(q)}},show(q){return q&&this.option("target",q),this.callBase()}});(0,P.A)("dxPopover",J);const re=J},5169:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T}),M(3651);var o=M(1973),P=M(3090),b=M(8628);let f=(()=>{class y extends b.A{_getDefaultOptions(){return(0,P.X)(super._getDefaultOptions(),{preventScrollEvents:!1})}_getToolbarName(){return"dxToolbar"}}return y.defaultOptions=function(d){b.A.defaultOptions(d)},y})();(0,o.A)("dxPopup",f);const T=f},8628:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Tt}),M(1074);var P=M(1973),b=M(5973),f=M(9522),S=M(2925),T=M(5704),y=M(2013),d=M(8412),c=M(36),s=M(4859),a=M(3090),u=M(6946),h=M(2660),g=M(4757),_=M(1363),x=M(1830),w=M(6548),D=M(6110),C=M(9229),I=M(8360),L=M(9012),N=M(3949),G=M(1220),k=M(9212),U=M(3183),B=M(4504),K=M(6054),J=M(3012),ie=M(4072),re=M(8664),q=M(9293);const Q=class Z{constructor(wt){this.init(wt)}init(wt){let{dragEnabled:En,handle:ri,draggableElement:Tn,positionController:Jn}=wt;this._positionController=Jn,this._draggableElement=Tn,this._handle=ri,this._dragEnabled=En,this.unsubscribe(),En&&this.subscribe()}moveDown(wt){this._moveTo(5,0,wt)}moveUp(wt){this._moveTo(-5,0,wt)}moveLeft(wt){this._moveTo(0,-5,wt)}moveRight(wt){this._moveTo(0,5,wt)}subscribe(){const wt=this._getEventNames();ie.A.on(this._handle,wt.startEventName,En=>{this._dragStartHandler(En)}),ie.A.on(this._handle,wt.updateEventName,En=>{this._dragUpdateHandler(En)}),ie.A.on(this._handle,wt.endEventName,En=>{this._dragEndHandler(En)})}unsubscribe(){const wt=this._getEventNames();ie.A.off(this._handle,wt.startEventName),ie.A.off(this._handle,wt.updateEventName),ie.A.off(this._handle,wt.endEventName)}_getEventNames(){return{startEventName:(0,q.b4)(re.ni,"overlayDrag"),updateEventName:(0,q.b4)(re.Cy,"overlayDrag"),endEventName:(0,q.b4)(re._N,"overlayDrag")}}_dragStartHandler(wt){const En=this._getAllowedOffsets();this._prevOffset={x:0,y:0},wt.targetElements=[],wt.maxTopOffset=En.top,wt.maxBottomOffset=En.bottom,wt.maxLeftOffset=En.left,wt.maxRightOffset=En.right}_dragUpdateHandler(wt){this._moveByOffset({top:wt.offset.y-this._prevOffset.y,left:wt.offset.x-this._prevOffset.x}),this._prevOffset=wt.offset}_dragEndHandler(wt){this._positionController.dragHandled(),this._positionController.detectVisualPositionChange(wt)}_moveTo(wt,En,ri){if(!this._dragEnabled)return;ri.preventDefault(),ri.stopPropagation();const Tn=this._fitOffsetIntoAllowedRange(wt,En);this._moveByOffset(Tn),this._dragEndHandler(ri)}_fitOffsetIntoAllowedRange(wt,En){const ri=this._getAllowedOffsets();return{top:(0,J.df)(wt,-ri.top,ri.bottom),left:(0,J.df)(En,-ri.left,ri.right)}}_getContainerDimensions(){const wt=K.A.getDocument(),En=this._positionController.$dragResizeContainer.get(0);let ri=(0,_.Ot)(En),Tn=(0,_.P$)(En);return(0,x.l6)(En)&&(Tn=Math.max(wt.body.clientHeight,Tn),ri=Math.max(wt.body.clientWidth,ri)),{width:ri,height:Tn}}_getContainerPosition(){const wt=this._positionController.$dragResizeContainer.get(0);return(0,x.l6)(wt)?{top:0,left:0}:(0,_.A3)(wt)}_getElementPosition(){return(0,_.A3)(this._draggableElement)}_getInnerDelta(){const wt=this._getContainerDimensions(),En=this._getElementDimensions();return{x:wt.width-En.width,y:wt.height-En.height}}_getOuterDelta(){const{width:wt,height:En}=this._getElementDimensions(),{outsideDragFactor:ri}=this._positionController;return{x:wt*ri,y:En*ri}}_getFullDelta(){const wt=this._getInnerDelta(),En=this._getOuterDelta();return{x:wt.x+En.x,y:wt.y+En.y}}_getElementDimensions(){return{width:this._draggableElement.offsetWidth,height:this._draggableElement.offsetHeight}}_getAllowedOffsets(){const wt=this._getFullDelta();if(!(wt.y>=0&&wt.x>=0))return{top:0,bottom:0,left:0,right:0};const ri=this._getElementPosition(),Tn=this._getContainerPosition(),Jn=this._getOuterDelta();return{top:ri.top-Tn.top+Jn.y,bottom:-ri.top+Tn.top+wt.y,left:ri.left-Tn.left+Jn.x,right:-ri.left+Tn.left+wt.x}}_moveByOffset(wt){const En=(0,B.x5)(this._draggableElement);(0,B.Cy)(this._draggableElement,{left:En.left+wt.left,top:En.top+wt.top})}},te={setOverflow:s.lQ,restoreOverflow:s.lQ};var z=M(5737),oe=M(9144),ae=M(4017),ee=M(5417);const he=["fullScreen","forceApplyBindings","dragOutsideBoundary","dragAndResizeArea","outsideDragFactor"],de=(0,D.zk)();class ue extends ee.A{constructor(wt){let{fullScreen:En,forceApplyBindings:ri,dragOutsideBoundary:Tn,dragAndResizeArea:Jn,outsideDragFactor:wi}=wt;super((0,oe.A)(wt,he)),this._props=(0,z.A)({},this._props,{fullScreen:En,forceApplyBindings:ri,dragOutsideBoundary:Tn,dragAndResizeArea:Jn,outsideDragFactor:wi}),this._$dragResizeContainer=void 0,this._updateDragResizeContainer()}set fullScreen(wt){this._props.fullScreen=wt,wt?this._fullScreenEnabled():this._fullScreenDisabled()}get $dragResizeContainer(){return this._$dragResizeContainer}get outsideDragFactor(){return this._props.dragOutsideBoundary?1:this._props.outsideDragFactor}set dragAndResizeArea(wt){this._props.dragAndResizeArea=wt,this._updateDragResizeContainer()}set dragOutsideBoundary(wt){this._props.dragOutsideBoundary=wt,this._updateDragResizeContainer()}set outsideDragFactor(wt){this._props.outsideDragFactor=wt}updateContainer(wt){super.updateContainer(wt),this._updateDragResizeContainer()}dragHandled(){this.restorePositionOnNextRender(!1)}resizeHandled(){this.restorePositionOnNextRender(!1)}positionContent(){var wt,En;this._props.fullScreen?((0,B.Cy)(this._$content,{top:0,left:0}),this.detectVisualPositionChange()):(null===(wt=(En=this._props).forceApplyBindings)||void 0===wt||wt.call(En),super.positionContent())}_updateDragResizeContainer(){this._$dragResizeContainer=this._getDragResizeContainer()}_getDragResizeContainer(){return this._props.dragOutsideBoundary?(0,T.A)(de):this._props.dragAndResizeArea?(0,T.A)(this._props.dragAndResizeArea):(0,ae.s$)().get(0)||this._props.container?this._$markupContainer:(0,T.A)(de)}_getVisualContainer(){return this._props.fullScreen?(0,T.A)(de):super._getVisualContainer()}_fullScreenEnabled(){this.restorePositionOnNextRender(!1)}_fullScreenDisabled(){this.restorePositionOnNextRender(!0)}}const be=(0,D.zk)(),Ke=["cancel","clear","done"],Xe=c.A.safari&&(0,w.U)(c.A.version,[11])<0,tt={static:"",inherit:"dx-popup-inherit-height",flex:"dx-popup-flex-height"},qe=N.A.inherit({_supportedKeys(){return(0,a.X)(this.callBase(),{upArrow:qt=>{var wt;null===(wt=this._drag)||void 0===wt||wt.moveUp(qt)},downArrow:qt=>{var wt;null===(wt=this._drag)||void 0===wt||wt.moveDown(qt)},leftArrow:qt=>{var wt;null===(wt=this._drag)||void 0===wt||wt.moveLeft(qt)},rightArrow:qt=>{var wt;null===(wt=this._drag)||void 0===wt||wt.moveRight(qt)}})},_getDefaultOptions(){return(0,a.X)(this.callBase(),{fullScreen:!1,title:"",showTitle:!0,titleTemplate:"title",onTitleRendered:null,dragOutsideBoundary:!1,dragEnabled:!1,dragAndResizeArea:void 0,enableBodyScroll:!0,outsideDragFactor:0,onResizeStart:null,onResize:null,onResizeEnd:null,resizeEnabled:!1,toolbarItems:[],showCloseButton:!1,bottomTemplate:"bottom",useDefaultToolbarButtons:!1,useFlatToolbarButtons:!1,autoResizeEnabled:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{animation:this._iosAnimation}},{device:{platform:"android"},options:{animation:this._androidAnimation}},{device:{platform:"generic"},options:{showCloseButton:!0}},{device:qt=>"desktop"===b.A.real().deviceType&&"generic"===qt.platform,options:{dragEnabled:!0}},{device:()=>"desktop"===b.A.real().deviceType&&!b.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,k.Nt)(),options:{useFlatToolbarButtons:!0}},{device:()=>(0,k.gx)(),options:{useDefaultToolbarButtons:!0,showCloseButton:!1}}])},_iosAnimation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom"}},to:{position:{my:"center",at:"center"}}},hide:{type:"slide",duration:400,from:{opacity:1,position:{my:"center",at:"center"}},to:{opacity:1,position:{my:"top",at:"bottom"}}}},_androidAnimation(){return this.option("fullScreen")?{show:{type:"slide",duration:300,from:{top:"30%",opacity:0},to:{top:0,opacity:1}},hide:{type:"slide",duration:300,from:{top:0,opacity:1},to:{top:"30%",opacity:0}}}:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}}},_init(){const qt=this.option("_wrapperClassExternal"),wt=qt?`dx-popup-wrapper ${qt}`:"dx-popup-wrapper";this.callBase(),this._createBodyOverflowManager(),this._updateResizeCallbackSkipCondition(),this.$element().addClass("dx-popup"),this.$wrapper().addClass(wt),this._$popupContent=this._$content.wrapInner((0,T.A)("<div>").addClass("dx-popup-content")).children().eq(0),this._toggleContentScrollClass(),this.$overlayContent().attr("role","dialog")},_render(){const qt=this.option("fullScreen");this._toggleFullScreenClass(qt),this.callBase()},_createBodyOverflowManager(){this._bodyOverflowManager=(()=>{if(!(0,D.Vd)())return te;const qt=(0,D.zk)(),{documentElement:wt}=K.A.getDocument(),En=K.A.getBody(),ri="ios"===b.A.real().platform,Tn={overflow:null,overflowX:null,overflowY:null,paddingRight:null,position:null,top:null,left:null};return{setOverflow:ri?()=>{if((0,x.O9)(Tn.position)||"fixed"===En.style.position)return;const{scrollY:Jn,scrollX:wi}=qt;Tn.position=En.style.position,Tn.top=En.style.top,Tn.left=En.style.left,En.style.setProperty("position","fixed"),En.style.setProperty("top",-Jn+"px"),En.style.setProperty("left",-wi+"px")}:()=>{(()=>{const Jn=qt.innerWidth-wt.clientWidth;if(Tn.paddingRight||Jn<=0)return;const wi=qt.getComputedStyle(En).getPropertyValue("padding-right"),Bn=parseInt(wi,10);Tn.paddingRight=Bn,En.style.setProperty("padding-right",`${Bn+Jn}px`)})(),!Tn.overflow&&"hidden"!==En.style.overflow&&(Tn.overflow=En.style.overflow,Tn.overflowX=En.style.overflowX,Tn.overflowY=En.style.overflowY,En.style.setProperty("overflow","hidden"))},restoreOverflow:ri?()=>{if(!(0,x.O9)(Tn.position))return;const Jn=-parseInt(En.style.top,10),wi=-parseInt(En.style.left,10);["position","top","left"].forEach(Bn=>{Tn[Bn]?En.style.setProperty(Bn,Tn[Bn]):En.style.removeProperty(Bn)}),qt.scrollTo(wi,Jn),Tn.position=null}:()=>{(0,x.O9)(Tn.paddingRight)&&(Tn.paddingRight?En.style.setProperty("padding-right",`${Tn.paddingRight}px`):En.style.removeProperty("padding-right"),Tn.paddingRight=null),["overflow","overflowX","overflowY"].forEach(Jn=>{if(!(0,x.O9)(Tn[Jn]))return;const wi=Jn.replace(/(X)|(Y)/,Bn=>`-${Bn.toLowerCase()}`);Tn[Jn]?En.style.setProperty(wi,Tn[Jn]):En.style.removeProperty(wi),Tn[Jn]=null})}}})()},_toggleFullScreenClass(qt){this.$overlayContent().toggleClass("dx-popup-fullscreen",qt).toggleClass("dx-popup-normal",!qt)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new d.A,bottom:new d.A})},_getActionsList(){return this.callBase().concat(["onResizeStart","onResize","onResizeEnd"])},_contentResizeHandler(qt){this._shouldSkipContentResize(qt)||this._renderGeometry({shouldOnlyReposition:!0})},_doesShowAnimationChangeDimensions(){const qt=this.option("animation");return["to","from"].some(wt=>{var En;const ri=null==qt||null===(En=qt.show)||void 0===En?void 0:En[wt];return(0,x.Gv)(ri)&&("width"in ri||"height"in ri)})},_updateResizeCallbackSkipCondition(){const qt=this._doesShowAnimationChangeDimensions();this._shouldSkipContentResize=wt=>qt&&this._showAnimationProcessing||this._areContentDimensionsRendered(wt)},_observeContentResize(qt){if(!this.option("useResizeObserver"))return;const wt=this._$content.get(0);qt?y.A.observe(wt,En=>{this._contentResizeHandler(En)}):y.A.unobserve(wt)},_areContentDimensionsRendered(qt){var wt,En,ri;const Tn=null===(wt=qt.contentBoxSize)||void 0===wt?void 0:wt[0];var Jn,wi;if(Tn)return parseInt(Tn.inlineSize,10)===(null===(Jn=this._renderedDimensions)||void 0===Jn?void 0:Jn.width)&&parseInt(Tn.blockSize,10)===(null===(wi=this._renderedDimensions)||void 0===wi?void 0:wi.height);const{contentRect:Bn}=qt;return parseInt(Bn.width,10)===(null===(En=this._renderedDimensions)||void 0===En?void 0:En.width)&&parseInt(Bn.height,10)===(null===(ri=this._renderedDimensions)||void 0===ri?void 0:ri.height)},_renderContent(){this.callBase(),this._observeContentResize(!0)},_renderContentImpl(){this._renderTitle(),this.callBase(),this._renderResize(),this._renderBottom()},_renderTitle(){const qt=this._getToolbarItems("top"),{title:wt,showTitle:En}=this.option();if(En&&wt&&qt.unshift({location:b.A.current().ios?"center":"before",text:wt}),En||qt.length>0){this._$title&&this._$title.remove();const ri=(0,T.A)("<div>").addClass("dx-popup-title").insertBefore(this.$content());this._$title=this._renderTemplateByType("titleTemplate",qt,ri).addClass("dx-popup-title"),this._renderDrag(),this._executeTitleRenderAction(this._$title),this._$title.toggleClass("dx-has-close-button",this._hasCloseButton())}else this._$title&&this._$title.detach();this._toggleAriaLabel()},_toggleAriaLabel(){var qt;const{title:wt,showTitle:En}=this.option(),Tn=En&&wt?new S.A:null;null===(qt=this._$title)||void 0===qt||qt.find(".dx-toolbar-label").eq(0).attr("id",Tn),this.$overlayContent().attr("aria-labelledby",Tn)},_renderTemplateByType(qt,wt,En,ri){const{rtlEnabled:Tn,useDefaultToolbarButtons:Jn,useFlatToolbarButtons:wi,disabled:Bn}=this.option(),gi=this._getTemplateByOption(qt);if(gi instanceof d.A){const Dt=(0,a.X)({},this.option("integrationOptions"),{skipTemplates:["content","title"]}),cn=(0,a.X)(ri,{items:wt,rtlEnabled:Tn,useDefaultButtons:Jn,useFlatButtons:wi,disabled:Bn,integrationOptions:Dt});this._getTemplate("dx-polymorph-widget").render({container:En,model:{widget:this._getToolbarName(),options:cn}});const dt=En.children("div");return En.replaceWith(dt),dt}const pt=(0,T.A)(gi.render({container:(0,f.cc)(En)}));return pt.hasClass("dx-template-wrapper")&&(En.replaceWith(pt),En=pt),En},_getToolbarName:()=>"dxToolbarBase",_renderVisibilityAnimate(qt){return this.callBase(qt)},_hide(){return this._observeContentResize(!1),this.callBase()},_executeTitleRenderAction(qt){this._getTitleRenderAction()({titleElement:(0,f.cc)(qt)})},_getTitleRenderAction(){return this._titleRenderAction||this._createTitleRenderAction()},_createTitleRenderAction(){return this._titleRenderAction=this._createActionByOption("onTitleRendered",{element:this.element(),excludeValidators:["disabled","readOnly"]})},_getCloseButton(){return{toolbar:"top",location:"after",template:this._getCloseButtonRenderer()}},_getCloseButtonRenderer(){return(qt,wt,En)=>{const ri=(0,T.A)("<div>").addClass("dx-closebutton");this._createComponent(ri,L.A,{icon:"close",onClick:this._createToolbarItemAction(void 0),stylingMode:"text",integrationOptions:{}}),(0,T.A)(En).append(ri)}},_getToolbarItems(qt){const wt=this.option("toolbarItems"),En=[];this._toolbarItemClasses=[];const ri=b.A.current().platform;let Tn=0;return(0,h.__)(wt,(Jn,wi)=>{const Bn=(0,x.O9)(wi.shortcut),gi=Bn?(qt=>{const wt=b.A.current(),{platform:En}=wt;let ri="bottom",Tn="before";if("ios"===En)switch(qt){case"cancel":ri="top";break;case"clear":ri="top",Tn="after";break;case"done":Tn="after"}else if("android"===En)switch(qt){case"cancel":case"done":Tn="after"}return{toolbar:ri,location:Tn}})(wi.shortcut):wi;if(Bn&&"ios"===ri&&Tn<2&&(gi.toolbar="top",Tn++),gi.toolbar=wi.toolbar||gi.toolbar||"top",gi&&gi.toolbar===qt){Bn&&(0,a.X)(gi,{location:wi.location},this._getToolbarItemByAlias(wi));const Ai="generic"===ri;"done"===wi.shortcut&&Ai||"cancel"===wi.shortcut&&!Ai?En.unshift(gi):En.push(gi)}}),"top"===qt&&this._hasCloseButton()&&En.push(this._getCloseButton()),En},_hasCloseButton(){return this.option("showCloseButton")&&this.option("showTitle")},_getLocalizationKey:qt=>"done"===qt.toLowerCase()?"OK":(0,u.PT)(qt,!0),_getToolbarButtonStylingMode(qt){return(0,k.Ft)()?"done"===qt?"contained":"outlined":this.option("useFlatToolbarButtons")?"text":"contained"},_getToolbarButtonType(qt){return(0,k.Ft)()&&"done"===qt||this.option("useDefaultToolbarButtons")?"default":"normal"},_getToolbarItemByAlias(qt){const wt=this,En=qt.shortcut;if(!Ke.includes(En))return!1;const ri=(0,a.X)({text:I.A.format(this._getLocalizationKey(En)),onClick:this._createToolbarItemAction(qt.onClick),integrationOptions:{},type:this._getToolbarButtonType(En),stylingMode:this._getToolbarButtonStylingMode(En)},qt.options||{}),Tn=`dx-popup-${En}`;return this._toolbarItemClasses.push(Tn),{template(Jn,wi,Bn){const gi=(0,T.A)("<div>").addClass(Tn).appendTo(Bn);wt._createComponent(gi,L.A,ri)}}},_createToolbarItemAction(qt){return this._createAction(qt,{afterExecute(wt){wt.component.hide()}})},_renderBottom(){const qt=this._getToolbarItems("bottom");if(qt.length){this._$bottom&&this._$bottom.remove();const wt=(0,T.A)("<div>").addClass("dx-popup-bottom").insertAfter(this.$content());this._$bottom=this._renderTemplateByType("bottomTemplate",qt,wt,{compactMode:!0}).addClass("dx-popup-bottom"),this._toggleClasses()}else this._$bottom&&this._$bottom.detach()},_toggleDisabledState(qt){this.callBase(...arguments),this.$content().toggleClass("dx-state-disabled",!!qt)},_toggleClasses(){(0,h.__)(Ke,(wt,En)=>{const ri=`dx-popup-${En}`;this._toolbarItemClasses.includes(ri)?(this.$wrapper().addClass(`${ri}-visible`),this._$bottom.addClass(ri)):(this.$wrapper().removeClass(`${ri}-visible`),this._$bottom.removeClass(ri))})},_toggleFocusClass(qt,wt){if(this.callBase(qt,wt),qt&&!U.C0(this._zIndex)){const En=U.vt(this._zIndexInitValue());U.TF(this._zIndex),this._zIndex=En,this._$wrapper.css("zIndex",En),this._$content.css("zIndex",En)}},_toggleContentScrollClass(){const qt=!this.option("preventScrollEvents");this.$content().toggleClass("dx-popup-content-scrollable",qt)},_getPositionControllerConfig(){const{fullScreen:qt,forceApplyBindings:wt,dragOutsideBoundary:En,dragAndResizeArea:ri,outsideDragFactor:Tn}=this.option();return(0,a.X)({},this.callBase(),{fullScreen:qt,forceApplyBindings:wt,dragOutsideBoundary:En,dragAndResizeArea:ri,outsideDragFactor:Tn})},_initPositionController(){this._positionController=new ue(this._getPositionControllerConfig())},_getDragTarget(){return this.topToolbar()},_renderGeometry(qt){const{visible:wt,useResizeObserver:En}=this.option();if(wt&&(0,D.Vd)()){const Tn=this._showAnimationProcessing&&!(null!=qt&&qt.forceStopAnimation)&&En;this._isAnimationPaused=Tn||void 0,this._stopAnimation(),null!=qt&&qt.shouldOnlyReposition?this._renderPosition(!1):this._renderGeometryImpl(qt?.isDimensionChange),Tn&&(this._animateShowing(),this._isAnimationPaused=void 0)}},_cacheDimensions(){this.option("useResizeObserver")&&(this._renderedDimensions={width:parseInt((0,_.RG)(this._$content),10),height:parseInt((0,_.Oq)(this._$content),10)})},_renderGeometryImpl(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._resetContentHeight(),this.callBase(),this._cacheDimensions(),this._setContentHeight()},_resetContentHeight(){"auto"===this._getOptionValue("height")&&this.$content().css({height:"auto",maxHeight:"none"})},_renderDrag(){const qt=this._getDragTarget(),wt=this.option("dragEnabled");if(!qt)return;const En={dragEnabled:wt,handle:qt.get(0),draggableElement:this._$content.get(0),positionController:this._positionController};this._drag?this._drag.init(En):this._drag=new Q(En),this.$overlayContent().toggleClass("dx-popup-draggable",wt)},_renderResize(){this._resizable=this._createComponent(this._$content,G.A,{handles:this.option("resizeEnabled")?"all":"none",onResizeEnd:qt=>{this._resizeEndHandler(qt),this._observeContentResize(!0)},onResize:qt=>{this._setContentHeight(),this._actions.onResize(qt)},onResizeStart:qt=>{this._observeContentResize(!1),this._actions.onResizeStart(qt)},minHeight:100,minWidth:100,area:this._positionController.$dragResizeContainer,keepAspectRatio:!1})},_resizeEndHandler(qt){const wt=this._resizable.option("width"),En=this._resizable.option("height");wt&&this._setOptionWithoutOptionChange("width",wt),En&&this._setOptionWithoutOptionChange("height",En),this._cacheDimensions(),this._positionController.resizeHandled(),this._positionController.detectVisualPositionChange(qt.event),this._actions.onResizeEnd(qt)},_setContentHeight(){(this.option("forceApplyBindings")||s.lQ)();const qt=this.$overlayContent().get(0),wt=this._chooseHeightStrategy(qt);this.$content().css(this._getHeightCssStyles(wt,qt)),this._setHeightClasses(this.$overlayContent(),wt)},_heightStrategyChangeOffset:(qt,wt)=>qt===tt.flex?-wt:0,_chooseHeightStrategy(qt){const wt="auto"===qt.style.width||""===qt.style.width;let En=tt.static;return this._isAutoHeight()&&this.option("autoResizeEnabled")&&(En=wt||Xe?tt.inherit:tt.flex),En},_getHeightCssStyles(qt,wt){let En={};const ri=this._getOptionValue("maxHeight",wt),Tn=this._getOptionValue("minHeight",wt),Jn=this._splitPopupHeight(),wi=Jn.header+Jn.footer+Jn.contentVerticalOffsets+Jn.popupVerticalOffsets+this._heightStrategyChangeOffset(qt,Jn.popupVerticalPaddings);if(qt===tt.static){if(!this._isAutoHeight()||ri||Tn){const gi=(this.option("fullScreen")?Math.min((0,g.N)(wt).height,(0,D.zk)().innerHeight):(0,g.N)(wt).height)-wi;En={height:Math.max(0,gi),minHeight:"auto",maxHeight:"auto"}}}else{const Bn=(0,T.A)(this._positionController.$visualContainer).get(0),gi=(0,_.dh)(ri,-wi,Bn);En={height:"auto",minHeight:(0,_.d6)(Tn,-wi,Bn),maxHeight:gi}}return En},_setHeightClasses(qt,wt){let En="";for(const ri in tt)tt[ri]!==wt&&(En+=` ${tt[ri]}`);qt.removeClass(En).addClass(wt)},_isAutoHeight(){return"auto"===this.$overlayContent().get(0).style.height},_splitPopupHeight(){const qt=this.topToolbar(),wt=this.bottomToolbar();return{header:(0,_.gP)(qt&&qt.get(0)),footer:(0,_.gP)(wt&&wt.get(0)),contentVerticalOffsets:(0,_.pD)(this.$overlayContent().get(0),!0),popupVerticalOffsets:(0,_.pD)(this.$content().get(0),!0),popupVerticalPaddings:(0,_.pD)(this.$content().get(0),!1)}},_isAllWindowCovered(){return this.callBase()||this.option("fullScreen")},_renderDimensions(){this.option("fullScreen")?this.$overlayContent().css({width:"100%",height:"100%",minWidth:"",maxWidth:"",minHeight:"",maxHeight:""}):this.callBase(),(0,D.Vd)()&&this._renderFullscreenWidthClass()},_dimensionChanged(){this._renderGeometry({isDimensionChange:!0})},_clean(){this.callBase(),this._observeContentResize(!1)},_dispose(){this.callBase(),this._toggleBodyScroll(!0)},_renderFullscreenWidthClass(){this.$overlayContent().toggleClass("dx-popup-fullscreen-width",(0,_.Ot)(this.$overlayContent())===(0,_.RG)(be))},_toggleSafariScrolling(){this.option("enableBodyScroll")&&this.callBase()},_toggleBodyScroll(qt){if(!this._bodyOverflowManager)return;const{setOverflow:wt,restoreOverflow:En}=this._bodyOverflowManager;qt?En():wt()},refreshPosition(){this._renderPosition()},_optionChanged(qt){var wt;const{value:En,name:ri}=qt;switch(ri){case"disabled":this.callBase(qt),this._renderTitle(),this._renderBottom();break;case"animation":this._updateResizeCallbackSkipCondition();break;case"enableBodyScroll":this.option("visible")&&this._toggleBodyScroll(En);break;case"showTitle":case"title":case"titleTemplate":this._renderTitle(),this._renderGeometry(),(0,C.ho)(this.$overlayContent());break;case"bottomTemplate":this._renderBottom(),this._renderGeometry(),(0,C.ho)(this.$overlayContent());break;case"container":var Tn;this.callBase(qt),this.option("resizeEnabled")&&(null===(Tn=this._resizable)||void 0===Tn||Tn.option("area",this._positionController.$dragResizeContainer));break;case"width":case"height":this.callBase(qt),null===(wt=this._resizable)||void 0===wt||wt.option(ri,En);break;case"onTitleRendered":this._createTitleRenderAction(En);break;case"toolbarItems":case"useDefaultToolbarButtons":case"useFlatToolbarButtons":{const Jn=!qt.fullName.match(/^toolbarItems((\[\d+\])(\.(options|visible).*)?)?$/);this._renderTitle(),this._renderBottom(),Jn&&(this._renderGeometry(),(0,C.ho)(this.$overlayContent()));break}case"dragEnabled":this._renderDrag();break;case"dragAndResizeArea":this._positionController.dragAndResizeArea=En,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer),this._positionController.positionContent();break;case"dragOutsideBoundary":this._positionController.dragOutsideBoundary=En,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer);break;case"outsideDragFactor":this._positionController.outsideDragFactor=En;break;case"resizeEnabled":this._renderResize(),this._renderGeometry();break;case"autoResizeEnabled":this._renderGeometry(),(0,C.ho)(this.$overlayContent());break;case"fullScreen":this._positionController.fullScreen=En,this._toggleFullScreenClass(En),this._toggleSafariScrolling(),this._renderGeometry(),(0,C.ho)(this.$overlayContent());break;case"showCloseButton":this._renderTitle();break;case"preventScrollEvents":this.callBase(qt),this._toggleContentScrollClass();break;default:this.callBase(qt)}},bottomToolbar(){return this._$bottom},topToolbar(){return this._$title},$content(){return this._$popupContent},content(){return(0,f.cc)(this.$content())},$overlayContent(){return this._$content},getFocusableElements(){return this.$wrapper().find("[tabindex]").filter((qt,wt)=>wt.getAttribute("tabindex")>=0)}});(0,P.A)("dxPopup",qe);const Tt=qe},357:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>x});var W=M(1973),o=M(5704),P=M(3090),b=M(1830),f=M(612);const h="dx-progressbar-animating-segment",g=f.A.inherit({_getDefaultOptions(){return(0,P.X)(this.callBase(),{value:0,statusFormat:w=>`Progress: ${Math.round(100*w)}%`,showStatus:!0,onComplete:null,activeStateEnabled:!1,statusPosition:"bottom left",_animatingSegmentCount:0})},_defaultOptionsRules(){return this.callBase().concat([{device:w=>"android"===w.platform,options:{_animatingSegmentCount:2}}])},_initMarkup(){this._renderStatus(),this._createCompleteAction(),this.callBase(),this.$element().addClass("dx-progressbar"),this._$wrapper.addClass("dx-progressbar-wrapper"),this._$bar.addClass("dx-progressbar-container"),this.setAria("role","progressbar"),(0,o.A)("<div>").addClass("dx-progressbar-range-container").appendTo(this._$wrapper).append(this._$bar),this._$range.addClass("dx-progressbar-range"),this._toggleStatus(this.option("showStatus"))},_useTemplates:()=>!1,_createCompleteAction(){this._completeAction=this._createActionByOption("onComplete")},_renderStatus(){this._$status=(0,o.A)("<div>").addClass("dx-progressbar-status")},_renderIndeterminateState(){this._$segmentContainer=(0,o.A)("<div>").addClass("dx-progressbar-animating-container");const w=this.option("_animatingSegmentCount");for(let D=0;D<w;D++)(0,o.A)("<div>").addClass(h).addClass(`${h}-${D+1}`).appendTo(this._$segmentContainer);this._$segmentContainer.appendTo(this._$wrapper)},_toggleStatus(w){const D=this.option("statusPosition").split(" ");w?"top"===D[0]||"left"===D[0]?this._$status.prependTo(this._$wrapper):this._$status.appendTo(this._$wrapper):this._$status.detach(),this._togglePositionClass()},_togglePositionClass(){const D=this.option("statusPosition").split(" ");this._$wrapper.removeClass("dx-position-top-left dx-position-top-right dx-position-bottom-left dx-position-bottom-right dx-position-left dx-position-right");let C=`dx-position-${D[0]}`;D[1]&&(C+=`-${D[1]}`),this._$wrapper.addClass(C)},_toggleIndeterminateState(w){w?(this._renderIndeterminateState(),this._$bar.toggle(!1)):(this._$bar.toggle(!0),this._$segmentContainer.remove(),delete this._$segmentContainer)},_renderValue(){const w=this.option("value"),D=this.option("max");w||0===w?(this._$segmentContainer&&this._toggleIndeterminateState(!1),w===D&&this._completeAction(),this.callBase(),this._setStatus()):this._toggleIndeterminateState(!0)},_setStatus(){let w=this.option("statusFormat");w=(0,b.Tn)(w)?w.bind(this):function(C){return C};const D=w(this._currentRatio,this.option("value"));this._$status.text(D)},_dispose(){this._$status.remove(),this.callBase()},_optionChanged(w){switch(w.name){case"statusFormat":this._setStatus();break;case"showStatus":this._toggleStatus(w.value);break;case"statusPosition":this._toggleStatus(this.option("showStatus"));break;case"onComplete":this._createCompleteAction();break;case"_animatingSegmentCount":break;default:this.callBase(w)}}});(0,W.A)("dxProgressBar",g);const x=g},1751:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>B});var W=M(1973),o=M(5973),P=M(5704),b=M(6021),f=M(3090),S=M(1830),T=M(5267),y=M(8496),d=M(4859),c=M(4972);const w=class x extends c.A{_focusTarget(){return(0,P.A)(this.element()).parent()}_nullValueSelectionSupported(){return!0}_getDefaultOptions(){const J=super._getDefaultOptions();return(0,f.X)(J,T.A._dataExpressionDefaultOptions(),{_itemAttributes:{role:"radio"}})}_initMarkup(){super._initMarkup(),(0,d.zE)(()=>{this._itemElements().addClass("dx-radiobutton")})}_keyboardEventBindingTarget(){return this._focusTarget()}_postprocessRenderItem(J){const{itemData:{html:ie},itemElement:re}=J;if(!ie){const q=(0,P.A)("<div>").addClass("dx-radiobutton-icon");(0,P.A)("<div>").addClass("dx-radiobutton-icon-dot").appendTo(q);const Y=(0,P.A)("<div>").append(q).addClass("dx-radio-value-container");(0,P.A)(re).prepend(Y)}super._postprocessRenderItem(J)}_processSelectableItem(J,ie){super._processSelectableItem(J,ie),J.toggleClass("dx-radiobutton-checked",ie).find(".dx-radiobutton-icon").first().toggleClass("dx-radiobutton-icon-checked",ie),this.setAria("checked",ie,J)}_refreshContent(){this._prepareContent(),this._renderContent()}_supportedKeys(){const J=super._supportedKeys();return(0,f.X)({},J,{enter(ie){return ie.preventDefault(),J.enter.apply(this,arguments)},space(ie){return ie.preventDefault(),J.space.apply(this,arguments)}})}_itemElements(){return this._itemContainer().children(this._itemSelector())}_setAriaSelectionAttribute(){}};class G extends y.A{_dataSourceOptions(){return{paginate:!1}}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:{tablet:!0},options:{layout:"horizontal"}},{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}}])}_fireContentReadyAction(J){J&&super._fireContentReadyAction()}_focusTarget(){return this.$element()}_getAriaTarget(){return this.$element()}_getDefaultOptions(){const J=super._getDefaultOptions();return(0,f.X)(J,(0,f.X)(T.A._dataExpressionDefaultOptions(),{hoverStateEnabled:!0,activeStateEnabled:!0,layout:"vertical"}))}_getItemValue(J){return this._valueGetter?this._valueGetter(J):J.text}_getSubmitElement(){return this._$submitElement}_init(){super._init(),this._activeStateUnit=".dx-radiobutton",this._feedbackHideTimeout=100,this._initDataExpressions()}_initMarkup(){(0,P.A)(this.element()).addClass("dx-radiogroup"),this._renderSubmitElement(),this.setAria("role","radiogroup"),this._renderRadios(),this._renderLayout(),super._initMarkup()}_itemClickHandler(J){let{itemElement:ie,event:re,itemData:q}=J;if(this.itemElements().is(ie)){const Y=this._getItemValue(q);Y!==this.option("value")&&(this._saveValueChangeEvent(re),this.option("value",Y))}}_getSelectedItemKeys(){let J=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option("value");return"this"!==this.option("valueExpr")&&null===J||(0,S.O9)(J)?[J]:[]}_setSelection(J){const ie=this._unwrappedValue(J);this._setCollectionWidgetOption("selectedItemKeys",this._getSelectedItemKeys(ie))}_renderValidationState(){var J;super._renderValidationState(),null===(J=this._validationMessage)||void 0===J||J.$content().attr("role","alert")}_optionChanged(J){const{name:ie,value:re}=J;switch(this._dataExpressionOptionChanged(J),ie){case"dataSource":this._invalidate();break;case"focusStateEnabled":case"accessKey":case"tabIndex":this._setCollectionWidgetOption(ie,re);break;case"disabled":super._optionChanged(J),this._setCollectionWidgetOption(ie,re);break;case"valueExpr":this._setCollectionWidgetOption("keyExpr",this._getCollectionKeyExpr());break;case"value":this._setSelection(re),this._setSubmitValue(re),super._optionChanged(J);break;case"items":this._setSelection(this.option("value"));break;case"itemTemplate":case"displayExpr":break;case"layout":this._renderLayout(),this._updateItemsSize();break;default:super._optionChanged(J)}}_render(){super._render(),this._updateItemsSize()}_renderLayout(){const J=this.option("layout"),ie=(0,P.A)(this.element());ie.toggleClass("dx-radiogroup-vertical","vertical"===J),ie.toggleClass("dx-radiogroup-horizontal","horizontal"===J)}_renderRadios(){this._areRadiosCreated=(0,b.cY)();const J=(0,P.A)("<div>").appendTo(this.$element()),{displayExpr:ie,accessKey:re,focusStateEnabled:q,itemTemplate:Y,tabIndex:Z}=this.option();this._createComponent(J,w,{onInitialized:Q=>{let{component:te}=Q;this._radios=te},onContentReady:Q=>{this._fireContentReadyAction(!0)},onItemClick:this._itemClickHandler.bind(this),displayExpr:ie,accessKey:re,dataSource:this._dataSource,focusStateEnabled:q,itemTemplate:Y,keyExpr:this._getCollectionKeyExpr(),noDataText:"",scrollingEnabled:!1,selectByClick:!1,selectionMode:"single",selectedItemKeys:this._getSelectedItemKeys(),tabIndex:Z}),this._areRadiosCreated.resolve()}_renderSubmitElement(){this._$submitElement=(0,P.A)("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue()}_setOptionsByReference(){super._setOptionsByReference(),(0,f.X)(this._optionsByReference,{value:!0})}_setSubmitValue(J){J=J??this.option("value");const ie="this"===this.option("valueExpr")?this._displayGetter(J):J;this._$submitElement.val(ie)}_setCollectionWidgetOption(J,ie){this._areRadiosCreated.done(this._setWidgetOption.bind(this,"_radios",arguments))}_updateItemsSize(){if("horizontal"===this.option("layout")){var J;null===(J=this.itemElements())||void 0===J||J.css("height","auto")}else{var ie;const re=this.option("items").length;null===(ie=this.itemElements())||void 0===ie||ie.css("height",100/re+"%")}}focus(){var J;null===(J=this._radios)||void 0===J||J.focus()}itemElements(){var J;return null===(J=this._radios)||void 0===J?void 0:J._itemElements()}}G.include(T.A),(0,W.A)("dxRadioGroup",G);const B=G},1220:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>q});var W=M(5737),o=M(4504),P=M(1973),b=M(7631),f=M(5704),S=M(4859),T=M(3090),y=M(2660),d=M(3012),c=M(1363),s=M(1830),a=M(6110),u=M(4072),h=M(8664),g=M(9293),_=M(9229);const x="dxResizable",U=(0,g.b4)(h.ni,x),B=(0,g.b4)(h.Cy,x),K=(0,g.b4)(h._N,x),J={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},ie=b.A.inherit({_getDefaultOptions(){return(0,T.X)(this.callBase(),{handles:"all",step:"1",stepPrecision:"simple",area:void 0,minWidth:30,maxWidth:1/0,minHeight:30,maxHeight:1/0,onResizeStart:null,onResize:null,onResizeEnd:null,roundStepValue:!0,keepAspectRatio:!0})},_init(){this.callBase(),this.$element().addClass("dx-resizable")},_initMarkup(){this.callBase(),this._renderHandles()},_render(){this.callBase(),this._renderActions()},_renderActions(){this._resizeStartAction=this._createActionByOption("onResizeStart"),this._resizeEndAction=this._createActionByOption("onResizeEnd"),this._resizeAction=this._createActionByOption("onResize")},_renderHandles(){this._handles=[];const Y=this.option("handles");if("none"===Y||!Y)return;const Z="all"===Y?["top","bottom","left","right"]:Y.split(" "),Q={};(0,y.__)(Z,(te,pe)=>{Q[pe]=!0,this._renderHandle(pe)}),Q.bottom&&Q.right&&this._renderHandle("corner-bottom-right"),Q.bottom&&Q.left&&this._renderHandle("corner-bottom-left"),Q.top&&Q.right&&this._renderHandle("corner-top-right"),Q.top&&Q.left&&this._renderHandle("corner-top-left"),this._attachEventHandlers()},_renderHandle(Y){const Z=(0,f.A)("<div>").addClass("dx-resizable-handle").addClass(`dx-resizable-handle-${Y}`).appendTo(this.$element());this._handles.push(Z)},_attachEventHandlers(){if(this.option("disabled"))return;const Y={};Y[U]=this._dragStartHandler.bind(this),Y[B]=this._dragHandler.bind(this),Y[K]=this._dragEndHandler.bind(this),this._handles.forEach(Z=>{u.A.on(Z,Y,{direction:"both",immediate:!0})})},_detachEventHandlers(){this._handles.forEach(Y=>{u.A.off(Y)})},_toggleEventHandlers(Y){Y?this._attachEventHandlers():this._detachEventHandlers()},_getElementSize(){const Y=this.$element();return"border-box"===Y.css("boxSizing")?{width:(0,c.Ot)(Y),height:(0,c.P$)(Y)}:{width:(0,c.RG)(Y),height:(0,c.Oq)(Y)}},_dragStartHandler(Y){const Z=this.$element();Z.is(".dx-state-disabled, .dx-state-disabled *")?Y.cancel=!0:(this._toggleResizingClass(!0),this._movingSides=this._getMovingSides(Y),this._elementLocation=(0,o.x5)(Z),this._elementSize=this._getElementSize(),this._renderDragOffsets(Y),this._resizeStartAction({event:Y,width:this._elementSize.width,height:this._elementSize.height,handles:this._movingSides}),Y.targetElements=null)},_toggleResizingClass(Y){this.$element().toggleClass("dx-resizable-resizing",Y)},_renderDragOffsets(Y){const Z=this._getArea();if(!Z)return;const Q=(0,f.A)(Y.target).closest(".dx-resizable-handle"),te=(0,c.Ot)(Q),pe=(0,c.P$)(Q),z=Q.offset(),oe=Z.offset,ae=this._getAreaScrollOffset();Y.maxLeftOffset=this._leftMaxOffset=z.left-oe.left-ae.scrollX,Y.maxRightOffset=this._rightMaxOffset=oe.left+Z.width-z.left-te+ae.scrollX,Y.maxTopOffset=this._topMaxOffset=z.top-oe.top-ae.scrollY,Y.maxBottomOffset=this._bottomMaxOffset=oe.top+Z.height-z.top-pe+ae.scrollY},_getBorderWidth(Y,Z){if((0,s.l6)(Y.get(0)))return 0;const Q=Y.css(J[Z]);return parseInt(Q)||0},_proportionate(Y,Z){const Q=this._elementSize;return Z*("x"===Y?Q.width/Q.height:Q.height/Q.width)},_getProportionalDelta(Y){let{x:Z,y:Q}=Y;const te=this._proportionate("y",Z);if(te>=Q)return{x:Z,y:te};const pe=this._proportionate("x",Q);return pe>=Z?{x:pe,y:Q}:{x:0,y:0}},_getDirectionName(Y){const Z=this._movingSides;return"x"===Y?Z.left?"left":"right":Z.top?"top":"bottom"},_fitIntoArea(Y,Z){const Q=this._getDirectionName(Y);return Math.min(Z,this[`_${Q}MaxOffset`]??1/0)},_fitDeltaProportionally(Y){let Z=(0,W.A)({},Y);const Q=this._elementSize,{minWidth:te,minHeight:pe,maxWidth:z,maxHeight:oe}=this.option(),ae=()=>Q.width+Z.x,ee=()=>Q.height+Z.y,he=be=>Z[be]===this._fitIntoArea(be,Z[be]),de=()=>(0,d.r4)(ae(),te,z)&&he("x"),ue=()=>(0,d.r4)(ee(),pe,oe)&&he("y");if(!de()){const be=this._fitIntoArea("x",(0,d.df)(ae(),te,z)-Q.width);Z={x:be,y:this._proportionate("y",be)}}if(!ue()){const be=this._fitIntoArea("y",(0,d.df)(ee(),pe,oe)-Q.height);Z={x:this._proportionate("x",be),y:be}}return de()&&ue()?Z:{x:0,y:0}},_fitDelta(Y){let{x:Z,y:Q}=Y;const te=this._elementSize,{minWidth:pe,minHeight:z,maxWidth:oe,maxHeight:ae}=this.option();return{x:(0,d.df)(te.width+Z,pe,oe)-te.width,y:(0,d.df)(te.height+Q,z,ae)-te.height}},_getDeltaByOffset(Y){const Z=this._movingSides,Q=this._isCornerHandler(Z)&&this.option("keepAspectRatio");let te={x:Y.x*(Z.left?-1:1),y:Y.y*(Z.top?-1:1)};if(Q){const pe=this._getProportionalDelta(te);te=this._fitDeltaProportionally(pe)}else{const pe=this._fitDelta(te);te=this._roundByStep(pe)}return te},_updatePosition(Y,Z){let{width:Q,height:te}=Z;const pe=this._elementLocation,z=this._movingSides,oe=this.$element(),ae=this._getElementSize();(0,o.Cy)(oe,{top:pe.top+(z.top?Y.y*(z.top?-1:1)-((ae.height||te)-te):0),left:pe.left+(z.left?Y.x*(z.left?-1:1)-((ae.width||Q)-Q):0)})},_dragHandler(Y){const Z=this._getOffset(Y),Q=this._getDeltaByOffset(Z),te=this._updateDimensions(Q);this._updatePosition(Q,te),this._triggerResizeAction(Y,te)},_updateDimensions(Y){const Z=he=>"px"===he.substring(he.length-2),Q="strict"===this.option("stepPrecision"),te=this._elementSize,pe=te.width+Y.x,z=te.height+Y.y,oe=this.$element().get(0).style,ae=Y.x||Q||Z(oe.width),ee=Y.y||Q||Z(oe.height);return ae&&this.option({width:pe}),ee&&this.option({height:z}),{width:ae?pe:te.width,height:ee?z:te.height}},_triggerResizeAction(Y,Z){let{width:Q,height:te}=Z;this._resizeAction({event:Y,width:this.option("width")||Q,height:this.option("height")||te,handles:this._movingSides}),(0,_.ho)(this.$element())},_isCornerHandler:Y=>0===Object.values(Y).reduce((Z,Q)=>Z^Q,0),_getOffset(Y){const{offset:Z}=Y,Q=this._movingSides;return!Q.left&&!Q.right&&(Z.x=0),!Q.top&&!Q.bottom&&(Z.y=0),Z},_roundByStep(Y){return"strict"===this.option("stepPrecision")?this._roundStrict(Y):this._roundNotStrict(Y)},_getSteps(){return(0,S.Li)(this.option("step"),!this.option("roundStepValue"))},_roundNotStrict(Y){const Z=this._getSteps();return{x:Y.x-Y.x%Z.h,y:Y.y-Y.y%Z.v}},_roundStrict(Y){const Z=this._movingSides,Q={x:Y.x*(Z.left?-1:1),y:Y.y*(Z.top?-1:1)},te=this._getSteps(),pe=this._elementLocation,z=this._elementSize,ee=((Z.left?pe.left:pe.left+z.width)+Q.x)%te.h,he=((Z.top?pe.top:pe.top+z.height)+Q.y)%te.v,de=Math.sign||(ge=>0==(ge=+ge)||isNaN(ge)?ge:ge>0?1:-1),ue=(ge,fe)=>(1+.2*de(fe))%1*ge,be=(ge,fe)=>Math.abs(ge)<.2*fe;let ve=Q.x-ee,le=Q.y-he;ee>ue(te.h,Q.x)&&(ve+=te.h),he>ue(te.v,Q.y)&&(le+=te.v);const Ce=!Z.left&&!Z.right||be(Q.x,te.h)?0:ve,ye=!Z.top&&!Z.bottom||be(Q.y,te.v)?0:le;return{x:Ce*(Z.left?-1:1),y:ye*(Z.top?-1:1)}},_getMovingSides(Y){const Z=(0,f.A)(Y.target),Q=Z.hasClass("dx-resizable-handle-corner-top-left"),te=Z.hasClass("dx-resizable-handle-corner-top-right"),pe=Z.hasClass("dx-resizable-handle-corner-bottom-left"),z=Z.hasClass("dx-resizable-handle-corner-bottom-right");return{top:Z.hasClass("dx-resizable-handle-top")||Q||te,left:Z.hasClass("dx-resizable-handle-left")||Q||pe,bottom:Z.hasClass("dx-resizable-handle-bottom")||pe||z,right:Z.hasClass("dx-resizable-handle-right")||te||z}},_getArea(){let Y=this.option("area");return(0,s.Tn)(Y)&&(Y=Y.call(this)),(0,s.Qd)(Y)?this._getAreaFromObject(Y):this._getAreaFromElement(Y)},_getAreaScrollOffset(){const Y=this.option("area"),Q={scrollY:0,scrollX:0};if(!(0,s.Tn)(Y)&&!(0,s.Qd)(Y)){const te=(0,f.A)(Y)[0];(0,s.l6)(te)&&(Q.scrollX=te.pageXOffset,Q.scrollY=te.pageYOffset)}return Q},_getAreaFromObject(Y){const Z={width:Y.right-Y.left,height:Y.bottom-Y.top,offset:{left:Y.left,top:Y.top}};return this._correctAreaGeometry(Z),Z},_getAreaFromElement(Y){const Z=(0,f.A)(Y);let Q;return Z.length&&(Q={width:(0,c.hh)(Z),height:(0,c.yV)(Z),offset:(0,T.X)({top:0,left:0},(0,s.l6)(Z[0])?{}:Z.offset())},this._correctAreaGeometry(Q,Z)),Q},_correctAreaGeometry(Y,Z){const Q=Z?this._getBorderWidth(Z,"left"):0,te=Z?this._getBorderWidth(Z,"top"):0;Y.offset.left+=Q+this._getBorderWidth(this.$element(),"left"),Y.offset.top+=te+this._getBorderWidth(this.$element(),"top"),Y.width-=(0,c.Ot)(this.$element())-(0,c.hh)(this.$element()),Y.height-=(0,c.P$)(this.$element())-(0,c.yV)(this.$element())},_dragEndHandler(Y){const Z=this.$element();this._resizeEndAction({event:Y,width:(0,c.Ot)(Z),height:(0,c.P$)(Z),handles:this._movingSides}),this._toggleResizingClass(!1)},_renderWidth(Y){this.option("width",(0,d.df)(Y,this.option("minWidth"),this.option("maxWidth")))},_renderHeight(Y){this.option("height",(0,d.df)(Y,this.option("minHeight"),this.option("maxHeight")))},_optionChanged(Y){switch(Y.name){case"disabled":this._toggleEventHandlers(!Y.value),this.callBase(Y);break;case"handles":this._invalidate();break;case"minWidth":case"maxWidth":(0,a.Vd)()&&this._renderWidth((0,c.Ot)(this.$element()));break;case"minHeight":case"maxHeight":(0,a.Vd)()&&this._renderHeight((0,c.P$)(this.$element()));break;case"onResize":case"onResizeStart":case"onResizeEnd":this._renderActions();break;case"area":case"stepPrecision":case"step":case"roundStepValue":case"keepAspectRatio":break;default:this.callBase(Y)}},_clean(){this.$element().find(".dx-resizable-handle").remove()},_useTemplates:()=>!1});(0,P.A)(x,ie);const q=ie},5444:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>D});var W=M(1973),o=M(5704),P=M(4859),b=M(3090),f=M(2660),S=M(1363),T=M(1830),y=M(6110),d=M(625),c=M(4481),s=M(127);const u="dx-responsivebox-screen-",x=c.A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{rows:[],cols:[],screenByWidth:null,singleColumnScreen:"",height:"100%",width:"100%",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,onLayoutChanged:null,currentScreenFactor:void 0})},_init(){this.option("screenByWidth")||this._options.silent("screenByWidth",y.zY),this.callBase(),this._initLayoutChangedAction()},_initLayoutChangedAction(){this._layoutChangedAction=this._createActionByOption("onLayoutChanged",{excludeValidators:["disabled","readonly"]})},_itemClass:()=>"dx-box-item",_itemDataKey:()=>"dxBoxItemData",_initMarkup(){this.callBase(),this.$element().addClass("dx-responsivebox")},_renderItems(){this._setScreenSize(),this._screenItems=this._itemsByScreen(),this._prepareGrid(),this._spreadItems(),this._layoutItems(),this._linkNodeToItem()},_itemOptionChanged(C){const I=this._findItemElementByItem(C);I.length&&(this._refreshItem(I,C),this._clearItemNodeTemplates(),this._update(!0))},_setScreenSize(){const C=this._getCurrentScreen();this._removeScreenSizeClass(),this.$element().addClass(u+C),this.option("currentScreenFactor",C)},_removeScreenSizeClass(){const C=this.option("currentScreenFactor");C&&this.$element().removeClass(u+C)},_prepareGrid(){const C=this._grid=[];this._prepareRowsAndCols(),(0,f.__)(this._rows,()=>{const I=[];C.push(I),(0,f.__)(this._cols,()=>{I.push(this._createEmptyCell())})})},getSingleColumnRows(){const C=this.option("rows"),I=this._screenItems.length;if(C.length){const L=this._filterByScreen(C),N=[];for(let G=0;G<I;G++){const k=this._defaultSizeConfig();G<L.length&&(0,T.O9)(L[G].shrink)&&(k.shrink=L[G].shrink),N.push(k)}return N}return this._defaultSizeConfig(I)},_prepareRowsAndCols(){this._isSingleColumnScreen()?(this._prepareSingleColumnScreenItems(),this._rows=this.getSingleColumnRows(),this._cols=this._defaultSizeConfig(1)):(this._rows=this._sizesByScreen(this.option("rows")),this._cols=this._sizesByScreen(this.option("cols")))},_isSingleColumnScreen(){return this._screenRegExp().test(this.option("singleColumnScreen"))||!this.option("rows").length||!this.option("cols").length},_prepareSingleColumnScreenItems(){this._screenItems.sort((C,I)=>C.location.row-I.location.row||C.location.col-I.location.col),(0,f.__)(this._screenItems,(C,I)=>{(0,b.X)(I.location,{row:C,col:0,rowspan:1,colspan:1})})},_sizesByScreen(C){return(0,f.Tj)(this._filterByScreen(C),I=>(0,b.X)(this._defaultSizeConfig(),I))},_createDefaultSizeConfig:()=>({ratio:1,baseSize:0,minSize:0,maxSize:0}),_defaultSizeConfig(C){const I=this._createDefaultSizeConfig();if(!arguments.length)return I;const L=[];for(let N=0;N<C;N++)L.push(I);return L},_filterByScreen(C){const I=this._screenRegExp();return(0,P.VM)(C,L=>!L.screen||I.test(L.screen))},_screenRegExp(){const C=this._getCurrentScreen();return new RegExp(`(^|\\s)${C}($|\\s)`,"i")},_getCurrentScreen(){const C=this._screenWidth();return this.option("screenByWidth")(C)},_screenWidth:()=>(0,y.Vd)()?(0,S.RG)((0,y.zk)()):1920,_createEmptyCell:()=>({item:{},location:{colspan:1,rowspan:1}}),_spreadItems(){(0,f.__)(this._screenItems,(C,I)=>{const L=I.location||{},k=this._grid[L.row];this._occupyCells(k&&k[L.col],I)})},_itemsByScreen(){return this.option("items").reduce((C,I)=>{let L=I.location||{};return L=(0,T.Qd)(L)?[L]:L,this._filterByScreen(L).forEach(N=>{C.push({item:I,location:(0,b.X)({rowspan:1,colspan:1},N)})}),C},[])},_occupyCells(C,I){!C||this._isItemCellOccupied(C,I)||((0,b.X)(C,I),this._markSpanningCell(C))},_isItemCellOccupied(C,I){if(!(0,T.RI)(C.item))return!0;let L=!1;return this._loopOverSpanning(I.location,N=>{L=L||!(0,T.RI)(N.item)}),L},_loopOverSpanning(C,I){const L=C.row+C.rowspan-1,N=C.col+C.colspan-1,G=Math.min(L,this._rows.length-1),k=Math.min(N,this._cols.length-1);C.rowspan-=L-G,C.colspan-=N-k;for(let U=C.row;U<=G;U++)for(let B=C.col;B<=k;B++)(U!==C.row||B!==C.col)&&I(this._grid[U][B])},_markSpanningCell(C){this._loopOverSpanning(C.location,I=>{(0,b.X)(I,{item:C.item,spanningCell:C})})},_linkNodeToItem(){(0,f.__)(this._itemElements(),(C,I)=>{const L=(0,o.A)(I),N=L.data("dxBoxItemData");N.box||(N.node=L.children())})},_layoutItems(){const C=this._grid.length,I=C&&this._grid[0].length;if(!C&&!I)return;const L=this._layoutBlock({direction:"col",row:{start:0,end:C-1},col:{start:0,end:I-1}}),N=this._prepareBoxConfig(L.box||{direction:"row",items:[(0,b.X)(L,{ratio:1})]});(0,b.X)(N,this._rootBoxConfig(N.items)),this._$root=(0,o.A)("<div>").appendTo(this._itemContainer()),this._createComponent(this._$root,d.A,N)},_rootBoxConfig(C){return{width:"100%",height:"100%",items:(0,f.__)(C,(L,N)=>{this._needApplyAutoBaseSize(N)&&(0,b.X)(N,{baseSize:"auto"})}),itemTemplate:this._getTemplateByOption("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this._createActionByOption("onItemHold"),onItemClick:this._createActionByOption("onItemClick"),onItemContextMenu:this._createActionByOption("onItemContextMenu"),onItemRendered:this._createActionByOption("onItemRendered")}},_needApplyAutoBaseSize:C=>!(C.baseSize||C.minSize&&"auto"!==C.minSize||C.maxSize&&"auto"!==C.maxSize),_prepareBoxConfig(C){return(0,b.X)(C||{},{crossAlign:"stretch",onItemStateChanged:this.option("onItemStateChanged")})},_layoutBlock(C){return this._isSingleItem(C)?this._itemByCell(C.row.start,C.col.start):this._layoutDirection(C)},_isSingleItem(C){const I=this._grid[C.row.start][C.col.start].location;return C.row.end-C.row.start==I.rowspan-1&&C.col.end-C.col.start==I.colspan-1},_itemByCell(C,I){const L=this._grid[C][I];return L.spanningCell?null:L.item},_layoutDirection(C){const I=[],{direction:L}=C,N=this._crossDirection(L);let G;for(;G=this._nextBlock(C);){if(this._isBlockIndivisible(C.prevBlockOptions,G))throw s.A.Error("E1025");const k=this._layoutBlock({direction:N,row:G.row,col:G.col,prevBlockOptions:C});k&&((0,b.X)(k,this._blockSize(G,N)),I.push(k)),C[N].start=G[N].end+1}return{box:this._prepareBoxConfig({direction:L,items:I})}},_isBlockIndivisible:(C,I)=>C&&C.col.start===I.col.start&&C.col.end===I.col.end&&C.row.start===I.row.start&&C.row.end===I.row.end,_crossDirection:C=>"col"===C?"row":"col",_nextBlock(C){const{direction:I}=C,L=this._crossDirection(I),N=C[I].start,G=C[I].end,k=C[L].start;if(k>C[L].end)return null;let U=1;for(let K=k;K<k+U;K++){let J=1;for(let q=N;q<=G;q++){const Y=this._cellByDirection(I,q,K);J=Math.max(J,Y.location[`${L}span`])}const ie=K+J,re=k+U;ie>re&&(U+=ie-re)}const B={};return B[I]={start:N,end:G},B[L]={start:k,end:k+U-1},B},_cellByDirection(C,I,L){return"col"===C?this._grid[L][I]:this._grid[I][L]},_blockSize(C,I){const L="row"===I?"auto":0,N="row"===I?this._rows:this._cols,G=(0,b.X)(this._createDefaultSizeConfig(),{ratio:0});for(let k=C[I].start;k<=C[I].end;k++){const U=N[k];G.ratio+=U.ratio,G.baseSize+=U.baseSize,G.minSize+=U.minSize,G.maxSize+=U.maxSize,(0,T.O9)(U.shrink)&&(G.shrink=U.shrink)}return G.minSize=G.minSize?G.minSize:L,G.maxSize=G.maxSize?G.maxSize:"auto",this._isSingleColumnScreen()&&(G.baseSize="auto"),G},_update(C){const I=this._$root;this._renderItems(),I&&(C?I.remove():(I.detach(),this._saveAssistantRoot(I))),this._layoutChangedAction()},_saveAssistantRoot(C){this._assistantRoots=this._assistantRoots||[],this._assistantRoots.push(C)},_dispose(){this._clearItemNodeTemplates(),this._cleanUnusedRoots(),this.callBase.apply(this,arguments)},_cleanUnusedRoots(){this._assistantRoots&&(0,f.__)(this._assistantRoots,(C,I)=>{(0,o.A)(I).remove()})},_clearItemNodeTemplates(){(0,f.__)(this.option("items"),function(){delete this.node})},_attachClickEvent:P.lQ,_optionChanged(C){switch(C.name){case"rows":case"cols":case"screenByWidth":case"singleColumnScreen":this._clearItemNodeTemplates(),this._invalidate();break;case"width":case"height":this.callBase(C),this._update();break;case"onLayoutChanged":this._initLayoutChangedAction();break;case"itemTemplate":this._clearItemNodeTemplates(),this.callBase(C);break;case"currentScreenFactor":break;default:this.callBase(C)}},_dimensionChanged(){this._getCurrentScreen()!==this.option("currentScreenFactor")&&this._update()},repaint(){this._update()}});(0,W.A)("dxResponsiveBox",x);const D=x},9994:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>At});var W=M(1973),o=M(5973),P=M(9522),b=M(5704),f=M(4859),S=M(3090),T=M(6110),y=M(8360),d=M(2359),c=M(7281),s=M(9212),a=M(4504),u=M(8684),h=M(6021),g=M(2660),_=M(2823);const J=_.A.inherit({_init(Tt){this.callBase(Tt),this._$topPocket=Tt._$topPocket,this._$pullDown=Tt._$pullDown,this._$refreshingText=Tt._$refreshingText,this._$scrollViewContent=(0,b.A)(Tt.content()),this._$container=(0,b.A)(Tt.container()),this._initCallbacks()},_initCallbacks(){this.pullDownCallbacks=(0,u.A)(),this.releaseCallbacks=(0,u.A)(),this.reachBottomCallbacks=(0,u.A)()},render(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown(){const Tt=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-image"),qt=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-indicator"),wt=new d.A((0,b.A)("<div>")).$element(),En=this._$pullDownText=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-text");this._$pullingDownText=(0,b.A)("<div>").text(this.option("pullingDownText")).appendTo(En),this._$pulledDownText=(0,b.A)("<div>").text(this.option("pulledDownText")).appendTo(En),this._$refreshingText=(0,b.A)("<div>").text(this.option("refreshingText")).appendTo(En),this._$pullDown.empty().append(Tt).append(qt.append(wt)).append(En)},_releaseState(){this._state=0,this._refreshPullDownText()},_refreshPullDownText(){const Tt=this;(0,g.__)([{element:this._$pullingDownText,visibleState:0},{element:this._$pulledDownText,visibleState:1},{element:this._$refreshingText,visibleState:2}],(wt,En)=>{En.element[Tt._state===En.visibleState?"addClass":"removeClass"]("dx-scrollview-pull-down-text-visible")})},update(){this.callBase(),this._setTopPocketOffset()},_updateDimensions(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;const Tt=this._$scrollViewContent.get(0),qt=this._$container.get(0);this._bottomBoundary=Math.max(Tt.clientHeight-qt.clientHeight,0)},_allowedDirections(){const Tt=this.callBase();return Tt.vertical=Tt.vertical||this._pullDownEnabled,Tt},_setTopPocketOffset(){this._$topPocket.css({top:-this._topPocketSize})},handleEnd(){this.callBase(),this._complete()},handleStop(){this.callBase(),this._complete()},_complete(){1===this._state&&(this._setPullDownOffset(this._topPocketSize),clearTimeout(this._pullDownRefreshTimeout),this._pullDownRefreshTimeout=setTimeout(()=>{this._pullDownRefreshing()},400))},_setPullDownOffset(Tt){(0,a.Cy)(this._$topPocket,{top:Tt}),(0,a.Cy)(this._$scrollViewContent,{top:Tt})},handleScroll(Tt){if(this.callBase(Tt),2===this._state)return;const qt=this.location().top,wt=(this._location||0)-qt;this._location=qt,this._isPullDown()?this._pullDownReady():wt>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()},_isPullDown(){return this._pullDownEnabled&&this._location>=this._topPocketSize},_isReachBottom(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom(){3!==this._state&&(this._state=3,this.reachBottomCallbacks.fire())},_pullDownReady(){1!==this._state&&(this._state=1,this._$pullDown.addClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText())},_stateReleased(){0!==this._state&&(this._$pullDown.removeClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this._releaseState())},_pullDownRefreshing(){2!==this._state&&(this._state=2,this._$pullDown.addClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText(),this.pullDownCallbacks.fire())},pullDownEnable(Tt){Tt&&(this._updateDimensions(),this._setTopPocketOffset()),this._pullDownEnabled=Tt},reachBottomEnable(Tt){this._reachBottomEnabled=Tt},pendingRelease(){this._state=1},release(){const Tt=(0,h.cY)();return this._updateDimensions(),clearTimeout(this._releaseTimeout),3===this._state&&(this._state=0),this._releaseTimeout=setTimeout(()=>{this._setPullDownOffset(0),this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),Tt.resolve()},400),Tt.promise()},dispose(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}});var ie=M(1363),re=M(9293);const he=_.A.inherit({_init(Tt){this.callBase(Tt),this._$topPocket=Tt._$topPocket,this._$pullDown=Tt._$pullDown,this._$scrollViewContent=(0,b.A)(Tt.content()),this._$container=(0,b.A)(Tt.container()),this._initCallbacks(),this._location=0},_initCallbacks(){this.pullDownCallbacks=(0,u.A)(),this.releaseCallbacks=(0,u.A)(),this.reachBottomCallbacks=(0,u.A)()},render(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown(){const Tt=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-indicator"),qt=new d.A((0,b.A)("<div>")).$element();this._$icon=(0,b.A)("<div>").addClass("dx-icon-pulldown"),this._$pullDown.empty().append(this._$icon).append(Tt.append(qt))},_releaseState(){this._state=0,this._releasePullDown(),this._updateDimensions()},_releasePullDown(){this._$pullDown.css({opacity:0})},_updateDimensions(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;const Tt=this._$scrollViewContent.get(0),qt=this._$container.get(0);this._bottomBoundary=Math.max(Tt.clientHeight-qt.clientHeight,0)},_allowedDirections(){const Tt=this.callBase();return Tt.vertical=Tt.vertical||this._pullDownEnabled,Tt},handleInit(Tt){this.callBase(Tt),0===this._state&&0===this._location&&(this._startClientY=(0,re.rw)(Tt.originalEvent).y,this._state=4)},handleMove(Tt){this.callBase(Tt),this._deltaY=(0,re.rw)(Tt.originalEvent).y-this._startClientY,4===this._state&&(this._pullDownEnabled&&this._deltaY>0?this._state=5:this._complete()),5===this._state&&(Tt.preventDefault(),this._movePullDown())},_movePullDown(){const Tt=this._getPullDownHeight(),qt=Math.min(3*Tt,this._deltaY+this._getPullDownStartPosition()),wt=180*qt/Tt/3;this._$pullDown.css({opacity:1}).toggleClass("dx-scrollview-pull-down-refreshing",qt<Tt),(0,a.Cy)(this._$pullDown,{top:qt}),this._$icon.css({transform:`rotate(${wt}deg)`})},_isPullDown(){return this._pullDownEnabled&&5===this._state&&this._deltaY>=this._getPullDownHeight()-this._getPullDownStartPosition()},_getPullDownHeight(){return Math.round(.05*(0,ie.P$)(this._$element))},_getPullDownStartPosition(){return-Math.round(1.5*(0,ie.P$)(this._$pullDown))},handleEnd(){this._isPullDown()&&this._pullDownRefreshing(),this._complete()},handleStop(){this._complete()},_complete(){(4===this._state||5===this._state)&&this._releaseState()},handleScroll(Tt){if(this.callBase(Tt),2===this._state)return;const qt=this.location().top,wt=this._location-qt;this._location=qt,wt>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()},_isReachBottom(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom(){this.reachBottomCallbacks.fire()},_stateReleased(){0!==this._state&&(this._$pullDown.removeClass("dx-scrollview-pull-down-loading"),this._releaseState())},_pullDownRefreshing(){this._state=2,this._pullDownRefreshHandler()},_pullDownRefreshHandler(){this._refreshPullDown(),this.pullDownCallbacks.fire()},_refreshPullDown(){this._$pullDown.addClass("dx-scrollview-pull-down-loading"),(0,a.Cy)(this._$pullDown,{top:this._getPullDownHeight()})},pullDownEnable(Tt){this._$topPocket.toggle(Tt),this._pullDownEnabled=Tt},reachBottomEnable(Tt){this._reachBottomEnabled=Tt},pendingRelease(){this._state=1},release(){const Tt=(0,h.cY)();return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._releaseTimeout=setTimeout(()=>{this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),Tt.resolve()},800),Tt.promise()},dispose(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}});var de=M(316);const ue=Math,Oe=de.H.inherit({ctor(){this._topPocketSize=0,this._bottomPocketSize=0,this.callBase.apply(this,arguments),this._initCallbacks(),this._releaseState()},_releaseState(){this._state=0,this._refreshPullDownText()},_refreshPullDownText(){const Tt=this;(0,g.__)([{element:this._$pullingDownText,visibleState:0},{element:this._$pulledDownText,visibleState:1},{element:this._$refreshingText,visibleState:2}],(wt,En)=>{En.element[Tt._state===En.visibleState?"addClass":"removeClass"]("dx-scrollview-pull-down-text-visible")})},_initCallbacks(){this.pullDownCallbacks=(0,u.A)(),this.releaseCallbacks=(0,u.A)(),this.reachBottomCallbacks=(0,u.A)()},_updateBounds(){if("horizontal"!==this._direction){this._topPocketSize=this._$topPocket.get(0).clientHeight,this._bottomPocketSize=this._$bottomPocket.get(0).clientHeight;const qt=this._$container.get(0),wt=this._$content.get(0);this._bottomBoundary=Math.max(wt.clientHeight-this._bottomPocketSize-qt.clientHeight,0)}this.callBase()},_updateScrollbar(){this._scrollbar.option({containerSize:this._containerSize(),contentSize:this._contentSize()-this._topPocketSize-this._bottomPocketSize,scaleRatio:this._getScaleRatio()})},_moveContent(){this.callBase(),this._isPullDown()?this._pullDownReady():this._isReachBottom()?this._reachBottomReady():0!==this._state&&this._stateReleased()},_moveScrollbar(){this._scrollbar.moveTo(this._topPocketSize+this._location)},_isPullDown(){return this._pullDownEnabled&&this._location>=0},_isReachBottom(){const Tt=this._$container.get(0);return this._reachBottomEnabled&&Math.round(this._bottomBoundary-Math.ceil(Tt.scrollTop))<=1},_scrollComplete(){this._inBounds()&&1===this._state?this._pullDownRefreshing():this._inBounds()&&3===this._state?this._reachBottomLoading():this.callBase()},_reachBottomReady(){3!==this._state&&(this._state=3,this._minOffset=this._getMinOffset())},_getMaxOffset(){return-this._topPocketSize},_getMinOffset(){return ue.min(this.callBase(),-this._topPocketSize)},_reachBottomLoading(){this.reachBottomCallbacks.fire()},_pullDownReady(){1!==this._state&&(this._state=1,this._maxOffset=0,this._$pullDown.addClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText())},_stateReleased(){0!==this._state&&(this._releaseState(),this._updateBounds(),this._$pullDown.removeClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this.releaseCallbacks.fire())},_pullDownRefreshing(){2!==this._state&&(this._state=2,this._$pullDown.addClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText(),this.pullDownCallbacks.fire())},_releaseHandler(){return 0===this._state&&this._moveToBounds(),this._update(),this._releaseTask&&this._releaseTask.abort(),this._releaseTask=(0,f.uG)(this._release.bind(this)),this._releaseTask.promise},_release(){this._stateReleased(),this._scrollComplete()},_reachBottomEnablingHandler(Tt){this._reachBottomEnabled!==Tt&&(this._reachBottomEnabled=Tt,this._updateBounds())},_pullDownEnablingHandler(Tt){this._pullDownEnabled!==Tt&&(this._pullDownEnabled=Tt,this._considerTopPocketChange(),this._updateHandler())},_considerTopPocketChange(){this._location-=(0,ie.Oq)(this._$topPocket)||-this._topPocketSize,this._maxOffset=0,this._move()},_pendingReleaseHandler(){this._state=1},dispose(){this._releaseTask&&this._releaseTask.abort(),this.callBase()}}),$e=de.G.inherit({_init(Tt){this.callBase(Tt),this._$pullDown=Tt._$pullDown,this._$topPocket=Tt._$topPocket,this._$bottomPocket=Tt._$bottomPocket,this._initCallbacks()},_initCallbacks(){this.pullDownCallbacks=(0,u.A)(),this.releaseCallbacks=(0,u.A)(),this.reachBottomCallbacks=(0,u.A)()},render(){this._renderPullDown(),this.callBase()},_renderPullDown(){const Tt=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-image"),qt=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-indicator"),wt=new d.A((0,b.A)("<div>")).$element(),En=this._$pullDownText=(0,b.A)("<div>").addClass("dx-scrollview-pull-down-text");this._$pullingDownText=(0,b.A)("<div>").text(this.option("pullingDownText")).appendTo(En),this._$pulledDownText=(0,b.A)("<div>").text(this.option("pulledDownText")).appendTo(En),this._$refreshingText=(0,b.A)("<div>").text(this.option("refreshingText")).appendTo(En),this._$pullDown.empty().append(Tt).append(qt.append(wt)).append(En)},pullDownEnable(Tt){this._eventHandler("pullDownEnabling",Tt)},reachBottomEnable(Tt){this._eventHandler("reachBottomEnabling",Tt)},_createScroller(Tt){const qt=this,wt=qt._scrollers[Tt]=new Oe(qt._scrollerOptions(Tt));wt.pullDownCallbacks.add(()=>{qt.pullDownCallbacks.fire()}),wt.releaseCallbacks.add(()=>{qt.releaseCallbacks.fire()}),wt.reachBottomCallbacks.add(()=>{qt.reachBottomCallbacks.fire()})},_scrollerOptions(Tt){return(0,S.X)(this.callBase(Tt),{$topPocket:this._$topPocket,$bottomPocket:this._$bottomPocket,$pullDown:this._$pullDown,$pullDownText:this._$pullDownText,$pullingDownText:this._$pullingDownText,$pulledDownText:this._$pulledDownText,$refreshingText:this._$refreshingText})},pendingRelease(){this._eventHandler("pendingRelease")},release(){return this._eventHandler("release").done(this._updateAction)},location(){const Tt=this.callBase();return Tt.top+=(0,ie.Oq)(this._$topPocket),Tt},dispose(){(0,g.__)(this._scrollers,function(){this.dispose()}),this.callBase()}});var Be=M(1037);const Fe={pullDown:J,swipeDown:he,simulated:$e},Xe=!(0,T.Vd)(),vt=Be.A.inherit(Xe?{finishLoading:f.lQ,release:f.lQ,refresh:f.lQ,scrollOffset:()=>({top:0,left:0}),_optionChanged(Tt){if("onUpdated"!==Tt.name)return this.callBase.apply(this,arguments)}}:{_getDefaultOptions(){return(0,S.X)(this.callBase(),{pullingDownText:y.A.format("dxScrollView-pullingDownText"),pulledDownText:y.A.format("dxScrollView-pulledDownText"),refreshingText:y.A.format("dxScrollView-refreshingText"),reachBottomText:y.A.format("dxScrollView-reachBottomText"),onPullDown:null,onReachBottom:null,refreshStrategy:"pullDown"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"android"===o.A.real().platform,options:{refreshStrategy:"swipeDown"}},{device:()=>(0,s.Nt)(),options:{pullingDownText:"",pulledDownText:"",refreshingText:"",reachBottomText:""}}])},_init(){this.callBase(),this._loadingIndicatorEnabled=!0},_initScrollableMarkup(){this.callBase(),this.$element().addClass("dx-scrollview"),this._initContent(),this._initTopPocket(),this._initBottomPocket(),this._initLoadPanel()},_initContent(){const Tt=(0,b.A)("<div>").addClass("dx-scrollview-content");this._$content.wrapInner(Tt)},_initTopPocket(){const Tt=this._$topPocket=(0,b.A)("<div>").addClass("dx-scrollview-top-pocket"),qt=this._$pullDown=(0,b.A)("<div>").addClass("dx-scrollview-pull-down");Tt.append(qt),this._$content.prepend(Tt)},_initBottomPocket(){const Tt=this._$bottomPocket=(0,b.A)("<div>").addClass("dx-scrollview-bottom-pocket"),qt=this._$reachBottom=(0,b.A)("<div>").addClass("dx-scrollview-scrollbottom"),wt=(0,b.A)("<div>").addClass("dx-scrollview-scrollbottom-indicator"),En=new d.A((0,b.A)("<div>")).$element(),ri=this._$reachBottomText=(0,b.A)("<div>").addClass("dx-scrollview-scrollbottom-text");this._updateReachBottomText(),qt.append(wt.append(En)).append(ri),Tt.append(qt),this._$content.append(Tt)},_initLoadPanel(){const Tt=(0,b.A)("<div>").addClass("dx-scrollview-loadpanel").appendTo(this.$element()),qt={shading:!1,delay:400,message:this.option("refreshingText"),position:{of:this.$element()}};this._loadPanel=this._createComponent(Tt,c.A,qt)},_updateReachBottomText(){this._$reachBottomText.text(this.option("reachBottomText"))},_createStrategy(){const Tt=this.option("useNative")?this.option("refreshStrategy"):"simulated";this._strategy=new(0,Fe[Tt])(this),this._strategy.pullDownCallbacks.add(this._pullDownHandler.bind(this)),this._strategy.releaseCallbacks.add(this._releaseHandler.bind(this)),this._strategy.reachBottomCallbacks.add(this._reachBottomHandler.bind(this))},_createActions(){this.callBase(),this._pullDownAction=this._createActionByOption("onPullDown"),this._reachBottomAction=this._createActionByOption("onReachBottom"),this._tryRefreshPocketState()},_tryRefreshPocketState(){this._pullDownEnable(this.hasActionSubscription("onPullDown")),this._reachBottomEnable(this.hasActionSubscription("onReachBottom"))},on(Tt){const qt=this.callBase.apply(this,arguments);return("pullDown"===Tt||"reachBottom"===Tt)&&this._tryRefreshPocketState(),qt},_pullDownEnable(Tt){if(0===arguments.length)return this._pullDownEnabled;this._$pullDown&&this._strategy&&(this._$pullDown.toggle(Tt),this._strategy.pullDownEnable(Tt),this._pullDownEnabled=Tt)},_reachBottomEnable(Tt){if(0===arguments.length)return this._reachBottomEnabled;this._$reachBottom&&this._strategy&&(this._$reachBottom.toggle(Tt),this._strategy.reachBottomEnable(Tt),this._reachBottomEnabled=Tt)},_pullDownHandler(){this._loadingIndicator(!1),this._pullDownLoading()},_loadingIndicator(Tt){if(arguments.length<1)return this._loadingIndicatorEnabled;this._loadingIndicatorEnabled=Tt},_pullDownLoading(){this.startLoading(),this._pullDownAction()},_reachBottomHandler(){this._loadingIndicator(!1),this._reachBottomLoading()},_reachBottomLoading(){this.startLoading(),this._reachBottomAction()},_releaseHandler(){this.finishLoading(),this._loadingIndicator(!0)},_optionChanged(Tt){switch(Tt.name){case"onPullDown":case"onReachBottom":this._createActions();break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"refreshStrategy":this._invalidate();break;case"reachBottomText":this._updateReachBottomText();break;default:this.callBase(Tt)}},content(){return(0,P.cc)(this._$content.children().eq(1))},release(Tt){return void 0!==Tt&&this.toggleLoading(!Tt),this._strategy.release()},toggleLoading(Tt){this._reachBottomEnable(Tt)},refresh(){this.hasActionSubscription("onPullDown")&&(this._strategy.pendingRelease(),this._pullDownLoading())},startLoading(){this._loadingIndicator()&&this.$element().is(":visible")&&this._loadPanel.show(),this._lock()},finishLoading(){this._loadPanel.hide(),this._unlock()},_dispose(){this._strategy.dispose(),this.callBase(),this._loadPanel&&this._loadPanel.$element().remove()}});(0,W.A)("dxScrollView",vt);const At=vt},4602:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(1037).A},6520:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>L}),M(5470);var o=M(1973),P=M(6054),b=M(9522),f=M(7251),S=M(5704),T=M(4859),y=M(6021),d=M(3090),c=M(2660),s=M(1830),a=M(9293),u=M(8360);const C=M(1010).A.inherit({_supportedKeys(){const N=this,G=this.callBase(),k=function(B){this._isEditable()?this._valueSubstituted()&&(this._preventFiltering=!0):this.option("showClearButton")&&(B.preventDefault(),this.clear()),this._savedTextRemoveEvent=B,this._preventSubstitution=!0},U=function(){N.option("searchEnabled")&&N._valueSubstituted()&&N._searchHandler()};return(0,d.X)({},G,{tab(){this.option("opened")&&!this._popup.getFocusableElements().length&&this._resetCaretPosition(!0),G.tab&&G.tab.apply(this,arguments),this._cancelSearchIfNeed()},upArrow(B){if(G.upArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(B),!0},downArrow(B){if(G.downArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(B),!0},leftArrow(){var B;U(),null===(B=G.leftArrow)||void 0===B||B.apply(this,arguments)},rightArrow(){U(),G.rightArrow&&G.rightArrow.apply(this,arguments)},home(){U(),G.home&&G.home.apply(this,arguments)},end(){U(),G.end&&G.end.apply(this,arguments)},escape(){const B=G.escape&&G.escape.apply(this,arguments);return this._cancelEditing(),B??!0},enter(B){const K=this.option("opened"),J=this._input().val().trim(),ie=J&&this._list&&!this._list.option("focusedElement");if(!J&&(0,s.O9)(this.option("value"))&&this.option("allowClearing"))this._saveValueChangeEvent(B),this.option({selectedItem:null,value:null}),this.close();else{if(this.option("acceptCustomValue"))return B.preventDefault(),ie&&(K&&this._toggleOpenState(),this._valueChangeEventHandler(B)),K;if(G.enter&&G.enter.apply(this,arguments))return K}},space(B){const K=this.option("opened"),J=this.option("searchEnabled"),ie=this.option("acceptCustomValue");if(K&&!J&&!ie)return B.preventDefault(),this._valueChangeEventHandler(B),!0},backspace:k,del:k})},_getDefaultOptions(){return(0,d.X)(this.callBase(),{placeholder:u.A.format("Select"),fieldTemplate:null,customItemCreateEvent:"change",valueChangeEvent:"change",acceptCustomValue:!1,onCustomItemCreating(N){(0,s.O9)(N.customItem)||(N.customItem=N.text)},showSelectionControls:!1,allowClearing:!0,tooltipEnabled:!1,openOnFieldClick:!0,showDropDownButton:!0,displayCustomValue:!1,useHiddenSubmitElement:!0})},_init(){this.callBase(),this._initCustomItemCreatingAction()},_initMarkup(){this.$element().addClass("dx-selectbox"),this._renderTooltip(),this.callBase(),this._$container.addClass("dx-selectbox-container")},_createPopup(){this.callBase(),this._popup.$element().addClass("dx-selectbox-popup"),this._popup.$overlayContent().attr("tabindex",-1)},_popupWrapperClass(){return`${this.callBase()} dx-selectbox-popup-wrapper`},_setDeprecatedOptions(){this.callBase(),(0,d.X)(this._deprecatedOptions,{valueChangeEvent:{since:"22.2",alias:"customItemCreateEvent"}})},_cancelEditing(){!this.option("searchEnabled")&&this._list&&(this._focusListElement(null),this._updateField(this.option("selectedItem")))},_renderOpenedState(){this.callBase(),this.option("opened")&&(this._scrollToSelectedItem(),this._focusSelectedElement())},_focusSelectedElement(){if(!this._searchValue())return void this._focusListElement(null);const{items:G,selectedItem:k}=this.option(),U=this._list._itemElements(),B=G?.indexOf(k)??-1,K=-1===B||this._isCustomItemSelected()?null:U.eq(B);this._focusListElement(K)},_renderFocusedElement(){if(!this._list)return;if(!this._searchValue()||this.option("acceptCustomValue"))return void this._focusListElement(null);const k=this._list._itemElements().not(".dx-state-disabled").eq(0);this._focusListElement(k)},_focusListElement(N){this._preventInputValueRender=!0,this._list.option("focusedElement",(0,b.cc)(N)),delete this._preventInputValueRender},_scrollToSelectedItem(){this._list&&this._list.scrollToItem(this._list.option("selectedItem"))},_listContentReadyHandler(){this.callBase(),(!this._dataController.paginate()||!this._needPopupRepaint())&&this._scrollToSelectedItem()},_renderValue(){return this._renderInputValue(),this._setSubmitValue(),(0,y.cY)().resolve()},_renderInputValue(){return this.callBase().always(()=>{this._renderInputValueAsync()})},_renderInputValueAsync(){this._renderTooltip(),this._renderInputValueImpl().always(()=>{this._refreshSelected()})},_renderInputValueImpl(){return this._renderField(),(0,y.cY)().resolve()},_setNextItem(N){const G=this._calcNextItem(N),k=this._valueGetter(G);this._setValue(k)},_setNextValue(N){(this._dataController.isLoaded()?(0,y.cY)().resolve():this._dataController.load()).done(()=>{const k=this._getSelectedIndex(),U=this._dataController.pageSize(),B=this._dataController.isLastPage(),K=k===this._items().length-1;this._saveValueChangeEvent(N);const J="downArrow"===(0,a.YD)(N)?1:-1;U&&!B&&K&&J>0?(this._popup||this._createPopup(),this._dataController.isLoading()||this._list._loadNextPage().done(this._setNextItem.bind(this,J))):this._setNextItem(J)})},_setSelectedItem(N){const G=!this._isCustomValueAllowed()&&void 0===N;this.callBase(G?null:N),!G&&(!this._isEditable()||this._isCustomItemSelected())&&this._setListOption("selectedItem",this.option("selectedItem"))},_isCustomValueAllowed(){return this.option("acceptCustomValue")||this.callBase()},_displayValue(N){return N=!(0,s.O9)(N)&&this._isCustomValueAllowed()?this.option("value"):N,this.callBase(N)},_listConfig(){const N=(0,d.X)(this.callBase(),{pageLoadMode:"scrollBottom",onSelectionChanged:this._getSelectionChangeHandler(),selectedItem:this.option("selectedItem"),onFocusedItemChanged:this._listFocusedItemChangeHandler.bind(this)});return this.option("showSelectionControls")&&(0,d.X)(N,{showSelectionControls:!0,selectByClick:!0}),N},_listFocusedItemChangeHandler(N){if(this._preventInputValueRender)return;const G=N.component,k=(0,S.A)(G.option("focusedElement")),U=G._getItemData(k);this._updateField(U)},_updateField(N){if(!this._getTemplateByOption("fieldTemplate")||!this.option("fieldTemplate")){const k=this._displayGetter(N);return this.option("text",k),void this._renderDisplayText(k)}this._renderField()},_getSelectionChangeHandler(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):T.lQ},_selectionChangeHandler(N){(0,c.__)(N.addedItems||[],(G,k)=>{this._setValue(this._valueGetter(k))})},_getActualSearchValue(){return this._dataController.searchValue()},_isInlineAutocompleteEnabled(){return this.option("searchEnabled")&&!this.option("acceptCustomValue")&&"startswith"===this.option("searchMode")},_getAriaAutocomplete(){const{disabled:N,readOnly:G,searchEnabled:k}=this.option();return!k||G||N?"none":this._isInlineAutocompleteEnabled()?"both":"list"},_toggleOpenState(N){if(!this.option("disabled")){if(!(N=arguments.length?N:!this.option("opened"))&&!this._shouldClearFilter()&&this._restoreInputText(!0),this._wasSearch()&&N)if(this._wasSearch(!1),(this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded())&&this._dataController.getDataSource()){if(this._searchTimer)return;const k=this._getActualSearchValue();k&&this._wasSearch(!0),this._filterDataSource(k||null)}else this._setListOption("items",[]);N&&this._scrollToSelectedItem(),this.callBase(N)}},_renderTooltip(){this.option("tooltipEnabled")&&this.$element().attr("title",this.option("displayValue"))},_renderDimensions(){this.callBase(),this._updatePopupWidth(),this._updateListDimensions()},_isValueEqualInputText(){const N=this.option("selectedItem");if(null===N)return!1;const G=this._displayGetter(N);return(G?String(G):"")===this._searchValue()},_popupHidingHandler(){this._isValueEqualInputText()&&this._cancelEditing(),this.callBase()},_popupHiddenHandler(){this.callBase(),this._shouldCancelSearch()&&(this._wasSearch(!1),this._searchCanceled(),this._shouldCancelSearch(!1))},_restoreInputText(N){this.option("readOnly")||this._loadItemDeferred&&this._loadItemDeferred.always(()=>{const{acceptCustomValue:G,text:k,selectedItem:U}=this.option();G?!N&&!this._isValueChanging&&(this._updateField(U??this._createCustomItem(k)),this._clearFilter()):this.option("searchEnabled")&&!this._searchValue()&&this.option("allowClearing")?this._clearTextValue():this._isValueEqualInputText()||this._renderInputValue().always(B=>{const K=(0,T.YD)(B,U);this._setSelectedItem(K),this._updateField(K),this._clearFilter()})})},_valueChangeEventIncludesBlur(){return this.option(this._getValueChangeEventOptionName()).includes("blur")},_isPreventedFocusOutEvent(N){return this._preventNestedFocusEvent(N)||this._valueChangeEventIncludesBlur()},_focusOutHandler(N){this._isPreventedFocusOutEvent(N)||(this._isOverlayNestedTarget(N.relatedTarget)||(this._restoreInputText(),this._clearSearchTimer()),this._cancelSearchIfNeed(N)),N.target=this._input().get(0),this.callBase(N)},_cancelSearchIfNeed(N){const{searchEnabled:G}=this.option(),k=this._isOverlayNestedTarget(N?.relatedTarget);if(this._wasSearch()&&G&&!k){var B;const K=null===(B=this._popup)||void 0===B?void 0:B._hideAnimationProcessing;this._clearSearchTimer(),K?this._shouldCancelSearch(!0):(this._wasSearch(!1),this._searchCanceled())}},_shouldCancelSearch(N){if(!arguments.length)return this._shouldCancelSearchValue;this._shouldCancelSearchValue=N},_isOverlayNestedTarget:N=>!!(0,S.A)(N).closest(".dx-selectbox-popup-wrapper").length,_clearTextValue(){const N=this.option("selectedItem"),G=this._displayGetter(N);N&&""!==G&&(this._savedTextRemoveEvent&&this._saveValueChangeEvent(this._savedTextRemoveEvent),this.option("value",null)),delete this._savedTextRemoveEvent},_shouldOpenPopup(){return this._needPassDataSourceToList()&&this._wasSearch()},_isFocused(){const N=P.A.getActiveElement(this.element());return this.callBase()&&(0,S.A)(N).closest(this._input()).length>0},_getValueChangeEventOptionName:()=>"customItemCreateEvent",_renderValueChangeEvent(){this._isEditable()&&this.callBase()},_fieldRenderData(){const N=this._list&&this.option("opened")&&(0,S.A)(this._list.option("focusedElement"));return N&&N.length?this._list._getItemData(N):this.option("selectedItem")},_isSelectedValue(N){return this._isValueEquals(N,this.option("value"))},_shouldCloseOnItemClick(){return!(this.option("showSelectionControls")&&"single"!==this.option("selectionMode"))},_listItemClickHandler(N){const G=this._getCurrentValue();this._focusListElement((0,S.A)(N.itemElement)),this._saveValueChangeEvent(N.event),this._completeSelection(this._valueGetter(N.itemData)),this._shouldCloseOnItemClick()&&this.option("opened",!1),this.option("searchEnabled")&&G===this._valueGetter(N.itemData)&&this._updateField(N.itemData),this._shouldClearFilter()&&this._cancelSearchIfNeed()},_shouldClearFilter(){return this._wasSearch()},_completeSelection(N){this._setValue(N)},_loadItem(N,G){const k=this,U=(0,y.cY)();return this.callBase(N,G).done(B=>{U.resolve(B)}).fail(B=>{if(null!=B&&B.shouldSkipCallback)return;const K=k.option("selectedItem");k.option("acceptCustomValue")&&N===k._valueGetter(K)?U.resolve(K):U.reject()}),U.promise()},_loadInputValue(N,G){return this._loadItemDeferred=this._loadItem(N).always(G),this._loadItemDeferred},_isCustomItemSelected(){const N=this.option("selectedItem"),G=this._searchValue(),k=this._displayGetter(N);return!k||G!==k.toString()},_valueChangeEventHandler(N){this.option("acceptCustomValue")&&this._isCustomItemSelected()&&!this._isValueChanging&&(this._isValueChanging=!0,this._customItemAddedHandler(N))},_initCustomItemCreatingAction(){this._customItemCreatingAction=this._createActionByOption("onCustomItemCreating")},_createCustomItem(N){const G={text:N},k=this._customItemCreatingAction(G),U=(0,T.YD)(k,G.customItem);return(0,s.O9)(k)&&f.A.log("W0015","onCustomItemCreating","customItem"),U},_customItemAddedHandler(N){const G=this._searchValue(),k=this._createCustomItem(G);if(this._saveValueChangeEvent(N),void 0===k)throw this._renderValue(),f.A.Error("E0121");(0,s.yL)(k)?(0,y.Sx)(k).done(this._setCustomItem.bind(this)).fail(this._setCustomItem.bind(this,null)):this._setCustomItem(k)},_setCustomItem(N){this._disposed||(this.option("selectedItem",N=N||null),this._cancelSearchIfNeed(),this._setValue(this._valueGetter(N)),this._renderDisplayText(this._displayGetter(N)),this._isValueChanging=!1)},_clearValueHandler(N){return this._preventFiltering=!0,this.callBase(N),this._searchCanceled(),!1},_wasSearch(N){if(!arguments.length)return!!this._wasSearchValue;this._wasSearchValue=N},_searchHandler(){this._preventFiltering?delete this._preventFiltering:(this._needPassDataSourceToList()&&this._wasSearch(!0),this.callBase(arguments))},_dataSourceFiltered(N){this.callBase(),null!==N&&(this._renderInputSubstitution(),this._renderFocusedElement())},_valueSubstituted(){const N=this._input().get(0),G=this._searchValue().length,k=0===N.selectionStart&&N.selectionEnd===G,U=N.selectionStart!==N.selectionEnd,B=G===N.selectionEnd;return this._wasSearch()&&U&&!k&&B&&this._shouldSubstitutionBeRendered()},_shouldSubstitutionBeRendered(){return!this._preventSubstitution&&this._isInlineAutocompleteEnabled()},_renderInputSubstitution(){if(!this._shouldSubstitutionBeRendered())return void delete this._preventSubstitution;const N=this._list&&this._getPlainItems(this._list.option("items"))[0];if(!N)return;const G=this._input(),k=G.val().length;if(0===k)return;const U=G.get(0),B=this._displayGetter(N).toString();U.value=B,this._caret({start:k,end:B.length})},_dispose(){this._renderInputValueAsync=T.lQ,delete this._loadItemDeferred,this.callBase()},_optionChanged(N){switch(N.name){case"customItemCreateEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onCustomItemCreating":this._initCustomItemCreatingAction();break;case"tooltipEnabled":this._renderTooltip();break;case"readOnly":case"disabled":case"searchMode":this.callBase(N),this._setDefaultAria();break;case"displayCustomValue":case"acceptCustomValue":case"showSelectionControls":this._invalidate();break;case"allowClearing":break;default:this.callBase(N)}}});(0,o.A)("dxSelectBox",C);const L=C},8953:(In,Ze,M)=>{"use strict";M.d(Ze,{Dy:()=>K,Mo:()=>ie,WX:()=>k,Z7:()=>D,js:()=>B,rK:()=>G,sf:()=>J,zY:()=>U});var W=M(5704),o=M(4072),P=M(9293),b=M(3090),f=M(6054),S=M(4859);const T="dx-state-focused",y="dx-cell-focus-disabled",c=".dx-datagrid-rowsview .dx-row",s=`${c} > td`,a=".dx-treelist-rowsview .dx-row",u=`${a} > td`,h={groupPanel:[".dx-datagrid-group-panel .dx-group-panel-item[tabindex]"],columnHeaders:[".dx-datagrid-headers .dx-header-row > td.dx-datagrid-action",".dx-treelist-headers .dx-header-row > td.dx-treelist-action"],filterRow:[".dx-datagrid-headers .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor-input",".dx-treelist-headers .dx-treelist-filter-row .dx-editor-cell .dx-texteditor-input"],rowsView:[".dx-row-focused",`${c}[tabindex]`,`${s}[tabindex]`,`${s}`,`${a}[tabindex]`,`${u}[tabindex]`,`${u}`],footer:[".dx-datagrid-total-footer .dx-datagrid-summary-item",".dx-treelist-total-footer .dx-treelist-summary-item"],filterPanel:[".dx-datagrid-filter-panel .dx-icon-filter",".dx-treelist-filter-panel .dx-icon-filter"],pager:[".dx-datagrid-pager [tabindex]",".dx-treelist-pager [tabindex]"]};let g=!1,_=!1,x=null;function D(re,q){const Y=(0,W.A)(re),Z=Y.attr("aria-label"),te=C(Z,q.element()).index(Y);x=(0,b.X)({},{ariaLabel:Z,index:te},{viewInstance:q})}function C(re,q){let Z;return Z=(0,W.A)(q).find(re?`[aria-label="${re}"][tabindex]`:"[tabindex]"),Z}function I(re,q){const Y=q?.getRootNode()||f.A.getDocument();for(const Z in re){const Q=re[Z],te=(0,W.A)(Y).find(Q).first();if(te.length)return te}}function N(){_="visible"===f.A.getDocument().visibilityState}function G(){o.A.on(f.A.getDocument(),"visibilitychange",N)}function k(){o.A.off(f.A.getDocument(),"visibilitychange",N)}function U(re,q){_=!0,re.focus({preventScroll:q}),_=!1}function B(re,q,Y,Z,Q,te){if(q.option("useLegacyKeyboardNavigation"))return S.lQ;const pe=()=>(0,W.A)(q.element()),z=ee=>function w(re,q,Y,Z,Q,te){if(function L(re,q,Y){const Z={event:q,handled:!1};return Y?Y(Z):re._createActionByOption("onKeyDown")(Z),Z.handled}(q,Y.originalEvent,te))return;const z=(0,P.YD)(Y);"enter"===z||"space"===z?(D(Y.target,q),Z&&Z({event:Y})):"tab"===z?Q.addClass(T):J(re,q,Y)}(re,q,ee,Q,pe(),te),oe=()=>{g=!0,pe().removeClass(T)},ae=()=>{!g&&!_&&pe().addClass(T),g=!1};return o.A.on(Y,"keydown",Z,z),o.A.on(Y,"mousedown",Z,oe),o.A.on(Y,"focusin",Z,ae),()=>{o.A.off(Y,"keydown",Z,z),o.A.off(Y,"mousedown",Z,oe),o.A.off(Y,"focusin",Z,ae)}}function K(re){if(!re.option("useLegacyKeyboardNavigation")&&x){const q=x.viewInstance;if(q){const Z=C(x.ariaLabel,q.element()).eq(x.index);x=null,o.A.trigger(Z,"focus")}}}function J(re,q,Y){const Z=(0,P.YD)(Y);if(Y.ctrlKey&&("upArrow"===Z||"downArrow"===Z)){const Q=Object.keys(h);let te=Q.indexOf(re);for(;te>=0&&te<Q.length;){te="upArrow"===Z?--te:++te;const oe=I(h[Q[te]],Y.target);if(oe&&oe.length){oe.attr("tabindex",q.option("tabindex")||0),o.A.trigger(oe,"focus"),oe.removeClass(y);break}}}}function ie(re,q){re.option("useLegacyKeyboardnavigation")||q.attr("tabindex",re.option("tabindex")||0)}},9551:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T});var W=M(1830),o=M(2660);const P=["year","month","day"],b=["year","month","day","hour","minute"],f=function(y){return"date"===y||"datetime"===y},S=function(y){let d,c=[];const s=["year","month","day","hour","minute","second"],a=y.headerFilter&&y.headerFilter.groupInterval,u="quarter"===a?"month":a;return f(y.dataType)&&null!==a?(c="datetime"===y.dataType?b:P,d=s.indexOf(u),d>=0&&(c=s.slice(0,d),c.push(a)),c):(0,W.O9)(a)?Array.isArray(a)?a:[a]:void 0},T=function(){const y=function(a,u){let h=a.dataField||a.selector;return"search"===u&&(h=a.displayField||a.calculateDisplayValue||h),h},d=function(a,u){const h=this;let g,_,x;const w=y(h,u);if(Array.isArray(a)&&(0,W.O9)(a[0])&&(0,W.O9)(a[1]))return _=[w,">=",a[0]],x=[w,"<=",a[1]],f(h.dataType)&&(D=a[1]).getHours()+D.getMinutes()+D.getSeconds()+D.getMilliseconds()<1&&(g=new Date(a[1].getTime()),"date"===h.dataType&&g.setDate(a[1].getDate()+1),x=[w,"<",g]),[_,"and",x];var D},c=function(a,u,h){const g=this;let _,x,w;const D=(0,W.$P)(I=a)?[I.getFullYear(),I.getMonth(),I.getDate(),I.getHours(),I.getMinutes(),I.getSeconds()]:(0,o.Tj)((""+I).split("/"),function(L,N){return 1===N?Number(L)-1:Number(L)}),C=y(g,h);var I;switch("headerFilter"===h?w=S(g)[D.length-1]:"datetime"===g.dataType&&(w="minute"),w){case"year":_=new Date(D[0],0,1),x=new Date(D[0]+1,0,1);break;case"month":_=new Date(D[0],D[1],1),x=new Date(D[0],D[1]+1,1);break;case"quarter":_=new Date(D[0],3*D[1],1),x=new Date(D[0],3*D[1]+3,1);break;case"hour":_=new Date(D[0],D[1],D[2],D[3]),x=new Date(D[0],D[1],D[2],D[3]+1);break;case"minute":_=new Date(D[0],D[1],D[2],D[3],D[4]),x=new Date(D[0],D[1],D[2],D[3],D[4]+1);break;case"second":_=new Date(D[0],D[1],D[2],D[3],D[4],D[5]),x=new Date(D[0],D[1],D[2],D[3],D[4],D[5]+1);break;default:_=new Date(D[0],D[1],D[2]),x=new Date(D[0],D[1],D[2]+1)}switch(u){case"<":return[C,"<",_];case"<=":return[C,"<",x];case">":return[C,">=",x];case">=":return[C,">=",_];case"<>":return[[C,"<",_],"or",[C,">=",x]];default:return[[C,">=",_],"and",[C,"<",x]]}},s=function(a,u,h){const g=y(this,h),_=S(this);if("headerFilter"===h&&_&&(0,W.O9)(a)){const x=(""+a).split("/"),w=Number(x[x.length-1]);return[[g,">=",w],"and",[g,"<",w+_[x.length-1]]]}return[g,u||"=",a]};return{defaultCalculateFilterExpression:function(a,u,h){const g=this,_=y(g,h),x=g.calculateDisplayValue&&"search"===h,w=x&&g.lookup&&g.lookup.dataType||g.dataType;let D=null;if("headerFilter"!==h&&"filterBuilder"!==h||null!==a)if("string"!==w||g.lookup&&!x){if("between"===u)return d.apply(g,[a,h]);if(f(w)&&(0,W.O9)(a))return c.apply(g,arguments);if("number"===w)return s.apply(g,arguments);D=[_,u||"=",a]}else D=[_,u||"contains",a];else D=[_,u||"=",null],"string"===w&&(D=[D,"="===u?"or":"and",[_,u||"=",""]]);return D},getGroupInterval:S}}()},3771:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Z});var W=M(5704),o=M(4072),P=M(1830),b=M(6234),f=M(4270),S=M(36),T=M(3090),y=M(5973),d=M(9522),c=M(5335),s=M(9293);M(8910),M(9810),M(3480),M(6520),M(8638);const{isWrapped:x}=b.A,C=function(Q,te){return(0,T.X)(Q,{readOnly:te.readOnly,placeholder:te.placeholder,inputAttr:{id:te.id,"aria-labelledby":te["aria-labelledby"]},tabIndex:te.tabIndex},te.editorOptions)},I=function(){return S.A.mozilla||y.A.real().ios},L=function(Q){const te={},pe=I(),z=Q.sharedData||te;return C({placeholder:Q.placeholder,width:Q.width,value:Q.value,onValueChanged:function(oe){const ae="filterRow"===Q.parentType||"searchPanel"===Q.parentType,ee=oe.event&&("input"===oe.event.type||"keyup"===oe.event.type),he=function(de,ue){Q&&Q.setValue(de.value,ue)};clearTimeout(te.valueChangeTimeout),ee&&ae?z.valueChangeTimeout=te.valueChangeTimeout=setTimeout(function(){he(oe,te.valueChangeTimeout!==z.valueChangeTimeout)},(0,P.O9)(Q.updateValueTimeout)?Q.updateValueTimeout:0):he(oe)},onKeyDown:function(oe){pe&&"enter"===(0,s.YD)(oe.event)&&o.A.trigger((0,W.A)(oe.component._input()),"change")},valueChangeEvent:"change"+("filterRow"===Q.parentType?" keyup input":"")},Q)},N=function(Q){Q.editorName="dxDateBox",Q.editorOptions=C({value:Q.value,onValueChanged:function(te){Q.setValue(te.value)},onKeyDown:function(te){let{component:pe,event:z}=te;const oe=pe.option("useMaskBehavior");(I()||oe)&&"enter"===(0,s.YD)(z)&&(pe.blur(),pe.focus())},displayFormat:Q.format,type:Q.dataType,dateSerializationFormat:null,width:"filterBuilder"===Q.parentType?void 0:"auto"},Q)},G=function(Q){const te=L(Q),pe="searchPanel"===Q.parentType;var z;te.value=Q.editorType&&"dxTextBox"!==Q.editorType?Q.value:(0,P.O9)(z=Q.value)?z.toString():"",te.valueChangeEvent+=pe?" keyup input search":"",te.mode=te.mode||(pe?"search":"text"),Q.editorName="dxTextBox",Q.editorOptions=te},k=function(Q){const te=L(Q);te.value=(0,P.O9)(Q.value)?Q.value:null,Q.editorName="dxNumberBox",Q.editorOptions=te};function K(Q){const te=Q.lookup;let pe,z,oe;const ae="filterRow"===Q.parentType;if(te){pe=(0,f.Hz)(te.displayExpr),z=te.dataSource,(0,P.Tn)(z)&&!x(z)&&(z=z(Q.row||{}),function B(Q){if(Q.row&&Q.row.watch&&"dataRow"===Q.parentType){const te=Q.editorOptions||{};let pe;Q.editorOptions=te;const z=te.onInitialized;let oe;te.onInitialized=function(ee){z&&z.apply(this,arguments),pe=ee.component,pe.on("disposing",ae)};const ae=Q.row.watch(()=>(oe=Q.lookup.dataSource(Q.row),oe&&oe.filter),()=>{pe.option("dataSource",oe)},ee=>{Q.row=ee})}}(Q)),((0,P.Gv)(z)||Array.isArray(z))&&(z=(0,c.ho)(z),ae&&(oe=z.postProcess,z.postProcess=function(he){return 0===this.pageIndex()&&(he=he.slice(0)).unshift(null),oe?oe.call(this,he):he}));const ee=!(!te.allowClearing||ae);Q.editorName=Q.editorType??"dxSelectBox",Q.editorOptions=C({searchEnabled:!0,value:Q.value,valueExpr:Q.lookup.valueExpr,searchExpr:Q.lookup.searchExpr||Q.lookup.displayExpr,allowClearing:ee,showClearButton:ee,displayExpr:function(he){return null===he?Q.showAllText:pe(he)},dataSource:z,onValueChanged:function(he){const de=[he.value];!ae&&de.push(he.component.option("text")),Q.setValue.apply(this,de)}},Q)}}function J(Q){Q.editorName="dxCheckBox",Q.editorOptions=C({elementAttr:{id:Q.id},value:(0,P.O9)(Q.value)?Q.value:void 0,hoverStateEnabled:!Q.readOnly,focusStateEnabled:!Q.readOnly,activeStateEnabled:!1,onValueChanged:function(te){Q.setValue&&Q.setValue(te.value,te)}},Q)}const re=Q=>{Q.editorName=Q.editorType,Q.editorOptions=C({value:Q.value,onValueChanged:function(te){Q.setValue(te.value)}},Q)},q=Q=>{const te={dxDateBox:N,dxCheckBox:J,dxNumberBox:k,dxTextBox:G};if(Q.lookup)K(Q);else if(Q.editorType)(te[Q.editorType]??re)(Q);else switch(Q.dataType){case"date":case"datetime":N(Q);break;case"boolean":!function(Q){"filterRow"===Q.parentType||"filterBuilder"===Q.parentType?K((0,T.X)(Q,{lookup:{displayExpr:function(te){return!0===te?Q.trueText||"true":!1===te?Q.falseText||"false":void 0},dataSource:[!0,!1]}})):J(Q)}(Q);break;case"number":k(Q);break;default:G(Q)}},Z=Q=>class extends Q{createEditor(te,pe){pe.cancel=!1,pe.editorElement=(0,d.cc)(te),(0,P.O9)(pe.tabIndex)||(pe.tabIndex=this.option("tabIndex")),q(pe),this.executeAction("onEditorPreparing",pe),!pe.cancel&&("dataRow"===pe.parentType&&!pe.isOnForm&&!(0,P.O9)(pe.editorOptions.showValidationMark)&&(pe.editorOptions.showValidationMark=!1),function(Q,te){const pe=(0,W.A)(te.editorElement);if(te.editorName&&te.editorOptions&&pe[te.editorName]){if(("dxCheckBox"===te.editorName||"dxSwitch"===te.editorName)&&(te.isOnForm||(pe.addClass(Q.addWidgetPrefix("checkbox-size")),pe.parent().addClass("dx-editor-inline-block"))),Q._createComponent(pe,te.editorName,te.editorOptions),"dxDateBox"===te.editorName){const z=pe.dxDateBox("instance"),oe=z._supportedKeys().enter;z.registerKeyHandler("enter",ae=>(z.option("opened")&&oe(ae),!0))}"dxTextArea"===te.editorName&&pe.dxTextArea("instance").registerKeyHandler("enter",function(z){"enter"===(0,s.YD)(z)&&!z.ctrlKey&&!z.shiftKey&&z.stopPropagation()})}}(this,pe),this.executeAction("onEditorPrepared",pe))}}},3205:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Y});var W=M(1973),o=M(5973),P=M(5704),b=M(4859),f=M(6021),S=M(3090),T=M(3012),y=M(1363),d=M(778),c=M(4451),s=M(4072),a=M(6790),u=M(9209),h=M(9293),g=M(1520),_=M(9212),x=M(9524),w=M(612),D=M(8571);const re=w.A.inherit({_activeStateUnit:".dx-slider-handle",_supportedKeys(){const Z=this.option("rtlEnabled"),Q=(z,oe)=>{z=this._valueStep(z);const ae=this.option("step"),ee=this.option("value"),he=ee-this.option("min"),de=(0,T.oz)(he,ae,this._getValueExponentLength());let ue=oe?ee-z+(de?ae-de:0):ee+z-de;const be=this.option("min"),ve=this.option("max");return ue<be?ue=be:ue>ve&&(ue=ve),this._roundToExponentLength(ue)},te=z=>{this.option("value",Q(z,Z))},pe=z=>{this.option("value",Q(z,!Z))};return(0,S.X)(this.callBase(),{leftArrow(z){this._processKeyboardEvent(z),pe(this.option("step"))},rightArrow(z){this._processKeyboardEvent(z),te(this.option("step"))},pageUp(z){this._processKeyboardEvent(z),te(this.option("step")*this.option("keyStep"))},pageDown(z){this._processKeyboardEvent(z),pe(this.option("step")*this.option("keyStep"))},home(z){this._processKeyboardEvent(z);const oe=this.option("min");this.option("value",oe)},end(z){this._processKeyboardEvent(z);const oe=this.option("max");this.option("value",oe)}})},_processKeyboardEvent(Z){Z.preventDefault(),Z.stopPropagation(),this._saveValueChangeEvent(Z)},_getDefaultOptions(){return(0,S.X)(this.callBase(),{value:50,hoverStateEnabled:!0,activeStateEnabled:!0,step:1,showRange:!0,tooltip:{enabled:!1,format:Z=>Z,position:"top",showMode:"onHover"},label:{visible:!1,position:"bottom",format:Z=>Z},keyStep:1,useInkRipple:!1,validationMessageOffset:(0,_.gx)()?{h:18,v:0}:{h:7,v:4},focusStateEnabled:!0,valueChangeMode:"onHandleMove"})},_toggleValidationMessage(Z){this.option("isValid")||this.$element().toggleClass("dx-invalid-message-visible",Z)},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}},{device(){const Z=(0,_.ss)();return(0,_.gx)(Z)},options:{useInkRipple:!0}}])},_initMarkup(){this.$element().addClass("dx-slider"),this._renderSubmitElement(),this.option("useInkRipple")&&this._renderInkRipple(),this.callBase(),this._renderLabels(),this._renderStartHandler(),this._renderAriaMinAndMax()},_attachFocusEvents(){this.callBase();const Z=this.NAME+"Validation",Q=(0,h.b4)("focusin",Z),te=(0,h.b4)("focusout",Z),pe=this._focusTarget();s.A.on(pe,Q,this._toggleValidationMessage.bind(this,!0)),s.A.on(pe,te,this._toggleValidationMessage.bind(this,!1))},_detachFocusEvents(){this.callBase();const Z=this._focusTarget();this._toggleValidationMessage(!1),s.A.off(Z,this.NAME+"Validation")},_render(){this.callBase(),this._repaintHandle()},_renderSubmitElement(){this._$submitElement=(0,P.A)("<input>").attr("type","hidden").appendTo(this.$element())},_getSubmitElement(){return this._$submitElement},_renderInkRipple(){this._inkRipple=(0,x.XX)({waveSizeCoefficient:.7,isCentered:!0,wavesNumber:2,useHoldAnimation:!1})},_renderInkWave(Z,Q,te,pe){if(!this._inkRipple)return;const z={element:Z,event:Q,wave:pe};te?this._inkRipple.showWave(z):this._inkRipple.hideWave(z)},_visibilityChanged(){this.repaint()},_renderWrapper(){this.callBase(),this._$wrapper.addClass("dx-slider-wrapper"),this._createComponent(this._$wrapper,a.A,{rtlEnabled:!1,elastic:!1,immediate:!0,immediateTimeout:0,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._itemWidthFunc.bind(this)})},_renderContainer(){this.callBase(),this._$bar.addClass("dx-slider-bar")},_renderRange(){this.callBase(),this._$range.addClass("dx-slider-range"),this._renderHandle(),this._renderRangeVisibility()},_renderRangeVisibility(){this._$range.toggleClass("dx-slider-range-visible",!!this.option("showRange"))},_renderHandle(){this._$handle=this._renderHandleImpl(this.option("value"),this._$handle)},_renderHandleImpl(Z,Q){const te=Q||(0,P.A)("<div>").appendTo(this._$range),pe=this.option("tooltip");return this.$element().toggleClass("dx-slider-tooltip-position-bottom",pe.enabled&&"bottom"===pe.position).toggleClass("dx-slider-tooltip-position-top",pe.enabled&&"top"===pe.position),this._createComponent(te,D.A,{value:Z,tooltip:pe}),te},_renderAriaMinAndMax(){this.setAria({valuemin:this.option("min"),valuemax:this.option("max")},this._$handle)},_toggleActiveState(Z,Q){this.callBase(Z,Q),this._renderInkWave(Z,null,!!Q,1)},_toggleFocusClass(Z,Q){if(this.callBase(Z,Q),this._disposed)return;const te=(0,P.A)(Q||this._focusTarget());this._renderInkWave(te,null,Z,0)},_renderLabels(){if(this.$element().removeClass("dx-slider-label-position-bottom").removeClass("dx-slider-label-position-top"),this.option("label.visible")){const Z=this.option("min"),Q=this.option("max"),te=this.option("label.position"),pe=this.option("label.format");this._$minLabel||(this._$minLabel=(0,P.A)("<div>").addClass("dx-slider-label").appendTo(this._$wrapper)),this._$minLabel.text(g.A.format(Z,pe)),this._$maxLabel||(this._$maxLabel=(0,P.A)("<div>").addClass("dx-slider-label").appendTo(this._$wrapper)),this._$maxLabel.text(g.A.format(Q,pe)),this.$element().addClass("dx-slider-label-position-"+te)}else this._$minLabel&&(this._$minLabel.remove(),delete this._$minLabel),this._$maxLabel&&(this._$maxLabel.remove(),delete this._$maxLabel)},_renderStartHandler(){const Z=(0,h.b4)(u.A.down,this.NAME),Q=(0,h.b4)(d.U,this.NAME),te=this._createAction(this._startHandler.bind(this)),pe=this.$element();s.A.off(pe,Z),s.A.on(pe,Z,z=>{(0,h.Er)(z)&&te({event:z})}),s.A.off(pe,Q),s.A.on(pe,Q,z=>{const oe=this._activeHandle();oe&&(s.A.trigger(oe,"focusin"),s.A.trigger(oe,"focus")),te({event:z}),"onHandleRelease"===this.option("valueChangeMode")&&(this.option("value",this._getActualValue()),this._actualValue=void 0)})},_itemWidthFunc(){return this._itemWidthRatio},_swipeStartHandler(Z){const Q=this.option("rtlEnabled");(0,h.kH)(Z.event)&&this._createAction(this._startHandler.bind(this))({event:Z.event}),this._feedbackDeferred=(0,f.cY)(),(0,c.s2)(this._feedbackDeferred),this._toggleActiveState(this._activeHandle(),this.option("activeStateEnabled")),this._startOffset=this._currentRatio;const te=this._startOffset*this._swipePixelRatio(),pe=(1-this._startOffset)*this._swipePixelRatio();Z.event.maxLeftOffset=Q?pe:te,Z.event.maxRightOffset=Q?te:pe,this._itemWidthRatio=(0,y.RG)(this.$element())/this._swipePixelRatio(),this._needPreventAnimation=!0},_swipeEndHandler(Z){if(this._isSingleValuePossible())return;this._feedbackDeferred.resolve(),this._toggleActiveState(this._activeHandle(),!1);const Q=this.option("rtlEnabled")?-1:1,te=this._startOffset+Q*Z.event.targetOffset/this._swipePixelRatio();delete this._needPreventAnimation,this._saveValueChangeEvent(Z.event),this._changeValueOnSwipe(te),"onHandleRelease"===this.option("valueChangeMode")&&this.option("value",this._getActualValue()),this._actualValue=void 0,delete this._startOffset,this._renderValue()},_activeHandle(){return this._$handle},_swipeUpdateHandler(Z){this._isSingleValuePossible()||(this._saveValueChangeEvent(Z.event),this._updateHandlePosition(Z))},_updateHandlePosition(Z){const Q=this.option("rtlEnabled")?-1:1,te=Math.min(this._startOffset+Q*Z.event.offset/this._swipePixelRatio(),1);(0,y.zj)(this._$range,100*te+"%"),D.A.getInstance(this._activeHandle()),this._changeValueOnSwipe(te)},_swipePixelRatio(){const Z=this.option("min");return(this.option("max")-Z)/this._valueStep(this.option("step"))},_valueStep:Z=>((!Z||isNaN(Z))&&(Z=1),Z),_getValueExponentLength(){const{step:Z,min:Q}=this.option();return Math.max((0,T.UN)(Z),(0,T.UN)(Q))},_roundToExponentLength(Z){const Q=this._getValueExponentLength();return(0,T.ar)(Z,Q)},_changeValueOnSwipe(Z){const Q=this.option("min"),te=this.option("max"),pe=this._valueStep(this.option("step"));let oe=Q+Z*(te-Q);if(!(pe<0))if(oe===te||oe===Q)this._setValueOnSwipe(oe);else{const ae=Math.round((oe-Q)/pe);oe=this._roundToExponentLength(ae*pe+Q),this._setValueOnSwipe(Math.max(Math.min(oe,te),Q))}},_setValueOnSwipe(Z){this._actualValue=Z,"onHandleRelease"===this.option("valueChangeMode")?D.A.getInstance(this._activeHandle()).option("value",Z):(this.option("value",Z),this._saveValueChangeEvent(void 0))},_getActualValue(){return this._actualValue??this.option("value")},_isSingleValuePossible(){const{min:Z,max:Q}=this.option();return Z===Q},_startHandler(Z){if(this._isSingleValuePossible())return;const Q=Z.event;this._currentRatio=((0,h.rw)(Q).x-this._$bar.offset().left)/(0,y.RG)(this._$bar),this.option("rtlEnabled")&&(this._currentRatio=1-this._currentRatio),this._saveValueChangeEvent(Q),this._changeValueOnSwipe(this._currentRatio)},_renderValue(){this.callBase();const Z=this._getActualValue();this._getSubmitElement().val((0,b.EG)(Z)),D.A.getInstance(this._activeHandle()).option("value",Z)},_setRangeStyles(Z){Z&&this._$range.css(Z)},_callHandlerMethod(Z,Q){D.A.getInstance(this._$handle)[Z](Q)},_repaintHandle(){this._callHandlerMethod("repaint")},_fitTooltip(){this._callHandlerMethod("updateTooltipPosition")},_optionChanged(Z){switch(Z.name){case"visible":this.callBase(Z),this._renderHandle(),this._repaintHandle();break;case"min":case"max":this._renderValue(),this.callBase(Z),this._renderLabels(),this._renderAriaMinAndMax(),this._fitTooltip();break;case"step":this._renderValue();break;case"keyStep":case"valueChangeMode":break;case"showRange":this._renderRangeVisibility();break;case"tooltip":this._renderHandle();break;case"label":this._renderLabels();break;case"useInkRipple":this._invalidate();break;default:this.callBase(Z)}},_refresh(){this._toggleRTLDirection(this.option("rtlEnabled")),this._renderDimensions(),this._renderValue(),this._renderHandle(),this._repaintHandle()},_clean(){delete this._inkRipple,delete this._actualValue,this.callBase()}});(0,W.A)("dxSlider",re);const Y=re},3125:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>G});var W=M(2583),o=M(4504),P=M(1973),b=M(9522),f=M(5704),S=M(6021),T=M(3090),y=M(4757),d=M(1363),c=M(6110),s=M(4072),a=M(5213),u=M(1830);const h=(0,c.zk)(),w=k=>(0,f.A)(k).is(":visible"),D=(k,U)=>{var B,K;if(!k)return;const J=(null===(B=U.to)||void 0===B?void 0:B.left)||0,ie=(null===(K=U.to)||void 0===K?void 0:K.top)||0;k.style.transform=`translate(${J}px,${ie}px)`,k.style.transition=W.A.off?"":`transform ${U.duration}ms ${U.easing}`},C=k=>{k&&(k.style.transform="",k.style.transition="")},L=a.A.inherit({_init(){this.callBase(),this._sourceScrollHandler=this._handleSourceScroll.bind(this),this._sourceScrollableInfo=null},_getDefaultOptions(){return(0,T.X)(this.callBase(),{clone:!0,filter:"> *",itemOrientation:"vertical",dropFeedbackMode:"push",allowDropInsideItem:!1,allowReordering:!0,moveItemOnDrop:!1,onDragChange:null,onAdd:null,onRemove:null,onReorder:null,onPlaceholderPrepared:null,animation:{type:"slide",duration:300,easing:"ease"},fromIndex:null,toIndex:null,dropInsideItem:!1,itemPoints:null,fromIndexOffset:0,offset:0,autoUpdate:!1,draggableElementSize:0})},reset(){this.option({dropInsideItem:!1,toIndex:null,fromIndex:null,itemPoints:null,fromIndexOffset:0,draggableElementSize:0}),this._$placeholderElement&&this._$placeholderElement.remove(),this._$placeholderElement=null,!this._isIndicateMode()&&this._$modifiedItem&&(this._$modifiedItem.css("marginBottom",this._modifiedItemMargin),this._$modifiedItem=null)},_getPrevVisibleItem:(k,U)=>k.slice(0,U).reverse().filter(w)[0],_dragStartHandler(k){if(this.callBase.apply(this,arguments),!0===k.cancel)return;const U=this._getSourceElement();this._updateItemPoints(),this._subscribeToSourceScroll(k),this.option("fromIndex",this._getElementIndex(U)),this.option("fromIndexOffset",this.option("offset"))},_subscribeToSourceScroll(k){const U=this._getScrollable((0,f.A)(k.target));U&&(this._sourceScrollableInfo={element:U,scrollLeft:U.scrollLeft(),scrollTop:U.scrollTop()},s.A.off(U,"scroll",this._sourceScrollHandler),s.A.on(U,"scroll",this._sourceScrollHandler))},_unsubscribeFromSourceScroll(){this._sourceScrollableInfo&&(s.A.off(this._sourceScrollableInfo.element,"scroll",this._sourceScrollHandler),this._sourceScrollableInfo=null)},_handleSourceScroll(k){const U=this._sourceScrollableInfo;U&&["scrollLeft","scrollTop"].forEach(B=>{k.target[B]!==U[B]&&(this._correctItemPoints(k.target[B]-U[B]),this._movePlaceholder(),U[B]=k.target[B])})},_dragEnterHandler(k){if(this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&(this._subscribeToSourceScroll(k),this._updateItemPoints(),this.option("fromIndex",-1),!this._isIndicateMode())){const U=this.option("itemPoints"),B=U[U.length-1];if(B){const K=this.$element(),J=this._getSourceElement(),ie=this._isVerticalOrientation(),re=ie?(0,d.P$)(J,!0):(0,d.Ot)(J,!0),q=K.get(0)[ie?"scrollHeight":"scrollWidth"],Y=K.get(0)[ie?"scrollTop":"scrollLeft"],Z=ie?"top":"left",Q=B[Z],pe=K.offset()[Z]+q-Y-Q;if(pe<re&&ie){const z=this._getItems(),oe=(0,f.A)(this._getPrevVisibleItem(z));this._$modifiedItem=oe,this._modifiedItemMargin=oe.get(0).style.marginBottom,oe.css("marginBottom",re-pe);const ae=oe.closest(".dx-sortable"),ee=ae.data("dxScrollable")||ae.data("dxScrollView");ee&&ee.update()}}}},_dragLeaveHandler(){this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&this._unsubscribeFromSourceScroll()},dragEnter(){this!==this._getTargetDraggable()&&this.option("toIndex",-1)},dragLeave(){this!==this._getTargetDraggable()&&this.option("toIndex",this.option("fromIndex"))},_allowDrop(k){const B=this._getTargetDraggable().$element(),K=this._getScrollable(B);if(K){const{left:J,right:ie,top:re,bottom:q}=function I(k){const U=k.offset(),{style:B}=k[0],K=parseFloat(B.paddingLeft)||0,J=parseFloat(B.paddingRight)||0,ie=parseFloat(B.paddingTop)||0,re=k[0].clientWidth-(K+J),q=(0,d.Oq)(k),Y=U.left+K,Z=U.top+ie;return{left:Y,right:Y+re,top:Z,bottom:Z+q}}(K),Y=this.option("toIndex"),Z=this.option("itemPoints"),Q=Z?.filter(te=>te.index===Y)[0];if(Q&&void 0!==Q.top)return this._isVerticalOrientation()?re<=Math.ceil(Q.top)&&Math.floor(Q.top)<=q:J<=Math.ceil(Q.left)&&Math.floor(Q.left)<=ie}return!0},dragEnd(k){this._unsubscribeFromSourceScroll();const U=this._getSourceElement(),B=this._getSourceDraggable(),K=B.NAME!==this.NAME,J=this.option("toIndex"),{event:ie}=k,re=this._allowDrop(ie);if(null!==J&&J>=0&&re){let q,Y;if(B!==this&&(q=this._fireAddEvent(ie),q||(Y=this._fireRemoveEvent(ie))),K&&(0,o.fw)(U),this.option("moveItemOnDrop")&&!q&&this._moveItem(U,J,Y),B===this)return this._fireReorderEvent(ie)}return(0,S.cY)().resolve()},dragMove(k){const U=this.option("itemPoints");if(!U)return;const B=this._isVerticalOrientation(),K=B?"top":"left",J=B?k.pageY:k.pageX,ie=this.option("rtlEnabled");let re;for(let q=U.length-1;q>=0;q--){const Y=U[q+1]&&(U[q][K]+U[q+1][K])/2;if(!(!B&&ie?J>Y:Y>J)&&void 0!==Y)break;re=U[q]}re&&(this._updatePlaceholderPosition(k,re),this._verticalScrollHelper.isScrolling()&&this._isIndicateMode()&&this._movePlaceholder())},_isIndicateMode(){return"indicate"===this.option("dropFeedbackMode")||this.option("allowDropInsideItem")},_createPlaceholder(){let k;return this._isIndicateMode()&&(k=(0,f.A)("<div>").addClass(this._addWidgetPrefix("placeholder")).insertBefore(this._getSourceDraggable()._$dragElement)),this._$placeholderElement=k,k},_getItems(){const k=this._getItemsSelector();return this._$content().find(k).not(`.${this._addWidgetPrefix("placeholder")}`).not(`.${this._addWidgetPrefix("clone")}`).toArray()},_allowReordering(){return this._getSourceDraggable()!==this._getTargetDraggable()||this.option("allowReordering")},_isValidPoint(k,U,B){const K=this.option("allowDropInsideItem");return!!(B||this._allowReordering()||0===k&&K)&&(!this._isIndicateMode()||-1===U||k!==U&&(B||k!==U+1))},_getItemPoints(){const k=this;let B,K,J,U=[];const ie=k.option("rtlEnabled"),re=k._isVerticalOrientation(),q=k._getItems(),Y=q.filter(w),Z=Y.length,Q=this._getDraggableElement(),te=Y.indexOf(Q.get(0));if(Z){for(let pe=0;pe<=Z;pe++){const z=!re&&ie^pe===Z,oe=re&&pe===Z;pe<Z&&(B=(0,f.A)(Y[pe]),K=B.offset(),J=(0,d.Ot)(B)),U.push({dropInsideItem:!1,left:K.left+(z?J:0),top:K.top+(oe?U[pe-1].height:0),index:pe===Z?q.length:q.indexOf(B.get(0)),$item:B,width:(0,d.Ot)(B),height:(0,d.P$)(B),isValid:k._isValidPoint(pe,te)})}if(this.option("allowDropInsideItem")){const pe=U;U=[];for(let z=0;z<pe.length;z++)U.push(pe[z]),pe[z+1]&&U.push((0,T.X)({},pe[z],{dropInsideItem:!0,top:Math.floor((pe[z].top+pe[z+1].top)/2),left:Math.floor((pe[z].left+pe[z+1].left)/2),isValid:this._isValidPoint(z,te,!0)}))}}else U.push({dropInsideItem:!1,index:0,isValid:!0});return U},_updateItemPoints(k){(k||this.option("autoUpdate")||!this.option("itemPoints"))&&this.option("itemPoints",this._getItemPoints())},_correctItemPoints(k){const U=this.option("itemPoints");if(k&&U&&!this.option("autoUpdate")){const K=this._isVerticalOrientation()?"top":"left";U.forEach(J=>{J[K]-=k})}},_getElementIndex(k){return this._getItems().indexOf(k.get(0))},_getDragTemplateArgs(k){const U=this.callBase.apply(this,arguments);return U.model.fromIndex=this._getElementIndex(k),U},_togglePlaceholder(k){this._$placeholderElement&&this._$placeholderElement.toggle(k)},_isVerticalOrientation(){return"vertical"===this.option("itemOrientation")},_normalizeToIndex(k,U){const B=this._getSourceDraggable()!==this._getTargetDraggable(),K=this._getActualFromIndex();return null===k?K:Math.max(B||K>=k||U?k:k-1,0)},_updatePlaceholderPosition(k,U){const B=this._getSourceDraggable(),K=this._normalizeToIndex(U.index,U.dropInsideItem),J=(0,T.X)(this._getEventArgs(k),{toIndex:K,dropInsideItem:U.dropInsideItem});U.isValid&&this._getAction("onDragChange")(J),!J.cancel&&U.isValid?(this.option({dropInsideItem:U.dropInsideItem,toIndex:U.index}),this._getAction("onPlaceholderPrepared")((0,T.X)(this._getEventArgs(k),{placeholderElement:(0,b.cc)(this._$placeholderElement),dragElement:(0,b.cc)(B._$dragElement)})),this._updateItemPoints()):U.isValid||this.option({dropInsideItem:!1,toIndex:null})},_makeWidthCorrection(k,U){if(this._$scrollable=this._getScrollable(k),this._$scrollable){const B=(0,d.RG)(this._$scrollable),K=this._$scrollable.offset().left-k.offset().left,J=(0,d.Ot)(k)-K-B;K>0&&(U-=K),J>0&&(U-=J)}return U},_updatePlaceholderSizes(k,U){const B=this.option("dropInsideItem"),K=(0,f.A)(U),J=this._isVerticalOrientation();let ie="",re="";k.toggleClass(this._addWidgetPrefix("placeholder-inside"),B),(J||B)&&(ie=(0,d.Ot)(K)),(!J||B)&&(re=(0,d.P$)(K)),ie=this._makeWidthCorrection(K,ie),k.css({width:ie,height:re})},_moveItem(k,U,B){let K;const J=this._getItems(),ie=J[U],re=this._getSourceDraggable();B&&(k=k.clone(),re._toggleDragSourceClass(!1,k)),ie||(K=J[U-1]),this._moveItemCore(k,ie,K)},_moveItemCore(k,U,B){U||B?B?k.insertAfter((0,f.A)(B)):k.insertBefore((0,f.A)(U)):k.appendTo(this.$element())},_getDragStartArgs(k,U){return(0,T.X)(this.callBase.apply(this,arguments),{fromIndex:this._getElementIndex(U)})},_getEventArgs(k){const U=this._getSourceDraggable(),B=this._getTargetDraggable(),K=B.option("dropInsideItem");return(0,T.X)(this.callBase.apply(this,arguments),{fromIndex:U.option("fromIndex"),toIndex:this._normalizeToIndex(B.option("toIndex"),K),dropInsideItem:K})},_optionChanged(k){const{name:U}=k;switch(U){case"onDragChange":case"onPlaceholderPrepared":case"onAdd":case"onRemove":case"onReorder":this[`_${U}Action`]=this._createActionByOption(U);break;case"itemOrientation":case"allowDropInsideItem":case"moveItemOnDrop":case"dropFeedbackMode":case"itemPoints":case"animation":case"allowReordering":case"fromIndexOffset":case"offset":case"draggableElementSize":case"autoUpdate":break;case"fromIndex":[!1,!0].forEach(B=>{const K=B?k.value:k.previousValue;if(null!==K){const J=(0,f.A)(this._getItems()[K]);this._toggleDragSourceClass(B,J)}});break;case"dropInsideItem":this._optionChangedDropInsideItem(k);break;case"toIndex":this._optionChangedToIndex(k);break;default:this.callBase(k)}},_optionChangedDropInsideItem(){this._isIndicateMode()&&this._$placeholderElement&&this._movePlaceholder()},_isPositionVisible(k){const U=this.$element();let B;if("hidden"!==U.css("overflow")?B=U.get(0):U.parents().each(function(){if("visible"!==(0,f.A)(this).css("overflow"))return B=this,!1}),B){const K=(0,y.N)(B),J=this._isVerticalOrientation(),ie=J?"top":"left",q=J?h.pageYOffset:h.pageXOffset;if(k[ie]<K[ie]+q||k[ie]>K[J?"bottom":"right"]+q)return!1}return!0},_optionChangedToIndex(k){const U=k.value;if(this._isIndicateMode()){const B=null!==U&&U>=0;this._togglePlaceholder(B),B&&this._movePlaceholder()}else this._moveItems(k.previousValue,k.value,k.fullUpdate)},update(){if(null===this.option("fromIndex")&&null===this.option("toIndex"))return;this._updateItemPoints(!0),this._updateDragSourceClass();const k=this.option("toIndex");this._optionChangedToIndex({value:k,fullUpdate:!0})},_updateDragSourceClass(){const k=this._getActualFromIndex(),U=(0,f.A)(this._getItems()[k]);U.length&&(this._$sourceElement=U,this._toggleDragSourceClass(!0,U))},_makeLeftCorrection(k){const U=this._$scrollable;if(U&&this._isVerticalOrientation()){const B=U.offset().left-k;B>0&&(k+=B)}return k},_movePlaceholder(){const k=this,U=k._$placeholderElement||k._createPlaceholder();if(!U)return;const B=k._getItems(),K=k.option("toIndex"),J=k._isVerticalOrientation(),ie=this.option("rtlEnabled"),re=k.option("dropInsideItem");let q=null,Y=B[K];if(Y){const Z=(0,f.A)(Y);q=Z.offset(),!J&&ie&&!re&&(q.left+=(0,d.Ot)(Z,!0))}else{const Z=Y=this._getPrevVisibleItem(B,K);Z&&(q=(0,f.A)(Z).offset(),J?q.top+=(0,d.P$)(Z,!0):ie||(q.left+=(0,d.Ot)(Z,!0)))}if(k._updatePlaceholderSizes(U,Y),q&&!k._isPositionVisible(q)&&(q=null),q){const Z=J&&K===B.length,Q=(0,d.P$)(U);q.left=k._makeLeftCorrection(q.left),q.top=Z&&q.top>=Q?q.top-Q:q.top,k._move(q,U)}U.toggle(!!q)},_getPositions(k,U,B,K){const J=[];for(let ie=0;ie<k.length;ie++){let re=0;null!==K&&null!==B?(-1===B?ie>=K&&(re=U):-1===K?ie>B&&(re=-U):B<K?ie>B&&ie<K&&(re=-U):B>K&&ie>=K&&ie<B&&(re=U),J.push(re)):J.push(re)}return J},_getDraggableElementSize(k){const U=this._getDraggableElement();let B=this.option("draggableElementSize");return B||(B=k?((0,d.P$)(U)+(0,d.P$)(U,!0))/2:((0,d.Ot)(U)+(0,d.Ot)(U,!0))/2,this.option("autoUpdate")||this.option("draggableElementSize",B)),B},_getActualFromIndex(){const{fromIndex:k,fromIndexOffset:U,offset:B}=this.option();return null==k?null:k+U-B},_moveItems(k,U,B){const K=this._getActualFromIndex(),J=this._isVerticalOrientation(),ie=J?"top":"left",re=this._getDraggableElementSize(J),q=this._getItems(),Y=this._getPositions(q,re,K,k),Z=this._getPositions(q,re,K,U),Q=this.option("animation"),te=this.option("rtlEnabled");for(let pe=0;pe<q.length;pe++){const z=q[pe],oe=Y[pe],ae=Z[pe];null===U||null===K?C(z):(oe!==ae||B&&(0,u.O9)(ae))&&D(z,(0,T.X)({},Q,{to:{[ie]:!J&&te?-ae:ae}}))}},_toggleDragSourceClass(k,U){const B=U||this._$sourceElement;this.callBase.apply(this,arguments),this._isIndicateMode()||B&&B.toggleClass(this._addWidgetPrefix("source-hidden"),k)},_dispose(){this.reset(),this.callBase()},_fireAddEvent(k){const U=this._getEventArgs(k);return this._getAction("onAdd")(U),U.cancel},_fireRemoveEvent(k){const U=this._getSourceDraggable(),B=this._getEventArgs(k);return U._getAction("onRemove")(B),B.cancel},_fireReorderEvent(k){const U=this._getEventArgs(k);return this._getAction("onReorder")(U),U.promise||(0,S.cY)().resolve()}});(0,P.A)("dxSortable",L);const G=L},4775:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>B});var W=M(2583),o=M(1973),P=M(5973),b=M(5704),f=M(6021),S=M(3090),T=M(4757),y=M(1363),d=M(778),c=M(4451),s=M(4072),a=M(6790),u=M(9293),h=M(8360);const k=M(6620).A.inherit({_supportedKeys(){const K=this.option("rtlEnabled"),J=function(re){re.preventDefault(),this._clickAction({event:re})},ie=function(re,q){q.preventDefault(),q.stopPropagation(),this._saveValueChangeEvent(q),this._animateValue(re)};return(0,S.X)(this.callBase(),{space:J,enter:J,leftArrow:ie.bind(this,!!K),rightArrow:ie.bind(this,!K)})},_useTemplates:()=>!1,_getDefaultOptions(){return(0,S.X)(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,switchedOnText:h.A.format("dxSwitch-switchedOnText"),switchedOffText:h.A.format("dxSwitch-switchedOffText"),value:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===P.A.real().deviceType&&!P.A.isSimulator(),options:{focusStateEnabled:!0}}])},_feedbackHideTimeout:0,_animating:!1,_initMarkup(){this._renderContainers(),this.$element().addClass("dx-switch").append(this._$switchWrapper),this._renderSubmitElement(),this._renderClick(),this.setAria("role","switch"),this._renderSwipeable(),this.callBase(),this._renderSwitchInner(),this._renderLabels(),this._renderValue()},_getInnerOffset(K,J){return(J-this._offsetDirection()*+!K)/2*100+"%"},_getHandleOffset(K,J){return this.option("rtlEnabled")&&(K=!K),K?100*-J-100+"%":100*-J+"%"},_renderSwitchInner(){this._$switchInner=(0,b.A)("<div>").addClass("dx-switch-inner").appendTo(this._$switchContainer),this._$handle=(0,b.A)("<div>").addClass("dx-switch-handle").appendTo(this._$switchInner)},_renderLabels(){this._$labelOn=(0,b.A)("<div>").addClass("dx-switch-on").prependTo(this._$switchInner),this._$labelOff=(0,b.A)("<div>").addClass("dx-switch-off").appendTo(this._$switchInner),this._setLabelsText()},_renderContainers(){this._$switchContainer=(0,b.A)("<div>").addClass("dx-switch-container"),this._$switchWrapper=(0,b.A)("<div>").addClass("dx-switch-wrapper").append(this._$switchContainer)},_renderSwipeable(){this._createComponent(this.$element(),a.A,{elastic:!1,immediate:!0,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._getItemSizeFunc.bind(this)})},_getItemSizeFunc(){return(0,y.Ot)(this._$switchContainer,!0)-(0,T.N)(this._$handle.get(0)).width},_renderSubmitElement(){this._$submitElement=(0,b.A)("<input>").attr("type","hidden").appendTo(this.$element())},_getSubmitElement(){return this._$submitElement},_offsetDirection(){return this.option("rtlEnabled")?-1:1},_renderPosition(K,J){const ie=this._getInnerOffset(K,J),re=this._getHandleOffset(K,J);this._$switchInner.css("transform",` translateX(${ie})`),this._$handle.css("transform",` translateX(${re})`)},_validateValue(){const K=this.option("value");"boolean"!=typeof K&&this._options.silent("value",!!K)},_renderClick(){const K=(0,u.b4)(d.U,this.NAME),J=this.$element();this._clickAction=this._createAction(this._clickHandler.bind(this)),s.A.off(J,K),s.A.on(J,K,ie=>{this._clickAction({event:ie})})},_clickHandler(K){this._saveValueChangeEvent(K.event),!this._animating&&!this._swiping&&this._animateValue(!this.option("value"))},_animateValue(K){const J=this.option("value"),ie=K;if(J===ie)return;this._animating=!0;const re=this._getInnerOffset(J,0),q=this._getInnerOffset(ie,0),Y=this._getHandleOffset(J,0),Z=this._getHandleOffset(ie,0),Q=this,te={},pe={},z={},oe={};te.transform=` translateX(${re})`,pe.transform=` translateX(${q})`,z.transform=` translateX(${Y})`,oe.transform=` translateX(${Z})`,this.$element().toggleClass("dx-switch-on-value",ie),W.A.animate(this._$handle,{from:z,to:oe,duration:100}),W.A.animate(this._$switchInner,{from:te,to:pe,duration:100,complete(){Q._animating=!1,Q.option("value",ie)}})},_swipeStartHandler(K){const J=this.option("value"),ie=this.option("rtlEnabled"),re=ie?0:1,q=ie?1:0;K.event.maxLeftOffset=J?re:q,K.event.maxRightOffset=J?q:re,this._swiping=!0,this._feedbackDeferred=(0,f.cY)(),(0,c.s2)(this._feedbackDeferred),this._toggleActiveState(this.$element(),this.option("activeStateEnabled"))},_swipeUpdateHandler(K){this._renderPosition(this.option("value"),K.event.offset)},_swipeEndHandler(K){const J=this,ie=this._offsetDirection(),re={},q={},Y=this._getInnerOffset(J.option("value"),K.event.targetOffset),Z=this._getHandleOffset(J.option("value"),K.event.targetOffset);re.transform=` translateX(${Y})`,q.transform=` translateX(${Z})`,W.A.animate(this._$handle,{to:q,duration:100}),W.A.animate(this._$switchInner,{to:re,duration:100,complete(){J._swiping=!1;const Q=J.option("value")+ie*K.event.targetOffset;J._saveValueChangeEvent(K.event),J.option("value",!!Q),J._feedbackDeferred.resolve(),J._toggleActiveState(J.$element(),!1)}})},_renderValue(){this._validateValue();const K=this.option("value");this._renderPosition(K,0),this.$element().toggleClass("dx-switch-on-value",K),this._getSubmitElement().val(K),this.setAria({checked:K,label:this.option(K?"switchedOnText":"switchedOffText")})},_setLabelsText(){this._$labelOn&&this._$labelOn.text(this.option("switchedOnText")),this._$labelOff&&this._$labelOff.text(this.option("switchedOffText"))},_visibilityChanged(K){K&&this.repaint()},_optionChanged(K){switch(K.name){case"width":delete this._marginBound,this._refresh();break;case"switchedOnText":case"switchedOffText":this._setLabelsText();break;case"value":this._renderValue(),this.callBase(K);break;default:this.callBase(K)}}});(0,o.A)("dxSwitch",k);const B=k},1168:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Y});var W=M(1973),o=M(5973),P=M(6054),b=M(9522),f=M(5704),S=M(5944),T=M(3090),y=M(8535),d=M(7007),c=M(1830),s=M(3951),a=M(6942),u=M(9212),h=M(4859),g=M(5107);const k={top:"dx-tabpanel-tabs-position-top",right:"dx-tabpanel-tabs-position-right",bottom:"dx-tabpanel-tabs-position-bottom",left:"dx-tabpanel-tabs-position-left"},U={top:"top",right:"right",bottom:"bottom",left:"left"},B={top:"bottom",right:"left",bottom:"top",left:"right"},re=s.A.inherit({_getDefaultOptions(){return(0,T.X)(this.callBase(),{itemTitleTemplate:"title",hoverStateEnabled:!0,showNavButtons:!1,scrollByContent:!0,scrollingEnabled:!0,tabsPosition:U.top,iconPosition:"start",stylingMode:"primary",onTitleClick:null,onTitleHold:null,onTitleRendered:null,badgeExpr:Z=>Z?Z.badge:void 0,_tabsIndicatorPosition:null})},_defaultOptionsRules(){const Z=(0,u.ss)();return this.callBase().concat([{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>!d.touch,options:{swipeEnabled:!1}},{device:{platform:"generic"},options:{animationEnabled:!1}},{device:()=>(0,u.Ft)(Z),options:{stylingMode:"secondary"}},{device:()=>(0,u.Nt)(Z),options:{iconPosition:"top"}}])},_init(){this.callBase(),this.$element().addClass("dx-tabpanel"),this._toggleTabPanelTabsPositionClass()},_getElementAria:()=>({role:"tabpanel"}),_getItemAria:()=>({role:"tabpanel"}),_initMarkup(){this.callBase(),this._createTitleActions(),this._renderLayout()},_prepareTabsItemTemplate(Z,Q){const te=(0,y.N)(Z?.icon);te&&Q.append(te);const pe=(0,c.Qd)(Z)?Z?.title:Z;if((0,c.O9)(pe)&&!(0,c.Qd)(pe)){const z=(0,f.A)("<span>").addClass("dx-tab-text-span");z.append(P.A.createTextNode(pe));const oe=(0,f.A)("<span>").addClass("dx-tab-text-span-pseudo");oe.append(P.A.createTextNode(pe)),oe.appendTo(z),z.appendTo(Q)}},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new S.U((Z,Q)=>{this._prepareTabsItemTemplate(Q,Z);const te=(0,f.A)("<div>").addClass("dx-tab-text");Z.wrapInner(te)},["title","icon"],this.option("integrationOptions.watchMethod"))})},_createTitleActions(){this._createTitleClickAction(),this._createTitleHoldAction(),this._createTitleRenderedAction()},_createTitleClickAction(){this._titleClickAction=this._createActionByOption("onTitleClick")},_createTitleHoldAction(){this._titleHoldAction=this._createActionByOption("onTitleHold")},_createTitleRenderedAction(){this._titleRenderedAction=this._createActionByOption("onTitleRendered")},_renderLayout(){if(this._tabs)return;const Z=this.$element();this._$tabContainer=(0,f.A)("<div>").addClass("dx-tabpanel-tabs").appendTo(Z);const Q=(0,f.A)("<div>").appendTo(this._$tabContainer);this._tabs=this._createComponent(Q,a.A,this._tabConfig()),this._$container=(0,f.A)("<div>").addClass("dx-tabpanel-container").appendTo(Z),this._$container.append(this._$wrapper)},_refreshActiveDescendant(){if(!this._tabs)return;const Z=this._tabs,Q=Z.itemElements(),te=(0,f.A)(Q[Z.option("selectedIndex")]),pe=this.getFocusedItemId();this.setAria("controls",void 0,(0,f.A)(Q)),this.setAria("controls",pe,te)},_getTabsIndicatorPosition(){const{_tabsIndicatorPosition:Z,tabsPosition:Q}=this.option();return Z??B[Q]},_tabConfig(){const Z=this._getTabsIndicatorPosition();return{selectOnFocus:!0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),repaintChangesOnly:this.option("repaintChangesOnly"),tabIndex:this.option("tabIndex"),selectedIndex:this.option("selectedIndex"),badgeExpr:this.option("badgeExpr"),onItemClick:this._titleClickAction.bind(this),onItemHold:this._titleHoldAction.bind(this),itemHoldTimeout:this.option("itemHoldTimeout"),onSelectionChanged:function(Q){this.option("selectedIndex",Q.component.option("selectedIndex")),this._refreshActiveDescendant()}.bind(this),onItemRendered:this._titleRenderedAction.bind(this),itemTemplate:this._getTemplateByOption("itemTitleTemplate"),items:this.option("items"),noDataText:null,scrollingEnabled:this.option("scrollingEnabled"),scrollByContent:this.option("scrollByContent"),showNavButtons:this.option("showNavButtons"),itemTemplateProperty:"tabTemplate",loopItemFocus:this.option("loop"),selectionRequired:!0,onOptionChanged:function(Q){if("focusedElement"===Q.name)if(Q.value){const te=(0,f.A)(Q.value),pe=this._itemElements().eq(te.index());this.option("focusedElement",(0,b.cc)(pe))}else this.option("focusedElement",Q.value)}.bind(this),onFocusIn:function(Q){this._focusInHandler(Q.event)}.bind(this),onFocusOut:function(Q){this._isFocusOutHandlerExecuting||this._focusOutHandler(Q.event)}.bind(this),orientation:this._getTabsOrientation(),iconPosition:this.option("iconPosition"),stylingMode:this.option("stylingMode"),_itemAttributes:{class:"dx-tabpanel-tab"},_indicatorPosition:Z}},_renderFocusTarget(){this._focusTarget().attr("tabIndex",-1)},_getTabsOrientation(){const{tabsPosition:Z}=this.option();return[U.right,U.left].includes(Z)?"vertical":"horizontal"},_getTabPanelTabsPositionClass(){switch(this.option("tabsPosition")){case U.right:return k.right;case U.bottom:return k.bottom;case U.left:return k.left;default:return k.top}},_toggleTabPanelTabsPositionClass(){for(const Q in k)this.$element().removeClass(k[Q]);const Z=this._getTabPanelTabsPositionClass();this.$element().addClass(Z)},_updateTabsOrientation(){const Z=this._getTabsOrientation();this._setTabsOption("orientation",Z)},_toggleWrapperFocusedClass(Z){this._toggleFocusClass(Z,this._$wrapper)},_toggleDisabledFocusedClass(Z){this._focusTarget().toggleClass("dx-disabled-focused-tab",Z)},_updateFocusState(Z,Q){this.callBase(Z,Q);const te=Z.target===this._tabs._focusTarget().get(0),pe=Z.target===this._focusTarget().get(0);if(te&&this._toggleFocusClass(Q,this._focusTarget()),te||pe){const z=this._isDisabled(this.option("focusedElement"));this._toggleWrapperFocusedClass(Q&&!z),this._toggleDisabledFocusedClass(Q&&z)}pe&&this._toggleFocusClass(Q,this._tabs.option("focusedElement"))},_focusOutHandler(Z){this._isFocusOutHandlerExecuting=!0,this.callBase.apply(this,arguments),this._tabs._focusOutHandler(Z),this._isFocusOutHandlerExecuting=!1},_setTabsOption(Z,Q){this._tabs&&this._tabs.option(Z,Q)},_visibilityChanged(Z){Z&&this._tabs._dimensionChanged()},registerKeyHandler(Z,Q){this.callBase(Z,Q),this._tabs&&this._tabs.registerKeyHandler(Z,Q)},repaint(){this.callBase(),this._tabs.repaint()},_updateTabsIndicatorPosition(){const Z=this._getTabsIndicatorPosition();this._setTabsOption("_indicatorPosition",Z)},_optionChanged(Z){const{name:Q,value:te,fullName:pe}=Z;switch(Q){case"dataSource":default:this.callBase(Z);break;case"items":this._setTabsOption(Q,this.option(Q)),this.option("repaintChangesOnly")||this._tabs.repaint(),this.callBase(Z);break;case"width":this.callBase(Z),this._tabs.repaint();break;case"selectedIndex":case"selectedItem":if(this._setTabsOption(pe,te),this.callBase(Z),!0===this.option("focusStateEnabled")){const z=this.option("selectedIndex"),oe=this._itemElements().eq(z);this.option("focusedElement",(0,b.cc)(oe))}break;case"itemHoldTimeout":case"focusStateEnabled":case"hoverStateEnabled":this._setTabsOption(pe,te),this.callBase(Z);break;case"scrollingEnabled":case"scrollByContent":case"showNavButtons":this._setTabsOption(pe,te);break;case"focusedElement":{const z=te&&(0,f.A)(te).index(),oe=te&&this._tabs._itemElements().eq(z);if(this._setTabsOption("focusedElement",(0,b.cc)(oe)),te){const ae=this._isDisabled(te);this._toggleWrapperFocusedClass(!ae),this._toggleDisabledFocusedClass(ae)}this.callBase(Z);break}case"itemTitleTemplate":this._setTabsOption("itemTemplate",this._getTemplateByOption("itemTitleTemplate"));break;case"onTitleClick":this._createTitleClickAction(),this._setTabsOption("onItemClick",this._titleClickAction.bind(this));break;case"onTitleHold":this._createTitleHoldAction(),this._setTabsOption("onItemHold",this._titleHoldAction.bind(this));break;case"onTitleRendered":this._createTitleRenderedAction(),this._setTabsOption("onItemRendered",this._titleRenderedAction.bind(this));break;case"loop":this._setTabsOption("loopItemFocus",te);break;case"badgeExpr":this._invalidate();break;case"tabsPosition":this._toggleTabPanelTabsPositionClass(),this._updateTabsIndicatorPosition(),this._updateTabsOrientation();break;case"iconPosition":this._setTabsOption("iconPosition",te);break;case"stylingMode":this._setTabsOption("stylingMode",te);break;case"_tabsIndicatorPosition":this._setTabsOption("_indicatorPosition",te)}}});re.ItemClass=class _ extends g.A{_renderWatchers(){return this._startWatcher("badge",h.lQ),super._renderWatchers()}},(0,W.A)("dxTabPanel",re);const Y=re},6942:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>vt});var W=M(1973),o=M(5973),P=M(5704),b=M(5944),f=M(6021),S=M(3090),T=M(8535),y=M(2660),d=M(1363),c=M(1830),s=M(6110),a=M(4072),u=M(3535),h=M(9209),g=M(9293);function _(qe){return qe.scrollWidth-qe.clientWidth}M(662);var G=M(9012),k=M(6067),U=M(4602),B=M(9212),K=M(9524);const J="dx-tabs-expanded",Z=M(5107).A.inherit({_renderWatchers(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this))},_renderBadge(qe){if(this._$element.children(".dx-badge").remove(),!qe)return;const At=(0,P.A)("<div>").addClass("dx-tabs-item-badge").addClass("dx-badge").text(qe);this._$element.append(At)}}),Ee={top:"dx-tab-indicator-position-top",right:"dx-tab-indicator-position-right",bottom:"dx-tab-indicator-position-bottom",left:"dx-tab-indicator-position-left"},Oe={top:"dx-tabs-icon-position-top",end:"dx-tabs-icon-position-end",bottom:"dx-tabs-icon-position-bottom",start:"dx-tabs-icon-position-start"},ze={primary:"dx-tabs-styling-mode-primary",secondary:"dx-tabs-styling-mode-secondary"},Xe=k.A.inherit({_activeStateUnit:".dx-tab",_getDefaultOptions(){return(0,S.X)(this.callBase(),{hoverStateEnabled:!0,showNavButtons:!0,scrollByContent:!0,scrollingEnabled:!0,selectionMode:"single",orientation:"horizontal",iconPosition:"start",stylingMode:"primary",activeStateEnabled:!0,selectionRequired:!1,selectOnFocus:!0,loopItemFocus:!1,useInkRipple:!1,badgeExpr:qe=>qe?qe.badge:void 0,_itemAttributes:{role:"tab"},_indicatorPosition:null})},_defaultOptionsRules(){const qe=(0,B.ss)();return this.callBase().concat([{device:()=>"desktop"!==o.A.real().deviceType,options:{showNavButtons:!1}},{device:{deviceType:"desktop"},options:{scrollByContent:!1}},{device:()=>"desktop"===o.A.real().deviceType&&!o.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,B.Ft)(qe),options:{iconPosition:"top",stylingMode:"secondary"}},{device:()=>(0,B.gx)(qe),options:{useInkRipple:!0,selectOnFocus:!1,iconPosition:"top"}}])},_init(){const{orientation:qe,stylingMode:At,scrollingEnabled:Tt}=this.option(),qt=this._getIndicatorPosition();this.callBase(),this.setAria("role","tablist"),this.$element().addClass("dx-tabs"),this._toggleScrollingEnabledClass(Tt),this._toggleOrientationClass(qe),this._toggleIndicatorPositionClass(qt),this._toggleIconPositionClass(),this._toggleStylingModeClass(At),this._renderWrapper(),this._renderMultiple(),this._feedbackHideTimeout=100},_prepareDefaultItemTemplate(qe,At){const Tt=(0,c.Qd)(qe)?qe?.text:qe;if((0,c.O9)(Tt)){const qt=(0,P.A)("<span>").addClass("dx-tab-text-span");qt.text(Tt);const wt=(0,P.A)("<span>").addClass("dx-tab-text-span-pseudo");wt.text(Tt),wt.appendTo(qt),qt.appendTo(At)}(0,c.O9)(qe.html)&&At.html(qe.html)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new b.U((qe,At)=>{this._prepareDefaultItemTemplate(At,qe);const Tt=(0,T.N)(At.icon);Tt&&Tt.prependTo(qe);const qt=(0,P.A)("<div>").addClass("dx-tab-text");qe.wrapInner(qt)},["text","html","icon"],this.option("integrationOptions.watchMethod"))})},_createItemByTemplate:function(qe,At){const{itemData:Tt,container:qt,index:wt}=At;return this._deferredTemplates[wt]=(0,f.cY)(),qe.render({model:Tt,container:qt,index:wt,onRendered:()=>this._deferredTemplates[wt].resolve()})},_itemClass:()=>"dx-tab",_selectedItemClass:()=>"dx-tab-selected",_itemDataKey:()=>"dxTabData",_initMarkup(){this._deferredTemplates=[],this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().addClass("dx-overflow-hidden")},_render(){this.callBase(),this._deferRenderScrolling()},_deferRenderScrolling(){f.z7.apply(this,this._deferredTemplates).done(()=>this._renderScrolling())},_renderScrolling(){const qe=["dx-tabs-stretched",J,"dx-overflow-hidden"];if(this.$element().removeClass(qe.join(" ")),this.option("scrollingEnabled")&&this._isItemsSizeExceeded()){this._scrollable||(this._renderScrollable(),this._renderNavButtons());const At=this.getScrollable();if(At.update(),this.option("rtlEnabled")){const Tt=_((0,P.A)(this.getScrollable().container()).get(0));At.scrollTo({left:Tt})}this._updateNavButtonsState(),this._scrollToItem(this.option("selectedItem"))}this.option("scrollingEnabled")&&this._isItemsSizeExceeded()||(this._cleanScrolling(),this._needStretchItems()&&this.$element().addClass("dx-tabs-stretched"),this.$element().removeClass("dx-tabs-nav-buttons").addClass(J))},_isVertical(){return"vertical"===this.option("orientation")},_isItemsSizeExceeded(){return this._isVertical()?this._isItemsHeightExceeded():this._isItemsWidthExceeded()},_isItemsWidthExceeded(){const qe=this._getVisibleItems(),At=this._getSummaryItemsSize("width",qe,!0),Tt=(0,d.RG)(this.$element());return![At,Tt].includes(0)&&At>Tt-1},_isItemsHeightExceeded(){const qe=this._getVisibleItems();return this._getSummaryItemsSize("height",qe,!0)-1>(0,d.Oq)(this.$element())},_needStretchItems(){const qe=this._getVisibleItems(),At=(0,d.RG)(this.$element()),Tt=[];return(0,y.__)(qe,(ri,Tn)=>{Tt.push((0,d.Ot)(Tn,!0))}),Math.max.apply(null,Tt)>At/qe.length+1},_cleanNavButtons(){!this._leftButton||!this._rightButton||(this._leftButton.$element().remove(),this._rightButton.$element().remove(),this._leftButton=null,this._rightButton=null)},_cleanScrolling(){this._scrollable&&(this._$wrapper.appendTo(this.$element()),this._scrollable.$element().remove(),this._scrollable=null,this._cleanNavButtons())},_renderInkRipple(){this._inkRipple=(0,K.XX)()},_getPointerEvent:()=>h.A.up,_toggleActiveState(qe,At,Tt){if(this.callBase.apply(this,arguments),!this._inkRipple)return;const qt={element:qe,event:Tt};At?this._inkRipple.showWave(qt):this._inkRipple.hideWave(qt)},_renderMultiple(){"multiple"===this.option("selectionMode")&&this.option("selectOnFocus",!1)},_renderWrapper(){this._$wrapper=(0,P.A)("<div>").addClass("dx-tabs-wrapper"),this.$element().append(this._$wrapper)},_itemContainer(){return this._$wrapper},_getScrollableDirection(){return this._isVertical()?"vertical":"horizontal"},_updateScrollable(){this.getScrollable()&&this._cleanScrolling(),this._renderScrolling()},_renderScrollable(){const qe=this.$element().wrapInner((0,P.A)("<div>").addClass("dx-tabs-scrollable")).children();this._scrollable=this._createComponent(qe,U.A,{direction:this._getScrollableDirection(),showScrollbar:"never",useKeyboard:!1,useNative:!1,scrollByContent:this.option("scrollByContent"),onScroll:()=>{this._updateNavButtonsState()}}),this.$element().append(this._scrollable.$element())},_scrollToItem(qe){if(!this._scrollable)return;const At=this._editStrategy.getItemElement(qe);this._scrollable.scrollToElement(At)},_renderNavButtons(){const{showNavButtons:qe,rtlEnabled:At}=this.option();if(this.$element().toggleClass("dx-tabs-nav-buttons",qe),!qe)return;this._leftButton=this._createNavButton(-30,At?"chevronnext":"chevronprev");const Tt=this._leftButton.$element();Tt.addClass("dx-tabs-nav-button-left"),this.$element().prepend(Tt),this._rightButton=this._createNavButton(30,At?"chevronprev":"chevronnext");const qt=this._rightButton.$element();qt.addClass("dx-tabs-nav-button-right"),this.$element().append(qt)},_updateNavButtonsAriaDisabled(){[this._leftButton,this._rightButton].forEach(At=>{At?.$element().attr({"aria-disabled":null})})},_updateNavButtonsState(){const qe=this._isVertical(),At=this.getScrollable();var Tt,qt,wt,En;qe?(null===(Tt=this._leftButton)||void 0===Tt||Tt.option("disabled",function I(qe,At){return Math.round(qe)<=At}(At.scrollTop(),1)),null===(qt=this._rightButton)||void 0===qt||qt.option("disabled",function L(qe,At,Tt,qt){return Math.round(function x(qe){return qe.scrollHeight-qe.clientHeight}(qe)-At-Tt)<=qt}((0,P.A)(At.container()).get(0),At.scrollTop(),0,1))):(null===(wt=this._leftButton)||void 0===wt||wt.option("disabled",function D(qe,At){return Math.round(qe)<=At}(At.scrollLeft(),1)),null===(En=this._rightButton)||void 0===En||En.option("disabled",function C(qe,At,Tt){return Math.round(_(qe)-At)<=Tt}((0,P.A)(At.container()).get(0),At.scrollLeft(),1))),this._updateNavButtonsAriaDisabled()},_updateScrollPosition(qe,At){this._scrollable.update(),this._scrollable.scrollBy(qe/At)},_createNavButton(qe,At){const Tt=this._createAction(()=>{this._holdInterval=setInterval(()=>{this._updateScrollPosition(qe,5)},5)}),qt=(0,g.b4)(u.A.name,"dxNavButton"),wt=(0,g.b4)(h.A.up,"dxNavButton"),En=(0,g.b4)(h.A.out,"dxNavButton"),ri=this._createComponent((0,P.A)("<div>").addClass("dx-tabs-nav-button"),G.A,{focusStateEnabled:!1,icon:At,integrationOptions:{},elementAttr:{role:null,"aria-label":null,"aria-disabled":null},onClick:()=>{this._updateScrollPosition(qe,1)}}),Tn=ri.$element();return a.A.on(Tn,qt,{timeout:300},Jn=>{Tt({event:Jn})}),a.A.on(Tn,wt,()=>{this._clearInterval()}),a.A.on(Tn,En,()=>{this._clearInterval()}),ri},_clearInterval(){this._holdInterval&&clearInterval(this._holdInterval)},_updateSelection(qe){this._scrollable&&this._scrollable.scrollToElement(this.itemElements().eq(qe[0]))},_visibilityChanged(qe){qe&&this._dimensionChanged()},_dimensionChanged(){this._renderScrolling()},_itemSelectHandler(qe){"single"===this.option("selectionMode")&&this.isItemSelected(qe.currentTarget)||this.callBase(qe)},_clean(){this._deferredTemplates=[],this._cleanScrolling(),this.callBase()},_toggleTabsVerticalClass(qe){this.$element().toggleClass("dx-tabs-vertical",qe)},_toggleTabsHorizontalClass(qe){this.$element().toggleClass("dx-tabs-horizontal",qe)},_getIndicatorPositionClass:qe=>Ee[qe],_getIndicatorPosition(){const{_indicatorPosition:qe,rtlEnabled:At}=this.option();if(qe)return qe;const Tt=this._isVertical();return At?Tt?"left":"bottom":Tt?"right":"bottom"},_toggleIndicatorPositionClass(qe){const At=this._getIndicatorPositionClass(qe);this._toggleElementClasses(Ee,At)},_toggleScrollingEnabledClass(qe){this.$element().toggleClass("dx-tabs-scrolling-enabled",!!qe)},_toggleOrientationClass(qe){const At="vertical"===qe;this._toggleTabsVerticalClass(At),this._toggleTabsHorizontalClass(!At)},_getTabsIconPositionClass(){switch(this.option("iconPosition")){case"top":return Oe.top;case"end":return Oe.end;case"bottom":return Oe.bottom;default:return Oe.start}},_toggleIconPositionClass(){const qe=this._getTabsIconPositionClass();this._toggleElementClasses(Oe,qe)},_toggleStylingModeClass(qe){this._toggleElementClasses(ze,ze[qe]??ze.primary)},_toggleElementClasses(qe,At){for(const Tt in qe)this.$element().removeClass(qe[Tt]);this.$element().addClass(At)},_toggleFocusedDisabledNextClass(qe,At){this._itemElements().eq(qe).toggleClass("dx-focused-disabled-next-tab",At)},_toggleFocusedDisabledPrevClass(qe,At){this._itemElements().eq(qe).toggleClass("dx-focused-disabled-prev-tab",At)},_toggleFocusedDisabledClasses(qe){const{selectedIndex:At}=this.option();this._itemElements().removeClass("dx-focused-disabled-next-tab").removeClass("dx-focused-disabled-prev-tab");const Tt=At-1,qt=At+1,wt=(0,P.A)(qe).index(),En=this._itemElements().eq(qt).hasClass("dx-state-disabled"),Jn=this._itemElements().eq(Tt).hasClass("dx-state-disabled")&&wt===Tt;this._toggleFocusedDisabledNextClass(At,En&&wt===qt),this._toggleFocusedDisabledPrevClass(At,Jn)},_updateFocusedElement(){const{focusStateEnabled:qe,selectedIndex:At}=this.option(),Tt=this._itemElements();if(qe&&Tt.length){const qt=Tt.get(At);this.option({focusedElement:qt})}},_optionChanged(qe){switch(qe.name){case"useInkRipple":case"scrollingEnabled":this._toggleScrollingEnabledClass(qe.value),this._invalidate();break;case"showNavButtons":case"badgeExpr":this._invalidate();break;case"scrollByContent":this._scrollable&&this._scrollable.option(qe.name,qe.value);break;case"width":case"height":this.callBase(qe),this._dimensionChanged();break;case"selectionMode":this._renderMultiple(),this.callBase(qe);break;case"focusedElement":this._toggleFocusedDisabledClasses(qe.value),this.callBase(qe),this._scrollToItem(qe.value);break;case"rtlEnabled":{this.callBase(qe);const At=this._getIndicatorPosition();this._toggleIndicatorPositionClass(At);break}case"orientation":{this._toggleOrientationClass(qe.value);const At=this._getIndicatorPosition();this._toggleIndicatorPositionClass(At),(0,s.Vd)()&&this._updateScrollable();break}case"iconPosition":this._toggleIconPositionClass(),(0,s.Vd)()&&this._dimensionChanged();break;case"stylingMode":this._toggleStylingModeClass(qe.value),(0,s.Vd)()&&this._dimensionChanged();break;case"_indicatorPosition":this._toggleIndicatorPositionClass(qe.value);break;case"selectedIndex":case"selectedItem":case"selectedItems":this.callBase(qe),this._updateFocusedElement();break;default:this.callBase(qe)}},_afterItemElementInserted(){this.callBase(),this._deferRenderScrolling()},_afterItemElementDeleted(qe,At){this.callBase(qe,At),this._renderScrolling()},getScrollable(){return this._scrollable}});Xe.ItemClass=Z,(0,W.A)("dxTabs",Xe);const vt=Xe},3577:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>be});var W=M(1973),o=M(5973),P=M(9522),b=M(5397),f=M(2925),S=M(5704),T=M(5944),y=M(5345),d=M(4859),c=M(6021),s=M(1832),a=M(3090),u=M(2660),h=M(7271),g=M(1363),_=M(1830),x=M(6110),w=M(5335),D=M(778),C=M(4072),I=M(9293),L=M(8360),N=M(6520),G=M(127),k=M(699),U=M(4647);function B(ve,le){return(ve||le)&&!(ve&&le)}const de=N.A.inherit({_supportedKeys(){const ve=this.callBase(),le=ye=>this._list._keyboardHandler(ye),Ce=this.option("rtlEnabled");return(0,a.X)({},ve,{backspace(ye){if(!this._isCaretAtTheStart())return;this._processKeyboardEvent(ye),this._isTagRemoved=!0;const ge=this._$focusedTag||this._tagElements().last();this._$focusedTag&&this._moveTagFocus("prev",!0),0!==ge.length&&(this._preserveFocusedTag=!0,this._removeTagElement(ge),delete this._preserveFocusedTag)},upArrow:(ye,ge)=>ye.altKey||!this._list?ve.upArrow.call(this,ye):le(ge),downArrow:(ye,ge)=>ye.altKey||!this._list?ve.downArrow.call(this,ye):le(ge),del(ye){if(!this._$focusedTag||!this._isCaretAtTheStart())return;this._processKeyboardEvent(ye),this._isTagRemoved=!0;const ge=this._$focusedTag;this._moveTagFocus("next",!0),this._preserveFocusedTag=!0,this._removeTagElement(ge),delete this._preserveFocusedTag},enter(ye,ge){const fe=this._list&&null!==this._list.option("focusedElement");if(this.option("acceptCustomValue")&&!fe)return ye.preventDefault(),void(""!==this._searchValue()&&this._customItemAddedHandler(ye));this.option("opened")&&(this._saveValueChangeEvent(ye),le(ge),ye.preventDefault())},space(ye,ge){const fe=this.option("opened"),xe=this._shouldRenderSearchEvent();fe&&!xe&&(this._saveValueChangeEvent(ye),le(ge),ye.preventDefault())},leftArrow(ye){if(!this._isCaretAtTheStart()||this._isEmpty()||this._isEditable()&&Ce&&!this._$focusedTag)return;ye.preventDefault();const ge=Ce?"next":"prev";this._moveTagFocus(ge),!this.option("multiline")&&this._scrollContainer(ge)},rightArrow(ye){if(!this._isCaretAtTheStart()||this._isEmpty()||this._isEditable()&&!Ce&&!this._$focusedTag)return;ye.preventDefault();const ge=Ce?"prev":"next";this._moveTagFocus(ge),!this.option("multiline")&&this._scrollContainer(ge)}})},_processKeyboardEvent(ve){ve.preventDefault(),ve.stopPropagation(),this._saveValueChangeEvent(ve)},_isEmpty(){return 0===this._getValue().length},_updateTagsContainer(ve){this._$tagsContainer=ve.addClass("dx-tag-container")},_allowSelectItemByTab:()=>!1,_isCaretAtTheStart(){const ve=(0,k.A)(this._input());return 0===ve?.start&&0===ve.end},_updateInputAriaActiveDescendant(ve){this.setAria("activedescendant",ve,this._input())},_moveTagFocus(ve,le){if(!this._$focusedTag){const ye=this._tagElements();return this._$focusedTag="next"===ve?ye.first():ye.last(),this._toggleFocusClass(!0,this._$focusedTag),void this._updateInputAriaActiveDescendant(this._$focusedTag.attr("id"))}const Ce=this._$focusedTag[ve](".dx-tag");Ce.length>0?(this._replaceFocusedTag(Ce),this._updateInputAriaActiveDescendant(Ce.attr("id"))):(le||"next"===ve&&this._isEditable())&&(this._clearTagFocus(),this._updateInputAriaActiveDescendant())},_replaceFocusedTag(ve){this._toggleFocusClass(!1,this._$focusedTag),this._$focusedTag=ve,this._toggleFocusClass(!0,this._$focusedTag)},_clearTagFocus(){this._$focusedTag&&(this._toggleFocusClass(!1,this._$focusedTag),this._updateInputAriaActiveDescendant(),delete this._$focusedTag)},_focusClassTarget(ve){return ve&&ve.length&&ve[0]!==this._focusTarget()[0]?ve:this.callBase()},_getLabelContainer(){return this._$tagsContainer},_getFieldElement(){return this._input()},_scrollContainer(ve){if(this.option("multiline")||!(0,x.Vd)()||!this._$tagsContainer)return;const le=this._getScrollPosition(ve);this._$tagsContainer.scrollLeft(le)},_getScrollPosition(ve){return"start"===ve||"end"===ve?this._getBorderPosition(ve):this._$focusedTag?this._getFocusedTagPosition(ve):this._getBorderPosition("end")},_getBorderPosition(ve){const le=this.option("rtlEnabled"),Ce=B("end"===ve,le),ye=le?-1:1;return B(Ce,!le)?0:ye*(this._$tagsContainer.get(0).scrollWidth-(0,g.Ot)(this._$tagsContainer))},_getFocusedTagPosition(ve){const Ce=B("next"===ve,this.option("rtlEnabled"));let{left:ye}=this._$focusedTag.position(),ge=this._$tagsContainer.scrollLeft();return Ce&&(ye+=(0,g.Ot)(this._$focusedTag,!0)-(0,g.Ot)(this._$tagsContainer)),B(Ce,ye<0)&&(ge+=ye),ge},_setNextValue:d.lQ,_getDefaultOptions(){return(0,a.X)(this.callBase(),{value:[],showDropDownButton:!1,maxFilterQueryLength:1500,tagTemplate:"tag",selectAllText:L.A.format("dxList-selectAll"),hideSelectedItems:!1,selectedItems:[],selectAllMode:"page",onSelectAllValueChanged:null,maxDisplayedTags:void 0,showMultiTagOnly:!0,onMultiTagPreparing:null,multiline:!0,useSubmitBehavior:!0})},_init(){this.callBase(),this._selectedItems=[],this._initSelectAllValueChangedAction()},_initActions(){this.callBase(),this._initMultiTagPreparingAction()},_initMultiTagPreparingAction(){this._multiTagPreparingAction=this._createActionByOption("onMultiTagPreparing",{beforeExecute:ve=>{this._multiTagPreparingHandler(ve.args[0])},excludeValidators:["disabled","readOnly"]})},_multiTagPreparingHandler(ve){const{length:le}=this._getValue();ve.text=this.option("showMultiTagOnly")?L.A.getFormatter("dxTagBox-selected")(le):L.A.getFormatter("dxTagBox-moreSelected")(le-this.option("maxDisplayedTags")+1)},_initDynamicTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({tag:new T.U((ve,le)=>{const Ce=(0,S.A)("<div>").addClass("dx-tag-content");(0,S.A)("<span>").text(le.text??le).appendTo(Ce),(0,S.A)("<div>").addClass("dx-tag-remove-button").appendTo(Ce),ve.append(Ce)},["text"],this.option("integrationOptions.watchMethod"),{text:this._displayGetter})})},_toggleSubmitElement(ve){ve?(this._renderSubmitElement(),this._setSubmitValue()):(this._$submitElement&&this._$submitElement.remove(),delete this._$submitElement)},_renderSubmitElement(){this.option("useSubmitBehavior")&&(this._$submitElement=(0,S.A)("<select>").attr({multiple:"multiple","aria-label":"Selected items"}).css("display","none").appendTo(this.$element()))},_setSubmitValue(){if(!this.option("useSubmitBehavior"))return;const ve=this._getValue(),le=[];for(let Ce=0,ye=ve.length;Ce<ye;Ce++){const ge=this._shouldUseDisplayValue(ve[Ce]);le.push((0,S.A)("<option>").val(ge?this._displayGetter(ve[Ce]):ve[Ce]).attr("selected","selected"))}this._getSubmitElement().empty().append(le)},_initMarkup(){this._tagElementsCache=(0,S.A)();const ve=!this.option("multiline");this.$element().addClass("dx-tagbox").toggleClass("dx-tagbox-only-select",!(this.option("searchEnabled")||this.option("acceptCustomValue"))).toggleClass("dx-tagbox-single-line",ve),this.setAria({role:"application",roledescription:"tagbox"},this.$element()),this._initTagTemplate(),this.callBase()},_getNewLabelId:(ve,le,Ce)=>ve?Ce?ve===le?void 0:ve.split(" ").filter(ye=>ye!==le).join(" "):`${ve} ${le}`:le,_updateElementAria(ve,le){if(!ve)return void this.setAria("labelledby",void 0,this.$element());const ye=this.$element().attr("aria-labelledby"),ge=this._getNewLabelId(ye,ve,le);this.setAria("labelledby",ge,this.$element())},_render(){this.callBase(),this._renderTagRemoveAction(),this._renderSingleLineScroll(),this._scrollContainer("start")},_initTagTemplate(){this._tagTemplate=this._getTemplateByOption("tagTemplate")},_renderField(){const ve=!(0,_.O9)(this.option("fieldTemplate"));this.$element().toggleClass("dx-tagbox-default-template",ve).toggleClass("dx-tagbox-custom-template",!ve),this.callBase()},_renderTagRemoveAction(){const ve=this._createAction(this._removeTagHandler.bind(this)),le=(0,I.b4)(D.U,"dxTagBoxTagRemove");C.A.off(this._$tagsContainer,le),C.A.on(this._$tagsContainer,le,".dx-tag-remove-button",Ce=>{ve({event:Ce})})},_renderSingleLineScroll(){const ve=(0,I.b4)("dxmousewheel",this.NAME),le=this.$element(),Ce=this.option("multiline");C.A.off(le,ve),"desktop"===o.A.real().deviceType?Ce||C.A.on(le,ve,this._tagContainerMouseWheelHandler.bind(this)):this._$tagsContainer&&this._$tagsContainer.css("overflowX",Ce?"":"auto")},_tagContainerMouseWheelHandler(ve){const le=this._$tagsContainer.scrollLeft(),Ce=-.3*ve.delta;if(!(0,I.By)(ve)&&(0,U.f)(this._$tagsContainer,Ce,!0))return this._$tagsContainer.scrollLeft(le+Ce),!1},_renderEvents(){this.callBase();const ve=this._input(),le=(0,I.b4)("keydown",this.NAME);C.A.on(ve,le,Ce=>{const ye=(0,I.YD)(Ce);!this._isControlKey(ye)&&this._isEditable()&&this._clearTagFocus()})},_popupWrapperClass(){return`${this.callBase()} dx-tagbox-popup-wrapper`},_renderInput(){this.callBase(),this._renderPreventBlurOnInputClick()},_renderPreventBlurOnInputClick(){const ve=(0,I.b4)("mousedown","dxTagBox");C.A.off(this._inputWrapper(),ve),C.A.on(this._inputWrapper(),ve,le=>{le.target!==this._input()[0]&&this._isFocused()&&le.preventDefault()})},_renderInputValueImpl(){return this._renderMultiSelect()},_loadInputValue:()=>(0,c.z7)(),_clearTextValue(){this._input().val(""),this._toggleEmptinessEventHandler(),this.option("text","")},_focusInHandler(ve){this._preventNestedFocusEvent(ve)||this._scrollContainer("end"),this.callBase(ve)},_renderInputValue(){return this.option("displayValue",this._searchValue()),this.callBase()},_restoreInputText(ve){ve||this._clearTextValue()},_focusOutHandler(ve){this._preventNestedFocusEvent(ve)||(this._clearTagFocus(),this._scrollContainer("start")),this.callBase(ve)},_initSelectAllValueChangedAction(){this._selectAllValueChangeAction=this._createActionByOption("onSelectAllValueChanged")},_renderList(){this.callBase(),this._setListDataSourceFilter()},_canListHaveFocus(){return"useButtons"===this.option("applyValueMode")},_listConfig(){const ve=this.option("showSelectionControls")?"all":"multiple";return(0,a.X)(this.callBase(),{maxFilterLengthInRequest:this.option("maxFilterQueryLength"),selectionMode:ve,selectAllText:this.option("selectAllText"),onSelectAllValueChanged:le=>{let{value:Ce}=le;this._selectAllValueChangeAction({value:Ce})},selectAllMode:this.option("selectAllMode"),selectedItems:this._selectedItems,onFocusedItemChanged:null})},_renderMultiSelect(){const ve=(0,c.cY)();return this._updateTagsContainer(this._$textEditorInputContainer),this._renderInputSize(),this._renderTags().done(()=>{this._popup&&this._popup.refreshPosition(),ve.resolve()}).fail(ve.reject),ve.promise()},_listItemClickHandler(ve){!this.option("showSelectionControls")&&this._clearTextValue(),"useButtons"!==this.option("applyValueMode")&&(this.callBase(ve),this._saveValueChangeEvent(void 0))},_shouldClearFilter(){const ve=this.callBase();return!this.option("showSelectionControls")&&ve},_renderInputSize(){const ve=this._input(),le=ve.val(),Ce=(0,_.Kg)(le)&&le;let ge,ye="";const fe=this.option("searchEnabled")||this.option("acceptCustomValue");if(Ce&&fe){const xe=(0,s.D2)(ve,le,{includePaddings:!0});xe.insertAfter(ve),ye=(0,g.Ot)(xe)+5,xe.remove()}else le||(ge=1);ve.css("width",ye),ve.attr("size",ge??"")},_renderInputSubstitution(){this.callBase(),this._updateWidgetHeight()},_getValue(){return this.option("value")||[]},_multiTagRequired(){const ve=this._getValue(),le=this.option("maxDisplayedTags");return(0,_.O9)(le)&&ve.length>le},_renderMultiTag(ve){const le=`dx-${new f.A}`,Ce=(0,S.A)("<div>").attr("id",le).addClass("dx-tag").addClass("dx-tagbox-multi-tag"),ye={multiTagElement:(0,P.cc)(Ce),selectedItems:this.option("selectedItems")};return this._multiTagPreparingAction(ye),!ye.cancel&&(Ce.data("dxTagData",ye.text),Ce.insertBefore(ve),this._tagTemplate.render({model:ye.text,container:(0,P.cc)(Ce)}),this._setTagAria(Ce,ye.text),this._updateElementAria(le),Ce)},_getFilter(ve){const le=this._dataController.filter(),Ce=ve.getCombinedFilter(this.option("valueExpr"),le),ye=encodeURI(JSON.stringify(Ce)).length,ge=this.option("maxFilterQueryLength");if(ye<=ge)return Ce;G.A.log("W1019",ge)},_getFilteredItems(ve){var le,Ce;null===(le=this._loadFilteredItemsPromise)||void 0===le||le.reject();const ye=new h.H(ve),ge=null===(Ce=this._list)||void 0===Ce?void 0:Ce.option("selectedItems"),fe=!!ge&&this._list._dataController.isLoaded(),xe=ge||this.option("selectedItems"),Te=ye.getLocalFilter(this._valueGetter),Ee=xe.filter(Te),Oe=Ee.length===ve.length,ze=(0,c.cY)(),$e=this._dataController;if((!this._isDataSourceChanged||fe)&&Oe)return ze.resolve(Ee).promise();const{customQueryParams:Be,expand:Ue,select:ot}=$e.loadOptions(),st=this._getFilter(ye);return $e.loadFromStore({filter:st,customQueryParams:Be,expand:Ue,select:ot}).done((et,Ke)=>{if(this._isDataSourceChanged=!1,this._disposed)return void ze.reject();const{data:Ye}=(0,w.Xp)(et,Ke),Pe=$e.applyMapFunction(Ye);ze.resolve(Pe.filter(Te))}).fail(ze.reject),this._loadFilteredItemsPromise=ze,ze.promise()},_createTagsData(ve,le){const Ce=[],ye={},ge="this"===this._valueGetterExpr(),fe={};le.forEach(Ee=>{const Oe=ge?JSON.stringify(Ee):this._valueGetter(Ee);fe[Oe]=Ee});const xe=[];ve.forEach((Ee,Oe)=>{const ze=fe[ge?JSON.stringify(Ee):Ee];if(ge&&!(0,_.O9)(ze))xe.push(this._loadItem(Ee,ye).always($e=>{const Be=this._createTagData($e,Ee);Ce.splice(Oe,0,Be)}));else{const $e=this._createTagData(ze,Ee);Ce.splice(Oe,0,$e)}});const Te=(0,c.cY)();return c.z7.apply(this,xe).always(()=>{Te.resolve(Ce)}),Te.promise()},_createTagData(ve,le){if((0,_.O9)(ve))return this._selectedItems.push(ve),ve;const Ce=this.option("selectedItem");return this._valueGetter(Ce)===le?Ce:le},_isGroupedData(){return this.option("grouped")&&!this._dataController.group()},_getItemsByValues(ve){const le=[];return ve.forEach(Ce=>{const ye=this._getItemFromPlain(Ce);(0,_.O9)(ye)&&le.push(ye)}),le},_getFilteredGroupedItems(ve){const le=(0,c.cY)();return this._filteredGroupedItemsLoadPromise&&this._dataController.cancel(this._filteredGroupedItemsLoadPromise.operationId),this._dataController.items().length?le.resolve(this._getItemsByValues(ve)):this._filteredGroupedItemsLoadPromise=this._dataController.load().done(()=>{le.resolve(this._getItemsByValues(ve))}).fail(()=>{le.resolve([])}).always(()=>{this._filteredGroupedItemsLoadPromise=void 0}),le.promise()},_loadTagsData(){const ve=this._getValue(),le=(0,c.cY)();return this._selectedItems=[],(this._isGroupedData()?this._getFilteredGroupedItems(ve):this._getFilteredItems(ve)).done(ye=>{this._createTagsData(ve,ye).always(fe=>{le.resolve(fe)})}).fail(le.reject.bind(this)),le.promise()},_renderTags(){const ve=(0,c.cY)();let le=!1;return this._shouldGetItemsFromPlain(this._valuesToUpdate)&&(this._selectedItems=this._getItemsFromPlain(this._valuesToUpdate),this._selectedItems.length===this._valuesToUpdate.length&&(this._renderTagsImpl(this._selectedItems),le=!0,ve.resolve())),le||this._loadTagsData().done(Ce=>{this._disposed?ve.reject():(this._renderTagsImpl(Ce),ve.resolve())}).fail(ve.reject),ve.promise()},_renderTagsImpl(ve){this._renderTagsCore(ve),this._renderEmptyState(),this._preserveFocusedTag||this._clearTagFocus()},_shouldGetItemsFromPlain(ve){return ve&&this._dataController.isLoaded()&&ve.length<=this._getPlainItems().length},_getItemsFromPlain(ve){let le=this._getSelectedItemsFromList(ve);if(0===le.length&&ve.length>0||le.length<ve.length){const ye=this._getPlainItems();le=this._filterSelectedItems(ye,ve)}return le},_getSelectedItemsFromList(ve){var le;const Ce=null===(le=this._list)||void 0===le?void 0:le.option("selectedItems");let ye=[];return ve.length===Ce?.length&&(ye=this._filterSelectedItems(Ce,ve)),ye},_filterSelectedItems(ve,le){return ve.filter(ye=>{let ge;for(let fe=0;fe<le.length;fe++)if(ge=le[fe],(0,_.Gv)(ge)){if(this._isValueEquals(ye,ge))return!0}else if(this._isValueEquals(this._valueGetter(ye),ge))return!0;return!1},this)},_integrateInput(){this._isInputReady.resolve(),this.callBase();const ve=this.$element().find(".dx-texteditor-input-container");this._updateTagsContainer(ve),this._renderTagRemoveAction()},_renderTagsCore(ve){var le;null===(le=this._isInputReady)||void 0===le||le.reject(),this._isInputReady=(0,c.cY)(),this._renderField(),this.option("selectedItems",this._selectedItems.slice()),this._cleanTags(),this._input().length>0&&this._isInputReady.resolve(),(0,c.z7)(this._isInputReady).done(()=>{this._renderTagsElements(ve)})},_renderTagsElements(ve){const le=this._multiTagRequired()&&this._renderMultiTag(this._input()),Ce=this.option("showMultiTagOnly"),ye=this.option("maxDisplayedTags");ve.forEach((ge,fe)=>{if(le&&Ce||le&&!Ce&&fe-ye>=-1)return!1;this._renderTag(ge,le||this._input())}),this._isFocused()&&this._scrollContainer("end"),this._refreshTagElements()},_cleanTags(){if(this._multiTagRequired())this._tagElements().remove();else{const ve=this._tagElements(),le=this._getValue();(0,u.__)(ve,(Ce,ye)=>{const ge=(0,S.A)(ye),fe=ge.data("dxTagData");null!=le&&le.includes(fe)||ge.remove()})}this._updateElementAria()},_renderEmptyState(){const ve=!(this._getValue().length||this._selectedItems.length||this._searchValue());this._toggleEmptiness(ve),this._renderDisplayText()},_renderDisplayText(){this._renderInputSize()},_refreshTagElements(){this._tagElementsCache=this.$element().find(".dx-tag")},_tagElements(){return this._tagElementsCache},_applyTagTemplate(ve,le){this._tagTemplate.render({model:ve,container:(0,P.cc)(le)})},_renderTag(ve,le){const Ce=this._valueGetter(ve);if(!(0,_.O9)(Ce))return;let ye=this._getTag(Ce);const ge=this._displayGetter(ve),fe=this._getItemModel(ve,ge);if(ye)(0,_.O9)(ge)&&(ye.empty(),this._applyTagTemplate(fe,ye)),ye.removeClass("dx-tag-custom"),this._updateElementAria(ye.attr("id"));else{const xe=`dx-${new f.A}`;ye=this._createTag(Ce,le,xe),this._setTagAria(ye,(0,_.O9)(ge)?ge:Ce),(0,_.O9)(ve)?this._applyTagTemplate(fe,ye):(ye.addClass("dx-tag-custom"),this._applyTagTemplate(Ce,ye)),this._updateElementAria(xe)}},_setTagAria(ve,le){const Ce={role:"button",label:le,roledescription:L.A.format("dxTagBox-tagRoleDescription")};this.setAria(Ce,ve)},_getItemModel:(ve,le)=>(0,_.Gv)(ve)&&(0,_.O9)(le)?ve:(0,d.YD)(le,""),_getTag(ve){const le=this._tagElements(),Ce=le.length;let ye=!1;for(let ge=0;ge<Ce;ge++){const fe=le[ge],xe=(0,b.p)(fe,"dxTagData");if(ve===xe||(0,d.RL)(ve,xe)){ye=(0,S.A)(fe);break}}return ye},_createTag:(ve,le,Ce)=>(0,S.A)("<div>").attr("id",Ce).addClass("dx-tag").data("dxTagData",ve).insertBefore(le),_toggleEmptinessEventHandler(){this._toggleEmptiness(!this._getValue().length&&!this._searchValue().length)},_customItemAddedHandler(ve){this.callBase(ve),this._clearTextValue()},_removeTagHandler(ve){const le=ve.event;le.stopPropagation(),this._saveValueChangeEvent(le);const Ce=(0,S.A)(le.target).closest(".dx-tag");this._removeTagElement(Ce)},_removeTagElement(ve){if(ve.hasClass("dx-tagbox-multi-tag"))return void(this.option("showMultiTagOnly")?this.clear():this.option("value",this._getValue().slice(0,this.option("maxDisplayedTags"))));const le=ve.data("dxTagData"),Ce=ve.attr("id");this._removeTagWithUpdate(le),this._updateElementAria(Ce,!0),this._refreshTagElements()},_updateField:d.lQ,_removeTagWithUpdate(ve){const le=this._getValue().slice();this._removeTag(le,ve),this.option("value",le),this.option("selectedItem",null),0===le.length&&this._clearTagFocus()},_getCurrentValue(){return this._lastValue()},_selectionChangeHandler(ve){if("useButtons"===this.option("applyValueMode"))return;const le=this._getValue().slice();if((0,u.__)(ve.removedItems||[],(Ce,ye)=>{this._removeTag(le,this._valueGetter(ye))}),(0,u.__)(ve.addedItems||[],(Ce,ye)=>{this._addTag(le,this._valueGetter(ye))}),this._updateWidgetHeight(),!(0,d.RL)(this._list.option("selectedItemKeys"),this.option("value"))){const Ce=this._list._getSelectionChangeEvent();Ce&&this._saveValueChangeEvent(Ce),this.option("value",le)}this._list._saveSelectionChangeEvent(void 0)},_removeTag(ve,le){const Ce=this._valueIndex(le,ve);Ce>=0&&ve.splice(Ce,1)},_addTag(ve,le){this._valueIndex(le)<0&&ve.push(le)},_fieldRenderData(){return this._selectedItems.slice()},_completeSelection(ve){this.option("showSelectionControls")||this._setValue(ve)},_setValue(ve){var le;if(null===ve)return;const Ce="useButtons"===this.option("applyValueMode"),ye=this._valueIndex(ve),ge=(Ce?(null===(le=this._list)||void 0===le?void 0:le.option("selectedItemKeys"))||[]:this._getValue()).slice();var fe;ye>=0?ge.splice(ye,1):ge.push(ve),Ce?null===(fe=this._list)||void 0===fe||fe.option("selectedItemKeys",ge):this.option("value",ge)},_isSelectedValue(ve,le){return this._valueIndex(ve,null,le)>-1},_valueIndex(ve,le,Ce){let ye=-1;return Ce&&"object"!=typeof ve&&(Ce.indexByValues||(Ce.indexByValues={},(le=le||this._getValue()).forEach((ge,fe)=>{Ce.indexByValues[ge]=fe})),ve in Ce.indexByValues)?Ce.indexByValues[ve]:(le=le||this._getValue(),(0,u.__)(le,(ge,fe)=>{if(this._isValueEquals(ve,fe))return ye=ge,!1}),ye)},_lastValue(){const ve=this._getValue();return ve[ve.length-1]??null},_shouldRenderSearchEvent(){return this.option("searchEnabled")||this.option("acceptCustomValue")},_searchHandler(ve){this.option("searchEnabled")&&ve&&!this._isTagRemoved&&(this.callBase(arguments),this._setListDataSourceFilter()),this._updateWidgetHeight(),delete this._isTagRemoved},_updateWidgetHeight(){const ve=this.$element(),le=(0,g.Oq)(ve);this._renderInputSize();const Ce=(0,g.Oq)(ve);this._popup&&this.option("opened")&&this._isEditable()&&Ce!==le&&this._popup.repaint()},_refreshSelected(){var ve;null!==(ve=this._list)&&void 0!==ve&&ve.getDataSource()&&this._list.option("selectedItems",this._selectedItems)},_resetListDataSourceFilter(){const ve=this._dataController;delete this._userFilter,ve.filter(null),ve.reload()},_setListDataSourceFilter(){if(!this.option("hideSelectedItems")||!this._list)return;const ve=this._dataController,le=this._valueGetterExpr();if((0,_.Kg)(le)&&"this"!==le){const Ce=this._dataSourceFilterExpr();void 0===this._userFilter&&(this._userFilter=ve.filter()||null),this._userFilter&&Ce.push(this._userFilter),ve.filter(Ce.length?Ce:null)}else ve.filter(this._dataSourceFilterFunction.bind(this));ve.load()},_dataSourceFilterExpr(){const ve=[];return this._getValue().forEach(le=>ve.push(["!",[this._valueGetterExpr(),le]])),ve},_dataSourceFilterFunction(ve){const le=this._valueGetter(ve);let Ce=!0;return(0,u.__)(this._getValue(),(ye,ge)=>{if(this._isValueEquals(ge,le))return Ce=!1,!1}),Ce},_dataSourceChangedHandler(){this._isDataSourceChanged=!0,this.callBase.apply(this,arguments)},_applyButtonHandler(ve){this._saveValueChangeEvent(ve.event),this.option("value",this._getSortedListValues()),this._clearTextValue(),this.callBase(),this._cancelSearchIfNeed()},_getSortedListValues(){const ve=this._getListValues(),le=this.option("value")||[],Ce=ve.length?(0,y._N)(le,ve):[],ye=Ce.length?(0,y.R3)(ve,le):ve;return Ce.concat(ye)},_getListValues(){return this._list?this._getPlainItems(this._list.option("selectedItems")).map(ve=>this._valueGetter(ve)):[]},_setListDataSource(){const ve=this._getValue();this.callBase(),ve!==this.option("value")&&this.option("value",ve),this._refreshSelected()},_renderOpenedState(){this.callBase(),"useButtons"===this.option("applyValueMode")&&!this.option("opened")&&this._refreshSelected()},clear(){this._restoreInputText();const ve=this._getDefaultOptions().value,le=this.option("value");ve&&0===ve.length&&le&&ve.length===le.length||this.callBase()},_clean(){this.callBase(),delete this._defaultTagTemplate,delete this._valuesToUpdate,delete this._tagTemplate},_getSelectedItemsDifference(ve,le){if(!ve.length)return{addedItems:[],removedItems:le.slice()};if(!le.length)return{addedItems:ve.slice(),removedItems:[]};const Ce=le.reduce((ge,fe)=>(ge[this._valueGetter(fe)]=fe,ge),{}),ye=[];return ve.forEach(ge=>{const fe=this._valueGetter(ge);Ce[fe]||ye.push(ge),delete Ce[fe]}),{addedItems:ye,removedItems:Object.values(Ce)}},_optionChanged(ve){const{name:le,value:Ce,previousValue:ye}=ve;switch(le){case"onSelectAllValueChanged":this._initSelectAllValueChangedAction();break;case"onMultiTagPreparing":this._initMultiTagPreparingAction(),this._renderTags();break;case"hideSelectedItems":Ce?this._setListDataSourceFilter():this._resetListDataSourceFilter();break;case"useSubmitBehavior":this._toggleSubmitElement(Ce);break;case"displayExpr":this.callBase(ve),this._initTemplates(),this._invalidate();break;case"tagTemplate":this._initTagTemplate(),this._invalidate();break;case"selectAllText":this._setListOption("selectAllText",this.option("selectAllText"));break;case"readOnly":case"disabled":this.callBase(ve),!Ce&&this._refreshEvents();break;case"value":this._valuesToUpdate=Ce,this.callBase(ve),this._valuesToUpdate=void 0,this._setListDataSourceFilter();break;case"maxDisplayedTags":case"showMultiTagOnly":this._renderTags();break;case"selectAllMode":this._setListOption(le,Ce);break;case"selectedItem":case"maxFilterQueryLength":break;case"selectedItems":this._selectionChangedAction(this._getSelectedItemsDifference(Ce,ye));break;case"multiline":this.$element().toggleClass("dx-tagbox-single-line",!Ce),this._renderSingleLineScroll();break;default:this.callBase(ve)}},_getActualSearchValue(){return this.callBase()||this._searchValue()},_popupHidingHandler(){this.callBase(),this._clearFilter()}});(0,W.A)("dxTagBox",de);const be=de},8910:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>x});var W=M(1973),o=M(5704),P=M(3090),b=M(1363),f=M(6110),S=M(9293),T=M(221);const y=(0,f.zk)(),d=["backspace","tab","enter","pageUp","pageDown","end","home","leftArrow","rightArrow","downArrow","upArrow","del"],h=T.A.inherit({ctor(w,D){D&&(this._showClearButton=D.showClearButton),this.callBase.apply(this,arguments)},_getDefaultOptions(){return(0,P.X)(this.callBase(),{value:"",mode:"text",maxLength:null})},_initMarkup(){this.$element().addClass("dx-textbox"),this.callBase(),this.setAria("role","textbox")},_renderInputType(){this.callBase(),this._renderSearchMode()},_useTemplates:()=>!1,_renderProps(){this.callBase(),this._toggleMaxLengthProp()},_toggleMaxLengthProp(){const w=this._getMaxLength();w&&w>0?this._input().attr("maxLength",w):this._input().removeAttr("maxLength")},_renderSearchMode(){const w=this._$element;"search"===this.option("mode")?(w.addClass("dx-searchbox"),this._renderSearchIcon(),void 0===this._showClearButton&&(this._showClearButton=this.option("showClearButton"),this.option("showClearButton",!0))):(w.removeClass("dx-searchbox"),this._$searchIcon&&this._$searchIcon.remove(),this.option("showClearButton",void 0===this._showClearButton?this.option("showClearButton"):this._showClearButton),delete this._showClearButton)},_renderSearchIcon(){const w=(0,o.A)("<div>").addClass("dx-icon").addClass("dx-icon-search");w.prependTo(this._input().parent()),this._$searchIcon=w},_getLabelContainerWidth(){if(this._$searchIcon){const w=this._input().parent();return(0,b.RG)(w)-this._getLabelBeforeWidth()}return this.callBase()},_getLabelBeforeWidth(){let w=this.callBase();return this._$searchIcon&&(w+=(0,b.Ot)(this._$searchIcon)),w},_optionChanged(w){switch(w.name){case"maxLength":this._toggleMaxLengthProp();break;case"mode":this.callBase(w),this._updateLabelWidth();break;case"mask":this.callBase(w),this._toggleMaxLengthProp();break;default:this.callBase(w)}},_onKeyDownCutOffHandler(w){const D=this._getMaxLength();if(D&&!w.ctrlKey&&!this._hasSelection()){const C=(0,o.A)(w.target),I=(0,S.YD)(w);return this._cutOffExtraChar(C),C.val().length<D||d.includes(I)||""!==y.getSelection().toString()}return!0},_onChangeCutOffHandler(w){const D=(0,o.A)(w.target);this.option("maxLength")&&this._cutOffExtraChar(D)},_cutOffExtraChar(w){const D=this._getMaxLength(),C=w.val();D&&C.length>D&&w.val(C.substr(0,D))},_getMaxLength(){return this.option("mask")?null:this.option("maxLength")}});(0,W.A)("dxTextBox",h);const x=h},9212:(In,Ze,M)=>{"use strict";M.d(Ze,{ss:()=>z,ip:()=>ge,Ft:()=>le,AE:()=>Ce,gx:()=>ve,Nt:()=>be,ro:()=>xe});var W=M(1363),o=M(5973),P=M(6054),b=M(5704),f=M(6021),S=M(4781),T=M(2660),y=M(2720),d=M(4017),c=M(6110);const a=(0,M(8684).A)();var u=M(127);const h=(0,c.zk)(),g=y.A.add,_=d.Uq,x=d.WV;let w=new f.cY;const D="link[rel=dx-theme]",C="data-theme",I="data-active",L="dx-hairlines",N="any";let G,k,U,B,K,J=15e3;const ie="dx.";function re(){if(!(0,c.Vd)())return null;const Be=(0,b.A)("<div>",G).addClass("dx-theme-marker").appendTo(G.documentElement);let Ue;try{return Ue=h.getComputedStyle(Be.get(0)).fontFamily,Ue&&(Ue=Ue.replace(/["']/g,""),Ue.substr(0,ie.length)===ie)?Ue.substr(ie.length):null}finally{Be.remove()}}function q(Be){let Ue,ot,st=!0;function et(){K=null,clearInterval(ot),st=!0,a.fire(),a.empty(),w.resolve()}if(K=Be,Y()||!J)et();else{if(!st)return void(K&&(K=Be));Ue=Date.now(),st=!1,ot=setInterval(function(){const Ke=Y(),Ye=!Ke&&Date.now()-Ue>J;Ye&&u.A.log("W0004",K),(Ke||Ye)&&et()},10)}}function Y(){if(!K)return!0;const Be=K===N;if("resolved"===w.state()&&Be)return!0;const Ue=re();return!(!Ue||!Be)||Ue===K}function pe(Be){(function te(Be){try{Be!==G&&(U=null)}catch{U=null}G=Be})((Be=Be||{}).context||P.A.getDocument()),G&&(function Z(){const Be=(0,b.A)(D,G);Be.length&&(U={},k=(0,b.A)((0,S.B)("<link rel=stylesheet>"),G),Be.each(function(){const Ue=(0,b.A)(this,G),ot=Ue.attr(C),st=Ue.attr("href"),et="true"===Ue.attr(I);U[ot]={url:st,isActive:et}}),Be.last().after(k),Be.remove())}(),B=void 0,z(Be))}function z(Be){if(!arguments.length)return B=B||re(),B;he(_()),"string"==typeof(Be=Be||{})&&(Be={theme:Be});const Ue=Be._autoInit,ot=Be.loadCallback;let st;if(B=function Q(Be){const Ue=Be?Be.split("."):[];let ot=null;if(U){if(Be in U)return Be;(0,T.__)(U,function(st,et){const Ke=st.split(".");if((!Ue[0]||Ke[0]===Ue[0])&&(!Ue[1]||Ue[1]===Ke[1])&&(!Ue[2]||Ue[2]===Ke[2])&&((!ot||et.isActive)&&(ot=st),et.isActive))return!1})}return ot}(Be.theme||B),B&&(st=U[B]),ot&&a.add(ot),st)k.attr("href",U[B].url),(a.has()||"resolved"!==w.state()||Be._forceTimeout)&&q(B);else{if(!Ue)throw u.A.Error("E0021",B);(0,c.Vd)()&&q(N),a.fire(),a.empty()}w.done(()=>ee((0,d.s$)(),B))}let ae;function ee(Be,Ue){ae=function oe(Be){const Ue=[],ot=(Be=Be||z())&&Be.split(".");return ot&&(Ue.push("dx-theme-"+ot[0],"dx-theme-"+ot[0]+"-typography"),ot.length>1&&Ue.push("dx-color-scheme-"+ot[1]+(be(Be)?"-"+ot[2]:""))),Ue}(Ue).join(" "),(0,b.A)(Be).addClass(ae),function(){const ot=(0,c.Vd)()&&h.devicePixelRatio;if(!ot||ot<2)return;const st=(0,b.A)("<div>");st.css("border",".5px solid transparent"),(0,b.A)("body").append(st),1===(0,W.P$)(st)&&((0,b.A)(Be).addClass(L),ae+=" "+L),st.remove()}()}function he(Be){(0,b.A)(Be).removeClass(ae)}function ue(Be,Ue){return Ue||(Ue=B||re()),new RegExp(Be).test(Ue)}function be(Be){return ve(Be)||le(Be)}function ve(Be){return ue("material",Be)}function le(Be){return ue("fluent",Be)}function Ce(Be){return ue("generic",Be)}function ge(Be){return ue("compact",Be)}function xe(Be,Ue){return new Promise(ot=>{const st=()=>{clearInterval(et),clearTimeout(Ke),ot()},et=setInterval(()=>{(function fe(Be,Ue){const ot=P.A.getDocument(),st=ot.createElement("span");st.style.position="absolute",st.style.top="-9999px",st.style.left="-9999px",st.style.visibility="hidden",st.style.fontFamily="Arial",st.style.fontSize="250px",st.style.fontWeight=Ue,st.innerHTML=Be,ot.body.appendChild(st);const et=st.offsetWidth;st.style.fontFamily="Roboto, RobotoFallback, Arial";const Ke=st.offsetWidth;return st.parentNode.removeChild(st),et!==Ke})(Be,Ue)&&st()},15),Ke=setTimeout(st,2e3)})}function Te(){if(pe({_autoInit:!0,_forceTimeout:!0}),(0,b.A)(D,G).length)throw u.A.Error("E0022")}(0,c.Vd)()?Te():g(Te),x.add(function(Be,Ue){w.done(function(){he(Ue),ee(Be)})}),o.A.changed.add(function(){pe({_autoInit:!0})})},1728:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>K});var W=M(5737),o=M(1973),P=M(6054),b=M(5704),f=M(3090),S=M(2720),T=M(1830),y=M(4072),d=M(9209),c=M(3949),s=M(9212);const C=["info","warning","error","success"],I=[],N={top:{my:"top",at:"top",of:null,offset:"0 0"},bottom:{my:"bottom",at:"bottom",of:null,offset:"0 -20"},center:{my:"center",at:"center",of:null,offset:"0 0"},right:{my:"center right",at:"center right",of:null,offset:"0 0"},left:{my:"center left",at:"center left",of:null,offset:"0 0"}},G={h:0,v:0};(0,S.A.add)(()=>{y.A.subscribeGlobal(P.A.getDocument(),d.A.down,J=>{for(let ie=I.length-1;ie>=0;ie--)if(!I[ie]._proxiedDocumentDownHandler(J))return})});const U=c.A.inherit({_getDefaultOptions(){return(0,f.X)(this.callBase(),{message:"",type:"info",displayTime:2e3,position:"bottom center",animation:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},shading:!1,height:"auto",hideTopOverlayHandler:null,preventScrollEvents:!1,closeOnSwipe:!0,closeOnClick:!1})},_defaultOptionsRules(){const J={displayTime:(0,s.Nt)()?4e3:2e3,hideOnOutsideClick:!0,animation:{show:{type:"fade",duration:200,from:0,to:1},hide:{type:"fade",duration:200,from:1,to:0}}};return this.callBase().concat([{device:ie=>"phone"===ie.deviceType,options:(0,W.A)({width:"calc(100vw - 40px)"},J)},{device:ie=>"tablet"===ie.deviceType,options:(0,W.A)({width:"auto",maxWidth:"80vw"},J)},{device:ie=>(0,s.Nt)()&&"desktop"===ie.deviceType,options:{minWidth:344,maxWidth:568,displayTime:4e3}}])},_init(){this.callBase(),this._posStringToObject()},_renderContentImpl(){this._message=(0,b.A)("<div>").addClass("dx-toast-message").text(this.option("message")).appendTo(this.$content()),this.setAria("role","alert",this._message),C.includes(this.option("type").toLowerCase())&&this.$content().prepend((0,b.A)("<div>").addClass("dx-toast-icon")),this.callBase()},_render(){this.callBase(),this.$element().addClass("dx-toast"),this.$wrapper().addClass("dx-toast-wrapper"),this.$content().addClass("dx-toast-"+String(this.option("type")).toLowerCase()),this.$content().addClass("dx-toast-content"),this._toggleCloseEvents("Swipe"),this._toggleCloseEvents("Click")},_toggleCloseEvents(J){const ie=`dx${J.toLowerCase()}`;y.A.off(this.$content(),ie),this.option(`closeOn${J}`)&&y.A.on(this.$content(),ie,this.hide.bind(this))},_posStringToObject(){if(!(0,T.Kg)(this.option("position")))return;const J=this.option("position").split(" ")[0],ie=this.option("position").split(" ")[1];switch(this.option("position",(0,f.X)({boundaryOffset:G},N[J])),ie){case"center":case"left":case"right":this.option("position").at+=` ${ie}`,this.option("position").my+=` ${ie}`}},_show(){return this.callBase.apply(this,arguments).always(()=>{clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(this.hide.bind(this),this.option("displayTime"))})},_overlayStack:()=>I,_zIndexInitValue(){return this.callBase()+8e3},_dispose(){clearTimeout(this._hideTimeout),this.callBase()},_optionChanged(J){switch(J.name){case"type":this.$content().removeClass("dx-toast-"+J.previousValue),this.$content().addClass("dx-toast-"+String(J.value).toLowerCase());break;case"message":this._message&&this._message.text(J.value);break;case"closeOnSwipe":this._toggleCloseEvents("Swipe");break;case"closeOnClick":this._toggleCloseEvents("Click");break;case"displayTime":break;default:this.callBase(J)}}});(0,o.A)("dxToast",U);const K=U},3651:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>fe});var W=M(5737),o=M(1973),P=M(1074),b=M(5704);const S=["dxAutocomplete","dxButton","dxCheckBox","dxDateBox","dxMenu","dxSelectBox","dxTabs","dxTextBox","dxButtonGroup","dxDropDownButton"];function y(xe,Te){var Ee;if(!xe)return;const Oe=xe._findItemElementByItem(Te);if(!Oe.length)return;const ze=xe._getItemData(Oe),$e=!!(null!==(Ee=ze.options)&&void 0!==Ee&&Ee.disabled||ze.disabled||xe.option("disabled")),{widget:Be}=ze;if(Be&&S.includes(Be)){const st=Oe.find(Be.toLowerCase().replace("dx",".dx-"));if(st.length){var Ue,ot;const et=function(xe){const Te=xe.data&&xe.data(),Ee=Te&&Te.dxComponents,Oe=Ee&&Ee[0];return Oe&&Te[Oe]}(st);if(!et)return;let Ke=null===(Ue=et._focusTarget)||void 0===Ue?void 0:Ue.call(et);Ke="dxDropDownButton"===Be?Ke&&Ke.find(".dx-buttongroup"):Ke??(0,b.A)(et.element());const Ye=null===(ot=ze.options)||void 0===ot?void 0:ot.tabIndex;Ke.attr("tabIndex",$e?-1:Ye??0)}}}var d=M(1363);class s{constructor(Te){this._toolbar=Te}_initMarkup(){}_updateMenuVisibility(){}_renderMenuItems(){}_renderItem(){}_getMenuItems(){}_getToolbarItems(){return this._toolbar.option("items")??[]}_getItemsWidth(){return this._toolbar._getSummaryItemsSize("width",this._toolbar._itemElements(),!0)}_arrangeItems(){const Te=this._toolbar._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0);if(!Te.length)return;const Ee=(0,d.RG)(this._toolbar.$element()),Oe=(0,d.Ot)(Te)-(0,d.RG)(Te);Te.css("maxWidth",Ee-Oe)}_hideOverflowItems(){}_dimensionChanged(){}_itemOptionChanged(){}_optionChanged(){}}var a=M(4859),u=M(4270),h=M(3090),g=M(2660),x=(M(8628),M(5973)),w=M(7591),D=M(6110),C=M(9012),I=M(9212),L=M(1609),N=M(8073);class re extends N.i{_init(){super._init(),this._activeStateUnit=".dx-toolbar-menu-action:not(.dx-toolbar-hidden-button-group)"}_initMarkup(){this._renderSections(),super._initMarkup(),this._setMenuRole()}_getSections(){return this._itemContainer().children()}_itemElements(){return this._getSections().children(this._itemSelector())}_renderSections(){const Te=this._itemContainer();(0,g.__)(["before","center","after","menu"],(Ee,Oe)=>{const ze=`_$${Oe}Section`;this[ze]||(this[ze]=(0,b.A)("<div>").addClass("dx-toolbar-menu-section")),this[ze].appendTo(Te)})}_renderItems(){super._renderItems.apply(this,arguments),this._updateSections()}_setMenuRole(){this.$element().find(".dx-scrollview-content").attr("role","menu")}_updateSections(){const Te=this.$element().find(".dx-toolbar-menu-section");Te.removeClass("dx-toolbar-menu-last-section"),Te.not(":empty").eq(-1).addClass("dx-toolbar-menu-last-section")}_renderItem(Te,Ee,Oe,ze){const $e=Ee.location??"menu",Ue=super._renderItem(Te,Ee,this[`_$${$e}Section`],ze);return this._getItemTemplateName({itemData:Ee})&&Ue.addClass("dx-toolbar-menu-custom"),("menu"===$e||"dxButton"===Ee.widget||"dxButtonGroup"===Ee.widget||Ee.isAction)&&Ue.addClass("dx-toolbar-menu-action"),"dxButton"===Ee.widget&&Ue.addClass("dx-toolbar-hidden-button"),"dxButtonGroup"===Ee.widget&&Ue.addClass("dx-toolbar-hidden-button-group"),Ue.addClass(Ee.cssClass),Ue}_getItemTemplateName(Te){const Ee=super._getItemTemplateName(Te),Oe=Te.itemData;return Oe&&Oe.menuItemTemplate||Ee}_dataSourceOptions(){return{paginate:!1}}_itemClickHandler(Te,Ee,Oe){(0,b.A)(Te.target).closest(".dx-toolbar-menu-action").length&&super._itemClickHandler(Te,Ee,Oe)}_clean(){this._getSections().empty(),super._clean()}}class oe extends L.A{_supportedKeys(){var Te;let Ee={};return(!this.option("opened")||!(null!==(Te=this._list)&&void 0!==Te&&Te.option("focusedElement")))&&(Ee=this._button._supportedKeys()),(0,h.X)(super._supportedKeys(),Ee,{tab(){this._popup&&this._popup.hide()}})}_getDefaultOptions(){return(0,W.A)({},super._getDefaultOptions(),{items:[],onItemClick:null,dataSource:null,itemTemplate:"item",onButtonClick:null,activeStateEnabled:!0,hoverStateEnabled:!0,opened:!1,onItemRendered:null,closeOnClick:!0,useInkRipple:!1,container:void 0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",to:0}}})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>"desktop"===x.A.real().deviceType&&!x.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,I.Nt)(),options:{useInkRipple:!0,animation:{show:{type:"pop",duration:200,from:{scale:0},to:{scale:1}},hide:{type:"pop",duration:200,from:{scale:1},to:{scale:0}}}}}])}_init(){super._init(),this.$element().addClass("dx-dropdownmenu"),this._initItemClickAction(),this._initButtonClickAction()}_initItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")}_initButtonClickAction(){this._buttonClickAction=this._createActionByOption("onButtonClick")}_initTemplates(){this._templateManager.addDefaultTemplates({content:new w.M("content")}),super._initTemplates()}_initMarkup(){this._renderButton(),super._initMarkup()}_render(){super._render(),this.setAria({haspopup:!0,expanded:this.option("opened")})}_renderContentImpl(){this.option("opened")&&this._renderPopup()}_clean(){this._cleanFocusState(),this._list&&this._list.$element().remove(),this._popup&&this._popup.$element().remove(),delete this._list,delete this._popup}_renderButton(){const Te=this.$element().addClass("dx-dropdownmenu-button");this._button=this._createComponent(Te,C.A,{icon:"overflow",template:"content",stylingMode:(0,I.Ft)()?"text":"contained",useInkRipple:this.option("useInkRipple"),hoverStateEnabled:!1,focusStateEnabled:!1,onClick:Ee=>{this.option("opened",!this.option("opened")),this._buttonClickAction(Ee)}})}_toggleActiveState(Te,Ee,Oe){this._button._toggleActiveState(Te,Ee,Oe)}_toggleMenuVisibility(Te){var Ee,Oe;const ze=Te??!(null!==(Ee=this._popup)&&void 0!==Ee&&Ee.option("visible"));Te&&this._renderPopup(),null===(Oe=this._popup)||void 0===Oe||Oe.toggle(ze),this.setAria("expanded",ze)}_renderPopup(){if(this._$popup)return;this._$popup=(0,b.A)("<div>").appendTo(this.$element());const{rtlEnabled:Te,container:Ee,animation:Oe}=this.option();this._popup=this._createComponent(this._$popup,"dxPopup",{onInitialized(ze){let{component:$e}=ze;$e.$wrapper().addClass("dx-dropdownmenu-popup-wrapper").addClass("dx-dropdownmenu-popup")},deferRendering:!1,preventScrollEvents:!1,contentTemplate:ze=>this._renderList(ze),_ignoreFunctionValueDeprecation:!0,maxHeight:()=>this._getMaxHeight(),position:{my:"top "+(Te?"left":"right"),at:"bottom "+(Te?"left":"right"),collision:"fit flip",offset:{v:3},of:this.$element()},animation:Oe,onOptionChanged:ze=>{let{name:$e,value:Be}=ze;"visible"===$e&&this.option("opened",Be)},container:Ee,autoResizeEnabled:!1,height:"auto",width:"auto",hideOnOutsideClick:ze=>this._closeOutsideDropDownHandler(ze),hideOnParentScroll:!0,shading:!1,dragEnabled:!1,showTitle:!1,fullScreen:!1,_fixWrapperPosition:!0})}_getMaxHeight(){const Te=this.$element(),Ee=Te.offset().top,Oe=(0,d.P$)((0,D.zk)()),ze=Math.max(Ee,Oe-Ee-(0,d.P$)(Te));return Math.min(Oe,ze-3-10)}_closeOutsideDropDownHandler(Te){return!(0,b.A)(Te.target).closest(this.$element()).length}_renderList(Te){const Ee=(0,b.A)(Te);Ee.addClass("dx-dropdownmenu-list"),this._list=this._createComponent(Ee,re,{dataSource:this._getListDataSource(),pageLoadMode:"scrollBottom",indicateLoading:!1,noDataText:"",itemTemplate:this.option("itemTemplate"),onItemClick:Oe=>{this.option("closeOnClick")&&this.option("opened",!1),this._itemClickAction(Oe)},tabIndex:-1,focusStateEnabled:!1,activeStateEnabled:!0,onItemRendered:this.option("onItemRendered"),_itemAttributes:{role:"menuitem"}})}_itemOptionChanged(Te,Ee,Oe){var ze;null===(ze=this._list)||void 0===ze||ze._itemOptionChanged(Te,Ee,Oe),y(this._list,Te)}_getListDataSource(){return this.option("dataSource")??this.option("items")}_setListDataSource(){var Te;null===(Te=this._list)||void 0===Te||Te.option("dataSource",this._getListDataSource()),delete this._deferRendering}_getKeyboardListeners(){return super._getKeyboardListeners().concat([this._list])}_toggleVisibility(Te){var Ee;super._toggleVisibility(Te),null===(Ee=this._button)||void 0===Ee||Ee.option("visible",Te)}_optionChanged(Te){var Ee,Oe,ze;const{name:$e,value:Be}=Te;switch($e){case"items":case"dataSource":this.option("opened")?this._setListDataSource():this._deferRendering=!0;break;case"itemTemplate":null===(Ee=this._list)||void 0===Ee||Ee.option($e,this._getTemplate(Be));break;case"onItemClick":this._initItemClickAction();break;case"onButtonClick":this._buttonClickAction();break;case"useInkRipple":this._invalidate();break;case"focusStateEnabled":null===(Oe=this._list)||void 0===Oe||Oe.option($e,Be),super._optionChanged(Te);break;case"onItemRendered":null===(ze=this._list)||void 0===ze||ze.option($e,Be);break;case"opened":this._deferRendering&&this._setListDataSource(),this._toggleMenuVisibility(Be),this._updateFocusableItemsTabIndex();break;case"closeOnClick":break;case"container":this._popup&&this._popup.option($e,Be);break;case"disabled":this._list&&this._updateFocusableItemsTabIndex();break;default:super._optionChanged(Te)}}_updateFocusableItemsTabIndex(){this.option("items").forEach(Te=>y(this._list,Te))}}const ue="dx-toolbar-item-invisible";class be{constructor(Te){this._toolbar=Te}_initMarkup(){(0,a.zE)(()=>{this._renderOverflowMenu(),this._renderMenuItems()})}_renderOverflowMenu(){if(!this._hasVisibleMenuItems())return;this._renderMenuButtonContainer();const Te=(0,b.A)("<div>").appendTo(this._overflowMenuContainer()),Ee=this._toolbar._createActionByOption("onItemClick"),Oe=this._toolbar._getTemplateByOption("menuItemTemplate");this._menu=this._toolbar._createComponent(Te,oe,{disabled:this._toolbar.option("disabled"),itemTemplate:()=>Oe,onItemClick:ze=>{Ee(ze)},container:this._toolbar.option("menuContainer"),onOptionChanged:ze=>{let{name:$e,value:Be}=ze;"opened"===$e&&this._toolbar.option("overflowMenuVisible",Be),"items"===$e&&this._updateMenuVisibility(Be)}})}renderMenuItems(){this._menu||this._renderOverflowMenu(),this._menu&&this._menu.option("items",this._getMenuItems()),this._menu&&!this._menu.option("items").length&&this._menu.option("opened",!1)}_renderMenuButtonContainer(){this._$overflowMenuContainer=(0,b.A)("<div>").appendTo(this._toolbar._$afterSection).addClass("dx-toolbar-button").addClass("dx-toolbar-menu-container")}_overflowMenuContainer(){return this._$overflowMenuContainer}_updateMenuVisibility(Te){const Ee=Te??this._getMenuItems(),Oe=Ee.length&&this._hasVisibleMenuItems(Ee);this._toggleMenuVisibility(Oe)}_toggleMenuVisibility(Te){this._overflowMenuContainer()&&this._overflowMenuContainer().toggleClass("dx-state-invisible",!Te)}_renderMenuItems(){(0,a.zE)(()=>{this.renderMenuItems()})}_dimensionChanged(){this.renderMenuItems()}_getToolbarItems(){return(0,a.VM)(this._toolbar.option("items")??[],Te=>!this._toolbar._isMenuItem(Te))}_getHiddenItems(){return this._toolbar._itemContainer().children(`.dx-toolbar-item-auto-hide.${ue}`).not(".dx-state-invisible")}_getMenuItems(){const Te=(0,a.VM)(this._toolbar.option("items")??[],ze=>this._toolbar._isMenuItem(ze)),Ee=this._getHiddenItems();return this._restoreItems=this._restoreItems??[],[...[].slice.call(Ee).map(ze=>{const $e=this._toolbar._getItemData(ze),Be=(0,b.A)(ze),Ue=Be.children();return(0,h.X)({menuItemTemplate:()=>(this._restoreItems.push({container:Be,item:Ue}),(0,b.A)("<div>").addClass("dx-toolbar-item-auto-hide").append(Ue))},$e)}),...Te]}_hasVisibleMenuItems(Te){const Ee=Te??this._toolbar.option("items");let Oe=!1;const ze=(0,u.Hz)("visible"),$e=(0,u.Hz)("locateInMenu");return(0,g.__)(Ee,(Be,Ue)=>{const ot=ze(Ue,{functionsAsIs:!0}),st=$e(Ue,{functionsAsIs:!0});(!1!==ot&&("auto"===st||"always"===st)||"menu"===Ue.location)&&(Oe=!0)}),Oe}_arrangeItems(){this._toolbar._$centerSection.css({margin:"0 auto",float:"none"}),(0,g.__)(this._restoreItems??[],(Ee,Oe)=>{(0,b.A)(Oe.container).append(Oe.item)}),this._restoreItems=[];const Te=(0,d.RG)(this._toolbar.$element());return this._hideOverflowItems(Te),Te}_hideOverflowItems(Te){const Ee=this._toolbar.$element().find(".dx-toolbar-item-auto-hide");if(!Ee.length)return;const Oe=Te??(0,d.RG)(this._toolbar.$element());(0,b.A)(Ee).removeClass(ue);let ze=this._getItemsWidth();for(;Ee.length&&Oe<ze;)Ee.eq(-1).addClass(ue),ze=this._getItemsWidth(),Ee.splice(-1,1)}_getItemsWidth(){return this._toolbar._getSummaryItemsSize("width",[this._toolbar._$beforeSection,this._toolbar._$centerSection,this._toolbar._$afterSection])}_itemOptionChanged(Te,Ee,Oe){var ze;"disabled"!==Ee&&"options.disabled"!==Ee||!this._toolbar._isMenuItem(Te)?this.renderMenuItems():null===(ze=this._menu)||void 0===ze||ze._itemOptionChanged(Te,Ee,Oe)}_renderItem(Te,Ee){"auto"===Te.locateInMenu&&Ee.addClass("dx-toolbar-item-auto-hide")}_optionChanged(Te,Ee){var Oe,ze,$e,Be,Ue;switch(Te){case"disabled":null===(Oe=this._menu)||void 0===Oe||Oe.option(Te,Ee);break;case"overflowMenuVisible":null===(ze=this._menu)||void 0===ze||ze.option("opened",Ee);break;case"onItemClick":null===($e=this._menu)||void 0===$e||$e.option(Te,Ee);break;case"menuContainer":null===(Be=this._menu)||void 0===Be||Be.option("container",Ee);break;case"menuItemTemplate":null===(Ue=this._menu)||void 0===Ue||Ue.option("itemTemplate",Ee)}}}class Ce extends P.A{_getDefaultOptions(){return(0,W.A)({},super._getDefaultOptions(),{menuItemTemplate:"menuItem",menuContainer:void 0,overflowMenuVisible:!1,multiline:!1})}_isMultiline(){return this.option("multiline")}_dimensionChanged(Te){"height"!==Te&&(super._dimensionChanged(),this._layoutStrategy._dimensionChanged())}_initMarkup(){super._initMarkup(),this._updateFocusableItemsTabIndex(),this._layoutStrategy._initMarkup()}_renderToolbar(){super._renderToolbar(),this._renderLayoutStrategy()}_itemContainer(){return this._isMultiline()?this._$toolbarItemsContainer:super._itemContainer()}_renderLayoutStrategy(){this.$element().toggleClass("dx-toolbar-multiline",this._isMultiline()),this._layoutStrategy=this._isMultiline()?new s(this):new be(this)}_renderSections(){if(!this._isMultiline())return super._renderSections()}_postProcessRenderItems(){this._layoutStrategy._hideOverflowItems(),this._layoutStrategy._updateMenuVisibility(),super._postProcessRenderItems(),this._layoutStrategy._renderMenuItems()}_renderItem(Te,Ee,Oe,ze){const $e=super._renderItem(Te,Ee,Oe,ze);this._layoutStrategy._renderItem(Ee,$e);const{widget:Be,showText:Ue}=Ee;return"dxButton"===Be&&"inMenu"===Ue&&$e.toggleClass("dx-toolbar-text-auto-hide"),$e}_getItemsWidth(){return this._layoutStrategy._getItemsWidth()}_getMenuItems(){return this._layoutStrategy._getMenuItems()}_getToolbarItems(){return this._layoutStrategy._getToolbarItems()}_arrangeItems(){if(this.$element().is(":hidden"))return;const Te=this._layoutStrategy._arrangeItems();this._isMultiline()||super._arrangeItems(Te)}_itemOptionChanged(Te,Ee,Oe,ze){this._isMenuItem(Te)||super._itemOptionChanged(Te,Ee,Oe,ze),this._layoutStrategy._itemOptionChanged(Te,Ee,Oe),("disabled"===Ee||"options.disabled"===Ee)&&y(this,Te),"location"===Ee&&this.repaint()}_updateFocusableItemsTabIndex(){this._getToolbarItems().forEach(Te=>y(this,Te))}_isMenuItem(Te){return"menu"===Te.location||"always"===Te.locateInMenu}_isToolbarItem(Te){return void 0===Te.location||"never"===Te.locateInMenu}_optionChanged(Te){const{name:Ee,value:Oe}=Te;switch(this._layoutStrategy._optionChanged(Ee,Oe),Ee){case"menuContainer":case"menuItemTemplate":case"overflowMenuVisible":break;case"multiline":this._invalidate();break;case"disabled":super._optionChanged(Te),this._updateFocusableItemsTabIndex();break;default:super._optionChanged(Te)}}updateDimensions(){this._dimensionChanged()}}(0,o.A)("dxToolbar",Ce);const fe=Ce},8787:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(2806).A},1757:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>Ye});var W=M(1973),o=M(5704),P=M(3090),b=M(8910),f=M(6853),S=M(2583),T=M(6054),y=M(9522),d=M(4859),c=M(6021),s=M(8535),a=M(2660),u=M(1363),h=M(7007),g=M(1830),_=M(6110),x=M(778),w=M(4072),D=M(1395),C=M(9209),I=M(9293),L=M(8360),N=M(8813),G=M(7508),k=M(3480),U=M(7794),B=M(2359),K=M(4602);const J="dx-treeview",ie=`${J}-node`,re=`${ie}-container`,q=`${ie}-loadindicator`,Y=`${ie}-container-opened`,Z=`${ie}-is-leaf`,Q=`${J}-item`,te=`${Q}-with-checkbox`,pe=`${Q}-with-custom-expander-icon`,z=`${J}-custom-expander-icon-item-container`,oe=`${Q}-without-checkbox`,ae=`${Q}-data`,ee=`${J}-toggle-item-visibility`,he=`${J}-custom-collapse-icon`,de=`${J}-custom-expand-icon`,ue=`${J}-loadindicator`,be=`${J}-loadindicator-wrapper`,ve=`${J}-toggle-item-visibility-opened`,le=`${J}-select-all-item`,xe="data-item-id",ze=`${J}-root-node`,$e=`${J}-expander-icon-stub`,Ue=U.A.inherit({_supportedKeys(Pe){const Se=Xe=>{const tt=(0,o.A)(this.option("focusedElement"));tt.length&&(Xe.target=tt,Xe.currentTarget=tt,this._itemClickHandler(Xe,tt.children(`.${Q}`)),this._getEventNameByOption(this.option("expandEvent"))===(0,I.b4)(x.U,"dxTreeView_expand")&&this._expandEventHandler(Xe))},Re=Xe=>{Xe.preventDefault();const tt=(0,o.A)(this.option("focusedElement")),vt=this._getCheckBoxInstance(tt);if(!vt.option("disabled")){const qe=vt.option("value");this._updateItemSelection(!qe,tt.find(`.${Q}`).get(0),!0)}},Fe=function(Xe,tt){if(!this.option("expandAllEnabled"))return;tt.preventDefault();const vt=(0,o.A)(this.option("focusedElement"));if(!vt.length)return;const qe=this._getItemData(vt.find(`.${Q}`));this._toggleExpandedNestedItems([qe],Xe)};return(0,P.X)(this.callBase(),{enter:this._showCheckboxes()?Re:Se,space:this._showCheckboxes()?Re:Se,asterisk:Fe.bind(this,!0),minus:Fe.bind(this,!1)})},_toggleExpandedNestedItems(Pe,Se){if(Pe)for(let Re=0,Fe=Pe.length;Re<Fe;Re++){const Xe=Pe[Re],tt=this._dataAdapter.getNodeByItem(Xe);this._toggleExpandedState(tt,Se),this._toggleExpandedNestedItems(Xe.items,Se)}},_getNodeElement(Pe,Se){const Re=this._encodeString(Pe.internalFields.key);if(Se)return Se.$nodeByKey||(Se.$nodeByKey={},this.$element().find(`.${ie}`).each(function(){const Xe=(0,o.A)(this),tt=Xe.attr(xe);Se.$nodeByKey[tt]=Xe})),Se.$nodeByKey[Re]||(0,o.A)();const Fe=this.$element().get(0).querySelector(`[${xe}="${Re}"]`);return(0,o.A)(Fe)},_activeStateUnit:`.${Q}`,_widgetClass:()=>J,_getDefaultOptions(){const Pe=(0,P.X)(this.callBase(),{animationEnabled:!0,dataStructure:"tree",deferRendering:!0,expandAllEnabled:!1,hasItemsExpr:"hasItems",selectNodesRecursive:!0,expandNodesRecursive:!0,showCheckBoxesMode:"none",expandIcon:null,collapseIcon:null,selectAllText:L.A.format("dxList-selectAll"),onItemSelectionChanged:null,onItemExpanded:null,onItemCollapsed:null,scrollDirection:"vertical",useNativeScrolling:!0,virtualModeEnabled:!1,rootValue:0,focusStateEnabled:!1,selectionMode:"multiple",expandEvent:"dblclick",selectByClick:!1,createChildren:null,onSelectAllValueChanged:null,_supportItemUrl:!1});return(0,P.X)(!0,Pe,{integrationOptions:{useDeferUpdateForTemplates:!1}})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>!h.nativeScrolling,options:{useNativeScrolling:!1}}])},_initSelectedItems:d.lQ,_syncSelectionOptions:d.TA,_fireSelectionChanged(){(0,c.z7)(this._selectionChangePromise).done(()=>{this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})()})},_createSelectAllValueChangedAction(){this._selectAllValueChangedAction=this._createActionByOption("onSelectAllValueChanged",{excludeValidators:["disabled","readOnly"]})},_fireSelectAllValueChanged(Pe){this._selectAllValueChangedAction({value:Pe})},_checkBoxModeChange(Pe,Se){const Re=this.option("searchEnabled"),Fe=this._selectAllEnabled(Se),Xe=this._itemContainer(Re,Fe);if(this._detachClickEvent(Xe),this._detachExpandEvent(Xe),"none"===Se||"none"===Pe)return;const tt=this._$selectAllItem&&this._$selectAllItem.length;switch(Pe){case"selectAll":tt||(this._createSelectAllValueChangedAction(),this._renderSelectAllItem());break;case"normal":tt&&(this._$selectAllItem.remove(),delete this._$selectAllItem)}},_removeSelection(){const Pe=this;(0,a.__)(this._dataAdapter.getFullData(),(Se,Re)=>{Pe._hasChildren(Re)&&Pe._dataAdapter.toggleSelection(Re.internalFields.key,!1,!0)})},_optionChanged(Pe){const{name:Se,value:Re,previousValue:Fe}=Pe;switch(Se){case"selectAllText":this._$selectAllItem&&this._$selectAllItem.dxCheckBox("instance").option("text",Re);break;case"showCheckBoxesMode":this._checkBoxModeChange(Re,Fe),this._invalidate();break;case"scrollDirection":this.getScrollable().option("direction",Re);break;case"useNativeScrolling":this.getScrollable().option("useNative",Re);break;case"items":delete this._$selectAllItem,this.callBase(Pe);break;case"dataSource":this.callBase(Pe),this._initDataAdapter(),this._filter={};break;case"hasItemsExpr":this._initAccessors(),this.repaint();break;case"expandEvent":this._attachExpandEvent();break;case"deferRendering":case"dataStructure":case"rootValue":case"createChildren":case"expandNodesRecursive":case"onItemSelectionChanged":case"onItemExpanded":case"onItemCollapsed":case"expandAllEnabled":case"animationEnabled":case"virtualModeEnabled":case"selectByClick":case"_supportItemUrl":break;case"selectionMode":this._initDataAdapter(),this.callBase(Pe);break;case"onSelectAllValueChanged":this._createSelectAllValueChangedAction();break;case"selectNodesRecursive":this._dataAdapter.setOption("recursiveSelection",Pe.value),this.repaint();break;case"expandIcon":case"collapseIcon":this.repaint();break;default:this.callBase(Pe)}},_initDataSource(){this._useCustomChildrenLoader()?this._loadChildrenByCustomLoader(null).done(Pe=>{Pe&&Pe.length&&this.option("items",Pe)}):(this.callBase(),this._isVirtualMode()&&this._initVirtualMode())},_initVirtualMode(){const Pe=this._filter;Pe.custom||(Pe.custom=this._dataSource.filter()),Pe.internal||(Pe.internal=[this.option("parentIdExpr"),this.option("rootValue")])},_useCustomChildrenLoader(){return(0,g.Tn)(this.option("createChildren"))&&this._isDataStructurePlain()},_loadChildrenByCustomLoader(Pe){const Se=this.option("createChildren").call(this,Pe);return Array.isArray(Se)?(0,c.cY)().resolve(Se).promise():Se&&(0,g.Tn)(Se.then)?(0,c.Sx)(Se):(0,c.cY)().resolve([]).promise()},_combineFilter(){return this._filter.custom&&this._filter.custom.length?[this._filter.custom,this._filter.internal]:this._filter.internal},_dataSourceLoadErrorHandler(){this._renderEmptyMessage()},_init(){this._filter={},this.callBase(),this._initStoreChangeHandlers()},_dataSourceChangedHandler(Pe){const Se=this.option("items");this._initialized&&this._isVirtualMode()&&Se.length||this.option("items",Pe)},_removeTreeViewLoadIndicator(){this._treeViewLoadIndicator&&(this._treeViewLoadIndicator.remove(),this._treeViewLoadIndicator=null)},_createTreeViewLoadIndicator(){return this._treeViewLoadIndicator=(0,o.A)("<div>").addClass(ue),this._createComponent(this._treeViewLoadIndicator,B.A,{}),this._treeViewLoadIndicator},_dataSourceLoadingChangedHandler(Pe){let Se;if(this._isVirtualMode()&&(Se=this._combineFilter(),this._dataSource.filter(Se)),Pe&&!this._dataSource.isLoaded()){this.option("items",[]);const Re=(0,o.A)("<div>").addClass(be);this._createTreeViewLoadIndicator().appendTo(Re),this.itemsContainer().append(Re),this._isVirtualMode()&&this._dataSource.filter()!==Se&&this._dataSource.filter([])}else this._removeTreeViewLoadIndicator()},_initStoreChangeHandlers(){"plain"===this.option("dataStructure")&&this._dataSource&&this._dataSource.store().on("inserted",Pe=>{this.option().items=this.option("items").concat(Pe),this._dataAdapter.addItem(Pe),this._dataAdapter.isFiltered(Pe)&&this._updateLevel(this._parentIdGetter(Pe))}).on("removed",Pe=>{const Se=this._dataAdapter.getNodeByKey(Pe);(0,g.O9)(Se)&&(this.option("items")[this._dataAdapter.getIndexByKey(Se.internalFields.key)]=0,this._markChildrenItemsToRemove(Se),this._removeItems(),this._dataAdapter.removeItem(Pe),this._updateLevel(this._parentIdGetter(Se)))})},_markChildrenItemsToRemove(Pe){(0,a.__)(Pe.internalFields.childrenKeys,(Re,Fe)=>{this.option("items")[this._dataAdapter.getIndexByKey(Fe)]=0,this._markChildrenItemsToRemove(this._dataAdapter.getNodeByKey(Fe))})},_removeItems(){const Pe=(0,P.X)(!0,[],this.option("items"));let Se=0;(0,a.__)(Pe,(Re,Fe)=>{Fe||(this.option("items").splice(Re-Se,1),Se++)})},_updateLevel(Pe){const Se=this._getContainerByParentKey(Pe);this._renderItems(Se,this._dataAdapter.getChildrenNodes(Pe))},_getOldContainer(Pe){if(Pe.length)return Pe.children(`.${re}`);const Se=this.getScrollable();return Se?(0,o.A)(Se.content()).children():(0,o.A)()},_getContainerByParentKey(Pe){const Se=this._dataAdapter.getNodeByKey(Pe),Re=Se?this._getNodeElement(Se):[];this._getOldContainer(Re).remove();const Fe=this._renderNodeContainer(Re);if(this._isRootLevel(Pe)){const Xe=this.getScrollable();Xe||this._renderScrollableContainer(),(0,o.A)(Xe.content()).append(Fe)}return Fe},_isRootLevel(Pe){return Pe===this.option("rootValue")},_getAccessors(){const Pe=this.callBase();return Pe.push("hasItems"),Pe},_getDataAdapterOptions(){var Pe,Se;return{rootValue:this.option("rootValue"),multipleSelection:!this._isSingleSelection(),recursiveSelection:this._isRecursiveSelection(),recursiveExpansion:this.option("expandNodesRecursive"),selectionRequired:this.option("selectionRequired"),dataType:this.option("dataStructure"),sort:this._dataSource&&this._dataSource.sort(),langParams:null===(Pe=this._dataSource)||void 0===Pe||null===(Se=Pe.loadOptions)||void 0===Se||null===(Se=Se.call(Pe))||void 0===Se?void 0:Se.langParams}},_initMarkup(){this._renderScrollableContainer(),this._renderEmptyMessage(this._dataAdapter.getRootNodes()),this.callBase(),this._setAriaRole()},_setAriaRole(){const{items:Pe}=this.option();null!=Pe&&Pe.length&&this.setAria({role:"tree"})},_renderContentImpl(){const Pe=this._renderNodeContainer();(0,o.A)(this.getScrollable().content()).append(Pe),this.option("items")&&this.option("items").length&&(this._renderItems(Pe,this._dataAdapter.getRootNodes()),this._attachExpandEvent(),this._selectAllEnabled()&&(this._createSelectAllValueChangedAction(),this._renderSelectAllItem(Pe)))},_isVirtualMode(){return this.option("virtualModeEnabled")&&this._isDataStructurePlain()&&!!this.option("dataSource")},_isDataStructurePlain(){return"plain"===this.option("dataStructure")},_fireContentReadyAction(){const Pe=this.getDataSource(),Se=Pe&&!Pe.isLoaded()||this._skipContentReadyAndItemExpanded,Re=this.getScrollable();Re&&(0,_.Vd)()&&Re.update(),Se||this.callBase(),Re&&(0,_.Vd)()&&Re.update()},_renderScrollableContainer(){this._scrollable=this._createComponent((0,o.A)("<div>").appendTo(this.$element()),K.A,{useNative:this.option("useNativeScrolling"),direction:this.option("scrollDirection"),useKeyboard:!1})},_renderNodeContainer(Pe){const Se=(0,o.A)("<ul>").addClass(re);if(this.setAria("role","group",Se),Pe&&Pe.length){const Re=this._getItemData(Pe.children(`.${Q}`));this._expandedGetter(Re)&&Se.addClass(Y),Se.appendTo(Pe)}return Se},_createDOMElement(Pe,Se){var Re;const Fe=(0,o.A)("<li>").addClass(ie).attr(xe,this._encodeString(Se.internalFields.key)).prependTo(Pe),Xe={role:"treeitem",label:this._displayGetter(Se.internalFields.item)||"",level:this._getLevel(Pe)};return!(null==Se||null===(Re=Se.internalFields)||void 0===Re||null===(Re=Re.childrenKeys)||void 0===Re||!Re.length)&&(Xe.expanded=Se.internalFields.expanded||!1),this.setAria(Xe,Fe),Fe},_getLevel(Pe){const Se=Pe.parent();return Se.hasClass("dx-scrollable-content")?1:parseInt(Se.attr("aria-level"))+1},_showCheckboxes(){return"none"!==this.option("showCheckBoxesMode")},_hasCustomExpanderIcons(){return this.option("expandIcon")||this.option("collapseIcon")},_selectAllEnabled(Pe){return"selectAll"===(Pe??this.option("showCheckBoxesMode"))&&!this._isSingleSelection()},_renderItems(Pe,Se){for(let Fe=Se.length-1;Fe>=0;Fe--)this._renderItem(Fe,Se[Fe],Pe);this._renderedItemsCount+=Se.length},_renderItem(Pe,Se,Re){const Fe=this._createDOMElement(Re,Se),Xe=Se.internalFields,tt=this._showCheckboxes();Fe.addClass(tt?te:oe),Fe.toggleClass("dx-state-invisible",!1===Xe.item.visible),this._hasCustomExpanderIcons()&&(Fe.addClass(pe),Re.addClass(z)),this.setAria("selected",Xe.selected,Fe),this._toggleSelectedClass(Fe,Xe.selected),Xe.disabled&&this.setAria("disabled",Xe.disabled,Fe),this.callBase(this._renderedItemsCount+Pe,Xe.item,Fe),this._getNode(Se.internalFields.parentKey)||Fe.addClass(ze),!1!==Xe.item.visible&&this._renderChildren(Fe,Se)},_setAriaSelectionAttribute:d.lQ,_renderChildren(Pe,Se){if(!this._hasChildren(Se))return this._addLeafClass(Pe),void(0,o.A)("<div>").addClass($e).appendTo(this._getItem(Pe));this._hasCustomExpanderIcons()?this._renderCustomExpanderIcons(Pe,Se):this._renderDefaultExpanderIcons(Pe,Se),this._shouldRenderSublevel(Se.internalFields.expanded)&&this._loadSublevel(Se).done(Re=>{this._renderSublevel(Pe,this._getActualNode(Se),Re)})},_shouldRenderSublevel(Pe){return Pe||!this.option("deferRendering")},_getActualNode(Pe){return this._dataAdapter.getNodeByKey(Pe.internalFields.key)},_hasChildren(Pe){return this._isVirtualMode()||this._useCustomChildrenLoader()?!1!==this._hasItemsGetter(Pe.internalFields.item):this.callBase(Pe)},_loadSublevel(Pe){const Se=(0,c.cY)(),Re=this._getChildNodes(Pe);return Re.length?Se.resolve(Re):this._loadNestedItems(Pe).done(Fe=>{Se.resolve(this._dataAdapter.getNodesByItems(Fe))}),Se.promise()},_getItemExtraPropNames:()=>["url","linkAttr"],_addContent(Pe,Se){const{html:Re,url:Fe}=Se;if(this.option("_supportItemUrl")&&Fe){Pe.html(Re);const Xe=this._getLinkContainer(this._getIconContainer(Se),this._getTextContainer(Se),Se);Pe.append(Xe)}else this.callBase(Pe,Se)},_postprocessRenderItem(Pe){const{itemData:Se,itemElement:Re}=Pe;this._showCheckboxes()&&this._renderCheckBox(Re,this._getNode(Se)),this.callBase(Pe)},_renderSublevel(Pe,Se,Re){const Fe=this._renderNodeContainer(Pe,Se),Xe=Re.filter(tt=>-1!==Se.internalFields.childrenKeys.indexOf(tt.internalFields.key));if(this._renderItems(Fe,Xe),Xe.length&&!Se.internalFields.selected){const tt=Xe[0];this._updateParentsState(tt,this._getNodeElement(tt))}this._normalizeIconState(Pe,Xe.length),Se.internalFields.expanded&&Fe.addClass(Y)},_executeItemRenderAction(Pe,Se,Re){const Fe=this._getNode(Re);this._getItemRenderAction()({itemElement:Re,itemIndex:Pe,itemData:Se,node:this._dataAdapter.getPublicNode(Fe)})},_addLeafClass(Pe){Pe.addClass(Z)},_expandEventHandler(Pe){(0,o.A)(Pe.currentTarget.parentNode).hasClass(Z)||this._toggleExpandedState(Pe.currentTarget,void 0,Pe)},_attachExpandEvent(){const Pe=this._getEventNameByOption(this.option("expandEvent")),Se=this._itemContainer();this._detachExpandEvent(Se),w.A.on(Se,Pe,this._itemSelector(),this._expandEventHandler.bind(this))},_detachExpandEvent(Pe){w.A.off(Pe,".dxTreeView_expand",this._itemSelector())},_getEventNameByOption:Pe=>(0,I.b4)("click"===Pe?x.U:D.U,"dxTreeView_expand"),_getNode(Pe){if(!(0,g.O9)(Pe))return null;if(Pe.internalFields)return Pe;if((0,g.sO)(Pe))return this._dataAdapter.getNodeByKey(Pe);const Se=(0,o.A)(Pe).get(0);return Se?T.A.isElementNode(Se)?this._getNodeByElement(Se):this._dataAdapter.getNodeByItem(Se):null},_getNodeByElement(Pe){const Se=(0,o.A)(Pe).closest(`.${ie}`),Re=this._decodeString(Se.attr(xe));return this._dataAdapter.getNodeByKey(Re)},_toggleExpandedState(Pe,Se,Re){const Fe=this._getNode(Pe);if(!Fe||Fe.internalFields.disabled)return(0,c.cY)().reject().promise();const Xe=Fe.internalFields.expanded;if(Xe===Se)return(0,c.cY)().resolve().promise();if(this._hasChildren(Fe)){const tt=this._getNodeElement(Fe);if(tt.find(`.${q}:not(.dx-state-invisible)`).length)return(0,c.cY)().reject().promise();!Xe&&!this._nodeHasRenderedChildren(tt)&&this._createLoadIndicator(tt)}return(0,g.O9)(Se)||(Se=!Xe),this._dataAdapter.toggleExpansion(Fe.internalFields.key,Se),this._updateExpandedItemsUI(Fe,Se,Re)},_nodeHasRenderedChildren:Pe=>Pe.children(`.${re}`).not(":empty").length,_getItem:Pe=>Pe.children(`.${Q}`).eq(0),_createLoadIndicator(Pe){const Se=this._getItem(Pe);this._createComponent((0,o.A)("<div>").addClass(q),B.A,{}).$element().appendTo(Se),Se.children(`.${ee},.${de}`).hide()},_renderExpanderIcon(Pe,Se,Re,Fe){Re.appendTo(this._getItem(Pe)),Re.addClass(Fe),Se.internalFields.disabled&&Re.addClass("dx-state-disabled"),this._renderToggleItemVisibilityIconClick(Re,Se)},_renderDefaultExpanderIcons(Pe,Se){const Re=this._getItem(Pe),Fe=(0,o.A)("<div>").addClass(ee).appendTo(Re);Se.internalFields.expanded&&(Fe.addClass(ve),Pe.parent().addClass(Y)),Se.internalFields.disabled&&Fe.addClass("dx-state-disabled"),this._renderToggleItemVisibilityIconClick(Fe,Se)},_renderCustomExpanderIcons(Pe,Se){const{expandIcon:Re,collapseIcon:Fe}=this.option(),Xe=(0,s.N)(Re??Fe),tt=(0,s.N)(Fe??Re);this._renderExpanderIcon(Pe,Se,Xe,de),this._renderExpanderIcon(Pe,Se,tt,he);const vt=Se.internalFields.expanded;vt&&Pe.parent().addClass(Y),this._toggleCustomExpanderIcons(Xe,tt,vt)},_renderToggleItemVisibilityIconClick(Pe,Se){const Re=(0,I.b4)(x.U,this.NAME);w.A.off(Pe,Re),w.A.on(Pe,Re,Fe=>(this._toggleExpandedState(Se.internalFields.key,void 0,Fe),!1))},_toggleCustomExpanderIcons(Pe,Se,Re){Se.toggle(Re),Pe.toggle(!Re)},_updateExpandedItemsUI(Pe,Se,Re){const Fe=this._getNodeElement(Pe),Xe=!Fe.length||Se&&Fe.is(":hidden");if(this.option("expandNodesRecursive")&&Xe){const At=this._getNode(Pe.internalFields.parentKey);At&&this._updateExpandedItemsUI(At,Se,Re)}if(this._hasCustomExpanderIcons()){if(this._nodeHasRenderedChildren(Fe)){const At=this._getItem(Fe),Tt=At.children(`.${de}`),qt=At.children(`.${he}`);this._toggleCustomExpanderIcons(Tt,qt,Se)}}else this._getItem(Fe).children(`.${ee}`).toggleClass(ve,Se);const tt=Fe.children(`.${re}`),vt=tt.length>0,qe=(0,c.cY)();return!Se||vt&&!tt.is(":empty")?(this._animateNodeContainer(Pe,Se,Re,qe),qe.promise()):0===Pe.internalFields.childrenKeys.length&&(this._isVirtualMode()||this._useCustomChildrenLoader())?(this._loadNestedItemsWithUpdate(Pe,Se,Re,qe),qe.promise()):(this._renderSublevel(Fe,Pe,this._getChildNodes(Pe)),this._fireContentReadyAction(),this._animateNodeContainer(Pe,Se,Re,qe),qe.promise())},_loadNestedItemsWithUpdate(Pe,Se,Re,Fe){const Xe=this._getNodeElement(Pe);this._loadNestedItems(Pe).done(tt=>{const vt=this._getActualNode(Pe);this._renderSublevel(Xe,vt,this._dataAdapter.getNodesByItems(tt)),tt&&tt.length?(this._fireContentReadyAction(),this._animateNodeContainer(vt,Se,Re,Fe)):Fe.resolve()})},_loadNestedItems(Pe){if(this._useCustomChildrenLoader()){const Se=this._dataAdapter.getPublicNode(Pe);return this._loadChildrenByCustomLoader(Se).done(Re=>{this._areNodesExists(Re)||this._appendItems(Re)})}return this._isVirtualMode()?(this._filter.internal=[this.option("parentIdExpr"),Pe.internalFields.key],this._dataSource.filter(this._combineFilter()),this._dataSource.load().done(Se=>{this._areNodesExists(Se)||this._appendItems(Se)})):(0,c.cY)().resolve([]).promise()},_areNodesExists(Pe,Se){const Re=this.keyOf(Pe[0]),Fe=this._dataAdapter.getFullData();return!!this._dataAdapter.getNodeByKey(Re,Fe)},_appendItems(Pe){this.option().items=this.option("items").concat(Pe),this._initDataAdapter()},_animateNodeContainer(Pe,Se,Re,Fe){const Xe=this._getNodeElement(Pe),tt=Xe.children(`.${re}`);Pe&&Fe&&0===tt.length&&Fe.resolve(),tt.addClass(Y);const vt=(0,u.Oq)(tt);S.A.stop(tt,!0),S.A.animate(tt,{type:"custom",duration:this.option("animationEnabled")?400:0,from:{maxHeight:Se?0:vt},to:{maxHeight:Se?vt:0},complete:function(){tt.css("maxHeight","none"),tt.toggleClass(Y,Se),this.setAria("expanded",Se,Xe),this.getScrollable().update(),this._fireExpandedStateUpdatedEvent(Se,Pe,Re),Fe&&Fe.resolve()}.bind(this)})},_fireExpandedStateUpdatedEvent(Pe,Se,Re){if(!this._hasChildren(Se)||this._skipContentReadyAndItemExpanded)return;const Fe=Pe?"onItemExpanded":"onItemCollapsed";if((0,g.O9)(Re))this._itemDXEventHandler(Re,Fe,{node:this._dataAdapter.getPublicNode(Se)});else{const Xe=this._getNodeElement(Se);this._itemEventHandler(Xe,Fe,{event:Re,node:this._dataAdapter.getPublicNode(Se)})}},_normalizeIconState(Pe,Se){const Re=Pe.find(`.${q}`);var Fe;Re.length&&(null===(Fe=B.A.getInstance(Re))||void 0===Fe||Fe.option("visible",!1));const tt=this._getItem(Pe).children(`.${he},.${ee}`);Se?tt.show():(tt.removeClass(ee),Pe.addClass(Z))},_emptyMessageContainer(){const Pe=this.getScrollable();return Pe?(0,o.A)(Pe.content()):this.callBase()},_renderContent(){const Pe=this.option("items");Pe&&Pe.length&&(this._contentAlreadyRendered=!0),this.callBase()},_renderSelectAllItem(Pe){const{selectAllText:Se,focusStateEnabled:Re}=this.option();Pe=Pe||this.$element().find(`.${re}`).first(),this._$selectAllItem=(0,o.A)("<div>").addClass(le);const Fe=this._dataAdapter.isAllSelected();this._createComponent(this._$selectAllItem,k.A,{value:Fe,elementAttr:{"aria-label":"Select All"},text:Se,focusStateEnabled:Re,onValueChanged:this._onSelectAllCheckboxValueChanged.bind(this),onInitialized:Xe=>{let{component:tt}=Xe;tt.registerKeyHandler("enter",()=>{tt.option("value",!tt.option("value"))})}}),this._toggleSelectedClass(this._$selectAllItem,Fe),Pe.before(this._$selectAllItem)},_onSelectAllCheckboxValueChanged(Pe){this._toggleSelectAll(Pe),this._fireSelectAllValueChanged(Pe.value)},_toggleSelectAll(Pe){this._dataAdapter.toggleSelectAll(Pe.value),this._updateItemsUI(),this._fireSelectionChanged()},_renderCheckBox(Pe,Se){const Re=(0,o.A)("<div>").appendTo(Pe);this._createComponent(Re,k.A,{value:Se.internalFields.selected,onValueChanged:this._changeCheckboxValue.bind(this),focusStateEnabled:!1,elementAttr:{"aria-label":"Check State"},disabled:this._disabledGetter(Se)})},_toggleSelectedClass(Pe,Se){Pe.toggleClass("dx-state-selected",!!Se)},_toggleNodeDisabledState(Pe,Se){const Re=this._getNodeElement(Pe),Fe=Re.find(`.${Q}`).eq(0);this._dataAdapter.toggleNodeDisabledState(Pe.internalFields.key,Se),Fe.toggleClass("dx-state-disabled",!!Se),this._showCheckboxes()&&this._getCheckBoxInstance(Re).option("disabled",!!Se)},_itemOptionChanged(Pe,Se,Re){const Fe=this._dataAdapter.getNodeByItem(Pe);Se===this.option("disabledExpr")&&this._toggleNodeDisabledState(Fe,Re)},_changeCheckboxValue(Pe){const Se=(0,o.A)(Pe.element).closest(`.${ie}`),Re=this._getItem(Se),Fe=this._getItemData(Re),Xe=this._getNodeByElement(Re),{value:tt}=Pe;Xe&&Xe.internalFields.selected===tt||this._updateItemSelection(tt,Fe,Pe.event)},_isSingleSelection(){return"single"===this.option("selectionMode")},_isRecursiveSelection(){return this.option("selectNodesRecursive")&&"single"!==this.option("selectionMode")},_isLastSelectedBranch(Pe,Se,Re){const Fe=Se.indexOf(Pe.key);return Fe>=0&&Se.splice(Fe,1),Re&&(0,a.__)(Pe.children,(Xe,tt)=>{this._isLastSelectedBranch(tt,Se,!0)}),Pe.parent&&this._isLastSelectedBranch(Pe.parent,Se),0===Se.length},_isLastRequired(Pe){const Se=this.option("selectionRequired"),Re=this._isSingleSelection(),Fe=this.getSelectedNodeKeys();if(Se)return Re?1===Fe.length:this._isLastSelectedBranch(Pe.internalFields.publicNode,Fe.slice(),!0)},_updateItemSelection(Pe,Se,Re){const Fe=this._getNode(Se);if(!Fe||!1===Fe.visible)return!1;if(Fe.internalFields.selected===Pe)return!0;if(!Pe&&this._isLastRequired(Fe)){if(this._showCheckboxes()){const vt=this._getNodeElement(Fe);this._getCheckBoxInstance(vt).option("value",!0)}return!1}if(Pe&&this._isSingleSelection()){const vt=this.getSelectedNodeKeys();(0,a.__)(vt,(qe,At)=>{this._dataAdapter.toggleSelection(At,!1),this._updateItemsUI(),this._fireItemSelectionChanged(this._getNode(At))})}this._dataAdapter.toggleSelection(Fe.internalFields.key,Pe);const Xe=this._dataAdapter.isAllSelected(),tt=this._selectAllEnabled()&&this._$selectAllItem.dxCheckBox("instance").option("value")!==Xe;return this._updateItemsUI(),this._fireItemSelectionChanged(Fe,Re),this._fireSelectionChanged(),tt&&this._fireSelectAllValueChanged(Xe),!0},_fireItemSelectionChanged(Pe,Se){const Re=Se||this._findItemElementByItem(Pe.internalFields.item);(Se?this._itemDXEventHandler:this._itemEventHandler).call(this,Re,"onItemSelectionChanged",{node:this._dataAdapter.getPublicNode(Pe),itemData:Pe.internalFields.item})},_getCheckBoxInstance(Pe){return this._getItem(Pe).children(".dx-checkbox").dxCheckBox("instance")},_updateItemsUI(){const Pe={};if((0,a.__)(this._dataAdapter.getData(),(Se,Re)=>{const Fe=this._getNodeElement(Re,Pe),Xe=Re.internalFields.selected;Fe.length&&(this._toggleSelectedClass(Fe,Xe),this.setAria("selected",Xe,Fe),this._showCheckboxes()&&this._getCheckBoxInstance(Fe).option("value",Xe))}),this._selectAllEnabled()){const Se=this._$selectAllItem.dxCheckBox("instance");Se.option("onValueChanged",void 0),Se.option("value",this._dataAdapter.isAllSelected()),Se.option("onValueChanged",this._onSelectAllCheckboxValueChanged.bind(this))}},_updateParentsState(Pe,Se){if(!Se)return;const Re=this._dataAdapter.getNodeByKey(Pe.internalFields.parentKey),Fe=(0,o.A)(Se.parents(`.${ie}`)[0]);if(this._showCheckboxes()){const Xe=Re.internalFields.selected;this._getCheckBoxInstance(Fe).option("value",Xe),this._toggleSelectedClass(Fe,Xe)}Re.internalFields.parentKey!==this.option("rootValue")&&this._updateParentsState(Re,Fe)},_itemEventHandlerImpl(Pe,Se,Re){const Fe=(0,o.A)(Pe).closest(`.${ie}`).children(`.${Q}`);return Se((0,P.X)(this._extendActionArgs(Fe),Re))},_itemContextMenuHandler(Pe){this._createEventHandler("onItemContextMenu",Pe)},_itemHoldHandler(Pe){this._createEventHandler("onItemHold",Pe)},_createEventHandler(Pe,Se){const Re=this._getNodeByElement(Se.currentTarget);this._itemDXEventHandler(Se,Pe,{node:this._dataAdapter.getPublicNode(Re)})},_itemClass:()=>Q,_itemDataKey:()=>ae,_attachClickEvent(){const Pe=this._itemContainer();this._detachClickEvent(Pe);const{clickEventNamespace:Se,itemSelector:Re,pointerDownEventNamespace:Fe,nodeSelector:Xe}=this._getItemClickEventData();w.A.on(Pe,Se,Re,tt=>{(0,o.A)(tt.target).hasClass("dx-checkbox-icon")||(0,o.A)(tt.target).hasClass("dx-checkbox")||this._itemClickHandler(tt,(0,o.A)(tt.currentTarget))}),w.A.on(Pe,Fe,Xe,tt=>{this._itemPointerDownHandler(tt)})},_detachClickEvent(Pe){const{clickEventNamespace:Se,itemSelector:Re,pointerDownEventNamespace:Fe,nodeSelector:Xe}=this._getItemClickEventData();w.A.off(Pe,Se,Re),w.A.off(Pe,Fe,Xe)},_getItemClickEventData(){const Pe=`.${this._itemClass()}`,Se=`.${ie}, .${le}`;return{clickEventNamespace:(0,I.b4)(x.U,this.NAME),itemSelector:Pe,pointerDownEventNamespace:(0,I.b4)(C.A.down,this.NAME),nodeSelector:Se}},_itemClick(Pe){const Se=Pe.args[0],Fe=(Se.event.target[0]||Se.event.target).getElementsByClassName("dx-item-url")[0];Se.itemData.url&&Fe&&Fe.click()},_itemClickHandler(Pe,Se){const Re=this._getItemData(Se),Fe=this._getNodeByElement(Se);this._itemDXEventHandler(Pe,"onItemClick",{node:this._dataAdapter.getPublicNode(Fe)},{beforeExecute:this._itemClick}),this.option("selectByClick")&&!Pe.isDefaultPrevented()&&this._updateItemSelection(!Fe.internalFields.selected,Re,Pe)},_updateSelectionToFirstItem(Pe,Se){let Re=Se;for(;Re>=0;){const Fe=(0,o.A)(Pe[Re]);this._updateItemSelection(!0,Fe.find(`.${Q}`).get(0)),Re--}},_updateSelectionToLastItem(Pe,Se){const{length:Re}=Pe;let Fe=Se;for(;Fe<Re;){const Xe=(0,o.A)(Pe[Fe]);this._updateItemSelection(!0,Xe.find(`.${Q}`).get(0)),Fe++}},focus(){this._selectAllEnabled()?w.A.trigger(this._$selectAllItem,"focus"):this.callBase()},_focusInHandler(Pe){this._updateFocusState(Pe,!0);const Se=(0,o.A)(Pe.target).hasClass(le);if(Se||this.option("focusedElement"))return clearTimeout(this._setFocusedItemTimeout),void(this._setFocusedItemTimeout=setTimeout(()=>{const Fe=Se?(0,y.cc)(this._$selectAllItem):(0,o.A)(this.option("focusedElement"));this._setFocusedItem(Fe)}));const Re=this._getActiveItem();this.option("focusedElement",(0,y.cc)(Re.closest(`.${ie}`)))},_itemPointerDownHandler(Pe){if(!this.option("focusStateEnabled"))return;const Se=(0,o.A)(Pe.target).closest(`.${ie}, .${le}`);if(!Se.length)return;const Re=Se.hasClass("dx-state-disabled")?null:Se;this.option("focusedElement",(0,y.cc)(Re))},_findNonDisabledNodes:Pe=>Pe.not(function(){return(0,o.A)(this).children(`.${Q}`).hasClass("dx-state-disabled")}),_moveFocus(Pe,Se){const Re=this.option("rtlEnabled")?"right":"left",Fe=this.option("rtlEnabled")?"left":"right";this.$element().find(`.${re}`).each(function(){S.A.stop(this,!0)});const Xe=this._nodeElements();if(Xe&&Xe.length)switch(Pe){case"up":{const tt=this._prevItem(Xe);this.option("focusedElement",(0,y.cc)(tt));const vt=this._getNodeItemElement(tt);this.getScrollable().scrollToElement(vt),Se.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,vt);break}case"down":{const tt=this._nextItem(Xe);this.option("focusedElement",(0,y.cc)(tt));const vt=this._getNodeItemElement(tt);this.getScrollable().scrollToElement(vt),Se.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,vt);break}case"first":{const tt=Xe.first();Se.shiftKey&&this._showCheckboxes()&&this._updateSelectionToFirstItem(Xe,Xe.index(this._prevItem(Xe))),this.option("focusedElement",(0,y.cc)(tt)),this.getScrollable().scrollToElement(this._getNodeItemElement(tt));break}case"last":{const tt=Xe.last();Se.shiftKey&&this._showCheckboxes()&&this._updateSelectionToLastItem(Xe,Xe.index(this._nextItem(Xe))),this.option("focusedElement",(0,y.cc)(tt)),this.getScrollable().scrollToElement(this._getNodeItemElement(tt));break}case Fe:this._expandFocusedContainer();break;case Re:this._collapseFocusedContainer();break;default:this.callBase.apply(this,arguments)}},_getNodeItemElement:Pe=>Pe.find(`.${Q}`).get(0),_nodeElements(){return this.$element().find(`.${ie}`).not(":hidden")},_expandFocusedContainer(){const Pe=(0,o.A)(this.option("focusedElement"));if(!Pe.length||Pe.hasClass(Z))return;if(Pe.find(`.${re}`).eq(0).hasClass(Y)){const Fe=this._nextItem(this._findNonDisabledNodes(this._nodeElements()));return this.option("focusedElement",(0,y.cc)(Fe)),void this.getScrollable().scrollToElement(this._getNodeItemElement(Fe))}const Re=this._getNodeByElement(this._getItem(Pe));this._toggleExpandedState(Re,!0)},_getClosestNonDisabledNode(Pe){do{Pe=Pe.parent().closest(`.${ie}`)}while(Pe.children(".dx-treeview-item.dx-state-disabled").length);return Pe},_collapseFocusedContainer(){const Pe=(0,o.A)(this.option("focusedElement"));if(!Pe.length)return;const Se=Pe.find(`.${re}`).eq(0);if(!Pe.hasClass(Z)&&Se.hasClass(Y)){const Re=this._getNodeByElement(this._getItem(Pe));this._toggleExpandedState(Re,!1)}else{const Re=this._getClosestNonDisabledNode(Pe);Re.length&&this.option("focusedElement",(0,y.cc)(Re)),this.getScrollable().scrollToElement(this._getNodeItemElement(Re))}},_encodeString:Pe=>(0,g.Kg)(Pe)?encodeURI(Pe):Pe,_decodeString:Pe=>(0,g.Kg)(Pe)?decodeURI(Pe):Pe,getScrollable(){return this._scrollable},updateDimensions(){const Pe=(0,c.cY)(),Se=this.getScrollable();return Se?Se.update().done(()=>{Pe.resolveWith(this)}):Pe.resolveWith(this),Pe.promise()},selectItem(Pe){return this._updateItemSelection(!0,Pe)},unselectItem(Pe){return this._updateItemSelection(!1,Pe)},expandItem(Pe){return this._toggleExpandedState(Pe,!0)},collapseItem(Pe){return this._toggleExpandedState(Pe,!1)},getNodes(){return this._dataAdapter.getTreeNodes()},getSelectedNodes(){return this.getSelectedNodeKeys().map(Pe=>{const Se=this._dataAdapter.getNodeByKey(Pe);return this._dataAdapter.getPublicNode(Se)})},getSelectedNodeKeys(){return this._dataAdapter.getSelectedNodesKeys()},selectAll(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!0):this._toggleSelectAll({value:!0})},unselectAll(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!1):this._toggleSelectAll({value:!1})},_allItemsExpandedHandler(){this._skipContentReadyAndItemExpanded=!1,this._fireContentReadyAction()},expandAll(){const Pe=this._dataAdapter.getData(),Se=[];this._skipContentReadyAndItemExpanded=!0,Pe.forEach(Re=>Se.push(this._toggleExpandedState(Re.internalFields.key,!0))),Promise.allSettled(Se).then(()=>{var Re;return null===(Re=this._allItemsExpandedHandler)||void 0===Re?void 0:Re.call(this)})},collapseAll(){(0,a.__)(this._dataAdapter.getExpandedNodesKeys(),(Pe,Se)=>{this._toggleExpandedState(Se,!1)})},scrollToItem(Pe){const Se=this._getNode(Pe);if(!Se)return(0,c.cY)().reject().promise();const Re=[];let Fe=Se.internalFields.publicNode.parent;for(;null!=Fe;)Fe.expanded||Re.push(Fe.key),Fe=Fe.parent;const Xe=(0,c.cY)();return this._expandNodes(Re.reverse()).always(()=>{const tt=this._getNodeElement(Se);tt&&tt.length?(this.scrollToElementTopLeft(tt.get(0)),Xe.resolve()):Xe.reject()}),Xe.promise()},scrollToElementTopLeft(Pe){const Se=this.getScrollable(),{scrollDirection:Re,rtlEnabled:Fe}=this.option(),Xe={top:0,left:0},tt=(0,G.Y)(N.JU,Pe);if(Re!==N.lm){const vt=(0,o.A)(Se.container()).get(0);Xe.left=Fe?tt.left+Pe.offsetWidth-vt.clientWidth:tt.left}Re!==N.fK&&(Xe.top=tt.top),Se.scrollTo(Xe)},_expandNodes(Pe){if(!Pe||0===Pe.length)return(0,c.cY)().resolve().promise();const Se=(0,c.cY)(),Re=Pe.map(Fe=>this.expandItem(Fe));return c.z7.apply(o.A,Re).done(()=>Se.resolve()).fail(()=>Se.reject()),Se.promise()},_dispose(){this.callBase(),clearTimeout(this._setFocusedItemTimeout),this._allItemsExpandedHandler=null}});f.A.setEditorClass(b.A);const ot="dx-treeview",st=`${ot}-node-container`,et=Ue.inherit(f.A).inherit({_addWidgetPrefix:Pe=>`${ot}-${Pe}`,_optionChanged(Pe){switch(Pe.name){case"searchValue":this._showCheckboxes()&&this._isRecursiveSelection()&&this._removeSelection(),this._initDataAdapter(),this._updateSearch(),this._repaintContainer(),this.option("focusedElement",null);break;case"searchExpr":this._initDataAdapter(),this.repaint();break;case"searchMode":this.option("expandNodesRecursive")?this._updateDataAdapter():this._initDataAdapter(),this.repaint();break;default:this.callBase(Pe)}},_updateDataAdapter(){this._setOptionWithoutOptionChange("expandNodesRecursive",!1),this._initDataAdapter(),this._setOptionWithoutOptionChange("expandNodesRecursive",!0)},_getDataAdapterOptions(){return(0,P.X)(this.callBase(),{searchValue:this.option("searchValue"),searchMode:this.option("searchMode")||"contains",searchExpr:this.option("searchExpr")})},_getNodeContainer(){return this.$element().find(`.${st}`).first()},_updateSearch(){if(this._searchEditor){const Pe=this._getSearchEditorOptions();this._searchEditor.option(Pe)}},_repaintContainer(){const Pe=this._getNodeContainer();let Se;Pe.length&&(Pe.empty(),Se=this._dataAdapter.getRootNodes(),this._renderEmptyMessage(Se),this._renderItems(Pe,Se),this._fireContentReadyAction())},_focusTarget(){return this._itemContainer(this.option("searchEnabled"))},_cleanItemContainer(){this.$element().empty()},_itemContainer(Pe,Se){return Se??(Se=this._selectAllEnabled()),Se?this._getNodeContainer():this._scrollable&&Pe?(0,o.A)(this._scrollable.content()):this.callBase()},_addWidgetClass(){this.$element().addClass(this._widgetClass())},_clean(){this.callBase(),this._removeSearchBox()}});(0,W.A)("dxTreeView",et);const Ye=et},3777:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(5811).A},3600:(In,Ze,M)=>{"use strict";var W=M(1973),o=M(7631),P=M(5704),b=M(5811),f=M(2978),S=M(597);(0,W.A)("dxValidationGroup",class c extends o.A{_getDefaultOptions(){return super._getDefaultOptions()}_init(){super._init(),b.A.addGroup(this,!1)}_initMarkup(){const h=this.$element();h.addClass("dx-validationgroup"),h.find(".dx-validator").each((g,_)=>{S.A.getInstance((0,P.A)(_))._initGroupRegistration()}),h.find(".dx-validationsummary").each((g,_)=>{f.A.getInstance((0,P.A)(_)).refreshValidationGroup()}),super._initMarkup()}validate(){return b.A.validateGroup(this)}reset(){return b.A.resetGroup(this)}_dispose(){b.A.removeGroup(this),this.$element().removeClass("dx-validationgroup"),super._dispose()}_useTemplates(){return!1}})},1144:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>_});var W=M(5737),o=M(1973),P=M(5704),b=M(3090),f=M(4757),S=M(1363),T=M(9495),y=M(3949);const d="dx-invalid-message",h=y.A.inherit({_getDefaultOptions(){return(0,b.X)(this.callBase(),{integrationOptions:{},templatesRenderAsynchronously:!1,shading:!1,width:"auto",height:"auto",hideOnOutsideClick:!1,animation:null,visible:!0,propagateOutsideClick:!0,_checkParentVisibility:!1,rtlEnabled:!1,contentTemplate:this._renderInnerHtml,maxWidth:"100%",container:this.$element(),target:void 0,mode:"auto",validationErrors:void 0,preventScrollEvents:!1,positionSide:"top",boundary:void 0,offset:{h:0,v:0},contentId:void 0})},_init(){this.callBase(),this.updateMaxWidth(),this._updatePosition()},_initMarkup(){this.callBase(),this._ensureMessageNotEmpty(),this._updatePositionByTarget(),this._toggleModeClass(),this._updateContentId()},_updatePositionByTarget(){const{target:x}=this.option();this.option("position.of",x)},_ensureMessageNotEmpty(){this._textMarkup=this._getTextMarkup();const x=this.option("visible")&&this._textMarkup;this._toggleVisibilityClasses(x)},_toggleVisibilityClasses(x){x?(this.$element().addClass(d),this.$wrapper().addClass(d)):(this.$element().removeClass(d),this.$wrapper().removeClass(d))},_updateContentId(){const{container:x,contentId:w}=this.option(),D=w??(0,P.A)(x).attr("aria-describedby");this.$content().addClass("dx-invalid-message-content").attr("id",D)},_renderInnerHtml(x){const w=x&&(0,P.A)(x);w?.html(this._textMarkup)},_getTextMarkup(){const x=this.option("validationErrors")??[];let w="";return x.forEach(D=>{w+=(w?"<br />":"")+(0,T.o4)(D?.message??"")}),w},_toggleModeClass(){const x=this.option("mode");this.$wrapper().toggleClass("dx-invalid-message-auto","auto"===x).toggleClass("dx-invalid-message-always","always"===x)},updateMaxWidth(){const x=this.option("target"),w=(0,S.Ot)(x);let D="100%";w&&(D=Math.max(w,100)),this.option({maxWidth:D})},_getPositionsArray(x,w){switch(x){case"top":return[`${w} bottom`,`${w} top`];case"left":return["right","left"];case"right":return["left","right"];default:return[`${w} top`,`${w} bottom`]}},_updatePosition(){const{positionSide:x,rtlEnabled:w,offset:D,boundary:C}=this.option(),I=(0,f.n)(w),L=this._getPositionsArray(x,I),N=(0,W.A)({},D);this.$element().addClass(`dx-invalid-message-${x}`),w&&"left"!==x&&"right"!==x&&(N.h=-N.h),"top"===x&&(N.v=-N.v),"left"===x&&(N.h=-N.h),this.option("position",{offset:N,boundary:C,my:L[0],at:L[1],collision:"none flip"})},_optionChanged(x){const{name:w,value:D,previousValue:C}=x;switch(w){case"target":this._updatePositionByTarget(),this.updateMaxWidth(),this.callBase(x);break;case"boundary":this.option("position.boundary",D);break;case"mode":this._toggleModeClass(D);break;case"rtlEnabled":case"offset":case"positionSide":this.$element().removeClass(`dx-invalid-message-${C}`),this._updatePosition();break;case"container":this._updateContentId(),this.callBase(x);break;case"contentId":this._updateContentId();break;case"validationErrors":this._ensureMessageNotEmpty(),this._renderInnerHtml(this.$content());break;default:this.callBase(x)}}});(0,o.A)("dxValidationMessage",h);const _=h},643:(In,Ze,M)=>{"use strict";M(2978)},8025:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>o});const o=M(597).A},402:(In,Ze,M)=>{"use strict";M.d(Ze,{Kr:()=>S,in:()=>T,nq:()=>f});var W=M(5704),o=M(6054);const P=function(y,d){if(!function b(y){const d=(0,W.A)(y);return d.is(":visible")&&"hidden"!==d.css("visibility")&&"hidden"!==d.parents().css("visibility")}(y))return!1;const c=y.nodeName.toLowerCase(),s=!isNaN(d),a=y.disabled;let g;return g=/^(input|select|textarea|button|object|iframe)$/.test(c)||y.isContentEditable?!a:"a"===c&&y.href||s,g},f=function(y,d){return P(d,(0,W.A)(d).attr("tabIndex"))},S=function(y,d){const c=(0,W.A)(d).attr("tabIndex");return(isNaN(c)||c>=0)&&P(d,c)},T=function(y){const d=(0,W.A)(y).get(0);return o.A.getActiveElement(d)===d}},7358:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>f});var W=M(5704),o=M(4017);const f={getSwatchContainer:S=>{const y=(0,W.A)(S).closest('[class^="dx-swatch-"], [class*=" dx-swatch-"]'),d=(0,o.Uq)();if(!y.length)return d;const c=new RegExp("(\\s|^)(dx-swatch-.*?)(\\s|$)"),s=y[0].className.match(c)[2];let a=d.children("."+s);return a.length||(a=(0,W.A)("<div>").addClass(s).appendTo(d)),a}}},127:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});var W=M(7754),o=M(7251);const P=(0,W.A)(o.A.ERROR_MESSAGES,{E1001:"Module '{0}'. Controller '{1}' is already registered",E1002:"Module '{0}'. Controller '{1}' does not inherit from DevExpress.ui.dxDataGrid.Controller",E1003:"Module '{0}'. View '{1}' is already registered",E1004:"Module '{0}'. View '{1}' does not inherit from DevExpress.ui.dxDataGrid.View",E1005:"Public method '{0}' is already registered",E1006:"Public method '{0}.{1}' does not exist",E1007:"State storing cannot be provided due to the restrictions of the browser",E1010:"The template does not contain the TextBox widget",E1011:'Items cannot be deleted from the List. Implement the "remove" function in the data store',E1012:"Editing type '{0}' with the name '{1}' is unsupported",E1016:"Unexpected type of data source is provided for a lookup column",E1018:"The 'collapseAll' method cannot be called if you use a remote data source",E1019:"Search mode '{0}' is unavailable",E1020:"The type cannot be changed after initialization",E1021:"{0} '{1}' you are trying to remove does not exist",E1022:'The "markers" option is given an invalid value. Assign an array instead',E1023:'The "routes" option is given an invalid value. Assign an array instead',E1025:"This layout is too complex to render",E1026:'The "calculateCustomSummary" function is missing from a field whose "summaryType" option is set to "custom"',E1031:"Unknown subscription in the Scheduler widget: '{0}'",E1032:"Unknown start date in an appointment: '{0}'",E1033:"Unknown step in the date navigator: '{0}'",E1034:"The browser does not implement an API for saving files",E1035:"The editor cannot be created: {0}",E1037:"Invalid structure of grouped data",E1038:"The browser does not support local storages for local web pages",E1039:"A cell's position cannot be calculated",E1040:"The '{0}' key value is not unique within the data array",E1041:"The '{0}' script is referenced after the DevExtreme scripts or not referenced at all",E1042:"{0} requires the key field to be specified",E1043:"Changes cannot be processed due to the incorrectly set key",E1044:"The key field specified by the keyExpr option does not match the key field specified in the data store",E1045:"Editing requires the key field to be specified in the data store",E1046:"The '{0}' key field is not found in data objects",E1047:'The "{0}" field is not found in the fields array',E1048:'The "{0}" operation is not found in the filterOperations array',E1049:"Column '{0}': filtering is allowed but the 'dataField' or 'name' option is not specified",E1050:"The validationRules option does not apply to third-party editors defined in the editCellTemplate",E1051:'HtmlEditor\'s valueType is "{0}", but the {0} converter was not imported.',E1052:'{0} should have the "dataSource" option specified',E1053:'The "buttons" option accepts an array that contains only objects or string values',E1054:"All text editor buttons must have names",E1055:'One or several text editor buttons have invalid or non-unique "name" values',E1056:'The {0} widget does not support buttons of the "{1}" type',E1058:'The "startDayHour" and "endDayHour" options must be integers in the [0, 24] range, with "endDayHour" being greater than "startDayHour".',E1059:"The following column names are not unique: {0}",E1060:"All editable columns must have names",E1061:'The "offset" option must be an integer in the [-1440, 1440] range, divisible by 5 without a remainder.',E1062:'The "cellDuration" must be a positive integer, evenly dividing the ("endDayHour" - "startDayHour") interval into minutes.',W1001:'The "key" option cannot be modified after initialization',W1002:"An item with the key '{0}' does not exist",W1003:"A group with the key '{0}' in which you are trying to select items does not exist",W1004:"The item '{0}' you are trying to select in the group '{1}' does not exist",W1005:"Due to column data types being unspecified, data has been loaded twice in order to apply initial filter settings. To resolve this issue, specify data types for all grid columns.",W1006:"The map service returned the following error: '{0}'",W1007:"No item with key {0} was found in the data source, but this key was used as the parent key for item {1}",W1008:"Cannot scroll to the '{0}' date because it does not exist on the current view",W1009:"Searching works only if data is specified using the dataSource option",W1010:"The capability to select all items works with source data of plain structure only",W1011:'The "keyExpr" option is not applied when dataSource is not an array',W1012:"The '{0}' key field is not found in data objects",W1013:'The "message" field in the dialog component was renamed to "messageHtml". Change your code correspondingly. In addition, if you used HTML code in the message, make sure that it is secure',W1014:"The Floating Action Button exceeds the recommended speed dial action count. If you need to display more speed dial actions, increase the maxSpeedDialActionCount option value in the global config.",W1016:"The '{0}' field in the HTML Editor toolbar item configuration was renamed to '{1}'. Please make a corresponding change in your code.",W1017:"The 'key' property is not specified for a lookup data source. Please specify it to prevent requests for the entire dataset when users filter data.",W1018:"Infinite scrolling may not work properly with multiple selection. To use these features together, set 'selection.deferred' to true or set 'selection.selectAllMode' to 'page'.",W1019:"Filter query string exceeds maximum length limit of {0} characters.",W1020:"hideEvent is ignored when the shading property is true",W1021:"The '{0}' is not rendered because none of the DOM elements match the value of the \"container\" property.",W1022:"{0} JSON parsing error: '{1}'",W1023:"Appointments require unique keys. Otherwise, the agenda view may not work correctly.",W1024:"The client-side export is enabled. Implement the 'onExporting' function.",W1025:"'scrolling.mode' is set to 'virtual' or 'infinite'. Specify the height of the component."})},6853:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(5704),o=M(3090),P=M(8360),b=M(127),f=M(6021);let T=function S(d){return class{constructor(){throw new Error(`Module '${d}' not found`)}static getInstance(){}}}("TextBox");const y={_getDefaultOptions:function(){return(0,o.X)(this.callBase(),{searchMode:"",searchExpr:null,searchValue:"",searchEnabled:!1,searchEditorOptions:{}})},_initMarkup:function(){this._renderSearch(),this.callBase()},_renderSearch:function(){const d=this.$element(),c=this.option("searchEnabled"),s=this._addWidgetPrefix("search"),a=this._addWidgetPrefix("with-search");if(!c)return d.removeClass(a),void this._removeSearchBox();const u=this._getSearchEditorOptions();this._searchEditor?this._searchEditor.option(u):(d.addClass(a),this._$searchEditorElement=(0,W.A)("<div>").addClass(s).prependTo(d),this._searchEditor=this._createComponent(this._$searchEditorElement,T,u))},_removeSearchBox:function(){this._$searchEditorElement&&this._$searchEditorElement.remove(),delete this._$searchEditorElement,delete this._searchEditor},_getSearchEditorOptions:function(){const d=this,c=d.option("searchEditorOptions"),s=P.A.format("Search");return(0,o.X)({mode:"search",placeholder:s,tabIndex:d.option("tabIndex"),value:d.option("searchValue"),valueChangeEvent:"input",inputAttr:{"aria-label":s},onValueChanged:function(a){const u=d.option("searchTimeout");d._valueChangeDeferred=new f.cY,clearTimeout(d._valueChangeTimeout),d._valueChangeDeferred.done(function(){this.option("searchValue",a.value)}.bind(d)),a.event&&"input"===a.event.type&&u?d._valueChangeTimeout=setTimeout(function(){d._valueChangeDeferred.resolve()},u):d._valueChangeDeferred.resolve()}},c)},_getAriaTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_focusTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_updateFocusState:function(d,c){this.option("searchEnabled")&&this._toggleFocusClass(c,this.$element()),this.callBase(d,c)},getOperationBySearchMode:function(d){return"equals"===d?"=":d},_optionChanged:function(d){switch(d.name){case"searchEnabled":case"searchEditorOptions":this._invalidate();break;case"searchExpr":case"searchMode":case"searchValue":if(!this._dataSource)return void b.A.log("W1009");"searchMode"===d.name?this._dataSource.searchOperation(this.getOperationBySearchMode(d.value)):this._dataSource[d.name](d.value),this._dataSource.load();break;case"searchTimeout":break;default:this.callBase(d)}},focus:function(){this.option("focusedElement")||!this.option("searchEnabled")?this.callBase():this._searchEditor&&this._searchEditor.focus()},_cleanAria:function(){const d=this.$element();this.setAria({role:null,activedescendant:null},d),d.attr("tabIndex",null)},_clean(){this.callBase(),this._cleanAria()},_refresh:function(){this._valueChangeDeferred&&this._valueChangeDeferred.resolve(),this.callBase()},setEditorClass:function(d){T=d}}},7080:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>x});var W=M(5704),o=M(9510),P=M(7631),b=M(1294),f=M(4859),S=M(2660),T=M(3090),y=M(402),d=M(1830),c=M(5973),s=M(6548);function g(w,D,C){w="role"===w||"id"===w?w:`aria-${w}`,D=(0,d.O9)(D)?D.toString():null,C.attr(w,D)}M(778),M(4451),M(1134);const _=P.A.inherit({_feedbackHideTimeout:400,_feedbackShowTimeout:30,_supportedKeys:()=>({}),_getDefaultOptions(){return(0,T.X)(this.callBase(),{hoveredElement:null,isActive:!1,disabled:!1,visible:!0,hint:void 0,activeStateEnabled:!1,onContentReady:null,hoverStateEnabled:!1,focusStateEnabled:!1,tabIndex:0,accessKey:void 0,onFocusIn:null,onFocusOut:null,onKeyboardHandled:null,ignoreParentReadOnly:!1,useResizeObserver:!0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){const w=c.A.real();return"ios"===w.platform&&(0,s.U)(w.version,"13.3")<=0},options:{useResizeObserver:!1}}])},_init(){this.callBase(),this._initContentReadyAction()},_innerWidgetOptionChanged:function(w,D){const C=_.getOptionsFromContainer(D);w&&w.option(C),this._options.cache(D.name,C)},_bindInnerWidgetOptions(w,D){const C=()=>this._options.silent(D,(0,T.X)({},w.option()));C(),w.on("optionChanged",C)},_getAriaTarget(){return this._focusTarget()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){const{disabled:w,visible:D}=this.option();this.$element().addClass("dx-widget"),this._toggleDisabledState(w),this._toggleVisibility(D),this._renderHint(),this._isFocusable()&&this._renderFocusTarget(),this.callBase()},_render(){this.callBase(),this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents(),this._toggleIndependentState()},_renderHint(){const{hint:w}=this.option();this.$element().attr("title",w||null)},_renderContent(){(0,f.zE)(()=>this._disposed?void 0:this._renderContentImpl()).done(()=>this._disposed?void 0:this._fireContentReadyAction())},_renderContentImpl:f.lQ,_fireContentReadyAction:(0,f.Mb)(function(){return this._contentReadyAction()}),_dispose(){this._contentReadyAction=null,this._detachKeyboardEvents(),this.callBase()},_resetActiveState(){this._toggleActiveState(this._eventBindingTarget(),!1)},_clean(){this._cleanFocusState(),this._resetActiveState(),this.callBase(),this.$element().empty()},_toggleVisibility(w){this.$element().toggleClass("dx-state-invisible",!w)},_renderFocusState(){this._attachKeyboardEvents(),this._isFocusable()&&(this._renderFocusTarget(),this._attachFocusEvents(),this._renderAccessKey())},_renderAccessKey(){const w=this._focusTarget(),{accessKey:D}=this.option();w.attr("accesskey",D)},_isFocusable(){const{focusStateEnabled:w,disabled:D}=this.option();return w&&!D},_eventBindingTarget(){return this.$element()},_focusTarget(){return this._getActiveElement()},_isFocusTarget:function(w){return(0,W.A)(this._focusTarget()).toArray().includes(w)},_findActiveTarget(w){return w.find(this._activeStateUnit).not(".dx-state-disabled")},_getActiveElement(){const w=this._eventBindingTarget();return this._activeStateUnit?this._findActiveTarget(w):w},_renderFocusTarget(){const{tabIndex:w}=this.option();this._focusTarget().attr("tabIndex",w)},_keyboardEventBindingTarget(){return this._eventBindingTarget()},_refreshFocusEvent(){this._detachFocusEvents(),this._attachFocusEvents()},_focusEventTarget(){return this._focusTarget()},_focusInHandler(w){w.isDefaultPrevented()||this._createActionByOption("onFocusIn",{beforeExecute:()=>this._updateFocusState(w,!0),excludeValidators:["readOnly"]})({event:w})},_focusOutHandler(w){w.isDefaultPrevented()||this._createActionByOption("onFocusOut",{beforeExecute:()=>this._updateFocusState(w,!1),excludeValidators:["readOnly","disabled"]})({event:w})},_updateFocusState(w,D){let{target:C}=w;this._isFocusTarget(C)&&this._toggleFocusClass(D,(0,W.A)(C))},_toggleFocusClass(w,D){(D&&D.length?D:this._focusTarget()).toggleClass("dx-state-focused",w)},_hasFocusClass(w){return(0,W.A)(w||this._focusTarget()).hasClass("dx-state-focused")},_isFocused(){return this._hasFocusClass()},_getKeyboardListeners:()=>[],_attachKeyboardEvents(){this._detachKeyboardEvents();const{focusStateEnabled:w,onKeyboardHandled:D}=this.option(),C=this._getKeyboardListeners().length;(w||C||D)&&(this._keyboardListenerId=b.QJ.on(this._keyboardEventBindingTarget(),this._focusTarget(),N=>this._keyboardHandler(N)))},_keyboardHandler(w,D){if(!D){const{originalEvent:L,keyName:N,which:G}=w,k=this._supportedKeys(L),U=k[N]||k[G];if(void 0!==U&&!U.bind(this)(L,w))return!1}const C=this._getKeyboardListeners(),{onKeyboardHandled:I}=this.option();return C.forEach(L=>L&&L._keyboardHandler(w)),I&&I(w),!0},_refreshFocusState(){this._cleanFocusState(),this._renderFocusState()},_cleanFocusState(){this._focusTarget().removeAttr("tabIndex"),this._toggleFocusClass(!1),this._detachFocusEvents(),this._detachKeyboardEvents()},_detachKeyboardEvents(){b.QJ.off(this._keyboardListenerId),this._keyboardListenerId=null},_attachHoverEvents(){const{hoverStateEnabled:w}=this.option(),D=this._activeStateUnit,C=this._eventBindingTarget();b.PT.off(C,{selector:D,namespace:"UIFeedback"}),w&&b.PT.on(C,new o.A(I=>{let{event:L,element:N}=I;this._hoverStartHandler(L),this.option("hoveredElement",(0,W.A)(N))},{excludeValidators:["readOnly"]}),I=>{this.option("hoveredElement",null),this._hoverEndHandler(I)},{selector:D,namespace:"UIFeedback"})},_attachFeedbackEvents(){const{activeStateEnabled:w}=this.option(),D=this._activeStateUnit,C=this._eventBindingTarget();b.vu.off(C,{namespace:"UIFeedback",selector:D}),w&&b.vu.on(C,new o.A(I=>{let{event:L,element:N}=I;return this._toggleActiveState((0,W.A)(N),!0,L)}),new o.A(I=>{let{event:L,element:N}=I;return this._toggleActiveState((0,W.A)(N),!1,L)},{excludeValidators:["disabled","readOnly"]}),{showTimeout:this._feedbackShowTimeout,hideTimeout:this._feedbackHideTimeout,selector:D,namespace:"UIFeedback"})},_detachFocusEvents(){const w=this._focusEventTarget();b.XC.off(w,{namespace:`${this.NAME}Focus`})},_attachFocusEvents(){const w=this._focusEventTarget();b.XC.on(w,D=>this._focusInHandler(D),D=>this._focusOutHandler(D),{namespace:`${this.NAME}Focus`,isFocusable:(D,C)=>(0,W.A)(C).is(y.nq)})},_hoverStartHandler:f.lQ,_hoverEndHandler:f.lQ,_toggleActiveState(w,D){this.option("isActive",D),w.toggleClass("dx-state-active",D)},_updatedHover(){const w=this._options.silent("hoveredElement");this._hover(w,w)},_findHoverTarget(w){return w&&w.closest(this._activeStateUnit||this._eventBindingTarget())},_hover(w,D){const{hoverStateEnabled:C,disabled:I,isActive:L}=this.option();if((D=this._findHoverTarget(D))&&D.toggleClass("dx-state-hover",!1),w&&C&&!I&&!L){const N=this._findHoverTarget(w);N&&N.toggleClass("dx-state-hover",!0)}},_toggleDisabledState(w){this.$element().toggleClass("dx-state-disabled",!!w),this.setAria("disabled",w||void 0)},_toggleIndependentState(){this.$element().toggleClass("dx-state-independent",this.option("ignoreParentReadOnly"))},_setWidgetOption(w,D){if(!this[w])return;if((0,d.Qd)(D[0]))return void(0,S.__)(D[0],(N,G)=>this._setWidgetOption(w,[N,G]));const C=D[0];let I=D[1];1===D.length&&(I=this.option(C));const L=this[`${w}OptionMap`];this[w].option(L?L(C):C,I)},_optionChanged(w){const{name:D,value:C,previousValue:I}=w;switch(D){case"disabled":this._toggleDisabledState(C),this._updatedHover(),this._refreshFocusState();break;case"hint":this._renderHint();break;case"ignoreParentReadOnly":this._toggleIndependentState();break;case"activeStateEnabled":this._attachFeedbackEvents();break;case"hoverStateEnabled":this._attachHoverEvents(),this._updatedHover();break;case"tabIndex":case"focusStateEnabled":this._refreshFocusState();break;case"onFocusIn":case"onFocusOut":case"useResizeObserver":break;case"accessKey":this._renderAccessKey();break;case"hoveredElement":this._hover(C,I);break;case"isActive":this._updatedHover();break;case"visible":this._toggleVisibility(C),this._isVisibilityChangeSupported()&&this._checkVisibilityChanged(C?"shown":"hiding");break;case"onKeyboardHandled":this._attachKeyboardEvents();break;case"onContentReady":this._initContentReadyAction();break;default:this.callBase(w)}},_isVisible(){const{visible:w}=this.option();return this.callBase()&&w},beginUpdate(){this._ready(!1),this.callBase()},endUpdate(){this.callBase(),this._initialized&&this._ready(!0)},_ready(w){if(0===arguments.length)return this._isReady;this._isReady=w},setAria(){if((0,d.Qd)(arguments.length<=0?void 0:arguments[0])){const w=(arguments.length<=1?void 0:arguments[1])||this._getAriaTarget();(0,S.__)(arguments.length<=0?void 0:arguments[0],(D,C)=>g(D,C,w))}else g(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],(arguments.length<=2?void 0:arguments[2])||this._getAriaTarget())},isReady(){return this._ready()},repaint(){this._refresh()},focus(){b.XC.trigger(this._focusTarget())},registerKeyHandler(w,D){const C=this._supportedKeys();this._supportedKeys=()=>(0,T.X)(C,{[w]:D})}});_.getOptionsFromContainer=w=>{let{name:D,fullName:C,value:I}=w,L={};return D===C?L=I:L[C.split(".").pop()]=I,L};const x=_},9524:(In,Ze,M)=>{"use strict";M.d(Ze,{SK:()=>I,XX:()=>u,pw:()=>a,vF:()=>x});var W=M(1363),o=M(5704);const f="dx-inkripple-showing",S="dx-inkripple-hiding",a=function(){let L=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{useHoldAnimation:N,waveSizeCoefficient:G,isCentered:k,wavesNumber:U}=L;return{waveSizeCoefficient:G||2,isCentered:k||!1,wavesNumber:U||1,durations:D(N??!0)}},u=function(L){const N=a(L);return{showWave:x.bind(this,N),hideWave:I.bind(this,N)}},g=function(L,N){const G=function(L){let N=L.children(".dx-inkripple");return 0===N.length&&(N=(0,o.A)("<div>").addClass("dx-inkripple").appendTo(L)),N}((0,o.A)(L)),k=G.children(".dx-inkripple-wave").toArray();for(let U=k.length;U<N;U++){const B=(0,o.A)("<div>").appendTo(G).addClass("dx-inkripple-wave");k.push(B[0])}return(0,o.A)(k)},_=function(L,N){const G=(0,o.A)(N.element),k=(0,W.Ot)(G),U=(0,W.P$)(G),B=parseInt(Math.sqrt(k*k+U*U)),K=Math.min(4e3,parseInt(B*L.waveSizeCoefficient));let J,ie;if(L.isCentered)J=(k-K)/2,ie=(U-K)/2;else{const re=N.event,q=G.offset();J=re.pageX-q.left-K/2,ie=re.pageY-q.top-K/2}return{left:J,top:ie,height:K,width:K}};function x(L,N){const G=g(N.element,L.wavesNumber).eq(N.wave||0);L.hidingTimeout&&clearTimeout(L.hidingTimeout),C(G),G.css(_(L,N)),L.showingTimeout=setTimeout(w.bind(this,L,G),0)}function w(L,N){const G=L.durations.showingScale+"ms";N.addClass(f).css("transitionDuration",G)}function D(L){return{showingScale:L?1e3:300,hidingScale:300,hidingOpacity:300}}function C(L){L.removeClass(S).css("transitionDuration","")}function I(L,N){L.showingTimeout&&clearTimeout(L.showingTimeout);const G=g(N.element,N.wavesNumber).eq(N.wave||0),k=L.durations,U=k.hidingScale+"ms, "+k.hidingOpacity+"ms";G.addClass(S).removeClass(f).css("transitionDuration",U);const B=Math.max(k.hidingScale,k.hidingOpacity);L.hidingTimeout=setTimeout(C.bind(this,G),B)}},6716:(In,Ze,M)=>{var W;!function(o,P,b,f){"use strict";var _,S=["","webkit","Moz","MS","ms","o"],T=P.createElement("div"),y="function",d=Math.round,c=Math.abs,s=Date.now;function a(Yn,ei,Ii){return setTimeout(C(Yn,Ii),ei)}function u(Yn,ei,Ii){return!!Array.isArray(Yn)&&(h(Yn,Ii[ei],Ii),!0)}function h(Yn,ei,Ii){var co;if(Yn)if(Yn.forEach)Yn.forEach(ei,Ii);else if(Yn.length!==f)for(co=0;co<Yn.length;)ei.call(Ii,Yn[co],co,Yn),co++;else for(co in Yn)Yn.hasOwnProperty(co)&&ei.call(Ii,Yn[co],co,Yn)}function g(Yn,ei,Ii){var co="DEPRECATED METHOD: "+ei+"\n"+Ii+" AT \n";return function(){var ko=new Error("get-stack-trace"),er=ko&&ko.stack?ko.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",or=o.console&&(o.console.warn||o.console.log);return or&&or.call(o.console,co,er),Yn.apply(this,arguments)}}_="function"!=typeof Object.assign?function(ei){if(ei===f||null===ei)throw new TypeError("Cannot convert undefined or null to object");for(var Ii=Object(ei),co=1;co<arguments.length;co++){var ko=arguments[co];if(ko!==f&&null!==ko)for(var er in ko)ko.hasOwnProperty(er)&&(Ii[er]=ko[er])}return Ii}:Object.assign;var x=g(function(ei,Ii,co){for(var ko=Object.keys(Ii),er=0;er<ko.length;)(!co||co&&ei[ko[er]]===f)&&(ei[ko[er]]=Ii[ko[er]]),er++;return ei},"extend","Use `assign`."),w=g(function(ei,Ii){return x(ei,Ii,!0)},"merge","Use `assign`.");function D(Yn,ei,Ii){var ko,co=ei.prototype;(ko=Yn.prototype=Object.create(co)).constructor=Yn,ko._super=co,Ii&&_(ko,Ii)}function C(Yn,ei){return function(){return Yn.apply(ei,arguments)}}function I(Yn,ei){return typeof Yn==y?Yn.apply(ei&&ei[0]||f,ei):Yn}function L(Yn,ei){return Yn===f?ei:Yn}function N(Yn,ei,Ii){h(B(ei),function(co){Yn.addEventListener(co,Ii,!1)})}function G(Yn,ei,Ii){h(B(ei),function(co){Yn.removeEventListener(co,Ii,!1)})}function k(Yn,ei){for(;Yn;){if(Yn==ei)return!0;Yn=Yn.parentNode}return!1}function U(Yn,ei){return Yn.indexOf(ei)>-1}function B(Yn){return Yn.trim().split(/\s+/g)}function K(Yn,ei,Ii){if(Yn.indexOf&&!Ii)return Yn.indexOf(ei);for(var co=0;co<Yn.length;){if(Ii&&Yn[co][Ii]==ei||!Ii&&Yn[co]===ei)return co;co++}return-1}function J(Yn){return Array.prototype.slice.call(Yn,0)}function ie(Yn,ei,Ii){for(var co=[],ko=[],er=0;er<Yn.length;){var or=ei?Yn[er][ei]:Yn[er];K(ko,or)<0&&co.push(Yn[er]),ko[er]=or,er++}return Ii&&(co=ei?co.sort(function(Wr,Xr){return Wr[ei]>Xr[ei]}):co.sort()),co}function re(Yn,ei){for(var Ii,co,ko=ei[0].toUpperCase()+ei.slice(1),er=0;er<S.length;){if((co=(Ii=S[er])?Ii+ko:ei)in Yn)return co;er++}return f}var q=1;function Z(Yn){var ei=Yn.ownerDocument||Yn;return ei.defaultView||ei.parentWindow||o}var te="ontouchstart"in o,pe=re(o,"PointerEvent")!==f,z=te&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),oe="touch",ee="mouse",de=25,ue=1,ve=4,le=8,Ce=1,ye=2,ge=4,fe=8,xe=16,Te=ye|ge,Ee=fe|xe,Oe=Te|Ee,ze=["x","y"],$e=["clientX","clientY"];function Be(Yn,ei){var Ii=this;this.manager=Yn,this.callback=ei,this.element=Yn.element,this.target=Yn.options.inputTarget,this.domHandler=function(co){I(Yn.options.enable,[Yn])&&Ii.handler(co)},this.init()}function ot(Yn,ei,Ii){var co=Ii.pointers.length,ko=Ii.changedPointers.length,er=ei&ue&&co-ko==0,or=ei&(ve|le)&&co-ko==0;Ii.isFirst=!!er,Ii.isFinal=!!or,er&&(Yn.session={}),Ii.eventType=ei,function st(Yn,ei){var Ii=Yn.session,co=ei.pointers,ko=co.length;Ii.firstInput||(Ii.firstInput=Ye(ei)),ko>1&&!Ii.firstMultiple?Ii.firstMultiple=Ye(ei):1===ko&&(Ii.firstMultiple=!1);var er=Ii.firstInput,or=Ii.firstMultiple,Jr=or?or.center:er.center,Wr=ei.center=Pe(co);ei.timeStamp=s(),ei.deltaTime=ei.timeStamp-er.timeStamp,ei.angle=Xe(Jr,Wr),ei.distance=Fe(Jr,Wr),function et(Yn,ei){var Ii=ei.center,co=Yn.offsetDelta||{},ko=Yn.prevDelta||{},er=Yn.prevInput||{};(ei.eventType===ue||er.eventType===ve)&&(ko=Yn.prevDelta={x:er.deltaX||0,y:er.deltaY||0},co=Yn.offsetDelta={x:Ii.x,y:Ii.y}),ei.deltaX=ko.x+(Ii.x-co.x),ei.deltaY=ko.y+(Ii.y-co.y)}(Ii,ei),ei.offsetDirection=Re(ei.deltaX,ei.deltaY);var Xr=Se(ei.deltaTime,ei.deltaX,ei.deltaY);ei.overallVelocityX=Xr.x,ei.overallVelocityY=Xr.y,ei.overallVelocity=c(Xr.x)>c(Xr.y)?Xr.x:Xr.y,ei.scale=or?function vt(Yn,ei){return Fe(ei[0],ei[1],$e)/Fe(Yn[0],Yn[1],$e)}(or.pointers,co):1,ei.rotation=or?function tt(Yn,ei){return Xe(ei[1],ei[0],$e)+Xe(Yn[1],Yn[0],$e)}(or.pointers,co):0,ei.maxPointers=Ii.prevInput?ei.pointers.length>Ii.prevInput.maxPointers?ei.pointers.length:Ii.prevInput.maxPointers:ei.pointers.length,function Ke(Yn,ei){var ko,er,or,Jr,Ii=Yn.lastInterval||ei,co=ei.timeStamp-Ii.timeStamp;if(ei.eventType!=le&&(co>de||Ii.velocity===f)){var Wr=ei.deltaX-Ii.deltaX,Xr=ei.deltaY-Ii.deltaY,Mr=Se(co,Wr,Xr);er=Mr.x,or=Mr.y,ko=c(Mr.x)>c(Mr.y)?Mr.x:Mr.y,Jr=Re(Wr,Xr),Yn.lastInterval=ei}else ko=Ii.velocity,er=Ii.velocityX,or=Ii.velocityY,Jr=Ii.direction;ei.velocity=ko,ei.velocityX=er,ei.velocityY=or,ei.direction=Jr}(Ii,ei);var Mr=Yn.element;k(ei.srcEvent.target,Mr)&&(Mr=ei.srcEvent.target),ei.target=Mr}(Yn,Ii),Yn.emit("hammer.input",Ii),Yn.recognize(Ii),Yn.session.prevInput=Ii}function Ye(Yn){for(var ei=[],Ii=0;Ii<Yn.pointers.length;)ei[Ii]={clientX:d(Yn.pointers[Ii].clientX),clientY:d(Yn.pointers[Ii].clientY)},Ii++;return{timeStamp:s(),pointers:ei,center:Pe(ei),deltaX:Yn.deltaX,deltaY:Yn.deltaY}}function Pe(Yn){var ei=Yn.length;if(1===ei)return{x:d(Yn[0].clientX),y:d(Yn[0].clientY)};for(var Ii=0,co=0,ko=0;ko<ei;)Ii+=Yn[ko].clientX,co+=Yn[ko].clientY,ko++;return{x:d(Ii/ei),y:d(co/ei)}}function Se(Yn,ei,Ii){return{x:ei/Yn||0,y:Ii/Yn||0}}function Re(Yn,ei){return Yn===ei?Ce:c(Yn)>=c(ei)?Yn<0?ye:ge:ei<0?fe:xe}function Fe(Yn,ei,Ii){Ii||(Ii=ze);var co=ei[Ii[0]]-Yn[Ii[0]],ko=ei[Ii[1]]-Yn[Ii[1]];return Math.sqrt(co*co+ko*ko)}function Xe(Yn,ei,Ii){return Ii||(Ii=ze),180*Math.atan2(ei[Ii[1]]-Yn[Ii[1]],ei[Ii[0]]-Yn[Ii[0]])/Math.PI}Be.prototype={handler:function(){},init:function(){this.evEl&&N(this.element,this.evEl,this.domHandler),this.evTarget&&N(this.target,this.evTarget,this.domHandler),this.evWin&&N(Z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&G(this.element,this.evEl,this.domHandler),this.evTarget&&G(this.target,this.evTarget,this.domHandler),this.evWin&&G(Z(this.element),this.evWin,this.domHandler)}};var qe={mousedown:ue,mousemove:2,mouseup:ve},At="mousedown",Tt="mousemove mouseup";function qt(){this.evEl=At,this.evWin=Tt,this.pressed=!1,Be.apply(this,arguments)}D(qt,Be,{handler:function(ei){var Ii=qe[ei.type];Ii&ue&&0===ei.button&&(this.pressed=!0),2&Ii&&1!==ei.which&&(Ii=ve),this.pressed&&(Ii&ve&&(this.pressed=!1),this.callback(this.manager,Ii,{pointers:[ei],changedPointers:[ei],pointerType:ee,srcEvent:ei}))}});var wt={pointerdown:ue,pointermove:2,pointerup:ve,pointercancel:le,pointerout:le},En={2:oe,3:"pen",4:ee,5:"kinect"},ri="pointerdown",Tn="pointermove pointerup pointercancel";function Jn(){this.evEl=ri,this.evWin=Tn,Be.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(ri="MSPointerDown",Tn="MSPointerMove MSPointerUp MSPointerCancel"),D(Jn,Be,{handler:function(ei){var Ii=this.store,co=!1,ko=ei.type.toLowerCase().replace("ms",""),er=wt[ko],or=En[ei.pointerType]||ei.pointerType,Jr=or==oe,Wr=K(Ii,ei.pointerId,"pointerId");er&ue&&(0===ei.button||Jr)?Wr<0&&(Ii.push(ei),Wr=Ii.length-1):er&(ve|le)&&(co=!0),!(Wr<0)&&(Ii[Wr]=ei,this.callback(this.manager,er,{pointers:Ii,changedPointers:[ei],pointerType:or,srcEvent:ei}),co&&Ii.splice(Wr,1))}});var wi={touchstart:ue,touchmove:2,touchend:ve,touchcancel:le};function Ai(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Be.apply(this,arguments)}function pt(Yn,ei){var Ii=J(Yn.touches),co=J(Yn.changedTouches);return ei&(ve|le)&&(Ii=ie(Ii.concat(co),"identifier",!0)),[Ii,co]}D(Ai,Be,{handler:function(ei){var Ii=wi[ei.type];if(Ii===ue&&(this.started=!0),this.started){var co=pt.call(this,ei,Ii);Ii&(ve|le)&&co[0].length-co[1].length==0&&(this.started=!1),this.callback(this.manager,Ii,{pointers:co[0],changedPointers:co[1],pointerType:oe,srcEvent:ei})}}});var Dt={touchstart:ue,touchmove:2,touchend:ve,touchcancel:le},cn="touchstart touchmove touchend touchcancel";function dt(){this.evTarget=cn,this.targetIds={},Be.apply(this,arguments)}function Et(Yn,ei){var Ii=J(Yn.touches),co=this.targetIds;if(ei&(2|ue)&&1===Ii.length)return co[Ii[0].identifier]=!0,[Ii,Ii];var ko,er,or=J(Yn.changedTouches),Jr=[],Wr=this.target;if(er=Ii.filter(function(Xr){return k(Xr.target,Wr)}),ei===ue)for(ko=0;ko<er.length;)co[er[ko].identifier]=!0,ko++;for(ko=0;ko<or.length;)co[or[ko].identifier]&&Jr.push(or[ko]),ei&(ve|le)&&delete co[or[ko].identifier],ko++;return Jr.length?[ie(er.concat(Jr),"identifier",!0),Jr]:void 0}D(dt,Be,{handler:function(ei){var Ii=Dt[ei.type],co=Et.call(this,ei,Ii);co&&this.callback(this.manager,Ii,{pointers:co[0],changedPointers:co[1],pointerType:oe,srcEvent:ei})}});var hn=2500;function Ln(){Be.apply(this,arguments);var Yn=C(this.handler,this);this.touch=new dt(this.manager,Yn),this.mouse=new qt(this.manager,Yn),this.primaryTouch=null,this.lastTouches=[]}function Nt(Yn,ei){Yn&ue?(this.primaryTouch=ei.changedPointers[0].identifier,Gt.call(this,ei)):Yn&(ve|le)&&Gt.call(this,ei)}function Gt(Yn){var ei=Yn.changedPointers[0];if(ei.identifier===this.primaryTouch){var Ii={x:ei.clientX,y:ei.clientY};this.lastTouches.push(Ii);var co=this.lastTouches;setTimeout(function(){var er=co.indexOf(Ii);er>-1&&co.splice(er,1)},hn)}}function on(Yn){for(var ei=Yn.srcEvent.clientX,Ii=Yn.srcEvent.clientY,co=0;co<this.lastTouches.length;co++){var ko=this.lastTouches[co],er=Math.abs(ei-ko.x),or=Math.abs(Ii-ko.y);if(er<=25&&or<=25)return!0}return!1}D(Ln,Be,{handler:function(ei,Ii,co){var er=co.pointerType==ee;if(!(er&&co.sourceCapabilities&&co.sourceCapabilities.firesTouchEvents)){if(co.pointerType==oe)Nt.call(this,Ii,co);else if(er&&on.call(this,co))return;this.callback(ei,Ii,co)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var sn=re(T.style,"touchAction"),It=sn!==f,Ot="compute",un="manipulation",Pn="none",ci="pan-x",Ei="pan-y",Hi=function vr(){if(!It)return!1;var Yn={},ei=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(Ii){Yn[Ii]=!ei||o.CSS.supports("touch-action",Ii)}),Yn}();function mo(Yn,ei){this.manager=Yn,this.set(ei)}mo.prototype={set:function(Yn){Yn==Ot&&(Yn=this.compute()),It&&this.manager.element.style&&Hi[Yn]&&(this.manager.element.style[sn]=Yn),this.actions=Yn.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var Yn=[];return h(this.manager.recognizers,function(ei){I(ei.options.enable,[ei])&&(Yn=Yn.concat(ei.getTouchAction()))}),function xo(Yn){if(U(Yn,Pn))return Pn;var ei=U(Yn,ci),Ii=U(Yn,Ei);return ei&&Ii?Pn:ei||Ii?ei?ci:Ei:U(Yn,un)?un:"auto"}(Yn.join(" "))},preventDefaults:function(Yn){var ei=Yn.srcEvent,Ii=Yn.offsetDirection;if(!this.manager.session.prevented){var co=this.actions,ko=U(co,Pn)&&!Hi[Pn],er=U(co,Ei)&&!Hi[Ei],or=U(co,ci)&&!Hi[ci];if(ko&&1===Yn.pointers.length&&Yn.distance<2&&Yn.deltaTime<250)return;return or&&er||!(ko||er&&Ii&Te||or&&Ii&Ee)?void 0:this.preventSrc(ei)}ei.preventDefault()},preventSrc:function(Yn){this.manager.session.prevented=!0,Yn.preventDefault()}};var rn=1;function Hn(Yn){this.options=_({},this.defaults,Yn||{}),this.id=function Y(){return q++}(),this.manager=null,this.options.enable=L(this.options.enable,!0),this.state=rn,this.simultaneous={},this.requireFail=[]}function ui(Yn){return 16&Yn?"cancel":8&Yn?"end":4&Yn?"move":2&Yn?"start":""}function bi(Yn){return Yn==xe?"down":Yn==fe?"up":Yn==ye?"left":Yn==ge?"right":""}function ao(Yn,ei){var Ii=ei.manager;return Ii?Ii.get(Yn):Yn}function Wi(){Hn.apply(this,arguments)}function Ko(){Wi.apply(this,arguments),this.pX=null,this.pY=null}function Zo(){Wi.apply(this,arguments)}function xr(){Hn.apply(this,arguments),this._timer=null,this._input=null}function hr(){Wi.apply(this,arguments)}function Rt(){Wi.apply(this,arguments)}function mn(){Hn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function pi(Yn,ei){return(ei=ei||{}).recognizers=L(ei.recognizers,pi.defaults.preset),new Eo(Yn,ei)}function Eo(Yn,ei){this.options=_({},pi.defaults,ei||{}),this.options.inputTarget=this.options.inputTarget||Yn,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=Yn,this.input=function Ue(Yn){return new(Yn.options.inputClass||(pe?Jn:z?dt:te?Ln:qt))(Yn,ot)}(this),this.touchAction=new mo(this,this.options.touchAction),Jo(this,!0),h(this.options.recognizers,function(Ii){var co=this.add(new Ii[0](Ii[1]));Ii[2]&&co.recognizeWith(Ii[2]),Ii[3]&&co.requireFailure(Ii[3])},this)}function Jo(Yn,ei){var co,Ii=Yn.element;Ii.style&&(h(Yn.options.cssProps,function(ko,er){co=re(Ii.style,er),ei?(Yn.oldCssProps[co]=Ii.style[co],Ii.style[co]=ko):Ii.style[co]=Yn.oldCssProps[co]||""}),ei||(Yn.oldCssProps={}))}Hn.prototype={defaults:{},set:function(Yn){return _(this.options,Yn),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(Yn){if(u(Yn,"recognizeWith",this))return this;var ei=this.simultaneous;return ei[(Yn=ao(Yn,this)).id]||(ei[Yn.id]=Yn,Yn.recognizeWith(this)),this},dropRecognizeWith:function(Yn){return u(Yn,"dropRecognizeWith",this)||(Yn=ao(Yn,this),delete this.simultaneous[Yn.id]),this},requireFailure:function(Yn){if(u(Yn,"requireFailure",this))return this;var ei=this.requireFail;return-1===K(ei,Yn=ao(Yn,this))&&(ei.push(Yn),Yn.requireFailure(this)),this},dropRequireFailure:function(Yn){if(u(Yn,"dropRequireFailure",this))return this;Yn=ao(Yn,this);var ei=K(this.requireFail,Yn);return ei>-1&&this.requireFail.splice(ei,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(Yn){return!!this.simultaneous[Yn.id]},emit:function(Yn){var ei=this,Ii=this.state;function co(ko){ei.manager.emit(ko,Yn)}Ii<8&&co(ei.options.event+ui(Ii)),co(ei.options.event),Yn.additionalEvent&&co(Yn.additionalEvent),Ii>=8&&co(ei.options.event+ui(Ii))},tryEmit:function(Yn){if(this.canEmit())return this.emit(Yn);this.state=32},canEmit:function(){for(var Yn=0;Yn<this.requireFail.length;){if(!(this.requireFail[Yn].state&(32|rn)))return!1;Yn++}return!0},recognize:function(Yn){var ei=_({},Yn);if(!I(this.options.enable,[this,ei]))return this.reset(),void(this.state=32);56&this.state&&(this.state=rn),this.state=this.process(ei),30&this.state&&this.tryEmit(ei)},process:function(Yn){},getTouchAction:function(){},reset:function(){}},D(Wi,Hn,{defaults:{pointers:1},attrTest:function(Yn){var ei=this.options.pointers;return 0===ei||Yn.pointers.length===ei},process:function(Yn){var ei=this.state,Ii=Yn.eventType,co=6&ei,ko=this.attrTest(Yn);return co&&(Ii&le||!ko)?16|ei:co||ko?Ii&ve?8|ei:2&ei?4|ei:2:32}}),D(Ko,Wi,{defaults:{event:"pan",threshold:10,pointers:1,direction:Oe},getTouchAction:function(){var Yn=this.options.direction,ei=[];return Yn&Te&&ei.push(Ei),Yn&Ee&&ei.push(ci),ei},directionTest:function(Yn){var ei=this.options,Ii=!0,co=Yn.distance,ko=Yn.direction,er=Yn.deltaX,or=Yn.deltaY;return ko&ei.direction||(ei.direction&Te?(ko=0===er?Ce:er<0?ye:ge,Ii=er!=this.pX,co=Math.abs(Yn.deltaX)):(ko=0===or?Ce:or<0?fe:xe,Ii=or!=this.pY,co=Math.abs(Yn.deltaY))),Yn.direction=ko,Ii&&co>ei.threshold&&ko&ei.direction},attrTest:function(Yn){return Wi.prototype.attrTest.call(this,Yn)&&(2&this.state||!(2&this.state)&&this.directionTest(Yn))},emit:function(Yn){this.pX=Yn.deltaX,this.pY=Yn.deltaY;var ei=bi(Yn.direction);ei&&(Yn.additionalEvent=this.options.event+ei),this._super.emit.call(this,Yn)}}),D(Zo,Wi,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Pn]},attrTest:function(Yn){return this._super.attrTest.call(this,Yn)&&(Math.abs(Yn.scale-1)>this.options.threshold||2&this.state)},emit:function(Yn){1!==Yn.scale&&(Yn.additionalEvent=this.options.event+(Yn.scale<1?"in":"out")),this._super.emit.call(this,Yn)}}),D(xr,Hn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(Yn){var ei=this.options,Ii=Yn.pointers.length===ei.pointers,co=Yn.distance<ei.threshold,ko=Yn.deltaTime>ei.time;if(this._input=Yn,!co||!Ii||Yn.eventType&(ve|le)&&!ko)this.reset();else if(Yn.eventType&ue)this.reset(),this._timer=a(function(){this.state=8,this.tryEmit()},ei.time,this);else if(Yn.eventType&ve)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(Yn){8===this.state&&(Yn&&Yn.eventType&ve?this.manager.emit(this.options.event+"up",Yn):(this._input.timeStamp=s(),this.manager.emit(this.options.event,this._input)))}}),D(hr,Wi,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Pn]},attrTest:function(Yn){return this._super.attrTest.call(this,Yn)&&(Math.abs(Yn.rotation)>this.options.threshold||2&this.state)}}),D(Rt,Wi,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Te|Ee,pointers:1},getTouchAction:function(){return Ko.prototype.getTouchAction.call(this)},attrTest:function(Yn){var Ii,ei=this.options.direction;return ei&(Te|Ee)?Ii=Yn.overallVelocity:ei&Te?Ii=Yn.overallVelocityX:ei&Ee&&(Ii=Yn.overallVelocityY),this._super.attrTest.call(this,Yn)&&ei&Yn.offsetDirection&&Yn.distance>this.options.threshold&&Yn.maxPointers==this.options.pointers&&c(Ii)>this.options.velocity&&Yn.eventType&ve},emit:function(Yn){var ei=bi(Yn.offsetDirection);ei&&this.manager.emit(this.options.event+ei,Yn),this.manager.emit(this.options.event,Yn)}}),D(mn,Hn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[un]},process:function(Yn){var ei=this.options,Ii=Yn.pointers.length===ei.pointers,co=Yn.distance<ei.threshold,ko=Yn.deltaTime<ei.time;if(this.reset(),Yn.eventType&ue&&0===this.count)return this.failTimeout();if(co&&ko&&Ii){if(Yn.eventType!=ve)return this.failTimeout();var er=!this.pTime||Yn.timeStamp-this.pTime<ei.interval,or=!this.pCenter||Fe(this.pCenter,Yn.center)<ei.posThreshold;if(this.pTime=Yn.timeStamp,this.pCenter=Yn.center,or&&er?this.count+=1:this.count=1,this._input=Yn,0==this.count%ei.taps)return this.hasRequireFailures()?(this._timer=a(function(){this.state=8,this.tryEmit()},ei.interval,this),2):8}return 32},failTimeout:function(){return this._timer=a(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),pi.VERSION="2.0.7",pi.defaults={domEvents:!1,touchAction:Ot,enable:!0,inputTarget:null,inputClass:null,preset:[[hr,{enable:!1}],[Zo,{enable:!1},["rotate"]],[Rt,{direction:Te}],[Ko,{direction:Te},["swipe"]],[mn],[mn,{event:"doubletap",taps:2},["tap"]],[xr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Eo.prototype={set:function(Yn){return _(this.options,Yn),Yn.touchAction&&this.touchAction.update(),Yn.inputTarget&&(this.input.destroy(),this.input.target=Yn.inputTarget,this.input.init()),this},stop:function(Yn){this.session.stopped=Yn?2:1},recognize:function(Yn){var ei=this.session;if(!ei.stopped){this.touchAction.preventDefaults(Yn);var Ii,co=this.recognizers,ko=ei.curRecognizer;(!ko||ko&&8&ko.state)&&(ko=ei.curRecognizer=null);for(var er=0;er<co.length;)Ii=co[er],2===ei.stopped||ko&&Ii!=ko&&!Ii.canRecognizeWith(ko)?Ii.reset():Ii.recognize(Yn),!ko&&14&Ii.state&&(ko=ei.curRecognizer=Ii),er++}},get:function(Yn){if(Yn instanceof Hn)return Yn;for(var ei=this.recognizers,Ii=0;Ii<ei.length;Ii++)if(ei[Ii].options.event==Yn)return ei[Ii];return null},add:function(Yn){if(u(Yn,"add",this))return this;var ei=this.get(Yn.options.event);return ei&&this.remove(ei),this.recognizers.push(Yn),Yn.manager=this,this.touchAction.update(),Yn},remove:function(Yn){if(u(Yn,"remove",this))return this;if(Yn=this.get(Yn)){var ei=this.recognizers,Ii=K(ei,Yn);-1!==Ii&&(ei.splice(Ii,1),this.touchAction.update())}return this},on:function(Yn,ei){if(Yn!==f&&ei!==f){var Ii=this.handlers;return h(B(Yn),function(co){Ii[co]=Ii[co]||[],Ii[co].push(ei)}),this}},off:function(Yn,ei){if(Yn!==f){var Ii=this.handlers;return h(B(Yn),function(co){ei?Ii[co]&&Ii[co].splice(K(Ii[co],ei),1):delete Ii[co]}),this}},emit:function(Yn,ei){this.options.domEvents&&function fr(Yn,ei){var Ii=P.createEvent("Event");Ii.initEvent(Yn,!0,!0),Ii.gesture=ei,ei.target.dispatchEvent(Ii)}(Yn,ei);var Ii=this.handlers[Yn]&&this.handlers[Yn].slice();if(Ii&&Ii.length){ei.type=Yn,ei.preventDefault=function(){ei.srcEvent.preventDefault()};for(var co=0;co<Ii.length;)Ii[co](ei),co++}},destroy:function(){this.element&&Jo(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},_(pi,{INPUT_START:ue,INPUT_MOVE:2,INPUT_END:ve,INPUT_CANCEL:le,STATE_POSSIBLE:rn,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:Ce,DIRECTION_LEFT:ye,DIRECTION_RIGHT:ge,DIRECTION_UP:fe,DIRECTION_DOWN:xe,DIRECTION_HORIZONTAL:Te,DIRECTION_VERTICAL:Ee,DIRECTION_ALL:Oe,Manager:Eo,Input:Be,TouchAction:mo,TouchInput:dt,MouseInput:qt,PointerEventInput:Jn,TouchMouseInput:Ln,SingleTouchInput:Ai,Recognizer:Hn,AttrRecognizer:Wi,Tap:mn,Pan:Ko,Swipe:Rt,Pinch:Zo,Rotate:hr,Press:xr,on:N,off:G,each:h,merge:w,extend:x,assign:_,inherit:D,bindFn:C,prefixed:re}),(typeof o<"u"?o:typeof self<"u"?self:{}).Hammer=pi,(W=function(){return pi}.call(Ze,M,Ze,In))!==f&&(In.exports=W)}(window,document)},9446:(In,Ze,M)=>{"use strict";M.d(Ze,{n:()=>S});var W=M(5328);function o(T){return null==T}function b(T){return void 0===T}var f={onComponentDidMount:1,onComponentDidUpdate:1,onComponentShouldUpdate:1,onComponentWillMount:1,onComponentWillUnmount:1,onComponentWillUpdate:1};function S(T,y,d){var s,_,c=arguments,a=null,u=null,h=null,g=0,x=arguments.length-2;if(1===x)s=d;else if(x>1)for(s=[];x-- >0;)s[x]=c[x+2];if(!function P(T){return"string"==typeof T}(T)){if(g=2,b(s)||(y||(y={}),y.children=s),!o(y))for(var D in _={},y)"key"===D?u=y.key:"ref"===D?a=y.ref:1===f[D]?(a||(a={}),a[D]=y[D]):_[D]=y[D];return(0,W.sO)(g,T,_,u,a)}if(g=(0,W.$_)(T),!o(y))for(var w in _={},y)"className"===w||"class"===w?h=y[w]:"key"===w?u=y.key:"children"===w&&b(s)?s=y.children:"ref"===w?a=y.ref:("contenteditable"===w&&(g|=4096),_[w]=y[w]);return 8192&g?(0,W.nl)(1===x?[s]:s,0,u):(0,W.bF)(g,T,h,s,0,_,u,a)}},5328:(In,Ze,M)=>{"use strict";M.d(Ze,{uA:()=>pr,MZ:()=>u,EW:()=>rn,zF:()=>ge,_M:()=>Zn,Gg:()=>Wi,C4:()=>Xo,Hq:()=>Zo,vI:()=>xo,J4:()=>on,F1:()=>en,sO:()=>oe,nl:()=>ee,_3:()=>Ln,bF:()=>Q,UV:()=>N,$_:()=>Ce,_B:()=>he,XX:()=>an,mM:()=>No});var W=Array.isArray;function o(Lt){var bn=typeof Lt;return"string"===bn||"number"===bn}function P(Lt){return null==Lt}function b(Lt){return null===Lt||!1===Lt||!0===Lt||void 0===Lt}function f(Lt){return"function"==typeof Lt}function S(Lt){return"string"==typeof Lt}function y(Lt){return null===Lt}function d(Lt){return void 0===Lt}function c(Lt,bn){var jn={};if(Lt)for(var Ci in Lt)jn[Ci]=Lt[Ci];if(bn)for(var Mi in bn)jn[Mi]=bn[Mi];return jn}function a(Lt){return!y(Lt)&&"object"==typeof Lt}var u={},h="$F";function g(Lt){return Lt.substr(2).toLowerCase()}function _(Lt,bn){Lt.appendChild(bn)}function x(Lt,bn,jn){y(jn)?_(Lt,bn):Lt.insertBefore(bn,jn)}function C(Lt,bn){Lt.removeChild(bn)}function I(Lt){for(var bn=0;bn<Lt.length;bn++)Lt[bn]()}function L(Lt,bn,jn){var Ci=Lt.children;return 4&jn?Ci.$LI:8192&jn?2===Lt.childFlags?Ci:Ci[bn?0:Ci.length-1]:Ci}function N(Lt,bn){for(var jn;Lt;){if(2033&(jn=Lt.flags))return Lt.dom;Lt=L(Lt,bn,jn)}return null}function G(Lt,bn){do{var jn=Lt.flags;if(2033&jn)return void C(bn,Lt.dom);var Ci=Lt.children;if(4&jn&&(Lt=Ci.$LI),8&jn&&(Lt=Ci),8192&jn){if(2!==Lt.childFlags){for(var Mi=0,Ki=Ci.length;Mi<Ki;++Mi)G(Ci[Mi],bn);return}Lt=Ci}}while(Lt)}function k(Lt,bn,jn){do{var Ci=Lt.flags;if(2033&Ci)return void x(bn,Lt.dom,jn);var Mi=Lt.children;if(4&Ci&&(Lt=Mi.$LI),8&Ci&&(Lt=Mi),8192&Ci){if(2!==Lt.childFlags){for(var Ki=0,bt=Mi.length;Ki<bt;++Ki)k(Mi[Ki],bn,jn);return}Lt=Mi}}while(Lt)}function U(Lt,bn,jn){return Lt.constructor.getDerivedStateFromProps?c(jn,Lt.constructor.getDerivedStateFromProps(bn,jn)):jn}var B={v:!1},K={componentComparator:null,createVNode:null,renderComplete:null};function J(Lt,bn){Lt.textContent=bn}function ie(Lt,bn){return a(Lt)&&Lt.event===bn.event&&Lt.data===bn.data}function re(Lt,bn){for(var jn in bn)d(Lt[jn])&&(Lt[jn]=bn[jn]);return Lt}function q(Lt,bn){return!!f(Lt)&&(Lt(bn),!0)}var Y="$";function Z(Lt,bn,jn,Ci,Mi,Ki,bt,gn){this.childFlags=Lt,this.children=bn,this.className=jn,this.dom=null,this.flags=Ci,this.key=void 0===Mi?null:Mi,this.props=void 0===Ki?null:Ki,this.ref=void 0===bt?null:bt,this.type=gn}function Q(Lt,bn,jn,Ci,Mi,Ki,bt,gn){var Kt=void 0===Mi?1:Mi,Mn=new Z(Kt,Ci,jn,Lt,bt,Ki,gn,bn);return K.createVNode&&K.createVNode(Mn),0===Kt&&ye(Mn,Mn.children),Mn}function oe(Lt,bn,jn,Ci,Mi){Lt=function z(Lt,bn){return 12&Lt?Lt:bn.prototype&&bn.prototype.render?4:bn.render?32776:8}(Lt,bn);var Ki=new Z(1,null,null,Lt,Ci,function pe(Lt,bn,jn){var Ci=(32768&Lt?bn.render:bn).defaultProps;return P(Ci)?jn:P(jn)?c(Ci,null):re(jn,Ci)}(Lt,bn,jn),function te(Lt,bn,jn){if(4&Lt)return jn;var Ci=(32768&Lt?bn.render:bn).defaultHooks;return P(Ci)?jn:P(jn)?Ci:re(jn,Ci)}(Lt,bn,Mi),bn);return K.createVNode&&K.createVNode(Ki),Ki}function ae(Lt,bn){return new Z(1,P(Lt)||!0===Lt||!1===Lt?"":Lt,null,16,bn,null,null,null)}function ee(Lt,bn,jn){var Ci=Q(8192,8192,null,Lt,bn,null,jn,null);switch(Ci.childFlags){case 1:Ci.children=be(),Ci.childFlags=2;break;case 16:Ci.children=[ae(Lt)],Ci.childFlags=4}return Ci}function he(Lt){var bn=Lt.props;if(bn){var jn=Lt.flags;481&jn&&(void 0!==bn.children&&P(Lt.children)&&ye(Lt,bn.children),void 0!==bn.className&&(P(Lt.className)&&(Lt.className=bn.className||null),bn.className=void 0)),void 0!==bn.key&&(Lt.key=bn.key,bn.key=void 0),void 0!==bn.ref&&(Lt.ref=8&jn?c(Lt.ref,bn.ref):bn.ref,bn.ref=void 0)}return Lt}function ue(Lt){var bn=-16385&Lt.flags,jn=Lt.props;if(14&bn&&!y(jn)){var Ci=jn;for(var Mi in jn={},Ci)jn[Mi]=Ci[Mi]}return 8192&bn?function de(Lt){var bn=Lt.children,jn=Lt.childFlags;return ee(2===jn?ue(bn):bn.map(ue),jn,Lt.key)}(Lt):new Z(Lt.childFlags,Lt.children,Lt.className,bn,Lt.key,jn,Lt.ref,Lt.type)}function be(){return ae("",null)}function le(Lt,bn,jn,Ci){for(var Mi=Lt.length;jn<Mi;jn++){var Ki=Lt[jn];if(!b(Ki)){var bt=Ci+Y+jn;if(W(Ki))le(Ki,bn,0,bt);else{if(o(Ki))Ki=ae(Ki,bt);else{var gn=Ki.key,Kt=S(gn)&&gn[0]===Y;(81920&Ki.flags||Kt)&&(Ki=ue(Ki)),Ki.flags|=65536,Kt?gn.substring(0,Ci.length)!==Ci&&(Ki.key=Ci+gn):Ki.key=y(gn)?bt:Ci+gn}bn.push(Ki)}}}}function Ce(Lt){switch(Lt){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case h:return 8192;default:return 1}}function ye(Lt,bn){var jn,Ci=1;if(b(bn))jn=bn;else if(o(bn))Ci=16,jn=bn;else if(W(bn)){for(var Mi=bn.length,Ki=0;Ki<Mi;++Ki){var bt=bn[Ki];if(b(bt)||W(bt)){jn=jn||bn.slice(0,Ki),le(bn,jn,Ki,"");break}if(o(bt))(jn=jn||bn.slice(0,Ki)).push(ae(bt,Y+Ki));else{var gn=bt.key,Kt=(81920&bt.flags)>0,Mn=y(gn),_i=S(gn)&&gn[0]===Y;Kt||Mn||_i?(jn=jn||bn.slice(0,Ki),(Kt||_i)&&(bt=ue(bt)),(Mn||_i)&&(bt.key=Y+Ki),jn.push(bt)):jn&&jn.push(bt),bt.flags|=65536}}Ci=0===(jn=jn||bn).length?1:8}else(jn=bn).flags|=65536,81920&bn.flags&&(jn=ue(bn)),Ci=2;return Lt.children=jn,Lt.childFlags=Ci,Lt}function ge(Lt){return b(Lt)||o(Lt)?ae(Lt,null):W(Lt)?ee(Lt,0,null):16384&Lt.flags?ue(Lt):Lt}var fe="http://www.w3.org/1999/xlink",xe="http://www.w3.org/XML/1998/namespace",Te={"xlink:actuate":fe,"xlink:arcrole":fe,"xlink:href":fe,"xlink:role":fe,"xlink:show":fe,"xlink:title":fe,"xlink:type":fe,"xml:base":xe,"xml:lang":xe,"xml:space":xe};function Ee(Lt){return{onClick:Lt,onDblClick:Lt,onFocusIn:Lt,onFocusOut:Lt,onKeyDown:Lt,onKeyPress:Lt,onKeyUp:Lt,onMouseDown:Lt,onMouseMove:Lt,onMouseUp:Lt,onTouchEnd:Lt,onTouchMove:Lt,onTouchStart:Lt}}var Oe=Ee(0),ze=Ee(null),$e=Ee(!0);function Be(Lt,bn){var jn=bn.$EV;return jn||(jn=bn.$EV=Ee(null)),jn[Lt]||1==++Oe[Lt]&&(ze[Lt]=function Xe(Lt){var bn="onClick"===Lt||"onDblClick"===Lt?function Re(Lt){return function(bn){0===bn.button?et(bn,!0,Lt,Se(bn)):bn.stopPropagation()}}(Lt):function Fe(Lt){return function(bn){et(bn,!1,Lt,Se(bn))}}(Lt);return document.addEventListener(g(Lt),bn),bn}(Lt)),jn}function Ue(Lt,bn){var jn=bn.$EV;jn&&jn[Lt]&&(0==--Oe[Lt]&&(document.removeEventListener(g(Lt),ze[Lt]),ze[Lt]=null),jn[Lt]=null)}function et(Lt,bn,jn,Ci){var Mi=function st(Lt){return f(Lt.composedPath)?Lt.composedPath()[0]:Lt.target}(Lt);do{if(bn&&Mi.disabled)return;var Ki=Mi.$EV;if(Ki){var bt=Ki[jn];if(bt&&(Ci.dom=Mi,bt.event?bt.event(bt.data,Lt):bt(Lt),Lt.cancelBubble))return}Mi=Mi.parentNode}while(!y(Mi))}function Ke(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function Ye(){return this.defaultPrevented}function Pe(){return this.cancelBubble}function Se(Lt){var bn={dom:document};return Lt.isDefaultPrevented=Ye,Lt.isPropagationStopped=Pe,Lt.stopPropagation=Ke,Object.defineProperty(Lt,"currentTarget",{configurable:!0,get:function(){return bn.dom}}),bn}function vt(Lt,bn,jn){if(Lt[bn]){var Ci=Lt[bn];Ci.event?Ci.event(Ci.data,jn):Ci(jn)}else{var Mi=bn.toLowerCase();Lt[Mi]&&Lt[Mi](jn)}}function qe(Lt,bn){var jn=function(Ci){var Mi=this.$V;if(Mi){var Ki=Mi.props||u,bt=Mi.dom;if(S(Lt))vt(Ki,Lt,Ci);else for(var gn=0;gn<Lt.length;++gn)vt(Ki,Lt[gn],Ci);if(f(bn)){var Kt=this.$V;bn(Kt.props||u,bt,!1,Kt)}}};return Object.defineProperty(jn,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),jn}function At(Lt,bn,jn){var Ci="$"+bn,Mi=Lt[Ci];if(Mi){if(Mi[1].wrapped)return;Lt.removeEventListener(Mi[0],Mi[1]),Lt[Ci]=null}f(jn)&&(Lt.addEventListener(bn,jn),Lt[Ci]=[bn,jn])}function Tt(Lt){return"checkbox"===Lt||"radio"===Lt}var qt=qe("onInput",Tn),wt=qe(["onClick","onChange"],Tn);function En(Lt){Lt.stopPropagation()}function Tn(Lt,bn){var jn=Lt.type,Ci=Lt.value,Mi=Lt.checked,Ki=Lt.multiple,bt=Lt.defaultValue,gn=!P(Ci);jn&&jn!==bn.type&&bn.setAttribute("type",jn),!P(Ki)&&Ki!==bn.multiple&&(bn.multiple=Ki),!P(bt)&&!gn&&(bn.defaultValue=bt+""),Tt(jn)?(gn&&(bn.value=Ci),P(Mi)||(bn.checked=Mi)):gn&&bn.value!==Ci?(bn.defaultValue=Ci,bn.value=Ci):P(Mi)||(bn.checked=Mi)}function Jn(Lt,bn){if("option"===Lt.type)!function wi(Lt,bn){var jn=Lt.props||u,Ci=Lt.dom;Ci.value=jn.value,jn.value===bn||W(bn)&&-1!==bn.indexOf(jn.value)?Ci.selected=!0:(!P(bn)||!P(jn.selected))&&(Ci.selected=jn.selected||!1)}(Lt,bn);else{var jn=Lt.children,Ci=Lt.flags;if(4&Ci)Jn(jn.$LI,bn);else if(8&Ci)Jn(jn,bn);else if(2===Lt.childFlags)Jn(jn,bn);else if(12&Lt.childFlags)for(var Mi=0,Ki=jn.length;Mi<Ki;++Mi)Jn(jn[Mi],bn)}}En.wrapped=!0;var Bn=qe("onChange",Ai);function Ai(Lt,bn,jn,Ci){var Mi=!!Lt.multiple;!P(Lt.multiple)&&Mi!==bn.multiple&&(bn.multiple=Mi);var Ki=Lt.selectedIndex;if(-1===Ki&&(bn.selectedIndex=-1),1!==Ci.childFlags){var gn=Lt.value;(function T(Lt){return"number"==typeof Lt})(Ki)&&Ki>-1&&bn.options[Ki]&&(gn=bn.options[Ki].value),jn&&P(gn)&&(gn=Lt.defaultValue),Jn(Ci,gn)}}var pt=qe("onInput",dt),Dt=qe("onChange");function dt(Lt,bn,jn){var Ci=Lt.value,Mi=bn.value;if(P(Ci)){if(jn){var Ki=Lt.defaultValue;!P(Ki)&&Ki!==Mi&&(bn.defaultValue=Ki,bn.value=Ki)}}else Mi!==Ci&&(bn.defaultValue=Ci,bn.value=Ci)}function Et(Lt,bn,jn,Ci,Mi,Ki){64&Lt?Tn(Ci,jn):256&Lt?Ai(Ci,jn,Mi,bn):128&Lt&&dt(Ci,jn,Mi),Ki&&(jn.$V=bn)}function $n(Lt){return Lt.type&&Tt(Lt.type)?!P(Lt.checked):!P(Lt.value)}function Ln(){return{current:null}}function Gt(Lt){Lt&&!q(Lt,null)&&Lt.current&&(Lt.current=null)}function on(Lt,bn,jn){Lt&&(f(Lt)||void 0!==Lt.current)&&jn.push(function(){!q(Lt,bn)&&void 0!==Lt.current&&(Lt.current=bn)})}function sn(Lt,bn){It(Lt),G(Lt,bn)}function It(Lt){var Ci,bn=Lt.flags,jn=Lt.children;if(481&bn){var Mi=Lt.props;Gt(Ci=Lt.ref);var Ki=Lt.childFlags;if(!y(Mi))for(var bt=Object.keys(Mi),gn=0,Kt=bt.length;gn<Kt;gn++){var Mn=bt[gn];$e[Mn]&&Ue(Mn,Lt.dom)}12&Ki?Ot(jn):2===Ki&&It(jn)}else jn&&(4&bn?(f(jn.componentWillUnmount)&&jn.componentWillUnmount(),Gt(Lt.ref),jn.$UN=!0,It(jn.$LI)):8&bn?(!P(Ci=Lt.ref)&&f(Ci.onComponentWillUnmount)&&Ci.onComponentWillUnmount(N(Lt,!0),Lt.props||u),It(jn)):1024&bn?sn(jn,Lt.ref):8192&bn&&12&Lt.childFlags&&Ot(jn))}function Ot(Lt){for(var bn=0,jn=Lt.length;bn<jn;++bn)It(Lt[bn])}function zt(Lt){Lt.textContent=""}function un(Lt,bn,jn){Ot(jn),8192&bn.flags?G(bn,Lt):zt(Lt)}function mo(Lt,bn,jn,Ci,Mi,Ki,bt){switch(Lt){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":Ci.autofocus=!!jn;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":Ci[Lt]=!!jn;break;case"defaultChecked":case"value":case"volume":if(Ki&&"value"===Lt)break;var gn=P(jn)?"":jn;Ci[Lt]!==gn&&(Ci[Lt]=gn);break;case"style":!function Ei(Lt,bn,jn){if(P(bn))jn.removeAttribute("style");else{var Mi,Ki,Ci=jn.style;if(S(bn))Ci.cssText=bn;else if(P(Lt)||S(Lt))for(Mi in bn)Ci.setProperty(Mi,Ki=bn[Mi]);else{for(Mi in bn)(Ki=bn[Mi])!==Lt[Mi]&&Ci.setProperty(Mi,Ki);for(Mi in Lt)P(bn[Mi])&&Ci.removeProperty(Mi)}}}(bn,jn,Ci);break;case"dangerouslySetInnerHTML":!function Hi(Lt,bn,jn,Ci){var Ki=bn&&bn.__html||"";(Lt&&Lt.__html||"")!==Ki&&!P(Ki)&&!function tt(Lt,bn){var jn=document.createElement("i");return jn.innerHTML=bn,jn.innerHTML===Lt.innerHTML}(Ci,Ki)&&(y(jn)||(12&jn.childFlags?Ot(jn.children):2===jn.childFlags&&It(jn.children),jn.children=null,jn.childFlags=1),Ci.innerHTML=Ki)}(bn,jn,bt,Ci);break;default:$e[Lt]?function ot(Lt,bn,jn,Ci){if(f(jn))Be(Lt,Ci)[Lt]=jn;else if(a(jn)){if(ie(bn,jn))return;Be(Lt,Ci)[Lt]=jn}else Ue(Lt,Ci)}(Lt,bn,jn,Ci):111===Lt.charCodeAt(0)&&110===Lt.charCodeAt(1)?function ci(Lt,bn,jn,Ci){if(a(jn)){if(ie(bn,jn))return;jn=function Pn(Lt){var bn=Lt.event;return function(jn){bn(Lt.data,jn)}}(jn)}At(Ci,g(Lt),jn)}(Lt,bn,jn,Ci):P(jn)?Ci.removeAttribute(Lt):Mi&&Te[Lt]?Ci.setAttributeNS(Te[Lt],Lt,jn):Ci.setAttribute(Lt,jn)}}function xo(Lt,bn,jn,Ci,Mi){var Ki=!1,bt=(448&bn)>0;for(var gn in bt&&(Ki=$n(jn))&&function hn(Lt,bn,jn){64&Lt?function ri(Lt,bn){Tt(bn.type)?(At(Lt,"change",wt),At(Lt,"click",En)):At(Lt,"input",qt)}(bn,jn):256&Lt?function gi(Lt){At(Lt,"change",Bn)}(bn):128&Lt&&function cn(Lt,bn){At(Lt,"input",pt),bn.onChange&&At(Lt,"change",Dt)}(bn,jn)}(bn,Ci,jn),jn)mo(gn,null,jn[gn],Ci,Mi,Ki,null);bt&&Et(bn,Lt,Ci,jn,!0,Ki)}function vr(Lt,bn,jn){var Ci=ge(Lt.render(bn,Lt.state,jn)),Mi=jn;return f(Lt.getChildContext)&&(Mi=c(jn,Lt.getChildContext())),Lt.$CX=Mi,Ci}function rn(Lt,bn,jn,Ci,Mi,Ki){var bt=new bn(jn,Ci),gn=bt.$N=!(!bn.getDerivedStateFromProps&&!bt.getSnapshotBeforeUpdate);if(bt.$SVG=Mi,bt.$L=Ki,Lt.children=bt,bt.$BS=!1,bt.context=Ci,bt.props===u&&(bt.props=jn),gn)bt.state=U(bt,jn,bt.state);else if(f(bt.componentWillMount)){bt.$BR=!0,bt.componentWillMount();var Kt=bt.$PS;if(!y(Kt)){var Mn=bt.state;if(y(Mn))bt.state=Kt;else for(var _i in Kt)Mn[_i]=Kt[_i];bt.$PS=null}bt.$BR=!1}return bt.$LI=vr(bt,jn,Ci),bt}function en(Lt,bn){var jn=Lt.props||u;return 32768&Lt.flags?Lt.type.render(jn,Lt.ref,bn):Lt.type(jn,bn)}function Zn(Lt,bn,jn,Ci,Mi,Ki){var bt=Lt.flags|=16384;481&bt?Xo(Lt,bn,jn,Ci,Mi,Ki):4&bt?function ui(Lt,bn,jn,Ci,Mi,Ki){var bt=rn(Lt,Lt.type,Lt.props||u,jn,Ci,Ki);Zn(bt.$LI,bn,bt.$CX,Ci,Mi,Ki),Wi(Lt.ref,bt,Ki)}(Lt,bn,jn,Ci,Mi,Ki):8&bt?(function bi(Lt,bn,jn,Ci,Mi,Ki){Zn(Lt.children=ge(en(Lt,jn)),bn,jn,Ci,Mi,Ki)}(Lt,bn,jn,Ci,Mi,Ki),Zo(Lt,Ki)):512&bt||16&bt?nr(Lt,bn,Mi):8192&bt?function po(Lt,bn,jn,Ci,Mi,Ki){var bt=Lt.children,gn=Lt.childFlags;12&gn&&0===bt.length&&(gn=Lt.childFlags=2,bt=Lt.children=be()),2===gn?Zn(bt,jn,bn,Ci,Mi,Ki):Hn(bt,jn,bn,Ci,Mi,Ki)}(Lt,jn,bn,Ci,Mi,Ki):1024&bt&&function Di(Lt,bn,jn,Ci,Mi){Zn(Lt.children,Lt.ref,bn,!1,null,Mi);var Ki=be();nr(Ki,jn,Ci),Lt.dom=Ki.dom}(Lt,jn,bn,Mi,Ki)}function nr(Lt,bn,jn){var Ci=Lt.dom=document.createTextNode(Lt.children);y(bn)||x(bn,Ci,jn)}function Xo(Lt,bn,jn,Ci,Mi,Ki){var bt=Lt.flags,gn=Lt.props,Kt=Lt.className,Mn=Lt.childFlags,_i=Lt.dom=function w(Lt,bn){return bn?document.createElementNS("http://www.w3.org/2000/svg",Lt):document.createElement(Lt)}(Lt.type,Ci=Ci||(32&bt)>0),Qi=Lt.children;if(!P(Kt)&&""!==Kt&&(Ci?_i.setAttribute("class",Kt):_i.className=Kt),16===Mn)J(_i,Qi);else if(1!==Mn){var Co=Ci&&"foreignObject"!==Lt.type;2===Mn?(16384&Qi.flags&&(Lt.children=Qi=ue(Qi)),Zn(Qi,_i,jn,Co,null,Ki)):(8===Mn||4===Mn)&&Hn(Qi,_i,jn,Co,null,Ki)}y(bn)||x(bn,_i,Mi),y(gn)||xo(Lt,bt,gn,_i,Ci),on(Lt.ref,_i,Ki)}function Hn(Lt,bn,jn,Ci,Mi,Ki){for(var bt=0;bt<Lt.length;++bt){var gn=Lt[bt];16384&gn.flags&&(Lt[bt]=gn=ue(gn)),Zn(gn,bn,jn,Ci,Mi,Ki)}}function Wi(Lt,bn,jn){on(Lt,bn,jn),f(bn.componentDidMount)&&jn.push(function ao(Lt){return function(){Lt.componentDidMount()}}(bn))}function Zo(Lt,bn){var jn=Lt.ref;P(jn)||(q(jn.onComponentWillMount,Lt.props||u),f(jn.onComponentDidMount)&&bn.push(function Ko(Lt,bn){return function(){Lt.onComponentDidMount(N(bn,!0),bn.props||u)}}(jn,Lt)))}function hr(Lt,bn,jn,Ci,Mi,Ki,bt){var gn=bn.flags|=16384;Lt.flags!==gn||Lt.type!==bn.type||Lt.key!==bn.key||2048&gn?16384&Lt.flags?function xr(Lt,bn,jn,Ci,Mi,Ki){It(Lt),bn.flags&Lt.flags&2033?(Zn(bn,null,Ci,Mi,null,Ki),function D(Lt,bn,jn){Lt.replaceChild(bn,jn)}(jn,bn.dom,Lt.dom)):(Zn(bn,jn,Ci,Mi,N(Lt,!0),Ki),G(Lt,jn))}(Lt,bn,jn,Ci,Mi,bt):Zn(bn,jn,Ci,Mi,Ki,bt):481&gn?function lo(Lt,bn,jn,Ci,Mi,Ki){var Qi,bt=bn.dom=Lt.dom,gn=Lt.props,Kt=bn.props,Mn=!1,_i=!1;if(Ci=Ci||(32&Mi)>0,gn!==Kt){var Co=gn||u;if((Qi=Kt||u)!==u)for(var $o in(Mn=(448&Mi)>0)&&(_i=$n(Qi)),Qi){var sr=Co[$o],lr=Qi[$o];sr!==lr&&mo($o,sr,lr,bt,Ci,_i,Lt)}if(Co!==u)for(var rr in Co)P(Qi[rr])&&!P(Co[rr])&&mo(rr,Co[rr],null,bt,Ci,_i,Lt)}var Pr=bn.children,wr=bn.className;Lt.className!==wr&&(P(wr)?bt.removeAttribute("class"):Ci?bt.setAttribute("class",wr):bt.className=wr),4096&Mi?function mn(Lt,bn){Lt.textContent!==bn&&(Lt.textContent=bn)}(bt,Pr):Jo(Lt.childFlags,bn.childFlags,Lt.children,Pr,bt,jn,Ci&&"foreignObject"!==bn.type,null,Lt,Ki),Mn&&Et(Mi,bn,bt,Qi,!1,_i);var Fo=bn.ref,os=Lt.ref;os!==Fo&&(Gt(os),on(Fo,bt,Ki))}(Lt,bn,Ci,Mi,gn,bt):4&gn?function Yn(Lt,bn,jn,Ci,Mi,Ki,bt){var gn=bn.children=Lt.children;if(!y(gn)){gn.$L=bt;var Kt=bn.props||u,Mn=bn.ref,_i=Lt.ref,Qi=gn.state;if(!gn.$N){if(f(gn.componentWillReceiveProps)){if(gn.$BR=!0,gn.componentWillReceiveProps(Kt,Ci),gn.$UN)return;gn.$BR=!1}y(gn.$PS)||(Qi=c(Qi,gn.$PS),gn.$PS=null)}Gr(gn,Qi,Kt,jn,Ci,Mi,!1,Ki,bt),_i!==Mn&&(Gt(_i),on(Mn,gn,bt))}}(Lt,bn,jn,Ci,Mi,Ki,bt):8&gn?function ei(Lt,bn,jn,Ci,Mi,Ki,bt){var gn=!0,Kt=bn.props||u,Mn=bn.ref,_i=Lt.props,Qi=!P(Mn),Co=Lt.children;if(Qi&&f(Mn.onComponentShouldUpdate)&&(gn=Mn.onComponentShouldUpdate(_i,Kt)),!1!==gn){Qi&&f(Mn.onComponentWillUpdate)&&Mn.onComponentWillUpdate(_i,Kt);var $o=ge(en(bn,Ci));hr(Co,$o,jn,Ci,Mi,Ki,bt),bn.children=$o,Qi&&f(Mn.onComponentDidUpdate)&&Mn.onComponentDidUpdate(_i,Kt)}else bn.children=Co}(Lt,bn,jn,Ci,Mi,Ki,bt):16&gn?function Ii(Lt,bn){var jn=bn.children,Ci=bn.dom=Lt.dom;jn!==Lt.children&&(Ci.nodeValue=jn)}(Lt,bn):512&gn?bn.dom=Lt.dom:8192&gn?function pi(Lt,bn,jn,Ci,Mi,Ki){var bt=Lt.children,gn=bn.children,Kt=Lt.childFlags,Mn=bn.childFlags,_i=null;12&Mn&&0===gn.length&&(Mn=bn.childFlags=2,gn=bn.children=be());var Qi=!!(2&Mn);if(12&Kt){var Co=bt.length;(8&Kt&&8&Mn||Qi||!Qi&&gn.length>Co)&&(_i=N(bt[Co-1],!1).nextSibling)}Jo(Kt,Mn,bt,gn,jn,Ci,Mi,_i,Lt,Ki)}(Lt,bn,jn,Ci,Mi,bt):function Ti(Lt,bn,jn,Ci){var Mi=Lt.ref,Ki=bn.ref,bt=bn.children;if(Jo(Lt.childFlags,bn.childFlags,Lt.children,bt,Mi,jn,!1,null,Lt,Ci),bn.dom=Lt.dom,Mi!==Ki&&!b(bt)){var gn=bt.dom;C(Mi,gn),_(Ki,gn)}}(Lt,bn,Ci,bt)}function Jo(Lt,bn,jn,Ci,Mi,Ki,bt,gn,Kt,Mn){switch(Lt){case 2:switch(bn){case 2:hr(jn,Ci,Mi,Ki,bt,gn,Mn);break;case 1:sn(jn,Mi);break;case 16:It(jn),J(Mi,Ci);break;default:!function Eo(Lt,bn,jn,Ci,Mi,Ki){It(Lt),Hn(bn,jn,Ci,Mi,N(Lt,!0),Ki),G(Lt,jn)}(jn,Ci,Mi,Ki,bt,Mn)}break;case 1:switch(bn){case 2:Zn(Ci,Mi,Ki,bt,gn,Mn);break;case 1:break;case 16:J(Mi,Ci);break;default:Hn(Ci,Mi,Ki,bt,gn,Mn)}break;case 16:switch(bn){case 16:!function Rt(Lt,bn,jn){Lt!==bn&&(""!==Lt?jn.firstChild.nodeValue=bn:J(jn,bn))}(jn,Ci,Mi);break;case 2:zt(Mi),Zn(Ci,Mi,Ki,bt,gn,Mn);break;case 1:zt(Mi);break;default:zt(Mi),Hn(Ci,Mi,Ki,bt,gn,Mn)}break;default:switch(bn){case 16:Ot(jn),J(Mi,Ci);break;case 2:un(Mi,Kt,jn),Zn(Ci,Mi,Ki,bt,gn,Mn);break;case 1:un(Mi,Kt,jn);break;default:var _i=0|jn.length,Qi=0|Ci.length;0===_i?Qi>0&&Hn(Ci,Mi,Ki,bt,gn,Mn):0===Qi?un(Mi,Kt,jn):8===bn&&8===Lt?function ko(Lt,bn,jn,Ci,Mi,Ki,bt,gn,Kt,Mn){var lr,rr,_i=Ki-1,Qi=bt-1,Co=0,$o=Lt[Co],sr=bn[Co];e:{for(;$o.key===sr.key;){if(16384&sr.flags&&(bn[Co]=sr=ue(sr)),hr($o,sr,jn,Ci,Mi,gn,Mn),Lt[Co]=sr,++Co>_i||Co>Qi)break e;$o=Lt[Co],sr=bn[Co]}for($o=Lt[_i],sr=bn[Qi];$o.key===sr.key;){if(16384&sr.flags&&(bn[Qi]=sr=ue(sr)),hr($o,sr,jn,Ci,Mi,gn,Mn),Lt[_i]=sr,Qi--,Co>--_i||Co>Qi)break e;$o=Lt[_i],sr=bn[Qi]}}if(Co>_i){if(Co<=Qi)for(rr=(lr=Qi+1)<bt?N(bn[lr],!0):gn;Co<=Qi;)16384&(sr=bn[Co]).flags&&(bn[Co]=sr=ue(sr)),++Co,Zn(sr,jn,Ci,Mi,rr,Mn)}else if(Co>Qi)for(;Co<=_i;)sn(Lt[Co++],jn);else!function er(Lt,bn,jn,Ci,Mi,Ki,bt,gn,Kt,Mn,_i,Qi,Co){var $o,sr,lr,rr=0,Pr=gn,wr=gn,Fo=Ki-gn+1,os=bt-gn+1,fs=new Int32Array(os+1),js=Fo===Ci,Ta=!1,es=0,gs=0;if(Mi<4||(Fo|os)<32)for(rr=Pr;rr<=Ki;++rr)if($o=Lt[rr],gs<os){for(gn=wr;gn<=bt;gn++)if($o.key===(sr=bn[gn]).key){if(fs[gn-wr]=rr+1,js)for(js=!1;Pr<rr;)sn(Lt[Pr++],Kt);es>gn?Ta=!0:es=gn,16384&sr.flags&&(bn[gn]=sr=ue(sr)),hr($o,sr,Kt,jn,Mn,_i,Co),++gs;break}!js&&gn>bt&&sn($o,Kt)}else js||sn($o,Kt);else{var Ca={};for(rr=wr;rr<=bt;++rr)Ca[bn[rr].key]=rr;for(rr=Pr;rr<=Ki;++rr)if($o=Lt[rr],gs<os)if(void 0!==(gn=Ca[$o.key])){if(js)for(js=!1;rr>Pr;)sn(Lt[Pr++],Kt);fs[gn-wr]=rr+1,es>gn?Ta=!0:es=gn,16384&(sr=bn[gn]).flags&&(bn[gn]=sr=ue(sr)),hr($o,sr,Kt,jn,Mn,_i,Co),++gs}else js||sn($o,Kt);else js||sn($o,Kt)}if(js)un(Kt,Qi,Lt),Hn(bn,Kt,jn,Mn,_i,Co);else if(Ta){var Ga=function Xr(Lt){var bn=0,jn=0,Ci=0,Mi=0,Ki=0,bt=0,gn=0,Kt=Lt.length;for(Kt>Wr&&(Wr=Kt,or=new Int32Array(Kt),Jr=new Int32Array(Kt));jn<Kt;++jn)if(0!==(bn=Lt[jn])){if(Lt[Ci=or[Mi]]<bn){Jr[jn]=Ci,or[++Mi]=jn;continue}for(Ki=0,bt=Mi;Ki<bt;)Lt[or[gn=Ki+bt>>1]]<bn?Ki=gn+1:bt=gn;bn<Lt[or[Ki]]&&(Ki>0&&(Jr[jn]=or[Ki-1]),or[Ki]=jn)}Ki=Mi+1;var Mn=new Int32Array(Ki);for(bt=or[Ki-1];Ki-- >0;)Mn[Ki]=bt,bt=Jr[bt],or[Ki]=0;return Mn}(fs);for(gn=Ga.length-1,rr=os-1;rr>=0;rr--)0===fs[rr]?(16384&(sr=bn[es=rr+wr]).flags&&(bn[es]=sr=ue(sr)),Zn(sr,Kt,jn,Mn,(lr=es+1)<Mi?N(bn[lr],!0):_i,Co)):gn<0||rr!==Ga[gn]?k(sr=bn[es=rr+wr],Kt,(lr=es+1)<Mi?N(bn[lr],!0):_i):gn--}else if(gs!==os)for(rr=os-1;rr>=0;rr--)0===fs[rr]&&(16384&(sr=bn[es=rr+wr]).flags&&(bn[es]=sr=ue(sr)),Zn(sr,Kt,jn,Mn,(lr=es+1)<Mi?N(bn[lr],!0):_i,Co))}(Lt,bn,Ci,Ki,bt,_i,Qi,Co,jn,Mi,gn,Kt,Mn)}(jn,Ci,Mi,Ki,bt,_i,Qi,gn,Kt,Mn):function co(Lt,bn,jn,Ci,Mi,Ki,bt,gn,Kt){for(var Qi,Co,Mn=Ki>bt?bt:Ki,_i=0;_i<Mn;++_i)Co=Lt[_i],16384&(Qi=bn[_i]).flags&&(Qi=bn[_i]=ue(Qi)),hr(Co,Qi,jn,Ci,Mi,gn,Kt),Lt[_i]=Qi;if(Ki<bt)for(_i=Mn;_i<bt;++_i)16384&(Qi=bn[_i]).flags&&(Qi=bn[_i]=ue(Qi)),Zn(Qi,jn,Ci,Mi,gn,Kt);else if(Ki>bt)for(_i=Mn;_i<Ki;++_i)sn(Lt[_i],jn)}(jn,Ci,Mi,Ki,bt,_i,Qi,gn,Mn)}}}function Gr(Lt,bn,jn,Ci,Mi,Ki,bt,gn,Kt){var Mn=Lt.state,_i=Lt.props,Qi=!!Lt.$N,Co=f(Lt.shouldComponentUpdate);if(Qi&&(bn=U(Lt,jn,bn!==Mn?c(Mn,bn):bn)),bt||!Co||Co&&Lt.shouldComponentUpdate(jn,bn,Mi)){!Qi&&f(Lt.componentWillUpdate)&&Lt.componentWillUpdate(jn,bn,Mi),Lt.props=jn,Lt.state=bn,Lt.context=Mi;var $o=null,sr=vr(Lt,jn,Mi);Qi&&f(Lt.getSnapshotBeforeUpdate)&&($o=Lt.getSnapshotBeforeUpdate(_i,Mn)),hr(Lt.$LI,sr,Ci,Lt.$CX,Ki,gn,Kt),Lt.$LI=sr,f(Lt.componentDidUpdate)&&function fr(Lt,bn,jn,Ci,Mi){Mi.push(function(){Lt.componentDidUpdate(bn,jn,Ci)})}(Lt,_i,Mn,$o,Kt)}else Lt.props=jn,Lt.state=bn,Lt.context=Mi}var or,Jr,Wr=0;function an(Lt,bn,jn,Ci){void 0===jn&&(jn=null),void 0===Ci&&(Ci=u),function dn(Lt,bn,jn,Ci){var Mi=[],Ki=bn.$V;B.v=!0,P(Ki)?P(Lt)||(16384&Lt.flags&&(Lt=ue(Lt)),Zn(Lt,bn,Ci,!1,null,Mi),bn.$V=Lt,Ki=Lt):P(Lt)?(sn(Ki,bn),bn.$V=null):(16384&Lt.flags&&(Lt=ue(Lt)),hr(Ki,Lt,bn,Ci,!1,null,Mi),Ki=bn.$V=Lt),I(Mi),B.v=!1,f(jn)&&jn(),f(K.renderComplete)&&K.renderComplete(Ki,bn)}(Lt,bn,jn,Ci)}typeof document<"u"&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);var Wt=[],zn=typeof Promise<"u"?Promise.resolve().then.bind(Promise.resolve()):function(Lt){window.setTimeout(Lt,0)},mi=!1;function Si(Lt,bn,jn,Ci){var Mi=Lt.$PS;if(f(bn)&&(bn=bn(Mi?c(Lt.state,Mi):Lt.state,Lt.props,Lt.context)),P(Mi))Lt.$PS=bn;else for(var Ki in bn)Mi[Ki]=bn[Ki];if(Lt.$BR)f(jn)&&Lt.$L.push(jn.bind(Lt));else{if(!B.v&&0===Wt.length)return Sr(Lt,Ci),void(f(jn)&&jn.call(Lt));if(-1===Wt.indexOf(Lt)&&Wt.push(Lt),Ci&&(Lt.$F=!0),mi||(mi=!0,zn(No)),f(jn)){var bt=Lt.$QU;bt||(bt=Lt.$QU=[]),bt.push(jn)}}}function go(Lt){for(var bn=Lt.$QU,jn=0;jn<bn.length;++jn)bn[jn].call(Lt);Lt.$QU=null}function No(){var Lt;for(mi=!1;Lt=Wt.shift();)if(!Lt.$UN){var bn=Lt.$F;Lt.$F=!1,Sr(Lt,bn),Lt.$QU&&go(Lt)}}function Sr(Lt,bn){if(bn||!Lt.$BR){var jn=Lt.$PS;Lt.$PS=null;var Ci=[];B.v=!0,Gr(Lt,c(Lt.state,jn),Lt.props,N(Lt.$LI,!0).parentNode,Lt.context,Lt.$SVG,bn,null,Ci),I(Ci),B.v=!1}else Lt.state=Lt.$PS,Lt.$PS=null}var pr=function(bn,jn){this.state=null,this.$BR=!1,this.$BS=!0,this.$PS=null,this.$LI=null,this.$UN=!1,this.$CX=null,this.$QU=null,this.$N=!1,this.$L=null,this.$SVG=!1,this.$F=!1,this.props=bn||u,this.context=jn||u};pr.prototype.forceUpdate=function(bn){this.$UN||Si(this,{},bn,!0)},pr.prototype.setState=function(bn,jn){this.$UN||this.$BS||Si(this,bn,jn,!1)},pr.prototype.render=function(bn,jn,Ci){return null}},8322:In=>{In.exports=function Ze(M,W,o){function P(S,T){if(!W[S]){if(!M[S]){if(b)return b(S,!0);var d=new Error("Cannot find module '"+S+"'");throw d.code="MODULE_NOT_FOUND",d}var c=W[S]={exports:{}};M[S][0].call(c.exports,function(s){return P(M[S][1][s]||s)},c,c.exports,Ze,M,W,o)}return W[S].exports}for(var b=void 0,f=0;f<o.length;f++)P(o[f]);return P}({1:[function(Ze,M,W){"use strict";var o=Ze("./utils"),P=Ze("./support"),b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";W.encode=function(f){for(var S,T,y,c,s,a,u=[],h=0,g=f.length,_=g,x="string"!==o.getTypeOf(f);h<f.length;)_=g-h,y=x?(S=f[h++],T=h<g?f[h++]:0,h<g?f[h++]:0):(S=f.charCodeAt(h++),T=h<g?f.charCodeAt(h++):0,h<g?f.charCodeAt(h++):0),c=(3&S)<<4|T>>4,s=1<_?(15&T)<<2|y>>6:64,a=2<_?63&y:64,u.push(b.charAt(S>>2)+b.charAt(c)+b.charAt(s)+b.charAt(a));return u.join("")},W.decode=function(f){var S,T,y,d,c,s,a=0,u=0,h="data:";if(f.substr(0,5)===h)throw new Error("Invalid base64 input, it looks like a data url.");var g,_=3*(f=f.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(f.charAt(f.length-1)===b.charAt(64)&&_--,f.charAt(f.length-2)===b.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=P.uint8array?new Uint8Array(0|_):new Array(0|_);a<f.length;)S=b.indexOf(f.charAt(a++))<<2|(d=b.indexOf(f.charAt(a++)))>>4,T=(15&d)<<4|(c=b.indexOf(f.charAt(a++)))>>2,y=(3&c)<<6|(s=b.indexOf(f.charAt(a++))),g[u++]=S,64!==c&&(g[u++]=T),64!==s&&(g[u++]=y);return g}},{"./support":30,"./utils":32}],2:[function(Ze,M,W){"use strict";var o=Ze("./external"),P=Ze("./stream/DataWorker"),b=Ze("./stream/Crc32Probe"),f=Ze("./stream/DataLengthProbe");function S(T,y,d,c,s){this.compressedSize=T,this.uncompressedSize=y,this.crc32=d,this.compression=c,this.compressedContent=s}S.prototype={getContentWorker:function(){var T=new P(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new f("data_length")),y=this;return T.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),T},getCompressedWorker:function(){return new P(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},S.createWorkerFrom=function(T,y,d){return T.pipe(new b).pipe(new f("uncompressedSize")).pipe(y.compressWorker(d)).pipe(new f("compressedSize")).withStreamInfo("compression",y)},M.exports=S},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(Ze,M,W){"use strict";var o=Ze("./stream/GenericWorker");W.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},W.DEFLATE=Ze("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(Ze,M,W){"use strict";var o=Ze("./utils"),P=function(){for(var b,f=[],S=0;S<256;S++){b=S;for(var T=0;T<8;T++)b=1&b?3988292384^b>>>1:b>>>1;f[S]=b}return f}();M.exports=function(b,f){return void 0!==b&&b.length?"string"!==o.getTypeOf(b)?function(S,T,y,d){var c=P,s=0+y;S^=-1;for(var a=0;a<s;a++)S=S>>>8^c[255&(S^T[a])];return~S}(0|f,b,b.length):function(S,T,y,d){var c=P,s=0+y;S^=-1;for(var a=0;a<s;a++)S=S>>>8^c[255&(S^T.charCodeAt(a))];return~S}(0|f,b,b.length):0}},{"./utils":32}],5:[function(Ze,M,W){"use strict";W.base64=!1,W.binary=!1,W.dir=!1,W.createFolders=!0,W.date=null,W.compression=null,W.compressionOptions=null,W.comment=null,W.unixPermissions=null,W.dosPermissions=null},{}],6:[function(Ze,M,W){"use strict";var o;o=typeof Promise<"u"?Promise:Ze("lie"),M.exports={Promise:o}},{lie:37}],7:[function(Ze,M,W){"use strict";var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",P=Ze("pako"),b=Ze("./utils"),f=Ze("./stream/GenericWorker"),S=o?"uint8array":"array";function T(y,d){f.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=d,this.meta={}}W.magic="\b\0",b.inherits(T,f),T.prototype.processChunk=function(y){this.meta=y.meta,null===this._pako&&this._createPako(),this._pako.push(b.transformTo(S,y.data),!1)},T.prototype.flush=function(){f.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},T.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this._pako=null},T.prototype._createPako=function(){this._pako=new P[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(d){y.push({data:d,meta:y.meta})}},W.compressWorker=function(y){return new T("Deflate",y)},W.uncompressWorker=function(){return new T("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(Ze,M,W){"use strict";function o(c,s){var a,u="";for(a=0;a<s;a++)u+=String.fromCharCode(255&c),c>>>=8;return u}function P(c,s,a,u,h,g){var _,x,w=c.file,D=c.compression,C=g!==S.utf8encode,I=b.transformTo("string",g(w.name)),L=b.transformTo("string",S.utf8encode(w.name)),N=w.comment,G=b.transformTo("string",g(N)),k=b.transformTo("string",S.utf8encode(N)),U=L.length!==w.name.length,B=k.length!==N.length,K="",J="",ie="",re=w.dir,q=w.date,Y={crc32:0,compressedSize:0,uncompressedSize:0};s&&!a||(Y.crc32=c.crc32,Y.compressedSize=c.compressedSize,Y.uncompressedSize=c.uncompressedSize);var Z=0;s&&(Z|=8),C||!U&&!B||(Z|=2048);var z,ae,Q=0,te=0;re&&(Q|=16),"UNIX"===h?(te=798,Q|=(ae=z=w.unixPermissions,z||(ae=re?16893:33204),(65535&ae)<<16)):(te=20,Q|=function(z){return 63&(z||0)}(w.dosPermissions)),_=q.getUTCHours(),_<<=6,_|=q.getUTCMinutes(),_<<=5,_|=q.getUTCSeconds()/2,x=q.getUTCFullYear()-1980,x<<=4,x|=q.getUTCMonth()+1,x<<=5,x|=q.getUTCDate(),U&&(J=o(1,1)+o(T(I),4)+L,K+="up"+o(J.length,2)+J),B&&(ie=o(1,1)+o(T(G),4)+k,K+="uc"+o(ie.length,2)+ie);var pe="";return pe+="\n\0",pe+=o(Z,2),pe+=D.magic,pe+=o(_,2),pe+=o(x,2),pe+=o(Y.crc32,4),pe+=o(Y.compressedSize,4),pe+=o(Y.uncompressedSize,4),pe+=o(I.length,2),pe+=o(K.length,2),{fileRecord:y.LOCAL_FILE_HEADER+pe+I+K,dirRecord:y.CENTRAL_FILE_HEADER+o(te,2)+pe+o(G.length,2)+"\0\0\0\0"+o(Q,4)+o(u,4)+I+K+G}}var b=Ze("../utils"),f=Ze("../stream/GenericWorker"),S=Ze("../utf8"),T=Ze("../crc32"),y=Ze("../signature");function d(c,s,a,u){f.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=s,this.zipPlatform=a,this.encodeFileName=u,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}b.inherits(d,f),d.prototype.push=function(c){var s=c.meta.percent||0,a=this.entriesCount,u=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,f.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:a?(s+100*(a-u-1))/a:100}}))},d.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var s=this.streamFiles&&!c.file.dir;if(s){var a=P(c,s,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:a.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(c){this.accumulate=!1;var u,s=this.streamFiles&&!c.file.dir,a=P(c,s,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(a.dirRecord),s)this.push({data:(u=c,y.DATA_DESCRIPTOR+o(u.crc32,4)+o(u.compressedSize,4)+o(u.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:a.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var c=this.bytesWritten,s=0;s<this.dirRecords.length;s++)this.push({data:this.dirRecords[s],meta:{percent:100}});var h,g,_,D,u=(h=this.dirRecords.length,g=this.bytesWritten-c,_=c,D=b.transformTo("string",(0,this.encodeFileName)(this.zipComment)),y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(h,2)+o(h,2)+o(g,4)+o(_,4)+o(D.length,2)+D);this.push({data:u,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(c){this._sources.push(c);var s=this;return c.on("data",function(a){s.processChunk(a)}),c.on("end",function(){s.closedSource(s.previous.streamInfo),s._sources.length?s.prepareNextSource():s.end()}),c.on("error",function(a){s.error(a)}),this},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(c){var s=this._sources;if(!f.prototype.error.call(this,c))return!1;for(var a=0;a<s.length;a++)try{s[a].error(c)}catch{}return!0},d.prototype.lock=function(){f.prototype.lock.call(this);for(var c=this._sources,s=0;s<c.length;s++)c[s].lock()},M.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(Ze,M,W){"use strict";var o=Ze("../compressions"),P=Ze("./ZipFileWorker");W.generateWorker=function(b,f,S){var T=new P(f.streamFiles,S,f.platform,f.encodeFileName),y=0;try{b.forEach(function(d,c){y++;var s=function(g,_){var x=g||_,w=o[x];if(!w)throw new Error(x+" is not a valid compression method !");return w}(c.options.compression,f.compression),u=c.dir,h=c.date;c._compressWorker(s,c.options.compressionOptions||f.compressionOptions||{}).withStreamInfo("file",{name:d,dir:u,date:h,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(T)}),T.entriesCount=y}catch(d){T.error(d)}return T}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(Ze,M,W){"use strict";function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var P=new o;for(var b in this)"function"!=typeof this[b]&&(P[b]=this[b]);return P}}(o.prototype=Ze("./object")).loadAsync=Ze("./load"),o.support=Ze("./support"),o.defaults=Ze("./defaults"),o.version="3.10.1",o.loadAsync=function(P,b){return(new o).loadAsync(P,b)},o.external=Ze("./external"),M.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(Ze,M,W){"use strict";var o=Ze("./utils"),P=Ze("./external"),b=Ze("./utf8"),f=Ze("./zipEntries"),S=Ze("./stream/Crc32Probe"),T=Ze("./nodejsUtils");function y(d){return new P.Promise(function(c,s){var a=d.decompressed.getContentWorker().pipe(new S);a.on("error",function(u){s(u)}).on("end",function(){a.streamInfo.crc32!==d.decompressed.crc32?s(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}M.exports=function(d,c){var s=this;return c=o.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:b.utf8decode}),T.isNode&&T.isStream(d)?P.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",d,!0,c.optimizedBinaryString,c.base64).then(function(a){var u=new f(c);return u.load(a),u}).then(function(a){var u=[P.Promise.resolve(a)],h=a.files;if(c.checkCRC32)for(var g=0;g<h.length;g++)u.push(y(h[g]));return P.Promise.all(u)}).then(function(a){for(var u=a.shift(),h=u.files,g=0;g<h.length;g++){var _=h[g],x=_.fileNameStr,w=o.resolve(_.fileNameStr);s.file(w,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:c.createFolders}),_.dir||(s.file(w).unsafeOriginalName=x)}return u.zipComment.length&&(s.comment=u.zipComment),s})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(Ze,M,W){"use strict";var o=Ze("../utils"),P=Ze("../stream/GenericWorker");function b(f,S){P.call(this,"Nodejs stream input adapter for "+f),this._upstreamEnded=!1,this._bindStream(S)}o.inherits(b,P),b.prototype._bindStream=function(f){var S=this;(this._stream=f).pause(),f.on("data",function(T){S.push({data:T,meta:{percent:0}})}).on("error",function(T){S.isPaused?this.generatedError=T:S.error(T)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},b.prototype.pause=function(){return!!P.prototype.pause.call(this)&&(this._stream.pause(),!0)},b.prototype.resume=function(){return!!P.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},M.exports=b},{"../stream/GenericWorker":28,"../utils":32}],13:[function(Ze,M,W){"use strict";var o=Ze("readable-stream").Readable;function P(b,f,S){o.call(this,f),this._helper=b;var T=this;b.on("data",function(y,d){T.push(y)||T._helper.pause(),S&&S(d)}).on("error",function(y){T.emit("error",y)}).on("end",function(){T.push(null)})}Ze("../utils").inherits(P,o),P.prototype._read=function(){this._helper.resume()},M.exports=P},{"../utils":32,"readable-stream":16}],14:[function(Ze,M,W){"use strict";M.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,P){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,P);if("number"==typeof o)throw new Error('The "data" argument must not be a number');return new Buffer(o,P)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var P=new Buffer(o);return P.fill(0),P},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&"function"==typeof o.on&&"function"==typeof o.pause&&"function"==typeof o.resume}}},{}],15:[function(Ze,M,W){"use strict";function o(w,D,C){var I,L=b.getTypeOf(D),N=b.extend(C||{},T);N.date=N.date||new Date,null!==N.compression&&(N.compression=N.compression.toUpperCase()),"string"==typeof N.unixPermissions&&(N.unixPermissions=parseInt(N.unixPermissions,8)),N.unixPermissions&&16384&N.unixPermissions&&(N.dir=!0),N.dosPermissions&&16&N.dosPermissions&&(N.dir=!0),N.dir&&(w=h(w)),N.createFolders&&(I=u(w))&&g.call(this,I,!0),C&&void 0!==C.binary||(N.binary=!("string"===L&&!1===N.binary&&!1===N.base64)),(D instanceof y&&0===D.uncompressedSize||N.dir||!D||0===D.length)&&(N.base64=!1,N.binary=!0,D="",N.compression="STORE",L="string");var k;k=D instanceof y||D instanceof f?D:s.isNode&&s.isStream(D)?new a(w,D):b.prepareContent(w,D,N.binary,N.optimizedBinaryString,N.base64);var U=new d(w,k,N);this.files[w]=U}var P=Ze("./utf8"),b=Ze("./utils"),f=Ze("./stream/GenericWorker"),S=Ze("./stream/StreamHelper"),T=Ze("./defaults"),y=Ze("./compressedObject"),d=Ze("./zipObject"),c=Ze("./generate"),s=Ze("./nodejsUtils"),a=Ze("./nodejs/NodejsStreamInputAdapter"),u=function(w){"/"===w.slice(-1)&&(w=w.substring(0,w.length-1));var D=w.lastIndexOf("/");return 0<D?w.substring(0,D):""},h=function(w){return"/"!==w.slice(-1)&&(w+="/"),w},g=function(w,D){return D=void 0!==D?D:T.createFolders,w=h(w),this.files[w]||o.call(this,w,null,{dir:!0,createFolders:D}),this.files[w]};function _(w){return"[object RegExp]"===Object.prototype.toString.call(w)}var x={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(w){var D,C,I;for(D in this.files)I=this.files[D],(C=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&w(C,I)},filter:function(w){var D=[];return this.forEach(function(C,I){w(C,I)&&D.push(I)}),D},file:function(w,D,C){if(1!==arguments.length)return o.call(this,w=this.root+w,D,C),this;if(_(w)){var I=w;return this.filter(function(N,G){return!G.dir&&I.test(N)})}var L=this.files[this.root+w];return L&&!L.dir?L:null},folder:function(w){if(!w)return this;if(_(w))return this.filter(function(L,N){return N.dir&&w.test(L)});var C=g.call(this,this.root+w),I=this.clone();return I.root=C.name,I},remove:function(w){var D=this.files[w=this.root+w];if(D||("/"!==w.slice(-1)&&(w+="/"),D=this.files[w]),D&&!D.dir)delete this.files[w];else for(var C=this.filter(function(L,N){return N.name.slice(0,w.length)===w}),I=0;I<C.length;I++)delete this.files[C[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(w){var D,C={};try{if((C=b.extend(w||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:P.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),"binarystring"===C.type&&(C.type="string"),!C.type)throw new Error("No output type specified.");b.checkSupport(C.type),"darwin"!==C.platform&&"freebsd"!==C.platform&&"linux"!==C.platform&&"sunos"!==C.platform||(C.platform="UNIX"),"win32"===C.platform&&(C.platform="DOS"),D=c.generateWorker(this,C,C.comment||this.comment||"")}catch(L){(D=new f("error")).error(L)}return new S(D,C.type||"string",C.mimeType)},generateAsync:function(w,D){return this.generateInternalStream(w).accumulate(D)},generateNodeStream:function(w,D){return(w=w||{}).type||(w.type="nodebuffer"),this.generateInternalStream(w).toNodejsStream(D)}};M.exports=x},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(Ze,M,W){"use strict";M.exports=Ze("stream")},{stream:void 0}],17:[function(Ze,M,W){"use strict";var o=Ze("./DataReader");function P(b){o.call(this,b);for(var f=0;f<this.data.length;f++)b[f]=255&b[f]}Ze("../utils").inherits(P,o),P.prototype.byteAt=function(b){return this.data[this.zero+b]},P.prototype.lastIndexOfSignature=function(b){for(var f=b.charCodeAt(0),S=b.charCodeAt(1),T=b.charCodeAt(2),y=b.charCodeAt(3),d=this.length-4;0<=d;--d)if(this.data[d]===f&&this.data[d+1]===S&&this.data[d+2]===T&&this.data[d+3]===y)return d-this.zero;return-1},P.prototype.readAndCheckSignature=function(b){var f=b.charCodeAt(0),S=b.charCodeAt(1),T=b.charCodeAt(2),y=b.charCodeAt(3),d=this.readData(4);return f===d[0]&&S===d[1]&&T===d[2]&&y===d[3]},P.prototype.readData=function(b){if(this.checkOffset(b),0===b)return[];var f=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,f},M.exports=P},{"../utils":32,"./DataReader":18}],18:[function(Ze,M,W){"use strict";var o=Ze("../utils");function P(b){this.data=b,this.length=b.length,this.index=0,this.zero=0}P.prototype={checkOffset:function(b){this.checkIndex(this.index+b)},checkIndex:function(b){if(this.length<this.zero+b||b<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+b+"). Corrupted zip ?")},setIndex:function(b){this.checkIndex(b),this.index=b},skip:function(b){this.setIndex(this.index+b)},byteAt:function(){},readInt:function(b){var f,S=0;for(this.checkOffset(b),f=this.index+b-1;f>=this.index;f--)S=(S<<8)+this.byteAt(f);return this.index+=b,S},readString:function(b){return o.transformTo("string",this.readData(b))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var b=this.readInt(4);return new Date(Date.UTC(1980+(b>>25&127),(b>>21&15)-1,b>>16&31,b>>11&31,b>>5&63,(31&b)<<1))}},M.exports=P},{"../utils":32}],19:[function(Ze,M,W){"use strict";var o=Ze("./Uint8ArrayReader");function P(b){o.call(this,b)}Ze("../utils").inherits(P,o),P.prototype.readData=function(b){this.checkOffset(b);var f=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,f},M.exports=P},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(Ze,M,W){"use strict";var o=Ze("./DataReader");function P(b){o.call(this,b)}Ze("../utils").inherits(P,o),P.prototype.byteAt=function(b){return this.data.charCodeAt(this.zero+b)},P.prototype.lastIndexOfSignature=function(b){return this.data.lastIndexOf(b)-this.zero},P.prototype.readAndCheckSignature=function(b){return b===this.readData(4)},P.prototype.readData=function(b){this.checkOffset(b);var f=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,f},M.exports=P},{"../utils":32,"./DataReader":18}],21:[function(Ze,M,W){"use strict";var o=Ze("./ArrayReader");function P(b){o.call(this,b)}Ze("../utils").inherits(P,o),P.prototype.readData=function(b){if(this.checkOffset(b),0===b)return new Uint8Array(0);var f=this.data.subarray(this.zero+this.index,this.zero+this.index+b);return this.index+=b,f},M.exports=P},{"../utils":32,"./ArrayReader":17}],22:[function(Ze,M,W){"use strict";var o=Ze("../utils"),P=Ze("../support"),b=Ze("./ArrayReader"),f=Ze("./StringReader"),S=Ze("./NodeBufferReader"),T=Ze("./Uint8ArrayReader");M.exports=function(y){var d=o.getTypeOf(y);return o.checkSupport(d),"string"!==d||P.uint8array?"nodebuffer"===d?new S(y):P.uint8array?new T(o.transformTo("uint8array",y)):new b(o.transformTo("array",y)):new f(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(Ze,M,W){"use strict";W.LOCAL_FILE_HEADER="PK\x03\x04",W.CENTRAL_FILE_HEADER="PK\x01\x02",W.CENTRAL_DIRECTORY_END="PK\x05\x06",W.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",W.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",W.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(Ze,M,W){"use strict";var o=Ze("./GenericWorker"),P=Ze("../utils");function b(f){o.call(this,"ConvertWorker to "+f),this.destType=f}P.inherits(b,o),b.prototype.processChunk=function(f){this.push({data:P.transformTo(this.destType,f.data),meta:f.meta})},M.exports=b},{"../utils":32,"./GenericWorker":28}],25:[function(Ze,M,W){"use strict";var o=Ze("./GenericWorker"),P=Ze("../crc32");function b(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}Ze("../utils").inherits(b,o),b.prototype.processChunk=function(f){this.streamInfo.crc32=P(f.data,this.streamInfo.crc32||0),this.push(f)},M.exports=b},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(Ze,M,W){"use strict";var o=Ze("../utils"),P=Ze("./GenericWorker");function b(f){P.call(this,"DataLengthProbe for "+f),this.propName=f,this.withStreamInfo(f,0)}o.inherits(b,P),b.prototype.processChunk=function(f){f&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+f.data.length),P.prototype.processChunk.call(this,f)},M.exports=b},{"../utils":32,"./GenericWorker":28}],27:[function(Ze,M,W){"use strict";var o=Ze("../utils"),P=Ze("./GenericWorker");function b(f){P.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,f.then(function(T){S.dataIsReady=!0,S.data=T,S.max=T&&T.length||0,S.type=o.getTypeOf(T),S.isPaused||S._tickAndRepeat()},function(T){S.error(T)})}o.inherits(b,P),b.prototype.cleanUp=function(){P.prototype.cleanUp.call(this),this.data=null},b.prototype.resume=function(){return!!P.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},b.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},b.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var f=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":f=this.data.substring(this.index,S);break;case"uint8array":f=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":f=this.data.slice(this.index,S)}return this.index=S,this.push({data:f,meta:{percent:this.max?this.index/this.max*100:0}})},M.exports=b},{"../utils":32,"./GenericWorker":28}],28:[function(Ze,M,W){"use strict";function o(P){this.name=P||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(P){this.emit("data",P)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(P){this.emit("error",P)}return!0},error:function(P){return!this.isFinished&&(this.isPaused?this.generatedError=P:(this.isFinished=!0,this.emit("error",P),this.previous&&this.previous.error(P),this.cleanUp()),!0)},on:function(P,b){return this._listeners[P].push(b),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(P,b){if(this._listeners[P])for(var f=0;f<this._listeners[P].length;f++)this._listeners[P][f].call(this,b)},pipe:function(P){return P.registerPrevious(this)},registerPrevious:function(P){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=P.streamInfo,this.mergeStreamInfo(),this.previous=P;var b=this;return P.on("data",function(f){b.processChunk(f)}),P.on("end",function(){b.end()}),P.on("error",function(f){b.error(f)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var P=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),P=!0),this.previous&&this.previous.resume(),!P},flush:function(){},processChunk:function(P){this.push(P)},withStreamInfo:function(P,b){return this.extraStreamInfo[P]=b,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var P in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,P)&&(this.streamInfo[P]=this.extraStreamInfo[P])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var P="Worker "+this.name;return this.previous?this.previous+" -> "+P:P}},M.exports=o},{}],29:[function(Ze,M,W){"use strict";var o=Ze("../utils"),P=Ze("./ConvertWorker"),b=Ze("./GenericWorker"),f=Ze("../base64"),S=Ze("../support"),T=Ze("../external"),y=null;if(S.nodestream)try{y=Ze("../nodejs/NodejsStreamOutputAdapter")}catch{}function c(s,a,u){var h=a;switch(a){case"blob":case"arraybuffer":h="uint8array";break;case"base64":h="string"}try{this._internalType=h,this._outputType=a,this._mimeType=u,o.checkSupport(h),this._worker=s.pipe(new P(h)),s.lock()}catch(g){this._worker=new b("error"),this._worker.error(g)}}c.prototype={accumulate:function(s){return function d(s,a){return new T.Promise(function(u,h){var g=[],_=s._internalType,x=s._outputType,w=s._mimeType;s.on("data",function(D,C){g.push(D),a&&a(C)}).on("error",function(D){g=[],h(D)}).on("end",function(){try{var D=function(C,I,L){switch(C){case"blob":return o.newBlob(o.transformTo("arraybuffer",I),L);case"base64":return f.encode(I);default:return o.transformTo(C,I)}}(x,function(C,I){var L,N=0,G=null,k=0;for(L=0;L<I.length;L++)k+=I[L].length;switch(C){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(G=new Uint8Array(k),L=0;L<I.length;L++)G.set(I[L],N),N+=I[L].length;return G;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+C+"'")}}(_,g),w);u(D)}catch(C){h(C)}g=[]}).resume()})}(this,s)},on:function(s,a){var u=this;return this._worker.on(s,"data"===s?function(h){a.call(u,h.data,h.meta)}:function(){o.delay(a,arguments,u)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(s){if(o.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:"nodebuffer"!==this._outputType},s)}},M.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(Ze,M,W){"use strict";if(W.base64=!0,W.array=!0,W.string=!0,W.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",W.nodebuffer=typeof Buffer<"u",W.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")W.blob=!1;else{var o=new ArrayBuffer(0);try{W.blob=0===new Blob([o],{type:"application/zip"}).size}catch{try{var P=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);P.append(o),W.blob=0===P.getBlob("application/zip").size}catch{W.blob=!1}}}try{W.nodestream=!!Ze("readable-stream").Readable}catch{W.nodestream=!1}},{"readable-stream":16}],31:[function(Ze,M,W){"use strict";for(var o=Ze("./utils"),P=Ze("./support"),b=Ze("./nodejsUtils"),f=Ze("./stream/GenericWorker"),S=new Array(256),T=0;T<256;T++)S[T]=252<=T?6:248<=T?5:240<=T?4:224<=T?3:192<=T?2:1;function y(){f.call(this,"utf-8 decode"),this.leftOver=null}function d(){f.call(this,"utf-8 encode")}S[254]=S[254]=1,W.utf8encode=function(c){return P.nodebuffer?b.newBufferFrom(c,"utf-8"):function(s){var a,u,h,g,_,x=s.length,w=0;for(g=0;g<x;g++)55296==(64512&(u=s.charCodeAt(g)))&&g+1<x&&56320==(64512&(h=s.charCodeAt(g+1)))&&(u=65536+(u-55296<<10)+(h-56320),g++),w+=u<128?1:u<2048?2:u<65536?3:4;for(a=P.uint8array?new Uint8Array(w):new Array(w),g=_=0;_<w;g++)55296==(64512&(u=s.charCodeAt(g)))&&g+1<x&&56320==(64512&(h=s.charCodeAt(g+1)))&&(u=65536+(u-55296<<10)+(h-56320),g++),u<128?a[_++]=u:(u<2048?a[_++]=192|u>>>6:(u<65536?a[_++]=224|u>>>12:(a[_++]=240|u>>>18,a[_++]=128|u>>>12&63),a[_++]=128|u>>>6&63),a[_++]=128|63&u);return a}(c)},W.utf8decode=function(c){return P.nodebuffer?o.transformTo("nodebuffer",c).toString("utf-8"):function(s){var a,u,h,g,_=s.length,x=new Array(2*_);for(a=u=0;a<_;)if((h=s[a++])<128)x[u++]=h;else if(4<(g=S[h]))x[u++]=65533,a+=g-1;else{for(h&=2===g?31:3===g?15:7;1<g&&a<_;)h=h<<6|63&s[a++],g--;1<g?x[u++]=65533:h<65536?x[u++]=h:(x[u++]=55296|(h-=65536)>>10&1023,x[u++]=56320|1023&h)}return x.length!==u&&(x.subarray?x=x.subarray(0,u):x.length=u),o.applyFromCharCode(x)}(c=o.transformTo(P.uint8array?"uint8array":"array",c))},o.inherits(y,f),y.prototype.processChunk=function(c){var s=o.transformTo(P.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(P.uint8array){var a=s;(s=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),s.set(a,this.leftOver.length)}else s=this.leftOver.concat(s);this.leftOver=null}var u=function(g,_){var x;for((_=_||g.length)>g.length&&(_=g.length),x=_-1;0<=x&&128==(192&g[x]);)x--;return x<0||0===x?_:x+S[g[x]]>_?x:_}(s),h=s;u!==s.length&&(P.uint8array?(h=s.subarray(0,u),this.leftOver=s.subarray(u,s.length)):(h=s.slice(0,u),this.leftOver=s.slice(u,s.length))),this.push({data:W.utf8decode(h),meta:c.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:W.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},W.Utf8DecodeWorker=y,o.inherits(d,f),d.prototype.processChunk=function(c){this.push({data:W.utf8encode(c.data),meta:c.meta})},W.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(Ze,M,W){"use strict";var o=Ze("./support"),P=Ze("./base64"),b=Ze("./nodejsUtils"),f=Ze("./external");function S(a){return a}function T(a,u){for(var h=0;h<a.length;++h)u[h]=255&a.charCodeAt(h);return u}Ze("setimmediate"),W.newBlob=function(a,u){W.checkSupport("blob");try{return new Blob([a],{type:u})}catch{try{var h=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return h.append(a),h.getBlob(u)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(a,u,h){var g=[],_=0,x=a.length;if(x<=h)return String.fromCharCode.apply(null,a);for(;_<x;)g.push(String.fromCharCode.apply(null,"array"===u||"nodebuffer"===u?a.slice(_,Math.min(_+h,x)):a.subarray(_,Math.min(_+h,x)))),_+=h;return g.join("")},stringifyByChar:function(a){for(var u="",h=0;h<a.length;h++)u+=String.fromCharCode(a[h]);return u},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,b.allocBuffer(1)).length}catch{return!1}}()}};function d(a){var u=65536,h=W.getTypeOf(a),g=!0;if("uint8array"===h?g=y.applyCanBeUsed.uint8array:"nodebuffer"===h&&(g=y.applyCanBeUsed.nodebuffer),g)for(;1<u;)try{return y.stringifyByChunk(a,h,u)}catch{u=Math.floor(u/2)}return y.stringifyByChar(a)}function c(a,u){for(var h=0;h<a.length;h++)u[h]=a[h];return u}W.applyFromCharCode=d;var s={};s.string={string:S,array:function(a){return T(a,new Array(a.length))},arraybuffer:function(a){return s.string.uint8array(a).buffer},uint8array:function(a){return T(a,new Uint8Array(a.length))},nodebuffer:function(a){return T(a,b.allocBuffer(a.length))}},s.array={string:d,array:S,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return b.newBufferFrom(a)}},s.arraybuffer={string:function(a){return d(new Uint8Array(a))},array:function(a){return c(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:S,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return b.newBufferFrom(new Uint8Array(a))}},s.uint8array={string:d,array:function(a){return c(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:S,nodebuffer:function(a){return b.newBufferFrom(a)}},s.nodebuffer={string:d,array:function(a){return c(a,new Array(a.length))},arraybuffer:function(a){return s.nodebuffer.uint8array(a).buffer},uint8array:function(a){return c(a,new Uint8Array(a.length))},nodebuffer:S},W.transformTo=function(a,u){if(u=u||"",!a)return u;W.checkSupport(a);var h=W.getTypeOf(u);return s[h][a](u)},W.resolve=function(a){for(var u=a.split("/"),h=[],g=0;g<u.length;g++){var _=u[g];"."===_||""===_&&0!==g&&g!==u.length-1||(".."===_?h.pop():h.push(_))}return h.join("/")},W.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":o.nodebuffer&&b.isBuffer(a)?"nodebuffer":o.uint8array&&a instanceof Uint8Array?"uint8array":o.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},W.checkSupport=function(a){if(!o[a.toLowerCase()])throw new Error(a+" is not supported by this platform")},W.MAX_VALUE_16BITS=65535,W.MAX_VALUE_32BITS=-1,W.pretty=function(a){var u,h,g="";for(h=0;h<(a||"").length;h++)g+="\\x"+((u=a.charCodeAt(h))<16?"0":"")+u.toString(16).toUpperCase();return g},W.delay=function(a,u,h){setImmediate(function(){a.apply(h||null,u||[])})},W.inherits=function(a,u){function h(){}h.prototype=u.prototype,a.prototype=new h},W.extend=function(){var a,u,h={};for(a=0;a<arguments.length;a++)for(u in arguments[a])Object.prototype.hasOwnProperty.call(arguments[a],u)&&void 0===h[u]&&(h[u]=arguments[a][u]);return h},W.prepareContent=function(a,u,h,g,_){return f.Promise.resolve(u).then(function(x){return o.blob&&(x instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(x)))&&typeof FileReader<"u"?new f.Promise(function(w,D){var C=new FileReader;C.onload=function(I){w(I.target.result)},C.onerror=function(I){D(I.target.error)},C.readAsArrayBuffer(x)}):x}).then(function(x){var D,w=W.getTypeOf(x);return w?("arraybuffer"===w?x=W.transformTo("uint8array",x):"string"===w&&(_?x=P.decode(x):h&&!0!==g&&(x=T(D=x,o.uint8array?new Uint8Array(D.length):new Array(D.length)))),x):f.Promise.reject(new Error("Can't read the data of '"+a+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(Ze,M,W){"use strict";var o=Ze("./reader/readerFor"),P=Ze("./utils"),b=Ze("./signature"),f=Ze("./zipEntry"),S=Ze("./support");function T(y){this.files=[],this.loadOptions=y}T.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var d=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+P.pretty(d)+", expected "+P.pretty(y)+")")}},isSignature:function(y,d){var c=this.reader.index;this.reader.setIndex(y);var s=this.reader.readString(4)===d;return this.reader.setIndex(c),s},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),c=P.transformTo(S.uint8array?"uint8array":"array",y);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,d,c,s=this.zip64EndOfCentralSize-44;0<s;)y=this.reader.readInt(2),d=this.reader.readInt(4),c=this.reader.readData(d),this.zip64ExtensibleData[y]={id:y,length:d,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,d;for(y=0;y<this.files.length;y++)this.reader.setIndex((d=this.files[y]).localHeaderOffset),this.checkSignature(b.LOCAL_FILE_HEADER),d.readLocalPart(this.reader),d.handleUTF8(),d.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(b.CENTRAL_FILE_HEADER);)(y=new f({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(b.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,b.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var d=y;if(this.checkSignature(b.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===P.MAX_VALUE_16BITS||this.diskWithCentralDirStart===P.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===P.MAX_VALUE_16BITS||this.centralDirRecords===P.MAX_VALUE_16BITS||this.centralDirSize===P.MAX_VALUE_32BITS||this.centralDirOffset===P.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(b.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(b.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,b.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(b.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(b.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var s=d-c;if(0<s)this.isSignature(d,b.CENTRAL_FILE_HEADER)||(this.reader.zero=s);else if(s<0)throw new Error("Corrupted zip: missing "+Math.abs(s)+" bytes.")},prepareReader:function(y){this.reader=o(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},M.exports=T},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(Ze,M,W){"use strict";var o=Ze("./reader/readerFor"),P=Ze("./utils"),b=Ze("./compressedObject"),f=Ze("./crc32"),S=Ze("./utf8"),T=Ze("./compressions"),y=Ze("./support");function d(c,s){this.options=c,this.loadOptions=s}d.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(c){var s,a;if(c.skip(22),this.fileNameLength=c.readInt(2),a=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(a),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(s=function(u){for(var h in T)if(Object.prototype.hasOwnProperty.call(T,h)&&T[h].magic===u)return T[h];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+P.pretty(this.compressionMethod)+" unknown (inner file : "+P.transformTo("string",this.fileName)+")");this.decompressed=new b(this.compressedSize,this.uncompressedSize,this.crc32,s,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var s=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(s),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==c&&(this.dosPermissions=63&this.externalFileAttributes),3==c&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=o(this.extraFields[1].value);this.uncompressedSize===P.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===P.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===P.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===P.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var s,a,u,h=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<h;)s=c.readInt(2),a=c.readInt(2),u=c.readData(a),this.extraFields[s]={id:s,length:a,value:u};c.setIndex(h)},handleUTF8:function(){var c=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var s=this.findExtraFieldUnicodePath();if(null!==s)this.fileNameStr=s;else{var a=P.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(a)}var u=this.findExtraFieldUnicodeComment();if(null!==u)this.fileCommentStr=u;else{var h=P.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(h)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var s=o(c.value);return 1!==s.readInt(1)||f(this.fileName)!==s.readInt(4)?null:S.utf8decode(s.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var s=o(c.value);return 1!==s.readInt(1)||f(this.fileComment)!==s.readInt(4)?null:S.utf8decode(s.readData(c.length-5))}return null}},M.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(Ze,M,W){"use strict";function o(s,a,u){this.name=s,this.dir=u.dir,this.date=u.date,this.comment=u.comment,this.unixPermissions=u.unixPermissions,this.dosPermissions=u.dosPermissions,this._data=a,this._dataBinary=u.binary,this.options={compression:u.compression,compressionOptions:u.compressionOptions}}var P=Ze("./stream/StreamHelper"),b=Ze("./stream/DataWorker"),f=Ze("./utf8"),S=Ze("./compressedObject"),T=Ze("./stream/GenericWorker");o.prototype={internalStream:function(s){var a=null,u="string";try{if(!s)throw new Error("No output type specified.");var h="string"===(u=s.toLowerCase())||"text"===u;"binarystring"!==u&&"text"!==u||(u="string"),a=this._decompressWorker();var g=!this._dataBinary;g&&!h&&(a=a.pipe(new f.Utf8EncodeWorker)),!g&&h&&(a=a.pipe(new f.Utf8DecodeWorker))}catch(_){(a=new T("error")).error(_)}return new P(a,u,"")},async:function(s,a){return this.internalStream(s).accumulate(a)},nodeStream:function(s,a){return this.internalStream(s||"nodebuffer").toNodejsStream(a)},_compressWorker:function(s,a){if(this._data instanceof S&&this._data.compression.magic===s.magic)return this._data.getCompressedWorker();var u=this._decompressWorker();return this._dataBinary||(u=u.pipe(new f.Utf8EncodeWorker)),S.createWorkerFrom(u,s,a)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof T?this._data:new b(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<y.length;c++)o.prototype[y[c]]=d;M.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(Ze,M,W){(function(o){"use strict";var P,b,f=o.MutationObserver||o.WebKitMutationObserver;if(f){var S=0,T=new f(s),y=o.document.createTextNode("");T.observe(y,{characterData:!0}),P=function(){y.data=S=++S%2}}else if(o.setImmediate||void 0===o.MessageChannel)P="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var a=o.document.createElement("script");a.onreadystatechange=function(){s(),a.onreadystatechange=null,a.parentNode.removeChild(a),a=null},o.document.documentElement.appendChild(a)}:function(){setTimeout(s,0)};else{var d=new o.MessageChannel;d.port1.onmessage=s,P=function(){d.port2.postMessage(0)}}var c=[];function s(){var a,u;b=!0;for(var h=c.length;h;){for(u=c,c=[],a=-1;++a<h;)u[a]();h=c.length}b=!1}M.exports=function(a){1!==c.push(a)||b||P()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(Ze,M,W){"use strict";var o=Ze("immediate");function P(){}var b={},f=["REJECTED"],S=["FULFILLED"],T=["PENDING"];function y(h){if("function"!=typeof h)throw new TypeError("resolver must be a function");this.state=T,this.queue=[],this.outcome=void 0,h!==P&&a(this,h)}function d(h,g,_){this.promise=h,"function"==typeof g&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),"function"==typeof _&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function c(h,g,_){o(function(){var x;try{x=g(_)}catch(w){return b.reject(h,w)}x===h?b.reject(h,new TypeError("Cannot resolve promise with itself")):b.resolve(h,x)})}function s(h){var g=h&&h.then;if(h&&("object"==typeof h||"function"==typeof h)&&"function"==typeof g)return function(){g.apply(h,arguments)}}function a(h,g){var _=!1;function x(C){_||(_=!0,b.reject(h,C))}function w(C){_||(_=!0,b.resolve(h,C))}var D=u(function(){g(w,x)});"error"===D.status&&x(D.value)}function u(h,g){var _={};try{_.value=h(g),_.status="success"}catch(x){_.status="error",_.value=x}return _}(M.exports=y).prototype.finally=function(h){if("function"!=typeof h)return this;var g=this.constructor;return this.then(function(_){return g.resolve(h()).then(function(){return _})},function(_){return g.resolve(h()).then(function(){throw _})})},y.prototype.catch=function(h){return this.then(null,h)},y.prototype.then=function(h,g){if("function"!=typeof h&&this.state===S||"function"!=typeof g&&this.state===f)return this;var _=new this.constructor(P);return this.state!==T?c(_,this.state===S?h:g,this.outcome):this.queue.push(new d(_,h,g)),_},d.prototype.callFulfilled=function(h){b.resolve(this.promise,h)},d.prototype.otherCallFulfilled=function(h){c(this.promise,this.onFulfilled,h)},d.prototype.callRejected=function(h){b.reject(this.promise,h)},d.prototype.otherCallRejected=function(h){c(this.promise,this.onRejected,h)},b.resolve=function(h,g){var _=u(s,g);if("error"===_.status)return b.reject(h,_.value);var x=_.value;if(x)a(h,x);else{h.state=S,h.outcome=g;for(var w=-1,D=h.queue.length;++w<D;)h.queue[w].callFulfilled(g)}return h},b.reject=function(h,g){h.state=f,h.outcome=g;for(var _=-1,x=h.queue.length;++_<x;)h.queue[_].callRejected(g);return h},y.resolve=function(h){return h instanceof this?h:b.resolve(new this(P),h)},y.reject=function(h){var g=new this(P);return b.reject(g,h)},y.all=function(h){var g=this;if("[object Array]"!==Object.prototype.toString.call(h))return this.reject(new TypeError("must be an array"));var _=h.length,x=!1;if(!_)return this.resolve([]);for(var w=new Array(_),D=0,C=-1,I=new this(P);++C<_;)L(h[C],C);return I;function L(N,G){g.resolve(N).then(function(k){w[G]=k,++D!==_||x||(x=!0,b.resolve(I,w))},function(k){x||(x=!0,b.reject(I,k))})}},y.race=function(h){if("[object Array]"!==Object.prototype.toString.call(h))return this.reject(new TypeError("must be an array"));var _=h.length,x=!1;if(!_)return this.resolve([]);for(var w=-1,D=new this(P);++w<_;)this.resolve(h[w]).then(function(I){x||(x=!0,b.resolve(D,I))},function(I){x||(x=!0,b.reject(D,I))});return D}},{immediate:36}],38:[function(Ze,M,W){"use strict";var o={};(0,Ze("./lib/utils/common").assign)(o,Ze("./lib/deflate"),Ze("./lib/inflate"),Ze("./lib/zlib/constants")),M.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(Ze,M,W){"use strict";var o=Ze("./zlib/deflate"),P=Ze("./utils/common"),b=Ze("./utils/strings"),f=Ze("./zlib/messages"),S=Ze("./zlib/zstream"),T=Object.prototype.toString,y=0,d=-1,c=0,s=8;function a(h){if(!(this instanceof a))return new a(h);this.options=P.assign({level:d,method:s,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},h||{});var g=this.options;g.raw&&0<g.windowBits?g.windowBits=-g.windowBits:g.gzip&&0<g.windowBits&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var _=o.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(_!==y)throw new Error(f[_]);if(g.header&&o.deflateSetHeader(this.strm,g.header),g.dictionary){var x;if(x="string"==typeof g.dictionary?b.string2buf(g.dictionary):"[object ArrayBuffer]"===T.call(g.dictionary)?new Uint8Array(g.dictionary):g.dictionary,(_=o.deflateSetDictionary(this.strm,x))!==y)throw new Error(f[_]);this._dict_set=!0}}function u(h,g){var _=new a(g);if(_.push(h,!0),_.err)throw _.msg||f[_.err];return _.result}a.prototype.push=function(h,g){var _,x,w=this.strm,D=this.options.chunkSize;if(this.ended)return!1;x=g===~~g?g:!0===g?4:0,w.input="string"==typeof h?b.string2buf(h):"[object ArrayBuffer]"===T.call(h)?new Uint8Array(h):h,w.next_in=0,w.avail_in=w.input.length;do{if(0===w.avail_out&&(w.output=new P.Buf8(D),w.next_out=0,w.avail_out=D),1!==(_=o.deflate(w,x))&&_!==y)return this.onEnd(_),!(this.ended=!0);0!==w.avail_out&&(0!==w.avail_in||4!==x&&2!==x)||this.onData("string"===this.options.to?b.buf2binstring(P.shrinkBuf(w.output,w.next_out)):P.shrinkBuf(w.output,w.next_out))}while((0<w.avail_in||0===w.avail_out)&&1!==_);return 4===x?(_=o.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===y):2!==x||(this.onEnd(y),!(w.avail_out=0))},a.prototype.onData=function(h){this.chunks.push(h)},a.prototype.onEnd=function(h){h===y&&(this.result="string"===this.options.to?this.chunks.join(""):P.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},W.Deflate=a,W.deflate=u,W.deflateRaw=function(h,g){return(g=g||{}).raw=!0,u(h,g)},W.gzip=function(h,g){return(g=g||{}).gzip=!0,u(h,g)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(Ze,M,W){"use strict";var o=Ze("./zlib/inflate"),P=Ze("./utils/common"),b=Ze("./utils/strings"),f=Ze("./zlib/constants"),S=Ze("./zlib/messages"),T=Ze("./zlib/zstream"),y=Ze("./zlib/gzheader"),d=Object.prototype.toString;function c(a){if(!(this instanceof c))return new c(a);this.options=P.assign({chunkSize:16384,windowBits:0,to:""},a||{});var u=this.options;u.raw&&0<=u.windowBits&&u.windowBits<16&&(u.windowBits=-u.windowBits,0===u.windowBits&&(u.windowBits=-15)),!(0<=u.windowBits&&u.windowBits<16)||a&&a.windowBits||(u.windowBits+=32),15<u.windowBits&&u.windowBits<48&&!(15&u.windowBits)&&(u.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new T,this.strm.avail_out=0;var h=o.inflateInit2(this.strm,u.windowBits);if(h!==f.Z_OK)throw new Error(S[h]);this.header=new y,o.inflateGetHeader(this.strm,this.header)}function s(a,u){var h=new c(u);if(h.push(a,!0),h.err)throw h.msg||S[h.err];return h.result}c.prototype.push=function(a,u){var h,g,_,x,w,D,C=this.strm,I=this.options.chunkSize,L=this.options.dictionary,N=!1;if(this.ended)return!1;g=u===~~u?u:!0===u?f.Z_FINISH:f.Z_NO_FLUSH,C.input="string"==typeof a?b.binstring2buf(a):"[object ArrayBuffer]"===d.call(a)?new Uint8Array(a):a,C.next_in=0,C.avail_in=C.input.length;do{if(0===C.avail_out&&(C.output=new P.Buf8(I),C.next_out=0,C.avail_out=I),(h=o.inflate(C,f.Z_NO_FLUSH))===f.Z_NEED_DICT&&L&&(D="string"==typeof L?b.string2buf(L):"[object ArrayBuffer]"===d.call(L)?new Uint8Array(L):L,h=o.inflateSetDictionary(this.strm,D)),h===f.Z_BUF_ERROR&&!0===N&&(h=f.Z_OK,N=!1),h!==f.Z_STREAM_END&&h!==f.Z_OK)return this.onEnd(h),!(this.ended=!0);C.next_out&&(0!==C.avail_out&&h!==f.Z_STREAM_END&&(0!==C.avail_in||g!==f.Z_FINISH&&g!==f.Z_SYNC_FLUSH)||("string"===this.options.to?(_=b.utf8border(C.output,C.next_out),x=C.next_out-_,w=b.buf2string(C.output,_),C.next_out=x,C.avail_out=I-x,x&&P.arraySet(C.output,C.output,_,x,0),this.onData(w)):this.onData(P.shrinkBuf(C.output,C.next_out)))),0===C.avail_in&&0===C.avail_out&&(N=!0)}while((0<C.avail_in||0===C.avail_out)&&h!==f.Z_STREAM_END);return h===f.Z_STREAM_END&&(g=f.Z_FINISH),g===f.Z_FINISH?(h=o.inflateEnd(this.strm),this.onEnd(h),this.ended=!0,h===f.Z_OK):g!==f.Z_SYNC_FLUSH||(this.onEnd(f.Z_OK),!(C.avail_out=0))},c.prototype.onData=function(a){this.chunks.push(a)},c.prototype.onEnd=function(a){a===f.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):P.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},W.Inflate=c,W.inflate=s,W.inflateRaw=function(a,u){return(u=u||{}).raw=!0,s(a,u)},W.ungzip=s},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(Ze,M,W){"use strict";var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";W.assign=function(f){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var T=S.shift();if(T){if("object"!=typeof T)throw new TypeError(T+"must be non-object");for(var y in T)T.hasOwnProperty(y)&&(f[y]=T[y])}}return f},W.shrinkBuf=function(f,S){return f.length===S?f:f.subarray?f.subarray(0,S):(f.length=S,f)};var P={arraySet:function(f,S,T,y,d){if(S.subarray&&f.subarray)f.set(S.subarray(T,T+y),d);else for(var c=0;c<y;c++)f[d+c]=S[T+c]},flattenChunks:function(f){var S,T,y,d,c,s;for(S=y=0,T=f.length;S<T;S++)y+=f[S].length;for(s=new Uint8Array(y),S=d=0,T=f.length;S<T;S++)s.set(c=f[S],d),d+=c.length;return s}},b={arraySet:function(f,S,T,y,d){for(var c=0;c<y;c++)f[d+c]=S[T+c]},flattenChunks:function(f){return[].concat.apply([],f)}};W.setTyped=function(f){f?(W.Buf8=Uint8Array,W.Buf16=Uint16Array,W.Buf32=Int32Array,W.assign(W,P)):(W.Buf8=Array,W.Buf16=Array,W.Buf32=Array,W.assign(W,b))},W.setTyped(o)},{}],42:[function(Ze,M,W){"use strict";var o=Ze("./common"),P=!0,b=!0;try{String.fromCharCode.apply(null,[0])}catch{P=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{b=!1}for(var f=new o.Buf8(256),S=0;S<256;S++)f[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function T(y,d){if(d<65537&&(y.subarray&&b||!y.subarray&&P))return String.fromCharCode.apply(null,o.shrinkBuf(y,d));for(var c="",s=0;s<d;s++)c+=String.fromCharCode(y[s]);return c}f[254]=f[254]=1,W.string2buf=function(y){var d,c,s,a,u,h=y.length,g=0;for(a=0;a<h;a++)55296==(64512&(c=y.charCodeAt(a)))&&a+1<h&&56320==(64512&(s=y.charCodeAt(a+1)))&&(c=65536+(c-55296<<10)+(s-56320),a++),g+=c<128?1:c<2048?2:c<65536?3:4;for(d=new o.Buf8(g),a=u=0;u<g;a++)55296==(64512&(c=y.charCodeAt(a)))&&a+1<h&&56320==(64512&(s=y.charCodeAt(a+1)))&&(c=65536+(c-55296<<10)+(s-56320),a++),c<128?d[u++]=c:(c<2048?d[u++]=192|c>>>6:(c<65536?d[u++]=224|c>>>12:(d[u++]=240|c>>>18,d[u++]=128|c>>>12&63),d[u++]=128|c>>>6&63),d[u++]=128|63&c);return d},W.buf2binstring=function(y){return T(y,y.length)},W.binstring2buf=function(y){for(var d=new o.Buf8(y.length),c=0,s=d.length;c<s;c++)d[c]=y.charCodeAt(c);return d},W.buf2string=function(y,d){var c,s,a,u,h=d||y.length,g=new Array(2*h);for(c=s=0;c<h;)if((a=y[c++])<128)g[s++]=a;else if(4<(u=f[a]))g[s++]=65533,c+=u-1;else{for(a&=2===u?31:3===u?15:7;1<u&&c<h;)a=a<<6|63&y[c++],u--;1<u?g[s++]=65533:a<65536?g[s++]=a:(g[s++]=55296|(a-=65536)>>10&1023,g[s++]=56320|1023&a)}return T(g,s)},W.utf8border=function(y,d){var c;for((d=d||y.length)>y.length&&(d=y.length),c=d-1;0<=c&&128==(192&y[c]);)c--;return c<0||0===c?d:c+f[y[c]]>d?c:d}},{"./common":41}],43:[function(Ze,M,W){"use strict";M.exports=function(o,P,b,f){for(var S=65535&o,T=o>>>16&65535,y=0;0!==b;){for(b-=y=2e3<b?2e3:b;T=T+(S=S+P[f++]|0)|0,--y;);S%=65521,T%=65521}return S|T<<16}},{}],44:[function(Ze,M,W){"use strict";M.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(Ze,M,W){"use strict";var o=function(){for(var P,b=[],f=0;f<256;f++){P=f;for(var S=0;S<8;S++)P=1&P?3988292384^P>>>1:P>>>1;b[f]=P}return b}();M.exports=function(P,b,f,S){var T=o,y=S+f;P^=-1;for(var d=S;d<y;d++)P=P>>>8^T[255&(P^b[d])];return~P}},{}],46:[function(Ze,M,W){"use strict";var o,P=Ze("../utils/common"),b=Ze("./trees"),f=Ze("./adler32"),S=Ze("./crc32"),T=Ze("./messages"),y=0,c=0,s=-2,h=2,g=8,x=286,w=30,D=19,C=2*x+1,I=15,L=3,N=258,G=N+L+1,k=42,U=113;function re(le,Ce){return le.msg=T[Ce],Ce}function q(le){return(le<<1)-(4<le?9:0)}function Y(le){for(var Ce=le.length;0<=--Ce;)le[Ce]=0}function Z(le){var Ce=le.state,ye=Ce.pending;ye>le.avail_out&&(ye=le.avail_out),0!==ye&&(P.arraySet(le.output,Ce.pending_buf,Ce.pending_out,ye,le.next_out),le.next_out+=ye,Ce.pending_out+=ye,le.total_out+=ye,le.avail_out-=ye,Ce.pending-=ye,0===Ce.pending&&(Ce.pending_out=0))}function Q(le,Ce){b._tr_flush_block(le,0<=le.block_start?le.block_start:-1,le.strstart-le.block_start,Ce),le.block_start=le.strstart,Z(le.strm)}function te(le,Ce){le.pending_buf[le.pending++]=Ce}function pe(le,Ce){le.pending_buf[le.pending++]=Ce>>>8&255,le.pending_buf[le.pending++]=255&Ce}function z(le,Ce){var ye,ge,fe=le.max_chain_length,xe=le.strstart,Te=le.prev_length,Ee=le.nice_match,Oe=le.strstart>le.w_size-G?le.strstart-(le.w_size-G):0,ze=le.window,$e=le.w_mask,Be=le.prev,Ue=le.strstart+N,ot=ze[xe+Te-1],st=ze[xe+Te];le.prev_length>=le.good_match&&(fe>>=2),Ee>le.lookahead&&(Ee=le.lookahead);do{if(ze[(ye=Ce)+Te]===st&&ze[ye+Te-1]===ot&&ze[ye]===ze[xe]&&ze[++ye]===ze[xe+1]){xe+=2,ye++;do{}while(ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&ze[++xe]===ze[++ye]&&xe<Ue);if(ge=N-(Ue-xe),xe=Ue-N,Te<ge){if(le.match_start=Ce,Ee<=(Te=ge))break;ot=ze[xe+Te-1],st=ze[xe+Te]}}}while((Ce=Be[Ce&$e])>Oe&&0!=--fe);return Te<=le.lookahead?Te:le.lookahead}function oe(le){var Ce,ye,ge,fe,xe,Te,Ee,Oe,ze,$e,Be=le.w_size;do{if(fe=le.window_size-le.lookahead-le.strstart,le.strstart>=Be+(Be-G)){for(P.arraySet(le.window,le.window,Be,Be,0),le.match_start-=Be,le.strstart-=Be,le.block_start-=Be,Ce=ye=le.hash_size;ge=le.head[--Ce],le.head[Ce]=Be<=ge?ge-Be:0,--ye;);for(Ce=ye=Be;ge=le.prev[--Ce],le.prev[Ce]=Be<=ge?ge-Be:0,--ye;);fe+=Be}if(0===le.strm.avail_in)break;if(Ee=le.window,Oe=le.strstart+le.lookahead,$e=void 0,(ze=fe)<($e=(Te=le.strm).avail_in)&&($e=ze),ye=0===$e?0:(Te.avail_in-=$e,P.arraySet(Ee,Te.input,Te.next_in,$e,Oe),1===Te.state.wrap?Te.adler=f(Te.adler,Ee,$e,Oe):2===Te.state.wrap&&(Te.adler=S(Te.adler,Ee,$e,Oe)),Te.next_in+=$e,Te.total_in+=$e,$e),le.lookahead+=ye,le.lookahead+le.insert>=L)for(le.ins_h=le.window[xe=le.strstart-le.insert],le.ins_h=(le.ins_h<<le.hash_shift^le.window[xe+1])&le.hash_mask;le.insert&&(le.ins_h=(le.ins_h<<le.hash_shift^le.window[xe+L-1])&le.hash_mask,le.prev[xe&le.w_mask]=le.head[le.ins_h],le.head[le.ins_h]=xe,xe++,le.insert--,!(le.lookahead+le.insert<L)););}while(le.lookahead<G&&0!==le.strm.avail_in)}function ae(le,Ce){for(var ye,ge;;){if(le.lookahead<G){if(oe(le),le.lookahead<G&&Ce===y)return 1;if(0===le.lookahead)break}if(ye=0,le.lookahead>=L&&(le.ins_h=(le.ins_h<<le.hash_shift^le.window[le.strstart+L-1])&le.hash_mask,ye=le.prev[le.strstart&le.w_mask]=le.head[le.ins_h],le.head[le.ins_h]=le.strstart),0!==ye&&le.strstart-ye<=le.w_size-G&&(le.match_length=z(le,ye)),le.match_length>=L)if(ge=b._tr_tally(le,le.strstart-le.match_start,le.match_length-L),le.lookahead-=le.match_length,le.match_length<=le.max_lazy_match&&le.lookahead>=L){for(le.match_length--;le.strstart++,le.ins_h=(le.ins_h<<le.hash_shift^le.window[le.strstart+L-1])&le.hash_mask,ye=le.prev[le.strstart&le.w_mask]=le.head[le.ins_h],le.head[le.ins_h]=le.strstart,0!=--le.match_length;);le.strstart++}else le.strstart+=le.match_length,le.match_length=0,le.ins_h=le.window[le.strstart],le.ins_h=(le.ins_h<<le.hash_shift^le.window[le.strstart+1])&le.hash_mask;else ge=b._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++;if(ge&&(Q(le,!1),0===le.strm.avail_out))return 1}return le.insert=le.strstart<L-1?le.strstart:L-1,4===Ce?(Q(le,!0),0===le.strm.avail_out?3:4):le.last_lit&&(Q(le,!1),0===le.strm.avail_out)?1:2}function ee(le,Ce){for(var ye,ge,fe;;){if(le.lookahead<G){if(oe(le),le.lookahead<G&&Ce===y)return 1;if(0===le.lookahead)break}if(ye=0,le.lookahead>=L&&(le.ins_h=(le.ins_h<<le.hash_shift^le.window[le.strstart+L-1])&le.hash_mask,ye=le.prev[le.strstart&le.w_mask]=le.head[le.ins_h],le.head[le.ins_h]=le.strstart),le.prev_length=le.match_length,le.prev_match=le.match_start,le.match_length=L-1,0!==ye&&le.prev_length<le.max_lazy_match&&le.strstart-ye<=le.w_size-G&&(le.match_length=z(le,ye),le.match_length<=5&&(1===le.strategy||le.match_length===L&&4096<le.strstart-le.match_start)&&(le.match_length=L-1)),le.prev_length>=L&&le.match_length<=le.prev_length){for(fe=le.strstart+le.lookahead-L,ge=b._tr_tally(le,le.strstart-1-le.prev_match,le.prev_length-L),le.lookahead-=le.prev_length-1,le.prev_length-=2;++le.strstart<=fe&&(le.ins_h=(le.ins_h<<le.hash_shift^le.window[le.strstart+L-1])&le.hash_mask,ye=le.prev[le.strstart&le.w_mask]=le.head[le.ins_h],le.head[le.ins_h]=le.strstart),0!=--le.prev_length;);if(le.match_available=0,le.match_length=L-1,le.strstart++,ge&&(Q(le,!1),0===le.strm.avail_out))return 1}else if(le.match_available){if((ge=b._tr_tally(le,0,le.window[le.strstart-1]))&&Q(le,!1),le.strstart++,le.lookahead--,0===le.strm.avail_out)return 1}else le.match_available=1,le.strstart++,le.lookahead--}return le.match_available&&(ge=b._tr_tally(le,0,le.window[le.strstart-1]),le.match_available=0),le.insert=le.strstart<L-1?le.strstart:L-1,4===Ce?(Q(le,!0),0===le.strm.avail_out?3:4):le.last_lit&&(Q(le,!1),0===le.strm.avail_out)?1:2}function he(le,Ce,ye,ge,fe){this.good_length=le,this.max_lazy=Ce,this.nice_length=ye,this.max_chain=ge,this.func=fe}function de(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new P.Buf16(2*C),this.dyn_dtree=new P.Buf16(2*(2*w+1)),this.bl_tree=new P.Buf16(2*(2*D+1)),Y(this.dyn_ltree),Y(this.dyn_dtree),Y(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new P.Buf16(I+1),this.heap=new P.Buf16(2*x+1),Y(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new P.Buf16(2*x+1),Y(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ue(le){var Ce;return le&&le.state?(le.total_in=le.total_out=0,le.data_type=h,(Ce=le.state).pending=0,Ce.pending_out=0,Ce.wrap<0&&(Ce.wrap=-Ce.wrap),Ce.status=Ce.wrap?k:U,le.adler=2===Ce.wrap?0:1,Ce.last_flush=y,b._tr_init(Ce),c):re(le,s)}function be(le){var ye,Ce=ue(le);return Ce===c&&((ye=le.state).window_size=2*ye.w_size,Y(ye.head),ye.max_lazy_match=o[ye.level].max_lazy,ye.good_match=o[ye.level].good_length,ye.nice_match=o[ye.level].nice_length,ye.max_chain_length=o[ye.level].max_chain,ye.strstart=0,ye.block_start=0,ye.lookahead=0,ye.insert=0,ye.match_length=ye.prev_length=L-1,ye.match_available=0,ye.ins_h=0),Ce}function ve(le,Ce,ye,ge,fe,xe){if(!le)return s;var Te=1;if(-1===Ce&&(Ce=6),ge<0?(Te=0,ge=-ge):15<ge&&(Te=2,ge-=16),fe<1||9<fe||ye!==g||ge<8||15<ge||Ce<0||9<Ce||xe<0||4<xe)return re(le,s);8===ge&&(ge=9);var Ee=new de;return(le.state=Ee).strm=le,Ee.wrap=Te,Ee.gzhead=null,Ee.w_bits=ge,Ee.w_size=1<<Ee.w_bits,Ee.w_mask=Ee.w_size-1,Ee.hash_bits=fe+7,Ee.hash_size=1<<Ee.hash_bits,Ee.hash_mask=Ee.hash_size-1,Ee.hash_shift=~~((Ee.hash_bits+L-1)/L),Ee.window=new P.Buf8(2*Ee.w_size),Ee.head=new P.Buf16(Ee.hash_size),Ee.prev=new P.Buf16(Ee.w_size),Ee.lit_bufsize=1<<fe+6,Ee.pending_buf_size=4*Ee.lit_bufsize,Ee.pending_buf=new P.Buf8(Ee.pending_buf_size),Ee.d_buf=1*Ee.lit_bufsize,Ee.l_buf=3*Ee.lit_bufsize,Ee.level=Ce,Ee.strategy=xe,Ee.method=ye,be(le)}o=[new he(0,0,0,0,function(le,Ce){var ye=65535;for(ye>le.pending_buf_size-5&&(ye=le.pending_buf_size-5);;){if(le.lookahead<=1){if(oe(le),0===le.lookahead&&Ce===y)return 1;if(0===le.lookahead)break}le.strstart+=le.lookahead,le.lookahead=0;var ge=le.block_start+ye;if((0===le.strstart||le.strstart>=ge)&&(le.lookahead=le.strstart-ge,le.strstart=ge,Q(le,!1),0===le.strm.avail_out)||le.strstart-le.block_start>=le.w_size-G&&(Q(le,!1),0===le.strm.avail_out))return 1}return le.insert=0,4===Ce?(Q(le,!0),0===le.strm.avail_out?3:4):(le.strstart>le.block_start&&Q(le,!1),1)}),new he(4,4,8,4,ae),new he(4,5,16,8,ae),new he(4,6,32,32,ae),new he(4,4,16,16,ee),new he(8,16,32,32,ee),new he(8,16,128,128,ee),new he(8,32,128,256,ee),new he(32,128,258,1024,ee),new he(32,258,258,4096,ee)],W.deflateInit=function(le,Ce){return ve(le,Ce,g,15,8,0)},W.deflateInit2=ve,W.deflateReset=be,W.deflateResetKeep=ue,W.deflateSetHeader=function(le,Ce){return le&&le.state?2!==le.state.wrap?s:(le.state.gzhead=Ce,c):s},W.deflate=function(le,Ce){var ye,ge,fe,xe;if(!le||!le.state||5<Ce||Ce<0)return le?re(le,s):s;if(ge=le.state,!le.output||!le.input&&0!==le.avail_in||666===ge.status&&4!==Ce)return re(le,0===le.avail_out?-5:s);if(ge.strm=le,ye=ge.last_flush,ge.last_flush=Ce,ge.status===k)if(2===ge.wrap)le.adler=0,te(ge,31),te(ge,139),te(ge,8),ge.gzhead?(te(ge,(ge.gzhead.text?1:0)+(ge.gzhead.hcrc?2:0)+(ge.gzhead.extra?4:0)+(ge.gzhead.name?8:0)+(ge.gzhead.comment?16:0)),te(ge,255&ge.gzhead.time),te(ge,ge.gzhead.time>>8&255),te(ge,ge.gzhead.time>>16&255),te(ge,ge.gzhead.time>>24&255),te(ge,9===ge.level?2:2<=ge.strategy||ge.level<2?4:0),te(ge,255&ge.gzhead.os),ge.gzhead.extra&&ge.gzhead.extra.length&&(te(ge,255&ge.gzhead.extra.length),te(ge,ge.gzhead.extra.length>>8&255)),ge.gzhead.hcrc&&(le.adler=S(le.adler,ge.pending_buf,ge.pending,0)),ge.gzindex=0,ge.status=69):(te(ge,0),te(ge,0),te(ge,0),te(ge,0),te(ge,0),te(ge,9===ge.level?2:2<=ge.strategy||ge.level<2?4:0),te(ge,3),ge.status=U);else{var Te=g+(ge.w_bits-8<<4)<<8;Te|=(2<=ge.strategy||ge.level<2?0:ge.level<6?1:6===ge.level?2:3)<<6,0!==ge.strstart&&(Te|=32),Te+=31-Te%31,ge.status=U,pe(ge,Te),0!==ge.strstart&&(pe(ge,le.adler>>>16),pe(ge,65535&le.adler)),le.adler=1}if(69===ge.status)if(ge.gzhead.extra){for(fe=ge.pending;ge.gzindex<(65535&ge.gzhead.extra.length)&&(ge.pending!==ge.pending_buf_size||(ge.gzhead.hcrc&&ge.pending>fe&&(le.adler=S(le.adler,ge.pending_buf,ge.pending-fe,fe)),Z(le),fe=ge.pending,ge.pending!==ge.pending_buf_size));)te(ge,255&ge.gzhead.extra[ge.gzindex]),ge.gzindex++;ge.gzhead.hcrc&&ge.pending>fe&&(le.adler=S(le.adler,ge.pending_buf,ge.pending-fe,fe)),ge.gzindex===ge.gzhead.extra.length&&(ge.gzindex=0,ge.status=73)}else ge.status=73;if(73===ge.status)if(ge.gzhead.name){fe=ge.pending;do{if(ge.pending===ge.pending_buf_size&&(ge.gzhead.hcrc&&ge.pending>fe&&(le.adler=S(le.adler,ge.pending_buf,ge.pending-fe,fe)),Z(le),fe=ge.pending,ge.pending===ge.pending_buf_size)){xe=1;break}xe=ge.gzindex<ge.gzhead.name.length?255&ge.gzhead.name.charCodeAt(ge.gzindex++):0,te(ge,xe)}while(0!==xe);ge.gzhead.hcrc&&ge.pending>fe&&(le.adler=S(le.adler,ge.pending_buf,ge.pending-fe,fe)),0===xe&&(ge.gzindex=0,ge.status=91)}else ge.status=91;if(91===ge.status)if(ge.gzhead.comment){fe=ge.pending;do{if(ge.pending===ge.pending_buf_size&&(ge.gzhead.hcrc&&ge.pending>fe&&(le.adler=S(le.adler,ge.pending_buf,ge.pending-fe,fe)),Z(le),fe=ge.pending,ge.pending===ge.pending_buf_size)){xe=1;break}xe=ge.gzindex<ge.gzhead.comment.length?255&ge.gzhead.comment.charCodeAt(ge.gzindex++):0,te(ge,xe)}while(0!==xe);ge.gzhead.hcrc&&ge.pending>fe&&(le.adler=S(le.adler,ge.pending_buf,ge.pending-fe,fe)),0===xe&&(ge.status=103)}else ge.status=103;if(103===ge.status&&(ge.gzhead.hcrc?(ge.pending+2>ge.pending_buf_size&&Z(le),ge.pending+2<=ge.pending_buf_size&&(te(ge,255&le.adler),te(ge,le.adler>>8&255),le.adler=0,ge.status=U)):ge.status=U),0!==ge.pending){if(Z(le),0===le.avail_out)return ge.last_flush=-1,c}else if(0===le.avail_in&&q(Ce)<=q(ye)&&4!==Ce)return re(le,-5);if(666===ge.status&&0!==le.avail_in)return re(le,-5);if(0!==le.avail_in||0!==ge.lookahead||Ce!==y&&666!==ge.status){var Ee=2===ge.strategy?function(Oe,ze){for(var $e;;){if(0===Oe.lookahead&&(oe(Oe),0===Oe.lookahead)){if(ze===y)return 1;break}if(Oe.match_length=0,$e=b._tr_tally(Oe,0,Oe.window[Oe.strstart]),Oe.lookahead--,Oe.strstart++,$e&&(Q(Oe,!1),0===Oe.strm.avail_out))return 1}return Oe.insert=0,4===ze?(Q(Oe,!0),0===Oe.strm.avail_out?3:4):Oe.last_lit&&(Q(Oe,!1),0===Oe.strm.avail_out)?1:2}(ge,Ce):3===ge.strategy?function(Oe,ze){for(var $e,Be,Ue,ot,st=Oe.window;;){if(Oe.lookahead<=N){if(oe(Oe),Oe.lookahead<=N&&ze===y)return 1;if(0===Oe.lookahead)break}if(Oe.match_length=0,Oe.lookahead>=L&&0<Oe.strstart&&(Be=st[Ue=Oe.strstart-1])===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]){ot=Oe.strstart+N;do{}while(Be===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]&&Be===st[++Ue]&&Ue<ot);Oe.match_length=N-(ot-Ue),Oe.match_length>Oe.lookahead&&(Oe.match_length=Oe.lookahead)}if(Oe.match_length>=L?($e=b._tr_tally(Oe,1,Oe.match_length-L),Oe.lookahead-=Oe.match_length,Oe.strstart+=Oe.match_length,Oe.match_length=0):($e=b._tr_tally(Oe,0,Oe.window[Oe.strstart]),Oe.lookahead--,Oe.strstart++),$e&&(Q(Oe,!1),0===Oe.strm.avail_out))return 1}return Oe.insert=0,4===ze?(Q(Oe,!0),0===Oe.strm.avail_out?3:4):Oe.last_lit&&(Q(Oe,!1),0===Oe.strm.avail_out)?1:2}(ge,Ce):o[ge.level].func(ge,Ce);if(3!==Ee&&4!==Ee||(ge.status=666),1===Ee||3===Ee)return 0===le.avail_out&&(ge.last_flush=-1),c;if(2===Ee&&(1===Ce?b._tr_align(ge):5!==Ce&&(b._tr_stored_block(ge,0,0,!1),3===Ce&&(Y(ge.head),0===ge.lookahead&&(ge.strstart=0,ge.block_start=0,ge.insert=0))),Z(le),0===le.avail_out))return ge.last_flush=-1,c}return 4!==Ce?c:ge.wrap<=0?1:(2===ge.wrap?(te(ge,255&le.adler),te(ge,le.adler>>8&255),te(ge,le.adler>>16&255),te(ge,le.adler>>24&255),te(ge,255&le.total_in),te(ge,le.total_in>>8&255),te(ge,le.total_in>>16&255),te(ge,le.total_in>>24&255)):(pe(ge,le.adler>>>16),pe(ge,65535&le.adler)),Z(le),0<ge.wrap&&(ge.wrap=-ge.wrap),0!==ge.pending?c:1)},W.deflateEnd=function(le){var Ce;return le&&le.state?(Ce=le.state.status)!==k&&69!==Ce&&73!==Ce&&91!==Ce&&103!==Ce&&Ce!==U&&666!==Ce?re(le,s):(le.state=null,Ce===U?re(le,-3):c):s},W.deflateSetDictionary=function(le,Ce){var ye,ge,fe,xe,Te,Ee,Oe,ze,$e=Ce.length;if(!le||!le.state||2===(xe=(ye=le.state).wrap)||1===xe&&ye.status!==k||ye.lookahead)return s;for(1===xe&&(le.adler=f(le.adler,Ce,$e,0)),ye.wrap=0,$e>=ye.w_size&&(0===xe&&(Y(ye.head),ye.strstart=0,ye.block_start=0,ye.insert=0),ze=new P.Buf8(ye.w_size),P.arraySet(ze,Ce,$e-ye.w_size,ye.w_size,0),Ce=ze,$e=ye.w_size),Te=le.avail_in,Ee=le.next_in,Oe=le.input,le.avail_in=$e,le.next_in=0,le.input=Ce,oe(ye);ye.lookahead>=L;){for(ge=ye.strstart,fe=ye.lookahead-(L-1);ye.ins_h=(ye.ins_h<<ye.hash_shift^ye.window[ge+L-1])&ye.hash_mask,ye.prev[ge&ye.w_mask]=ye.head[ye.ins_h],ye.head[ye.ins_h]=ge,ge++,--fe;);ye.strstart=ge,ye.lookahead=L-1,oe(ye)}return ye.strstart+=ye.lookahead,ye.block_start=ye.strstart,ye.insert=ye.lookahead,ye.lookahead=0,ye.match_length=ye.prev_length=L-1,ye.match_available=0,le.next_in=Ee,le.input=Oe,le.avail_in=Te,ye.wrap=xe,c},W.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(Ze,M,W){"use strict";M.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(Ze,M,W){"use strict";M.exports=function(o,P){var b,f,S,T,y,d,c,s,a,u,h,g,_,x,w,D,C,I,L,N,G,k,U,B,K;B=o.input,S=(f=o.next_in)+(o.avail_in-5),K=o.output,y=(T=o.next_out)-(P-o.avail_out),d=T+(o.avail_out-257),c=(b=o.state).dmax,s=b.wsize,a=b.whave,u=b.wnext,h=b.window,g=b.hold,_=b.bits,x=b.lencode,w=b.distcode,D=(1<<b.lenbits)-1,C=(1<<b.distbits)-1;e:do{_<15&&(g+=B[f++]<<_,g+=B[f++]<<(_+=8),_+=8),I=x[g&D];t:for(;;){if(g>>>=L=I>>>24,_-=L,0==(L=I>>>16&255))K[T++]=65535&I;else{if(!(16&L)){if(!(64&L)){I=x[(65535&I)+(g&(1<<L)-1)];continue t}if(32&L){b.mode=12;break e}o.msg="invalid literal/length code",b.mode=30;break e}N=65535&I,(L&=15)&&(_<L&&(g+=B[f++]<<_,_+=8),N+=g&(1<<L)-1,g>>>=L,_-=L),_<15&&(g+=B[f++]<<_,g+=B[f++]<<(_+=8),_+=8),I=w[g&C];n:for(;;){if(g>>>=L=I>>>24,_-=L,!(16&(L=I>>>16&255))){if(!(64&L)){I=w[(65535&I)+(g&(1<<L)-1)];continue n}o.msg="invalid distance code",b.mode=30;break e}if(G=65535&I,_<(L&=15)&&(g+=B[f++]<<_,(_+=8)<L&&(g+=B[f++]<<_,_+=8)),c<(G+=g&(1<<L)-1)){o.msg="invalid distance too far back",b.mode=30;break e}if(g>>>=L,_-=L,(L=T-y)<G){if(a<(L=G-L)&&b.sane){o.msg="invalid distance too far back",b.mode=30;break e}if(U=h,(k=0)===u){if(k+=s-L,L<N){for(N-=L;K[T++]=h[k++],--L;);k=T-G,U=K}}else if(u<L){if(k+=s+u-L,(L-=u)<N){for(N-=L;K[T++]=h[k++],--L;);if(k=0,u<N){for(N-=L=u;K[T++]=h[k++],--L;);k=T-G,U=K}}}else if(k+=u-L,L<N){for(N-=L;K[T++]=h[k++],--L;);k=T-G,U=K}for(;2<N;)K[T++]=U[k++],K[T++]=U[k++],K[T++]=U[k++],N-=3;N&&(K[T++]=U[k++],1<N&&(K[T++]=U[k++]))}else{for(k=T-G;K[T++]=K[k++],K[T++]=K[k++],K[T++]=K[k++],2<(N-=3););N&&(K[T++]=K[k++],1<N&&(K[T++]=K[k++]))}break}}break}}while(f<S&&T<d);f-=N=_>>3,g&=(1<<(_-=N<<3))-1,o.next_in=f,o.next_out=T,o.avail_in=f<S?S-f+5:5-(f-S),o.avail_out=T<d?d-T+257:257-(T-d),b.hold=g,b.bits=_}},{}],49:[function(Ze,M,W){"use strict";var o=Ze("../utils/common"),P=Ze("./adler32"),b=Ze("./crc32"),f=Ze("./inffast"),S=Ze("./inftrees"),d=0,c=-2,s=1,a=852,u=592;function h(k){return(k>>>24&255)+(k>>>8&65280)+((65280&k)<<8)+((255&k)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(k){var U;return k&&k.state?(k.total_in=k.total_out=(U=k.state).total=0,k.msg="",U.wrap&&(k.adler=1&U.wrap),U.mode=s,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new o.Buf32(a),U.distcode=U.distdyn=new o.Buf32(u),U.sane=1,U.back=-1,d):c}function x(k){var U;return k&&k.state?((U=k.state).wsize=0,U.whave=0,U.wnext=0,_(k)):c}function w(k,U){var B,K;return k&&k.state?(K=k.state,U<0?(B=0,U=-U):(B=1+(U>>4),U<48&&(U&=15)),U&&(U<8||15<U)?c:(null!==K.window&&K.wbits!==U&&(K.window=null),K.wrap=B,K.wbits=U,x(k))):c}function D(k,U){var B,K;return k?(K=new g,(k.state=K).window=null,(B=w(k,U))!==d&&(k.state=null),B):c}var C,I,L=!0;function N(k){if(L){var U;for(C=new o.Buf32(512),I=new o.Buf32(32),U=0;U<144;)k.lens[U++]=8;for(;U<256;)k.lens[U++]=9;for(;U<280;)k.lens[U++]=7;for(;U<288;)k.lens[U++]=8;for(S(1,k.lens,0,288,C,0,k.work,{bits:9}),U=0;U<32;)k.lens[U++]=5;S(2,k.lens,0,32,I,0,k.work,{bits:5}),L=!1}k.lencode=C,k.lenbits=9,k.distcode=I,k.distbits=5}function G(k,U,B,K){var J,ie=k.state;return null===ie.window&&(ie.wsize=1<<ie.wbits,ie.wnext=0,ie.whave=0,ie.window=new o.Buf8(ie.wsize)),K>=ie.wsize?(o.arraySet(ie.window,U,B-ie.wsize,ie.wsize,0),ie.wnext=0,ie.whave=ie.wsize):(K<(J=ie.wsize-ie.wnext)&&(J=K),o.arraySet(ie.window,U,B-K,J,ie.wnext),(K-=J)?(o.arraySet(ie.window,U,B-K,K,0),ie.wnext=K,ie.whave=ie.wsize):(ie.wnext+=J,ie.wnext===ie.wsize&&(ie.wnext=0),ie.whave<ie.wsize&&(ie.whave+=J))),0}W.inflateReset=x,W.inflateReset2=w,W.inflateResetKeep=_,W.inflateInit=function(k){return D(k,15)},W.inflateInit2=D,W.inflate=function(k,U){var B,K,J,ie,re,q,Y,Z,Q,te,pe,z,oe,ae,ee,he,de,ue,be,ve,le,Ce,ye,ge,fe=0,xe=new o.Buf8(4),Te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!k||!k.state||!k.output||!k.input&&0!==k.avail_in)return c;12===(B=k.state).mode&&(B.mode=13),re=k.next_out,J=k.output,ie=k.next_in,K=k.input,Z=B.hold,Q=B.bits,te=q=k.avail_in,pe=Y=k.avail_out,Ce=d;e:for(;;)switch(B.mode){case s:if(0===B.wrap){B.mode=13;break}for(;Q<16;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(2&B.wrap&&35615===Z){xe[B.check=0]=255&Z,xe[1]=Z>>>8&255,B.check=b(B.check,xe,2,0),Q=Z=0,B.mode=2;break}if(B.flags=0,B.head&&(B.head.done=!1),!(1&B.wrap)||(((255&Z)<<8)+(Z>>8))%31){k.msg="incorrect header check",B.mode=30;break}if(8!=(15&Z)){k.msg="unknown compression method",B.mode=30;break}if(Q-=4,le=8+(15&(Z>>>=4)),0===B.wbits)B.wbits=le;else if(le>B.wbits){k.msg="invalid window size",B.mode=30;break}B.dmax=1<<le,k.adler=B.check=1,B.mode=512&Z?10:12,Q=Z=0;break;case 2:for(;Q<16;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(B.flags=Z,8!=(255&B.flags)){k.msg="unknown compression method",B.mode=30;break}if(57344&B.flags){k.msg="unknown header flags set",B.mode=30;break}B.head&&(B.head.text=Z>>8&1),512&B.flags&&(xe[0]=255&Z,xe[1]=Z>>>8&255,B.check=b(B.check,xe,2,0)),Q=Z=0,B.mode=3;case 3:for(;Q<32;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}B.head&&(B.head.time=Z),512&B.flags&&(xe[0]=255&Z,xe[1]=Z>>>8&255,xe[2]=Z>>>16&255,xe[3]=Z>>>24&255,B.check=b(B.check,xe,4,0)),Q=Z=0,B.mode=4;case 4:for(;Q<16;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}B.head&&(B.head.xflags=255&Z,B.head.os=Z>>8),512&B.flags&&(xe[0]=255&Z,xe[1]=Z>>>8&255,B.check=b(B.check,xe,2,0)),Q=Z=0,B.mode=5;case 5:if(1024&B.flags){for(;Q<16;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}B.length=Z,B.head&&(B.head.extra_len=Z),512&B.flags&&(xe[0]=255&Z,xe[1]=Z>>>8&255,B.check=b(B.check,xe,2,0)),Q=Z=0}else B.head&&(B.head.extra=null);B.mode=6;case 6:if(1024&B.flags&&(q<(z=B.length)&&(z=q),z&&(B.head&&(le=B.head.extra_len-B.length,B.head.extra||(B.head.extra=new Array(B.head.extra_len)),o.arraySet(B.head.extra,K,ie,z,le)),512&B.flags&&(B.check=b(B.check,K,z,ie)),q-=z,ie+=z,B.length-=z),B.length))break e;B.length=0,B.mode=7;case 7:if(2048&B.flags){if(0===q)break e;for(z=0;le=K[ie+z++],B.head&&le&&B.length<65536&&(B.head.name+=String.fromCharCode(le)),le&&z<q;);if(512&B.flags&&(B.check=b(B.check,K,z,ie)),q-=z,ie+=z,le)break e}else B.head&&(B.head.name=null);B.length=0,B.mode=8;case 8:if(4096&B.flags){if(0===q)break e;for(z=0;le=K[ie+z++],B.head&&le&&B.length<65536&&(B.head.comment+=String.fromCharCode(le)),le&&z<q;);if(512&B.flags&&(B.check=b(B.check,K,z,ie)),q-=z,ie+=z,le)break e}else B.head&&(B.head.comment=null);B.mode=9;case 9:if(512&B.flags){for(;Q<16;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(Z!==(65535&B.check)){k.msg="header crc mismatch",B.mode=30;break}Q=Z=0}B.head&&(B.head.hcrc=B.flags>>9&1,B.head.done=!0),k.adler=B.check=0,B.mode=12;break;case 10:for(;Q<32;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}k.adler=B.check=h(Z),Q=Z=0,B.mode=11;case 11:if(0===B.havedict)return k.next_out=re,k.avail_out=Y,k.next_in=ie,k.avail_in=q,B.hold=Z,B.bits=Q,2;k.adler=B.check=1,B.mode=12;case 12:if(5===U||6===U)break e;case 13:if(B.last){Z>>>=7&Q,Q-=7&Q,B.mode=27;break}for(;Q<3;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}switch(B.last=1&Z,Q-=1,3&(Z>>>=1)){case 0:B.mode=14;break;case 1:if(N(B),B.mode=20,6!==U)break;Z>>>=2,Q-=2;break e;case 2:B.mode=17;break;case 3:k.msg="invalid block type",B.mode=30}Z>>>=2,Q-=2;break;case 14:for(Z>>>=7&Q,Q-=7&Q;Q<32;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if((65535&Z)!=(Z>>>16^65535)){k.msg="invalid stored block lengths",B.mode=30;break}if(B.length=65535&Z,Q=Z=0,B.mode=15,6===U)break e;case 15:B.mode=16;case 16:if(z=B.length){if(q<z&&(z=q),Y<z&&(z=Y),0===z)break e;o.arraySet(J,K,ie,z,re),q-=z,ie+=z,Y-=z,re+=z,B.length-=z;break}B.mode=12;break;case 17:for(;Q<14;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(B.nlen=257+(31&Z),Q-=5,B.ndist=1+(31&(Z>>>=5)),Q-=5,B.ncode=4+(15&(Z>>>=5)),Z>>>=4,Q-=4,286<B.nlen||30<B.ndist){k.msg="too many length or distance symbols",B.mode=30;break}B.have=0,B.mode=18;case 18:for(;B.have<B.ncode;){for(;Q<3;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}B.lens[Te[B.have++]]=7&Z,Z>>>=3,Q-=3}for(;B.have<19;)B.lens[Te[B.have++]]=0;if(B.lencode=B.lendyn,B.lenbits=7,Ce=S(0,B.lens,0,19,B.lencode,0,B.work,ye={bits:B.lenbits}),B.lenbits=ye.bits,Ce){k.msg="invalid code lengths set",B.mode=30;break}B.have=0,B.mode=19;case 19:for(;B.have<B.nlen+B.ndist;){for(;he=(fe=B.lencode[Z&(1<<B.lenbits)-1])>>>16&255,de=65535&fe,!((ee=fe>>>24)<=Q);){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(de<16)Z>>>=ee,Q-=ee,B.lens[B.have++]=de;else{if(16===de){for(ge=ee+2;Q<ge;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(Z>>>=ee,Q-=ee,0===B.have){k.msg="invalid bit length repeat",B.mode=30;break}le=B.lens[B.have-1],z=3+(3&Z),Z>>>=2,Q-=2}else if(17===de){for(ge=ee+3;Q<ge;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}Q-=ee,le=0,z=3+(7&(Z>>>=ee)),Z>>>=3,Q-=3}else{for(ge=ee+7;Q<ge;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}Q-=ee,le=0,z=11+(127&(Z>>>=ee)),Z>>>=7,Q-=7}if(B.have+z>B.nlen+B.ndist){k.msg="invalid bit length repeat",B.mode=30;break}for(;z--;)B.lens[B.have++]=le}}if(30===B.mode)break;if(0===B.lens[256]){k.msg="invalid code -- missing end-of-block",B.mode=30;break}if(B.lenbits=9,Ce=S(1,B.lens,0,B.nlen,B.lencode,0,B.work,ye={bits:B.lenbits}),B.lenbits=ye.bits,Ce){k.msg="invalid literal/lengths set",B.mode=30;break}if(B.distbits=6,B.distcode=B.distdyn,Ce=S(2,B.lens,B.nlen,B.ndist,B.distcode,0,B.work,ye={bits:B.distbits}),B.distbits=ye.bits,Ce){k.msg="invalid distances set",B.mode=30;break}if(B.mode=20,6===U)break e;case 20:B.mode=21;case 21:if(6<=q&&258<=Y){k.next_out=re,k.avail_out=Y,k.next_in=ie,k.avail_in=q,B.hold=Z,B.bits=Q,f(k,pe),re=k.next_out,J=k.output,Y=k.avail_out,ie=k.next_in,K=k.input,q=k.avail_in,Z=B.hold,Q=B.bits,12===B.mode&&(B.back=-1);break}for(B.back=0;he=(fe=B.lencode[Z&(1<<B.lenbits)-1])>>>16&255,de=65535&fe,!((ee=fe>>>24)<=Q);){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(he&&!(240&he)){for(ue=ee,be=he,ve=de;he=(fe=B.lencode[ve+((Z&(1<<ue+be)-1)>>ue)])>>>16&255,de=65535&fe,!(ue+(ee=fe>>>24)<=Q);){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}Z>>>=ue,Q-=ue,B.back+=ue}if(Z>>>=ee,Q-=ee,B.back+=ee,B.length=de,0===he){B.mode=26;break}if(32&he){B.back=-1,B.mode=12;break}if(64&he){k.msg="invalid literal/length code",B.mode=30;break}B.extra=15&he,B.mode=22;case 22:if(B.extra){for(ge=B.extra;Q<ge;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}B.length+=Z&(1<<B.extra)-1,Z>>>=B.extra,Q-=B.extra,B.back+=B.extra}B.was=B.length,B.mode=23;case 23:for(;he=(fe=B.distcode[Z&(1<<B.distbits)-1])>>>16&255,de=65535&fe,!((ee=fe>>>24)<=Q);){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(!(240&he)){for(ue=ee,be=he,ve=de;he=(fe=B.distcode[ve+((Z&(1<<ue+be)-1)>>ue)])>>>16&255,de=65535&fe,!(ue+(ee=fe>>>24)<=Q);){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}Z>>>=ue,Q-=ue,B.back+=ue}if(Z>>>=ee,Q-=ee,B.back+=ee,64&he){k.msg="invalid distance code",B.mode=30;break}B.offset=de,B.extra=15&he,B.mode=24;case 24:if(B.extra){for(ge=B.extra;Q<ge;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}B.offset+=Z&(1<<B.extra)-1,Z>>>=B.extra,Q-=B.extra,B.back+=B.extra}if(B.offset>B.dmax){k.msg="invalid distance too far back",B.mode=30;break}B.mode=25;case 25:if(0===Y)break e;if(B.offset>(z=pe-Y)){if((z=B.offset-z)>B.whave&&B.sane){k.msg="invalid distance too far back",B.mode=30;break}oe=z>B.wnext?B.wsize-(z-=B.wnext):B.wnext-z,z>B.length&&(z=B.length),ae=B.window}else ae=J,oe=re-B.offset,z=B.length;for(Y<z&&(z=Y),Y-=z,B.length-=z;J[re++]=ae[oe++],--z;);0===B.length&&(B.mode=21);break;case 26:if(0===Y)break e;J[re++]=B.length,Y--,B.mode=21;break;case 27:if(B.wrap){for(;Q<32;){if(0===q)break e;q--,Z|=K[ie++]<<Q,Q+=8}if(k.total_out+=pe-=Y,B.total+=pe,pe&&(k.adler=B.check=B.flags?b(B.check,J,pe,re-pe):P(B.check,J,pe,re-pe)),pe=Y,(B.flags?Z:h(Z))!==B.check){k.msg="incorrect data check",B.mode=30;break}Q=Z=0}B.mode=28;case 28:if(B.wrap&&B.flags){for(;Q<32;){if(0===q)break e;q--,Z+=K[ie++]<<Q,Q+=8}if(Z!==(4294967295&B.total)){k.msg="incorrect length check",B.mode=30;break}Q=Z=0}B.mode=29;case 29:Ce=1;break e;case 30:Ce=-3;break e;case 31:return-4;default:return c}return k.next_out=re,k.avail_out=Y,k.next_in=ie,k.avail_in=q,B.hold=Z,B.bits=Q,(B.wsize||pe!==k.avail_out&&B.mode<30&&(B.mode<27||4!==U))&&G(k,k.output,k.next_out,pe-k.avail_out)?(B.mode=31,-4):(pe-=k.avail_out,k.total_in+=te-=k.avail_in,k.total_out+=pe,B.total+=pe,B.wrap&&pe&&(k.adler=B.check=B.flags?b(B.check,J,pe,k.next_out-pe):P(B.check,J,pe,k.next_out-pe)),k.data_type=B.bits+(B.last?64:0)+(12===B.mode?128:0)+(20===B.mode||15===B.mode?256:0),(0==te&&0===pe||4===U)&&Ce===d&&(Ce=-5),Ce)},W.inflateEnd=function(k){if(!k||!k.state)return c;var U=k.state;return U.window&&(U.window=null),k.state=null,d},W.inflateGetHeader=function(k,U){var B;return k&&k.state&&2&(B=k.state).wrap?((B.head=U).done=!1,d):c},W.inflateSetDictionary=function(k,U){var B,K=U.length;return k&&k.state?0!==(B=k.state).wrap&&11!==B.mode?c:11===B.mode&&P(1,U,K,0)!==B.check?-3:G(k,U,K,K)?(B.mode=31,-4):(B.havedict=1,d):c},W.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(Ze,M,W){"use strict";var o=Ze("../utils/common"),P=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],b=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],f=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],S=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];M.exports=function(T,y,d,c,s,a,u,h){var g,_,x,w,D,C,I,L,N,G=h.bits,k=0,U=0,B=0,K=0,J=0,ie=0,re=0,q=0,Y=0,Z=0,Q=null,te=0,pe=new o.Buf16(16),z=new o.Buf16(16),oe=null,ae=0;for(k=0;k<=15;k++)pe[k]=0;for(U=0;U<c;U++)pe[y[d+U]]++;for(J=G,K=15;1<=K&&0===pe[K];K--);if(K<J&&(J=K),0===K)return s[a++]=20971520,s[a++]=20971520,h.bits=1,0;for(B=1;B<K&&0===pe[B];B++);for(J<B&&(J=B),k=q=1;k<=15;k++)if(q<<=1,(q-=pe[k])<0)return-1;if(0<q&&(0===T||1!==K))return-1;for(z[1]=0,k=1;k<15;k++)z[k+1]=z[k]+pe[k];for(U=0;U<c;U++)0!==y[d+U]&&(u[z[y[d+U]]++]=U);if(C=0===T?(Q=oe=u,19):1===T?(Q=P,te-=257,oe=b,ae-=257,256):(Q=f,oe=S,-1),k=B,D=a,re=U=Z=0,x=-1,w=(Y=1<<(ie=J))-1,1===T&&852<Y||2===T&&592<Y)return 1;for(;;){for(I=k-re,N=u[U]<C?(L=0,u[U]):u[U]>C?(L=oe[ae+u[U]],Q[te+u[U]]):(L=96,0),g=1<<k-re,B=_=1<<ie;s[D+(Z>>re)+(_-=g)]=I<<24|L<<16|N,0!==_;);for(g=1<<k-1;Z&g;)g>>=1;if(0!==g?(Z&=g-1,Z+=g):Z=0,U++,0==--pe[k]){if(k===K)break;k=y[d+u[U]]}if(J<k&&(Z&w)!==x){for(0===re&&(re=J),D+=B,q=1<<(ie=k-re);ie+re<K&&!((q-=pe[ie+re])<=0);)ie++,q<<=1;if(Y+=1<<ie,1===T&&852<Y||2===T&&592<Y)return 1;s[x=Z&w]=J<<24|ie<<16|D-a}}return 0!==Z&&(s[D+Z]=k-re<<24|64<<16),h.bits=J,0}},{"../utils/common":41}],51:[function(Ze,M,W){"use strict";M.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(Ze,M,W){"use strict";var o=Ze("../utils/common");function f(fe){for(var xe=fe.length;0<=--xe;)fe[xe]=0}var y=256,d=286,c=30,u=15,h=16,C=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(576);f(G);var k=new Array(60);f(k);var U=new Array(512);f(U);var B=new Array(256);f(B);var K=new Array(29);f(K);var J,ie,re,q=new Array(c);function Y(fe,xe,Te,Ee,Oe){this.static_tree=fe,this.extra_bits=xe,this.extra_base=Te,this.elems=Ee,this.max_length=Oe,this.has_stree=fe&&fe.length}function Z(fe,xe){this.dyn_tree=fe,this.max_code=0,this.stat_desc=xe}function Q(fe){return fe<256?U[fe]:U[256+(fe>>>7)]}function te(fe,xe){fe.pending_buf[fe.pending++]=255&xe,fe.pending_buf[fe.pending++]=xe>>>8&255}function pe(fe,xe,Te){fe.bi_valid>h-Te?(fe.bi_buf|=xe<<fe.bi_valid&65535,te(fe,fe.bi_buf),fe.bi_buf=xe>>h-fe.bi_valid,fe.bi_valid+=Te-h):(fe.bi_buf|=xe<<fe.bi_valid&65535,fe.bi_valid+=Te)}function z(fe,xe,Te){pe(fe,Te[2*xe],Te[2*xe+1])}function oe(fe,xe){for(var Te=0;Te|=1&fe,fe>>>=1,Te<<=1,0<--xe;);return Te>>>1}function ae(fe,xe,Te){var Ee,Oe,ze=new Array(u+1),$e=0;for(Ee=1;Ee<=u;Ee++)ze[Ee]=$e=$e+Te[Ee-1]<<1;for(Oe=0;Oe<=xe;Oe++){var Be=fe[2*Oe+1];0!==Be&&(fe[2*Oe]=oe(ze[Be]++,Be))}}function ee(fe){var xe;for(xe=0;xe<d;xe++)fe.dyn_ltree[2*xe]=0;for(xe=0;xe<c;xe++)fe.dyn_dtree[2*xe]=0;for(xe=0;xe<19;xe++)fe.bl_tree[2*xe]=0;fe.dyn_ltree[512]=1,fe.opt_len=fe.static_len=0,fe.last_lit=fe.matches=0}function he(fe){8<fe.bi_valid?te(fe,fe.bi_buf):0<fe.bi_valid&&(fe.pending_buf[fe.pending++]=fe.bi_buf),fe.bi_buf=0,fe.bi_valid=0}function de(fe,xe,Te,Ee){var Oe=2*xe,ze=2*Te;return fe[Oe]<fe[ze]||fe[Oe]===fe[ze]&&Ee[xe]<=Ee[Te]}function ue(fe,xe,Te){for(var Ee=fe.heap[Te],Oe=Te<<1;Oe<=fe.heap_len&&(Oe<fe.heap_len&&de(xe,fe.heap[Oe+1],fe.heap[Oe],fe.depth)&&Oe++,!de(xe,Ee,fe.heap[Oe],fe.depth));)fe.heap[Te]=fe.heap[Oe],Te=Oe,Oe<<=1;fe.heap[Te]=Ee}function be(fe,xe,Te){var Ee,Oe,ze,$e,Be=0;if(0!==fe.last_lit)for(;Ee=fe.pending_buf[fe.d_buf+2*Be]<<8|fe.pending_buf[fe.d_buf+2*Be+1],Oe=fe.pending_buf[fe.l_buf+Be],Be++,0===Ee?z(fe,Oe,xe):(z(fe,(ze=B[Oe])+y+1,xe),0!==($e=C[ze])&&pe(fe,Oe-=K[ze],$e),z(fe,ze=Q(--Ee),Te),0!==($e=I[ze])&&pe(fe,Ee-=q[ze],$e)),Be<fe.last_lit;);z(fe,256,xe)}function ve(fe,xe){var Te,Ee,Oe,ze=xe.dyn_tree,$e=xe.stat_desc.static_tree,Be=xe.stat_desc.has_stree,Ue=xe.stat_desc.elems,ot=-1;for(fe.heap_len=0,fe.heap_max=573,Te=0;Te<Ue;Te++)0!==ze[2*Te]?(fe.heap[++fe.heap_len]=ot=Te,fe.depth[Te]=0):ze[2*Te+1]=0;for(;fe.heap_len<2;)ze[2*(Oe=fe.heap[++fe.heap_len]=ot<2?++ot:0)]=1,fe.depth[Oe]=0,fe.opt_len--,Be&&(fe.static_len-=$e[2*Oe+1]);for(xe.max_code=ot,Te=fe.heap_len>>1;1<=Te;Te--)ue(fe,ze,Te);for(Oe=Ue;Te=fe.heap[1],fe.heap[1]=fe.heap[fe.heap_len--],ue(fe,ze,1),Ee=fe.heap[1],fe.heap[--fe.heap_max]=Te,fe.heap[--fe.heap_max]=Ee,ze[2*Oe]=ze[2*Te]+ze[2*Ee],fe.depth[Oe]=(fe.depth[Te]>=fe.depth[Ee]?fe.depth[Te]:fe.depth[Ee])+1,ze[2*Te+1]=ze[2*Ee+1]=Oe,fe.heap[1]=Oe++,ue(fe,ze,1),2<=fe.heap_len;);fe.heap[--fe.heap_max]=fe.heap[1],function(st,et){var Ke,Ye,Pe,Se,Re,Fe,Xe=et.dyn_tree,tt=et.max_code,vt=et.stat_desc.static_tree,qe=et.stat_desc.has_stree,At=et.stat_desc.extra_bits,Tt=et.stat_desc.extra_base,qt=et.stat_desc.max_length,wt=0;for(Se=0;Se<=u;Se++)st.bl_count[Se]=0;for(Xe[2*st.heap[st.heap_max]+1]=0,Ke=st.heap_max+1;Ke<573;Ke++)qt<(Se=Xe[2*Xe[2*(Ye=st.heap[Ke])+1]+1]+1)&&(Se=qt,wt++),Xe[2*Ye+1]=Se,tt<Ye||(st.bl_count[Se]++,Re=0,Tt<=Ye&&(Re=At[Ye-Tt]),st.opt_len+=(Fe=Xe[2*Ye])*(Se+Re),qe&&(st.static_len+=Fe*(vt[2*Ye+1]+Re)));if(0!==wt){do{for(Se=qt-1;0===st.bl_count[Se];)Se--;st.bl_count[Se]--,st.bl_count[Se+1]+=2,st.bl_count[qt]--,wt-=2}while(0<wt);for(Se=qt;0!==Se;Se--)for(Ye=st.bl_count[Se];0!==Ye;)tt<(Pe=st.heap[--Ke])||(Xe[2*Pe+1]!==Se&&(st.opt_len+=(Se-Xe[2*Pe+1])*Xe[2*Pe],Xe[2*Pe+1]=Se),Ye--)}}(fe,xe),ae(ze,ot,fe.bl_count)}function le(fe,xe,Te){var Ee,Oe,ze=-1,$e=xe[1],Be=0,Ue=7,ot=4;for(0===$e&&(Ue=138,ot=3),xe[2*(Te+1)+1]=65535,Ee=0;Ee<=Te;Ee++)Oe=$e,$e=xe[2*(Ee+1)+1],++Be<Ue&&Oe===$e||(Be<ot?fe.bl_tree[2*Oe]+=Be:0!==Oe?(Oe!==ze&&fe.bl_tree[2*Oe]++,fe.bl_tree[32]++):Be<=10?fe.bl_tree[34]++:fe.bl_tree[36]++,ze=Oe,ot=(Be=0)===$e?(Ue=138,3):Oe===$e?(Ue=6,3):(Ue=7,4))}function Ce(fe,xe,Te){var Ee,Oe,ze=-1,$e=xe[1],Be=0,Ue=7,ot=4;for(0===$e&&(Ue=138,ot=3),Ee=0;Ee<=Te;Ee++)if(Oe=$e,$e=xe[2*(Ee+1)+1],!(++Be<Ue&&Oe===$e)){if(Be<ot)for(;z(fe,Oe,fe.bl_tree),0!=--Be;);else 0!==Oe?(Oe!==ze&&(z(fe,Oe,fe.bl_tree),Be--),z(fe,16,fe.bl_tree),pe(fe,Be-3,2)):Be<=10?(z(fe,17,fe.bl_tree),pe(fe,Be-3,3)):(z(fe,18,fe.bl_tree),pe(fe,Be-11,7));ze=Oe,ot=(Be=0)===$e?(Ue=138,3):Oe===$e?(Ue=6,3):(Ue=7,4)}}f(q);var ye=!1;function ge(fe,xe,Te,Ee){var Oe,ze,$e;pe(fe,0+(Ee?1:0),3),ze=xe,$e=Te,he(Oe=fe),te(Oe,$e),te(Oe,~$e),o.arraySet(Oe.pending_buf,Oe.window,ze,$e,Oe.pending),Oe.pending+=$e}W._tr_init=function(fe){ye||(function(){var xe,Te,Ee,Oe,ze,$e=new Array(u+1);for(Oe=Ee=0;Oe<28;Oe++)for(K[Oe]=Ee,xe=0;xe<1<<C[Oe];xe++)B[Ee++]=Oe;for(B[Ee-1]=Oe,Oe=ze=0;Oe<16;Oe++)for(q[Oe]=ze,xe=0;xe<1<<I[Oe];xe++)U[ze++]=Oe;for(ze>>=7;Oe<c;Oe++)for(q[Oe]=ze<<7,xe=0;xe<1<<I[Oe]-7;xe++)U[256+ze++]=Oe;for(Te=0;Te<=u;Te++)$e[Te]=0;for(xe=0;xe<=143;)G[2*xe+1]=8,xe++,$e[8]++;for(;xe<=255;)G[2*xe+1]=9,xe++,$e[9]++;for(;xe<=279;)G[2*xe+1]=7,xe++,$e[7]++;for(;xe<=287;)G[2*xe+1]=8,xe++,$e[8]++;for(ae(G,287,$e),xe=0;xe<c;xe++)k[2*xe+1]=5,k[2*xe]=oe(xe,5);J=new Y(G,C,257,d,u),ie=new Y(k,I,0,c,u),re=new Y(new Array(0),L,0,19,7)}(),ye=!0),fe.l_desc=new Z(fe.dyn_ltree,J),fe.d_desc=new Z(fe.dyn_dtree,ie),fe.bl_desc=new Z(fe.bl_tree,re),fe.bi_buf=0,fe.bi_valid=0,ee(fe)},W._tr_stored_block=ge,W._tr_flush_block=function(fe,xe,Te,Ee){var Oe,ze,$e=0;0<fe.level?(2===fe.strm.data_type&&(fe.strm.data_type=function(Be){var Ue,ot=4093624447;for(Ue=0;Ue<=31;Ue++,ot>>>=1)if(1&ot&&0!==Be.dyn_ltree[2*Ue])return 0;if(0!==Be.dyn_ltree[18]||0!==Be.dyn_ltree[20]||0!==Be.dyn_ltree[26])return 1;for(Ue=32;Ue<y;Ue++)if(0!==Be.dyn_ltree[2*Ue])return 1;return 0}(fe)),ve(fe,fe.l_desc),ve(fe,fe.d_desc),$e=function(Be){var Ue;for(le(Be,Be.dyn_ltree,Be.l_desc.max_code),le(Be,Be.dyn_dtree,Be.d_desc.max_code),ve(Be,Be.bl_desc),Ue=18;3<=Ue&&0===Be.bl_tree[2*N[Ue]+1];Ue--);return Be.opt_len+=3*(Ue+1)+5+5+4,Ue}(fe),(ze=fe.static_len+3+7>>>3)<=(Oe=fe.opt_len+3+7>>>3)&&(Oe=ze)):Oe=ze=Te+5,Te+4<=Oe&&-1!==xe?ge(fe,xe,Te,Ee):4===fe.strategy||ze===Oe?(pe(fe,2+(Ee?1:0),3),be(fe,G,k)):(pe(fe,4+(Ee?1:0),3),function(Be,Ue,ot,st){var et;for(pe(Be,Ue-257,5),pe(Be,ot-1,5),pe(Be,st-4,4),et=0;et<st;et++)pe(Be,Be.bl_tree[2*N[et]+1],3);Ce(Be,Be.dyn_ltree,Ue-1),Ce(Be,Be.dyn_dtree,ot-1)}(fe,fe.l_desc.max_code+1,fe.d_desc.max_code+1,$e+1),be(fe,fe.dyn_ltree,fe.dyn_dtree)),ee(fe),Ee&&he(fe)},W._tr_tally=function(fe,xe,Te){return fe.pending_buf[fe.d_buf+2*fe.last_lit]=xe>>>8&255,fe.pending_buf[fe.d_buf+2*fe.last_lit+1]=255&xe,fe.pending_buf[fe.l_buf+fe.last_lit]=255&Te,fe.last_lit++,0===xe?fe.dyn_ltree[2*Te]++:(fe.matches++,xe--,fe.dyn_ltree[2*(B[Te]+y+1)]++,fe.dyn_dtree[2*Q(xe)]++),fe.last_lit===fe.lit_bufsize-1},W._tr_align=function(fe){var xe;pe(fe,2,3),z(fe,256,G),16===(xe=fe).bi_valid?(te(xe,xe.bi_buf),xe.bi_buf=0,xe.bi_valid=0):8<=xe.bi_valid&&(xe.pending_buf[xe.pending++]=255&xe.bi_buf,xe.bi_buf>>=8,xe.bi_valid-=8)}},{"../utils/common":41}],53:[function(Ze,M,W){"use strict";M.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(Ze,M,W){(function(o){!function(P,b){"use strict";if(!P.setImmediate){var f,S,T,y,d=1,c={},s=!1,a=P.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(P);u=u&&u.setTimeout?u:P,f="[object process]"==={}.toString.call(P.process)?function(x){process.nextTick(function(){g(x)})}:function(){if(P.postMessage&&!P.importScripts){var x=!0,w=P.onmessage;return P.onmessage=function(){x=!1},P.postMessage("","*"),P.onmessage=w,x}}()?(y="setImmediate$"+Math.random()+"$",P.addEventListener?P.addEventListener("message",_,!1):P.attachEvent("onmessage",_),function(x){P.postMessage(y+x,"*")}):P.MessageChannel?((T=new MessageChannel).port1.onmessage=function(x){g(x.data)},function(x){T.port2.postMessage(x)}):a&&"onreadystatechange"in a.createElement("script")?(S=a.documentElement,function(x){var w=a.createElement("script");w.onreadystatechange=function(){g(x),w.onreadystatechange=null,S.removeChild(w),w=null},S.appendChild(w)}):function(x){setTimeout(g,0,x)},u.setImmediate=function(x){"function"!=typeof x&&(x=new Function(""+x));for(var w=new Array(arguments.length-1),D=0;D<w.length;D++)w[D]=arguments[D+1];return c[d]={callback:x,args:w},f(d),d++},u.clearImmediate=h}function h(x){delete c[x]}function g(x){if(s)setTimeout(g,0,x);else{var w=c[x];if(w){s=!0;try{!function(D){var C=D.callback,I=D.args;switch(I.length){case 0:C();break;case 1:C(I[0]);break;case 2:C(I[0],I[1]);break;case 3:C(I[0],I[1],I[2]);break;default:C.apply(b,I)}}(w)}finally{h(x),s=!1}}}}function _(x){x.source===P&&"string"==typeof x.data&&0===x.data.indexOf(y)&&g(+x.data.slice(y.length))}}(typeof self>"u"?void 0===o?this:o:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)},5793:(In,Ze,M)=>{"use strict";M.d(Ze,{t:()=>P});var W=M(6343),o=M(8778);class P extends W.B7{constructor(f){super(),this._value=f}get value(){return this.getValue()}_subscribe(f){const S=super._subscribe(f);return S&&!S.closed&&f.next(this._value),S}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.P;return this._value}next(f){super.next(this._value=f)}}},8556:(In,Ze,M)=>{"use strict";M.d(Ze,{c:()=>d});var W=M(2457),P=M(8838),b=M(9645),S=M(2307),T=M(1014),y=M(8985);let d=(()=>{class s{constructor(u){this._isScalar=!1,u&&(this._subscribe=u)}lift(u){const h=new s;return h.source=this,h.operator=u,h}subscribe(u,h,g){const{operator:_}=this,x=function f(s,a,u){if(s){if(s instanceof W.v)return s;if(s[P.D])return s[P.D]()}return s||a||u?new W.v(s,a,u):new W.v(b.I)}(u,h,g);if(x.add(_?_.call(x,this.source):this.source||y.$.useDeprecatedSynchronousErrorHandling&&!x.syncErrorThrowable?this._subscribe(x):this._trySubscribe(x)),y.$.useDeprecatedSynchronousErrorHandling&&x.syncErrorThrowable&&(x.syncErrorThrowable=!1,x.syncErrorThrown))throw x.syncErrorValue;return x}_trySubscribe(u){try{return this._subscribe(u)}catch(h){y.$.useDeprecatedSynchronousErrorHandling&&(u.syncErrorThrown=!0,u.syncErrorValue=h),function o(s){for(;s;){const{closed:a,destination:u,isStopped:h}=s;if(a||h)return!1;s=u&&u instanceof W.v?u:null}return!0}(u)?u.error(h):console.warn(h)}}forEach(u,h){return new(h=c(h))((g,_)=>{let x;x=this.subscribe(w=>{try{u(w)}catch(D){_(D),x&&x.unsubscribe()}},_,g)})}_subscribe(u){const{source:h}=this;return h&&h.subscribe(u)}[S.s](){return this}pipe(...u){return 0===u.length?this:(0,T.m)(u)(this)}toPromise(u){return new(u=c(u))((h,g)=>{let _;this.subscribe(x=>_=x,x=>g(x),()=>h(_))})}}return s.create=a=>new s(a),s})();function c(s){if(s||(s=y.$.Promise||Promise),!s)throw new Error("no Promise impl found");return s}},9645:(In,Ze,M)=>{"use strict";M.d(Ze,{I:()=>P});var W=M(8985),o=M(6378);const P={closed:!0,next(b){},error(b){if(W.$.useDeprecatedSynchronousErrorHandling)throw b;(0,o.T)(b)},complete(){}}},3917:(In,Ze,M)=>{"use strict";M.d(Ze,{m:()=>I});var W=M(6343),o=M(4988),b=M(4910);const T=new class f extends b.q{}(class P extends o.R{constructor(G,k){super(G,k),this.scheduler=G,this.work=k}schedule(G,k=0){return k>0?super.schedule(G,k):(this.delay=k,this.state=G,this.scheduler.flush(this),this)}execute(G,k){return k>0||this.closed?super.execute(G,k):this._execute(G,k)}requestAsyncId(G,k,U=0){return null!==U&&U>0||null===U&&this.delay>0?super.requestAsyncId(G,k,U):G.flush(this)}});var y=M(6313),d=M(2457),c=M(5124),s=M(5416),a=M(2995);class h{constructor(G,k,U){this.kind=G,this.value=k,this.error=U,this.hasValue="N"===G}observe(G){switch(this.kind){case"N":return G.next&&G.next(this.value);case"E":return G.error&&G.error(this.error);case"C":return G.complete&&G.complete()}}do(G,k,U){switch(this.kind){case"N":return G&&G(this.value);case"E":return k&&k(this.error);case"C":return U&&U()}}accept(G,k,U){return G&&"function"==typeof G.next?this.observe(G):this.do(G,k,U)}toObservable(){switch(this.kind){case"N":return(0,s.of)(this.value);case"E":return(0,a.$)(this.error);case"C":return(0,c.I)()}throw new Error("unexpected notification kind value")}static createNext(G){return typeof G<"u"?new h("N",G):h.undefinedValueNotification}static createError(G){return new h("E",void 0,G)}static createComplete(){return h.completeNotification}}h.completeNotification=new h("C"),h.undefinedValueNotification=new h("N",void 0);class x extends d.v{constructor(G,k,U=0){super(G),this.scheduler=k,this.delay=U}static dispatch(G){const{notification:k,destination:U}=G;k.observe(U),this.unsubscribe()}scheduleMessage(G){this.destination.add(this.scheduler.schedule(x.dispatch,this.delay,new w(G,this.destination)))}_next(G){this.scheduleMessage(h.createNext(G))}_error(G){this.scheduleMessage(h.createError(G)),this.unsubscribe()}_complete(){this.scheduleMessage(h.createComplete()),this.unsubscribe()}}class w{constructor(G,k){this.notification=G,this.destination=k}}var D=M(8778),C=M(1386);class I extends W.B7{constructor(G=Number.POSITIVE_INFINITY,k=Number.POSITIVE_INFINITY,U){super(),this.scheduler=U,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=G<1?1:G,this._windowTime=k<1?1:k,k===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(G){if(!this.isStopped){const k=this._events;k.push(G),k.length>this._bufferSize&&k.shift()}super.next(G)}nextTimeWindow(G){this.isStopped||(this._events.push(new L(this._getNow(),G)),this._trimBufferThenGetEvents()),super.next(G)}_subscribe(G){const k=this._infiniteTimeWindow,U=k?this._events:this._trimBufferThenGetEvents(),B=this.scheduler,K=U.length;let J;if(this.closed)throw new D.P;if(this.isStopped||this.hasError?J=y.y.EMPTY:(this.observers.push(G),J=new C.Y(this,G)),B&&G.add(G=new x(G,B)),k)for(let ie=0;ie<K&&!G.closed;ie++)G.next(U[ie]);else for(let ie=0;ie<K&&!G.closed;ie++)G.next(U[ie].value);return this.hasError?G.error(this.thrownError):this.isStopped&&G.complete(),J}_getNow(){return(this.scheduler||T).now()}_trimBufferThenGetEvents(){const G=this._getNow(),k=this._bufferSize,U=this._windowTime,B=this._events,K=B.length;let J=0;for(;J<K&&!(G-B[J].time<U);)J++;return K>k&&(J=Math.max(J,K-k)),J>0&&B.splice(0,J),B}}class L{constructor(G,k){this.time=G,this.value=k}}},6343:(In,Ze,M)=>{"use strict";M.d(Ze,{B7:()=>y,PJ:()=>T});var W=M(8556),o=M(2457),P=M(6313),b=M(8778),f=M(1386),S=M(8838);class T extends o.v{constructor(s){super(s),this.destination=s}}let y=(()=>{class c extends W.c{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[S.D](){return new T(this)}lift(a){const u=new d(this,this);return u.operator=a,u}next(a){if(this.closed)throw new b.P;if(!this.isStopped){const{observers:u}=this,h=u.length,g=u.slice();for(let _=0;_<h;_++)g[_].next(a)}}error(a){if(this.closed)throw new b.P;this.hasError=!0,this.thrownError=a,this.isStopped=!0;const{observers:u}=this,h=u.length,g=u.slice();for(let _=0;_<h;_++)g[_].error(a);this.observers.length=0}complete(){if(this.closed)throw new b.P;this.isStopped=!0;const{observers:a}=this,u=a.length,h=a.slice();for(let g=0;g<u;g++)h[g].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(a){if(this.closed)throw new b.P;return super._trySubscribe(a)}_subscribe(a){if(this.closed)throw new b.P;return this.hasError?(a.error(this.thrownError),P.y.EMPTY):this.isStopped?(a.complete(),P.y.EMPTY):(this.observers.push(a),new f.Y(this,a))}asObservable(){const a=new W.c;return a.source=this,a}}return c.create=(s,a)=>new d(s,a),c})();class d extends y{constructor(s,a){super(),this.destination=s,this.source=a}next(s){const{destination:a}=this;a&&a.next&&a.next(s)}error(s){const{destination:a}=this;a&&a.error&&this.destination.error(s)}complete(){const{destination:s}=this;s&&s.complete&&this.destination.complete()}_subscribe(s){const{source:a}=this;return a?this.source.subscribe(s):P.y.EMPTY}}},1386:(In,Ze,M)=>{"use strict";M.d(Ze,{Y:()=>o});var W=M(6313);class o extends W.y{constructor(b,f){super(),this.subject=b,this.subscriber=f,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const b=this.subject,f=b.observers;if(this.subject=null,!f||0===f.length||b.isStopped||b.closed)return;const S=f.indexOf(this.subscriber);-1!==S&&f.splice(S,1)}}},2457:(In,Ze,M)=>{"use strict";M.d(Ze,{v:()=>T});var W=M(1494),o=M(9645),P=M(6313),b=M(8838),f=M(8985),S=M(6378);class T extends P.y{constructor(c,s,a){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=o.I;break;case 1:if(!c){this.destination=o.I;break}if("object"==typeof c){c instanceof T?(this.syncErrorThrowable=c.syncErrorThrowable,this.destination=c,c.add(this)):(this.syncErrorThrowable=!0,this.destination=new y(this,c));break}default:this.syncErrorThrowable=!0,this.destination=new y(this,c,s,a)}}[b.D](){return this}static create(c,s,a){const u=new T(c,s,a);return u.syncErrorThrowable=!1,u}next(c){this.isStopped||this._next(c)}error(c){this.isStopped||(this.isStopped=!0,this._error(c))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(c){this.destination.next(c)}_error(c){this.destination.error(c),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:c}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=c,this}}class y extends T{constructor(c,s,a,u){super(),this._parentSubscriber=c;let h,g=this;(0,W.T)(s)?h=s:s&&(h=s.next,a=s.error,u=s.complete,s!==o.I&&(g=Object.create(s),(0,W.T)(g.unsubscribe)&&this.add(g.unsubscribe.bind(g)),g.unsubscribe=this.unsubscribe.bind(this))),this._context=g,this._next=h,this._error=a,this._complete=u}next(c){if(!this.isStopped&&this._next){const{_parentSubscriber:s}=this;f.$.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable?this.__tryOrSetError(s,this._next,c)&&this.unsubscribe():this.__tryOrUnsub(this._next,c)}}error(c){if(!this.isStopped){const{_parentSubscriber:s}=this,{useDeprecatedSynchronousErrorHandling:a}=f.$;if(this._error)a&&s.syncErrorThrowable?(this.__tryOrSetError(s,this._error,c),this.unsubscribe()):(this.__tryOrUnsub(this._error,c),this.unsubscribe());else if(s.syncErrorThrowable)a?(s.syncErrorValue=c,s.syncErrorThrown=!0):(0,S.T)(c),this.unsubscribe();else{if(this.unsubscribe(),a)throw c;(0,S.T)(c)}}}complete(){if(!this.isStopped){const{_parentSubscriber:c}=this;if(this._complete){const s=()=>this._complete.call(this._context);f.$.useDeprecatedSynchronousErrorHandling&&c.syncErrorThrowable?(this.__tryOrSetError(c,s),this.unsubscribe()):(this.__tryOrUnsub(s),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(c,s){try{c.call(this._context,s)}catch(a){if(this.unsubscribe(),f.$.useDeprecatedSynchronousErrorHandling)throw a;(0,S.T)(a)}}__tryOrSetError(c,s,a){if(!f.$.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{s.call(this._context,a)}catch(u){return f.$.useDeprecatedSynchronousErrorHandling?(c.syncErrorValue=u,c.syncErrorThrown=!0,!0):((0,S.T)(u),!0)}return!1}_unsubscribe(){const{_parentSubscriber:c}=this;this._context=null,this._parentSubscriber=null,c.unsubscribe()}}},6313:(In,Ze,M)=>{"use strict";M.d(Ze,{y:()=>S});var W=M(8021),o=M(3713),P=M(1494);const f=(()=>{function y(d){return Error.call(this),this.message=d?`${d.length} errors occurred during unsubscription:\n${d.map((c,s)=>`${s+1}) ${c.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=d,this}return y.prototype=Object.create(Error.prototype),y})();class S{constructor(d){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,d&&(this._ctorUnsubscribe=!0,this._unsubscribe=d)}unsubscribe(){let d;if(this.closed)return;let{_parentOrParents:c,_ctorUnsubscribe:s,_unsubscribe:a,_subscriptions:u}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,c instanceof S)c.remove(this);else if(null!==c)for(let h=0;h<c.length;++h)c[h].remove(this);if((0,P.T)(a)){s&&(this._unsubscribe=void 0);try{a.call(this)}catch(h){d=h instanceof f?T(h.errors):[h]}}if((0,W.c)(u)){let h=-1,g=u.length;for(;++h<g;){const _=u[h];if((0,o.G)(_))try{_.unsubscribe()}catch(x){d=d||[],x instanceof f?d=d.concat(T(x.errors)):d.push(x)}}}if(d)throw new f(d)}add(d){let c=d;if(!d)return S.EMPTY;switch(typeof d){case"function":c=new S(d);case"object":if(c===this||c.closed||"function"!=typeof c.unsubscribe)return c;if(this.closed)return c.unsubscribe(),c;if(!(c instanceof S)){const u=c;c=new S,c._subscriptions=[u]}break;default:throw new Error("unrecognized teardown "+d+" added to Subscription.")}let{_parentOrParents:s}=c;if(null===s)c._parentOrParents=this;else if(s instanceof S){if(s===this)return c;c._parentOrParents=[s,this]}else{if(-1!==s.indexOf(this))return c;s.push(this)}const a=this._subscriptions;return null===a?this._subscriptions=[c]:a.push(c),c}remove(d){const c=this._subscriptions;if(c){const s=c.indexOf(d);-1!==s&&c.splice(s,1)}}}var y;function T(y){return y.reduce((d,c)=>d.concat(c instanceof f?c.errors:c),[])}S.EMPTY=((y=new S).closed=!0,y)},8985:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>o});let W=!1;const o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(P){if(P){const b=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+b.stack)}else W&&console.log("RxJS: Back to a better error behavior. Thank you. <3");W=P},get useDeprecatedSynchronousErrorHandling(){return W}}},2559:(In,Ze,M)=>{"use strict";M.d(Ze,{gn:()=>S,tS:()=>y,zA:()=>b});var W=M(2457),o=M(8556),P=M(1006);class b extends W.v{constructor(c){super(),this.parent=c}_next(c){this.parent.notifyNext(c)}_error(c){this.parent.notifyError(c),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class S extends W.v{notifyNext(c){this.destination.next(c)}notifyError(c){this.destination.error(c)}notifyComplete(){this.destination.complete()}}function y(d,c){if(c.closed)return;if(d instanceof o.c)return d.subscribe(c);let s;try{s=(0,P.i)(d)(c)}catch(a){c.error(a)}return s}},1654:(In,Ze,M)=>{"use strict";M.d(Ze,{zV:()=>s});var W=M(7025),o=M(8021),P=M(2457);class b extends P.v{notifyNext(g,_,x,w,D){this.destination.next(_)}notifyError(g,_){this.destination.error(g)}notifyComplete(g){this.destination.complete()}}class f extends P.v{constructor(g,_,x){super(),this.parent=g,this.outerValue=_,this.outerIndex=x,this.index=0}_next(g){this.parent.notifyNext(this.outerValue,g,this.outerIndex,this.index++,this)}_error(g){this.parent.notifyError(g,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var S=M(1006),T=M(8556);function y(h,g,_,x,w=new f(h,_,x)){if(!w.closed)return g instanceof T.c?g.subscribe(w):(0,S.i)(g)(w)}var d=M(7180);const c={};function s(...h){let g,_;return(0,W.m)(h[h.length-1])&&(_=h.pop()),"function"==typeof h[h.length-1]&&(g=h.pop()),1===h.length&&(0,o.c)(h[0])&&(h=h[0]),(0,d.c)(h,_).lift(new a(g))}class a{constructor(g){this.resultSelector=g}call(g,_){return _.subscribe(new u(g,this.resultSelector))}}class u extends b{constructor(g,_){super(g),this.resultSelector=_,this.active=0,this.values=[],this.observables=[]}_next(g){this.values.push(c),this.observables.push(g)}_complete(){const g=this.observables,_=g.length;if(0===_)this.destination.complete();else{this.active=_,this.toRespond=_;for(let x=0;x<_;x++)this.add(y(this,g[x],void 0,x))}}notifyComplete(g){0==(this.active-=1)&&this.destination.complete()}notifyNext(g,_,x){const w=this.values,C=this.toRespond?w[x]===c?--this.toRespond:this.toRespond:0;w[x]=_,0===C&&(this.resultSelector?this._tryResultSelector(w):this.destination.next(w.slice()))}_tryResultSelector(g){let _;try{_=this.resultSelector.apply(this,g)}catch(x){return void this.destination.error(x)}this.destination.next(_)}}},5124:(In,Ze,M)=>{"use strict";M.d(Ze,{I:()=>P,w:()=>o});var W=M(8556);const o=new W.c(f=>f.complete());function P(f){return f?function b(f){return new W.c(S=>f.schedule(()=>S.complete()))}(f):o}},650:(In,Ze,M)=>{"use strict";M.d(Ze,{H:()=>g});var W=M(8556),o=M(1006),P=M(6313),b=M(2307),T=M(3509),y=M(9576),s=M(3833),a=M(178);function g(_,x){return x?function h(_,x){if(null!=_){if(function c(_){return _&&"function"==typeof _[b.s]}(_))return function f(_,x){return new W.c(w=>{const D=new P.y;return D.add(x.schedule(()=>{const C=_[b.s]();D.add(C.subscribe({next(I){D.add(x.schedule(()=>w.next(I)))},error(I){D.add(x.schedule(()=>w.error(I)))},complete(){D.add(x.schedule(()=>w.complete()))}}))})),D})}(_,x);if((0,s.y)(_))return function S(_,x){return new W.c(w=>{const D=new P.y;return D.add(x.schedule(()=>_.then(C=>{D.add(x.schedule(()=>{w.next(C),D.add(x.schedule(()=>w.complete()))}))},C=>{D.add(x.schedule(()=>w.error(C)))}))),D})}(_,x);if((0,a.X)(_))return(0,T.V)(_,x);if(function u(_){return _&&"function"==typeof _[y.lJ]}(_)||"string"==typeof _)return function d(_,x){if(!_)throw new Error("Iterable cannot be null");return new W.c(w=>{const D=new P.y;let C;return D.add(()=>{C&&"function"==typeof C.return&&C.return()}),D.add(x.schedule(()=>{C=_[y.lJ](),D.add(x.schedule(function(){if(w.closed)return;let I,L;try{const N=C.next();I=N.value,L=N.done}catch(N){return void w.error(N)}L?w.complete():(w.next(I),this.schedule())}))})),D})}(_,x)}throw new TypeError((null!==_&&typeof _||_)+" is not observable")}(_,x):_ instanceof W.c?_:new W.c((0,o.i)(_))}},7180:(In,Ze,M)=>{"use strict";M.d(Ze,{c:()=>b});var W=M(8556),o=M(9128),P=M(3509);function b(f,S){return S?(0,P.V)(f,S):new W.c((0,o.v)(f))}},954:(In,Ze,M)=>{"use strict";M.d(Ze,{R:()=>S});var W=M(8556),o=M(8021),P=M(1494),b=M(2123);function S(s,a,u,h){return(0,P.T)(u)&&(h=u,u=void 0),h?S(s,a,u).pipe((0,b.T)(g=>(0,o.c)(g)?h(...g):h(g))):new W.c(g=>{T(s,a,function _(x){g.next(arguments.length>1?Array.prototype.slice.call(arguments):x)},g,u)})}function T(s,a,u,h,g){let _;if(function c(s){return s&&"function"==typeof s.addEventListener&&"function"==typeof s.removeEventListener}(s)){const x=s;s.addEventListener(a,u,g),_=()=>x.removeEventListener(a,u,g)}else if(function d(s){return s&&"function"==typeof s.on&&"function"==typeof s.off}(s)){const x=s;s.on(a,u),_=()=>x.off(a,u)}else if(function y(s){return s&&"function"==typeof s.addListener&&"function"==typeof s.removeListener}(s)){const x=s;s.addListener(a,u),_=()=>x.removeListener(a,u)}else{if(!s||!s.length)throw new TypeError("Invalid event target");for(let x=0,w=s.length;x<w;x++)T(s[x],a,u,h,g)}h.add(_)}},6284:(In,Ze,M)=>{"use strict";M.d(Ze,{Y:()=>f});var W=M(8556),o=M(7469),P=M(8021);function f(T=0,y=o.b){return(!function b(T){return!(0,P.c)(T)&&T-parseFloat(T)+1>=0}(T)||T<0)&&(T=0),(!y||"function"!=typeof y.schedule)&&(y=o.b),new W.c(d=>(d.add(y.schedule(S,T,{subscriber:d,counter:0,period:T})),d))}function S(T){const{subscriber:y,counter:d,period:c}=T;y.next(d),this.schedule({subscriber:y,counter:d+1,period:c},c)}},5416:(In,Ze,M)=>{"use strict";M.d(Ze,{of:()=>b});var W=M(7025),o=M(7180),P=M(3509);function b(...f){let S=f[f.length-1];return(0,W.m)(S)?(f.pop(),(0,P.V)(f,S)):(0,o.c)(f)}},2995:(In,Ze,M)=>{"use strict";M.d(Ze,{$:()=>o});var W=M(8556);function o(b,f){return new W.c(f?S=>f.schedule(P,0,{error:b,subscriber:S}):S=>S.error(b))}function P({error:b,subscriber:f}){f.error(b)}},874:(In,Ze,M)=>{"use strict";M.d(Ze,{W:()=>o});var W=M(2559);function o(f){return function(T){const y=new P(f),d=T.lift(y);return y.caught=d}}class P{constructor(S){this.selector=S}call(S,T){return T.subscribe(new b(S,this.selector,this.caught))}}class b extends W.gn{constructor(S,T,y){super(S),this.selector=T,this.caught=y}error(S){if(!this.isStopped){let T;try{T=this.selector(S,this.caught)}catch(c){return void super.error(c)}this._unsubscribeAndRecycle();const y=new W.zA(this);this.add(y);const d=(0,W.tS)(T,y);d!==y&&this.add(d)}}}},5411:(In,Ze,M)=>{"use strict";M.d(Ze,{H:()=>o});var W=M(1483);function o(P,b){return(0,W.ZZ)(P,b,1)}},683:(In,Ze,M)=>{"use strict";M.d(Ze,{p:()=>o});var W=M(2457);function o(f,S){return function(y){return y.lift(new P(f,S))}}class P{constructor(S,T){this.predicate=S,this.thisArg=T}call(S,T){return T.subscribe(new b(S,this.predicate,this.thisArg))}}class b extends W.v{constructor(S,T,y){super(S),this.predicate=T,this.thisArg=y,this.count=0}_next(S){let T;try{T=this.predicate.call(this.thisArg,S,this.count++)}catch(y){return void this.destination.error(y)}T&&this.destination.next(S)}}},3295:(In,Ze,M)=>{"use strict";M.d(Ze,{j:()=>P});var W=M(2457),o=M(6313);function P(S){return T=>T.lift(new b(S))}class b{constructor(T){this.callback=T}call(T,y){return y.subscribe(new f(T,this.callback))}}class f extends W.v{constructor(T,y){super(T),this.add(new o.y(y))}}},2123:(In,Ze,M)=>{"use strict";M.d(Ze,{T:()=>o});var W=M(2457);function o(f,S){return function(y){if("function"!=typeof f)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return y.lift(new P(f,S))}}class P{constructor(S,T){this.project=S,this.thisArg=T}call(S,T){return T.subscribe(new b(S,this.project,this.thisArg))}}class b extends W.v{constructor(S,T,y){super(S),this.project=T,this.count=0,this.thisArg=y||this}_next(S){let T;try{T=this.project.call(this.thisArg,S,this.count++)}catch(y){return void this.destination.error(y)}this.destination.next(T)}}},1986:(In,Ze,M)=>{"use strict";M.d(Ze,{U:()=>P});var W=M(1483),o=M(8996);function P(b=Number.POSITIVE_INFINITY){return(0,W.ZZ)(o.D,b)}},1483:(In,Ze,M)=>{"use strict";M.d(Ze,{ZZ:()=>b});var W=M(2123),o=M(650),P=M(2559);function b(y,d,c=Number.POSITIVE_INFINITY){return"function"==typeof d?s=>s.pipe(b((a,u)=>(0,o.H)(y(a,u)).pipe((0,W.T)((h,g)=>d(a,h,u,g))),c)):("number"==typeof d&&(c=d),s=>s.lift(new f(y,c)))}class f{constructor(d,c=Number.POSITIVE_INFINITY){this.project=d,this.concurrent=c}call(d,c){return c.subscribe(new S(d,this.project,this.concurrent))}}class S extends P.gn{constructor(d,c,s=Number.POSITIVE_INFINITY){super(d),this.project=c,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(d){this.active<this.concurrent?this._tryNext(d):this.buffer.push(d)}_tryNext(d){let c;const s=this.index++;try{c=this.project(d,s)}catch(a){return void this.destination.error(a)}this.active++,this._innerSub(c)}_innerSub(d){const c=new P.zA(this),s=this.destination;s.add(c);const a=(0,P.tS)(d,c);a!==c&&s.add(a)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(d){this.destination.next(d)}notifyComplete(){const d=this.buffer;this.active--,d.length>0?this._next(d.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},8707:(In,Ze,M)=>{"use strict";M.d(Ze,{n:()=>b});var W=M(2123),o=M(650),P=M(2559);function b(T,y){return"function"==typeof y?d=>d.pipe(b((c,s)=>(0,o.H)(T(c,s)).pipe((0,W.T)((a,u)=>y(c,a,s,u))))):d=>d.lift(new f(T))}class f{constructor(y){this.project=y}call(y,d){return d.subscribe(new S(y,this.project))}}class S extends P.gn{constructor(y,d){super(y),this.project=d,this.index=0}_next(y){let d;const c=this.index++;try{d=this.project(y,c)}catch(s){return void this.destination.error(s)}this._innerSub(d)}_innerSub(y){const d=this.innerSubscription;d&&d.unsubscribe();const c=new P.zA(this),s=this.destination;s.add(c),this.innerSubscription=(0,P.tS)(y,c),this.innerSubscription!==c&&s.add(this.innerSubscription)}_complete(){const{innerSubscription:y}=this;(!y||y.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(y){this.destination.next(y)}}},5146:(In,Ze,M)=>{"use strict";M.d(Ze,{s:()=>b});var W=M(2457),o=M(8773),P=M(5124);function b(T){return y=>0===T?(0,P.I)():y.lift(new f(T))}class f{constructor(y){if(this.total=y,this.total<0)throw new o.k}call(y,d){return d.subscribe(new S(y,this.total))}}class S extends W.v{constructor(y,d){super(y),this.total=d,this.count=0}_next(y){const d=this.total,c=++this.count;c<=d&&(this.destination.next(y),c===d&&(this.destination.complete(),this.unsubscribe()))}}},8786:(In,Ze,M)=>{"use strict";M.d(Ze,{M:()=>b});var W=M(2457);function o(){}var P=M(1494);function b(T,y,d){return function(s){return s.lift(new f(T,y,d))}}class f{constructor(y,d,c){this.nextOrObserver=y,this.error=d,this.complete=c}call(y,d){return d.subscribe(new S(y,this.nextOrObserver,this.error,this.complete))}}class S extends W.v{constructor(y,d,c,s){super(y),this._tapNext=o,this._tapError=o,this._tapComplete=o,this._tapError=c||o,this._tapComplete=s||o,(0,P.T)(d)?(this._context=this,this._tapNext=d):d&&(this._context=d,this._tapNext=d.next||o,this._tapError=d.error||o,this._tapComplete=d.complete||o)}_next(y){try{this._tapNext.call(this._context,y)}catch(d){return void this.destination.error(d)}this.destination.next(y)}_error(y){try{this._tapError.call(this._context,y)}catch(d){return void this.destination.error(d)}this.destination.error(y)}_complete(){try{this._tapComplete.call(this._context)}catch(y){return void this.destination.error(y)}return this.destination.complete()}}},3509:(In,Ze,M)=>{"use strict";M.d(Ze,{V:()=>P});var W=M(8556),o=M(6313);function P(b,f){return new W.c(S=>{const T=new o.y;let y=0;return T.add(f.schedule(function(){y!==b.length?(S.next(b[y++]),S.closed||T.add(this.schedule())):S.complete()})),T})}},4988:(In,Ze,M)=>{"use strict";M.d(Ze,{R:()=>P});var W=M(6313);class o extends W.y{constructor(f,S){super()}schedule(f,S=0){return this}}class P extends o{constructor(f,S){super(f,S),this.scheduler=f,this.work=S,this.pending=!1}schedule(f,S=0){if(this.closed)return this;this.state=f;const T=this.id,y=this.scheduler;return null!=T&&(this.id=this.recycleAsyncId(y,T,S)),this.pending=!0,this.delay=S,this.id=this.id||this.requestAsyncId(y,this.id,S),this}requestAsyncId(f,S,T=0){return setInterval(f.flush.bind(f,this),T)}recycleAsyncId(f,S,T=0){if(null!==T&&this.delay===T&&!1===this.pending)return S;clearInterval(S)}execute(f,S){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const T=this._execute(f,S);if(T)return T;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(f,S){let y,T=!1;try{this.work(f)}catch(d){T=!0,y=!!d&&d||new Error(d)}if(T)return this.unsubscribe(),y}_unsubscribe(){const f=this.id,S=this.scheduler,T=S.actions,y=T.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==y&&T.splice(y,1),null!=f&&(this.id=this.recycleAsyncId(S,f,null)),this.delay=null}}},4910:(In,Ze,M)=>{"use strict";M.d(Ze,{q:()=>o});let W=(()=>{class P{constructor(f,S=P.now){this.SchedulerAction=f,this.now=S}schedule(f,S=0,T){return new this.SchedulerAction(this,f).schedule(T,S)}}return P.now=()=>Date.now(),P})();class o extends W{constructor(b,f=W.now){super(b,()=>o.delegate&&o.delegate!==this?o.delegate.now():f()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(b,f=0,S){return o.delegate&&o.delegate!==this?o.delegate.schedule(b,f,S):super.schedule(b,f,S)}flush(b){const{actions:f}=this;if(this.active)return void f.push(b);let S;this.active=!0;do{if(S=b.execute(b.state,b.delay))break}while(b=f.shift());if(this.active=!1,S){for(;b=f.shift();)b.unsubscribe();throw S}}}},7469:(In,Ze,M)=>{"use strict";M.d(Ze,{b:()=>b});var W=M(4988);const b=new(M(4910).q)(W.R)},9576:(In,Ze,M)=>{"use strict";M.d(Ze,{lJ:()=>o});const o=function W(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},2307:(In,Ze,M)=>{"use strict";M.d(Ze,{s:()=>W});const W="function"==typeof Symbol&&Symbol.observable||"@@observable"},8838:(In,Ze,M)=>{"use strict";M.d(Ze,{D:()=>W});const W="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},8773:(In,Ze,M)=>{"use strict";M.d(Ze,{k:()=>o});const o=(()=>{function P(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return P.prototype=Object.create(Error.prototype),P})()},8778:(In,Ze,M)=>{"use strict";M.d(Ze,{P:()=>o});const o=(()=>{function P(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return P.prototype=Object.create(Error.prototype),P})()},6378:(In,Ze,M)=>{"use strict";function W(o){setTimeout(()=>{throw o},0)}M.d(Ze,{T:()=>W})},8996:(In,Ze,M)=>{"use strict";function W(o){return o}M.d(Ze,{D:()=>W})},8021:(In,Ze,M)=>{"use strict";M.d(Ze,{c:()=>W});const W=Array.isArray||(o=>o&&"number"==typeof o.length)},178:(In,Ze,M)=>{"use strict";M.d(Ze,{X:()=>W});const W=o=>o&&"number"==typeof o.length&&"function"!=typeof o},1494:(In,Ze,M)=>{"use strict";function W(o){return"function"==typeof o}M.d(Ze,{T:()=>W})},3713:(In,Ze,M)=>{"use strict";function W(o){return null!==o&&"object"==typeof o}M.d(Ze,{G:()=>W})},3833:(In,Ze,M)=>{"use strict";function W(o){return!!o&&"function"!=typeof o.subscribe&&"function"==typeof o.then}M.d(Ze,{y:()=>W})},7025:(In,Ze,M)=>{"use strict";function W(o){return o&&"function"==typeof o.schedule}M.d(Ze,{m:()=>W})},1014:(In,Ze,M)=>{"use strict";M.d(Ze,{F:()=>o,m:()=>P});var W=M(8996);function o(...b){return P(b)}function P(b){return 0===b.length?W.D:1===b.length?b[0]:function(S){return b.reduce((T,y)=>y(T),S)}}},1006:(In,Ze,M)=>{"use strict";M.d(Ze,{i:()=>s});var W=M(9128),o=M(6378),b=M(9576),S=M(2307),y=M(178),d=M(3833),c=M(3713);const s=a=>{if(a&&"function"==typeof a[S.s])return(a=>u=>{const h=a[S.s]();if("function"!=typeof h.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return h.subscribe(u)})(a);if((0,y.X)(a))return(0,W.v)(a);if((0,d.y)(a))return(a=>u=>(a.then(h=>{u.closed||(u.next(h),u.complete())},h=>u.error(h)).then(null,o.T),u))(a);if(a&&"function"==typeof a[b.lJ])return(a=>u=>{const h=a[b.lJ]();for(;;){let g;try{g=h.next()}catch(_){return u.error(_),u}if(g.done){u.complete();break}if(u.next(g.value),u.closed)break}return"function"==typeof h.return&&u.add(()=>{h.return&&h.return()}),u})(a);{const h=`You provided ${(0,c.G)(a)?"an invalid object":`'${a}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(h)}}},9128:(In,Ze,M)=>{"use strict";M.d(Ze,{v:()=>W});const W=o=>P=>{for(let b=0,f=o.length;b<f&&!P.closed;b++)P.next(o[b]);P.complete()}},1522:(In,Ze,M)=>{"use strict";M.d(Ze,{o:()=>T});var W=M(7788),o=M(3746),P=M(3917),b=M(242),f=M(79),S=M(3527);let T=(()=>{class y{constructor(c,s,a,u){this.scopeService=c,this.deviceInfoService=s,this.profileService=a,this.translationService=u,this.toggleUserMenuState=(0,W.vPA)(!1),this.toggleContainerMenuState=(0,W.vPA)(!1),this.displayedSlots=new P.m,this.displayedSlots$=this.displayedSlots.asObservable(),this.toggleUserMenu=()=>{this.toggleUserMenuState.set(!this.toggleUserMenuState())},this.toggleContainerMenu=()=>{this.toggleContainerMenuState.set(!this.toggleContainerMenuState())},this.userInfo=s.getUserAgentInfo(),this.template=c.getMiniScope().navigationTemplate,this.scope=c.getScope(),this.user=this.profileService.profile,this.profileService.profileChanged$.subscribe(h=>{this.user=h,this.displayedSlots.next(this.getNavigationSlots())})}getNavigationSlots(){let c=JSON.parse(this.template.JsonValue);this.configuration=JSON.parse(this.template.Configuration);let s=this.resolveShowMoreBreakpoint(),a=c.filter(x=>1==x.disabled||this.resolveFeatureFlagDependency(x.featureFlagDependency)).map(x=>this.resolveAttributes(x));a.sort((x,w)=>x.position-w.position);let u=a.length>s?a.slice(0,s-1):a;u.forEach(x=>{this.userInfo.isApp||(x.template="topMenuItem"),x.beginGroup=!0});let g={id:"3753fa5d-8ace-45f8-a6f1-053c2d014ffd",editType:"showMoreMenu",beginGroup:!0,editable:!1,displayVariantDesktop:"text",displayVariantMobile:"text",displayVariantApp:"icon-text",text:"Mehr",icon:"fa-solid fa-ellipsis",url:"",disabled:!1,linkAttr:"",position:s,translate:!0,overrides:{},featureFlagDependency:"none",items:a.length!=u.length?a.slice(s-1):[],template:this.userInfo.isApp?"":"topMenuItem",isSelected:!1};[g.icon,g.text]=this.resolveDisplayVariant(g);let _=g.items.length>0?u.concat(g):u;return this.resolveNestingDepth(_,this.configuration.navigationNestingDepth),_}resolveFeatureFlagDependency(c){switch(c){case"none":default:return!0;case"enableEventCalendar":return eval?.("scope.currentChapter.settings.configurations.enableEventCalendar || scope.currentChapter.settings.configurations.enableEventArticles");case"chatEnabled":return eval?.("scope.currentChapter.settings.configurations?.chatChapterConfiguration?.ChatEnabled");case"isRegistered":return!this.user.isRegistered;case"featureFeedback":return eval?.("scope.currentChapter.settings.featureFeedback")}}resolveAttributes(c){return"category"==c.editType&&(c.items=this.resolveChapterCategories()),"category-group"==c.editType&&(c.items=this.resloveChapterCategoryGroup(c.id)),c.url=this.resolveUrl(c.url),[c.icon,c.text]=this.resolveDisplayVariant(c),c.items.map(this.resolveAttributes.bind(this)),c.url&&(c.isSelected=this.resolveIsSelected(c.url,c.text)),c.text&&this.translationService.translateByUserLanguageCode([c.text]).then(s=>{c.text=s[0].translation}),c}resolveDisplayVariant(c){let s;switch("main-entry"==c.editType&&!this.template.IsCustomTemplate&&(c.text=this.scope.network.getResourceOrKeyName(c.text)),s=this.userInfo.isApp?c.displayVariantApp:this.userInfo.isMobile||window.innerWidth<768?c.displayVariantMobile:c.displayVariantDesktop,s){case"icon-text":default:return[c.icon,c.text];case"icon":return[c.icon,""];case"text":return["",c.text]}}resolveUrl(c){return c.startsWith("/")?this.scope.currentChapter.path+c:c}resolveShowMoreBreakpoint(){return this.userInfo.isApp?this.configuration.showMoreConfiguration.showMoreBreakpointApp:this.userInfo.isMobile||window.innerWidth<768?this.configuration.showMoreConfiguration.showMoreBreakpointMobile:this.configuration.showMoreConfiguration.showMoreBreakpointDesktop}resolveNestingDepth(c,s){0!=s?(s--,c.forEach(a=>{a.items.length>0&&this.resolveNestingDepth(a.items,s)})):c.forEach(a=>{a.items=[]})}resolveChapterCategories(){let c=[];return this.scope.currentChapter.chapterGroups.filter(a=>a.isFrontpageMenuStrip).forEach(a=>{a.chapters&&a.chapters.length>0&&c.push(...a.chapters)}),c.map(this.mapCategoriesToNavigationSlotModel)}resloveChapterCategoryGroup(c){let s=[],a=this.scope.chapterGroups.find(u=>u.id==c);return a&&a.chapters.forEach(u=>{s.push(u)}),s.map(this.mapCategoriesToNavigationSlotModel)}mapCategoriesToNavigationSlotModel(c){return{editType:"",beginGroup:!1,editable:!1,displayVariantDesktop:"text",displayVariantMobile:"text",displayVariantApp:"text",text:c.name??c.shortName,icon:"",url:c.id?"/rubrics?q="+c.id:"",disabled:!1,linkAttr:"",position:0,translate:!0,overrides:{},featureFlagDependency:"",items:c.chapters?c.chapters.map(this.mapCategoriesToNavigationSlotModel):[],template:""}}resolveIsSelected(c,s){let a=c.split("/").pop(),u=location.pathname.split("/").pop();return""===u&&a===u||!(!a.includes(u)||""==u)}static{this.\u0275fac=function(s){return new(s||y)(W.KVO(o.A),W.KVO(b.E),W.KVO(f.p),W.KVO(S.M))}}static{this.\u0275prov=W.jDH({token:y,factory:y.\u0275fac,providedIn:"root"})}}return y})()},668:(In,Ze,M)=>{"use strict";M.d(Ze,{Q:()=>D});var W=M(3308),o=M(7788),P=M(3746),b=M(79),f=M(6610),S=M(1491),T=M(827);function y(C,I){if(1&C&&(o.j41(0,"p"),o.EFF(1),o.k0s()),2&C){const L=o.XpG(2);o.R7$(),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_intro_1"))}}function d(C,I){if(1&C){const L=o.RV6();o.j41(0,"div",11)(1,"div")(2,"input",12),o.mxI("ngModelChange",function(G){o.eBV(L);const k=o.XpG(2);return o.DH7(k.type,G)||(k.type=G),o.Njj(G)}),o.k0s(),o.j41(3,"label",13),o.EFF(4),o.k0s()(),o.j41(5,"div")(6,"input",14),o.mxI("ngModelChange",function(G){o.eBV(L);const k=o.XpG(2);return o.DH7(k.type,G)||(k.type=G),o.Njj(G)}),o.k0s(),o.j41(7,"label",15),o.EFF(8),o.k0s()(),o.j41(9,"div")(10,"input",16),o.mxI("ngModelChange",function(G){o.eBV(L);const k=o.XpG(2);return o.DH7(k.type,G)||(k.type=G),o.Njj(G)}),o.k0s(),o.j41(11,"label",17),o.EFF(12),o.k0s()(),o.j41(13,"div")(14,"input",18),o.mxI("ngModelChange",function(G){o.eBV(L);const k=o.XpG(2);return o.DH7(k.type,G)||(k.type=G),o.Njj(G)}),o.k0s(),o.j41(15,"label",19),o.EFF(16),o.k0s()()()}if(2&C){const L=o.XpG(2);o.R7$(2),o.R50("ngModel",L.type),o.R7$(2),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("domain_user_report_spam")),o.R7$(2),o.R50("ngModel",L.type),o.R7$(2),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("domain_user_report_hate_speech")),o.R7$(2),o.R50("ngModel",L.type),o.R7$(2),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("domain_user_report_inappropriate")),o.R7$(2),o.R50("ngModel",L.type),o.R7$(2),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("domain_user_report_false_identity"))}}function c(C,I){if(1&C&&(o.j41(0,"p",20),o.EFF(1),o.k0s()),2&C){const L=o.XpG(2);o.R7$(),o.SpI(" ",L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_footer")," ")}}function s(C,I){if(1&C&&(o.j41(0,"div")(1,"p"),o.EFF(2),o.k0s()()),2&C){const L=o.XpG(2);o.R7$(2),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_unblock_description"))}}function a(C,I){if(1&C&&(o.j41(0,"div",21),o.EFF(1),o.k0s()),2&C){const L=o.XpG(2);o.R7$(),o.SpI(" ",L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_error")," ")}}function u(C,I){1&C&&o.nrm(0,"i",24)}function h(C,I){if(1&C){const L=o.RV6();o.j41(0,"button",22),o.bIt("click",function(){o.eBV(L);const G=o.XpG(2);return o.Njj(G.blockUser())}),o.DNE(1,u,1,0,"i",23),o.EFF(2),o.k0s()}if(2&C){const L=o.XpG(2);o.Y8G("disabled",L.working||""===L.type),o.R7$(),o.Y8G("ngIf",L.working),o.R7$(),o.SpI(" ",L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_block_button")," ")}}function g(C,I){1&C&&o.nrm(0,"i",24)}function _(C,I){if(1&C){const L=o.RV6();o.j41(0,"button",25),o.bIt("click",function(){o.eBV(L);const G=o.XpG(2);return o.Njj(G.unblockUser())}),o.DNE(1,g,1,0,"i",23),o.EFF(2),o.k0s()}if(2&C){const L=o.XpG(2);o.Y8G("disabled",L.working),o.R7$(),o.Y8G("ngIf",L.working),o.R7$(),o.SpI(" ",L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_unblock_button")," ")}}function x(C,I){if(1&C){const L=o.RV6();o.j41(0,"div")(1,"p"),o.EFF(2),o.k0s(),o.DNE(3,y,2,1,"p",3)(4,d,17,8,"div",4)(5,c,2,1,"p",5)(6,s,3,1,"div",3)(7,a,2,1,"div",6),o.nrm(8,"br"),o.j41(9,"div",7),o.DNE(10,h,3,3,"button",8)(11,_,3,3,"button",9),o.j41(12,"button",10),o.bIt("click",function(){o.eBV(L);const G=o.XpG();return o.Njj(G.closePopup())}),o.EFF(13),o.k0s()()()}if(2&C){const L=o.XpG();o.R7$(2),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_intro_0")),o.R7$(),o.Y8G("ngIf",!L.isBlocked),o.R7$(),o.Y8G("ngIf",!L.isBlocked),o.R7$(),o.Y8G("ngIf",!L.isBlocked),o.R7$(),o.Y8G("ngIf",L.isBlocked),o.R7$(),o.Y8G("ngIf",L.error),o.R7$(3),o.Y8G("ngIf",!L.isBlocked),o.R7$(),o.Y8G("ngIf",L.isBlocked),o.R7$(2),o.SpI(" ",L.scope.currentScope.network.getResourceOrKeyName("web_common_cancel")," ")}}function w(C,I){if(1&C){const L=o.RV6();o.j41(0,"p"),o.EFF(1),o.k0s(),o.j41(2,"div",7)(3,"a",26),o.bIt("click",function(){o.eBV(L);const G=o.XpG();return o.Njj(G.closePopup())}),o.nrm(4,"span",27),o.k0s(),o.j41(5,"button",10),o.bIt("click",function(){o.eBV(L);const G=o.XpG();return o.Njj(G.closePopup())}),o.EFF(6),o.k0s()()}if(2&C){const L=o.XpG();o.R7$(),o.JRh(L.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_unregistered")),o.R7$(3),o.Y8G("innerHTML",L.scope.currentScope.network.getResourceOrKeyName("web_root_root_signIn"),o.npT),o.R7$(2),o.SpI(" ",L.scope.currentScope.network.getResourceOrKeyName("web_common_close")," ")}}let D=(()=>{class C{constructor(L,N){this.profileService=L,this.scopeService=N,this.visible=!1,this.visibleChange=new o.bkB,this.isBlocked=!1,this.working=!1,this.error=!1,this.type="",this.scope=this.scopeService.getScope()}blockUser(){var L=this;return(0,W.A)(function*(){L.working=!0,L.error=!1;try{yield L.profileService.block({blockedUserGuid:L.reportedUserGuid,blockingReason:L.type,performUnblock:!1}),L.working=!1,L.closePopup()}catch{L.error=!0,L.working=!1,L.closePopup()}})()}unblockUser(){var L=this;return(0,W.A)(function*(){L.working=!0,L.error=!1;try{yield L.profileService.block({blockedUserGuid:L.reportedUserGuid,blockingReason:L.type,performUnblock:!0}),L.working=!1,L.closePopup()}catch{L.error=!0,L.working=!1,L.closePopup()}})()}closePopup(){this.visible=!1,this.visibleChange.emit(this.visible)}static{this.\u0275fac=function(N){return new(N||C)(o.rXU(b.p),o.rXU(P.A))}}static{this.\u0275cmp=o.VBU({type:C,selectors:[["app-profile-block-dialog"]],inputs:{visible:"visible",reportedUserGuid:"reportedUserGuid",isBlocked:"isBlocked"},outputs:{visibleChange:"visibleChange"},decls:4,vars:8,consts:[["unregisteredTemplate",""],[3,"visibleChange","onHiding","visible","showCloseButton","showTitle","title","width","height"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","mk-radiogroup",4,"ngIf"],["class","info-text",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],[1,"action-container"],["type","button","class","btn btn-red action-button",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-green action-button",3,"disabled","click",4,"ngIf"],["type","button",1,"btn","btn-black","action-button",3,"click"],[1,"mk-radiogroup"],["type","radio","id","reason1","name","reason","value","domain_user_report_spam","required","",3,"ngModelChange","ngModel"],["for","reason1"],["type","radio","id","reason2","name","reason","value","domain_user_report_hate_speech","required","",3,"ngModelChange","ngModel"],["for","reason2"],["type","radio","id","reason3","name","reason","value","domain_user_report_inappropriate","required","",3,"ngModelChange","ngModel"],["for","reason3"],["type","radio","id","reason4","name","reason","value","domain_user_report_false_identity","required","",3,"ngModelChange","ngModel"],["for","reason4"],[1,"info-text"],[1,"alert","alert-danger"],["type","button",1,"btn","btn-red","action-button",3,"click","disabled"],["class","fa fa-spinner fa-pulse",4,"ngIf"],[1,"fa","fa-spinner","fa-pulse"],["type","button",1,"btn","btn-green","action-button",3,"click","disabled"],["href","login",1,"btn","btn-green","action-button",3,"click"],[3,"innerHTML"]],template:function(N,G){if(1&N){const k=o.RV6();o.j41(0,"dx-popup",1),o.mxI("visibleChange",function(B){return o.eBV(k),o.DH7(G.visible,B)||(G.visible=B),o.Njj(B)}),o.bIt("onHiding",function(){return o.eBV(k),o.Njj(G.closePopup())}),o.DNE(1,x,14,9,"div",2)(2,w,7,3,"ng-template",null,0,o.C5r),o.k0s()}if(2&N){const k=o.sdS(3);o.R50("visible",G.visible),o.Y8G("showCloseButton",!0)("showTitle",!0)("title",G.scope.currentScope.network.getResourceOrKeyName("web_block_user_dialog_title"))("width",400)("height","auto"),o.R7$(),o.Y8G("ngIf",G.scope.profile.isRegistered)("ngIfElse",k)}},dependencies:[f.bT,S.me,S.Fm,S.BC,S.YS,S.vS,T.i]})}}return C})()},1486:(In,Ze,M)=>{"use strict";M.d(Ze,{R:()=>a});var W=M(3308),o=M(7788),P=M(3746),b=M(79),f=M(6610),S=M(1491),T=M(827);function y(u,h){if(1&u&&(o.j41(0,"div",17),o.EFF(1),o.k0s()),2&u){const g=o.XpG(2);o.R7$(),o.JRh(g.scope.currentScope.network.getResourceOrKeyName("web_report_user_dialog_error"))}}function d(u,h){1&u&&o.nrm(0,"i",18)}function c(u,h){if(1&u){const g=o.RV6();o.j41(0,"div")(1,"p"),o.EFF(2),o.k0s(),o.j41(3,"p"),o.EFF(4),o.k0s(),o.j41(5,"div",2)(6,"div")(7,"input",3),o.mxI("ngModelChange",function(x){o.eBV(g);const w=o.XpG();return o.DH7(w.type,x)||(w.type=x),o.Njj(x)}),o.k0s(),o.j41(8,"label",4),o.EFF(9),o.k0s()(),o.j41(10,"div")(11,"input",5),o.mxI("ngModelChange",function(x){o.eBV(g);const w=o.XpG();return o.DH7(w.type,x)||(w.type=x),o.Njj(x)}),o.k0s(),o.j41(12,"label",6),o.EFF(13),o.k0s()(),o.j41(14,"div")(15,"input",7),o.mxI("ngModelChange",function(x){o.eBV(g);const w=o.XpG();return o.DH7(w.type,x)||(w.type=x),o.Njj(x)}),o.k0s(),o.j41(16,"label",8),o.EFF(17),o.k0s()(),o.j41(18,"div")(19,"input",9),o.mxI("ngModelChange",function(x){o.eBV(g);const w=o.XpG();return o.DH7(w.type,x)||(w.type=x),o.Njj(x)}),o.k0s(),o.j41(20,"label",10),o.EFF(21),o.k0s()()(),o.j41(22,"p",11),o.EFF(23),o.k0s(),o.DNE(24,y,2,1,"div",12),o.nrm(25,"br"),o.j41(26,"div",13)(27,"button",14),o.bIt("click",function(){o.eBV(g);const x=o.XpG();return o.Njj(x.reportUser())}),o.DNE(28,d,1,0,"i",15),o.EFF(29),o.k0s(),o.j41(30,"button",16),o.bIt("click",function(){o.eBV(g);const x=o.XpG();return o.Njj(x.closePopup())}),o.EFF(31),o.k0s()()()}if(2&u){const g=o.XpG();o.R7$(2),o.JRh(g.scope.currentScope.network.resources.web_report_user_dialog_intro_0),o.R7$(2),o.JRh(g.scope.currentScope.network.resources.web_report_user_dialog_intro_1),o.R7$(3),o.R50("ngModel",g.type),o.Y8G("value","domain_user_report_spam"),o.R7$(2),o.JRh(g.scope.currentScope.network.getResourceOrKeyName("domain_user_report_spam")),o.R7$(2),o.R50("ngModel",g.type),o.Y8G("value","domain_user_report_hate_speech"),o.R7$(2),o.JRh(g.scope.currentScope.network.getResourceOrKeyName("domain_user_report_hate_speech")),o.R7$(2),o.R50("ngModel",g.type),o.Y8G("value","domain_user_report_inappropriate"),o.R7$(2),o.JRh(g.scope.currentScope.network.getResourceOrKeyName("domain_user_report_inappropriate")),o.R7$(2),o.R50("ngModel",g.type),o.Y8G("value","domain_user_report_false_identity"),o.R7$(2),o.JRh(g.scope.currentScope.network.getResourceOrKeyName("domain_user_report_false_identity")),o.R7$(2),o.SpI(" ",g.scope.currentScope.network.getResourceOrKeyName("web_report_user_dialog_footer")," "),o.R7$(),o.Y8G("ngIf",g.error),o.R7$(3),o.Y8G("disabled",g.working||""===g.type),o.R7$(),o.Y8G("ngIf",g.working),o.R7$(),o.SpI(" ",g.scope.currentScope.network.getResourceOrKeyName("web_report_user_dialog_report_button")," "),o.R7$(2),o.SpI(" ",g.scope.currentScope.network.getResourceOrKeyName("web_common_cancel")," ")}}function s(u,h){if(1&u){const g=o.RV6();o.j41(0,"div")(1,"p"),o.EFF(2),o.k0s(),o.j41(3,"div",13)(4,"a",19),o.bIt("click",function(){o.eBV(g);const x=o.XpG();return o.Njj(x.closePopup())}),o.nrm(5,"span",20),o.k0s(),o.j41(6,"button",16),o.bIt("click",function(){o.eBV(g);const x=o.XpG();return o.Njj(x.closePopup())}),o.EFF(7),o.k0s()()()}if(2&u){const g=o.XpG();o.R7$(2),o.JRh(g.scope.currentScope.network.getResourceOrKeyName("web_report_user_dialog_unregistered")),o.R7$(2),o.Y8G("href","login",o.B4B),o.R7$(),o.Y8G("innerHTML",g.scope.currentScope.network.getResourceOrKeyName("web_root_root_signIn"),o.npT),o.R7$(2),o.SpI(" ",g.scope.currentScope.network.getResourceOrKeyName("web_common_close")," ")}}let a=(()=>{class u{constructor(g,_){this.profileService=g,this.scopeService=_,this.visible=!1,this.reportedUserGuid="",this.visibleChange=new o.bkB,this.working=!1,this.error=!1,this.type="",this.scope=this.scopeService.getScope()}reportUser(){var g=this;return(0,W.A)(function*(){g.working=!0,g.error=!1;try{yield g.profileService.reportProfile({reportedUserGuid:g.reportedUserGuid,reportingReason:g.type}),g.closePopup()}catch{g.error=!0,g.working=!1,g.closePopup()}})()}closePopup(){this.visible=!1,this.visibleChange.emit(this.visible)}static{this.\u0275fac=function(_){return new(_||u)(o.rXU(b.p),o.rXU(P.A))}}static{this.\u0275cmp=o.VBU({type:u,selectors:[["app-profile-report-dialog"]],inputs:{visible:"visible",reportedUserGuid:"reportedUserGuid"},outputs:{visibleChange:"visibleChange"},decls:3,vars:8,consts:[[3,"visibleChange","onHiding","visible","showCloseButton","showTitle","title","width","height"],[4,"ngIf"],[1,"mk-radiogroup"],["type","radio","id","reason1","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason1"],["type","radio","id","reason2","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason2"],["type","radio","id","reason3","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason3"],["type","radio","id","reason4","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason4"],[1,"info-text"],["class","alert alert-danger",4,"ngIf"],[1,"action-container"],["type","button",1,"btn","btn-green","action-button",3,"click","disabled"],["class","fa fa-spinner fa-pulse",4,"ngIf"],["type","button",1,"btn","btn-black","action-button",3,"click"],[1,"alert","alert-danger"],[1,"fa","fa-spinner","fa-pulse"],[1,"btn","btn-green","action-button",3,"click","href"],[3,"innerHTML"]],template:function(_,x){1&_&&(o.j41(0,"dx-popup",0),o.mxI("visibleChange",function(D){return o.DH7(x.visible,D)||(x.visible=D),D}),o.bIt("onHiding",function(){return x.closePopup()}),o.DNE(1,c,32,20,"div",1)(2,s,8,4,"div",1),o.k0s()),2&_&&(o.R50("visible",x.visible),o.Y8G("showCloseButton",!0)("showTitle",!0)("title",x.scope.currentScope.network.getResourceOrKeyName("web_report_user_dialog_title"))("width",400)("height","auto"),o.R7$(),o.Y8G("ngIf",x.scope.profile.isRegistered),o.R7$(),o.Y8G("ngIf",!x.scope.profile.isRegistered))},dependencies:[f.bT,S.me,S.Fm,S.BC,S.YS,S.vS,T.i]})}}return u})()},6016:(In,Ze,M)=>{"use strict";M.d(Ze,{v:()=>c});var W=M(3746),o=M(7788),P=M(3486),b=M(281),f=M(9026),S=M(1486),T=M(668);const y=()=>({width:150});function d(s,a){if(1&s&&(o.j41(0,"div",12),o.EFF(1),o.k0s()),2&s){const u=o.XpG();o.R7$(),o.SpI(" , ",u.userRole," ")}}let c=(()=>{class s{constructor(u){this.scopeService=u,this.userRole="",this.enableVerifiedUsers=!1,this.userIsVerified=!1,this.chatEnabled=!1,this.dropDownButtonOptions=[],this.enableUserReports=!1,this.enableBlockUsers=!1,this.showReportDialog=!1,this.showBlockDialog=!1,this.generateUserRoleText=()=>{this.targetUserProfile.isJournalist&&(this.userRole=this.scope.network.getResourceOrKeyName("web_common_freelanceAuthorMale"))},this.dropDownButtonMenuItemClick=h=>{switch(h){case"report":this.showReportDialog=!0;break;case"block":this.showBlockDialog=!0}},this.generatedropDownButtonOptions=()=>{this.enableUserReports&&this.dropDownButtonOptions.push({icon:"fa-regular fa-flag",text:this.scope.currentScope.network.resources.web_chat_message_report,iconType:"report"}),this.enableBlockUsers&&this.dropDownButtonOptions.push({icon:"fa-solid fa-user-xmark",text:this.scope.currentScope.network.resources.web_block_user_dialog_block_button,iconType:"block"})},this.scope=this.scopeService.getScope()}ngOnInit(){this.generateUserRoleText(),this.enableVerifiedUsers=this.scope.currentScope.chapter.settings.configurations.enableVerifiedUsers,this.userIsVerified=this.targetUserProfile.isVerifiedUser,this.chatEnabled=eval?.(this.scope.currentChapter.settings.configurations?.chatChapterConfiguration.ChatEnabled),this.enableUserReports=this.scope.currentScope.chapter.settings.configurations.enableUserReports,this.enableBlockUsers=this.scope.currentScope.chapter.settings.configurations.enableBlockUsers,this.generatedropDownButtonOptions()}static{this.\u0275fac=function(h){return new(h||s)(o.rXU(W.A))}}static{this.\u0275cmp=o.VBU({type:s,selectors:[["app-user-info"]],inputs:{targetUserProfile:"targetUserProfile"},decls:22,vars:17,consts:[[1,"public-profile-user-info-base"],[1,"public-profile-cover",2,"position","relative"],[1,"public-profile-cover-image",3,"lazy-img"],[1,"public-profile-avatar"],[1,"public-profile-avatar-image",3,"lazy-img"],[1,"public-profile-user-toolbar"],[3,"otherUserGuid"],["text","","icon","overflow","stylingMode","text","type","normal",1,"public-profile-menu-button",3,"onItemClick","dropDownOptions","items","showArrowIcon"],[1,"public-profile-user-text-container"],[1,"public-profile-user-name-container"],[1,"public-profile-user-name-text"],["ng-if","enableVerifiedUsers && userIsVerified",1,"fas","fa-check-square","verified-icon"],[1,"public-profile-user-role-text"],[1,"public-profile-user-about"],[1,"public-profile-user-additionalText"],[3,"visibleChange","visible","reportedUserGuid"],[3,"visibleChange","visible","reportedUserGuid","isBlocked"]],template:function(h,g){1&h&&(o.j41(0,"div",0)(1,"div",1),o.nrm(2,"img",2),o.j41(3,"div",3),o.nrm(4,"img",4),o.k0s()(),o.j41(5,"div",5)(6,"div"),o.nrm(7,"app-chat-one-to-one-action-button",6),o.k0s(),o.j41(8,"div")(9,"dx-drop-down-button",7),o.bIt("onItemClick",function(x){return g.dropDownButtonMenuItemClick(x.itemData.iconType)}),o.k0s()()(),o.j41(10,"div",8)(11,"div",9)(12,"div",10),o.EFF(13),o.nrm(14,"i",11),o.k0s(),o.DNE(15,d,2,1,"div",12),o.k0s(),o.j41(16,"div",13),o.EFF(17),o.k0s(),o.j41(18,"div",14),o.EFF(19),o.k0s()()(),o.j41(20,"app-profile-report-dialog",15),o.mxI("visibleChange",function(x){return o.DH7(g.showReportDialog,x)||(g.showReportDialog=x),x}),o.k0s(),o.j41(21,"app-profile-block-dialog",16),o.mxI("visibleChange",function(x){return o.DH7(g.showBlockDialog,x)||(g.showBlockDialog=x),x}),o.k0s()),2&h&&(o.R7$(2),o.Y8G("lazy-img",g.targetUserProfile.coverImageUrl+"?preset=profile-cover"),o.R7$(2),o.Y8G("lazy-img",g.targetUserProfile.avatarImageUrl+"?preset=profile-avatar"),o.R7$(3),o.Y8G("otherUserGuid",g.targetUserProfile.guid),o.R7$(2),o.Y8G("dropDownOptions",o.lJ4(16,y))("items",g.dropDownButtonOptions)("showArrowIcon",!1),o.R7$(4),o.Lme(" ",g.targetUserProfile.firstName," ",g.targetUserProfile.lastName," "),o.R7$(2),o.vxM(g.userRole?15:-1),o.R7$(2),o.SpI(" ",g.targetUserProfile.about," "),o.R7$(2),o.SpI(" ",g.targetUserProfile.additionalText," "),o.R7$(),o.R50("visible",g.showReportDialog),o.Y8G("reportedUserGuid",g.targetUserProfile.guid),o.R7$(),o.R50("visible",g.showBlockDialog),o.Y8G("reportedUserGuid",g.targetUserProfile.guid)("isBlocked",g.targetUserProfile.isBlockedByCurrentUser))},dependencies:[P.h,b.D,f.L,S.R,T.Q],styles:[".public-profile-user-info-base[_ngcontent-%COMP%]{position:relative;padding-bottom:50px}@media (max-width: 768px){.public-profile-user-info-base[_ngcontent-%COMP%]{padding-bottom:30px}}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-menu-button[_ngcontent-%COMP%]     i{font-size:2rem!important;color:var(--textColor)}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-cover[_ngcontent-%COMP%]{position:relative}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-cover-image[_ngcontent-%COMP%]{width:var(--designContentWidth);max-height:calc(var(--designContentWidth) / 2.5);display:block}@media (max-width: 768px){.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-cover-image[_ngcontent-%COMP%]{width:100vw}}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-toolbar[_ngcontent-%COMP%]{display:flex;justify-content:end;margin-top:10px}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]{color:var(--textColor);font-family:var(--fontPrimary)}@media (max-width: 768px){.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]{padding:2rem}}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]   .public-profile-user-name-text[_ngcontent-%COMP%]{font-size:2rem;font-weight:700}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]   .public-profile-user-role-text[_ngcontent-%COMP%]{font-size:2rem;font-style:italic}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]   .public-profile-user-about[_ngcontent-%COMP%]{font-size:1.2rem}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]   .public-profile-user-additionalText[_ngcontent-%COMP%]{margin-top:1rem;font-size:1.1rem}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-text-container[_ngcontent-%COMP%]   .verified-icon[_ngcontent-%COMP%]{color:#00acee;font-size:.8em;transform:translateY(-25%)}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-avatar[_ngcontent-%COMP%]{position:absolute;bottom:-15%;left:9%}@media (max-width: 768px){.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-avatar[_ngcontent-%COMP%]{bottom:-25%;left:2%}}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-avatar-image[_ngcontent-%COMP%]{border-radius:50%;border:5px solid var(--backgroundColor);transform:scale(1.5)}@media (max-width: 768px){.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-avatar-image[_ngcontent-%COMP%]{transform:scale(1)}}.public-profile-user-info-base[_ngcontent-%COMP%]   .public-profile-user-name-container[_ngcontent-%COMP%]{display:flex;margin-top:95px}"]})}}return s})()},3341:(In,Ze,M)=>{"use strict";M.d(Ze,{p:()=>y});var W=M(3308),o=M(6343),P=M(650),b=M(5146),f=M(3746),S=M(7788),T=M(6409);let y=(()=>{class d{constructor(s,a){this.http=s,this.scopeService=a,this.apiEndpoint="",this.connectionDataSubject=new o.B7,this.connectionData$=this.connectionDataSubject.asObservable(),this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint,this.mediaApiBaseUrl=this.scope.globalSettings.configurations.apicodoMediaBaseUrl,this.getConnectionDataObservable().subscribe()}getVideoData(s){var a=this;return(0,W.A)(function*(){var h={headers:{Authorization:"Bearer "+(yield a.getConnectionData()).token}};return a.http.get(a.mediaApiBaseUrl+"/api/Thumbnail/GetWebFrontendData?fileId="+s,h).toPromise().then(g=>g.data).catch(g=>{console.error("getVideoData() FAIL",g)})})()}getConnectionDataInternal(){var s=this;return(0,W.A)(function*(){return s.http.get(s.apiEndpoint+"media/token").toPromise().then(a=>(s.apicodoMediaConnectionData=a,s.apicodoMediaConnectionData.isInitialized=!0,s.apicodoMediaConnectionData.expiresOn=new Date(Date.now()+36e5),s.connectionDataSubject.next(s.apicodoMediaConnectionData),s.apicodoMediaConnectionData))})()}getConnectionDataObservable(){return(0,P.H)(this.getConnectionDataInternal())}getConnectionData(){var s=this;return(0,W.A)(function*(){return s.apicodoMediaConnectionData&&s.apicodoMediaConnectionData.expiresOn>Date.now()?s.apicodoMediaConnectionData:s.connectionData$.pipe((0,b.s)(1)).toPromise()})()}static{this.\u0275fac=function(a){return new(a||d)(S.KVO(T.Qq),S.KVO(f.A))}}static{this.\u0275prov=S.jDH({token:d,factory:d.\u0275fac})}}return d})()},281:(In,Ze,M)=>{"use strict";M.d(Ze,{D:()=>a});var W=M(2925),o=M(5340),P=M(3746),b=M(7788),f=M(3008),S=M(7543),T=M(4312),y=M(8892),d=M(4539);function c(u,h){if(1&u){const g=b.RV6();b.j41(0,"dx-button",2),b.bIt("onClick",function(){b.eBV(g);const x=b.XpG();return b.Njj(x.createOrOpenChat())}),b.j41(1,"div",3),b.nrm(2,"i",4),b.EFF(3),b.k0s()()}if(2&u){const g=b.XpG();b.Y8G("visible",g.chatIsEnabled),b.R7$(3),b.SpI("",g.scope.network.getResourceOrKeyName("web_common_message")," ")}}function s(u,h){if(1&u){const g=b.RV6();b.j41(0,"dx-button",5),b.bIt("onClick",function(){b.eBV(g);const x=b.XpG();return b.Njj(x.createOrOpenChat())}),b.k0s()}if(2&u){const g=b.XpG();b.Y8G("text",g.buttonText)("visible",g.chatIsEnabled)("disabled",g.buttonDisabled)}}let a=(()=>{class u{constructor(g,_,x,w,D,C){this.chatRoomService=g,this.chatRelayService=_,this.authenticationService=x,this.chatroomCache=w,this.router=D,this.scopeService=C,this.otherUserGuid="Parameter is not there",this.chatIsEnabled=!0,this.buttonDisabled=!1,this.buttonText="",this.isRedesign=!1,this.scope=this.scopeService.getScope()}ngOnInit(){typeof this.scope.network.settings.configurations.enableChat<"u"&&this.scope.currentChapter.settings.configurations.chatChapterConfiguration?.ChatEnabled?(this.chatIsEnabled=this.scope.network.settings.configurations.enableChat&&(this.scope.currentChapter.settings.configurations.chatChapterConfiguration?.OneToOneEnabled??!0)&&(this.scope.currentChapter.settings.configurations.chatChapterConfiguration?.ChatEnabled??!0),this.isRedesign="Redesign2024"==this.scope.currentScope.network.settings.configurations.contentRenderEngine):this.chatIsEnabled=!1,this.buttonText=this.scope.network.getResourceOrKeyName("web_chat_open_or_create_one_to_one")}createOrOpenChat(){var g=new W.A(this.otherUserGuid);this.buttonDisabled=!0,this.chatRoomService.createOneToOneChat(g).subscribe(_=>{this.chatRelayService.addToChatroom(_.id.toString()),this.authenticationService.expireToken(this).then(x=>{this.chatroomCache.rebuildCacheAndGetArrayStore(this).then(w=>{this.router.navigate(["/chat"]).then(D=>{this.router.navigate([`/chat/room/${_.id}`]).then(C=>{})})})})})}static{this.\u0275fac=function(_){return new(_||u)(b.rXU(o.A),b.rXU(f.p),b.rXU(S.u),b.rXU(T.D),b.rXU(y.Ix),b.rXU(P.A))}}static{this.\u0275cmp=b.VBU({type:u,selectors:[["app-chat-one-to-one-action-button"]],inputs:{otherUserGuid:"otherUserGuid"},decls:2,vars:1,consts:[["icon","fa-regular fa-message","stylingMode","text",1,"",3,"visible"],["icon","fas fa-comments","stylingMode","contained","type","default",3,"text","visible","disabled"],["icon","fa-regular fa-message","stylingMode","text",1,"",3,"onClick","visible"],[1,"chat-one-to-one-message-button"],[1,"fa-regular","fa-message"],["icon","fas fa-comments","stylingMode","contained","type","default",3,"onClick","text","visible","disabled"]],template:function(_,x){1&_&&b.DNE(0,c,4,2,"dx-button",0)(1,s,1,3,"dx-button",1),2&_&&b.vxM(x.isRedesign?0:1)},dependencies:[d.e],styles:[".chat-one-to-one-message-button[_ngcontent-%COMP%]{color:var(--textColor);font-size:1.5rem}.chat-one-to-one-message-button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-right:10px}"]})}}return u})()},3176:(In,Ze,M)=>{"use strict";M.d(Ze,{h:()=>o});var W=M(3438);class o extends W.cf{constructor(b,f){super("chatDb-"+f+"-"+b),this.version(1).stores({chatRooms:"id, synchStartedOn, synchCompletedOn",chatMessages:"id, parentId, synchStartedOn, synchCompletedOn",synchTable:"id, synchStartedOn, synchCompletedOn"}),this.version(2).stores({chatRooms:"id, synchStartedOn, synchCompletedOn, hashGuid",chatMessages:"id, parentId, synchStartedOn, synchCompletedOn",synchTable:"id, synchStartedOn, synchCompletedOn, hashGuid"})}}},9026:(In,Ze,M)=>{"use strict";M.d(Ze,{L:()=>b});var W=M(7788),o=M(3554),P=M(6098);let b=(()=>{class f{constructor(T,y,d){this.elem=T,this.lazyImgService=y,this.sanitizer=d}ngOnInit(){const T=this.sanitizer.sanitize(4,this.src);this.lazyImgService.addImage(this.elem,T),this.scrollSub=this.lazyImgService.observeScroll().subscribe(()=>{this.lazyImgService.loadImages()})}ngOnDestroy(){this.lazyImgService.removeImage(this.elem),this.scrollSub&&this.scrollSub.unsubscribe()}static{this.\u0275fac=function(y){return new(y||f)(W.rXU(W.aKT),W.rXU(o.j),W.rXU(P.up))}}static{this.\u0275dir=W.FsC({type:f,selectors:[["","lazy-img",""]],inputs:{src:[0,"lazy-img","src"]}})}}return f})()},9516:(In,Ze,M)=>{"use strict";M.d(Ze,{Y:()=>W});var W=function(o){return o[o.Web=0]="Web",o[o.Android=1]="Android",o[o.iOS=2]="iOS",o}(W||{})},4312:(In,Ze,M)=>{"use strict";M.d(Ze,{D:()=>u});var W=M(2925),o=M(1614),P=M(6343),b=M(3176),f=M(5340),S=M(5050),T=M(3746),y=M(7788),d=M(6409),c=M(3008),s=M(7543),a=M(8375);let u=(()=>{class h{static{this.instanceCount=0}constructor(_,x,w,D,C,I,L){this.chatRoomService=_,this.propertyConverter=x,this.scopeService=w,this.http=D,this.chatRelayService=C,this.authenticationService=I,this.keepAliveService=L,this.firstRun=!0,this.cacheUpdatedSource=new P.B7,this.cacheUpdated$=this.cacheUpdatedSource.asObservable(),this.subscriptions=[],this.fetchingRoomsDataPromise=null,this.fetchingCacheDataPromise=null,this.scope=this.scopeService.getScope(),this.database=new b.h(this.scope.currentScope.chapter.id,this.scope.network.id),this.registerSubscriptions(new Date),h.instanceCount++}getArrayStore(){return null!=this.store?(this.isCorrupted().then(_=>{_&&this.rebuildCacheAndGetArrayStore(this,"Corrupt on init")}),this.cacheUpdatedSource.next(this.store),new Promise((_,x)=>{_(this.store)})):this.database.chatRooms.count().then(_=>{if(_>0)return this.isCorrupted().then(w=>{w&&this.rebuildCacheAndGetArrayStore(this,"Corrupt on crc check")}),this.database.chatRooms.toArray().then(w=>{var D=w.map(C=>JSON.parse(C.jsonValue));return this.store=new o.A({key:"id",data:D,onLoaded:C=>this.propertyConverter.convert(C)}),this.cacheUpdatedSource.next(this.store),this.store});{let w=`${this.scope.apiEndpoint}chatRoomsFast/GetChatRoomList`;var x=new Date;return this.http.get(w).toPromise().then(D=>{let C=[];return D.value.map(I=>C.push({value:I,id:I.id.valueOf(),synchStartedOn:x,synchCompletedOn:new Date,jsonValue:JSON.stringify(I),hashGuid:I.hashGuid?.valueOf()})),C.forEach(I=>{I.value.id=I.value.id.toString()}),C}).then(D=>this.database.chatRooms.bulkAdd(D).then(C=>{var I=D.map(L=>JSON.parse(L.jsonValue));return this.store=new o.A({key:"id",data:I,onLoaded:L=>this.propertyConverter.convert(L)}),this.cacheUpdatedSource.next(this.store),this.store}))}})}registerSubscriptions(_){this.subscriptions.push(this.authenticationService.isAuthenticated$.subscribe(x=>{x&&this.firstRun?(this.firstRun=!1,this.rebuildCacheAndGetArrayStore(this,"authenticationService.isAuthenticated$ auth & this.firstRun").then(w=>console.log("resolved rebuildCacheAndGetArrayStore()",w))):this.isCorrupted().then(w=>{w&&this.rebuildCacheAndGetArrayStore(this,"authenticationService.isAuthenticated$ not auth & this.firstRun but corrupt")})})),this.subscriptions.push(this.keepAliveService.isResumed$.subscribe(x=>{x&&this.isCorrupted().then(w=>{w&&this.rebuildCacheAndGetArrayStore(this.keepAliveService,"resume").then()})})),this.subscriptions.push(this.chatRelayService.roomDeleted$.subscribe(x=>{this.store.push([{type:"remove",key:x.id}]),this.database.chatRooms.delete(x.id).then(w=>{console.log("Room deleted")}),this.database.chatMessages.where("parentId").equals(x.id).delete()}),this.chatRelayService.roomCreated$.subscribe(x=>{this.store.byKey(new W.A(x.id)).then(w=>{w||(console.log("User is likely added",x,this),this.rebuildCacheAndGetArrayStore(this,"chatRelayService.roomCreated$ on room created message"))})}),this.chatRelayService.msgReceived$.subscribe(x=>{try{this.chatRoomService.getRoom(x.roomId).toPromise().then(w=>{this.propertyConverter.convert(w),this.store.load().then(D=>{try{D.any(C=>C?.id.toString()==w?.id.toString())?(this.store.push([{type:"update",data:w,key:w.id}]),this.database.chatRooms.update(x.roomId,{value:w,id:w.id.valueOf(),synchStartedOn:_,synchCompletedOn:new Date,jsonValue:JSON.stringify(w)})):(this.store.push([{type:"insert",data:w}]),this.database.chatRooms.add({value:w,id:w.id.valueOf(),synchStartedOn:_,synchCompletedOn:new Date,jsonValue:JSON.stringify(w)},x.roomId))}catch{console.error("Error on msg receive",x,w,D,this)}})})}catch(w){console.error("cRoomCache msg received error",x,w,this),this.rebuildCacheAndGetArrayStore(this,"chatRelayService.msgReceived$ error updating local stores")}}),this.chatRelayService.msgUpdated$.subscribe(x=>{try{this.chatRoomService.getRoom(x.roomId).subscribe(w=>{this.store.push([{type:"update",data:w,key:x.roomId}]),this.database.chatRooms.update(x.roomId,{value:w,id:w.id.valueOf(),synchStartedOn:_,synchCompletedOn:new Date,jsonValue:JSON.stringify(w)})})}catch(w){console.error(this,w),this.isCorrupted().then(D=>{D&&this.rebuildCacheAndGetArrayStore(this,"chatRelayService.msgUpdated$ error abd corrupt local store")})}}),this.chatRelayService.msgDeleted$.subscribe(x=>{this.chatRoomService.getRoom(x.roomId).subscribe(w=>{this.store.push([{type:"update",data:w,key:x.roomId}]),this.database.chatRooms.update(x.roomId,{value:w,id:w.id.valueOf(),synchStartedOn:_,synchCompletedOn:new Date,jsonValue:JSON.stringify(w)})})}))}rebuildCacheAndGetArrayStore(_,x=null){console.log("Rebuild cache called from",_,x);let w=`${this.scope.apiEndpoint}chatRoomsFast/GetChatRoomList`;var D=new Date;return this.fetchingCacheDataPromise||(this.fetchingCacheDataPromise=this.http.get(w).toPromise().then(C=>{let I=[];return C.value.map(L=>I.push({value:L,id:L.id.valueOf(),synchStartedOn:D,synchCompletedOn:new Date,jsonValue:JSON.stringify(L),hashGuid:L.hashGuid?.valueOf()})),I.forEach(L=>{L.value.id=L.value.id.toString()}),I}).then(C=>this.authenticationService.expireToken(this).then(I=>this.database.chatRooms.clear().then(L=>this.database.chatRooms.bulkAdd(C).then(N=>{var G=C.map(k=>JSON.parse(k.jsonValue));return this.store=new o.A({key:"id",data:G,onLoaded:k=>this.propertyConverter.convert(k)}),this.cacheUpdatedSource.next(this.store),this.fetchingCacheDataPromise=null,this.store}))))),this.fetchingCacheDataPromise}isCorrupted(){return this.fetchingRoomsDataPromise||(this.fetchingRoomsDataPromise=this.http.get(`${this.scope.apiEndpoint}chatRoomsFast/GetChatRoomList`).toPromise().then(x=>{let w=x.value.length;return this.getArrayStore().then(D=>D.load().then(C=>{this.fetchingRoomsDataPromise=null;let I=new Set(x.value.select(U=>U.lastMessage?.id?.valueOf()??"")),N=new Set(C.select(U=>U.lastMessage?.id?.valueOf()??"")).except(I).any();return C.length!=w||N}))})),this.fetchingRoomsDataPromise}dropBackendCache(_){return this.http.get(this.scopeService.getScope().apiEndpoint+"chatMessagesFast/IsMyMembershipActive/"+_.toString()).toPromise().then(x=>(x&&console.log("Cache eviction call"),x))}static{this.\u0275fac=function(x){return new(x||h)(y.KVO(f.A),y.KVO(S.A),y.KVO(T.A),y.KVO(d.Qq),y.KVO(c.p),y.KVO(s.u),y.KVO(a.S))}}static{this.\u0275prov=y.jDH({token:h,factory:h.\u0275fac,providedIn:"root"})}}return h})()},4102:(In,Ze,M)=>{"use strict";M.d(Ze,{Z:()=>DC});var W=M(2925),o=M(1614),P=M(1830),b=M(3686),f=M(3538),S=M(3090),T=M(2660),y=M(1113),d=M(4859),c=M(6021),s=M(2614),a=M(9916),u=M(9495);const h=/^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$/,g=/^\/Date\((-?\d+)((\+|-)?(\d+)?)\)\/$/,_=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[-+]{1}\d{2}(:?)(\d{2})?)?$/,x="application/json;odata=verbose",w=He=>"string"===(0,P.NW)(He)?He.split():He,D=He=>/\./.test(He),C=(He,Le,Ae)=>{for(He=String(He);He.length<Le;)He=Ae?`${He}0`:`0${He}`;return He},I=(He,Le,Ae)=>{const ke=[],Ge=Qe=>C(Qe,2);return ke.push(He.getFullYear()),ke.push("-"),ke.push(Ge(He.getMonth()+1)),ke.push("-"),ke.push(Ge(He.getDate())),Le&&He.getHours()+He.getMinutes()+He.getSeconds()+He.getMilliseconds()<1||(ke.push("T"),ke.push(Ge(He.getHours())),ke.push(":"),ke.push(Ge(He.getMinutes())),ke.push(":"),ke.push(Ge(He.getSeconds())),He.getMilliseconds()&&(ke.push("."),ke.push(C(He.getMilliseconds(),3))),Ae||ke.push("Z")),ke.join("")},K=(He,Le,Ae)=>{const{deserializeDates:ke,fieldTypes:Ge,countOnly:Qe,isPaged:it}=Ae,xt=new c.cY,Vt=function(He,Le){var Ae;let ke=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Le=(0,S.X)({async:!0,method:"get",url:"",params:{},payload:null,headers:{},timeout:3e4},Le),null===(Ae=ke.beforeSend)||void 0===Ae||Ae.call(ke,Le);const{async:Ge,timeout:Qe,headers:it}=Le;let{url:xt,method:Vt}=Le;const{jsonp:Qt,withCredentials:Xn}=ke;Vt=(Vt||"get").toLowerCase();const Vi="get"===Vt,Ui=Vi&&Qt,Do=(0,S.X)({},Le.params),Qo=Vi?Do:JSON.stringify(Le.payload,function(is,Ks){if(!(this[is]instanceof Date))return Ks;switch(Ks=I(this[is]),He){case 2:return Ks.substr(0,Ks.length-1);case 3:case 4:return Ks;default:throw s.sO.Error("E4002")}}),Fr=!Vi&&(He=>{const Le=[];for(const Ae in He)Le.push(Ae+"="+He[Ae]);return Le.join("&")})(Do),cs=!Vi&&x;return Fr&&(xt+=(xt.indexOf("?")>-1?"&":"?")+Fr),Ui&&(Qo.$format="json"),{url:xt,data:Qo,dataType:Ui?"jsonp":"json",jsonp:Ui&&"$callback",method:Vt,async:Ge,timeout:Qe,headers:it,contentType:cs,accepts:{json:[x,"text/plain"].join()},xhrFields:{withCredentials:Xn}}}(He,Le,Ae);return y.A.sendRequest(Vt).always((Qt,Xn)=>{const Ui=re(Qt,Xn,{deserializeDates:ke,fieldTypes:Ge},Vt),{error:Do,data:Qo,count:tr}=Ui;let{nextUrl:Fr}=Ui;if(Do)Do.message!==a.SR&&xt.reject(Do);else if(Qe)isFinite(tr)?xt.resolve(tr):xt.reject(new s.sO.Error("E4018"));else if(Fr&&!it)(He=>/^(?:[a-z]+:)?\/{2,2}/i.test(He))(Fr)||(Fr=((He,Le)=>{let Ae;const ke=(He=>{const Le=He.indexOf("?");return Le>-1?He.substr(0,Le):He})(He).split("/"),Ge=Le.split("/");for(ke.pop();Ge.length;)Ae=Ge.shift(),".."===Ae?ke.pop():ke.push(Ae);return ke.join("/")})(Vt.url,Fr)),K(He,{url:Fr},Ae).fail(xt.reject).done(cs=>xt.resolve(Qo.concat(cs)));else{const cs=isFinite(tr)?{totalCount:tr}:void 0;xt.resolve(Qo,cs)}}),xt.promise()},re=(He,Le,Ae,ke)=>{const Ge=((He,Le,Ae)=>{var ke,Ge,Qe,it;if("nocontent"===Le)return null;let xt="Unknown error",Vt=He,Qt=200;const Xn={requestOptions:Ae};if("success"!==Le){const{status:Ui,responseText:Do}=He;Qt=Ui,xt=(0,a.m9)(He,Le);try{Vt=JSON.parse(Do)}catch{}}const Vi=(null===(ke=Vt)||void 0===ke?void 0:ke.then)||(null===(Ge=Vt)||void 0===Ge?void 0:Ge.error)||(null===(Qe=Vt)||void 0===Qe?void 0:Qe["odata.error"])||(null===(it=Vt)||void 0===it?void 0:it["@odata.error"]);if(Vi){xt=(He=>{let Le,Ae,ke=He;var Ge;"message"in He&&(Le=(null===(Ge=He.message)||void 0===Ge?void 0:Ge.value)||He.message);for(;(ke=ke.innererror||ke.internalexception)&&(Ae=ke.message,Le=Ae??Le,!ke.internalexception||-1!==Le.indexOf("inner exception")););return Le})(Vi)||xt,Xn.errorDetails=Vi,200===Qt&&(Qt=500);const Ui=Number(Vi.code);isFinite(Ui)&&Ui>=400&&(Qt=Ui)}return Qt>=400||0===Qt?(Xn.httpStatus=Qt,(0,S.X)(Error(xt),Xn)):null})(He,Le,ke);if(Ge)return{error:Ge};if(!(0,P.Qd)(He))return{data:He};const Qe="d"in He&&(Array.isArray(He.d)||(0,P.Gv)(He.d))?q(He):Y(He);return Q(Qe,Ae),Qe},q=He=>{let{d:Le}=He;return(0,P.O9)(Le)?{data:Le.results??Le,nextUrl:Le.__next,count:parseInt(Le.__count,10)}:{error:Error("Malformed or unsupported JSON response received")}},Y=He=>({data:He.value??He,nextUrl:He["@odata.nextLink"],count:parseInt(He["@odata.count"],10)}),Z=f.A.inherit({ctor(He){this._value=He},valueOf(){return this._value}}),Q=function(He){let Le=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,T.__)(He,(Ae,ke)=>{if(null!==ke&&"object"==typeof ke)"results"in ke&&(He[Ae]=ke.results),Q(He[Ae],Le);else if("string"==typeof ke){const{fieldTypes:Ge,deserializeDates:Qe}=Le;if((!Ge||"String"!==Ge[Ae])&&h.test(ke)&&(He[Ae]=new W.A(ke)),!1!==Qe)if(ke.match(g)){const xt=new Date(Number(RegExp.$1)+60*RegExp.$2*1e3);He[Ae]=new Date(xt.valueOf()+60*xt.getTimezoneOffset()*1e3)}else _.test(ke)&&(He[Ae]=new Date((He=>{const Le=new Date(60*new Date(0).getTimezoneOffset()*1e3),Ae=He.replace("Z","").split("T"),ke=/(\d{4})-(\d{2})-(\d{2})/.exec(Ae[0]),Ge=/(\d{2}):(\d{2}):(\d{2})\.?(\d{0,7})?/.exec(Ae[1]);if(Le.setFullYear(Number(ke[1])),Le.setMonth(Number(ke[2])-1),Le.setDate(Number(ke[3])),Array.isArray(Ge)&&Ge.length){Le.setHours(Number(Ge[1])),Le.setMinutes(Number(Ge[2])),Le.setSeconds(Number(Ge[3]));let Qe=(Ge[4]||"").slice(0,3);Qe=C(Qe,3,!0),Le.setMilliseconds(Number(Qe))}return Le})(He[Ae]).valueOf()))}})},z=He=>He instanceof Z?He.valueOf():He.replace(/\./g,"/"),oe=He=>He instanceof Date?I(He,!1,!1):He instanceof W.A?He.valueOf():Array.isArray(He)?`[${He.map(Le=>oe(Le)).join(",")}]`:ae(He),ae=He=>He instanceof Date?(He=>`datetime'${I(He,!0,!0)}'`)(He):He instanceof W.A?`guid'${He}'`:He instanceof Z?He.valueOf():"string"==typeof He?(He=>`'${He.replace(/'/g,"''")}'`)(He):String(He),ee=(He,Le)=>{switch(Le){case 2:case 3:return ae(He);case 4:return oe(He);default:throw s.sO.Error("E4002")}},de={String:He=>`${He}`,Int32:He=>Math.floor(He),Int64:He=>He instanceof Z?He:new Z(`${He}L`),Guid:He=>He instanceof W.A?He:new W.A(He),Boolean:He=>!!He,Single:He=>He instanceof Z?He:new Z(He+"f"),Decimal:He=>He instanceof Z?He:new Z(He+"m")},ue=(He,Le)=>{if(null===Le)return null;const Ae=de[He];if(!Ae)throw s.sO.Error("E4014",He);return Ae(Le)},be=(He,Le)=>{if(Le)return He<4?z(Le.join()):(0,d.VM)(Le,D,!0).join()},ve=He=>{let Le="";const Ae=[],ke=[];return(0,T.__)(He,(Ge,Qe)=>{Array.isArray(Qe)&&[].push.apply(Ae,Qe),(0,P.Qd)(Qe)&&ke.push(`${Ge}${ve(Qe)}`)}),(Ae.length||ke.length)&&(Le+="(",Ae.length&&(Le+=`$select=${(0,T.Tj)(Ae,z).join()}`),ke.length&&(Ae.length&&(Le+=";"),Le+=`$expand=${(0,T.Tj)(ke,z).join()}`),Le+=")"),Le},Ce=(He,Le,Ae)=>{const ke=Ae(Le,He.shift(),He);!1!==ke&&Ce(He,ke,Ae)},ye=(He,Le,Ae)=>(0,T.__)(He,(ke,Ge)=>Ce(Ge.split("."),Le,Ae)),ge=(He,Le)=>{const Ae={};return He&&(0,T.__)(w(He),function(){Ae[z(this)]=1}),Le&&(0,T.__)(w(Le),function(){const ke=this.split(".");ke.length<2||(ke.pop(),Ae[z(ke.join("."))]=1)}),(0,T.Tj)(Ae,(ke,Ge)=>Ge).join()},xe=(He,Le,Ae)=>He<4?ge(Le,Ae):((He,Le)=>{const Ae={};if(He||Le)return He&&ye(w(He),Ae,(ke,Ge,Qe)=>(ke[Ge]=ke[Ge]||{},!!Qe.length&&ke[Ge])),Le&&ye((0,d.VM)(w(Le),D),Ae,(ke,Ge,Qe)=>Qe.length?ke[Ge]=ke[Ge]||{}:(ke[Ge]=ke[Ge]||[],ke[Ge].push(Ge),!1)),(He=>{const Le=[];return(0,T.__)(He,(Ae,ke)=>Le.push(`${Ae}${ve(ke)}`)),Le.join()})(Ae)})(Le,Ae);var Oe=M(1541),ze=M(6569),$e=M(3568);const Ue=["contains","notcontains","startswith","endswith"],ot=(()=>{let He,Le,Ae;const ke=Vi=>(Ui,Do)=>`${Ui} ${Vi} ${Do}`,Ge=(Vi,Ui)=>(Do,Qo)=>{const tr=[Vi,"("];return Le&&(Do=-1===Do.indexOf("tolower(")?`tolower(${Do})`:Do,Qo=Qo.toLowerCase()),Ui?tr.push(Qo,",",Do):tr.push(Do,",",Qo),tr.push(")"),tr.join("")},Qe={"=":ke("eq"),"<>":ke("ne"),">":ke("gt"),">=":ke("ge"),"<":ke("lt"),"<=":ke("le"),startswith:Ge("startswith"),endswith:Ge("endswith")},it=(0,S.X)({},Qe,{contains:Ge("substringof",!0),notcontains:Ge("not substringof",!0)}),xt=(0,S.X)({},Qe,{contains:Ge("contains"),notcontains:Ge("not contains")}),Qt=Vi=>{const Ui=[];let Do,Qo;return(0,T.__)(Vi,function(tr,Fr){if(Array.isArray(Fr)){if(Ui.length>1&&Do!==Qo)throw new s.sO.Error("E4019");Ui.push(`(${Xn(Fr)})`),Do=Qo,Qo="and"}else Qo=(0,a.LO)(this)?"and":"or"}),Ui.join(` ${Do} `)},Xn=Vi=>Array.isArray(Vi[0])?Qt(Vi):(0,a.bF)(Vi)?(Ui=>{const Do=Ui[0],Qo=Xn(Ui[1]);if("!"===Do)return`not (${Qo})`;throw s.sO.Error("E4003",Do)})(Vi):(Vi=>{var Ui;const Do=(Vi=(0,a.aE)(Vi))[1],Qo=Vi[0],tr=Ae&&Ae[Qo];if(tr&&(Fr=Do,Ue.some(dc=>dc===Fr))&&"String"!==tr)throw new s.sO.Error("E4024",Do,Qo,tr);var Fr;const is=(4===He?xt:it)[Do.toLowerCase()];if(!is)throw s.sO.Error("E4003",Do);let Ks=Vi[2];return null!==(Ui=Ae)&&void 0!==Ui&&Ui[Qo]&&(Ks=ue(Ae[Qo],Ks)),is(z(Qo),ee(Ks,He))})(Vi);return(Vi,Ui,Do,Qo)=>(Ae=Do,Le=Qo??(0,b.A)().oDataFilterToLower,He=Ui,Xn(Vi))})();$e.A.odata=He=>{let Le=[];const Ae=[],ke=He.expand;let Ge,Qe,it,xt;const Vt=He.version||4,Qt=()=>Qe||void 0!==it,Xn=Ui=>{for(let Do=0;Do<Ui.length;Do++)if((0,P.Tn)(Ui[Do])||Array.isArray(Ui[Do])&&Xn(Ui[Do]))return!0;return!1},Vi=()=>{const Ui={};if(xt||(Le.length&&(Ui.$orderby=Le.join(",")),Qe&&(Ui.$skip=Qe),void 0!==it&&(Ui.$top=it),Ui.$select=be(Vt,Ge)||void 0,Ui.$expand=xe(Vt,ke,Ge)||void 0),Ae.length){const Do=Ae.length<2?Ae[0]:Ae,Qo=He?.fieldTypes,tr=He?.filterToLower;Ui.$filter=ot(Do,Vt,Qo,tr)}return xt&&(Ui.$top=0),(He.requireTotalCount||xt)&&(4!==Vt?Ui.$inlinecount="allpages":Ui.$count="true"),Ui};return{optimize:Ui=>{let Do=-1;for(let tr=0;tr<Ui.length;tr++)if("select"===Ui[tr].name){Do=tr;break}if(Do<0||!(0,P.Tn)(Ui[Do].args[0]))return;const Qo=Ui[1+Do];!Qo||"slice"!==Qo.name||(Ui[1+Do]=Ui[Do],Ui[Do]=Qo)},exec:Ui=>K(Vt,{url:Ui,params:(0,S.X)(Vi(),He?.params)},{beforeSend:He.beforeSend,jsonp:He.jsonp,withCredentials:He.withCredentials,countOnly:xt,deserializeDates:He.deserializeDates,fieldTypes:He.fieldTypes,isPaged:isFinite(it)}),multiSort(Ui){let Do;if(Qt())return!1;for(let Qo=0;Qo<Ui.length;Qo++){const tr=Ui[Qo][0],Fr=!!Ui[Qo][1];let cs;if("string"!=typeof tr)return!1;cs=z(tr),Fr&&(cs+=" desc"),Do=Do||[],Do.push(cs)}Le=Do},slice(Ui,Do){if(Qt())return!1;Qe=Ui,it=Do},filter(Ui){if(Qt()||(Array.isArray(Ui)||(Ui=[].slice.call(arguments)),Xn(Ui)))return!1;Ae.length&&Ae.push("and"),Ae.push(Ui)},select(Ui){if(Ge||(0,P.Tn)(Ui))return!1;Array.isArray(Ui)||(Ui=[].slice.call(arguments)),Ge=Ui},count:()=>xt=!0}};class Ye{constructor(Le){Le=Le||{},this._url=String(Le.url).replace(/\/+$/,""),this._beforeSend=Le.beforeSend,this._jsonp=Le.jsonp,this._version=Le.version||4,this._withCredentials=Le.withCredentials,this._deserializeDates=Le.deserializeDates,this._filterToLower=Le.filterToLower}sendRequest(Le,Ae,ke,Ge){return K(this.version,{url:Le,method:Ae,params:ke||{},payload:Ge},{beforeSend:this._beforeSend,jsonp:this._jsonp,withCredentials:this._withCredentials,deserializeDates:this._deserializeDates})}get version(){return this._version}get beforeSend(){return this._beforeSend}get url(){return this._url}get jsonp(){return this._jsonp}get filterToLower(){return this._filterToLower}}const Xe=ze.A.inherit({ctor(He){this.callBase(He),this._requestDispatcher=new Ye(He);let Le=this.key(),Ae=He.fieldTypes,ke=He.keyType;if(ke){const Ge="string"==typeof ke;Le||(Le=Ge?"5d46402c-7899-4ea9-bd81-8b73c47c7683":Object.keys(ke),this._legacyAnonymousKey=Le),Ge&&(ke=((He,Le)=>({[He]:Le}))(Le,ke)),Ae=((He,Le)=>{const Ae={};for(const ke in He)Ae[ke]=He[ke];for(const ke in Le)ke in Ae?Ae[ke]!==Le[ke]&&s.sO.log("W4001",ke):Ae[ke]=Le[ke];return Ae})(Ae,ke)}this._fieldTypes=Ae||{},this._updateMethod=2===this.version()?"MERGE":"PATCH"},_customLoadOptions:()=>["expand","customQueryParams"],_byKeyImpl(He,Le){const Ae={};return Le&&(Ae.$expand=xe(this.version(),Le.expand,Le.select)||void 0,Ae.$select=be(this.version(),Le.select)||void 0),this._requestDispatcher.sendRequest(this._byKeyUrl(He),"GET",Ae)},createQuery(He){let Le;const Ae={adapter:"odata",beforeSend:this._requestDispatcher.beforeSend,errorHandler:this._errorHandler,jsonp:this._requestDispatcher.jsonp,version:this._requestDispatcher.version,withCredentials:this._requestDispatcher._withCredentials,expand:He?.expand,requireTotalCount:He?.requireTotalCount,deserializeDates:this._requestDispatcher._deserializeDates,fieldTypes:this._fieldTypes};if(Le=He?.urlOverride??this._requestDispatcher.url,(0,P.O9)(this._requestDispatcher.filterToLower)&&(Ae.filterToLower=this._requestDispatcher.filterToLower),null!=He&&He.customQueryParams){const ke=((He,Le)=>{if(!He)return He;const Ae={};return(0,T.__)(He,(ke,Ge)=>{Ae[ke]=ee(Ge,Le)}),Ae})(He?.customQueryParams,this.version());4===this.version()?Le=((He,Le)=>(0,u.GP)("{0}({1})",He,(0,T.Tj)(Le||{},(Ae,ke)=>(0,u.GP)("{0}={1}",ke,Ae)).join(",")))(Le,ke):Ae.params=ke}return(0,Oe.A)(Le,Ae)},_insertImpl(He){this._requireKey();const Le=new c.cY;return(0,c.z7)(this._requestDispatcher.sendRequest(this._requestDispatcher.url,"POST",null,He)).done(Ae=>Le.resolve(Ae&&!(0,b.A)().useLegacyStoreResult?Ae:He,this.keyOf(Ae))).fail(Le.reject),Le.promise()},_updateImpl(He,Le){const Ae=new c.cY;return(0,c.z7)(this._requestDispatcher.sendRequest(this._byKeyUrl(He),this._updateMethod,null,Le)).done(ke=>(0,b.A)().useLegacyStoreResult?Ae.resolve(He,Le):Ae.resolve(ke||Le,He)).fail(Ae.reject),Ae.promise()},_removeImpl(He){const Le=new c.cY;return(0,c.z7)(this._requestDispatcher.sendRequest(this._byKeyUrl(He),"DELETE")).done(()=>Le.resolve(He)).fail(Le.reject),Le.promise()},_convertKey(He){let Le=He;const Ae=this._fieldTypes,ke=this.key()||this._legacyAnonymousKey;if(Array.isArray(ke)){Le={};for(let Ge=0;Ge<ke.length;Ge++){const Qe=ke[Ge];Le[Qe]=ue(Ae[Qe],He[Qe])}}else Ae[ke]&&(Le=ue(Ae[ke],He));return Le},_byKeyUrl(He){const Le=this._requestDispatcher.url,Ae=this._convertKey(He);return`${Le}(${encodeURIComponent(((He,Le)=>{if((0,P.Qd)(He)){const Ae=[];return(0,T.__)(He,(ke,Ge)=>Ae.push(`${z(ke)}=${ee(Ge,Le)}`)),Ae.join()}return ee(He,Le)})(Ae,this.version()))})`},version(){return this._requestDispatcher.version}},"odata");class tt extends RangeError{constructor(Le){super(`${Le} was out of range. Must be non-negative and less than the size of the collection.`),this.paramName=Le,this.name="ArgumentOutOfRangeException",this.stack=this.stack||(new Error).stack}}const vt=Object.freeze({MoreThanOneElement:"Sequence contains more than one element",MoreThanOneMatchingElement:"Sequence contains more than one matching element",NoElements:"Sequence contains no elements",NoMatch:"Sequence contains no matching element"});class qe extends Error{constructor(Le){super(Le),this.name="InvalidOperationException",this.stack=this.stack||(new Error).stack}}const At=(He,Le)=>He===Le;class Tt{constructor(Le){this.iterator=Le}[Symbol.asyncIterator](){return this.iterator()}}function qt(He,Le){this.v=He,this.k=Le}function wt(He){return new qt(He,0)}function En(He){return function(){return new ri(He.apply(this,arguments))}}function ri(He){var Le,Ae;function ke(Qe,it){try{var xt=He[Qe](it),Vt=xt.value,Qt=Vt instanceof qt;Promise.resolve(Qt?Vt.v:Vt).then(function(Xn){if(Qt){var Vi="return"===Qe?"return":"next";if(!Vt.k||Xn.done)return ke(Vi,Xn);Xn=He[Vi](Xn).value}Ge(xt.done?"return":"normal",Xn)},function(Xn){ke("throw",Xn)})}catch(Xn){Ge("throw",Xn)}}function Ge(Qe,it){switch(Qe){case"return":Le.resolve({value:it,done:!0});break;case"throw":Le.reject(it);break;default:Le.resolve({value:it,done:!1})}(Le=Le.next)?ke(Le.key,Le.arg):Ae=null}this._invoke=function(Qe,it){return new Promise(function(xt,Vt){var Qt={key:Qe,arg:it,resolve:xt,reject:Vt,next:null};Ae?Ae=Ae.next=Qt:(Le=Ae=Qt,ke(Qe,it))})},"function"!=typeof He.return&&(this.return=void 0)}ri.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},ri.prototype.next=function(He){return this._invoke("next",He)},ri.prototype.throw=function(He){return this._invoke("throw",He)},ri.prototype.return=function(He){return this._invoke("return",He)};class Tn{constructor(Le){this.dataFunc=Le}[Symbol.asyncIterator](){const{dataFunc:Le}=this;function ke(){return(ke=En(function*(){if(1===Le.type)for(const Ge of Le.generator())yield Ge;else for(const Ge of yield wt(Le.generator()))yield Ge})).apply(this,arguments)}return function Ae(){return ke.apply(this,arguments)}()}}class Jn{constructor(Le){this.iterator=Le}[Symbol.iterator](){return this.iterator()}}class wi extends Array{}const gi=(He,Le,Ae,ke)=>{if(ke){if(!Ae)throw new ReferenceError("TAccumulate function is undefined");return Dt(He,Le,Ae,ke)}return Ae?pt(He,Le,Ae):Ai(He,Le)},Ai=(He,Le)=>{let Ae;for(const ke of He)Ae=Ae?Le(Ae,ke):ke;if(void 0===Ae)throw new qe(vt.NoElements);return Ae},pt=(He,Le,Ae)=>{let ke=Le;for(const Ge of He)ke=Ae(ke,Ge);return ke},Dt=(He,Le,Ae,ke)=>{let Ge=Le;for(const Qe of He)Ge=Ae(Ge,Qe);return ke(Ge)},cn=(He,Le)=>{for(const Ae of He)if(!1===Le(Ae))return!1;return!0};var dt=M(3308);const Et=function(){var He=(0,dt.A)(function*(Le,Ae){for(const ke of Le)if(!1===(yield Ae(ke)))return!1;return!0});return function(Ae,ke){return He.apply(this,arguments)}}(),hn=(He,Le)=>Le?Ln(He,Le):$n(He),$n=He=>{for(const Le of He)return!0;return!1},Ln=(He,Le)=>{for(const Ae of He)if(!0===Le(Ae))return!0;return!1},Nt=function(){var He=(0,dt.A)(function*(Le,Ae){for(const ke of Le)if(!0===(yield Ae(ke)))return!0;return!1});return function(Ae,ke){return He.apply(this,arguments)}}();function Gt(He){var Le,Ae,ke,Ge=2;for(typeof Symbol<"u"&&(Ae=Symbol.asyncIterator,ke=Symbol.iterator);Ge--;){if(Ae&&null!=(Le=He[Ae]))return Le.call(He);if(ke&&null!=(Le=He[ke]))return new on(Le.call(He));Ae="@@asyncIterator",ke="@@iterator"}throw new TypeError("Object is not async iterable")}function on(He){function Le(Ae){if(Object(Ae)!==Ae)return Promise.reject(new TypeError(Ae+" is not an object."));var ke=Ae.done;return Promise.resolve(Ae.value).then(function(Ge){return{value:Ge,done:ke}})}return(on=function(ke){this.s=ke,this.n=ke.next}).prototype={s:null,n:null,next:function(){return Le(this.n.apply(this.s,arguments))},return:function(ke){var Ge=this.s.return;return void 0===Ge?Promise.resolve({value:ke,done:!0}):Le(Ge.apply(this.s,arguments))},throw:function(ke){var Ge=this.s.return;return void 0===Ge?Promise.reject(ke):Le(Ge.apply(this.s,arguments))}},new on(He)}const sn=He=>{if(Array.isArray(He)){if(0===He.length)throw new qe(vt.NoElements);return new Tt(En(function*(){var ke,Le=!1,Ae=!1;try{for(var Qe,Ge=Gt(He);Le=!(Qe=yield wt(Ge.next())).done;Le=!1)yield Qe.value}catch(it){Ae=!0,ke=it}finally{try{Le&&null!=Ge.return&&(yield wt(Ge.return()))}finally{if(Ae)throw ke}}}))}return new Tt(He)},It=He=>{function Ae(){return(Ae=En(function*(){for(const ke of He)yield ke})).apply(this,arguments)}return sn(function Le(){return Ae.apply(this,arguments)})},Ot=(He,Le)=>new Tn({generator:Le,type:He}),zt=He=>Ot(0,function(){var Ae=(0,dt.A)(function*(){const ke=[];for(const Ge of He)ke.push(Ge);return ke});return function(){return Ae.apply(this,arguments)}}()),un=(He,Le)=>{let Ae=0,ke=0;if(Le)for(const Ge of He)Ae+=Le(Ge),ke+=1;else for(const Ge of He)Ae+=Ge,ke+=1;if(0===ke)throw new qe(vt.NoElements);return Ae/ke},Pn=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0,Ge=0;for(const Qe of Le)ke+=(yield Ae(Qe)),Ge+=1;if(0===Ge)throw new qe(vt.NoElements);return ke/Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),ci=(He,Le)=>{if(Le<1)throw new tt("index");return new Jn(function*Ae(){let ke=[];for(const Ge of He)ke.push(Ge),ke.length===Le&&(yield ke,ke=[]);ke.length&&(yield ke)})},Ei=(He,Le)=>new Jn(function*Ae(){yield*He,yield*Le}),Hi=(He,Le,Ae=At)=>{for(const ke of He)if(Ae(Le,ke))return!0;return!1},mo=function(){var He=(0,dt.A)(function*(Le,Ae,ke){for(const Ge of Le)if(yield ke(Ae,Ge))return!0;return!1});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),xo=(He,Le)=>Le?rn(He,Le):vr(He),vr=He=>{let Le=0;for(const Ae of He)Le++;return Le},rn=(He,Le)=>{let Ae=0;for(const ke of He)!0===Le(ke)&&Ae++;return Ae},en=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;for(const Ge of Le)!0===(yield Ae(Ge))&&ke++;return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Zn=(He,Le)=>new Jn(function*Ae(){let ke=!1;for(const Ge of He)ke=!0,yield Ge;ke||(yield Le)}),Di=(He,Le=At)=>new Jn(function*Ae(){const ke=[];for(const Ge of He)ke.find(it=>Le(it,Ge))||(ke.push(Ge),yield Ge)}),po=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge=[];e:for(const Qe of He){for(const it of Ge)if(yield wt(Le(it,Qe)))continue e;Ge.push(Qe),yield Qe}})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},nr=(He,Le)=>new Jn(function*Ae(){for(const ke of He)Le(ke),yield ke}),Xo=(He,Le)=>{function ke(){return(ke=En(function*(){for(const Ge of He)yield wt(Le(Ge)),yield Ge})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Hn=(He,Le)=>{if(Le<0)throw new tt("index");let Ae=0;for(const ke of He)if(Le===Ae++)return ke;throw new tt("index")},ui=(He,Le)=>{let Ae=0;for(const ke of He)if(Le===Ae++)return ke;return null},bi=(He,Le,Ae=At)=>new Jn(function*ke(){const Ge=[...Le];for(const Qe of He){let it=!1;for(let xt=0;xt<Ge.length;xt++)if(!0===Ae(Qe,Ge[xt])){it=!0;break}!1===it&&(yield Qe)}}),ao=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=[...Le];for(const it of He){let xt=!1;for(let Vt=0;Vt<Qe.length;Vt++){const Qt=Qe[Vt];if(!0===(yield wt(Ae(it,Qt)))){xt=!0;break}}!1===xt&&(yield it)}})).apply(this,arguments)}return sn(function ke(){return Ge.apply(this,arguments)})},Wi=(He,Le)=>Le?Zo(He,Le):Ko(He),Ko=He=>{const Le=He[Symbol.iterator]().next();if(!0===Le.done)throw new qe(vt.NoElements);return Le.value},Zo=(He,Le)=>{for(const Ae of He)if(!0===Le(Ae))return Ae;throw new qe(vt.NoMatch)},xr=function(){var He=(0,dt.A)(function*(Le,Ae){for(const ke of Le)if(!0===(yield Ae(ke)))return ke;throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),hr=(He,Le)=>Le?mn(He,Le):Rt(He),Rt=He=>He[Symbol.iterator]().next().value||null,mn=(He,Le)=>{for(const Ae of He)if(!0===Le(Ae))return Ae;return null},pi=function(){var He=(0,dt.A)(function*(Le,Ae){for(const ke of Le)if(!0===(yield Ae(ke)))return ke;return null});return function(Ae,ke){return He.apply(this,arguments)}}();class Ti extends wi{constructor(Le,Ae){super(1),this.key=Le,this[0]=Ae}}const Gr=(He,Le,Ae)=>{let ke;return ke=Ae?((He,Le,Ae)=>function*(){const Ge=new Array;for(const Qe of He){const it=Le(Qe);let xt=!1;for(let Vt=0;Vt<Ge.length;Vt++){const Qt=Ge[Vt];if(Ae(Qt.key,it)){Qt.push(Qe),xt=!0;break}}!1===xt&&Ge.push(new Ti(it,Qe))}for(const Qe of Ge)yield Qe})(He,Le,Ae):((He,Le)=>function*(){const ke={};for(const Ge of He){const Qe=Le(Ge),it=ke[Qe];it?it.push(Ge):ke[Qe]=new Ti(Qe,Ge)}for(const Ge in ke)yield ke[Ge]})(He,Le),new Jn(ke)},Yn=(He,Le,Ae)=>Ae?Ii(He,Le,Ae):ei(He,Le),ei=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge={};for(const Qe of He){const it=yield wt(Le(Qe)),xt=Ge[it];xt?xt.push(Qe):Ge[it]=new Ti(it,Qe)}for(const Qe in Ge)yield Ge[Qe]})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Ii=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=new Array;for(const it of He){const xt=yield wt(Le(it));let Vt=!1;for(let Qt=0;Qt<Qe.length;Qt++){const Xn=Qe[Qt];if(!0===(yield wt(Ae(Xn.key,xt)))){Xn.push(it),Vt=!0;break}}!1===Vt&&Qe.push(new Ti(xt,it))}for(const it of Qe)yield it})).apply(this,arguments)}return sn(function ke(){return Ge.apply(this,arguments)})},co=(He,Le,Ae,ke)=>ke?((He,Le,Ae,ke)=>new Jn(function*Ge(){const Qe=new Array;for(const it of He){const xt=Le(it);let Vt=!1;for(let Qt=0;Qt<Qe.length;Qt++){const Xn=Qe[Qt];if(ke(Xn.key,xt)){Xn.push(Ae(it)),Vt=!0;break}}if(!1===Vt){const Qt=Ae(it);Qe.push(new Ti(xt,Qt))}}for(const it of Qe)yield it}))(He,Le,Ae,ke):((He,Le,Ae)=>new Jn(function*ke(){const Ge={};for(const Qe of He){const it=Le(Qe),xt=Ge[it],Vt=Ae(Qe);xt?xt.push(Vt):Ge[it]=new Ti(it,Vt)}for(const Qe in Ge)yield Ge[Qe]}))(He,Le,Ae),ko=(He,Le,Ae,ke,Ge,Qe)=>{const it=Qe?er(He,Le,Ae,ke,Ge,Qe):or(He,Le,Ae,ke,Ge);return new Jn(it)},er=(He,Le,Ae,ke,Ge,Qe)=>function*(){var it;const xt=[];for(const Vt of Le){const Qt=ke(Vt),Xn=xt.find(Vi=>Qe(Vi.key,Qt));Xn?Xn.values.push(Vt):xt.push({key:Qt,values:[Vt]})}for(const Vt of He){const Qt=Ae(Vt),Xn=null!==(it=xt.find(Vi=>Qe(Vi.key,Qt)))&&void 0!==it?it:{key:Qt,values:[]};yield Ge(Vt,Xn.values)}},or=(He,Le,Ae,ke,Ge)=>function*(){var Qe;const it=new Map;for(const xt of Le){const Vt=ke(xt),Qt=it.get(Vt);Qt?Qt.push(xt):it.set(Vt,[xt])}for(const xt of He){const Vt=Ae(xt),Qt=null!==(Qe=it.get(Vt))&&void 0!==Qe?Qe:[];yield Ge(xt,Qt)}},Jr=(He,Le,Ae,ke,Ge,Qe)=>{const it=Qe?Wr(He,Le,Ae,ke,Ge,Qe):Xr(He,Le,Ae,ke,Ge);return sn(it)},Wr=(He,Le,Ae,ke,Ge,Qe)=>En(function*(){var it;const xt=[];for(const Vt of Le){const Qt=yield wt(ke(Vt)),Xn=xt.find(Vi=>Qe(Vi.key,Qt));Xn?Xn.values.push(Vt):xt.push({key:Qt,values:[Vt]})}for(const Vt of He){const Qt=yield wt(Ae(Vt)),Xn=null!==(it=xt.find(Vi=>Qe(Vi.key,Qt)))&&void 0!==it?it:{key:Qt,values:[]};yield Ge(Vt,Xn.values)}}),Xr=(He,Le,Ae,ke,Ge)=>En(function*(){var Qe;const it=new Map;for(const xt of Le){const Vt=yield wt(ke(xt)),Qt=it.get(Vt);Qt?Qt.push(xt):it.set(Vt,[xt])}for(const xt of He){const Vt=yield wt(Ae(xt)),Qt=null!==(Qe=it.get(Vt))&&void 0!==Qe?Qe:[];yield Ge(xt,Qt)}}),Mr=(He,Le,Ae=At)=>new Jn(function*ke(){const Ge=[...He.distinct(Ae)];if(0===Ge.length)return;const Qe=[...Le];for(let it=0;it<Ge.length;it++){const xt=Ge[it];for(let Vt=0;Vt<Qe.length;Vt++)if(!0===Ae(xt,Qe[Vt])){yield xt;break}}}),dn=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=[];var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He.distinctAsync(Ae));it=!(Xn=yield wt(Qt.next())).done;it=!1)Qe.push(Xn.value)}catch(Ui){xt=!0,Vt=Ui}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}if(0===Qe.length)return;const Vi=[...Le];for(let Ui=0;Ui<Qe.length;Ui++){const Do=Qe[Ui];for(let Qo=0;Qo<Vi.length;Qo++){const tr=Vi[Qo];if(!0===(yield wt(Ae(Do,tr)))){yield Do;break}}}})).apply(this,arguments)}return sn(function ke(){return Ge.apply(this,arguments)})},an=(He,Le,Ae,ke,Ge,Qe=At)=>new Jn(function*it(){const xt=[...Le];for(const Vt of He){const Qt=Ae(Vt);for(const Xn of xt){const Vi=ke(Xn);!0===Qe(Qt,Vi)&&(yield Ge(Vt,Xn))}}}),_n=(He,Le)=>Le?zn(He,Le):Wt(He),Wt=He=>{let Le;for(const Ae of He)Le=Ae;if(!Le)throw new qe(vt.NoElements);return Le},zn=(He,Le)=>{let Ae;for(const ke of He)!0===Le(ke)&&(Ae=ke);if(!Ae)throw new qe(vt.NoMatch);return Ae},mi=function(){var He=(0,dt.A)(function*(Le,Ae){let ke;for(const Ge of Le)!0===(yield Ae(Ge))&&(ke=Ge);if(!ke)throw new qe(vt.NoMatch);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Si=(He,Le)=>Le?No(He,Le):go(He),go=He=>{let Le=null;for(const Ae of He)Le=Ae;return Le},No=(He,Le)=>{let Ae=null;for(const ke of He)!0===Le(ke)&&(Ae=ke);return Ae},Sr=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;for(const Ge of Le)!0===(yield Ae(Ge))&&(ke=Ge);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),pr=(He,Le)=>Le?Lt(He,Le):Vr(He),Vr=He=>{let Le=null;for(const Ae of He)Le=Math.max(Le||Number.NEGATIVE_INFINITY,Ae);if(null===Le)throw new qe(vt.NoElements);return Le},Lt=(He,Le)=>{let Ae=null;for(const ke of He)Ae=Math.max(Ae||Number.NEGATIVE_INFINITY,Le(ke));if(null===Ae)throw new qe(vt.NoElements);return Ae},bn=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;for(const Ge of Le)ke=Math.max(ke||Number.NEGATIVE_INFINITY,yield Ae(Ge));if(null===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),jn=(He,Le)=>Le?Mi(He,Le):Ci(He),Ci=He=>{let Le=null;for(const Ae of He)Le=Math.min(Le||Number.POSITIVE_INFINITY,Ae);if(null===Le)throw new qe(vt.NoElements);return Le},Mi=(He,Le)=>{let Ae=null;for(const ke of He)Ae=Math.min(Ae||Number.POSITIVE_INFINITY,Le(ke));if(null===Ae)throw new qe(vt.NoElements);return Ae},Ki=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;for(const Ge of Le)ke=Math.min(ke||Number.POSITIVE_INFINITY,yield Ae(Ge));if(null===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),bt=(He,Le)=>{const Ae="string"==typeof Le?Ge=>typeof Ge===Le:Ge=>Ge instanceof Le;return new Jn(function*ke(){for(const Ge of He)Ae(Ge)&&(yield Ge)})};function gn(He){var Le={},Ae=!1;function ke(Ge,Qe){return Ae=!0,{done:!1,value:new qt(Qe=new Promise(function(it){it(He[Ge](Qe))}),1)}}return Le[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},Le.next=function(Ge){return Ae?(Ae=!1,Ge):ke("next",Ge)},"function"==typeof He.throw&&(Le.throw=function(Ge){if(Ae)throw Ae=!1,Ge;return ke("throw",Ge)}),"function"==typeof He.return&&(Le.return=function(Ge){return Ae?(Ae=!1,Ge):ke("return",Ge)}),Le}const Kt=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;{const Xn=yield Ae(Qt),Vi=ke.get(Xn);Vi?Vi.push(Qt):ke.set(Xn,[Qt])}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function _i(){return(_i=En(function*(He,Le,Ae,ke){const Ge=yield wt(Kt(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}const Qi=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;for(const Ge of Le){const Qe=yield Ae(Ge),it=ke.get(Qe);it?it.push(Ge):ke.set(Qe,[Ge])}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function Co(He,Le,Ae,ke){return $o.apply(this,arguments)}function $o(){return($o=En(function*(He,Le,Ae,ke){const Ge=yield wt(Qi(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}const sr=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;{const Xn=Ae(Qt),Vi=ke.get(Xn);Vi?Vi.push(Qt):ke.set(Xn,[Qt])}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function rr(){return(rr=En(function*(He,Le,Ae,ke){const Ge=yield wt(sr(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}function*wr(He,Le,Ae,ke){const Ge=((He,Le)=>{const Ae=new Map;for(const ke of He){const Ge=Le(ke),Qe=Ae.get(Ge);Qe?Qe.push(ke):Ae.set(Ge,[ke])}return Ae})(He,Le),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])}class Fo extends Tt{constructor(Le){super(En(function*(){var Ge,Ae=!1,ke=!1;try{for(var it,Qe=Gt(Le());Ae=!(it=yield wt(Qe.next())).done;Ae=!1){const xt=it.value;yield*gn(Gt(xt))}}catch(xt){ke=!0,Ge=xt}finally{try{Ae&&null!=Qe.return&&(yield wt(Qe.return()))}finally{if(ke)throw Ge}}})),this.orderedPairs=Le}static generateAsync(Le,Ae,ke,Ge){let Qe;return Qe=Le instanceof Fo?function(){var it=En(function*(){var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le.orderedPairs());xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const Ui=Vi.value;yield*gn(Gt(Co(Ui,Ae,ke,Ge)))}}catch(Ui){Vt=!0,Qt=Ui}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}});return function(){return it.apply(this,arguments)}}():()=>function Mn(He,Le,Ae,ke){return _i.apply(this,arguments)}(Le,Ae,ke,Ge),new Fo(Qe)}static generate(Le,Ae,ke,Ge){let Qe;return Qe=Le instanceof Fo?function(){var it=En(function*(){var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le.orderedPairs());xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const Ui=Vi.value;yield*gn(Gt(wr(Ui,Ae,ke,Ge)))}}catch(Ui){Vt=!0,Qt=Ui}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}});return function(){return it.apply(this,arguments)}}():()=>function lr(He,Le,Ae,ke){return rr.apply(this,arguments)}(Le,Ae,ke,Ge),new Fo(Qe)}thenBy(Le,Ae){return Fo.generate(this,Le,!0,Ae)}thenByAsync(Le,Ae){return Fo.generateAsync(this,Le,!0,Ae)}thenByDescending(Le,Ae){return Fo.generate(this,Le,!1,Ae)}thenByDescendingAsync(Le,Ae){return Fo.generateAsync(this,Le,!1,Ae)}}function*fs(He,Le,Ae,ke){const Ge=((He,Le)=>{const Ae=new Map;for(const ke of He){const Ge=Le(ke),Qe=Ae.get(Ge);Qe?Qe.push(ke):Ae.set(Ge,[ke])}return Ae})(He,Le),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])}const js=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;for(const Ge of Le){const Qe=yield Ae(Ge),it=ke.get(Qe);it?it.push(Ge):ke.set(Qe,[Ge])}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function Ta(He,Le,Ae,ke){return es.apply(this,arguments)}function es(){return(es=En(function*(He,Le,Ae,ke){const Ge=yield wt(js(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}class gs extends Jn{constructor(Le){super(function*(){for(const Ae of Le())yield*Ae}),this.orderedPairs=Le}static generate(Le,Ae,ke,Ge){let Qe;return Qe=Le instanceof gs?function*(){for(const it of Le.orderedPairs())yield*fs(it,Ae,ke,Ge)}:()=>fs(Le,Ae,ke,Ge),new gs(Qe)}static generateAsync(Le,Ae,ke,Ge){let Qe;return Qe=Le instanceof gs?function(){var it=En(function*(){for(const xt of Le.orderedPairs())yield*gn(Gt(Ta(xt,Ae,ke,Ge)))});return function(){return it.apply(this,arguments)}}():()=>Ta(Le,Ae,ke,Ge),new Fo(Qe)}thenBy(Le,Ae){return gs.generate(this,Le,!0,Ae)}thenByAsync(Le,Ae){return gs.generateAsync(this,Le,!0,Ae)}thenByDescending(Le,Ae){return gs.generate(this,Le,!1,Ae)}thenByDescendingAsync(Le,Ae){return gs.generateAsync(this,Le,!1,Ae)}}const Ca=(He,Le,Ae)=>gs.generate(He,Le,!0,Ae),Ga=(He,Le,Ae)=>gs.generateAsync(He,Le,!0,Ae),Fi=(He,Le,Ae)=>gs.generate(He,Le,!1,Ae),ct=(He,Le,Ae)=>gs.generateAsync(He,Le,!1,Ae),Ut=(He,Le)=>{const Ae=[],ke=[];for(const Ge of He)!0===Le(Ge)?ke.push(Ge):Ae.push(Ge);return[ke,Ae]},nn=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=[],Ge=[];for(const Qe of Le)!0===(yield Ae(Qe))?Ge.push(Qe):ke.push(Qe);return[Ge,ke]});return function(Ae,ke){return He.apply(this,arguments)}}(),kn=He=>new Jn(function*Le(){const Ae=[...He];for(let ke=Ae.length-1;ke>=0;ke--)yield Ae[ke]}),si=(He,Le)=>{if("function"==typeof Le){const{length:Ae}=Le;return 1===Ae?vi(He,Le):Ni(He,Le)}return fo(He,Le)},vi=(He,Le)=>new Jn(function*Ae(){for(const ke of He)yield Le(ke)}),Ni=(He,Le)=>new Jn(function*Ae(){let ke=0;for(const Ge of He)yield Le(Ge,ke),ke++}),fo=(He,Le)=>new Jn(function*Ae(){for(const ke of He)yield ke[Le]}),Xi=(He,Le)=>"function"==typeof Le?1===Le.length?Vo(He,Le):Go(He,Le):Er(He,Le),Vo=(He,Le)=>{function ke(){return(ke=En(function*(){for(const Ge of He)yield Le(Ge)})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Go=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;for(const Qe of He)yield Le(Qe,Ge),Ge++})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Er=(He,Le)=>{function ke(){return(ke=En(function*(){for(const Ge of He)yield Ge[Le]})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Ts=(He,Le)=>"function"==typeof Le?1===Le.length?ms(He,Le):rs(He,Le):$r(He,Le),ms=(He,Le)=>new Jn(function*Ae(){for(const ke of He)for(const Ge of Le(ke))yield Ge}),rs=(He,Le)=>new Jn(function*Ae(){let ke=0;for(const Ge of He){for(const Qe of Le(Ge,ke))yield Qe;ke++}}),$r=(He,Le)=>new Jn(function*Ae(){for(const ke of He)for(const Ge of ke[Le])yield Ge}),Qa=(He,Le)=>1===Le.length?Gs(He,Le):Vl(He,Le),Gs=(He,Le)=>{function ke(){return(ke=En(function*(){for(const Ge of He){const Qe=yield wt(Le(Ge));for(const it of Qe)yield it}})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Vl=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;for(const Qe of He){const it=yield wt(Le(Qe,Ge));for(const xt of it)yield xt;Ge++}})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Ma=(He,Le,Ae=At)=>{const ke=He[Symbol.iterator](),Ge=Le[Symbol.iterator]();let Qe=ke.next(),it=Ge.next();for(;!Qe.done&&!it.done;){if(!Ae(Qe.value,it.value))return!1;Qe=ke.next(),it=Ge.next()}return!0===Qe.done&&!0===it.done},Lo=function(){var He=(0,dt.A)(function*(Le,Ae,ke){const Ge=Le[Symbol.iterator](),Qe=Ae[Symbol.iterator]();let it=Ge.next(),xt=Qe.next();for(;!it.done&&!xt.done;){if(!1===(yield ke(it.value,xt.value)))return!1;it=Ge.next(),xt=Qe.next()}return!0===it.done&&!0===xt.done});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),Ms=(He,Le)=>Le?Fs(He,Le):cl(He),cl=He=>{let Le=!1,Ae=null;for(const ke of He){if(!0===Le)throw new qe(vt.MoreThanOneElement);Le=!0,Ae=ke}if(!1===Le)throw new qe(vt.NoElements);return Ae},Fs=(He,Le)=>{let Ae=!1,ke=null;for(const Ge of He)if(Le(Ge)){if(!0===Ae)throw new qe(vt.MoreThanOneMatchingElement);Ae=!0,ke=Ge}if(!1===Ae)throw new qe(vt.NoMatch);return ke},Hl=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=!1,Ge=null;for(const Qe of Le)if(yield Ae(Qe)){if(!0===ke)throw new qe(vt.MoreThanOneMatchingElement);ke=!0,Ge=Qe}if(!1===ke)throw new qe(vt.NoMatch);return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),Ld=(He,Le)=>Le?Cn(He,Le):nd(He),nd=He=>{let Le=!1,Ae=null;for(const ke of He){if(!0===Le)throw new qe(vt.MoreThanOneElement);Le=!0,Ae=ke}return Ae},Cn=(He,Le)=>{let Ae=!1,ke=null;for(const Ge of He)if(Le(Ge)){if(!0===Ae)throw new qe(vt.MoreThanOneMatchingElement);Ae=!0,ke=Ge}return ke},vn=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=!1,Ge=null;for(const Qe of Le)if(yield Ae(Qe)){if(!0===ke)throw new qe(vt.MoreThanOneElement);ke=!0,Ge=Qe}return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),Ht=(He,Le)=>new Jn(function*Ae(){let ke=0;for(const Ge of He)ke++>=Le&&(yield Ge)}),Kn=(He,Le)=>1===Le.length?yi(He,Le):Dr(He,Le),yi=(He,Le)=>new Jn(function*Ae(){let ke=!0;for(const Ge of He)!1===ke?yield Ge:!1===Le(Ge)&&(ke=!1,yield Ge)}),Dr=(He,Le)=>new Jn(function*Ae(){let ke=0,Ge=!0;for(const Qe of He)!1===Ge?yield Qe:!1===Le(Qe,ke)&&(Ge=!1,yield Qe),ke++}),us=(He,Le)=>1===Le.length?la(He,Le):ya(He,Le),la=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=!0;for(const Qe of He)!1===Ge?yield Qe:!1===(yield wt(Le(Qe)))&&(Ge=!1,yield Qe)})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},ya=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0,Qe=!0;for(const it of He)!1===Qe?yield it:!1===(yield wt(Le(it,Ge)))&&(Qe=!1,yield it),Ge++})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},Wa=(He,Le)=>Le?ht(He,Le):ft(He),ft=He=>{let Le=0;for(const Ae of He)Le+=Ae;return Le},ht=(He,Le)=>{let Ae=0;for(const ke of He)Ae+=Le(ke);return Ae},jt=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;for(const Ge of Le)ke+=(yield Ae(Ge));return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),yn=(He,Le)=>new Jn(function*Ae(){let ke=Le>0?Le:0;for(const Ge of He){if(0==ke--)break;yield Ge}}),Nn=(He,Le)=>1===Le.length?hi(He,Le):xi(He,Le),hi=(He,Le)=>new Jn(function*Ae(){for(const ke of He){if(!Le(ke))break;yield ke}}),xi=(He,Le)=>new Jn(function*Ae(){let ke=0;for(const Ge of He){if(!Le(Ge,ke++))break;yield Ge}}),to=(He,Le)=>1===Le.length?Yi(He,Le):uo(He,Le),Yi=(He,Le)=>{function ke(){return(ke=En(function*(){for(const Ge of He){if(!(yield wt(Le(Ge))))break;yield Ge}})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},uo=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;for(const Qe of He){if(!(yield wt(Le(Qe,Ge++))))break;yield Qe}})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},so=He=>[...He],To=(He,Le)=>{const Ae=new Map;for(const ke of He){const Ge=Le(ke),Qe=Ae.get(Ge);void 0===Qe?Ae.set(Ge,[ke]):Qe.push(ke)}return Ae},Ji=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;for(const Ge of Le){const Qe=yield Ae(Ge),it=ke.get(Qe);void 0===it?ke.set(Qe,[Ge]):it.push(Ge)}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Wo=(He,Le)=>{const Ae={};for(const ke of He)Ae[Le(ke)]=ke;return Ae},ln=function(){var He=(0,dt.A)(function*(Le,Ae){const ke={};for(const Ge of Le)ke[yield Ae(Ge)]=Ge;return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Bt=He=>new Set(He),kt=(He,Le,Ae)=>Ae?ti(He,Le,Ae):Rn(He,Le),Rn=(He,Le)=>new Jn(function*Ae(){const ke=new Set;for(const Ge of He)!1===ke.has(Ge)&&(yield Ge,ke.add(Ge));for(const Ge of Le)!1===ke.has(Ge)&&(yield Ge,ke.add(Ge))}),ti=(He,Le,Ae)=>new Jn(function*ke(){const Ge=[];for(const Qe of[He,Le])for(const it of Qe){let xt=!1;for(const Vt of Ge)if(!0===Ae(it,Vt)){xt=!0;break}!1===xt&&(yield it,Ge.push(it))}}),Ri=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=[];for(const it of[He,Le])for(const xt of it){let Vt=!1;for(const Qt of Qe)if(!0===(yield wt(Ae(xt,Qt)))){Vt=!0;break}!1===Vt&&(yield xt,Qe.push(xt))}})).apply(this,arguments)}return sn(function ke(){return Ge.apply(this,arguments)})},Oi=(He,Le)=>1===Le.length?eo(He,Le):So(He,Le),eo=(He,Le)=>new Jn(function*Ae(){for(const ke of He)!0===Le(ke)&&(yield ke)}),So=(He,Le)=>new Jn(function*Ae(){let ke=0;for(const Ge of He)!0===Le(Ge,ke++)&&(yield Ge)}),Oo=(He,Le)=>1===Le.length?Yo(He,Le):zo(He,Le),Yo=(He,Le)=>{function ke(){return(ke=En(function*(){for(const Ge of He)!0===(yield wt(Le(Ge)))&&(yield Ge)})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},zo=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;for(const Qe of He)!0===(yield wt(Le(Qe,Ge++)))&&(yield Qe)})).apply(this,arguments)}return sn(function Ae(){return ke.apply(this,arguments)})},jr=(He,Le,Ae)=>Ae?bs(He,Le,Ae):qr(He,Le),qr=(He,Le)=>new Jn(function*Ae(){const ke=He[Symbol.iterator](),Ge=Le[Symbol.iterator]();for(;;){const Qe=ke.next(),it=Ge.next();if(Qe.done||it.done)break;yield[Qe.value,it.value]}}),bs=(He,Le,Ae)=>new Jn(function*ke(){const Ge=He[Symbol.iterator](),Qe=Le[Symbol.iterator]();for(;;){const it=Ge.next(),xt=Qe.next();if(it.done||xt.done)break;yield Ae(it.value,xt.value)}}),Io=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=He[Symbol.iterator](),it=Le[Symbol.iterator]();for(;;){const xt=Qe.next(),Vt=it.next();if(xt.done||Vt.done)break;yield Ae(xt.value,Vt.value)}})).apply(this,arguments)}return sn(function ke(){return Ge.apply(this,arguments)})},Pt=He=>{const Le=He.prototype,Ae=(ke,Ge)=>{const Qe=function(...it){return ke(this,...it)};Object.defineProperty(Qe,"length",{value:ke.length-1}),Le[Ge]=Qe};Ae(gi,"aggregate"),Ae(cn,"all"),Ae(Et,"allAsync"),Ae(hn,"any"),Ae(Nt,"anyAsync"),Ae(It,"asAsync"),Ae(zt,"asParallel"),Ae(un,"average"),Ae(Pn,"averageAsync"),Ae(ci,"chunk"),Ae(Ei,"concatenate"),Ae(Hi,"contains"),Ae(mo,"containsAsync"),Ae(xo,"count"),Ae(en,"countAsync"),Ae(Zn,"defaultIfEmpty"),Ae(Di,"distinct"),Ae(po,"distinctAsync"),Ae(nr,"each"),Ae(Xo,"eachAsync"),Ae(Hn,"elementAt"),Ae(ui,"elementAtOrDefault"),Ae(bi,"except"),Ae(ao,"exceptAsync"),Ae(Wi,"first"),Ae(xr,"firstAsync"),Ae(hr,"firstOrDefault"),Ae(pi,"firstOrDefaultAsync"),Ae(Gr,"groupBy"),Ae(Yn,"groupByAsync"),Ae(co,"groupByWithSel"),Ae(ko,"groupJoin"),Ae(Jr,"groupJoinAsync"),Ae(Mr,"intersect"),Ae(dn,"intersectAsync"),Ae(an,"joinByKey"),Ae(_n,"last"),Ae(mi,"lastAsync"),Ae(Si,"lastOrDefault"),Ae(Sr,"lastOrDefaultAsync"),Ae(pr,"max"),Ae(bn,"maxAsync"),Ae(jn,"min"),Ae(Ki,"minAsync"),Ae(bt,"ofType"),Ae(Ca,"orderBy"),Ae(Ga,"orderByAsync"),Ae(Fi,"orderByDescending"),Ae(ct,"orderByDescendingAsync"),Ae(kn,"reverse"),Ae(si,"select"),Ae(Xi,"selectAsync"),Ae(Ts,"selectMany"),Ae(Qa,"selectManyAsync"),Ae(Ma,"sequenceEquals"),Ae(Lo,"sequenceEqualsAsync"),Ae(Ms,"single"),Ae(Hl,"singleAsync"),Ae(Ld,"singleOrDefault"),Ae(vn,"singleOrDefaultAsync"),Ae(Ht,"skip"),Ae(Kn,"skipWhile"),Ae(us,"skipWhileAsync"),Ae(Wa,"sum"),Ae(jt,"sumAsync"),Ae(yn,"take"),Ae(Nn,"takeWhile"),Ae(to,"takeWhileAsync"),Ae(so,"toArray"),Ae(To,"toMap"),Ae(Ji,"toMapAsync"),Ae(Wo,"toObject"),Ae(ln,"toObjectAsync"),Ae(Ut,"partition"),Ae(nn,"partitionAsync"),Ae(Bt,"toSet"),Ae(kt,"union"),Ae(Ri,"unionAsync"),Ae(Oi,"where"),Ae(Oo,"whereAsync"),Ae(jr,"zip"),Ae(Io,"zipAsync")},St=(He,Le,Ae,ke)=>{if(ke){if(!Ae)throw new ReferenceError("TAccumulate function is undefined");return ro(He,Le,Ae,ke)}return Ae?ai(He,Le,Ae):Dn(He,Le)},Dn=function(){var He=(0,dt.A)(function*(Le,Ae){let ke;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke=ke?Ae(ke,Qt):Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(void 0===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),ai=function(){var He=(0,dt.A)(function*(Le,Ae,ke){let Ge=Ae;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1)Ge=ke(Ge,Qt.value)}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return Ge});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),ro=function(){var He=(0,dt.A)(function*(Le,Ae,ke,Ge){let Qe=Ae;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Le);it=!(Xn=yield Qt.next()).done;it=!1)Qe=ke(Qe,Xn.value)}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield Qt.return())}finally{if(xt)throw Vt}}return Ge(Qe)});return function(Ae,ke,Ge,Qe){return He.apply(this,arguments)}}(),jo=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)if(!1===Ae(xt.value))return!1}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return!0});return function(Ae,ke){return He.apply(this,arguments)}}(),ia=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1){const Vt=xt.value;if(!1===(yield Ae(Vt)))return!1}}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return!0});return function(Ae,ke){return He.apply(this,arguments)}}(),Sh=(He,Le)=>Le?Ls(He,Le):ep(He),ep=function(){var He=(0,dt.A)(function*(Le){var Ge,Ae=!1,ke=!1;try{for(var Qe=Gt(Le);Ae=!(yield Qe.next()).done;Ae=!1)return!0}catch(xt){ke=!0,Ge=xt}finally{try{Ae&&null!=Qe.return&&(yield Qe.return())}finally{if(ke)throw Ge}}return!1});return function(Ae){return He.apply(this,arguments)}}(),Ls=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)if(!0===Ae(xt.value))return!0}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return!1});return function(Ae,ke){return He.apply(this,arguments)}}(),Mu=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1){const Vt=xt.value;if(!0===(yield Ae(Vt)))return!0}}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return!1});return function(Ae,ke){return He.apply(this,arguments)}}(),Mm=He=>Ot(0,function(){var Ae=(0,dt.A)(function*(){const ke=[];var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield xt.next()).done;Ge=!1)ke.push(Vt.value)}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(){return Ae.apply(this,arguments)}}()),Lc=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0,Ge=0;if(Ae){var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1)ke+=Ae(Qt.value),Ge+=1}catch(tr){it=!0,xt=tr}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}}else{var Ui,Xn=!1,Vi=!1;try{for(var Qo,Do=Gt(Le);Xn=!(Qo=yield Do.next()).done;Xn=!1)ke+=Qo.value,Ge+=1}catch(tr){Vi=!0,Ui=tr}finally{try{Xn&&null!=Do.return&&(yield Do.return())}finally{if(Vi)throw Ui}}}if(0===Ge)throw new qe(vt.NoElements);return ke/Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),tp=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0,Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;ke+=(yield Ae(Xn)),Ge+=1}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}if(0===Ge)throw new qe(vt.NoElements);return ke/Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),Rm=(He,Le)=>{if(Le<1)throw new tt("index");function ke(){return(ke=En(function*(){let Ge=[];var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1)Ge.push(Qt.value),Ge.length===Le&&(yield Ge,Ge=[])}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}Ge.length&&(yield Ge)})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},qd=(He,Le)=>{function ke(){return(ke=En(function*(){yield*gn(Gt(He)),yield*gn(Gt(Le))})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Ig=function(){var He=(0,dt.A)(function*(Le,Ae,ke=At){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)if(ke(Ae,Vt.value))return!0}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return!1});return function(Ae,ke){return He.apply(this,arguments)}}(),kp=function(){var He=(0,dt.A)(function*(Le,Ae,ke){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;if(yield ke(Ae,Qt))return!0}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return!1});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),yt=(He,Le)=>Le?Jt(He,Le):Un(He),Un=function(){var He=(0,dt.A)(function*(Le){let Ae=0;var Qe,ke=!1,Ge=!1;try{for(var it=Gt(Le);ke=!(yield it.next()).done;ke=!1)Ae++}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return Ae});return function(Ae){return He.apply(this,arguments)}}(),Jt=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)!0===Ae(Vt.value)&&ke++}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),An=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;!0===(yield Ae(Qt))&&ke++}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),ki=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=!1;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;Ge=!0,yield Xn}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}Ge||(yield Le)})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Ao=(He,Le=At)=>{function ke(){return(ke=En(function*(){const Ge=[];var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;Ge.find(Ui=>Le(Ui,Xn))||(Ge.push(Xn),yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},ar=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge=[];var xt,Qe=!1,it=!1;try{e:for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;for(const Vi of Ge)if(yield wt(Le(Vi,Xn)))continue e;Ge.push(Xn),yield Xn}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Nr=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;Le(Qt),yield Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Fa=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;yield wt(Le(Qt)),yield Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Vs=function(){var He=(0,dt.A)(function*(Le,Ae){if(Ae<0)throw new tt("index");let ke=0;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)if(Ae===ke++)return Vt.value}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}throw new tt("index")});return function(Ae,ke){return He.apply(this,arguments)}}(),Rs=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)if(Ae===ke++)return Vt.value}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return null});return function(Ae,ke){return He.apply(this,arguments)}}(),mr=(He,Le,Ae=At)=>{function Ge(){return(Ge=En(function*(){const Qe=[];var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Le);it=!(Xn=yield wt(Qt.next())).done;it=!1)Qe.push(Xn.value)}catch(Fr){xt=!0,Vt=Fr}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}var Do,Vi=!1,Ui=!1;try{for(var tr,Qo=Gt(He);Vi=!(tr=yield wt(Qo.next())).done;Vi=!1){const Fr=tr.value;{let cs=!1;for(let is=0;is<Qe.length;is++)if(!0===Ae(Fr,Qe[is])){cs=!0;break}!1===cs&&(yield Fr)}}}catch(Fr){Ui=!0,Do=Fr}finally{try{Vi&&null!=Qo.return&&(yield wt(Qo.return()))}finally{if(Ui)throw Do}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},Ja=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=[];var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Le);it=!(Xn=yield wt(Qt.next())).done;it=!1)Qe.push(Xn.value)}catch(Fr){xt=!0,Vt=Fr}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}var Do,Vi=!1,Ui=!1;try{for(var tr,Qo=Gt(He);Vi=!(tr=yield wt(Qo.next())).done;Vi=!1){const Fr=tr.value;{let cs=!1;for(let is=0;is<Qe.length;is++){const Ks=Qe[is];if(!0===(yield wt(Ae(Fr,Ks)))){cs=!0;break}}!1===cs&&(yield Fr)}}}catch(Fr){Ui=!0,Do=Fr}finally{try{Vi&&null!=Qo.return&&(yield wt(Qo.return()))}finally{if(Ui)throw Do}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},oa=(He,Le)=>Le?eu(He,Le):dl(He),dl=function(){var He=(0,dt.A)(function*(Le){const Ae=yield Le[Symbol.asyncIterator]().next();if(!0===Ae.done)throw new qe(vt.NoElements);return Ae.value});return function(Ae){return He.apply(this,arguments)}}(),eu=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1){const Vt=xt.value;if(!0===Ae(Vt))return Vt}}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),Bc=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1){const Vt=xt.value;if(!0===(yield Ae(Vt)))return Vt}}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),tu=(He,Le)=>Le?od(He,Le):id(He),id=function(){var He=(0,dt.A)(function*(Le){return(yield Le[Symbol.asyncIterator]().next()).value||null});return function(Ae){return He.apply(this,arguments)}}(),od=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1){const Vt=xt.value;if(!0===Ae(Vt))return Vt}}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return null});return function(Ae,ke){return He.apply(this,arguments)}}(),Sd=function(){var He=(0,dt.A)(function*(Le,Ae){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1){const Vt=xt.value;if(!0===(yield Ae(Vt)))return Vt}}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return null});return function(Ae,ke){return He.apply(this,arguments)}}(),Nc=(He,Le,Ae)=>Ae?np(He,Le,Ae):Eh(He,Le),np=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=new Array;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Vi=Xn.value;{const Ui=Le(Vi);let Do=!1;for(let Qo=0;Qo<Qe.length;Qo++){const tr=Qe[Qo];if(Ae(tr.key,Ui)){tr.push(Vi),Do=!0;break}}!1===Do&&Qe.push(new Ti(Ui,Vi))}}}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}for(const Vi of Qe)yield Vi})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},Eh=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge={};var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;{const Vi=Le(Xn),Ui=Ge[Vi];Ui?Ui.push(Xn):Ge[Vi]=new Ti(Vi,Xn)}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}for(const Xn in Ge)yield Ge[Xn]})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Kl=(He,Le,Ae)=>Ae?Lp(He,Le,Ae):rc(He,Le),rc=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge={};var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;{const Vi=yield wt(Le(Xn)),Ui=Ge[Vi];Ui?Ui.push(Xn):Ge[Vi]=new Ti(Vi,Xn)}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}for(const Xn in Ge)yield Ge[Xn]})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Lp=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=new Array;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Vi=Xn.value;{const Ui=yield wt(Le(Vi));let Do=!1;for(let Qo=0;Qo<Qe.length;Qo++){const tr=Qe[Qo];if(!0===(yield wt(Ae(tr.key,Ui)))){tr.push(Vi),Do=!0;break}}!1===Do&&Qe.push(new Ti(Ui,Vi))}}}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}for(const Vi of Qe)yield Vi})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},rd=(He,Le,Ae,ke)=>ke?Mg(He,Le,Ae,ke):Pg(He,Le,Ae),Pg=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe={};var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Vi=Xn.value;{const Ui=Le(Vi),Do=Qe[Ui],Qo=Ae(Vi);Do?Do.push(Qo):Qe[Ui]=new Ti(Ui,Qo)}}}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}for(const Vi in Qe)yield Qe[Vi]})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},Mg=(He,Le,Ae,ke)=>{function Qe(){return(Qe=En(function*(){const it=new Array;var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(He);xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const Ui=Vi.value;{const Do=Le(Ui);let Qo=!1;for(let tr=0;tr<it.length;tr++){const Fr=it[tr];if(ke(Fr.key,Do)){Fr.push(Ae(Ui)),Qo=!0;break}}if(!1===Qo){const tr=Ae(Ui);it.push(new Ti(Do,tr))}}}}catch(Ui){Vt=!0,Qt=Ui}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}for(const Ui of it)yield Ui})).apply(this,arguments)}return new Tt(function Ge(){return Qe.apply(this,arguments)})},Rg=(He,Le,Ae,ke,Ge,Qe)=>{const it=Qe?Z_(He,Le,Ae,ke,Ge,Qe):Bp(He,Le,Ae,ke,Ge);return new Tt(it)},Z_=(He,Le,Ae,ke,Ge,Qe)=>En(function*(){var it;const xt=[];var Xn,Vt=!1,Qt=!1;try{for(var Ui,Vi=Gt(Le);Vt=!(Ui=yield wt(Vi.next())).done;Vt=!1){const is=Ui.value;{const Ks=ke(is),dc=xt.find(pd=>Qe(pd.key,Ks));dc?dc.values.push(is):xt.push({key:Ks,values:[is]})}}}catch(is){Qt=!0,Xn=is}finally{try{Vt&&null!=Vi.return&&(yield wt(Vi.return()))}finally{if(Qt)throw Xn}}var tr,Do=!1,Qo=!1;try{for(var cs,Fr=Gt(He);Do=!(cs=yield wt(Fr.next())).done;Do=!1){const is=cs.value;{const Ks=Ae(is),dc=null!==(it=xt.find(pd=>Qe(pd.key,Ks)))&&void 0!==it?it:{key:Ks,values:[]};yield Ge(is,dc.values)}}}catch(is){Qo=!0,tr=is}finally{try{Do&&null!=Fr.return&&(yield wt(Fr.return()))}finally{if(Qo)throw tr}}}),Bp=(He,Le,Ae,ke,Ge)=>En(function*(){var Qe;const it=new Map;var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le);xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const cs=Vi.value;{const is=ke(cs),Ks=it.get(is);Ks?Ks.push(cs):it.set(is,[cs])}}}catch(cs){Vt=!0,Qt=cs}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}var Qo,Ui=!1,Do=!1;try{for(var Fr,tr=Gt(He);Ui=!(Fr=yield wt(tr.next())).done;Ui=!1){const cs=Fr.value;{const is=Ae(cs),Ks=null!==(Qe=it.get(is))&&void 0!==Qe?Qe:[];yield Ge(cs,Ks)}}}catch(cs){Do=!0,Qo=cs}finally{try{Ui&&null!=tr.return&&(yield wt(tr.return()))}finally{if(Do)throw Qo}}}),Nf=(He,Le,Ae,ke,Ge,Qe)=>{const it=Qe?pc(He,Le,Ae,ke,Ge,Qe):Np(He,Le,Ae,ke,Ge);return new Tt(it)},pc=(He,Le,Ae,ke,Ge,Qe)=>En(function*(){var it;const xt=[];var Xn,Vt=!1,Qt=!1;try{for(var Ui,Vi=Gt(Le);Vt=!(Ui=yield wt(Vi.next())).done;Vt=!1){const is=Ui.value;{const Ks=yield wt(ke(is)),dc=xt.find(pd=>Qe(pd.key,Ks));dc?dc.values.push(is):xt.push({key:Ks,values:[is]})}}}catch(is){Qt=!0,Xn=is}finally{try{Vt&&null!=Vi.return&&(yield wt(Vi.return()))}finally{if(Qt)throw Xn}}var tr,Do=!1,Qo=!1;try{for(var cs,Fr=Gt(He);Do=!(cs=yield wt(Fr.next())).done;Do=!1){const is=cs.value;{const Ks=yield wt(Ae(is)),dc=null!==(it=xt.find(pd=>Qe(pd.key,Ks)))&&void 0!==it?it:{key:Ks,values:[]};yield Ge(is,dc.values)}}}catch(is){Qo=!0,tr=is}finally{try{Do&&null!=Fr.return&&(yield wt(Fr.return()))}finally{if(Qo)throw tr}}}),Np=(He,Le,Ae,ke,Ge)=>En(function*(){var Qe;const it=new Map;var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le);xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const cs=Vi.value;{const is=yield wt(ke(cs)),Ks=it.get(is);Ks?Ks.push(cs):it.set(is,[cs])}}}catch(cs){Vt=!0,Qt=cs}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}var Qo,Ui=!1,Do=!1;try{for(var Fr,tr=Gt(He);Ui=!(Fr=yield wt(tr.next())).done;Ui=!1){const cs=Fr.value;{const is=yield wt(Ae(cs)),Ks=null!==(Qe=it.get(is))&&void 0!==Qe?Qe:[];yield Ge(cs,Ks)}}}catch(cs){Do=!0,Qo=cs}finally{try{Ui&&null!=tr.return&&(yield wt(tr.return()))}finally{if(Do)throw Qo}}}),ip=(He,Le,Ae=At)=>{function Ge(){return(Ge=En(function*(){const Qe=yield wt(He.distinct(Ae).toArray());if(0===Qe.length)return;const it=yield wt(Le.toArray());for(let xt=0;xt<Qe.length;xt++){const Vt=Qe[xt];for(let Qt=0;Qt<it.length;Qt++)if(!0===Ae(Vt,it[Qt])){yield Vt;break}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},sd=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=yield wt(He.distinctAsync(Ae).toArray());if(0===Qe.length)return;const it=yield wt(Le.toArray());for(let xt=0;xt<Qe.length;xt++){const Vt=Qe[xt];for(let Qt=0;Qt<it.length;Qt++){const Xn=it[Qt];if(!0===(yield wt(Ae(Vt,Xn)))){yield Vt;break}}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},nu=(He,Le,Ae,ke,Ge,Qe=At)=>{function xt(){return(xt=En(function*(){const Vt=[];var Vi,Qt=!1,Xn=!1;try{for(var Do,Ui=Gt(Le);Qt=!(Do=yield wt(Ui.next())).done;Qt=!1)Vt.push(Do.value)}catch(Ks){Xn=!0,Vi=Ks}finally{try{Qt&&null!=Ui.return&&(yield wt(Ui.return()))}finally{if(Xn)throw Vi}}var Fr,Qo=!1,tr=!1;try{for(var is,cs=Gt(He);Qo=!(is=yield wt(cs.next())).done;Qo=!1){const Ks=is.value;{const dc=Ae(Ks);for(const pd of Vt){const jy=ke(pd);!0===Qe(dc,jy)&&(yield Ge(Ks,pd))}}}}catch(Ks){tr=!0,Fr=Ks}finally{try{Qo&&null!=cs.return&&(yield wt(cs.return()))}finally{if(tr)throw Fr}}})).apply(this,arguments)}return new Tt(function it(){return xt.apply(this,arguments)})},gc=(He,Le)=>Le?ad(He,Le):Hs(He),Hs=function(){var He=(0,dt.A)(function*(Le){let Ae=null;var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae=xt.value}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}if(!Ae)throw new qe(vt.NoElements);return Ae});return function(Ae){return He.apply(this,arguments)}}(),ad=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;!0===Ae(Qt)&&(ke=Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(!ke)throw new qe(vt.NoMatch);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Fp=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;!0===(yield Ae(Qt))&&(ke=Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(!ke)throw new qe(vt.NoMatch);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Oh=(He,Le)=>Le?Hp(He,Le):Vp(He),Vp=function(){var He=(0,dt.A)(function*(Le){let Ae=null;var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae=xt.value}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return Ae});return function(Ae){return He.apply(this,arguments)}}(),Hp=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;!0===Ae(Qt)&&(ke=Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Ed=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;!0===(yield Ae(Qt))&&(ke=Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),ld=(He,Le)=>Le?kg(He,Le):qu(He),qu=function(){var He=(0,dt.A)(function*(Le){let Ae=null;var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae=Math.max(Ae||Number.NEGATIVE_INFINITY,xt.value)}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}if(null===Ae)throw new qe(vt.NoElements);return Ae});return function(Ae){return He.apply(this,arguments)}}(),kg=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)ke=Math.max(ke||Number.NEGATIVE_INFINITY,Ae(Vt.value))}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(null===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Up=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke=Math.max(ke||Number.NEGATIVE_INFINITY,yield Ae(Qt))}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(null===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Od=(He,Le)=>Le?cd(He,Le):Lg(He),Lg=function(){var He=(0,dt.A)(function*(Le){let Ae=null;var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae=Math.min(Ae||Number.POSITIVE_INFINITY,xt.value)}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}if(null===Ae)throw new qe(vt.NoElements);return Ae});return function(Ae){return He.apply(this,arguments)}}(),cd=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)ke=Math.min(ke||Number.POSITIVE_INFINITY,Ae(Vt.value))}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(null===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),_C=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke=Math.min(ke||Number.POSITIVE_INFINITY,yield Ae(Qt))}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(null===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Xl=(He,Le)=>{const Ae="string"==typeof Le?Qe=>typeof Qe===Le:Qe=>Qe instanceof Le;function Ge(){return(Ge=En(function*(){var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;Ae(Xn)&&(yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},bc=(He,Le,Ae)=>Fo.generate(He,Le,!0,Ae),Ff=(He,Le,Ae)=>Fo.generateAsync(He,Le,!0,Ae),Bg=(He,Le,Ae)=>Fo.generate(He,Le,!1,Ae),dd=(He,Le,Ae)=>Fo.generateAsync(He,Le,!1,Ae),Q_=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=[],Ge=[];var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;!0===Ae(Xn)?Ge.push(Xn):ke.push(Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return[Ge,ke]});return function(Ae,ke){return He.apply(this,arguments)}}(),km=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=[],Ge=[];var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;!0===(yield Ae(Xn))?Ge.push(Xn):ke.push(Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return[Ge,ke]});return function(Ae,ke){return He.apply(this,arguments)}}(),Lm=He=>{function Ae(){return(Ae=En(function*(){const ke=[];var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1)ke.push(Vt.value)}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}for(let Qt=ke.length-1;Qt>=0;Qt--)yield ke[Qt]})).apply(this,arguments)}return new Tt(function Le(){return Ae.apply(this,arguments)})},iu=(He,Le)=>"function"==typeof Le?1===Le.length?J_(He,Le):zp(He,Le):eh(He,Le),J_=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;yield Le(Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},zp=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;yield Le(Xn,Ge),Ge++}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},eh=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1)yield Vt.value[Le]}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Ng=(He,Le)=>"string"==typeof Le?th(He,Le):Fg(He,Le),Fg=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;yield Le(Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},th=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1)yield Vt.value[Le]}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Gp=(He,Le)=>"function"==typeof Le?1===Le.length?Yl(He,Le):Bm(He,Le):Vg(He,Le),Yl=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;for(const Xn of Le(Qt))yield Xn}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Bm=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;for(const Vi of Le(Xn,Ge))yield Vi;Ge++}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Vg=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;for(const Xn of Qt[Le])yield Xn}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Wp=(He,Le)=>new Tt(1===Le.length?function(){var ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;{const Xn=yield wt(Le(Qt));for(const Vi of Xn)yield Vi}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}});return function(){return ke.apply(this,arguments)}}():function(){var ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;{const Vi=yield wt(Le(Xn,Ge));for(const Ui of Vi)yield Ui;Ge++}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}});return function(){return ke.apply(this,arguments)}}()),nh=function(){var He=(0,dt.A)(function*(Le,Ae,ke=At){const Ge=Le[Symbol.asyncIterator](),Qe=Ae[Symbol.asyncIterator]();let it=yield Promise.all([Ge.next(),Qe.next()]),xt=it[0],Vt=it[1];for(;!xt.done&&!Vt.done;){if(!ke(xt.value,Vt.value))return!1;it=yield Promise.all([Ge.next(),Qe.next()]),xt=it[0],Vt=it[1]}return!0===xt.done&&!0===Vt.done});return function(Ae,ke){return He.apply(this,arguments)}}(),Bd=function(){var He=(0,dt.A)(function*(Le,Ae,ke){const Ge=Le[Symbol.asyncIterator](),Qe=Ae[Symbol.asyncIterator]();let it=yield Promise.all([Ge.next(),Qe.next()]),xt=it[0],Vt=it[1];for(;!xt.done&&!Vt.done;){if(!1===(yield ke(xt.value,Vt.value)))return!1;it=yield Promise.all([Ge.next(),Qe.next()]),xt=it[0],Vt=it[1]}return!0===xt.done&&!0===Vt.done});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),Qs=(He,Le)=>Le?nl(He,Le):_l(He),_l=function(){var He=(0,dt.A)(function*(Le){let Ae=!1,ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;if(!0===Ae)throw new qe(vt.MoreThanOneElement);Ae=!0,ke=Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(!1===Ae)throw new qe(vt.NoElements);return ke});return function(Ae){return He.apply(this,arguments)}}(),nl=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=!1,Ge=null;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;if(Ae(Xn)){if(!0===ke)throw new qe(vt.MoreThanOneMatchingElement);ke=!0,Ge=Xn}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}if(!1===ke)throw new qe(vt.NoMatch);return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),Nd=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=!1,Ge=null;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;if(yield Ae(Xn)){if(!0===ke)throw new qe(vt.MoreThanOneMatchingElement);ke=!0,Ge=Xn}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}if(!1===ke)throw new qe(vt.NoMatch);return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),sc=(He,Le)=>Le?Hg(He,Le):Vf(He),Vf=function(){var He=(0,dt.A)(function*(Le){let Ae=!1,ke=null;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;if(!0===Ae)throw new qe(vt.MoreThanOneElement);Ae=!0,ke=Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae){return He.apply(this,arguments)}}(),Hg=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=!1,Ge=null;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;if(Ae(Xn)){if(!0===ke)throw new qe(vt.MoreThanOneMatchingElement);ke=!0,Ge=Xn}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),$p=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=!1,Ge=null;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1){const Xn=Qt.value;if(yield Ae(Xn)){if(!0===ke)throw new qe(vt.MoreThanOneMatchingElement);ke=!0,Ge=Xn}}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),q_=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;Ge++>=Le&&(yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},lt=(He,Le)=>1===Le.length?mt(He,Le):ut(He,Le),mt=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=!0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;!1===Ge?yield Xn:!1===Le(Xn)&&(Ge=!1,yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},ut=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0,Qe=!0;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Vi=Xn.value;!1===Qe?yield Vi:!1===Le(Vi,Ge)&&(Qe=!1,yield Vi),Ge++}}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Mt=(He,Le)=>1===Le.length?fn(He,Le):ni(He,Le),fn=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=!0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;!1===Ge?yield Xn:!1===(yield wt(Le(Xn)))&&(Ge=!1,yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},ni=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0,Qe=!0;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Vi=Xn.value;!1===Qe?yield Vi:!1===(yield wt(Le(Vi,Ge)))&&(Qe=!1,yield Vi),Ge++}}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Pi=(He,Le)=>Le?vo(He,Le):Mo(He),Mo=function(){var He=(0,dt.A)(function*(Le){let Ae=0;var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae+=xt.value}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return Ae});return function(Ae){return He.apply(this,arguments)}}(),vo=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1)ke+=Ae(Vt.value)}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Ir=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke+=(yield Ae(Qt))}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Es=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=Le>0?Le:0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;if(0==Ge--)break;yield Xn}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Bs=(He,Le)=>1===Le.length?Va(He,Le):ac(He,Le),Va=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;if(!Le(Qt))break;yield Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},ac=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;if(!Le(Xn,Ge++))break;yield Xn}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},lc=(He,Le)=>1===Le.length?Fc(He,Le):wd(He,Le),Fc=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;if(!(yield wt(Le(Qt))))break;yield Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},wd=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;if(!(yield wt(Le(Xn,Ge++))))break;yield Xn}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},wh=function(){var He=(0,dt.A)(function*(Le){const Ae=[];var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae.push(xt.value)}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return Ae});return function(Ae){return He.apply(this,arguments)}}(),jp=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;{const Xn=Ae(Qt),Vi=ke.get(Xn);void 0===Vi?ke.set(Xn,[Qt]):Vi.push(Qt)}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),xc=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;{const Xn=yield Ae(Qt),Vi=ke.get(Xn);void 0===Vi?ke.set(Xn,[Qt]):Vi.push(Qt)}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Kp=function(){var He=(0,dt.A)(function*(Le,Ae){const ke={};var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke[Ae(Qt)]=Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),ev=function(){var He=(0,dt.A)(function*(Le,Ae){const ke={};var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke[yield Ae(Qt)]=Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),vC=function(){var He=(0,dt.A)(function*(Le){const Ae=new Set;var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(Le);ke=!(xt=yield it.next()).done;ke=!1)Ae.add(xt.value)}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield it.return())}finally{if(Ge)throw Qe}}return Ae});return function(Ae){return He.apply(this,arguments)}}(),Gy=(He,Le,Ae)=>Ae?Ug(He,Le,Ae):tv(He,Le),tv=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge=new Set;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const tr=Qt.value;!1===Ge.has(tr)&&(yield tr,Ge.add(tr))}}catch(tr){it=!0,xt=tr}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}var Ui,Xn=!1,Vi=!1;try{for(var Qo,Do=Gt(Le);Xn=!(Qo=yield wt(Do.next())).done;Xn=!1){const tr=Qo.value;!1===Ge.has(tr)&&(yield tr,Ge.add(tr))}}catch(tr){Vi=!0,Ui=tr}finally{try{Xn&&null!=Do.return&&(yield wt(Do.return()))}finally{if(Vi)throw Ui}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Ug=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=[];for(const Vi of[He,Le]){var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Vi);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Ui=Xn.value;{let Do=!1;for(const Qo of Qe)if(!0===Ae(Ui,Qo)){Do=!0;break}!1===Do&&(yield Ui,Qe.push(Ui))}}}catch(Ui){xt=!0,Vt=Ui}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},CC=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=[];for(const Vi of[He,Le]){var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Vi);it=!(Xn=yield wt(Qt.next())).done;it=!1){const Ui=Xn.value;{let Do=!1;for(const Qo of Qe)if(!0===(yield wt(Ae(Ui,Qo)))){Do=!0;break}!1===Do&&(yield Ui,Qe.push(Ui))}}}catch(Ui){xt=!0,Vt=Ui}finally{try{it&&null!=Qt.return&&(yield wt(Qt.return()))}finally{if(xt)throw Vt}}}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},nv=(He,Le)=>1===Le.length?yC(He,Le):zg(He,Le),yC=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;!0===Le(Qt)&&(yield Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},zg=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;!0===Le(Xn,Ge++)&&(yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},iv=(He,Le)=>1===Le.length?Hf(He,Le):Ru(He,Le),Hf=(He,Le)=>{function ke(){return(ke=En(function*(){var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(He);Ge=!(Vt=yield wt(xt.next())).done;Ge=!1){const Qt=Vt.value;!0===(yield wt(Le(Qt)))&&(yield Qt)}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield wt(xt.return()))}finally{if(Qe)throw it}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},Ru=(He,Le)=>{function ke(){return(ke=En(function*(){let Ge=0;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(He);Qe=!(Qt=yield wt(Vt.next())).done;Qe=!1){const Xn=Qt.value;!0===(yield wt(Le(Xn,Ge++)))&&(yield Xn)}}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield wt(Vt.return()))}finally{if(it)throw xt}}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},ih=(He,Le,Ae)=>Ae?bC(He,Le,Ae):op(He,Le),op=(He,Le)=>{function ke(){return(ke=En(function*(){const Ge=He[Symbol.asyncIterator](),Qe=Le[Symbol.asyncIterator]();for(;;){const[it,xt]=yield wt(Promise.all([Ge.next(),Qe.next()]));if(it.done||xt.done)break;yield[it.value,xt.value]}})).apply(this,arguments)}return new Tt(function Ae(){return ke.apply(this,arguments)})},bC=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=He[Symbol.asyncIterator](),it=Le[Symbol.asyncIterator]();for(;;){const[xt,Vt]=yield wt(Promise.all([Qe.next(),it.next()]));if(xt.done||Vt.done)break;yield Ae(xt.value,Vt.value)}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},Al=(He,Le,Ae)=>{function Ge(){return(Ge=En(function*(){const Qe=He[Symbol.asyncIterator](),it=Le[Symbol.asyncIterator]();for(;;){const xt=yield wt(Promise.all([Qe.next(),it.next()])),Vt=xt[0],Qt=xt[1];if(Vt.done||Qt.done)break;yield Ae(Vt.value,Qt.value)}})).apply(this,arguments)}return new Tt(function ke(){return Ge.apply(this,arguments)})},Fm=(He,Le,Ae,ke)=>{if(ke){if(!Ae)throw new ReferenceError("TAccumulate function is undefined");return Gg(He,Le,Ae,ke)}return Ae?xC(He,Le,Ae):Uf(He,Le)},Uf=function(){var He=(0,dt.A)(function*(Le,Ae){let ke;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;ke=ke?Ae(ke,Qt):Qt}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}if(void 0===ke)throw new qe(vt.NoElements);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),xC=function(){var He=(0,dt.A)(function*(Le,Ae,ke){let Ge=Ae;var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(Le);Qe=!(Qt=yield Vt.next()).done;Qe=!1)Ge=ke(Ge,Qt.value)}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return Ge});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),Gg=function(){var He=(0,dt.A)(function*(Le,Ae,ke,Ge){let Qe=Ae;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Le);it=!(Xn=yield Qt.next()).done;it=!1)Qe=ke(Qe,Xn.value)}catch(Vi){xt=!0,Vt=Vi}finally{try{it&&null!=Qt.return&&(yield Qt.return())}finally{if(xt)throw Vt}}return Ge(Qe)});return function(Ae,ke,Ge,Qe){return He.apply(this,arguments)}}(),Wc=(He,Le)=>{const Ae=He.dataFunc;switch(Ae.type){case 0:return{generator:()=>Ae.generator().then(Ge=>{const Qe=new Array(Ge.length);for(let it=0;it<Ge.length;it++)Qe[it]=Le(Ge[it]);return Qe}),type:0};case 1:return{generator:()=>{const Ge=Ae.generator(),Qe=new Array(Ge.length);for(let it=0;it<Ge.length;it++)Qe[it]=Ge[it].then(Le);return Qe},type:1};case 2:return{generator:function(){var Ge=(0,dt.A)(function*(){const Qe=yield Ae.generator(),it=new Array(Qe.length);for(let xt=0;xt<Qe.length;xt++)it[xt]=Qe[xt].then(Le);return it});return function(){return Ge.apply(this,arguments)}}(),type:2}}},Xp=(He,Le)=>{const Ae=Wc(He,ke=>{if(!Le(ke))throw new Error(String(!1));return!0});switch(Ae.type){case 0:return Ae.generator().then(()=>!0,()=>!1);case 1:return Promise.all(Ae.generator()).then(()=>!0,()=>!1);case 2:return Ae.generator().then(Promise.all.bind(Promise)).then(()=>!0,()=>!1)}},gr=(He,Le)=>{const Ae=He.dataFunc;switch(Ae.type){case 0:return{generator:function(){var Ge=(0,dt.A)(function*(){const Qe=yield Ae.generator(),it=new Array(Qe.length);for(let xt=0;xt<Qe.length;xt++)it[xt]=Le(Qe[xt]);return it});return function(){return Ge.apply(this,arguments)}}(),type:2};case 1:return{generator:()=>Ae.generator().map(function(){var Qe=(0,dt.A)(function*(it){const xt=yield it;return yield Le(xt)});return function(it){return Qe.apply(this,arguments)}}()),type:1};case 2:return{generator:function(){var Ge=(0,dt.A)(function*(){return(yield Ae.generator()).map(it=>it.then(Le))});return function(){return Ge.apply(this,arguments)}}(),type:2}}},ov=(He,Le)=>{const Ae=gr(He,function(){var ke=(0,dt.A)(function*(Ge){if(!1===(yield Le(Ge)))throw new Error(String(!1));return!0});return function(Ge){return ke.apply(this,arguments)}}());switch(Ae.type){case 1:return Promise.all(Ae.generator()).then(()=>!0,()=>!1);case 2:return Ae.generator().then(Promise.all.bind(Promise)).then(()=>!0,()=>!1)}},rv=(He,Le)=>Le?vl(He,Le):zf(He),zf=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;let ke;switch(Ae.type){case 1:return ke=Ae.generator(),0!==ke.length;case 0:case 2:return ke=yield Ae.generator(),0!==ke.length}});return function(Ae){return He.apply(this,arguments)}}(),vl=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Wc(Le,Ae);let Ge;switch(ke.type){case 0:return Ge=yield ke.generator(),Ge.includes(!0);case 1:return Ge=yield Promise.all(ke.generator()),Ge.includes(!0);case 2:return Ge=yield Promise.all(yield ke.generator()),Ge.includes(!0)}});return function(Ae,ke){return He.apply(this,arguments)}}(),Or=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,Ae);let Ge;switch(ke.type){case 1:return Ge=ke.generator(),0!==Ge.length&&new Promise((it,xt)=>{let Vt=0;for(const Qt of Ge)Qt.then(Xn=>{Vt++,Xn?it(!0):Vt===Ge.length&&it(!1)},xt)});case 2:return Ge=yield ke.generator(),0!==Promise.length&&(yield Promise.all(Ge)).includes(!0)}});return function(Ae,ke){return He.apply(this,arguments)}}(),ts=He=>{function Ae(){return(Ae=En(function*(){var Qe,ke=!1,Ge=!1;try{for(var xt,it=Gt(He);ke=!(xt=yield wt(it.next())).done;ke=!1)yield xt.value}catch(Vt){Ge=!0,Qe=Vt}finally{try{ke&&null!=it.return&&(yield wt(it.return()))}finally{if(Ge)throw Qe}}})).apply(this,arguments)}return sn(function Le(){return Ae.apply(this,arguments)})},ra=function(){var He=(0,dt.A)(function*(Le){switch(Le.type){case 0:return yield Le.generator();case 1:return yield Promise.all(Le.generator());case 2:const Ae=yield Le.generator();return yield Promise.all(Ae)}});return function(Ae){return He.apply(this,arguments)}}(),Td=function(){var He=(0,dt.A)(function*(Le,Ae){let ke;ke=Ae?Wc(Le,Ae):Le.dataFunc;const Ge=yield ra(ke);if(0===Ge.length)throw new qe(vt.NoElements);let Qe=0;for(const it of Ge)Qe+=it;return Qe/Ge.length});return function(Ae,ke){return He.apply(this,arguments)}}(),Zl=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,Ae),Ge=yield ra(ke);if(0===Ge.length)throw new qe(vt.NoElements);let Qe=0;for(const it of Ge)Qe+=it;return Qe/Ge.length});return function(Ae,ke){return He.apply(this,arguments)}}(),cc=(He,Le)=>{if(Le<1)throw new tt("index");let Ae;switch(He.dataFunc.type){case 1:const ke=He.dataFunc.generator;Ae={type:1,generator:()=>{const it=[];let xt=[];for(const Vt of ke())xt.push(Vt),xt.length===Le&&(it.push(Promise.all(xt)),xt=[]);return xt.length&&it.push(Promise.all(xt)),it}};break;case 2:const Ge=He.dataFunc.generator;Ae={type:2,generator:(it=(0,dt.A)(function*(){const xt=[];let Vt=[];for(const Qt of yield Ge())Vt.push(Qt),Vt.length===Le&&(xt.push(Promise.all(Vt)),Vt=[]);return Vt.length&&xt.push(Promise.all(Vt)),xt}),function(){return it.apply(this,arguments)})};break;case 0:const Qe=He.dataFunc.generator;Ae={type:0,generator:function(){var it=(0,dt.A)(function*(){const xt=[];let Vt=[];for(const Qt of yield Qe())Vt.push(Qt),Vt.length===Le&&(xt.push(Vt),Vt=[]);return Vt.length&&xt.push(Vt),xt});return function(){return it.apply(this,arguments)}}()}}var it;return new Tn(Ae)},Yp=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const[Ge,Qe]=yield Promise.all([He.toArray(),Le.toArray()]);return[...Ge,...Qe]});return function(){return ke.apply(this,arguments)}}(),type:0}),qa=function(){var He=(0,dt.A)(function*(Le,Ae,ke=At){let Ge;switch(Ge=Wc(Le,ke?Qe=>ke(Ae,Qe):Qe=>Qe===Ae),Ge.type){case 0:return(yield Ge.generator()).some(it=>it);case 1:return(yield Promise.all(Ge.generator())).some(it=>it);case 2:return(yield Promise.all(yield Ge.generator())).some(it=>it)}});return function(Ae,ke){return He.apply(this,arguments)}}(),Ql=function(){var He=(0,dt.A)(function*(Le,Ae,ke){const Ge=gr(Le,Qe=>ke(Ae,Qe));switch(Ge.type){case 1:return(yield Promise.all(Ge.generator())).some(it=>it);case 2:return(yield Promise.all(yield Ge.generator())).some(it=>it)}});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),oh=(He,Le)=>Le?rp(He,Le):Is(He),Is=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:case 2:return(yield Le.toArray()).length;case 1:return Ae.generator().length}});return function(Ae){return He.apply(this,arguments)}}(),rp=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Le.toArray();let Ge=0;for(let Qe=0;Qe<ke.length;Qe++)!0===Ae(ke[Qe])&&Ge++;return Ge});return function(Ae,ke){return He.apply(this,arguments)}}(),sv=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,Ae);let Ge;switch(ke.type){case 1:Ge=Promise.all(ke.generator());break;case 2:Ge=Promise.all(yield ke.generator())}let Qe=0;for(const it of yield Ge)it&&Qe++;return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),sp=(He,Le)=>{const Ae=He.dataFunc,ke=Le instanceof Promise;let Ge;switch(Ae.type){case 0:Ge={generator:()=>Ae.generator().then(it=>it.length?it:ke?Le.then(xt=>[xt]):[Le]),type:Ae.type};break;case 1:Ge={generator:()=>{const it=Ae.generator();return it.length?it:ke?[Le]:[Promise.resolve(Le)]},type:Ae.type};break;case 2:Ge={generator:function(){var it=(0,dt.A)(function*(){const xt=yield Ae.generator();return xt.length?xt:ke?[Le]:[Promise.resolve(Le)]});return function(){return it.apply(this,arguments)}}(),type:Ae.type}}return new Tn(Ge)},Ol=(He,Le=At)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=[];for(const Qe of yield He.toArray())Ge.find(xt=>Le(xt,Qe))||Ge.push(Qe);return Ge});return function(){return ke.apply(this,arguments)}}(),type:0}),ap=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=[];e:for(const Qe of yield He.toArray()){for(const it of Ge)if(yield Le(it,Qe))continue e;Ge.push(Qe)}return Ge});return function(){return ke.apply(this,arguments)}}(),type:0}),rh=(He,Le)=>new Tn(Wc(He,Ae=>(Le(Ae),Ae))),sh=(He,Le)=>{const Ae=gr(He,function(){var ke=(0,dt.A)(function*(Ge){return yield Le(Ge),Ge});return function(Ge){return ke.apply(this,arguments)}}());return new Tn(Ae)},lp=function(){var He=(0,dt.A)(function*(Le,Ae){if(Ae<0)throw new tt("index");const ke=Le.dataFunc;switch(ke.type){case 0:{const Ge=yield ke.generator();if(Ae>=Ge.length)throw new tt("index");return Ge[Ae]}case 1:{const Ge=ke.generator();if(Ae>=Ge.length)throw new tt("index");return yield Ge[Ae]}case 2:{const Ge=yield ke.generator();if(Ae>=Ge.length)throw new tt("index");return yield Ge[Ae]}}});return function(Ae,ke){return He.apply(this,arguments)}}(),Gf=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Le.dataFunc;switch(ke.type){case 0:{const Ge=yield ke.generator();return Ae>=Ge.length?null:Ge[Ae]}case 1:{const Ge=ke.generator();return Ae>=Ge.length?null:yield Ge[Ae]}case 2:{const Ge=yield ke.generator();return Ae>=Ge.length?null:yield Ge[Ae]}}});return function(Ae,ke){return He.apply(this,arguments)}}(),cp=(He,Le,Ae=At)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const[Qe,it]=yield Promise.all([He.toArray(),Le.toArray()]),xt=[];for(const Vt of Qe){let Qt=!1;for(let Xn=0;Xn<it.length;Xn++)if(!0===Ae(Vt,it[Xn])){Qt=!0;break}!1===Qt&&xt.push(Vt)}return xt});return function(){return Ge.apply(this,arguments)}}(),type:0}),ou=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const[Qe,it]=yield Promise.all([He.toArray(),Le.toArray()]),xt=[];for(const Vt of Qe){let Qt=!1;for(let Xn=0;Xn<it.length;Xn++){const Vi=it[Xn];if(!0===(yield Ae(Vt,Vi))){Qt=!0;break}}!1===Qt&&xt.push(Vt)}return xt});return function(){return Ge.apply(this,arguments)}}(),type:0}),Ha=He=>ra(He.dataFunc),ss=(He,Le)=>Le?Zp(He,Le):dp(He),dp=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:{const ke=yield Ae.generator();if(0===ke.length)throw new qe(vt.NoElements);return ke[0]}case 1:{const ke=Ae.generator();if(0===ke.length)throw new qe(vt.NoElements);return yield ke[0]}case 2:{const ke=yield Ae.generator();if(0===ke.length)throw new qe(vt.NoElements);return yield ke[0]}}});return function(Ae){return He.apply(this,arguments)}}(),Zp=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);for(const Ge of ke)if(!0===Ae(Ge))return Ge;throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),ku=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);for(const Ge of ke)if(!0===(yield Ae(Ge)))return Ge;throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),Wf=(He,Le)=>Le?il(He,Le):Lu(He),Lu=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:{const ke=yield Ae.generator();return 0===ke.length?null:ke[0]}case 1:{const ke=Ae.generator();return 0===ke.length?null:yield ke[0]}case 2:{const ke=yield Ae.generator();return 0===ke.length?null:yield ke[0]}}});return function(Ae){return He.apply(this,arguments)}}(),il=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);for(const Ge of ke)if(!0===Ae(Ge))return Ge;return null});return function(Ae,ke){return He.apply(this,arguments)}}(),Wg=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);for(const Ge of ke)if(!0===(yield Ae(Ge)))return Ge;return null});return function(Ae,ke){return He.apply(this,arguments)}}(),sl=(He,Le,Ae)=>Ae?Vm(He,Le,Ae):Ul(He,Le),Ul=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge={};for(const it of yield He.toArray()){const xt=Le(it),Vt=Ge[xt];Vt?Vt.push(it):Ge[xt]=new Ti(xt,it)}const Qe=new Array;for(const it in Ge)Qe.push(Ge[it]);return Qe});return function(){return ke.apply(this,arguments)}}(),type:0}),Vm=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=new Array;for(const xt of yield He.toArray()){const Vt=Le(xt);let Qt=!1;for(let Xn=0;Xn<Qe.length;Xn++){const Vi=Qe[Xn];if(Ae(Vi.key,Vt)){Vi.push(xt),Qt=!0;break}}!1===Qt&&Qe.push(new Ti(Vt,xt))}const it=new Array;for(const xt of Qe)it.push(xt);return it});return function(){return Ge.apply(this,arguments)}}(),type:0}),Dd=(He,Le,Ae)=>Ae?Hm(He,Le,Ae):Bu(He,Le),Hm=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=gr(He,function(){var Qt=(0,dt.A)(function*(Xn){return[yield Le(Xn),Xn]});return function(Xn){return Qt.apply(this,arguments)}}());let it;switch(Qe.type){case 1:it=yield Promise.all(Qe.generator());break;case 2:it=yield Promise.all(yield Qe.generator())}const xt=new Array;for(const[Qt,Xn]of it){let Vi=!1;for(let Ui=0;Ui<xt.length;Ui++){const Do=xt[Ui];if(!0===(yield Ae(Do.key,Qt))){Do.push(Xn),Vi=!0;break}}!1===Vi&&xt.push(new Ti(Qt,Xn))}const Vt=new Array;for(const Qt of xt)Vt.push(Qt);return Vt});return function(){return Ge.apply(this,arguments)}}(),type:0}),Bu=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=gr(He,function(){var Vt=(0,dt.A)(function*(Qt){return[yield Le(Qt),Qt]});return function(Qt){return Vt.apply(this,arguments)}}());let Qe;switch(Ge.type){case 1:Qe=yield Promise.all(Ge.generator());break;case 2:Qe=yield Promise.all(yield Ge.generator())}const it={};for(const[Vt,Qt]of Qe){const Xn=it[Vt];Xn?Xn.push(Qt):it[Vt]=new Ti(Vt,Qt)}const xt=new Array;for(const Vt in it)xt.push(it[Vt]);return xt});return function(){return ke.apply(this,arguments)}}(),type:0}),ah=(He,Le,Ae,ke)=>ke?av(He,Le,Ae,ke):Um(He,Le,Ae),av=(He,Le,Ae,ke)=>new Tn({generator:function(){var Qe=(0,dt.A)(function*(){const it=new Array;var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(He);xt=!(Vi=yield Xn.next()).done;xt=!1){const Do=Vi.value;{const Qo=Le(Do);let tr=!1;for(let Fr=0;Fr<it.length;Fr++){const cs=it[Fr];if(ke(cs.key,Qo)){cs.push(Ae(Do)),tr=!0;break}}if(!1===tr){const Fr=Ae(Do);it.push(new Ti(Qo,Fr))}}}}catch(Do){Vt=!0,Qt=Do}finally{try{xt&&null!=Xn.return&&(yield Xn.return())}finally{if(Vt)throw Qt}}const Ui=new Array;for(const Do of it)Ui.push(Do);return Ui});return function(){return Qe.apply(this,arguments)}}(),type:0}),Um=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe={};for(const xt of yield He.toArray()){const Vt=Le(xt),Qt=Qe[Vt],Xn=Ae(xt);Qt?Qt.push(Xn):Qe[Vt]=new Ti(Vt,Xn)}const it=new Array;for(const xt in Qe)it.push(Qe[xt]);return it});return function(){return Ge.apply(this,arguments)}}(),type:0}),Jl=(He,Le,Ae,ke,Ge,Qe)=>{const it=Qe?lv(He,Le,Ae,ke,Ge,Qe):cv(He,Le,Ae,ke,Ge);return new Tn({generator:it,type:0})},lv=(He,Le,Ae,ke,Ge,Qe)=>(0,dt.A)(function*(){const it=[];var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le);xt=!(Vi=yield Xn.next()).done;xt=!1){const Do=Vi.value;{const Qo=ke(Do),tr=it.find(Fr=>Qe(Fr.key,Qo));tr?tr.values.push(Do):it.push({key:Qo,values:[Do]})}}}catch(Do){Vt=!0,Qt=Do}finally{try{xt&&null!=Xn.return&&(yield Xn.return())}finally{if(Vt)throw Qt}}return(yield He.toArray()).map(Do=>{var Qo;const tr=Ae(Do),Fr=null!==(Qo=it.find(cs=>Qe(cs.key,tr)))&&void 0!==Qo?Qo:{key:tr,values:[]};return Ge(Do,Fr.values)})}),cv=(He,Le,Ae,ke,Ge)=>(0,dt.A)(function*(){const Qe=new Map;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Le);it=!(Xn=yield Qt.next()).done;it=!1){const Ui=Xn.value;{const Do=ke(Ui),Qo=Qe.get(Do);Qo?Qo.push(Ui):Qe.set(Do,[Ui])}}}catch(Ui){xt=!0,Vt=Ui}finally{try{it&&null!=Qt.return&&(yield Qt.return())}finally{if(xt)throw Vt}}return(yield He.toArray()).map(Ui=>{var Do;const Qo=Ae(Ui),tr=null!==(Do=Qe.get(Qo))&&void 0!==Do?Do:[];return Ge(Ui,tr)})}),Qp=(He,Le,Ae,ke,Ge,Qe)=>{const it=Qe?SC(He,Le,Ae,ke,Ge,Qe):up(He,Le,Ae,ke,Ge);return new Tn({generator:it,type:0})},SC=(He,Le,Ae,ke,Ge,Qe)=>(0,dt.A)(function*(){const it=[];var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le);xt=!(Vi=yield Xn.next()).done;xt=!1){const Qo=Vi.value;{const tr=yield ke(Qo),Fr=it.find(cs=>Qe(cs.key,tr));Fr?Fr.values.push(Qo):it.push({key:tr,values:[Qo]})}}}catch(Qo){Vt=!0,Qt=Qo}finally{try{xt&&null!=Xn.return&&(yield Xn.return())}finally{if(Vt)throw Qt}}const Do=(yield He.toArray()).map(function(){var Qo=(0,dt.A)(function*(tr){var Fr;const cs=yield Ae(tr),is=null!==(Fr=it.find(Ks=>Qe(Ks.key,cs)))&&void 0!==Fr?Fr:{key:cs,values:[]};return Ge(tr,is.values)});return function(tr){return Qo.apply(this,arguments)}}());return yield Promise.all(Do)}),up=(He,Le,Ae,ke,Ge)=>(0,dt.A)(function*(){const Qe=new Map;var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(Le);it=!(Xn=yield Qt.next()).done;it=!1){const Do=Xn.value;{const Qo=yield ke(Do),tr=Qe.get(Qo);tr?tr.push(Do):Qe.set(Qo,[Do])}}}catch(Do){xt=!0,Vt=Do}finally{try{it&&null!=Qt.return&&(yield Qt.return())}finally{if(xt)throw Vt}}const Ui=(yield He.toArray()).map(function(){var Do=(0,dt.A)(function*(Qo){var tr;const Fr=yield Ae(Qo),cs=null!==(tr=Qe.get(Fr))&&void 0!==tr?tr:[];return Ge(Qo,cs)});return function(Qo){return Do.apply(this,arguments)}}());return yield Promise.all(Ui)}),EC=(He,Le,Ae=At)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=yield He.distinct(Ae).toArray();if(0===Qe.length)return[];const it=yield Le.toArray(),xt=new Array;for(let Vt=0;Vt<Qe.length;Vt++){const Qt=Qe[Vt];for(let Xn=0;Xn<it.length;Xn++)if(!0===Ae(Qt,it[Xn])){xt.push(Qt);break}}return xt});return function(){return Ge.apply(this,arguments)}}(),type:0}),zm=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=yield He.distinctAsync(Ae).toArray();if(0===Qe.length)return[];const it=yield Le.toArray(),xt=new Array;for(let Vt=0;Vt<Qe.length;Vt++){const Qt=Qe[Vt];for(let Xn=0;Xn<it.length;Xn++){const Vi=it[Xn];if(!0===(yield Ae(Qt,Vi))){xt.push(Qt);break}}}return xt});return function(){return Ge.apply(this,arguments)}}(),type:0}),dv=(He,Le,Ae,ke,Ge,Qe=At)=>new Tn({generator:function(){var xt=(0,dt.A)(function*(){const[Vt,Qt]=yield Promise.all([Le.toArray(),He.toArray()]),Xn=new Array;for(const Vi of Qt){const Ui=Ae(Vi);for(const Do of Vt){const Qo=ke(Do);!0===Qe(Ui,Qo)&&Xn.push(Ge(Vi,Do))}}return Xn});return function(){return xt.apply(this,arguments)}}(),type:0}),OC=(He,Le)=>Le?Gm(He,Le):Hx(He),Hx=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:{const ke=yield Ae.generator();if(0===ke.length)throw new qe(vt.NoElements);return ke[ke.length-1]}case 1:{const ke=Ae.generator();if(0===ke.length)throw new qe(vt.NoElements);return yield ke[ke.length-1]}case 2:{const ke=yield Ae.generator();if(0===ke.length)throw new qe(vt.NoElements);return yield ke[ke.length-1]}}});return function(Ae){return He.apply(this,arguments)}}(),Gm=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Le.dataFunc;switch(ke.type){case 0:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=Ge[Qe];if(Ae(it))return it}break}case 1:{const Ge=ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(Ae(it))return it}break}case 2:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(Ae(it))return it}break}}throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),Wm=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Le.dataFunc;switch(ke.type){case 0:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=Ge[Qe];if(!0===(yield Ae(it)))return it}break}case 1:{const Ge=ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(!0===(yield Ae(it)))return it}break}case 2:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(!0===(yield Ae(it)))return it}break}}throw new qe(vt.NoMatch)});return function(Ae,ke){return He.apply(this,arguments)}}(),Wy=(He,Le)=>Le?$m(He,Le):Ux(He),Ux=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:{const ke=yield Ae.generator();return 0===ke.length?null:ke[ke.length-1]}case 1:{const ke=Ae.generator();return 0===ke.length?null:yield ke[ke.length-1]}case 2:{const ke=yield Ae.generator();return 0===ke.length?null:yield ke[ke.length-1]}}});return function(Ae){return He.apply(this,arguments)}}(),$m=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Le.dataFunc;switch(ke.type){case 0:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=Ge[Qe];if(Ae(it))return it}break}case 1:{const Ge=ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(Ae(it))return it}break}case 2:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(Ae(it))return it}break}}return null});return function(Ae,ke){return He.apply(this,arguments)}}(),$g=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Le.dataFunc;switch(ke.type){case 0:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=Ge[Qe];if(!0===(yield Ae(it)))return it}break}case 1:{const Ge=ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(!0===(yield Ae(it)))return it}break}case 2:{const Ge=yield ke.generator();for(let Qe=Ge.length-1;Qe>=0;Qe--){const it=yield Ge[Qe];if(!0===(yield Ae(it)))return it}break}}return null});return function(Ae,ke){return He.apply(this,arguments)}}(),Th=function(){var He=(0,dt.A)(function*(Le,Ae){let ke;ke=Ae?Wc(Le,Ae):Le.dataFunc;const Ge=yield ra(ke);if(0===Ge.length)throw new qe(vt.NoElements);return Math.max.apply(null,Ge)});return function(Ae,ke){return He.apply(this,arguments)}}(),jg=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,Ae),Ge=yield ra(ke);if(0===Ge.length)throw new qe(vt.NoElements);return Math.max.apply(null,Ge)});return function(Ae,ke){return He.apply(this,arguments)}}(),zx=function(){var He=(0,dt.A)(function*(Le,Ae){let ke;ke=Ae?Wc(Le,Ae):Le.dataFunc;const Ge=yield ra(ke);if(0===Ge.length)throw new qe(vt.NoElements);return Math.min.apply(null,Ge)});return function(Ae,ke){return He.apply(this,arguments)}}(),Gx=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,Ae),Ge=yield ra(ke);if(0===Ge.length)throw new qe(vt.NoElements);return Math.min.apply(null,Ge)});return function(Ae,ke){return He.apply(this,arguments)}}(),Kg=(He,Le)=>{const Ae="string"==typeof Le?Ge=>[typeof Ge===Le,Ge]:Ge=>[Ge instanceof Le,Ge];return new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=Wc(He,Ae),it=yield ra(Qe),xt=[];for(const[Vt,Qt]of it)Vt&&xt.push(Qt);return xt});return function(){return Ge.apply(this,arguments)}}(),type:0})},uv=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;{const Xn=yield Ae(Qt),Vi=ke.get(Xn);Vi?Vi.push(Qt):ke.set(Xn,[Qt])}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function Xg(){return(Xg=En(function*(He,Le,Ae,ke){const Ge=yield wt(uv(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}const wC=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;for(const Ge of Le){const Qe=yield Ae(Ge),it=ke.get(Qe);it?it.push(Ge):ke.set(Qe,[Ge])}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function hv(He,Le,Ae,ke){return Km.apply(this,arguments)}function Km(){return(Km=En(function*(He,Le,Ae,ke){const Ge=yield wt(wC(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}const Xm=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map;var it,Ge=!1,Qe=!1;try{for(var Vt,xt=Gt(Le);Ge=!(Vt=yield xt.next()).done;Ge=!1){const Qt=Vt.value;{const Xn=Ae(Qt),Vi=ke.get(Xn);Vi?Vi.push(Qt):ke.set(Xn,[Qt])}}}catch(Qt){Qe=!0,it=Qt}finally{try{Ge&&null!=xt.return&&(yield xt.return())}finally{if(Qe)throw it}}return ke});return function(Ae,ke){return He.apply(this,arguments)}}();function pv(){return(pv=En(function*(He,Le,Ae,ke){const Ge=yield wt(Xm(He,Le)),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}const Yg=(He,Le)=>{const Ae=new Map;for(const ke of He){const Ge=Le(ke),Qe=Ae.get(Ge);Qe?Qe.push(ke):Ae.set(Ge,[ke])}return Ae};function jf(He,Le,Ae,ke){return $c.apply(this,arguments)}function $c(){return($c=En(function*(He,Le,Ae,ke){const Ge=Yg(He,Le),Qe=[...Ge.keys()].sort(ke||void 0);if(Ae)for(let it=0;it<Qe.length;it++)yield Ge.get(Qe[it]);else for(let it=Qe.length-1;it>=0;it--)yield Ge.get(Qe[it])})).apply(this,arguments)}class ud extends Tn{constructor(Le){var Ae;super({generator:(Ae=(0,dt.A)(function*(){const ke=Le(),Ge=[];var xt,Qe=!1,it=!1;try{for(var Qt,Vt=Gt(ke);Qe=!(Qt=yield Vt.next()).done;Qe=!1)Ge.push(...Qt.value)}catch(Xn){it=!0,xt=Xn}finally{try{Qe&&null!=Vt.return&&(yield Vt.return())}finally{if(it)throw xt}}return Ge}),function(){return Ae.apply(this,arguments)}),type:0}),this.orderedPairs=Le}static generateAsync(Le,Ae,ke,Ge){let Qe;return Qe=Le instanceof ud?function(){var it=En(function*(){var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le.orderedPairs());xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const Ui=Vi.value;yield*gn(Gt(hv(Ui,Ae,ke,Ge)))}}catch(Ui){Vt=!0,Qt=Ui}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}});return function(){return it.apply(this,arguments)}}():()=>function jm(He,Le,Ae,ke){return Xg.apply(this,arguments)}(Le,Ae,ke,Ge),new ud(Qe)}static generate(Le,Ae,ke,Ge){let Qe;return Qe=Le instanceof ud?function(){var it=En(function*(){var Qt,xt=!1,Vt=!1;try{for(var Vi,Xn=Gt(Le.orderedPairs());xt=!(Vi=yield wt(Xn.next())).done;xt=!1){const Ui=Vi.value;yield*gn(Gt(jf(Ui,Ae,ke,Ge)))}}catch(Ui){Vt=!0,Qt=Ui}finally{try{xt&&null!=Xn.return&&(yield wt(Xn.return()))}finally{if(Vt)throw Qt}}});return function(){return it.apply(this,arguments)}}():()=>function $f(He,Le,Ae,ke){return pv.apply(this,arguments)}(Le,Ae,ke,Ge),new ud(Qe)}thenBy(Le,Ae){return ud.generate(this,Le,!0,Ae)}thenByAsync(Le,Ae){return ud.generateAsync(this,Le,!0,Ae)}thenByDescending(Le,Ae){return ud.generate(this,Le,!1,Ae)}thenByDescendingAsync(Le,Ae){return ud.generateAsync(this,Le,!1,Ae)}}const gv=(He,Le,Ae)=>ud.generate(He,Le,!0,Ae),ha=(He,Le,Ae)=>ud.generateAsync(He,Le,!0,Ae),fv=(He,Le,Ae)=>ud.generate(He,Le,!1,Ae),Sn=(He,Le,Ae)=>ud.generateAsync(He,Le,!1,Ae),nt=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Wc(Le,xt=>[Ae(xt),xt]),Ge=yield ra(ke),Qe=[],it=[];for(const[xt,Vt]of Ge)xt?it.push(Vt):Qe.push(Vt);return[it,Qe]});return function(Ae,ke){return He.apply(this,arguments)}}(),Zt=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,function(){var xt=(0,dt.A)(function*(Vt){return[yield Ae(Vt),Vt]});return function(Vt){return xt.apply(this,arguments)}}()),Ge=yield ra(ke),Qe=[],it=[];for(const[xt,Vt]of Ge)xt?it.push(Vt):Qe.push(Vt);return[it,Qe]});return function(Ae,ke){return He.apply(this,arguments)}}(),li=He=>{const Le=He.dataFunc;switch(Le.type){case 1:return new Tn({generator:()=>Le.generator().reverse(),type:Le.type});case 2:return new Tn({generator:function(){var ke=(0,dt.A)(function*(){return(yield Le.generator()).reverse()});return function(){return ke.apply(this,arguments)}}(),type:Le.type});case 0:return new Tn({generator:function(){var ke=(0,dt.A)(function*(){return(yield Le.generator()).reverse()});return function(){return ke.apply(this,arguments)}}(),type:Le.type})}},Gi=(He,Le)=>{const Ae=He.dataFunc;switch(Ae.type){case 0:return{generator:()=>Ae.generator().then(Ge=>{const Qe=new Array(Ge.length);for(let it=0;it<Ge.length;it++)Qe[it]=Le(Ge[it],it);return Qe}),type:0};case 1:return{generator:()=>{const Ge=Ae.generator(),Qe=new Array(Ge.length);for(let it=0;it<Ge.length;it++)Qe[it]=Ge[it].then(xt=>Le(xt,it));return Qe},type:1};case 2:return{generator:function(){var Ge=(0,dt.A)(function*(){const Qe=yield Ae.generator(),it=new Array(Qe.length);for(let xt=0;xt<Qe.length;xt++)it[xt]=Qe[xt].then(Vt=>Le(Vt,xt));return it});return function(){return Ge.apply(this,arguments)}}(),type:2}}},bo=(He,Le)=>new Tn("function"==typeof Le?1===Le.length?Wc(He,Le):Gi(He,Le):Wc(He,Ae=>Ae[Le])),Bo=(He,Le)=>{const Ae=He.dataFunc;switch(Ae.type){case 0:return{generator:function(){var Ge=(0,dt.A)(function*(){const Qe=yield Ae.generator(),it=new Array(Qe.length);for(let xt=0;xt<Qe.length;xt++)it[xt]=Le(Qe[xt],xt);return it});return function(){return Ge.apply(this,arguments)}}(),type:2};case 1:return{generator:()=>Ae.generator().map((Ge,Qe)=>Ge.then(it=>Le(it,Qe))),type:1};case 2:return{generator:function(){var Ge=(0,dt.A)(function*(){return(yield Ae.generator()).map((it,xt)=>it.then(Vt=>Le(Vt,xt)))});return function(){return Ge.apply(this,arguments)}}(),type:2}}},ir=(He,Le)=>{let Ae;return Ae="function"==typeof Le?1===Le.length?gr(He,Le):Bo(He,Le):gr(He,ke=>ke[Le]),new Tn(Ae)},yr=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){let Ge;Ge="function"==typeof Le?1===Le.length?Wc(He,Le):Gi(He,Le):Wc(He,it=>it[Le]);const Qe=[];switch(Ge.type){case 0:for(const it of yield Ge.generator())for(const xt of it)Qe.push(xt);break;case 1:for(const it of Ge.generator())for(const xt of yield it)Qe.push(xt);break;case 2:for(const it of yield Ge.generator())for(const xt of yield it)Qe.push(xt)}return Qe});return function(){return ke.apply(this,arguments)}}(),type:0}),Ur=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){let Ge;Ge=1===Le.length?gr(He,Le):Bo(He,Le);const Qe=[];switch(Ge.type){case 1:for(const it of Ge.generator())for(const xt of yield it)Qe.push(xt);break;case 2:for(const it of yield Ge.generator())for(const xt of yield it)Qe.push(xt)}return Qe});return function(){return ke.apply(this,arguments)}}(),type:0}),Ar=function(){var He=(0,dt.A)(function*(Le,Ae,ke=At){const Ge=yield Le.toArray(),Qe=yield Ae.toArray();if(Ge.length!==Qe.length)return!1;for(let it=0;it<Ge.length;it++)if(!1===ke(Ge[it],Qe[it]))return!1;return!0});return function(Ae,ke){return He.apply(this,arguments)}}(),Us=function(){var He=(0,dt.A)(function*(Le,Ae,ke){const Ge=yield Le.toArray(),Qe=yield Ae.toArray();if(Ge.length!==Qe.length)return!1;for(let it=0;it<Ge.length;it++){const xt=Ge[it],Vt=Qe[it];if(!1===(yield ke(xt,Vt)))return!1}return!0});return function(Ae,ke,Ge){return He.apply(this,arguments)}}(),ca=(He,Le)=>Le?al(He,Le):Ds(He),Ds=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:{const ke=yield Ae.generator();if(ke.length>1)throw new qe(vt.MoreThanOneElement);if(0===ke.length)throw new qe(vt.NoElements);return ke[0]}case 1:{const ke=Ae.generator();if(ke.length>1)throw new qe(vt.MoreThanOneElement);if(0===ke.length)throw new qe(vt.NoElements);return ke[0]}case 2:{const ke=yield Ae.generator();if(ke.length>1)throw new qe(vt.MoreThanOneElement);if(0===ke.length)throw new qe(vt.NoElements);return yield ke[0]}}});return function(Ae){return He.apply(this,arguments)}}(),al=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);let Ge=!1,Qe=null;for(const it of ke)if(Ae(it)){if(!0===Ge)throw new qe(vt.MoreThanOneMatchingElement);Ge=!0,Qe=it}if(!1===Ge)throw new qe(vt.NoMatch);return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),Js=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);let Ge=!1,Qe=null;for(const it of ke)if(!0===(yield Ae(it))){if(!0===Ge)throw new qe(vt.MoreThanOneMatchingElement);Ge=!0,Qe=it}if(!1===Ge)throw new qe(vt.NoMatch);return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),Ra=(He,Le)=>Le?ol(He,Le):el(He),el=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc;switch(Ae.type){case 0:{const ke=yield Ae.generator();if(ke.length>1)throw new qe(vt.MoreThanOneElement);return 0===ke.length?null:ke[0]}case 1:{const ke=Ae.generator();if(ke.length>1)throw new qe(vt.MoreThanOneElement);return 0===ke.length?null:ke[0]}case 2:{const ke=yield Ae.generator();if(ke.length>1)throw new qe(vt.MoreThanOneElement);return 0===ke.length?null:yield ke[0]}}});return function(Ae){return He.apply(this,arguments)}}(),ol=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);let Ge=!1,Qe=null;for(const it of ke)if(Ae(it)){if(!0===Ge)throw new qe(vt.MoreThanOneElement);Ge=!0,Qe=it}return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),ns=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=yield Ha(Le);let Ge=!1,Qe=null;for(const it of ke)if(!0===(yield Ae(it))){if(!0===Ge)throw new qe(vt.MoreThanOneElement);Ge=!0,Qe=it}return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),pa=(He,Le)=>{const Ae=He.dataFunc;switch(Ae.type){case 0:return new Tn({generator:function(){var Ge=(0,dt.A)(function*(){return(yield Ae.generator()).slice(Le)});return function(){return Ge.apply(this,arguments)}}(),type:0});case 1:return new Tn({generator:()=>Ae.generator().slice(Le),type:1});case 2:return new Tn({generator:function(){var Qe=(0,dt.A)(function*(){return(yield Ae.generator()).slice(Le)});return function(){return Qe.apply(this,arguments)}}(),type:2})}},ga=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=yield He.toArray();let Qe=0;for(;Qe<Ge.length&&!1!==Le(Ge[Qe],Qe);Qe++);const it=[];for(;Qe<Ge.length;Qe++)it.push(Ge[Qe]);return it});return function(){return ke.apply(this,arguments)}}(),type:0}),Ya=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=yield He.toArray();let Qe=0;for(;Qe<Ge.length;Qe++){const xt=Ge[Qe];if(!1===(yield Le(xt,Qe)))break}const it=[];for(;Qe<Ge.length;Qe++)it.push(Ge[Qe]);return it});return function(){return ke.apply(this,arguments)}}(),type:0}),Cl=(He,Le)=>Le?zl(He,Le):ql(He),ql=function(){var He=(0,dt.A)(function*(Le){let Ae=0;for(const ke of yield Le.toArray())Ae+=ke;return Ae});return function(Ae){return He.apply(this,arguments)}}(),zl=function(){var He=(0,dt.A)(function*(Le,Ae){let ke=0;for(const Ge of yield Le.toArray())ke+=Ae(Ge);return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Il=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,Ae),Ge=yield ra(ke);let Qe=0;for(const it of Ge)Qe+=it;return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),Sc=(He,Le)=>{const Ae=Le>0?Le:0,ke=He.dataFunc;switch(ke.type){case 1:return new Tn({generator:()=>ke.generator().splice(0,Ae),type:1});case 2:return new Tn({generator:()=>ke.generator().then(xt=>xt.splice(0,Ae)),type:2});default:return new Tn({generator:()=>ke.generator().then(xt=>xt.splice(0,Ae)),type:0})}},fc=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=yield He.toArray(),Qe=new Array;if(1===Le.length)for(const it of Ge){if(!0!==Le(it))break;Qe.push(it)}else for(let it=0;it<Ge.length;it++){const xt=Ge[it];if(!0!==Le(xt,it))break;Qe.push(xt)}return Qe});return function(){return ke.apply(this,arguments)}}(),type:0}),hd=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=yield He.toArray(),Qe=new Array;if(1===Le.length){const it=Le;for(const xt of Ge){if(!0!==(yield it(xt)))break;Qe.push(xt)}}else for(let it=0;it<Ge.length;it++){const xt=Ge[it];if(!0!==(yield Le(xt,it)))break;Qe.push(xt)}return Qe});return function(){return ke.apply(this,arguments)}}(),type:0}),Nu=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map,Ge=Wc(Le,it=>[Ae(it),it]),Qe=yield ra(Ge);for(const[it,xt]of Qe){const Vt=ke.get(it);void 0===Vt?ke.set(it,[xt]):Vt.push(xt)}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Jp=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=new Map,Ge=gr(Le,function(){var it=(0,dt.A)(function*(xt){return[yield Ae(xt),xt]});return function(xt){return it.apply(this,arguments)}}()),Qe=yield ra(Ge);for(const[it,xt]of Qe){const Vt=ke.get(it);void 0===Vt?ke.set(it,[xt]):Vt.push(xt)}return ke});return function(Ae,ke){return He.apply(this,arguments)}}(),Vc=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=Le.dataFunc,Ge=yield ra(ke),Qe={};for(const it of Ge)Qe[Ae(it)]=it;return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),lh=function(){var He=(0,dt.A)(function*(Le,Ae){const ke=gr(Le,function(){var it=(0,dt.A)(function*(xt){return[yield Ae(xt),xt]});return function(xt){return it.apply(this,arguments)}}()),Ge=yield ra(ke),Qe={};for(const[it,xt]of Ge)Qe[it]=xt;return Qe});return function(Ae,ke){return He.apply(this,arguments)}}(),Ho=function(){var He=(0,dt.A)(function*(Le){const Ae=Le.dataFunc,ke=yield ra(Ae);return new Set(ke)});return function(Ae){return He.apply(this,arguments)}}(),ks=(He,Le,Ae)=>Ae?ru(He,Le,Ae):Dh(He,Le),Dh=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=new Set,Qe=Le.toArray();var Vt,it=!1,xt=!1;try{for(var Xn,Qt=Gt(He);it=!(Xn=yield Qt.next()).done;it=!1){const Ui=Xn.value;!1===Ge.has(Ui)&&Ge.add(Ui)}}catch(Ui){xt=!0,Vt=Ui}finally{try{it&&null!=Qt.return&&(yield Qt.return())}finally{if(xt)throw Vt}}const Vi=yield Qe;for(const Ui of Vi)!1===Ge.has(Ui)&&Ge.add(Ui);return[...Ge.keys()]});return function(){return ke.apply(this,arguments)}}(),type:0}),ru=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=[],it=yield Promise.all([He.toArray(),Le.toArray()]);for(const xt of it)for(const Vt of xt){let Qt=!1;for(const Xn of Qe)if(!0===Ae(Vt,Xn)){Qt=!0;break}!1===Qt&&Qe.push(Vt)}return Qe});return function(){return Ge.apply(this,arguments)}}(),type:0}),ba=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const Qe=[],it=yield Promise.all([He.toArray(),Le.toArray()]);for(const xt of it)for(const Vt of xt){let Qt=!1;for(const Xn of Qe)if(!0===(yield Ae(Vt,Xn))){Qt=!0;break}!1===Qt&&Qe.push(Vt)}return Qe});return function(){return Ge.apply(this,arguments)}}(),type:0}),qp=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){return(yield He.toArray()).filter(Le)});return function(){return ke.apply(this,arguments)}}(),type:0}),su=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const Ge=Bo(He,function(){var xt=(0,dt.A)(function*(Vt,Qt){return[yield Le(Vt,Qt),Vt]});return function(Vt,Qt){return xt.apply(this,arguments)}}()),Qe=yield ra(Ge),it=[];for(const[xt,Vt]of Qe)xt&&it.push(Vt);return it});return function(){return ke.apply(this,arguments)}}(),type:0}),mc=(He,Le,Ae)=>Ae?eg(He,Le,Ae):Fd(He,Le),Fd=(He,Le)=>new Tn({generator:function(){var ke=(0,dt.A)(function*(){const[Ge,Qe]=yield Promise.all([He.toArray(),Le.toArray()]),it=Ge.length<Qe.length?Ge.length:Qe.length,xt=new Array(it);for(let Vt=0;Vt<it;Vt++)xt[Vt]=[Ge[Vt],Qe[Vt]];return xt});return function(){return ke.apply(this,arguments)}}(),type:0}),eg=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const[Qe,it]=yield Promise.all([He.toArray(),Le.toArray()]),xt=Qe.length<it.length?Qe.length:it.length,Vt=new Array(xt);for(let Qt=0;Qt<xt;Qt++)Vt[Qt]=Ae(Qe[Qt],it[Qt]);return Vt});return function(){return Ge.apply(this,arguments)}}(),type:0}),hp=(He,Le,Ae)=>new Tn({generator:function(){var Ge=(0,dt.A)(function*(){const[Qe,it]=yield Promise.all([He.toArray(),Le.toArray()]),xt=Qe.length<it.length?Qe.length:it.length,Vt=new Array(xt);for(let Qt=0;Qt<xt;Qt++)Vt[Qt]=Ae(Qe[Qt],it[Qt]);return Promise.all(Vt)});return function(){return Ge.apply(this,arguments)}}(),type:0}),Vd=He=>{var Le;const Ae=wi.prototype,ke=He.prototype,Ge=Object.getOwnPropertyNames(Ae);for(const Qe of Ge)ke[Qe]=null!==(Le=ke[Qe])&&void 0!==Le?Le:Ae[Qe]};Pt(Jn),(He=>{const Le=He.prototype,Ae=(ke,Ge)=>{const Qe=function(...it){return ke(this,...it)};Object.defineProperty(Qe,"length",{value:ke.length-1}),Le[Ge]=Qe};Ae(St,"aggregate"),Ae(jo,"all"),Ae(ia,"allAsync"),Ae(Sh,"any"),Ae(Mu,"anyAsync"),Ae(Mm,"asParallel"),Ae(Lc,"average"),Ae(tp,"averageAsync"),Ae(Rm,"chunk"),Ae(qd,"concatenate"),Ae(Ig,"contains"),Ae(kp,"containsAsync"),Ae(yt,"count"),Ae(An,"countAsync"),Ae(ki,"defaultIfEmpty"),Ae(Ao,"distinct"),Ae(ar,"distinctAsync"),Ae(Nr,"each"),Ae(Fa,"eachAsync"),Ae(Vs,"elementAt"),Ae(Rs,"elementAtOrDefault"),Ae(mr,"except"),Ae(Ja,"exceptAsync"),Ae(oa,"first"),Ae(Bc,"firstAsync"),Ae(tu,"firstOrDefault"),Ae(Sd,"firstOrDefaultAsync"),Ae(Nc,"groupBy"),Ae(Kl,"groupByAsync"),Ae(rd,"groupByWithSel"),Ae(Rg,"groupJoin"),Ae(Nf,"groupJoinAsync"),Ae(ip,"intersect"),Ae(sd,"intersectAsync"),Ae(nu,"joinByKey"),Ae(gc,"last"),Ae(Fp,"lastAsync"),Ae(Oh,"lastOrDefault"),Ae(Ed,"lastOrDefaultAsync"),Ae(ld,"max"),Ae(Up,"maxAsync"),Ae(Od,"min"),Ae(_C,"minAsync"),Ae(Xl,"ofType"),Ae(bc,"orderBy"),Ae(Ff,"orderByAsync"),Ae(Bg,"orderByDescending"),Ae(dd,"orderByDescendingAsync"),Ae(Q_,"partition"),Ae(km,"partitionAsync"),Ae(Lm,"reverse"),Ae(iu,"select"),Ae(Ng,"selectAsync"),Ae(Gp,"selectMany"),Ae(Wp,"selectManyAsync"),Ae(nh,"sequenceEquals"),Ae(Bd,"sequenceEqualsAsync"),Ae(Qs,"single"),Ae(Nd,"singleAsync"),Ae(sc,"singleOrDefault"),Ae($p,"singleOrDefaultAsync"),Ae(q_,"skip"),Ae(lt,"skipWhile"),Ae(Mt,"skipWhileAsync"),Ae(Pi,"sum"),Ae(Ir,"sumAsync"),Ae(Es,"take"),Ae(Bs,"takeWhile"),Ae(lc,"takeWhileAsync"),Ae(wh,"toArray"),Ae(jp,"toMap"),Ae(xc,"toMapAsync"),Ae(Kp,"toObject"),Ae(ev,"toObjectAsync"),Ae(vC,"toSet"),Ae(Gy,"union"),Ae(CC,"unionAsync"),Ae(nv,"where"),Ae(iv,"whereAsync"),Ae(ih,"zip"),Ae(Al,"zipAsync")})(Tt),(He=>{const Le=He.prototype,Ae=(ke,Ge)=>{const Qe=function(...it){return ke(this,...it)};Object.defineProperty(Qe,"length",{value:ke.length-1}),Le[Ge]=Qe};Ae(Fm,"aggregate"),Ae(Xp,"all"),Ae(ov,"allAsync"),Ae(rv,"any"),Ae(Or,"anyAsync"),Ae(ts,"asAsync"),Ae(Td,"average"),Ae(Zl,"averageAsync"),Ae(cc,"chunk"),Ae(Yp,"concatenate"),Ae(qa,"contains"),Ae(Ql,"containsAsync"),Ae(oh,"count"),Ae(sv,"countAsync"),Ae(sp,"defaultIfEmpty"),Ae(Ol,"distinct"),Ae(ap,"distinctAsync"),Ae(rh,"each"),Ae(sh,"eachAsync"),Ae(lp,"elementAt"),Ae(Gf,"elementAtOrDefault"),Ae(cp,"except"),Ae(ou,"exceptAsync"),Ae(ss,"first"),Ae(ku,"firstAsync"),Ae(Wf,"firstOrDefault"),Ae(Wg,"firstOrDefaultAsync"),Ae(sl,"groupBy"),Ae(Dd,"groupByAsync"),Ae(ah,"groupByWithSel"),Ae(Jl,"groupJoin"),Ae(Qp,"groupJoinAsync"),Ae(Jl,"groupJoin"),Ae(Qp,"groupJoinAsync"),Ae(EC,"intersect"),Ae(zm,"intersectAsync"),Ae(dv,"joinByKey"),Ae(OC,"last"),Ae(Wm,"lastAsync"),Ae(Wy,"lastOrDefault"),Ae($g,"lastOrDefaultAsync"),Ae(Th,"max"),Ae(jg,"maxAsync"),Ae(zx,"min"),Ae(Gx,"minAsync"),Ae(Kg,"ofType"),Ae(gv,"orderBy"),Ae(ha,"orderByAsync"),Ae(fv,"orderByDescending"),Ae(Sn,"orderByDescendingAsync"),Ae(nt,"partition"),Ae(Zt,"partitionAsync"),Ae(li,"reverse"),Ae(bo,"select"),Ae(ir,"selectAsync"),Ae(yr,"selectMany"),Ae(Ur,"selectManyAsync"),Ae(Ar,"sequenceEquals"),Ae(Us,"sequenceEqualsAsync"),Ae(ca,"single"),Ae(Js,"singleAsync"),Ae(Ra,"singleOrDefault"),Ae(ns,"singleOrDefaultAsync"),Ae(pa,"skip"),Ae(ga,"skipWhile"),Ae(Ya,"skipWhileAsync"),Ae(Cl,"sum"),Ae(Il,"sumAsync"),Ae(Sc,"take"),Ae(fc,"takeWhile"),Ae(hd,"takeWhileAsync"),Ae(Ha,"toArray"),Ae(Nu,"toMap"),Ae(Jp,"toMapAsync"),Ae(Vc,"toObject"),Ae(lh,"toObjectAsync"),Ae(Ho,"toSet"),Ae(ks,"union"),Ae(ba,"unionAsync"),Ae(qp,"where"),Ae(su,"whereAsync"),Ae(mc,"zip"),Ae(hp,"zipAsync")})(Tn),(()=>{var He;const{prototype:Le}=wi,Ae=Object.getOwnPropertyNames(Jn.prototype);for(const ke of Ae)Le[ke]=null!==(He=Le[ke])&&void 0!==He?He:Jn.prototype[ke];Le.all=function(ke){return this.every(ke)},Le.any=function(ke){return ke?this.some(ke):0!==this.length},Le.count=function(ke){if(ke){let Ge=0;for(let Qe=0;Qe<this.length;Qe++)!0===ke(this[Qe])&&Ge++;return Ge}return this.length},Le.elementAt=function(ke){if(ke<0||ke>=this.length)throw new tt("index");return this[ke]},Le.elementAtOrDefault=function(ke){return this[ke]||null},Le.first=function(ke){if(ke){const Ge=this.find(ke);if(void 0===Ge)throw new qe(vt.NoMatch);return Ge}if(0===this.length)throw new qe(vt.NoElements);return this[0]},Le.firstOrDefault=function(ke){if(ke){const Ge=this.find(ke);return void 0===Ge?null:Ge}return 0===this.length?null:this[0]},Le.last=function(ke){if(ke){for(let Ge=this.length-1;Ge>=0;Ge--){const Qe=this[Ge];if(!0===ke(Qe))return Qe}throw new qe(vt.NoMatch)}if(0===this.length)throw new qe(vt.NoElements);return this[this.length-1]},Le.lastOrDefault=function(ke){if(ke){for(let Ge=this.length-1;Ge>=0;Ge--){const Qe=this[Ge];if(!0===ke(Qe))return Qe}return null}return 0===this.length?null:this[this.length-1]},Le.max=function(ke){if(0===this.length)throw new qe(vt.NoElements);if(ke){let Ge=Number.NEGATIVE_INFINITY;for(let Qe=0;Qe<this.length;Qe++)Ge=Math.max(ke(this[Qe]),Ge);return Ge}return Math.max.apply(null,this)},Le.min=function(ke){if(0===this.length)throw new qe(vt.NoElements);if(ke){let Ge=Number.POSITIVE_INFINITY;for(let Qe=0;Qe<this.length;Qe++)Ge=Math.min(ke(this[Qe]),Ge);return Ge}return Math.min.apply(null,this)},Le.reverse=function(){return Array.prototype.reverse.apply(this),this}})();var $y=M(6343),Ad=M(3176),Ym=M(4773),Pl=M(5050),YS=M(3746),mv=M(7788),ZS=M(6409),Xw=M(3008);Pt(Map),Pt(Set),(()=>{var He;const Le=String.prototype,Ae=Object.getOwnPropertyNames(Jn.prototype);for(const ke of Ae)Le[ke]=null!==(He=Le[ke])&&void 0!==He?He:Jn.prototype[ke];Le.first=function(ke){if(ke){for(let Ge=0;Ge<this.length;Ge++){const Qe=this[Ge];if(!0===ke(Qe))return Qe}throw new qe(vt.NoMatch)}if(0===this.length)throw new qe(vt.NoElements);return this[0]},Le.firstOrDefault=function(ke){if(ke){for(let Ge=0;Ge<this.length;Ge++){const Qe=this[Ge];if(!0===ke(Qe))return Qe}return null}return 0===this.length?null:this[0]},Le.count=function(ke){if(ke){let Ge=0;for(let Qe=0;Qe<this.length;Qe++)!0===ke(this[Qe])&&Ge++;return Ge}return this.length},Le.elementAt=function(ke){if(ke<0||ke>=this.length)throw new tt("index");return this[ke]},Le.elementAtOrDefault=function(ke){return this[ke]||null},Le.last=function(ke){if(ke){for(let Ge=this.length-1;Ge>=0;Ge--){const Qe=this[Ge];if(!0===ke(Qe))return Qe}throw new qe(vt.NoMatch)}if(0===this.length)throw new qe(vt.NoElements);return this[this.length-1]},Le.lastOrDefault=function(ke){if(ke){for(let Ge=this.length-1;Ge>=0;Ge--){const Qe=this[Ge];if(!0===ke(Qe))return Qe}return null}return 0===this.length?null:this[this.length-1]},Le.reverse=function(){const ke=this;return new Jn(function*Ge(){for(let Qe=ke.length-1;Qe>=0;Qe--)yield ke[Qe]})}})(),Vd(Array),Vd(Int8Array),Vd(Int16Array),Vd(Int32Array),Vd(Uint8Array),Vd(Uint8ClampedArray),Vd(Uint16Array),Vd(Uint32Array),Vd(Float32Array),Vd(Float64Array);let DC=(()=>{class He{static{this.instanceCount=0}constructor(Ae,ke,Ge,Qe,it){this.propertyConverter=Ae,this.scopeService=ke,this.http=Ge,this.chatMessageService=Qe,this.chatRelayService=it,this.stores=new Map,this.subscriptions=[],this.cacheUpdatedSource=new $y.B7,this.cacheUpdated$=this.cacheUpdatedSource.asObservable(),this.storePushSource=new $y.B7,this.storePush$=this.storePushSource.asObservable(),this.rebuildCache=new Map,this.updateCache=new Map,this.requestCache=new Map,this.scope=this.scopeService.getScope(),this.database=new Ad.h(this.scope.currentScope.chapter.id,this.scope.network.id),this.apiEndpoint=`${this.scopeService.getScope().apiEndpoint}chatMessages`,this.fastApiEndpoint=`${this.scopeService.getScope().apiEndpoint}chatMessagesFast`,this.registerRelay(),He.instanceCount++}getCachedHttpRequest(Ae){const ke=(new Date).toISOString(),Ge=`${this.fastApiEndpoint}/quickDiff?chatRoomId=${Ae.toString()}&diffDate=${ke}`;if(!this.requestCache.has(Ge)){const Qe=this.http.get(Ge).toPromise();this.requestCache.set(Ge,Qe),Qe.finally(()=>{this.requestCache.delete(Ge)})}return this.requestCache.get(Ge)}getOdataStore(Ae){var ke=`${this.apiEndpoint}/getForChatRoom(chatRoomId='${Ae.toString()}')`;return new Xe({url:ke,key:"Id",keyType:"Guid",version:4})}getArrayStore(Ae){var ke=new Date;return null!=this.stores.get(Ae.toString())?new Promise((Ge,Qe)=>Ge(this.stores.get(Ae.toString())||new o.A)):this.database.chatMessages.where("parentId").equals(Ae.toString()).count().then(Ge=>{if(Ge>0)return this.database.chatMessages.where("parentId").equals(Ae.toString()).toArray().then(Qe=>{var xt=Qe.map(Qt=>JSON.parse(Qt.jsonValue)).orderBy(Qt=>Qt.createdOn).toArray();let Vt=new o.A({key:"id",data:xt,onLoaded:Qt=>this.propertyConverter.convert(Qt)});return this.stores.set(Ae.toString(),Vt),Vt.on("inserted",Qt=>{this.chatMessageService.postMessage(Qt.id,Ae,Qt.displayContent,Qt.replyId).toPromise().then(Xn=>{})}),Vt.on("removed",Qt=>{this.chatMessageService.deleteMessage(Qt).toPromise().then(Xn=>{this.database.chatMessages.delete(Qt.toString())})}),this.cacheUpdatedSource.next(Ae.valueOf()),Vt});{let Qe=`${this.fastApiEndpoint}/quick?chatRoomId=${Ae.toString()}`;return this.http.get(Qe).toPromise().then(it=>{let Vt=[];return it.value.map(Qt=>Vt.push({value:Qt,id:Qt.id.valueOf(),parentId:Ae.toString(),synchStartedOn:ke,synchCompletedOn:new Date,jsonValue:JSON.stringify(Qt)})),Vt.forEach(Qt=>{Qt.value.id=Qt.value.id.toString()}),Vt=Vt.orderBy(Qt=>Qt.value.createdOn).toArray(),Vt}).then(it=>this.database.chatMessages.where("parentId").equals(Ae.toString()).delete().then(xt=>this.database.chatMessages.bulkAdd(it).catch(Vt=>{console.log("error on chatroom message adding: room: "+Ae),console.log(Vt)}).then(Vt=>{var Qt=it.map(Vi=>JSON.parse(Vi.jsonValue));Qt=Qt.orderBy(Vi=>Vi.createdOn).toArray();let Xn=new o.A({key:"id",data:Qt,onLoaded:Vi=>this.propertyConverter.convert(Vi)});return this.stores.set(Ae.toString(),Xn),Xn.on("inserted",Vi=>{this.chatMessageService.postMessage(Vi.id,Ae,Vi.displayContent,Vi.replyId).toPromise().then(Ui=>{})}),Xn.on("removed",Vi=>{this.chatMessageService.deleteMessage(Vi).toPromise().then(Ui=>{this.database.chatMessages.delete(Vi.toString())})}),this.chatRelayService.addToChatroom(Ae.toString()),this.cacheUpdatedSource.next(Ae.valueOf()),Xn},Vt=>(console.error("Foobar at api call promise"),null!=this.stores.get(Ae.toString())?(console.error("Resolving store from self fallback"),new Promise((Qt,Xn)=>{Qt(this.stores.get(Ae.toString())||new o.A)})):this.database.chatMessages.where("parentId").equals(Ae.toString()).toArray().then(Qt=>{var Xn=Qt.map(Ui=>JSON.parse(Ui.jsonValue));let Vi=new o.A({key:"id",data:Xn,onLoaded:Ui=>this.propertyConverter.convert(Ui)});return Vi.on("inserted",Ui=>{this.chatMessageService.postMessage(Ui.id,Ae,Ui.displayContent,Ui.replyId).toPromise().then(Do=>{})}),Vi.on("removed",Ui=>{this.chatMessageService.deleteMessage(Ui).toPromise().then(Do=>{this.database.chatMessages.delete(Ui.toString())})}),this.stores.set(Ae.toString(),Vi),this.cacheUpdatedSource.next(Ae.toString()),Vi})))))}})}registerRelay(){this.subscriptions.push(this.chatRelayService.msgReceived$.subscribe(Ae=>{this.getArrayStore(new W.A(Ae.roomId)).then(ke=>{this.http.get(`${this.apiEndpoint}/GetById(id='${Ae.id.toString()}')`).toPromise().then(Ge=>{ke.load().then(Qe=>{if(Qe.any(it=>it.id.toString()==Ge.id.toString()))try{ke?.push([{type:"update",key:Ge.id,data:Ge}])}catch(it){console.error("push error",it,this)}else ke?.push([{type:"insert",data:Ge}]);this.storePushSource.next(Ae.roomId);try{this.database.chatMessages.add({value:Ge,id:Ge.id.valueOf(),parentId:Ae.roomId,synchStartedOn:new Date,synchCompletedOn:new Date,jsonValue:JSON.stringify(Ge)})}catch(it){console.error("add message to indexDb foobar",it,this)}})})},ke=>{console.error("Msg received error",ke,this)})}),this.chatRelayService.msgUpdated$.subscribe(Ae=>{this.getArrayStore(new W.A(Ae.roomId)).then(ke=>{this.http.get(`${this.apiEndpoint}/GetById(id='${Ae.id.toString()}')`).toPromise().then(Ge=>{ke.push([{type:"update",key:new W.A(Ae.id),data:Ge}]),this.storePushSource.next(Ae.roomId);try{this.database.chatMessages.update(Ae.id,{value:Ge,id:Ge.id.valueOf(),parentId:Ae.roomId,synchStartedOn:new Date,synchCompletedOn:new Date,jsonValue:JSON.stringify(Ge)})}catch(Qe){console.error("update message to indexDb foobar",Qe)}},Ge=>{console.error("Msg updated",Ge)})})}),this.chatRelayService.msgDeleted$.subscribe(Ae=>{this.getArrayStore(new W.A(Ae.roomId)).then(ke=>{ke.push([{type:"remove",key:Ae.id}]),this.storePushSource.next(Ae.roomId);try{this.database.chatMessages.delete(Ae.id)}catch(Ge){console.log("delete message to indexDb foobar"),console.log(Ge)}})}))}rebuildCacheAndGetStore(Ae){const ke=Ae.toString();if(!this.rebuildCache.has(ke)){const Ge=`${this.fastApiEndpoint}/quick?chatRoomId=${ke}`,Qe=new Date,it=this.http.get(Ge).toPromise().then(xt=>{let Vt=xt.value.map(Qt=>({value:Qt,id:Qt.id.valueOf(),parentId:ke,synchStartedOn:Qe,synchCompletedOn:new Date,jsonValue:JSON.stringify(Qt),hashGuid:xt.hashGuid?.valueOf()}));return Vt.forEach(Qt=>{Qt.value.id=Qt.value.id.toString()}),Vt=Vt.sort((Qt,Xn)=>new Date(Qt.value.createdOn).getTime()-new Date(Xn.value.createdOn).getTime()),Vt}).then(xt=>this.database.chatMessages.where("parentId").equals(ke).delete().then(()=>this.database.chatMessages.bulkAdd(xt).then(()=>{const Vt=xt.map(Xn=>JSON.parse(Xn.jsonValue)).sort((Xn,Vi)=>new Date(Xn.createdOn).getTime()-new Date(Vi.createdOn).getTime()),Qt=new o.A({key:"id",data:Vt,onLoaded:Xn=>this.propertyConverter.convert(Xn)});return Qt.on("inserted",Xn=>{this.chatMessageService.postMessage(Xn.id,Ae,Xn.displayContent,Xn.replyId).toPromise()}),Qt.on("removed",Xn=>{this.chatMessageService.deleteMessage(Xn).toPromise().then(()=>this.database.chatMessages.delete(Xn.toString()))}),this.stores.set(ke,Qt),this.cacheUpdatedSource.next(ke),this.database.chatRooms.update(ke,{hashGuid:xt[0]?.hashGuid}).catch(Xn=>{console.error("Hash update failed",xt[0])}),Qt}).catch(Vt=>(console.error("Error on chatroom message adding: room:",ke,Vt),this.fallbackStore(Ae))))).catch(xt=>(console.error("Foobar at api call promise",xt),this.fallbackStore(Ae)));this.rebuildCache.set(ke,it),it.finally(()=>{this.rebuildCache.delete(ke)})}return this.rebuildCache.get(ke)}fallbackStore(Ae){const ke=Ae.toString();return this.stores.has(ke)?Promise.resolve(this.stores.get(ke)||new o.A):this.database.chatMessages.where("parentId").equals(ke).toArray().then(Ge=>{const Qe=Ge.map(xt=>JSON.parse(xt.jsonValue)),it=new o.A({key:"id",data:Qe,onLoaded:xt=>this.propertyConverter.convert(xt)});return it.on("inserted",xt=>{this.chatMessageService.postMessage(xt.id,Ae,xt.displayContent,xt.replyId).toPromise()}),it.on("removed",xt=>{this.chatMessageService.deleteMessage(xt).toPromise().then(()=>this.database.chatMessages.delete(xt.toString()))}),this.stores.set(ke,it),this.cacheUpdatedSource.next(ke),it})}updateStore(Ae,ke,Ge){const Qe=Ae.toString();if(!this.updateCache.has(Qe)){const it=this.getArrayStore(Ae).then(xt=>xt.load().then(Vt=>this.getCachedHttpRequest(Ae).then(Xn=>{const Vi=Xn.value.map(Ui=>Ui.modifiedOn&&!Ui.deletedOn?(xt.push([{type:"update",key:Ui.id,data:Ui}]),this.database.chatMessages.update(Ui.id.valueOf(),{value:Ui,id:Ui.id.valueOf(),parentId:Ae.valueOf(),synchStartedOn:new Date,synchCompletedOn:new Date,jsonValue:JSON.stringify(Ui)}).catch(Do=>{console.error("Error updating message in indexDb",Do)})):Ui.modifiedOn&&Ui.deletedOn?(xt.push([{type:"remove",key:Ui.id}]),this.database.chatMessages.delete(Ui.id.valueOf()).catch(Do=>{console.error("Error deleting message from indexDb",Do)})):xt.byKey(Ui.id).then(Do=>(xt.push(Do?[{type:"update",key:Ui.id,data:Ui}]:[{type:"insert",data:Ui}]),this.database.chatMessages.get(Ui.id.valueOf()).then(Qo=>Qo?null:this.database.chatMessages.add({value:Ui,id:Ui.id.valueOf(),parentId:Ae.valueOf(),synchStartedOn:new Date,synchCompletedOn:new Date,jsonValue:JSON.stringify(Ui)}).catch(tr=>{console.error("Error adding message to indexDb",tr)})))).catch(Do=>(console.error("Error handling message byKey operation",Do),null)));return Promise.all(Vi).then(()=>{this.checkForCorruption(Ae)})}).catch(Xn=>{console.error("Error fetching messages from server",Xn)}))).finally(()=>{this.updateCache.delete(Qe)});this.updateCache.set(Qe,it)}return this.updateCache.get(Qe).then(()=>{})}checkForCorruption(Ae){(new Date).toISOString();return Ae.toString(),this.getCachedHttpRequest(Ae).then(it=>{let xt=it.totalCount,Vt=it.hashGuid;return this.getArrayStore(Ae).then(Qt=>{Qt.load().then(Xn=>this.database.chatRooms.get(Ae.valueOf()).then(Vi=>Xn.length!=xt||Vi?.hashGuid!=Vt?this.dropBackendCache(Ae).then(Ui=>Ui?(this.chatRelayService.addToChatroom(Ae.toString()),this.rebuildCacheAndGetStore(Ae)):null):null))})})}dropBackendCache(Ae){return this.http.get(this.scopeService.getScope().apiEndpoint+"chatMessagesFast/IsMyMembershipActive/"+Ae.toString()).toPromise().then(ke=>ke)}static{this.\u0275fac=function(ke){return new(ke||He)(mv.KVO(Pl.A),mv.KVO(YS.A),mv.KVO(ZS.Qq),mv.KVO(Ym.A),mv.KVO(Xw.p))}}static{this.\u0275prov=mv.jDH({token:He,factory:He.\u0275fac,providedIn:"root"})}}return He})()},3527:(In,Ze,M)=>{"use strict";M.d(Ze,{M:()=>f});var W=M(3308),o=M(3746),P=M(7788),b=M(6409);let f=(()=>{class S{constructor(y,d){this.http=y,this.scopeService=d,this.apiEndpoint="",this.translationCache=new Map,this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint}getAvailableTargetLanguages(){return this.availableTargetLanguagesCache?Promise.resolve(this.availableTargetLanguagesCache):this.http.get(`${this.apiEndpoint}translations/targetLanguages`).toPromise().then(y=>(this.availableTargetLanguagesCache=y,y)).catch(y=>Promise.reject(y))}canTranslate(){if(!0===this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled){const d=this.scope.profile,c=this.scope.network.settings.languagePack.split("-")[0];if(null!==d.activeUserLanguage?.vendorLanguageCode&&c!==d.activeUserLanguage?.vendorLanguageCode)return!0}return!1}translateInternal(y,d){var c=this;return(0,W.A)(function*(){if(!0===c.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled&&null!==d){const u=c.scope.profile,h=c.scope.network.settings.languagePack.split("-")[0];if(null!==u.activeUserLanguage?.vendorLanguageCode&&h!==u.activeUserLanguage?.vendorLanguageCode){const g=c.scope.globalSettings.configurations.translationEndpointInfo;return c.http.post(`${g.baseUrl}/api/Translations/vendorbatch`,{TenantId:"ab1c0d0b-c2d1-d0ab-1c0d-0ab1c0d0ab1c",Sources:y,IgnoreReplacements:!0,ToVendorLanguageId:d},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${g.token}`}}).toPromise().then(C=>C.translations).catch(C=>{console.error("TRANS FETCH FAIL",C);const I=y.map(L=>({source:L,translation:L}));return Promise.resolve(I)})}}return{translations:y.map(u=>({source:u,translation:u}))}})()}getCachedOrTranslate(y,d){var c=this;return(0,W.A)(function*(){if(null==d)return y.map(h=>({source:h,translation:h}));const s=JSON.stringify({textEntries:y,targetVendorLanguageId:d});if(c.translationCache.has(s))return c.translationCache.get(s);const a=c.translateInternal(y,d);return c.translationCache.set(s,a),a})()}translateByUserLanguageCode(y){if(this.canTranslate()){const d=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration.VendorId,s=this.scope.profile.activeUserLanguage?.vendorLanguageCode,u=this.scope.globalSettings.configurations.availableVendorLanguages.find(h=>h.id===d).supportedVendorLanguages.find(h=>h.languageCode===s||h.languageISO639Code===s);return this.getCachedOrTranslate(y,u?.id)}return this.getCachedOrTranslate(y,null)}translateToOrigin(y){if(this.canTranslate()){const d=this.scope.network.settings.languagePack.split("-")[0],c=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration.VendorId,a=this.scope.globalSettings.configurations.availableVendorLanguages.find(u=>u.id===c).supportedVendorLanguages.find(u=>u.languageCode===d||u.languageISO639Code===d);return this.getCachedOrTranslate(y,a?.id)}return this.getCachedOrTranslate(y,null)}getTranslatedArticleDetails(y,d,c){let s=this.scope.apiEndpoint+"articles/"+y+"/translate/"+d;return c&&(s=s+"?v="+c),this.http.post(s,null).toPromise().then(a=>a).catch(a=>Promise.reject(a))}static{this.\u0275fac=function(d){return new(d||S)(P.KVO(b.Qq),P.KVO(o.A))}}static{this.\u0275prov=P.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}}return S})()},6117:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>P});var W=M(3746),o=M(7788);let P=(()=>{class b{constructor(S){this.scopeService=S,this.scope=this.scopeService.getScope()}getDefaultSourceTypes(){return{1:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType1,sourceType:1,riskLevel:1,expirationDays:0,checkRequired:!1},2:{name:this.scope.currentScope.network.name,sourceType:2,riskLevel:1,expirationDays:0,checkRequired:!1},3:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType3,sourceType:3,riskLevel:1,expirationDays:0,checkRequired:!1},4:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType4,sourceType:4,riskLevel:2,expirationDays:30,checkRequired:!1},5:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType5,sourceType:5,riskLevel:1,expirationDays:0,checkRequired:!1},7:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7,sourceType:7,riskLevel:2,expirationDays:30,checkRequired:!0},8:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType8,sourceType:8,riskLevel:2,expirationDays:30,checkRequired:!1},9:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType9,sourceType:9,riskLevel:3,expirationDays:14,checkRequired:!0},12:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType12,sourceType:12,riskLevel:3,expirationDays:14,checkRequired:!0},14:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType14,sourceType:14,riskLevel:3,expirationDays:14,checkRequired:!0},15:{name:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType15,sourceType:15,riskLevel:1,expirationDays:0,checkRequired:!1}}}getCreativeCommonsLicenses(){return{1:{name:"CC0 1.0",value:"https://creativecommons.org/publicdomain/zero/1.0/deed.de",validity:!0},2:{name:"BY 1.0",value:"https://creativecommons.org/licenses/by/1.0/legalcode",validity:!0},3:{name:"BY 2.0",value:"https://creativecommons.org/licenses/by/2.0/de/legalcode",validity:!0},4:{name:"BY 2.5",value:"https://creativecommons.org/licenses/by/2.5/legalcode",validity:!0},5:{name:"BY 3.0",value:"https://creativecommons.org/licenses/by/3.0/de/legalcode",validity:!0},6:{name:"BY 4.0",value:"https://creativecommons.org/licenses/by/4.0/legalcode",validity:!0},7:{name:"BY-SA 1.0",value:"https://creativecommons.org/licenses/by-sa/1.0/legalcode",validity:!0},8:{name:"BY-SA 2.0",value:"https://creativecommons.org/licenses/by-sa/2.0/de/legalcode",validity:!0},9:{name:"BY-SA 2.5",value:"https://creativecommons.org/licenses/by-sa/2.5/legalcode",validity:!0},10:{name:"BY-SA 3.0",value:"https://creativecommons.org/licenses/by-sa/3.0/de/legalcode",validity:!0},11:{name:"BY-SA 4.0",value:"https://creativecommons.org/licenses/by-sa/4.0/legalcode",validity:!0},12:{name:"BY-ND",value:"",validity:!1},13:{name:"BY-NC",value:"",validity:!1},14:{name:"BY-NC-SA",value:"",validity:!1},15:{name:"BY-ND-NC",value:"",validity:!1},16:{name:"BY-NC-ND",value:"",validity:!1}}}getAgencys(){return[{name:"Shutterstock",url:"Shutterstock.com"},{name:"Fotolia",url:"Fotolia.de"},{name:"Adobe Stock",url:"stock.adobe.com"}]}getsocialMediaProfileTypes(){return[{name:"private",display:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType9_selectPrivate},{name:"commercial",display:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType9_selectCommercial}]}static{this.\u0275fac=function(T){return new(T||b)(o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})()},6449:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>S});var W=M(3746),o=M(2198),P=M(5793),b=M(7788),f=M(6409);let S=(()=>{class T{constructor(d,c,s){this.http=d,this.scopeService=c,this.upgrade=s,this.apiEndpoint="",this.profile={loginInfo:{}},this.facebookAppId="your-facebook-app-id",this.isFacebookEnabled=!1,this.loginState=new P.t(!1),this.loginState$=this.loginState.asObservable(),this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint,this.mediaApiBase={url:this.scope.globalSettings.configurations.apicodoMediaBaseUrl},this.isFacebookEnabled=this.scope.network.settings.availableFacebookLogin,this.isFacebookEnabled&&(this.facebookAppId=this.scope.globalSettings.authenticationFacebookAppId,this.initializeFacebookSdk())}initializeFacebookSdk(){window.fbAsyncInit=()=>{FB.init({appId:this.facebookAppId,cookie:!0,xfbml:!0,version:"v20.0"})}}noop(){return this.http.get(`${this.apiEndpoint}/account/noop`).toPromise()}register(d){return this.noop().then(()=>this.http.post(`${this.apiEndpoint}account/register`,d).toPromise()).catch(c=>Promise.reject(c))}externalRegister(d){return this.logout().then(()=>this.noop()).then(()=>this.http.post(`${this.apiEndpoint}account/registerexternal`,d).toPromise().then(c=>{this.emitAuthenticationStateChanged(!0)})).catch(c=>Promise.reject(c))}login(d){return this.noop().then(()=>this.http.post(`${this.apiEndpoint}account/login`,d).toPromise().then(c=>(this.emitAuthenticationStateChanged(!0),c))).catch(c=>Promise.reject(c))}loginSaml2(d){return this.noop().then(()=>this.http.post(`${this.apiEndpoint}account/loginSaml2`,d).toPromise().then(c=>(this.emitAuthenticationStateChanged(!0),c))).catch(c=>Promise.reject(c))}logout(){return this.noop().then(()=>this.http.get(`${this.apiEndpoint}account/logout`).toPromise()).then(d=>new Promise((c,s)=>{this.emitAuthenticationStateChanged(!1);const u=window.indexedDB.deleteDatabase(`chatDb-${this.scope.network.id}-${this.scope.currentChapter.id}`);u.onsuccess=()=>{console.log("Database deleted successfully."),c(d)},u.onerror=h=>{console.error("Error deleting database.",h),s(new Error("Error deleting database."))},u.onblocked=()=>{console.warn("Database deletion is blocked."),s(new Error("Database deletion is blocked."))}})).catch(d=>Promise.reject(d))}facebookLogin(d){return d&&console.error("Facebook login from app is no longer supported"),new Promise((c,s)=>{FB.login(a=>{a&&a.authResponse&&a.authResponse.accessToken?this.http.post(`${this.apiEndpoint}/account/loginexternal`,{loginProvider:"Facebook",token:a.authResponse.accessToken}).toPromise().then(g=>{this.emitAuthenticationStateChanged(!0),c(g)}).catch(g=>{404===g.status?FB.api("/me",{fields:"first_name,email,last_name,gender,birthday"},_=>{this.resolveProfile(_,c,s)}):s(g)}):s("Authentication canceled.")},{scope:"email,public_profile"})})}resolveProfile(d,c,s){let a=null;"male"===d.gender?a=1:"female"===d.gender&&(a=0);let u=null;d.birthday&&d.birthday.replace(/\d\d\/\d\d\/(\d\d\d\d)/g,(g,_)=>{u=_});const h=d.email&&d.email.match(/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/)?d.email:null;c({loginProvider:"Facebook",token:d.id,email:h,emailConfirmed:!!h,firstName:d.first_name,lastName:d.last_name,gender:a,genderConfirmed:!!a,yearOfBirth:u,yearOfBirthConfirmed:!!u})}validateEmail(d){return this.http.put(`${this.apiEndpoint}account/email/${d}`,{}).toPromise().catch(c=>Promise.reject(c))}setPassword(d){return this.http.post(`${this.apiEndpoint}account/password`,d).toPromise().catch(c=>Promise.reject(c))}requestPassword(d){return this.http.put(`${this.apiEndpoint}account/RequestPassword`,d).toPromise().catch(c=>Promise.reject(c))}changePassword(d){return this.http.put(`${this.apiEndpoint}account/Password`,d).toPromise().catch(c=>Promise.reject(c))}deleteAccount(){return this.noop().then(()=>this.http.get(`${this.apiEndpoint}account/delete`).toPromise()).then(d=>new Promise((c,s)=>{this.emitAuthenticationStateChanged(!1);const u=window.indexedDB.deleteDatabase(`chatDb-${this.scope.network.id}-${this.scope.currentChapter.id}`);u.onsuccess=()=>{console.log("Database deleted successfully."),c(d)},u.onerror=h=>{console.error("Error deleting database.",h),s(new Error("Error deleting database."))},u.onblocked=()=>{console.warn("Database deletion is blocked."),s(new Error("Database deletion is blocked."))}})).catch(d=>Promise.reject(d))}changeEmail(d){return this.http.post(`${this.apiEndpoint}account/email`,d).toPromise().catch(c=>Promise.reject(c))}sendEmailVerification(d){return this.http.post(`${this.apiEndpoint}account/email/${d}/sendVerification`,{}).toPromise().catch(c=>Promise.reject(c))}getEmails(){return this.http.get(`${this.apiEndpoint}account/emails/`).toPromise().catch(()=>Promise.reject("Error fetching emails"))}deleteEmail(d){return this.http.post(`${this.apiEndpoint}account/email/${d}/delete`,{}).toPromise().catch(()=>Promise.reject("Error deleting email"))}updateActiveEmail(d){return this.http.post(`${this.apiEndpoint}account/email/${d}/updateActive`,{}).toPromise().catch(()=>Promise.reject("Error updating email"))}getApicodoMediaToken(){return this.http.get(`${this.apiEndpoint}media/token`).toPromise().catch(()=>Promise.reject("Error fetching media token"))}triggerApplyInAngularJs(){try{const c=this.upgrade.injector.get("$rootScope");c?c.$apply():console.error("AngularJS $rootScope not found.")}catch(d){console.error("Error accessing AngularJS services:",d)}}emitAuthenticationStateChanged(d){this.upgrade.injector.get("$rootScope").$emit("authenticationStateChanged"),this.loginState.next(d)}static{this.\u0275fac=function(c){return new(c||T)(b.KVO(f.Qq),b.KVO(W.A),b.KVO(o.be))}}static{this.\u0275prov=b.jDH({token:T,factory:T.\u0275fac,providedIn:"root"})}}return T})()},7543:(In,Ze,M)=>{"use strict";M.d(Ze,{u:()=>T});var W=M(3308),o=M(6409),P=M(6284),b=M(6343),f=M(3746),S=M(7788);let T=(()=>{class y{constructor(c,s){this.scopeService=s,this.tokenData={token:"",expiresOn:new Date(1,1,1),fileTokens:null},this.sourceTimes=(0,P.Y)(5e3),this.isAuthenticatedSource=new b.B7,this.isAuthenticated$=this.isAuthenticatedSource.asObservable(),this.fetchingTokenPromise=null,this.http=new o.Qq(c),this.scope=this.scopeService}getToken(){var c=this;return(0,W.A)(function*(){return c.tokenData=yield c.getTokenData(),c.tokenData.token})()}getTokenData(){var c=this;return(0,W.A)(function*(){return c.tokenData.token&&(new Date).getTime()<c.tokenData.expiresOn.getTime()?c.tokenData:(c.fetchingTokenPromise||(c.fetchingTokenPromise=new Promise(function(){var a=(0,W.A)(function*(u){const h=yield c.http.get(c.scope.getMiniScope().apiEndpoint+"chatAuthentication/token").pipe().toPromise();h.expiresOn=new Date(h.expiresOn),c.tokenData=h,c.isAuthenticatedSource.next(c.tokenData),c.fetchingTokenPromise=null,u(c.tokenData)});return function(u){return a.apply(this,arguments)}}())),c.fetchingTokenPromise)})()}expireToken(c){var s=this;return(0,W.A)(function*(){s.tokenData.expiresOn=new Date(1,1,1),yield s.getToken()})()}static{this.\u0275fac=function(s){return new(s||y)(S.KVO(o.JV),S.KVO(f.A))}}static{this.\u0275prov=S.jDH({token:y,factory:y.\u0275fac,providedIn:"root"})}}return y})()},8030:(In,Ze,M)=>{"use strict";M.d(Ze,{L:()=>a});var W=M(8892),o=M(6284),P=M(6343),b=M(683),f=M(1023),S=M(3746),T=M(7788),y=M(3008),d=M(8375),c=M(7543),s=M(6409);let a=(()=>{class u{constructor(g,_,x,w,D,C,I){this.chatRelayService=g,this.globalService=_,this.keepAliveService=x,this.router=w,this.authenticationService=D,this.http=C,this.scope=I,this.routeActive=!1,this.badge=0,this.sourceTimes=(0,o.Y)(500),this.roomBadges={},this.connected=!1,this.activeRoomId="",this.badgesSource=new P.B7,this.badgeUpdates$=this.badgesSource.asObservable(),this.isResumedSource=new P.B7,this.isResumed$=this.isResumedSource.asObservable(),this.subscriptions=[],this.updateLastVisitPromise=null,this.userSettings={notificationsDisabled:!1,readStatusDisabled:!1},this.tokenReceived=!1,this.badgePromise=null,this.router.events.pipe((0,b.p)(L=>L instanceof W.wF)).subscribe(L=>{const G=L.url.match(/room\/([0-9a-fA-F-]{36})$/);this.activeRoomId=G?G[1]:"",this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge})}),this.subscriptions.push(this.keepAliveService.isResumed$.subscribe(L=>{this.isResumedSource.next(L),L&&this.loadBadges().then(N=>{this.badge=N.totalCount,this.roomBadges=N.badges,this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge})})}),this.subs=this.sourceTimes.subscribe(L=>{this.routeActive=!!window.location.href.endsWith(this.activeRoomId)})),this.globalService.getSettings().then(L=>{this.userSettings=L,this.subscriptions.push(this.chatRelayService.roomCreated$.subscribe(N=>{}),this.chatRelayService.msgReceived$.subscribe(N=>this.onMessageReceived(N)),this.chatRelayService.isConnected$.subscribe(N=>{this.connected=N}))}),this.authenticationService.isAuthenticated$.subscribe(L=>{this.tokenReceived=!0,this.isResumedSource.next(!0),this.loadBadges().then(N=>{this.badge=N.totalCount,this.roomBadges=N.badges,this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge})})})}ngOnDestroy(){this.subscriptions.forEach(g=>g.unsubscribe())}onMessageReceived(g){if(!this.userSettings?.notificationsDisabled){if(!this.roomBadges[g.roomId])return void this.loadBadges().then(_=>{this.badge=_.totalCount,this.roomBadges=_.badges,this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge})});if(g.fromChatMemberId===this.roomBadges[g.roomId].myMembershipId.toString())return void this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge});if(g.roomId===this.activeRoomId&&this.routeActive)return this.roomBadges[g.roomId].active=!0,void this.updateLastVisit(this.roomBadges[g.roomId].myMembershipId).then(_=>{this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge})});if(this.roomBadges[g.roomId].count=this.roomBadges[g.roomId].count+1,this.roomBadges[g.roomId].active=!1,this.routeActive||(this.activeRoomId=""),this.roomBadges){let _=0;Object.values(this.roomBadges).forEach(x=>{_+=x.count}),this.badge=_}this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge})}}loadBadges(){return this.badgePromise||(this.badgePromise=this.http.get(`${this.scope.getScope().apiEndpoint}chatMembers/GetInitialBadgeCount`).toPromise(),this.badgePromise.finally(()=>{this.badgePromise=null})),this.badgePromise}updateLastVisit(g){return this.updateLastVisitPromise||(this.updateLastVisitPromise=this.http.post(this.scope.getScope().apiEndpoint+"chatMembers("+g+")/UpdateLastVisit",null).toPromise().then(_=>this.loadBadges()).then(_=>(this.badge=_.totalCount,this.roomBadges=_.badges,this.badgesSource.next({badges:this.roomBadges,totalCount:this.badge}),this.updateLastVisitPromise=null,_)).catch(_=>{throw this.updateLastVisitPromise=null,_})),this.updateLastVisitPromise}setActiveRoom(g){this.activeRoomId=g}static{this.\u0275fac=function(_){return new(_||u)(T.KVO(y.p),T.KVO(f.A),T.KVO(d.S),T.KVO(W.Ix),T.KVO(c.u),T.KVO(s.Qq),T.KVO(S.A))}}static{this.\u0275prov=T.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})()},3378:(In,Ze,M)=>{"use strict";M.d(Ze,{d:()=>b});var W=M(3746),o=M(7788),P=M(6409);let b=(()=>{class f{constructor(T,y){this.http=T,this.scopeService=y,this.apiEndpoint=`${y.getScope().apiEndpoint}chatMembers`}post(T){return this.http.post(`${this.apiEndpoint}`,T)}hide(T){return this.http.post(`${this.apiEndpoint}/HideChat/${T}`,null)}delete(T){return this.http.delete(`${this.apiEndpoint}/${T.toString()}`)}toggleMute(T){return this.http.post(`${this.apiEndpoint}/ToggleChatMuted/${T}`,null)}promoteToAdmin(T){return this.http.post(`${this.apiEndpoint}/${T}/promoteToAdmin`,null)}revokeAdminPrivileges(T){return this.http.post(`${this.apiEndpoint}/${T}/revokeAdminPrivileges`,null)}static{this.\u0275fac=function(y){return new(y||f)(o.KVO(P.Qq),o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:f,factory:f.\u0275fac})}}return f})()},4773:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>y});var W=M(6285),o=M(5416),P=M(5050),b=M(3746),f=M(7788),S=M(6409),T=M(3008);class y{static{this.DUMMY_LOADER={dataSource:new W.A([]),pageSize:20,totalCount:0,nextPage:()=>(0,o.of)(),previousPage:()=>(0,o.of)(),onDestroy:()=>{},addMessage:()=>{}}}constructor(s,a,u,h){this.http=s,this.scopeService=a,this.propertyConverter=u,this.chatRelayService=h,this.apiEndpoint=`${this.scopeService.getScope().apiEndpoint}chatMessages`}postMessage(s,a,u,h){return this.http.post(`${this.apiEndpoint}`,{id:s,chatRoomId:a,displayContent:u,replyId:h})}postAttachmentMessage(s,a,u,h){return this.http.post(`${this.apiEndpoint}`,{id:s,chatRoomId:a,displayContent:u,chatMessageAttachments:[h]})}updateMessage(s,a){return this.http.patch(`${this.apiEndpoint}/${s}`,{displayContent:a})}deleteMessage(s){return this.http.delete(`${this.apiEndpoint}/${s}`)}static{this.\u0275fac=function(a){return new(a||y)(f.KVO(S.Qq),f.KVO(b.A),f.KVO(P.A),f.KVO(T.p))}}static{this.\u0275prov=f.jDH({token:y,factory:y.\u0275fac})}}},3008:(In,Ze,M)=>{"use strict";M.d(Ze,{p:()=>y});var W=M(8189),o=M(5574),P=M(6343),b=M(3746),f=M(7788),S=M(7543),T=M(6409);let y=(()=>{class d{constructor(s,a,u){this.scope=s,this.auth=a,this.http=u,this.SignalrHubUrl="http://localhost:5269/hub/chatHub",this.isConnected=!1,this.roomDeletedSource=new P.B7,this.roomDeleted$=this.roomDeletedSource.asObservable(),this.roomCreatedSource=new P.B7,this.roomCreated$=this.roomCreatedSource.asObservable(),this.isConnectedSource=new P.B7,this.isConnected$=this.isConnectedSource.asObservable(),this.msgReceivedSource=new P.B7,this.msgReceived$=this.msgReceivedSource.asObservable(),this.msgUpdatedSource=new P.B7,this.msgUpdated$=this.msgUpdatedSource.asObservable(),this.msgDeletedSource=new P.B7,this.msgDeleted$=this.msgDeletedSource.asObservable(),this._hubConnection=null,this.SignalrHubUrl=this.scope.getScope().globalSettings.configurations.chatServerConfig.baseUrl+"hub/chatHub",this._hubConnection=(new W.$).withUrl(this.SignalrHubUrl,{accessTokenFactory:()=>this.auth.getToken()}).withAutomaticReconnect().configureLogging(o.$.None).build(),this._hubConnection.start().then(()=>{this.isConnected=!0,this.isConnectedSource.next(!0)}).catch(h=>{this.isConnected=!1,this.isConnectedSource.next(!1)}),this._hubConnection.onclose(h=>{this.isConnected=!1,this.isConnectedSource.next(!1)}),this._hubConnection.onreconnected(()=>{this.isConnected=!0,this.isConnectedSource.next(!0)}),this._hubConnection.onreconnecting(h=>{console.warn("apicodo is trying to reconnect to server. please wait or try again later")}),this._hubConnection.on("chatRoomRemoved",h=>{this.roomDeletedSource.next(h.payload)}),this._hubConnection.on("chatRoomCreated",h=>{(this.scope.getScope().currentChapter.slug===h.payload.chapterSlug||this.scope.getScope().network.slug===h.payload.networkSlug)&&this.http.get(this.scope.getScope().apiEndpoint+"chatMessagesFast/IsMyMembershipActive/"+h.payload.id).toPromise().then(g=>{g&&(this._hubConnection?.send("addToGroup",h.payload.id),this.auth.expireToken(this).then(_=>{this.roomCreatedSource.next(h.payload)}))})}),this._hubConnection.on("newMessageSent",h=>{this.msgReceivedSource.next(h.payload)}),this._hubConnection.on("chatMessageUpdated",h=>{this.msgUpdatedSource.next(h.payload)}),this._hubConnection.on("chatMessageDeleted",h=>{this.msgDeletedSource.next(h.payload)})}addToChatroom(s){this.isConnected&&this._hubConnection?.send("addToGroup",s)}reconnect(){this.isConnected=!1,this.isConnectedSource.next(!1),this._hubConnection?.stop().then(()=>{this._hubConnection?.start().then(()=>{this.isConnected=!0,this.isConnectedSource.next(!0)}).catch(s=>{this.isConnected=!1,this.isConnectedSource.next(!1)})})}static{this.\u0275fac=function(a){return new(a||d)(f.KVO(b.A),f.KVO(S.u),f.KVO(T.Qq))}}static{this.\u0275prov=f.jDH({token:d,factory:d.\u0275fac,providedIn:"root"})}}return d})()},5340:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>b});var W=M(3746),o=M(7788),P=M(6409);let b=(()=>{class f{constructor(T,y){this.http=T,this.scopeService=y,this.scope=y.getScope()}createOneToOneChat(T){return this.http.post(`${this.scope.apiEndpoint}chatRooms`,{users:[{userGuid:T.toString(),isAdmin:!0}],type:"Private",isNetworkWide:!1})}getRoom(T){return this.http.get(`${this.scope.apiEndpoint}chatRoomsFast/getById/${T.toString()}`)}delete(T){return this.http.delete(`${this.scope.apiEndpoint}chatRooms/${T}`)}createGroupChat(T){return this.http.post(`${this.scope.apiEndpoint}chatRooms`,T)}joinSubscription(T){return this.http.post(`${this.scope.apiEndpoint}chatRooms/${T}/join`,null)}put(T,y){return this.http.put(`${this.scope.apiEndpoint}chatRooms/${T}`,y)}updateImage(T,y){return this.http.post(`${this.scope.apiEndpoint}chatRooms/${T}/UpdateImage/${y}`,null)}static{this.\u0275fac=function(y){return new(y||f)(o.KVO(P.Qq),o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:f,factory:f.\u0275fac})}}return f})()},5452:(In,Ze,M)=>{"use strict";M.d(Ze,{g:()=>P});var W=M(3746),o=M(7788);let P=(()=>{class b{constructor(S){this.scopeService=S,this.chapterChatEnabled=!1,this.networkChatEnabled=!1,this.scope=this.scopeService.getScope(),this.chapterChatEnabled=this.scope.currentChapter.settings.configurations?.chatChapterConfiguration?.ChatEnabled,this.networkChatEnabled=this.scope.network.settings.configurations.enableChat}canLoad(S,T){return this.canUseChat()}canActivateChild(S,T){return this.canUseChat()}canActivate(S,T){return this.canUseChat()}canUseChat(){return this.networkChatEnabled&&this.chapterChatEnabled||(window.location.href="/"),this.networkChatEnabled&&this.chapterChatEnabled}static{this.\u0275fac=function(T){return new(T||b)(o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})()},6078:(In,Ze,M)=>{"use strict";M.d(Ze,{_:()=>b});var W=M(3746),o=M(7788),P=M(6409);let b=(()=>{class f{constructor(T,y){this.http=T,this.scopeService=y,this.apiEndpoint="",this.scope=y.getScope(),this.apiEndpoint=this.scope.apiEndpoint}callClickServer(T,y,d){return this.http.get(`${this.apiEndpoint}${T}${y}${d?"/"+d:""}`).toPromise().catch(this.handleError)}post(T,y,d){return this.http.post(`${this.apiEndpoint}${T}${y}${d?"/"+d:""}`,{}).toPromise().catch(this.handleError)}handleError(T){return Promise.reject(T.message||T)}clickPremium(T,y){return this.callClickServer("click/premiumBanner/",T,y)}clickPremiumPost(T,y){return this.post("click/premiumBanner/",T,y)}clickAssetReference(T,y){return this.callClickServer("click/assetReference/",T,y)}clickDocument(T){return this.callClickServer("click/document/",T)}clickFile(T){return this.callClickServer("click/file/",T)}clickSpecial(T,y){return this.callClickServer("click/special/",T,y)}clickSpecialPost(T,y){return this.post("click/special/",T,y)}clickBanner(T,y){return this.callClickServer("click/banner/",T,y)}clickBannerPost(T,y){return this.post("click/banner/",T,y)}clickArticle(T,y){return this.callClickServer("click/article/",T,y)}clickSnip(T,y){return this.callClickServer("click/snip/",T,y)}clickSponsoredArticle(T,y){return this.callClickServer("click/sponsoredarticle/",T,y)}clickSuper(T,y){return this.callClickServer("click/superBanner/",T,y)}clickSuperPost(T,y){return this.post("click/superBanner/",T,y)}clickSurveyBanner(T){return this.callClickServer("click/surveyBanner/",T)}clickSurveyBannerPost(T,y){return this.post("click/surveyBanner/",T,y)}clickNotification(T){return this.callClickServer("click/notification/",T)}clickBreaking(T){return this.callClickServer("click/breaking/",T)}static{this.\u0275fac=function(y){return new(y||f)(o.KVO(P.Qq),o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})()},5634:(In,Ze,M)=>{"use strict";M.d(Ze,{q:()=>P});var W=M(3746),o=M(7788);let P=(()=>{class b{constructor(S){this.scopeService=S,this.isCordovaReady=!1,this.scope=this.scopeService.getScope(),document.addEventListener("deviceready",()=>{this.isCordovaReady=!0,this.cordova=window.cordova,console.log("Cordova is ready")},!1)}isCordovaAvailable(){return this.isCordovaReady&&this.cordova}openInAppBrowser(S){this.isCordovaReady&&this.cordova&&this.cordova.InAppBrowser?"android"===this.cordova.platformId&&S.isPdf?this.cordova.InAppBrowser.open("/Content/pdfview/web/?file="+S.uri,"_blank","location=yes,hidenavigationbuttons=yes,hideurlbar=yes,closebuttoncaption="+this.scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption")):this.cordova.InAppBrowser.open(S.uri,"_system","location=yes,closebuttoncaption="+this.scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption")):console.error("Cordova is not ready or InAppBrowser is not available")}static{this.\u0275fac=function(T){return new(T||b)(o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})()},242:(In,Ze,M)=>{"use strict";M.d(Ze,{E:()=>k});var W=M(9516),o=M(7788),P=M(6610);const b={UKNOWN:"Unknown"},f={CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",OPERA:"Opera",IE:"IE",MS_EDGE:"MS-Edge",MS_EDGE_CHROMIUM:"MS-Edge-Chromium",FB_MESSANGER:"FB-Messanger",SAMSUNG:"Samsung",UCBROWSER:"UC-Browser",UNKNOWN:b.UKNOWN},S={HTC:/HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel/,NEXUS_PHONE:/Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6/,DELL:/Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/,MOTOROLA:new RegExp("Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|\n      A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|\n      MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|\n      ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|\n      WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|\n      XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|\n      XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052"),SAMSUNG:new RegExp("\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|\n      GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|\n      GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|\n      GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|\n      GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|\n      GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|\n      GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|\n      GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|\n      GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|\n      GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|\n      GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|\n      GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|\n      GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|\n      GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|\n      GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|\n      GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|\n      GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|\n      GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|\n      SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|\n      SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|\n      SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|\n      SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|\n      SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|\n      SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|\n      SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|\n      SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|\n      SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|\n      SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|\n      SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|\n      SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|\n      SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|\n      SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|\n      SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|\n      SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|\n      SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|\n      SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|\n      SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|\n      SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|\n      SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|\n      SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|\n      SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|\n      SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|\n      SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|\n      SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|\n      SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|\n      SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|\n      SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|\n      SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|\n      SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|\n      GT-N7105|SCH-I535|SM-N900A|SM-N900T|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|\n      GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|\n      GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|\n      SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|\n      SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|\n      SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F"),LG:new RegExp("\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|\n      LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|\n      C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|\n      LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|\n      VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|\n      MS323|M257)"),SONY:/SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533/,ASUS:/Asus.*Galaxy|PadFone.*Mobile/,NOKIA_LUMIA:/Lumia [0-9]{3,4}/,MICROMAX:/Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b/,PALM:/PalmSource|Palm/,VERTU:/Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature/,PANTECH:new RegExp("PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|\n        IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|\n        IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|\n        CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|\n        P2000|P7040|P7000|C790"),FLY:/IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250/,WIKO:new RegExp("KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|\n        SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|\n        CINK KING|CINK PEAX|CINK SLIM|SUBLIM"),I_MOBILE:/i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)/,SIMVALLEY:/\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b/,WOLFGANG:/AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q/,ALCATEL:/Alcatel|Mobile; rv:49.0|Mobile; ALCATEL 4052R; rv:48.0/,NINTENDO:/Nintendo (3DS|Switch)/,AMOI:/Amoi/,INQ:/INQ/,VITA:/\bVita\b/,BLACKBERRY:/\bBlackBerry\b|\bBB10\b|rim[0-9]+/,FIREFOX_OS:/\bFirefox-OS\b/,IPHONE:/\biPhone\b/,iPod:/\biPod\b/,ANDROID:/\bAndroid\b/,WINDOWS_PHONE:/\bWindows-Phone\b/,GENERIC_PHONE:new RegExp("Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|\n        up.link|vodafone|\\bwap\\b|nokia|Nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser")},T={iPad:/iPad|iPad.*Mobile/,NexusTablet:/Android.*Nexus[\s]+(7|9|10)/,GoogleTablet:/Android.*Pixel C/,SamsungTablet:new RegExp("SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|\n        GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|\n        SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|\n        GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|\n        SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|\n        GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|\n        SHV-E230S|SHW-M180K|SHW-M180L|SM-T865|SM-T290|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|\n        SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|\n        GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T385M|SM-P585M|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|\n        SM-P601|SM-P605|SM-P615|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|\n        GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|\n        SM-T510|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|\n        SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T500|SM-T330|\n        SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|\n        SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|\n        SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|\n        SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|\n        SM-T719|SM-T725|SM-T813|SM-T819|SM-T580|SM-T590|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|\n        SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-P585Y|SM-X200|SM-T970"),Kindle:new RegExp("Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|\n        KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome        /[0-9.]+ (?!Mobile)"),SurfaceTablet:/Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)/,HPTablet:/HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10/,AsusTablet:new RegExp("^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|\n        TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|\n        Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|\n        ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|\n        ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b"),BlackBerryTablet:/PlayBook|RIM Tablet/,HTCtablet:/HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410/,MotorolaTablet:/xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617/,NookTablet:/Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2/,AcerTablet:new RegExp("Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|\n        W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\n        \\bA3-A20\\b|\\bA3-A30"),ToshibaTablet:/Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO/,LGTablet:/\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b/,FujitsuTablet:/Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b/,PrestigioTablet:new RegExp("PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|\n        PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|\n        PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|\n        PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|\n        PMT5887|PMT5001|PMT5002"),LenovoTablet:new RegExp("Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|\n        YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|\n        B8000|B8080)(-|)(FL|F|HV|H|)|TB-X606F|TB-X103F|TB-X304F|TB-X304L|TB-X704F|TB-8703F|Tab2A7-10F|TB2-X30L|TB-8504F"),DellTablet:/Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7/,YarvikTablet:new RegExp("Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|\n        TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|\n        TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|\n        TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|\n        TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b"),MedionTablet:/Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB/,ArnovaTablet:/97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2/,IntensoTablet:/INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004/,IRUTablet:/M702pro/,MegafonTablet:/MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b/,EbodaTablet:/E-Boda (Supreme|Impresspeed|Izzycomm|Essential)/,AllViewTablet:/Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)/,ArchosTablet:new RegExp("\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10|\n         Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b"),AinolTablet:/NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark/,NokiaLumiaTablet:/Lumia 2520/,SonyTablet:new RegExp("Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|\n        SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|\n        EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|\n        SGP612|SGP712"),PhilipsTablet:/\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b/,CubeTablet:/Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT/,CobyTablet:new RegExp("MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|\n        MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010"),MIDTablet:new RegExp("M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|\n        MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|\n        MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10"),MSITablet:new RegExp("MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|\n        Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b"),SMiTTablet:/Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)/,RockChipTablet:/Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A/,FlyTablet:/IQ310|Fly Vision/,bqTablet:new RegExp("Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|\n        Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus"),HuaweiTablet:new RegExp("MediaPad|MediaPad 7 Youth|MediaPad T3 10|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|\n        S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-W09|AGS-L09"),NecTablet:/\bN-06D|\bN-08D/,PantechTablet:/Pantech.*P4100/,BronchoTablet:/Broncho.*(N701|N708|N802|a710)/,VersusTablet:/TOUCHPAD.*[78910]|\bTOUCHTAB\b/,ZyncTablet:/z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900/,PositivoTablet:/TB07STA|TB10STA|TB07FTA|TB10FTA/,NabiTablet:/Android.*\bNabi/,KoboTablet:/Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build/,DanewTablet:/DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b/,TexetTablet:new RegExp("NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|\n        TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|\n        TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|\n        TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|\n        TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|\n        TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|\n        TB-436|TB-416|TB-146SE|TB-126SE"),PlaystationTablet:/Playstation.*(Portable|Vita)/,TrekstorTablet:/ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab/,PyleAudioTablet:/\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b/,AdvanTablet:new RegExp("Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|\n        T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b"),DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|\n        Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:/Android.*\bG1\b(?!\))/,MicromaxTablet:/Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b/,KarbonnTablet:/Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b/,AllFineTablet:/Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide/,PROSCANTablet:new RegExp("\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|\n        PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|\n        PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|\n        PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b"),YONESTablet:/BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026/,ChangJiaTablet:new RegExp("TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|\n        TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|\n        TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|\n        TPC10111|TPC10203|TPC10205|TPC10503"),GUTablet:/TX-A1301|TX-M9002|Q702|kf026/,PointOfViewTablet:new RegExp("TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|\n        TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|\n        TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|\n        TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10"),OvermaxTablet:new RegExp("OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|\n        MagicTab|Stream|TB-08|TB-09)|Qualcore 1027"),HCLTablet:/HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync/,DPSTablet:/DPS Dream 9|DPS Dual 7/,VistureTablet:/V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10/,CrestaTablet:/CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989/,MediatekTablet:/\bMT8125|MT8389|MT8135|MT8377\b/,ConcordeTablet:/Concorde([ ]+)?Tab|ConCorde ReadMan/,GoCleverTablet:new RegExp("GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|\n        TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|\n        GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|\n        TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|\n        TAB R104|TAB R83.3|TAB A1042"),ModecomTablet:new RegExp("FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|\n        FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|\n        FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003"),VoninoTablet:new RegExp("\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|\n        Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|\n        Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b"),ECSTablet:/V07OT2|TM105A|S10OT1|TR10CS1/,StorexTablet:/eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab/,VodafoneTablet:/SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497/,EssentielBTablet:/Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2/,RossMoorTablet:/RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711/,iMobileTablet:/i-mobile i-note/,TolinoTablet:/tolino tab [0-9.]+|tolino shine/,AudioSonicTablet:/\bC-22Q|T7-QC|T-17B|T-17P\b/,AMPETablet:/Android.* A78 /,SkkTablet:/Android.* (SKYPAD|PHOENIX|CYCLOPS)/,TecnoTablet:/TECNO P9|TECNO DP8D/,JXDTablet:new RegExp("Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|\n        S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|\n        P1000|P300|S18|S6600|S9100)\\b"),iJoyTablet:new RegExp("Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|\n        Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|\n        Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|\n        Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|\n        Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)"),FX2Tablet:/FX2 PAD7|FX2 PAD10/,XoroTablet:new RegExp("KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|\n        PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|\n        PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|\n        TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151"),ViewsonicTablet:/ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a/,VerizonTablet:/QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1/,OdysTablet:/LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10/,CaptivaTablet:/CAPTIVA PAD/,IconbitTablet:new RegExp("NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|\n        NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S"),TeclastTablet:new RegExp("T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\n        \\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\n        \\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\n        \\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\n        \\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\n        \\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\n        \\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\n        \\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\n        \\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi"),OndaTablet:new RegExp("\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|\n        V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|\n        V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|\n        Vi40)\\b[s]+|V10 \\b4G\\b"),JaytechTablet:/TPC-PA762/,BlaupunktTablet:/Endeavour 800NG|Endeavour 1010/,DigmaTablet:/\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b/,EvolioTablet:/ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b/,LavaTablet:/QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b/,AocTablet:/MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712/,MpmanTablet:new RegExp("MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\n        \\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|\n        MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010"),CelkonTablet:/CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b/,WolderTablet:new RegExp("miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|\n        POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|\n        FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b"),MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:/\bMI PAD\b|\bHM NOTE 1W\b/,NibiruTablet:/Nibiru M1|Nibiru Jupiter One/,NexoTablet:/NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI/,LeaderTablet:new RegExp("TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|\n        TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100"),UbislateTablet:/UbiSlate[\s]?7C/,PocketBookTablet:/Pocketbook/,KocasoTablet:/\b(TB-1207)\b/,HisenseTablet:/\b(F5281|E2371)\b/,Hudl:/Hudl HT7S3|Hudl 2/,TelstraTablet:/T-Hub2/,Honeywell:/RT10A/,GenericTablet:new RegExp("Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|\n        A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|\n        Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107")},y={BLACKBERRY:"Blackberry",FIREFOX_OS:"Firefox-OS",CHROME_BOOK:"Chrome-Book",WINDOWS_PHONE:"Windows-Phone",VITA:"Vita",PS4:"PS4",MAC:"Macintosh",CHROMECAST:"Chromecast",APPLE_TV:"Apple-TV",GOOGLE_TV:"Google-TV",ANDROID:"Android",Tesla:"Tesla",iPad:"iPad",IPHONE:"iPhone",iPod:"iPod",UNKNOWN:b.UKNOWN,HTC:"HTC",NEXUS_PHONE:"Nexus Phone",NexusTablet:"Nexus Tablet",DELL:"Dell",MOTOROLA:"Motorola",SAMSUNG:"Samsung",LG:"LG",SONY:"Sony",ASUS:"Asus",NOKIA_LUMIA:"Nokia Lumia",MICROMAX:"Micromax",PALM:"Palm",VERTU:"Vertu",PANTECH:"PANTECH",FLY:"Fly",WIKO:"WIKO",I_MOBILE:"i-mobile",SIMVALLEY:"Simvalley",WOLFGANG:"Wolfgang",ALCATEL:"Alcatel",HONEYWELL:"Honeywell",NINTENDO:"Nintendo",AMOI:"Amoi",INQ:"INQ",GENERIC_PHONE:"Generic Phone",MI_SE_9:"Mi SE 9"},d=[y.PS4,y.CHROME_BOOK,y.MAC,y.DELL,y.ASUS,y.UNKNOWN],c={WINDOWS:"Windows",MAC:"Mac",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNIX:"Unix",FIREFOX_OS:"Firefox-OS",CHROME_OS:"Chrome-OS",WINDOWS_PHONE:"Windows-Phone",UNKNOWN:b.UKNOWN},s={WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",MACOSX_11_0:"mac-os-x-11-0",MACOSX_16:"mac-os-x-16",MACOSX_15:"mac-os-x-15",MACOSX_14:"mac-os-x-14",MACOSX_13:"mac-os-x-13",MACOSX_12:"mac-os-x-12",MACOSX_11:"mac-os-x-11",MACOSX_10:"mac-os-x-10",MACOSX_9:"mac-os-x-9",MACOSX_8:"mac-os-x-8",MACOSX_7:"mac-os-x-7",MACOSX_6:"mac-os-x-6",MACOSX_5:"mac-os-x-5",MACOSX_4:"mac-os-x-4",MACOSX_3:"mac-os-x-3",MACOSX_2:"mac-os-x-2",MACOSX:"mac-os-x",iOS:"iOS",ANDROID_9:"android-9",UNKNOWN:b.UKNOWN.toLowerCase()},a={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/\bWindows Phone\b/}]},ANDROID:{and:[/\bAndroid\b/,{not:/\bWindows Phone\b/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={...S,...T,...a,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,CHROMECAST:/\bCrKey\b/,APPLE_TV:/^iTunes-AppleTV\/4.1$/,GOOGLE_TV:/\bGoogleTV\b/,Tesla:/Tesla\/([0-9]{4}.[0-9]{1,2}.?[0-9]{0,2}.?[0-9]{0,2})-(.{7})/,MI_SE_9:/\bXiaomi\b/,MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]}},g={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]},MACOSX:/(MAC OS X\s*[^ 0-9])/,MACOSX_3:/(Darwin 10.3|Mac OS X 10.3)/,MACOSX_4:/(Darwin 10.4|Mac OS X 10.4)/,MACOSX_5:/(Mac OS X 10.5)/,MACOSX_6:/(Mac OS X 10.6)/,MACOSX_7:/(Mac OS X 10.7)/,MACOSX_8:/(Mac OS X 10.8)/,MACOSX_9:/(Mac OS X 10.9)/,MACOSX_10:/(Mac OS X 10.10)/,MACOSX_11:/(Mac OS X 10.11)/,MACOSX_12:/(Mac OS X 10.12)/,MACOSX_13:/(Mac OS X 10.13)/,MACOSX_14:/(Mac OS X 10.14)/,MACOSX_15:/(Mac OS X 10.15)/,MACOSX_16:/(Mac OS X 10.16)/,MACOSX_11_0:{or:[/11_0 like Mac OS X/,/Mac OS X 11/]},iOS:/(iPhone OS\s*[0-9_]+)/,ANDROID_9:/(Android 9)/},_={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/,/\bHeadlessChrome\/([\d\.]+)\b/],FIREFOX:[/\bFirefox\/([\d\.]+)\b/,/\bFxiOS\/([\d\.]+)\b/],SAFARI:[/\bVersion\/([\d\.]+)\b/,/\bSafari\/([\d\.]+)\b/],OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdg(?:e|A|iOS)\/([\d\.]+)\b/,MS_EDGE_CHROMIUM:/\bEdg\/([\d\.]+)\b/,SAMSUNG:/\bSamsungBrowser\/([\d\.]+)\b/,UCBROWSER:/\bUCBrowser\/([\d\.]+)\b/},x=Object.keys(g).reduce((U,B)=>(U[B]=g[B],U),{}),w=Object.keys(_).reduce((U,B)=>(U[f[B]]=_[B],U),{});var D=Object.freeze({__proto__:null,BROWSERS:f,BROWSERS_RE:{CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/,/\bHeadlessChrome\b/]},{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},FIREFOX:{or:[/\bFirefox\b/,/\bFxiOS\b/]},SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bWindows Phone\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/,/^Mozilla\/5\.0 \(Windows NT 10\.0; Win64; x64\)$/]},MS_EDGE:{or:[/\bEdg(e|A|iOS)\b/]},MS_EDGE_CHROMIUM:/\bEdg\/\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/,FB_MESSANGER:/\bFBAN\/MessengerForiOS\b/,SAMSUNG:/\bSamsungBrowser\b/,UCBROWSER:/\bUCBrowser\b/},BROWSER_VERSIONS_RE:w,BROWSER_VERSIONS_RE_MAP:_,DESKTOP_DEVICES:d,DEVICES:y,DEVICES_RE:h,GENERAL:b,MOBILES_RE:S,OS:c,OS_RE:a,OS_VERSIONS:s,OS_VERSIONS_RE:x,OS_VERSIONS_RE_MAP:g,TABLETS_RE:T});class C{constructor(){}test(B,K){return"string"==typeof K&&(K=new RegExp(K)),K instanceof RegExp?K.test(B):K&&Array.isArray(K.and)?K.and.every(J=>this.test(B,J)):K&&Array.isArray(K.or)?K.or.some(J=>this.test(B,J)):!(!K||!K.not||this.test(B,K.not))}exec(B,K){return"string"==typeof K&&(K=new RegExp(K)),K instanceof RegExp?K.exec(B):K&&Array.isArray(K)?K.reduce((J,ie)=>J||this.exec(B,ie),null):null}}var I=function(U){return U.Mobile="mobile",U.Tablet="tablet",U.Desktop="desktop",U.Unknown="unknown",U}(I||{}),L=function(U){return U.Portrait="portrait",U.Landscape="landscape",U}(L||{});const N="iPad";let G=(()=>{class U{constructor(K){this.platformId=K,this.ua="",this.userAgent="",this.os="",this.browser="",this.device="",this.os_version="",this.browser_version="",this.reTree=new C,this.deviceType="",this.orientation="",(0,P.UE)(this.platformId)&&typeof window<"u"&&(this.userAgent=window.navigator.userAgent),this.setDeviceInfo(this.userAgent)}setDeviceInfo(K=this.userAgent){K!==this.userAgent&&(this.userAgent=K);const J=[{const:"OS",prop:"os"},{const:"BROWSERS",prop:"browser"},{const:"DEVICES",prop:"device"},{const:"OS_VERSIONS",prop:"os_version"}];if(J.forEach(ie=>{this[ie.prop]=Object.keys(D[ie.const]).reduce((re,q)=>"device"===D[ie.const][q]&&(0,P.UE)(this.platformId)&&(this.reTree.test(this.userAgent,T[N])||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)?(re[D[ie.const][q]]=N,Object):(re[D[ie.const][q]]=this.reTree.test(K,D[`${ie.const}_RE`][q]),re),{})}),J.forEach(ie=>{this[ie.prop]=Object.keys(D[ie.const]).map(re=>D[ie.const][re]).reduce((re,q)=>"device"===ie.prop&&re===D[ie.const].ANDROID?this[ie.prop][q]?q:re:re===D[ie.const].UNKNOWN&&this[ie.prop][q]?q:re,D[ie.const].UNKNOWN)}),this.browser_version="0",this.browser!==f.UNKNOWN){const re=this.reTree.exec(K,w[this.browser]);re&&(this.browser_version=re[1])}this.orientation=typeof window<"u"&&window.matchMedia?window.matchMedia("(orientation: landscape)").matches?L.Landscape:L.Portrait:b.UKNOWN,this.deviceType=this.isTablet()?I.Tablet:this.isMobile(this.userAgent)?I.Mobile:this.isDesktop(this.userAgent)?I.Desktop:I.Unknown}getDeviceInfo(){return{userAgent:this.userAgent,os:this.os,browser:this.browser,device:this.device,os_version:this.os_version,browser_version:this.browser_version,deviceType:this.deviceType,orientation:this.orientation}}isMobile(K=this.userAgent){return!this.isTablet(K)&&!!Object.keys(S).find(ie=>this.reTree.test(K,S[ie]))}isTablet(K=this.userAgent){return!(!(0,P.UE)(this.platformId)||!(this.reTree.test(this.userAgent,T[N])||typeof navigator<"u"&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1))||!!Object.keys(T).find(ie=>!!this.reTree.test(K,T[ie]))}isDesktop(K=this.userAgent){return(this.device!==y.UNKNOWN||!this.isMobile(K)&&!this.isTablet(K))&&d.indexOf(this.device)>-1}static{this.\u0275fac=function(J){return new(J||U)(o.KVO(o.Agw))}}static{this.\u0275prov=o.jDH({token:U,factory:U.\u0275fac,providedIn:"root"})}}return U})(),k=(()=>{class U{constructor(K){this.deviceService=K,this.deviceInfo=null,this.userAgentsApp={merkurist:"Merkurist_IAB",apicodo:"Apicodo_IAB"},this.UserAgentRegex={AppMerkurist:new RegExp(`${this.userAgentsApp.merkurist}`),AppApicodo:new RegExp(`${this.userAgentsApp.apicodo}`),Ios:/iPhone|iPad|iPod/i,Android:/Android/i,Safari:/Safari/i,ChromeIos:/CriOS/i,FirefoxIos:/FxiOS/i,EdgeIos:/EdgiOS/i},this.userAgentInfo=this.detectUserAgent()}detectUserAgent(){let K=navigator.userAgent;const J=K.includes("Macintosh")&&"ontouchend"in document,ie=this.UserAgentRegex.AppMerkurist.test(K)||this.UserAgentRegex.AppApicodo.test(K),re="iOS"===this.deviceService.os||J,q="Android"===this.deviceService.os,Y=q?parseFloat((window.navigator.userAgent.match("Android ([0-9.]+)")||[])[1]):-1,Z=this.UserAgentRegex.ChromeIos.test(K),Q=this.UserAgentRegex.FirefoxIos.test(K),te=this.UserAgentRegex.EdgeIos.test(K),pe=this.UserAgentRegex.Safari.test(K)&&!Z&&!Q&&!te;return{isApp:ie,isAndroid:q,androidVersion:Y,isIos:re,isSafari:pe,isChromeIos:Z,isFireFoxIos:Q,isEdgeIos:te,isOtherBrowser:!(pe||Z||Q||te),isOtherDevice:!ie&&!re&&!q,isMobile:this.deviceService.isMobile(),isTablet:this.deviceService.isTablet(),isDesktop:this.deviceService.isDesktop(),appVersion:K.replace(/.*\[.*_IAB\/(.*)\]/gi,function(be,ve){return ve}),appPlatform:q?W.Y.Android:W.Y.iOS}}getUserAgentInfo(){return this.userAgentInfo}static{this.\u0275fac=function(J){return new(J||U)(o.KVO(G))}}static{this.\u0275prov=o.jDH({token:U,factory:U.\u0275fac,providedIn:"root"})}}return U})()},1023:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>b});var W=M(3746),o=M(7788),P=M(6409);let b=(()=>{class f{constructor(T,y){this.http=T,this.scopeService=y,this.scope=y.getScope()}saveSettings(T){return this.http.post(this.scopeService.getScope().apiEndpoint+"globalUserSettings/chapter/chat",T).toPromise()}getSettings(){return this.http.get(this.scopeService.getScope().apiEndpoint+"globalUserSettings/chapter/chat").toPromise()}static{this.\u0275fac=function(y){return new(y||f)(o.KVO(P.Qq),o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:f,factory:f.\u0275fac})}}return f})()},5626:(In,Ze,M)=>{"use strict";M.d(Ze,{o:()=>S});var W=M(8892),o=M(2198),P=M(5793),b=M(683),f=M(7788);let S=(()=>{class T{constructor(d,c){this.router=d,this.upgrade=c,this.currentRoute$=new P.t({angularRoute:"",angularJsState:"",fromAngularJs:!1}),this.switchState=(s,a)=>{this.upgrade.injector.get("$rootScope").$state.go(s,a)},this.trackAngularRouteChanges()}trackAngularRouteChanges(){this.router.events.pipe((0,b.p)(d=>d instanceof W.wF)).subscribe(d=>{this.currentRoute$.next({angularRoute:d.urlAfterRedirects,angularJsState:this.currentRoute$.value.angularJsState,fromAngularJs:!1})})}trackAngularJsStateChange(d){this.currentRoute$.next({angularRoute:this.currentRoute$.value.angularRoute,angularJsState:d,fromAngularJs:!0})}getCurrentRouteState(){return this.currentRoute$.value}getRouteState$(){return this.currentRoute$.asObservable()}triggerApplyInAngularJs(){try{const c=this.upgrade.injector.get("$rootScope");c?c.$apply():console.error("AngularJS $rootScope not found.")}catch(d){console.error("Error accessing AngularJS services:",d)}}static{this.\u0275fac=function(c){return new(c||T)(f.KVO(W.Ix),f.KVO(o.be))}}static{this.\u0275prov=f.jDH({token:T,factory:T.\u0275fac,providedIn:"root"})}}return T})()},8375:(In,Ze,M)=>{"use strict";M.d(Ze,{S:()=>d});var W=M(8189),o=M(5574),P=M(6343),b=M(6284),f=M(3746),S=M(2198),T=M(7788),y=M(7543);let d=(()=>{class c{constructor(a,u,h){this.upgrade=a,this.scope=u,this.auth=h,this._hubConnection=null,this.SignalrHubUrl="http://localhost:5269/hub/notificationHub",this.isConnected=!1,this.sourceTimes=(0,b.Y)(5e3),this.isConnectedSource=new P.B7,this.isConnected$=this.isConnectedSource.asObservable(),this.lastTime=(new Date).getTime(),this.acceptableDelta=2500,this.isSuspended=!1,this.isResumedSource=new P.B7,this.isResumed$=this.isResumedSource.asObservable(),this.SignalrHubUrl=this.scope.getScope().globalSettings.configurations.chatServerConfig.baseUrl+"hub/notificationHub",this._hubConnection=(new W.$).withUrl(this.SignalrHubUrl,{accessTokenFactory:()=>this.auth.getToken()}).withAutomaticReconnect().configureLogging(o.$.None).build(),this._hubConnection.start().then(()=>{this.isConnected=!0,this.isConnectedSource.next(!0)}).catch(g=>{this.isConnected=!1,this.isConnectedSource.next(!1)}),this._hubConnection.onclose(g=>{this.isConnected=!1,this.isConnectedSource.next(!1)}),this._hubConnection.onreconnected(()=>{this.isConnected=!0,this.isConnectedSource.next(!0)}),this.subs=this.sourceTimes.subscribe(g=>{if(this.isConnected)try{this._hubConnection?.send("ping")}catch{this._hubConnection?.start().then(()=>{this.isConnected=!0,this.isConnectedSource.next(!0)})}const _=(new Date).getTime();_-this.lastTime>7500?(this.isSuspended=!0,setTimeout(()=>{this.isResumedSource.next(!0)},0)):this.isSuspended=!1,this.lastTime=_})}triggerApplyInAngularJs(){try{const u=this.upgrade.injector.get("$rootScope");u?u.$apply():console.error("AngularJS $rootScope not found.")}catch(a){console.error("Error accessing AngularJS services:",a)}}static{this.\u0275fac=function(u){return new(u||c)(T.KVO(S.be),T.KVO(f.A),T.KVO(y.u))}}static{this.\u0275prov=T.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})()},3554:(In,Ze,M)=>{"use strict";M.d(Ze,{j:()=>N});var W=M(8556),o=M(7025),P=M(1986),b=M(7180),S=M(954),T=M(2457),y=M(7469);M(2559);const c={leading:!0,trailing:!1};class g{constructor(k,U,B,K){this.duration=k,this.scheduler=U,this.leading=B,this.trailing=K}call(k,U){return U.subscribe(new _(k,this.duration,this.scheduler,this.leading,this.trailing))}}class _ extends T.v{constructor(k,U,B,K,J){super(k),this.duration=U,this.scheduler=B,this.leading=K,this.trailing=J,this._hasTrailingValue=!1,this._trailingValue=null}_next(k){this.throttled?this.trailing&&(this._trailingValue=k,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(x,this.duration,{subscriber:this})),this.leading?this.destination.next(k):this.trailing&&(this._trailingValue=k,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const k=this.throttled;k&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),k.unsubscribe(),this.remove(k),this.throttled=null)}}function x(G){const{subscriber:k}=G;k.clearThrottle()}class D{constructor(k,U){this.dueTime=k,this.scheduler=U}call(k,U){return U.subscribe(new C(k,this.dueTime,this.scheduler))}}class C extends T.v{constructor(k,U,B){super(k),this.dueTime=U,this.scheduler=B,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(k){this.clearDebounce(),this.lastValue=k,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(I,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:k}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(k)}}clearDebounce(){const k=this.debouncedSubscription;null!==k&&(this.remove(k),k.unsubscribe(),this.debouncedSubscription=null)}}function I(G){G.debouncedNext()}var L=M(7788);let N=(()=>{class G{constructor(U){this.images=[],this.offset=100,this.renderer=U.createRenderer(null,null)}isElementInView(U){const B=U.getBoundingClientRect(),K=window.innerHeight||document.documentElement.clientHeight,J=window.innerWidth||document.documentElement.clientWidth;return B.top>=0&&B.left>=0&&B.bottom<=K+this.offset&&B.right<=J+this.offset}addImage(U,B){this.images.push({elem:U,src:B}),this.loadImages()}removeImage(U){this.images=this.images.filter(B=>B.elem!==U)}loadImages(){this.images.forEach((U,B)=>{this.isElementInView(U.elem.nativeElement)&&(this.loadImage(U.elem,U.src),this.images.splice(B,1))})}loadImage(U,B){const K=new Image;K.src=B,K.onload=()=>{this.renderer.setAttribute(U.nativeElement,"src",B),this.successClass&&this.renderer.addClass(U.nativeElement,this.successClass)},K.onerror=()=>{this.errorClass&&this.renderer.addClass(U.nativeElement,this.errorClass)}}observeScroll(){return function f(...G){let k=Number.POSITIVE_INFINITY,U=null,B=G[G.length-1];return(0,o.m)(B)?(U=G.pop(),G.length>1&&"number"==typeof G[G.length-1]&&(k=G.pop())):"number"==typeof B&&(k=G.pop()),null===U&&1===G.length&&G[0]instanceof W.c?G[0]:(0,P.U)(k)((0,b.c)(G,U))}((0,S.R)(window,"scroll").pipe(function h(G,k=y.b,U=c){return B=>B.lift(new g(G,k,U.leading,U.trailing))}(30)),(0,S.R)(window,"resize").pipe(function w(G,k=y.b){return U=>U.lift(new D(G,k))}(60)))}static{this.\u0275fac=function(B){return new(B||G)(L.KVO(L._9s))}}static{this.\u0275prov=L.jDH({token:G,factory:G.\u0275fac,providedIn:"root"})}}return G})()},353:(In,Ze,M)=>{"use strict";M.d(Ze,{X:()=>b});var W=M(3746),o=M(7788),P=M(6610);let b=(()=>{class f{constructor(T,y){this.location=T,this.scopeService=y,this.getEditorIconUrl=()=>`${this.logoUrl}/default/icon/editor.ico`,this.getPartnerLogoUrl=d=>(d=d||this.scope.currentScope.chapter)&&d.partner?.settings?.partnerLogoCache?`${this.logoUrl}/partner/${d.partnerId}.png?cache=${d.partner.settings.partnerLogoCache}`:`${this.logoUrl}/default/partner/0.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.getNetworkIconSmallUrl=d=>(d=d||this.scope.currentScope.network)&&d.settings?.networkIconSmallCache?`${this.logoUrl}/${d.slug}/icon/small.ico`:`${this.logoUrl}/default/icon/small.ico`,this.getNetworkIconBigUrl=d=>(d=d||this.scope.currentScope.network)&&d.settings?.networkIconBigCache?`${this.logoUrl}/${d.slug}/icon/big.png?cache=${d.settings.networkIconBigCache}`:`${this.logoUrl}/default/icon/big.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.getNetworkLogoUrl=d=>(d=d||this.scope.currentScope.network)&&d.settings?.networkLogoCache?`${this.logoUrl}/${d.slug}.png?cache=${d.settings.networkLogoCache}`:`${this.logoUrl}/default/0.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.getNetworkLogoDarkUrl=d=>(d=d||this.scope.currentScope.network)?d.settings?.networkLogoDarkCache?`${this.logoUrl}/${d.slug}-dark.png?cache=${d.settings.networkLogoDarkCache}`:d.settings?.networkLogoCache?`${this.logoUrl}/${d.slug}.png?cache=${d.settings.networkLogoCache}`:`${this.logoUrl}/default/0-dark.png?cache=${this.scope.globalSettings.defaultLogoCache}`:`${this.logoUrl}/default/0-dark.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.getChapterLogoUrl=d=>(d=d||this.scope.currentScope.chapter)&&d.settings?.chapterLogoCache?`${this.logoUrl}/chapter/logo/${d.slug}?cache=${d.settings.chapterLogoCache}`:`${this.logoUrl}/default/0.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.getChapterLogoDarkUrl=d=>(d=d||this.scope.currentScope.chapter)?d.settings?.chapterLogoDarkCache?`${this.logoUrl}/chapter/logo/${d.slug}-dark?cache=${d.settings.chapterLogoDarkCache}`:d.settings?.chapterLogoCache?`${this.logoUrl}/chapter/logo/${d.slug}?cache=${d.settings.chapterLogoCache}`:`${this.logoUrl}/default/0-dark.png?cache=${this.scope.globalSettings.defaultLogoDarkCache}`:`${this.logoUrl}/default/0-dark.png?cache=${this.scope.globalSettings.defaultLogoDarkCache}`,this.getChapterPictureUrl=d=>(d=d||this.scope.currentScope.chapter)&&d.settings?.chapterPictureCache?`${this.logoUrl}/chapter/picture/${d.slug}?cache=${d.settings.chapterPictureCache}`:`${this.logoUrl}/default/chapter/0.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.getChapterEventPictureUrl=d=>(d=d||this.scope.currentScope.chapter)&&d.settings?.configurations?.chapterEventPictureCache?`${this.logoUrl}/chapter/event/${d.slug}?cache=${d.settings.configurations.chapterEventPictureCache}`:`${this.logoUrl}/default/event/1.png?cache=${this.scope.globalSettings.defaultLogoCache}`,this.hasChapterLogo=d=>(d=d||this.scope.currentScope.chapter,!!d.settings?.chapterLogoCache),this.hasChapterLogoDark=d=>this.hasChapterLogo(d)||!!d.settings?.chapterLogoDarkCache,this.getLogoContainerUrl=()=>this.logoUrl,this.scope=this.scopeService.getScope(),this.logoUrl=`${this.scope.globalSettings.blobStorageCdnUrl}/${this.scope.globalSettings.blobStorageContainerNameLogo}`}static{this.\u0275fac=function(y){return new(y||f)(o.KVO(P.aZ),o.KVO(W.A))}}static{this.\u0275prov=o.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})()},275:(In,Ze,M)=>{"use strict";M.d(Ze,{P:()=>f});var W=M(6409),o=M(3746),P=M(7788),b=M(6449);let f=(()=>{class S{constructor(y,d,c){this.http=y,this.authService=d,this.scopeService=c,this.apiBaseUrl="",this.apicodoMediaConnectionData={},this.scope=c.getScope(),this.apiBaseUrl=this.scope.globalSettings.configurations.apicodoMediaBaseUrl}getConnectionData(y){const d=y||"default";if(this.apicodoMediaConnectionData[d]&&this.apicodoMediaConnectionData[d].expiresOn>Date.now())return Promise.resolve(this.apicodoMediaConnectionData[d]);{let c=this.scope.apiEndpoint+"media/token";return y&&(c+=`?originNetworkSlug=${y}`),this.http.get(c).toPromise().then(s=>(this.apicodoMediaConnectionData[d]=s,this.apicodoMediaConnectionData[d].isInitialized=!0,this.apicodoMediaConnectionData[d].expiresOn=Date.now()+36e5,s)).catch(this.handleError)}}getVideoData(y,d){return console.log(`Video id: ${y}`),this.getConnectionData(d).then(c=>{const s=new W.Lr({Authorization:`Bearer ${c.token}`});return this.http.get(`${this.apiBaseUrl}/api/Thumbnail/GetWebFrontendData?fileId=${y}`,{headers:s}).toPromise().then(a=>a).catch(this.handleError)})}handleError(y){return console.error("An error occurred",y),Promise.reject(y.message||y)}static{this.\u0275fac=function(d){return new(d||S)(P.KVO(W.Qq),P.KVO(b.u),P.KVO(o.A))}}static{this.\u0275prov=P.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}}return S})()},7473:(In,Ze,M)=>{"use strict";M.d(Ze,{R:()=>f});var W=M(6610),o=M(3746),P=M(7788),b=M(353);let f=(()=>{class S{constructor(y,d,c,s){this.location=y,this.scopeService=d,this.logoService=c,this.document=s,this.scope=this.scopeService.getScope()}setMetaName(y,d){const c=y.replace(":","\\:"),s=this.document.querySelector(`meta[name='${c}']`);if(d||(d=""),s)s.getAttribute("content")!==d&&s.setAttribute("content",d);else{const a=this.document.createElement("meta");a.name=y,a.content=d.replace('"',"&quot;"),this.document.head.appendChild(a)}}setMetaProperty(y,d){const c=y.replace(":","\\:"),s=this.document.querySelector(`meta[property='${c}']`);if(d||(d=""),s)s.getAttribute("content")!==d&&s.setAttribute("content",d);else{const a=this.document.createElement("meta");a.setAttribute("property",y),a.content=d.replace('"',"&quot;"),this.document.head.appendChild(a)}}setFavicon(y){const d=this.document.querySelector('link[rel="shortcut icon"]');d&&d.setAttribute("href",y?this.logoService.getEditorIconUrl():this.logoService.getNetworkIconSmallUrl())}removeMeta(y){const d=y.replace(":","\\:");this.document.querySelectorAll(`meta[name='${d}'], meta[property='${d}'], link[rel='canonical']`).forEach(s=>s.remove())}setDefault(){this.setMetaName("author",this.scope.currentScope.network.name),this.setMetaName("date",(new Date).toISOString()),this.setMetaProperty("og:type","website"),this.setMetaProperty("og:image",this.logoService.getNetworkLogoUrl()+"&preset=social-media"),this.setMetaName("twitter:image:src",this.logoService.getNetworkLogoUrl()+"&preset=social-media"),this.removeMeta("article:publisher"),this.removeMeta("article:published_time"),this.removeMeta("article:section")}stateChanged(y){y&&this.setDefault()}push(y,d){this.setDefault();const c=this.scopeService.getNetworkUrl();this.setMetaProperty("og:url",c+this.location.path()),this.document.title=y,this.setMetaProperty("og:title",y),this.setMetaName("twitter:title",y),this.setMetaName("description",d),this.setMetaProperty("og:description",d),this.setMetaName("twitter:description",d)}generalPush(y){if(!y)return;this.document.title=y.title??"";const d=this.scopeService.getNetworkUrl();if(y.canonicalLink){let c=this.document.querySelector('link[rel="canonical"]');c?c.getAttribute("href")!==y.canonicalLink&&c.setAttribute("href",y.canonicalLink):(c=this.document.createElement("link"),c.setAttribute("rel","canonical"),c.setAttribute("href",y.canonicalLink??""),this.document.head.appendChild(c))}this.setMetaProperty("og:type",y.type??""),this.setMetaProperty("og:title",y.title??""),this.setMetaProperty("og:url",d+y.path),this.setMetaProperty("og:description",y.description??""),this.setMetaProperty("og:image",y.imageUrl??""),this.setMetaName("twitter:title",y.title??""),this.setMetaName("description",y.description??""),this.setMetaName("twitter:description",y.description??""),this.setMetaName("author",y.getFullAuthorName?.()??""),this.setMetaName("date",y.getMetaDate?.()??""),this.setMetaName("twitter:site",this.scope.currentScope.chapter.settings.seoTwitterSite??""),this.setMetaName("twitter:image:src",y.imageUrl??""),y.removeAttributes&&y.removeAttributes.forEach(c=>{this.removeMeta(c)}),"article"===y.type?(this.document.head.setAttribute("prefix","og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"),this.setMetaProperty("article:publisher",this.scope.currentScope.chapter.settings.seoFacebookPublisher??""),this.setMetaProperty("article:published_time",y.getMetaDate?.()??"")):this.document.head.setAttribute("prefix","og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#")}static{this.\u0275fac=function(d){return new(d||S)(P.KVO(W.aZ),P.KVO(o.A),P.KVO(b.X),P.KVO(W.qQ))}}static{this.\u0275prov=P.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}}return S})()},1356:(In,Ze,M)=>{"use strict";M.d(Ze,{J:()=>f});var W=M(3746),o=M(8786),P=M(7788),b=M(6409);let f=(()=>{class S{constructor(y,d){this.http=y,this.scopeService=d,this.lastNotificationsRequestTime=0,this.minNotificationsInterval=9e4,this.cachedNotifications=null,this.pendingGetNotificationsRequest=null,this.lastUpdateUnseenCount=null,this.updateUnseenCountPromise=null,this.minUpdateUnseenCountInterval=6e4,this.cachedUnseenCountData=null,this.unClickedMessage=!1,this.unseenCount=0,this.lastUpdate=null,this.updatePromise=null,this.minInterval=3e4,this.cachedData=null,this.scope=this.scopeService.getScope()}updateToken(y){return this.http.post(`${this.scope.apiEndpoint}Notifications/Token`,y).toPromise()}getNotificationGroups(y){return this.http.get(`${this.scope.apiEndpoint}Notifications/Groups/${y}`).toPromise().catch(d=>null)}getUserEmail(y){return this.http.get(`${this.scope.apiEndpoint}Notifications/${y}/email`).toPromise().catch(d=>null)}updateNotificationGroups(y,d){return this.http.post(`${this.scope.apiEndpoint}Notifications/Groups`,{notificationGroups:y,privateUserGuid:d}).toPromise()}click(y){return this.http.get(`${this.scope.apiEndpoint}notifications/${y.id}/Click`).toPromise().then(()=>{this.cachedNotifications&&(this.cachedNotifications=this.cachedNotifications.map(d=>d.id===y.id?{...d,clicked:Date.now()}:d))})}markAllAsClicked(){return this.http.post(`${this.scope.apiEndpoint}notifications/MarkAllAsClicked`,{}).pipe((0,o.M)(()=>{this.cachedNotifications&&(this.cachedNotifications=this.cachedNotifications.map(y=>null===y.clicked?{...y,clicked:Date.now()}:(this.unClickedMessage=!1,y)))}))}getNotifiedUsersCount(){return this.http.get(`${this.scope.apiEndpoint}notifications/NotifiedUserCount`).toPromise().catch(y=>null)}getNotifications(){const y=(new Date).getTime();return y-this.lastNotificationsRequestTime<this.minNotificationsInterval&&null!==this.cachedNotifications?Promise.resolve(this.cachedNotifications):(null!==this.pendingGetNotificationsRequest||(this.lastNotificationsRequestTime=y,this.pendingGetNotificationsRequest=this.http.get(`${this.scope.apiEndpoint}notifications`,{observe:"response"}).toPromise().then(c=>(this.cachedNotifications=c.body,c.body)).catch(c=>null)),this.pendingGetNotificationsRequest)}updateUnseenCount(){const y=(new Date).getTime();if(y-(this.lastUpdateUnseenCount||0)<this.minUpdateUnseenCountInterval){if(null!==this.cachedUnseenCountData)return Promise.resolve(this.cachedUnseenCountData);if(null!==this.updateUnseenCountPromise)return this.updateUnseenCountPromise}return this.updateUnseenCountPromise=this.http.put(`${this.scope.apiEndpoint}notifications/unseenCount`,{}).toPromise().then(c=>(this.unseenCount=0,window.cordova&&window.cordova.plugins.notification.badge&&window.cordova.plugins.notification.badge.set(0),this.cachedUnseenCountData=c,this.lastUpdateUnseenCount=y,c)).catch(c=>null),this.updateUnseenCountPromise}update(y){if((new Date).getTime()-(this.lastUpdate||0)<this.minInterval){if(null!==this.cachedData)return Promise.resolve(this.cachedData);if(null!==this.updatePromise)return this.updatePromise}return y&&(this.lastUpdate=null,this.unseenCount=0),this.updatePromise=this.http.get(`${this.scope.apiEndpoint}notifications/unseenCount?date=${this.lastUpdate}`).toPromise().then(a=>(this.lastUpdate||(this.unseenCount=0),this.unseenCount=a.unseenCount,this.lastUpdate=a.date,window.cordova&&window.cordova.plugins.notification.badge&&window.cordova.plugins.notification.badge.set(0),this.cachedData=a,this.unClickedMessage=a.anyUnClickedMessages,a)).catch(a=>null),this.updatePromise}static{this.\u0275fac=function(d){return new(d||S)(P.KVO(b.Qq),P.KVO(W.A))}}static{this.\u0275prov=P.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}}return S})()},2385:(In,Ze,M)=>{"use strict";M.d(Ze,{O:()=>f});var W=M(7788),o=M(827);const P=["popupContent"];let b=(()=>{class S{constructor(){this.title="Popup",this.width=400,this.height="auto",this.componentBindings={}}ngOnInit(){this.contentComponent&&this.loadComponent()}ngOnDestroy(){this.componentRef&&this.componentRef.destroy()}loadComponent(){this.popupContent.clear(),this.componentRef=this.popupContent.createComponent(this.contentComponent),Object.assign(this.componentRef.instance,this.componentBindings)}onClose(){}static{this.\u0275fac=function(d){return new(d||S)}}static{this.\u0275cmp=W.VBU({type:S,selectors:[["app-apicodo-popup-wrapper"]],viewQuery:function(d,c){if(1&d&&W.GBs(P,7,W.c1b),2&d){let s;W.mGM(s=W.lsd())&&(c.popupContent=s.first)}},inputs:{title:"title",width:"width",height:"height",contentComponent:"contentComponent",componentBindings:"componentBindings"},decls:3,vars:5,consts:[["popupContent",""],[3,"onHiding","visible","title","showTitle","width","height"]],template:function(d,c){if(1&d){const s=W.RV6();W.j41(0,"dx-popup",1),W.bIt("onHiding",function(){return W.eBV(s),W.Njj(c.onClose())}),W.nrm(1,"div",null,0),W.k0s()}2&d&&W.Y8G("visible",!0)("title",c.title)("showTitle",!1)("width",c.width)("height",c.height)},dependencies:[o.i]})}}return S})(),f=(()=>{class S{constructor(y){this.appRef=y,this.componentReferences=[]}closeAll(){this.componentReferences.forEach(y=>{this.closePopup(y.componentRef,y.domElement)}),this.componentReferences=[]}closeLast(){let y=this.componentReferences.pop();y&&this.closePopup(y.componentRef,y.domElement)}openPopup(y,d="default"){const c=document.createElement("div");document.body.appendChild(c);const s=(0,W.a0P)(b,{environmentInjector:this.appRef.injector});return this.appRef.attachView(s.hostView),c.appendChild(s.hostView.rootNodes[0]),s.instance.title=y.title,s.instance.width=y.width,s.instance.height=y.height||"auto",s.instance.contentComponent=y.component,s.instance.componentBindings=y.data,this.componentReferences.push({name:d,componentRef:s,domElement:c}),s}closePopup(y,d){this.appRef.detachView(y.hostView),y.destroy(),document.body.removeChild(d)}static{this.\u0275fac=function(d){return new(d||S)(W.KVO(W.o8S))}}static{this.\u0275prov=W.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}}return S})()},79:(In,Ze,M)=>{"use strict";M.d(Ze,{p:()=>T});var W=M(2198),o=M(3917),P=M(3746),b=M(7788),f=M(6409),S=M(6449);let T=(()=>{class y{constructor(c,s,a,u){this.http=c,this.scopeService=s,this.authService=a,this.upgrade=u,this.profilePromise=null,this.apiEndpoint="your_api_endpoint",this.profileChanged=new o.m,this.profileChanged$=this.profileChanged.asObservable(),this.updateRootScope=()=>{this.upgrade.injector.get("$rootScope").profile=this.profile,this.scope.profile=this.profile},this.getProfile=(h=!1)=>!h&&this.profile&&0!==Object.keys(this.profile).length?Promise.resolve(this.profile):(this.profilePromise||(this.profilePromise=this.authService.noop().then(()=>this.http.get(`${this.apiEndpoint}Profiles`).toPromise()).then(g=>(this.profile=g,this.scope.profile=this.profile,this.profile.translatedResources&&(this.scope.network.resources=this.profile.translatedResources),this.profilePromise=null,this.updateRootScope(),this.profile)).catch(g=>{throw this.profilePromise=null,new Error("Profile fetch failed: "+g)})),this.profilePromise),this.updateFavoriteChapter=h=>this.http.post(`${this.apiEndpoint}Profiles/FavoriteChapter/${h}`,{}).toPromise(),this.updateFavoriteLanguage=h=>this.http.post(`${this.apiEndpoint}Profiles/favoriteLanguage/${h}`,{}).toPromise(),this.updateProfile=h=>this.http.post(`${this.apiEndpoint}Profiles`,h).toPromise().then(g=>(this.profile=g,this.scope.profile=this.profile,this.updateRootScope(),this.profile)),this.updateCover=h=>this.http.post(`${this.apiEndpoint}Profiles/Cover`,{guid:h}).toPromise().then(g=>{const _=g;return this.profile?(this.profile.coverGuid=_.coverGuid,this.profile.coverImageUrl=_.coverImageUrl):this.profile={coverGuid:_.coverGuid,coverImageUrl:_.coverImageUrl},this.scope.profile=this.profile,this.updateRootScope(),this.profile}),this.updateAvatar=h=>this.http.post(`${this.apiEndpoint}Profiles/Avatar`,{guid:h}).toPromise().then(g=>{const _=g;return this.profile?(this.profile.avatarGuid=_.avatarGuid,this.profile.avatarImageUrl=`${_.avatarImageUrl}?preset=profile-avatar`):this.profile=_,this.scope.profile=this.profile,this.updateRootScope(),this.profile}),this.updatePartnerAccessAllow=()=>this.http.post(`${this.apiEndpoint}Profiles/PartnerAccessAllow`,{}).toPromise().then(h=>{const g={...this.profile,...h};return this.profile=g,this.scope.profile=this.profile,this.profileChanged.next(this.profile),this.updateRootScope(),this.profile}),this.getPartnerAccessAllowData=()=>this.http.get(`${this.apiEndpoint}Profiles/PartnerAccessAllowData`,{}).toPromise().then(h=>{const g={...this.profile,...h};return this.profile=g,this.profileChanged.next(this.profile),this.updateRootScope(),g}),this.fetchExternalAvatar=h=>this.http.post(`${this.apiEndpoint}Profiles/Avatar/FetchExternal`,h).toPromise().then(g=>{const _=g;return this.profile?(this.profile.avatarGuid=_.avatarGuid,this.profile.avatarImageUrl=`${_.avatarImageUrl}?preset=profile-avatar`):this.profile=_,this.scope.profile=this.profile,this.updateRootScope(),this.profile}),this.insertFeedback=h=>this.http.post(`${this.apiEndpoint}Sendmail/Feedback`,h).toPromise(),this.insertProposedCity=h=>this.http.post(`${this.apiEndpoint}Sendmail/ProposedCity`,h).toPromise(),this.getPublicProfile=h=>this.http.get(`${this.apiEndpoint}profiles/public/${h}`).toPromise(),this.getStaffDirectoryPublic=h=>this.http.get(`${this.apiEndpoint}profiles/publicstaffdirdata/${h}`).toPromise(),this.getStaffDirectoryOwned=h=>this.http.get(`${this.apiEndpoint}profiles/ownstaffdirdata/${h}`).toPromise(),this.getOwnPrivateStaffDirData=h=>this.http.get(`${this.apiEndpoint}profiles/ownnoneditablestaffdirdata/${h}`).toPromise(),this.getBirthdayCalendarEventData=()=>this.http.get(`${this.apiEndpoint}eventcalendar/chapter`).toPromise(),this.updateStaffDirectory=(h,g)=>this.http.post(`${this.apiEndpoint}Profiles/staffdirdata/?userId=${h}`,g).toPromise().then(_=>(this.profile=_,this.scope.profile=this.profile,this.updateRootScope(),this.profile)),this.unsubscribe=h=>this.http.put(`${this.apiEndpoint}profiles/unsubscribe/${h}`,{}).toPromise(),this.consentCookies=()=>this.http.post(`${this.apiEndpoint}profiles/cookiesConsent`,{}).toPromise(),this.consentExternalMediaCookies=h=>this.http.post(`${this.apiEndpoint}profiles/externalMediaCookiesConsent`,h).toPromise(),this.contactSnipCreator=h=>this.http.post(`${this.apiEndpoint}profiles/contactSnipCreator`,h).toPromise(),this.reportProfile=h=>this.http.post(`${this.apiEndpoint}profiles/report`,h).toPromise(),this.blockProfile=h=>this.http.post(`${this.apiEndpoint}profiles/block`,h).toPromise(),this.block=h=>this.http.post(`${this.apiEndpoint}profiles/block`,h).toPromise(),this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint,this.profile=this.scope.profile,this.upgrade.$injector.get("$rootScope").$on("authenticationStateChanged",()=>{this.getProfile(!0)}),this.authService.loginState$.subscribe(()=>{this.getProfile(!0).then(()=>{this.profileChanged.next(this.profile)})})}static{this.\u0275fac=function(s){return new(s||y)(b.KVO(f.Qq),b.KVO(P.A),b.KVO(S.u),b.KVO(W.be))}}static{this.\u0275prov=b.jDH({token:y,factory:y.\u0275fac,providedIn:"root"})}}return y})()},5050:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>P});var W=M(2925),o=M(7788);let P=(()=>{class b{constructor(){this.guidRegex=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i}static{this.dateRegex=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:\+|-)\d{2}:\d{2})?)?$/}convert(S){if(S&&"object"==typeof S&&!(S instanceof W.A)){if(S instanceof Array)for(const T of S)this.convert(T);for(const T of Object.keys(S)){const y=S[T];if(y instanceof Array)for(const d of y)this.convert(d);y instanceof Object&&this.convert(y),"string"==typeof y&&(b.dateRegex.test(y)?S[T]=new Date(y):this.guidRegex.test(y)?S[T]=new W.A(y):"avatarImageUrl"===T&&!y.includes("?preset=profile-avatar")&&(S[T]=`${y}?preset=profile-avatar`))}}}static{this.\u0275fac=function(T){return new(T||b)}}static{this.\u0275prov=o.jDH({token:b,factory:b.\u0275fac})}}return b})()},3746:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>d});var W=M(8556),o=M(5416),P=M(9516),b=M(2123),f=M(874),S=M(7788),T=M(6409),y=M(242);let d=(()=>{class c{constructor(a,u){this.http=a,this.deficeInfoService=u,this.scope=window.scope,this.scopeNetworkChapterCache={},this.deferredCache={},this.getNetworkUrl=()=>"https://"+this.scope.currentScope.network.domain,this.observer=new W.c(h=>{this.scope&&(h.next(this.scope),h.complete());const g=setInterval(()=>{this.scope&&(h.next(this.scope),h.complete(),clearInterval(g)),this.loadScope()},1e3)})}loadScope(){this.scope=window.scope}getScope(){return this.scope?this.scope:(this.loadScope(),window.scope)}getUserClientInfo(){const a=this.deficeInfoService.getUserAgentInfo(),u=a.isApp,g=a.appPlatform,x={isApp:u,appVersion:"",appPlatform:P.Y.Web,androidVersion:a.androidVersion};return u&&(x.appVersion=a.appVersion,x.appPlatform=g),x}getNetworkChapter(a,u){const h=`${u}_${a}`;return this.scopeNetworkChapterCache[h]?(0,o.of)(this.scopeNetworkChapterCache[h]):(this.deferredCache[h]||(this.deferredCache[h]=this.http.get(this.scope.apiEndpoint+"networks/"+a+"/"+u).pipe((0,b.T)(g=>(this.scopeNetworkChapterCache[h]=g,delete this.deferredCache[h],g)),(0,f.W)(g=>{throw delete this.deferredCache[h],g}))),this.deferredCache[h])}getMiniScope(){var a=window.miniScope;return a.apiEndpoint="/api/"+a.networkSlug+"/"+a.chapterSlug+"/",window.miniScope}static{this.\u0275fac=function(u){return new(u||c)(S.KVO(T.Qq),S.KVO(y.E))}}static{this.\u0275prov=S.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})()},7096:(In,Ze,M)=>{"use strict";M.d(Ze,{a:()=>T});var W=M(3746),o=M(6409),P=M(2123),b=M(874),f=M(3295),S=M(7788);let T=(()=>{class y{constructor(c,s){this.http=s,this.scope=c.getScope(),this.apiEndpoint=this.scope.apiEndpoint}uploadAsset(c){const s=new FormData;return s.append("file",c),this.http.post(this.apiEndpoint+"upload",s,{reportProgress:!0,observe:"events",headers:new o.Lr({enctype:"multipart/form-data"})}).pipe((0,P.T)(a=>{switch(a.type){case o.hv.UploadProgress:return Math.round(a.loaded/(a.total||1)*100);case o.hv.Response:return a.body;default:return 0}}),(0,b.W)(a=>{throw new Error("Error: "+a.message)}),(0,f.j)(()=>{this.checkImageTypeSupport(c)}))}checkImageTypeSupport(c){const s=["image/gif","image/exif","image/png","image/tif","image/tiff","image/tff","image/jpg","image/jpeg","image/jpe","image/jif","image/jfif","image/jfi","image/webp"];return c.size<=this.scope.globalSettings.uploadMaxFileSizeInBytes&&s.includes(c.type)?s.includes(c.type):(alert("Wrong type or filesize"),!1)}static{this.\u0275fac=function(s){return new(s||y)(S.KVO(W.A),S.KVO(o.Qq))}}static{this.\u0275prov=S.jDH({token:y,factory:y.\u0275fac,providedIn:"root"})}}return y})()},5309:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>ye});var W=M(6409),o=M(7543),P=M(4773),b=M(3008),f=M(5340),S=M(5050),T=M(1023),y=M(3746),d=M(3378),c=M(6610),s=M(3308);class a{constructor(fe,xe,Te,Ee,Oe,ze,$e){this.url=fe,this.data=xe,this.createdOn=Te,this.mimeType=Ee,this.tag=Oe,this.width=ze,this.height=$e}}var h=M(3438);const _=new class g extends h.Ay{constructor(){super("ImageDB"),this.version(2).stores({images:"&url"}),this.images.mapToClass(a)}};function N(ge){return _.images.where("url").equals(ge).toArray()}var U=M(8556),B=M(7788),K=M(6098);let J=(()=>{class ge{constructor(xe,Te){this.sanitizer=xe,this.httpClient=Te}getImageSrc(xe){var Te=this;return(0,s.A)(function*(){return yield Te.getImageURL(xe)})()}getImageURL(xe){var Te=this;return(0,s.A)(function*(){let Ee=yield N(xe);if(0==Ee.length)try{let ze=yield Te.fetchImage(xe);return null!=ze?(Te.saveImageToDatabase(xe,ze),{data:xe,from:"network"}):{data:xe,from:"network"}}catch{return{data:xe,from:"network"}}const Oe=Te.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(Ee[0].data));return{data:Te.getSafeImageUrl(Oe),from:"cache"}})()}getSafeImageUrl(xe){return`${xe.changingThisBreaksApplicationSecurity}`}fetchImage(xe){try{return this.httpClient.get(xe,{responseType:"blob"}).toPromise()}catch{return U.c.create(null).toPromise()}}saveImageToDatabase(xe,Te){return(0,s.A)(function*(){0==(yield N(xe)).length&&function I(ge){_.images.put(ge)}(new a(xe,Te,new Date,Te.type))})()}static{this.\u0275fac=function(Te){return new(Te||ge)(B.KVO(K.up),B.KVO(W.Qq))}}static{this.\u0275prov=B.jDH({token:ge,factory:ge.\u0275fac,providedIn:"root"})}}return ge})();var ie=M(3527),re=M(5452),q=M(3554);let Y=(()=>{class ge{constructor(){this.videoId="",this.title="Video Play Title"}close(){const xe=document.getElementById("apicodo-modal");xe&&xe.remove()}static{this.\u0275fac=function(Te){return new(Te||ge)}}static{this.\u0275cmp=B.VBU({type:ge,selectors:[["app-media-play-dialog"]],inputs:{videoId:"videoId",title:"title"},standalone:!0,features:[B.aNF],decls:8,vars:1,consts:[[1,"modal-backdrop",3,"click"],[1,"modal-content"],[1,"close-button",3,"click"],[1,"modal-title"],[1,"modal-body"],[1,"apicodo-media","apicodo-media-video"]],template:function(Te,Ee){1&Te&&(B.j41(0,"div",0),B.bIt("click",function(){return Ee.close()}),B.k0s(),B.j41(1,"div",1)(2,"button",2),B.bIt("click",function(){return Ee.close()}),B.EFF(3,"X"),B.k0s(),B.j41(4,"h4",3),B.EFF(5),B.k0s(),B.j41(6,"div",4),B.nrm(7,"div",5),B.k0s()()),2&Te&&(B.R7$(5),B.JRh(Ee.title))},styles:[".modal-backdrop[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.modal-content[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;padding:20px;z-index:1001;box-shadow:0 2px 10px #0000001a;border-radius:8px}.close-button[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;background:none;border:none;font-size:1.5rem;cursor:pointer}"]})}}return ge})(),Z=(()=>{class ge{constructor(xe,Te,Ee){this.componentFactoryResolver=xe,this.appRef=Te,this.injector=Ee}openApicodoVideo(xe){const Te=this.componentFactoryResolver.resolveComponentFactory(Y).create(this.injector);Te.instance.videoId=xe,this.appRef.attachView(Te.hostView);const Ee=Te.hostView.rootNodes[0];Ee.id="apicodo-modal",document.body.appendChild(Ee)}static{this.\u0275fac=function(Te){return new(Te||ge)(B.KVO(B.OM3),B.KVO(B.o8S),B.KVO(B.zZn))}}static{this.\u0275prov=B.jDH({token:ge,factory:ge.\u0275fac,providedIn:"root"})}}return ge})();var Q=M(1491),te=M(449),pe=M(275),z=M(6078),oe=M(3341),ae=M(242),ee=M(5626),he=M(7096),de=M(6117),ue=M(6449),be=M(2385),ve=M(1356),le=M(7473),Ce=M(5634);let ye=(()=>{class ge{static{this.\u0275fac=function(Te){return new(Te||ge)}}static{this.\u0275mod=B.$C({type:ge})}static{this.\u0275inj=B.G2t({providers:[y.A,S.A,f.A,b.p,o.u,b.p,P.A,d.d,T.A,J,ie.M,re.g,q.j,ue.u,Z,z._,pe.P,oe.p,ae.E,ee.o,he.a,de.u,be.O,ve.J,le.R,Ce.q,(0,W.$R)((0,W.Sx)())],imports:[c.MD,Q.YN,te.CCL]})}}return ge})()},2468:(In,Ze,M)=>{"use strict";var W=M(6098),o=M(7788),P=M(2198),b=M(3746),f=M(7995),S=M(1281);var s=M(242),a=M(6610);function u(v,p){if(1&v&&(o.j41(0,"div",11)(1,"a",12),o.EFF(2),o.k0s()()),2&v){const l=o.XpG(2);o.AVh("smart-banner-button-dark",l.isDarkButtonBackground()),o.R7$(),o.Y8G("href",l.installOpenLink,o.B4B),o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName(l.scope.profile.hasPushToken?"web_smart_banner_open":"web_smart_banner_install")," ")}}function h(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),o.nrm(4,"i",5),o.j41(5,"div",6),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.toggleSmartBanner())}),o.k0s()(),o.j41(6,"div",7),o.nrm(7,"img",8),o.k0s(),o.j41(8,"div",9)(9,"span"),o.EFF(10),o.k0s()()(),o.DNE(11,u,3,4,"div",10),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(7),o.Y8G("src",l.getNetworkIconBigUrl(),o.B4B),o.R7$(3),o.JRh(l.scope.currentScope.network.name),o.R7$(),o.Y8G("ngIf",null==l.installOpenLink?null:l.installOpenLink.length)}}let g=(()=>{class v{constructor(l,O){this.deviceService=O,this.isMobile=!1,this.isHidden=!1,this.getIsMobile=()=>window.innerWidth<f.B,this.isDarkButtonBackground=()=>(0,S.UP)("smart-banner-button")===f.K.dark,this.scopeService=l,this.scope=l.getScope(),this.isMobile=this.getIsMobile(),this.userAgentType=this.deviceService.getUserAgentInfo(),this.isHidden=this.isSmartBannerHiddenWithCookie();const{appLinkAndroid:F,appLinkITunes:se}=this.scope?.currentScope?.network?.settings??{};this.installOpenLink=(this.userAgentType.isAndroid?F:se)??"",this.updateRootPadding()}onResize(){this.isMobile=this.getIsMobile()}showSmartBanner(){if(!this.scope.currentScope.network.settings.configurations.showAppSmartBanner||!this.isMobile||this.isHidden)return!1;const{isApp:O,isAndroid:F,isIos:se,isSafari:we,isOtherBrowser:We}=this.userAgentType;return!O&&!!(F||se&&!we||We)}toggleSmartBanner(){this.isHidden=!0,this.updateRootPadding();const l=new Date;!function y(v,p){const l=new Date;l.setTime(l.getTime()+6048e5),document.cookie=v+"="+p+"; expires="+l.toUTCString()+"; path=/"}("appSmartBannerHiddenUntil",new Date(l.setMonth(l.getMonth()+1)).toISOString())}isSmartBannerHiddenWithCookie(){const l=function d(v){const l=("; "+document.cookie).split("; "+v+"=");if(2===l.length)return l.pop()?.split(";").shift()}("appSmartBannerHiddenUntil");return!!l&&new Date(l)>new Date}getNetworkIconBigUrl(){const l=this.scope.currentScope.network,O=this.scope.globalSettings;var F=`${O.blobStorageCdnUrl}/${O.blobStorageContainerNameLogo}`;return l&&l.settings.networkIconBigCache?`${F}/${l.slug}/icon/big.png?cache=${l.settings.networkIconBigCache}`:`${F}/default/icon/big.png?cache=${O.defaultLogoCache}`}updateRootPadding(){let l=document.getElementById("app-smart-banner-spacer");l&&(l.style.paddingTop=this.showSmartBanner()?"90px":"0px")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-smart-banner"]],hostBindings:function(O,F){1&O&&o.bIt("resize",function(we){return F.onResize(we)},!1,o.tSv)},decls:1,vars:1,consts:[["id","app-smart-banner",4,"ngIf"],["id","app-smart-banner"],[1,"smart-banner"],[1,"smart-banner-info"],[1,"smart-banner-info-close"],[1,"fas","fa-times"],[1,"smart-banner-info-close-touchpoint",3,"click"],[1,"smart-banner-info-icon"],[3,"src"],[1,"smart-banner-info-name"],["id","smart-banner-button","class","smart-banner-button",3,"smart-banner-button-dark",4,"ngIf"],["id","smart-banner-button",1,"smart-banner-button"],[3,"href"]],template:function(O,F){1&O&&o.DNE(0,h,12,3,"div",0),2&O&&o.Y8G("ngIf",F.showSmartBanner())},dependencies:[a.bT],styles:["[_nghost-%COMP%]{--app-icon-size: 6rem}.smart-banner[_ngcontent-%COMP%]{max-width:940px;margin:0 -15px;display:flex;justify-content:space-between;align-items:center;padding:15px;height:90px;background-color:#1e1e1e;border-bottom:1px solid #ccc;color:#fff}.smart-banner-info[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;width:100%;overflow:hidden}.smart-banner-info-close[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative}.smart-banner-info-close[_ngcontent-%COMP%]   i.fa-times[_ngcontent-%COMP%]{height:12px;width:8px}.smart-banner-info-close-touchpoint[_ngcontent-%COMP%]{position:absolute;height:3rem;width:3rem;top:calc(-50% - 3px);left:calc(-50% - 7px)}.smart-banner-info-icon[_ngcontent-%COMP%]{margin:0 15px;background-color:#fff;border-radius:1rem}.smart-banner-info-icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:var(--app-icon-size);height:var(--app-icon-size);border-radius:1rem;border:1px solid rgb(229,229,229)}.smart-banner-info-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.smart-banner-info-name[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:large}.smart-banner-button[_ngcontent-%COMP%]{all:unset;background-color:var(--colorPrimary);display:flex;align-self:center;border-radius:2rem;height:2rem;padding:.5rem 1.5rem}.smart-banner-button[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{all:unset;color:#000;white-space:nowrap}.smart-banner-button-dark[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#fff}"]})}}return v})();var _=M(6409);new o.nKC("LANGS_COOKIE_CONSENT_CONFIGURATION");var w=function(v){return v[v.Analytics=0]="Analytics",v[v.ExternalLogin=1]="ExternalLogin",v[v.ExternalMedia=2]="ExternalMedia",v}(w||{});const U={bottomRight:"bottom-right",bottomLeft:"bottom-left"},B_analytics="externalAnalyticsPermissions",B_externalMedia="externalMediaPermissions",K_analytics_matomo="matomo",K_analytics_googleAnalytics="googleAnalytics",K_externalMedia_twitter="twitter",K_externalMedia_youTube="youTube",K_externalMedia_facebook="facebook",K_externalMedia_vimeo="vimeo",K_externalMedia_giphy="giphy",K_externalLogin_facebook="facebook";function J(v,p){1&v&&o.nrm(0,"i",3)}let ie=(()=>{class v{constructor(l,O){this.type=0,this.isAssetListItem=!1,this.http=new _.Qq(O),this.scopeService=l,this.scope=l.getScope(),this.miniScope=l.getMiniScope()}getTypeResource(){return re[this.type]?.resource??""}accept(){const l=(new Date).toISOString(),O={...this.scope?.profile?.settings?.externalMediaPermissions,[re[this.type]?.id]:{granted:!0,lastUpdate:l}};this.http.post(`${this.miniScope.apiEndpoint}Profiles/ExternalMediaCookiesConsent`,O).toPromise().then(()=>{window.location.href=window.location.href.split("#")[0]})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(_.JV))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["cookie-external-media-info"]],inputs:{type:"type",isAssetListItem:"isAssetListItem"},decls:14,vars:6,consts:[[1,"cookies-external-media-info-container"],["class","fa fa-exclamation-triangle","aria-hidden","true",4,"ngIf"],["type","button",1,"btn","btn-green",3,"click"],["aria-hidden","true",1,"fa","fa-exclamation-triangle"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,J,1,0,"i",1),o.j41(2,"p")(3,"span")(4,"strong"),o.EFF(5),o.k0s()(),o.nrm(6,"br")(7,"br"),o.j41(8,"span"),o.EFF(9),o.k0s(),o.nrm(10,"br")(11,"br"),o.j41(12,"button",2),o.bIt("click",function(){return F.accept()}),o.EFF(13),o.k0s()()()),2&O&&(o.AVh("assetListItem",F.isAssetListItem),o.R7$(),o.Y8G("ngIf",!F.isAssetListItem),o.R7$(4),o.JRh(F.getTypeResource()),o.R7$(4),o.JRh(F.scope.network.getResourceOrKeyName("web_cookie_consent_external_media_info")),o.R7$(4),o.JRh(F.scope.network.getResourceOrKeyName("web_cookie_consent_external_media_info_accept")))},dependencies:[a.bT],styles:["[_nghost-%COMP%]{--padding: 2.5rem}.cookies-external-media-info-container[_ngcontent-%COMP%]{background-color:#f0f0f0;border-radius:10px;display:flex;align-items:center;padding:var(--padding)}.cookies-external-media-info-container[_ngcontent-%COMP%]   i.fa[_ngcontent-%COMP%]{margin-right:var(--padding);font-size:x-large}.cookies-external-media-info-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-right:.5rem}.cookies-external-media-info-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{all:unset;cursor:pointer}.cookies-external-media-info-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:underline}.assetListItem[_ngcontent-%COMP%]{height:300px;overflow:hidden;line-break:normal}@media (max-width: 768px){.assetListItem[_ngcontent-%COMP%]{height:360px}}"]})}}return v})();const re={4:{resource:"Twitter",id:K_externalMedia_twitter},5:{resource:"YouTube",id:K_externalMedia_youTube},6:{resource:"Facebook",id:K_externalMedia_facebook},7:{resource:"Vimeo",id:K_externalMedia_vimeo},10:{resource:"Giphy",id:K_externalMedia_giphy}};var q=M(6284),Y=M(8892),Z=M(3008),Q=M(8030);const te=v=>({"root-navigation-btn-active":v});function pe(v,p){if(1&v&&(o.j41(0,"span",3),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Lme("",l.badge,"",l.connected?"":" \u26a0","")}}let z=(()=>{class v{constructor(l,O,F,se,we,We){this.router=O,this.chatRelayService=F,this.badgeService=se,this.cdr=we,this.ngZone=We,this.routeActive=!1,this.badge=null,this.currentLocation=null,this.sourceTimes=(0,q.Y)(500),this.connected=!1,this.subscriptions=[],this.scope=l.getScope(),this.currentLocation=window.location.href,this.subs=this.sourceTimes.subscribe(gt=>{this.routeActive=!!window.location.href.includes("/chat"),this.badge=this.badgeService.badge}),this.subscriptions.push(this.badgeService.badgeUpdates$.subscribe(gt=>{this.badge=gt.totalCount}),this.chatRelayService.isConnected$.subscribe(gt=>{this.connected=gt}))}ngOnInit(){this.badge=this.badgeService.badge}ngOnDestroy(){this.subscriptions.forEach(l=>l.unsubscribe())}openChat(){this.router.navigate(["/chat",""]),this.routeActive=!0}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Y.Ix),o.rXU(Z.p),o.rXU(Q.L),o.rXU(o.gRc),o.rXU(o.SKi))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-chat-bubble"]],decls:3,vars:5,consts:[[1,"root-navigation-btn","visible-isRegistered",3,"click","ngClass"],[3,"innerHtml"],["class","badge root-navigation-btn-notificationBadge",4,"ngIf"],[1,"badge","root-navigation-btn-notificationBadge"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.bIt("click",function(){return F.openChat()}),o.nrm(1,"span",1),o.DNE(2,pe,2,2,"span",2),o.k0s()),2&O&&(o.Y8G("ngClass",o.eq3(3,te,F.routeActive)),o.R7$(),o.Y8G("innerHtml",F.scope.network.getResourceOrKeyName("web_root_root_chat"),o.npT),o.R7$(),o.Y8G("ngIf",0!=F.badge))},dependencies:[a.YU,a.bT]})}}return v})();var oe=M(2923),ae=M(6343),ee=M(3176),he=M(4312),de=M(7543),ue=M(4102);let be=(()=>{class v{static{this.cacheRebuilding=!1}static{this.cacheInitialized=!1}static{this.syncEntryKey="ChatCacheLastUpdateKey"}constructor(l,O,F,se,we){this.chatRoomCache=l,this.scopeService=O,this.authenticationService=F,this.messageCache=se,this.badgeService=we,this.authReceived=!1,this.cacheRebuiltSource=new ae.B7,this.cacheRebuilt$=this.cacheRebuiltSource.asObservable(),this.storeSynchedSource=new ae.B7,this.storeSynced$=this.storeSynchedSource.asObservable(),this.errorsOnUpdate=!1,this.roomCounts={},this.scope=this.scopeService.getScope(),this.database=new ee.h(this.scope.currentScope.chapter.id,this.scope.network.id),this.roomCounts=this.badgeService.roomBadges,this.badgeService.badgeUpdates$.subscribe(We=>{v.cacheRebuilding||(this.roomCounts=We.badges)}),this.authenticationService.isAuthenticated$.subscribe(We=>{this.authReceived||(this.authReceived=!0,this.updateOrInitCache())})}isInitialized(){return v.cacheInitialized}rebuildCache(){this.chatRoomCache.rebuildCacheAndGetArrayStore(this).then(l=>{l.load().then(O=>{let F=1;var se=new ve;se.completed=!1,se.current=F,se.total=O.length,se.message="Start",this.cacheRebuiltSource.next(se),O.orderByDescending(we=>we.lastMessage?.createdOn).toArray().forEach(we=>{this.messageCache.rebuildCacheAndGetStore(we.id).then(We=>{var gt=new ve;gt.completed=!1,gt.current=F,gt.total=O.length,gt.message=we.name,F==O.length&&(v.cacheRebuilding=!1,gt.completed=!0,v.cacheInitialized=!0,this.cacheRebuiltSource.next(gt)),this.cacheRebuiltSource.next(gt),F++},We=>{this.errorsOnUpdate=!0})})})})}updateOrInitCache(){if(v.cacheRebuilding)return v.cacheRebuilding;v.cacheRebuilding=!0;var l=new Date;return this.database.synchTable.get(v.syncEntryKey).then(O=>{if(O){var F=new ve;F.completed=!1,F.current=1,F.total=1,F.message="Local cache initialized",this.cacheRebuiltSource.next(F),this.badgeService.loadBadges().then(se=>{this.roomCounts=se.badges,this.updateStores(O.synchStartedOn).then(we=>{this.database.synchTable.update(v.syncEntryKey,{id:v.syncEntryKey,value:"",synchStartedOn:l,syncCompletedOn:new Date,jsonValue:""}).then(We=>{})})})}else{let se=new Date("1.1.1970");this.database.synchTable.add({id:v.syncEntryKey,value:"",synchStartedOn:se,jsonValue:""}).then(we=>{var We=new ve;We.completed=!1,We.current=1,We.total=1,We.message="Local cache initialized",this.cacheRebuiltSource.next(We),this.badgeService.loadBadges().then(gt=>{this.roomCounts=gt.badges,this.updateStores(se).then(Ft=>{this.database.synchTable.update(v.syncEntryKey,{id:v.syncEntryKey,value:"",synchStartedOn:se,syncCompletedOn:new Date,jsonValue:""}).then(pn=>{})})})})}}),v.cacheRebuilding}updateOrInitCacheOld(){if(v.cacheRebuilding)return v.cacheRebuilding;v.cacheRebuilding=!0;var l=new Date;return this.database.synchTable.get(v.syncEntryKey).then(O=>{if(O){var F=new ve;F.completed=!0,F.current=1,F.total=1,F.message="Local cache initialized",this.cacheRebuiltSource.next(F),this.badgeService.loadBadges().then(se=>{this.roomCounts=se.badges,this.updateStores(O.synchStartedOn).then(we=>{this.database.synchTable.update(v.syncEntryKey,{id:v.syncEntryKey,value:"",synchStartedOn:l,syncCompletedOn:new Date,jsonValue:""}).then(We=>{})})})}else this.database.synchTable.add({id:v.syncEntryKey,value:"",synchStartedOn:l,jsonValue:""}).then(se=>{this.rebuildCache()})}),v.cacheRebuilding}updateStores(l){return this.chatRoomCache.rebuildCacheAndGetArrayStore(this).then(O=>{O.load().then(F=>{let se=1;var we=new ve;we.completed=!1,we.current=se,we.total=F.length,we.message="Start",this.storeSynchedSource.next(we),this.cacheRebuiltSource.next(we),F.orderByDescending(We=>We.lastMessage?.createdOn).toArray().forEach(We=>{let gt=0;try{gt=this.badgeService.roomBadges[We.id.toString()].allMessagesCount}catch{}this.messageCache.updateStore(We.id,l,gt).then(Ft=>{var pn=new ve;pn.completed=!1,pn.current=se,pn.total=F.length,pn.message="Room messages resynched for room: ("+se+"/"+F.length+") "+We.name,se==F.length&&(v.cacheRebuilding=!1,pn.completed=!0,v.cacheInitialized=!0,this.storeSynchedSource.next(pn),this.cacheRebuiltSource.next(pn)),se++})})})})}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(he.D),o.KVO(b.A),o.KVO(de.u),o.KVO(ue.Z),o.KVO(Q.L))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();class ve{constructor(p,l,O,F){this.total=0,this.completed=!1,this.current=0,this.message="",this.completed=l??!1,this.current=F??0,this.message=p??"",this.total=O??0}}var le=M(5452);let Ce=(()=>{class v{static{this.initialized=!1}constructor(l,O,F,se,we){this.scopeService=l,this.router=O,this.chatRelay=F,this.cacheManager=se,this.chatRouteGuard=we,this.subscriptions=[],this.cacheRebuilt=!1,this.roomCount=0,this.current=0,this.message="Initializing chat system",this.windowWidth=720,this.isMobile=!0,this.chatRouteGuard.canUseChat(),this.cacheRebuilt=this.cacheManager.isInitialized(),this.chapter=this.scopeService.getScope().currentChapter.name,this.scope=this.scopeService.getScope(),this.message=this.scope.network.getResourceOrKeyName("web_chat_cache_initializing_will_start"),this.subscriptions.push(this.cacheManager.cacheRebuilt$.subscribe(Ft=>{Ft.completed!=this.cacheRebuilt&&(this.cacheRebuilt=Ft.completed,this.cacheRebuilt&&(v.initialized=!0)),this.message=Ft.message,Ft.total!=this.roomCount&&(this.roomCount=Ft.total),Ft.current!=this.current&&(this.current=Ft.current)}));const We=window.location.href.indexOf("/chat")+1;let gt;(0,oe.Hg)(l.getScope().currentScope.network.settings.languageCode),gt=0===We?["chat"]:window.location.href.substring(We).split("/"),O.navigate(gt)}ngOnDestroy(){this.subscriptions.forEach(l=>l.unsubscribe())}onResize(){this.windowWidth=window.innerWidth,this.isMobile=this.windowWidth<f.B}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Y.Ix),o.rXU(Z.p),o.rXU(be),o.rXU(le.g))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-chat-home"]],hostBindings:function(O,F){1&O&&o.bIt("resize",function(we){return F.onResize(we)},!1,o.tSv)},decls:3,vars:0,consts:[[1,"navbar-spacer"]],template:function(O,F){1&O&&(o.nrm(0,"div",0),o.j41(1,"div"),o.nrm(2,"router-outlet"),o.k0s())},dependencies:[Y.n3],styles:[".navbar-spacer[_ngcontent-%COMP%]{height:101px}.chatRouterContainerLoadPane[_ngcontent-%COMP%]{text-align:center;vertical-align:middle;padding:20%}[_nghost-%COMP%]     .dx-list{font-family:var(--fontChat)}@media (max-width: 991px){.navbar-spacer[_ngcontent-%COMP%]{height:0}}"]})}}return v})();var ye=M(8375);let ge=(()=>{class v{constructor(l){this.keepAlive=l,this.connected=!1,this.subscriptions=[],this.subscriptions.push(this.keepAlive.isConnected$.subscribe(O=>{this.connected=O}))}ngOnDestroy(){this.subscriptions.forEach(l=>l.unsubscribe())}ngOnInit(){}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ye.S))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-vitals"]],decls:0,vars:0,template:function(O,F){}})}}return v})();var fe=M(281),xe=function(v){return v[v.None=0]="None",v[v.BuiltIn=1]="BuiltIn",v[v.CookieBot=2]="CookieBot",v[v.Usercentrics=3]="Usercentrics",v[v.Simple=4]="Simple",v}(xe||{}),Te=M(3110),Ee=M.n(Te);const Oe={position:U.bottomRight,fallsbackLang:"en",header:"web_cookie_consent_title",text:"web_cookie_consent_text",animationDuration:800,buttons:{accept:"web_cookie_consent_accept_all",acceptSome:"web_cookie_consent_accept_some",reject:"web_cookie_consent_reject_all",saveAndClose:"web_cookie_consent_save_and_close",back:"web_cookie_consent_back"},links:[{caption:"web_cookie_consent_caption_pp",navigate:"pp"},{caption:"web_cookie_consent_caption_imprint",navigate:"imprint"}],settings:{caption:"web_cookie_consent_settings_caption",header:"web_cookie_consent_settings_title",text:"web_cookie_consent_settings_text",tabs:[{id:B_externalMedia,header:"web_cookie_consent_settings_tabs_external_media_title",caption:"web_cookie_consent_settings_tabs_external_media_caption",text:"web_cookie_consent_settings_tabs_external_media_text",providersHeader:"web_cookie_consent_settings_providers_title",apiTarget:"ExternalMediaCookiesConsent",isChecked:!1,providers:[{caption:"Youtube",id:K_externalMedia_youTube,type:w.ExternalMedia,isChecked:!1,tabId:B_externalMedia},{caption:"Facebook",id:K_externalMedia_facebook,type:w.ExternalMedia,isChecked:!1,tabId:B_externalMedia},{caption:"Vimeo",id:K_externalMedia_vimeo,type:w.ExternalMedia,isChecked:!1,tabId:B_externalMedia},{caption:"Giphy",id:K_externalMedia_giphy,type:w.ExternalMedia,isChecked:!1,tabId:B_externalMedia}]},{id:B_analytics,header:"web_cookie_consent_settings_tabs_analytics_title",caption:"web_cookie_consent_settings_tabs_analytics_caption",text:"web_cookie_consent_settings_tabs_analytics_text",providersHeader:"web_cookie_consent_settings_providers_title",apiTarget:"AnalyticsCookiesConsent",isChecked:!1,providers:[{caption:"Matomo",id:K_analytics_matomo,type:w.Analytics,isChecked:!1,tabId:B_analytics},{caption:"Google Analytics",id:K_analytics_googleAnalytics,type:w.Analytics,isChecked:!1,tabId:B_analytics}]},{id:"externalLoginPermissions",header:"web_cookie_consent_settings_tabs_external_login_title",caption:"web_cookie_consent_settings_tabs_external_login_caption",text:"web_cookie_consent_settings_tabs_external_login_text",providersHeader:"web_cookie_consent_settings_providers_title",apiTarget:"ExternalLoginCookiesConsent",isChecked:!1,providers:[{caption:"Facebook",id:K_externalLogin_facebook,type:w.ExternalLogin,isChecked:!1,tabId:"externalLoginPermissions"}]}]}};let ze=(()=>{class v{constructor(){this.configuration=Oe,this.animationDuration=this.configuration.animationDuration,this.aosAnimateClass="aos-animate"}hide(l){return new Promise((O,F)=>{try{this.toHtmlElement(l).classList.remove(this.aosAnimateClass),window.setTimeout(()=>O(),this.animationDuration)}catch{F()}})}toHtmlElement(l){return l?.nativeElement}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac})}}return v})();var $e=M(3308),Be=M(3917);const{bottomLeft:Ue,bottomRight:ot}=U;let st=(()=>{class v{constructor(l,O,F){this.platformId=l,this.configuration=Oe,this.position=this.configuration.position,this.isBrowser=(0,a.UE)(this.platformId),this.currentPosition={isLeft:Ue===this.position,isRight:ot===this.position},this.tabs=[],this.isInitializedSource=new Be.m,this.isInitialized$=this.isInitializedSource.asObservable(),this.http=new _.Qq(O),this.scopeService=F,this.miniScope=F.getMiniScope(),F.observer.subscribe(se=>{this.scope=se,this.initState()})}initState(){var l=this;return(0,$e.A)(function*(){yield l.loadProfile();const O=l.configureTabs(l.configuration?.settings?.tabs);l.tabs=l.getInitialTabsState(O),l.isInitializedSource.next(!0),l.isInitializedSource.complete()})()}loadProfile(){var l=this;return(0,$e.A)(function*(){var O=yield l.http.get(`${l.miniScope.apiEndpoint}Profiles`).toPromise();l.profile=O})()}getTabs(){return this.tabs}getProviders(){return this.tabs.map(l=>l.providers).reduce((l,O)=>[...l,...O])}configureTabs(l){return l?.length?l.reduce((F,se)=>{const we=se.providers.reduce((We,gt)=>{const{id:Ft}=gt,{currentChapter:pn,currentScope:fi}=this.scope??{};switch(se.id){case B_analytics:switch(Ft){case K_analytics_googleAnalytics:if(!pn?.settings?.gaTrackingId)return We;break;case K_analytics_matomo:if(!pn?.settings?.piwikBaseUrl)return We}break;case"externalLoginPermissions":if(Ft===K_externalLogin_facebook&&!fi?.network?.settings.availableFacebookLogin)return We}return[...We,gt]},[]);return we?.length?[...F,{...se,providers:we}]:F},[]):[]}getInitialTabsState(l){return l.map(O=>(O.isChecked=this.isSwitcherEnabled(O),O.providers.forEach(F=>F.isChecked=this.isCookieEnabled(F)),O))}isSwitcherEnabled(l){return l.providers.every(({id:O,tabId:F})=>this.isPermissionGranted(F,O))}isCookieEnabled(l){return this.isPermissionGranted(l.tabId,l.id)}save(){this.tabs.forEach(l=>{const O=(new Date).toISOString(),se={...l.providers.map(We=>({[We.id]:{granted:We.isChecked,lastUpdate:O}})).reduce((We,gt)=>({...We,...gt}),{})};this.http.post(`${this.miniScope.apiEndpoint}Profiles/${l.apiTarget}`,se).toPromise()})}isPermissionGranted(l,O){const F=this.profile?.settings;return!!F&&(F[l][O]?.granted??!1)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(o.Agw),o.KVO(_.JV),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac})}}return v})();var et=M(1491);const Ke=["container"],Ye=()=>({standalone:!0});function Pe(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"div",10),o.bIt("click",function(){const F=o.eBV(l).index,se=o.XpG(2);return o.Njj(se.tabIndex=F)}),o.j41(2,"div",11)(3,"span"),o.EFF(4),o.k0s()()(),o.bVm()}if(2&v){const l=p.$implicit,O=p.index,F=o.XpG(2);o.R7$(2),o.AVh("cc-caption-active",F.tabIndex===O),o.R7$(2),o.SpI(" ",F.scope.network.getResourceOrKeyName(l.caption)," ")}}function Se(v,p){if(1&v&&(o.j41(0,"div",20),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2).$implicit,O=o.XpG(2);o.R7$(),o.SpI(" ",O.scope.network.getResourceOrKeyName(l.providersHeader)," ")}}function Re(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",21)(1,"div",22)(2,"div",23),o.EFF(3),o.k0s(),o.j41(4,"div",24)(5,"label",25)(6,"input",26),o.mxI("ngModelChange",function(F){const se=o.eBV(l).$implicit;return o.DH7(se.isChecked,F)||(se.isChecked=F),o.Njj(F)}),o.k0s(),o.nrm(7,"span",27),o.k0s()()()()}if(2&v){const l=p.$implicit;o.R7$(3),o.SpI(" ",l.caption," "),o.R7$(3),o.R50("ngModel",l.isChecked),o.Y8G("ngModelOptions",o.lJ4(5,Ye)),o.R7$(),o.AVh("cc-round-disabled",!l.isChecked)}}function Fe(v,p){if(1&v&&(o.j41(0,"div",13)(1,"div",14),o.EFF(2),o.k0s(),o.j41(3,"div",15),o.EFF(4),o.k0s(),o.nrm(5,"div",16),o.j41(6,"div",17),o.DNE(7,Se,2,1,"div",18)(8,Re,8,6,"div",19),o.k0s()()),2&v){const l=o.XpG().$implicit,O=o.XpG(2);o.R7$(2),o.JRh(O.scope.network.getResourceOrKeyName(l.caption)),o.R7$(2),o.JRh(O.scope.network.getResourceOrKeyName(l.text)),o.R7$(3),o.Y8G("ngIf",l.providersHeader),o.R7$(),o.Y8G("ngForOf",l.providers)}}function Xe(v,p){if(1&v&&(o.qex(0),o.DNE(1,Fe,9,4,"div",12),o.bVm()),2&v){const l=p.index,O=o.XpG(2);o.R7$(),o.Y8G("ngIf",O.tabIndex===l)}}function tt(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",2,0)(2,"div",3)(3,"div",4),o.DNE(4,Pe,5,3,"ng-container",5),o.k0s(),o.j41(5,"div",6),o.DNE(6,Xe,2,1,"ng-container",5),o.k0s(),o.j41(7,"div",7)(8,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.back())}),o.EFF(9),o.k0s(),o.j41(10,"a",9),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.confirm())}),o.EFF(11),o.k0s()()()()}if(2&v){const l=o.XpG();o.AVh("cc-left",l.currentPosition.isLeft)("cc-right",l.currentPosition.isRight)("app",l.userClientInfo.isApp),o.BMQ("data-aos-duration",l.animationDuration),o.R7$(4),o.Y8G("ngForOf",l.tabs),o.R7$(2),o.Y8G("ngForOf",l.tabs),o.R7$(3),o.SpI(" ",l.scope.network.getResourceOrKeyName(l.backCaption)," "),o.R7$(2),o.SpI(" ",l.scope.network.getResourceOrKeyName(l.saveCaption)," ")}}let vt=(()=>{class v{constructor(l,O,F){this.animationService=l,this.cookieStatusService=O,this.configuration=Oe,this.currentPosition=this.cookieStatusService.currentPosition,this.isHidden=!1,this.fallsbackLang=this.configuration.fallsbackLang,this.header=this.configuration.settings?.header,this.text=this.configuration.settings?.text,this.saveCaption=this.configuration.buttons.saveAndClose,this.backCaption=this.configuration.buttons.back,this.animationDuration=this.configuration.animationDuration,this.tabs=[],this.isCookieSettingsOpened=!0,this.isCookieSettingsOpenedChange=new o.bkB,this.accept=new o.bkB,this.tabIndex=0,this.scopeService=F,this.scope=F.getScope(),this.userClientInfo=F.getUserClientInfo(),this.tabs=this.cookieStatusService.getTabs()}confirm(){this.back().finally(()=>this.accept.emit())}back(){return this.animationService.hide(this.containerRef).finally(()=>this.isHidden=!0).finally(()=>this.isCookieSettingsOpenedChange.emit(!1))}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ze),o.rXU(st),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["settings"]],viewQuery:function(O,F){if(1&O&&o.GBs(Ke,5,o.aKT),2&O){let se;o.mGM(se=o.lsd())&&(F.containerRef=se.first)}},inputs:{isCookieSettingsOpened:"isCookieSettingsOpened"},outputs:{isCookieSettingsOpenedChange:"isCookieSettingsOpenedChange",accept:"accept"},decls:1,vars:1,consts:[["container",""],["class","cc-mobile-view cc-settings-container cc-shadow cc-window cc-floating cc-bottom","role","dialog","aria-live","polite","aria-label","cookieconsent","aria-describedby","cookieconsent:desc","data-aos","slide-up","data-aos-easing","ease-in-out",3,"cc-left","cc-right","app",4,"ngIf"],["role","dialog","aria-live","polite","aria-label","cookieconsent","aria-describedby","cookieconsent:desc","data-aos","slide-up","data-aos-easing","ease-in-out",1,"cc-mobile-view","cc-settings-container","cc-shadow","cc-window","cc-floating","cc-bottom"],[1,"cc-window","cc-floating","cc-settings-panel"],[1,"cc-tabs-captions"],[4,"ngFor","ngForOf"],[1,"cc-tab-items"],[1,"cc-compliance"],["aria-label","dismiss cookie message","role","button","tabindex","0",1,"cc-button","cc-button-reject",3,"click"],["aria-label","back message","role","button","tabindex","0",1,"cc-button","cc-button-accept",3,"click"],[1,"cc-tab-caption",3,"click"],[1,"cc-caption"],["class","cc-tab-item",4,"ngIf"],[1,"cc-tab-item"],[1,"cc-tab-header"],[1,"cc-tab-text"],[1,"cc-separator"],[1,"cc-tab-content"],["class","cc-tab-provider-caption",4,"ngIf"],["class","cc-tab-providers",4,"ngFor","ngForOf"],[1,"cc-tab-provider-caption"],[1,"cc-tab-providers"],[1,"cc-tab-provider"],[1,"cc-provider-caption"],[1,"cc-provider-silder"],[1,"cc-slider-label"],["type","checkbox",3,"ngModelChange","ngModel","ngModelOptions"],[1,"cc-slider","cc-round"]],template:function(O,F){1&O&&o.DNE(0,tt,12,11,"div",1),2&O&&o.Y8G("ngIf",!F.isHidden)},dependencies:[a.Sq,a.bT,et.Zm,et.BC,et.vS],styles:['.overflow-text-3[_ngcontent-%COMP%]{word-break:break-all}.cc-right[_ngcontent-%COMP%]{right:24px}.cc-bottom[_ngcontent-%COMP%]{bottom:24px}.cc-settings-container[_ngcontent-%COMP%]{background-color:#fff;display:flex;flex-direction:row;width:480px;justify-content:space-between}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-bottom:2rem;justify-content:space-around}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]{cursor:pointer;text-align:center;display:flex}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]:not(:first-child){margin-left:2rem}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption[_ngcontent-%COMP%]{font-size:15px;text-align:center;display:flex;justify-content:center;align-items:flex-end;overflow:hidden;border-bottom:2px solid #f0f0f0}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption-active[_ngcontent-%COMP%]{border-color:var(--color1)}.cc-settings-container[_ngcontent-%COMP%]   .cc-window[_ngcontent-%COMP%]{position:relative;width:100%}.cc-settings-container[_ngcontent-%COMP%]   .cc-window[_ngcontent-%COMP%]   .cc-separator[_ngcontent-%COMP%]{margin:5px 0;border-bottom:1px solid #f0f0f0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating.cc-settings-panel[_ngcontent-%COMP%]{padding:0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-header[_ngcontent-%COMP%]{text-align:left;font-weight:600;line-height:30px}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-message[_ngcontent-%COMP%]{padding:0 30px}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-header[_ngcontent-%COMP%]{font-weight:700}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]{margin-top:20px;max-height:180px;overflow:auto}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-provider-caption[_ngcontent-%COMP%]{font-weight:700}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]:not(:first-child):not(:nth-child(2)){border-top:1px solid #f0f0f0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem 0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]{position:relative;width:54px;height:24px;margin:0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;inset:0 20px 0 -20px;background-color:#f0f0f0;transition:.4s}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider.cc-round[_ngcontent-%COMP%]{border-radius:24px}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider.cc-round[_ngcontent-%COMP%]:before{background-color:var(--color1);border-radius:50%}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider.cc-round-disabled[_ngcontent-%COMP%]{border-radius:24px}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider.cc-round-disabled[_ngcontent-%COMP%]:before{background-color:#d0d0d0;border-radius:50%}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:20px;width:20px;left:3px;bottom:2px;background-color:#d0d0d0;transition:.4s}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:checked + .cc-slider[_ngcontent-%COMP%]{background-color:#f0f0f0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:checked + .cc-slider[_ngcontent-%COMP%]:before{background-color:var(--color1);left:-20px}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus + .cc-slider[_ngcontent-%COMP%]{box-shadow:0 0 1px var(--color1)}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-tab-provider[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:checked + .cc-slider[_ngcontent-%COMP%]:before{transform:translate(52px)}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]{text-align:center;display:flex}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button[_ngcontent-%COMP%]{text-decoration:none;font-size:15px;text-align:center;margin:0 10px;width:100%;border-radius:1rem;overflow:visible;line-height:45px;padding:0 30px;background-color:var(--color1-alpha70);color:#000}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button[_ngcontent-%COMP%]:hover{background-color:var(--color1-alpha80)}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button-reject[_ngcontent-%COMP%]{background-color:#f0f0f0;color:#000}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button-reject[_ngcontent-%COMP%]:hover{background-color:#d9d9d9}@media (max-width: 991px){.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]{height:20px;margin:5px 15px;overflow:hidden;display:inline-block}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption[_ngcontent-%COMP%]{font-weight:400;padding:0;width:auto;text-decoration:underline;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:288px}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption-right-border-round[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption-selected[_ngcontent-%COMP%]{text-decoration:underline}.cc-settings-container[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption-arrow[_ngcontent-%COMP%]{display:none;border:none}.cc-settings-container[_ngcontent-%COMP%]   .cc-window[_ngcontent-%COMP%]{padding-bottom:12px;position:initial}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]{left:24px}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]{flex-direction:column}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button[_ngcontent-%COMP%]{width:unset;margin:0}.cc-settings-container[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button[_ngcontent-%COMP%]:first-child{margin-bottom:1rem}}@media (prefers-color-scheme: dark){.app[_ngcontent-%COMP%]   .cc-tabs-captions[_ngcontent-%COMP%]   .cc-tab-caption[_ngcontent-%COMP%]   .cc-caption[_ngcontent-%COMP%]{border-color:#212121}.app[_ngcontent-%COMP%]   .cc-window[_ngcontent-%COMP%]{background-color:#000!important}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%], .app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-top-panel[_ngcontent-%COMP%]   .cc-close-button[_ngcontent-%COMP%]{background-color:#000}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-switchers[_ngcontent-%COMP%]   .cc-switcher-item[_ngcontent-%COMP%]:not(:first-child){border-color:#212121}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-separator[_ngcontent-%COMP%]{border-color:#212121!important}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]{border-color:#212121}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]:not(:first-child):not(:nth-child(2)){border-top:1px solid #212121}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   .cc-slider[_ngcontent-%COMP%]{background-color:#212121!important}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-tab-items[_ngcontent-%COMP%]   .cc-tab-content[_ngcontent-%COMP%]   .cc-tab-providers[_ngcontent-%COMP%]   .cc-provider-silder[_ngcontent-%COMP%]   .cc-slider-label[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:checked + .cc-slider[_ngcontent-%COMP%]{background-color:#212121!important}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button-reject[_ngcontent-%COMP%]{color:#fff;background-color:#212121}.app[_ngcontent-%COMP%]   .cc-window.cc-floating[_ngcontent-%COMP%]   .cc-compliance[_ngcontent-%COMP%]   .cc-button-reject[_ngcontent-%COMP%]:hover{background-color:#3b3b3b}}']})}}return v})();const qe=["container"],At=()=>({standalone:!0}),Tt=v=>({"cc-configurations-hide-redesign":v});function qt(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",14)(1,"label",15),o.EFF(2),o.k0s(),o.j41(3,"label",16)(4,"input",17),o.mxI("ngModelChange",function(F){const se=o.eBV(l).$implicit;return o.DH7(se.isChecked,F)||(se.isChecked=F),o.Njj(F)}),o.bIt("change",function(){const F=o.eBV(l).$implicit,se=o.XpG(4);return o.Njj(se.switch(F))}),o.k0s(),o.nrm(5,"span",18),o.k0s()()}if(2&v){let l;const O=p.$implicit,F=o.XpG(4);o.R7$(2),o.JRh(F.scope.network.getResourceOrKeyName(null!==(l=null==O?null:O.caption)&&void 0!==l?l:"")),o.R7$(2),o.R50("ngModel",O.isChecked),o.Y8G("ngModelOptions",o.lJ4(5,At)),o.R7$(),o.AVh("cc-round-disabled",!O.isChecked)}}function wt(v,p){if(1&v&&(o.j41(0,"div",12),o.DNE(1,qt,6,6,"div",13),o.k0s()),2&v){const l=o.XpG(3);o.R7$(),o.Y8G("ngForOf",l.tabs)}}function En(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",23)(1,"a",24),o.bIt("click",function(){o.eBV(l);const F=o.XpG(4);return o.Njj(F.openCookieSettings())}),o.EFF(2),o.k0s()()}if(2&v){const l=o.XpG(4);o.R7$(2),o.SpI(" ",l.scope.network.getResourceOrKeyName(l.settings.caption)," ")}}function ri(v,p){1&v&&o.nrm(0,"div",25)}function Tn(v,p){1&v&&o.nrm(0,"div",25)}function Jn(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",23)(2,"a",26),o.EFF(3),o.k0s()(),o.DNE(4,Tn,1,0,"div",21),o.bVm()),2&v){let l;const O=p.$implicit,F=p.index,se=o.XpG(4);o.R7$(2),o.FS9("href",O.navigate,o.B4B),o.R7$(),o.JRh(se.scope.network.getResourceOrKeyName(O.caption)),o.R7$(),o.Y8G("ngIf",F!=(null!==(l=null==se.links?null:se.links.length)&&void 0!==l?l:1)-1)}}function wi(v,p){if(1&v&&(o.j41(0,"div",19),o.DNE(1,En,3,1,"div",20)(2,ri,1,0,"div",21)(3,Jn,5,3,"ng-container",22),o.k0s()),2&v){const l=o.XpG(3);o.R7$(),o.Y8G("ngIf",l.settings),o.R7$(),o.Y8G("ngIf",(null==l.links?null:l.links.length)&&l.settings),o.R7$(),o.Y8G("ngForOf",l.links)}}function Bn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",4,0)(2,"button",5),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.close())}),o.EFF(3,"X"),o.k0s(),o.j41(4,"h3"),o.EFF(5),o.k0s(),o.j41(6,"span",6),o.EFF(7),o.k0s(),o.DNE(8,wt,2,1,"div",7),o.j41(9,"div",8)(10,"a",9),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.reject())}),o.EFF(11),o.k0s(),o.j41(12,"a",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.accept())}),o.EFF(13),o.k0s()(),o.DNE(14,wi,4,3,"div",11),o.k0s()}if(2&v){let l,O,F,se;const we=o.XpG(2);o.AVh("cc-left",null==we.currentPosition?null:we.currentPosition.isLeft)("cc-right",null==we.currentPosition?null:we.currentPosition.isRight)("app",we.userClientInfo.isApp),o.BMQ("data-aos-duration",we.animationDuration),o.R7$(5),o.JRh(we.scope.network.getResourceOrKeyName(null!==(l=we.header)&&void 0!==l?l:"")),o.R7$(2),o.SpI(" ",we.scope.network.getResourceOrKeyName(null!==(O=we.text)&&void 0!==O?O:"")," "),o.R7$(),o.Y8G("ngIf",null==we.tabs?null:we.tabs.length),o.R7$(2),o.AVh("darkColor",we.isDarkBackground("cc-button-reject")),o.R7$(),o.SpI(" ",we.scope.network.getResourceOrKeyName(null!==(F=null==we.buttons?null:we.buttons.reject)&&void 0!==F?F:"")," "),o.R7$(),o.AVh("darkColor",we.isDarkBackground("cc-button-accept")),o.R7$(),o.SpI(" ",we.scope.network.getResourceOrKeyName(null!==(se=we.acceptButtonText)&&void 0!==se?se:"")," "),o.R7$(),o.Y8G("ngIf",(null==we.links?null:we.links.length)||we.settings)}}function gi(v,p){if(1&v){const l=o.RV6();o.j41(0,"settings",27),o.mxI("isCookieSettingsOpenedChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.isCookieSettingsOpened,F)||(se.isCookieSettingsOpened=F),o.Njj(F)}),o.bIt("accept",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.accept())}),o.k0s()}if(2&v){const l=o.XpG(2);o.R50("isCookieSettingsOpened",l.isCookieSettingsOpened)}}function Ai(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,Bn,15,17,"div",2)(2,gi,1,1,"settings",3),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",!l.isCookieSettingsOpened&&!l.isHidden||l.isAnchorTagPresent()),o.R7$(),o.Y8G("ngIf",l.isCookieSettingsOpened)}}function pt(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",54)(1,"div",29)(2,"div",55)(3,"input",46),o.mxI("ngModelChange",function(F){const se=o.eBV(l).$implicit;return o.DH7(se.isChecked,F)||(se.isChecked=F),o.Njj(F)}),o.bIt("change",function(F){const se=o.eBV(l).$implicit,we=o.XpG(2).$implicit,We=o.XpG(3);return o.Njj(We.switchProvider(F,we,se))}),o.k0s()(),o.j41(4,"div",56)(5,"label",57),o.EFF(6),o.k0s()()()()}if(2&v){const l=p.$implicit;o.R7$(3),o.FS9("id",l.id),o.R50("ngModel",l.isChecked),o.R7$(2),o.FS9("for",l.id),o.R7$(),o.SpI(" ",l.caption," ")}}function Dt(v,p){if(1&v&&(o.j41(0,"div",52)(1,"div",53)(2,"div",29),o.DNE(3,pt,7,4,"div",40),o.k0s()()()),2&v){const l=o.XpG().$implicit;o.R7$(3),o.Y8G("ngForOf",l.providers)}}function cn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",44)(1,"div",45)(2,"input",46),o.mxI("ngModelChange",function(F){const se=o.eBV(l).$implicit;return o.DH7(se.isChecked,F)||(se.isChecked=F),o.Njj(F)}),o.bIt("change",function(F){const se=o.eBV(l).$implicit,we=o.XpG(3);return o.Njj(we.switchTab(F,se,se.providers))}),o.k0s()(),o.j41(3,"div",47)(4,"div",29)(5,"div",48)(6,"label",49),o.EFF(7),o.k0s()(),o.j41(8,"div",29)(9,"div",50),o.EFF(10),o.k0s()(),o.DNE(11,Dt,4,1,"div",51),o.k0s()()()}if(2&v){const l=p.$implicit,O=o.XpG(3);o.R7$(2),o.Y8G("id",l.id),o.R50("ngModel",l.isChecked),o.R7$(5),o.SpI(" ",O.scope.network.getResourceOrKeyName(l.caption)," "),o.R7$(3),o.SpI(" ",O.scope.network.getResourceOrKeyName(l.text)," "),o.R7$(),o.Y8G("ngIf",l.providers.length>0)}}function dt(v,p){if(1&v&&(o.j41(0,"div",41)(1,"div",29)(2,"div",42),o.DNE(3,cn,12,5,"div",43),o.k0s()()()),2&v){const l=o.XpG(2);o.Y8G("ngClass",o.eq3(2,Tt,!l.showConfigurations)),o.R7$(3),o.Y8G("ngForOf",l.tabs)}}function Et(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"button",59),o.bIt("click",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.setConfigurationsVisibility())}),o.EFF(2),o.k0s()()}if(2&v){const l=o.XpG(3);o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName("web_cookie_consent_configuration"))}}function hn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"button",59),o.bIt("click",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.accept())}),o.EFF(2),o.k0s()()}if(2&v){const l=o.XpG(3);o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName("web_cookie_consent_accept_all"))}}function $n(v,p){if(1&v&&(o.j41(0,"div",58),o.DNE(1,Et,3,1,"div",1)(2,hn,3,1,"div",1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("ngIf",!l.showConfigurations),o.R7$(),o.Y8G("ngIf",l.showConfigurations)}}function Ln(v,p){if(1&v&&(o.j41(0,"div",54)(1,"a",26),o.EFF(2),o.k0s()()),2&v){const l=p.$implicit,O=o.XpG(2);o.R7$(),o.Y8G("href",l.navigate,o.B4B),o.R7$(),o.JRh(O.scope.network.getResourceOrKeyName(l.caption))}}function Nt(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",28,0)(3,"div",29)(4,"div",30)(5,"h3"),o.EFF(6),o.k0s()()(),o.j41(7,"div",29)(8,"div",31),o.EFF(9),o.k0s()(),o.DNE(10,dt,4,4,"div",32),o.j41(11,"div",33)(12,"div",34)(13,"button",35),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.acceptAll())}),o.EFF(14),o.k0s()(),o.j41(15,"div",36)(16,"button",35),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.reject())}),o.EFF(17),o.k0s()(),o.DNE(18,$n,3,2,"div",37),o.k0s(),o.j41(19,"div",29)(20,"div",38)(21,"div",39),o.DNE(22,Ln,3,2,"div",40),o.k0s()()()()()}if(2&v){const l=o.XpG();o.R7$(6),o.JRh(l.scope.network.getResourceOrKeyName("web_cookie_consent_title")),o.R7$(3),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_cookie_consent_text")," "),o.R7$(),o.Y8G("ngIf",l.tabs&&l.tabs.length>0),o.R7$(4),o.JRh(l.scope.network.getResourceOrKeyName("web_cookie_consent_accept")),o.R7$(3),o.JRh(l.scope.network.getResourceOrKeyName("web_common_decline")),o.R7$(),o.Y8G("ngIf",l.tabs),o.R7$(4),o.Y8G("ngForOf",l.links)}}let Gt=(()=>{class v{constructor(l,O,F){this.animationService=l,this.cookieStatusService=O,this.configuration=Oe,this.acceptButtonText=this.buttons?.accept,this.isHidden=!0,this.isCookieSettingsOpened=!1,this.isBuildInConsentManager=!1,this.isRedesign=!1,this.showConfigurations=!1,this.isDarkBackground=se=>(0,S.UP)(se)===f.K.dark,this.isAnchorTagPresent=()=>window.location.href.includes("#cookie-consent"),this.scopeService=F,this.scope=F.getScope(),this.userClientInfo=F.getUserClientInfo(),this.cookieStatusService.isInitialized$.subscribe(()=>{this.currentPosition=this.cookieStatusService.currentPosition,this.fallsbackLang=this.configuration.fallsbackLang,this.header=this.configuration.header,this.text=this.configuration.text,this.buttons=this.configuration.buttons,this.acceptButtonText=this.buttons?.accept,this.links=this.configuration.links,this.animationDuration=this.configuration.animationDuration,this.settings=this.configuration.settings,this.tabs=this.cookieStatusService.getTabs(),this.hideOnInitIfStatusAllowed(),this.setAcceptButtonText()})}ngOnInit(){this.cookieStatusService.isBrowser&&Ee().init({duration:this.animationDuration}),this.isRedesign="Redesign2024"==this.scope.currentScope.network.settings.configurations.contentRenderEngine}isAnySwitcherUnChecked(){return this.tabs?.find(l=>!l.isChecked)}hideOnInitIfStatusAllowed(){this.isHidden=!(this.scope.profile.settings?.showConsent??1)}setAcceptButtonText(){const{accept:l,acceptSome:O=l}=this.buttons;this.acceptButtonText=this.isAnySwitcherUnChecked()?O:l}accept(){this.hide(),this.cookieStatusService.save()}reject(){this.hide(),this.tabs&&(this.tabs.forEach(l=>{l.isChecked=!1,l.providers.forEach(O=>{O.isChecked=!1})}),this.cookieStatusService.save())}hide(){this.animationService.hide(this.containerRef).finally(()=>{this.isHidden=!0,window.location.href=window.location.href.split("#")[0]})}close(){this.isHidden=!0,window.location.href=window.location.href.split("#")[0]+"#cc-close"}show(){this.isHidden=!1}switch(l){l.providers.forEach(O=>O.isChecked=l.isChecked),this.setAcceptButtonText()}openCookieSettings(){this.animationService.hide(this.containerRef).finally(()=>this.isCookieSettingsOpened=!this.isCookieSettingsOpened)}setConfigurationsVisibility(){this.showConfigurations=!0}switchTab(l,O,F){F.forEach(se=>{se.isChecked=O.isChecked})}switchProvider(l,O,F){F.isChecked||(O.isChecked=!1)}acceptAll(){this.hide(),this.tabs&&(this.tabs.forEach(l=>{l.isChecked=!0,l.providers.forEach(O=>{O.isChecked=!0})}),this.cookieStatusService.save())}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ze),o.rXU(st),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["cookie-consent-builtIn"]],viewQuery:function(O,F){if(1&O&&o.GBs(qe,5,o.aKT),2&O){let se;o.mGM(se=o.lsd())&&(F.containerRef=se.first)}},decls:2,vars:2,consts:[["container",""],[4,"ngIf"],["role","dialog","aria-live","polite","aria-label","cookieconsent","aria-describedby","cookieconsent:desc","class","cc-mobile-view cc-window cc-floating cc-bottom cc-shadow","data-aos","slide-up","data-aos-easing","ease-in-out",3,"cc-left","cc-right","app",4,"ngIf"],[3,"isCookieSettingsOpened","isCookieSettingsOpenedChange","accept",4,"ngIf"],["role","dialog","aria-live","polite","aria-label","cookieconsent","aria-describedby","cookieconsent:desc","data-aos","slide-up","data-aos-easing","ease-in-out",1,"cc-mobile-view","cc-window","cc-floating","cc-bottom","cc-shadow"],["type","button",1,"cc-close-button",3,"click"],[1,"cc-message"],["class","cc-switchers",4,"ngIf"],[1,"cc-compliance"],["aria-label","dismiss cookie message","role","button","tabindex","0","id","cc-button-reject",1,"cc-button","cc-button-reject",3,"click"],["aria-label","dismiss cookie message","role","button","tabindex","0","id","cc-button-accept",1,"cc-button","cc-button-accept",3,"click"],["class","cc-links",4,"ngIf"],[1,"cc-switchers"],["class","cc-switcher-item",4,"ngFor","ngForOf"],[1,"cc-switcher-item"],[1,"cc-switcher-caption"],[1,"cc-slider-label"],["type","checkbox",3,"ngModelChange","change","ngModel","ngModelOptions"],[1,"cc-slider","cc-round"],[1,"cc-links"],["class","cc-link-item",4,"ngIf"],["class","cc-link-item-splitter",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"cc-link-item"],[3,"click"],[1,"cc-link-item-splitter"],[3,"href"],[3,"isCookieSettingsOpenedChange","accept","isCookieSettingsOpened"],[1,"container","cc-wrapper-redesign","aos-animate"],[1,"row"],[1,"col-12","cc-heading-redesign"],[1,"col-12","cc-text-redesign"],[3,"ngClass",4,"ngIf"],[1,"row","mb-1","cc-buttons-wrapper-redesign"],[1,"col-4","cc-response-buttons-redesign"],[1,"btn","btn-outline-primary",3,"click"],[1,"col-3","cc-response-buttons-redesign"],["class","col-5 cc-configurations-buttons-redesign",4,"ngIf"],[1,"col-12","cc-links-wrapper-redesign"],[1,"col-md-5","col-9","cc-links-redesign"],["class","col-6",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"cc-configurations-redesign"],["class","row mb-1 mb-md-4",4,"ngFor","ngForOf"],[1,"row","mb-1","mb-md-4"],[1,"col-2","form-check","form-switch","cc-configurations-switches-redesign"],["type","checkbox",1,"form-check-input",3,"ngModelChange","change","id","ngModel"],[1,"col-10"],[1,"col-12","cc-configurations-labels-redesign"],["for","tab.id",1,""],[1,"col-12","cc-configurations-descriptions-redesign"],["class","row cc-configurations-providers-switches-wrapper-redesign",4,"ngIf"],[1,"row","cc-configurations-providers-switches-wrapper-redesign"],[1,"col-12"],[1,"col-6"],[1,"col-md-2","col-3","form-check","form-switch","cc-configurations-providers-switches-redesign"],[1,"col-md-10","col-9","cc-configurations-providers-labels-redesign"],[3,"for"],[1,"col-5","cc-configurations-buttons-redesign"],[1,"",3,"click"]],template:function(O,F){1&O&&o.DNE(0,Ai,3,2,"div",1)(1,Nt,23,7,"div",1),2&O&&(o.Y8G("ngIf",!F.isRedesign),o.R7$(),o.Y8G("ngIf",F.isRedesign&&(!F.isHidden||F.isAnchorTagPresent())))},dependencies:[a.YU,a.Sq,a.bT,et.Zm,et.BC,et.vS,vt],styles:['.cc-close-button{width:20px;text-align:center;right:20px;position:absolute;border:solid 1px;height:20px;font-weight:700}@media (max-width: 525px){.cc-mobile-view{transform:translate(-50%,-50%);top:50%;left:50%!important;height:-moz-fit-content;height:fit-content;width:90%!important}}.cc-bottom{bottom:24px}.cc-right{right:24px}.cc-left{left:24px}.cc-window{border-radius:1rem;background-color:#fff;position:fixed;overflow:hidden;display:flex;flex-wrap:nowrap;z-index:9999}.cc-window.cc-floating{padding:2rem;width:480px;flex-direction:column}.cc-window.cc-floating .cc-top-panel{display:flex;justify-content:flex-end}.cc-window.cc-floating .cc-top-panel .cc-close-button{border:none;cursor:pointer;font-size:18px;background-color:#fff}.cc-window.cc-floating .cc-message{margin-bottom:12px}.cc-window.cc-floating .cc-compliance{text-align:center;display:flex}.cc-window.cc-floating .cc-compliance .cc-button{text-decoration:none;font-size:15px;text-align:center;margin:0 10px;width:100%;border-radius:1rem;overflow:visible;line-height:45px;padding:0 30px;background-color:var(--color1-alpha70);color:#000}.cc-window.cc-floating .cc-compliance .cc-button:hover{background-color:var(--color1-alpha80)}.cc-window.cc-floating .cc-compliance .cc-button-reject{background-color:#f0f0f0;color:#000}.cc-window.cc-floating .cc-compliance .cc-button-reject:hover{background-color:#d9d9d9}.cc-window.cc-floating .cc-link{display:inline-block;padding:2.4px}.cc-window.cc-floating .cc-link:hover{text-decoration:underline}.cc-window.cc-floating .cc-switchers{padding:24px 0;display:flex;justify-content:center;flex-direction:column}.cc-window.cc-floating .cc-switchers .cc-switcher-item{display:flex;justify-content:space-between;align-items:center;padding:1rem 0}.cc-window.cc-floating .cc-switchers .cc-switcher-item:not(:first-child){border-top:1px solid #f0f0f0}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-switcher-caption{margin:0}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label{position:relative;width:54px;height:24px;margin:0}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider{position:absolute;cursor:pointer;inset:0 20px 0 -20px;background-color:#f0f0f0;transition:.4s}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider.cc-round{border-radius:24px}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider.cc-round:before{background-color:var(--color1);border-radius:50%}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider.cc-round-disabled{border-radius:24px}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider.cc-round-disabled:before{background-color:#d0d0d0;border-radius:50%}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider:before{position:absolute;content:"";height:20px;width:20px;left:3px;bottom:2px;background-color:#d0d0d0;transition:.4s}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label input{opacity:0;width:0;height:0}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label input:checked+.cc-slider{background-color:#f0f0f0}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label input:checked+.cc-slider:before{background-color:var(--color1);left:-20px}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label input:focus+.cc-slider{box-shadow:0 0 1px var(--color1)}.cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label input:checked+.cc-slider:before{transform:translate(52px)}.cc-window.cc-floating .cc-links{padding:12px;display:flex;justify-content:center;flex-wrap:wrap}.cc-window.cc-floating .cc-links .cc-link-item a{text-decoration:underline;cursor:pointer;margin:10px;color:#000}.cc-window.cc-floating .cc-links .cc-link-item a:hover,.cc-window.cc-floating .cc-links .cc-link-item a:visited,.cc-window.cc-floating .cc-links .cc-link-item a:focus{color:#000}.cc-window.cc-floating .cc-links .cc-link-item-splitter:before{content:"|";margin:0 10px}.cc-window.cc-floating .cc-revoke{cursor:pointer;padding:1rem;text-decoration:underline;background-color:var(--color1-alpha30)}.cc-window.cc-floating .cc-revoke.cc-bottom{bottom:6px;border-radius:1rem}.cc-window.cc-floating .cc-revoke.cc-right{right:36px}.cc-window.cc-floating .cc-revoke.cc-left{left:36px}.cc-window.cc-floating .cc-revoke.cc-animate{transform:translateY(2em);transition:transform 1s ease}.cc-window.cc-floating .cc-revoke:hover{transform:translateY(0)}.darkColor{color:#fff}@media (max-width: 991px){.cc-window.cc-floating{left:24px}.cc-window.cc-floating .cc-compliance{flex-direction:column}.cc-window.cc-floating .cc-compliance .cc-button{width:unset;margin:0}.cc-window.cc-floating .cc-compliance .cc-button:last-child{margin-bottom:1rem}}.cc-shadow{box-shadow:5px 1px 5px 2px #0000001f,0 1px 5px 2px #0000001f,0 1px 5px 2px #0000001f}@media (prefers-color-scheme: dark){.app .cc-window{background-color:#000!important}.app .cc-window.cc-floating .cc-top-panel .cc-close-button{background-color:#000}.app .cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-switcher-caption{color:#fff}.app .cc-window.cc-floating .cc-switchers .cc-switcher-item:not(:first-child){border-color:#212121}.app .cc-window.cc-floating .cc-switchers .cc-switcher-item .cc-slider-label .cc-slider{background-color:#212121}.app .cc-window.cc-floating .cc-compliance .cc-button-reject{color:#fff;background-color:#212121}.app .cc-window.cc-floating .cc-compliance .cc-button-reject:hover{background-color:#3b3b3b}.app .cc-window.cc-floating .cc-links .cc-link-item a{color:#fff}.app .cc-window.cc-floating .cc-links .cc-link-item a:hover,.app .cc-window.cc-floating .cc-links .cc-link-item a:visited,.app .cc-window.cc-floating .cc-links .cc-link-item a:focus{color:#fff}}.cc-wrapper-redesign{border:.063rem solid;border-radius:1rem;padding:1.25rem;z-index:9999;position:fixed;bottom:.625rem;right:.625rem;background-color:var(--backgroundColor);width:50%;max-width:36.25rem}.cc-heading-redesign{display:flex;justify-content:center;opacity:60%;margin-bottom:1rem}.cc-heading-redesign h3{font-size:1.125rem;font-weight:600}.cc-text-redesign{font-size:.875rem;margin-bottom:2rem}.cc-links-wrapper-redesign{display:flex;justify-content:end}.cc-links-redesign{display:flex;justify-content:center;font-size:.625rem;transform:translate(16%)}.cc-response-buttons-redesign{display:flex;justify-content:center}.cc-response-buttons-redesign button{font-size:.875rem;font-weight:400;text-transform:uppercase}.cc-configurations-buttons-redesign{display:flex;justify-content:center}.cc-configurations-buttons-redesign button{font-size:.875rem;font-weight:600;text-transform:uppercase;background-color:var(--backgroundColor);border:1px solid transparent;padding:.375rem .75rem}.cc-configurations-redesign{padding:0 2rem 2rem}.cc-configurations-labels-redesign{margin-bottom:.5rem}.cc-configurations-labels-redesign label{color:var(--textColor);font-size:.875rem;font-weight:700}.cc-configurations-providers-labels-redesign label{font-size:.875rem;color:var(--textColor)}.cc-configurations-descriptions-redesign{font-size:.625rem;font-weight:600;margin-bottom:1rem}.cc-configurations-switches-redesign{display:flex;justify-content:right}.cc-configurations-switches-redesign input{display:unset;margin-left:0!important}.cc-configurations-providers-switches-redesign{padding-left:0}.cc-configurations-providers-switches-redesign input{display:unset;margin-left:0!important}.cc-configurations-providers-switches-wrapper-redesign{margin-left:0!important}.cc-configurations-hide-redesign{display:none}@media (max-width: 768px){.cc-wrapper-redesign{width:70%}.cc-heading-redesign{margin-bottom:.5rem}.cc-heading-redesign h3{font-size:1rem}.cc-text-redesign{font-size:.75rem;margin-bottom:.5rem}.cc-response-buttons-redesign button{padding:.25rem;font-size:.75rem}.cc-configurations-buttons-redesign button{font-size:.75rem;padding:.25rem}.cc-configurations-redesign{padding:.5rem 1rem 1rem}.cc-configurations-labels-redesign{margin-bottom:.25rem}.cc-configurations-labels-redesign label{font-size:.75rem}.cc-configurations-descriptions-redesign{margin-bottom:.25rem}.cc-configurations-providers-labels-redesign label{font-size:.75rem}}@media (max-width: 525px){.cc-wrapper-redesign{transform:translate(-50%,-50%);top:50%;left:50%;height:95%;width:95%;overflow:scroll;scrollbar-width:none}}\n'],encapsulation:2})}}return v})();function on(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",1)(1,"div",2)(2,"p"),o.EFF(3),o.k0s(),o.j41(4,"p")(5,"a",3),o.EFF(6),o.k0s()()(),o.j41(7,"div",4),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.consentCookies())}),o.EFF(8,"OK"),o.k0s()()}if(2&v){const l=o.XpG();o.AVh("closed",l.isClosed),o.R7$(3),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_root_cookiesConsent_text")," "),o.R7$(3),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_root_cookiesConsent_privacyPolicy"))}}let sn=(()=>{class v{constructor(l,O){this.show=!0,this.isClosed=!1,this.http=new _.Qq(O),this.scopeService=l,this.scope=l.getScope(),this.miniScope=l.getMiniScope(),this.show=this.getShow()}getShow(){return!this.scope.profile.hasCookiesConsented&&!this.scope.profile.isRegistered}consentCookies(){this.isClosed=!0,this.http.post(`${this.miniScope.apiEndpoint}profiles/cookiesConsent`,null).toPromise().then(()=>{this.scope.profile.hasCookiesConsented=(new Date).toISOString(),this.show=!1},function(){console.error("Could not obtain Cookies Consent.")})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(_.JV))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["cookie-consent-simple"]],decls:1,vars:1,consts:[["class","cookiesConsent",3,"closed",4,"ngIf"],[1,"cookiesConsent"],[1,"cookiesConsent-text"],["ui-sref","app.privacyPolicy"],[1,"btn","btn-green","btn-block","btn-lg","cookiesConsent-button",3,"click"]],template:function(O,F){1&O&&o.DNE(0,on,9,4,"div",0),2&O&&o.Y8G("ngIf",F.show)},dependencies:[a.bT],styles:[".cookiesConsent[_ngcontent-%COMP%]{position:fixed;bottom:15px;right:15px;width:300px;box-shadow:0 0 10px var(--black-10);border-radius:6px;animation-name:_ngcontent-%COMP%_slideInUp;animation-duration:1s;animation-fill-mode:both;animation-delay:2s;z-index:1000}.cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]{padding:.5em 2em 1em;background-color:#e6e6e6;border-top-left-radius:4px;border-top-right-radius:4px}.cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--dark-gray)}.cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--medium-gray)}.cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-button[_ngcontent-%COMP%]{margin:0;border-top-left-radius:0;border-top-right-radius:0}.cookiesConsent.closed[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_slideOutDown;animation-delay:0s}@media all and (max-width: 500px){.cookiesConsent[_ngcontent-%COMP%]{bottom:10px;left:10px;right:10px;width:auto}.cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]{padding:1em 1.5em}.cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:inline;font-size:1em}}@keyframes _ngcontent-%COMP%_slideInUp{0%{transform:translate3d(0,120%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes _ngcontent-%COMP%_slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,120%,0)}}@media (prefers-color-scheme: dark){.app[_ngcontent-%COMP%]   .cookiesConsent[_ngcontent-%COMP%]{box-shadow:0 0 10px var(--white-40)}.app[_ngcontent-%COMP%]   .cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]{background-color:#333}.app[_ngcontent-%COMP%]   .cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--white-90)!important}.app[_ngcontent-%COMP%]   .cookiesConsent[_ngcontent-%COMP%]   .cookiesConsent-text[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--white-60)}}"]})}}return v})();function It(v,p){1&v&&(o.j41(0,"div"),o.nrm(1,"cookie-consent-builtIn"),o.k0s())}function Ot(v,p){1&v&&(o.j41(0,"div"),o.nrm(1,"cookie-consent-simple"),o.k0s())}function zt(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,It,2,0,"div",0)(2,Ot,2,0,"div",0),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",l.isBuildInConsentManager()),o.R7$(),o.Y8G("ngIf",l.isSimpleConsentManager())}}let un=(()=>{class v{constructor(l){this.scopeService=l,this.scope=l.getScope(),this.manager=this.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration?.Manager??xe.None,this.isConsentManagerEnabled=this.scope.globalSettings.configurations.global_module_configuration.ConsentManagementModuleEnabled}isBuildInConsentManager(){return this.manager===xe.BuiltIn}isSimpleConsentManager(){return this.manager===xe.Simple}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["cookie-consent-component-manager"]],decls:1,vars:1,consts:[[4,"ngIf"]],template:function(O,F){1&O&&o.DNE(0,zt,3,2,"div",0),2&O&&o.Y8G("ngIf",F.isConsentManagerEnabled)},dependencies:[a.bT,Gt,sn]})}}return v})();var Pn=M(8992);let ci=(()=>{class v{constructor(l,O){this.http=l,this.scopeService=O,this.apiEndpoint="",this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint}getWorkflowTemplate(l,O,F,se){var we=this;return(0,$e.A)(function*(){const We=O?"?preview=true":"";let gt=We;return We?(F&&(gt+=`&articleId=${F}`),se&&(gt+=`&revisionId=${se}`)):F&&(gt=`?articleId=${F}`),we.http.get(`${we.apiEndpoint}workflow/template/${l}${gt}`).toPromise()})()}saveWorkflowData(l){var O=this;return(0,$e.A)(function*(){return O.http.post(`${O.apiEndpoint}workflow/submission`,l).toPromise()})()}getWorkflowUploadBaseUrl(){return`${this.apiEndpoint}workflow/attachment/`}deleteSubmittedFile(l){var O=this;return(0,$e.A)(function*(){return O.http.delete(`${O.getWorkflowUploadBaseUrl()}${l}`).toPromise()})()}getEmbeddableWorkflowList(){var l=this;return(0,$e.A)(function*(){return l.http.get(`${l.apiEndpoint}workflow/list/`).toPromise()})()}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac})}}return v})();var Ei=M(3527),Hi=M(4539),mo=M(6511),xo=M(3425);let vr=(()=>{class v{constructor(l,O){this.sanitizer=l,this.translationService=O}transform(l){var O=this;return(0,$e.A)(function*(){if(!l)return"";const F=[l];try{const We=`<span>${(yield O.translationService.translateByUserLanguageCode(F))[0].translation}</span>`;return O.sanitizer.bypassSecurityTrustHtml(We)}catch(se){return console.error(se),l}})()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16),o.rXU(Ei.M,16))}}static{this.\u0275pipe=o.EJ8({name:"apicodoTranslateText",type:v,pure:!0})}}return v})();const rn=["workflowForm"],en=["workflowFileUploader"],Zn=()=>({class:"pull-right"});function Di(v,p){if(1&v&&(o.j41(0,"div")(1,"p"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName("web_common_workflow_preview_title"))}}function po(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"div",6),o.nI1(2,"apicodoTranslateText"),o.nI1(3,"async"),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("innerHTML",o.bMT(3,3,o.bMT(2,1,l.instructions)),o.npT)}}function nr(v,p){if(1&v&&(o.j41(0,"div")(1,"h4"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG(3);o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName("web_workflows_uploaded_files_on_server"))}}function Xo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"dx-button",9),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.sendForm())}),o.k0s()()}if(2&v){const l=o.XpG(3);o.R7$(),o.Y8G("text",l.scope.currentScope.network.getResourceOrKeyName("web_common_workflow_submit"))("elementAttr",o.lJ4(3,Zn))("disabled",l.preview||l.isSaving)}}function Hn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div"),o.nrm(1,"dx-form",null,0),o.DNE(3,nr,3,1,"div",2),o.j41(4,"dx-file-uploader",7,1),o.bIt("onFilesUploaded",function(F){o.eBV(l);const se=o.XpG(2);return o.Njj(se.onFilesUploaded(F))})("onUploaded",function(F){o.eBV(l);const se=o.XpG(2);return o.Njj(se.onUploaded(F))})("onValueChanged",function(F){o.eBV(l);const se=o.XpG(2);return o.Njj(se.onValueChanged(F))}),o.k0s(),o.nrm(6,"div",8),o.DNE(7,Xo,2,4,"div",2),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(3),o.Y8G("ngIf",l.templateDefinition.withAttachments),o.R7$(),o.Y8G("labelText",l.scope.network.getResourceOrKeyName("web_workflow_or_drop_file_here"))("readyToUploadMessage",l.scope.network.getResourceOrKeyName("web_workflow_ready_to_upload"))("selectButtonText",l.scope.network.getResourceOrKeyName("web_workflow_select_file_text"))("uploadedMessage",l.scope.network.getResourceOrKeyName("web_workflow_uploaded_message"))("uploadFailedMessage",l.scope.network.getResourceOrKeyName("web_workflow_upload_failed_message"))("multiple",l.fileUploaderOptions.multiple)("accept",l.fileUploaderOptions.accept)("allowedFileExtensions",l.fileUploaderOptions.allowedFileExtensions)("maxFileSize",l.scope.globalSettings.uploadMaxFileSizeInBytes)("uploadUrl",l.fileUploaderOptions.uploadUrl)("visible",l.templateDefinition.withAttachments),o.R7$(3),o.Y8G("ngIf",!l.preview&&l.templateDefinition.formDefinitionJSON)}}function ui(v,p){if(1&v&&(o.j41(0,"div")(1,"h2"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName("web_common_workflow_completed"))}}function bi(v,p){if(1&v&&(o.j41(0,"div")(1,"h2"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName("domain_workflow_article_read_receipt_completed"))}}function ao(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"h1",4),o.nI1(2,"apicodoTranslateText"),o.nI1(3,"async"),o.DNE(4,po,4,5,"div",2),o.j41(5,"div",5),o.DNE(6,Hn,8,13,"div",2)(7,ui,3,1,"div",2)(8,bi,3,1,"div",2),o.k0s()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("innerHTML",o.bMT(3,7,o.bMT(2,5,l.workflowName)),o.npT),o.R7$(3),o.Y8G("ngIf",l.templateDefinition.multipleUse||!l.isOneTimeCompleted),o.R7$(2),o.Y8G("ngIf",l.templateDefinition.multipleUse||!l.isOneTimeCompleted||l.preview),o.R7$(),o.Y8G("ngIf",l.isOneTimeCompleted&&"WorkflowTemplateArticleRelated"!==l.workflowType),o.R7$(),o.Y8G("ngIf",l.isOneTimeCompleted&&"WorkflowTemplateArticleRelated"==l.workflowType)}}function Wi(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"div",4),o.nI1(2,"apicodoTranslateText"),o.nI1(3,"async"),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("innerHTML",o.bMT(3,3,o.bMT(2,1,l.brokenCordovaAppHint)),o.npT)}}function Ko(v,p){if(1&v&&(o.nrm(0,"h1",4),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG();o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.error)),o.npT)}}let Zo=(()=>{class v{constructor(l,O,F,se,we){this.workflowService=l,this.translationService=O,this.scopeService=F,this.el=se,this.renderer=we,this.uploaderVisible=!1,this.ispreview=!1,this.isOneTimeCompleted=!1,this.isBrokenAndroidCordovaApp=!1,this.brokenCordovaAppHint="",this.instructions="",this.version="",this.workflowName="",this.workflowType="",this.attachmentData=[],this.templateDefinition={},this.reloadComplete=!1,this.uploaderStore={},this.readOnly=!1,this.preview=!1,this.isSaving=!1,this.error="",this.uploadedFiles=new Map,this.Oculus=window.Oculus,this.scope=this.scopeService.getScope(),(0,oe.Hg)(this.scope.network.settings.languageCode),this.uploaderVisible=!0;var We="*",gt=[],Ft=!0;this.isBrokenAndroidCordovaApp=this.scopeService.getUserClientInfo().androidVersion>=13,this.brokenCordovaAppHint=this.scope.network.getResourceOrKeyName("web_broken_android_13_app_upload_hint"),this.isBrokenAndroidCordovaApp&&(We="image/jpg, image/jpeg, image/gif, image/png",gt=[".jpg",".jpeg",".gif",".png"],Ft=!0),this.fileUploaderOptions={labelText:this.scope.network.getResourceOrKeyName("web_workflow_or_drop_file_here"),readyToUploadMessage:this.scope.network.getResourceOrKeyName("web_workflow_ready_to_upload"),selectButtonText:this.scope.network.getResourceOrKeyName("web_workflow_select_file_text"),uploadedMessage:this.scope.network.getResourceOrKeyName("web_workflow_uploaded_message"),uploadFailedMessage:this.scope.network.getResourceOrKeyName("web_workflow_upload_failed_message"),multiple:Ft,accept:We,allowedFileExtensions:gt,value:[],maxFileSize:this.scope.globalSettings.uploadMaxFileSizeInBytes,uploadMode:"useButtons",uploadUrl:this.workflowService.getWorkflowUploadBaseUrl(),onValueChanged:function(pn){pn.element.find(".dx-fileuploader-upload-button").hide(),pn.value.forEach(fi=>{pn.component.option("isValid",!0),fi.size>this.scope.globalSettings.uploadMaxFileSizeInBytes&&pn.component.option("isValid",!1)})},onFilesUploaded:function(pn){this.saveWorkflowData()},onUploaded:function(pn){var fi=JSON.parse(pn.request.responseText);this.uploadedFiles.set(fi,pn.file)}}}ngOnInit(){this.loadWorkflowData(),this.element=this.el.nativeElement}ngAfterViewInit(){this.formInstance=this.formComponent.instance}initializeForm(l){this.formComponent.instance.resetValues(),this.loadWorkflowData()}sendForm(){this.formInstance.validate().isValid&&(!this.templateDefinition.withAttachments||this.fileUploader.isValid)&&(this.templateDefinition.submissionDataJSON=JSON.stringify(this.formInstance.option("formData")),"{}"!==this.templateDefinition.submissionDataJSON&&this.templateDefinition.submissionDataJSON&&(this.ispreview||(this.isSaving=!0,this.reloadComplete=!1,this.templateDefinition.withAttachments&&this.fileUploader.value.length?this.fileUploader.instance.upload():this.saveWorkflowData())))}saveWorkflowData(){var l=this;return(0,$e.A)(function*(){l.isSaving=!0,l.templateDefinition.oculusGuid=l.OculusTracker?l.OculusTracker.guid:null,l.templateDefinition.attachments=[],l.uploadedFiles.forEach((O,F)=>{l.templateDefinition.attachments.push({id:F,fileName:O.name})});try{if(yield l.workflowService.saveWorkflowData(l.templateDefinition),l.OculusTracker)try{l.OculusTracker.click()}catch(O){console.log("OCULUS CLICK FAILED",O)}l.fileUploader&&(l.fileUploader.instance.reset(),l.uploadedFiles.clear()),l.loadWorkflowData(),(0,Pn.A)({message:l.scope.currentScope.network.getResourceOrKeyName("web_workflows_final_submission_success"),position:{my:"center center",at:"center center"},onShown:()=>{l.initializeForm({component:l.formInstance}),l.isSaving=!1},maxWidth:"540px"},"success",3e3)}catch(O){l.uploadedFiles.size&&(l.fileUploader.instance.reset(),l.fileUploader.instance.option("value",Array.from(l.uploadedFiles.values())),l.uploadedFiles.forEach((F,se)=>{l.workflowService.deleteSubmittedFile(se)}),l.uploadedFiles.clear()),(0,Pn.A)({message:l.scope.currentScope.network.getResourceOrKeyName("web_workflows_final_submission_error"),position:{my:"center center",at:"center center"},onShown:()=>{l.isSaving=!1},maxWidth:"540px"},"error",3e3),console.log(O)}})()}loadWorkflowData(){this.workflowService.getWorkflowTemplate(this.workflowid,this.ispreview,this.articleid,this.revisionid).then(l=>{l?this.processTemplateData(l):this.error="Workflow does not exist"},l=>{this.error="Error loading workflow"})}processTemplateData(l){this.workflowType=l.workflowType,this.templateDefinition=l,this.templateDefinition.articleid=this.articleid,this.isOneTimeCompleted=l.isOneTimeCompleted,this.version=l.version,this.instructions=l.fillInstructions,this.preview=this.ispreview||l.isDraft,this.workflowName=l.name;const O=JSON.parse(this.templateDefinition.formDefinitionJSON);if(O){O.labelLocation=O.items.some(cr=>cr.label.text.length>20)?"top":"left",O.labelMode="floating";var F=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==F){var se=this.scope.profile,we=this.scope.network.settings.languagePack.split("-")[0];if(null!=se.activeUserLanguage?.vendorLanguageCode&&we!=se.activeUserLanguage?.vendorLanguageCode){var We=[],gt=[],Ft=[],pn=[],fi=[];O.items.forEach(cr=>{"dxTextArea"===cr.editorType&&(cr.editorOptions.minHeight=25,cr.editorOptions.maxHeight=500,cr.editorOptions.autoResizeEnabled=!0),We.push(cr.helpText),gt.push(cr.label.text),Ft.push(cr.editorOptions.placeholder),pn.push(cr.editorOptions.switchedOffText),fi.push(cr.editorOptions.switchedOnText)});var _o=We.concat(gt).concat(Ft).concat(pn).concat(fi);this.translationService.translateByUserLanguageCode(_o).then(cr=>{for(var ds=We.length,Ss=0;Ss<ds;Ss++)O.items[Ss].helpText=cr[Ss].translation,O.items[Ss].label.text=cr[Ss+ds].translation,O.items[Ss].editorOptions.placeholder=cr[Ss+2*ds].translation,O.items[Ss].editorOptions.switchedOffText=cr[Ss+3*ds].translation,O.items[Ss].editorOptions.switchedOnText=cr[Ss+4*ds].translation;this.formInstance.option(O);var Zs=JSON.parse(this.templateDefinition.submissionDataJSON);this.formInstance.option("formData",Zs),this.preview&&this.formInstance.validate()})}else{O.items.forEach(cr=>{"dxTextArea"===cr.editorType&&(cr.editorOptions.minHeight=25,cr.editorOptions.maxHeight=500,cr.editorOptions.autoResizeEnabled=!0)}),O.labelMode="floating",this.formInstance.option(O);var Po=JSON.parse(this.templateDefinition.submissionDataJSON);this.formInstance.option("formData",Po),this.preview&&this.formInstance.validate()}}else O.items.forEach(ds=>{"dxTextArea"===ds.editorType&&(ds.editorOptions.minHeight=25,ds.editorOptions.maxHeight=500,ds.editorOptions.autoResizeEnabled=!0)}),this.formInstance.option(O),Po=JSON.parse(this.templateDefinition.submissionDataJSON),this.formInstance.option("formData",Po),this.preview&&this.formInstance.validate()}if(this.reloadComplete=!0,!this.preview&&(this.templateDefinition.multipleUse||!l.isOneTimeCompleted)&&(this.OculusTracker=this.Oculus.trackWorkflowImpression(this.element,{c:this.scope.currentChapter.slug,n:this.scope.network.slug,iw:l.id,iwt:l.workflowTemplateId})),this.templateDefinition.withAttachments){this.uploaderVisible=!0;var Ro="*",Rr=[],br=!0;this.isBrokenAndroidCordovaApp=this.scopeService.getUserClientInfo().androidVersion>=13,this.brokenCordovaAppHint=this.scope.network.getResourceOrKeyName("web_broken_android_13_app_upload_hint"),this.isBrokenAndroidCordovaApp&&(Ro="image/jpg, image/jpeg, image/gif, image/png",Rr=[".jpg",".jpeg",".gif",".png"],br=!0),this.fileUploaderOptions={labelText:this.scope.network.getResourceOrKeyName("web_workflow_or_drop_file_here"),readyToUploadMessage:this.scope.network.getResourceOrKeyName("web_workflow_ready_to_upload"),selectButtonText:this.scope.network.getResourceOrKeyName("web_workflow_select_file_text"),uploadedMessage:this.scope.network.getResourceOrKeyName("web_workflow_uploaded_message"),uploadFailedMessage:this.scope.network.getResourceOrKeyName("web_workflow_upload_failed_message"),multiple:br,accept:Ro,allowedFileExtensions:Rr,value:[],maxFileSize:this.scope.globalSettings.uploadMaxFileSizeInBytes,uploadMode:"useButtons",uploadUrl:this.workflowService.getWorkflowUploadBaseUrl(),onValueChanged:function(cr){cr.element.find(".dx-fileuploader-upload-button").hide(),cr.value.forEach(ds=>{cr.component.option("isValid",!0),ds.size>this.scope.globalSettings.uploadMaxFileSizeInBytes&&cr.component.option("isValid",!1)})},onFilesUploaded:function(cr){this.saveWorkflowData()},onUploaded:function(cr){var ds=JSON.parse(cr.request.responseText);this.uploadedFiles.set(ds,cr.file)}}}}onUploaded(l){const O=JSON.parse(l.request.responseText);this.uploadedFiles.set(O,l.file)}onFilesUploaded(l){this.saveWorkflowData()}onValueChanged(l){l.element.querySelectorAll(".dx-fileuploader-upload-button").forEach(F=>{this.renderer.setStyle(F,"display","none")}),l.component.option("isValid",!0),l.value.forEach(F=>{F.size>this.scope.globalSettings.uploadMaxFileSizeInBytes&&l.component.option("isValid",!1)})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ci),o.rXU(Ei.M),o.rXU(b.A),o.rXU(o.aKT),o.rXU(o.sFG))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-workflow-renderer"]],viewQuery:function(O,F){if(1&O&&(o.GBs(rn,5),o.GBs(en,5)),2&O){let se;o.mGM(se=o.lsd())&&(F.formComponent=se.first),o.mGM(se=o.lsd())&&(F.fileUploader=se.first)}},inputs:{workflowid:"workflowid",ispreview:"ispreview",articleid:"articleid",revisionid:"revisionid"},decls:4,vars:4,consts:[["workflowForm",""],["workflowFileUploader",""],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[1,"dx-viewport"],[1,"text",3,"innerHTML"],["uploadMode","useButtons","name","file",3,"onFilesUploaded","onUploaded","onValueChanged","labelText","readyToUploadMessage","selectButtonText","uploadedMessage","uploadFailedMessage","multiple","accept","allowedFileExtensions","maxFileSize","uploadUrl","visible"],[1,"divider",2,"margin-top","12px"],["type","default",3,"onClick","text","elementAttr","disabled"]],template:function(O,F){1&O&&o.DNE(0,Di,3,1,"div",2)(1,ao,9,9,"div",2)(2,Wi,4,5,"div",2)(3,Ko,3,5,"h1",3),2&O&&(o.Y8G("ngIf",F.preview),o.R7$(),o.Y8G("ngIf",!F.error&&!F.readOnly),o.R7$(),o.Y8G("ngIf",F.isBrokenAndroidCordovaApp),o.R7$(),o.Y8G("ngIf",F.error))},dependencies:[a.bT,Hi.e,mo.m,xo.o,a.Jj,vr]})}}return v})();var xr=M(2925);let hr=(()=>{class v{constructor(l,O){this.http=l,this.scopeService=O,this.apiEndpoint="",this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint}search(l,O,F){var se=this;return(0,$e.A)(function*(){return O||(O=1),F||(F=20),se.http.post(se.apiEndpoint+"pixabay/search",{query:l,language:2,page:O,perPage:F}).toPromise()})()}create(l){var O=this;return(0,$e.A)(function*(){return O.http.post(O.apiEndpoint+"pixabay/create",l).toPromise()})()}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac})}}return v})();var Rt=M(3349),mn=M(8914),pi=M(827),Ti=M(862);function lo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",17),o.nrm(2,"img",18),o.k0s(),o.nrm(3,"br"),o.j41(4,"p"),o.EFF(5),o.j41(6,"dx-text-box",19),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.imageData.tags,F)||(se.imageData.tags=F),o.Njj(F)}),o.k0s()(),o.j41(7,"p"),o.EFF(8),o.j41(9,"span"),o.EFF(10),o.k0s()(),o.j41(11,"p"),o.EFF(12),o.j41(13,"span"),o.EFF(14),o.k0s()(),o.j41(15,"div")(16,"input",20),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.alwaysShowImageDescription,F)||(se.alwaysShowImageDescription=F),o.Njj(F)}),o.k0s(),o.j41(17,"label",21),o.EFF(18),o.k0s(),o.nrm(19,"br"),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(2),o.Y8G("src",null==l.imageData?null:l.imageData.largeImageURL,o.B4B),o.R7$(3),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_asset_pixabay_image_tags"),": "),o.R7$(),o.R50("value",l.imageData.tags),o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_asset_pixabay_image_source"),": "),o.R7$(2),o.JRh(l.imageData.pageURL),o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_asset_pixabay_image_author"),": "),o.R7$(2),o.JRh(l.imageData.user),o.R7$(2),o.Y8G("checked",l.alwaysShowImageDescription),o.R50("ngModel",l.alwaysShowImageDescription),o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_show_description_checkbox")," ")}}function Eo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"img",22),o.bIt("click",function(){const F=o.eBV(l).$implicit,se=o.XpG();return o.Njj(se.selectImage(F))}),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("src",l.largeImageURL,o.B4B)}}function Jo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"img",22),o.bIt("click",function(){const F=o.eBV(l).$implicit,se=o.XpG();return o.Njj(se.selectImage(F))}),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("src",l.largeImageURL,o.B4B)}}function fr(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"img",22),o.bIt("click",function(){const F=o.eBV(l).$implicit,se=o.XpG();return o.Njj(se.selectImage(F))}),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("src",l.largeImageURL,o.B4B)}}function Gr(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"img",22),o.bIt("click",function(){const F=o.eBV(l).$implicit,se=o.XpG();return o.Njj(se.selectImage(F))}),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("src",l.largeImageURL,o.B4B)}}let Yn=(()=>{class v{constructor(l,O){this.scopeService=l,this.pixabayService=O,this.chunks=[],this.error=!1,this.working=!1,this.submitBtnOptions={icon:"add",text:"",onClick:()=>{this.submitRequest()}},this.submitAndCloseBtnOptions={icon:"fa fa-check",text:"",onClick:()=>{this.submitAndClose()}},this.cancelBtnOptions={icon:"back",text:"",onClick:()=>{this.visiblePopup=!1}},this.scope=this.scopeService.getScope(),this.imageData=null,this.searchTerm="",this.data={},this.delay=2e3,this.pageSize=12,this.totalPages=1,this.currentPage=1,this.visiblePopup=!1,this.alwaysShowImageDescription=this.scope.currentScope.network.settings.configurations.alwaysShowImageDescriptionDefaultValue,this.timerId=null,this.searchBox={valueChangeEvent:"keyup",placeholder:this.scope.currentScope.network.getResourceOrKeyName("web_asset_pixabay_search_placeholder"),onValueChanged:se=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.searchTerm!=se.value&&(this.currentPage=1),this.searchTerm=se.value,this.search(this.searchTerm)},this.delay)}},this.search=se=>{this.pixabayService.search(se,this.currentPage,this.pageSize).then(we=>{this.data=we,this.totalPages=we.total/this.pageSize,this.data=JSON.parse(JSON.stringify(we));var We=Math.ceil(this.pageSize/4);we.hits.length<this.pageSize&&(We=Math.ceil(we.hits.length/4)),this.chunks=this.spliceIntoChunks(we.hits,We),this.totalPages=Math.ceil(this.totalPages)})},this.selectImage=se=>{this.imageData=se,this.visiblePopup=!0},this.submitAndClose=()=>{this.submitRequest(),this.dismiss&&this.dismiss()},this.goNext=()=>{this.currentPage<this.totalPages&&(this.currentPage++,this.search(this.searchTerm))},this.goPrev=()=>{1!=this.currentPage&&(this.currentPage--,this.search(this.searchTerm))},this.popupOptions={width:"100%",height:"95vh",container:".modal-content",contentTemplate:"info",showTitle:!1,title:"Information",dragEnabled:!1,closeOnOutsideClick:!0,showCloseButton:!1,position:{at:"center",my:"center"},bindingOptions:{visible:"$ctrl.visiblePopup","position.of":"positionOf"},toolbarItems:[{widget:"dxButton",toolbar:"bottom",location:"before",options:{icon:"add",text:"",onClick:()=>{this.submitRequest()}}},{widget:"dxButton",toolbar:"bottom",location:"before",options:{icon:"fa fa-check",text:"",onClick:()=>{this.submitAndClose()}}},{widget:"dxButton",toolbar:"bottom",location:"after",options:{icon:"back",text:"",onClick:()=>{this.visiblePopup=!1,this.imageData=null}}}]}}ngOnInit(){this.search(this.searchTerm)}submitRequest(){this.visiblePopup=!1;var l=1280,O={articleId:this.callerdata.articleId,blobId:new xr.A,staticArticleId:this.callerdata.staticArticleId,snipId:this.callerdata.snipId,sponsoredArticleId:this.callerdata.sponsoredArticleId,networkId:0,chapterId:0,eventId:this.callerdata.eventId,author:this.imageData.user,source:this.imageData.pageURL,sourceUrl:this.imageData.largeImageURL,text:this.imageData.tags,title:this.imageData.tags,width:this.imageData.imageWidth>this.imageData.imageHeight?l:Math.ceil(l/this.imageData.imageHeight*this.imageData.imageWidth),height:this.imageData.imageHeight>this.imageData.imageWidth?l:Math.ceil(l/this.imageData.imageWidth*this.imageData.imageHeight),alwaysShowImageDescription:!!this.alwaysShowImageDescription,hideInComments:this.callerdata.hideInComments};this.pixabayService.create(O).then(F=>{(0,Pn.A)({message:this.imageData.tags,position:{my:"center top",at:"center top"}},"success",3e3),this.callback&&(F.assetImage.assetImageUrl=this.imageData.largeImageURL,this.callback(F),this.visiblePopup=!1,this.imageData=null)},()=>{this.error=!0,this.working=!1})}spliceIntoChunks(l,O){for(var F=[];l.length>0;){var se=l.splice(0,O);F.push(se)}return F}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(hr))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-pixabay-searcher"]],inputs:{callback:"callback",callerdata:"callerdata",dismiss:"dismiss"},decls:26,vars:16,consts:[[1,"dx-viewport"],[1,"row"],[1,"col-sm-7"],[1,"col-xs-1"],["height","30","src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAAAAADuvYBWAAAfcElEQVR42u2d92PU5B/Hv3/Lc72WDkopsxQsAiJo2QgUQSqjKlBFKqsgQ4SqWAqCKOBgyFI2FQRcBVFkFJGhTBkFyrZAGaVtvoeFJk+SJ3kyLk1y79ePd3lG8rpLnvXJ8z8CIo7/4RJAOoB0AOkA0gGkA0gHkA4gHUA6gHQA6QDSAaQDSAeQDiAdQDqkA0gHkA4gHUA6gHQA6QDSAaQDSAeQDiAdQDqAdADpANIBpEM6gHQA6QDSAaQDSAeQDiAdQDqAdADpANIBpANIB5AOIB1AOqQDSAeQDiAdQDqAdADpANIBpANIB5AOIB1AOoB0AOlS+n87IAqqI0z6ZkG4MLsVZEeS9EYVQoiqndkx8B0x0t8VHnPzy44wHiHSjwsiB3MTIT0CpHcXKO6u6Q3pvmeFIOf0e80g3dck3BGUVG4fEoR0/zJaUOfyvKch3a/sE5jszomDdD/STtDi1rLOkO4/Fgg6HJ2cDOn+InhV0OXBpn4BSPcRrwhcnJ+ZCum+4QeBk6qiodGQ7gtSKgV+rn/WHtJ9wAzBGMVjEyDd4wTOCEYp/7onpHuaDMEMJ/KaQLp3WSeY4+F3A4OQ7k0a3BNMUzo3DdK9yNuCFap/HREL6Z7jkGCRf5ekQ7q3eF6wgcMTkyDdQywWbOH++owApHuEejcFuzj7YQqke4LXBRup/PHVIKS7n18Ee7m6oB2ku5ynqgXb2Tc6AdLdzEdCOLizojuku5aoi0KYOP5uI0h3J5lMaWU3rGqv+DYzCtJdyGamsk9ihhVVWfV+4aNWkO42asKTVWkT+jq14LxV7dU7s+tBuqt4lynr95oDAv03PbDq/eai5yDdRRxnmsqpPSZ5yl+WW3UHxydCukvozo5poSKZuiy7bVX73bV9IN0VrGA6WiY7Mj7nd8t/93/ebwbpdY5qeHINXZRHt/n0iuWh+e1ZQUivW0Yx7fylenwwa3ulVe+XP2kD6XXJXqaaKawkzT/4x/Jt/nePhD77Ujo7PPmBVoRqn7X3rGq/tawLpNcN7PDkTdoJG0z40/Lf/a8pyZDuPBrhyf11Ez+/2PKCmweb+gcg3WHY4cnneWTUe/0Xy1Px5wtSId1R2OHJBZw5PDXH8sRsVdGwGEh3DHZ4chX/3y8qc8tDq95vfP4spDsEOzy5yFA+jaedsNyqKx5XH9IdQCM8eZjRvHqsKreqvfybFyA97LDDk2+YeMgmjCm2/Hc/6bbQZ/9JX8u8+J+by7D9wutWtT/cOigI6eFDIzzZdLMqeujPltdXuSn02XfS2eHJB6xk2yL/nOX1Vb+9GQvpYYEdnjzOYgOx38b7Vr2XuSP02W/S2eHJ5dY7Tw0nH7XcqjsyKQnSbYYdnvyNLfl3/uqW9dDnvgFItxGN8GS7ustxObst/93P5adAum2ww5NP2ljK0/Mu2xD6HA3p9sAOT86ztZzgEOvrq64teAbSbYAdnvywqd1lNXv/tFdDn/0lnR2evDUcxfVec9dy6PPKHpBuCY3w5EHhKTFx/EEPhj77Sjo7PLk0fEPfHb+0vL6qYrOzoc++ks4OT/44rP3E7J2W11dd/OgpSDcDOzy5unWYi2710QXLQ/O/vF4P0g3DDk/+zYH2ROa3FV4JffaTdHZ48pvO3GnePW65VffnhAaQbgB2eHKZY1Oa3Vfesar9XvhDn30knR2evNTBWiSM3mc99PmD5pDOOVSSycLh6PFnFlxzd+hzBOyfXgdEv/qj5aH5K5+2gXSPkWJ9fZWwJyce0r1FoO8Gy+urbi/vCukeI2nSEct/97/tD32G9DDTaWmZ5dDnwpcCkO4tYt/cbXlovqSgpWek9ztqhPW+9d7641Lroc/DY7whfaKxmSYf/92Dg7dZ7sTZFvocXukfGxuRiCJ+pmneKcutugOt3C/d4GLh7sTn9FptMfT5erTrpScbvKN94v9WXf3cP6xIX+j+27vRvU7PBUkE0OEL8+ur2rteepzhJmtuZHTiYrJ3mAt9LnZ/Q+5D40Hc9UmE0HJWiQnpY10vva+JPsr3UZFinUQNKDS6vqo8we3S292su5aKR0ieeszQxfna7YMzfU22VtbERJJ20m2FgfVVPd0tPaHA9Kv3irtGlHUSP2ov71uqiJult5p+1UpndHO/YGR5bzef63rluUr6KAm5s1dYn0Mu27Jw2ihX0jk82oOv/KDb7H3YxFXShcjh07D93VM+PKtdtH2Bt5DuFumh9VUZ67S2lhgE6T6UHiLpKycCbyHdVdKdCbyFdFdJdybwFtJdJd2ZwFtId5V0ZwJvId1N0jUCb+Mg3afSHQq8hXQXSdfYF7gTpPtUOntf4CME0n0qnf06g8mQ7lPp7H2B7zeEdJ9KZ+8LvJFAuj+la+wL3A/SfSqdvS/wuQCk+1Q6e1/gmQTS/SldY1/gFpDuU+nsfYF/JpDuT+ka+wIPhXSfSmfvC3w92lvSK28ZoTySpa9jFvkZ8Zb0Ipt+7P6XrrEvcHtI56P87L4tS/Jz8xau33X8ZrUHpLND+YsJpOvq/m5M76fp6M7oFl1eWXze3dLDti+w/6WXLB7AjH/sMGN/lWulh3VfYB9Lryqe0VGngMZvbbnjTunh3hfYn9IrlvBtWRszvtSF0uv9yyzwBUhndQ1X829wFTvthuukv8Es7ySBdFWqC9sZKqd+wW2XSd/FLC8P0lX5Md1whZPn33OTdPa+wJVNIV2FE+Y2qG2+yUXS5zCL20YgXeWqmO7RTK10i3SNfYEHQ7ryaT7TwpqSjOsuke74vsCeln7L2h8h9U93SHd8X2AvSz/R1mK9Y1e7Qbrz+wJ7WPpWGwYoJz6se+ns8OTdBNJpFtuyRPTFijqXzg5PHgnpNNtteotsTl1L78FussRBOsXhBLuuwNw6lr6SWdZXBNKlXEqx7QoECutUukZ4cmdvSt8Za4QB/Csl0m28BLHFdSl9NLOoo8Sb0sNEpb0DVU1K6lC6U+HJnpc+xeaL8OztOpP+DLOkB8mQLmGt7Vfh1TqTzg5P3kQgXfJAb6Zfo+YjPlj83YGSv35e+VEuz+tafq0j6dHs8OT+kC5hll51Oub/QU1QX1o6QG+7iPTqupHOvsWcD0C6yGXtHnogRy0o7PaCJO1TWFs30n9kFjSTQDrvOvCXWDsM3JxeTytd6v26kK4RnpwK6SLHtKaY2xRpLYofpnUO8+pC+oc2DWv5XfrLGvUYUKaddoHGeH3ideelB9h7OQyDdJFfNKrxju4CqJ8S2aknOS+dPe58IwbSRdjjr9EredZdsJclBM86Lp0dnvw5gXTxic6uxNdcGZQ0ZmYw12npSex12M9CushcZh2mcuawh3njTHda+kRmKQcIpIswR9cyuRc0r2SexnmHpR9mlpIL6SIXWDVoW2bDdM3nzkpn31nK60O6yCJWDXYayOQeawFGb2els8OTVxNIF8lgVKC/oVxWMXKJuuak9Fh2eHIvSJcMpTJG4wKHjK3BYL26Z4WT0tnhyacIpOvf9rIN5sMKC8x0Ujo7PPk9SJeQxSj/hNGMnlPPJ+a2c9LTHA5P9qx0RgusveGM5jBOZK9z0p0OT/aq9HJG8fm2Deytckx61CVmEYMhXcIhRvEmgk8ZQ/B5jkl/mb1IJAjpEjaol97CRFaMV7kMcUz6FmYJ8wik6y+OG2UiK8YahXZOSW/MjpZ9GtKlMFb/zzSR1QmGC6ekT2MWsJtAupRR6qV/ZSKrfxmjZE5JZ3cycyCdZwnRNjN5xarnVemM9DoIT/aq9Ez10v8wk1eael5lzkhnL/JZRiCdgvGa1BIzeTHePnfJEekJ7D0sukA6TV/10o+byauDel7XHJE+hpn9XwTSuYbed5rJixESes8R6fuNL/CIWOlvqpe+1kRWD9SzCjrSeq+T8GSvSp+gXvonJrI6r55VkiPS2eHJhQTS+cZOp5jIirEbTqoT0qPZDYf+kC5nqXrpvUxktUQ9q95OSK+b8GSvSt/FmKU08WLfl9SzGueEdHZ4cgGBdDmXGMV/bTinsmijT1v7pGuEJ7eEdCUJZidEOSdpyfcOSM83OvUX4dIZw1WxhjdpHc44kbPhl64Rnjwc0lX4kFH+YoP5XGRMt7QWwi+9LzPr8IYne1b6QUb5jQ1usceYoyXTHZC+npn1FwTSVahmBSQZW0dxjPVCir3hl5503+h0QKRLZ43JkYQrRnIZxMilSVX4pbPDk/8gkG6sfTvaQCY7WJmME8Ivvc7Ck70rvYIZw7uCO49zycZHTWyTzg5PvpsI6QyymQPav3PmcIf5Zo+EB+GXzu5nrCGQzmAjsw6NznFlUDWEmcMwIezSNcKTe0M6i1vRzEp04GnMVWu8RH1D+KWPYOZ7mkC6meZOi8O6qcuz2Mlb3g+/dPbLpt+DdDaX49nViNfbjeWcVleYbwGOJeka4cnNIF2DfM3JDM299XY10kj6XFX4pbPfVLedQLoGtxtr1aQNOzDwZJbmOfwshF26RnjyEEjXZJF2XXqqLzW9khs0OQ9in/Q6DU/2tvSHaTq16bdUvh95+da3dPbuC/zpgHT2XegTAunacOxokz57T0nNJqrV146sGByrm4D7VUVq0hNe4lrbphGe3AbS9frafKE/gcbpmT1aRnMdG33WivRmwvkCjo0Y2BO3vxNI16PY9tUG/FOz6tJDI31Fw/RqVbfhyV6Xznzlo1mGVFmW/mjly+eaL+xmhyffjod0Dt6x9Ro8a2DhjYb0R/egcexX+bLfXLWcQDoHlQNsvATJZwW7pIc6Ct/0ZMzhsVdvdoV0Lsra2nYFgr8KNkp/NAqU10TloLoOT/aBdOF0kl1XYIlgs/TQUMJ3AxWjLXUdnuwH6cIOmwaxcgX7pYconUuPIbFfZepQeLIvpAtLbIn26/cwPNJDwwm/jpAMCi1k5lhIIJ2fb23o6YypEMIlPcS/S57sKKYRnvwSpBvhcAurbbgvDJdpSPqjOk78r/HxGvOAkihIN8SVHpaqnVQkhF26INxblxEgPzG/nkUg3RgPrAxgtj0lOCE9xNm5dR+e7B/p2nvmajOgTHBKulYnhEC6cX5qbKrKUdMrBTdIz4Z0U+un8k204gcfN1mazdJvxkC6OS7nGhyo6f676bJslv4lgXSznHzFQG3bbLZQks3SO0K6Bfb15Kxr06WVgmukHySQbomiMfpNupjMZeXWSrFX+nhIt0rVnmlaK2XrZ2+8bbkMW6U7GZ7sV+mP+PujdNUqNsv9ucKO/G2VvoZAuk1c3L5gbK8mTxr0gcTnhuevO1xlU+a2Su8N6XYP0d44d+yfK+XV9uZqp/R/CKR7Ajulvw/p3pXe8KaprJwNT4Z0e6WTmOwdJtoM2wmke1h6iJazDG8alQXpHpcemrcbUGioU3glCOmelx4i+Z2/bcoJ0j0jPUS3Fbyjfm0h3S/SCYl/aw9PRnsIpPtHeoi28/XfafcWpPtLemhxddb32jO4jocnQ3rYpYdoPuOMRj4rCKT7UHqIjLXMvVu7QrpPpRPS4O1Dqtn8TSDdt9JDPL9Y5dXP70C6r6UTUu+NXbIJ3opkSPe59BBpc6hXhBYSSPe/9NDQ/MtbxFD4AZAeEdJDNJ72+FVyF6IgPVKkh+ix6tES7NkE0iNIOiEJY/ZXtfKD9DWRgx2b4LYkfpAOvAWkQzqAdADpANIBpANIB5AOIB1AOoB0AOkA0gGkA0gHkA4gHUA6pANIB5AOIB1AOoB0AOkA0gGkA0gHkA4gHUA6gHQA6QDSAaRDOoD0iGJ54RPGQnqkIG6+sRzSIR3SIR3SIR3SIR3SvcRlSId0SId0SId0SId0SId0SPcIpZAO6ZAO6ZAO6ZAO6ZAO6ZAO6ZAO6ZAO6T6U3uj5ga/3SauneUwvcUfL6Mcf9fhSSp56ukA+dVRrVhXSsybPXz53cnbPWC7pu0dJyXkts3enZ5IMn3j0U71HvL9kUf64Ie00jkqYXUsXnQwza4/8wMXSG4/67vyDmutYff3Qwowg68BR4t61T7TEHKa2tB2pmm4GdcxatUNiBq35VzykYv/8l4O60tWoOrJwUH3+U0+ZsqdKTHx967ss8U3Foybo5Pll7ZG33Cq96Xv7qmQXrqzw9SCvdNK2nEqaqpLsxUrpIUfiFAcEB6+9pdBXOivFhPRHVB6YEMN16u/sq1Yk/i07Wu3YJvzSF7ldeuKcctXrdnp4gFM6GU0l3KVMl3JNesC/aYoDeh5hyFvf3JT0EJcm1dO9rb+nfurC1SlRfpZeb+oN5mU79BKndFJIpXtH8TfeR91+X1ZczjXVzErcmqi8/pf49k4vnRKree4vnmCn/eN55SOQX/piV0tPO6552dbU45Pe4Lw01f32skSfU5nOlLfxJt/SrERxmknpgvC3xtbnzQq1HxBzAz6VnnFT56rtb8olnfSkntmH6PbAMCrLH2QXM+pr3X/ss2alC1e6MX/u5/XSbpA92Rv5Q/r4h7pX7WI6l3Qyk0o1R/pVuzvSr87IelTBTfrqbnY1K124N1z91NtztAt+pNubyfzSl7hX+lyeq3a3D5f0qN+pe2N38Zv4Y1R2HWVtiu08lbjT16x0oXqG2ql3usGTdk8D30nP4btqN9N4pJMW1JPin/jaL9ZRub1B1yF2J18l7g8wK10QcpWn3uMWX9IjieakL3Wr9B4POC/aiUQe6eQ1KtHSJx+/TX38JfPqSO7IlWqdqGRJqouGpFf0VPQWrqjcEcrVehCr/CW9hfzE/103+dVu7TJGfPCL/ElfFOSRTpZTiTJrPuxaQd0vZSM+r8j7ZxvfeL4hIXEpWQvkHfdCVekb0lq3afdM+w7Ppad37tq9R89efV6evrpE3pqTDfEEiuQ/63n9WtcjUQ065K6R3/Yl3cuG/NK/cqn0/fTJbZeMvCaOkHXkCrikx1Hd3tL//prJlIDSZnSKVLrzcH6ktL3cfR394xumJl11wiXQd6OsD0J3GKbR327tIH3ejD5K9xySfCSdvhnvl90Bo0ZRjdvyZjzSyXMP5H9N+j/1UH6f/ZZq/OXJBwXSqSbg9Sa80kNk0T+nbOl3ze9T//Ie8p/MO/fUpwmS+KUvc6X04EnqSascZ2+yR3rAMi7pZDJ1pUcQUkB9MFkuVfoUvT9EZbhwsTT5OgPSSQuqN3E6qNqJDvFnsjJtO+pG1692BIpf+nJXSh8n/YuNUx2XXiU9pC2XdPIDNfPSYkCV5tSa9OjbGar1XCC9UTQ2IJ0EZ0sLl5xiC+n9aLfqdFxT6V9iq1+k1yvVGip/fJv7TnLMZj7pjS5LLe+lWkVH5VNrnaT37k66Y1uCMP3Jhxe4FlFIhyEuBlVz/J4xOJ8iGa57+OSxksgvfYUbpQ+UnPhK1kEJkgb0wwZc0kl/5syJcmpN+i/OYE6ESZ7rJ5XSl2nNoR1Ru0kHJRN+/0Qzx6erlb81r0uX9K7OsOed20o6zK/zSSfzWSsbFFNr5Jz47S/sqnaTVKKXQvpXWmf5rORGvqR2ak1QnpRm+1s48fij+uJH4z0oPVDKdeKSRqiwgVN69EF16QWKI9Ml3/bgGugQ1iikL9U8z+mS2fWA8pz+CrCTJlxV1K6+5iCf66V3lgw0apw4aS52XsqCfNLJ06rrEn5QFvOhZGZDq7IdJZ1mhfQlmucZdUhM21U5mpellfYz8bj8x78DfukrXSi9gN2NotmieOrqSlcd0j+rslhRMp3dWbMSkkdzglz6Yu0TnSQmzVN0tv/UTPq8oq8oka73ospVLpS+Qax+K945mVxe6dLcGVNr/3GC98LkiRk9nuct4ZXepFL+9O8tZvapdlqxs/6HQvoYD0rfLT7WtA9MFvu6c7mlJ56TSx+hclSM6KNYuxJ9FA2QEuYEDvsusaPmg4liZjnaSb8RH201H8SLSUfrFPu1C6WfUbTPWIgtvtXc0kl32TTZIrWD0tSnslRorGgOlvC13qlnyBlF76IL9w2miR+k362t0wKdIw/Ke1U80mWL3PeqLqZuLx4wTacS4jj6ern0Qp2k4gDNw5r1leKK9OoE7aSD5V3FOP4af+M+6Um6o3G1bKs98pQB6cnUlEaWXg/iZZ1KiE//7XLpO3WSvieWEiXrf1/QSdpNPk0skb5QJ+1q90lvJdZ+lM6hm+W3Ry7p2+jp7BZqx7wgHvCqTiWOyqWLg6SHdJKKPfUKeRPrmk7SLnLpsQL3U9GF0p/il14sTk3wS58qXz8fp/1Pz9epxCG5dDGO6hy39NuKkfdk7aSd5LeioNiq/Y37v+JF6SXyziqH9G6KNbYbtZtnev+bA3LpP8pVcow3X1U0z3prJ5WMGA6s+eSSchZAt9PgQenxor9PeKUnqSwoV1uRKo72HTEqXRzlFGJ471T/1HyQzT2ArpS+l/u3Vu5l6VnikZN4pW9Tm25RWSFxSlw/EWVQ+kdizn01Uybelbfze+j0JFWlD6r5ZJ28E8fRBvSg9FWKhY660qeqL1xvrzhQEuQw2KD0IWLSzzVTvi8eOPXxsJp47zofbVD6bPGTKZpJF3tZevx1cV1yHJ/0boygmbOKZtMY8cvDvNK/r/mgvjj6c1HLXKxyqoxIloG9zSt9sKLDoTlun3Ddy9IlE2GPL7ee9CRmhNgu+RBNquTLV4xJly7l1TInWXNf8WTVpST+qjSWU/rjh1PUNZVFGSosETwsPfmWcpGZjvRt7JgDxSNUshDtaMCYdMlDvZQ9sBaUTAL8XDtGLChu+bzSJaOrwgn2HebFai9Ll6xQrm7GJZ1+oK+hp9bHsge3tSeoRek/PP6ktWTR4w7m5Z+mOiwoWZ1/LZVPepZyZFb4mJWuPnWz85p0aSBq7WiEpnT6gX4gSMcoV7xAH91AEs1aNdqQdCINe9zIuE2Ml/zjSsWHS64k6bmnDEmPkoZzzGOkWyF4WHpOtdp6Ji3pDanfePnT8hVz8j/WF9JQsvGGpGdI81WfVM+V1n+u+HmcdI3uxdZGpJM3pMUuUfuxRRUI3pUeoOKYtxEe6XTU8aOFBsFddBBoPHV8S+r2P8WIdEItxZurMo83Vur8Xqp68zR0C3jGiPSoU9TjS1lsym7Bu9JbUQIr2/NIf5c62y3/fdboAjMK8ZEY6svdfXWli4vpOlFz9icGyjubc6i12NRUaLCYCoL+srmudLFzMZyq8W/yGg9WhL17R3qTL6hYU+nSeLZ0+oFe+rhf3oUOiM5nTUzUBLX245ZOPqWT/ip9Y0b8aPo9E8X0kF/aHYFDe7rqNKDsvRlHpDGXHVcq+yyekB5M6TFjr2zly/H6HNIbUvGp1f1UxmAefU5PrjeUv17g5LdzR3Zt3ozmsJr02NOy+PKiT0d1b0ACKT1HbpQtyH0gv4XL127e37Myb0hbWan9VKUnXZClLS0YmBaMS273WoHq4m83Sr9ZQnNZ5YUAN6SxKUzp9AN9odpE13/Nuw5UqowqQ+8X+En6T1Rba31d7U0LytbCBkOlCq9JkvY2VmM3Sud5kQM1BcmSTj/Qj0omv2IOUF+do8djPzYtnWRW8iVSadw3OGdaOhlXHQHS6R40Q3p36oF+j5peoV8XKfxGtXkDs01Ll7UDWWxTm8NLOWSk2KFU2gm+l34vm3BIpx/oT6Zha+/h9F9SFoo04gF/bX6mk07i+K/viFOfS9pi4CIMo9NO9rn0y7I3uDGkb9f4Pyru/fIx1x7XzEonmbpviZrPepN04GPT0kn2be6kZd6TfljxFmZV6bTUa00VJdIdnYd9ZPU5ZlY6aX9G8/jybI3LMJL7FqN4AWFr7afDtzsV4XeekX6nQHlrVJNOP9DVlkTE/023sWXBVAl510xKJ7Gz7rEPL2ypeR2eWV9pUjqJWcD+xZwZIBlZOOUt6RWLGqukVZEue6CrBp08XUa37uXzoXFTuV7nXaR2NltZt6leuleizWou7Wr3i9Tl6stF7heEZu5vcUZJukz61eVpqmlVpNMP9BPqDadBdEdni2Kyot6ki+akE9J2vvJlgPfX9+G6FmkrKsxJD13GRco3Vx6Y/uiB2Fyvxm6Ufuzj7qxVDUrp9AO9Ip2RUNY1m6UyQdU+Z9H+uyakh8YRs746JvlVXdw0viH31Ujo/e6G09UmpIcag13mHhbbdNUH8x4/tiRvu1jgQul/FNKsnTcxq1MjjbTtJtRS0y6OnfOplOHMabsPqOPmMUINgh2yXh06LDv7jRFv5uSMGj12XO54scQJAzVqljxo/IwFK77IH/9KqvFLkpjx6mtDh2e//sabI3PeGjVmbC5VbGutpMmdXps2a3xW1xbRavN4I7w1nw7M0kDy5sL2kB4ZzJNMxwQgPSJIkXQiPyOQHhFIX7XZGdIjghGSrv8JAumRwNvS+faRkB4JUG9eORWEdP8TXEAN6rxJIN3vBLLpdXu/BCDd10Q1e2mxLHjzViqBdH+ysqioaMdhtQWlOQTSfcop1izNZwTSI036ugCkR5r076MJpEeY9IVBAumRJf1+jr1lQLr7pe9sRyA9sqRfGGp7GZDuaunVu4YGCaRHkPR7xfPbhqUMO6SnXq0lG9YssnlP0dYNKxd9MnN0x2C4yvgfLnPkAemQDiAdQDqAdADpANIBpANIB5AOIB1AOoB0AOkA0gGkA0gHkA7pANIBpANIB5AOIB1AOoB0AOkA0gGkA0gHkA4gHUA6gHQA6ZAOIB1AOoB0AOkA0gGkA0gHkA4gHUA6gHQA6QDSAaQDSAeQDukA0gGkA0gHkA4gHUA6gHQA6QDSAaQDSAeQDiAd8PN/61o505uOgdwAAAAASUVORK5CYII="],[1,"col-xs-11"],["valueChangeEvent","keyup",3,"onValueChanged","placeholder"],[1,"col-sm-5"],["stylingMode","contained","text","Prev","icon","chevronprev","type","normal","width","120",3,"onClick"],["stylingMode","contained","text","Next","icon","chevronnext","type","normal","width","120",3,"onClick"],["id","pixabayPopup","width","100%","height","95vh","contentTemplate","info",3,"showTitle","dragEnabled","closeOnOutsideClick","showCloseButton","visible"],[4,"dxTemplate","dxTemplateOf"],["widget","dxButton","toolbar","bottom","location","before",3,"options"],["widget","dxButton","toolbar","bottom","location","after",3,"options"],[1,"pixrow"],[1,"pixcolumn"],[4,"ngFor","ngForOf"],[1,"pixa-view"],[3,"src"],[3,"valueChange","value"],["type","checkbox","id","web_assetDialog_createImage_show_description_checkbox","name","web_assetDialog_createImage_show_description_checkbox",1,"btn","checkbox",3,"ngModelChange","checked","ngModel"],["for","web_assetDialog_createImage_show_description_checkbox"],[3,"click","src"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",1)(4,"div",3),o.nrm(5,"img",4),o.k0s(),o.j41(6,"div",5)(7,"dx-text-box",6),o.bIt("onValueChanged",function(we){return F.searchBox.onValueChanged(we)}),o.k0s()()()(),o.j41(8,"div",7)(9,"dx-button",8),o.bIt("onClick",function(){return F.goPrev()}),o.k0s(),o.EFF(10),o.j41(11,"dx-button",9),o.bIt("onClick",function(){return F.goNext()}),o.k0s()()(),o.j41(12,"dx-popup",10),o.DNE(13,lo,20,10,"div",11),o.nrm(14,"dxi-toolbar-item",12)(15,"dxi-toolbar-item",12)(16,"dxi-toolbar-item",13),o.k0s(),o.j41(17,"div",14)(18,"div",15),o.DNE(19,Eo,2,1,"div",16),o.k0s(),o.j41(20,"div",15),o.DNE(21,Jo,2,1,"div",16),o.k0s(),o.j41(22,"div",15),o.DNE(23,fr,2,1,"div",16),o.k0s(),o.j41(24,"div",15),o.DNE(25,Gr,2,1,"div",16),o.k0s()()()),2&O&&(o.R7$(7),o.Y8G("placeholder",F.searchBox.placeholder),o.R7$(3),o.Lme(" ",F.currentPage,"/",F.totalPages," "),o.R7$(2),o.Y8G("showTitle",!1)("dragEnabled",!1)("closeOnOutsideClick",!0)("showCloseButton",!1)("visible",F.visiblePopup),o.R7$(),o.Y8G("dxTemplateOf","info"),o.R7$(),o.Y8G("options",F.submitBtnOptions),o.R7$(),o.Y8G("options",F.submitAndCloseBtnOptions),o.R7$(),o.Y8G("options",F.cancelBtnOptions),o.R7$(3),o.Y8G("ngForOf",F.chunks[0]),o.R7$(2),o.Y8G("ngForOf",F.chunks[1]),o.R7$(2),o.Y8G("ngForOf",F.chunks[2]),o.R7$(2),o.Y8G("ngForOf",F.chunks[3]))},dependencies:[a.Sq,Rt.eC,mn.JjR,Hi.e,pi.i,Ti.m,et.Zm,et.BC,et.vS],styles:[".pixrow[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;padding:0 4px}.pixcolumn[_ngcontent-%COMP%]{flex:25%;max-width:25%;padding:0 4px}.pixcolumn[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-top:8px;vertical-align:middle;width:100%}.pixa-view[_ngcontent-%COMP%]{width:100%;max-height:67vh;text-align:center}.pixa-view[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:80%;max-height:67vh}@media screen and (max-width: 800px){.pixcolumn[_ngcontent-%COMP%]{flex:50%;max-width:50%}}@media screen and (max-width: 600px){.pixcolumn[_ngcontent-%COMP%]{flex:100%;max-width:100%}}"]})}}return v})();var ei=M(3341),Ii=M(8844);const co=["mediaGrid"],ko=()=>[5,10,25,50,100];function er(v,p){1&v&&o.nrm(0,"i",18)}function or(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div")(2,"button",19),o.bIt("click",function(){const F=o.eBV(l).$implicit,se=o.XpG();return o.Njj(se.executeClickCallback(F))}),o.nrm(3,"img",20),o.k0s()()()}if(2&v){const l=p.$implicit,O=o.XpG();o.R7$(3),o.Y8G("src",O.apicodoBaseUrl+"/api/Asset/"+l.data.id+"/Thumbnail000001.jpg",o.B4B)}}let Jr=(()=>{class v{constructor(l,O){this.mediaService=l,this.scopeService=O,this.uploading=!1,this.isInitialized=!1,this.scope=this.scopeService.getScope(),this.apicodoBaseUrl=this.mediaService.mediaApiBaseUrl,this.odataBaseUrl=this.apicodoBaseUrl+"/api/odata/",this.apiBaseUrl=this.apicodoBaseUrl+"/api/"}ngAfterViewInit(){this.gridInstance=this.dataGrid.instance,this.isInitialized=!0}ngOnInit(){this.mediaService.getConnectionData().then(l=>{this.uploadHeaders={Authorization:"Bearer "+l.token,withCredentials:!1},this.dataSource={store:{type:"odata",url:this.getGridUrl(),key:"id",keyType:"Guid",version:4,withCredetntials:!0,beforeSend:O=>{O.headers={Authorization:"Bearer "+l.token,withCredentials:!1}}}}})}getFileUploaderUrl(){return this.apiBaseUrl+"Upload"}getGridUrl(){return this.odataBaseUrl+"MediaFiles"}refreshGrid(){this.gridInstance.refresh()}uploaderValueChanged(l){var O=l.value;O.length>0&&O.each(O,(F,se)=>{var we=new xr.A;se.guid=we.valueOf()})}uploadStarted(l){this.uploading=!0}uploadAborted(l){this.uploading=!1}uploadError(l){this.uploading=!1}uploaded(l){this.refreshGrid(),this.uploading=!1}executeClickCallback(l){this.callback&&this.callback({text:this.apicodoBaseUrl+"/play/"+l.data.id+"?guiMode=iframe",title:l.data.title,attachment:l.data.id,thumbnailUrl:this.apicodoBaseUrl+"/api/Asset/"+l.data.id+"/Thumbnail000001.jpg"})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ei.p),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-apicodo-media-management"]],viewQuery:function(O,F){if(1&O&&o.GBs(co,5),2&O){let se;o.mGM(se=o.lsd())&&(F.dataGrid=se.first)}},inputs:{callback:"callback"},decls:20,vars:28,consts:[["mediaFileUploader",""],["mediaGrid",""],[1,"modal-title"],[1,"dx-viewport"],["accept","video/*","uploadMode","instantly","name","file",3,"onValueChanged","onUploadStarted","onUploadAborted","onUploadError","onUploaded","labelText","readyToUploadMessage","selectButtonText","uploadedMessage","uploadFailedMessage","multiple","chunkSize","uploadUrl","uploadHeaders"],["id","mediaFileUploader"],["class","fa fa-spinner fa-pulse",4,"ngIf"],[1,"clearfix"],["id","mediaGridContainer"],["height","100%","width","100%","noDataText","",3,"dataSource","remoteOperations","showRowLines","showColumnHeaders","wordWrapEnabled"],[3,"pageSize"],[3,"showPageSizeSelector","allowedPageSizes"],[3,"visible","highlightCaseSensitive"],["dataField","id","cellTemplate","idTemplate",3,"width","allowFiltering"],["dataField","title","caption","Name",3,"visible"],["dataField","description","caption","Description",3,"visible"],["dataField","createdOn","sortIndex","0","sortOrder","desc","caption","Created",3,"visible"],[4,"dxTemplate","dxTemplateOf"],[1,"fa","fa-spinner","fa-pulse"],[1,"btn","btn-green","action-button",3,"click"],["height","20",3,"src"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"p",2),o.EFF(1),o.k0s(),o.j41(2,"div",3)(3,"dx-file-uploader",4,0),o.bIt("onValueChanged",function(We){return o.eBV(se),o.Njj(F.uploaderValueChanged(We))})("onUploadStarted",function(We){return o.eBV(se),o.Njj(F.uploadStarted(We))})("onUploadAborted",function(We){return o.eBV(se),o.Njj(F.uploadAborted(We))})("onUploadError",function(We){return o.eBV(se),o.Njj(F.uploadError(We))})("onUploaded",function(We){return o.eBV(se),o.Njj(F.uploaded(We))}),o.k0s(),o.j41(5,"div",5),o.DNE(6,er,1,0,"i",6),o.k0s(),o.nrm(7,"div",7),o.j41(8,"div",8)(9,"dx-data-grid",9,1),o.nrm(11,"dxo-paging",10)(12,"dxo-pager",11)(13,"dxo-search-panel",12)(14,"dxi-column",13)(15,"dxi-column",14)(16,"dxi-column",15)(17,"dxi-column",16),o.DNE(18,or,4,1,"div",17),o.k0s()(),o.nrm(19,"div",7),o.k0s()}2&O&&(o.R7$(),o.JRh(F.scope.network.getResourceOrKeyName("web_asset_media_upload_instructions")),o.R7$(2),o.Y8G("labelText",F.scope.network.getResourceOrKeyName("web_upload_drag_drop_here"))("readyToUploadMessage",F.scope.network.getResourceOrKeyName("web_workflow_ready_to_upload"))("selectButtonText",F.scope.network.getResourceOrKeyName("web_upload_video_button"))("uploadedMessage",F.scope.network.getResourceOrKeyName("web_upload_uploaded_message"))("uploadFailedMessage",F.scope.network.getResourceOrKeyName("web_upload_upload_failed_message"))("multiple",!1)("chunkSize",5e5)("uploadUrl",F.getFileUploaderUrl())("uploadHeaders",F.uploadHeaders),o.R7$(3),o.Y8G("ngIf",F.uploading),o.R7$(3),o.Y8G("dataSource",F.dataSource)("remoteOperations",!0)("showRowLines",!1)("showColumnHeaders",!1)("wordWrapEnabled",!0),o.R7$(2),o.Y8G("pageSize",5),o.R7$(),o.Y8G("showPageSizeSelector",!0)("allowedPageSizes",o.lJ4(27,ko)),o.R7$(),o.Y8G("visible",!0)("highlightCaseSensitive",!0),o.R7$(),o.Y8G("width",75)("allowFiltering",!1),o.R7$(),o.Y8G("visible",!0),o.R7$(),o.Y8G("visible",!1),o.R7$(),o.Y8G("visible",!1),o.R7$(),o.Y8G("dxTemplateOf","idTemplate"))},dependencies:[a.bT,Rt.eC,Ii.s,mn.nj_,mn.sVQ,mn.PVd,mn.hXY,mo.m]})}}return v})();var Wr=M(6165);const Xr=["tagBoxHandle"];let Mr=(()=>{class v{ngAfterViewInit(){this.instance=this.tagBox.instance,this.instance.option(this.options)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-dx-tag-box-wrapper"]],viewQuery:function(O,F){if(1&O&&o.GBs(Xr,5),2&O){let se;o.mGM(se=o.lsd())&&(F.tagBox=se.first)}},inputs:{options:"options"},decls:2,vars:0,consts:[["tagBoxHandle",""]],template:function(O,F){1&O&&o.nrm(0,"dx-tag-box",null,0)},dependencies:[Wr.T]})}}return v})();var dn=M(2333);const an=["wrappedHandle"];let _n=(()=>{class v{ngAfterViewInit(){this.instance=this.wrapped.instance,this.instance.option(this.options)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-dx-lookup-wrapper"]],viewQuery:function(O,F){if(1&O&&o.GBs(an,5),2&O){let se;o.mGM(se=o.lsd())&&(F.wrapped=se.first)}},inputs:{options:"options"},decls:2,vars:0,consts:[["wrappedHandle",""]],template:function(O,F){1&O&&o.nrm(0,"dx-lookup",null,0)},dependencies:[dn.W]})}}return v})();var Wt=M(5463);const zn=["wrappedHandle"];let mi=(()=>{class v{ngAfterViewInit(){this.instance=this.wrapped.instance,this.instance.option(this.options)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-dx-select-box-wrapper"]],viewQuery:function(O,F){if(1&O&&o.GBs(zn,5),2&O){let se;o.mGM(se=o.lsd())&&(F.wrapped=se.first)}},inputs:{options:"options"},decls:2,vars:0,consts:[["wrappedHandle",""]],template:function(O,F){1&O&&o.nrm(0,"dx-select-box",null,0)},dependencies:[Wt.l]})}}return v})();var Si=M(6523);const go=["wrappedHandle"];let No=(()=>{class v{ngAfterViewInit(){this.instance=this.wrapped.instance,this.instance.option(this.options)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-dx-date-box-wrapper"]],viewQuery:function(O,F){if(1&O&&o.GBs(go,5),2&O){let se;o.mGM(se=o.lsd())&&(F.wrapped=se.first)}},inputs:{options:"options"},decls:2,vars:0,consts:[["wrappedHandle",""]],template:function(O,F){1&O&&o.nrm(0,"dx-date-box",null,0)},dependencies:[Si.z]})}}return v})();var Sr=M(7866);const pr=["wrappedHandle"],Vr=["*"];let Lt=(()=>{class v{ngAfterViewInit(){this.instance=this.wrapped.instance,this.instance.option(this.options)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-dx-scroll-view-wrapper"]],viewQuery:function(O,F){if(1&O&&o.GBs(pr,5),2&O){let se;o.mGM(se=o.lsd())&&(F.wrapped=se.first)}},inputs:{options:"options"},ngContentSelectors:Vr,decls:3,vars:1,consts:[["wrappedHandle",""],[3,"showScrollbar"]],template:function(O,F){1&O&&(o.NAR(),o.j41(0,"dx-scroll-view",1,0),o.SdG(2),o.k0s()),2&O&&o.Y8G("showScrollbar","never")},dependencies:[Sr.e]})}}return v})(),bn=(()=>{class v{constructor(){this.isLoading=!0,this.loadingMessage=""}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-apicodo-loading-spinner"]],inputs:{isLoading:"isLoading",loadingMessage:"loadingMessage"},decls:14,vars:2,consts:[[3,"hidden"],[1,"load-spinner"],[1,"load-wrapper"],[1,"load-message"],[1,"load-spinner-animation"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"p"),o.EFF(5),o.k0s()(),o.j41(6,"div",1)(7,"p",4)(8,"span"),o.EFF(9,"\u2022"),o.k0s(),o.j41(10,"span"),o.EFF(11,"\u2022"),o.k0s(),o.j41(12,"span"),o.EFF(13,"\u2022"),o.k0s()()()()()()),2&O&&(o.Y8G("hidden",!F.isLoading),o.R7$(5),o.JRh(F.loadingMessage))},styles:[".load-spinner[_ngcontent-%COMP%]   .load-wrapper[_ngcontent-%COMP%]{width:66%;min-width:320px;max-width:360px;margin:auto;font-family:sans-serif;font-size:12px;padding:0}.load-spinner[_ngcontent-%COMP%]   .load-head[_ngcontent-%COMP%]{margin-top:20px}.load-spinner[_ngcontent-%COMP%]   .load-head[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{display:block;float:left;font-size:24px;font-weight:700;line-height:32px;margin:0 0 0 15px;padding:0}.load-spinner[_ngcontent-%COMP%]   .load-message[_ngcontent-%COMP%]{clear:both;margin-top:15px}.load-spinner[_ngcontent-%COMP%]   .load-message[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:18px}@keyframes _ngcontent-%COMP%_blink{0%{opacity:.2}20%{opacity:1}to{opacity:.2}}.load-spinner[_ngcontent-%COMP%]   .load-spinner-animation[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_blink;animation-duration:1.4s;animation-iteration-count:infinite;animation-fill-mode:both;font-size:32px;line-height:.5}.load-spinner[_ngcontent-%COMP%]   .load-spinner-animation[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.load-spinner[_ngcontent-%COMP%]   .load-spinner-animation[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}"]})}}return v})();var jn=M(5793),Ci=function(v){return v[v.SingleCommend=0]="SingleCommend",v[v.Image=1]="Image",v[v.File=2]="File",v[v.Video=3]="Video",v[v.Youtube=5]="Youtube",v[v.Facebook=6]="Facebook",v[v.Vimeo=7]="Vimeo",v[v.Gif=10]="Gif",v[v.ApicodoMedia=13]="ApicodoMedia",v}(Ci||{}),Mi=M(2123);let Ki=(()=>{class v{constructor(l,O){this.scopeService=l,this.http=O,this.apiEndpoint=this.scopeService.getScope().apiEndpoint}getChildren(l,O){return this.http.get(`${this.apiEndpoint}assets/${l}/children${O?`?start=${O}`:""}`)}getAssetImageProcessing(l){return this.http.get(`${this.apiEndpoint}assets/${l}/imageprocessing`)}insertAssetImageToArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/image/article/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetImageToSnip(l,O){return this.http.post(`${this.apiEndpoint}assets/image/snip/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F))).toPromise()}insertAssetImageToSponsoredArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/image/sponsoredArticle/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetImageToStaticArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/image/staticArticle/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetImageToEvent(l,O){return this.http.post(`${this.apiEndpoint}assets/image/event/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetTextToArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/text/article/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetTextToSnip(l,O){return this.http.post(`${this.apiEndpoint}assets/text/snip/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetTextToSponsoredArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/text/sponsoredArticle/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetTextToStaticArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/text/staticArticle/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetTextToEvent(l,O){return this.http.post(`${this.apiEndpoint}assets/text/event/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetFileToArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/file/article/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetFileToStaticArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/file/staticArticle/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetFileToSponsoredArticle(l,O){return this.http.post(`${this.apiEndpoint}assets/file/sponsoredArticle/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertAssetFileToEvent(l,O){return this.http.post(`${this.apiEndpoint}assets/file/event/${O}`,l).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertChild(l,O){return this.http.post(`${this.apiEndpoint}assets/${l}/children`,O).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertChildImage(l,O){return this.http.post(`${this.apiEndpoint}assets/${l}/children/image`,O).pipe((0,Mi.T)(F=>this.processAssetReference(F)))}insertReference(l){return this.http.post(`${this.apiEndpoint}assets/reference`,l).pipe((0,Mi.T)(O=>this.processAssetReference(O)))}report(l,O){return this.http.put(`${this.apiEndpoint}assets/${l.guid}/report/${O}`,{}).pipe((0,Mi.T)(F=>F.data))}like(l){return this.http.put(`${this.apiEndpoint}assets/${l}/like`,{}).pipe((0,Mi.T)(O=>O.data))}updateAssetImageProcessingFocuspoint(l,O){return this.http.put(`${this.apiEndpoint}assets/${l}/imageprocessing/focuspoint`,O).pipe((0,Mi.T)(F=>F.data))}updateImageText(l){return this.http.put(`${this.apiEndpoint}assets/image/${l.assetImage.guid}`,l.assetImage).pipe((0,Mi.T)(O=>O.data))}remove(l){return this.http.delete(`${this.apiEndpoint}assets/${l}`).pipe((0,Mi.T)(O=>O&&O.data?O.data:null))}removeReference(l){return this.http.delete(`${this.apiEndpoint}assets/reference/${l.guid}`).pipe((0,Mi.T)(O=>O.data))}processAssetReference(l){let O=l;return O.myAsset=!0,new Date(O.created)>new Date&&(O.created=(new Date).toISOString()),O}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),bt=(()=>{class v{constructor(l,O,F){this.http=l,this.scopeService=O,this.assetService=F,this.apiBaseUrl="",this.comments=new jn.t([]),this.comments$=this.comments.asObservable(),this.scope=O.getScope(),this.apiBaseUrl=`${this.scope.apiEndpoint}userComments/`}getComments(l){const F=l.assetReferences.filter(se=>!se.hideInComments&&!se.assetFile).sort((se,we)=>new Date(we.created).getTime()-new Date(se.created).getTime());this.comments.next(F)}mapToModel(l){return{guid:l.guid,user:l.user,text:l.assetText.text,created:l.assetText.created,released:l.assetText.released,parentGuid:l.parentGuid,replies:l.childAssets?.map(this.mapToModel)}}addComment(l,O,F,se){console.log(l,se),O==Ci.SingleCommend&&F?this.assetService.insertAssetTextToArticle(l,F).subscribe({next:we=>{let We=this.comments.getValue();We.unshift(we),this.comments.next([...We])},error:we=>{(0,Pn.A)({message:"Cant add comment"+we,position:{my:"top right",at:"top right"},maxWidth:"540px"},"error",3e3)}}):O==Ci.SingleCommend&&se?this.assetService.insertAssetTextToSnip(l,se).subscribe({next:we=>{let We=this.comments.getValue();We.unshift(we),this.comments.next([...We])},error:we=>{(0,Pn.A)({message:"Cant add comment"+we,position:{my:"top right",at:"top right"},maxWidth:"540px"},"error",3e3)}}):O==Ci.Image&&F?this.assetService.insertAssetImageToArticle(l,F).subscribe({next:we=>{let We=this.comments.getValue();We.unshift(we),this.comments.next([...We])},error:we=>{(0,Pn.A)({message:"Upload fehlgeschlagen: "+we,position:{my:"top right",at:"top right"},maxWidth:"540px"},"error",3e3)}}):O==Ci.Image&&se&&this.assetService.insertAssetImageToSnip(l,se).then(we=>{let We=this.comments.getValue();We.unshift(we),this.comments.next([...We])})}addReplyComment(l,O){O==Ci.SingleCommend&&l.parentGuid?this.assetService.insertChild(l.parentGuid,l).subscribe({next:F=>{let se=this.comments.getValue(),we=se.first(We=>We.guid==l.parentGuid);we.childAssets||(we.childAssets=[]),we.childAssets.unshift(F),this.comments.next([...se])},error:F=>{(0,Pn.A)({message:"Cant add reply"+F,position:{my:"top right",at:"top right"},maxWidth:"540px"},"error",3e3)}}):O==Ci.Image&&this.assetService.insertChildImage(l.parentGuid,l).subscribe({next:F=>{let se=this.comments.getValue(),we=se.first(We=>We.guid==l.parentGuid);we.childAssets||(we.childAssets=[]),we.childAssets.unshift(F),this.comments.next([...se])},error:F=>{(0,Pn.A)({message:"Upload fehlgeschlagen: "+F,position:{my:"top right",at:"top right"},maxWidth:"540px"},"error",3e3)}})}deleteComment(l){this.assetService.remove(l).subscribe(()=>{let O=this.comments.getValue(),F=!1;O.forEach(se=>{if(se.childAssets){const we=se.childAssets.findIndex(We=>We.guid===l);-1!==we&&(se.childAssets.splice(we,1),F=!0)}}),F||(O=O.filter(se=>se.guid!==l)),this.comments.next([...O])},O=>{(0,Pn.A)({message:"Cant delete comment"+O,position:{my:"top right",at:"top right"},maxWidth:"540px"},"error",3e3)})}likeComment(l){let O=this.comments.getValue(),F=O.where(se=>se.guid==l).firstOrDefault();this.http.put(`${this.scope.apiEndpoint}assets/${l}/like`,null).subscribe(se=>{F&&(F.likes=se.likes,this.comments.next(O))})}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A),o.KVO(Ki))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var gn=function(v){return v[v.None=0]="None",v[v.Journalist=2]="Journalist",v[v.MerkuristJournalist=3]="MerkuristJournalist",v[v.HeadJournalist=4]="HeadJournalist",v[v.Sales=5]="Sales",v[v.HeadSales=6]="HeadSales",v[v.NewsroomAdmin=7]="NewsroomAdmin",v}(gn||{}),Kt=M(3486);let Mn=(()=>{class v{constructor(l,O,F){this.elementRef=l,this.upgrade=O,this.http=F}ngOnInit(){this.isTemplateCached(this.templateUrl)?this.bootstrapAngularJsComponent():console.error(`Template not found in $templateCache: ${this.templateUrl}`)}isTemplateCached(l){return!!this.upgrade.$injector.get("$templateCache").get(l)}bootstrapAngularJsComponent(){const l=this.elementRef.nativeElement,O=this.upgrade.$injector.get("$rootScope").$new(),F={$scope:O};Object.keys(this.bindings).forEach(pn=>{F[pn]=this.bindings[pn]}),Object.keys(this.bindings).forEach(pn=>{O[pn]=this.bindings[pn]});const se=this.upgrade.$injector.get("$compile"),We=this.upgrade.$injector.get("$controller")(this.controllerName,F);O.ctrl=We;const Ft=se(`\n        <div ng-include="'${this.templateUrl}'"></div>\n    `);if(Ft){const pn=Ft(O);l.appendChild(pn[0]),O.$applyAsync()}else console.error("Error compiling AngularJS template")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(P.be),o.rXU(_.Qq))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-angularjs-wrapper"]],inputs:{templateUrl:"templateUrl",controllerName:"controllerName",bindings:"bindings"},decls:2,vars:0,consts:[["angularJsContainer",""]],template:function(O,F){1&O&&o.nrm(0,"div",null,0)},encapsulation:2})}}return v})();var _i=M(954),Qi=M(2385),Co=M(79);let $o=(()=>{class v{constructor(l,O,F,se,we){this.el=l,this.injector=O,this.upgrade=F,this.popupService=se,this.profileService=we,this.authorizedClickSource="",this.$analytics=this.upgrade.$injector.get("$analytics")}ngAfterViewInit(){(0,_i.R)(this.el.nativeElement,"click",{capture:!0}).subscribe(l=>{this.profileService.profile.isRegistered?this.profileService.profile.hasPartnerAccessAllowed||(l.preventDefault(),this.showPartnerAccessDialog(l)):(l.preventDefault(),this.showAuthenticationDialog(l))})}showAuthenticationDialog(l){this.popupService.openPopup({title:"Login",component:Mn,width:"auto",height:"auto",onClose:()=>{},data:{templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationDialog.html",controllerName:"AuthenticationDialog",bindings:{authenticationCallback:()=>{setTimeout(()=>{this.profileService.profile.isRegistered&&this.triggerOriginalClickHandler(l)},1200,!1)},facebookSignUpData:!1,login:!1}}}),this.$analytics.eventTrack("ShowAuthenticationRequiredDialog",{category:"Conversion",label:this.authorizedClickSource})}showPartnerAccessDialog(l){this.popupService.openPopup({title:"Login",component:Mn,width:"auto",height:"auto",onClose:()=>{},data:{templateUrl:"/ClientApp/src/legacy-app/authentication/allowPartnerAccessDialog.html",controllerName:"AllowPartnerAccessDialog",bindings:{authenticationCallback:()=>{setTimeout(()=>{this.profileService.profile.hasPartnerAccessAllowed&&this.el.nativeElement.click()},1200,!1)}}}})}triggerOriginalClickHandler(l){this.el.nativeElement.dispatchEvent(l)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(o.zZn),o.rXU(P.be),o.rXU(Qi.O),o.rXU(Co.p))}}static{this.\u0275dir=o.FsC({type:v,selectors:[["","appAuthorizedClick",""]],inputs:{authorizedClickSource:"authorizedClickSource"},standalone:!0})}}return v})();var sr=M(6313),lr=M(7096),rr=M(6117);const Pr=v=>({show:v}),wr=v=>({display:v}),Fo=()=>[2,3,4,5,7],os=()=>[8,9,10,11,12,14,15],fs=()=>[11,12,14,15],js=()=>[9,10,11,12,14];function Ta(v,p){if(1&v&&(o.j41(0,"div")(1,"div",20),o.nrm(2,"div",21),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(2),o.xc7("width",l.uploadProgress,"%")}}function es(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",17)(2,"label",18),o.EFF(3),o.k0s(),o.j41(4,"input",19),o.bIt("change",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.onImageUpload(F))}),o.k0s()(),o.DNE(5,Ta,3,2,"div",12),o.k0s()}if(2&v){const l=o.XpG();o.R7$(3),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_comments_upload_image")),o.R7$(2),o.Y8G("ngIf",l.uploadInProgress)}}function gs(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",25),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.resetModalValues())}),o.nrm(1,"i",26),o.k0s()}}function Ca(v,p){if(1&v&&(o.j41(0,"div")(1,"div",22),o.nrm(2,"img",23),o.DNE(3,gs,2,0,"div",24),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("src",l.imagePreview,o.B4B),o.R7$(),o.Y8G("ngIf",l.imagePreview)}}function Ga(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",29),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.checkAuthor,F)||(se.checkAuthor=F),o.Njj(F)}),o.bIt("ngModelChange",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.onAuthorChange())}),o.k0s(),o.j41(2,"label",30),o.EFF(3),o.k0s(),o.j41(4,"input",31),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.canBeUsedElsewhere,F)||(se.assetImage.canBeUsedElsewhere=F),o.Njj(F)}),o.k0s(),o.j41(5,"label",32),o.EFF(6),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.R50("ngModel",l.checkAuthor),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_amIAuthor_1")),o.R7$(),o.R50("ngModel",l.assetImage.canBeUsedElsewhere),o.R7$(2),o.JRh(l.canBeUsedElsewhereText)}}function Fi(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",33),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.author,F)||(se.assetImage.author=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType7_creatorPlaceholder")),o.R50("ngModel",l.assetImage.author),o.Y8G("required",2!==l.assetImage.sourceType)}}function ct(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",34),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.author,F)||(se.assetImage.author=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourcePlaceholder")),o.R50("ngModel",l.assetImage.author)}}function Ut(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",35),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.checkInternal,F)||(se.checkInternal=F),o.Njj(F)}),o.bIt("ngModelChange",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.onInternalChange())}),o.k0s(),o.j41(2,"label",36),o.EFF(3),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.R50("ngModel",l.checkInternal),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_internal"))}}function nn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",37),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.permissionGivenBy,F)||(se.assetImage.permissionGivenBy=F),o.Njj(F)}),o.k0s(),o.j41(2,"strong"),o.EFF(3),o.k0s(),o.j41(4,"input",38),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.dateOfPermission,F)||(se.assetImage.dateOfPermission=F),o.Njj(F)}),o.bIt("ngModelChange",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.generateImageSource())}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_permissionGivenByPlaceholder")),o.R50("ngModel",l.assetImage.permissionGivenBy),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_dateOfPermissionDescription")),o.R7$(),o.R50("ngModel",l.assetImage.dateOfPermission)}}function kn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"label",43),o.EFF(2),o.k0s(),o.j41(3,"input",44),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(3);return o.DH7(se.assetImage.expirationDays,F)||(se.assetImage.expirationDays=F),o.Njj(F)}),o.k0s(),o.j41(4,"label",43),o.EFF(5),o.k0s()()}if(2&v){const l=o.XpG(3);o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType5_expirationDaysDescription_0")),o.R7$(),o.R50("ngModel",l.assetImage.expirationDays),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType5_expirationDaysDescription_1"))}}function si(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",39),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.descriptionOfPermission,F)||(se.assetImage.descriptionOfPermission=F),o.Njj(F)}),o.k0s(),o.j41(2,"input",40),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.pressServiceUrl,F)||(se.assetImage.pressServiceUrl=F),o.Njj(F)}),o.k0s(),o.j41(3,"input",41),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.hasExpiration,F)||(se.hasExpiration=F),o.Njj(F)}),o.k0s(),o.j41(4,"label",42),o.EFF(5),o.k0s(),o.DNE(6,kn,6,3,"div",12),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType5_permissionPlaceholder")),o.R50("ngModel",l.assetImage.descriptionOfPermission),o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType5_pressServiceUrlPlaceholder")),o.R50("ngModel",l.assetImage.pressServiceUrl),o.R7$(),o.R50("ngModel",l.hasExpiration),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_enterExpirationDays")),o.R7$(),o.Y8G("ngIf",l.hasExpiration)}}function vi(v,p){if(1&v&&(o.j41(0,"div",47),o.EFF(1),o.k0s()),2&v){const l=o.XpG(3);o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_invalidLicense"))}}function Ni(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",48),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(3);return o.DH7(se.assetImage.title,F)||(se.assetImage.title=F),o.Njj(F)}),o.k0s(),o.j41(2,"input",49),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(3);return o.DH7(se.assetImage.sourceUrl,F)||(se.assetImage.sourceUrl=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG(3);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType7_titlePlaceholder")),o.R50("ngModel",l.assetImage.title),o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_linkPlaceholder")),o.R50("ngModel",l.assetImage.sourceUrl)}}function fo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"dx-select-box",45),o.nI1(2,"keyvalue"),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.ccLicense,F)||(se.ccLicense=F),o.Njj(F)}),o.k0s(),o.DNE(3,vi,2,1,"div",46)(4,Ni,3,4,"div",12),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType7_select")),o.R50("value",l.ccLicense),o.Y8G("dataSource",o.bMT(2,5,l.creativeCommonsLicenses)),o.R7$(2),o.Y8G("ngIf",l.ccLicenseError),o.R7$(),o.Y8G("ngIf",l.ccLicenseError)}}function Xi(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"dx-select-box",50),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.sourceUrl,F)||(se.assetImage.sourceUrl=F),o.Njj(F)}),o.k0s(),o.j41(2,"input",51),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.imageId,F)||(se.assetImage.imageId=F),o.Njj(F)}),o.k0s(),o.j41(3,"input",52),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.checkPurchasedByInternal,F)||(se.checkPurchasedByInternal=F),o.Njj(F)}),o.k0s(),o.j41(4,"label",53),o.EFF(5),o.k0s(),o.j41(6,"input",54),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.canBeUsedEditorial,F)||(se.assetImage.canBeUsedEditorial=F),o.Njj(F)}),o.k0s(),o.j41(7,"label",55),o.EFF(8),o.k0s(),o.j41(9,"input",56),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.canBeUsedAdvertising,F)||(se.assetImage.canBeUsedAdvertising=F),o.Njj(F)}),o.k0s(),o.j41(10,"label",57),o.EFF(11),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType8_select")),o.R50("value",l.assetImage.sourceUrl),o.Y8G("items",l.agencies),o.R7$(),o.R50("ngModel",l.assetImage.imageId),o.R7$(),o.R50("ngModel",l.checkPurchasedByInternal),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_purchasedByInternal")),o.R7$(),o.R50("ngModel",l.assetImage.canBeUsedEditorial),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_canBeUsedEditorial")),o.R7$(),o.R50("ngModel",l.assetImage.canBeUsedAdvertising),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_canBeUsedAdvertising"))}}function Vo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",58)(2,"dx-select-box",59),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.selectSocialMediaProfileType,F)||(se.selectSocialMediaProfileType=F),o.Njj(F)}),o.k0s()()()}if(2&v){const l=o.XpG(2);o.R7$(2),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType9_select")),o.Y8G("items",l.socialMediaProfileTypes),o.R50("value",l.selectSocialMediaProfileType)}}function Go(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",49),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.sourceUrl,F)||(se.assetImage.sourceUrl=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_linkPlaceholder")),o.R50("ngModel",l.assetImage.sourceUrl)}}function Er(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"strong"),o.EFF(2),o.k0s(),o.j41(3,"input",60),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.dateOfScreenshot,F)||(se.assetImage.dateOfScreenshot=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType14_dateOfScreenshotDescription")),o.R7$(),o.R50("ngModel",l.assetImage.dateOfScreenshot)}}function Ts(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",61),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.checkPermission,F)||(se.checkPermission=F),o.Njj(F)}),o.k0s(),o.j41(2,"label",62),o.EFF(3),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.R50("ngModel",l.checkPermission),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_permission"))}}function ms(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",27)(2,"dx-select-box",28),o.nI1(3,"keyvalue"),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.assetImage.sourceType,F)||(se.assetImage.sourceType=F),o.Njj(F)}),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.onSourceTypeChange(F))}),o.k0s()(),o.DNE(4,Ga,7,4,"div",12)(5,Fi,2,3,"div",12)(6,ct,2,2,"div",12)(7,Ut,4,2,"div",12)(8,nn,5,4,"div",12)(9,si,7,7,"div",12)(10,fo,5,7,"div",12)(11,Xi,12,10,"div",12)(12,Vo,3,3,"div",12)(13,Go,2,2,"div",12)(14,Er,4,2,"div",12)(15,Ts,4,2,"div",12),o.k0s()}if(2&v){const l=o.XpG();o.R7$(2),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType0")),o.R50("value",l.assetImage.sourceType),o.Y8G("dataSource",o.bMT(3,15,l.defaultSourceTypes)),o.R7$(2),o.Y8G("ngIf",1===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",o.lJ4(17,Fo).includes(l.assetImage.sourceType)),o.R7$(),o.Y8G("ngIf",o.lJ4(18,os).includes(l.assetImage.sourceType)),o.R7$(),o.Y8G("ngIf",2===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",3===l.assetImage.sourceType||4===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",5===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",7===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",8===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",9===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",o.lJ4(19,fs).includes(l.assetImage.sourceType)),o.R7$(),o.Y8G("ngIf",14===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",o.lJ4(20,js).includes(l.assetImage.sourceType))}}function rs(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",31),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.canBeUsedElsewhere,F)||(se.assetImage.canBeUsedElsewhere=F),o.Njj(F)}),o.k0s(),o.j41(2,"label",32),o.EFF(3),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.R50("ngModel",l.assetImage.canBeUsedElsewhere),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_canBeUsedElsewhere"))}}function $r(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",34),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.assetImage.author,F)||(se.assetImage.author=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourceType7_creatorPlaceholder")),o.R50("ngModel",l.assetImage.author)}}function Qa(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",63),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.checkAuthor,F)||(se.checkAuthor=F),o.Njj(F)}),o.k0s(),o.j41(2,"label",64),o.EFF(3),o.k0s(),o.j41(4,"input",65),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.checkAuthor,F)||(se.checkAuthor=F),o.Njj(F)}),o.k0s(),o.j41(5,"label",66),o.EFF(6),o.k0s(),o.DNE(7,rs,4,2,"div",12)(8,$r,2,2,"div",12),o.k0s()}if(2&v){const l=o.XpG();o.R7$(),o.R50("ngModel",l.checkAuthor),o.Y8G("value",1),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_amIAuthor_1")),o.R7$(),o.R50("ngModel",l.checkAuthor),o.Y8G("value",4),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_amIAuthor_2")),o.R7$(),o.Y8G("ngIf",1===l.assetImage.sourceType),o.R7$(),o.Y8G("ngIf",4===l.assetImage.sourceType)}}function Gs(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"input",67),o.mxI("ngModelChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.assetImage.author,F)||(se.assetImage.author=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_sourcePlaceholder")),o.R50("ngModel",l.assetImage.author)}}let Vl=(()=>{class v{constructor(l,O,F){this.imageUploadService=l,this.scopeService=O,this.assetLicensingService=F,this.onClose=new o.bkB,this.onSave=new o.bkB,this.imagePreview=null,this.isModalOpen=!1,this.uploadInProgress=!1,this.uploadCompleted=!1,this.uploadProgress=0,this.imageDescription="",this.alwaysShowImageDescription=!1,this.selectedFile=null,this.imageGuid=null,this.commentType=Ci.Image,this.CommentType=Ci,this.simpleImageSource=0,this.checkInternal=!1,this.checkAuthor=!1,this.checkPermission=!1,this.hasExpiration=!1,this.checkPurchasedByInternal=!1,this.agencies=[],this.socialMediaProfileTypes=[],this.scope=this.scopeService.getScope(),this.defaultSourceTypes=this.assetLicensingService.getDefaultSourceTypes(),this.creativeCommonsLicenses=this.assetLicensingService.getCreativeCommonsLicenses(),this.agencies=this.assetLicensingService.getAgencys(),this.socialMediaProfileTypes=this.assetLicensingService.getsocialMediaProfileTypes(),this.user=this.scope.profile,this.generateDefaultAssetImage(),this.scope.currentScope.network.settings.simpleImageSource&&(this.simpleImageSource=16)}ngOnInit(){this.scope.profile.isRegistered&&this.scope.profile.chapterRoles.includes(gn.MerkuristJournalist)&&delete this.defaultSourceTypes[2],this.canBeUsedElsewhereText=this.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_createImage_canBeUsedElsewhere").replace("{{networkName}}",this.scope.network.name)}generateDefaultAssetImage(){this.assetImage={type:2,text:"",attachment:"",imageSource:"",uploadGuid:"",pdfUploadGuid:"",uploadError:"",source:"",expirationDate:"",expirationDays:0,canBeUsedElsewhere:this.scope.currentScope.network.settings.simpleImageSource||!(this.scope.profile.chapterRoles?.includes(gn.Journalist)||this.scope.profile.chapterRoles?.includes(gn.MerkuristJournalist)),sourceType:null,author:"",title:"",dateOfPermission:"",descriptionOfPermission:"",permissionGivenBy:"",pressServiceUrl:"",sourceUrl:"",agency:"",creativeCommonsLicense:"",dateOfScreenshot:"",canBeUsedEditorial:!0,canBeUsedAdvertising:!1,imageId:"",mimeType:null,alwaysShowImageDescription:!!this.scope.currentScope.network.settings.configurations.alwaysShowImageDescriptionDefaultValue}}open(){this.isModalOpen=!0}close(){this.isModalOpen=!1,this.onClose.emit()}onImageUpload(l){const O=l.target.files[0];O&&(this.selectedFile=O,this.previewImage(O),this.uploadInProgress=!0,this.imageUploadService.uploadAsset(O).subscribe({next:F=>{"number"==typeof F?this.uploadProgress=F:(this.uploadCompleted=!0,this.uploadInProgress=!1,this.assetImage.uploadGuid=F,this.assetImage.mimeType=this.selectedFile?.type)},error:F=>{(0,Pn.A)("Upload Error: "+F,{position:"center",direction:"up-push"}),this.uploadInProgress=!1}}))}previewImage(l){const O=new FileReader;O.onload=F=>{this.imagePreview=F.target?.result??null},O.readAsDataURL(l)}onFormSubmit(l){l.valid&&(this.generateImageSource(),this.onSave.emit({imagePreview:this.imagePreview,assetImage:this.assetImage}),this.close(),this.resetModalValues(),this.uploadInProgress=!1,this.uploadCompleted=!1,this.uploadProgress=0,this.selectedFile=null,this.imageGuid=null)}generateImageSource(){var l=this.assetImage.author,O=this.assetImage.author;switch(this.assetImage.sourceType){case 2:this.assetImage.author||(l=O=this.scope.currentScope.network.name);break;case 5:this.assetImage.pressServiceUrl&&(l+=", [source]("+this.assetImage.pressServiceUrl+")");break;case 7:this.ccLicense&&!this.ccLicense.validity?l=this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectedInvalidLicenseError:this.ccLicense&&l&&(this.assetImage.title&&(l+=", ["+this.assetImage.title+"]",O=O+", "+this.assetImage.title),this.assetImage.sourceUrl&&(l+="("+this.assetImage.sourceUrl+")"),this.assetImage.creativeCommonsLicense&&(l+=", "+this.ccLicense.value,O+=", "+this.ccLicense.name));break;case 8:this.assetImage.agency&&(l=O="\xa9 "+l+" / "+this.assetImage.agency)}this.assetImage.source=l}creativeCommonsLicenseSelected(){this.ccLicense?(this.ccLicenseError=this.ccLicense.validity?null:this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectedInvalidLicensePlatformError_0+" "+this.ccLicense.name+" "+this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectedInvalidLicensePlatformError_1,this.assetImage.creativeCommonsLicense=this.ccLicense.name):this.ccLicenseError=this.scope.currentScope.network.resources.web_assetDialog_createImage_sourceType7_selectLicenseError}onInternalChange(){this.checkInternal=!this.checkInternal}onAuthorChange(){this.checkAuthor?this.assetImage.author=`${this.user?.firstName} ${this.user?.lastName}`:this.generateDefaultAssetImage()}onSourceTypeChange(l){this.resetModalValues(),this.assetImage.sourceType=l.value}resetModalValues(){this.assetImage.sourceType=0,this.checkAuthor=!1,this.ccLicense=null,this.ccLicenseError=null,this.checkInternal=!1,this.selectSocialMediaProfileType="",this.hasExpiration=!1,this.checkPermission=!1,this.selectSocialMediaProfileType=""}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(lr.a),o.rXU(b.A),o.rXU(rr.u))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-upload-dialog"]],outputs:{onClose:"onClose",onSave:"onSave"},decls:24,vars:15,consts:[["uploadForm","ngForm"],[1,"modal",3,"ngClass","ngStyle"],[1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","uploadModalLabel",1,"modal-title"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"mt-3"],[3,"ngSubmit"],[1,"row"],[1,"col-md-5"],[4,"ngIf"],[1,"col-md-7"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"mb-3"],["for","imageInput",1,"form-label"],["type","file","id","imageInput",1,"form-control",3,"change"],[1,"progress"],["role","progressbar",1,"progress-bar"],[1,"image-preview"],["alt","Image Preview",1,"img-thumbnail","position-relative","img-fluid",3,"src"],["class","delete-icon col-5",3,"click",4,"ngIf"],[1,"delete-icon","col-5",3,"click"],[1,"fa-regular","fa-trash-can"],[1,"source-type-selevt","mb-2"],["displayExpr","value.name","valueExpr","value.sourceType",3,"valueChange","onValueChanged","value","dataSource","placeholder"],["type","checkbox","id","checkAuthor","name","checkAuthor",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","checkAuthor"],["type","checkbox","id","canBeUsedElsewhere","name","canBeUsedElsewhere",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","canBeUsedElsewhere"],["type","text","name","author",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel","required"],["type","text","name","author","required","",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"],["type","checkbox","id","checkInternal","name","checkInternal",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","checkInternal"],["type","text","name","permissionGivenBy","required","",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"],["type","text","name","dateOfPermission","placeholder","DD.MM.YYYY","required","",1,"mk-textbox",3,"ngModelChange","ngModel"],["type","text","name","descriptionOfPermission","required","",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"],["type","text","name","pressServiceUrl","required","",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"],["type","checkbox","id","hasExpiration","name","hasExpiration",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","hasExpiration"],[1,"mk-label"],["type","number","name","expirationDays","min","1","max","365","required","",1,"mk-textbox",3,"ngModelChange","ngModel"],["displayExpr","value.name","valueExpr","value.value",3,"valueChange","value","dataSource","placeholder"],["class","alert alert-danger",4,"ngIf"],[1,"alert","alert-danger"],["type","text","name","title","required","",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"],["type","text","name","sourceUrl","required","",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"],["displayExpr","name","valueExpr","url",3,"valueChange","value","items","placeholder"],["type","text","name","imageId","placeholder","ID","required","",1,"mk-textbox",3,"ngModelChange","ngModel"],["type","checkbox","id","checkPurchasedByInternal","name","checkPurchasedByInternal","required","",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","checkPurchasedByInternal"],["type","checkbox","id","checkImageCanBeUsedEditorial","name","checkImageCanBeUsedEditorial","required","",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","checkImageCanBeUsedEditorial"],["type","checkbox","id","checkImageCanBeUsedAdvertising","name","checkImageCanBeUsedAdvertising",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","checkImageCanBeUsedAdvertising"],[1,"social-media-select","mb-3"],["displayExpr","display","valueExpr","name","required","",3,"valueChange","items","value","placeholder"],["type","text","name","dateOfScreenshot","placeholder","DD.MM.YYYY","required","",1,"mk-textbox",3,"ngModelChange","ngModel"],["type","checkbox","id","checkPermission","name","checkPermission","required","",1,"btn","checkbox",3,"ngModelChange","ngModel"],["for","checkPermission"],["type","radio","id","radioAmIAuthor1","name","radioAmIAuthor","required","",1,"btn","radio-inline",3,"ngModelChange","ngModel","value"],["for","radioAmIAuthor1"],["type","radio","id","radioAmIAuthor2","name","radioAmIAuthor","required","",1,"btn","radio-inline",3,"ngModelChange","ngModel","value"],["for","radioAmIAuthor2"],["type","text","name","author",1,"mk-textbox",3,"ngModelChange","placeholder","ngModel"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5",5),o.EFF(5),o.k0s(),o.j41(6,"button",6),o.bIt("click",function(){return o.eBV(se),o.Njj(F.close())}),o.k0s()(),o.j41(7,"div",7)(8,"div",8)(9,"form",9,0),o.bIt("ngSubmit",function(){o.eBV(se);const We=o.sdS(10);return o.Njj(F.onFormSubmit(We))}),o.j41(11,"div",10)(12,"div",11),o.DNE(13,es,6,2,"div",12)(14,Ca,4,2,"div",12),o.k0s(),o.j41(15,"div",13),o.DNE(16,ms,16,21,"div",12)(17,Qa,9,8,"div",12)(18,Gs,2,2,"div",12),o.k0s()(),o.j41(19,"div",14)(20,"button",15),o.bIt("click",function(){return o.eBV(se),o.Njj(F.close())}),o.EFF(21),o.k0s(),o.j41(22,"button",16),o.EFF(23),o.k0s()()()()()()()()}if(2&O){const se=o.sdS(10);o.Y8G("ngClass",o.eq3(11,Pr,F.isModalOpen))("ngStyle",o.eq3(13,wr,F.isModalOpen?"block":"none")),o.R7$(5),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_comments_upload")),o.R7$(8),o.Y8G("ngIf",!F.uploadCompleted),o.R7$(),o.Y8G("ngIf",F.uploadCompleted),o.R7$(2),o.Y8G("ngIf",F.uploadCompleted&&F.scope.profile.isJournalist&&!F.scope.currentScope.network.settings.simpleImageSource),o.R7$(),o.Y8G("ngIf",F.uploadCompleted&&!F.scope.profile.isJournalist&&!F.scope.currentScope.network.settings.simpleImageSource),o.R7$(),o.Y8G("ngIf",F.uploadCompleted&&F.scope.currentScope.network.settings.simpleImageSource),o.R7$(3),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_common_close")),o.R7$(),o.Y8G("disabled",!se.valid),o.R7$(),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_common_save"))}},dependencies:[a.YU,a.bT,a.B3,et.qT,et.me,et.Q0,et.Zm,et.Fm,et.BC,et.cb,et.YS,et.xq,et.VZ,et.zX,et.vS,et.cV,Wt.l,a.lG],styles:[".image-preview[_ngcontent-%COMP%]{display:flex;justify-content:center;max-width:25rem;aspect-ratio:4/3;overflow:hidden}.image-preview[_ngcontent-%COMP%]   .comment-img-thumbnail[_ngcontent-%COMP%]{max-width:20rem;aspect-ratio:4/3;overflow:hidden;object-fit:cover;object-position:center}.delete-icon[_ngcontent-%COMP%]{top:5px;right:5px;cursor:pointer;font-size:2.5rem}"]})}}return v})(),Ma=(()=>{class v{constructor(l){this.scopeService=l}transform(l){const O=this.scopeService.getScope().globalSettings.blobStorageCdnUrl;let F=null,se=!1,we="";return l.avatarGuid?F=`${O}/avatar/${l.avatarGuid}?preset=cover-1x1`:l.firstName&&l.lastName?(se=!0,we=`${l.firstName[0]||""}${l.lastName[0]||""}`.toUpperCase()):F=`${O}/avatar/${1===l.gender?"male.png":"female.png"}?preset=cover-1x1`,{avatarUrl:F,useInitials:se,initials:we}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A,16))}}static{this.\u0275pipe=o.EJ8({name:"createAvatar",type:v,pure:!0})}}return v})();const Lo=["commentUploadDialog"],Ms=["fileInput"],cl=v=>({stylingMode:"text",icon:"fa-regular fa-image",onClick:v}),Fs=v=>({location:"after",name:"commentImageUploadButton",options:v}),Hl=v=>[v];function Ld(v,p){if(1&v&&o.nrm(0,"img",14),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function nd(v,p){if(1&v&&(o.j41(0,"div",15),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf;o.R7$(),o.SpI(" ",l.initials," ")}}function Cn(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,Ld,1,1,"img",12)(2,nd,2,1,"div",13),o.k0s()),2&v){const l=p.ngIf;o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}function vn(v,p){if(1&v&&(o.j41(0,"div",16),o.nrm(1,"img",17),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("src",l.imagePreview,o.B4B)}}function Ht(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",5),o.DNE(2,Cn,3,2,"div",2),o.nI1(3,"createAvatar"),o.j41(4,"div",6)(5,"dx-text-box",7),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.text,F)||(se.text=F),o.Njj(F)})("textChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.text,F)||(se.text=F),o.Njj(F)}),o.k0s()()(),o.j41(6,"div",8)(7,"dx-button",9),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.clearInput())}),o.k0s(),o.j41(8,"dx-button",10),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.addComment())}),o.k0s()(),o.DNE(9,vn,2,1,"div",11),o.k0s()}if(2&v){const l=o.XpG();o.R7$(2),o.Y8G("ngIf",o.bMT(3,10,l.user)),o.R7$(3),o.Y8G("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_comments_add_comment")),o.R50("value",l.text)("text",l.text),o.Y8G("showClearButton",!0)("buttons",o.eq3(16,Hl,o.eq3(14,Fs,o.eq3(12,cl,l.openDialog)))),o.R7$(2),o.Y8G("text",l.scope.currentScope.network.getResourceOrKeyName("web_common_cancel")),o.R7$(),o.Y8G("text",l.scope.currentScope.network.getResourceOrKeyName("web_comments_send"))("disabled",!l.text&&!l.imagePreview),o.R7$(),o.Y8G("ngIf",l.imagePreview)}}function Kn(v,p){if(1&v&&(o.j41(0,"div",18)(1,"div",19)(2,"h2"),o.EFF(3),o.k0s()(),o.j41(4,"div",20)(5,"dx-button",21),o.EFF(6),o.k0s()()()),2&v){const l=o.XpG();o.R7$(3),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_commen_comment_authorization")),o.R7$(2),o.Y8G("authorizedClickSource","NewComment"),o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("admin_common_signIn")," ")}}let yi=(()=>{class v{constructor(l,O,F,se){this.commentService=l,this.scopeService=O,this.assetService=F,this.profileService=se,this.templateKey="UserCommentFormComponent",this.imagePreview=null,this.text="",this.commentType=Ci.SingleCommend,this.profileServiceSubscription=new sr.y,this.openDialog=()=>{this.commentUploadDialog.open()},this.scope=O.getScope(),this.user=this.scope.profile,this.profileServiceSubscription=this.profileService.profileChanged$.subscribe(we=>this.user==we)}ngOnDestroy(){this.profileServiceSubscription.unsubscribe()}ngOnInit(){}addComment(){if(this.commentType==Ci.SingleCommend&&this.text&&(this.articleId||this.snipId)){let O=(new Date).toUTCString();var l={guid:"",text:this.text,parentGuid:this.parentGuid,released:O,created:O,user:this.user};null==l.parentGuid?this.commentService.addComment(l,this.commentType,this.articleId,this.snipId):this.commentService.addReplyComment(l,this.commentType),this.resetValues()}if(this.commentType==Ci.Image&&(this.articleId||this.snipId)){const O={text:this.text,source:this.assetImage.source||"",uploadGuid:this.assetImage.uploadGuid||null,parentGuid:this.parentGuid,expirationDate:this.assetImage.expirationDate?new Date(this.assetImage.expirationDate):null,expirationDays:this.assetImage.expirationDays||0,sourceType:this.assetImage.sourceType||0,author:this.assetImage.author||"",title:this.assetImage.title||"",dateOfPermission:this.assetImage.dateOfPermission?new Date(this.assetImage.dateOfPermission):null,descriptionOfPermission:this.assetImage.descriptionOfPermission||"",permissionGivenBy:this.assetImage.permissionGivenBy||"",pressServiceUrl:this.assetImage.pressServiceUrl||"",sourceUrl:this.assetImage.sourceUrl||"",agency:this.assetImage.agency||"",creativeCommonsLicense:this.assetImage.creativeCommonsLicense||"",dateOfScreenshot:this.assetImage.dateOfScreenshot?new Date(this.assetImage.dateOfScreenshot):null,canBeUsedEditorial:this.assetImage.canBeUsedEditorial||null,canBeUsedAdvertising:this.assetImage.canBeUsedAdvertising||null,canBeUsedElsewhere:this.assetImage.canBeUsedElsewhere||!1,imageId:this.assetImage.uploadGuid||null,mimeType:this.assetImage.mimeType||null,alwaysShowImageDescription:this.assetImage.alwaysShowImageDescription||!1,attachment:this.assetImage.attachment||""};null==this.parentGuid?this.commentService.addComment(O,this.commentType,this.articleId,this.snipId):this.commentService.addReplyComment(O,this.commentType),this.resetValues()}}onModalClose(){}onModalSave(l){this.imagePreview=l.imagePreview,this.assetImage=l.assetImage,this.assetImage.uploadGuid&&(this.commentType=Ci.Image)}clearInput(){this.resetValues()}resetValues(){this.text="",this.imagePreview=null,this.assetImage=null,this.commentType=Ci.SingleCommend}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(bt),o.rXU(b.A),o.rXU(Ki),o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-comment-form"]],viewQuery:function(O,F){if(1&O&&(o.GBs(Lo,5),o.GBs(Ms,5)),2&O){let se;o.mGM(se=o.lsd())&&(F.commentUploadDialog=se.first),o.mGM(se=o.lsd())&&(F.fileInput=se.first)}},inputs:{parentGuid:"parentGuid",articleId:"articleId",snipId:"snipId"},decls:5,vars:2,consts:[["commentUploadDialog",""],[1,"comment-container"],[4,"ngIf"],["class","d-flex flex-column align-items-center",4,"ngIf"],[3,"onSave","onClose"],[1,"comment-box"],[1,"input-group"],["stylingMode","underlined",1,"form-control","comment-input",3,"valueChange","textChange","placeholder","value","text","showClearButton","buttons"],[1,"button-group"],["stylingMode","text",1,"btn",3,"onClick","text"],["stylingMode","text",1,"btn",3,"onClick","text","disabled"],["class","image-preview",4,"ngIf"],["alt","User Avatar","class","avatar me-2",3,"src",4,"ngIf"],["class","avatar-initials me-2",4,"ngIf"],["alt","User Avatar",1,"avatar","me-2",3,"src"],[1,"avatar-initials","me-2"],[1,"image-preview"],["alt","Image Preview",1,"comment-img-thumbnail","img-fluid",3,"src"],[1,"d-flex","flex-column","align-items-center"],[1,"comment-unRegistered-text","mb-2"],[1,"comment-unRegistered-button"],["appAuthorizedClick","",3,"authorizedClickSource"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",1),o.DNE(1,Ht,10,18,"div",2)(2,Kn,7,3,"div",3),o.k0s(),o.j41(3,"app-upload-dialog",4,0),o.bIt("onSave",function(We){return o.eBV(se),o.Njj(F.onModalSave(We))})("onClose",function(){return o.eBV(se),o.Njj(F.onModalClose())}),o.k0s()}2&O&&(o.R7$(),o.Y8G("ngIf",F.user.isRegistered),o.R7$(),o.Y8G("ngIf",!F.user.isRegistered))},dependencies:[a.bT,Hi.e,Ti.m,$o,Vl,Ma],styles:[".comment-container[_ngcontent-%COMP%]   .comment-box[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.comment-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:block}.comment-container[_ngcontent-%COMP%]   .avatar-initials[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;background-color:#ccc;color:var(--textColor);font-size:1.5rem}.comment-container[_ngcontent-%COMP%]   .input-group[_ngcontent-%COMP%]{flex-grow:1;position:relative;border-bottom:1px solid var(--light-gray);display:flex;flex-direction:column;background-color:transparent}.comment-container[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border:none;border-radius:0;width:100%;font-size:1.5rem;padding-right:2.5rem}.comment-container[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none;border-bottom:1px solid var(--textColor)}.comment-container[_ngcontent-%COMP%]   .fa-image[_ngcontent-%COMP%]{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:2rem;cursor:pointer;color:var(--textColor);pointer-events:auto;z-index:10}.comment-container[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:-.5rem;margin-right:1rem}.comment-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:0;border:none;background:none;color:var(--textColor);font-size:1.2rem;margin-left:1rem}.comment-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover{color:var(--light-gray)}.comment-container[_ngcontent-%COMP%]   .btn-cancel[_ngcontent-%COMP%]{color:var(--textColor)}.comment-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:disabled{color:var(--light-gray);cursor:not-allowed;border:none}.comment-container[_ngcontent-%COMP%]   .comment-input[_ngcontent-%COMP%]{font-family:var(--fontPrimary);color:var(--textColor);font-size:1.2rem}.comment-container[_ngcontent-%COMP%]   .comment-input[_ngcontent-%COMP%]     .dx-texteditor-input, .comment-container[_ngcontent-%COMP%]   .comment-input[_ngcontent-%COMP%]     .dx-placeholder{font-size:1.2rem}.comment-container[_ngcontent-%COMP%]   .comment-input[_ngcontent-%COMP%]     .dx-icon{font-size:2rem}.comment-container[_ngcontent-%COMP%]   .image-preview[_ngcontent-%COMP%]{display:flex;justify-content:center}.comment-container[_ngcontent-%COMP%]   .image-preview[_ngcontent-%COMP%]   .comment-img-thumbnail[_ngcontent-%COMP%]{max-width:20rem;aspect-ratio:4/3;overflow:hidden;object-fit:cover;object-position:center}@media (max-width: 768px){.comment-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;margin-right:10px}.comment-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:0;border:none;background:none;color:var(--textColor);font-size:1.4rem;margin-left:1rem}.comment-container[_ngcontent-%COMP%]   .comment-input[_ngcontent-%COMP%]{font-family:var(--fontPrimary);color:var(--textColor);font-size:1.3rem}.comment-container[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:-1.2rem;margin-right:1rem}}"]})}}return v})();var Dr=M(9026);let us=(()=>{class v{constructor(){this.currentImageIndex=0,this.close=new o.bkB}closeLightbox(){this.close.emit()}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-image-viewer"]],inputs:{imageUrl:"imageUrl",currentImageIndex:"currentImageIndex"},outputs:{close:"close"},decls:5,vars:1,consts:[[1,"image-viewer-backdrop",3,"click"],[1,"image-viewer-content"],[1,"image-viewer-close",3,"click"],[1,"fa-solid","fa-times"],["alt","Image",1,"img-fluid",3,"src"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.bIt("click",function(){return F.closeLightbox()}),o.j41(1,"div",1)(2,"button",2),o.bIt("click",function(){return F.closeLightbox()}),o.nrm(3,"i",3),o.k0s(),o.nrm(4,"img",4),o.k0s()()),2&O&&(o.R7$(4),o.Y8G("src",F.imageUrl,o.B4B))},styles:[".image-viewer-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1050}.image-viewer-content{position:relative;max-width:100%;max-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;padding:20px;overflow:hidden}.image-viewer-content img{max-width:100%;max-height:80%;object-fit:contain;margin-bottom:20px}.image-viewer-buttons{display:flex;justify-content:space-between;align-items:center;width:100%;position:absolute;top:50%;transform:translateY(-50%);padding:0 20px}.image-viewer-prev,.image-viewer-next{background:none;border:none;color:#000;font-size:10rem;cursor:pointer}.image-viewer-prev:hover,.image-viewer-next:hover{color:#aaa}.image-viewer-close{position:absolute;top:20px;right:20px;background:none;border:none;color:#000;font-size:2rem;cursor:pointer}.image-viewer-close:hover{color:#aaa}.image-viewer-media-gallery-item-details-description{max-width:50%}.image-viewer-media-gallery-item-details-description .avatar-text{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:.5rem;margin-bottom:2rem}\n"],encapsulation:2})}}return v})();const Wa=v=>{clearTimeout(v.countUpTimeout),v._countUpOrigInnerHTML&&(v.innerHTML=v._countUpOrigInnerHTML,v._countUpOrigInnerHTML=void 0),v.style.visibility=""};let ht=(()=>{class v{constructor(l,O){this.http=l,this.scopeService=O,this.scope=O.getScope(),this.apiEndpoint=this.scope.apiEndpoint}like(l,O,F,se){let we="";if(O)we="articles";else if(F)we="snips";else{if(!se)return;we="assets"}return this.http.put(`${this.apiEndpoint}${we}/${l}/like`,null).toPromise().then(We=>We).catch(this.handleError)}handleError(l){return console.error("An error occurred",l),Promise.reject(l.message||l)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const jt=["ohaComponent"],yn=(v,p,l,O)=>({"oha-community":v,"oha-bordeaux":p,"oha-disabled":l,"oha-readOnly":O}),Nn=(v,p)=>({"stroke-dashoffset":v,display:p}),hi=v=>({"oha-score-hidden":v}),xi=(v,p,l)=>({transform:v,rotate:p,display:l});function to(v,p){if(1&v&&(o.qSk(),o.j41(0,"g",13),o.nrm(1,"circle",14),o.k0s()),2&v){const l=o.XpG();o.Y8G("ngStyle",o.sMw(1,xi,"rotateZ("+l.getRotateDegrees(l.getReferenceScore())+"deg)",l.getRotateDegrees(l.getReferenceScore()),l.getReferenceScore()>1?"none":null))}}function Yi(v,p){1&v&&o.nrm(0,"div",15)}let uo=(()=>{class v{constructor(l,O){this.scopeService=l,this.ohaService=O,this.isArticle=!1,this.isSnip=!1,this.isAssetReference=!1,this.profileIsReadOnlyMode=!0,this.isLoading=!1,this.isAnimated=!1,this.isTransitioned=!1,this.isDisabled=!1,this.isPreview=!1,this.showLikes=!1,this.showScore=!0,this.showComponent=!0,this.ohaAdditionalClass="",this.disabledScore="...",this.scope=this.scopeService.getScope(),this.profileIsReadOnlyMode=this.scope.profile.readOnlyMode,this.ohaName=this.scope.currentScope.network.getResourceOrKeyName("web_common_oha"),this.ohaName&&this.ohaName.startsWith("<span ")&&this.ohaName.endsWith("</span>")&&(this.ohaName=this.ohaName.replace("</span>","</tspan>"),this.ohaName=this.ohaName.replace("<span ","<tspan "))}ngOnInit(){this.article?(this.isArticle=!0,this.showLikes=this.scope.currentScope.chapter.settings.enableOhaLikes,this.showScore=!this.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig||this.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig<1,this.showComponent=!this.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig||this.scope.currentScope.chapter.settings.configurations.ohaArticleViewConfig<2,this.reference=this.article):this.snip?(this.isSnip=!0,this.showLikes=this.scope.currentScope.chapter.settings.enableOhaLikes,this.showScore=!this.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig||this.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig<1,this.showComponent=!this.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig||this.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig<2,this.reference=this.snip):this.assetReference&&(this.isAssetReference=!0,this.reference=this.assetReference,this.showScore=!this.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig||this.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig<1,this.showComponent=!this.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig||this.scope.currentScope.chapter.settings.configurations.ohaAssetViewConfig<2),this.scope.network.settings.configurations.ohaConfigurationModel&&this.scope.network.settings.configurations.ohaConfigurationModel.useIcon&&(this.ohaAdditionalClass=this.scope.network.settings.configurations.ohaConfigurationModel.additionalClass,this.ohaName=String.fromCharCode(this.scope.network.settings.configurations.ohaConfigurationModel.charCode)),this.isAnimated=!this.isAssetReference&&!this.showLikes&&"ArticleDisplayable"!==this.source&&"xs"!==this.size,this.isTransitioned=!this.isAssetReference&&"ArticleDisplayable"!==this.source,this.isDisabled=!this.isAssetReference&&(this.reference.archived||this.reference.deleted),this.isPreview=this.isArticle&&this.reference.isPreview,this.size=this.size?this.size:"md"}ngAfterViewInit(){this.ohaButton=this.element?.nativeElement,this.ohaText=this.ohaButton.querySelector(".oha-text"),this.ohaScoreTspan=this.ohaButton.querySelector(".oha-score-tspan")}getReferenceScore(){return this.reference?this.isAssetReference||this.showLikes?this.reference.likes:this.reference.score<1?this.reference.score:1:0}getScore(){if(this.isDisabled||!this.reference||typeof this.reference.likes>"u")return this.disabledScore;if(!this.isAssetReference&&!this.showLikes){var l=this.reference.score;return(l<1?100*l:100).toFixed(l<1?1:0).replace(/\./g,",")}return this.reference.likes.toString()}iLike(){return this.reference?this.reference.iLike:null}oha(l){if(l.preventDefault(),!(this.isDisabled||this.profileIsReadOnlyMode||this.isPreview||this.isLoading)&&this.reference)if(this.isTransitioned||(this.isTransitioned=!0),this.isLoading=!0,this.ohaText.classList.add("oha-loading"),this.ohaText.classList.remove("oha-liked"),this.reference.iLike=!this.reference.iLike,this.isAssetReference)this.ohaService.like(this.reference.guid,this.isArticle,this.isSnip,this.isAssetReference).then(se=>{this.animateOhaButton(se.likes)},()=>{this.reference.iLike=!this.reference.iLike,this.animateOhaButton(this.reference.score)});else{var O=this.reference.score,F=this.reference.likes;this.reference.iLike&&setTimeout(()=>{this.animateOhaPlanet(0)}),this.ohaService.like(this.reference.id,this.isArticle,this.isSnip,this.isAssetReference).then(se=>{var we=se.score,We=se.likes;this.showLikes?((this.reference.iLike&&F>We||!this.reference.iLike&&F<We)&&(We=F),this.animateOhaButton(We)):((this.reference.iLike&&O>we||!this.reference.iLike&&O<we)&&(we=O),this.animateOhaButton(we<1?we:1))},()=>{this.reference.iLike=!this.reference.iLike,this.animateOhaButton(this.showLikes?F:O)})}}animateOhaButton(l){if(this.reference){var O=!this.isAssetReference&&this.reference.iLike?750:0,F=!this.isAssetReference&&this.reference.iLike?500:0;setTimeout(()=>{this.showLikes?this.reference.likes=l:this.reference.score=l,O?(this.ohaScoreTspan.textContent=this.showLikes?l:(100*l).toFixed(l<1?1:0).replace(/\./g,","),this.ohaText.classList.add("oha-liked"),((v,p={})=>{const{action:l="start",duration:O=1e3,delay:F=16}=p;if("stop"===l)return void Wa(v);if(Wa(v),!/[0-9]/.test(v.innerHTML))return;const se=((v,p={})=>{const{duration:l=1e3,delay:O=16}=p,F=l/O,se=v.toString().split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/),we=[];for(let We=0;We<F;We++)we.push("");for(let We=0;We<se.length;We++)if(/([0-9.][,.0-9]*[0-9]*)/.test(se[We])&&!/<[^>]+>/.test(se[We])){let gt=se[We];const Ft=[...gt.matchAll(/[.,]/g)].map(fi=>({char:fi[0],i:gt.length-fi.index-1})).sort((fi,_o)=>fi.i-_o.i);gt=gt.replace(/[.,]/g,"");let pn=we.length-1;for(let fi=F;fi>=1;fi--){let _o=parseInt(gt/F*fi,10);_o=Ft.reduce((Po,{char:Ro,i:Rr})=>Po.length<=Rr?Po:Po.slice(0,-Rr)+Ro+Po.slice(-Rr),_o.toString()),we[pn--]+=_o}}else for(let gt=0;gt<F;gt++)we[gt]+=se[We];return we[we.length]=v.toString(),we})(v.innerHTML,{duration:O||v.getAttribute("data-duration"),delay:F||v.getAttribute("data-delay")});v._countUpOrigInnerHTML=v.innerHTML,v.innerHTML=se[0]||"&nbsp;",v.style.visibility="visible";const we=function(){v.innerHTML=se.shift()||"&nbsp;",se.length?(clearTimeout(v.countUpTimeout),v.countUpTimeout=setTimeout(we,F)):v._countUpOrigInnerHTML=void 0};v.countUpTimeout=setTimeout(we,F)})(this.ohaScoreTspan,{delay:25,time:F,callback:this.animationCallback()})):(this.isAssetReference||this.showLikes?this.reference.likes=l:this.reference.score=l,this.isLoading=!1),this.ohaText.classList.remove("oha-loading")},O)}}animationCallback(){this.isLoading=!1,setTimeout(()=>{this.ohaText.classList.remove("oha-liked")},1e3)}getStrokeDashoffset(l){return 102.1-+(102.1*l).toFixed(0)}getRotateDegrees(l){return 360*l}animateOhaPlanet(l){if(this.reference){this.ohaButton.querySelector(".oha-outer").style.strokeDashoffset=this.getStrokeDashoffset(l);var F=this.ohaButton.querySelector(".oha-rotate");F&&(F.style.rotateZ=this.getRotateDegrees(l)+"deg",F.style.rotate=this.getRotateDegrees(l)),setTimeout(()=>{this.reference.score=l})}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(ht))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-oha"]],viewQuery:function(O,F){if(1&O&&o.GBs(jt,5),2&O){let se;o.mGM(se=o.lsd())&&(F.element=se.first)}},inputs:{article:"article",snip:"snip",assetReference:"assetReference",size:"size",source:"source"},decls:15,vars:28,consts:[["ohaComponent",""],["appAuthorizedClick","",3,"click","authorizedClickSource","ngClass"],["viewBox","0 0 40 40"],["transform","translate(20,20) rotate(-90)"],["r","15.75","cx","0","cy","0",1,"oha-inner"],["r","16.25","cx","0","cy","0",1,"oha-outer",3,"ngStyle"],["class","oha-rotate",3,"ngStyle",4,"ngIf"],["transform","translate(20,20)",1,"oha-text",3,"ngClass"],["x","0","y","2",3,"innerHTML"],[1,"oha-score"],["x","0","y","8"],[1,"oha-score-tspan",3,"textContent"],["class","oha-pulse",4,"ngIf"],[1,"oha-rotate",3,"ngStyle"],["r","4","cx","15.5","cy","0",1,"oha-planet"],[1,"oha-pulse"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"button",1,0),o.bIt("click",function(We){return o.eBV(se),o.Njj(F.oha(We))}),o.qSk(),o.j41(2,"svg",2)(3,"g",3),o.nrm(4,"circle",4)(5,"circle",5),o.DNE(6,to,2,5,"g",6),o.k0s(),o.j41(7,"g",7)(8,"g"),o.nrm(9,"text",8),o.k0s(),o.j41(10,"g",9)(11,"text",10),o.nrm(12,"tspan",11),o.EFF(13),o.k0s()()()(),o.DNE(14,Yi,1,0,"div",12),o.k0s()}2&O&&(o.ee0("oha oha-",F.size," ",F.iLike()?"oha-selected":""," ",F.isAnimated?"oha-animated":""," ",F.isTransitioned?"oha-transitioned":"",""),o.Y8G("authorizedClickSource","Oha")("ngClass",o.ziG(18,yn,F.isSnip,F.isAssetReference,F.isDisabled,F.profileIsReadOnlyMode)),o.R7$(5),o.Y8G("ngStyle",o.l_i(23,Nn,F.getStrokeDashoffset(F.getReferenceScore()),F.isAssetReference||F.showLikes?"none":null)),o.R7$(),o.Y8G("ngIf",!F.isAssetReference&&!F.showLikes),o.R7$(),o.Y8G("ngClass",o.eq3(26,hi,!F.showScore)),o.R7$(),o.ZvI("oha-name ",F.ohaAdditionalClass,""),o.R7$(),o.Y8G("innerHTML",F.ohaName,o.npT),o.R7$(3),o.Y8G("textContent",F.getScore()),o.R7$(),o.SpI(" ",F.isAssetReference||F.isDisabled||F.showLikes?"":" %"," "),o.R7$(),o.Y8G("ngIf",F.isSnip&&F.getReferenceScore()<1))},dependencies:[a.YU,a.bT,a.B3,$o]})}}return v})();var so=M(6449);let To=(()=>{class v{constructor(l,O){this.sanitizer=l,this.authService=O}transform(l){return this.sanitizer.bypassSecurityTrustResourceUrl(`${this.authService.mediaApiBase.url}/api/Asset/${l}/Thumbnail000001.jpg`)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16),o.rXU(so.u,16))}}static{this.\u0275pipe=o.EJ8({name:"apicodoMediaServiceImage",type:v,pure:!0})}}return v})(),Ji=(()=>{class v{constructor(l){this.sanitizer=l}transform(l){return`https://youtu.be/${l}`}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16))}}static{this.\u0275pipe=o.EJ8({name:"youtubeWatch",type:v,pure:!0})}}return v})(),Wo=(()=>{class v{constructor(l){this.sanitizer=l}transform(l){const O=`https://img.youtube.com/vi/${l.split("||")[0]}/0.jpg`;return this.sanitizer.bypassSecurityTrustResourceUrl(O)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16))}}static{this.\u0275pipe=o.EJ8({name:"youtubeImage",type:v,pure:!0})}}return v})(),ln=(()=>{class v{transform(l){if(!l)return"";const O=l.split("||");return O.length>1?O[1]:`{{${l} | youtubeWatch}}`}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275pipe=o.EJ8({name:"youtubeTitle",type:v,pure:!0})}}return v})(),Bt=(()=>{class v{constructor(l){this.sanitizer=l}transform(l){const O=`//graph.facebook.com/${l.split("/")[2]}/picture`;return this.sanitizer.bypassSecurityTrustUrl(O)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16))}}static{this.\u0275pipe=o.EJ8({name:"facebookImage",type:v,pure:!0})}}return v})(),kt=(()=>{class v{constructor(l){this.sanitizer=l}transform(l){return this.sanitizer.bypassSecurityTrustResourceUrl(`//www.facebook.com/${l}/`)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16))}}static{this.\u0275pipe=o.EJ8({name:"facebookWatch",type:v,pure:!0})}}return v})(),Rn=(()=>{class v{constructor(l){this.sanitizer=l}transform(l){let O=l.split("|")[1];return O||(O="/Content/images/vimeo_logo.jpg"),this.sanitizer.bypassSecurityTrustUrl(O)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16))}}static{this.\u0275pipe=o.EJ8({name:"vimeoImage",type:v,pure:!0})}}return v})(),ti=(()=>{class v{constructor(l){this.sanitizer=l}transform(l){const F=`//vimeo.com/${l.split("|")[0]}`;return this.sanitizer.bypassSecurityTrustResourceUrl(F)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up,16))}}static{this.\u0275pipe=o.EJ8({name:"vimeoWatch",type:v,pure:!0})}}return v})(),Ri=(()=>{class v{constructor(l){this.scopeService=l,this.scope=l.getScope()}transform(l){const O=new Date(l),se=(new Date).getTime()-O.getTime(),we=Math.floor(se/6e4);if(we<2)return this.scope.currentScope.network.resources.web_common_relative_date_now;if(we<60)return this.replaceRessource(this.scope.currentScope.network.resources.web_common_relative_date_minutes_ago,we);const We=Math.floor(we/60);if(We<24)return 1===We?this.scope.currentScope.network.resources.web_common_relative_date_hour_ago:this.replaceRessource(this.scope.currentScope.network.resources.web_common_relative_date_hours_ago,We);const gt=Math.floor(We/24);if(1===gt)return this.scope.currentScope.network.resources.web_common_relative_date_day_ago;if(gt<=7)return this.replaceRessource(this.scope.currentScope.network.resources.web_common_relative_date_days_ago,gt);if(gt<=13)return this.scope.currentScope.network.resources.web_common_relative_date_week_ago;if(gt<=20)return this.scope.currentScope.network.resources.web_common_relative_date_two_weeks_ago;if(gt<=27)return this.scope.currentScope.network.resources.web_common_relative_date_three_weeks_ago;if(gt<=30)return this.scope.currentScope.network.resources.web_common_relative_date_month_ago;const Ft=Math.floor(gt/30);if(1===Ft)return this.scope.currentScope.network.resources.web_common_relative_date_month_ago;if(Ft<12)return this.replaceRessource(this.scope.currentScope.network.resources.web_common_relative_date_months_ago,Ft);const pn=Math.floor(gt/365);return pn>1?this.replaceRessource(this.scope.currentScope.network.resources.web_common_relative_date_years_ago,pn):this.scope.currentScope.network.resources.web_common_relative_date_year_ago}replaceRessource(l,O){return l.replace("{n}",O.toString())}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A,16))}}static{this.\u0275pipe=o.EJ8({name:"relativeDate",type:v,pure:!0})}}return v})();const Oi=(v,p)=>({"comment-unreleased":v,"comment-troll":p}),eo=()=>({width:150});function So(v,p){if(1&v&&o.nrm(0,"img",23),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function Oo(v,p){if(1&v&&(o.j41(0,"div",24),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf;o.R7$(),o.SpI(" ",l.initials," ")}}function Yo(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,So,1,1,"img",21)(2,Oo,2,1,"div",22),o.k0s()),2&v){const l=p.ngIf;o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}function zo(v,p){1&v&&o.nrm(0,"i",25)}function jr(v,p){if(1&v&&(o.nrm(0,"div",28),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG(3);o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.comment.assetImage.text)),o.npT)}}function qr(v,p){if(1&v){const l=o.RV6();o.j41(0,"div"),o.DNE(1,jr,3,5,"div",26),o.j41(2,"img",27),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.openImageViewer(F.comment.assetImage.assetImageUrl))}),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.Y8G("ngIf",l.comment.assetImage.text),o.R7$(),o.Y8G("src",l.comment.assetImage.assetImageUrl+"?preset=cover-4x3?cache="+l.comment.assetImage.cache,o.B4B)}}function bs(v,p){if(1&v&&(o.nrm(0,"div",28),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG(3);o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.comment.assetText.text)),o.npT)}}function Io(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,bs,3,5,"div",26),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("ngIf",l.comment.assetText.text)}}function Pt(v,p){if(1&v&&(o.j41(0,"div",32),o.EFF(1),o.nI1(2,"youtubeTitle"),o.k0s()),2&v){const l=o.XpG(3);o.R7$(),o.JRh(o.bMT(2,1,l.comment.assetText.text))}}function St(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,Pt,3,3,"div",29),o.j41(2,"a",30),o.nI1(3,"youtubeWatch"),o.nrm(4,"img",31),o.nI1(5,"youtubeImage"),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("ngIf",l.comment.assetText.text),o.R7$(),o.Y8G("href",o.bMT(3,3,l.comment.assetText.text),o.B4B),o.R7$(2),o.Y8G("lazy-img",o.bMT(5,5,l.comment.assetText.text))}}function Dn(v,p){if(1&v&&(o.j41(0,"div",32),o.EFF(1),o.k0s()),2&v){const l=o.XpG(3);o.R7$(),o.JRh(l.comment.assetText.text)}}function ai(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,Dn,2,1,"div",29),o.nrm(2,"img",33),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("ngIf",l.comment.assetText.text),o.R7$(),o.Y8G("src",l.comment.assetText.text,o.B4B)}}function ro(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"img",34),o.nI1(2,"apicodoMediaServiceImage"),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("src",o.bMT(2,1,l.comment.assetText.text),o.B4B)}}function jo(v,p){if(1&v&&(o.j41(0,"div")(1,"a",35),o.nI1(2,"vimeoWatch"),o.nrm(3,"img",31),o.nI1(4,"vimeoImage"),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",o.bMT(2,2,l.comment.assetText.text),o.B4B),o.R7$(2),o.Y8G("lazy-img",o.bMT(4,4,l.comment.assetText.text))}}function ia(v,p){if(1&v&&(o.j41(0,"div")(1,"a",30),o.nI1(2,"facebookWatch"),o.nrm(3,"img",31),o.nI1(4,"facebookImage"),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",o.bMT(2,2,l.comment.assetText.text),o.B4B),o.R7$(2),o.Y8G("lazy-img",o.bMT(4,4,l.comment.assetText.text))}}function Sh(v,p){if(1&v){const l=o.RV6();o.j41(0,"button",36),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.toggleRepliesCommentForm(F.comment.guid))}),o.EFF(1),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_comments_write_answer"))}}function ep(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-user-comment-form",37),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("parentGuid",l.comment.guid)("articleId",l.articleId)}}function Ls(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",38)(1,"button",39),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.toggleReplies(F.comment))}),o.nrm(2,"i",40),o.EFF(3),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.Y8G("authorizedClickSource","NewComment"),o.R7$(),o.Y8G("ngClass",l.showReplies?"icon-caret-up":"icon-caret-down"),o.R7$(),o.Lme(" (",(null==l.comment.childAssets?null:l.comment.childAssets.length)||0,") ",l.scope.currentScope.network.getResourceOrKeyName("web_comments_answers")," ")}}function Mu(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"app-comment",43),o.bIt("reportComment",function(F){o.eBV(l);const se=o.XpG(3);return o.Njj(se.reportComment.emit(F))}),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("comment",l)("articleId",l.articleId)}}function Mm(v,p){if(1&v&&(o.j41(0,"div",41),o.DNE(1,Mu,2,2,"div",42),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("ngForOf",l.comment.childAssets)}}function Lc(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"div",3)(2,"div",4),o.DNE(3,Yo,3,2,"div",1),o.nI1(4,"createAvatar"),o.k0s(),o.j41(5,"div",5)(6,"div",6)(7,"div",7),o.EFF(8),o.k0s(),o.DNE(9,zo,1,0,"i",8),o.nrm(10,"div",9),o.nI1(11,"relativeDate"),o.k0s(),o.DNE(12,qr,3,2,"div",1)(13,Io,2,1,"div",1)(14,St,6,7,"div",1)(15,ai,3,2,"div",1)(16,ro,3,3,"div",1)(17,jo,5,6,"div",1)(18,ia,5,6,"div",1),o.j41(19,"div",10)(20,"div",11)(21,"div",12),o.nrm(22,"app-oha",13),o.k0s(),o.j41(23,"div",14),o.DNE(24,Sh,2,1,"button",15),o.k0s(),o.j41(25,"div",16)(26,"div",17)(27,"dx-drop-down-button",18),o.bIt("onItemClick",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.commentMenuItemClick(F.itemData.iconType))}),o.k0s()()()(),o.DNE(28,ep,2,2,"div",1)(29,Ls,4,4,"div",19),o.k0s(),o.DNE(30,Mm,2,1,"div",20),o.k0s()(),o.bVm()}if(2&v){const l=o.XpG();o.R7$(3),o.Y8G("ngIf",o.bMT(4,21,l.comment.user)),o.R7$(5),o.Lme("",l.comment.user.firstName," ",l.comment.user.lastName,""),o.R7$(),o.Y8G("ngIf",l.scope.currentChapter.settings.configurations.enableVerifiedUsers&&((null==l.comment.assetImage?null:l.comment.assetImage.user.isVerifiedUser)||(null==l.comment.assetText?null:l.comment.assetText.user.isVerifiedUser))),o.R7$(),o.Y8G("innerHTML",o.bMT(11,23,l.comment.created),o.npT),o.R7$(2),o.Y8G("ngIf",l.comment.assetImage),o.R7$(),o.Y8G("ngIf",l.comment.assetText&&0===l.comment.assetText.type),o.R7$(),o.Y8G("ngIf",l.comment.assetText&&5===l.comment.assetText.type),o.R7$(),o.Y8G("ngIf",l.comment.assetText&&10===l.comment.assetText.type),o.R7$(),o.Y8G("ngIf",l.comment.assetText&&13===l.comment.assetText.type),o.R7$(),o.Y8G("ngIf",l.comment.assetText&&7===l.comment.assetText.type),o.R7$(),o.Y8G("ngIf",l.comment.assetText&&6===l.comment.assetText.type),o.R7$(4),o.Y8G("assetReference",l.comment)("size","sm"),o.R7$(2),o.Y8G("ngIf",!l.comment.parentGuid),o.R7$(3),o.Y8G("dropDownOptions",o.lJ4(25,eo))("items",l.commentMenu)("showArrowIcon",!1),o.R7$(),o.Y8G("ngIf",l.showCommentForm[l.comment.guid]),o.R7$(),o.Y8G("ngIf",!l.comment.parentGuid&&(null==l.comment.childAssets?null:l.comment.childAssets.length)>0),o.R7$(),o.Y8G("ngIf",l.showReplies)}}function tp(v,p){if(1&v){const l=o.RV6();o.j41(0,"app-image-viewer",44),o.bIt("close",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.closeImageViewer())}),o.k0s()}if(2&v){const l=o.XpG();o.Y8G("imageUrl",l.currentImageUrl)}}let Rm=(()=>{class v{constructor(l,O){this.commentService=l,this.scopeService=O,this.reportComment=new o.bkB,this.showCommentForm={},this.showReplies=!1,this.parentGuid=null,this.imageViewerOpen=!1,this.isTroll=!1,this.isMerkuristJournalist=!1,this.inactive=!1,this.canDelete=!1,this.commentMenu=[],this.scope=this.scopeService.getScope(),this.profile=this.scope.profile}ngOnInit(){this.comment.assetText&&(this.commentType=Ci.SingleCommend),this.comment.assetImage&&(this.commentType=Ci.Image,this.currentImageUrl=this.comment.assetImage.assetImageUrl),null!==this.comment.parentGuid&&(this.parentGuid=this.comment.parentGuid),this.isTroll=!!this.comment.user.troll,this.isMerkuristJournalist=this.profile.chapterRoles?.includes(gn.MerkuristJournalist),this.inactive=this.isTroll&&!this.isMerkuristJournalist,this.canDelete=this.profile.guid==this.comment.user.guid||this.isMerkuristJournalist,this.commentMenu.push({icon:"fa-regular fa-flag",text:this.scope.currentScope.network.resources.web_chat_message_report,iconType:qd.Report}),this.canDelete&&this.commentMenu.push({icon:"fa-regular fa-trash-can",text:this.scope.currentScope.network.resources.web_common_delete,iconType:qd.Delete})}toggleRepliesCommentForm(l){void 0!==l&&(this.showCommentForm[l]=!this.showCommentForm[l])}deleteComment(){void 0!==this.comment.guid&&null==this.parentGuid&&this.commentService.deleteComment(this.comment.guid)}toggleReplies(l){this.showReplies=!this.showReplies}likeComment(l){void 0!==l&&this.commentService.likeComment(l)}commentMenuItemClick(l){switch(l){case qd.Report:this.reportComment.emit(this.comment);break;case qd.Delete:this.deleteComment()}}openImageViewer(l){this.currentImageUrl=l,this.imageViewerOpen=!0}closeImageViewer(){this.imageViewerOpen=!1}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(bt),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-comment"]],inputs:{comment:"comment",articleId:"articleId"},outputs:{reportComment:"reportComment"},decls:3,vars:6,consts:[[1,"comment",3,"ngClass"],[4,"ngIf"],[3,"imageUrl","close",4,"ngIf"],[1,"row","user-comments-row-wrapper"],[1,"col-sm-1","d-flex","flex-column","align-items-center"],[1,"col-sm-11"],[1,"comment-header"],[1,"comment-author"],["class","fas fa-check-square verified-icon",4,"ngIf"],[1,"comment-timestamp",3,"innerHTML"],[1,"comment-actions"],[1,"row","mb-3"],[1,"col-2","col-md-2","col-lg-2"],[3,"assetReference","size"],[1,"col-8","col-md-8","col-lg-8","comment-write-answer"],[3,"click",4,"ngIf"],[1,"col-2","col-md-2","col-lg-2","d-flex","align-items-center","justify-content-end"],[1,"float-end"],["text","","icon","overflow","stylingMode","text","type","normal",3,"onItemClick","dropDownOptions","items","showArrowIcon"],["class","comment-show-answers",4,"ngIf"],["class","replies",4,"ngIf"],["alt","User Avatar","class","avatar",3,"src",4,"ngIf"],["class","avatar-initials",4,"ngIf"],["alt","User Avatar",1,"avatar",3,"src"],[1,"avatar-initials"],[1,"fas","fa-check-square","verified-icon"],["class","comment-content",3,"innerHTML",4,"ngIf"],["alt","CommentImage",1,"comment-image","img-fluid",3,"click","src"],[1,"comment-content",3,"innerHTML"],["class","comment-content",4,"ngIf"],["target","_blank",3,"href"],[1,"img-fluid",3,"lazy-img"],[1,"comment-content"],["alt","CommentGif",1,"",3,"src"],[3,"src"],["target","_blank",1,"media-gallery-item-video",3,"href"],[3,"click"],[3,"parentGuid","articleId"],[1,"comment-show-answers"],["appAuthorizedClick","",3,"click","authorizedClickSource"],[3,"ngClass"],[1,"replies"],[4,"ngFor","ngForOf"],[3,"reportComment","comment","articleId"],[3,"close","imageUrl"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Lc,31,26,"ng-container",1),o.k0s(),o.DNE(2,tp,1,1,"app-image-viewer",2)),2&O&&(o.Y8G("ngClass",o.l_i(3,Oi,F.comment.assetImage&&!F.comment.assetImage.released||F.comment.assetText&&!F.comment.assetText.released,F.isTroll&&F.profile.isMerkuristJournalist)),o.R7$(),o.Y8G("ngIf",F.comment),o.R7$(),o.Y8G("ngIf",F.imageViewerOpen))},dependencies:[a.YU,a.Sq,a.bT,Kt.h,$o,yi,v,Dr.L,us,uo,a.Jj,vr,To,Ji,Wo,ln,Bt,kt,Rn,ti,Ri,Ma],styles:[".comment[_ngcontent-%COMP%]{margin-left:5px;margin-top:2rem}.comment[_ngcontent-%COMP%]   .comment-image[_ngcontent-%COMP%]{max-width:70%}.comment[_ngcontent-%COMP%]   .comment-header[_ngcontent-%COMP%]{display:flex;align-items:baseline;margin-bottom:5px}.comment[_ngcontent-%COMP%]   .comment-author[_ngcontent-%COMP%]{font-weight:700;font-size:1.4rem}.comment[_ngcontent-%COMP%]   .comment-timestamp[_ngcontent-%COMP%]{font-size:1.3rem;color:#666;white-space:nowrap;margin-left:.8rem}.comment[_ngcontent-%COMP%]   .comment-content[_ngcontent-%COMP%]{margin-bottom:.8rem;flex:1;font-size:1.5rem;font-family:var(--fontPrimary);color:var(--textColor)}.comment[_ngcontent-%COMP%]   .comment-actions[_ngcontent-%COMP%]{margin-top:1rem}.comment[_ngcontent-%COMP%]   .comment-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background:none;border:none;color:var(--textColor);font-weight:700;cursor:pointer;padding:0;margin-right:1rem}.comment[_ngcontent-%COMP%]   .comment-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{text-decoration:underline}.comment[_ngcontent-%COMP%]   .replies[_ngcontent-%COMP%]{margin-top:.8rem}.comment[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:block}.comment[_ngcontent-%COMP%]   .avatar-initials[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;background-color:#ccc;color:var(--textColor);font-size:1.5rem}.comment[_ngcontent-%COMP%]   .comment-like-button[_ngcontent-%COMP%]{background:none;border:none;color:#007bff;cursor:pointer;padding:0;margin-top:.3rem}.comment[_ngcontent-%COMP%]   .comment-oha[_ngcontent-%COMP%]{width:2rem;height:2rem}.comment[_ngcontent-%COMP%]   .verified-icon[_ngcontent-%COMP%]{transform:translateY(-50%);margin-left:.3rem}.comment[_ngcontent-%COMP%]   .comment-show-answers[_ngcontent-%COMP%]{margin-top:.5rem;margin-left:2rem}.comment[_ngcontent-%COMP%]   .comment-write-answer[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.comment-unreleased[_ngcontent-%COMP%]{opacity:.25}.comment-troll[_ngcontent-%COMP%]{color:red}.comment-troll[_ngcontent-%COMP%]   .comment-content[_ngcontent-%COMP%], .comment-troll[_ngcontent-%COMP%]   .comment-image[_ngcontent-%COMP%]{opacity:.25}@media (max-width: 768px){.user-comments-row-wrapper[_ngcontent-%COMP%]{padding-left:.9rem;padding-right:.5rem}.comment[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.comment[_ngcontent-%COMP%]   .col-sm-1[_ngcontent-%COMP%]{max-width:50px;flex:0 0 50px}.comment[_ngcontent-%COMP%]   .col-sm-11[_ngcontent-%COMP%]{flex:1}.comment[_ngcontent-%COMP%]   .comment-image[_ngcontent-%COMP%]{max-width:80%}.comment-content[_ngcontent-%COMP%]{margin-bottom:10px;flex:1}.comment-actions[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start}.comment-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-right:1rem}.avatar[_ngcontent-%COMP%]{width:2.5rem;height:2.5rem;border-radius:50%;display:block}}"]})}}return v})();var qd=function(v){return v[v.Report=0]="Report",v[v.Edit=1]="Edit",v[v.Delete=2]="Delete",v}(qd||{});const Ig=v=>({show:v}),kp=v=>({display:v});function yt(v,p){if(1&v&&(o.j41(0,"div",20),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report_error")," ")}}function Un(v,p){1&v&&o.nrm(0,"i",21)}let Jt=(()=>{class v{constructor(l,O){this.scopeService=l,this.assetService=O,this.close=new o.bkB,this.working=!1,this.error=!1,this.isModalOpen=!0,this.reportType=-1,this.scope=this.scopeService.getScope()}ngOnInit(){}reportAsset(){this.assetService.report(this.comment,this.reportType.toString()).subscribe({next:l=>{this.working=!1,this.closeDialog()},error:l=>{this.working=!1,this.error=!0,console.error("Error reporting asset",l)}})}open(){this.resetModal(),this.isModalOpen=!0}closeDialog(){this.resetModal(),this.close.emit()}resetModal(){this.working=!1,this.error=!1,this.reportType=-1}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Ki))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-report-dialog"]],inputs:{comment:"comment"},outputs:{close:"close"},decls:36,vars:24,consts:[[1,"modal",3,"ngClass","ngStyle"],[1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["type","button","aria-label","Close",1,"close",3,"click"],[1,"modal-title"],[1,"modal-body"],["type","radio","id","reason1","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason1"],["type","radio","id","reason2","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason2"],["type","radio","id","reason3","name","reason","required","",3,"ngModelChange","ngModel","value"],["for","reason3"],[1,"info-text"],["class","alert alert-danger",4,"ngIf"],[1,"action-container"],["type","button",1,"btn","btn-green","action-button",3,"click","disabled"],["class","fa fa-spinner fa-pulse",4,"ngIf"],["type","button",1,"btn","btn-black","action-button",3,"click"],[1,"modal-footer"],[1,"alert","alert-danger"],[1,"fa","fa-spinner","fa-pulse"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"button",4),o.bIt("click",function(){return F.closeDialog()}),o.k0s(),o.j41(5,"h4",5),o.EFF(6),o.k0s()(),o.j41(7,"div",6)(8,"p"),o.EFF(9),o.k0s(),o.j41(10,"p"),o.EFF(11),o.k0s(),o.j41(12,"div")(13,"input",7),o.mxI("ngModelChange",function(we){return o.DH7(F.reportType,we)||(F.reportType=we),we}),o.k0s(),o.j41(14,"label",8),o.EFF(15),o.k0s(),o.nrm(16,"br"),o.j41(17,"input",9),o.mxI("ngModelChange",function(we){return o.DH7(F.reportType,we)||(F.reportType=we),we}),o.k0s(),o.j41(18,"label",10),o.EFF(19),o.k0s(),o.nrm(20,"br"),o.j41(21,"input",11),o.mxI("ngModelChange",function(we){return o.DH7(F.reportType,we)||(F.reportType=we),we}),o.k0s(),o.j41(22,"label",12),o.EFF(23),o.k0s(),o.nrm(24,"br"),o.k0s(),o.j41(25,"p",13),o.EFF(26),o.k0s(),o.DNE(27,yt,2,1,"div",14),o.nrm(28,"br"),o.j41(29,"div",15)(30,"button",16),o.bIt("click",function(){return F.reportAsset()}),o.DNE(31,Un,1,0,"i",17),o.EFF(32),o.k0s(),o.j41(33,"button",18),o.bIt("click",function(){return F.closeDialog()}),o.EFF(34),o.k0s()()(),o.nrm(35,"div",19),o.k0s()()()),2&O&&(o.Y8G("ngClass",o.eq3(20,Ig,F.isModalOpen))("ngStyle",o.eq3(22,kp,F.isModalOpen?"block":"none")),o.R7$(6),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report_title")),o.R7$(3),o.JRh(F.scope.currentScope.network.resources.web_assetDialog_report_intro_0),o.R7$(2),o.JRh(F.scope.currentScope.network.resources.web_assetDialog_report_intro_1),o.R7$(2),o.R50("ngModel",F.reportType),o.Y8G("value",0),o.R7$(2),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report_copyright")),o.R7$(2),o.R50("ngModel",F.reportType),o.Y8G("value",1),o.R7$(2),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report_spam")),o.R7$(2),o.R50("ngModel",F.reportType),o.Y8G("value",2),o.R7$(2),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report_inappropriate")),o.R7$(3),o.SpI(" ",F.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report_footer")," "),o.R7$(),o.Y8G("ngIf",F.error),o.R7$(3),o.Y8G("disabled",F.working||-1==F.reportType),o.R7$(),o.Y8G("ngIf",F.working),o.R7$(),o.SpI(" ",F.scope.currentScope.network.getResourceOrKeyName("web_assetDialog_report")," "),o.R7$(2),o.SpI(" ",F.scope.currentScope.network.getResourceOrKeyName("web_common_cancel")," "))},dependencies:[a.YU,a.bT,a.B3,et.me,et.Fm,et.BC,et.YS,et.vS]})}}return v})();function An(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"app-comment",4),o.bIt("reportComment",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.openReportDialog(F))}),o.k0s()()}if(2&v){const l=p.$implicit,O=o.XpG();o.R7$(),o.Y8G("comment",l)("articleId",O.data.id.toString())}}function ki(v,p){if(1&v){const l=o.RV6();o.j41(0,"button",5),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.loadMoreComments())}),o.EFF(1),o.k0s()}if(2&v){const l=o.XpG();o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_comments_load_more_comments"))}}function Ao(v,p){if(1&v){const l=o.RV6();o.j41(0,"app-report-dialog",6),o.bIt("close",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.closeReportDialog())}),o.k0s()}if(2&v){const l=o.XpG();o.Y8G("comment",l.selectedCommentForReport)}}let ar=(()=>{class v{constructor(l,O){this.commentService=l,this.scopeService=O,this.displayCount=5,this.expandedCommentCount=0,this.subscriptions=[],this.selectedCommentForReport=null,this.showReportDialog=!1,this.scope=this.scopeService.getScope()}ngOnInit(){this.loadComments()}loadComments(){this.subscriptions.push(this.commentService.comments$.subscribe(l=>{this.comments=l,this.displayedComments=this.comments.slice(0,this.displayCount+this.expandedCommentCount)})),this.commentService.getComments(this.data)}ngOnDestroy(){this.subscriptions.forEach(l=>l.unsubscribe())}loadMoreComments(){const l=this.comments.slice(this.displayedComments.length,this.displayedComments.length+this.displayCount);this.displayedComments.push(...l),this.expandedCommentCount+=l.length}openReportDialog(l){this.selectedCommentForReport=l,this.showReportDialog=!0}closeReportDialog(){this.selectedCommentForReport=null,this.showReportDialog=!1}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(bt),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-comments-list"]],inputs:{data:"data"},decls:5,vars:3,consts:[["templateContainer",""],[4,"ngFor","ngForOf"],["class","btn btn-gray show-more-comments-button",3,"click",4,"ngIf"],[3,"comment","close",4,"ngIf"],[3,"reportComment","comment","articleId"],[1,"btn","btn-gray","show-more-comments-button",3,"click"],[3,"close","comment"]],template:function(O,F){1&O&&(o.j41(0,"div",null,0),o.DNE(2,An,2,2,"div",1)(3,ki,2,1,"button",2)(4,Ao,1,1,"app-report-dialog",3),o.k0s()),2&O&&(o.R7$(2),o.Y8G("ngForOf",F.displayedComments),o.R7$(),o.Y8G("ngIf",F.displayedComments.length<F.comments.length),o.R7$(),o.Y8G("ngIf",F.showReportDialog))},dependencies:[a.Sq,a.bT,Rm,Jt],styles:[".show-more-comments-button[_ngcontent-%COMP%]{align-content:center;display:block;margin:auto auto 60px;padding-top:30px;clear:both;color:var(--textColor);font-weight:600;font-size:1.8rem}"]})}}return v})(),Nr=(()=>{class v{constructor(){this.assetReferences=new jn.t([]),this.assetReferences$=this.assetReferences.asObservable()}getMediaGalleryItems(l){const O=l.filter(F=>null===F.assetArticle&&(null===F.assetText||0!==F.assetText.type&&8!==F.assetText.type&&9!==F.assetText.type&&11!==F.assetText.type&&14!==F.assetText.type&&15!==F.assetText.type));this.assetReferences.next(O)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var Fa=function(v){return v[v.Text=0]="Text",v[v.Image=2]="Image",v[v.Twitter=4]="Twitter",v[v.YouTube=5]="YouTube",v[v.Facebook=6]="Facebook",v[v.Vimeo=7]="Vimeo",v[v.Fact=8]="Fact",v[v.Question=9]="Question",v[v.Gif=10]="Gif",v[v.Article=11]="Article",v[v.File=12]="File",v[v.ApicodoMediaServices=13]="ApicodoMediaServices",v[v.Workflow=14]="Workflow",v[v.StaticArticle=15]="StaticArticle",v}(Fa||{}),Vs=M(275),Rs=M(5626);function mr(v,p){if(1&v&&o.nrm(0,"img",10),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function Ja(v,p){if(1&v&&(o.j41(0,"div",11),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf;o.R7$(),o.SpI(" ",l.initials," ")}}function oa(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,mr,1,1,"img",8)(2,Ja,2,1,"div",9),o.k0s()),2&v){const l=p.ngIf;o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}function dl(v,p){if(1&v&&(o.j41(0,"span",6),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_userBadge_origin_1")," ")}}function eu(v,p){1&v&&o.nrm(0,"i",12)}let Bc=(()=>{class v{constructor(l,O,F){this.scopeService=l,this.hybridRouteTrackingService=O,this.profileService=F,this.avatarImageUrl="",this.useInitials=!1,this.currentUser=null,this.closeDrawerEvent=new o.bkB,this.scope=l.getScope(),this.currentUser=this.scope.profile,this.profilServiceSubscription=this.profileService.profileChanged$.subscribe(se=>{this.currentUser=se})}ngOnInit(){this.showVerifiedUser=this.user?.isVerifiedUser}openProfile(l){l.preventDefault(),this.user?.guid==this.currentUser?.guid?this.hybridRouteTrackingService.switchState("app.my-profile",null):this.hybridRouteTrackingService.switchState("app.public-profile",{id:this.user?.guid}),this.closeDrawerEvent.emit()}openPrivateProfile(l){l.preventDefault()}getUserInitials(){return`${this.user?.firstName[0]||""}${this.user?.lastName[0]||""}`.toUpperCase()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Rs.o),o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-badge-simple"]],inputs:{data:"data",user:"user",author:"author"},outputs:{closeDrawerEvent:"closeDrawerEvent"},decls:10,vars:9,consts:[["appAuthorizedClick","",1,"align-items-center","avatar-container"],[1,"text-decoration-none","custom-link",3,"click","href"],[1,"d-flex","align-items-center"],[4,"ngIf"],[1,""],["class","avatar-text",4,"ngIf"],[1,"avatar-text"],["class","fas fa-check-square verified-icon",4,"ngIf"],["alt","User Avatar","class","avatar-img me-2",3,"src",4,"ngIf"],["class","avatar-initials me-2",4,"ngIf"],["alt","User Avatar",1,"avatar-img","me-2",3,"src"],[1,"avatar-initials","me-2"],[1,"fas","fa-check-square","verified-icon"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"a",1),o.bIt("click",function(we){return F.openProfile(we)}),o.j41(2,"div",2),o.DNE(3,oa,3,2,"div",3),o.nI1(4,"createAvatar"),o.j41(5,"div",4),o.DNE(6,dl,2,1,"span",5),o.j41(7,"span",6),o.EFF(8),o.k0s(),o.DNE(9,eu,1,0,"i",7),o.k0s()()()()),2&O&&(o.R7$(),o.Mz_("href","/profile/",F.user.guid,"",o.B4B),o.R7$(2),o.Y8G("ngIf",o.bMT(4,7,F.user)),o.R7$(3),o.Y8G("ngIf",F.author),o.R7$(2),o.Lme("",F.user.firstName," ",F.user.lastName,""),o.R7$(),o.Y8G("ngIf",F.scope.currentChapter.settings.configurations.enableVerifiedUsers&&F.showVerifiedUser))},dependencies:[a.bT,Ma],styles:[".avatar-container{align-items:center;flex-wrap:nowrap}.avatar-container .avatar-img,.avatar-container .avatar-initials{width:3rem;height:3rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700}.avatar-container .avatar-img{background-size:cover;background-position:center}.avatar-container .avatar-initials{background-color:#ccc;color:var(--textColor);font-size:1.2rem}.avatar-container .verified-icon{transform:translateY(-25%);margin-left:.5rem;font-size:.8rem}.avatar-container .custom-link{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.avatar-container .align-text-middle{transform:translateY(20%)}\n"],encapsulation:2})}}return v})();function tu(v,p){if(1&v&&(o.j41(0,"div",4)(1,"span"),o.EFF(2),o.nI1(3,"youtubeTitle"),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(2),o.JRh(o.bMT(3,1,l.assetReference.text))}}function id(v,p){if(1&v&&(o.j41(0,"span"),o.EFF(1),o.nI1(2,"youtubeWatch"),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",l.assetReference.text?o.bMT(2,1,l.assetReference.text):""," ")}}function od(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,tu,4,3,"div",9)(2,id,3,3,"ng-template",null,0,o.C5r),o.k0s()),2&v){const l=o.sdS(3),O=o.XpG();o.R7$(),o.Y8G("ngIf",O.assetReference.text&&O.assetReference.text.includes("||"))("ngIfElse",l)}}function Sd(v,p){if(1&v&&(o.j41(0,"div",4),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.SpI(" ",l.assetReference.text," ")}}let Nc=(()=>{class v{ngOnInit(){}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-media-gallery-item-detail"]],inputs:{assetReference:"assetReference"},decls:9,vars:3,consts:[["noTitle",""],[1,"simple-user-badge"],[3,"user"],[1,"media-gallery-item-details-container"],[1,"media-gallery-item-details-description"],[4,"ngIf"],["class","media-gallery-item-details-description",4,"ngIf"],[1,"text-center","media-gallery-item-details-show-more"],[1,"btn","btn-link","p-0","fw-bold","text-decoration-none","text-uppercase"],["class","media-gallery-item-details-description",4,"ngIf","ngIfElse"]],template:function(O,F){1&O&&(o.j41(0,"div",1),o.nrm(1,"app-user-badge-simple",2),o.j41(2,"div",3)(3,"div",4),o.DNE(4,od,4,2,"div",5),o.k0s(),o.DNE(5,Sd,2,1,"div",6),o.j41(6,"div",7)(7,"button",8),o.EFF(8," Mehr Lesen "),o.k0s()()()()),2&O&&(o.R7$(),o.Y8G("user",F.assetReference.user),o.R7$(3),o.Y8G("ngIf",5===F.assetReference.type),o.R7$(),o.Y8G("ngIf",5!==F.assetReference.type))},dependencies:[a.bT,Bc,Ji,ln],styles:[".simple-user-badge[_ngcontent-%COMP%]{margin-left:1rem;margin-top:.8rem}.simple-user-badge[_ngcontent-%COMP%]   .media-gallery-item-details-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:6rem}.simple-user-badge[_ngcontent-%COMP%]   .media-gallery-item-details-container[_ngcontent-%COMP%]   .media-gallery-item-details-description[_ngcontent-%COMP%]{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.simple-user-badge[_ngcontent-%COMP%]   .media-gallery-item-details-container[_ngcontent-%COMP%]   .media-gallery-item-details-show-more[_ngcontent-%COMP%]{margin-top:auto;padding-top:.5rem}"]})}}return v})(),np=(()=>{class v{constructor(l,O,F){this.sanitizer=l,this.apicodoMediaService=O,this.authService=F,this.isVerticalVideo=!0}ngOnInit(){this.videoId=this.assetReference.text,this.loadVideo()}loadVideo(){this.videoId?this.apicodoMediaService.getConnectionData(this.originNetworkSlug).then(l=>{this.videoUrl=this.getVideoUrl(this.videoId,l.token),this.apicodoMediaService.getVideoData(this.videoId,this.originNetworkSlug).then(O=>{try{const F=O.metaData.assetMetadata.assetFile[0].videoTracks[0],se=F.height,we=F.width,We=F.metadata.some(gt=>"rotate"===gt.key);this.isVerticalVideo=We||se>we,console.log(`${se}x${we}`,We?"rotation":"no rotation")}catch{console.error("ERROR META ROTATION",O)}}).catch(O=>{console.error("Error loading video data:",O)})}).catch(l=>{console.error("Error loading video connection data:",l)}):console.error("No video id found")}getVideoUrl(l,O){return this.sanitizer.bypassSecurityTrustResourceUrl(`${this.authService.mediaApiBase.url}/play/${l}?guiMode=iframe&token=${O}&platform=external`)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(W.up),o.rXU(Vs.P),o.rXU(so.u))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["apicodo-media-play"]],inputs:{videoId:"videoId",originNetworkSlug:"originNetworkSlug",assetReference:"assetReference"},decls:12,vars:2,consts:[["id","mediaModal","tabindex","-1","aria-labelledby","apicodoMediaPlayModalLabel","aria-hidden","true",1,"modal","fade","apicodo-media-play-modal"],[1,"modal-dialog","modal-dialog-centered","modal-fullscreen","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","apicodoMediaPlayModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close"],[1,"modal-body"],[1,"modal-conatainer"],["frameborder","0","allowfullscreen","",1,"apicodo-media-play-iframe",3,"src"],[1,"apicodo-media-play-detail"],[3,"assetReference"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h5",4),o.EFF(5,"Media Player"),o.k0s(),o.nrm(6,"button",5),o.k0s(),o.j41(7,"div",6)(8,"div",7),o.nrm(9,"iframe",8),o.j41(10,"div",9),o.nrm(11,"app-media-gallery-item-detail",10),o.k0s()()()()()()),2&O&&(o.R7$(9),o.Y8G("src",F.videoUrl,o.f$h),o.R7$(2),o.Y8G("assetReference",F.assetReference))},dependencies:[Nc],styles:[".apicodo-media-play-modal[_ngcontent-%COMP%]   .modal-content[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;overflow:hidden;width:100%;max-width:100%}.apicodo-media-play-modal[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]{padding:0;background-color:#fff;display:flex;justify-content:center;align-items:center;width:100%;height:80%}.apicodo-media-play-iframe[_ngcontent-%COMP%]{width:60vw;height:60vh;border:none}.modal-dialog-centered[_ngcontent-%COMP%]{display:flex;align-items:center}.modal-lg[_ngcontent-%COMP%]{max-width:98%;max-height:88%}.modal-conatainer[_ngcontent-%COMP%]{display:block;justify-content:center}.apicodo-media-play-detail[_ngcontent-%COMP%]{display:flex;justify-content:center}"]})}}return v})();const Eh=["mediaModal"],Kl=(v,p,l)=>({"media-item-active":v,"media-item-unreleased":p,"media-item-troll":l});function rc(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",4)(2,"div",5)(3,"a",6),o.nrm(4,"i",7),o.k0s()()(),o.j41(5,"div",8),o.nrm(6,"app-media-gallery-item-detail",9),o.k0s(),o.bVm()),2&v){const l=o.XpG();o.R7$(3),o.Y8G("href",l.scope.currentChapter.path+"/file/"+l.mediaGalleryItem.assetFile.guid,o.B4B),o.R7$(3),o.Y8G("assetReference",l.mediaGalleryItem.assetFile)}}function Lp(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",10),o.nrm(2,"img",11),o.k0s(),o.j41(3,"div",8),o.nrm(4,"app-media-gallery-item-detail",9),o.k0s(),o.bVm()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("lazy-img",l.mediaGalleryItem.assetImage.assetImageUrl+"?preset=asset-image-large&cache="+l.mediaGalleryItem.assetImage.cache),o.R7$(2),o.Y8G("assetReference",l.mediaGalleryItem.assetImage)}}function rd(v,p){1&v&&o.eu8(0)}function Pg(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",10)(2,"a",6),o.nI1(3,"youtubeWatch"),o.nrm(4,"img",14),o.nI1(5,"youtubeImage"),o.j41(6,"div",15),o.nrm(7,"i",16),o.k0s()()(),o.j41(8,"div",8),o.nrm(9,"app-media-gallery-item-detail",9),o.k0s(),o.bVm()),2&v){const l=o.XpG().ngIf,O=o.XpG();o.R7$(2),o.Y8G("href",o.bMT(3,3,l.text),o.B4B),o.R7$(2),o.Y8G("lazy-img",o.bMT(5,5,l.text)),o.R7$(5),o.Y8G("assetReference",null==O.mediaGalleryItem?null:O.mediaGalleryItem.assetText)}}function Mg(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",10)(2,"a",6),o.nI1(3,"facebookWatch"),o.nrm(4,"img",14),o.nI1(5,"facebookImage"),o.j41(6,"div",15),o.nrm(7,"i",16),o.k0s()()(),o.j41(8,"div",8),o.nrm(9,"app-media-gallery-item-detail",9),o.k0s(),o.bVm()),2&v){const l=o.XpG().ngIf,O=o.XpG();o.R7$(2),o.Y8G("href",o.bMT(3,3,l.text),o.B4B),o.R7$(2),o.Y8G("lazy-img",o.bMT(5,5,l.text)),o.R7$(5),o.Y8G("assetReference",null==O.mediaGalleryItem?null:O.mediaGalleryItem.assetText)}}function Rg(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",10)(2,"a",17),o.nI1(3,"vimeoWatch"),o.nrm(4,"img",14),o.nI1(5,"vimeoImage"),o.j41(6,"div",15),o.nrm(7,"i",16),o.k0s()()(),o.j41(8,"div",8),o.nrm(9,"app-media-gallery-item-detail",9),o.k0s(),o.bVm()),2&v){const l=o.XpG().ngIf,O=o.XpG();o.R7$(2),o.Y8G("href",o.bMT(3,3,l.text),o.B4B),o.R7$(2),o.Y8G("lazy-img",o.bMT(5,5,l.text)),o.R7$(5),o.Y8G("assetReference",null==O.mediaGalleryItem?null:O.mediaGalleryItem.assetText)}}function Z_(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",10),o.nrm(2,"img",18),o.k0s(),o.j41(3,"div",8),o.nrm(4,"app-media-gallery-item-detail",9),o.k0s(),o.bVm()),2&v){const l=o.XpG().ngIf,O=o.XpG();o.R7$(2),o.Y8G("src",l.text,o.B4B),o.R7$(2),o.Y8G("assetReference",null==O.mediaGalleryItem?null:O.mediaGalleryItem.assetText)}}function Bp(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"div",19),o.bIt("click",function(){o.eBV(l);const F=o.XpG().ngIf,se=o.XpG();return o.Njj(se.openApicodoVideo(F.text))}),o.nrm(2,"img",20),o.nI1(3,"apicodoMediaServiceImage"),o.j41(4,"div",15),o.nrm(5,"i",16),o.k0s()(),o.j41(6,"div",8),o.nrm(7,"app-media-gallery-item-detail",9),o.k0s(),o.nrm(8,"apicodo-media-play",9,0),o.bVm()}if(2&v){const l=o.XpG().ngIf,O=o.XpG();o.R7$(2),o.Y8G("src",o.bMT(3,3,l.text),o.B4B),o.R7$(5),o.Y8G("assetReference",null==O.mediaGalleryItem?null:O.mediaGalleryItem.assetText),o.R7$(),o.Y8G("assetReference",null==O.mediaGalleryItem?null:O.mediaGalleryItem.assetText)}}function Nf(v,p){if(1&v&&(o.qex(0,12),o.DNE(1,rd,1,0,"ng-container",2)(2,Pg,10,7,"ng-container",13)(3,Mg,10,7,"ng-container",13)(4,Rg,10,7,"ng-container",13)(5,Z_,5,2,"ng-container",13)(6,Bp,10,5,"ng-container",13),o.bVm()),2&v){const l=p.ngIf,O=o.XpG();o.Y8G("ngSwitch",l.type),o.R7$(),o.Y8G("ngIf",O.showCookieInfo(O.mediaGalleryItem)),o.R7$(),o.Y8G("ngSwitchCase",5),o.R7$(),o.Y8G("ngSwitchCase",6),o.R7$(),o.Y8G("ngSwitchCase",7),o.R7$(),o.Y8G("ngSwitchCase",10),o.R7$(),o.Y8G("ngSwitchCase",13)}}let pc=(()=>{class v{constructor(){this.cookieManager=0,this.isBuiltInCookieManager=!1,this.isTroll=!1,this.isMerkuristJournalist=!1}ngOnInit(){this.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&(this.cookieManager=this.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager),this.profile=this.scope.profile,this.isBuiltInCookieManager=1===this.cookieManager,this.isTroll=this.mediaGalleryItem.user.troll,this.isMerkuristJournalist=this.profile.chapterRoles.includes(gn.MerkuristJournalist)}openApicodoVideo(l){this.mediaModal?(this.mediaModal.originNetworkSlug=this.originNetworkSlug??"",this.mediaModal.loadVideo(),new bootstrap.Modal(document.getElementById("mediaModal")).show()):console.error("Modal is not defined!")}showCookieInfo(l){if(this.isBuiltInCookieManager)return!1;const{twitter:O,youTube:F,facebook:se,vimeo:we,giphy:We}=this.scope?.profile?.settings?.externalMediaPermissions;switch(l.assetText.type){case Fa.Twitter:return!O?.granted;case Fa.YouTube:return!F?.granted;case Fa.Facebook:return!se?.granted;case Fa.Vimeo:return!we?.granted;case Fa.Gif:return!We?.granted;default:return!1}}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-media-gallery-item"]],viewQuery:function(O,F){if(1&O&&o.GBs(Eh,5),2&O){let se;o.mGM(se=o.lsd())&&(F.mediaModal=se.first)}},inputs:{mediaGalleryItem:"mediaGalleryItem",scope:"scope",originNetworkSlug:"originNetworkSlug"},decls:4,vars:8,consts:[["mediaModal",""],[1,"media-gallery-item",3,"ngClass"],[4,"ngIf"],[3,"ngSwitch",4,"ngIf"],[1,"media-gallery-file-container"],[1,"file"],["target","_blank",3,"href"],[1,"fa-regular","fa-file-lines","media-gallery-file-icon"],[1,"media-item-details"],[3,"assetReference"],[1,"media-gallery-item-wrapper"],["alt","media",1,"img-fluid",3,"lazy-img"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"media-gallery-item-video-image","img-fluid",3,"lazy-img"],[1,"media-gallery-item-playbutton"],[1,"fa","fa-play-circle","fa-4x"],["target","_blank",1,"media-gallery-item-video",3,"href"],[1,"img-fluid",3,"src"],[1,"media-gallery-item-wrapper",3,"click"],[1,"media-gallery-item-video-image","img-fluid",3,"src"]],template:function(O,F){1&O&&(o.j41(0,"div",1),o.DNE(1,rc,7,2,"ng-container",2)(2,Lp,5,2,"ng-container",2)(3,Nf,7,7,"ng-container",3),o.k0s()),2&O&&(o.Y8G("ngClass",o.sMw(4,Kl,F.mediaGalleryItem.inviewInfo,F.mediaGalleryItem.assetImage&&!F.mediaGalleryItem.assetImage.released||F.mediaGalleryItem.assetText&&!F.mediaGalleryItem.assetText.released||F.mediaGalleryItem.assetFile&&!F.mediaGalleryItem.assetFile.released,F.isTroll&&F.profile.isMerkuristJournalist)),o.R7$(),o.Y8G("ngIf",F.mediaGalleryItem.assetFile),o.R7$(),o.Y8G("ngIf",F.mediaGalleryItem.assetImage&&2===F.mediaGalleryItem.assetImage.type),o.R7$(),o.Y8G("ngIf",null==F.mediaGalleryItem?null:F.mediaGalleryItem.assetText))},dependencies:[a.YU,a.bT,a.ux,a.e1,np,Nc,Dr.L,To,Ji,Wo,Bt,kt,Rn,ti],styles:['@charset "UTF-8";.media-gallery-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;position:relative;padding:.7rem}@media (min-width: 768px){.gallery-item-container[_ngcontent-%COMP%]{max-width:33.3333%}}@media (min-width: 576px) and (max-width: 767.98px){.gallery-item-container[_ngcontent-%COMP%]{max-width:50%}}@media (max-width: 575.98px){.gallery-item-container[_ngcontent-%COMP%]{max-width:100%}}.media-gallery-file-container[_ngcontent-%COMP%]{aspect-ratio:4/3;padding:.7rem}.media-gallery-file-container[_ngcontent-%COMP%]   .file[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:10px;border:1px solid black;aspect-ratio:4/3}.media-gallery-file-container[_ngcontent-%COMP%]   .media-gallery-file-icon[_ngcontent-%COMP%]{font-size:13rem;color:#000}.media-gallery-item-wrapper[_ngcontent-%COMP%]{position:relative;cursor:pointer;transition:transform .3s ease,background-color .3s ease;overflow:hidden}.media-gallery-item-wrapper[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:hover{transform:scale(1.1);background-color:#ffffffb3}.media-gallery-item-playbutton[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#000;background-color:#ffffff80;padding:.5rem;border-radius:50%;z-index:10;pointer-events:none;display:flex;justify-content:center;align-items:center;transition:transform .3s ease,background-color .3s ease}.media-gallery-item-playbutton[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:4rem;color:inherit}.media-gallery-item-wrapper[_ngcontent-%COMP%]:hover   .media-gallery-item-playbutton[_ngcontent-%COMP%]{transform:translate(-50%,-50%) scale(1.1);background-color:#ffffffb3}.media-gallery-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:block;position:relative}.responsive-avatar[_ngcontent-%COMP%]{width:100%;max-width:5rem}.responsive-avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto}.media-item-troll[_ngcontent-%COMP%]   .media-gallery-item-wrapper[_ngcontent-%COMP%]{opacity:.25}.media-item-troll[_ngcontent-%COMP%]   .media-item-details[_ngcontent-%COMP%]{color:red}.media-item-unreleased[_ngcontent-%COMP%]{opacity:.5}']})}}return v})();function Np(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",23)(1,"app-media-gallery-item",24),o.bIt("click",function(){const F=o.eBV(l).index,se=o.XpG();return o.Njj(se.openImageViewer(F))}),o.k0s()()}if(2&v){const l=p.$implicit,O=o.XpG();o.R7$(),o.Y8G("mediaGalleryItem",l)("scope",O.scope)("originNetworkSlug",O.article.originNetworkSlug)}}function ip(v,p){if(1&v){const l=o.RV6();o.j41(0,"button",25),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.onShowMore())}),o.nrm(1,"i",26),o.EFF(2," Mehr Dateien Laden "),o.k0s()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("ngClass",l.showMore?"icon-caret-down":"icon-caret-up")}}let sd=(()=>{class v{constructor(l,O){this.mediaGalleryService=l,this.scopeService=O,this.mediaGalleryItems=[],this.visibleItems=[],this.showMore=!0,this.images=[],this.isImageViewerVisible=!1,this.currentImageIndex=0,this.scope=this.scopeService.getScope()}ngOnInit(){this.mediaGalleryService.getMediaGalleryItems(this.article.assetReferences),this.mediaItemssubscription=this.mediaGalleryService.assetReferences$.subscribe(l=>{this.mediaGalleryItems=l,this.visibleItems=this.mediaGalleryItems.slice(0,6),this.updateImagesList()})}updateImagesList(){this.images=this.mediaGalleryItems.filter(l=>null!=l.assetImage)}onShowMore(){this.visibleItems=this.mediaGalleryItems,this.showMore=!1,this.updateImagesList()}openImageViewer(l){const F=this.mediaGalleryItems.filter(se=>null!=se.assetImage).findIndex(se=>se===this.visibleItems[l]);-1!==F&&(this.currentImageIndex=F,this.isImageViewerVisible=!0)}closeImageViewer(){this.isImageViewerVisible=!1}closeModal(){const l=document.getElementById("gallery-uploadmodal");null!=l&&(l.style.display="None")}ngOnDestroy(){this.mediaItemssubscription&&this.mediaItemssubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Nr),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-media-gallery"]],inputs:{article:"article"},decls:32,vars:3,consts:[[1,"media-gallery"],[1,"media-gallery-title","fw-bold","text-center"],[1,"container","gallery-container"],[1,"row"],["class","gallery-item-container col-12 col-sm-6 col-md-4 mb-4",4,"ngFor","ngForOf"],[1,"media-gallery-show-more-container","text-center"],["class","btn btn-link p-0 fw-bold media-gallery-show-more-button text-decoration-none text-uppercase",3,"click",4,"ngIf"],[1,"media-gallery-upload-container","text-center"],["data-bs-toggle","modal","data-bs-target","#gallery-uploadmodal",1,"btn","btn-link","p-0","media-gallery-upload-button","text-decoration-none","text-uppercase"],[1,"fa-solid","fa-paperclip","upload-icon"],["id","gallery-uploadmodal","tabindex","-1","aria-labelledby","gallery-uploadmodal-label","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal-dialog-centered"],[1,"modal-content"],[1,"modal-header"],["id","gallery-uploadmodal-label",1,"modal-title"],[1,"modal-body","text-center"],[1,"button-container","d-grid","gap-3"],[1,"btn","btn-default"],[1,"fa-regular","fa-image"],[1,"fa-regular","fa-images"],[1,"fa-regular","fa-circle-play"],[1,"modal-footer"],["type","button","data-bs-dismiss","modal",1,"btn","btn-warning"],[1,"gallery-item-container","col-12","col-sm-6","col-md-4","mb-4"],[3,"click","mediaGalleryItem","scope","originNetworkSlug"],[1,"btn","btn-link","p-0","fw-bold","media-gallery-show-more-button","text-decoration-none","text-uppercase",3,"click"],[3,"ngClass"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1),o.EFF(2),o.k0s(),o.j41(3,"div",2)(4,"div",3),o.DNE(5,Np,2,3,"div",4),o.k0s()(),o.j41(6,"div",5),o.DNE(7,ip,3,1,"button",6),o.k0s(),o.j41(8,"div",7)(9,"button",8),o.nrm(10,"i",9),o.EFF(11," Eigene Dateien Hochladen "),o.k0s()()(),o.j41(12,"div",10)(13,"div",11)(14,"div",12)(15,"div",13)(16,"h3",14),o.EFF(17,"Material hinzuf\xfcgen"),o.k0s()(),o.j41(18,"div",15)(19,"div",16)(20,"button",17),o.nrm(21,"i",18),o.EFF(22," Image hochladen"),o.k0s(),o.j41(23,"button",17),o.nrm(24,"i",19),o.EFF(25," Gif hochladen"),o.k0s(),o.j41(26,"button",17),o.nrm(27,"i",20),o.EFF(28," Video hochladen"),o.k0s()()(),o.j41(29,"div",21)(30,"button",22),o.EFF(31,"Close"),o.k0s()()()()()),2&O&&(o.R7$(2),o.SpI(" ",F.mediaGalleryItems.length," Dateien "),o.R7$(3),o.Y8G("ngForOf",F.visibleItems),o.R7$(2),o.Y8G("ngIf",F.showMore&&F.mediaGalleryItems.length>6))},dependencies:[a.YU,a.Sq,a.bT,pc],styles:[".media-gallery[_ngcontent-%COMP%]   .media-gallery-title[_ngcontent-%COMP%]{font-size:3rem;margin-bottom:2rem}.media-gallery[_ngcontent-%COMP%]   .media-gallery-show-more-button[_ngcontent-%COMP%]{font-size:1.8rem;color:#000;margin-top:3rem}.media-gallery[_ngcontent-%COMP%]   .media-gallery-upload-container[_ngcontent-%COMP%]   .media-gallery-upload-button[_ngcontent-%COMP%]{font-size:2.5rem;margin-top:4rem;color:#000}.media-gallery[_ngcontent-%COMP%]   .media-gallery-upload-container[_ngcontent-%COMP%]   .media-gallery-upload-button[_ngcontent-%COMP%]   .upload-icon[_ngcontent-%COMP%]{font-size:3rem;margin-right:1rem;transform:rotate(45deg)}.gallery-upload-modal[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]{position:relative;padding:15px;overflow-y:auto;height:auto}"]})}}return v})(),nu=(()=>{class v{constructor(l){this.http=l,this.apiEndpoint=window.scope.apiEndpoint}getAuthors(){return this.http.get(`${this.apiEndpoint}authors`).toPromise().then(l=>l).catch(this.handleError)}getMyArticles(){return this.http.get(`${this.apiEndpoint}authors/MyArticles`).toPromise().then(l=>l).catch(this.handleError)}checkApply(l){return this.http.get(`${this.apiEndpoint}snips/${l}/checkApply`).toPromise().then(O=>O).catch(this.handleError)}applySnip(l){return this.http.get(`${this.apiEndpoint}snips/${l}/apply`).toPromise().then(O=>O).catch(this.handleError)}noApplySnip(l){return this.http.get(`${this.apiEndpoint}snips/${l.snipId}/noapply/${l.id}`).toPromise().then(O=>O).catch(this.handleError)}allocateSnip(l){return this.http.get(`${this.apiEndpoint}snips/${l.snipId}/allocate/${l.id}`).toPromise().then(O=>O).catch(this.handleError)}rejectSnip(l){return this.http.get(`${this.apiEndpoint}snips/${l.snipId}/reject/${l.id}`).toPromise().then(O=>O).catch(this.handleError)}getAuthor(l){return this.http.get(`${this.apiEndpoint}authors/${l}`).toPromise().then(O=>O).catch(this.handleError)}getAuthorImprint(l){return this.http.get(`${this.apiEndpoint}authors/${l}/imprint`).toPromise().then(O=>O).catch(this.handleError)}updateAuthorBillingInfo(l){return this.http.put(`${this.apiEndpoint}authors/updateauthorbillinginfo`,l).toPromise().then(O=>O).catch(this.handleError)}handleError(l){return console.error("An error occurred",l),Promise.reject(l.message||l)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var gc=M(6078);function Hs(v,p){1&v&&o.nrm(0,"i",17)}function ad(v,p){if(1&v&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(4);o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_freelanceAuthorMale")," ")}}function Fp(v,p){if(1&v&&o.EFF(0),2&v){const l=o.XpG(4);o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_freelanceAuthorFemale")," ")}}function Oh(v,p){if(1&v&&(o.j41(0,"div",18),o.DNE(1,ad,2,1,"div",19)(2,Fp,1,1,"ng-template",null,0,o.C5r),o.k0s()),2&v){const l=o.sdS(3),O=o.XpG(3);o.R7$(),o.Y8G("ngIf",1===O.user.gender)("ngIfElse",l)}}function Vp(v,p){if(1&v&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(4);o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_authorMale")," ")}}function Hp(v,p){if(1&v&&o.EFF(0),2&v){const l=o.XpG(4);o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_authorFemale")," ")}}function Ed(v,p){if(1&v&&(o.j41(0,"div",18),o.DNE(1,Vp,2,1,"div",19)(2,Hp,1,1,"ng-template",null,1,o.C5r),o.k0s()),2&v){const l=o.sdS(3),O=o.XpG(3);o.R7$(),o.Y8G("ngIf",1===O.user.gender)("ngIfElse",l)}}function ld(v,p){if(1&v&&(o.j41(0,"div")(1,"a",11),o.nrm(2,"img",12),o.j41(3,"div",13),o.EFF(4),o.nrm(5,"br"),o.j41(6,"span",14),o.EFF(7),o.k0s(),o.DNE(8,Hs,1,0,"i",15)(9,Oh,4,2,"div",16)(10,Ed,4,2,"div",16),o.k0s()()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",l.userProfileUrl,o.B4B),o.R7$(),o.Y8G("src",l.user.avatarImageUrl+"?preset=article-detail-badge",o.B4B),o.R7$(2),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_from"),""),o.R7$(3),o.Lme("",l.user.firstName," ",l.user.lastName,""),o.R7$(),o.Y8G("ngIf",l.scope.currentChapter.settings.configurations.enableVerifiedUsers&&l.showVerifiedUser),o.R7$(),o.Y8G("ngIf",l.user.freelance),o.R7$(),o.Y8G("ngIf",!l.user.freelance&&!l.snip&&"---"!==l.user.levelName)}}function qu(v,p){1&v&&o.nrm(0,"i",17)}function kg(v,p){if(1&v&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(4);o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_freelanceAuthorMale")," ")}}function Up(v,p){if(1&v&&o.EFF(0),2&v){const l=o.XpG(4);o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_freelanceAuthorFemale")," ")}}function Od(v,p){if(1&v&&(o.j41(0,"div",18),o.DNE(1,kg,2,1,"div",19)(2,Up,1,1,"ng-template",null,2,o.C5r),o.k0s()),2&v){const l=o.sdS(3),O=o.XpG(3);o.R7$(),o.Y8G("ngIf",1===O.user.gender)("ngIfElse",l)}}function Lg(v,p){if(1&v&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(4);o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_authorMale")," ")}}function cd(v,p){if(1&v&&o.EFF(0),2&v){const l=o.XpG(4);o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_authorFemale")," ")}}function _C(v,p){if(1&v&&(o.j41(0,"div",18),o.DNE(1,Lg,2,1,"div",19)(2,cd,1,1,"ng-template",null,3,o.C5r),o.k0s()),2&v){const l=o.sdS(3),O=o.XpG(3);o.R7$(),o.Y8G("ngIf",1===O.user.gender)("ngIfElse",l)}}function Xl(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"img",12),o.j41(2,"div",13),o.EFF(3),o.nrm(4,"br"),o.j41(5,"span",14),o.EFF(6),o.k0s(),o.DNE(7,qu,1,0,"i",15)(8,Od,4,2,"div",16)(9,_C,4,2,"div",16),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("src",l.user.avatarImageUrl+"?preset=article-detail-badge",o.B4B),o.R7$(2),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_common_from"),""),o.R7$(3),o.Lme("",l.user.firstName," ",l.user.lastName,""),o.R7$(),o.Y8G("ngIf",l.scope.currentChapter.settings.configurations.enableVerifiedUsers&&l.showVerifiedUser),o.R7$(),o.Y8G("ngIf",l.user.freelance),o.R7$(),o.Y8G("ngIf",!l.user.freelance&&!l.snip&&"---"!==l.user.levelName)}}function bc(v,p){if(1&v&&(o.j41(0,"div",20),o.EFF(1),o.j41(2,"a",21),o.EFF(3),o.j41(4,"span",22),o.nrm(5,"img",23),o.EFF(6),o.k0s()()()),2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",l.scope.network.resources.web_userBadge_origin_0," "),o.R7$(),o.Y8G("href",l.originArticlePath,o.B4B),o.R7$(),o.SpI(" ",l.scope.network.resources.web_userBadge_origin_1," "),o.R7$(2),o.Y8G("src",l.article.originArticle.user.avatarImageUrl+"?preset=article-detail-badge",o.B4B),o.R7$(),o.Lme(" ",l.article.originArticle.user.firstName," ",l.article.originArticle.user.lastName," ")}}function Ff(v,p){if(1&v&&(o.j41(0,"div",20),o.EFF(1),o.j41(2,"span",22),o.nrm(3,"img",23),o.EFF(4),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",l.scope.network.resources.web_userBadge_origin_1," "),o.R7$(2),o.Y8G("src",l.article.originArticle.user.avatarImageUrl+"?preset=article-detail-badge",o.B4B),o.R7$(),o.Lme(" ",l.article.originArticle.user.firstName," ",l.article.originArticle.user.lastName," ")}}function Bg(v,p){if(1&v&&(o.j41(0,"div",24),o.EFF(1),o.nI1(2,"date"),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Lme(" ",l.scope.network.getResourceOrKeyName("web_userBadge_publishedAt")," ",o.i5U(2,2,l.article.published,"short")," ")}}function dd(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",25),o.EFF(1),o.j41(2,"a",26),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.openUserBadgeImprintDialog())}),o.EFF(3),o.k0s()()}if(2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_userBadge_imprint")," "),o.R7$(2),o.SpI(" ",l.user.freelance?l.user.firstName+" "+l.user.lastName:l.crossNetworkInfo," ")}}function Q_(v,p){if(1&v&&(o.j41(0,"div",5)(1,"div",6),o.DNE(2,ld,11,8,"div",7)(3,Xl,10,7,"div",7)(4,bc,7,6,"div",8)(5,Ff,5,4,"div",8)(6,Bg,3,5,"div",9)(7,dd,4,2,"div",10),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("ngIf",(null==l.article?null:l.article.originNetworkSlug)===(null==l.scope||null==l.scope.network?null:l.scope.network.slug)||(null==l.article?null:l.article.originNetworkSlug)!==(null==l.scope||null==l.scope.network?null:l.scope.network.slug)&&!(null!=l.scope&&null!=l.scope.network&&null!=l.scope.network.settings&&null!=l.scope.network.settings.configurations&&l.scope.network.settings.configurations.disableCCSourceLinks)),o.R7$(),o.Y8G("ngIf",(null==l.article?null:l.article.originNetworkSlug)!==(null==l.scope||null==l.scope.network?null:l.scope.network.slug)&&(null==l.scope||null==l.scope.network||null==l.scope.network.settings||null==l.scope.network.settings.configurations?null:l.scope.network.settings.configurations.disableCCSourceLinks)),o.R7$(),o.Y8G("ngIf",(null==l.article?null:l.article.originArticle)&&!l.scope.network.settings.configurations.disableCCSourceLinks),o.R7$(),o.Y8G("ngIf",(null==l.article?null:l.article.originArticle)&&l.scope.network.settings.configurations.disableCCSourceLinks),o.R7$(),o.Y8G("ngIf",null==l.article?null:l.article.published),o.R7$(),o.Y8G("ngIf",l.article)}}let km=(()=>{class v{constructor(l,O,F,se,we){this.scopeService=l,this.sanitizer=O,this.authorService=F,this.auth=se,this.clickService=we,this.userProfileUrl="",this.originArticlePath="",this.showVerifiedUser=!1,this.scope=l.getScope()}ngOnInit(){this.article?(this.initializeUserProfileUrl(),this.initializeOriginArticlePath(),this.showVerifiedUser=this.user.isVerifiedUser):console.warn("article is not defined.")}initializeUserProfileUrl(){this.isArticleModel(this.article)?this.article.originChapterSlug&&this.article.originNetworkSlug&&(this.crossNetworkInfo=this.scope.currentScope.chapter?.partner?.companyName,this.userProfileUrl=`${this.scope.currentScope.network.path}${"/"===this.scope.currentScope.chapter.path?"/profile/"+this.user.guid:this.scope.currentScope.chapter.path+"/profile/"+this.user.guid}`):this.scope&&this.scope.currentScope?this.userProfileUrl=`${this.scope.currentScope.chapter.path}/profile/${this.user.guid}`:console.warn("Scope or current scope is not defined.")}initializeOriginArticlePath(){if(this.isArticleModel(this.article)&&this.article.originArticle){const l=this.scope.currentChapter;l?this.originArticlePath=`${this.scope.currentScope.network.path}${l.path}${this.article.originArticle.path}`:console.error("Chapter not found:",this.article.originChapterSlug)}else console.warn("article or origin article is not defined.")}openUserBadgeImprintDialog(){this.authorService.getAuthorImprint(this.user.guid).then(l=>{this.impressum=l.html,this.showModal()}).catch(l=>{console.error("Error fetching author imprint:",l)})}showModal(){const l=document.getElementById("userBadgeImprintModal");l&&new bootstrap.Modal(l).show()}isArticleModel(l){return"originNetworkSlug"in l&&"originArticle"in l}facebooklogin(){this.auth.facebookLogin(!1)}clickServiceTest(){this.clickService.clickAssetReference("ee91c402-ad29-4e56-ab05-556e632412da","Itz")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(W.up),o.rXU(nu),o.rXU(so.u),o.rXU(gc._))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-badge-new"]],inputs:{user:"user",article:"article",snip:"snip"},decls:1,vars:1,consts:[["femaleFreelance",""],["femaleAuthor",""],["femaleFreelance2",""],["femaleAuthor2",""],["appAuthorizedClick","",4,"ngIf"],["appAuthorizedClick",""],[1,"userBadge"],[4,"ngIf"],["class","userBadge-new-origin",4,"ngIf"],["class","userBadge-new-time",4,"ngIf"],["class","userBadge-new-imprint","style","display:none",4,"ngIf"],[1,"userBadge-new-link","nolinkstyle",3,"href"],[1,"userBadge-new-avatar",3,"src"],[1,"userBadge-new-text"],[1,"userBadge-new-name"],["class","fas fa-check-square verified-icon",4,"ngIf"],["class","userBadge-new-level",4,"ngIf"],[1,"fas","fa-check-square","verified-icon"],[1,"userBadge-new-level"],[4,"ngIf","ngIfElse"],[1,"userBadge-new-origin"],["target","_blank",3,"href"],[1,"userBadge-new-origin-user"],[1,"userBadge-new-origin-user-avatar",3,"src"],[1,"userBadge-new-time"],[1,"userBadge-new-imprint",2,"display","none"],[1,"pointer",3,"click"]],template:function(O,F){1&O&&o.DNE(0,Q_,8,6,"div",4),2&O&&o.Y8G("ngIf",F.article)},dependencies:[a.bT,$o,a.vh],styles:[".userBadge[_ngcontent-%COMP%]{font-size:1.16em;line-height:1.2em;margin:15px 0}.userBadge[_ngcontent-%COMP%]   .userBadge-new-avatar[_ngcontent-%COMP%]{height:60px;width:60px;border-radius:50%;border:var(--colorSecondary) solid 2px}.userBadge[_ngcontent-%COMP%]   .userBadge-new-origin[_ngcontent-%COMP%]{margin:10px 0;color:gray}.userBadge[_ngcontent-%COMP%]   .userBadge-new-origin-user[_ngcontent-%COMP%]{white-space:nowrap}.userBadge[_ngcontent-%COMP%]   .userBadge-new-origin-user-avatar[_ngcontent-%COMP%]{height:14px;width:14px;margin-top:-2px;border-radius:50%;border:var(--colorSecondary) solid 2px}.userBadge[_ngcontent-%COMP%]   .userBadge-new-sitePath[_ngcontent-%COMP%]   .userBadge-new-avatar[_ngcontent-%COMP%]{border-color:transparent}.userBadge[_ngcontent-%COMP%]   .userBadge-new-sitePath[_ngcontent-%COMP%]   .userBadge-new-link[_ngcontent-%COMP%]{pointer-events:none}.userBadge[_ngcontent-%COMP%]   .userBadge-new-text[_ngcontent-%COMP%]{margin-left:15px;vertical-align:middle;display:inline-block}.userBadge[_ngcontent-%COMP%]   .userBadge-new-level[_ngcontent-%COMP%]{max-width:176px;word-wrap:break-word}.userBadge[_ngcontent-%COMP%]   .userBadge-new-name[_ngcontent-%COMP%]{font-weight:700}.userBadge[_ngcontent-%COMP%]   .userBadge-new-time[_ngcontent-%COMP%]{margin:10px 0;padding-top:5px;border-top:1px solid lightgray}.userBadge[_ngcontent-%COMP%]   .userBadge-new-time[_ngcontent-%COMP%], .userBadge[_ngcontent-%COMP%]   .userBadge-new-imprint[_ngcontent-%COMP%]{color:var(--gray)}.userBadge[_ngcontent-%COMP%]   .verified-icon[_ngcontent-%COMP%]{color:#00acee;font-size:.8em}.modal-background[_ngcontent-%COMP%]{background:#fff}@media (prefers-color-scheme: dark){.app[_ngcontent-%COMP%]   .userBadge-new-time[_ngcontent-%COMP%], .app[_ngcontent-%COMP%]   .userBadge-new-imprint[_ngcontent-%COMP%]{color:#fff!important}.app[_ngcontent-%COMP%]   .userBadge-new-avatar[_ngcontent-%COMP%], .app[_ngcontent-%COMP%]   .userBadge-new-origin-user-avatar[_ngcontent-%COMP%]{border:var(--colorSecondary) solid 2px}.app[_ngcontent-%COMP%]   .userBadge-new-origin[_ngcontent-%COMP%]{color:var(--gray)}.app[_ngcontent-%COMP%]   .userBadge-new-time[_ngcontent-%COMP%]{border-top:1px solid lightgray}.app[_ngcontent-%COMP%]   .userBadge-new-time[_ngcontent-%COMP%], .app[_ngcontent-%COMP%]   .userBadge-new-imprint[_ngcontent-%COMP%]{color:var(--gray)}}"]})}}return v})(),Lm=(()=>{class v{constructor(l,O){this.http=l,this.scopeService=O,this.scope=O.getScope()}getRecommendedArticles(l,O){return this.http.get(`${this.scope.apiEndpoint}recommendations/getRecommendedArticles/${l}/${O}`)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),iu=(()=>{class v{constructor(l){this.clickService=l,this.oculusJs=window.Oculus}trackArticleImpression(l,O){return this.oculusJs.trackArticleImpression(l,O)}clickArticle(l,O){this.clickService.clickArticle(l,O)}trackArticleReading(l,O){return this.oculusJs.trackArticleReading(l,O)}addScrollContainer(l){return this.oculusJs.addScrollContainer(l)}trackSnipImpression(l,O){return this.oculusJs.trackSnipImpression(l,O)}clickSnip(l,O){this.clickService.clickSnip(l,O)}trackSnipReading(l,O){return this.oculusJs.trackSnipReading(l,O)}trackSponsoredArticleImpression(l,O){return this.oculusJs.trackSponsoredArticleImpression(l,O)}clickSponsoredArticle(l,O){this.clickService.clickSponsoredArticle(l,O)}trackSponsoredArticleReading(l,O){return this.oculusJs.trackSponsoredArticleReading(l,O)}trackPremiumBanner(l,O){return this.oculusJs.trackPremiumBanner(l,O)}trackSuperBanner(l,O){return this.oculusJs.trackSuperBanner(l,O)}push(l,O){this.oculusJs.push(l,O)}navigate(l){this.oculusJs.navigate(l)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(gc._))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const J_=["*"];let zp=(()=>{class v{constructor(l,O,F,se){this.el=l,this.trackingService=O,this.scopeService=F,this.routeTracker=se,this.networkSlug=this.scopeService.getScope().network.slug,this.chapterSlug=this.scopeService.getScope().currentChapter.slug}ngOnInit(){const l=this.el.nativeElement;this.impressionTracker=this.trackingService.trackArticleImpression(l,{ia:this.article.id,iar:this.article.revisionId,iav:this.article.variantId,c:this.chapterSlug,n:this.networkSlug});const O=this.routeTracker.getCurrentRouteState();this.impressionTracker.persistent="app.main-news"==O.angularJsState&&O.fromAngularJs,l.addEventListener("click",()=>{this.impressionTracker.click(),this.trackingService.clickArticle(this.impressionTracker.guid,this.article.id)})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu),o.rXU(b.A),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["ngx-oculus-article-impression"],["","ngxOculusArticleImpressionComponent",""]],inputs:{article:[0,"ngxArticleData","article"]},ngContentSelectors:J_,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))},encapsulation:2})}}return v})();const eh=["*"];let Ng=(()=>{class v{constructor(l,O){this.el=l,this.trackingService=O}ngAfterViewInit(){this.trackingService.addScrollContainer(this.el.nativeElement)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["ngx-oculus-container"],["","ngxOculusContainerComponent",""]],ngContentSelectors:eh,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))}})}}return v})();const Fg=["*"];let th=(()=>{class v{constructor(l,O,F,se){this.el=l,this.trackingService=O,this.scopeService=F,this.routeTracker=se,this.networkSlug=this.scopeService.getScope().network.slug,this.chapterSlug=this.scopeService.getScope().currentChapter.slug}ngOnInit(){const l=this.el.nativeElement;this.impressionTracker=this.trackingService.trackSponsoredArticleImpression(l,{isac:this.sparticle.sponsoredArticleCampaignId,isa:this.sparticle.id,isar:this.sparticle.revisionId,isav:this.sparticle.variantId,c:this.chapterSlug,n:this.networkSlug,seg:null,iar:this.article?this.article.revisionId:null,iav:this.article?this.article.variantId:null});const O=this.routeTracker.getCurrentRouteState();this.impressionTracker.persistent="app.main-news"==O.angularJsState&&O.fromAngularJs,l.addEventListener("click",()=>{this.impressionTracker.click(),this.trackingService.clickSponsoredArticle(this.impressionTracker.guid,this.sparticle.id)})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu),o.rXU(b.A),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["ngx-oculus-sparticle-impression"],["","ngxOculusSparticleImpression",""]],inputs:{sparticle:[0,"ngxSparticleData","sparticle"],article:[0,"ngxArticleData","article"]},ngContentSelectors:Fg,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))}})}}return v})();function Gp(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",1)(2,"div",2)(3,"div",3)(4,"a",4),o.nrm(5,"img",5),o.k0s()(),o.j41(6,"div",6)(7,"a",4),o.nrm(8,"h5",7),o.nI1(9,"apicodoTranslateText"),o.nI1(10,"async"),o.nrm(11,"p",8),o.nI1(12,"apicodoTranslateText"),o.nI1(13,"async"),o.k0s()()()(),o.bVm()),2&v){const l=o.XpG();o.R7$(4),o.FS9("href",l.scope.currentChapter.path+l.recommendation.path+(l.recommendation.variantId?"/"+l.recommendation.variantId:""),o.B4B),o.R7$(),o.FS9("src",l.imagePath+"?preset=cover-1x1"+(l.recommendation.imageCache?"&cache="+l.recommendation.imageCache:""),o.B4B),o.R7$(2),o.Y8G("href",l.scope.currentChapter.path+l.recommendation.path+(l.recommendation.variantId?"/"+l.recommendation.variantId:""),o.B4B),o.R7$(),o.Y8G("innerHTML",o.bMT(10,7,o.bMT(9,5,l.recommendation.text)),o.npT),o.R7$(3),o.Y8G("innerHTML",o.bMT(13,11,o.bMT(12,9,l.recommendation.summary)),o.npT)}}let Yl=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceService=O,this.scope=l.getScope(),this.isMobile=this.deviceService.getUserAgentInfo().isMobile,this.enableHighQualityImage=this.scope.network.settings.configurations.enableHighQualityImage}ngOnInit(){if(this.displayable)if(1==this.displayable.articleListDisplayableType||2==this.displayable.articleListDisplayableType)this.recommendation=this.displayable,this.imagePath=this.scope.globalSettings.blobStorageCdnUrl+"/images/"+this.recommendation?.coverImageGuid;else if(3==this.displayable.articleListDisplayableType){let l=this.displayable;this.recommendation={id:l.id,coverImageGuid:l.listValues.coverAsset,path:l.path,summary:l.listValues.heading,text:l.listValues.title,heading:l.listValues.heading,articleListDisplayableType:3},this.imagePath=this.scope.globalSettings.blobStorageCdnUrl+"/"+this.scope.globalSettings.blobStorageContainerNameSpecial+"/"+this.recommendation?.coverImageGuid}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-article-variant-one"]],inputs:{displayable:"displayable"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"card","mb-3","displayable-wrapper"],[1,"row"],[1,"col-3","text-center"],[3,"href"],[1,"img-fluid",3,"src"],[1,"col-9"],[1,"card-title","display-5","displayable-title",3,"innerHTML"],[1,"card-text","displayable-text",3,"innerHTML"]],template:function(O,F){1&O&&o.DNE(0,Gp,14,13,"ng-container",0),2&O&&o.Y8G("ngIf",F.recommendation)},dependencies:[a.bT,a.Jj,vr],styles:["img[_ngcontent-%COMP%]{width:100%;object-fit:cover;overflow:hidden;aspect-ratio:4/3}a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor60)}.displayable-wrapper[_ngcontent-%COMP%]{border:none;background-color:inherit;padding-left:10px}.displayable-title[_ngcontent-%COMP%]{text-decoration:none;font-size:2rem;font:bold}.displayable-title[_ngcontent-%COMP%]:hover{text-decoration:underline}.displayable-text[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor60)}"]})}}return v})();function Bm(v,p){if(1&v&&(o.j41(0,"ngx-oculus-article-impression",6),o.nrm(1,"app-displayable-article-variant-one",7),o.k0s()),2&v){const l=o.XpG().$implicit;o.Y8G("ngxArticleData",l),o.R7$(),o.Y8G("displayable",l)}}function Vg(v,p){if(1&v&&(o.j41(0,"ngx-oculus-sparticle-impression",8),o.nrm(1,"app-displayable-article-variant-one",7),o.k0s()),2&v){const l=o.XpG().$implicit;o.Y8G("ngxArticleData",l)("ngxSparticleData",l),o.R7$(),o.Y8G("displayable",l)}}function Wp(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-displayable-article-variant-one",7),o.k0s()),2&v){const l=o.XpG().$implicit;o.R7$(),o.Y8G("displayable",l)}}function nh(v,p){if(1&v&&(o.j41(0,"div",2),o.DNE(1,Bm,2,2,"ngx-oculus-article-impression",3)(2,Vg,2,3,"ngx-oculus-sparticle-impression",4)(3,Wp,2,1,"div",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngIf",1==l.articleListDisplayableType),o.R7$(),o.Y8G("ngIf",2==l.articleListDisplayableType),o.R7$(),o.Y8G("ngIf",3==l.articleListDisplayableType)}}let Bd=(()=>{class v{constructor(l,O){this.recommendationsService=l,this.scopeService=O,this.sponsored=!1,this.scope=this.scopeService.getScope()}ngOnInit(){this.recommendationsService.getRecommendedArticles(this.articleId,this.sponsored).subscribe(l=>{this.displayables=l})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Lm),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-recommended-articles"]],inputs:{articleId:"articleId",sponsored:"sponsored"},decls:5,vars:2,consts:[[1,"recommendations-header","articleDetail-recommendations-articles-header"],["class","recommendations-displayables-wrapper",4,"ngFor","ngForOf"],[1,"recommendations-displayables-wrapper"],[3,"ngxArticleData",4,"ngIf"],[3,"ngxArticleData","ngxSparticleData",4,"ngIf"],[4,"ngIf"],[3,"ngxArticleData"],[3,"displayable"],[3,"ngxArticleData","ngxSparticleData"]],template:function(O,F){1&O&&(o.j41(0,"div")(1,"div",0),o.EFF(2),o.k0s(),o.j41(3,"ngx-oculus-container"),o.DNE(4,nh,4,3,"div",1),o.k0s()()),2&O&&(o.R7$(2),o.SpI(" ",F.scope.currentScope.network.getResourceOrKeyName("web_common_read_more")," "),o.R7$(2),o.Y8G("ngForOf",F.displayables))},dependencies:[a.Sq,a.bT,zp,Ng,th,Yl],styles:[".recommendations-displayables-wrapper[_ngcontent-%COMP%]{margin-bottom:40px}.recommendations-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:40px}"]})}}return v})();function Qs(v,p){if(1&v&&(o.nrm(0,"h1",11),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG().$implicit;o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.text)),o.npT)}}function _l(v,p){if(1&v&&(o.nrm(0,"h1",11),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG().$implicit;o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.title)),o.npT)}}function nl(v,p){if(1&v&&(o.j41(0,"div",8)(1,"div"),o.nrm(2,"h2",9),o.nI1(3,"apicodoTranslateText"),o.nI1(4,"async"),o.DNE(5,Qs,3,5,"h1",10)(6,_l,3,5,"h1",10),o.k0s()()),2&v){const l=p.$implicit;o.R7$(2),o.Y8G("innerHTML",o.bMT(4,5,o.bMT(3,3,l.heading)),o.npT),o.R7$(3),o.Y8G("ngIf",void 0!==l.text),o.R7$(),o.Y8G("ngIf",void 0!==l.title)}}function Nd(v,p){if(1&v&&(o.j41(0,"div",15),o.nrm(1,"app-oha",16),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("article",l.article)("source","ArticleDetail")}}function sc(v,p){if(1&v&&(o.nrm(0,"h1",11),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG().$implicit;o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.text)),o.npT)}}function Vf(v,p){if(1&v&&(o.nrm(0,"h1",11),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG().$implicit;o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,l.title)),o.npT)}}function Hg(v,p){if(1&v&&(o.j41(0,"div",8)(1,"div",12)(2,"div",13),o.nrm(3,"h2",9),o.nI1(4,"apicodoTranslateText"),o.nI1(5,"async"),o.k0s(),o.DNE(6,Nd,2,2,"div",14),o.k0s(),o.j41(7,"div",12),o.DNE(8,sc,3,5,"h1",10)(9,Vf,3,5,"h1",10),o.k0s()()),2&v){const l=p.$implicit,O=o.XpG();o.R7$(3),o.Y8G("innerHTML",o.bMT(5,6,o.bMT(4,4,l.heading)),o.npT),o.R7$(3),o.Y8G("ngIf",!O.removeOha),o.R7$(2),o.Y8G("ngIf",void 0!==l.text),o.R7$(),o.Y8G("ngIf",void 0!==l.title)}}let $p=(()=>{class v{constructor(){this.titleVariants=[],this.isEdit=!1,this.removeOha=!1}ngOnInit(){}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-title"]],inputs:{titleVariants:"titleVariants",article:"article",isEdit:"isEdit",removeOha:"removeOha"},decls:14,vars:2,consts:[["titleComponent",""],[1,"desktop-only"],[1,"container","p-0","m-0","title-wrapper"],[1,"row-no-gutters"],["id","carouselTitle",1,"carousel","slide","col-auto"],[1,"carousel-inner"],["class","carousel-item active",4,"ngFor","ngForOf"],[1,"mobile-only"],[1,"carousel-item","active"],[1,"h2","mb-4","col-9","heading-wrapper",3,"innerHTML"],["class","h1 mb-4 text-wrapper",3,"innerHTML",4,"ngIf"],[1,"h1","mb-4","text-wrapper",3,"innerHTML"],[1,"row"],[1,"col-10"],["class","col-2",4,"ngIf"],[1,"col-2"],[1,"float-end",3,"article","source"]],template:function(O,F){1&O&&(o.j41(0,"div",1)(1,"div",2,0)(3,"div",3)(4,"div",4)(5,"div",5),o.DNE(6,nl,7,7,"div",6),o.k0s()()()()(),o.j41(7,"div",7)(8,"div",2,0)(10,"div",3)(11,"div",4)(12,"div",5),o.DNE(13,Hg,10,8,"div",6),o.k0s()()()()()),2&O&&(o.R7$(6),o.Y8G("ngForOf",F.titleVariants),o.R7$(7),o.Y8G("ngForOf",F.titleVariants))},dependencies:[a.Sq,a.bT,uo,a.Jj,vr],styles:["h2[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%]{font-family:var(--fontPrimary);font-size:1.5rem;font-weight:400;hyphens:auto}h1[_ngcontent-%COMP%], .h1[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-size:3rem;font-weight:700;hyphens:auto}input[_ngcontent-%COMP%]{background-color:#fff;color:var(--textColor)}.carousel[_ngcontent-%COMP%]{cursor:auto}button[_ngcontent-%COMP%]{background-color:transparent;border:none}.desktop-only[_ngcontent-%COMP%]{display:block}.mobile-only[_ngcontent-%COMP%]{display:none}@media (max-width: 768px){.desktop-only[_ngcontent-%COMP%]{display:none}.mobile-only[_ngcontent-%COMP%]{display:block}}"]})}}return v})();function q_(v,p){if(1&v&&(o.j41(0,"div",7),o.nrm(1,"img",8),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.FS9("src",l.assetImageUrl,o.B4B)}}function lt(v,p){if(1&v&&(o.j41(0,"span",13),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.coverImages[0].text)}}function mt(v,p){if(1&v&&(o.j41(0,"span",14),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.SpI("Bildquelle: ",l.coverImages[0].source,"")}}function ut(v,p){if(1&v&&(o.j41(0,"div",9)(1,"div",10),o.DNE(2,lt,2,1,"span",11),o.EFF(3," \xa0 "),o.DNE(4,mt,2,1,"span",12),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("ngIf",l.coverImages[0].text),o.R7$(2),o.Y8G("ngIf",l.coverImages[0].source)}}let Mt=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceService=O,this.coverImageVariants=[],this.coverImages=[],this.scope=l.getScope()}ngOnInit(){if(this.coverImageVariants.length>0){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceService.getUserAgentInfo().isMobile?"-sm":"";this.coverImageVariants.forEach(F=>{F&&this.coverImages.push({source:F.source,text:F.text,assetImageUrl:`${F.assetImageUrl}?preset=cover${l}${O}-4x3&cache=${F.cache}`})})}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-cover"]],inputs:{coverImageVariants:"coverImageVariants"},decls:7,vars:2,consts:[["coverComponent",""],[1,"container","p-0","m-0","cover-wrapper"],[1,"row"],["id","carouselCover",1,"carousel","slide"],[1,"carousel-inner"],["class","carousel-item active",4,"ngFor","ngForOf"],["class","row mb-4 cover-metadata-wrapper",4,"ngIf"],[1,"carousel-item","active"],[1,"img-fluid",3,"src"],[1,"row","mb-4","cover-metadata-wrapper"],[1,"col-auto"],["class","cover-metadata-description",4,"ngIf"],["class","cover-metadata-source",4,"ngIf"],[1,"cover-metadata-description"],[1,"cover-metadata-source"]],template:function(O,F){1&O&&(o.j41(0,"div",1,0)(2,"div",2)(3,"div",3)(4,"div",4),o.DNE(5,q_,2,1,"div",5),o.k0s()()(),o.DNE(6,ut,5,2,"div",6),o.k0s()),2&O&&(o.R7$(5),o.Y8G("ngForOf",F.coverImages),o.R7$(),o.Y8G("ngIf",F.coverImages.length>0))},dependencies:[a.Sq,a.bT],styles:["img[_ngcontent-%COMP%]{width:100%;aspect-ratio:4/3;object-fit:cover;overflow:hidden}.carousel[_ngcontent-%COMP%]{cursor:auto}.cover-metadata-description[_ngcontent-%COMP%]{font-size:1rem}.cover-metadata-source[_ngcontent-%COMP%]{font-size:.8rem;font-weight:400;color:var(--textColor60)}"]})}}return v})();var fn=function(v){return v[v.Article=1]="Article",v[v.SponsoredArticle=2]="SponsoredArticle",v[v.Special=3]="Special",v[v.Snip=4]="Snip",v[v.StaticArticle=5]="StaticArticle",v}(fn||{});function ni(v,p){if(1&v&&(o.j41(0,"div")(1,"div",2)(2,"div"),o.nrm(3,"i",3),o.j41(4,"span"),o.EFF(5),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(2),o.HbH(l.isSnipDisplayable?"associatedMaterial-displayable-snip-icons":""),o.R7$(2),o.ZvI("",l.isSnipDisplayable?"associatedMaterial-displayable-snip-text":""," associatedMaterial-text"),o.R7$(),o.Lme(" \xa0 ",l.numberOfComments," ",l.text,"")}}let Pi=(()=>{class v{constructor(l,O,F){this.commentService=l,this.scopeService=O,this.deviceInfoService=F,this.assetReferences=[],this.isArticle=!1,this.isSnipDisplayable=!1,this.commentCount=null,this.numberOfComments=0,this.numberOfFiles=0,this.text="",this.scope=this.scopeService.getScope()}ngOnInit(){null==this.commentCount?null!=this.assetReferences&&this.assetReferences.length>0&&(this.numberOfComments=this.assetReferences.count(l=>!l.assetFile&&!l.hideInComments)):this.numberOfComments=this.commentCount,this.isArticle&&(this.text=this.scope.currentScope.network.getResourceOrKeyName("web_common_comments"))}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(bt),o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-associated-material"]],inputs:{assetReferences:"assetReferences",isArticle:"isArticle",isSnipDisplayable:"isSnipDisplayable",commentCount:"commentCount"},decls:2,vars:1,consts:[[1,""],[4,"ngIf"],[1,"associatedMaterial"],[1,"fa-regular","fa-message","associatedMaterial-icons"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,ni,6,8,"div",1),o.k0s()),2&O&&(o.R7$(),o.Y8G("ngIf",F.numberOfComments>0&&(void 0===F.scope.currentScope.chapter.settings.configurations.enableAssetComment||F.scope.currentScope.chapter.settings.configurations.enableAssetComment)))},dependencies:[a.bT],styles:[".associatedMaterial-text[_ngcontent-%COMP%]{padding-right:0}.associatedMaterial[_ngcontent-%COMP%], .associatedMaterial[_ngcontent-%COMP%]   .associatedMaterial-icons[_ngcontent-%COMP%]{font-size:.75rem;line-height:1}@media (max-width: 768px){.associatedMaterial-displayable-snip-text[_ngcontent-%COMP%]{padding:0;transform:translate(-90%,90%)}}"]})}}return v})();const Mo=v=>({width:250,height:150,showTitle:!0,title:"",onShown:v});function vo(v,p){if(1&v&&(o.j41(0,"div",22),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_article_share")," ")}}function Ir(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",11),o.nrm(2,"i",12),o.j41(3,"dx-drop-down-button",13),o.bIt("onItemClick",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.share(F))})("onContentReady",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.onShareButtonReady(F))}),o.DNE(4,vo,2,1,"div",14),o.j41(5,"dxi-item",15)(6,"div",16),o.nrm(7,"i",17),o.k0s()(),o.j41(8,"dxi-item",18)(9,"div",16),o.nrm(10,"i",19),o.k0s()(),o.j41(11,"dxi-item",20)(12,"div",16),o.nrm(13,"i",21),o.k0s()()()()()}if(2&v){const l=o.XpG();o.R7$(3),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_article_share")),o.Y8G("dropDownOptions",o.eq3(7,Mo,l.onShareMenuShown))("showArrowIcon",!1),o.R7$(),o.Y8G("dxTemplateOf","title"),o.R7$(2),o.FS9("title",l.scope.currentScope.network.getResourceOrKeyName("web_facebook_share_button_tooltip")),o.R7$(3),o.FS9("title",l.scope.currentScope.network.getResourceOrKeyName("web_twitter_share_button_tooltip")),o.R7$(3),o.FS9("title",l.scope.currentScope.network.getResourceOrKeyName("web_pinterest_share_button_tooltip"))}}function Es(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",6)(1,"div",23),o.nrm(2,"i",24),o.k0s(),o.j41(3,"div",25)(4,"dx-select-box",26),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.translateArticleDetails(F))}),o.k0s()()()}if(2&v){const l=o.XpG();o.R7$(4),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_article_translation_languageSelectBox_placeholder")),o.Y8G("items",l.availableTargetLanguages)}}function Bs(v,p){if(1&v&&(o.j41(0,"div",22),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_article_share")," ")}}function Va(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",27),o.nrm(1,"i",12),o.j41(2,"dx-drop-down-button",13),o.bIt("onItemClick",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.share(F))})("onContentReady",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.onShareButtonReady(F))}),o.DNE(3,Bs,2,1,"div",14),o.j41(4,"dxi-item",15)(5,"div",16),o.nrm(6,"i",17),o.k0s()(),o.j41(7,"dxi-item",18)(8,"div",16),o.nrm(9,"i",19),o.k0s()(),o.j41(10,"dxi-item",20)(11,"div",16),o.nrm(12,"i",21),o.k0s()()()()}if(2&v){const l=o.XpG();o.R7$(2),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_article_share")),o.Y8G("dropDownOptions",o.eq3(7,Mo,l.onShareMenuShown))("showArrowIcon",!1),o.R7$(),o.Y8G("dxTemplateOf","title"),o.R7$(2),o.FS9("title",l.scope.currentScope.network.getResourceOrKeyName("web_facebook_share_button_tooltip")),o.R7$(3),o.FS9("title",l.scope.currentScope.network.getResourceOrKeyName("web_twitter_share_button_tooltip")),o.R7$(3),o.FS9("title",l.scope.currentScope.network.getResourceOrKeyName("web_pinterest_share_button_tooltip"))}}function ac(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",27)(1,"div",23),o.nrm(2,"i",24),o.k0s(),o.j41(3,"div",25)(4,"dx-select-box",26),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.translateArticleDetails(F))}),o.k0s()()()}if(2&v){const l=o.XpG();o.R7$(4),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_article_translation_languageSelectBox_placeholder")),o.Y8G("items",l.availableTargetLanguages)}}let lc=(()=>{class v{constructor(l,O,F,se,we,We){this.scopeService=l,this.translationService=O,this.injector=F,this.upgrade=se,this.commentService=we,this.angularLocation=We,this.articleChange=new o.bkB,this.numberOfComments=0,this.availableTargetLanguages=[],this.text="",this.imageUrl="",this.isArticle=!1,this.facebookShareUrl="https://www.facebook.com/sharer/sharer.php?u=",this.twitterShareUrl="https://twitter.com/intent/tweet",this.pinterestShareUrl="https://www.pinterest.com/pin/create/link/",this.scope=l.getScope(),O.getAvailableTargetLanguages().then(gt=>{gt&&Object.entries(gt).forEach(([Ft,pn])=>{this.availableTargetLanguages.push({languageCode:Ft,nativeName:pn})})}),this.commentService.comments$.subscribe(gt=>{this.numberOfComments=gt.length})}ngOnInit(){this.imageUrl=this.article.coverAssetReference?.assetImage.assetImageUrl,this.text=this.article.text,this.isArticle=this.article.articleListDisplayableType==fn.Article||this.article.articleListDisplayableType==fn.Snip;const l=this.upgrade.$injector;this.profileService=l.get("profileService"),this.parserService=l.get("parserService")}onShareButtonReady(l){l.component.element().querySelector(".dx-button-content").classList.add("miscellaneousUserInteractions-shareButton")}onShareMenuShown(l){l.component.content().querySelector(".dx-list-items").classList.add("row"),l.component.content().querySelectorAll(".dx-list-item").forEach(se=>{se.title="",se.classList.add("miscellaneousUserInteractions-shareButton-listItem")})}share(l){switch(l.itemData.id){case"facebookShareButton":this.shareFacebook();break;case"twitterShareButton":this.shareTwitter();break;case"pinterestShareButton":this.sharePinterest()}}getUrl(){let l=new URL(`${location.origin}${location.pathname}`),O=this.angularLocation.path().substring(1).split("/")[0],F=l.pathname.replace(l.pathname.substring(l.pathname.indexOf(O)),O);return encodeURIComponent(`${l.origin}/${F}`)}getImageUrl(){return encodeURIComponent(this.imageUrl)}shareFacebook(){window.open(this.facebookShareUrl+this.getUrl()+"&t="+encodeURIComponent(this.text),"_blank","width=600,height=460")}shareTwitter(){var l=this.twitterShareUrl+"?url="+this.getUrl()+"&text="+this.text;this.scope.currentScope.chapter.settings.seoTwitterSite&&(l=l+"&via="+this.scope.currentScope.chapter.settings.seoTwitterSite.substring(1)),window.open(l,"_blank","width=600,height=460")}sharePinterest(){window.open(this.pinterestShareUrl+"?url="+this.getUrl()+"?media="+this.getImageUrl()+"?description="+encodeURIComponent(this.text),"_blank","width=600,height=460")}translateArticleDetails(l){let O=l.value;this.translationService.getTranslatedArticleDetails(this.article.id,O,this.article.variantId).then(F=>{this.article=F,this.parserService.postProcessHtml(this.article),this.profileService.updateFavoriteLanguage(O),this.articleChange.emit(this.article)})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Ei.M),o.rXU(o.zZn),o.rXU(P.be),o.rXU(bt),o.rXU(a.aZ))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-miscellaneous-user-interactions"]],inputs:{article:"article"},outputs:{articleChange:"articleChange"},decls:16,vars:8,consts:[[1,"desktop-only"],[1,"container","p-0","m-0","miscellaneousUserInteractions-wrapper"],[3,"assetReferences","isArticle"],[4,"ngIf"],["class","row",4,"ngIf"],[1,"mobile-only"],[1,"row"],[1,"col-6","share-button-wrapper"],["class","",4,"ngIf"],[1,"separator"],[1,"col-6","associated-material-wrapper"],[1,"mb-1"],[1,"fa-regular","fa-share-from-square","miscellaneousUserInteractions-icons"],["icon","","stylingMode","text","type","normal",3,"onItemClick","onContentReady","text","dropDownOptions","showArrowIcon"],["class","text-center fw-bold miscellaneousUserInteractions-social-media-share-button-menu-title",4,"dxTemplate","dxTemplateOf"],["id","facebookShareButton","title","",1,""],[1,"w-100",3,"title"],[1,"fa-brands","fa-facebook-f","share-icons"],["title","","id","twitterShareButton",1,""],[1,"fa-brands","fa-x-twitter","share-icons"],["title","","id","pinterestShareButton",1,""],[1,"fa-brands","fa-pinterest-p","share-icons"],[1,"text-center","fw-bold","miscellaneousUserInteractions-social-media-share-button-menu-title"],[1,"col-auto","miscellaneousUserInteractions-translation-icon"],[1,"fa-solid","fa-globe","miscellaneousUserInteractions-icons"],[1,"col-9"],["displayExpr","nativeName","valueExpr","languageCode","stylingMode","underlined",1,"miscellaneousUserInteractions-translation-languageSelectBox",3,"onValueChanged","placeholder","items"],[1,""]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div")(3,"div"),o.nrm(4,"app-associated-material",2),o.k0s(),o.DNE(5,Ir,14,9,"div",3)(6,Es,5,2,"div",4),o.k0s()()(),o.j41(7,"div",5)(8,"div",1)(9,"div",6)(10,"div",7),o.DNE(11,Va,13,9,"div",8)(12,ac,5,2,"div",8),o.k0s(),o.nrm(13,"span",9),o.j41(14,"div",10),o.nrm(15,"app-associated-material",2),o.k0s()()()()),2&O&&(o.R7$(4),o.Y8G("assetReferences",F.article.assetReferences)("isArticle",F.isArticle),o.R7$(),o.Y8G("ngIf",F.scope.currentScope.network.settings.socialMediaShareEnable),o.R7$(),o.Y8G("ngIf",0!==F.scope.currentScope.chapter.settings.featureTranslationProvider&&F.availableTargetLanguages.length>0),o.R7$(5),o.Y8G("ngIf",F.scope.currentScope.network.settings.socialMediaShareEnable),o.R7$(),o.Y8G("ngIf",0!==F.scope.currentScope.chapter.settings.featureTranslationProvider&&F.availableTargetLanguages.length>0),o.R7$(3),o.Y8G("assetReferences",F.article.assetReferences)("isArticle",F.isArticle))},dependencies:[a.bT,mn.CVf,Rt.eC,Kt.h,Wt.l,Pi],styles:[".miscellaneousUserInteractions-wrapper{font-size:1.2rem}  .miscellaneousUserInteractions-wrapper .miscellaneousUserInteractions-translation-languageSelectBox{font-size:1.2rem;line-height:130%}  .miscellaneousUserInteractions-wrapper .miscellaneousUserInteractions-shareButton{font-size:.75rem}  .miscellaneousUserInteractions-wrapper .miscellaneousUserInteractions-translation-icon{transform:translateY(10%)}  .miscellaneousUserInteractions-wrapper .miscellaneousUserInteractions-icons{font-size:.8rem}  .miscellaneousUserInteractions-wrapper .separator{width:1px;height:2rem;background-color:var(--textColor);padding:0}  .share-icons{padding:10px;font-size:.8rem}  .miscellaneousUserInteractions-shareButton-listItem{display:flex;width:33%}.desktop-only[_ngcontent-%COMP%]{display:block}.mobile-only[_ngcontent-%COMP%]{display:none}@media (max-width: 768px){  .miscellaneousUserInteractions-wrapper{font-size:1rem}.miscellaneousUserInteractions-translation-languageSelectBox[_ngcontent-%COMP%]{font-size:1rem}.desktop-only[_ngcontent-%COMP%]{display:none}.mobile-only[_ngcontent-%COMP%]{display:block}.associated-material-wrapper[_ngcontent-%COMP%]{display:grid;justify-content:center;align-content:center;margin-right:-1px}.share-button-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-left:-1px}}"]})}}return v})();const Fc=v=>[v];function wd(v,p){if(1&v&&(o.j41(0,"div",13),o.nrm(1,"app-oha",14),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("article",l.article)("source","ArticleDetail")}}let wh=(()=>{class v{constructor(){this.titleVariants=[],this.isEdit=!1,this.removeOha=!1}ngOnInit(){}updateText(l){}updateHeading(l){}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-header"]],inputs:{titleVariants:"titleVariants",article:"article",isEdit:"isEdit",removeOha:"removeOha"},decls:23,vars:27,consts:[[1,"desktop-only"],[1,"mb-4","container","p-0","m-0","header-wrapper"],[1,"row"],[1,"col-10"],[1,"",3,"titleVariants"],["class","col-2",4,"ngIf"],[1,"col"],[1,"h3","summary-wrapper","mb-3",3,"innerHTML"],[1,"",3,"coverImageVariants"],[3,"article"],[1,"mobile-only"],[1,"mb-4","container","header-wrapper"],[1,"",3,"titleVariants","article","removeOha"],[1,"col-2"],[1,"float-end",3,"article","source"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),o.nrm(4,"app-title",4),o.k0s(),o.DNE(5,wd,2,2,"div",5),o.k0s(),o.j41(6,"div",2)(7,"div",6),o.nrm(8,"h3",7),o.nI1(9,"apicodoTranslateText"),o.nI1(10,"async"),o.k0s()(),o.j41(11,"div",2),o.nrm(12,"app-cover",8),o.k0s(),o.j41(13,"div",2),o.nrm(14,"app-miscellaneous-user-interactions",9),o.k0s()()(),o.j41(15,"div",10)(16,"div",11),o.nrm(17,"app-title",12)(18,"h3",7),o.nI1(19,"apicodoTranslateText"),o.nI1(20,"async"),o.nrm(21,"app-cover",8)(22,"app-miscellaneous-user-interactions",9),o.k0s()()),2&O&&(o.R7$(4),o.Y8G("titleVariants",o.eq3(19,Fc,F.article)),o.R7$(),o.Y8G("ngIf",!F.removeOha),o.R7$(3),o.Y8G("innerHTML",o.bMT(10,13,o.bMT(9,11,F.article.summary)),o.npT),o.R7$(4),o.Y8G("coverImageVariants",o.eq3(21,Fc,null==F.article.coverAssetReference?null:F.article.coverAssetReference.assetImage)),o.R7$(2),o.Y8G("article",F.article),o.R7$(3),o.Y8G("titleVariants",o.eq3(23,Fc,F.article))("article",F.article)("removeOha",F.removeOha),o.R7$(),o.Y8G("innerHTML",o.bMT(20,17,o.bMT(19,15,F.article.summary)),o.npT),o.R7$(3),o.Y8G("coverImageVariants",o.eq3(25,Fc,null==F.article.coverAssetReference?null:F.article.coverAssetReference.assetImage)),o.R7$(),o.Y8G("article",F.article))},dependencies:[a.bT,$p,Mt,lc,uo,a.Jj,vr],styles:["h3[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%]{font-family:var(--fontTertiary);font-size:1.5rem;hyphens:auto}@media (max-width: 990px){.header-wrapper[_ngcontent-%COMP%]{padding-left:15px!important;max-width:100%}}@media (max-width: 768px){.header-wrapper[_ngcontent-%COMP%]{padding-left:0 15px 0 15px}}.desktop-only[_ngcontent-%COMP%]{display:block}.mobile-only[_ngcontent-%COMP%]{display:none}@media (max-width: 768px){.desktop-only[_ngcontent-%COMP%]{display:none}.mobile-only[_ngcontent-%COMP%]{display:block}}"]})}}return v})();const jp=()=>["imprint"],xc=()=>["pp"],Kp=()=>["tos"],ev=()=>["accessibility"];function vC(v,p){if(1&v&&(o.j41(0,"span")(1,"a",4),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",o.lJ4(2,xc),o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_privacyPolicy"))}}function Gy(v,p){if(1&v&&(o.j41(0,"span")(1,"a",5),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.dataPrivacy,o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_privacyPolicy"))}}function tv(v,p){if(1&v&&(o.j41(0,"span")(1,"a",4),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",o.lJ4(2,Kp),o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_termsOfUse"))}}function Ug(v,p){if(1&v&&(o.j41(0,"span")(1,"a",4),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",o.lJ4(2,ev),o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_accessibility"))}}function CC(v,p){if(1&v&&(o.j41(0,"span")(1,"a",6),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_cookie_consent"))}}let nv=(()=>{class v{constructor(l){this.scopeService=l,this.cookieManager=0,this.scope=this.scopeService.getScope(),this.year=this.scope.year,this.dataPrivacy=this.scope.currentChapter.partner.settings.dataPrivacyUrl,this.tos=this.scope.currentScope.network.settings.configurations.enableTOS,this.accessibility=this.scope.currentScope.network.settings.configurations.accessibility}ngOnInit(){this.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration&&!navigator.userAgent.includes("Merkurist_IAB")&&!navigator.userAgent.includes("Apicodo_IAB")&&(this.cookieManager=this.scope.currentChapter.settings.configurations.externalMediaConsentConfiguration.Manager)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-footer"]],decls:11,vars:8,consts:[[1,"footer-container"],[1,"footer-wrapper"],[1,"footer","d-flex","justify-content-around","text-uppercase"],[4,"ngIf"],[1,"footer-font",3,"href"],["target","_blank",1,"footer-font",3,"href"],["href","#cookie-consent",1,"footer-font"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2),o.DNE(3,vC,3,3,"span",3)(4,Gy,3,2,"span",3)(5,tv,3,3,"span",3)(6,Ug,3,3,"span",3),o.j41(7,"span")(8,"a",4),o.EFF(9),o.k0s()(),o.DNE(10,CC,3,1,"span",3),o.k0s()()()),2&O&&(o.R7$(3),o.Y8G("ngIf",!F.dataPrivacy),o.R7$(),o.Y8G("ngIf",F.dataPrivacy),o.R7$(),o.Y8G("ngIf",F.tos),o.R7$(),o.Y8G("ngIf",F.accessibility),o.R7$(2),o.Y8G("href",o.lJ4(7,jp),o.B4B),o.R7$(),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_common_imprint")),o.R7$(),o.Y8G("ngIf",1===F.cookieManager))},dependencies:[a.bT],styles:[".footer-container[_ngcontent-%COMP%]{display:flex;justify-content:center;border-top:1px solid black}.footer-container[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%]{border:1px solid black;opacity:1}.footer-wrapper[_ngcontent-%COMP%]{width:940px;display:flex;justify-content:center}.footer-wrapper[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]{margin:2rem 0;width:100%;overflow:hidden}.footer-wrapper[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]   .footer-font[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;font-size:.9rem;font-family:var(--fontPrimary)}.footer-wrapper[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]   a.footer-font[_ngcontent-%COMP%]{color:var(--colorPrimary);text-decoration:none}.footer-wrapper[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]   a.footer-font[_ngcontent-%COMP%]:visited{color:var(--colorPrimary)}.footer-wrapper[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]   a.footer-font[_ngcontent-%COMP%]:hover{color:var(--colorPrimary);text-decoration:underline}@media all and (max-width: 786px){.footer-wrapper[_ngcontent-%COMP%]{width:100%;padding:0 15px}.footer[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem;flex-direction:column;text-align:center;padding:15px 0;overflow:visible}.footer-font[_ngcontent-%COMP%]{white-space:normal}}"]})}}return v})();const yC=["*"];let zg=(()=>{class v{constructor(l,O,F){this.el=l,this.trackingService=O,this.scopeService=F,this.networkSlug=this.scopeService.getScope().network.slug,this.chapterSlug=this.scopeService.getScope().currentChapter.slug}ngAfterViewInit(){const l=this.findAllowFloatElementsOrFallback(this.el.nativeElement);this.readingTracker=this.trackingService.trackArticleReading(l,{ia:this.article.id,iar:this.article.revisionId,iav:this.article.variantId,c:this.chapterSlug,n:this.networkSlug})}findAllowFloatElementsOrFallback(l){const O=[],F=se=>{se.classList.contains("allow-float")?O.push(se):Array.from(se.children).forEach(we=>{we instanceof HTMLElement&&F(we)})};return F(l),0===O.length&&l.children.length>0?[l.children[0]]:O}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["ngx-oculus-article-reading"],["","ngxOculusArticleReading",""]],inputs:{article:[0,"ngxArticleData","article"]},ngContentSelectors:yC,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))},encapsulation:2})}}return v})();function iv(v,p){if(1&v&&(o.j41(0,"a",5),o.nrm(1,"span",6),o.nI1(2,"apicodoTranslateText"),o.nI1(3,"async"),o.k0s()),2&v){const l=o.XpG().$implicit,O=o.XpG();o.Y8G("href",O.scope.currentChapter.path+"/rubrics?q="+O.scope.currentScope.network.chaptersDictionary[l].id,o.B4B),o.R7$(),o.Y8G("innerHTML",o.bMT(3,4,o.bMT(2,2,O.scope.currentScope.network.chaptersDictionary[l].name)),o.npT)}}function Hf(v,p){1&v&&(o.j41(0,"span",7),o.EFF(1," | "),o.k0s())}function Ru(v,p){if(1&v&&(o.qex(0),o.DNE(1,iv,4,6,"a",3)(2,Hf,2,0,"span",4),o.bVm()),2&v){const l=p.$implicit,O=p.last,F=o.XpG();o.R7$(),o.Y8G("ngIf",l!==F.scope.currentChapter.slug&&(F.article.originNetworkSlug===F.scope.currentScope.network.slug||F.scope.currentScope.network.settings.configurations.disableCCSourceLinks)&&F.scope.currentScope.network.chaptersDictionary[l]),o.R7$(),o.Y8G("ngIf",!O)}}function ih(v,p){if(1&v&&(o.j41(0,"a",8),o.nrm(1,"span",6),o.nI1(2,"apicodoTranslateText"),o.nI1(3,"async"),o.j41(4,"span",9),o.EFF(5),o.k0s()()),2&v){const l=o.XpG();o.Y8G("href",l.crossNetworkInfo.networkPath+l.crossNetworkInfo.chapterPath,o.B4B),o.R7$(),o.Y8G("innerHTML",o.bMT(3,5,o.bMT(2,3,l.scope.currentScope.network.getResourceOrKeyName("web_article_crossNetworkArticle"))),o.npT),o.R7$(4),o.SpI("\xa0",l.crossNetworkInfo.partnerCompanyName,"")}}let op=(()=>{class v{constructor(l){this.scopeService=l,this.inDetailView=!1,this.scope=l.getScope()}ngOnInit(){this.article.crossNetworkInfo&&(this.crossNetworkInfo=this.article.crossNetworkInfo)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-article-categories"]],inputs:{article:"article",inDetailView:"inDetailView"},decls:3,vars:2,consts:[[1,"article-categories","text-uppercase"],[4,"ngFor","ngForOf"],["target","_blank","class","article-categories-button",3,"href",4,"ngIf"],["class","article-categories-button",3,"href",4,"ngIf"],["class","article-categories-divider",4,"ngIf"],[1,"article-categories-button",3,"href"],[1,"",3,"innerHTML"],[1,"article-categories-divider"],["target","_blank",1,"article-categories-button",3,"href"],[1,""]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Ru,3,2,"ng-container",1)(2,ih,6,7,"a",2),o.k0s()),2&O&&(o.R7$(),o.Y8G("ngForOf",F.article.chapterSlugs),o.R7$(),o.Y8G("ngIf",F.article.originNetworkSlug!==F.scope.currentScope.network.slug&&!F.scope.currentScope.network.settings.configurations.disableCCSourceLinks&&null!=F.crossNetworkInfo))},dependencies:[a.Sq,a.bT,a.Jj,vr],styles:[".article-categories[_ngcontent-%COMP%]{font-family:var(--fontPrimary);text-overflow:ellipsis;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box}.article-categories-button[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}@media (max-width: 768px){.article-categories[_ngcontent-%COMP%]{display:flex;gap:.5rem;margin-bottom:1.5rem}.article-categories[_ngcontent-%COMP%]   .article-categories-divider[_ngcontent-%COMP%]{font-size:.9rem;transform:translateY(0)}}"]})}}return v})();const bC=["*"];let Al=(()=>{class v{constructor(l,O,F,se){this.el=l,this.trackingService=O,this.scopeService=F,this.routeTracker=se,this.networkSlug=this.scopeService.getScope().network.slug,this.chapterSlug=this.scopeService.getScope().currentChapter.slug}ngOnInit(){const l=this.el.nativeElement;this.impressionTracker=this.trackingService.trackSnipImpression(l,{is:this.snip.id,isr:this.snip.revisionId,c:this.chapterSlug,n:this.networkSlug});const O=this.routeTracker.getCurrentRouteState();this.impressionTracker.persistent="app.main-news"==O.angularJsState&&O.fromAngularJs,l.addEventListener("click",()=>{this.impressionTracker.click(),this.trackingService.clickSnip(this.impressionTracker.guid,this.snip.id)})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu),o.rXU(b.A),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["ngx-oculus-snip-impression"],["","ngxOculusSnipImpression",""]],inputs:{snip:[0,"ngxSnipData","snip"]},ngContentSelectors:bC,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))}})}}return v})();const Nm=["*"];let Fm=(()=>{class v{constructor(l,O,F){this.el=l,this.trackingService=O,this.scopeService=F,this.networkSlug=this.scopeService.getScope().network.slug,this.chapterSlug=this.scopeService.getScope().currentChapter.slug}ngAfterViewInit(){const l=this.findAllowFloatElementsOrFallback(this.el.nativeElement);this.readingTracker=this.trackingService.trackSnipReading(l,{is:this.snip.id,isr:this.snip.revisionId,c:this.chapterSlug,n:this.networkSlug})}findAllowFloatElementsOrFallback(l){const O=[],F=se=>{se.classList.contains("allow-float")?O.push(se):Array.from(se.children).forEach(we=>{we instanceof HTMLElement&&F(we)})};return F(l),0===O.length&&l.children.length>0?[l.children[0]]:O}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-ngx-oculus-snip-reading"],["","ngxOculusSnipReading",""]],inputs:{snip:[0,"ngxSnipData","snip"]},ngContentSelectors:Nm,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))}})}}return v})();const Uf=["*"];let xC=(()=>{class v{constructor(l,O,F,se){this.el=l,this.trackingService=O,this.scopeService=F,this.routeTracker=se,this.networkSlug=this.scopeService.getScope().network.slug,this.chapterSlug=this.scopeService.getScope().currentChapter.slug}ngAfterViewInit(){const l=this.findAllowFloatElementsOrFallback(this.el.nativeElement);this.readingTracker=this.trackingService.trackSponsoredArticleReading(l,{isa:this.sponsoredArticle.id,isac:this.sponsoredArticle.sponsoredArticleCampaignId,isar:this.sponsoredArticle.revisionId,isav:this.sponsoredArticle.variantId,c:this.chapterSlug,n:this.networkSlug})}findAllowFloatElementsOrFallback(l){const O=[],F=se=>{se.classList.contains("allow-float")?O.push(se):Array.from(se.children).forEach(we=>{we instanceof HTMLElement&&F(we)})};return F(l),0===O.length&&l.children.length>0?[l.children[0]]:O}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(iu),o.rXU(b.A),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-ngx-oculus-sparticle-reading"],["","ngxOculusSparticleReading",""]],inputs:{sponsoredArticle:[0,"ngxSparticleData","sponsoredArticle"]},ngContentSelectors:Uf,decls:1,vars:0,template:function(O,F){1&O&&(o.NAR(),o.SdG(0))}})}}return v})(),Gg=(()=>{class v{constructor(l,O,F,se,we,We){this.http=l,this.upgrade=O,this.scopeService=F,this.deviceInfoService=se,this.document=we,this.shipmentsCache={},this.deferredCache={},this.resolve=(Ft,pn,fi)=>new Promise((_o,Po)=>{this.deferredCache[pn]&&this.deferredCache[pn].length>Ft&&(Ft=this.deferredCache[pn].length),this.http.get(`${this.scope.apiEndpoint}shipment/${Ft}/${pn}${fi?"?targetLanguage="+fi:""}`).toPromise().then(Ro=>{this.shipmentsCache[pn]=Ro,this.deferredCache[pn]&&this.deferredCache[pn].forEach(Rr=>{this.shipmentsCache[pn].length>0?Rr.resolve(this.shipmentsCache[pn].splice(0,1)[0]):Rr.reject()}),this.deferredCache[pn]=[],_o(Ro)}).catch(()=>Po())}),this.getShipment=Ft=>new Promise((pn,fi)=>{this.shipmentsCache[Ft]&&this.shipmentsCache[Ft].length>0?pn(this.shipmentsCache[Ft].splice(0,1)[0]):(this.deferredCache[Ft]||(this.deferredCache[Ft]=[]),this.deferredCache[Ft].push({resolve:pn,reject:fi}))}),this.shipmentPremiumCached=null,this.shipmentPremiumNoWaitCached=null,this.getShipmentPremium=()=>{if(this.shipmentPremiumCached)return this.shipmentPremiumCached;const Ft=this.deviceInfoService.getUserAgentInfo().isMobile;return this.shipmentPremiumCached=this.withDocumentReadyTimeout(()=>this.http.get(`${this.scope.apiEndpoint}shipment/premium/${Ft}`).toPromise().then(pn=>(pn&&(pn.mobile=Ft),this.shipmentPremiumCached=null,pn)).catch(pn=>Promise.reject(pn))),this.shipmentPremiumCached},this.getShipmentPremiumNoWait=()=>{if(this.shipmentPremiumNoWaitCached)return this.shipmentPremiumNoWaitCached;if("Redesign2024"!=this.scope.network.settings.configurations.contentRenderEngine)return this.getShipmentPremium();const Ft=this.deviceInfoService.getUserAgentInfo().isMobile;return this.shipmentPremiumNoWaitCached=this.http.get(`${this.scope.apiEndpoint}shipment/premium/${Ft}`).toPromise().then(pn=>(pn&&(pn.mobile=Ft),this.shipmentPremiumNoWaitCached=null,pn)).catch(pn=>Promise.reject(pn)),this.shipmentPremiumNoWaitCached},this.shipmentSuperNoWaitCached=null,this.getShipmentSuper=()=>this.getShipmentSuperNoWait(),this.getShipmentSuperNoWait=()=>{if(null!=this.shipmentSuperNoWaitCached)return this.shipmentSuperNoWaitCached;const Ft=this.deviceInfoService.getUserAgentInfo().isMobile;return this.shipmentSuperNoWaitCached=this.http.get(`${this.scope.apiEndpoint}shipment/superCampaigns/${Ft}`).toPromise().then(pn=>(pn&&pn.forEach(fi=>{fi&&(fi.mobile=Ft)}),this.shipmentSuperNoWaitCached=null,pn)).catch(pn=>Promise.reject(pn)),this.shipmentSuperNoWaitCached},this.getSurveyForDeeplink=(Ft,pn)=>this.http.get(`${this.scope.apiEndpoint}shipment/survey/${Ft}${pn?"/true":"/false"}`).toPromise().then(fi=>fi).catch(fi=>Promise.reject(fi)),this.getTranslatedSurveyForDeeplink=(Ft,pn,fi)=>this.http.get(`${this.scope.apiEndpoint}shipment/survey/translate/${Ft}${pn?"/true/":"/false/"}${fi}`).toPromise().then(_o=>_o).catch(_o=>Promise.reject(_o)),this.clickSurvey=Ft=>this.http.post(`${this.scope.apiEndpoint}shipment/survey/${Ft}/click`,{}).toPromise().then(pn=>pn).catch(pn=>Promise.reject(pn));const gt=this.upgrade.$injector.get("$rootScope");this.renderer=We.createRenderer(null,null),gt.$on("$locationChangeSuccess",()=>{this.shipmentsCache={},this.deferredCache={}}),this.scope=this.scopeService.getScope()}withDocumentReady(l){return new Promise((O,F)=>{"complete"!==this.document.readyState?this.renderer.listen(this.document,"DOMContentLoaded",()=>{l().then(O).catch(F)}):l().then(O).catch(F)})}withDocumentReadyTimeout(l,O=1500){return new Promise((F,se)=>{const we=()=>{clearTimeout(We),l().then(F).catch(se)},We=setTimeout(()=>{console.warn("DOMContentLoaded did not fire. Proceeding with fallback."),we()},O);if("complete"!==this.document.readyState){const gt=this.renderer.listen(this.document,"DOMContentLoaded",()=>{gt(),we()})}else we()})}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(P.be),o.KVO(b.A),o.KVO(s.E),o.KVO(a.qQ),o.KVO(o._9s))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const Wc=v=>({"background-color":v}),Xp=v=>({color:v});function gr(v,p){if(1&v){const l=o.RV6();o.j41(0,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG(2);o.Y8G("href",l.premiumShipment.uri,o.B4B),o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function ov(v,p){if(1&v){const l=o.RV6();o.j41(0,"a",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG(2);o.Y8G("href",l.premiumShipment.uri,o.B4B),o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function rv(v,p){if(1&v){const l=o.RV6();o.j41(0,"a",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG(2);o.Y8G("href",l.premiumShipment.uri,o.B4B),o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function zf(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",11),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function vl(v,p){if(1&v&&(o.j41(0,"div",1)(1,"div",2)(2,"div",3),o.EFF(3),o.k0s(),o.j41(4,"div",4),o.DNE(5,gr,2,2,"a",5)(6,ov,2,2,"a",6)(7,rv,2,2,"a",6)(8,zf,2,1,"div",7),o.k0s()()()),2&v){const l=o.XpG();o.Y8G("ngStyle",o.eq3(7,Wc,l.premiumShipment.backgroundColor)),o.R7$(2),o.Y8G("ngStyle",o.eq3(9,Xp,l.premiumShipment.fontColor)),o.R7$(),o.SpI(" \xa0",l.webShipmentPremiumTitle," "),o.R7$(2),o.Y8G("ngIf",l.inSameChapter&&l.premiumShipment.uri&&!l.uriIsDocument),o.R7$(),o.Y8G("ngIf",!l.inSameChapter&&l.premiumShipment.uri&&!l.uriIsDocument),o.R7$(),o.Y8G("ngIf",l.uriIsDocument),o.R7$(),o.Y8G("ngIf",!l.premiumShipment.uri)}}let Or=(()=>{class v{constructor(l,O,F,se,we,We){this.injector=l,this.trackingService=O,this.scopeService=F,this.clickService=se,this.shipmentService=we,this.elementRef=We,this.webShipmentPremiumTitle="",this.imageUrl="",this.inSameChapter=!1,this.uriIsDocument=!1;const gt=this.injector.get(P.be).$injector;this.redirectService=gt.get("redirectService"),this.oculusTrackingService=O,this.$state=gt.get("$state"),this.scope=this.scopeService.getScope()}ngOnInit(){this.premiumShipment||this.shipmentService.getShipmentPremiumNoWait().then(l=>{this.premiumShipment=l,this.initializeShipmentData()})}initializeShipmentData(){this.premiumShipment&&(this.imageUrl=this.getImageUrl(),this.premiumShipment.uri&&(this.inSameChapter=this.redirectService.isSameChapterUrl(this.premiumShipment.uri),this.uriIsDocument=this.checkIfUriIsDocument(this.premiumShipment.uri)),this.initializeOculusTracking())}getImageUrl(){const l=this.scopeService.getScope().globalSettings.blobStorageCdnUrl,O=this.scopeService.getScope().globalSettings.blobStorageContainerNameShipment;return this.premiumShipment.pin?`${l}/${O}/${this.premiumShipment.pin}?preset=premium-shipment`:""}interpolateTitle(){return this.scope.network.resources.web_shipment_premium_title.replace("{chapterName}",this.scope.currentChapter.name)}checkIfUriIsDocument(l){return l.includes("/pdf/")||l.includes("/document/")||l.includes("/file/")}initializeOculusTracking(){this.premiumShipment.oculus=this.oculusTrackingService.trackPremiumBanner(this.elementRef.nativeElement,{c:this.scope.currentChapter.slug,n:this.scope.network.slug,ip:this.premiumShipment.premiumId,ipb:this.premiumShipment.premiumBannerId}),this.premiumShipment.oculus.persistent=this.$state.includes("app.main-news")}clickBanner(){this.premiumShipment.oculus.click(),this.clickService.clickPremiumPost(this.premiumShipment.oculus.guid,this.premiumShipment.pin)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.zZn),o.rXU(iu),o.rXU(b.A),o.rXU(gc._),o.rXU(Gg),o.rXU(o.aKT))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["ngx-shipment-premium"]],decls:1,vars:1,consts:[["class","shipmentPremium-wrapper",3,"ngStyle",4,"ngIf"],[1,"shipmentPremium-wrapper",3,"ngStyle"],[1,"shipmentPremium"],[1,"shipmentPremium-attribution",3,"ngStyle"],[1,"shipmentPremium-image-wrapper"],[3,"href","click",4,"ngIf"],["target","_blank",3,"href","click",4,"ngIf"],[3,"click",4,"ngIf"],[3,"click","href"],[1,"shipmentPremium-image",3,"src"],["target","_blank",3,"click","href"],[3,"click"]],template:function(O,F){1&O&&o.DNE(0,vl,9,11,"div",0),2&O&&o.Y8G("ngIf",F.premiumShipment&&F.premiumShipment.pin)},dependencies:[a.bT,a.B3],styles:[".shipmentPremium-wrapper[_ngcontent-%COMP%]{width:100%;margin-bottom:2rem}.shipmentPremium-image-wrapper[_ngcontent-%COMP%]{padding-bottom:17%;position:relative}.shipmentPremium-image[_ngcontent-%COMP%]{width:100%;max-height:100%;position:absolute}.shipmentPremium[_ngcontent-%COMP%]{position:relative;max-width:940px;margin:auto;padding-bottom:1em}.shipmentPremium-attribution[_ngcontent-%COMP%]{width:100%;text-align:right}.shipmentPremium-image[_ngcontent-%COMP%]{width:100%}@media all and (max-width: 969px){.shipmentPremium-attribution[_ngcontent-%COMP%]{padding-right:15px}}@media all and (max-width: 767px){.shipmentPremium-image-wrapper[_ngcontent-%COMP%]{padding-bottom:27%}}"]})}}return v})(),ts=(()=>{class v{constructor(l,O,F){var se=this;this.http=l,this.profileService=O,this.scopeService=F,this.articleCache={},this.listCache={swapCache:[]},this.getExtractedVariantData=we=>we&&this.articleCache[we]?{revisionTestId:this.articleCache[we].revisionTestId,heading:this.articleCache[we].heading,text:this.articleCache[we].text,coverAsset:{...this.articleCache[we].coverAsset}}:{},this.cache=we=>{if(!we.articleListDisplayableType||1!==we.articleListDisplayableType)return we;if(we.coverAssetReference?we.coverImageGuid=we.coverAssetReference.assetImage.guid:we.coverAssetReference=we.coverImageGuid?{assetImage:{assetImageUrl:`${this.scope.globalSettings.blobStorageCdnUrl}/${this.scope.globalSettings.blobStorageContainerNameImage}/${we.coverImageGuid}`,source:this.scope.currentScope.network.name,text:"Loading",cache:we.coverImageCache}}:"Redesign2024"==this.scope.network.settings.configurations.contentRenderEngine?null:{assetImage:{assetImageUrl:`${this.scope.globalSettings.blobStorageCdnUrl}/${this.scope.globalSettings.blobStorageContainerNameImage}/dummy.jpg`,source:this.scope.currentScope.network.name,text:"Symbolbild",cache:0}},this.articleCache[we.id]){const We=this.articleCache[we.id],gt=this.getExtractedVariantData(We.id);return Object.assign(We,we),Object.assign(We,gt),we.assets&&we.coverAsset&&we.coverAsset.guid&&we.assets.forEach(Ft=>Ft.guid!==we.coverAsset.guid||(We.coverAsset=Ft,!1)),We}return this.articleCache[we.id]=we,we},this.getMultiLanguageTranslationSystemEnabled=()=>this.scope.network.settings.configurations?.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled??!1,this.getTranslationProviderEnabled=()=>0!==this.scope.currentChapter.settings.featureTranslationProvider,this.createArticle=()=>this.http.post(`${this.apiEndpoint}articles`,{}).toPromise(),this.getTranslatedArticles=we=>we?this.listCache["articles-"+we]?(this.listCache.swapCache=this.listCache["articles-"+we],Promise.resolve(this.listCache.swapCache)):this.http.get(`${this.apiEndpoint}articles/translate/${we}`).toPromise().then(We=>(this.listCache["articles-"+we]=We,this.listCache.swapCache=We,this.listCache.swapCache)):this.getMainArticles(),this.getArticles=()=>{const we=this.getMultiLanguageTranslationSystemEnabled(),We=this.profileService.profile,gt=this.scope.network.settings.languagePack.split("-")[0];return we&&We.activeUserLanguage?.vendorLanguageCode&&gt!==We.activeUserLanguage.vendorLanguageCode?this.listCache["articles-"+We.activeUserLanguage.vendorLanguageCode]?(this.listCache.swapCache=this.listCache["articles-"+We.activeUserLanguage.vendorLanguageCode],Promise.resolve(this.listCache.swapCache)):this.getTranslatedArticles(We.activeUserLanguage.vendorLanguageCode).then(Ft=>(this.articleCache.articles=Ft,this.listCache["articles-"+We.activeUserLanguage.vendorLanguageCode]=Ft,Ft.forEach(pn=>this.cache(pn)),this.listCache.swapCache=this.listCache["articles-"+We.activeUserLanguage.vendorLanguageCode],this.listCache.swapCache)):this.articleCache.articles?Promise.resolve(this.articleCache.articles):this.http.get(`${this.apiEndpoint}articles`).toPromise().then(Ft=>{const pn=Ft;return pn.forEach(fi=>this.cache(fi)),this.articleCache.articles=pn,this.listCache.swapCache=pn,this.listCache.swapCache})},this.getMainArticles=(0,$e.A)(function*(){yield se.profileService.getProfile(!0);const we=se.profileService.profile,We=se.getMultiLanguageTranslationSystemEnabled(),gt=se.scope.network.settings.languagePack.split("-")[0];return We&&we.activeUserLanguage?.vendorLanguageCode&&gt!==we.activeUserLanguage.vendorLanguageCode?se.listCache["main-articles-"+we.activeUserLanguage.vendorLanguageCode]?(se.listCache.swapCache=se.listCache["main-articles-"+we.activeUserLanguage.vendorLanguageCode],Promise.resolve(se.listCache.swapCache)):se.getTranslatedArticles(we.activeUserLanguage.vendorLanguageCode).then(Ft=>(se.articleCache.articles=Ft,se.listCache["main-articles-"+we.activeUserLanguage.vendorLanguageCode]=Ft,Ft.forEach(pn=>se.cache(pn)),se.listCache.swapCache=se.listCache["main-articles-"+we.activeUserLanguage.vendorLanguageCode],se.listCache.swapCache)):se.articleCache.articles?Promise.resolve(se.articleCache.articles):se.http.get(`${se.apiEndpoint}articles/mainpagearticles`).toPromise().then(Ft=>{const pn=Ft;return pn.forEach(fi=>se.cache(fi)),se.articleCache.articles=pn,se.listCache.swapCache=pn,se.listCache.swapCache})}),this.getContentConnectNetworks=()=>new Promise((we,We)=>{this.http.get(`${this.apiEndpoint}ccNetworks`).toPromise().then(gt=>{we(gt)}).catch(()=>{We()})}),this.getEventContentConnectNetworks=()=>new Promise((we,We)=>{this.http.get(`${this.apiEndpoint}eventCcNetworks`).toPromise().then(gt=>{we(gt)}).catch(()=>{We()})}),this.cachedArticlesForEventCalendar=[],this.getArticlesForEventCalendar=()=>new Promise((we,We)=>{0===this.cachedArticlesForEventCalendar.length?this.http.get(`${this.apiEndpoint}articles/events`).toPromise().then(gt=>{let Ft=gt;Ft.forEach((pn,fi)=>{Ft[fi]=this.cache(pn)}),this.cachedArticlesForEventCalendar=Ft,we(this.cachedArticlesForEventCalendar)}).catch(()=>{We()}):we(this.cachedArticlesForEventCalendar)}),this.getArticleIds=()=>this.http.get(`${this.apiEndpoint}articles/ids`).toPromise().then(we=>we),this.getArticlesByAuthor=we=>this.http.get(`${this.apiEndpoint}articles/author/${we}`).toPromise().then(We=>(We.forEach((gt,Ft)=>{We[Ft]=this.cache(gt)}),We)),this.getArticleFromCache=we=>this.articleCache[we]||null,this.getArticlesByIds=we=>this.http.post(`${this.apiEndpoint}articles/loadMore`,we).toPromise().then(We=>(We.forEach((gt,Ft)=>{We[Ft]=this.cache(gt)}),We)),this.getArticleDetails=(we,We)=>{let gt=`${this.apiEndpoint}articles/${we}`;return We&&(gt+=`?v=${We}`),this.http.get(gt).toPromise().then(Ft=>(Ft.detailsLoaded=!0,this.cache(Ft)))},this.getTranslatedArticleDetails=(we,We,gt)=>{let Ft=`${this.apiEndpoint}articles/${we}/translate/${We}`;return gt&&(Ft+=`?v=${gt}`),this.http.post(Ft,{}).toPromise().then(pn=>(pn.detailsLoaded=!0,pn))},this.deleteArticle=we=>this.http.delete(`${this.apiEndpoint}articles/${we}`).toPromise(),this.publishArticle=we=>this.http.put(`${this.apiEndpoint}articles/${we.id}/publish`,we).toPromise(),this.saveArticleDetails=(we,We)=>this.http.put(`${this.apiEndpoint}articles/${we}`,We).toPromise(),this.getArticleRevisions=we=>this.http.get(`${this.apiEndpoint}articles/${we}/revisions`).toPromise(),this.getArticleRevisionDetails=(we,We)=>this.http.get(`${this.apiEndpoint}articles/${we}/revisions/${We}`).toPromise(),this.getRecommendedArticles=we=>this.http.get(`${this.apiEndpoint}articles/${we}/recommendedarticles`).toPromise().then(We=>{const gt=We;return gt.forEach((Ft,pn)=>{gt[pn]=this.cache(Ft)}),gt}),this.getSearch=we=>this.http.get(`${this.apiEndpoint}articles/search?searchText=${we}`).toPromise().then(We=>{const gt=We;return gt.forEach((Ft,pn)=>{gt[pn]=this.cache(Ft)}),gt}),this.getExitRates=we=>this.http.get(`${this.apiEndpoint}articles/${we}/exitrates`).toPromise().then(We=>We),this.getReport=we=>this.http.get(`${this.apiEndpoint}articles/${we}/report`).toPromise().then(We=>We),this.getLatestReport=we=>this.http.get(`${this.apiEndpoint}articles/${we}/report/latest`,{params:{},headers:{},ignoreLoadingBar:!0}).toPromise().then(gt=>gt),this.getElasticReport=we=>this.http.get(`${this.apiEndpoint}articles/${we}/elastic`).toPromise().then(We=>We),this.getChapterReport=(we,We,gt,Ft)=>{const pn=`${this.apiEndpoint}articles/chapterreport?chapterId=${we}&articleId=${We.id}&start=${new Date(gt).getTime()}&end=${new Date(Ft).getTime()}`;return this.http.get(pn).toPromise().then(fi=>fi)},this.getArticleEdit=we=>this.http.get(`${this.apiEndpoint}articles/${we}/edit`).toPromise().then(We=>We),this.updateArticle=we=>this.http.put(`${this.apiEndpoint}articles`,we).toPromise().then(We=>We),this.publishArticleRequest=we=>this.http.put(`${this.apiEndpoint}articles/${we.id}/publishRequest`,{}).toPromise().then(We=>We),this.like=we=>this.http.put(`${this.apiEndpoint}articles/${we}/like`,{}).toPromise().then(We=>We),this.checkNotification=we=>this.http.get(`${this.apiEndpoint}articles/${we}/checknotification`).toPromise().then(We=>We),this.deleteScheduledPublish=we=>this.http.delete(`${this.apiEndpoint}articles/${we}/schedule`).toPromise().then(()=>{console.log(`Scheduled publish for article ${we} deleted.`)}),this.scope=this.scopeService.getScope(),this.apiEndpoint=this.scope.apiEndpoint}getPublicMethods(){return{createArticle:this.createArticle,getArticles:this.getArticles,getMainArticles:this.getMainArticles,getTranslatedArticles:this.getTranslatedArticles,getArticlesForEventCalendar:this.getArticlesForEventCalendar,getArticleIds:this.getArticleIds,getArticlesByAuthor:this.getArticlesByAuthor,getArticleDetails:this.getArticleDetails,getTranslatedArticleDetails:this.getTranslatedArticleDetails,getArticleFromCache:this.getArticleFromCache,getArticleEdit:this.getArticleEdit,updateArticle:this.updateArticle,publishArticle:this.publishArticle,publishArticleRequest:this.publishArticleRequest,like:this.like,getRecommendedArticles:this.getRecommendedArticles,getSearch:this.getSearch,getExitRates:this.getExitRates,getReport:this.getReport,getLatestReport:this.getLatestReport,deleteArticle:this.deleteArticle,checkNotification:this.checkNotification,getArticlesByIds:this.getArticlesByIds,getChapterReport:this.getChapterReport,getElasticReport:this.getElasticReport,deleteScheduledPublish:this.deleteScheduledPublish,getContentConnectNetworks:this.getContentConnectNetworks,getEventContentConnectNetworks:this.getEventContentConnectNetworks}}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(Co.p),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),ra=(()=>{class v{constructor(l,O){this.http=l,this.scopeService=O,this.snipCache={},this.listCache={swapCache:[]},this.snipsSubject=new jn.t([]),this.snips$=this.snipsSubject.asObservable(),this.snipProject=F=>(F.id&&(F.assetsMedia=[],F.assetsFacts=[],F.assetsQuestions=[],F.assetsComments=[],F.assetReferences.forEach(se=>{if(null!==se.assetImage||null!==se.assetText&&[5,6,7,10,13].includes(se.assetText.type))F.assetsMedia.push(se);else if(null!==se.assetText)switch(se.assetText.type){case 8:F.assetsFacts.push(se);break;case 9:F.assetsQuestions.push(se);break;case 0:F.assetsComments.push(se)}})),F),this.cache=(F,se)=>{if(!F.id)return F;F.assetsMedia=[],F.assetsFacts=[],F.assetsQuestions=[],F.assetsComments=[],F.assetReferences.forEach(We=>{if(null!==We.assetImage||null!==We.assetText&&[5,6,7,10,13].includes(We.assetText.type))F.assetsMedia.push(We);else if(null!==We.assetText)switch(We.assetText.type){case 8:F.assetsFacts.push(We);break;case 9:F.assetsQuestions.push(We);break;case 0:F.assetsComments.push(We)}});const we=F.id+(se||"");return this.snipCache[we]?(Object.assign(this.snipCache[we],F),this.snipCache[we]):(this.snipCache[we]=F,F)},this.getSnips=()=>{const F=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,se=this.scope.profile,we=this.scope.network.settings.languagePack.split("-")[0];return F&&se.activeUserLanguage?.vendorLanguageCode&&we!==se.activeUserLanguage.vendorLanguageCode?this.listCache["snips-"+se.activeUserLanguage.vendorLanguageCode]?(this.listCache.swapCache=this.listCache["snips-"+se.activeUserLanguage.vendorLanguageCode],Promise.resolve(this.listCache.swapCache)):this.getTranslatedSnipList(se.activeUserLanguage.vendorLanguageCode).then(We=>(this.snipCache.snips=We,this.listCache["snips-"+se.activeUserLanguage.vendorLanguageCode]=We,We.forEach(gt=>this.cache(gt)),this.listCache.swapCache=this.listCache["snips-"+se.activeUserLanguage.vendorLanguageCode],this.listCache.swapCache)):this.snipCache.snips?Promise.resolve(this.listCache.swapCache):this.http.get(`${this.scope.apiEndpoint}snips`).toPromise().then(We=>{const gt=We;return this.snipCache.snips=gt,this.listCache.swapCache=JSON.parse(JSON.stringify(gt)),this.listCache.swapCache.forEach(Ft=>{this.snipProject(Ft)}),gt.forEach((Ft,pn)=>{gt[pn]=this.cache(Ft)}),this.listCache.swapCache})},this.getTranslatedSnipList=F=>F?new Promise((se,we)=>{if(this.listCache["snips-"+F])return this.listCache.swapCache=this.listCache["snips-"+F],this.snipsSubject.next(this.listCache.swapCache),void se(this.listCache.swapCache);this.http.post(`${this.scope.apiEndpoint}snips/translate/${F}`,{}).toPromise().then(We=>{this.listCache["snips-"+F]=JSON.parse(JSON.stringify(We)),this.listCache.swapCache=this.listCache["snips-"+F],this.listCache.swapCache.forEach(gt=>{this.snipProject(gt)}),this.snipCache.snips=We,this.snipsSubject.next(this.listCache.swapCache),se(this.listCache.swapCache)}).catch(We=>{we(We)})}):this.getSnips(),this.getTranslatedSnipDetails=(F,se)=>new Promise((we,We)=>{this.http.post(`${this.scope.apiEndpoint}snips/${F}/translate/${se}`,{}).toPromise().then(gt=>{we(gt)}).catch(()=>{We()})}),this.getSnipDetailsFromCache=F=>new Promise((se,we)=>{this.snipCache[F]?se(this.snipCache[F]):we()}),this.cachedSnipsForEventCalendar=[],this.getSnipsForEventCalendar=()=>new Promise((F,se)=>{0===this.cachedSnipsForEventCalendar.length?this.http.get(`${this.scope.apiEndpoint}snips/events`).toPromise().then(we=>{this.cachedSnipsForEventCalendar=we,F(this.cachedSnipsForEventCalendar)}).catch(()=>se()):F(this.cachedSnipsForEventCalendar)}),this.getSnipDetails=F=>new Promise((se,we)=>{this.http.get(`${this.scope.apiEndpoint}snips/${F}`).toPromise().then(We=>{se(this.cache(We))}).catch(()=>we())}),this.createSnip=F=>new Promise((se,we)=>{this.http.post(`${this.scope.apiEndpoint}snips`,F).toPromise().then(We=>{const gt=this.cache(We);if(-1===this.snipsSubject.value.findIndex(pn=>pn.id===gt.id)){const pn=[gt,...this.snipsSubject.value];this.snipsSubject.next(pn)}se(gt)}).catch(()=>we())}),this.like=F=>new Promise((se,we)=>{this.http.put(`${this.scope.apiEndpoint}snips/${F}/like`,{}).toPromise().then(We=>{se(We)}).catch(()=>we())}),this.deleteSnip=F=>new Promise((se,we)=>{this.http.delete(`${this.scope.apiEndpoint}snips/${F}`).toPromise().then(We=>{se(We)}).catch(()=>we())}),this.getSnipReport=F=>new Promise((se,we)=>{this.http.post(`${this.scope.apiEndpoint}snips/report`,F).toPromise().then(We=>{se(We)}).catch(()=>we())}),this.getRecommendedSnips=F=>new Promise((se,we)=>{this.http.get(`${this.scope.apiEndpoint}snips/${F}/recommended`).toPromise().then(We=>{let gt=We;if(this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled){const pn=this.scope.profile,fi=this.scope.network.settings.languagePack.split("-")[0];if(pn.activeUserLanguage?.vendorLanguageCode&&fi!==pn.activeUserLanguage.vendorLanguageCode){const _o=gt.map(Po=>this.snipCache[Po.id+pn.activeUserLanguage.vendorLanguageCode]||Po);return void se(_o)}}gt.forEach((pn,fi)=>{gt[fi]=this.cache(pn)}),se(gt)}).catch(()=>we())}),this.getReport=F=>new Promise((se,we)=>{this.http.get(`${this.scope.apiEndpoint}snips/${F}/report`).toPromise().then(We=>{se(We.data)}).catch(()=>we())}),this.getLatestReport=F=>new Promise((se,we)=>{const We={params:{},headers:{},ignoreLoadingBar:!0};this.http.get(`${this.scope.apiEndpoint}snips/${F}/report/latest`,We).toPromise(),this.http.get(`${this.scope.apiEndpoint}snips/${F}/report/latest`,We).toPromise().then(gt=>{se(gt.data)}).catch(()=>we())}),this.deleteSnipAssets=F=>{},this.deleteSnipAsyncFromDatabase=F=>new Promise((se,we)=>{this.http.get(`${this.scope.apiEndpoint}snips/${F}/deleteSnipAsyncFromDatabase`).toPromise().then(We=>{se(We.data)}).catch(()=>we())}),this.scope=this.scopeService.getScope(),this.loadSnips()}loadSnips(){this.getSnips().then(l=>{this.snipsSubject.next(l)})}updateSnipText(l,O){var F=this;return(0,$e.A)(function*(){const se=encodeURIComponent(O),we=`${F.scope.apiEndpoint}snips/${l}/updateSnipText?text=${se}`;try{const We=yield F.http.get(we).toPromise();if(We){const gt=F.cache(We),Ft=F.snipsSubject.value,pn=Ft.findIndex(fi=>fi.id===l);if(-1!==pn){const fi=[...Ft];fi[pn]=gt,F.snipsSubject.next(fi)}else F.snipsSubject.next([gt,...Ft]);return gt}throw new Error("updateSnipText: Keine Daten vom Server erhalten")}catch(We){throw console.error("updateSnipText: Fehler beim Aktualisieren des Snip-Texts:",We),We}})()}setThumbnail(l,O){var F=this;return(0,$e.A)(function*(){const se=encodeURIComponent(O),we=`${F.scope.apiEndpoint}snips/${l}/updateThumbnail?assetImageGuid=${se}`;yield F.http.get(we).toPromise()})()}getPublicMethods(){return{getSnips:this.getSnips,getTranslatedSnipList:this.getTranslatedSnipList,getSnipReport:this.getSnipReport,getSnipsForEventCalendar:this.getSnipsForEventCalendar,getSnipDetails:this.getSnipDetails,getTranslatedSnipDetails:this.getTranslatedSnipDetails,getSnipDetailsFromCache:this.getSnipDetailsFromCache,createSnip:this.createSnip,like:this.like,deleteSnip:this.deleteSnip,getRecommendedSnips:this.getRecommendedSnips,getReport:this.getReport,getLatestReport:this.getLatestReport}}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var Td=M(353),Zl=M(7473),cc=M(1356);function Yp(v,p){if(1&v&&(o.j41(0,"div",30)(1,"a",8),o.nrm(2,"app-associated-material",37),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function qa(v,p){if(1&v&&(o.j41(0,"div",24)(1,"a",8),o.nrm(2,"app-associated-material",37),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function Ql(v,p){if(1&v&&(o.j41(0,"div")(1,"a",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7)(7,"a",8)(8,"div",9),o.EFF(9),o.k0s()()(),o.j41(10,"div",10)(11,"div",11),o.nrm(12,"app-oha",12),o.k0s()()(),o.j41(13,"div",13)(14,"div",14)(15,"a",8)(16,"h4"),o.EFF(17),o.k0s()()()()(),o.j41(18,"div",15)(19,"a",16),o.nrm(20,"img",17),o.k0s()(),o.j41(21,"div",18)(22,"div",19)(23,"div",20)(24,"div",21)(25,"div",6)(26,"div",22)(27,"div",23),o.EFF(28),o.k0s()(),o.j41(29,"div",24)(30,"div",25),o.nrm(31,"app-oha",12),o.k0s()()(),o.j41(32,"div",13)(33,"div",26)(34,"a",8)(35,"h4"),o.EFF(36),o.k0s()()()(),o.j41(37,"div",13)(38,"div",27)(39,"a",8),o.nrm(40,"div",28),o.nI1(41,"apicodoTranslateText"),o.nI1(42,"async"),o.k0s()()(),o.j41(43,"div",29),o.DNE(44,Yp,3,4,"div",30),o.j41(45,"div",31),o.nrm(46,"app-article-categories",32),o.k0s()()()(),o.j41(47,"div",33)(48,"div",34)(49,"div",27)(50,"a",8),o.nrm(51,"div",35),o.nI1(52,"apicodoTranslateText"),o.nI1(53,"async"),o.k0s()(),o.j41(54,"div",36),o.DNE(55,qa,3,4,"div",24),o.j41(56,"div",22),o.nrm(57,"app-article-categories",32),o.k0s()()()()()()()()()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(6),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(2),o.SpI(" ",l.data.heading," "),o.R7$(3),o.Y8G("article",l.data)("source","ArticleDisplayable"),o.R7$(3),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(2),o.JRh(l.data.text),o.R7$(2),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.FS9("src",l.imagePath,o.B4B),o.R7$(8),o.SpI(" ",l.data.heading," "),o.R7$(3),o.Y8G("article",l.data)("source","ArticleDisplayable"),o.R7$(3),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(2),o.JRh(l.data.text),o.R7$(3),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("innerHTML",o.bMT(42,31,o.bMT(41,29,l.data.teaser)),o.npT),o.R7$(4),o.vxM(l.data.commentCount>0?44:-1),o.R7$(2),o.Y8G("article",l.data),o.R7$(4),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("innerHTML",o.bMT(53,35,o.bMT(52,33,l.data.teaser)),o.npT),o.R7$(4),o.vxM(l.data.commentCount>0?55:-1),o.R7$(2),o.Y8G("article",l.data)}}function oh(v,p){if(1&v&&(o.j41(0,"div",24)(1,"a",8),o.nrm(2,"app-associated-material",37),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function Is(v,p){if(1&v&&(o.j41(0,"div")(1,"div",3)(2,"div",4)(3,"div",15)(4,"a",8)(5,"div",38)(6,"div",39)(7,"h4",40),o.EFF(8),o.k0s()()()()(),o.j41(9,"div",15)(10,"div",41)(11,"div",34)(12,"div",42)(13,"a",8),o.EFF(14),o.k0s()()(),o.j41(15,"div",34)(16,"div",27)(17,"a",8),o.nrm(18,"div",35),o.nI1(19,"apicodoTranslateText"),o.nI1(20,"async"),o.k0s()()(),o.j41(21,"div",34),o.DNE(22,oh,3,4,"div",24),o.j41(23,"div",43),o.nrm(24,"app-article-categories",32),o.k0s(),o.j41(25,"div",44),o.nrm(26,"app-oha",12),o.k0s()()()()()()()),2&v){const l=o.XpG();o.R7$(4),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(4),o.JRh(l.data.text),o.R7$(5),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.SpI(" ",l.data.heading," "),o.R7$(3),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("innerHTML",o.bMT(20,15,o.bMT(19,13,l.data.teaser)),o.npT),o.R7$(4),o.vxM(l.data.commentCount>0?22:-1),o.R7$(2),o.Y8G("article",l.data),o.R7$(2),o.Y8G("article",l.data)("source","ArticleDisplayable")}}let rp=(()=>{class v{constructor(l,O){this.deviceService=l,this.scopeService=O,this.imagePath="",this.scope=O.getScope()}ngOnInit(){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceService.getUserAgentInfo().isMobile?"-sm":"";this.data.coverImageGuid&&(this.imagePath=`${this.data.coverAssetReference.assetImage.assetImageUrl}?preset=cover${l}${O}-4x3&cache=${this.data.coverAssetReference.assetImage.cache}`),this.data.articleExternalLink?(this.articlePath=this.data.articleExternalLink,this.linkTarget="_blank"):(this.articlePath=`${this.scope.currentScope.chapter.path}${this.data.path}/${this.data.variantId}`,this.linkTarget="")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(s.E),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-lead-article-image-left"]],inputs:{data:"data"},decls:3,vars:3,consts:[["ngxOculusArticleImpressionComponent","",1,"lead-article",3,"ngxArticleData"],[4,"ngIf"],[1,"displayable-anchor-text",3,"href","target"],[1,"container","p-0","displayable-wrapper",2,"min-width","100%","height","100%"],[1,"row","g-0"],[1,"mobile-only"],[1,"displayable-flexible-text-row","row"],[1,"col-10","d-flex","align-items-end"],[3,"href","target"],[1,"displayable-heading-wrapper","mb-1"],[1,"col-2","float-end"],[1,""],[1,"float-end",3,"article","source"],[1,"row","displayable-flexible-text-row"],[1,"col-12","displayable-text-wrapper"],[1,"col-12","col-md-6"],[1,"displayable-image-wrapper",3,"href","target"],[3,"src"],[1,"col-12","col-md-6","align-text-image-containers"],[1,"displayable-flexible-text-column"],[1,"card-body","displayable-content-wrapper"],[1,"desktop-only","ml-4"],[1,"col-10"],[1,"displayable-heading-wrapper","mb-3"],[1,"col-2"],[1,"oha-wrapper"],[1,"col-12","displayable-text-wrapper","mb-1"],[1,"col-12"],[1,"displayable-summary-wrapper","mb-1",3,"innerHTML"],[1,"row","displayable-flexible-text-row","align-bottom"],[1,"col-2","col-md-2"],[1,"col-9","col-md-9","article-categories-wrapper"],[3,"article"],[1,"mobile-only","mt-1"],[1,"row"],[1,"displayable-summary-wrapper","mb-3",3,"innerHTML"],[1,"row","mt-1"],[3,"assetReferences","commentCount"],[1,"displayable-content-wrapper"],[1,"displayable-fallback-text-wrapper","mb-3"],[1,"drop-cap-heading"],[1,"card-body"],[1,"col-12","displayable-heading-wrapper","mb-3"],[1,"col-7"],[1,"fallback-oha-wrapper"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Ql,58,37,"div",1)(2,Is,27,17,"div",1),o.k0s()),2&O&&(o.Y8G("ngxArticleData",F.data),o.R7$(),o.Y8G("ngIf",F.imagePath),o.R7$(),o.Y8G("ngIf",!F.imagePath))},dependencies:[a.bT,zp,uo,op,Pi,a.Jj,vr],styles:[".displayable-flexible-text-column[_ngcontent-%COMP%]{display:contents}.displayable-flexible-text-row[_ngcontent-%COMP%]{width:100%}.drop-cap-heading[_ngcontent-%COMP%]{position:relative;overflow:hidden}.drop-cap-heading[_ngcontent-%COMP%]:first-letter{float:left;font-size:6rem;line-height:1;margin-right:.1rem;margin-top:-.5rem}.mobile-only[_ngcontent-%COMP%]{display:none}.align-text-image-containers[_ngcontent-%COMP%]{position:relative}.align-bottom[_ngcontent-%COMP%]{position:absolute;bottom:0}.displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.displayable-content-wrapper[_ngcontent-%COMP%]{display:contents}.displayable-heading-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:1rem;text-transform:uppercase;margin-bottom:1rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:1rem;hyphens:auto}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-size:1.75rem;margin-top:0;font-weight:700;hyphens:auto}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]:first-letter{font-size:6.875rem;font-weight:900;float:left}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;height:100%}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-size:2.188rem;margin-top:0;font-weight:700}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontTertiary);-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;line-height:1.3;font-size:1.3rem;margin-bottom:1rem}.displayable-image-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.displayable-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%}.oha-wrapper[_ngcontent-%COMP%]{height:1.813rem;margin-left:2rem}.fallback-oha-wrapper[_ngcontent-%COMP%]{transform:translateY(-60%);height:2.813rem}[_nghost-%COMP%]     .lead-article button.oha{width:4.2rem;height:4.2rem}.article-categories-wrapper[_ngcontent-%COMP%]{font-size:.75rem;line-height:1}.card[_ngcontent-%COMP%]{border:none}.displayable-anchor-text[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}@media (max-width: 768px){.displayable-flexible-text-column[_ngcontent-%COMP%]{width:50%;flex:0 0 auto;display:unset}.displayable-flexible-text-row[_ngcontent-%COMP%]{width:unset}.displayable-image-wrapper[_ngcontent-%COMP%]{width:50%}.desktop-only[_ngcontent-%COMP%]{display:none}.mobile-only[_ngcontent-%COMP%]{display:block;padding-left:1rem;padding-right:1rem}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:none;-webkit-box-orient:unset;display:unset;text-overflow:unset;overflow:unset;font-size:1rem;margin-bottom:0rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:none;-webkit-box-orient:unset;display:unset;text-overflow:unset;overflow:unset;margin-bottom:0rem;hyphens:auto}}"]})}}return v})();function sv(v,p){if(1&v&&(o.j41(0,"div",20),o.nrm(1,"app-associated-material",36),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function sp(v,p){if(1&v&&(o.j41(0,"div",12)(1,"a",25),o.nrm(2,"app-associated-material",36),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function Ol(v,p){if(1&v&&(o.j41(0,"div")(1,"a",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7)(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11),o.EFF(11),o.k0s()(),o.j41(12,"div",12)(13,"div",13),o.nrm(14,"app-oha",14),o.k0s()()(),o.j41(15,"div",15)(16,"div",16)(17,"h4"),o.EFF(18),o.k0s()()(),o.j41(19,"div",15)(20,"div",17),o.nrm(21,"div",18),o.nI1(22,"apicodoTranslateText"),o.nI1(23,"async"),o.k0s()(),o.j41(24,"div",19),o.DNE(25,sv,2,2,"div",20),o.j41(26,"div",21),o.nrm(27,"app-article-categories",22),o.k0s()()(),o.j41(28,"div",23)(29,"div",9)(30,"div",24)(31,"a",25)(32,"div",26),o.EFF(33),o.k0s()()(),o.j41(34,"div",27)(35,"div",28),o.nrm(36,"app-oha",14),o.k0s()()(),o.j41(37,"div",15)(38,"div",29)(39,"a",25)(40,"h4"),o.EFF(41),o.k0s()()()()()()()(),o.j41(42,"div",30)(43,"a",31),o.nrm(44,"img",32),o.k0s()(),o.j41(45,"div",33)(46,"div",34)(47,"div",17)(48,"a",25),o.nrm(49,"div",18),o.nI1(50,"apicodoTranslateText"),o.nI1(51,"async"),o.k0s()(),o.j41(52,"div",35),o.DNE(53,sp,3,4,"div",12),o.j41(54,"div",10),o.nrm(55,"app-article-categories",22),o.k0s()()()()()()()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(10),o.SpI(" ",l.data.heading," "),o.R7$(3),o.Y8G("article",l.data)("source","ArticleDisplayable"),o.R7$(4),o.JRh(l.data.text),o.R7$(3),o.Y8G("innerHTML",o.bMT(23,27,o.bMT(22,25,l.data.teaser)),o.npT),o.R7$(4),o.vxM(l.data.commentCount>0?25:-1),o.R7$(2),o.Y8G("article",l.data),o.R7$(4),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(2),o.SpI(" ",l.data.heading," "),o.R7$(3),o.Y8G("article",l.data)("source","ArticleDisplayable"),o.R7$(3),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(2),o.JRh(l.data.text),o.R7$(2),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.FS9("src",l.imagePath,o.B4B),o.R7$(4),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("innerHTML",o.bMT(51,31,o.bMT(50,29,l.data.teaser)),o.npT),o.R7$(4),o.vxM(l.data.commentCount>0?53:-1),o.R7$(2),o.Y8G("article",l.data)}}function ap(v,p){if(1&v&&(o.j41(0,"div",12)(1,"a",25),o.nrm(2,"app-associated-material",36),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function rh(v,p){if(1&v&&(o.j41(0,"div")(1,"div",3)(2,"div",4)(3,"div",30)(4,"a",25)(5,"div",37)(6,"div",38)(7,"h4",39),o.EFF(8),o.k0s()()()()(),o.j41(9,"div",30)(10,"div",40)(11,"div",34)(12,"div",41)(13,"a",25),o.EFF(14),o.k0s()()(),o.j41(15,"div",34)(16,"div",17)(17,"a",25),o.nrm(18,"div",18),o.nI1(19,"apicodoTranslateText"),o.nI1(20,"async"),o.k0s()()(),o.j41(21,"div",34),o.DNE(22,ap,3,4,"div",12),o.j41(23,"div",42),o.nrm(24,"app-article-categories",22),o.k0s(),o.j41(25,"div",43),o.nrm(26,"app-oha",14),o.k0s()()()()()()()),2&v){const l=o.XpG();o.R7$(4),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(4),o.JRh(l.data.text),o.R7$(5),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.SpI(" ",l.data.heading," "),o.R7$(3),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("innerHTML",o.bMT(20,15,o.bMT(19,13,l.data.teaser)),o.npT),o.R7$(4),o.vxM(l.data.commentCount>0?22:-1),o.R7$(2),o.Y8G("article",l.data),o.R7$(2),o.Y8G("article",l.data)("source","ArticleDisplayable")}}let sh=(()=>{class v{constructor(l,O){this.deviceService=l,this.scopeService=O,this.imagePath="",this.scope=O.getScope()}ngOnInit(){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceService.getUserAgentInfo().isMobile?"-sm":"";this.data.coverImageGuid&&(this.imagePath=`${this.data.coverAssetReference.assetImage.assetImageUrl}?preset=cover${l}${O}-4x3&cache=${this.data.coverAssetReference.assetImage.cache}`),this.data.articleExternalLink?(this.articlePath=this.data.articleExternalLink,this.linkTarget="_blank"):(this.articlePath=`${this.scope.currentScope.chapter.path}${this.data.path}/${this.data.variantId}`,this.linkTarget="")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(s.E),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-lead-article-image-right"]],inputs:{data:"data"},decls:3,vars:3,consts:[["ngxOculusArticleImpressionComponent","",1,"lead-article",3,"ngxArticleData"],[4,"ngIf"],[1,"displayable-anchor-text",3,"href","target"],[1,"container","p-0","displayable-wrapper",2,"min-width","100%","height","100%"],[1,"row","g-0"],[1,"col-12","col-md-6","align-text-image-containers"],[1,"displayable-flexible-text-column"],[1,"card-body","displayable-content-wrapper"],[1,"desktop-only"],[1,"displayable-flexible-text-row","row"],[1,"col-10"],[1,"displayable-heading-wrapper","mb-3"],[1,"col-2"],[1,"oha-wrapper"],[1,"float-end",3,"article","source"],[1,"row","displayable-flexible-text-row"],[1,"col-12","displayable-text-wrapper","mb-1"],[1,"col-12"],[1,"displayable-summary-wrapper","mb-3",3,"innerHTML"],[1,"row","displayable-flexible-text-row","align-bottom"],[1,"col-2","col-md-2"],[1,"col-9","col-md-9","article-categories-wrapper"],[3,"article"],[1,"mobile-only"],[1,"col-10","d-flex","align-items-end"],[3,"href","target"],[1,"displayable-heading-wrapper","mb-1"],[1,"col-2","float-end"],[1,""],[1,"col-12","displayable-text-wrapper"],[1,"col-12","col-md-6"],[1,"displayable-image-wrapper",3,"href","target"],[3,"src"],[1,"mobile-only","mt-1"],[1,"row"],[1,"row","mt-1"],[3,"assetReferences","commentCount"],[1,"displayable-content-wrapper"],[1,"displayable-fallback-text-wrapper","mb-3"],[1,"drop-cap-heading"],[1,"card-body"],[1,"col-12","displayable-heading-wrapper","mb-3"],[1,"col-7"],[1,"fallback-oha-wrapper"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Ol,56,33,"div",1)(2,rh,27,17,"div",1),o.k0s()),2&O&&(o.Y8G("ngxArticleData",F.data),o.R7$(),o.Y8G("ngIf",F.imagePath),o.R7$(),o.Y8G("ngIf",!F.imagePath))},dependencies:[a.bT,zp,uo,op,Pi,a.Jj,vr],styles:[".displayable-flexible-text-column[_ngcontent-%COMP%]{display:contents}.displayable-flexible-text-row[_ngcontent-%COMP%]{width:100%}.drop-cap-heading[_ngcontent-%COMP%]{position:relative;overflow:hidden}.drop-cap-heading[_ngcontent-%COMP%]:first-letter{float:left;font-size:6rem;line-height:1;margin-right:.1rem;margin-top:-.5rem}.align-text-image-containers[_ngcontent-%COMP%]{position:relative}.align-bottom[_ngcontent-%COMP%]{position:absolute;bottom:0}[_nghost-%COMP%]     .lead-article button.oha{width:4.2rem;height:4.2rem}.mobile-only[_ngcontent-%COMP%]{display:none}.displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.displayable-content-wrapper[_ngcontent-%COMP%]{display:contents}.displayable-heading-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:1rem;text-transform:uppercase;margin-bottom:1rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:1rem}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-size:1.75rem;margin-top:0;font-weight:700;hyphens:auto}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]:first-letter{font-size:6.875rem;font-weight:900;float:left}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;height:100%}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-size:2.188rem;margin-top:0;font-weight:700}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontTertiary);-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:1.2rem;line-height:1.3;margin-bottom:1rem}.displayable-image-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.displayable-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%}.oha-wrapper[_ngcontent-%COMP%]{height:1rem;margin-left:2rem}.fallback-oha-wrapper[_ngcontent-%COMP%]{transform:translateY(-100%);height:2.813rem}.article-categories-wrapper[_ngcontent-%COMP%]{font-size:.75rem;line-height:1}.card[_ngcontent-%COMP%]{border:none}.displayable-anchor-text[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none;z-index:-1}@media (max-width: 768px){.displayable-flexible-text-column[_ngcontent-%COMP%]{width:50%;flex:0 0 auto;display:unset}.displayable-flexible-text-row[_ngcontent-%COMP%]{width:unset}.displayable-image-wrapper[_ngcontent-%COMP%]{width:50%}.desktop-only[_ngcontent-%COMP%]{display:none}.mobile-only[_ngcontent-%COMP%]{display:block;padding-left:1rem;padding-right:1rem}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:none;-webkit-box-orient:unset;display:unset;text-overflow:unset;overflow:unset;font-size:1rem;margin-bottom:0rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:none;-webkit-box-orient:unset;display:unset;text-overflow:unset;overflow:unset;margin-bottom:0rem;hyphens:auto}}"]})}}return v})();function lp(v,p){if(1&v&&(o.j41(0,"div",12),o.nrm(1,"app-associated-material",15),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}let Gf=(()=>{class v{constructor(l,O){this.deviceService=l,this.scopeService=O,this.scope=O.getScope()}ngOnInit(){this.data.articleExternalLink?(this.articlePath=this.data.articleExternalLink,this.linkTarget="_blank"):(this.articlePath=`${this.scope.currentScope.chapter.path}${this.data.path}/${this.data.variantId}`,this.linkTarget=""),this.data.modifiedText="&"==this.data.text.slice(0,1)?"<span>"+this.data.text.slice(0,this.data.text.indexOf(";")+1)+"</span>"+this.data.text.slice(this.data.text.indexOf(";")+1,this.data.text.length):"<span>"+this.data.text.slice(0,1)+"</span>"+this.data.text.slice(1,this.data.text.length)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(s.E),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-article-without-image"]],inputs:{data:"data"},decls:18,vars:9,consts:[[1,"article-without-image"],[1,"displayable-anchor-text",3,"href","target"],["ngxOculusArticleImpressionComponent","",1,"container","p-0","displayable-wrapper",3,"ngxArticleData"],[1,"mb-3"],[1,"g-0"],[1,"card-body","displayable-content-wrapper","p-0"],[1,"row"],[1,"displayable-heading-wrapper","col-12"],[1,"col-10","displayable-text-wrapper"],[1,"drop-cap-heading",3,"innerHtml"],[1,"col-2","oha-wrapper"],[1,"float-end",3,"article","source"],[1,"col-2"],[1,"col-10","article-categories-wrapper"],[3,"article"],[3,"assetReferences","commentCount"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"a",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7),o.EFF(8),o.k0s()(),o.j41(9,"div",6)(10,"div",8),o.nrm(11,"h4",9),o.k0s(),o.j41(12,"div",10),o.nrm(13,"app-oha",11),o.k0s()(),o.j41(14,"div",6),o.DNE(15,lp,2,2,"div",12),o.j41(16,"div",13),o.nrm(17,"app-article-categories",14),o.k0s()()()()()()()()),2&O&&(o.R7$(),o.Y8G("href",F.articlePath,o.B4B)("target",F.linkTarget),o.R7$(),o.Y8G("ngxArticleData",F.data),o.R7$(6),o.SpI(" ",F.data.heading," "),o.R7$(3),o.Y8G("innerHtml",F.data.modifiedText,o.npT),o.R7$(2),o.Y8G("article",F.data)("source","ArticleDisplayable"),o.R7$(2),o.vxM(F.data.commentCount>0?15:-1),o.R7$(2),o.Y8G("article",F.data))},dependencies:[zp,uo,op,Pi],styles:[".displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.displayable-content-wrapper[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%]     .drop-cap-heading{position:relative;overflow:hidden}[_nghost-%COMP%]     .drop-cap-heading span{display:block;float:left;font-size:6.5rem;line-height:1;margin-right:.8rem;margin-top:-2rem;padding-top:1rem}.displayable-heading-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:.875rem;text-transform:uppercase;margin-bottom:.5rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:0rem;height:100%;hyphens:auto}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:1.75rem;margin-top:0;font-weight:700;font-family:var(--fontSecondary)}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:1.2rem;line-height:1.3;margin-bottom:.5rem}.oha-wrapper[_ngcontent-%COMP%]{height:2.813rem;padding-right:6px}[_nghost-%COMP%]     .article-without-image button.oha{width:4.2rem;height:4.2rem}.article-categories-wrapper[_ngcontent-%COMP%]{font-size:.75rem;line-height:1}.card[_ngcontent-%COMP%]{border:none}.displayable-anchor-text[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}"]})}}return v})();function cp(v,p){if(1&v&&(o.j41(0,"div",17),o.nrm(1,"app-associated-material",20),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("commentCount",l.data.commentCount)}}function ou(v,p){if(1&v&&(o.j41(0,"div",3)(1,"a",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"div",8)(6,"div",9),o.nrm(7,"img",10),o.k0s()(),o.j41(8,"div",11)(9,"div",8)(10,"div",12),o.EFF(11),o.k0s()(),o.j41(12,"div",8)(13,"div",13)(14,"div",14)(15,"h4"),o.EFF(16),o.k0s()()(),o.j41(17,"div",15),o.nrm(18,"app-oha",16),o.k0s()(),o.j41(19,"div",8),o.DNE(20,cp,2,2,"div",17),o.j41(21,"div",18),o.nrm(22,"app-article-categories",19),o.k0s()()()()()()()()),2&v){const l=o.XpG();o.Y8G("ngxArticleData",l.data),o.R7$(),o.Y8G("href",l.articlePath,o.B4B)("target",l.linkTarget),o.R7$(6),o.Y8G("src",l.imagePath,o.B4B),o.R7$(4),o.SpI(" ",l.data.heading," "),o.R7$(5),o.JRh(l.data.text),o.R7$(2),o.Y8G("article",l.data)("source","ArticleDisplayable"),o.R7$(2),o.vxM(l.data.commentCount>0?20:-1),o.R7$(2),o.Y8G("article",l.data)}}function Ha(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-displayable-article-without-image",21),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("data",l.data)}}let ss=(()=>{class v{constructor(l,O){this.deviceService=l,this.scopeService=O,this.imagePath="",this.scope=O.getScope()}ngOnInit(){if(this.data.coverImageGuid){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceService.getUserAgentInfo().isMobile?"-sm":"";this.data.coverImageGuid&&(this.imagePath=this.data.coverAssetReference?`${this.data.coverAssetReference.assetImage.assetImageUrl}?preset=cover${l}${O}-4x3&cache=${this.data.coverAssetReference.assetImage.cache}`:this.scope.globalSettings.blobStorageCdnUrl+"/images/"+this.data.coverImageGuid+`?preset = cover${l}${O}-4x3&cache=${this.data.coverImageCache}`)}this.data.articleExternalLink?(this.articlePath=this.data.articleExternalLink,this.linkTarget="_blank"):(this.articlePath=`${this.scope.currentScope.chapter.path}${this.data.path}/${this.data.variantId}`,this.linkTarget="")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(s.E),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-article-with-image"]],inputs:{data:"data"},decls:3,vars:2,consts:[[1,"article-with-image"],["ngxOculusArticleImpressionComponent","",3,"ngxArticleData",4,"ngIf"],[4,"ngIf"],["ngxOculusArticleImpressionComponent","",3,"ngxArticleData"],[1,"displayable-anchor-text",3,"href","target"],[1,"container","p-0","displayable-wrapper"],[1,"mb-3"],[1,"g-0"],[1,"row"],[1,"displayable-image-wrapper","col-12"],["alt","Cover Image",3,"src"],[1,"card-body","displayable-content-wrapper","p-0"],[1,"displayable-heading-wrapper","col-12"],[1,"col-10"],[1,"displayable-text-wrapper"],[1,"col-2","oha-wrapper"],[1,"float-end",3,"article","source"],[1,"col-2"],[1,"col-10","article-categories-wrapper"],[3,"article"],[3,"assetReferences","commentCount"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,ou,23,10,"div",1)(2,Ha,2,1,"div",2),o.k0s()),2&O&&(o.R7$(),o.Y8G("ngIf",F.imagePath),o.R7$(),o.Y8G("ngIf",!F.imagePath))},dependencies:[a.bT,zp,uo,op,Pi,Gf],styles:[".article-categories-wrapper[_ngcontent-%COMP%]{font-size:.75rem}.displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.displayable-content-wrapper[_ngcontent-%COMP%]{position:relative}.displayable-heading-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:.875rem;text-transform:uppercase;margin-bottom:.5rem;color:var(--textColor)}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:.5rem;hyphens:auto}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:1.25rem;margin-top:0;font-family:var(--fontSecondary);font-weight:700}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:1.2rem;line-height:1.3;margin-bottom:1rem}.displayable-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%;margin-bottom:.5rem}[_nghost-%COMP%]     .article-with-image button.oha{width:4.2rem;height:4.2rem}.article-categories-wrapper[_ngcontent-%COMP%]{font-size:.75rem;line-height:1}.card[_ngcontent-%COMP%]{border:none}.displayable-anchor-text[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}"]})}}return v})();function dp(v,p){if(1&v){const l=o.RV6();o.j41(0,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG();o.Y8G("href",l.data.uri,o.B4B),o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function Zp(v,p){if(1&v){const l=o.RV6();o.j41(0,"a",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG();o.Y8G("href",l.data.uri,o.B4B),o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function ku(v,p){if(1&v){const l=o.RV6();o.j41(0,"a",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG();o.Y8G("href",l.data.uri,o.B4B),o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}function Wf(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",11),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.clickBanner())}),o.nrm(1,"img",9),o.k0s()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("src",l.imageUrl,o.B4B)}}let Lu=(()=>{class v{constructor(l,O,F,se,we,We){this.elementRef=l,this.clickService=O,this.injector=F,this.upgrade=se,this.scopeService=we,this.trackingService=We,this.imageUrl="",this.inSameChapter=!1,this.uriIsDocument=!1,this.scope=this.scopeService.getScope(),this.oculusTrackingService=We;const gt=this.upgrade.$injector;this.redirectService=gt.get("redirectService"),this.$state=gt.get("$state")}ngOnInit(){this.data&&(this.data.pin&&(this.imageUrl=this.scope.globalSettings.blobStorageCdnUrl+"/"+this.scope.globalSettings.blobStorageContainerNameShipment+"/"+this.data.pin+(this.data.mobile?"?preset=premium-shipment-xs":"?preset=premium-shipment")),this.data.uri&&(this.inSameChapter=this.redirectService.isSameChapterUrl(this.data.uri),this.uriIsDocument=-1!==this.data.uri.indexOf("/pdf/")||-1!==this.data.uri.indexOf("/document/")||-1!==this.data.uri.indexOf("/file/")),this.data.oculus=this.oculusTrackingService.trackSuperBanner(this.elementRef.nativeElement,{c:this.scope.currentScope.chapter.slug,n:this.scope.currentScope.network.slug,isu:this.data.superCampaignId,isub:this.data.superBannerId}),this.data.oculus.persistent=this.$state.includes("app.main-news"))}clickBanner(){this.data.oculus.click(),this.clickService.clickSuperPost(this.data.oculus.guid,this.data.pin)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(gc._),o.rXU(o.zZn),o.rXU(P.be),o.rXU(b.A),o.rXU(iu))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-superbanner"]],inputs:{data:"data"},decls:10,vars:5,consts:[[1,"shipmentSuper-wrapper"],[1,"shipmentSuper"],[1,"shipmentSuper-container"],[1,"shipmentSuper-title"],[1,"shipmentSuper-image-wrapper"],[3,"href","click",4,"ngIf"],["target","_blank",3,"href","click",4,"ngIf"],[3,"click",4,"ngIf"],[3,"click","href"],[1,"shipmentSuper-image",3,"src"],["target","_blank",3,"click","href"],[3,"click"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),o.EFF(4),o.k0s()(),o.j41(5,"div",4),o.DNE(6,dp,2,2,"a",5)(7,Zp,2,2,"a",6)(8,ku,2,2,"a",6)(9,Wf,2,1,"div",7),o.k0s()()()),2&O&&(o.R7$(4),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_shipment_super_title")),o.R7$(2),o.Y8G("ngIf",F.inSameChapter&&F.data.uri&&!F.uriIsDocument),o.R7$(),o.Y8G("ngIf",!F.inSameChapter&&F.data.uri&&!F.uriIsDocument),o.R7$(),o.Y8G("ngIf",F.uriIsDocument),o.R7$(),o.Y8G("ngIf",!F.data.uri))},dependencies:[a.bT],styles:[".shipmentSuper-wrapper[_ngcontent-%COMP%]{width:100%}.shipmentSuper-image-wrapper[_ngcontent-%COMP%]{padding-bottom:7px;position:relative}.shipmentSuper-image[_ngcontent-%COMP%]{width:100%;max-height:100%}.shipmentSuper[_ngcontent-%COMP%]{position:relative;max-width:1200px;margin:auto}.shipmentSuper-image[_ngcontent-%COMP%]{width:100%}.shipmentSuper-container[_ngcontent-%COMP%]{width:100%;border-bottom:2px solid var(--light-gray);margin-bottom:3px;text-align:right}.shipmentSuper-title[_ngcontent-%COMP%]{display:inline-block;vertical-align:bottom;font-family:var(--fontPrimary);font-size:.8em;padding:0 8px;background-color:var(--light-gray)}@media all and (max-width: 767px){.shipmentSuper-image[_ngcontent-%COMP%]{width:calc(100% + 16px);margin-left:-8px}}"]})}}return v})(),il=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.imagePath="",this.heading="",this.text="",this.referral="",this.scope=l.getScope()}ngOnInit(){this.data&&(this.data.articleListDisplayableType==fn.SponsoredArticle?(this.text=this.data.text,this.heading=this.data.heading,this.referral=`${this.scope.currentScope.chapter.path}${this.data.path}/${this.data.variantId}`):this.data.articleListDisplayableType==fn.Special&&(this.heading=this.data.listValues.heading,this.text=this.data.listValues.title,this.referral=this.scope.currentChapter.path+this.data.path))}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-shipment-without-image"]],inputs:{data:"data"},decls:16,vars:4,consts:[["ngxOculusSparticleImpression","",1,"container","p-0","displayable-wrapper",3,"ngxSparticleData"],[3,"href"],[1,"card","mb-3"],[1,"g-0"],[1,"card-body","displayable-content-wrapper","p-0"],[1,"row"],[1,"displayable-heading-wrapper","col-12"],[1,"col-10"],[1,"displayable-text-wrapper"],[1,"col-2"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"a",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),o.EFF(7),o.k0s()(),o.j41(8,"div",5)(9,"div",7)(10,"div",8)(11,"h4"),o.EFF(12),o.k0s()()()(),o.j41(13,"div",5),o.nrm(14,"div",9)(15,"div",7),o.k0s()()()()()()),2&O&&(o.Y8G("ngxSparticleData",F.data),o.R7$(),o.Y8G("href",F.referral,o.B4B),o.R7$(6),o.SpI(" ",F.heading," "),o.R7$(5),o.JRh(F.text))},dependencies:[th],styles:[".displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.displayable-content-wrapper[_ngcontent-%COMP%]{position:relative}.displayable-heading-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:.875rem;text-transform:uppercase;margin-bottom:3.125rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:3.125rem;height:100%;hyphens:auto}.displayable-text-wrapper[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:first-letter{font-size:5.938rem;font-weight:900;float:left}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:1.75rem;margin-top:0;font-weight:700;font-family:var(--fontSecondary)}.card[_ngcontent-%COMP%]{border:none}"]})}}return v})();function Wg(v,p){if(1&v&&(o.j41(0,"div",3)(1,"a",4)(2,"div")(3,"div",5)(4,"div",6)(5,"div",7),o.nrm(6,"img",8),o.k0s()(),o.j41(7,"div",9)(8,"div",6)(9,"div",10),o.EFF(10),o.k0s()(),o.j41(11,"div",6)(12,"div",11)(13,"div",12)(14,"h4"),o.EFF(15),o.k0s()()()(),o.j41(16,"div",6)(17,"div",13),o.EFF(18),o.k0s()()()()()()()),2&v){const l=o.XpG();o.Y8G("ngxSparticleData",l.data),o.R7$(),o.Y8G("href",l.referral,o.B4B),o.R7$(5),o.FS9("src",l.imagePath,o.B4B),o.R7$(4),o.SpI(" ",l.heading," "),o.R7$(5),o.JRh(l.text),o.R7$(3),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_shipment_super_title")," ")}}function sl(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-displayable-shipment-without-image",14),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("data",l.data)}}let Ul=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.imagePath="",this.heading="",this.text="",this.referral="",this.scope=l.getScope()}ngOnInit(){if(!this.data)return;let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceInfoService.getUserAgentInfo().isMobile?"-sm":"";this.data.articleListDisplayableType==fn.SponsoredArticle?(this.heading=this.data.heading,this.text=this.data.text,this.imagePath=`${this.data.coverAssetReference.assetImage.assetImageUrl}?preset=cover${l}${O}-4x3&cache=${this.data.coverAssetReference.assetImage.cache}`,this.referral=`${this.scope.currentScope.chapter.path}${this.data.path}/${this.data.variantId}`):this.data.articleListDisplayableType==fn.Special&&(this.imagePath=`${this.scope.globalSettings.blobStorageCdnUrl}/${this.scope.globalSettings.blobStorageContainerNameSpecial}/${this.data.listValues.coverAsset}?preset=cover${O}-4x3`,this.heading=this.data.listValues.heading,this.text=this.data.listValues.title,this.referral=this.scope.currentChapter.path+this.data.path)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-shipment-with-image"]],inputs:{data:"data"},decls:3,vars:2,consts:[[1,"container","p-0","displayable-wrapper"],["ngxOculusSparticleImpression","",3,"ngxSparticleData",4,"ngIf"],[4,"ngIf"],["ngxOculusSparticleImpression","",3,"ngxSparticleData"],[3,"href"],[1,"g-0"],[1,"row"],[1,"displayable-image-wrapper","col-12"],[3,"src"],[1,"p-0"],[1,"displayable-heading-wrapper","col-12"],[1,"col-10"],[1,"displayable-text-wrapper"],[1,"col-12","displayable-content-wrapper"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Wg,19,6,"div",1),o.k0s(),o.DNE(2,sl,2,1,"div",2)),2&O&&(o.R7$(),o.Y8G("ngIf",F.imagePath),o.R7$(),o.Y8G("ngIf",!F.imagePath))},dependencies:[a.bT,th,il],styles:[".displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.displayable-content-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);font-size:.75rem;color:var(--textColor);font-weight:600;text-transform:uppercase}.displayable-heading-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:.875rem;text-transform:uppercase;margin-bottom:.5rem;color:var(--textColor)}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:.5rem;color:var(--textColor);hyphens:auto}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:1.25rem;margin-top:0;font-family:var(--fontSecondary);font-weight:700}.displayable-text-wrapper[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{text-decoration:none;font-size:.75rem}.displayable-summary-wrapper[_ngcontent-%COMP%]{font-family:var(--fontPrimary);-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;font-size:1.2rem;line-height:1.3;margin-bottom:1rem;color:var(--textColor)}.displayable-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%;margin-bottom:.5rem}.card[_ngcontent-%COMP%]{border:none}.displayable-anchor-text[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}"]})}}return v})();function Vm(v,p){if(1&v&&(o.j41(0,"div",20),o.nrm(1,"app-user-badge-simple",21),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("user",l.user)("author",!1)}}function Dd(v,p){if(1&v&&(o.j41(0,"div",22)(1,"div",23)(2,"div",24),o.nrm(3,"i",25),o.k0s(),o.j41(4,"span"),o.EFF(5),o.k0s()()()),2&v){const l=o.XpG(2);o.R7$(5),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snip_displayable_preview_text"))}}function Hm(v,p){if(1&v&&(o.j41(0,"div")(1,"a",12),o.nrm(2,"app-associated-material",29),o.k0s()()),2&v){const l=o.XpG(3);o.R7$(),o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("isSnipDisplayable",!0)}}function Bu(v,p){if(1&v&&(o.j41(0,"div",26)(1,"div",27),o.nrm(2,"app-oha",28),o.k0s(),o.DNE(3,Hm,3,3,"div",2),o.k0s()),2&v){const l=o.XpG(2);o.R7$(2),o.Y8G("snip",l.data)("source","ArticleDisplayable")("size","sm"),o.R7$(),o.Y8G("ngIf",!l.preview)}}function ah(v,p){if(1&v&&(o.j41(0,"a",12)(1,"div",7)(2,"div",33),o.nrm(3,"i",34),o.k0s(),o.j41(4,"div",15),o.EFF(5),o.k0s()()()),2&v){const l=o.XpG(3);o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(5),o.SpI(" ",l.snipStatusText," ")}}function av(v,p){if(1&v&&(o.j41(0,"div",30)(1,"div",31),o.DNE(2,ah,6,2,"a",32),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(2),o.Y8G("ngIf",l.snipStatusText)}}function Um(v,p){if(1&v&&(o.j41(0,"div",35),o.EFF(1),o.nI1(2,"relativeDate"),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.SpI(" ",o.bMT(2,1,l.data.published)," ")}}function Jl(v,p){if(1&v&&(o.j41(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7),o.DNE(5,Vm,2,2,"div",8)(6,Dd,6,1,"div",9),o.k0s(),o.j41(7,"div",10)(8,"div",7)(9,"div",11)(10,"a",12),o.nrm(11,"img",13),o.k0s()()(),o.j41(12,"div",14)(13,"div",15)(14,"a",12)(15,"div",16)(16,"h4"),o.EFF(17),o.k0s()()()(),o.DNE(18,Bu,4,4,"div",17),o.k0s()(),o.j41(19,"div",7),o.DNE(20,av,3,1,"div",18)(21,Um,3,3,"div",19),o.k0s()()()()()),2&v){const l=o.XpG();o.Y8G("ngxSnipData",l.data),o.R7$(5),o.Y8G("ngIf",!l.preview),o.R7$(),o.Y8G("ngIf",l.preview),o.R7$(4),o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(),o.FS9("src",l.imagePath,o.B4B),o.R7$(3),o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(3),o.JRh(l.data.text),o.R7$(),o.Y8G("ngIf",2!=l.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig),o.R7$(2),o.Y8G("ngIf",!l.preview),o.R7$(),o.Y8G("ngIf",!l.preview)}}function lv(v,p){if(1&v&&(o.j41(0,"div",20),o.nrm(1,"app-user-badge-simple",21),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("user",l.user)("author",!1)}}function cv(v,p){if(1&v&&(o.j41(0,"div",22)(1,"div",23)(2,"div",24),o.nrm(3,"i",25),o.k0s(),o.j41(4,"span"),o.EFF(5),o.k0s()()()),2&v){const l=o.XpG(2);o.R7$(5),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snip_displayable_preview_text"))}}function Qp(v,p){if(1&v&&(o.j41(0,"div",47)(1,"a",12),o.nrm(2,"app-associated-material",29),o.k0s()()),2&v){const l=o.XpG(3);o.R7$(),o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(),o.Y8G("assetReferences",l.data.assetReferences)("isSnipDisplayable",!0)}}function SC(v,p){if(1&v&&(o.j41(0,"div")(1,"div",43)(2,"div",44),o.nrm(3,"app-oha",45),o.DNE(4,Qp,3,3,"div",46),o.k0s()()()),2&v){const l=o.XpG(2);o.R7$(3),o.Y8G("snip",l.data)("source","ArticleDisplayable")("size","sm"),o.R7$(),o.Y8G("ngIf",!l.preview)}}function up(v,p){if(1&v&&(o.j41(0,"a",12)(1,"div",7)(2,"div",33),o.nrm(3,"i",34),o.k0s(),o.j41(4,"div",15),o.EFF(5),o.k0s()()()),2&v){const l=o.XpG(3);o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(5),o.SpI(" ",l.snipStatusText," ")}}function EC(v,p){if(1&v&&(o.j41(0,"div",7)(1,"div",30),o.DNE(2,up,6,2,"a",32),o.k0s(),o.j41(3,"div",35),o.EFF(4),o.nI1(5,"relativeDate"),o.k0s()()),2&v){const l=o.XpG(2);o.R7$(2),o.Y8G("ngIf",l.snipStatusText),o.R7$(2),o.SpI(" ",o.bMT(5,2,l.data.published)," ")}}function zm(v,p){if(1&v&&(o.j41(0,"div")(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7),o.DNE(5,lv,2,2,"div",8)(6,cv,6,1,"div",9),o.k0s(),o.j41(7,"div",36)(8,"div",37)(9,"div",38)(10,"div",27)(11,"a",12)(12,"div",39),o.nrm(13,"h4",40),o.k0s()()()()(),o.j41(14,"div",41),o.DNE(15,SC,5,4,"div",2),o.k0s()(),o.DNE(16,EC,6,4,"div",42),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(5),o.Y8G("ngIf",!l.preview),o.R7$(),o.Y8G("ngIf",l.preview),o.R7$(5),o.Y8G("href",l.scope.currentScope.chapter.path+l.data.path,o.B4B),o.R7$(2),o.Y8G("innerHtml",l.data.modifiedText,o.npT),o.R7$(2),o.Y8G("ngIf",2!=l.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig),o.R7$(),o.Y8G("ngIf",!l.preview)}}let dv=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.imagePath="",this.snipStatusText="",this.scope=l.getScope()}ngOnChanges(l){l.data&&this.processData()}ngOnInit(){this.processData()}processData(){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceInfoService.getUserAgentInfo().isMobile?"-sm":"",F=this.data.assetReferences.filter(Ft=>null!=Ft.assetImage&&null==Ft.assetImage.deleted);if(F.length>0)if(null!=this.data.extendedConfigurations){let Ft=JSON.parse(this.data.extendedConfigurations);this.thumbnail=Ft.thumbnailGuid?F.find(pn=>pn.guid==Ft.thumbnailGuid):F?.reduce(function(pn,fi){return new Date(pn.published)<new Date(fi.published)?pn:fi})}else this.thumbnail=F?.reduce(function(Ft,pn){return new Date(Ft.published)<new Date(pn.published)?Ft:pn});this.thumbnail&&(this.imagePath=this.scope.globalSettings.blobStorageCdnUrl+"/images/"+`${this.thumbnail.assetImage.guid}?preset=cover${l}${O}-4x3`),this.user=this.preview?this.scope.profile:this.data.user;let se=new Date,we=new Date(this.data.published);if(this.data.modifiedText="&"==this.data.formattedText.slice(0,1)?"<span>"+this.data.formattedText.slice(0,this.data.formattedText.indexOf(";")+1)+"</span>"+this.data.formattedText.slice(this.data.formattedText.indexOf(";")+1,this.data.formattedText.length):"<span>"+this.data.formattedText.slice(0,1)+"</span>"+this.data.formattedText.slice(1,this.data.formattedText.length),this.data.published||this.preview){if(this.data.archived)this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_archived");else if(this.data.assignedUser&&this.data.score>this.scope.globalSettings.snipShowAuthorEditStatusScoreThreshold)this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_processing");else if(se.getTime()-we.getTime()<108e5)this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_newSnip");else if(!this.scope.currentChapter.settings.enableOhaLikes&&this.data.score>=1)this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_lookingForAuthor").replace("{{web_common_author}}",this.scope.network.getResourceOrKeyName("web_common_author"));else if(this.data.assetReferences.length){var gt=this.data.assetReferences.reduce(function(pn,fi){return new Date(pn.published)<new Date(fi.published)?pn:fi});let Ft=new Date(gt.created);if(se.getTime()-Ft.getTime()<108e5)switch(gt.type){case 2:case 5:case 6:case 7:this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_newMedia");break;case 0:case 1:case 10:this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_newOpinions")}}}else this.snipStatusText=this.scope.currentScope.network.getResourceOrKeyName("web_snipStatus_notReleased")}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-snip"]],inputs:{data:"data",preview:"preview"},features:[o.OA$],decls:3,vars:2,consts:[[1,"snip-displayable"],["ngxOculusSnipImpression","",3,"ngxSnipData",4,"ngIf"],[4,"ngIf"],["ngxOculusSnipImpression","",3,"ngxSnipData"],[1,"container","p-0","displayable-wrapper"],[1,"mb-4"],[1,"g-0"],[1,"row"],["class","col-12 mb-1",4,"ngIf"],["class","col-12 mb-3 d-flex justify-content-center",4,"ngIf"],[1,"card-body","displayable-content-wrapper","mb-1"],[1,"displayable-image-wrapper","col-12"],[3,"href"],[3,"src"],[1,"row","mb-3","extendet-row"],[1,"col-10"],[1,"displayable-text-wrapper"],["class","col-2 oha-wrapper",4,"ngIf"],["class","displayable-snipStatus-text col-10",4,"ngIf"],["class","displayable-date-wrapper col-2",4,"ngIf"],[1,"col-12","mb-1"],[3,"user","author"],[1,"col-12","mb-3","d-flex","justify-content-center"],[1,"preview-icon"],[1,"circle-icon"],[1,"fa-solid","fa-exclamation"],[1,"col-2","oha-wrapper"],[1,"col-12"],[1,"float-end",3,"snip","source","size"],[3,"assetReferences","isSnipDisplayable"],[1,"displayable-snipStatus-text","col-10"],[1,"col-9"],[3,"href",4,"ngIf"],[1,"col-1","displayable-snipStatus-icon"],[1,"fa-solid","fa-circle"],[1,"displayable-date-wrapper","col-2"],[1,"card-body","displayable-fallback-content-wrapper","mb-1"],[1,"fallback-content"],[1,"row","mb-3"],[1,"displayable-fallback-text-wrapper"],[1,"drop-cap-heading",3,"innerHtml"],[1,"oha-materials"],["class","row",4,"ngIf"],[1,"row","mb-2"],[1,"col-12","oha-wrapper-fallback"],[1,"float-end","ml-2",3,"snip","source","size"],["class","snip-displayable-associated-material",4,"ngIf"],[1,"snip-displayable-associated-material"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Jl,22,10,"div",1)(2,zm,17,6,"div",2),o.k0s()),2&O&&(o.R7$(),o.Y8G("ngIf",F.imagePath),o.R7$(),o.Y8G("ngIf",!F.imagePath))},dependencies:[a.bT,Bc,Al,uo,Pi,Ri],styles:[".displayable-snipStatus-text[_ngcontent-%COMP%]{font-size:.8rem;transform:unset}.displayable-snipStatus-icon[_ngcontent-%COMP%]{font-size:.8rem;color:var(--colorSecondary);transform:unset}.displayable-wrapper[_ngcontent-%COMP%]{align-items:center}.displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical}.displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{padding-right:.5rem}.displayable-userBadge-wrapper[_ngcontent-%COMP%]{padding-left:1rem}.displayable-content-wrapper[_ngcontent-%COMP%]{padding:1rem;position:relative;background-color:var(--backgroundColor);border-bottom:.125rem solid var(--black-60);height:20rem}.displayable-content-wrapper[_ngcontent-%COMP%]   .extendet-row[_ngcontent-%COMP%]{height:17%}.displayable-fallback-content-wrapper[_ngcontent-%COMP%]{padding:1rem;position:relative;background-color:var(--backgroundColor);border-bottom:.125rem solid var(--black-60);height:20rem}.displayable-text-wrapper[_ngcontent-%COMP%]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis;overflow:hidden;margin-bottom:.5rem}.displayable-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:1.25rem;margin-top:0;font-family:var(--fontSecondary);font-weight:700;font-style:italic;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%]     .drop-cap-heading span{display:block;float:left;font-size:6.5rem;line-height:1;margin-right:.8rem;margin-top:-2rem;padding-top:1rem}.displayable-fallback-text-wrapper[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-size:1.7rem;margin-top:0;font-weight:700;font-style:italic}.displayable-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%;margin-bottom:.5rem}.displayable-date-wrapper[_ngcontent-%COMP%]{font-size:.8rem;display:flex;justify-content:end;align-items:center;height:100%;white-space:nowrap}.oha-wrapper[_ngcontent-%COMP%]{height:2.813rem;padding-right:.375rem}.oha-wrapper-fallback[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.associated-material-text-wrapper[_ngcontent-%COMP%]{text-align:end}.snip-displayable-associated-material[_ngcontent-%COMP%]{margin-right:.25rem}.material-fallback-wrapper[_ngcontent-%COMP%]{transform:translateY(25%)}.fallback-content[_ngcontent-%COMP%]{display:flex;aspect-ratio:4/3;align-items:center;justify-content:center;overflow:hidden;margin-bottom:.5rem}.preview-icon[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:8px}.preview-icon[_ngcontent-%COMP%]   .circle-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;border:1px solid var(--textColor);border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:8px}.preview-icon[_ngcontent-%COMP%]   .circle-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--textColor);font-size:1rem}@media (max-width: 768px){.displayable-content-wrapper[_ngcontent-%COMP%], .displayable-fallback-content-wrapper[_ngcontent-%COMP%]{height:21rem}.displayable-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%}}"]})}}return v})();function OC(v,p){if(1&v&&(o.j41(0,"div")(1,"div",1)(2,"div",2)(3,"div",3),o.EFF(4),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(4),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_articleList_snipGroupTitle")," ")}}let Hx=(()=>{class v{constructor(l){this.scopeService=l,this.scope=l.getScope()}ngOnInit(){}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-displayable-snip-group-title"]],inputs:{data:"data"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"container","p-0"],[1,"row"],[1,"col-12"]],template:function(O,F){1&O&&o.DNE(0,OC,5,1,"div",0),2&O&&o.Y8G("ngIf",!F.scope.currentChapter.settings.configurations.hideSnipsInArticleFeed)},dependencies:[a.bT]})}}return v})(),Gm=(()=>{class v{constructor(){this.componentMap={DisplayableArticleWithImageComponent:ss,DisplayableArticleWithoutImageComponent:Gf,DisplayableLeadArticleImageLeftComponent:rp,DisplayableLeadArticleImageRightComponent:sh,DisplayableShipmentWithImageComponent:Ul,DisplayableShipmentWithoutImageComponent:il,DisplayableSnipComponent:dv,DisplayableSnipGroupTitleComponent:Hx,DisplayableSuperbannerComponent:Lu},this.dataTypeMap={DisplayableArticleWithImageComponent:"article",DisplayableArticleWithoutImageComponent:"article",DisplayableLeadArticleImageLeftComponent:"article",DisplayableLeadArticleImageRightComponent:"article",DisplayableShipmentWithImageComponent:"sponsored",DisplayableShipmentWithoutImageComponent:"sponsored",DisplayableSnipComponent:"snip",DisplayableSnipGroupTitleComponent:"snip",DisplayableSuperbannerComponent:"shipment"},this.groupTypeMap={SuperBanner:"shipments",LeadArticleImageRight:"articles",LeadArticleImageLeft:"articles",TwoArticleWithImage:"articles",TwoArticleWithoutImage:"articles",TwoArticleWithoutImageShipmentLeft:"articles",TwoArticleWithoutImageShipmentRight:"articles",TwoArticleWithoutImageShipmentBoth:"articles",TwoArticleWithImageShipmentBoth:"articles",TwoArticleWithImageShipmentLeft:"articles",TwoArticleWithImageShipmentRight:"articles",Snips:"snips"}}resolveComponent(l){let O=this.componentMap[l]||null;return null==O&&console.error("Non matched component type ",l),O}resolveSlotDataType(l){return this.dataTypeMap[l]||null}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),Wm=(()=>{class v{constructor(l,O,F,se,we,We){this.http=l,this.composableCardsResolverService=O,this.articleService=F,this.snipService=se,this.shipmentService=we,this.scopeService=We,this.groups=[],this.articles=[],this.sponsored=[],this.snips=[],this.shipments=[],this.slotedArticles=[],this.slotedSponsored=[],this.slotedSnips=[],this.slotedShipments=[],this.loadableArticleIds=[],this.slotedArticleIds=[],this.slotedSponsoredIds=[],this.loadMorePageSize=12,this.filledGroups=[],this.isLoadingMore=!1,this.scrollPosition=0,this.isLoading=!1,this.loadingCompletedSubject=new ae.B7,this.loadingCompleted=this.loadingCompletedSubject.asObservable(),this.preloadDataPromiseCached=null,this.softFailureSubject=new ae.B7,this.hardFailureSubject=new ae.B7,this.hasSoftFailure=!1,this.hasHardFailure=!1,this.softFailure$=this.softFailureSubject.asObservable(),this.hardFailure$=this.hardFailureSubject.asObservable(),this.scope=this.scopeService.getScope(),this.preloadData().then(()=>{})}withTimeout(l,O,F){return navigator.onLine?new Promise((se,we)=>{const We=setTimeout(()=>{we(new Error(`${F} loading timed out after ${O} ms`))},O);l.then(gt=>{clearTimeout(We),se(gt)}).catch(gt=>{clearTimeout(We),we(new Error(`${F} failed: ${gt.message||gt}`))})}):Promise.reject(new Error(`${F} failed: Network is offline.`))}wrapWithRejection(l,O){return new Promise((F,se)=>{l.then(F).catch(we=>{console.error(`Task "${O}" failed with error:`,we),se(new Error(`${O} failed: ${we.message||we}`))})})}preloadData(){if(this.preloadDataPromiseCached)return this.preloadDataPromiseCached;const l=6e4;this.isLoading=!0;const O=[{name:"Articles",promise:this.wrapWithRejection(this.withTimeout(this.loadArticles(),l,"Articles"),"Articles")},{name:"Snips",promise:this.wrapWithRejection(this.withTimeout(this.loadSnips(),l,"Snips"),"Snips")},{name:"Shipments",promise:this.wrapWithRejection(this.withTimeout(this.loadShipments(),l,"Shipments"),"Shipments")},{name:"Groups",promise:this.wrapWithRejection(this.withTimeout(this.loadGroupsJson(),l,"Groups"),"Groups")}];return this.preloadDataPromiseCached=Promise.allSettled(O.map(F=>F.promise)).then(F=>{const se=F.filter(We=>"rejected"===We.status).map(We=>We.reason),we=F.filter(We=>"fulfilled"===We.status);se.length===O.length?(console.error("Hard failure: All preloadData calls failed."),this.hasHardFailure=!0,this.hasSoftFailure=!1,this.hardFailureSubject.next(),se.forEach(We=>{console.error("Hard failure reason:",We)})):se.length>0?(console.warn("Soft failure: Some preloadData calls failed."),this.hasSoftFailure=!0,this.hasHardFailure=!1,this.softFailureSubject.next(),se.forEach(We=>{console.error("Soft failure reason:",We)})):(this.hasSoftFailure=!1,this.hasHardFailure=!1),we.length>0&&this.fillGroupSlots(),this.isLoading=!1,this.preloadDataPromiseCached=null,this.loadingCompletedSubject.next()}).finally(()=>{this.isLoading=!1}),this.preloadDataPromiseCached}loadGroupsJson(){return this.http.get(`${this.scope.apiEndpoint}designlayout`).toPromise().then(l=>{if(!l)throw console.error("Error: No data received from design layout endpoint."),new Error("No data received from design layout endpoint.");try{return this.groups=JSON.parse(l),this.filledGroups=JSON.parse(l),this.groups}catch(O){throw console.error("JSON parse error:",O),O}}).catch(l=>(console.error("Error getting design layout:",l),Promise.reject(l)))}loadLoadableArticleIds(){return this.articleService.getArticleIds().then(l=>{this.loadableArticleIds=l})}loadArticles(){return this.articles.length>0?Promise.resolve():this.articleService.getArticleIds().then(l=>{this.loadableArticleIds=l}).then(l=>this.articleService.getMainArticles().then(O=>{O.forEach(se=>{1==se.articleListDisplayableType?this.articles.push(se):this.sponsored.push(se)})}))}loadSnips(){return this.snips.length>0?Promise.resolve():this.snipService.getSnips().then(l=>{this.snips=[...l]})}loadShipments(){return this.shipments.length>0?Promise.resolve():this.shipmentService.getShipmentSuperNoWait().then(l=>{l.forEach(F=>{null!==F&&this.shipments.push(F)})})}fillGroupSlots(){const l=this.composableCardsResolverService;this.filledGroups=this.groups.map(O=>{const se=O.slots.map(we=>{let We,gt;const Ft=l.resolveSlotDataType(we.contentType);if("article"===Ft&&this.articles.length>0){We=this.articles.shift(),gt=l.resolveComponent(we.contentType),this.slotedArticles.push(We);let pn=this.slotedArticleIds.indexOf(We.id);pn>-1&&this.slotedArticleIds.splice(pn,1),We&&this.slotedArticleIds.push(We.id)}else if("sponsored"===Ft){if(this.sponsored.length>0)We=this.sponsored.shift(),gt=l.resolveComponent(we.contentType);else if(this.articles.length>0){We=this.articles.shift(),gt=l.resolveComponent(we.shouldDisplayImage?"DisplayableArticleWithImageComponent":"DisplayableArticleWithoutImageComponent"),this.slotedArticles.push(We);let pn=this.slotedArticleIds.indexOf(We.id);pn>-1&&this.slotedArticleIds.splice(pn,1),We&&this.slotedArticleIds.push(We.id)}}else"snip"===Ft&&this.snips.length>0?(We=this.snips.shift(),gt=l.resolveComponent(we.contentType)):"shipment"===Ft&&this.shipments.length>0?(We=this.shipments.shift(),gt=l.resolveComponent(we.contentType)):console.warn("No data found for slot type:",we.contentType);return We&&gt?{...we,data:We,renderComponent:gt}:null}).filter(we=>null!==we);return se.length>0?{...O,slots:se}:null}).filter(O=>null!==O)}canLoadMore(){return this.slotedArticleIds.length<this.loadableArticleIds.length}loadMore(){this.isLoadingMore=!0;const l=this.composableCardsResolverService,F=this.loadableArticleIds.filter(se=>!this.slotedArticleIds.includes(se)).slice(0,this.loadMorePageSize);return this.articleService.getArticlesByIds(F).then(se=>{const we=[];for(let We=0;We<se.length;We+=2){const gt={groupType:"TwoArticleWithImage",slots:[{data:se[We],renderComponent:l.resolveComponent("DisplayableArticleWithImageComponent"),contentType:"article",shouldDisplayImage:!0},{data:se[We+1],renderComponent:l.resolveComponent("DisplayableArticleWithImageComponent"),contentType:"article",shouldDisplayImage:!0}].filter(Ft=>void 0!==Ft.data)};we.push(gt)}this.filledGroups=[...this.filledGroups,...we],se.forEach(We=>{this.articles.push(We),this.slotedArticleIds.push(We.id)}),this.isLoadingMore=!1}).catch(se=>{console.error("Error loading more articles:",se),this.isLoadingMore=!1})}reloadAllData(){return(this.hasHardFailure||this.hasSoftFailure)&&(this.preloadDataPromiseCached=null),this.preloadDataPromiseCached?this.preloadDataPromiseCached:(this.articles=[],this.sponsored=[],this.snips=[],this.shipments=[],this.slotedArticles=[],this.slotedSponsored=[],this.slotedSnips=[],this.slotedShipments=[],this.loadableArticleIds=[],this.slotedArticleIds=[],this.slotedSponsoredIds=[],this.filledGroups=[],this.groups=[],this.preloadData().then(()=>{}).catch(l=>{console.error("Error reloading all data:",l)}))}saveScrollPosition(l){this.scrollPosition=l}getScrollPosition(){return this.scrollPosition}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(Gm),o.KVO(ts),o.KVO(ra),o.KVO(Gg),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),Wy=(()=>{class v{constructor(){}popErrorToast(l){(0,Pn.A)({message:l,width:450},"error",2e3)}popSuccessToast(l){(0,Pn.A)({message:l,width:450},"success",2e3)}popInfoToast(l){(0,Pn.A)({message:l,width:450},"info",2e3)}popWarningToast(l){(0,Pn.A)({message:l,width:450},"warning",2e3)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),Ux=(()=>{class v{constructor(l,O){this.scopeService=l,this.toaster=O,this.networkSpeedSubject=new jn.t(5e5),this.networkStatusSubject=new jn.t(navigator.onLine),this.networkConditionSubject=new jn.t("slow"),this.currentNetworkSpeed=5e5,this.isOnline=!0,this.scope=this.scopeService.getScope(),this.detectNetworkSpeed(),window.addEventListener("online",this.updateNetworkStatus.bind(this)),window.addEventListener("offline",this.updateNetworkStatus.bind(this))}getNetworkSpeed(){return this.detectNetworkSpeed(),this.networkSpeedSubject.asObservable()}detectNetworkSpeed(){var l=this;return(0,$e.A)(function*(){let O;const F=navigator.connection;if(F){switch(F.type||F.effectiveType){case"wifi":case"ethernet":case"4g":O=5000004;break;case"cellular":case"3g":O=1000003;break;default:O=500002}l.currentNetworkSpeed=O}else O=yield l.estimateNetworkSpeed(),l.currentNetworkSpeed=O;return l.networkSpeedSubject.next(O),O})()}estimateNetworkSpeed(){return(0,$e.A)(function*(){const F=performance.now();try{const se=yield fetch("/content/fonts/alegreya/alegreya400.woff2",{cache:"no-cache"}),We=(performance.now()-F)/1e3,gt=se.headers.get("Content-Length");console.log("Content-Length",gt);let pn=8*(gt?parseInt(gt,10):36356)/We;return console.log("SPEED",pn),pn}catch(se){return console.error("Error estimating network speed:",se),290848}})()}updateNetworkStatus(){this.isOnline=navigator.onLine,this.networkStatusSubject.next(this.isOnline);let l=this.scope.network.getResourceOrKeyName(this.isOnline?"web_connection_changed_to_online":"web_connection_changed_to_offline");this.isOnline?this.toaster.popSuccessToast(l):this.toaster.popErrorToast(l)}ngOnDestroy(){window.removeEventListener("online",this.updateNetworkStatus.bind(this)),window.removeEventListener("offline",this.updateNetworkStatus.bind(this))}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(Wy))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const $m=v=>({data:v});function $g(v,p){1&v&&o.eu8(0)}function Th(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,$g,1,0,"ng-container",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngComponentOutlet",l.renderComponent)("ngComponentOutletInputs",o.eq3(2,$m,l.data))}}function jg(v,p){if(1&v&&(o.qex(0,5),o.j41(1,"div"),o.DNE(2,Th,2,4,"div",6),o.k0s(),o.bVm()),2&v){const l=p.$implicit;o.R7$(),o.ZvI("slot-group ",l.groupType,""),o.R7$(),o.Y8G("ngForOf",l.slots)}}function zx(v,p){if(1&v){const l=o.RV6();o.qex(0),o.DNE(1,jg,3,4,"ng-container",2),o.j41(2,"div",3)(3,"dx-button",4),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.frontPageService.loadMore())}),o.EFF(4),o.k0s()(),o.bVm()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("ngForOf",l.groups),o.R7$(2),o.Y8G("visible",l.frontPageService.canLoadMore()),o.R7$(),o.SpI(" ",l.scope.currentScope.network.resources.web_common_showMore," ")}}function Gx(v,p){1&v&&o.nrm(0,"app-apicodo-loading-spinner")}new o.nKC("slotData");let uv=(()=>{class v{constructor(l,O,F){this.injector=l,this.frontPageService=O,this.scopeService=F,this.groups=[],this.scope=this.scopeService.getScope()}ngOnChanges(l){}ngAfterViewInit(){const l=this.frontPageService.getScrollPosition();window.scrollTo(0,l)}ngOnDestroy(){const l=window.scrollY;this.frontPageService.saveScrollPosition(l)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.zZn),o.rXU(Wm),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-frontpage-designer-list"]],inputs:{groups:"groups"},features:[o.OA$],decls:3,vars:2,consts:[["loading",""],[4,"ngIf","ngIfElse"],["class","front-page-designer-list-base",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-center"],["icon","chevrondown","stylingMode","text",1,"load-more",3,"onClick","visible"],[1,"front-page-designer-list-base"],[4,"ngFor","ngForOf"],[4,"ngComponentOutlet","ngComponentOutletInputs"]],template:function(O,F){if(1&O&&o.DNE(0,zx,5,3,"ng-container",1)(1,Gx,1,0,"ng-template",null,0,o.C5r),2&O){const se=o.sdS(2);o.Y8G("ngIf",!F.frontPageService.isLoading)("ngIfElse",se)}},dependencies:[a.OI,a.Sq,a.bT,Hi.e,bn],styles:[".slot-group[_ngcontent-%COMP%]{clear:both;margin-bottom:5rem}.slot-group[_ngcontent-%COMP%]     .lead-article{padding:1.5rem;background-color:var(--textColor10);border-radius:10px}.slot-group[_ngcontent-%COMP%]     .lead-article img{border-radius:5px}@media (max-width: 768px){.slot-group[_ngcontent-%COMP%]{margin-bottom:1rem}.slot-group[_ngcontent-%COMP%]     .lead-article{padding-left:0rem;padding-right:0rem}}.TwoArticleWithImage.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithImage.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithImage.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithImage.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithoutImage.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithoutImage.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithoutImage.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithoutImage.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithImageShipmentRight.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithImageShipmentRight.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithImageShipmentRight.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithImageShipmentRight.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithImageShipmentLeft.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithImageShipmentLeft.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithImageShipmentLeft.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithImageShipmentLeft.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithImageShipmentBoth.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithImageShipmentBoth.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithImageShipmentBoth.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithImageShipmentBoth.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithoutImageShipmentBoth.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithoutImageShipmentBoth.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithoutImageShipmentBoth.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithoutImageShipmentBoth.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithoutImageShipmentLeft.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithoutImageShipmentLeft.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithoutImageShipmentLeft.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithoutImageShipmentLeft.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.TwoArticleWithoutImageShipmentRight.slot-group[_ngcontent-%COMP%]{display:flex;gap:2rem}.TwoArticleWithoutImageShipmentRight.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - 1rem)}@media (max-width: 768px){.TwoArticleWithoutImageShipmentRight.slot-group[_ngcontent-%COMP%]{display:block;padding:2rem}.TwoArticleWithoutImageShipmentRight.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%}}.slot-group[_ngcontent-%COMP%]     app-displayable-article-with-image{display:block}.slot-group[_ngcontent-%COMP%]     app-displayable-article-without-image{display:block}.Snips.slot-group[_ngcontent-%COMP%]{background-color:var(--color2-alpha50);margin:0 -100%;padding:0 100%;display:flex;margin-bottom:5rem;gap:3rem;justify-content:center;padding-top:2rem}.Snips.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(33% - 2rem)}@media (max-width: 768px){.Snips.slot-group[_ngcontent-%COMP%]{display:block}.Snips.slot-group[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;padding:2rem}}.load-more[_ngcontent-%COMP%]{color:var(--textColor);font-weight:600;font-size:1.8rem;height:2.5rem;margin-bottom:2rem}@media (max-width: 768px){.load-more[_ngcontent-%COMP%]{font-size:1rem;height:2rem}}  app-frontpage-designer-list>div:first-child.LeadArticleImageRight.slot-group .lead-article{background-color:var(--color1-alpha50)}"]})}}return v})(),jm=(()=>{class v{constructor(l,O,F){this.articleService=l,this.snipService=O,this.frontPageService=F}translateContent(l){var O=this;return(0,$e.A)(function*(){const[F,se]=yield Promise.all([O.articleService.getTranslatedArticles(l),O.snipService.getTranslatedSnipList(l)]),we=O.mapItemsById(F),We=O.mapItemsById(se);O.frontPageService.filledGroups.forEach(gt=>{const Ft=gt.groupType.toLowerCase();Ft.includes("article")?O.updateGroupSlots(gt,we):Ft.includes("snips")&&O.updateGroupSlots(gt,We)})})()}mapItemsById(l){return l.reduce((O,F)=>(O[F.id]=F,O),{})}updateGroupSlots(l,O){l.slots.forEach(F=>{const se=F.data.id;O[se]&&(F.data=O[se])})}translateSnip(l,O){var F=this;return(0,$e.A)(function*(){return yield F.snipService.getTranslatedSnipDetails(l,O)})()}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(ts),o.KVO(ra),o.KVO(Wm))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var Xg=M(1983);function wC(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",1),o.nrm(1,"i",2),o.j41(2,"dx-select-box",3),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.translate(F))}),o.k0s(),o.nrm(3,"dx-load-indicator",4),o.k0s()}if(2&v){const l=o.XpG();o.R7$(2),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_article_translation_languageSelectBox_placeholder")),o.Y8G("items",l.availableTargetLanguages),o.R7$(),o.Y8G("visible",l.showLoadIndicator)}}let hv=(()=>{class v{constructor(l,O,F){this.legacyTranslationService=l,this.translationService=O,this.scopeService=F,this.translationType="content",this.availableTargetLanguages=[],this.showLoadIndicator=!1,this.onValueChanged=new o.bkB,this.scope=this.scopeService.getScope()}ngOnInit(){this.loadAvailableTargetLanguages()}loadAvailableTargetLanguages(){var l=this;return(0,$e.A)(function*(){try{const O=yield l.translationService.getAvailableTargetLanguages();O&&(l.availableTargetLanguages=Object.entries(O).map(([F,se])=>({languageCode:F,nativeName:se})))}catch(O){console.error("Error by getting languages",O)}})()}translate(l){var O=this;return(0,$e.A)(function*(){O.showLoadIndicator=!0;try{"content"===O.translationType?yield O.legacyTranslationService.translateContent(l.value):"snip"===O.translationType&&O.snipId&&O.onValueChanged.emit(l)}catch(F){console.error("Error on legacy translation",F)}finally{O.showLoadIndicator=!1}})()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(jm),o.rXU(Ei.M),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-legacy-translation"]],inputs:{translationType:"translationType",snipId:"snipId"},outputs:{onValueChanged:"onValueChanged"},decls:1,vars:1,consts:[["class","legacy-translation-base",4,"ngIf"],[1,"legacy-translation-base"],[1,"fa-solid","fa-language","languag-icon"],["displayExpr","nativeName","valueExpr","languageCode","stylingMode","underlined",1,"",3,"onValueChanged","placeholder","items"],["id","small-indicator","height","20","width","20",3,"visible"]],template:function(O,F){1&O&&o.DNE(0,wC,4,3,"div",0),2&O&&o.Y8G("ngIf",F.availableTargetLanguages.length>0)},dependencies:[a.bT,Xg.B,Wt.l],styles:[".legacy-translation-base[_ngcontent-%COMP%]{display:flex;justify-content:end;max-width:var(--designContentWidth);align-items:center;margin:0 auto;padding-bottom:1rem;z-index:1020}.legacy-translation-base[_ngcontent-%COMP%]   .languag-icon[_ngcontent-%COMP%]{margin-right:5px}"]})}}return v})();function Km(v,p){if(1&v&&(o.qex(0),o.j41(1,"div",4),o.nrm(2,"i",5),o.j41(3,"h3"),o.EFF(4),o.k0s()(),o.bVm()),2&v){const l=o.XpG();o.R7$(4),o.JRh(l.offlineMessage)}}function Xm(v,p){1&v&&(o.j41(0,"div",6),o.nrm(1,"app-legacy-translation"),o.k0s())}function $f(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"p"),o.EFF(2),o.k0s(),o.j41(3,"dx-button",7),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.frontPageService.reloadAllData())}),o.k0s(),o.bVm()}if(2&v){const l=o.XpG(2);o.R7$(2),o.JRh(l.hardLoadingErrorText),o.R7$(),o.Y8G("text",l.reloadButtonText)}}function pv(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"p"),o.EFF(2),o.k0s(),o.j41(3,"dx-button",7),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.frontPageService.reloadAllData())}),o.k0s(),o.bVm()}if(2&v){const l=o.XpG(2);o.R7$(2),o.JRh(l.softLoadingErrorText),o.R7$(),o.Y8G("text",l.reloadButtonText)}}function Yg(v,p){if(1&v&&(o.qex(0),o.DNE(1,$f,4,2,"ng-container",1)(2,pv,4,2,"ng-container",1),o.bVm()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",l.frontPageService.hasHardFailure&&!l.frontPageService.isLoading),o.R7$(),o.Y8G("ngIf",l.frontPageService.hasSoftFailure&&!l.frontPageService.isLoading)}}let jf=(()=>{class v{constructor(l,O,F){this.frontPageService=l,this.scopeService=O,this.connectivityService=F,this.loadingTimeout=!1,this.timeoutMessage="Timeout occured. You can try reloading or wait longer.",this.softLoadingErrorText="Frontpage data loaded, but not completely.",this.hardLoadingErrorText="Frontpage data load failed.",this.reloadButtonText="Reload",this.offlineMessage="Application offline",this.legacyTranslationActivated=!1,this.firstReloadAttempt=!0,this.scope=O.getScope(),this.timeoutMessage=this.scope.network.getResourceOrKeyName("web_frontpage_loading_timeout"),this.reloadButtonText=this.scope.network.getResourceOrKeyName("web_frontpage_reload_button_txt"),this.softLoadingErrorText=this.scope.network.getResourceOrKeyName("web_frontpage_load_incomplete"),this.hardLoadingErrorText=this.scope.network.getResourceOrKeyName("web_frontpage_load_failure"),this.offlineMessage=this.scope.network.getResourceOrKeyName("web_network_connection_offline"),this.loadSubscription=this.frontPageService.loadingCompleted.subscribe(()=>{this.clearLoadingTimeout()}),this.legacyTranslationActivated=0!==this.scope.currentScope.chapter.settings?.featureTranslationProvider}ngOnDestroy(){this.clearLoadingTimeout(),this.networkSpeedSubscription&&this.networkSpeedSubscription.unsubscribe(),this.loadSubscription&&this.loadSubscription.unsubscribe()}ngOnInit(){var l=this;return(0,$e.A)(function*(){try{const O=l.connectivityService.currentNetworkSpeed;let F;if(F=O>=5e6?3e3:O>=1e6?5e3:8e3,!l.frontPageService.isLoading)return;l.startLoadingTimeout(F)}catch(O){console.error("Error detecting network speed:",O),l.startLoadingTimeout(8e3)}})()}loadMore(){this.frontPageService.loadMore()}clearLoadingTimeout(){this.loadingTimeout=!1,this.timeoutId&&clearTimeout(this.timeoutId)}retryLoading(){this.clearLoadingTimeout(),this.frontPageService.reloadAllData().then(()=>{this.ngOnInit()}).catch(l=>{console.error("Error reloading data:",l)})}startLoadingTimeout(l){if(!this.frontPageService.isLoading)return this.clearLoadingTimeout(),void(this.loadingTimeout=!1);this.clearLoadingTimeout(),this.timeoutId=setTimeout(()=>{this.frontPageService.isLoading?(this.loadingTimeout=!0,this.firstReloadAttempt&&(this.retryLoading(),this.firstReloadAttempt=!1)):(this.clearLoadingTimeout(),this.loadingTimeout=!1)},l)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Wm),o.rXU(b.A),o.rXU(Ux))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-main-news"]],decls:8,vars:4,consts:[[1,"root-slides-wrapper"],[4,"ngIf"],["class","main-news-legacyTranslation",4,"ngIf"],[3,"groups"],[1,"app-offline"],[1,"fas","fa-cloud"],[1,"main-news-legacyTranslation"],["width","100%","icon","refresh",3,"onClick","text"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.nrm(1,"br"),o.DNE(2,Km,5,1,"ng-container",1),o.nrm(3,"ngx-shipment-premium"),o.DNE(4,Xm,2,0,"div",2),o.nrm(5,"br")(6,"app-frontpage-designer-list",3),o.DNE(7,Yg,3,2,"ng-container",1),o.k0s()),2&O&&(o.R7$(2),o.Y8G("ngIf",!F.connectivityService.isOnline),o.R7$(2),o.Y8G("ngIf",F.frontPageService.filledGroups.length>0&&F.legacyTranslationActivated),o.R7$(2),o.Y8G("groups",F.frontPageService.filledGroups),o.R7$(),o.Y8G("ngIf",F.connectivityService.isOnline))},dependencies:[a.bT,Hi.e,Or,uv,hv],styles:["app-frontpage-designer-list[_ngcontent-%COMP%]{max-width:var(--designContentWidth);margin:0 auto;display:block}.app-offline[_ngcontent-%COMP%]{background-color:var(--colorErrorDark-light);color:#fff;text-align:center;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;display:flex;align-items:center;justify-content:center;gap:10px;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out}.main-news-legacyTranslation[_ngcontent-%COMP%]{padding-top:1.5rem}.app-offline[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:24px}.app-offline[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:700}@keyframes _ngcontent-%COMP%_fade-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}"]})}}return v})(),$c=(()=>{class v{timeout(l,O){setTimeout(l,O)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();function ud(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",8)(1,"div",9)(2,"input",10),o.bIt("change",function(){o.eBV(l);const F=o.XpG().$implicit,se=o.XpG();return o.Njj(se.toggleNotificationGroup(F))}),o.k0s(),o.j41(3,"label",11),o.EFF(4),o.k0s()()()}if(2&v){const l=o.XpG().$implicit,O=o.XpG();o.R7$(2),o.Mz_("id","ng",l.id,""),o.Y8G("value",l.id)("checked",l.enabled),o.R7$(),o.Mz_("for","ng",l.id,""),o.R7$(),o.SpI(" ",O.scope.currentScope.network.resources[l.name]||"!RES["+l.name+"]"," ")}}function gv(v,p){if(1&v&&(o.qex(0),o.DNE(1,ud,5,7,"div",7),o.bVm()),2&v){const l=p.$implicit,O=o.XpG();o.R7$(),o.Y8G("ngIf",!(O.scope.currentScope.chapter.settings.featureBreakingNewsToAll&&6===l.order))}}function ha(v,p){if(1&v&&(o.j41(0,"div",12),o.nrm(1,"i",13),o.EFF(2),o.k0s()),2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.resources.web_notificationSettings_saveProcessing,". ")}}function fv(v,p){if(1&v&&(o.j41(0,"div",14),o.nrm(1,"i",15),o.EFF(2),o.k0s()),2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.resources.web_notificationSettings_saveSuccessful,". ")}}function Sn(v,p){if(1&v&&(o.j41(0,"div",16),o.nrm(1,"i",17),o.EFF(2),o.k0s()),2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.resources.web_notificationSettings_saveError,". ")}}let nt=(()=>{class v{constructor(l,O,F,se){this.notificationService=l,this.route=O,this.scopeService=F,this.timeoutService=se,this.working=!1,this.success=!1,this.error=!1,this.notificationGroups=[],this.userEmail=null,this.privateUserGuid=null,this.scope=this.scopeService.getScope()}ngOnInit(){this.privateUserGuid=null;let l=!0;this.scope.profile.isAdmin||this.scope.profile.isNetworkAdmin||(l=!1,this.scope.profile.chapterRoles&&this.scope.profile.chapterRoles.forEach(O=>{O>2&&(l=!0)})),this.notificationService.getNotificationGroups(this.privateUserGuid).then(O=>{l||(O=O.filter(F=>1001!==F.order)),this.notificationGroups=O,window.location.href.includes("optOutAll")&&(this.notificationGroups.forEach(F=>{6===F.order&&this.scope.currentScope.chapter.settings.featureBreakingNewsToAll||(F.enabled=!1)}),this.working=!0,this.notificationService.updateNotificationGroups(this.notificationGroups,this.privateUserGuid).then(()=>{this.timeoutService.timeout(()=>{this.working=!1,this.success=!0},2e3)}).catch(()=>{this.error=!0}))}).catch(()=>{this.error=!0}),this.notificationService.getUserEmail(this.privateUserGuid).then(O=>{this.userEmail=O}).catch(()=>{this.error=!0})}toggleNotificationGroup(l){l.enabled=!l.enabled,this.success=!1,this.working=!0,this.notificationService.updateNotificationGroups(this.notificationGroups,this.privateUserGuid).then(()=>{this.timeoutService.timeout(()=>{this.working=!1,this.success=!0},2e3)}).catch(()=>{this.error=!0,l.enabled=!l.enabled})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(cc.J),o.rXU(Y.nX),o.rXU(b.A),o.rXU($c))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-notifications-settings"]],decls:9,vars:5,consts:[[1,"notification-settings"],[1,"notification-settings-title"],[1,"notificationsettings"],[4,"ngFor","ngForOf"],["class","col-xs-12 alert alert-info",4,"ngIf"],["class","col-xs-12 alert alert-success",4,"ngIf"],["class","col-xs-12 alert alert-danger",4,"ngIf"],["style","padding-bottom: 15px;",4,"ngIf"],[2,"padding-bottom","15px"],[1,"form-check","form-switch"],["type","checkbox",1,"form-check-input",3,"change","id","value","checked"],[1,"form-check-label",3,"for"],[1,"col-xs-12","alert","alert-info"],[1,"fa","fa-spinner","fa-pulse"],[1,"col-xs-12","alert","alert-success"],[1,"fa","fa-check"],[1,"col-xs-12","alert","alert-danger"],[1,"fa","fa-warning"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1),o.EFF(2),o.k0s(),o.nrm(3,"br"),o.j41(4,"div",2),o.DNE(5,gv,2,1,"ng-container",3),o.k0s(),o.DNE(6,ha,3,1,"div",4)(7,fv,3,1,"div",5)(8,Sn,3,1,"div",6),o.k0s()),2&O&&(o.R7$(2),o.SpI(" ",F.scope.currentScope.network.resources.web_notificationSettings_redesign_pageTitle," "),o.R7$(3),o.Y8G("ngForOf",F.notificationGroups),o.R7$(),o.Y8G("ngIf",F.working),o.R7$(),o.Y8G("ngIf",F.success),o.R7$(),o.Y8G("ngIf",F.error))},dependencies:[a.Sq,a.bT],styles:['.notification-settings[_ngcontent-%COMP%]   .notification-settings-title[_ngcontent-%COMP%]{font-size:2rem;color:var(--textColor);font-weight:600;line-height:130%;font-family:var(--fontSecondary);margin-bottom:1rem}.notification-settings[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%] + label[_ngcontent-%COMP%], .notification-settings[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{display:flex;margin-bottom:5px;line-height:130%;font-weight:600}.notification-settings[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]:before{content:""}.notification-settings[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%], .notification-settings[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{display:unset}.notification-settings[_ngcontent-%COMP%]   .form-check-input[_ngcontent-%COMP%]:checked{background-color:var(--colorPrimary);border-color:var(--colorPrimary)}@media (max-width: 768px){.notification-settings[_ngcontent-%COMP%]   .notification-settings-title[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--textColor);font-weight:600;line-height:130%;font-family:var(--fontSecondary)}}']})}}return v})(),Zt=(()=>{class v{constructor(l,O,F,se){this.router=l,this.scopeService=O,this.timeoutService=F,this.location=se,this.scope=this.scopeService.getScope()}isSameChapterUrl(l){let F=l.startsWith(this.scope.currentScope.network.path+(""!==this.scope.currentScope.chapter.regEx?"/"+this.scope.currentScope.chapter.regEx:"")+"/");return""===this.scope.currentScope.chapter.regEx&&F&&this.scope.chapters.forEach(se=>{2===se.managementState&&se.id!==this.scope.currentChapter.id&&l.startsWith(this.scope.currentScope.network.path+"/"+se.regEx+"/")&&(F=!1)}),F}redirectNotificationUrl(l){const O=new URL("https://"+this.scope.currentScope.network.domain),F=this.scope.currentScope.network.path+(""!==this.scope.currentScope.chapter.regEx?"/"+this.scope.currentScope.chapter.regEx:"");if(this.isSameChapterUrl(l)){const we=l.substring(F.length);this.location.replaceState(we)}else if(l.startsWith(O.origin))window.location.href=l;else if(window.cordova&&window.cordova.InAppBrowser){const we=this.scope.currentScope.network.settings.configurations.inAppBrowserOnly;let We="location=no,toolbarposition=top,toolbartranslucent=no";"android"===window.cordova.platformId&&(We="location=yes,hideurlbar=yes,zoom=no,closebuttoncaption="+this.scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption")),we?window.cordova.InAppBrowser.open(l,"_blank",We):window.cordova.InAppBrowser.open(l,"_system",We)}else window.location.href=l}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(Y.Ix),o.KVO(b.A),o.KVO($c),o.KVO(a.aZ))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const li=()=>({width:200});function Gi(v,p){if(1&v&&(o.j41(0,"p",9),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.SpI(" ",l.scope.currentScope.network.resources.web_root_notification_noNotifications," ")}}function bo(v,p){1&v&&o.nrm(0,"div",20)}function Bo(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",10)(1,"a",11),o.bIt("click",function(){const F=o.eBV(l).$implicit,se=o.XpG();return o.Njj(se.clickNotification(F))}),o.j41(2,"div",2)(3,"div",12)(4,"div",13),o.nrm(5,"img",14),o.k0s(),o.j41(6,"div",15)(7,"div",16),o.nrm(8,"div",17),o.j41(9,"div",18),o.EFF(10),o.nI1(11,"relativeDate"),o.k0s()(),o.DNE(12,bo,1,0,"div",19),o.k0s()()()()()}if(2&v){const l=p.$implicit;o.R7$(5),o.AVh("notification-image",!l.imageRound)("notification-image-round",l.imageRound),o.Y8G("lazy-img",l.imageUri+"?preset=cover-sm-4x3"),o.R7$(3),o.Y8G("innerHTML",l.html,o.npT),o.R7$(2),o.SpI(" ",o.bMT(11,8,l.created)," "),o.R7$(2),o.Y8G("ngIf",!l.clicked)}}let ir=(()=>{class v{trackById(l,O){return O.id}constructor(l,O,F,se,we){this.metaService=l,this.notificationService=O,this.redirectService=F,this.routerTracker=se,this.scopeService=we,this.message="Notifications message works!",this.notifications=[],this.notificationsLoading=!0,this.notificationMenu=[],this.openNotificationsSettings=()=>{this.routerTracker.switchState("app.notificationsettings",null)},this.scope=this.scopeService.getScope()}ngOnInit(){this.metaService.push("Benachrichtigung","Benachrichtigung"),this.notificationMenu.push({icon:"fa-regular fa-bell",text:"Als gelesen markieren",iconType:yr.MarkAllAsClicked}),this.notificationMenu.push({icon:"fa-solid fa-gear",text:this.scope.currentScope.network.resources.web_common_settings,iconType:yr.Settings}),this.loadNotifications(),this.notificationUpdateInterval=(0,q.Y)(3e4).subscribe(()=>{this.routerTracker.getCurrentRouteState().angularJsState.includes("app.main-notifications")&&this.loadNotifications()}),this.notificationService.updateUnseenCount()}ngOnDestroy(){this.notificationUpdateInterval&&this.notificationUpdateInterval.unsubscribe(),this.subscription&&this.subscription.unsubscribe()}clickNotification(l){this.notificationService.click(l),l.openSeparate?window.open(l.uri):this.redirectService.redirectNotificationUrl(l.uri)}notificationMenueItemClick(l){switch(l){case yr.MarkAllAsClicked:this.notificationService.markAllAsClicked().subscribe(O=>{this.notifications=this.notifications.map(F=>null===F.clicked?{...F,clicked:Date.now()}:F),this.loadNotifications()},O=>{console.log(O)});break;case yr.Settings:this.openNotificationsSettings()}}loadNotifications(){this.notificationsLoading=!0,this.notificationService.getNotifications().then(l=>{this.notifications=[...l],this.notificationsLoading=!1}).catch(()=>{this.notificationsLoading=!1})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Zl.R),o.rXU(cc.J),o.rXU(Zt),o.rXU(Rs.o),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-root-notifications"]],inputs:{inputParam:"inputParam"},decls:10,vars:8,consts:[[1,"root-notification"],[1,"root-notification-base"],[1,"row"],[1,"col-10","root-notification-title"],[1,"col-2"],[1,"float-end"],["text","","icon","overflow","stylingMode","text","type","normal",3,"onItemClick","dropDownOptions","items","showArrowIcon"],["class","notification-placeholder",4,"ngIf"],["class","notification-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"notification-placeholder"],[1,"notification-item"],[3,"click"],[1,"notification-item-test"],[1,"notification-avatar-wrapper"],["alt","Notification Image",1,"notification-image",3,"lazy-img"],[1,"notification-text-container"],[1,"notification-text"],[3,"innerHTML"],[1,"notification-time"],["class","status-dot",4,"ngIf"],[1,"status-dot"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),o.EFF(4),o.k0s(),o.j41(5,"div",4)(6,"div",5)(7,"dx-drop-down-button",6),o.bIt("onItemClick",function(we){return F.notificationMenueItemClick(we.itemData.iconType)}),o.k0s()()()(),o.DNE(8,Gi,2,1,"p",7)(9,Bo,13,10,"div",8),o.k0s()()),2&O&&(o.R7$(4),o.SpI(" ",F.scope.currentScope.network.resources.web_root_notification_title," "),o.R7$(3),o.Y8G("dropDownOptions",o.lJ4(7,li))("items",F.notificationMenu)("showArrowIcon",!1),o.R7$(),o.Y8G("ngIf",F.notifications&&0===F.notifications.length),o.R7$(),o.Y8G("ngForOf",F.notifications)("ngForTrackBy",F.trackById))},dependencies:[a.Sq,a.bT,Kt.h,Dr.L,Ri],styles:[".root-notification[_ngcontent-%COMP%]   .root-notification-title[_ngcontent-%COMP%]{font-size:2rem;color:var(--textColor);font-weight:600;line-height:130%;font-family:var(--fontSecondary);margin-bottom:1rem}.root-notification[_ngcontent-%COMP%]   .notification-item[_ngcontent-%COMP%]{cursor:pointer;border-bottom:none;vertical-align:middle;font-size:1.3em;line-height:1.5em;margin-top:-1px;padding:15px;overflow-x:hidden}.root-notification[_ngcontent-%COMP%]   .notification-text[_ngcontent-%COMP%]{width:calc(100% - 65px);float:left}.root-notification[_ngcontent-%COMP%]   .notification-image-round[_ngcontent-%COMP%]{border-radius:50%;width:10rem;min-width:10rem;object-fit:cover;padding:1.5rem;aspect-ratio:1}.root-notification[_ngcontent-%COMP%]   .notification-text-container[_ngcontent-%COMP%]{border-bottom:1px solid var(--textColor);margin-left:2rem;transform:translateY(5%);width:100%;color:var(--textColor60)}.root-notification[_ngcontent-%COMP%]   .notification-item-test[_ngcontent-%COMP%]{display:flex}.root-notification[_ngcontent-%COMP%]   .notification-image[_ngcontent-%COMP%]{aspect-ratio:4/3;width:10rem;object-fit:cover}.root-notification[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{border:none}.root-notification[_ngcontent-%COMP%]   .status-dot[_ngcontent-%COMP%]{width:.625rem;height:.625rem;background-color:var(--colorPrimary);border-radius:50%;position:absolute;top:10%;right:0;transform:translateY(-50%)}@media (max-width: 768px){.root-notification[_ngcontent-%COMP%]   .root-notification-title[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--textColor);font-weight:600;line-height:130%;font-family:var(--fontSecondary)}.root-notification[_ngcontent-%COMP%]   .notification-image[_ngcontent-%COMP%]{aspect-ratio:4/3;width:5rem;object-fit:unset}.root-notification[_ngcontent-%COMP%]   .notification-item[_ngcontent-%COMP%]{cursor:pointer;border-bottom:none;vertical-align:middle;font-size:.8rem;line-height:1.5em;margin-top:-1px;padding:15px;overflow-x:hidden}.root-notification[_ngcontent-%COMP%]   .notification-text[_ngcontent-%COMP%]{width:calc(100% - 20px);float:left}.root-notification[_ngcontent-%COMP%]   .notification-image-round[_ngcontent-%COMP%]{border-radius:50%;width:5rem;min-width:5rem;max-width:5rem;height:5rem;object-fit:cover;padding:.5rem}.root-notification[_ngcontent-%COMP%]   .notification-text-container[_ngcontent-%COMP%]{border-bottom:1px solid var(--textColor);margin-left:1rem;transform:translateY(5%);width:100%}}.root-notification[_ngcontent-%COMP%]     .dx-button-mode-text .dx-icon{color:var(--textColor);font-size:1.5rem}"]})}}return v})();var yr=function(v){return v[v.MarkAllAsClicked=0]="MarkAllAsClicked",v[v.Settings=1]="Settings",v}(yr||{});function Ur(v,p){if(1&v&&(o.j41(0,"div",7)(1,"a",8)(2,"div",9),o.nrm(3,"i",10),o.k0s(),o.j41(4,"div",11)(5,"span"),o.EFF(6),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.appLinkAndroid,o.B4B),o.R7$(5),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_appStore_android_button_text"))}}function Ar(v,p){if(1&v&&(o.j41(0,"div",12)(1,"a",8)(2,"div",9),o.nrm(3,"i",13),o.k0s(),o.j41(4,"div",11)(5,"span"),o.EFF(6),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.appLinkITunes,o.B4B),o.R7$(5),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_appStore_ios_button_text"))}}let Us=(()=>{class v{constructor(l,O){this.deviceInfoService=l,this.scopeService=O,this.showIos=!1,this.showAndroid=!1,this.appLinkITunes="",this.appLinkAndroid="",this.scope=O.getScope()}ngOnInit(){this.scope.currentScope.network.settings.appLinkAndroid&&(this.appLinkAndroid=this.scope.currentScope.network.settings.appLinkAndroid),this.scope.currentScope.network.settings.appLinkITunes&&(this.appLinkITunes=this.scope.currentScope.network.settings.appLinkITunes);let l=this.deviceInfoService.getUserAgentInfo();this.showIos=this.appLinkITunes.length>0&&(l.isIos||l.isOtherDevice),this.showAndroid=this.appLinkAndroid.length>0&&(l.isAndroid||l.isOtherDevice)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(s.E),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-app-store"]],decls:9,vars:3,consts:[[1,"container"],[1,"row"],[1,"col-12","d-flex","justify-content-center","mb-4"],[1,"app-store-heading"],[1,"row","app-store-button-wrapper"],["class","col-6 d-flex justify-content-end",4,"ngIf"],["class","col-6 d-flex justify-content-start app-store-button-ios-wrapper",4,"ngIf"],[1,"col-6","d-flex","justify-content-end"],[1,"btn","btn-outline-primary","d-flex",3,"href"],[1,"app-store-button-icon"],[1,"fa-brands","fa-android"],[1,"app-store-button-text"],[1,"col-6","d-flex","justify-content-start","app-store-button-ios-wrapper"],[1,"fa-brands","fa-apple"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1"),o.EFF(5),o.k0s()()()(),o.j41(6,"div",4),o.DNE(7,Ur,7,2,"div",5)(8,Ar,7,2,"div",6),o.k0s()()),2&O&&(o.R7$(5),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_appStore_pageTitle")),o.R7$(2),o.Y8G("ngIf",F.showAndroid),o.R7$(),o.Y8G("ngIf",F.showIos))},dependencies:[a.bT],styles:[".app-store-heading[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:3.75rem;font-weight:400;font-family:var(--fontPrimary)}.app-store-button-wrapper[_ngcontent-%COMP%]{padding-left:5%}.app-store-button-icon[_ngcontent-%COMP%]{padding-right:.313rem;font-size:1.563rem}.app-store-button-ios-wrapper[_ngcontent-%COMP%]{padding-left:5%}.app-store-button-text[_ngcontent-%COMP%]{font-size:1.563rem;font-weight:700;text-transform:uppercase}@media (max-width: 768px){.app-store-heading[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.75rem}.app-store-button-icon[_ngcontent-%COMP%], .app-store-button-text[_ngcontent-%COMP%]{font-size:1rem}}@media (max-width: 504px){.app-store-heading[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.75rem}.app-store-button-text[_ngcontent-%COMP%], .app-store-button-icon[_ngcontent-%COMP%]{font-size:.875rem}}"]})}}return v})();var ca=M(7316);function Ds(v,p){1&v&&(o.j41(0,"div",4),o.nrm(1,"app-legacy-translation"),o.k0s())}function al(v,p){if(1&v&&(o.j41(0,"div",6),o.nrm(1,"app-displayable-snip",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function Js(v,p){if(1&v&&(o.qex(0),o.DNE(1,al,2,1,"div",5),o.bVm()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngForOf",l.snips)}}let Ra=(()=>{class v{constructor(l,O){this.snipService=l,this.scopeService=O,this.snips=null,this.scope=O.getScope()}ngOnInit(){this.snipService.snips$.subscribe(l=>{this.snips=l.filter(O=>null==O.deleted).sort((O,F)=>new Date(F.published).getTime()-new Date(O.published).getTime())})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ra),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-snip-list"]],decls:4,vars:2,consts:[[1,"snip-list-base"],["class","snip-list-legacyTranslation",4,"ngIf"],[1,"snip-list"],[4,"ngIf"],[1,"snip-list-legacyTranslation"],["class","snip",4,"ngFor","ngForOf"],[1,"snip"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Ds,2,0,"div",1),o.j41(2,"div",2),o.DNE(3,Js,2,1,"ng-container",3),o.k0s()()),2&O&&(o.R7$(),o.Y8G("ngIf",F.snips),o.R7$(2),o.Y8G("ngIf",F.snips))},dependencies:[a.Sq,a.bT,dv,hv],styles:[".snip-list-base[_ngcontent-%COMP%]   .snip-list-legacyTranslation[_ngcontent-%COMP%]{padding-bottom:2rem}.snip-list-base[_ngcontent-%COMP%]   .snip-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;width:100%}.snip-list-base[_ngcontent-%COMP%]   .snip-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 calc(33.33% - 1.3333333333rem);max-width:calc(33.33% - 1.3333333333rem);box-sizing:border-box}@media (max-width: 768px){.snip-list-base[_ngcontent-%COMP%]   .snip-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 calc(100% - 4rem);max-width:calc(100% - 4rem);box-sizing:border-box}}"]})}}return v})();const el=()=>({width:"auto"});function ol(v,p){if(1&v&&o.nrm(0,"img",26),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function ns(v,p){if(1&v&&(o.j41(0,"div",27),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf;o.R7$(),o.SpI(" ",l.initials," ")}}function pa(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,ol,1,1,"img",24)(2,ns,2,1,"div",25),o.k0s()),2&v){const l=p.ngIf;o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}function ga(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,pa,3,2,"div",5),o.nI1(2,"createAvatar"),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",o.bMT(2,1,l.user))}}function Ya(v,p){if(1&v&&(o.j41(0,"span",30),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.E5c(" ",l.scope.currentScope.network.resources.web_common_requiredCharacters_0," ",l.scope.currentScope.chapter.settings.snipMinLength-l.previewData.text.length," ",l.scope.currentScope.network.resources.web_common_requiredCharacters_1," ")}}function Cl(v,p){if(1&v&&(o.j41(0,"span",30),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.E5c(" ",l.scope.currentScope.network.resources.web_common_remainingCharacters_0," ",l.scope.currentScope.chapter.settings.snipMaxLength-l.previewData.text.length," ",l.scope.currentScope.network.resources.web_common_remainingCharacters_1," ")}}function ql(v,p){if(1&v&&(o.j41(0,"div",28),o.DNE(1,Ya,2,3,"span",29)(2,Cl,2,3,"span",29),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",l.previewData.text.length<=l.scope.currentScope.chapter.settings.snipMinLength-1),o.R7$(),o.Y8G("ngIf",l.previewData.text.length>l.scope.currentScope.chapter.settings.snipMinLength-1)}}function zl(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",31)(1,"dx-button",32),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.addSnip())}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_common_publish")),o.Y8G("disabled",l.previewData.text.length<=5)}}function Il(v,p){if(1&v&&(o.j41(0,"div",42),o.nrm(1,"img",43),o.k0s()),2&v){const l=o.XpG().$implicit,O=o.XpG(2);o.R7$(),o.AVh("thumbnail-selected",O.thumbnailGuid===l.guid),o.Y8G("src",O.blob+O.blobFolder+l.assetImage.guid,o.B4B)}}function Sc(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",38),o.DNE(1,Il,2,3,"div",39),o.j41(2,"div",40)(3,"dx-drop-down-button",41),o.bIt("onItemClick",function(F){const se=o.eBV(l).$implicit,we=o.XpG(2);return o.Njj(we.imageMenuItemClick(F.itemData.type,se.guid))}),o.k0s()()()}if(2&v){const l=p.$implicit,O=o.XpG(2);o.R7$(),o.Y8G("ngIf",l.assetImage),o.R7$(2),o.Y8G("dropDownOptions",o.lJ4(6,el))("hoverStateEnabled",!1)("focusStateEnabled",!1)("items",O.imageMenu)("showArrowIcon",!1)}}function fc(v,p){if(1&v&&(o.j41(0,"div",33)(1,"div",34)(2,"div",35)(3,"div",36),o.DNE(4,Sc,4,7,"div",37),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(4),o.Y8G("ngForOf",null==l.snip?null:l.snip.assetReferences)}}function hd(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",31)(1,"dx-button",44),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.addSnip())}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_common_publish")),o.Y8G("disabled",l.previewData.text.length<=5)}}let Nu=(()=>{class v{constructor(l,O,F,se,we,We){this.scopeService=l,this.assetService=O,this.snipService=F,this.popupService=se,this.deviceInfoService=we,this.profileService=We,this.snip=null,this.previewData=null,this.snipRequestModel=null,this.blobFolder="/images/",this.thumbnailGuid=null,this.minTextLength=null,this.isMobile=!1,this.closeDrawer=new o.bkB,this.assetCreateResultCallback=gt=>{this.snip?.assetReferences.unshift(gt),this.snip?.assetReferences&&(this.previewData={...this.previewData,assetReferences:[...this.snip?.assetReferences]})},this.openImageDialog=(gt,Ft)=>{this.popupService.openPopup({title:"CreateImageDialog",component:Mn,width:"auto",height:"auto",onClose:()=>{},data:{templateUrl:"/ClientApp/src/legacy-app/asset/assetCreateImageDialog.html",controllerName:"AssetCreateImageDialog",bindings:{resultCallback:this.assetCreateResultCallback,files:gt,createAssetAsync:fi=>this.assetService.insertAssetImageToSnip(fi,Ft.id.toString())}}})},this.prepairPreview=()=>{this.previewData={originChapterSlug:"",chapterSlug:"",text:"",formattedText:"",published:null,archived:null,deleted:null,created:(new Date).toISOString(),calendarDate:null,score:0,likes:0,iLike:!1,assetReferences:[],chapterSlugs:[],path:"",articleListDisplayableType:"",moddifiedText:"",extendedConfigurations:null}},this.initImageMenu=()=>{this.imageMenu=[{icon:"fa-solid fa-trash-can",text:this.scope.currentScope.network.resources.web_snip_apply_image_menu_delete,type:"delete"},{icon:"fa-regular fa-image",text:this.scope.currentScope.network.resources.web_snip_apply_image_menu_set_thumbnail,type:"thumbnail"}]},this.scope=this.scopeService.getScope(),this.user=this.scope.profile,this.profileServiceSubscription=this.profileService.profileChanged$.subscribe(gt=>this.user=gt)}ngOnInit(){this.prepairPreview(),this.blob=this.scope.globalSettings.blobStorageCdnUrl,this.initImageMenu(),this.scope.currentScope.chapter.settings.snipMinLength&&(this.minTextLength=this.scope.currentScope.chapter.settings.snipMinLength),this.isMobile=this.deviceInfoService.getUserAgentInfo().isMobile||this.deviceInfoService.getUserAgentInfo().isApp}beforeUnloadHandler(l){this.snip?.id&&(l.preventDefault(),l.returnValue=!1)}ngOnDestroy(){this.clearInput(),this.profileServiceSubscription.unsubscribe()}onFilesSelected(l){var O=this;return(0,$e.A)(function*(){const F=l.target;if(F.files&&F.files.length>0){const se=Array.from(F.files);null==O.snip&&(O.snipRequestModel={text:O.previewData.text,chapters:[],chapterSlugs:[],deleted:new Date},O.snip=yield O.snipService.createSnip(O.snipRequestModel)),O.snip?.id&&O.openImageDialog(se,O.snip)}})()}clearInput(){this.previewData.text="",this.snip?.id&&(this.snipService.deleteSnipAsyncFromDatabase(this.snip.id),this.snip=null),this.prepairPreview(),this.previewData={...this.previewData},this.closeDrawer.emit()}addSnip(){if(this.previewData.text&&!this.snip?.id)this.snipService.createSnip({text:this.previewData.text,chapters:[],chapterSlugs:[]});else{if(!this.previewData.text||!this.snip?.id)return void alert("Bitte einen Text eingeben");this.snipService.updateSnipText(this.snip.id,this.previewData.text)}this.snip=null,this.clearInput()}adjustTextareaHeight(l){l.style.height="auto";const F=2*parseFloat(getComputedStyle(l).lineHeight);l.style.height=Math.min(l.scrollHeight,F)+"px",l.scrollTop=l.scrollHeight>F?l.scrollHeight:0}generateModifiedText(l){this.previewData.modifiedText="&"==l.slice(0,1)?"<span>"+l.slice(0,l.indexOf(";")+1)+"</span>"+l.slice(l.indexOf(";")+1):"<span>"+l.slice(0,1)+"</span>"+l.slice(1)}imageMenuItemClick(l,O){var F=this;return(0,$e.A)(function*(){switch(l){case"delete":F.snip&&F.snip.assetReferences&&(F.snip.assetReferences=F.snip.assetReferences.filter(se=>se.guid!==O)),F.assetService.remove(O).subscribe(()=>{},se=>{console.error(F.scope.currentScope.network.resources.web_snip_apply_image_delete_error,se)});break;case"thumbnail":null!=F.snip&&(F.snipService.setThumbnail(F.snip?.id,O),F.thumbnailGuid=O,F.previewData.extendedConfigurations=`{"thumbnailGuid":"${O}"}`,F.previewData={...F.previewData})}})()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Ki),o.rXU(ra),o.rXU(Qi.O),o.rXU(s.E),o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-snip-apply"]],hostBindings:function(O,F){1&O&&o.bIt("beforeunload",function(we){return F.beforeUnloadHandler(we)},!1,o.tSv)},outputs:{previewData:"previewData",closeDrawer:"closeDrawer"},decls:29,vars:11,consts:[["textArea",""],["fileInput",""],[1,"snip-apply-container","row"],[1,"snip-apply"],[1,"d-flex"],[4,"ngIf"],[1,"input-group","row"],[1,"col-12","col-md-8"],["rows","1",1,"form-control","snip-input",3,"ngModelChange","input","placeholder","ngModel"],[1,"row"],["class","col-12 snip-counter text-end",4,"ngIf"],[1,"col-12","mb-3","snip-add-image",3,"click","ngClass"],[1,"fa-regular","fa-image"],["type","file","accept","image/*","multiple","",2,"display","none",3,"change"],["class","d-flex justify-content-center mb-3",4,"ngIf"],["class","row align-items-start",4,"ngIf"],[1,"snip-preview-container","col-12","col-md-2"],[1,"cancle-icon",3,"click"],[1,"circle-icon"],[1,"fa-solid","fa-x"],[1,"preview-wrapper"],[1,"preview"],[3,"data","preview"],[1,"col-12","col-md-12","d-flex","justify-content-center"],["alt","User Avatar","class","avatar",3,"src",4,"ngIf"],["class","avatar-initials me-2",4,"ngIf"],["alt","User Avatar",1,"avatar",3,"src"],[1,"avatar-initials","me-2"],[1,"col-12","snip-counter","text-end"],["class","snip-infotext",4,"ngIf"],[1,"snip-infotext"],[1,"d-flex","justify-content-center","mb-3"],["stylingMode","text",1,"custom-publish-button",3,"onClick","disabled","text"],[1,"row","align-items-start"],[1,"col-12","col-md-12","snip-preview-container"],[1,"mt-1"],[1,"row","ml-3","image-preview-scrollview"],["class","col-4 col-sm-3 col-md-2 mb-5 position-relative snip-thumpnails",4,"ngFor","ngForOf"],[1,"col-4","col-sm-3","col-md-2","mb-5","position-relative","snip-thumpnails"],["class","image-container",4,"ngIf"],[1,"snip-previe-menu-button"],["text","","icon","fa-solid fa-gear","stylingMode","text","type","normal","displayExpr","text",3,"onItemClick","dropDownOptions","hoverStateEnabled","focusStateEnabled","items","showArrowIcon"],[1,"image-container"],["alt","Image",1,"img-fluid","snip-thumbnail-image",3,"src"],["stylingMode","contained",1,"custom-publish-button",3,"onClick","disabled","text"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",2)(1,"div",3)(2,"div",4),o.DNE(3,ga,3,3,"div",5),o.j41(4,"div",6)(5,"div",7)(6,"textarea",8,0),o.mxI("ngModelChange",function(We){return o.eBV(se),o.DH7(F.previewData.text,We)||(F.previewData.text=We),o.Njj(We)}),o.bIt("ngModelChange",function(We){return o.eBV(se),o.Njj(F.generateModifiedText(We))})("input",function(){o.eBV(se);const We=o.sdS(7);return o.Njj(F.adjustTextareaHeight(We))}),o.EFF(8,"                        "),o.k0s(),o.j41(9,"div",9),o.DNE(10,ql,3,2,"div",10),o.j41(11,"div",11),o.bIt("click",function(){o.eBV(se);const We=o.sdS(14);return o.Njj(We.click())}),o.nrm(12,"i",12),o.j41(13,"input",13,1),o.bIt("change",function(We){return o.eBV(se),o.Njj(F.onFilesSelected(We))}),o.k0s(),o.j41(15,"div"),o.EFF(16),o.k0s()()(),o.DNE(17,zl,2,2,"div",14)(18,fc,5,1,"div",15),o.k0s(),o.j41(19,"div",16)(20,"div")(21,"div",17),o.bIt("click",function(){return o.eBV(se),o.Njj(F.clearInput())}),o.j41(22,"div",18),o.nrm(23,"i",19),o.k0s()(),o.j41(24,"div",20)(25,"div",21),o.nrm(26,"app-displayable-snip",22)(27,"div",23),o.k0s()()()()()(),o.DNE(28,hd,2,2,"div",14),o.k0s()()}2&O&&(o.R7$(3),o.Y8G("ngIf",!F.isMobile),o.R7$(3),o.Y8G("placeholder",F.scope.currentScope.network.getResourceOrKeyName("web_snipList_createTextPlaceholder")),o.R50("ngModel",F.previewData.text),o.R7$(4),o.Y8G("ngIf",F.previewData.text.length>0&&F.minTextLength),o.R7$(),o.Y8G("ngClass",F.previewData.text?"mt-0":"mt-3"),o.R7$(5),o.SpI(" ",F.scope.currentScope.network.resources.web_snip_apply_add_image," "),o.R7$(),o.Y8G("ngIf",F.isMobile),o.R7$(),o.Y8G("ngIf",null==F.snip?null:F.snip.assetReferences),o.R7$(8),o.Y8G("data",F.previewData)("preview",!0),o.R7$(2),o.Y8G("ngIf",!F.isMobile))},dependencies:[a.YU,a.Sq,a.bT,et.me,et.BC,et.vS,Hi.e,Kt.h,dv,Ma],styles:[".snip-apply-container[_ngcontent-%COMP%]   .snip-input[_ngcontent-%COMP%]{resize:none;overflow:hidden;min-height:1em}.snip-apply-container[_ngcontent-%COMP%]   .snip-add-image[_ngcontent-%COMP%]{display:flex;font-size:1.2rem;cursor:pointer}.snip-apply-container[_ngcontent-%COMP%]   .snip-add-image[_ngcontent-%COMP%]   .fa-image[_ngcontent-%COMP%]{font-size:1.8rem;margin-right:1rem}.snip-apply-container[_ngcontent-%COMP%]   .snip-list-gallery[_ngcontent-%COMP%]{transform:translateY(-18%)}.snip-apply-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:block}.snip-apply-container[_ngcontent-%COMP%]   .avatar-initials[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;background-color:#ccc;color:var(--textColor);font-size:1.5rem}.snip-apply-container[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border:none;border-radius:0;width:100%;font-size:1.5rem;padding-right:2.5rem;background-color:transparent;border-bottom:1px solid var(--light-gray)}.snip-apply-container[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none;border-bottom:1px solid var(--textColor)}.snip-apply-container[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.snip-apply-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:0;border:none;background:none;color:var(--textColor);font-size:1.2rem;margin-left:1rem}.snip-apply-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover{color:var(--light-gray)}.snip-apply-container[_ngcontent-%COMP%]   .btn-cancel[_ngcontent-%COMP%]{color:var(--textColor)}.snip-apply-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:disabled{color:var(--light-gray);cursor:not-allowed;border:none}.snip-apply-container[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{position:relative;width:100%;padding-top:75%;overflow:hidden;background-color:var(--textColor)}.snip-apply-container[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center}.snip-apply-container[_ngcontent-%COMP%]   .snip-previe-menu-button[_ngcontent-%COMP%]{position:absolute;bottom:-20px;left:38%;background:#fff;border-radius:50%;border:1px solid var(--textColor60);width:30px;height:30px;padding:0;display:flex;align-items:center;z-index:1;justify-content:center}.snip-apply-container[_ngcontent-%COMP%]   .snip-thumbnail-image[_ngcontent-%COMP%]{border:3px solid white}.snip-apply-container[_ngcontent-%COMP%]   .snip-thumbnail-image.thumbnail-selected[_ngcontent-%COMP%]{border:3px solid var(--colorPrimary)}.snip-apply-container[_ngcontent-%COMP%]   .snip-thumbnail-text[_ngcontent-%COMP%]{font-size:1.2rem;font-family:var(--fontPrimary)}.snip-apply-container[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]{width:calc(var(--designContentWidth) * .33 - 2rem);transform:translateY(-9%);margin-left:2rem}.snip-apply-container[_ngcontent-%COMP%]   .cancle-icon[_ngcontent-%COMP%]{position:absolute;top:-4.5rem;right:-1.5rem;cursor:pointer}.snip-apply-container[_ngcontent-%COMP%]   .cancle-icon[_ngcontent-%COMP%]   .circle-icon[_ngcontent-%COMP%]{width:1.7rem;height:1.7rem;border:1px solid var(--textColor);border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--backgroundColor)}.snip-apply-container[_ngcontent-%COMP%]   .cancle-icon[_ngcontent-%COMP%]   .circle-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--textColor);font-size:.8rem}.snip-apply-container[_ngcontent-%COMP%]   .snip-infotext[_ngcontent-%COMP%]{font-size:.7rem}.snip-apply-container[_ngcontent-%COMP%]   .custom-publish-button[_ngcontent-%COMP%]{border-radius:1.25rem;color:var(--textColor);cursor:pointer}.snip-apply-container[_ngcontent-%COMP%]   .image-preview-scrollview[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}@media (max-width: 768px){.snip-apply-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:3rem;height:3rem;border-radius:50%;margin-right:10px}.snip-apply-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:0;border:none;background:none;color:var(--textColor);font-size:1rem;margin-left:1rem}.snip-apply-container[_ngcontent-%COMP%]   .input-group[_ngcontent-%COMP%]{flex-grow:1;position:relative;display:flex;flex-direction:column;background-color:transparent}.snip-apply-container[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:1rem}.snip-apply-container[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border:none;border-radius:0;width:100%;font-size:1rem;padding-right:2.5rem;background-color:transparent}.snip-apply-container[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none;border-bottom:1px solid var(--textColor)}.snip-apply-container[_ngcontent-%COMP%]   .snip-add-image[_ngcontent-%COMP%]{display:flex;font-size:.8rem;cursor:pointer;justify-content:center}.snip-apply-container[_ngcontent-%COMP%]   .snip-add-image[_ngcontent-%COMP%]   .fa-image[_ngcontent-%COMP%]{font-size:1.2rem;margin-right:.6rem}.snip-apply-container[_ngcontent-%COMP%]   .preview-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center}.snip-apply-container[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]{width:calc(var(--designContentWidth) * .33 - 2rem);transform:translateY(0);margin-left:0rem;transform:scale(.8)}.snip-apply-container[_ngcontent-%COMP%]   .snip-counter[_ngcontent-%COMP%]{margin-bottom:1.5rem}.snip-apply-container[_ngcontent-%COMP%]   .cancle-icon[_ngcontent-%COMP%]{position:absolute;top:-3.5rem;right:-1rem;cursor:pointer}.snip-apply-container[_ngcontent-%COMP%]   .snip-input[_ngcontent-%COMP%]{resize:none;overflow:hidden;min-height:4rem}}"]})}}return v})();function Jp(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",8)(2,"div",9)(3,"app-snip-apply",10),o.bIt("closeDrawer",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.closeDrawerHandler())}),o.k0s()()()()}}function Vc(v,p){if(1&v&&(o.j41(0,"div",11)(1,"div",12)(2,"h2",13),o.EFF(3),o.k0s(),o.j41(4,"p"),o.EFF(5),o.k0s(),o.j41(6,"dx-button",14),o.EFF(7),o.k0s()()()),2&v){const l=o.XpG();o.R7$(3),o.JRh(l.scope.currentScope.network.resources.web_snipList_createTitle),o.R7$(2),o.JRh(l.scope.currentScope.network.resources.web_snipList_createTextPlaceholder),o.R7$(),o.Y8G("authorizedClickSource","NewSnip"),o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("admin_common_signIn")," ")}}function lh(v,p){if(1&v&&o.nrm(0,"img",20),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function Ho(v,p){if(1&v&&(o.j41(0,"div",21),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf;o.R7$(),o.SpI(" ",l.initials," ")}}function ks(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,lh,1,1,"img",18)(2,Ho,2,1,"div",19),o.k0s()),2&v){const l=p.ngIf;o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}function Dh(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",15),o.DNE(1,ks,3,2,"div",16),o.nI1(2,"createAvatar"),o.j41(3,"dx-button",17),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.showDrawer())}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",o.bMT(2,2,l.user)),o.R7$(2),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_snip_create"))}}let ru=(()=>{class v{constructor(l,O){this.scopeService=l,this.profileService=O,this.drawerOpen=!1,this.showDrawer=()=>{this.drawerOpen=!0},this.scope=l.getScope(),this.user=this.scope.profile,this.profileServiceSubscription=this.profileService.profileChanged$.subscribe(F=>this.user=F)}ngOnDestroy(){this.profileServiceSubscription.unsubscribe()}ngOnInit(){}closeDrawerHandler(){this.drawerOpen=!1}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-snips"]],viewQuery:function(O,F){if(1&O&&o.GBs(ca.b,7),2&O){let se;o.mGM(se=o.lsd())&&(F.drawer=se.first)}},decls:12,vars:7,consts:[[1,"snips-component"],["position","top","revealMode","slide","template","template","width","'100vw'",3,"openedChange","openedStateMode","shading","opened","closeOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"],[1,"snip-list-component-wrapper"],[1,"snip-list-component"],[1,"root-newSnip"],["class","d-flex flex-column align-items-center",4,"ngIf"],["class","snip-apply-component",4,"ngIf"],[1,"d-flex","justify-content-center"],[1,"snip-input-container"],[3,"closeDrawer"],[1,"d-flex","flex-column","align-items-center"],[1,"mt-5"],[1,"instruction"],["appAuthorizedClick","",3,"authorizedClickSource"],[1,"snip-apply-component"],[4,"ngIf"],["stylingMode","contained",1,"custom-create-snip-button",3,"onClick","text"],["alt","User Avatar","class","avatar",3,"src",4,"ngIf"],["class","avatar-initials me-2",4,"ngIf"],["alt","User Avatar",1,"avatar",3,"src"],[1,"avatar-initials","me-2"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"dx-drawer",1),o.mxI("openedChange",function(we){return o.DH7(F.drawerOpen,we)||(F.drawerOpen=we),we}),o.DNE(2,Jp,4,0,"div",2),o.j41(3,"div",3)(4,"div",4)(5,"div",5),o.DNE(6,Vc,8,4,"div",6),o.k0s(),o.DNE(7,Dh,4,4,"div",7),o.nrm(8,"div")(9,"br"),o.j41(10,"div"),o.nrm(11,"app-snip-list"),o.k0s()()()()()),2&O&&(o.R7$(),o.Y8G("openedStateMode","overlap")("shading",!0),o.R50("opened",F.drawerOpen),o.Y8G("closeOnOutsideClick",!1),o.R7$(),o.Y8G("dxTemplateOf","template"),o.R7$(4),o.Y8G("ngIf",!F.user.isRegistered||!F.user.hasPartnerAccessAllowed),o.R7$(),o.Y8G("ngIf",F.user.isRegistered||F.user.hasPartnerAccessAllowed))},dependencies:[a.bT,Rt.eC,Hi.e,ca.b,$o,Ra,Nu,Ma],styles:[".snips-component[_ngcontent-%COMP%]{margin:0 -100%;padding:0 100%;padding-top:.7rem;background-color:var(--color2-alpha50)}.snips-component[_ngcontent-%COMP%]     .dx-overlay-content{z-index:1501;left:0;top:0;transform:translate(0);transition:none;padding-top:5rem;padding-left:1rem;padding-right:1rem;height:auto!important;background-color:var(--colorSecondary);box-shadow:0 5px 6px 0 var(--color2-alpha50)}.snips-component[_ngcontent-%COMP%]     .dx-overlay-wrapper{height:auto!important;background-color:var(--colorSecondary)}.snips-component[_ngcontent-%COMP%]   .snip-apply-component[_ngcontent-%COMP%]{padding-top:5rem;margin-bottom:1rem;display:flex;justify-content:center;align-items:center}.snips-component[_ngcontent-%COMP%]   .snip-input-container[_ngcontent-%COMP%]{width:var(--designContentWidth)}.snips-component[_ngcontent-%COMP%]   .snip-list-component-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center}.snips-component[_ngcontent-%COMP%]   .snip-list-component-wrapper[_ngcontent-%COMP%]   .snip-list-component[_ngcontent-%COMP%]{width:var(--designContentWidth)}.snips-component[_ngcontent-%COMP%]   .custom-create-snip-button[_ngcontent-%COMP%]{border-radius:1.25rem;color:var(--textColor);cursor:pointer}.snips-component[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:3.5rem;height:3.5rem;border-radius:50%;display:block;margin-right:1.2rem}.snips-component[_ngcontent-%COMP%]   .avatar-initials[_ngcontent-%COMP%]{width:3.5rem;height:3.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;background-color:#ccc;color:var(--textColor);font-size:1.2rem;margin-right:1.2rem}@media (max-width: 768px){.snips-component[_ngcontent-%COMP%]{padding-top:0rem}.snips-component[_ngcontent-%COMP%]     .dx-overlay-wrapper{height:100vh!important;background-color:var(--colorSecondary);overflow:auto}.snips-component[_ngcontent-%COMP%]     .dx-drawer-panel-content.dx-overlay.dx-widget.dx-visibility-change-handler{transform:translate(0)!important}.snips-component[_ngcontent-%COMP%]   .snip-input-container[_ngcontent-%COMP%]{width:85%}.snips-component[_ngcontent-%COMP%]   .snip-apply-component[_ngcontent-%COMP%]{padding-top:4rem;display:flex;justify-content:center}}"]})}}return v})();var ba=M(1522),qp=M(3070);function su(v,p){1&v&&o.nrm(0,"i",11)}function mc(v,p){if(1&v&&(o.j41(0,"div",8)(1,"div",4),o.nrm(2,"i")(3,"span",9),o.DNE(4,su,1,0,"i",10),o.k0s()()),2&v){const l=p.$implicit;o.R7$(2),o.ZvI("",l.icon," navigation-bar-browser-submenu-item-icon"),o.R7$(),o.Y8G("innerHTML",l.text,o.npT),o.R7$(),o.Y8G("ngIf",l.items.length>0)}}function Fd(v,p){if(1&v&&(o.j41(0,"div")(1,"a",14)(2,"div",15),o.nrm(3,"i"),o.k0s(),o.j41(4,"div",16),o.nrm(5,"span",17),o.k0s()()()),2&v){const l=o.XpG().$implicit;o.R7$(),o.Y8G("ngClass",l.isSelected?"navigation-bar-broser-menu-item-content-wrapper-selected":"navigation-bar-browser-menu-item-content-wrapper"),o.R7$(2),o.HbH(l.icon),o.R7$(2),o.Y8G("innerHTML",l.text,o.npT)}}function eg(v,p){1&v&&(o.j41(0,"div",15),o.nrm(1,"i",11),o.k0s())}function hp(v,p){if(1&v&&(o.j41(0,"div")(1,"div",18)(2,"div",15),o.nrm(3,"i"),o.k0s(),o.j41(4,"div",16),o.nrm(5,"span",17),o.k0s(),o.DNE(6,eg,2,0,"div",19),o.k0s()()),2&v){const l=o.XpG().$implicit;o.R7$(3),o.HbH(l.icon),o.R7$(2),o.Y8G("innerHTML",l.text,o.npT),o.R7$(),o.Y8G("ngIf",0!=l.items.length)}}function Zg(v,p){if(1&v&&(o.j41(0,"div",12),o.DNE(1,Fd,6,4,"div",13)(2,hp,7,4,"div",13),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngIf",l.url),o.R7$(),o.Y8G("ngIf",!l.url)}}let KS=(()=>{class v{constructor(l){this.navigationService=l,this.displayedSlots=[],this.lastScreenWidth=window.innerWidth,this.isMobile=!1,this.mobileBreakpoint=768,this.lastOpenedSubmenuIndex=null,this.isMobile=this.lastScreenWidth<this.mobileBreakpoint,this.subscription=this.navigationService.displayedSlots$.subscribe(O=>{this.displayedSlots=O})}resize(l){l.target.innerWidth!=this.lastScreenWidth&&(this.lastScreenWidth=l.target.innerWidth,this.isMobile&&this.lastScreenWidth>=this.mobileBreakpoint?(this.isMobile=!1,this.displayedSlots=this.navigationService.getNavigationSlots()):!this.isMobile&&this.lastScreenWidth<this.mobileBreakpoint&&(this.isMobile=!0,this.displayedSlots=this.navigationService.getNavigationSlots()))}ngOnInit(){}ngOnDestroy(){this.subscription.unsubscribe()}itemClick(l){let O=l.itemData;O&&(O.url?(O.url.startsWith("http")?window.open(O.url,O.linkAttr):window.history.pushState("","",O.url),this.displayedSlots.forEach(F=>{F.isSelected=!1}),O.isSelected=!0):this.lastOpenedSubmenuIndex==O.id?(setTimeout(()=>{l.component._visibleSubmenu?.hide()}),this.lastOpenedSubmenuIndex=null):this.lastOpenedSubmenuIndex=O.id)}onSubmenuHiding(l){this.lastOpenedSubmenuIndex==l.itemData.id&&(this.lastOpenedSubmenuIndex=null)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ba.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-bar-browser"]],hostBindings:function(O,F){1&O&&o.bIt("resize",function(we){return F.resize(we)},!1,o.tSv)},decls:8,vars:5,consts:[["menu",""],[1,"navigation-bar-base"],[1,"navigation-bar-alignment-wrapper"],[1,"navigation-bar-browser-wrapper"],[1,""],["displayExpr","text","itemTemplate","subMenuItem","width","100%","height","50px",1,"navigation-bar-browser-menu",3,"onItemClick","onSubmenuHiding","dataSource","focusStateEnabled","hideSubmenuOnMouseLeave"],["class","navigation-bar-browser-submenu-item-wrapper",4,"dxTemplate","dxTemplateOf"],["class","navigation-bar-browser-menu-item-wrapper",4,"dxTemplate","dxTemplateOf"],[1,"navigation-bar-browser-submenu-item-wrapper"],[1,"navigation-bar-browser-submenu-item-text",3,"innerHTML"],["class","fa-solid fa-angle-down",4,"ngIf"],[1,"fa-solid","fa-angle-down"],[1,"navigation-bar-browser-menu-item-wrapper"],[4,"ngIf"],[3,"ngClass"],[1,"navigation-bar-browser-menu-item-icon-wrapper"],[1,"navigation-bar-browser-menu-item-text-wrapper"],[3,"innerHTML"],[1,"navigation-bar-browser-menu-item-content-wrapper"],["class","navigation-bar-browser-menu-item-icon-wrapper",4,"ngIf"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"dx-menu",5,0),o.bIt("onItemClick",function(We){return o.eBV(se),o.Njj(F.itemClick(We))})("onSubmenuHiding",function(We){return o.eBV(se),o.Njj(F.onSubmenuHiding(We))}),o.DNE(6,mc,5,5,"div",6)(7,Zg,3,2,"div",7),o.k0s()()()()()}2&O&&(o.R7$(4),o.Y8G("dataSource",F.displayedSlots)("focusStateEnabled",!1)("hideSubmenuOnMouseLeave",!0),o.R7$(2),o.Y8G("dxTemplateOf","subMenuItem"),o.R7$(),o.Y8G("dxTemplateOf","topMenuItem"))},dependencies:[a.YU,a.bT,Rt.eC,qp.b],styles:[".dx-submenu{max-height:15.625rem!important}.navigation-bar-base[_ngcontent-%COMP%]{display:flex;justify-content:center}.navigation-bar-base[_ngcontent-%COMP%]     .dx-menu-horizontal{overflow:hidden}.navigation-bar-base[_ngcontent-%COMP%]     .dx-menu-horizontal .dx-menu-items-container .dx-menu-separator{width:1px;background-color:var(--textColor);padding-right:0;margin:1rem 0}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-alignment-wrapper[_ngcontent-%COMP%]{width:calc(var(--designContentWidth) + 32px)}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu[_ngcontent-%COMP%]{width:100%}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu[_ngcontent-%COMP%]     ul{display:flex;align-items:stretch;justify-content:space-between}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu[_ngcontent-%COMP%]     ul li{overflow:hidden;padding:.25rem 0}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-wrapper[_ngcontent-%COMP%]{align-items:center;justify-content:center}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-submenu-item-wrapper[_ngcontent-%COMP%], .navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-submenu-item-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--textColor)}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-content-wrapper[_ngcontent-%COMP%]{display:block;color:var(--textColor)}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-broser-menu-item-content-wrapper-selected[_ngcontent-%COMP%]{display:block;color:var(--colorPrimary)}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-icon-wrapper[_ngcontent-%COMP%]{display:inline-block;font-size:1.19rem;overflow:hidden}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-text-wrapper[_ngcontent-%COMP%]{display:inline-block;margin-left:.313rem;text-transform:uppercase;font-weight:600;font-size:1.19rem;overflow:hidden;white-space:nowrap}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-text-wrapper[_ngcontent-%COMP%]     div{text-overflow:ellipsis;overflow:hidden;width:100%}@media (max-width: 768px){.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-alignment-wrapper[_ngcontent-%COMP%]{width:100%}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-icon-wrapper[_ngcontent-%COMP%], .navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-text-wrapper[_ngcontent-%COMP%]{font-size:1.125rem}.navigation-bar-base[_ngcontent-%COMP%]     .dx-menu-horizontal .dx-menu-items-container .dx-menu-separator{height:1.125rem}}@media (max-width: 576px){.navigation-bar-base[_ngcontent-%COMP%]     .dx-menu-horizontal .dx-menu-items-container .dx-menu-separator{height:1rem}.navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-icon-wrapper[_ngcontent-%COMP%], .navigation-bar-base[_ngcontent-%COMP%]   .navigation-bar-browser-menu-item-text-wrapper[_ngcontent-%COMP%]{font-size:.7rem}}"]})}}return v})();var Vd=M(2459),ec=M(1246);const Ec=v=>({"navigation-bar-app-submenu-list-separator":v});function yl(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",5)(1,"dx-button",6),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.back())}),o.nrm(2,"i",7),o.k0s()()}}function Oc(v,p){if(1&v&&(o.j41(0,"div")(1,"a",8)(2,"div",9),o.nrm(3,"i"),o.k0s(),o.j41(4,"div",10),o.nrm(5,"span",11),o.k0s()()()),2&v){const l=o.XpG(),O=l.$implicit,F=l.index;o.R7$(),o.Y8G("ngClass",o.eq3(6,Ec,O.beginGroup&&0!=F))("href",O.url,o.B4B)("target",O.linkAttr),o.R7$(2),o.HbH(O.icon),o.R7$(2),o.Y8G("innerHTML",O.text,o.npT)}}function Fu(v,p){1&v&&(o.j41(0,"div",9),o.nrm(1,"i",14),o.k0s())}function jc(v,p){if(1&v&&(o.j41(0,"div")(1,"div",12)(2,"div",9),o.nrm(3,"i"),o.k0s(),o.j41(4,"div",10),o.nrm(5,"span",11),o.k0s(),o.DNE(6,Fu,2,0,"div",13),o.k0s()()),2&v){const l=o.XpG(),O=l.$implicit,F=l.index;o.R7$(),o.Y8G("ngClass",o.eq3(5,Ec,O.beginGroup&&0!=F)),o.R7$(2),o.HbH(O.icon),o.R7$(2),o.Y8G("innerHTML",O.text,o.npT),o.R7$(),o.Y8G("ngIf",O.items.length>0)}}function Ah(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,yl,3,0,"div",3)(2,Oc,6,8,"div",4)(3,jc,7,7,"div",4),o.k0s()),2&v){const l=p.$implicit,O=p.index,F=o.XpG();o.R7$(),o.Y8G("ngIf",0==O&&0!=F.previousDisplayedSlots.length),o.R7$(),o.Y8G("ngIf",l.url),o.R7$(),o.Y8G("ngIf",!l.url)}}let TC=(()=>{class v{constructor(){this.items=[],this.itemsChange=new o.bkB,this.currentDisplayedSlots=[],this.previousDisplayedSlots=[]}ngOnInit(){this.currentDisplayedSlots=this.items}ngOnChanges(){this.currentDisplayedSlots=this.items,this.previousDisplayedSlots=[]}itemClick(l){let O=l.itemData;O.url?(this.currentDisplayedSlots=[],this.previousDisplayedSlots=[],this.items=[],this.itemsChange.emit(this.items),O.url.startsWith("http")?window.open(O.url,O.linkAttr):window.history.pushState("","",O.url)):O.items&&O.items.length>0&&(this.previousDisplayedSlots.unshift(this.currentDisplayedSlots),this.currentDisplayedSlots=O.items)}back(){this.currentDisplayedSlots=this.previousDisplayedSlots[0],this.previousDisplayedSlots.splice(0,1)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-bar-app-sub-menu"]],inputs:{items:"items"},outputs:{itemsChange:"itemsChange"},features:[o.OA$],decls:5,vars:2,consts:[[1,"navigation-bar-app-submenu-background"],[1,"navigation-bar-app-submenu-list",3,"onItemClick","dataSource"],[4,"dxTemplate","dxTemplateOf"],["class","navigation-bar-app-submenu-list-back-button",4,"ngIf"],[4,"ngIf"],[1,"navigation-bar-app-submenu-list-back-button"],[3,"onClick"],[1,"fa","fa-angle-left"],[1,"navigation-bar-app-submenu-list-content-wrapper",3,"ngClass","href","target"],[1,"navigation-bar-app-submenu-list-icon-wrapper"],[1,"navigation-bar-app-submenu-list-text-wrapper"],[3,"innerHTML"],[1,"navigation-bar-app-submenu-list-content-wrapper",3,"ngClass"],["class","navigation-bar-app-submenu-list-icon-wrapper",4,"ngIf"],[1,"fa-solid","fa-angle-right"]],template:function(O,F){1&O&&(o.j41(0,"div"),o.nrm(1,"div",0),o.j41(2,"div")(3,"dx-list",1),o.bIt("onItemClick",function(we){return F.itemClick(we)}),o.DNE(4,Ah,4,3,"div",2),o.k0s()()()),2&O&&(o.R7$(3),o.Y8G("dataSource",F.currentDisplayedSlots),o.R7$(),o.Y8G("dxTemplateOf","item"))},dependencies:[a.YU,a.bT,Rt.eC,Hi.e,ec.a],styles:[".dx-state-hover{background-color:transparent!important}.navigation-bar-app-submenu-list[_ngcontent-%COMP%]{bottom:3.125rem;width:100%;max-height:70%;height:auto;display:flex;justify-content:center;z-index:1030;background-color:var(--backgroundColor);position:fixed;padding:4rem 1rem 3.5rem;color:var(--textColor)}.navigation-bar-app-submenu-list[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.navigation-bar-app-submenu-list-separator[_ngcontent-%COMP%]{border-top:.125rem var(--textColor60) solid}.navigation-bar-app-submenu-list-content-wrapper[_ngcontent-%COMP%]{display:flex;font-size:1.125rem;color:var(--textColor)}.navigation-bar-app-submenu-list-text-wrapper[_ngcontent-%COMP%]{padding-top:1rem}.navigation-bar-app-submenu-list-icon-wrapper[_ngcontent-%COMP%]{padding:1rem .313rem 0}.navigation-bar-app-submenu-list-back-button[_ngcontent-%COMP%]{padding-bottom:5%}.navigation-bar-app-submenu-background[_ngcontent-%COMP%]{position:fixed;z-index:999;height:100%;width:100%;background-color:var(--textColor60)}"]})}}return v})();function Ih(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"app-navigation-bar-app-sub-menu",2),o.mxI("itemsChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.subMenuItems,F)||(se.subMenuItems=F),o.Njj(F)}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.R50("items",l.subMenuItems)}}let tg=(()=>{class v{constructor(l,O){this.navigationService=l,this.location=O,this.displayedSlots=[],this.subMenuItems=[],this.inAppView=!1,this.selected=null,this.inAppView=window.hasOwnProperty("cordova")||window.hasOwnProperty("Capacitor"),this.subscription=this.navigationService.displayedSlots$.subscribe(F=>{this.displayedSlots=F})}ngOnInit(){this.displayedSlots.forEach(l=>{l.isSelected&&(this.selected=l)})}ngOnDestroy(){this.subscription.unsubscribe()}itemClick(l){let O=l.itemData;O.url?(this.subMenuItems=[],O.url.startsWith("http")?window.open(O.url,O.linkAttr):window.history.pushState("","",O.url)):O.items&&O.items.length>0&&(this.subMenuItems=this.subMenuItems!=O.items?O.items:[])}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ba.o),o.rXU(a.aZ))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-bar-app"]],decls:3,vars:3,consts:[[4,"ngIf"],[1,"navigation-bar-app-tabs",3,"onItemClick","dataSource","selectedItem"],[3,"itemsChange","items"]],template:function(O,F){1&O&&(o.DNE(0,Ih,2,1,"div",0),o.j41(1,"div")(2,"dx-tabs",1),o.bIt("onItemClick",function(we){return F.itemClick(we)}),o.k0s()()),2&O&&(o.Y8G("ngIf",F.subMenuItems.length>0),o.R7$(2),o.Y8G("dataSource",F.displayedSlots)("selectedItem",F.selected))},dependencies:[a.bT,Vd.s,TC],styles:[".navigation-bar-app-tabs[_ngcontent-%COMP%]{width:100%;bottom:0;position:fixed;z-index:1030;background-color:var(--backgroundColor);border-top:.188rem solid var(--textColor);padding:0 1rem}"]})}}return v})();var De=M(7421);function Li(v,p){if(1&v&&(o.j41(0,"div")(1,"div",5),o.nrm(2,"img",6),o.k0s()()),2&v){const l=p.$implicit;o.R7$(2),o.Y8G("src",l,o.B4B)}}function H(v,p){if(1&v){const l=o.RV6();o.j41(0,"app-image-viewer",7),o.bIt("close",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.closeImageViewer())}),o.k0s()}if(2&v){const l=o.XpG();o.Y8G("imageUrl",l.currentImageUrl)}}let Ne=(()=>{class v{constructor(){this.images=[],this.wrapAround=!1,this.imageViewerOpen=!1,this.onImageClick=l=>{this.openImageViewer(l.itemData)}}ngOnInit(){this.images.length>1&&(this.wrapAround=!0)}openImageViewer(l){this.currentImageUrl=l,this.imageViewerOpen=!0}closeImageViewer(){this.imageViewerOpen=!1}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-image-gallery"]],inputs:{images:"images"},decls:5,vars:11,consts:[["gallery",""],[1,"image-gallery-container"],["id","gallery",3,"onItemClick","dataSource","slideshowDelay","height","width","loop","showNavButtons","showIndicator","wrapAround","selectedItem"],[4,"dxTemplate","dxTemplateOf"],[3,"imageUrl","close",4,"ngIf"],[1,"gallery-image"],["alt","Gallery Image",1,"resized-image",3,"src"],[3,"close","imageUrl"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",1)(1,"dx-gallery",2,0),o.bIt("onItemClick",function(We){return o.eBV(se),o.Njj(F.onImageClick(We))}),o.DNE(3,Li,3,1,"div",3),o.k0s()(),o.DNE(4,H,1,1,"app-image-viewer",4)}2&O&&(o.R7$(),o.Y8G("dataSource",F.images)("slideshowDelay",0)("height","auto")("width","auto")("loop",!0)("showNavButtons",F.wrapAround)("showIndicator",F.wrapAround)("wrapAround",F.wrapAround)("selectedItem",F.selectedItem),o.R7$(2),o.Y8G("dxTemplateOf","item"),o.R7$(),o.Y8G("ngIf",F.imageViewerOpen))},dependencies:[a.bT,Rt.eC,De.O,us],styles:[".image-gallery-container[_ngcontent-%COMP%]   .gallery-image[_ngcontent-%COMP%]{width:100%;height:300px;overflow:hidden}.image-gallery-container[_ngcontent-%COMP%]   .resized-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.image-gallery-container[_ngcontent-%COMP%]     .dx-gallery-item{transform:scale(.8)}.image-gallery-container[_ngcontent-%COMP%]     .dx-gallery-item-selected{transform:scale(1.2)}"]})}}return v})();function Vn(v,p){if(1&v&&o.nrm(0,"img",19),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function vs(v,p){if(1&v&&(o.j41(0,"div",20),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf;o.R7$(),o.SpI(" ",l.initials," ")}}function Yr(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,Vn,1,1,"img",17)(2,vs,2,1,"div",18),o.k0s()),2&v){const l=p.ngIf;o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}function ng(v,p){if(1&v&&(o.j41(0,"div",21),o.nrm(1,"app-oha",22),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("snip",l.snip)("source","ArticleDisplayable")("size","md")}}function Wx(v,p){if(1&v&&(o.j41(0,"div",23),o.nrm(1,"app-image-gallery",24),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("images",l.images)}}function $x(v,p){if(1&v&&(o.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5),o.DNE(5,Yr,3,2,"div",6),o.nI1(6,"createAvatar"),o.k0s(),o.j41(7,"div",7)(8,"div",8)(9,"div",9),o.EFF(10),o.k0s(),o.nrm(11,"div",10),o.nI1(12,"relativeDate"),o.k0s(),o.j41(13,"div",11),o.EFF(14),o.k0s(),o.j41(15,"div",12),o.nrm(16,"app-associated-material",13),o.k0s()(),o.DNE(17,ng,2,3,"div",14),o.k0s(),o.j41(18,"div",15),o.DNE(19,Wx,2,1,"div",16),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(5),o.Y8G("ngIf",o.bMT(6,9,l.snip.user)),o.R7$(5),o.Lme("",l.snip.user.firstName," ",l.snip.user.lastName,""),o.R7$(),o.Y8G("innerHTML",o.bMT(12,11,l.snip.created),o.npT),o.R7$(3),o.JRh(l.snip.text),o.R7$(2),o.Y8G("assetReferences",l.snip.assetReferences)("isSnipDisplayable",!0),o.R7$(),o.Y8G("ngIf",2!=l.scope.currentScope.chapter.settings.configurations.ohaSnipViewConfig),o.R7$(2),o.Y8G("ngIf",l.images.length>0)}}let jw=(()=>{class v{constructor(l){this.scopeService=l,this.images=[],this.createImageUrl=(O,F)=>O+"/images/"+F,this.scope=this.scopeService.getScope(),this.blob=this.scope.globalSettings.blobStorageCdnUrl}ngOnInit(){this.snip?.assetReferences.filter(O=>1==O.hideInComments&&null!=O.assetImage)?.forEach(O=>{this.images.push(this.createImageUrl(this.blob,O.assetImage.guid))})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-snip-head"]],inputs:{snip:"snip"},decls:1,vars:1,consts:[["class","snip-head",4,"ngIf"],[1,"snip-head"],[1,"snip"],[1,"header"],[1,"row"],[1,"col-2","col-md-1","d-flex","flex-column","align-items-center"],[4,"ngIf"],[1,"col-8","col-md-10"],[1,"snip-info","d-flex"],[1,"snip-user"],[1,"snip-timestamp","ml-2",3,"innerHTML"],[1,"snip-text"],[1,"snip-associated-material"],[3,"assetReferences","isSnipDisplayable"],["class","col-2 col-md-1 oha-wrapper",4,"ngIf"],[1,"snip-gallery-containter"],["class","snip-gallery",4,"ngIf"],["alt","User Avatar","class","avatar",3,"src",4,"ngIf"],["class","avatar-initials",4,"ngIf"],["alt","User Avatar",1,"avatar",3,"src"],[1,"avatar-initials"],[1,"col-2","col-md-1","oha-wrapper"],[1,"float-end",3,"snip","source","size"],[1,"snip-gallery"],[3,"images"]],template:function(O,F){1&O&&o.DNE(0,$x,20,13,"div",0),2&O&&o.Y8G("ngIf",F.snip)},dependencies:[a.bT,uo,Pi,Ne,Ri,Ma],styles:[".snip-head[_ngcontent-%COMP%]{display:flex;justify-content:center}.snip-head[_ngcontent-%COMP%]   .snip[_ngcontent-%COMP%]{max-width:940px;margin:3rem 0;padding-left:1rem}.snip-head[_ngcontent-%COMP%]   .snip[_ngcontent-%COMP%]   .snip-text[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-style:italic;font-size:3rem;line-height:1.2em;color:var(--textColor)}.snip-head[_ngcontent-%COMP%]   .snip[_ngcontent-%COMP%]   .snip-gallery[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.snip-head[_ngcontent-%COMP%]   .snip[_ngcontent-%COMP%]   .snip-text[_ngcontent-%COMP%]{font-family:var(--fontSecondary);font-style:italic;font-size:1.5rem;line-height:1.2em;color:var(--textColor)}}.snip-head[_ngcontent-%COMP%]   .snip-user[_ngcontent-%COMP%]{font-family:var(--fontPrimary);font-weight:700}.snip-head[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:block}.snip-head[_ngcontent-%COMP%]   .avatar-initials[_ngcontent-%COMP%]{width:4rem;height:4rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;background-color:#ccc;color:var(--textColor);font-size:1.5rem}.snip-head[_ngcontent-%COMP%]   .gallery-image[_ngcontent-%COMP%]{width:100%;height:300px;overflow:hidden}.snip-head[_ngcontent-%COMP%]   .resized-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.snip-head[_ngcontent-%COMP%]   .snip-associated-material[_ngcontent-%COMP%]{margin-top:.8rem}.snip-head[_ngcontent-%COMP%]   .snip-associated-material[_ngcontent-%COMP%]     .associatedMaterial-icons{font-size:1.3rem}.snip-head[_ngcontent-%COMP%]   .snip-associated-material[_ngcontent-%COMP%]     .associatedMaterial{font-size:1.3rem}"]})}}return v})();function Kw(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",8),o.nrm(2,"app-snip-head",9),o.j41(3,"app-legacy-translation",10),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.translateSnip(F))}),o.k0s()()()}if(2&v){const l=o.XpG();o.R7$(2),o.Y8G("snip",l.snip),o.R7$(),o.Y8G("translationType","snip")("snipId",l.snip.id)}}function XS(v,p){if(1&v&&(o.j41(0,"div",7),o.nrm(1,"app-user-comments-list",11),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("data",l.snip)}}let $y=(()=>{class v{constructor(l,O){this.scopeService=l,this.legacyTranslationService=O,this.commentCounter=0,this.reloadComments=!0,this.scope=this.scopeService.getScope(),this.profile=this.scope.profile}ngOnInit(){this.commentCounter=this.snip?.assetReferences.filter(l=>0==l.hideInComments).length||0}translateSnip(l){var O=this;return(0,$e.A)(function*(){if(O.snip)try{const F=yield O.legacyTranslationService.translateSnip(O.snip.id.toString(),l.value);O.snip={...O.snip,...F},O.reloadComments=!1,setTimeout(()=>O.reloadComments=!0,0)}catch(F){console.error("Error while translating Snip:",F)}})()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-snip"]],inputs:{snip:"snip"},decls:10,vars:5,consts:[[1,"snip-component"],[4,"ngIf"],[1,"row","snip-comment-section"],[1,"snip-comment-counter"],[1,"comments"],[1,"snip-comment-input"],[3,"snipId"],[1,"snip-comment-list"],[1,"snip-header"],[3,"snip"],[3,"onValueChanged","translationType","snipId"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,Kw,4,3,"div",1),o.j41(2,"div",2)(3,"div",3)(4,"h2"),o.EFF(5),o.k0s()(),o.j41(6,"div",4)(7,"div",5),o.nrm(8,"app-user-comment-form",6),o.k0s(),o.DNE(9,XS,2,1,"div",7),o.k0s()()()),2&O&&(o.R7$(),o.Y8G("ngIf",F.snip),o.R7$(4),o.Lme("",F.commentCounter," ",F.scope.currentScope.network.getResourceOrKeyName("web_common_comments"),""),o.R7$(3),o.Y8G("snipId",null==F.snip||null==F.snip.id?null:F.snip.id.toString()),o.R7$(),o.vxM(F.reloadComments?9:-1))},dependencies:[a.bT,ar,yi,jw,hv],styles:[".snip-component[_ngcontent-%COMP%]   .snip-header[_ngcontent-%COMP%]{background-color:var(--color2-alpha50);margin:0 -100%;padding:0 100%}.snip-component[_ngcontent-%COMP%]   .snip-comment-section[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:5rem}.snip-component[_ngcontent-%COMP%]   .snip-comment-section[_ngcontent-%COMP%]   .comments[_ngcontent-%COMP%]{width:940px}.snip-component[_ngcontent-%COMP%]   .snip-comment-counter[_ngcontent-%COMP%]{justify-content:center;display:flex;margin-bottom:5rem;color:var(--textColor)}"]})}}return v})(),Ad=(()=>{class v{constructor(l,O){this.scopeService=l,this.http=O,this.rubricArticles=[],this.loadableRubricArticlesCount=[],this.scope=l.getScope()}getRubrics(){let l=[];return this.scope.currentChapter.chapterGroups.forEach(F=>{F.chapters&&F.chapters.length>0&&l.push(...F.chapters)}),l}getRubricArticlesCount(l){let O=this.loadableRubricArticlesCount.filter(F=>F.id==l).firstOrDefault()?.count;return O?Promise.resolve(O):this.http.get(`${this.scope.apiEndpoint}rubrics/getRubricArticlesCount/${l}`).toPromise().then(F=>(this.loadableRubricArticlesCount.push({id:l,count:F}),F))}getRubricArticles(l,O,F){let se=this.rubricArticles.filter(we=>we.id===l&&we.page==O).firstOrDefault()?.articles;return se?Promise.resolve(se):this.http.get(`${this.scope.apiEndpoint}rubrics/getRubricArticles/${l}/${O}/${F}`).toPromise().then(we=>(this.rubricArticles.push({id:l,page:O,articles:we}),we))}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const Ym=()=>({maxHeight:"70vh"});function Pl(v,p){if(1&v&&(o.j41(0,"div",6)(1,"div"),o.nrm(2,"app-displayable-article-with-image",7),o.k0s()()),2&v){const l=p.$implicit;o.R7$(2),o.Y8G("data",l)}}let YS=(()=>{class v{constructor(l,O){this.scopeService=l,this.rubricsService=O,this.loadableRubricArticlesCount=0,this.page=0,this.rubrics=[],this.selectedRubric="",this.displayedArticles=[],this.articlesListInitialCount=24,this.scope=this.scopeService.getScope()}ngOnInit(){if(this.rubrics=this.rubricsService.getRubrics(),this.rubrics.length>0){let l=location.search.substring(3);this.rubrics.some(O=>O.id==l)?this.selectedRubric=l:(this.selectedRubric=this.rubrics[0].id,window.history.pushState("","","rubrics?q="+this.selectedRubric)),this.getRubricArticles(this.selectedRubric,this.page,this.articlesListInitialCount),this.getRubricArticlesCount(this.selectedRubric)}}getRubricArticlesCount(l){this.rubricsService.getRubricArticlesCount(l).then(O=>{this.loadableRubricArticlesCount=O})}getRubricArticles(l,O,F){this.rubricsService.getRubricArticles(l,O,F).then(se=>{this.displayedArticles=this.displayedArticles.concat(se)})}onChange(l){this.displayedArticles=[],this.page=0,this.selectedRubric=l.item.id,window.history.pushState("","","rubrics?q="+this.selectedRubric)}canLoadMore(){return this.loadableRubricArticlesCount>this.displayedArticles.length}loadMore(){this.page++,this.getRubricArticles(this.selectedRubric,this.page,this.articlesListInitialCount)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Ad))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-rubrics"]],decls:8,vars:10,consts:[[1,"rubrics-wrapper","container"],[1,"row","rubrics-drop-down-button-wrapper"],["icon","","stylingMode","text","type","normal","displayExpr","shortName","keyExpr","id",1,"rubrics-drop-down-button",3,"onSelectionChanged","dropDownOptions","showArrowIcon","items","useSelectMode","text","selectedItemKey"],[1,"row"],["class","rubrics-article-displayables-wrapper",4,"ngFor","ngForOf"],["width","100%","icon","chevrondown","stylingMode","text",1,"load-more",3,"onClick","visible"],[1,"rubrics-article-displayables-wrapper"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"dx-drop-down-button",2),o.bIt("onSelectionChanged",function(we){return F.onChange(we)}),o.k0s()(),o.j41(3,"div",3),o.DNE(4,Pl,3,1,"div",4),o.k0s(),o.j41(5,"div",3)(6,"dx-button",5),o.bIt("onClick",function(){return F.loadMore()}),o.EFF(7),o.k0s()()()),2&O&&(o.R7$(2),o.FS9("text",F.scope.network.getResourceOrKeyName("web_rubrics_text")),o.Y8G("dropDownOptions",o.lJ4(9,Ym))("showArrowIcon",!0)("items",F.rubrics)("useSelectMode",!0)("selectedItemKey",F.selectedRubric),o.R7$(2),o.Y8G("ngForOf",F.displayedArticles),o.R7$(2),o.Y8G("visible",F.canLoadMore()),o.R7$(),o.SpI(" ",F.scope.currentScope.network.resources.web_common_showMore," "))},dependencies:[a.Sq,Hi.e,Kt.h,ss],styles:[".rubrics-wrapper[_ngcontent-%COMP%]{color:var(--textColor);max-width:var(--designContentWidth);width:100%}.rubrics-wrapper[_ngcontent-%COMP%]     .dx-button-text, .rubrics-wrapper[_ngcontent-%COMP%]     .dx-icon{color:var(--textColor);text-transform:uppercase;font-size:2rem}.rubrics-wrapper[_ngcontent-%COMP%]     .dx-button-text{font-family:var(--fontTertiary)}.rubrics-drop-down-button-wrapper[_ngcontent-%COMP%]{justify-content:center;padding:2rem 0}.rubrics-drop-down-button[_ngcontent-%COMP%]{margin-bottom:.5rem;width:auto;border-bottom:1px solid var(--textColor)}.rubrics-drop-down-button[_ngcontent-%COMP%]     .dx-button-mode-text{height:auto}.rubrics-article-displayables-wrapper[_ngcontent-%COMP%]{width:50%}@media (max-width: 768px){.rubrics-article-displayables-wrapper[_ngcontent-%COMP%]{width:100%}}.load-more[_ngcontent-%COMP%]{color:var(--textColor);font-weight:600;font-size:1.8rem;height:2.5rem}@media (max-width: 768px){.load-more[_ngcontent-%COMP%]{font-size:1rem;height:2rem}}"]})}}return v})();function mv(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"img",3)(2,"img",4),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("src",l.networkLogoUrl+"&preset=web-header-logo",o.B4B),o.R7$(),o.Y8G("src",l.networkLogoDarkUrl+"&preset=web-header-logo",o.B4B)}}function ZS(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"img",3)(2,"img",4),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("src",l.chapterLogoUrl+"&preset=web-header-logo",o.B4B),o.R7$(),o.Y8G("src",l.chapterLogoDarkUrl+"&preset=web-header-logo",o.B4B)}}let Xw=(()=>{class v{constructor(l,O){this.logoService=l,this.scopeService=O,this.hasChapterLogo=!1,this.hasChapterLogoDark=!1,this.networkLogoUrl="",this.networkLogoDarkUrl="",this.chapterLogoUrl="",this.chapterLogoDarkUrl="",this.scope=this.scopeService.getScope()}ngOnInit(){this.hasChapterLogo=this.logoService.hasChapterLogo(this.scope.currentScope.chapter),this.hasChapterLogoDark=this.logoService.hasChapterLogoDark(this.scope.currentScope.chapter),this.networkLogoUrl=this.logoService.getNetworkLogoUrl(),this.networkLogoDarkUrl=this.logoService.getNetworkLogoDarkUrl(),this.chapterLogoUrl=this.logoService.getChapterLogoUrl(),this.chapterLogoDarkUrl=this.logoService.getChapterLogoDarkUrl()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Td.X),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-header-logo"]],decls:4,vars:3,consts:[[1,"chapterLogo-base"],[1,"chapterLogo-chapterLink",3,"href"],[4,"ngIf"],["alt","Logo",1,"chapterLogo-image","img-fluid",3,"src"],["alt","Logo",1,"chapterLogo-image-dark",3,"src"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"a",1),o.DNE(2,mv,3,2,"div",2)(3,ZS,3,2,"div",2),o.k0s()()),2&O&&(o.R7$(),o.Y8G("href","",o.B4B),o.R7$(),o.Y8G("ngIf",!F.hasChapterLogo),o.R7$(),o.Y8G("ngIf",F.hasChapterLogo))},dependencies:[a.bT],styles:[".chapterLogo-base[_ngcontent-%COMP%]{height:auto;vertical-align:top;width:auto}.chapterLogo-base[_ngcontent-%COMP%]   .chapterLogo-image[_ngcontent-%COMP%]{height:auto;vertical-align:top;width:auto;max-height:70px}@media (max-width: 768px){.chapterLogo-base[_ngcontent-%COMP%]   .chapterLogo-image[_ngcontent-%COMP%]{max-height:50px}}"]})}}return v})();var DC=M(3970),He=M(5634);function Le(v,p){if(1&v&&(o.j41(0,"span"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.scope.currentChapter.shortName)}}function Ae(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",8)(1,"dx-button",9),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.openSwitch())}),o.nrm(2,"i",10),o.DNE(3,Le,2,1,"span",11),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("ngClass",l.upperCase?"chapterSwitch-chapterName-upperCase":"chapterSwitch-chapterName-lowerCase"),o.R7$(2),o.Y8G("ngIf",!l.hideChapterSwitchName)}}function ke(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",12)(1,"dx-button",13),o.bIt("click",function(F){const se=o.eBV(l).$implicit,we=o.XpG();return o.Njj(we.switchChapter(F,se.slug))}),o.j41(2,"span"),o.EFF(3),o.k0s()()()}if(2&v){const l=p.$implicit,O=o.XpG();o.R7$(),o.Y8G("ngClass",O.upperCase?"chapterSwitch-chapterName-upperCase":"chapterSwitch-chapterName-lowerCase"),o.R7$(2),o.JRh(l.shortName)}}let Ge=(()=>{class v{constructor(l,O,F,se){this.el=l,this.scopeService=O,this.profileService=F,this.cordovaService=se,this.chapterSwitchOffCanvas=null,this.chapterList=[],this.showChapterSwitch=!0,this.upperCase=!0,this.hideChapterSwitchName=!1,this.profile=null,this.switchChapter=(we,We)=>{let gt;this.scope.chapters.some(function(Ft){return Ft.slug===We&&(gt=Ft,!0)}),gt&&this.profileService.updateFavoriteChapter(gt.slug).then(()=>{var Ft=gt.path;if(this.scope.currentScope.networkPath.length>1&&(Ft=this.scope.currentScope.networkPath+gt.path),this.cordovaService.isCordovaAvailable()){if("android"===this.cordovaService.cordova.platformId){var pn=history.length-1;history.go(-pn),history.replaceState(null,"",Ft),window.location.href=Ft}window.location.href=Ft}else window.location.href=Ft})},this.scope=this.scopeService.getScope(),this.hideChapterSwitchName=this.scope.currentScope.network.settings.configurations.chapterSwitchHideName,this.upperCase=this.scope.currentScope.network.settings.configurations.chapterSwitchNameUppercase,this.profile=this.scope.profile,this.profileServiceSubscription=this.profileService.profileChanged$.subscribe(we=>{this.profile=we,this.initializeChapterList()})}ngOnDestroy(){this.profileServiceSubscription.unsubscribe()}ngOnInit(){const l=this.scope.currentScope.network.chapters.filter(O=>2===O.managementState&&!O.hidden);this.showChapterSwitch=l.length>1}ngAfterViewInit(){const l=this.el.nativeElement.querySelector("#chapterSwitchoffcanvasTop");l&&(this.chapterSwitchOffCanvas=new DC.Offcanvas(l))}initializeChapterList(){const l=this.scope.network.chapters.filter(O=>2===O.managementState&&!O.hidden&&O.slug!=this.scope.currentChapter.slug);this.chapterList=this.scope.network.settings.configurations.chapterSwitchGrantedChaptersOnly&&null!=this.profile?l.filter(O=>this.profile?.closedChapterSlugs?.includes(O.slug)||!O.closed):l,this.chapterList.sort((O,F)=>O.shortName.localeCompare(F.shortName))}openSwitch(){this.chapterSwitchOffCanvas&&this.chapterSwitchOffCanvas.show()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(o.aKT),o.rXU(b.A),o.rXU(Co.p),o.rXU(He.q))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-header-switch"]],decls:10,vars:8,consts:[["class","chapter-switch-button-base",4,"ngIf"],["tabindex","-1","id","chapterSwitchoffcanvasTop","aria-labelledby","chapterSwitchoffcanvasTopLabel",1,"offcanvas","offcanvas-top","offcanvas-custom"],[1,"offcanvas-header"],["id","offcanvasTopLabel"],["type","button","data-bs-dismiss","offcanvas","aria-label","Close",1,"btn-close","text-reset"],[1,"offcanvas-body"],[1,"panel-list",3,"dataSource","hoverStateEnabled","activeStateEnabled","focusStateEnabled","height"],["class","chapterSwitch-item-template",4,"dxTemplate","dxTemplateOf"],[1,"chapter-switch-button-base"],["stylingMode","text",1,"chapter-switch-button",3,"click","ngClass"],[1,"fa-solid","fa-chevron-down","custom-chapter-switch-icon"],[4,"ngIf"],[1,"chapterSwitch-item-template"],["stylingMode","text",1,"chapterSwitch-item",3,"click","ngClass"]],template:function(O,F){1&O&&(o.DNE(0,Ae,4,2,"div",0),o.j41(1,"div",1)(2,"div",2)(3,"div",3),o.EFF(4),o.k0s(),o.nrm(5,"button",4),o.k0s(),o.j41(6,"div",5)(7,"dx-list",6),o.EFF(8,"> "),o.DNE(9,ke,4,2,"div",7),o.k0s()()()),2&O&&(o.Y8G("ngIf",F.showChapterSwitch),o.R7$(4),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_chapterSwitch_chooseYourCity")),o.R7$(3),o.Y8G("dataSource",F.chapterList)("hoverStateEnabled",!0)("activeStateEnabled",!1)("focusStateEnabled",!1)("height","auto"),o.R7$(2),o.Y8G("dxTemplateOf","item"))},dependencies:[a.YU,a.bT,Rt.eC,Hi.e,ec.a],styles:[".offcanvas-custom[_ngcontent-%COMP%]{max-width:calc(var(--designContentWidth) * .75);margin:0 auto;border:0 solid var(--textColor60);border-left:1px solid aliceblue;border-right:1px solid aliceblue;border-bottom:1px solid aliceblue;border-radius:0 0 10px 10px;box-shadow:0 4px 10px #000;z-index:1045;height:-moz-fit-content;height:fit-content;max-height:30vh;background:var(--backgroundColor)}.chapterSwitch-item[_ngcontent-%COMP%]{font-size:1rem;font-family:var(--fontPrimary);font-weight:600;color:var(--textColor60);width:100%}.chapterSwitch-item[_ngcontent-%COMP%]     .dx-button-content{justify-content:start}.chapter-switch-button[_ngcontent-%COMP%]{font-size:1rem;color:var(--textColor60);font-weight:700;font-family:var(--fontPrimary)}.custom-chapter-switch-icon[_ngcontent-%COMP%]{font-size:1rem;margin-right:5px;color:var(--textColor60)}.chapterSwitch-chapterName-initial[_ngcontent-%COMP%]{text-transform:initial}.chapterSwitch-chapterName-upperCase[_ngcontent-%COMP%]{text-transform:uppercase}.chapterSwitch-chapterName-lowerCase[_ngcontent-%COMP%]{text-transform:lowercase}.offcanvas-header[_ngcontent-%COMP%]{color:var(--textColor)}@media (max-width: 768px){.chapter-switch-button[_ngcontent-%COMP%]{font-size:.7rem;color:var(--textColor60);font-weight:700;font-family:var(--fontPrimary)}.custom-chapter-switch-icon[_ngcontent-%COMP%]{font-size:.7rem;margin-right:5px;color:var(--textColor60)}}"]})}}return v})(),Qe=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-header-chapter-switch"]],decls:5,vars:0,consts:[[1,"navigation-header-chapter-switch-base"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div"),o.nrm(2,"app-navigation-header-logo"),o.k0s(),o.j41(3,"div"),o.nrm(4,"app-navigation-header-switch"),o.k0s()())},dependencies:[Xw,Ge],styles:[".navigation-header-chapter-switch-base[_ngcontent-%COMP%]{display:flex}.offcanvas-header[_ngcontent-%COMP%]{color:var(--textColor)}"]})}}return v})(),it=(()=>{class v{constructor(l,O){this.navigationService=l,this.hybridRoutingService=O,this.toggleContainerMenu=()=>{this.navigationService.toggleContainerMenu()},this.openSearch=()=>{this.hybridRoutingService.switchState("app.search",null)}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ba.o),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-header-menu"]],decls:6,vars:0,consts:[[1,"heade-left-side-menu-base"],[1,"navigation-header-container-menu",3,"click"],[1,"fa-solid","fa-bars"],[1,"separator"],[1,"navigation-header-search",3,"click"],[1,"fa-solid","fa-magnifying-glass"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1),o.bIt("click",function(){return F.toggleContainerMenu()}),o.nrm(2,"i",2),o.k0s(),o.nrm(3,"span",3),o.j41(4,"div",4),o.bIt("click",function(){return F.openSearch()}),o.nrm(5,"i",5),o.k0s()())},styles:[".heade-left-side-menu-base[_ngcontent-%COMP%]{display:flex;align-items:center}.heade-left-side-menu-base[_ngcontent-%COMP%]   .dx-icon-custom-style[_ngcontent-%COMP%]{font-size:1.5rem}.heade-left-side-menu-base[_ngcontent-%COMP%]   .fa-magnifying-glass[_ngcontent-%COMP%], .heade-left-side-menu-base[_ngcontent-%COMP%]   .fa-bars[_ngcontent-%COMP%]{font-size:1.25rem;cursor:pointer;transition:color .3s ease,transform .3s ease}.heade-left-side-menu-base[_ngcontent-%COMP%]   .fa-magnifying-glass[_ngcontent-%COMP%]:hover, .heade-left-side-menu-base[_ngcontent-%COMP%]   .fa-bars[_ngcontent-%COMP%]:hover{color:var(--colorPrimary);transform:scale(1.2)}.heade-left-side-menu-base[_ngcontent-%COMP%]   .separator[_ngcontent-%COMP%]{width:1px;height:2rem;background-color:var(--textColor);margin-right:6px;margin-left:6px}"]})}}return v})(),xt=(()=>{class v{constructor(){}getItem(l){const O=localStorage.getItem(l);if(O)try{return JSON.parse(O)}catch(F){return console.error(`Error parsing localStorage key "${l}":`,F),null}return null}setItem(l,O){try{localStorage.setItem(l,JSON.stringify(O))}catch(F){console.error(`Error setting localStorage key "${l}":`,F)}}removeItem(l){localStorage.removeItem(l)}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),Vt=(()=>{class v{constructor(l){this.http=l,this.globalSettingsUrl="/api/global-settings",this.tenantSettingsUrl="/api/tenant-settings",this.initialFontSize=16,this.initialFontSize=parseFloat(getComputedStyle(document.documentElement).fontSize)}getDefaultSettings(){return{theme:"light",rootFontSize:this.initialFontSize,fonts:{heading:"Arial",body:"Roboto"},colorScheme:{primary:"#ffffff",secondary:"#000000",tertiary:"#ff0000"},icons:"default"}}getGlobalSettings(){return this.http.get(this.globalSettingsUrl)}updateGlobalSettings(l){return this.http.put(this.globalSettingsUrl,l)}getTenantSettings(l){return this.http.get(`${this.tenantSettingsUrl}/${l}`)}updateTenantSettings(l,O){return this.http.put(`${this.tenantSettingsUrl}/${l}`,O)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),Qt=(()=>{class v{constructor(l,O,F){this.rendererFactory=l,this.localStorageService=O,this.themingSettingsManagementService=F,this.initState=!1,this.renderer=this.rendererFactory.createRenderer(null,null),this.loadSettings()}loadSettings(){const l=this.localStorageService.getItem("userVisualSettings");l?this.currentSettings=l:(this.currentSettings=this.themingSettingsManagementService.getDefaultSettings(),this.initState=!0,this.saveSettings()),this.applySettings(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{2===parseInt(this.currentSettings.theme)&&this.applyTheme()})}setFontSize(l){this.initState=!1,l<10&&(l=10),this.currentSettings.rootFontSize=l,this.saveSettings(),this.applySettings()}applyFontSize(){this.initState||parseFloat(getComputedStyle(document.documentElement).fontSize)==this.currentSettings.rootFontSize||(document.documentElement.style.fontSize=`${this.currentSettings.rootFontSize}px`)}saveSettings(){this.localStorageService.setItem("userVisualSettings",this.currentSettings)}applySettings(){this.applyFontSize(),this.applyTheme()}applyTheme(){const l=2===parseInt(this.currentSettings.theme)?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":1===parseInt(this.currentSettings.theme)?"dark":"light";"light"!=l?document.documentElement.setAttribute("data-theme",l):document.documentElement.removeAttribute("data-theme")}getSelectedTheme(){return parseInt(this.currentSettings.theme)}setSelectedTheme(l){this.currentSettings.theme=l.toString(),this.saveSettings(),this.applyTheme()}resetToDefault(){this.currentSettings=this.themingSettingsManagementService.getDefaultSettings(),this.saveSettings(),this.applySettings()}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(o._9s),o.KVO(xt),o.KVO(Vt))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var Xn=M(7052);let Vi=(()=>{class v{constructor(l){this.themingService=l,this.currentModifier=100,this.format=O=>`${O}%`}ngOnInit(){this.fontSize=this.themingService.currentSettings.rootFontSize||16,this.currentModifier=Math.floor(this.fontSize/16*100)}fontSizeChange(l){this.fontSize=l.value/100*16,this.themingService.setFontSize(this.fontSize),console.log(this.fontSize)}fontSizeUp(){this.fontSize+=1,this.themingService.setFontSize(this.fontSize)}fontSizeDown(){this.fontSize>10&&(this.fontSize-=1,this.themingService.setFontSize(this.fontSize))}fontSizeReset(){this.fontSize=16,this.themingService.setFontSize(this.fontSize)}get upText(){return""}get downText(){return""}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Qt))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-font-size-selector"]],decls:3,vars:7,consts:[[1,"row"],[3,"valueChange","onValueChanged","min","max","value","step","rtlEnabled"],["showMode","always","position","bottom",3,"enabled","format"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"dx-slider",1),o.mxI("valueChange",function(we){return o.DH7(F.currentModifier,we)||(F.currentModifier=we),we}),o.bIt("onValueChanged",function(we){return F.fontSizeChange(we)}),o.nrm(2,"dxo-tooltip",2),o.k0s()()),2&O&&(o.R7$(),o.Y8G("min",80)("max",180),o.R50("value",F.currentModifier),o.Y8G("step",10)("rtlEnabled",!1),o.R7$(),o.Y8G("enabled",!0)("format",F.format))},dependencies:[Xn.L,mn.Qx]})}}return v})();var Ui=M(4925);const Do=v=>[v];let Qo=(()=>{class v{constructor(l,O){switch(this.themingService=l,this.scopeService=O,this.themeToggleModes=[{text:"Light",icon:"sun",mode:0},{text:"Auto",mode:2},{text:"Dark",icon:"moon",mode:1}],this.currentTheme="",this.scope=O.getScope(),l.getSelectedTheme()){case 0:this.currentTheme="Light";break;case 1:this.currentTheme="Dark";break;case 2:this.currentTheme="Auto"}}ngOnInit(){}onThemeChange(l){this.themingService.setSelectedTheme(l.addedItems[0].mode)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Qt),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-dark-mode-toggle"]],decls:2,vars:4,consts:[[1,"row","dark-mode-button-wrapper"],[3,"onSelectionChanged","items","selectedItemKeys"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"dx-button-group",1),o.bIt("onSelectionChanged",function(we){return F.onThemeChange(we)}),o.k0s()()),2&O&&(o.R7$(),o.Y8G("items",F.themeToggleModes)("selectedItemKeys",o.eq3(2,Do,F.currentTheme)))},dependencies:[Ui.D],styles:["[_nghost-%COMP%]  .dx-button-has-icon.dx-button-has-text .dx-button-content{padding-inline-start:6px;padding-inline-end:0}[_nghost-%COMP%]  .dx-button-has-icon.dx-button-has-text .dx-button-content span{display:none}.dark-mode-button-wrapper[_ngcontent-%COMP%]{padding-left:20px}.buttongroups-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.dx-buttongroup[_ngcontent-%COMP%]{width:auto;padding:1px}.multiple-selection-styling-mode[_ngcontent-%COMP%]{border-left-width:1px;border-left-style:solid}"]})}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var tr=M(5947);let Fr=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-narrator-toggle"]],decls:1,vars:1,consts:[[3,"value"]],template:function(O,F){1&O&&o.nrm(0,"dx-switch",0),2&O&&o.Y8G("value",!0)},dependencies:[tr.Y]})}}return v})(),cs=(()=>{class v{constructor(l,O){this.themingService=l,this.scopeService=O,this.scope=O.getScope()}resetGlobalSettings(){this.themingService.resetToDefault()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Qt),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-visual-settings"]],decls:11,vars:4,consts:[[3,"showColonAfterLabel"],[1,"narrator-toggle-flex-container"],[3,"text"]],template:function(O,F){1&O&&(o.j41(0,"dx-form",0)(1,"dxi-item")(2,"div",1),o.nrm(3,"dxo-label",2)(4,"app-narrator-toggle"),o.k0s()(),o.j41(5,"dxi-item"),o.nrm(6,"app-dark-mode-toggle")(7,"dxo-label",2),o.k0s(),o.j41(8,"dxi-item"),o.nrm(9,"app-font-size-selector")(10,"dxo-label",2),o.k0s()()),2&O&&(o.Y8G("showColonAfterLabel",!1),o.R7$(3),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_visuals_narrator_toggle_description")),o.R7$(4),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_visuals_dark_mode_toggle_description")),o.R7$(3),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_visuals_font_size_description")))},dependencies:[xo.o,mn.CVf,mn.rkl,Vi,Qo,Fr],styles:[".dx-separator[_ngcontent-%COMP%]{height:1px;background-color:var(--colorPrimary);margin:1px 0}.narrator-toggle-flex-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.dx-slider[_ngcontent-%COMP%]{flex:1}"]})}}return v})();const is=["visualsButton"];function Ks(v,p){1&v&&(o.j41(0,"div"),o.nrm(1,"app-user-visual-settings"),o.k0s())}let dc=(()=>{class v{constructor(l){this.scopeService=l,this.areSettingsVisible=!1,this.popupOptions={},this.scope=l.getScope(),this.closeButtonOptions={icon:"fa fa-close",text:this.scope.network.getResourceOrKeyName("web_common_close"),stylingMode:"outlined",type:"normal",onClick:()=>{this.areSettingsVisible=!1}},this.initializePopupOptions()}toggleVisualSettings(){this.areSettingsVisible=!this.areSettingsVisible}get hintText(){return this.scope.network.getResourceOrKeyName(this.areSettingsVisible?"web_common_close":"web_visuals_title")}get visualsText(){return this.scope.network.getResourceOrKeyName("web_visuals_title")}ngAfterViewInit(){this.visualsButton&&(this.buttonElement=this.visualsButton.nativeElement)}adjustPopupSize(){const l=document.querySelector(".dx-popup-content");l&&(l.style.minWidth="250px")}initializePopupOptions(){this.popupOptions.position=window.matchMedia("only screen and (max-width: 768px)").matches?{my:"top right",at:"top right",of:window}:{my:"top center",at:"top center",of:window}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-accessibility-button"]],viewQuery:function(O,F){if(1&O&&o.GBs(is,5,o.aKT),2&O){let se;o.mGM(se=o.lsd())&&(F.visualsButton=se.first)}},decls:6,vars:16,consts:[["visualsButton",""],[3,"id"],["icon","fa-solid fa-child-reaching","stylingMode","text",1,"theme-toggle-button",3,"onClick","hint"],["contentTemplate","popupContent",3,"visibleChange","onShown","visible","shading","width","height","maxWidth","maxHeight","showTitle","title","showCloseButton","position","enableBodyScroll","hideOnOutsideClick"],["at","bottom","my","top",3,"of"],[4,"dxTemplate","dxTemplateOf"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",1)(1,"dx-button",2,0),o.bIt("onClick",function(){return o.eBV(se),o.Njj(F.toggleVisualSettings())}),o.k0s()(),o.j41(3,"dx-popup",3),o.mxI("visibleChange",function(We){return o.eBV(se),o.DH7(F.areSettingsVisible,We)||(F.areSettingsVisible=We),o.Njj(We)}),o.bIt("onShown",function(){return o.eBV(se),o.Njj(F.adjustPopupSize())}),o.nrm(4,"dxo-position",4),o.DNE(5,Ks,2,0,"div",5),o.k0s()}2&O&&(o.Y8G("id","visualButtonBoundary"),o.R7$(),o.Y8G("hint",F.hintText),o.R7$(2),o.R50("visible",F.areSettingsVisible),o.Y8G("shading",!1)("width","auto")("height","auto")("maxWidth","85vw")("maxHeight","600px")("showTitle",!0)("title",F.visualsText)("showCloseButton",!0)("position",F.popupOptions.position)("enableBodyScroll",!1)("hideOnOutsideClick",!0),o.R7$(),o.Y8G("of",F.buttonElement),o.R7$(),o.Y8G("dxTemplateOf","popupContent"))},dependencies:[Rt.eC,pi.i,mn.I1b,Hi.e,cs]})}}return v})();const pd=(v,p)=>({width:v,height:p}),jy=v=>({"font-size":v});function jx(v,p){if(1&v&&o.nrm(0,"img",4),2&v){const l=o.XpG().ngIf;o.Y8G("src",l.avatarUrl,o.B4B)}}function QS(v,p){if(1&v&&(o.j41(0,"div",5),o.EFF(1),o.k0s()),2&v){const l=o.XpG().ngIf,O=o.XpG();o.Y8G("ngStyle",o.eq3(2,jy,O.fontSize+"rem")),o.R7$(),o.SpI(" ",l.initials," ")}}function _v(v,p){if(1&v&&(o.j41(0,"div",1),o.DNE(1,jx,1,1,"img",2)(2,QS,2,4,"div",3),o.k0s()),2&v){const l=p.ngIf,O=o.XpG();o.Y8G("ngStyle",o.l_i(3,pd,O.size+"rem",O.size+"rem")),o.R7$(),o.Y8G("ngIf",l.avatarUrl),o.R7$(),o.Y8G("ngIf",l.useInitials)}}let vv=(()=>{class v{constructor(){this.size=3,this.fontSize=1.2}ngOnInit(){this.fontSize=.4*this.size}static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-avatar"]],inputs:{user:"user",size:"size"},decls:2,vars:3,consts:[["class","shared-avatar",3,"ngStyle",4,"ngIf"],[1,"shared-avatar",3,"ngStyle"],["alt","User Avatar","class","shared-avatar-img",3,"src",4,"ngIf"],["class","shared-avatar-initials",3,"ngStyle",4,"ngIf"],["alt","User Avatar",1,"shared-avatar-img",3,"src"],[1,"shared-avatar-initials",3,"ngStyle"]],template:function(O,F){1&O&&(o.DNE(0,_v,3,6,"div",0),o.nI1(1,"createAvatar")),2&O&&o.Y8G("ngIf",o.bMT(1,1,F.user))},dependencies:[a.bT,a.B3,Ma],styles:[".shared-avatar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;flex-wrap:nowrap;background-color:#ccc}.shared-avatar[_ngcontent-%COMP%]   .shared-avatar-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.shared-avatar[_ngcontent-%COMP%]   .shared-avatar-initials[_ngcontent-%COMP%]{background-color:#ccc;color:var(--textColor)}"]})}}return v})();function Zm(v,p){1&v&&o.nrm(0,"div",6)}function Qg(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-user-avatar",7),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("size",1.5)("user",l.profileService.profile)}}function EP(v,p){1&v&&(o.j41(0,"div")(1,"span",8),o.nrm(2,"i",9),o.k0s()())}let OP=(()=>{class v{constructor(l,O,F,se){this.scopeService=l,this.navigation=O,this.notificationService=F,this.profileService=se,this.scope=this.scopeService.getScope(),this.user=this.scope.profile,this.profilServiceSubscription=this.profileService.profileChanged$.subscribe(we=>{this.user=we})}ngOnDestroy(){this.profilServiceSubscription.unsubscribe()}toggleMenu(){this.navigation.toggleUserMenu()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(ba.o),o.rXU(cc.J),o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-header-user-options"]],decls:9,vars:3,consts:[[1,"header-user-options"],[1,"separator"],[1,"header-avatar-container"],["class","notification-status-dot","style","width: calc(1.5rem / 3);",4,"ngIf"],[1,"head-user-options-avatar",3,"click"],[4,"ngIf"],[1,"notification-status-dot",2,"width","calc(1.5rem / 3)"],[3,"size","user"],[1,"icon-circle"],[1,"fa-regular","fa-user"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"span"),o.nrm(2,"app-user-accessibility-button"),o.k0s(),o.nrm(3,"span",1),o.j41(4,"div",2),o.DNE(5,Zm,1,0,"div",3),o.j41(6,"div",4),o.bIt("click",function(){return F.toggleMenu()}),o.DNE(7,Qg,2,2,"div",5)(8,EP,3,0,"div",5),o.k0s()()()),2&O&&(o.R7$(5),o.Y8G("ngIf",F.notificationService.unClickedMessage),o.R7$(2),o.Y8G("ngIf",F.user.isRegistered),o.R7$(),o.Y8G("ngIf",!F.user.isRegistered))},dependencies:[a.bT,dc,vv],styles:[".header-user-options[_ngcontent-%COMP%]{display:flex;align-items:center}.header-user-options[_ngcontent-%COMP%]   .separator[_ngcontent-%COMP%]{width:1px;height:2rem;background-color:var(--textColor);margin-right:6px}.header-user-options[_ngcontent-%COMP%]   .head-user-options-avatar[_ngcontent-%COMP%]{cursor:pointer}.header-user-options[_ngcontent-%COMP%]   .head-user-options-avatar[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:hover{transform:scale(1.2)}.header-user-options[_ngcontent-%COMP%]   .header-avatar-container[_ngcontent-%COMP%]{position:relative;display:inline-block}.header-user-options[_ngcontent-%COMP%]   .notification-status-dot[_ngcontent-%COMP%]{background-color:var(--colorPrimary);border-radius:50%;position:absolute;top:-.22rem;right:-.14rem;aspect-ratio:1/1;box-shadow:0 0 2px #0003}.header-user-options[_ngcontent-%COMP%]   .icon-circle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:50%;background-color:var(--backgroundColor);border:2px solid var(--textColor60);color:var(--textColor)}.header-user-options[_ngcontent-%COMP%]   .icon-circle[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:1rem}"]})}}return v})(),wP=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-header"]],decls:9,vars:0,consts:[[1,"navigation-header"],[1,"navigation-header-content"],[1,"row"],[1,"col-2","col-md-1","navigation-header-menu"],[1,"col-8","col-md-10","navigation-header-chapter-switch"],[1,"col-2","col-md-1","navigation-header-user-options"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),o.nrm(4,"app-navigation-header-menu"),o.k0s(),o.j41(5,"div",4),o.nrm(6,"app-navigation-header-chapter-switch"),o.k0s(),o.j41(7,"div",5),o.nrm(8,"app-navigation-header-user-options"),o.k0s()()()())},dependencies:[Qe,it,OP],styles:[".navigation-header[_ngcontent-%COMP%]{display:flex;justify-content:center;padding-top:.9rem;background-color:var(--backgroundColor)}.navigation-header[_ngcontent-%COMP%]   .navigation-header-content[_ngcontent-%COMP%]{width:var(--designContentWidth)}.navigation-header[_ngcontent-%COMP%]   .navigation-header-content[_ngcontent-%COMP%]   .navigation-header-menu[_ngcontent-%COMP%]{align-items:center;display:flex}.navigation-header[_ngcontent-%COMP%]   .navigation-header-content[_ngcontent-%COMP%]   .navigation-header-chapter-switch[_ngcontent-%COMP%]{display:flex;justify-content:center}.navigation-header[_ngcontent-%COMP%]   .navigation-header-content[_ngcontent-%COMP%]   .navigation-header-user-options[_ngcontent-%COMP%]{display:flex;justify-content:end;align-items:center}@media (max-width: 768px){.navigation-header[_ngcontent-%COMP%]{height:50px;padding-top:.2rem}}"]})}}return v})();var ig=function(v){return v[v.None=0]="None",v[v.Journalist=2]="Journalist",v[v.MerkuristJournalist=3]="MerkuristJournalist",v[v.HeadJournalist=4]="HeadJournalist",v[v.Sales=5]="Sales",v[v.HeadSales=6]="HeadSales",v[v.NewsroomAdmin=7]="NewsroomAdmin",v}(ig||{});let Ph=(()=>{class v{constructor(l,O){this.scopeService=l,this.profileService=O,this.mainMenu=new Be.m,this.mainMenu$=this.mainMenu.asObservable(),this.prepaireMenu=()=>{this.mainMenu.next({userMenu:this.generateUserMenu(),shipmentMenu:this.generateShipmentMenu(),authorMenu:this.generateAuthorMenu(),contactMenu:this.generateContactMenu()})},this.generateUserMenu=()=>{let F=[];return F.push({type:"notifications",text:this.scope.network.getResourceOrKeyName("web_root_notification_title"),icon:"fa-regular fa-bell",path:"notifications"}),(this.scope.currentScope.network.settings.languagePack.indexOf("journalism")>-1&&this.user.chapterRoles.includes(ig.MerkuristJournalist||ig.Sales)||this.user.isAdmin&&this.scope.currentScope.network.settings.languagePack.endsWith("-business"))&&F.push({type:"administration",text:this.scope.network.getResourceOrKeyName("web_common_administration"),icon:"",path:"adminsettings"}),F.push({type:"accountSettings",text:this.scope.network.getResourceOrKeyName("web_root_authentication_accountSettings"),icon:"",path:"settings"}),F.push({type:"logout",text:this.scope.network.getResourceOrKeyName("admin_common_logout"),icon:"",path:""}),F},this.generateShipmentMenu=()=>{let F=[];return this.user.isAdvertiser&&(F.push({type:"campaigns",text:this.scope.network.getResourceOrKeyName("web_root_advertiser_myCampaigns"),icon:"",path:"campaigns"}),F.push({type:"advertiserBilling",text:this.scope.network.getResourceOrKeyName("web_advertiserBilling_pageTitle"),icon:"",path:"advertisers/billinginfo"})),this.scope.currentScope.chapter.settings.featureSales&&F.push({type:"sponsoredArticles",text:this.scope.network.getResourceOrKeyName("web_sponsoredArticle_sponsoredArticles"),icon:"",path:"sparticles"}),F},this.generateAuthorMenu=()=>{let F=[];return this.user.chapterRoles.includes(ig.Journalist)&&(F.push({type:"dashboard",text:this.scope.network.getResourceOrKeyName("web_root_journalist_dashboard"),icon:"",path:"dashboard"}),this.scope.currentScope.chapter.settings.featureCreateArticleWithoutSnip>0&&F.push({type:"newArticle",text:this.scope.network.getResourceOrKeyName("web_authorDashboard_newArticle"),icon:"",path:""}),this.scope.currentChapter.settings.configurations.enableEventCalendar&&F.push({type:"newEvent",text:this.scope.network.getResourceOrKeyName("web_authorDashboard_newEvent"),icon:"",path:""}),this.scope.currentScope.chapter.settings.featureAuthorBilling&&F.push({type:"authorBilling",text:this.scope.network.getResourceOrKeyName("web_authorBilling_pageTitle"),icon:"",path:"author/billinginfo"})),F},this.generateContactMenu=()=>{let F=[];return this.scope.currentChapter.settings.featureFeedback&&F.push({type:"feedback",text:this.scope.network.getResourceOrKeyName("web_root_root_feedback"),icon:"",path:"feedback"}),F.push({type:"imprint",text:this.scope.network.getResourceOrKeyName("web_common_imprint"),icon:"",path:"imprint"}),F},this.scope=this.scopeService.getScope(),this.user=this.scope.profile,this.profilServiceSubscription=this.profileService.profileChanged$.subscribe(F=>{this.user=F,this.user.isRegistered&&this.prepaireMenu()})}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(Co.p))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),AC=(()=>{class v{constructor(l,O){this.http=l,this.scopeService=O,this.eventCalendarEventData=[],this.scope=this.scopeService.getScope()}getEventCalendarEventData(){return 0===this.eventCalendarEventData.length?this.http.get(`${this.scope.apiEndpoint}eventcalendar/eventList`).toPromise().then(l=>(this.eventCalendarEventData=l,this.eventCalendarEventData)):Promise.resolve(this.eventCalendarEventData)}createEvent(){return this.http.post(`${this.scope.apiEndpoint}eventcalendar`,{}).toPromise()}updateEvent(l,O){return this.http.put(`${this.scope.apiEndpoint}eventcalendar/${l}`,O).toPromise()}deleteEvent(l){return this.http.delete(`${this.scope.apiEndpoint}eventcalendar/${l}`).toPromise()}publishEvent(l,O){return this.http.post(`${this.scope.apiEndpoint}eventcalendar/${l}/publish?breaking=${O?"true":"false"}`,{}).toPromise()}publishContentConnectEvent(l,O,F,se){return this.http.post(`${this.scope.apiEndpoint}eventCalenderContentConnect/${l}/publishContentConnect`,{ownerBreakingEvent:O,chapterNetworks:F,ccBreakingEvent:se}).toPromise()}requestEventPublish(l){return this.http.post(`${this.scope.apiEndpoint}eventcalendar/${l}/requestPublish`,{}).toPromise()}getEvent(l){return this.http.get(`${this.scope.apiEndpoint}eventcalendar/${l}?forEdit=false`).toPromise()}getEventForEdit(l){return this.http.get(`${this.scope.apiEndpoint}eventcalendar/${l}?forEdit=true`).toPromise()}acceptJoinEvent(l){return this.http.post(`${this.scope.apiEndpoint}eventcalendar/${l}/join/accept`,{}).toPromise()}declineJoinEvent(l){return this.http.post(`${this.scope.apiEndpoint}eventcalendar/${l}/join/decline`,{}).toPromise()}queueJoinEvent(l){return this.http.post(`${this.scope.apiEndpoint}eventcalendar/${l}/join/queue`,{}).toPromise()}translateEventDetail(l,O){return this.http.get(`${this.scope.apiEndpoint}eventcalendar/${l}/translate/${O}`).toPromise()}getEventsForAuthorDashboard(){return this.http.get(`${this.scope.apiEndpoint}eventcalendar/authorDasboardList`).toPromise()}congratulateToBirthday(l,O){const F=JSON.stringify(O).slice(1,-1);return this.http.post(`${this.scope.apiEndpoint}eventcalendar/${l}/congratulateForBirthday?occurance=${F}`,{}).toPromise()}getParticipants(l,O,F){let se=`${this.scope.apiEndpoint}eventcalendar/${l}/participants?page=${O}`;return F&&F>0&&(se+=`&elementsPerPage=${F}`),this.http.get(se).toPromise()}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(_.Qq),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();function JS(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG(2).$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function Yw(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.onItemClick())}),o.j41(2,"span"),o.EFF(3),o.k0s(),o.DNE(4,JS,2,1,"span",4),o.k0s()()}if(2&v){const l=o.XpG().$implicit;o.R7$(),o.Y8G("href",l.path,o.B4B),o.R7$(2),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}function ka(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG(2).$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function Zw(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.clickLogout())}),o.j41(1,"span"),o.EFF(2),o.k0s(),o.DNE(3,ka,2,1,"span",4),o.k0s()}if(2&v){const l=o.XpG().$implicit;o.R7$(2),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}function qS(v,p){if(1&v&&(o.j41(0,"div",6),o.DNE(1,Yw,5,3,"div",4)(2,Zw,4,2,"div",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngIf","logout"!=l.type),o.R7$(),o.Y8G("ngIf","logout"==l.type)}}function pL(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",13)(2,"dx-select-box",14),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.selectedLanguage,F)||(se.selectedLanguage=F),o.Njj(F)}),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG(2);return o.Njj(se.setLanguage(F))}),o.k0s(),o.j41(3,"dx-button",15),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.switchLanguage())}),o.k0s()()()}if(2&v){const l=o.XpG(2);o.R7$(2),o.FS9("placeholder",l.scope.currentScope.network.getResourceOrKeyName("web_article_translation_languageSelectBox_placeholder")),o.Y8G("items",l.multiLanguageSystemLanguages),o.R50("value",l.selectedLanguage)}}function TP(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"hr"),o.j41(2,"div",11)(3,"div",5),o.EFF(4),o.k0s(),o.nrm(5,"i",12),o.k0s(),o.DNE(6,pL,4,3,"div",4),o.k0s()),2&v){const l=o.XpG();o.R7$(4),o.JRh(l.scope.network.getResourceOrKeyName("web_root_language")),o.R7$(2),o.Y8G("ngIf",l.multiLanguageSystemEnabled&&l.multiLanguageSystemLanguages.length>0)}}function DP(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG().$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function eE(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",6)(1,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.onItemClick())}),o.j41(2,"span"),o.EFF(3),o.k0s(),o.DNE(4,DP,2,1,"span",4),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("href",l.path,o.B4B),o.R7$(2),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}function AP(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"hr"),o.j41(2,"div",5),o.EFF(3),o.k0s(),o.j41(4,"dx-list",2),o.DNE(5,eE,5,3,"div",3),o.k0s()()),2&v){const l=o.XpG();o.R7$(3),o.JRh(l.scope.network.getResourceOrKeyName("web_root_user_menu_shipment_dashboard")),o.R7$(),o.Y8G("dataSource",l.mainMenu.shipmentMenu)("hoverStateEnabled",!0)("activeStateEnabled",!1)("focusStateEnabled",!1),o.R7$(),o.Y8G("dxTemplateOf","item")}}function IP(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG(2).$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function IC(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"div",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.createArticle())}),o.j41(2,"span"),o.EFF(3),o.k0s(),o.DNE(4,IP,2,1,"span",4),o.k0s(),o.bVm()}if(2&v){const l=o.XpG().$implicit;o.R7$(3),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}function PC(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG(2).$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function gL(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"div",10),o.bIt("click",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.createEvent())}),o.j41(2,"span"),o.EFF(3),o.k0s(),o.DNE(4,PC,2,1,"span",4),o.k0s(),o.bVm()}if(2&v){const l=o.XpG().$implicit;o.R7$(3),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}function PP(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG(2).$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function MP(v,p){if(1&v){const l=o.RV6();o.qex(0),o.j41(1,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.onItemClick())}),o.j41(2,"span"),o.EFF(3),o.k0s(),o.DNE(4,PP,2,1,"span",4),o.k0s(),o.bVm()}if(2&v){const l=o.XpG().$implicit;o.R7$(),o.Y8G("href",l.path,o.B4B),o.R7$(2),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}function Qm(v,p){if(1&v&&(o.j41(0,"div",6),o.qex(1,16),o.DNE(2,IC,5,2,"ng-container",17)(3,gL,5,2,"ng-container",17)(4,MP,5,3,"ng-container",18),o.bVm(),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngSwitch",l.type),o.R7$(),o.Y8G("ngSwitchCase","newArticle"),o.R7$(),o.Y8G("ngSwitchCase","newEvent")}}function MC(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"hr"),o.j41(2,"div",5),o.EFF(3),o.k0s(),o.j41(4,"dx-list",2),o.DNE(5,Qm,5,3,"div",3),o.k0s()()),2&v){const l=o.XpG();o.R7$(3),o.JRh(l.scope.network.getResourceOrKeyName("web_common_authors")),o.R7$(),o.Y8G("dataSource",l.mainMenu.authorMenu)("hoverStateEnabled",!0)("activeStateEnabled",!1)("focusStateEnabled",!1),o.R7$(),o.Y8G("dxTemplateOf","item")}}function Id(v,p){if(1&v&&(o.j41(0,"span"),o.nrm(1,"i",9),o.k0s()),2&v){const l=o.XpG().$implicit;o.R7$(),o.Y8G("ngClass",l.icon)}}function fL(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",6)(1,"a",8),o.bIt("click",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.onItemClick())}),o.j41(2,"span"),o.EFF(3),o.k0s(),o.DNE(4,Id,2,1,"span",4),o.k0s()()}if(2&v){const l=p.$implicit;o.R7$(),o.Y8G("href",l.path,o.B4B),o.R7$(2),o.JRh(l.text),o.R7$(),o.Y8G("ngIf",l.icon)}}let RP=(()=>{class v{constructor(l,O,F,se,we,We,gt,Ft,pn,fi,_o){this.scopeService=l,this.navigationUserMenuService=O,this.authService=F,this.deviceService=se,this.oculus=we,this.hybridRoutingService=We,this.localStorageService=gt,this.articleService=Ft,this.eventCalendarService=pn,this.translationService=fi,this.profileService=_o,this.scope=this.scopeService.getScope(),this.legacyLanguageSystemEnabled=!1,this.legacyLanguageSystemLanguages=[],this.multiLanguageSystemEnabled=!1,this.multiLanguageSystemLanguages=[],this.selectedLanguage="",this.isApp=!1,this.closeDrawerEvent=new o.bkB,this.clickLogout=()=>{this.authService.logout().then(()=>{this.logout()})},this.createArticle=()=>{this.articleService.createArticle().then(Po=>{window.location.href=this.scope.currentChapter.path+`${Po.path}/edit`})},this.createEvent=()=>{this.eventCalendarService.createEvent().then(Po=>{window.location.href=this.scope.currentChapter.path+"/events/"+Po+"/edit"})},this.setLanguage=Po=>{this.selectedLanguage=Po.value},this.switchLanguage=()=>{let Po=this.selectedLanguage;if(this.legacyLanguageSystemEnabled&&this.hybridRoutingService.getCurrentRouteState(),this.multiLanguageSystemEnabled){let Ro=this.multiLanguageSystemLanguages.find(Rr=>Rr.vendorLanguageCode==Po);this.user.activeUserLanguage=Ro,this.profileService.updateFavoriteLanguage(Po),this.profileService.updateProfile(this.user).then(()=>window.location.reload())}},this.privateLogOut=()=>{const Po=this.scope.currentChapter.closed;this.oculus.navigate(""),Po?window.location.href="/"!==this.scope.currentChapter.path?this.scope.currentChapter.path+"/login":"/login":(null!==this.scope.currentScope.network.settings.sharedAppLogoutUrl&&(window.location.href=this.scope.currentScope.network.settings.sharedAppLogoutUrl),this.isApp?window.location.href="/":this.hybridRoutingService.switchState("app.main-login",null))},this.logout=()=>{this.localStorageService.getItem("oculusOptOut")?this.privateLogOut():this.oculus.push(!1,this.privateLogOut)},this.user=this.scope.profile,this.profileServiceSubscription=this.profileService.profileChanged$.subscribe(Po=>this.user=Po),this.navigationUserMenuServiceSubscription=this.navigationUserMenuService.mainMenu$.subscribe(Po=>this.mainMenu=Po)}ngOnDestroy(){this.profileServiceSubscription.unsubscribe(),this.navigationUserMenuServiceSubscription.unsubscribe()}ngOnInit(){this.isApp=this.deviceService.getUserAgentInfo().isApp,this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled&&(this.multiLanguageSystemEnabled=!0,this.translationService.getAvailableTargetLanguages().then(l=>{Object.entries(l).forEach(([O,F])=>{this.multiLanguageSystemLanguages.push({vendorLanguageCode:O,nativeName:F}),this.selectedLanguage=this.multiLanguageSystemLanguages.find(se=>se.languageCode===this.user.activeUserLanguage?.vendorLanguageCode)?.languageCode||null})}))}onItemClick(){this.closeDrawerEvent.emit()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Ph),o.rXU(so.u),o.rXU(s.E),o.rXU(iu),o.rXU(Rs.o),o.rXU(xt),o.rXU(ts),o.rXU(AC),o.rXU(Ei.M),o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-menu-content"]],outputs:{closeDrawerEvent:"closeDrawerEvent"},decls:12,vars:14,consts:[[1,"user-menu-content-base"],[1,"user-menu-content-menu"],[1,"panel-list",3,"dataSource","hoverStateEnabled","activeStateEnabled","focusStateEnabled"],["class","user-menu-item",4,"dxTemplate","dxTemplateOf"],[4,"ngIf"],[1,"headlines"],[1,"user-menu-item"],[3,"click",4,"ngIf"],[3,"click","href"],[1,"ml-1",3,"ngClass"],[3,"click"],[1,"headlines-container"],[1,"fa-solid","fa-language"],[1,"multiLanguageSystem-container"],["displayExpr","nativeName","valueExpr","vendorLanguageCode","stylingMode","underlined","width","80%",1,"ml-1",3,"valueChange","onValueChanged","placeholder","items","value"],["icon","login","stylingMode","text",3,"onClick"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"dx-list",2),o.DNE(3,qS,3,2,"div",3),o.k0s(),o.DNE(4,TP,7,2,"div",4)(5,AP,6,6,"div",4)(6,MC,6,6,"div",4),o.nrm(7,"hr"),o.j41(8,"div",5),o.EFF(9),o.k0s(),o.j41(10,"dx-list",2),o.DNE(11,fL,5,3,"div",3),o.k0s()()()),2&O&&(o.R7$(2),o.Y8G("dataSource",F.mainMenu.userMenu)("hoverStateEnabled",!0)("activeStateEnabled",!1)("focusStateEnabled",!1),o.R7$(),o.Y8G("dxTemplateOf","item"),o.R7$(),o.Y8G("ngIf",F.legacyLanguageSystemEnabled||F.multiLanguageSystemEnabled),o.R7$(),o.Y8G("ngIf",F.mainMenu.shipmentMenu.length>0),o.R7$(),o.Y8G("ngIf",F.mainMenu.authorMenu.length>0),o.R7$(3),o.JRh(F.scope.network.getResourceOrKeyName("web_common_contact")),o.R7$(),o.Y8G("dataSource",F.mainMenu.contactMenu)("hoverStateEnabled",!0)("activeStateEnabled",!1)("focusStateEnabled",!1),o.R7$(),o.Y8G("dxTemplateOf","item"))},dependencies:[a.YU,a.bT,a.ux,a.e1,a.fG,Rt.eC,Hi.e,ec.a,Wt.l],styles:[".user-menu-content-base[_ngcontent-%COMP%]   .user-menu-item[_ngcontent-%COMP%]{font-size:1rem;color:var(--textColor);font-family:var(--fontPrimary)}.user-menu-content-base[_ngcontent-%COMP%]   .user-menu-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;font-size:inherit;color:inherit;font-family:inherit}.user-menu-content-base[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:10px}.user-menu-content-base[_ngcontent-%COMP%]   .multiLanguageSystem-container[_ngcontent-%COMP%]{display:flex}.user-menu-content-base[_ngcontent-%COMP%]   .headlines-container[_ngcontent-%COMP%]{display:flex;align-items:center}.user-menu-content-base[_ngcontent-%COMP%]   .headlines-container[_ngcontent-%COMP%]   .fa-language[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;color:var(--textColor)}.user-menu-content-base[_ngcontent-%COMP%]   .headlines[_ngcontent-%COMP%]{color:var(--textColor)}"]})}}return v})(),Qw=(()=>{class v{constructor(l){this.scopeService=l,this.scope=this.scopeService.getScope()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-menu-unregistered-content"]],decls:4,vars:1,consts:[[1,"user-menu-unregistered-content-base"],[1,"user-menu-unregistered-content-text"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.nrm(1,"hr"),o.j41(2,"div",1),o.EFF(3),o.k0s()()),2&O&&(o.R7$(3),o.SpI(" ",F.scope.network.getResourceOrKeyName("web_user_side_menu_unregistered_text")," "))},styles:[".user-menu-unregistered-content-base[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:10px}.user-menu-unregistered-content-base[_ngcontent-%COMP%]   .user-menu-unregistered-content-text[_ngcontent-%COMP%]{margin-top:2rem;font-size:1rem;color:var(--textColor);margin-left:1rem}"]})}}return v})(),Jw=(()=>{class v{constructor(l,O){this.scopeService=l,this.profileService=O,this.containersSubject=new Be.m,this.containersSubject$=this.containersSubject.asObservable(),this.scope=this.scopeService.getScope(),this.user=this.profileService.profile,this.profileService.profileChanged$.subscribe(F=>{this.user=F,this.containersSubject.next(this.prepairMenu(this.scope.currentChapter.containers))})}prepairMenu(l){const O=[];return l.forEach(F=>{if(null!=F.roleId&&this.user.chapterRoles?.includes(F.roleId)||null==F.roleId){const se={id:F.id,text:F.name,items:[]};F.items.forEach(we=>{const We=this.mapItem(we);We&&se.items.push(We)}),O.push(se)}}),O}mapItem(l){const O={id:l.id,text:l.name,url:l.url,staticArticlePath:l.staticArticlePath,items:[]};return l.items&&l.items.length>0&&l.items.forEach(F=>{const se=this.mapItem(F);se&&O.items.push(se)}),O}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(Co.p))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var tE=M(471);function Kx(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",6),o.bIt("click",function(){o.eBV(l);const F=o.XpG().$implicit,se=o.XpG();return o.Njj(se.openUrl(F))}),o.j41(1,"span"),o.EFF(2),o.k0s()()}if(2&v){const l=o.XpG().$implicit;o.R7$(2),o.JRh(l.text)}}function kP(v,p){if(1&v&&(o.j41(0,"div",7)(1,"span"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG().$implicit;o.R7$(2),o.JRh(l.text)}}function nE(v,p){if(1&v&&(o.j41(0,"div",3),o.DNE(1,Kx,3,1,"div",4)(2,kP,3,1,"div",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngIf",l.url||l.staticArticlePath),o.R7$(),o.Y8G("ngIf",!l.url&&!l.staticArticlePath)}}let Xx=(()=>{class v{constructor(l,O,F){this.scopeService=l,this.navigationContainerService=O,this.hybridRoutingService=F,this.containers=[],this.closeDrawerEvent=new o.bkB,this.onItemClick=()=>{this.closeDrawerEvent.emit()},this.scope=this.scopeService.getScope(),this.navigationContainerServiceSubscription=this.navigationContainerService.containersSubject$.subscribe(se=>this.containers=se)}ngOnDestroy(){this.navigationContainerServiceSubscription.unsubscribe()}openUrl(l){if(l.url)switch(l.url){case"/"+this.scope.currentChapter.regEx+"/feedback":this.onItemClick(),this.hybridRoutingService.switchState("app.feedback",null);break;case"/"+this.scope.currentChapter.regEx+"/authors":this.onItemClick(),this.hybridRoutingService.switchState("app.authors",null);break;case"/"+this.scope.currentChapter.regEx+"/events":this.onItemClick(),this.hybridRoutingService.switchState("app.eventCalendar",null);break;default:window.location.href=l.url}else if(l.staticArticlePath){let O=this.scope.staticArticles.find(F=>F.path==l.staticArticlePath)?.id;O?(this.onItemClick(),this.hybridRoutingService.switchState("app.staticArticles_"+O,null)):window.location.href=this.scope.currentChapter.path+l.staticArticlePath}}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jw),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-navigation-menu-content"]],outputs:{closeDrawerEvent:"closeDrawerEvent"},decls:3,vars:4,consts:[[1,"container-menu-content-base"],["displayExpr","text","keyExpr","id","expandEvent","click",3,"items","dataStructure","expandAllEnabled"],["class","container-menu-item",4,"dxTemplate","dxTemplateOf"],[1,"container-menu-item"],[3,"click",4,"ngIf"],["class","container-main-menu-item",4,"ngIf"],[3,"click"],[1,"container-main-menu-item"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"dx-tree-view",1),o.DNE(2,nE,3,2,"div",2),o.k0s()()),2&O&&(o.R7$(),o.Y8G("items",F.containers)("dataStructure","tree")("expandAllEnabled",!0),o.R7$(),o.Y8G("dxTemplateOf","item"))},dependencies:[a.bT,Rt.eC,tE.t],styles:[".container-menu-content-base[_ngcontent-%COMP%]   .container-menu-item[_ngcontent-%COMP%]{font-size:1rem;color:var(--textColor);font-family:var(--fontPrimary)}.container-menu-content-base[_ngcontent-%COMP%]   .container-main-menu-item[_ngcontent-%COMP%]{font-weight:700}"]})}}return v})();function iE(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",18)(1,"app-user-badge-simple",19),o.bIt("closeDrawerEvent",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.closeDrawer())}),o.EFF(2,">"),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("user",l.user)}}function qw(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",20)(1,"span",21),o.nrm(2,"i",22),o.k0s(),o.j41(3,"dx-button",23),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.unregisteredLogin())}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(3),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_common_signIn"))}}function mL(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"app-user-menu-content",17),o.bIt("closeDrawerEvent",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.closeDrawer())}),o.k0s()()}}function LP(v,p){1&v&&(o.j41(0,"div"),o.nrm(1,"app-user-menu-unregistered-content"),o.k0s())}let oE=(()=>{class v{constructor(l,O,F,se,we){this.navigationService=l,this.el=O,this.scopeService=F,this.profileService=se,this.hypridRoutingService=we,this.offcanvasRight=null,this.offcanvasLeft=null,this.closeDrawer=()=>{this.offcanvasRight.hide(),this.navigationService.toggleUserMenuState.set(!1)},this.closeLeftDrawer=()=>{this.offcanvasLeft.hide()},this.unregisteredLogin=()=>{this.offcanvasRight.hide(),this.navigationService.toggleUserMenuState.set(!1),this.hypridRoutingService.switchState("app.main-login",null)},(0,o.QZP)(()=>{const We=this.el.nativeElement.querySelector("#offcanvasRight");We&&this.navigationService.toggleUserMenuState()?(this.offcanvasRight||(this.offcanvasRight=new DC.Offcanvas(We),We.addEventListener("hidden.bs.offcanvas",()=>{this.navigationService.toggleUserMenuState.set(!1)})),this.offcanvasRight.show()):this.offcanvasRight&&this.offcanvasRight.hide();const gt=this.el.nativeElement.querySelector("#offcanvasLeft");gt&&this.navigationService.toggleContainerMenuState()?(this.offcanvasLeft||(this.offcanvasLeft=new DC.Offcanvas(gt),gt.addEventListener("hidden.bs.offcanvas",()=>{this.navigationService.toggleContainerMenuState.set(!1)})),this.offcanvasLeft.show()):this.offcanvasLeft&&this.offcanvasLeft.hide()}),this.scope=this.scopeService.getScope(),this.user=this.scope.profile,this.profileServiceSubscription=this.profileService.profileChanged$.subscribe(We=>this.user=We)}ngOnDestroy(){this.profileServiceSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ba.o),o.rXU(o.aKT),o.rXU(b.A),o.rXU(Co.p),o.rXU(Rs.o))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-user-menu"]],decls:22,vars:6,consts:[[1,"user-menu-drawer-wrapper"],["tabindex","-1","id","offcanvasRight","aria-labelledby","offcanvasRightLabel",1,"offcanvas","offcanvas-end"],[1,"offcanvas-header","row","pr-0"],[1,""],[1,"user-menu-close-icon",3,"click"],[1,"dx-icon-remove"],[1,"row"],["class","user-menu-content-avatar",4,"ngIf"],["class","user-menu--unregistered-content-avatar",4,"ngIf"],[1,"offcanvas-body"],[4,"ngIf"],[1,"container-menu-drawer-wrapper"],["tabindex","-1","id","offcanvasLeft","aria-labelledby","offcanvasLeftLabel",1,"offcanvas","offcanvas-start"],[1,"offcanvas-header"],["id","offcanvasLeftLabel",1,"offcanvas-home"],[1,"offcanvas-home-link",3,"click","href"],[1,"fa-regular","fa-newspaper"],[3,"closeDrawerEvent"],[1,"user-menu-content-avatar"],[3,"closeDrawerEvent","user"],[1,"user-menu--unregistered-content-avatar"],[1,"icon-circle"],[1,"fa-regular","fa-user"],["stylingMode","text",1,"user-menu-login-button",3,"onClick","text"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),o.bIt("click",function(){return F.closeDrawer()}),o.nrm(5,"i",5),o.k0s()(),o.j41(6,"div",6),o.DNE(7,iE,3,1,"div",7)(8,qw,4,1,"div",8),o.k0s()(),o.j41(9,"div",9),o.DNE(10,mL,2,0,"div",10)(11,LP,2,0,"div",10),o.k0s()()(),o.j41(12,"div",11)(13,"div",12)(14,"div",13)(15,"div",14)(16,"a",15),o.bIt("click",function(){return F.closeLeftDrawer()}),o.nrm(17,"i",16),o.EFF(18),o.k0s()()(),o.j41(19,"div",9)(20,"div")(21,"app-navigation-menu-content",17),o.bIt("closeDrawerEvent",function(){return F.closeLeftDrawer()}),o.k0s()()()()()),2&O&&(o.R7$(7),o.Y8G("ngIf",F.user.isRegistered),o.R7$(),o.Y8G("ngIf",!F.user.isRegistered),o.R7$(2),o.Y8G("ngIf",F.user.isRegistered),o.R7$(),o.Y8G("ngIf",!F.user.isRegistered),o.R7$(5),o.Y8G("href",F.scope.currentChapter.path,o.B4B),o.R7$(2),o.SpI(" ",F.scope.currentScope.network.getResourceOrKeyName("web_common_home"),""))},dependencies:[a.bT,Hi.e,Bc,RP,Qw,Xx],styles:[".user-menu-drawer-wrapper[_ngcontent-%COMP%]   #offcanvasRight[_ngcontent-%COMP%]{border-left:solid 6px var(--textColor);width:auto;background-color:var(--backgroundColor);z-index:1045;max-width:25vw}.user-menu-close-icon[_ngcontent-%COMP%]{display:flex;justify-content:end;align-items:center}.user-menu-close-icon[_ngcontent-%COMP%]   .dx-icon-remove[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;color:var(--textColor)}.container-menu-drawer-wrapper[_ngcontent-%COMP%]   #offcanvasLeft[_ngcontent-%COMP%]{border-right:solid 6px var(--textColor);width:auto;background-color:var(--backgroundColor);z-index:1045}.container-menu-drawer-wrapper[_ngcontent-%COMP%]   .offcanvas-home-link[_ngcontent-%COMP%]{font-size:1.1rem;text-decoration:none;color:var(--textColor);font-weight:700}.container-menu-drawer-wrapper[_ngcontent-%COMP%]   .offcanvas-header[_ngcontent-%COMP%]{padding-bottom:0}.user-menu--unregistered-content-avatar[_ngcontent-%COMP%]{align-items:center;display:flex;margin-top:15%}.user-menu--unregistered-content-avatar[_ngcontent-%COMP%]   .icon-circle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;background-color:var(--backgroundColor);border:2px solid var(--textColor60);color:var(--textColor)}.user-menu--unregistered-content-avatar[_ngcontent-%COMP%]   .icon-circle[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:2rem}.user-menu--unregistered-content-avatar[_ngcontent-%COMP%]   .user-menu-login-button[_ngcontent-%COMP%]{font-size:2rem;color:var(--textColor);margin-left:.5rem}@media (max-width: 768px){.user-menu-drawer-wrapper[_ngcontent-%COMP%]   #offcanvasRight[_ngcontent-%COMP%]{max-width:80vw}}"]})}}return v})(),BP=(()=>{class v{constructor(l,O){this.scopeService=l,this.http=O,this.sponsoredArticles=null,this.scope=l.getScope()}getSponsoredArticles(){return this.sponsoredArticles?Promise.resolve(this.sponsoredArticles):this.http.get(this.scope.apiEndpoint+"sponsoredArticles").toPromise().then(l=>(this.sponsoredArticles=l,l))}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();function eT(v,p){if(1&v&&(o.j41(0,"div",5)(1,"div"),o.nrm(2,"app-displayable-shipment-with-image",6),o.k0s()()),2&v){const l=p.$implicit;o.R7$(2),o.Y8G("data",l)}}let NP=(()=>{class v{constructor(l,O){this.sponsoredArticleListService=l,this.scopeService=O,this.displayedArticles=[],this.scope=this.scopeService.getScope()}ngOnInit(){this.sponsoredArticleListService.getSponsoredArticles().then(l=>{this.displayedArticles=l})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(BP),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-sponsored-article-list"]],decls:6,vars:2,consts:[[1,"container","sponsored-article-list-wrapper"],[1,"row","sponsored-article-list-title-wrapper"],[1,"sponsored-article-list-title"],[1,"row"],["class","sponsored-article-displayables-wrapper",4,"ngFor","ngForOf"],[1,"sponsored-article-displayables-wrapper"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2),o.EFF(3),o.k0s()(),o.j41(4,"div",3),o.DNE(5,eT,3,1,"div",4),o.k0s()()),2&O&&(o.R7$(3),o.SpI(" ",F.scope.network.getResourceOrKeyName("web_sponsoredArticleMeta_title")," "),o.R7$(2),o.Y8G("ngForOf",F.displayedArticles))},dependencies:[a.Sq,Ul],styles:[".sponsored-article-list-wrapper[_ngcontent-%COMP%]{max-width:var(--designContentWidth);width:100%}.sponsored-article-list-title-wrapper[_ngcontent-%COMP%]{justify-content:center;padding:2rem 0}.sponsored-article-list-title[_ngcontent-%COMP%]{color:var(--textColor);text-transform:uppercase;font-size:2rem;font-family:var(--fontTertiary);height:auto;width:auto;border-bottom:1px solid var(--textColor)}.sponsored-article-displayables-wrapper[_ngcontent-%COMP%]{width:50%;margin-bottom:2rem}@media (max-width: 768px){.sponsored-article-displayables-wrapper[_ngcontent-%COMP%]{width:100%}}"]})}}return v})();function FP(v,p){if(1&v){const l=o.RV6();o.j41(0,"dxi-item")(1,"dx-button",26),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.signUp())}),o.EFF(2),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_save"))}}function _L(v,p){1&v&&o.nrm(0,"dxi-item",24)}function LV(v,p){if(1&v&&(o.j41(0,"div")(1,"p",27),o.EFF(2),o.k0s(),o.j41(3,"p",28),o.EFF(4),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_authorBilling_basedataDescription")," "),o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_authorBilling_basedataInvalid")," ")}}function VP(v,p){if(1&v&&(o.j41(0,"div")(1,"p",29),o.EFF(2),o.nrm(3,"br"),o.EFF(4),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.SpI("",l.scope.currentScope.network.resources.web_authorBilling_sendSuccessfulDescription_0," "),o.R7$(2),o.JRh(l.scope.currentScope.network.resources.web_authorBilling_sendSuccessfulDescription_1)}}let HP=(()=>{class v{constructor(l,O,F){this.profileService=O,this.authorService=F,this.success=!1,this.scope=l.getScope()}ngOnInit(){this.profileService.getProfile().then(l=>{l.isRegistered||window.location.replace("/"),this.authorService.getAuthor(l.guid).then(O=>{O.billingFirstName&&(this.author.billingfirstname=O.billingFirstName),O.taxNumber&&(this.author.taxnumber=O.taxNumber),O.taxIdNumber&&(this.author.taxidnumber=O.taxIdNumber),O.accountHolder&&(this.author.accountholder=O.accountHolder),O.bic&&(this.author.bic=O.bic),O.tax&&(this.author.tax=O.tax),O.billingLastName&&(this.author.billinglastname=O.billingLastName),O.billingCompanyName&&(this.author.billingcompanyname=O.billingCompanyName),O.address&&(this.author.address=O.address),O.city&&(this.author.city=O.city),O.postalCode&&(this.author.postalcode=O.postalCode),O.imprint&&(this.author.imprint=O.imprint),O.iban&&(this.author.iban=O.iban),O.iban&&(this.author.ibanshow=O.iban.substr(0,7)+O.iban.substr(7).replace(/.(?=.{4,}$)/g,"*")),this.author=O})},l=>{window.location.replace("/")})}validateIBAN(l){const O=l.value;if(!O)return!1;const F=O.replace(/[\s-]/g,"");if(!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/.test(F))return!1;const We=(F.slice(4)+F.slice(0,4)).split("").map(Ft=>Ft.match(/[A-Z]/)?(Ft.charCodeAt(0)-55).toString():Ft).join("");let gt=0;for(let Ft=0;Ft<We.length;Ft+=9){const pn=We.slice(Ft,Ft+9);gt=Number((BigInt(gt+pn)%97n).toString())}return 1===gt}signUp(){this.form.instance.validate()&&this.authorService.updateAuthorBillingInfo(this.author).then(l=>{this.success=!0},()=>{this.success=!1})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Co.p),o.rXU(nu))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-author-billing-editor"]],viewQuery:function(O,F){if(1&O&&o.GBs(xo.o,5),2&O){let se;o.mGM(se=o.lsd())&&(F.form=se.first)}},decls:47,vars:37,consts:[["id","form-container"],["id","form","labelMode","floating",3,"formDataChange","formData"],["template","instruction"],["itemType","group",3,"colCount","caption"],[3,"text"],["dataField","billingFirstName","editorType","dxTextBox",3,"colSpan"],["type","required",3,"message"],["dataField","billingLastName","editorType","dxTextBox",3,"colSpan"],["dataField","address","editorType","dxTextBox",3,"colSpan"],["dataField","postalCode","editorType","dxTextBox",3,"colSpan"],["dataField","city","editorType","dxTextBox",3,"colSpan"],["dataField","billingCompanyName","editorType","dxTextBox",3,"colSpan"],["itemType","group",3,"caption"],["dataField","taxNumber","editorType","dxTextBox"],["dataField","taxIdNumber","editorType","dxTextBox"],["dataField","tax","editorType","dxSwitch"],["dataField","accountHolder","editorType","dxTextBox"],["dataField","iban","editorType","dxTextBox"],["text","IBAN"],["type","custom",3,"validationCallback","message"],["dataField","bic","editorType","dxTextBox"],["text","BIC"],["type","pattern","pattern","^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$",3,"message"],["dataField","imprint.value","editorType","dxTextArea"],["template","success"],[4,"dxTemplate","dxTemplateOf"],[3,"onClick"],["data-ng-if","!success",1,"instruction"],["data-ng-show","!success",1,"instruction"],[1,"instruction"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"dx-form",1),o.mxI("formDataChange",function(we){return o.DH7(F.author,we)||(F.author=we),we}),o.nrm(2,"dxi-item",2),o.j41(3,"dxi-item",3),o.nrm(4,"dxo-label",4),o.j41(5,"dxi-item",5),o.nrm(6,"dxo-label",4)(7,"dxi-validation-rule",6),o.k0s(),o.j41(8,"dxi-item",7),o.nrm(9,"dxo-label",4)(10,"dxi-validation-rule",6),o.k0s(),o.j41(11,"dxi-item",8),o.nrm(12,"dxo-label",4)(13,"dxi-validation-rule",6),o.k0s(),o.j41(14,"dxi-item",9),o.nrm(15,"dxo-label",4)(16,"dxi-validation-rule",6),o.k0s(),o.j41(17,"dxi-item",10),o.nrm(18,"dxo-label",4)(19,"dxi-validation-rule",6),o.k0s(),o.j41(20,"dxi-item",11),o.nrm(21,"dxo-label",4),o.k0s()(),o.j41(22,"dxi-item",12)(23,"dxi-item",13),o.nrm(24,"dxo-label",4),o.k0s(),o.j41(25,"dxi-item",14),o.nrm(26,"dxo-label",4),o.k0s(),o.j41(27,"dxi-item",15),o.nrm(28,"dxo-label",4),o.k0s()(),o.j41(29,"dxi-item",12)(30,"dxi-item",16),o.nrm(31,"dxo-label",4),o.k0s(),o.j41(32,"dxi-item",17),o.nrm(33,"dxo-label",18)(34,"dxi-validation-rule",6)(35,"dxi-validation-rule",19),o.k0s(),o.j41(36,"dxi-item",20),o.nrm(37,"dxo-label",21)(38,"dxi-validation-rule",6)(39,"dxi-validation-rule",22),o.k0s()(),o.j41(40,"dxi-item",12)(41,"dxi-item",23),o.nrm(42,"dxo-label",4),o.k0s()(),o.DNE(43,FP,3,1,"dxi-item")(44,_L,1,0,"dxi-item",24)(45,LV,5,2,"div",25)(46,VP,5,2,"div",25),o.k0s()()),2&O&&(o.R7$(),o.R50("formData",F.author),o.R7$(2),o.Y8G("colCount",4)("caption",F.scope.network.getResourceOrKeyName("web_authorBilling_adressTitle")),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_adressTitle")),o.R7$(),o.Y8G("colSpan",4),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_firstname")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_user_firstnameError")),o.R7$(),o.Y8G("colSpan",4),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_lastname")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_user_lastnameError")),o.R7$(),o.Y8G("colSpan",4),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorRegister_streetHousenumberPlaceholder")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_authorBilling_adressError")),o.R7$(),o.Y8G("colSpan",1),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorRegister_postalcodePlaceholder")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_authorBilling_postalcodeError")),o.R7$(),o.Y8G("colSpan",3),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_cityPlaceholder")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_authorBilling_cityError")),o.R7$(),o.Y8G("colSpan",4),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_companyPlaceholder")),o.R7$(),o.Y8G("caption",F.scope.network.getResourceOrKeyName("web_authorBilling_taxTitle")),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_taxNumberPlaceholder")),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_taxIdNumberPlaceholder")),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_salesTax")),o.R7$(),o.Y8G("caption",F.scope.network.getResourceOrKeyName("web_authorBilling_bankAccountTitle")),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorBilling_bankAccountholderPlaceholder")),o.R7$(3),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_authorBilling_ibanError")),o.R7$(),o.Y8G("validationCallback",F.validateIBAN)("message",F.scope.network.getResourceOrKeyName("web_authorBilling_ibanError")),o.R7$(3),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_authorBilling_bicError")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_authorBilling_bicError")),o.R7$(),o.Y8G("caption",F.scope.network.getResourceOrKeyName("web_common_imprint")),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_common_imprint")),o.R7$(),o.vxM(F.success?44:43),o.R7$(2),o.Y8G("dxTemplateOf","instruction"),o.R7$(),o.Y8G("dxTemplateOf","success"))},dependencies:[mn.CVf,Rt.eC,mn.rkl,Hi.e,mn.Inh,xo.o],styles:[".dx-switch-container[_ngcontent-%COMP%]{border:hidden!important}.dx-switch-container[_ngcontent-%COMP%]:before{border:hidden!important}.dx-switch-container[_ngcontent-%COMP%]:after{border:hidden!important}"]})}}return v})();function uc(v,p){if(1&v&&(o.j41(0,"div",6)(1,"b"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.network.getResourceOrKeyName(1==l.author.gender?"web_common_freelanceAuthorMale":"web_common_freelanceAuthorFemale"))}}function BV(v,p){if(1&v&&(o.j41(0,"div",6)(1,"b"),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName(1==l.author.gender?"web_common_authorMale":"web_common_authorFemale"))}}let UP=(()=>{class v{constructor(l){this.scope=l.getScope()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-author-list-item"]],inputs:{author:[0,"authorData","author"]},decls:14,vars:11,consts:[[1,"col-12","col-sm-6","col-md-6","col-lg-4"],[1,"media"],[1,"media-left"],[3,"href"],["alt","","width","100","height","100",1,"media-object","authorListItem-avatar",2,"margin-bottom","20px",3,"src"],[1,"media-body"],["ng-switch","","on","author.gender",1,"info-text"],[1,"clearfix"],[1,"media-heading",3,"href"],[1,"media-heading"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"a",3),o.nrm(5,"img",4),o.k0s()()(),o.j41(6,"div",5),o.nrm(7,"br"),o.DNE(8,uc,3,1,"div",6)(9,BV,3,1,"div",6),o.nrm(10,"div",7),o.j41(11,"a",8)(12,"h2",9),o.EFF(13),o.k0s()()()()()),2&O&&(o.R7$(4),o.FCK("href","",F.scope.currentChapter.path,"/profile/",F.author.guid,"",o.B4B),o.R7$(),o.Mz_("src","",F.author.avatarImageUrl,"?w=100&h=100&mode=crop",o.B4B),o.R7$(3),o.vxM(F.author.freelance?8:9),o.R7$(3),o.FCK("href","",F.scope.currentChapter.path,"/profile/",F.author.guid,"",o.B4B),o.R7$(2),o.Lme("",F.author.firstName," ",F.author.lastName,""))}})}}return v})();const vL=(v,p)=>p.guid;function Cv(v,p){if(1&v&&(o.nrm(0,"div",1),o.j41(1,"h4"),o.EFF(2),o.k0s()),2&v){const l=o.XpG().$implicit;o.R7$(2),o.JRh(l.levelName)}}function tT(v,p){if(1&v&&(o.DNE(0,Cv,3,1),o.nrm(1,"app-author-list-item",0)),2&v){const l=p.$implicit,O=o.XpG();o.vxM(O.isCurrentLevel(l.levelName)?-1:0),o.R7$(),o.Y8G("authorData",l)}}let rE=(()=>{class v{constructor(l){this.authorService=l,this._currentLevel=""}ngOnInit(){this.authorService.getAuthors().then(l=>{this.authors=l,this.sortDesc()})}sortDesc(){this.authors&&(this.authors=this.authors.sort((l,O)=>l.levelId>O.levelId?-1:1))}isCurrentLevel(l){return this._currentLevel==l||(this._currentLevel=l,!1)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(nu))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-author-list"]],decls:2,vars:0,consts:[[3,"authorData"],[1,"row"]],template:function(O,F){1&O&&o.Z7z(0,tT,2,2,"app-author-list-item",0,vL),2&O&&o.Dyx(F.authors)},dependencies:[UP]})}}return v})(),Jg=(()=>{class v{constructor(l,O){this.scopeService=l,this.http=O,this.calendarArticles=null,this.calendarSponsoredArticles=null,this.calendarEvents=null,this.calendarSnips=null,this.scope=l.getScope()}getEventCalendarArticles(){return this.calendarArticles?Promise.resolve(this.calendarArticles):this.http.get(`${this.scope.apiEndpoint}articles/events`).toPromise().then(l=>(this.calendarArticles=l,l))}getEventCalendarEvents(){return this.calendarEvents?Promise.resolve(this.calendarEvents):this.http.get(`${this.scope.apiEndpoint}eventcalendar/eventList`).toPromise().then(l=>(this.calendarEvents=l,l))}getEventCalendarSponsoredArticles(){return this.calendarSponsoredArticles?Promise.resolve(this.calendarSponsoredArticles):this.http.get(`${this.scope.apiEndpoint}sponsoredArticles/events`).toPromise().then(l=>(this.calendarSponsoredArticles=l,l))}getEventCalendarSnips(){return this.calendarSnips?Promise.resolve(this.calendarSnips):this.http.get(`${this.scope.apiEndpoint}snips/events`).toPromise().then(l=>(this.calendarSnips=l,l))}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();const nT=v=>({"event-calendar-displayable-wrapper-is-today":v}),RC=v=>({"event-calendar-displayable-user-icon":v});function CL(v,p){if(1&v&&(o.j41(0,"div",15),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_event_calendar_displayable_is_today_text"))}}function yL(v,p){if(1&v&&(o.j41(0,"div",16),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.JRh(l.formattedCalendarDate)}}function zP(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",18),o.bIt("click",function(F){o.eBV(l);const se=o.XpG(2);return o.Njj(se.congratulate(F))}),o.nrm(1,"i",19),o.EFF(2),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_congratulate"),"")}}function NV(v,p){if(1&v&&(o.j41(0,"div",16),o.DNE(1,zP,3,1,"div",17),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("ngIf",!l.hasCongratulated)}}function FV(v,p){if(1&v&&(o.j41(0,"div",20),o.nrm(1,"img",21),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.FS9("src",l.imagePath,o.B4B),o.Y8G("ngClass",o.eq3(2,RC,1==l.data.type))}}function VV(v,p){1&v&&(o.j41(0,"div",22),o.nrm(1,"i",23),o.k0s())}let HV=(()=>{class v{constructor(l,O,F){this.scopeService=l,this.deviceService=O,this.eventCalendarService=F,this.enableHighQualityImage="",this.mobile="",this.blobStorage="",this.formattedCalendarDate="",this.overline="",this.title="",this.isToday=!1,this.referralLink="",this.imagePath="",this.showSnipDefaultIcon=!1,this.hasCongratulated=!1,this.congratulatable=!1,this.scope=l.getScope()}ngOnInit(){this.enableHighQualityImage=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",this.mobile=this.deviceService.getUserAgentInfo().isMobile?"-sm":"",this.blobStorage=this.scope.globalSettings.blobStorageCdnUrl,this.isToday=this.data.isToday,1==this.data.articleListDisplayableType?this.processArticleData():2==this.data.articleListDisplayableType?this.processSponsoredArticleData():4==this.data.articleListDisplayableType?this.processSnipData():this.processEventData()}processArticleData(){let l=new Date(this.data.calendarDate).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"});this.imagePath=this.data.coverAssetReference?.assetImage?.guid?`${this.blobStorage}/images/${this.data.coverAssetReference.assetImage.guid}?preset=cover${this.enableHighQualityImage}${this.mobile}-4x3`:`${this.scope.globalSettings.blobStorageCdnUrl}/${this.scope.globalSettings.blobStorageContainerNameImage}/dummy.jpg`,this.formattedCalendarDate=this.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:l}),this.overline=this.data.heading,this.title=this.data.text,this.referralLink=this.scope.currentScope.chapter.path+this.data.path}processSponsoredArticleData(){let l=this.scope.network.settings.languageCode,O=new Date(this.data.calendarDate);this.formattedCalendarDate=O.toLocaleDateString(l,{weekday:"long"})+",  der "+O.getDate()+". "+O.toLocaleDateString(l,{month:"long"}),this.overline=this.data.heading,this.title=this.data.text,this.referralLink=this.scope.currentScope.chapter.path+this.data.path,this.data.coverAssetReference?.assetImage?.guid&&(this.imagePath=`${this.blobStorage}/images/${this.data.coverAssetReference.assetImage.guid}?preset=cover${this.enableHighQualityImage}${this.mobile}-4x3`)}processSnipData(){let l=new Date(this.data.calendarDate).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"});this.formattedCalendarDate=this.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:l}),this.title=this.data.text,this.referralLink=this.scope.currentScope.chapter.path+this.data.path;let O,F=this.data.assetReferences.filter(se=>null!=se.assetImage&&null==se.assetImage.deleted);if(F.length>0)if(null!=this.data.extendedConfigurations){let se=JSON.parse(this.data.extendedConfigurations);O=se.thumbnailGuid?F.find(we=>we.guid==se.thumbnailGuid):F?.reduce(function(we,We){return new Date(we.published)<new Date(We.published)?we:We})}else O=F?.reduce(function(se,we){return new Date(se.published)<new Date(we.published)?se:we});O&&(this.imagePath=this.blobStorage+"/images/"+`${O.assetImage.guid}?preset=cover${this.enableHighQualityImage}${this.mobile}-4x3`),this.imagePath||(this.showSnipDefaultIcon=!0)}processEventData(){let l=new Date(this.data.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),O=new Date(this.data.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"});this.formattedCalendarDate=l!==O?this.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_dateRange",{start:l,end:O}):this.scope.currentScope.network.getResourceOrKeyName("web_eventCalendar_list_date",{date:l}),this.overline=this.data.overline,this.title=this.data.title,this.referralLink=this.data.targetUri,this.imagePath=this.data.imageUri,this.congratulatable=this.data.isToday||new Date>new Date(this.data.start),this.data.ownReactions.forEach(F=>{1===F.type&&F.occurance==this.data.start&&(this.hasCongratulated=!0)})}congratulate(l){l.preventDefault(),this.eventCalendarService.congratulateToBirthday(this.data.id,this.data.start).then(()=>{this.hasCongratulated=!0})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E),o.rXU(AC))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-event-calendar-displayable"]],inputs:{data:"data"},decls:21,vars:13,consts:[[1,"event-calendar-displayable-wrapper","container",3,"ngClass"],[3,"href"],[1,"mb-3"],[1,"event-calendar-displayable-content-wrapper"],[1,"row"],["class","col-2 event-calendar-displayable-wrapper-is-today-text",4,"ngIf"],[1,"col-2","event-calendar-displayable-short-date-wrapper"],[1,"event-calendar-displayable-day"],[1,"event-calendar-displayable-month"],[1,"col-7","col-md-8","event-calendar-displayable-text-wrapper"],[1,"event-calendar-displayable-description"],[1,"event-calendar-displayable-title"],["class","event-calendar-displayable-full-date",4,"ngIf"],["class","col-3 col-md-2 event-calendar-displayable-image",4,"ngIf"],["class","col-3 col-md-2 event-calendar-displayable-snip-icon",4,"ngIf"],[1,"col-2","event-calendar-displayable-wrapper-is-today-text"],[1,"event-calendar-displayable-full-date"],["class","btn btn-default event-calendar-displayable-congratulate-button",3,"click",4,"ngIf"],[1,"btn","btn-default","event-calendar-displayable-congratulate-button",3,"click"],[1,"fas","fa-gifts"],[1,"col-3","col-md-2","event-calendar-displayable-image"],[1,"img-fluid",3,"src","ngClass"],[1,"col-3","col-md-2","event-calendar-displayable-snip-icon"],[1,"icon-snippet-start","green"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"a",1)(2,"div",2)(3,"div",3)(4,"div",4),o.DNE(5,CL,2,1,"div",5),o.k0s(),o.j41(6,"div",4)(7,"div",6)(8,"div",7),o.EFF(9),o.k0s(),o.j41(10,"div",8),o.EFF(11),o.k0s()(),o.j41(12,"div",9)(13,"div",10),o.EFF(14),o.k0s(),o.j41(15,"div",11),o.EFF(16),o.k0s(),o.DNE(17,yL,2,1,"div",12)(18,NV,2,1,"div",12),o.k0s(),o.DNE(19,FV,2,4,"div",13)(20,VV,2,0,"div",14),o.k0s()()()()()),2&O&&(o.Y8G("ngClass",o.eq3(11,nT,F.isToday)),o.R7$(),o.Y8G("href",F.referralLink,o.B4B),o.R7$(4),o.Y8G("ngIf",F.isToday),o.R7$(4),o.JRh(F.data.day),o.R7$(2),o.JRh(F.data.month),o.R7$(3),o.SpI("",F.overline,"\xa0"),o.R7$(2),o.SpI("",F.title,"\xa0"),o.R7$(),o.Y8G("ngIf",1!=F.data.type),o.R7$(),o.Y8G("ngIf",1==F.data.type&&F.congratulatable),o.R7$(),o.Y8G("ngIf",!F.showSnipDefaultIcon),o.R7$(),o.Y8G("ngIf",F.showSnipDefaultIcon))},dependencies:[a.YU,a.bT],styles:[".event-calendar-displayable-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem;max-width:100%;padding:1rem;color:var(--textColor)}.event-calendar-displayable-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;color:var(--textColor)}.event-calendar-displayable-wrapper-is-today[_ngcontent-%COMP%]{background-color:var(--colorSecondary)}.event-calendar-displayable-wrapper-is-today-text[_ngcontent-%COMP%]{font-size:1.7rem;text-align:center;margin-bottom:.5rem}.event-calendar-displayable-short-date-wrapper[_ngcontent-%COMP%]{text-align:center}.event-calendar-displayable-day[_ngcontent-%COMP%]{font-size:4rem;margin-bottom:-1.5rem}.event-calendar-displayable-month[_ngcontent-%COMP%]{font-size:1.7rem}.event-calendar-displayable-title[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.event-calendar-displayable-full-date[_ngcontent-%COMP%], .event-calendar-displayable-description[_ngcontent-%COMP%]{font-size:1.3rem;font-family:var(--fontTertiary)}.event-calendar-displayable-congratulate-button[_ngcontent-%COMP%]{background-color:var(--backgroundColor);color:var(--textColor)}.event-calendar-displayable-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%}.event-calendar-displayable-user-icon[_ngcontent-%COMP%]{border-radius:50%;aspect-ratio:unset!important}.event-calendar-displayable-snip-icon[_ngcontent-%COMP%]{font-size:4.688rem;text-align:center}@media (max-width: 768px){.event-calendar-displayable-wrapper[_ngcontent-%COMP%]{margin-bottom:1rem;padding:.5rem}.event-calendar-displayable-wrapper-is-today-text[_ngcontent-%COMP%]{font-size:1.3rem;margin-bottom:.3rem}.event-calendar-displayable-day[_ngcontent-%COMP%]{font-size:3rem;margin-bottom:-1rem}.event-calendar-displayable-month[_ngcontent-%COMP%]{font-size:1.2rem}.event-calendar-displayable-title[_ngcontent-%COMP%]{font-size:1.8rem}.event-calendar-displayable-full-date[_ngcontent-%COMP%], .event-calendar-displayable-description[_ngcontent-%COMP%]{font-size:1.1rem}.event-calendar-displayable-snip-icon[_ngcontent-%COMP%]{font-size:3.5rem}}@media (max-width: 576px){.event-calendar-displayable-wrapper[_ngcontent-%COMP%]{margin-bottom:1rem;padding:.5rem}.event-calendar-displayable-wrapper-is-today-text[_ngcontent-%COMP%]{font-size:1.1rem;margin-bottom:.3rem}.event-calendar-displayable-day[_ngcontent-%COMP%]{font-size:2.5rem;margin-bottom:-1rem}.event-calendar-displayable-month[_ngcontent-%COMP%]{font-size:1rem}.event-calendar-displayable-title[_ngcontent-%COMP%]{font-size:1.6rem}.event-calendar-displayable-full-date[_ngcontent-%COMP%], .event-calendar-displayable-description[_ngcontent-%COMP%]{font-size:1rem}.event-calendar-displayable-snip-icon[_ngcontent-%COMP%]{font-size:3rem}}"]})}}return v})();function iT(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-event-calendar-displayable",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function bL(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-event-calendar-displayable",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function Ky(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-event-calendar-displayable",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function Yx(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-event-calendar-displayable",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function GP(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-event-calendar-displayable",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function kC(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-event-calendar-displayable",7),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}function sE(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,iT,2,1,"div",5)(2,bL,2,1,"div",5)(3,Ky,2,1,"div",5)(4,Yx,2,1,"div",5)(5,GP,2,1,"div",5)(6,kC,2,1,"div",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("ngForOf",l.Articles),o.R7$(),o.Y8G("ngForOf",l.SponsoredArticles),o.R7$(),o.Y8G("ngForOf",l.Snips),o.R7$(),o.Y8G("ngForOf",l.Birthdays),o.R7$(),o.Y8G("ngForOf",l.Events),o.R7$(),o.Y8G("ngForOf",l.ExternalEvents)}}function xL(v,p){if(1&v&&(o.j41(0,"div")(1,"h2",6),o.EFF(2),o.k0s(),o.DNE(3,sE,7,6,"div",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(2),o.JRh(l.Month),o.R7$(),o.Y8G("ngForOf",l.Dates)}}let Kf=(()=>{class v{constructor(l,O){this.scopeService=l,this.eventCalendarService=O,this.cachedEventData=[],this.calendar=[],this.eventsLoading=!0,this.languageCode="",this.filteredCalendar=[],this.isFiltered=!1,this.filterGroupsReady=!1,this.eventCategories=[],this.eventGroups=[],this.eventTypes=[],this.noSelectionStyle={"background-color":"cadetblue"},this.containsArticle=!1,this.containsEvent=!1,this.containsSnip=!1,this.containsSponsored=!1,this.containsBirthday=!1,this.hideFilterUi=!1,this.filterItems=[],this.selection=null,this.scope=l.getScope(),this.disableFilter=this.scope.currentChapter.settings.configurations.eventsBirthdayCalendarConfiguration.EventFilterDisabled}ngOnInit(){this.languageCode=this.scope.currentScope.network.settings.languageCode;var l=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(1==l){var O=this.scope.profile,F=this.scope.network.settings.languagePack.split("-")[0];this.languageCode=F,null!=O.activeUserLanguage?.vendorLanguageCode&&F!=O.activeUserLanguage?.vendorLanguageCode&&(this.languageCode=O.activeUserLanguage.vendorLanguageCode)}this.fetchData()}fetchData(){var l=[],O=[],F=[],se=[];this.hideFilterUi="hidden"==new URLSearchParams(location.search).get("filterUi");var we=Number(new URLSearchParams(location.search).get("type")),We=new URLSearchParams(location.search).get("category"),gt=null!=we&&null!=We;Promise.allSettled([this.eventCalendarService.getEventCalendarArticles(),this.eventCalendarService.getEventCalendarSnips(),this.eventCalendarService.getEventCalendarSponsoredArticles(),this.eventCalendarService.getEventCalendarEvents()]).then(Po=>{Po.forEach((Ro,Rr)=>{"rejected"===Ro.status&&console.error(`Service call ${Rr+1} failed:`,Ro.reason)}),"fulfilled"===Po[0].status&&Ft(Po[0].value),"fulfilled"===Po[1].status&&pn(Po[1].value),"fulfilled"===Po[2].status&&fi(Po[2].value),"fulfilled"===Po[3].status&&_o(Po[3].value),this.calendar=O.sort(function(Ro,Rr){return Ro.Dates[0].CalendarDate-Rr.Dates[0].CalendarDate}),this.cachedEventData=JSON.parse(JSON.stringify(this.calendar)),this.filteredCalendar=JSON.parse(JSON.stringify(this.cachedEventData)),this.eventsLoading=!1,this.initializeFilterGroups(),this.initializeEventTypes(),this.filterItems=this.eventTypes.length>1?this.eventCategories.concat(this.eventTypes):this.eventCategories,gt&&(1==we?this.selection=We:2==we&&(this.selection="Event"===We?2:1))});let Ft=Po=>{Po.forEach((Ro,Rr)=>{if(null!==Ro.calendarDate){this.containsArticle=!0;var br=new Date(Ro.calendarDate),cr=br.getMonth(),ds=br.getDate(),Ss=br.getFullYear(),Zs=new Intl.DateTimeFormat(this.languageCode).format(br);Ro.isToday=Zs===new Intl.DateTimeFormat(this.languageCode).format(new Date),Ro.day=ds,Ro.month=br.toLocaleDateString(this.languageCode,{month:"short"});let bh=br.toLocaleDateString(this.languageCode,{weekday:"long"}),Iu=br.toLocaleDateString(this.languageCode,{month:"long"});if(typeof l[+(cr+""+Ss)]>"u"){F[Zs]={Day:bh+", der "+ds+". "+Iu,Articles:[Ro],Snips:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:br},se[+(cr+""+Ss)]=[F[Zs]];var xd={Month:Iu+" "+Ss,Dates:se[+(cr+""+Ss)]};l[+(cr+""+Ss)]=xd,O.push(xd)}else typeof F[Zs]>"u"?(F[Zs]={Day:bh+", der "+ds+". "+Iu,Articles:[Ro],Snips:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:br},se[+(cr+""+Ss)].push(F[Zs]),se[+(cr+""+Ss)].sort((Eg,kS)=>Eg.CalendarDate.getTime()-kS.CalendarDate.getTime())):F[Zs].Articles.push(Ro)}})},pn=Po=>{Po.forEach((Ro,Rr)=>{if(null!==Ro.calendarDate){this.containsSnip=!0;var br=new Date(Ro.calendarDate),cr=br.getMonth(),ds=br.getDate(),Ss=br.getFullYear(),Zs=new Intl.DateTimeFormat(this.languageCode).format(br);Ro.isToday=Zs===new Intl.DateTimeFormat(this.languageCode).format(new Date),Ro.day=ds,Ro.month=br.toLocaleDateString(this.languageCode,{month:"short"});let bh=br.toLocaleDateString(this.languageCode,{weekday:"long"}),Iu=br.toLocaleDateString(this.languageCode,{month:"long"});if(typeof l[+(cr+""+Ss)]>"u"){F[Zs]={Day:bh+", der "+ds+". "+Iu,Snips:[Ro],Articles:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:br},se[+(cr+""+Ss)]=[F[Zs]];var xd={Month:Iu+" "+Ss,Dates:se[+(cr+""+Ss)]};l[+(cr+""+Ss)]=xd,O.push(xd)}else typeof F[Zs]>"u"?(F[Zs]={Day:bh+", der "+ds+". "+Iu,Snips:[Ro],Articles:[],SponsoredArticles:[],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:br},se[+(cr+""+Ss)].push(F[Zs]),se[+(cr+""+Ss)].sort((Eg,kS)=>Eg.CalendarDate.getTime()-kS.CalendarDate.getTime())):F[Zs].Snips.push(Ro)}})},fi=Po=>{Po.forEach((Ro,Rr)=>{if(null!==Ro.calendarDate){this.containsSponsored=!0;var br=new Date(Ro.calendarDate),cr=br.getMonth(),ds=br.getDate(),Ss=br.getFullYear(),Zs=new Intl.DateTimeFormat(this.languageCode).format(br);Ro.isToday=Zs===new Intl.DateTimeFormat(this.languageCode).format(new Date),Ro.day=ds,Ro.month=br.toLocaleDateString(this.languageCode,{month:"short"});let bh=br.toLocaleDateString(this.languageCode,{weekday:"long"}),Iu=br.toLocaleDateString(this.languageCode,{month:"long"});if(typeof l[+(cr+""+Ss)]>"u"){F[Zs]={Day:bh+", der "+ds+". "+Iu,Snips:[],Articles:[],SponsoredArticles:[Ro],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:br},se[+(cr+""+Ss)]=[F[Zs]];var xd={Month:Iu+" "+Ss,Dates:se[+(cr+""+Ss)]};l[+(cr+""+Ss)]=xd,O.push(xd)}else typeof F[Zs]>"u"?(F[Zs]={Day:bh+", der "+ds+". "+Iu,Snips:[],Articles:[],SponsoredArticles:[Ro],Birthdays:[],Events:[],ExternalEvents:[],CalendarDate:br},se[+(cr+""+Ss)].push(F[Zs]),se[+(cr+""+Ss)].sort((Eg,kS)=>Eg.CalendarDate.getTime()-kS.CalendarDate.getTime())):F[Zs].SponsoredArticles.push(Ro)}})},_o=Po=>{Po.forEach((Ro,Rr)=>{if(null!==Ro.start){1===Ro.type&&(this.containsBirthday=!0),this.containsEvent=!0;var br=new Date(Ro.start),cr=br.getMonth(),ds=br.getDate(),Ss=br.getFullYear(),Zs=new Intl.DateTimeFormat(this.languageCode).format(br);Ro.isToday=Zs===new Intl.DateTimeFormat(this.languageCode).format(new Date),Ro.day=ds,Ro.month=br.toLocaleDateString(this.languageCode,{month:"short"});let bh=br.toLocaleDateString(this.languageCode,{weekday:"long"}),Iu=br.toLocaleDateString(this.languageCode,{month:"long"});if(typeof l[+(cr+""+Ss)]>"u"){F[Zs]={Day:bh+", der "+ds+". "+Iu,Snips:[],Articles:[],SponsoredArticles:[],Birthdays:1===Ro.type?[Ro]:[],Events:2===Ro.type?[Ro]:[],ExternalEvents:3===Ro.type?[Ro]:[],CalendarDate:br},se[+(cr+""+Ss)]=[F[Zs]];var xd={Month:Iu+" "+Ss,Dates:se[+(cr+""+Ss)]};l[+(cr+""+Ss)]=xd,O.push(xd)}else if(typeof F[Zs]>"u")F[Zs]={Day:bh+", der "+ds+". "+Iu,Snips:[],Articles:[],SponsoredArticles:[],Birthdays:1===Ro.type?[Ro]:[],Events:2===Ro.type?[Ro]:[],ExternalEvents:3===Ro.type?[Ro]:[],CalendarDate:br},se[+(cr+""+Ss)].push(F[Zs]),se[+(cr+""+Ss)].sort((Eg,kS)=>Eg.CalendarDate.getTime()-kS.CalendarDate.getTime());else switch(Ro.type){case 1:F[Zs].Birthdays.push(Ro);break;case 3:F[Zs].ExternalEvents.push(Ro);break;default:F[Zs].Events.push(Ro)}}})}}initializeFilterGroups(){this.eventGroups=this.scope.currentScope.chapter.chapterGroups.filter(l=>!0===l.isEventCategory),this.eventGroups.forEach(l=>{l.chapters&&(this.eventCategories=this.eventCategories.concat(l.chapters))}),this.filterGroupsReady=!0}initializeEventTypes(){this.eventTypes=[],this.containsBirthday&&this.eventTypes.push({id:1,shortName:this.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_birthday")}),this.containsEvent&&this.eventTypes.push({id:2,shortName:this.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_events")}),this.containsSnip&&this.eventTypes.push({id:3,shortName:this.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_snips")}),this.containsSponsored&&this.eventTypes.push({id:4,shortName:this.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_spons")}),this.containsArticle&&this.eventTypes.push({id:5,shortName:this.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_article")})}changeFilter(l){if(!l)return;let O,F=l,se=this.hideFilterUi?"&filterUi=hidden":"";if(this.filteredCalendar=JSON.parse(JSON.stringify(this.cachedEventData)),"string"==typeof l)O=1,this.filteredCalendar=this.filteredCalendar.filter(we=>(we.Dates=we.Dates.filter(We=>(We.ExternalEvents=[],We.Events=We.Events.filter(gt=>gt.chapters.some(Ft=>Ft.id===l)),We.Events.length>0)),we.Dates.length>0));else if("number"==typeof l)switch(O=2,l){case 1:this.filteredCalendar=this.filteredCalendar.filter(we=>(we.Dates=we.Dates.filter(We=>(We.Birthdays=We.Birthdays.filter(gt=>!0),We.Events=We.Events.filter(gt=>2!==gt.type&&3!==gt.type),We.ExternalEvents=[],We.Articles=[],We.Snips=[],We.SponsoredArticles=[],We.Birthdays.length>0)),we.Dates.length>0)),F="Birthday";break;case 2:this.filteredCalendar=this.filteredCalendar.filter(we=>(we.Dates=we.Dates.filter(We=>(We.Events=We.Events.filter(gt=>2===gt.type||3===gt.type),We.Articles=[],We.Birthdays=[],We.Snips=[],We.SponsoredArticles=[],We.Events.length>0)),we.Dates.length>0)),F="Event";break;case 3:this.filteredCalendar=this.filteredCalendar.filter(we=>(we.Dates=we.Dates.filter(We=>(We.Snips=We.Snips.filter(gt=>!0),We.Events=[],We.ExternalEvents=[],We.Birthdays=[],We.Articles=[],We.SponsoredArticles=[],We.Snips.length>0)),we.Dates.length>0)),F="Snip";break;case 4:this.filteredCalendar=this.filteredCalendar.filter(we=>(we.Dates=we.Dates.filter(We=>(We.SponsoredArticles=We.SponsoredArticles.filter(gt=>!0),We.Events=[],We.ExternalEvents=[],We.Birthdays=[],We.Snips=[],We.Articles=[],We.SponsoredArticles.length>0)),we.Dates.length>0)),F="SponsoredArticle";break;case 5:this.filteredCalendar=this.filteredCalendar.filter(we=>(we.Dates=we.Dates.filter(We=>(We.Articles=We.Articles.filter(gt=>!0),We.Events=[],We.ExternalEvents=[],We.Birthdays=[],We.Snips=[],We.SponsoredArticles=[],We.Articles.length>0)),we.Dates.length>0)),F="Article";break;default:alert("Etwas ist schief gelaufen!")}window.history.pushState("","",`events?type=${O}&category=${F}${se}`),this.isFiltered=!0,this.hideFilterUi&&(this.disableFilter=!0)}resetFilter(){this.resetAll()}resetAll(){this.isFiltered=!1,this.eventTypes=[],this.eventCategories=[],this.selection=null,this.filteredCalendar=[],this.containsArticle=!1,this.containsEvent=!1,this.containsSnip=!1,this.containsSponsored=!1,this.containsBirthday=!1,this.calendar=[],this.cachedEventData=[],this.hideFilterUi=!1,this.eventsLoading=!0}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jg))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-event-calendar"]],decls:6,vars:9,consts:[[1,"container","event-calendar-wrapper"],[1,"row","event-calendar-drop-down-button-wrapper"],["icon","","stylingMode","text","type","normal","displayExpr","shortName","keyExpr","id",1,"event-calendar-drop-down-button",3,"onSelectionChanged","showArrowIcon","disabled","items","useSelectMode","text","selectedItemKey"],[3,"isLoading","loadingMessage"],[1,"row"],[4,"ngFor","ngForOf"],[1,"event-calendar-month"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"dx-drop-down-button",2),o.bIt("onSelectionChanged",function(we){return F.changeFilter(we.item.id)}),o.k0s()(),o.nrm(3,"app-apicodo-loading-spinner",3),o.j41(4,"div",4),o.DNE(5,xL,4,2,"div",5),o.k0s()()),2&O&&(o.R7$(2),o.FS9("text",F.scope.currentScope.network.getResourceOrKeyName("web_event_eventCalendar_page_title")),o.Y8G("showArrowIcon",F.filterItems.length>0&&!F.disableFilter)("disabled",!(0!=F.filterItems.length&&!F.disableFilter))("items",F.filterItems)("useSelectMode",!0)("selectedItemKey",F.selection),o.R7$(),o.Y8G("isLoading",F.eventsLoading)("loadingMessage",F.scope.currentScope.network.getResourceOrKeyName("web_events_are_loading_message")),o.R7$(2),o.Y8G("ngForOf",F.isFiltered?F.filteredCalendar:F.cachedEventData))},dependencies:[a.Sq,Kt.h,bn,HV],styles:[".event-calendar-wrapper[_ngcontent-%COMP%]{max-width:var(--designContentWidth);width:100%}.event-calendar-wrapper[_ngcontent-%COMP%]     .dx-button-text, .event-calendar-wrapper[_ngcontent-%COMP%]     .dx-icon{color:var(--textColor);text-transform:uppercase;font-size:2rem}.event-calendar-title[_ngcontent-%COMP%]{font-size:3rem;font-weight:700}.event-calendar-month[_ngcontent-%COMP%]{margin-bottom:3rem;padding-left:5%}.event-calendar-drop-down-button-wrapper[_ngcontent-%COMP%]{padding:2rem 0;justify-content:center}.event-calendar-drop-down-button[_ngcontent-%COMP%]{height:auto;width:auto;border-bottom:1px solid var(--textColor);font-family:var(--fontTertiary);color:var(--textColor)}.event-calendar-drop-down-button[_ngcontent-%COMP%]     .dx-button-mode-text{height:auto}@media (max-width: 768px){.event-calendar-month[_ngcontent-%COMP%]{font-size:3rem}.event-calendar-drop-down-button[_ngcontent-%COMP%]{margin-bottom:4rem}}@media (max-width: 576px){.event-calendar-month[_ngcontent-%COMP%]{font-size:2rem}}"]})}}return v})();var aE=M(8025),lE=M(1106);function Zx(v,p){if(1&v&&(o.j41(0,"dxi-item",14),o.nrm(1,"dxo-label",4)(2,"dxi-validation-rule",5),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("text",l.scope.network.getResourceOrKeyName("web_user_staffNumber")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_user_staffNumberError"))}}function SL(v,p){if(1&v){const l=o.RV6();o.j41(0,"dxi-item",19),o.nrm(1,"dxo-label",4)(2,"dxi-validation-rule",5),o.k0s(),o.j41(3,"dxi-item",20)(4,"dx-radio-group",21),o.bIt("onValueChanged",function(F){o.eBV(l);const se=o.XpG();return o.Njj(se.onValueChanged(F))}),o.nrm(5,"dxi-validation-rule",22),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.Y8G("text",l.scope.network.getResourceOrKeyName("web_user_yearOfBirth")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_user_yearOfBirthError")),o.R7$(2),o.Y8G("items",l.gender),o.R7$(),o.Y8G("message",l.scope.currentScope.network.getResourceOrKeyName("web_register_genderError"))}}function Wn(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",24)(2,"div",25)(3,"dx-switch",26),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG(2);return o.DH7(se.signUpData.isNewsletterSubscribe,F)||(se.signUpData.isNewsletterSubscribe=F),o.Njj(F)}),o.k0s()(),o.j41(4,"div",27),o.EFF(5),o.nrm(6,"br"),o.EFF(7),o.k0s()()()}if(2&v){const l=o.XpG(2);o.R7$(3),o.R50("value",l.signUpData.isNewsletterSubscribe),o.R7$(2),o.SpI(" ",l.newsletterText," "),o.R7$(2),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_register_newsletterCheckboxDescription_1")," ")}}function oT(v,p){1&v&&(o.nrm(0,"dxi-item",23),o.DNE(1,Wn,8,3,"div",17)),2&v&&(o.R7$(),o.Y8G("dxTemplateOf","newsletterSwitchWithLabelTemplate"))}function cE(v,p){if(1&v&&(o.j41(0,"a",28),o.EFF(1),o.k0s(),o.EFF(2)),2&v){const l=o.XpG(2);o.Mz_("href","",l.scope.currentChapter.path,"/tos",o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_termsOfUse")),o.R7$(),o.SpI(" ",l.scope.currentScope.network.resources.web_partnerAccessDialog_termsOfUseCheckboxDescription_1," ")}}function pp(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div",24)(2,"div",25)(3,"dx-switch",26),o.mxI("valueChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.isTosAccepted,F)||(se.isTosAccepted=F),o.Njj(F)}),o.k0s()(),o.j41(4,"div",27),o.EFF(5),o.DNE(6,cE,3,4),o.j41(7,"a",28),o.EFF(8),o.k0s(),o.EFF(9),o.k0s()()()}if(2&v){const l=o.XpG();o.R7$(3),o.R50("value",l.isTosAccepted),o.R7$(2),o.SpI(" ",l.scope.network.getResourceOrKeyName("web_register_termsOfUsecheckboxDescription_0")," "),o.R7$(),o.vxM(l.scope.currentScope.network.settings.configurations.enableTOS?6:-1),o.R7$(),o.Mz_("href","",l.scope.currentChapter.path,"/pp",o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_privacyPolicy")),o.R7$(),o.SpI(" ",l.scope.currentScope.network.resources.web_register_termsOfUsecheckboxDescription_2," ")}}let rT=(()=>{class v{constructor(l,O){this.isTosAccepted=!1,this.newsletterText="",this.passwordVisible=!1,this.changePasswordMode=()=>{this.passwordVisible=!this.passwordVisible;const F=this.passwordVisible?"text":"password";this.form.instance.getEditor("Password")?.option("mode",F);const se=this.passwordVisible?"fa-solid fa-eye":"fa-solid fa-eye-slash";this.form.instance.getEditor("PasswordIcon")?.option("icon",se)},this.passwordEditorOptions={mode:this.passwordVisible?"text":"password",valueChangeEvent:"keyup",onValueChanged:()=>{let F=this.form.instance.getEditor("ConfirmPassword");F&&F.option("value")&&aE.A.getInstance(F.element()).validate()},buttons:[{name:"PasswordIcon",location:"after",options:{stylingMode:"text",icon:"fa-solid fa-eye",onClick:this.changePasswordMode}}]},this.confirmPasswordEditorOptions={mode:"password",valueChangeEvent:"keyup",buttons:[{name:"password",location:"after",options:{stylingMode:"text"}}]},this.registerButtonOptions={},this.onRegisterButtonClicked=()=>{var F=new URLSearchParams(window.location.search).get("closedToken");F&&(this.signUpData.closedChapterToken=F),this.isTosAccepted&&this.form.instance.validate()&&this.signUpData.gender&&this.authService.register(this.signUpData).then(()=>{window.location.href=this.scope.currentChapter.path+"/account/registration-complete"},se=>{this.handleRegistrationErrorResponse(se)})},this.handleRegistrationErrorResponse=F=>{if(F.modelState){var we=[];for(var We in F.modelState)if(F.modelState.hasOwnProperty(We))for(var gt=0;gt<F.modelState[We].length;gt++){var Ft=F.modelState[We][gt];-1===we.indexOf(Ft)&&we.push(Ft)}we.join(" ")}},this.passwordErrorMessage="",this.validatePassword=F=>{const se=F.value;if(!se)return!1;const we=this.scope.currentScope.network.settings.passwordMinLength,We=this.scope.currentScope.network.settings.passwordMinCapitals,gt=this.scope.currentScope.network.settings.passwordMinNumbers,Ft=this.scope.currentScope.network.settings.passwordMinSpecialCharacters;return se.length<we?(this.passwordErrorMessage=this.scope.currentScope.network.getResourceOrKeyName("web_user_password_minLength").replace("{num}",we),!1):(se.match(/[A-Z]/g)||[]).length<We?(this.passwordErrorMessage=this.scope.currentScope.network.getResourceOrKeyName("web_user_password_minCapitals").replace("{num}",We),!1):(se.match(/[0-9]/g)||[]).length<gt?(this.passwordErrorMessage=this.scope.currentScope.network.getResourceOrKeyName("web_user_password_minNumbers").replace("{num}",gt),!1):!((se.match(/[^A-Za-z0-9]/g)||[]).length<Ft&&(this.passwordErrorMessage=this.scope.currentScope.network.getResourceOrKeyName("web_user_password_minSpecialCharacters").replace("{num}",Ft),1))},this.passwordComparison=()=>this.signUpData.password,this.scope=l.getScope(),this.authService=O}ngOnInit(){this.gender=[this.scope.currentScope.network.getResourceOrKeyName("web_user_female"),this.scope.currentScope.network.getResourceOrKeyName("web_user_male")],this.newsletterText=this.scope.network.getResourceOrKeyName("web_register_newsletterCheckboxDescription_0").replace("{{chapterName}}",this.scope.currentChapter.shortName),this.registerButtonOptions={text:this.scope.currentScope.network.getResourceOrKeyName("web_common_register"),useSubmitBehavior:!0,onClick:this.onRegisterButtonClicked}}onValueChanged({value:l}){this.signUpData.gender=this.gender.findIndex(O=>O===l)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(so.u))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-register"]],viewQuery:function(O,F){if(1&O&&o.GBs(xo.o,5),2&O){let se;o.mGM(se=o.lsd())&&(F.form=se.first)}},inputs:{signUpData:"signUpData"},decls:27,vars:19,consts:[["passwordTextBox",""],["id","form-container",1,"register-component-base"],["id","form","labelMode","floating",3,"formDataChange","formData"],["dataField","email","editorType","dxTextBox"],[3,"text"],["id","signUpError","type","required",3,"message"],["name","Password","dataField","password",3,"editorOptions"],["id","signUpError","type","required","message","Password is required"],["type","custom","id","signUpError",3,"validationCallback","message"],["name","ConfirmPassword","editorType","dxTextBox","dataField","confirmPassword",3,"editorOptions"],["id","signUpError","type","required","message","Confirm Password is required"],["type","compare","id","signUpError","message","Password and Confirm Password do not match",3,"comparisonTarget"],["dataField","firstName","editorType","dxTextBox"],["dataField","lastName","editorType","dxTextBox"],["dataField","staffNumber","editorType","dxTextBox"],["template","termsOfUseSwitchWithLabelTemplate"],["id","signUpError","type","required"],[4,"dxTemplate","dxTemplateOf"],["itemType","button",3,"buttonOptions"],["dataField","yearOfBirth","editorType","dxTextBox"],["dataField","gender"],[3,"onValueChanged","items"],["typeof","required",3,"message"],["template","newsletterSwitchWithLabelTemplate"],[1,"register-switch"],[1,""],[3,"valueChange","value"],[1,"register-label"],["target","_blank",3,"href"]],template:function(O,F){if(1&O){const se=o.RV6();o.j41(0,"div",1)(1,"dx-form",2),o.mxI("formDataChange",function(We){return o.eBV(se),o.DH7(F.signUpData,We)||(F.signUpData=We),o.Njj(We)}),o.j41(2,"dxi-item",3),o.nrm(3,"dxo-label",4)(4,"dxi-validation-rule",5),o.k0s(),o.j41(5,"dxi-item",6,0),o.nrm(7,"dxo-label",4)(8,"dxi-validation-rule",7)(9,"dxi-validation-rule",8),o.k0s(),o.j41(10,"dxi-item",9),o.nrm(11,"dxo-label",4)(12,"dxi-validation-rule",10)(13,"dxi-validation-rule",11),o.k0s(),o.j41(14,"dxi-item",12),o.nrm(15,"dxo-label",4)(16,"dxi-validation-rule",5),o.k0s(),o.j41(17,"dxi-item",13),o.nrm(18,"dxo-label",4)(19,"dxi-validation-rule",5),o.k0s(),o.DNE(20,Zx,3,2,"dxi-item",14)(21,SL,6,4)(22,oT,2,1),o.j41(23,"dxi-item",15),o.nrm(24,"dxi-validation-rule",16),o.k0s(),o.DNE(25,pp,10,7,"div",17),o.nrm(26,"dxi-item",18),o.k0s()()}2&O&&(o.R7$(),o.R50("formData",F.signUpData),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_email")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_user_emailError")),o.R7$(),o.Y8G("editorOptions",F.passwordEditorOptions),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_password")),o.R7$(2),o.Y8G("validationCallback",F.validatePassword)("message",F.passwordErrorMessage),o.R7$(),o.Y8G("editorOptions",F.confirmPasswordEditorOptions),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_repeatPassword")),o.R7$(2),o.Y8G("comparisonTarget",F.passwordComparison),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_firstname")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_user_firstnameError")),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_lastname")),o.R7$(),o.Y8G("message",F.scope.network.getResourceOrKeyName("web_user_lastnameError")),o.R7$(),o.vxM(F.scope.currentScope.chapter.settings.enableUserStaffNumber?20:-1),o.R7$(),o.vxM(F.scope.currentScope.chapter.settings.featureRegistrationAgeGender?-1:21),o.R7$(),o.vxM(!F.scope.currentScope.chapter.settings.featureNewsletterForced&&F.scope.currentScope.chapter.settings.featureNewsletter?22:-1),o.R7$(3),o.Y8G("dxTemplateOf","termsOfUseSwitchWithLabelTemplate"),o.R7$(),o.Y8G("buttonOptions",F.registerButtonOptions))},dependencies:[mn.CVf,Rt.eC,mn.rkl,mn.Inh,xo.o,lE.s,tr.Y],styles:[".register-component-base[_ngcontent-%COMP%]{width:50%;padding-left:1rem}.register-component-base[_ngcontent-%COMP%]   .register-label[_ngcontent-%COMP%]{font-size:1rem;font-family:var(--textPrimary);color:var(--textColor60)}.register-component-base[_ngcontent-%COMP%]   .register-switch[_ngcontent-%COMP%]{display:flex;gap:10px}@media (max-width: 768px){.register-component-base[_ngcontent-%COMP%]{width:100%}}"]})}}return v})();function WP(v,p){if(1&v&&(o.j41(0,"dxi-item",3),o.nrm(1,"dxo-label",15)(2,"dxi-validation-rule",16),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("text",l.scope.network.getResourceOrKeyName("web_user_emailOrUsername")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_user_emailError"))}}function Xy(v,p){if(1&v&&(o.j41(0,"dxi-item",3),o.nrm(1,"dxo-label",15)(2,"dxi-validation-rule",16),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Y8G("text",l.scope.network.getResourceOrKeyName("web_user_email")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_user_emailError"))}}function EL(v,p){1&v&&o.nrm(0,"dxi-item",9)}function sT(v,p){1&v&&o.nrm(0,"dxi-item",11)}function Yy(v,p){1&v&&o.nrm(0,"dxi-item",12)}function yv(v,p){1&v&&o.nrm(0,"dxi-item",13)}function gp(v,p){if(1&v&&(o.j41(0,"p"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_authenticationDialog_description_above_loginTitle"))}}function $P(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,gp,2,1,"p"),o.j41(2,"h2",17),o.EFF(3),o.k0s(),o.j41(4,"p"),o.EFF(5),o.k0s()()),2&v){const l=o.XpG();o.R7$(),o.vxM(l.scope.currentScope.network.resources.web_authenticationDialog_description_above_loginTitle&&""!=l.scope.currentScope.network.resources.web_authenticationDialog_description_above_loginTitle?1:-1),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_loginTitle")),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_authenticationDialog_description"))}}function OL(v,p){if(1&v&&(o.j41(0,"div"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginFacebookCookieConsentHint"))}}function aT(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"div")(2,"dx-button",18),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.facebookLogin())}),o.k0s()(),o.DNE(3,OL,2,1,"div"),o.k0s()}if(2&v){const l=o.XpG();o.R7$(2),o.Y8G("text",l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginFacebook")),o.R7$(),o.vxM(l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginFacebookCookieConsentHint")?3:-1)}}function UV(v,p){if(1&v){const l=o.RV6();o.j41(0,"div")(1,"h2",17),o.EFF(2),o.k0s(),o.j41(3,"p"),o.EFF(4),o.k0s(),o.j41(5,"p"),o.EFF(6),o.k0s(),o.j41(7,"dx-button",19),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.onRegisterButtonClicked())}),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_register")),o.R7$(2),o.JRh(l.scope.currentScope.network.resources.web_register_description_0),o.R7$(2),o.JRh(l.scope.currentScope.network.resources.web_register_description_1),o.R7$(),o.Y8G("text",l.scope.currentScope.network.getResourceOrKeyName("web_common_register"))}}function zV(v,p){if(1&v&&(o.j41(0,"div")(1,"h2",17),o.EFF(2),o.k0s(),o.j41(3,"p")(4,"span",20),o.EFF(5),o.k0s(),o.j41(6,"a",21),o.nrm(7,"img",22),o.k0s(),o.j41(8,"a",21),o.nrm(9,"img",23),o.k0s()()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_login_downloadApp")),o.R7$(3),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_login_downloadAppDescription")," "),o.R7$(),o.FS9("href",l.scope.currentScope.network.settings.appLinkITunes,o.B4B),o.R7$(),o.Mz_("src","https://az779770.vo.msecnd.net/endpoint/images/",l.scope.currentScope.network.settings.languagePack,"/app-store-badge.png",o.B4B),o.R7$(),o.FS9("href",l.scope.currentScope.network.settings.appLinkAndroid,o.B4B),o.R7$(),o.Mz_("src","https://az779770.vo.msecnd.net/endpoint/images/",l.scope.currentScope.network.settings.languagePack,"/google-play-badge.png",o.B4B)}}function Pd(v,p){if(1&v&&(o.j41(0,"h2",17),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginSSOTitle"))}}function Zy(v,p){if(1&v&&(o.j41(0,"p"),o.EFF(1),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginSSODescription"))}}function lT(v,p){if(1&v){const l=o.RV6();o.j41(0,"dx-button",25),o.bIt("onClick",function(){const F=o.eBV(l).$implicit,se=o.XpG(2);return o.Njj(se.saml2Login(F))}),o.k0s()}if(2&v){const l=p.$implicit,O=o.XpG(2);o.Y8G("text",O.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginFacebook"+l))}}function cT(v,p){if(1&v&&(o.j41(0,"div"),o.DNE(1,Pd,2,1,"h2",17)(2,Zy,2,1,"p"),o.Z7z(3,lT,1,1,"dx-button",24,o.fX1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.vxM(l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginSSOTitle")?1:-1),o.R7$(),o.vxM(l.scope.currentScope.network.getResourceOrKeyName("web_authentication_loginSSODescription")?2:-1),o.R7$(),o.Dyx(l.saml2ModulePaths)}}function wL(v,p){if(1&v&&(o.j41(0,"div")(1,"div"),o.EFF(2,"{{scope.currentScope.network.getResourceOrKeyName('web_login_helpDescription')\"}}"),o.k0s()(),o.j41(3,"a",21),o.EFF(4),o.k0s()),2&v){const l=o.XpG(2);o.R7$(3),o.Mz_("href","mailto:",l.scope.currentScope.network.getResourceOrKeyName("web_login_helpEMail"),"",o.B4B),o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_login_helpEMail"))}}function jP(v,p){if(1&v&&(o.j41(0,"div")(1,"h2",17),o.EFF(2),o.k0s(),o.j41(3,"p"),o.DNE(4,wL,5,3),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_login_help")),o.R7$(2),o.vxM(l.scope.currentScope.network.getResourceOrKeyName("web_login_helpDescription")?4:-1)}}let KP=(()=>{class v{constructor(l,O,F,se,we,We){this.hybridTrackingService=F,this.authService=se,this.popupService=we,this.cordovaService=We,this.signInData={userName:"",password:""},this.saml2ModulePaths=[],this.passwordEditorOptions={mode:"password",valueChangeEvent:"keyup",onValueChanged:()=>{let gt=this.form.instance.getEditor("ConfirmPassword");gt&&gt.option("value")&&aE.A.getInstance(gt.element()).validate()},buttons:[{name:"password",location:"after",options:{stylingMode:"text",icon:"fa-solid fa-eye",onClick:()=>this.changePasswordMode("Password")}}]},this.loginButtonOptions={},this.onLoginButtonClicked=()=>{this.authService.login(this.signInData).then(()=>{var gt=new URLSearchParams(window.location.search).get("closedToken");gt&&this.scope.currentChapter.closed?this.hybridTrackingService.switchState("app.closedChapter",{action:"Get",token:gt}):this.hybridTrackingService.switchState("app.main-news",{})})},this.onRegisterButtonClicked=()=>{this.hybridTrackingService.switchState("app.register",{closedToken:new URLSearchParams(window.location.search).get("closedToken")})},this.facebookLogin=()=>{this.authService.facebookLogin(this.deviceInfoService.getUserAgentInfo().isApp).then(gt=>{gt.token?this.popupService.openPopup({title:"Login",component:Mn,width:"auto",height:"auto",onClose:()=>{},data:{templateUrl:"/ClientApp/src/legacy-app/authentication/authenticationDialog.html",controllerName:"AuthenticationDialog",bindings:{authenticationCallback:this.cb,facebookSignUpData:gt,login:!1}}}):(window.location.pathname="/",window.location.search="")})},this.saml2Login=gt=>{if(this.saml2ModulePaths.indexOf(gt)>=0){var Ft="/authentication/saml2?authenticationType="+gt+"&referrerUri="+encodeURIComponent(window.location.origin+this.scope.currentScope.appRoute+"login/saml2");if(this.deviceInfoService.getUserAgentInfo().isApp&&this.cordovaService.isCordovaAvailable()){var pn="location=no,toolbarposition=top,toolbartranslucent=no,hidenavigationbuttons=yes";"android"===this.cordovaService.cordova.platformId&&(pn="location=yes,hideurlbar=yes,zoom=no,hidenavigationbuttons=yes,closebuttoncaption="+this.scope.currentScope.network.getResourceOrKeyName("web_appCordova_closebuttoncaption"));var fi=this.cordovaService.cordova.InAppBrowser.open(Ft,"_blank",pn);fi.addEventListener("loadstart",_o=>{_o.url.endsWith("login/saml2")&&(fi.close(),this.hybridTrackingService.switchState("app.loginSaml2",null))})}else window.location.href=Ft}},this.cb=()=>{this.hybridTrackingService.switchState("app.main-news",null),document.location.reload()},this.changePasswordMode=gt=>{let Ft=this.form.instance.getEditor(gt);Ft?.option("mode","text"===Ft.option("mode")?"password":"text")},this.scope=l.getScope(),this.deviceInfoService=O}ngOnInit(){if(this.loginButtonOptions={text:this.scope.currentScope.network.getResourceOrKeyName("web_common_login"),useSubmitBehavior:!0,onClick:this.onLoginButtonClicked},this.saml2ModulePaths=this.scope.network.settings.saml2ModulePath?.split(","),this.saml2ModulePaths?.length>0){const l=this.saml2ModulePaths.map(O=>O.trim());this.saml2ModulePaths=l}}validateInput(l){let O=this.form.instance.getEditor(l);return O?aE.A.getInstance(O.element()).validate().isValid:void 0}login(){this.validateInput("userName")&&this.validateInput("password")&&this.onLoginButtonClicked()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E),o.rXU(Rs.o),o.rXU(so.u),o.rXU(Qi.O),o.rXU(He.q))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-login"]],viewQuery:function(O,F){if(1&O&&o.GBs(xo.o,5),2&O){let se;o.mGM(se=o.lsd())&&(F.form=se.first)}},decls:23,vars:18,consts:[["id","form-container",1,"login-component-base",3,"keyup.enter"],["id","form","labelMode","floating",3,"formDataChange","formData"],["template","loginHeader"],["dataField","userName","editorType","dxTextBox"],["name","Password","dataField","password",3,"editorOptions"],[3,"text"],["id","signUpError","type","required","message","Password is required"],[1,"pull-right",3,"href"],["itemType","button",3,"buttonOptions"],["template","facebookLogin"],["template","registerArea"],["template","appDownloadArea"],["template","samlArea"],["template","loginHelp"],[4,"dxTemplate","dxTemplateOf"],[1,"login-label",3,"text"],["id","signUpError","type","required",3,"message"],[1,"instruction"],["icon","fa fa-facebook","analytics-on","","analytics-event","ClickFacebook","analytics-category","Conversion",1,"btn-facebook",3,"onClick","text"],[3,"onClick","text"],[1,"root-login-downloadDescription"],[3,"href"],["alt","App Store",1,"root-login-downloadImage",3,"src"],["alt","Google Play",1,"root-login-downloadImage",3,"src"],[1,"btn-saml2",3,"text"],[1,"btn-saml2",3,"onClick","text"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.bIt("keyup.enter",function(){return F.login()}),o.j41(1,"dx-form",1),o.mxI("formDataChange",function(we){return o.DH7(F.signInData,we)||(F.signInData=we),we}),o.nrm(2,"dxi-item",2),o.DNE(3,WP,3,2,"dxi-item",3)(4,Xy,3,2,"dxi-item",3),o.j41(5,"dxi-item",4),o.nrm(6,"dxo-label",5)(7,"dxi-validation-rule",6),o.k0s(),o.j41(8,"dxi-item")(9,"a",7),o.EFF(10),o.k0s()(),o.nrm(11,"dxi-item",8),o.DNE(12,EL,1,0,"dxi-item",9),o.nrm(13,"dxi-item",10),o.DNE(14,sT,1,0,"dxi-item",11)(15,Yy,1,0,"dxi-item",12)(16,yv,1,0,"dxi-item",13)(17,$P,6,3,"div",14)(18,aT,4,2,"div",14)(19,UV,8,4,"div",14)(20,zV,10,8,"div",14)(21,cT,5,2,"div",14)(22,jP,5,2,"div",14),o.k0s()()),2&O&&(o.R7$(),o.R50("formData",F.signInData),o.R7$(2),o.vxM(F.scope.currentScope.network.settings.enableUserName?3:4),o.R7$(2),o.Y8G("editorOptions",F.passwordEditorOptions),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_user_password")),o.R7$(3),o.Mz_("href","",F.scope.currentScope.chapter.path,"/account/request-password",o.B4B),o.R7$(),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_authentication_passwordForgot")),o.R7$(),o.Y8G("buttonOptions",F.loginButtonOptions),o.R7$(),o.vxM(F.scope.currentScope.chapter.demo?-1:12),o.R7$(2),o.vxM(!F.deviceInfoService.getUserAgentInfo().isApp&&F.scope.currentScope.network.getResourceOrKeyName("web_login_downloadApp")&&F.scope.currentScope.network.settings.featureApp?14:-1),o.R7$(),o.vxM(F.scope.currentScope.network.settings.saml2ModulePath?15:-1),o.R7$(),o.vxM(F.scope.currentScope.network.getResourceOrKeyName("web_login_help")&&""!=F.scope.currentScope.network.getResourceOrKeyName("web_login_help")?16:-1),o.R7$(),o.Y8G("dxTemplateOf","loginHeader"),o.R7$(),o.Y8G("dxTemplateOf","facebookLogin"),o.R7$(),o.Y8G("dxTemplateOf","registerArea"),o.R7$(),o.Y8G("dxTemplateOf","appDownloadArea"),o.R7$(),o.Y8G("dxTemplateOf","samlArea"),o.R7$(),o.Y8G("dxTemplateOf","loginHelp"))},dependencies:[mn.CVf,Rt.eC,mn.rkl,Hi.e,mn.Inh,xo.o],styles:[".login-component-base[_ngcontent-%COMP%]{width:50%}@media (max-width: 768px){.login-component-base[_ngcontent-%COMP%]{width:100%}}"]})}}return v})();function dE(v,p){if(1&v&&(o.qex(0),o.j41(1,"a",1)(2,"div",2)(3,"div",3),o.nrm(4,"img",4),o.k0s(),o.j41(5,"div",5)(6,"div",6),o.EFF(7),o.k0s(),o.j41(8,"div",7),o.EFF(9),o.k0s()()()(),o.bVm()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.referralLink,o.B4B)("target",l.linkTarget),o.R7$(3),o.Y8G("lazy-img",l.imagePath),o.R7$(3),o.SpI(" ",l.article.text," "),o.R7$(2),o.SpI(" ",l.article.teaser," ")}}function dT(v,p){if(1&v&&(o.qex(0),o.j41(1,"a",1)(2,"div",8)(3,"div",9)(4,"div",10),o.EFF(5),o.k0s()(),o.j41(6,"div",11)(7,"div",6),o.EFF(8),o.k0s(),o.j41(9,"div",7),o.EFF(10),o.k0s()()()(),o.bVm()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.referralLink,o.B4B)("target",l.linkTarget),o.R7$(4),o.SpI(" ",l.firstLetter," "),o.R7$(3),o.SpI(" ",l.formatedArticleText," "),o.R7$(2),o.SpI(" ",l.article.teaser," ")}}let XP=(()=>{class v{constructor(l){this.scopeService=l,this.imagePath="",this.formatedArticleText="",this.firstLetter="",this.referralLink="",this.linkTarget="",this.scope=this.scopeService.getScope()}ngOnInit(){null!=this.article.coverAssetGuid&&"00000000-0000-0000-0000-000000000000"!=this.article.coverAssetGuid?this.imagePath=this.scope.globalSettings.blobStorageCdnUrl+"/images/"+this.article.coverAssetGuid:(this.firstLetter=this.article.text.charAt(0),this.formatedArticleText=this.article.text.substring(1).trim()),this.article.articleExternalLink?(this.referralLink=this.article.articleExternalLink,this.linkTarget="_blank"):this.referralLink=this.scope.currentChapter.path+this.article.path}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-public-profile-article-list-displayable"]],inputs:{article:"article"},decls:3,vars:1,consts:[[1,"public-profile-article-list-displayable-base"],[3,"href","target"],[1,"d-flex","gap-2"],[1,"public-profile-article-list-displayable-image"],[3,"lazy-img"],[1,"public-profile-article-list-displayable-text-container"],[1,"public-profile-article-list-displayable-text"],[1,"public-profile-article-list-displayable-teaser"],[1,"d-flex","gap-2","public-profile-article-list-displayabl-fallback"],[1,"public-profile-article-list-displayable-initial-letter-container"],[1,"public-profile-article-list-displayable-initial-letter"],[1,"public-profile-article-list-displayable-text-container","pt-2"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,dE,10,5,"ng-container")(2,dT,11,5,"ng-container"),o.k0s()),2&O&&(o.R7$(),o.vxM(F.imagePath?1:2))},dependencies:[Dr.L],styles:[".public-profile-article-list-displayable-base[_ngcontent-%COMP%]{padding-bottom:12px;padding-top:12px}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none;font-family:var(--fontPrimary);color:var(--textColor)}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;height:95px;object-fit:cover}@media (max-width: 768px){.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:60px}}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text-container[_ngcontent-%COMP%]{height:95px;box-sizing:border-box;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}@media (max-width: 768px){.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text-container[_ngcontent-%COMP%]{height:60px;-webkit-line-clamp:2}}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text-container[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text[_ngcontent-%COMP%], .public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text-container[_ngcontent-%COMP%]   .public-profile-article-list-displayable-teaser[_ngcontent-%COMP%]{margin:0;text-overflow:ellipsis;text-decoration:none}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700}@media (max-width: 768px){.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-text[_ngcontent-%COMP%]{font-size:1rem}}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-teaser[_ngcontent-%COMP%]{font-size:1rem;font-family:var(--fontPrimary)}@media (max-width: 768px){.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-teaser[_ngcontent-%COMP%]{font-size:.8rem}}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-initial-letter-container[_ngcontent-%COMP%]{height:95px;display:flex;align-items:center;width:80px;justify-content:center}@media (max-width: 768px){.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-initial-letter-container[_ngcontent-%COMP%]{height:60px;width:45px;-webkit-line-clamp:2}}.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-initial-letter-container[_ngcontent-%COMP%]   .public-profile-article-list-displayable-initial-letter[_ngcontent-%COMP%]{font-size:95px;font-family:var(--fontPrimary)}@media (max-width: 768px){.public-profile-article-list-displayable-base[_ngcontent-%COMP%]   .public-profile-article-list-displayable-initial-letter-container[_ngcontent-%COMP%]   .public-profile-article-list-displayable-initial-letter[_ngcontent-%COMP%]{font-size:60px}}"]})}}return v})();function TL(v,p){if(1&v&&(o.j41(0,"div",4),o.nrm(1,"app-public-profile-article-list-displayable",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("article",l)}}function DL(v,p){if(1&v){const l=o.RV6();o.j41(0,"button",6),o.bIt("click",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.loadMoreArticles())}),o.nrm(1,"i",7),o.EFF(2),o.k0s()}if(2&v){const l=o.XpG(2);o.R7$(2),o.ZXR(" ",l.scope.network.getResourceOrKeyName("web_profileAuthor_showMore_0")," ",l.articleIncrement," ",l.scope.network.getResourceOrKeyName("web_profileAuthor_showMore_1")," (",l.articleLimit," ",l.scope.network.getResourceOrKeyName("web_profileAuthor_showMore_2")," ",l.articles.length,") ")}}function AL(v,p){if(1&v&&(o.j41(0,"div")(1,"h4"),o.nrm(2,"i",1),o.EFF(3),o.k0s(),o.DNE(4,TL,2,1,"div",2),o.nI1(5,"slice"),o.k0s(),o.DNE(6,DL,3,6,"button",3)),2&v){const l=o.XpG();o.R7$(3),o.LHq(" ",l.articles.length," ",l.scope.network.getResourceOrKeyName("web_profileAuthor_articleFrom")," ",l.targetUserProfile.firstName," ",l.targetUserProfile.lastName," "),o.R7$(),o.Y8G("ngForOf",o.brH(5,6,l.articles,0,l.articleLimit)),o.R7$(2),o.Y8G("ngIf",l.articles.length>l.articleLimit)}}let YP=(()=>{class v{constructor(l){this.scopeService=l,this.articleLimit=8,this.articleIncrement=12,this.loadMoreArticles=()=>{this.articleLimit+=this.articleIncrement},this.scope=this.scopeService.getScope()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-article-list"]],inputs:{articles:"articles",targetUserProfile:"targetUserProfile"},decls:2,vars:1,consts:[[1,"public-profile-article-list-base"],[1,"fa-regular","fa-newspaper"],["class","",4,"ngFor","ngForOf"],["class","btn btn-gray nopadding",3,"click",4,"ngIf"],[1,""],[3,"article"],[1,"btn","btn-gray","nopadding",3,"click"],[1,"icon-caret-down"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,AL,7,10),o.k0s()),2&O&&(o.R7$(),o.vxM(F.targetUserProfile.isJournalist&&F.articles.length>0?1:-1))},dependencies:[a.Sq,a.bT,XP,a.P9],styles:[".public-profile-article-list-base[_ngcontent-%COMP%]{width:70%;padding-bottom:4rem}@media (max-width: 768px){.public-profile-article-list-base[_ngcontent-%COMP%]{width:100%;padding:2rem;margin-bottom:5rem}}"]})}}return v})();function ZP(v,p){if(1&v&&(o.j41(0,"div",3),o.EFF(1),o.nI1(2,"date"),o.k0s()),2&v){const l=o.XpG().$implicit;o.R7$(),o.SpI("",o.i5U(2,1,l.data,"dd.MM.yyyy")," ")}}function QP(v,p){if(1&v&&(o.j41(0,"div",3),o.EFF(1),o.k0s()),2&v){const l=o.XpG().$implicit;o.R7$(),o.JRh(l.data)}}function JP(v,p){if(1&v&&(o.j41(0,"div",1)(1,"div",2),o.EFF(2),o.k0s(),o.DNE(3,ZP,3,4,"div",3)(4,QP,2,1,"div",3),o.k0s()),2&v){const l=p.$implicit;o.R7$(2),o.SpI("",l.label,":"),o.R7$(),o.vxM(2==l.type?3:4)}}function uT(v,p){if(1&v&&(o.j41(0,"div",0),o.Z7z(1,JP,5,2,"div",1,o.fX1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.Dyx(l.staffDirectoryData)}}let IL=(()=>{class v{constructor(l){this.profileService=l,this.staffDirectoryData=[],this.convertDate=O=>{const F=new Date(O),se=60*F.getTimezoneOffset()*1e3,we=F.getTime()-se;return new Date(we)}}ngOnInit(){this.profileService.getStaffDirectoryPublic(this.targetUserProfile.guid).then(l=>{this.staffDirectoryData=this.mapStaffDirectoryData(l)})}mapStaffDirectoryData(l){return Object.keys(l.metaData).map(O=>{const F=l.metaData[O].metaDataSource;let se=l.data[O]||"";return 2===F.dataType&&se&&(se=this.convertDate(se)),"options"==F.uiType&&(se=F.templateResourceValues.find(we=>we.id==se).value),{label:F.displayLabel,data:se,type:F.dataType}})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Co.p))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-staff-directory"]],inputs:{targetUserProfile:"targetUserProfile"},decls:1,vars:1,consts:[[1,"public-profile-staff-directory-base"],[1,"public-profile-staff-directory-item"],[1,"public-profile-staff-directory-item-label"],[1,"public-profile-staff-directory-item-data"]],template:function(O,F){1&O&&o.DNE(0,uT,3,0,"div",0),2&O&&o.vxM(F.staffDirectoryData.length>0?0:-1)},dependencies:[a.vh],styles:[".public-profile-staff-directory-base[_ngcontent-%COMP%]{color:var(--textColor);font-family:var(--fontPrimary);font-size:1.2rem}@media (max-width: 768px){.public-profile-staff-directory-base[_ngcontent-%COMP%]{padding:2rem}}.public-profile-staff-directory-base[_ngcontent-%COMP%]   .public-profile-staff-directory-item[_ngcontent-%COMP%]{display:flex;margin-bottom:5px}.public-profile-staff-directory-base[_ngcontent-%COMP%]   .public-profile-staff-directory-item[_ngcontent-%COMP%]   .public-profile-staff-directory-item-label[_ngcontent-%COMP%]{color:var(--textColor60);margin-right:5px}.public-profile-staff-directory-base[_ngcontent-%COMP%]   .public-profile-staff-directory-item[_ngcontent-%COMP%]   .public-profile-staff-directory-item-data[_ngcontent-%COMP%]{color:var(--textColor)}"]})}}return v})();var hT=M(6016);function qP(v,p){if(1&v&&o.nrm(0,"app-staff-directory",2),2&v){const l=o.XpG(2);o.Y8G("targetUserProfile",l.targetUserProfile)}}function pT(v,p){if(1&v&&o.nrm(0,"app-article-list",3),2&v){const l=o.XpG(2);o.Y8G("articles",l.articles)("targetUserProfile",l.targetUserProfile)}}function eM(v,p){if(1&v&&(o.j41(0,"div",0)(1,"div",1),o.nrm(2,"app-user-info",2),o.DNE(3,qP,1,1,"app-staff-directory",2)(4,pT,1,2,"app-article-list",3),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("targetUserProfile",l.targetUserProfile),o.R7$(),o.vxM(l.staffDirectoryEnabled?3:-1),o.R7$(),o.vxM(l.targetUserProfile.isJournalist&&l.articles.length>0?4:-1)}}let bv=(()=>{class v{constructor(l,O,F){this.profileService=l,this.articleService=O,this.scopeService=F,this.guid="",this.articles=[],this.staffDirectoryEnabled=!1,this.scope=this.scopeService.getScope(),this.staffDirectoryEnabled=this.scope.network.settings.isStaffDirectoryEnabled}ngAfterViewInit(){}ngOnInit(){this.guid&&this.loadProfile(this.guid)}loadProfile(l){this.profileService.getPublicProfile(l).then(O=>{this.targetUserProfile=O,this.targetUserProfile.isJournalist&&this.articleService.getArticlesByAuthor(l).then(F=>{this.articles=F})}).catch(O=>{console.error("Error by fetching profile",O)})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Co.p),o.rXU(ts),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-public-profile"]],inputs:{guid:"guid"},decls:1,vars:1,consts:[[1,"public-profile-base"],[1,"public-profile-content"],[3,"targetUserProfile"],[3,"articles","targetUserProfile"]],template:function(O,F){1&O&&o.DNE(0,eM,5,3,"div",0),2&O&&o.vxM(F.targetUserProfile?0:-1)},dependencies:[YP,IL,hT.v],styles:[".public-profile-base[_ngcontent-%COMP%]{display:flex;justify-content:center}.public-profile-base[_ngcontent-%COMP%]   .public-profile-content[_ngcontent-%COMP%]{width:var(--designContentWidth)}"]})}}return v})();var GV=M(1654);let Jm=(()=>{class v{constructor(l,O,F){this.authorService=l,this.eventCalenderService=O,this.scopeService=F,this.publishedArticlesSubject=new jn.t([]),this.publishedEventsSubject=new jn.t([]),this.applicationsSubject=new jn.t([]),this.originalPublishedArticles=[],this.originalPublishedEvents=[],this.originalApplications=[],this.isInitialized=!1,this.currentFilter="all",this.publishedArticles$=this.publishedArticlesSubject.asObservable(),this.publishedEvents$=this.publishedEventsSubject.asObservable(),this.applications$=this.applicationsSubject.asObservable(),this.publishedList$=(0,GV.zV)([this.publishedArticles$,this.publishedEvents$]).pipe((0,Mi.T)(([se,we])=>this.combineAndSortLists(se,we))),this.scope=this.scopeService.getScope()}initData(){this.isInitialized||(this.isInitialized=!0,this.applicationsSubject.next([]),this.authorService.getMyArticles().then(l=>{const O=l.applications.map(F=>({...F,type:"article"}));this.originalApplications=[...this.originalApplications,...O],this.applicationsSubject.next(this.originalApplications),this.originalPublishedArticles=l.publishedArticles.map(F=>({...F,type:"article"})),this.publishedArticlesSubject.next(this.originalPublishedArticles)}),!1!==this.scope.currentScope.network.settings.configurations.enableCalendar&&this.scope.currentScope.chapter.settings.configurations.enableEventCalendar&&this.eventCalenderService.getEventsForAuthorDashboard().then(l=>{const O=l.map(we=>({...we,type:"event"})),F=O.filter(we=>null!=we.published);this.originalPublishedEvents=F,this.publishedEventsSubject.next(this.originalPublishedEvents);const se=O.filter(we=>null==we.published).map(we=>({...we,accepted:we.created,assigned:we.created}));this.originalApplications=[...this.originalApplications,...se],this.applicationsSubject.next(this.originalApplications)}))}setFilter(l){this.currentFilter=l,this.applyFilter()}applyFilter(){const l=this.filterList(this.originalPublishedArticles,this.currentFilter),O=this.filterList(this.originalPublishedEvents,this.currentFilter),F=this.filterList(this.originalApplications,this.currentFilter);this.publishedArticlesSubject.next(l),this.publishedEventsSubject.next(O),this.applicationsSubject.next(F)}filterList(l,O){return"all"===O?l:l.filter(F=>F.type===O)}setPublishedArticles(l){const O=l.map(F=>({...F,type:"article"}));this.originalPublishedArticles=O,this.applyFilter()}setPublishedEvents(l){this.originalPublishedEvents=l,this.applyFilter()}deleteArticleById(l){this.originalPublishedArticles=this.originalPublishedArticles.filter(O=>O.id!==l),this.applyFilter()}deleteEventById(l){this.originalPublishedEvents=this.originalPublishedEvents.filter(O=>O.id!==l),this.applyFilter()}updateApplication(l){this.originalApplications=this.originalApplications.map(O=>O.id===l.id?l:O),this.applyFilter()}combineAndSortLists(l,O){return[...l,...O].sort((se,we)=>{const We=new Date(se.published).getTime();return new Date(we.published).getTime()-We})}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(nu),o.KVO(AC),o.KVO(b.A))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})(),PL=(()=>{class v{constructor(l,O,F){this.scopeService=l,this.articleService=O,this.authorDataService=F,this.visible=!1,this.articleId="",this.visibleChange=new o.bkB,this.onDelete=()=>{this.articleId&&this.articleService.deleteArticle(this.articleId).then(()=>{this.authorDataService.deleteArticleById(this.articleId),this.visible=!1,this.visibleChange.emit(this.visible)})},this.scope=this.scopeService.getScope()}closePopup(){this.visible=!1,this.visibleChange.emit(this.visible)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(ts),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-article-delete-dialog"]],inputs:{visible:"visible",articleId:"articleId"},outputs:{visibleChange:"visibleChange"},decls:5,vars:9,consts:[[3,"visibleChange","onHiding","visible","showCloseButton","showTitle","title","width","height"],[3,"onClick","text"]],template:function(O,F){1&O&&(o.j41(0,"dx-popup",0),o.mxI("visibleChange",function(we){return o.DH7(F.visible,we)||(F.visible=we),we}),o.bIt("onHiding",function(){return F.closePopup()}),o.j41(1,"p"),o.EFF(2),o.k0s(),o.j41(3,"dx-button",1),o.bIt("onClick",function(){return F.onDelete()}),o.k0s(),o.j41(4,"dx-button",1),o.bIt("onClick",function(){return F.closePopup()}),o.k0s()()),2&O&&(o.R50("visible",F.visible),o.Y8G("showCloseButton",!0)("showTitle",!0)("title",F.scope.currentScope.network.getResourceOrKeyName("web_articleDialog_deleteTitle"))("width",400)("height","auto"),o.R7$(2),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_articleDialog_deleteDescription")),o.R7$(),o.Y8G("text",F.scope.currentScope.network.getResourceOrKeyName("web_common_delete")),o.R7$(),o.Y8G("text",F.scope.currentScope.network.getResourceOrKeyName("web_common_cancel")))},dependencies:[Hi.e,pi.i]})}}return v})(),yz=(()=>{class v{constructor(l,O,F){this.scopeService=l,this.eventService=O,this.authorDataService=F,this.visible=!1,this.eventId="",this.visibleChange=new o.bkB,this.onDelete=()=>{this.eventId&&this.eventService.deleteEvent(this.eventId).then(()=>{this.authorDataService.deleteEventById(this.eventId),this.visible=!1,this.visibleChange.emit(this.visible)})},this.scope=this.scopeService.getScope()}closePopup(){this.visible=!1,this.visibleChange.emit(this.visible)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(AC),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-event-delete-dialog"]],inputs:{visible:"visible",eventId:"eventId"},outputs:{visibleChange:"visibleChange"},decls:5,vars:9,consts:[[3,"visibleChange","onHiding","visible","showCloseButton","showTitle","title","width","height"],[3,"onClick","text"]],template:function(O,F){1&O&&(o.j41(0,"dx-popup",0),o.mxI("visibleChange",function(we){return o.DH7(F.visible,we)||(F.visible=we),we}),o.bIt("onHiding",function(){return F.closePopup()}),o.j41(1,"p"),o.EFF(2),o.k0s(),o.j41(3,"dx-button",1),o.bIt("onClick",function(){return F.onDelete()}),o.k0s(),o.j41(4,"dx-button",1),o.bIt("onClick",function(){return F.closePopup()}),o.k0s()()),2&O&&(o.R50("visible",F.visible),o.Y8G("showCloseButton",!0)("showTitle",!0)("title",F.scope.currentScope.network.getResourceOrKeyName("web_authorDashboard_deleteEventDescription"))("width",400)("height","auto"),o.R7$(2),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_articleDialog_deleteDescription")),o.R7$(),o.Y8G("text",F.scope.currentScope.network.getResourceOrKeyName("web_common_delete")),o.R7$(),o.Y8G("text",F.scope.currentScope.network.getResourceOrKeyName("web_common_cancel")))},dependencies:[Hi.e,pi.i]})}}return v})();const ML=()=>({width:150});function gT(v,p){1&v&&o.nrm(0,"i",3)}function LC(v,p){1&v&&o.nrm(0,"i",4)}function Hd(v,p){1&v&&o.nrm(0,"i",5)}let fp=(()=>{class v{constructor(l,O,F){this.scopeService=l,this.authorService=O,this.auhtorDataService=F,this.showArticleDeleteDialog=!1,this.showEventDeleteDialog=!1,this.pendingShowNoApplyButton=!1,this.showApplyButtons=!1,this.snipIcon=!1,this.dropDownButtonVisible=!0,this.dropDownButtonMenuItemClick=se=>{switch(se){case"edit":"article"==this.data.type?window.location.href=this.scope.currentScope.chapter.path+this.data.path+"/edit":"event"==this.data.type&&(window.location.href=this.scope.currentScope.chapter.path+"/events/"+this.data.id+"/edit");break;case"delete":"article"==this.data.type?this.showArticleDeleteDialog=!0:"event"==this.data.type&&(this.showEventDeleteDialog=!0);break;case"statistics":window.location.href=this.scope.currentScope.chapter.path+this.data.path+"/report"}},this.reject=()=>{this.authorService.rejectSnip(this.data).then(se=>{se.type=this.data.type,this.auhtorDataService.updateApplication(se)})},this.allocate=()=>{this.authorService.allocateSnip(this.data).then(se=>{se.type=this.data.type,this.auhtorDataService.updateApplication(se)})},this.noApply=()=>{this.authorService.noApplySnip(this.data).then(se=>{se.type=this.data.type,this.auhtorDataService.updateApplication(se)})},this.scope=this.scopeService.getScope(),this.dropDownButtonOptions=[{icon:"fa-solid fa-pencil",text:this.scope.currentScope.network.resources.web_author_dashboard_edit,iconType:"edit"},{icon:"fa-solid fa-trash-can",text:this.scope.currentScope.network.resources.web_common_delete,iconType:"delete"}]}ngOnInit(){null!=this.data.published&&"article"==this.data.type&&this.dropDownButtonOptions.push({icon:"fa-solid fa-chart-line",text:this.scope.currentScope.network.getResourceOrKeyName("web_report_statistics"),iconType:"statistics"}),this.showApplyButtons=!!this.data.assigned&&!this.data.accepted&&!this.data.userCanceled,this.pendingShowNoApplyButton=!(this.data.assigned||this.data.accepted||this.data.userCanceled||this.data.published),this.dropDownButtonVisible=!this.showApplyButtons&&!this.pendingShowNoApplyButton}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(nu),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-author-dashboard-lists-item"]],inputs:{data:"data"},decls:20,vars:21,consts:[[1,"author-dashboard-lists-item-base"],[1,"d-flex"],[1,"author-dashboard-lists-item-icon"],[1,"fa-regular","fa-file-lines"],[1,"fa-solid","fa-calendar-days"],[1,"icon-snippet-start","size-60","green"],[1,"author-dashboard-lists-item-data"],[1,"author-dashboard-lists-item-text"],[1,"author-dashboard-lists-item-date"],[1,"author-dashboard-lists-item-button-container"],["text","","icon","overflow","stylingMode","text","type","normal",1,"author-dashboard-lists-item-button",3,"onItemClick","dropDownOptions","items","showArrowIcon","visible"],[1,"author-dashboard-lists-item-apply-button-container"],[3,"onClick","text","visible"],["text","scope.network.getResourceOrKeyName('web_common_decline')",3,"onClick","visible"],[3,"visibleChange","visible","articleId"],[3,"visibleChange","visible","eventId"]],template:function(O,F){if(1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2),o.DNE(3,gT,1,0,"i",3)(4,LC,1,0,"i",4)(5,Hd,1,0,"i",5),o.k0s(),o.j41(6,"div",6)(7,"div",7),o.EFF(8),o.k0s(),o.j41(9,"div",8),o.EFF(10),o.nI1(11,"date"),o.k0s()(),o.j41(12,"div",9)(13,"dx-drop-down-button",10),o.bIt("onItemClick",function(we){return F.dropDownButtonMenuItemClick(we.itemData.iconType)}),o.k0s(),o.j41(14,"div",11)(15,"dx-button",12),o.bIt("onClick",function(){return F.allocate()}),o.k0s(),o.j41(16,"dx-button",12),o.bIt("onClick",function(){return F.reject()}),o.k0s(),o.j41(17,"dx-button",13),o.bIt("onClick",function(){return F.noApply()}),o.k0s()()()()(),o.j41(18,"app-article-delete-dialog",14),o.mxI("visibleChange",function(we){return o.DH7(F.showArticleDeleteDialog,we)||(F.showArticleDeleteDialog=we),we}),o.k0s(),o.j41(19,"app-event-delete-dialog",15),o.mxI("visibleChange",function(we){return o.DH7(F.showEventDeleteDialog,we)||(F.showEventDeleteDialog=we),we}),o.k0s()),2&O){let se,we;o.R7$(3),o.vxM(F.showApplyButtons||"article"!=F.data.type?F.showApplyButtons||"event"!=F.data.type?"article"==F.data.type&&(F.showApplyButtons||F.pendingShowNoApplyButton)?5:-1:4:3),o.R7$(5),o.SpI(" ",null!==(se=F.data.text)&&void 0!==se?se:F.scope.network.getResourceOrKeyName("web_author_dashboard_no_title")," "),o.R7$(2),o.Lme(" ",F.scope.network.getResourceOrKeyName("web_author_dashborad_item_date")," ",o.i5U(11,17,null!==(we=F.data.published)&&void 0!==we?we:F.data.created,"dd.MM.yyyy HH:mm")," "),o.R7$(3),o.Y8G("dropDownOptions",o.lJ4(20,ML))("items",F.dropDownButtonOptions)("showArrowIcon",!1)("visible",F.dropDownButtonVisible),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_common_accept"))("visible",F.showApplyButtons),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_common_decline"))("visible",F.showApplyButtons),o.R7$(),o.Y8G("visible",F.pendingShowNoApplyButton),o.R7$(),o.R50("visible",F.showArticleDeleteDialog),o.Y8G("articleId",F.data.id),o.R7$(),o.R50("visible",F.showEventDeleteDialog),o.Y8G("eventId",F.data.id)}},dependencies:[Hi.e,Kt.h,PL,yz,a.vh],styles:[".author-dashboard-lists-item-base[_ngcontent-%COMP%]{margin-left:2rem;margin-bottom:.5rem}@media (max-width: 768px){.author-dashboard-lists-item-base[_ngcontent-%COMP%]{margin-left:.5rem}}.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-icon[_ngcontent-%COMP%]{width:60px;height:60px;aspect-ratio:1/1;background-color:#bbbbbbb3;display:flex;justify-content:center;align-items:center;border-radius:50%;margin-right:1rem}.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:2rem;color:#fff}.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-button[_ngcontent-%COMP%]     i{font-size:2rem!important;color:var(--textColor)}@media (max-width: 768px){.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-button[_ngcontent-%COMP%]     i{font-size:1.7rem!important}}.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-text[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;font-family:var(--fontPrimary)}@media (max-width: 768px){.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-text[_ngcontent-%COMP%]{font-size:1rem}}.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-button-container[_ngcontent-%COMP%]{margin-left:auto}.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-button-container[_ngcontent-%COMP%]   .author-dashboard-lists-item-apply-button-container[_ngcontent-%COMP%]{display:flex;gap:1.5rem}@media (max-width: 768px){.author-dashboard-lists-item-base[_ngcontent-%COMP%]   .author-dashboard-lists-item-button-container[_ngcontent-%COMP%]   .author-dashboard-lists-item-apply-button-container[_ngcontent-%COMP%]{gap:.7rem;flex-direction:column}}"]})}}return v})();function tM(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-author-dashboard-lists-item",9),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}let qm=(()=>{class v{constructor(l,O){this.scopeService=l,this.authorDataService=O,this.displayedListLimit=20,this.displayedListIncrement=10,this.filteredData=[],this.publishedListLength=0,this.fullData=[],this.scope=this.scopeService.getScope()}ngOnInit(){this.publishedListSubscription=this.authorDataService.publishedList$.subscribe(l=>{this.fullData=l,this.publishedListLength=l.length,this.filteredData=l.slice(0,this.displayedListLimit)})}ngOnChanges(){}loadMore(){this.displayedListLimit+=this.displayedListIncrement,this.filteredData=this.fullData.slice(0,this.displayedListLimit)}ngOnDestroy(){this.publishedListSubscription&&this.publishedListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-author-published-list"]],features:[o.OA$],decls:13,vars:10,consts:[[1,"author-published-article-list-base"],[1,"head"],[1,"title"],[1,"dashboard-counter"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-center","mt-3"],[1,"",3,"click","visible"],[1,"showMoreButton"],[1,"icon-caret-down"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"span",2),o.EFF(3),o.k0s(),o.j41(4,"div",3)(5,"span"),o.EFF(6),o.k0s()()(),o.DNE(7,tM,2,1,"div",4),o.j41(8,"div",5)(9,"dx-button",6),o.bIt("click",function(){return F.loadMore()}),o.j41(10,"div",7),o.nrm(11,"i",8),o.EFF(12),o.k0s()()()()),2&O&&(o.R7$(3),o.JRh(F.scope.network.getResourceOrKeyName("admin_article_index_publishedDescription")),o.R7$(3),o.JRh(F.publishedListLength),o.R7$(),o.Y8G("ngForOf",F.filteredData),o.R7$(2),o.Y8G("visible",F.publishedListLength>F.displayedListLimit),o.R7$(3),o.ZXR(" ",F.scope.network.getResourceOrKeyName("web_profileAuthor_showMore_0")," ",F.displayedListIncrement," ",F.scope.network.getResourceOrKeyName("web_profileAuthor_showMore_1")," (",F.displayedListLimit," ",F.scope.network.getResourceOrKeyName("web_profileAuthor_showMore_2")," ",F.publishedListLength,") "))},dependencies:[a.Sq,Hi.e,fp],styles:[".author-published-article-list-base[_ngcontent-%COMP%]   .head[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem}.author-published-article-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#00000080;margin-left:1rem;width:2rem;height:2rem}.author-published-article-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem}@media (max-width: 768px){.author-published-article-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.15rem}}.author-published-article-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.3rem;font-family:var(--fontPrimary);color:var(--textColor90);font-weight:700}@media (max-width: 768px){.author-published-article-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.15rem}}"]})}}return v})();function e_(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-author-dashboard-lists-item",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}let Vu=(()=>{class v{constructor(l,O){this.scopeService=l,this.authorDataService=O,this.scope=this.scopeService.getScope()}ngOnInit(){this.applicationListSubscription=this.authorDataService.applications$.subscribe(l=>{const O=l.filter(F=>!!F.assigned&&!!F.accepted&&!F.scheduledPublish);this.applications=O.sort((F,se)=>{const we=new Date(F.accepted).getTime();return new Date(se.accepted).getTime()-we})})}ngOnDestroy(){this.applicationListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-in-progress-list"]],decls:8,vars:3,consts:[[1,"author-progress-list-base"],[1,"head"],[1,"title"],[1,"dashboard-counter"],[4,"ngFor","ngForOf"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"span",2),o.EFF(3),o.k0s(),o.j41(4,"div",3)(5,"span"),o.EFF(6),o.k0s()()(),o.DNE(7,e_,2,1,"div",4),o.k0s()),2&O&&(o.R7$(3),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_authorDashboard_isProcessing")),o.R7$(3),o.JRh(F.applications.length),o.R7$(),o.Y8G("ngForOf",F.applications))},dependencies:[a.Sq,fp],styles:[".author-progress-list-base[_ngcontent-%COMP%]   .head[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem}.author-progress-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#00000080;margin-left:1rem;width:2rem;height:2rem}.author-progress-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem}@media (max-width: 768px){.author-progress-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.15rem}}.author-progress-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.3rem;font-family:var(--fontPrimary);color:var(--textColor90);font-weight:700}@media (max-width: 768px){.author-progress-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.15rem}}"]})}}return v})();function Qx(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-author-dashboard-lists-item",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}let Hu=(()=>{class v{constructor(l,O){this.scopeService=l,this.authorDataService=O,this.scope=this.scopeService.getScope()}ngOnInit(){this.applicationListSubscription=this.authorDataService.applications$.subscribe(l=>{const O=l.filter(F=>!!F.publishRequested);this.applications=O.sort((F,se)=>{const we=new Date(F.publishRequested).getTime();return new Date(se.publishRequested).getTime()-we})})}ngOnDestroy(){this.applicationListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-in-release-list"]],decls:8,vars:3,consts:[[1,"author-in-release-list-base"],[1,"head"],[1,"title"],[1,"dashboard-counter"],[4,"ngFor","ngForOf"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"span",2),o.EFF(3),o.k0s(),o.j41(4,"div",3)(5,"span"),o.EFF(6),o.k0s()()(),o.DNE(7,Qx,2,1,"div",4),o.k0s()),2&O&&(o.R7$(3),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_authorDashboard_isRelease")),o.R7$(3),o.JRh(F.applications.length),o.R7$(),o.Y8G("ngForOf",F.applications))},dependencies:[a.Sq,fp],styles:[".author-in-release-list-base[_ngcontent-%COMP%]   .head[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem}.author-in-release-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#00000080;margin-left:1rem;width:2rem;height:2rem}.author-in-release-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem}@media (max-width: 768px){.author-in-release-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.15rem}}.author-in-release-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.3rem;font-family:var(--fontPrimary);color:var(--textColor90);font-weight:700}@media (max-width: 768px){.author-in-release-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.15rem}}"]})}}return v})();function au(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-author-dashboard-lists-item",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}let BC=(()=>{class v{constructor(l,O){this.scopeService=l,this.authorDataService=O,this.scope=this.scopeService.getScope()}ngOnInit(){this.applicationListSubscription=this.authorDataService.applications$.subscribe(l=>{const O=l.filter(F=>!!F.assigned&&!F.accepted&&!F.userCanceled);this.applications=O.sort((F,se)=>{const we=new Date(F.assigned).getTime();return new Date(se.assigned).getTime()-we})})}ngOnDestroy(){this.applicationListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-job-request-list"]],decls:8,vars:3,consts:[[1,"author-job-request-list-base"],[1,"head"],[1,"title"],[1,"dashboard-counter"],[4,"ngFor","ngForOf"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"span",2),o.EFF(3),o.k0s(),o.j41(4,"div",3)(5,"span"),o.EFF(6),o.k0s()()(),o.DNE(7,au,2,1,"div",4),o.k0s()),2&O&&(o.R7$(3),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_authorDashboard_jobRequests")),o.R7$(3),o.JRh(F.applications.length),o.R7$(),o.Y8G("ngForOf",F.applications))},dependencies:[a.Sq,fp],styles:[".author-job-request-list-base[_ngcontent-%COMP%]   .head[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem}.author-job-request-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#00000080;margin-left:1rem;width:2rem;height:2rem}.author-job-request-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem}@media (max-width: 768px){.author-job-request-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.15rem}}.author-job-request-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.3rem;font-family:var(--fontPrimary);color:var(--textColor90);font-weight:700}@media (max-width: 768px){.author-job-request-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.15rem}}"]})}}return v})();function fT(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-author-dashboard-lists-item",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}let qg=(()=>{class v{constructor(l,O){this.scopeService=l,this.authorDataService=O,this.scope=this.scopeService.getScope()}ngOnInit(){this.applicationListSubscription=this.authorDataService.applications$.subscribe(l=>{const O=l.filter(F=>!F.assigned&&!F.accepted&&!F.userCanceled);this.applications=O.sort((F,se)=>{const we=new Date(F.accepted).getTime();return new Date(se.accepted).getTime()-we})})}ngOnDestroy(){this.applicationListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-ongoing-applications-list"]],decls:8,vars:3,consts:[[1,"author-ongoing-applications-list-base"],[1,"head"],[1,"title"],[1,"dashboard-counter"],[4,"ngFor","ngForOf"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"span",2),o.EFF(3),o.k0s(),o.j41(4,"div",3)(5,"span"),o.EFF(6),o.k0s()()(),o.DNE(7,fT,2,1,"div",4),o.k0s()),2&O&&(o.R7$(3),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_authorDashboard_pendingApplications")),o.R7$(3),o.JRh(F.applications.length),o.R7$(),o.Y8G("ngForOf",F.applications))},dependencies:[a.Sq,fp],styles:[".author-ongoing-applications-list-base[_ngcontent-%COMP%]   .head[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem}.author-ongoing-applications-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#00000080;margin-left:1rem;width:2rem;height:2rem}.author-ongoing-applications-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem}@media (max-width: 768px){.author-ongoing-applications-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.15rem}}.author-ongoing-applications-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.3rem;font-family:var(--fontPrimary);color:var(--textColor90);font-weight:700}@media (max-width: 768px){.author-ongoing-applications-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.15rem}}"]})}}return v})();function gd(v,p){if(1&v&&(o.j41(0,"div"),o.nrm(1,"app-author-dashboard-lists-item",5),o.k0s()),2&v){const l=p.$implicit;o.R7$(),o.Y8G("data",l)}}let Jx=(()=>{class v{constructor(l,O){this.scopeService=l,this.authorDataService=O,this.scope=this.scopeService.getScope()}ngOnInit(){this.applicationListSubscription=this.authorDataService.applications$.subscribe(l=>{const O=l.filter(F=>!!F.assigned&&!!F.accepted&&!!F.scheduledPublish);this.applications=O.sort((F,se)=>{const we=new Date(F.created).getTime();return new Date(se.created).getTime()-we})})}ngOnDestroy(){this.applicationListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Jm))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-schedule-list"]],decls:8,vars:3,consts:[[1,"author-schedule-list-base"],[1,"head"],[1,"title"],[1,"dashboard-counter"],[4,"ngFor","ngForOf"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"span",2),o.EFF(3),o.k0s(),o.j41(4,"div",3)(5,"span"),o.EFF(6),o.k0s()()(),o.DNE(7,gd,2,1,"div",4),o.k0s()),2&O&&(o.R7$(3),o.JRh(F.scope.currentScope.network.getResourceOrKeyName("web_authorDashboard_is_planned")),o.R7$(3),o.JRh(F.applications.length),o.R7$(),o.Y8G("ngForOf",F.applications))},dependencies:[a.Sq,fp],styles:[".author-schedule-list-base[_ngcontent-%COMP%]   .head[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem}.author-schedule-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#00000080;margin-left:1rem;width:2rem;height:2rem}.author-schedule-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem}@media (max-width: 768px){.author-schedule-list-base[_ngcontent-%COMP%]   .dashboard-counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.15rem}}.author-schedule-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.3rem;font-family:var(--fontPrimary);color:var(--textColor90);font-weight:700}@media (max-width: 768px){.author-schedule-list-base[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.15rem}}"]})}}return v})();function RL(v,p){1&v&&(o.j41(0,"div",8),o.nrm(1,"app-job-request-list"),o.k0s(),o.j41(2,"div",8),o.nrm(3,"app-ongoing-applications-list"),o.k0s())}let kL=(()=>{class v{constructor(l,O,F,se,we){this.scopeService=l,this.profileService=O,this.authorDataService=F,this.articleService=se,this.eventCalendarService=we,this.canCreateEvents=!1,this.publishedListSubscription=null,this.createEventButtonEnabled=!1,this.createArticleButtonEnabled=!1,this.filterData=[],this.disableAuthorApplications=!1,this.createArticle=()=>{this.articleService.createArticle().then(We=>{window.location.href=this.scope.currentChapter.path+`${We.path}/edit`})},this.createEvent=()=>{this.eventCalendarService.createEvent().then(We=>{window.location.href=this.scope.currentChapter.path+"/events/"+We+"/edit"})},this.filterLists=We=>{switch(We.value){case"article":this.authorDataService.setFilter("article");break;case"event":this.authorDataService.setFilter("event");break;case"all":this.authorDataService.setFilter("all")}},this.scope=this.scopeService.getScope(),this.calendarSettings=this.scope.currentScope.chapter.settings.configurations.eventsBirthdayCalendarConfiguration,this.user=this.scope.profile,this.profilServiceSubscription=this.profileService.profileChanged$.subscribe(We=>{this.user=We}),this.canCreateEvents=this.user.chapterRoles.includes(ig.NewsroomAdmin)||!this.calendarSettings&&this.user.chapterRoles.includes(ig.MerkuristJournalist)||this.calendarSettings&&(6===this.calendarSettings.MinEventCreationRole&&this.user.chapterRoles.includes(ig.HeadSales)||5===this.calendarSettings.MinEventCreationRole&&this.user.chapterRoles.includes(ig.Sales)||4===this.calendarSettings.MinEventCreationRole&&this.user.chapterRoles.includes(ig.HeadJournalist)||3===this.calendarSettings.MinEventCreationRole&&this.user.chapterRoles.includes(ig.MerkuristJournalist)||2===this.calendarSettings.MinEventCreationRole&&this.user.chapterRoles.includes(ig.Journalist)),this.createEventButtonEnabled=!1!==this.scope.currentScope.network.settings.configurations.enableCalendar&&this.scope.currentScope.chapter.settings.configurations.enableEventCalendar&&this.canCreateEvents,this.createArticleButtonEnabled=this.scope.currentScope.chapter.settings.featureCreateArticleWithoutSnip>0,this.authorDataService.initData(),this.publishedList$=this.authorDataService.publishedList$}ngOnInit(){this.publishedListSubscription=this.publishedList$.subscribe(l=>{this.publishedList=l}),this.disableAuthorApplications=this.scope.currentScope.chapter.settings.configurations.disableAuthorApplications,this.createEventButtonEnabled&&this.createArticleButtonEnabled&&this.filterData.push({id:"all",text:this.scope.currentScope.network.getResourceOrKeyName("admin_common_all")}),this.createArticleButtonEnabled&&this.filterData.push({id:"article",text:this.scope.currentScope.network.getResourceOrKeyName("web_common_article")}),this.createEventButtonEnabled&&this.filterData.push({id:"event",text:this.scope.currentScope.network.getResourceOrKeyName("web_event_filter_type_events")})}ngOnDestroy(){this.profilServiceSubscription&&this.profilServiceSubscription.unsubscribe(),this.publishedListSubscription&&this.publishedListSubscription.unsubscribe()}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(Co.p),o.rXU(Jm),o.rXU(ts),o.rXU(AC))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-author-dashboard"]],decls:19,vars:9,consts:[[1,"author-dashboard-base"],[1,"author-dashboard-wrapper"],[1,"author-dashboard-title"],[1,"author-dashboard-filter"],["width","150","valueExpr","id","displayExpr","text",3,"onValueChanged","dataSource","placeholder","visible"],[1,"auhor-dashboard-create-buttons"],["icon","fa-regular fa-newspaper","stylingMode","outlined",1,"create-article",3,"onClick","text","visible"],["icon","fa-solid fa-calendar-days","stylingMode","outlined",1,"create-event",3,"onClick","text","visible"],[1,"author-list"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),o.EFF(4),o.k0s(),o.j41(5,"div",3)(6,"dx-select-box",4),o.bIt("onValueChanged",function(we){return F.filterLists(we)}),o.k0s()()(),o.j41(7,"div",5)(8,"dx-button",6),o.bIt("onClick",function(){return F.createArticle()}),o.k0s(),o.j41(9,"dx-button",7),o.bIt("onClick",function(){return F.createEvent()}),o.k0s()(),o.j41(10,"div",8),o.nrm(11,"app-in-progress-list"),o.k0s(),o.j41(12,"div",8),o.nrm(13,"app-schedule-list"),o.k0s(),o.j41(14,"div",8),o.nrm(15,"app-in-release-list"),o.k0s(),o.DNE(16,RL,4,0),o.j41(17,"div",8),o.nrm(18,"app-author-published-list"),o.k0s()()()),2&O&&(o.R7$(4),o.JRh(F.scope.network.getResourceOrKeyName("web_author_dashboard")),o.R7$(2),o.Y8G("dataSource",F.filterData)("placeholder",F.scope.network.getResourceOrKeyName("web_common_filter"))("visible",F.filterData.length>1),o.R7$(2),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorDashboard_newArticle"))("visible",F.createArticleButtonEnabled),o.R7$(),o.Y8G("text",F.scope.network.getResourceOrKeyName("web_authorDashboard_newEvent"))("visible",F.createEventButtonEnabled),o.R7$(7),o.vxM(F.disableAuthorApplications?-1:16))},dependencies:[Hi.e,Wt.l,qm,Vu,Hu,BC,qg,Jx],styles:[".author-dashboard-base[_ngcontent-%COMP%]{display:flex;justify-content:center}@media (max-width: 768px){.author-dashboard-base[_ngcontent-%COMP%]{padding:.5rem}}.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]{width:var(--designContentWidth)}.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .author-dashboard-title[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem;font-size:2rem;display:flex}@media (max-width: 768px){.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .author-dashboard-title[_ngcontent-%COMP%]{font-size:1.7rem}}.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .author-dashboard-title[_ngcontent-%COMP%]   .author-dashboard-filter[_ngcontent-%COMP%]{margin-left:auto}.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .auhor-dashboard-create-buttons[_ngcontent-%COMP%]{margin-top:1rem;display:flex;gap:3rem}@media (max-width: 768px){.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .auhor-dashboard-create-buttons[_ngcontent-%COMP%]{justify-content:center}}.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .create-article[_ngcontent-%COMP%]{transform:scale(1.2);transform-box:stroke-box}@media (max-width: 768px){.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .create-article[_ngcontent-%COMP%]{transform:scale(1)}}.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .create-event[_ngcontent-%COMP%]{transform:scale(1.2);transform-box:stroke-box}@media (max-width: 768px){.author-dashboard-base[_ngcontent-%COMP%]   .author-dashboard-wrapper[_ngcontent-%COMP%]   .create-event[_ngcontent-%COMP%]{transform:scale(1)}}.author-dashboard-base[_ngcontent-%COMP%]   .author-list[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem}"]})}}return v})();function LL(v,p){if(1&v){const l=o.RV6();o.j41(0,"h4"),o.EFF(1),o.k0s(),o.j41(2,"div",1)(3,"div",2)(4,"h2",3),o.EFF(5),o.k0s()(),o.j41(6,"div",2),o.nrm(7,"i",4),o.k0s(),o.j41(8,"div",2),o.nrm(9,"i",5),o.k0s(),o.j41(10,"div",2),o.nrm(11,"i",6),o.k0s(),o.j41(12,"div",2)(13,"h2",3),o.EFF(14),o.k0s()()(),o.j41(15,"p"),o.EFF(16),o.k0s(),o.j41(17,"div",7)(18,"dx-button",8),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.apply())}),o.EFF(19),o.k0s(),o.j41(20,"dx-button",9),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.back())}),o.EFF(21),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snipApply_notAppliedTitle")),o.R7$(4),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_snip")),o.R7$(9),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_common_article")),o.R7$(2),o.SpI(" ",l.web_snipApply_notAppliedDescription," "),o.R7$(3),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snipApply_notAppliedApply")),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snipApply_backToSnip"))}}function Qy(v,p){if(1&v){const l=o.RV6();o.j41(0,"p"),o.EFF(1),o.k0s(),o.j41(2,"div",7)(3,"dx-button",10),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.goToDashboard())}),o.EFF(4),o.k0s(),o.j41(5,"dx-button",11),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.back())}),o.EFF(6),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snipApply_appliedDescription")),o.R7$(3),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snipApply_backToDashboard")),o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_snipApply_backToSnip"))}}let BL=(()=>{class v{constructor(l,O,F,se,we){this.snipService=l,this.authorService=O,this.profileService=F,this.hybridTrackingService=se,this.scopeService=we,this.hasApplied=!1,this.scope=this.scopeService.getScope(),this.web_snipApply_notAppliedDescription=this.scope.currentScope.network.resources.web_snipApply_notAppliedDescription.replace("{{web_common_author}}",this.scope.currentScope.network.getResourceOrKeyName("web_common_author_custom"))}ngOnInit(){this.profileService.getProfile().then(l=>{l.isJournalist&&(this.snipService.getSnipDetails(this.snipId).then(O=>{this.snip=O}),this.authorService.checkApply(this.snipId).then(O=>{this.hasApplied=O}))},l=>{this.hybridTrackingService.switchState("app.register",{})})}apply(){this.authorService.applySnip(this.snipId).then(l=>{this.hybridTrackingService.switchState("app.authorDashboard",{})})}back(){window.history.back()}goToDashboard(){this.hybridTrackingService.switchState("app.authorDashboard",{})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(ra),o.rXU(nu),o.rXU(Co.p),o.rXU(Rs.o),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-snip-author-application"]],inputs:{snipId:"snipId"},decls:3,vars:1,consts:[[1,"snip-author-application-base"],[1,"aligner"],[1,"aligner-item"],[1,"gray"],[1,"icon-size","icon-snippet-start","green"],[1,"icon-size","fa","fa-long-arrow-right","gray","articleApply-schemeArrow"],[1,"icon-size","fa","fa-edit","gray"],[1,"author-application-action-container"],[1,"author-application-button",3,"onClick"],["stylingMode","text",1,"author-application-button",3,"onClick"],[3,"onClick"],["stylingMode","text",3,"onClick"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,LL,22,6)(2,Qy,7,3),o.k0s()),2&O&&(o.R7$(),o.vxM(F.hasApplied?2:1))},dependencies:[Hi.e],styles:[".snip-author-application-base[_ngcontent-%COMP%]   .author-application-action-container[_ngcontent-%COMP%]{display:flex;gap:1rem}@media (max-width: 768px){.snip-author-application-base[_ngcontent-%COMP%]   .author-application-action-container[_ngcontent-%COMP%]{justify-content:center}}.snip-author-application-base[_ngcontent-%COMP%]   .author-application-action-container[_ngcontent-%COMP%]   .author-application-button[_ngcontent-%COMP%]{font-size:1.2rem;padding:.25rem}.snip-author-application-base[_ngcontent-%COMP%]   .aligner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.snip-author-application-base[_ngcontent-%COMP%]   .aligner[_ngcontent-%COMP%]   .icon-size[_ngcontent-%COMP%]{font-size:4rem}@media (max-width: 768px){.snip-author-application-base[_ngcontent-%COMP%]   .aligner[_ngcontent-%COMP%]{padding:5px}.snip-author-application-base[_ngcontent-%COMP%]   .aligner[_ngcontent-%COMP%]   .icon-size[_ngcontent-%COMP%]{font-size:2.5rem}}.snip-author-application-base[_ngcontent-%COMP%]   .aligner[_ngcontent-%COMP%]{padding:20px}"]})}}return v})(),qx=(()=>{class v{constructor(l,O){this.scopeService=l,this.http=O,this.scope=l.getScope()}buildFilter(l,O,F){var se={};return l&&(se.query=l),O&&(se.page=O),F&&(se.chapterIds=F),se}search(l,O){return this.http.post(`${this.scope.apiEndpoint}search`,this.buildFilter(l,0,O)).toPromise().then(F=>F)}getStaffDirectoryAttributes(){return this.http.get(`${this.scope.apiEndpoint}staffDirectory/attributes`).toPromise().then(l=>l)}getStaffDirectoryUsers(l,O,F,se,we){return this.http.post(`${this.scope.apiEndpoint}search/staffDirectory`,{query:l,optionIds:O,booleanIds:F,attributeDateTimeRanges:se,filterState:we}).toPromise().then(We=>We)}getArticles(l,O,F){return this.http.post(`${this.scope.apiEndpoint}search/articles`,this.buildFilter(l,O,F)).toPromise().then(se=>se)}getAssetArticles(l,O){return this.http.post(`${this.scope.apiEndpoint}search/assets/articles`,this.buildFilter(l,0,null)).toPromise().then(F=>F)}getAssetSponsoredArticles(l,O){return this.http.post(`${this.scope.apiEndpoint}search/assets/articles/sponsored?q=`,this.buildFilter(l,0,null)).toPromise().then(F=>F)}getAssetImages(l,O){return this.getAssets(l,O,"search/assets/images")}getSponsoredAssetImages(l,O){return this.getAssets(l,O,"search/assets/images/sponsored")}getAssetFiles(l,O){return this.getAssets(l,O,"search/assets/files")}getSponsoredAssetFiles(l,O){return this.getAssets(l,O,"search/assets/files/sponsored")}getAssets(l,O,F){return this.http.post(`${this.scope.apiEndpoint}${F}`,this.buildFilter(l,0,null)).toPromise().then(se=>se)}getEvents(l,O,F){return this.http.post(`${this.scope.apiEndpoint}search/events`,this.buildFilter(l,O,F)).toPromise().then(se=>se)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(b.A),o.KVO(_.Qq))}}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})();var mT=M(6553),xv=M(6761);function NC(v,p){1&v&&o.nrm(0,"div",6)}function uE(v,p){if(1&v){const l=o.RV6();o.j41(0,"dx-drop-down-button",7),o.mxI("selectedItemKeyChange",function(F){const se=o.eBV(l).$index,we=o.XpG(3);return o.DH7(we.chapterGroupSelections[se],F)||(we.chapterGroupSelections[se]=F),o.Njj(F)}),o.bIt("onSelectionChanged",function(){o.eBV(l);const F=o.XpG(3);return o.Njj(F.updateQuery())}),o.k0s(),o.DNE(1,NC,1,0,"div",6)}if(2&v){const l=p.$implicit,O=p.$index,F=p.$index,se=p.$count,we=o.XpG(3);o.FS9("text",l.name),o.Y8G("items",l.chapters)("useSelectMode",!0),o.R50("selectedItemKey",we.chapterGroupSelections[O]),o.R7$(),o.vxM(F!==se-1?1:-1)}}function FC(v,p){if(1&v&&(o.nrm(0,"div",6),o.Z7z(1,uE,2,5,null,null,o.fX1)),2&v){const l=o.XpG(2);o.R7$(),o.Dyx(l.chapterGroupNames)}}function _T(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",1)(1,"div",3),o.EFF(2),o.k0s(),o.j41(3,"div",4)(4,"dx-drop-down-button",5),o.mxI("selectedItemKeyChange",function(F){o.eBV(l);const se=o.XpG();return o.DH7(se.rangeSelection,F)||(se.rangeSelection=F),o.Njj(F)}),o.bIt("onSelectionChanged",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.changeFilter())}),o.k0s(),o.DNE(5,FC,3,0),o.k0s()()}if(2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_search_filter")," "),o.R7$(2),o.FS9("text",l.scope.currentScope.network.getResourceOrKeyName("web_staff_search_select_filter_mode")),o.Y8G("items",l.filterTypes)("useSelectMode",!0),o.R50("selectedItemKey",l.rangeSelection),o.R7$(),o.vxM(l.filterGroupsReady&&l.filterRubricsReady?5:-1)}}function VC(v,p){1&v&&o.nrm(0,"div",6)}function vT(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",10)(1,"dx-drop-down-button",13),o.mxI("selectedItemKeyChange",function(F){const se=o.eBV(l).$index,we=o.XpG(2);return o.DH7(we.staffDirFilter.optionSelections[se],F)||(we.staffDirFilter.optionSelections[se]=F),o.Njj(F)}),o.bIt("onSelectionChanged",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.updateQuery())}),o.k0s(),o.DNE(2,VC,1,0,"div",6),o.k0s()}if(2&v){const l=p.$implicit,O=p.$index,F=p.$index,se=p.$count,we=o.XpG(2);o.R7$(),o.FS9("text",l.displayLabel),o.Y8G("useSelectMode",!0)("items",l.templateResourceValues),o.R50("selectedItemKey",we.staffDirFilter.optionSelections[O]),o.R7$(),o.vxM(F!==se-1?2:-1)}}function e0(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",10)(1,"dx-check-box",14),o.mxI("valueChange",function(F){const se=o.eBV(l).$index,we=o.XpG(2);return o.DH7(we.staffDirFilter.booleanSelections[se],F)||(we.staffDirFilter.booleanSelections[se]=F),o.Njj(F)}),o.bIt("onValueChanged",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.updateQuery())}),o.k0s()()}if(2&v){const l=p.$implicit,O=p.$index,F=o.XpG(2);o.R7$(),o.FS9("text",l.displayLabel),o.R50("value",F.staffDirFilter.booleanSelections[O])}}function t0(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",15)(1,"span",16),o.EFF(2),o.k0s(),o.j41(3,"dx-date-range-box",17),o.mxI("startDateChange",function(F){const se=o.eBV(l).$implicit,we=o.XpG(2);return o.DH7(we.datePickersFrom[se.id],F)||(we.datePickersFrom[se.id]=F),o.Njj(F)})("endDateChange",function(F){const se=o.eBV(l).$implicit,we=o.XpG(2);return o.DH7(we.datePickersUntil[se.id],F)||(we.datePickersUntil[se.id]=F),o.Njj(F)}),o.bIt("onValueChanged",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.updateQuery())}),o.k0s()(),o.j41(4,"div",18)(5,"dx-check-box",19),o.mxI("valueChange",function(F){const se=o.eBV(l).$implicit,we=o.XpG(2);return o.DH7(we.datePickersIgnoreYear[se.id],F)||(we.datePickersIgnoreYear[se.id]=F),o.Njj(F)}),o.bIt("onValueChanged",function(){o.eBV(l);const F=o.XpG(2);return o.Njj(F.updateQuery())}),o.k0s(),o.j41(6,"div",20),o.nrm(7,"i",21),o.k0s()()}if(2&v){const l=p.$implicit,O=o.XpG(2);o.R7$(2),o.JRh(l.displayLabel),o.R7$(),o.Y8G("openOnFieldClick",!1)("showClearButton",!0),o.R50("startDate",O.datePickersFrom[l.id])("endDate",O.datePickersUntil[l.id]),o.R7$(2),o.R50("value",O.datePickersIgnoreYear[l.id]),o.Y8G("hint",O.scope.currentScope.network.getResourceOrKeyName("web_staff_dir_date_filter_ignore_year_help")),o.R7$(),o.Y8G("title",O.scope.currentScope.network.getResourceOrKeyName("web_staff_dir_date_filter_ignore_year_help"))}}function Jy(v,p){if(1&v&&(o.j41(0,"div",2)(1,"div",3),o.EFF(2),o.k0s(),o.j41(3,"div",8)(4,"div",9),o.Z7z(5,vT,3,5,"div",10,o.fX1),o.k0s(),o.j41(7,"div",11),o.Z7z(8,e0,2,2,"div",10,o.fX1),o.k0s(),o.j41(10,"div",12),o.Z7z(11,t0,8,8,null,null,o.fX1),o.k0s()()()),2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("admin_shared_staff_directory_template")," "),o.R7$(3),o.Dyx(l.attributes.options),o.R7$(3),o.Dyx(l.attributes.booleans),o.R7$(3),o.Dyx(l.attributes.datePickers)}}let qy=(()=>{class v{constructor(l,O,F,se){this.scopeService=l,this.deviceInfoService=O,this.searchService=F,this.translationService=se,this.staffDirEnabled=!1,this.calendarEnabled=!1,this.filtered=!1,this.filterGroupsReady=!1,this.filterRubricsReady=!1,this.isMobileView=!1,this.filterInitialized=!1,this.chapterGroupNames=[],this.chapterGroups=[],this.filterTypes=[],this.searchFilter="",this.noSelectionStyle={"background-color":"cadetblue"},this.rangeSelection=null,this.staffDirFilter={},this.datePickersFrom={},this.datePickersUntil={},this.datePickersIgnoreYear={},this.searchParameters=null,this.query=null,this.scope=l.getScope(),this.staffDirFilter={optionSelections:{},booleanIds:{},datePickers:{id:{from:{},until:{},ignoreYear:{}}},optionIds:{},booleanSelections:{},attributeRanges:{}}}ngOnInit(){this.staffDirEnabled=this.scope.currentScope.network.settings.isStaffDirectoryEnabled,this.calendarEnabled=this.scope.currentScope.network.settings.configurations.enableCalendar,this.isMobileView=this.deviceInfoService.getUserAgentInfo().isMobile,this.filterTypes=[{id:0,display:this.scope.currentScope.network.resources.web_filter_mode_both||"!RES[web_filter_mode_both]"},{id:1,display:this.scope.currentScope.network.resources.web_filter_mode_articles||"!RES[web_filter_mode_articles]"}],this.staffDirEnabled&&this.filterTypes.push({id:-1,display:this.scope.currentScope.network.resources.web_filter_mode_staff_dir||"!RES[web_filter_mode_staff_dir]"}),this.calendarEnabled&&this.filterTypes.push({id:2,display:this.scope.currentScope.network.resources.web_filter_mode_events||"!RES[web_filter_mode_events]"}),this.searchFilter=new URLSearchParams(location.search).get("searchFilter")||"all",this.searchService.getStaffDirectoryAttributes().then(we=>{this.attributes=we});var l=new URLSearchParams(location.search).get("searchFilter");if(l){switch(l){case"staffs":this.rangeSelection=-1;break;case"all":default:this.rangeSelection=0;break;case"articles":this.rangeSelection=1;break;case"events":this.rangeSelection=2}this.filtered=!0}if(new URLSearchParams(location.search).has("staffDirFilter")){var O=JSON.parse(decodeURIComponent(new URLSearchParams(location.search).get("staffDirFilter")));O&&(O.datePickers&&(Object.entries(O.datePickers).forEach(we=>{if(we[1].from){var We=new Date(we[1].from);we[1].from=We,this.datePickersFrom[we[0]]=We}if(we[1].until){var gt=new Date(we[1].until);we[1].until=gt,this.datePickersUntil[we[0]]=gt}this.datePickersIgnoreYear[we[0]]=we[1].ignoreYear}),O.attributeRanges=this.extractRanges(O.datePickers)),this.staffDirFilter=O,this.filtered=!0)}if(this.filterInitialized=!0,this.translate(),new URLSearchParams(location.search).has("chapterIds")){var F=[],se=new URLSearchParams(location.search).getAll("chapterIds");Array.isArray(se)?F=se:F.push(se),F.forEach(we=>{this.chapterGroups.forEach((We,gt)=>{We.chapters.filter(function(Ft){return Ft.id===we}).length>0&&(this.chapterGroupSelections[gt]=we,this.filtered=!0)})})}}translate(){var l=this.scope.currentScope.chapter.chapterGroups,O=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled;if(0==O){if(l){this.chapterGroups=l;var F=l.map(function(We){return We.name});this.translationService.translateByUserLanguageCode(F).then(We=>{We.forEach((gt,Ft)=>{l[Ft].name=gt.translation}),this.chapterGroupNames=l,this.filterGroupsReady=this.chapterGroupNames.length>0});var we=l.map(function(We){return We.chapters}).map((We,gt)=>{var Ft=We.map(function(pn){return pn.shortName});return this.translationService.translateByUserLanguageCode(Ft).then(pn=>{pn.forEach((fi,_o)=>{l[gt].chapters[_o].shortName=fi.translation})})});Promise.all(we).then(()=>{this.filterRubricsReady=!0})}}else l&&(this.chapterGroupNames=l,this.chapterGroups=l),this.filterGroupsReady=!0,this.filterRubricsReady=!0;this.chapterGroupSelections={}}changeFilter(){let l=this.rangeSelection;-1==l&&(this.searchFilter="staffs"),0==l&&(this.searchFilter="all"),1==l&&(this.searchFilter="articles"),2==l&&(this.searchFilter="events"),this.updateQuery()}extractIds(l){return Object.keys(l).map(function(O){return l[O]})}extractRanges(l){return Object.keys(l).map(function(O){return{attribute_Id:O,from:l[O].from,until:l[O].until,ignoreYear:l[O].ignoreYear}})}updateQuery(){if(this.query=null,this.searchFilter&&this.updateSearchParameters("searchFilter",this.searchFilter),this.chapterGroupSelections&&this.extractIds(this.chapterGroupSelections).forEach(we=>{this.updateSearchParameters("chapterIds",we)}),this.staffDirFilter.optionSelections){var O=this.extractIds(this.staffDirFilter.optionSelections);this.staffDirFilter.optionIds=O}if(this.datePickersFrom&&this.datePickersUntil&&(this.resolveDatePickerSelections(),this.staffDirFilter.attributeRanges=this.extractRanges(this.staffDirFilter.datePickers)),this.staffDirFilter.booleanSelections){var F=this.extractIds(this.staffDirFilter.booleanSelections);F=F.filter(function(we){return void 0!==we}),this.staffDirFilter.booleanIds=F}if(this.staffDirFilter.optionSelections||this.chapterGroupSelections||this.booleanSelections||this.datePickers){var se=encodeURIComponent(JSON.stringify(this.staffDirFilter));this.updateSearchParameters("staffDirFilter",se),window.history.pushState("","",this.query),this.filtered=!0,this.searchCallback(this.searchFilter,this.staffDirFilter)}}resetFilter(){this.chapterGroupSelections={},this.staffDirFilter={},this.filtered=!1,this.searchCallback(this.searchFilter,this.staffDirFilter)}updateSearchParameters(l,O){this.query?this.query+="&"+l+"="+O:this.query="search?"+l+"="+O}resolveDatePickerSelections(){let l={};this.attributes.datePickers.forEach(O=>{let F=O.id,se={from:this.datePickersFrom[F],until:this.datePickersUntil[F],ignoreYear:this.datePickersIgnoreYear[F]};se.from&&se.until&&(l[F]=se)}),this.staffDirFilter.datePickers=l}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E),o.rXU(qx),o.rXU(Ei.M))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-search-filter"]],inputs:{searchCallback:"searchCallback",filterStateCallback:"filterStateCallback"},decls:3,vars:2,consts:[[1,"container","mw-100"],[1,"row","search-filter-wrapper"],[1,"row"],[1,"col-4","search-filter-text"],[1,"col-8","search-filter-selections-wrapper"],["icon","","stylingMode","text","type","normal","displayExpr","display","keyExpr","id",1,"search-filter-type-selection",3,"selectedItemKeyChange","onSelectionChanged","items","useSelectMode","selectedItemKey","text"],[1,"search-filter-selections-divider"],["icon","","stylingMode","text","type","normal","displayExpr","shortName","keyExpr","id",1,"search-filter-rubric-selection",3,"selectedItemKeyChange","onSelectionChanged","items","useSelectMode","selectedItemKey","text"],[1,"col-8"],[1,"row","search-filter-staff-directory-selection-container","search-filter-staff-directory-options-wrapper"],[1,""],[1,"row","search-filter-staff-directory-selection-container","search-filter-staff-directory-booleans-wrapper"],[1,"row","search-filter-staff-directory-selection-container","search-filter-staff-directory-date-picker-wrapper"],["type","normal","stylingMode","text","displayExpr","value","keyExpr","id",1,"search-filter-staff-directory-options",3,"selectedItemKeyChange","onSelectionChanged","text","useSelectMode","items","selectedItemKey"],[1,"search-filter-staff-directory-booleans",3,"valueChange","onValueChanged","text","value"],[1,"col-10"],[1,"search-filter-staff-directory-selection-date-picker-label"],["applyValueMode","useButtons","height","50","stylingMode","underlined",1,"search-filter-staff-directory-date-picker",3,"startDateChange","endDateChange","onValueChanged","openOnFieldClick","showClearButton","startDate","endDate"],[1,"col-2"],[1,"search-filter-staff-directory-date-picker-ignore-year",3,"valueChange","onValueChanged","value","hint"],[3,"title"],[1,"fa","fa-question-circle"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,_T,6,6,"div",1)(2,Jy,13,1,"div",2),o.k0s()),2&O&&(o.R7$(),o.vxM("all"!==F.searchFilter&&"articles"!==F.searchFilter&&F.staffDirEnabled?-1:1),o.R7$(),o.vxM(((null==F.attributes||null==F.attributes.options?null:F.attributes.options.length)>0||(null==F.attributes||null==F.attributes.booleans?null:F.attributes.booleans.length)>0||(null==F.attributes||null==F.attributes.datePickers?null:F.attributes.datePickers.length)>0)&&F.staffDirEnabled&&1!=F.rangeSelection&&("all"===F.searchFilter||"staffs"===F.searchFilter)?2:-1))},dependencies:[mT.F,xv.e,Kt.h],styles:[".search-filter-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}.search-filter-text[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;display:block}.search-filter-selections-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.search-filter-selections-wrapper[_ngcontent-%COMP%]     .dx-button-text{font-size:1.2rem;text-transform:uppercase}.search-filter-selections-divider[_ngcontent-%COMP%]{height:1.2rem;background-color:var(--textColor);width:.063rem;transform:translateY(45%)}.search-filter-staff-directory-selection-container[_ngcontent-%COMP%]{margin-bottom:1.5rem}.search-filter-staff-directory-options-wrapper[_ngcontent-%COMP%]     .dx-button-text{font-size:1.2rem;text-transform:uppercase}.search-filter-staff-directory-booleans-wrapper[_ngcontent-%COMP%]{padding-left:2%}.search-filter-staff-directory-booleans-wrapper[_ngcontent-%COMP%]     .dx-checkbox-text{font-size:1.2rem}.search-filter-staff-directory-date-picker-wrapper[_ngcontent-%COMP%]{padding-left:2%}.search-filter-staff-directory-selection-date-picker-label[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:1.2rem}.search-filter-staff-directory-date-picker-ignore-year[_ngcontent-%COMP%]{padding-top:40%}@media (max-width: 768px){.search-filter-text[_ngcontent-%COMP%]{font-size:1.15rem}.search-filter-selections-wrapper[_ngcontent-%COMP%]     .dx-button-text{font-size:1.1rem}.search-filter-selections-divider[_ngcontent-%COMP%]{height:1.1rem;transform:translateY(50%)}.search-filter-staff-directory-selection-container[_ngcontent-%COMP%]{margin-bottom:1.2rem}.search-filter-staff-directory-options-wrapper[_ngcontent-%COMP%]     .dx-button-text{font-size:1.1rem}.search-filter-staff-directory-booleans-wrapper[_ngcontent-%COMP%]     .dx-checkbox-text{font-size:1.1rem}.search-filter-staff-directory-selection-date-picker-label[_ngcontent-%COMP%]{font-size:1.1rem}}"]})}}return v})();function hE(v,p){if(1&v&&(o.nrm(0,"div",7),o.nI1(1,"apicodoTranslateText"),o.nI1(2,"async")),2&v){const l=o.XpG(2);o.Y8G("innerHTML",o.bMT(2,3,o.bMT(1,1,"..."+l.highlight+"...")),o.npT)}}function pE(v,p){if(1&v&&(o.j41(0,"div",1)(1,"div",2)(2,"a",3),o.nrm(3,"img",4),o.k0s()(),o.j41(4,"div",5)(5,"a",3),o.nrm(6,"h5",6),o.nI1(7,"apicodoTranslateText"),o.nI1(8,"async"),o.DNE(9,hE,3,5,"div",7),o.nrm(10,"div",8),o.nI1(11,"relativeDate"),o.k0s()()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("href",l.referralLink,o.B4B)("target",l.linkTarget),o.R7$(),o.FS9("src",l.imagePath,o.B4B),o.R7$(2),o.Y8G("href",l.referralLink,o.B4B)("target",l.linkTarget),o.R7$(),o.Y8G("innerHTML",o.bMT(8,10,o.bMT(7,8,l.text)),o.npT),o.R7$(3),o.vxM(l.highlight?9:-1),o.R7$(),o.Y8G("innerHTML",o.bMT(11,12,l.date),o.npT)}}function WV(v,p){if(1&v&&(o.j41(0,"div",1)(1,"a",3)(2,"div",9)(3,"div",10),o.nrm(4,"div",11),o.k0s(),o.j41(5,"div",12),o.nrm(6,"h5",13)(7,"div",14),o.nI1(8,"apicodoTranslateText"),o.nI1(9,"async"),o.nrm(10,"div",15),o.nI1(11,"relativeDate"),o.k0s()()()()),2&v){const l=o.XpG();o.R7$(),o.Y8G("href",l.referralLink,o.B4B)("target",l.linkTarget),o.R7$(3),o.Y8G("innerHtml",l.firstLetter,o.npT),o.R7$(2),o.Y8G("innerHTML",l.formattedArticleText,o.npT),o.R7$(),o.Y8G("innerHTML",o.bMT(9,8,o.bMT(8,6,"..."+l.highlight+"...")),o.npT),o.R7$(3),o.Y8G("innerHTML",o.bMT(11,10,l.date),o.npT)}}let nM=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.title="",this.highlight="",this.text="",this.imagePath="",this.referralLink="",this.linkTarget="",this.firstLetter="",this.formattedArticleText="",this.scope=l.getScope()}ngOnInit(){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceInfoService.getUserAgentInfo().isMobile?"-sm":"",F=this.scope.globalSettings.blobStorageCdnUrl;this.data.article&&(this.date=this.data.article.published,this.data.article.coverAssetReference?.assetImage?.guid?this.imagePath=`${F}/images/${this.data.article.coverAssetReference.assetImage.guid}?preset=cover${l}${O}-4x3`:(this.firstLetter=this.data.article.text.charAt(0),this.formattedArticleText=this.data.article.text.substring(1).trim()),this.title=this.data.article.heading,this.highlight=this.data.highlight,this.text=this.data.article.text,this.data.article.articleExternalLink?(this.referralLink=this.data.article.articleExternalLink,this.linkTarget="_blank"):this.referralLink=this.scope.currentChapter.path+this.data.article.path)}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-search-displayable-article"]],inputs:{data:"data"},decls:3,vars:1,consts:[[1,"search-displayable-article-wrapper","container"],[1,"row","search-displayable-article-content-wrapper"],[1,"col-md-3","col-4","search-displayable-article-image-wrapper"],[3,"href","target"],[1,"img-fluid",3,"src"],[1,"col-md-9","col-8"],[1,"display-5","search-displayable-article-text",3,"innerHTML"],[1,"search-displayable-article-highlight",3,"innerHTML"],[1,"search-displayable-article-date",3,"innerHTML"],[1,"d-flex","gap-2","search-displayable-article-fallback"],[1,"search-displayable-article-initial-letter-container"],[1,"search-displayable-article-initial-letter",3,"innerHtml"],[1,"search-displayable-article-text-container","pt-2"],[1,"display-5","search-displayable-article-text-fallback",3,"innerHTML"],[1,"search-displayable-article-highlight-fallback",3,"innerHTML"],[1,"search-displayable-article-date-fallback",3,"innerHTML"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,pE,12,14,"div",1)(2,WV,12,12,"div",1),o.k0s()),2&O&&(o.R7$(),o.vxM(F.imagePath?1:2))},dependencies:[a.Jj,vr,Ri],styles:[".search-displayable-article-wrapper[_ngcontent-%COMP%]{margin-bottom:3.5rem;max-width:100%}.search-displayable-article-content-wrapper[_ngcontent-%COMP%]{display:flex}.search-displayable-article-content-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}.search-displayable-article-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%}.search-displayable-article-text[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.search-displayable-article-highlight[_ngcontent-%COMP%], .search-displayable-article-date[_ngcontent-%COMP%], .search-displayable-article-date-fallback[_ngcontent-%COMP%]{font-size:1.2rem}@media (max-width: 768px){.search-displayable-article-highlight[_ngcontent-%COMP%], .search-displayable-article-date[_ngcontent-%COMP%], .search-displayable-article-date-fallback[_ngcontent-%COMP%]{font-size:1rem}}.search-displayable-article-text-fallback-container[_ngcontent-%COMP%]{height:95px;box-sizing:border-box;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}@media (max-width: 768px){.search-displayable-article-text-fallback-container[_ngcontent-%COMP%]{height:60px;-webkit-line-clamp:2}}.search-displayable-article-text-fallback-container[_ngcontent-%COMP%]   .search-displayable-article-text-fallback[_ngcontent-%COMP%], .search-displayable-article-text-fallback-container[_ngcontent-%COMP%]   .search-displayable-article-highlight-fallback[_ngcontent-%COMP%]{margin:0;text-overflow:ellipsis;text-decoration:none}.search-displayable-article-initial-letter-container[_ngcontent-%COMP%]{height:95px;display:flex;align-items:center;width:80px;justify-content:center}@media (max-width: 768px){.search-displayable-article-initial-letter-container[_ngcontent-%COMP%]{height:60px;width:45px;-webkit-line-clamp:2}}.search-displayable-article-initial-letter-container[_ngcontent-%COMP%]   .search-displayable-article-initial-letter[_ngcontent-%COMP%]{font-size:95px;font-family:var(--fontPrimary)}@media (max-width: 768px){.search-displayable-article-initial-letter-container[_ngcontent-%COMP%]   .search-displayable-article-initial-letter[_ngcontent-%COMP%]{font-size:60px}}.search-displayable-article-highlight-fallback[_ngcontent-%COMP%]{font-size:1.2rem;font-family:var(--fontPrimary)}@media (max-width: 768px){.search-displayable-article-highlight-fallback[_ngcontent-%COMP%]{font-size:1rem}}.search-displayable-article-text-fallback[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600}"]})}}return v})(),NL=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.imagePath="",this.referralLink="",this.scope=l.getScope()}ngOnInit(){this.deviceInfoService.getUserAgentInfo(),this.imagePath=this.data.imageUri,this.referralLink=this.scope.currentChapter.path+"/events/"+this.data.id}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-search-displayable-event"]],inputs:{data:"data"},decls:12,vars:10,consts:[[1,"search-displayable-event-wrapper","container"],[1,"row","search-displayable-event-content-wrapper"],[1,"col-md-3","col-4","search-displayable-event-image-wrapper"],[3,"href"],[1,"img-fluid",3,"src"],[1,"col-md-9","col-8"],[1,"search-displayable-event-date",3,"innerHTML"],[1,"display-5","search-displayable-event-title",3,"innerHTML"],[1,"search-displayable-event-overline",3,"innerHTML"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"a",3),o.nrm(4,"img",4),o.k0s()(),o.j41(5,"div",5)(6,"a",3),o.nrm(7,"div",6)(8,"h5",7),o.nI1(9,"apicodoTranslateText"),o.nI1(10,"async"),o.nrm(11,"div",8),o.k0s()()()()),2&O&&(o.R7$(3),o.Y8G("href",F.referralLink,o.B4B),o.R7$(),o.Y8G("src",F.imagePath,o.B4B),o.R7$(2),o.Y8G("href",F.referralLink,o.B4B),o.R7$(),o.Y8G("innerHTML",F.data.date,o.npT),o.R7$(),o.Y8G("innerHTML",o.bMT(10,8,o.bMT(9,6,F.data.title)),o.npT),o.R7$(3),o.Y8G("innerHTML",F.data.overline,o.npT))},dependencies:[a.Jj,vr],styles:[".search-displayable-event-wrapper[_ngcontent-%COMP%]{margin-bottom:3.5rem;max-width:100%}.search-displayable-event-content-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}.search-displayable-event-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%}.search-displayable-event-date[_ngcontent-%COMP%]{font-size:1.2rem}.search-displayable-event-title[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600}.search-displayable-event-overline[_ngcontent-%COMP%]{font-size:1.2rem}@media (max-width: 768px){.search-displayable-event-date[_ngcontent-%COMP%], .search-displayable-event-overline[_ngcontent-%COMP%]{font-size:1rem}}"]})}}return v})(),FL=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.imagePath="",this.referralLink="",this.scope=l.getScope()}ngOnInit(){this.imagePath=`${this.scope.globalSettings.blobStorageCdnUrl}/avatar/${this.data.avatarGuid}`,this.referralLink=this.scope.currentChapter.path+"/profile/"+this.data.guid}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-search-displayable-staffer"]],inputs:{data:"data"},decls:13,vars:13,consts:[[1,"search-displayable-staffer-wrapper","container"],[1,"row","search-displayable-staffer-content-wrapper"],[1,"col-md-3","col-4","search-displayable-staffer-image-wrapper"],[3,"href"],[1,"img-fluid",3,"src"],[1,"col-md-9","col-8"],[1,"display-5","search-displayable-staffer-name",3,"innerHTML"],[1,"search-displayable-staffer-about",3,"innerHTML"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"a",3),o.nrm(4,"img",4),o.k0s()(),o.j41(5,"div",5)(6,"a",3),o.nrm(7,"h5",6),o.nI1(8,"apicodoTranslateText"),o.nI1(9,"async"),o.nrm(10,"div",7),o.nI1(11,"apicodoTranslateText"),o.nI1(12,"async"),o.k0s()()()()),2&O&&(o.R7$(3),o.Y8G("href",F.referralLink,o.B4B),o.R7$(),o.Y8G("src",F.imagePath,o.B4B),o.R7$(2),o.Y8G("href",F.referralLink,o.B4B),o.R7$(),o.Y8G("innerHTML",o.bMT(9,7,o.bMT(8,5,F.data.firstName+" "+F.data.lastName)),o.npT),o.R7$(3),o.Y8G("innerHTML",o.bMT(12,11,o.bMT(11,9,F.data.about)),o.npT))},dependencies:[a.Jj,vr],styles:[".search-displayable-staffer-wrapper[_ngcontent-%COMP%]{margin-bottom:3.5rem;max-width:100%}.search-displayable-staffer-content-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}.search-displayable-staffer-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{border-radius:50%;overflow:hidden;object-fit:cover;width:100%}.search-displayable-staffer-name[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600}.search-displayable-staffer-about[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}"]})}}return v})();function CT(v,p){if(1&v&&(o.j41(0,"div",1)(1,"div",2)(2,"a",3),o.nrm(3,"img",4),o.k0s()(),o.j41(4,"div",5)(5,"div",6),o.nrm(6,"app-user-badge-simple",7),o.k0s(),o.j41(7,"a",3),o.nrm(8,"h5",8),o.nI1(9,"apicodoTranslateText"),o.nI1(10,"async"),o.nrm(11,"div",9),o.nI1(12,"relativeDate"),o.k0s()()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("href",l.referralLink,o.B4B),o.R7$(),o.Y8G("src",l.imagePath,o.B4B),o.R7$(3),o.Y8G("user",l.data.user)("author",!1),o.R7$(),o.Y8G("href",l.referralLink,o.B4B),o.R7$(),o.Y8G("innerHTML",o.bMT(10,9,o.bMT(9,7,l.data.text)),o.npT),o.R7$(3),o.Y8G("innerHTML",o.bMT(12,11,l.data.date),o.npT)}}function Xf(v,p){if(1&v&&(o.j41(0,"div",1)(1,"div",10),o.nrm(2,"app-user-badge-simple",7),o.k0s(),o.j41(3,"a",3),o.nrm(4,"h5",11),o.nI1(5,"apicodoTranslateText"),o.nI1(6,"async"),o.nrm(7,"div",12),o.nI1(8,"relativeDate"),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.Y8G("user",l.data.user)("author",!1),o.R7$(),o.Y8G("href",l.referralLink,o.B4B),o.R7$(),o.Y8G("innerHTML",o.bMT(6,7,o.bMT(5,5,l.data.text)),o.npT),o.R7$(3),o.Y8G("innerHTML",o.bMT(8,9,l.data.date),o.npT)}}let yT=(()=>{class v{constructor(l,O){this.scopeService=l,this.deviceInfoService=O,this.imagePath="",this.referralLink="",this.scope=l.getScope()}ngOnInit(){let l=this.scope.network.settings.configurations.enableHighQualityImage?"-hq":"",O=this.deviceInfoService.getUserAgentInfo().isMobile?"-sm":"",F=this.scope.globalSettings.blobStorageCdnUrl,se=this.data.assetReferences.filter(we=>null!=we.assetImage&&null==we.assetImage.deleted);if(se.length>0)if(null!=this.data.extendedConfigurations){let we=JSON.parse(this.data.extendedConfigurations);this.thumbnail=we.thumbnailGuid?se.find(We=>We.guid==we.thumbnailGuid):se?.reduce(function(We,gt){return new Date(We.published)<new Date(gt.published)?We:gt})}else this.thumbnail=se?.reduce(function(we,We){return new Date(we.published)<new Date(We.published)?we:We});this.thumbnail&&(this.imagePath=`${F}/images/${this.thumbnail.assetImage.guid}?preset=cover${l}${O}-4x3`),this.referralLink=this.scope.currentChapter.path+this.data.path}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-search-displayable-snip"]],inputs:{data:"data"},decls:3,vars:1,consts:[[1,"search-displayable-snip-wrapper","container"],[1,"row","search-displayable-snip-content-wrapper"],[1,"col-md-3","col-4","search-displayable-snip-image-wrapper"],[3,"href"],[1,"img-fluid",3,"src"],[1,"col-md-9","col-8"],[1,"search-displayable-snip-user-badge"],[3,"user","author"],[1,"display-5","search-displayable-snip-text",3,"innerHTML"],[1,"search-displayable-snip-date",3,"innerHTML"],[1,"search-displayable-snip-user-badge-fallback"],[1,"display-5","search-displayable-snip-text-fallback",3,"innerHTML"],[1,"search-displayable-snip-date-fallback",3,"innerHTML"]],template:function(O,F){1&O&&(o.j41(0,"div",0),o.DNE(1,CT,13,13,"div",1)(2,Xf,9,11,"div",1),o.k0s()),2&O&&(o.R7$(),o.vxM(F.imagePath?1:2))},dependencies:[Bc,a.Jj,vr,Ri],styles:[".search-displayable-snip-wrapper[_ngcontent-%COMP%]{margin-bottom:3.5rem;max-width:100%}.search-displayable-snip-content-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--textColor);text-decoration:none}.search-displayable-snip-image-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:4/3;overflow:hidden;object-fit:cover;width:100%}.search-displayable-snip-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-transform:uppercase;font-weight:600}.search-displayable-snip-date[_ngcontent-%COMP%]{font-size:1.2rem}.search-displayable-snip-user-badge-fallback[_ngcontent-%COMP%]{padding-left:20%;margin-bottom:.5rem}.search-displayable-snip-text-fallback[_ngcontent-%COMP%]{text-transform:uppercase;font-size:2.3rem;font-style:italic;font-weight:600}.search-displayable-snip-text-fallback[_ngcontent-%COMP%]:first-letter{float:left;font-size:6.5rem;margin-right:.8rem;margin-top:-.35em}@-moz-document url-prefix(){.search-displayable-snip-text-fallback:first-letter{margin-top:0!important}}.search-displayable-snip-date-fallback[_ngcontent-%COMP%]{padding-left:20%;margin-top:1rem;font-size:1.2rem}@media (max-width: 768px){.search-displayable-snip-date[_ngcontent-%COMP%], .search-displayable-snip-date-fallback[_ngcontent-%COMP%]{font-size:1rem}.search-displayable-snip-text-fallback[_ngcontent-%COMP%]{font-size:1.8rem}.search-displayable-snip-text-fallback[_ngcontent-%COMP%]:first-letter{font-size:4.2rem}}"]})}}return v})();function t_(v,p){if(1&v&&(o.j41(0,"div",10),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_search_noQueryPlaceholder")," ")}}function Sv(v,p){if(1&v&&(o.j41(0,"div",10),o.EFF(1),o.k0s()),2&v){const l=o.XpG();o.R7$(),o.SpI(" ",l.scope.currentScope.network.getResourceOrKeyName("web_search_noHits")," ")}}function n_(v,p){if(1&v&&o.nrm(0,"app-search-displayable-snip",12),2&v){const l=o.XpG().$implicit;o.Y8G("data",l.article)}}function iM(v,p){if(1&v&&o.nrm(0,"app-search-displayable-article",12),2&v){const l=o.XpG().$implicit;o.Y8G("data",l)}}function $V(v,p){1&v&&o.DNE(0,n_,1,1,"app-search-displayable-snip",12)(1,iM,1,1,"app-search-displayable-article",12),2&v&&o.vxM(4==p.$implicit.article.articleListDisplayableType?0:1)}function bz(v,p){1&v&&o.nrm(0,"app-search-displayable-event",12),2&v&&o.Y8G("data",p.$implicit)}function VL(v,p){1&v&&o.nrm(0,"app-search-displayable-staffer",12),2&v&&o.Y8G("data",p.$implicit)}function eb(v,p){if(1&v){const l=o.RV6();o.j41(0,"div",10),o.Z7z(1,$V,2,1,null,null,o.fX1),o.j41(3,"dx-button",11),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.loadArticles())}),o.EFF(4),o.k0s(),o.Z7z(5,bz,1,1,"app-search-displayable-event",12,o.fX1),o.Z7z(7,VL,1,1,"app-search-displayable-staffer",12,o.fX1),o.k0s()}if(2&v){const l=o.XpG();o.R7$(),o.Dyx(null==l.hits?null:l.hits.articles),o.R7$(2),o.Y8G("visible",(null==l.hits||null==l.hits.articles?null:l.hits.articles.length)<(null==l.hits?null:l.hits.total)),o.R7$(),o.SpI(" ",l.scope.currentScope.network.resources.web_common_showMore," "),o.R7$(),o.Dyx(l.eventHits),o.R7$(2),o.Dyx(l.staffDirectoryUserHits)}}let gE=(()=>{class v{constructor(l,O,F,se){this.translationService=l,this.searchService=O,this.scopeService=F,this.deviceInfoService=se,this.model={},this.searching=!1,this.isMobileView=!1,this.hasChapterGroups=!1,this.isStaffDirectoryEnabled=!1,this.isCalendarEnabled=!1,this.hasChapterIds=!1,this.hasQuery=!1,this.filtered=!1,this.searchValue="",this.search=(we,We)=>{var gt=this.scope.network.settings.configurations.apicodoTranslationSystemConfiguration?.MultilanguagueFeatureEnabled,Ft=this.scope.profile.activeUserLanguage,pn=this.scope.network.settings.languagePack.split("-")[0];Ft||(Ft={vendorLanguageCode:pn,nativeName:this.scope.network.getResourceOrKeyName("web_translation_use_original")}),1==gt&&Ft.vendorLanguageCode!=pn?this.translateSearchQuery(this.model.query).then(()=>{this.performSearch(we,We)}):(this.translatedValue=this.model.query,this.performSearch(we,We))},this.scope=F.getScope(),this.isMobileView=se.getUserAgentInfo().isMobile}ngOnInit(){this.model.query=new URLSearchParams(location.search).get("q"),this.hasChapterGroups=this.scope.currentScope.chapter.chapterGroups.length>0,this.isStaffDirectoryEnabled=this.scope.currentScope.network.settings.isStaffDirectoryEnabled,this.isCalendarEnabled=this.scope.currentScope.network.settings.configurations.enableCalendar,this.state=new URLSearchParams(location.search).get("searchFilter")||"all",this.search(null,null)}normaliseChapterIds(l){if(Array.isArray(l))return l;var O=[];return l&&O.push(l),O}extractRanges(l){return Object.keys(l).map(function(O){return{attribute_Id:O,from:l[O].from,until:l[O].until,ignoreYear:l[O].ignoreYear}})}performSearch(l,O){this.hits=null,this.state=l||new URLSearchParams(location.search).get("searchFilter");let F=new URLSearchParams(location.search).getAll("chapterIds"),se=new URLSearchParams(location.search).get("showAll");if(F=this.normaliseChapterIds(F),this.hasChapterIds=F.length>0,this.hasQuery=!1,this.model.query&&(this.hasQuery=this.model.query.length>0),!O&&(O={},new URLSearchParams(location.search).has("staffDirFilter"))){var we=JSON.parse(decodeURIComponent(new URLSearchParams(location.search).get("staffDirFilter")));we&&(we.datePickers&&(Object.entries(we.datePickers).forEach(We=>{if(We[1].from){var gt=new Date(We[1].from);We[1].from=gt}if(We[1].until){var Ft=new Date(We[1].until);We[1].until=Ft}}),we.attributeRanges=this.extractRanges(we.datePickers)),O=we)}if(this.filtered=F.length>0,!0===this.isStaffDirectoryEnabled||!0===this.isCalendarEnabled)switch(this.state){case"all":default:(F.length>0||this.translatedValue||se)&&(this.searching=!0,this.searchService.search(this.translatedValue,F).then(We=>{this.hits=We,this.searching=!1})),this.isStaffDirectoryEnabled&&this.searchService.getStaffDirectoryUsers(this.translatedValue,O.optionIds,O.booleanIds,O.attributeRanges,this.state).then(We=>{this.staffDirectoryUserHits=We}),this.isCalendarEnabled&&(F.length>0||this.translatedValue||se)&&this.searchService.getEvents(this.translatedValue,0,F).then(We=>{We.forEach(gt=>{gt.start=new Date(gt.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),gt.end=new Date(gt.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),gt.date=gt.start!==gt.end?`${gt.start} - ${gt.end}`:gt.start}),this.eventHits=We});break;case"staffs":this.hits=null,this.eventHits=null,this.searching=!0,this.searchService.getStaffDirectoryUsers(this.translatedValue,O.optionIds,O.booleanIds,O.attributeRanges,this.state).then(We=>{this.staffDirectoryUserHits=We,this.searching=!1});break;case"articles":(F.length>0||this.translatedValue||se)&&(this.searching=!0,this.searchService.search(this.translatedValue,F).then(We=>{this.hits=We,We||(this.hits=[]),this.searching=!1})),this.staffDirectoryUserHits=null,this.eventHits=null;break;case"events":this.hits=null,this.staffDirectoryUserHits=null,(F.length>0||this.translatedValue||se)&&(this.searching=!0,this.searchService.getEvents(this.translatedValue,0,F).then(We=>{We.forEach(gt=>{gt.start=new Date(gt.start).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),gt.end=new Date(gt.end).toLocaleDateString([],{weekday:"short",day:"2-digit",month:"long",year:"numeric"}),gt.date=gt.start!==gt.end?`${gt.start} - ${gt.end}`:gt.start}),this.eventHits=We,this.searching=!1}))}else F.length>0||this.translatedValue||se?(this.searching=!0,this.searchService.search(this.translatedValue,F).then(We=>{this.hits=We,this.searching=!1}),this.staffDirectoryUserHits=[],this.eventHits=[]):(this.hits=null,this.staffDirectoryUserHits=null,this.eventHits=null);if(this.model.query)if(location.search){let We=new URLSearchParams(location.search).get("q");if(We){let gt=decodeURIComponent(location.search).replace("q="+We,"q="+this.model.query);window.history.pushState("","",`search${gt}`)}else window.history.pushState("","",`search${location.search}&q=${this.model.query}`)}else window.history.pushState("","",`search?q=${this.model.query}`)}filtering(l){this.state=l.state,1==l.shouldResetSearch&&(this.translatedValue=null)}loadArticles(){let l=new URLSearchParams(location.search).getAll("chapterIds");l&&(l=this.normaliseChapterIds(l),this.hasChapterIds=l.length>0,this.searchService.getArticles(this.translatedValue,this.hits.articles.length/10,l).then(O=>{this.hits.articles=this.hits.articles.concat(O)}))}translateSearchQuery(l){return new Promise((O,F)=>{this.translationService.translateToOrigin([l]).then(we=>{this.translatedValue=we[0].translation,O()})})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Ei.M),o.rXU(qx),o.rXU(b.A),o.rXU(s.E))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-search"]],decls:14,vars:9,consts:[[1,"container","search-component-wrapper"],[1,"search-title"],[1,"row","search-text-box-wrapper"],[1,"col-7"],["stylingMode","underlined",1,"search-text-box",3,"textChange","onEnterKey","placeholder","text","showClearButton"],[1,"col-5","search-text-box-icon-wrapper"],[1,"search-text-box-divider"],["stylingMode","text",1,"search-text-box-icon",3,"onClick","icon","disabled"],[1,"row","search-filter-wrapper"],[3,"searchCallback"],[1,"row"],["width","100%","icon","chevrondown","stylingMode","text",1,"load-more",3,"onClick","visible"],[3,"data"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"div",1),o.EFF(2),o.k0s(),o.j41(3,"div",2)(4,"div",3)(5,"dx-text-box",4),o.mxI("textChange",function(we){return o.DH7(F.model.query,we)||(F.model.query=we),we}),o.bIt("onEnterKey",function(){return F.search(null,null)}),o.k0s()(),o.j41(6,"div",5),o.nrm(7,"div",6),o.j41(8,"dx-button",7),o.bIt("onClick",function(){return F.search(null,null)}),o.k0s()()(),o.j41(9,"div",8),o.nrm(10,"app-search-filter",9),o.k0s(),o.DNE(11,t_,2,1,"div",10)(12,Sv,2,1,"div",10)(13,eb,9,2,"div",10),o.k0s()),2&O&&(o.R7$(2),o.SpI(" ",F.scope.currentScope.network.getResourceOrKeyName("web_searchMeta_textPlaceholder")," "),o.R7$(3),o.FS9("placeholder",F.scope.currentScope.network.getResourceOrKeyName("web_searchMeta_textPlaceholder")),o.R50("text",F.model.query),o.Y8G("showClearButton",!0),o.R7$(3),o.FS9("icon",F.searching?"fa-solid fa-spinner fa-spin-pulse":"fa-solid fa-magnifying-glass"),o.Y8G("disabled",F.searching),o.R7$(2),o.Y8G("searchCallback",F.search),o.R7$(),o.vxM(F.hasQuery||F.hasChapterIds||F.hits&&0!=(null==F.hits?null:F.hits.total)||F.staffDirectoryUserHits&&0!=(null==F.staffDirectoryUserHits?null:F.staffDirectoryUserHits.length)||F.eventHits&&0!=(null==F.eventHits?null:F.eventHits.length)||F.searching?-1:11),o.R7$(),o.vxM(F.hits&&0!=F.hits.total||F.staffDirectoryUserHits&&0!=(null==F.staffDirectoryUserHits?null:F.staffDirectoryUserHits.length)||F.eventHits&&0!=(null==F.eventHits?null:F.eventHits.length)||!F.hasQuery&&!F.hasChapterIds||F.searching?13:12))},dependencies:[Hi.e,Ti.m,qy,nM,NL,FL,yT],styles:[".search-component-wrapper[_ngcontent-%COMP%]{max-width:var(--designContentWidth);width:100%}.search-title[_ngcontent-%COMP%]{font-size:3rem;font-weight:700;margin:2rem 0}.search-text-box-wrapper[_ngcontent-%COMP%]{margin-bottom:3rem}.search-text-box[_ngcontent-%COMP%]     .dx-texteditor-input, .search-text-box[_ngcontent-%COMP%]     .dx-placeholder{font-size:1.5rem}.search-text-box-icon-wrapper[_ngcontent-%COMP%]{display:flex;padding-left:0}.search-text-box-divider[_ngcontent-%COMP%]{height:100%;width:.063rem;background-color:var(--textColor)}.search-text-box-icon[_ngcontent-%COMP%]{margin-left:.313rem}.search-text-box-icon[_ngcontent-%COMP%]     i{font-size:1.5rem}.search-filter-wrapper[_ngcontent-%COMP%]{margin-bottom:3rem}@media (max-width: 768px){.search-title[_ngcontent-%COMP%]{font-size:2rem;margin-top:2.5rem}.search-text-box-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}.search-text-box[_ngcontent-%COMP%]     .dx-texteditor-input, .search-text-box[_ngcontent-%COMP%]     .dx-placeholder{font-size:1.25rem}.search-text-box-icon[_ngcontent-%COMP%]     i{font-size:1.25rem}.search-filter-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.load-more[_ngcontent-%COMP%]{color:var(--textColor);font-weight:600;font-size:1.8rem;height:2.5rem}@media (max-width: 768px){.load-more[_ngcontent-%COMP%]{font-size:1rem;height:2rem}}"]})}}return v})();function n0(v,p){if(1&v&&(o.j41(0,"dxi-item",5),o.nrm(1,"dxo-label",7)(2,"dxi-validation-rule",10)(3,"dxi-validation-rule",11),o.k0s()),2&v){const l=o.XpG(2);o.R7$(),o.Y8G("text",l.scope.network.getResourceOrKeyName("web_feedback_emailPlaceholder")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_user_emailError")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_user_emailError"))}}function bT(v,p){if(1&v){const l=o.RV6();o.DNE(0,n0,4,3,"dxi-item",5),o.j41(1,"dxi-item",6),o.nrm(2,"dxo-label",7)(3,"dxi-validation-rule",8),o.k0s(),o.j41(4,"dxi-item")(5,"dx-button",9),o.bIt("onClick",function(){o.eBV(l);const F=o.XpG();return o.Njj(F.submit())}),o.EFF(6),o.k0s()()}if(2&v){const l=o.XpG();o.vxM(l.showEmail?0:-1),o.R7$(2),o.Y8G("text",l.scope.network.getResourceOrKeyName("web_feedback_textPlaceholder")),o.R7$(),o.Y8G("message",l.scope.network.getResourceOrKeyName("web_feedback_textError")),o.R7$(3),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_feedback_send"))}}function xT(v,p){1&v&&o.nrm(0,"dxi-item",3)}function fE(v,p){if(1&v&&(o.j41(0,"div")(1,"p",12),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.JRh(l.scope.currentScope.network.getResourceOrKeyName("web_feedback_sendSuccess"))}}function mE(v,p){if(1&v&&(o.j41(0,"div")(1,"p",13),o.EFF(2),o.k0s()()),2&v){const l=o.XpG();o.R7$(2),o.SpI(" ",l.scope.currentScope.network.resources.web_feedback_description_0," ")}}let _E=(()=>{class v{constructor(l,O){this.profileService=l,this.scopeService=O,this.feedback={description:"",email:""},this.showEmail=!1,this.success=!1,this.scope=this.scopeService.getScope()}ngOnInit(){this.profileService.getProfile(!0).then(l=>{l.isRegistered||(this.showEmail=!0)})}submit(){this.form.instance.validate().isValid&&this.feedback.description.length>0&&this.profileService.insertFeedback(this.feedback).then(l=>{this.success=!0})}static{this.\u0275fac=function(O){return new(O||v)(o.rXU(Co.p),o.rXU(b.A))}}static{this.\u0275cmp=o.VBU({type:v,selectors:[["app-feedback"]],viewQuery:function(O,F){if(1&O&&o.GBs(xo.o,5),2&O){let se;o.mGM(se=o.lsd())&&(F.form=se.first)}},decls:7,vars:4,consts:[[1,"feedback-base"],["id","form","labelMode","floating",3,"formDataChange","formData"],["template","feedbackDescription"],["template","feedbackSuccess"],[4,"dxTemplate","dxTemplateOf"],["dataField","email","editorType","dxTextBox"],["dataField","description","editorType","dxTextArea"],[1,"text",3,"text"],["id","signUpError","type","required",3,"message"],[3,"onClick"],["type","email",3,"message"],["type","required",3,"message"],[1,"alert","alert-success","text"],[1,"text"]],template:function(O,F){1&O&&(o.j41(0,"div",0)(1,"dx-form",1),o.mxI("formDataChange",function(we){return o.DH7(F.feedback,we)||(F.feedback=we),we}),o.nrm(2,"dxi-item",2),o.DNE(3,bT,7,4)(4,xT,1,0,"dxi-item",3)(5,fE,3,1,"div",4)(6,mE,3,1,"div",4),o.k0s()()),2&O&&(o.R7$(),o.R50("formData",F.feedback),o.R7$(2),o.vxM(F.success?4:3),o.R7$(2),o.Y8G("dxTemplateOf","feedbackSuccess"),o.R7$(),o.Y8G("dxTemplateOf","feedbackDescription"))},dependencies:[mn.CVf,Rt.eC,mn.rkl,Hi.e,mn.Inh,xo.o],styles:[".feedback-base[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:1rem}"]})}}return v})();const ef=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class i_{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(p){const l=[],O=(gt,Ft)=>{Ft.notSelectors.length>0&&!Ft.element&&0==Ft.classNames.length&&0==Ft.attrs.length&&(Ft.element="*"),gt.push(Ft)};let se,F=new i_,we=F,We=!1;for(ef.lastIndex=0;se=ef.exec(p);){if(se[1]){if(We)throw new Error("Nesting :not in a selector is not allowed");We=!0,we=new i_,F.notSelectors.push(we)}const gt=se[2];if(gt){const pn=se[3];"#"===pn?we.addAttribute("id",gt.slice(1)):"."===pn?we.addClassName(gt.slice(1)):we.setElement(gt)}const Ft=se[4];if(Ft&&we.addAttribute(we.unescapeAttribute(Ft),se[6]),se[7]&&(We=!1,we=F),se[8]){if(We)throw new Error("Multiple selectors in :not are not supported");O(l,F),F=we=new i_}}return O(l,F),l}unescapeAttribute(p){let l="",O=!1;for(let F=0;F<p.length;F++){const se=p.charAt(F);if("\\"!==se){if("$"===se&&!O)throw new Error(`Error in attribute selector "${p}". Unescaped "$" is not supported. Please escape with "\\$".`);O=!1,l+=se}else O=!0}return l}escapeAttribute(p){return p.replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(p=null){this.element=p}getAttrs(){const p=[];return this.classNames.length>0&&p.push("class",this.classNames.join(" ")),p.concat(this.attrs)}addAttribute(p,l=""){this.attrs.push(p,l&&l.toLowerCase()||"")}addClassName(p){this.classNames.push(p.toLowerCase())}toString(){let p=this.element||"";if(this.classNames&&this.classNames.forEach(l=>p+=`.${l}`),this.attrs)for(let l=0;l<this.attrs.length;l+=2){const O=this.escapeAttribute(this.attrs[l]),F=this.attrs[l+1];p+=`[${O}${F?"="+F:""}]`}return this.notSelectors.forEach(l=>p+=`:not(${l})`),p}}class tf{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(p){const l=new tf;return l.addSelectables(p,null),l}addSelectables(p,l){let O=null;p.length>1&&(O=new vE(p),this._listContexts.push(O));for(let F=0;F<p.length;F++)this._addSelectable(p[F],l,O)}_addSelectable(p,l,O){let F=this;const se=p.element,we=p.classNames,We=p.attrs,gt=new HC(p,l,O);if(se&&(0===We.length&&0===we.length?this._addTerminal(F._elementMap,se,gt):F=this._addPartial(F._elementPartialMap,se)),we)for(let Ft=0;Ft<we.length;Ft++){const fi=we[Ft];0===We.length&&Ft===we.length-1?this._addTerminal(F._classMap,fi,gt):F=this._addPartial(F._classPartialMap,fi)}if(We)for(let Ft=0;Ft<We.length;Ft+=2){const fi=We[Ft],_o=We[Ft+1];if(Ft===We.length-2){const Po=F._attrValueMap;let Ro=Po.get(fi);Ro||(Ro=new Map,Po.set(fi,Ro)),this._addTerminal(Ro,_o,gt)}else{const Po=F._attrValuePartialMap;let Ro=Po.get(fi);Ro||(Ro=new Map,Po.set(fi,Ro)),F=this._addPartial(Ro,_o)}}}_addTerminal(p,l,O){let F=p.get(l);F||(F=[],p.set(l,F)),F.push(O)}_addPartial(p,l){let O=p.get(l);return O||(O=new tf,p.set(l,O)),O}match(p,l){let O=!1;const F=p.element,se=p.classNames,we=p.attrs;for(let We=0;We<this._listContexts.length;We++)this._listContexts[We].alreadyMatched=!1;if(O=this._matchTerminal(this._elementMap,F,p,l)||O,O=this._matchPartial(this._elementPartialMap,F,p,l)||O,se)for(let We=0;We<se.length;We++){const gt=se[We];O=this._matchTerminal(this._classMap,gt,p,l)||O,O=this._matchPartial(this._classPartialMap,gt,p,l)||O}if(we)for(let We=0;We<we.length;We+=2){const gt=we[We],Ft=we[We+1],pn=this._attrValueMap.get(gt);Ft&&(O=this._matchTerminal(pn,"",p,l)||O),O=this._matchTerminal(pn,Ft,p,l)||O;const fi=this._attrValuePartialMap.get(gt);Ft&&(O=this._matchPartial(fi,"",p,l)||O),O=this._matchPartial(fi,Ft,p,l)||O}return O}_matchTerminal(p,l,O,F){if(!p||"string"!=typeof l)return!1;let se=p.get(l)||[];const we=p.get("*");if(we&&(se=se.concat(we)),0===se.length)return!1;let We,gt=!1;for(let Ft=0;Ft<se.length;Ft++)We=se[Ft],gt=We.finalize(O,F)||gt;return gt}_matchPartial(p,l,O,F){if(!p||"string"!=typeof l)return!1;const se=p.get(l);return!!se&&se.match(O,F)}}class vE{constructor(p){this.selectors=p,this.alreadyMatched=!1}}class HC{constructor(p,l,O){this.selector=p,this.cbContext=l,this.listContext=O,this.notSelectors=p.notSelectors}finalize(p,l){let O=!0;return this.notSelectors.length>0&&(!this.listContext||!this.listContext.alreadyMatched)&&(O=!tf.createNotMatcher(this.notSelectors).match(p,null)),O&&l&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),l(this.selector,this.cbContext)),O}}var Uu=function(v){return v[v.Emulated=0]="Emulated",v[v.None=2]="None",v[v.ShadowDom=3]="ShadowDom",v}(Uu||{}),tb=function(v){return v[v.OnPush=0]="OnPush",v[v.Default=1]="Default",v}(tb||{}),nb=function(v){return v[v.None=0]="None",v[v.SignalBased=1]="SignalBased",v[v.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",v}(nb||{});const o0_name="custom-elements",Ev_name="no-errors-schema";var Ml=function(v){return v[v.NONE=0]="NONE",v[v.HTML=1]="HTML",v[v.STYLE=2]="STYLE",v[v.SCRIPT=3]="SCRIPT",v[v.URL=4]="URL",v[v.RESOURCE_URL=5]="RESOURCE_URL",v}(Ml||{});function wc(v){const p=function jV(v){const p=v.classNames&&v.classNames.length?[8,...v.classNames]:[];return[v.element&&"*"!==v.element?v.element:"",...v.attrs,...p]}(v),l=v.notSelectors&&v.notSelectors.length?v.notSelectors.map(O=>function yE(v){const p=v.classNames&&v.classNames.length?[8,...v.classNames]:[];return v.element?[5,v.element,...v.attrs,...p]:v.attrs.length?[3,...v.attrs,...p]:v.classNames&&v.classNames.length?[9,...v.classNames]:[]}(O)):[];return p.concat(...l)}function rb(v){return v?i_.parse(v).map(wc):[]}let r0;function HL(v){const p=new sb;return cM(v.nodes.map(O=>O.visit(p,null)).join(""),v.meaning)}class ST{visitText(p,l){return p.value}visitContainer(p,l){return`[${p.children.map(O=>O.visit(this)).join(", ")}]`}visitIcu(p,l){const O=Object.keys(p.cases).map(F=>`${F} {${p.cases[F].visit(this)}}`);return`{${p.expression}, ${p.type}, ${O.join(", ")}}`}visitTagPlaceholder(p,l){return p.isVoid?`<ph tag name="${p.startName}"/>`:`<ph tag name="${p.startName}">${p.children.map(O=>O.visit(this)).join(", ")}</ph name="${p.closeName}">`}visitPlaceholder(p,l){return p.value?`<ph name="${p.name}">${p.value}</ph>`:`<ph name="${p.name}"/>`}visitIcuPlaceholder(p,l){return`<ph icu name="${p.name}">${p.value.visit(this)}</ph>`}visitBlockPlaceholder(p,l){return`<ph block name="${p.startName}">${p.children.map(O=>O.visit(this)).join(", ")}</ph name="${p.closeName}">`}}const UL=new ST;class sb extends ST{visitIcu(p,l){let O=Object.keys(p.cases).map(F=>`${F} {${p.cases[F].visit(this)}}`);return`{${p.type}, ${O.join(", ")}}`}}function o_(v){return(v>>>0).toString(16).padStart(8,"0")}function ET(v,p,l,O){return v<20?[p&l|~p&O,1518500249]:v<40?[p^l^O,1859775393]:v<60?[p&l|p&O|l&O,2400959708]:[p^l^O,3395469782]}function zL(v){r0??=new TextEncoder;const p=r0.encode(v),l=new DataView(p.buffer,p.byteOffset,p.byteLength);let O=OT(l,p.length,0),F=OT(l,p.length,102072);return 0==O&&(0==F||1==F)&&(O^=319790063,F^=-1801410264),BigInt.asUintN(32,BigInt(O))<<BigInt(32)|BigInt.asUintN(32,BigInt(F))}function cM(v,p=""){let l=zL(v);return p&&(l=BigInt.asUintN(64,l<<BigInt(1))|l>>BigInt(63)&BigInt(1),l+=zL(p)),BigInt.asUintN(63,l).toString()}function OT(v,p,l){let O=2654435769,F=2654435769,se=0;const we=p-12;for(;se<=we;se+=12){O+=v.getUint32(se,!0),F+=v.getUint32(se+4,!0);const gt=Yf(O,F,l+=v.getUint32(se+8,!0));O=gt[0],F=gt[1],l=gt[2]}const We=p-se;return l+=p,We>=4?(O+=v.getUint32(se,!0),se+=4,We>=8?(F+=v.getUint32(se,!0),se+=4,We>=9&&(l+=v.getUint8(se++)<<8),We>=10&&(l+=v.getUint8(se++)<<16),11===We&&(l+=v.getUint8(se++)<<24)):(We>=5&&(F+=v.getUint8(se++)),We>=6&&(F+=v.getUint8(se++)<<8),7===We&&(F+=v.getUint8(se++)<<16))):(We>=1&&(O+=v.getUint8(se++)),We>=2&&(O+=v.getUint8(se++)<<8),3===We&&(O+=v.getUint8(se++)<<16)),Yf(O,F,l)[2]}function Yf(v,p,l){return v-=p,v-=l,p-=l,p-=v^=l>>>13,l-=v,l-=p^=v<<8,v-=p,v-=l^=p>>>13,p-=l,p-=v^=l>>>12,l-=v,l-=p^=v<<16,v-=p,v-=l^=p>>>5,p-=l,p-=v^=l>>>3,l-=v,l-=p^=v<<10,[v,p,l^=p>>>15]}var wT=function(v){return v[v.Little=0]="Little",v[v.Big=1]="Big",v}(wT||{});function ab(v,p){return function GL(v,p){const l=(65535&v)+(65535&p),O=(v>>>16)+(p>>>16)+(l>>>16);return[O>>>16,O<<16|65535&l]}(v,p)[1]}function TT(v,p){return v<<p|v>>>32-p}function lu(v,p){return p>=v.length?0:v[p]}function UC(v,p,l){let O=0;if(l===wT.Big)for(let F=0;F<4;F++)O+=lu(v,p+F)<<24-8*F;else for(let F=0;F<4;F++)O+=lu(v,p+F)<<8*F;return O}var zC=function(v){return v[v.None=0]="None",v[v.Const=1]="Const",v}(zC||{});class og{constructor(p=zC.None){this.modifiers=p}hasModifier(p){return!!(this.modifiers&p)}}var Kc=function(v){return v[v.Dynamic=0]="Dynamic",v[v.Bool=1]="Bool",v[v.String=2]="String",v[v.Int=3]="Int",v[v.Number=4]="Number",v[v.Function=5]="Function",v[v.Inferred=6]="Inferred",v[v.None=7]="None",v}(Kc||{});class rg extends og{constructor(p,l){super(l),this.name=p}visitType(p,l){return p.visitBuiltinType(this,l)}}class Zf extends og{constructor(p,l,O=null){super(l),this.value=p,this.typeParams=O}visitType(p,l){return p.visitExpressionType(this,l)}}const rf=new rg(Kc.Dynamic),sg=new rg(Kc.Inferred),lb=new rg(Kc.Bool),Qf=(new rg(Kc.Int),new rg(Kc.Number)),cb=new rg(Kc.String),Jf=(new rg(Kc.Function),new rg(Kc.None));var wv=function(v){return v[v.Minus=0]="Minus",v[v.Plus=1]="Plus",v}(wv||{}),hs=function(v){return v[v.Equals=0]="Equals",v[v.NotEquals=1]="NotEquals",v[v.Identical=2]="Identical",v[v.NotIdentical=3]="NotIdentical",v[v.Minus=4]="Minus",v[v.Plus=5]="Plus",v[v.Divide=6]="Divide",v[v.Multiply=7]="Multiply",v[v.Modulo=8]="Modulo",v[v.And=9]="And",v[v.Or=10]="Or",v[v.BitwiseOr=11]="BitwiseOr",v[v.BitwiseAnd=12]="BitwiseAnd",v[v.Lower=13]="Lower",v[v.LowerEquals=14]="LowerEquals",v[v.Bigger=15]="Bigger",v[v.BiggerEquals=16]="BiggerEquals",v[v.NullishCoalesce=17]="NullishCoalesce",v}(hs||{});function hM(v,p,l){const O=v.length;if(O!==p.length)return!1;for(let F=0;F<O;F++)if(!l(v[F],p[F]))return!1;return!0}function cu(v,p){return hM(v,p,(l,O)=>l.isEquivalent(O))}class $a{constructor(p,l){this.type=p||null,this.sourceSpan=l||null}prop(p,l){return new du(this,p,null,l)}key(p,l,O){return new ag(this,p,l,O)}callFn(p,l,O){return new _c(this,p,null,l,O)}instantiate(p,l,O){return new Ud(this,p,l,O)}conditional(p,l=null,O){return new Mh(this,p,l,null,O)}equals(p,l){return new Ua(hs.Equals,this,p,null,l)}notEquals(p,l){return new Ua(hs.NotEquals,this,p,null,l)}identical(p,l){return new Ua(hs.Identical,this,p,null,l)}notIdentical(p,l){return new Ua(hs.NotIdentical,this,p,null,l)}minus(p,l){return new Ua(hs.Minus,this,p,null,l)}plus(p,l){return new Ua(hs.Plus,this,p,null,l)}divide(p,l){return new Ua(hs.Divide,this,p,null,l)}multiply(p,l){return new Ua(hs.Multiply,this,p,null,l)}modulo(p,l){return new Ua(hs.Modulo,this,p,null,l)}and(p,l){return new Ua(hs.And,this,p,null,l)}bitwiseOr(p,l,O=!0){return new Ua(hs.BitwiseOr,this,p,null,l,O)}bitwiseAnd(p,l,O=!0){return new Ua(hs.BitwiseAnd,this,p,null,l,O)}or(p,l){return new Ua(hs.Or,this,p,null,l)}lower(p,l){return new Ua(hs.Lower,this,p,null,l)}lowerEquals(p,l){return new Ua(hs.LowerEquals,this,p,null,l)}bigger(p,l){return new Ua(hs.Bigger,this,p,null,l)}biggerEquals(p,l){return new Ua(hs.BiggerEquals,this,p,null,l)}isBlank(p){return this.equals(tm,p)}nullishCoalesce(p,l){return new Ua(hs.NullishCoalesce,this,p,null,l)}toStmt(){return new hu(this,null)}}class ch extends $a{constructor(p,l,O){super(l,O),this.name=p}isEquivalent(p){return p instanceof ch&&this.name===p.name}isConstant(){return!1}visitExpression(p,l){return p.visitReadVarExpr(this,l)}clone(){return new ch(this.name,this.type,this.sourceSpan)}set(p){return new mp(this.name,p,null,this.sourceSpan)}}class af extends $a{constructor(p,l,O){super(l,O),this.expr=p}visitExpression(p,l){return p.visitTypeofExpr(this,l)}isEquivalent(p){return p instanceof af&&p.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new af(this.expr.clone())}}class Da extends $a{constructor(p,l,O){super(l,O),this.node=p}isEquivalent(p){return p instanceof Da&&this.node===p.node}isConstant(){return!1}visitExpression(p,l){return p.visitWrappedNodeExpr(this,l)}clone(){return new Da(this.node,this.type,this.sourceSpan)}}class mp extends $a{constructor(p,l,O,F){super(O||l.type,F),this.name=p,this.value=l}isEquivalent(p){return p instanceof mp&&this.name===p.name&&this.value.isEquivalent(p.value)}isConstant(){return!1}visitExpression(p,l){return p.visitWriteVarExpr(this,l)}clone(){return new mp(this.name,this.value.clone(),this.type,this.sourceSpan)}toDeclStmt(p,l){return new Rl(this.name,this.value,p,l,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(sg,Xc.Final)}}class r_ extends $a{constructor(p,l,O,F,se){super(F||O.type,se),this.receiver=p,this.index=l,this.value=O}isEquivalent(p){return p instanceof r_&&this.receiver.isEquivalent(p.receiver)&&this.index.isEquivalent(p.index)&&this.value.isEquivalent(p.value)}isConstant(){return!1}visitExpression(p,l){return p.visitWriteKeyExpr(this,l)}clone(){return new r_(this.receiver.clone(),this.index.clone(),this.value.clone(),this.type,this.sourceSpan)}}class s_ extends $a{constructor(p,l,O,F,se){super(F||O.type,se),this.receiver=p,this.name=l,this.value=O}isEquivalent(p){return p instanceof s_&&this.receiver.isEquivalent(p.receiver)&&this.name===p.name&&this.value.isEquivalent(p.value)}isConstant(){return!1}visitExpression(p,l){return p.visitWritePropExpr(this,l)}clone(){return new s_(this.receiver.clone(),this.name,this.value.clone(),this.type,this.sourceSpan)}}class _c extends $a{constructor(p,l,O,F,se=!1){super(O,F),this.fn=p,this.args=l,this.pure=se}get receiver(){return this.fn}isEquivalent(p){return p instanceof _c&&this.fn.isEquivalent(p.fn)&&cu(this.args,p.args)&&this.pure===p.pure}isConstant(){return!1}visitExpression(p,l){return p.visitInvokeFunctionExpr(this,l)}clone(){return new _c(this.fn.clone(),this.args.map(p=>p.clone()),this.type,this.sourceSpan,this.pure)}}class Tv extends $a{constructor(p,l,O,F){super(O,F),this.tag=p,this.template=l}isEquivalent(p){return p instanceof Tv&&this.tag.isEquivalent(p.tag)&&hM(this.template.elements,p.template.elements,(l,O)=>l.text===O.text)&&cu(this.template.expressions,p.template.expressions)}isConstant(){return!1}visitExpression(p,l){return p.visitTaggedTemplateExpr(this,l)}clone(){return new Tv(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}}class Ud extends $a{constructor(p,l,O,F){super(O,F),this.classExpr=p,this.args=l}isEquivalent(p){return p instanceof Ud&&this.classExpr.isEquivalent(p.classExpr)&&cu(this.args,p.args)}isConstant(){return!1}visitExpression(p,l){return p.visitInstantiateExpr(this,l)}clone(){return new Ud(this.classExpr.clone(),this.args.map(p=>p.clone()),this.type,this.sourceSpan)}}class fd extends $a{constructor(p,l,O){super(l,O),this.value=p}isEquivalent(p){return p instanceof fd&&this.value===p.value}isConstant(){return!0}visitExpression(p,l){return p.visitLiteralExpr(this,l)}clone(){return new fd(this.value,this.type,this.sourceSpan)}}class a_{constructor(p,l){this.elements=p,this.expressions=l}clone(){return new a_(this.elements.map(p=>p.clone()),this.expressions.map(p=>p.clone()))}}class zd{constructor(p,l,O){this.text=p,this.sourceSpan=l,this.rawText=O??l?.toString()??hb(s0(p))}clone(){return new zd(this.text,this.sourceSpan,this.rawText)}}class db{constructor(p,l){this.text=p,this.sourceSpan=l}}class ub{constructor(p,l,O){this.text=p,this.sourceSpan=l,this.associatedMessage=O}}class GC extends $a{constructor(p,l,O,F,se){super(cb,se),this.metaBlock=p,this.messageParts=l,this.placeHolderNames=O,this.expressions=F}isEquivalent(p){return!1}isConstant(){return!1}visitExpression(p,l){return p.visitLocalizedString(this,l)}clone(){return new GC(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(p=>p.clone()),this.sourceSpan)}serializeI18nHead(){let p=this.metaBlock.description||"";return this.metaBlock.meaning&&(p=`${this.metaBlock.meaning}|${p}`),this.metaBlock.customId&&(p=`${p}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(l=>{p=`${p}\u241f${l}`}),IT(p,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(p){return this.messageParts[p]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(p){return this.placeHolderNames[p]?.sourceSpan??this.expressions[p]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(p){const l=this.placeHolderNames[p-1],O=this.messageParts[p];let F=l.text;return 0===l.associatedMessage?.legacyIds.length&&(F+=`@@${cM(l.associatedMessage.messageString,l.associatedMessage.meaning)}`),IT(F,O.text,this.getMessagePartSourceSpan(p))}}const s0=v=>v.replace(/\\/g,"\\\\"),xE=v=>v.replace(/^:/,"\\:"),WL=v=>v.replace(/:/g,"\\:"),hb=v=>v.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function IT(v,p,l){return""===v?{cooked:p,raw:hb(xE(s0(p))),range:l}:{cooked:`:${v}:${p}`,raw:hb(`:${WL(s0(v))}:${s0(p)}`),range:l}}class qf extends $a{constructor(p,l,O=null,F){super(l,F),this.value=p,this.typeParams=O}isEquivalent(p){return p instanceof qf&&this.value.name===p.value.name&&this.value.moduleName===p.value.moduleName&&this.value.runtime===p.value.runtime}isConstant(){return!1}visitExpression(p,l){return p.visitExternalExpr(this,l)}clone(){return new qf(this.value,this.type,this.typeParams,this.sourceSpan)}}class Mh extends $a{constructor(p,l,O=null,F,se){super(F||l.type,se),this.condition=p,this.falseCase=O,this.trueCase=l}isEquivalent(p){return p instanceof Mh&&this.condition.isEquivalent(p.condition)&&this.trueCase.isEquivalent(p.trueCase)&&function DT(v,p){return null==v||null==p?v==p:v.isEquivalent(p)}(this.falseCase,p.falseCase)}isConstant(){return!1}visitExpression(p,l){return p.visitConditionalExpr(this,l)}clone(){return new Mh(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}}class pb extends $a{constructor(p,l){super(lb,l),this.condition=p}isEquivalent(p){return p instanceof pb&&this.condition.isEquivalent(p.condition)}isConstant(){return!1}visitExpression(p,l){return p.visitNotExpr(this,l)}clone(){return new pb(this.condition.clone(),this.sourceSpan)}}class vc{constructor(p,l=null){this.name=p,this.type=l}isEquivalent(p){return this.name===p.name}clone(){return new vc(this.name,this.type)}}class Rh extends $a{constructor(p,l,O,F,se){super(O,F),this.params=p,this.statements=l,this.name=se}isEquivalent(p){return(p instanceof Rh||p instanceof Gd)&&cu(this.params,p.params)&&cu(this.statements,p.statements)}isConstant(){return!1}visitExpression(p,l){return p.visitFunctionExpr(this,l)}toDeclStmt(p,l){return new Gd(p,this.params,this.statements,this.type,l,this.sourceSpan)}clone(){return new Rh(this.params.map(p=>p.clone()),this.statements,this.type,this.sourceSpan,this.name)}}class c_ extends $a{constructor(p,l,O,F){super(O,F),this.params=p,this.body=l}isEquivalent(p){return!!(p instanceof c_&&cu(this.params,p.params))&&(this.body instanceof $a&&p.body instanceof $a?this.body.isEquivalent(p.body):!(!Array.isArray(this.body)||!Array.isArray(p.body))&&cu(this.body,p.body))}isConstant(){return!1}visitExpression(p,l){return p.visitArrowFunctionExpr(this,l)}clone(){return new c_(this.params.map(p=>p.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(p,l){return new Rl(p,this,sg,l,this.sourceSpan)}}class d_ extends $a{constructor(p,l,O,F,se=!0){super(O||Qf,F),this.operator=p,this.expr=l,this.parens=se}isEquivalent(p){return p instanceof d_&&this.operator===p.operator&&this.expr.isEquivalent(p.expr)}isConstant(){return!1}visitExpression(p,l){return p.visitUnaryOperatorExpr(this,l)}clone(){return new d_(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}}class Ua extends $a{constructor(p,l,O,F,se,we=!0){super(F||l.type,se),this.operator=p,this.rhs=O,this.parens=we,this.lhs=l}isEquivalent(p){return p instanceof Ua&&this.operator===p.operator&&this.lhs.isEquivalent(p.lhs)&&this.rhs.isEquivalent(p.rhs)}isConstant(){return!1}visitExpression(p,l){return p.visitBinaryOperatorExpr(this,l)}clone(){return new Ua(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan,this.parens)}}class du extends $a{constructor(p,l,O,F){super(O,F),this.receiver=p,this.name=l}get index(){return this.name}isEquivalent(p){return p instanceof du&&this.receiver.isEquivalent(p.receiver)&&this.name===p.name}isConstant(){return!1}visitExpression(p,l){return p.visitReadPropExpr(this,l)}set(p){return new s_(this.receiver,this.name,p,null,this.sourceSpan)}clone(){return new du(this.receiver.clone(),this.name,this.type,this.sourceSpan)}}class ag extends $a{constructor(p,l,O,F){super(O,F),this.receiver=p,this.index=l}isEquivalent(p){return p instanceof ag&&this.receiver.isEquivalent(p.receiver)&&this.index.isEquivalent(p.index)}isConstant(){return!1}visitExpression(p,l){return p.visitReadKeyExpr(this,l)}set(p){return new r_(this.receiver,this.index,p,null,this.sourceSpan)}clone(){return new ag(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}}class kh extends $a{constructor(p,l,O){super(l,O),this.entries=p}isConstant(){return this.entries.every(p=>p.isConstant())}isEquivalent(p){return p instanceof kh&&cu(this.entries,p.entries)}visitExpression(p,l){return p.visitLiteralArrayExpr(this,l)}clone(){return new kh(this.entries.map(p=>p.clone()),this.type,this.sourceSpan)}}class em{constructor(p,l,O){this.key=p,this.value=l,this.quoted=O}isEquivalent(p){return this.key===p.key&&this.value.isEquivalent(p.value)}clone(){return new em(this.key,this.value.clone(),this.quoted)}}class uu extends $a{constructor(p,l,O){super(l,O),this.entries=p,this.valueType=null,l&&(this.valueType=l.valueType)}isEquivalent(p){return p instanceof uu&&cu(this.entries,p.entries)}isConstant(){return this.entries.every(p=>p.value.isConstant())}visitExpression(p,l){return p.visitLiteralMapExpr(this,l)}clone(){const p=this.entries.map(l=>l.clone());return new uu(p,this.type,this.sourceSpan)}}const lf=new fd(null,null,null),tm=new fd(null,sg,null);var Xc=function(v){return v[v.None=0]="None",v[v.Final=1]="Final",v[v.Private=2]="Private",v[v.Exported=4]="Exported",v[v.Static=8]="Static",v}(Xc||{});class SE{constructor(p,l,O){this.text=p,this.multiline=l,this.trailingNewline=O}toString(){return this.multiline?` ${this.text} `:this.text}}class a0 extends SE{constructor(p){super("",!0,!0),this.tags=p}toString(){return function u_(v){if(0===v.length)return"";if(1===v.length&&v[0].tagName&&!v[0].text)return`*${vb(v[0])} `;let p="*\n";for(const l of v)p+=" *",p+=vb(l).replace(/\n/g,"\n * "),p+="\n";return p+=" ",p}(this.tags)}}class cf{constructor(p=Xc.None,l=null,O){this.modifiers=p,this.sourceSpan=l,this.leadingComments=O}hasModifier(p){return!!(this.modifiers&p)}addLeadingComment(p){this.leadingComments=this.leadingComments??[],this.leadingComments.push(p)}}class Rl extends cf{constructor(p,l,O,F,se,we){super(F,se,we),this.name=p,this.value=l,this.type=O||l&&l.type||null}isEquivalent(p){return p instanceof Rl&&this.name===p.name&&(this.value?!!p.value&&this.value.isEquivalent(p.value):!p.value)}visitStatement(p,l){return p.visitDeclareVarStmt(this,l)}}class Gd extends cf{constructor(p,l,O,F,se,we,We){super(se,we,We),this.name=p,this.params=l,this.statements=O,this.type=F||null}isEquivalent(p){return p instanceof Gd&&cu(this.params,p.params)&&cu(this.statements,p.statements)}visitStatement(p,l){return p.visitDeclareFunctionStmt(this,l)}}class hu extends cf{constructor(p,l,O){super(Xc.None,l,O),this.expr=p}isEquivalent(p){return p instanceof hu&&this.expr.isEquivalent(p.expr)}visitStatement(p,l){return p.visitExpressionStmt(this,l)}}class pu extends cf{constructor(p,l=null,O){super(Xc.None,l,O),this.value=p}isEquivalent(p){return p instanceof pu&&this.value.isEquivalent(p.value)}visitStatement(p,l){return p.visitReturnStmt(this,l)}}class fb extends cf{constructor(p,l,O=[],F,se){super(Xc.None,F,se),this.condition=p,this.trueCase=l,this.falseCase=O}isEquivalent(p){return p instanceof fb&&this.condition.isEquivalent(p.condition)&&cu(this.trueCase,p.trueCase)&&cu(this.falseCase,p.falseCase)}visitStatement(p,l){return p.visitIfStmt(this,l)}}function Xs(v,p,l){return new ch(v,p,l)}function kr(v,p=null,l){return new qf(v,null,p,l)}function Yc(v,p,l){return new Zf(v,p,l)}function tc(v){return new af(v)}function Ns(v,p,l){return new kh(v,p,l)}function nc(v,p=null){return new uu(v.map(l=>new em(l.key,l.value,l.quoted)),p,null)}function nm(v,p,l,O,F){return new Rh(v,p,l,O,F)}function Zc(v,p,l,O){return new c_(v,p,l,O)}function _b(v,p,l,O,F){return new fb(v,p,l,O,F)}function no(v,p,l){return new fd(v,p,l)}function vb(v){let p="";if(v.tagName&&(p+=` @${v.tagName}`),v.text){if(v.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');p+=" "+v.text.replace(/@/g,"\\@")}return p}const gM=Xs("<unknown>"),md={};class im extends $a{constructor(p){super(p.type),this.resolved=p,this.shared=!1,this.original=p}visitExpression(p,l){return l===md?this.original.visitExpression(p,l):this.resolved.visitExpression(p,l)}isEquivalent(p){return p instanceof im&&this.resolved.isEquivalent(p.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(p){this.resolved=p,this.shared=!0}}class om{constructor(p=!1){this.isClosureCompilerEnabled=p,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.sharedConstants=new Map,this._claimedNames=new Map,this.nextNameIndex=0}getConstLiteral(p,l){if(p instanceof fd&&!yb(p)||p instanceof im)return p;const O=WC.INSTANCE.keyOf(p);let F=this.literals.get(O),se=!1;if(F||(F=new im(p),this.literals.set(O,F),se=!0),!se&&!F.shared||se&&l){const we=this.freshName();let We,gt;this.isClosureCompilerEnabled&&yb(p)?(We=Xs(we).set(new Rh([],[new pu(p)])),gt=Xs(we).callFn([])):(We=Xs(we).set(p),gt=Xs(we)),this.statements.push(We.toDeclStmt(sg,Xc.Final)),F.fixup(gt)}return F}getSharedConstant(p,l){const O=p.keyOf(l);if(!this.sharedConstants.has(O)){const F=this.freshName();this.sharedConstants.set(O,Xs(F)),this.statements.push(p.toSharedConstantDeclaration(F,l))}return this.sharedConstants.get(O)}getLiteralFactory(p){if(p instanceof kh){const l=p.entries.map(F=>F.isConstant()?F:gM),O=WC.INSTANCE.keyOf(Ns(l));return this._getLiteralFactory(O,p.entries,F=>Ns(F))}{const l=nc(p.entries.map(F=>({key:F.key,value:F.value.isConstant()?F.value:gM,quoted:F.quoted}))),O=WC.INSTANCE.keyOf(l);return this._getLiteralFactory(O,p.entries.map(F=>F.value),F=>nc(F.map((se,we)=>({key:p.entries[we].key,value:se,quoted:p.entries[we].quoted}))))}}getSharedFunctionReference(p,l,O=!0){const F=p instanceof c_;for(const we of this.statements)if(F&&we instanceof Rl&&we.value?.isEquivalent(p)||!F&&we instanceof Gd&&p instanceof Rh&&p.isEquivalent(we))return Xs(we.name);const se=O?this.uniqueName(l):l;return this.statements.push(p instanceof Rh?p.toDeclStmt(se,Xc.Final):new Rl(se,p,sg,Xc.Final,p.sourceSpan)),Xs(se)}_getLiteralFactory(p,l,O){let F=this.literalFactories.get(p);const se=l.filter(we=>!we.isConstant());if(!F){const we=l.map((pn,fi)=>pn.isConstant()?this.getConstLiteral(pn,!0):Xs(`a${fi}`)),gt=Zc(we.filter(LT).map(pn=>new vc(pn.name,rf)),O(we),sg),Ft=this.freshName();this.statements.push(Xs(Ft).set(gt).toDeclStmt(sg,Xc.Final)),F=Xs(Ft),this.literalFactories.set(p,F)}return{literalFactory:F,literalFactoryArguments:se}}uniqueName(p,l=!0){const O=this._claimedNames.get(p)??0,F=0!==O||l?`${p}${O}`:`${p}`;return this._claimedNames.set(p,O+1),F}freshName(){return this.uniqueName("_c")}}class WC{static{this.INSTANCE=new WC}keyOf(p){if(p instanceof fd&&"string"==typeof p.value)return`"${p.value}"`;if(p instanceof fd)return String(p.value);if(p instanceof kh){const l=[];for(const O of p.entries)l.push(this.keyOf(O));return`[${l.join(",")}]`}if(p instanceof uu){const l=[];for(const O of p.entries){let F=O.key;O.quoted&&(F=`"${F}"`),l.push(F+":"+this.keyOf(O.value))}return`{${l.join(",")}}`}if(p instanceof qf)return`import("${p.value.moduleName}", ${p.value.name})`;if(p instanceof ch)return`read(${p.name})`;if(p instanceof af)return`typeof(${this.keyOf(p.expr)})`;throw new Error(`${this.constructor.name} does not handle expressions of type ${p.constructor.name}`)}}function LT(v){return v instanceof ch}function yb(v){return v instanceof fd&&"string"==typeof v.value&&v.value.length>=50}const oo="@angular/core";let Bi=(()=>{class v{static{this.NEW_METHOD="factory"}static{this.TRANSFORM_METHOD="transform"}static{this.PATCH_DEPS="patchedDeps"}static{this.core={name:null,moduleName:oo}}static{this.namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:oo}}static{this.namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:oo}}static{this.namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:oo}}static{this.element={name:"\u0275\u0275element",moduleName:oo}}static{this.elementStart={name:"\u0275\u0275elementStart",moduleName:oo}}static{this.elementEnd={name:"\u0275\u0275elementEnd",moduleName:oo}}static{this.advance={name:"\u0275\u0275advance",moduleName:oo}}static{this.syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:oo}}static{this.syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:oo}}static{this.attribute={name:"\u0275\u0275attribute",moduleName:oo}}static{this.attributeInterpolate1={name:"\u0275\u0275attributeInterpolate1",moduleName:oo}}static{this.attributeInterpolate2={name:"\u0275\u0275attributeInterpolate2",moduleName:oo}}static{this.attributeInterpolate3={name:"\u0275\u0275attributeInterpolate3",moduleName:oo}}static{this.attributeInterpolate4={name:"\u0275\u0275attributeInterpolate4",moduleName:oo}}static{this.attributeInterpolate5={name:"\u0275\u0275attributeInterpolate5",moduleName:oo}}static{this.attributeInterpolate6={name:"\u0275\u0275attributeInterpolate6",moduleName:oo}}static{this.attributeInterpolate7={name:"\u0275\u0275attributeInterpolate7",moduleName:oo}}static{this.attributeInterpolate8={name:"\u0275\u0275attributeInterpolate8",moduleName:oo}}static{this.attributeInterpolateV={name:"\u0275\u0275attributeInterpolateV",moduleName:oo}}static{this.classProp={name:"\u0275\u0275classProp",moduleName:oo}}static{this.elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:oo}}static{this.elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:oo}}static{this.elementContainer={name:"\u0275\u0275elementContainer",moduleName:oo}}static{this.styleMap={name:"\u0275\u0275styleMap",moduleName:oo}}static{this.styleMapInterpolate1={name:"\u0275\u0275styleMapInterpolate1",moduleName:oo}}static{this.styleMapInterpolate2={name:"\u0275\u0275styleMapInterpolate2",moduleName:oo}}static{this.styleMapInterpolate3={name:"\u0275\u0275styleMapInterpolate3",moduleName:oo}}static{this.styleMapInterpolate4={name:"\u0275\u0275styleMapInterpolate4",moduleName:oo}}static{this.styleMapInterpolate5={name:"\u0275\u0275styleMapInterpolate5",moduleName:oo}}static{this.styleMapInterpolate6={name:"\u0275\u0275styleMapInterpolate6",moduleName:oo}}static{this.styleMapInterpolate7={name:"\u0275\u0275styleMapInterpolate7",moduleName:oo}}static{this.styleMapInterpolate8={name:"\u0275\u0275styleMapInterpolate8",moduleName:oo}}static{this.styleMapInterpolateV={name:"\u0275\u0275styleMapInterpolateV",moduleName:oo}}static{this.classMap={name:"\u0275\u0275classMap",moduleName:oo}}static{this.classMapInterpolate1={name:"\u0275\u0275classMapInterpolate1",moduleName:oo}}static{this.classMapInterpolate2={name:"\u0275\u0275classMapInterpolate2",moduleName:oo}}static{this.classMapInterpolate3={name:"\u0275\u0275classMapInterpolate3",moduleName:oo}}static{this.classMapInterpolate4={name:"\u0275\u0275classMapInterpolate4",moduleName:oo}}static{this.classMapInterpolate5={name:"\u0275\u0275classMapInterpolate5",moduleName:oo}}static{this.classMapInterpolate6={name:"\u0275\u0275classMapInterpolate6",moduleName:oo}}static{this.classMapInterpolate7={name:"\u0275\u0275classMapInterpolate7",moduleName:oo}}static{this.classMapInterpolate8={name:"\u0275\u0275classMapInterpolate8",moduleName:oo}}static{this.classMapInterpolateV={name:"\u0275\u0275classMapInterpolateV",moduleName:oo}}static{this.styleProp={name:"\u0275\u0275styleProp",moduleName:oo}}static{this.stylePropInterpolate1={name:"\u0275\u0275stylePropInterpolate1",moduleName:oo}}static{this.stylePropInterpolate2={name:"\u0275\u0275stylePropInterpolate2",moduleName:oo}}static{this.stylePropInterpolate3={name:"\u0275\u0275stylePropInterpolate3",moduleName:oo}}static{this.stylePropInterpolate4={name:"\u0275\u0275stylePropInterpolate4",moduleName:oo}}static{this.stylePropInterpolate5={name:"\u0275\u0275stylePropInterpolate5",moduleName:oo}}static{this.stylePropInterpolate6={name:"\u0275\u0275stylePropInterpolate6",moduleName:oo}}static{this.stylePropInterpolate7={name:"\u0275\u0275stylePropInterpolate7",moduleName:oo}}static{this.stylePropInterpolate8={name:"\u0275\u0275stylePropInterpolate8",moduleName:oo}}static{this.stylePropInterpolateV={name:"\u0275\u0275stylePropInterpolateV",moduleName:oo}}static{this.nextContext={name:"\u0275\u0275nextContext",moduleName:oo}}static{this.resetView={name:"\u0275\u0275resetView",moduleName:oo}}static{this.templateCreate={name:"\u0275\u0275template",moduleName:oo}}static{this.defer={name:"\u0275\u0275defer",moduleName:oo}}static{this.deferWhen={name:"\u0275\u0275deferWhen",moduleName:oo}}static{this.deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:oo}}static{this.deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:oo}}static{this.deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:oo}}static{this.deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:oo}}static{this.deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:oo}}static{this.deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:oo}}static{this.deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:oo}}static{this.deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:oo}}static{this.deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:oo}}static{this.deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:oo}}static{this.deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:oo}}static{this.deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:oo}}static{this.deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:oo}}static{this.deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:oo}}static{this.conditional={name:"\u0275\u0275conditional",moduleName:oo}}static{this.repeater={name:"\u0275\u0275repeater",moduleName:oo}}static{this.repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:oo}}static{this.repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:oo}}static{this.repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:oo}}static{this.componentInstance={name:"\u0275\u0275componentInstance",moduleName:oo}}static{this.text={name:"\u0275\u0275text",moduleName:oo}}static{this.enableBindings={name:"\u0275\u0275enableBindings",moduleName:oo}}static{this.disableBindings={name:"\u0275\u0275disableBindings",moduleName:oo}}static{this.getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:oo}}static{this.textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:oo}}static{this.textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:oo}}static{this.textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:oo}}static{this.textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:oo}}static{this.textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:oo}}static{this.textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:oo}}static{this.textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:oo}}static{this.textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:oo}}static{this.textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:oo}}static{this.textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:oo}}static{this.restoreView={name:"\u0275\u0275restoreView",moduleName:oo}}static{this.pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:oo}}static{this.pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:oo}}static{this.pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:oo}}static{this.pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:oo}}static{this.pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:oo}}static{this.pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:oo}}static{this.pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:oo}}static{this.pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:oo}}static{this.pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:oo}}static{this.pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:oo}}static{this.pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:oo}}static{this.pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:oo}}static{this.pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:oo}}static{this.pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:oo}}static{this.pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:oo}}static{this.hostProperty={name:"\u0275\u0275hostProperty",moduleName:oo}}static{this.property={name:"\u0275\u0275property",moduleName:oo}}static{this.propertyInterpolate={name:"\u0275\u0275propertyInterpolate",moduleName:oo}}static{this.propertyInterpolate1={name:"\u0275\u0275propertyInterpolate1",moduleName:oo}}static{this.propertyInterpolate2={name:"\u0275\u0275propertyInterpolate2",moduleName:oo}}static{this.propertyInterpolate3={name:"\u0275\u0275propertyInterpolate3",moduleName:oo}}static{this.propertyInterpolate4={name:"\u0275\u0275propertyInterpolate4",moduleName:oo}}static{this.propertyInterpolate5={name:"\u0275\u0275propertyInterpolate5",moduleName:oo}}static{this.propertyInterpolate6={name:"\u0275\u0275propertyInterpolate6",moduleName:oo}}static{this.propertyInterpolate7={name:"\u0275\u0275propertyInterpolate7",moduleName:oo}}static{this.propertyInterpolate8={name:"\u0275\u0275propertyInterpolate8",moduleName:oo}}static{this.propertyInterpolateV={name:"\u0275\u0275propertyInterpolateV",moduleName:oo}}static{this.i18n={name:"\u0275\u0275i18n",moduleName:oo}}static{this.i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:oo}}static{this.i18nExp={name:"\u0275\u0275i18nExp",moduleName:oo}}static{this.i18nStart={name:"\u0275\u0275i18nStart",moduleName:oo}}static{this.i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:oo}}static{this.i18nApply={name:"\u0275\u0275i18nApply",moduleName:oo}}static{this.i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:oo}}static{this.pipe={name:"\u0275\u0275pipe",moduleName:oo}}static{this.projection={name:"\u0275\u0275projection",moduleName:oo}}static{this.projectionDef={name:"\u0275\u0275projectionDef",moduleName:oo}}static{this.reference={name:"\u0275\u0275reference",moduleName:oo}}static{this.inject={name:"\u0275\u0275inject",moduleName:oo}}static{this.injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:oo}}static{this.directiveInject={name:"\u0275\u0275directiveInject",moduleName:oo}}static{this.invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:oo}}static{this.invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:oo}}static{this.templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:oo}}static{this.forwardRef={name:"forwardRef",moduleName:oo}}static{this.resolveForwardRef={name:"resolveForwardRef",moduleName:oo}}static{this.\u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:oo}}static{this.declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:oo}}static{this.InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:oo}}static{this.resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:oo}}static{this.resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:oo}}static{this.resolveBody={name:"\u0275\u0275resolveBody",moduleName:oo}}static{this.getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:oo}}static{this.defineComponent={name:"\u0275\u0275defineComponent",moduleName:oo}}static{this.declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:oo}}static{this.setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:oo}}static{this.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:oo}}static{this.ViewEncapsulation={name:"ViewEncapsulation",moduleName:oo}}static{this.ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:oo}}static{this.FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:oo}}static{this.declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:oo}}static{this.FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:oo}}static{this.defineDirective={name:"\u0275\u0275defineDirective",moduleName:oo}}static{this.declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:oo}}static{this.DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:oo}}static{this.InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:oo}}static{this.InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:oo}}static{this.defineInjector={name:"\u0275\u0275defineInjector",moduleName:oo}}static{this.declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:oo}}static{this.NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:oo}}static{this.ModuleWithProviders={name:"ModuleWithProviders",moduleName:oo}}static{this.defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:oo}}static{this.declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:oo}}static{this.setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:oo}}static{this.registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:oo}}static{this.PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:oo}}static{this.definePipe={name:"\u0275\u0275definePipe",moduleName:oo}}static{this.declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:oo}}static{this.declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:oo}}static{this.declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:oo}}static{this.setClassMetadata={name:"\u0275setClassMetadata",moduleName:oo}}static{this.setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:oo}}static{this.setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:oo}}static{this.queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:oo}}static{this.viewQuery={name:"\u0275\u0275viewQuery",moduleName:oo}}static{this.loadQuery={name:"\u0275\u0275loadQuery",moduleName:oo}}static{this.contentQuery={name:"\u0275\u0275contentQuery",moduleName:oo}}static{this.viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:oo}}static{this.contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:oo}}static{this.queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:oo}}static{this.twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:oo}}static{this.twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:oo}}static{this.twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:oo}}static{this.declareLet={name:"\u0275\u0275declareLet",moduleName:oo}}static{this.storeLet={name:"\u0275\u0275storeLet",moduleName:oo}}static{this.readContextLet={name:"\u0275\u0275readContextLet",moduleName:oo}}static{this.NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:oo}}static{this.InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:oo}}static{this.CopyDefinitionFeature={name:"\u0275\u0275CopyDefinitionFeature",moduleName:oo}}static{this.StandaloneFeature={name:"\u0275\u0275StandaloneFeature",moduleName:oo}}static{this.ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:oo}}static{this.HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:oo}}static{this.InputTransformsFeatureFeature={name:"\u0275\u0275InputTransformsFeature",moduleName:oo}}static{this.listener={name:"\u0275\u0275listener",moduleName:oo}}static{this.getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:oo}}static{this.sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:oo}}static{this.sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:oo}}static{this.sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:oo}}static{this.sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:oo}}static{this.sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:oo}}static{this.sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:oo}}static{this.trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:oo}}static{this.trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:oo}}static{this.validateIframeAttribute={name:"\u0275\u0275validateIframeAttribute",moduleName:oo}}static{this.InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:oo}}static{this.UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:oo}}static{this.unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:oo}}}return v})();const DE=/-+([a-z0-9])/g;function c0(v,p,l){const O=v.indexOf(p);return-1==O?l:[v.slice(0,O).trim(),v.slice(O+1).trim()]}function AE(v){if("string"==typeof v)return v;if(Array.isArray(v))return"["+v.map(AE).join(", ")+"]";if(null==v)return""+v;if(v.overriddenName)return`${v.overriddenName}`;if(v.name)return`${v.name}`;if(!v.toString)return"object";const p=v.toString();if(null==p)return""+p;const l=p.indexOf("\n");return-1===l?p:p.substring(0,l)}const bb=globalThis;class KL{constructor(p=null){this.file=p,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(p,l=null){return this.sourcesContent.has(p)||this.sourcesContent.set(p,l),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(p,l,O,F){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=l&&!this.sourcesContent.has(l))throw new Error(`Unknown source file "${l}"`);if(null==p)throw new Error("The column in the generated code must be provided");if(p<this.lastCol0)throw new Error("Mapping should be added in output order");if(l&&(null==O||null==F))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=p,this.currentLine.push({col0:p,sourceUrl:l,sourceLine0:O,sourceCol0:F}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const p=new Map,l=[],O=[];Array.from(this.sourcesContent.keys()).forEach((Ft,pn)=>{p.set(Ft,pn),l.push(Ft),O.push(this.sourcesContent.get(Ft)||null)});let F="",se=0,we=0,We=0,gt=0;return this.lines.forEach(Ft=>{se=0,F+=Ft.map(pn=>{let fi=Sb(pn.col0-se);return se=pn.col0,null!=pn.sourceUrl&&(fi+=Sb(p.get(pn.sourceUrl)-we),we=p.get(pn.sourceUrl),fi+=Sb(pn.sourceLine0-We),We=pn.sourceLine0,fi+=Sb(pn.sourceCol0-gt),gt=pn.sourceCol0),fi}).join(","),F+=";"}),F=F.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:l,sourcesContent:O,mappings:F}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function d0(v){let p="";const l=function h_(v){let p=[];for(let l=0;l<v.length;l++){let O=v.charCodeAt(l);if(O>=55296&&O<=56319&&v.length>l+1){const F=v.charCodeAt(l+1);F>=56320&&F<=57343&&(l++,O=(O-55296<<10)+F-56320+65536)}O<=127?p.push(O):O<=2047?p.push(O>>6&31|192,63&O|128):O<=65535?p.push(O>>12|224,O>>6&63|128,63&O|128):O<=2097151&&p.push(O>>18&7|240,O>>12&63|128,O>>6&63|128,63&O|128)}return p}(v);for(let O=0;O<l.length;){const F=l[O++],se=O<l.length?l[O++]:null,we=O<l.length?l[O++]:null;p+=Eb(F>>2),p+=Eb((3&F)<<4|(null===se?0:se>>4)),p+=null===se?"=":Eb((15&se)<<2|(null===we?0:we>>6)),p+=null===se||null===we?"=":Eb(63&we)}return p}(JSON.stringify(this,null,0)):""}}function Sb(v){v=v<0?1+(-v<<1):v<<1;let p="";do{let l=31&v;(v>>=5)>0&&(l|=32),p+=Eb(l)}while(v>0);return p}const VT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Eb(v){if(v<0||v>=64)throw new Error("Can only encode value in the range [0, 63]");return VT[v]}const da=/'|\\|\n|\r|\$/g,u0=/^[$A-Z_][0-9A-Z_$]*$/i;class KC{constructor(p){this.indent=p,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class IE{static createRoot(){return new IE(0)}constructor(p){this._indent=p,this._lines=[new KC(p)]}get _currentLine(){return this._lines[this._lines.length-1]}println(p,l=""){this.print(p||null,l,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return 2*this._currentLine.indent+this._currentLine.partsLength}print(p,l,O=!1){l.length>0&&(this._currentLine.parts.push(l),this._currentLine.partsLength+=l.length,this._currentLine.srcSpans.push(p&&p.sourceSpan||null)),O&&this._lines.push(new KC(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(p=>p.parts.length>0?XC(p.indent)+p.parts.join(""):"").join("\n")}toSourceMapGenerator(p,l=0){const O=new KL(p);let F=!1;const se=()=>{F||(O.addSource(p," ").addMapping(0,p,0,0),F=!0)};for(let we=0;we<l;we++)O.addLine(),se();return this.sourceLines.forEach((we,We)=>{O.addLine();const gt=we.srcSpans,Ft=we.parts;let pn=2*we.indent,fi=0;for(;fi<gt.length&&!gt[fi];)pn+=Ft[fi].length,fi++;for(fi<gt.length&&0===We&&0===pn?F=!0:se();fi<gt.length;){const _o=gt[fi],Po=_o.start.file,Ro=_o.start.line,Rr=_o.start.col;for(O.addSource(Po.url,Po.content).addMapping(pn,Po.url,Ro,Rr),pn+=Ft[fi].length,fi++;fi<gt.length&&(_o===gt[fi]||!gt[fi]);)pn+=Ft[fi].length,fi++}}),O}spanOf(p,l){const O=this._lines[p];if(O){let F=l-XC(O.indent).length;for(let se=0;se<O.parts.length;se++){const we=O.parts[se];if(we.length>F)return O.srcSpans[se];F-=we.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}class PE{constructor(p){this._escapeDollarInStrings=p}printLeadingComments(p,l){if(void 0!==p.leadingComments)for(const O of p.leadingComments)O instanceof a0?l.print(p,`/*${O.toString()}*/`,O.trailingNewline):O.multiline?l.print(p,`/* ${O.text} */`,O.trailingNewline):O.text.split("\n").forEach(F=>{l.println(p,`// ${F}`)})}visitExpressionStmt(p,l){return this.printLeadingComments(p,l),p.expr.visitExpression(this,l),l.println(p,";"),null}visitReturnStmt(p,l){return this.printLeadingComments(p,l),l.print(p,"return "),p.value.visitExpression(this,l),l.println(p,";"),null}visitIfStmt(p,l){this.printLeadingComments(p,l),l.print(p,"if ("),p.condition.visitExpression(this,l),l.print(p,") {");const O=null!=p.falseCase&&p.falseCase.length>0;return p.trueCase.length<=1&&!O?(l.print(p," "),this.visitAllStatements(p.trueCase,l),l.removeEmptyLastLine(),l.print(p," ")):(l.println(),l.incIndent(),this.visitAllStatements(p.trueCase,l),l.decIndent(),O&&(l.println(p,"} else {"),l.incIndent(),this.visitAllStatements(p.falseCase,l),l.decIndent())),l.println(p,"}"),null}visitWriteVarExpr(p,l){const O=l.lineIsEmpty();return O||l.print(p,"("),l.print(p,`${p.name} = `),p.value.visitExpression(this,l),O||l.print(p,")"),null}visitWriteKeyExpr(p,l){const O=l.lineIsEmpty();return O||l.print(p,"("),p.receiver.visitExpression(this,l),l.print(p,"["),p.index.visitExpression(this,l),l.print(p,"] = "),p.value.visitExpression(this,l),O||l.print(p,")"),null}visitWritePropExpr(p,l){const O=l.lineIsEmpty();return O||l.print(p,"("),p.receiver.visitExpression(this,l),l.print(p,`.${p.name} = `),p.value.visitExpression(this,l),O||l.print(p,")"),null}visitInvokeFunctionExpr(p,l){const O=p.fn instanceof c_;return O&&l.print(p.fn,"("),p.fn.visitExpression(this,l),O&&l.print(p.fn,")"),l.print(p,"("),this.visitAllExpressions(p.args,l,","),l.print(p,")"),null}visitTaggedTemplateExpr(p,l){p.tag.visitExpression(this,l),l.print(p,"`"+p.template.elements[0].rawText);for(let O=1;O<p.template.elements.length;O++)l.print(p,"${"),p.template.expressions[O-1].visitExpression(this,l),l.print(p,`}${p.template.elements[O].rawText}`);return l.print(p,"`"),null}visitWrappedNodeExpr(p,l){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(p,l){l.print(p,"typeof "),p.expr.visitExpression(this,l)}visitReadVarExpr(p,l){return l.print(p,p.name),null}visitInstantiateExpr(p,l){return l.print(p,"new "),p.classExpr.visitExpression(this,l),l.print(p,"("),this.visitAllExpressions(p.args,l,","),l.print(p,")"),null}visitLiteralExpr(p,l){const O=p.value;return l.print(p,"string"==typeof O?Iv(O,this._escapeDollarInStrings):`${O}`),null}visitLocalizedString(p,l){const O=p.serializeI18nHead();l.print(p,"$localize `"+O.raw);for(let F=1;F<p.messageParts.length;F++)l.print(p,"${"),p.expressions[F-1].visitExpression(this,l),l.print(p,`}${p.serializeI18nTemplatePart(F).raw}`);return l.print(p,"`"),null}visitConditionalExpr(p,l){return l.print(p,"("),p.condition.visitExpression(this,l),l.print(p,"? "),p.trueCase.visitExpression(this,l),l.print(p,": "),p.falseCase.visitExpression(this,l),l.print(p,")"),null}visitDynamicImportExpr(p,l){l.print(p,`import(${p.url})`)}visitNotExpr(p,l){return l.print(p,"!"),p.condition.visitExpression(this,l),null}visitUnaryOperatorExpr(p,l){let O;switch(p.operator){case wv.Plus:O="+";break;case wv.Minus:O="-";break;default:throw new Error(`Unknown operator ${p.operator}`)}return p.parens&&l.print(p,"("),l.print(p,O),p.expr.visitExpression(this,l),p.parens&&l.print(p,")"),null}visitBinaryOperatorExpr(p,l){let O;switch(p.operator){case hs.Equals:O="==";break;case hs.Identical:O="===";break;case hs.NotEquals:O="!=";break;case hs.NotIdentical:O="!==";break;case hs.And:O="&&";break;case hs.BitwiseOr:O="|";break;case hs.BitwiseAnd:O="&";break;case hs.Or:O="||";break;case hs.Plus:O="+";break;case hs.Minus:O="-";break;case hs.Divide:O="/";break;case hs.Multiply:O="*";break;case hs.Modulo:O="%";break;case hs.Lower:O="<";break;case hs.LowerEquals:O="<=";break;case hs.Bigger:O=">";break;case hs.BiggerEquals:O=">=";break;case hs.NullishCoalesce:O="??";break;default:throw new Error(`Unknown operator ${p.operator}`)}return p.parens&&l.print(p,"("),p.lhs.visitExpression(this,l),l.print(p,` ${O} `),p.rhs.visitExpression(this,l),p.parens&&l.print(p,")"),null}visitReadPropExpr(p,l){return p.receiver.visitExpression(this,l),l.print(p,"."),l.print(p,p.name),null}visitReadKeyExpr(p,l){return p.receiver.visitExpression(this,l),l.print(p,"["),p.index.visitExpression(this,l),l.print(p,"]"),null}visitLiteralArrayExpr(p,l){return l.print(p,"["),this.visitAllExpressions(p.entries,l,","),l.print(p,"]"),null}visitLiteralMapExpr(p,l){return l.print(p,"{"),this.visitAllObjects(O=>{l.print(p,`${Iv(O.key,this._escapeDollarInStrings,O.quoted)}:`),O.value.visitExpression(this,l)},p.entries,l,","),l.print(p,"}"),null}visitCommaExpr(p,l){return l.print(p,"("),this.visitAllExpressions(p.parts,l,","),l.print(p,")"),null}visitAllExpressions(p,l,O){this.visitAllObjects(F=>F.visitExpression(this,l),p,l,O)}visitAllObjects(p,l,O,F){let se=!1;for(let we=0;we<l.length;we++)we>0&&(O.lineLength()>80?(O.print(null,F,!0),se||(O.incIndent(),O.incIndent(),se=!0)):O.print(null,F,!1)),p(l[we]);se&&(O.decIndent(),O.decIndent())}visitAllStatements(p,l){p.forEach(O=>O.visitStatement(this,l))}}function Iv(v,p,l=!0){if(null==v)return null;const O=v.replace(da,(...se)=>"$"==se[0]?p?"\\$":"$":"\n"==se[0]?"\\n":"\r"==se[0]?"\\r":`\\${se[0]}`);return l||!u0.test(O)?`'${O}'`:O}function XC(v){let p="";for(let l=0;l<v;l++)p+="  ";return p}function df(v,p){if(0===p)return Yc(v);const l=[];for(let O=0;O<p;O++)l.push(rf);return Yc(v,void 0,l)}function RE(v,p){const l=Iv(p,!1,!1);return l!==p?`${v}[${l}]`:`${v}.${p}`}function Qc(v){const p=new Da(v);return{value:p,type:p}}function uf(v,p){const l=Ns(v.map(O=>O.value));return p?Zc([],l):l}function zT(v,p){return{expression:v,forwardRef:p}}function Pv({expression:v,forwardRef:p}){switch(p){case 0:case 1:return v;case 2:return function vM(v){return kr(Bi.forwardRef).callFn([Zc([],v)])}(v)}}var wb=function(v){return v[v.Class=0]="Class",v[v.Function=1]="Function",v}(wb||{}),sm=function(v){return v[v.Directive=0]="Directive",v[v.Component=1]="Component",v[v.Injectable=2]="Injectable",v[v.Pipe=3]="Pipe",v[v.NgModule=4]="NgModule",v}(sm||{});function p_(v){const p=Xs("t");let l=null;const O=GT(v)?p:new Ua(hs.Or,p,v.type.value);let F=null;null!==v.deps?"invalid"!==v.deps&&(F=new Ud(O,dh(v.deps,v.target))):(l=Xs(`\u0275${v.name}_BaseFactory`),F=l.callFn([O]));const se=[];let we=null;function We(Ft){const pn=Xs("r");se.push(pn.set(lf).toDeclStmt());const fi=null!==F?pn.set(F).toStmt():kr(Bi.invalidFactory).callFn([]).toStmt();return se.push(_b(p,[fi],[pn.set(Ft).toStmt()])),pn}if(GT(v)){const Ft=dh(v.delegateDeps,v.target);we=We(new(v.delegateType===wb.Class?Ud:_c)(v.delegate,Ft))}else we=function yM(v){return void 0!==v.expression}(v)?We(v.expression):F;if(null===we)se.push(kr(Bi.invalidFactory).callFn([]).toStmt());else if(null!==l){const Ft=kr(Bi.getInheritedFactory).callFn([v.type.value]),pn=new Ua(hs.Or,l,l.set(Ft));se.push(new pu(pn.callFn([O])))}else se.push(new pu(we));let gt=nm([new vc("t",rf)],se,sg,void 0,`${v.name}_Factory`);return null!==l&&(gt=Zc([],[new Rl(l.name),new pu(gt)]).callFn([],void 0,!0)),{expression:gt,statements:[],type:LE(v)}}function LE(v){const p=null!==v.deps&&"invalid"!==v.deps?function CM(v){let p=!1;const l=v.map(O=>{const F=function Bh(v){const p=[];return null!==v.attributeNameType&&p.push({key:"attribute",value:v.attributeNameType,quoted:!1}),v.optional&&p.push({key:"optional",value:no(!0),quoted:!1}),v.host&&p.push({key:"host",value:no(!0),quoted:!1}),v.self&&p.push({key:"self",value:no(!0),quoted:!1}),v.skipSelf&&p.push({key:"skipSelf",value:no(!0),quoted:!1}),p.length>0?nc(p):null}(O);return null!==F?(p=!0,F):no(null)});return p?Yc(Ns(l)):Jf}(v.deps):Jf;return Yc(kr(Bi.FactoryDeclaration,[df(v.type.type,v.typeArgumentCount),p]))}function dh(v,p){return v.map((l,O)=>function zu(v,p,l){if(null===v.token)return kr(Bi.invalidFactoryDep).callFn([no(l)]);if(null===v.attributeNameType){const O=(v.self?2:0)|(v.skipSelf?4:0)|(v.host?1:0)|(v.optional?8:0)|(p===sm.Pipe?16:0);let F=0!==O||v.optional?no(O):null;const se=[v.token];F&&se.push(F);const we=function KV(v){switch(v){case sm.Component:case sm.Directive:case sm.Pipe:return Bi.directiveInject;default:return Bi.inject}}(p);return kr(we).callFn(se)}return kr(Bi.injectAttribute).callFn([v.token])}(l,p,O))}function GT(v){return void 0!==v.delegateType}class Nh{constructor(p,l,O,F){this.input=l,this.errLocation=O,this.ctxLocation=F,this.message=`Parser Error: ${p} ${O} [${l}] in ${F}`}}class _p{constructor(p,l){this.start=p,this.end=l}toAbsolute(p){return new uh(p+this.start,p+this.end)}}class Dc{constructor(p,l){this.span=p,this.sourceSpan=l}toString(){return"AST"}}class Mv extends Dc{constructor(p,l,O){super(p,l),this.nameSpan=O}}class gu extends Dc{visit(p,l=null){}}class fu extends Dc{visit(p,l=null){return p.visitImplicitReceiver(this,l)}}class g0 extends fu{visit(p,l=null){return p.visitThisReceiver?.(this,l)}}class vp extends Dc{constructor(p,l,O){super(p,l),this.expressions=O}visit(p,l=null){return p.visitChain(this,l)}}class Rv extends Dc{constructor(p,l,O,F,se){super(p,l),this.condition=O,this.trueExp=F,this.falseExp=se}visit(p,l=null){return p.visitConditional(this,l)}}class YC extends Mv{constructor(p,l,O,F,se){super(p,l,O),this.receiver=F,this.name=se}visit(p,l=null){return p.visitPropertyRead(this,l)}}class BE extends Mv{constructor(p,l,O,F,se,we){super(p,l,O),this.receiver=F,this.name=se,this.value=we}visit(p,l=null){return p.visitPropertyWrite(this,l)}}class WT extends Mv{constructor(p,l,O,F,se){super(p,l,O),this.receiver=F,this.name=se}visit(p,l=null){return p.visitSafePropertyRead(this,l)}}class Tb extends Dc{constructor(p,l,O,F){super(p,l),this.receiver=O,this.key=F}visit(p,l=null){return p.visitKeyedRead(this,l)}}class NE extends Dc{constructor(p,l,O,F){super(p,l),this.receiver=O,this.key=F}visit(p,l=null){return p.visitSafeKeyedRead(this,l)}}class lg extends Dc{constructor(p,l,O,F,se){super(p,l),this.receiver=O,this.key=F,this.value=se}visit(p,l=null){return p.visitKeyedWrite(this,l)}}class f0 extends Mv{constructor(p,l,O,F,se,we){super(p,l,we),this.exp=O,this.name=F,this.args=se}visit(p,l=null){return p.visitPipe(this,l)}}class am extends Dc{constructor(p,l,O){super(p,l),this.value=O}visit(p,l=null){return p.visitLiteralPrimitive(this,l)}}class $T extends Dc{constructor(p,l,O){super(p,l),this.expressions=O}visit(p,l=null){return p.visitLiteralArray(this,l)}}class FE extends Dc{constructor(p,l,O,F){super(p,l),this.keys=O,this.values=F}visit(p,l=null){return p.visitLiteralMap(this,l)}}class ZC extends Dc{constructor(p,l,O,F){super(p,l),this.strings=O,this.expressions=F}visit(p,l=null){return p.visitInterpolation(this,l)}}class Gu extends Dc{constructor(p,l,O,F,se){super(p,l),this.operation=O,this.left=F,this.right=se}visit(p,l=null){return p.visitBinary(this,l)}}class hf extends Gu{static createMinus(p,l,O){return new hf(p,l,"-",O,"-",new am(p,l,0),O)}static createPlus(p,l,O){return new hf(p,l,"+",O,"-",O,new am(p,l,0))}constructor(p,l,O,F,se,we,We){super(p,l,se,we,We),this.operator=O,this.expr=F,this.left=null,this.right=null,this.operation=null}visit(p,l=null){return void 0!==p.visitUnary?p.visitUnary(this,l):p.visitBinary(this,l)}}class m0 extends Dc{constructor(p,l,O){super(p,l),this.expression=O}visit(p,l=null){return p.visitPrefixNot(this,l)}}class QC extends Dc{constructor(p,l,O){super(p,l),this.expression=O}visit(p,l=null){return p.visitNonNullAssert(this,l)}}class Db extends Dc{constructor(p,l,O,F,se){super(p,l),this.receiver=O,this.args=F,this.argumentSpan=se}visit(p,l=null){return p.visitCall(this,l)}}class Ab extends Dc{constructor(p,l,O,F,se){super(p,l),this.receiver=O,this.args=F,this.argumentSpan=se}visit(p,l=null){return p.visitSafeCall(this,l)}}class uh{constructor(p,l){this.start=p,this.end=l}}class hh extends Dc{constructor(p,l,O,F,se){super(new _p(0,null===l?0:l.length),new uh(F,null===l?F:F+l.length)),this.ast=p,this.source=l,this.location=O,this.errors=se}visit(p,l=null){return p.visitASTWithSource?p.visitASTWithSource(this,l):this.ast.visit(p,l)}toString(){return`${this.source} in ${this.location}`}}class pf{constructor(p,l,O){this.sourceSpan=p,this.key=l,this.value=O}}class XL{constructor(p,l,O){this.sourceSpan=p,this.key=l,this.value=O}}class jT{visit(p,l){p.visit(this,l)}visitUnary(p,l){this.visit(p.expr,l)}visitBinary(p,l){this.visit(p.left,l),this.visit(p.right,l)}visitChain(p,l){this.visitAll(p.expressions,l)}visitConditional(p,l){this.visit(p.condition,l),this.visit(p.trueExp,l),this.visit(p.falseExp,l)}visitPipe(p,l){this.visit(p.exp,l),this.visitAll(p.args,l)}visitImplicitReceiver(p,l){}visitThisReceiver(p,l){}visitInterpolation(p,l){this.visitAll(p.expressions,l)}visitKeyedRead(p,l){this.visit(p.receiver,l),this.visit(p.key,l)}visitKeyedWrite(p,l){this.visit(p.receiver,l),this.visit(p.key,l),this.visit(p.value,l)}visitLiteralArray(p,l){this.visitAll(p.expressions,l)}visitLiteralMap(p,l){this.visitAll(p.values,l)}visitLiteralPrimitive(p,l){}visitPrefixNot(p,l){this.visit(p.expression,l)}visitNonNullAssert(p,l){this.visit(p.expression,l)}visitPropertyRead(p,l){this.visit(p.receiver,l)}visitPropertyWrite(p,l){this.visit(p.receiver,l),this.visit(p.value,l)}visitSafePropertyRead(p,l){this.visit(p.receiver,l)}visitSafeKeyedRead(p,l){this.visit(p.receiver,l),this.visit(p.key,l)}visitCall(p,l){this.visit(p.receiver,l),this.visitAll(p.args,l)}visitSafeCall(p,l){this.visit(p.receiver,l),this.visitAll(p.args,l)}visitAll(p,l){for(const O of p)this.visit(O,l)}}class lm{constructor(p,l,O,F,se,we){this.name=p,this.expression=l,this.type=O,this.sourceSpan=F,this.keySpan=se,this.valueSpan=we,this.isLiteral=this.type===g_.LITERAL_ATTR,this.isAnimation=this.type===g_.ANIMATION}}var g_=function(v){return v[v.DEFAULT=0]="DEFAULT",v[v.LITERAL_ATTR=1]="LITERAL_ATTR",v[v.ANIMATION=2]="ANIMATION",v[v.TWO_WAY=3]="TWO_WAY",v}(g_||{}),Hc=function(v){return v[v.Regular=0]="Regular",v[v.Animation=1]="Animation",v[v.TwoWay=2]="TwoWay",v}(Hc||{});class cm{constructor(p,l,O,F,se,we,We){this.name=p,this.targetOrPhase=l,this.type=O,this.handler=F,this.sourceSpan=se,this.handlerSpan=we,this.keySpan=We}}class VE{constructor(p,l,O,F,se){this.name=p,this.value=l,this.sourceSpan=O,this.keySpan=F,this.valueSpan=se}}var pl=function(v){return v[v.Property=0]="Property",v[v.Attribute=1]="Attribute",v[v.Class=2]="Class",v[v.Style=3]="Style",v[v.Animation=4]="Animation",v[v.TwoWay=5]="TwoWay",v}(pl||{});class kv{constructor(p,l,O,F,se,we,We,gt){this.name=p,this.type=l,this.securityContext=O,this.value=F,this.unit=se,this.sourceSpan=we,this.keySpan=We,this.valueSpan=gt}}var Ea=function(v){return v[v.RAW_TEXT=0]="RAW_TEXT",v[v.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",v[v.PARSABLE_DATA=2]="PARSABLE_DATA",v}(Ea||{});function gf(v,p=!0){if(":"!=v[0])return[null,v];const l=v.indexOf(":",1);if(-1===l){if(p)throw new Error(`Unsupported format "${v}" expecting ":namespace:name"`);return[null,v]}return[v.slice(1,l),v.slice(l+1)]}function KT(v){return"ng-container"===gf(v)[1]}function HE(v){return"ng-content"===gf(v)[1]}function XT(v){return null===v?null:gf(v)[0]}function YT(v,p){return v?`:${v}:${p}`:p}class _0{constructor(p,l){this.value=p,this.sourceSpan=l}visit(p){throw new Error("visit() not implemented for Comment")}}class JC{constructor(p,l){this.value=p,this.sourceSpan=l}visit(p){return p.visitText(this)}}class qC{constructor(p,l,O){this.value=p,this.sourceSpan=l,this.i18n=O}visit(p){return p.visitBoundText(this)}}class zE{constructor(p,l,O,F,se,we){this.name=p,this.value=l,this.sourceSpan=O,this.keySpan=F,this.valueSpan=se,this.i18n=we}visit(p){return p.visitTextAttribute(this)}}class GE{constructor(p,l,O,F,se,we,We,gt,Ft){this.name=p,this.type=l,this.securityContext=O,this.value=F,this.unit=se,this.sourceSpan=we,this.keySpan=We,this.valueSpan=gt,this.i18n=Ft}static fromBoundElementProperty(p,l){if(void 0===p.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${p.name}: ${p.sourceSpan}`);return new GE(p.name,p.type,p.securityContext,p.value,p.unit,p.sourceSpan,p.keySpan,p.valueSpan,l)}visit(p){return p.visitBoundAttribute(this)}}class v0{constructor(p,l,O,F,se,we,We,gt){this.name=p,this.type=l,this.handler=O,this.target=F,this.phase=se,this.sourceSpan=we,this.handlerSpan=We,this.keySpan=gt}static fromParsedEvent(p){const l=p.type===Hc.Regular?p.targetOrPhase:null,O=p.type===Hc.Animation?p.targetOrPhase:null;if(void 0===p.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${p.name}: ${p.sourceSpan}`);return new v0(p.name,p.type,p.handler,l,O,p.sourceSpan,p.handlerSpan,p.keySpan)}visit(p){return p.visitBoundEvent(this)}}class Fh{constructor(p,l,O,F,se,we,We,gt,Ft,pn){this.name=p,this.attributes=l,this.inputs=O,this.outputs=F,this.children=se,this.references=we,this.sourceSpan=We,this.startSourceSpan=gt,this.endSourceSpan=Ft,this.i18n=pn}visit(p){return p.visitElement(this)}}class Cp{constructor(p,l,O,F){this.nameSpan=p,this.sourceSpan=l,this.prefetchSpan=O,this.whenOrOnSourceSpan=F}visit(p){return p.visitDeferredTrigger(this)}}class xM extends Cp{constructor(p,l,O,F){super(null,l,O,F),this.value=p}}class SM extends Cp{}class WE extends Cp{}class Wd extends Cp{constructor(p,l,O,F,se){super(l,O,F,se),this.reference=p}}class Ib extends Cp{constructor(p,l,O,F,se){super(l,O,F,se),this.delay=p}}class Pb extends Cp{constructor(p,l,O,F,se){super(l,O,F,se),this.reference=p}}class Mb extends Cp{constructor(p,l,O,F,se){super(l,O,F,se),this.reference=p}}class ff{constructor(p,l,O,F){this.nameSpan=p,this.sourceSpan=l,this.startSourceSpan=O,this.endSourceSpan=F}}class $E extends ff{constructor(p,l,O,F,se,we,We){super(O,F,se,we),this.children=p,this.minimumTime=l,this.i18n=We}visit(p){return p.visitDeferredBlockPlaceholder(this)}}class Rb extends ff{constructor(p,l,O,F,se,we,We,gt){super(F,se,we,We),this.children=p,this.afterTime=l,this.minimumTime=O,this.i18n=gt}visit(p){return p.visitDeferredBlockLoading(this)}}class f_ extends ff{constructor(p,l,O,F,se,we){super(l,O,F,se),this.children=p,this.i18n=we}visit(p){return p.visitDeferredBlockError(this)}}class dm extends ff{constructor(p,l,O,F,se,we,We,gt,Ft,pn,fi,_o){super(We,gt,pn,fi),this.children=p,this.placeholder=F,this.loading=se,this.error=we,this.mainBlockSpan=Ft,this.i18n=_o,this.triggers=l,this.prefetchTriggers=O,this.definedTriggers=Object.keys(l),this.definedPrefetchTriggers=Object.keys(O)}visit(p){return p.visitDeferredBlock(this)}visitAll(p){this.visitTriggers(this.definedTriggers,this.triggers,p),this.visitTriggers(this.definedPrefetchTriggers,this.prefetchTriggers,p),kl(p,this.children),kl(p,[this.placeholder,this.loading,this.error].filter(O=>null!==O))}visitTriggers(p,l,O){kl(O,p.map(F=>l[F]))}}class YL extends ff{constructor(p,l,O,F,se,we,We){super(We,F,se,we),this.expression=p,this.cases=l,this.unknownBlocks=O}visit(p){return p.visitSwitchBlock(this)}}class EM extends ff{constructor(p,l,O,F,se,we,We){super(we,O,F,se),this.expression=p,this.children=l,this.i18n=We}visit(p){return p.visitSwitchBlockCase(this)}}class ZT extends ff{constructor(p,l,O,F,se,we,We,gt,Ft,pn,fi,_o,Po){super(_o,gt,pn,fi),this.item=p,this.expression=l,this.trackBy=O,this.trackKeywordSpan=F,this.contextVariables=se,this.children=we,this.empty=We,this.mainBlockSpan=Ft,this.i18n=Po}visit(p){return p.visitForLoopBlock(this)}}class QT extends ff{constructor(p,l,O,F,se,we){super(se,l,O,F),this.children=p,this.i18n=we}visit(p){return p.visitForLoopBlockEmpty(this)}}class C0 extends ff{constructor(p,l,O,F,se){super(se,l,O,F),this.branches=p}visit(p){return p.visitIfBlock(this)}}class jE extends ff{constructor(p,l,O,F,se,we,We,gt){super(We,F,se,we),this.expression=p,this.children=l,this.expressionAlias=O,this.i18n=gt}visit(p){return p.visitIfBlockBranch(this)}}class KE{constructor(p,l,O){this.name=p,this.sourceSpan=l,this.nameSpan=O}visit(p){return p.visitUnknownBlock(this)}}class OM{constructor(p,l,O,F,se){this.name=p,this.value=l,this.sourceSpan=O,this.nameSpan=F,this.valueSpan=se}visit(p){return p.visitLetDeclaration(this)}}class mf{constructor(p,l,O,F,se,we,We,gt,Ft,pn,fi,_o){this.tagName=p,this.attributes=l,this.inputs=O,this.outputs=F,this.templateAttrs=se,this.children=we,this.references=We,this.variables=gt,this.sourceSpan=Ft,this.startSourceSpan=pn,this.endSourceSpan=fi,this.i18n=_o}visit(p){return p.visitTemplate(this)}}class XE{constructor(p,l,O,F,se){this.selector=p,this.attributes=l,this.children=O,this.sourceSpan=F,this.i18n=se,this.name="ng-content"}visit(p){return p.visitContent(this)}}class kb{constructor(p,l,O,F,se){this.name=p,this.value=l,this.sourceSpan=O,this.keySpan=F,this.valueSpan=se}visit(p){return p.visitVariable(this)}}class ey{constructor(p,l,O,F,se){this.name=p,this.value=l,this.sourceSpan=O,this.keySpan=F,this.valueSpan=se}visit(p){return p.visitReference(this)}}class Lb{constructor(p,l,O,F){this.vars=p,this.placeholders=l,this.sourceSpan=O,this.i18n=F}visit(p){return p.visitIcu(this)}}function kl(v,p){const l=[];if(v.visit)for(const O of p)v.visit(O)||O.visit(v);else for(const O of p){const F=O.visit(v);F&&l.push(F)}return l}class mu{constructor(p,l,O,F,se,we){this.nodes=p,this.placeholders=l,this.placeholderToMessage=O,this.meaning=F,this.description=se,this.customId=we,this.legacyIds=[],this.id=this.customId,this.messageString=function qT(v){const p=new YV;return v.map(O=>O.visit(p)).join("")}(this.nodes),this.sources=p.length?[{filePath:p[0].sourceSpan.start.file.url,startLine:p[0].sourceSpan.start.line+1,startCol:p[0].sourceSpan.start.col+1,endLine:p[p.length-1].sourceSpan.end.line+1,endCol:p[0].sourceSpan.start.col+1}]:[]}}class yp{constructor(p,l){this.value=p,this.sourceSpan=l}visit(p,l){return p.visitText(this,l)}}class cg{constructor(p,l){this.children=p,this.sourceSpan=l}visit(p,l){return p.visitContainer(this,l)}}class m_{constructor(p,l,O,F,se){this.expression=p,this.type=l,this.cases=O,this.sourceSpan=F,this.expressionPlaceholder=se}visit(p,l){return p.visitIcu(this,l)}}class dg{constructor(p,l,O,F,se,we,We,gt,Ft){this.tag=p,this.attrs=l,this.startName=O,this.closeName=F,this.children=se,this.isVoid=we,this.sourceSpan=We,this.startSourceSpan=gt,this.endSourceSpan=Ft}visit(p,l){return p.visitTagPlaceholder(this,l)}}class um{constructor(p,l,O){this.value=p,this.name=l,this.sourceSpan=O}visit(p,l){return p.visitPlaceholder(this,l)}}class Lv{constructor(p,l,O){this.value=p,this.name=l,this.sourceSpan=O}visit(p,l){return p.visitIcuPlaceholder(this,l)}}class __{constructor(p,l,O,F,se,we,We,gt){this.name=p,this.parameters=l,this.startName=O,this.closeName=F,this.children=se,this.sourceSpan=we,this.startSourceSpan=We,this.endSourceSpan=gt}visit(p,l){return p.visitBlockPlaceholder(this,l)}}class YV{visitText(p){return p.value}visitContainer(p){return p.children.map(l=>l.visit(this)).join("")}visitIcu(p){const l=Object.keys(p.cases).map(O=>`${O} {${p.cases[O].visit(this)}}`);return`{${p.expressionPlaceholder}, ${p.type}, ${l.join(" ")}}`}visitTagPlaceholder(p){const l=p.children.map(O=>O.visit(this)).join("");return`{$${p.startName}}${l}{$${p.closeName}}`}visitPlaceholder(p){return`{$${p.name}}`}visitIcuPlaceholder(p){return`{$${p.name}}`}visitBlockPlaceholder(p){const l=p.children.map(O=>O.visit(this)).join("");return`{$${p.startName}}${l}{$${p.closeName}}`}}new class QL{visitTag(p){const l=this._serializeAttributes(p.attrs);if(0==p.children.length)return`<${p.name}${l}/>`;const O=p.children.map(F=>F.visit(this));return`<${p.name}${l}>${O.join("")}</${p.name}>`}visitText(p){return p.value}visitDeclaration(p){return`<?xml${this._serializeAttributes(p.attrs)} ?>`}_serializeAttributes(p){const l=Object.keys(p).map(O=>`${O}="${p[O]}"`).join(" ");return l.length>0?" "+l:""}visitDoctype(p){return`<!DOCTYPE ${p.rootTag} [\n${p.dtd}\n]>`}};const Nb="i18n",nB="i18n-";function oD(v){return v===Nb||v.startsWith(nB)}function x0(v){return v.nodes[0]}function sD(v={},p){const l={};return v&&Object.keys(v).length&&Object.keys(v).forEach(O=>l[Fb(O,p)]=v[O]),l}function Fb(v,p=!0){const l=function Bb(v){return v.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}(v);if(!p)return l;const O=l.split("_");if(1===O.length)return v.toLowerCase();let F;/^\d+$/.test(O[O.length-1])&&(F=O.pop());let se=O.shift().toLowerCase();return O.length&&(se+=O.map(we=>we.charAt(0).toUpperCase()+we.slice(1).toLowerCase()).join("")),F?`${se}_${F}`:se}const ZE=/[-.]/,S0="_t",ny="ctx",aD="rf";function IM(v,p){let l=null;return()=>(l||(v(new Rl(S0,void 0,rf)),l=Xs(p)),l)}function ph(v){return Array.isArray(v)?Ns(v.map(ph)):no(v,sg)}function lD(v,p){const l=Object.getOwnPropertyNames(v);return 0===l.length?null:nc(l.map(O=>{const F=v[O];let se,we,We,gt;if("string"==typeof F)se=O,We=O,we=F,gt=ph(we);else{We=O,se=F.classPropertyName,we=F.bindingPropertyName;const Ft=we!==se,pn=null!==F.transformFunction;let fi=nb.None;if(F.isSignal&&(fi|=nb.SignalBased),pn&&(fi|=nb.HasDecoratorInputTransform),p&&(Ft||pn||fi!==nb.None)){const _o=[no(fi),ph(we)];(Ft||pn)&&(_o.push(ph(se)),pn&&_o.push(F.transformFunction)),gt=Ns(_o)}else gt=ph(we)}return{key:We,quoted:ZE.test(We),value:gt}}))}class Jc{constructor(){this.values=[]}set(p,l){if(l){const O=this.values.find(F=>F.key===p);O?O.value=l:this.values.push({key:p,value:l,quoted:!1})}}toLiteralMap(){return nc(this.values)}}function PM(v,p){let l=null;const O={name:v.name,type:v.type,typeArgumentCount:v.typeArgumentCount,deps:[],target:sm.Injectable};if(void 0!==v.useClass){const We=v.useClass.expression.isEquivalent(v.type.value);let gt;void 0!==v.deps&&(gt=v.deps),l=void 0!==gt?p_({...O,delegate:v.useClass.expression,delegateDeps:gt,delegateType:wb.Class}):We?p_(O):{statements:[],expression:_f(v.type.value,v.useClass.expression,p)}}else l=void 0!==v.useFactory?void 0!==v.deps?p_({...O,delegate:v.useFactory,delegateDeps:v.deps||[],delegateType:wb.Function}):{statements:[],expression:Zc([],v.useFactory.callFn([]))}:void 0!==v.useValue?p_({...O,expression:v.useValue.expression}):void 0!==v.useExisting?p_({...O,expression:kr(Bi.inject).callFn([v.useExisting.expression])}):{statements:[],expression:_f(v.type.value,v.type.value,p)};const F=v.type.value,se=new Jc;return se.set("token",F),se.set("factory",l.expression),null!==v.providedIn.expression.value&&se.set("providedIn",Pv(v.providedIn)),{expression:kr(Bi.\u0275\u0275defineInjectable).callFn([se.toLiteralMap()],void 0,!0),type:Fv(v),statements:l.statements}}function Fv(v){return new Zf(kr(Bi.InjectableDeclaration,[df(v.type.type,v.typeArgumentCount)]))}function _f(v,p,l){return v.node===p.node?p.prop("\u0275fac"):oy(l?kr(Bi.resolveForwardRef).callFn([p]):p)}function oy(v){return Zc([new vc("t",rf)],v.prop("\u0275fac").callFn([Xs("t")]))}const MM=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class Vb{static fromArray(p){return p?(function cD(v,p){if(null!=p&&(!Array.isArray(p)||2!=p.length))throw new Error(`Expected '${v}' to be an array, [start, end].`);if(null!=p){const l=p[0],O=p[1];MM.forEach(F=>{if(F.test(l)||F.test(O))throw new Error(`['${l}', '${O}'] contains unusable interpolation symbol.`)})}}("interpolation",p),new Vb(p[0],p[1])):$d}constructor(p,l){this.start=p,this.end=l}}const $d=new Vb("{{","}}"),hm=new Set(["switch"]),Wu=0,dD=9,gD=32,Ub=48,qE=57,_d=65,vD=90,C_=97,xp=122,mm=123,Hh=125,nO=160;function Cf(v){return v>=dD&&v<=gD||v==nO}function Sp(v){return Ub<=v&&v<=qE}function Gb(v){return v>=C_&&v<=xp||v>=_d&&v<=vD}function iO(v){return 10===v||13===v}function BM(v){return Ub<=v&&v<=55}function ry(v){return 39===v||34===v||96===v}class zv{constructor(p,l,O,F){this.file=p,this.offset=l,this.line=O,this.col=F}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(p){const l=this.file.content,O=l.length;let F=this.offset,se=this.line,we=this.col;for(;F>0&&p<0;)if(F--,p++,10==l.charCodeAt(F)){se--;const gt=l.substring(0,F-1).lastIndexOf(String.fromCharCode(10));we=gt>0?F-gt:F}else we--;for(;F<O&&p>0;){const We=l.charCodeAt(F);F++,p--,10==We?(se++,we=0):we++}return new zv(this.file,F,se,we)}getContext(p,l){const O=this.file.content;let F=this.offset;if(null!=F){F>O.length-1&&(F=O.length-1);let se=F,we=0,We=0;for(;we<p&&F>0&&(F--,we++,"\n"!=O[F]||++We!=l););for(we=0,We=0;we<p&&se<O.length-1&&(se++,we++,"\n"!=O[se]||++We!=l););return{before:O.substring(F,this.offset),after:O.substring(this.offset,se+1)}}return null}}class Ep{constructor(p,l){this.content=p,this.url=l}}class Ws{constructor(p,l,O=p,F=null){this.start=p,this.end=l,this.fullStart=O,this.details=F}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var _m=function(v){return v[v.WARNING=0]="WARNING",v[v.ERROR=1]="ERROR",v}(_m||{});class ea{constructor(p,l,O=_m.ERROR){this.span=p,this.msg=l,this.level=O}contextualMessage(){const p=this.span.start.getContext(100,3);return p?`${this.msg} ("${p.before}[${_m[this.level]} ->]${p.after}")`:this.msg}toString(){const p=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${p}`}}let xD=0;function pg(v){return v.replace(/\W/g,"_")}const SD='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';class dB extends PE{constructor(){super(!1)}visitWrappedNodeExpr(p,l){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(p,l){return l.print(p,`var ${p.name}`),p.value&&(l.print(p," = "),p.value.visitExpression(this,l)),l.println(p,";"),null}visitTaggedTemplateExpr(p,l){const O=p.template.elements;return p.tag.visitExpression(this,l),l.print(p,`(${SD}(`),l.print(p,`[${O.map(F=>Iv(F.text,!1)).join(", ")}], `),l.print(p,`[${O.map(F=>Iv(F.rawText,!1)).join(", ")}])`),p.template.expressions.forEach(F=>{l.print(p,", "),F.visitExpression(this,l)}),l.print(p,")"),null}visitFunctionExpr(p,l){return l.print(p,`function${p.name?" "+p.name:""}(`),this._visitParams(p.params,l),l.println(p,") {"),l.incIndent(),this.visitAllStatements(p.statements,l),l.decIndent(),l.print(p,"}"),null}visitArrowFunctionExpr(p,l){if(l.print(p,"("),this._visitParams(p.params,l),l.print(p,") =>"),Array.isArray(p.body))l.println(p,"{"),l.incIndent(),this.visitAllStatements(p.body,l),l.decIndent(),l.print(p,"}");else{const O=p.body instanceof uu;O&&l.print(p,"("),p.body.visitExpression(this,l),O&&l.print(p,")")}return null}visitDeclareFunctionStmt(p,l){return l.print(p,`function ${p.name}(`),this._visitParams(p.params,l),l.println(p,") {"),l.incIndent(),this.visitAllStatements(p.statements,l),l.decIndent(),l.println(p,"}"),null}visitLocalizedString(p,l){l.print(p,`$localize(${SD}(`);const O=[p.serializeI18nHead()];for(let F=1;F<p.messageParts.length;F++)O.push(p.serializeI18nTemplatePart(F));return l.print(p,`[${O.map(F=>Iv(F.cooked,!1)).join(", ")}], `),l.print(p,`[${O.map(F=>Iv(F.raw,!1)).join(", ")}])`),p.expressions.forEach(F=>{l.print(p,", "),F.visitExpression(this,l)}),l.print(p,")"),null}_visitParams(p,l){this.visitAllObjects(O=>l.print(null,O.name),p,l,",")}}let Wb;function ED(...v){if(!bb.trustedTypes)return new Function(...v);const O=`(function anonymous(${v.slice(0,-1).join(",")}\n) { ${v[v.length-1]}\n})`,F=bb.eval(function uB(v){return function NM(){if(void 0===Wb){const v=bb.trustedTypes;if(Wb=null,v)try{Wb=v.createPolicy("angular#unsafe-jit",{createScript:p=>p})}catch{}}return Wb}()?.createScript(v)||v}(O));return void 0===F.bind?new Function(...v):(F.toString=()=>O,F.bind(bb))}class hB{evaluateStatements(p,l,O,F){const se=new pB(O),we=IE.createRoot();return l.length>0&&!function oO(v){return v.isEquivalent(no("use strict").toStmt())}(l[0])&&(l=[no("use strict").toStmt(),...l]),se.visitAllStatements(l,we),se.createReturnStmt(we),this.evaluateCode(p,we,se.getArgs(),F)}evaluateCode(p,l,O,F){let se=`"use strict";${l.toSource()}\n//# sourceURL=${p}`;const we=[],We=[];for(const Ft in O)We.push(O[Ft]),we.push(Ft);if(F){const Ft=ED(...we.concat("return null;")).toString(),pn=Ft.slice(0,Ft.indexOf("return null;")).split("\n").length-1;se+=`\n${l.toSourceMapGenerator(p,pn).toJsComment()}`}const gt=ED(...we.concat(se));return this.executeFunction(gt,We)}executeFunction(p,l){return p(...l)}}class pB extends dB{constructor(p){super(),this.refResolver=p,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(p){new pu(new uu(this._evalExportedVars.map(O=>new em(O,Xs(O),!1)))).visitStatement(this,p)}getArgs(){const p={};for(let l=0;l<this._evalArgNames.length;l++)p[this._evalArgNames[l]]=this._evalArgValues[l];return p}visitExternalExpr(p,l){return this._emitReferenceToExternal(p,this.refResolver.resolveExternalReference(p.value),l),null}visitWrappedNodeExpr(p,l){return this._emitReferenceToExternal(p,p.node,l),null}visitDeclareVarStmt(p,l){return p.hasModifier(Xc.Exported)&&this._evalExportedVars.push(p.name),super.visitDeclareVarStmt(p,l)}visitDeclareFunctionStmt(p,l){return p.hasModifier(Xc.Exported)&&this._evalExportedVars.push(p.name),super.visitDeclareFunctionStmt(p,l)}_emitReferenceToExternal(p,l,O){let F=this._evalArgValues.indexOf(l);if(-1===F){F=this._evalArgValues.length,this._evalArgValues.push(l);const se=function cB(v){if(!v||!v.reference)return null;const p=v.reference;if(p.__anonymousType)return p.__anonymousType;if(p.__forward_ref__)return"__forward_ref__";let l=AE(p);return l.indexOf("(")>=0?(l="anonymous_"+xD++,p.__anonymousType=l):l=pg(l),l}({reference:l})||"val";this._evalArgNames.push(`jit_${se}_${F}`)}O.print(p,this._evalArgNames[F])}}function OD(v){const p=new Jc;return null!==v.providers&&p.set("providers",v.providers),v.imports.length>0&&p.set("imports",Ns(v.imports)),{expression:kr(Bi.defineInjector).callFn([p.toLiteralMap()],void 0,!0),type:I0(v),statements:[]}}function I0(v){return new Zf(kr(Bi.InjectorDeclaration,[new Zf(v.type.type)]))}class FM{constructor(p){this.context=p}resolveExternalReference(p){if("@angular/core"!==p.moduleName)throw new Error(`Cannot resolve external reference to ${p.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(p.name))throw new Error(`No value provided for @angular/core symbol '${p.name}'.`);return this.context[p.name]}}var Gv=function(v){return v[v.Inline=0]="Inline",v[v.SideEffect=1]="SideEffect",v[v.Omit=2]="Omit",v}(Gv||{}),Ku=function(v){return v[v.Global=0]="Global",v[v.Local=1]="Local",v}(Ku||{});function VM(v){const p=[],l=new Jc;if(l.set("type",v.type.value),v.kind===Ku.Global&&v.bootstrap.length>0&&l.set("bootstrap",uf(v.bootstrap,v.containsForwardDecls)),v.selectorScopeMode===Gv.Inline)v.declarations.length>0&&l.set("declarations",uf(v.declarations,v.containsForwardDecls)),v.imports.length>0&&l.set("imports",uf(v.imports,v.containsForwardDecls)),v.exports.length>0&&l.set("exports",uf(v.exports,v.containsForwardDecls));else if(v.selectorScopeMode===Gv.SideEffect){const se=function P0(v){const p=new Jc;if(v.kind===Ku.Global?v.declarations.length>0&&p.set("declarations",uf(v.declarations,v.containsForwardDecls)):v.declarationsExpression&&p.set("declarations",v.declarationsExpression),v.kind===Ku.Global?v.imports.length>0&&p.set("imports",uf(v.imports,v.containsForwardDecls)):v.importsExpression&&p.set("imports",v.importsExpression),v.kind===Ku.Global?v.exports.length>0&&p.set("exports",uf(v.exports,v.containsForwardDecls)):v.exportsExpression&&p.set("exports",v.exportsExpression),v.kind===Ku.Local&&v.bootstrapExpression&&p.set("bootstrap",v.bootstrapExpression),0===Object.keys(p.values).length)return null;const O=function HT(v){return function kE(v,p){const l=new qf({name:v,moduleName:null}),O=new Ua(hs.Identical,new af(l),no("undefined")),F=new Ua(hs.Or,O,l,void 0,void 0,!0);return new Ua(hs.And,F,p)}("ngJitMode",v)}(new _c(kr(Bi.setNgModuleScope),[v.type.value,p.toLiteralMap()])),F=new Rh([],[O.toStmt()]);return new _c(F,[]).toStmt()}(v);null!==se&&p.push(se)}return null!==v.schemas&&v.schemas.length>0&&l.set("schemas",Ns(v.schemas.map(se=>se.value))),null!==v.id&&(l.set("id",v.id),p.push(kr(Bi.registerNgModuleType).callFn([v.type.value,v.id]).toStmt())),{expression:kr(Bi.defineNgModule).callFn([l.toLiteralMap()],void 0,!0),type:sO(v),statements:p}}function sO(v){if(v.kind===Ku.Local)return new Zf(v.type.value);const{type:p,declarations:l,exports:O,imports:F,includeImportTypes:se,publicDeclarationTypes:we}=v;return new Zf(kr(Bi.NgModuleDeclaration,[new Zf(p.type),null===we?$b(l):wD(we),se?$b(F):Jf,$b(O)]))}function $b(v){const p=v.map(l=>tc(l.type));return v.length>0?Yc(Ns(p)):Jf}function wD(v){const p=v.map(l=>tc(l));return v.length>0?Yc(Ns(p)):Jf}function HM(v){const p=[];return p.push({key:"name",value:no(v.pipeName),quoted:!1}),p.push({key:"type",value:v.type.value,quoted:!1}),p.push({key:"pure",value:no(v.pure),quoted:!1}),v.isStandalone&&p.push({key:"standalone",value:no(!0),quoted:!1}),{expression:kr(Bi.definePipe).callFn([nc(p)],void 0,!0),type:aO(v),statements:[]}}function aO(v){return new Zf(kr(Bi.PipeDeclaration,[df(v.type.type,v.typeArgumentCount),new Zf(new fd(v.pipeName)),new Zf(new fd(v.isStandalone))]))}var Wv=function(v){return v[v.Directive=0]="Directive",v[v.Pipe=1]="Pipe",v[v.NgModule=2]="NgModule",v}(Wv||{});const M0=new Set(["inherit","initial","revert","unset","alternate","alternate-reverse","normal","reverse","backwards","both","forwards","none","paused","running","ease","ease-in","ease-in-out","ease-out","linear","step-start","step-end","end","jump-both","jump-end","jump-none","jump-start","start"]),TD=["@media","@supports","@document","@layer","@container","@scope","@starting-style"];class lO{constructor(){this._animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g}shimCssText(p,l,O=""){const F=[];p=p.replace(e2,We=>{if(We.match(RD))F.push(We);else{const gt=We.match(fB);F.push((gt?.join("")??"")+"\n")}return cO}),p=this._insertDirectives(p);const se=this._scopeCssText(p,l,O);let we=0;return se.replace(kD,()=>F[we++])}_insertDirectives(p){return p=this._insertPolyfillDirectivesInCssText(p),this._insertPolyfillRulesInCssText(p)}_scopeKeyframesRelatedCss(p,l){const O=new Set,F=uO(p,se=>this._scopeLocalKeyframeDeclarations(se,l,O));return uO(F,se=>this._scopeAnimationRule(se,l,O))}_scopeLocalKeyframeDeclarations(p,l,O){return{...p,selector:p.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(F,se,we,We,gt)=>(O.add(Yb(We,we)),`${se}${we}${l}_${We}${we}${gt}`))}}_scopeAnimationKeyframe(p,l,O){return p.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(F,se,we,We,gt)=>`${se}${we}${We=`${O.has(Yb(We,we))?l+"_":""}${We}`}${we}${gt}`)}_scopeAnimationRule(p,l,O){let F=p.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(se,we,We)=>we+We.replace(this._animationDeclarationKeyframesRe,(gt,Ft,pn="",fi,_o)=>fi?`${Ft}${this._scopeAnimationKeyframe(`${pn}${fi}${pn}`,l,O)}`:M0.has(_o)?gt:`${Ft}${this._scopeAnimationKeyframe(_o,l,O)}`));return F=F.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(se,we,We)=>`${we}${We.split(",").map(gt=>this._scopeAnimationKeyframe(gt,l,O)).join(",")}`),{...p,content:F}}_insertPolyfillDirectivesInCssText(p){return p.replace(AD,function(...l){return l[2]+"{"})}_insertPolyfillRulesInCssText(p){return p.replace(UM,(...l)=>{const O=l[0].replace(l[1],"").replace(l[2],"");return l[4]+O})}_scopeCssText(p,l,O){const F=this._extractUnscopedRulesFromCssText(p);return p=this._insertPolyfillHostInCssText(p),p=this._convertColonHost(p),p=this._convertColonHostContext(p),p=this._convertShadowDOMSelectors(p),l&&(p=this._scopeKeyframesRelatedCss(p,l),p=this._scopeSelectors(p,l,O)),(p=p+"\n"+F).trim()}_extractUnscopedRulesFromCssText(p){let O,l="";for(jb.lastIndex=0;null!==(O=jb.exec(p));)l+=O[0].replace(O[2],"").replace(O[1],O[4])+"\n\n";return l}_convertColonHost(p){return p.replace(zM,(l,O,F)=>{if(O){const se=[],we=O.split(",").map(We=>We.trim());for(const We of we){if(!We)break;const gt=sy+We.replace(R0,"")+F;se.push(gt)}return se.join(",")}return sy+F})}_convertColonHostContext(p){return p.replace(GM,l=>{const O=[[]];let F;for(;F=gB.exec(l);){const se=(F[1]??"").trim().split(",").map(We=>We.trim()).filter(We=>""!==We),we=O.length;r2(O,se.length);for(let We=0;We<se.length;We++)for(let gt=0;gt<we;gt++)O[gt+We*we].push(se[We]);l=F[2]}return O.map(se=>function o2(v,p){const l=sy;Bl.lastIndex=0;const O=Bl.test(p);if(0===v.length)return l+p;const F=[v.pop()||""];for(;v.length>0;){const se=F.length,we=v.pop();for(let We=0;We<se;We++){const gt=F[We];F[2*se+We]=gt+" "+we,F[se+We]=we+" "+gt,F[We]=we+gt}}return F.map(se=>O?`${se}${p}`:`${se}${l}${p}, ${se} ${l}${p}`).join(",")}(se,l)).join(", ")})}_convertShadowDOMSelectors(p){return Kb.reduce((l,O)=>l.replace(O," "),p)}_scopeSelectors(p,l,O){return uO(p,F=>{let se=F.selector,we=F.content;return"@"!==F.selector[0]?se=this._scopeSelector(F.selector,l,O):TD.some(We=>F.selector.startsWith(We))?we=this._scopeSelectors(F.content,l,O):(F.selector.startsWith("@font-face")||F.selector.startsWith("@page"))&&(we=this._stripScopingSelectors(F.content)),new KM(se,we)})}_stripScopingSelectors(p){return uO(p,l=>{const O=l.selector.replace(Xb," ").replace(WM," ");return new KM(O,l.content)})}_scopeSelector(p,l,O){return p.split(/ ?, ?/).map(F=>F.split(Xb)).map(F=>{const[se,...we]=F;return[(gt=>this._selectorNeedsScoping(gt,l)?this._applySelectorScope(gt,l,O):gt)(se),...we].join(" ")}).join(", ")}_selectorNeedsScoping(p,l){return!this._makeScopeMatcher(l).test(p)}_makeScopeMatcher(p){return p=p.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+p+")"+$M,"m")}_applySimpleSelectorScope(p,l,O){if(Bl.lastIndex=0,Bl.test(p)){const F=`[${O}]`;return p.replace(WM,(se,we)=>we.replace(/([^:]*)(:*)(.*)/,(We,gt,Ft,pn)=>gt+F+Ft+pn)).replace(Bl,F+" ")}return l+" "+p}_applySelectorScope(p,l,O){const se="["+(l=l.replace(/\[is=([^\]]*)\]/g,(Rr,...br)=>br[0]))+"]",we=Rr=>{let br=Rr.trim();if(!br)return Rr;if(Rr.includes(sy))br=this._applySimpleSelectorScope(Rr,l,O);else{const cr=Rr.replace(Bl,"");if(cr.length>0){const ds=cr.match(/([^:]*)(:*)(.*)/);ds&&(br=ds[1]+se+ds[2]+ds[3])}}return br},We=new DD(p);let pn,gt="",Ft=0;const fi=/( |>|\+|~(?!=))\s*/g;let Po=!(p=We.content()).includes(sy);for(;null!==(pn=fi.exec(p));){const Rr=pn[1],br=p.slice(Ft,pn.index);br.match(/__esc-ph-(\d+)__/)&&p[pn.index+1]?.match(/[a-fA-F\d]/)||(Po=Po||br.includes(sy),gt+=`${Po?we(br):br} ${Rr} `,Ft=fi.lastIndex)}const Ro=p.substring(Ft);return Po=Po||Ro.includes(sy),gt+=Po?we(Ro):Ro,We.restore(gt)}_insertPolyfillHostInCssText(p){return p.replace(k0,ID).replace(MD,R0)}}class DD{constructor(p){this.placeholders=[],this.index=0,p=(p=this._escapeRegexMatches(p,/(\[[^\]]*\])/g)).replace(/(\\.)/g,(l,O)=>{const F=`__esc-ph-${this.index}__`;return this.placeholders.push(O),this.index++,F}),this._content=p.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(l,O,F)=>{const se=`__ph-${this.index}__`;return this.placeholders.push(F),this.index++,O+se})}restore(p){return p.replace(/__(?:ph|esc-ph)-(\d+)__/g,(l,O)=>this.placeholders[+O])}content(){return this._content}_escapeRegexMatches(p,l){return p.replace(l,(O,F)=>{const se=`__ph-${this.index}__`;return this.placeholders.push(F),this.index++,se})}}const AD=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,UM=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,jb=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,R0="-shadowcsshost",ID="-shadowcsscontext",PD="(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",zM=new RegExp(R0+PD,"gim"),GM=new RegExp(ID+PD,"gim"),gB=new RegExp(ID+PD,"im"),sy=R0+"-no-combinator",WM=/-shadowcsshost-no-combinator([^\s]*)/,Kb=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Xb=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,$M="([>\\s~+[.,{:][\\s\\S]*)?$",Bl=/-shadowcsshost/gim,MD=/:host/gim,k0=/:host-context/gim,fB=/\r?\n/g,e2=/\/\*[\s\S]*?\*\//g,RD=/\/\*\s*#\s*source(Mapping)?URL=/g,cO="%COMMENT%",kD=new RegExp(cO,"g"),L0="%BLOCK%",jM=new RegExp(`(\\s*(?:${cO}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),dO=new Map([["{","}"]]),LD="%COMMA_IN_PLACEHOLDER%",BD="%SEMI_IN_PLACEHOLDER%",ND="%COLON_IN_PLACEHOLDER%",t2=new RegExp(LD,"g"),n2=new RegExp(BD,"g"),i2=new RegExp(ND,"g");class KM{constructor(p,l){this.selector=p,this.content=l}}function uO(v,p){const l=function XM(v){let p=v,l=null;for(let O=0;O<p.length;O++){const F=p[O];if("\\"===F)O++;else if(null!==l)if(F===l)l=null;else{const se=FD[F];se&&(p=`${p.substr(0,O)}${se}${p.substr(O+1)}`,O+=se.length-1)}else("'"===F||'"'===F)&&(l=F)}return p}(v),O=function mB(v,p,l){const O=[],F=[];let gt,Ft,se=0,we=0,We=-1;for(let pn=0;pn<v.length;pn++){const fi=v[pn];"\\"===fi?pn++:fi===Ft?(se--,0===se&&(F.push(v.substring(We,pn)),O.push(l),we=pn,We=-1,gt=Ft=void 0)):fi===gt?se++:0===se&&p.has(fi)&&(gt=fi,Ft=p.get(fi),se=1,We=pn+1,O.push(v.substring(we,We)))}return-1!==We?(F.push(v.substring(We)),O.push(l)):O.push(v.substring(we)),new hO(O.join(""),F)}(l,dO,L0);let F=0;return function YM(v){let p=v.replace(t2,",");return p=p.replace(n2,";"),p=p.replace(i2,":"),p}(O.escapedString.replace(jM,(...we)=>{const We=we[2];let gt="",Ft=we[4],pn="";Ft&&Ft.startsWith("{"+L0)&&(gt=O.blocks[F++],Ft=Ft.substring(L0.length+1),pn="{");const fi=p(new KM(We,gt));return`${we[1]}${fi.selector}${we[3]}${pn}${fi.content}${Ft}`}))}class hO{constructor(p,l){this.escapedString=p,this.blocks=l}}const FD={";":BD,",":LD,":":ND};function Yb(v,p){return p?v.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g,"$1"):v}function r2(v,p){const l=v.length;for(let O=1;O<p;O++)for(let F=0;F<l;F++)v[F+O*l]=v[F].slice(0)}var Qn=function(v){return v[v.ListEnd=0]="ListEnd",v[v.Statement=1]="Statement",v[v.Variable=2]="Variable",v[v.ElementStart=3]="ElementStart",v[v.Element=4]="Element",v[v.Template=5]="Template",v[v.ElementEnd=6]="ElementEnd",v[v.ContainerStart=7]="ContainerStart",v[v.Container=8]="Container",v[v.ContainerEnd=9]="ContainerEnd",v[v.DisableBindings=10]="DisableBindings",v[v.Conditional=11]="Conditional",v[v.EnableBindings=12]="EnableBindings",v[v.Text=13]="Text",v[v.Listener=14]="Listener",v[v.InterpolateText=15]="InterpolateText",v[v.Binding=16]="Binding",v[v.Property=17]="Property",v[v.StyleProp=18]="StyleProp",v[v.ClassProp=19]="ClassProp",v[v.StyleMap=20]="StyleMap",v[v.ClassMap=21]="ClassMap",v[v.Advance=22]="Advance",v[v.Pipe=23]="Pipe",v[v.Attribute=24]="Attribute",v[v.ExtractedAttribute=25]="ExtractedAttribute",v[v.Defer=26]="Defer",v[v.DeferOn=27]="DeferOn",v[v.DeferWhen=28]="DeferWhen",v[v.I18nMessage=29]="I18nMessage",v[v.HostProperty=30]="HostProperty",v[v.Namespace=31]="Namespace",v[v.ProjectionDef=32]="ProjectionDef",v[v.Projection=33]="Projection",v[v.RepeaterCreate=34]="RepeaterCreate",v[v.Repeater=35]="Repeater",v[v.TwoWayProperty=36]="TwoWayProperty",v[v.TwoWayListener=37]="TwoWayListener",v[v.DeclareLet=38]="DeclareLet",v[v.StoreLet=39]="StoreLet",v[v.I18nStart=40]="I18nStart",v[v.I18n=41]="I18n",v[v.I18nEnd=42]="I18nEnd",v[v.I18nExpression=43]="I18nExpression",v[v.I18nApply=44]="I18nApply",v[v.IcuStart=45]="IcuStart",v[v.IcuEnd=46]="IcuEnd",v[v.IcuPlaceholder=47]="IcuPlaceholder",v[v.I18nContext=48]="I18nContext",v[v.I18nAttributes=49]="I18nAttributes",v}(Qn||{}),Cs=function(v){return v[v.LexicalRead=0]="LexicalRead",v[v.Context=1]="Context",v[v.TrackContext=2]="TrackContext",v[v.ReadVariable=3]="ReadVariable",v[v.NextContext=4]="NextContext",v[v.Reference=5]="Reference",v[v.StoreLet=6]="StoreLet",v[v.ContextLetReference=7]="ContextLetReference",v[v.GetCurrentView=8]="GetCurrentView",v[v.RestoreView=9]="RestoreView",v[v.ResetView=10]="ResetView",v[v.PureFunctionExpr=11]="PureFunctionExpr",v[v.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",v[v.PipeBinding=13]="PipeBinding",v[v.PipeBindingVariadic=14]="PipeBindingVariadic",v[v.SafePropertyRead=15]="SafePropertyRead",v[v.SafeKeyedRead=16]="SafeKeyedRead",v[v.SafeInvokeFunction=17]="SafeInvokeFunction",v[v.SafeTernaryExpr=18]="SafeTernaryExpr",v[v.EmptyExpr=19]="EmptyExpr",v[v.AssignTemporaryExpr=20]="AssignTemporaryExpr",v[v.ReadTemporaryExpr=21]="ReadTemporaryExpr",v[v.SlotLiteralExpr=22]="SlotLiteralExpr",v[v.ConditionalCase=23]="ConditionalCase",v[v.ConstCollected=24]="ConstCollected",v[v.TwoWayBindingSet=25]="TwoWayBindingSet",v}(Cs||{}),yf=function(v){return v[v.None=0]="None",v[v.AlwaysInline=1]="AlwaysInline",v}(yf||{}),yu=function(v){return v[v.Context=0]="Context",v[v.Identifier=1]="Identifier",v[v.SavedView=2]="SavedView",v[v.Alias=3]="Alias",v}(yu||{}),gg=function(v){return v[v.Normal=0]="Normal",v[v.TemplateDefinitionBuilder=1]="TemplateDefinitionBuilder",v}(gg||{}),xs=function(v){return v[v.Attribute=0]="Attribute",v[v.ClassName=1]="ClassName",v[v.StyleProperty=2]="StyleProperty",v[v.Property=3]="Property",v[v.Template=4]="Template",v[v.I18n=5]="I18n",v[v.Animation=6]="Animation",v[v.TwoWayProperty=7]="TwoWayProperty",v}(xs||{}),B0=function(v){return v[v.Creation=0]="Creation",v[v.Postproccessing=1]="Postproccessing",v}(B0||{}),fg=function(v){return v[v.I18nText=0]="I18nText",v[v.I18nAttribute=1]="I18nAttribute",v}(fg||{}),rl=function(v){return v[v.None=0]="None",v[v.ElementTag=1]="ElementTag",v[v.TemplateTag=2]="TemplateTag",v[v.OpenTag=4]="OpenTag",v[v.CloseTag=8]="CloseTag",v[v.ExpressionIndex=16]="ExpressionIndex",v}(rl||{}),ic=function(v){return v[v.HTML=0]="HTML",v[v.SVG=1]="SVG",v[v.Math=2]="Math",v}(ic||{}),xl=function(v){return v[v.Idle=0]="Idle",v[v.Immediate=1]="Immediate",v[v.Timer=2]="Timer",v[v.Hover=3]="Hover",v[v.Interaction=4]="Interaction",v[v.Viewport=5]="Viewport",v}(xl||{}),Ic=function(v){return v[v.RootI18n=0]="RootI18n",v[v.Icu=1]="Icu",v[v.Attr=2]="Attr",v}(Ic||{}),gl=function(v){return v[v.NgTemplate=0]="NgTemplate",v[v.Structural=1]="Structural",v[v.Block=2]="Block",v}(gl||{});const Pc=Symbol("ConsumesSlot"),jd=Symbol("DependsOnSlotContext"),bu=Symbol("ConsumesVars"),VD=Symbol("UsesVarOffset"),mg={[Pc]:!0,numSlotsUsed:1},Uh={[jd]:!0},zh={[bu]:!0};function ay(v){return!0===v[Pc]}function pO(v){return!0===v[jd]}function gO(v){return!0===v[bu]}function _B(v){return!0===v[VD]}function bf(v){return{kind:Qn.Statement,statement:v,...ua}}function b_(v,p,l,O){return{kind:Qn.Variable,xref:v,variable:p,initializer:l,flags:O,...ua}}const ua={debugListId:null,prev:null,next:null};class Md{constructor(p,l,O){if(this.strings=p,this.expressions=l,this.i18nPlaceholders=O,0!==O.length&&O.length!==l.length)throw new Error(`Expected ${l.length} placeholders to match interpolation expression count, but got ${O.length}`)}}function xf(v,p,l,O,F,se,we,We,gt,Ft,pn){return{kind:Qn.Binding,bindingKind:p,target:v,name:l,expression:O,unit:F,securityContext:se,isTextAttribute:we,isStructuralTemplateAttribute:We,templateKind:gt,i18nContext:null,i18nMessage:Ft,sourceSpan:pn,...ua}}function ZM(v,p,l,O,F,se,we,We,gt,Ft){return{kind:Qn.Property,target:v,name:p,expression:l,isAnimationTrigger:O,securityContext:F,sanitizer:null,isStructuralTemplateAttribute:se,templateKind:we,i18nContext:We,i18nMessage:gt,sourceSpan:Ft,...Uh,...zh,...ua}}function CB(v,p,l,O,F,se,we,We,gt){return{kind:Qn.TwoWayProperty,target:v,name:p,expression:l,securityContext:O,sanitizer:null,isStructuralTemplateAttribute:F,templateKind:se,i18nContext:we,i18nMessage:We,sourceSpan:gt,...Uh,...zh,...ua}}function yB(v,p,l,O,F){return{kind:Qn.StyleProp,target:v,name:p,expression:l,unit:O,sourceSpan:F,...Uh,...zh,...ua}}function QM(v,p,l,O){return{kind:Qn.ClassProp,target:v,name:p,expression:l,sourceSpan:O,...Uh,...zh,...ua}}function JM(v,p,l){return{kind:Qn.StyleMap,target:v,expression:p,sourceSpan:l,...Uh,...zh,...ua}}function qM(v,p,l){return{kind:Qn.ClassMap,target:v,expression:p,sourceSpan:l,...Uh,...zh,...ua}}function bB(v,p,l,O,F,se,we,We,gt,Ft){return{kind:Qn.Attribute,target:v,namespace:p,name:l,expression:O,securityContext:F,sanitizer:null,isTextAttribute:se,isStructuralTemplateAttribute:we,templateKind:We,i18nContext:null,i18nMessage:gt,sourceSpan:Ft,...Uh,...zh,...ua}}function eR(v,p){return{kind:Qn.Advance,delta:v,sourceSpan:p,...ua}}function fO(v,p,l,O){return{kind:Qn.Conditional,target:v,test:p,conditions:l,processed:null,sourceSpan:O,contextValue:null,...ua,...Uh,...zh}}function s2(v,p,l,O){return{kind:Qn.DeferWhen,target:v,expr:p,prefetch:l,sourceSpan:O,...ua,...Uh,...zh}}function HD(v,p,l,O,F,se,we,We,gt,Ft,pn){return{kind:Qn.I18nExpression,context:v,target:p,i18nOwner:l,handle:O,expression:F,icuPlaceholder:se,i18nPlaceholder:we,resolutionTime:We,usage:gt,name:Ft,sourceSpan:pn,...ua,...zh,...Uh}}function N0(v,p,l){return{kind:Qn.I18nApply,owner:v,handle:p,sourceSpan:l,...ua}}var x_,mO,ly,F0,Sf,tR,V0,H0;function Ef(v){return v instanceof Nl}class Nl extends $a{constructor(p=null){super(null,p)}}class wl extends Nl{constructor(p){super(),this.name=p,this.kind=Cs.LexicalRead}visitExpression(p,l){}isEquivalent(p){return this.name===p.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new wl(this.name)}}class U0 extends Nl{constructor(p,l,O){super(),this.target=p,this.targetSlot=l,this.offset=O,this.kind=Cs.Reference}visitExpression(){}isEquivalent(p){return p instanceof U0&&p.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new U0(this.target,this.targetSlot,this.offset)}}class cy extends Nl{static{x_=bu,mO=jd}constructor(p,l,O){super(),this.target=p,this.value=l,this.sourceSpan=O,this.kind=Cs.StoreLet,this[x_]=!0,this[mO]=!0}visitExpression(){}isEquivalent(p){return p instanceof cy&&p.target===this.target&&p.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(p,l){this.value=Kr(this.value,p,l)}clone(){return new cy(this.target,this.value,this.sourceSpan)}}class S_ extends Nl{constructor(p,l){super(),this.target=p,this.targetSlot=l,this.kind=Cs.ContextLetReference}visitExpression(){}isEquivalent(p){return p instanceof S_&&p.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new S_(this.target,this.targetSlot)}}class vm extends Nl{constructor(p){super(),this.view=p,this.kind=Cs.Context}visitExpression(){}isEquivalent(p){return p instanceof vm&&p.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new vm(this.view)}}class Gh extends Nl{constructor(p){super(),this.view=p,this.kind=Cs.TrackContext}visitExpression(){}isEquivalent(p){return p instanceof Gh&&p.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new Gh(this.view)}}class E_ extends Nl{constructor(){super(),this.kind=Cs.NextContext,this.steps=1}visitExpression(){}isEquivalent(p){return p instanceof E_&&p.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){const p=new E_;return p.steps=this.steps,p}}class Tl extends Nl{constructor(){super(),this.kind=Cs.GetCurrentView}visitExpression(){}isEquivalent(p){return p instanceof Tl}isConstant(){return!1}transformInternalExpressions(){}clone(){return new Tl}}class gh extends Nl{constructor(p){super(),this.view=p,this.kind=Cs.RestoreView}visitExpression(p,l){"number"!=typeof this.view&&this.view.visitExpression(p,l)}isEquivalent(p){return p instanceof gh&&typeof p.view==typeof this.view&&("number"==typeof this.view?this.view===p.view:this.view.isEquivalent(p.view))}isConstant(){return!1}transformInternalExpressions(p,l){"number"!=typeof this.view&&(this.view=Kr(this.view,p,l))}clone(){return new gh(this.view instanceof $a?this.view.clone():this.view)}}class xu extends Nl{constructor(p){super(),this.expr=p,this.kind=Cs.ResetView}visitExpression(p,l){this.expr.visitExpression(p,l)}isEquivalent(p){return p instanceof xu&&this.expr.isEquivalent(p.expr)}isConstant(){return!1}transformInternalExpressions(p,l){this.expr=Kr(this.expr,p,l)}clone(){return new xu(this.expr.clone())}}class Cc extends Nl{constructor(p,l){super(),this.target=p,this.value=l,this.kind=Cs.TwoWayBindingSet}visitExpression(p,l){this.target.visitExpression(p,l),this.value.visitExpression(p,l)}isEquivalent(p){return this.target.isEquivalent(p.target)&&this.value.isEquivalent(p.value)}isConstant(){return!1}transformInternalExpressions(p,l){this.target=Kr(this.target,p,l),this.value=Kr(this.value,p,l)}clone(){return new Cc(this.target,this.value)}}class Kd extends Nl{constructor(p){super(),this.xref=p,this.kind=Cs.ReadVariable,this.name=null}visitExpression(){}isEquivalent(p){return p instanceof Kd&&p.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){const p=new Kd(this.xref);return p.name=this.name,p}}class O_ extends Nl{static{ly=bu,F0=VD}constructor(p,l){super(),this.kind=Cs.PureFunctionExpr,this[ly]=!0,this[F0]=!0,this.varOffset=null,this.fn=null,this.body=p,this.args=l}visitExpression(p,l){this.body?.visitExpression(p,l);for(const O of this.args)O.visitExpression(p,l)}isEquivalent(p){return p instanceof O_&&p.args.length===this.args.length&&null!==p.body&&null!==this.body&&p.body.isEquivalent(this.body)&&p.args.every((l,O)=>l.isEquivalent(this.args[O]))}isConstant(){return!1}transformInternalExpressions(p,l){null!==this.body?this.body=Kr(this.body,p,l|Ka.InChildOperation):null!==this.fn&&(this.fn=Kr(this.fn,p,l));for(let O=0;O<this.args.length;O++)this.args[O]=Kr(this.args[O],p,l)}clone(){const p=new O_(this.body?.clone()??null,this.args.map(l=>l.clone()));return p.fn=this.fn?.clone()??null,p.varOffset=this.varOffset,p}}class Cm extends Nl{constructor(p){super(),this.index=p,this.kind=Cs.PureFunctionParameterExpr}visitExpression(){}isEquivalent(p){return p instanceof Cm&&p.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new Cm(this.index)}}class jv extends Nl{static{Sf=bu,tR=VD}constructor(p,l,O,F){super(),this.target=p,this.targetSlot=l,this.name=O,this.args=F,this.kind=Cs.PipeBinding,this[Sf]=!0,this[tR]=!0,this.varOffset=null}visitExpression(p,l){for(const O of this.args)O.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){for(let O=0;O<this.args.length;O++)this.args[O]=Kr(this.args[O],p,l)}clone(){const p=new jv(this.target,this.targetSlot,this.name,this.args.map(l=>l.clone()));return p.varOffset=this.varOffset,p}}class Of extends Nl{static{V0=bu,H0=VD}constructor(p,l,O,F,se){super(),this.target=p,this.targetSlot=l,this.name=O,this.args=F,this.numArgs=se,this.kind=Cs.PipeBindingVariadic,this[V0]=!0,this[H0]=!0,this.varOffset=null}visitExpression(p,l){this.args.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){this.args=Kr(this.args,p,l)}clone(){const p=new Of(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return p.varOffset=this.varOffset,p}}class Wh extends Nl{constructor(p,l){super(),this.receiver=p,this.name=l,this.kind=Cs.SafePropertyRead}get index(){return this.name}visitExpression(p,l){this.receiver.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){this.receiver=Kr(this.receiver,p,l)}clone(){return new Wh(this.receiver.clone(),this.name)}}class Su extends Nl{constructor(p,l,O){super(O),this.receiver=p,this.index=l,this.kind=Cs.SafeKeyedRead}visitExpression(p,l){this.receiver.visitExpression(p,l),this.index.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){this.receiver=Kr(this.receiver,p,l),this.index=Kr(this.index,p,l)}clone(){return new Su(this.receiver.clone(),this.index.clone(),this.sourceSpan)}}class Xd extends Nl{constructor(p,l){super(),this.receiver=p,this.args=l,this.kind=Cs.SafeInvokeFunction}visitExpression(p,l){this.receiver.visitExpression(p,l);for(const O of this.args)O.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){this.receiver=Kr(this.receiver,p,l);for(let O=0;O<this.args.length;O++)this.args[O]=Kr(this.args[O],p,l)}clone(){return new Xd(this.receiver.clone(),this.args.map(p=>p.clone()))}}class fl extends Nl{constructor(p,l){super(),this.guard=p,this.expr=l,this.kind=Cs.SafeTernaryExpr}visitExpression(p,l){this.guard.visitExpression(p,l),this.expr.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){this.guard=Kr(this.guard,p,l),this.expr=Kr(this.expr,p,l)}clone(){return new fl(this.guard.clone(),this.expr.clone())}}class fh extends Nl{constructor(){super(...arguments),this.kind=Cs.EmptyExpr}visitExpression(p,l){}isEquivalent(p){return p instanceof fh}isConstant(){return!0}clone(){return new fh}transformInternalExpressions(){}}class Op extends Nl{constructor(p,l){super(),this.expr=p,this.xref=l,this.kind=Cs.AssignTemporaryExpr,this.name=null}visitExpression(p,l){this.expr.visitExpression(p,l)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(p,l){this.expr=Kr(this.expr,p,l)}clone(){const p=new Op(this.expr.clone(),this.xref);return p.name=this.name,p}}class Za extends Nl{constructor(p){super(),this.xref=p,this.kind=Cs.ReadTemporaryExpr,this.name=null}visitExpression(p,l){}isEquivalent(){return this.xref==this.xref}isConstant(){return!1}transformInternalExpressions(p,l){}clone(){const p=new Za(this.xref);return p.name=this.name,p}}class wp extends Nl{constructor(p){super(),this.slot=p,this.kind=Cs.SlotLiteralExpr}visitExpression(p,l){}isEquivalent(p){return p instanceof wp&&p.slot===this.slot}isConstant(){return!0}clone(){return new wp(this.slot)}transformInternalExpressions(){}}class ym extends Nl{constructor(p,l,O,F=null){super(),this.expr=p,this.target=l,this.targetSlot=O,this.alias=F,this.kind=Cs.ConditionalCase}visitExpression(p,l){null!==this.expr&&this.expr.visitExpression(p,l)}isEquivalent(p){return p instanceof ym&&p.expr===this.expr}isConstant(){return!0}clone(){return new ym(this.expr,this.target,this.targetSlot)}transformInternalExpressions(p,l){null!==this.expr&&(this.expr=Kr(this.expr,p,l))}}class w_ extends Nl{constructor(p){super(),this.expr=p,this.kind=Cs.ConstCollected}transformInternalExpressions(p,l){this.expr=p(this.expr,l)}visitExpression(p,l){this.expr.visitExpression(p,l)}isEquivalent(p){return p instanceof w_&&this.expr.isEquivalent(p.expr)}isConstant(){return this.expr.isConstant()}clone(){return new w_(this.expr)}}function vd(v,p){yc(v,(l,O)=>(p(l,O),l),Ka.None)}var Ka=function(v){return v[v.None=0]="None",v[v.InChildOperation=1]="InChildOperation",v}(Ka||{});function UD(v,p,l){for(let O=0;O<v.expressions.length;O++)v.expressions[O]=Kr(v.expressions[O],p,l)}function yc(v,p,l){switch(v.kind){case Qn.StyleProp:case Qn.StyleMap:case Qn.ClassProp:case Qn.ClassMap:case Qn.Binding:v.expression instanceof Md?UD(v.expression,p,l):v.expression=Kr(v.expression,p,l);break;case Qn.Property:case Qn.HostProperty:case Qn.Attribute:v.expression instanceof Md?UD(v.expression,p,l):v.expression=Kr(v.expression,p,l),v.sanitizer=v.sanitizer&&Kr(v.sanitizer,p,l);break;case Qn.TwoWayProperty:v.expression=Kr(v.expression,p,l),v.sanitizer=v.sanitizer&&Kr(v.sanitizer,p,l);break;case Qn.I18nExpression:v.expression=Kr(v.expression,p,l);break;case Qn.InterpolateText:UD(v.interpolation,p,l);break;case Qn.Statement:T_(v.statement,p,l);break;case Qn.Variable:v.initializer=Kr(v.initializer,p,l);break;case Qn.Conditional:for(const O of v.conditions)null!==O.expr&&(O.expr=Kr(O.expr,p,l));null!==v.processed&&(v.processed=Kr(v.processed,p,l)),null!==v.contextValue&&(v.contextValue=Kr(v.contextValue,p,l));break;case Qn.Listener:case Qn.TwoWayListener:for(const O of v.handlerOps)yc(O,p,l|Ka.InChildOperation);break;case Qn.ExtractedAttribute:v.expression=v.expression&&Kr(v.expression,p,l),v.trustedValueFn=v.trustedValueFn&&Kr(v.trustedValueFn,p,l);break;case Qn.RepeaterCreate:v.track=Kr(v.track,p,l),null!==v.trackByFn&&(v.trackByFn=Kr(v.trackByFn,p,l));break;case Qn.Repeater:v.collection=Kr(v.collection,p,l);break;case Qn.Defer:null!==v.loadingConfig&&(v.loadingConfig=Kr(v.loadingConfig,p,l)),null!==v.placeholderConfig&&(v.placeholderConfig=Kr(v.placeholderConfig,p,l)),null!==v.resolverFn&&(v.resolverFn=Kr(v.resolverFn,p,l));break;case Qn.I18nMessage:for(const[O,F]of v.params)v.params.set(O,Kr(F,p,l));for(const[O,F]of v.postprocessingParams)v.postprocessingParams.set(O,Kr(F,p,l));break;case Qn.DeferWhen:v.expr=Kr(v.expr,p,l);break;case Qn.StoreLet:v.value=Kr(v.value,p,l);break;case Qn.Advance:case Qn.Container:case Qn.ContainerEnd:case Qn.ContainerStart:case Qn.DeferOn:case Qn.DisableBindings:case Qn.Element:case Qn.ElementEnd:case Qn.ElementStart:case Qn.EnableBindings:case Qn.I18n:case Qn.I18nApply:case Qn.I18nContext:case Qn.I18nEnd:case Qn.I18nStart:case Qn.IcuEnd:case Qn.IcuStart:case Qn.Namespace:case Qn.Pipe:case Qn.Projection:case Qn.ProjectionDef:case Qn.Template:case Qn.Text:case Qn.I18nAttributes:case Qn.IcuPlaceholder:case Qn.DeclareLet:break;default:throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${Qn[v.kind]}`)}}function Kr(v,p,l){if(v instanceof Nl)v.transformInternalExpressions(p,l);else if(v instanceof Ua)v.lhs=Kr(v.lhs,p,l),v.rhs=Kr(v.rhs,p,l);else if(v instanceof d_)v.expr=Kr(v.expr,p,l);else if(v instanceof du)v.receiver=Kr(v.receiver,p,l);else if(v instanceof ag)v.receiver=Kr(v.receiver,p,l),v.index=Kr(v.index,p,l);else if(v instanceof s_)v.receiver=Kr(v.receiver,p,l),v.value=Kr(v.value,p,l);else if(v instanceof r_)v.receiver=Kr(v.receiver,p,l),v.index=Kr(v.index,p,l),v.value=Kr(v.value,p,l);else if(v instanceof _c){v.fn=Kr(v.fn,p,l);for(let O=0;O<v.args.length;O++)v.args[O]=Kr(v.args[O],p,l)}else if(v instanceof kh)for(let O=0;O<v.entries.length;O++)v.entries[O]=Kr(v.entries[O],p,l);else if(v instanceof uu)for(let O=0;O<v.entries.length;O++)v.entries[O].value=Kr(v.entries[O].value,p,l);else if(v instanceof Mh)v.condition=Kr(v.condition,p,l),v.trueCase=Kr(v.trueCase,p,l),null!==v.falseCase&&(v.falseCase=Kr(v.falseCase,p,l));else if(v instanceof af)v.expr=Kr(v.expr,p,l);else if(v instanceof mp)v.value=Kr(v.value,p,l);else if(v instanceof GC)for(let O=0;O<v.expressions.length;O++)v.expressions[O]=Kr(v.expressions[O],p,l);else if(v instanceof pb)v.condition=Kr(v.condition,p,l);else if(v instanceof Tv)v.tag=Kr(v.tag,p,l),v.template.expressions=v.template.expressions.map(O=>Kr(O,p,l));else if(v instanceof c_)if(Array.isArray(v.body))for(let O=0;O<v.body.length;O++)T_(v.body[O],p,l);else v.body=Kr(v.body,p,l);else if(!(v instanceof Da||v instanceof ch||v instanceof qf||v instanceof fd))throw new Error(`Unhandled expression kind: ${v.constructor.name}`);return p(v,l)}function T_(v,p,l){if(v instanceof hu)v.expr=Kr(v.expr,p,l);else if(v instanceof pu)v.value=Kr(v.value,p,l);else if(v instanceof Rl)void 0!==v.value&&(v.value=Kr(v.value,p,l));else{if(!(v instanceof fb))throw new Error(`Unhandled statement kind: ${v.constructor.name}`);v.condition=Kr(v.condition,p,l);for(const O of v.trueCase)T_(O,p,l);for(const O of v.falseCase)T_(O,p,l)}}function z0(v){return v instanceof fd&&"string"==typeof v.value}let _r=(()=>{class v{static{this.nextListId=0}constructor(){this.debugListId=v.nextListId++,this.head={kind:Qn.ListEnd,next:null,prev:null,debugListId:this.debugListId},this.tail={kind:Qn.ListEnd,next:null,prev:null,debugListId:this.debugListId},this.head.next=this.tail,this.tail.prev=this.head}push(l){if(Array.isArray(l)){for(const F of l)this.push(F);return}v.assertIsNotEnd(l),v.assertIsUnowned(l),l.debugListId=this.debugListId;const O=this.tail.prev;l.prev=O,O.next=l,l.next=this.tail,this.tail.prev=l}prepend(l){if(0===l.length)return;for(const se of l)v.assertIsNotEnd(se),v.assertIsUnowned(se),se.debugListId=this.debugListId;const O=this.head.next;let F=this.head;for(const se of l)F.next=se,se.prev=F,F=se;F.next=O,O.prev=F}*[Symbol.iterator](){let l=this.head.next;for(;l!==this.tail;){v.assertIsOwned(l,this.debugListId);const O=l.next;yield l,l=O}}*reversed(){let l=this.tail.prev;for(;l!==this.head;){v.assertIsOwned(l,this.debugListId);const O=l.prev;yield l,l=O}}static replace(l,O){v.assertIsNotEnd(l),v.assertIsNotEnd(O),v.assertIsOwned(l),v.assertIsUnowned(O),O.debugListId=l.debugListId,null!==l.prev&&(l.prev.next=O,O.prev=l.prev),null!==l.next&&(l.next.prev=O,O.next=l.next),l.debugListId=null,l.prev=null,l.next=null}static replaceWithMany(l,O){if(0===O.length)return void v.remove(l);v.assertIsNotEnd(l),v.assertIsOwned(l);const F=l.debugListId;l.debugListId=null;for(const pn of O)v.assertIsNotEnd(pn),v.assertIsUnowned(pn);const{prev:se,next:we}=l;l.prev=null,l.next=null;let We=se;for(const pn of O)this.assertIsUnowned(pn),pn.debugListId=F,We.next=pn,pn.prev=We,pn.next=null,We=pn;const gt=O[0],Ft=We;null!==se&&(se.next=gt,gt.prev=se),null!==we&&(we.prev=Ft,Ft.next=we)}static remove(l){v.assertIsNotEnd(l),v.assertIsOwned(l),l.prev.next=l.next,l.next.prev=l.prev,l.debugListId=null,l.prev=null,l.next=null}static insertBefore(l,O){if(Array.isArray(l))for(const F of l)this.insertBefore(F,O);else{if(v.assertIsOwned(O),null===O.prev)throw new Error("AssertionError: illegal operation on list start");v.assertIsNotEnd(l),v.assertIsUnowned(l),l.debugListId=O.debugListId,l.prev=null,O.prev.next=l,l.prev=O.prev,l.next=O,O.prev=l}}static insertAfter(l,O){if(v.assertIsOwned(O),null===O.next)throw new Error("AssertionError: illegal operation on list end");v.assertIsNotEnd(l),v.assertIsUnowned(l),l.debugListId=O.debugListId,O.next.prev=l,l.next=O.next,l.prev=O,O.next=l}static assertIsUnowned(l){if(null!==l.debugListId)throw new Error(`AssertionError: illegal operation on owned node: ${Qn[l.kind]}`)}static assertIsOwned(l,O){if(null===l.debugListId)throw new Error(`AssertionError: illegal operation on unowned node: ${Qn[l.kind]}`);if(void 0!==O&&l.debugListId!==O)throw new Error(`AssertionError: node belongs to the wrong list (expected ${O}, actual ${l.debugListId})`)}static assertIsNotEnd(l){if(l.kind===Qn.ListEnd)throw new Error("AssertionError: illegal operation on list head or tail")}}return v})();class Xa{constructor(){this.slot=null}}const _g=new Set([Qn.Element,Qn.ElementStart,Qn.Container,Qn.ContainerStart,Qn.Template,Qn.RepeaterCreate]);function bm(v){return _g.has(v.kind)}function Zb(v,p,l,O,F,se,we,We){return{kind:Qn.Template,xref:v,templateKind:p,attributes:null,tag:l,handle:new Xa,functionNameSuffix:O,decls:null,vars:null,localRefs:[],nonBindable:!1,namespace:F,i18nPlaceholder:se,startSourceSpan:we,wholeSourceSpan:We,...mg,...ua}}function zD(v){return{kind:Qn.DisableBindings,xref:v,...ua}}function iR(v){return{kind:Qn.EnableBindings,xref:v,...ua}}function oR(v,p,l,O){return{kind:Qn.Text,xref:v,handle:new Xa,initialValue:p,icuPlaceholder:l,sourceSpan:O,...mg,...ua}}function _O(v,p,l,O,F,se,we,We,gt){const Ft=new _r;return Ft.push(F),{kind:Qn.Listener,target:v,targetSlot:p,tag:O,hostListener:We,name:l,handlerOps:Ft,handlerFnName:null,consumesDollarEvent:!1,isAnimationListener:null!==se,animationPhase:se,eventTarget:we,sourceSpan:gt,...ua}}function W0(v,p,l,O,F,se){const we=new _r;return we.push(F),{kind:Qn.TwoWayListener,target:v,targetSlot:p,tag:O,name:l,handlerOps:we,handlerFnName:null,sourceSpan:se,...ua}}function $0(v,p,l){return{kind:Qn.Pipe,xref:v,handle:p,name:l,...ua,...mg}}function GD(v){return{kind:Qn.Namespace,active:v,...ua}}function WD(v){return{kind:Qn.ProjectionDef,def:v,...ua}}function Xu(v,p,l,O,F,se,we,We){return{kind:Qn.ExtractedAttribute,target:v,bindingKind:p,namespace:l,name:O,expression:F,i18nContext:se,i18nMessage:we,securityContext:We,trustedValueFn:null,...ua}}function Eu(v,p,l,O){return{kind:Qn.DeferOn,defer:v,trigger:p,prefetch:l,sourceSpan:O,...ua}}function dy(v,p,l,O){return{kind:Qn.I18nStart,xref:v,handle:new Xa,root:l??v,message:p,messageIndex:null,subTemplateIndex:null,context:null,sourceSpan:O,...ua,...mg}}function CO(v,p){return{kind:Qn.I18nEnd,xref:v,sourceSpan:p,...ua}}function l2(v,p,l){return{kind:Qn.IcuPlaceholder,xref:v,name:p,strings:l,expressionPlaceholders:[],...ua}}function Kv(v,p,l,O,F){if(null===l&&v!==Ic.Attr)throw new Error("AssertionError: i18nBlock must be provided for non-attribute contexts.");return{kind:Qn.I18nContext,contextKind:v,xref:p,i18nBlock:l,message:O,sourceSpan:F,params:new Map,postprocessingParams:new Map,...ua}}function Qb(v,p,l){return{kind:Qn.I18nAttributes,xref:v,handle:p,target:l,i18nAttributesConfig:null,...ua,...mg}}function $D(v,p,l,O,F,se){return{kind:Qn.HostProperty,name:v,expression:p,isAnimationTrigger:l,i18nContext:O,securityContext:F,sanitizer:null,sourceSpan:se,...zh,...ua}}const jD="CTX_REF_MARKER";var Zr=function(v){return v[v.Tmpl=0]="Tmpl",v[v.Host=1]="Host",v[v.Both=2]="Both",v}(Zr||{});class yO{constructor(p,l,O){this.componentName=p,this.pool=l,this.compatibility=O,this.kind=Zr.Both,this.nextXrefId=0}allocateXrefId(){return this.nextXrefId++}}class bO extends yO{constructor(p,l,O,F,se,we,We){super(p,l,O),this.relativeContextFilePath=F,this.i18nUseExternalIds=se,this.deferMeta=we,this.allDeferrableDepsFn=We,this.kind=Zr.Tmpl,this.fnSuffix="Template",this.views=new Map,this.contentSelectors=null,this.consts=[],this.constsInitializers=[],this.root=new uy(this,this.allocateXrefId(),null),this.views.set(this.root.xref,this.root)}allocateView(p){const l=new uy(this,this.allocateXrefId(),p);return this.views.set(l.xref,l),l}get units(){return this.views.values()}addConst(p,l){for(let F=0;F<this.consts.length;F++)if(this.consts[F].isEquivalent(p))return F;const O=this.consts.length;return this.consts.push(p),l&&this.constsInitializers.push(...l),O}}class rR{constructor(p){this.xref=p,this.create=new _r,this.update=new _r,this.fnName=null,this.vars=null}*ops(){for(const p of this.create)if(yield p,p.kind===Qn.Listener||p.kind===Qn.TwoWayListener)for(const l of p.handlerOps)yield l;for(const p of this.update)yield p}}class uy extends rR{constructor(p,l,O){super(l),this.job=p,this.parent=O,this.contextVariables=new Map,this.aliases=new Set,this.decls=null}}class sR extends yO{constructor(p,l,O){super(p,l,O),this.kind=Zr.Host,this.fnSuffix="HostBindings",this.root=new KD(this)}get units(){return[this.root]}}class KD extends rR{constructor(p){super(0),this.job=p,this.attributes=null}}function EB(v){if(v instanceof _c&&v.fn instanceof wl&&"$any"===v.fn.name){if(1!==v.args.length)throw new Error("The $any builtin function expects exactly one argument.");return v.args[0]}return v}function wB(v,p){if(p.next?.kind!==Qn.I18nExpression)return!0;const l=v.get(p.context),O=v.get(p.next.context);if(void 0===l)throw new Error("AssertionError: expected an I18nContextOp to exist for the I18nExpressionOp's context");if(void 0===O)throw new Error("AssertionError: expected an I18nContextOp to exist for the next I18nExpressionOp's context");return null!==l.i18nBlock?l.i18nBlock!==O.i18nBlock:p.i18nOwner!==p.next.i18nOwner}function xO(v){const p=new Map;for(const l of v.create)ay(l)&&(p.set(l.xref,l),l.kind===Qn.RepeaterCreate&&null!==l.emptyView&&p.set(l.emptyView,l));return p}function Jb(v,p){const l=v.get(p);if(void 0===l)throw new Error("All attributes should have an element-like target.");return l}function ZD(v,p,l){if(p.expression instanceof Md)return;let O=p.isTextAttribute||p.expression.isConstant();if(v.job.compatibility===gg.TemplateDefinitionBuilder&&(O&&=p.isTextAttribute),O){const F=Xu(p.target,p.isStructuralTemplateAttribute?xs.Template:xs.Attribute,p.namespace,p.name,p.expression,p.i18nContext,p.i18nMessage,p.securityContext);if(v.job.kind===Zr.Host)v.create.push(F);else{const se=Jb(l,p.target);_r.insertBefore(F,se)}_r.remove(p)}}function TB(v,p){const l=v.get(p);if(void 0===l)throw new Error("All attributes should have an element-like target.");return l}const vg=new Set([Bi.attribute,Bi.classProp,Bi.element,Bi.elementContainer,Bi.elementContainerEnd,Bi.elementContainerStart,Bi.elementEnd,Bi.elementStart,Bi.hostProperty,Bi.i18nExp,Bi.listener,Bi.listener,Bi.property,Bi.styleProp,Bi.stylePropInterpolate1,Bi.stylePropInterpolate2,Bi.stylePropInterpolate3,Bi.stylePropInterpolate4,Bi.stylePropInterpolate5,Bi.stylePropInterpolate6,Bi.stylePropInterpolate7,Bi.stylePropInterpolate8,Bi.stylePropInterpolateV,Bi.syntheticHostListener,Bi.syntheticHostProperty,Bi.templateCreate,Bi.twoWayProperty,Bi.twoWayListener,Bi.declareLet]);function QD(v){let p=null;for(const l of v){if(l.kind!==Qn.Statement||!(l.statement instanceof hu)){p=null;continue}if(!(l.statement.expr instanceof _c&&l.statement.expr.fn instanceof qf)){p=null;continue}const O=l.statement.expr.fn.value;if(vg.has(O))if(null!==p&&p.instruction===O&&p.length<256){const F=p.expression.callFn(l.statement.expr.args,l.statement.expr.sourceSpan,l.statement.expr.pure);p.expression=F,p.op.statement=F.toStmt(),p.length++,_r.remove(l)}else p={op:l,instruction:O,expression:l.statement.expr,length:1};else p=null}}const dR=new Map([["&&",hs.And],[">",hs.Bigger],[">=",hs.BiggerEquals],["|",hs.BitwiseOr],["&",hs.BitwiseAnd],["/",hs.Divide],["==",hs.Equals],["===",hs.Identical],["<",hs.Lower],["<=",hs.LowerEquals],["-",hs.Minus],["%",hs.Modulo],["*",hs.Multiply],["!=",hs.NotEquals],["!==",hs.NotIdentical],["??",hs.NullishCoalesce],["||",hs.Or],["+",hs.Plus]]);function OO(v){return null===v?ic.HTML:new Map([["svg",ic.SVG],["math",ic.Math]]).get(v)??ic.HTML}function xm(v){return Array.isArray(v)?Ns(v.map(xm)):no(v)}function wO(v,p,l){const O=p.get(l);if(void 0!==O){const F=X0(O);if(F.entries.length>0)return v.addConst(F)}return null}const Xv=Object.freeze([]);class TO{get attributes(){return this.byKind.get(xs.Attribute)??Xv}get classes(){return this.byKind.get(xs.ClassName)??Xv}get styles(){return this.byKind.get(xs.StyleProperty)??Xv}get bindings(){return this.propertyBindings??Xv}get template(){return this.byKind.get(xs.Template)??Xv}get i18n(){return this.byKind.get(xs.I18n)??Xv}constructor(p){this.compatibility=p,this.known=new Map,this.byKind=new Map,this.propertyBindings=null,this.projectAs=null}isKnown(p,l){const O=this.known.get(p)??new Set;return this.known.set(p,O),!!O.has(l)||(O.add(l),!1)}add(p,l,O,F,se){if((this.compatibility!==gg.TemplateDefinitionBuilder||p!==xs.Attribute&&p!==xs.ClassName&&p!==xs.StyleProperty)&&this.isKnown(p,l))return;if("ngProjectAs"===l){if(null===O||!(O instanceof fd)||null==O.value||"string"!=typeof O.value?.toString())throw Error("ngProjectAs must have a string literal value");this.projectAs=O.value.toString()}const We=this.arrayFor(p);if(We.push(...function qb(v,p){const l=no(p);return v?[no(0),no(v),l]:[l]}(F,l)),p===xs.Attribute||p===xs.StyleProperty){if(null===O)throw Error("Attribute, i18n attribute, & style element attributes must have a value");if(null!==se){if(!z0(O))throw Error("AssertionError: extracted attribute value should be string literal");We.push(function RT(v,p,l,O){return new Tv(v,p,l,O)}(se,new a_([new zd(O.value)],[]),void 0,O.sourceSpan))}else We.push(O)}}arrayFor(p){return p===xs.Property||p===xs.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(p)||this.byKind.set(p,[]),this.byKind.get(p))}}function X0({attributes:v,bindings:p,classes:l,i18n:O,projectAs:F,styles:se,template:we}){const We=[...v];if(null!==F){const gt=rb(F)[0];We.push(no(5),xm(gt))}return l.length>0&&We.push(no(1),...l),se.length>0&&We.push(no(2),...se),p.length>0&&We.push(no(3),...p),we.length>0&&We.push(no(4),...we),O.length>0&&We.push(no(6),...O),Ns(We)}class gy{constructor(){this.targets=new Map}}const nx=new Map([[Qn.ElementEnd,[Qn.ElementStart,Qn.Element]],[Qn.ContainerEnd,[Qn.ContainerStart,Qn.Container]],[Qn.I18nEnd,[Qn.I18nStart,Qn.I18n]]]),ix=new Set([Qn.Pipe]);function Tu(v){return v instanceof d_?Tu(v.expr):v instanceof Ua?Tu(v.lhs)||Tu(v.rhs):v instanceof Mh?!(!v.falseCase||!Tu(v.falseCase))||Tu(v.condition)||Tu(v.trueCase):v instanceof pb?Tu(v.condition):v instanceof Op?Tu(v.expr):v instanceof du?Tu(v.receiver):v instanceof ag?Tu(v.receiver)||Tu(v.index):v instanceof _c||v instanceof kh||v instanceof uu||v instanceof Xd||v instanceof jv}function Yv(v,p,l){let O;if(Tu(v)){const F=l.job.allocateXrefId();O=[new Op(v,F),new Za(F)]}else O=[v,v.clone()],function my(v,p,l){Kr(v,O=>{if(O instanceof Op&&p.has(O.xref)){const F=new Za(O.xref);return l.job.compatibility===gg.TemplateDefinitionBuilder?new Op(F,F.xref):F}return O},Ka.None)}(O[1],function eA(v){const p=new Set;return Kr(v,l=>(l instanceof Op&&p.add(l.xref),l),Ka.None),p}(O[0]),l);return new fl(O[0],p(O[1]))}function DO(v){return function DB(v){return v instanceof Wh||v instanceof Su||v instanceof Xd}(v)||function hR(v){return v instanceof du||v instanceof ag||v instanceof _c}(v)}function nA(v,p){if(!DO(v))return v;const l=function tA(v){if(DO(v)&&v.receiver instanceof fl){let p=v.receiver;for(;p.expr instanceof fl;)p=p.expr;return p}return null}(v);if(l){if(v instanceof _c)return l.expr=l.expr.callFn(v.args),v.receiver;if(v instanceof du)return l.expr=l.expr.prop(v.name),v.receiver;if(v instanceof ag)return l.expr=l.expr.key(v.index),v.receiver;if(v instanceof Xd)return l.expr=Yv(l.expr,O=>O.callFn(v.args),p),v.receiver;if(v instanceof Wh)return l.expr=Yv(l.expr,O=>O.prop(v.name),p),v.receiver;if(v instanceof Su)return l.expr=Yv(l.expr,O=>O.key(v.index),p),v.receiver}else{if(v instanceof Xd)return Yv(v.receiver,O=>O.callFn(v.args),p);if(v instanceof Wh)return Yv(v.receiver,O=>O.prop(v.name),p);if(v instanceof Su)return Yv(v.receiver,O=>O.key(v.index),p)}return v}function pR(v){return v instanceof fl?new Mh(new Ua(hs.Equals,v.guard,lf),lf,v.expr):v}[_c,kh,uu,Xd,jv].map(v=>v.constructor.name);const mh="\ufffd",Cg="#",iA="*",AB="/",oA=":",_y="[",Zv="]",vy="|";function c2(v,p,l){let O=rA(p.params);const F=rA(p.postprocessingParams);let se=[...p.params.values()].some(we=>we.length>1);return function K0(v,p,l,O,F,se,we,We){return{kind:Qn.I18nMessage,xref:v,i18nContext:p,i18nBlock:l,message:O,messagePlaceholder:F,params:se,postprocessingParams:we,needsPostprocessing:We,subMessages:[],...ua}}(v.allocateXrefId(),p.xref,p.i18nBlock,p.message,l??null,O,F,se)}function Cy(v){if(v.strings.length!==v.expressionPlaceholders.length+1)throw Error(`AssertionError: Invalid ICU placeholder with ${v.strings.length} strings and ${v.expressionPlaceholders.length} expressions`);const p=v.expressionPlaceholders.map(I_);return v.strings.flatMap((l,O)=>[l,p[O]||""]).join("")}function rA(v){const p=new Map;for(const[l,O]of v){const F=IB(O);null!==F&&p.set(l,no(F))}return p}function IB(v){if(0===v.length)return null;const p=v.map(l=>I_(l));return 1===p.length?p[0]:`${_y}${p.join(vy)}${Zv}`}function I_(v){if(v.flags&rl.ElementTag&&v.flags&rl.TemplateTag){if("object"!=typeof v.value)throw Error("AssertionError: Expected i18n param value to have an element and template slot");const F=I_({...v,value:v.value.element,flags:v.flags&~rl.TemplateTag}),se=I_({...v,value:v.value.template,flags:v.flags&~rl.ElementTag});return v.flags&rl.OpenTag&&v.flags&rl.CloseTag?`${se}${F}${se}`:v.flags&rl.CloseTag?`${F}${se}`:`${se}${F}`}if(v.flags&rl.OpenTag&&v.flags&rl.CloseTag)return`${I_({...v,flags:v.flags&~rl.CloseTag})}${I_({...v,flags:v.flags&~rl.OpenTag})}`;if(v.flags===rl.None)return`${v.value}`;let p="",l="";return v.flags&rl.ElementTag?p=Cg:v.flags&rl.TemplateTag&&(p=iA),""!==p&&(l=v.flags&rl.CloseTag?AB:""),`${mh}${l}${p}${v.value}${null===v.subTemplateIndex?"":`${oA}${v.subTemplateIndex}`}${mh}`}function rx(v,p){const l=function PB(v,p){const l={view:v.xref,viewContextVariable:{kind:yu.Context,name:null,view:v.xref},contextVariables:new Map,aliases:v.aliases,references:[],letDeclarations:[],parent:p};for(const O of v.contextVariables.keys())l.contextVariables.set(O,{kind:yu.Identifier,name:null,identifier:O,local:!1});for(const O of v.create)switch(O.kind){case Qn.ElementStart:case Qn.Template:if(!Array.isArray(O.localRefs))throw new Error("AssertionError: expected localRefs to be an array");for(let F=0;F<O.localRefs.length;F++)l.references.push({name:O.localRefs[F].name,targetId:O.xref,targetSlot:O.handle,offset:F,variable:{kind:yu.Identifier,name:null,identifier:O.localRefs[F].name,local:!1}});break;case Qn.DeclareLet:l.letDeclarations.push({targetId:O.xref,targetSlot:O.handle,variable:{kind:yu.Identifier,name:null,identifier:O.declaredName,local:!1}})}return l}(v,p);for(const O of v.create)switch(O.kind){case Qn.Template:rx(v.job.views.get(O.xref),l);break;case Qn.Projection:null!==O.fallbackView&&rx(v.job.views.get(O.fallbackView),l);break;case Qn.RepeaterCreate:rx(v.job.views.get(O.xref),l),O.emptyView&&rx(v.job.views.get(O.emptyView),l);break;case Qn.Listener:case Qn.TwoWayListener:O.handlerOps.prepend(Z0(v,l,!0))}v.update.prepend(Z0(v,l,!1))}function Z0(v,p,l){const O=[];p.view!==v.xref&&O.push(b_(v.job.allocateXrefId(),p.viewContextVariable,new E_,yf.None));const F=v.job.views.get(p.view);for(const[se,we]of F.contextVariables){const We=new vm(p.view),gt=we===jD?We:new du(We,we);O.push(b_(v.job.allocateXrefId(),p.contextVariables.get(se),gt,yf.None))}for(const se of F.aliases)O.push(b_(v.job.allocateXrefId(),se,se.expression.clone(),yf.AlwaysInline));for(const se of p.references)O.push(b_(v.job.allocateXrefId(),se.variable,new U0(se.targetId,se.targetSlot,se.offset),yf.None));if(p.view!==v.xref||l)for(const se of p.letDeclarations)O.push(b_(v.job.allocateXrefId(),se.variable,new S_(se.targetId,se.targetSlot),yf.None));return null!==p.parent&&O.push(...Z0(v,p.parent,!1)),O}function RB(v){return v.startsWith("--")}function Jv(v){return v.replace(/[a-z][A-Z]/g,p=>p.charAt(0)+"-"+p.charAt(1)).toLowerCase()}function kB(v){const p=v.indexOf("!important");-1!==p&&(v=p>0?v.substring(0,p):"");let l=null,O=v;const F=v.lastIndexOf(".");return F>0&&(l=v.slice(F+1),O=v.substring(0,F)),{property:O,suffix:l}}function qv(v,p=!1){return nc(Object.keys(v).map(l=>({key:l,quoted:p,value:v[l]})))}const IO=new class Q0{visitText(p){return p.value}visitContainer(p){return p.children.map(l=>l.visit(this)).join("")}visitIcu(p){const l=Object.keys(p.cases).map(F=>`${F} {${p.cases[F].visit(this)}}`);return`{${p.expressionPlaceholder}, ${p.type}, ${l.join(" ")}}`}visitTagPlaceholder(p){return p.isVoid?this.formatPh(p.startName):`${this.formatPh(p.startName)}${p.children.map(l=>l.visit(this)).join("")}${this.formatPh(p.closeName)}`}visitPlaceholder(p){return this.formatPh(p.name)}visitBlockPlaceholder(p){return`${this.formatPh(p.startName)}${p.children.map(l=>l.visit(this)).join("")}${this.formatPh(p.closeName)}`}visitIcuPlaceholder(p,l){return this.formatPh(p.name)}formatPh(p){return`{${Fb(p,!1)}}`}};function yg(v){return v.visit(IO)}var La=function(v){return v[v.Character=0]="Character",v[v.Identifier=1]="Identifier",v[v.PrivateIdentifier=2]="PrivateIdentifier",v[v.Keyword=3]="Keyword",v[v.String=4]="String",v[v.Operator=5]="Operator",v[v.Number=6]="Number",v[v.Error=7]="Error",v}(La||{});const BB=["var","let","as","null","undefined","true","false","if","else","this"];class wf{tokenize(p){const l=new uA(p),O=[];let F=l.scanToken();for(;null!=F;)O.push(F),F=l.scanToken();return O}}class Cd{constructor(p,l,O,F,se){this.index=p,this.end=l,this.type=O,this.numValue=F,this.strValue=se}isCharacter(p){return this.type==La.Character&&this.numValue==p}isNumber(){return this.type==La.Number}isString(){return this.type==La.String}isOperator(p){return this.type==La.Operator&&this.strValue==p}isIdentifier(){return this.type==La.Identifier}isPrivateIdentifier(){return this.type==La.PrivateIdentifier}isKeyword(){return this.type==La.Keyword}isKeywordLet(){return this.type==La.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==La.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==La.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==La.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==La.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==La.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==La.Keyword&&"this"==this.strValue}isError(){return this.type==La.Error}toNumber(){return this.type==La.Number?this.numValue:-1}toString(){switch(this.type){case La.Character:case La.Identifier:case La.Keyword:case La.Operator:case La.PrivateIdentifier:case La.String:case La.Error:return this.strValue;case La.Number:return this.numValue.toString();default:return null}}}function Tf(v,p,l){return new Cd(v,p,La.Character,l,String.fromCharCode(l))}function fR(v,p,l){return new Cd(v,p,La.Operator,0,l)}const eC=new Cd(-1,-1,La.Character,0,"");class uA{constructor(p){this.input=p,this.peek=0,this.index=-1,this.length=p.length,this.advance()}advance(){this.peek=++this.index>=this.length?Wu:this.input.charCodeAt(this.index)}scanToken(){const p=this.input,l=this.length;let O=this.peek,F=this.index;for(;O<=gD;){if(++F>=l){O=Wu;break}O=p.charCodeAt(F)}if(this.peek=O,this.index=F,F>=l)return null;if(PO(O))return this.scanIdentifier();if(Sp(O))return this.scanNumber(F);const se=F;switch(O){case 46:return this.advance(),Sp(this.peek)?this.scanNumber(se):Tf(se,this.index,46);case 40:case 41:case mm:case Hh:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(se,O);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(se,String.fromCharCode(O));case 63:return this.scanQuestion(se);case 60:case 62:return this.scanComplexOperator(se,String.fromCharCode(O),61,"=");case 33:case 61:return this.scanComplexOperator(se,String.fromCharCode(O),61,"=",61,"=");case 38:return this.scanComplexOperator(se,"&",38,"&");case 124:return this.scanComplexOperator(se,"|",124,"|");case nO:for(;Cf(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(O)}]`,0)}scanCharacter(p,l){return this.advance(),Tf(p,this.index,l)}scanOperator(p,l){return this.advance(),fR(p,this.index,l)}scanComplexOperator(p,l,O,F,se,we){this.advance();let We=l;return this.peek==O&&(this.advance(),We+=F),null!=se&&this.peek==se&&(this.advance(),We+=we),fR(p,this.index,We)}scanIdentifier(){const p=this.index;for(this.advance();hA(this.peek);)this.advance();const l=this.input.substring(p,this.index);return BB.indexOf(l)>-1?function d2(v,p,l){return new Cd(v,p,La.Keyword,0,l)}(p,this.index,l):function NB(v,p,l){return new Cd(v,p,La.Identifier,0,l)}(p,this.index,l)}scanPrivateIdentifier(){const p=this.index;if(this.advance(),!PO(this.peek))return this.error("Invalid character [#]",-1);for(;hA(this.peek);)this.advance();const l=this.input.substring(p,this.index);return function cA(v,p,l){return new Cd(v,p,La.PrivateIdentifier,0,l)}(p,this.index,l)}scanNumber(p){let l=this.index===p,O=!1;for(this.advance();;){if(!Sp(this.peek))if(95===this.peek){if(!Sp(this.input.charCodeAt(this.index-1))||!Sp(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);O=!0}else if(46===this.peek)l=!1;else{if(101!=(v=this.peek)&&69!=v)break;if(this.advance(),gA(this.peek)&&this.advance(),!Sp(this.peek))return this.error("Invalid exponent",-1);l=!1}this.advance()}var v;let F=this.input.substring(p,this.index);O&&(F=F.replace(/_/g,""));const se=l?function mR(v){const p=parseInt(v);if(isNaN(p))throw new Error("Invalid integer literal when parsing "+v);return p}(F):parseFloat(F);return function dA(v,p,l){return new Cd(v,p,La.Number,l,"")}(p,this.index,se)}scanString(){const p=this.index,l=this.peek;this.advance();let O="",F=this.index;const se=this.input;for(;this.peek!=l;)if(92==this.peek){let We;if(O+=se.substring(F,this.index),this.advance(),117==this.peek){const gt=se.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(gt))return this.error(`Invalid unicode escape [\\u${gt}]`,0);We=parseInt(gt,16);for(let Ft=0;Ft<5;Ft++)this.advance()}else We=Dp(this.peek),this.advance();O+=String.fromCharCode(We),F=this.index}else{if(this.peek==Wu)return this.error("Unterminated quote",0);this.advance()}const we=se.substring(F,this.index);return this.advance(),function u2(v,p,l){return new Cd(v,p,La.String,0,l)}(p,this.index,O+we)}scanQuestion(p){this.advance();let l="?";return(63===this.peek||46===this.peek)&&(l+=46===this.peek?".":"?",this.advance()),fR(p,this.index,l)}error(p,l){const O=this.index+l;return function J0(v,p,l){return new Cd(v,p,La.Error,0,l)}(O,this.index,`Lexer Error: ${p} at column ${O} in expression [${this.input}]`)}}function PO(v){return C_<=v&&v<=xp||_d<=v&&v<=vD||95==v||36==v}function hA(v){return Gb(v)||Sp(v)||95==v||36==v}function gA(v){return 45==v||43==v}function Dp(v){switch(v){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return dD;case 118:return 11;default:return v}}class _R{constructor(p,l,O){this.strings=p,this.expressions=l,this.offsets=O}}class vR{constructor(p,l,O){this.templateBindings=p,this.warnings=l,this.errors=O}}class VB{constructor(p){this._lexer=p,this.errors=[]}parseAction(p,l,O,F=$d){this._checkNoInterpolation(p,l,F);const se=this._stripComments(p),we=this._lexer.tokenize(se),We=new q0(p,l,O,we,1,this.errors,0).parseChain();return new hh(We,p,l,O,this.errors)}parseBinding(p,l,O,F=$d){const se=this._parseBindingAst(p,l,O,F);return new hh(se,p,l,O,this.errors)}checkSimpleExpression(p){const l=new p2;return p.visit(l),l.errors}parseSimpleBinding(p,l,O,F=$d){const se=this._parseBindingAst(p,l,O,F),we=this.checkSimpleExpression(se);return we.length>0&&this._reportError(`Host binding expression cannot contain ${we.join(" ")}`,p,l),new hh(se,p,l,O,this.errors)}_reportError(p,l,O,F){this.errors.push(new Nh(p,l,O,F))}_parseBindingAst(p,l,O,F){this._checkNoInterpolation(p,l,F);const se=this._stripComments(p),we=this._lexer.tokenize(se);return new q0(p,l,O,we,0,this.errors,0).parseChain()}parseTemplateBindings(p,l,O,F,se){const we=this._lexer.tokenize(l);return new q0(l,O,se,we,0,this.errors,0).parseTemplateBindings({source:p,span:new uh(F,F+p.length)})}parseInterpolation(p,l,O,F,se=$d){const{strings:we,expressions:We,offsets:gt}=this.splitInterpolation(p,l,F,se);if(0===We.length)return null;const Ft=[];for(let pn=0;pn<We.length;++pn){const _o=this._stripComments(We[pn].text),Po=this._lexer.tokenize(_o),Ro=new q0(p,l,O,Po,0,this.errors,gt[pn]).parseChain();Ft.push(Ro)}return this.createInterpolationAst(we.map(pn=>pn.text),Ft,p,l,O)}parseInterpolationExpression(p,l,O){const F=this._stripComments(p),se=this._lexer.tokenize(F),we=new q0(p,l,O,se,0,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[we],p,l,O)}createInterpolationAst(p,l,O,F,se){const we=new _p(0,O.length),We=new ZC(we,we.toAbsolute(se),p,l);return new hh(We,O,F,se,this.errors)}splitInterpolation(p,l,O,F=$d){const se=[],we=[],We=[],gt=O?function g2(v){let p=new Map,l=0,O=0,F=0;for(;F<v.length;){const se=v[F];if(9===se.type){const[we,We]=se.parts;l+=We.length,O+=we.length}else{const we=se.parts.reduce((We,gt)=>We+gt.length,0);O+=we,l+=we}p.set(O,l),F++}return p}(O):null;let Ft=0,pn=!1,fi=!1,{start:_o,end:Po}=F;for(;Ft<p.length;)if(pn){const Ro=Ft,Rr=Ro+_o.length,br=this._getInterpolationEndIndex(p,Po,Rr);if(-1===br){pn=!1,fi=!0;break}const cr=br+Po.length,ds=p.substring(Rr,br);0===ds.trim().length&&this._reportError("Blank expressions are not allowed in interpolated strings",p,`at column ${Ft} in`,l),we.push({text:ds,start:Ro,end:cr});const Zs=(gt?.get(Ro)??Ro)+_o.length;We.push(Zs),Ft=cr,pn=!1}else{const Ro=Ft;Ft=p.indexOf(_o,Ft),-1===Ft&&(Ft=p.length);const Rr=p.substring(Ro,Ft);se.push({text:Rr,start:Ro,end:Ft}),pn=!0}if(!pn)if(fi){const Ro=se[se.length-1];Ro.text+=p.substring(Ft),Ro.end=p.length}else se.push({text:p.substring(Ft),start:Ft,end:p.length});return new _R(se,we,We)}wrapLiteralPrimitive(p,l,O){const F=new _p(0,null==p?0:p.length);return new hh(new am(F,F.toAbsolute(O),p),p,l,O,this.errors)}_stripComments(p){const l=this._commentStart(p);return null!=l?p.substring(0,l):p}_commentStart(p){let l=null;for(let O=0;O<p.length-1;O++){const F=p.charCodeAt(O),se=p.charCodeAt(O+1);if(47===F&&47==se&&null==l)return O;l===F?l=null:null==l&&ry(F)&&(l=F)}return null}_checkNoInterpolation(p,l,{start:O,end:F}){let se=-1,we=-1;for(const We of this._forEachUnquotedChar(p,0))if(-1===se)p.startsWith(O)&&(se=We);else if(we=this._getInterpolationEndIndex(p,F,We),we>-1)break;se>-1&&we>-1&&this._reportError(`Got interpolation (${O}${F}) where expression was expected`,p,`at column ${se} in`,l)}_getInterpolationEndIndex(p,l,O){for(const F of this._forEachUnquotedChar(p,O)){if(p.startsWith(l,F))return F;if(p.startsWith("//",F))return p.indexOf(l,F)}return-1}*_forEachUnquotedChar(p,l){let O=null,F=0;for(let se=l;se<p.length;se++){const we=p[se];!ry(p.charCodeAt(se))||null!==O&&O!==we||F%2!=0?null===O&&(yield se):O=null===O?we:null,F="\\"===we?F+1:0}}}var MO=function(v){return v[v.None=0]="None",v[v.Writable=1]="Writable",v}(MO||{});class q0{constructor(p,l,O,F,se,we,We){this.input=p,this.location=l,this.absoluteOffset=O,this.tokens=F,this.parseFlags=se,this.errors=we,this.offset=We,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=MO.None,this.sourceSpanCache=new Map,this.index=0}peek(p){const l=this.index+p;return l<this.tokens.length?this.tokens[l]:eC}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(p,l){let O=this.currentEndIndex;if(void 0!==l&&l>this.currentEndIndex&&(O=l),p>O){const F=O;O=p,p=F}return new _p(p,O)}sourceSpan(p,l){const O=`${p}@${this.inputIndex}:${l}`;return this.sourceSpanCache.has(O)||this.sourceSpanCache.set(O,this.span(p,l).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(O)}advance(){this.index++}withContext(p,l){this.context|=p;const O=l();return this.context^=p,O}consumeOptionalCharacter(p){return!!this.next.isCharacter(p)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(p){this.consumeOptionalCharacter(p)||this.error(`Missing expected ${String.fromCharCode(p)}`)}consumeOptionalOperator(p){return!!this.next.isOperator(p)&&(this.advance(),!0)}expectOperator(p){this.consumeOptionalOperator(p)||this.error(`Missing expected operator ${p}`)}prettyPrintToken(p){return p===eC?"end of input":`token ${p}`}expectIdentifierOrKeyword(){const p=this.next;return p.isIdentifier()||p.isKeyword()?(this.advance(),p.toString()):(p.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(p,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(p)}, expected identifier or keyword`),null)}expectIdentifierOrKeywordOrString(){const p=this.next;return p.isIdentifier()||p.isKeyword()||p.isString()?(this.advance(),p.toString()):(p.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(p,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(p)}, expected identifier, keyword, or string`),"")}parseChain(){const p=[],l=this.inputIndex;for(;this.index<this.tokens.length;){const O=this.parsePipe();if(p.push(O),this.consumeOptionalCharacter(59))for(1&this.parseFlags||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else if(this.index<this.tokens.length){const F=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===F)break}}if(0===p.length){const O=this.offset,F=this.offset+this.input.length;return new gu(this.span(O,F),this.sourceSpan(O,F))}return 1==p.length?p[0]:new vp(this.span(l),this.sourceSpan(l),p)}parsePipe(){const p=this.inputIndex;let l=this.parseExpression();if(this.consumeOptionalOperator("|")){1&this.parseFlags&&this.error("Cannot have a pipe in an action expression");do{const O=this.inputIndex;let se,we,F=this.expectIdentifierOrKeyword();null!==F?se=this.sourceSpan(O):(F="",we=-1!==this.next.index?this.next.index:this.input.length+this.offset,se=new _p(we,we).toAbsolute(this.absoluteOffset));const We=[];for(;this.consumeOptionalCharacter(58);)We.push(this.parseExpression());l=new f0(this.span(p),this.sourceSpan(p,we),l,F,We,se)}while(this.consumeOptionalOperator("|"))}return l}parseExpression(){return this.parseConditional()}parseConditional(){const p=this.inputIndex,l=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const O=this.parsePipe();let F;if(this.consumeOptionalCharacter(58))F=this.parsePipe();else{const we=this.input.substring(p,this.inputIndex);this.error(`Conditional expression ${we} requires all 3 expressions`),F=new gu(this.span(p),this.sourceSpan(p))}return new Rv(this.span(p),this.sourceSpan(p),l,O,F)}return l}parseLogicalOr(){const p=this.inputIndex;let l=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const O=this.parseLogicalAnd();l=new Gu(this.span(p),this.sourceSpan(p),"||",l,O)}return l}parseLogicalAnd(){const p=this.inputIndex;let l=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){const O=this.parseNullishCoalescing();l=new Gu(this.span(p),this.sourceSpan(p),"&&",l,O)}return l}parseNullishCoalescing(){const p=this.inputIndex;let l=this.parseEquality();for(;this.consumeOptionalOperator("??");){const O=this.parseEquality();l=new Gu(this.span(p),this.sourceSpan(p),"??",l,O)}return l}parseEquality(){const p=this.inputIndex;let l=this.parseRelational();for(;this.next.type==La.Operator;){const O=this.next.strValue;switch(O){case"==":case"===":case"!=":case"!==":this.advance();const F=this.parseRelational();l=new Gu(this.span(p),this.sourceSpan(p),O,l,F);continue}break}return l}parseRelational(){const p=this.inputIndex;let l=this.parseAdditive();for(;this.next.type==La.Operator;){const O=this.next.strValue;switch(O){case"<":case">":case"<=":case">=":this.advance();const F=this.parseAdditive();l=new Gu(this.span(p),this.sourceSpan(p),O,l,F);continue}break}return l}parseAdditive(){const p=this.inputIndex;let l=this.parseMultiplicative();for(;this.next.type==La.Operator;){const O=this.next.strValue;switch(O){case"+":case"-":this.advance();let F=this.parseMultiplicative();l=new Gu(this.span(p),this.sourceSpan(p),O,l,F);continue}break}return l}parseMultiplicative(){const p=this.inputIndex;let l=this.parsePrefix();for(;this.next.type==La.Operator;){const O=this.next.strValue;switch(O){case"*":case"%":case"/":this.advance();let F=this.parsePrefix();l=new Gu(this.span(p),this.sourceSpan(p),O,l,F);continue}break}return l}parsePrefix(){if(this.next.type==La.Operator){const p=this.inputIndex;let O;switch(this.next.strValue){case"+":return this.advance(),O=this.parsePrefix(),hf.createPlus(this.span(p),this.sourceSpan(p),O);case"-":return this.advance(),O=this.parsePrefix(),hf.createMinus(this.span(p),this.sourceSpan(p),O);case"!":return this.advance(),O=this.parsePrefix(),new m0(this.span(p),this.sourceSpan(p),O)}}return this.parseCallChain()}parseCallChain(){const p=this.inputIndex;let l=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))l=this.parseAccessMember(l,p,!1);else if(this.consumeOptionalOperator("?."))l=this.consumeOptionalCharacter(40)?this.parseCall(l,p,!0):this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(l,p,!0):this.parseAccessMember(l,p,!0);else if(this.consumeOptionalCharacter(91))l=this.parseKeyedReadOrWrite(l,p,!1);else if(this.consumeOptionalCharacter(40))l=this.parseCall(l,p,!1);else{if(!this.consumeOptionalOperator("!"))return l;l=new QC(this.span(p),this.sourceSpan(p),l)}}parsePrimary(){const p=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const l=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),l}if(this.next.isKeywordNull())return this.advance(),new am(this.span(p),this.sourceSpan(p),null);if(this.next.isKeywordUndefined())return this.advance(),new am(this.span(p),this.sourceSpan(p),void 0);if(this.next.isKeywordTrue())return this.advance(),new am(this.span(p),this.sourceSpan(p),!0);if(this.next.isKeywordFalse())return this.advance(),new am(this.span(p),this.sourceSpan(p),!1);if(this.next.isKeywordThis())return this.advance(),new g0(this.span(p),this.sourceSpan(p));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const l=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new $T(this.span(p),this.sourceSpan(p),l)}if(this.next.isCharacter(mm))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new fu(this.span(p),this.sourceSpan(p)),p,!1);if(this.next.isNumber()){const l=this.next.toNumber();return this.advance(),new am(this.span(p),this.sourceSpan(p),l)}if(this.next.isString()){const l=this.next.toString();return this.advance(),new am(this.span(p),this.sourceSpan(p),l)}return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new gu(this.span(p),this.sourceSpan(p))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new gu(this.span(p),this.sourceSpan(p))):(this.error(`Unexpected token ${this.next}`),new gu(this.span(p),this.sourceSpan(p)))}parseExpressionList(p){const l=[];do{if(this.next.isCharacter(p))break;l.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return l}parseLiteralMap(){const p=[],l=[],O=this.inputIndex;if(this.expectCharacter(mm),!this.consumeOptionalCharacter(Hh)){this.rbracesExpected++;do{const F=this.inputIndex,se=this.next.isString(),we=this.expectIdentifierOrKeywordOrString(),We={key:we,quoted:se};if(p.push(We),se)this.expectCharacter(58),l.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))l.push(this.parsePipe());else{We.isShorthandInitialized=!0;const gt=this.span(F),Ft=this.sourceSpan(F);l.push(new YC(gt,Ft,Ft,new fu(gt,Ft),we))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(Hh));this.rbracesExpected--,this.expectCharacter(Hh)}return new FE(this.span(O),this.sourceSpan(O),p,l)}parseAccessMember(p,l,O){const F=this.inputIndex,se=this.withContext(MO.Writable,()=>{const gt=this.expectIdentifierOrKeyword()??"";return 0===gt.length&&this.error("Expected identifier for property access",p.span.end),gt}),we=this.sourceSpan(F);let We;if(O)this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),We=new gu(this.span(l),this.sourceSpan(l))):We=new WT(this.span(l),this.sourceSpan(l),we,p,se);else if(this.consumeOptionalOperator("=")){if(!(1&this.parseFlags))return this.error("Bindings cannot contain assignments"),new gu(this.span(l),this.sourceSpan(l));const gt=this.parseConditional();We=new BE(this.span(l),this.sourceSpan(l),we,p,se,gt)}else We=new YC(this.span(l),this.sourceSpan(l),we,p,se);return We}parseCall(p,l,O){const F=this.inputIndex;this.rparensExpected++;const se=this.parseCallArguments(),we=this.span(F,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;const We=this.span(l),gt=this.sourceSpan(l);return O?new Ab(We,gt,p,se,we):new Db(We,gt,p,se,we)}parseCallArguments(){if(this.next.isCharacter(41))return[];const p=[];do{p.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return p}expectTemplateBindingKey(){let p="",l=!1;const O=this.currentAbsoluteOffset;do{p+=this.expectIdentifierOrKeywordOrString(),l=this.consumeOptionalOperator("-"),l&&(p+="-")}while(l);return{source:p,span:new uh(O,O+p.length)}}parseTemplateBindings(p){const l=[];for(l.push(...this.parseDirectiveKeywordBindings(p));this.index<this.tokens.length;){const O=this.parseLetBinding();if(O)l.push(O);else{const F=this.expectTemplateBindingKey(),se=this.parseAsBinding(F);se?l.push(se):(F.source=p.source+F.source.charAt(0).toUpperCase()+F.source.substring(1),l.push(...this.parseDirectiveKeywordBindings(F)))}this.consumeStatementTerminator()}return new vR(l,[],this.errors)}parseKeyedReadOrWrite(p,l,O){return this.withContext(MO.Writable,()=>{this.rbracketsExpected++;const F=this.parsePipe();if(F instanceof gu&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),!this.consumeOptionalOperator("="))return O?new NE(this.span(l),this.sourceSpan(l),p,F):new Tb(this.span(l),this.sourceSpan(l),p,F);if(!O){const se=this.parseConditional();return new lg(this.span(l),this.sourceSpan(l),p,F,se)}return this.error("The '?.' operator cannot be used in the assignment"),new gu(this.span(l),this.sourceSpan(l))})}parseDirectiveKeywordBindings(p){const l=[];this.consumeOptionalCharacter(58);const O=this.getDirectiveBoundTarget();let F=this.currentAbsoluteOffset;const se=this.parseAsBinding(p);se||(this.consumeStatementTerminator(),F=this.currentAbsoluteOffset);const we=new uh(p.span.start,F);return l.push(new XL(we,p,O)),se&&l.push(se),l}getDirectiveBoundTarget(){if(this.next===eC||this.peekKeywordAs()||this.peekKeywordLet())return null;const p=this.parsePipe(),{start:l,end:O}=p.span,F=this.input.substring(l,O);return new hh(p,F,this.location,this.absoluteOffset+l,this.errors)}parseAsBinding(p){if(!this.peekKeywordAs())return null;this.advance();const l=this.expectTemplateBindingKey();this.consumeStatementTerminator();const O=new uh(p.span.start,this.currentAbsoluteOffset);return new pf(O,l,p)}parseLetBinding(){if(!this.peekKeywordLet())return null;const p=this.currentAbsoluteOffset;this.advance();const l=this.expectTemplateBindingKey();let O=null;this.consumeOptionalOperator("=")&&(O=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const F=new uh(p,this.currentAbsoluteOffset);return new pf(F,l,O)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(p,l=null){this.errors.push(new Nh(p,this.input,this.locationText(l),this.location)),this.skip()}locationText(p=null){return null==p&&(p=this.index),p<this.tokens.length?`at column ${this.tokens[p].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(p,l){let O=`Private identifiers are not supported. Unexpected private identifier: ${p}`;null!==l&&(O+=`, ${l}`),this.error(O)}skip(){let p=this.next;for(;this.index<this.tokens.length&&!p.isCharacter(59)&&!p.isOperator("|")&&(this.rparensExpected<=0||!p.isCharacter(41))&&(this.rbracesExpected<=0||!p.isCharacter(Hh))&&(this.rbracketsExpected<=0||!p.isCharacter(93))&&!(this.context&MO.Writable&&p.isOperator("="));)this.next.isError()&&this.errors.push(new Nh(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),p=this.next}}class p2 extends jT{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}class eS{constructor(p,l){this.sourceSpan=p,this.i18n=l}}class tS extends eS{constructor(p,l,O,F){super(l,F),this.value=p,this.tokens=O}visit(p,l){return p.visitText(this,l)}}class RO extends eS{constructor(p,l,O,F,se,we){super(F,we),this.switchValue=p,this.type=l,this.cases=O,this.switchValueSourceSpan=se}visit(p,l){return p.visitExpansion(this,l)}}class nS{constructor(p,l,O,F,se){this.value=p,this.expression=l,this.sourceSpan=O,this.valueSourceSpan=F,this.expSourceSpan=se}visit(p,l){return p.visitExpansionCase(this,l)}}class by extends eS{constructor(p,l,O,F,se,we,We){super(O,We),this.name=p,this.value=l,this.keySpan=F,this.valueSpan=se,this.valueTokens=we}visit(p,l){return p.visitAttribute(this,l)}}class _h extends eS{constructor(p,l,O,F,se,we=null,We){super(F,We),this.name=p,this.attrs=l,this.children=O,this.startSourceSpan=se,this.endSourceSpan=we}visit(p,l){return p.visitElement(this,l)}}class kO{constructor(p,l){this.value=p,this.sourceSpan=l}visit(p,l){return p.visitComment(this,l)}}class P_ extends eS{constructor(p,l,O,F,se,we,We=null,gt){super(F,gt),this.name=p,this.parameters=l,this.children=O,this.nameSpan=se,this.startSourceSpan=we,this.endSourceSpan=We}visit(p,l){return p.visitBlock(this,l)}}class fA{constructor(p,l){this.expression=p,this.sourceSpan=l}visit(p,l){return p.visitBlockParameter(this,l)}}class LO{constructor(p,l,O,F,se){this.name=p,this.value=l,this.sourceSpan=O,this.nameSpan=F,this.valueSpan=se}visit(p,l){return p.visitLetDeclaration(this,l)}}function Ps(v,p,l=null){const O=[],F=v.visit?se=>v.visit(se,l)||se.visit(v,l):se=>se.visit(v,l);return p.forEach(se=>{const we=F(se);we&&O.push(we)}),O}let ax;function yR(){return ax||(ax={},BO(Ml.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),BO(Ml.STYLE,["*|style"]),BO(Ml.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),BO(Ml.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),ax}function BO(v,p){for(const l of p)ax[l.toLowerCase()]=v}const mA=new Set(["sandbox","allow","allowfullscreen","referrerpolicy","csp","fetchpriority"]);function NO(v){return mA.has(v.toLowerCase())}class _A{}const FO=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],VO=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),vA=Array.from(VO).reduce((v,[p,l])=>(v.set(p,l),v),new Map);class lx extends _A{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,FO.forEach(p=>{const l=new Map,O=new Set,[F,se]=p.split("|"),we=se.split(","),[We,gt]=F.split("^");We.split(",").forEach(pn=>{this._schema.set(pn.toLowerCase(),l),this._eventSchema.set(pn.toLowerCase(),O)});const Ft=gt&&this._schema.get(gt.toLowerCase());if(Ft){for(const[pn,fi]of Ft)l.set(pn,fi);for(const pn of this._eventSchema.get(gt.toLowerCase()))O.add(pn)}we.forEach(pn=>{if(pn.length>0)switch(pn[0]){case"*":O.add(pn.substring(1));break;case"!":l.set(pn.substring(1),"boolean");break;case"#":l.set(pn.substring(1),"number");break;case"%":l.set(pn.substring(1),"object");break;default:l.set(pn,"string")}})})}hasProperty(p,l,O){if(O.some(se=>se.name===Ev_name))return!0;if(p.indexOf("-")>-1){if(KT(p)||HE(p))return!1;if(O.some(se=>se.name===o0_name))return!0}return(this._schema.get(p.toLowerCase())||this._schema.get("unknown")).has(l)}hasElement(p,l){return!!(l.some(O=>O.name===Ev_name)||p.indexOf("-")>-1&&(KT(p)||HE(p)||l.some(O=>O.name===o0_name)))||this._schema.has(p.toLowerCase())}securityContext(p,l,O){O&&(l=this.getMappedPropName(l)),p=p.toLowerCase(),l=l.toLowerCase();let F=yR()[p+"|"+l];return F||(F=yR()["*|"+l],F||Ml.NONE)}getMappedPropName(p){return VO.get(p)??p}getDefaultComponentElementName(){return"ng-component"}validateProperty(p){return p.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${p}' is disallowed for security reasons, please use (${p.slice(2)})=...\nIf '${p}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(p){return p.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${p}' is disallowed for security reasons, please use (${p.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(p){const l=this._schema.get(p.toLowerCase())||this._schema.get("unknown");return Array.from(l.keys()).map(O=>vA.get(O)??O)}allKnownEventsOfElement(p){return Array.from(this._eventSchema.get(p.toLowerCase())??[])}normalizeAnimationStyleProperty(p){return function fM(v){return v.replace(DE,(...p)=>p[1].toUpperCase())}(p)}normalizeAnimationStyleValue(p,l,O){let F="";const se=O.toString().trim();let we=null;if(function SR(v){switch(v){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(p)&&0!==O&&"0"!==O)if("number"==typeof O)F="px";else{const We=O.match(/^[+-]?[\d\.]+([a-z]*)$/);We&&0==We[1].length&&(we=`Please provide a CSS unit value for ${l}:${O}`)}return{error:we,value:se+F}}}class xa{constructor({closedByChildren:p,implicitNamespacePrefix:l,contentType:O=Ea.PARSABLE_DATA,closedByParent:F=!1,isVoid:se=!1,ignoreFirstLf:we=!1,preventNamespaceInheritance:We=!1,canSelfClose:gt=!1}={}){this.closedByChildren={},this.closedByParent=!1,p&&p.length>0&&p.forEach(Ft=>this.closedByChildren[Ft]=!0),this.isVoid=se,this.closedByParent=F||se,this.implicitNamespacePrefix=l||null,this.contentType=O,this.ignoreFirstLf=we,this.preventNamespaceInheritance=We,this.canSelfClose=gt??se}isClosedByChild(p){return this.isVoid||p.toLowerCase()in this.closedByChildren}getContentType(p){return"object"==typeof this.contentType?(void 0===p?void 0:this.contentType[p])??this.contentType.default:this.contentType}}let iS,M_;function CA(v){return M_||(iS=new xa({canSelfClose:!0}),M_=Object.assign(Object.create(null),{base:new xa({isVoid:!0}),meta:new xa({isVoid:!0}),area:new xa({isVoid:!0}),embed:new xa({isVoid:!0}),link:new xa({isVoid:!0}),img:new xa({isVoid:!0}),input:new xa({isVoid:!0}),param:new xa({isVoid:!0}),hr:new xa({isVoid:!0}),br:new xa({isVoid:!0}),source:new xa({isVoid:!0}),track:new xa({isVoid:!0}),wbr:new xa({isVoid:!0}),p:new xa({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new xa({closedByChildren:["tbody","tfoot"]}),tbody:new xa({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new xa({closedByChildren:["tbody"],closedByParent:!0}),tr:new xa({closedByChildren:["tr"],closedByParent:!0}),td:new xa({closedByChildren:["td","th"],closedByParent:!0}),th:new xa({closedByChildren:["td","th"],closedByParent:!0}),col:new xa({isVoid:!0}),svg:new xa({implicitNamespacePrefix:"svg"}),foreignObject:new xa({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new xa({implicitNamespacePrefix:"math"}),li:new xa({closedByChildren:["li"],closedByParent:!0}),dt:new xa({closedByChildren:["dt","dd"]}),dd:new xa({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new xa({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new xa({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new xa({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new xa({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new xa({closedByChildren:["optgroup"],closedByParent:!0}),option:new xa({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new xa({ignoreFirstLf:!0}),listing:new xa({ignoreFirstLf:!0}),style:new xa({contentType:Ea.RAW_TEXT}),script:new xa({contentType:Ea.RAW_TEXT}),title:new xa({contentType:{default:Ea.ESCAPABLE_RAW_TEXT,svg:Ea.PARSABLE_DATA}}),textarea:new xa({contentType:Ea.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),(new lx).allKnownElementNames().forEach(p=>{!M_[p]&&null===XT(p)&&(M_[p]=new xa({canSelfClose:!1}))})),M_[v]??M_[v.toLowerCase()]??iS}const yA={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"};class ER{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(p,l,O){const F=this._hashTag(p,l,O);if(this._signatureToName[F])return this._signatureToName[F];const se=p.toUpperCase(),we=yA[se]||`TAG_${se}`,We=this._generateUniqueName(O?we:`START_${we}`);return this._signatureToName[F]=We,We}getCloseTagPlaceholderName(p){const l=this._hashClosingTag(p);if(this._signatureToName[l])return this._signatureToName[l];const O=p.toUpperCase(),se=this._generateUniqueName(`CLOSE_${yA[O]||`TAG_${O}`}`);return this._signatureToName[l]=se,se}getPlaceholderName(p,l){const O=p.toUpperCase(),F=`PH: ${O}=${l}`;if(this._signatureToName[F])return this._signatureToName[F];const se=this._generateUniqueName(O);return this._signatureToName[F]=se,se}getUniquePlaceholder(p){return this._generateUniqueName(p.toUpperCase())}getStartBlockPlaceholderName(p,l){const O=this._hashBlock(p,l);if(this._signatureToName[O])return this._signatureToName[O];const F=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(p)}`);return this._signatureToName[O]=F,F}getCloseBlockPlaceholderName(p){const l=this._hashClosingBlock(p);if(this._signatureToName[l])return this._signatureToName[l];const O=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(p)}`);return this._signatureToName[l]=O,O}_hashTag(p,l,O){return`<${p}`+Object.keys(l).sort().map(We=>` ${We}=${l[We]}`).join("")+(O?"/>":`></${p}>`)}_hashClosingTag(p){return this._hashTag(`/${p}`,{},!1)}_hashBlock(p,l){return`@${p}${0===l.length?"":` (${l.sort().join("; ")})`} {}`}_hashClosingBlock(p){return this._hashBlock(`close_${p}`,[])}_toSnakeCase(p){return p.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(p){if(!this._placeHolderNameCounts.hasOwnProperty(p))return this._placeHolderNameCounts[p]=1,p;const O=this._placeHolderNameCounts[p];return this._placeHolderNameCounts[p]=O+1,`${p}_${O}`}}const bA=new VB(new wf);function xy(v,p){return p}class oS{constructor(p,l,O){this._expressionParser=p,this._interpolationConfig=l,this._containerBlocks=O}toI18nMessage(p,l="",O="",F="",se){const we={isIcu:1==p.length&&p[0]instanceof RO,icuDepth:0,placeholderRegistry:new ER,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:se||xy},We=Ps(this,p,we);return new mu(We,we.placeholderToContent,we.placeholderToMessage,l,O,F)}visitElement(p,l){const O=Ps(this,p.children,l),F={};p.attrs.forEach(Ft=>{F[Ft.name]=Ft.value});const se=CA(p.name).isVoid,we=l.placeholderRegistry.getStartTagPlaceholderName(p.name,F,se);l.placeholderToContent[we]={text:p.startSourceSpan.toString(),sourceSpan:p.startSourceSpan};let We="";se||(We=l.placeholderRegistry.getCloseTagPlaceholderName(p.name),l.placeholderToContent[We]={text:`</${p.name}>`,sourceSpan:p.endSourceSpan??p.sourceSpan});const gt=new dg(p.name,F,we,We,O,se,p.sourceSpan,p.startSourceSpan,p.endSourceSpan);return l.visitNodeFn(p,gt)}visitAttribute(p,l){const O=void 0===p.valueTokens||1===p.valueTokens.length?new yp(p.value,p.valueSpan||p.sourceSpan):this._visitTextWithInterpolation(p.valueTokens,p.valueSpan||p.sourceSpan,l,p.i18n);return l.visitNodeFn(p,O)}visitText(p,l){const O=1===p.tokens.length?new yp(p.value,p.sourceSpan):this._visitTextWithInterpolation(p.tokens,p.sourceSpan,l,p.i18n);return l.visitNodeFn(p,O)}visitComment(p,l){return null}visitExpansion(p,l){l.icuDepth++;const O={},F=new m_(p.switchValue,p.type,O,p.sourceSpan);if(p.cases.forEach(We=>{O[We.value]=new cg(We.expression.map(gt=>gt.visit(this,l)),We.expSourceSpan)}),l.icuDepth--,l.isIcu||l.icuDepth>0){const We=l.placeholderRegistry.getUniquePlaceholder(`VAR_${p.type}`);return F.expressionPlaceholder=We,l.placeholderToContent[We]={text:p.switchValue,sourceSpan:p.switchValueSourceSpan},l.visitNodeFn(p,F)}const se=l.placeholderRegistry.getPlaceholderName("ICU",p.sourceSpan.toString());l.placeholderToMessage[se]=this.toI18nMessage([p],"","","",void 0);const we=new Lv(F,se,p.sourceSpan);return l.visitNodeFn(p,we)}visitExpansionCase(p,l){throw new Error("Unreachable code")}visitBlock(p,l){const O=Ps(this,p.children,l);if(this._containerBlocks.has(p.name))return new cg(O,p.sourceSpan);const F=p.parameters.map(gt=>gt.expression),se=l.placeholderRegistry.getStartBlockPlaceholderName(p.name,F),we=l.placeholderRegistry.getCloseBlockPlaceholderName(p.name);l.placeholderToContent[se]={text:p.startSourceSpan.toString(),sourceSpan:p.startSourceSpan},l.placeholderToContent[we]={text:p.endSourceSpan?p.endSourceSpan.toString():"}",sourceSpan:p.endSourceSpan??p.sourceSpan};const We=new __(p.name,F,se,we,O,p.sourceSpan,p.startSourceSpan,p.endSourceSpan);return l.visitNodeFn(p,We)}visitBlockParameter(p,l){throw new Error("Unreachable code")}visitLetDeclaration(p,l){return null}_visitTextWithInterpolation(p,l,O,F){const se=[];let we=!1;for(const We of p)switch(We.type){case 8:case 17:we=!0;const gt=We.parts[1],Ft=gt.split(OR)[2]||"INTERPOLATION",pn=O.placeholderRegistry.getPlaceholderName(Ft,gt);O.placeholderToContent[pn]={text:We.parts.join(""),sourceSpan:We.sourceSpan},se.push(new um(gt,pn,We.sourceSpan));break;default:if(We.parts[0].length>0){const fi=se[se.length-1];fi instanceof yp?(fi.value+=We.parts[0],fi.sourceSpan=new Ws(fi.sourceSpan.start,We.sourceSpan.end,fi.sourceSpan.fullStart,fi.sourceSpan.details)):se.push(new yp(We.parts[0],We.sourceSpan))}}return we?(function xA(v,p){if(p instanceof mu&&(function zB(v){const p=v.nodes;if(1!==p.length||!(p[0]instanceof cg))throw new Error("Unexpected previous i18n message - expected it to consist of only a single `Container` node.")}(p),p=p.nodes[0]),p instanceof cg){!function GB(v,p){if(v.length!==p.length)throw new Error("The number of i18n message children changed between first and second pass.");if(v.some((l,O)=>p[O].constructor!==l.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}(p.children,v);for(let l=0;l<v.length;l++)v[l].sourceSpan=p.children[l].sourceSpan}}(se,F),new cg(se,l)):se[0]}}const OR=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;class Sm extends ea{constructor(p,l){super(p,l)}}const Em={AElig:"\xc6",AMP:"&",amp:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\u{1d504}",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\u{1d538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xc5",angst:"\xc5",Ascr:"\u{1d49c}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212c",Bscr:"\u212c",bernou:"\u212c",Beta:"\u0392",Bfr:"\u{1d505}",Bopf:"\u{1d539}",Breve:"\u02d8",breve:"\u02d8",Bumpeq:"\u224e",HumpDownHump:"\u224e",bump:"\u224e",CHcy:"\u0427",COPY:"\xa9",copy:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212d",Cfr:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",cedil:"\xb8",CenterDot:"\xb7",centerdot:"\xb7",middot:"\xb7",Chi:"\u03a7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201d",rdquo:"\u201d",rdquor:"\u201d",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2a74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222f",DoubleContourIntegral:"\u222f",ContourIntegral:"\u222e",conint:"\u222e",oint:"\u222e",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2a2f",Cscr:"\u{1d49e}",Cup:"\u22d3",CupCap:"\u224d",asympeq:"\u224d",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",DoubleLeftTee:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1d507}",DiacriticalAcute:"\xb4",acute:"\xb4",DiacriticalDot:"\u02d9",dot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",dblac:"\u02dd",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02dc",tilde:"\u02dc",Diamond:"\u22c4",diam:"\u22c4",diamond:"\u22c4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1d53b}",Dot:"\xa8",DoubleDot:"\xa8",die:"\xa8",uml:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21d3",Downarrow:"\u21d3",dArr:"\u21d3",DoubleLeftArrow:"\u21d0",Leftarrow:"\u21d0",lArr:"\u21d0",DoubleLeftRightArrow:"\u21d4",Leftrightarrow:"\u21d4",hArr:"\u21d4",iff:"\u21d4",DoubleLongLeftArrow:"\u27f8",Longleftarrow:"\u27f8",xlArr:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",Longleftrightarrow:"\u27fa",xhArr:"\u27fa",DoubleLongRightArrow:"\u27f9",Longrightarrow:"\u27f9",xrArr:"\u27f9",DoubleRightArrow:"\u21d2",Implies:"\u21d2",Rightarrow:"\u21d2",rArr:"\u21d2",DoubleRightTee:"\u22a8",vDash:"\u22a8",DoubleUpArrow:"\u21d1",Uparrow:"\u21d1",uArr:"\u21d1",DoubleUpDownArrow:"\u21d5",Updownarrow:"\u21d5",vArr:"\u21d5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",duarr:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",leftharpoondown:"\u21bd",lhard:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",rhard:"\u21c1",rightharpoondown:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",top:"\u22a4",DownTeeArrow:"\u21a7",mapstodown:"\u21a7",Dscr:"\u{1d49f}",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\u{1d508}",Egrave:"\xc8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\u{1d53c}",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21cc",rightleftharpoons:"\u21cc",rlhar:"\u21cc",Escr:"\u2130",expectation:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1d509}",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",blacksquare:"\u25aa",squarf:"\u25aa",squf:"\u25aa",Fopf:"\u{1d53d}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1d50a}",Gg:"\u22d9",ggg:"\u22d9",Gopf:"\u{1d53e}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22db",gel:"\u22db",gtreqless:"\u22db",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2a7e",geqslant:"\u2a7e",ges:"\u2a7e",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1d4a2}",Gt:"\u226b",NestedGreaterGreater:"\u226b",gg:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",caron:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",Poincareplane:"\u210c",HilbertSpace:"\u210b",Hscr:"\u210b",hamilt:"\u210b",Hopf:"\u210d",quaternions:"\u210d",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224f",bumpe:"\u224f",bumpeq:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xcc",Imacr:"\u012a",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222c",Integral:"\u222b",int:"\u222b",Intersection:"\u22c2",bigcap:"\u22c2",xcap:"\u22c2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012e",Iopf:"\u{1d540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1d50d}",Jopf:"\u{1d541}",Jscr:"\u{1d4a5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\u{1d50e}",Kopf:"\u{1d542}",Kscr:"\u{1d4a6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219e",twoheadleftarrow:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",lang:"\u27e8",langle:"\u27e8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21e4",larrb:"\u21e4",LeftArrowRightArrow:"\u21c6",leftrightarrows:"\u21c6",lrarr:"\u21c6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27e6",lobrk:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",dharl:"\u21c3",downharpoonleft:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",lfloor:"\u230a",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",dashv:"\u22a3",LeftTeeArrow:"\u21a4",mapstoleft:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",vartriangleleft:"\u22b2",vltri:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",ltrie:"\u22b4",trianglelefteq:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",uharl:"\u21bf",upharpoonleft:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",leftharpoonup:"\u21bc",lharu:"\u21bc",LeftVectorBar:"\u2952",LessEqualGreater:"\u22da",leg:"\u22da",lesseqgtr:"\u22da",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",leqslant:"\u2a7d",les:"\u2a7d",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1d50f}",Ll:"\u22d8",Lleftarrow:"\u21da",lAarr:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",longleftarrow:"\u27f5",xlarr:"\u27f5",LongLeftRightArrow:"\u27f7",longleftrightarrow:"\u27f7",xharr:"\u27f7",LongRightArrow:"\u27f6",longrightarrow:"\u27f6",xrarr:"\u27f6",Lopf:"\u{1d543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21b0",lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",NestedLessLess:"\u226a",ll:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1d510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1d544}",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",ZeroWidthSpace:"\u200b",NewLine:"\n",Nfr:"\u{1d511}",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nbsp:"\xa0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226f",ngt:"\u226f",ngtr:"\u226f",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",nGtv:"\u226b\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224e\u0338",nbump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",nbumpe:"\u224f\u0338",NotLeftTriangle:"\u22ea",nltri:"\u22ea",ntriangleleft:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",nltrie:"\u22ec",ntrianglelefteq:"\u22ec",NotLess:"\u226e",nless:"\u226e",nlt:"\u226e",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226a\u0338",nLtv:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",npre:"\u2aaf\u0338",npreceq:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",nprcue:"\u22e0",NotReverseElement:"\u220c",notni:"\u220c",notniva:"\u220c",NotRightTriangle:"\u22eb",nrtri:"\u22eb",ntriangleright:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",nrtrie:"\u22ed",ntrianglerighteq:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",nsqsube:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",nsqsupe:"\u22e3",NotSubset:"\u2282\u20d2",nsubset:"\u2282\u20d2",vnsub:"\u2282\u20d2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",nsce:"\u2ab0\u0338",nsucceq:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",nsccue:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",nsupset:"\u2283\u20d2",vnsup:"\u2283\u20d2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1d4a9}",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\u{1d512}",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",ohm:"\u03a9",Omicron:"\u039f",Oopf:"\u{1d546}",OpenCurlyDoubleQuote:"\u201c",ldquo:"\u201c",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2a54",Oscr:"\u{1d4aa}",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",oline:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",tbrk:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",part:"\u2202",Pcy:"\u041f",Pfr:"\u{1d513}",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",plusmn:"\xb1",pm:"\xb1",Popf:"\u2119",primes:"\u2119",Pr:"\u2abb",Precedes:"\u227a",pr:"\u227a",prec:"\u227a",PrecedesEqual:"\u2aaf",pre:"\u2aaf",preceq:"\u2aaf",PrecedesSlantEqual:"\u227c",prcue:"\u227c",preccurlyeq:"\u227c",PrecedesTilde:"\u227e",precsim:"\u227e",prsim:"\u227e",Prime:"\u2033",Product:"\u220f",prod:"\u220f",Proportional:"\u221d",prop:"\u221d",propto:"\u221d",varpropto:"\u221d",vprop:"\u221d",Pscr:"\u{1d4ab}",Psi:"\u03a8",QUOT:'"',quot:'"',Qfr:"\u{1d514}",Qopf:"\u211a",rationals:"\u211a",Qscr:"\u{1d4ac}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xae",circledR:"\xae",reg:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",twoheadrightarrow:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",Rfr:"\u211c",real:"\u211c",realpart:"\u211c",ReverseElement:"\u220b",SuchThat:"\u220b",ni:"\u220b",niv:"\u220b",ReverseEquilibrium:"\u21cb",leftrightharpoons:"\u21cb",lrhar:"\u21cb",ReverseUpEquilibrium:"\u296f",duhar:"\u296f",Rho:"\u03a1",RightAngleBracket:"\u27e9",rang:"\u27e9",rangle:"\u27e9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21e5",rarrb:"\u21e5",RightArrowLeftArrow:"\u21c4",rightleftarrows:"\u21c4",rlarr:"\u21c4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27e7",robrk:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",dharr:"\u21c2",downharpoonright:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rfloor:"\u230b",RightTee:"\u22a2",vdash:"\u22a2",RightTeeArrow:"\u21a6",map:"\u21a6",mapsto:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",vartriangleright:"\u22b3",vrtri:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",rtrie:"\u22b5",trianglerighteq:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",uharr:"\u21be",upharpoonright:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",rharu:"\u21c0",rightharpoonup:"\u21c0",RightVectorBar:"\u2953",Ropf:"\u211d",reals:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",rAarr:"\u21db",Rscr:"\u211b",realine:"\u211b",Rsh:"\u21b1",rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\u{1d516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1d54a}",Sqrt:"\u221a",radic:"\u221a",Square:"\u25a1",squ:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228f",sqsub:"\u228f",sqsubset:"\u228f",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1d4ae}",Star:"\u22c6",sstarf:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227b",sc:"\u227b",succ:"\u227b",SucceedsEqual:"\u2ab0",sce:"\u2ab0",succeq:"\u2ab0",SucceedsSlantEqual:"\u227d",sccue:"\u227d",succcurlyeq:"\u227d",SucceedsTilde:"\u227f",scsim:"\u227f",succsim:"\u227f",Sum:"\u2211",sum:"\u2211",Sup:"\u22d1",Supset:"\u22d1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xde",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1d517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223c",sim:"\u223c",thicksim:"\u223c",thksim:"\u223c",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1d54b}",TripleDot:"\u20db",tdot:"\u20db",Tscr:"\u{1d4af}",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1d518}",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",lowbar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",bbrk:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",bigcup:"\u22c3",xcup:"\u22c3",UnionPlus:"\u228e",uplus:"\u228e",Uogon:"\u0172",Uopf:"\u{1d54c}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",udarr:"\u21c5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296e",udhar:"\u296e",UpTee:"\u22a5",bot:"\u22a5",bottom:"\u22a5",perp:"\u22a5",UpTeeArrow:"\u21a5",mapstoup:"\u21a5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\u{1d4b0}",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",bigvee:"\u22c1",xvee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200a",hairsp:"\u200a",Vfr:"\u{1d519}",Vopf:"\u{1d54d}",Vscr:"\u{1d4b1}",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",bigwedge:"\u22c0",xwedge:"\u22c0",Wfr:"\u{1d51a}",Wopf:"\u{1d54e}",Wscr:"\u{1d4b2}",Xfr:"\u{1d51b}",Xi:"\u039e",Xopf:"\u{1d54f}",Xscr:"\u{1d4b3}",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\u{1d51c}",Yopf:"\u{1d550}",Yscr:"\u{1d4b4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1d4b5}",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",mstpos:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acy:"\u0430",aelig:"\xe6",afr:"\u{1d51e}",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",and:"\u2227",wedge:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",angle:"\u2220",ange:"\u29a4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angzarr:"\u237c",aogon:"\u0105",aopf:"\u{1d552}",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",approxeq:"\u224a",apid:"\u224b",apos:"'",aring:"\xe5",ascr:"\u{1d4b6}",ast:"*",midast:"*",atilde:"\xe3",auml:"\xe4",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",bcong:"\u224c",backepsilon:"\u03f6",bepsi:"\u03f6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223d",bsim:"\u223d",backsimeq:"\u22cd",bsime:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23b6",bcy:"\u0431",bdquo:"\u201e",ldquor:"\u201e",bemptyv:"\u29b0",beta:"\u03b2",beth:"\u2136",between:"\u226c",twixt:"\u226c",bfr:"\u{1d51f}",bigcirc:"\u25ef",xcirc:"\u25ef",bigodot:"\u2a00",xodot:"\u2a00",bigoplus:"\u2a01",xoplus:"\u2a01",bigotimes:"\u2a02",xotime:"\u2a02",bigsqcup:"\u2a06",xsqcup:"\u2a06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25bd",xdtri:"\u25bd",bigtriangleup:"\u25b3",xutri:"\u25b3",biguplus:"\u2a04",xuplus:"\u2a04",bkarow:"\u290d",rbarr:"\u290d",blacklozenge:"\u29eb",lozf:"\u29eb",blacktriangle:"\u25b4",utrif:"\u25b4",blacktriangledown:"\u25be",dtrif:"\u25be",blacktriangleleft:"\u25c2",ltrif:"\u25c2",blacktriangleright:"\u25b8",rtrif:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\u{1d553}",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",minusb:"\u229f",boxplus:"\u229e",plusb:"\u229e",boxtimes:"\u22a0",timesb:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",brvbar:"\xa6",bscr:"\u{1d4b7}",bsemi:"\u204f",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2aae",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cemptyv:"\u29b2",cent:"\xa2",cfr:"\u{1d520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21ba",olarr:"\u21ba",circlearrowright:"\u21bb",orarr:"\u21bb",circledS:"\u24c8",oS:"\u24c8",circledast:"\u229b",oast:"\u229b",circledcirc:"\u229a",ocir:"\u229a",circleddash:"\u229d",odash:"\u229d",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2a6d",copf:"\u{1d554}",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\u{1d4b8}",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",curlyeqprec:"\u22de",cuesc:"\u22df",curlyeqsucc:"\u22df",cularr:"\u21b6",curvearrowleft:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curvearrowright:"\u21b7",curarrm:"\u293c",curlyvee:"\u22ce",cuvee:"\u22ce",curlywedge:"\u22cf",cuwed:"\u22cf",curren:"\xa4",cwint:"\u2231",cylcty:"\u232d",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290f",rBarr:"\u290f",dcaron:"\u010f",dcy:"\u0434",ddarr:"\u21ca",downdownarrows:"\u21ca",ddotseq:"\u2a77",eDDot:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\u{1d521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03dd",gammad:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",llcorner:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\u{1d555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22a1",sdotb:"\u22a1",drcorn:"\u231f",lrcorner:"\u231f",drcrop:"\u230c",dscr:"\u{1d4b9}",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",triangledown:"\u25bf",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xea",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044d",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1d522}",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",eqslantgtr:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",eqslantless:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1d556}",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",straightepsilon:"\u03f5",varepsilon:"\u03f5",equals:"=",equest:"\u225f",questeq:"\u225f",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212f",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\u{1d523}",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\u{1d557}",fork:"\u22d4",pitchfork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",half:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1d4bb}",gEl:"\u2a8c",gtreqqless:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gap:"\u2a86",gtrapprox:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\u{1d524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gnsim:"\u22e7",gopf:"\u{1d558}",gscr:"\u210a",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtrdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrarr:"\u2978",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hardcy:"\u044a",harrcir:"\u2948",harrw:"\u21ad",leftrightsquigarrow:"\u21ad",hbar:"\u210f",hslash:"\u210f",planck:"\u210f",plankv:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22b9",hfr:"\u{1d525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",larrhk:"\u21a9",hookrightarrow:"\u21aa",rarrhk:"\u21aa",hopf:"\u{1d559}",horbar:"\u2015",hscr:"\u{1d4bd}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xed",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",ifr:"\u{1d526}",igrave:"\xec",iiiint:"\u2a0c",qint:"\u2a0c",iiint:"\u222d",tint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",imath:"\u0131",inodot:"\u0131",imof:"\u22b7",imped:"\u01b5",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",intcal:"\u22ba",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\u{1d55a}",iota:"\u03b9",iquest:"\xbf",iscr:"\u{1d4be}",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1d527}",jmath:"\u0237",jopf:"\u{1d55b}",jscr:"\u{1d4bf}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",varkappa:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\u{1d528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\u{1d55c}",kscr:"\u{1d4c0}",lAtail:"\u291b",lBarr:"\u290e",lEg:"\u2a8b",lesseqqgtr:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lambda:"\u03bb",langd:"\u2991",lap:"\u2a85",lessapprox:"\u2a85",laquo:"\xab",larrbfs:"\u291f",larrfs:"\u291d",larrlp:"\u21ab",looparrowleft:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",leftarrowtail:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lcy:"\u043b",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21c7",llarr:"\u21c7",leftthreetimes:"\u22cb",lthree:"\u22cb",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessdot:"\u22d6",ltdot:"\u22d6",lfisht:"\u297c",lfr:"\u{1d529}",lgE:"\u2a91",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",longmapsto:"\u27fc",xmap:"\u27fc",looparrowright:"\u21ac",rarrlp:"\u21ac",lopar:"\u2985",lopf:"\u{1d55d}",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",loz:"\u25ca",lozenge:"\u25ca",lpar:"(",lparlt:"\u2993",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\u{1d4c1}",lsime:"\u2a8d",lsimg:"\u2a8f",lsquor:"\u201a",sbquo:"\u201a",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",triangleleft:"\u25c3",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",strns:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",mfr:"\u{1d52a}",mho:"\u2127",micro:"\xb5",midcir:"\u2af0",minus:"\u2212",minusdu:"\u2a2a",mlcp:"\u2adb",models:"\u22a7",mopf:"\u{1d55e}",mscr:"\u{1d4c2}",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nLeftarrow:"\u21cd",nlArr:"\u21cd",nLeftrightarrow:"\u21ce",nhArr:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nRightarrow:"\u21cf",nrArr:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nacute:"\u0144",nang:"\u2220\u20d2",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",natur:"\u266e",natural:"\u266e",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",neArr:"\u21d7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1d52b}",nharr:"\u21ae",nleftrightarrow:"\u21ae",nhpar:"\u2af2",nis:"\u22fc",nisd:"\u22fa",njcy:"\u045a",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219a",nleftarrow:"\u219a",nldr:"\u2025",nopf:"\u{1d55f}",not:"\xac",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinvb:"\u22f7",notinvc:"\u22f6",notnivb:"\u22fe",notnivc:"\u22fd",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",nrarr:"\u219b",nrightarrow:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nscr:"\u{1d4c3}",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsubseteqq:"\u2ac5\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupseteqq:"\u2ac6\u0338",ntilde:"\xf1",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xf3",ocirc:"\xf4",ocy:"\u043e",odblac:"\u0151",odiv:"\u2a38",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\u{1d52c}",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",olcir:"\u29be",olcross:"\u29bb",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",oopf:"\u{1d560}",opar:"\u29b7",operp:"\u29b9",or:"\u2228",vee:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",para:"\xb6",parsim:"\u2af3",parsl:"\u2afd",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1d52d}",phi:"\u03c6",phiv:"\u03d5",straightphi:"\u03d5",varphi:"\u03d5",phone:"\u260e",pi:"\u03c0",piv:"\u03d6",varpi:"\u03d6",planckh:"\u210e",plus:"+",plusacir:"\u2a23",pluscir:"\u2a22",plusdu:"\u2a25",pluse:"\u2a72",plussim:"\u2a26",plustwo:"\u2a27",pointint:"\u2a15",popf:"\u{1d561}",pound:"\xa3",prE:"\u2ab3",prap:"\u2ab7",precapprox:"\u2ab7",precnapprox:"\u2ab9",prnap:"\u2ab9",precneqq:"\u2ab5",prnE:"\u2ab5",precnsim:"\u22e8",prnsim:"\u22e8",prime:"\u2032",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prurel:"\u22b0",pscr:"\u{1d4c5}",psi:"\u03c8",puncsp:"\u2008",qfr:"\u{1d52e}",qopf:"\u{1d562}",qprime:"\u2057",qscr:"\u{1d4c6}",quatint:"\u2a16",quest:"?",rAtail:"\u291c",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",raemptyv:"\u29b3",rangd:"\u2992",range:"\u29a5",raquo:"\xbb",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rightarrowtail:"\u21a3",rarrw:"\u219d",rightsquigarrow:"\u219d",ratail:"\u291a",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21b3",rect:"\u25ad",rfisht:"\u297d",rfr:"\u{1d52f}",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",varrho:"\u03f1",rightrightarrows:"\u21c9",rrarr:"\u21c9",rightthreetimes:"\u22cc",rthree:"\u22cc",ring:"\u02da",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",ropar:"\u2986",ropf:"\u{1d563}",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rsaquo:"\u203a",rscr:"\u{1d4c7}",rtimes:"\u22ca",rtri:"\u25b9",triangleright:"\u25b9",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",scE:"\u2ab4",scap:"\u2ab8",succapprox:"\u2ab8",scaron:"\u0161",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",succneqq:"\u2ab6",scnap:"\u2aba",succnapprox:"\u2aba",scnsim:"\u22e9",succnsim:"\u22e9",scpolint:"\u2a13",scy:"\u0441",sdot:"\u22c5",sdote:"\u2a66",seArr:"\u21d8",sect:"\xa7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1d530}",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",varsigma:"\u03c2",simdot:"\u2a6a",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",smashp:"\u2a33",smeparsl:"\u29e4",smile:"\u2323",ssmile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\u{1d564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\ufe00",sqcups:"\u2294\ufe00",sscr:"\u{1d4c8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2ac5",subseteqq:"\u2ac5",subdot:"\u2abd",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subsetneqq:"\u2acb",subne:"\u228a",subsetneq:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supE:"\u2ac6",supseteqq:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supsetneqq:"\u2acc",supne:"\u228b",supsetneq:"\u228b",supplus:"\u2ac0",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1d531}",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",vartheta:"\u03d1",thorn:"\xfe",times:"\xd7",timesbar:"\u2a31",timesd:"\u2a30",topbot:"\u2336",topcir:"\u2af1",topf:"\u{1d565}",topfork:"\u2ada",tprime:"\u2034",triangle:"\u25b5",utri:"\u25b5",triangleq:"\u225c",trie:"\u225c",tridot:"\u25ec",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\u{1d4c9}",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",uHar:"\u2963",uacute:"\xfa",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297e",ufr:"\u{1d532}",ugrave:"\xf9",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uogon:"\u0173",uopf:"\u{1d566}",upsi:"\u03c5",upsilon:"\u03c5",upuparrows:"\u21c8",uuarr:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\u{1d4ca}",utdot:"\u22f0",utilde:"\u0169",uuml:"\xfc",uwangle:"\u29a7",vBar:"\u2ae8",vBarv:"\u2ae9",vangrt:"\u299c",varsubsetneq:"\u228a\ufe00",vsubne:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",vsubnE:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",vsupne:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vsupnE:"\u2acc\ufe00",vcy:"\u0432",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",vfr:"\u{1d533}",vopf:"\u{1d567}",vscr:"\u{1d4cb}",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1d534}",wopf:"\u{1d568}",wscr:"\u{1d4cc}",xfr:"\u{1d535}",xi:"\u03be",xnis:"\u22fb",xopf:"\u{1d569}",xscr:"\u{1d4cd}",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\u{1d536}",yicy:"\u0457",yopf:"\u{1d56a}",yscr:"\u{1d4ce}",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeta:"\u03b6",zfr:"\u{1d537}",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\u{1d56b}",zscr:"\u{1d4cf}",zwj:"\u200d",zwnj:"\u200c"},R_="\ue500";Em.ngsp=R_;class HO extends ea{constructor(p,l,O){super(O,p),this.tokenType=l}}class cx{constructor(p,l,O){this.tokens=p,this.errors=l,this.nonNormalizedIcuExpressions=O}}const EA=/\r\n?/g;function UO(v){return`Unexpected character "${v===Wu?"EOF":String.fromCharCode(v)}"`}function OA(v){return`Unknown entity "${v}" - use the "&#<decimal>;" or  "&#x<hex>;" syntax`}var TR=function(v){return v.HEX="hexadecimal",v.DEC="decimal",v}(TR||{});class nC{constructor(p){this.error=p}}class WB{constructor(p,l,O){this._getTagDefinition=l,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=O.tokenizeExpansionForms||!1,this._interpolationConfig=O.interpolationConfig||$d,this._leadingTriviaCodePoints=O.leadingTriviaChars&&O.leadingTriviaChars.map(se=>se.codePointAt(0)||0);const F=O.range||{endPos:p.content.length,startPos:0,startLine:0,startCol:0};this._cursor=O.escapedString?new GO(p,F):new k_(p,F),this._preserveLineEndings=O.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=O.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=O.tokenizeBlocks??!0,this._tokenizeLet=O.tokenizeLet??!0;try{this._cursor.init()}catch(se){this.handleError(se)}}_processCarriageReturns(p){return this._preserveLineEndings?p:p.replace(EA,"\n")}tokenize(){for(;this._cursor.peek()!==Wu;){const p=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(p):this._attemptCharCode(45)?this._consumeComment(p):this._consumeDocType(p):this._attemptCharCode(47)?this._consumeTagClose(p):this._consumeTagOpen(p):this._tokenizeLet&&64===this._cursor.peek()&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(p):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(p):!this._tokenizeBlocks||this._inInterpolation||this._isInExpansionCase()||this._isInExpansionForm()||!this._attemptCharCode(Hh)?this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart()):this._consumeBlockEnd(p)}catch(l){this.handleError(l)}}this._beginToken(33),this._endToken([])}_getBlockName(){let p=!1;const l=this._cursor.clone();return this._attemptCharCodeUntilFn(O=>Cf(O)?!p:!function AR(v){return Gb(v)||Sp(v)||95===v}(O)||(p=!0,!1)),this._cursor.getChars(l).trim()}_consumeBlockStart(p){this._beginToken(24,p);const l=this._endToken([this._getBlockName()]);if(40===this._cursor.peek()){if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Yd),!this._attemptCharCode(41))return void(l.type=28);this._attemptCharCodeUntilFn(Yd)}this._attemptCharCode(mm)?(this._beginToken(25),this._endToken([])):l.type=28}_consumeBlockEnd(p){this._beginToken(26,p),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn($B);41!==this._cursor.peek()&&this._cursor.peek()!==Wu;){this._beginToken(27);const p=this._cursor.clone();let l=null,O=0;for(;59!==this._cursor.peek()&&this._cursor.peek()!==Wu||null!==l;){const F=this._cursor.peek();if(92===F)this._cursor.advance();else if(F===l)l=null;else if(null===l&&ry(F))l=F;else if(40===F&&null===l)O++;else if(41===F&&null===l){if(0===O)break;O>0&&O--}this._cursor.advance()}this._endToken([this._cursor.getChars(p)]),this._attemptCharCodeUntilFn($B)}}_consumeLetDeclaration(p){if(this._beginToken(29,p),!Cf(this._cursor.peek()))return void(this._endToken([this._cursor.getChars(p)]).type=32);this._attemptCharCodeUntilFn(Yd);const l=this._endToken([this._getLetDeclarationName()]);this._attemptCharCodeUntilFn(Yd),this._attemptCharCode(61)?(this._attemptCharCodeUntilFn(F=>Yd(F)&&!iO(F)),this._consumeLetDeclarationValue(),59===this._cursor.peek()?(this._beginToken(31),this._endToken([]),this._cursor.advance()):(l.type=32,l.sourceSpan=this._cursor.getSpan(p))):l.type=32}_getLetDeclarationName(){const p=this._cursor.clone();let l=!1;return this._attemptCharCodeUntilFn(O=>!(Gb(O)||36===O||95===O||l&&Sp(O))||(l=!0,!1)),this._cursor.getChars(p).trim()}_consumeLetDeclarationValue(){const p=this._cursor.clone();for(this._beginToken(30,p);this._cursor.peek()!==Wu;){const l=this._cursor.peek();if(59===l)break;ry(l)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(O=>92===O?(this._cursor.advance(),!1):O===l)),this._cursor.advance()}this._endToken([this._cursor.getChars(p)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(function wA(v){return v!==Hh}(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Hh){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(p,l=this._cursor.clone()){this._currentTokenStart=l,this._currentTokenType=p}_endToken(p,l){if(null===this._currentTokenStart)throw new HO("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(l));if(null===this._currentTokenType)throw new HO("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const O={type:this._currentTokenType,parts:p,sourceSpan:(l??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(O),this._currentTokenStart=null,this._currentTokenType=null,O}_createError(p,l){this._isInExpansionForm()&&(p+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const O=new HO(p,this._currentTokenType,l);return this._currentTokenStart=null,this._currentTokenType=null,new nC(O)}handleError(p){if(p instanceof WO&&(p=this._createError(p.msg,this._cursor.getSpan(p.cursor))),!(p instanceof nC))throw p;this.errors.push(p.error)}_attemptCharCode(p){return this._cursor.peek()===p&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(p){return!!function vh(v,p){return TA(v)===TA(p)}(this._cursor.peek(),p)&&(this._cursor.advance(),!0)}_requireCharCode(p){const l=this._cursor.clone();if(!this._attemptCharCode(p))throw this._createError(UO(this._cursor.peek()),this._cursor.getSpan(l))}_attemptStr(p){const l=p.length;if(this._cursor.charsLeft()<l)return!1;const O=this._cursor.clone();for(let F=0;F<l;F++)if(!this._attemptCharCode(p.charCodeAt(F)))return this._cursor=O,!1;return!0}_attemptStrCaseInsensitive(p){for(let l=0;l<p.length;l++)if(!this._attemptCharCodeCaseInsensitive(p.charCodeAt(l)))return!1;return!0}_requireStr(p){const l=this._cursor.clone();if(!this._attemptStr(p))throw this._createError(UO(this._cursor.peek()),this._cursor.getSpan(l))}_attemptCharCodeUntilFn(p){for(;!p(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(p,l){const O=this._cursor.clone();if(this._attemptCharCodeUntilFn(p),this._cursor.diff(O)<l)throw this._createError(UO(this._cursor.peek()),this._cursor.getSpan(O))}_attemptUntilChar(p){for(;this._cursor.peek()!==p;)this._cursor.advance()}_readChar(){const p=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),p}_consumeEntity(p){this._beginToken(9);const l=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){const O=this._attemptCharCode(120)||this._attemptCharCode(88),F=this._cursor.clone();if(this._attemptCharCodeUntilFn(zO),59!=this._cursor.peek())throw this._cursor.advance(),this._createError(function wR(v,p){return`Unable to parse entity "${p}" - ${v} character reference entities must end with ";"`}(O?TR.HEX:TR.DEC,this._cursor.getChars(l)),this._cursor.getSpan());const se=this._cursor.getChars(F);this._cursor.advance();try{const we=parseInt(se,O?16:10);this._endToken([String.fromCharCode(we),this._cursor.getChars(l)])}catch{throw this._createError(OA(this._cursor.getChars(l)),this._cursor.getSpan())}}else{const O=this._cursor.clone();if(this._attemptCharCodeUntilFn(dx),59!=this._cursor.peek())this._beginToken(p,l),this._cursor=O,this._endToken(["&"]);else{const F=this._cursor.getChars(O);this._cursor.advance();const se=Em[F];if(!se)throw this._createError(OA(F),this._cursor.getSpan(l));this._endToken([se,`&${F};`])}}}_consumeRawText(p,l){this._beginToken(p?6:7);const O=[];for(;;){const F=this._cursor.clone(),se=l();if(this._cursor=F,se)break;p&&38===this._cursor.peek()?(this._endToken([this._processCarriageReturns(O.join(""))]),O.length=0,this._consumeEntity(6),this._beginToken(6)):O.push(this._readChar())}this._endToken([this._processCarriageReturns(O.join(""))])}_consumeComment(p){this._beginToken(10,p),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(11),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(p){this._beginToken(12,p),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(p){this._beginToken(18,p);const l=this._cursor.clone();this._attemptUntilChar(62);const O=this._cursor.getChars(l);this._cursor.advance(),this._endToken([O])}_consumePrefixAndName(){const p=this._cursor.clone();let l="";for(;58!==this._cursor.peek()&&!(((v=this._cursor.peek())<C_||xp<v)&&(v<_d||vD<v)&&(v<Ub||v>qE));)this._cursor.advance();var v;let O;return 58===this._cursor.peek()?(l=this._cursor.getChars(p),this._cursor.advance(),O=this._cursor.clone()):O=p,this._requireCharCodeUntilFn(DR,""===l?0:1),[l,this._cursor.getChars(O)]}_consumeTagOpen(p){let l,O,F;try{if(!Gb(this._cursor.peek()))throw this._createError(UO(this._cursor.peek()),this._cursor.getSpan(p));for(F=this._consumeTagOpenStart(p),O=F.parts[0],l=F.parts[1],this._attemptCharCodeUntilFn(Yd);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek()&&this._cursor.peek()!==Wu;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(Yd),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(Yd),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Yd);this._consumeTagOpenEnd()}catch(we){if(we instanceof nC)return void(F?F.type=4:(this._beginToken(5,p),this._endToken(["<"])));throw we}const se=this._getTagDefinition(l).getContentType(O);se===Ea.RAW_TEXT?this._consumeRawTextWithTagClose(O,l,!1):se===Ea.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(O,l,!0)}_consumeRawTextWithTagClose(p,l,O){this._consumeRawText(O,()=>!!(this._attemptCharCode(60)&&this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(Yd),this._attemptStrCaseInsensitive(l)))&&(this._attemptCharCodeUntilFn(Yd),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(F=>62===F,3),this._cursor.advance(),this._endToken([p,l])}_consumeTagOpenStart(p){this._beginToken(0,p);const l=this._consumePrefixAndName();return this._endToken(l)}_consumeAttributeName(){const p=this._cursor.peek();if(39===p||34===p)throw this._createError(UO(p),this._cursor.getSpan());this._beginToken(14);const l=this._consumePrefixAndName();this._endToken(l)}_consumeAttributeValue(){if(39===this._cursor.peek()||34===this._cursor.peek()){const p=this._cursor.peek();this._consumeQuote(p);const l=()=>this._cursor.peek()===p;this._consumeWithInterpolation(16,17,l,l),this._consumeQuote(p)}else{const p=()=>DR(this._cursor.peek());this._consumeWithInterpolation(16,17,p,p)}}_consumeQuote(p){this._beginToken(15),this._requireCharCode(p),this._endToken([String.fromCodePoint(p)])}_consumeTagOpenEnd(){const p=this._attemptCharCode(47)?2:1;this._beginToken(p),this._requireCharCode(62),this._endToken([])}_consumeTagClose(p){this._beginToken(3,p),this._attemptCharCodeUntilFn(Yd);const l=this._consumePrefixAndName();this._attemptCharCodeUntilFn(Yd),this._requireCharCode(62),this._endToken(l)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(mm),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);const p=this._readUntil(44),l=this._processCarriageReturns(p);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([l]);else{const F=this._endToken([p]);l!==p&&this.nonNormalizedIcuExpressions.push(F)}this._requireCharCode(44),this._attemptCharCodeUntilFn(Yd),this._beginToken(7);const O=this._readUntil(44);this._endToken([O]),this._requireCharCode(44),this._attemptCharCodeUntilFn(Yd)}_consumeExpansionCaseStart(){this._beginToken(20);const p=this._readUntil(mm).trim();this._endToken([p]),this._attemptCharCodeUntilFn(Yd),this._beginToken(21),this._requireCharCode(mm),this._endToken([]),this._attemptCharCodeUntilFn(Yd),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Hh),this._endToken([]),this._attemptCharCodeUntilFn(Yd),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Hh),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(p,l,O,F){this._beginToken(p);const se=[];for(;!O();){const we=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(se.join(""))],we),se.length=0,this._consumeInterpolation(l,we,F),this._beginToken(p)):38===this._cursor.peek()?(this._endToken([this._processCarriageReturns(se.join(""))]),se.length=0,this._consumeEntity(p),this._beginToken(p)):se.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(se.join(""))])}_consumeInterpolation(p,l,O){const F=[];this._beginToken(p,l),F.push(this._interpolationConfig.start);const se=this._cursor.clone();let we=null,We=!1;for(;this._cursor.peek()!==Wu&&(null===O||!O());){const gt=this._cursor.clone();if(this._isTagStart())return this._cursor=gt,F.push(this._getProcessedChars(se,gt)),void this._endToken(F);if(null===we){if(this._attemptStr(this._interpolationConfig.end))return F.push(this._getProcessedChars(se,gt)),F.push(this._interpolationConfig.end),void this._endToken(F);this._attemptStr("//")&&(We=!0)}const Ft=this._cursor.peek();this._cursor.advance(),92===Ft?this._cursor.advance():Ft===we?we=null:!We&&null===we&&ry(Ft)&&(we=Ft)}F.push(this._getProcessedChars(se,this._cursor)),this._endToken(F)}_getProcessedChars(p,l){return this._processCarriageReturns(l.getChars(p))}_isTextEnd(){return!(!(this._isTagStart()||this._cursor.peek()===Wu||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Hh&&this._isInExpansionCase()))&&(!this._tokenizeBlocks||this._inInterpolation||this._isInExpansion()||64!==this._cursor.peek()&&this._cursor.peek()!==Hh))}_isTagStart(){if(60===this._cursor.peek()){const p=this._cursor.clone();p.advance();const l=p.peek();if(C_<=l&&l<=xp||_d<=l&&l<=vD||47===l||33===l)return!0}return!1}_readUntil(p){const l=this._cursor.clone();return this._attemptUntilChar(p),this._cursor.getChars(l)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&21===this._expansionCaseStack[this._expansionCaseStack.length-1]}_isInExpansionForm(){return this._expansionCaseStack.length>0&&19===this._expansionCaseStack[this._expansionCaseStack.length-1]}isExpansionFormStart(){if(this._cursor.peek()!==mm)return!1;if(this._interpolationConfig){const p=this._cursor.clone(),l=this._attemptStr(this._interpolationConfig.start);return this._cursor=p,!l}return!0}}function Yd(v){return!Cf(v)||v===Wu}function DR(v){return Cf(v)||62===v||60===v||47===v||39===v||34===v||61===v||v===Wu}function zO(v){return 59===v||v===Wu||!function Ll(v){return v>=C_&&v<=102||v>=_d&&v<=70||Sp(v)}(v)}function dx(v){return 59===v||v===Wu||!Gb(v)}function TA(v){return v>=C_&&v<=xp?v-C_+_d:v}function $B(v){return 59!==v&&Yd(v)}class k_{constructor(p,l){if(p instanceof k_){this.file=p.file,this.input=p.input,this.end=p.end;const O=p.state;this.state={peek:O.peek,offset:O.offset,line:O.line,column:O.column}}else{if(!l)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=p,this.input=p.content,this.end=l.endPos,this.state={peek:-1,offset:l.startPos,line:l.startLine,column:l.startCol}}}clone(){return new k_(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(p){return this.state.offset-p.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(p,l){let O=p=p||this;if(l)for(;this.diff(p)>0&&-1!==l.indexOf(p.peek());)O===p&&(p=p.clone()),p.advance();const F=this.locationFromCursor(p),se=this.locationFromCursor(this),we=O!==p?this.locationFromCursor(O):F;return new Ws(F,se,we)}getChars(p){return this.input.substring(p.state.offset,this.state.offset)}charAt(p){return this.input.charCodeAt(p)}advanceState(p){if(p.offset>=this.end)throw this.state=p,new WO('Unexpected character "EOF"',this);const l=this.charAt(p.offset);10===l?(p.line++,p.column=0):iO(l)||p.column++,p.offset++,this.updatePeek(p)}updatePeek(p){p.peek=p.offset>=this.end?Wu:this.charAt(p.offset)}locationFromCursor(p){return new zv(p.file,p.state.offset,p.state.line,p.state.column)}}class GO extends k_{constructor(p,l){p instanceof GO?(super(p),this.internalState={...p.internalState}):(super(p,l),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new GO(this)}getChars(p){const l=p.clone();let O="";for(;l.internalState.offset<this.internalState.offset;)O+=String.fromCodePoint(l.peek()),l.advance();return O}processEscapeSequence(){const p=()=>this.internalState.peek;if(92===p())if(this.internalState={...this.state},this.advanceState(this.internalState),110===p())this.state.peek=10;else if(114===p())this.state.peek=13;else if(118===p())this.state.peek=11;else if(116===p())this.state.peek=dD;else if(98===p())this.state.peek=8;else if(102===p())this.state.peek=12;else if(117===p())if(this.advanceState(this.internalState),p()===mm){this.advanceState(this.internalState);const l=this.clone();let O=0;for(;p()!==Hh;)this.advanceState(this.internalState),O++;this.state.peek=this.decodeHexDigits(l,O)}else{const l=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(l,4)}else if(120===p()){this.advanceState(this.internalState);const l=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(l,2)}else if(BM(p())){let l="",O=0,F=this.clone();for(;BM(p())&&O<3;)F=this.clone(),l+=String.fromCodePoint(p()),this.advanceState(this.internalState),O++;this.state.peek=parseInt(l,8),this.internalState=F.internalState}else iO(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(p,l){const O=this.input.slice(p.internalState.offset,p.internalState.offset+l),F=parseInt(O,16);if(isNaN(F))throw p.state=p.internalState,new WO("Invalid hexadecimal escape sequence",p);return F}}class WO{constructor(p,l){this.msg=p,this.cursor=l}}class Zd extends ea{static create(p,l,O){return new Zd(p,l,O)}constructor(p,l,O){super(l,O),this.elementName=p}}class L_{constructor(p,l){this.rootNodes=p,this.errors=l}}class IR{constructor(p){this.getTagDefinition=p}parse(p,l,O){const F=function f2(v,p,l,O={}){const F=new WB(new Ep(v,p),l,O);return F.tokenize(),new cx(function rS(v){const p=[];let l;for(let O=0;O<v.length;O++){const F=v[O];l&&5===l.type&&5===F.type||l&&16===l.type&&16===F.type?(l.parts[0]+=F.parts[0],l.sourceSpan.end=F.sourceSpan.end):(l=F,p.push(l))}return p}(F.tokens),F.errors,F.nonNormalizedIcuExpressions)}(p,l,this.getTagDefinition,O),se=new DA(F.tokens,this.getTagDefinition);return se.build(),new L_(se.rootNodes,F.errors.concat(se.errors))}}class DA{constructor(p,l){this.tokens=p,this.getTagDefinition=l,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;33!==this._peek.type;)0===this._peek.type||4===this._peek.type?this._consumeStartTag(this._advance()):3===this._peek.type?this._consumeEndTag(this._advance()):12===this._peek.type?(this._closeVoidElement(),this._consumeCdata(this._advance())):10===this._peek.type?(this._closeVoidElement(),this._consumeComment(this._advance())):5===this._peek.type||7===this._peek.type||6===this._peek.type?(this._closeVoidElement(),this._consumeText(this._advance())):19===this._peek.type?this._consumeExpansion(this._advance()):24===this._peek.type?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):26===this._peek.type?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):28===this._peek.type?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):29===this._peek.type?(this._closeVoidElement(),this._consumeLet(this._advance())):32===this._peek.type?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(const p of this._containerStack)p instanceof P_&&this.errors.push(Zd.create(p.name,p.sourceSpan,`Unclosed block "${p.name}"`))}_advance(){const p=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],p}_advanceIf(p){return this._peek.type===p?this._advance():null}_consumeCdata(p){this._consumeText(this._advance()),this._advanceIf(13)}_consumeComment(p){const l=this._advanceIf(7),O=this._advanceIf(11),F=null!=l?l.parts[0].trim():null,se=null==O?p.sourceSpan:new Ws(p.sourceSpan.start,O.sourceSpan.end,p.sourceSpan.fullStart);this._addToParent(new kO(F,se))}_consumeExpansion(p){const l=this._advance(),O=this._advance(),F=[];for(;20===this._peek.type;){const we=this._parseExpansionCase();if(!we)return;F.push(we)}if(23!==this._peek.type)return void this.errors.push(Zd.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const se=new Ws(p.sourceSpan.start,this._peek.sourceSpan.end,p.sourceSpan.fullStart);this._addToParent(new RO(l.parts[0],O.parts[0],F,se,l.sourceSpan)),this._advance()}_parseExpansionCase(){const p=this._advance();if(21!==this._peek.type)return this.errors.push(Zd.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const l=this._advance(),O=this._collectExpansionExpTokens(l);if(!O)return null;const F=this._advance();O.push({type:33,parts:[],sourceSpan:F.sourceSpan});const se=new DA(O,this.getTagDefinition);if(se.build(),se.errors.length>0)return this.errors=this.errors.concat(se.errors),null;const we=new Ws(p.sourceSpan.start,F.sourceSpan.end,p.sourceSpan.fullStart),We=new Ws(l.sourceSpan.start,F.sourceSpan.end,l.sourceSpan.fullStart);return new nS(p.parts[0],se.rootNodes,we,p.sourceSpan,We)}_collectExpansionExpTokens(p){const l=[],O=[21];for(;;){if((19===this._peek.type||21===this._peek.type)&&O.push(this._peek.type),22===this._peek.type){if(!PR(O,21))return this.errors.push(Zd.create(null,p.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(O.pop(),0===O.length)return l}if(23===this._peek.type){if(!PR(O,19))return this.errors.push(Zd.create(null,p.sourceSpan,"Invalid ICU message. Missing '}'.")),null;O.pop()}if(33===this._peek.type)return this.errors.push(Zd.create(null,p.sourceSpan,"Invalid ICU message. Missing '}'.")),null;l.push(this._advance())}}_consumeText(p){const l=[p],O=p.sourceSpan;let F=p.parts[0];if(F.length>0&&"\n"===F[0]){const se=this._getContainer();null!=se&&0===se.children.length&&this.getTagDefinition(se.name).ignoreFirstLf&&(F=F.substring(1),l[0]={type:p.type,sourceSpan:p.sourceSpan,parts:[F]})}for(;8===this._peek.type||5===this._peek.type||9===this._peek.type;)p=this._advance(),l.push(p),F+=8===p.type?p.parts.join("").replace(/&([^;]+);/g,AA):9===p.type?p.parts[0]:p.parts.join("");F.length>0&&this._addToParent(new tS(F,new Ws(O.start,p.sourceSpan.end,O.fullStart,O.details),l))}_closeVoidElement(){const p=this._getContainer();p instanceof _h&&this.getTagDefinition(p.name).isVoid&&this._containerStack.pop()}_consumeStartTag(p){const[l,O]=p.parts,F=[];for(;14===this._peek.type;)F.push(this._consumeAttr(this._advance()));const se=this._getElementFullName(l,O,this._getClosestParentElement());let we=!1;if(2===this._peek.type){this._advance(),we=!0;const _o=this.getTagDefinition(se);_o.canSelfClose||null!==XT(se)||_o.isVoid||this.errors.push(Zd.create(se,p.sourceSpan,`Only void, custom and foreign elements can be self closed "${p.parts[1]}"`))}else 1===this._peek.type&&(this._advance(),we=!1);const We=this._peek.sourceSpan.fullStart,gt=new Ws(p.sourceSpan.start,We,p.sourceSpan.fullStart),Ft=new Ws(p.sourceSpan.start,We,p.sourceSpan.fullStart),pn=new _h(se,F,[],gt,Ft,void 0),fi=this._getContainer();this._pushContainer(pn,fi instanceof _h&&this.getTagDefinition(fi.name).isClosedByChild(pn.name)),we?this._popContainer(se,_h,gt):4===p.type&&(this._popContainer(se,_h,null),this.errors.push(Zd.create(se,gt,`Opening tag "${se}" not terminated.`)))}_pushContainer(p,l){l&&this._containerStack.pop(),this._addToParent(p),this._containerStack.push(p)}_consumeEndTag(p){const l=this._getElementFullName(p.parts[0],p.parts[1],this._getClosestParentElement());this.getTagDefinition(l).isVoid?this.errors.push(Zd.create(l,p.sourceSpan,`Void elements do not have end tags "${p.parts[1]}"`)):this._popContainer(l,_h,p.sourceSpan)||this.errors.push(Zd.create(l,p.sourceSpan,`Unexpected closing tag "${l}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`))}_popContainer(p,l,O){let F=!1;for(let se=this._containerStack.length-1;se>=0;se--){const we=this._containerStack[se];if((we.name===p||null===p)&&we instanceof l)return we.endSourceSpan=O,we.sourceSpan.end=null!==O?O.end:we.sourceSpan.end,this._containerStack.splice(se,this._containerStack.length-se),!F;(we instanceof P_||we instanceof _h&&!this.getTagDefinition(we.name).closedByParent)&&(F=!0)}return!1}_consumeAttr(p){const l=YT(p.parts[0],p.parts[1]);let O=p.sourceSpan.end;15===this._peek.type&&this._advance();let F="";const se=[];let we,We;if(16===this._peek.type)for(we=this._peek.sourceSpan,We=this._peek.sourceSpan.end;16===this._peek.type||17===this._peek.type||9===this._peek.type;){const pn=this._advance();se.push(pn),F+=17===pn.type?pn.parts.join("").replace(/&([^;]+);/g,AA):9===pn.type?pn.parts[0]:pn.parts.join(""),We=O=pn.sourceSpan.end}15===this._peek.type&&(O=this._advance().sourceSpan.end);const Ft=we&&We&&new Ws(we.start,We,we.fullStart);return new by(l,F,new Ws(p.sourceSpan.start,O,p.sourceSpan.fullStart),p.sourceSpan,Ft,se.length>0?se:void 0,void 0)}_consumeBlockOpen(p){const l=[];for(;27===this._peek.type;){const We=this._advance();l.push(new fA(We.parts[0],We.sourceSpan))}25===this._peek.type&&this._advance();const O=this._peek.sourceSpan.fullStart,F=new Ws(p.sourceSpan.start,O,p.sourceSpan.fullStart),se=new Ws(p.sourceSpan.start,O,p.sourceSpan.fullStart),we=new P_(p.parts[0],l,[],F,p.sourceSpan,se);this._pushContainer(we,!1)}_consumeBlockClose(p){this._popContainer(null,P_,p.sourceSpan)||this.errors.push(Zd.create(null,p.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "&#125;" HTML entity instead.'))}_consumeIncompleteBlock(p){const l=[];for(;27===this._peek.type;){const We=this._advance();l.push(new fA(We.parts[0],We.sourceSpan))}const O=this._peek.sourceSpan.fullStart,F=new Ws(p.sourceSpan.start,O,p.sourceSpan.fullStart),se=new Ws(p.sourceSpan.start,O,p.sourceSpan.fullStart),we=new P_(p.parts[0],l,[],F,p.sourceSpan,se);this._pushContainer(we,!1),this._popContainer(null,P_,null),this.errors.push(Zd.create(p.parts[0],F,`Incomplete block "${p.parts[0]}". If you meant to write the @ character, you should use the "&#64;" HTML entity instead.`))}_consumeLet(p){const l=p.parts[0];let O,F;if(30!==this._peek.type)return void this.errors.push(Zd.create(p.parts[0],p.sourceSpan,`Invalid @let declaration "${l}". Declaration must have a value.`));if(O=this._advance(),31!==this._peek.type)return void this.errors.push(Zd.create(p.parts[0],p.sourceSpan,`Unterminated @let declaration "${l}". Declaration must be terminated with a semicolon.`));F=this._advance();const we=new Ws(p.sourceSpan.start,F.sourceSpan.fullStart,p.sourceSpan.fullStart),We=p.sourceSpan.toString().lastIndexOf(l),gt=p.sourceSpan.start.moveBy(We),Ft=new Ws(gt,p.sourceSpan.end),pn=new LO(l,O.parts[0],we,Ft,O.sourceSpan);this._addToParent(pn)}_consumeIncompleteLet(p){const l=p.parts[0]??"",O=l?` "${l}"`:"";if(l.length>0){const F=p.sourceSpan.toString().lastIndexOf(l),se=p.sourceSpan.start.moveBy(F),we=new Ws(se,p.sourceSpan.end),We=new Ws(p.sourceSpan.start,p.sourceSpan.start.moveBy(0)),gt=new LO(l,"",p.sourceSpan,we,We);this._addToParent(gt)}this.errors.push(Zd.create(p.parts[0],p.sourceSpan,`Incomplete @let declaration${O}. @let declarations must be written as \`@let <name> = <value>;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let p=this._containerStack.length-1;p>-1;p--)if(this._containerStack[p]instanceof _h)return this._containerStack[p];return null}_addToParent(p){const l=this._getContainer();null===l?this.rootNodes.push(p):l.children.push(p)}_getElementFullName(p,l,O){if(""===p&&""===(p=this.getTagDefinition(l).implicitNamespacePrefix||"")&&null!=O){const F=gf(O.name)[1];this.getTagDefinition(F).preventNamespaceInheritance||(p=XT(O.name))}return YT(p,l)}}function PR(v,p){return v.length>0&&v[v.length-1]===p}function AA(v,p){return void 0!==Em[p]?Em[p]||v:/^#x[a-f0-9]+$/i.test(p)?String.fromCodePoint(parseInt(p.slice(2),16)):/^#\d+$/.test(p)?String.fromCodePoint(parseInt(p.slice(1),10)):v}const IA=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","object|codebase","object|data"]);function MR(v,p){return v=v.toLowerCase(),p=p.toLowerCase(),IA.has(v+"|"+p)||IA.has("*|"+p)}const m2=(v,p)=>(v instanceof eS&&(p instanceof Lv&&v.i18n instanceof mu&&(p.previousMessage=v.i18n),v.i18n=p),p);class PA{constructor(p=$d,l=!1,O=!1,F=hm){this.interpolationConfig=p,this.keepI18nAttrs=l,this.enableI18nLegacyMessageIdFormat=O,this.containerBlocks=F,this.hasI18nMeta=!1,this._errors=[]}_generateI18nMessage(p,l="",O){const{meaning:F,description:se,customId:we}=this._parseMetadata(l),gt=function tC(v,p){const l=new oS(bA,v,p);return(O,F,se,we,We)=>l.toI18nMessage(O,F,se,we,We)}(this.interpolationConfig,this.containerBlocks)(p,F,se,we,O);return this._setMessageId(gt,l),this._setLegacyIds(gt,l),gt}visitAllWithErrors(p){const l=p.map(O=>O.visit(this,null));return new L_(l,this._errors)}visitElement(p){let l;if(function rD(v){return v.attrs.some(p=>oD(p.name))}(p)){this.hasI18nMeta=!0;const O=[],F={};for(const se of p.attrs)if(se.name===Nb)l=this._generateI18nMessage(p.children,p.i18n||se.value,m2),0===l.nodes.length&&(l=void 0),p.i18n=l;else if(se.name.startsWith(nB)){const we=se.name.slice(nB.length);MR(p.name,we)?this._reportError(se,`Translating attribute '${we}' is disallowed for security reasons.`):F[we]=se.value}else O.push(se);if(Object.keys(F).length)for(const se of O){const we=F[se.name];void 0!==we&&se.value&&(se.i18n=this._generateI18nMessage([se],se.i18n||we))}this.keepI18nAttrs||(p.attrs=O)}return Ps(this,p.children,l),p}visitExpansion(p,l){let O;const F=p.i18n;if(this.hasI18nMeta=!0,F instanceof Lv){const se=F.name;O=this._generateI18nMessage([p],F),x0(O).name=se,null!==l&&(l.placeholderToMessage[se]=O)}else O=this._generateI18nMessage([p],l||F);return p.i18n=O,p}visitText(p){return p}visitAttribute(p){return p}visitComment(p){return p}visitExpansionCase(p){return p}visitBlock(p,l){return Ps(this,p.children,l),p}visitBlockParameter(p,l){return p}visitLetDeclaration(p,l){return p}_parseMetadata(p){return"string"==typeof p?function v2(v=""){let p,l,O;if(v=v.trim()){const F=v.indexOf(_2),se=v.indexOf(jB);let we;[we,p]=F>-1?[v.slice(0,F),v.slice(F+2)]:[v,""],[l,O]=se>-1?[we.slice(0,se),we.slice(se+1)]:["",we]}return{customId:p,meaning:l,description:O}}(p):p instanceof mu?p:{}}_setMessageId(p,l){p.id||(p.id=l instanceof mu&&l.id||function aM(v){return v.id||HL(v)}(p))}_setLegacyIds(p,l){if(this.enableI18nLegacyMessageIdFormat)p.legacyIds=[(v=p,function lM(v){r0??=new TextEncoder;const p=[...r0.encode(v)],l=function bE(v,p){const l=v.length+3>>>2,O=[];for(let F=0;F<l;F++)O[F]=UC(v,4*F,p);return O}(p,wT.Big),O=8*p.length,F=new Uint32Array(80);let se=1732584193,we=4023233417,We=2562383102,gt=271733878,Ft=3285377520;l[O>>5]|=128<<24-O%32,l[15+(O+64>>9<<4)]=O;for(let pn=0;pn<l.length;pn+=16){const fi=se,_o=we,Po=We,Ro=gt,Rr=Ft;for(let br=0;br<80;br++){F[br]=br<16?l[pn+br]:TT(F[br-3]^F[br-8]^F[br-14]^F[br-16],1);const cr=ET(br,we,We,gt),ds=cr[0],Ss=cr[1],Zs=[TT(se,5),ds,Ft,Ss,F[br]].reduce(ab);Ft=gt,gt=We,We=TT(we,30),we=se,se=Zs}se=ab(se,fi),we=ab(we,_o),We=ab(We,Po),gt=ab(gt,Ro),Ft=ab(Ft,Rr)}return o_(se)+o_(we)+o_(We)+o_(gt)+o_(Ft)}(function nf(v){return v.map(p=>p.visit(UL,null))}(v.nodes).join("")+`[${v.meaning}]`)),HL(p)];else if("string"!=typeof l){const O=l instanceof mu?l:l instanceof Lv?l.previousMessage:void 0;p.legacyIds=O?O.legacyIds:[]}var v}_reportError(p,l){this._errors.push(new Sm(p.sourceSpan,l))}}const jB="|",_2="@@",XB="goog.getMsg";function MA(v,p,l,O){const F=function YB(v){return v.nodes.map(p=>p.visit($O,null)).join("")}(p),se=[no(F)];Object.keys(O).length&&(se.push(qv(sD(O,!0),!0)),se.push(qv({original_code:nc(Object.keys(O).map(gt=>({key:Fb(gt),quoted:!0,value:no(p.placeholders[gt]?p.placeholders[gt].sourceSpan.toString():p.placeholderToMessage[gt].nodes.map(Ft=>Ft.sourceSpan.toString()).join(""))})))})));const we=l.set(Xs(XB).callFn(se)).toConstDecl();return we.addLeadingComment(function KB(v){const p=[];return p.push(v.description?{tagName:"desc",text:v.description}:{tagName:"suppress",text:"{msgDescriptions}"}),v.meaning&&p.push({tagName:"meaning",text:v.meaning}),function EE(v=[]){return new a0(v)}(p)}(p)),[we,new hu(v.set(l))]}const $O=new class ux{formatPh(p){return`{$${Fb(p)}}`}visitText(p){return p.value}visitContainer(p){return p.children.map(l=>l.visit(this)).join("")}visitIcu(p){return yg(p)}visitTagPlaceholder(p){return p.isVoid?this.formatPh(p.startName):`${this.formatPh(p.startName)}${p.children.map(l=>l.visit(this)).join("")}${this.formatPh(p.closeName)}`}visitPlaceholder(p){return this.formatPh(p.name)}visitBlockPlaceholder(p){return`${this.formatPh(p.startName)}${p.children.map(l=>l.visit(this)).join("")}${this.formatPh(p.closeName)}`}visitIcuPlaceholder(p,l){return this.formatPh(p.name)}};function RA(v,p,l){const{messageParts:O,placeHolders:F}=function RR(v){const p=[],l=new iC(v.placeholderToMessage,p);return v.nodes.forEach(O=>O.visit(l)),function LR(v){const p=[],l=[];v[0]instanceof ub&&p.push(kA(v[0].sourceSpan.start));for(let O=0;O<v.length;O++){const F=v[O];F instanceof db?p.push(F):(l.push(F),v[O-1]instanceof ub&&p.push(kA(v[O-1].sourceSpan.end)))}return v[v.length-1]instanceof ub&&p.push(kA(v[v.length-1].sourceSpan.end)),{messageParts:p,placeHolders:l}}(p)}(p),se=function kR(v){const p=v.nodes[0];return new Ws(p.sourceSpan.fullStart,v.nodes[v.nodes.length-1].sourceSpan.end,p.sourceSpan.fullStart,p.sourceSpan.details)}(p),we=F.map(Ft=>l[Ft.text]),We=function l0(v,p,l,O,F){return new GC(v,p,l,O,F)}(p,O,F,we,se),gt=v.set(We);return[new hu(gt)]}class iC{constructor(p,l){this.placeholderToMessage=p,this.pieces=l}visitText(p){if(this.pieces[this.pieces.length-1]instanceof db)this.pieces[this.pieces.length-1].text+=p.value;else{const l=new Ws(p.sourceSpan.fullStart,p.sourceSpan.end,p.sourceSpan.fullStart,p.sourceSpan.details);this.pieces.push(new db(p.value,l))}}visitContainer(p){p.children.forEach(l=>l.visit(this))}visitIcu(p){this.pieces.push(new db(yg(p),p.sourceSpan))}visitTagPlaceholder(p){this.pieces.push(this.createPlaceholderPiece(p.startName,p.startSourceSpan??p.sourceSpan)),p.isVoid||(p.children.forEach(l=>l.visit(this)),this.pieces.push(this.createPlaceholderPiece(p.closeName,p.endSourceSpan??p.sourceSpan)))}visitPlaceholder(p){this.pieces.push(this.createPlaceholderPiece(p.name,p.sourceSpan))}visitBlockPlaceholder(p){this.pieces.push(this.createPlaceholderPiece(p.startName,p.startSourceSpan??p.sourceSpan)),p.children.forEach(l=>l.visit(this)),this.pieces.push(this.createPlaceholderPiece(p.closeName,p.endSourceSpan??p.sourceSpan))}visitIcuPlaceholder(p){this.pieces.push(this.createPlaceholderPiece(p.name,p.sourceSpan,this.placeholderToMessage[p.name]))}createPlaceholderPiece(p,l,O){return new ub(Fb(p,!1),l,O)}}function kA(v){return new db("",new Ws(v,v))}const BR="ngI18nClosureMode",C2="MSG_";function sS(v){return`${C2}${v}`.toUpperCase()}function y2(v){return new Rl(v.name,void 0,sg,void 0,v.sourceSpan)}function FR(v,p,l,O){const F=[],se=new Map;for(const Ft of O.subMessages){const pn=l.get(Ft),{mainVar:fi,statements:_o}=FR(v,p,l,pn);F.push(..._o);const Po=se.get(pn.messagePlaceholder)??[];Po.push(fi),se.set(pn.messagePlaceholder,Po)}(function b2(v,p){for(const[l,O]of p)1===O.length?v.params.set(l,O[0]):(v.params.set(l,no(`\ufffdI18N_EXP_${l}\ufffd`)),v.postprocessingParams.set(l,Ns(O)))})(O,se),O.params=new Map([...O.params.entries()].sort());const we=Xs(v.pool.uniqueName("i18n_")),We=function LA(v,p,l,O){let F;const se=l;if(O){const we=sS("EXTERNAL_"),We=v.uniqueName(se);F=`${we}${pg(p)}$$${We}`}else{const we=sS(se);F=v.uniqueName(we)}return Xs(F)}(v.pool,O.message.id,p,v.i18nUseExternalIds);let gt;if(O.needsPostprocessing||O.postprocessingParams.size>0){const pn=sD(Object.fromEntries([...O.postprocessingParams.entries()].sort()),!1),fi=[];O.postprocessingParams.size>0&&fi.push(qv(pn,!0)),gt=_o=>kr(Bi.i18nPostprocess).callFn([_o,...fi])}return F.push(...function qB(v,p,l,O,F){const se=Object.fromEntries(O),we=[y2(p),_b(tc(Xs(BR)).notIdentical(no("undefined",cb)).and(Xs(BR)),MA(p,v,l,se),RA(p,v,sD(se,!1)))];return F&&we.push(new hu(p.set(F(p)))),we}(O.message,we,We,O.params,gt)),{mainVar:we,statements:F}}function iN(v){const p=[];for(const l of v)p.push(no(l.name),no(l.target));return Ns(p)}function Df(v){const p=[];let l=0,O=0,F=0,se=0,we=0,We=null;for(;l<v.length;)switch(v.charCodeAt(l++)){case 40:O++;break;case 41:O--;break;case 39:0===F?F=39:39===F&&92!==v.charCodeAt(l-1)&&(F=0);break;case 34:0===F?F=34:34===F&&92!==v.charCodeAt(l-1)&&(F=0);break;case 58:!We&&0===O&&0===F&&(We=VR(v.substring(we,l-1).trim()),se=l);break;case 59:if(We&&se>0&&0===O&&0===F){const Ft=v.substring(se,l-1).trim();p.push(We,Ft),we=l,se=0,We=null}}if(We&&se){const gt=v.slice(se).trim();p.push(We,gt)}return p}function VR(v){return v.replace(/[a-z][A-Z]/g,p=>p.charAt(0)+"-"+p.charAt(1)).toLowerCase()}function hx(v,p,l,O){null===v.fnName&&(v.fnName=v.job.pool.uniqueName(pg(`${p}_${v.job.fnSuffix}`),!1));const F=new Map;for(const se of v.ops())switch(se.kind){case Qn.Property:case Qn.HostProperty:se.isAnimationTrigger&&(se.name="@"+se.name);break;case Qn.Listener:if(null!==se.handlerFnName)break;if(!se.hostListener&&null===se.targetSlot.slot)throw new Error("Expected a slot to be assigned");let we="";se.isAnimationListener&&(se.name=`@${se.name}.${se.animationPhase}`,we="animation"),se.handlerFnName=se.hostListener?`${p}_${we}${se.name}_HostBindingHandler`:`${v.fnName}_${se.tag.replace("-","_")}_${we}${se.name}_${se.targetSlot.slot}_listener`,se.handlerFnName=pg(se.handlerFnName);break;case Qn.TwoWayListener:if(null!==se.handlerFnName)break;if(null===se.targetSlot.slot)throw new Error("Expected a slot to be assigned");se.handlerFnName=pg(`${v.fnName}_${se.tag.replace("-","_")}_${se.name}_${se.targetSlot.slot}_listener`);break;case Qn.Variable:F.set(se.xref,rN(v,se.variable,l));break;case Qn.RepeaterCreate:if(!(v instanceof uy))throw new Error("AssertionError: must be compiling a component");if(null===se.handle.slot)throw new Error("Expected slot to be assigned");null!==se.emptyView&&hx(v.job.views.get(se.emptyView),`${p}_${se.functionNameSuffix}Empty_${se.handle.slot+2}`,l,O),hx(v.job.views.get(se.xref),`${p}_${se.functionNameSuffix}_${se.handle.slot+1}`,l,O);break;case Qn.Projection:if(!(v instanceof uy))throw new Error("AssertionError: must be compiling a component");if(null===se.handle.slot)throw new Error("Expected slot to be assigned");null!==se.fallbackView&&hx(v.job.views.get(se.fallbackView),`${p}_ProjectionFallback_${se.handle.slot}`,l,O);break;case Qn.Template:if(!(v instanceof uy))throw new Error("AssertionError: must be compiling a component");const We=v.job.views.get(se.xref);if(null===se.handle.slot)throw new Error("Expected slot to be assigned");hx(We,`${p}${0===se.functionNameSuffix.length?"":`_${se.functionNameSuffix}`}_${se.handle.slot}`,l,O);break;case Qn.StyleProp:se.name=sN(se.name),O&&(se.name=NA(se.name));break;case Qn.ClassProp:O&&(se.name=NA(se.name))}for(const se of v.ops())vd(se,we=>{if(we instanceof Kd&&null===we.name){if(!F.has(we.xref))throw new Error(`Variable ${we.xref} not yet named`);we.name=F.get(we.xref)}})}function rN(v,p,l){if(null===p.name)switch(p.kind){case yu.Context:p.name="ctx_r"+l.index++;break;case yu.Identifier:p.name=v.job.compatibility===gg.TemplateDefinitionBuilder?`${p.identifier}_${"ctx"===p.identifier?"i":""}r${++l.index}`:`${p.identifier}_i${l.index++}`;break;default:p.name="_r"+ ++l.index}return p.name}function sN(v){return v.startsWith("--")?v:VR(v)}function NA(v){const p=v.indexOf("!important");return p>-1?v.substring(0,p):v}function HR(v){for(const p of v){if(!(p.kind===Qn.Statement&&p.statement instanceof hu&&p.statement.expr instanceof E_))continue;const l=p.statement.expr.steps;let O=!0;for(let F=p.next;F.kind!==Qn.ListEnd&&O;F=F.next)vd(F,(se,we)=>{if(!Ef(se))return se;if(O&&!(we&Ka.InChildOperation))switch(se.kind){case Cs.NextContext:se.steps+=l,_r.remove(p),O=!1;break;case Cs.GetCurrentView:case Cs.Reference:case Cs.ContextLetReference:O=!1}})}}function px(v,p){const l=v.get(p);if(void 0===l)throw new Error("All attributes should have an element-like target.");return l}function jh(v){return p=>p.kind===v}function B_(v,p){return l=>l.kind===v&&p===l.expression instanceof Md}const VA=[{test:v=>v.kind===Qn.Listener&&v.hostListener&&v.isAnimationListener},{test:function UR(v){return v.kind===Qn.Listener&&!(v.hostListener&&v.isAnimationListener)||v.kind===Qn.TwoWayListener}}],HA=[{test:jh(Qn.StyleMap),transform:N_},{test:jh(Qn.ClassMap),transform:N_},{test:jh(Qn.StyleProp)},{test:jh(Qn.ClassProp)},{test:B_(Qn.Attribute,!0)},{test:B_(Qn.Property,!0)},{test:function aS(v){return!(v.kind!==Qn.Property&&v.kind!==Qn.TwoWayProperty||v.expression instanceof Md)}},{test:B_(Qn.Attribute,!1)}],lS=[{test:B_(Qn.HostProperty,!0)},{test:B_(Qn.HostProperty,!1)},{test:jh(Qn.Attribute)},{test:jh(Qn.StyleMap),transform:N_},{test:jh(Qn.ClassMap),transform:N_},{test:jh(Qn.StyleProp)},{test:jh(Qn.ClassProp)}],Sy=new Set([Qn.Listener,Qn.TwoWayListener,Qn.StyleMap,Qn.ClassMap,Qn.StyleProp,Qn.ClassProp,Qn.Property,Qn.TwoWayProperty,Qn.HostProperty,Qn.Attribute]);function jO(v,p){let l=[],O=null;for(const F of v){const se=pO(F)?F.target:null;(!Sy.has(F.kind)||se!==O&&null!==O&&null!==se)&&(_r.insertBefore(fx(l,p),F),l=[],O=null),Sy.has(F.kind)&&(l.push(F),_r.remove(F),O=se??O)}v.push(fx(l,p))}function fx(v,p){const l=Array.from(p,()=>new Array);for(const O of v)l[p.findIndex(se=>se.test(O))].push(O);return l.flatMap((O,F)=>{const se=p[F].transform;return se?se(O):O})}function N_(v){return v.slice(v.length-1)}function O2(v){return"select"===v.toLowerCase()}function GR(v,p){const l=v.get(p);if(void 0===l)throw new Error("All attributes should have an slottable target.");return l}function WR(v){for(const p of v.update)vd(p,(l,O)=>{if(Ef(l)&&l.kind===Cs.PipeBinding){if(O&Ka.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(v.job.compatibility){if(null==p.target)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");$R(v,p.target,l)}else v.create.push($0(l.target,l.targetSlot,l.name))}})}function $R(v,p,l){for(let O=v.create.head.next;O.kind!==Qn.ListEnd;O=O.next){if(!ay(O)||O.xref!==p)continue;for(;O.next.kind===Qn.Pipe;)O=O.next;const F=$0(l.target,l.targetSlot,l.name);return void _r.insertBefore(F,O.next)}throw new Error(`AssertionError: unable to find insertion point for pipe ${l.name}`)}function dS(v,p){let l=null;for(const O of v.create)switch(O.kind){case Qn.I18nStart:O.subTemplateIndex=0===p?null:p,l=O;break;case Qn.I18nEnd:null===l.subTemplateIndex&&(p=0),l=null;break;case Qn.Template:p=Yu(v.job.views.get(O.xref),l,O.i18nPlaceholder,p);break;case Qn.RepeaterCreate:p=Yu(v.job.views.get(O.xref),l,O.i18nPlaceholder,p),null!==O.emptyView&&(p=Yu(v.job.views.get(O.emptyView),l,O.emptyI18nPlaceholder,p))}return p}function Yu(v,p,l,O){if(void 0!==l){if(null===p)throw Error("Expected template with i18n placeholder to be in an i18n block.");O++,function jR(v,p){if(v.create.head.next?.kind!==Qn.I18nStart){const l=v.job.allocateXrefId();_r.insertAfter(dy(l,p.message,p.root,null),v.create.head),_r.insertBefore(CO(l,null),v.create.tail)}}(v,p)}return dS(v,O)}class XR extends WC{constructor(p){super(),this.numArgs=p}keyOf(p){return p instanceof Cm?`param(${p.index})`:super.keyOf(p)}toSharedConstantDeclaration(p,l){const O=[];for(let se=0;se<this.numArgs;se++)O.push(new vc("a"+se));const F=Kr(l,se=>se instanceof Cm?Xs("a"+se.index):se,Ka.None);return new Rl(p,new c_(O,F),void 0,Xc.Final)}}function F_(v){const p=[],l=[];for(const O of v.entries)if(O.isConstant())p.push(O);else{const F=l.length;l.push(O),p.push(new Cm(F))}return new O_(Ns(p),l)}function oC(v){let p=[];const l=[];for(const O of v.entries)if(O.value.isConstant())p.push(O);else{const F=l.length;l.push(O.value),p.push(new em(O.key,new Cm(F),O.quoted))}return new O_(nc(p),l)}function KO(v,p,l,O,F){return uS(Bi.element,v,p,l,O,F)}function zA(v,p,l,O,F){return uS(Bi.elementStart,v,p,l,O,F)}function uS(v,p,l,O,F,se){const we=[no(p)];return null!==l&&we.push(no(l)),null!==F?we.push(no(O),no(F)):null!==O&&we.push(no(O)),ta(v,we,se)}function GA(v){return ta(Bi.elementEnd,[],v)}function YR(v,p,l,O){return uS(Bi.elementContainerStart,v,null,p,l,O)}function uN(v,p,l,O){return uS(Bi.elementContainer,v,null,p,l,O)}function pN(v,p,l,O,F,se,we,We){const gt=[no(v),p,no(l),no(O),no(F),no(se)];for(null!==we&&(gt.push(no(we)),gt.push(kr(Bi.templateRefExtractor)));gt[gt.length-1].isEquivalent(lf);)gt.pop();return ta(Bi.templateCreate,gt,We)}function $A(v,p,l,O,F){const se=[no(v),p];return null!==l&&(se.push(no(!1)),se.push(kr(l))),ta(O?Bi.syntheticHostListener:Bi.listener,se,F)}function jA(v,p){return kr(Bi.twoWayBindingSet).callFn([v,p])}function ZR(v,p,l){return ta(Bi.twoWayListener,[no(v),p],l)}function gN(v,p){return ta(Bi.pipe,[no(v),no(p)],null)}function mN(v,p){return ta(Bi.advance,v>1?[no(v)]:[],p)}function YA(v,p,l){const O=[no(v,null)];return""!==p&&O.push(no(p)),ta(Bi.text,O,l)}function qR(v,p,l,O,F,se,we,We,gt,Ft){const pn=[no(v),no(p),l??no(null),no(O),no(F),no(se),we??no(null),We??no(null),gt?kr(Bi.deferEnableTimerScheduling):no(null)];let fi;for(;null!==(fi=pn[pn.length-1])&&fi instanceof fd&&null===fi.value;)pn.pop();return ta(Bi.defer,pn,Ft)}const e1=new Map([[xl.Idle,[Bi.deferOnIdle,Bi.deferPrefetchOnIdle]],[xl.Immediate,[Bi.deferOnImmediate,Bi.deferPrefetchOnImmediate]],[xl.Timer,[Bi.deferOnTimer,Bi.deferPrefetchOnTimer]],[xl.Hover,[Bi.deferOnHover,Bi.deferPrefetchOnHover]],[xl.Interaction,[Bi.deferOnInteraction,Bi.deferPrefetchOnInteraction]],[xl.Viewport,[Bi.deferOnViewport,Bi.deferPrefetchOnViewport]]]);function t1(v,p,l,O){const F=e1.get(v);if(void 0===F)throw new Error(`Unable to determine instruction for trigger ${v}`);return ta(l?F[1]:F[0],p.map(we=>no(we)),O)}function n1(v){return ta(Bi.projectionDef,v?[v]:[],null)}function o1(v,p,l,O,F,se,we){const We=[no(v)];return(0!==p||null!==l||null!==O)&&(We.push(no(p)),null!==l&&We.push(l),null!==O&&(null===l&&We.push(no(null)),We.push(Xs(O),no(F),no(se)))),ta(Bi.projection,We,we)}function pS(v,p,l,O){const F=[no(v),no(p)];return null!==l&&F.push(no(l)),ta(Bi.i18nStart,F,O)}function Ey(v,p,l,O,F,se,we,We,gt,Ft,pn,fi,_o,Po){const Ro=[no(v),Xs(p),no(l),no(O),no(F),no(se),we];return(We||null!==gt)&&(Ro.push(no(We)),null!==gt&&(Ro.push(Xs(gt),no(Ft),no(pn)),(null!==fi||null!==_o)&&Ro.push(no(fi)),null!==_o&&Ro.push(no(_o)))),ta(Bi.repeaterCreate,Ro,Po)}function w2(v,p){return ta(Bi.repeater,[v],p)}function YO(v,p,l){return ta(v?Bi.deferPrefetchWhen:Bi.deferWhen,[p],l)}function ZA(v,p){return ta(Bi.declareLet,[no(v)],p)}function ZO(v,p,l,O){const F=[no(v),no(p)];return l&&F.push(no(l)),ta(Bi.i18n,F,O)}function s1(v){return ta(Bi.i18nEnd,[],v)}function QA(v,p){const l=[no(v),no(p)];return ta(Bi.i18nAttributes,l,null)}function JA(v,p,l,O){const F=[no(v),p];return null!==l&&F.push(l),ta(Bi.property,F,O)}function a1(v,p,l,O){const F=[no(v),p];return null!==l&&F.push(l),ta(Bi.twoWayProperty,F,O)}function qA(v,p,l,O){const F=[no(v),p];return(null!==l||null!==O)&&F.push(l??no(null)),null!==O&&F.push(no(O)),ta(Bi.attribute,F,null)}function QO(v,p,l,O){const F=[no(v),p];return null!==l&&F.push(no(l)),ta(Bi.styleProp,F,O)}function _N(v,p,l){return ta(Bi.classProp,[no(v),p],l)}function eI(v,p){return ta(Bi.styleMap,[v],p)}function l1(v,p){return ta(Bi.classMap,[v],p)}const gS=[Bi.pipeBind1,Bi.pipeBind2,Bi.pipeBind3,Bi.pipeBind4];function JO(v,p,l){const O=V_(v,p);return Oy(yx,[],O,[],l)}function tI(v,p){return ta(Bi.i18nExp,[v],p)}function nI(v,p){return ta(Bi.i18nApply,[no(v)],p)}function iI(v,p,l,O,F){const se=V_(p,l),we=[];return null!==O&&we.push(O),Oy(_S,[no(v)],se,we,F)}function oI(v,p,l,O,F){const se=V_(p,l),we=[];return null!==O&&we.push(O),Oy(CN,[no(v)],se,we,F)}function c1(v,p,l,O,F){const se=V_(p,l),we=[];return null!==O&&we.push(no(O)),Oy(vS,[no(v)],se,we,F)}function Cx(v,p,l){const O=V_(v,p);return Oy(yN,[],O,[],l)}function Kh(v,p,l){const O=V_(v,p);return Oy(u1,[],O,[],l)}function d1(v,p,l,O){const F=[no(v),p];return null!==l&&F.push(l),ta(Bi.hostProperty,F,O)}function mS(v,p,l){return ta(Bi.syntheticHostProperty,[no(v),p],l)}function V_(v,p){if(v.length<1||p.length!==v.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");const l=[];if(1===p.length&&""===v[0]&&""===v[1])l.push(p[0]);else{let O;for(O=0;O<p.length;O++)l.push(no(v[O]),p[O]);l.push(no(v[O]))}return l}function ta(v,p,l){const O=kr(v).callFn(p,l);return bf(new hu(O,l))}function ew(v,p,l){const O=[v];return null!==p&&O.push(p),ta(Bi.conditional,O,l)}const yx={constant:[Bi.textInterpolate,Bi.textInterpolate1,Bi.textInterpolate2,Bi.textInterpolate3,Bi.textInterpolate4,Bi.textInterpolate5,Bi.textInterpolate6,Bi.textInterpolate7,Bi.textInterpolate8],variable:Bi.textInterpolateV,mapping:v=>{if(v%2==0)throw new Error("Expected odd number of arguments");return(v-1)/2}},_S={constant:[Bi.propertyInterpolate,Bi.propertyInterpolate1,Bi.propertyInterpolate2,Bi.propertyInterpolate3,Bi.propertyInterpolate4,Bi.propertyInterpolate5,Bi.propertyInterpolate6,Bi.propertyInterpolate7,Bi.propertyInterpolate8],variable:Bi.propertyInterpolateV,mapping:v=>{if(v%2==0)throw new Error("Expected odd number of arguments");return(v-1)/2}},vS={constant:[Bi.styleProp,Bi.stylePropInterpolate1,Bi.stylePropInterpolate2,Bi.stylePropInterpolate3,Bi.stylePropInterpolate4,Bi.stylePropInterpolate5,Bi.stylePropInterpolate6,Bi.stylePropInterpolate7,Bi.stylePropInterpolate8],variable:Bi.stylePropInterpolateV,mapping:v=>{if(v%2==0)throw new Error("Expected odd number of arguments");return(v-1)/2}},CN={constant:[Bi.attribute,Bi.attributeInterpolate1,Bi.attributeInterpolate2,Bi.attributeInterpolate3,Bi.attributeInterpolate4,Bi.attributeInterpolate5,Bi.attributeInterpolate6,Bi.attributeInterpolate7,Bi.attributeInterpolate8],variable:Bi.attributeInterpolateV,mapping:v=>{if(v%2==0)throw new Error("Expected odd number of arguments");return(v-1)/2}},yN={constant:[Bi.styleMap,Bi.styleMapInterpolate1,Bi.styleMapInterpolate2,Bi.styleMapInterpolate3,Bi.styleMapInterpolate4,Bi.styleMapInterpolate5,Bi.styleMapInterpolate6,Bi.styleMapInterpolate7,Bi.styleMapInterpolate8],variable:Bi.styleMapInterpolateV,mapping:v=>{if(v%2==0)throw new Error("Expected odd number of arguments");return(v-1)/2}},u1={constant:[Bi.classMap,Bi.classMapInterpolate1,Bi.classMapInterpolate2,Bi.classMapInterpolate3,Bi.classMapInterpolate4,Bi.classMapInterpolate5,Bi.classMapInterpolate6,Bi.classMapInterpolate7,Bi.classMapInterpolate8],variable:Bi.classMapInterpolateV,mapping:v=>{if(v%2==0)throw new Error("Expected odd number of arguments");return(v-1)/2}},h1={constant:[Bi.pureFunction0,Bi.pureFunction1,Bi.pureFunction2,Bi.pureFunction3,Bi.pureFunction4,Bi.pureFunction5,Bi.pureFunction6,Bi.pureFunction7,Bi.pureFunction8],variable:Bi.pureFunctionV,mapping:v=>v};function tw(v,p,l,O,F){const se=v.mapping(l.length);if(se<v.constant.length)return kr(v.constant[se]).callFn([...p,...l,...O],F);if(null!==v.variable)return kr(v.variable).callFn([...p,Ns(l),...O],F);throw new Error("AssertionError: unable to call variadic function")}function Oy(v,p,l,O,F){return bf(tw(v,p,l,O,F).toStmt())}const p1=new Map([["window",Bi.resolveWindow],["document",Bi.resolveDocument],["body",Bi.resolveBody]]);function T2(v,p){for(const l of p)switch(yc(l,rI,Ka.None),l.kind){case Qn.Text:_r.replace(l,YA(l.handle.slot,l.initialValue,l.sourceSpan));break;case Qn.ElementStart:_r.replace(l,zA(l.handle.slot,l.tag,l.attributes,l.localRefs,l.startSourceSpan));break;case Qn.Element:_r.replace(l,KO(l.handle.slot,l.tag,l.attributes,l.localRefs,l.wholeSourceSpan));break;case Qn.ElementEnd:_r.replace(l,GA(l.sourceSpan));break;case Qn.ContainerStart:_r.replace(l,YR(l.handle.slot,l.attributes,l.localRefs,l.startSourceSpan));break;case Qn.Container:_r.replace(l,uN(l.handle.slot,l.attributes,l.localRefs,l.wholeSourceSpan));break;case Qn.ContainerEnd:_r.replace(l,ta(Bi.elementContainerEnd,[],null));break;case Qn.I18nStart:_r.replace(l,pS(l.handle.slot,l.messageIndex,l.subTemplateIndex,l.sourceSpan));break;case Qn.I18nEnd:_r.replace(l,s1(l.sourceSpan));break;case Qn.I18n:_r.replace(l,ZO(l.handle.slot,l.messageIndex,l.subTemplateIndex,l.sourceSpan));break;case Qn.I18nAttributes:if(null===l.i18nAttributesConfig)throw new Error("AssertionError: i18nAttributesConfig was not set");_r.replace(l,QA(l.handle.slot,l.i18nAttributesConfig));break;case Qn.Template:if(!(v instanceof uy))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(l.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");const O=v.job.views.get(l.xref);_r.replace(l,pN(l.handle.slot,Xs(O.fnName),O.decls,O.vars,l.tag,l.attributes,l.localRefs,l.startSourceSpan));break;case Qn.DisableBindings:_r.replace(l,ta(Bi.disableBindings,[],null));break;case Qn.EnableBindings:_r.replace(l,ta(Bi.enableBindings,[],null));break;case Qn.Pipe:_r.replace(l,gN(l.handle.slot,l.name));break;case Qn.DeclareLet:_r.replace(l,ZA(l.handle.slot,l.sourceSpan));break;case Qn.Listener:const F=sI(0,l.handlerFnName,l.handlerOps,l.consumesDollarEvent),se=l.eventTarget?p1.get(l.eventTarget):null;if(void 0===se)throw new Error(`Unexpected global target '${l.eventTarget}' defined for '${l.name}' event. Supported list of global targets: window,document,body.`);_r.replace(l,$A(l.name,F,se,l.hostListener&&l.isAnimationListener,l.sourceSpan));break;case Qn.TwoWayListener:_r.replace(l,ZR(l.name,sI(0,l.handlerFnName,l.handlerOps,!0),l.sourceSpan));break;case Qn.Variable:if(null===l.variable.name)throw new Error(`AssertionError: unnamed variable ${l.xref}`);_r.replace(l,bf(new Rl(l.variable.name,l.initializer,void 0,Xc.Final)));break;case Qn.Namespace:switch(l.active){case ic.HTML:_r.replace(l,ta(Bi.namespaceHTML,[],null));break;case ic.SVG:_r.replace(l,ta(Bi.namespaceSVG,[],null));break;case ic.Math:_r.replace(l,ta(Bi.namespaceMathML,[],null))}break;case Qn.Defer:const we=!!l.loadingMinimumTime||!!l.loadingAfterTime||!!l.placeholderMinimumTime;_r.replace(l,qR(l.handle.slot,l.mainSlot.slot,l.resolverFn,l.loadingSlot?.slot??null,l.placeholderSlot?.slot??null,l.errorSlot?.slot??null,l.loadingConfig,l.placeholderConfig,we,l.sourceSpan));break;case Qn.DeferOn:let We=[];switch(l.trigger.kind){case xl.Idle:case xl.Immediate:break;case xl.Timer:We=[l.trigger.delay];break;case xl.Interaction:case xl.Hover:case xl.Viewport:if(null==l.trigger.targetSlot?.slot||null===l.trigger.targetSlotViewSteps)throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${l.trigger.kind}`);We=[l.trigger.targetSlot.slot],0!==l.trigger.targetSlotViewSteps&&We.push(l.trigger.targetSlotViewSteps);break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${l.trigger.kind}`)}_r.replace(l,t1(l.trigger.kind,We,l.prefetch,l.sourceSpan));break;case Qn.ProjectionDef:_r.replace(l,n1(l.def));break;case Qn.Projection:if(null===l.handle.slot)throw new Error("No slot was assigned for project instruction");let gt=null,Ft=null,pn=null;if(null!==l.fallbackView){if(!(v instanceof uy))throw new Error("AssertionError: must be compiling a component");const Rr=v.job.views.get(l.fallbackView);if(void 0===Rr)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(null===Rr.fnName||null===Rr.decls||null===Rr.vars)throw new Error("AssertionError: expected projection fallback view to have been named and counted");gt=Rr.fnName,Ft=Rr.decls,pn=Rr.vars}_r.replace(l,o1(l.handle.slot,l.projectionSlotIndex,l.attributes,gt,Ft,pn,l.sourceSpan));break;case Qn.RepeaterCreate:if(null===l.handle.slot)throw new Error("No slot was assigned for repeater instruction");if(!(v instanceof uy))throw new Error("AssertionError: must be compiling a component");const fi=v.job.views.get(l.xref);if(null===fi.fnName)throw new Error("AssertionError: expected repeater primary view to have been named");let _o=null,Po=null,Ro=null;if(null!==l.emptyView){const Rr=v.job.views.get(l.emptyView);if(void 0===Rr)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(null===Rr.fnName||null===Rr.decls||null===Rr.vars)throw new Error("AssertionError: expected repeater empty view to have been named and counted");_o=Rr.fnName,Po=Rr.decls,Ro=Rr.vars}_r.replace(l,Ey(l.handle.slot,fi.fnName,l.decls,l.vars,l.tag,l.attributes,l.trackByFn,l.usesComponentInstance,_o,Po,Ro,l.emptyTag,l.emptyAttributes,l.wholeSourceSpan));break;case Qn.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${Qn[l.kind]}`)}}function bN(v,p){for(const l of p)switch(yc(l,rI,Ka.None),l.kind){case Qn.Advance:_r.replace(l,mN(l.delta,l.sourceSpan));break;case Qn.Property:_r.replace(l,l.expression instanceof Md?iI(l.name,l.expression.strings,l.expression.expressions,l.sanitizer,l.sourceSpan):JA(l.name,l.expression,l.sanitizer,l.sourceSpan));break;case Qn.TwoWayProperty:_r.replace(l,a1(l.name,l.expression,l.sanitizer,l.sourceSpan));break;case Qn.StyleProp:_r.replace(l,l.expression instanceof Md?c1(l.name,l.expression.strings,l.expression.expressions,l.unit,l.sourceSpan):QO(l.name,l.expression,l.unit,l.sourceSpan));break;case Qn.ClassProp:_r.replace(l,_N(l.name,l.expression,l.sourceSpan));break;case Qn.StyleMap:_r.replace(l,l.expression instanceof Md?Cx(l.expression.strings,l.expression.expressions,l.sourceSpan):eI(l.expression,l.sourceSpan));break;case Qn.ClassMap:_r.replace(l,l.expression instanceof Md?Kh(l.expression.strings,l.expression.expressions,l.sourceSpan):l1(l.expression,l.sourceSpan));break;case Qn.I18nExpression:_r.replace(l,tI(l.expression,l.sourceSpan));break;case Qn.I18nApply:_r.replace(l,nI(l.handle.slot,l.sourceSpan));break;case Qn.InterpolateText:_r.replace(l,JO(l.interpolation.strings,l.interpolation.expressions,l.sourceSpan));break;case Qn.Attribute:_r.replace(l,l.expression instanceof Md?oI(l.name,l.expression.strings,l.expression.expressions,l.sanitizer,l.sourceSpan):qA(l.name,l.expression,l.sanitizer,l.namespace));break;case Qn.HostProperty:if(l.expression instanceof Md)throw new Error("not yet handled");_r.replace(l,l.isAnimationTrigger?mS(l.name,l.expression,l.sourceSpan):d1(l.name,l.expression,l.sanitizer,l.sourceSpan));break;case Qn.Variable:if(null===l.variable.name)throw new Error(`AssertionError: unnamed variable ${l.xref}`);_r.replace(l,bf(new Rl(l.variable.name,l.initializer,void 0,Xc.Final)));break;case Qn.Conditional:if(null===l.processed)throw new Error("Conditional test was not set.");_r.replace(l,ew(l.processed,l.contextValue,l.sourceSpan));break;case Qn.Repeater:_r.replace(l,w2(l.collection,l.sourceSpan));break;case Qn.DeferWhen:_r.replace(l,YO(l.prefetch,l.expr,l.sourceSpan));break;case Qn.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${l.declaredName}`);case Qn.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${Qn[l.kind]}`)}}function rI(v){if(!Ef(v))return v;switch(v.kind){case Cs.NextContext:return function XA(v){return kr(Bi.nextContext).callFn(1===v?[]:[no(v)])}(v.steps);case Cs.Reference:return function QR(v){return kr(Bi.reference).callFn([no(v)])}(v.targetSlot.slot+1+v.offset);case Cs.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${v.name}`);case Cs.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case Cs.RestoreView:if("number"==typeof v.view)throw new Error("AssertionError: unresolved RestoreView");return function JR(v){return kr(Bi.restoreView).callFn([v])}(v.view);case Cs.ResetView:return function _x(v){return kr(Bi.resetView).callFn([v])}(v.expr);case Cs.GetCurrentView:return function hS(){return kr(Bi.getCurrentView).callFn([])}();case Cs.ReadVariable:if(null===v.name)throw new Error(`Read of unnamed variable ${v.xref}`);return Xs(v.name);case Cs.ReadTemporaryExpr:if(null===v.name)throw new Error(`Read of unnamed temporary ${v.xref}`);return Xs(v.name);case Cs.AssignTemporaryExpr:if(null===v.name)throw new Error(`Assign of unnamed temporary ${v.xref}`);return Xs(v.name).set(v.expr);case Cs.PureFunctionExpr:if(null===v.fn)throw new Error("AssertionError: expected PureFunctions to have been extracted");return function qO(v,p,l){return tw(h1,[no(v),p],l,[],null)}(v.varOffset,v.fn,v.args);case Cs.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case Cs.PipeBinding:return function fS(v,p,l){if(l.length<1||l.length>gS.length)throw new Error("pipeBind() argument count out of bounds");return kr(gS[l.length-1]).callFn([no(v),no(p),...l])}(v.targetSlot.slot,v.varOffset,v.args);case Cs.PipeBindingVariadic:return function vN(v,p,l){return kr(Bi.pipeBindV).callFn([no(v),no(p),l])}(v.targetSlot.slot,v.varOffset,v.args);case Cs.SlotLiteralExpr:return no(v.slot.slot);case Cs.ContextLetReference:return function vx(v){return kr(Bi.readContextLet).callFn([no(v)])}(v.targetSlot.slot);case Cs.StoreLet:return function r1(v,p){return kr(Bi.storeLet).callFn([v],p)}(v.value,v.sourceSpan);default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${Cs[v.kind]}`)}}function sI(v,p,l,O){bN(0,l);const F=[];for(const we of l){if(we.kind!==Qn.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${Qn[we.kind]}`);F.push(we.statement)}const se=[];return O&&se.push(new vc("$event")),nm(se,F,void 0,void 0,p)}function H_(v,p){const l=new Map;l.set(v.xref,Xs("ctx"));for(const O of p)switch(O.kind){case Qn.Variable:O.variable.kind===yu.Context&&l.set(O.variable.view,new Kd(O.xref));break;case Qn.Listener:case Qn.TwoWayListener:H_(v,O.handlerOps)}v===v.job.root&&l.set(v.xref,Xs("ctx"));for(const O of p)yc(O,F=>{if(F instanceof vm){if(!l.has(F.view))throw new Error(`No context found for reference to view ${F.view} from view ${v.xref}`);return l.get(F.view)}return F},Ka.None)}function iw(v){for(const p of v)(p.kind===Qn.Listener||p.kind===Qn.TwoWayListener)&&yc(p,l=>l instanceof wl&&"$event"===l.name?(p.kind===Qn.Listener&&(p.consumesDollarEvent=!0),new ch(l.name)):l,Ka.InChildOperation)}function rC(v,p,l,O,F){let se=null,we=new Map;for(const We of p.create)switch(We.kind){case Qn.I18nStart:if(!We.context)throw Error("Could not find i18n context for i18n op");se={i18nBlock:We,i18nContext:l.get(We.context)};break;case Qn.I18nEnd:se=null;break;case Qn.ElementStart:if(void 0!==We.i18nPlaceholder){if(null===se)throw Error("i18n tag placeholder should only occur inside an i18n block");f1(We,se.i18nContext,se.i18nBlock,F),F&&We.i18nPlaceholder.closeName&&we.set(We.xref,F),F=void 0}break;case Qn.ElementEnd:const gt=O.get(We.xref);if(gt&&void 0!==gt.i18nPlaceholder){if(null===se)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");CS(gt,se.i18nContext,se.i18nBlock,we.get(We.xref)),we.delete(We.xref)}break;case Qn.Projection:if(void 0!==We.i18nPlaceholder){if(null===se)throw Error("i18n tag placeholder should only occur inside an i18n block");f1(We,se.i18nContext,se.i18nBlock,F),CS(We,se.i18nContext,se.i18nBlock,F),F=void 0}break;case Qn.Template:const Ft=v.views.get(We.xref);if(void 0===We.i18nPlaceholder)rC(v,Ft,l,O);else{if(null===se)throw Error("i18n tag placeholder should only occur inside an i18n block");We.templateKind===gl.Structural?rC(v,Ft,l,O,We):(wy(v,Ft,We.handle.slot,We.i18nPlaceholder,se.i18nContext,se.i18nBlock,F),rC(v,Ft,l,O),cI(v,Ft,We.handle.slot,We.i18nPlaceholder,se.i18nContext,se.i18nBlock,F),F=void 0)}break;case Qn.RepeaterCreate:if(void 0!==F)throw Error("AssertionError: Unexpected structural directive associated with @for block");const pn=We.handle.slot+1,fi=v.views.get(We.xref);if(void 0===We.i18nPlaceholder)rC(v,fi,l,O);else{if(null===se)throw Error("i18n tag placeholder should only occur inside an i18n block");wy(v,fi,pn,We.i18nPlaceholder,se.i18nContext,se.i18nBlock,F),rC(v,fi,l,O),cI(v,fi,pn,We.i18nPlaceholder,se.i18nContext,se.i18nBlock,F),F=void 0}if(null!==We.emptyView){const _o=We.handle.slot+2,Po=v.views.get(We.emptyView);if(void 0===We.emptyI18nPlaceholder)rC(v,Po,l,O);else{if(null===se)throw Error("i18n tag placeholder should only occur inside an i18n block");wy(v,Po,_o,We.emptyI18nPlaceholder,se.i18nContext,se.i18nBlock,F),rC(v,Po,l,O),cI(v,Po,_o,We.emptyI18nPlaceholder,se.i18nContext,se.i18nBlock,F),F=void 0}}}}function f1(v,p,l,O){const{startName:F,closeName:se}=v.i18nPlaceholder;let we=rl.ElementTag|rl.OpenTag,We=v.handle.slot;void 0!==O&&(we|=rl.TemplateTag,We={element:We,template:O.handle.slot}),se||(we|=rl.CloseTag),xx(p.params,F,We,l.subTemplateIndex,we)}function CS(v,p,l,O){const{closeName:F}=v.i18nPlaceholder;if(F){let se=rl.ElementTag|rl.CloseTag,we=v.handle.slot;void 0!==O&&(se|=rl.TemplateTag,we={element:we,template:O.handle.slot}),xx(p.params,F,we,l.subTemplateIndex,se)}}function wy(v,p,l,O,F,se,we){let{startName:We,closeName:gt}=O,Ft=rl.TemplateTag|rl.OpenTag;gt||(Ft|=rl.CloseTag),void 0!==we&&xx(F.params,We,we.handle.slot,se.subTemplateIndex,Ft),xx(F.params,We,l,m1(0,se,p),Ft)}function cI(v,p,l,O,F,se,we){const{closeName:We}=O,gt=rl.TemplateTag|rl.CloseTag;We&&(xx(F.params,We,l,m1(0,se,p),gt),void 0!==we&&xx(F.params,We,we.handle.slot,se.subTemplateIndex,gt))}function m1(v,p,l){for(const O of l.create)if(O.kind===Qn.I18nStart)return O.subTemplateIndex;return p.subTemplateIndex}function xx(v,p,l,O,F){const se=v.get(p)??[];se.push({value:l,subTemplateIndex:O,flags:F}),v.set(p,se)}function EN(v,p,l,O){if(null!==v.i18nPlaceholder){const F=l.get(v.context),se=v.resolutionTime===B0.Creation?F.params:F.postprocessingParams,we=se.get(v.i18nPlaceholder)||[];we.push(p),se.set(v.i18nPlaceholder,we)}null!==v.icuPlaceholder&&O.get(v.icuPlaceholder)?.expressionPlaceholders.push(p)}function za(v,p,l){const O=new Map,F=new Map;for(const se of p)switch(se.kind){case Qn.Variable:switch(se.variable.kind){case yu.Identifier:if(se.variable.local){if(F.has(se.variable.identifier))continue;F.set(se.variable.identifier,se.xref)}else if(O.has(se.variable.identifier))continue;O.set(se.variable.identifier,se.xref);break;case yu.Alias:if(O.has(se.variable.identifier))continue;O.set(se.variable.identifier,se.xref);break;case yu.SavedView:l={view:se.variable.view,variable:se.xref}}break;case Qn.Listener:case Qn.TwoWayListener:za(v,se.handlerOps,l)}for(const se of p)se.kind==Qn.Listener||se.kind===Qn.TwoWayListener||yc(se,we=>{if(we instanceof wl)return F.has(we.name)?new Kd(F.get(we.name)):O.has(we.name)?new Kd(O.get(we.name)):new du(new vm(v.job.root.xref),we.name);if(we instanceof gh&&"number"==typeof we.view){if(null===l||l.view!==we.view)throw new Error(`AssertionError: no saved view ${we.view} from view ${v.xref}`);return we.view=new Kd(l.variable),we}return we},Ka.None);for(const se of p)vd(se,we=>{if(we instanceof wl)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${we.name}`)})}const Du=new Map([[Ml.HTML,Bi.sanitizeHtml],[Ml.RESOURCE_URL,Bi.sanitizeResourceUrl],[Ml.SCRIPT,Bi.sanitizeScript],[Ml.STYLE,Bi.sanitizeStyle],[Ml.URL,Bi.sanitizeUrl]]),Ty=new Map([[Ml.HTML,Bi.trustConstantHtml],[Ml.RESOURCE_URL,Bi.trustConstantResourceUrl]]);function _1(v){return v.kind===Qn.ElementStart&&"iframe"===v.tag?.toLowerCase()}function D2(v){if(Array.isArray(v)){if(v.length>1)throw Error("AssertionError: Ambiguous security context");return v[0]||Ml.NONE}return v}function A2(v,p){p.handlerOps.prepend([b_(v.job.allocateXrefId(),{kind:yu.Context,name:null,view:v.xref},new gh(v.xref),yf.None)]);for(const l of p.handlerOps)l.kind===Qn.Statement&&l.statement instanceof pu&&(l.statement.value=new xu(l.statement.value))}function C1(v){let p=0,l=[];for(const O of v){const F=new Map;vd(O,(Ft,pn)=>{pn&Ka.InChildOperation||Ft instanceof Za&&F.set(Ft.xref,Ft)});let se=0;const we=new Set,We=new Set,gt=new Map;vd(O,(Ft,pn)=>{pn&Ka.InChildOperation||(Ft instanceof Op?(we.has(Ft.xref)||(we.add(Ft.xref),gt.set(Ft.xref,`tmp_${p}_${se++}`)),TN(gt,Ft)):Ft instanceof Za&&(F.get(Ft.xref)===Ft&&(We.add(Ft.xref),se--),TN(gt,Ft)))}),l.push(...Array.from(new Set(gt.values())).map(Ft=>bf(new Rl(Ft)))),p++,(O.kind===Qn.Listener||O.kind===Qn.TwoWayListener)&&O.handlerOps.prepend(C1(O.handlerOps))}return l}function TN(v,p){const l=v.get(p.xref);if(void 0===l)throw new Error(`Found xref with unassigned name: ${p.xref}`);p.name=l}function b1(v,p){if(!(p instanceof _c)||0===p.args.length||p.args.length>2||!(p.receiver instanceof du&&p.receiver.receiver instanceof vm)||p.receiver.receiver.view!==v)return!1;const[l,O]=p.args;return l instanceof ch&&"$index"===l.name&&(1===p.args.length||!(!(O instanceof ch)||"$item"!==O.name))}function x1(v){let p;switch(v.kind){case Qn.Property:case Qn.HostProperty:case Qn.Attribute:return p=1,v.expression instanceof Md&&!function uI(v){return!(1!==v.expressions.length||2!==v.strings.length||""!==v.strings[0]||""!==v.strings[1])}(v.expression)&&(p+=v.expression.expressions.length),p;case Qn.TwoWayProperty:return 1;case Qn.StyleProp:case Qn.ClassProp:case Qn.StyleMap:case Qn.ClassMap:return p=2,v.expression instanceof Md&&(p+=v.expression.expressions.length),p;case Qn.InterpolateText:return v.interpolation.expressions.length;case Qn.I18nExpression:case Qn.Conditional:case Qn.DeferWhen:case Qn.StoreLet:return 1;case Qn.RepeaterCreate:return v.emptyView?1:0;default:throw new Error(`Unhandled op: ${Qn[v.kind]}`)}}function M2(v){switch(v.kind){case Cs.PureFunctionExpr:case Cs.PipeBinding:return 1+v.args.length;case Cs.PipeBindingVariadic:return 1+v.numArgs;case Cs.StoreLet:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${v.constructor.name}`)}}var Uc=function(v){return v[v.None=0]="None",v[v.ViewContextRead=1]="ViewContextRead",v[v.ViewContextWrite=2]="ViewContextWrite",v[v.SideEffectful=4]="SideEffectful",v}(Uc||{});function U_(v){const p=new Map;for(const l of v)l.kind===Qn.Variable&&l.flags&yf.AlwaysInline&&(vd(l,O=>{if(Ef(O)&&As(O)!==Uc.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),p.set(l.xref,l)),yc(l,O=>O instanceof Kd&&p.has(O.xref)?p.get(O.xref).initializer.clone():O,Ka.None);for(const l of p.values())_r.remove(l)}function hI(v,p){const l=new Map,O=new Map,F=new Set,se=new Map;for(const Ft of v){if(Ft.kind===Qn.Variable){if(l.has(Ft.xref)||O.has(Ft.xref))throw new Error(`Should not see two declarations of the same variable: ${Ft.xref}`);l.set(Ft.xref,Ft),O.set(Ft.xref,0)}se.set(Ft,bS(Ft)),pI(Ft,O,F)}let we=!1;for(const Ft of v.reversed()){const pn=se.get(Ft);if(Ft.kind!==Qn.Variable||0!==O.get(Ft.xref))pn.fences&Uc.ViewContextRead&&(we=!0);else{if(we&&pn.fences&Uc.ViewContextWrite||pn.fences&Uc.SideEffectful){const fi=bf(Ft.initializer.toStmt());se.set(fi,pn),_r.replace(Ft,fi)}else gI(Ft,O),_r.remove(Ft);se.delete(Ft),l.delete(Ft.xref),O.delete(Ft.xref)}}const We=[];for(const[Ft,pn]of O){const _o=!!(l.get(Ft).flags&yf.AlwaysInline);1!==pn||_o||F.has(Ft)||We.push(Ft)}let gt;for(;gt=We.pop();){const Ft=l.get(gt),pn=se.get(Ft);if(Ft.flags&yf.AlwaysInline)throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let _o=Ft.next;_o.kind!==Qn.ListEnd;_o=_o.next){const Po=se.get(_o);if(Po.variablesUsed.has(gt)){if(p===gg.TemplateDefinitionBuilder&&!rw(Ft,_o))break;if(AN(gt,Ft.initializer,_o,pn.fences)){Po.variablesUsed.delete(gt);for(const Ro of pn.variablesUsed)Po.variablesUsed.add(Ro);Po.fences|=pn.fences,l.delete(gt),O.delete(gt),se.delete(Ft),_r.remove(Ft)}break}if(!xS(Po.fences,pn.fences))break}}}function As(v){switch(v.kind){case Cs.NextContext:return Uc.ViewContextRead|Uc.ViewContextWrite;case Cs.RestoreView:return Uc.ViewContextRead|Uc.ViewContextWrite|Uc.SideEffectful;case Cs.StoreLet:return Uc.SideEffectful;case Cs.Reference:case Cs.ContextLetReference:return Uc.ViewContextRead;default:return Uc.None}}function bS(v){let p=Uc.None;const l=new Set;return vd(v,O=>{Ef(O)&&(O.kind===Cs.ReadVariable?l.add(O.xref):p|=As(O))}),{fences:p,variablesUsed:l}}function pI(v,p,l){vd(v,(O,F)=>{if(!Ef(O)||O.kind!==Cs.ReadVariable)return;const se=p.get(O.xref);void 0!==se&&(p.set(O.xref,se+1),F&Ka.InChildOperation&&l.add(O.xref))})}function gI(v,p){vd(v,l=>{if(!Ef(l)||l.kind!==Cs.ReadVariable)return;const O=p.get(l.xref);if(void 0!==O){if(0===O)throw new Error(`Inaccurate variable count: ${l.xref} - found another read but count is already 0`);p.set(l.xref,O-1)}})}function xS(v,p){if(v&Uc.ViewContextWrite){if(p&Uc.ViewContextRead)return!1}else if(v&Uc.ViewContextRead&&p&Uc.ViewContextWrite)return!1;return!0}function AN(v,p,l,O){let F=!1,se=!0;return yc(l,(we,We)=>{if(!Ef(we)||F||!se)return we;if(We&Ka.InChildOperation&&O&Uc.ViewContextRead)return we;if(we.kind===Cs.ReadVariable){if(we.xref===v)return F=!0,p}else{const gt=As(we);se=se&&xS(gt,O)}return we},Ka.None),F}function rw(v,p){switch(v.variable.kind){case yu.Identifier:return v.initializer instanceof ch&&"ctx"===v.initializer.name;case yu.Context:return p.kind===Qn.Variable;default:return!0}}const k2=[{kind:Zr.Tmpl,fn:function UA(v){for(const p of v.units){const l=xO(p);for(const O of p.ops())if(O.kind===Qn.Binding){const F=GR(l,O.target);O2(O.name)&&F.kind===Qn.Projection&&_r.remove(O)}}}},{kind:Zr.Host,fn:function yy(v){for(const p of v.root.update)if(p.kind===Qn.Binding&&p.bindingKind===xs.Property)if(p.name.endsWith("!important")&&(p.name=p.name.substring(0,p.name.length-10)),p.name.startsWith("style.")){p.bindingKind=xs.StyleProperty,p.name=p.name.substring(6),RB(p.name)||(p.name=Jv(p.name));const{property:l,suffix:O}=kB(p.name);p.name=l,p.unit=O}else p.name.startsWith("style!")?(p.bindingKind=xs.StyleProperty,p.name="style"):(p.name.startsWith("class.")||p.name.startsWith("class!"))&&(p.bindingKind=xs.ClassName,p.name=kB(p.name.substring(6)).property)}},{kind:Zr.Tmpl,fn:function x2(v){for(const p of v.units){let l=ic.HTML;for(const O of p.create)O.kind===Qn.ElementStart&&O.namespace!==l&&(_r.insertBefore(GD(O.namespace),O),l=O.namespace)}}},{kind:Zr.Tmpl,fn:function cS(v){dS(v.root,0)}},{kind:Zr.Tmpl,fn:function fI(v){for(const p of v.units){let l=null,O=null;for(const F of p.create)switch(F.kind){case Qn.I18nStart:l=F;break;case Qn.I18nEnd:l=null;break;case Qn.IcuStart:null===l&&(O=v.allocateXrefId(),_r.insertBefore(dy(O,F.message,void 0,null),F));break;case Qn.IcuEnd:null!==O&&(_r.insertAfter(CO(O,null),F),O=null)}}}},{kind:Zr.Both,fn:function qD(v){const p=new Map;for(const l of v.units)for(const O of l.update.reversed())if(O.kind===Qn.Binding&&O.isTextAttribute){const F=p.get(O.target)||new Set;F.has(O.name)&&v.compatibility===gg.TemplateDefinitionBuilder&&("style"===O.name||"class"===O.name)&&_r.remove(O),F.add(O.name),p.set(O.target,F)}}},{kind:Zr.Both,fn:function I2(v){for(const p of v.units)for(const l of p.update)if(l.kind===Qn.Binding)switch(l.bindingKind){case xs.ClassName:if(l.expression instanceof Md)throw new Error("Unexpected interpolation in ClassName binding");_r.replace(l,QM(l.target,l.name,l.expression,l.sourceSpan));break;case xs.StyleProperty:_r.replace(l,yB(l.target,l.name,l.expression,l.unit,l.sourceSpan));break;case xs.Property:case xs.Template:"style"===l.name?_r.replace(l,JM(l.target,l.expression,l.sourceSpan)):"class"===l.name&&_r.replace(l,qM(l.target,l.expression,l.sourceSpan))}}},{kind:Zr.Both,fn:function aR(v){const p=new Map;for(const l of v.units)for(const O of l.create)bm(O)&&p.set(O.xref,O);for(const l of v.units)for(const O of l.ops())if(O.kind===Qn.Binding)switch(O.bindingKind){case xs.Attribute:if("ngNonBindable"===O.name)_r.remove(O),TB(p,O.target).nonBindable=!0;else{const[F,se]=gf(O.name);_r.replace(O,bB(O.target,F,se,O.expression,O.securityContext,O.isTextAttribute,O.isStructuralTemplateAttribute,O.templateKind,O.i18nMessage,O.sourceSpan))}break;case xs.Property:case xs.Animation:_r.replace(O,v.kind===Zr.Host?$D(O.name,O.expression,O.bindingKind===xs.Animation,O.i18nContext,O.securityContext,O.sourceSpan):ZM(O.target,O.name,O.expression,O.bindingKind===xs.Animation,O.securityContext,O.isStructuralTemplateAttribute,O.templateKind,O.i18nContext,O.i18nMessage,O.sourceSpan));break;case xs.TwoWayProperty:if(!(O.expression instanceof $a))throw new Error(`Expected value of two-way property binding "${O.name}" to be an expression`);_r.replace(O,CB(O.target,O.name,O.expression,O.securityContext,O.isStructuralTemplateAttribute,O.templateKind,O.i18nContext,O.i18nMessage,O.sourceSpan));break;case xs.I18n:case xs.ClassName:case xs.StyleProperty:throw new Error(`Unhandled binding of kind ${xs[O.bindingKind]}`)}}},{kind:Zr.Both,fn:function SO(v){for(const p of v.units){const l=xO(p);for(const O of p.ops())switch(O.kind){case Qn.Attribute:ZD(p,O,l);break;case Qn.Property:if(!O.isAnimationTrigger){let F;F=null!==O.i18nMessage&&null===O.templateKind?xs.I18n:O.isStructuralTemplateAttribute?xs.Template:xs.Property,_r.insertBefore(Xu(O.target,F,null,O.name,null,null,null,O.securityContext),Jb(l,O.target))}break;case Qn.TwoWayProperty:_r.insertBefore(Xu(O.target,xs.TwoWayProperty,null,O.name,null,null,null,O.securityContext),Jb(l,O.target));break;case Qn.StyleProp:case Qn.ClassProp:p.job.compatibility===gg.TemplateDefinitionBuilder&&O.expression instanceof fh&&_r.insertBefore(Xu(O.target,xs.Property,null,O.name,null,null,null,Ml.STYLE),Jb(l,O.target));break;case Qn.Listener:if(!O.isAnimationListener){const F=Xu(O.target,xs.Property,null,O.name,null,null,null,Ml.NONE);if(v.kind===Zr.Host){if(v.compatibility)break;p.create.push(F)}else _r.insertBefore(F,Jb(l,O.target))}break;case Qn.TwoWayListener:if(v.kind!==Zr.Host){const F=Xu(O.target,xs.Property,null,O.name,null,null,null,Ml.NONE);_r.insertBefore(F,Jb(l,O.target))}}}}},{kind:Zr.Tmpl,fn:function tx(v){const p=new Map;for(const F of v.units)for(const se of F.ops())switch(se.kind){case Qn.Binding:case Qn.Property:case Qn.Attribute:case Qn.ExtractedAttribute:if(null===se.i18nMessage)continue;if(!p.has(se.i18nMessage)){const we=Kv(Ic.Attr,v.allocateXrefId(),null,se.i18nMessage,null);F.create.push(we),p.set(se.i18nMessage,we.xref)}se.i18nContext=p.get(se.i18nMessage)}const l=new Map;for(const F of v.units)for(const se of F.create)if(se.kind===Qn.I18nStart&&se.xref===se.root){const we=Kv(Ic.RootI18n,v.allocateXrefId(),se.xref,se.message,null);F.create.push(we),se.context=we.xref,l.set(se.xref,we)}for(const F of v.units)for(const se of F.create)if(se.kind===Qn.I18nStart&&se.xref!==se.root){const we=l.get(se.root);if(void 0===we)throw Error("AssertionError: Root i18n block i18n context should have been created.");se.context=we.xref,l.set(se.xref,we)}let O=null;for(const F of v.units)for(const se of F.create)switch(se.kind){case Qn.I18nStart:O=se;break;case Qn.I18nEnd:O=null;break;case Qn.IcuStart:if(null===O)throw Error("AssertionError: Unexpected ICU outside of an i18n block.");if(se.message.id!==O.message.id){const we=Kv(Ic.Icu,v.allocateXrefId(),O.root,se.message,null);F.create.push(we),se.context=we.xref}else se.context=O.context,l.get(O.xref).contextKind=Ic.Icu}}},{kind:Zr.Both,fn:function BA(v){const p=new Map;for(const l of v.units)for(const O of l.create)bm(O)&&p.set(O.xref,O);for(const l of v.units)for(const O of l.create)if(O.kind===Qn.ExtractedAttribute&&O.bindingKind===xs.Attribute&&z0(O.expression)){const F=p.get(O.target);if(void 0!==F&&F.kind===Qn.Template&&F.templateKind===gl.Structural)continue;if("style"===O.name){const se=Df(O.expression.value);for(let we=0;we<se.length-1;we+=2)_r.insertBefore(Xu(O.target,xs.StyleProperty,null,se[we],no(se[we+1]),null,null,Ml.STYLE),O);_r.remove(O)}else if("class"===O.name){const se=O.expression.value.trim().split(/\s+/g);for(const we of se)_r.insertBefore(Xu(O.target,xs.ClassName,null,we,null,null,null,Ml.NONE),O);_r.remove(O)}}}},{kind:Zr.Tmpl,fn:function nw(v){for(const p of v.units)for(const l of p.update)switch(l.kind){case Qn.Attribute:case Qn.Binding:case Qn.ClassProp:case Qn.ClassMap:case Qn.Property:case Qn.StyleProp:case Qn.StyleMap:l.expression instanceof fh&&_r.remove(l)}}},{kind:Zr.Both,fn:function EO(v){for(const p of v.units)for(const l of p.update)l.kind===Qn.Attribute&&l.expression instanceof Md&&2===l.expression.strings.length&&l.expression.strings.every(F=>""===F)&&(l.expression=l.expression.expressions[0])}},{kind:Zr.Both,fn:function zR(v){for(const p of v.units)jO(p.create,VA),jO(p.update,p.job.kind===Zr.Host?lS:HA)}},{kind:Zr.Tmpl,fn:function Ou(v){for(const p of v.units)for(const l of p.ops()){if(l.kind!==Qn.Conditional)continue;let O;const F=l.conditions.findIndex(we=>null===we.expr);if(F>=0){const we=l.conditions.splice(F,1)[0].targetSlot;O=new wp(we)}else O=no(-1);let se=null==l.test?null:new Op(l.test,v.allocateXrefId());for(let we=l.conditions.length-1;we>=0;we--){let We=l.conditions[we];if(null!==We.expr){if(null!==se){const gt=0===we?se:new Za(se.xref);We.expr=new Ua(hs.Identical,gt,We.expr)}else if(null!==We.alias){const gt=v.allocateXrefId();We.expr=new Op(We.expr,gt),l.contextValue=new Za(gt)}O=new Mh(We.expr,new wp(We.targetSlot),O)}}l.processed=O,l.conditions=[]}}},{kind:Zr.Tmpl,fn:function lN(v){for(const p of v.units)WR(p)}},{kind:Zr.Tmpl,fn:function hy(v){for(const p of v.units)for(const l of p.create)l.kind===Qn.Defer&&(null!==l.placeholderMinimumTime&&(l.placeholderConfig=new w_(xm([l.placeholderMinimumTime]))),(null!==l.loadingMinimumTime||null!==l.loadingAfterTime)&&(l.loadingConfig=new w_(xm([l.loadingMinimumTime,l.loadingAfterTime]))))}},{kind:Zr.Tmpl,fn:function tN(v){for(const p of v.units){let l=null,O=null;const F=new Map,se=new Map,we=new Map;for(const We of p.create)switch(We.kind){case Qn.I18nStart:if(null===We.context)throw Error("I18n op should have its context set.");l=We;break;case Qn.I18nEnd:l=null;break;case Qn.IcuStart:if(null===We.context)throw Error("Icu op should have its context set.");O=We;break;case Qn.IcuEnd:O=null;break;case Qn.Text:if(null!==l)if(F.set(We.xref,l),se.set(We.xref,O),null!==We.icuPlaceholder){const gt=l2(v.allocateXrefId(),We.icuPlaceholder,[We.initialValue]);_r.replace(We,gt),we.set(We.xref,gt)}else _r.remove(We)}for(const We of p.update)if(We.kind===Qn.InterpolateText){if(!F.has(We.target))continue;const gt=F.get(We.target),Ft=se.get(We.target),pn=we.get(We.target),fi=Ft?Ft.context:gt.context,_o=Ft?B0.Postproccessing:B0.Creation,Po=[];for(let Ro=0;Ro<We.interpolation.expressions.length;Ro++){const Rr=We.interpolation.expressions[Ro];Po.push(HD(fi,gt.xref,gt.xref,gt.handle,Rr,pn?.xref??null,We.interpolation.i18nPlaceholders[Ro]??null,_o,fg.I18nText,"",Rr.sourceSpan??We.sourceSpan))}_r.replaceWithMany(We,Po),void 0!==pn&&(pn.strings=We.interpolation.strings)}}}},{kind:Zr.Tmpl,fn:function ex(v){const p=new Map;for(const l of v.units){for(const O of l.create)O.kind===Qn.I18nAttributes&&p.set(O.target,O);for(const O of l.update)switch(O.kind){case Qn.Property:case Qn.Attribute:if(null===O.i18nContext||!(O.expression instanceof Md))continue;const F=p.get(O.target);if(void 0===F)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(F.target!==O.target)throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");const se=[];for(let we=0;we<O.expression.expressions.length;we++){const We=O.expression.expressions[we];if(O.expression.i18nPlaceholders.length!==O.expression.expressions.length)throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${O.expression.i18nPlaceholders.length} placeholders and ${O.expression.expressions.length} expressions`);se.push(HD(O.i18nContext,F.target,F.xref,F.handle,We,null,O.expression.i18nPlaceholders[we],B0.Creation,fg.I18nAttribute,O.name,O.sourceSpan))}_r.replaceWithMany(O,se)}}}},{kind:Zr.Tmpl,fn:function aI(v){for(const p of v.units){const l=new Set;for(const O of p.update)O.kind===Qn.I18nExpression&&l.add(O.i18nOwner);for(const O of p.create)if(O.kind===Qn.I18nAttributes){if(l.has(O.xref))continue;_r.remove(O)}}}},{kind:Zr.Tmpl,fn:function YD(v){for(const p of v.units){let l=p.update.head,O=[],F=null;for(const se of p.create){if(se.kind===Qn.I18nStart)F={blockXref:se.xref,lastSlotConsumer:se.xref};else if(se.kind===Qn.I18nEnd){for(const we of O)we.target=F.lastSlotConsumer,_r.insertBefore(we,l);O.length=0,F=null}if(ay(se))for(null!==F&&(F.lastSlotConsumer=se.xref);null!==l.next;)if(null===F||l.kind!==Qn.I18nExpression||l.usage!==fg.I18nText||l.i18nOwner!==F.blockXref){if(pO(l)&&l.target!==se.xref)break;l=l.next}else{const we=l;l=l.next,_r.remove(we),O.push(we)}}}}},{kind:Zr.Tmpl,fn:function OB(v){const p=new Map;for(const l of v.units)for(const O of l.create)O.kind===Qn.I18nContext&&p.set(O.xref,O);for(const l of v.units)for(const O of l.update)O.kind===Qn.I18nExpression&&wB(p,O)&&_r.insertAfter(N0(O.i18nOwner,O.handle,null),O)}},{kind:Zr.Tmpl,fn:function cN(v){for(const p of v.units)for(const l of p.update)yc(l,O=>!(O instanceof jv)||O.args.length<=4?O:new Of(O.target,O.targetSlot,O.name,Ns(O.args),O.args.length),Ka.None)}},{kind:Zr.Both,fn:function dN(v){for(const p of v.units)for(const l of p.update)yc(l,(O,F)=>F&Ka.InChildOperation?O:O instanceof kh?F_(O):O instanceof uu?oC(O):O,Ka.None)}},{kind:Zr.Tmpl,fn:function ed(v){const p=v.compatibility===gg.TemplateDefinitionBuilder,l=[];let O=0;for(const F of v.units)for(const se of F.create)se.kind===Qn.Projection&&(l.push(se.selector),se.projectionSlotIndex=O++);if(l.length>0){let F=null;if(l.length>1||"*"!==l[0]){const se=l.map(we=>"*"===we?we:rb(we));F=v.pool.getConstLiteral(xm(se),p)}v.contentSelectors=v.pool.getConstLiteral(xm(l),p),v.root.create.prepend([WD(F)])}}},{kind:Zr.Tmpl,fn:function mI(v){for(const p of v.units)for(const l of p.update){if(l.kind!==Qn.StoreLet)continue;const O={kind:yu.Identifier,name:null,identifier:l.declaredName,local:!0};_r.replace(l,b_(v.allocateXrefId(),O,new cy(l.target,l.value,l.sourceSpan),yf.None))}}},{kind:Zr.Tmpl,fn:function AO(v){rx(v.root,null)}},{kind:Zr.Tmpl,fn:function ow(v){for(const p of v.units){p.create.prepend([b_(p.job.allocateXrefId(),{kind:yu.SavedView,name:null,view:p.xref},new Tl,yf.None)]);for(const l of p.create){if(l.kind!==Qn.Listener&&l.kind!==Qn.TwoWayListener)continue;let O=p!==v.root;if(!O)for(const F of l.handlerOps)vd(F,se=>{(se instanceof U0||se instanceof S_)&&(O=!0)});O&&A2(p,l)}}}},{kind:Zr.Both,fn:function XD(v){for(const p of v.units)for(const l of p.ops())yc(l,EB,Ka.None)}},{kind:Zr.Both,fn:function SN(v){for(const p of v.units)iw(p.create),iw(p.update)}},{kind:Zr.Tmpl,fn:function DN(v){for(const p of v.units)for(const l of p.create)l.kind===Qn.RepeaterCreate&&(l.track=Kr(l.track,O=>{if(O instanceof wl){if(l.varNames.$index.has(O.name))return Xs("$index");if(O.name===l.varNames.$implicit)return Xs("$item")}return O},Ka.None))}},{kind:Zr.Tmpl,fn:function S1(v){for(const p of v.units)for(const l of p.update){if(l.kind!==Qn.Variable||l.variable.kind!==yu.Identifier||!(l.initializer instanceof cy))continue;const O=l.variable.identifier;let F=l;for(;F&&F.kind!==Qn.ListEnd;)yc(F,se=>se instanceof wl&&se.name===O?no(void 0):se,Ka.None),F=F.prev}}},{kind:Zr.Both,fn:function ON(v){for(const p of v.units)za(p,p.create,null),za(p,p.update,null)}},{kind:Zr.Tmpl,fn:function py(v){const p=new Map;function l(F){if(p.has(F.xref))return p.get(F.xref);const se=new gy;for(const we of F.create)if(bm(we)&&null!==we.localRefs){if(!Array.isArray(we.localRefs))throw new Error("LocalRefs were already processed, but were needed to resolve defer targets.");for(const We of we.localRefs)""===We.target&&se.targets.set(We.name,{xref:we.xref,slot:we.handle})}return p.set(F.xref,se),se}function O(F,se,we){switch(se.trigger.kind){case xl.Idle:case xl.Immediate:case xl.Timer:return;case xl.Hover:case xl.Interaction:case xl.Viewport:if(null===se.trigger.targetName){if(null===we)throw new Error("defer on trigger with no target name must have a placeholder block");const Ft=v.views.get(we);if(null==Ft)throw new Error("AssertionError: could not find placeholder view for defer on trigger");for(const pn of Ft.create)if(ay(pn)&&(bm(pn)||pn.kind===Qn.Projection))return se.trigger.targetXref=pn.xref,se.trigger.targetView=we,se.trigger.targetSlotViewSteps=-1,void(se.trigger.targetSlot=pn.handle);return}let We=null!==we?v.views.get(we):F,gt=null!==we?-1:0;for(;null!==We;){const Ft=l(We);if(Ft.targets.has(se.trigger.targetName)){const{xref:pn,slot:fi}=Ft.targets.get(se.trigger.targetName);return se.trigger.targetXref=pn,se.trigger.targetView=We.xref,se.trigger.targetSlotViewSteps=gt,void(se.trigger.targetSlot=fi)}We=null!==We.parent?v.views.get(We.parent):null,gt++}break;default:throw new Error(`Trigger kind ${se.trigger.kind} not handled`)}}for(const F of v.units){const se=new Map;for(const we of F.create)switch(we.kind){case Qn.Defer:se.set(we.xref,we);break;case Qn.DeferOn:O(F,we,se.get(we.defer).placeholderView)}}}},{kind:Zr.Tmpl,fn:function Oz(v){for(const p of v.units)for(const l of p.create)l.kind===Qn.TwoWayListener&&yc(l,O=>{if(!(O instanceof Cc))return O;const{target:F,value:se}=O;if(F instanceof du||F instanceof ag)return jA(F,se).or(F.set(se));if(F instanceof Kd)return jA(F,se);throw new Error("Unsupported expression in two-way action binding.")},Ka.InChildOperation)}},{kind:Zr.Tmpl,fn:function y1(v){for(const p of v.units)for(const l of p.create)l.kind===Qn.RepeaterCreate&&(l.track instanceof ch&&"$index"===l.track.name?l.trackByFn=kr(Bi.repeaterTrackByIndex):l.track instanceof ch&&"$item"===l.track.name?l.trackByFn=kr(Bi.repeaterTrackByIdentity):b1(v.root.xref,l.track)?(l.usesComponentInstance=!0,l.track.receiver.receiver.view===p.xref?l.trackByFn=l.track.receiver:(l.trackByFn=kr(Bi.componentInstance).callFn([]).prop(l.track.receiver.name),l.track=l.trackByFn)):l.track=Kr(l.track,O=>O instanceof vm?(l.usesComponentInstance=!0,new Gh(O.view)):O,Ka.None))}},{kind:Zr.Both,fn:function lI(v){for(const p of v.units)H_(p,p.create),H_(p,p.update)}},{kind:Zr.Both,fn:function Sl(v){for(const p of v.units){const l=xO(p);if(v.kind!==Zr.Host)for(const O of p.create)if(O.kind===Qn.ExtractedAttribute){const F=Ty.get(D2(O.securityContext))??null;O.trustedValueFn=null!==F?kr(F):null}for(const O of p.update)switch(O.kind){case Qn.Property:case Qn.Attribute:case Qn.HostProperty:let F=null;if(F=Array.isArray(O.securityContext)&&2===O.securityContext.length&&O.securityContext.indexOf(Ml.URL)>-1&&O.securityContext.indexOf(Ml.RESOURCE_URL)>-1?Bi.sanitizeUrlOrResourceUrl:Du.get(D2(O.securityContext))??null,O.sanitizer=null!==F?kr(F):null,null===O.sanitizer){let se=!1;if(v.kind===Zr.Host||O.kind===Qn.HostProperty)se=!0;else{const we=l.get(O.target);if(void 0===we||!bm(we))throw Error("Property should have an element-like owner");se=_1(we)}se&&NO(O.name)&&(O.sanitizer=kr(Bi.validateIframeAttribute))}}}}},{kind:Zr.Tmpl,fn:function nN(v){for(const p of v.units)for(const l of p.create)switch(l.kind){case Qn.ElementStart:case Qn.Template:if(!Array.isArray(l.localRefs))throw new Error("AssertionError: expected localRefs to be an array still");if(l.numSlotsUsed+=l.localRefs.length,l.localRefs.length>0){const O=iN(l.localRefs);l.localRefs=v.addConst(O)}else l.localRefs=null}}},{kind:Zr.Both,fn:function gx(v){for(const p of v.units)for(const l of p.ops())yc(l,O=>{if(!(O instanceof Ua)||O.operator!==hs.NullishCoalesce)return O;const F=new Op(O.lhs.clone(),v.allocateXrefId()),se=new Za(F.xref);return new Mh(new Ua(hs.And,new Ua(hs.NotIdentical,F,lf),new Ua(hs.NotIdentical,se,new fd(void 0))),se.clone(),O.rhs)},Ka.None)}},{kind:Zr.Both,fn:function fy(v){for(const p of v.units)for(const l of p.ops())yc(l,O=>nA(O,{job:v}),Ka.None),yc(l,pR,Ka.None)}},{kind:Zr.Both,fn:function wN(v){for(const p of v.units)p.create.prepend(C1(p.create)),p.update.prepend(C1(p.update))}},{kind:Zr.Both,fn:function fa(v){for(const p of v.units){U_(p.create),U_(p.update);for(const l of p.create)(l.kind===Qn.Listener||l.kind===Qn.TwoWayListener)&&U_(l.handlerOps);hI(p.create,v.compatibility),hI(p.update,v.compatibility);for(const l of p.create)(l.kind===Qn.Listener||l.kind===Qn.TwoWayListener)&&hI(l.handlerOps,v.compatibility)}}},{kind:Zr.Both,fn:function R2(v){const p=new Set;for(const l of v.units)for(const O of l.ops())vd(O,F=>{F instanceof S_&&p.add(F.target)});for(const l of v.units)for(const O of l.update)yc(O,F=>F instanceof cy&&!p.has(F.target)?F.value:F,Ka.None)}},{kind:Zr.Tmpl,fn:function v1(v){const p=new Map;for(const l of v.units){let O=0;for(const F of l.create)ay(F)&&(F.handle.slot=O,p.set(F.xref,F.handle.slot),O+=F.numSlotsUsed);l.decls=O}for(const l of v.units)for(const O of l.ops())if(O.kind===Qn.Template||O.kind===Qn.RepeaterCreate){const F=v.views.get(O.xref);O.decls=F.decls}}},{kind:Zr.Tmpl,fn:function g1(v){const p=new Map,l=new Map;for(const O of v.units)for(const F of O.create)switch(F.kind){case Qn.I18nContext:p.set(F.xref,F);break;case Qn.ElementStart:l.set(F.xref,F)}rC(v,v.root,p,l)}},{kind:Zr.Tmpl,fn:function yS(v){const p=new Map,l=new Map,O=new Map;for(const we of v.units)for(const We of we.create)switch(We.kind){case Qn.I18nStart:p.set(We.xref,We.subTemplateIndex);break;case Qn.I18nContext:l.set(We.xref,We);break;case Qn.IcuPlaceholder:O.set(We.xref,We)}const F=new Map,se=we=>we.usage===fg.I18nText?we.i18nOwner:we.context;for(const we of v.units)for(const We of we.update)if(We.kind===Qn.I18nExpression){const gt=F.get(se(We))||0;EN(We,{value:gt,subTemplateIndex:p.get(We.i18nOwner)??null,flags:rl.ExpressionIndex},l,O),F.set(se(We),gt+1)}}},{kind:Zr.Tmpl,fn:function A_(v){const p=new Map,l=new Map,O=new Map;for(const se of v.units)for(const we of se.create)switch(we.kind){case Qn.I18nContext:const We=c2(v,we);se.create.push(We),p.set(we.xref,We),O.set(we.xref,we);break;case Qn.I18nStart:l.set(we.xref,we)}let F=null;for(const se of v.units)for(const we of se.create)switch(we.kind){case Qn.IcuStart:F=we,_r.remove(we);const We=O.get(we.context);if(We.contextKind!==Ic.Icu)continue;const gt=l.get(We.i18nBlock);if(gt.context===We.xref)continue;const Ft=l.get(gt.root),pn=p.get(Ft.context);if(void 0===pn)throw Error("AssertionError: ICU sub-message should belong to a root message.");const fi=p.get(We.xref);fi.messagePlaceholder=we.messagePlaceholder,pn.subMessages.push(fi.xref);break;case Qn.IcuEnd:F=null,_r.remove(we);break;case Qn.IcuPlaceholder:if(null===F||null==F.context)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");p.get(F.context).postprocessingParams.set(we.name,no(Cy(we))),_r.remove(we)}}},{kind:Zr.Tmpl,fn:function P2(v){for(const p of v.units)for(const l of p.create){if(l.kind!==Qn.RepeaterCreate||null!==l.trackByFn)continue;let F,O=!1;l.track=Kr(l.track,we=>{if(we instanceof jv||we instanceof Of)throw new Error("Illegal State: Pipes are not allowed in this context");return we instanceof Gh?(O=!0,Xs("this")):we},Ka.None);const se=[new vc("$index"),new vc("$item")];F=O?new Rh(se,[new pu(l.track)]):Zc(se,l.track),l.trackByFn=v.pool.getSharedFunctionReference(F,"_forTrack")}}},{kind:Zr.Tmpl,fn:function JB(v){const p=v.relativeContextFilePath.replace(/[^A-Za-z0-9]/g,"_").toUpperCase()+"_",l=new Map,O=new Map,F=new Map,se=new Map;for(const gt of v.units)for(const Ft of gt.ops())if(Ft.kind===Qn.ExtractedAttribute&&null!==Ft.i18nContext){const pn=l.get(Ft.i18nContext)??[];pn.push(Ft),l.set(Ft.i18nContext,pn)}else if(Ft.kind===Qn.I18nAttributes)O.set(Ft.target,Ft);else if(Ft.kind===Qn.I18nExpression&&Ft.usage===fg.I18nAttribute){const pn=F.get(Ft.target)??[];pn.push(Ft),F.set(Ft.target,pn)}else Ft.kind===Qn.I18nMessage&&se.set(Ft.xref,Ft);const we=new Map,We=new Map;for(const gt of v.units)for(const Ft of gt.create)if(Ft.kind===Qn.I18nMessage){if(null===Ft.messagePlaceholder){const{mainVar:pn,statements:fi}=FR(v,p,se,Ft);if(null!==Ft.i18nBlock){const _o=v.addConst(pn,fi);We.set(Ft.i18nBlock,_o)}else{v.constsInitializers.push(...fi),we.set(Ft.i18nContext,pn);const _o=l.get(Ft.i18nContext);if(void 0!==_o)for(const Po of _o)Po.expression=pn.clone()}}_r.remove(Ft)}for(const gt of v.units)for(const Ft of gt.create)if(bm(Ft)){const pn=O.get(Ft.xref);if(void 0===pn)continue;let fi=F.get(Ft.xref);if(void 0===fi)throw new Error("AssertionError: Could not find any i18n expressions associated with an I18nAttributes instruction");const _o=new Set;fi=fi.filter(Ro=>{const Rr=_o.has(Ro.name);return _o.add(Ro.name),!Rr});const Po=fi.flatMap(Ro=>{const Rr=we.get(Ro.context);if(void 0===Rr)throw new Error("AssertionError: Could not find i18n expression's value");return[no(Ro.name),Rr]});pn.i18nAttributesConfig=v.addConst(new kh(Po))}for(const gt of v.units)for(const Ft of gt.create)if(Ft.kind===Qn.I18nStart){const pn=We.get(Ft.root);if(void 0===pn)throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");Ft.messageIndex=pn}}},{kind:Zr.Tmpl,fn:function MB(v){for(const p of v.units)for(const l of p.ops())yc(l,O=>O instanceof w_?no(v.addConst(O.expr)):O,Ka.None)}},{kind:Zr.Both,fn:function JD(v){const p=new Map;for(const l of v.units)for(const O of l.create)if(O.kind===Qn.ExtractedAttribute){const F=p.get(O.target)||new TO(v.compatibility);p.set(O.target,F),F.add(O.bindingKind,O.name,O.expression,O.namespace,O.trustedValueFn),_r.remove(O)}if(v instanceof bO)for(const l of v.units)for(const O of l.create)if(O.kind==Qn.Projection){const F=p.get(O.xref);if(void 0!==F){const se=X0(F);se.entries.length>0&&(O.attributes=se)}}else bm(O)&&(O.attributes=wO(v,p,O.xref),O.kind===Qn.RepeaterCreate&&null!==O.emptyView&&(O.emptyAttributes=wO(v,p,O.emptyView)));else if(v instanceof sR)for(const[l,O]of p.entries()){if(l!==v.root.xref)throw new Error("An attribute would be const collected into the host binding's template function, but is not associated with the root xref.");const F=X0(O);F.entries.length>0&&(v.root.attributes=F)}}},{kind:Zr.Tmpl,fn:function xN(v){for(const p of v.units)for(const l of p.create)switch(l.kind){case Qn.I18nContext:_r.remove(l);break;case Qn.I18nStart:l.context=null}}},{kind:Zr.Both,fn:function dI(v){for(const p of v.units){let l=0;for(const O of p.ops())gO(O)&&(l+=x1(O));for(const O of p.ops())vd(O,F=>{Ef(F)&&(v.compatibility===gg.TemplateDefinitionBuilder&&F instanceof O_||(_B(F)&&(F.varOffset=l),gO(F)&&(l+=M2(F))))});if(v.compatibility===gg.TemplateDefinitionBuilder)for(const O of p.ops())vd(O,F=>{!Ef(F)||!(F instanceof O_)||(_B(F)&&(F.varOffset=l),gO(F)&&(l+=M2(F)))});p.vars=l}if(v instanceof bO)for(const p of v.units)for(const l of p.create){if(l.kind!==Qn.Template&&l.kind!==Qn.RepeaterCreate)continue;const O=v.views.get(l.xref);l.vars=O.vars}}},{kind:Zr.Tmpl,fn:function sA(v){for(const p of v.units){const l=new Map;for(const F of p.create)if(ay(F)){if(null===F.handle.slot)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls");l.set(F.xref,F.handle.slot)}let O=0;for(const F of p.update){let se=null;if(pO(F)?se=F:vd(F,We=>{null===se&&pO(We)&&(se=We)}),null===se)continue;if(!l.has(se.target))throw new Error(`AssertionError: reference to unknown slot for target ${se.target}`);const we=l.get(se.target);if(O!==we){const We=we-O;if(We<0)throw new Error("AssertionError: slot counter should never need to move backwards");_r.insertBefore(eR(We,se.sourceSpan),F),O=we}}}}},{kind:Zr.Both,fn:function oN(v){hx(v.root,v.componentName,{index:0},v.compatibility===gg.TemplateDefinitionBuilder)}},{kind:Zr.Tmpl,fn:function uR(v){for(const p of v.units)for(const l of p.create)if(l.kind===Qn.Defer){if(null!==l.resolverFn)continue;if(null!==l.ownResolverFn){if(null===l.handle.slot)throw new Error("AssertionError: slot must be assigned before extracting defer deps functions");const O=p.fnName?.replace("_Template","");l.resolverFn=v.pool.getSharedFunctionReference(l.ownResolverFn,`${O}_Defer_${l.handle.slot}_DepsFn`,!1)}}}},{kind:Zr.Tmpl,fn:function aN(v){for(const p of v.units){for(const l of p.create)(l.kind===Qn.Listener||l.kind===Qn.TwoWayListener)&&HR(l.handlerOps);HR(p.update)}}},{kind:Zr.Tmpl,fn:function E2(v){for(const p of v.units){const l=new Set;for(const O of p.create)O.kind===Qn.ElementStart&&"ng-container"===O.tag&&(O.kind=Qn.ContainerStart,l.add(O.xref)),O.kind===Qn.ElementEnd&&l.has(O.xref)&&(O.kind=Qn.ContainerEnd)}}},{kind:Zr.Tmpl,fn:function ox(v){for(const p of v.units)for(const l of p.create){const O=nx.get(l.kind);if(void 0===O)continue;const[F,se]=O;let we=l.prev;for(;null!==we&&ix.has(we.kind);)we=we.prev;null!==we&&we.kind===F&&(we.kind=se,_r.remove(l))}}},{kind:Zr.Tmpl,fn:function FA(v){const p=new Map;for(const l of v.units)for(const O of l.create)bm(O)&&p.set(O.xref,O);for(const l of v.units)for(const O of l.create)(O.kind===Qn.ElementStart||O.kind===Qn.ContainerStart)&&O.nonBindable&&_r.insertAfter(zD(O.xref),O),(O.kind===Qn.ElementEnd||O.kind===Qn.ContainerEnd)&&px(p,O.xref).nonBindable&&_r.insertBefore(iR(O.xref),O)}},{kind:Zr.Both,fn:function KR(v){for(const p of v.units)for(const l of p.ops())vd(l,O=>{if(!(O instanceof O_)||null===O.body)return;const F=new XR(O.args.length);O.fn=v.pool.getSharedConstant(F,O.body),O.body=null})}},{kind:Zr.Both,fn:function bx(v){for(const p of v.units)T2(p,p.create),bN(0,p.update)}},{kind:Zr.Both,fn:function cR(v){for(const p of v.units)QD(p.create),QD(p.update)}}];function sw(v,p){for(const l of k2)(l.kind===p||l.kind===Zr.Both)&&l.fn(v)}function Rd(v,p){const l=E1(v.root);return IN(v.root,p),l}function IN(v,p){for(const l of v.job.units){if(l.parent!==v.xref)continue;IN(l,p);const O=E1(l);p.statements.push(O.toDeclStmt(O.name))}}function E1(v){if(null===v.fnName)throw new Error(`AssertionError: view ${v.xref} is unnamed`);const p=[];for(const se of v.create){if(se.kind!==Qn.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${Qn[se.kind]}`);p.push(se.statement)}const l=[];for(const se of v.update){if(se.kind!==Qn.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${Qn[se.kind]}`);l.push(se.statement)}const O=aw(1,p),F=aw(2,l);return nm([new vc("rf"),new vc("ctx")],[...O,...F],void 0,void 0,v.fnName)}function aw(v,p){return 0===p.length?[]:[_b(new Ua(hs.BitwiseAnd,Xs("rf"),no(v)),p)]}const O1=gg.TemplateDefinitionBuilder,Sx=new lx,Ex="ng-template";function MN(v){return v instanceof mu}function B2(v,p,l,O){let F;const se=p.expression.ast;F=se instanceof ZC?new Md(se.strings,se.expressions.map(we=>Oa(we,v,p.sourceSpan)),[]):Oa(se,v,p.sourceSpan),v.root.update.push(xf(v.root.xref,l,p.name,F,null,O,!1,!1,null,null,p.sourceSpan))}function lw(v,p,l,O){const F=xf(v.root.xref,xs.Attribute,p,l,null,O,!0,!1,null,null,l.sourceSpan);v.root.update.push(F)}function _I(v,p){const[l,O]=p.type!==Hc.Animation?[null,p.targetOrPhase]:[p.targetOrPhase,null],F=_O(v.root.xref,new Xa,p.name,null,P1(v.root,p.handler,p.handlerSpan),l,O,!0,p.sourceSpan);v.root.create.push(F)}function Om(v,p){for(const l of p)if(l instanceof Fh)zc(v,l);else if(l instanceof mf)wz(v,l);else if(l instanceof XE)Qd(v,l);else if(l instanceof JC)T1(v,l,null);else if(l instanceof qC)kN(v,l,null);else if(l instanceof C0)D1(v,l);else if(l instanceof YL)LN(v,l);else if(l instanceof dm)cw(v,l);else if(l instanceof Lb)BN(v,l);else if(l instanceof ZT)NN(v,l);else{if(!(l instanceof OM))throw new Error(`Unsupported template node: ${l.constructor.name}`);F2(v,l)}}function zc(v,p){if(void 0!==p.i18n&&!(p.i18n instanceof mu||p.i18n instanceof dg))throw Error(`Unhandled i18n metadata type for element: ${p.i18n.constructor.name}`);const l=v.job.allocateXrefId(),[O,F]=gf(p.name),se=function $h(v,p,l,O,F,se){return{kind:Qn.ElementStart,xref:p,tag:v,handle:new Xa,attributes:null,localRefs:[],nonBindable:!1,namespace:l,i18nPlaceholder:O,startSourceSpan:F,wholeSourceSpan:se,...mg,...ua}}(F,l,OO(O),p.i18n instanceof dg?p.i18n:void 0,p.startSourceSpan,p.sourceSpan);v.create.push(se),function VN(v,p,l){let O=new Array,F=new Set;for(const se of l.attributes){const we=Sx.securityContext(l.name,se.name,!0);O.push(xf(p.xref,xs.Attribute,se.name,A1(v.job,se.value,se.i18n),null,we,!0,!1,null,wm(se.i18n),se.sourceSpan)),se.i18n&&F.add(se.name)}for(const se of l.inputs)F.has(se.name)&&console.error(`On component ${v.job.componentName}, the binding ${se.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`),O.push(xf(p.xref,FN.get(se.type),se.name,A1(v.job,dw(se.value),se.i18n),se.unit,se.securityContext,!1,!1,null,wm(se.i18n)??null,se.sourceSpan));v.create.push(O.filter(se=>se?.kind===Qn.ExtractedAttribute)),v.update.push(O.filter(se=>se?.kind===Qn.Binding));for(const se of l.outputs){if(se.type===Hc.Animation&&null===se.phase)throw Error("Animation listener should have a phase");v.create.push(se.type===Hc.TwoWay?W0(p.xref,p.handle,se.name,p.tag,UN(v,se.handler,se.handlerSpan),se.sourceSpan):_O(p.xref,p.handle,se.name,p.tag,P1(v,se.handler,se.handlerSpan),se.phase,se.target,!1,se.sourceSpan))}null!==O.some(se=>se?.i18nMessage)&&v.create.push(Qb(v.job.allocateXrefId(),new Xa,p.xref))}(v,se,p),zN(se,p);let we=null;p.i18n instanceof mu&&(we=v.job.allocateXrefId(),v.create.push(dy(we,p.i18n,void 0,p.startSourceSpan))),Om(v,p.children);const We=function G0(v,p){return{kind:Qn.ElementEnd,xref:v,sourceSpan:p,...ua}}(l,p.endSourceSpan??p.startSourceSpan);v.create.push(We),null!==we&&_r.insertBefore(CO(we,p.endSourceSpan??p.startSourceSpan),We)}function wz(v,p){if(void 0!==p.i18n&&!(p.i18n instanceof mu||p.i18n instanceof dg))throw Error(`Unhandled i18n metadata type for template: ${p.i18n.constructor.name}`);const l=v.job.allocateView(v.xref);let O=p.tagName,F="";p.tagName&&([F,O]=gf(p.tagName));const se=p.i18n instanceof dg?p.i18n:void 0,we=OO(F),We=null===O?"":function wu(v,p){return p===ic.HTML?v:`:${function D_(v){const p=new Map([["svg",ic.SVG],["math",ic.Math]]);for(const[l,O]of p.entries())if(O===v)return l;return null}(p)}:${v}`}(O,we),gt=function I1(v){return gf(v.tagName??"")[1]===Ex}(p)?gl.NgTemplate:gl.Structural,Ft=Zb(l.xref,gt,O,We,we,se,p.startSourceSpan,p.sourceSpan);v.create.push(Ft),function HN(v,p,l,O){let F=new Array;for(const se of l.templateAttrs)if(se instanceof zE){const we=Sx.securityContext(Ex,se.name,!0);F.push(Dy(v,p.xref,pl.Attribute,se.name,se.value,null,we,!0,O,wm(se.i18n),se.sourceSpan))}else F.push(Dy(v,p.xref,se.type,se.name,dw(se.value),se.unit,se.securityContext,!0,O,wm(se.i18n),se.sourceSpan));for(const se of l.attributes){const we=Sx.securityContext(Ex,se.name,!0);F.push(Dy(v,p.xref,pl.Attribute,se.name,se.value,null,we,!1,O,wm(se.i18n),se.sourceSpan))}for(const se of l.inputs)F.push(Dy(v,p.xref,se.type,se.name,dw(se.value),se.unit,se.securityContext,!1,O,wm(se.i18n),se.sourceSpan));v.create.push(F.filter(se=>se?.kind===Qn.ExtractedAttribute)),v.update.push(F.filter(se=>se?.kind===Qn.Binding));for(const se of l.outputs){if(se.type===Hc.Animation&&null===se.phase)throw Error("Animation listener should have a phase");if(O===gl.NgTemplate&&v.create.push(se.type===Hc.TwoWay?W0(p.xref,p.handle,se.name,p.tag,UN(v,se.handler,se.handlerSpan),se.sourceSpan):_O(p.xref,p.handle,se.name,p.tag,P1(v,se.handler,se.handlerSpan),se.phase,se.target,!1,se.sourceSpan)),O===gl.Structural&&se.type!==Hc.Animation){const we=Sx.securityContext(Ex,se.name,!1);v.create.push(Xu(p.xref,xs.Property,null,se.name,null,null,null,we))}}null!==F.some(se=>se?.i18nMessage)&&v.create.push(Qb(v.job.allocateXrefId(),new Xa,p.xref))}(v,Ft,p,gt),zN(Ft,p),Om(l,p.children);for(const{name:pn,value:fi}of p.variables)l.contextVariables.set(pn,""!==fi?fi:"$implicit");if(gt===gl.NgTemplate&&p.i18n instanceof mu){const pn=v.job.allocateXrefId();_r.insertAfter(dy(pn,p.i18n,void 0,p.startSourceSpan),l.create.head),_r.insertBefore(CO(pn,p.endSourceSpan??p.startSourceSpan),l.create.tail)}}function Qd(v,p){if(void 0!==p.i18n&&!(p.i18n instanceof dg))throw Error(`Unhandled i18n metadata type for element: ${p.i18n.constructor.name}`);let l=null;p.children.some(se=>!(se instanceof _0||se instanceof JC&&!(se.value.trim().length>0)))&&(l=v.job.allocateView(v.xref),Om(l,p.children));const F=function Tp(v,p,l,O,F){return{kind:Qn.Projection,xref:v,handle:new Xa,selector:p,i18nPlaceholder:l,fallbackView:O,projectionSlotIndex:0,attributes:null,localRefs:[],sourceSpan:F,...ua,...mg,numSlotsUsed:null===O?1:2}}(v.job.allocateXrefId(),p.selector,p.i18n,l?.xref??null,p.sourceSpan);for(const se of p.attributes){const we=Sx.securityContext(p.name,se.name,!0);v.update.push(xf(F.xref,xs.Attribute,se.name,no(se.value),null,we,!0,!1,null,wm(se.i18n),se.sourceSpan))}v.create.push(F)}function T1(v,p,l){v.create.push(oR(v.job.allocateXrefId(),p.value,l,p.sourceSpan))}function kN(v,p,l){let O=p.value;if(O instanceof hh&&(O=O.ast),!(O instanceof ZC))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${O.constructor.name}`);if(void 0!==p.i18n&&!(p.i18n instanceof cg))throw Error(`Unhandled i18n metadata type for text interpolation: ${p.i18n?.constructor.name}`);const F=p.i18n instanceof cg?p.i18n.children.filter(We=>We instanceof um).map(We=>We.name):[];if(F.length>0&&F.length!==O.expressions.length)throw Error(`Unexpected number of i18n placeholders (${O.expressions.length}) for BoundText with ${O.expressions.length} expressions`);const se=v.job.allocateXrefId();v.create.push(oR(se,"",l,p.sourceSpan));const we=v.job.compatibility?null:p.sourceSpan;v.update.push(function vB(v,p,l){return{kind:Qn.InterpolateText,target:v,interpolation:p,sourceSpan:l,...Uh,...zh,...ua}}(se,new Md(O.strings,O.expressions.map(We=>Oa(We,v.job,we)),F),p.sourceSpan))}function D1(v,p){let l=null,O=[];for(let F=0;F<p.branches.length;F++){const se=p.branches[F],we=v.job.allocateView(v.xref),We=uw(v,we.xref,se);let gt;if(null!==se.expressionAlias&&we.contextVariables.set(se.expressionAlias.name,jD),void 0!==se.i18n){if(!(se.i18n instanceof __))throw Error(`Unhandled i18n metadata type for if block: ${se.i18n?.constructor.name}`);gt=se.i18n}const Ft=Zb(we.xref,gl.Block,We,"Conditional",ic.HTML,gt,se.startSourceSpan,se.sourceSpan);v.create.push(Ft),null===l&&(l=we.xref);const pn=se.expression?Oa(se.expression,v.job,null):null,fi=new ym(pn,Ft.xref,Ft.handle,se.expressionAlias);O.push(fi),Om(we,se.children)}v.update.push(fO(l,null,O,p.sourceSpan))}function LN(v,p){if(0===p.cases.length)return;let l=null,O=[];for(const F of p.cases){const se=v.job.allocateView(v.xref),we=uw(v,se.xref,F);let We;if(void 0!==F.i18n){if(!(F.i18n instanceof __))throw Error(`Unhandled i18n metadata type for switch block: ${F.i18n?.constructor.name}`);We=F.i18n}const gt=Zb(se.xref,gl.Block,we,"Case",ic.HTML,We,F.startSourceSpan,F.sourceSpan);v.create.push(gt),null===l&&(l=se.xref);const Ft=F.expression?Oa(F.expression,v.job,p.startSourceSpan):null,pn=new ym(Ft,gt.xref,gt.handle);O.push(pn),Om(se,F.children)}v.update.push(fO(l,Oa(p.expression,v.job,null),O,p.sourceSpan))}function sC(v,p,l,O,F){if(void 0!==l&&!(l instanceof __))throw Error("Unhandled i18n metadata type for defer block");if(void 0===O)return null;const se=v.job.allocateView(v.xref);Om(se,O);const we=Zb(se.xref,gl.Block,null,`Defer${p}`,ic.HTML,l,F,F);return v.create.push(we),we}function cw(v,p){let l=null;if(0===v.job.deferMeta.mode){if(!v.job.deferMeta.blocks.has(p))throw new Error("AssertionError: unable to find a dependency function for this deferred block");l=v.job.deferMeta.blocks.get(p)??null}const O=sC(v,"",p.i18n,p.children,p.sourceSpan),F=sC(v,"Loading",p.loading?.i18n,p.loading?.children,p.loading?.sourceSpan),se=sC(v,"Placeholder",p.placeholder?.i18n,p.placeholder?.children,p.placeholder?.sourceSpan),we=sC(v,"Error",p.error?.i18n,p.error?.children,p.error?.sourceSpan),We=v.job.allocateXrefId(),gt=function vO(v,p,l,O,F,se){return{kind:Qn.Defer,xref:v,handle:new Xa,mainView:p,mainSlot:l,loadingView:null,loadingSlot:null,loadingConfig:null,loadingMinimumTime:null,loadingAfterTime:null,placeholderView:null,placeholderSlot:null,placeholderConfig:null,placeholderMinimumTime:null,errorView:null,errorSlot:null,ownResolverFn:O,resolverFn:F,sourceSpan:se,...ua,...mg,numSlotsUsed:2}}(We,O.xref,O.handle,l,v.job.allDeferrableDepsFn,p.sourceSpan);gt.placeholderView=se?.xref??null,gt.placeholderSlot=se?.handle??null,gt.loadingSlot=F?.handle??null,gt.errorSlot=we?.handle??null,gt.placeholderMinimumTime=p.placeholder?.minimumTime??null,gt.loadingMinimumTime=p.loading?.minimumTime??null,gt.loadingAfterTime=p.loading?.afterTime??null,v.create.push(gt);let Ft=!1,pn=[],fi=[];for(const _o of[p.triggers,p.prefetchTriggers]){if(void 0!==_o.idle){const Po=Eu(We,{kind:xl.Idle},Ft,_o.idle.sourceSpan);pn.push(Po)}if(void 0!==_o.immediate){const Po=Eu(We,{kind:xl.Immediate},Ft,_o.immediate.sourceSpan);pn.push(Po)}if(void 0!==_o.timer){const Po=Eu(We,{kind:xl.Timer,delay:_o.timer.delay},Ft,_o.timer.sourceSpan);pn.push(Po)}if(void 0!==_o.hover){const Po=Eu(We,{kind:xl.Hover,targetName:_o.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},Ft,_o.hover.sourceSpan);pn.push(Po)}if(void 0!==_o.interaction){const Po=Eu(We,{kind:xl.Interaction,targetName:_o.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},Ft,_o.interaction.sourceSpan);pn.push(Po)}if(void 0!==_o.viewport){const Po=Eu(We,{kind:xl.Viewport,targetName:_o.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},Ft,_o.viewport.sourceSpan);pn.push(Po)}if(void 0!==_o.when){if(_o.when.value instanceof ZC)throw new Error("Unexpected interpolation in defer block when trigger");const Po=s2(We,Oa(_o.when.value,v.job,_o.when.sourceSpan),Ft,_o.when.sourceSpan);fi.push(Po)}0===pn.length&&0===fi.length&&pn.push(Eu(We,{kind:xl.Idle},!1,null)),Ft=!0}v.create.push(pn),v.update.push(fi)}function BN(v,p){if(!(p.i18n instanceof mu&&function w1(v){return MN(v)&&1===v.nodes.length&&v.nodes[0]instanceof m_}(p.i18n)))throw Error(`Unhandled i18n metadata type for ICU: ${p.i18n?.constructor.name}`);{const l=v.job.allocateXrefId();v.create.push(function SB(v,p,l,O){return{kind:Qn.IcuStart,xref:v,message:p,messagePlaceholder:l,context:null,sourceSpan:O,...ua}}(l,p.i18n,x0(p.i18n).name,null));for(const[O,F]of Object.entries({...p.vars,...p.placeholders}))F instanceof qC?kN(v,F,O):T1(v,F,O);v.create.push(function a2(v){return{kind:Qn.IcuEnd,xref:v,...ua}}(l))}}function NN(v,p){const l=v.job.allocateView(v.xref),O=`\u0275$index_${l.xref}`,F=`\u0275$count_${l.xref}`,se=new Set;l.contextVariables.set(p.item.name,p.item.value);for(const cr of p.contextVariables)"$index"===cr.value&&se.add(cr.name),"$index"===cr.name?l.contextVariables.set("$index",cr.value).set(O,cr.value):"$count"===cr.name?l.contextVariables.set("$count",cr.value).set(F,cr.value):l.aliases.add({kind:yu.Alias,name:null,identifier:cr.name,expression:N2(cr,O,F)});const we=Au(p.trackBy.span,p.sourceSpan),We=Oa(p.trackBy,v.job,we);Om(l,p.children);let gt=null,Ft=null;null!==p.empty&&(gt=v.job.allocateView(v.xref),Om(gt,p.empty.children),Ft=uw(v,gt.xref,p.empty));const pn={$index:se,$implicit:p.item.name};if(void 0!==p.i18n&&!(p.i18n instanceof __))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(void 0!==p.empty?.i18n&&!(p.empty.i18n instanceof __))throw Error("AssertionError: Unhandled i18n metadata type or @empty");const fi=p.i18n,_o=p.empty?.i18n,Po=uw(v,l.xref,p),Ro=function nR(v,p,l,O,F,se,we,We,gt,Ft){return{kind:Qn.RepeaterCreate,attributes:null,xref:v,handle:new Xa,emptyView:p,track:O,trackByFn:null,tag:l,emptyTag:se,emptyAttributes:null,functionNameSuffix:"For",namespace:ic.HTML,nonBindable:!1,localRefs:[],decls:null,vars:null,varNames:F,usesComponentInstance:!1,i18nPlaceholder:we,emptyI18nPlaceholder:We,startSourceSpan:gt,wholeSourceSpan:Ft,...mg,...ua,...zh,numSlotsUsed:null===p?2:3}}(l.xref,gt?.xref??null,Po,We,pn,Ft,fi,_o,p.startSourceSpan,p.sourceSpan);v.create.push(Ro);const Rr=Oa(p.expression,v.job,Au(p.expression.span,p.sourceSpan)),br=function xB(v,p,l,O){return{kind:Qn.Repeater,target:v,targetSlot:p,collection:l,sourceSpan:O,...ua,...Uh}}(Ro.xref,Ro.handle,Rr,p.sourceSpan);v.update.push(br)}function N2(v,p,l){switch(v.value){case"$index":return new wl(p);case"$count":return new wl(l);case"$first":return new wl(p).identical(no(0));case"$last":return new wl(p).identical(new wl(l).minus(no(1)));case"$even":return new wl(p).modulo(no(2)).identical(no(0));case"$odd":return new wl(p).modulo(no(2)).notIdentical(no(0));default:throw new Error(`AssertionError: unknown @for loop variable ${v.value}`)}}function F2(v,p){const l=v.job.allocateXrefId();v.create.push(function j0(v,p,l){return{kind:Qn.DeclareLet,xref:v,declaredName:p,sourceSpan:l,handle:new Xa,...mg,...ua}}(l,p.name,p.sourceSpan)),v.update.push(function $v(v,p,l,O){return{kind:Qn.StoreLet,target:v,declaredName:p,value:l,sourceSpan:O,...Uh,...zh,...ua}}(l,p.name,Oa(p.value,v.job,p.valueSpan),p.sourceSpan))}function Oa(v,p,l){if(v instanceof hh)return Oa(v.ast,p,l);if(v instanceof YC)return v.receiver instanceof fu&&!(v.receiver instanceof g0)||v.receiver instanceof g0&&"$any"!==v.name&&"$event"!==v.name?new wl(v.name):new du(Oa(v.receiver,p,l),v.name,null,Au(v.span,l));if(v instanceof BE)return v.receiver instanceof fu?new s_(new vm(p.root.xref),v.name,Oa(v.value,p,l),null,Au(v.span,l)):new s_(Oa(v.receiver,p,l),v.name,Oa(v.value,p,l),void 0,Au(v.span,l));if(v instanceof lg)return new r_(Oa(v.receiver,p,l),Oa(v.key,p,l),Oa(v.value,p,l),void 0,Au(v.span,l));if(v instanceof Db){if(v.receiver instanceof fu)throw new Error("Unexpected ImplicitReceiver");return new _c(Oa(v.receiver,p,l),v.args.map(O=>Oa(O,p,l)),void 0,Au(v.span,l))}if(v instanceof am)return no(v.value,void 0,Au(v.span,l));if(!(v instanceof hf)){if(v instanceof Gu){const O=dR.get(v.operation);if(void 0===O)throw new Error(`AssertionError: unknown binary operator ${v.operation}`);return new Ua(O,Oa(v.left,p,l),Oa(v.right,p,l),void 0,Au(v.span,l))}if(v instanceof g0)return new vm(p.root.xref);if(v instanceof Tb)return new ag(Oa(v.receiver,p,l),Oa(v.key,p,l),void 0,Au(v.span,l));if(v instanceof vp)throw new Error("AssertionError: Chain in unknown context");if(v instanceof FE){const O=v.keys.map((F,se)=>new em(F.key,Oa(v.values[se],p,l),F.quoted));return new uu(O,void 0,Au(v.span,l))}if(v instanceof $T)return new kh(v.expressions.map(O=>Oa(O,p,l)));if(v instanceof Rv)return new Mh(Oa(v.condition,p,l),Oa(v.trueExp,p,l),Oa(v.falseExp,p,l),void 0,Au(v.span,l));if(v instanceof QC)return Oa(v.expression,p,l);if(v instanceof f0)return new jv(p.allocateXrefId(),new Xa,v.name,[Oa(v.exp,p,l),...v.args.map(O=>Oa(O,p,l))]);if(v instanceof NE)return new Su(Oa(v.receiver,p,l),Oa(v.key,p,l),Au(v.span,l));if(v instanceof WT)return new Wh(Oa(v.receiver,p,l),v.name);if(v instanceof Ab)return new Xd(Oa(v.receiver,p,l),v.args.map(O=>Oa(O,p,l)));if(v instanceof gu)return new fh(Au(v.span,l));if(v instanceof m0)return function mb(v,p){return new pb(v,p)}(Oa(v.expression,p,l),Au(v.span,l));throw new Error(`Unhandled expression type "${v.constructor.name}" in file "${l?.start.file.url}"`)}switch(v.operator){case"+":return new d_(wv.Plus,Oa(v.expr,p,l),void 0,Au(v.span,l));case"-":return new d_(wv.Minus,Oa(v.expr,p,l),void 0,Au(v.span,l));default:throw new Error(`AssertionError: unknown unary operator ${v.operator}`)}}function A1(v,p,l,O){let F;return F=p instanceof ZC?new Md(p.strings,p.expressions.map(se=>Oa(se,v,O??null)),Object.keys(wm(l)?.placeholders??{})):p instanceof Dc?Oa(p,v,O??null):no(p),F}const FN=new Map([[pl.Property,xs.Property],[pl.TwoWay,xs.TwoWayProperty],[pl.Attribute,xs.Attribute],[pl.Class,xs.ClassName],[pl.Style,xs.StyleProperty],[pl.Animation,xs.Animation]]);function wm(v){if(null==v)return null;if(!(v instanceof mu))throw Error(`Expected i18n meta to be a Message, but got: ${v.constructor.name}`);return v}function Dy(v,p,l,O,F,se,we,We,gt,Ft,pn){const fi="string"==typeof F;if(gt===gl.Structural){if(!We)switch(l){case pl.Property:case pl.Class:case pl.Style:return Xu(p,xs.Property,null,O,null,null,Ft,we);case pl.TwoWay:return Xu(p,xs.TwoWayProperty,null,O,null,null,Ft,we)}if(!fi&&(l===pl.Attribute||l===pl.Animation))return null}let _o=FN.get(l);return gt===gl.NgTemplate&&(l===pl.Class||l===pl.Style||l===pl.Attribute&&!fi)&&(_o=xs.Property),xf(p,_o,O,A1(v.job,F,Ft),se,we,fi,We,gt,Ft,pn)}function P1(v,p,l){p=dw(p);const O=new Array;let F=p instanceof vp?p.expressions:[p];if(0===F.length)throw new Error("Expected listener to have non-empty expression list.");const se=F.map(We=>Oa(We,v.job,l)),we=se.pop();return O.push(...se.map(We=>bf(new hu(We,We.sourceSpan)))),O.push(bf(new pu(we,we.sourceSpan))),O}function UN(v,p,l){p=dw(p);const O=new Array;if(p instanceof vp){if(1!==p.expressions.length)throw new Error("Expected two-way listener to have a single expression.");p=p.expressions[0]}const F=Oa(p,v.job,l),se=new wl("$event"),we=new Cc(F,se);return O.push(bf(new hu(we))),O.push(bf(new pu(se))),O}function dw(v){return v instanceof hh?v.ast:v}function zN(v,p){!function V2(v){if(!Array.isArray(v))throw new Error("AssertionError: expected an array")}(v.localRefs);for(const{name:l,value:O}of p.references)v.localRefs.push({name:l,target:O})}function Au(v,p){if(null===p)return null;const l=p.start.moveBy(v.start),O=p.start.moveBy(v.end),F=p.fullStart.moveBy(v.start);return new Ws(l,O,F)}function uw(v,p,l){let O=null;for(const F of l.children)if(!(F instanceof _0)){if(null!==O)return null;(F instanceof Fh||F instanceof mf&&null!==F.tagName)&&(O=F)}if(null!==O){for(const se of O.attributes){const we=Sx.securityContext(Ex,se.name,!0);v.update.push(xf(p,xs.Attribute,se.name,no(se.value),null,we,!0,!1,null,wm(se.i18n),se.sourceSpan))}for(const se of O.inputs)if(se.type!==pl.Animation&&se.type!==pl.Attribute){const we=Sx.securityContext(Ex,se.name,!0);v.create.push(Xu(p,xs.Property,null,se.name,null,null,null,we))}const F=O instanceof Fh?O.name:O.tagName;return F===Ex?null:F}return null}function bg(v,p){return _b(Xs(aD).bitwiseAnd(no(v),null,!1),p)}function Af(v,p,l,O){const F=[];return void 0!==O&&F.push(...O),v.isSignal&&F.push(new du(Xs(ny),v.propertyName)),F.push(function M1(v,p){if(Array.isArray(v.predicate)){let l=[];return v.predicate.forEach(O=>{const F=O.split(",").map(se=>no(se.trim()));l.push(...F)}),p.getConstLiteral(Ns(l),!0)}switch(v.predicate.forwardRef){case 0:case 2:return v.predicate.expression;case 1:return kr(Bi.resolveForwardRef).callFn([v.predicate.expression])}}(v,p),no(function GN(v){return(v.descendants?1:0)|(v.static?2:0)|(v.emitDistinctChangesOnly?4:0)}(v))),v.read&&F.push(v.read),kr(v.isSignal?l.signalBased:l.nonSignal).callFn(F)}const Ay=Symbol("queryAdvancePlaceholder");function aC(v){const p=[];let l=0;const O=()=>{l>0&&(p.unshift(kr(Bi.queryAdvance).callFn(1===l?[]:[no(l)]).toStmt()),l=0)};for(let F=v.length-1;F>=0;F--){const se=v[F];se===Ay?l++:(O(),p.unshift(se))}return O(),p}class If extends IR{constructor(){super(CA)}parse(p,l,O){return super.parse(p,l,O)}}const $N="ngPreserveWhitespaces",R1=new Set(["pre","template","textarea","script","style"]),hw=" \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff",td=new RegExp(`[^${hw}]`),z_=new RegExp(`[${hw}]{2,}`,"g");function SS(v){return v.replace(new RegExp(R_,"g")," ")}class Iy{visitElement(p,l){return R1.has(p.name)||function lC(v){return v.some(p=>p.name===$N)}(p.attrs)?new _h(p.name,Ps(this,p.attrs),p.children,p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.i18n):new _h(p.name,p.attrs,Py(this,p.children),p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.i18n)}visitAttribute(p,l){return p.name!==$N?p:null}visitText(p,l){if(p.value.match(td)||l&&(l.prev instanceof RO||l.next instanceof RO)){const se=p.tokens.map(We=>5===We.type?function Zu({type:v,parts:p,sourceSpan:l}){return{type:v,parts:[Ox(p[0])],sourceSpan:l}}(We):We),we=Ox(p.value);return new tS(we,p.sourceSpan,se,p.i18n)}return null}visitComment(p,l){return p}visitExpansion(p,l){return p}visitExpansionCase(p,l){return p}visitBlock(p,l){return new P_(p.name,p.parameters,Py(this,p.children),p.sourceSpan,p.nameSpan,p.startSourceSpan,p.endSourceSpan)}visitBlockParameter(p,l){return p}visitLetDeclaration(p,l){return p}}function Ox(v){return SS(v).replace(z_," ")}function Py(v,p){const l=[];return p.forEach((O,F)=>{const we=O.visit(v,{prev:p[F-1],next:p[F+1]});we&&l.push(we)}),l}class cC{constructor(p,l,O,F,se=!1){this._exprParser=p,this._interpolationConfig=l,this._schemaRegistry=O,this.errors=F,this._allowInvalidAssignmentEvents=se}get interpolationConfig(){return this._interpolationConfig}createBoundHostProperties(p,l){const O=[];for(const F of Object.keys(p)){const se=p[F];"string"==typeof se?this.parsePropertyBinding(F,se,!0,!1,l,l.start.offset,void 0,[],O,l):this._reportError(`Value of the host property binding "${F}" needs to be a string representing an expression but got "${se}" (${typeof se})`,l)}return O}createDirectiveHostEventAsts(p,l){const O=[];for(const F of Object.keys(p)){const se=p[F];"string"==typeof se?this.parseEvent(F,se,!1,l,l,[],O,l):this._reportError(`Value of the host listener "${F}" needs to be a string representing an expression but got "${se}" (${typeof se})`,l)}return O}parseInterpolation(p,l,O){const F=l.start.toString(),se=l.fullStart.offset;try{const we=this._exprParser.parseInterpolation(p,F,se,O,this._interpolationConfig);return we&&this._reportExpressionParserErrors(we.errors,l),we}catch(we){return this._reportError(`${we}`,l),this._exprParser.wrapLiteralPrimitive("ERROR",F,se)}}parseInterpolationExpression(p,l){const O=l.start.toString(),F=l.start.offset;try{const se=this._exprParser.parseInterpolationExpression(p,O,F);return se&&this._reportExpressionParserErrors(se.errors,l),se}catch(se){return this._reportError(`${se}`,l),this._exprParser.wrapLiteralPrimitive("ERROR",O,F)}}parseInlineTemplateBinding(p,l,O,F,se,we,We,gt){const pn=this._parseTemplateBindings(p,l,O,O.start.offset+1,F);for(const fi of pn){const _o=Ap(O,fi.sourceSpan),Po=fi.key.source,Ro=Ap(O,fi.key.span);if(fi instanceof pf){const Rr=fi.value?fi.value.source:"$implicit",br=fi.value?Ap(O,fi.value.span):void 0;We.push(new VE(Po,Rr,_o,Ro,br))}else if(fi.value){const Rr=gt?_o:O,br=Ap(O,fi.value.ast.sourceSpan);this._parsePropertyAst(Po,fi.value,!1,Rr,Ro,br,se,we)}else se.push([Po,""]),this.parseLiteralAttr(Po,null,Ro,F,void 0,se,we,Ro)}}_parseTemplateBindings(p,l,O,F,se){const we=O.start.toString();try{const We=this._exprParser.parseTemplateBindings(p,l,we,F,se);return this._reportExpressionParserErrors(We.errors,O),We.warnings.forEach(gt=>{this._reportError(gt,O,_m.WARNING)}),We.templateBindings}catch(We){return this._reportError(`${We}`,O),[]}}parseLiteralAttr(p,l,O,F,se,we,We,gt){Ch(p)?(p=p.substring(1),void 0!==gt&&(gt=Ap(gt,new uh(gt.start.offset+1,gt.end.offset))),l&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',O,_m.ERROR),this._parseAnimation(p,l,O,F,gt,se,we,We)):We.push(new lm(p,this._exprParser.wrapLiteralPrimitive(l,"",F),g_.LITERAL_ATTR,O,gt,se))}parsePropertyBinding(p,l,O,F,se,we,We,gt,Ft,pn){0===p.length&&this._reportError("Property name is missing in binding",se);let fi=!1;p.startsWith("animate-")?(fi=!0,p=p.substring(8),void 0!==pn&&(pn=Ap(pn,new uh(pn.start.offset+8,pn.end.offset)))):Ch(p)&&(fi=!0,p=p.substring(1),void 0!==pn&&(pn=Ap(pn,new uh(pn.start.offset+1,pn.end.offset)))),fi?this._parseAnimation(p,l,se,we,pn,We,gt,Ft):this._parsePropertyAst(p,this.parseBinding(l,O,We||se,we),F,se,pn,We,gt,Ft)}parsePropertyInterpolation(p,l,O,F,se,we,We,gt){const Ft=this.parseInterpolation(l,F||O,gt);return!!Ft&&(this._parsePropertyAst(p,Ft,!1,O,We,F,se,we),!0)}_parsePropertyAst(p,l,O,F,se,we,We,gt){We.push([p,l.source]),gt.push(new lm(p,l,O?g_.TWO_WAY:g_.DEFAULT,F,se,we))}_parseAnimation(p,l,O,F,se,we,We,gt){0===p.length&&this._reportError("Animation trigger is missing",O);const Ft=this.parseBinding(l||"undefined",!1,we||O,F);We.push([p,Ft.source]),gt.push(new lm(p,Ft,g_.ANIMATION,O,se,we))}parseBinding(p,l,O,F){const se=(O&&O.start||"(unknown)").toString();try{const we=l?this._exprParser.parseSimpleBinding(p,se,F,this._interpolationConfig):this._exprParser.parseBinding(p,se,F,this._interpolationConfig);return we&&this._reportExpressionParserErrors(we.errors,O),we}catch(we){return this._reportError(`${we}`,O),this._exprParser.wrapLiteralPrimitive("ERROR",se,F)}}createBoundElementProperty(p,l,O=!1,F=!0){if(l.isAnimation)return new kv(l.name,pl.Animation,Ml.NONE,l.expression,null,l.sourceSpan,l.keySpan,l.valueSpan);let we,se=null,We=null;const gt=l.name.split(".");let Ft;if(gt.length>1)if("attr"==gt[0]){We=gt.slice(1).join("."),O||this._validatePropertyOrAttributeName(We,l.sourceSpan,!0),Ft=My(this._schemaRegistry,p,We,!0);const pn=We.indexOf(":");if(pn>-1){const fi=We.substring(0,pn),_o=We.substring(pn+1);We=YT(fi,_o)}we=pl.Attribute}else"class"==gt[0]?(We=gt[1],we=pl.Class,Ft=[Ml.NONE]):"style"==gt[0]&&(se=gt.length>2?gt[2]:null,We=gt[1],we=pl.Style,Ft=[Ml.STYLE]);if(null===We){const pn=this._schemaRegistry.getMappedPropName(l.name);We=F?pn:l.name,Ft=My(this._schemaRegistry,p,pn,!1),we=l.type===g_.TWO_WAY?pl.TwoWay:pl.Property,O||this._validatePropertyOrAttributeName(pn,l.sourceSpan,!1)}return new kv(We,we,Ft[0],l.expression,se,l.sourceSpan,l.keySpan,l.valueSpan)}parseEvent(p,l,O,F,se,we,We,gt){0===p.length&&this._reportError("Event name is missing in binding",F),Ch(p)?(p=p.slice(1),void 0!==gt&&(gt=Ap(gt,new uh(gt.start.offset+1,gt.end.offset))),this._parseAnimationEvent(p,l,F,se,We,gt)):this._parseRegularEvent(p,l,O,F,se,we,We,gt)}calcPossibleSecurityContexts(p,l,O){const F=this._schemaRegistry.getMappedPropName(l);return My(this._schemaRegistry,p,F,O)}_parseAnimationEvent(p,l,O,F,se,we){const We=function BT(v,p){return c0(v,".",p)}(p,[p,""]),gt=We[0],Ft=We[1].toLowerCase(),pn=this._parseAction(l,F);se.push(new cm(gt,Ft,Hc.Animation,pn,O,F,we)),0===gt.length&&this._reportError("Animation event name is missing in binding",O),Ft?"start"!==Ft&&"done"!==Ft&&this._reportError(`The provided animation output phase value "${Ft}" for "@${gt}" is not supported (use start or done)`,O):this._reportError(`The animation trigger output event (@${gt}) is missing its phase value name (start or done are currently supported)`,O)}_parseRegularEvent(p,l,O,F,se,we,We,gt){const[Ft,pn]=function Lh(v,p){return c0(v,":",p)}(p,[null,p]),fi=this.errors.length,_o=this._parseAction(l,se),Po=this.errors.length===fi;we.push([p,_o.source]),O&&Po&&!this._isAllowedAssignmentEvent(_o)&&this._reportError("Unsupported expression in a two-way binding",F),We.push(new cm(pn,Ft,O?Hc.TwoWay:Hc.Regular,_o,F,se,gt))}_parseAction(p,l){const O=(l&&l.start||"(unknown").toString(),F=l&&l.start?l.start.offset:0;try{const se=this._exprParser.parseAction(p,O,F,this._interpolationConfig);return se&&this._reportExpressionParserErrors(se.errors,l),!se||se.ast instanceof gu?(this._reportError("Empty expressions are not allowed",l),this._exprParser.wrapLiteralPrimitive("ERROR",O,F)):se}catch(se){return this._reportError(`${se}`,l),this._exprParser.wrapLiteralPrimitive("ERROR",O,F)}}_reportError(p,l,O=_m.ERROR){this.errors.push(new ea(l,p,O))}_reportExpressionParserErrors(p,l){for(const O of p)this._reportError(O.message,l)}_validatePropertyOrAttributeName(p,l,O){const F=O?this._schemaRegistry.validateAttribute(p):this._schemaRegistry.validateProperty(p);F.error&&this._reportError(F.msg,l,_m.ERROR)}_isAllowedAssignmentEvent(p){return p instanceof hh?this._isAllowedAssignmentEvent(p.ast):p instanceof QC?this._isAllowedAssignmentEvent(p.expression):p instanceof YC||p instanceof Tb||!!this._allowInvalidAssignmentEvents&&(p instanceof Gu?("&&"===p.operation||"||"===p.operation||"??"===p.operation)&&(p.right instanceof YC||p.right instanceof Tb):p instanceof Rv||p instanceof m0)}}function Ch(v){return"@"==v[0]}function My(v,p,l,O){const F=[];return i_.parse(p).forEach(se=>{const we=se.element?[se.element]:v.allKnownElementNames(),We=new Set(se.notSelectors.filter(Ft=>Ft.isElementSelector()).map(Ft=>Ft.element)),gt=we.filter(Ft=>!We.has(Ft));F.push(...gt.map(Ft=>v.securityContext(Ft,l,O)))}),0===F.length?[Ml.NONE]:Array.from(new Set(F)).sort()}function Ap(v,p){const l=p.start-v.start.offset,O=p.end-v.end.offset;return new Ws(v.start.moveBy(l),v.end.moveBy(O),v.fullStart.moveBy(l),v.details)}const KN=/^([^:/?#]+):/;function QN(v){let p=null,l=null,O=null,F=!1,se="";v.attrs.forEach(gt=>{const Ft=gt.name.toLowerCase();"select"==Ft?p=gt.value:"href"==Ft?l=gt.value:"rel"==Ft?O=gt.value:"ngNonBindable"==gt.name?F=!0:"ngProjectAs"==gt.name&&gt.value.length>0&&(se=gt.value)}),p=function z2(v){return null===v||0===v.length?"*":v}(p);const we=v.name.toLowerCase();let We=Pf.OTHER;return HE(we)?We=Pf.NG_CONTENT:"style"==we?We=Pf.STYLE:"script"==we?We=Pf.SCRIPT:"link"==we&&"stylesheet"==O&&(We=Pf.STYLESHEET),new V1(We,p,l,F,se)}var Pf=function(v){return v[v.NG_CONTENT=0]="NG_CONTENT",v[v.STYLE=1]="STYLE",v[v.STYLESHEET=2]="STYLESHEET",v[v.SCRIPT=3]="SCRIPT",v[v.OTHER=4]="OTHER",v}(Pf||{});class V1{constructor(p,l,O,F,se){this.type=p,this.selectAttr=l,this.hrefAttr=O,this.nonBindable=F,this.projectAs=se}}const JN=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,H1=/^track\s+([\S\s]*)/,U1=/^(as\s)+(.*)/,z1=/^else[^\S\r\n]+if/,wS=/^let\s+([\S\s]*)/,G2=/(\s*)(\S+)(\s*)/,gw=new Set(["$index","$first","$last","$even","$odd","$count"]);function fw(v){return"empty"===v}function qN(v){return"else"===v||z1.test(v)}function SI(v,p,l,O,F,se){const we=p.split(",");let We=l.start;for(const gt of we){const Ft=gt.split("="),pn=2===Ft.length?Ft[0].trim():"",fi=2===Ft.length?Ft[1].trim():"";if(0===pn.length||0===fi.length)se.push(new ea(v,'Invalid @for loop "let" parameter. Parameter should match the pattern "<name> = <variable name>"'));else if(gw.has(fi))if(pn===O)se.push(new ea(v,`Invalid @for loop "let" parameter. Variable cannot be called "${O}"`));else if(F.some(_o=>_o.name===pn))se.push(new ea(v,`Duplicate "let" parameter variable "${fi}"`));else{const[,_o,Po]=Ft[0].match(G2)??[],Ro=void 0!==_o&&2===Ft.length?new Ws(We.moveBy(_o.length),We.moveBy(_o.length+Po.length)):l;let Rr;if(2===Ft.length){const[,cr,ds]=Ft[1].match(G2)??[];Rr=void 0!==cr?new Ws(We.moveBy(Ft[0].length+1+cr.length),We.moveBy(Ft[0].length+1+cr.length+ds.length)):void 0}const br=new Ws(Ro.start,Rr?.end??Ro.end);F.push(new kb(pn,fi,br,Ro,Rr))}else se.push(new ea(v,`Unknown "let" parameter variable "${fi}". The allowed variables are: ${Array.from(gw).join(", ")}`));We=We.moveBy(gt.length+1)}}function wx(v,p,l){let O,F;return"string"==typeof l?(O=Math.max(0,v.expression.lastIndexOf(l)),F=O+l.length):(O=0,F=v.expression.length),p.parseBinding(v.expression.slice(O,F),!1,v.sourceSpan,v.sourceSpan.start.offset+O)}function W1(v,p,l){if(0===v.parameters.length)return p.push(new ea(v.sourceSpan,"Conditional block does not have an expression")),null;const O=wx(v.parameters[0],l);let F=null;for(let se=1;se<v.parameters.length;se++){const we=v.parameters[se],We=we.expression.match(U1);if(null===We)p.push(new ea(we.sourceSpan,`Unrecognized conditional paramater "${we.expression}"`));else if("if"!==v.name)p.push(new ea(we.sourceSpan,'"as" expression is only allowed on the primary @if block'));else if(null!==F)p.push(new ea(we.sourceSpan,'Conditional can only have one "as" expression'));else{const gt=We[2].trim(),Ft=we.sourceSpan.start.moveBy(We[1].length),pn=new Ws(Ft,Ft.moveBy(gt.length));F=new kb(gt,gt,pn,pn)}}return{expression:O,expressionAlias:F}}const eF=/^\d+\.?\d*(ms|s)?$/,EI=/^\s$/,j1=new Map([[mm,Hh],[91,93],[40,41]]);var Xh=function(v){return v.IDLE="idle",v.TIMER="timer",v.INTERACTION="interaction",v.IMMEDIATE="immediate",v.HOVER="hover",v.VIEWPORT="viewport",v}(Xh||{});function OI({expression:v,sourceSpan:p},l,O,F){const se=v.indexOf("when"),we=new Ws(p.start.moveBy(se),p.start.moveBy(se+4)),We=nF(v,p);if(-1===se)F.push(new ea(p,'Could not find "when" keyword in expression'));else{const gt=wI(v,se+1),Ft=l.parseBinding(v.slice(gt),!1,p,p.start.offset+gt);$2("when",O,F,new xM(Ft,p,We,we))}}function tF({expression:v,sourceSpan:p},l,O,F){const se=v.indexOf("on"),we=new Ws(p.start.moveBy(se),p.start.moveBy(se+2)),We=nF(v,p);if(-1===se)O.push(new ea(p,'Could not find "on" keyword in expression'));else{const gt=wI(v,se+1);new Az(v,gt,p,l,O,F,We,we).parse()}}function nF(v,p){return v.startsWith("prefetch")?new Ws(p.start,p.start.moveBy(8)):null}class Az{constructor(p,l,O,F,se,we,We,gt){this.expression=p,this.start=l,this.span=O,this.triggers=F,this.errors=se,this.placeholder=we,this.prefetchSpan=We,this.onSourceSpan=gt,this.index=0,this.tokens=(new wf).tokenize(p.slice(l))}parse(){for(;this.tokens.length>0&&this.index<this.tokens.length;){const p=this.token();if(!p.isIdentifier()){this.unexpectedToken(p);break}if(this.isFollowedByOrLast(44))this.consumeTrigger(p,[]),this.advance();else if(this.isFollowedByOrLast(40)){this.advance();const l=this.errors.length,O=this.consumeParameters();if(this.errors.length!==l)break;this.consumeTrigger(p,O),this.advance()}else this.index<this.tokens.length-1&&this.unexpectedToken(this.tokens[this.index+1]);this.advance()}}advance(){this.index++}isFollowedByOrLast(p){return this.index===this.tokens.length-1||this.tokens[this.index+1].isCharacter(p)}token(){return this.tokens[Math.min(this.index,this.tokens.length-1)]}consumeTrigger(p,l){const O=this.span.start.moveBy(this.start+p.index-this.tokens[0].index),F=new Ws(O,O.moveBy(p.strValue.length)),se=O.moveBy(this.token().end-p.index),we=0===p.index,We=we?this.onSourceSpan:null,gt=we?this.prefetchSpan:null,Ft=new Ws(we?this.span.start:O,se);try{switch(p.toString()){case Xh.IDLE:this.trackTrigger("idle",function j2(v,p,l,O,F){if(v.length>0)throw new Error(`"${Xh.IDLE}" trigger cannot have parameters`);return new SM(p,l,O,F)}(l,F,Ft,gt,We));break;case Xh.TIMER:this.trackTrigger("timer",function Iz(v,p,l,O,F){if(1!==v.length)throw new Error(`"${Xh.TIMER}" trigger must have exactly one parameter`);const se=X1(v[0]);if(null===se)throw new Error(`Could not parse time value of trigger "${Xh.TIMER}"`);return new Ib(se,p,l,O,F)}(l,F,Ft,this.prefetchSpan,this.onSourceSpan));break;case Xh.INTERACTION:this.trackTrigger("interaction",function oF(v,p,l,O,F,se){return K1(Xh.INTERACTION,v,se),new Pb(v[0]??null,p,l,O,F)}(l,F,Ft,this.prefetchSpan,this.onSourceSpan,this.placeholder));break;case Xh.IMMEDIATE:this.trackTrigger("immediate",function Pz(v,p,l,O,F){if(v.length>0)throw new Error(`"${Xh.IMMEDIATE}" trigger cannot have parameters`);return new WE(p,l,O,F)}(l,F,Ft,this.prefetchSpan,this.onSourceSpan));break;case Xh.HOVER:this.trackTrigger("hover",function iF(v,p,l,O,F,se){return K1(Xh.HOVER,v,se),new Wd(v[0]??null,p,l,O,F)}(l,F,Ft,this.prefetchSpan,this.onSourceSpan,this.placeholder));break;case Xh.VIEWPORT:this.trackTrigger("viewport",function K2(v,p,l,O,F,se){return K1(Xh.VIEWPORT,v,se),new Mb(v[0]??null,p,l,O,F)}(l,F,Ft,this.prefetchSpan,this.onSourceSpan,this.placeholder));break;default:throw new Error(`Unrecognized trigger type "${p}"`)}}catch(pn){this.error(p,pn.message)}}consumeParameters(){const p=[];if(!this.token().isCharacter(40))return this.unexpectedToken(this.token()),p;this.advance();const l=[];let O="";for(;this.index<this.tokens.length;){const F=this.token();if(F.isCharacter(41)&&0===l.length){O.length&&p.push(O);break}F.type===La.Character&&j1.has(F.numValue)&&l.push(j1.get(F.numValue)),l.length>0&&F.isCharacter(l[l.length-1])&&l.pop(),0===l.length&&F.isCharacter(44)&&O.length>0?(p.push(O),O="",this.advance()):(O+=this.tokenText(),this.advance())}return(!this.token().isCharacter(41)||l.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index<this.tokens.length-1&&!this.tokens[this.index+1].isCharacter(44)&&this.unexpectedToken(this.tokens[this.index+1]),p}tokenText(){return this.expression.slice(this.start+this.token().index,this.start+this.token().end)}trackTrigger(p,l){$2(p,this.triggers,this.errors,l)}error(p,l){const O=this.span.start.moveBy(this.start+p.index),F=O.moveBy(p.end-p.index);this.errors.push(new ea(new Ws(O,F),l))}unexpectedToken(p){this.error(p,`Unexpected token "${p}"`)}}function $2(v,p,l,O){p[v]?l.push(new ea(O.sourceSpan,`Duplicate "${v}" trigger is not allowed`)):p[v]=O}function K1(v,p,l){if(p.length>1)throw new Error(`"${v}" trigger can only have zero or one parameters`);if(0===p.length){if(null===l)throw new Error(`"${v}" trigger with no parameters can only be placed on an @defer that has a @placeholder block`);if(1!==l.children.length||!(l.children[0]instanceof Fh))throw new Error(`"${v}" trigger with no parameters can only be placed on an @defer that has a @placeholder block with exactly one root element node`)}}function wI(v,p=0){let l=!1;for(let O=p;O<v.length;O++)if(EI.test(v[O]))l=!0;else if(l)return O;return-1}function X1(v){const p=v.match(eF);if(!p)return null;const[l,O]=p;return parseFloat(l)*("s"===O?1e3:1)}const Mz=/^prefetch\s+when\s/,Rz=/^prefetch\s+on\s/,X2=/^minimum\s/,rF=/^after\s/,TI=/^when\s/,Y2=/^on\s/;function Y1(v){return"placeholder"===v||"loading"===v||"error"===v}function aF(v,p){let l=null;for(const O of v.parameters){if(!X2.test(O.expression))throw new Error(`Unrecognized parameter in @placeholder block: "${O.expression}"`);{if(null!=l)throw new Error('@placeholder block can only have one "minimum" parameter');const F=X1(O.expression.slice(wI(O.expression)));if(null===F)throw new Error('Could not parse time value of parameter "minimum"');l=F}}return new $E(Ps(p,v.children,v.children),l,v.nameSpan,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.i18n)}function Z1(v,p){let l=null,O=null;for(const F of v.parameters)if(rF.test(F.expression)){if(null!=l)throw new Error('@loading block can only have one "after" parameter');const se=X1(F.expression.slice(wI(F.expression)));if(null===se)throw new Error('Could not parse time value of parameter "after"');l=se}else{if(!X2.test(F.expression))throw new Error(`Unrecognized parameter in @loading block: "${F.expression}"`);{if(null!=O)throw new Error('@loading block can only have one "minimum" parameter');const se=X1(F.expression.slice(wI(F.expression)));if(null===se)throw new Error('Could not parse time value of parameter "minimum"');O=se}}return new Rb(Ps(p,v.children,v.children),l,O,v.nameSpan,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.i18n)}function mw(v,p){if(v.parameters.length>0)throw new Error("@error block cannot have parameters");return new f_(Ps(p,v.children,v.children),v.nameSpan,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.i18n)}const _w=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,Ry_BANANA_BOX={start:"[(",end:")]"},Ry_PROPERTY={start:"[",end:"]"},Ry_EVENT={start:"(",end:")"};class AI{constructor(p,l){this.bindingParser=p,this.options=l,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.commentNodes=[],this.inI18nBlock=!1,this.processedNodes=new Set}visitElement(p){const l=MN(p.i18n);l&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",p.sourceSpan),this.inI18nBlock=!0);const O=QN(p);if(O.type===Pf.SCRIPT)return null;if(O.type===Pf.STYLE){const br=function nk(v){return 1===v.children.length&&v.children[0]instanceof tS?v.children[0].value:null}(p);return null!==br&&this.styles.push(br),null}if(O.type===Pf.STYLESHEET&&function pw(v){if(null==v||0===v.length||"/"==v[0])return!1;const p=v.match(KN);return null===p||"package"==p[1]||"asset"==p[1]}(O.hrefAttr))return this.styleUrls.push(O.hrefAttr),null;const F=function UE(v){return"ng-template"===gf(v)[1]}(p.name),se=[],we=[],We=[],gt=[],Ft=[],pn={},fi=[],_o=[];let Ro,Rr,Po=!1;for(const br of p.attrs){let cr=!1;const ds=tk(br.name);let Ss=!1;if(br.i18n&&(pn[br.name]=br.i18n),ds.startsWith("*")){Po&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",br.sourceSpan),Ss=!0,Po=!0;const Zs=br.value,xd=ds.substring(1),bh=[];this.bindingParser.parseInlineTemplateBinding(xd,Zs,br.sourceSpan,br.valueSpan?br.valueSpan.start.offset:br.sourceSpan.start.offset+br.name.length,[],fi,bh,!0),_o.push(...bh.map(Eg=>new kb(Eg.name,Eg.value,Eg.sourceSpan,Eg.keySpan,Eg.valueSpan)))}else cr=this.parseAttribute(F,br,[],se,we,We,gt);!cr&&!Ss&&Ft.push(this.visitAttribute(br))}if(Ro=O.nonBindable?Ps(ek,p.children).flat(1/0):Ps(this,p.children,p.children),O.type===Pf.NG_CONTENT){const br=O.selectAttr,cr=p.attrs.map(ds=>this.visitAttribute(ds));Rr=new XE(br,cr,Ro,p.sourceSpan,p.i18n),this.ngContentSelectors.push(br)}else if(F){const br=this.extractAttributes(p.name,se,pn);Rr=new mf(p.name,Ft,br.bound,we,[],Ro,gt,We,p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.i18n)}else{const br=this.extractAttributes(p.name,se,pn);Rr=new Fh(p.name,Ft,br.bound,we,Ro,gt,p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.i18n)}if(Po){const br=this.extractAttributes("ng-template",fi,pn),cr=[];br.literal.forEach(xd=>cr.push(xd)),br.bound.forEach(xd=>cr.push(xd));const ds=Rr instanceof Fh?{attributes:Rr.attributes,inputs:Rr.inputs,outputs:Rr.outputs}:{attributes:[],inputs:[],outputs:[]};Rr=new mf(Rr instanceof mf?null:Rr.name,ds.attributes,ds.inputs,ds.outputs,cr,[Rr],[],_o,p.sourceSpan,p.startSourceSpan,p.endSourceSpan,F&&l?void 0:p.i18n)}return l&&(this.inI18nBlock=!1),Rr}visitAttribute(p){return new zE(p.name,p.value,p.sourceSpan,p.keySpan,p.valueSpan,p.i18n)}visitText(p){return this.processedNodes.has(p)?null:this._visitTextWithInterpolation(p.value,p.sourceSpan,p.tokens,p.i18n)}visitExpansion(p){if(!p.i18n)return null;if(!MN(p.i18n))throw new Error(`Invalid type "${p.i18n.constructor}" for "i18n" property of ${p.sourceSpan.toString()}. Expected a "Message"`);const l=p.i18n,O={},F={};return Object.keys(l.placeholders).forEach(se=>{const we=l.placeholders[se];if(se.startsWith("VAR_")){const We=se.trim(),gt=this.bindingParser.parseInterpolationExpression(we.text,we.sourceSpan);O[We]=new qC(gt,we.sourceSpan)}else F[se]=this._visitTextWithInterpolation(we.text,we.sourceSpan,null)}),new Lb(O,F,p.sourceSpan,l)}visitExpansionCase(p){return null}visitComment(p){return this.options.collectCommentNodes&&this.commentNodes.push(new _0(p.value||"",p.sourceSpan)),null}visitLetDeclaration(p,l){const O=this.bindingParser.parseBinding(p.value,!1,p.valueSpan,p.valueSpan.start.offset);return 0===O.errors.length&&O.ast instanceof gu&&this.reportError("@let declaration value cannot be empty",p.valueSpan),new OM(p.name,O,p.sourceSpan,p.nameSpan,p.valueSpan)}visitBlockParameter(){return null}visitBlock(p,l){const O=Array.isArray(l)?l.indexOf(p):-1;if(-1===O)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(p))return null;let F=null;switch(p.name){case"defer":F=function sF(v,p,l,O){const F=[],{placeholder:se,loading:we,error:We}=function Tx(v,p,l){let O=null,F=null,se=null;for(const we of v)try{if(!Y1(we.name)){p.push(new ea(we.startSourceSpan,`Unrecognized block "@${we.name}"`));break}switch(we.name){case"placeholder":null!==O?p.push(new ea(we.startSourceSpan,"@defer block can only have one @placeholder block")):O=aF(we,l);break;case"loading":null!==F?p.push(new ea(we.startSourceSpan,"@defer block can only have one @loading block")):F=Z1(we,l);break;case"error":null!==se?p.push(new ea(we.startSourceSpan,"@defer block can only have one @error block")):se=mw(we,l)}}catch(We){p.push(new ea(we.startSourceSpan,We.message))}return{placeholder:O,loading:F,error:se}}(p,F,l),{triggers:gt,prefetchTriggers:Ft}=function Q1(v,p,l,O){const F={},se={};for(const we of v)TI.test(we.expression)?OI(we,p,F,l):Y2.test(we.expression)?tF(we,F,l,O):Mz.test(we.expression)?OI(we,p,se,l):Rz.test(we.expression)?tF(we,se,l,O):l.push(new ea(we.sourceSpan,"Unrecognized trigger"));return{triggers:F,prefetchTriggers:se}}(v.parameters,O,F,se);let pn=v.endSourceSpan,fi=v.sourceSpan.end;if(p.length>0){const Ro=p[p.length-1];pn=Ro.endSourceSpan,fi=Ro.sourceSpan.end}const _o=new Ws(v.sourceSpan.start,fi);return{node:new dm(Ps(l,v.children,v.children),gt,Ft,se,we,We,v.nameSpan,_o,v.sourceSpan,v.startSourceSpan,pn,v.i18n),errors:F}}(p,this.findConnectedBlocks(O,l,Y1),this,this.bindingParser);break;case"switch":F=function W2(v,p,l){const O=function G1(v){const p=[];let l=!1;if(1!==v.parameters.length)return p.push(new ea(v.sourceSpan,"@switch block must have exactly one parameter")),p;for(const O of v.children)if(!(O instanceof kO||O instanceof tS&&0===O.value.trim().length)){if(!(O instanceof P_)||"case"!==O.name&&"default"!==O.name){p.push(new ea(O.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}"default"===O.name?(l?p.push(new ea(O.sourceSpan,"@switch block can only have one @default block")):O.parameters.length>0&&p.push(new ea(O.sourceSpan,"@default block cannot have parameters")),l=!0):"case"===O.name&&1!==O.parameters.length&&p.push(new ea(O.sourceSpan,"@case block must have exactly one parameter"))}return p}(v),F=v.parameters.length>0?wx(v.parameters[0],l):l.parseBinding("",!1,v.sourceSpan,0),se=[],we=[];let We=null;for(const gt of v.children){if(!(gt instanceof P_))continue;if(("case"!==gt.name||0===gt.parameters.length)&&"default"!==gt.name){we.push(new KE(gt.name,gt.sourceSpan,gt.nameSpan));continue}const Ft="case"===gt.name?wx(gt.parameters[0],l):null,pn=new EM(Ft,Ps(p,gt.children,gt.children),gt.sourceSpan,gt.startSourceSpan,gt.endSourceSpan,gt.nameSpan,gt.i18n);null===Ft?We=pn:se.push(pn)}return null!==We&&se.push(We),{node:new YL(F,se,we,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.nameSpan),errors:O}}(p,this,this.bindingParser);break;case"for":F=function Dz(v,p,l,O){const F=[],se=function xI(v,p,l){if(0===v.parameters.length)return p.push(new ea(v.sourceSpan,"@for loop does not have an expression")),null;const[O,...F]=v.parameters,se=function $1(v,p){const l=v.expression,O=/^\s$/;let F=0,se=0,we=l.length-1;for(let We=0;We<l.length;We++){const gt=l[We];if("("!==gt){if(O.test(gt))continue;break}se=We+1,F++}if(0===F)return l;for(let We=l.length-1;We>-1;We--){const gt=l[We];if(")"!==gt){if(O.test(gt))continue;break}if(we=We,F--,0===F)break}return 0!==F?(p.push(new ea(v.sourceSpan,"Unclosed parentheses in expression")),null):l.slice(se,we)}(O,p)?.match(JN);if(!se||0===se[2].trim().length)return p.push(new ea(O.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern "<identifier> of <expression>"')),null;const[,we,We]=se;gw.has(we)&&p.push(new ea(O.sourceSpan,`@for loop item name cannot be one of ${Array.from(gw).join(", ")}.`));const gt=O.expression.split(" ")[0],Ft=new Ws(O.sourceSpan.start,O.sourceSpan.start.moveBy(gt.length)),pn={itemName:new kb(we,"$implicit",Ft,Ft),trackBy:null,expression:wx(O,l,We),context:Array.from(gw,fi=>{const _o=new Ws(v.startSourceSpan.end,v.startSourceSpan.end);return new kb(fi,fi,_o,_o)})};for(const fi of F){const _o=fi.expression.match(wS);if(null!==_o){const Ro=new Ws(fi.sourceSpan.start.moveBy(_o[0].length-_o[1].length),fi.sourceSpan.end);SI(fi.sourceSpan,_o[1],Ro,we,pn.context,p);continue}const Po=fi.expression.match(H1);if(null===Po)p.push(new ea(fi.sourceSpan,`Unrecognized @for loop paramater "${fi.expression}"`));else if(null!==pn.trackBy)p.push(new ea(fi.sourceSpan,'@for loop can only have one "track" expression'));else{const Ro=wx(fi,l,Po[1]);Ro.ast instanceof gu&&p.push(new ea(fi.sourceSpan,'@for loop must have a "track" expression'));const Rr=new Ws(fi.sourceSpan.start,fi.sourceSpan.start.moveBy(5));pn.trackBy={expression:Ro,keywordSpan:Rr}}}return pn}(v,F,O);let we=null,We=null;for(const gt of p)"empty"===gt.name?null!==We?F.push(new ea(gt.sourceSpan,"@for loop can only have one @empty block")):gt.parameters.length>0?F.push(new ea(gt.sourceSpan,"@empty block cannot have parameters")):We=new QT(Ps(l,gt.children,gt.children),gt.sourceSpan,gt.startSourceSpan,gt.endSourceSpan,gt.nameSpan,gt.i18n):F.push(new ea(gt.sourceSpan,`Unrecognized @for loop block "${gt.name}"`));if(null!==se)if(null===se.trackBy)F.push(new ea(v.sourceSpan,'@for loop must have a "track" expression'));else{const gt=We?.endSourceSpan??v.endSourceSpan,Ft=new Ws(v.sourceSpan.start,gt?.end??v.sourceSpan.end);we=new ZT(se.itemName,se.expression,se.trackBy.expression,se.trackBy.keywordSpan,se.context,Ps(l,v.children,v.children),We,Ft,v.sourceSpan,v.startSourceSpan,gt,v.nameSpan,v.i18n)}return{node:we,errors:F}}(p,this.findConnectedBlocks(O,l,fw),this,this.bindingParser);break;case"if":F=function Tz(v,p,l,O){const F=function dC(v){const p=[];let l=!1;for(let O=0;O<v.length;O++){const F=v[O];"else"===F.name?(l?p.push(new ea(F.sourceSpan,"Conditional can only have one @else block")):v.length>1&&O<v.length-1?p.push(new ea(F.sourceSpan,"@else block must be last inside the conditional")):F.parameters.length>0&&p.push(new ea(F.sourceSpan,"@else block cannot have parameters")),l=!0):z1.test(F.name)||p.push(new ea(F.sourceSpan,`Unrecognized conditional block @${F.name}`))}return p}(p),se=[],we=W1(v,F,O);null!==we&&se.push(new jE(we.expression,Ps(l,v.children,v.children),we.expressionAlias,v.sourceSpan,v.startSourceSpan,v.endSourceSpan,v.nameSpan,v.i18n));for(const fi of p)if(z1.test(fi.name)){const _o=W1(fi,F,O);if(null!==_o){const Po=Ps(l,fi.children,fi.children);se.push(new jE(_o.expression,Po,_o.expressionAlias,fi.sourceSpan,fi.startSourceSpan,fi.endSourceSpan,fi.nameSpan,fi.i18n))}}else if("else"===fi.name){const _o=Ps(l,fi.children,fi.children);se.push(new jE(null,_o,null,fi.sourceSpan,fi.startSourceSpan,fi.endSourceSpan,fi.nameSpan,fi.i18n))}const gt=se.length>0?se[se.length-1].endSourceSpan:v.endSourceSpan;let Ft=v.sourceSpan;const pn=se[se.length-1];return void 0!==pn&&(Ft=new Ws((se.length>0?se[0].startSourceSpan:v.startSourceSpan).start,pn.sourceSpan.end)),{node:new C0(se,Ft,v.startSourceSpan,gt,v.nameSpan),errors:F}}(p,this.findConnectedBlocks(O,l,qN),this,this.bindingParser);break;default:let se;Y1(p.name)?(se=`@${p.name} block can only be used after an @defer block.`,this.processedNodes.add(p)):fw(p.name)?(se=`@${p.name} block can only be used after an @for block.`,this.processedNodes.add(p)):qN(p.name)?(se=`@${p.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(p)):se=`Unrecognized block @${p.name}.`,F={node:new KE(p.name,p.sourceSpan,p.nameSpan),errors:[new ea(p.sourceSpan,se)]}}return this.errors.push(...F.errors),F.node}findConnectedBlocks(p,l,O){const F=[];for(let se=p+1;se<l.length;se++){const we=l[se];if(!(we instanceof kO)){if(we instanceof tS&&0===we.value.trim().length){this.processedNodes.add(we);continue}if(!(we instanceof P_&&O(we.name)))break;F.push(we),this.processedNodes.add(we)}}return F}extractAttributes(p,l,O){const F=[],se=[];return l.forEach(we=>{const We=O[we.name];if(we.isLiteral)se.push(new zE(we.name,we.expression.source||"",we.sourceSpan,we.keySpan,we.valueSpan,We));else{const gt=this.bindingParser.createBoundElementProperty(p,we,!0,!1);F.push(GE.fromBoundElementProperty(gt,We))}}),{bound:F,literal:se}}parseAttribute(p,l,O,F,se,we,We){const gt=tk(l.name),Ft=l.value,pn=l.sourceSpan,fi=l.valueSpan?l.valueSpan.start.offset:pn.start.offset;function _o(cr,ds,Ss){const xd=cr.start.moveBy(ds.length+(l.name.length-gt.length)),bh=xd.moveBy(Ss.length);return new Ws(xd,bh,xd,Ss)}const Po=gt.match(_w);if(Po){if(null!=Po[1]){const cr=Po[7],ds=_o(pn,Po[1],cr);this.bindingParser.parsePropertyBinding(cr,Ft,!1,!1,pn,fi,l.valueSpan,O,F,ds)}else if(Po[2])if(p){const cr=Po[7],ds=_o(pn,Po[2],cr);this.parseVariable(cr,Ft,pn,ds,l.valueSpan,we)}else this.reportError('"let-" is only supported on ng-template elements.',pn);else if(Po[3]){const cr=Po[7],ds=_o(pn,Po[3],cr);this.parseReference(cr,Ft,pn,ds,l.valueSpan,We)}else if(Po[4]){const cr=[],ds=Po[7],Ss=_o(pn,Po[4],ds);this.bindingParser.parseEvent(ds,Ft,!1,pn,l.valueSpan||pn,O,cr,Ss),II(cr,se)}else if(Po[5]){const cr=Po[7],ds=_o(pn,Po[5],cr);this.bindingParser.parsePropertyBinding(cr,Ft,!1,!0,pn,fi,l.valueSpan,O,F,ds),this.parseAssignmentEvent(cr,Ft,pn,l.valueSpan,O,se,ds)}else if(Po[6]){const cr=_o(pn,"",gt);this.bindingParser.parseLiteralAttr(gt,Ft,pn,fi,l.valueSpan,O,F,cr)}return!0}let Ro=null;if(gt.startsWith(Ry_BANANA_BOX.start)?Ro=Ry_BANANA_BOX:gt.startsWith(Ry_PROPERTY.start)?Ro=Ry_PROPERTY:gt.startsWith(Ry_EVENT.start)&&(Ro=Ry_EVENT),null!==Ro&&gt.endsWith(Ro.end)&&gt.length>Ro.start.length+Ro.end.length){const cr=gt.substring(Ro.start.length,gt.length-Ro.end.length),ds=_o(pn,Ro.start,cr);if(Ro.start===Ry_BANANA_BOX.start)this.bindingParser.parsePropertyBinding(cr,Ft,!1,!0,pn,fi,l.valueSpan,O,F,ds),this.parseAssignmentEvent(cr,Ft,pn,l.valueSpan,O,se,ds);else if(Ro.start===Ry_PROPERTY.start)this.bindingParser.parsePropertyBinding(cr,Ft,!1,!1,pn,fi,l.valueSpan,O,F,ds);else{const Ss=[];this.bindingParser.parseEvent(cr,Ft,!1,pn,l.valueSpan||pn,O,Ss,ds),II(Ss,se)}return!0}const Rr=_o(pn,"",gt);return this.bindingParser.parsePropertyInterpolation(gt,Ft,pn,l.valueSpan,O,F,Rr,l.valueTokens??null)}_visitTextWithInterpolation(p,l,O,F){const se=SS(p),we=this.bindingParser.parseInterpolation(se,l,O);return we?new qC(we,l,F):new JC(se,l)}parseVariable(p,l,O,F,se,we){p.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',O):0===p.length&&this.reportError("Variable does not have a name",O),we.push(new kb(p,l,O,F,se))}parseReference(p,l,O,F,se,we){p.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',O):0===p.length?this.reportError("Reference does not have a name",O):we.some(We=>We.name===p)&&this.reportError(`Reference "#${p}" is defined more than once`,O),we.push(new ey(p,l,O,F,se))}parseAssignmentEvent(p,l,O,F,se,we,We){const gt=[];this.bindingParser.parseEvent(`${p}Change`,l,!0,O,F||O,se,gt,We),II(gt,we)}reportError(p,l,O=_m.ERROR){this.errors.push(new ea(l,p,O))}}const ek=new class q1{visitElement(p){const l=QN(p);if(l.type===Pf.SCRIPT||l.type===Pf.STYLE||l.type===Pf.STYLESHEET)return null;const O=Ps(this,p.children,null);return new Fh(p.name,Ps(this,p.attrs),[],[],O,[],p.sourceSpan,p.startSourceSpan,p.endSourceSpan)}visitComment(p){return null}visitAttribute(p){return new zE(p.name,p.value,p.sourceSpan,p.keySpan,p.valueSpan,p.i18n)}visitText(p){return new JC(p.value,p.sourceSpan)}visitExpansion(p){return null}visitExpansionCase(p){return null}visitBlock(p,l){const O=[new JC(p.startSourceSpan.toString(),p.startSourceSpan),...Ps(this,p.children)];return null!==p.endSourceSpan&&O.push(new JC(p.endSourceSpan.toString(),p.endSourceSpan)),O}visitBlockParameter(p,l){return null}visitLetDeclaration(p,l){return new JC(`@let ${p.name} = ${p.value};`,p.sourceSpan)}};function tk(v){return/^data-/i.test(v)?v.substring(5):v}function II(v,p){p.push(...v.map(l=>v0.fromParsedEvent(l)))}const ik=[" ","\n","\r","\t"];const PI=new lx;function ky(v=$d,p=!1){return new cC(new VB(new wf),v,PI,[],p)}function uF(v,p,l){const O=new Jc,F=rb(v.selector);return O.set("type",v.type.value),F.length>0&&O.set("selectors",ph(F)),v.queries.length>0&&O.set("contentQueries",function WN(v,p,l){const O=[],F=[],se=IM(We=>F.push(We),S0);for(const We of v){if(O.push(Af(We,p,{nonSignal:Bi.contentQuery,signalBased:Bi.contentQuerySignal},[Xs("dirIndex")]).toStmt()),We.isSignal){F.push(Ay);continue}const gt=se(),Ft=kr(Bi.loadQuery).callFn([]),pn=kr(Bi.queryRefresh).callFn([gt.set(Ft)]),fi=Xs(ny).prop(We.propertyName).set(We.first?gt.prop("first"):gt);F.push(pn.and(fi).toStmt())}const we=l?`${l}_ContentQueries`:null;return nm([new vc(aD,Qf),new vc(ny,null),new vc("dirIndex",null)],[bg(1,O),bg(2,aC(F))],sg,null,we)}(v.queries,p,v.name)),v.viewQueries.length&&O.set("viewQuery",function sa(v,p,l){const O=[],F=[],se=IM(We=>F.push(We),S0);v.forEach(We=>{const gt=Af(We,p,{signalBased:Bi.viewQuerySignal,nonSignal:Bi.viewQuery});if(O.push(gt.toStmt()),We.isSignal)return void F.push(Ay);const Ft=se(),pn=kr(Bi.loadQuery).callFn([]),fi=kr(Bi.queryRefresh).callFn([Ft.set(pn)]),_o=Xs(ny).prop(We.propertyName).set(We.first?Ft.prop("first"):Ft);F.push(fi.and(_o).toStmt())});const we=l?`${l}_Query`:null;return nm([new vc(aD,Qf),new vc(ny,null)],[bg(1,O),bg(2,aC(F))],sg,null,we)}(v.viewQueries,p,v.name)),O.set("hostBindings",function gF(v,p,l,O,F,se,we){const We=l.createBoundHostProperties(v.properties,p),gt=l.createDirectiveHostEventAsts(v.listeners,p);v.specialAttributes.styleAttr&&(v.attributes.style=no(v.specialAttributes.styleAttr)),v.specialAttributes.classAttr&&(v.attributes.class=no(v.specialAttributes.classAttr));const Ft=function RN(v,p,l){const O=new sR(v.componentName,l,O1);for(const F of v.properties??[]){let se=xs.Property;F.name.startsWith("attr.")&&(F.name=F.name.substring(5),se=xs.Attribute),F.isAnimation&&(se=xs.Animation),B2(O,F,se,p.calcPossibleSecurityContexts(v.componentSelector,F.name,se===xs.Attribute).filter(We=>We!==Ml.NONE))}for(const[F,se]of Object.entries(v.attributes)??[])lw(O,F,se,p.calcPossibleSecurityContexts(v.componentSelector,F,!0).filter(We=>We!==Ml.NONE));for(const F of v.events??[])_I(O,F);return O}({componentName:se,componentSelector:F,properties:We,events:gt,attributes:v.attributes},l,O);sw(Ft,Zr.Host),we.set("hostAttrs",Ft.root.attributes);const pn=Ft.root.vars;return null!==pn&&pn>0&&we.set("hostVars",no(pn)),function PN(v){if(null===v.root.fnName)throw new Error("AssertionError: host binding function is unnamed");const p=[];for(const se of v.root.create){if(se.kind!==Qn.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${Qn[se.kind]}`);p.push(se.statement)}const l=[];for(const se of v.root.update){if(se.kind!==Qn.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${Qn[se.kind]}`);l.push(se.statement)}if(0===p.length&&0===l.length)return null;const O=aw(1,p),F=aw(2,l);return nm([new vc("rf"),new vc("ctx")],[...O,...F],void 0,void 0,v.root.fnName)}(Ft)}(v.host,v.typeSourceSpan,l,p,v.selector||"",v.name,O)),O.set("inputs",lD(v.inputs,!0)),O.set("outputs",lD(v.outputs)),null!==v.exportAs&&O.set("exportAs",Ns(v.exportAs.map(se=>no(se)))),v.isStandalone&&O.set("standalone",no(!0)),v.isSignal&&O.set("signals",no(!0)),O}function rk(v,p){const l=[],O=p.providers,F=p.viewProviders,se=Object.keys(p.inputs);if(O||F){const we=[O||new kh([])];F&&we.push(F),l.push(kr(Bi.ProvidersFeature).callFn(we))}for(const we of se)if(null!==p.inputs[we].transformFunction){l.push(kr(Bi.InputTransformsFeatureFeature));break}p.hostDirectives?.length&&l.push(kr(Bi.HostDirectivesFeature).callFn([q2(p.hostDirectives)])),p.usesInheritance&&l.push(kr(Bi.InheritDefinitionFeature)),p.fullInheritance&&l.push(kr(Bi.CopyDefinitionFeature)),p.lifecycle.usesOnChanges&&l.push(kr(Bi.NgOnChangesFeature)),p.hasOwnProperty("template")&&p.isStandalone&&l.push(kr(Bi.StandaloneFeature)),l.length&&v.set("features",Ns(l))}function yd(v){const p=ak(v);return p.push(vw(v.template.ngContentSelectors)),p.push(Yc(no(v.isStandalone))),p.push(Dx(v)),v.isSignal&&p.push(Yc(no(v.isSignal))),Yc(kr(Bi.ComponentDeclaration,p))}function IS(v){return Yc(no(v))}function xg(v){return nc(Object.keys(v).map(l=>({key:l,value:no(Array.isArray(v[l])?v[l][0]:v[l]),quoted:!0})))}function vw(v){return v.length>0?Yc(Ns(v.map(p=>no(p)))):Jf}function ak(v){const p=null!==v.selector?v.selector.replace(/\n/g,""):null;return[df(v.type.type,v.typeArgumentCount),null!==p?IS(p):Jf,null!==v.exportAs?vw(v.exportAs):Jf,Yc(pF(v)),Yc(xg(v.outputs)),vw(v.queries.map(l=>l.propertyName))]}function pF(v){return nc(Object.keys(v.inputs).map(p=>{const l=v.inputs[p],O=[{key:"alias",value:no(l.bindingPropertyName),quoted:!0},{key:"required",value:no(l.required),quoted:!0}];return l.isSignal&&O.push({key:"isSignal",value:no(l.isSignal),quoted:!0}),{key:p,value:nc(O),quoted:!0}}))}function lk(v){const p=ak(v);return p.push(Jf),p.push(Yc(no(v.isStandalone))),p.push(Dx(v)),v.isSignal&&p.push(Yc(no(v.isSignal))),Yc(kr(Bi.DirectiveDeclaration,p))}const ck=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function Dx(v){return v.hostDirectives?.length?Yc(Ns(v.hostDirectives.map(p=>nc([{key:"directive",value:tc(p.directive.type),quoted:!1},{key:"inputs",value:xg(p.inputs||{}),quoted:!1},{key:"outputs",value:xg(p.outputs||{}),quoted:!1}])))):Jf}function q2(v){const p=[];let l=!1;for(const O of v){if(O.inputs||O.outputs){const F=[{key:"directive",value:O.directive.type,quoted:!1}];if(O.inputs){const se=yw(O.inputs);se&&F.push({key:"inputs",value:se,quoted:!1})}if(O.outputs){const se=yw(O.outputs);se&&F.push({key:"outputs",value:se,quoted:!1})}p.push(nc(F))}else p.push(O.directive.type);O.isForwardReference&&(l=!0)}return l?new Rh([],[new pu(Ns(p))]):Ns(p)}function yw(v){const p=[];for(const l in v)v.hasOwnProperty(l)&&p.push(no(l),no(v[l]));return p.length>0?Ns(p):null}class Rf{constructor(p){this.directiveMatcher=p}bind(p){if(!p.template)throw new Error("Binding without a template not yet supported");const l=Tm.apply(p.template),O=function Ix(v){const p=new Map;function l(se){if(p.has(se.rootNode))return p.get(se.rootNode);const we=se.namedEntities;let We;return We=null!==se.parentScope?new Map([...l(se.parentScope),...we]):new Map(we),p.set(se.rootNode,We),We}const O=[v];for(;O.length>0;){const se=O.pop();for(const we of se.childScopes.values())O.push(we);l(se)}const F=new Map;for(const[se,we]of p)F.set(se,new Set(we.values()));return F}(l),{directives:F,eagerDirectives:se,bindings:we,references:We}=Ax.apply(p.template,this.directiveMatcher),{expressions:gt,symbols:Ft,nestingLevel:pn,usedPipes:fi,eagerPipes:_o,deferBlocks:Po}=G_.applyWithScope(p.template,l);return new xw(p,F,se,we,We,gt,Ft,pn,O,fi,_o,Po)}}class Tm{constructor(p,l){this.parentScope=p,this.rootNode=l,this.namedEntities=new Map,this.elementsInScope=new Set,this.childScopes=new Map,this.isDeferred=!(null===p||!p.isDeferred)||l instanceof dm}static newRootScope(){return new Tm(null,null)}static apply(p){const l=Tm.newRootScope();return l.ingest(p),l}ingest(p){p instanceof mf?(p.variables.forEach(l=>this.visitVariable(l)),p.children.forEach(l=>l.visit(this))):p instanceof jE?(null!==p.expressionAlias&&this.visitVariable(p.expressionAlias),p.children.forEach(l=>l.visit(this))):p instanceof ZT?(this.visitVariable(p.item),p.contextVariables.forEach(l=>this.visitVariable(l)),p.children.forEach(l=>l.visit(this))):p instanceof EM||p instanceof QT||p instanceof dm||p instanceof f_||p instanceof $E||p instanceof Rb||p instanceof XE?p.children.forEach(l=>l.visit(this)):p.forEach(l=>l.visit(this))}visitElement(p){p.references.forEach(l=>this.visitReference(l)),p.children.forEach(l=>l.visit(this)),this.elementsInScope.add(p)}visitTemplate(p){p.references.forEach(l=>this.visitReference(l)),this.ingestScopedNode(p)}visitVariable(p){this.maybeDeclare(p)}visitReference(p){this.maybeDeclare(p)}visitDeferredBlock(p){this.ingestScopedNode(p),p.placeholder?.visit(this),p.loading?.visit(this),p.error?.visit(this)}visitDeferredBlockPlaceholder(p){this.ingestScopedNode(p)}visitDeferredBlockError(p){this.ingestScopedNode(p)}visitDeferredBlockLoading(p){this.ingestScopedNode(p)}visitSwitchBlock(p){p.cases.forEach(l=>l.visit(this))}visitSwitchBlockCase(p){this.ingestScopedNode(p)}visitForLoopBlock(p){this.ingestScopedNode(p),p.empty?.visit(this)}visitForLoopBlockEmpty(p){this.ingestScopedNode(p)}visitIfBlock(p){p.branches.forEach(l=>l.visit(this))}visitIfBlockBranch(p){this.ingestScopedNode(p)}visitContent(p){this.ingestScopedNode(p)}visitLetDeclaration(p){this.maybeDeclare(p)}visitBoundAttribute(p){}visitBoundEvent(p){}visitBoundText(p){}visitText(p){}visitTextAttribute(p){}visitIcu(p){}visitDeferredTrigger(p){}visitUnknownBlock(p){}maybeDeclare(p){this.namedEntities.has(p.name)||this.namedEntities.set(p.name,p)}lookup(p){return this.namedEntities.has(p)?this.namedEntities.get(p):null!==this.parentScope?this.parentScope.lookup(p):null}getChildScope(p){const l=this.childScopes.get(p);if(void 0===l)throw new Error(`Assertion error: child scope for ${p} not found`);return l}ingestScopedNode(p){const l=new Tm(this,p);l.ingest(p),this.childScopes.set(p,l)}}class Ax{constructor(p,l,O,F,se){this.matcher=p,this.directives=l,this.eagerDirectives=O,this.bindings=F,this.references=se,this.isInDeferBlock=!1}static apply(p,l){const O=new Map,F=new Map,se=new Map,we=[];return new Ax(l,O,we,F,se).ingest(p),{directives:O,eagerDirectives:we,bindings:F,references:se}}ingest(p){p.forEach(l=>l.visit(this))}visitElement(p){this.visitElementOrTemplate(p)}visitTemplate(p){this.visitElementOrTemplate(p)}visitElementOrTemplate(p){const l=function iy(v){const p=v instanceof Fh?v.name:"ng-template",l=function ug(v){const p={};return v instanceof mf&&"ng-template"!==v.tagName?v.templateAttrs.forEach(l=>p[l.name]=""):(v.attributes.forEach(l=>{oD(l.name)||(p[l.name]=l.value)}),v.inputs.forEach(l=>{(l.type===pl.Property||l.type===pl.TwoWay)&&(p[l.name]="")}),v.outputs.forEach(l=>{p[l.name]=""})),p}(v),O=new i_,F=gf(p)[1];return O.setElement(F),Object.getOwnPropertyNames(l).forEach(se=>{const we=gf(se)[1],We=l[se];O.addAttribute(we,We),"class"===se.toLowerCase()&&We.trim().split(/\s+/).forEach(Ft=>O.addClassName(Ft))}),O}(p),O=[];this.matcher.match(l,(se,we)=>O.push(...we)),O.length>0&&(this.directives.set(p,O),this.isInDeferBlock||this.eagerDirectives.push(...O)),p.references.forEach(se=>{let we=null;if(""===se.value.trim())we=O.find(We=>We.isComponent)||null;else if(we=O.find(We=>null!==We.exportAs&&We.exportAs.some(gt=>gt===se.value))||null,null===we)return;this.references.set(se,null!==we?{directive:we,node:p}:p)});const F=(se,we)=>{const We=O.find(Ft=>Ft[we].hasBindingPropertyName(se.name));this.bindings.set(se,void 0!==We?We:p)};p.inputs.forEach(se=>F(se,"inputs")),p.attributes.forEach(se=>F(se,"inputs")),p instanceof mf&&p.templateAttrs.forEach(se=>F(se,"inputs")),p.outputs.forEach(se=>F(se,"outputs")),p.children.forEach(se=>se.visit(this))}visitDeferredBlock(p){const l=this.isInDeferBlock;this.isInDeferBlock=!0,p.children.forEach(O=>O.visit(this)),this.isInDeferBlock=l,p.placeholder?.visit(this),p.loading?.visit(this),p.error?.visit(this)}visitDeferredBlockPlaceholder(p){p.children.forEach(l=>l.visit(this))}visitDeferredBlockError(p){p.children.forEach(l=>l.visit(this))}visitDeferredBlockLoading(p){p.children.forEach(l=>l.visit(this))}visitSwitchBlock(p){p.cases.forEach(l=>l.visit(this))}visitSwitchBlockCase(p){p.children.forEach(l=>l.visit(this))}visitForLoopBlock(p){p.item.visit(this),p.contextVariables.forEach(l=>l.visit(this)),p.children.forEach(l=>l.visit(this)),p.empty?.visit(this)}visitForLoopBlockEmpty(p){p.children.forEach(l=>l.visit(this))}visitIfBlock(p){p.branches.forEach(l=>l.visit(this))}visitIfBlockBranch(p){p.expressionAlias?.visit(this),p.children.forEach(l=>l.visit(this))}visitContent(p){p.children.forEach(l=>l.visit(this))}visitVariable(p){}visitReference(p){}visitTextAttribute(p){}visitBoundAttribute(p){}visitBoundEvent(p){}visitBoundAttributeOrEvent(p){}visitText(p){}visitBoundText(p){}visitIcu(p){}visitDeferredTrigger(p){}visitUnknownBlock(p){}visitLetDeclaration(p){}}class G_ extends jT{constructor(p,l,O,F,se,we,We,gt,Ft){super(),this.bindings=p,this.symbols=l,this.usedPipes=O,this.eagerPipes=F,this.deferBlocks=se,this.nestingLevel=we,this.scope=We,this.rootNode=gt,this.level=Ft,this.visitNode=pn=>pn.visit(this)}visit(p,l){p instanceof Dc?p.visit(this,l):p.visit(this)}static applyWithScope(p,l){const O=new Map,F=new Map,se=new Map,we=new Set,We=new Set,Ft=[];return new G_(O,F,we,We,Ft,se,l,p instanceof mf?p:null,0).ingest(p),{expressions:O,symbols:F,nestingLevel:se,usedPipes:we,eagerPipes:We,deferBlocks:Ft}}ingest(p){if(p instanceof mf)p.variables.forEach(this.visitNode),p.children.forEach(this.visitNode),this.nestingLevel.set(p,this.level);else if(p instanceof jE)null!==p.expressionAlias&&this.visitNode(p.expressionAlias),p.children.forEach(this.visitNode),this.nestingLevel.set(p,this.level);else if(p instanceof ZT)this.visitNode(p.item),p.contextVariables.forEach(l=>this.visitNode(l)),p.trackBy.visit(this),p.children.forEach(this.visitNode),this.nestingLevel.set(p,this.level);else if(p instanceof dm){if(this.scope.rootNode!==p)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${p}`);this.deferBlocks.push([p,this.scope]),p.children.forEach(l=>l.visit(this)),this.nestingLevel.set(p,this.level)}else p instanceof EM||p instanceof QT||p instanceof f_||p instanceof $E||p instanceof Rb||p instanceof XE?(p.children.forEach(l=>l.visit(this)),this.nestingLevel.set(p,this.level)):p.forEach(this.visitNode)}visitElement(p){p.inputs.forEach(this.visitNode),p.outputs.forEach(this.visitNode),p.children.forEach(this.visitNode),p.references.forEach(this.visitNode)}visitTemplate(p){p.inputs.forEach(this.visitNode),p.outputs.forEach(this.visitNode),p.templateAttrs.forEach(this.visitNode),p.references.forEach(this.visitNode),this.ingestScopedNode(p)}visitVariable(p){null!==this.rootNode&&this.symbols.set(p,this.rootNode)}visitReference(p){null!==this.rootNode&&this.symbols.set(p,this.rootNode)}visitText(p){}visitTextAttribute(p){}visitUnknownBlock(p){}visitDeferredTrigger(){}visitIcu(p){Object.keys(p.vars).forEach(l=>p.vars[l].visit(this)),Object.keys(p.placeholders).forEach(l=>p.placeholders[l].visit(this))}visitBoundAttribute(p){p.value.visit(this)}visitBoundEvent(p){p.handler.visit(this)}visitDeferredBlock(p){this.ingestScopedNode(p),p.triggers.when?.value.visit(this),p.prefetchTriggers.when?.value.visit(this),p.placeholder&&this.visitNode(p.placeholder),p.loading&&this.visitNode(p.loading),p.error&&this.visitNode(p.error)}visitDeferredBlockPlaceholder(p){this.ingestScopedNode(p)}visitDeferredBlockError(p){this.ingestScopedNode(p)}visitDeferredBlockLoading(p){this.ingestScopedNode(p)}visitSwitchBlock(p){p.expression.visit(this),p.cases.forEach(this.visitNode)}visitSwitchBlockCase(p){p.expression?.visit(this),this.ingestScopedNode(p)}visitForLoopBlock(p){p.expression.visit(this),this.ingestScopedNode(p),p.empty?.visit(this)}visitForLoopBlockEmpty(p){this.ingestScopedNode(p)}visitIfBlock(p){p.branches.forEach(l=>l.visit(this))}visitIfBlockBranch(p){p.expression?.visit(this),this.ingestScopedNode(p)}visitContent(p){this.ingestScopedNode(p)}visitBoundText(p){p.value.visit(this)}visitLetDeclaration(p){p.value.visit(this),null!==this.rootNode&&this.symbols.set(p,this.rootNode)}visitPipe(p,l){return this.usedPipes.add(p.name),this.scope.isDeferred||this.eagerPipes.add(p.name),super.visitPipe(p,l)}visitPropertyRead(p,l){return this.maybeMap(p,p.name),super.visitPropertyRead(p,l)}visitSafePropertyRead(p,l){return this.maybeMap(p,p.name),super.visitSafePropertyRead(p,l)}visitPropertyWrite(p,l){return this.maybeMap(p,p.name),super.visitPropertyWrite(p,l)}ingestScopedNode(p){const l=this.scope.getChildScope(p);new G_(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,l,p,this.level+1).ingest(p)}maybeMap(p,l){if(!(p.receiver instanceof fu))return;const O=this.scope.lookup(l);O instanceof OM&&p.receiver instanceof g0||null!==O&&this.bindings.set(p,O)}}class xw{constructor(p,l,O,F,se,we,We,gt,Ft,pn,fi,_o){this.target=p,this.directives=l,this.eagerDirectives=O,this.bindings=F,this.references=se,this.exprTargets=we,this.symbols=We,this.nestingLevel=gt,this.scopedNodeEntities=Ft,this.usedPipes=pn,this.eagerPipes=fi,this.deferredBlocks=_o.map(Po=>Po[0]),this.deferredScopes=new Map(_o)}getEntitiesInScope(p){return this.scopedNodeEntities.get(p)??new Set}getDirectivesOfNode(p){return this.directives.get(p)||null}getReferenceTarget(p){return this.references.get(p)||null}getConsumerOfBinding(p){return this.bindings.get(p)||null}getExpressionTarget(p){return this.exprTargets.get(p)||null}getDefinitionNodeOfSymbol(p){return this.symbols.get(p)||null}getNestingLevel(p){return this.nestingLevel.get(p)||0}getUsedDirectives(){const p=new Set;return this.directives.forEach(l=>l.forEach(O=>p.add(O))),Array.from(p.values())}getEagerlyUsedDirectives(){const p=new Set(this.eagerDirectives);return Array.from(p.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(p,l){if(!(l instanceof Pb||l instanceof Mb||l instanceof Wd))return null;const O=l.reference;if(null===O){let se=null;if(null!==p.placeholder)for(const we of p.placeholder.children)if(!(we instanceof _0)){if(null!==se)return null;we instanceof Fh&&(se=we)}return se}const F=this.findEntityInScope(p,O);if(F instanceof ey&&this.getDefinitionNodeOfSymbol(F)!==p){const se=this.getReferenceTarget(F);if(null!==se)return this.referenceTargetToElement(se)}if(null!==p.placeholder){const se=this.findEntityInScope(p.placeholder,O),we=se instanceof ey?this.getReferenceTarget(se):null;if(null!==we)return this.referenceTargetToElement(we)}return null}isDeferred(p){for(const l of this.deferredBlocks){if(!this.deferredScopes.has(l))continue;const O=[this.deferredScopes.get(l)];for(;O.length>0;){const F=O.pop();if(F.elementsInScope.has(p))return!0;O.push(...F.childScopes.values())}}return!1}findEntityInScope(p,l){const O=this.getEntitiesInScope(p);for(const F of O)if(F.name===l)return F;return null}referenceTargetToElement(p){return p instanceof Fh?p:p instanceof mf?null:this.referenceTargetToElement(p.node)}}class RI{}class yh{constructor(p=new hB){this.jitEvaluator=p,this.FactoryTarget=sm,this.ResourceLoader=RI,this.elementSchemaRegistry=new lx}compilePipe(p,l,O){const se=HM({name:O.name,type:Qc(O.type),typeArgumentCount:0,deps:null,pipeName:O.pipeName,pure:O.pure,isStandalone:O.isStandalone});return this.jitExpression(se.expression,p,l,[])}compilePipeDeclaration(p,l,O){const se=HM(function Ck(v){return{name:v.type.name,type:Qc(v.type),typeArgumentCount:0,pipeName:v.name,deps:null,pure:v.pure??!0,isStandalone:v.isStandalone??!1}}(O));return this.jitExpression(se.expression,p,l,[])}compileInjectable(p,l,O){const{expression:F,statements:se}=PM({name:O.name,type:Qc(O.type),typeArgumentCount:O.typeArgumentCount,providedIn:BI(O.providedIn),useClass:PS(O,"useClass"),useFactory:gk(O,"useFactory"),useValue:PS(O,"useValue"),useExisting:PS(O,"useExisting"),deps:O.deps?.map(fk)},!0);return this.jitExpression(F,p,l,se)}compileInjectableDeclaration(p,l,O){const{expression:F,statements:se}=PM({name:O.type.name,type:Qc(O.type),typeArgumentCount:0,providedIn:BI(O.providedIn),useClass:PS(O,"useClass"),useFactory:gk(O,"useFactory"),useValue:PS(O,"useValue"),useExisting:PS(O,"useExisting"),deps:O.deps?.map(NI)},!0);return this.jitExpression(F,p,l,se)}compileInjector(p,l,O){const se=OD({name:O.name,type:Qc(O.type),providers:O.providers&&O.providers.length>0?new Da(O.providers):null,imports:O.imports.map(we=>new Da(we))});return this.jitExpression(se.expression,p,l,[])}compileInjectorDeclaration(p,l,O){const F=function SF(v){return{name:v.type.name,type:Qc(v.type),providers:void 0!==v.providers&&v.providers.length>0?new Da(v.providers):null,imports:void 0!==v.imports?v.imports.map(p=>new Da(p)):[]}}(O),se=OD(F);return this.jitExpression(se.expression,p,l,[])}compileNgModule(p,l,O){const se=VM({kind:Ku.Global,type:Qc(O.type),bootstrap:O.bootstrap.map(Qc),declarations:O.declarations.map(Qc),publicDeclarationTypes:null,imports:O.imports.map(Qc),includeImportTypes:!0,exports:O.exports.map(Qc),selectorScopeMode:Gv.Inline,containsForwardDecls:!1,schemas:O.schemas?O.schemas.map(Qc):null,id:O.id?new Da(O.id):null});return this.jitExpression(se.expression,p,l,[])}compileNgModuleDeclaration(p,l,O){const F=function rO(v){const p=new Jc;return p.set("type",new Da(v.type)),void 0!==v.bootstrap&&p.set("bootstrap",new Da(v.bootstrap)),void 0!==v.declarations&&p.set("declarations",new Da(v.declarations)),void 0!==v.imports&&p.set("imports",new Da(v.imports)),void 0!==v.exports&&p.set("exports",new Da(v.exports)),void 0!==v.schemas&&p.set("schemas",new Da(v.schemas)),void 0!==v.id&&p.set("id",new Da(v.id)),kr(Bi.defineNgModule).callFn([p.toLiteralMap()])}(O);return this.jitExpression(F,p,l,[])}compileDirective(p,l,O){const F=LI(O);return this.compileDirectiveFromMeta(p,l,F)}compileDirectiveDeclaration(p,l,O){const se=mF(O,this.createParseSourceSpan("Directive",O.type.name,l));return this.compileDirectiveFromMeta(p,l,se)}compileDirectiveFromMeta(p,l,O){const F=new om,we=function sk(v,p,l){const O=uF(v,p,l);return rk(O,v),{expression:kr(Bi.defineDirective).callFn([O.toLiteralMap()],void 0,!0),type:lk(v),statements:[]}}(O,F,ky());return this.jitExpression(we.expression,p,l,F.statements)}compileComponent(p,l,O){const{template:F,interpolation:se,defer:we}=Px(O.template,O.name,l,O.preserveWhitespaces,O.interpolation,void 0),We={...O,...LI(O),selector:O.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:F,declarations:O.declarations.map(eH),declarationListEmitMode:0,defer:we,styles:[...O.styles,...F.styles],encapsulation:O.encapsulation,interpolation:se,changeDetection:O.changeDetection??null,animations:null!=O.animations?new Da(O.animations):null,viewProviders:null!=O.viewProviders?new Da(O.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0};return this.compileComponentFromMeta(p,`ng:///${O.name}.js`,We)}compileComponentDeclaration(p,l,O){const se=function Ew(v,p,l){const{template:O,interpolation:F,defer:se}=Px(v.template,v.type.name,l,v.preserveWhitespaces??!1,v.interpolation,v.deferBlockDependencies),we=[];if(v.dependencies)for(const We of v.dependencies)switch(We.kind){case"directive":case"component":we.push(pk(We));break;case"pipe":we.push(nH(We))}else(v.components||v.directives||v.pipes)&&(v.components&&we.push(...v.components.map(We=>pk(We,!0))),v.directives&&we.push(...v.directives.map(We=>pk(We))),v.pipes&&we.push(...function tH(v){return v?Object.keys(v).map(p=>({kind:Wv.Pipe,name:p,type:new Da(v[p])})):[]}(v.pipes)));return{...mF(v,p),template:O,styles:v.styles??[],declarations:we,viewProviders:void 0!==v.viewProviders?new Da(v.viewProviders):null,animations:void 0!==v.animations?new Da(v.animations):null,defer:se,changeDetection:v.changeDetection??tb.Default,encapsulation:v.encapsulation??Uu.Emulated,interpolation:F,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0}}(O,this.createParseSourceSpan("Component",O.type.name,l),l);return this.compileComponentFromMeta(p,l,se)}compileComponentFromMeta(p,l,O){const F=new om,we=function hF(v,p,l){const O=uF(v,p,l);rk(O,v);const F=v.selector&&i_.parse(v.selector),se=F&&F[0];if(se){const _o=se.getAttrs();_o.length&&O.set("attrs",p.getConstLiteral(Ns(_o.map(Po=>no(null!=Po?Po:void 0))),!0))}let We=null;if(1===v.defer.mode&&null!==v.defer.dependenciesFn){const _o=`${v.name}_DeferFn`;p.statements.push(new Rl(_o,v.defer.dependenciesFn,void 0,Xc.Final)),We=Xs(_o)}const gt=function L2(v,p,l,O,F,se,we){const We=new bO(v,l,O1,O,F,se,we);return Om(We.root,p),We}(v.name,v.template.nodes,p,v.relativeContextFilePath,v.i18nUseExternalIds,v.defer,We);sw(gt,Zr.Tmpl);const Ft=Rd(gt,p);if(null!==gt.contentSelectors&&O.set("ngContentSelectors",gt.contentSelectors),O.set("decls",no(gt.root.decls)),O.set("vars",no(gt.root.vars)),gt.consts.length>0&&O.set("consts",gt.constsInitializers.length>0?Zc([],[...gt.constsInitializers,new pu(Ns(gt.consts))]):Ns(gt.consts)),O.set("template",Ft),3!==v.declarationListEmitMode&&v.declarations.length>0)O.set("dependencies",function Ly(v,p){switch(p){case 0:return v;case 1:return Zc([],v);case 2:return Zc([],v.prop("map").callFn([kr(Bi.resolveForwardRef)]));case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}(Ns(v.declarations.map(_o=>_o.type)),v.declarationListEmitMode));else if(3===v.declarationListEmitMode){const _o=[v.type.value];v.rawImports&&_o.push(v.rawImports),O.set("dependencies",kr(Bi.getComponentDepsFactory).callFn(_o))}if(null===v.encapsulation&&(v.encapsulation=Uu.Emulated),v.styles&&v.styles.length){const Po=(v.encapsulation==Uu.Emulated?function Mf(v,p,l){const O=new lO;return v.map(F=>O.shimCssText(F,p,l))}(v.styles,"_ngcontent-%COMP%","_nghost-%COMP%"):v.styles).reduce((Ro,Rr)=>(Rr.trim().length>0&&Ro.push(p.getConstLiteral(no(Rr))),Ro),[]);Po.length>0&&O.set("styles",Ns(Po))}else v.encapsulation===Uu.Emulated&&(v.encapsulation=Uu.None);return v.encapsulation!==Uu.Emulated&&O.set("encapsulation",no(v.encapsulation)),null!==v.animations&&O.set("data",nc([{key:"animation",value:v.animations,quoted:!1}])),null!==v.changeDetection&&("number"==typeof v.changeDetection&&v.changeDetection!==tb.Default?O.set("changeDetection",no(v.changeDetection)):"object"==typeof v.changeDetection&&O.set("changeDetection",v.changeDetection)),{expression:kr(Bi.defineComponent).callFn([O.toLiteralMap()],void 0,!0),type:yd(v),statements:[]}}(O,F,ky(O.interpolation));return this.jitExpression(we.expression,p,l,F.statements)}compileFactory(p,l,O){const F=p_({name:O.name,type:Qc(O.type),typeArgumentCount:O.typeArgumentCount,deps:(v=O.deps,null==v?null:v.map(fk)),target:O.target});var v;return this.jitExpression(F.expression,p,l,F.statements)}compileFactoryDeclaration(p,l,O){const F=p_({name:O.type.name,type:Qc(O.type),typeArgumentCount:0,deps:Array.isArray(O.deps)?O.deps.map(NI):O.deps,target:O.target});return this.jitExpression(F.expression,p,l,F.statements)}createParseSourceSpan(p,l,O){return function bD(v,p,l){const F=new Ep("",`in ${v} ${p} in ${l}`);return new Ws(new zv(F,-1,-1,-1),new zv(F,-1,-1,-1))}(p,l,O)}jitExpression(p,l,O,F){const se=[...F,new Rl("$def",p,void 0,Xc.Exported)];return this.jitEvaluator.evaluateStatements(O,se,new FM(l),!0).$def}}function kI(v){return{...v,isSignal:v.isSignal,predicate:uk(v.predicate),read:v.read?new Da(v.read):null,static:v.static,emitDistinctChangesOnly:v.emitDistinctChangesOnly}}function fF(v){return{propertyName:v.propertyName,first:v.first??!1,predicate:uk(v.predicate),descendants:v.descendants??!1,read:v.read?new Da(v.read):null,static:v.static??!1,emitDistinctChangesOnly:v.emitDistinctChangesOnly??!0,isSignal:!!v.isSignal}}function uk(v){return Array.isArray(v)?v:zT(new Da(v),1)}function LI(v){const p=function vk(v){return v.reduce((p,l)=>{if("string"==typeof l){const[O,F]=xF(l);p[F]={bindingPropertyName:O,classPropertyName:F,required:!1,isSignal:!1,transformFunction:null}}else p[l.name]={bindingPropertyName:l.alias||l.name,classPropertyName:l.name,required:l.required||!1,isSignal:!1,transformFunction:null!=l.transform?new Da(l.transform):null};return p},{})}(v.inputs||[]),l=FI(v.outputs||[]),O=v.propMetadata,F={},se={};for(const We in O)O.hasOwnProperty(We)&&O[We].forEach(gt=>{yF(gt)?F[We]={bindingPropertyName:gt.alias||We,classPropertyName:We,required:gt.required||!1,isSignal:!!gt.isSignal,transformFunction:null!=gt.transform?new Da(gt.transform):null}:oH(gt)&&(se[We]=gt.alias||We)});const we=v.hostDirectives?.length?v.hostDirectives.map(We=>"function"==typeof We?{directive:Qc(We),inputs:null,outputs:null,isForwardReference:!1}:{directive:Qc(We.directive),isForwardReference:!1,inputs:We.inputs?FI(We.inputs):null,outputs:We.outputs?FI(We.outputs):null}):null;return{...v,typeArgumentCount:0,typeSourceSpan:v.typeSourceSpan,type:Qc(v.type),deps:null,host:{...mk(v.propMetadata,v.typeSourceSpan,v.host)},inputs:{...p,...F},outputs:{...l,...se},queries:v.queries.map(kI),providers:null!=v.providers?new Da(v.providers):null,viewQueries:v.viewQueries.map(kI),fullInheritance:!1,hostDirectives:we}}function mF(v,p){const l=v.hostDirectives?.length?v.hostDirectives.map(O=>({directive:Qc(O.directive),isForwardReference:!1,inputs:O.inputs?Sg(O.inputs):null,outputs:O.outputs?Sg(O.outputs):null})):null;return{name:v.type.name,type:Qc(v.type),typeSourceSpan:p,selector:v.selector??null,inputs:v.inputs?bF(v.inputs):{},outputs:v.outputs??{},host:hk(v.host),queries:(v.queries??[]).map(fF),viewQueries:(v.viewQueries??[]).map(fF),providers:void 0!==v.providers?new Da(v.providers):null,exportAs:v.exportAs??null,usesInheritance:v.usesInheritance??!1,lifecycle:{usesOnChanges:v.usesOnChanges??!1},deps:null,typeArgumentCount:0,fullInheritance:!1,isStandalone:v.isStandalone??!1,isSignal:v.isSignal??!1,hostDirectives:l}}function hk(v={}){return{attributes:Sw(v.attributes??{}),listeners:v.listeners??{},properties:v.properties??{},specialAttributes:{classAttr:v.classAttribute,styleAttr:v.styleAttribute}}}function Sg(v){let p=null;for(let l=1;l<v.length;l+=2)p=p||{},p[v[l-1]]=v[l];return p}function Sw(v){const p={};for(const l of Object.keys(v))p[l]=new Da(v[l]);return p}function eH(v){return{...v,type:new Da(v.type)}}function pk(v,p=null){return{kind:Wv.Directive,isComponent:p||"component"===v.kind,selector:v.selector,type:new Da(v.type),inputs:v.inputs??[],outputs:v.outputs??[],exportAs:v.exportAs??null}}function nH(v){return{kind:Wv.Pipe,name:v.name,type:new Da(v.type)}}function Px(v,p,l,O,F,se){const we=F?Vb.fromArray(F):$d,We=function kz(v,p,l={}){const{interpolationConfig:O,preserveWhitespaces:F,enableI18nLegacyMessageIdFormat:se,allowInvalidAssignmentEvents:we}=l,We=ky(O,we),Ft=(new If).parse(v,p,{leadingTriviaChars:ik,...l,tokenizeExpansionForms:!0,tokenizeBlocks:l.enableBlockSyntax??!0,tokenizeLet:l.enableLetSyntax??!0});if(!l.alwaysAttemptHtmlToR3AstConversion&&Ft.errors&&Ft.errors.length>0){const Zs={interpolationConfig:O,preserveWhitespaces:F,errors:Ft.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return l.collectCommentNodes&&(Zs.commentNodes=[]),Zs}let pn=Ft.rootNodes;const fi=new PA(O,!F,se),_o=fi.visitAllWithErrors(pn);if(!l.alwaysAttemptHtmlToR3AstConversion&&_o.errors&&_o.errors.length>0){const Zs={interpolationConfig:O,preserveWhitespaces:F,errors:_o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return l.collectCommentNodes&&(Zs.commentNodes=[]),Zs}pn=_o.rootNodes,F||(pn=Ps(new Iy,pn),fi.hasI18nMeta&&(pn=Ps(new PA(O,!1),pn)));const{nodes:Po,errors:Ro,styleUrls:Rr,styles:br,ngContentSelectors:cr,commentNodes:ds}=function J1(v,p,l){const O=new AI(p,l),we={nodes:Ps(O,v,v),errors:p.errors.concat(O.errors),styleUrls:O.styleUrls,styles:O.styles,ngContentSelectors:O.ngContentSelectors};return l.collectCommentNodes&&(we.commentNodes=O.commentNodes),we}(pn,We,{collectCommentNodes:!!l.collectCommentNodes});Ro.push(...Ft.errors,..._o.errors);const Ss={interpolationConfig:O,preserveWhitespaces:F,errors:Ro.length>0?Ro:null,nodes:Po,styleUrls:Rr,styles:br,ngContentSelectors:cr};return l.collectCommentNodes&&(Ss.commentNodes=ds),Ss}(v,l,{preserveWhitespaces:O,interpolationConfig:we});if(null!==We.errors){const pn=We.errors.map(fi=>fi.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${p}: ${pn}`)}return{template:We,interpolation:we,defer:vF(new Rf(new tf).bind({template:We.nodes}),se)}}function PS(v,p){if(v.hasOwnProperty(p))return zT(new Da(v[p]),0)}function gk(v,p){if(v.hasOwnProperty(p))return new Da(v[p])}function BI(v){return zT("function"==typeof v?new Da(v):new fd(v??null),0)}function fk(v){const p=null!=v.attribute,l=null===v.token?null:new Da(v.token);return _F(p?new Da(v.attribute):l,p,v.host,v.optional,v.self,v.skipSelf)}function NI(v){const p=v.attribute??!1;return _F(null===v.token?null:new Da(v.token),p,v.host??!1,v.optional??!1,v.self??!1,v.skipSelf??!1)}function _F(v,p,l,O,F,se){return{token:v,attributeNameType:p?no("unknown"):null,host:l,optional:O,self:F,skipSelf:se}}function vF(v,p){const l=v.getDeferBlocks(),O=new Map;for(let F=0;F<l.length;F++){const se=p?.[F];O.set(l[F],se?new Da(se):null)}return{mode:0,blocks:O}}function mk(v,p,l){const O=function dk(v){const p={},l={},O={},F={};for(const se of Object.keys(v)){const we=v[se],We=se.match(ck);if(null===We)switch(se){case"class":if("string"!=typeof we)throw new Error("Class binding must be string");F.classAttr=we;break;case"style":if("string"!=typeof we)throw new Error("Style binding must be string");F.styleAttr=we;break;default:p[se]="string"==typeof we?no(we):we}else if(null!=We[1]){if("string"!=typeof we)throw new Error("Property binding must be string");O[We[1]]=we}else if(null!=We[2]){if("string"!=typeof we)throw new Error("Event binding must be string");l[We[2]]=we}}return{attributes:p,listeners:l,properties:O,specialAttributes:F}}(l||{}),F=function Cw(v,p){const l=ky();return l.createDirectiveHostEventAsts(v.listeners,p),l.createBoundHostProperties(v.properties,p),l.errors}(O,p);if(F.length)throw new Error(F.map(se=>se.msg).join("\n"));for(const se in v)v.hasOwnProperty(se)&&v[se].forEach(we=>{CF(we)?O.properties[we.hostPropertyName||se]=RE("this",se):uC(we)&&(O.listeners[we.eventName||se]=`${se}(${(we.args||[]).join(",")})`)});return O}function CF(v){return"HostBinding"===v.ngMetadataName}function uC(v){return"HostListener"===v.ngMetadataName}function yF(v){return"Input"===v.ngMetadataName}function oH(v){return"Output"===v.ngMetadataName}function bF(v){return Object.keys(v).reduce((p,l)=>{const O=v[l];return p[l]="string"==typeof O||Array.isArray(O)?function _k(v){return"string"==typeof v?{bindingPropertyName:v,classPropertyName:v,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:v[0],classPropertyName:v[1],transformFunction:v[2]?new Da(v[2]):null,required:!1,isSignal:!1}}(O):{bindingPropertyName:O.publicName,classPropertyName:l,transformFunction:null!==O.transformFunction?new Da(O.transformFunction):null,required:O.isRequired,isSignal:O.isSignal},p},{})}function FI(v){return v.reduce((p,l)=>{const[O,F]=xF(l);return p[F]=O,p},{})}function xF(v){const[p,l]=v.split(":",2).map(O=>O.trim());return[l??p,p]}new class jC{constructor(p){this.full=p;const l=p.split(".");this.major=l[0],this.minor=l[1],this.patch=l.slice(2).join(".")}}("18.1.2");class VI{constructor({defaultEncapsulation:p=Uu.Emulated,preserveWhitespaces:l,strictInjectionParameters:O}={}){this.defaultEncapsulation=p,this.preserveWhitespaces=function HI(v,p=!1){return null===v?p:v}(function mM(v){return void 0===v?null:v}(l)),this.strictInjectionParameters=!0===O}}new class GI{constructor(){this.closedByParent=!1,this.implicitNamespacePrefix=null,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0,this.preventNamespaceInheritance=!1}requireExtraParent(p){return!1}isClosedByChild(p){return!1}getContentType(){return Ea.PARSABLE_DATA}},function EF(v){(v.ng||(v.ng={})).\u0275compilerFacade=new yh}(bb);const qz=[{provide:o.Ql9,useFactory:()=>new o.Ql9}];class CH{constructor(p){this._defaultOptions=[{defaultEncapsulation:o.gXe.Emulated},...p]}createCompiler(p=[]){const l=function eG(v){return{defaultEncapsulation:yH(v.map(p=>p.defaultEncapsulation)),providers:tG(v.map(p=>p.providers)),preserveWhitespaces:yH(v.map(p=>p.preserveWhitespaces))}}(this._defaultOptions.concat(p));return o.zZn.create({providers:[qz,{provide:VI,useFactory:()=>new VI({defaultEncapsulation:l.defaultEncapsulation,preserveWhitespaces:l.preserveWhitespaces}),deps:[]},l.providers]}).get(o.Ql9)}}function yH(v){for(let p=v.length-1;p>=0;p--)if(void 0!==v[p])return v[p]}function tG(v){const p=[];return v.forEach(l=>l&&p.push(...l)),p}const nG=JSON.parse('{"de":{"Yes":"Ja","No":"Nein","Cancel":"Abbrechen","Close":"Schlie\xdfen","Clear":"L\xf6schen","Done":"Fertig","Loading":"Laden...","Select":"Ausw\xe4hlen...","Search":"Suchen...","Back":"Zur\xfcck","OK":"OK","dxCollectionWidget-noDataText":"Keine Daten verf\xfcgbar","dxDropDownEditor-selectLabel":"Ausw\xe4hlen","validation-required":"Pflichtfeld","validation-required-formatted":"{0} ist ein Pflichtfeld","validation-numeric":"Der Wert muss eine Zahl sein","validation-numeric-formatted":"{0} muss eine Zahl sein","validation-range":"Der Wert ist nicht im g\xfcltigen Bereich","validation-range-formatted":"{0} ist nicht im g\xfcltigen Bereich","validation-stringLength":"Die L\xe4nge des Wertes ist nicht korrekt","validation-stringLength-formatted":"Die L\xe4nge von {0} ist nicht korrekt","validation-custom":"Der Wert ist ung\xfcltig","validation-custom-formatted":"{0} ist ung\xfcltig","validation-async":"Der Wert ist ung\xfcltig","validation-async-formatted":"{0} ist ung\xfcltig","validation-compare":"Der Wert ist unpassend","validation-compare-formatted":"{0} ist unpassend","validation-pattern":"Der Wert passt nicht zum Muster","validation-pattern-formatted":"{0} passt nicht zum Muster","validation-email":"Die Email-Adresse ist ung\xfcltig","validation-email-formatted":"{0} ist ung\xfcltig","validation-mask":"Der Wert ist ung\xfcltig","dxLookup-searchPlaceholder":"Minimale Anzahl Zeichen: {0}","dxList-pullingDownText":"Zum Aktualisieren nach unten ziehen","dxList-pulledDownText":"Zum Aktualisieren loslassen","dxList-refreshingText":"Aktualisiere...","dxList-pageLoadingText":"Laden...","dxList-nextButtonText":"Mehr","dxList-selectAll":"Alles ausw\xe4hlen","dxList-listAriaLabel":"Items","dxList-listAriaLabel-deletable":"Deletable items","dxListEditDecorator-delete":"Entfernen","dxListEditDecorator-more":"Mehr","dxScrollView-pullingDownText":"Zum Aktualisieren nach unten ziehen","dxScrollView-pulledDownText":"Zum Aktualisieren loslassen","dxScrollView-refreshingText":"Aktualisiere...","dxScrollView-reachBottomText":"Laden...","dxDateBox-simulatedDataPickerTitleTime":"Zeit ausw\xe4hlen","dxDateBox-simulatedDataPickerTitleDate":"Datum ausw\xe4hlen","dxDateBox-simulatedDataPickerTitleDateTime":"Datum und Zeit ausw\xe4hlen","dxDateBox-validation-datetime":"Der Wert muss ein Datum oder eine Uhrzeit sein","dxDateRangeBox-invalidStartDateMessage":"Anfangsdatum muss ein Datum sein","dxDateRangeBox-invalidEndDateMessage":"Enddatum muss ein Datum sein","dxDateRangeBox-startDateOutOfRangeMessage":"Anfangsdatum ist ausserhalb des g\xfcltigen Bereichs","dxDateRangeBox-endDateOutOfRangeMessage":"Enddatum ist ausserhalb des g\xfcltigen Bereichs","dxDateRangeBox-startDateLabel":"Anfangsdatum","dxDateRangeBox-endDateLabel":"Enddatum","dxFileUploader-selectFile":"Datei ausw\xe4hlen","dxFileUploader-dropFile":"oder hierher ziehen","dxFileUploader-bytes":"Bytes","dxFileUploader-kb":"KB","dxFileUploader-Mb":"MB","dxFileUploader-Gb":"GB","dxFileUploader-upload":"Hochladen","dxFileUploader-uploaded":"Hochgeladen","dxFileUploader-readyToUpload":"Bereit zum Hochladen","dxFileUploader-uploadAbortedMessage":"Upload abgebrochen","dxFileUploader-uploadFailedMessage":"Fehler beim Hochladen","dxFileUploader-invalidFileExtension":"Unzul\xe4ssiger Dateityp","dxFileUploader-invalidMaxFileSize":"Datei ist zu gro\xdf","dxFileUploader-invalidMinFileSize":"Datei ist zu klein","dxRangeSlider-ariaFrom":"Von","dxRangeSlider-ariaTill":"Bis","dxSwitch-switchedOnText":"EIN","dxSwitch-switchedOffText":"AUS","dxForm-optionalMark":"optional","dxForm-requiredMessage":"{0} ist ein Pflichtfeld","dxNumberBox-invalidValueMessage":"Der Wert muss eine Zahl sein","dxNumberBox-noDataText":"Keine Daten","dxDataGrid-emptyHeaderWithColumnChooserText":"Verwenden Sie die {0}, um Spalten anzuzeigen","dxDataGrid-emptyHeaderWithGroupPanelText":"Ziehen Sie eine Spalte aus dem Gruppenpanel hierher","dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText":"Verwenden Sie die {0} oder ziehen Sie eine Spalte aus dem Gruppenpanel","dxDataGrid-emptyHeaderColumnChooserText":"Spaltenauswahl","dxDataGrid-columnChooserTitle":"Spaltenauswahl","dxDataGrid-columnChooserEmptyText":"Ziehen Sie Spalten hierhin, um sie zu verstecken","dxDataGrid-groupContinuesMessage":"Weiter auf der n\xe4chsten Seite","dxDataGrid-groupContinuedMessage":"Weiter von der vorherigen Seite","dxDataGrid-groupHeaderText":"Nach dieser Spalte gruppieren","dxDataGrid-ungroupHeaderText":"Gruppierung entfernen","dxDataGrid-ungroupAllText":"Alle Gruppierungen entfernen","dxDataGrid-editingEditRow":"Bearbeiten","dxDataGrid-editingSaveRowChanges":"Speichern","dxDataGrid-editingCancelRowChanges":"Abbrechen","dxDataGrid-editingDeleteRow":"Entfernen","dxDataGrid-editingUndeleteRow":"Wiederherstellen","dxDataGrid-editingConfirmDeleteMessage":"Sind Sie sicher, dass Sie diesen Datensatz l\xf6schen wollen?","dxDataGrid-validationCancelChanges":"\xc4nderungen verwerfen","dxDataGrid-groupPanelEmptyText":"Ziehen Sie eine Spalte hierhin, um danach zu gruppieren","dxDataGrid-noDataText":"Keine Daten","dxDataGrid-searchPanelPlaceholder":"Suchen...","dxDataGrid-filterRowShowAllText":"(Alle)","dxDataGrid-filterRowResetOperationText":"Zur\xfccksetzen","dxDataGrid-filterRowOperationEquals":"Ist gleich","dxDataGrid-filterRowOperationNotEquals":"Ist nicht gleich","dxDataGrid-filterRowOperationLess":"Kleiner als","dxDataGrid-filterRowOperationLessOrEquals":"Kleiner oder gleich","dxDataGrid-filterRowOperationGreater":"Gr\xf6\xdfer als","dxDataGrid-filterRowOperationGreaterOrEquals":"Gr\xf6\xdfer oder gleich","dxDataGrid-filterRowOperationStartsWith":"Beginnt mit","dxDataGrid-filterRowOperationContains":"Enth\xe4lt","dxDataGrid-filterRowOperationNotContains":"Enth\xe4lt nicht","dxDataGrid-filterRowOperationEndsWith":"Endet mit","dxDataGrid-filterRowOperationBetween":"Zwischen","dxDataGrid-filterRowOperationBetweenStartText":"Anfang","dxDataGrid-filterRowOperationBetweenEndText":"Ende","dxDataGrid-ariaSearchBox":"Search box","dxDataGrid-applyFilterText":"Filter anwenden","dxDataGrid-trueText":"wahr","dxDataGrid-falseText":"falsch","dxDataGrid-sortingAscendingText":"Aufsteigend sortieren","dxDataGrid-sortingDescendingText":"Absteigend sortieren","dxDataGrid-sortingClearText":"Sortierung aufheben","dxDataGrid-ariaNotSortedColumn":"Not sorted column","dxDataGrid-ariaSortedAscendingColumn":"Column sorted in ascending order","dxDataGrid-ariaSortedDescendingColumn":"Column sorted in descending order","dxDataGrid-ariaSortIndex":"Sort index {0}","dxDataGrid-editingSaveAllChanges":"\xc4nderungen speichern","dxDataGrid-editingCancelAllChanges":"\xc4nderungen verwerfen","dxDataGrid-editingAddRow":"Neue Zeile","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Minimum von {1} ist {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Maximum von {1} ist {0}","dxDataGrid-summaryAvg":"\xd8: {0}","dxDataGrid-summaryAvgOtherColumn":"Durchschnitt von {1} ist {0}","dxDataGrid-summarySum":"Summe: {0}","dxDataGrid-summarySumOtherColumn":"Summe von {1} ist {0}","dxDataGrid-summaryCount":"Anzahl: {0}","dxDataGrid-columnFixingFix":"Fixieren","dxDataGrid-columnFixingUnfix":"L\xf6sen","dxDataGrid-columnFixingLeftPosition":"Nach links","dxDataGrid-columnFixingRightPosition":"Nach rechts","dxDataGrid-exportTo":"Exportieren","dxDataGrid-exportToExcel":"Exportieren als Excel-Datei","dxDataGrid-exporting":"Exportieren ...","dxDataGrid-excelFormat":"Excel-Datei","dxDataGrid-selectedRows":"Ausgew\xe4hlte Zeilen","dxDataGrid-exportSelectedRows":"Ausgew\xe4hlte Zeilen exportieren nach {0}","dxDataGrid-exportAll":"Alle Daten exportieren nach {0}","dxDataGrid-headerFilterLabel":"Filteroptionen","dxDataGrid-headerFilterIndicatorLabel":"Filteroptionen f\xfcr Spalte \'{0}\' anzeigen","dxDataGrid-headerFilterEmptyValue":"(Leerwerte)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Abbrechen","dxDataGrid-ariaAdaptiveCollapse":"Zus\xe4tzliche Spalten verstecken","dxDataGrid-ariaAdaptiveExpand":"Zus\xe4tzliche Spalten anzeigen","dxDataGrid-ariaColumn":"Spalte","dxDataGrid-ariaColumnHeader":"Column header","dxDataGrid-ariaValue":"Wert","dxDataGrid-ariaError":"Error","dxDataGrid-ariaRevertButton":"Press Escape to discard the changes","dxDataGrid-ariaFilterCell":"Filterzelle","dxDataGrid-ariaCollapse":"Zusammenklappen","dxDataGrid-ariaModifiedCell":"Modified","dxDataGrid-ariaDeletedCell":"Deleted","dxDataGrid-ariaEditableCell":"Editable","dxDataGrid-ariaExpand":"Aufklappen","dxDataGrid-ariaCollapsedRow":"Collapsed row","dxDataGrid-ariaExpandedRow":"Expanded row","dxDataGrid-ariaDataGrid":"Datentabelle mit {0} Zeilen und {1} Spalten","dxDataGrid-ariaSearchInGrid":"Suchen in der Datentabelle","dxDataGrid-ariaSelectAll":"Alle ausw\xe4hlen","dxDataGrid-ariaSelectRow":"Zeile ausw\xe4hlen","dxDataGrid-ariaToolbar":"Symbolleiste der Datentabelle","dxDataGrid-ariaEditForm":"Edit form","dxDataGrid-filterBuilderPopupTitle":"Filter-Generator","dxDataGrid-filterPanelCreateFilter":"Filter erzeugen","dxDataGrid-filterPanelClearFilter":"Zur\xfccksetzen","dxDataGrid-filterPanelFilterEnabledHint":"Filter aktivieren","dxDataGrid-masterDetail":"Cell with details","dxTreeList-ariaTreeList":"TreeList mit {0} Zeilen und {1} Spalten","dxTreeList-ariaSearchInGrid":"Suchen in der Strukturliste","dxTreeList-ariaToolbar":"Symbolleiste der Strukturliste","dxTreeList-editingAddRowToNode":"Hinzuf\xfcgen","dxPager-infoText":"Seite {0} von {1} ({2} Elemente)","dxPager-pagesCountText":"von","dxPager-pageSize":"Elemente pro Seite: {0}","dxPager-pageSizesAllText":"Alle","dxPager-page":"Seite {0}","dxPager-prevPage":"Vorherige Seite","dxPager-nextPage":"N\xe4chste Seite","dxPager-ariaLabel":"Seitennavigation","dxPager-ariaPageSize":"Seitenl\xe4nge","dxPager-ariaPageNumber":"Seitennummer","dxPivotGrid-grandTotal":"Gesamt","dxPivotGrid-total":"{0} Gesamt","dxPivotGrid-fieldChooserTitle":"Feldauswahl","dxPivotGrid-showFieldChooser":"Feldauswahl anzeigen","dxPivotGrid-expandAll":"Alle aufklappen","dxPivotGrid-collapseAll":"Alle zusammenklappen","dxPivotGrid-sortColumnBySummary":"\\"{0}\\" nach dieser Spalte sortieren","dxPivotGrid-sortRowBySummary":"\\"{0}\\" nach dieser Zeile sortieren","dxPivotGrid-removeAllSorting":"Sortierungen entfernen","dxPivotGrid-dataNotAvailable":"Entf.","dxPivotGrid-rowFields":"Zeilenfelder","dxPivotGrid-columnFields":"Spaltenfelder","dxPivotGrid-dataFields":"Datenfelder","dxPivotGrid-filterFields":"Filterfelder","dxPivotGrid-allFields":"Alle Felder","dxPivotGrid-columnFieldArea":"Spaltenfelder hierher ziehen","dxPivotGrid-dataFieldArea":"Datenfelder hierher ziehen","dxPivotGrid-rowFieldArea":"Zeilenfelder hierher ziehen","dxPivotGrid-filterFieldArea":"Filterfelder hierher ziehen","dxScheduler-editorLabelTitle":"Betreff","dxScheduler-editorLabelStartDate":"Anfangszeit","dxScheduler-editorLabelEndDate":"Endzeit","dxScheduler-editorLabelDescription":"Beschreibung","dxScheduler-editorLabelRecurrence":"Wiederholen","dxScheduler-openAppointment":"Termin \xf6ffnen","dxScheduler-recurrenceNever":"Nie","dxScheduler-recurrenceMinutely":"Min\xfctlich","dxScheduler-recurrenceHourly":"St\xfcndlich","dxScheduler-recurrenceDaily":"T\xe4glich","dxScheduler-recurrenceWeekly":"W\xf6chentlich","dxScheduler-recurrenceMonthly":"Monatlich","dxScheduler-recurrenceYearly":"J\xe4hrlich","dxScheduler-recurrenceRepeatEvery":"Wiederholen alle","dxScheduler-recurrenceRepeatOn":"Wiederholen an","dxScheduler-recurrenceEnd":"Wiederholungsende","dxScheduler-recurrenceAfter":"Nach","dxScheduler-recurrenceOn":"Am","dxScheduler-recurrenceRepeatMinutely":"Minute(n)","dxScheduler-recurrenceRepeatHourly":"Stunde(n)","dxScheduler-recurrenceRepeatDaily":"Tag(e)","dxScheduler-recurrenceRepeatWeekly":"Woche(n)","dxScheduler-recurrenceRepeatMonthly":"Monat(e)","dxScheduler-recurrenceRepeatYearly":"Jahr(e)","dxScheduler-switcherDay":"Tag","dxScheduler-switcherWeek":"Woche","dxScheduler-switcherWorkWeek":"Arbeitswoche","dxScheduler-switcherMonth":"Monat","dxScheduler-switcherAgenda":"Agenda","dxScheduler-switcherTimelineDay":"Zeitstrahl Tag","dxScheduler-switcherTimelineWeek":"Zeitstrahl Woche","dxScheduler-switcherTimelineWorkWeek":"Zeitstrahl Arbeitswoche","dxScheduler-switcherTimelineMonth":"Zeitstrahl Monat","dxScheduler-recurrenceRepeatOnDate":"am Datum","dxScheduler-recurrenceRepeatCount":"Ereignisse","dxScheduler-allDay":"Ganzt\xe4gig","dxScheduler-confirmRecurrenceEditTitle":"Wiederkehrenden Termin bearbeiten","dxScheduler-confirmRecurrenceDeleteTitle":"Wiederkehrenden Termin l\xf6schen","dxScheduler-confirmRecurrenceEditMessage":"M\xf6chten Sie nur diesen Termin bearbeiten, oder die gesamte Serie?","dxScheduler-confirmRecurrenceDeleteMessage":"M\xf6chten Sie nur diesen Termin l\xf6schen, oder die gesamte Serie?","dxScheduler-confirmRecurrenceEditSeries":"Serie bearbeiten","dxScheduler-confirmRecurrenceDeleteSeries":"Serie l\xf6schen","dxScheduler-confirmRecurrenceEditOccurrence":"Termin bearbeiten","dxScheduler-confirmRecurrenceDeleteOccurrence":"Termin l\xf6schen","dxScheduler-noTimezoneTitle":"Keine Zeitzone","dxScheduler-moreAppointments":"{0} weitere","dxCalendar-currentDay":"Today","dxCalendar-currentMonth":"Current month","dxCalendar-currentYear":"Current year","dxCalendar-currentYearRange":"Current year range","dxCalendar-todayButtonText":"Heute","dxCalendar-ariaWidgetName":"Kalendar","dxCalendar-previousMonthButtonLabel":"Previous month","dxCalendar-previousYearButtonLabel":"Previous year","dxCalendar-previousDecadeButtonLabel":"Previous decade","dxCalendar-previousCenturyButtonLabel":"Previous century","dxCalendar-nextMonthButtonLabel":"Next month","dxCalendar-nextYearButtonLabel":"Next year","dxCalendar-nextDecadeButtonLabel":"Next decade","dxCalendar-nextCenturyButtonLabel":"Next century","dxCalendar-captionMonthLabel":"Month selection","dxCalendar-captionYearLabel":"Year selection","dxCalendar-captionDecadeLabel":"Decade selection","dxCalendar-captionCenturyLabel":"Century selection","dxCalendar-selectedDate":"The selected date is {0}","dxCalendar-selectedDateRange":"The selected date range is from {0} to {1}","dxColorView-ariaRed":"Rot","dxColorView-ariaGreen":"Gr\xfcn","dxColorView-ariaBlue":"Blau","dxColorView-ariaAlpha":"Transparenz","dxColorView-ariaHex":"Farbwert","dxTagBox-selected":"{0} ausgew\xe4hlt","dxTagBox-allSelected":"Alle ausgew\xe4hlt ({0})","dxTagBox-moreSelected":"{0} weitere","dxTagBox-tagRoleDescription":"Tag. Press the delete button to remove this tag","vizExport-printingButtonText":"Drucken","vizExport-titleMenuText":"Export/Druck","vizExport-exportButtonText":"{0}-Datei","dxFilterBuilder-and":"Und","dxFilterBuilder-or":"Oder","dxFilterBuilder-notAnd":"Nicht Und","dxFilterBuilder-notOr":"Nicht Oder","dxFilterBuilder-addCondition":"Bedingung hinzuf\xfcgen","dxFilterBuilder-addGroup":"Gruppe hinzuf\xfcgen","dxFilterBuilder-enterValueText":"<Wert eingeben>","dxFilterBuilder-filterOperationEquals":"Ist gleich","dxFilterBuilder-filterOperationNotEquals":"Ist nicht gleich","dxFilterBuilder-filterOperationLess":"Kleiner als","dxFilterBuilder-filterOperationLessOrEquals":"Kleiner oder gleich","dxFilterBuilder-filterOperationGreater":"Gr\xf6\xdfer als","dxFilterBuilder-filterOperationGreaterOrEquals":"Gr\xf6\xdfer oder gleich","dxFilterBuilder-filterOperationStartsWith":"Beginnt mit","dxFilterBuilder-filterOperationContains":"Enth\xe4lt","dxFilterBuilder-filterOperationNotContains":"Enth\xe4lt nicht","dxFilterBuilder-filterOperationEndsWith":"Endet mit","dxFilterBuilder-filterOperationIsBlank":"Ist leer","dxFilterBuilder-filterOperationIsNotBlank":"Ist nicht leer","dxFilterBuilder-filterOperationBetween":"Zwischen","dxFilterBuilder-filterOperationAnyOf":"Ist enthalten in","dxFilterBuilder-filterOperationNoneOf":"Ist nicht enthalten in","dxHtmlEditor-dialogColorCaption":"Schriftfarbe \xe4ndern","dxHtmlEditor-dialogBackgroundCaption":"Hintergrundfarbe \xe4ndern","dxHtmlEditor-dialogLinkCaption":"Link hinzuf\xfcgen","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Text","dxHtmlEditor-dialogLinkTargetField":"Link in neuem Fenster \xf6ffnen","dxHtmlEditor-dialogImageCaption":"Bild hinzuf\xfcgen","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Alternativer Text","dxHtmlEditor-dialogImageWidthField":"Breite (px)","dxHtmlEditor-dialogImageHeightField":"Bildh\xf6he (px)","dxHtmlEditor-dialogInsertTableRowsField":"Zeilen","dxHtmlEditor-dialogInsertTableColumnsField":"Spalten","dxHtmlEditor-dialogInsertTableCaption":"Tabelle einf\xfcgen","dxHtmlEditor-dialogUpdateImageCaption":"Bild Aktualisieren","dxHtmlEditor-dialogImageUpdateButton":"Aktualisieren","dxHtmlEditor-dialogImageAddButton":"Hinzuf\xfcgen","dxHtmlEditor-dialogImageSpecifyUrl":"Aus dem Web","dxHtmlEditor-dialogImageSelectFile":"Von diesem Ger\xe4t","dxHtmlEditor-dialogImageKeepAspectRatio":"Seitenverh\xe4ltnis beibehalten","dxHtmlEditor-dialogImageEncodeToBase64":"Als Base64 kodieren","dxHtmlEditor-heading":"\xdcberschrift","dxHtmlEditor-normalText":"Normaler Text","dxHtmlEditor-background":"Hintergrundfarbe","dxHtmlEditor-bold":"Fett","dxHtmlEditor-color":"Schriftfarbe","dxHtmlEditor-font":"Schriftart","dxHtmlEditor-italic":"Kursiv","dxHtmlEditor-link":"Link hinzuf\xfcgen","dxHtmlEditor-image":"Bild hinzuf\xfcgen","dxHtmlEditor-size":"Schriftgr\xf6\xdfe","dxHtmlEditor-strike":"Durchgestrichen","dxHtmlEditor-subscript":"Tiefgestellt","dxHtmlEditor-superscript":"Hochgestellt","dxHtmlEditor-underline":"Unterstrichen","dxHtmlEditor-blockquote":"Blockzitat","dxHtmlEditor-header":"Kopfzeile","dxHtmlEditor-increaseIndent":"Einzug vergr\xf6\xdfern","dxHtmlEditor-decreaseIndent":"Einzug verkleinern","dxHtmlEditor-orderedList":"Sortierte Liste","dxHtmlEditor-bulletList":"Aufz\xe4hlung","dxHtmlEditor-alignLeft":"Linksb\xfcndig","dxHtmlEditor-alignCenter":"Zentriert","dxHtmlEditor-alignRight":"Rechtsb\xfcndig","dxHtmlEditor-alignJustify":"Blocksatz","dxHtmlEditor-codeBlock":"Codeblock","dxHtmlEditor-variable":"Variable hinzuf\xfcgen","dxHtmlEditor-undo":"R\xfcckg\xe4ngig","dxHtmlEditor-redo":"Wiederholen","dxHtmlEditor-clear":"Formate l\xf6schen","dxHtmlEditor-insertTable":"Tabelle einf\xfcgen","dxHtmlEditor-insertHeaderRow":"Kopfzeile einf\xfcgen","dxHtmlEditor-insertRowAbove":"Zeile oberhalb einf\xfcgen","dxHtmlEditor-insertRowBelow":"Zeile unterhalb einf\xfcgen","dxHtmlEditor-insertColumnLeft":"Spalte links einf\xfcgen","dxHtmlEditor-insertColumnRight":"Spalte rechts einf\xfcgen","dxHtmlEditor-deleteColumn":"Spalte l\xf6schen","dxHtmlEditor-deleteRow":"Zeile l\xf6schen","dxHtmlEditor-deleteTable":"Tabelle l\xf6schen","dxHtmlEditor-cellProperties":"Zelleneigenschaften","dxHtmlEditor-tableProperties":"Tabelleneigenschaften","dxHtmlEditor-insert":"Einf\xfcgen","dxHtmlEditor-delete":"L\xf6schen","dxHtmlEditor-border":"Rahmen","dxHtmlEditor-style":"Stil","dxHtmlEditor-width":"Breite","dxHtmlEditor-height":"H\xf6he","dxHtmlEditor-borderColor":"Farbe","dxHtmlEditor-tableBackground":"Hintergrund","dxHtmlEditor-dimensions":"Abmessungen","dxHtmlEditor-alignment":"Ausrichtung","dxHtmlEditor-horizontal":"Horizontal","dxHtmlEditor-vertical":"Vertikal","dxHtmlEditor-paddingVertical":"Vertikaler Abstand","dxHtmlEditor-paddingHorizontal":"Horizontaler Abstand","dxHtmlEditor-pixels":"Pixel","dxHtmlEditor-list":"Liste","dxHtmlEditor-ordered":"Sortiert","dxHtmlEditor-bullet":"Aufz\xe4hlung","dxHtmlEditor-align":"Ausrichten","dxHtmlEditor-center":"Zentrieren","dxHtmlEditor-left":"Links","dxHtmlEditor-right":"Rechts","dxHtmlEditor-indent":"Einzug","dxHtmlEditor-justify":"Blocksatz","dxHtmlEditor-borderStyleNone":"none","dxHtmlEditor-borderStyleHidden":"hidden","dxHtmlEditor-borderStyleDotted":"dotted","dxHtmlEditor-borderStyleDashed":"dashed","dxHtmlEditor-borderStyleSolid":"solid","dxHtmlEditor-borderStyleDouble":"double","dxHtmlEditor-borderStyleGroove":"groove","dxHtmlEditor-borderStyleRidge":"ridge","dxHtmlEditor-borderStyleInset":"inset","dxHtmlEditor-borderStyleOutset":"outset","dxFileManager-newDirectoryName":"Ohne Titel","dxFileManager-rootDirectoryName":"Dateien","dxFileManager-errorNoAccess":"Zugriff verweigert. Die Operation kann nicht durchgef\xfchrt werden.","dxFileManager-errorDirectoryExistsFormat":"Ordner {0} existiert bereits.","dxFileManager-errorFileExistsFormat":"Datei {0} existiert bereits.","dxFileManager-errorFileNotFoundFormat":"Datei {0} wurde nicht gefunden.","dxFileManager-errorDirectoryNotFoundFormat":"Verzeichnis \'{0}\' nicht gefunden.","dxFileManager-errorWrongFileExtension":"Dateierweiterung ist nicht erlaubt.","dxFileManager-errorMaxFileSizeExceeded":"Die Dateigr\xf6\xdfe \xfcbersteigt die maximal erlaubte Gr\xf6\xdfe.","dxFileManager-errorInvalidSymbols":"Der Dateiname enth\xe4lt ung\xfcltige Zeichen.","dxFileManager-errorDefault":"Unbekannter Fehler","dxFileManager-errorDirectoryOpenFailed":"Das Verzeichnis kann nicht ge\xf6ffnet werden","dxFileManager-commandCreate":"Neues Verzeichnis","dxFileManager-commandRename":"Umbenennen","dxFileManager-commandMove":"Verschieben nach","dxFileManager-commandCopy":"Kopieren nach","dxFileManager-commandDelete":"L\xf6schen","dxFileManager-commandDownload":"Herunterladen","dxFileManager-commandUpload":"Dateien hochladen","dxFileManager-commandRefresh":"Aktualisieren","dxFileManager-commandThumbnails":"Miniaturansicht","dxFileManager-commandDetails":"Detailansicht","dxFileManager-commandClearSelection":"Auswahl aufheben","dxFileManager-commandShowNavPane":"Navigationsbereich ein-/ausschalten","dxFileManager-dialogDirectoryChooserMoveTitle":"Verschieben nach","dxFileManager-dialogDirectoryChooserMoveButtonText":"Verschieben","dxFileManager-dialogDirectoryChooserCopyTitle":"Kopieren nach","dxFileManager-dialogDirectoryChooserCopyButtonText":"Kopieren","dxFileManager-dialogRenameItemTitle":"Umbenennen","dxFileManager-dialogRenameItemButtonText":"Speichern","dxFileManager-dialogCreateDirectoryTitle":"Neues Verzeichnis","dxFileManager-dialogCreateDirectoryButtonText":"Erstellen","dxFileManager-dialogDeleteItemTitle":"L\xf6schen","dxFileManager-dialogDeleteItemButtonText":"L\xf6schen","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Sind Sie sicher, dass Sie {0} l\xf6schen m\xf6chten?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Sind Sie sicher, dass Sie {0} Elemente l\xf6schen m\xf6chten?","dxFileManager-dialogButtonCancel":"Abbrechen","dxFileManager-editingCreateSingleItemProcessingMessage":"Ein Verzeichnis wird in {0} erstellt","dxFileManager-editingCreateSingleItemSuccessMessage":"Ein Verzeichnis wurde in {0} erstellt","dxFileManager-editingCreateSingleItemErrorMessage":"Verzeichnis wurde nicht erstellt","dxFileManager-editingCreateCommonErrorMessage":"Verzeichnis wurde nicht erstellt","dxFileManager-editingRenameSingleItemProcessingMessage":"Ein Element in {0} wird umbenannt","dxFileManager-editingRenameSingleItemSuccessMessage":"Ein Element in {0} wurde umbenannt","dxFileManager-editingRenameSingleItemErrorMessage":"Element wurde nicht umbenannt","dxFileManager-editingRenameCommonErrorMessage":"Element wurde nicht umbenannt","dxFileManager-editingDeleteSingleItemProcessingMessage":"Ein Element aus {0} wird gel\xf6scht","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"{0} Elemente aus {1} werden gel\xf6scht","dxFileManager-editingDeleteSingleItemSuccessMessage":"Ein Element aus {0} wurde gel\xf6scht","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"{0} Elemente aus {1} wurden gel\xf6scht","dxFileManager-editingDeleteSingleItemErrorMessage":"Element wurde nicht gel\xf6scht","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} Elemente wurden nicht gel\xf6scht","dxFileManager-editingDeleteCommonErrorMessage":"Einige Elemente wurden nicht gel\xf6scht","dxFileManager-editingMoveSingleItemProcessingMessage":"Ein Element wird nach {0} verschoben","dxFileManager-editingMoveMultipleItemsProcessingMessage":"{0} Elemente werden nach {1} verschoben","dxFileManager-editingMoveSingleItemSuccessMessage":"Ein Element wurde nach {0} verschoben","dxFileManager-editingMoveMultipleItemsSuccessMessage":"{0} Elemente wurden nach {1} verschoben","dxFileManager-editingMoveSingleItemErrorMessage":"Element wurde nicht verschoben","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} Elemente wurden nicht verschoben","dxFileManager-editingMoveCommonErrorMessage":"Einige Elemente wurden nicht verschoben","dxFileManager-editingCopySingleItemProcessingMessage":"Ein Element wird nach {0} kopiert","dxFileManager-editingCopyMultipleItemsProcessingMessage":"{0} Elemente werden nach {1} kopiert","dxFileManager-editingCopySingleItemSuccessMessage":"Ein Element wurde nach {0} kopiert","dxFileManager-editingCopyMultipleItemsSuccessMessage":"{0} Elemente wurden nach {1} kopiert","dxFileManager-editingCopySingleItemErrorMessage":"Element wurde nicht kopiert","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} Elemente wurden nicht kopiert","dxFileManager-editingCopyCommonErrorMessage":"Einige Elemente wurden nicht kopiert","dxFileManager-editingUploadSingleItemProcessingMessage":"Ein Element wird nach {0} hochgeladen","dxFileManager-editingUploadMultipleItemsProcessingMessage":"{0} Elemente werden nach {1} hochgeladen","dxFileManager-editingUploadSingleItemSuccessMessage":"Ein Element wurde nach {0} hochgeladen","dxFileManager-editingUploadMultipleItemsSuccessMessage":"{0} Elemente wurden nach {1} hochgeladen","dxFileManager-editingUploadSingleItemErrorMessage":"Element wurde nicht hochgeladen","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} Elemente wurden nicht hochgeladen","dxFileManager-editingUploadCanceledMessage":"Abgebrochen","dxFileManager-editingDownloadSingleItemErrorMessage":"Datei wurde nicht heruntergeladen","dxFileManager-editingDownloadMultipleItemsErrorMessage":"{0} Dateien wurden nicht heruntergeladen","dxFileManager-listDetailsColumnCaptionName":"Name","dxFileManager-listDetailsColumnCaptionDateModified":"Zuletzt ge\xe4ndert am","dxFileManager-listDetailsColumnCaptionFileSize":"Dateigr\xf6\xdfe","dxFileManager-listThumbnailsTooltipTextSize":"Gr\xf6\xdfe","dxFileManager-listThumbnailsTooltipTextDateModified":"Zuletzt ge\xe4ndert am","dxFileManager-notificationProgressPanelTitle":"Fortschritt","dxFileManager-notificationProgressPanelEmptyListText":"Keine Vorg\xe4nge","dxFileManager-notificationProgressPanelOperationCanceled":"Abgebrochen","dxDiagram-categoryGeneral":"Allgemein","dxDiagram-categoryFlowchart":"Flussdiagramm","dxDiagram-categoryOrgChart":"Organisationsdiagramm","dxDiagram-categoryContainers":"Container","dxDiagram-categoryCustom":"Benutzerdefiniert","dxDiagram-commandExportToSvg":"Export als SVG","dxDiagram-commandExportToPng":"Export als PNG","dxDiagram-commandExportToJpg":"Export als JPEG","dxDiagram-commandUndo":"R\xfcckg\xe4ngig","dxDiagram-commandRedo":"Wiederherstellen","dxDiagram-commandFontName":"Schriftartname","dxDiagram-commandFontSize":"Schriftgr\xf6\xdfe","dxDiagram-commandBold":"Fett","dxDiagram-commandItalic":"Kursiv","dxDiagram-commandUnderline":"Unterstrichen","dxDiagram-commandTextColor":"Textfarbe","dxDiagram-commandLineColor":"Linienfarbe","dxDiagram-commandLineWidth":"Linienst\xe4rke","dxDiagram-commandLineStyle":"Linienart","dxDiagram-commandLineStyleSolid":"Durchgezogen","dxDiagram-commandLineStyleDotted":"Gepunktet","dxDiagram-commandLineStyleDashed":"Gestrichelt","dxDiagram-commandFillColor":"F\xfcllfarbe","dxDiagram-commandAlignLeft":"Linksb\xfcndig","dxDiagram-commandAlignCenter":"Zentriert","dxDiagram-commandAlignRight":"Rechtsb\xfcndig","dxDiagram-commandConnectorLineType":"Konnektor Linienart","dxDiagram-commandConnectorLineStraight":"Gerade","dxDiagram-commandConnectorLineOrthogonal":"Rechtwinklig","dxDiagram-commandConnectorLineStart":"Konnektor Linienanfang","dxDiagram-commandConnectorLineEnd":"Konnektor Linienende","dxDiagram-commandConnectorLineNone":"Keine","dxDiagram-commandConnectorLineArrow":"Pfeil","dxDiagram-commandFullscreen":"Vollbild","dxDiagram-commandUnits":"Einheiten","dxDiagram-commandPageSize":"Seitengr\xf6\xdfe","dxDiagram-commandPageOrientation":"Seitenausrichtung","dxDiagram-commandPageOrientationLandscape":"Querformat","dxDiagram-commandPageOrientationPortrait":"Hochformat","dxDiagram-commandPageColor":"Seitenfarbe","dxDiagram-commandShowGrid":"Raster anzeigen","dxDiagram-commandSnapToGrid":"Am Raster ausrichten","dxDiagram-commandGridSize":"Rastergr\xf6\xdfe","dxDiagram-commandZoomLevel":"Vergr\xf6\xdferungsstufe","dxDiagram-commandAutoZoom":"Automatische Vergr\xf6\xdferung","dxDiagram-commandFitToContent":"An Inhalt anpassen","dxDiagram-commandFitToWidth":"An Breite anpassen","dxDiagram-commandAutoZoomByContent":"Automatisch an Inhalt anpassen","dxDiagram-commandAutoZoomByWidth":"Automatisch an Breite anpassen","dxDiagram-commandSimpleView":"Einfache Ansicht","dxDiagram-commandCut":"Ausschneiden","dxDiagram-commandCopy":"Kopieren","dxDiagram-commandPaste":"Einf\xfcgen","dxDiagram-commandSelectAll":"Alles ausw\xe4hlen","dxDiagram-commandDelete":"L\xf6schen","dxDiagram-commandBringToFront":"In den Vordergrund","dxDiagram-commandSendToBack":"In den Hintergrund","dxDiagram-commandLock":"Sperren","dxDiagram-commandUnlock":"Entsperren","dxDiagram-commandInsertShapeImage":"Bild einf\xfcgen...","dxDiagram-commandEditShapeImage":"Bild bearbeiten...","dxDiagram-commandDeleteShapeImage":"Bild l\xf6schen","dxDiagram-commandLayoutLeftToRight":"Von links nach rechts","dxDiagram-commandLayoutRightToLeft":"Von rechts nach links","dxDiagram-commandLayoutTopToBottom":"Von oben nach unten","dxDiagram-commandLayoutBottomToTop":"Von unten nach oben","dxDiagram-unitIn":"in","dxDiagram-unitCm":"cm","dxDiagram-unitPx":"px","dxDiagram-dialogButtonOK":"OK","dxDiagram-dialogButtonCancel":"Abbrechen","dxDiagram-dialogInsertShapeImageTitle":"Bild einf\xfcgen","dxDiagram-dialogEditShapeImageTitle":"Bild bearbeiten","dxDiagram-dialogEditShapeImageSelectButton":"Bild ausw\xe4hlen","dxDiagram-dialogEditShapeImageLabelText":"oder Datei hier ablegen","dxDiagram-uiExport":"Export","dxDiagram-uiProperties":"Eigenschaften","dxDiagram-uiSettings":"Einstellungen","dxDiagram-uiShowToolbox":"Toolbox anzeigen","dxDiagram-uiSearch":"Suchen","dxDiagram-uiStyle":"Stil","dxDiagram-uiLayout":"Layout","dxDiagram-uiLayoutTree":"Baum","dxDiagram-uiLayoutLayered":"Mehrschichtig","dxDiagram-uiDiagram":"Diagramm","dxDiagram-uiText":"Text","dxDiagram-uiObject":"Objekt","dxDiagram-uiConnector":"Verbindung","dxDiagram-uiPage":"Seite","dxDiagram-shapeText":"Text","dxDiagram-shapeRectangle":"Rechteck","dxDiagram-shapeEllipse":"Ellipse","dxDiagram-shapeCross":"Kreuz","dxDiagram-shapeTriangle":"Dreieck","dxDiagram-shapeDiamond":"Raute","dxDiagram-shapeHeart":"Herz","dxDiagram-shapePentagon":"F\xfcnfeck","dxDiagram-shapeHexagon":"Sechseck","dxDiagram-shapeOctagon":"Achteck","dxDiagram-shapeStar":"Stern","dxDiagram-shapeArrowLeft":"Pfeil nach links","dxDiagram-shapeArrowUp":"Pfeil nach oben","dxDiagram-shapeArrowRight":"Pfeil nach rechts","dxDiagram-shapeArrowDown":"Pfeil nach unten","dxDiagram-shapeArrowUpDown":"Pfeil nach oben und unten","dxDiagram-shapeArrowLeftRight":"Pfeil nach links und rechts","dxDiagram-shapeProcess":"Prozess","dxDiagram-shapeDecision":"Entscheidung","dxDiagram-shapeTerminator":"Abschluss","dxDiagram-shapePredefinedProcess":"Vordefinierter Prozess","dxDiagram-shapeDocument":"Dokument","dxDiagram-shapeMultipleDocuments":"Mehrere Dokumente","dxDiagram-shapeManualInput":"Manuelle Eingabe","dxDiagram-shapePreparation":"Vorbereitung","dxDiagram-shapeData":"Daten","dxDiagram-shapeDatabase":"Datenbank","dxDiagram-shapeHardDisk":"Festplatte","dxDiagram-shapeInternalStorage":"Lokaler Speicher","dxDiagram-shapePaperTape":"Lochstreifen","dxDiagram-shapeManualOperation":"Manuelle Verarbeitung","dxDiagram-shapeDelay":"Verz\xf6gerung","dxDiagram-shapeStoredData":"Gespeicherte Daten","dxDiagram-shapeDisplay":"Anzeige","dxDiagram-shapeMerge":"Zusammenf\xfchren","dxDiagram-shapeConnector":"Verbinder","dxDiagram-shapeOr":"Oder","dxDiagram-shapeSummingJunction":"Summierungsknoten","dxDiagram-shapeContainerDefaultText":"Container","dxDiagram-shapeVerticalContainer":"Vertikaler Container","dxDiagram-shapeHorizontalContainer":"Horizontaler Container","dxDiagram-shapeCardDefaultText":"Name der Person","dxDiagram-shapeCardWithImageOnLeft":"Karte mit Bild links","dxDiagram-shapeCardWithImageOnTop":"Karte mit Bild oben","dxDiagram-shapeCardWithImageOnRight":"Karte mit Bild rechts","dxGantt-dialogTitle":"Titel","dxGantt-dialogStartTitle":"Beginn","dxGantt-dialogEndTitle":"Ende","dxGantt-dialogProgressTitle":"Fortschritt","dxGantt-dialogResourcesTitle":"Ressourcen","dxGantt-dialogResourceManagerTitle":"Ressourcen-Manager","dxGantt-dialogTaskDetailsTitle":"Aufgabendetails","dxGantt-dialogEditResourceListHint":"Ressourcenliste bearbeiten","dxGantt-dialogEditNoResources":"Keine Ressourcen","dxGantt-dialogButtonAdd":"Hinzuf\xfcgen","dxGantt-contextMenuNewTask":"Neue Aufgabe","dxGantt-contextMenuNewSubtask":"Neue Teilaufgabe","dxGantt-contextMenuDeleteTask":"Aufgabe l\xf6schen","dxGantt-contextMenuDeleteDependency":"Abh\xe4ngigkeit entfernen","dxGantt-dialogTaskDeleteConfirmation":"Abh\xe4ngigkeiten und Teilaufgaben werden zusammen mit dieser Aufgabe gel\xf6scht. M\xf6chten Sie diese Aufgabe l\xf6schen?","dxGantt-dialogDependencyDeleteConfirmation":"M\xf6chten Sie die Abh\xe4ngigkeit von der Aufgabe entfernen?","dxGantt-dialogResourcesDeleteConfirmation":"Wenn Sie diese Ressource l\xf6schen, wird sie von allen Aufgaben entfernt. M\xf6chten Sie die Ressource l\xf6schen? Ressource: {0}","dxGantt-dialogConstraintCriticalViolationMessage":"Die Aufgabe, die Sie verschieben m\xf6chten, ist mit einer zweiten Aufgabe durch eine Abh\xe4ngigkeit verbunden. Die \xc4nderung w\xfcrde gegen Abh\xe4ngigkeitsregeln verstossen. Wie m\xf6chten Sie fortfahren?","dxGantt-dialogConstraintViolationMessage":"Die Aufgabe, die Sie verschieben m\xf6chten, ist mit einer zweiten Aufgabe durch eine Abh\xe4ngigkeit verbunden. Wie m\xf6chten Sie fortfahren?","dxGantt-dialogCancelOperationMessage":"Vorgang abbrechen","dxGantt-dialogDeleteDependencyMessage":"Abh\xe4ngigkeit l\xf6schen","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"Aufgabe verschieben und Abh\xe4ngigkeit beibehalten","dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"Die Aufgabe, die Sie zu verschieben versuchen, ist mit anderen Aufgaben durch Abh\xe4ngigkeitsbeziehungen verbunden. Die \xc4nderung verst\xf6\xdft daher gegen Abh\xe4ngigkeitsregeln. Wie m\xf6chten Sie fortfahren?","dxGantt-dialogConstraintViolationSeveralTasksMessage":"Die Aufgabe, die Sie zu verschieben versuchen, ist mit anderen Aufgaben durch Abh\xe4ngigkeitsbeziehungen verbunden. Wie m\xf6chten Sie fortfahren?","dxGantt-dialogDeleteDependenciesMessage":"Abh\xe4ngigkeitsbeziehungen entfernen","dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"Die Aufgabe verschieben und die Abh\xe4ngigkeitsbeziehungen beibehalten.","dxGantt-undo":"R\xfcckg\xe4ngig","dxGantt-redo":"Wiederherstellen","dxGantt-expandAll":"Alle erweitern","dxGantt-collapseAll":"Alle reduzieren","dxGantt-addNewTask":"Neue Aufgabe hinzuf\xfcgen","dxGantt-deleteSelectedTask":"Ausgew\xe4hlte Aufgabe l\xf6schen","dxGantt-zoomIn":"Vergr\xf6\xdfern","dxGantt-zoomOut":"Verkleinern","dxGantt-fullScreen":"Vollbildmodus","dxGantt-quarter":"Q{0}","dxGantt-sortingAscendingText":"Aufsteigend sortieren","dxGantt-sortingDescendingText":"Absteigend sortieren","dxGantt-sortingClearText":"Sortierung aufheben","dxGantt-showResources":"Ressourcen Anzeigen","dxGantt-showDependencies":"Abh\xe4ngigkeiten Anzeigen","dxGantt-dialogStartDateValidation":"Startdatum muss sp\xe4ter sein als {0}","dxGantt-dialogEndDateValidation":"Enddatum muss sp\xe4ter sein als {0}","dxGallery-itemName":"Gallery item","dxMultiView-elementAriaRoleDescription":"MultiView","dxMultiView-elementAriaLabel":"Use the arrow keys or swipe to navigate between views","dxMultiView-itemAriaRoleDescription":"View","dxMultiView-itemAriaLabel":"{0} of {1}","dxSplitter-resizeHandleAriaLabel":"Split bar"}}'),iG=JSON.parse('{"fr":{"Yes":"Oui","No":"Non","Cancel":"Annuler","Close":"Fermer","Clear":"Vider","Done":"Termin\xe9","Loading":"Chargement...","Select":"S\xe9lection...","Search":"Recherche","Back":"Retour","OK":"OK","dxCollectionWidget-noDataText":"Pas de donn\xe9es","dxDropDownEditor-selectLabel":"S\xe9lection","validation-required":"Obligatoire","validation-required-formatted":"{0} est obligatoire","validation-numeric":"La valeur doit \xeatre un nombre","validation-numeric-formatted":"{0} doit \xeatre un nombre","validation-range":"La valeur ne se trouve pas dans la plage valide","validation-range-formatted":"{0} ne se trouve pas dans la plage valide","validation-stringLength":"La longueur de la valeur est incorrecte","validation-stringLength-formatted":"La longueur de {0} est incorrecte","validation-custom":"La valeur est invalide","validation-custom-formatted":"{0} est invalide","validation-async":"La valeur est invalide","validation-async-formatted":"{0} est invalide","validation-compare":"La valeur est inappropri\xe9e","validation-compare-formatted":"{0} est inappropri\xe9e","validation-pattern":"La valeur ne correspond pas au mod\xe8le","validation-pattern-formatted":"{0} ne correspond pas au mod\xe8le","validation-email":"L\'adresse email est invalide","validation-email-formatted":"{0} est invalide","validation-mask":"La valeur est invalide","dxLookup-searchPlaceholder":"Nombre minimum de caract\xe8res: {0}","dxList-pullingDownText":"Tirez vers le bas pour actualiser...","dxList-pulledDownText":"Relacher pour actualiser...","dxList-refreshingText":"Actualisation...","dxList-pageLoadingText":"Chargement...","dxList-nextButtonText":"Suivant","dxList-selectAll":"S\xe9lectionner tout","dxList-listAriaLabel":"Items","dxList-listAriaLabel-deletable":"Deletable items","dxListEditDecorator-delete":"Supprimer","dxListEditDecorator-more":"Plus","dxScrollView-pullingDownText":"Tirez vers le bas pour actualiser...","dxScrollView-pulledDownText":"Relacher pour actualiser...","dxScrollView-refreshingText":"Mise \xe0 jour...","dxScrollView-reachBottomText":"Chargement...","dxDateBox-simulatedDataPickerTitleTime":"Choisissez l\'heure","dxDateBox-simulatedDataPickerTitleDate":"Choisissez la date","dxDateBox-simulatedDataPickerTitleDateTime":"Choisissez la date et l\'heure","dxDateBox-validation-datetime":"La valeur doit \xeatre une date ou une heure.","dxDateRangeBox-invalidStartDateMessage":"Start value must be a date","dxDateRangeBox-invalidEndDateMessage":"End value must be a date","dxDateRangeBox-startDateOutOfRangeMessage":"Start date is out of range","dxDateRangeBox-endDateOutOfRangeMessage":"End date is out of range","dxDateRangeBox-startDateLabel":"Date de d\xe9but","dxDateRangeBox-endDateLabel":"Date de fin","dxFileUploader-selectFile":"Choisissez un fichier","dxFileUploader-dropFile":"D\xe9posez un fichier","dxFileUploader-bytes":"Bytes","dxFileUploader-kb":"KB","dxFileUploader-Mb":"MB","dxFileUploader-Gb":"GB","dxFileUploader-upload":"T\xe9l\xe9charger","dxFileUploader-uploaded":"T\xe9l\xe9charg\xe9","dxFileUploader-readyToUpload":"Pr\xeat \xe0 t\xe9l\xe9charger","dxFileUploader-uploadAbortedMessage":"T\xe9l\xe9chargement annul\xe9","dxFileUploader-uploadFailedMessage":"\xc9chec du t\xe9l\xe9chargement","dxFileUploader-invalidFileExtension":"Type de fichier non autoris\xe9","dxFileUploader-invalidMaxFileSize":"Fichier trop volumineux","dxFileUploader-invalidMinFileSize":"Fichier trop petit","dxRangeSlider-ariaFrom":"De {0}","dxRangeSlider-ariaTill":"\xe0 {0}","dxSwitch-switchedOnText":"ON","dxSwitch-switchedOffText":"OFF","dxForm-optionalMark":"optionnel","dxForm-requiredMessage":"{0} est obligatoire","dxNumberBox-invalidValueMessage":"La valeur doit \xeatre un nombre","dxNumberBox-noDataText":"Pas de donn\xe9es","dxDataGrid-emptyHeaderWithColumnChooserText":"Use {0} to display columns","dxDataGrid-emptyHeaderWithGroupPanelText":"Drag a column from the group panel here","dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText":"Use {0} or drag a column from the group panel","dxDataGrid-emptyHeaderColumnChooserText":"column chooser","dxDataGrid-columnChooserTitle":"Choisir les colonnes","dxDataGrid-columnChooserEmptyText":"Faites glisser une colonne ici pour la cacher","dxDataGrid-groupContinuesMessage":"Suite \xe0 la page suivante","dxDataGrid-groupContinuedMessage":"Suite de la page pr\xe9c\xe9dente","dxDataGrid-groupHeaderText":"Grouper avec cette colonne","dxDataGrid-ungroupHeaderText":"D\xe9grouper","dxDataGrid-ungroupAllText":"D\xe9grouper tout","dxDataGrid-editingEditRow":"Editer","dxDataGrid-editingSaveRowChanges":"Sauvegarder","dxDataGrid-editingCancelRowChanges":"Annuler","dxDataGrid-editingDeleteRow":"Supprimer","dxDataGrid-editingUndeleteRow":"Restaurer","dxDataGrid-editingConfirmDeleteMessage":"\xcates-vous s\xfbr de vouloir supprimer cet \xe9l\xe9ment ?","dxDataGrid-validationCancelChanges":"Annuler les changements","dxDataGrid-groupPanelEmptyText":"Faites glisser une colonne ICI pour grouper par celle-ci","dxDataGrid-noDataText":"Pas de donn\xe9es","dxDataGrid-searchPanelPlaceholder":"Recherche...","dxDataGrid-filterRowShowAllText":"(tous)","dxDataGrid-filterRowResetOperationText":"R\xe9initialiser","dxDataGrid-filterRowOperationEquals":"Egale","dxDataGrid-filterRowOperationNotEquals":"Diff\xe9rent de","dxDataGrid-filterRowOperationLess":"Plus petit","dxDataGrid-filterRowOperationLessOrEquals":"Plus petit ou \xe9gal","dxDataGrid-filterRowOperationGreater":"Plus grand","dxDataGrid-filterRowOperationGreaterOrEquals":"Plus grand ou \xe9gal","dxDataGrid-filterRowOperationStartsWith":"Commence par","dxDataGrid-filterRowOperationContains":"Contient","dxDataGrid-filterRowOperationNotContains":"Ne contient pas","dxDataGrid-filterRowOperationEndsWith":"Termine par","dxDataGrid-filterRowOperationBetween":"Entre","dxDataGrid-filterRowOperationBetweenStartText":"D\xe9but","dxDataGrid-filterRowOperationBetweenEndText":"Fin","dxDataGrid-ariaSearchBox":"Search box","dxDataGrid-applyFilterText":"Filtrer le texte","dxDataGrid-trueText":"Vrai","dxDataGrid-falseText":"Faux","dxDataGrid-sortingAscendingText":"Tri croissant","dxDataGrid-sortingDescendingText":"Tri d\xe9croissant","dxDataGrid-sortingClearText":"Supprimer le tri","dxDataGrid-ariaNotSortedColumn":"Not sorted column","dxDataGrid-ariaSortedAscendingColumn":"Column sorted in ascending order","dxDataGrid-ariaSortedDescendingColumn":"Column sorted in descending order","dxDataGrid-ariaSortIndex":"Sort index {0}","dxDataGrid-editingSaveAllChanges":"Sauvegarder les changements","dxDataGrid-editingCancelAllChanges":"Ignorer les changements","dxDataGrid-editingAddRow":"Ajouter ligne","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Minimum de {1} est {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Maximum de {1} est {0}","dxDataGrid-summaryAvg":"Moy: {0}","dxDataGrid-summaryAvgOtherColumn":"Moyenne de {1} est {0}","dxDataGrid-summarySum":"Somme: {0}","dxDataGrid-summarySumOtherColumn":"Somme de {1} est {0}","dxDataGrid-summaryCount":"Total: {0}","dxDataGrid-columnFixingFix":"Fixer","dxDataGrid-columnFixingUnfix":"D\xe9tacher","dxDataGrid-columnFixingLeftPosition":"A gauche","dxDataGrid-columnFixingRightPosition":"A droite","dxDataGrid-exportTo":"Exporter","dxDataGrid-exportToExcel":"Exporter sous Excel","dxDataGrid-exporting":"Exporter...","dxDataGrid-excelFormat":"Fichier Excel","dxDataGrid-selectedRows":"Lignes s\xe9lectionn\xe9es","dxDataGrid-exportSelectedRows":"Exporter les lignes s\xe9lectionn\xe9es vers {0}","dxDataGrid-exportAll":"Exporter tout vers {0}","dxDataGrid-headerFilterLabel":"Filter options","dxDataGrid-headerFilterIndicatorLabel":"Show filter options for column \'{0}\'","dxDataGrid-headerFilterEmptyValue":"(aucune valeur)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Annuler","dxDataGrid-ariaAdaptiveCollapse":"Masquer les donn\xe9es suppl\xe9mentaires","dxDataGrid-ariaAdaptiveExpand":"Afficher des donn\xe9es suppl\xe9mentaires","dxDataGrid-ariaColumn":"Colonne","dxDataGrid-ariaColumnHeader":"Column header","dxDataGrid-ariaValue":"Valeur","dxDataGrid-ariaError":"Error","dxDataGrid-ariaRevertButton":"Press Escape to discard the changes","dxDataGrid-ariaFilterCell":"Filtre de cellule","dxDataGrid-ariaCollapse":"R\xe9duire","dxDataGrid-ariaModifiedCell":"Modified","dxDataGrid-ariaDeletedCell":"Deleted","dxDataGrid-ariaEditableCell":"Editable","dxDataGrid-ariaExpand":"Etendre","dxDataGrid-ariaCollapsedRow":"Collapsed row","dxDataGrid-ariaExpandedRow":"Expanded row","dxDataGrid-ariaDataGrid":"Grille","dxDataGrid-ariaSearchInGrid":"Rechercher dans la grille","dxDataGrid-ariaSelectAll":"S\xe9lectionner tout","dxDataGrid-ariaSelectRow":"S\xe9lectionner ligne","dxDataGrid-ariaToolbar":"Barre d\'outils de la grille de donn\xe9es","dxDataGrid-ariaEditForm":"Edit form","dxDataGrid-filterBuilderPopupTitle":"Cr\xe9ation de filtre","dxDataGrid-filterPanelCreateFilter":"Cr\xe9er un filtre","dxDataGrid-filterPanelClearFilter":"Supprimer","dxDataGrid-filterPanelFilterEnabledHint":"Activer le filtre","dxDataGrid-masterDetail":"Cell with details","dxTreeList-ariaTreeList":"Tree list with {0} rows and {1} columns","dxTreeList-ariaSearchInGrid":"Rechercher dans l\'arborescence","dxTreeList-ariaToolbar":"Barre d\'outils de la liste arborescente","dxTreeList-editingAddRowToNode":"Ajouter","dxPager-infoText":"Page {0} sur {1} ({2} \xe9lements)","dxPager-pagesCountText":"sur","dxPager-pageSize":"Items per page: {0}","dxPager-pageSizesAllText":"Tous","dxPager-page":"Page {0}","dxPager-prevPage":"Previous Page","dxPager-nextPage":"Next Page","dxPager-ariaLabel":"Page Navigation","dxPager-ariaPageSize":"Page size","dxPager-ariaPageNumber":"Page number","dxPivotGrid-grandTotal":"Total g\xe9n\xe9ral","dxPivotGrid-total":"Total {0}","dxPivotGrid-fieldChooserTitle":"Liste des champs","dxPivotGrid-showFieldChooser":"Afficher la liste des champs","dxPivotGrid-expandAll":"Etendre tout","dxPivotGrid-collapseAll":"R\xe9duire tout","dxPivotGrid-sortColumnBySummary":"Trier par colonne \\"{0}\\"","dxPivotGrid-sortRowBySummary":"Trier par ligne \\"{0}\\"","dxPivotGrid-removeAllSorting":"Supprimer les tris","dxPivotGrid-dataNotAvailable":"ND","dxPivotGrid-rowFields":"Lignes","dxPivotGrid-columnFields":"Colonnes","dxPivotGrid-dataFields":"Valeurs","dxPivotGrid-filterFields":"Filtres","dxPivotGrid-allFields":"Tous les champs","dxPivotGrid-columnFieldArea":"D\xe9poser les champs de colonne ici","dxPivotGrid-dataFieldArea":"D\xe9poser les champs de donn\xe9es ici","dxPivotGrid-rowFieldArea":"D\xe9poser les champs de ligne ici","dxPivotGrid-filterFieldArea":"D\xe9poser les champs de filtre ici","dxScheduler-editorLabelTitle":"Titre","dxScheduler-editorLabelStartDate":"Date de d\xe9but","dxScheduler-editorLabelEndDate":"Date de fin","dxScheduler-editorLabelDescription":"Description","dxScheduler-editorLabelRecurrence":"R\xe9currence","dxScheduler-openAppointment":"D\xe9finir un \xe9venement","dxScheduler-recurrenceNever":"Jamais","dxScheduler-recurrenceMinutely":"Minutely","dxScheduler-recurrenceHourly":"Hourly","dxScheduler-recurrenceDaily":"Quotidien","dxScheduler-recurrenceWeekly":"Hebdomadaire","dxScheduler-recurrenceMonthly":"Mensuel","dxScheduler-recurrenceYearly":"Annuel","dxScheduler-recurrenceRepeatEvery":"Chaque","dxScheduler-recurrenceRepeatOn":"Repeat On","dxScheduler-recurrenceEnd":"Jusqu\'\xe0","dxScheduler-recurrenceAfter":"Apr\xe8s","dxScheduler-recurrenceOn":"Le","dxScheduler-recurrenceRepeatMinutely":"minute(s)","dxScheduler-recurrenceRepeatHourly":"hour(s)","dxScheduler-recurrenceRepeatDaily":"Jour(s)","dxScheduler-recurrenceRepeatWeekly":"Semaine(s)","dxScheduler-recurrenceRepeatMonthly":"Mois(s)","dxScheduler-recurrenceRepeatYearly":"Ann\xe9e(s)","dxScheduler-switcherDay":"Jour","dxScheduler-switcherWeek":"Semaine","dxScheduler-switcherWorkWeek":"Semaine de travail","dxScheduler-switcherMonth":"Mois","dxScheduler-switcherAgenda":"Agenda","dxScheduler-switcherTimelineDay":"Timeline Jour","dxScheduler-switcherTimelineWeek":"Timeline Semaine","dxScheduler-switcherTimelineWorkWeek":"Timeline Semaine de travail","dxScheduler-switcherTimelineMonth":"Timeline Mois","dxScheduler-recurrenceRepeatOnDate":"le","dxScheduler-recurrenceRepeatCount":"occurence(s)","dxScheduler-allDay":"Temps plein","dxScheduler-confirmRecurrenceEditTitle":"Edit Recurring Appointment","dxScheduler-confirmRecurrenceDeleteTitle":"Delete Recurring Appointment","dxScheduler-confirmRecurrenceEditMessage":"Voulez-vous \xe9diter cet \xe9venement ou la s\xe9rie enti\xe8re ?","dxScheduler-confirmRecurrenceDeleteMessage":"Voulez-vous supprimer cet \xe9venement ou la s\xe9rie enti\xe8re ?","dxScheduler-confirmRecurrenceEditSeries":"Editer serie","dxScheduler-confirmRecurrenceDeleteSeries":"Supprimer serie","dxScheduler-confirmRecurrenceEditOccurrence":"Editer \xe9venement","dxScheduler-confirmRecurrenceDeleteOccurrence":"Supprimer \xe9venement","dxScheduler-noTimezoneTitle":"Pas de fuseau horaire","dxScheduler-moreAppointments":"{0} en plus","dxCalendar-currentDay":"Today","dxCalendar-currentMonth":"Current month","dxCalendar-currentYear":"Current year","dxCalendar-currentYearRange":"Current year range","dxCalendar-todayButtonText":"Aujourd\'hui","dxCalendar-ariaWidgetName":"Calendrier","dxCalendar-previousMonthButtonLabel":"Previous month","dxCalendar-previousYearButtonLabel":"Previous year","dxCalendar-previousDecadeButtonLabel":"Previous decade","dxCalendar-previousCenturyButtonLabel":"Previous century","dxCalendar-nextMonthButtonLabel":"Next month","dxCalendar-nextYearButtonLabel":"Next year","dxCalendar-nextDecadeButtonLabel":"Next decade","dxCalendar-nextCenturyButtonLabel":"Next century","dxCalendar-captionMonthLabel":"Month selection","dxCalendar-captionYearLabel":"Year selection","dxCalendar-captionDecadeLabel":"Decade selection","dxCalendar-captionCenturyLabel":"Century selection","dxCalendar-selectedDate":"The selected date is {0}","dxCalendar-selectedDateRange":"The selected date range is from {0} to {1}","dxColorView-ariaRed":"Rouge","dxColorView-ariaGreen":"Vert","dxColorView-ariaBlue":"Bleu","dxColorView-ariaAlpha":"Transparence","dxColorView-ariaHex":"Code couleur","dxTagBox-selected":"{0} selectionn\xe9s","dxTagBox-allSelected":"Tous s\xe9lectionn\xe9s ({0})","dxTagBox-moreSelected":"{0} en plus","dxTagBox-tagRoleDescription":"Tag. Press the delete button to remove this tag","vizExport-printingButtonText":"Imprimer","vizExport-titleMenuText":"Exporter/Imprimer","vizExport-exportButtonText":"{0} fichier","dxFilterBuilder-and":"Et","dxFilterBuilder-or":"Ou","dxFilterBuilder-notAnd":"Non Et","dxFilterBuilder-notOr":"Non Ou","dxFilterBuilder-addCondition":"Ajouter une condition","dxFilterBuilder-addGroup":"Ajouter un groupe","dxFilterBuilder-enterValueText":"<entrer une valeur>","dxFilterBuilder-filterOperationEquals":"Est \xe9gal \xe0","dxFilterBuilder-filterOperationNotEquals":"Est diff\xe9rent de","dxFilterBuilder-filterOperationLess":"Est plus petit que","dxFilterBuilder-filterOperationLessOrEquals":"Est plus petit ou \xe9gal \xe0","dxFilterBuilder-filterOperationGreater":"Est plus grand que","dxFilterBuilder-filterOperationGreaterOrEquals":"Est plus grand ou \xe9gal \xe0","dxFilterBuilder-filterOperationStartsWith":"Commence par","dxFilterBuilder-filterOperationContains":"Contient","dxFilterBuilder-filterOperationNotContains":"Ne contient pas","dxFilterBuilder-filterOperationEndsWith":"Finit par","dxFilterBuilder-filterOperationIsBlank":"Est vide","dxFilterBuilder-filterOperationIsNotBlank":"N\'est pas vide","dxFilterBuilder-filterOperationBetween":"Entre","dxFilterBuilder-filterOperationAnyOf":"Est parmi","dxFilterBuilder-filterOperationNoneOf":"N\'est pas parmi","dxHtmlEditor-dialogColorCaption":"Changer couleur police","dxHtmlEditor-dialogBackgroundCaption":"Changer couleur fond","dxHtmlEditor-dialogLinkCaption":"Ajouter un hyperlien","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Texte","dxHtmlEditor-dialogLinkTargetField":"Ouvrir le lien dans une nouvelle fen\xeatre","dxHtmlEditor-dialogImageCaption":"Ajouter image","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Texte alternatif","dxHtmlEditor-dialogImageWidthField":"Largeur (px)","dxHtmlEditor-dialogImageHeightField":"Hauteur (px)","dxHtmlEditor-dialogInsertTableRowsField":"Lignes","dxHtmlEditor-dialogInsertTableColumnsField":"Colonnes","dxHtmlEditor-dialogInsertTableCaption":"Ins\xe9rer un tableau","dxHtmlEditor-dialogUpdateImageCaption":"Actualiser l\'image","dxHtmlEditor-dialogImageUpdateButton":"Actualiser","dxHtmlEditor-dialogImageAddButton":"Ajouter","dxHtmlEditor-dialogImageSpecifyUrl":"Depuis le Web","dxHtmlEditor-dialogImageSelectFile":"Depuis cet appareil","dxHtmlEditor-dialogImageKeepAspectRatio":"Conserver les proportions","dxHtmlEditor-dialogImageEncodeToBase64":"Encoder en Base64","dxHtmlEditor-heading":"Titre","dxHtmlEditor-normalText":"Texte normal","dxHtmlEditor-background":"Couleur de l\'arri\xe8re plan","dxHtmlEditor-bold":"Gras","dxHtmlEditor-color":"Couleur de police","dxHtmlEditor-font":"Police","dxHtmlEditor-italic":"Italique","dxHtmlEditor-link":"Ajouter un hyperlien","dxHtmlEditor-image":"Ajouter une image","dxHtmlEditor-size":"Taille","dxHtmlEditor-strike":"Barr\xe9","dxHtmlEditor-subscript":"Indice","dxHtmlEditor-superscript":"Suscription","dxHtmlEditor-underline":"Souligner","dxHtmlEditor-blockquote":"Citation","dxHtmlEditor-header":"Ent\xeate","dxHtmlEditor-increaseIndent":"Augmenter le retrait","dxHtmlEditor-decreaseIndent":"R\xe9duire le retrait","dxHtmlEditor-orderedList":"Liste ordonn\xe9e","dxHtmlEditor-bulletList":"Liste \xe0 puces","dxHtmlEditor-alignLeft":"Aligner \xe0 gauche","dxHtmlEditor-alignCenter":"Centrer","dxHtmlEditor-alignRight":"Aligner \xe0 droite","dxHtmlEditor-alignJustify":"Justifier","dxHtmlEditor-codeBlock":"Bloc de code","dxHtmlEditor-variable":"Ajouter une variable","dxHtmlEditor-undo":"Annuler","dxHtmlEditor-redo":"Refaire","dxHtmlEditor-clear":"Supprimer le formattage","dxHtmlEditor-insertTable":"Ins\xe9rer tableau","dxHtmlEditor-insertHeaderRow":"Ins\xe9rer une ligne d\'en-t\xeate","dxHtmlEditor-insertRowAbove":"Ins\xe9rer une ligne au-dessus","dxHtmlEditor-insertRowBelow":"Ins\xe9rer une ligne ci-dessous","dxHtmlEditor-insertColumnLeft":"Ins\xe9rer une colonne \xe0 gauche","dxHtmlEditor-insertColumnRight":"Ins\xe9rer une colonne \xe0 droite","dxHtmlEditor-deleteColumn":"Supprimer la colonne","dxHtmlEditor-deleteRow":"Supprimer la ligne","dxHtmlEditor-deleteTable":"Supprimer le tableau","dxHtmlEditor-cellProperties":"Propri\xe9t\xe9s de la cellule","dxHtmlEditor-tableProperties":"Propri\xe9t\xe9s du tableau","dxHtmlEditor-insert":"Ins\xe9rer","dxHtmlEditor-delete":"Supprimer","dxHtmlEditor-border":"Bordure","dxHtmlEditor-style":"Style","dxHtmlEditor-width":"Largeur","dxHtmlEditor-height":"Hauteur","dxHtmlEditor-borderColor":"Couleur","dxHtmlEditor-tableBackground":"Arri\xe8re plan","dxHtmlEditor-dimensions":"Dimensions","dxHtmlEditor-alignment":"Alignement","dxHtmlEditor-horizontal":"Horizontal","dxHtmlEditor-vertical":"Vertical","dxHtmlEditor-paddingVertical":"Rembourrage vertical","dxHtmlEditor-paddingHorizontal":"Rembourrage horizontal","dxHtmlEditor-pixels":"Pixels","dxHtmlEditor-list":"Liste","dxHtmlEditor-ordered":"En ordre","dxHtmlEditor-bullet":"Point","dxHtmlEditor-align":"Aligner","dxHtmlEditor-center":"Centrer","dxHtmlEditor-left":"Gauche","dxHtmlEditor-right":"Droite","dxHtmlEditor-indent":"Retrait","dxHtmlEditor-justify":"Justifier","dxHtmlEditor-borderStyleNone":"none","dxHtmlEditor-borderStyleHidden":"hidden","dxHtmlEditor-borderStyleDotted":"dotted","dxHtmlEditor-borderStyleDashed":"dashed","dxHtmlEditor-borderStyleSolid":"solid","dxHtmlEditor-borderStyleDouble":"double","dxHtmlEditor-borderStyleGroove":"groove","dxHtmlEditor-borderStyleRidge":"ridge","dxHtmlEditor-borderStyleInset":"inset","dxHtmlEditor-borderStyleOutset":"outset","dxFileManager-newDirectoryName":"R\xe9pertoire sans titre","dxFileManager-rootDirectoryName":"Fichiers","dxFileManager-errorNoAccess":"Acc\xe8s interdit. L\'op\xe9ration ne peut se terminer.","dxFileManager-errorDirectoryExistsFormat":"R\xe9pertoire \'{0}\' existe d\xe9j\xe0.","dxFileManager-errorFileExistsFormat":"Fichier \'{0}\' existe d\xe9j\xe0.","dxFileManager-errorFileNotFoundFormat":"Impossible de trouver le fichier \'{0}.\'","dxFileManager-errorDirectoryNotFoundFormat":"Impossible de trouver le r\xe9pertoire \'{0}.\'","dxFileManager-errorWrongFileExtension":"Extension de fichier non permise.","dxFileManager-errorMaxFileSizeExceeded":"Taille du fichier d\xe9passe la limite maximum permise.","dxFileManager-errorInvalidSymbols":"Ce nom contient des caract\xe8res invalides.","dxFileManager-errorDefault":"Erreur non sp\xe9cifi\xe9.","dxFileManager-errorDirectoryOpenFailed":"Le r\xe9pertoire ne peut s\'ouvrir","dxFileManager-commandCreate":"Nouveau r\xe9pertoire","dxFileManager-commandRename":"Renommer","dxFileManager-commandMove":"D\xe9placer","dxFileManager-commandCopy":"Copier","dxFileManager-commandDelete":"Supprimer","dxFileManager-commandDownload":"T\xe9l\xe9charger","dxFileManager-commandUpload":"T\xe9l\xe9verser des fichiers","dxFileManager-commandRefresh":"Rafra\xeechir","dxFileManager-commandThumbnails":"Mode vignette","dxFileManager-commandDetails":"Mode d\xe9tails","dxFileManager-commandClearSelection":"Vider s\xe9lection","dxFileManager-commandShowNavPane":"Basculer le volet de navigation","dxFileManager-dialogDirectoryChooserMoveTitle":"D\xe9placer vers","dxFileManager-dialogDirectoryChooserMoveButtonText":"D\xe9placer","dxFileManager-dialogDirectoryChooserCopyTitle":"Copier vers","dxFileManager-dialogDirectoryChooserCopyButtonText":"Copier","dxFileManager-dialogRenameItemTitle":"Renommer","dxFileManager-dialogRenameItemButtonText":"Sauvegarder","dxFileManager-dialogCreateDirectoryTitle":"Nouveau r\xe9pertoire","dxFileManager-dialogCreateDirectoryButtonText":"Cr\xe9er","dxFileManager-dialogDeleteItemTitle":"Supprimer","dxFileManager-dialogDeleteItemButtonText":"Supprimer","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Voulez-vous vraiment supprimer {0}?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Voulez-vous vraiment supprimer {0}?","dxFileManager-dialogButtonCancel":"Annuler","dxFileManager-editingCreateSingleItemProcessingMessage":"Cr\xe9er un r\xe9pertoire dans {0}","dxFileManager-editingCreateSingleItemSuccessMessage":"R\xe9pertoire cr\xe9\xe9 dans {0}","dxFileManager-editingCreateSingleItemErrorMessage":"R\xe9pertoire n\'est pas cr\xe9\xe9","dxFileManager-editingCreateCommonErrorMessage":"R\xe9pertoire n\'est pas cr\xe9\xe9","dxFileManager-editingRenameSingleItemProcessingMessage":"Renommer un item dans {0}","dxFileManager-editingRenameSingleItemSuccessMessage":"Item renomm\xe9 dans {0}","dxFileManager-editingRenameSingleItemErrorMessage":"Item non renomm\xe9","dxFileManager-editingRenameCommonErrorMessage":"Item non renomm\xe9","dxFileManager-editingDeleteSingleItemProcessingMessage":"Supprimer un item de {0}","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"Supprimer {0} items de {1}","dxFileManager-editingDeleteSingleItemSuccessMessage":"Item supprim\xe9 de {0}","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"{0} items supprim\xe9s de {1}","dxFileManager-editingDeleteSingleItemErrorMessage":"Item non suprim\xe9","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} items non supprim\xe9s","dxFileManager-editingDeleteCommonErrorMessage":"Des items ne sont pas supprim\xe9s","dxFileManager-editingMoveSingleItemProcessingMessage":"En train de d\xe9placer un item vers {0}","dxFileManager-editingMoveMultipleItemsProcessingMessage":"En train de d\xe9placer {0} items vers {1}","dxFileManager-editingMoveSingleItemSuccessMessage":"Item d\xe9plac\xe9 vers {0}","dxFileManager-editingMoveMultipleItemsSuccessMessage":"{0} items d\xe9plac\xe9s vers {1}","dxFileManager-editingMoveSingleItemErrorMessage":"Item non d\xe9plac\xe9","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} items non d\xe9plac\xe9s","dxFileManager-editingMoveCommonErrorMessage":"Des items ne sont pas d\xe9plac\xe9s","dxFileManager-editingCopySingleItemProcessingMessage":"En train de copier un item vers {0}","dxFileManager-editingCopyMultipleItemsProcessingMessage":"En train de copier {0} items vers {1}","dxFileManager-editingCopySingleItemSuccessMessage":"Item copi\xe9 vers {0}","dxFileManager-editingCopyMultipleItemsSuccessMessage":"{0} items copi\xe9s vers {1}","dxFileManager-editingCopySingleItemErrorMessage":"Item non copi\xe9","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} items non copi\xe9s","dxFileManager-editingCopyCommonErrorMessage":"Des items ne sont pas copi\xe9s","dxFileManager-editingUploadSingleItemProcessingMessage":"En train de t\xe9l\xe9verser un item vers {0}","dxFileManager-editingUploadMultipleItemsProcessingMessage":"En train de t\xe9l\xe9verser {0} items vers {1}","dxFileManager-editingUploadSingleItemSuccessMessage":"Item t\xe9l\xe9vers\xe9 vers {0}","dxFileManager-editingUploadMultipleItemsSuccessMessage":"{0} items t\xe9l\xe9vers\xe9s vers {1}","dxFileManager-editingUploadSingleItemErrorMessage":"Item non t\xe9l\xe9vers\xe9","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} items non t\xe9l\xe9vers\xe9s","dxFileManager-editingUploadCanceledMessage":"Annul\xe9","dxFileManager-editingDownloadSingleItemErrorMessage":"L\'\xe9l\xe9ment n\'a pas \xe9t\xe9 t\xe9l\xe9charg\xe9","dxFileManager-editingDownloadMultipleItemsErrorMessage":"{0} \xe9l\xe9ments n\'ont pas \xe9t\xe9 t\xe9l\xe9charg\xe9s","dxFileManager-listDetailsColumnCaptionName":"Nom","dxFileManager-listDetailsColumnCaptionDateModified":"Date modifi\xe9","dxFileManager-listDetailsColumnCaptionFileSize":"Taille de fichier","dxFileManager-listThumbnailsTooltipTextSize":"Taille","dxFileManager-listThumbnailsTooltipTextDateModified":"Date modifi\xe9","dxFileManager-notificationProgressPanelTitle":"En cours","dxFileManager-notificationProgressPanelEmptyListText":"Aucune op\xe9ration","dxFileManager-notificationProgressPanelOperationCanceled":"Annul\xe9","dxDiagram-categoryGeneral":"G\xe9n\xe9ral","dxDiagram-categoryFlowchart":"Organigramme","dxDiagram-categoryOrgChart":"Structure organisationnelle","dxDiagram-categoryContainers":"Conteneurs","dxDiagram-categoryCustom":"Personnalis\xe9","dxDiagram-commandExportToSvg":"Exporter en SVG","dxDiagram-commandExportToPng":"Exporter en PNG","dxDiagram-commandExportToJpg":"Exporter en JPEG","dxDiagram-commandUndo":"Annuler","dxDiagram-commandRedo":"Refaire","dxDiagram-commandFontName":"Nom de la police","dxDiagram-commandFontSize":"Taille de la police","dxDiagram-commandBold":"Gras","dxDiagram-commandItalic":"Italique","dxDiagram-commandUnderline":"Souligner","dxDiagram-commandTextColor":"Couleur texte","dxDiagram-commandLineColor":"Couleur ligne","dxDiagram-commandLineWidth":"Largeur de ligne","dxDiagram-commandLineStyle":"Style de ligne","dxDiagram-commandLineStyleSolid":"Solide","dxDiagram-commandLineStyleDotted":"Point\xe9","dxDiagram-commandLineStyleDashed":"Pointill\xe9","dxDiagram-commandFillColor":"Couleur remplissage","dxDiagram-commandAlignLeft":"Aligner \xe0 gauche","dxDiagram-commandAlignCenter":"Centrer","dxDiagram-commandAlignRight":"Aligner \xe0 droite","dxDiagram-commandConnectorLineType":"Type de ligne de connexion","dxDiagram-commandConnectorLineStraight":"Droit","dxDiagram-commandConnectorLineOrthogonal":"Orthogonal","dxDiagram-commandConnectorLineStart":"D\xe9but de la ligne de connexion","dxDiagram-commandConnectorLineEnd":"Fin de la ligne de connexion","dxDiagram-commandConnectorLineNone":"Aucun","dxDiagram-commandConnectorLineArrow":"Fl\xe8che","dxDiagram-commandFullscreen":"Plein \xe9cran","dxDiagram-commandUnits":"Unit\xe9s","dxDiagram-commandPageSize":"Taille de la page","dxDiagram-commandPageOrientation":"Orientation de la page","dxDiagram-commandPageOrientationLandscape":"Paysage","dxDiagram-commandPageOrientationPortrait":"Portrait","dxDiagram-commandPageColor":"Couleur de la page","dxDiagram-commandShowGrid":"Afficher la grille","dxDiagram-commandSnapToGrid":"Aligner sur la grille","dxDiagram-commandGridSize":"Taille de la grille","dxDiagram-commandZoomLevel":"Niveau de zoom","dxDiagram-commandAutoZoom":"Zoom automatique","dxDiagram-commandFitToContent":"Ajuster au contenu","dxDiagram-commandFitToWidth":"Ajuster \xe0 la largeur","dxDiagram-commandAutoZoomByContent":"Auto zoom par contenu","dxDiagram-commandAutoZoomByWidth":"Auto zoom par largeur","dxDiagram-commandSimpleView":"Vue simple","dxDiagram-commandCut":"Couper","dxDiagram-commandCopy":"Copier","dxDiagram-commandPaste":"Coller","dxDiagram-commandSelectAll":"Tout s\xe9lectionner","dxDiagram-commandDelete":"Supprimer","dxDiagram-commandBringToFront":"Amener au premier plan","dxDiagram-commandSendToBack":"Envoyer \xe0 l\'arri\xe8re","dxDiagram-commandLock":"Verrouiller","dxDiagram-commandUnlock":"D\xe9verrouiller","dxDiagram-commandInsertShapeImage":"Ins\xe9rer une image...","dxDiagram-commandEditShapeImage":"Changer image...","dxDiagram-commandDeleteShapeImage":"Supprimer image","dxDiagram-commandLayoutLeftToRight":"Gauche \xe0 droite","dxDiagram-commandLayoutRightToLeft":"Droite \xe0 gauche","dxDiagram-commandLayoutTopToBottom":"Haut en bas","dxDiagram-commandLayoutBottomToTop":"Bas en haut","dxDiagram-unitIn":"po","dxDiagram-unitCm":"cm","dxDiagram-unitPx":"px","dxDiagram-dialogButtonOK":"OK","dxDiagram-dialogButtonCancel":"Annuler","dxDiagram-dialogInsertShapeImageTitle":"Ins\xe9rer une image","dxDiagram-dialogEditShapeImageTitle":"Changer image","dxDiagram-dialogEditShapeImageSelectButton":"S\xe9lectionner une image","dxDiagram-dialogEditShapeImageLabelText":"ou d\xe9poser le fichier ici","dxDiagram-uiExport":"Exporter","dxDiagram-uiProperties":"Propri\xe9t\xe9s","dxDiagram-uiSettings":"Param\xe8tres","dxDiagram-uiShowToolbox":"Afficher les outils","dxDiagram-uiSearch":"Recherche","dxDiagram-uiStyle":"Style","dxDiagram-uiLayout":"Disposition","dxDiagram-uiLayoutTree":"Arbre","dxDiagram-uiLayoutLayered":"Par couches","dxDiagram-uiDiagram":"Diagramme","dxDiagram-uiText":"Texte","dxDiagram-uiObject":"Objet","dxDiagram-uiConnector":"Connecteur","dxDiagram-uiPage":"Page","dxDiagram-shapeText":"Texte","dxDiagram-shapeRectangle":"Rectangle","dxDiagram-shapeEllipse":"Ellipse","dxDiagram-shapeCross":"Croix","dxDiagram-shapeTriangle":"Triangle","dxDiagram-shapeDiamond":"Diamant","dxDiagram-shapeHeart":"C\u0153ur","dxDiagram-shapePentagon":"Pentagone","dxDiagram-shapeHexagon":"Hexagone","dxDiagram-shapeOctagon":"Octogone","dxDiagram-shapeStar":"\xc9toile","dxDiagram-shapeArrowLeft":"Fl\xe8che gauche","dxDiagram-shapeArrowUp":"Fl\xe8che vers le haut","dxDiagram-shapeArrowRight":"Fl\xe8che droite","dxDiagram-shapeArrowDown":"Fl\xe8che vers le bas","dxDiagram-shapeArrowUpDown":"Fl\xe8che haut bas","dxDiagram-shapeArrowLeftRight":"Fl\xe8che gauche droite","dxDiagram-shapeProcess":"Processus","dxDiagram-shapeDecision":"D\xe9cision","dxDiagram-shapeTerminator":"Terminator","dxDiagram-shapePredefinedProcess":"Processus pr\xe9d\xe9fini","dxDiagram-shapeDocument":"Document","dxDiagram-shapeMultipleDocuments":"Documents multiples","dxDiagram-shapeManualInput":"Entr\xe9e manuelle","dxDiagram-shapePreparation":"Pr\xe9paration","dxDiagram-shapeData":"Donn\xe9es","dxDiagram-shapeDatabase":"Base de donn\xe9es","dxDiagram-shapeHardDisk":"Disque dur","dxDiagram-shapeInternalStorage":"Stockage interne","dxDiagram-shapePaperTape":"Bande de papier","dxDiagram-shapeManualOperation":"Op\xe9ration manuelle","dxDiagram-shapeDelay":"Retard","dxDiagram-shapeStoredData":"Les donn\xe9es stock\xe9es","dxDiagram-shapeDisplay":"Afficher","dxDiagram-shapeMerge":"Fusionner","dxDiagram-shapeConnector":"Connecteur","dxDiagram-shapeOr":"Ou","dxDiagram-shapeSummingJunction":"Jonction de sommation","dxDiagram-shapeContainerDefaultText":"R\xe9cipient","dxDiagram-shapeVerticalContainer":"Conteneur vertical","dxDiagram-shapeHorizontalContainer":"Conteneur horizontal","dxDiagram-shapeCardDefaultText":"Nom de la personne","dxDiagram-shapeCardWithImageOnLeft":"Carte avec image \xe0 gauche","dxDiagram-shapeCardWithImageOnTop":"Carte avec image sur le dessus","dxDiagram-shapeCardWithImageOnRight":"Carte avec image \xe0 droite","dxGantt-dialogTitle":"Titre","dxGantt-dialogStartTitle":"D\xe9part","dxGantt-dialogEndTitle":"Fin","dxGantt-dialogProgressTitle":"Progr\xe8s","dxGantt-dialogResourcesTitle":"Ressources","dxGantt-dialogResourceManagerTitle":"Gestionnaire de ressources","dxGantt-dialogTaskDetailsTitle":"D\xe9tails de la t\xe2che","dxGantt-dialogEditResourceListHint":"Modifier la liste des ressources","dxGantt-dialogEditNoResources":"Pas de ressources","dxGantt-dialogButtonAdd":"Ajouter","dxGantt-contextMenuNewTask":"Nouvelle t\xe2che","dxGantt-contextMenuNewSubtask":"Nouvelle sous-t\xe2che","dxGantt-contextMenuDeleteTask":"Supprimer la t\xe2che","dxGantt-contextMenuDeleteDependency":"Supprimer la d\xe9pendance","dxGantt-dialogTaskDeleteConfirmation":"La suppression d\'une t\xe2che supprime \xe9galement toutes ses d\xe9pendances et sous-t\xe2ches. \xcates-vous s\xfbr de vouloir supprimer cette t\xe2che?","dxGantt-dialogDependencyDeleteConfirmation":"\xcates-vous s\xfbr de vouloir supprimer la d\xe9pendance de la t\xe2che?","dxGantt-dialogResourcesDeleteConfirmation":"La suppression d\'une ressource la supprime \xe9galement des t\xe2ches auxquelles cette ressource est affect\xe9e. Voulez-vous vraiment supprimer ces ressources? Ressources : {0}","dxGantt-dialogConstraintCriticalViolationMessage":"La t\xe2che que vous essayez de d\xe9placer est li\xe9e \xe0 une deuxi\xe8me t\xe2che par une relation de d\xe9pendance. Ce changement serait en conflit avec les r\xe8gles de d\xe9pendance. Comment aimeriez-vous proceder?","dxGantt-dialogConstraintViolationMessage":"La t\xe2che que vous essayez de d\xe9placer est li\xe9e \xe0 une deuxi\xe8me t\xe2che par une relation de d\xe9pendance. Comment aimeriez-vous proceder?","dxGantt-dialogCancelOperationMessage":"Annuler l\'op\xe9ration","dxGantt-dialogDeleteDependencyMessage":"Supprimer la d\xe9pendance","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"D\xe9placer la t\xe2che et conserver la d\xe9pendance","dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"La t\xe2che que vous essayez de d\xe9placer est li\xe9e \xe0 une autre t\xe2che par des relations de d\xe9pendance. Ce changement serait en conflit avec les r\xe8gles de d\xe9pendance. Comment aimeriez-vous proceder?","dxGantt-dialogConstraintViolationSeveralTasksMessage":"La t\xe2che que vous essayez de d\xe9placer est li\xe9e \xe0 une autre t\xe2che par des relations de d\xe9pendance. Comment aimeriez-vous proceder?","dxGantt-dialogDeleteDependenciesMessage":"Supprimer les d\xe9pendances","dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"D\xe9placer la t\xe2che et conserver les d\xe9pendances","dxGantt-undo":"Annuler","dxGantt-redo":"Refaire","dxGantt-expandAll":"D\xe9velopper tout","dxGantt-collapseAll":"Tout r\xe9duire","dxGantt-addNewTask":"Ajouter une nouvelle t\xe2che","dxGantt-deleteSelectedTask":"Supprimer la t\xe2che s\xe9lectionn\xe9e","dxGantt-zoomIn":"Agrandir","dxGantt-zoomOut":"D\xe9zoomer","dxGantt-fullScreen":"Plein \xe9cran","dxGantt-quarter":"Q{0}","dxGantt-sortingAscendingText":"Tri croissant","dxGantt-sortingDescendingText":"Tri d\xe9croissant","dxGantt-sortingClearText":"Supprimer le tri","dxGantt-showResources":"Afficher les ressources","dxGantt-showDependencies":"Afficher les d\xe9pendances","dxGantt-dialogStartDateValidation":"La date de d\xe9but doit \xeatre post\xe9rieure au {0}","dxGantt-dialogEndDateValidation":"La date de fin doit \xeatre post\xe9rieure au {0}","dxGallery-itemName":"Gallery item","dxMultiView-elementAriaRoleDescription":"MultiView","dxMultiView-elementAriaLabel":"Use the arrow keys or swipe to navigate between views","dxMultiView-itemAriaRoleDescription":"View","dxMultiView-itemAriaLabel":"{0} of {1}","dxSplitter-resizeHandleAriaLabel":"Split bar"}}');let oG=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({imports:[a.MD]})}}return v})(),bH=(()=>{class v{constructor(l){this.injector=l,this.injector.get(st),this.injector.get(ze)}static forRoot(){return{ngModule:v,providers:[st,ze]}}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(o.zZn))}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({providers:[st,ze],imports:[a.MD,et.YN]})}}return v})(),rG=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({imports:[a.MD,bH]})}}return v})();var XI=M(5309),Uj=M(6716);class zj extends Y.b{constructor(){super(...arguments),this.storedRoutes=new Map}shouldDetach(p){return!1}store(p,l){this.storedRoutes.set(p.routeConfig?.path??"/",l)}shouldAttach(p){return!!p.routeConfig&&!!this.storedRoutes.get(p.routeConfig.path)}retrieve(p){return this.storedRoutes.get(p.routeConfig?.path??"/")??null}shouldReuseRoute(p,l){return p.routeConfig===l.routeConfig}}var zF=M(449);let sG=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({providers:[ci],imports:[a.MD,XI.A,zF.CCL]})}}return v})(),aG=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({providers:[hr],imports:[a.MD,XI.A,zF.CCL,et.YN]})}}return v})(),xH=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({imports:[a.MD,zF.CCL]})}}return v})();var lG=M(3686),Gj=M(3554);let cG=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({imports:[a.MD,XI.A]})}}return v})();var Wj=M(9055),$j=M(444);let dG=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({providers:[Qt,xt,Vt],imports:[a.MD,xo.F,pi.p,Wj.Q,Hi.L,Ui.i,tr.d,$j.x,Wt.S,Xn.k]})}}return v})(),jj=(()=>{class v{static{this.\u0275fac=function(O){return new(O||v)}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({providers:[bt,Lm,nu,Nr,Gj.j,ht,Gm,Ph],imports:[a.MD,et.YN,zF.CCL,XI.A,cG,dG,et.YN,XI.A]})}}return v})();const Xj=[{path:"chat",loadChildren:()=>M.e("src_app_chat-module_chat_module_ts").then(M.bind(M,1920)).then(v=>v.default),data:{reuseComponent:!0,canLoad:[le.g]}}];let Yj=(()=>{class v extends W.EZ{constructor(){super(...arguments),this.overrides={swipe:{direction:Uj.DIRECTION_ALL},pinch:{enable:!0},pan:{enable:!0}}}static{this.\u0275fac=(()=>{let l;return function(F){return(l||(l=o.xGo(v)))(F||v)}})()}static{this.\u0275prov=o.jDH({token:v,factory:v.\u0275fac})}}return v})();function EH(v){return v.createCompiler()}let uG=(()=>{class v{constructor(l,O){this.upgrade=l,this.theminService=O}static{this.isBootstrapped=!1}ngDoBootstrap(l){if(v.isBootstrapped)return;const O=this.upgrade;document.onreadystatechange=function(){"interactive"===document.readyState&&(O.bootstrap(document.getElementsByTagName("html")[0],["app"],{strictDi:!0}),W.sG())},v.isBootstrapped=!0,(0,lG.A)({licenseKey:"ewogICJmb3JtYXQiOiAxLAogICJjdXN0b21lcklkIjogIjJhZGVlODQzLWM1ZjctNDZhNC05NmQ5LWU0OTU0YzQ2MTJkMCIsCiAgIm1heFZlcnNpb25BbGxvd2VkIjogMjQxCn0=.CV31v7xJUX1WEYm3ehMKbkyu3e09oN7FVbgrWj41Iil0HNASrq5cwZghhpy7iZV0P1ECtK/vTbXqozqIPHECoTtU+rmlV5HmNVY6FVxKReY45immdA/E5KKkQP/nPqLwdDOIRQ=="}),(0,oe.fH)(nG),(0,oe.fH)(iG)}static{this.\u0275fac=function(O){return new(O||v)(o.KVO(P.be),o.KVO(Qt))}}static{this.\u0275mod=o.$C({type:v})}static{this.\u0275inj=o.G2t({providers:[Q.L,o.Ql9,{provide:W.kQ,useClass:Yj},{provide:Y.b,useClass:zj},{provide:le.g},{provide:o.d80,useValue:{},multi:!0},{provide:o.OfE,useClass:CH,deps:[o.d80]},{provide:o.Ql9,useFactory:EH,deps:[o.OfE]}],imports:[W.Bb,P.be,XI.A,a.MD,W.fM,oG,sG,aG,rG,Y.iI.forRoot(Xj,{initialNavigation:"enabledNonBlocking",onSameUrlNavigation:"reload",enableTracing:!1}),bH.forRoot(),xH,jj,cG,dG]})}}return v})();(function oM(){app.directive("appChatHome",(0,P.PW)({component:Ce})),app.directive("chatBubble",(0,P.PW)({component:z})),app.directive("userVitals",(0,P.PW)({component:ge})),app.directive("apicodoLoadingSpinnerComponent",(0,P.PW)({component:bn,inputs:["isLoading","loadingMessage"]})),app.directive("chatOneToOneActionButtonComponent",(0,P.PW)({component:fe.D})),app.directive("appSmartBanner",(0,P.PW)({component:g})),app.directive("cookieExternalMediaInfo",(0,P.PW)({component:ie,inputs:["type","isAssetListItem"]})),app.directive("cookieConsentComponentManager",(0,P.PW)({component:un})),app.directive("workflowRenderer",(0,P.PW)({component:Zo,inputs:["workflowid","ispreview","articleid","revisionid"]})),app.directive("pixabaySearcher",(0,P.PW)({component:Yn,inputs:["callback","callerdata","dismiss"]})),app.directive("apicodoMediaManagement",(0,P.PW)({component:Jr,inputs:["callback"]})),app.directive("userCommentsListComponent",(0,P.PW)({component:ar})),app.directive("userCommentFormComponent",(0,P.PW)({component:yi})),app.directive("mediaGalleryComponent",(0,P.PW)({component:sd})),app.directive("mediaGalleryItemComponent",(0,P.PW)({component:pc})),app.directive("userBadgeNewComponent",(0,P.PW)({component:km})),app.directive("userBadgeSimple",(0,P.PW)({component:Bc})),app.directive("recommendedArticlesComponent",(0,P.PW)({component:Bd})),app.directive("ohaComponent",(0,P.PW)({component:uo})),app.directive("headerComponent",(0,P.PW)({component:wh})),app.directive("footerComponent",(0,P.PW)({component:nv})),app.directive("articleCategoriesComponent",(0,P.PW)({component:op})),app.directive("miscellaneousUserInteractionsComponent",(0,P.PW)({component:lc})),app.directive("displayableLeadArticleImageLeftComponent",(0,P.PW)({component:rp})),app.directive("displayableArticleWithImageComponent",(0,P.PW)({component:ss})),app.directive("displayableArticleWithoutImageComponent",(0,P.PW)({component:Gf})),app.directive("displayableLeadArticleImageRightComponent",(0,P.PW)({component:sh})),app.directive("displayableSuperbannerComponent",(0,P.PW)({component:Lu})),app.directive("displayableShipmentWithImageComponent",(0,P.PW)({component:Ul})),app.directive("displayableShipmentWithoutImageComponent",(0,P.PW)({component:il})),app.directive("displayableSnipComponent",(0,P.PW)({component:dv})),app.directive("notificationsSettingsComponent",(0,P.PW)({component:nt})),app.directive("notificationsComponent",(0,P.PW)({component:ir})),app.directive("appStoreComponent",(0,P.PW)({component:Us})),app.directive("snipsComponent",(0,P.PW)({component:ru})),app.directive("snipComponent",(0,P.PW)({component:$y})),app.directive("navigationBarBrowserComponent",(0,P.PW)({component:KS})),app.directive("navigationBarAppComponent",(0,P.PW)({component:tg})),app.directive("authorBillingEditorComponent",(0,P.PW)({component:HP})),app.directive("rubricsComponent",(0,P.PW)({component:YS})),app.directive("navigationHeaderComponent",(0,P.PW)({component:wP})),app.directive("userMenuComponent",(0,P.PW)({component:oE})),app.directive("sponsoredArticleListComponent",(0,P.PW)({component:NP})),app.directive("authorListComponent",(0,P.PW)({component:rE})),app.directive("authorListItemComponent",(0,P.PW)({component:UP,inputs:["authorData"]})),app.directive("eventCalendarComponent",(0,P.PW)({component:Kf})),app.directive("registerComponent",(0,P.PW)({component:rT,inputs:["signUpData"]})),app.directive("loginComponent",(0,P.PW)({component:KP})),app.directive("publicProfileComponent",(0,P.PW)({component:bv})),app.directive("authorDashboardComponent",(0,P.PW)({component:kL})),app.directive("snipAuthorApplicationComponent",(0,P.PW)({component:BL,inputs:["snipId"]})),app.directive("searchComponent",(0,P.PW)({component:gE})),app.directive("feedbackComponent",(0,P.PW)({component:_E})),app.directive("dxTagBoxWrapper",(0,P.PW)({component:Mr,inputs:["options"]})),app.directive("dxLookupWrapper",(0,P.PW)({component:_n,inputs:["options"]})),app.directive("dxSelectBoxWrapper",(0,P.PW)({component:mi,inputs:["options"]})),app.directive("dxDateBoxWrapper",(0,P.PW)({component:No,inputs:["options"]})),app.directive("dxScrollViewWrapper",(0,P.PW)({component:Lt,inputs:["options"]})),app.directive("appNgxArticleImpression",(0,P.PW)({component:zp,inputs:["ngxArticleData"]})),app.directive("appNgxArticleReading",(0,P.PW)({component:zg,inputs:["ngxArticleData"]})),app.directive("appNgxOculusContainer",(0,P.PW)({component:Ng})),app.directive("appNgxSnipImpression",(0,P.PW)({component:Al,inputs:["ngxSnipData"]})),app.directive("appNgxSnipReading",(0,P.PW)({component:Fm,inputs:["ngxSnipData"]})),app.directive("appNgxSparticleImpression",(0,P.PW)({component:th,inputs:["ngxSparticleData","ngxArticleData"]})),app.directive("appNgxSparticleReading",(0,P.PW)({component:xC,inputs:["ngxSparticleData"]})),app.directive("appNgxShipmentPremium",(0,P.PW)({component:Or})),app.factory("hybridRouteTrackingService",(0,P.f$)(Rs.o)),app.factory("articleService",(0,P.f$)(ts)),app.factory("snipService",(0,P.f$)(ra)),app.factory("shipmentService",(0,P.f$)(Gg)),app.factory("logoService",(0,P.f$)(Td.X)),app.factory("ngxPopupService",(0,P.f$)(Qi.O)),app.factory("metaService",(0,P.f$)(Zl.R)),app.factory("notificationService",(0,P.f$)(cc.J)),app.factory("authorService",(0,P.f$)(nu)),app.directive("appNgxMainNews",(0,P.PW)({component:jf})),app.config(["$stateProvider",function(v){v.state("app.chat",{url:"chat*path",template:"<app-chat-home></app-chat-home>",controller:function(){}})}])})(),(0,o.SmG)(),W.sG().bootstrapModule(uG).catch(v=>console.error(v))},7995:(In,Ze,M)=>{"use strict";M.d(Ze,{B:()=>o,K:()=>W});const W={light:"LIGHT",dark:"DARK"},o=992},1281:(In,Ze,M)=>{"use strict";M.d(Ze,{B$:()=>h,E$:()=>g,UP:()=>a});var W=M(7995);function a(x){const w=document.getElementById(x);return w?function u(x){let D,C,I,w=x;if(x.match(/^rgb/)){const N=w.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!N)return W.K.light;D=+N[1],C=+N[2],I=+N[3]}else{const N=+("0x"+w.slice(1).replace(w.length<5?/./g:"","$&$&"));D=N>>16,C=N>>8&255,I=255&N}return Math.sqrt(D*D*.299+C*C*.587+I*I*.114)>127.5?W.K.light:W.K.dark}(window.getComputedStyle(w).backgroundColor):W.K.light}function h(x){return x?.mimeType?.includes("image")??!1}function g(x){if(void 0===x)return!1;try{return x?.name?.endsWith("pdf")??!1}catch{return!1}}},3970:function(In){"use strict";In.exports=function(){const Ze=new Map,M={set(Sn,nt,Zt){Ze.has(Sn)||Ze.set(Sn,new Map);const li=Ze.get(Sn);li.has(nt)||0===li.size?li.set(nt,Zt):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(li.keys())[0]}.`)},get:(Sn,nt)=>Ze.has(Sn)&&Ze.get(Sn).get(nt)||null,remove(Sn,nt){if(!Ze.has(Sn))return;const Zt=Ze.get(Sn);Zt.delete(nt),0===Zt.size&&Ze.delete(Sn)}},P="transitionend",b=Sn=>(Sn&&window.CSS&&window.CSS.escape&&(Sn=Sn.replace(/#([^\s"#']+)/g,(nt,Zt)=>`#${CSS.escape(Zt)}`)),Sn),y=Sn=>{Sn.dispatchEvent(new Event(P))},d=Sn=>!(!Sn||"object"!=typeof Sn)&&(typeof Sn.jquery<"u"&&(Sn=Sn[0]),typeof Sn.nodeType<"u"),c=Sn=>d(Sn)?Sn.jquery?Sn[0]:Sn:"string"==typeof Sn&&Sn.length>0?document.querySelector(b(Sn)):null,s=Sn=>{if(!d(Sn)||0===Sn.getClientRects().length)return!1;const nt="visible"===getComputedStyle(Sn).getPropertyValue("visibility"),Zt=Sn.closest("details:not([open])");if(!Zt)return nt;if(Zt!==Sn){const li=Sn.closest("summary");if(li&&li.parentNode!==Zt||null===li)return!1}return nt},a=Sn=>!(Sn&&Sn.nodeType===Node.ELEMENT_NODE&&!Sn.classList.contains("disabled"))||(typeof Sn.disabled<"u"?Sn.disabled:Sn.hasAttribute("disabled")&&"false"!==Sn.getAttribute("disabled")),u=Sn=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof Sn.getRootNode){const nt=Sn.getRootNode();return nt instanceof ShadowRoot?nt:null}return Sn instanceof ShadowRoot?Sn:Sn.parentNode?u(Sn.parentNode):null},h=()=>{},_=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,x=[],D=()=>"rtl"===document.documentElement.dir,C=Sn=>{(Sn=>{"loading"===document.readyState?(x.length||document.addEventListener("DOMContentLoaded",()=>{for(const nt of x)nt()}),x.push(Sn)):Sn()})(()=>{const nt=_();if(nt){const Zt=Sn.NAME,li=nt.fn[Zt];nt.fn[Zt]=Sn.jQueryInterface,nt.fn[Zt].Constructor=Sn,nt.fn[Zt].noConflict=()=>(nt.fn[Zt]=li,Sn.jQueryInterface)}})},I=(Sn,nt=[],Zt=Sn)=>"function"==typeof Sn?Sn(...nt):Zt,L=(Sn,nt,Zt=!0)=>{if(!Zt)return void I(Sn);const Gi=(Sn=>{if(!Sn)return 0;let{transitionDuration:nt,transitionDelay:Zt}=window.getComputedStyle(Sn);const li=Number.parseFloat(nt),Gi=Number.parseFloat(Zt);return li||Gi?(nt=nt.split(",")[0],Zt=Zt.split(",")[0],1e3*(Number.parseFloat(nt)+Number.parseFloat(Zt))):0})(nt)+5;let bo=!1;const Bo=({target:ir})=>{ir===nt&&(bo=!0,nt.removeEventListener(P,Bo),I(Sn))};nt.addEventListener(P,Bo),setTimeout(()=>{bo||y(nt)},Gi)},N=(Sn,nt,Zt,li)=>{const Gi=Sn.length;let bo=Sn.indexOf(nt);return-1===bo?!Zt&&li?Sn[Gi-1]:Sn[0]:(bo+=Zt?1:-1,li&&(bo=(bo+Gi)%Gi),Sn[Math.max(0,Math.min(bo,Gi-1))])},G=/[^.]*(?=\..*)\.|.*/,k=/\..*/,U=/::\d+$/,B={};let K=1;const J={mouseenter:"mouseover",mouseleave:"mouseout"},ie=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function re(Sn,nt){return nt&&`${nt}::${K++}`||Sn.uidEvent||K++}function q(Sn){const nt=re(Sn);return Sn.uidEvent=nt,B[nt]=B[nt]||{},B[nt]}function Q(Sn,nt,Zt=null){return Object.values(Sn).find(li=>li.callable===nt&&li.delegationSelector===Zt)}function te(Sn,nt,Zt){const li="string"==typeof nt,Gi=li?Zt:nt||Zt;let bo=ae(Sn);return ie.has(bo)||(bo=Sn),[li,Gi,bo]}function pe(Sn,nt,Zt,li,Gi){if("string"!=typeof nt||!Sn)return;let[bo,Bo,ir]=te(nt,Zt,li);var al;nt in J&&(al=Bo,Bo=function(Js){if(!Js.relatedTarget||Js.relatedTarget!==Js.delegateTarget&&!Js.delegateTarget.contains(Js.relatedTarget))return al.call(this,Js)});const yr=q(Sn),Ur=yr[ir]||(yr[ir]={}),Ar=Q(Ur,Bo,bo?Zt:null);if(Ar)return void(Ar.oneOff=Ar.oneOff&&Gi);const Us=re(Bo,nt.replace(G,"")),ca=bo?function Z(Sn,nt,Zt){return function li(Gi){const bo=Sn.querySelectorAll(nt);for(let{target:Bo}=Gi;Bo&&Bo!==this;Bo=Bo.parentNode)for(const ir of bo)if(ir===Bo)return he(Gi,{delegateTarget:Bo}),li.oneOff&&ee.off(Sn,Gi.type,nt,Zt),Zt.apply(Bo,[Gi])}}(Sn,Zt,Bo):function Y(Sn,nt){return function Zt(li){return he(li,{delegateTarget:Sn}),Zt.oneOff&&ee.off(Sn,li.type,nt),nt.apply(Sn,[li])}}(Sn,Bo);ca.delegationSelector=bo?Zt:null,ca.callable=Bo,ca.oneOff=Gi,ca.uidEvent=Us,Ur[Us]=ca,Sn.addEventListener(ir,ca,bo)}function z(Sn,nt,Zt,li,Gi){const bo=Q(nt[Zt],li,Gi);bo&&(Sn.removeEventListener(Zt,bo,!!Gi),delete nt[Zt][bo.uidEvent])}function oe(Sn,nt,Zt,li){const Gi=nt[Zt]||{};for(const[bo,Bo]of Object.entries(Gi))bo.includes(li)&&z(Sn,nt,Zt,Bo.callable,Bo.delegationSelector)}function ae(Sn){return Sn=Sn.replace(k,""),J[Sn]||Sn}const ee={on(Sn,nt,Zt,li){pe(Sn,nt,Zt,li,!1)},one(Sn,nt,Zt,li){pe(Sn,nt,Zt,li,!0)},off(Sn,nt,Zt,li){if("string"!=typeof nt||!Sn)return;const[Gi,bo,Bo]=te(nt,Zt,li),ir=Bo!==nt,yr=q(Sn),Ur=yr[Bo]||{},Ar=nt.startsWith(".");if(typeof bo<"u"){if(!Object.keys(Ur).length)return;z(Sn,yr,Bo,bo,Gi?Zt:null)}else{if(Ar)for(const Us of Object.keys(yr))oe(Sn,yr,Us,nt.slice(1));for(const[Us,ca]of Object.entries(Ur)){const Ds=Us.replace(U,"");(!ir||nt.includes(Ds))&&z(Sn,yr,Bo,ca.callable,ca.delegationSelector)}}},trigger(Sn,nt,Zt){if("string"!=typeof nt||!Sn)return null;const li=_();let Bo=null,ir=!0,yr=!0,Ur=!1;nt!==ae(nt)&&li&&(Bo=li.Event(nt,Zt),li(Sn).trigger(Bo),ir=!Bo.isPropagationStopped(),yr=!Bo.isImmediatePropagationStopped(),Ur=Bo.isDefaultPrevented());const Ar=he(new Event(nt,{bubbles:ir,cancelable:!0}),Zt);return Ur&&Ar.preventDefault(),yr&&Sn.dispatchEvent(Ar),Ar.defaultPrevented&&Bo&&Bo.preventDefault(),Ar}};function he(Sn,nt={}){for(const[Zt,li]of Object.entries(nt))try{Sn[Zt]=li}catch{Object.defineProperty(Sn,Zt,{configurable:!0,get:()=>li})}return Sn}function de(Sn){if("true"===Sn)return!0;if("false"===Sn)return!1;if(Sn===Number(Sn).toString())return Number(Sn);if(""===Sn||"null"===Sn)return null;if("string"!=typeof Sn)return Sn;try{return JSON.parse(decodeURIComponent(Sn))}catch{return Sn}}function ue(Sn){return Sn.replace(/[A-Z]/g,nt=>`-${nt.toLowerCase()}`)}const be={setDataAttribute(Sn,nt,Zt){Sn.setAttribute(`data-bs-${ue(nt)}`,Zt)},removeDataAttribute(Sn,nt){Sn.removeAttribute(`data-bs-${ue(nt)}`)},getDataAttributes(Sn){if(!Sn)return{};const nt={},Zt=Object.keys(Sn.dataset).filter(li=>li.startsWith("bs")&&!li.startsWith("bsConfig"));for(const li of Zt){let Gi=li.replace(/^bs/,"");Gi=Gi.charAt(0).toLowerCase()+Gi.slice(1,Gi.length),nt[Gi]=de(Sn.dataset[li])}return nt},getDataAttribute:(Sn,nt)=>de(Sn.getAttribute(`data-bs-${ue(nt)}`))};class ve{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(nt){return nt=this._mergeConfigObj(nt),nt=this._configAfterMerge(nt),this._typeCheckConfig(nt),nt}_configAfterMerge(nt){return nt}_mergeConfigObj(nt,Zt){const li=d(Zt)?be.getDataAttribute(Zt,"config"):{};return{...this.constructor.Default,..."object"==typeof li?li:{},...d(Zt)?be.getDataAttributes(Zt):{},..."object"==typeof nt?nt:{}}}_typeCheckConfig(nt,Zt=this.constructor.DefaultType){for(const[li,Gi]of Object.entries(Zt)){const bo=nt[li],Bo=d(bo)?"element":null==(Sn=bo)?`${Sn}`:Object.prototype.toString.call(Sn).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(Gi).test(Bo))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${li}" provided type "${Bo}" but expected type "${Gi}".`)}var Sn}}class Ce extends ve{constructor(nt,Zt){super(),(nt=c(nt))&&(this._element=nt,this._config=this._getConfig(Zt),M.set(this._element,this.constructor.DATA_KEY,this))}dispose(){M.remove(this._element,this.constructor.DATA_KEY),ee.off(this._element,this.constructor.EVENT_KEY);for(const nt of Object.getOwnPropertyNames(this))this[nt]=null}_queueCallback(nt,Zt,li=!0){L(nt,Zt,li)}_getConfig(nt){return nt=this._mergeConfigObj(nt,this._element),nt=this._configAfterMerge(nt),this._typeCheckConfig(nt),nt}static getInstance(nt){return M.get(c(nt),this.DATA_KEY)}static getOrCreateInstance(nt,Zt={}){return this.getInstance(nt)||new this(nt,"object"==typeof Zt?Zt:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(nt){return`${nt}${this.EVENT_KEY}`}}const ye=Sn=>{let nt=Sn.getAttribute("data-bs-target");if(!nt||"#"===nt){let Zt=Sn.getAttribute("href");if(!Zt||!Zt.includes("#")&&!Zt.startsWith("."))return null;Zt.includes("#")&&!Zt.startsWith("#")&&(Zt=`#${Zt.split("#")[1]}`),nt=Zt&&"#"!==Zt?Zt.trim():null}return nt?nt.split(",").map(Zt=>b(Zt)).join(","):null},ge={find:(Sn,nt=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(nt,Sn)),findOne:(Sn,nt=document.documentElement)=>Element.prototype.querySelector.call(nt,Sn),children:(Sn,nt)=>[].concat(...Sn.children).filter(Zt=>Zt.matches(nt)),parents(Sn,nt){const Zt=[];let li=Sn.parentNode.closest(nt);for(;li;)Zt.push(li),li=li.parentNode.closest(nt);return Zt},prev(Sn,nt){let Zt=Sn.previousElementSibling;for(;Zt;){if(Zt.matches(nt))return[Zt];Zt=Zt.previousElementSibling}return[]},next(Sn,nt){let Zt=Sn.nextElementSibling;for(;Zt;){if(Zt.matches(nt))return[Zt];Zt=Zt.nextElementSibling}return[]},focusableChildren(Sn){const nt=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(Zt=>`${Zt}:not([tabindex^="-"])`).join(",");return this.find(nt,Sn).filter(Zt=>!a(Zt)&&s(Zt))},getSelectorFromElement(Sn){const nt=ye(Sn);return nt&&ge.findOne(nt)?nt:null},getElementFromSelector(Sn){const nt=ye(Sn);return nt?ge.findOne(nt):null},getMultipleElementsFromSelector(Sn){const nt=ye(Sn);return nt?ge.find(nt):[]}},fe=(Sn,nt="hide")=>{const li=Sn.NAME;ee.on(document,`click.dismiss${Sn.EVENT_KEY}`,`[data-bs-dismiss="${li}"]`,function(Gi){if(["A","AREA"].includes(this.tagName)&&Gi.preventDefault(),a(this))return;const bo=ge.getElementFromSelector(this)||this.closest(`.${li}`);Sn.getOrCreateInstance(bo)[nt]()})},Ee=".bs.alert",Oe=`close${Ee}`,ze=`closed${Ee}`;class Ue extends Ce{static get NAME(){return"alert"}close(){if(ee.trigger(this._element,Oe).defaultPrevented)return;this._element.classList.remove("show");const Zt=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,Zt)}_destroyElement(){this._element.remove(),ee.trigger(this._element,ze),this.dispose()}static jQueryInterface(nt){return this.each(function(){const Zt=Ue.getOrCreateInstance(this);if("string"==typeof nt){if(void 0===Zt[nt]||nt.startsWith("_")||"constructor"===nt)throw new TypeError(`No method named "${nt}"`);Zt[nt](this)}})}}fe(Ue,"close"),C(Ue);const Pe='[data-bs-toggle="button"]';class Re extends Ce{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(nt){return this.each(function(){const Zt=Re.getOrCreateInstance(this);"toggle"===nt&&Zt[nt]()})}}ee.on(document,"click.bs.button.data-api",Pe,Sn=>{Sn.preventDefault();const nt=Sn.target.closest(Pe);Re.getOrCreateInstance(nt).toggle()}),C(Re);const Xe=".bs.swipe",tt=`touchstart${Xe}`,vt=`touchmove${Xe}`,qe=`touchend${Xe}`,At=`pointerdown${Xe}`,Tt=`pointerup${Xe}`,Tn={endCallback:null,leftCallback:null,rightCallback:null},Jn={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class wi extends ve{constructor(nt,Zt){super(),this._element=nt,nt&&wi.isSupported()&&(this._config=this._getConfig(Zt),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Tn}static get DefaultType(){return Jn}static get NAME(){return"swipe"}dispose(){ee.off(this._element,Xe)}_start(nt){this._supportPointerEvents?this._eventIsPointerPenTouch(nt)&&(this._deltaX=nt.clientX):this._deltaX=nt.touches[0].clientX}_end(nt){this._eventIsPointerPenTouch(nt)&&(this._deltaX=nt.clientX-this._deltaX),this._handleSwipe(),I(this._config.endCallback)}_move(nt){this._deltaX=nt.touches&&nt.touches.length>1?0:nt.touches[0].clientX-this._deltaX}_handleSwipe(){const nt=Math.abs(this._deltaX);if(nt<=40)return;const Zt=nt/this._deltaX;this._deltaX=0,Zt&&I(Zt>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ee.on(this._element,At,nt=>this._start(nt)),ee.on(this._element,Tt,nt=>this._end(nt)),this._element.classList.add("pointer-event")):(ee.on(this._element,tt,nt=>this._start(nt)),ee.on(this._element,vt,nt=>this._move(nt)),ee.on(this._element,qe,nt=>this._end(nt)))}_eventIsPointerPenTouch(nt){return this._supportPointerEvents&&("pen"===nt.pointerType||"touch"===nt.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Ai=".bs.carousel",pt=".data-api",Et="next",hn="prev",$n="left",Ln="right",Nt=`slide${Ai}`,Gt=`slid${Ai}`,on=`keydown${Ai}`,sn=`mouseenter${Ai}`,It=`mouseleave${Ai}`,Ot=`dragstart${Ai}`,zt=`load${Ai}${pt}`,un=`click${Ai}${pt}`,Pn="carousel",ci="active",rn=".active",en=".carousel-item",Zn=rn+en,Hn={ArrowLeft:Ln,ArrowRight:$n},ui={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},bi={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ao extends Ce{constructor(nt,Zt){super(nt,Zt),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ge.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Pn&&this.cycle()}static get Default(){return ui}static get DefaultType(){return bi}static get NAME(){return"carousel"}next(){this._slide(Et)}nextWhenVisible(){!document.hidden&&s(this._element)&&this.next()}prev(){this._slide(hn)}pause(){this._isSliding&&y(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding)return void ee.one(this._element,Gt,()=>this.cycle());this.cycle()}}to(nt){const Zt=this._getItems();if(nt>Zt.length-1||nt<0)return;if(this._isSliding)return void ee.one(this._element,Gt,()=>this.to(nt));const li=this._getItemIndex(this._getActive());li!==nt&&this._slide(nt>li?Et:hn,Zt[nt])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(nt){return nt.defaultInterval=nt.interval,nt}_addEventListeners(){this._config.keyboard&&ee.on(this._element,on,nt=>this._keydown(nt)),"hover"===this._config.pause&&(ee.on(this._element,sn,()=>this.pause()),ee.on(this._element,It,()=>this._maybeEnableCycle())),this._config.touch&&wi.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const li of ge.find(".carousel-item img",this._element))ee.on(li,Ot,Gi=>Gi.preventDefault());this._swipeHelper=new wi(this._element,{leftCallback:()=>this._slide(this._directionToOrder($n)),rightCallback:()=>this._slide(this._directionToOrder(Ln)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}})}_keydown(nt){if(/input|textarea/i.test(nt.target.tagName))return;const Zt=Hn[nt.key];Zt&&(nt.preventDefault(),this._slide(this._directionToOrder(Zt)))}_getItemIndex(nt){return this._getItems().indexOf(nt)}_setActiveIndicatorElement(nt){if(!this._indicatorsElement)return;const Zt=ge.findOne(rn,this._indicatorsElement);Zt.classList.remove(ci),Zt.removeAttribute("aria-current");const li=ge.findOne(`[data-bs-slide-to="${nt}"]`,this._indicatorsElement);li&&(li.classList.add(ci),li.setAttribute("aria-current","true"))}_updateInterval(){const nt=this._activeElement||this._getActive();if(!nt)return;const Zt=Number.parseInt(nt.getAttribute("data-bs-interval"),10);this._config.interval=Zt||this._config.defaultInterval}_slide(nt,Zt=null){if(this._isSliding)return;const li=this._getActive(),Gi=nt===Et,bo=Zt||N(this._getItems(),li,Gi,this._config.wrap);if(bo===li)return;const Bo=this._getItemIndex(bo),ir=Ds=>ee.trigger(this._element,Ds,{relatedTarget:bo,direction:this._orderToDirection(nt),from:this._getItemIndex(li),to:Bo});if(ir(Nt).defaultPrevented||!li||!bo)return;const Ur=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Bo),this._activeElement=bo;const Ar=Gi?"carousel-item-start":"carousel-item-end",Us=Gi?"carousel-item-next":"carousel-item-prev";bo.classList.add(Us),li.classList.add(Ar),bo.classList.add(Ar),this._queueCallback(()=>{bo.classList.remove(Ar,Us),bo.classList.add(ci),li.classList.remove(ci,Us,Ar),this._isSliding=!1,ir(Gt)},li,this._isAnimated()),Ur&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return ge.findOne(Zn,this._element)}_getItems(){return ge.find(en,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(nt){return D()?nt===$n?hn:Et:nt===$n?Et:hn}_orderToDirection(nt){return D()?nt===hn?$n:Ln:nt===hn?Ln:$n}static jQueryInterface(nt){return this.each(function(){const Zt=ao.getOrCreateInstance(this,nt);if("number"!=typeof nt){if("string"==typeof nt){if(void 0===Zt[nt]||nt.startsWith("_")||"constructor"===nt)throw new TypeError(`No method named "${nt}"`);Zt[nt]()}}else Zt.to(nt)})}}ee.on(document,un,"[data-bs-slide], [data-bs-slide-to]",function(Sn){const nt=ge.getElementFromSelector(this);if(!nt||!nt.classList.contains(Pn))return;Sn.preventDefault();const Zt=ao.getOrCreateInstance(nt),li=this.getAttribute("data-bs-slide-to");return li?(Zt.to(li),void Zt._maybeEnableCycle()):"next"===be.getDataAttribute(this,"slide")?(Zt.next(),void Zt._maybeEnableCycle()):(Zt.prev(),void Zt._maybeEnableCycle())}),ee.on(window,zt,()=>{const Sn=ge.find('[data-bs-ride="carousel"]');for(const nt of Sn)ao.getOrCreateInstance(nt)}),C(ao);const Zo=".bs.collapse",hr=`show${Zo}`,Rt=`shown${Zo}`,mn=`hide${Zo}`,pi=`hidden${Zo}`,Ti=`click${Zo}.data-api`,lo="show",Eo="collapse",Jo="collapsing",Gr=`:scope .${Eo} .${Eo}`,ko='[data-bs-toggle="collapse"]',er={parent:null,toggle:!0},or={parent:"(null|element)",toggle:"boolean"};class Jr extends Ce{constructor(nt,Zt){super(nt,Zt),this._isTransitioning=!1,this._triggerArray=[];const li=ge.find(ko);for(const Gi of li){const bo=ge.getSelectorFromElement(Gi),Bo=ge.find(bo).filter(ir=>ir===this._element);null!==bo&&Bo.length&&this._triggerArray.push(Gi)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return er}static get DefaultType(){return or}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let nt=[];if(this._config.parent&&(nt=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(ir=>ir!==this._element).map(ir=>Jr.getOrCreateInstance(ir,{toggle:!1}))),nt.length&&nt[0]._isTransitioning||ee.trigger(this._element,hr).defaultPrevented)return;for(const ir of nt)ir.hide();const li=this._getDimension();this._element.classList.remove(Eo),this._element.classList.add(Jo),this._element.style[li]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const Bo=`scroll${li[0].toUpperCase()+li.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Jo),this._element.classList.add(Eo,lo),this._element.style[li]="",ee.trigger(this._element,Rt)},this._element,!0),this._element.style[li]=`${this._element[Bo]}px`}hide(){if(this._isTransitioning||!this._isShown()||ee.trigger(this._element,mn).defaultPrevented)return;const Zt=this._getDimension();this._element.style[Zt]=`${this._element.getBoundingClientRect()[Zt]}px`,this._element.classList.add(Jo),this._element.classList.remove(Eo,lo);for(const Gi of this._triggerArray){const bo=ge.getElementFromSelector(Gi);bo&&!this._isShown(bo)&&this._addAriaAndCollapsedClass([Gi],!1)}this._isTransitioning=!0;this._element.style[Zt]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Jo),this._element.classList.add(Eo),ee.trigger(this._element,pi)},this._element,!0)}_isShown(nt=this._element){return nt.classList.contains(lo)}_configAfterMerge(nt){return nt.toggle=!!nt.toggle,nt.parent=c(nt.parent),nt}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const nt=this._getFirstLevelChildren(ko);for(const Zt of nt){const li=ge.getElementFromSelector(Zt);li&&this._addAriaAndCollapsedClass([Zt],this._isShown(li))}}_getFirstLevelChildren(nt){const Zt=ge.find(Gr,this._config.parent);return ge.find(nt,this._config.parent).filter(li=>!Zt.includes(li))}_addAriaAndCollapsedClass(nt,Zt){if(nt.length)for(const li of nt)li.classList.toggle("collapsed",!Zt),li.setAttribute("aria-expanded",Zt)}static jQueryInterface(nt){const Zt={};return"string"==typeof nt&&/show|hide/.test(nt)&&(Zt.toggle=!1),this.each(function(){const li=Jr.getOrCreateInstance(this,Zt);if("string"==typeof nt){if(typeof li[nt]>"u")throw new TypeError(`No method named "${nt}"`);li[nt]()}})}}ee.on(document,Ti,ko,function(Sn){("A"===Sn.target.tagName||Sn.delegateTarget&&"A"===Sn.delegateTarget.tagName)&&Sn.preventDefault();for(const nt of ge.getMultipleElementsFromSelector(this))Jr.getOrCreateInstance(nt,{toggle:!1}).toggle()}),C(Jr);var Wr="top",Xr="bottom",Mr="right",dn="left",an="auto",_n=[Wr,Xr,Mr,dn],Wt="start",zn="end",mi="clippingParents",Si="viewport",go="popper",No="reference",Sr=_n.reduce(function(Sn,nt){return Sn.concat([nt+"-"+Wt,nt+"-"+zn])},[]),pr=[].concat(_n,[an]).reduce(function(Sn,nt){return Sn.concat([nt,nt+"-"+Wt,nt+"-"+zn])},[]),Vr="beforeRead",bn="afterRead",jn="beforeMain",Mi="afterMain",Ki="beforeWrite",gn="afterWrite",Kt=[Vr,"read",bn,jn,"main",Mi,Ki,"write",gn];function Mn(Sn){return Sn?(Sn.nodeName||"").toLowerCase():null}function _i(Sn){if(null==Sn)return window;if("[object Window]"!==Sn.toString()){var nt=Sn.ownerDocument;return nt&&nt.defaultView||window}return Sn}function Qi(Sn){return Sn instanceof _i(Sn).Element||Sn instanceof Element}function Co(Sn){return Sn instanceof _i(Sn).HTMLElement||Sn instanceof HTMLElement}function $o(Sn){return!(typeof ShadowRoot>"u")&&(Sn instanceof _i(Sn).ShadowRoot||Sn instanceof ShadowRoot)}const rr={name:"applyStyles",enabled:!0,phase:"write",fn:function sr(Sn){var nt=Sn.state;Object.keys(nt.elements).forEach(function(Zt){var li=nt.styles[Zt]||{},Gi=nt.attributes[Zt]||{},bo=nt.elements[Zt];!Co(bo)||!Mn(bo)||(Object.assign(bo.style,li),Object.keys(Gi).forEach(function(Bo){var ir=Gi[Bo];!1===ir?bo.removeAttribute(Bo):bo.setAttribute(Bo,!0===ir?"":ir)}))})},effect:function lr(Sn){var nt=Sn.state,Zt={popper:{position:nt.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(nt.elements.popper.style,Zt.popper),nt.styles=Zt,nt.elements.arrow&&Object.assign(nt.elements.arrow.style,Zt.arrow),function(){Object.keys(nt.elements).forEach(function(li){var Gi=nt.elements[li],bo=nt.attributes[li]||{},ir=Object.keys(nt.styles.hasOwnProperty(li)?nt.styles[li]:Zt[li]).reduce(function(yr,Ur){return yr[Ur]="",yr},{});!Co(Gi)||!Mn(Gi)||(Object.assign(Gi.style,ir),Object.keys(bo).forEach(function(yr){Gi.removeAttribute(yr)}))})}},requires:["computeStyles"]};function Pr(Sn){return Sn.split("-")[0]}var wr=Math.max,Fo=Math.min,os=Math.round;function fs(){var Sn=navigator.userAgentData;return null!=Sn&&Sn.brands&&Array.isArray(Sn.brands)?Sn.brands.map(function(nt){return nt.brand+"/"+nt.version}).join(" "):navigator.userAgent}function js(){return!/^((?!chrome|android).)*safari/i.test(fs())}function Ta(Sn,nt,Zt){void 0===nt&&(nt=!1),void 0===Zt&&(Zt=!1);var li=Sn.getBoundingClientRect(),Gi=1,bo=1;nt&&Co(Sn)&&(Gi=Sn.offsetWidth>0&&os(li.width)/Sn.offsetWidth||1,bo=Sn.offsetHeight>0&&os(li.height)/Sn.offsetHeight||1);var ir=(Qi(Sn)?_i(Sn):window).visualViewport,yr=!js()&&Zt,Ur=(li.left+(yr&&ir?ir.offsetLeft:0))/Gi,Ar=(li.top+(yr&&ir?ir.offsetTop:0))/bo,Us=li.width/Gi,ca=li.height/bo;return{width:Us,height:ca,top:Ar,right:Ur+Us,bottom:Ar+ca,left:Ur,x:Ur,y:Ar}}function es(Sn){var nt=Ta(Sn),Zt=Sn.offsetWidth,li=Sn.offsetHeight;return Math.abs(nt.width-Zt)<=1&&(Zt=nt.width),Math.abs(nt.height-li)<=1&&(li=nt.height),{x:Sn.offsetLeft,y:Sn.offsetTop,width:Zt,height:li}}function gs(Sn,nt){var Zt=nt.getRootNode&&nt.getRootNode();if(Sn.contains(nt))return!0;if(Zt&&$o(Zt)){var li=nt;do{if(li&&Sn.isSameNode(li))return!0;li=li.parentNode||li.host}while(li)}return!1}function Ca(Sn){return _i(Sn).getComputedStyle(Sn)}function Ga(Sn){return["table","td","th"].indexOf(Mn(Sn))>=0}function Fi(Sn){return((Qi(Sn)?Sn.ownerDocument:Sn.document)||window.document).documentElement}function ct(Sn){return"html"===Mn(Sn)?Sn:Sn.assignedSlot||Sn.parentNode||($o(Sn)?Sn.host:null)||Fi(Sn)}function Ut(Sn){return Co(Sn)&&"fixed"!==Ca(Sn).position?Sn.offsetParent:null}function kn(Sn){for(var nt=_i(Sn),Zt=Ut(Sn);Zt&&Ga(Zt)&&"static"===Ca(Zt).position;)Zt=Ut(Zt);return Zt&&("html"===Mn(Zt)||"body"===Mn(Zt)&&"static"===Ca(Zt).position)?nt:Zt||function nn(Sn){var nt=/firefox/i.test(fs());if(/Trident/i.test(fs())&&Co(Sn)&&"fixed"===Ca(Sn).position)return null;var Gi=ct(Sn);for($o(Gi)&&(Gi=Gi.host);Co(Gi)&&["html","body"].indexOf(Mn(Gi))<0;){var bo=Ca(Gi);if("none"!==bo.transform||"none"!==bo.perspective||"paint"===bo.contain||-1!==["transform","perspective"].indexOf(bo.willChange)||nt&&"filter"===bo.willChange||nt&&bo.filter&&"none"!==bo.filter)return Gi;Gi=Gi.parentNode}return null}(Sn)||nt}function si(Sn){return["top","bottom"].indexOf(Sn)>=0?"x":"y"}function vi(Sn,nt,Zt){return wr(Sn,Fo(nt,Zt))}function Xi(Sn){return Object.assign({},{top:0,right:0,bottom:0,left:0},Sn)}function Vo(Sn,nt){return nt.reduce(function(Zt,li){return Zt[li]=Sn,Zt},{})}const ms={name:"arrow",enabled:!0,phase:"main",fn:function Er(Sn){var nt,Zt=Sn.state,li=Sn.name,Gi=Sn.options,bo=Zt.elements.arrow,Bo=Zt.modifiersData.popperOffsets,ir=Pr(Zt.placement),yr=si(ir),Ar=[dn,Mr].indexOf(ir)>=0?"height":"width";if(bo&&Bo){var Us=function(nt,Zt){return Xi("number"!=typeof(nt="function"==typeof nt?nt(Object.assign({},Zt.rects,{placement:Zt.placement})):nt)?nt:Vo(nt,_n))}(Gi.padding,Zt),ca=es(bo),Ds="y"===yr?Wr:dn,al="y"===yr?Xr:Mr,Js=Zt.rects.reference[Ar]+Zt.rects.reference[yr]-Bo[yr]-Zt.rects.popper[Ar],Ra=Bo[yr]-Zt.rects.reference[yr],el=kn(bo),ol=el?"y"===yr?el.clientHeight||0:el.clientWidth||0:0,Ya=ol/2-ca[Ar]/2+(Js/2-Ra/2),Cl=vi(Us[Ds],Ya,ol-ca[Ar]-Us[al]);Zt.modifiersData[li]=((nt={})[yr]=Cl,nt.centerOffset=Cl-Ya,nt)}},effect:function Ts(Sn){var nt=Sn.state,li=Sn.options.element,Gi=void 0===li?"[data-popper-arrow]":li;null!=Gi&&("string"==typeof Gi&&!(Gi=nt.elements.popper.querySelector(Gi))||gs(nt.elements.popper,Gi)&&(nt.elements.arrow=Gi))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(Sn){return Sn.split("-")[1]}var $r={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gs(Sn){var nt,Zt=Sn.popper,li=Sn.popperRect,Gi=Sn.placement,bo=Sn.variation,Bo=Sn.offsets,ir=Sn.position,yr=Sn.gpuAcceleration,Ur=Sn.adaptive,Ar=Sn.roundOffsets,Us=Sn.isFixed,ca=Bo.x,Ds=void 0===ca?0:ca,al=Bo.y,Js=void 0===al?0:al,Ra="function"==typeof Ar?Ar({x:Ds,y:Js}):{x:Ds,y:Js};Ds=Ra.x,Js=Ra.y;var el=Bo.hasOwnProperty("x"),ol=Bo.hasOwnProperty("y"),ns=dn,pa=Wr,ga=window;if(Ur){var Ya=kn(Zt),Cl="clientHeight",ql="clientWidth";Ya===_i(Zt)&&"static"!==Ca(Ya=Fi(Zt)).position&&"absolute"===ir&&(Cl="scrollHeight",ql="scrollWidth"),(Gi===Wr||(Gi===dn||Gi===Mr)&&bo===zn)&&(pa=Xr,Js-=(Us&&Ya===ga&&ga.visualViewport?ga.visualViewport.height:Ya[Cl])-li.height,Js*=yr?1:-1),Gi!==dn&&(Gi!==Wr&&Gi!==Xr||bo!==zn)||(ns=Mr,Ds-=(Us&&Ya===ga&&ga.visualViewport?ga.visualViewport.width:Ya[ql])-li.width,Ds*=yr?1:-1)}var hd,Sc=Object.assign({position:ir},Ur&&$r),fc=!0===Ar?function Qa(Sn,nt){var li=Sn.y,Gi=nt.devicePixelRatio||1;return{x:os(Sn.x*Gi)/Gi||0,y:os(li*Gi)/Gi||0}}({x:Ds,y:Js},_i(Zt)):{x:Ds,y:Js};return Ds=fc.x,Js=fc.y,Object.assign({},Sc,yr?((hd={})[pa]=ol?"0":"",hd[ns]=el?"0":"",hd.transform=(ga.devicePixelRatio||1)<=1?"translate("+Ds+"px, "+Js+"px)":"translate3d("+Ds+"px, "+Js+"px, 0)",hd):((nt={})[pa]=ol?Js+"px":"",nt[ns]=el?Ds+"px":"",nt.transform="",nt))}const Ma={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Vl(Sn){var nt=Sn.state,Zt=Sn.options,li=Zt.gpuAcceleration,Gi=void 0===li||li,bo=Zt.adaptive,Bo=void 0===bo||bo,ir=Zt.roundOffsets,yr=void 0===ir||ir,Ur={placement:Pr(nt.placement),variation:rs(nt.placement),popper:nt.elements.popper,popperRect:nt.rects.popper,gpuAcceleration:Gi,isFixed:"fixed"===nt.options.strategy};null!=nt.modifiersData.popperOffsets&&(nt.styles.popper=Object.assign({},nt.styles.popper,Gs(Object.assign({},Ur,{offsets:nt.modifiersData.popperOffsets,position:nt.options.strategy,adaptive:Bo,roundOffsets:yr})))),null!=nt.modifiersData.arrow&&(nt.styles.arrow=Object.assign({},nt.styles.arrow,Gs(Object.assign({},Ur,{offsets:nt.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:yr})))),nt.attributes.popper=Object.assign({},nt.attributes.popper,{"data-popper-placement":nt.placement})},data:{}};var Lo={passive:!0};const cl={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function Ms(Sn){var nt=Sn.state,Zt=Sn.instance,li=Sn.options,Gi=li.scroll,bo=void 0===Gi||Gi,Bo=li.resize,ir=void 0===Bo||Bo,yr=_i(nt.elements.popper),Ur=[].concat(nt.scrollParents.reference,nt.scrollParents.popper);return bo&&Ur.forEach(function(Ar){Ar.addEventListener("scroll",Zt.update,Lo)}),ir&&yr.addEventListener("resize",Zt.update,Lo),function(){bo&&Ur.forEach(function(Ar){Ar.removeEventListener("scroll",Zt.update,Lo)}),ir&&yr.removeEventListener("resize",Zt.update,Lo)}},data:{}};var Fs={left:"right",right:"left",bottom:"top",top:"bottom"};function Hl(Sn){return Sn.replace(/left|right|bottom|top/g,function(nt){return Fs[nt]})}var Ld={start:"end",end:"start"};function nd(Sn){return Sn.replace(/start|end/g,function(nt){return Ld[nt]})}function Cn(Sn){var nt=_i(Sn);return{scrollLeft:nt.pageXOffset,scrollTop:nt.pageYOffset}}function vn(Sn){return Ta(Fi(Sn)).left+Cn(Sn).scrollLeft}function yi(Sn){var nt=Ca(Sn);return/auto|scroll|overlay|hidden/.test(nt.overflow+nt.overflowY+nt.overflowX)}function Dr(Sn){return["html","body","#document"].indexOf(Mn(Sn))>=0?Sn.ownerDocument.body:Co(Sn)&&yi(Sn)?Sn:Dr(ct(Sn))}function us(Sn,nt){var Zt;void 0===nt&&(nt=[]);var li=Dr(Sn),Gi=li===(null==(Zt=Sn.ownerDocument)?void 0:Zt.body),bo=_i(li),Bo=Gi?[bo].concat(bo.visualViewport||[],yi(li)?li:[]):li,ir=nt.concat(Bo);return Gi?ir:ir.concat(us(ct(Bo)))}function la(Sn){return Object.assign({},Sn,{left:Sn.x,top:Sn.y,right:Sn.x+Sn.width,bottom:Sn.y+Sn.height})}function Wa(Sn,nt,Zt){return nt===Si?la(function Ht(Sn,nt){var Zt=_i(Sn),li=Fi(Sn),Gi=Zt.visualViewport,bo=li.clientWidth,Bo=li.clientHeight,ir=0,yr=0;if(Gi){bo=Gi.width,Bo=Gi.height;var Ur=js();(Ur||!Ur&&"fixed"===nt)&&(ir=Gi.offsetLeft,yr=Gi.offsetTop)}return{width:bo,height:Bo,x:ir+vn(Sn),y:yr}}(Sn,Zt)):Qi(nt)?function ya(Sn,nt){var Zt=Ta(Sn,!1,"fixed"===nt);return Zt.top=Zt.top+Sn.clientTop,Zt.left=Zt.left+Sn.clientLeft,Zt.bottom=Zt.top+Sn.clientHeight,Zt.right=Zt.left+Sn.clientWidth,Zt.width=Sn.clientWidth,Zt.height=Sn.clientHeight,Zt.x=Zt.left,Zt.y=Zt.top,Zt}(nt,Zt):la(function Kn(Sn){var nt,Zt=Fi(Sn),li=Cn(Sn),Gi=null==(nt=Sn.ownerDocument)?void 0:nt.body,bo=wr(Zt.scrollWidth,Zt.clientWidth,Gi?Gi.scrollWidth:0,Gi?Gi.clientWidth:0),Bo=wr(Zt.scrollHeight,Zt.clientHeight,Gi?Gi.scrollHeight:0,Gi?Gi.clientHeight:0),ir=-li.scrollLeft+vn(Sn),yr=-li.scrollTop;return"rtl"===Ca(Gi||Zt).direction&&(ir+=wr(Zt.clientWidth,Gi?Gi.clientWidth:0)-bo),{width:bo,height:Bo,x:ir,y:yr}}(Fi(Sn)))}function ht(Sn,nt,Zt,li){var Gi="clippingParents"===nt?function ft(Sn){var nt=us(ct(Sn)),li=["absolute","fixed"].indexOf(Ca(Sn).position)>=0&&Co(Sn)?kn(Sn):Sn;return Qi(li)?nt.filter(function(Gi){return Qi(Gi)&&gs(Gi,li)&&"body"!==Mn(Gi)}):[]}(Sn):[].concat(nt),bo=[].concat(Gi,[Zt]),ir=bo.reduce(function(yr,Ur){var Ar=Wa(Sn,Ur,li);return yr.top=wr(Ar.top,yr.top),yr.right=Fo(Ar.right,yr.right),yr.bottom=Fo(Ar.bottom,yr.bottom),yr.left=wr(Ar.left,yr.left),yr},Wa(Sn,bo[0],li));return ir.width=ir.right-ir.left,ir.height=ir.bottom-ir.top,ir.x=ir.left,ir.y=ir.top,ir}function jt(Sn){var yr,nt=Sn.reference,Zt=Sn.element,li=Sn.placement,Gi=li?Pr(li):null,bo=li?rs(li):null,Bo=nt.x+nt.width/2-Zt.width/2,ir=nt.y+nt.height/2-Zt.height/2;switch(Gi){case Wr:yr={x:Bo,y:nt.y-Zt.height};break;case Xr:yr={x:Bo,y:nt.y+nt.height};break;case Mr:yr={x:nt.x+nt.width,y:ir};break;case dn:yr={x:nt.x-Zt.width,y:ir};break;default:yr={x:nt.x,y:nt.y}}var Ur=Gi?si(Gi):null;if(null!=Ur){var Ar="y"===Ur?"height":"width";switch(bo){case Wt:yr[Ur]=yr[Ur]-(nt[Ar]/2-Zt[Ar]/2);break;case zn:yr[Ur]=yr[Ur]+(nt[Ar]/2-Zt[Ar]/2)}}return yr}function yn(Sn,nt){void 0===nt&&(nt={});var li=nt.placement,Gi=void 0===li?Sn.placement:li,bo=nt.strategy,Bo=void 0===bo?Sn.strategy:bo,ir=nt.boundary,yr=void 0===ir?mi:ir,Ur=nt.rootBoundary,Ar=void 0===Ur?Si:Ur,Us=nt.elementContext,ca=void 0===Us?go:Us,Ds=nt.altBoundary,al=void 0!==Ds&&Ds,Js=nt.padding,Ra=void 0===Js?0:Js,el=Xi("number"!=typeof Ra?Ra:Vo(Ra,_n)),ns=Sn.rects.popper,pa=Sn.elements[al?ca===go?No:go:ca],ga=ht(Qi(pa)?pa:pa.contextElement||Fi(Sn.elements.popper),yr,Ar,Bo),Ya=Ta(Sn.elements.reference),Cl=jt({reference:Ya,element:ns,strategy:"absolute",placement:Gi}),ql=la(Object.assign({},ns,Cl)),zl=ca===go?ql:Ya,Il={top:ga.top-zl.top+el.top,bottom:zl.bottom-ga.bottom+el.bottom,left:ga.left-zl.left+el.left,right:zl.right-ga.right+el.right},Sc=Sn.modifiersData.offset;if(ca===go&&Sc){var fc=Sc[Gi];Object.keys(Il).forEach(function(hd){var Nu=[Mr,Xr].indexOf(hd)>=0?1:-1,Jp=[Wr,Xr].indexOf(hd)>=0?"y":"x";Il[hd]+=fc[Jp]*Nu})}return Il}const to={name:"flip",enabled:!0,phase:"main",fn:function xi(Sn){var nt=Sn.state,Zt=Sn.options,li=Sn.name;if(!nt.modifiersData[li]._skip){for(var Gi=Zt.mainAxis,bo=void 0===Gi||Gi,Bo=Zt.altAxis,ir=void 0===Bo||Bo,yr=Zt.fallbackPlacements,Ur=Zt.padding,Ar=Zt.boundary,Us=Zt.rootBoundary,ca=Zt.altBoundary,Ds=Zt.flipVariations,al=void 0===Ds||Ds,Js=Zt.allowedAutoPlacements,Ra=nt.options.placement,el=Pr(Ra),ns=yr||(el!==Ra&&al?function hi(Sn){if(Pr(Sn)===an)return[];var nt=Hl(Sn);return[nd(Sn),nt,nd(nt)]}(Ra):[Hl(Ra)]),pa=[Ra].concat(ns).reduce(function(su,mc){return su.concat(Pr(mc)===an?function Nn(Sn,nt){void 0===nt&&(nt={});var Gi=nt.boundary,bo=nt.rootBoundary,Bo=nt.padding,ir=nt.flipVariations,yr=nt.allowedAutoPlacements,Ur=void 0===yr?pr:yr,Ar=rs(nt.placement),Us=Ar?ir?Sr:Sr.filter(function(al){return rs(al)===Ar}):_n,ca=Us.filter(function(al){return Ur.indexOf(al)>=0});0===ca.length&&(ca=Us);var Ds=ca.reduce(function(al,Js){return al[Js]=yn(Sn,{placement:Js,boundary:Gi,rootBoundary:bo,padding:Bo})[Pr(Js)],al},{});return Object.keys(Ds).sort(function(al,Js){return Ds[al]-Ds[Js]})}(nt,{placement:mc,boundary:Ar,rootBoundary:Us,padding:Ur,flipVariations:al,allowedAutoPlacements:Js}):mc)},[]),ga=nt.rects.reference,Ya=nt.rects.popper,Cl=new Map,ql=!0,zl=pa[0],Il=0;Il<pa.length;Il++){var Sc=pa[Il],fc=Pr(Sc),hd=rs(Sc)===Wt,Nu=[Wr,Xr].indexOf(fc)>=0,Jp=Nu?"width":"height",Vc=yn(nt,{placement:Sc,boundary:Ar,rootBoundary:Us,altBoundary:ca,padding:Ur}),lh=Nu?hd?Mr:dn:hd?Xr:Wr;ga[Jp]>Ya[Jp]&&(lh=Hl(lh));var Ho=Hl(lh),ks=[];if(bo&&ks.push(Vc[fc]<=0),ir&&ks.push(Vc[lh]<=0,Vc[Ho]<=0),ks.every(function(su){return su})){zl=Sc,ql=!1;break}Cl.set(Sc,ks)}if(ql)for(var ru=function(mc){var Fd=pa.find(function(eg){var hp=Cl.get(eg);if(hp)return hp.slice(0,mc).every(function(Zg){return Zg})});if(Fd)return zl=Fd,"break"},ba=al?3:1;ba>0&&"break"!==ru(ba);ba--);nt.placement!==zl&&(nt.modifiersData[li]._skip=!0,nt.placement=zl,nt.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Yi(Sn,nt,Zt){return void 0===Zt&&(Zt={x:0,y:0}),{top:Sn.top-nt.height-Zt.y,right:Sn.right-nt.width+Zt.x,bottom:Sn.bottom-nt.height+Zt.y,left:Sn.left-nt.width-Zt.x}}function uo(Sn){return[Wr,Mr,Xr,dn].some(function(nt){return Sn[nt]>=0})}const To={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function so(Sn){var nt=Sn.state,Zt=Sn.name,li=nt.rects.reference,Gi=nt.rects.popper,bo=nt.modifiersData.preventOverflow,Bo=yn(nt,{elementContext:"reference"}),ir=yn(nt,{altBoundary:!0}),yr=Yi(Bo,li),Ur=Yi(ir,Gi,bo),Ar=uo(yr),Us=uo(Ur);nt.modifiersData[Zt]={referenceClippingOffsets:yr,popperEscapeOffsets:Ur,isReferenceHidden:Ar,hasPopperEscaped:Us},nt.attributes.popper=Object.assign({},nt.attributes.popper,{"data-popper-reference-hidden":Ar,"data-popper-escaped":Us})}};const ln={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function Wo(Sn){var nt=Sn.state,li=Sn.name,Gi=Sn.options.offset,bo=void 0===Gi?[0,0]:Gi,Bo=pr.reduce(function(Ar,Us){return Ar[Us]=function Ji(Sn,nt,Zt){var li=Pr(Sn),Gi=[dn,Wr].indexOf(li)>=0?-1:1,bo="function"==typeof Zt?Zt(Object.assign({},nt,{placement:Sn})):Zt,Bo=bo[0],ir=bo[1];return Bo=Bo||0,ir=(ir||0)*Gi,[dn,Mr].indexOf(li)>=0?{x:ir,y:Bo}:{x:Bo,y:ir}}(Us,nt.rects,bo),Ar},{}),ir=Bo[nt.placement],Ur=ir.y;null!=nt.modifiersData.popperOffsets&&(nt.modifiersData.popperOffsets.x+=ir.x,nt.modifiersData.popperOffsets.y+=Ur),nt.modifiersData[li]=Bo}};const kt={name:"popperOffsets",enabled:!0,phase:"read",fn:function Bt(Sn){var nt=Sn.state;nt.modifiersData[Sn.name]=jt({reference:nt.rects.reference,element:nt.rects.popper,strategy:"absolute",placement:nt.placement})},data:{}};const Ri={name:"preventOverflow",enabled:!0,phase:"main",fn:function ti(Sn){var nt=Sn.state,Zt=Sn.options,li=Sn.name,Gi=Zt.mainAxis,bo=void 0===Gi||Gi,Bo=Zt.altAxis,ir=void 0!==Bo&&Bo,ca=Zt.tether,Ds=void 0===ca||ca,al=Zt.tetherOffset,Js=void 0===al?0:al,Ra=yn(nt,{boundary:Zt.boundary,rootBoundary:Zt.rootBoundary,padding:Zt.padding,altBoundary:Zt.altBoundary}),el=Pr(nt.placement),ol=rs(nt.placement),ns=!ol,pa=si(el),ga=function Rn(Sn){return"x"===Sn?"y":"x"}(pa),Ya=nt.modifiersData.popperOffsets,Cl=nt.rects.reference,ql=nt.rects.popper,zl="function"==typeof Js?Js(Object.assign({},nt.rects,{placement:nt.placement})):Js,Il="number"==typeof zl?{mainAxis:zl,altAxis:zl}:Object.assign({mainAxis:0,altAxis:0},zl),Sc=nt.modifiersData.offset?nt.modifiersData.offset[nt.placement]:null,fc={x:0,y:0};if(Ya){if(bo){var hd,Nu="y"===pa?Wr:dn,Jp="y"===pa?Xr:Mr,Vc="y"===pa?"height":"width",lh=Ya[pa],Ho=lh+Ra[Nu],ks=lh-Ra[Jp],Dh=Ds?-ql[Vc]/2:0,ru=ol===Wt?Cl[Vc]:ql[Vc],ba=ol===Wt?-ql[Vc]:-Cl[Vc],qp=nt.elements.arrow,su=Ds&&qp?es(qp):{width:0,height:0},mc=nt.modifiersData["arrow#persistent"]?nt.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Fd=mc[Nu],eg=mc[Jp],hp=vi(0,Cl[Vc],su[Vc]),Zg=ns?Cl[Vc]/2-Dh-hp-Fd-Il.mainAxis:ru-hp-Fd-Il.mainAxis,KS=ns?-Cl[Vc]/2+Dh+hp+eg+Il.mainAxis:ba+hp+eg+Il.mainAxis,Vd=nt.elements.arrow&&kn(nt.elements.arrow),ec=Vd?"y"===pa?Vd.clientTop||0:Vd.clientLeft||0:0,Ec=null!=(hd=Sc?.[pa])?hd:0,Oc=lh+KS-Ec,Fu=vi(Ds?Fo(Ho,lh+Zg-Ec-ec):Ho,lh,Ds?wr(ks,Oc):ks);Ya[pa]=Fu,fc[pa]=Fu-lh}if(ir){var jc,Ih=Ya[ga],tg="y"===ga?"height":"width",De=Ih+Ra["x"===pa?Wr:dn],Li=Ih-Ra["x"===pa?Xr:Mr],H=-1!==[Wr,dn].indexOf(el),Ne=null!=(jc=Sc?.[ga])?jc:0,Vn=H?De:Ih-Cl[tg]-ql[tg]-Ne+Il.altAxis,vs=H?Ih+Cl[tg]+ql[tg]-Ne-Il.altAxis:Li,Yr=Ds&&H?function Ni(Sn,nt,Zt){var li=vi(Sn,nt,Zt);return li>Zt?Zt:li}(Vn,Ih,vs):vi(Ds?Vn:De,Ih,Ds?vs:Li);Ya[ga]=Yr,fc[ga]=Yr-Ih}nt.modifiersData[li]=fc}},requiresIfExists:["offset"]};function Oo(Sn,nt,Zt){void 0===Zt&&(Zt=!1);var li=Co(nt),Gi=Co(nt)&&function So(Sn){var nt=Sn.getBoundingClientRect(),Zt=os(nt.width)/Sn.offsetWidth||1,li=os(nt.height)/Sn.offsetHeight||1;return 1!==Zt||1!==li}(nt),bo=Fi(nt),Bo=Ta(Sn,Gi,Zt),ir={scrollLeft:0,scrollTop:0},yr={x:0,y:0};return(li||!li&&!Zt)&&(("body"!==Mn(nt)||yi(bo))&&(ir=function eo(Sn){return Sn!==_i(Sn)&&Co(Sn)?function Oi(Sn){return{scrollLeft:Sn.scrollLeft,scrollTop:Sn.scrollTop}}(Sn):Cn(Sn)}(nt)),Co(nt)?((yr=Ta(nt,!0)).x+=nt.clientLeft,yr.y+=nt.clientTop):bo&&(yr.x=vn(bo))),{x:Bo.left+ir.scrollLeft-yr.x,y:Bo.top+ir.scrollTop-yr.y,width:Bo.width,height:Bo.height}}function Yo(Sn){var nt=new Map,Zt=new Set,li=[];function Gi(bo){Zt.add(bo.name),[].concat(bo.requires||[],bo.requiresIfExists||[]).forEach(function(ir){if(!Zt.has(ir)){var yr=nt.get(ir);yr&&Gi(yr)}}),li.push(bo)}return Sn.forEach(function(bo){nt.set(bo.name,bo)}),Sn.forEach(function(bo){Zt.has(bo.name)||Gi(bo)}),li}function jr(Sn){var nt;return function(){return nt||(nt=new Promise(function(Zt){Promise.resolve().then(function(){nt=void 0,Zt(Sn())})})),nt}}var bs={placement:"bottom",modifiers:[],strategy:"absolute"};function Io(){for(var Sn=arguments.length,nt=new Array(Sn),Zt=0;Zt<Sn;Zt++)nt[Zt]=arguments[Zt];return!nt.some(function(li){return!(li&&"function"==typeof li.getBoundingClientRect)})}function Pt(Sn){void 0===Sn&&(Sn={});var Zt=Sn.defaultModifiers,li=void 0===Zt?[]:Zt,Gi=Sn.defaultOptions,bo=void 0===Gi?bs:Gi;return function(ir,yr,Ur){void 0===Ur&&(Ur=bo);var Ar={placement:"bottom",orderedModifiers:[],options:Object.assign({},bs,bo),modifiersData:{},elements:{reference:ir,popper:yr},attributes:{},styles:{}},Us=[],ca=!1,Ds={state:Ar,setOptions:function(el){var ol="function"==typeof el?el(Ar.options):el;Js(),Ar.options=Object.assign({},bo,Ar.options,ol),Ar.scrollParents={reference:Qi(ir)?us(ir):ir.contextElement?us(ir.contextElement):[],popper:us(yr)};var ns=function zo(Sn){var nt=Yo(Sn);return Kt.reduce(function(Zt,li){return Zt.concat(nt.filter(function(Gi){return Gi.phase===li}))},[])}(function qr(Sn){var nt=Sn.reduce(function(Zt,li){var Gi=Zt[li.name];return Zt[li.name]=Gi?Object.assign({},Gi,li,{options:Object.assign({},Gi.options,li.options),data:Object.assign({},Gi.data,li.data)}):li,Zt},{});return Object.keys(nt).map(function(Zt){return nt[Zt]})}([].concat(li,Ar.options.modifiers)));return Ar.orderedModifiers=ns.filter(function(pa){return pa.enabled}),function al(){Ar.orderedModifiers.forEach(function(Ra){var ol=Ra.options,pa=Ra.effect;if("function"==typeof pa){var ga=pa({state:Ar,name:Ra.name,instance:Ds,options:void 0===ol?{}:ol});Us.push(ga||function(){})}})}(),Ds.update()},forceUpdate:function(){if(!ca){var el=Ar.elements,ol=el.reference,ns=el.popper;if(Io(ol,ns)){Ar.rects={reference:Oo(ol,kn(ns),"fixed"===Ar.options.strategy),popper:es(ns)},Ar.reset=!1,Ar.placement=Ar.options.placement,Ar.orderedModifiers.forEach(function(Il){return Ar.modifiersData[Il.name]=Object.assign({},Il.data)});for(var pa=0;pa<Ar.orderedModifiers.length;pa++)if(!0!==Ar.reset){var ga=Ar.orderedModifiers[pa],Ya=ga.fn,Cl=ga.options;"function"==typeof Ya&&(Ar=Ya({state:Ar,options:void 0===Cl?{}:Cl,name:ga.name,instance:Ds})||Ar)}else Ar.reset=!1,pa=-1}}},update:jr(function(){return new Promise(function(Ra){Ds.forceUpdate(),Ra(Ar)})}),destroy:function(){Js(),ca=!0}};if(!Io(ir,yr))return Ds;function Js(){Us.forEach(function(Ra){return Ra()}),Us=[]}return Ds.setOptions(Ur).then(function(Ra){!ca&&Ur.onFirstUpdate&&Ur.onFirstUpdate(Ra)}),Ds}}var St=Pt(),ai=Pt({defaultModifiers:[cl,kt,Ma,rr]}),jo=Pt({defaultModifiers:[cl,kt,Ma,rr,ln,to,Ri,ms,To]});const ia=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Mi,afterRead:bn,afterWrite:gn,applyStyles:rr,arrow:ms,auto:an,basePlacements:_n,beforeMain:jn,beforeRead:Vr,beforeWrite:Ki,bottom:Xr,clippingParents:mi,computeStyles:Ma,createPopper:jo,createPopperBase:St,createPopperLite:ai,detectOverflow:yn,end:zn,eventListeners:cl,flip:to,hide:To,left:dn,main:"main",modifierPhases:Kt,offset:ln,placements:pr,popper:go,popperGenerator:Pt,popperOffsets:kt,preventOverflow:Ri,read:"read",reference:No,right:Mr,start:Wt,top:Wr,variationPlacements:Sr,viewport:Si,write:"write"},Symbol.toStringTag,{value:"Module"})),Sh="dropdown",Ls=".bs.dropdown",Mu=".data-api",tp="ArrowUp",Rm="ArrowDown",Ig=`hide${Ls}`,kp=`hidden${Ls}`,yt=`show${Ls}`,Un=`shown${Ls}`,Jt=`click${Ls}${Mu}`,An=`keydown${Ls}${Mu}`,ki=`keyup${Ls}${Mu}`,Ao="show",mr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ja=`${mr}.${Ao}`,oa=".dropdown-menu",tu=D()?"top-end":"top-start",id=D()?"top-start":"top-end",od=D()?"bottom-end":"bottom-start",Sd=D()?"bottom-start":"bottom-end",Nc=D()?"left-start":"right-start",np=D()?"right-start":"left-start",rc={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Lp={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class rd extends Ce{constructor(nt,Zt){super(nt,Zt),this._popper=null,this._parent=this._element.parentNode,this._menu=ge.next(this._element,oa)[0]||ge.prev(this._element,oa)[0]||ge.findOne(oa,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return rc}static get DefaultType(){return Lp}static get NAME(){return Sh}toggle(){return this._isShown()?this.hide():this.show()}show(){if(a(this._element)||this._isShown())return;const nt={relatedTarget:this._element};if(!ee.trigger(this._element,yt,nt).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const li of[].concat(...document.body.children))ee.on(li,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ao),this._element.classList.add(Ao),ee.trigger(this._element,Un,nt)}}hide(){!a(this._element)&&this._isShown()&&this._completeHide({relatedTarget:this._element})}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(nt){if(!ee.trigger(this._element,Ig,nt).defaultPrevented){if("ontouchstart"in document.documentElement)for(const li of[].concat(...document.body.children))ee.off(li,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ao),this._element.classList.remove(Ao),this._element.setAttribute("aria-expanded","false"),be.removeDataAttribute(this._menu,"popper"),ee.trigger(this._element,kp,nt)}}_getConfig(nt){if("object"==typeof(nt=super._getConfig(nt)).reference&&!d(nt.reference)&&"function"!=typeof nt.reference.getBoundingClientRect)throw new TypeError(`${Sh.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return nt}_createPopper(){if(typeof ia>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let nt=this._element;"parent"===this._config.reference?nt=this._parent:d(this._config.reference)?nt=c(this._config.reference):"object"==typeof this._config.reference&&(nt=this._config.reference);const Zt=this._getPopperConfig();this._popper=jo(nt,this._menu,Zt)}_isShown(){return this._menu.classList.contains(Ao)}_getPlacement(){const nt=this._parent;if(nt.classList.contains("dropend"))return Nc;if(nt.classList.contains("dropstart"))return np;if(nt.classList.contains("dropup-center"))return"top";if(nt.classList.contains("dropdown-center"))return"bottom";const Zt="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return nt.classList.contains("dropup")?Zt?id:tu:Zt?Sd:od}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:nt}=this._config;return"string"==typeof nt?nt.split(",").map(Zt=>Number.parseInt(Zt,10)):"function"==typeof nt?Zt=>nt(Zt,this._element):nt}_getPopperConfig(){const nt={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(be.setDataAttribute(this._menu,"popper","static"),nt.modifiers=[{name:"applyStyles",enabled:!1}]),{...nt,...I(this._config.popperConfig,[nt])}}_selectMenuItem({key:nt,target:Zt}){const li=ge.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(Gi=>s(Gi));li.length&&N(li,Zt,nt===Rm,!li.includes(Zt)).focus()}static jQueryInterface(nt){return this.each(function(){const Zt=rd.getOrCreateInstance(this,nt);if("string"==typeof nt){if(typeof Zt[nt]>"u")throw new TypeError(`No method named "${nt}"`);Zt[nt]()}})}static clearMenus(nt){if(2===nt.button||"keyup"===nt.type&&"Tab"!==nt.key)return;const Zt=ge.find(Ja);for(const li of Zt){const Gi=rd.getInstance(li);if(!Gi||!1===Gi._config.autoClose)continue;const bo=nt.composedPath(),Bo=bo.includes(Gi._menu);if(bo.includes(Gi._element)||"inside"===Gi._config.autoClose&&!Bo||"outside"===Gi._config.autoClose&&Bo||Gi._menu.contains(nt.target)&&("keyup"===nt.type&&"Tab"===nt.key||/input|select|option|textarea|form/i.test(nt.target.tagName)))continue;const ir={relatedTarget:Gi._element};"click"===nt.type&&(ir.clickEvent=nt),Gi._completeHide(ir)}}static dataApiKeydownHandler(nt){const Zt=/input|textarea/i.test(nt.target.tagName),li="Escape"===nt.key,Gi=[tp,Rm].includes(nt.key);if(!Gi&&!li||Zt&&!li)return;nt.preventDefault();const bo=this.matches(mr)?this:ge.prev(this,mr)[0]||ge.next(this,mr)[0]||ge.findOne(mr,nt.delegateTarget.parentNode),Bo=rd.getOrCreateInstance(bo);if(Gi)return nt.stopPropagation(),Bo.show(),void Bo._selectMenuItem(nt);Bo._isShown()&&(nt.stopPropagation(),Bo.hide(),bo.focus())}}ee.on(document,An,mr,rd.dataApiKeydownHandler),ee.on(document,An,oa,rd.dataApiKeydownHandler),ee.on(document,Jt,rd.clearMenus),ee.on(document,ki,rd.clearMenus),ee.on(document,Jt,mr,function(Sn){Sn.preventDefault(),rd.getOrCreateInstance(this).toggle()}),C(rd);const Pg="backdrop",Z_=`mousedown.bs.${Pg}`,Bp={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Nf={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class pc extends ve{constructor(nt){super(),this._config=this._getConfig(nt),this._isAppended=!1,this._element=null}static get Default(){return Bp}static get DefaultType(){return Nf}static get NAME(){return Pg}show(nt){if(!this._config.isVisible)return void I(nt);this._append();const Zt=this._getElement();Zt.classList.add("show"),this._emulateAnimation(()=>{I(nt)})}hide(nt){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),I(nt)})):I(nt)}dispose(){this._isAppended&&(ee.off(this._element,Z_),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const nt=document.createElement("div");nt.className=this._config.className,this._config.isAnimated&&nt.classList.add("fade"),this._element=nt}return this._element}_configAfterMerge(nt){return nt.rootElement=c(nt.rootElement),nt}_append(){if(this._isAppended)return;const nt=this._getElement();this._config.rootElement.append(nt),ee.on(nt,Z_,()=>{I(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(nt){L(nt,this._getElement(),this._config.isAnimated)}}const sd=".bs.focustrap",nu=`focusin${sd}`,gc=`keydown.tab${sd}`,Fp="backward",Oh={autofocus:!0,trapElement:null},Vp={autofocus:"boolean",trapElement:"element"};class Hp extends ve{constructor(nt){super(),this._config=this._getConfig(nt),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Oh}static get DefaultType(){return Vp}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ee.off(document,sd),ee.on(document,nu,nt=>this._handleFocusin(nt)),ee.on(document,gc,nt=>this._handleKeydown(nt)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ee.off(document,sd))}_handleFocusin(nt){const{trapElement:Zt}=this._config;if(nt.target===document||nt.target===Zt||Zt.contains(nt.target))return;const li=ge.focusableChildren(Zt);0===li.length?Zt.focus():this._lastTabNavDirection===Fp?li[li.length-1].focus():li[0].focus()}_handleKeydown(nt){"Tab"===nt.key&&(this._lastTabNavDirection=nt.shiftKey?Fp:"forward")}}const Ed=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ld=".sticky-top",qu="padding-right",kg="margin-right";class Up{constructor(){this._element=document.body}getWidth(){const nt=document.documentElement.clientWidth;return Math.abs(window.innerWidth-nt)}hide(){const nt=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,qu,Zt=>Zt+nt),this._setElementAttributes(Ed,qu,Zt=>Zt+nt),this._setElementAttributes(ld,kg,Zt=>Zt-nt)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,qu),this._resetElementAttributes(Ed,qu),this._resetElementAttributes(ld,kg)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(nt,Zt,li){const Gi=this.getWidth();this._applyManipulationCallback(nt,Bo=>{if(Bo!==this._element&&window.innerWidth>Bo.clientWidth+Gi)return;this._saveInitialAttribute(Bo,Zt);const ir=window.getComputedStyle(Bo).getPropertyValue(Zt);Bo.style.setProperty(Zt,`${li(Number.parseFloat(ir))}px`)})}_saveInitialAttribute(nt,Zt){const li=nt.style.getPropertyValue(Zt);li&&be.setDataAttribute(nt,Zt,li)}_resetElementAttributes(nt,Zt){this._applyManipulationCallback(nt,Gi=>{const bo=be.getDataAttribute(Gi,Zt);null!==bo?(be.removeDataAttribute(Gi,Zt),Gi.style.setProperty(Zt,bo)):Gi.style.removeProperty(Zt)})}_applyManipulationCallback(nt,Zt){if(d(nt))Zt(nt);else for(const li of ge.find(nt,this._element))Zt(li)}}const cd=".bs.modal",bc=`hide${cd}`,Ff=`hidePrevented${cd}`,Bg=`hidden${cd}`,dd=`show${cd}`,Q_=`shown${cd}`,km=`resize${cd}`,Lm=`click.dismiss${cd}`,iu=`mousedown.dismiss${cd}`,J_=`keydown.dismiss${cd}`,zp=`click${cd}.data-api`,eh="modal-open",th="modal-static",Wp={backdrop:!0,focus:!0,keyboard:!0},nh={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Bd extends Ce{constructor(nt,Zt){super(nt,Zt),this._dialog=ge.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Up,this._addEventListeners()}static get Default(){return Wp}static get DefaultType(){return nh}static get NAME(){return"modal"}toggle(nt){return this._isShown?this.hide():this.show(nt)}show(nt){this._isShown||this._isTransitioning||ee.trigger(this._element,dd,{relatedTarget:nt}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(eh),this._adjustDialog(),this._backdrop.show(()=>this._showElement(nt)))}hide(){!this._isShown||this._isTransitioning||ee.trigger(this._element,bc).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove("show"),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ee.off(window,cd),ee.off(this._dialog,cd),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new pc({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Hp({trapElement:this._element})}_showElement(nt){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const Zt=ge.findOne(".modal-body",this._dialog);Zt&&(Zt.scrollTop=0),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ee.trigger(this._element,Q_,{relatedTarget:nt})},this._dialog,this._isAnimated())}_addEventListeners(){ee.on(this._element,J_,nt=>{if("Escape"===nt.key){if(this._config.keyboard)return void this.hide();this._triggerBackdropTransition()}}),ee.on(window,km,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ee.on(this._element,iu,nt=>{ee.one(this._element,Lm,Zt=>{if(this._element===nt.target&&this._element===Zt.target){if("static"===this._config.backdrop)return void this._triggerBackdropTransition();this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(eh),this._resetAdjustments(),this._scrollBar.reset(),ee.trigger(this._element,Bg)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ee.trigger(this._element,Ff).defaultPrevented)return;const Zt=this._element.scrollHeight>document.documentElement.clientHeight,li=this._element.style.overflowY;"hidden"===li||this._element.classList.contains(th)||(Zt||(this._element.style.overflowY="hidden"),this._element.classList.add(th),this._queueCallback(()=>{this._element.classList.remove(th),this._queueCallback(()=>{this._element.style.overflowY=li},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const nt=this._element.scrollHeight>document.documentElement.clientHeight,Zt=this._scrollBar.getWidth(),li=Zt>0;if(li&&!nt){const Gi=D()?"paddingLeft":"paddingRight";this._element.style[Gi]=`${Zt}px`}if(!li&&nt){const Gi=D()?"paddingRight":"paddingLeft";this._element.style[Gi]=`${Zt}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(nt,Zt){return this.each(function(){const li=Bd.getOrCreateInstance(this,nt);if("string"==typeof nt){if(typeof li[nt]>"u")throw new TypeError(`No method named "${nt}"`);li[nt](Zt)}})}}ee.on(document,zp,'[data-bs-toggle="modal"]',function(Sn){const nt=ge.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&Sn.preventDefault(),ee.one(nt,dd,Gi=>{Gi.defaultPrevented||ee.one(nt,Bg,()=>{s(this)&&this.focus()})});const Zt=ge.findOne(".modal.show");Zt&&Bd.getInstance(Zt).hide(),Bd.getOrCreateInstance(nt).toggle(this)}),fe(Bd),C(Bd);const nl=".bs.offcanvas",Nd=".data-api",sc=`load${nl}${Nd}`,$p="showing",mt=".offcanvas.show",ut=`show${nl}`,Mt=`shown${nl}`,fn=`hide${nl}`,ni=`hidePrevented${nl}`,Pi=`hidden${nl}`,Mo=`resize${nl}`,vo=`click${nl}${Nd}`,Ir=`keydown.dismiss${nl}`,Bs={backdrop:!0,keyboard:!0,scroll:!1},Va={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ac extends Ce{constructor(nt,Zt){super(nt,Zt),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Bs}static get DefaultType(){return Va}static get NAME(){return"offcanvas"}toggle(nt){return this._isShown?this.hide():this.show(nt)}show(nt){this._isShown||ee.trigger(this._element,ut,{relatedTarget:nt}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Up).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add($p),this._queueCallback(()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add("show"),this._element.classList.remove($p),ee.trigger(this._element,Mt,{relatedTarget:nt})},this._element,!0))}hide(){this._isShown&&!ee.trigger(this._element,fn).defaultPrevented&&(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add("hiding"),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove("show","hiding"),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Up).reset(),ee.trigger(this._element,Pi)},this._element,!0))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const Zt=!!this._config.backdrop;return new pc({className:"offcanvas-backdrop",isVisible:Zt,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:Zt?()=>{"static"!==this._config.backdrop?this.hide():ee.trigger(this._element,ni)}:null})}_initializeFocusTrap(){return new Hp({trapElement:this._element})}_addEventListeners(){ee.on(this._element,Ir,nt=>{if("Escape"===nt.key){if(this._config.keyboard)return void this.hide();ee.trigger(this._element,ni)}})}static jQueryInterface(nt){return this.each(function(){const Zt=ac.getOrCreateInstance(this,nt);if("string"==typeof nt){if(void 0===Zt[nt]||nt.startsWith("_")||"constructor"===nt)throw new TypeError(`No method named "${nt}"`);Zt[nt](this)}})}}ee.on(document,vo,'[data-bs-toggle="offcanvas"]',function(Sn){const nt=ge.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&Sn.preventDefault(),a(this))return;ee.one(nt,Pi,()=>{s(this)&&this.focus()});const Zt=ge.findOne(mt);Zt&&Zt!==nt&&ac.getInstance(Zt).hide(),ac.getOrCreateInstance(nt).toggle(this)}),ee.on(window,sc,()=>{for(const Sn of ge.find(mt))ac.getOrCreateInstance(Sn).show()}),ee.on(window,Mo,()=>{for(const Sn of ge.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(Sn).position&&ac.getOrCreateInstance(Sn).hide()}),fe(ac),C(ac);const Fc={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},wd=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),wh=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,jp=(Sn,nt)=>{const Zt=Sn.nodeName.toLowerCase();return nt.includes(Zt)?!wd.has(Zt)||!!wh.test(Sn.nodeValue):nt.filter(li=>li instanceof RegExp).some(li=>li.test(Zt))};const ev={allowList:Fc,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},vC={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Gy={entry:"(string|element|function|null)",selector:"(string|element)"};class tv extends ve{constructor(nt){super(),this._config=this._getConfig(nt)}static get Default(){return ev}static get DefaultType(){return vC}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(nt=>this._resolvePossibleFunction(nt)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(nt){return this._checkContent(nt),this._config.content={...this._config.content,...nt},this}toHtml(){const nt=document.createElement("div");nt.innerHTML=this._maybeSanitize(this._config.template);for(const[Gi,bo]of Object.entries(this._config.content))this._setContent(nt,bo,Gi);const Zt=nt.children[0],li=this._resolvePossibleFunction(this._config.extraClass);return li&&Zt.classList.add(...li.split(" ")),Zt}_typeCheckConfig(nt){super._typeCheckConfig(nt),this._checkContent(nt.content)}_checkContent(nt){for(const[Zt,li]of Object.entries(nt))super._typeCheckConfig({selector:Zt,entry:li},Gy)}_setContent(nt,Zt,li){const Gi=ge.findOne(li,nt);if(Gi){if(!(Zt=this._resolvePossibleFunction(Zt)))return void Gi.remove();if(d(Zt))return void this._putElementInTemplate(c(Zt),Gi);if(this._config.html)return void(Gi.innerHTML=this._maybeSanitize(Zt));Gi.textContent=Zt}}_maybeSanitize(nt){return this._config.sanitize?function xc(Sn,nt,Zt){if(!Sn.length)return Sn;if(Zt&&"function"==typeof Zt)return Zt(Sn);const Gi=(new window.DOMParser).parseFromString(Sn,"text/html"),bo=[].concat(...Gi.body.querySelectorAll("*"));for(const Bo of bo){const ir=Bo.nodeName.toLowerCase();if(!Object.keys(nt).includes(ir)){Bo.remove();continue}const yr=[].concat(...Bo.attributes),Ur=[].concat(nt["*"]||[],nt[ir]||[]);for(const Ar of yr)jp(Ar,Ur)||Bo.removeAttribute(Ar.nodeName)}return Gi.body.innerHTML}(nt,this._config.allowList,this._config.sanitizeFn):nt}_resolvePossibleFunction(nt){return I(nt,[this])}_putElementInTemplate(nt,Zt){if(this._config.html)return Zt.innerHTML="",void Zt.append(nt);Zt.textContent=nt.textContent}}const CC=new Set(["sanitize","allowList","sanitizeFn"]),nv="fade",zg="show",Ru="hide.bs.modal",ih="hover",op="focus",zf={AUTO:"auto",TOP:"top",RIGHT:D()?"left":"right",BOTTOM:"bottom",LEFT:D()?"right":"left"},vl={allowList:Fc,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Or={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ts extends Ce{constructor(nt,Zt){if(typeof ia>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(nt,Zt),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return vl}static get DefaultType(){return Or}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown())return void this._leave();this._enter()}}dispose(){clearTimeout(this._timeout),ee.off(this._element.closest(".modal"),Ru,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const nt=ee.trigger(this._element,this.constructor.eventName("show")),li=(u(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(nt.defaultPrevented||!li)return;this._disposePopper();const Gi=this._getTipElement();this._element.setAttribute("aria-describedby",Gi.getAttribute("id"));const{container:bo}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(bo.append(Gi),ee.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(Gi),Gi.classList.add(zg),"ontouchstart"in document.documentElement)for(const ir of[].concat(...document.body.children))ee.on(ir,"mouseover",h);this._queueCallback(()=>{ee.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!ee.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(zg),"ontouchstart"in document.documentElement)for(const Gi of[].concat(...document.body.children))ee.off(Gi,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger[op]=!1,this._activeTrigger[ih]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ee.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(nt){const Zt=this._getTemplateFactory(nt).toHtml();if(!Zt)return null;Zt.classList.remove(nv,zg),Zt.classList.add(`bs-${this.constructor.NAME}-auto`);const li=(Sn=>{do{Sn+=Math.floor(1e6*Math.random())}while(document.getElementById(Sn));return Sn})(this.constructor.NAME).toString();return Zt.setAttribute("id",li),this._isAnimated()&&Zt.classList.add(nv),Zt}setContent(nt){this._newContent=nt,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(nt){return this._templateFactory?this._templateFactory.changeContent(nt):this._templateFactory=new tv({...this._config,content:nt,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(nt){return this.constructor.getOrCreateInstance(nt.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(nv)}_isShown(){return this.tip&&this.tip.classList.contains(zg)}_createPopper(nt){const Zt=I(this._config.placement,[this,nt,this._element]),li=zf[Zt.toUpperCase()];return jo(this._element,nt,this._getPopperConfig(li))}_getOffset(){const{offset:nt}=this._config;return"string"==typeof nt?nt.split(",").map(Zt=>Number.parseInt(Zt,10)):"function"==typeof nt?Zt=>nt(Zt,this._element):nt}_resolvePossibleFunction(nt){return I(nt,[this._element])}_getPopperConfig(nt){const Zt={placement:nt,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:li=>{this._getTipElement().setAttribute("data-popper-placement",li.state.placement)}}]};return{...Zt,...I(this._config.popperConfig,[Zt])}}_setListeners(){const nt=this._config.trigger.split(" ");for(const Zt of nt)if("click"===Zt)ee.on(this._element,this.constructor.eventName("click"),this._config.selector,li=>{this._initializeOnDelegatedTarget(li).toggle()});else if("manual"!==Zt){const li=this.constructor.eventName(Zt===ih?"mouseenter":"focusin"),Gi=this.constructor.eventName(Zt===ih?"mouseleave":"focusout");ee.on(this._element,li,this._config.selector,bo=>{const Bo=this._initializeOnDelegatedTarget(bo);Bo._activeTrigger["focusin"===bo.type?op:ih]=!0,Bo._enter()}),ee.on(this._element,Gi,this._config.selector,bo=>{const Bo=this._initializeOnDelegatedTarget(bo);Bo._activeTrigger["focusout"===bo.type?op:ih]=Bo._element.contains(bo.relatedTarget),Bo._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ee.on(this._element.closest(".modal"),Ru,this._hideModalHandler)}_fixTitle(){const nt=this._element.getAttribute("title");nt&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",nt),this._element.setAttribute("data-bs-original-title",nt),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(nt,Zt){clearTimeout(this._timeout),this._timeout=setTimeout(nt,Zt)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(nt){const Zt=be.getDataAttributes(this._element);for(const li of Object.keys(Zt))CC.has(li)&&delete Zt[li];return nt={...Zt,..."object"==typeof nt&&nt?nt:{}},nt=this._mergeConfigObj(nt),nt=this._configAfterMerge(nt),this._typeCheckConfig(nt),nt}_configAfterMerge(nt){return nt.container=!1===nt.container?document.body:c(nt.container),"number"==typeof nt.delay&&(nt.delay={show:nt.delay,hide:nt.delay}),"number"==typeof nt.title&&(nt.title=nt.title.toString()),"number"==typeof nt.content&&(nt.content=nt.content.toString()),nt}_getDelegateConfig(){const nt={};for(const[Zt,li]of Object.entries(this._config))this.constructor.Default[Zt]!==li&&(nt[Zt]=li);return nt.selector=!1,nt.trigger="manual",nt}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(nt){return this.each(function(){const Zt=ts.getOrCreateInstance(this,nt);if("string"==typeof nt){if(typeof Zt[nt]>"u")throw new TypeError(`No method named "${nt}"`);Zt[nt]()}})}}C(ts);const cc={...ts.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Yp={...ts.DefaultType,content:"(null|string|element|function)"};class qa extends ts{static get Default(){return cc}static get DefaultType(){return Yp}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(nt){return this.each(function(){const Zt=qa.getOrCreateInstance(this,nt);if("string"==typeof nt){if(typeof Zt[nt]>"u")throw new TypeError(`No method named "${nt}"`);Zt[nt]()}})}}C(qa);const Is=".bs.scrollspy",sv=`activate${Is}`,sp=`click${Is}`,Ol=`load${Is}.data-api`,rh="active",lp="[href]",cp=".nav-link",ss=`${cp}, .nav-item > ${cp}, .list-group-item`,ku={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Wf={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Lu extends Ce{constructor(nt,Zt){super(nt,Zt),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ku}static get DefaultType(){return Wf}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const nt of this._observableSections.values())this._observer.observe(nt)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(nt){return nt.target=c(nt.target)||document.body,nt.rootMargin=nt.offset?`${nt.offset}px 0px -30%`:nt.rootMargin,"string"==typeof nt.threshold&&(nt.threshold=nt.threshold.split(",").map(Zt=>Number.parseFloat(Zt))),nt}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ee.off(this._config.target,sp),ee.on(this._config.target,sp,lp,nt=>{const Zt=this._observableSections.get(nt.target.hash);if(Zt){nt.preventDefault();const li=this._rootElement||window,Gi=Zt.offsetTop-this._element.offsetTop;if(li.scrollTo)return void li.scrollTo({top:Gi,behavior:"smooth"});li.scrollTop=Gi}}))}_getNewObserver(){return new IntersectionObserver(Zt=>this._observerCallback(Zt),{root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin})}_observerCallback(nt){const Zt=Bo=>this._targetLinks.get(`#${Bo.target.id}`),li=Bo=>{this._previousScrollData.visibleEntryTop=Bo.target.offsetTop,this._process(Zt(Bo))},Gi=(this._rootElement||document.documentElement).scrollTop,bo=Gi>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=Gi;for(const Bo of nt){if(!Bo.isIntersecting){this._activeTarget=null,this._clearActiveClass(Zt(Bo));continue}const ir=Bo.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(bo&&ir){if(li(Bo),!Gi)return}else!bo&&!ir&&li(Bo)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const nt=ge.find(lp,this._config.target);for(const Zt of nt){if(!Zt.hash||a(Zt))continue;const li=ge.findOne(decodeURI(Zt.hash),this._element);s(li)&&(this._targetLinks.set(decodeURI(Zt.hash),Zt),this._observableSections.set(Zt.hash,li))}}_process(nt){this._activeTarget!==nt&&(this._clearActiveClass(this._config.target),this._activeTarget=nt,nt.classList.add(rh),this._activateParents(nt),ee.trigger(this._element,sv,{relatedTarget:nt}))}_activateParents(nt){if(nt.classList.contains("dropdown-item"))ge.findOne(".dropdown-toggle",nt.closest(".dropdown")).classList.add(rh);else for(const Zt of ge.parents(nt,".nav, .list-group"))for(const li of ge.prev(Zt,ss))li.classList.add(rh)}_clearActiveClass(nt){nt.classList.remove(rh);const Zt=ge.find(`${lp}.${rh}`,nt);for(const li of Zt)li.classList.remove(rh)}static jQueryInterface(nt){return this.each(function(){const Zt=Lu.getOrCreateInstance(this,nt);if("string"==typeof nt){if(void 0===Zt[nt]||nt.startsWith("_")||"constructor"===nt)throw new TypeError(`No method named "${nt}"`);Zt[nt]()}})}}ee.on(window,Ol,()=>{for(const Sn of ge.find('[data-bs-spy="scroll"]'))Lu.getOrCreateInstance(Sn)}),C(Lu);const sl=".bs.tab",Ul=`hide${sl}`,Vm=`hidden${sl}`,Dd=`show${sl}`,Hm=`shown${sl}`,Bu=`click${sl}`,ah=`keydown${sl}`,av=`load${sl}`,Um="ArrowLeft",Jl="ArrowRight",lv="ArrowUp",cv="ArrowDown",Qp="Home",SC="End",up="active",zm="show",OC=".dropdown-toggle",Gm=`:not(${OC})`,$m='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',$g=`.nav-link${Gm}, .list-group-item${Gm}, [role="tab"]${Gm}, ${$m}`,Th=`.${up}[data-bs-toggle="tab"], .${up}[data-bs-toggle="pill"], .${up}[data-bs-toggle="list"]`;class jg extends Ce{constructor(nt){super(nt),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ee.on(this._element,ah,Zt=>this._keydown(Zt)))}static get NAME(){return"tab"}show(){const nt=this._element;if(this._elemIsActive(nt))return;const Zt=this._getActiveElem(),li=Zt?ee.trigger(Zt,Ul,{relatedTarget:nt}):null;ee.trigger(nt,Dd,{relatedTarget:Zt}).defaultPrevented||li&&li.defaultPrevented||(this._deactivate(Zt,nt),this._activate(nt,Zt))}_activate(nt,Zt){nt&&(nt.classList.add(up),this._activate(ge.getElementFromSelector(nt)),this._queueCallback(()=>{"tab"===nt.getAttribute("role")?(nt.removeAttribute("tabindex"),nt.setAttribute("aria-selected",!0),this._toggleDropDown(nt,!0),ee.trigger(nt,Hm,{relatedTarget:Zt})):nt.classList.add(zm)},nt,nt.classList.contains("fade")))}_deactivate(nt,Zt){nt&&(nt.classList.remove(up),nt.blur(),this._deactivate(ge.getElementFromSelector(nt)),this._queueCallback(()=>{"tab"===nt.getAttribute("role")?(nt.setAttribute("aria-selected",!1),nt.setAttribute("tabindex","-1"),this._toggleDropDown(nt,!1),ee.trigger(nt,Vm,{relatedTarget:Zt})):nt.classList.remove(zm)},nt,nt.classList.contains("fade")))}_keydown(nt){if(![Um,Jl,lv,cv,Qp,SC].includes(nt.key))return;nt.stopPropagation(),nt.preventDefault();const Zt=this._getChildren().filter(Gi=>!a(Gi));let li;if([Qp,SC].includes(nt.key))li=Zt[nt.key===Qp?0:Zt.length-1];else{const Gi=[Jl,cv].includes(nt.key);li=N(Zt,nt.target,Gi,!0)}li&&(li.focus({preventScroll:!0}),jg.getOrCreateInstance(li).show())}_getChildren(){return ge.find($g,this._parent)}_getActiveElem(){return this._getChildren().find(nt=>this._elemIsActive(nt))||null}_setInitialAttributes(nt,Zt){this._setAttributeIfNotExists(nt,"role","tablist");for(const li of Zt)this._setInitialAttributesOnChild(li)}_setInitialAttributesOnChild(nt){nt=this._getInnerElement(nt);const Zt=this._elemIsActive(nt),li=this._getOuterElement(nt);nt.setAttribute("aria-selected",Zt),li!==nt&&this._setAttributeIfNotExists(li,"role","presentation"),Zt||nt.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(nt,"role","tab"),this._setInitialAttributesOnTargetPanel(nt)}_setInitialAttributesOnTargetPanel(nt){const Zt=ge.getElementFromSelector(nt);Zt&&(this._setAttributeIfNotExists(Zt,"role","tabpanel"),nt.id&&this._setAttributeIfNotExists(Zt,"aria-labelledby",`${nt.id}`))}_toggleDropDown(nt,Zt){const li=this._getOuterElement(nt);if(!li.classList.contains("dropdown"))return;const Gi=(bo,Bo)=>{const ir=ge.findOne(bo,li);ir&&ir.classList.toggle(Bo,Zt)};Gi(OC,up),Gi(".dropdown-menu",zm),li.setAttribute("aria-expanded",Zt)}_setAttributeIfNotExists(nt,Zt,li){nt.hasAttribute(Zt)||nt.setAttribute(Zt,li)}_elemIsActive(nt){return nt.classList.contains(up)}_getInnerElement(nt){return nt.matches($g)?nt:ge.findOne($g,nt)}_getOuterElement(nt){return nt.closest(".nav-item, .list-group-item")||nt}static jQueryInterface(nt){return this.each(function(){const Zt=jg.getOrCreateInstance(this);if("string"==typeof nt){if(void 0===Zt[nt]||nt.startsWith("_")||"constructor"===nt)throw new TypeError(`No method named "${nt}"`);Zt[nt]()}})}}ee.on(document,Bu,$m,function(Sn){["A","AREA"].includes(this.tagName)&&Sn.preventDefault(),!a(this)&&jg.getOrCreateInstance(this).show()}),ee.on(window,av,()=>{for(const Sn of ge.find(Th))jg.getOrCreateInstance(Sn)}),C(jg);const Kg=".bs.toast",uv=`mouseover${Kg}`,jm=`mouseout${Kg}`,Xg=`focusin${Kg}`,wC=`focusout${Kg}`,hv=`hide${Kg}`,Km=`hidden${Kg}`,Xm=`show${Kg}`,$f=`shown${Kg}`,jf="show",$c="showing",ud={animation:"boolean",autohide:"boolean",delay:"number"},gv={animation:!0,autohide:!0,delay:5e3};class ha extends Ce{constructor(nt,Zt){super(nt,Zt),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return gv}static get DefaultType(){return ud}static get NAME(){return"toast"}show(){if(ee.trigger(this._element,Xm).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove("hide"),this._element.classList.add(jf,$c),this._queueCallback(()=>{this._element.classList.remove($c),ee.trigger(this._element,$f),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown()||ee.trigger(this._element,hv).defaultPrevented)return;this._element.classList.add($c),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove($c,jf),ee.trigger(this._element,Km)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(jf),super.dispose()}isShown(){return this._element.classList.contains(jf)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(nt,Zt){switch(nt.type){case"mouseover":case"mouseout":this._hasMouseInteraction=Zt;break;case"focusin":case"focusout":this._hasKeyboardInteraction=Zt}if(Zt)return void this._clearTimeout();const li=nt.relatedTarget;this._element===li||this._element.contains(li)||this._maybeScheduleHide()}_setListeners(){ee.on(this._element,uv,nt=>this._onInteraction(nt,!0)),ee.on(this._element,jm,nt=>this._onInteraction(nt,!1)),ee.on(this._element,Xg,nt=>this._onInteraction(nt,!0)),ee.on(this._element,wC,nt=>this._onInteraction(nt,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(nt){return this.each(function(){const Zt=ha.getOrCreateInstance(this,nt);if("string"==typeof nt){if(typeof Zt[nt]>"u")throw new TypeError(`No method named "${nt}"`);Zt[nt](this)}})}}return fe(ha),C(ha),{Alert:Ue,Button:Re,Carousel:ao,Collapse:Jr,Dropdown:rd,Modal:Bd,Offcanvas:ac,Popover:qa,ScrollSpy:Lu,Tab:jg,Toast:ha,Tooltip:ts}}()},6610:(In,Ze,M)=>{"use strict";M.d(Ze,{AJ:()=>gn,B3:()=>fr,Jj:()=>or,MD:()=>bt,N0:()=>rr,OI:()=>Xo,P9:()=>Mi,QT:()=>P,Sm:()=>_,Sq:()=>bi,T3:()=>Gr,UE:()=>Mn,VF:()=>f,Vy:()=>_i,Xr:()=>Co,YU:()=>nr,ZD:()=>b,_b:()=>Zn,aZ:()=>w,bT:()=>Ko,e1:()=>mn,fG:()=>pi,fw:()=>x,hb:()=>h,hj:()=>d,lG:()=>Sr,qQ:()=>T,ux:()=>Rt,vh:()=>Wt});var W=M(7788);let o=null;function P(){return o}function b(yt){o??=yt}class f{}const T=new W.nKC("");let y=(()=>{class yt{historyGo(Jt){throw new Error("")}static{this.\u0275fac=function(An){return new(An||yt)}}static{this.\u0275prov=W.jDH({token:yt,factory:()=>(0,W.WQX)(c),providedIn:"platform"})}}return yt})();const d=new W.nKC("");let c=(()=>{class yt extends y{constructor(){super(),this._doc=(0,W.WQX)(T),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return P().getBaseHref(this._doc)}onPopState(Jt){const An=P().getGlobalEventTarget(this._doc,"window");return An.addEventListener("popstate",Jt,!1),()=>An.removeEventListener("popstate",Jt)}onHashChange(Jt){const An=P().getGlobalEventTarget(this._doc,"window");return An.addEventListener("hashchange",Jt,!1),()=>An.removeEventListener("hashchange",Jt)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(Jt){this._location.pathname=Jt}pushState(Jt,An,ki){this._history.pushState(Jt,An,ki)}replaceState(Jt,An,ki){this._history.replaceState(Jt,An,ki)}forward(){this._history.forward()}back(){this._history.back()}historyGo(Jt=0){this._history.go(Jt)}getState(){return this._history.state}static{this.\u0275fac=function(An){return new(An||yt)}}static{this.\u0275prov=W.jDH({token:yt,factory:()=>new yt,providedIn:"platform"})}}return yt})();function s(yt,Un){if(0==yt.length)return Un;if(0==Un.length)return yt;let Jt=0;return yt.endsWith("/")&&Jt++,Un.startsWith("/")&&Jt++,2==Jt?yt+Un.substring(1):1==Jt?yt+Un:yt+"/"+Un}function a(yt){const Un=yt.match(/#|\?|$/),Jt=Un&&Un.index||yt.length;return yt.slice(0,Jt-("/"===yt[Jt-1]?1:0))+yt.slice(Jt)}function u(yt){return yt&&"?"!==yt[0]?"?"+yt:yt}let h=(()=>{class yt{historyGo(Jt){throw new Error("")}static{this.\u0275fac=function(An){return new(An||yt)}}static{this.\u0275prov=W.jDH({token:yt,factory:()=>(0,W.WQX)(_),providedIn:"root"})}}return yt})();const g=new W.nKC("");let _=(()=>{class yt extends h{constructor(Jt,An){super(),this._platformLocation=Jt,this._removeListenerFns=[],this._baseHref=An??this._platformLocation.getBaseHrefFromDOM()??(0,W.WQX)(T).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(Jt){this._removeListenerFns.push(this._platformLocation.onPopState(Jt),this._platformLocation.onHashChange(Jt))}getBaseHref(){return this._baseHref}prepareExternalUrl(Jt){return s(this._baseHref,Jt)}path(Jt=!1){const An=this._platformLocation.pathname+u(this._platformLocation.search),ki=this._platformLocation.hash;return ki&&Jt?`${An}${ki}`:An}pushState(Jt,An,ki,Ao){const ar=this.prepareExternalUrl(ki+u(Ao));this._platformLocation.pushState(Jt,An,ar)}replaceState(Jt,An,ki,Ao){const ar=this.prepareExternalUrl(ki+u(Ao));this._platformLocation.replaceState(Jt,An,ar)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(Jt=0){this._platformLocation.historyGo?.(Jt)}static{this.\u0275fac=function(An){return new(An||yt)(W.KVO(y),W.KVO(g,8))}}static{this.\u0275prov=W.jDH({token:yt,factory:yt.\u0275fac,providedIn:"root"})}}return yt})(),x=(()=>{class yt extends h{constructor(Jt,An){super(),this._platformLocation=Jt,this._baseHref="",this._removeListenerFns=[],null!=An&&(this._baseHref=An)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(Jt){this._removeListenerFns.push(this._platformLocation.onPopState(Jt),this._platformLocation.onHashChange(Jt))}getBaseHref(){return this._baseHref}path(Jt=!1){const An=this._platformLocation.hash??"#";return An.length>0?An.substring(1):An}prepareExternalUrl(Jt){const An=s(this._baseHref,Jt);return An.length>0?"#"+An:An}pushState(Jt,An,ki,Ao){let ar=this.prepareExternalUrl(ki+u(Ao));0==ar.length&&(ar=this._platformLocation.pathname),this._platformLocation.pushState(Jt,An,ar)}replaceState(Jt,An,ki,Ao){let ar=this.prepareExternalUrl(ki+u(Ao));0==ar.length&&(ar=this._platformLocation.pathname),this._platformLocation.replaceState(Jt,An,ar)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(Jt=0){this._platformLocation.historyGo?.(Jt)}static{this.\u0275fac=function(An){return new(An||yt)(W.KVO(y),W.KVO(g,8))}}static{this.\u0275prov=W.jDH({token:yt,factory:yt.\u0275fac})}}return yt})(),w=(()=>{class yt{constructor(Jt){this._subject=new W.bkB,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=Jt;const An=this._locationStrategy.getBaseHref();this._basePath=function L(yt){if(new RegExp("^(https?:)?//").test(yt)){const[,Jt]=yt.split(/\/\/[^\/]+/);return Jt}return yt}(a(I(An))),this._locationStrategy.onPopState(ki=>{this._subject.emit({url:this.path(!0),pop:!0,state:ki.state,type:ki.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(Jt=!1){return this.normalize(this._locationStrategy.path(Jt))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(Jt,An=""){return this.path()==this.normalize(Jt+u(An))}normalize(Jt){return yt.stripTrailingSlash(function C(yt,Un){if(!yt||!Un.startsWith(yt))return Un;const Jt=Un.substring(yt.length);return""===Jt||["/",";","?","#"].includes(Jt[0])?Jt:Un}(this._basePath,I(Jt)))}prepareExternalUrl(Jt){return Jt&&"/"!==Jt[0]&&(Jt="/"+Jt),this._locationStrategy.prepareExternalUrl(Jt)}go(Jt,An="",ki=null){this._locationStrategy.pushState(ki,"",Jt,An),this._notifyUrlChangeListeners(this.prepareExternalUrl(Jt+u(An)),ki)}replaceState(Jt,An="",ki=null){this._locationStrategy.replaceState(ki,"",Jt,An),this._notifyUrlChangeListeners(this.prepareExternalUrl(Jt+u(An)),ki)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(Jt=0){this._locationStrategy.historyGo?.(Jt)}onUrlChange(Jt){return this._urlChangeListeners.push(Jt),this._urlChangeSubscription??=this.subscribe(An=>{this._notifyUrlChangeListeners(An.url,An.state)}),()=>{const An=this._urlChangeListeners.indexOf(Jt);this._urlChangeListeners.splice(An,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(Jt="",An){this._urlChangeListeners.forEach(ki=>ki(Jt,An))}subscribe(Jt,An,ki){return this._subject.subscribe({next:Jt,error:An,complete:ki})}static{this.normalizeQueryParams=u}static{this.joinWithSlash=s}static{this.stripTrailingSlash=a}static{this.\u0275fac=function(An){return new(An||yt)(W.KVO(h))}}static{this.\u0275prov=W.jDH({token:yt,factory:()=>function D(){return new w((0,W.KVO)(h))}(),providedIn:"root"})}}return yt})();function I(yt){return yt.replace(/\/index.html$/,"")}var U=function(yt){return yt[yt.Format=0]="Format",yt[yt.Standalone=1]="Standalone",yt}(U||{}),B=function(yt){return yt[yt.Narrow=0]="Narrow",yt[yt.Abbreviated=1]="Abbreviated",yt[yt.Wide=2]="Wide",yt[yt.Short=3]="Short",yt}(B||{}),K=function(yt){return yt[yt.Short=0]="Short",yt[yt.Medium=1]="Medium",yt[yt.Long=2]="Long",yt[yt.Full=3]="Full",yt}(K||{});const J={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function z(yt,Un){return xe((0,W.H5H)(yt)[W.KH2.DateFormat],Un)}function oe(yt,Un){return xe((0,W.H5H)(yt)[W.KH2.TimeFormat],Un)}function ae(yt,Un){return xe((0,W.H5H)(yt)[W.KH2.DateTimeFormat],Un)}function ee(yt,Un){const Jt=(0,W.H5H)(yt),An=Jt[W.KH2.NumberSymbols][Un];if(typeof An>"u"){if(Un===J.CurrencyDecimal)return Jt[W.KH2.NumberSymbols][J.Decimal];if(Un===J.CurrencyGroup)return Jt[W.KH2.NumberSymbols][J.Group]}return An}function Ce(yt){if(!yt[W.KH2.ExtraData])throw new Error(`Missing extra locale data for the locale "${yt[W.KH2.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function xe(yt,Un){for(let Jt=Un;Jt>-1;Jt--)if(typeof yt[Jt]<"u")return yt[Jt];throw new Error("Locale data API: locale data undefined")}function Te(yt){const[Un,Jt]=yt.split(":");return{hours:+Un,minutes:+Jt}}const $e=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Be={},Ue=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var ot=function(yt){return yt[yt.Short=0]="Short",yt[yt.ShortGMT=1]="ShortGMT",yt[yt.Long=2]="Long",yt[yt.Extended=3]="Extended",yt}(ot||{}),st=function(yt){return yt[yt.FullYear=0]="FullYear",yt[yt.Month=1]="Month",yt[yt.Date=2]="Date",yt[yt.Hours=3]="Hours",yt[yt.Minutes=4]="Minutes",yt[yt.Seconds=5]="Seconds",yt[yt.FractionalSeconds=6]="FractionalSeconds",yt[yt.Day=7]="Day",yt}(st||{}),et=function(yt){return yt[yt.DayPeriods=0]="DayPeriods",yt[yt.Days=1]="Days",yt[yt.Months=2]="Months",yt[yt.Eras=3]="Eras",yt}(et||{});function Ke(yt,Un,Jt,An){let ki=function pt(yt){if(cn(yt))return yt;if("number"==typeof yt&&!isNaN(yt))return new Date(yt);if("string"==typeof yt){if(yt=yt.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(yt)){const[ki,Ao=1,ar=1]=yt.split("-").map(Nr=>+Nr);return Ye(ki,Ao-1,ar)}const Jt=parseFloat(yt);if(!isNaN(yt-Jt))return new Date(Jt);let An;if(An=yt.match($e))return function Dt(yt){const Un=new Date(0);let Jt=0,An=0;const ki=yt[8]?Un.setUTCFullYear:Un.setFullYear,Ao=yt[8]?Un.setUTCHours:Un.setHours;yt[9]&&(Jt=Number(yt[9]+yt[10]),An=Number(yt[9]+yt[11])),ki.call(Un,Number(yt[1]),Number(yt[2])-1,Number(yt[3]));const ar=Number(yt[4]||0)-Jt,Nr=Number(yt[5]||0)-An,Fa=Number(yt[6]||0),Vs=Math.floor(1e3*parseFloat("0."+(yt[7]||0)));return Ao.call(Un,ar,Nr,Fa,Vs),Un}(An)}const Un=new Date(yt);if(!cn(Un))throw new Error(`Unable to convert "${yt}" into a date`);return Un}(yt);Un=Pe(Jt,Un)||Un;let Nr,ar=[];for(;Un;){if(Nr=Ue.exec(Un),!Nr){ar.push(Un);break}{ar=ar.concat(Nr.slice(1));const Rs=ar.pop();if(!Rs)break;Un=Rs}}let Fa=ki.getTimezoneOffset();An&&(Fa=Bn(An,Fa),ki=function Ai(yt,Un,Jt){const An=Jt?-1:1,ki=yt.getTimezoneOffset();return function gi(yt,Un){return(yt=new Date(yt.getTime())).setMinutes(yt.getMinutes()+Un),yt}(yt,An*(Bn(Un,ki)-ki))}(ki,An,!0));let Vs="";return ar.forEach(Rs=>{const mr=function wi(yt){if(Jn[yt])return Jn[yt];let Un;switch(yt){case"G":case"GG":case"GGG":Un=vt(et.Eras,B.Abbreviated);break;case"GGGG":Un=vt(et.Eras,B.Wide);break;case"GGGGG":Un=vt(et.Eras,B.Narrow);break;case"y":Un=Xe(st.FullYear,1,0,!1,!0);break;case"yy":Un=Xe(st.FullYear,2,0,!0,!0);break;case"yyy":Un=Xe(st.FullYear,3,0,!1,!0);break;case"yyyy":Un=Xe(st.FullYear,4,0,!1,!0);break;case"Y":Un=Tn(1);break;case"YY":Un=Tn(2,!0);break;case"YYY":Un=Tn(3);break;case"YYYY":Un=Tn(4);break;case"M":case"L":Un=Xe(st.Month,1,1);break;case"MM":case"LL":Un=Xe(st.Month,2,1);break;case"MMM":Un=vt(et.Months,B.Abbreviated);break;case"MMMM":Un=vt(et.Months,B.Wide);break;case"MMMMM":Un=vt(et.Months,B.Narrow);break;case"LLL":Un=vt(et.Months,B.Abbreviated,U.Standalone);break;case"LLLL":Un=vt(et.Months,B.Wide,U.Standalone);break;case"LLLLL":Un=vt(et.Months,B.Narrow,U.Standalone);break;case"w":Un=ri(1);break;case"ww":Un=ri(2);break;case"W":Un=ri(1,!0);break;case"d":Un=Xe(st.Date,1);break;case"dd":Un=Xe(st.Date,2);break;case"c":case"cc":Un=Xe(st.Day,1);break;case"ccc":Un=vt(et.Days,B.Abbreviated,U.Standalone);break;case"cccc":Un=vt(et.Days,B.Wide,U.Standalone);break;case"ccccc":Un=vt(et.Days,B.Narrow,U.Standalone);break;case"cccccc":Un=vt(et.Days,B.Short,U.Standalone);break;case"E":case"EE":case"EEE":Un=vt(et.Days,B.Abbreviated);break;case"EEEE":Un=vt(et.Days,B.Wide);break;case"EEEEE":Un=vt(et.Days,B.Narrow);break;case"EEEEEE":Un=vt(et.Days,B.Short);break;case"a":case"aa":case"aaa":Un=vt(et.DayPeriods,B.Abbreviated);break;case"aaaa":Un=vt(et.DayPeriods,B.Wide);break;case"aaaaa":Un=vt(et.DayPeriods,B.Narrow);break;case"b":case"bb":case"bbb":Un=vt(et.DayPeriods,B.Abbreviated,U.Standalone,!0);break;case"bbbb":Un=vt(et.DayPeriods,B.Wide,U.Standalone,!0);break;case"bbbbb":Un=vt(et.DayPeriods,B.Narrow,U.Standalone,!0);break;case"B":case"BB":case"BBB":Un=vt(et.DayPeriods,B.Abbreviated,U.Format,!0);break;case"BBBB":Un=vt(et.DayPeriods,B.Wide,U.Format,!0);break;case"BBBBB":Un=vt(et.DayPeriods,B.Narrow,U.Format,!0);break;case"h":Un=Xe(st.Hours,1,-12);break;case"hh":Un=Xe(st.Hours,2,-12);break;case"H":Un=Xe(st.Hours,1);break;case"HH":Un=Xe(st.Hours,2);break;case"m":Un=Xe(st.Minutes,1);break;case"mm":Un=Xe(st.Minutes,2);break;case"s":Un=Xe(st.Seconds,1);break;case"ss":Un=Xe(st.Seconds,2);break;case"S":Un=Xe(st.FractionalSeconds,1);break;case"SS":Un=Xe(st.FractionalSeconds,2);break;case"SSS":Un=Xe(st.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":Un=At(ot.Short);break;case"ZZZZZ":Un=At(ot.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":Un=At(ot.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":Un=At(ot.Long);break;default:return null}return Jn[yt]=Un,Un}(Rs);Vs+=mr?mr(ki,Jt,Fa):"''"===Rs?"'":Rs.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),Vs}function Ye(yt,Un,Jt){const An=new Date(0);return An.setFullYear(yt,Un,Jt),An.setHours(0,0,0),An}function Pe(yt,Un){const Jt=function re(yt){return(0,W.H5H)(yt)[W.KH2.LocaleId]}(yt);if(Be[Jt]??={},Be[Jt][Un])return Be[Jt][Un];let An="";switch(Un){case"shortDate":An=z(yt,K.Short);break;case"mediumDate":An=z(yt,K.Medium);break;case"longDate":An=z(yt,K.Long);break;case"fullDate":An=z(yt,K.Full);break;case"shortTime":An=oe(yt,K.Short);break;case"mediumTime":An=oe(yt,K.Medium);break;case"longTime":An=oe(yt,K.Long);break;case"fullTime":An=oe(yt,K.Full);break;case"short":const ki=Pe(yt,"shortTime"),Ao=Pe(yt,"shortDate");An=Se(ae(yt,K.Short),[ki,Ao]);break;case"medium":const ar=Pe(yt,"mediumTime"),Nr=Pe(yt,"mediumDate");An=Se(ae(yt,K.Medium),[ar,Nr]);break;case"long":const Fa=Pe(yt,"longTime"),Vs=Pe(yt,"longDate");An=Se(ae(yt,K.Long),[Fa,Vs]);break;case"full":const Rs=Pe(yt,"fullTime"),mr=Pe(yt,"fullDate");An=Se(ae(yt,K.Full),[Rs,mr])}return An&&(Be[Jt][Un]=An),An}function Se(yt,Un){return Un&&(yt=yt.replace(/\{([^}]+)}/g,function(Jt,An){return null!=Un&&An in Un?Un[An]:Jt})),yt}function Re(yt,Un,Jt="-",An,ki){let Ao="";(yt<0||ki&&yt<=0)&&(ki?yt=1-yt:(yt=-yt,Ao=Jt));let ar=String(yt);for(;ar.length<Un;)ar="0"+ar;return An&&(ar=ar.slice(ar.length-Un)),Ao+ar}function Xe(yt,Un,Jt=0,An=!1,ki=!1){return function(Ao,ar){let Nr=function tt(yt,Un){switch(yt){case st.FullYear:return Un.getFullYear();case st.Month:return Un.getMonth();case st.Date:return Un.getDate();case st.Hours:return Un.getHours();case st.Minutes:return Un.getMinutes();case st.Seconds:return Un.getSeconds();case st.FractionalSeconds:return Un.getMilliseconds();case st.Day:return Un.getDay();default:throw new Error(`Unknown DateType value "${yt}".`)}}(yt,Ao);if((Jt>0||Nr>-Jt)&&(Nr+=Jt),yt===st.Hours)0===Nr&&-12===Jt&&(Nr=12);else if(yt===st.FractionalSeconds)return function Fe(yt,Un){return Re(yt,3).substring(0,Un)}(Nr,Un);const Fa=ee(ar,J.MinusSign);return Re(Nr,Un,Fa,An,ki)}}function vt(yt,Un,Jt=U.Format,An=!1){return function(ki,Ao){return function qe(yt,Un,Jt,An,ki,Ao){switch(Jt){case et.Months:return function Z(yt,Un,Jt){const An=(0,W.H5H)(yt),Ao=xe([An[W.KH2.MonthsFormat],An[W.KH2.MonthsStandalone]],Un);return xe(Ao,Jt)}(Un,ki,An)[yt.getMonth()];case et.Days:return function Y(yt,Un,Jt){const An=(0,W.H5H)(yt),Ao=xe([An[W.KH2.DaysFormat],An[W.KH2.DaysStandalone]],Un);return xe(Ao,Jt)}(Un,ki,An)[yt.getDay()];case et.DayPeriods:const ar=yt.getHours(),Nr=yt.getMinutes();if(Ao){const Vs=function ye(yt){const Un=(0,W.H5H)(yt);return Ce(Un),(Un[W.KH2.ExtraData][2]||[]).map(An=>"string"==typeof An?Te(An):[Te(An[0]),Te(An[1])])}(Un),Rs=function ge(yt,Un,Jt){const An=(0,W.H5H)(yt);Ce(An);const Ao=xe([An[W.KH2.ExtraData][0],An[W.KH2.ExtraData][1]],Un)||[];return xe(Ao,Jt)||[]}(Un,ki,An),mr=Vs.findIndex(Ja=>{if(Array.isArray(Ja)){const[oa,dl]=Ja,eu=ar>=oa.hours&&Nr>=oa.minutes,Bc=ar<dl.hours||ar===dl.hours&&Nr<dl.minutes;if(oa.hours<dl.hours){if(eu&&Bc)return!0}else if(eu||Bc)return!0}else if(Ja.hours===ar&&Ja.minutes===Nr)return!0;return!1});if(-1!==mr)return Rs[mr]}return function q(yt,Un,Jt){const An=(0,W.H5H)(yt),Ao=xe([An[W.KH2.DayPeriodsFormat],An[W.KH2.DayPeriodsStandalone]],Un);return xe(Ao,Jt)}(Un,ki,An)[ar<12?0:1];case et.Eras:return function Q(yt,Un){return xe((0,W.H5H)(yt)[W.KH2.Eras],Un)}(Un,An)[yt.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${Jt}`)}}(ki,Ao,yt,Un,Jt,An)}}function At(yt){return function(Un,Jt,An){const ki=-1*An,Ao=ee(Jt,J.MinusSign),ar=ki>0?Math.floor(ki/60):Math.ceil(ki/60);switch(yt){case ot.Short:return(ki>=0?"+":"")+Re(ar,2,Ao)+Re(Math.abs(ki%60),2,Ao);case ot.ShortGMT:return"GMT"+(ki>=0?"+":"")+Re(ar,1,Ao);case ot.Long:return"GMT"+(ki>=0?"+":"")+Re(ar,2,Ao)+":"+Re(Math.abs(ki%60),2,Ao);case ot.Extended:return 0===An?"Z":(ki>=0?"+":"")+Re(ar,2,Ao)+":"+Re(Math.abs(ki%60),2,Ao);default:throw new Error(`Unknown zone width "${yt}"`)}}}const Tt=0,qt=4;function En(yt){const Un=yt.getDay(),Jt=0===Un?-3:qt-Un;return Ye(yt.getFullYear(),yt.getMonth(),yt.getDate()+Jt)}function ri(yt,Un=!1){return function(Jt,An){let ki;if(Un){const Ao=new Date(Jt.getFullYear(),Jt.getMonth(),1).getDay()-1,ar=Jt.getDate();ki=1+Math.floor((ar+Ao)/7)}else{const Ao=En(Jt),ar=function wt(yt){const Un=Ye(yt,Tt,1).getDay();return Ye(yt,0,1+(Un<=qt?qt:qt+7)-Un)}(Ao.getFullYear()),Nr=Ao.getTime()-ar.getTime();ki=1+Math.round(Nr/6048e5)}return Re(ki,yt,ee(An,J.MinusSign))}}function Tn(yt,Un=!1){return function(Jt,An){return Re(En(Jt).getFullYear(),yt,ee(An,J.MinusSign),Un)}}const Jn={};function Bn(yt,Un){yt=yt.replace(/:/g,"");const Jt=Date.parse("Jan 01, 1970 00:00:00 "+yt)/6e4;return isNaN(Jt)?Un:Jt}function cn(yt){return yt instanceof Date&&!isNaN(yt.valueOf())}function Zn(yt,Un){Un=encodeURIComponent(Un);for(const Jt of yt.split(";")){const An=Jt.indexOf("="),[ki,Ao]=-1==An?[Jt,""]:[Jt.slice(0,An),Jt.slice(An+1)];if(ki.trim()===Un)return decodeURIComponent(Ao)}return null}const Di=/\s+/,po=[];let nr=(()=>{class yt{constructor(Jt,An){this._ngEl=Jt,this._renderer=An,this.initialClasses=po,this.stateMap=new Map}set klass(Jt){this.initialClasses=null!=Jt?Jt.trim().split(Di):po}set ngClass(Jt){this.rawClass="string"==typeof Jt?Jt.trim().split(Di):Jt}ngDoCheck(){for(const An of this.initialClasses)this._updateState(An,!0);const Jt=this.rawClass;if(Array.isArray(Jt)||Jt instanceof Set)for(const An of Jt)this._updateState(An,!0);else if(null!=Jt)for(const An of Object.keys(Jt))this._updateState(An,!!Jt[An]);this._applyStateDiff()}_updateState(Jt,An){const ki=this.stateMap.get(Jt);void 0!==ki?(ki.enabled!==An&&(ki.changed=!0,ki.enabled=An),ki.touched=!0):this.stateMap.set(Jt,{enabled:An,changed:!0,touched:!0})}_applyStateDiff(){for(const Jt of this.stateMap){const An=Jt[0],ki=Jt[1];ki.changed?(this._toggleClass(An,ki.enabled),ki.changed=!1):ki.touched||(ki.enabled&&this._toggleClass(An,!1),this.stateMap.delete(An)),ki.touched=!1}}_toggleClass(Jt,An){(Jt=Jt.trim()).length>0&&Jt.split(Di).forEach(ki=>{An?this._renderer.addClass(this._ngEl.nativeElement,ki):this._renderer.removeClass(this._ngEl.nativeElement,ki)})}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.aKT),W.rXU(W.sFG))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return yt})(),Xo=(()=>{class yt{constructor(Jt){this._viewContainerRef=Jt,this.ngComponentOutlet=null,this._inputsUsed=new Map}_needToReCreateNgModuleInstance(Jt){return void 0!==Jt.ngComponentOutletNgModule||void 0!==Jt.ngComponentOutletNgModuleFactory}_needToReCreateComponentInstance(Jt){return void 0!==Jt.ngComponentOutlet||void 0!==Jt.ngComponentOutletContent||void 0!==Jt.ngComponentOutletInjector||this._needToReCreateNgModuleInstance(Jt)}ngOnChanges(Jt){if(this._needToReCreateComponentInstance(Jt)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){const An=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(Jt)&&(this._moduleRef?.destroy(),this._moduleRef=this.ngComponentOutletNgModule?(0,W.w6W)(this.ngComponentOutletNgModule,Hn(An)):this.ngComponentOutletNgModuleFactory?this.ngComponentOutletNgModuleFactory.create(Hn(An)):void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:An,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(const Jt of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(Jt,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){this._moduleRef?.destroy()}_applyInputStateDiff(Jt){for(const[An,ki]of this._inputsUsed)ki?(Jt.setInput(An,this.ngComponentOutletInputs[An]),this._inputsUsed.set(An,!1)):(Jt.setInput(An,void 0),this._inputsUsed.delete(An))}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.c1b))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[W.OA$]})}}return yt})();function Hn(yt){return yt.get(W.Vns).injector}class ui{constructor(Un,Jt,An,ki){this.$implicit=Un,this.ngForOf=Jt,this.index=An,this.count=ki}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let bi=(()=>{class yt{set ngForOf(Jt){this._ngForOf=Jt,this._ngForOfDirty=!0}set ngForTrackBy(Jt){this._trackByFn=Jt}get ngForTrackBy(){return this._trackByFn}constructor(Jt,An,ki){this._viewContainer=Jt,this._template=An,this._differs=ki,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(Jt){Jt&&(this._template=Jt)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const Jt=this._ngForOf;!this._differ&&Jt&&(this._differ=this._differs.find(Jt).create(this.ngForTrackBy))}if(this._differ){const Jt=this._differ.diff(this._ngForOf);Jt&&this._applyChanges(Jt)}}_applyChanges(Jt){const An=this._viewContainer;Jt.forEachOperation((ki,Ao,ar)=>{if(null==ki.previousIndex)An.createEmbeddedView(this._template,new ui(ki.item,this._ngForOf,-1,-1),null===ar?void 0:ar);else if(null==ar)An.remove(null===Ao?void 0:Ao);else if(null!==Ao){const Nr=An.get(Ao);An.move(Nr,ar),ao(Nr,ki)}});for(let ki=0,Ao=An.length;ki<Ao;ki++){const Nr=An.get(ki).context;Nr.index=ki,Nr.count=Ao,Nr.ngForOf=this._ngForOf}Jt.forEachIdentityChange(ki=>{ao(An.get(ki.currentIndex),ki)})}static ngTemplateContextGuard(Jt,An){return!0}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.c1b),W.rXU(W.C4Q),W.rXU(W._q3))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return yt})();function ao(yt,Un){yt.context.$implicit=Un.item}let Ko=(()=>{class yt{constructor(Jt,An){this._viewContainer=Jt,this._context=new Zo,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=An}set ngIf(Jt){this._context.$implicit=this._context.ngIf=Jt,this._updateView()}set ngIfThen(Jt){xr("ngIfThen",Jt),this._thenTemplateRef=Jt,this._thenViewRef=null,this._updateView()}set ngIfElse(Jt){xr("ngIfElse",Jt),this._elseTemplateRef=Jt,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(Jt,An){return!0}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.c1b),W.rXU(W.C4Q))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return yt})();class Zo{constructor(){this.$implicit=null,this.ngIf=null}}function xr(yt,Un){if(Un&&!Un.createEmbeddedView)throw new Error(`${yt} must be a TemplateRef, but received '${(0,W.Tbb)(Un)}'.`)}class hr{constructor(Un,Jt){this._viewContainerRef=Un,this._templateRef=Jt,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(Un){Un&&!this._created?this.create():!Un&&this._created&&this.destroy()}}let Rt=(()=>{class yt{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(Jt){this._ngSwitch=Jt,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(Jt){this._defaultViews.push(Jt)}_matchCase(Jt){const An=Jt===this._ngSwitch;return this._lastCasesMatched||=An,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),An}_updateDefaultCases(Jt){if(this._defaultViews.length>0&&Jt!==this._defaultUsed){this._defaultUsed=Jt;for(const An of this._defaultViews)An.enforceState(Jt)}}static{this.\u0275fac=function(An){return new(An||yt)}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}}return yt})(),mn=(()=>{class yt{constructor(Jt,An,ki){this.ngSwitch=ki,ki._addCase(),this._view=new hr(Jt,An)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.c1b),W.rXU(W.C4Q),W.rXU(Rt,9))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}}return yt})(),pi=(()=>{class yt{constructor(Jt,An,ki){ki._addDefault(new hr(Jt,An))}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.c1b),W.rXU(W.C4Q),W.rXU(Rt,9))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngSwitchDefault",""]],standalone:!0})}}return yt})(),fr=(()=>{class yt{constructor(Jt,An,ki){this._ngEl=Jt,this._differs=An,this._renderer=ki,this._ngStyle=null,this._differ=null}set ngStyle(Jt){this._ngStyle=Jt,!this._differ&&Jt&&(this._differ=this._differs.find(Jt).create())}ngDoCheck(){if(this._differ){const Jt=this._differ.diff(this._ngStyle);Jt&&this._applyChanges(Jt)}}_setStyle(Jt,An){const[ki,Ao]=Jt.split("."),ar=-1===ki.indexOf("-")?void 0:W.czy.DashCase;null!=An?this._renderer.setStyle(this._ngEl.nativeElement,ki,Ao?`${An}${Ao}`:An,ar):this._renderer.removeStyle(this._ngEl.nativeElement,ki,ar)}_applyChanges(Jt){Jt.forEachRemovedItem(An=>this._setStyle(An.key,null)),Jt.forEachAddedItem(An=>this._setStyle(An.key,An.currentValue)),Jt.forEachChangedItem(An=>this._setStyle(An.key,An.currentValue))}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.aKT),W.rXU(W.MKu),W.rXU(W.sFG))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}}return yt})(),Gr=(()=>{class yt{constructor(Jt){this._viewContainerRef=Jt,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(Jt){if(this._shouldRecreateView(Jt)){const An=this._viewContainerRef;if(this._viewRef&&An.remove(An.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const ki=this._createContextForwardProxy();this._viewRef=An.createEmbeddedView(this.ngTemplateOutlet,ki,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(Jt){return!!Jt.ngTemplateOutlet||!!Jt.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(Jt,An,ki)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,An,ki),get:(Jt,An,ki)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,An,ki)}})}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.c1b))}}static{this.\u0275dir=W.FsC({type:yt,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[W.OA$]})}}return yt})();function ei(yt,Un){return new W.wOt(2100,!1)}class Ii{createSubscription(Un,Jt){return(0,W.O8t)(()=>Un.subscribe({next:Jt,error:An=>{throw An}}))}dispose(Un){(0,W.O8t)(()=>Un.unsubscribe())}}class co{createSubscription(Un,Jt){return Un.then(Jt,An=>{throw An})}dispose(Un){}}const ko=new co,er=new Ii;let or=(()=>{class yt{constructor(Jt){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=Jt}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(Jt){if(!this._obj){if(Jt)try{this.markForCheckOnValueUpdate=!1,this._subscribe(Jt)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return Jt!==this._obj?(this._dispose(),this.transform(Jt)):this._latestValue}_subscribe(Jt){this._obj=Jt,this._strategy=this._selectStrategy(Jt),this._subscription=this._strategy.createSubscription(Jt,An=>this._updateLatestValue(Jt,An))}_selectStrategy(Jt){if((0,W.jNT)(Jt))return ko;if((0,W.zjR)(Jt))return er;throw ei()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(Jt,An){Jt===this._obj&&(this._latestValue=An,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.gRc,16))}}static{this.\u0275pipe=W.EJ8({name:"async",type:yt,pure:!1,standalone:!0})}}return yt})();const an=new W.nKC(""),_n=new W.nKC("");let Wt=(()=>{class yt{constructor(Jt,An,ki){this.locale=Jt,this.defaultTimezone=An,this.defaultOptions=ki}transform(Jt,An,ki,Ao){if(null==Jt||""===Jt||Jt!=Jt)return null;try{return Ke(Jt,An??this.defaultOptions?.dateFormat??"mediumDate",Ao||this.locale,ki??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(ar){throw ei()}}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.xe9,16),W.rXU(an,24),W.rXU(_n,24))}}static{this.\u0275pipe=W.EJ8({name:"date",type:yt,pure:!0,standalone:!0})}}return yt})(),Sr=(()=>{class yt{constructor(Jt){this.differs=Jt,this.keyValues=[],this.compareFn=pr}transform(Jt,An=pr){if(!Jt||!(Jt instanceof Map)&&"object"!=typeof Jt)return null;this.differ??=this.differs.find(Jt).create();const ki=this.differ.diff(Jt),Ao=An!==this.compareFn;return ki&&(this.keyValues=[],ki.forEachItem(ar=>{this.keyValues.push(function No(yt,Un){return{key:yt,value:Un}}(ar.key,ar.currentValue))})),(ki||Ao)&&(this.keyValues.sort(An),this.compareFn=An),this.keyValues}static{this.\u0275fac=function(An){return new(An||yt)(W.rXU(W.MKu,16))}}static{this.\u0275pipe=W.EJ8({name:"keyvalue",type:yt,pure:!1,standalone:!0})}}return yt})();function pr(yt,Un){const Jt=yt.key,An=Un.key;if(Jt===An)return 0;if(void 0===Jt)return 1;if(void 0===An)return-1;if(null===Jt)return 1;if(null===An)return-1;if("string"==typeof Jt&&"string"==typeof An)return Jt<An?-1:1;if("number"==typeof Jt&&"number"==typeof An)return Jt-An;if("boolean"==typeof Jt&&"boolean"==typeof An)return Jt<An?-1:1;const ki=String(Jt),Ao=String(An);return ki==Ao?0:ki<Ao?-1:1}let Mi=(()=>{class yt{transform(Jt,An,ki){if(null==Jt)return null;if(!this.supports(Jt))throw ei();return Jt.slice(An,ki)}supports(Jt){return"string"==typeof Jt||Array.isArray(Jt)}static{this.\u0275fac=function(An){return new(An||yt)}}static{this.\u0275pipe=W.EJ8({name:"slice",type:yt,pure:!1,standalone:!0})}}return yt})(),bt=(()=>{class yt{static{this.\u0275fac=function(An){return new(An||yt)}}static{this.\u0275mod=W.$C({type:yt})}static{this.\u0275inj=W.G2t({})}}return yt})();const gn="browser",Kt="server";function Mn(yt){return yt===gn}function _i(yt){return yt===Kt}let Co=(()=>{class yt{static{this.\u0275prov=(0,W.jDH)({token:yt,providedIn:"root",factory:()=>Mn((0,W.WQX)(W.Agw))?new $o((0,W.WQX)(T),window):new lr})}}return yt})();class $o{constructor(Un,Jt){this.document=Un,this.window=Jt,this.offset=()=>[0,0]}setOffset(Un){this.offset=Array.isArray(Un)?()=>Un:Un}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(Un){this.window.scrollTo(Un[0],Un[1])}scrollToAnchor(Un){const Jt=function sr(yt,Un){const Jt=yt.getElementById(Un)||yt.getElementsByName(Un)[0];if(Jt)return Jt;if("function"==typeof yt.createTreeWalker&&yt.body&&"function"==typeof yt.body.attachShadow){const An=yt.createTreeWalker(yt.body,NodeFilter.SHOW_ELEMENT);let ki=An.currentNode;for(;ki;){const Ao=ki.shadowRoot;if(Ao){const ar=Ao.getElementById(Un)||Ao.querySelector(`[name="${Un}"]`);if(ar)return ar}ki=An.nextNode()}}return null}(this.document,Un);Jt&&(this.scrollToElement(Jt),Jt.focus())}setHistoryScrollRestoration(Un){this.window.history.scrollRestoration=Un}scrollToElement(Un){const Jt=Un.getBoundingClientRect(),An=Jt.left+this.window.pageXOffset,ki=Jt.top+this.window.pageYOffset,Ao=this.offset();this.window.scrollTo(An-Ao[0],ki-Ao[1])}}class lr{setOffset(Un){}getScrollPosition(){return[0,0]}scrollToPosition(Un){}scrollToAnchor(Un){}setHistoryScrollRestoration(Un){}}class rr{}},6409:(In,Ze,M)=>{"use strict";M.d(Ze,{$R:()=>Ai,JV:()=>u,Lr:()=>h,Qq:()=>ae,Sx:()=>cn,hv:()=>re});var W=M(3308),o=M(7788),P=M(5416),b=M(8556),f=M(650),S=M(5411),T=M(683),y=M(2123),d=M(3295),c=M(8707),s=M(6610);class a{}class u{}class h{constructor(ui){this.normalizedNames=new Map,this.lazyUpdate=null,ui?"string"==typeof ui?this.lazyInit=()=>{this.headers=new Map,ui.split("\n").forEach(bi=>{const ao=bi.indexOf(":");if(ao>0){const Wi=bi.slice(0,ao),Ko=Wi.toLowerCase(),Zo=bi.slice(ao+1).trim();this.maybeSetNormalizedName(Wi,Ko),this.headers.has(Ko)?this.headers.get(Ko).push(Zo):this.headers.set(Ko,[Zo])}})}:typeof Headers<"u"&&ui instanceof Headers?(this.headers=new Map,ui.forEach((bi,ao)=>{this.setHeaderEntries(ao,bi)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(ui).forEach(([bi,ao])=>{this.setHeaderEntries(bi,ao)})}:this.headers=new Map}has(ui){return this.init(),this.headers.has(ui.toLowerCase())}get(ui){this.init();const bi=this.headers.get(ui.toLowerCase());return bi&&bi.length>0?bi[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(ui){return this.init(),this.headers.get(ui.toLowerCase())||null}append(ui,bi){return this.clone({name:ui,value:bi,op:"a"})}set(ui,bi){return this.clone({name:ui,value:bi,op:"s"})}delete(ui,bi){return this.clone({name:ui,value:bi,op:"d"})}maybeSetNormalizedName(ui,bi){this.normalizedNames.has(bi)||this.normalizedNames.set(bi,ui)}init(){this.lazyInit&&(this.lazyInit instanceof h?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(ui=>this.applyUpdate(ui)),this.lazyUpdate=null))}copyFrom(ui){ui.init(),Array.from(ui.headers.keys()).forEach(bi=>{this.headers.set(bi,ui.headers.get(bi)),this.normalizedNames.set(bi,ui.normalizedNames.get(bi))})}clone(ui){const bi=new h;return bi.lazyInit=this.lazyInit&&this.lazyInit instanceof h?this.lazyInit:this,bi.lazyUpdate=(this.lazyUpdate||[]).concat([ui]),bi}applyUpdate(ui){const bi=ui.name.toLowerCase();switch(ui.op){case"a":case"s":let ao=ui.value;if("string"==typeof ao&&(ao=[ao]),0===ao.length)return;this.maybeSetNormalizedName(ui.name,bi);const Wi=("a"===ui.op?this.headers.get(bi):void 0)||[];Wi.push(...ao),this.headers.set(bi,Wi);break;case"d":const Ko=ui.value;if(Ko){let Zo=this.headers.get(bi);if(!Zo)return;Zo=Zo.filter(xr=>-1===Ko.indexOf(xr)),0===Zo.length?(this.headers.delete(bi),this.normalizedNames.delete(bi)):this.headers.set(bi,Zo)}else this.headers.delete(bi),this.normalizedNames.delete(bi)}}setHeaderEntries(ui,bi){const ao=(Array.isArray(bi)?bi:[bi]).map(Ko=>Ko.toString()),Wi=ui.toLowerCase();this.headers.set(Wi,ao),this.maybeSetNormalizedName(ui,Wi)}forEach(ui){this.init(),Array.from(this.normalizedNames.keys()).forEach(bi=>ui(this.normalizedNames.get(bi),this.headers.get(bi)))}}class _{encodeKey(ui){return C(ui)}encodeValue(ui){return C(ui)}decodeKey(ui){return decodeURIComponent(ui)}decodeValue(ui){return decodeURIComponent(ui)}}const w=/%(\d[a-f0-9])/gi,D={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function C(Hn){return encodeURIComponent(Hn).replace(w,(ui,bi)=>D[bi]??ui)}function I(Hn){return`${Hn}`}class L{constructor(ui={}){if(this.updates=null,this.cloneFrom=null,this.encoder=ui.encoder||new _,ui.fromString){if(ui.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function x(Hn,ui){const bi=new Map;return Hn.length>0&&Hn.replace(/^\?/,"").split("&").forEach(Wi=>{const Ko=Wi.indexOf("="),[Zo,xr]=-1==Ko?[ui.decodeKey(Wi),""]:[ui.decodeKey(Wi.slice(0,Ko)),ui.decodeValue(Wi.slice(Ko+1))],hr=bi.get(Zo)||[];hr.push(xr),bi.set(Zo,hr)}),bi}(ui.fromString,this.encoder)}else ui.fromObject?(this.map=new Map,Object.keys(ui.fromObject).forEach(bi=>{const ao=ui.fromObject[bi],Wi=Array.isArray(ao)?ao.map(I):[I(ao)];this.map.set(bi,Wi)})):this.map=null}has(ui){return this.init(),this.map.has(ui)}get(ui){this.init();const bi=this.map.get(ui);return bi?bi[0]:null}getAll(ui){return this.init(),this.map.get(ui)||null}keys(){return this.init(),Array.from(this.map.keys())}append(ui,bi){return this.clone({param:ui,value:bi,op:"a"})}appendAll(ui){const bi=[];return Object.keys(ui).forEach(ao=>{const Wi=ui[ao];Array.isArray(Wi)?Wi.forEach(Ko=>{bi.push({param:ao,value:Ko,op:"a"})}):bi.push({param:ao,value:Wi,op:"a"})}),this.clone(bi)}set(ui,bi){return this.clone({param:ui,value:bi,op:"s"})}delete(ui,bi){return this.clone({param:ui,value:bi,op:"d"})}toString(){return this.init(),this.keys().map(ui=>{const bi=this.encoder.encodeKey(ui);return this.map.get(ui).map(ao=>bi+"="+this.encoder.encodeValue(ao)).join("&")}).filter(ui=>""!==ui).join("&")}clone(ui){const bi=new L({encoder:this.encoder});return bi.cloneFrom=this.cloneFrom||this,bi.updates=(this.updates||[]).concat(ui),bi}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(ui=>this.map.set(ui,this.cloneFrom.map.get(ui))),this.updates.forEach(ui=>{switch(ui.op){case"a":case"s":const bi=("a"===ui.op?this.map.get(ui.param):void 0)||[];bi.push(I(ui.value)),this.map.set(ui.param,bi);break;case"d":if(void 0===ui.value){this.map.delete(ui.param);break}{let ao=this.map.get(ui.param)||[];const Wi=ao.indexOf(I(ui.value));-1!==Wi&&ao.splice(Wi,1),ao.length>0?this.map.set(ui.param,ao):this.map.delete(ui.param)}}}),this.cloneFrom=this.updates=null)}}class G{constructor(){this.map=new Map}set(ui,bi){return this.map.set(ui,bi),this}get(ui){return this.map.has(ui)||this.map.set(ui,ui.defaultValue()),this.map.get(ui)}delete(ui){return this.map.delete(ui),this}has(ui){return this.map.has(ui)}keys(){return this.map.keys()}}function U(Hn){return typeof ArrayBuffer<"u"&&Hn instanceof ArrayBuffer}function B(Hn){return typeof Blob<"u"&&Hn instanceof Blob}function K(Hn){return typeof FormData<"u"&&Hn instanceof FormData}class ie{constructor(ui,bi,ao,Wi){let Ko;if(this.url=bi,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=ui.toUpperCase(),function k(Hn){switch(Hn){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||Wi?(this.body=void 0!==ao?ao:null,Ko=Wi):Ko=ao,Ko&&(this.reportProgress=!!Ko.reportProgress,this.withCredentials=!!Ko.withCredentials,Ko.responseType&&(this.responseType=Ko.responseType),Ko.headers&&(this.headers=Ko.headers),Ko.context&&(this.context=Ko.context),Ko.params&&(this.params=Ko.params),this.transferCache=Ko.transferCache),this.headers??=new h,this.context??=new G,this.params){const Zo=this.params.toString();if(0===Zo.length)this.urlWithParams=bi;else{const xr=bi.indexOf("?");this.urlWithParams=bi+(-1===xr?"?":xr<bi.length-1?"&":"")+Zo}}else this.params=new L,this.urlWithParams=bi}serializeBody(){return null===this.body?null:"string"==typeof this.body||U(this.body)||B(this.body)||K(this.body)||function J(Hn){return typeof URLSearchParams<"u"&&Hn instanceof URLSearchParams}(this.body)?this.body:this.body instanceof L?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||K(this.body)?null:B(this.body)?this.body.type||null:U(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof L?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(ui={}){const bi=ui.method||this.method,ao=ui.url||this.url,Wi=ui.responseType||this.responseType,Ko=ui.transferCache??this.transferCache,Zo=void 0!==ui.body?ui.body:this.body,xr=ui.withCredentials??this.withCredentials,hr=ui.reportProgress??this.reportProgress;let Rt=ui.headers||this.headers,mn=ui.params||this.params;const pi=ui.context??this.context;return void 0!==ui.setHeaders&&(Rt=Object.keys(ui.setHeaders).reduce((Ti,lo)=>Ti.set(lo,ui.setHeaders[lo]),Rt)),ui.setParams&&(mn=Object.keys(ui.setParams).reduce((Ti,lo)=>Ti.set(lo,ui.setParams[lo]),mn)),new ie(bi,ao,Zo,{params:mn,headers:Rt,context:pi,reportProgress:hr,responseType:Wi,withCredentials:xr,transferCache:Ko})}}var re=function(Hn){return Hn[Hn.Sent=0]="Sent",Hn[Hn.UploadProgress=1]="UploadProgress",Hn[Hn.ResponseHeader=2]="ResponseHeader",Hn[Hn.DownloadProgress=3]="DownloadProgress",Hn[Hn.Response=4]="Response",Hn[Hn.User=5]="User",Hn}(re||{});class q{constructor(ui,bi=200,ao="OK"){this.headers=ui.headers||new h,this.status=void 0!==ui.status?ui.status:bi,this.statusText=ui.statusText||ao,this.url=ui.url||null,this.ok=this.status>=200&&this.status<300}}class Y extends q{constructor(ui={}){super(ui),this.type=re.ResponseHeader}clone(ui={}){return new Y({headers:ui.headers||this.headers,status:void 0!==ui.status?ui.status:this.status,statusText:ui.statusText||this.statusText,url:ui.url||this.url||void 0})}}class Z extends q{constructor(ui={}){super(ui),this.type=re.Response,this.body=void 0!==ui.body?ui.body:null}clone(ui={}){return new Z({body:void 0!==ui.body?ui.body:this.body,headers:ui.headers||this.headers,status:void 0!==ui.status?ui.status:this.status,statusText:ui.statusText||this.statusText,url:ui.url||this.url||void 0})}}class Q extends q{constructor(ui){super(ui,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${ui.url||"(unknown url)"}`:`Http failure response for ${ui.url||"(unknown url)"}: ${ui.status} ${ui.statusText}`,this.error=ui.error||null}}function oe(Hn,ui){return{body:ui,headers:Hn.headers,context:Hn.context,observe:Hn.observe,params:Hn.params,reportProgress:Hn.reportProgress,responseType:Hn.responseType,withCredentials:Hn.withCredentials,transferCache:Hn.transferCache}}let ae=(()=>{class Hn{constructor(bi){this.handler=bi}request(bi,ao,Wi={}){let Ko;if(bi instanceof ie)Ko=bi;else{let hr,Rt;hr=Wi.headers instanceof h?Wi.headers:new h(Wi.headers),Wi.params&&(Rt=Wi.params instanceof L?Wi.params:new L({fromObject:Wi.params})),Ko=new ie(bi,ao,void 0!==Wi.body?Wi.body:null,{headers:hr,context:Wi.context,params:Rt,reportProgress:Wi.reportProgress,responseType:Wi.responseType||"json",withCredentials:Wi.withCredentials,transferCache:Wi.transferCache})}const Zo=(0,P.of)(Ko).pipe((0,S.H)(hr=>this.handler.handle(hr)));if(bi instanceof ie||"events"===Wi.observe)return Zo;const xr=Zo.pipe((0,T.p)(hr=>hr instanceof Z));switch(Wi.observe||"body"){case"body":switch(Ko.responseType){case"arraybuffer":return xr.pipe((0,y.T)(hr=>{if(null!==hr.body&&!(hr.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return hr.body}));case"blob":return xr.pipe((0,y.T)(hr=>{if(null!==hr.body&&!(hr.body instanceof Blob))throw new Error("Response is not a Blob.");return hr.body}));case"text":return xr.pipe((0,y.T)(hr=>{if(null!==hr.body&&"string"!=typeof hr.body)throw new Error("Response is not a string.");return hr.body}));default:return xr.pipe((0,y.T)(hr=>hr.body))}case"response":return xr;default:throw new Error(`Unreachable: unhandled observe type ${Wi.observe}}`)}}delete(bi,ao={}){return this.request("DELETE",bi,ao)}get(bi,ao={}){return this.request("GET",bi,ao)}head(bi,ao={}){return this.request("HEAD",bi,ao)}jsonp(bi,ao){return this.request("JSONP",bi,{params:(new L).append(ao,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(bi,ao={}){return this.request("OPTIONS",bi,ao)}patch(bi,ao,Wi={}){return this.request("PATCH",bi,oe(Wi,ao))}post(bi,ao,Wi={}){return this.request("POST",bi,oe(Wi,ao))}put(bi,ao,Wi={}){return this.request("PUT",bi,oe(Wi,ao))}static{this.\u0275fac=function(ao){return new(ao||Hn)(o.KVO(a))}}static{this.\u0275prov=o.jDH({token:Hn,factory:Hn.\u0275fac})}}return Hn})();const ee=/^\)\]\}',?\n/;function de(Hn){if(Hn.url)return Hn.url;const ui="X-Request-URL".toLocaleLowerCase();return Hn.headers.get(ui)}let ue=(()=>{class Hn{constructor(){this.fetchImpl=(0,o.WQX)(be,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=(0,o.WQX)(o.SKi)}handle(bi){return new b.c(ao=>{const Wi=new AbortController;return this.doRequest(bi,Wi.signal,ao).then(ve,Ko=>ao.error(new Q({error:Ko}))),()=>Wi.abort()})}doRequest(bi,ao,Wi){var Ko=this;return(0,W.A)(function*(){const Zo=Ko.createRequestInit(bi);let xr;try{const Eo=Ko.ngZone.runOutsideAngular(()=>Ko.fetchImpl(bi.urlWithParams,{signal:ao,...Zo}));(function le(Hn){Hn.then(ve,ve)})(Eo),Wi.next({type:re.Sent}),xr=yield Eo}catch(Eo){return void Wi.error(new Q({error:Eo,status:Eo.status??0,statusText:Eo.statusText,url:bi.urlWithParams,headers:Eo.headers}))}const hr=new h(xr.headers),Rt=xr.statusText,mn=de(xr)??bi.urlWithParams;let pi=xr.status,Ti=null;if(bi.reportProgress&&Wi.next(new Y({headers:hr,status:pi,statusText:Rt,url:mn})),xr.body){const Eo=xr.headers.get("content-length"),Jo=[],fr=xr.body.getReader();let Yn,ei,Gr=0;const Ii=typeof Zone<"u"&&Zone.current;yield Ko.ngZone.runOutsideAngular((0,W.A)(function*(){for(;;){const{done:ko,value:er}=yield fr.read();if(ko)break;if(Jo.push(er),Gr+=er.length,bi.reportProgress){ei="text"===bi.responseType?(ei??"")+(Yn??=new TextDecoder).decode(er,{stream:!0}):void 0;const or=()=>Wi.next({type:re.DownloadProgress,total:Eo?+Eo:void 0,loaded:Gr,partialText:ei});Ii?Ii.run(or):or()}}}));const co=Ko.concatChunks(Jo,Gr);try{const ko=xr.headers.get("Content-Type")??"";Ti=Ko.parseBody(bi,co,ko)}catch(ko){return void Wi.error(new Q({error:ko,headers:new h(xr.headers),status:xr.status,statusText:xr.statusText,url:de(xr)??bi.urlWithParams}))}}0===pi&&(pi=Ti?200:0),pi>=200&&pi<300?(Wi.next(new Z({body:Ti,headers:hr,status:pi,statusText:Rt,url:mn})),Wi.complete()):Wi.error(new Q({error:Ti,headers:hr,status:pi,statusText:Rt,url:mn}))})()}parseBody(bi,ao,Wi){switch(bi.responseType){case"json":const Ko=(new TextDecoder).decode(ao).replace(ee,"");return""===Ko?null:JSON.parse(Ko);case"text":return(new TextDecoder).decode(ao);case"blob":return new Blob([ao],{type:Wi});case"arraybuffer":return ao.buffer}}createRequestInit(bi){const ao={},Wi=bi.withCredentials?"include":void 0;if(bi.headers.forEach((Ko,Zo)=>ao[Ko]=Zo.join(",")),bi.headers.has("Accept")||(ao.Accept="application/json, text/plain, */*"),!bi.headers.has("Content-Type")){const Ko=bi.detectContentTypeHeader();null!==Ko&&(ao["Content-Type"]=Ko)}return{body:bi.serializeBody(),method:bi.method,headers:ao,credentials:Wi}}concatChunks(bi,ao){const Wi=new Uint8Array(ao);let Ko=0;for(const Zo of bi)Wi.set(Zo,Ko),Ko+=Zo.length;return Wi}static{this.\u0275fac=function(ao){return new(ao||Hn)}}static{this.\u0275prov=o.jDH({token:Hn,factory:Hn.\u0275fac})}}return Hn})();class be{}function ve(){}function Ce(Hn,ui){return ui(Hn)}function ye(Hn,ui){return(bi,ao)=>ui.intercept(bi,{handle:Wi=>Hn(Wi,ao)})}const fe=new o.nKC(""),xe=new o.nKC(""),Te=new o.nKC(""),Ee=new o.nKC("",{providedIn:"root",factory:()=>!0});function Oe(){let Hn=null;return(ui,bi)=>{null===Hn&&(Hn=((0,o.WQX)(fe,{optional:!0})??[]).reduceRight(ye,Ce));const ao=(0,o.WQX)(o.TgB);if((0,o.WQX)(Ee)){const Ko=ao.add();return Hn(ui,bi).pipe((0,d.j)(()=>ao.remove(Ko)))}return Hn(ui,bi)}}let Be=(()=>{class Hn extends a{constructor(bi,ao){super(),this.backend=bi,this.injector=ao,this.chain=null,this.pendingTasks=(0,o.WQX)(o.TgB),this.contributeToStability=(0,o.WQX)(Ee)}handle(bi){if(null===this.chain){const ao=Array.from(new Set([...this.injector.get(xe),...this.injector.get(Te,[])]));this.chain=ao.reduceRight((Wi,Ko)=>function ge(Hn,ui,bi){return(ao,Wi)=>(0,o.N4e)(bi,()=>ui(ao,Ko=>Hn(Ko,Wi)))}(Wi,Ko,this.injector),Ce)}if(this.contributeToStability){const ao=this.pendingTasks.add();return this.chain(bi,Wi=>this.backend.handle(Wi)).pipe((0,d.j)(()=>this.pendingTasks.remove(ao)))}return this.chain(bi,ao=>this.backend.handle(ao))}static{this.\u0275fac=function(ao){return new(ao||Hn)(o.KVO(u),o.KVO(o.uvJ))}}static{this.\u0275prov=o.jDH({token:Hn,factory:Hn.\u0275fac})}}return Hn})();const tt=/^\)\]\}',?\n/;let qe=(()=>{class Hn{constructor(bi){this.xhrFactory=bi}handle(bi){if("JSONP"===bi.method)throw new o.wOt(-2800,!1);const ao=this.xhrFactory;return(ao.\u0275loadImpl?(0,f.H)(ao.\u0275loadImpl()):(0,P.of)(null)).pipe((0,c.n)(()=>new b.c(Ko=>{const Zo=ao.build();if(Zo.open(bi.method,bi.urlWithParams),bi.withCredentials&&(Zo.withCredentials=!0),bi.headers.forEach((Jo,fr)=>Zo.setRequestHeader(Jo,fr.join(","))),bi.headers.has("Accept")||Zo.setRequestHeader("Accept","application/json, text/plain, */*"),!bi.headers.has("Content-Type")){const Jo=bi.detectContentTypeHeader();null!==Jo&&Zo.setRequestHeader("Content-Type",Jo)}if(bi.responseType){const Jo=bi.responseType.toLowerCase();Zo.responseType="json"!==Jo?Jo:"text"}const xr=bi.serializeBody();let hr=null;const Rt=()=>{if(null!==hr)return hr;const Jo=Zo.statusText||"OK",fr=new h(Zo.getAllResponseHeaders()),Gr=function vt(Hn){return"responseURL"in Hn&&Hn.responseURL?Hn.responseURL:/^X-Request-URL:/m.test(Hn.getAllResponseHeaders())?Hn.getResponseHeader("X-Request-URL"):null}(Zo)||bi.url;return hr=new Y({headers:fr,status:Zo.status,statusText:Jo,url:Gr}),hr},mn=()=>{let{headers:Jo,status:fr,statusText:Gr,url:Yn}=Rt(),ei=null;204!==fr&&(ei=typeof Zo.response>"u"?Zo.responseText:Zo.response),0===fr&&(fr=ei?200:0);let Ii=fr>=200&&fr<300;if("json"===bi.responseType&&"string"==typeof ei){const co=ei;ei=ei.replace(tt,"");try{ei=""!==ei?JSON.parse(ei):null}catch(ko){ei=co,Ii&&(Ii=!1,ei={error:ko,text:ei})}}Ii?(Ko.next(new Z({body:ei,headers:Jo,status:fr,statusText:Gr,url:Yn||void 0})),Ko.complete()):Ko.error(new Q({error:ei,headers:Jo,status:fr,statusText:Gr,url:Yn||void 0}))},pi=Jo=>{const{url:fr}=Rt(),Gr=new Q({error:Jo,status:Zo.status||0,statusText:Zo.statusText||"Unknown Error",url:fr||void 0});Ko.error(Gr)};let Ti=!1;const lo=Jo=>{Ti||(Ko.next(Rt()),Ti=!0);let fr={type:re.DownloadProgress,loaded:Jo.loaded};Jo.lengthComputable&&(fr.total=Jo.total),"text"===bi.responseType&&Zo.responseText&&(fr.partialText=Zo.responseText),Ko.next(fr)},Eo=Jo=>{let fr={type:re.UploadProgress,loaded:Jo.loaded};Jo.lengthComputable&&(fr.total=Jo.total),Ko.next(fr)};return Zo.addEventListener("load",mn),Zo.addEventListener("error",pi),Zo.addEventListener("timeout",pi),Zo.addEventListener("abort",pi),bi.reportProgress&&(Zo.addEventListener("progress",lo),null!==xr&&Zo.upload&&Zo.upload.addEventListener("progress",Eo)),Zo.send(xr),Ko.next({type:re.Sent}),()=>{Zo.removeEventListener("error",pi),Zo.removeEventListener("abort",pi),Zo.removeEventListener("load",mn),Zo.removeEventListener("timeout",pi),bi.reportProgress&&(Zo.removeEventListener("progress",lo),null!==xr&&Zo.upload&&Zo.upload.removeEventListener("progress",Eo)),Zo.readyState!==Zo.DONE&&Zo.abort()}})))}static{this.\u0275fac=function(ao){return new(ao||Hn)(o.KVO(s.N0))}}static{this.\u0275prov=o.jDH({token:Hn,factory:Hn.\u0275fac})}}return Hn})();const At=new o.nKC(""),qt=new o.nKC("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),En=new o.nKC("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class ri{}let Tn=(()=>{class Hn{constructor(bi,ao,Wi){this.doc=bi,this.platform=ao,this.cookieName=Wi,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const bi=this.doc.cookie||"";return bi!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,s._b)(bi,this.cookieName),this.lastCookieString=bi),this.lastToken}static{this.\u0275fac=function(ao){return new(ao||Hn)(o.KVO(s.qQ),o.KVO(o.Agw),o.KVO(qt))}}static{this.\u0275prov=o.jDH({token:Hn,factory:Hn.\u0275fac})}}return Hn})();function Jn(Hn,ui){const bi=Hn.url.toLowerCase();if(!(0,o.WQX)(At)||"GET"===Hn.method||"HEAD"===Hn.method||bi.startsWith("http://")||bi.startsWith("https://"))return ui(Hn);const ao=(0,o.WQX)(ri).getToken(),Wi=(0,o.WQX)(En);return null!=ao&&!Hn.headers.has(Wi)&&(Hn=Hn.clone({headers:Hn.headers.set(Wi,ao)})),ui(Hn)}var Bn=function(Hn){return Hn[Hn.Interceptors=0]="Interceptors",Hn[Hn.LegacyInterceptors=1]="LegacyInterceptors",Hn[Hn.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Hn[Hn.NoXsrfProtection=3]="NoXsrfProtection",Hn[Hn.JsonpSupport=4]="JsonpSupport",Hn[Hn.RequestsMadeViaParent=5]="RequestsMadeViaParent",Hn[Hn.Fetch=6]="Fetch",Hn}(Bn||{});function Ai(...Hn){const ui=[ae,qe,Be,{provide:a,useExisting:Be},{provide:u,useFactory:()=>(0,o.WQX)(ue,{optional:!0})??(0,o.WQX)(qe)},{provide:xe,useValue:Jn,multi:!0},{provide:At,useValue:!0},{provide:ri,useClass:Tn}];for(const bi of Hn)ui.push(...bi.\u0275providers);return(0,o.EmA)(ui)}const Dt=new o.nKC("");function cn(){return function gi(Hn,ui){return{\u0275kind:Hn,\u0275providers:ui}}(Bn.LegacyInterceptors,[{provide:Dt,useFactory:Oe},{provide:xe,useExisting:Dt,multi:!0}])}},7788:(In,Ze,M)=>{"use strict";function W(E,R){return Object.is(E,R)}M.d(Ze,{iLQ:()=>ES,sZ2:()=>Qx,hnV:()=>k1,Hbi:()=>sk,o8S:()=>Ch,d80:()=>L1,BIS:()=>gd,gRc:()=>oF,Ql9:()=>U2,OfE:()=>bI,OM3:()=>ju,Ocv:()=>qN,Z63:()=>ad,aKT:()=>Yx,uvJ:()=>xc,zcH:()=>Jg,bkB:()=>Kf,$GK:()=>Ls,nKC:()=>Ji,zZn:()=>uc,_q3:()=>ik,MKu:()=>ky,xe9:()=>fw,Co$:()=>x_,Vns:()=>$v,SKi:()=>bl,Xx1:()=>od,Agw:()=>BC,PLl:()=>au,Tg_:()=>SI,sFG:()=>Vv,_9s:()=>v_,czy:()=>OE,WPN:()=>mp,FRM:()=>uv,kdw:()=>Nc,C4Q:()=>Mb,NYb:()=>z_,giA:()=>lC,pJN:()=>Qy,xvI:()=>T1,RxE:()=>Qd,c1b:()=>oO,gXe:()=>Ed,mal:()=>tO,L39:()=>BF,EWP:()=>$I,a0P:()=>jI,Ol2:()=>H0,w6W:()=>mO,oH4:()=>W1,QZP:()=>Tw,SmG:()=>j2,Rfq:()=>rs,WQX:()=>mr,QuC:()=>Nd,EmA:()=>mt,zw6:()=>kL,fpN:()=>rk,HJs:()=>HF,N4e:()=>iv,vPA:()=>RD,O8t:()=>NF,H3F:()=>D1,zAP:()=>SF,H8p:()=>lc,KH2:()=>nC,Ifb:()=>qr,UR7:()=>dc,TgB:()=>kC,wOt:()=>Fo,WHO:()=>hw,e01:()=>td,lNU:()=>wr,h9k:()=>ch,$MX:()=>bE,ZF7:()=>sb,Kcf:()=>o_,e5t:()=>OT,UyX:()=>zL,cWb:()=>ET,osQ:()=>cM,H5H:()=>EA,Zy3:()=>os,mq5:()=>OA,JZv:()=>vi,LfX:()=>Nn,plB:()=>Cf,jNT:()=>Zu,zjR:()=>Ox,TL$:()=>e_,Tbb:()=>Go,rcV:()=>nf,Vt3:()=>ua,GFd:()=>N0,OA$:()=>Xg,Jv_:()=>mS,aNF:()=>V_,R7$:()=>u0,BMQ:()=>qD,HbH:()=>BB,ZvI:()=>vR,ee0:()=>q0,AVh:()=>IO,vxM:()=>ax,wni:()=>zA,VBU:()=>Gp,FsC:()=>nh,jDH:()=>ft,G2t:()=>jt,$C:()=>Vg,EJ8:()=>Bd,rXU:()=>KC,nrm:()=>M_,eu8:()=>oS,bVm:()=>xy,qex:()=>tC,k0s:()=>iS,j41:()=>xa,RV6:()=>OR,xGo:()=>RP,KVO:()=>Vs,kS0:()=>Kx,QTQ:()=>IE,bIt:()=>Sy,lsd:()=>YR,joV:()=>ZS,qSk:()=>YS,XpG:()=>GR,nI1:()=>iw,bMT:()=>CS,i5U:()=>wy,brH:()=>cI,SdG:()=>$R,NAR:()=>WR,Y8G:()=>LB,FS9:()=>cS,Mz_:()=>dS,FCK:()=>Yu,lJ4:()=>h1,eq3:()=>tw,l_i:()=>Oy,sMw:()=>p1,ziG:()=>bx,mGM:()=>GA,sdS:()=>XO,Dyx:()=>xR,Z7z:()=>_A,fX1:()=>mA,Njj:()=>ru,tSv:()=>Xc,eBV:()=>Dh,npT:()=>r_,f$h:()=>Tv,B4B:()=>_c,n$t:()=>db,wjB:()=>ta,muq:()=>$A,xc7:()=>Q0,DNE:()=>jv,C5r:()=>EN,EFF:()=>o1,JRh:()=>YO,SpI:()=>ZA,Lme:()=>r1,E5c:()=>vx,LHq:()=>ZO,ZXR:()=>QA,DH7:()=>_N,mxI:()=>eI,R50:()=>QO,GBs:()=>uS});let o=null,P=!1,b=1;const f=Symbol("SIGNAL");function S(E){const R=o;return o=E,R}const c={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function s(E){if(P)throw new Error("");if(null===o)return;o.consumerOnSignalRead(E);const R=o.nextProducerIndex++;G(o),R<o.producerNode.length&&o.producerNode[R]!==E&&N(o)&&L(o.producerNode[R],o.producerIndexOfThis[R]),o.producerNode[R]!==E&&(o.producerNode[R]=E,o.producerIndexOfThis[R]=N(o)?I(E,o,R):0),o.producerLastReadVersion[R]=E.version}function u(E){if((!N(E)||E.dirty)&&(E.dirty||E.lastCleanEpoch!==b)){if(!E.producerMustRecompute(E)&&!D(E))return E.dirty=!1,void(E.lastCleanEpoch=b);E.producerRecomputeValue(E),E.dirty=!1,E.lastCleanEpoch=b}}function h(E){if(void 0===E.liveConsumerNode)return;const R=P;P=!0;try{for(const j of E.liveConsumerNode)j.dirty||_(j)}finally{P=R}}function g(){return!1!==o?.consumerAllowSignalWrites}function _(E){E.dirty=!0,h(E),E.consumerMarkedDirty?.(E)}function x(E){return E&&(E.nextProducerIndex=0),S(E)}function w(E,R){if(S(R),E&&void 0!==E.producerNode&&void 0!==E.producerIndexOfThis&&void 0!==E.producerLastReadVersion){if(N(E))for(let j=E.nextProducerIndex;j<E.producerNode.length;j++)L(E.producerNode[j],E.producerIndexOfThis[j]);for(;E.producerNode.length>E.nextProducerIndex;)E.producerNode.pop(),E.producerLastReadVersion.pop(),E.producerIndexOfThis.pop()}}function D(E){G(E);for(let R=0;R<E.producerNode.length;R++){const j=E.producerNode[R],ne=E.producerLastReadVersion[R];if(ne!==j.version||(u(j),ne!==j.version))return!0}return!1}function C(E){if(G(E),N(E))for(let R=0;R<E.producerNode.length;R++)L(E.producerNode[R],E.producerIndexOfThis[R]);E.producerNode.length=E.producerLastReadVersion.length=E.producerIndexOfThis.length=0,E.liveConsumerNode&&(E.liveConsumerNode.length=E.liveConsumerIndexOfThis.length=0)}function I(E,R,j){if(k(E),0===E.liveConsumerNode.length&&U(E))for(let ne=0;ne<E.producerNode.length;ne++)E.producerIndexOfThis[ne]=I(E.producerNode[ne],E,ne);return E.liveConsumerIndexOfThis.push(j),E.liveConsumerNode.push(R)-1}function L(E,R){if(k(E),1===E.liveConsumerNode.length&&U(E))for(let ne=0;ne<E.producerNode.length;ne++)L(E.producerNode[ne],E.producerIndexOfThis[ne]);const j=E.liveConsumerNode.length-1;if(E.liveConsumerNode[R]=E.liveConsumerNode[j],E.liveConsumerIndexOfThis[R]=E.liveConsumerIndexOfThis[j],E.liveConsumerNode.length--,E.liveConsumerIndexOfThis.length--,R<E.liveConsumerNode.length){const ne=E.liveConsumerIndexOfThis[R],me=E.liveConsumerNode[R];G(me),me.producerIndexOfThis[ne]=R}}function N(E){return E.consumerIsAlwaysLive||(E?.liveConsumerNode?.length??0)>0}function G(E){E.producerNode??=[],E.producerIndexOfThis??=[],E.producerLastReadVersion??=[]}function k(E){E.liveConsumerNode??=[],E.liveConsumerIndexOfThis??=[]}function U(E){return void 0!==E.producerNode}const K=Symbol("UNSET"),J=Symbol("COMPUTING"),ie=Symbol("ERRORED"),re={...c,value:K,dirty:!0,error:null,equal:W,producerMustRecompute:E=>E.value===K||E.value===J,producerRecomputeValue(E){if(E.value===J)throw new Error("Detected cycle in computations.");const R=E.value;E.value=J;const j=x(E);let ne;try{ne=E.computation()}catch(me){ne=ie,E.error=me}finally{w(E,j)}R!==K&&R!==ie&&ne!==ie&&E.equal(R,ne)?E.value=R:(E.value=ne,E.version++)}};let Y=function q(){throw new Error};function Z(){Y()}let te=null;function ae(E,R){g()||Z(),E.equal(E.value,R)||(E.value=R,function ue(E){E.version++,function a(){b++}(),h(E),te?.()}(E))}const de={...c,equal:W,value:void 0};const ve=()=>{},le={...c,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:E=>{null!==E.schedule&&E.schedule(E.ref)},hasRun:!1,cleanupFn:ve};var ye=M(5793),ge=M(6343),fe=M(6313),xe=M(2123);typeof navigator<"u"&&navigator,typeof navigator<"u"&&!/Opera/.test(navigator.userAgent)&&navigator,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||navigator),typeof navigator<"u"&&!/Opera|WebKit/.test(navigator.userAgent)&&navigator,typeof navigator<"u"&&navigator;const wr="https://g.co/ng/security#xss";class Fo extends Error{constructor(R,j){super(os(R,j)),this.code=R}}function os(E,R){return`NG0${Math.abs(E)}${R?": "+R:""}`}function Ca(E){return{toString:E}.toString()}const Fi="__parameters__";function kn(E,R,j){return Ca(()=>{const ne=function nn(E){return function(...j){if(E){const ne=E(...j);for(const me in ne)this[me]=ne[me]}}}(R);function me(...Ie){if(this instanceof me)return ne.apply(this,Ie),this;const je=new me(...Ie);return at.annotation=je,at;function at(_t,tn,wn){const di=_t.hasOwnProperty(Fi)?_t[Fi]:Object.defineProperty(_t,Fi,{value:[]})[Fi];for(;di.length<=wn;)di.push(null);return(di[wn]=di[wn]||[]).push(je),_t}}return j&&(me.prototype=Object.create(j.prototype)),me.prototype.ngMetadataName=E,me.annotationCls=me,me})}const vi=globalThis;function Xi(E){for(let R in E)if(E[R]===Xi)return R;throw Error("Could not find renamed property on target object.")}function Vo(E,R){for(const j in R)R.hasOwnProperty(j)&&!E.hasOwnProperty(j)&&(E[j]=R[j])}function Go(E){if("string"==typeof E)return E;if(Array.isArray(E))return"["+E.map(Go).join(", ")+"]";if(null==E)return""+E;if(E.overriddenName)return`${E.overriddenName}`;if(E.name)return`${E.name}`;const R=E.toString();if(null==R)return""+R;const j=R.indexOf("\n");return-1===j?R:R.substring(0,j)}function Er(E,R){return null==E||""===E?null===R?"":R:null==R||""===R?E:E+" "+R}const ms=Xi({__forward_ref__:Xi});function rs(E){return E.__forward_ref__=rs,E.toString=function(){return Go(this())},E}function $r(E){return Qa(E)?E():E}function Qa(E){return"function"==typeof E&&E.hasOwnProperty(ms)&&E.__forward_ref__===rs}function ft(E){return{token:E.token,providedIn:E.providedIn||null,factory:E.factory,value:void 0}}function jt(E){return{providers:E.providers||[],imports:E.imports||[]}}function yn(E){return hi(E,Yi)||hi(E,so)}function Nn(E){return null!==yn(E)}function hi(E,R){return E.hasOwnProperty(R)?E[R]:null}function to(E){return E&&(E.hasOwnProperty(uo)||E.hasOwnProperty(To))?E[uo]:null}const Yi=Xi({\u0275prov:Xi}),uo=Xi({\u0275inj:Xi}),so=Xi({ngInjectableDef:Xi}),To=Xi({ngInjectorDef:Xi});class Ji{constructor(R,j){this._desc=R,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof j?this.__NG_ELEMENT_ID__=j:void 0!==j&&(this.\u0275prov=ft({token:this,providedIn:j.providedIn||"root",factory:j.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Oo(E){return E&&!!E.\u0275providers}const Yo=Xi({\u0275cmp:Xi}),zo=Xi({\u0275dir:Xi}),jr=Xi({\u0275pipe:Xi}),qr=Xi({\u0275mod:Xi}),bs=Xi({\u0275fac:Xi}),Io=Xi({__NG_ELEMENT_ID__:Xi}),Pt=Xi({__NG_ENV_ID__:Xi});function St(E){return"string"==typeof E?E:null==E?"":String(E)}function ep(E,R){throw new Fo(-201,!1)}var Ls=function(E){return E[E.Default=0]="Default",E[E.Host=1]="Host",E[E.Self=2]="Self",E[E.SkipSelf=4]="SkipSelf",E[E.Optional=8]="Optional",E}(Ls||{});let Mu;function Mm(){return Mu}function Lc(E){const R=Mu;return Mu=E,R}function tp(E,R,j){const ne=yn(E);return ne&&"root"==ne.providedIn?void 0===ne.value?ne.value=ne.factory():ne.value:j&Ls.Optional?null:void 0!==R?R:void ep()}const Ig={},kp="__NG_DI_FLAG__",yt="ngTempTokenPath",Jt=/\n/gm,ki="__source";let Ao;function Nr(E){const R=Ao;return Ao=E,R}function Fa(E,R=Ls.Default){if(void 0===Ao)throw new Fo(-203,!1);return null===Ao?tp(E,void 0,R):Ao.get(E,R&Ls.Optional?null:void 0,R)}function Vs(E,R=Ls.Default){return(Mm()||Fa)($r(E),R)}function mr(E,R=Ls.Default){return Vs(E,Ja(R))}function Ja(E){return typeof E>"u"||"number"==typeof E?E:(E.optional&&8)|(E.host&&1)|(E.self&&2)|(E.skipSelf&&4)}function oa(E){const R=[];for(let j=0;j<E.length;j++){const ne=$r(E[j]);if(Array.isArray(ne)){if(0===ne.length)throw new Fo(900,!1);let me,Ie=Ls.Default;for(let je=0;je<ne.length;je++){const at=ne[je],_t=eu(at);"number"==typeof _t?-1===_t?me=at.token:Ie|=_t:me=at}R.push(Vs(me,Ie))}else R.push(Vs(ne))}return R}function dl(E,R){return E[kp]=R,E.prototype[kp]=R,E}function eu(E){return E[kp]}const od=dl(kn("Optional"),8),Nc=dl(kn("SkipSelf"),4);function Eh(E,R){return E.hasOwnProperty(bs)?E[bs]:null}function Lp(E,R){E.forEach(j=>Array.isArray(j)?Lp(j,R):R(j))}function rd(E,R,j){R>=E.length?E.push(j):E.splice(R,0,j)}function Pg(E,R){return R>=E.length-1?E.pop():E.splice(R,1)[0]}function pc(E,R,j){let ne=ip(E,R);return ne>=0?E[1|ne]=j:(ne=~ne,function Bp(E,R,j,ne){let me=E.length;if(me==R)E.push(j,ne);else if(1===me)E.push(ne,E[0]),E[0]=j;else{for(me--,E.push(E[me-1],E[me]);me>R;)E[me]=E[me-2],me--;E[R]=j,E[R+1]=ne}}(E,ne,R,j)),ne}function Np(E,R){const j=ip(E,R);if(j>=0)return E[1|j]}function ip(E,R){return function nu(E,R,j){let ne=0,me=E.length>>j;for(;me!==ne;){const Ie=ne+(me-ne>>1),je=E[Ie<<j];if(R===je)return Ie<<j;je>R?me=Ie:ne=Ie+1}return~(me<<j)}(E,R,1)}const gc={},Hs=[],ad=new Ji(""),Fp=new Ji("",-1),Oh=new Ji("");class Vp{get(R,j=Ig){if(j===Ig){const ne=new Error(`NullInjectorError: No provider for ${Go(R)}!`);throw ne.name="NullInjectorError",ne}return j}}var Hp=function(E){return E[E.OnPush=0]="OnPush",E[E.Default=1]="Default",E}(Hp||{}),Ed=function(E){return E[E.Emulated=0]="Emulated",E[E.None=2]="None",E[E.ShadowDom=3]="ShadowDom",E}(Ed||{}),ld=function(E){return E[E.None=0]="None",E[E.SignalBased=1]="SignalBased",E[E.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",E}(ld||{});function qu(E,R,j){let ne=E.length;for(;;){const me=E.indexOf(R,j);if(-1===me)return me;if(0===me||E.charCodeAt(me-1)<=32){const Ie=R.length;if(me+Ie===ne||E.charCodeAt(me+Ie)<=32)return me}j=me+1}}function kg(E,R,j){let ne=0;for(;ne<j.length;){const me=j[ne];if("number"==typeof me){if(0!==me)break;ne++;const Ie=j[ne++],je=j[ne++],at=j[ne++];E.setAttribute(R,je,at,Ie)}else{const Ie=me,je=j[++ne];Od(Ie)?E.setProperty(R,Ie,je):E.setAttribute(R,Ie,je),ne++}}return ne}function Up(E){return 3===E||4===E||6===E}function Od(E){return 64===E.charCodeAt(0)}function Lg(E,R){if(null!==R&&0!==R.length)if(null===E||0===E.length)E=R.slice();else{let j=-1;for(let ne=0;ne<R.length;ne++){const me=R[ne];"number"==typeof me?j=me:0===j||cd(E,j,me,null,-1===j||2===j?R[++ne]:null)}}return E}function cd(E,R,j,ne,me){let Ie=0,je=E.length;if(-1===R)je=-1;else for(;Ie<E.length;){const at=E[Ie++];if("number"==typeof at){if(at===R){je=-1;break}if(at>R){je=Ie-1;break}}}for(;Ie<E.length;){const at=E[Ie];if("number"==typeof at)break;if(at===j){if(null===ne)return void(null!==me&&(E[Ie+1]=me));if(ne===E[Ie+1])return void(E[Ie+2]=me)}Ie++,null!==ne&&Ie++,null!==me&&Ie++}-1!==je&&(E.splice(je,0,R),Ie=je+1),E.splice(Ie++,0,j),null!==ne&&E.splice(Ie++,0,ne),null!==me&&E.splice(Ie++,0,me)}const _C="ng-template";function Xl(E,R,j,ne){let me=0;if(ne){for(;me<R.length&&"string"==typeof R[me];me+=2)if("class"===R[me]&&-1!==qu(R[me+1].toLowerCase(),j,0))return!0}else if(bc(E))return!1;if(me=R.indexOf(1,me),me>-1){let Ie;for(;++me<R.length&&"string"==typeof(Ie=R[me]);)if(Ie.toLowerCase()===j)return!0}return!1}function bc(E){return 4===E.type&&E.value!==_C}function Ff(E,R,j){return R===(4!==E.type||j?E.value:_C)}function Bg(E,R,j){let ne=4;const me=E.attrs,Ie=null!==me?function iu(E){for(let R=0;R<E.length;R++)if(Up(E[R]))return R;return E.length}(me):0;let je=!1;for(let at=0;at<R.length;at++){const _t=R[at];if("number"!=typeof _t){if(!je)if(4&ne){if(ne=2|1&ne,""!==_t&&!Ff(E,_t,j)||""===_t&&1===R.length){if(dd(ne))return!1;je=!0}}else if(8&ne){if(null===me||!Xl(E,me,_t,j)){if(dd(ne))return!1;je=!0}}else{const tn=R[++at],wn=Q_(_t,me,bc(E),j);if(-1===wn){if(dd(ne))return!1;je=!0;continue}if(""!==tn){let di;if(di=wn>Ie?"":me[wn+1].toLowerCase(),2&ne&&tn!==di){if(dd(ne))return!1;je=!0}}}}else{if(!je&&!dd(ne)&&!dd(_t))return!1;if(je&&dd(_t))continue;je=!1,ne=_t|1&ne}}return dd(ne)||je}function dd(E){return!(1&E)}function Q_(E,R,j,ne){if(null===R)return-1;let me=0;if(ne||!j){let Ie=!1;for(;me<R.length;){const je=R[me];if(je===E)return me;if(3===je||6===je)Ie=!0;else{if(1===je||2===je){let at=R[++me];for(;"string"==typeof at;)at=R[++me];continue}if(4===je)break;if(0===je){me+=4;continue}}me+=Ie?1:2}return-1}return function J_(E,R){let j=E.indexOf(4);if(j>-1)for(j++;j<E.length;){const ne=E[j];if("number"==typeof ne)return-1;if(ne===R)return j;j++}return-1}(R,E)}function km(E,R,j=!1){for(let ne=0;ne<R.length;ne++)if(Bg(E,R[ne],j))return!0;return!1}function zp(E,R){e:for(let j=0;j<R.length;j++){const ne=R[j];if(E.length===ne.length){for(let me=0;me<E.length;me++)if(E[me]!==ne[me])continue e;return!0}}return!1}function eh(E,R){return E?":not("+R.trim()+")":R}function Ng(E){let R=E[0],j=1,ne=2,me="",Ie=!1;for(;j<E.length;){let je=E[j];if("string"==typeof je)if(2&ne){const at=E[++j];me+="["+je+(at.length>0?'="'+at+'"':"")+"]"}else 8&ne?me+="."+je:4&ne&&(me+=" "+je);else""!==me&&!dd(je)&&(R+=eh(Ie,me),me=""),ne=je,Ie=Ie||!dd(ne);j++}return""!==me&&(R+=eh(Ie,me)),R}function Gp(E){return Ca(()=>{const R=Vf(E),j={...R,decls:E.decls,vars:E.vars,template:E.template,consts:E.consts||null,ngContentSelectors:E.ngContentSelectors,onPush:E.changeDetection===Hp.OnPush,directiveDefs:null,pipeDefs:null,dependencies:R.standalone&&E.dependencies||null,getStandaloneInjector:null,signals:E.signals??!1,data:E.data||{},encapsulation:E.encapsulation||Ed.Emulated,styles:E.styles||Hs,_:null,schemas:E.schemas||null,tView:null,id:""};Hg(j);const ne=E.dependencies;return j.directiveDefs=$p(ne,!1),j.pipeDefs=$p(ne,!0),j.id=function lt(E){let R=0;const j=[E.selectors,E.ngContentSelectors,E.hostVars,E.hostAttrs,E.consts,E.vars,E.decls,E.encapsulation,E.standalone,E.signals,E.exportAs,JSON.stringify(E.inputs),JSON.stringify(E.outputs),Object.getOwnPropertyNames(E.type.prototype),!!E.contentQueries,!!E.viewQuery].join("|");for(const me of j)R=Math.imul(31,R)+me.charCodeAt(0)|0;return R+=2147483648,"c"+R}(j),j})}function Yl(E){return Qs(E)||_l(E)}function Bm(E){return null!==E}function Vg(E){return Ca(()=>({type:E.type,bootstrap:E.bootstrap||Hs,declarations:E.declarations||Hs,imports:E.imports||Hs,exports:E.exports||Hs,transitiveCompileScopes:null,schemas:E.schemas||null,id:E.id||null}))}function Wp(E,R){if(null==E)return gc;const j={};for(const ne in E)if(E.hasOwnProperty(ne)){const me=E[ne];let Ie,je,at=ld.None;Array.isArray(me)?(at=me[0],Ie=me[1],je=me[2]??Ie):(Ie=me,je=me),R?(j[Ie]=at!==ld.None?[ne,at]:ne,R[Ie]=je):j[Ie]=ne}return j}function nh(E){return Ca(()=>{const R=Vf(E);return Hg(R),R})}function Bd(E){return{type:E.type,name:E.name,factory:null,pure:!1!==E.pure,standalone:!0===E.standalone,onDestroy:E.type.prototype.ngOnDestroy||null}}function Qs(E){return E[Yo]||null}function _l(E){return E[zo]||null}function nl(E){return E[jr]||null}function Nd(E){const R=Qs(E)||_l(E)||nl(E);return null!==R&&R.standalone}function sc(E,R){const j=E[qr]||null;if(!j&&!0===R)throw new Error(`Type ${Go(E)} does not have '\u0275mod' property.`);return j}function Vf(E){const R={};return{type:E.type,providersResolver:null,factory:null,hostBindings:E.hostBindings||null,hostVars:E.hostVars||0,hostAttrs:E.hostAttrs||null,contentQueries:E.contentQueries||null,declaredInputs:R,inputTransforms:null,inputConfig:E.inputs||gc,exportAs:E.exportAs||null,standalone:!0===E.standalone,signals:!0===E.signals,selectors:E.selectors||Hs,viewQuery:E.viewQuery||null,features:E.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Wp(E.inputs,R),outputs:Wp(E.outputs),debugInfo:null}}function Hg(E){E.features?.forEach(R=>R(E))}function $p(E,R){if(!E)return null;const j=R?nl:Yl;return()=>("function"==typeof E?E():E).map(ne=>j(ne)).filter(Bm)}function mt(E){return{\u0275providers:E}}function ut(...E){return{\u0275providers:Mt(0,E),\u0275fromNgModule:!0}}function Mt(E,...R){const j=[],ne=new Set;let me;const Ie=je=>{j.push(je)};return Lp(R,je=>{const at=je;ni(at,Ie,[],ne)&&(me||=[],me.push(at))}),void 0!==me&&fn(me,Ie),j}function fn(E,R){for(let j=0;j<E.length;j++){const{ngModule:ne,providers:me}=E[j];Mo(me,Ie=>{R(Ie,ne)})}}function ni(E,R,j,ne){if(!(E=$r(E)))return!1;let me=null,Ie=to(E);const je=!Ie&&Qs(E);if(Ie||je){if(je&&!je.standalone)return!1;me=E}else{const _t=E.ngModule;if(Ie=to(_t),!Ie)return!1;me=_t}const at=ne.has(me);if(je){if(at)return!1;if(ne.add(me),je.dependencies){const _t="function"==typeof je.dependencies?je.dependencies():je.dependencies;for(const tn of _t)ni(tn,R,j,ne)}}else{if(!Ie)return!1;{if(null!=Ie.imports&&!at){let tn;ne.add(me);try{Lp(Ie.imports,wn=>{ni(wn,R,j,ne)&&(tn||=[],tn.push(wn))})}finally{}void 0!==tn&&fn(tn,R)}if(!at){const tn=Eh(me)||(()=>new me);R({provide:me,useFactory:tn,deps:Hs},me),R({provide:Oh,useValue:me,multi:!0},me),R({provide:ad,useValue:()=>Vs(me),multi:!0},me)}const _t=Ie.providers;if(null!=_t&&!at){const tn=E;Mo(_t,wn=>{R(wn,tn)})}}}return me!==E&&void 0!==E.providers}function Mo(E,R){for(let j of E)Oo(j)&&(j=j.\u0275providers),Array.isArray(j)?Mo(j,R):R(j)}const vo=Xi({provide:String,useValue:Xi});function Ir(E){return null!==E&&"object"==typeof E&&vo in E}function Va(E){return"function"==typeof E}const lc=new Ji(""),Fc={},wd={};let wh;function jp(){return void 0===wh&&(wh=new Vp),wh}class xc{}class Kp extends xc{get destroyed(){return this._destroyed}constructor(R,j,ne,me){super(),this.parent=j,this.source=ne,this.scopes=me,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,zg(R,je=>this.processProvider(je)),this.records.set(Fp,Ug(void 0,this)),me.has("environment")&&this.records.set(xc,Ug(void 0,this));const Ie=this.records.get(lc);null!=Ie&&"string"==typeof Ie.value&&this.scopes.add(Ie.value),this.injectorDefTypes=new Set(this.get(Oh,Hs,Ls.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const R=S(null);try{for(const ne of this._ngOnDestroyHooks)ne.ngOnDestroy();const j=this._onDestroyHooks;this._onDestroyHooks=[];for(const ne of j)ne()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),S(R)}}onDestroy(R){return this.assertNotDestroyed(),this._onDestroyHooks.push(R),()=>this.removeOnDestroy(R)}runInContext(R){this.assertNotDestroyed();const j=Nr(this),ne=Lc(void 0);try{return R()}finally{Nr(j),Lc(ne)}}get(R,j=Ig,ne=Ls.Default){if(this.assertNotDestroyed(),R.hasOwnProperty(Pt))return R[Pt](this);ne=Ja(ne);const Ie=Nr(this),je=Lc(void 0);try{if(!(ne&Ls.SkipSelf)){let _t=this.records.get(R);if(void 0===_t){const tn=function yC(E){return"function"==typeof E||"object"==typeof E&&E instanceof Ji}(R)&&yn(R);_t=tn&&this.injectableDefInScope(tn)?Ug(ev(R),Fc):null,this.records.set(R,_t)}if(null!=_t)return this.hydrate(R,_t)}return(ne&Ls.Self?jp():this.parent).get(R,j=ne&Ls.Optional&&j===Ig?null:j)}catch(at){if("NullInjectorError"===at.name){if((at[yt]=at[yt]||[]).unshift(Go(R)),Ie)throw at;return function Bc(E,R,j,ne){const me=E[yt];throw R[ki]&&me.unshift(R[ki]),E.message=function tu(E,R,j,ne=null){E=E&&"\n"===E.charAt(0)&&"\u0275"==E.charAt(1)?E.slice(2):E;let me=Go(R);if(Array.isArray(R))me=R.map(Go).join(" -> ");else if("object"==typeof R){let Ie=[];for(let je in R)if(R.hasOwnProperty(je)){let at=R[je];Ie.push(je+":"+("string"==typeof at?JSON.stringify(at):Go(at)))}me=`{${Ie.join(", ")}}`}return`${j}${ne?"("+ne+")":""}[${me}]: ${E.replace(Jt,"\n  ")}`}("\n"+E.message,me,j,ne),E.ngTokenPath=me,E[yt]=null,E}(at,R,"R3InjectorError",this.source)}throw at}finally{Lc(je),Nr(Ie)}}resolveInjectorInitializers(){const R=S(null),j=Nr(this),ne=Lc(void 0);try{const Ie=this.get(ad,Hs,Ls.Self);for(const je of Ie)je()}finally{Nr(j),Lc(ne),S(R)}}toString(){const R=[],j=this.records;for(const ne of j.keys())R.push(Go(ne));return`R3Injector[${R.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Fo(205,!1)}processProvider(R){let j=Va(R=$r(R))?R:$r(R&&R.provide);const ne=function Gy(E){return Ir(E)?Ug(void 0,E.useValue):Ug(tv(E),Fc)}(R);if(!Va(R)&&!0===R.multi){let me=this.records.get(j);me||(me=Ug(void 0,Fc,!0),me.factory=()=>oa(me.multi),this.records.set(j,me)),j=R,me.multi.push(R)}this.records.set(j,ne)}hydrate(R,j){const ne=S(null);try{return j.value===Fc&&(j.value=wd,j.value=j.factory()),"object"==typeof j.value&&j.value&&function nv(E){return null!==E&&"object"==typeof E&&"function"==typeof E.ngOnDestroy}(j.value)&&this._ngOnDestroyHooks.add(j.value),j.value}finally{S(ne)}}injectableDefInScope(R){if(!R.providedIn)return!1;const j=$r(R.providedIn);return"string"==typeof j?"any"===j||this.scopes.has(j):this.injectorDefTypes.has(j)}removeOnDestroy(R){const j=this._onDestroyHooks.indexOf(R);-1!==j&&this._onDestroyHooks.splice(j,1)}}function ev(E){const R=yn(E),j=null!==R?R.factory:Eh(E);if(null!==j)return j;if(E instanceof Ji)throw new Fo(204,!1);if(E instanceof Function)return function vC(E){if(E.length>0)throw new Fo(204,!1);const j=function xi(E){return E&&(E[Yi]||E[so])||null}(E);return null!==j?()=>j.factory(E):()=>new E}(E);throw new Fo(204,!1)}function tv(E,R,j){let ne;if(Va(E)){const me=$r(E);return Eh(me)||ev(me)}if(Ir(E))ne=()=>$r(E.useValue);else if(function Bs(E){return!(!E||!E.useFactory)}(E))ne=()=>E.useFactory(...oa(E.deps||[]));else if(function Es(E){return!(!E||!E.useExisting)}(E))ne=()=>Vs($r(E.useExisting));else{const me=$r(E&&(E.useClass||E.provide));if(!function CC(E){return!!E.deps}(E))return Eh(me)||ev(me);ne=()=>new me(...oa(E.deps))}return ne}function Ug(E,R,j=!1){return{factory:E,value:R,multi:j?[]:void 0}}function zg(E,R){for(const j of E)Array.isArray(j)?zg(j,R):j&&Oo(j)?zg(j.\u0275providers,R):R(j)}function iv(E,R){E instanceof Kp&&E.assertNotDestroyed();const ne=Nr(E),me=Lc(void 0);try{return R()}finally{Nr(ne),Lc(me)}}function Hf(){return void 0!==Mm()||null!=function ar(){return Ao}()}function Ru(E){if(!Hf())throw new Fo(-203,!1)}const vl=0,Or=1,ts=2,ra=3,Td=4,Zl=5,cc=6,Yp=7,qa=8,Ql=9,oh=10,Is=11,rp=12,sv=13,sp=14,Ol=15,ap=16,rh=17,sh=18,lp=19,Gf=20,cp=21,ou=22,Ha=23,ss=25,dp=1,ku=7,Lu=9,il=10;var Wg=function(E){return E[E.None=0]="None",E[E.HasTransplantedViews=2]="HasTransplantedViews",E}(Wg||{});function sl(E){return Array.isArray(E)&&"object"==typeof E[dp]}function Ul(E){return Array.isArray(E)&&!0===E[dp]}function Vm(E){return!!(4&E.flags)}function Dd(E){return E.componentOffset>-1}function Hm(E){return!(1&~E.flags)}function Bu(E){return!!E.template}function ah(E){return!!(512&E[ts])}class uv{constructor(R,j,ne){this.previousValue=R,this.currentValue=j,this.firstChange=ne}isFirstChange(){return this.firstChange}}function jm(E,R,j,ne){null!==R?R.applyValueToInputSignal(R,ne):E[j]=ne}function Xg(){return wC}function wC(E){return E.type.prototype.ngOnChanges&&(E.setInput=Km),hv}function hv(){const E=$f(this),R=E?.current;if(R){const j=E.previous;if(j===gc)E.previous=R;else for(let ne in R)j[ne]=R[ne];E.current=null,this.ngOnChanges(R)}}function Km(E,R,j,ne,me){const Ie=this.declaredInputs[ne],je=$f(E)||function pv(E,R){return E[Xm]=R}(E,{previous:gc,current:null}),at=je.current||(je.current={}),_t=je.previous,tn=_t[Ie];at[Ie]=new uv(tn&&tn.currentValue,j,_t===gc),jm(E,R,me,j)}Xg.ngInherit=!0;const Xm="__ngSimpleChanges__";function $f(E){return E[Xm]||null}const $c=function(E,R,j){},ud="svg";function ha(E){for(;Array.isArray(E);)E=E[vl];return E}function Sn(E,R){return ha(R[E])}function nt(E,R){return ha(R[E.index])}function li(E,R){return E.data[R]}function Gi(E,R){return E[R]}function bo(E,R){const j=R[E];return sl(j)?j:j[vl]}function ir(E){return!(128&~E[ts])}function Ur(E,R){return null==R?null:E[R]}function Ar(E){E[rh]=0}function Us(E){1024&E[ts]||(E[ts]|=1024,ir(E)&&Js(E))}function Ds(E){return!!(9216&E[ts]||E[Ha]?.dirty)}function al(E){E[oh].changeDetectionScheduler?.notify(7),64&E[ts]&&(E[ts]|=1024),Ds(E)&&Js(E)}function Js(E){E[oh].changeDetectionScheduler?.notify(0);let R=ol(E);for(;null!==R&&!(8192&R[ts])&&(R[ts]|=8192,ir(R));)R=ol(R)}function Ra(E,R){if(!(256&~E[ts]))throw new Fo(911,!1);null===E[cp]&&(E[cp]=[]),E[cp].push(R)}function ol(E){const R=E[ra];return Ul(R)?R[ra]:R}const ns={lFrame:$x(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let Ya=!1;function Sc(){return ns.bindingsEnabled}function fc(){return null!==ns.skipHydrationRootTNode}function Ho(){return ns.lFrame.lView}function ks(){return ns.lFrame.tView}function Dh(E){return ns.lFrame.contextLView=E,E[qa]}function ru(E){return ns.lFrame.contextLView=null,E}function ba(){let E=qp();for(;null!==E&&64===E.type;)E=E.parent;return E}function qp(){return ns.lFrame.currentTNode}function mc(E,R){const j=ns.lFrame;j.currentTNode=E,j.isParent=R}function Fd(){return ns.lFrame.isParent}function eg(){ns.lFrame.isParent=!1}function ec(){return Ya}function Ec(E){Ya=E}function yl(){const E=ns.lFrame;let R=E.bindingRootIndex;return-1===R&&(R=E.bindingRootIndex=E.tView.bindingStartIndex),R}function Oc(){return ns.lFrame.bindingIndex}function jc(){return ns.lFrame.bindingIndex++}function Ah(E){const R=ns.lFrame,j=R.bindingIndex;return R.bindingIndex=R.bindingIndex+E,j}function tg(E,R){const j=ns.lFrame;j.bindingIndex=j.bindingRootIndex=E,Li(R)}function Li(E){ns.lFrame.currentDirectiveIndex=E}function Ne(){return ns.lFrame.currentQueryIndex}function Vn(E){ns.lFrame.currentQueryIndex=E}function vs(E){const R=E[Or];return 2===R.type?R.declTNode:1===R.type?E[Zl]:null}function Yr(E,R,j){if(j&Ls.SkipSelf){let me=R,Ie=E;for(;!(me=me.parent,null!==me||j&Ls.Host||(me=vs(Ie),null===me||(Ie=Ie[sp],10&me.type))););if(null===me)return!1;R=me,E=Ie}const ne=ns.lFrame=Wx();return ne.currentTNode=R,ne.lView=E,!0}function ng(E){const R=Wx(),j=E[Or];ns.lFrame=R,R.currentTNode=j.firstChild,R.lView=E,R.tView=j,R.contextLView=E,R.bindingIndex=j.bindingStartIndex,R.inI18n=!1}function Wx(){const E=ns.lFrame,R=null===E?null:E.child;return null===R?$x(E):R}function $x(E){const R={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:E,child:null,inI18n:!1};return null!==E&&(E.child=R),R}function jw(){const E=ns.lFrame;return ns.lFrame=E.parent,E.currentTNode=null,E.lView=null,E}const Kw=jw;function XS(){const E=jw();E.isParent=!0,E.tView=null,E.selectedIndex=-1,E.contextLView=null,E.elementDepthCount=0,E.currentDirectiveIndex=-1,E.currentNamespace=null,E.bindingRootIndex=-1,E.bindingIndex=-1,E.currentQueryIndex=0}function Ad(){return ns.lFrame.selectedIndex}function Ym(E){ns.lFrame.selectedIndex=E}function Pl(){const E=ns.lFrame;return li(E.tView,E.selectedIndex)}function YS(){ns.lFrame.currentNamespace=ud}function ZS(){!function Xw(){ns.lFrame.currentNamespace=null}()}let He=!0;function Le(){return He}function Ae(E){He=E}function Ge(E,R){for(let j=R.directiveStart,ne=R.directiveEnd;j<ne;j++){const Ie=E.data[j].type.prototype,{ngAfterContentInit:je,ngAfterContentChecked:at,ngAfterViewInit:_t,ngAfterViewChecked:tn,ngOnDestroy:wn}=Ie;je&&(E.contentHooks??=[]).push(-j,je),at&&((E.contentHooks??=[]).push(j,at),(E.contentCheckHooks??=[]).push(j,at)),_t&&(E.viewHooks??=[]).push(-j,_t),tn&&((E.viewHooks??=[]).push(j,tn),(E.viewCheckHooks??=[]).push(j,tn)),null!=wn&&(E.destroyHooks??=[]).push(j,wn)}}function Qe(E,R,j){Vt(E,R,3,j)}function it(E,R,j,ne){(3&E[ts])===j&&Vt(E,R,j,ne)}function xt(E,R){let j=E[ts];(3&j)===R&&(j&=16383,j+=1,E[ts]=j)}function Vt(E,R,j,ne){const Ie=ne??-1,je=R.length-1;let at=0;for(let _t=void 0!==ne?65535&E[rh]:0;_t<je;_t++)if("number"==typeof R[_t+1]){if(at=R[_t],null!=ne&&at>=ne)break}else R[_t]<0&&(E[rh]+=65536),(at<Ie||-1==Ie)&&(Xn(E,j,R,_t),E[rh]=(4294901760&E[rh])+_t+2),_t++}function Qt(E,R){$c(4,E,R);const j=S(null);try{R.call(E)}finally{S(j),$c(5,E,R)}}function Xn(E,R,j,ne){const me=j[ne]<0,Ie=j[ne+1],at=E[me?-j[ne]:j[ne]];me?E[ts]>>14<E[rh]>>16&&(3&E[ts])===R&&(E[ts]+=16384,Qt(at,Ie)):Qt(at,Ie)}const Vi=-1;class Ui{constructor(R,j,ne){this.factory=R,this.resolving=!1,this.canSeeViewProviders=j,this.injectImpl=ne}}const dc={};class pd{constructor(R,j){this.injector=R,this.parentInjector=j}get(R,j,ne){ne=Ja(ne);const me=this.injector.get(R,dc,ne);return me!==dc||j===dc?me:this.parentInjector.get(R,j,ne)}}function jy(E){return E!==Vi}function jx(E){return 32767&E}function _v(E,R){let j=function QS(E){return E>>16}(E),ne=R;for(;j>0;)ne=ne[sp],j--;return ne}let Zm=!0;function Qg(E){const R=Zm;return Zm=E,R}const OP=255,wP=5;let ig=0;const Ph={};function JS(E,R){const j=ka(E,R);if(-1!==j)return j;const ne=R[Or];ne.firstCreatePass&&(E.injectorIndex=R.length,Yw(ne.data,E),Yw(R,null),Yw(ne.blueprint,null));const me=Zw(E,R),Ie=E.injectorIndex;if(jy(me)){const je=jx(me),at=_v(me,R),_t=at[Or].data;for(let tn=0;tn<8;tn++)R[Ie+tn]=at[je+tn]|_t[je+tn]}return R[Ie+8]=me,Ie}function Yw(E,R){E.push(0,0,0,0,0,0,0,0,R)}function ka(E,R){return-1===E.injectorIndex||E.parent&&E.parent.injectorIndex===E.injectorIndex||null===R[E.injectorIndex+8]?-1:E.injectorIndex}function Zw(E,R){if(E.parent&&-1!==E.parent.injectorIndex)return E.parent.injectorIndex;let j=0,ne=null,me=R;for(;null!==me;){if(ne=tE(me),null===ne)return Vi;if(j++,me=me[sp],-1!==ne.injectorIndex)return ne.injectorIndex|j<<16}return Vi}function qS(E,R,j){!function AC(E,R,j){let ne;"string"==typeof j?ne=j.charCodeAt(0)||0:j.hasOwnProperty(Io)&&(ne=j[Io]),null==ne&&(ne=j[Io]=ig++);const me=ne&OP;R.data[E+(me>>wP)]|=1<<me}(E,R,j)}function TP(E,R,j){if(j&Ls.Optional||void 0!==E)return E;ep()}function DP(E,R,j,ne){if(j&Ls.Optional&&void 0===ne&&(ne=null),!(j&(Ls.Self|Ls.Host))){const me=E[Ql],Ie=Lc(void 0);try{return me?me.get(R,ne,j&Ls.Optional):tp(R,ne,j&Ls.Optional)}finally{Lc(Ie)}}return TP(ne,0,j)}function eE(E,R,j,ne=Ls.Default,me){if(null!==E){if(2048&R[ts]&&!(ne&Ls.Self)){const je=function Jw(E,R,j,ne,me){let Ie=E,je=R;for(;null!==Ie&&null!==je&&2048&je[ts]&&!(512&je[ts]);){const at=AP(Ie,je,j,ne|Ls.Self,Ph);if(at!==Ph)return at;let _t=Ie.parent;if(!_t){const tn=je[Gf];if(tn){const wn=tn.get(j,Ph,ne);if(wn!==Ph)return wn}_t=tE(je),je=je[sp]}Ie=_t}return me}(E,R,j,ne,Ph);if(je!==Ph)return je}const Ie=AP(E,R,j,ne,Ph);if(Ie!==Ph)return Ie}return DP(R,j,ne,me)}function AP(E,R,j,ne,me){const Ie=function gL(E){if("string"==typeof E)return E.charCodeAt(0)||0;const R=E.hasOwnProperty(Io)?E[Io]:void 0;return"number"==typeof R?R>=0?R&OP:fL:R}(j);if("function"==typeof Ie){if(!Yr(R,E,ne))return ne&Ls.Host?TP(me,0,ne):DP(R,j,ne,me);try{let je;if(je=Ie(ne),null!=je||ne&Ls.Optional)return je;ep()}finally{Kw()}}else if("number"==typeof Ie){let je=null,at=ka(E,R),_t=Vi,tn=ne&Ls.Host?R[Ol][Zl]:null;for((-1===at||ne&Ls.SkipSelf)&&(_t=-1===at?Zw(E,R):R[at+8],_t!==Vi&&MP(ne,!1)?(je=R[Or],at=jx(_t),R=_v(_t,R)):at=-1);-1!==at;){const wn=R[Or];if(PP(Ie,at,wn.data)){const di=IP(at,R,j,je,ne,tn);if(di!==Ph)return di}_t=R[at+8],_t!==Vi&&MP(ne,R[Or].data[at+8]===tn)&&PP(Ie,at,R)?(je=wn,at=jx(_t),R=_v(_t,R)):at=-1}}return me}function IP(E,R,j,ne,me,Ie){const je=R[Or],at=je.data[E+8],wn=IC(at,je,j,null==ne?Dd(at)&&Zm:ne!=je&&!!(3&at.type),me&Ls.Host&&Ie===at);return null!==wn?PC(R,je,wn,at):Ph}function IC(E,R,j,ne,me){const Ie=E.providerIndexes,je=R.data,at=1048575&Ie,_t=E.directiveStart,wn=Ie>>20,zi=me?at+wn:E.directiveEnd;for(let Zi=ne?at:at+wn;Zi<zi;Zi++){const yo=je[Zi];if(Zi<_t&&j===yo||Zi>=_t&&yo.type===j)return Zi}if(me){const Zi=je[_t];if(Zi&&Bu(Zi)&&Zi.type===j)return _t}return null}function PC(E,R,j,ne){let me=E[j];const Ie=R.data;if(function Do(E){return E instanceof Ui}(me)){const je=me;je.resolving&&function jo(E,R){throw R&&R.join(" > "),new Fo(-200,E)}(function Dn(E){return"function"==typeof E?E.name||E.toString():"object"==typeof E&&null!=E&&"function"==typeof E.type?E.type.name||E.type.toString():St(E)}(Ie[j]));const at=Qg(je.canSeeViewProviders);je.resolving=!0;const tn=je.injectImpl?Lc(je.injectImpl):null;Yr(E,ne,Ls.Default);try{me=E[j]=je.factory(void 0,Ie,E,ne),R.firstCreatePass&&j>=ne.directiveStart&&function ke(E,R,j){const{ngOnChanges:ne,ngOnInit:me,ngDoCheck:Ie}=R.type.prototype;if(ne){const je=wC(R);(j.preOrderHooks??=[]).push(E,je),(j.preOrderCheckHooks??=[]).push(E,je)}me&&(j.preOrderHooks??=[]).push(0-E,me),Ie&&((j.preOrderHooks??=[]).push(E,Ie),(j.preOrderCheckHooks??=[]).push(E,Ie))}(j,Ie[j],R)}finally{null!==tn&&Lc(tn),Qg(at),je.resolving=!1,Kw()}}return me}function PP(E,R,j){return!!(j[R+(E>>wP)]&1<<E)}function MP(E,R){return!(E&Ls.Self||E&Ls.Host&&R)}class Id{constructor(R,j){this._tNode=R,this._lView=j}get(R,j,ne){return eE(this._tNode,this._lView,R,Ja(ne),j)}}function fL(){return new Id(ba(),Ho())}function RP(E){return Ca(()=>{const R=E.prototype.constructor,j=R[bs]||Qw(R),ne=Object.prototype;let me=Object.getPrototypeOf(E.prototype).constructor;for(;me&&me!==ne;){const Ie=me[bs]||Qw(me);if(Ie&&Ie!==j)return Ie;me=Object.getPrototypeOf(me)}return Ie=>new Ie})}function Qw(E){return Qa(E)?()=>{const R=Qw($r(E));return R&&R()}:Eh(E)}function tE(E){const R=E[Or],j=R.type;return 2===j?R.declTNode:1===j?E[Zl]:null}function Kx(E){return function pL(E,R){if("class"===R)return E.classes;if("style"===R)return E.styles;const j=E.attrs;if(j){const ne=j.length;let me=0;for(;me<ne;){const Ie=j[me];if(Up(Ie))break;if(0===Ie)me+=2;else if("number"==typeof Ie)for(me++;me<ne&&"string"==typeof j[me];)me++;else{if(Ie===R)return j[me+1];me+=2}}}return null}(ba(),E)}function VP(E,R=null,j=null,ne){const me=HP(E,R,j,ne);return me.resolveInjectorInitializers(),me}function HP(E,R=null,j=null,ne,me=new Set){const Ie=[j||Hs,ut(E)];return ne=ne||("object"==typeof E?void 0:Go(E)),new Kp(Ie,R||jp(),ne||null,me)}class uc{static{this.THROW_IF_NOT_FOUND=Ig}static{this.NULL=new Vp}static create(R,j){if(Array.isArray(R))return VP({name:""},j,R,"");{const ne=R.name??"";return VP({name:ne},R.parent,R.providers,ne)}}static{this.\u0275prov=ft({token:uc,providedIn:"any",factory:()=>Vs(Fp)})}static{this.__NG_ELEMENT_ID__=-1}}new Ji("").__NG_ELEMENT_ID__=E=>{const R=ba();if(null===R)throw new Fo(204,!1);if(2&R.type)return R.value;if(E&Ls.Optional)return null;throw new Fo(204,!1)};function rE(E){return E.ngOriginalError}class Jg{constructor(){this._console=console}handleError(R){const j=this._findOriginalError(R);this._console.error("ERROR",R),j&&this._console.error("ORIGINAL ERROR",j)}_findOriginalError(R){let j=R&&rE(R);for(;j&&rE(j);)j=rE(j);return j||null}}const nT=new Ji("",{providedIn:"root",factory:()=>mr(Jg).handleError.bind(void 0)});let RC=(()=>{class E{static{this.__NG_ELEMENT_ID__=yL}static{this.__NG_ENV_ID__=j=>j}}return E})();class CL extends RC{constructor(R){super(),this._lView=R}onDestroy(R){return Ra(this._lView,R),()=>function el(E,R){if(null===E[cp])return;const j=E[cp].indexOf(R);-1!==j&&E[cp].splice(j,1)}(this._lView,R)}}function yL(){return new CL(Ho())}function bL(){return Ky(ba(),Ho())}function Ky(E,R){return new Yx(nt(E,R))}let Yx=(()=>{class E{constructor(j){this.nativeElement=j}static{this.__NG_ELEMENT_ID__=bL}}return E})();function GP(E){return E instanceof Yx?E.nativeElement:E}let kC=(()=>{class E{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ye.t(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const j=this.taskId++;return this.pendingTasks.add(j),j}remove(j){this.pendingTasks.delete(j),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=ft({token:E,providedIn:"root",factory:()=>new E})}}return E})();const Kf=class xL extends ge.B7{constructor(R=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=R,Hf()&&(this.destroyRef=mr(RC,{optional:!0})??void 0,this.pendingTasks=mr(kC,{optional:!0})??void 0)}emit(R){const j=S(null);try{super.next(R)}finally{S(j)}}subscribe(R,j,ne){let me=R,Ie=j||(()=>null),je=ne;if(R&&"object"==typeof R){const _t=R;me=_t.next?.bind(_t),Ie=_t.error?.bind(_t),je=_t.complete?.bind(_t)}this.__isAsync&&(Ie=this.wrapInTimeout(Ie),me&&(me=this.wrapInTimeout(me)),je&&(je=this.wrapInTimeout(je)));const at=super.subscribe({next:me,error:Ie,complete:je});return R instanceof fe.y&&R.add(at),at}wrapInTimeout(R){return j=>{const ne=this.pendingTasks?.add();setTimeout(()=>{R(j),void 0!==ne&&this.pendingTasks?.remove(ne)})}}};function aE(){return this._results[Symbol.iterator]()}class lE{get changes(){return this._changes??=new Kf}constructor(R=!1){this._emitDistinctChangesOnly=R,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const j=lE.prototype;j[Symbol.iterator]||(j[Symbol.iterator]=aE)}get(R){return this._results[R]}map(R){return this._results.map(R)}filter(R){return this._results.filter(R)}find(R){return this._results.find(R)}reduce(R,j){return this._results.reduce(R,j)}forEach(R){this._results.forEach(R)}some(R){return this._results.some(R)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(R,j){this.dirty=!1;const ne=function rc(E){return E.flat(Number.POSITIVE_INFINITY)}(R);(this._changesDetected=!function Kl(E,R,j){if(E.length!==R.length)return!1;for(let ne=0;ne<E.length;ne++){let me=E[ne],Ie=R[ne];if(j&&(me=j(me),Ie=j(Ie)),Ie!==me)return!1}return!0}(this._results,ne,j))&&(this._results=ne,this.length=ne.length,this.last=ne[this.length-1],this.first=ne[0])}notifyOnChanges(){void 0!==this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(R){this._onDirty=R}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){void 0!==this._changes&&(this._changes.complete(),this._changes.unsubscribe())}}function cE(E){return!(128&~E.flags)}const rT=new Map;let WP=0;const aT="__ngContext__";function Pd(E,R){sl(R)?(E[aT]=R[lp],function EL(E){rT.set(E[lp],E)}(R)):E[aT]=R}function ZP(E){return JP(E[rp])}function QP(E){return JP(E[Td])}function JP(E){for(;null!==E&&!Ul(E);)E=E[Td];return E}let qm;function e_(E){qm=E}function Vu(){if(void 0!==qm)return qm;if(typeof document<"u")return document;throw new Fo(210,!1)}const Qx=new Ji("",{providedIn:"root",factory:()=>Hu}),Hu="ng",au=new Ji(""),BC=new Ji("",{providedIn:"platform",factory:()=>"unknown"}),gd=new Ji("",{providedIn:"root",factory:()=>Vu().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});function kL(E){return E}function LL(){const E=new Qy;return"browser"===mr(BC)&&(E.store=function BL(E,R){const j=E.getElementById(R+"-state");if(j?.textContent)try{return JSON.parse(j.textContent)}catch(ne){console.warn("Exception while restoring TransferState for app "+R,ne)}return{}}(Vu(),mr(Qx))),E}let Qy=(()=>{class E{constructor(){this.store={},this.onSerializeCallbacks={}}static{this.\u0275prov=ft({token:E,providedIn:"root",factory:LL})}get(j,ne){return void 0!==this.store[j]?this.store[j]:ne}set(j,ne){this.store[j]=ne}remove(j){delete this.store[j]}hasKey(j){return this.store.hasOwnProperty(j)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(j,ne){this.onSerializeCallbacks[j]=ne}toJson(){for(const j in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(j))try{this.store[j]=this.onSerializeCallbacks[j]()}catch(ne){console.warn("Exception in onSerialize callback: ",ne)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return E})(),nM=()=>null;function CT(E,R,j=!1){return nM(E,R,j)}const HC=new Ji("",{providedIn:"root",factory:()=>!1});let o0,yE;function ib(E){return function Ev(){if(void 0===o0&&(o0=null,vi.trustedTypes))try{o0=vi.trustedTypes.createPolicy("angular",{createHTML:E=>E,createScript:E=>E,createScriptURL:E=>E})}catch{}return o0}()?.createHTML(E)||E}function wc(){if(void 0===yE&&(yE=null,vi.trustedTypes))try{yE=vi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:E=>E,createScript:E=>E,createScriptURL:E=>E})}catch{}return yE}function rb(E){return wc()?.createHTML(E)||E}function r0(E){return wc()?.createScriptURL(E)||E}class Ov{constructor(R){this.changingThisBreaksApplicationSecurity=R}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${wr})`}}class sM extends Ov{getTypeName(){return"HTML"}}class aM extends Ov{getTypeName(){return"Style"}}class HL extends Ov{getTypeName(){return"Script"}}class ST extends Ov{getTypeName(){return"URL"}}class UL extends Ov{getTypeName(){return"ResourceURL"}}function nf(E){return E instanceof Ov?E.changingThisBreaksApplicationSecurity:E}function sb(E,R){const j=function lM(E){return E instanceof Ov&&E.getTypeName()||null}(E);if(null!=j&&j!==R){if("ResourceURL"===j&&"URL"===R)return!0;throw new Error(`Required a safe ${R}, got a ${j} (see ${wr})`)}return j===R}function o_(E){return new sM(E)}function ET(E){return new aM(E)}function zL(E){return new HL(E)}function cM(E){return new ST(E)}function OT(E){return new UL(E)}class wT{constructor(R){this.inertDocumentHelper=R}getInertBodyElement(R){R="<body><remove></remove>"+R;try{const j=(new window.DOMParser).parseFromString(ib(R),"text/html").body;return null===j?this.inertDocumentHelper.getInertBodyElement(R):(j.removeChild(j.firstChild),j)}catch{return null}}}class ab{constructor(R){this.defaultDoc=R,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(R){const j=this.inertDocument.createElement("template");return j.innerHTML=ib(R),j}}const TT=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function bE(E){return(E=String(E)).match(TT)?E:"unsafe:"+E}function lu(E){const R={};for(const j of E.split(","))R[j]=!0;return R}function UC(...E){const R={};for(const j of E)for(const ne in j)j.hasOwnProperty(ne)&&(R[ne]=!0);return R}const zC=lu("area,br,col,hr,img,wbr"),og=lu("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Kc=lu("rp,rt"),dM=UC(zC,UC(og,lu("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),UC(Kc,lu("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),UC(Kc,og)),Tc=lu("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),lb=UC(Tc,lu("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),lu("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),sf=lu("script,style,template");class Qf{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(R){let j=R.firstChild,ne=!0,me=[];for(;j;)if(j.nodeType===Node.ELEMENT_NODE?ne=this.startElement(j):j.nodeType===Node.TEXT_NODE?this.chars(j.nodeValue):this.sanitizedSomething=!0,ne&&j.firstChild)me.push(j),j=Jf(j);else for(;j;){j.nodeType===Node.ELEMENT_NODE&&this.endElement(j);let Ie=uM(j);if(Ie){j=Ie;break}j=me.pop()}return this.buf.join("")}startElement(R){const j=wv(R).toLowerCase();if(!dM.hasOwnProperty(j))return this.sanitizedSomething=!0,!sf.hasOwnProperty(j);this.buf.push("<"),this.buf.push(j);const ne=R.attributes;for(let me=0;me<ne.length;me++){const Ie=ne.item(me),je=Ie.name,at=je.toLowerCase();if(!lb.hasOwnProperty(at)){this.sanitizedSomething=!0;continue}let _t=Ie.value;Tc[at]&&(_t=bE(_t)),this.buf.push(" ",je,'="',cu(_t),'"')}return this.buf.push(">"),!0}endElement(R){const j=wv(R).toLowerCase();dM.hasOwnProperty(j)&&!zC.hasOwnProperty(j)&&(this.buf.push("</"),this.buf.push(j),this.buf.push(">"))}chars(R){this.buf.push(cu(R))}}function uM(E){const R=E.nextSibling;if(R&&E!==R.previousSibling)throw hs(R);return R}function Jf(E){const R=E.firstChild;if(R&&function cb(E,R){return(E.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(E,R))throw hs(R);return R}function wv(E){const R=E.nodeName;return"string"==typeof R?R:"FORM"}function hs(E){return new Error(`Failed to sanitize html because the element is clobbered: ${E.outerHTML}`)}const DT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hM=/([^\#-~ |!])/g;function cu(E){return E.replace(/&/g,"&amp;").replace(DT,function(R){return"&#"+(1024*(R.charCodeAt(0)-55296)+(R.charCodeAt(1)-56320)+65536)+";"}).replace(hM,function(R){return"&#"+R.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let $a;function ch(E,R){let j=null;try{$a=$a||function Yf(E){const R=new ab(E);return function GL(){try{return!!(new window.DOMParser).parseFromString(ib(""),"text/html")}catch{return!1}}()?new wT(R):R}(E);let ne=R?String(R):"";j=$a.getInertBodyElement(ne);let me=5,Ie=ne;do{if(0===me)throw new Error("Failed to sanitize html because the input is unstable");me--,ne=Ie,Ie=j.innerHTML,j=$a.getInertBodyElement(ne)}while(ne!==Ie);return ib((new Qf).sanitizeChildren(af(j)||j))}finally{if(j){const ne=af(j)||j;for(;ne.firstChild;)ne.removeChild(ne.firstChild)}}}function af(E){return"content"in E&&function Da(E){return E.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===E.nodeName}(E)?E.content:null}var mp=function(E){return E[E.NONE=0]="NONE",E[E.HTML=1]="HTML",E[E.STYLE=2]="STYLE",E[E.SCRIPT=3]="SCRIPT",E[E.URL=4]="URL",E[E.RESOURCE_URL=5]="RESOURCE_URL",E}(mp||{});function r_(E){const R=Dv();return R?rb(R.sanitize(mp.HTML,E)||""):sb(E,"HTML")?rb(nf(E)):ch(Vu(),St(E))}function _c(E){const R=Dv();return R?R.sanitize(mp.URL,E)||"":sb(E,"URL")?nf(E):bE(St(E))}function Tv(E){const R=Dv();if(R)return r0(R.sanitize(mp.RESOURCE_URL,E)||"");if(sb(E,"ResourceURL"))return r0(nf(E));throw new Fo(904,!1)}function db(E,R,j){return function zd(E,R){return"src"===R&&("embed"===E||"frame"===E||"iframe"===E||"media"===E||"script"===E)||"href"===R&&("base"===E||"link"===E)?Tv:_c}(R,j)(E)}function Dv(){const E=Ho();return E&&E[oh].sanitizer}const AT=/^>|^->|<!--|-->|--!>|<!-$/g,GC=/(<|>)/g,s0="\u200b$1\u200b";function Xc(E){return E.ownerDocument.defaultView}function Rl(E){return E instanceof Function?E():E}var OE=function(E){return E[E.Important=1]="Important",E[E.DashCase=2]="DashCase",E}(OE||{});let Yc;function MT(E,R){return Yc(E,R)}function Ns(E,R,j,ne,me){if(null!=ne){let Ie,je=!1;Ul(ne)?Ie=ne:sl(ne)&&(je=!0,ne=ne[vl]);const at=ha(ne);0===E&&null!==j?null==me?WC(R,j,at):om(R,j,at,me||null,!0):1===E&&null!==j?om(R,j,at,me||null,!0):2===E?function jC(E,R,j){const ne=Bi(E,R);ne&&function yb(E,R,j,ne){E.removeChild(R,j,ne)}(E,ne,R,j)}(R,at,je):3===E&&R.destroyNode(at),null!=Ie&&function KL(E,R,j,ne,me){const Ie=j[ku];Ie!==ha(j)&&Ns(R,E,ne,Ie,me);for(let at=il;at<j.length;at++){const _t=j[at];xb(_t[Or],_t,E,R,ne,Ie)}}(R,E,Ie,j,me)}}function mb(E,R){return E.createComment(function xE(E){return E.replace(AT,R=>R.replace(GC,s0))}(R))}function nm(E,R,j){return E.createElement(R,j)}function RT(E,R){R[oh].changeDetectionScheduler?.notify(8),xb(E,R,R[Is],2,null,null)}function kT(E,R){const j=E[Lu],ne=R[ra];(sl(ne)||R[Ol]!==ne[ra][Ol])&&(E[ts]|=Wg.HasTransplantedViews),null===j?E[Lu]=[R]:j.push(R)}function vb(E,R){const j=E[Lu],ne=j.indexOf(R);j.splice(ne,1)}function u_(E,R){if(E.length<=il)return;const j=il+R,ne=E[j];if(ne){const me=ne[ap];null!==me&&me!==E&&vb(me,ne),R>0&&(E[j-1][Td]=ne[Td]);const Ie=Pg(E,il+R);!function Zc(E,R){RT(E,R),R[vl]=null,R[Zl]=null}(ne[Or],ne);const je=Ie[sh];null!==je&&je.detachView(Ie[Or]),ne[ra]=null,ne[Td]=null,ne[ts]&=-129}return ne}function wE(E,R){if(!(256&R[ts])){const j=R[Is];j.destroyNode&&xb(E,R,j,3,null,null),function no(E){let R=E[rp];if(!R)return TE(E[Or],E);for(;R;){let j=null;if(sl(R))j=R[rp];else{const ne=R[il];ne&&(j=ne)}if(!j){for(;R&&!R[Td]&&R!==E;)sl(R)&&TE(R[Or],R),R=R[ra];null===R&&(R=E),sl(R)&&TE(R[Or],R),j=R&&R[Td]}R=j}}(R)}}function TE(E,R){if(256&R[ts])return;const j=S(null);try{R[ts]&=-129,R[ts]|=256,R[Ha]&&C(R[Ha]),function md(E,R){let j;if(null!=E&&null!=(j=E.destroyHooks))for(let ne=0;ne<j.length;ne+=2){const me=R[j[ne]];if(!(me instanceof Ui)){const Ie=j[ne+1];if(Array.isArray(Ie))for(let je=0;je<Ie.length;je+=2){const at=me[Ie[je]],_t=Ie[je+1];$c(4,at,_t);try{_t.call(at)}finally{$c(5,at,_t)}}else{$c(4,me,Ie);try{Ie.call(me)}finally{$c(5,me,Ie)}}}}}(E,R),function gM(E,R){const j=E.cleanup,ne=R[Yp];if(null!==j)for(let Ie=0;Ie<j.length-1;Ie+=2)if("string"==typeof j[Ie]){const je=j[Ie+3];je>=0?ne[je]():ne[-je].unsubscribe(),Ie+=2}else j[Ie].call(ne[j[Ie+1]]);null!==ne&&(R[Yp]=null);const me=R[cp];if(null!==me){R[cp]=null;for(let Ie=0;Ie<me.length;Ie++)(0,me[Ie])()}}(E,R),1===R[Or].type&&R[Is].destroy();const ne=R[ap];if(null!==ne&&Ul(R[ra])){ne!==R[ra]&&vb(ne,R);const me=R[sh];null!==me&&me.detachView(E)}!function Yy(E){rT.delete(E[lp])}(R)}finally{S(j)}}function Cb(E,R,j){return function im(E,R,j){let ne=R;for(;null!==ne&&168&ne.type;)ne=(R=ne).parent;if(null===ne)return j[vl];{const{componentOffset:me}=ne;if(me>-1){const{encapsulation:Ie}=E.data[ne.directiveStart+me];if(Ie===Ed.None||Ie===Ed.Emulated)return null}return nt(ne,j)}}(E,R.parent,j)}function om(E,R,j,ne,me){E.insertBefore(R,j,ne,me)}function WC(E,R,j){E.appendChild(R,j)}function LT(E,R,j,ne,me){null!==ne?om(E,R,j,ne,me):WC(E,R,j)}function Bi(E,R){return E.parentNode(R)}function fM(E,R,j){return BT(E,R,j)}let c0,BT=function Lh(E,R,j){return 40&E.type?nt(E,j):null};function rm(E,R,j,ne){const me=Cb(E,ne,R),Ie=R[Is],at=fM(ne.parent||R[Zl],ne,R);if(null!=me)if(Array.isArray(j))for(let _t=0;_t<j.length;_t++)LT(Ie,me,j[_t],at,!1);else LT(Ie,me,j,at,!1);void 0!==c0&&c0(Ie,ne,R,j,me)}function $C(E,R){if(null!==R){const j=R.type;if(3&j)return nt(R,E);if(4&j)return AE(-1,E[R.index]);if(8&j){const ne=R.child;if(null!==ne)return $C(E,ne);{const me=E[R.index];return Ul(me)?AE(-1,me):ha(me)}}if(32&j)return MT(R,E)()||ha(E[R.index]);{const ne=h_(E,R);return null!==ne?Array.isArray(ne)?ne[0]:$C(ol(E[Ol]),ne):$C(E,R.next)}}return null}function h_(E,R){return null!==R?E[Ol][Zl].projection[R.projection]:null}function AE(E,R){const j=il+E+1;if(j<R.length){const ne=R[j],me=ne[Or].firstChild;if(null!==me)return $C(ne,me)}return R[ku]}function Av(E,R,j,ne,me,Ie,je){for(;null!=j;){if(128===j.type){j=j.next;continue}const at=ne[j.index],_t=j.type;if(je&&0===R&&(at&&Pd(ha(at),ne),j.flags|=2),32&~j.flags)if(8&_t)Av(E,R,j.child,ne,me,Ie,!1),Ns(R,E,me,at,Ie);else if(32&_t){const tn=MT(j,ne);let wn;for(;wn=tn();)Ns(R,E,me,wn,Ie);Ns(R,E,me,at,Ie)}else 16&_t?FT(E,R,ne,j,me,Ie):Ns(R,E,me,at,Ie);j=je?j.projectionNext:j.next}}function xb(E,R,j,ne,me,Ie){Av(j,ne,E.firstChild,R,me,Ie,!1)}function FT(E,R,j,ne,me,Ie){const je=j[Ol],_t=je[Zl].projection[ne.projection];if(Array.isArray(_t))for(let tn=0;tn<_t.length;tn++)Ns(R,E,me,_t[tn],Ie);else{let tn=_t;const wn=je[ra];cE(ne)&&(tn.flags|=128),Av(E,R,tn,wn,me,Ie,!0)}}function VT(E,R,j){""===j?E.removeAttribute(R,"class"):E.setAttribute(R,"class",j)}function Eb(E,R,j){const{mergedAttrs:ne,classes:me,styles:Ie}=j;null!==ne&&kg(E,R,ne),null!==me&&VT(E,R,me),null!==Ie&&function Sb(E,R,j){E.setAttribute(R,"style",j)}(E,R,Ie)}const da={};function u0(E=1){h0(ks(),Ho(),Ad()+E,!1)}function h0(E,R,j,ne){if(!ne)if(3&~R[ts]){const Ie=E.preOrderHooks;null!==Ie&&it(R,Ie,0,j)}else{const Ie=E.preOrderCheckHooks;null!==Ie&&Qe(R,Ie,j)}Ym(j)}function KC(E,R=Ls.Default){const j=Ho();return null===j?Vs(E,R):eE(ba(),j,$r(E),R)}function IE(){throw new Error("invalid")}function PE(E,R,j,ne,me,Ie){const je=S(null);try{let at=null;me&ld.SignalBased&&(at=R[ne][f]),null!==at&&void 0!==at.transformFn&&(Ie=at.transformFn(Ie)),me&ld.HasDecoratorInputTransform&&(Ie=E.inputTransforms[ne].call(R,Ie)),null!==E.setInput?E.setInput(R,at,Ie,j,ne):jm(R,at,ne,Ie)}finally{S(je)}}function XC(E,R,j,ne,me,Ie,je,at,_t,tn,wn){const di=R.blueprint.slice();return di[vl]=me,di[ts]=204|ne,(null!==tn||E&&2048&E[ts])&&(di[ts]|=2048),Ar(di),di[ra]=di[sp]=E,di[qa]=j,di[oh]=je||E&&E[oh],di[Is]=at||E&&E[Is],di[Ql]=_t||E&&E[Ql]||null,di[Zl]=Ie,di[lp]=function Xy(){return WP++}(),di[cc]=wn,di[Gf]=tn,di[Ol]=2==R.type?E[Ol]:di,di}function df(E,R,j,ne,me){let Ie=E.data[R];if(null===Ie)Ie=function ME(E,R,j,ne,me){const Ie=qp(),je=Fd(),_t=E.data[R]=function p_(E,R,j,ne,me,Ie){let je=R?R.injectorIndex:-1,at=0;return fc()&&(at|=128),{type:j,index:ne,insertBeforeIndex:null,injectorIndex:je,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:at,providerIndexes:0,value:me,attrs:Ie,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:R,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,je?Ie:Ie&&Ie.parent,j,R,ne,me);return null===E.firstChild&&(E.firstChild=_t),null!==Ie&&(je?null==Ie.child&&null!==_t.parent&&(Ie.child=_t):null===Ie.next&&(Ie.next=_t,_t.prev=Ie)),_t}(E,R,j,ne,me),function TC(){return ns.lFrame.inI18n}()&&(Ie.flags|=32);else if(64&Ie.type){Ie.type=j,Ie.value=ne,Ie.attrs=me;const je=function su(){const E=ns.lFrame,R=E.currentTNode;return E.isParent?R:R.parent}();Ie.injectorIndex=null===je?-1:je.injectorIndex}return mc(Ie,!0),Ie}function Ob(E,R,j,ne){if(0===j)return-1;const me=R.length;for(let Ie=0;Ie<j;Ie++)R.push(ne),E.blueprint.push(ne),E.data.push(null);return me}function p0(E,R,j,ne,me){const Ie=Ad(),je=2&ne;try{Ym(-1),je&&R.length>ss&&h0(E,R,ss,!1),$c(je?2:0,me),j(ne,me)}finally{Ym(Ie),$c(je?3:1,me)}}function RE(E,R,j){if(Vm(R)){const ne=S(null);try{const Ie=R.directiveEnd;for(let je=R.directiveStart;je<Ie;je++){const at=E.data[je];at.contentQueries&&at.contentQueries(1,j[je],je)}}finally{S(ne)}}}function _M(E,R,j){Sc()&&(function gu(E,R,j,ne){const me=j.directiveStart,Ie=j.directiveEnd;Dd(j)&&function NE(E,R,j){const ne=nt(R,E),me=UT(j);let je=16;j.signals?je=4096:j.onPush&&(je=64);const at=Gu(E,XC(E,me,null,je,ne,R,null,E[oh].rendererFactory.createRenderer(ne,j),null,null,null));E[R.index]=at}(R,j,E.data[me+j.componentOffset]),E.firstCreatePass||JS(j,R),Pd(ne,R);const je=j.initialInputs;for(let at=me;at<Ie;at++){const _t=E.data[at],tn=PC(R,E,at,j);Pd(tn,R),null!==je&&am(0,at-me,tn,_t,0,je),Bu(_t)&&(bo(j.index,R)[qa]=PC(R,E,at,j))}}(E,R,j,nt(j,R)),!(64&~j.flags)&&fu(E,R,j))}function HT(E,R,j=nt){const ne=R.localNames;if(null!==ne){let me=R.index+1;for(let Ie=0;Ie<ne.length;Ie+=2){const je=ne[Ie+1],at=-1===je?j(R,E):E[je];E[me++]=at}}}function UT(E){const R=E.tView;return null===R||R.incompleteFirstPass?E.tView=kE(1,null,E.template,E.decls,E.vars,E.directiveDefs,E.pipeDefs,E.viewQuery,E.schemas,E.consts,E.id):R}function kE(E,R,j,ne,me,Ie,je,at,_t,tn,wn){const di=ss+ne,zi=di+me,Zi=function Qc(E,R){const j=[];for(let ne=0;ne<R;ne++)j.push(ne<E?null:da);return j}(di,zi),yo="function"==typeof tn?tn():tn;return Zi[Or]={type:E,blueprint:Zi,template:j,queries:null,viewQuery:at,declTNode:R,data:Zi.slice().fill(null,di),bindingStartIndex:di,expandoStartIndex:zi,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof Ie?Ie():Ie,pipeRegistry:"function"==typeof je?je():je,firstChild:null,schemas:_t,consts:yo,incompleteFirstPass:!1,ssrId:wn}}let Pv=()=>null;function LE(E,R,j,ne,me){for(let Ie in R){if(!R.hasOwnProperty(Ie))continue;const je=R[Ie];if(void 0===je)continue;ne??={};let at,_t=ld.None;Array.isArray(je)?(at=je[0],_t=je[1]):at=je;let tn=Ie;if(null!==me){if(!me.hasOwnProperty(Ie))continue;tn=me[Ie]}0===E?dh(ne,j,tn,at,_t):dh(ne,j,tn,at)}return ne}function dh(E,R,j,ne,me){let Ie;E.hasOwnProperty(j)?(Ie=E[j]).push(R,ne):Ie=E[j]=[R,ne],void 0!==me&&Ie.push(me)}function Bh(E,R,j,ne,me,Ie,je,at){const _t=nt(R,j);let wn,tn=R.inputs;!at&&null!=tn&&(wn=tn[ne])?(hh(E,j,wn,ne,me),Dd(R)&&function GT(E,R){const j=bo(R,E);16&j[ts]||(j[ts]|=64)}(j,R.index)):3&R.type&&(ne=function CM(E){return"class"===E?"className":"for"===E?"htmlFor":"formaction"===E?"formAction":"innerHtml"===E?"innerHTML":"readonly"===E?"readOnly":"tabindex"===E?"tabIndex":E}(ne),me=null!=je?je(me,R.value||"",ne):me,Ie.setProperty(_t,ne,me))}function Nh(E,R,j,ne){if(Sc()){const me=null===ne?null:{"":-1},Ie=function vp(E,R){const j=E.directiveRegistry;let ne=null,me=null;if(j)for(let Ie=0;Ie<j.length;Ie++){const je=j[Ie];if(km(R,je.selectors,!1))if(ne||(ne=[]),Bu(je))if(null!==je.findHostDirectiveDefs){const at=[];me=me||new Map,je.findHostDirectiveDefs(je,at,me),ne.unshift(...at,je),Rv(E,R,at.length)}else ne.unshift(je),Rv(E,R,0);else me=me||new Map,je.findHostDirectiveDefs?.(je,ne,me),ne.push(je)}return null===ne?null:[ne,me]}(E,j);let je,at;null===Ie?je=at=null:[je,at]=Ie,null!==je&&_p(E,R,j,je,me,at),me&&function YC(E,R,j){if(R){const ne=E.localNames=[];for(let me=0;me<R.length;me+=2){const Ie=j[R[me+1]];if(null==Ie)throw new Fo(-301,!1);ne.push(R[me],Ie)}}}(j,ne,me)}j.mergedAttrs=Lg(j.mergedAttrs,j.attrs)}function _p(E,R,j,ne,me,Ie){for(let tn=0;tn<ne.length;tn++)qS(JS(j,R),E,ne[tn].type);!function WT(E,R,j){E.flags|=1,E.directiveStart=R,E.directiveEnd=R+j,E.providerIndexes=R}(j,E.data.length,ne.length);for(let tn=0;tn<ne.length;tn++){const wn=ne[tn];wn.providersResolver&&wn.providersResolver(wn)}let je=!1,at=!1,_t=Ob(E,R,ne.length,null);for(let tn=0;tn<ne.length;tn++){const wn=ne[tn];j.mergedAttrs=Lg(j.mergedAttrs,wn.hostAttrs),Tb(E,j,R,_t,wn),BE(_t,wn,me),null!==wn.contentQueries&&(j.flags|=4),(null!==wn.hostBindings||null!==wn.hostAttrs||0!==wn.hostVars)&&(j.flags|=64);const di=wn.type.prototype;!je&&(di.ngOnChanges||di.ngOnInit||di.ngDoCheck)&&((E.preOrderHooks??=[]).push(j.index),je=!0),!at&&(di.ngOnChanges||di.ngDoCheck)&&((E.preOrderCheckHooks??=[]).push(j.index),at=!0),_t++}!function zu(E,R,j){const me=R.directiveEnd,Ie=E.data,je=R.attrs,at=[];let _t=null,tn=null;for(let wn=R.directiveStart;wn<me;wn++){const di=Ie[wn],zi=j?j.get(di):null,yo=zi?zi.outputs:null;_t=LE(0,di.inputs,wn,_t,zi?zi.inputs:null),tn=LE(1,di.outputs,wn,tn,yo);const qo=null===_t||null===je||bc(R)?null:$T(_t,wn,je);at.push(qo)}null!==_t&&(_t.hasOwnProperty("class")&&(R.flags|=8),_t.hasOwnProperty("style")&&(R.flags|=16)),R.initialInputs=at,R.inputs=_t,R.outputs=tn}(E,j,Ie)}function fu(E,R,j){const ne=j.directiveStart,me=j.directiveEnd,Ie=j.index,je=function De(){return ns.lFrame.currentDirectiveIndex}();try{Ym(Ie);for(let at=ne;at<me;at++){const _t=E.data[at],tn=R[at];Li(at),(null!==_t.hostBindings||0!==_t.hostVars||null!==_t.hostAttrs)&&g0(_t,tn)}}finally{Ym(-1),Li(je)}}function g0(E,R){null!==E.hostBindings&&E.hostBindings(1,R)}function Rv(E,R,j){R.componentOffset=j,(E.components??=[]).push(R.index)}function BE(E,R,j){if(j){if(R.exportAs)for(let ne=0;ne<R.exportAs.length;ne++)j[R.exportAs[ne]]=E;Bu(R)&&(j[""]=E)}}function Tb(E,R,j,ne,me){E.data[ne]=me;const Ie=me.factory||(me.factory=Eh(me.type)),je=new Ui(Ie,Bu(me),KC);E.blueprint[ne]=je,j[ne]=je,function Dc(E,R,j,ne,me){const Ie=me.hostBindings;if(Ie){let je=E.hostBindingOpCodes;null===je&&(je=E.hostBindingOpCodes=[]);const at=~R.index;(function Mv(E){let R=E.length;for(;R>0;){const j=E[--R];if("number"==typeof j&&j<0)return j}return 0})(je)!=at&&je.push(at),je.push(j,ne,Ie)}}(E,R,ne,Ob(E,j,me.hostVars,da),me)}function lg(E,R,j,ne,me,Ie){const je=nt(E,R);!function f0(E,R,j,ne,me,Ie,je){if(null==Ie)E.removeAttribute(R,me,j);else{const at=null==je?St(Ie):je(Ie,ne||"",me);E.setAttribute(R,me,at,j)}}(R[Is],je,Ie,E.value,j,ne,me)}function am(E,R,j,ne,me,Ie){const je=Ie[R];if(null!==je)for(let at=0;at<je.length;)PE(ne,j,je[at++],je[at++],je[at++],je[at++])}function $T(E,R,j){let ne=null,me=0;for(;me<j.length;){const Ie=j[me];if(0!==Ie)if(5!==Ie){if("number"==typeof Ie)break;if(E.hasOwnProperty(Ie)){null===ne&&(ne=[]);const je=E[Ie];for(let at=0;at<je.length;at+=3)if(je[at]===R){ne.push(Ie,je[at+1],je[at+2],j[me+1]);break}}me+=2}else me+=2;else me+=4}return ne}function FE(E,R,j,ne){return[E,!0,0,R,null,ne,null,j,null,null]}function ZC(E,R){const j=E.contentQueries;if(null!==j){const ne=S(null);try{for(let me=0;me<j.length;me+=2){const je=j[me+1];if(-1!==je){const at=E.data[je];Vn(j[me]),at.contentQueries(2,R[je],je)}}}finally{S(ne)}}}function Gu(E,R){return E[rp]?E[sv][Td]=R:E[rp]=R,E[sv]=R,R}function hf(E,R,j){Vn(0);const ne=S(null);try{R(E,j)}finally{S(ne)}}function QC(E){return E[Yp]??=[]}function Db(E){return E.cleanup??=[]}function uh(E,R){const j=E[Ql],ne=j?j.get(Jg,null):null;ne&&ne.handleError(R)}function hh(E,R,j,ne,me){for(let Ie=0;Ie<j.length;){const je=j[Ie++],at=j[Ie++],_t=j[Ie++];PE(E.data[je],R[je],ne,at,_t,me)}}function pf(E,R,j){const ne=Sn(R,E);!function pM(E,R,j){E.setValue(R,j)}(E[Is],ne,j)}function XL(E,R){const j=bo(R,E),ne=j[Or];!function jT(E,R){for(let j=R.length;j<E.blueprint.length;j++)R.push(E.blueprint[j])}(ne,j);const me=j[vl];null!==me&&null===j[cc]&&(j[cc]=CT(me,j[Ql])),bM(ne,j,j[qa])}function bM(E,R,j){ng(R);try{const ne=E.viewQuery;null!==ne&&hf(1,ne,j);const me=E.template;null!==me&&p0(E,R,me,1,j),E.firstCreatePass&&(E.firstCreatePass=!1),R[sh]?.finishViewCreation(E),E.staticContentQueries&&ZC(E,R),E.staticViewQueries&&hf(2,E.viewQuery,j);const Ie=E.components;null!==Ie&&function XV(E,R){for(let j=0;j<R.length;j++)XL(E,R[j])}(R,Ie)}catch(ne){throw E.firstCreatePass&&(E.incompleteFirstPass=!0,E.firstCreatePass=!1),ne}finally{R[ts]&=-5,XS()}}function lm(E,R,j,ne){const me=S(null);try{const Ie=R.tView,_t=XC(E,Ie,j,4096&E[ts]?4096:16,null,R,null,null,ne?.injector??null,ne?.embeddedViewInjector??null,ne?.dehydratedView??null);_t[ap]=E[R.index];const wn=E[sh];return null!==wn&&(_t[sh]=wn.createEmbeddedView(Ie)),bM(Ie,_t,j),_t}finally{S(me)}}function g_(E,R){const j=il+R;if(j<E.length)return E[j]}function Hc(E,R){return!R||null===R.firstChild||cE(E)}function cm(E,R,j,ne=!0){const me=R[Or];if(function l0(E,R,j,ne){const me=il+ne,Ie=j.length;ne>0&&(j[me-1][Td]=R),ne<Ie-il?(R[Td]=j[me],rd(j,il+ne,R)):(j.push(R),R[Td]=null),R[ra]=j;const je=R[ap];null!==je&&j!==je&&kT(je,R);const at=R[sh];null!==at&&at.insertView(E),al(R),R[ts]|=128}(me,R,E,j),ne){const je=AE(j,E),at=R[Is],_t=Bi(at,E[ku]);null!==_t&&function _b(E,R,j,ne,me,Ie){ne[vl]=me,ne[Zl]=R,xb(E,ne,j,1,me,Ie)}(me,E[Zl],at,R,_t,je)}const Ie=R[cc];null!==Ie&&null!==Ie.firstChild&&(Ie.firstChild=null)}function VE(E,R){const j=u_(E,R);return void 0!==j&&wE(j[Or],j),j}function pl(E,R,j,ne,me=!1){for(;null!==j;){if(128===j.type){j=me?j.projectionNext:j.next;continue}const Ie=R[j.index];null!==Ie&&ne.push(ha(Ie)),Ul(Ie)&&kv(Ie,ne);const je=j.type;if(8&je)pl(E,R,j.child,ne);else if(32&je){const at=MT(j,R);let _t;for(;_t=at();)ne.push(_t)}else if(16&je){const at=h_(R,j);if(Array.isArray(at))ne.push(...at);else{const _t=ol(R[Ol]);pl(_t[Or],_t,at,ne,!0)}}j=me?j.projectionNext:j.next}return ne}function kv(E,R){for(let j=il;j<E.length;j++){const ne=E[j],me=ne[Or].firstChild;null!==me&&pl(ne[Or],ne,me,R)}E[ku]!==E[vl]&&R.push(E[ku])}let Ea=[];const UE={...c,consumerIsAlwaysLive:!0,consumerMarkedDirty:E=>{Js(E.lView)},consumerOnSignalRead(){this.lView[Ha]=this}},YT={...c,consumerIsAlwaysLive:!0,consumerMarkedDirty:E=>{let R=ol(E.lView);for(;R&&!_0(R[Or]);)R=ol(R);R&&Us(R)},consumerOnSignalRead(){this.lView[Ha]=this}};function _0(E){return 2!==E.type}const JC=100;function qC(E,R=!0,j=0){const ne=E[oh],me=ne.rendererFactory;me.begin?.();try{!function zE(E,R){const j=ec();try{Ec(!0),WE(E,R);let ne=0;for(;Ds(E);){if(ne===JC)throw new Fo(103,!1);ne++,WE(E,1)}}finally{Ec(j)}}(E,j)}catch(je){throw R&&uh(E,je),je}finally{me.end?.(),ne.inlineEffectRunner?.flush()}}function v0(E,R,j,ne){const me=R[ts];if(!(256&~me))return;R[oh].inlineEffectRunner?.flush(),ng(R);let at=!0,_t=null,tn=null;_0(E)?(tn=function gf(E){return E[Ha]??function KT(E){const R=Ea.pop()??Object.create(UE);return R.lView=E,R}(E)}(R),_t=x(tn)):null===function T(){return o}()?(at=!1,tn=function XT(E){const R=E[Ha]??Object.create(YT);return R.lView=E,R}(R),_t=x(tn)):R[Ha]&&(C(R[Ha]),R[Ha]=null);try{Ar(R),function Fu(E){return ns.lFrame.bindingIndex=E}(E.bindingStartIndex),null!==j&&p0(E,R,j,2,ne);const wn=!(3&~me);if(wn){const Zi=E.preOrderCheckHooks;null!==Zi&&Qe(R,Zi,null)}else{const Zi=E.preOrderHooks;null!==Zi&&it(R,Zi,0,null),xt(R,0)}if(function Cp(E){for(let R=ZP(E);null!==R;R=QP(R)){if(!(R[ts]&Wg.HasTransplantedViews))continue;const j=R[Lu];for(let ne=0;ne<j.length;ne++)Us(j[ne])}}(R),Fh(R,0),null!==E.contentQueries&&ZC(E,R),wn){const Zi=E.contentCheckHooks;null!==Zi&&Qe(R,Zi)}else{const Zi=E.contentHooks;null!==Zi&&it(R,Zi,1),xt(R,1)}!function Iv(E,R){const j=E.hostBindingOpCodes;if(null!==j)try{for(let ne=0;ne<j.length;ne++){const me=j[ne];if(me<0)Ym(~me);else{const Ie=me,je=j[++ne],at=j[++ne];tg(je,Ie),at(2,R[Ie])}}}finally{Ym(-1)}}(E,R);const di=E.components;null!==di&&Wd(R,di,0);const zi=E.viewQuery;if(null!==zi&&hf(2,zi,ne),wn){const Zi=E.viewCheckHooks;null!==Zi&&Qe(R,Zi)}else{const Zi=E.viewHooks;null!==Zi&&it(R,Zi,2),xt(R,2)}if(!0===E.firstUpdatePass&&(E.firstUpdatePass=!1),R[ou]){for(const Zi of R[ou])Zi();R[ou]=null}R[ts]&=-73}catch(wn){throw Js(R),wn}finally{null!==tn&&(w(tn,_t),at&&function HE(E){E.lView[Ha]!==E&&(E.lView=null,Ea.push(E))}(tn)),XS()}}function Fh(E,R){for(let j=ZP(E);null!==j;j=QP(j))for(let ne=il;ne<j.length;ne++)SM(j[ne],R)}function xM(E,R,j){SM(bo(R,E),j)}function SM(E,R){ir(E)&&WE(E,R)}function WE(E,R){const ne=E[Or],me=E[ts],Ie=E[Ha];let je=!!(0===R&&16&me);if(je||=!!(64&me&&0===R),je||=!!(1024&me),je||=!(!Ie?.dirty||!D(Ie)),je||=!1,Ie&&(Ie.dirty=!1),E[ts]&=-9217,je)v0(ne,E,ne.template,E[qa]);else if(8192&me){Fh(E,1);const at=ne.components;null!==at&&Wd(E,at,1)}}function Wd(E,R,j){for(let ne=0;ne<R.length;ne++)xM(E,R[ne],j)}function Ib(E,R){const j=ec()?64:1088;for(E[oh].changeDetectionScheduler?.notify(R);E;){E[ts]|=j;const ne=ol(E);if(ah(E)&&!ne)return E;E=ne}return null}class Pb{get rootNodes(){const R=this._lView,j=R[Or];return pl(j,R,j.firstChild,[])}constructor(R,j,ne=!0){this._lView=R,this._cdRefInjectingView=j,this.notifyErrorHandler=ne,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[qa]}set context(R){this._lView[qa]=R}get destroyed(){return!(256&~this._lView[ts])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const R=this._lView[ra];if(Ul(R)){const j=R[8],ne=j?j.indexOf(this):-1;ne>-1&&(u_(R,ne),Pg(j,ne))}this._attachedToViewContainer=!1}wE(this._lView[Or],this._lView)}onDestroy(R){Ra(this._lView,R)}markForCheck(){Ib(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[ts]&=-129}reattach(){al(this._lView),this._lView[ts]|=128}detectChanges(){this._lView[ts]|=1024,qC(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Fo(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const R=ah(this._lView),j=this._lView[ap];null!==j&&!R&&vb(j,this._lView),RT(this._lView[Or],this._lView)}attachToAppRef(R){if(this._attachedToViewContainer)throw new Fo(902,!1);this._appRef=R;const j=ah(this._lView),ne=this._lView[ap];null!==ne&&!j&&kT(ne,this._lView),al(this._lView)}}let Mb=(()=>{class E{static{this.__NG_ELEMENT_ID__=Rb}}return E})();const ff=Mb,$E=class extends ff{constructor(R,j,ne){super(),this._declarationLView=R,this._declarationTContainer=j,this.elementRef=ne}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(R,j){return this.createEmbeddedViewImpl(R,j)}createEmbeddedViewImpl(R,j,ne){const me=lm(this._declarationLView,this._declarationTContainer,R,{embeddedViewInjector:j,dehydratedView:ne});return new Pb(me)}};function Rb(){return f_(ba(),Ho())}function f_(E,R){return 4&E.type?new $E(R,E,Ky(E,R)):null}let QE=()=>null;function qc(E,R){return QE(E,R)}class _u{}const $u=new Ji("",{providedIn:"root",factory:()=>!1}),mD=new Ji("");class hg{}class vf{}class Cu{resolveComponentFactory(R){throw function vu(E){const R=Error(`No component factory found for ${Go(E)}.`);return R.ngComponent=E,R}(R)}}class ju{static{this.NULL=new Cu}}class v_{}let Vv=(()=>{class E{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function kM(){const E=Ho(),j=bo(ba().index,E);return(sl(j)?j:E)[Is]}()}}return E})(),Ub=(()=>{class E{static{this.\u0275prov=ft({token:E,providedIn:"root",factory:()=>null})}}return E})();const qE=new Set;function _d(E){qE.has(E)||(qE.add(E),performance?.mark?.("mark_feature_usage",{detail:{feature:E}}))}function _D(E){let R=!0;return setTimeout(()=>{R&&(R=!1,E())}),"function"==typeof vi.requestAnimationFrame&&vi.requestAnimationFrame(()=>{R&&(R=!1,E())}),()=>{R=!1}}function eO(E){let R=!0;return queueMicrotask(()=>{R&&E()}),()=>{R=!1}}function O0(...E){}class bl{constructor({enableLongStackTrace:R=!1,shouldCoalesceEventChangeDetection:j=!1,shouldCoalesceRunChangeDetection:ne=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Kf(!1),this.onMicrotaskEmpty=new Kf(!1),this.onStable=new Kf(!1),this.onError=new Kf(!1),typeof Zone>"u")throw new Fo(908,!1);Zone.assertZonePatched();const me=this;me._nesting=0,me._outer=me._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(me._inner=me._inner.fork(new Zone.TaskTrackingZoneSpec)),R&&Zone.longStackTraceZoneSpec&&(me._inner=me._inner.fork(Zone.longStackTraceZoneSpec)),me.shouldCoalesceEventChangeDetection=!ne&&j,me.shouldCoalesceRunChangeDetection=ne,me.callbackScheduled=!1,function T0(E){const R=()=>{!function lB(E){E.isCheckStableRunning||E.callbackScheduled||(E.callbackScheduled=!0,Zone.root.run(()=>{_D(()=>{E.callbackScheduled=!1,C_(E),E.isCheckStableRunning=!0,Hv(E),E.isCheckStableRunning=!1})}),C_(E))}(E)};E._inner=E._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(j,ne,me,Ie,je,at)=>{if(function qs(E){return fm(E,"__ignore_ng_zone__")}(at))return j.invokeTask(me,Ie,je,at);try{return LM(E),j.invokeTask(me,Ie,je,at)}finally{(E.shouldCoalesceEventChangeDetection&&"eventTask"===Ie.type||E.shouldCoalesceRunChangeDetection)&&R(),D0(E)}},onInvoke:(j,ne,me,Ie,je,at,_t)=>{try{return LM(E),j.invoke(me,Ie,je,at,_t)}finally{E.shouldCoalesceRunChangeDetection&&!E.callbackScheduled&&!function CD(E){return fm(E,"__scheduler_tick__")}(at)&&R(),D0(E)}},onHasTask:(j,ne,me,Ie)=>{j.hasTask(me,Ie),ne===me&&("microTask"==Ie.change?(E._hasPendingMicrotasks=Ie.microTask,C_(E),Hv(E)):"macroTask"==Ie.change&&(E.hasPendingMacrotasks=Ie.macroTask))},onHandleError:(j,ne,me,Ie)=>(j.handleError(me,Ie),E.runOutsideAngular(()=>E.onError.emit(Ie)),!1)})}(me)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!bl.isInAngularZone())throw new Fo(909,!1)}static assertNotInAngularZone(){if(bl.isInAngularZone())throw new Fo(909,!1)}run(R,j,ne){return this._inner.run(R,j,ne)}runTask(R,j,ne,me){const Ie=this._inner,je=Ie.scheduleEventTask("NgZoneEvent: "+me,R,w0,O0,O0);try{return Ie.runTask(je,j,ne)}finally{Ie.cancelTask(je)}}runGuarded(R,j,ne){return this._inner.runGuarded(R,j,ne)}runOutsideAngular(R){return this._outer.run(R)}}const w0={};function Hv(E){if(0==E._nesting&&!E.hasPendingMicrotasks&&!E.isStable)try{E._nesting++,E.onMicrotaskEmpty.emit(null)}finally{if(E._nesting--,!E.hasPendingMicrotasks)try{E.runOutsideAngular(()=>E.onStable.emit(null))}finally{E.isStable=!0}}}function C_(E){E.hasPendingMicrotasks=!!(E._hasPendingMicrotasks||(E.shouldCoalesceEventChangeDetection||E.shouldCoalesceRunChangeDetection)&&!0===E.callbackScheduled)}function LM(E){E._nesting++,E.isStable&&(E.isStable=!1,E.onUnstable.emit(null))}function D0(E){E._nesting--,Hv(E)}class A0{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Kf,this.onMicrotaskEmpty=new Kf,this.onStable=new Kf,this.onError=new Kf}run(R,j,ne){return R.apply(j,ne)}runGuarded(R,j,ne){return R.apply(j,ne)}runOutsideAngular(R){return R()}runTask(R,j,ne,me){return R.apply(j,ne)}}function fm(E,R){return!(!Array.isArray(E)||1!==E.length)&&!0===E[0]?.data?.[R]}var Ac=function(E){return E[E.EarlyRead=0]="EarlyRead",E[E.Write=1]="Write",E[E.MixedReadWrite=2]="MixedReadWrite",E[E.Read=3]="Read",E}(Ac||{});const y_={destroy(){}};function tO(E,R){!R&&Ru();const j=R?.injector??mr(uc);return function Gd(E){return"browser"===(E??mr(uc)).get(BC)}(j)?(_d("NgAfterNextRender"),function nO(E,R,j,ne){const me=function Hh(E,R){if(E instanceof Function)switch(R){case Ac.EarlyRead:return{earlyRead:E};case Ac.Write:return{write:E};case Ac.MixedReadWrite:return{mixedReadWrite:E};case Ac.Read:return{read:E}}return E}(E,ne),Ie=R.get(zb),je=Ie.handler??=new qV,at=[],_t=[],tn=()=>{for(const Zi of _t)je.unregister(Zi);wn()},wn=R.get(RC).onDestroy(tn);let di=0;const zi=(Zi,yo)=>{if(!yo)return;const qo=j?(...Br)=>(di--,di<1&&tn(),yo(...Br)):yo,Tr=iv(R,()=>new JV(Zi,at,qo));je.register(Tr),_t.push(Tr),di++};return zi(Ac.EarlyRead,me.earlyRead),zi(Ac.Write,me.write),zi(Ac.MixedReadWrite,me.mixedReadWrite),zi(Ac.Read,me.read),{destroy:tn}}(E,j,!0,R?.phase??Ac.MixedReadWrite)):y_}class JV{constructor(R,j,ne){this.phase=R,this.pipelinedArgs=j,this.callbackFn=ne,this.zone=mr(bl),this.errorHandler=mr(Jg,{optional:!0}),mr(_u,{optional:!0})?.notify(6)}invoke(){try{const R=this.zone.runOutsideAngular(()=>this.callbackFn.apply(null,this.pipelinedArgs));this.pipelinedArgs.splice(0,this.pipelinedArgs.length,R)}catch(R){this.errorHandler?.handleError(R)}}}class qV{constructor(){this.executingCallbacks=!1,this.buckets={[Ac.EarlyRead]:new Set,[Ac.Write]:new Set,[Ac.MixedReadWrite]:new Set,[Ac.Read]:new Set},this.deferredCallbacks=new Set}register(R){(this.executingCallbacks?this.deferredCallbacks:this.buckets[R.phase]).add(R)}unregister(R){this.buckets[R.phase].delete(R),this.deferredCallbacks.delete(R)}execute(){this.executingCallbacks=!0;for(const R of Object.values(this.buckets))for(const j of R)j.invoke();this.executingCallbacks=!1;for(const R of this.deferredCallbacks)this.buckets[R.phase].add(R);this.deferredCallbacks.clear()}destroy(){for(const R of Object.values(this.buckets))R.clear();this.deferredCallbacks.clear()}}let zb=(()=>{class E{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const j=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const ne of j)ne()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static{this.\u0275prov=ft({token:E,providedIn:"root",factory:()=>new E})}}return E})();function Cf(E){return!!sc(E)}function ea(E,R,j){let ne=j?E.styles:null,me=j?E.classes:null,Ie=0;if(null!==R)for(let je=0;je<R.length;je++){const at=R[je];"number"==typeof at?Ie=at:1==Ie?me=Er(me,at):2==Ie&&(ne=Er(ne,at+": "+R[++je]+";"))}j?E.styles=ne:E.stylesWithoutHost=ne,j?E.classes=me:E.classesWithoutHost=me}class bD extends ju{constructor(R){super(),this.ngModule=R}resolveComponentFactory(R){const j=Qs(R);return new pg(j,this.ngModule)}}function xD(E,R){const j=[];for(const ne in E){if(!E.hasOwnProperty(ne))continue;const me=E[ne];if(void 0===me)continue;const Ie=Array.isArray(me),je=Ie?me[0]:me;j.push(R?{propName:je,templateName:ne,isSignal:!!((Ie?me[1]:ld.None)&ld.SignalBased)}:{propName:je,templateName:ne})}return j}class pg extends vf{get inputs(){const R=this.componentDef,j=R.inputTransforms,ne=xD(R.inputs,!0);if(null!==j)for(const me of ne)j.hasOwnProperty(me.propName)&&(me.transform=j[me.propName]);return ne}get outputs(){return xD(this.componentDef.outputs,!1)}constructor(R,j){super(),this.componentDef=R,this.ngModule=j,this.componentType=R.type,this.selector=function Fg(E){return E.map(Ng).join(",")}(R.selectors),this.ngContentSelectors=R.ngContentSelectors?R.ngContentSelectors:[],this.isBoundToModule=!!j}create(R,j,ne,me){const Ie=S(null);try{let je=(me=me||this.ngModule)instanceof xc?me:me?.injector;je&&null!==this.componentDef.getStandaloneInjector&&(je=this.componentDef.getStandaloneInjector(je)||je);const at=je?new pd(R,je):R,_t=at.get(v_,null);if(null===_t)throw new Fo(407,!1);const tn=at.get(Ub,null),zi={rendererFactory:_t,sanitizer:tn,inlineEffectRunner:null,afterRenderEventManager:at.get(zb,null),changeDetectionScheduler:at.get(_u,null)},Zi=_t.createRenderer(null,this.componentDef),yo=this.componentDef.selectors[0][0]||"div",qo=ne?function uf(E,R,j,ne){const Ie=ne.get(HC,!1)||j===Ed.ShadowDom,je=E.selectRootElement(R,Ie);return function zT(E){Pv(E)}(je),je}(Zi,ne,this.componentDef.encapsulation,at):nm(Zi,yo,function cB(E){const R=E.toLowerCase();return"svg"===R?ud:"math"===R?"math":null}(yo));let Tr=512;this.componentDef.signals?Tr|=4096:this.componentDef.onPush||(Tr|=16);let Br=null;null!==qo&&(Br=CT(qo,at,!0));const ur=kE(0,null,null,1,0,null,null,null,null,null,null),zs=XC(null,ur,null,Tr,null,null,zi,Zi,at,null,Br);let hl,ml;ng(zs);try{const bd=this.componentDef;let Ip,Mx=null;bd.findHostDirectiveDefs?(Ip=[],Mx=new Map,bd.findHostDirectiveDefs(bd,Ip,Mx),Ip.push(bd)):Ip=[bd];const KI=function dB(E,R){const j=E[Or],ne=ss;return E[ne]=R,df(j,ne,2,"#host",null)}(zs,qo),Pp=function Wb(E,R,j,ne,me,Ie,je){const at=me[Or];!function NM(E,R,j,ne){for(const me of E)R.mergedAttrs=Lg(R.mergedAttrs,me.hostAttrs);null!==R.mergedAttrs&&(ea(R,R.mergedAttrs,!0),null!==j&&Eb(ne,j,R))}(ne,E,R,je);let _t=null;null!==R&&(_t=CT(R,me[Ql]));const tn=Ie.rendererFactory.createRenderer(R,j);let wn=16;j.signals?wn=4096:j.onPush&&(wn=64);const di=XC(me,UT(j),null,wn,me[E.index],E,Ie,tn,null,null,_t);return at.firstCreatePass&&Rv(at,E,ne.length-1),Gu(me,di),me[E.index]=di}(KI,qo,bd,Ip,zs,zi,Zi);ml=li(ur,ss),qo&&function ED(E,R,j,ne){if(ne)kg(E,j,["ng-version","18.1.2"]);else{const{attrs:me,classes:Ie}=function th(E){const R=[],j=[];let ne=1,me=2;for(;ne<E.length;){let Ie=E[ne];if("string"==typeof Ie)2===me?""!==Ie&&R.push(Ie,E[++ne]):8===me&&j.push(Ie);else{if(!dd(me))break;me=Ie}ne++}return{attrs:R,classes:j}}(R.selectors[0]);me&&kg(E,j,me),Ie&&Ie.length>0&&VT(E,j,Ie.join(" "))}}(Zi,bd,qo,ne),void 0!==j&&function hB(E,R,j){const ne=E.projection=[];for(let me=0;me<R.length;me++){const Ie=j[me];ne.push(null!=Ie?Array.from(Ie):null)}}(ml,this.ngContentSelectors,j),hl=function uB(E,R,j,ne,me,Ie){const je=ba(),at=me[Or],_t=nt(je,me);_p(at,me,je,j,null,ne);for(let wn=0;wn<j.length;wn++)Pd(PC(me,at,je.directiveStart+wn,je),me);fu(at,me,je),_t&&Pd(_t,me);const tn=PC(me,at,je.directiveStart+je.componentOffset,je);if(E[qa]=me[qa]=tn,null!==Ie)for(const wn of Ie)wn(tn,R);return RE(at,je,me),tn}(Pp,bd,Ip,Mx,zs,[pB]),bM(ur,zs,null)}finally{XS()}return new SD(this.componentType,hl,Ky(ml,zs),zs,ml)}finally{S(Ie)}}}class SD extends hg{constructor(R,j,ne,me,Ie){super(),this.location=ne,this._rootLView=me,this._tNode=Ie,this.previousInputValues=null,this.instance=j,this.hostView=this.changeDetectorRef=new Pb(me,void 0,!1),this.componentType=R}setInput(R,j){const ne=this._tNode.inputs;let me;if(null!==ne&&(me=ne[R])){if(this.previousInputValues??=new Map,this.previousInputValues.has(R)&&Object.is(this.previousInputValues.get(R),j))return;const Ie=this._rootLView;hh(Ie[Or],Ie,me,R,j),this.previousInputValues.set(R,j),Ib(bo(this._tNode.index,Ie),1)}}get injector(){return new Id(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(R){this.hostView.onDestroy(R)}}function pB(){const E=ba();Ge(Ho()[Or],E)}let oO=(()=>{class E{static{this.__NG_ELEMENT_ID__=OD}}return E})();function OD(){return VM(ba(),Ho())}const I0=oO,FM=class extends I0{constructor(R,j,ne){super(),this._lContainer=R,this._hostTNode=j,this._hostLView=ne}get element(){return Ky(this._hostTNode,this._hostLView)}get injector(){return new Id(this._hostTNode,this._hostLView)}get parentInjector(){const R=Zw(this._hostTNode,this._hostLView);if(jy(R)){const j=_v(R,this._hostLView),ne=jx(R);return new Id(j[Or].data[ne+8],j)}return new Id(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(R){const j=Gv(this._lContainer);return null!==j&&j[R]||null}get length(){return this._lContainer.length-il}createEmbeddedView(R,j,ne){let me,Ie;"number"==typeof ne?me=ne:null!=ne&&(me=ne.index,Ie=ne.injector);const je=qc(this._lContainer,R.ssrId),at=R.createEmbeddedViewImpl(j||{},Ie,je);return this.insertImpl(at,me,Hc(this._hostTNode,je)),at}createComponent(R,j,ne,me,Ie){const je=R&&!function Uf(E){return"function"==typeof E}(R);let at;if(je)at=j;else{const yo=j||{};at=yo.index,ne=yo.injector,me=yo.projectableNodes,Ie=yo.environmentInjector||yo.ngModuleRef}const _t=je?R:new pg(Qs(R)),tn=ne||this.parentInjector;if(!Ie&&null==_t.ngModule){const qo=(je?tn:this.parentInjector).get(xc,null);qo&&(Ie=qo)}const wn=Qs(_t.componentType??{}),di=qc(this._lContainer,wn?.id??null),Zi=_t.create(tn,me,di?.firstChild??null,Ie);return this.insertImpl(Zi.hostView,at,Hc(this._hostTNode,di)),Zi}insert(R,j){return this.insertImpl(R,j,!0)}insertImpl(R,j,ne){const me=R._lView;if(function yr(E){return Ul(E[ra])}(me)){const at=this.indexOf(R);if(-1!==at)this.detach(at);else{const _t=me[ra],tn=new FM(_t,_t[Zl],_t[ra]);tn.detach(tn.indexOf(R))}}const Ie=this._adjustIndex(j),je=this._lContainer;return cm(je,me,Ie,ne),R.attachToViewContainerRef(),rd(Ku(je),Ie,R),R}move(R,j){return this.insert(R,j)}indexOf(R){const j=Gv(this._lContainer);return null!==j?j.indexOf(R):-1}remove(R){const j=this._adjustIndex(R,-1),ne=u_(this._lContainer,j);ne&&(Pg(Ku(this._lContainer),j),wE(ne[Or],ne))}detach(R){const j=this._adjustIndex(R,-1),ne=u_(this._lContainer,j);return ne&&null!=Pg(Ku(this._lContainer),j)?new Pb(ne):null}_adjustIndex(R,j=0){return R??this.length+j}};function Gv(E){return E[8]}function Ku(E){return E[8]||(E[8]=[])}function VM(E,R){let j;const ne=R[E.index];return Ul(ne)?j=ne:(j=FE(ne,R,null,E),R[E.index]=j,Gu(R,j)),sO(j,R,E,ne),new FM(j,E,R)}let sO=function wD(E,R,j,ne){if(E[ku])return;let me;me=8&j.type?ha(ne):function rO(E,R){const j=E[Is],ne=j.createComment(""),me=nt(R,E);return om(j,Bi(j,me),ne,function DE(E,R){return E.nextSibling(R)}(j,me),!1),ne}(R,j),E[ku]=me},P0=()=>!1;class M0{constructor(R){this.queryList=R,this.matches=null}clone(){return new M0(this.queryList)}setDirty(){this.queryList.setDirty()}}class TD{constructor(R=[]){this.queries=R}createEmbeddedView(R){const j=R.queries;if(null!==j){const ne=null!==R.contentQueries?R.contentQueries[0]:j.length,me=[];for(let Ie=0;Ie<ne;Ie++){const je=j.getByIndex(Ie);me.push(this.queries[je.indexInDeclarationView].clone())}return new TD(me)}return null}insertView(R){this.dirtyQueriesWithMatches(R)}detachView(R){this.dirtyQueriesWithMatches(R)}finishViewCreation(R){this.dirtyQueriesWithMatches(R)}dirtyQueriesWithMatches(R){for(let j=0;j<this.queries.length;j++)null!==Bl(R,j).matches&&this.queries[j].setDirty()}}class lO{constructor(R,j,ne=null){this.flags=j,this.read=ne,this.predicate="string"==typeof R?function Kb(E){return E.split(",").map(R=>R.trim())}(R):R}}class DD{constructor(R=[]){this.queries=R}elementStart(R,j){for(let ne=0;ne<this.queries.length;ne++)this.queries[ne].elementStart(R,j)}elementEnd(R){for(let j=0;j<this.queries.length;j++)this.queries[j].elementEnd(R)}embeddedTView(R){let j=null;for(let ne=0;ne<this.length;ne++){const me=null!==j?j.length:0,Ie=this.getByIndex(ne).embeddedTView(R,me);Ie&&(Ie.indexInDeclarationView=ne,null!==j?j.push(Ie):j=[Ie])}return null!==j?new DD(j):null}template(R,j){for(let ne=0;ne<this.queries.length;ne++)this.queries[ne].template(R,j)}getByIndex(R){return this.queries[R]}get length(){return this.queries.length}track(R){this.queries.push(R)}}class AD{constructor(R,j=-1){this.metadata=R,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=j}elementStart(R,j){this.isApplyingToNode(j)&&this.matchTNode(R,j)}elementEnd(R){this._declarationNodeIndex===R.index&&(this._appliesToNextNode=!1)}template(R,j){this.elementStart(R,j)}embeddedTView(R,j){return this.isApplyingToNode(R)?(this.crossesNgTemplate=!0,this.addMatch(-R.index,j),new AD(this.metadata)):null}isApplyingToNode(R){if(this._appliesToNextNode&&1&~this.metadata.flags){const j=this._declarationNodeIndex;let ne=R.parent;for(;null!==ne&&8&ne.type&&ne.index!==j;)ne=ne.parent;return j===(null!==ne?ne.index:-1)}return this._appliesToNextNode}matchTNode(R,j){const ne=this.metadata.predicate;if(Array.isArray(ne))for(let me=0;me<ne.length;me++){const Ie=ne[me];this.matchTNodeWithReadOption(R,j,UM(j,Ie)),this.matchTNodeWithReadOption(R,j,IC(j,R,Ie,!1,!1))}else ne===Mb?4&j.type&&this.matchTNodeWithReadOption(R,j,-1):this.matchTNodeWithReadOption(R,j,IC(j,R,ne,!1,!1))}matchTNodeWithReadOption(R,j,ne){if(null!==ne){const me=this.metadata.read;if(null!==me)if(me===Yx||me===oO||me===Mb&&4&j.type)this.addMatch(j.index,-2);else{const Ie=IC(j,R,me,!1,!1);null!==Ie&&this.addMatch(j.index,Ie)}else this.addMatch(j.index,ne)}}addMatch(R,j){null===this.matches?this.matches=[R,j]:this.matches.push(R,j)}}function UM(E,R){const j=E.localNames;if(null!==j)for(let ne=0;ne<j.length;ne+=2)if(j[ne]===R)return j[ne+1];return null}function R0(E,R,j,ne){return-1===j?function jb(E,R){return 11&E.type?Ky(E,R):4&E.type?f_(E,R):null}(R,E):-2===j?function ID(E,R,j){return j===Yx?Ky(R,E):j===Mb?f_(R,E):j===oO?VM(R,E):void 0}(E,R,ne):PC(E,E[Or],j,R)}function PD(E,R,j,ne){const me=R[sh].queries[ne];if(null===me.matches){const Ie=E.data,je=j.matches,at=[];for(let _t=0;null!==je&&_t<je.length;_t+=2){const tn=je[_t];at.push(tn<0?null:R0(R,Ie[tn],je[_t+1],j.metadata.read))}me.matches=at}return me.matches}function zM(E,R,j,ne){const me=E.queries.getByIndex(j),Ie=me.matches;if(null!==Ie){const je=PD(E,R,me,j);for(let at=0;at<Ie.length;at+=2){const _t=Ie[at];if(_t>0)ne.push(je[at/2]);else{const tn=Ie[at+1],wn=R[-_t];for(let di=il;di<wn.length;di++){const zi=wn[di];zi[ap]===zi[ra]&&zM(zi[Or],zi,tn,ne)}if(null!==wn[Lu]){const di=wn[Lu];for(let zi=0;zi<di.length;zi++){const Zi=di[zi];zM(Zi[Or],Zi,tn,ne)}}}}}return ne}function gB(E,R,j){const ne=new lE(!(4&~j));return function sm(E,R,j,ne){const me=QC(R);me.push(j),E.firstCreatePass&&Db(E).push(ne,me.length-1)}(E,R,ne,ne.destroy),(R[sh]??=new TD).queries.push(new M0(ne))-1}function Xb(E,R,j){null===E.queries&&(E.queries=new DD),E.queries.track(new AD(R,j))}function Bl(E,R){return E.queries.getByIndex(R)}function MD(E,R){const j=E[Or],ne=Bl(j,R);return ne.crossesNgTemplate?zM(j,E,R,[]):PD(j,E,ne,R)}function RD(E,R){_d("NgSignals");const j=function pe(E){const R=Object.create(de);R.value=E;const j=()=>(s(R),R.value);return j[f]=R,j}(E),ne=j[f];return R?.equal&&(ne.equal=R.equal),j.set=me=>ae(ne,me),j.update=me=>function ee(E,R){g()||Z(),ae(E,R(E.value))}(ne,me),j.asReadonly=cO.bind(j),j}function cO(){const E=this[f];if(void 0===E.readonlyFn){const R=()=>this();R[f]=E,E.readonlyFn=R}return E.readonlyFn}function kD(E){return function k0(E){return"function"==typeof E&&void 0!==E[f]}(E)&&"function"==typeof E.set}function ua(E){let R=function b_(E){return Object.getPrototypeOf(E.prototype).constructor}(E.type),j=!0;const ne=[E];for(;R;){let me;if(Bu(E))me=R.\u0275cmp||R.\u0275dir;else{if(R.\u0275cmp)throw new Fo(903,!1);me=R.\u0275dir}if(me){if(j){ne.push(me);const je=E;je.inputs=xf(E.inputs),je.inputTransforms=xf(E.inputTransforms),je.declaredInputs=xf(E.declaredInputs),je.outputs=xf(E.outputs);const at=me.hostBindings;at&&yB(E,at);const _t=me.viewQuery,tn=me.contentQueries;if(_t&&ZM(E,_t),tn&&CB(E,tn),vB(E,me),Vo(E.outputs,me.outputs),Bu(me)&&me.data.animation){const wn=E.data;wn.animation=(wn.animation||[]).concat(me.data.animation)}}const Ie=me.features;if(Ie)for(let je=0;je<Ie.length;je++){const at=Ie[je];at&&at.ngInherit&&at(E),at===ua&&(j=!1)}}R=Object.getPrototypeOf(R)}!function Md(E){let R=0,j=null;for(let ne=E.length-1;ne>=0;ne--){const me=E[ne];me.hostVars=R+=me.hostVars,me.hostAttrs=Lg(me.hostAttrs,j=Lg(j,me.hostAttrs))}}(ne)}function vB(E,R){for(const j in R.inputs){if(!R.inputs.hasOwnProperty(j)||E.inputs.hasOwnProperty(j))continue;const ne=R.inputs[j];if(void 0!==ne&&(E.inputs[j]=ne,E.declaredInputs[j]=R.declaredInputs[j],null!==R.inputTransforms)){const me=Array.isArray(ne)?ne[0]:ne;if(!R.inputTransforms.hasOwnProperty(me))continue;E.inputTransforms??={},E.inputTransforms[me]=R.inputTransforms[me]}}}function xf(E){return E===gc?{}:E===Hs?[]:E}function ZM(E,R){const j=E.viewQuery;E.viewQuery=j?(ne,me)=>{R(ne,me),j(ne,me)}:R}function CB(E,R){const j=E.contentQueries;E.contentQueries=j?(ne,me,Ie)=>{R(ne,me,Ie),j(ne,me,Ie)}:R}function yB(E,R){const j=E.hostBindings;E.hostBindings=j?(ne,me)=>{R(ne,me),j(ne,me)}:R}function N0(E){const R=E.inputConfig,j={};for(const ne in R)if(R.hasOwnProperty(ne)){const me=R[ne];Array.isArray(me)&&me[3]&&(j[ne]=me[3])}E.inputTransforms=j}class $v{}class x_{}function mO(E,R){return new F0(E,R??null,[])}class F0 extends $v{constructor(R,j,ne){super(),this._parent=j,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new bD(this);const me=sc(R);this._bootstrapComponents=Rl(me.bootstrap),this._r3Injector=HP(R,j,[{provide:$v,useValue:this},{provide:ju,useValue:this.componentFactoryResolver},...ne],Go(R),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(R)}get injector(){return this._r3Injector}destroy(){const R=this._r3Injector;!R.destroyed&&R.destroy(),this.destroyCbs.forEach(j=>j()),this.destroyCbs=null}onDestroy(R){this.destroyCbs.push(R)}}class Sf extends x_{constructor(R){super(),this.moduleType=R}create(R){return new F0(this.moduleType,R,[])}}class V0 extends $v{constructor(R){super(),this.componentFactoryResolver=new bD(this),this.instance=null;const j=new Kp([...R.providers,{provide:$v,useValue:this},{provide:ju,useValue:this.componentFactoryResolver}],R.parent||jp(),R.debugName,new Set(["environment"]));this.injector=j,R.runEnvironmentInitializers&&j.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(R){this.injector.onDestroy(R)}}function H0(E,R,j=null){return new V0({providers:E,parent:R,debugName:j,runEnvironmentInitializers:!0}).injector}function wl(E){return!!S_(E)&&(Array.isArray(E)||!(E instanceof Map)&&Symbol.iterator in E)}function S_(E){return null!==E&&("function"==typeof E||"object"==typeof E)}function Gh(E,R,j){return E[R]=j}function Tl(E,R,j){return!Object.is(E[R],j)&&(E[R]=j,!0)}function gh(E,R,j,ne){const me=Tl(E,R,j);return Tl(E,R+1,ne)||me}function xu(E,R,j,ne,me){const Ie=gh(E,R,j,ne);return Tl(E,R+2,me)||Ie}function Cc(E,R,j,ne,me,Ie){const je=gh(E,R,j,ne);return gh(E,R+2,me,Ie)||je}function Cm(E,R,j,ne,me,Ie,je,at,_t,tn){const wn=j+ss,di=R.firstCreatePass?function O_(E,R,j,ne,me,Ie,je,at,_t){const tn=R.consts,wn=df(R,E,4,je||null,at||null);Nh(R,j,wn,Ur(tn,_t)),Ge(R,wn);const di=wn.tView=kE(2,wn,ne,me,Ie,R.directiveRegistry,R.pipeRegistry,null,R.schemas,tn,null);return null!==R.queries&&(R.queries.template(R,wn),di.queries=R.queries.embeddedTView(wn)),wn}(wn,R,E,ne,me,Ie,je,at,_t):R.data[wn];mc(di,!1);const zi=Of(R,E,di,j);Le()&&rm(R,E,zi,di),Pd(zi,E);const Zi=FE(zi,E,zi,di);return E[wn]=Zi,Gu(E,Zi),function $b(E,R,j){return P0(E,R,j)}(Zi,di,E),Hm(di)&&_M(R,E,di),null!=_t&&HT(E,di,tn),di}function jv(E,R,j,ne,me,Ie,je,at){const _t=Ho(),tn=ks();return Cm(_t,tn,E,R,j,ne,me,Ur(tn.consts,Ie),je,at),jv}let Of=function Wh(E,R,j,ne){return Ae(!0),R[Is].createComment("")};function qD(E,R,j,ne){const me=Ho();return Tl(me,jc(),R)&&(ks(),lg(Pl(),me,E,R,j,ne)),qD}function py(E,R,j,ne){return Tl(E,jc(),j)?R+St(j)+ne:da}function gy(E,R,j,ne,me,Ie){const at=gh(E,Oc(),j,me);return Ah(2),at?R+St(j)+ne+St(me)+Ie:da}function ix(E,R,j,ne,me,Ie,je,at,_t,tn){const di=Cc(E,Oc(),j,me,je,_t);return Ah(4),di?R+St(j)+ne+St(me)+Ie+St(je)+at+St(_t)+tn:da}function mh(E,R){return E<<17|R<<2}function Cg(E){return E>>17&32767}function oA(E){return 2|E}function _y(E){return(131068&E)>>2}function Zv(E,R){return-131069&E|R<<2}function A_(E){return 1|E}function I_(E,R,j,ne){const me=E[j+1],Ie=null===R;let je=ne?Cg(me):_y(me),at=!1;for(;0!==je&&(!1===at||Ie);){const tn=E[je+1];sA(E[je],R)&&(at=!0,E[je+1]=ne?A_(tn):oA(tn)),je=ne?Cg(tn):_y(tn)}at&&(E[j+1]=ne?oA(me):A_(me))}function sA(E,R){return null===E||null==R||(Array.isArray(E)?E[1]:E)===R||!(!Array.isArray(E)||"string"!=typeof R)&&ip(E,R)>=0}const ed={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function AO(E){return E.substring(ed.key,ed.keyEnd)}function rx(E){return E.substring(ed.value,ed.valueEnd)}function Z0(E,R){const j=ed.textEnd;return j===R?-1:(R=ed.keyEnd=function gR(E,R,j){for(;R<j&&E.charCodeAt(R)>32;)R++;return R}(E,ed.key=R,j),Qv(E,R,j))}function aA(E,R){const j=ed.textEnd;let ne=ed.key=Qv(E,R,j);return j===ne?-1:(ne=ed.keyEnd=function sx(E,R,j){let ne;for(;R<j&&(45===(ne=E.charCodeAt(R))||95===ne||(-33&ne)>=65&&(-33&ne)<=90||ne>=48&&ne<=57);)R++;return R}(E,ne,j),ne=yy(E,ne,j),ne=ed.value=Qv(E,ne,j),ne=ed.valueEnd=function RB(E,R,j){let ne=-1,me=-1,Ie=-1,je=R,at=je;for(;je<j;){const _t=E.charCodeAt(je++);if(59===_t)return at;34===_t||39===_t?at=je=Jv(E,_t,je,j):R===je-4&&85===Ie&&82===me&&76===ne&&40===_t?at=je=Jv(E,41,je,j):_t>32&&(at=je),Ie=me,me=ne,ne=-33&_t}return at}(E,ne,j),yy(E,ne,j))}function lA(E){ed.key=0,ed.keyEnd=0,ed.value=0,ed.valueEnd=0,ed.textEnd=E.length}function Qv(E,R,j){for(;R<j&&E.charCodeAt(R)<=32;)R++;return R}function yy(E,R,j,ne){return(R=Qv(E,R,j))<j&&R++,R}function Jv(E,R,j,ne){let me=-1,Ie=j;for(;Ie<ne;){const je=E.charCodeAt(Ie++);if(je==R&&92!==me)return Ie;me=92==je&&92===me?0:je}throw new Error}function LB(E,R,j){const ne=Ho();return Tl(ne,jc(),R)&&Bh(ks(),Pl(),ne,E,R,ne[Is],j,!1),LB}function qv(E,R,j,ne,me){const je=me?"class":"style";hh(E,j,R.inputs[je],je,ne)}function Q0(E,R,j){return Cd(E,R,j,!1),Q0}function IO(E,R){return Cd(E,R,null,!0),IO}function La(E,R){for(let j=function MB(E){return lA(E),aA(E,Qv(E,0,ed.textEnd))}(R);j>=0;j=aA(R,j))PO(E,AO(R),rx(R))}function BB(E){Tf(h2,wf,E,!0)}function wf(E,R){for(let j=function PB(E){return lA(E),Z0(E,Qv(E,0,ed.textEnd))}(R);j>=0;j=Z0(R,j))pc(E,AO(R),!0)}function Cd(E,R,j,ne){const me=Ho(),Ie=ks(),je=Ah(2);Ie.firstUpdatePass&&cA(Ie,E,je,ne),R!==da&&Tl(me,je,R)&&pA(Ie,Ie.data[Ad()],me,me[Is],E,me[je+1]=function mR(E,R){return null==E||""===E||("string"==typeof R?E+=R:"object"==typeof E&&(E=Go(nf(E)))),E}(R,j),ne,je)}function Tf(E,R,j,ne){const me=ks(),Ie=Ah(2);me.firstUpdatePass&&cA(me,null,Ie,ne);const je=Ho();if(j!==da&&Tl(je,Ie,j)){const at=me.data[Ad()];if(_R(at,ne)&&!NB(me,Ie)){let _t=ne?at.classesWithoutHost:at.stylesWithoutHost;null!==_t&&(j=Er(_t,j||"")),qv(me,at,je,j,ne)}else!function hA(E,R,j,ne,me,Ie,je,at){me===da&&(me=Hs);let _t=0,tn=0,wn=0<me.length?me[0]:null,di=0<Ie.length?Ie[0]:null;for(;null!==wn||null!==di;){const zi=_t<me.length?me[_t+1]:void 0,Zi=tn<Ie.length?Ie[tn+1]:void 0;let qo,yo=null;wn===di?(_t+=2,tn+=2,zi!==Zi&&(yo=di,qo=Zi)):null===di||null!==wn&&wn<di?(_t+=2,yo=wn):(tn+=2,yo=di,qo=Zi),null!==yo&&pA(E,R,j,ne,yo,qo,je,at),wn=_t<me.length?me[_t]:null,di=tn<Ie.length?Ie[tn]:null}}(me,at,je,je[Is],je[Ie+1],je[Ie+1]=function uA(E,R,j){if(null==j||""===j)return Hs;const ne=[],me=nf(j);if(Array.isArray(me))for(let Ie=0;Ie<me.length;Ie++)E(ne,me[Ie],!0);else if("object"==typeof me)for(const Ie in me)me.hasOwnProperty(Ie)&&E(ne,Ie,me[Ie]);else"string"==typeof me&&R(ne,me);return ne}(E,R,j),ne,Ie)}}function NB(E,R){return R>=E.expandoStartIndex}function cA(E,R,j,ne){const me=E.data;if(null===me[j+1]){const Ie=me[Ad()],je=NB(E,j);_R(Ie,ne)&&null===R&&!je&&(R=!1),R=function d2(E,R,j,ne){const me=function H(E){const R=ns.lFrame.currentDirectiveIndex;return-1===R?null:E[R]}(E);let Ie=ne?R.residualClasses:R.residualStyles;if(null===me)0===(ne?R.classBindings:R.styleBindings)&&(j=eC(j=J0(null,E,R,j,ne),R.attrs,ne),Ie=null);else{const je=R.directiveStylingLast;if(-1===je||E[je]!==me)if(j=J0(me,E,R,j,ne),null===Ie){let _t=function fR(E,R,j){const ne=j?R.classBindings:R.styleBindings;if(0!==_y(ne))return E[Cg(ne)]}(E,R,ne);void 0!==_t&&Array.isArray(_t)&&(_t=J0(null,E,R,_t[1],ne),_t=eC(_t,R.attrs,ne),function u2(E,R,j,ne){E[Cg(j?R.classBindings:R.styleBindings)]=ne}(E,R,ne,_t))}else Ie=function dA(E,R,j){let ne;const me=R.directiveEnd;for(let Ie=1+R.directiveStylingLast;Ie<me;Ie++)ne=eC(ne,E[Ie].hostAttrs,j);return eC(ne,R.attrs,j)}(E,R,ne)}return void 0!==Ie&&(ne?R.residualClasses=Ie:R.residualStyles=Ie),j}(me,Ie,R,ne),function rA(E,R,j,ne,me,Ie){let je=Ie?R.classBindings:R.styleBindings,at=Cg(je),_t=_y(je);E[ne]=j;let wn,tn=!1;if(Array.isArray(j)?(wn=j[1],(null===wn||ip(j,wn)>0)&&(tn=!0)):wn=j,me)if(0!==_t){const zi=Cg(E[at+1]);E[ne+1]=mh(zi,at),0!==zi&&(E[zi+1]=Zv(E[zi+1],ne)),E[at+1]=function AB(E,R){return 131071&E|R<<17}(E[at+1],ne)}else E[ne+1]=mh(at,0),0!==at&&(E[at+1]=Zv(E[at+1],ne)),at=ne;else E[ne+1]=mh(_t,0),0===at?at=ne:E[_t+1]=Zv(E[_t+1],ne),_t=ne;tn&&(E[ne+1]=oA(E[ne+1])),I_(E,wn,ne,!0),I_(E,wn,ne,!1),function IB(E,R,j,ne,me){const Ie=me?E.residualClasses:E.residualStyles;null!=Ie&&"string"==typeof R&&ip(Ie,R)>=0&&(j[ne+1]=A_(j[ne+1]))}(R,wn,E,ne,Ie),je=mh(at,_t),Ie?R.classBindings=je:R.styleBindings=je}(me,Ie,R,j,je,ne)}}function J0(E,R,j,ne,me){let Ie=null;const je=j.directiveEnd;let at=j.directiveStylingLast;for(-1===at?at=j.directiveStart:at++;at<je&&(Ie=R[at],ne=eC(ne,Ie.hostAttrs,me),Ie!==E);)at++;return null!==E&&(j.directiveStylingLast=at),ne}function eC(E,R,j){const ne=j?1:2;let me=-1;if(null!==R)for(let Ie=0;Ie<R.length;Ie++){const je=R[Ie];"number"==typeof je?me=je:me===ne&&(Array.isArray(E)||(E=void 0===E?[]:["",E]),pc(E,je,!!j||R[++Ie]))}return void 0===E?null:E}function PO(E,R,j){pc(E,R,nf(j))}function h2(E,R,j){const ne=String(R);""!==ne&&!ne.includes(" ")&&pc(E,ne,j)}function pA(E,R,j,ne,me,Ie,je,at){if(!(3&R.type))return;const _t=E.data,tn=_t[at+1],wn=function vy(E){return!(1&~E)}(tn)?gA(_t,R,j,me,_y(tn),je):void 0;Dp(wn)||(Dp(Ie)||function iA(E){return!(2&~E)}(tn)&&(Ie=gA(_t,null,j,me,at,je)),function d0(E,R,j,ne,me){if(R)me?E.addClass(j,ne):E.removeClass(j,ne);else{let Ie=-1===ne.indexOf("-")?void 0:OE.DashCase;null==me?E.removeStyle(j,ne,Ie):("string"==typeof me&&me.endsWith("!important")&&(me=me.slice(0,-10),Ie|=OE.Important),E.setStyle(j,ne,me,Ie))}}(ne,je,Sn(Ad(),j),me,Ie))}function gA(E,R,j,ne,me,Ie){const je=null===R;let at;for(;me>0;){const _t=E[me],tn=Array.isArray(_t),wn=tn?_t[1]:_t,di=null===wn;let zi=j[me+1];zi===da&&(zi=di?Hs:void 0);let Zi=di?Np(zi,ne):wn===ne?zi:void 0;if(tn&&!Dp(Zi)&&(Zi=Np(_t,ne)),Dp(Zi)&&(at=Zi,je))return at;const yo=E[me+1];me=je?Cg(yo):_y(yo)}if(null!==R){let _t=Ie?R.residualClasses:R.residualStyles;null!=_t&&(at=Np(_t,ne))}return at}function Dp(E){return void 0!==E}function _R(E,R){return!!(E.flags&(R?8:16))}function vR(E,R,j){Tf(pc,wf,py(Ho(),E,R,j),!0)}function q0(E,R,j,ne,me,Ie,je,at,_t){Tf(pc,wf,ix(Ho(),E,R,j,ne,me,Ie,je,at,_t),!0)}class by{destroy(R){}updateValue(R,j){}swap(R,j){const ne=Math.min(R,j),me=Math.max(R,j),Ie=this.detach(me);if(me-ne>1){const je=this.detach(ne);this.attach(ne,Ie),this.attach(me,je)}else this.attach(ne,Ie)}move(R,j){this.attach(j,this.detach(R))}}function _h(E,R,j,ne,me){return E===j&&Object.is(R,ne)?1:Object.is(me(E,R),me(j,ne))?-1:0}function fA(E,R,j,ne){return!(void 0===R||!R.has(ne)||(E.attach(j,R.get(ne)),R.delete(ne),0))}function LO(E,R,j,ne,me){if(fA(E,R,ne,j(ne,me)))E.updateValue(ne,me);else{const Ie=E.create(ne,me);E.attach(ne,Ie)}}function Ps(E,R,j,ne){const me=new Set;for(let Ie=R;Ie<=j;Ie++)me.add(ne(Ie,E.at(Ie)));return me}class CR{constructor(){this.kvMap=new Map,this._vMap=void 0}has(R){return this.kvMap.has(R)}delete(R){if(!this.has(R))return!1;const j=this.kvMap.get(R);return void 0!==this._vMap&&this._vMap.has(j)?(this.kvMap.set(R,this._vMap.get(j)),this._vMap.delete(j)):this.kvMap.delete(R),!0}get(R){return this.kvMap.get(R)}set(R,j){if(this.kvMap.has(R)){let ne=this.kvMap.get(R);void 0===this._vMap&&(this._vMap=new Map);const me=this._vMap;for(;me.has(ne);)ne=me.get(ne);me.set(ne,j)}else this.kvMap.set(R,j)}forEach(R){for(let[j,ne]of this.kvMap)if(R(ne,j),void 0!==this._vMap){const me=this._vMap;for(;me.has(ne);)ne=me.get(ne),R(ne,j)}}}function ax(E,R){_d("NgControlFlow");const j=Ho(),ne=jc(),me=j[ne]!==da?j[ne]:-1,Ie=-1!==me?FO(j,ss+me):void 0;if(Tl(j,ne,E)){const at=S(null);try{if(void 0!==Ie&&VE(Ie,0),-1!==E){const _t=ss+E,tn=FO(j,_t),wn=lx(j[Or],_t),di=qc(tn,wn.tView.ssrId);cm(tn,lm(j,wn,R,{dehydratedView:di}),0,Hc(wn,di))}}finally{S(at)}}else if(void 0!==Ie){const at=g_(Ie,0);void 0!==at&&(at[qa]=R)}}class yR{constructor(R,j,ne){this.lContainer=R,this.$implicit=j,this.$index=ne}get $count(){return this.lContainer.length-il}}function mA(E,R){return R}class NO{constructor(R,j,ne){this.hasEmptyBlock=R,this.trackByFn=j,this.liveCollection=ne}}function _A(E,R,j,ne,me,Ie,je,at,_t,tn,wn,di,zi){_d("NgControlFlow");const Zi=Ho(),yo=ks(),qo=void 0!==_t,Tr=Ho(),Br=at?je.bind(Tr[Ol][qa]):je,ur=new NO(qo,Br);Tr[ss+E]=ur,Cm(Zi,yo,E+1,R,j,ne,me,Ur(yo.consts,Ie)),qo&&Cm(Zi,yo,E+2,_t,tn,wn,di,Ur(yo.consts,zi))}class bR extends by{constructor(R,j,ne){super(),this.lContainer=R,this.hostLView=j,this.templateTNode=ne,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-il}at(R){return this.getLView(R)[qa].$implicit}attach(R,j){const ne=j[cc];this.needsIndexUpdate||=R!==this.length,cm(this.lContainer,j,R,Hc(this.templateTNode,ne))}detach(R){return this.needsIndexUpdate||=R!==this.length-1,function VO(E,R){return u_(E,R)}(this.lContainer,R)}create(R,j){const ne=qc(this.lContainer,this.templateTNode.tView.ssrId),me=lm(this.hostLView,this.templateTNode,new yR(this.lContainer,j,R),{dehydratedView:ne});return this.operationsCounter?.recordCreate(),me}destroy(R){wE(R[Or],R),this.operationsCounter?.recordDestroy()}updateValue(R,j){this.getLView(R)[qa].$implicit=j}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let R=0;R<this.length;R++)this.getLView(R)[qa].$index=R}getLView(R){return function vA(E,R){return g_(E,R)}(this.lContainer,R)}}function xR(E){const R=S(null),j=Ad();try{const ne=Ho(),me=ne[Or],Ie=ne[j],je=j+1,at=FO(ne,je);if(void 0===Ie.liveCollection){const tn=lx(me,je);Ie.liveCollection=new bR(at,ne,tn)}else Ie.liveCollection.reset();const _t=Ie.liveCollection;if(function P_(E,R,j){let ne,me,Ie=0,je=E.length-1;if(Array.isArray(R)){let _t=R.length-1;for(;Ie<=je&&Ie<=_t;){const tn=E.at(Ie),wn=R[Ie],di=_h(Ie,tn,Ie,wn,j);if(0!==di){di<0&&E.updateValue(Ie,wn),Ie++;continue}const zi=E.at(je),Zi=R[_t],yo=_h(je,zi,_t,Zi,j);if(0!==yo){yo<0&&E.updateValue(je,Zi),je--,_t--;continue}const qo=j(Ie,tn),Tr=j(je,zi),Br=j(Ie,wn);if(Object.is(Br,Tr)){const ur=j(_t,Zi);Object.is(ur,qo)?(E.swap(Ie,je),E.updateValue(je,Zi),_t--,je--):E.move(je,Ie),E.updateValue(Ie,wn),Ie++}else if(ne??=new CR,me??=Ps(E,Ie,je,j),fA(E,ne,Ie,Br))E.updateValue(Ie,wn),Ie++,je++;else if(me.has(Br))ne.set(qo,E.detach(Ie)),je--;else{const ur=E.create(Ie,R[Ie]);E.attach(Ie,ur),Ie++,je++}}for(;Ie<=_t;)LO(E,ne,j,Ie,R[Ie]),Ie++}else if(null!=R){const _t=R[Symbol.iterator]();let tn=_t.next();for(;!tn.done&&Ie<=je;){const wn=E.at(Ie),di=tn.value,zi=_h(Ie,wn,Ie,di,j);if(0!==zi)zi<0&&E.updateValue(Ie,di),Ie++,tn=_t.next();else{ne??=new CR,me??=Ps(E,Ie,je,j);const Zi=j(Ie,di);if(fA(E,ne,Ie,Zi))E.updateValue(Ie,di),Ie++,je++,tn=_t.next();else if(me.has(Zi)){const yo=j(Ie,wn);ne.set(yo,E.detach(Ie)),je--}else E.attach(Ie,E.create(Ie,di)),Ie++,je++,tn=_t.next()}}for(;!tn.done;)LO(E,ne,j,E.length,tn.value),tn=_t.next()}for(;Ie<=je;)E.destroy(E.detach(je--));ne?.forEach(_t=>{E.destroy(_t)})}(_t,E,Ie.trackByFn),_t.updateIndexes(),Ie.hasEmptyBlock){const tn=jc(),wn=0===_t.length;if(Tl(ne,tn,wn)){const di=j+2,zi=FO(ne,di);if(wn){const Zi=lx(me,di),yo=qc(zi,Zi.tView.ssrId);cm(zi,lm(ne,Zi,void 0,{dehydratedView:yo}),0,Hc(Zi,yo))}else VE(zi,0)}}}finally{S(R)}}function FO(E,R){return E[R]}function lx(E,R){return li(E,R)}function xa(E,R,j,ne){const me=Ho(),Ie=ks(),je=ss+E,at=me[Is],_t=Ie.firstCreatePass?function SR(E,R,j,ne,me,Ie){const je=R.consts,_t=df(R,E,2,ne,Ur(je,me));return Nh(R,j,_t,Ur(je,Ie)),null!==_t.attrs&&ea(_t,_t.attrs,!1),null!==_t.mergedAttrs&&ea(_t,_t.mergedAttrs,!0),null!==R.queries&&R.queries.elementStart(R,_t),_t}(je,Ie,me,R,j,ne):Ie.data[je],tn=CA(Ie,me,_t,at,R,E);me[je]=tn;const wn=Hm(_t);return mc(_t,!0),Eb(at,tn,_t),!function Kd(E){return!(32&~E.flags)}(_t)&&Le()&&rm(Ie,me,tn,_t),0===function ql(){return ns.lFrame.elementDepthCount}()&&Pd(tn,me),function zl(){ns.lFrame.elementDepthCount++}(),wn&&(_M(Ie,me,_t),RE(Ie,_t,me)),null!==ne&&HT(me,_t),xa}function iS(){let E=ba();Fd()?eg():(E=E.parent,mc(E,!1));const R=E;(function hd(E){return ns.skipHydrationRootTNode===E})(R)&&function lh(){ns.skipHydrationRootTNode=null}(),function Il(){ns.lFrame.elementDepthCount--}();const j=ks();return j.firstCreatePass&&(Ge(j,E),Vm(E)&&j.queries.elementEnd(E)),null!=R.classesWithoutHost&&function Fr(E){return!!(8&E.flags)}(R)&&qv(j,R,Ho(),R.classesWithoutHost,!0),null!=R.stylesWithoutHost&&function cs(E){return!!(16&E.flags)}(R)&&qv(j,R,Ho(),R.stylesWithoutHost,!1),iS}function M_(E,R,j,ne){return xa(E,R,j,ne),iS(),M_}let CA=(E,R,j,ne,me,Ie)=>(Ae(!0),nm(ne,me,function DC(){return ns.lFrame.currentNamespace}()));function tC(E,R,j){const ne=Ho(),me=ks(),Ie=E+ss,je=me.firstCreatePass?function bA(E,R,j,ne,me){const Ie=R.consts,je=Ur(Ie,ne),at=df(R,E,8,"ng-container",je);return null!==je&&ea(at,je,!0),Nh(R,j,at,Ur(Ie,me)),null!==R.queries&&R.queries.elementStart(R,at),at}(Ie,me,ne,R,j):me.data[Ie];mc(je,!0);const at=xA(me,ne,je,E);return ne[Ie]=at,Le()&&rm(me,ne,at,je),Pd(at,ne),Hm(je)&&(_M(me,ne,je),RE(me,je,ne)),null!=j&&HT(ne,je),tC}function xy(){let E=ba();const R=ks();return Fd()?eg():(E=E.parent,mc(E,!1)),R.firstCreatePass&&(Ge(R,E),Vm(E)&&R.queries.elementEnd(E)),xy}function oS(E,R,j){return tC(E,R,j),xy(),oS}let xA=(E,R,j,ne)=>(Ae(!0),mb(R[Is],""));function OR(){return Ho()}const Em=void 0;var HO=["en",[["a","p"],["AM","PM"],Em],[["AM","PM"],Em,Em],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Em,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Em,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Em,"{1} 'at' {0}",Em],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function R_(E){const j=Math.floor(Math.abs(E)),ne=E.toString().replace(/^[^.]*\.?/,"").length;return 1===j&&0===ne?1:5}];let cx={};function EA(E){const R=function WB(E){return E.toLowerCase().replace(/_/g,"-")}(E);let j=wR(R);if(j)return j;const ne=R.split("-")[0];if(j=wR(ne),j)return j;if("en"===ne)return HO;throw new Fo(701,!1)}function OA(E){return EA(E)[nC.PluralCase]}function wR(E){return E in cx||(cx[E]=vi.ng&&vi.ng.common&&vi.ng.common.locales&&vi.ng.common.locales[E]),cx[E]}var nC=function(E){return E[E.LocaleId=0]="LocaleId",E[E.DayPeriodsFormat=1]="DayPeriodsFormat",E[E.DayPeriodsStandalone=2]="DayPeriodsStandalone",E[E.DaysFormat=3]="DaysFormat",E[E.DaysStandalone=4]="DaysStandalone",E[E.MonthsFormat=5]="MonthsFormat",E[E.MonthsStandalone=6]="MonthsStandalone",E[E.Eras=7]="Eras",E[E.FirstDayOfWeek=8]="FirstDayOfWeek",E[E.WeekendRange=9]="WeekendRange",E[E.DateFormat=10]="DateFormat",E[E.TimeFormat=11]="TimeFormat",E[E.DateTimeFormat=12]="DateTimeFormat",E[E.NumberSymbols=13]="NumberSymbols",E[E.NumberFormats=14]="NumberFormats",E[E.CurrencyCode=15]="CurrencyCode",E[E.CurrencySymbol=16]="CurrencySymbol",E[E.CurrencyName=17]="CurrencyName",E[E.Currencies=18]="Currencies",E[E.Directionality=19]="Directionality",E[E.PluralCase=20]="PluralCase",E[E.ExtraData=21]="ExtraData",E}(nC||{});const ul="en-US";let TA=ul;let HA=(E,R,j)=>{};function Sy(E,R,j,ne){const me=Ho(),Ie=ks(),je=ba();return fx(Ie,me,me[Is],je,E,R,ne),Sy}function fx(E,R,j,ne,me,Ie,je){const at=Hm(ne),tn=E.firstCreatePass&&Db(E),wn=R[qa],di=QC(R);let zi=!0;if(3&ne.type||je){const qo=nt(ne,R),Tr=je?je(qo):qo,Br=di.length,ur=je?hl=>je(ha(hl[ne.index])):ne.index;let zs=null;if(!je&&at&&(zs=function jO(E,R,j,ne){const me=E.cleanup;if(null!=me)for(let Ie=0;Ie<me.length-1;Ie+=2){const je=me[Ie];if(je===j&&me[Ie+1]===ne){const at=R[Yp],_t=me[Ie+2];return at.length>_t?at[_t]:null}"string"==typeof je&&(Ie+=2)}return null}(E,R,me,ne.index)),null!==zs)(zs.__ngLastListenerFn__||zs).__ngNextListenerFn__=Ie,zs.__ngLastListenerFn__=Ie,zi=!1;else{Ie=UA(ne,R,wn,Ie),HA(qo,me,Ie);const hl=j.listen(Tr,me,Ie);di.push(Ie,hl),tn&&tn.push(me,ur,Br,Br+1)}}else Ie=UA(ne,R,wn,Ie);const Zi=ne.outputs;let yo;if(zi&&null!==Zi&&(yo=Zi[me])){const qo=yo.length;if(qo)for(let Tr=0;Tr<qo;Tr+=2){const ml=R[yo[Tr]][yo[Tr+1]].subscribe(Ie),bd=di.length;di.push(Ie,ml),tn&&tn.push(me,ne.index,bd,-(bd+1))}}}function N_(E,R,j,ne){const me=S(null);try{return $c(6,R,j),!1!==j(ne)}catch(Ie){return uh(E,Ie),!1}finally{$c(7,R,j),S(me)}}function UA(E,R,j,ne){return function me(Ie){if(Ie===Function)return ne;Ib(E.componentOffset>-1?bo(E.index,R):R,5);let at=N_(R,j,ne,Ie),_t=me.__ngNextListenerFn__;for(;_t;)at=N_(R,j,_t,Ie)&&at,_t=_t.__ngNextListenerFn__;return at}}function GR(E=1){return function $y(E){return(ns.lFrame.contextLView=function ca(E,R){for(;E>0;)R=R[sp],E--;return R}(E,ns.lFrame.contextLView))[qa]}(E)}function lN(E,R){let j=null;const ne=function Lm(E){const R=E.attrs;if(null!=R){const j=R.indexOf(5);if(!(1&j))return R[j+1]}return null}(E);for(let me=0;me<R.length;me++){const Ie=R[me];if("*"!==Ie){if(null===ne?km(E,Ie,!0):zp(ne,Ie))return me}else j=me}return j}function WR(E){const R=Ho()[Ol][Zl];if(!R.projection){const ne=R.projection=function Mg(E,R){const j=[];for(let ne=0;ne<E;ne++)j.push(R);return j}(E?E.length:1,null),me=ne.slice();let Ie=R.child;for(;null!==Ie;){if(128!==Ie.type){const je=E?lN(Ie,E):0;null!==je&&(me[je]?me[je].projectionNext=Ie:ne[je]=Ie,me[je]=Ie)}Ie=Ie.next}}}function $R(E,R=0,j,ne,me,Ie){const je=Ho(),at=ks(),_t=ne?E+1:null;null!==_t&&Cm(je,at,_t,ne,me,Ie,null,j);const tn=df(at,ss+E,16,null,j||null);null===tn.projection&&(tn.projection=R),eg();const di=!je[cc]||fc();null===je[Ol][Zl].projection[tn.projection]&&null!==_t?function cN(E,R,j){const ne=ss+j,me=R.data[ne],Ie=E[ne],je=qc(Ie,me.tView.ssrId);cm(Ie,lm(E,me,void 0,{dehydratedView:je}),0,Hc(me,je))}(je,at,_t):di&&32&~tn.flags&&function NT(E,R,j){FT(R[Is],0,R,j,Cb(E,j,R),fM(j.parent||R[Zl],j,R))}(at,je,tn)}function cS(E,R,j){return dS(E,"",R,"",j),cS}function dS(E,R,j,ne,me){const Ie=Ho(),je=py(Ie,R,j,ne);return je!==da&&Bh(ks(),Pl(),Ie,E,je,Ie[Is],me,!1),dS}function Yu(E,R,j,ne,me,Ie,je){const at=Ho(),_t=gy(at,R,j,ne,me,Ie);return _t!==da&&Bh(ks(),Pl(),at,E,_t,at[Is],je,!1),Yu}function zA(E,R,j,ne){!function WM(E,R,j,ne){const me=ks();if(me.firstCreatePass){const Ie=ba();Xb(me,new lO(R,j,ne),Ie.index),function $M(E,R){const j=E.contentQueries||(E.contentQueries=[]);R!==(j.length?j[j.length-1]:-1)&&j.push(E.queries.length-1,R)}(me,E),!(2&~j)&&(me.staticContentQueries=!0)}return gB(me,Ho(),j)}(E,R,j,ne)}function uS(E,R,j){!function sy(E,R,j){const ne=ks();return ne.firstCreatePass&&(Xb(ne,new lO(E,R,j),-1),!(2&~R)&&(ne.staticViewQueries=!0)),gB(ne,Ho(),R)}(E,R,j)}function GA(E){const R=Ho(),j=ks(),ne=Ne();Vn(ne+1);const me=Bl(j,ne);if(E.dirty&&function Bo(E){return!(4&~E[ts])}(R)===!(2&~me.metadata.flags)){if(null===me.matches)E.reset([]);else{const Ie=MD(R,ne);E.reset(Ie,GP),E.notifyOnChanges()}return!0}return!1}function YR(){return function GM(E,R){return E[sh].queries[R].queryList}(Ho(),Ne())}function XO(E){return Gi(function hp(){return ns.lFrame.contextLView}(),ss+E)}function $A(E,R,j){!function yg(E){Tf(PO,La,E,!1)}(py(Ho(),E,R,j))}function o1(E,R=""){const j=Ho(),ne=ks(),me=E+ss,Ie=ne.firstCreatePass?df(ne,me,1,R,null):ne.data[me],je=pS(ne,j,Ie,R,E);j[me]=je,Le()&&rm(ne,j,je,Ie),mc(Ie,!1)}let pS=(E,R,j,ne,me)=>(Ae(!0),function nc(E,R){return E.createText(R)}(R[Is],ne));function YO(E){return ZA("",E,""),YO}function ZA(E,R,j){const ne=Ho(),me=py(ne,E,R,j);return me!==da&&pf(ne,Ad(),me),ZA}function r1(E,R,j,ne,me){const Ie=Ho(),je=gy(Ie,E,R,j,ne,me);return je!==da&&pf(Ie,Ad(),je),r1}function vx(E,R,j,ne,me,Ie,je){const at=Ho(),_t=function nx(E,R,j,ne,me,Ie,je,at){const tn=xu(E,Oc(),j,me,je);return Ah(3),tn?R+St(j)+ne+St(me)+Ie+St(je)+at:da}(at,E,R,j,ne,me,Ie,je);return _t!==da&&pf(at,Ad(),_t),vx}function ZO(E,R,j,ne,me,Ie,je,at,_t){const tn=Ho(),wn=ix(tn,E,R,j,ne,me,Ie,je,at,_t);return wn!==da&&pf(tn,Ad(),wn),ZO}function QA(E,R,j,ne,me,Ie,je,at,_t,tn,wn,di,zi){const Zi=Ho(),yo=function fy(E,R,j,ne,me,Ie,je,at,_t,tn,wn,di,zi,Zi){const yo=Oc();let qo=Cc(E,yo,j,me,je,_t);return qo=gh(E,yo+4,wn,zi)||qo,Ah(6),qo?R+St(j)+ne+St(me)+Ie+St(je)+at+St(_t)+tn+St(wn)+di+St(zi)+Zi:da}(Zi,E,R,j,ne,me,Ie,je,at,_t,tn,wn,di,zi);return yo!==da&&pf(Zi,Ad(),yo),QA}function QO(E,R,j){kD(R)&&(R=R());const ne=Ho();return Tl(ne,jc(),R)&&Bh(ks(),Pl(),ne,E,R,ne[Is],j,!1),QO}function _N(E,R){const j=kD(E);return j&&E.set(R),j}function eI(E,R){const j=Ho(),ne=ks(),me=ba();return fx(ne,j,j[Is],me,E,R),eI}function tI(E,R,j,ne,me){if(E=$r(E),Array.isArray(E))for(let Ie=0;Ie<E.length;Ie++)tI(E[Ie],R,j,ne,me);else{const Ie=ks(),je=Ho(),at=ba();let _t=Va(E)?E:$r(E.provide);const tn=tv(E),wn=1048575&at.providerIndexes,di=at.directiveStart,zi=at.providerIndexes>>20;if(Va(E)||!E.multi){const Zi=new Ui(tn,me,KC),yo=oI(_t,R,me?wn:wn+zi,di);-1===yo?(qS(JS(at,je),Ie,_t),nI(Ie,E,R.length),R.push(_t),at.directiveStart++,at.directiveEnd++,me&&(at.providerIndexes+=1048576),j.push(Zi),je.push(Zi)):(j[yo]=Zi,je[yo]=Zi)}else{const Zi=oI(_t,R,wn+zi,di),yo=oI(_t,R,wn,wn+zi),Tr=yo>=0&&j[yo];if(me&&!Tr||!me&&!(Zi>=0&&j[Zi])){qS(JS(at,je),Ie,_t);const Br=function d1(E,R,j,ne,me){const Ie=new Ui(E,j,KC);return Ie.multi=[],Ie.index=R,Ie.componentProviders=0,iI(Ie,me,ne&&!j),Ie}(me?Cx:c1,j.length,me,ne,tn);!me&&Tr&&(j[yo].providerFactory=Br),nI(Ie,E,R.length,0),R.push(_t),at.directiveStart++,at.directiveEnd++,me&&(at.providerIndexes+=1048576),j.push(Br),je.push(Br)}else nI(Ie,E,Zi>-1?Zi:yo,iI(j[me?yo:Zi],tn,!me&&ne));!me&&ne&&Tr&&j[yo].componentProviders++}}}function nI(E,R,j,ne){const me=Va(R),Ie=function ac(E){return!!E.useClass}(R);if(me||Ie){const _t=(Ie?$r(R.useClass):R).prototype.ngOnDestroy;if(_t){const tn=E.destroyHooks||(E.destroyHooks=[]);if(!me&&R.multi){const wn=tn.indexOf(j);-1===wn?tn.push(j,[ne,_t]):tn[wn+1].push(ne,_t)}else tn.push(j,_t)}}}function iI(E,R,j){return j&&E.componentProviders++,E.multi.push(R)-1}function oI(E,R,j,ne){for(let me=j;me<ne;me++)if(R[me]===E)return me;return-1}function c1(E,R,j,ne){return Kh(this.multi,[])}function Cx(E,R,j,ne){const me=this.multi;let Ie;if(this.providerFactory){const je=this.providerFactory.componentProviders,at=PC(j,j[Or],this.providerFactory.index,ne);Ie=at.slice(0,je),Kh(me,Ie);for(let _t=je;_t<at.length;_t++)Ie.push(at[_t])}else Ie=[],Kh(me,Ie);return Ie}function Kh(E,R){for(let j=0;j<E.length;j++)R.push((0,E[j])());return R}function mS(E,R=[]){return j=>{j.providersResolver=(ne,me)=>function JO(E,R,j){const ne=ks();if(ne.firstCreatePass){const me=Bu(E);tI(j,ne.data,ne.blueprint,me,!0),tI(R,ne.data,ne.blueprint,me,!1)}}(ne,me?me(E):E,R)}}let qO=(()=>{class E{constructor(j){this._injector=j,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(j){if(!j.standalone)return null;if(!this.cachedInjectors.has(j)){const ne=Mt(0,j.type),me=ne.length>0?H0([ne],this._injector,`Standalone[${j.type.name}]`):null;this.cachedInjectors.set(j,me)}return this.cachedInjectors.get(j)}ngOnDestroy(){try{for(const j of this.cachedInjectors.values())null!==j&&j.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=ft({token:E,providedIn:"environment",factory:()=>new E(Vs(xc))})}}return E})();function V_(E){_d("NgStandalone"),E.getStandaloneInjector=R=>R.get(qO).getOrCreateStandaloneInjector(E)}function ta(E,R,j){const ne=E.\u0275cmp;ne.directiveDefs=$p(R,!1),ne.pipeDefs=$p(j,!0)}function h1(E,R,j){const ne=yl()+E,me=Ho();return me[ne]===da?Gh(me,ne,j?R.call(j):R()):function E_(E,R){return E[R]}(me,ne)}function tw(E,R,j,ne){return xN(Ho(),yl(),E,R,j,ne)}function Oy(E,R,j,ne,me){return aI(Ho(),yl(),E,R,j,ne,me)}function p1(E,R,j,ne,me,Ie){return lI(Ho(),yl(),E,R,j,ne,me,Ie)}function bx(E,R,j,ne,me,Ie,je){return function H_(E,R,j,ne,me,Ie,je,at,_t){const tn=R+j;return Cc(E,tn,me,Ie,je,at)?Gh(E,tn+4,_t?ne.call(_t,me,Ie,je,at):ne(me,Ie,je,at)):nw(E,tn+4)}(Ho(),yl(),E,R,j,ne,me,Ie,je)}function nw(E,R){const j=E[R];return j===da?void 0:j}function xN(E,R,j,ne,me,Ie){const je=R+j;return Tl(E,je,me)?Gh(E,je+1,Ie?ne.call(Ie,me):ne(me)):nw(E,je+1)}function aI(E,R,j,ne,me,Ie,je){const at=R+j;return gh(E,at,me,Ie)?Gh(E,at+2,je?ne.call(je,me,Ie):ne(me,Ie)):nw(E,at+2)}function lI(E,R,j,ne,me,Ie,je,at){const _t=R+j;return xu(E,_t,me,Ie,je)?Gh(E,_t+3,at?ne.call(at,me,Ie,je):ne(me,Ie,je)):nw(E,_t+3)}function iw(E,R){const j=ks();let ne;const me=E+ss;j.firstCreatePass?(ne=function g1(E,R){if(R)for(let j=R.length-1;j>=0;j--){const ne=R[j];if(E===ne.name)return ne}}(R,j.pipeRegistry),j.data[me]=ne,ne.onDestroy&&(j.destroyHooks??=[]).push(me,ne.onDestroy)):ne=j.data[me];const Ie=ne.factory||(ne.factory=Eh(ne.type)),at=Lc(KC);try{const _t=Qg(!1),tn=Ie();return Qg(_t),function WA(E,R,j,ne){j>=E.data.length&&(E.data[j]=null,E.blueprint[j]=null),R[j]=ne}(j,Ho(),me,tn),tn}finally{Lc(at)}}function CS(E,R,j){const ne=E+ss,me=Ho(),Ie=Gi(me,ne);return yS(me,ne)?xN(me,yl(),R,Ie.transform,j,Ie):Ie.transform(j)}function wy(E,R,j,ne){const me=E+ss,Ie=Ho(),je=Gi(Ie,me);return yS(Ie,me)?aI(Ie,yl(),R,je.transform,j,ne,je):je.transform(j,ne)}function cI(E,R,j,ne,me){const Ie=E+ss,je=Ho(),at=Gi(je,Ie);return yS(je,Ie)?lI(je,yl(),R,at.transform,j,ne,me,at):at.transform(j,ne,me)}function yS(E,R){return E[Or].data[R].pure}function EN(E,R){return f_(E,R)}class Qd{constructor(R){this.full=R;const j=R.split(".");this.major=j[0],this.minor=j[1],this.patch=j.slice(2).join(".")}}const T1=new Qd("18.1.2");let D1=(()=>{class E{log(j){console.log(j)}warn(j){console.warn(j)}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"platform"})}}return E})();const hw=new Ji(""),td=new Ji("");let Iy,z_=(()=>{class E{constructor(j,ne,me){this._ngZone=j,this.registry=ne,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,Iy||(function SS(E){Iy=E}(me),me.addToWindow(ne)),this._watchAngularEvents(),j.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{bl.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let j=this._callbacks.pop();clearTimeout(j.timeoutId),j.doneCb()}});else{let j=this.getPendingTasks();this._callbacks=this._callbacks.filter(ne=>!ne.updateCb||!ne.updateCb(j)||(clearTimeout(ne.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(j=>({source:j.source,creationLocation:j.creationLocation,data:j.data})):[]}addCallback(j,ne,me){let Ie=-1;ne&&ne>0&&(Ie=setTimeout(()=>{this._callbacks=this._callbacks.filter(je=>je.timeoutId!==Ie),j()},ne)),this._callbacks.push({doneCb:j,timeoutId:Ie,updateCb:me})}whenStable(j,ne,me){if(me&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(j,ne,me),this._runCallbacksIfReady()}registerApplication(j){this.registry.registerApplication(j,this)}unregisterApplication(j){this.registry.unregisterApplication(j)}findProviders(j,ne,me){return[]}static{this.\u0275fac=function(ne){return new(ne||E)(Vs(bl),Vs(lC),Vs(td))}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac})}}return E})(),lC=(()=>{class E{constructor(){this._applications=new Map}registerApplication(j,ne){this._applications.set(j,ne)}unregisterApplication(j){this._applications.delete(j)}unregisterAllApplications(){this._applications.clear()}getTestability(j){return this._applications.get(j)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(j,ne=!0){return Iy?.findTestabilityInTree(this,j,ne)??null}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"platform"})}}return E})();function Zu(E){return!!E&&"function"==typeof E.then}function Ox(E){return!!E&&"function"==typeof E.subscribe}const k1=new Ji("");let Py=(()=>{class E{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((j,ne)=>{this.resolve=j,this.reject=ne}),this.appInits=mr(k1,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const j=[];for(const me of this.appInits){const Ie=me();if(Zu(Ie))j.push(Ie);else if(Ox(Ie)){const je=new Promise((at,_t)=>{Ie.subscribe({complete:at,error:_t})});j.push(je)}}const ne=()=>{this.done=!0,this.resolve()};Promise.all(j).then(()=>{ne()}).catch(me=>{this.reject(me)}),0===j.length&&ne(),this.initialized=!0}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"root"})}}return E})();const ES=new Ji("");function yI(E,R){return Array.isArray(R)?R.reduce(yI,E):{...E,...R}}let Ch=(()=>{class E{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=mr(nT),this.afterRenderEffectManager=mr(zb),this.zonelessEnabled=mr($u),this.externalTestViews=new Set,this.beforeRender=new ge.B7,this.afterTick=new ge.B7,this.componentTypes=[],this.components=[],this.isStable=mr(kC).hasPendingTasks.pipe((0,xe.T)(j=>!j)),this._injector=mr(xc)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(j,ne){const me=j instanceof vf;if(!this._injector.get(Py).done)throw!me&&Nd(j),new Fo(405,!1);let je;je=me?j:this._injector.get(ju).resolveComponentFactory(j),this.componentTypes.push(je.componentType);const at=function CI(E){return E.isBoundToModule}(je)?void 0:this._injector.get($v),tn=je.create(uc.NULL,[],ne||je.selector,at),wn=tn.location.nativeElement,di=tn.injector.get(hw,null);return di?.registerApplication(wn),tn.onDestroy(()=>{this.detachView(tn.hostView),My(this.components,tn),di?.unregisterApplication(wn)}),this._loadComponent(tn),tn}tick(){this._tick(!0)}_tick(j){if(this._runningTick)throw new Fo(101,!1);const ne=S(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(j)}catch(me){this.internalErrorHandler(me)}finally{this._runningTick=!1,S(ne),this.afterTick.next()}}detectChangesInAttachedViews(j){let ne=null;this._injector.destroyed||(ne=this._injector.get(v_,null,{optional:!0}));let me=0;const Ie=this.afterRenderEffectManager;for(;me<10;){const je=0===me;if(j||!je){this.beforeRender.next(je);for(let{_lView:at,notifyErrorHandler:_t}of this._views)KN(at,_t,je,this.zonelessEnabled)}else ne?.begin?.(),ne?.end?.();if(me++,Ie.executeInternalCallbacks(),!this.allViews.some(({_lView:at})=>Ds(at))&&(Ie.execute(),!this.allViews.some(({_lView:at})=>Ds(at))))break}}attachView(j){const ne=j;this._views.push(ne),ne.attachToAppRef(this)}detachView(j){const ne=j;My(this._views,ne),ne.detachFromAppRef()}_loadComponent(j){this.attachView(j.hostView),this.tick(),this.components.push(j);const ne=this._injector.get(ES,[]);[...this._bootstrapListeners,...ne].forEach(me=>me(j))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(j=>j()),this._views.slice().forEach(j=>j.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(j){return this._destroyListeners.push(j),()=>My(this._destroyListeners,j)}destroy(){if(this._destroyed)throw new Fo(406,!1);const j=this._injector;j.destroy&&!j.destroyed&&j.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"root"})}}return E})();function My(E,R){const j=E.indexOf(R);j>-1&&E.splice(j,1)}function KN(E,R,j,ne){(j||Ds(E))&&qC(E,R,j&&!ne?0:1)}class XN{constructor(R,j){this.ngModuleFactory=R,this.componentFactories=j}}let U2=(()=>{class E{compileModuleSync(j){return new Sf(j)}compileModuleAsync(j){return Promise.resolve(this.compileModuleSync(j))}compileModuleAndAllComponentsSync(j){const ne=this.compileModuleSync(j),Ie=Rl(sc(j).declarations).reduce((je,at)=>{const _t=Qs(at);return _t&&je.push(new pg(_t)),je},[]);return new XN(ne,Ie)}compileModuleAndAllComponentsAsync(j){return Promise.resolve(this.compileModuleAndAllComponentsSync(j))}clearCache(){}clearCacheFor(j){}getModuleId(j){}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"root"})}}return E})();const L1=new Ji("");class bI{}let ZN=(()=>{class E{constructor(){this.zone=mr(bl),this.changeDetectionScheduler=mr(_u),this.applicationRef=mr(Ch)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"root"})}}return E})();function F1({ngZoneFactory:E,ignoreChangesOutsideZone:R}){return E??=()=>new bl(V1()),[{provide:bl,useFactory:E},{provide:ad,multi:!0,useFactory:()=>{const j=mr(ZN,{optional:!0});return()=>j.initialize()}},{provide:ad,multi:!0,useFactory:()=>{const j=mr(z2);return()=>{j.initialize()}}},{provide:nT,useFactory:QN},!0===R?{provide:mD,useValue:!0}:[]]}function QN(){const E=mr(bl),R=mr(Jg);return j=>E.runOutsideAngular(()=>R.handleError(j))}function V1(E){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:E?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:E?.runCoalescing??!1}}let z2=(()=>{class E{constructor(){this.subscription=new fe.y,this.initialized=!1,this.zone=mr(bl),this.pendingTasks=mr(kC)}initialize(){if(this.initialized)return;this.initialized=!0;let j=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(j=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{bl.assertNotInAngularZone(),queueMicrotask(()=>{null!==j&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(j),j=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{bl.assertInAngularZone(),j??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"root"})}}return E})(),wS=(()=>{class E{constructor(){this.appRef=mr(Ch),this.taskService=mr(kC),this.ngZone=mr(bl),this.zonelessEnabled=mr($u),this.disableScheduling=mr(mD,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new fe.y,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof A0||!this.zoneIsDefined)}notify(j){if(!this.zonelessEnabled&&5===j)return;switch(j){case 3:case 2:case 0:case 4:case 5:case 1:this.shouldRefreshViews=!0}if(!this.shouldScheduleTick())return;const ne=this.useMicrotaskScheduler?eO:_D;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=ne(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=ne(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&bl.isInAngularZone())}tick(j){if(this.runningTick||this.appRef.destroyed)return;const ne=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(j)},void 0,this.schedulerTickApplyArgs)}catch(me){throw this.taskService.remove(ne),me}finally{this.cleanup()}this.useMicrotaskScheduler=!0,eO(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(ne)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const j=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(j)}}static{this.\u0275fac=function(ne){return new(ne||E)}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"root"})}}return E})();const fw=new Ji("",{providedIn:"root",factory:()=>mr(fw,Ls.Optional|Ls.SkipSelf)||function gw(){return typeof $localize<"u"&&$localize.locale||ul}()}),qN=new Ji("",{providedIn:"root",factory:()=>"USD"}),xI=new Ji("");let SI=(()=>{class E{constructor(j){this._injector=j,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(j,ne){const me=function Uv(E="zone.js",R){return"noop"===E?new A0:"zone.js"===E?new bl(R):E}(ne?.ngZone,V1({eventCoalescing:ne?.ngZoneEventCoalescing,runCoalescing:ne?.ngZoneRunCoalescing}));return me.run(()=>{const Ie=ne?.ignoreChangesOutsideZone,je=function tR(E,R,j){return new F0(E,R,j)}(j.moduleType,this.injector,[...F1({ngZoneFactory:()=>me,ignoreChangesOutsideZone:Ie}),{provide:_u,useExisting:wS}]),at=je.injector.get(Jg,null);return me.runOutsideAngular(()=>{const _t=me.onError.subscribe({next:tn=>{at.handleError(tn)}});je.onDestroy(()=>{My(this._modules,je),_t.unsubscribe()})}),function cC(E,R,j){try{const ne=j();return Zu(ne)?ne.catch(me=>{throw R.runOutsideAngular(()=>E.handleError(me)),me}):ne}catch(ne){throw R.runOutsideAngular(()=>E.handleError(ne)),ne}}(at,me,()=>{const _t=je.injector.get(Py);return _t.runInitializers(),_t.donePromise.then(()=>(function AR(E){"string"==typeof E&&(TA=E.toLowerCase().replace(/_/g,"-"))}(je.injector.get(fw,ul)||ul),this._moduleDoBootstrap(je),je))})})}bootstrapModule(j,ne=[]){const me=yI({},ne);return function B1(E,R,j){const ne=new Sf(j);return Promise.resolve(ne)}(0,0,j).then(Ie=>this.bootstrapModuleFactory(Ie,me))}_moduleDoBootstrap(j){const ne=j.injector.get(Ch);if(j._bootstrapComponents.length>0)j._bootstrapComponents.forEach(me=>ne.bootstrap(me));else{if(!j.instance.ngDoBootstrap)throw new Fo(-403,!1);j.instance.ngDoBootstrap(ne)}this._modules.push(j)}onDestroy(j){this._destroyListeners.push(j)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Fo(404,!1);this._modules.slice().forEach(ne=>ne.destroy()),this._destroyListeners.forEach(ne=>ne());const j=this._injector.get(xI,null);j&&(j.forEach(ne=>ne()),j.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(ne){return new(ne||E)(Vs(uc))}}static{this.\u0275prov=ft({token:E,factory:E.\u0275fac,providedIn:"platform"})}}return E})(),dC=null;const G1=new Ji("");function W1(E,R,j=[]){const ne=`Platform: ${R}`,me=new Ji(ne);return(Ie=[])=>{let je=EI();if(!je||je.injector.get(G1,!1)){const at=[...j,...Ie,{provide:me,useValue:!0}];E?E(at):function wx(E){if(dC&&!dC.get(G1,!1))throw new Fo(400,!1);(function vI(){!function Q(E){Y=E}(()=>{throw new Fo(600,!1)})})(),dC=E;const R=E.get(SI);(function OI(E){E.get(au,null)?.forEach(j=>j())})(E)}(function $1(E=[],R){return uc.create({name:R,providers:[{provide:lc,useValue:"platform"},{provide:xI,useValue:new Set([()=>dC=null])},...E]})}(at,ne))}return function eF(E){const R=EI();if(!R)throw new Fo(401,!1);return R}()}}function EI(){return dC?.get(SI)??null}function j2(){}let oF=(()=>{class E{static{this.__NG_ELEMENT_ID__=K2}}return E})();function K2(E){return function K1(E,R,j){if(Dd(E)&&!j){const ne=bo(E.index,R);return new Pb(ne,ne)}return 175&E.type?new Pb(R[Ol],R):null}(ba(),Ho(),!(16&~E))}class DI{constructor(){}supports(R){return wl(R)}create(R){return new Ry(R)}}const AS=(E,R)=>R;class Ry{constructor(R){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=R||AS}forEachItem(R){let j;for(j=this._itHead;null!==j;j=j._next)R(j)}forEachOperation(R){let j=this._itHead,ne=this._removalsHead,me=0,Ie=null;for(;j||ne;){const je=!ne||j&&j.currentIndex<q1(ne,me,Ie)?j:ne,at=q1(je,me,Ie),_t=je.currentIndex;if(je===ne)me--,ne=ne._nextRemoved;else if(j=j._next,null==je.previousIndex)me++;else{Ie||(Ie=[]);const tn=at-me,wn=_t-me;if(tn!=wn){for(let zi=0;zi<tn;zi++){const Zi=zi<Ie.length?Ie[zi]:Ie[zi]=0,yo=Zi+zi;wn<=yo&&yo<tn&&(Ie[zi]=Zi+1)}Ie[je.previousIndex]=wn-tn}}at!==_t&&R(je,at,_t)}}forEachPreviousItem(R){let j;for(j=this._previousItHead;null!==j;j=j._nextPrevious)R(j)}forEachAddedItem(R){let j;for(j=this._additionsHead;null!==j;j=j._nextAdded)R(j)}forEachMovedItem(R){let j;for(j=this._movesHead;null!==j;j=j._nextMoved)R(j)}forEachRemovedItem(R){let j;for(j=this._removalsHead;null!==j;j=j._nextRemoved)R(j)}forEachIdentityChange(R){let j;for(j=this._identityChangesHead;null!==j;j=j._nextIdentityChange)R(j)}diff(R){if(null==R&&(R=[]),!wl(R))throw new Fo(900,!1);return this.check(R)?this:null}onDestroy(){}check(R){this._reset();let me,Ie,je,j=this._itHead,ne=!1;if(Array.isArray(R)){this.length=R.length;for(let at=0;at<this.length;at++)Ie=R[at],je=this._trackByFn(at,Ie),null!==j&&Object.is(j.trackById,je)?(ne&&(j=this._verifyReinsertion(j,Ie,je,at)),Object.is(j.item,Ie)||this._addIdentityChange(j,Ie)):(j=this._mismatch(j,Ie,je,at),ne=!0),j=j._next}else me=0,function cy(E,R){if(Array.isArray(E))for(let j=0;j<E.length;j++)R(E[j]);else{const j=E[Symbol.iterator]();let ne;for(;!(ne=j.next()).done;)R(ne.value)}}(R,at=>{je=this._trackByFn(me,at),null!==j&&Object.is(j.trackById,je)?(ne&&(j=this._verifyReinsertion(j,at,je,me)),Object.is(j.item,at)||this._addIdentityChange(j,at)):(j=this._mismatch(j,at,je,me),ne=!0),j=j._next,me++}),this.length=me;return this._truncate(j),this.collection=R,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let R;for(R=this._previousItHead=this._itHead;null!==R;R=R._next)R._nextPrevious=R._next;for(R=this._additionsHead;null!==R;R=R._nextAdded)R.previousIndex=R.currentIndex;for(this._additionsHead=this._additionsTail=null,R=this._movesHead;null!==R;R=R._nextMoved)R.previousIndex=R.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(R,j,ne,me){let Ie;return null===R?Ie=this._itTail:(Ie=R._prev,this._remove(R)),null!==(R=null===this._unlinkedRecords?null:this._unlinkedRecords.get(ne,null))?(Object.is(R.item,j)||this._addIdentityChange(R,j),this._reinsertAfter(R,Ie,me)):null!==(R=null===this._linkedRecords?null:this._linkedRecords.get(ne,me))?(Object.is(R.item,j)||this._addIdentityChange(R,j),this._moveAfter(R,Ie,me)):R=this._addAfter(new lF(j,ne),Ie,me),R}_verifyReinsertion(R,j,ne,me){let Ie=null===this._unlinkedRecords?null:this._unlinkedRecords.get(ne,null);return null!==Ie?R=this._reinsertAfter(Ie,R._prev,me):R.currentIndex!=me&&(R.currentIndex=me,this._addToMoves(R,me)),R}_truncate(R){for(;null!==R;){const j=R._next;this._addToRemovals(this._unlink(R)),R=j}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(R,j,ne){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(R);const me=R._prevRemoved,Ie=R._nextRemoved;return null===me?this._removalsHead=Ie:me._nextRemoved=Ie,null===Ie?this._removalsTail=me:Ie._prevRemoved=me,this._insertAfter(R,j,ne),this._addToMoves(R,ne),R}_moveAfter(R,j,ne){return this._unlink(R),this._insertAfter(R,j,ne),this._addToMoves(R,ne),R}_addAfter(R,j,ne){return this._insertAfter(R,j,ne),this._additionsTail=null===this._additionsTail?this._additionsHead=R:this._additionsTail._nextAdded=R,R}_insertAfter(R,j,ne){const me=null===j?this._itHead:j._next;return R._next=me,R._prev=j,null===me?this._itTail=R:me._prev=R,null===j?this._itHead=R:j._next=R,null===this._linkedRecords&&(this._linkedRecords=new AI),this._linkedRecords.put(R),R.currentIndex=ne,R}_remove(R){return this._addToRemovals(this._unlink(R))}_unlink(R){null!==this._linkedRecords&&this._linkedRecords.remove(R);const j=R._prev,ne=R._next;return null===j?this._itHead=ne:j._next=ne,null===ne?this._itTail=j:ne._prev=j,R}_addToMoves(R,j){return R.previousIndex===j||(this._movesTail=null===this._movesTail?this._movesHead=R:this._movesTail._nextMoved=R),R}_addToRemovals(R){return null===this._unlinkedRecords&&(this._unlinkedRecords=new AI),this._unlinkedRecords.put(R),R.currentIndex=null,R._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=R,R._prevRemoved=null):(R._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=R),R}_addIdentityChange(R,j){return R.item=j,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=R:this._identityChangesTail._nextIdentityChange=R,R}}class lF{constructor(R,j){this.item=R,this.trackById=j,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class J1{constructor(){this._head=null,this._tail=null}add(R){null===this._head?(this._head=this._tail=R,R._nextDup=null,R._prevDup=null):(this._tail._nextDup=R,R._prevDup=this._tail,R._nextDup=null,this._tail=R)}get(R,j){let ne;for(ne=this._head;null!==ne;ne=ne._nextDup)if((null===j||j<=ne.currentIndex)&&Object.is(ne.trackById,R))return ne;return null}remove(R){const j=R._prevDup,ne=R._nextDup;return null===j?this._head=ne:j._nextDup=ne,null===ne?this._tail=j:ne._prevDup=j,null===this._head}}class AI{constructor(){this.map=new Map}put(R){const j=R.trackById;let ne=this.map.get(j);ne||(ne=new J1,this.map.set(j,ne)),ne.add(R)}get(R,j){const me=this.map.get(R);return me?me.get(R,j):null}remove(R){const j=R.trackById;return this.map.get(j).remove(R)&&this.map.delete(j),R}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function q1(E,R,j){const ne=E.previousIndex;if(null===ne)return ne;let me=0;return j&&ne<j.length&&(me=j[ne]),ne+R+me}class ek{constructor(){}supports(R){return R instanceof Map||S_(R)}create(){return new tk}}class tk{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(R){let j;for(j=this._mapHead;null!==j;j=j._next)R(j)}forEachPreviousItem(R){let j;for(j=this._previousMapHead;null!==j;j=j._nextPrevious)R(j)}forEachChangedItem(R){let j;for(j=this._changesHead;null!==j;j=j._nextChanged)R(j)}forEachAddedItem(R){let j;for(j=this._additionsHead;null!==j;j=j._nextAdded)R(j)}forEachRemovedItem(R){let j;for(j=this._removalsHead;null!==j;j=j._nextRemoved)R(j)}diff(R){if(R){if(!(R instanceof Map||S_(R)))throw new Fo(900,!1)}else R=new Map;return this.check(R)?this:null}onDestroy(){}check(R){this._reset();let j=this._mapHead;if(this._appendAfter=null,this._forEach(R,(ne,me)=>{if(j&&j.key===me)this._maybeAddToChanges(j,ne),this._appendAfter=j,j=j._next;else{const Ie=this._getOrCreateRecordForKey(me,ne);j=this._insertBeforeOrAppend(j,Ie)}}),j){j._prev&&(j._prev._next=null),this._removalsHead=j;for(let ne=j;null!==ne;ne=ne._nextRemoved)ne===this._mapHead&&(this._mapHead=null),this._records.delete(ne.key),ne._nextRemoved=ne._next,ne.previousValue=ne.currentValue,ne.currentValue=null,ne._prev=null,ne._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(R,j){if(R){const ne=R._prev;return j._next=R,j._prev=ne,R._prev=j,ne&&(ne._next=j),R===this._mapHead&&(this._mapHead=j),this._appendAfter=R,R}return this._appendAfter?(this._appendAfter._next=j,j._prev=this._appendAfter):this._mapHead=j,this._appendAfter=j,null}_getOrCreateRecordForKey(R,j){if(this._records.has(R)){const me=this._records.get(R);this._maybeAddToChanges(me,j);const Ie=me._prev,je=me._next;return Ie&&(Ie._next=je),je&&(je._prev=Ie),me._next=null,me._prev=null,me}const ne=new II(R);return this._records.set(R,ne),ne.currentValue=j,this._addToAdditions(ne),ne}_reset(){if(this.isDirty){let R;for(this._previousMapHead=this._mapHead,R=this._previousMapHead;null!==R;R=R._next)R._nextPrevious=R._next;for(R=this._changesHead;null!==R;R=R._nextChanged)R.previousValue=R.currentValue;for(R=this._additionsHead;null!=R;R=R._nextAdded)R.previousValue=R.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(R,j){Object.is(j,R.currentValue)||(R.previousValue=R.currentValue,R.currentValue=j,this._addToChanges(R))}_addToAdditions(R){null===this._additionsHead?this._additionsHead=this._additionsTail=R:(this._additionsTail._nextAdded=R,this._additionsTail=R)}_addToChanges(R){null===this._changesHead?this._changesHead=this._changesTail=R:(this._changesTail._nextChanged=R,this._changesTail=R)}_forEach(R,j){R instanceof Map?R.forEach(j):Object.keys(R).forEach(ne=>j(R[ne],ne))}}class II{constructor(R){this.key=R,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function nk(){return new ik([new DI])}let ik=(()=>{class E{static{this.\u0275prov=ft({token:E,providedIn:"root",factory:nk})}constructor(j){this.factories=j}static create(j,ne){if(null!=ne){const me=ne.factories.slice();j=j.concat(me)}return new E(j)}static extend(j){return{provide:E,useFactory:ne=>E.create(j,ne||nk()),deps:[[E,new Nc,new od]]}}find(j){const ne=this.factories.find(me=>me.supports(j));if(null!=ne)return ne;throw new Fo(901,!1)}}return E})();function PI(){return new ky([new ek])}let ky=(()=>{class E{static{this.\u0275prov=ft({token:E,providedIn:"root",factory:PI})}constructor(j){this.factories=j}static create(j,ne){if(ne){const me=ne.factories.slice();j=j.concat(me)}return new E(j)}static extend(j){return{provide:E,useFactory:ne=>E.create(j,ne||PI()),deps:[[E,new Nc,new od]]}}find(j){const ne=this.factories.find(me=>me.supports(j));if(ne)return ne;throw new Fo(901,!1)}}return E})();const rk=W1(null,"core",[]);let sk=(()=>{class E{constructor(j){}static{this.\u0275fac=function(ne){return new(ne||E)(Vs(Ch))}}static{this.\u0275mod=Vg({type:E})}static{this.\u0275inj=jt({})}}return E})();const SF=new Ji("");function BF(E){return"boolean"==typeof E?E:null!=E&&"false"!==E}function $I(E,R){_d("NgSignals");const j=function B(E){const R=Object.create(re);R.computation=E;const j=()=>{if(u(R),s(R),R.value===ie)throw R.error;return R.value};return j[f]=R,j}(E);return R?.equal&&(j[f].equal=R.equal),j}function NF(E){const R=S(null);try{return E()}finally{S(R)}}const Ok=new Ji("",{providedIn:"root",factory:()=>mr(fH)});let fH=(()=>{class E{static{this.\u0275prov=ft({token:E,providedIn:"root",factory:()=>new FF})}}return E})();class FF{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=mr(kC),this.taskId=null}scheduleEffect(R){if(this.enqueue(R),null===this.taskId){const j=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(j),this.taskId=null})}}enqueue(R){const j=R.creationZone;this.queues.has(j)||this.queues.set(j,new Set);const ne=this.queues.get(j);ne.has(R)||(this.queuedEffectCount++,ne.add(R))}flush(){for(;this.queuedEffectCount>0;)for(const[R,j]of this.queues)null===R?this.flushQueue(j):R.run(()=>this.flushQueue(j))}flushQueue(R){for(const j of R)R.delete(j),this.queuedEffectCount--,j.run()}}class VF{constructor(R,j,ne,me,Ie,je){this.scheduler=R,this.effectFn=j,this.creationZone=ne,this.injector=Ie,this.watcher=function be(E,R,j){const ne=Object.create(le);j&&(ne.consumerAllowSignalWrites=!0),ne.fn=E,ne.schedule=R;const me=_t=>{ne.cleanupFn=_t};return ne.ref={notify:()=>_(ne),run:()=>{if(null===ne.fn)return;if(function y(){return P}())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(ne.dirty=!1,ne.hasRun&&!D(ne))return;ne.hasRun=!0;const _t=x(ne);try{ne.cleanupFn(),ne.cleanupFn=ve,ne.fn(me)}finally{w(ne,_t)}},cleanup:()=>ne.cleanupFn(),destroy:()=>function je(_t){(function Ie(_t){return null===_t.fn&&null===_t.schedule})(_t)||(C(_t),_t.cleanupFn(),_t.fn=null,_t.schedule=null,_t.cleanupFn=ve)}(ne),[f]:ne},ne.ref}(at=>this.runEffect(at),()=>this.schedule(),je),this.unregisterOnDestroy=me?.onDestroy(()=>this.destroy())}runEffect(R){try{this.effectFn(R)}catch(j){this.injector.get(Jg,null,{optional:!0})?.handleError(j)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}}function Tw(E,R){_d("NgSignals"),!R?.injector&&Ru();const j=R?.injector??mr(uc),ne=!0!==R?.manualCleanup?j.get(RC):null,me=new VF(j.get(Ok),E,typeof Zone>"u"?null:Zone.current,ne,j,R?.allowSignalWrites??!1),Ie=j.get(oF,null,{optional:!0});return Ie&&8&Ie._lView[ts]?(Ie._lView[ou]??=[]).push(me.watcher.notify):me.watcher.notify(),me}function jI(E,R){const j=Qs(E),ne=R.elementInjector||jp();return new pg(j).create(ne,R.projectableNodes,R.hostElement,R.environmentInjector)}function HF(E){const R=Qs(E);if(!R)return null;const j=new pg(R);return{get selector(){return j.selector},get type(){return j.componentType},get inputs(){return j.inputs},get outputs(){return j.outputs},get ngContentSelectors(){return j.ngContentSelectors},get isStandalone(){return R.standalone},get isSignal(){return R.signals}}}},1491:(In,Ze,M)=>{"use strict";M.d(Ze,{Zm:()=>g,xq:()=>si,me:()=>D,YN:()=>Ld,zX:()=>Ga,VZ:()=>ct,kq:()=>u,BC:()=>Be,cb:()=>Ue,cV:()=>fr,vS:()=>_n,Q0:()=>mi,Fm:()=>Sr,YS:()=>kn,qT:()=>Wt});var W=M(7788),o=M(6610),P=M(650),b=M(8556),f=M(8021),S=M(2123),T=M(3713);function d(Cn,vn){return new b.c(Ht=>{const Kn=Cn.length;if(0===Kn)return void Ht.complete();const yi=new Array(Kn);let Dr=0,us=0;for(let la=0;la<Kn;la++){const ya=(0,P.H)(Cn[la]);let Wa=!1;Ht.add(ya.subscribe({next:ft=>{Wa||(Wa=!0,us++),yi[la]=ft},error:ft=>Ht.error(ft),complete:()=>{Dr++,(Dr===Kn||!Wa)&&(us===Kn&&Ht.next(vn?vn.reduce((ft,ht,jt)=>(ft[ht]=yi[jt],ft),{}):yi),Ht.complete())}}))}})}var c=M(6343);let s=(()=>{class Cn{constructor(Ht,Kn){this._renderer=Ht,this._elementRef=Kn,this.onChange=yi=>{},this.onTouched=()=>{}}setProperty(Ht,Kn){this._renderer.setProperty(this._elementRef.nativeElement,Ht,Kn)}registerOnTouched(Ht){this.onTouched=Ht}registerOnChange(Ht){this.onChange=Ht}setDisabledState(Ht){this.setProperty("disabled",Ht)}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(W.sFG),W.rXU(W.aKT))}}static{this.\u0275dir=W.FsC({type:Cn})}}return Cn})(),a=(()=>{class Cn extends s{static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,features:[W.Vt3]})}}return Cn})();const u=new W.nKC(""),h={provide:u,useExisting:(0,W.Rfq)(()=>g),multi:!0};let g=(()=>{class Cn extends a{writeValue(Ht){this.setProperty("checked",Ht)}static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(Kn,yi){1&Kn&&W.bIt("change",function(us){return yi.onChange(us.target.checked)})("blur",function(){return yi.onTouched()})},features:[W.Jv_([h]),W.Vt3]})}}return Cn})();const _={provide:u,useExisting:(0,W.Rfq)(()=>D),multi:!0},w=new W.nKC("");let D=(()=>{class Cn extends s{constructor(Ht,Kn,yi){super(Ht,Kn),this._compositionMode=yi,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function x(){const Cn=(0,o.QT)()?(0,o.QT)().getUserAgent():"";return/android (\d+)/.test(Cn.toLowerCase())}())}writeValue(Ht){this.setProperty("value",Ht??"")}_handleInput(Ht){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(Ht)}_compositionStart(){this._composing=!0}_compositionEnd(Ht){this._composing=!1,this._compositionMode&&this.onChange(Ht)}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(W.sFG),W.rXU(W.aKT),W.rXU(w,8))}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(Kn,yi){1&Kn&&W.bIt("input",function(us){return yi._handleInput(us.target.value)})("blur",function(){return yi.onTouched()})("compositionstart",function(){return yi._compositionStart()})("compositionend",function(us){return yi._compositionEnd(us.target.value)})},features:[W.Jv_([_]),W.Vt3]})}}return Cn})();function C(Cn){return null==Cn||("string"==typeof Cn||Array.isArray(Cn))&&0===Cn.length}const L=new W.nKC(""),N=new W.nKC("");function K(Cn){return C(Cn.value)?{required:!0}:null}function J(Cn){return!0===Cn.value?null:{required:!0}}function Z(Cn){return null}function Q(Cn){return null!=Cn}function te(Cn){return(0,W.jNT)(Cn)?(0,P.H)(Cn):Cn}function pe(Cn){let vn={};return Cn.forEach(Ht=>{vn=null!=Ht?{...vn,...Ht}:vn}),0===Object.keys(vn).length?null:vn}function z(Cn,vn){return vn.map(Ht=>Ht(Cn))}function ae(Cn){return Cn.map(vn=>function oe(Cn){return!Cn.validate}(vn)?vn:Ht=>vn.validate(Ht))}function he(Cn){return null!=Cn?function ee(Cn){if(!Cn)return null;const vn=Cn.filter(Q);return 0==vn.length?null:function(Ht){return pe(z(Ht,vn))}}(ae(Cn)):null}function ue(Cn){return null!=Cn?function de(Cn){if(!Cn)return null;const vn=Cn.filter(Q);return 0==vn.length?null:function(Ht){return function y(...Cn){if(1===Cn.length){const vn=Cn[0];if((0,f.c)(vn))return d(vn,null);if((0,T.G)(vn)&&Object.getPrototypeOf(vn)===Object.prototype){const Ht=Object.keys(vn);return d(Ht.map(Kn=>vn[Kn]),Ht)}}if("function"==typeof Cn[Cn.length-1]){const vn=Cn.pop();return d(Cn=1===Cn.length&&(0,f.c)(Cn[0])?Cn[0]:Cn,null).pipe((0,S.T)(Ht=>vn(...Ht)))}return d(Cn,null)}(z(Ht,vn).map(te)).pipe((0,S.T)(pe))}}(ae(Cn)):null}function be(Cn,vn){return null===Cn?[vn]:Array.isArray(Cn)?[...Cn,vn]:[Cn,vn]}function Ce(Cn){return Cn?Array.isArray(Cn)?Cn:[Cn]:[]}function ye(Cn,vn){return Array.isArray(Cn)?Cn.includes(vn):Cn===vn}function ge(Cn,vn){const Ht=Ce(vn);return Ce(Cn).forEach(yi=>{ye(Ht,yi)||Ht.push(yi)}),Ht}function fe(Cn,vn){return Ce(vn).filter(Ht=>!ye(Cn,Ht))}class xe{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(vn){this._rawValidators=vn||[],this._composedValidatorFn=he(this._rawValidators)}_setAsyncValidators(vn){this._rawAsyncValidators=vn||[],this._composedAsyncValidatorFn=ue(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(vn){this._onDestroyCallbacks.push(vn)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(vn=>vn()),this._onDestroyCallbacks=[]}reset(vn=void 0){this.control&&this.control.reset(vn)}hasError(vn,Ht){return!!this.control&&this.control.hasError(vn,Ht)}getError(vn,Ht){return this.control?this.control.getError(vn,Ht):null}}class Te extends xe{get formDirective(){return null}get path(){return null}}class Ee extends xe{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Oe{constructor(vn){this._cd=vn}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let Be=(()=>{class Cn extends Oe{constructor(Ht){super(Ht)}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(Ee,2))}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(Kn,yi){2&Kn&&W.AVh("ng-untouched",yi.isUntouched)("ng-touched",yi.isTouched)("ng-pristine",yi.isPristine)("ng-dirty",yi.isDirty)("ng-valid",yi.isValid)("ng-invalid",yi.isInvalid)("ng-pending",yi.isPending)},features:[W.Vt3]})}}return Cn})(),Ue=(()=>{class Cn extends Oe{constructor(Ht){super(Ht)}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(Te,10))}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(Kn,yi){2&Kn&&W.AVh("ng-untouched",yi.isUntouched)("ng-touched",yi.isTouched)("ng-pristine",yi.isPristine)("ng-dirty",yi.isDirty)("ng-valid",yi.isValid)("ng-invalid",yi.isInvalid)("ng-pending",yi.isPending)("ng-submitted",yi.isSubmitted)},features:[W.Vt3]})}}return Cn})();const ri="VALID",Tn="INVALID",Jn="PENDING",wi="DISABLED";class Bn{}class gi extends Bn{constructor(vn,Ht){super(),this.value=vn,this.source=Ht}}class Ai extends Bn{constructor(vn,Ht){super(),this.pristine=vn,this.source=Ht}}class pt extends Bn{constructor(vn,Ht){super(),this.touched=vn,this.source=Ht}}class Dt extends Bn{constructor(vn,Ht){super(),this.status=vn,this.source=Ht}}function Et(Cn){return(Nt(Cn)?Cn.validators:Cn)||null}function $n(Cn,vn){return(Nt(vn)?vn.asyncValidators:Cn)||null}function Nt(Cn){return null!=Cn&&!Array.isArray(Cn)&&"object"==typeof Cn}class sn{constructor(vn,Ht){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=(0,W.EWP)(()=>this.statusReactive()),this.statusReactive=(0,W.vPA)(void 0),this._pristine=(0,W.EWP)(()=>this.pristineReactive()),this.pristineReactive=(0,W.vPA)(!0),this._touched=(0,W.EWP)(()=>this.touchedReactive()),this.touchedReactive=(0,W.vPA)(!1),this._events=new c.B7,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(vn),this._assignAsyncValidators(Ht)}get validator(){return this._composedValidatorFn}set validator(vn){this._rawValidators=this._composedValidatorFn=vn}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(vn){this._rawAsyncValidators=this._composedAsyncValidatorFn=vn}get parent(){return this._parent}get status(){return(0,W.O8t)(this.statusReactive)}set status(vn){(0,W.O8t)(()=>this.statusReactive.set(vn))}get valid(){return this.status===ri}get invalid(){return this.status===Tn}get pending(){return this.status==Jn}get disabled(){return this.status===wi}get enabled(){return this.status!==wi}get pristine(){return(0,W.O8t)(this.pristineReactive)}set pristine(vn){(0,W.O8t)(()=>this.pristineReactive.set(vn))}get dirty(){return!this.pristine}get touched(){return(0,W.O8t)(this.touchedReactive)}set touched(vn){(0,W.O8t)(()=>this.touchedReactive.set(vn))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(vn){this._assignValidators(vn)}setAsyncValidators(vn){this._assignAsyncValidators(vn)}addValidators(vn){this.setValidators(ge(vn,this._rawValidators))}addAsyncValidators(vn){this.setAsyncValidators(ge(vn,this._rawAsyncValidators))}removeValidators(vn){this.setValidators(fe(vn,this._rawValidators))}removeAsyncValidators(vn){this.setAsyncValidators(fe(vn,this._rawAsyncValidators))}hasValidator(vn){return ye(this._rawValidators,vn)}hasAsyncValidator(vn){return ye(this._rawAsyncValidators,vn)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(vn={}){const Ht=!1===this.touched;this.touched=!0;const Kn=vn.sourceControl??this;this._parent&&!vn.onlySelf&&this._parent.markAsTouched({...vn,sourceControl:Kn}),Ht&&!1!==vn.emitEvent&&this._events.next(new pt(!0,Kn))}markAllAsTouched(vn={}){this.markAsTouched({onlySelf:!0,emitEvent:vn.emitEvent,sourceControl:this}),this._forEachChild(Ht=>Ht.markAllAsTouched(vn))}markAsUntouched(vn={}){const Ht=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const Kn=vn.sourceControl??this;this._forEachChild(yi=>{yi.markAsUntouched({onlySelf:!0,emitEvent:vn.emitEvent,sourceControl:Kn})}),this._parent&&!vn.onlySelf&&this._parent._updateTouched(vn,Kn),Ht&&!1!==vn.emitEvent&&this._events.next(new pt(!1,Kn))}markAsDirty(vn={}){const Ht=!0===this.pristine;this.pristine=!1;const Kn=vn.sourceControl??this;this._parent&&!vn.onlySelf&&this._parent.markAsDirty({...vn,sourceControl:Kn}),Ht&&!1!==vn.emitEvent&&this._events.next(new Ai(!1,Kn))}markAsPristine(vn={}){const Ht=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const Kn=vn.sourceControl??this;this._forEachChild(yi=>{yi.markAsPristine({onlySelf:!0,emitEvent:vn.emitEvent})}),this._parent&&!vn.onlySelf&&this._parent._updatePristine(vn,Kn),Ht&&!1!==vn.emitEvent&&this._events.next(new Ai(!0,Kn))}markAsPending(vn={}){this.status=Jn;const Ht=vn.sourceControl??this;!1!==vn.emitEvent&&(this._events.next(new Dt(this.status,Ht)),this.statusChanges.emit(this.status)),this._parent&&!vn.onlySelf&&this._parent.markAsPending({...vn,sourceControl:Ht})}disable(vn={}){const Ht=this._parentMarkedDirty(vn.onlySelf);this.status=wi,this.errors=null,this._forEachChild(yi=>{yi.disable({...vn,onlySelf:!0})}),this._updateValue();const Kn=vn.sourceControl??this;!1!==vn.emitEvent&&(this._events.next(new gi(this.value,Kn)),this._events.next(new Dt(this.status,Kn)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...vn,skipPristineCheck:Ht},this),this._onDisabledChange.forEach(yi=>yi(!0))}enable(vn={}){const Ht=this._parentMarkedDirty(vn.onlySelf);this.status=ri,this._forEachChild(Kn=>{Kn.enable({...vn,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:vn.emitEvent}),this._updateAncestors({...vn,skipPristineCheck:Ht},this),this._onDisabledChange.forEach(Kn=>Kn(!1))}_updateAncestors(vn,Ht){this._parent&&!vn.onlySelf&&(this._parent.updateValueAndValidity(vn),vn.skipPristineCheck||this._parent._updatePristine({},Ht),this._parent._updateTouched({},Ht))}setParent(vn){this._parent=vn}getRawValue(){return this.value}updateValueAndValidity(vn={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const Kn=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ri||this.status===Jn)&&this._runAsyncValidator(Kn,vn.emitEvent)}const Ht=vn.sourceControl??this;!1!==vn.emitEvent&&(this._events.next(new gi(this.value,Ht)),this._events.next(new Dt(this.status,Ht)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!vn.onlySelf&&this._parent.updateValueAndValidity({...vn,sourceControl:Ht})}_updateTreeValidity(vn={emitEvent:!0}){this._forEachChild(Ht=>Ht._updateTreeValidity(vn)),this.updateValueAndValidity({onlySelf:!0,emitEvent:vn.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?wi:ri}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(vn,Ht){if(this.asyncValidator){this.status=Jn,this._hasOwnPendingAsyncValidator={emitEvent:!1!==Ht};const Kn=te(this.asyncValidator(this));this._asyncValidationSubscription=Kn.subscribe(yi=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(yi,{emitEvent:Ht,shouldHaveEmitted:vn})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const vn=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,vn}return!1}setErrors(vn,Ht={}){this.errors=vn,this._updateControlsErrors(!1!==Ht.emitEvent,this,Ht.shouldHaveEmitted)}get(vn){let Ht=vn;return null==Ht||(Array.isArray(Ht)||(Ht=Ht.split(".")),0===Ht.length)?null:Ht.reduce((Kn,yi)=>Kn&&Kn._find(yi),this)}getError(vn,Ht){const Kn=Ht?this.get(Ht):this;return Kn&&Kn.errors?Kn.errors[vn]:null}hasError(vn,Ht){return!!this.getError(vn,Ht)}get root(){let vn=this;for(;vn._parent;)vn=vn._parent;return vn}_updateControlsErrors(vn,Ht,Kn){this.status=this._calculateStatus(),vn&&this.statusChanges.emit(this.status),(vn||Kn)&&this._events.next(new Dt(this.status,Ht)),this._parent&&this._parent._updateControlsErrors(vn,Ht,Kn)}_initObservables(){this.valueChanges=new W.bkB,this.statusChanges=new W.bkB}_calculateStatus(){return this._allControlsDisabled()?wi:this.errors?Tn:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Jn)?Jn:this._anyControlsHaveStatus(Tn)?Tn:ri}_anyControlsHaveStatus(vn){return this._anyControls(Ht=>Ht.status===vn)}_anyControlsDirty(){return this._anyControls(vn=>vn.dirty)}_anyControlsTouched(){return this._anyControls(vn=>vn.touched)}_updatePristine(vn,Ht){const Kn=!this._anyControlsDirty(),yi=this.pristine!==Kn;this.pristine=Kn,this._parent&&!vn.onlySelf&&this._parent._updatePristine(vn,Ht),yi&&this._events.next(new Ai(this.pristine,Ht))}_updateTouched(vn={},Ht){this.touched=this._anyControlsTouched(),this._events.next(new pt(this.touched,Ht)),this._parent&&!vn.onlySelf&&this._parent._updateTouched(vn,Ht)}_registerOnCollectionChange(vn){this._onCollectionChange=vn}_setUpdateStrategy(vn){Nt(vn)&&null!=vn.updateOn&&(this._updateOn=vn.updateOn)}_parentMarkedDirty(vn){return!vn&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(vn){return null}_assignValidators(vn){this._rawValidators=Array.isArray(vn)?vn.slice():vn,this._composedValidatorFn=function hn(Cn){return Array.isArray(Cn)?he(Cn):Cn||null}(this._rawValidators)}_assignAsyncValidators(vn){this._rawAsyncValidators=Array.isArray(vn)?vn.slice():vn,this._composedAsyncValidatorFn=function Ln(Cn){return Array.isArray(Cn)?ue(Cn):Cn||null}(this._rawAsyncValidators)}}class It extends sn{constructor(vn,Ht,Kn){super(Et(Ht),$n(Kn,Ht)),this.controls=vn,this._initObservables(),this._setUpdateStrategy(Ht),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(vn,Ht){return this.controls[vn]?this.controls[vn]:(this.controls[vn]=Ht,Ht.setParent(this),Ht._registerOnCollectionChange(this._onCollectionChange),Ht)}addControl(vn,Ht,Kn={}){this.registerControl(vn,Ht),this.updateValueAndValidity({emitEvent:Kn.emitEvent}),this._onCollectionChange()}removeControl(vn,Ht={}){this.controls[vn]&&this.controls[vn]._registerOnCollectionChange(()=>{}),delete this.controls[vn],this.updateValueAndValidity({emitEvent:Ht.emitEvent}),this._onCollectionChange()}setControl(vn,Ht,Kn={}){this.controls[vn]&&this.controls[vn]._registerOnCollectionChange(()=>{}),delete this.controls[vn],Ht&&this.registerControl(vn,Ht),this.updateValueAndValidity({emitEvent:Kn.emitEvent}),this._onCollectionChange()}contains(vn){return this.controls.hasOwnProperty(vn)&&this.controls[vn].enabled}setValue(vn,Ht={}){(function on(Cn,vn,Ht){Cn._forEachChild((Kn,yi)=>{if(void 0===Ht[yi])throw new W.wOt(1002,"")})})(this,0,vn),Object.keys(vn).forEach(Kn=>{(function Gt(Cn,vn,Ht){const Kn=Cn.controls;if(!(vn?Object.keys(Kn):Kn).length)throw new W.wOt(1e3,"");if(!Kn[Ht])throw new W.wOt(1001,"")})(this,!0,Kn),this.controls[Kn].setValue(vn[Kn],{onlySelf:!0,emitEvent:Ht.emitEvent})}),this.updateValueAndValidity(Ht)}patchValue(vn,Ht={}){null!=vn&&(Object.keys(vn).forEach(Kn=>{const yi=this.controls[Kn];yi&&yi.patchValue(vn[Kn],{onlySelf:!0,emitEvent:Ht.emitEvent})}),this.updateValueAndValidity(Ht))}reset(vn={},Ht={}){this._forEachChild((Kn,yi)=>{Kn.reset(vn?vn[yi]:null,{onlySelf:!0,emitEvent:Ht.emitEvent})}),this._updatePristine(Ht,this),this._updateTouched(Ht,this),this.updateValueAndValidity(Ht)}getRawValue(){return this._reduceChildren({},(vn,Ht,Kn)=>(vn[Kn]=Ht.getRawValue(),vn))}_syncPendingControls(){let vn=this._reduceChildren(!1,(Ht,Kn)=>!!Kn._syncPendingControls()||Ht);return vn&&this.updateValueAndValidity({onlySelf:!0}),vn}_forEachChild(vn){Object.keys(this.controls).forEach(Ht=>{const Kn=this.controls[Ht];Kn&&vn(Kn,Ht)})}_setUpControls(){this._forEachChild(vn=>{vn.setParent(this),vn._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(vn){for(const[Ht,Kn]of Object.entries(this.controls))if(this.contains(Ht)&&vn(Kn))return!0;return!1}_reduceValue(){return this._reduceChildren({},(Ht,Kn,yi)=>((Kn.enabled||this.disabled)&&(Ht[yi]=Kn.value),Ht))}_reduceChildren(vn,Ht){let Kn=vn;return this._forEachChild((yi,Dr)=>{Kn=Ht(Kn,yi,Dr)}),Kn}_allControlsDisabled(){for(const vn of Object.keys(this.controls))if(this.controls[vn].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(vn){return this.controls.hasOwnProperty(vn)?this.controls[vn]:null}}const Ei=new W.nKC("CallSetDisabledState",{providedIn:"root",factory:()=>Hi}),Hi="always";function xo(Cn,vn,Ht=Hi){Zn(Cn,vn),vn.valueAccessor.writeValue(Cn.value),(Cn.disabled||"always"===Ht)&&vn.valueAccessor.setDisabledState?.(Cn.disabled),function po(Cn,vn){vn.valueAccessor.registerOnChange(Ht=>{Cn._pendingValue=Ht,Cn._pendingChange=!0,Cn._pendingDirty=!0,"change"===Cn.updateOn&&Xo(Cn,vn)})}(Cn,vn),function Hn(Cn,vn){const Ht=(Kn,yi)=>{vn.valueAccessor.writeValue(Kn),yi&&vn.viewToModelUpdate(Kn)};Cn.registerOnChange(Ht),vn._registerOnDestroy(()=>{Cn._unregisterOnChange(Ht)})}(Cn,vn),function nr(Cn,vn){vn.valueAccessor.registerOnTouched(()=>{Cn._pendingTouched=!0,"blur"===Cn.updateOn&&Cn._pendingChange&&Xo(Cn,vn),"submit"!==Cn.updateOn&&Cn.markAsTouched()})}(Cn,vn),function en(Cn,vn){if(vn.valueAccessor.setDisabledState){const Ht=Kn=>{vn.valueAccessor.setDisabledState(Kn)};Cn.registerOnDisabledChange(Ht),vn._registerOnDestroy(()=>{Cn._unregisterOnDisabledChange(Ht)})}}(Cn,vn)}function rn(Cn,vn){Cn.forEach(Ht=>{Ht.registerOnValidatorChange&&Ht.registerOnValidatorChange(vn)})}function Zn(Cn,vn){const Ht=function ve(Cn){return Cn._rawValidators}(Cn);null!==vn.validator?Cn.setValidators(be(Ht,vn.validator)):"function"==typeof Ht&&Cn.setValidators([Ht]);const Kn=function le(Cn){return Cn._rawAsyncValidators}(Cn);null!==vn.asyncValidator?Cn.setAsyncValidators(be(Kn,vn.asyncValidator)):"function"==typeof Kn&&Cn.setAsyncValidators([Kn]);const yi=()=>Cn.updateValueAndValidity();rn(vn._rawValidators,yi),rn(vn._rawAsyncValidators,yi)}function Xo(Cn,vn){Cn._pendingDirty&&Cn.markAsDirty(),Cn.setValue(Cn._pendingValue,{emitModelToViewChange:!1}),vn.viewToModelUpdate(Cn._pendingValue),Cn._pendingChange=!1}const Eo={provide:Te,useExisting:(0,W.Rfq)(()=>fr)},Jo=Promise.resolve();let fr=(()=>{class Cn extends Te{get submitted(){return(0,W.O8t)(this.submittedReactive)}constructor(Ht,Kn,yi){super(),this.callSetDisabledState=yi,this._submitted=(0,W.EWP)(()=>this.submittedReactive()),this.submittedReactive=(0,W.vPA)(!1),this._directives=new Set,this.ngSubmit=new W.bkB,this.form=new It({},he(Ht),ue(Kn))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(Ht){Jo.then(()=>{const Kn=this._findContainer(Ht.path);Ht.control=Kn.registerControl(Ht.name,Ht.control),xo(Ht.control,Ht,this.callSetDisabledState),Ht.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(Ht)})}getControl(Ht){return this.form.get(Ht.path)}removeControl(Ht){Jo.then(()=>{const Kn=this._findContainer(Ht.path);Kn&&Kn.removeControl(Ht.name),this._directives.delete(Ht)})}addFormGroup(Ht){Jo.then(()=>{const Kn=this._findContainer(Ht.path),yi=new It({});(function ui(Cn,vn){Zn(Cn,vn)})(yi,Ht),Kn.registerControl(Ht.name,yi),yi.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(Ht){Jo.then(()=>{const Kn=this._findContainer(Ht.path);Kn&&Kn.removeControl(Ht.name)})}getFormGroup(Ht){return this.form.get(Ht.path)}updateModel(Ht,Kn){Jo.then(()=>{this.form.get(Ht.path).setValue(Kn)})}setValue(Ht){this.control.setValue(Ht)}onSubmit(Ht){return this.submittedReactive.set(!0),function mn(Cn,vn){Cn._syncPendingControls(),vn.forEach(Ht=>{const Kn=Ht.control;"submit"===Kn.updateOn&&Kn._pendingChange&&(Ht.viewToModelUpdate(Kn._pendingValue),Kn._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(Ht),"dialog"===Ht?.target?.method}onReset(){this.resetForm()}resetForm(Ht=void 0){this.form.reset(Ht),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(Ht){return Ht.pop(),Ht.length?this.form.get(Ht):this.form}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(L,10),W.rXU(N,10),W.rXU(Ei,8))}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(Kn,yi){1&Kn&&W.bIt("submit",function(us){return yi.onSubmit(us)})("reset",function(){return yi.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[W.Jv_([Eo]),W.Vt3]})}}return Cn})();function Gr(Cn,vn){const Ht=Cn.indexOf(vn);Ht>-1&&Cn.splice(Ht,1)}function Yn(Cn){return"object"==typeof Cn&&null!==Cn&&2===Object.keys(Cn).length&&"value"in Cn&&"disabled"in Cn}const ei=class extends sn{constructor(vn=null,Ht,Kn){super(Et(Ht),$n(Kn,Ht)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(vn),this._setUpdateStrategy(Ht),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Nt(Ht)&&(Ht.nonNullable||Ht.initialValueIsDefault)&&(this.defaultValue=Yn(vn)?vn.value:vn)}setValue(vn,Ht={}){this.value=this._pendingValue=vn,this._onChange.length&&!1!==Ht.emitModelToViewChange&&this._onChange.forEach(Kn=>Kn(this.value,!1!==Ht.emitViewToModelChange)),this.updateValueAndValidity(Ht)}patchValue(vn,Ht={}){this.setValue(vn,Ht)}reset(vn=this.defaultValue,Ht={}){this._applyFormState(vn),this.markAsPristine(Ht),this.markAsUntouched(Ht),this.setValue(this.value,Ht),this._pendingChange=!1}_updateValue(){}_anyControls(vn){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(vn){this._onChange.push(vn)}_unregisterOnChange(vn){Gr(this._onChange,vn)}registerOnDisabledChange(vn){this._onDisabledChange.push(vn)}_unregisterOnDisabledChange(vn){Gr(this._onDisabledChange,vn)}_forEachChild(vn){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(vn){Yn(vn)?(this.value=this._pendingValue=vn.value,vn.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=vn}},dn={provide:Ee,useExisting:(0,W.Rfq)(()=>_n)},an=Promise.resolve();let _n=(()=>{class Cn extends Ee{constructor(Ht,Kn,yi,Dr,us,la){super(),this._changeDetectorRef=us,this.callSetDisabledState=la,this.control=new ei,this._registered=!1,this.name="",this.update=new W.bkB,this._parent=Ht,this._setValidators(Kn),this._setAsyncValidators(yi),this.valueAccessor=function pi(Cn,vn){if(!vn)return null;let Ht,Kn,yi;return Array.isArray(vn),vn.forEach(Dr=>{Dr.constructor===D?Ht=Dr:function Rt(Cn){return Object.getPrototypeOf(Cn.constructor)===a}(Dr)?Kn=Dr:yi=Dr}),yi||Kn||Ht||null}(0,Dr)}ngOnChanges(Ht){if(this._checkForErrors(),!this._registered||"name"in Ht){if(this._registered&&(this._checkName(),this.formDirective)){const Kn=Ht.name.previousValue;this.formDirective.removeControl({name:Kn,path:this._getPath(Kn)})}this._setUpControl()}"isDisabled"in Ht&&this._updateDisabled(Ht),function hr(Cn,vn){if(!Cn.hasOwnProperty("model"))return!1;const Ht=Cn.model;return!!Ht.isFirstChange()||!Object.is(vn,Ht.currentValue)}(Ht,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(Ht){this.viewModel=Ht,this.update.emit(Ht)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){xo(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(Ht){an.then(()=>{this.control.setValue(Ht,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(Ht){const Kn=Ht.isDisabled.currentValue,yi=0!==Kn&&(0,W.L39)(Kn);an.then(()=>{yi&&!this.control.disabled?this.control.disable():!yi&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(Ht){return this._parent?function mo(Cn,vn){return[...vn.path,Cn]}(Ht,this._parent):[Ht]}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(Te,9),W.rXU(L,10),W.rXU(N,10),W.rXU(u,10),W.rXU(W.gRc,8),W.rXU(Ei,8))}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[W.Jv_([dn]),W.Vt3,W.OA$]})}}return Cn})(),Wt=(()=>{class Cn{static{this.\u0275fac=function(Kn){return new(Kn||Cn)}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return Cn})();const zn={provide:u,useExisting:(0,W.Rfq)(()=>mi),multi:!0};let mi=(()=>{class Cn extends a{writeValue(Ht){this.setProperty("value",Ht??"")}registerOnChange(Ht){this.onChange=Kn=>{Ht(""==Kn?null:parseFloat(Kn))}}static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(Kn,yi){1&Kn&&W.bIt("input",function(us){return yi.onChange(us.target.value)})("blur",function(){return yi.onTouched()})},features:[W.Jv_([zn]),W.Vt3]})}}return Cn})();const Si={provide:u,useExisting:(0,W.Rfq)(()=>Sr),multi:!0};let No=(()=>{class Cn{constructor(){this._accessors=[]}add(Ht,Kn){this._accessors.push([Ht,Kn])}remove(Ht){for(let Kn=this._accessors.length-1;Kn>=0;--Kn)if(this._accessors[Kn][1]===Ht)return void this._accessors.splice(Kn,1)}select(Ht){this._accessors.forEach(Kn=>{this._isSameGroup(Kn,Ht)&&Kn[1]!==Ht&&Kn[1].fireUncheck(Ht.value)})}_isSameGroup(Ht,Kn){return!!Ht[0].control&&Ht[0]._parent===Kn._control._parent&&Ht[1].name===Kn.name}static{this.\u0275fac=function(Kn){return new(Kn||Cn)}}static{this.\u0275prov=W.jDH({token:Cn,factory:Cn.\u0275fac,providedIn:"root"})}}return Cn})(),Sr=(()=>{class Cn extends a{constructor(Ht,Kn,yi,Dr){super(Ht,Kn),this._registry=yi,this._injector=Dr,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=(0,W.WQX)(Ei,{optional:!0})??Hi}ngOnInit(){this._control=this._injector.get(Ee),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(Ht){this._state=Ht===this.value,this.setProperty("checked",this._state)}registerOnChange(Ht){this._fn=Ht,this.onChange=()=>{Ht(this.value),this._registry.select(this)}}setDisabledState(Ht){(this.setDisabledStateFired||Ht||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",Ht),this.setDisabledStateFired=!0}fireUncheck(Ht){this.writeValue(Ht)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.\u0275fac=function(Kn){return new(Kn||Cn)(W.rXU(W.sFG),W.rXU(W.aKT),W.rXU(No),W.rXU(W.zZn))}}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(Kn,yi){1&Kn&&W.bIt("change",function(){return yi.onChange()})("blur",function(){return yi.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[W.Jv_([Si]),W.Vt3]})}}return Cn})();function es(Cn){return"number"==typeof Cn?Cn:parseFloat(Cn)}let gs=(()=>{class Cn{constructor(){this._validator=Z}ngOnChanges(Ht){if(this.inputName in Ht){const Kn=this.normalizeInput(Ht[this.inputName].currentValue);this._enabled=this.enabled(Kn),this._validator=this._enabled?this.createValidator(Kn):Z,this._onChange&&this._onChange()}}validate(Ht){return this._validator(Ht)}registerOnValidatorChange(Ht){this._onChange=Ht}enabled(Ht){return null!=Ht}static{this.\u0275fac=function(Kn){return new(Kn||Cn)}}static{this.\u0275dir=W.FsC({type:Cn,features:[W.OA$]})}}return Cn})();const Ca={provide:L,useExisting:(0,W.Rfq)(()=>Ga),multi:!0};let Ga=(()=>{class Cn extends gs{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=Ht=>es(Ht),this.createValidator=Ht=>function B(Cn){return vn=>{if(C(vn.value)||C(Cn))return null;const Ht=parseFloat(vn.value);return!isNaN(Ht)&&Ht>Cn?{max:{max:Cn,actual:vn.value}}:null}}(Ht)}static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(Kn,yi){2&Kn&&W.BMQ("max",yi._enabled?yi.max:null)},inputs:{max:"max"},features:[W.Jv_([Ca]),W.Vt3]})}}return Cn})();const Fi={provide:L,useExisting:(0,W.Rfq)(()=>ct),multi:!0};let ct=(()=>{class Cn extends gs{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=Ht=>es(Ht),this.createValidator=Ht=>function U(Cn){return vn=>{if(C(vn.value)||C(Cn))return null;const Ht=parseFloat(vn.value);return!isNaN(Ht)&&Ht<Cn?{min:{min:Cn,actual:vn.value}}:null}}(Ht)}static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(Kn,yi){2&Kn&&W.BMQ("min",yi._enabled?yi.min:null)},inputs:{min:"min"},features:[W.Jv_([Fi]),W.Vt3]})}}return Cn})();const Ut={provide:L,useExisting:(0,W.Rfq)(()=>kn),multi:!0},nn={provide:L,useExisting:(0,W.Rfq)(()=>si),multi:!0};let kn=(()=>{class Cn extends gs{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=W.L39,this.createValidator=Ht=>K}enabled(Ht){return Ht}static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(Kn,yi){2&Kn&&W.BMQ("required",yi._enabled?"":null)},inputs:{required:"required"},features:[W.Jv_([Ut]),W.Vt3]})}}return Cn})(),si=(()=>{class Cn extends kn{constructor(){super(...arguments),this.createValidator=Ht=>J}static{this.\u0275fac=(()=>{let Ht;return function(yi){return(Ht||(Ht=W.xGo(Cn)))(yi||Cn)}})()}static{this.\u0275dir=W.FsC({type:Cn,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(Kn,yi){2&Kn&&W.BMQ("required",yi._enabled?"":null)},features:[W.Jv_([nn]),W.Vt3]})}}return Cn})(),Qa=(()=>{class Cn{static{this.\u0275fac=function(Kn){return new(Kn||Cn)}}static{this.\u0275mod=W.$C({type:Cn})}static{this.\u0275inj=W.G2t({})}}return Cn})(),Ld=(()=>{class Cn{static withConfig(Ht){return{ngModule:Cn,providers:[{provide:Ei,useValue:Ht.callSetDisabledState??Hi}]}}static{this.\u0275fac=function(Kn){return new(Kn||Cn)}}static{this.\u0275mod=W.$C({type:Cn})}static{this.\u0275inj=W.G2t({imports:[Qa]})}}return Cn})()},6098:(In,Ze,M)=>{"use strict";M.d(Ze,{Bb:()=>fe,EZ:()=>Se,fM:()=>Fe,hE:()=>Ee,kQ:()=>Ye,sG:()=>le,tC:()=>ve,up:()=>Xe});var W=M(6610),o=M(7788);class P extends W.VF{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class b extends P{static makeCurrent(){(0,W.ZD)(new b)}onAndCancel(wi,Bn,gi){return wi.addEventListener(Bn,gi),()=>{wi.removeEventListener(Bn,gi)}}dispatchEvent(wi,Bn){wi.dispatchEvent(Bn)}remove(wi){wi.parentNode&&wi.parentNode.removeChild(wi)}createElement(wi,Bn){return(Bn=Bn||this.getDefaultDocument()).createElement(wi)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(wi){return wi.nodeType===Node.ELEMENT_NODE}isShadowRoot(wi){return wi instanceof DocumentFragment}getGlobalEventTarget(wi,Bn){return"window"===Bn?window:"document"===Bn?wi:"body"===Bn?wi.body:null}getBaseHref(wi){const Bn=function S(){return f=f||document.querySelector("base"),f?f.getAttribute("href"):null}();return null==Bn?null:function T(Jn){return new URL(Jn,document.baseURI).pathname}(Bn)}resetBaseElement(){f=null}getUserAgent(){return window.navigator.userAgent}getCookie(wi){return(0,W._b)(document.cookie,wi)}}let f=null,d=(()=>{class Jn{build(){return new XMLHttpRequest}static{this.\u0275fac=function(gi){return new(gi||Jn)}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})();const c=new o.nKC("");let s=(()=>{class Jn{constructor(Bn,gi){this._zone=gi,this._eventNameToPlugin=new Map,Bn.forEach(Ai=>{Ai.manager=this}),this._plugins=Bn.slice().reverse()}addEventListener(Bn,gi,Ai){return this._findPluginFor(gi).addEventListener(Bn,gi,Ai)}getZone(){return this._zone}_findPluginFor(Bn){let gi=this._eventNameToPlugin.get(Bn);if(gi)return gi;if(gi=this._plugins.find(pt=>pt.supports(Bn)),!gi)throw new o.wOt(5101,!1);return this._eventNameToPlugin.set(Bn,gi),gi}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(c),o.KVO(o.SKi))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})();class a{constructor(wi){this._doc=wi}}const u="ng-app-id";let h=(()=>{class Jn{constructor(Bn,gi,Ai,pt={}){this.doc=Bn,this.appId=gi,this.nonce=Ai,this.platformId=pt,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=(0,W.Vy)(pt),this.resetHostNodes()}addStyles(Bn){for(const gi of Bn)1===this.changeUsageCount(gi,1)&&this.onStyleAdded(gi)}removeStyles(Bn){for(const gi of Bn)this.changeUsageCount(gi,-1)<=0&&this.onStyleRemoved(gi)}ngOnDestroy(){const Bn=this.styleNodesInDOM;Bn&&(Bn.forEach(gi=>gi.remove()),Bn.clear());for(const gi of this.getAllStyles())this.onStyleRemoved(gi);this.resetHostNodes()}addHost(Bn){this.hostNodes.add(Bn);for(const gi of this.getAllStyles())this.addStyleToHost(Bn,gi)}removeHost(Bn){this.hostNodes.delete(Bn)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(Bn){for(const gi of this.hostNodes)this.addStyleToHost(gi,Bn)}onStyleRemoved(Bn){const gi=this.styleRef;gi.get(Bn)?.elements?.forEach(Ai=>Ai.remove()),gi.delete(Bn)}collectServerRenderedStyles(){const Bn=this.doc.head?.querySelectorAll(`style[${u}="${this.appId}"]`);if(Bn?.length){const gi=new Map;return Bn.forEach(Ai=>{null!=Ai.textContent&&gi.set(Ai.textContent,Ai)}),gi}return null}changeUsageCount(Bn,gi){const Ai=this.styleRef;if(Ai.has(Bn)){const pt=Ai.get(Bn);return pt.usage+=gi,pt.usage}return Ai.set(Bn,{usage:gi,elements:[]}),gi}getStyleElement(Bn,gi){const Ai=this.styleNodesInDOM,pt=Ai?.get(gi);if(pt?.parentNode===Bn)return Ai.delete(gi),pt.removeAttribute(u),pt;{const Dt=this.doc.createElement("style");return this.nonce&&Dt.setAttribute("nonce",this.nonce),Dt.textContent=gi,this.platformIsServer&&Dt.setAttribute(u,this.appId),Bn.appendChild(Dt),Dt}}addStyleToHost(Bn,gi){const Ai=this.getStyleElement(Bn,gi),pt=this.styleRef,Dt=pt.get(gi)?.elements;Dt?Dt.push(Ai):pt.set(gi,{elements:[Ai],usage:1})}resetHostNodes(){const Bn=this.hostNodes;Bn.clear(),Bn.add(this.doc.head)}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ),o.KVO(o.sZ2),o.KVO(o.BIS,8),o.KVO(o.Agw))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})();const g={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},_=/%COMP%/g,x="%COMP%",w=`_nghost-${x}`,D=`_ngcontent-${x}`,I=new o.nKC("",{providedIn:"root",factory:()=>!0});function G(Jn,wi){return wi.map(Bn=>Bn.replace(_,Jn))}let k=(()=>{class Jn{constructor(Bn,gi,Ai,pt,Dt,cn,dt,Et=null){this.eventManager=Bn,this.sharedStylesHost=gi,this.appId=Ai,this.removeStylesOnCompDestroy=pt,this.doc=Dt,this.platformId=cn,this.ngZone=dt,this.nonce=Et,this.rendererByCompId=new Map,this.platformIsServer=(0,W.Vy)(cn),this.defaultRenderer=new U(Bn,Dt,dt,this.platformIsServer)}createRenderer(Bn,gi){if(!Bn||!gi)return this.defaultRenderer;this.platformIsServer&&gi.encapsulation===o.gXe.ShadowDom&&(gi={...gi,encapsulation:o.gXe.Emulated});const Ai=this.getOrCreateRenderer(Bn,gi);return Ai instanceof q?Ai.applyToHost(Bn):Ai instanceof re&&Ai.applyStyles(),Ai}getOrCreateRenderer(Bn,gi){const Ai=this.rendererByCompId;let pt=Ai.get(gi.id);if(!pt){const Dt=this.doc,cn=this.ngZone,dt=this.eventManager,Et=this.sharedStylesHost,hn=this.removeStylesOnCompDestroy,$n=this.platformIsServer;switch(gi.encapsulation){case o.gXe.Emulated:pt=new q(dt,Et,gi,this.appId,hn,Dt,cn,$n);break;case o.gXe.ShadowDom:return new ie(dt,Et,Bn,gi,Dt,cn,this.nonce,$n);default:pt=new re(dt,Et,gi,hn,Dt,cn,$n)}Ai.set(gi.id,pt)}return pt}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(s),o.KVO(h),o.KVO(o.sZ2),o.KVO(I),o.KVO(W.qQ),o.KVO(o.Agw),o.KVO(o.SKi),o.KVO(o.BIS))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})();class U{constructor(wi,Bn,gi,Ai){this.eventManager=wi,this.doc=Bn,this.ngZone=gi,this.platformIsServer=Ai,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(wi,Bn){return Bn?this.doc.createElementNS(g[Bn]||Bn,wi):this.doc.createElement(wi)}createComment(wi){return this.doc.createComment(wi)}createText(wi){return this.doc.createTextNode(wi)}appendChild(wi,Bn){(J(wi)?wi.content:wi).appendChild(Bn)}insertBefore(wi,Bn,gi){wi&&(J(wi)?wi.content:wi).insertBefore(Bn,gi)}removeChild(wi,Bn){wi&&wi.removeChild(Bn)}selectRootElement(wi,Bn){let gi="string"==typeof wi?this.doc.querySelector(wi):wi;if(!gi)throw new o.wOt(-5104,!1);return Bn||(gi.textContent=""),gi}parentNode(wi){return wi.parentNode}nextSibling(wi){return wi.nextSibling}setAttribute(wi,Bn,gi,Ai){if(Ai){Bn=Ai+":"+Bn;const pt=g[Ai];pt?wi.setAttributeNS(pt,Bn,gi):wi.setAttribute(Bn,gi)}else wi.setAttribute(Bn,gi)}removeAttribute(wi,Bn,gi){if(gi){const Ai=g[gi];Ai?wi.removeAttributeNS(Ai,Bn):wi.removeAttribute(`${gi}:${Bn}`)}else wi.removeAttribute(Bn)}addClass(wi,Bn){wi.classList.add(Bn)}removeClass(wi,Bn){wi.classList.remove(Bn)}setStyle(wi,Bn,gi,Ai){Ai&(o.czy.DashCase|o.czy.Important)?wi.style.setProperty(Bn,gi,Ai&o.czy.Important?"important":""):wi.style[Bn]=gi}removeStyle(wi,Bn,gi){gi&o.czy.DashCase?wi.style.removeProperty(Bn):wi.style[Bn]=""}setProperty(wi,Bn,gi){null!=wi&&(wi[Bn]=gi)}setValue(wi,Bn){wi.nodeValue=Bn}listen(wi,Bn,gi){if("string"==typeof wi&&!(wi=(0,W.QT)().getGlobalEventTarget(this.doc,wi)))throw new Error(`Unsupported event target ${wi} for event ${Bn}`);return this.eventManager.addEventListener(wi,Bn,this.decoratePreventDefault(gi))}decoratePreventDefault(wi){return Bn=>{if("__ngUnwrap__"===Bn)return wi;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>wi(Bn)):wi(Bn))&&Bn.preventDefault()}}}function J(Jn){return"TEMPLATE"===Jn.tagName&&void 0!==Jn.content}class ie extends U{constructor(wi,Bn,gi,Ai,pt,Dt,cn,dt){super(wi,pt,Dt,dt),this.sharedStylesHost=Bn,this.hostEl=gi,this.shadowRoot=gi.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const Et=G(Ai.id,Ai.styles);for(const hn of Et){const $n=document.createElement("style");cn&&$n.setAttribute("nonce",cn),$n.textContent=hn,this.shadowRoot.appendChild($n)}}nodeOrShadowRoot(wi){return wi===this.hostEl?this.shadowRoot:wi}appendChild(wi,Bn){return super.appendChild(this.nodeOrShadowRoot(wi),Bn)}insertBefore(wi,Bn,gi){return super.insertBefore(this.nodeOrShadowRoot(wi),Bn,gi)}removeChild(wi,Bn){return super.removeChild(this.nodeOrShadowRoot(wi),Bn)}parentNode(wi){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(wi)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class re extends U{constructor(wi,Bn,gi,Ai,pt,Dt,cn,dt){super(wi,pt,Dt,cn),this.sharedStylesHost=Bn,this.removeStylesOnCompDestroy=Ai,this.styles=dt?G(dt,gi.styles):gi.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class q extends re{constructor(wi,Bn,gi,Ai,pt,Dt,cn,dt){const Et=Ai+"-"+gi.id;super(wi,Bn,gi,pt,Dt,cn,dt,Et),this.contentAttr=function L(Jn){return D.replace(_,Jn)}(Et),this.hostAttr=function N(Jn){return w.replace(_,Jn)}(Et)}applyToHost(wi){this.applyStyles(),this.setAttribute(wi,this.hostAttr,"")}createElement(wi,Bn){const gi=super.createElement(wi,Bn);return super.setAttribute(gi,this.contentAttr,""),gi}}let Y=(()=>{class Jn extends a{constructor(Bn){super(Bn)}supports(Bn){return!0}addEventListener(Bn,gi,Ai){return Bn.addEventListener(gi,Ai,!1),()=>this.removeEventListener(Bn,gi,Ai)}removeEventListener(Bn,gi,Ai){return Bn.removeEventListener(gi,Ai)}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})(),Z=(()=>{class Jn extends a{constructor(Bn){super(Bn),this.delegate=(0,o.WQX)(o.zAP,{optional:!0})}supports(Bn){return!!this.delegate&&this.delegate.supports(Bn)}addEventListener(Bn,gi,Ai){return this.delegate.addEventListener(Bn,gi,Ai)}removeEventListener(Bn,gi,Ai){return this.delegate.removeEventListener(Bn,gi,Ai)}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})();const Q=["alt","control","meta","shift"],te={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},pe={alt:Jn=>Jn.altKey,control:Jn=>Jn.ctrlKey,meta:Jn=>Jn.metaKey,shift:Jn=>Jn.shiftKey};let z=(()=>{class Jn extends a{constructor(Bn){super(Bn)}supports(Bn){return null!=Jn.parseEventName(Bn)}addEventListener(Bn,gi,Ai){const pt=Jn.parseEventName(gi),Dt=Jn.eventCallback(pt.fullKey,Ai,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,W.QT)().onAndCancel(Bn,pt.domEventName,Dt))}static parseEventName(Bn){const gi=Bn.toLowerCase().split("."),Ai=gi.shift();if(0===gi.length||"keydown"!==Ai&&"keyup"!==Ai)return null;const pt=Jn._normalizeKey(gi.pop());let Dt="",cn=gi.indexOf("code");if(cn>-1&&(gi.splice(cn,1),Dt="code."),Q.forEach(Et=>{const hn=gi.indexOf(Et);hn>-1&&(gi.splice(hn,1),Dt+=Et+".")}),Dt+=pt,0!=gi.length||0===pt.length)return null;const dt={};return dt.domEventName=Ai,dt.fullKey=Dt,dt}static matchEventFullKeyCode(Bn,gi){let Ai=te[Bn.key]||Bn.key,pt="";return gi.indexOf("code.")>-1&&(Ai=Bn.code,pt="code."),!(null==Ai||!Ai)&&(Ai=Ai.toLowerCase()," "===Ai?Ai="space":"."===Ai&&(Ai="dot"),Q.forEach(Dt=>{Dt!==Ai&&(0,pe[Dt])(Bn)&&(pt+=Dt+".")}),pt+=Ai,pt===gi)}static eventCallback(Bn,gi,Ai){return pt=>{Jn.matchEventFullKeyCode(pt,Bn)&&Ai.runGuarded(()=>gi(pt))}}static _normalizeKey(Bn){return"esc"===Bn?"escape":Bn}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})();const ve=[{provide:o.Agw,useValue:W.AJ},{provide:o.PLl,useValue:function de(){b.makeCurrent()},multi:!0},{provide:W.qQ,useFactory:function be(){return(0,o.TL$)(document),document},deps:[]}],le=(0,o.oH4)(o.fpN,"browser",ve),Ce=new o.nKC(""),ye=[{provide:o.e01,useClass:class y{addToWindow(wi){o.JZv.getAngularTestability=(gi,Ai=!0)=>{const pt=wi.findTestabilityInTree(gi,Ai);if(null==pt)throw new o.wOt(5103,!1);return pt},o.JZv.getAllAngularTestabilities=()=>wi.getAllTestabilities(),o.JZv.getAllAngularRootElements=()=>wi.getAllRootElements(),o.JZv.frameworkStabilizers||(o.JZv.frameworkStabilizers=[]),o.JZv.frameworkStabilizers.push(gi=>{const Ai=o.JZv.getAllAngularTestabilities();let pt=Ai.length;const Dt=function(){pt--,0==pt&&gi()};Ai.forEach(cn=>{cn.whenStable(Dt)})})}findTestabilityInTree(wi,Bn,gi){return null==Bn?null:wi.getTestability(Bn)??(gi?(0,W.QT)().isShadowRoot(Bn)?this.findTestabilityInTree(wi,Bn.host,!0):this.findTestabilityInTree(wi,Bn.parentElement,!0):null)}},deps:[]},{provide:o.WHO,useClass:o.NYb,deps:[o.SKi,o.giA,o.e01]},{provide:o.NYb,useClass:o.NYb,deps:[o.SKi,o.giA,o.e01]}],ge=[{provide:o.H8p,useValue:"root"},{provide:o.zcH,useFactory:function ue(){return new o.zcH},deps:[]},{provide:c,useClass:Y,multi:!0,deps:[W.qQ,o.SKi,o.Agw]},{provide:c,useClass:z,multi:!0,deps:[W.qQ]},{provide:c,useClass:Z,multi:!0},k,h,s,{provide:o._9s,useExisting:k},{provide:W.N0,useClass:d,deps:[]},[]];let fe=(()=>{class Jn{constructor(Bn){}static withServerTransition(Bn){return{ngModule:Jn,providers:[{provide:o.sZ2,useValue:Bn.appId}]}}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(Ce,12))}}static{this.\u0275mod=o.$C({type:Jn})}static{this.\u0275inj=o.G2t({providers:[...ge,...ye],imports:[W.MD,o.Hbi]})}}return Jn})(),Ee=(()=>{class Jn{constructor(Bn){this._doc=Bn}getTitle(){return this._doc.title}setTitle(Bn){this._doc.title=Bn||""}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac,providedIn:"root"})}}return Jn})();const Ke={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},Ye=new o.nKC("HammerGestureConfig"),Pe=new o.nKC("HammerLoader");let Se=(()=>{class Jn{constructor(){this.events=[],this.overrides={}}buildHammer(Bn){const gi=new Hammer(Bn,this.options);gi.get("pinch").set({enable:!0}),gi.get("rotate").set({enable:!0});for(const Ai in this.overrides)gi.get(Ai).set(this.overrides[Ai]);return gi}static{this.\u0275fac=function(gi){return new(gi||Jn)}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})(),Re=(()=>{class Jn extends a{constructor(Bn,gi,Ai,pt){super(Bn),this._config=gi,this.console=Ai,this.loader=pt,this._loaderPromise=null}supports(Bn){return!(!Ke.hasOwnProperty(Bn.toLowerCase())&&!this.isCustomEvent(Bn)||!window.Hammer&&!this.loader)}addEventListener(Bn,gi,Ai){const pt=this.manager.getZone();if(gi=gi.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||pt.runOutsideAngular(()=>this.loader());let Dt=!1,cn=()=>{Dt=!0};return pt.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?Dt||(cn=this.addEventListener(Bn,gi,Ai)):cn=()=>{}}).catch(()=>{cn=()=>{}})),()=>{cn()}}return pt.runOutsideAngular(()=>{const Dt=this._config.buildHammer(Bn),cn=function(dt){pt.runGuarded(function(){Ai(dt)})};return Dt.on(gi,cn),()=>{Dt.off(gi,cn),"function"==typeof Dt.destroy&&Dt.destroy()}})}isCustomEvent(Bn){return this._config.events.indexOf(Bn)>-1}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ),o.KVO(Ye),o.KVO(o.H3F),o.KVO(Pe,8))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac})}}return Jn})(),Fe=(()=>{class Jn{static{this.\u0275fac=function(gi){return new(gi||Jn)}}static{this.\u0275mod=o.$C({type:Jn})}static{this.\u0275inj=o.G2t({providers:[{provide:c,useClass:Re,multi:!0,deps:[W.qQ,Ye,o.H3F,[new o.Xx1,Pe]]},{provide:Ye,useClass:Se,deps:[]}]})}}return Jn})(),Xe=(()=>{class Jn{static{this.\u0275fac=function(gi){return new(gi||Jn)}}static{this.\u0275prov=o.jDH({token:Jn,factory:function(gi){let Ai=null;return Ai=gi?new(gi||Jn):o.KVO(tt),Ai},providedIn:"root"})}}return Jn})(),tt=(()=>{class Jn extends Xe{constructor(Bn){super(),this._doc=Bn}sanitize(Bn,gi){if(null==gi)return null;switch(Bn){case o.WPN.NONE:return gi;case o.WPN.HTML:return(0,o.ZF7)(gi,"HTML")?(0,o.rcV)(gi):(0,o.h9k)(this._doc,String(gi)).toString();case o.WPN.STYLE:return(0,o.ZF7)(gi,"Style")?(0,o.rcV)(gi):gi;case o.WPN.SCRIPT:if((0,o.ZF7)(gi,"Script"))return(0,o.rcV)(gi);throw new o.wOt(5200,!1);case o.WPN.URL:return(0,o.ZF7)(gi,"URL")?(0,o.rcV)(gi):(0,o.$MX)(String(gi));case o.WPN.RESOURCE_URL:if((0,o.ZF7)(gi,"ResourceURL"))return(0,o.rcV)(gi);throw new o.wOt(5201,!1);default:throw new o.wOt(5202,!1)}}bypassSecurityTrustHtml(Bn){return(0,o.Kcf)(Bn)}bypassSecurityTrustStyle(Bn){return(0,o.cWb)(Bn)}bypassSecurityTrustScript(Bn){return(0,o.UyX)(Bn)}bypassSecurityTrustUrl(Bn){return(0,o.osQ)(Bn)}bypassSecurityTrustResourceUrl(Bn){return(0,o.e5t)(Bn)}static{this.\u0275fac=function(gi){return new(gi||Jn)(o.KVO(W.qQ))}}static{this.\u0275prov=o.jDH({token:Jn,factory:Jn.\u0275fac,providedIn:"root"})}}return Jn})()},8892:(In,Ze,M)=>{"use strict";M.d(Ze,{nX:()=>ct,wF:()=>Xr,b:()=>rd,Ix:()=>sd,Wk:()=>Hs,iI:()=>Bm,n3:()=>Vo});var W=M(7788),o=M(8556),b=M(650),f=M(5416),S=M(5793),T=M(1654);const d=(()=>{function lt(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return lt.prototype=Object.create(Error.prototype),lt})();var c=M(1986);function a(...lt){return function s(){return(0,c.U)(1)}()((0,f.of)(...lt))}var u=M(5124);function h(lt){return new o.c(mt=>{let ut;try{ut=lt()}catch(fn){return void mt.error(fn)}return(ut?(0,b.H)(ut):(0,u.I)()).subscribe(mt)})}var g=M(1014),_=M(2995),x=M(6343),w=M(2457),D=M(6313);function C(){return function(mt){return mt.lift(new I(mt))}}class I{constructor(mt){this.connectable=mt}call(mt,ut){const{connectable:Mt}=this;Mt._refCount++;const fn=new L(mt,Mt),ni=ut.subscribe(fn);return fn.closed||(fn.connection=Mt.connect()),ni}}class L extends w.v{constructor(mt,ut){super(mt),this.connectable=ut}_unsubscribe(){const{connectable:mt}=this;if(!mt)return void(this.connection=null);this.connectable=null;const ut=mt._refCount;if(ut<=0)return void(this.connection=null);if(mt._refCount=ut-1,ut>1)return void(this.connection=null);const{connection:Mt}=this,fn=mt._connection;this.connection=null,fn&&(!Mt||fn===Mt)&&fn.unsubscribe()}}class N extends o.c{constructor(mt,ut){super(),this.source=mt,this.subjectFactory=ut,this._refCount=0,this._isComplete=!1}_subscribe(mt){return this.getSubject().subscribe(mt)}getSubject(){const mt=this._subject;return(!mt||mt.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let mt=this._connection;return mt||(this._isComplete=!1,mt=this._connection=new D.y,mt.add(this.source.subscribe(new k(this.getSubject(),this))),mt.closed&&(this._connection=null,mt=D.y.EMPTY)),mt}refCount(){return C()(this)}}class k extends x.PJ{constructor(mt,ut){super(mt),this.connectable=ut}_error(mt){this._unsubscribe(),super._error(mt)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const mt=this.connectable;if(mt){this.connectable=null;const ut=mt._connection;mt._refCount=0,mt._subject=null,mt._connection=null,ut&&ut.unsubscribe()}}}var K=M(6610),J=M(2123),ie=M(8707),re=M(5146),q=M(7025),Z=M(683),Q=M(1483);function te(lt=null){return mt=>mt.lift(new pe(lt))}class pe{constructor(mt){this.defaultValue=mt}call(mt,ut){return ut.subscribe(new z(mt,this.defaultValue))}}class z extends w.v{constructor(mt,ut){super(mt),this.defaultValue=ut,this.isEmpty=!0}_next(mt){this.isEmpty=!1,this.destination.next(mt)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function oe(lt=he){return mt=>mt.lift(new ae(lt))}class ae{constructor(mt){this.errorFactory=mt}call(mt,ut){return ut.subscribe(new ee(mt,this.errorFactory))}}class ee extends w.v{constructor(mt,ut){super(mt),this.errorFactory=ut,this.hasValue=!1}_next(mt){this.hasValue=!0,this.destination.next(mt)}_complete(){if(this.hasValue)return this.destination.complete();{let mt;try{mt=this.errorFactory()}catch(ut){mt=ut}this.destination.error(mt)}}}function he(){return new d}var de=M(8996);function ue(lt,mt){const ut=arguments.length>=2;return Mt=>Mt.pipe(lt?(0,Z.p)((fn,ni)=>lt(fn,ni,Mt)):de.D,(0,re.s)(1),ut?te(mt):oe(()=>new d))}var be=M(5411),ve=M(8786),le=M(874);class ye{constructor(mt,ut,Mt=!1){this.accumulator=mt,this.seed=ut,this.hasSeed=Mt}call(mt,ut){return ut.subscribe(new ge(mt,this.accumulator,this.seed,this.hasSeed))}}class ge extends w.v{constructor(mt,ut,Mt,fn){super(mt),this.accumulator=ut,this._seed=Mt,this.hasSeed=fn,this.index=0}get seed(){return this._seed}set seed(mt){this.hasSeed=!0,this._seed=mt}_next(mt){if(this.hasSeed)return this._tryNext(mt);this.seed=mt,this.destination.next(mt)}_tryNext(mt){const ut=this.index++;let Mt;try{Mt=this.accumulator(this.seed,mt,ut)}catch(fn){this.destination.error(fn)}this.seed=Mt,this.destination.next(Mt)}}var fe=M(8773);function xe(lt){return function(ut){return 0===lt?(0,u.I)():ut.lift(new Te(lt))}}class Te{constructor(mt){if(this.total=mt,this.total<0)throw new fe.k}call(mt,ut){return ut.subscribe(new Ee(mt,this.total))}}class Ee extends w.v{constructor(mt,ut){super(mt),this.total=ut,this.ring=new Array,this.count=0}_next(mt){const ut=this.ring,Mt=this.total,fn=this.count++;ut.length<Mt?ut.push(mt):ut[fn%Mt]=mt}_complete(){const mt=this.destination;let ut=this.count;if(ut>0){const Mt=this.count>=this.total?this.total:this.count,fn=this.ring;for(let ni=0;ni<Mt;ni++){const Pi=ut++%Mt;mt.next(fn[Pi])}}mt.complete()}}class $e{constructor(mt){this.value=mt}call(mt,ut){return ut.subscribe(new Be(mt,this.value))}}class Be extends w.v{constructor(mt,ut){super(mt),this.value=ut}_next(mt){this.destination.next(this.value)}}var Ue=M(3295),ot=M(2559);class et{constructor(mt){this.notifier=mt}call(mt,ut){const Mt=new Ke(mt),fn=(0,ot.tS)(this.notifier,new ot.zA(Mt));return fn&&!Mt.seenValue?(Mt.add(fn),ut.subscribe(Mt)):Mt}}class Ke extends ot.gn{constructor(mt){super(mt),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}var Ye=M(6098);const Pe="primary",Se=Symbol("RouteTitle");class Re{constructor(mt){this.params=mt||{}}has(mt){return Object.prototype.hasOwnProperty.call(this.params,mt)}get(mt){if(this.has(mt)){const ut=this.params[mt];return Array.isArray(ut)?ut[0]:ut}return null}getAll(mt){if(this.has(mt)){const ut=this.params[mt];return Array.isArray(ut)?ut:[ut]}return[]}get keys(){return Object.keys(this.params)}}function Fe(lt){return new Re(lt)}function Xe(lt,mt,ut){const Mt=ut.path.split("/");if(Mt.length>lt.length||"full"===ut.pathMatch&&(mt.hasChildren()||Mt.length<lt.length))return null;const fn={};for(let ni=0;ni<Mt.length;ni++){const Pi=Mt[ni],Mo=lt[ni];if(":"===Pi[0])fn[Pi.substring(1)]=Mo;else if(Pi!==Mo.path)return null}return{consumed:lt.slice(0,Mt.length),posParams:fn}}function vt(lt,mt){const ut=lt?qe(lt):void 0,Mt=mt?qe(mt):void 0;if(!ut||!Mt||ut.length!=Mt.length)return!1;let fn;for(let ni=0;ni<ut.length;ni++)if(fn=ut[ni],!At(lt[fn],mt[fn]))return!1;return!0}function qe(lt){return[...Object.keys(lt),...Object.getOwnPropertySymbols(lt)]}function At(lt,mt){if(Array.isArray(lt)&&Array.isArray(mt)){if(lt.length!==mt.length)return!1;const ut=[...lt].sort(),Mt=[...mt].sort();return ut.every((fn,ni)=>Mt[ni]===fn)}return lt===mt}function Tt(lt){return lt.length>0?lt[lt.length-1]:null}function qt(lt){return function P(lt){return!!lt&&(lt instanceof o.c||"function"==typeof lt.lift&&"function"==typeof lt.subscribe)}(lt)?lt:(0,W.jNT)(lt)?(0,b.H)(Promise.resolve(lt)):(0,f.of)(lt)}const wt={exact:function Jn(lt,mt,ut){if(!Et(lt.segments,mt.segments)||!Ai(lt.segments,mt.segments,ut)||lt.numberOfChildren!==mt.numberOfChildren)return!1;for(const Mt in mt.children)if(!lt.children[Mt]||!Jn(lt.children[Mt],mt.children[Mt],ut))return!1;return!0},subset:Bn},En={exact:function Tn(lt,mt){return vt(lt,mt)},subset:function wi(lt,mt){return Object.keys(mt).length<=Object.keys(lt).length&&Object.keys(mt).every(ut=>At(lt[ut],mt[ut]))},ignored:()=>!0};function ri(lt,mt,ut){return wt[ut.paths](lt.root,mt.root,ut.matrixParams)&&En[ut.queryParams](lt.queryParams,mt.queryParams)&&!("exact"===ut.fragment&&lt.fragment!==mt.fragment)}function Bn(lt,mt,ut){return gi(lt,mt,mt.segments,ut)}function gi(lt,mt,ut,Mt){if(lt.segments.length>ut.length){const fn=lt.segments.slice(0,ut.length);return!(!Et(fn,ut)||mt.hasChildren()||!Ai(fn,ut,Mt))}if(lt.segments.length===ut.length){if(!Et(lt.segments,ut)||!Ai(lt.segments,ut,Mt))return!1;for(const fn in mt.children)if(!lt.children[fn]||!Bn(lt.children[fn],mt.children[fn],Mt))return!1;return!0}{const fn=ut.slice(0,lt.segments.length),ni=ut.slice(lt.segments.length);return!!(Et(lt.segments,fn)&&Ai(lt.segments,fn,Mt)&&lt.children[Pe])&&gi(lt.children[Pe],mt,ni,Mt)}}function Ai(lt,mt,ut){return mt.every((Mt,fn)=>En[ut](lt[fn].parameters,Mt.parameters))}class pt{constructor(mt=new Dt([],{}),ut={},Mt=null){this.root=mt,this.queryParams=ut,this.fragment=Mt}get queryParamMap(){return this._queryParamMap??=Fe(this.queryParams),this._queryParamMap}toString(){return Nt.serialize(this)}}class Dt{constructor(mt,ut){this.segments=mt,this.children=ut,this.parent=null,Object.values(ut).forEach(Mt=>Mt.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Gt(this)}}class cn{constructor(mt,ut){this.path=mt,this.parameters=ut}get parameterMap(){return this._parameterMap??=Fe(this.parameters),this._parameterMap}toString(){return ci(this)}}function Et(lt,mt){return lt.length===mt.length&&lt.every((ut,Mt)=>ut.path===mt[Mt].path)}let $n=(()=>{class lt{static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:()=>new Ln,providedIn:"root"})}}return lt})();class Ln{parse(mt){const ut=new nr(mt);return new pt(ut.parseRootSegment(),ut.parseQueryParams(),ut.parseFragment())}serialize(mt){const ut=`/${on(mt.root,!0)}`,Mt=function Hi(lt){const mt=Object.entries(lt).map(([ut,Mt])=>Array.isArray(Mt)?Mt.map(fn=>`${It(ut)}=${It(fn)}`).join("&"):`${It(ut)}=${It(Mt)}`).filter(ut=>ut);return mt.length?`?${mt.join("&")}`:""}(mt.queryParams);return`${ut}${Mt}${"string"==typeof mt.fragment?`#${function Ot(lt){return encodeURI(lt)}(mt.fragment)}`:""}`}}const Nt=new Ln;function Gt(lt){return lt.segments.map(mt=>ci(mt)).join("/")}function on(lt,mt){if(!lt.hasChildren())return Gt(lt);if(mt){const ut=lt.children[Pe]?on(lt.children[Pe],!1):"",Mt=[];return Object.entries(lt.children).forEach(([fn,ni])=>{fn!==Pe&&Mt.push(`${fn}:${on(ni,!1)}`)}),Mt.length>0?`${ut}(${Mt.join("//")})`:ut}{const ut=function hn(lt,mt){let ut=[];return Object.entries(lt.children).forEach(([Mt,fn])=>{Mt===Pe&&(ut=ut.concat(mt(fn,Mt)))}),Object.entries(lt.children).forEach(([Mt,fn])=>{Mt!==Pe&&(ut=ut.concat(mt(fn,Mt)))}),ut}(lt,(Mt,fn)=>fn===Pe?[on(lt.children[Pe],!1)]:[`${fn}:${on(Mt,!1)}`]);return 1===Object.keys(lt.children).length&&null!=lt.children[Pe]?`${Gt(lt)}/${ut[0]}`:`${Gt(lt)}/(${ut.join("//")})`}}function sn(lt){return encodeURIComponent(lt).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function It(lt){return sn(lt).replace(/%3B/gi,";")}function zt(lt){return sn(lt).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function un(lt){return decodeURIComponent(lt)}function Pn(lt){return un(lt.replace(/\+/g,"%20"))}function ci(lt){return`${zt(lt.path)}${function Ei(lt){return Object.entries(lt).map(([mt,ut])=>`;${zt(mt)}=${zt(ut)}`).join("")}(lt.parameters)}`}const mo=/^[^\/()?;#]+/;function xo(lt){const mt=lt.match(mo);return mt?mt[0]:""}const vr=/^[^\/()?;=#]+/,en=/^[^=?&#]+/,Di=/^[^&#]+/;class nr{constructor(mt){this.url=mt,this.remaining=mt}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dt([],{}):new Dt([],this.parseChildren())}parseQueryParams(){const mt={};if(this.consumeOptional("?"))do{this.parseQueryParam(mt)}while(this.consumeOptional("&"));return mt}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const mt=[];for(this.peekStartsWith("(")||mt.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),mt.push(this.parseSegment());let ut={};this.peekStartsWith("/(")&&(this.capture("/"),ut=this.parseParens(!0));let Mt={};return this.peekStartsWith("(")&&(Mt=this.parseParens(!1)),(mt.length>0||Object.keys(ut).length>0)&&(Mt[Pe]=new Dt(mt,ut)),Mt}parseSegment(){const mt=xo(this.remaining);if(""===mt&&this.peekStartsWith(";"))throw new W.wOt(4009,!1);return this.capture(mt),new cn(un(mt),this.parseMatrixParams())}parseMatrixParams(){const mt={};for(;this.consumeOptional(";");)this.parseParam(mt);return mt}parseParam(mt){const ut=function rn(lt){const mt=lt.match(vr);return mt?mt[0]:""}(this.remaining);if(!ut)return;this.capture(ut);let Mt="";if(this.consumeOptional("=")){const fn=xo(this.remaining);fn&&(Mt=fn,this.capture(Mt))}mt[un(ut)]=un(Mt)}parseQueryParam(mt){const ut=function Zn(lt){const mt=lt.match(en);return mt?mt[0]:""}(this.remaining);if(!ut)return;this.capture(ut);let Mt="";if(this.consumeOptional("=")){const Pi=function po(lt){const mt=lt.match(Di);return mt?mt[0]:""}(this.remaining);Pi&&(Mt=Pi,this.capture(Mt))}const fn=Pn(ut),ni=Pn(Mt);if(mt.hasOwnProperty(fn)){let Pi=mt[fn];Array.isArray(Pi)||(Pi=[Pi],mt[fn]=Pi),Pi.push(ni)}else mt[fn]=ni}parseParens(mt){const ut={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const Mt=xo(this.remaining),fn=this.remaining[Mt.length];if("/"!==fn&&")"!==fn&&";"!==fn)throw new W.wOt(4010,!1);let ni;Mt.indexOf(":")>-1?(ni=Mt.slice(0,Mt.indexOf(":")),this.capture(ni),this.capture(":")):mt&&(ni=Pe);const Pi=this.parseChildren();ut[ni]=1===Object.keys(Pi).length?Pi[Pe]:new Dt([],Pi),this.consumeOptional("//")}return ut}peekStartsWith(mt){return this.remaining.startsWith(mt)}consumeOptional(mt){return!!this.peekStartsWith(mt)&&(this.remaining=this.remaining.substring(mt.length),!0)}capture(mt){if(!this.consumeOptional(mt))throw new W.wOt(4011,!1)}}function Xo(lt){return lt.segments.length>0?new Dt([],{[Pe]:lt}):lt}function Hn(lt){const mt={};for(const[Mt,fn]of Object.entries(lt.children)){const ni=Hn(fn);if(Mt===Pe&&0===ni.segments.length&&ni.hasChildren())for(const[Pi,Mo]of Object.entries(ni.children))mt[Pi]=Mo;else(ni.segments.length>0||ni.hasChildren())&&(mt[Mt]=ni)}return function ui(lt){if(1===lt.numberOfChildren&&lt.children[Pe]){const mt=lt.children[Pe];return new Dt(lt.segments.concat(mt.segments),mt.children)}return lt}(new Dt(lt.segments,mt))}function bi(lt){return lt instanceof pt}function Wi(lt){let mt;const fn=Xo(function ut(ni){const Pi={};for(const vo of ni.children){const Ir=ut(vo);Pi[vo.outlet]=Ir}const Mo=new Dt(ni.url,Pi);return ni===lt&&(mt=Mo),Mo}(lt.root));return mt??fn}function Ko(lt,mt,ut,Mt){let fn=lt;for(;fn.parent;)fn=fn.parent;if(0===mt.length)return hr(fn,fn,fn,ut,Mt);const ni=function pi(lt){if("string"==typeof lt[0]&&1===lt.length&&"/"===lt[0])return new mn(!0,0,lt);let mt=0,ut=!1;const Mt=lt.reduce((fn,ni,Pi)=>{if("object"==typeof ni&&null!=ni){if(ni.outlets){const Mo={};return Object.entries(ni.outlets).forEach(([vo,Ir])=>{Mo[vo]="string"==typeof Ir?Ir.split("/"):Ir}),[...fn,{outlets:Mo}]}if(ni.segmentPath)return[...fn,ni.segmentPath]}return"string"!=typeof ni?[...fn,ni]:0===Pi?(ni.split("/").forEach((Mo,vo)=>{0==vo&&"."===Mo||(0==vo&&""===Mo?ut=!0:".."===Mo?mt++:""!=Mo&&fn.push(Mo))}),fn):[...fn,ni]},[]);return new mn(ut,mt,Mt)}(mt);if(ni.toRoot())return hr(fn,fn,new Dt([],{}),ut,Mt);const Pi=function lo(lt,mt,ut){if(lt.isAbsolute)return new Ti(mt,!0,0);if(!ut)return new Ti(mt,!1,NaN);if(null===ut.parent)return new Ti(ut,!0,0);const Mt=Zo(lt.commands[0])?0:1;return function Eo(lt,mt,ut){let Mt=lt,fn=mt,ni=ut;for(;ni>fn;){if(ni-=fn,Mt=Mt.parent,!Mt)throw new W.wOt(4005,!1);fn=Mt.segments.length}return new Ti(Mt,!1,fn-ni)}(ut,ut.segments.length-1+Mt,lt.numberOfDoubleDots)}(ni,fn,lt),Mo=Pi.processChildren?Gr(Pi.segmentGroup,Pi.index,ni.commands):fr(Pi.segmentGroup,Pi.index,ni.commands);return hr(fn,Pi.segmentGroup,Mo,ut,Mt)}function Zo(lt){return"object"==typeof lt&&null!=lt&&!lt.outlets&&!lt.segmentPath}function xr(lt){return"object"==typeof lt&&null!=lt&&lt.outlets}function hr(lt,mt,ut,Mt,fn){let Pi,ni={};Mt&&Object.entries(Mt).forEach(([vo,Ir])=>{ni[vo]=Array.isArray(Ir)?Ir.map(Es=>`${Es}`):`${Ir}`}),Pi=lt===mt?ut:Rt(lt,mt,ut);const Mo=Xo(Hn(Pi));return new pt(Mo,ni,fn)}function Rt(lt,mt,ut){const Mt={};return Object.entries(lt.children).forEach(([fn,ni])=>{Mt[fn]=ni===mt?ut:Rt(ni,mt,ut)}),new Dt(lt.segments,Mt)}class mn{constructor(mt,ut,Mt){if(this.isAbsolute=mt,this.numberOfDoubleDots=ut,this.commands=Mt,mt&&Mt.length>0&&Zo(Mt[0]))throw new W.wOt(4003,!1);const fn=Mt.find(xr);if(fn&&fn!==Tt(Mt))throw new W.wOt(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ti{constructor(mt,ut,Mt){this.segmentGroup=mt,this.processChildren=ut,this.index=Mt}}function fr(lt,mt,ut){if(lt??=new Dt([],{}),0===lt.segments.length&&lt.hasChildren())return Gr(lt,mt,ut);const Mt=function Yn(lt,mt,ut){let Mt=0,fn=mt;const ni={match:!1,pathIndex:0,commandIndex:0};for(;fn<lt.segments.length;){if(Mt>=ut.length)return ni;const Pi=lt.segments[fn],Mo=ut[Mt];if(xr(Mo))break;const vo=`${Mo}`,Ir=Mt<ut.length-1?ut[Mt+1]:null;if(fn>0&&void 0===vo)break;if(vo&&Ir&&"object"==typeof Ir&&void 0===Ir.outlets){if(!ko(vo,Ir,Pi))return ni;Mt+=2}else{if(!ko(vo,{},Pi))return ni;Mt++}fn++}return{match:!0,pathIndex:fn,commandIndex:Mt}}(lt,mt,ut),fn=ut.slice(Mt.commandIndex);if(Mt.match&&Mt.pathIndex<lt.segments.length){const ni=new Dt(lt.segments.slice(0,Mt.pathIndex),{});return ni.children[Pe]=new Dt(lt.segments.slice(Mt.pathIndex),lt.children),Gr(ni,0,fn)}return Mt.match&&0===fn.length?new Dt(lt.segments,{}):Mt.match&&!lt.hasChildren()?ei(lt,mt,ut):Mt.match?Gr(lt,0,fn):ei(lt,mt,ut)}function Gr(lt,mt,ut){if(0===ut.length)return new Dt(lt.segments,{});{const Mt=function Jo(lt){return xr(lt[0])?lt[0].outlets:{[Pe]:lt}}(ut),fn={};if(Object.keys(Mt).some(ni=>ni!==Pe)&&lt.children[Pe]&&1===lt.numberOfChildren&&0===lt.children[Pe].segments.length){const ni=Gr(lt.children[Pe],mt,ut);return new Dt(lt.segments,ni.children)}return Object.entries(Mt).forEach(([ni,Pi])=>{"string"==typeof Pi&&(Pi=[Pi]),null!==Pi&&(fn[ni]=fr(lt.children[ni],mt,Pi))}),Object.entries(lt.children).forEach(([ni,Pi])=>{void 0===Mt[ni]&&(fn[ni]=Pi)}),new Dt(lt.segments,fn)}}function ei(lt,mt,ut){const Mt=lt.segments.slice(0,mt);let fn=0;for(;fn<ut.length;){const ni=ut[fn];if(xr(ni)){const vo=Ii(ni.outlets);return new Dt(Mt,vo)}if(0===fn&&Zo(ut[0])){Mt.push(new cn(lt.segments[mt].path,co(ut[0]))),fn++;continue}const Pi=xr(ni)?ni.outlets[Pe]:`${ni}`,Mo=fn<ut.length-1?ut[fn+1]:null;Pi&&Mo&&Zo(Mo)?(Mt.push(new cn(Pi,co(Mo))),fn+=2):(Mt.push(new cn(Pi,{})),fn++)}return new Dt(Mt,{})}function Ii(lt){const mt={};return Object.entries(lt).forEach(([ut,Mt])=>{"string"==typeof Mt&&(Mt=[Mt]),null!==Mt&&(mt[ut]=ei(new Dt([],{}),0,Mt))}),mt}function co(lt){const mt={};return Object.entries(lt).forEach(([ut,Mt])=>mt[ut]=`${Mt}`),mt}function ko(lt,mt,ut){return lt==ut.path&&vt(mt,ut.parameters)}const er="imperative";var or=function(lt){return lt[lt.NavigationStart=0]="NavigationStart",lt[lt.NavigationEnd=1]="NavigationEnd",lt[lt.NavigationCancel=2]="NavigationCancel",lt[lt.NavigationError=3]="NavigationError",lt[lt.RoutesRecognized=4]="RoutesRecognized",lt[lt.ResolveStart=5]="ResolveStart",lt[lt.ResolveEnd=6]="ResolveEnd",lt[lt.GuardsCheckStart=7]="GuardsCheckStart",lt[lt.GuardsCheckEnd=8]="GuardsCheckEnd",lt[lt.RouteConfigLoadStart=9]="RouteConfigLoadStart",lt[lt.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",lt[lt.ChildActivationStart=11]="ChildActivationStart",lt[lt.ChildActivationEnd=12]="ChildActivationEnd",lt[lt.ActivationStart=13]="ActivationStart",lt[lt.ActivationEnd=14]="ActivationEnd",lt[lt.Scroll=15]="Scroll",lt[lt.NavigationSkipped=16]="NavigationSkipped",lt}(or||{});class Jr{constructor(mt,ut){this.id=mt,this.url=ut}}class Wr extends Jr{constructor(mt,ut,Mt="imperative",fn=null){super(mt,ut),this.type=or.NavigationStart,this.navigationTrigger=Mt,this.restoredState=fn}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Xr extends Jr{constructor(mt,ut,Mt){super(mt,ut),this.urlAfterRedirects=Mt,this.type=or.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Mr=function(lt){return lt[lt.Redirect=0]="Redirect",lt[lt.SupersededByNewNavigation=1]="SupersededByNewNavigation",lt[lt.NoDataFromResolver=2]="NoDataFromResolver",lt[lt.GuardRejected=3]="GuardRejected",lt}(Mr||{}),dn=function(lt){return lt[lt.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",lt[lt.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",lt}(dn||{});class an extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.reason=Mt,this.code=fn,this.type=or.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class _n extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.reason=Mt,this.code=fn,this.type=or.NavigationSkipped}}class Wt extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.error=Mt,this.target=fn,this.type=or.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class zn extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.urlAfterRedirects=Mt,this.state=fn,this.type=or.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class mi extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.urlAfterRedirects=Mt,this.state=fn,this.type=or.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Si extends Jr{constructor(mt,ut,Mt,fn,ni){super(mt,ut),this.urlAfterRedirects=Mt,this.state=fn,this.shouldActivate=ni,this.type=or.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class go extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.urlAfterRedirects=Mt,this.state=fn,this.type=or.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class No extends Jr{constructor(mt,ut,Mt,fn){super(mt,ut),this.urlAfterRedirects=Mt,this.state=fn,this.type=or.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Sr{constructor(mt){this.route=mt,this.type=or.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class pr{constructor(mt){this.route=mt,this.type=or.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Vr{constructor(mt){this.snapshot=mt,this.type=or.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Lt{constructor(mt){this.snapshot=mt,this.type=or.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class bn{constructor(mt){this.snapshot=mt,this.type=or.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class jn{constructor(mt){this.snapshot=mt,this.type=or.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Ci{constructor(mt,ut,Mt){this.routerEvent=mt,this.position=ut,this.anchor=Mt,this.type=or.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Mi{}class Ki{constructor(mt,ut){this.url=mt,this.navigationBehaviorOptions=ut}}function rr(lt){return lt.outlet||Pe}function wr(lt){if(!lt)return null;if(lt.routeConfig?._injector)return lt.routeConfig._injector;for(let mt=lt.parent;mt;mt=mt.parent){const ut=mt.routeConfig;if(ut?._loadedInjector)return ut._loadedInjector;if(ut?._injector)return ut._injector}return null}class Fo{get injector(){return wr(this.route?.snapshot)??this.rootInjector}set injector(mt){}constructor(mt){this.rootInjector=mt,this.outlet=null,this.route=null,this.children=new os(this.rootInjector),this.attachRef=null}}let os=(()=>{class lt{constructor(ut){this.rootInjector=ut,this.contexts=new Map}onChildOutletCreated(ut,Mt){const fn=this.getOrCreateContext(ut);fn.outlet=Mt,this.contexts.set(ut,fn)}onChildOutletDestroyed(ut){const Mt=this.getContext(ut);Mt&&(Mt.outlet=null,Mt.attachRef=null)}onOutletDeactivated(){const ut=this.contexts;return this.contexts=new Map,ut}onOutletReAttached(ut){this.contexts=ut}getOrCreateContext(ut){let Mt=this.getContext(ut);return Mt||(Mt=new Fo(this.rootInjector),this.contexts.set(ut,Mt)),Mt}getContext(ut){return this.contexts.get(ut)||null}static{this.\u0275fac=function(Mt){return new(Mt||lt)(W.KVO(W.uvJ))}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();class fs{constructor(mt){this._root=mt}get root(){return this._root.value}parent(mt){const ut=this.pathFromRoot(mt);return ut.length>1?ut[ut.length-2]:null}children(mt){const ut=js(mt,this._root);return ut?ut.children.map(Mt=>Mt.value):[]}firstChild(mt){const ut=js(mt,this._root);return ut&&ut.children.length>0?ut.children[0].value:null}siblings(mt){const ut=Ta(mt,this._root);return ut.length<2?[]:ut[ut.length-2].children.map(fn=>fn.value).filter(fn=>fn!==mt)}pathFromRoot(mt){return Ta(mt,this._root).map(ut=>ut.value)}}function js(lt,mt){if(lt===mt.value)return mt;for(const ut of mt.children){const Mt=js(lt,ut);if(Mt)return Mt}return null}function Ta(lt,mt){if(lt===mt.value)return[mt];for(const ut of mt.children){const Mt=Ta(lt,ut);if(Mt.length)return Mt.unshift(mt),Mt}return[]}class es{constructor(mt,ut){this.value=mt,this.children=ut}toString(){return`TreeNode(${this.value})`}}function gs(lt){const mt={};return lt&&lt.children.forEach(ut=>mt[ut.value.outlet]=ut),mt}class Ca extends fs{constructor(mt,ut){super(mt),this.snapshot=ut,si(this,mt)}toString(){return this.snapshot.toString()}}function Ga(lt){const mt=function Fi(lt){const ni=new nn([],{},{},"",{},Pe,lt,null,{});return new kn("",new es(ni,[]))}(lt),ut=new S.t([new cn("",{})]),Mt=new S.t({}),fn=new S.t({}),ni=new S.t({}),Pi=new S.t(""),Mo=new ct(ut,Mt,ni,Pi,fn,Pe,lt,mt.root);return Mo.snapshot=mt.root,new Ca(new es(Mo,[]),mt)}class ct{constructor(mt,ut,Mt,fn,ni,Pi,Mo,vo){this.urlSubject=mt,this.paramsSubject=ut,this.queryParamsSubject=Mt,this.fragmentSubject=fn,this.dataSubject=ni,this.outlet=Pi,this.component=Mo,this._futureSnapshot=vo,this.title=this.dataSubject?.pipe((0,J.T)(Ir=>Ir[Se]))??(0,f.of)(void 0),this.url=mt,this.params=ut,this.queryParams=Mt,this.fragment=fn,this.data=ni}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe((0,J.T)(mt=>Fe(mt))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe((0,J.T)(mt=>Fe(mt))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Ut(lt,mt,ut="emptyOnly"){let Mt;const{routeConfig:fn}=lt;return Mt=null===mt||"always"!==ut&&""!==fn?.path&&(mt.component||mt.routeConfig?.loadComponent)?{params:{...lt.params},data:{...lt.data},resolve:{...lt.data,...lt._resolvedData??{}}}:{params:{...mt.params,...lt.params},data:{...mt.data,...lt.data},resolve:{...lt.data,...mt.data,...fn?.data,...lt._resolvedData}},fn&&Xi(fn)&&(Mt.resolve[Se]=fn.title),Mt}class nn{get title(){return this.data?.[Se]}constructor(mt,ut,Mt,fn,ni,Pi,Mo,vo,Ir){this.url=mt,this.params=ut,this.queryParams=Mt,this.fragment=fn,this.data=ni,this.outlet=Pi,this.component=Mo,this.routeConfig=vo,this._resolve=Ir}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Fe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Fe(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(Mt=>Mt.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class kn extends fs{constructor(mt,ut){super(ut),this.url=mt,si(this,ut)}toString(){return vi(this._root)}}function si(lt,mt){mt.value._routerState=lt,mt.children.forEach(ut=>si(lt,ut))}function vi(lt){const mt=lt.children.length>0?` { ${lt.children.map(vi).join(", ")} } `:"";return`${lt.value}${mt}`}function Ni(lt){if(lt.snapshot){const mt=lt.snapshot,ut=lt._futureSnapshot;lt.snapshot=ut,vt(mt.queryParams,ut.queryParams)||lt.queryParamsSubject.next(ut.queryParams),mt.fragment!==ut.fragment&&lt.fragmentSubject.next(ut.fragment),vt(mt.params,ut.params)||lt.paramsSubject.next(ut.params),function tt(lt,mt){if(lt.length!==mt.length)return!1;for(let ut=0;ut<lt.length;++ut)if(!vt(lt[ut],mt[ut]))return!1;return!0}(mt.url,ut.url)||lt.urlSubject.next(ut.url),vt(mt.data,ut.data)||lt.dataSubject.next(ut.data)}else lt.snapshot=lt._futureSnapshot,lt.dataSubject.next(lt._futureSnapshot.data)}function fo(lt,mt){const ut=vt(lt.params,mt.params)&&function dt(lt,mt){return Et(lt,mt)&&lt.every((ut,Mt)=>vt(ut.parameters,mt[Mt].parameters))}(lt.url,mt.url);return ut&&!(!lt.parent!=!mt.parent)&&(!lt.parent||fo(lt.parent,mt.parent))}function Xi(lt){return"string"==typeof lt.title||null===lt.title}let Vo=(()=>{class lt{constructor(){this.activated=null,this._activatedRoute=null,this.name=Pe,this.activateEvents=new W.bkB,this.deactivateEvents=new W.bkB,this.attachEvents=new W.bkB,this.detachEvents=new W.bkB,this.parentContexts=(0,W.WQX)(os),this.location=(0,W.WQX)(W.c1b),this.changeDetector=(0,W.WQX)(W.gRc),this.inputBinder=(0,W.WQX)(Er,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(ut){if(ut.name){const{firstChange:Mt,previousValue:fn}=ut.name;if(Mt)return;this.isTrackedInParentContexts(fn)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(fn)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(ut){return this.parentContexts.getContext(ut)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const ut=this.parentContexts.getContext(this.name);ut?.route&&(ut.attachRef?this.attach(ut.attachRef,ut.route):this.activateWith(ut.route,ut.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new W.wOt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new W.wOt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new W.wOt(4012,!1);this.location.detach();const ut=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(ut.instance),ut}attach(ut,Mt){this.activated=ut,this._activatedRoute=Mt,this.location.insert(ut.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(ut.instance)}deactivate(){if(this.activated){const ut=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(ut)}}activateWith(ut,Mt){if(this.isActivated)throw new W.wOt(4013,!1);this._activatedRoute=ut;const fn=this.location,Pi=ut.snapshot.component,Mo=this.parentContexts.getOrCreateContext(this.name).children,vo=new Go(ut,Mo,fn.injector);this.activated=fn.createComponent(Pi,{index:fn.length,injector:vo,environmentInjector:Mt}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275dir=W.FsC({type:lt,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[W.OA$]})}}return lt})();class Go{__ngOutletInjector(mt){return new Go(this.route,this.childContexts,mt)}constructor(mt,ut,Mt){this.route=mt,this.childContexts=ut,this.parent=Mt}get(mt,ut){return mt===ct?this.route:mt===os?this.childContexts:this.parent.get(mt,ut)}}const Er=new W.nKC("");let Ts=(()=>{class lt{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(ut){this.unsubscribeFromRouteData(ut),this.subscribeToRouteData(ut)}unsubscribeFromRouteData(ut){this.outletDataSubscriptions.get(ut)?.unsubscribe(),this.outletDataSubscriptions.delete(ut)}subscribeToRouteData(ut){const{activatedRoute:Mt}=ut,fn=(0,T.zV)([Mt.queryParams,Mt.params,Mt.data]).pipe((0,ie.n)(([ni,Pi,Mo],vo)=>(Mo={...ni,...Pi,...Mo},0===vo?(0,f.of)(Mo):Promise.resolve(Mo)))).subscribe(ni=>{if(!ut.isActivated||!ut.activatedComponentRef||ut.activatedRoute!==Mt||null===Mt.component)return void this.unsubscribeFromRouteData(ut);const Pi=(0,W.HJs)(Mt.component);if(Pi)for(const{templateName:Mo}of Pi.inputs)ut.activatedComponentRef.setInput(Mo,ni[Mo]);else this.unsubscribeFromRouteData(ut)});this.outletDataSubscriptions.set(ut,fn)}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac})}}return lt})();function rs(lt,mt,ut){if(ut&&lt.shouldReuseRoute(mt.value,ut.value.snapshot)){const Mt=ut.value;Mt._futureSnapshot=mt.value;const fn=function $r(lt,mt,ut){return mt.children.map(Mt=>{for(const fn of ut.children)if(lt.shouldReuseRoute(Mt.value,fn.value.snapshot))return rs(lt,Mt,fn);return rs(lt,Mt)})}(lt,mt,ut);return new es(Mt,fn)}{if(lt.shouldAttach(mt.value)){const ni=lt.retrieve(mt.value);if(null!==ni){const Pi=ni.route;return Pi.value._futureSnapshot=mt.value,Pi.children=mt.children.map(Mo=>rs(lt,Mo)),Pi}}const Mt=function Qa(lt){return new ct(new S.t(lt.url),new S.t(lt.params),new S.t(lt.queryParams),new S.t(lt.fragment),new S.t(lt.data),lt.outlet,lt.component,lt)}(mt.value),fn=mt.children.map(ni=>rs(lt,ni));return new es(Mt,fn)}}class Gs{constructor(mt,ut){this.redirectTo=mt,this.navigationBehaviorOptions=ut}}const Vl="ngNavigationCancelingError";function Ma(lt,mt){const{redirectTo:ut,navigationBehaviorOptions:Mt}=bi(mt)?{redirectTo:mt,navigationBehaviorOptions:void 0}:mt,fn=Lo(!1,Mr.Redirect);return fn.url=ut,fn.navigationBehaviorOptions=Mt,fn}function Lo(lt,mt){const ut=new Error(`NavigationCancelingError: ${lt||""}`);return ut[Vl]=!0,ut.cancellationCode=mt,ut}function cl(lt){return!!lt&&lt[Vl]}class Ld{constructor(mt,ut,Mt,fn,ni){this.routeReuseStrategy=mt,this.futureState=ut,this.currState=Mt,this.forwardEvent=fn,this.inputBindingEnabled=ni}activate(mt){const ut=this.futureState._root,Mt=this.currState?this.currState._root:null;this.deactivateChildRoutes(ut,Mt,mt),Ni(this.futureState.root),this.activateChildRoutes(ut,Mt,mt)}deactivateChildRoutes(mt,ut,Mt){const fn=gs(ut);mt.children.forEach(ni=>{const Pi=ni.value.outlet;this.deactivateRoutes(ni,fn[Pi],Mt),delete fn[Pi]}),Object.values(fn).forEach(ni=>{this.deactivateRouteAndItsChildren(ni,Mt)})}deactivateRoutes(mt,ut,Mt){const fn=mt.value,ni=ut?ut.value:null;if(fn===ni)if(fn.component){const Pi=Mt.getContext(fn.outlet);Pi&&this.deactivateChildRoutes(mt,ut,Pi.children)}else this.deactivateChildRoutes(mt,ut,Mt);else ni&&this.deactivateRouteAndItsChildren(ut,Mt)}deactivateRouteAndItsChildren(mt,ut){mt.value.component&&this.routeReuseStrategy.shouldDetach(mt.value.snapshot)?this.detachAndStoreRouteSubtree(mt,ut):this.deactivateRouteAndOutlet(mt,ut)}detachAndStoreRouteSubtree(mt,ut){const Mt=ut.getContext(mt.value.outlet),fn=Mt&&mt.value.component?Mt.children:ut,ni=gs(mt);for(const Pi of Object.values(ni))this.deactivateRouteAndItsChildren(Pi,fn);if(Mt&&Mt.outlet){const Pi=Mt.outlet.detach(),Mo=Mt.children.onOutletDeactivated();this.routeReuseStrategy.store(mt.value.snapshot,{componentRef:Pi,route:mt,contexts:Mo})}}deactivateRouteAndOutlet(mt,ut){const Mt=ut.getContext(mt.value.outlet),fn=Mt&&mt.value.component?Mt.children:ut,ni=gs(mt);for(const Pi of Object.values(ni))this.deactivateRouteAndItsChildren(Pi,fn);Mt&&(Mt.outlet&&(Mt.outlet.deactivate(),Mt.children.onOutletDeactivated()),Mt.attachRef=null,Mt.route=null)}activateChildRoutes(mt,ut,Mt){const fn=gs(ut);mt.children.forEach(ni=>{this.activateRoutes(ni,fn[ni.value.outlet],Mt),this.forwardEvent(new jn(ni.value.snapshot))}),mt.children.length&&this.forwardEvent(new Lt(mt.value.snapshot))}activateRoutes(mt,ut,Mt){const fn=mt.value,ni=ut?ut.value:null;if(Ni(fn),fn===ni)if(fn.component){const Pi=Mt.getOrCreateContext(fn.outlet);this.activateChildRoutes(mt,ut,Pi.children)}else this.activateChildRoutes(mt,ut,Mt);else if(fn.component){const Pi=Mt.getOrCreateContext(fn.outlet);if(this.routeReuseStrategy.shouldAttach(fn.snapshot)){const Mo=this.routeReuseStrategy.retrieve(fn.snapshot);this.routeReuseStrategy.store(fn.snapshot,null),Pi.children.onOutletReAttached(Mo.contexts),Pi.attachRef=Mo.componentRef,Pi.route=Mo.route.value,Pi.outlet&&Pi.outlet.attach(Mo.componentRef,Mo.route.value),Ni(Mo.route.value),this.activateChildRoutes(mt,null,Pi.children)}else Pi.attachRef=null,Pi.route=fn,Pi.outlet&&Pi.outlet.activateWith(fn,Pi.injector),this.activateChildRoutes(mt,null,Pi.children)}else this.activateChildRoutes(mt,null,Mt)}}class nd{constructor(mt){this.path=mt,this.route=this.path[this.path.length-1]}}class Cn{constructor(mt,ut){this.component=mt,this.route=ut}}function vn(lt,mt,ut){const Mt=lt._root;return yi(Mt,mt?mt._root:null,ut,[Mt.value])}function Kn(lt,mt){const ut=Symbol(),Mt=mt.get(lt,ut);return Mt===ut?"function"!=typeof lt||(0,W.LfX)(lt)?mt.get(lt):lt:Mt}function yi(lt,mt,ut,Mt,fn={canDeactivateChecks:[],canActivateChecks:[]}){const ni=gs(mt);return lt.children.forEach(Pi=>{(function Dr(lt,mt,ut,Mt,fn={canDeactivateChecks:[],canActivateChecks:[]}){const ni=lt.value,Pi=mt?mt.value:null,Mo=ut?ut.getContext(lt.value.outlet):null;if(Pi&&ni.routeConfig===Pi.routeConfig){const vo=function us(lt,mt,ut){if("function"==typeof ut)return ut(lt,mt);switch(ut){case"pathParamsChange":return!Et(lt.url,mt.url);case"pathParamsOrQueryParamsChange":return!Et(lt.url,mt.url)||!vt(lt.queryParams,mt.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!fo(lt,mt)||!vt(lt.queryParams,mt.queryParams);default:return!fo(lt,mt)}}(Pi,ni,ni.routeConfig.runGuardsAndResolvers);vo?fn.canActivateChecks.push(new nd(Mt)):(ni.data=Pi.data,ni._resolvedData=Pi._resolvedData),yi(lt,mt,ni.component?Mo?Mo.children:null:ut,Mt,fn),vo&&Mo&&Mo.outlet&&Mo.outlet.isActivated&&fn.canDeactivateChecks.push(new Cn(Mo.outlet.component,Pi))}else Pi&&la(mt,Mo,fn),fn.canActivateChecks.push(new nd(Mt)),yi(lt,null,ni.component?Mo?Mo.children:null:ut,Mt,fn)})(Pi,ni[Pi.value.outlet],ut,Mt.concat([Pi.value]),fn),delete ni[Pi.value.outlet]}),Object.entries(ni).forEach(([Pi,Mo])=>la(Mo,ut.getContext(Pi),fn)),fn}function la(lt,mt,ut){const Mt=gs(lt),fn=lt.value;Object.entries(Mt).forEach(([ni,Pi])=>{la(Pi,fn.component?mt?mt.children.getContext(ni):null:mt,ut)}),ut.canDeactivateChecks.push(new Cn(fn.component&&mt&&mt.outlet&&mt.outlet.isActivated?mt.outlet.component:null,fn))}function ya(lt){return"function"==typeof lt}function hi(lt){return lt instanceof d||"EmptyError"===lt?.name}const xi=Symbol("INITIAL_VALUE");function to(){return(0,ie.n)(lt=>(0,T.zV)(lt.map(mt=>mt.pipe((0,re.s)(1),function Y(...lt){const mt=lt[lt.length-1];return(0,q.m)(mt)?(lt.pop(),ut=>a(lt,ut,mt)):ut=>a(lt,ut)}(xi)))).pipe((0,J.T)(mt=>{for(const ut of mt)if(!0!==ut){if(ut===xi)return xi;if(!1===ut||Yi(ut))return ut}return!0}),(0,Z.p)(mt=>mt!==xi),(0,re.s)(1)))}function Yi(lt){return bi(lt)||lt instanceof Gs}function ti(lt){return(0,g.F)((0,ve.M)(mt=>{if("boolean"!=typeof mt)throw Ma(0,mt)}),(0,J.T)(mt=>!0===mt))}class Oi{constructor(mt){this.segmentGroup=mt||null}}class eo extends Error{constructor(mt){super(),this.urlTree=mt}}function So(lt){return(0,_.$)(new Oi(lt))}class jr{constructor(mt,ut){this.urlSerializer=mt,this.urlTree=ut}lineralizeSegments(mt,ut){let Mt=[],fn=ut.root;for(;;){if(Mt=Mt.concat(fn.segments),0===fn.numberOfChildren)return(0,f.of)(Mt);if(fn.numberOfChildren>1||!fn.children[Pe])return(0,_.$)(new W.wOt(4e3,!1));fn=fn.children[Pe]}}applyRedirectCommands(mt,ut,Mt,fn,ni){if("string"!=typeof ut){const Mo=ut,{queryParams:vo,fragment:Ir,routeConfig:Es,url:Bs,outlet:Va,params:ac,data:lc,title:Fc}=fn,wd=(0,W.N4e)(ni,()=>Mo({params:ac,data:lc,queryParams:vo,fragment:Ir,routeConfig:Es,url:Bs,outlet:Va,title:Fc}));if(wd instanceof pt)throw new eo(wd);ut=wd}const Pi=this.applyRedirectCreateUrlTree(ut,this.urlSerializer.parse(ut),mt,Mt);if("/"===ut[0])throw new eo(Pi);return Pi}applyRedirectCreateUrlTree(mt,ut,Mt,fn){const ni=this.createSegmentGroup(mt,ut.root,Mt,fn);return new pt(ni,this.createQueryParams(ut.queryParams,this.urlTree.queryParams),ut.fragment)}createQueryParams(mt,ut){const Mt={};return Object.entries(mt).forEach(([fn,ni])=>{if("string"==typeof ni&&":"===ni[0]){const Mo=ni.substring(1);Mt[fn]=ut[Mo]}else Mt[fn]=ni}),Mt}createSegmentGroup(mt,ut,Mt,fn){const ni=this.createSegments(mt,ut.segments,Mt,fn);let Pi={};return Object.entries(ut.children).forEach(([Mo,vo])=>{Pi[Mo]=this.createSegmentGroup(mt,vo,Mt,fn)}),new Dt(ni,Pi)}createSegments(mt,ut,Mt,fn){return ut.map(ni=>":"===ni.path[0]?this.findPosParam(mt,ni,fn):this.findOrReturn(ni,Mt))}findPosParam(mt,ut,Mt){const fn=Mt[ut.path.substring(1)];if(!fn)throw new W.wOt(4001,!1);return fn}findOrReturn(mt,ut){let Mt=0;for(const fn of ut){if(fn.path===mt.path)return ut.splice(Mt),fn;Mt++}return mt}}const qr={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function bs(lt,mt,ut,Mt,fn){const ni=Io(lt,mt,ut);return ni.matched?(Mt=function gn(lt,mt){return lt.providers&&!lt._injector&&(lt._injector=(0,W.Ol2)(lt.providers,mt,`Route: ${lt.path}`)),lt._injector??mt}(mt,Mt),function Ri(lt,mt,ut,Mt){const fn=mt.canMatch;if(!fn||0===fn.length)return(0,f.of)(!0);const ni=fn.map(Pi=>{const Mo=Kn(Pi,lt);return qt(function Nn(lt){return lt&&ya(lt.canMatch)}(Mo)?Mo.canMatch(mt,ut):(0,W.N4e)(lt,()=>Mo(mt,ut)))});return(0,f.of)(ni).pipe(to(),ti())}(Mt,mt,ut).pipe((0,J.T)(Pi=>!0===Pi?ni:{...qr}))):(0,f.of)(ni)}function Io(lt,mt,ut){if("**"===mt.path)return function Pt(lt){return{matched:!0,parameters:lt.length>0?Tt(lt).parameters:{},consumedSegments:lt,remainingSegments:[],positionalParamSegments:{}}}(ut);if(""===mt.path)return"full"===mt.pathMatch&&(lt.hasChildren()||ut.length>0)?{...qr}:{matched:!0,consumedSegments:[],remainingSegments:ut,parameters:{},positionalParamSegments:{}};const fn=(mt.matcher||Xe)(ut,lt,mt);if(!fn)return{...qr};const ni={};Object.entries(fn.posParams??{}).forEach(([Mo,vo])=>{ni[Mo]=vo.path});const Pi=fn.consumed.length>0?{...ni,...fn.consumed[fn.consumed.length-1].parameters}:ni;return{matched:!0,consumedSegments:fn.consumed,remainingSegments:ut.slice(fn.consumed.length),parameters:Pi,positionalParamSegments:fn.posParams??{}}}function St(lt,mt,ut,Mt){return ut.length>0&&function ro(lt,mt,ut){return ut.some(Mt=>ia(lt,mt,Mt)&&rr(Mt)!==Pe)}(lt,ut,Mt)?{segmentGroup:new Dt(mt,ai(Mt,new Dt(ut,lt.children))),slicedSegments:[]}:0===ut.length&&function jo(lt,mt,ut){return ut.some(Mt=>ia(lt,mt,Mt))}(lt,ut,Mt)?{segmentGroup:new Dt(lt.segments,Dn(lt,ut,Mt,lt.children)),slicedSegments:ut}:{segmentGroup:new Dt(lt.segments,lt.children),slicedSegments:ut}}function Dn(lt,mt,ut,Mt){const fn={};for(const ni of ut)if(ia(lt,mt,ni)&&!Mt[rr(ni)]){const Pi=new Dt([],{});fn[rr(ni)]=Pi}return{...Mt,...fn}}function ai(lt,mt){const ut={};ut[Pe]=mt;for(const Mt of lt)if(""===Mt.path&&rr(Mt)!==Pe){const fn=new Dt([],{});ut[rr(Mt)]=fn}return ut}function ia(lt,mt,ut){return(!(lt.hasChildren()||mt.length>0)||"full"!==ut.pathMatch)&&""===ut.path}class Ls{}class Lc{constructor(mt,ut,Mt,fn,ni,Pi,Mo){this.injector=mt,this.configLoader=ut,this.rootComponentType=Mt,this.config=fn,this.urlTree=ni,this.paramsInheritanceStrategy=Pi,this.urlSerializer=Mo,this.applyRedirects=new jr(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(mt){return new W.wOt(4002,`'${mt.segmentGroup}'`)}recognize(){const mt=St(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(mt).pipe((0,J.T)(({children:ut,rootSnapshot:Mt})=>{const fn=new es(Mt,ut),ni=new kn("",fn),Pi=function ao(lt,mt,ut=null,Mt=null){return Ko(Wi(lt),mt,ut,Mt)}(Mt,[],this.urlTree.queryParams,this.urlTree.fragment);return Pi.queryParams=this.urlTree.queryParams,ni.url=this.urlSerializer.serialize(Pi),{state:ni,tree:Pi}}))}match(mt){const ut=new nn([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Object.freeze({}),Pe,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,mt,Pe,ut).pipe((0,J.T)(Mt=>({children:Mt,rootSnapshot:ut})),(0,le.W)(Mt=>{if(Mt instanceof eo)return this.urlTree=Mt.urlTree,this.match(Mt.urlTree.root);throw Mt instanceof Oi?this.noMatchError(Mt):Mt}))}processSegmentGroup(mt,ut,Mt,fn,ni){return 0===Mt.segments.length&&Mt.hasChildren()?this.processChildren(mt,ut,Mt,ni):this.processSegment(mt,ut,Mt,Mt.segments,fn,!0,ni).pipe((0,J.T)(Pi=>Pi instanceof es?[Pi]:[]))}processChildren(mt,ut,Mt,fn){const ni=[];for(const Pi of Object.keys(Mt.children))"primary"===Pi?ni.unshift(Pi):ni.push(Pi);return(0,b.H)(ni).pipe((0,be.H)(Pi=>{const Mo=Mt.children[Pi],vo=function Pr(lt,mt){const ut=lt.filter(Mt=>rr(Mt)===mt);return ut.push(...lt.filter(Mt=>rr(Mt)!==mt)),ut}(ut,Pi);return this.processSegmentGroup(mt,vo,Mo,Pi,fn)}),function Ce(lt,mt){let ut=!1;return arguments.length>=2&&(ut=!0),function(fn){return fn.lift(new ye(lt,mt,ut))}}((Pi,Mo)=>(Pi.push(...Mo),Pi)),te(null),function Oe(lt,mt){const ut=arguments.length>=2;return Mt=>Mt.pipe(lt?(0,Z.p)((fn,ni)=>lt(fn,ni,Mt)):de.D,xe(1),ut?te(mt):oe(()=>new d))}(),(0,Q.ZZ)(Pi=>{if(null===Pi)return So(Mt);const Mo=qd(Pi);return function tp(lt){lt.sort((mt,ut)=>mt.value.outlet===Pe?-1:ut.value.outlet===Pe?1:mt.value.outlet.localeCompare(ut.value.outlet))}(Mo),(0,f.of)(Mo)}))}processSegment(mt,ut,Mt,fn,ni,Pi,Mo){return(0,b.H)(ut).pipe((0,be.H)(vo=>this.processSegmentAgainstRoute(vo._injector??mt,ut,vo,Mt,fn,ni,Pi,Mo).pipe((0,le.W)(Ir=>{if(Ir instanceof Oi)return(0,f.of)(null);throw Ir}))),ue(vo=>!!vo),(0,le.W)(vo=>{if(hi(vo))return function ep(lt,mt,ut){return 0===mt.length&&!lt.children[ut]}(Mt,fn,ni)?(0,f.of)(new Ls):So(Mt);throw vo}))}processSegmentAgainstRoute(mt,ut,Mt,fn,ni,Pi,Mo,vo){return function Sh(lt,mt,ut,Mt){return!!(rr(lt)===Mt||Mt!==Pe&&ia(mt,ut,lt))&&Io(mt,lt,ut).matched}(Mt,fn,ni,Pi)?void 0===Mt.redirectTo?this.matchSegmentAgainstRoute(mt,fn,Mt,ni,Pi,vo):this.allowRedirects&&Mo?this.expandSegmentAgainstRouteUsingRedirect(mt,fn,ut,Mt,ni,Pi,vo):So(fn):So(fn)}expandSegmentAgainstRouteUsingRedirect(mt,ut,Mt,fn,ni,Pi,Mo){const{matched:vo,parameters:Ir,consumedSegments:Es,positionalParamSegments:Bs,remainingSegments:Va}=Io(ut,fn,ni);if(!vo)return So(ut);"string"==typeof fn.redirectTo&&"/"===fn.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const ac=new nn(ni,Ir,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,kp(fn),rr(fn),fn.component??fn._loadedComponent??null,fn,yt(fn)),lc=Ut(ac,Mo,this.paramsInheritanceStrategy);ac.params=Object.freeze(lc.params),ac.data=Object.freeze(lc.data);const Fc=this.applyRedirects.applyRedirectCommands(Es,fn.redirectTo,Bs,ac,mt);return this.applyRedirects.lineralizeSegments(fn,Fc).pipe((0,Q.ZZ)(wd=>this.processSegment(mt,Mt,ut,wd.concat(Va),Pi,!1,Mo)))}matchSegmentAgainstRoute(mt,ut,Mt,fn,ni,Pi){const Mo=bs(ut,Mt,fn,mt);return"**"===Mt.path&&(ut.children={}),Mo.pipe((0,ie.n)(vo=>vo.matched?this.getChildConfig(mt=Mt._injector??mt,Mt,fn).pipe((0,ie.n)(({routes:Ir})=>{const Es=Mt._loadedInjector??mt,{parameters:Bs,consumedSegments:Va,remainingSegments:ac}=vo,lc=new nn(Va,Bs,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,kp(Mt),rr(Mt),Mt.component??Mt._loadedComponent??null,Mt,yt(Mt)),Fc=Ut(lc,Pi,this.paramsInheritanceStrategy);lc.params=Object.freeze(Fc.params),lc.data=Object.freeze(Fc.data);const{segmentGroup:wd,slicedSegments:wh}=St(ut,Va,ac,Ir);if(0===wh.length&&wd.hasChildren())return this.processChildren(Es,Ir,wd,lc).pipe((0,J.T)(xc=>new es(lc,xc)));if(0===Ir.length&&0===wh.length)return(0,f.of)(new es(lc,[]));const jp=rr(Mt)===ni;return this.processSegment(Es,Ir,wd,wh,jp?Pe:ni,!0,lc).pipe((0,J.T)(xc=>new es(lc,xc instanceof es?[xc]:[])))})):So(ut)))}getChildConfig(mt,ut,Mt){return ut.children?(0,f.of)({routes:ut.children,injector:mt}):ut.loadChildren?void 0!==ut._loadedRoutes?(0,f.of)({routes:ut._loadedRoutes,injector:ut._loadedInjector}):function Rn(lt,mt,ut,Mt){const fn=mt.canLoad;if(void 0===fn||0===fn.length)return(0,f.of)(!0);const ni=fn.map(Pi=>{const Mo=Kn(Pi,lt);return qt(function ft(lt){return lt&&ya(lt.canLoad)}(Mo)?Mo.canLoad(mt,ut):(0,W.N4e)(lt,()=>Mo(mt,ut)))});return(0,f.of)(ni).pipe(to(),ti())}(mt,ut,Mt).pipe((0,Q.ZZ)(fn=>fn?this.configLoader.loadChildren(mt,ut).pipe((0,ve.M)(ni=>{ut._loadedRoutes=ni.routes,ut._loadedInjector=ni.injector})):function zo(lt){return(0,_.$)(Lo(!1,Mr.GuardRejected))}())):(0,f.of)({routes:[],injector:mt})}}function Rm(lt){const mt=lt.value.routeConfig;return mt&&""===mt.path}function qd(lt){const mt=[],ut=new Set;for(const Mt of lt){if(!Rm(Mt)){mt.push(Mt);continue}const fn=mt.find(ni=>Mt.value.routeConfig===ni.value.routeConfig);void 0!==fn?(fn.children.push(...Mt.children),ut.add(fn)):mt.push(Mt)}for(const Mt of ut){const fn=qd(Mt.children);mt.push(new es(Mt.value,fn))}return mt.filter(Mt=>!ut.has(Mt))}function kp(lt){return lt.data||{}}function yt(lt){return lt.resolve||{}}function An(lt){const mt=lt.children.map(ut=>An(ut)).flat();return[lt,...mt]}function Nr(lt){return(0,ie.n)(mt=>{const ut=lt(mt);return ut?(0,b.H)(ut).pipe((0,J.T)(()=>mt)):(0,f.of)(mt)})}let Fa=(()=>{class lt{buildTitle(ut){let Mt,fn=ut.root;for(;void 0!==fn;)Mt=this.getResolvedTitleForRoute(fn)??Mt,fn=fn.children.find(ni=>ni.outlet===Pe);return Mt}getResolvedTitleForRoute(ut){return ut.data[Se]}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:()=>(0,W.WQX)(Vs),providedIn:"root"})}}return lt})(),Vs=(()=>{class lt extends Fa{constructor(ut){super(),this.title=ut}updateTitle(ut){const Mt=this.buildTitle(ut);void 0!==Mt&&this.title.setTitle(Mt)}static{this.\u0275fac=function(Mt){return new(Mt||lt)(W.KVO(Ye.hE))}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();const Rs=new W.nKC("",{providedIn:"root",factory:()=>({})});let mr=(()=>{class lt{static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275cmp=W.VBU({type:lt,selectors:[["ng-component"]],standalone:!0,features:[W.aNF],decls:1,vars:0,template:function(Mt,fn){1&Mt&&W.nrm(0,"router-outlet")},dependencies:[Vo],encapsulation:2})}}return lt})();function Ja(lt){const mt=lt.children&&lt.children.map(Ja),ut=mt?{...lt,children:mt}:{...lt};return!ut.component&&!ut.loadComponent&&(mt||ut.loadChildren)&&ut.outlet&&ut.outlet!==Pe&&(ut.component=mr),ut}const oa=new W.nKC("");let dl=(()=>{class lt{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,W.WQX)(W.Ql9)}loadComponent(ut){if(this.componentLoaders.get(ut))return this.componentLoaders.get(ut);if(ut._loadedComponent)return(0,f.of)(ut._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(ut);const Mt=qt(ut.loadComponent()).pipe((0,J.T)(tu),(0,ve.M)(ni=>{this.onLoadEndListener&&this.onLoadEndListener(ut),ut._loadedComponent=ni}),(0,Ue.j)(()=>{this.componentLoaders.delete(ut)})),fn=new N(Mt,()=>new x.B7).pipe(C());return this.componentLoaders.set(ut,fn),fn}loadChildren(ut,Mt){if(this.childrenLoaders.get(Mt))return this.childrenLoaders.get(Mt);if(Mt._loadedRoutes)return(0,f.of)({routes:Mt._loadedRoutes,injector:Mt._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(Mt);const ni=function eu(lt,mt,ut,Mt){return qt(lt.loadChildren()).pipe((0,J.T)(tu),(0,Q.ZZ)(fn=>fn instanceof W.Co$||Array.isArray(fn)?(0,f.of)(fn):(0,b.H)(mt.compileModuleAsync(fn))),(0,J.T)(fn=>{Mt&&Mt(lt);let ni,Pi,Mo=!1;return Array.isArray(fn)?(Pi=fn,!0):(ni=fn.create(ut).injector,Pi=ni.get(oa,[],{optional:!0,self:!0}).flat()),{routes:Pi.map(Ja),injector:ni}}))}(Mt,this.compiler,ut,this.onLoadEndListener).pipe((0,Ue.j)(()=>{this.childrenLoaders.delete(Mt)})),Pi=new N(ni,()=>new x.B7).pipe(C());return this.childrenLoaders.set(Mt,Pi),Pi}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();function tu(lt){return function Bc(lt){return lt&&"object"==typeof lt&&"default"in lt}(lt)?lt.default:lt}let id=(()=>{class lt{static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:()=>(0,W.WQX)(od),providedIn:"root"})}}return lt})(),od=(()=>{class lt{shouldProcessUrl(ut){return!0}extract(ut){return ut}merge(ut,Mt){return ut}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();const Sd=new W.nKC(""),Nc=new W.nKC("");function np(lt,mt,ut){const Mt=lt.get(Nc),fn=lt.get(K.qQ);return lt.get(W.SKi).runOutsideAngular(()=>{if(!fn.startViewTransition||Mt.skipNextTransition)return Mt.skipNextTransition=!1,new Promise(Ir=>setTimeout(Ir));let ni;const Pi=new Promise(Ir=>{ni=Ir}),Mo=fn.startViewTransition(()=>(ni(),function Eh(lt){return new Promise(mt=>{(0,W.mal)({read:()=>setTimeout(mt)},{injector:lt})})}(lt))),{onViewTransitionCreated:vo}=Mt;return vo&&(0,W.N4e)(lt,()=>vo({transition:Mo,from:mt,to:ut})),Pi})}const Kl=new W.nKC("");let rc=(()=>{class lt{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new x.B7,this.transitionAbortSubject=new x.B7,this.configLoader=(0,W.WQX)(dl),this.environmentInjector=(0,W.WQX)(W.uvJ),this.urlSerializer=(0,W.WQX)($n),this.rootContexts=(0,W.WQX)(os),this.location=(0,W.WQX)(K.aZ),this.inputBindingEnabled=null!==(0,W.WQX)(Er,{optional:!0}),this.titleStrategy=(0,W.WQX)(Fa),this.options=(0,W.WQX)(Rs,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=(0,W.WQX)(id),this.createViewTransition=(0,W.WQX)(Sd,{optional:!0}),this.navigationErrorHandler=(0,W.WQX)(Kl,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>(0,f.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=fn=>this.events.next(new pr(fn)),this.configLoader.onLoadStartListener=fn=>this.events.next(new Sr(fn))}complete(){this.transitions?.complete()}handleNavigationRequest(ut){const Mt=++this.navigationId;this.transitions?.next({...this.transitions.value,...ut,id:Mt})}setupNavigations(ut,Mt,fn){return this.transitions=new S.t({id:0,currentUrlTree:Mt,currentRawUrl:Mt,extractedUrl:this.urlHandlingStrategy.extract(Mt),urlAfterRedirects:this.urlHandlingStrategy.extract(Mt),rawUrl:Mt,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:er,restoredState:null,currentSnapshot:fn.snapshot,targetSnapshot:null,currentRouterState:fn,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,Z.p)(ni=>0!==ni.id),(0,J.T)(ni=>({...ni,extractedUrl:this.urlHandlingStrategy.extract(ni.rawUrl)})),(0,ie.n)(ni=>{let Pi=!1,Mo=!1;return(0,f.of)(ni).pipe((0,ie.n)(vo=>{if(this.navigationId>ni.id)return this.cancelNavigationTransition(ni,"",Mr.SupersededByNewNavigation),u.w;this.currentTransition=ni,this.currentNavigation={id:vo.id,initialUrl:vo.rawUrl,extractedUrl:vo.extractedUrl,targetBrowserUrl:"string"==typeof vo.extras.browserUrl?this.urlSerializer.parse(vo.extras.browserUrl):vo.extras.browserUrl,trigger:vo.source,extras:vo.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const Ir=!ut.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!Ir&&"reload"!==(vo.extras.onSameUrlNavigation??ut.onSameUrlNavigation)){const Bs="";return this.events.next(new _n(vo.id,this.urlSerializer.serialize(vo.rawUrl),Bs,dn.IgnoredSameUrlNavigation)),vo.resolve(!1),u.w}if(this.urlHandlingStrategy.shouldProcessUrl(vo.rawUrl))return(0,f.of)(vo).pipe((0,ie.n)(Bs=>{const Va=this.transitions?.getValue();return this.events.next(new Wr(Bs.id,this.urlSerializer.serialize(Bs.extractedUrl),Bs.source,Bs.restoredState)),Va!==this.transitions?.getValue()?u.w:Promise.resolve(Bs)}),function Un(lt,mt,ut,Mt,fn,ni){return(0,Q.ZZ)(Pi=>function Mu(lt,mt,ut,Mt,fn,ni,Pi="emptyOnly"){return new Lc(lt,mt,ut,Mt,fn,Pi,ni).recognize()}(lt,mt,ut,Mt,Pi.extractedUrl,fn,ni).pipe((0,J.T)(({state:Mo,tree:vo})=>({...Pi,targetSnapshot:Mo,urlAfterRedirects:vo}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,ut.config,this.urlSerializer,this.paramsInheritanceStrategy),(0,ve.M)(Bs=>{ni.targetSnapshot=Bs.targetSnapshot,ni.urlAfterRedirects=Bs.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:Bs.urlAfterRedirects};const Va=new zn(Bs.id,this.urlSerializer.serialize(Bs.extractedUrl),this.urlSerializer.serialize(Bs.urlAfterRedirects),Bs.targetSnapshot);this.events.next(Va)}));if(Ir&&this.urlHandlingStrategy.shouldProcessUrl(vo.currentRawUrl)){const{id:Bs,extractedUrl:Va,source:ac,restoredState:lc,extras:Fc}=vo,wd=new Wr(Bs,this.urlSerializer.serialize(Va),ac,lc);this.events.next(wd);const wh=Ga(this.rootComponentType).snapshot;return this.currentTransition=ni={...vo,targetSnapshot:wh,urlAfterRedirects:Va,extras:{...Fc,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=Va,(0,f.of)(ni)}{const Bs="";return this.events.next(new _n(vo.id,this.urlSerializer.serialize(vo.extractedUrl),Bs,dn.IgnoredByUrlHandlingStrategy)),vo.resolve(!1),u.w}}),(0,ve.M)(vo=>{const Ir=new mi(vo.id,this.urlSerializer.serialize(vo.extractedUrl),this.urlSerializer.serialize(vo.urlAfterRedirects),vo.targetSnapshot);this.events.next(Ir)}),(0,J.T)(vo=>(this.currentTransition=ni={...vo,guards:vn(vo.targetSnapshot,vo.currentSnapshot,this.rootContexts)},ni)),function uo(lt,mt){return(0,Q.ZZ)(ut=>{const{targetSnapshot:Mt,currentSnapshot:fn,guards:{canActivateChecks:ni,canDeactivateChecks:Pi}}=ut;return 0===Pi.length&&0===ni.length?(0,f.of)({...ut,guardsResult:!0}):function so(lt,mt,ut,Mt){return(0,b.H)(lt).pipe((0,Q.ZZ)(fn=>function kt(lt,mt,ut,Mt,fn){const ni=mt&&mt.routeConfig?mt.routeConfig.canDeactivate:null;if(!ni||0===ni.length)return(0,f.of)(!0);const Pi=ni.map(Mo=>{const vo=wr(mt)??fn,Ir=Kn(Mo,vo);return qt(function yn(lt){return lt&&ya(lt.canDeactivate)}(Ir)?Ir.canDeactivate(lt,mt,ut,Mt):(0,W.N4e)(vo,()=>Ir(lt,mt,ut,Mt))).pipe(ue())});return(0,f.of)(Pi).pipe(to())}(fn.component,fn.route,ut,mt,Mt)),ue(fn=>!0!==fn,!0))}(Pi,Mt,fn,lt).pipe((0,Q.ZZ)(Mo=>Mo&&function Wa(lt){return"boolean"==typeof lt}(Mo)?function To(lt,mt,ut,Mt){return(0,b.H)(mt).pipe((0,be.H)(fn=>a(function Wo(lt,mt){return null!==lt&&mt&&mt(new Vr(lt)),(0,f.of)(!0)}(fn.route.parent,Mt),function Ji(lt,mt){return null!==lt&&mt&&mt(new bn(lt)),(0,f.of)(!0)}(fn.route,Mt),function Bt(lt,mt,ut){const Mt=mt[mt.length-1],ni=mt.slice(0,mt.length-1).reverse().map(Pi=>function Ht(lt){const mt=lt.routeConfig?lt.routeConfig.canActivateChild:null;return mt&&0!==mt.length?{node:lt,guards:mt}:null}(Pi)).filter(Pi=>null!==Pi).map(Pi=>h(()=>{const Mo=Pi.guards.map(vo=>{const Ir=wr(Pi.node)??ut,Es=Kn(vo,Ir);return qt(function jt(lt){return lt&&ya(lt.canActivateChild)}(Es)?Es.canActivateChild(Mt,lt):(0,W.N4e)(Ir,()=>Es(Mt,lt))).pipe(ue())});return(0,f.of)(Mo).pipe(to())}));return(0,f.of)(ni).pipe(to())}(lt,fn.path,ut),function ln(lt,mt,ut){const Mt=mt.routeConfig?mt.routeConfig.canActivate:null;if(!Mt||0===Mt.length)return(0,f.of)(!0);const fn=Mt.map(ni=>h(()=>{const Pi=wr(mt)??ut,Mo=Kn(ni,Pi);return qt(function ht(lt){return lt&&ya(lt.canActivate)}(Mo)?Mo.canActivate(mt,lt):(0,W.N4e)(Pi,()=>Mo(mt,lt))).pipe(ue())}));return(0,f.of)(fn).pipe(to())}(lt,fn.route,ut))),ue(fn=>!0!==fn,!0))}(Mt,ni,lt,mt):(0,f.of)(Mo)),(0,J.T)(Mo=>({...ut,guardsResult:Mo})))})}(this.environmentInjector,vo=>this.events.next(vo)),(0,ve.M)(vo=>{if(ni.guardsResult=vo.guardsResult,vo.guardsResult&&"boolean"!=typeof vo.guardsResult)throw Ma(0,vo.guardsResult);const Ir=new Si(vo.id,this.urlSerializer.serialize(vo.extractedUrl),this.urlSerializer.serialize(vo.urlAfterRedirects),vo.targetSnapshot,!!vo.guardsResult);this.events.next(Ir)}),(0,Z.p)(vo=>!!vo.guardsResult||(this.cancelNavigationTransition(vo,"",Mr.GuardRejected),!1)),Nr(vo=>{if(vo.guards.canActivateChecks.length)return(0,f.of)(vo).pipe((0,ve.M)(Ir=>{const Es=new go(Ir.id,this.urlSerializer.serialize(Ir.extractedUrl),this.urlSerializer.serialize(Ir.urlAfterRedirects),Ir.targetSnapshot);this.events.next(Es)}),(0,ie.n)(Ir=>{let Es=!1;return(0,f.of)(Ir).pipe(function Jt(lt,mt){return(0,Q.ZZ)(ut=>{const{targetSnapshot:Mt,guards:{canActivateChecks:fn}}=ut;if(!fn.length)return(0,f.of)(ut);const ni=new Set(fn.map(vo=>vo.route)),Pi=new Set;for(const vo of ni)if(!Pi.has(vo))for(const Ir of An(vo))Pi.add(Ir);let Mo=0;return(0,b.H)(Pi).pipe((0,be.H)(vo=>ni.has(vo)?function ki(lt,mt,ut,Mt){const fn=lt.routeConfig,ni=lt._resolve;return void 0!==fn?.title&&!Xi(fn)&&(ni[Se]=fn.title),function Ao(lt,mt,ut,Mt){const fn=qe(lt);if(0===fn.length)return(0,f.of)({});const ni={};return(0,b.H)(fn).pipe((0,Q.ZZ)(Pi=>function ar(lt,mt,ut,Mt){const fn=wr(mt)??Mt,ni=Kn(lt,fn);return qt(ni.resolve?ni.resolve(mt,ut):(0,W.N4e)(fn,()=>ni(mt,ut)))}(lt[Pi],mt,ut,Mt).pipe(ue(),(0,ve.M)(Mo=>{if(Mo instanceof Gs)throw Ma(new Ln,Mo);ni[Pi]=Mo}))),xe(1),function ze(lt){return mt=>mt.lift(new $e(lt))}(ni),(0,le.W)(Pi=>hi(Pi)?u.w:(0,_.$)(Pi)))}(ni,lt,mt,Mt).pipe((0,J.T)(Pi=>(lt._resolvedData=Pi,lt.data=Ut(lt,lt.parent,ut).resolve,null)))}(vo,Mt,lt,mt):(vo.data=Ut(vo,vo.parent,lt).resolve,(0,f.of)(void 0))),(0,ve.M)(()=>Mo++),xe(1),(0,Q.ZZ)(vo=>Mo===Pi.size?(0,f.of)(ut):u.w))})}(this.paramsInheritanceStrategy,this.environmentInjector),(0,ve.M)({next:()=>Es=!0,complete:()=>{Es||this.cancelNavigationTransition(Ir,"",Mr.NoDataFromResolver)}}))}),(0,ve.M)(Ir=>{const Es=new No(Ir.id,this.urlSerializer.serialize(Ir.extractedUrl),this.urlSerializer.serialize(Ir.urlAfterRedirects),Ir.targetSnapshot);this.events.next(Es)}))}),Nr(vo=>{const Ir=Es=>{const Bs=[];Es.routeConfig?.loadComponent&&!Es.routeConfig._loadedComponent&&Bs.push(this.configLoader.loadComponent(Es.routeConfig).pipe((0,ve.M)(Va=>{Es.component=Va}),(0,J.T)(()=>{})));for(const Va of Es.children)Bs.push(...Ir(Va));return Bs};return(0,T.zV)(Ir(vo.targetSnapshot.root)).pipe(te(null),(0,re.s)(1))}),Nr(()=>this.afterPreactivation()),(0,ie.n)(()=>{const{currentSnapshot:vo,targetSnapshot:Ir}=ni,Es=this.createViewTransition?.(this.environmentInjector,vo.root,Ir.root);return Es?(0,b.H)(Es).pipe((0,J.T)(()=>ni)):(0,f.of)(ni)}),(0,J.T)(vo=>{const Ir=function ms(lt,mt,ut){const Mt=rs(lt,mt._root,ut?ut._root:void 0);return new Ca(Mt,mt)}(ut.routeReuseStrategy,vo.targetSnapshot,vo.currentRouterState);return this.currentTransition=ni={...vo,targetRouterState:Ir},this.currentNavigation.targetRouterState=Ir,ni}),(0,ve.M)(()=>{this.events.next(new Mi)}),((lt,mt,ut,Mt)=>(0,J.T)(fn=>(new Ld(mt,fn.targetRouterState,fn.currentRouterState,ut,Mt).activate(lt),fn)))(this.rootContexts,ut.routeReuseStrategy,vo=>this.events.next(vo),this.inputBindingEnabled),(0,re.s)(1),(0,ve.M)({next:vo=>{Pi=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Xr(vo.id,this.urlSerializer.serialize(vo.extractedUrl),this.urlSerializer.serialize(vo.urlAfterRedirects))),this.titleStrategy?.updateTitle(vo.targetRouterState.snapshot),vo.resolve(!0)},complete:()=>{Pi=!0}}),function st(lt){return mt=>mt.lift(new et(lt))}(this.transitionAbortSubject.pipe((0,ve.M)(vo=>{throw vo}))),(0,Ue.j)(()=>{!Pi&&!Mo&&this.cancelNavigationTransition(ni,"",Mr.SupersededByNewNavigation),this.currentTransition?.id===ni.id&&(this.currentNavigation=null,this.currentTransition=null)}),(0,le.W)(vo=>{if(Mo=!0,cl(vo))this.events.next(new an(ni.id,this.urlSerializer.serialize(ni.extractedUrl),vo.message,vo.cancellationCode)),function Ms(lt){return cl(lt)&&bi(lt.url)}(vo)?this.events.next(new Ki(vo.url,vo.navigationBehaviorOptions)):ni.resolve(!1);else{const Ir=new Wt(ni.id,this.urlSerializer.serialize(ni.extractedUrl),vo,ni.targetSnapshot??void 0);try{const Es=(0,W.N4e)(this.environmentInjector,()=>this.navigationErrorHandler?.(Ir));if(Es instanceof Gs){const{message:Bs,cancellationCode:Va}=Ma(0,Es);this.events.next(new an(ni.id,this.urlSerializer.serialize(ni.extractedUrl),Bs,Va)),this.events.next(new Ki(Es.redirectTo,Es.navigationBehaviorOptions))}else{this.events.next(Ir);const Bs=ut.errorHandler(vo);ni.resolve(!!Bs)}}catch(Es){this.options.resolveNavigationPromiseOnError?ni.resolve(!1):ni.reject(Es)}}return u.w}))}))}cancelNavigationTransition(ut,Mt,fn){const ni=new an(ut.id,this.urlSerializer.serialize(ut.extractedUrl),Mt,fn);this.events.next(ni),ut.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){const ut=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),Mt=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return ut.toString()!==Mt?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();function Lp(lt){return lt!==er}let rd=(()=>{class lt{static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:()=>(0,W.WQX)(Mg),providedIn:"root"})}}return lt})();class Pg{shouldDetach(mt){return!1}store(mt,ut){}shouldAttach(mt){return!1}retrieve(mt){return null}shouldReuseRoute(mt,ut){return mt.routeConfig===ut.routeConfig}}let Mg=(()=>{class lt extends Pg{static{this.\u0275fac=(()=>{let ut;return function(fn){return(ut||(ut=W.xGo(lt)))(fn||lt)}})()}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})(),Rg=(()=>{class lt{static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:()=>(0,W.WQX)(Z_),providedIn:"root"})}}return lt})(),Z_=(()=>{class lt extends Rg{constructor(){super(...arguments),this.location=(0,W.WQX)(K.aZ),this.urlSerializer=(0,W.WQX)($n),this.options=(0,W.WQX)(Rs,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=(0,W.WQX)(id),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new pt,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Ga(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(ut){return this.location.subscribe(Mt=>{"popstate"===Mt.type&&ut(Mt.url,Mt.state)})}handleRouterEvent(ut,Mt){if(ut instanceof Wr)this.stateMemento=this.createStateMemento();else if(ut instanceof _n)this.rawUrlTree=Mt.initialUrl;else if(ut instanceof zn){if("eager"===this.urlUpdateStrategy&&!Mt.extras.skipLocationChange){const fn=this.urlHandlingStrategy.merge(Mt.finalUrl,Mt.initialUrl);this.setBrowserUrl(Mt.targetBrowserUrl??fn,Mt)}}else ut instanceof Mi?(this.currentUrlTree=Mt.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(Mt.finalUrl,Mt.initialUrl),this.routerState=Mt.targetRouterState,"deferred"===this.urlUpdateStrategy&&!Mt.extras.skipLocationChange&&this.setBrowserUrl(Mt.targetBrowserUrl??this.rawUrlTree,Mt)):ut instanceof an&&(ut.code===Mr.GuardRejected||ut.code===Mr.NoDataFromResolver)?this.restoreHistory(Mt):ut instanceof Wt?this.restoreHistory(Mt,!0):ut instanceof Xr&&(this.lastSuccessfulId=ut.id,this.currentPageId=this.browserPageId)}setBrowserUrl(ut,Mt){const fn=ut instanceof pt?this.urlSerializer.serialize(ut):ut;if(this.location.isCurrentPathEqualTo(fn)||Mt.extras.replaceUrl){const Pi={...Mt.extras.state,...this.generateNgRouterState(Mt.id,this.browserPageId)};this.location.replaceState(fn,"",Pi)}else{const ni={...Mt.extras.state,...this.generateNgRouterState(Mt.id,this.browserPageId+1)};this.location.go(fn,"",ni)}}restoreHistory(ut,Mt=!1){if("computed"===this.canceledNavigationResolution){const ni=this.currentPageId-this.browserPageId;0!==ni?this.location.historyGo(ni):this.currentUrlTree===ut.finalUrl&&0===ni&&(this.resetState(ut),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(Mt&&this.resetState(ut),this.resetUrlToCurrentUrlTree())}resetState(ut){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,ut.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(ut,Mt){return"computed"===this.canceledNavigationResolution?{navigationId:ut,\u0275routerPageId:Mt}:{navigationId:ut}}static{this.\u0275fac=(()=>{let ut;return function(fn){return(ut||(ut=W.xGo(lt)))(fn||lt)}})()}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();var Bp=function(lt){return lt[lt.COMPLETE=0]="COMPLETE",lt[lt.FAILED=1]="FAILED",lt[lt.REDIRECTING=2]="REDIRECTING",lt}(Bp||{});function Nf(lt,mt){lt.events.pipe((0,Z.p)(ut=>ut instanceof Xr||ut instanceof an||ut instanceof Wt||ut instanceof _n),(0,J.T)(ut=>ut instanceof Xr||ut instanceof _n?Bp.COMPLETE:ut instanceof an&&(ut.code===Mr.Redirect||ut.code===Mr.SupersededByNewNavigation)?Bp.REDIRECTING:Bp.FAILED),(0,Z.p)(ut=>ut!==Bp.REDIRECTING),(0,re.s)(1)).subscribe(()=>{mt()})}function pc(lt){throw lt}const Np={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ip={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let sd=(()=>{class lt{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=(0,W.WQX)(W.H3F),this.stateManager=(0,W.WQX)(Rg),this.options=(0,W.WQX)(Rs,{optional:!0})||{},this.pendingTasks=(0,W.WQX)(W.TgB),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=(0,W.WQX)(rc),this.urlSerializer=(0,W.WQX)($n),this.location=(0,W.WQX)(K.aZ),this.urlHandlingStrategy=(0,W.WQX)(id),this._events=new x.B7,this.errorHandler=this.options.errorHandler||pc,this.navigated=!1,this.routeReuseStrategy=(0,W.WQX)(rd),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=(0,W.WQX)(oa,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!(0,W.WQX)(Er,{optional:!0}),this.eventsSubscription=new D.y,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:ut=>{this.console.warn(ut)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const ut=this.navigationTransitions.events.subscribe(Mt=>{try{const fn=this.navigationTransitions.currentTransition,ni=this.navigationTransitions.currentNavigation;if(null!==fn&&null!==ni)if(this.stateManager.handleRouterEvent(Mt,ni),Mt instanceof an&&Mt.code!==Mr.Redirect&&Mt.code!==Mr.SupersededByNewNavigation)this.navigated=!0;else if(Mt instanceof Xr)this.navigated=!0;else if(Mt instanceof Ki){const Pi=Mt.navigationBehaviorOptions,Mo=this.urlHandlingStrategy.merge(Mt.url,fn.currentRawUrl),vo={browserUrl:fn.extras.browserUrl,info:fn.extras.info,skipLocationChange:fn.extras.skipLocationChange,replaceUrl:fn.extras.replaceUrl||"eager"===this.urlUpdateStrategy||Lp(fn.source),...Pi};this.scheduleNavigation(Mo,er,null,vo,{resolve:fn.resolve,reject:fn.reject,promise:fn.promise})}(function gc(lt){return!(lt instanceof Mi||lt instanceof Ki)})(Mt)&&this._events.next(Mt)}catch(fn){this.navigationTransitions.transitionAbortSubject.next(fn)}});this.eventsSubscription.add(ut)}resetRootComponentType(ut){this.routerState.root.component=ut,this.navigationTransitions.rootComponentType=ut}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),er,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((ut,Mt)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(ut,"popstate",Mt)},0)})}navigateToSyncWithBrowser(ut,Mt,fn){const ni={replaceUrl:!0},Pi=fn?.navigationId?fn:null;if(fn){const vo={...fn};delete vo.navigationId,delete vo.\u0275routerPageId,0!==Object.keys(vo).length&&(ni.state=vo)}const Mo=this.parseUrl(ut);this.scheduleNavigation(Mo,Mt,Pi,ni)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(ut){this.config=ut.map(Ja),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(ut,Mt={}){const{relativeTo:fn,queryParams:ni,fragment:Pi,queryParamsHandling:Mo,preserveFragment:vo}=Mt,Ir=vo?this.currentUrlTree.fragment:Pi;let Bs,Es=null;switch(Mo){case"merge":Es={...this.currentUrlTree.queryParams,...ni};break;case"preserve":Es=this.currentUrlTree.queryParams;break;default:Es=ni||null}null!==Es&&(Es=this.removeEmptyProps(Es));try{Bs=Wi(fn?fn.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof ut[0]||"/"!==ut[0][0])&&(ut=[]),Bs=this.currentUrlTree.root}return Ko(Bs,ut,Es,Ir??null)}navigateByUrl(ut,Mt={skipLocationChange:!1}){const fn=bi(ut)?ut:this.parseUrl(ut),ni=this.urlHandlingStrategy.merge(fn,this.rawUrlTree);return this.scheduleNavigation(ni,er,null,Mt)}navigate(ut,Mt={skipLocationChange:!1}){return function nu(lt){for(let mt=0;mt<lt.length;mt++)if(null==lt[mt])throw new W.wOt(4008,!1)}(ut),this.navigateByUrl(this.createUrlTree(ut,Mt),Mt)}serializeUrl(ut){return this.urlSerializer.serialize(ut)}parseUrl(ut){try{return this.urlSerializer.parse(ut)}catch{return this.urlSerializer.parse("/")}}isActive(ut,Mt){let fn;if(fn=!0===Mt?{...Np}:!1===Mt?{...ip}:Mt,bi(ut))return ri(this.currentUrlTree,ut,fn);const ni=this.parseUrl(ut);return ri(this.currentUrlTree,ni,fn)}removeEmptyProps(ut){return Object.entries(ut).reduce((Mt,[fn,ni])=>(null!=ni&&(Mt[fn]=ni),Mt),{})}scheduleNavigation(ut,Mt,fn,ni,Pi){if(this.disposed)return Promise.resolve(!1);let Mo,vo,Ir;Pi?(Mo=Pi.resolve,vo=Pi.reject,Ir=Pi.promise):Ir=new Promise((Bs,Va)=>{Mo=Bs,vo=Va});const Es=this.pendingTasks.add();return Nf(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(Es))}),this.navigationTransitions.handleNavigationRequest({source:Mt,restoredState:fn,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:ut,extras:ni,resolve:Mo,reject:vo,promise:Ir,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Ir.catch(Bs=>Promise.reject(Bs))}static{this.\u0275fac=function(Mt){return new(Mt||lt)}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})(),Hs=(()=>{class lt{constructor(ut,Mt,fn,ni,Pi,Mo){this.router=ut,this.route=Mt,this.tabIndexAttribute=fn,this.renderer=ni,this.el=Pi,this.locationStrategy=Mo,this.href=null,this.onChanges=new x.B7,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;const vo=Pi.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===vo||"area"===vo,this.isAnchorElement?this.subscription=ut.events.subscribe(Ir=>{Ir instanceof Xr&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(ut){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",ut)}ngOnChanges(ut){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(ut){null==ut?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(this.routerLinkInput=bi(ut)||Array.isArray(ut)?ut:[ut],this.setTabIndexIfNotOnNativeEl("0"))}onClick(ut,Mt,fn,ni,Pi){const Mo=this.urlTree;return!!(null===Mo||this.isAnchorElement&&(0!==ut||Mt||fn||ni||Pi||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(Mo,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const ut=this.urlTree;this.href=null!==ut&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(ut)):null;const Mt=null===this.href?null:(0,W.n$t)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",Mt)}applyAttributeValue(ut,Mt){const fn=this.renderer,ni=this.el.nativeElement;null!==Mt?fn.setAttribute(ni,ut,Mt):fn.removeAttribute(ni,ut)}get urlTree(){return null===this.routerLinkInput?null:bi(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static{this.\u0275fac=function(Mt){return new(Mt||lt)(W.rXU(sd),W.rXU(ct),W.kS0("tabindex"),W.rXU(W.sFG),W.rXU(W.aKT),W.rXU(K.hb))}}static{this.\u0275dir=W.FsC({type:lt,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(Mt,fn){1&Mt&&W.bIt("click",function(Pi){return fn.onClick(Pi.button,Pi.ctrlKey,Pi.shiftKey,Pi.altKey,Pi.metaKey)}),2&Mt&&W.BMQ("target",fn.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",W.L39],skipLocationChange:[2,"skipLocationChange","skipLocationChange",W.L39],replaceUrl:[2,"replaceUrl","replaceUrl",W.L39],routerLink:"routerLink"},standalone:!0,features:[W.GFd,W.OA$]})}}return lt})();class Oh{}let Ed=(()=>{class lt{constructor(ut,Mt,fn,ni,Pi){this.router=ut,this.injector=fn,this.preloadingStrategy=ni,this.loader=Pi}setUpPreloading(){this.subscription=this.router.events.pipe((0,Z.p)(ut=>ut instanceof Xr),(0,be.H)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(ut,Mt){const fn=[];for(const ni of Mt){ni.providers&&!ni._injector&&(ni._injector=(0,W.Ol2)(ni.providers,ut,`Route: ${ni.path}`));const Pi=ni._injector??ut,Mo=ni._loadedInjector??Pi;(ni.loadChildren&&!ni._loadedRoutes&&void 0===ni.canLoad||ni.loadComponent&&!ni._loadedComponent)&&fn.push(this.preloadConfig(Pi,ni)),(ni.children||ni._loadedRoutes)&&fn.push(this.processRoutes(Mo,ni.children??ni._loadedRoutes))}return(0,b.H)(fn).pipe((0,c.U)())}preloadConfig(ut,Mt){return this.preloadingStrategy.preload(Mt,()=>{let fn;fn=Mt.loadChildren&&void 0===Mt.canLoad?this.loader.loadChildren(ut,Mt):(0,f.of)(null);const ni=fn.pipe((0,Q.ZZ)(Pi=>null===Pi?(0,f.of)(void 0):(Mt._loadedRoutes=Pi.routes,Mt._loadedInjector=Pi.injector,this.processRoutes(Pi.injector??ut,Pi.routes))));if(Mt.loadComponent&&!Mt._loadedComponent){const Pi=this.loader.loadComponent(Mt);return(0,b.H)([ni,Pi]).pipe((0,c.U)())}return ni})}static{this.\u0275fac=function(Mt){return new(Mt||lt)(W.KVO(sd),W.KVO(W.Ql9),W.KVO(W.uvJ),W.KVO(Oh),W.KVO(dl))}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac,providedIn:"root"})}}return lt})();const ld=new W.nKC("");let qu=(()=>{class lt{constructor(ut,Mt,fn,ni,Pi={}){this.urlSerializer=ut,this.transitions=Mt,this.viewportScroller=fn,this.zone=ni,this.options=Pi,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},Pi.scrollPositionRestoration||="disabled",Pi.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(ut=>{ut instanceof Wr?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=ut.navigationTrigger,this.restoredId=ut.restoredState?ut.restoredState.navigationId:0):ut instanceof Xr?(this.lastId=ut.id,this.scheduleScrollEvent(ut,this.urlSerializer.parse(ut.urlAfterRedirects).fragment)):ut instanceof _n&&ut.code===dn.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(ut,this.urlSerializer.parse(ut.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(ut=>{ut instanceof Ci&&(ut.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(ut.position):ut.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(ut.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(ut,Mt){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Ci(ut,"popstate"===this.lastSource?this.store[this.restoredId]:null,Mt))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(Mt){W.QTQ()}}static{this.\u0275prov=W.jDH({token:lt,factory:lt.\u0275fac})}}return lt})();function Od(lt,mt){return{\u0275kind:lt,\u0275providers:mt}}function bc(){const lt=(0,W.WQX)(W.zZn);return mt=>{const ut=lt.get(W.o8S);if(mt!==ut.components[0])return;const Mt=lt.get(sd),fn=lt.get(Ff);1===lt.get(Bg)&&Mt.initialNavigation(),lt.get(Lm,null,W.$GK.Optional)?.setUpPreloading(),lt.get(ld,null,W.$GK.Optional)?.init(),Mt.resetRootComponentType(ut.componentTypes[0]),fn.closed||(fn.next(),fn.complete(),fn.unsubscribe())}}const Ff=new W.nKC("",{factory:()=>new x.B7}),Bg=new W.nKC("",{providedIn:"root",factory:()=>1}),Lm=new W.nKC("");function iu(lt){return Od(0,[{provide:Lm,useExisting:Ed},{provide:Oh,useExisting:lt}])}function Fg(lt){return Od(9,[{provide:Sd,useValue:np},{provide:Nc,useValue:{skipNextTransition:!!lt?.skipInitialTransition,...lt}}])}const Gp=new W.nKC("ROUTER_FORROOT_GUARD"),Yl=[K.aZ,{provide:$n,useClass:Ln},sd,os,{provide:ct,useFactory:function Up(lt){return lt.routerState.root},deps:[sd]},dl,[]];let Bm=(()=>{class lt{constructor(ut){}static forRoot(ut,Mt){return{ngModule:lt,providers:[Yl,[],{provide:oa,multi:!0,useValue:ut},{provide:Gp,useFactory:Bd,deps:[[sd,new W.Xx1,new W.kdw]]},{provide:Rs,useValue:Mt||{}},Mt?.useHash?{provide:K.hb,useClass:K.fw}:{provide:K.hb,useClass:K.Sm},{provide:ld,useFactory:()=>{const lt=(0,W.WQX)(K.Xr),mt=(0,W.WQX)(W.SKi),ut=(0,W.WQX)(Rs),Mt=(0,W.WQX)(rc),fn=(0,W.WQX)($n);return ut.scrollOffset&&lt.setOffset(ut.scrollOffset),new qu(fn,Mt,lt,mt,ut)}},Mt?.preloadingStrategy?iu(Mt.preloadingStrategy).\u0275providers:[],Mt?.initialNavigation?Qs(Mt):[],Mt?.bindToComponentInputs?Od(8,[Ts,{provide:Er,useExisting:Ts}]).\u0275providers:[],Mt?.enableViewTransitions?Fg().\u0275providers:[],[{provide:_l,useFactory:bc},{provide:W.iLQ,multi:!0,useExisting:_l}]]}}static forChild(ut){return{ngModule:lt,providers:[{provide:oa,multi:!0,useValue:ut}]}}static{this.\u0275fac=function(Mt){return new(Mt||lt)(W.KVO(Gp,8))}}static{this.\u0275mod=W.$C({type:lt})}static{this.\u0275inj=W.G2t({})}}return lt})();function Bd(lt){return"guarded"}function Qs(lt){return["disabled"===lt.initialNavigation?Od(3,[{provide:W.hnV,multi:!0,useFactory:()=>{const mt=(0,W.WQX)(sd);return()=>{mt.setUpLocationChangeListener()}}},{provide:Bg,useValue:2}]).\u0275providers:[],"enabledBlocking"===lt.initialNavigation?Od(2,[{provide:Bg,useValue:0},{provide:W.hnV,multi:!0,deps:[W.zZn],useFactory:mt=>{const ut=mt.get(K.hj,Promise.resolve());return()=>ut.then(()=>new Promise(Mt=>{const fn=mt.get(sd),ni=mt.get(Ff);Nf(fn,()=>{Mt(!0)}),mt.get(rc).afterPreactivation=()=>(Mt(!0),ni.closed?(0,f.of)(void 0):ni),fn.initialNavigation()}))}}]).\u0275providers:[]]}const _l=new W.nKC("")},2198:(In,Ze,M)=>{"use strict";M.d(Ze,{PW:()=>Xe,be:()=>Gt,f$:()=>vt});var W=M(7788);function o(){throw new Error("AngularJS v1.x is not loaded!")}const P=()=>o();P.cleanData=o;let b={bootstrap:o,module:o,element:P,injector:o,version:void 0,resumeBootstrap:o,getTestability:o};try{window.hasOwnProperty("angular")&&(b=window.angular)}catch{}const c=(on,sn)=>b.module(on,sn),s=on=>b.element(on);s.cleanData=on=>b.element.cleanData(on);const _="$compile",w="$delegate",I="$injector",L="$interval",N="$parse",ie="$$testability",q="$$angularDowngradedModuleCount",Z="$$angularInjector",Q="$$angularLazyModuleRef",pe="$$angularUpgradeAppType",z="?^^"+Z,oe="?ngModel",ae="$$UpgradeModule";class he{constructor(sn,It){this.prop=sn,this.attr=It,this.bracketAttr=`[${this.attr}]`,this.parenAttr=`(${this.attr})`,this.bracketParenAttr=`[(${this.attr})]`;const Ot=this.attr.charAt(0).toUpperCase()+this.attr.slice(1);this.onAttr=`on${Ot}`,this.bindAttr=`bind${Ot}`,this.bindonAttr=`bindon${Ot}`}}function ve(on){s.cleanData([on]),function Oe(on){return Te(on.querySelectorAll)}(on)&&s.cleanData(on.querySelectorAll("*"))}function le(on){return"$"+on+"Controller"}function ge(on){return on.overriddenName||on.name||on.toString().split("\n")[0]}function fe(on){return on.has(q)?on.get(q):0}function xe(on){return on.has(pe)?on.get(pe):0}function Te(on){return"function"==typeof on}function ze(on,sn,It,Ot){const zt=xe(on),un=fe(on);switch(zt){case 1:case 2:if(sn)throw new Error(`Error while ${Ot}: 'downgradedModule' unexpectedly specified.\nYou should not specify a value for 'downgradedModule', unless you are downgrading more than one Angular module (via 'downgradeModule()').`);break;case 3:if(!sn&&un>=2)throw new Error(`Error while ${Ot}: 'downgradedModule' not specified.\nThis application contains more than one downgraded Angular module, thus you need to always specify 'downgradedModule' when downgrading components and injectables.`);if(!on.has(It))throw new Error(`Error while ${Ot}: Unable to find the specified downgraded module.\nDid you forget to downgrade an Angular module or include it in the AngularJS application?`);break;default:throw new Error(`Error while ${Ot}: Not a valid '@angular/upgrade' application.\nDid you forget to downgrade an Angular module or include it in the AngularJS application?`)}}function ot(on,sn){return on===sn||on!=on&&sn!=sn}const et={__UNINITIALIZED__:!0};class Ke{constructor(sn,It,Ot,zt,un,Pn,ci,Ei,Hi){this.element=sn,this.attrs=It,this.scope=Ot,this.ngModel=zt,this.parentInjector=un,this.$compile=Pn,this.$parse=ci,this.componentFactory=Ei,this.wrapCallback=Hi,this.implementsOnChanges=!1,this.inputChangeCount=0,this.inputChanges={},this.componentScope=Ot.$new()}compileContents(){const sn=[],Ot=this.groupProjectableNodes().map(zt=>this.$compile(zt));return this.element.empty(),Ot.forEach(zt=>{zt(this.scope,un=>{sn.push(un),this.element.append(un)})}),sn}createComponentAndSetup(sn,It=!1,Ot=!0){const zt=this.createComponent(sn);return this.setupInputs(It,Ot,zt),this.setupOutputs(zt.componentRef),this.registerCleanup(zt.componentRef),zt.componentRef}createComponent(sn){const Ot=W.zZn.create({providers:[{provide:"$scope",useValue:this.componentScope}],parent:this.parentInjector,name:"DowngradeComponentAdapter"}),zt=this.componentFactory.create(Ot,sn,this.element[0]),un=zt.injector.get(W.gRc),Pn=zt.changeDetectorRef,ci=zt.injector.get(W.NYb,null);return ci&&zt.injector.get(W.giA).registerApplication(zt.location.nativeElement,ci),function Ue(on,sn){on&&function Be(on){return"function"==typeof on.writeValue&&"function"==typeof on.registerOnChange}(sn)&&(on.$render=()=>{sn.writeValue(on.$viewValue)},sn.registerOnChange(on.$setViewValue.bind(on)),"function"==typeof sn.registerOnTouched&&sn.registerOnTouched(on.$setTouched.bind(on)))}(this.ngModel,zt.instance),{viewChangeDetector:un,componentRef:zt,changeDetector:Pn}}setupInputs(sn,It=!0,{componentRef:Ot,changeDetector:zt,viewChangeDetector:un}){const Pn=this.attrs,ci=this.componentFactory.inputs||[];for(const mo of ci){const xo=new he(mo.propName,mo.templateName);let vr=null;if(Pn.hasOwnProperty(xo.attr)){const rn=(Zn=>{let Di=et;return po=>{ot(Di,po)||(Di===et&&(Di=po),this.updateInput(Ot,Zn,Di,po),Di=po)}})(xo.prop);Pn.$observe(xo.attr,rn);let en=this.componentScope.$watch(()=>{en(),en=null,rn(Pn[xo.attr])})}else Pn.hasOwnProperty(xo.bindAttr)?vr=Pn[xo.bindAttr]:Pn.hasOwnProperty(xo.bracketAttr)?vr=Pn[xo.bracketAttr]:Pn.hasOwnProperty(xo.bindonAttr)?vr=Pn[xo.bindonAttr]:Pn.hasOwnProperty(xo.bracketParenAttr)&&(vr=Pn[xo.bracketParenAttr]);null!=vr&&this.componentScope.$watch(vr,(en=>(Zn,Di)=>this.updateInput(Ot,en,Di,Zn))(xo.prop))}const Ei=()=>zt.detectChanges(),Hi=this.componentFactory.componentType.prototype;if(this.implementsOnChanges=!(!Hi||!Hi.ngOnChanges),this.componentScope.$watch(()=>this.inputChangeCount,this.wrapCallback(()=>{if(this.implementsOnChanges){const mo=this.inputChanges;this.inputChanges={},Ot.instance.ngOnChanges(mo)}un.markForCheck(),It||Ei()})),It&&this.componentScope.$watch(this.wrapCallback(Ei)),sn||!It){let mo=this.componentScope.$watch(()=>{mo(),mo=null,this.parentInjector.get(W.o8S).attachView(Ot.hostView)})}}setupOutputs(sn){const It=this.attrs,Ot=this.componentFactory.outputs||[];for(const zt of Ot){const un=new he(zt.propName,zt.templateName),Pn=un.bindonAttr.substring(0,un.bindonAttr.length-6),ci=`[(${un.bracketParenAttr.substring(2,un.bracketParenAttr.length-8)})]`;It.hasOwnProperty(Pn)&&this.subscribeToOutput(sn,un,It[Pn],!0),It.hasOwnProperty(ci)&&this.subscribeToOutput(sn,un,It[ci],!0),It.hasOwnProperty(un.onAttr)&&this.subscribeToOutput(sn,un,It[un.onAttr]),It.hasOwnProperty(un.parenAttr)&&this.subscribeToOutput(sn,un,It[un.parenAttr])}}subscribeToOutput(sn,It,Ot,zt=!1){const un=this.$parse(Ot),Pn=un.assign;if(zt&&!Pn)throw new Error(`Expression '${Ot}' is not assignable!`);const ci=sn.instance[It.prop];if(!ci)throw new Error(`Missing emitter '${It.prop}' on component '${ge(this.componentFactory.componentType)}'!`);{const Ei=ci.subscribe({next:zt?Hi=>Pn(this.scope,Hi):Hi=>un(this.scope,{$event:Hi})});sn.onDestroy(()=>Ei.unsubscribe())}}registerCleanup(sn){const It=sn.injector.get(W.giA),Ot=this.wrapCallback(()=>sn.destroy());let zt=!1;this.element.on("$destroy",()=>{zt||this.componentScope.$destroy()}),this.componentScope.$on("$destroy",()=>{zt||(zt=!0,It.unregisterApplication(sn.location.nativeElement),ve(this.element[0]),Ot())})}updateInput(sn,It,Ot,zt){this.implementsOnChanges&&(this.inputChanges[It]=new W.FRM(Ot,zt,Ot===zt)),this.inputChangeCount++,sn.instance[It]=zt}groupProjectableNodes(){return function Ye(on,sn){const It=[];for(let Ot=0,zt=on.length;Ot<zt;++Ot)It[Ot]=[];for(let Ot=0,zt=sn.length;Ot<zt;++Ot){const un=sn[Ot],Pn=Pe(un,on);null!=Pn&&It[Pn].push(un)}return It}(this.componentFactory.ngContentSelectors,this.element.contents())}}function Pe(on,sn){const It=[];let Ot=-1;for(let zt=0;zt<sn.length;zt++){const un=sn[zt];"*"===un?Ot=zt:Se(on,un)&&It.push(zt)}return It.sort(),-1!==Ot&&It.push(Ot),It.length?It[0]:null}function Se(on,sn){const It=Element.prototype;return on.nodeType===Node.ELEMENT_NODE&&(It.matches??It.msMatchesSelector).call(on,sn)}class Fe{constructor(){this.resolved=!1,this.callbacks=[]}static all(sn){const It=new Fe;let Ot=0;const zt=[],un=(Pn,ci)=>{zt[Pn]=ci,++Ot===sn.length&&It.resolve(zt)};return sn.forEach((Pn,ci)=>{!function Re(on){return!!on&&Te(on.then)}(Pn)?un(ci,Pn):Pn.then(Ei=>un(ci,Ei))}),It}resolve(sn){this.resolved||(this.value=sn,this.resolved=!0,this.callbacks.forEach(It=>It(sn)),this.callbacks.length=0)}then(sn){this.resolved?sn(this.value):this.callbacks.push(sn)}}function Xe(on){const sn=function(It,Ot,zt){const un=3===xe(Ot),Pn=un?Hi=>()=>W.SKi.isInAngularZone()?Hi():ci.run(Hi):Hi=>Hi;let ci;const Ei=un&&fe(Ot)>1;return{restrict:"E",terminal:!0,require:[z,oe],controller:function(){},link:(Hi,mo,xo,vr)=>{const rn=vr[1],en=vr[0];let Zn,Di=!1;if(!en||Ei){const ui=on.downgradedModule||"",bi=`${Q}${ui}`,ao=`instantiating component '${ge(on.component)}'`;ze(Ot,ui,bi,ao);const Wi=Ot.get(bi);Zn=Wi.injector??Wi.promise}const Xo=(ui,bi)=>{const Wi=bi.get(W.OM3).resolveComponentFactory(on.component);if(!Wi)throw new Error(`Expecting ComponentFactory for: ${ge(on.component)}`);const Ko=new tt(mo),Zo=new Ke(mo,xo,Hi,rn,ui,It,zt,Wi,Pn),xr=Zo.compileContents(),hr=Zo.createComponentAndSetup(xr,un,on.propagateDigest);Ko.resolve(hr.injector),Di&&Hi.$evalAsync(()=>{})},Hn=un?(ui,bi)=>{ci||(ci=ui.get(W.SKi)),Pn(()=>Xo(ui,bi))()}:Xo;Fe.all([en||Zn,Zn||en]).then(([ui,bi])=>Hn(ui,bi)),Di=!0}}};return sn.$inject=[_,I,N],sn}class tt extends Fe{constructor(sn){super(),this.element=sn,this.injectorKey=le(Z),sn.data(this.injectorKey,this)}resolve(sn){this.element.data(this.injectorKey,sn),this.element=null,super.resolve(sn)}}function vt(on,sn=""){const It=function(Ot){const zt=`${Z}${sn}`,Pn=`instantiating injectable '${Te(on)?ge(on):String(on)}'`;ze(Ot,sn,zt,Pn);try{return Ot.get(zt).get(on)}catch(ci){throw new Error(`Error while ${Pn}: ${ci.message||ci}`)}};return It.$inject=[I],It}let Tn=null;const pt=[{provide:"$injector",useFactory:function wi(){if(!Tn)throw new Error("Trying to get the AngularJS injector before it being set.");const on=Tn;return Tn=null,on},deps:[]},{provide:"$rootScope",useFactory:function Bn(on){return on.get("$rootScope")},deps:["$injector"]},{provide:"$compile",useFactory:function gi(on){return on.get("$compile")},deps:["$injector"]},{provide:"$parse",useFactory:function Ai(on){return on.get("$parse")},deps:["$injector"]}];class Dt{constructor(sn){this.modInjector=sn}get(sn,It){return It===W.UR7?It:this.modInjector.get(sn,It)}}let Gt=(()=>{class on{constructor(It,Ot,zt){this.ngZone=Ot,this.platformRef=zt,this.injector=new Dt(It)}bootstrap(It,Ot=[],zt){const un=ae+".init";c(un,[]).constant(pe,2).value(Z,this.injector).factory(Q,[Z,Hi=>({injector:Hi})]).config(["$provide",I,(Hi,mo)=>{mo.has(ie)&&Hi.decorator(ie,[w,xo=>{const vr=xo.whenStable,rn=this.injector,en=function(Zn){vr.call(xo,function(){const Di=rn.get(W.NYb);Di.isStable()?Zn():Di.whenStable(en.bind(xo,Zn))})};return xo.whenStable=en,xo}]),mo.has(L)&&Hi.decorator(L,[w,xo=>{let vr=(rn,en,Zn,Di,...po)=>this.ngZone.runOutsideAngular(()=>xo((...nr)=>{setTimeout(()=>{this.ngZone.run(()=>rn(...nr))})},en,Zn,Di,...po));return Object.keys(xo).forEach(rn=>vr[rn]=xo[rn]),xo.hasOwnProperty("flush")&&(vr.flush=()=>(xo.flush(),vr)),vr}])}]).run([I,Hi=>{this.$injector=Hi;const mo=Hi.get("$rootScope");(function Jn(on){Tn=on})(Hi),this.injector.get(I),s(It).data(le(Z),this.injector),this.platformRef.onDestroy(()=>function Ce(on){const sn=on.get("$rootElement");on.get("$rootScope").$destroy(),ve(sn[0])}(Hi)),setTimeout(()=>{const xo=this.ngZone.onMicrotaskEmpty.subscribe(()=>mo.$$phase?mo.$evalAsync():mo.$digest());mo.$on("$destroy",()=>{xo.unsubscribe()})},0)}]);const Pn=c(ae,[un].concat(Ot)),ci=window.angular;ci.resumeBootstrap=void 0;const Ei=this.ngZone.run(()=>((on,sn,It)=>b.bootstrap(on,sn,It))(It,[Pn.name],zt));if(ci.resumeBootstrap){const Hi=ci.resumeBootstrap,mo=this.ngZone;ci.resumeBootstrap=function(){let xo=arguments;return ci.resumeBootstrap=Hi,mo.run(()=>ci.resumeBootstrap.apply(this,xo))}}return Ei}static{this.\u0275fac=function(Ot){return new(Ot||on)(W.KVO(W.zZn),W.KVO(W.SKi),W.KVO(W.Tg_))}}static{this.\u0275mod=W.$C({type:on})}static{this.\u0275inj=W.G2t({providers:[pt]})}}return on})()},3349:(In,Ze,M)=>{"use strict";M.d(Ze,{$M:()=>he,PF:()=>Y,eC:()=>C,fH:()=>J,ic:()=>q,jS:()=>_,l9:()=>U,p_:()=>ae,t$:()=>k,xZ:()=>I,ym:()=>K,zF:()=>u});var W=M(7788),o=M(6610),P=M(6054),b=M(1216),f=M(3686),S=M(4859),T=M(5704),y=M(5690),d=M(2720),c=M(4072);M(1113),M(6021);class u{host;setHost(be){this.host=be}setTemplate(be){this.host.setTemplate(be)}}class h{instance;zone;subscriptions={};events={};constructor(be,ve){this.instance=be,this.zone=ve}hasEvent(be){return 0!==this.getEmitter(be).observers.length}fireEvent(be,ve){const le=this.getEmitter(be);le.observers.length&&((this.subscriptions[be]||[]).length===le.observers.length?le.next(ve&&ve[0]):this.zone.run(()=>le.next(ve&&ve[0])))}on(be,ve){if("string"==typeof be){const le=this.subscriptions[be]||[],Ce=this.getEmitter(be).subscribe(ve?.bind(this.instance)),ye=Ce.unsubscribe.bind(Ce);le.push({handler:ve,unsubscribe:ye}),this.subscriptions[be]=le}else{const le=be;Object.keys(le).forEach(Ce=>this.on(Ce,le[Ce]))}}off(be,ve){const le=this.subscriptions[be]||[];ve?le.some((Ce,ye)=>Ce.handler===ve&&(Ce.unsubscribe(),le.splice(ye,1),!0)):(le.forEach(Ce=>{Ce.unsubscribe()}),le.splice(0,le.length))}dispose(){}addEmitter(be,ve){this.events[be]=ve}getEmitter(be){return this.events[be]||(this.events[be]=new W.bkB),this.events[be]}}class g{zone;component;lockedValueChangeEvent=!1;constructor(be,ve){this.zone=be,this.component=ve}fireNgEvent(be,ve){if(this.lockedValueChangeEvent&&"valueChange"===be)return;const le=this.component[be];le&&le.observers.length&&this.zone.run(()=>{le.next(ve&&ve[0])})}createEmitters(be){be.forEach(ve=>{this.component[ve.emit]=new W.bkB})}}let _=(()=>{class ue{_watchers=[];getWatchMethod(){return(le,Ce,ye)=>{let ge=le();(ye=ye||{}).skipImmediate||Ce(ge);const fe=()=>{const xe=le();this._isDifferentValues(ge,xe,ye.deep)&&(Ce(xe),ge=xe)};return this._watchers.push(fe),()=>{const xe=this._watchers.indexOf(fe);-1!==xe&&this._watchers.splice(xe,1)}}}_isDifferentValues(ve,le,Ce){const ye=this._toComparable(le),ge=this._toComparable(ve);return Ce&&ye instanceof Object&&ge instanceof Object?this._checkObjectsFields(le,ve):ye!==ge}_toComparable(ve){return ve instanceof Date?ve.getTime():ve}_checkObjectsFields(ve,le){for(const Ce in ve){const ye=this._toComparable(ve[Ce]),ge=this._toComparable(le[Ce]);let fe=!1;if("object"==typeof ye&&"object"==typeof ge&&(fe=(0,S.RL)(ye,ge)),ye!==ge&&!fe)return!0}}checkWatchers(){for(const ve of this._watchers)ve()}static \u0275fac=function(le){return new(le||ue)};static \u0275prov=W.jDH({token:ue,factory:ue.\u0275fac})}return ue})();function x(ue){return ue.get?ue.get(0):ue}const w="dx-template-wrapper";let C=(()=>{class ue{templateRef;viewContainerRef;renderer;zone;set dxTemplateOf(ve){this.name=ve}name;constructor(ve,le,Ce,ye,ge){this.templateRef=ve,this.viewContainerRef=le,this.renderer=ye,this.zone=ge,Ce.setTemplate(this)}renderTemplate(ve){const le=this.viewContainerRef.createEmbeddedView(this.templateRef,{$implicit:ve.model,index:ve.index}),Ce=x(ve.container);return ve.container&&le.rootNodes.forEach(ye=>{this.renderer.appendChild(Ce,ye)}),le}render(ve){let le;return le=this.zone.isStable?this.zone.run(()=>this.renderTemplate(ve)):this.renderTemplate(ve),le.detectChanges(),le.rootNodes.forEach(Ce=>{1===Ce.nodeType&&P.A.setClass(Ce,w,!0),(0,b.xH)(Ce,"dxremove",({},ye)=>{(!ye||!ye._angularIntegration)&&le.destroy()})}),le.rootNodes}static \u0275fac=function(le){return new(le||ue)(W.rXU(W.C4Q),W.rXU(W.c1b),W.rXU(u),W.rXU(W.sFG),W.rXU(W.SKi))};static \u0275dir=W.FsC({type:ue,selectors:[["","dxTemplate",""]],inputs:{dxTemplateOf:"dxTemplateOf"}})}return ue})(),I=(()=>{class ue{static \u0275fac=function(le){return new(le||ue)};static \u0275mod=W.$C({type:ue});static \u0275inj=W.G2t({})}return ue})();const L="dx-visibility-change-handler";let N=(()=>{class ue{_host;_hostOptionPath;_collectionContainerImpl;_initialOptions={};constructor(){this._collectionContainerImpl=new G(this._setOption.bind(this),this._filterItems.bind(this))}_optionChangedHandler(ve){const le=this._fullOptionPath();if(0===ve.fullName.indexOf(le)){const ye=this[`${ve.fullName.slice(le.length)}Change`];ye&&ye.next(ve.value)}}_createEventEmitters(ve){ve.forEach(le=>{this[le.emit]=new W.bkB})}_getOption(ve){return this.isLinked?this.instance.option(this._fullOptionPath()+ve):this._initialOptions[ve]}_setOption(ve,le){if(this.isLinked){const Ce=this._fullOptionPath()+ve;this.instance.option(Ce,le)}else this._initialOptions[ve]=le}_addRemovedOption(ve){this.instance&&this.removedNestedComponents&&this.removedNestedComponents.push(ve)}_deleteRemovedOptions(ve){this.instance&&this.removedNestedComponents&&(this.removedNestedComponents=this.removedNestedComponents.filter(le=>!le.startsWith(ve)))}_addRecreatedComponent(){this.instance&&this.recreatedNestedComponents&&this.recreatedNestedComponents.push({getOptionPath:()=>this._getOptionPath()})}_getOptionPath(){return this._hostOptionPath()+this._optionPath}setHost(ve,le){this._host=ve,this._hostOptionPath=le,this.optionChangedHandlers.subscribe(this._optionChangedHandler.bind(this))}setChildren(ve,le){return this.resetOptions(ve),this._collectionContainerImpl.setChildren(ve,le)}_filterItems(ve){return ve.filter(le=>le!==this)}get instance(){return this._host&&this._host.instance}get resetOptions(){return this._host&&this._host.resetOptions}get isRecreated(){return this._host&&this._host.isRecreated}get removedNestedComponents(){return this._host&&this._host.removedNestedComponents}set removedNestedComponents(ve){this._host.removedNestedComponents=ve}get recreatedNestedComponents(){return this._host&&this._host.recreatedNestedComponents}set recreatedNestedComponents(ve){this._host.recreatedNestedComponents=ve}get isLinked(){return!!this.instance&&this._host.isLinked}get optionChangedHandlers(){return this._host&&this._host.optionChangedHandlers}static \u0275fac=function(le){return new(le||ue)};static \u0275cmp=W.VBU({type:ue,selectors:[["ng-component"]],decls:0,vars:0,template:function(le,Ce){},encapsulation:2})}return ue})();class G{_setOption;_filterItems;_activatedQueries={};constructor(be,ve){this._setOption=be,this._filterItems=ve}setChildren(be,ve){if(this._filterItems&&(ve=this._filterItems(ve)),ve.length&&(this._activatedQueries[be]=!0),this._activatedQueries[be]){const le=ve.map((Ce,ye)=>(Ce._index=ye,Ce._value));this._setOption(be,le)}}}let k=(()=>{class ue extends N{setHost(ve,le){super.setHost(ve,le),this._host[this._optionPath]=this._initialOptions}_fullOptionPath(){return`${this._getOptionPath()}.`}static \u0275fac=(()=>{let ve;return function(Ce){return(ve||(ve=W.xGo(ue)))(Ce||ue)}})();static \u0275cmp=W.VBU({type:ue,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(le,Ce){},encapsulation:2})}return ue})(),U=(()=>{class ue extends N{_index;_fullOptionPath(){return`${this._getOptionPath()}[${this._index}].`}get _value(){return this._initialOptions}get isLinked(){return void 0!==this._index&&!!this.instance&&this._host.isLinked}static \u0275fac=(()=>{let ve;return function(Ce){return(ve||(ve=W.xGo(ue)))(Ce||ue)}})();static \u0275cmp=W.VBU({type:ue,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(le,Ce){},encapsulation:2})}return ue})();const B=function(ue){const be=[];(0,T.A)(ue).hasClass(L)||be.push(ue),be.push.apply(be,ue.querySelectorAll(`.${L}`));for(let ve=0;ve<be.length;ve++)(0,b.tY)(be[ve],"dxshown")};function K(ue,be,ve,le){void 0===!ue.template||!be.nativeElement.hasChildNodes()||![].slice.call(be.nativeElement.childNodes).filter(ge=>{if(ge.tagName){const fe=ge.tagName.toLowerCase().substr(0,3);return!("dxi"===fe||"dxo"===fe)}return"#comment"!==ge.nodeName&&ge.textContent.replace(/\s/g,"").length}).length||(ue.template={render:ge=>{const fe=be.nativeElement;if(P.A.setClass(fe,w,!0),ge.container){const xe=x(ge.container),Te=xe.contains(be.nativeElement);ve.appendChild(xe,be.nativeElement),Te||le.body.contains(xe)&&B(fe)}return fe}})}class J{_host;_optionPath;getHost(){return this._host}setHost(be,ve){this._host=be,this._optionPath=ve||(()=>"")}setNestedOption(be){be.setHost(this._host,this._optionPath)}}let ie;(0,f.A)({buyNowLink:"https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeAngular.aspx"});const re=()=>(ie||(ie=(0,W.zw6)("DX_isPlatformServer")),ie);let q=(()=>{class ue{element;ngZone;watcherHelper;transferState;platformId;_initialOptions={};_optionsToUpdate={};_collectionContainerImpl;eventHelper;optionChangedHandlers=new W.bkB;templates;instance;isLinked=!0;changedOptions={};removedNestedComponents=[];recreatedNestedComponents;widgetUpdateLocked=!1;templateUpdateRequired=!1;_updateTemplates(){if(this.templates.length&&this.templateUpdateRequired){const ve={};this.templates.forEach(le=>{ve[le.name]=le}),this.instance.option("integrationOptions.templates",ve),this.templates=Object.values(ve),this.templateUpdateRequired=!1}}_initEvents(){this.instance.on("optionChanged",ve=>{this.changedOptions[ve.name]=ve.value;const le=ve.name===ve.fullName?ve.value:ve.component.option(ve.name);this.eventHelper.fireNgEvent(`${ve.name}Change`,[le]),this.optionChangedHandlers.emit(ve)})}_initOptions(){this._initialOptions.integrationOptions.watchMethod=this.watcherHelper.getWatchMethod()}_initPlatform(){this.transferState.hasKey(re())?this._initialOptions.integrationOptions.renderedOnServer=this.transferState.get(re(),null):(0,o.Vy)(this.platformId)&&this.transferState.set(re(),!0)}_createEventEmitters(ve){const le=this.ngZone;this.eventHelper.createEmitters(ve),this._initialOptions.eventsStrategy=Ce=>{const ye=new h(Ce,le);return ve.filter(ge=>ge.subscribe).forEach(ge=>{ye.addEmitter(ge.subscribe,this[ge.emit])}),ye},this._initialOptions.nestedComponentOptions=function(Ce){return{eventsStrategy:ye=>new h(ye,le),nestedComponentOptions:Ce.option("nestedComponentOptions")}}}_shouldOptionChange(ve,le){if(this.changedOptions.hasOwnProperty(ve)){const Ce=this.changedOptions[ve];return delete this.changedOptions[ve],le!==Ce}return!0}clearChangedOptions(){this.changedOptions={}}_getOption(ve){return this.instance?this.instance.option(ve):this._initialOptions[ve]}lockWidgetUpdate(){!this.widgetUpdateLocked&&this.instance&&(this.instance.beginUpdate(),this.widgetUpdateLocked=!0)}unlockWidgetUpdate(){this.widgetUpdateLocked&&(this.widgetUpdateLocked=!1,this.instance.endUpdate())}_setOption(ve,le){this.lockWidgetUpdate(),this._shouldOptionChange(ve,le)&&(this.instance?this.instance.option(ve,le):this._initialOptions[ve]=le)}_createWidget(ve){this._initialOptions.integrationOptions={},this._initPlatform(),this._initOptions(),this._initialOptions.onInitializing=function(){this.beginUpdate()},this.instance=this._createInstance(ve,this._initialOptions),this._initEvents(),this._initialOptions={}}_destroyWidget(){if(this.removedNestedComponents=[],this.instance){const ve=this.instance.element();(0,b.tY)(ve,"dxremove",{_angularIntegration:!0}),this.instance.dispose(),P.A.removeElement(ve)}}constructor(ve,le,Ce,ye,ge,fe){this.element=ve,this.ngZone=le,this.watcherHelper=ye,this.transferState=ge,this.platformId=fe,this.templates=[],Ce.setHost(this),this._collectionContainerImpl=new G(this._setOption.bind(this)),this.eventHelper=new g(le,this)}ngOnChanges(ve){for(const le in ve)ve[le].currentValue!==this[le]&&(this._optionsToUpdate[le]=ve[le].currentValue)}ngOnInit(){this._createWidget(this.element.nativeElement)}ngDoCheck(){this.applyOptions()}ngAfterContentChecked(){this.applyOptions(),this.resetOptions(),this.unlockWidgetUpdate()}ngAfterViewInit(){this._updateTemplates(),this.instance.endUpdate(),this.recreatedNestedComponents=[]}ngAfterViewChecked(){this._updateTemplates()}applyOptions(){Object.keys(this._optionsToUpdate).length&&(this.instance&&this.instance.option(this._optionsToUpdate),this._optionsToUpdate={})}resetOptions(ve){this.instance&&(this.removedNestedComponents.filter(le=>!(le&&!this.isRecreated(le)&&ve)||le.startsWith(ve)).forEach(le=>{this.instance.resetOption(le)}),this.removedNestedComponents=[],this.recreatedNestedComponents=[])}isRecreated(ve){return this.recreatedNestedComponents&&this.recreatedNestedComponents.some(le=>le.getOptionPath()===ve)}setTemplate(ve){this.templates.push(ve),this.templateUpdateRequired=!0}setChildren(ve,le){return this.resetOptions(ve),this._collectionContainerImpl.setChildren(ve,le)}static \u0275fac=function(le){return new(le||ue)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(u),W.rXU(_),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:ue,selectors:[["ng-component"]],features:[W.OA$],decls:0,vars:0,template:function(le,Ce){},encapsulation:2})}return ue})(),Y=(()=>{class ue extends q{createInstance(ve){this._createWidget(ve)}ngOnInit(){}ngAfterViewInit(){this._createWidget(this.element.nativeElement),this.instance.endUpdate()}static \u0275fac=(()=>{let ve;return function(Ce){return(ve||(ve=W.xGo(ue)))(Ce||ue)}})();static \u0275cmp=W.VBU({type:ue,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(le,Ce){},encapsulation:2})}return ue})();const Z=["mousemove","mouseover","mouseout"],Q=["mouseup","click","mousedown","transitionend","wheel"];let te,pe=[],z=function(ue){te||(te=this.callBase.bind(this)),pe.push(ue)};d.A.inject({add(ue){return z.call(this,ue)}});let oe=(ue,be,ve)=>{Number(W.xvI.major)<12&&console.warn("Your version of Angular is not supported. Please update your project to version 12 or later. Please refer to the Angular Update Guide for more information: https://update.angular.io"),P.A.inject({_document:ue,listen(...Ce){const ye=Ce[1];return Z.includes(ye)?be.runOutsideAngular(()=>this.callBase.apply(this,Ce)):be.isStable&&Q.includes(ye)?be.run(()=>this.callBase.apply(this,Ce)):this.callBase.apply(this,Ce)},isElementNode:Ce=>Ce&&1===Ce.nodeType,isTextNode:Ce=>Ce&&3===Ce.nodeType,isDocument:Ce=>Ce&&9===Ce.nodeType}),y.A.inject({getXhr(){if(!ve)return this.callBase.apply(this);const Ce=ve.build();return"withCredentials"in Ce||(Ce.withCredentials=!1),Ce}});const le=()=>{be.run(()=>{c.A.set({}),pe.forEach(Ce=>te.call(null,Ce)),pe=[],d.A.fire()})};le(),z=Ce=>be.run(()=>Ce()),oe=le},ae=(()=>{class ue{constructor(ve,le,Ce){oe(ve,le,Ce)}static \u0275fac=function(le){return new(le||ue)(W.KVO(o.qQ),W.KVO(W.SKi),W.KVO(o.N0,8))};static \u0275mod=W.$C({type:ue});static \u0275inj=W.G2t({})}return ue})(),he=(()=>{class ue{_differs;_host;_propertyDiffers={};constructor(ve){this._differs=ve}setHost(ve){this._host=ve}setup(ve,le){ve in le&&this.setupSingle(ve,le[ve].currentValue)}setupSingle(ve,le){if(le&&Array.isArray(le)){if(!this._propertyDiffers[ve])try{return this._propertyDiffers[ve]=this._differs.find(le).create(null),!0}catch{}}else delete this._propertyDiffers[ve];return!1}getChanges(ve,le){if(this._propertyDiffers[ve])return this._propertyDiffers[ve].diff(le)}checkChangedOptions(ve,le){return this._host.changedOptions[ve]===le}doCheck(ve){if(this._propertyDiffers[ve]&&this._host.instance){const le=this._host[ve];(function ee(ue){return ue&&"function"==typeof ue[Symbol.iterator]})(le)&&this.getChanges(ve,le)&&!this.checkChangedOptions(ve,le)&&(this._host.lockWidgetUpdate(),this._host.instance.option(ve,le))}}static \u0275fac=function(le){return new(le||ue)(W.KVO(W._q3))};static \u0275prov=W.jDH({token:ue,factory:ue.\u0275fac})}return ue})()},9055:(In,Ze,M)=>{"use strict";M.d(Ze,{Q:()=>S,h:()=>f});var W=M(7788),o=M(6362),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get cancelText(){return this._getOption("cancelText")}set cancelText(d){this._setOption("cancelText",d)}get dataSource(){return this._getOption("dataSource")}set dataSource(d){this._setOption("dataSource",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(d){this._setOption("itemHoldTimeout",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(d){this._setOption("itemTemplate",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get showCancelButton(){return this._getOption("showCancelButton")}set showCancelButton(d){this._setOption("showCancelButton",d)}get showTitle(){return this._getOption("showTitle")}set showTitle(d){this._setOption("showTitle",d)}get target(){return this._getOption("target")}set target(d){this._setOption("target",d)}get title(){return this._getOption("title")}set title(d){this._setOption("title",d)}get usePopover(){return this._getOption("usePopover")}set usePopover(d){this._setOption("usePopover",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onCancelClick;onContentReady;onDisposing;onInitialized;onItemClick;onItemContextMenu;onItemHold;onItemRendered;onOptionChanged;cancelTextChange;dataSourceChange;disabledChange;elementAttrChange;heightChange;hintChange;hoverStateEnabledChange;itemHoldTimeoutChange;itemsChange;itemTemplateChange;rtlEnabledChange;showCancelButtonChange;showTitleChange;targetChange;titleChange;usePopoverChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"cancelClick",emit:"onCancelClick"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"optionChanged",emit:"onOptionChanged"},{emit:"cancelTextChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"rtlEnabledChange"},{emit:"showCancelButtonChange"},{emit:"showTitleChange"},{emit:"targetChange"},{emit:"titleChange"},{emit:"usePopoverChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("dataSource",d),this.setupChanges("items",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-action-sheet"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{cancelText:"cancelText",dataSource:"dataSource",disabled:"disabled",elementAttr:"elementAttr",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",itemHoldTimeout:"itemHoldTimeout",items:"items",itemTemplate:"itemTemplate",rtlEnabled:"rtlEnabled",showCancelButton:"showCancelButton",showTitle:"showTitle",target:"target",title:"title",usePopover:"usePopover",visible:"visible",width:"width"},outputs:{onCancelClick:"onCancelClick",onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onOptionChanged:"onOptionChanged",cancelTextChange:"cancelTextChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",rtlEnabledChange:"rtlEnabledChange",showCancelButtonChange:"showCancelButtonChange",showTitleChange:"showTitleChange",targetChange:"targetChange",titleChange:"titleChange",usePopoverChange:"usePopoverChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.POb,P.p_,P.xZ,b.POb,P.xZ]})}return T})()},4925:(In,Ze,M)=>{"use strict";M.d(Ze,{D:()=>f,i:()=>S});var W=M(7788),o=M(4308),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get buttonTemplate(){return this._getOption("buttonTemplate")}set buttonTemplate(d){this._setOption("buttonTemplate",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(d){this._setOption("keyExpr",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get selectedItemKeys(){return this._getOption("selectedItemKeys")}set selectedItemKeys(d){this._setOption("selectedItemKeys",d)}get selectedItems(){return this._getOption("selectedItems")}set selectedItems(d){this._setOption("selectedItems",d)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(d){this._setOption("selectionMode",d)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(d){this._setOption("stylingMode",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onContentReady;onDisposing;onInitialized;onItemClick;onOptionChanged;onSelectionChanged;accessKeyChange;activeStateEnabledChange;buttonTemplateChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;itemsChange;keyExprChange;rtlEnabledChange;selectedItemKeysChange;selectedItemsChange;selectionModeChange;stylingModeChange;tabIndexChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonTemplateChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemsChange"},{emit:"keyExprChange"},{emit:"rtlEnabledChange"},{emit:"selectedItemKeysChange"},{emit:"selectedItemsChange"},{emit:"selectionModeChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("items",d),this.setupChanges("selectedItemKeys",d),this.setupChanges("selectedItems",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("items"),this._idh.doCheck("selectedItemKeys"),this._idh.doCheck("selectedItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-button-group"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttonTemplate:"buttonTemplate",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",items:"items",keyExpr:"keyExpr",rtlEnabled:"rtlEnabled",selectedItemKeys:"selectedItemKeys",selectedItems:"selectedItems",selectionMode:"selectionMode",stylingMode:"stylingMode",tabIndex:"tabIndex",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonTemplateChange:"buttonTemplateChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",itemsChange:"itemsChange",keyExprChange:"keyExprChange",rtlEnabledChange:"rtlEnabledChange",selectedItemKeysChange:"selectedItemKeysChange",selectedItemsChange:"selectedItemsChange",selectionModeChange:"selectionModeChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.POb,P.p_,P.xZ,b.POb,P.xZ]})}return T})()},4539:(In,Ze,M)=>{"use strict";M.d(Ze,{L:()=>S,e:()=>f});var W=M(7788),o=M(9012),P=M(3349);const b=["*"];let f=(()=>{class T extends P.ic{instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get icon(){return this._getOption("icon")}set icon(d){this._setOption("icon",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(d){this._setOption("stylingMode",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get template(){return this._getOption("template")}set template(d){this._setOption("template",d)}get text(){return this._getOption("text")}set text(d){this._setOption("text",d)}get type(){return this._getOption("type")}set type(d){this._setOption("type",d)}get useSubmitBehavior(){return this._getOption("useSubmitBehavior")}set useSubmitBehavior(d){this._setOption("useSubmitBehavior",d)}get validationGroup(){return this._getOption("validationGroup")}set validationGroup(d){this._setOption("validationGroup",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onClick;onContentReady;onDisposing;onInitialized;onOptionChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;iconChange;rtlEnabledChange;stylingModeChange;tabIndexChange;templateChange;textChange;typeChange;useSubmitBehaviorChange;validationGroupChange;visibleChange;widthChange;constructor(d,c,s,a,u,h,g){super(d,c,s,a,h,g),this._createEventEmitters([{subscribe:"click",emit:"onClick"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"iconChange"},{emit:"rtlEnabledChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"templateChange"},{emit:"textChange"},{emit:"typeChange"},{emit:"useSubmitBehaviorChange"},{emit:"validationGroupChange"},{emit:"visibleChange"},{emit:"widthChange"}]),u.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-button"]],inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",icon:"icon",rtlEnabled:"rtlEnabled",stylingMode:"stylingMode",tabIndex:"tabIndex",template:"template",text:"text",type:"type",useSubmitBehavior:"useSubmitBehavior",validationGroup:"validationGroup",visible:"visible",width:"width"},outputs:{onClick:"onClick",onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",iconChange:"iconChange",rtlEnabledChange:"rtlEnabledChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",templateChange:"templateChange",textChange:"textChange",typeChange:"typeChange",useSubmitBehaviorChange:"useSubmitBehaviorChange",validationGroupChange:"validationGroupChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH]),W.Vt3],ngContentSelectors:b,decls:1,vars:0,template:function(c,s){1&c&&(W.NAR(),W.SdG(0))},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[P.p_,P.xZ,P.xZ]})}return T})()},6553:(In,Ze,M)=>{"use strict";M.d(Ze,{A:()=>T,F:()=>S});var W=M(7788),o=M(3480),P=M(1491),b=M(3349);const f={provide:P.kq,useExisting:(0,W.Rfq)(()=>S),multi:!0};let S=(()=>{class y extends b.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(c){this._setOption("accessKey",c)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(c){this._setOption("activeStateEnabled",c)}get disabled(){return this._getOption("disabled")}set disabled(c){this._setOption("disabled",c)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(c){this._setOption("elementAttr",c)}get enableThreeStateBehavior(){return this._getOption("enableThreeStateBehavior")}set enableThreeStateBehavior(c){this._setOption("enableThreeStateBehavior",c)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(c){this._setOption("focusStateEnabled",c)}get height(){return this._getOption("height")}set height(c){this._setOption("height",c)}get hint(){return this._getOption("hint")}set hint(c){this._setOption("hint",c)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(c){this._setOption("hoverStateEnabled",c)}get iconSize(){return this._getOption("iconSize")}set iconSize(c){this._setOption("iconSize",c)}get isDirty(){return this._getOption("isDirty")}set isDirty(c){this._setOption("isDirty",c)}get isValid(){return this._getOption("isValid")}set isValid(c){this._setOption("isValid",c)}get name(){return this._getOption("name")}set name(c){this._setOption("name",c)}get readOnly(){return this._getOption("readOnly")}set readOnly(c){this._setOption("readOnly",c)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(c){this._setOption("rtlEnabled",c)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(c){this._setOption("tabIndex",c)}get text(){return this._getOption("text")}set text(c){this._setOption("text",c)}get validationError(){return this._getOption("validationError")}set validationError(c){this._setOption("validationError",c)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(c){this._setOption("validationErrors",c)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(c){this._setOption("validationMessageMode",c)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(c){this._setOption("validationMessagePosition",c)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(c){this._setOption("validationStatus",c)}get value(){return this._getOption("value")}set value(c){this._setOption("value",c)}get visible(){return this._getOption("visible")}set visible(c){this._setOption("visible",c)}get width(){return this._getOption("width")}set width(c){this._setOption("width",c)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;enableThreeStateBehaviorChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;iconSizeChange;isDirtyChange;isValidChange;nameChange;readOnlyChange;rtlEnabledChange;tabIndexChange;textChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(c){}touched=c=>{};constructor(c,s,a,u,h,g,_,x){super(c,s,a,u,_,x),this._watcherHelper=u,this._idh=h,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"enableThreeStateBehaviorChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"iconSizeChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),g.setHost(this)}_createInstance(c,s){return new o.A(c,s)}writeValue(c){this.eventHelper.lockedValueChangeEvent=!0,this.value=c,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(c){this.disabled=c}registerOnChange(c){this.change=c}registerOnTouched(c){this.touched=c}_createWidget(c){super._createWidget(c),this.instance.on("focusOut",s=>{this.eventHelper.fireNgEvent("onBlur",[s])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(c){super.ngOnChanges(c),this.setupChanges("validationErrors",c)}setupChanges(c,s){c in this._optionsToUpdate||this._idh.setup(c,s)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(c,s){let a=this._idh.setupSingle(c,s),u=null!==this._idh.getChanges(c,s);(a||u)&&super._setOption(c,s)}static \u0275fac=function(s){return new(s||y)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:y,selectors:[["dx-check-box"]],hostBindings:function(s,a){1&s&&W.bIt("valueChange",function(h){return a.change(h)})("onBlur",function(h){return a.touched(h)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",enableThreeStateBehavior:"enableThreeStateBehavior",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",iconSize:"iconSize",isDirty:"isDirty",isValid:"isValid",name:"name",readOnly:"readOnly",rtlEnabled:"rtlEnabled",tabIndex:"tabIndex",text:"text",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",enableThreeStateBehaviorChange:"enableThreeStateBehaviorChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",iconSizeChange:"iconSizeChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",nameChange:"nameChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",tabIndexChange:"tabIndexChange",textChange:"textChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,f,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(s,a){},encapsulation:2})}return y})(),T=(()=>{class y{static \u0275fac=function(s){return new(s||y)};static \u0275mod=W.$C({type:y});static \u0275inj=W.G2t({imports:[b.p_,b.xZ,b.xZ]})}return y})()},444:(In,Ze,M)=>{"use strict";M.d(Ze,{x:()=>y});var W=M(7788),o=M(2148),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(s){this._setOption("acceptCustomValue",s)}get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get applyButtonText(){return this._getOption("applyButtonText")}set applyButtonText(s){this._setOption("applyButtonText",s)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(s){this._setOption("applyValueMode",s)}get buttons(){return this._getOption("buttons")}set buttons(s){this._setOption("buttons",s)}get cancelButtonText(){return this._getOption("cancelButtonText")}set cancelButtonText(s){this._setOption("cancelButtonText",s)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(s){this._setOption("deferRendering",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(s){this._setOption("dropDownButtonTemplate",s)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(s){this._setOption("dropDownOptions",s)}get editAlphaChannel(){return this._getOption("editAlphaChannel")}set editAlphaChannel(s){this._setOption("editAlphaChannel",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get fieldTemplate(){return this._getOption("fieldTemplate")}set fieldTemplate(s){this._setOption("fieldTemplate",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(s){this._setOption("inputAttr",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get keyStep(){return this._getOption("keyStep")}set keyStep(s){this._setOption("keyStep",s)}get label(){return this._getOption("label")}set label(s){this._setOption("label",s)}get labelMode(){return this._getOption("labelMode")}set labelMode(s){this._setOption("labelMode",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get opened(){return this._getOption("opened")}set opened(s){this._setOption("opened",s)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(s){this._setOption("openOnFieldClick",s)}get placeholder(){return this._getOption("placeholder")}set placeholder(s){this._setOption("placeholder",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(s){this._setOption("showClearButton",s)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(s){this._setOption("showDropDownButton",s)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(s){this._setOption("stylingMode",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get text(){return this._getOption("text")}set text(s){this._setOption("text",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}onChange;onClosed;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;applyButtonTextChange;applyValueModeChange;buttonsChange;cancelButtonTextChange;deferRenderingChange;disabledChange;dropDownButtonTemplateChange;dropDownOptionsChange;editAlphaChannelChange;elementAttrChange;fieldTemplateChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;keyStepChange;labelChange;labelModeChange;nameChange;openedChange;openOnFieldClickChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showDropDownButtonChange;stylingModeChange;tabIndexChange;textChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(s){}touched=s=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(s){this.setChildren("buttons",s)}constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"applyButtonTextChange"},{emit:"applyValueModeChange"},{emit:"buttonsChange"},{emit:"cancelButtonTextChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"editAlphaChannelChange"},{emit:"elementAttrChange"},{emit:"fieldTemplateChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"keyStepChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"nameChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("buttons",s),this.setupChanges("validationErrors",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-color-box"]],contentQueries:function(a,u,h){if(1&a&&W.wni(h,f.BrI,4),2&a){let g;W.mGM(g=W.lsd())&&(u.buttonsChildren=g)}},hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",applyButtonText:"applyButtonText",applyValueMode:"applyValueMode",buttons:"buttons",cancelButtonText:"cancelButtonText",deferRendering:"deferRendering",disabled:"disabled",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",editAlphaChannel:"editAlphaChannel",elementAttr:"elementAttr",fieldTemplate:"fieldTemplate",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",keyStep:"keyStep",label:"label",labelMode:"labelMode",name:"name",opened:"opened",openOnFieldClick:"openOnFieldClick",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",applyButtonTextChange:"applyButtonTextChange",applyValueModeChange:"applyValueModeChange",buttonsChange:"buttonsChange",cancelButtonTextChange:"cancelButtonTextChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",editAlphaChannelChange:"editAlphaChannelChange",elementAttrChange:"elementAttrChange",fieldTemplateChange:"fieldTemplateChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",keyStepChange:"keyStepChange",labelChange:"labelChange",labelModeChange:"labelModeChange",nameChange:"nameChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.GIV,f.u4t,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,b.p_,b.xZ,f.GIV,f.u4t,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,b.xZ]})}return d})()},8844:(In,Ze,M)=>{"use strict";M.d(Ze,{N:()=>S,s:()=>f});var W=M(7788),o=M(1175),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get allowColumnReordering(){return this._getOption("allowColumnReordering")}set allowColumnReordering(d){this._setOption("allowColumnReordering",d)}get allowColumnResizing(){return this._getOption("allowColumnResizing")}set allowColumnResizing(d){this._setOption("allowColumnResizing",d)}get autoNavigateToFocusedRow(){return this._getOption("autoNavigateToFocusedRow")}set autoNavigateToFocusedRow(d){this._setOption("autoNavigateToFocusedRow",d)}get cacheEnabled(){return this._getOption("cacheEnabled")}set cacheEnabled(d){this._setOption("cacheEnabled",d)}get cellHintEnabled(){return this._getOption("cellHintEnabled")}set cellHintEnabled(d){this._setOption("cellHintEnabled",d)}get columnAutoWidth(){return this._getOption("columnAutoWidth")}set columnAutoWidth(d){this._setOption("columnAutoWidth",d)}get columnChooser(){return this._getOption("columnChooser")}set columnChooser(d){this._setOption("columnChooser",d)}get columnFixing(){return this._getOption("columnFixing")}set columnFixing(d){this._setOption("columnFixing",d)}get columnHidingEnabled(){return this._getOption("columnHidingEnabled")}set columnHidingEnabled(d){this._setOption("columnHidingEnabled",d)}get columnMinWidth(){return this._getOption("columnMinWidth")}set columnMinWidth(d){this._setOption("columnMinWidth",d)}get columnResizingMode(){return this._getOption("columnResizingMode")}set columnResizingMode(d){this._setOption("columnResizingMode",d)}get columns(){return this._getOption("columns")}set columns(d){this._setOption("columns",d)}get columnWidth(){return this._getOption("columnWidth")}set columnWidth(d){this._setOption("columnWidth",d)}get customizeColumns(){return this._getOption("customizeColumns")}set customizeColumns(d){this._setOption("customizeColumns",d)}get dataRowTemplate(){return this._getOption("dataRowTemplate")}set dataRowTemplate(d){this._setOption("dataRowTemplate",d)}get dataSource(){return this._getOption("dataSource")}set dataSource(d){this._setOption("dataSource",d)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(d){this._setOption("dateSerializationFormat",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get editing(){return this._getOption("editing")}set editing(d){this._setOption("editing",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get errorRowEnabled(){return this._getOption("errorRowEnabled")}set errorRowEnabled(d){this._setOption("errorRowEnabled",d)}get export(){return this._getOption("export")}set export(d){this._setOption("export",d)}get filterBuilder(){return this._getOption("filterBuilder")}set filterBuilder(d){this._setOption("filterBuilder",d)}get filterBuilderPopup(){return this._getOption("filterBuilderPopup")}set filterBuilderPopup(d){this._setOption("filterBuilderPopup",d)}get filterPanel(){return this._getOption("filterPanel")}set filterPanel(d){this._setOption("filterPanel",d)}get filterRow(){return this._getOption("filterRow")}set filterRow(d){this._setOption("filterRow",d)}get filterSyncEnabled(){return this._getOption("filterSyncEnabled")}set filterSyncEnabled(d){this._setOption("filterSyncEnabled",d)}get filterValue(){return this._getOption("filterValue")}set filterValue(d){this._setOption("filterValue",d)}get focusedColumnIndex(){return this._getOption("focusedColumnIndex")}set focusedColumnIndex(d){this._setOption("focusedColumnIndex",d)}get focusedRowEnabled(){return this._getOption("focusedRowEnabled")}set focusedRowEnabled(d){this._setOption("focusedRowEnabled",d)}get focusedRowIndex(){return this._getOption("focusedRowIndex")}set focusedRowIndex(d){this._setOption("focusedRowIndex",d)}get focusedRowKey(){return this._getOption("focusedRowKey")}set focusedRowKey(d){this._setOption("focusedRowKey",d)}get grouping(){return this._getOption("grouping")}set grouping(d){this._setOption("grouping",d)}get groupPanel(){return this._getOption("groupPanel")}set groupPanel(d){this._setOption("groupPanel",d)}get headerFilter(){return this._getOption("headerFilter")}set headerFilter(d){this._setOption("headerFilter",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get highlightChanges(){return this._getOption("highlightChanges")}set highlightChanges(d){this._setOption("highlightChanges",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get keyboardNavigation(){return this._getOption("keyboardNavigation")}set keyboardNavigation(d){this._setOption("keyboardNavigation",d)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(d){this._setOption("keyExpr",d)}get loadPanel(){return this._getOption("loadPanel")}set loadPanel(d){this._setOption("loadPanel",d)}get masterDetail(){return this._getOption("masterDetail")}set masterDetail(d){this._setOption("masterDetail",d)}get noDataText(){return this._getOption("noDataText")}set noDataText(d){this._setOption("noDataText",d)}get pager(){return this._getOption("pager")}set pager(d){this._setOption("pager",d)}get paging(){return this._getOption("paging")}set paging(d){this._setOption("paging",d)}get remoteOperations(){return this._getOption("remoteOperations")}set remoteOperations(d){this._setOption("remoteOperations",d)}get renderAsync(){return this._getOption("renderAsync")}set renderAsync(d){this._setOption("renderAsync",d)}get repaintChangesOnly(){return this._getOption("repaintChangesOnly")}set repaintChangesOnly(d){this._setOption("repaintChangesOnly",d)}get rowAlternationEnabled(){return this._getOption("rowAlternationEnabled")}set rowAlternationEnabled(d){this._setOption("rowAlternationEnabled",d)}get rowDragging(){return this._getOption("rowDragging")}set rowDragging(d){this._setOption("rowDragging",d)}get rowTemplate(){return this._getOption("rowTemplate")}set rowTemplate(d){this._setOption("rowTemplate",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get scrolling(){return this._getOption("scrolling")}set scrolling(d){this._setOption("scrolling",d)}get searchPanel(){return this._getOption("searchPanel")}set searchPanel(d){this._setOption("searchPanel",d)}get selectedRowKeys(){return this._getOption("selectedRowKeys")}set selectedRowKeys(d){this._setOption("selectedRowKeys",d)}get selection(){return this._getOption("selection")}set selection(d){this._setOption("selection",d)}get selectionFilter(){return this._getOption("selectionFilter")}set selectionFilter(d){this._setOption("selectionFilter",d)}get showBorders(){return this._getOption("showBorders")}set showBorders(d){this._setOption("showBorders",d)}get showColumnHeaders(){return this._getOption("showColumnHeaders")}set showColumnHeaders(d){this._setOption("showColumnHeaders",d)}get showColumnLines(){return this._getOption("showColumnLines")}set showColumnLines(d){this._setOption("showColumnLines",d)}get showRowLines(){return this._getOption("showRowLines")}set showRowLines(d){this._setOption("showRowLines",d)}get sortByGroupSummaryInfo(){return this._getOption("sortByGroupSummaryInfo")}set sortByGroupSummaryInfo(d){this._setOption("sortByGroupSummaryInfo",d)}get sorting(){return this._getOption("sorting")}set sorting(d){this._setOption("sorting",d)}get stateStoring(){return this._getOption("stateStoring")}set stateStoring(d){this._setOption("stateStoring",d)}get summary(){return this._getOption("summary")}set summary(d){this._setOption("summary",d)}get syncLookupFilterValues(){return this._getOption("syncLookupFilterValues")}set syncLookupFilterValues(d){this._setOption("syncLookupFilterValues",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get toolbar(){return this._getOption("toolbar")}set toolbar(d){this._setOption("toolbar",d)}get twoWayBindingEnabled(){return this._getOption("twoWayBindingEnabled")}set twoWayBindingEnabled(d){this._setOption("twoWayBindingEnabled",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}get wordWrapEnabled(){return this._getOption("wordWrapEnabled")}set wordWrapEnabled(d){this._setOption("wordWrapEnabled",d)}onAdaptiveDetailRowPreparing;onCellClick;onCellDblClick;onCellHoverChanged;onCellPrepared;onContentReady;onContextMenuPreparing;onDataErrorOccurred;onDisposing;onEditCanceled;onEditCanceling;onEditingStart;onEditorPrepared;onEditorPreparing;onExporting;onFocusedCellChanged;onFocusedCellChanging;onFocusedRowChanged;onFocusedRowChanging;onInitialized;onInitNewRow;onKeyDown;onOptionChanged;onRowClick;onRowCollapsed;onRowCollapsing;onRowDblClick;onRowExpanded;onRowExpanding;onRowInserted;onRowInserting;onRowPrepared;onRowRemoved;onRowRemoving;onRowUpdated;onRowUpdating;onRowValidating;onSaved;onSaving;onSelectionChanged;onToolbarPreparing;accessKeyChange;activeStateEnabledChange;allowColumnReorderingChange;allowColumnResizingChange;autoNavigateToFocusedRowChange;cacheEnabledChange;cellHintEnabledChange;columnAutoWidthChange;columnChooserChange;columnFixingChange;columnHidingEnabledChange;columnMinWidthChange;columnResizingModeChange;columnsChange;columnWidthChange;customizeColumnsChange;dataRowTemplateChange;dataSourceChange;dateSerializationFormatChange;disabledChange;editingChange;elementAttrChange;errorRowEnabledChange;exportChange;filterBuilderChange;filterBuilderPopupChange;filterPanelChange;filterRowChange;filterSyncEnabledChange;filterValueChange;focusedColumnIndexChange;focusedRowEnabledChange;focusedRowIndexChange;focusedRowKeyChange;groupingChange;groupPanelChange;headerFilterChange;heightChange;highlightChangesChange;hintChange;hoverStateEnabledChange;keyboardNavigationChange;keyExprChange;loadPanelChange;masterDetailChange;noDataTextChange;pagerChange;pagingChange;remoteOperationsChange;renderAsyncChange;repaintChangesOnlyChange;rowAlternationEnabledChange;rowDraggingChange;rowTemplateChange;rtlEnabledChange;scrollingChange;searchPanelChange;selectedRowKeysChange;selectionChange;selectionFilterChange;showBordersChange;showColumnHeadersChange;showColumnLinesChange;showRowLinesChange;sortByGroupSummaryInfoChange;sortingChange;stateStoringChange;summaryChange;syncLookupFilterValuesChange;tabIndexChange;toolbarChange;twoWayBindingEnabledChange;visibleChange;widthChange;wordWrapEnabledChange;get columnsChildren(){return this._getOption("columns")}set columnsChildren(d){this.setChildren("columns",d)}get sortByGroupSummaryInfoChildren(){return this._getOption("sortByGroupSummaryInfo")}set sortByGroupSummaryInfoChildren(d){this.setChildren("sortByGroupSummaryInfo",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"adaptiveDetailRowPreparing",emit:"onAdaptiveDetailRowPreparing"},{subscribe:"cellClick",emit:"onCellClick"},{subscribe:"cellDblClick",emit:"onCellDblClick"},{subscribe:"cellHoverChanged",emit:"onCellHoverChanged"},{subscribe:"cellPrepared",emit:"onCellPrepared"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"contextMenuPreparing",emit:"onContextMenuPreparing"},{subscribe:"dataErrorOccurred",emit:"onDataErrorOccurred"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"editCanceled",emit:"onEditCanceled"},{subscribe:"editCanceling",emit:"onEditCanceling"},{subscribe:"editingStart",emit:"onEditingStart"},{subscribe:"editorPrepared",emit:"onEditorPrepared"},{subscribe:"editorPreparing",emit:"onEditorPreparing"},{subscribe:"exporting",emit:"onExporting"},{subscribe:"focusedCellChanged",emit:"onFocusedCellChanged"},{subscribe:"focusedCellChanging",emit:"onFocusedCellChanging"},{subscribe:"focusedRowChanged",emit:"onFocusedRowChanged"},{subscribe:"focusedRowChanging",emit:"onFocusedRowChanging"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"initNewRow",emit:"onInitNewRow"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"rowClick",emit:"onRowClick"},{subscribe:"rowCollapsed",emit:"onRowCollapsed"},{subscribe:"rowCollapsing",emit:"onRowCollapsing"},{subscribe:"rowDblClick",emit:"onRowDblClick"},{subscribe:"rowExpanded",emit:"onRowExpanded"},{subscribe:"rowExpanding",emit:"onRowExpanding"},{subscribe:"rowInserted",emit:"onRowInserted"},{subscribe:"rowInserting",emit:"onRowInserting"},{subscribe:"rowPrepared",emit:"onRowPrepared"},{subscribe:"rowRemoved",emit:"onRowRemoved"},{subscribe:"rowRemoving",emit:"onRowRemoving"},{subscribe:"rowUpdated",emit:"onRowUpdated"},{subscribe:"rowUpdating",emit:"onRowUpdating"},{subscribe:"rowValidating",emit:"onRowValidating"},{subscribe:"saved",emit:"onSaved"},{subscribe:"saving",emit:"onSaving"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"toolbarPreparing",emit:"onToolbarPreparing"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"allowColumnReorderingChange"},{emit:"allowColumnResizingChange"},{emit:"autoNavigateToFocusedRowChange"},{emit:"cacheEnabledChange"},{emit:"cellHintEnabledChange"},{emit:"columnAutoWidthChange"},{emit:"columnChooserChange"},{emit:"columnFixingChange"},{emit:"columnHidingEnabledChange"},{emit:"columnMinWidthChange"},{emit:"columnResizingModeChange"},{emit:"columnsChange"},{emit:"columnWidthChange"},{emit:"customizeColumnsChange"},{emit:"dataRowTemplateChange"},{emit:"dataSourceChange"},{emit:"dateSerializationFormatChange"},{emit:"disabledChange"},{emit:"editingChange"},{emit:"elementAttrChange"},{emit:"errorRowEnabledChange"},{emit:"exportChange"},{emit:"filterBuilderChange"},{emit:"filterBuilderPopupChange"},{emit:"filterPanelChange"},{emit:"filterRowChange"},{emit:"filterSyncEnabledChange"},{emit:"filterValueChange"},{emit:"focusedColumnIndexChange"},{emit:"focusedRowEnabledChange"},{emit:"focusedRowIndexChange"},{emit:"focusedRowKeyChange"},{emit:"groupingChange"},{emit:"groupPanelChange"},{emit:"headerFilterChange"},{emit:"heightChange"},{emit:"highlightChangesChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"keyboardNavigationChange"},{emit:"keyExprChange"},{emit:"loadPanelChange"},{emit:"masterDetailChange"},{emit:"noDataTextChange"},{emit:"pagerChange"},{emit:"pagingChange"},{emit:"remoteOperationsChange"},{emit:"renderAsyncChange"},{emit:"repaintChangesOnlyChange"},{emit:"rowAlternationEnabledChange"},{emit:"rowDraggingChange"},{emit:"rowTemplateChange"},{emit:"rtlEnabledChange"},{emit:"scrollingChange"},{emit:"searchPanelChange"},{emit:"selectedRowKeysChange"},{emit:"selectionChange"},{emit:"selectionFilterChange"},{emit:"showBordersChange"},{emit:"showColumnHeadersChange"},{emit:"showColumnLinesChange"},{emit:"showRowLinesChange"},{emit:"sortByGroupSummaryInfoChange"},{emit:"sortingChange"},{emit:"stateStoringChange"},{emit:"summaryChange"},{emit:"syncLookupFilterValuesChange"},{emit:"tabIndexChange"},{emit:"toolbarChange"},{emit:"twoWayBindingEnabledChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wordWrapEnabledChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("columns",d),this.setupChanges("dataSource",d),this.setupChanges("keyExpr",d),this.setupChanges("selectedRowKeys",d),this.setupChanges("sortByGroupSummaryInfo",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("columns"),this._idh.doCheck("dataSource"),this._idh.doCheck("keyExpr"),this._idh.doCheck("selectedRowKeys"),this._idh.doCheck("sortByGroupSummaryInfo"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-data-grid"]],contentQueries:function(c,s,a){if(1&c&&(W.wni(a,b.nj_,4),W.wni(a,b.x$q,4)),2&c){let u;W.mGM(u=W.lsd())&&(s.columnsChildren=u),W.mGM(u=W.lsd())&&(s.sortByGroupSummaryInfoChildren=u)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",allowColumnReordering:"allowColumnReordering",allowColumnResizing:"allowColumnResizing",autoNavigateToFocusedRow:"autoNavigateToFocusedRow",cacheEnabled:"cacheEnabled",cellHintEnabled:"cellHintEnabled",columnAutoWidth:"columnAutoWidth",columnChooser:"columnChooser",columnFixing:"columnFixing",columnHidingEnabled:"columnHidingEnabled",columnMinWidth:"columnMinWidth",columnResizingMode:"columnResizingMode",columns:"columns",columnWidth:"columnWidth",customizeColumns:"customizeColumns",dataRowTemplate:"dataRowTemplate",dataSource:"dataSource",dateSerializationFormat:"dateSerializationFormat",disabled:"disabled",editing:"editing",elementAttr:"elementAttr",errorRowEnabled:"errorRowEnabled",export:"export",filterBuilder:"filterBuilder",filterBuilderPopup:"filterBuilderPopup",filterPanel:"filterPanel",filterRow:"filterRow",filterSyncEnabled:"filterSyncEnabled",filterValue:"filterValue",focusedColumnIndex:"focusedColumnIndex",focusedRowEnabled:"focusedRowEnabled",focusedRowIndex:"focusedRowIndex",focusedRowKey:"focusedRowKey",grouping:"grouping",groupPanel:"groupPanel",headerFilter:"headerFilter",height:"height",highlightChanges:"highlightChanges",hint:"hint",hoverStateEnabled:"hoverStateEnabled",keyboardNavigation:"keyboardNavigation",keyExpr:"keyExpr",loadPanel:"loadPanel",masterDetail:"masterDetail",noDataText:"noDataText",pager:"pager",paging:"paging",remoteOperations:"remoteOperations",renderAsync:"renderAsync",repaintChangesOnly:"repaintChangesOnly",rowAlternationEnabled:"rowAlternationEnabled",rowDragging:"rowDragging",rowTemplate:"rowTemplate",rtlEnabled:"rtlEnabled",scrolling:"scrolling",searchPanel:"searchPanel",selectedRowKeys:"selectedRowKeys",selection:"selection",selectionFilter:"selectionFilter",showBorders:"showBorders",showColumnHeaders:"showColumnHeaders",showColumnLines:"showColumnLines",showRowLines:"showRowLines",sortByGroupSummaryInfo:"sortByGroupSummaryInfo",sorting:"sorting",stateStoring:"stateStoring",summary:"summary",syncLookupFilterValues:"syncLookupFilterValues",tabIndex:"tabIndex",toolbar:"toolbar",twoWayBindingEnabled:"twoWayBindingEnabled",visible:"visible",width:"width",wordWrapEnabled:"wordWrapEnabled"},outputs:{onAdaptiveDetailRowPreparing:"onAdaptiveDetailRowPreparing",onCellClick:"onCellClick",onCellDblClick:"onCellDblClick",onCellHoverChanged:"onCellHoverChanged",onCellPrepared:"onCellPrepared",onContentReady:"onContentReady",onContextMenuPreparing:"onContextMenuPreparing",onDataErrorOccurred:"onDataErrorOccurred",onDisposing:"onDisposing",onEditCanceled:"onEditCanceled",onEditCanceling:"onEditCanceling",onEditingStart:"onEditingStart",onEditorPrepared:"onEditorPrepared",onEditorPreparing:"onEditorPreparing",onExporting:"onExporting",onFocusedCellChanged:"onFocusedCellChanged",onFocusedCellChanging:"onFocusedCellChanging",onFocusedRowChanged:"onFocusedRowChanged",onFocusedRowChanging:"onFocusedRowChanging",onInitialized:"onInitialized",onInitNewRow:"onInitNewRow",onKeyDown:"onKeyDown",onOptionChanged:"onOptionChanged",onRowClick:"onRowClick",onRowCollapsed:"onRowCollapsed",onRowCollapsing:"onRowCollapsing",onRowDblClick:"onRowDblClick",onRowExpanded:"onRowExpanded",onRowExpanding:"onRowExpanding",onRowInserted:"onRowInserted",onRowInserting:"onRowInserting",onRowPrepared:"onRowPrepared",onRowRemoved:"onRowRemoved",onRowRemoving:"onRowRemoving",onRowUpdated:"onRowUpdated",onRowUpdating:"onRowUpdating",onRowValidating:"onRowValidating",onSaved:"onSaved",onSaving:"onSaving",onSelectionChanged:"onSelectionChanged",onToolbarPreparing:"onToolbarPreparing",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",allowColumnReorderingChange:"allowColumnReorderingChange",allowColumnResizingChange:"allowColumnResizingChange",autoNavigateToFocusedRowChange:"autoNavigateToFocusedRowChange",cacheEnabledChange:"cacheEnabledChange",cellHintEnabledChange:"cellHintEnabledChange",columnAutoWidthChange:"columnAutoWidthChange",columnChooserChange:"columnChooserChange",columnFixingChange:"columnFixingChange",columnHidingEnabledChange:"columnHidingEnabledChange",columnMinWidthChange:"columnMinWidthChange",columnResizingModeChange:"columnResizingModeChange",columnsChange:"columnsChange",columnWidthChange:"columnWidthChange",customizeColumnsChange:"customizeColumnsChange",dataRowTemplateChange:"dataRowTemplateChange",dataSourceChange:"dataSourceChange",dateSerializationFormatChange:"dateSerializationFormatChange",disabledChange:"disabledChange",editingChange:"editingChange",elementAttrChange:"elementAttrChange",errorRowEnabledChange:"errorRowEnabledChange",exportChange:"exportChange",filterBuilderChange:"filterBuilderChange",filterBuilderPopupChange:"filterBuilderPopupChange",filterPanelChange:"filterPanelChange",filterRowChange:"filterRowChange",filterSyncEnabledChange:"filterSyncEnabledChange",filterValueChange:"filterValueChange",focusedColumnIndexChange:"focusedColumnIndexChange",focusedRowEnabledChange:"focusedRowEnabledChange",focusedRowIndexChange:"focusedRowIndexChange",focusedRowKeyChange:"focusedRowKeyChange",groupingChange:"groupingChange",groupPanelChange:"groupPanelChange",headerFilterChange:"headerFilterChange",heightChange:"heightChange",highlightChangesChange:"highlightChangesChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",keyboardNavigationChange:"keyboardNavigationChange",keyExprChange:"keyExprChange",loadPanelChange:"loadPanelChange",masterDetailChange:"masterDetailChange",noDataTextChange:"noDataTextChange",pagerChange:"pagerChange",pagingChange:"pagingChange",remoteOperationsChange:"remoteOperationsChange",renderAsyncChange:"renderAsyncChange",repaintChangesOnlyChange:"repaintChangesOnlyChange",rowAlternationEnabledChange:"rowAlternationEnabledChange",rowDraggingChange:"rowDraggingChange",rowTemplateChange:"rowTemplateChange",rtlEnabledChange:"rtlEnabledChange",scrollingChange:"scrollingChange",searchPanelChange:"searchPanelChange",selectedRowKeysChange:"selectedRowKeysChange",selectionChange:"selectionChange",selectionFilterChange:"selectionFilterChange",showBordersChange:"showBordersChange",showColumnHeadersChange:"showColumnHeadersChange",showColumnLinesChange:"showColumnLinesChange",showRowLinesChange:"showRowLinesChange",sortByGroupSummaryInfoChange:"sortByGroupSummaryInfoChange",sortingChange:"sortingChange",stateStoringChange:"stateStoringChange",summaryChange:"summaryChange",syncLookupFilterValuesChange:"syncLookupFilterValuesChange",tabIndexChange:"tabIndexChange",toolbarChange:"toolbarChange",twoWayBindingEnabledChange:"twoWayBindingEnabledChange",visibleChange:"visibleChange",widthChange:"widthChange",wordWrapEnabledChange:"wordWrapEnabledChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.nrj,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b._zS,b.U9o,b.hyP,b._RO,b.YC7,b.GIV,b.X1G,b.W6p,b.Pxf,b.BR_,b.uE7,b.$lK,b.aJg,b.GCl,b.Sy5,b.k61,b.POb,b.hUd,b.HKo,b.Ixj,b.a6E,b.YLo,b.YaD,b.eNx,b.Tob,b.$Ql,b.isg,b.uIe,b.L0X,b.MtA,b.yA4,b.oCB,b.tWd,b.zkV,b.Sn2,b.MBy,b.qCh,b.joz,b.FOK,b.x_w,b.s5o,b.Zac,b.ZaD,b.m1r,b.Wnt,b.rER,b.XUe,b.lkr,b.WC8,b.GQ,b.kYc,b.X6g,b.WXx,b.CWj,b.Mru,b.Hl$,b.l4W,P.p_,P.xZ,b.nrj,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b._zS,b.U9o,b.hyP,b._RO,b.YC7,b.GIV,b.X1G,b.W6p,b.Pxf,b.BR_,b.uE7,b.$lK,b.aJg,b.GCl,b.Sy5,b.k61,b.POb,b.hUd,b.HKo,b.Ixj,b.a6E,b.YLo,b.YaD,b.eNx,b.Tob,b.$Ql,b.isg,b.uIe,b.L0X,b.MtA,b.yA4,b.oCB,b.tWd,b.zkV,b.Sn2,b.MBy,b.qCh,b.joz,b.FOK,b.x_w,b.s5o,b.Zac,b.ZaD,b.m1r,b.Wnt,b.rER,b.XUe,b.lkr,b.WC8,b.GQ,b.kYc,b.X6g,b.WXx,b.CWj,b.Mru,b.Hl$,b.l4W,P.xZ]})}return T})()},6523:(In,Ze,M)=>{"use strict";M.d(Ze,{W:()=>y,z:()=>T});var W=M(7788),o=M(8638),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(s){this._setOption("acceptCustomValue",s)}get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get adaptivityEnabled(){return this._getOption("adaptivityEnabled")}set adaptivityEnabled(s){this._setOption("adaptivityEnabled",s)}get applyButtonText(){return this._getOption("applyButtonText")}set applyButtonText(s){this._setOption("applyButtonText",s)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(s){this._setOption("applyValueMode",s)}get buttons(){return this._getOption("buttons")}set buttons(s){this._setOption("buttons",s)}get calendarOptions(){return this._getOption("calendarOptions")}set calendarOptions(s){this._setOption("calendarOptions",s)}get cancelButtonText(){return this._getOption("cancelButtonText")}set cancelButtonText(s){this._setOption("cancelButtonText",s)}get dateOutOfRangeMessage(){return this._getOption("dateOutOfRangeMessage")}set dateOutOfRangeMessage(s){this._setOption("dateOutOfRangeMessage",s)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(s){this._setOption("dateSerializationFormat",s)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(s){this._setOption("deferRendering",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get disabledDates(){return this._getOption("disabledDates")}set disabledDates(s){this._setOption("disabledDates",s)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(s){this._setOption("displayFormat",s)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(s){this._setOption("dropDownButtonTemplate",s)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(s){this._setOption("dropDownOptions",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(s){this._setOption("inputAttr",s)}get interval(){return this._getOption("interval")}set interval(s){this._setOption("interval",s)}get invalidDateMessage(){return this._getOption("invalidDateMessage")}set invalidDateMessage(s){this._setOption("invalidDateMessage",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get label(){return this._getOption("label")}set label(s){this._setOption("label",s)}get labelMode(){return this._getOption("labelMode")}set labelMode(s){this._setOption("labelMode",s)}get max(){return this._getOption("max")}set max(s){this._setOption("max",s)}get maxLength(){return this._getOption("maxLength")}set maxLength(s){this._setOption("maxLength",s)}get min(){return this._getOption("min")}set min(s){this._setOption("min",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get opened(){return this._getOption("opened")}set opened(s){this._setOption("opened",s)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(s){this._setOption("openOnFieldClick",s)}get pickerType(){return this._getOption("pickerType")}set pickerType(s){this._setOption("pickerType",s)}get placeholder(){return this._getOption("placeholder")}set placeholder(s){this._setOption("placeholder",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get showAnalogClock(){return this._getOption("showAnalogClock")}set showAnalogClock(s){this._setOption("showAnalogClock",s)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(s){this._setOption("showClearButton",s)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(s){this._setOption("showDropDownButton",s)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(s){this._setOption("spellcheck",s)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(s){this._setOption("stylingMode",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get text(){return this._getOption("text")}set text(s){this._setOption("text",s)}get todayButtonText(){return this._getOption("todayButtonText")}set todayButtonText(s){this._setOption("todayButtonText",s)}get type(){return this._getOption("type")}set type(s){this._setOption("type",s)}get useMaskBehavior(){return this._getOption("useMaskBehavior")}set useMaskBehavior(s){this._setOption("useMaskBehavior",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(s){this._setOption("valueChangeEvent",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}onChange;onClosed;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;adaptivityEnabledChange;applyButtonTextChange;applyValueModeChange;buttonsChange;calendarOptionsChange;cancelButtonTextChange;dateOutOfRangeMessageChange;dateSerializationFormatChange;deferRenderingChange;disabledChange;disabledDatesChange;displayFormatChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;intervalChange;invalidDateMessageChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maxChange;maxLengthChange;minChange;nameChange;openedChange;openOnFieldClickChange;pickerTypeChange;placeholderChange;readOnlyChange;rtlEnabledChange;showAnalogClockChange;showClearButtonChange;showDropDownButtonChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;todayButtonTextChange;typeChange;useMaskBehaviorChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(s){}touched=s=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(s){this.setChildren("buttons",s)}constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"adaptivityEnabledChange"},{emit:"applyButtonTextChange"},{emit:"applyValueModeChange"},{emit:"buttonsChange"},{emit:"calendarOptionsChange"},{emit:"cancelButtonTextChange"},{emit:"dateOutOfRangeMessageChange"},{emit:"dateSerializationFormatChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"disabledDatesChange"},{emit:"displayFormatChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"intervalChange"},{emit:"invalidDateMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxChange"},{emit:"maxLengthChange"},{emit:"minChange"},{emit:"nameChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"pickerTypeChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showAnalogClockChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"todayButtonTextChange"},{emit:"typeChange"},{emit:"useMaskBehaviorChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("buttons",s),this.setupChanges("disabledDates",s),this.setupChanges("validationErrors",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("disabledDates"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-date-box"]],contentQueries:function(a,u,h){if(1&a&&W.wni(h,f.BrI,4),2&a){let g;W.mGM(g=W.lsd())&&(u.buttonsChildren=g)}},hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",adaptivityEnabled:"adaptivityEnabled",applyButtonText:"applyButtonText",applyValueMode:"applyValueMode",buttons:"buttons",calendarOptions:"calendarOptions",cancelButtonText:"cancelButtonText",dateOutOfRangeMessage:"dateOutOfRangeMessage",dateSerializationFormat:"dateSerializationFormat",deferRendering:"deferRendering",disabled:"disabled",disabledDates:"disabledDates",displayFormat:"displayFormat",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",interval:"interval",invalidDateMessage:"invalidDateMessage",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",max:"max",maxLength:"maxLength",min:"min",name:"name",opened:"opened",openOnFieldClick:"openOnFieldClick",pickerType:"pickerType",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showAnalogClock:"showAnalogClock",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",todayButtonText:"todayButtonText",type:"type",useMaskBehavior:"useMaskBehavior",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",adaptivityEnabledChange:"adaptivityEnabledChange",applyButtonTextChange:"applyButtonTextChange",applyValueModeChange:"applyValueModeChange",buttonsChange:"buttonsChange",calendarOptionsChange:"calendarOptionsChange",cancelButtonTextChange:"cancelButtonTextChange",dateOutOfRangeMessageChange:"dateOutOfRangeMessageChange",dateSerializationFormatChange:"dateSerializationFormatChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",disabledDatesChange:"disabledDatesChange",displayFormatChange:"displayFormatChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",intervalChange:"intervalChange",invalidDateMessageChange:"invalidDateMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxChange:"maxChange",maxLengthChange:"maxLengthChange",minChange:"minChange",nameChange:"nameChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",pickerTypeChange:"pickerTypeChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showAnalogClockChange:"showAnalogClockChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",todayButtonTextChange:"todayButtonTextChange",typeChange:"typeChange",useMaskBehaviorChange:"useMaskBehaviorChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.GIV,f.u4t,f.QWP,f.f8z,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,b.p_,b.xZ,f.GIV,f.u4t,f.QWP,f.f8z,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,b.xZ]})}return d})()},6761:(In,Ze,M)=>{"use strict";M.d(Ze,{e:()=>et,B:()=>Ke});var W=M(7788),o=M(5737),P=M(1973),b=M(3686),f=M(5973),S=M(6054),T=M(5704),y=M(5645),d=M(3090),c=M(8535),s=M(6946),a=M(2660),u=M(4072),h=M(9293),g=M(8360),_=M(6620),x=M(9212),w=M(5257),D=M(5685),C=M(7525),I=M(676),L=M(4761);const N=Ye=>L.A.deserializeDate(Ye),G=(Ye,Pe)=>!Ye&&!Pe||I.A.sameDate(N(Ye),N(Pe)),k=(Ye,Pe)=>{const[Se,Re]=Ye,[Fe,Xe]=Pe;return G(Se,Fe)&&G(Re,Xe)};var K=M(1363),J=M(8638),ie=M(1830),re=M(6229);const Y=class q extends re.A{constructor(Pe){super(),this._dateSelectedCounter=0,this.dateBox=Pe,this.dateRangeBox=Pe.option("_dateRangeBoxInstance")}popupConfig(Pe){return(0,d.X)(!0,super.popupConfig(Pe),{position:{of:this.getDateRangeBox().$element()}})}popupShowingHandler(){this.getWidget()._restoreViewsMinMaxOptions(),this._dateSelectedCounter=0}_getPopup(){return super._getPopup()||this.getDateRangeBox().getStartDateBox()._popup}supportedKeys(){const Pe=this.getDateRangeBox();return(0,o.A)({},super.supportedKeys(),{rightArrow:()=>{if(Pe.option("opened"))return!0},leftArrow:()=>{if(Pe.option("opened"))return!0},enter:Se=>{if(Pe.option("opened")){const Re=this.dateBox.dateOption("value");this.dateBox._valueChangeEventHandler(Se);const Fe=this.dateBox.dateOption("value");return G(Re,Fe)?Pe.getStartDateBox().getStrategy().getWidget()._enterKeyHandler(Se):Pe.getStartDateBox().getStrategy().getWidget().option("value",Pe.option("value")),!1}},tab:Se=>{if(!Pe.option("opened"))return;if(!this._getPopup().getFocusableElements().length)return void((!Se.shiftKey&&Pe._isEndDateActiveElement()||Se.shiftKey&&Pe._isStartDateActiveElement())&&Pe.close());if(!Se.shiftKey&&Pe._isStartDateActiveElement()||Se.shiftKey&&Pe._isEndDateActiveElement())return;const Re=Se.shiftKey?Pe.getStartDateBox()._getLastPopupElement():Pe.getStartDateBox()._getFirstPopupElement();Re&&(u.A.trigger(Re,"focus"),Re.select()),Se.preventDefault()}})}_getWidgetOptions(){const{disabledDates:Pe,value:Se,multiView:Re}=this.dateRangeBox.option(),Fe=(0,ie.Tn)(Pe)?this._injectComponent(Pe):Pe??void 0;return(0,d.X)(super._getWidgetOptions(),{disabledDates:Fe,value:Se,selectionMode:"range",viewsCount:Re?2:1,_allowChangeSelectionOrder:!0,_currentSelection:this.getCurrentSelection()})}_refreshActiveDescendant(Pe){this.getDateRangeBox().setAria("activedescendant",Pe.actionValue)}_injectComponent(Pe){return Se=>Pe((0,d.X)(Se,{component:this.getDateRangeBox()}))}getKeyboardListener(){const Pe=this.getDateRangeBox();return Pe.getStartDateBox()?Pe.getStartDateBox().getStrategy().getWidget():this.getWidget()}getValue(){return this.getWidget().option("value")}_updateValue(){const{value:Pe}=this.getDateRangeBox().option();this.getWidget()&&(this._shouldPreventFocusChange=!0,this.getWidget().option("value",Pe))}_isInstantlyMode(){return"instantly"===this.getDateRangeBox().option("applyValueMode")}_valueChangedHandler(Pe){let{value:Se,previousValue:Re,event:Fe}=Pe;if(k(Se,Re)&&!this.getWidget()._valueSelected)return void(this._shouldPreventFocusChange=!1);this.getWidget()._valueSelected=!1;const Xe=this.getDateRangeBox();if(this._isInstantlyMode()){if(!Xe.option("disableOutOfRangeSelection"))if("startDate"===this._getCalendarCurrentSelection())this._dateSelectedCounter=0;else if(this._dateSelectedCounter=1,Se[0]){if(N(Se[0])>N(Se[1]))return void Xe.updateValue([Se[0],null],Fe)}else this._dateSelectedCounter=-1;if(Xe.updateValue(Se,Fe),this._dateSelectedCounter+=1,2===this._dateSelectedCounter)return void Xe.close()}else if("endDate"===this._getCalendarCurrentSelection()&&Se[0]&&N(Se[0])>N(Se[1]))return;this._shouldPreventFocusChange||this._moveFocusToNextInput(),this._shouldPreventFocusChange=!1}_moveFocusToNextInput(){const Pe="startDate"===this._getCalendarCurrentSelection()?this.getDateRangeBox().getEndDateBox():this.getDateRangeBox().getStartDateBox();Pe.focus(),u.A.trigger(Pe.field(),"dxclick")}getCurrentSelection(){return this.getDateRangeBox().option("_currentSelection")}_getCalendarCurrentSelection(){return this.getWidget().option("_currentSelection")}_closeDropDownByEnter(){return"startDate"!==this._getCalendarCurrentSelection()}dateBoxValue(){const{dateBox:Pe}=this;return arguments.length?Pe.dateValue.apply(Pe,arguments):Pe.dateOption.apply(Pe,["value"])}_cellClickHandler(){}setActiveStartDateBox(){this.dateBox=this.getDateRangeBox().getStartDateBox()}setActiveEndDateBox(){this.dateBox=this.getDateRangeBox().getEndDateBox()}getDateRangeBox(){return this.dateRangeBox}getWidget(){return this._widget}},Q=J.A,pe=class te extends Q{_initStrategy(){this._strategy=new Y(this)}_initMarkup(){super._initMarkup(),this._renderInputClickEvent()}_renderInputClickEvent(){const Pe=(0,h.b4)("dxclick",this.NAME);u.A.off(this._input(),Pe),u.A.on(this._input(),Pe,Se=>{this._processValueChange(Se)})}_applyButtonHandler(Pe){let{event:Se}=Pe;const Re=this.getStrategy(),Fe=Re.getValue();Re.getDateRangeBox().updateValue(Fe,Se),this.close(),this.option("focusStateEnabled")&&this.focus()}_openHandler(Pe){this.getStrategy().getDateRangeBox().option("opened")||super._openHandler(Pe)}_renderOpenedState(){const{opened:Pe}=this.option();this._getDateRangeBox().option("opened",Pe),this._isStartDateBox()&&(Pe&&this._createPopup(),this._getDateRangeBox()._popupContentIdentifier(this._getControlsAria()),this._setPopupOption("visible",Pe),this._getDateRangeBox()._setAriaAttributes())}_getDateRangeBox(){return this.getStrategy().getDateRangeBox()}_isStartDateBox(){return(0,T.A)(this.element()).hasClass("dx-start-datebox")}_renderPopup(){super._renderPopup(),this._isStartDateBox()&&this._getDateRangeBox()._bindInnerWidgetOptions(this._popup,"dropDownOptions")}_popupShownHandler(){var Pe;super._popupShownHandler(),null===(Pe=this._getDateRangeBox()._validationMessage)||void 0===Pe||Pe.option("positionSide",this._getValidationMessagePositionSide())}_popupHiddenHandler(){var Pe;super._popupHiddenHandler(),null===(Pe=this._getDateRangeBox()._validationMessage)||void 0===Pe||Pe.option("positionSide",this._getValidationMessagePositionSide())}_focusInHandler(Pe){super._focusInHandler(Pe),this._processValueChange(Pe)}_popupTabHandler(Pe){const Se=(0,T.A)(Pe.target);Pe.shiftKey&&Se.is(this._getFirstPopupElement())&&(this._getDateRangeBox().getEndDateBox().focus(),Pe.preventDefault()),!Pe.shiftKey&&Se.is(this._getLastPopupElement())&&(this._getDateRangeBox().getStartDateBox().focus(),Pe.preventDefault())}_processValueChange(Pe){const{target:Se}=Pe,Re=this._getDateRangeBox(),[Fe,Xe]=Re.field();if((0,T.A)(Se).is((0,T.A)(Fe))&&Re.option("_currentSelection","startDate"),(0,T.A)(Se).is((0,T.A)(Xe))&&Re.option("_currentSelection","endDate"),!Re.getStartDateBox().getStrategy().getWidget())return;const tt=Re.getStartDateBox().getStrategy().getWidget(),{value:vt}=tt.option(),qe=N(vt?.[0]),At=N(vt?.[1]);(0,T.A)(Se).is((0,T.A)(Fe))&&(qe&&(tt._skipNavigate=!0,tt.option("currentDate",qe)),this.getStrategy().setActiveStartDateBox(),tt.option("_currentSelection","startDate"),Re.option("disableOutOfRangeSelection")&&tt._setViewsMaxOption(At)),(0,T.A)(Se).is((0,T.A)(Xe))&&(At&&(qe&&((Ye,Pe)=>12*(Pe.getFullYear()-Ye.getFullYear())-Ye.getMonth()+Pe.getMonth())(qe,At)>1&&(tt.option("currentDate",tt._getDateByOffset(null,At)),tt.option("currentDate",tt._getDateByOffset(-1,At))),tt._skipNavigate=!0,tt.option("currentDate",At)),Re.getStartDateBox().getStrategy().setActiveEndDateBox(),tt.option("_currentSelection","endDate"),Re.option("disableOutOfRangeSelection")&&tt._setViewsMinOption(qe))}_invalidate(){super._invalidate(),this._refreshStrategy()}_updateInternalValidationState(Pe,Se){this.option({isValid:Pe,validationError:Pe?null:{message:Se}})}_recallInternalValidation(Pe){this._applyInternalValidation(Pe)}_isTargetOutOfComponent(Pe){const Se=(0,T.A)(this._getDateRangeBox().element()),Re=0===(0,T.A)(Pe).closest(Se).length;return super._isTargetOutOfComponent(Pe)&&Re}_updateLabelWidth(){const Pe=this._getDateRangeBox()._$beforeButtonsContainer,{labelMode:Se}=this.option();"outside"===Se&&Pe&&this._isStartDateBox()?this._label._updateLabelTransform((0,K.RG)(Pe)):super._updateLabelWidth()}_optionChanged(Pe){switch(Pe.name){case"isValid":{const Se=this._getDateRangeBox().option("isValid");if(this._skipIsValidOptionChange||Se===Pe.value)return void super._optionChanged(Pe);this._skipIsValidOptionChange=!0,this.option({isValid:Se}),this._skipIsValidOptionChange=!1;break}default:super._optionChanged(Pe)}}close(){this.getStrategy().getDateRangeBox().getStartDateBox().option("opened",!1)}getStrategy(){return this._strategy}},ee="dx-texteditor-with-floating-label",Ee=["KeyDown","KeyUp","Change","Cut","Copy","Paste","Input","EnterKey"];class Oe extends _.A{_getDefaultOptions(){return(0,d.X)(super._getDefaultOptions(),{acceptCustomValue:!0,activeStateEnabled:!0,applyButtonText:g.A.format("OK"),applyValueMode:"instantly",buttons:void 0,calendarOptions:{},cancelButtonText:g.A.format("Cancel"),endDateOutOfRangeMessage:g.A.format("dxDateRangeBox-endDateOutOfRangeMessage"),dateSerializationFormat:void 0,deferRendering:!0,disableOutOfRangeSelection:!1,disabledDates:null,displayFormat:null,dropDownButtonTemplate:"dropDownButton",dropDownOptions:{},endDate:null,endDateInputAttr:{},endDateLabel:g.A.format("dxDateRangeBox-endDateLabel"),endDateName:"",endDatePlaceholder:"",endDateText:void 0,focusStateEnabled:!0,hoverStateEnabled:!0,invalidStartDateMessage:g.A.format("dxDateRangeBox-invalidStartDateMessage"),invalidEndDateMessage:g.A.format("dxDateRangeBox-invalidEndDateMessage"),isValid:!0,labelMode:"static",max:void 0,min:void 0,multiView:!0,onChange:null,onClosed:null,onCopy:null,onCut:null,onEnterKey:null,onInput:null,onKeyDown:null,onKeyUp:null,onOpened:null,onPaste:null,onValueChanged:null,openOnFieldClick:!0,opened:!1,pickerType:"calendar",readOnly:!1,showClearButton:!1,showDropDownButton:!0,spellcheck:!1,startDate:null,startDateInputAttr:{},startDateLabel:g.A.format("dxDateRangeBox-startDateLabel"),startDateName:"",startDateOutOfRangeMessage:g.A.format("dxDateRangeBox-startDateOutOfRangeMessage"),startDatePlaceholder:"",startDateText:void 0,stylingMode:(0,b.A)().editorStylingMode??"outlined",todayButtonText:g.A.format("dxCalendar-todayButtonText"),useHiddenSubmitElement:!1,useMaskBehavior:!1,validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"auto",validationStatus:"valid",value:[null,null],valueChangeEvent:"change",_internalValidationErrors:[],_currentSelection:"startDate"})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device(){const Pe=(0,x.ss)();return(0,x.gx)(Pe)},options:{labelMode:"floating",stylingMode:(0,b.A)().editorStylingMode??"filled"}},{device(){const Pe=(0,x.ss)();return(0,x.Ft)(Pe)},options:{labelMode:"outside"}},{device(){const Pe=f.A.real(),{platform:Se}=Pe;return"ios"===Se||"android"===Se},options:{multiView:!1}}])}_initOptions(Pe){super._initOptions(Pe);const{value:Se}=this.initialOption();let{value:Re,startDate:Fe,endDate:Xe}=this.option();Re[0]&&Re[1]&&N(Re[0])>N(Re[1])&&(Re=[Re[1],Re[0]]),Fe&&Xe&&N(Fe)>N(Xe)&&([Fe,Xe]=[Xe,Fe]),k(Se,Re)?Re=[Fe,Xe]:[Fe,Xe]=Re,this.option({startDate:Fe,endDate:Xe,value:Re})}_createOpenAction(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]})}_raiseOpenAction(){this._openAction||this._createOpenAction(),this._openAction()}_createCloseAction(){this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})}_raiseCloseAction(){this._closeAction||this._createCloseAction(),this._closeAction()}_createEventAction(Pe){this[`_${(0,s.PT)(Pe)}Action`]=this._createActionByOption(`on${Pe}`,{excludeValidators:["readOnly"]})}_raiseAction(Pe,Se){this[`_${(0,s.PT)(Pe)}Action`]||this._createEventAction(Pe),this[`_${(0,s.PT)(Pe)}Action`]({event:Se})}_initTemplates(){this._templateManager.addDefaultTemplates({dropDownButton:new y.l(Pe=>{const Se=(0,T.A)("<div>").addClass("dx-dropdowneditor-icon");(0,T.A)(Pe.container).append(Se)})}),super._initTemplates()}_getDefaultButtons(){return[{name:"clear",Ctor:D.A},{name:"dropDown",Ctor:w.A}]}_initMarkup(){(0,T.A)(this.element()).addClass("dx-daterangebox").addClass("dx-texteditor").addClass("dx-dropdowneditor"),this._toggleDropDownEditorActiveClass(),this._toggleEditorLabelClass(),this._toggleReadOnlyState(),this._renderStylingMode(),this._renderEndDateBox(),this._renderSeparator(),this._renderStartDateBox(),this._toggleEmptinessState(),this._renderEmptinessEvent(),this._renderButtonsContainer(),super._initMarkup(),(0,T.A)(this.element()).removeClass("dx-show-invalid-badge")}_renderEmptinessEvent(){const Pe=(0,h.b4)("input blur",this.NAME);u.A.off(this._focusTarget(),Pe),u.A.on(this._focusTarget(),Pe,this._toggleEmptinessState.bind(this))}_toggleEmptinessState(){const Pe=(0,T.A)(this.getStartDateBox().element()).hasClass("dx-texteditor-empty")&&(0,T.A)(this.getEndDateBox().element()).hasClass("dx-texteditor-empty");(0,T.A)(this.element()).toggleClass("dx-texteditor-empty",Pe)}_attachKeyboardEvents(){this.option("readOnly")||super._attachKeyboardEvents()}_toggleReadOnlyState(){const{readOnly:Pe}=this.option();(0,T.A)(this.element()).toggleClass("dx-state-readonly",!!Pe)}_toggleDropDownEditorActiveClass(){const{opened:Pe}=this.option();(0,T.A)(this.element()).toggleClass("dx-dropdowneditor-active",Pe)}_toggleEditorLabelClass(){const{startDateLabel:Pe,endDateLabel:Se,labelMode:Re}=this.option(),Fe=!(!Pe&&!Se||"hidden"===Re);(0,T.A)(this.element()).removeClass(ee).removeClass("dx-texteditor-label-outside").removeClass("dx-texteditor-with-label"),Fe&&((0,T.A)(this.element()).addClass("floating"===Re?ee:"dx-texteditor-with-label"),"outside"===Re&&(0,T.A)(this.element()).addClass("dx-texteditor-label-outside"))}_renderStartDateBox(){this._$startDateBox=(0,T.A)("<div>").addClass("dx-start-datebox").prependTo(this.$element()),this._startDateBox=this._createComponent(this._$startDateBox,pe,this._getStartDateBoxConfig()),this._startDateBox.NAME="_StartDateBox"}_renderEndDateBox(){this._$endDateBox=(0,T.A)("<div>").addClass("dx-end-datebox").appendTo(this.$element()),this._endDateBox=this._createComponent(this._$endDateBox,pe,this._getEndDateBoxConfig()),this._endDateBox.NAME="_EndDateBox"}_renderSeparator(){const Pe=(0,c.N)("to");this._$separator=(0,T.A)("<div>").addClass("dx-daterangebox-separator").prependTo(this.$element()),this._renderPreventBlurOnSeparatorClick(),Pe?.appendTo(this._$separator)}_renderPreventBlurOnSeparatorClick(){const Pe=(0,h.b4)("mousedown",this.NAME);u.A.off(this._$separator,Pe),u.A.on(this._$separator,Pe,Se=>{this._hasActiveElement()||this.focus(),Se.preventDefault()})}_renderButtonsContainer(){this._buttonCollection=new C.A(this,this._getDefaultButtons()),this._$beforeButtonsContainer=void 0,this._$afterButtonsContainer=void 0;const{buttons:Pe}=this.option();this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(Pe,this.$element()),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(Pe,this.$element())}_updateButtons(Pe){this._buttonCollection.updateButtons(Pe)}_openHandler(){this._toggleOpenState()}_shouldCallOpenHandler(){return!0}_toggleOpenState(){const{opened:Pe}=this.option();Pe||this.getStartDateBox()._focusInput(),this.option("readOnly")||this.option("opened",!this.option("opened"))}_clearValueHandler(Pe){Pe.stopPropagation(),this._saveValueChangeEvent(Pe),this.clear(),!this._isStartDateActiveElement()&&this.focus(),u.A.trigger((0,T.A)(this.startDateField()),"input")}_isClearButtonVisible(){return this.option("showClearButton")&&!this.option("readOnly")}_focusInHandler(Pe){this._shouldSkipFocusEvent(Pe)||super._focusInHandler(Pe)}_focusOutHandler(Pe){this._shouldSkipFocusEvent(Pe)||super._focusOutHandler(Pe)}_shouldSkipFocusEvent(Pe){const{target:Se,relatedTarget:Re}=Pe;return(0,T.A)(Se).is((0,T.A)(this.startDateField()))&&(0,T.A)(Re).is((0,T.A)(this.endDateField()))||(0,T.A)(Se).is((0,T.A)(this.endDateField()))&&(0,T.A)(Re).is((0,T.A)(this.startDateField()))}_getPickerType(){const{pickerType:Pe}=this.option();return["calendar","native"].includes(Pe)?Pe:"calendar"}_getRestErrors(Pe,Se){return Pe.filter(Re=>!Se.some(Fe=>Re.message===Fe.message))}_syncValidationErrors(Pe,Se,Re){Se||(Se=[]),Re||(Re=[]);const Fe=this.option(Pe)||[],Xe=this._getRestErrors(Fe,Re);this.option(Pe,[...Xe,...Se])}_getDateBoxConfig(){const Pe=this.option(),Se={acceptCustomValue:Pe.acceptCustomValue,activeStateEnabled:Pe.activeStateEnabled,applyValueMode:Pe.applyValueMode,dateSerializationFormat:Pe.dateSerializationFormat,deferRendering:Pe.deferRendering,disabled:Pe.disabled,displayFormat:Pe.displayFormat,focusStateEnabled:Pe.focusStateEnabled,isValid:Pe.isValid,tabIndex:Pe.tabIndex,height:Pe.height,hoverStateEnabled:Pe.hoverStateEnabled,labelMode:Pe.labelMode,max:Pe.max,min:Pe.min,openOnFieldClick:Pe.openOnFieldClick,pickerType:this._getPickerType(),readOnly:Pe.readOnly,rtlEnabled:Pe.rtlEnabled,spellcheck:Pe.spellcheck,stylingMode:Pe.stylingMode,type:"date",useMaskBehavior:Pe.useMaskBehavior,validationMessageMode:Pe.validationMessageMode,validationMessagePosition:Pe.validationMessagePosition,valueChangeEvent:Pe.valueChangeEvent,onKeyDown:Pe.onKeyDown,onKeyUp:Pe.onKeyUp,onChange:Pe.onChange,onInput:Pe.onInput,onCut:Pe.onCut,onCopy:Pe.onCopy,onPaste:Pe.onPaste,onEnterKey:Pe.onEnterKey,_dateRangeBoxInstance:this,_showValidationMessage:!1};return(0,a.__)(Ee,(Re,Fe)=>{const Xe=`on${Fe}`;this.hasActionSubscription(Xe)&&(Se[Xe]=tt=>{this._raiseAction(Fe,tt.event)})}),Se}_hideOnOutsideClickHandler(Pe){let{target:Se}=Pe;const Re=(0,T.A)(Se),Fe=this.getButton("dropDown"),Xe=Fe?.$element(),tt=!!Re.closest((0,T.A)(this.element())).length,vt=!!Re.closest(Xe).length;return!tt&&!vt}_getStartDateBoxConfig(){var Pe;const Se=this.option();return(0,o.A)({},this._getDateBoxConfig(),{applyButtonText:Se.applyButtonText,calendarOptions:Se.calendarOptions,cancelButtonText:Se.cancelButtonText,dateOutOfRangeMessage:Se.startDateOutOfRangeMessage,deferRendering:Se.deferRendering,disabledDates:null===(Pe=Se.dropDownOptions)||void 0===Pe?void 0:Pe.disabledDates,dropDownOptions:(0,o.A)({showTitle:!1,title:"",hideOnOutsideClick:Re=>this._hideOnOutsideClickHandler(Re),hideOnParentScroll:!1,preventScrollEvents:!1},Se.dropDownOptions),invalidDateMessage:Se.invalidStartDateMessage,onValueChanged:Re=>{let{value:Fe,event:Xe}=Re;const tt=[Fe,this.option("value")[1]];this.updateValue(tt,Xe)},opened:Se.opened,onOpened:()=>{this._raiseOpenAction()},onClosed:()=>{this._raiseCloseAction()},onOptionChanged:Re=>{const{name:Fe,value:Xe,previousValue:tt}=Re;"text"===Fe&&this.option("startDateText",Xe),"validationErrors"===Fe&&this._syncValidationErrors("_internalValidationErrors",Xe,tt)},todayButtonText:Se.todayButtonText,showClearButton:!1,showDropDownButton:!1,value:this.option("value")[0],label:Se.startDateLabel,placeholder:Se.startDatePlaceholder,inputAttr:Se.startDateInputAttr,name:Se.startDateName,_showValidationIcon:!1})}_getEndDateBoxConfig(){const Pe=this.option();return(0,o.A)({},this._getDateBoxConfig(),{invalidDateMessage:Pe.invalidEndDateMessage,dateOutOfRangeMessage:Pe.endDateOutOfRangeMessage,onValueChanged:Se=>{let{value:Re,event:Fe}=Se;const Xe=[this.option("value")[0],Re];this.updateValue(Xe,Fe)},onOptionChanged:Se=>{const{name:Re,value:Fe,previousValue:Xe}=Se;"text"===Re&&this.option("endDateText",Fe),"validationErrors"===Re&&this._syncValidationErrors("_internalValidationErrors",Fe,Xe)},opened:Pe.opened,showClearButton:!1,showDropDownButton:!1,value:this.option("value")[1],label:Pe.endDateLabel,placeholder:Pe.endDatePlaceholder,deferRendering:!0,inputAttr:Pe.endDateInputAttr,name:Pe.endDateName})}_getValidationMessagePosition(){const{validationMessagePosition:Pe}=this.option();return"auto"===Pe?this.option("opened")?"top":"bottom":Pe}_getSerializedDates(Pe){let[Se,Re]=Pe;return[this.getStartDateBox()._serializeDate(N(Se)),this.getStartDateBox()._serializeDate(N(Re))]}updateValue(Pe,Se){k(Pe,this.option("value"))||(Se&&this._saveValueChangeEvent(Se),this.option("value",this._getSerializedDates(Pe)))}_updateDateBoxesValue(Pe){const Se=this.getStartDateBox(),Re=this.getEndDateBox(),[Fe,Xe]=Pe,tt=Se.option("value"),vt=Re.option("value");G(Fe,tt)||Se.option("value",Fe),G(Xe,vt)||Re.option("value",Xe)}_renderAccessKey(){const Pe=(0,T.A)(this.field()[0]),{accessKey:Se}=this.option();Pe.attr("accesskey",Se)}_focusTarget(){return(0,T.A)(this.element()).find(".dx-texteditor-input")}_focusEventTarget(){return this.element()}_focusClassTarget(){return this.$element()}_toggleFocusClass(Pe,Se){super._toggleFocusClass(Pe,this._focusClassTarget(Se))}_hasActiveElement(){return this._isStartDateActiveElement()||this._isEndDateActiveElement()}_isStartDateActiveElement(){return this._isActiveElement(this.startDateField())}_isEndDateActiveElement(){return this._isActiveElement(this.endDateField())}_isActiveElement(Pe){return(0,T.A)(Pe).is((0,T.A)(S.A.getActiveElement(Pe)))}_popupContentIdentifier(Pe){return Pe&&(this._popupContentId=Pe),this._popupContentId}_setAriaAttributes(){const{opened:Pe}=this.option(),Se={expanded:Pe,controls:this._popupContentIdentifier()},Re=Pe?this._popupContentIdentifier():void 0;this.setAria(Se),this.setAria("owns",Re,this.$element())}_cleanButtonContainers(){var Pe,Se;null===(Pe=this._$beforeButtonsContainer)||void 0===Pe||Pe.remove(),null===(Se=this._$afterButtonsContainer)||void 0===Se||Se.remove(),this._buttonCollection.clean(),this._$beforeButtonsContainer=void 0,this._$afterButtonsContainer=void 0}_applyCustomValidation(Pe){this.validationRequest.fire({editor:this,value:Pe})}_clean(){var Pe,Se,Re;this._cleanButtonContainers(),null===(Pe=this._$startDateBox)||void 0===Pe||Pe.remove(),null===(Se=this._$endDateBox)||void 0===Se||Se.remove(),null===(Re=this._$separator)||void 0===Re||Re.remove(),super._clean()}_optionChanged(Pe){const{name:Se,fullName:Re,value:Fe,previousValue:Xe}=Pe;switch(Se){case"acceptCustomValue":case"dateSerializationFormat":case"displayFormat":case"max":case"min":case"openOnFieldClick":case"spellcheck":case"useMaskBehavior":case"valueChangeEvent":this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe);break;case"rtlEnabled":default:super._optionChanged(Pe);break;case"labelMode":this._toggleEditorLabelClass(),this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe);break;case"applyButtonText":case"applyValueMode":case"cancelButtonText":case"deferRendering":case"disabledDates":case"todayButtonText":this.getStartDateBox().option(Se,Fe);break;case"opened":this._toggleDropDownEditorActiveClass(),this.getStartDateBox().option(Se,Fe),this.getEndDateBox()._setOptionWithoutOptionChange(Se,Fe);break;case"buttons":this._cleanButtonContainers(),this._renderButtonsContainer();break;case"calendarOptions":case"dropDownOptions":this.getStartDateBox().option(Re,Fe);break;case"pickerType":{const tt=this._getPickerType();this.getStartDateBox().option(Se,tt),this.getEndDateBox().option(Se,tt);break}case"height":this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe),super._optionChanged(Pe);break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"showClearButton":this._updateButtons(["clear"]);break;case"endDate":this.updateValue([this.option("value")[0],Fe]);break;case"startDateLabel":this._toggleEditorLabelClass(),this.getStartDateBox().option("label",Fe);break;case"endDateLabel":this._toggleEditorLabelClass(),this.getEndDateBox().option("label",Fe);break;case"startDatePlaceholder":this.getStartDateBox().option("placeholder",Fe);break;case"endDatePlaceholder":this.getEndDateBox().option("placeholder",Fe);break;case"startDateInputAttr":this.getStartDateBox().option("inputAttr",Fe);break;case"startDateName":this.getStartDateBox().option("name",Fe);break;case"endDateInputAttr":this.getEndDateBox().option("inputAttr",Fe);break;case"endDateName":this.getEndDateBox().option("name",Fe);break;case"multiView":this.getStartDateBox().option("calendarOptions.viewsCount",Fe?2:1);break;case"tabIndex":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":super._optionChanged(Pe),this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe);break;case"onValueChanged":this._createValueChangeAction();break;case"onOpened":this._createOpenAction();break;case"onClosed":this._createCloseAction();break;case"onKeyDown":case"onKeyUp":case"onChange":case"onInput":case"onCut":case"onCopy":case"onPaste":case"onEnterKey":this._createEventAction(Se.replace("on",""));break;case"readOnly":case"disabled":this._updateButtons(),super._optionChanged(Pe),this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe);break;case"disableOutOfRangeSelection":case"startDateText":case"endDateText":case"useHiddenSubmitElement":case"_currentSelection":break;case"startDate":this.updateValue([Fe,this.option("value")[1]]);break;case"stylingMode":this._renderStylingMode(),this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe);break;case"invalidStartDateMessage":this.getStartDateBox().option("invalidDateMessage",Fe);break;case"invalidEndDateMessage":this.getEndDateBox().option("invalidDateMessage",Fe);break;case"startDateOutOfRangeMessage":this.getStartDateBox().option("dateOutOfRangeMessage",Fe);break;case"endDateOutOfRangeMessage":this.getEndDateBox().option("dateOutOfRangeMessage",Fe);break;case"validationMessagePosition":this.getStartDateBox().option(Se,Fe),super._optionChanged(Pe);break;case"_internalValidationErrors":{this._syncValidationErrors("validationErrors",Fe,Xe);const tt=this.option("validationErrors");this.option("isValid",!(null!=tt&&tt.length));break}case"isValid":{this.getStartDateBox().option(Se,Fe),this.getEndDateBox().option(Se,Fe);const tt=Fe&&!this.option("_internalValidationErrors").length;if(this._shouldSkipIsValidChange||tt===Fe)return void super._optionChanged(Pe);this._shouldSkipIsValidChange=!0,this.option("isValid",tt),this._shouldSkipIsValidChange=!1;break}case"validationErrors":{const tt=this.option("_internalValidationErrors")||[],At=[...this._getRestErrors(Fe||[],tt),...tt],Tt=At.length?At:null;this._options.silent("validationErrors",Tt),super._optionChanged((0,o.A)({},Pe,{value:Tt}));break}case"value":{const tt=(Ye=>{const[Pe,Se]=Ye;return Pe&&Se&&N(Pe)>N(Se)?[Se,Pe]:Ye})(Fe);if(!k(tt,Xe)){const vt=!k(tt,this._initialValue);this.option("isDirty",vt),this._setOptionWithoutOptionChange("value",tt),this._setOptionWithoutOptionChange("startDate",tt[0]),this._setOptionWithoutOptionChange("endDate",tt[1]),this._applyCustomValidation(tt),this._updateDateBoxesValue(tt),this.getStartDateBox().getStrategy().renderValue(),this._toggleEmptinessState(),this._raiseValueChangeAction(tt,Xe),this._saveValueChangeEvent(void 0)}break}}}getStartDateBox(){return this._startDateBox}getEndDateBox(){return this._endDateBox}getButton(Pe){return this._buttonCollection.getButton(Pe)}open(){this.option("opened",!0)}close(){this.option("opened",!1)}content(){return this.getStartDateBox().content()}field(){return[this.startDateField(),this.endDateField()]}startDateField(){return this.getStartDateBox().field()}endDateField(){return this.getEndDateBox().field()}focus(){this.getStartDateBox().focus()}reset(){super.reset();const Pe=this.getStartDateBox(),Se=this.getEndDateBox();Pe.reset(),Se.reset(),Pe._updateInternalValidationState(!0),Se._updateInternalValidationState(!0)}clear(){super.clear(),this.getEndDateBox().clear(),this.getStartDateBox().clear()}}(0,P.A)("dxDateRangeBox",Oe);const $e=Oe;var Be=M(1491),Ue=M(3349),ot=M(8914);const st={provide:Be.kq,useExisting:(0,W.Rfq)(()=>et),multi:!0};let et=(()=>{class Ye extends Ue.ic{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(Se){this._setOption("acceptCustomValue",Se)}get accessKey(){return this._getOption("accessKey")}set accessKey(Se){this._setOption("accessKey",Se)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(Se){this._setOption("activeStateEnabled",Se)}get applyButtonText(){return this._getOption("applyButtonText")}set applyButtonText(Se){this._setOption("applyButtonText",Se)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(Se){this._setOption("applyValueMode",Se)}get buttons(){return this._getOption("buttons")}set buttons(Se){this._setOption("buttons",Se)}get calendarOptions(){return this._getOption("calendarOptions")}set calendarOptions(Se){this._setOption("calendarOptions",Se)}get cancelButtonText(){return this._getOption("cancelButtonText")}set cancelButtonText(Se){this._setOption("cancelButtonText",Se)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(Se){this._setOption("dateSerializationFormat",Se)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(Se){this._setOption("deferRendering",Se)}get disabled(){return this._getOption("disabled")}set disabled(Se){this._setOption("disabled",Se)}get disableOutOfRangeSelection(){return this._getOption("disableOutOfRangeSelection")}set disableOutOfRangeSelection(Se){this._setOption("disableOutOfRangeSelection",Se)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(Se){this._setOption("displayFormat",Se)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(Se){this._setOption("dropDownButtonTemplate",Se)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(Se){this._setOption("dropDownOptions",Se)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(Se){this._setOption("elementAttr",Se)}get endDate(){return this._getOption("endDate")}set endDate(Se){this._setOption("endDate",Se)}get endDateInputAttr(){return this._getOption("endDateInputAttr")}set endDateInputAttr(Se){this._setOption("endDateInputAttr",Se)}get endDateLabel(){return this._getOption("endDateLabel")}set endDateLabel(Se){this._setOption("endDateLabel",Se)}get endDateName(){return this._getOption("endDateName")}set endDateName(Se){this._setOption("endDateName",Se)}get endDateOutOfRangeMessage(){return this._getOption("endDateOutOfRangeMessage")}set endDateOutOfRangeMessage(Se){this._setOption("endDateOutOfRangeMessage",Se)}get endDatePlaceholder(){return this._getOption("endDatePlaceholder")}set endDatePlaceholder(Se){this._setOption("endDatePlaceholder",Se)}get endDateText(){return this._getOption("endDateText")}set endDateText(Se){this._setOption("endDateText",Se)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(Se){this._setOption("focusStateEnabled",Se)}get height(){return this._getOption("height")}set height(Se){this._setOption("height",Se)}get hint(){return this._getOption("hint")}set hint(Se){this._setOption("hint",Se)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(Se){this._setOption("hoverStateEnabled",Se)}get invalidEndDateMessage(){return this._getOption("invalidEndDateMessage")}set invalidEndDateMessage(Se){this._setOption("invalidEndDateMessage",Se)}get invalidStartDateMessage(){return this._getOption("invalidStartDateMessage")}set invalidStartDateMessage(Se){this._setOption("invalidStartDateMessage",Se)}get isDirty(){return this._getOption("isDirty")}set isDirty(Se){this._setOption("isDirty",Se)}get isValid(){return this._getOption("isValid")}set isValid(Se){this._setOption("isValid",Se)}get labelMode(){return this._getOption("labelMode")}set labelMode(Se){this._setOption("labelMode",Se)}get max(){return this._getOption("max")}set max(Se){this._setOption("max",Se)}get min(){return this._getOption("min")}set min(Se){this._setOption("min",Se)}get multiView(){return this._getOption("multiView")}set multiView(Se){this._setOption("multiView",Se)}get opened(){return this._getOption("opened")}set opened(Se){this._setOption("opened",Se)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(Se){this._setOption("openOnFieldClick",Se)}get readOnly(){return this._getOption("readOnly")}set readOnly(Se){this._setOption("readOnly",Se)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(Se){this._setOption("rtlEnabled",Se)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(Se){this._setOption("showClearButton",Se)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(Se){this._setOption("showDropDownButton",Se)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(Se){this._setOption("spellcheck",Se)}get startDate(){return this._getOption("startDate")}set startDate(Se){this._setOption("startDate",Se)}get startDateInputAttr(){return this._getOption("startDateInputAttr")}set startDateInputAttr(Se){this._setOption("startDateInputAttr",Se)}get startDateLabel(){return this._getOption("startDateLabel")}set startDateLabel(Se){this._setOption("startDateLabel",Se)}get startDateName(){return this._getOption("startDateName")}set startDateName(Se){this._setOption("startDateName",Se)}get startDateOutOfRangeMessage(){return this._getOption("startDateOutOfRangeMessage")}set startDateOutOfRangeMessage(Se){this._setOption("startDateOutOfRangeMessage",Se)}get startDatePlaceholder(){return this._getOption("startDatePlaceholder")}set startDatePlaceholder(Se){this._setOption("startDatePlaceholder",Se)}get startDateText(){return this._getOption("startDateText")}set startDateText(Se){this._setOption("startDateText",Se)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(Se){this._setOption("stylingMode",Se)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(Se){this._setOption("tabIndex",Se)}get todayButtonText(){return this._getOption("todayButtonText")}set todayButtonText(Se){this._setOption("todayButtonText",Se)}get useMaskBehavior(){return this._getOption("useMaskBehavior")}set useMaskBehavior(Se){this._setOption("useMaskBehavior",Se)}get validationError(){return this._getOption("validationError")}set validationError(Se){this._setOption("validationError",Se)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(Se){this._setOption("validationErrors",Se)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(Se){this._setOption("validationMessageMode",Se)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(Se){this._setOption("validationMessagePosition",Se)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(Se){this._setOption("validationStatus",Se)}get value(){return this._getOption("value")}set value(Se){this._setOption("value",Se)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(Se){this._setOption("valueChangeEvent",Se)}get visible(){return this._getOption("visible")}set visible(Se){this._setOption("visible",Se)}get width(){return this._getOption("width")}set width(Se){this._setOption("width",Se)}onChange;onClosed;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;applyButtonTextChange;applyValueModeChange;buttonsChange;calendarOptionsChange;cancelButtonTextChange;dateSerializationFormatChange;deferRenderingChange;disabledChange;disableOutOfRangeSelectionChange;displayFormatChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;endDateChange;endDateInputAttrChange;endDateLabelChange;endDateNameChange;endDateOutOfRangeMessageChange;endDatePlaceholderChange;endDateTextChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;invalidEndDateMessageChange;invalidStartDateMessageChange;isDirtyChange;isValidChange;labelModeChange;maxChange;minChange;multiViewChange;openedChange;openOnFieldClickChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showDropDownButtonChange;spellcheckChange;startDateChange;startDateInputAttrChange;startDateLabelChange;startDateNameChange;startDateOutOfRangeMessageChange;startDatePlaceholderChange;startDateTextChange;stylingModeChange;tabIndexChange;todayButtonTextChange;useMaskBehaviorChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(Se){}touched=Se=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(Se){this.setChildren("buttons",Se)}constructor(Se,Re,Fe,Xe,tt,vt,qe,At){super(Se,Re,Fe,Xe,qe,At),this._watcherHelper=Xe,this._idh=tt,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"applyButtonTextChange"},{emit:"applyValueModeChange"},{emit:"buttonsChange"},{emit:"calendarOptionsChange"},{emit:"cancelButtonTextChange"},{emit:"dateSerializationFormatChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"disableOutOfRangeSelectionChange"},{emit:"displayFormatChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"endDateChange"},{emit:"endDateInputAttrChange"},{emit:"endDateLabelChange"},{emit:"endDateNameChange"},{emit:"endDateOutOfRangeMessageChange"},{emit:"endDatePlaceholderChange"},{emit:"endDateTextChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"invalidEndDateMessageChange"},{emit:"invalidStartDateMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelModeChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"multiViewChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"spellcheckChange"},{emit:"startDateChange"},{emit:"startDateInputAttrChange"},{emit:"startDateLabelChange"},{emit:"startDateNameChange"},{emit:"startDateOutOfRangeMessageChange"},{emit:"startDatePlaceholderChange"},{emit:"startDateTextChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"todayButtonTextChange"},{emit:"useMaskBehaviorChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),vt.setHost(this)}_createInstance(Se,Re){return new $e(Se,Re)}writeValue(Se){this.eventHelper.lockedValueChangeEvent=!0,this.value=Se,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(Se){this.disabled=Se}registerOnChange(Se){this.change=Se}registerOnTouched(Se){this.touched=Se}_createWidget(Se){super._createWidget(Se),this.instance.on("focusOut",Re=>{this.eventHelper.fireNgEvent("onBlur",[Re])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(Se){super.ngOnChanges(Se),this.setupChanges("buttons",Se),this.setupChanges("validationErrors",Se),this.setupChanges("value",Se)}setupChanges(Se,Re){Se in this._optionsToUpdate||this._idh.setup(Se,Re)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(Se,Re){let Fe=this._idh.setupSingle(Se,Re),Xe=null!==this._idh.getChanges(Se,Re);(Fe||Xe)&&super._setOption(Se,Re)}static \u0275fac=function(Re){return new(Re||Ye)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(Ue.zF),W.rXU(Ue.jS),W.rXU(Ue.$M),W.rXU(Ue.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:Ye,selectors:[["dx-date-range-box"]],contentQueries:function(Re,Fe,Xe){if(1&Re&&W.wni(Xe,ot.BrI,4),2&Re){let tt;W.mGM(tt=W.lsd())&&(Fe.buttonsChildren=tt)}},hostBindings:function(Re,Fe){1&Re&&W.bIt("valueChange",function(tt){return Fe.change(tt)})("onBlur",function(tt){return Fe.touched(tt)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",applyButtonText:"applyButtonText",applyValueMode:"applyValueMode",buttons:"buttons",calendarOptions:"calendarOptions",cancelButtonText:"cancelButtonText",dateSerializationFormat:"dateSerializationFormat",deferRendering:"deferRendering",disabled:"disabled",disableOutOfRangeSelection:"disableOutOfRangeSelection",displayFormat:"displayFormat",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",endDate:"endDate",endDateInputAttr:"endDateInputAttr",endDateLabel:"endDateLabel",endDateName:"endDateName",endDateOutOfRangeMessage:"endDateOutOfRangeMessage",endDatePlaceholder:"endDatePlaceholder",endDateText:"endDateText",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",invalidEndDateMessage:"invalidEndDateMessage",invalidStartDateMessage:"invalidStartDateMessage",isDirty:"isDirty",isValid:"isValid",labelMode:"labelMode",max:"max",min:"min",multiView:"multiView",opened:"opened",openOnFieldClick:"openOnFieldClick",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",spellcheck:"spellcheck",startDate:"startDate",startDateInputAttr:"startDateInputAttr",startDateLabel:"startDateLabel",startDateName:"startDateName",startDateOutOfRangeMessage:"startDateOutOfRangeMessage",startDatePlaceholder:"startDatePlaceholder",startDateText:"startDateText",stylingMode:"stylingMode",tabIndex:"tabIndex",todayButtonText:"todayButtonText",useMaskBehavior:"useMaskBehavior",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",applyButtonTextChange:"applyButtonTextChange",applyValueModeChange:"applyValueModeChange",buttonsChange:"buttonsChange",calendarOptionsChange:"calendarOptionsChange",cancelButtonTextChange:"cancelButtonTextChange",dateSerializationFormatChange:"dateSerializationFormatChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",disableOutOfRangeSelectionChange:"disableOutOfRangeSelectionChange",displayFormatChange:"displayFormatChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",endDateChange:"endDateChange",endDateInputAttrChange:"endDateInputAttrChange",endDateLabelChange:"endDateLabelChange",endDateNameChange:"endDateNameChange",endDateOutOfRangeMessageChange:"endDateOutOfRangeMessageChange",endDatePlaceholderChange:"endDatePlaceholderChange",endDateTextChange:"endDateTextChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",invalidEndDateMessageChange:"invalidEndDateMessageChange",invalidStartDateMessageChange:"invalidStartDateMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelModeChange:"labelModeChange",maxChange:"maxChange",minChange:"minChange",multiViewChange:"multiViewChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",spellcheckChange:"spellcheckChange",startDateChange:"startDateChange",startDateInputAttrChange:"startDateInputAttrChange",startDateLabelChange:"startDateLabelChange",startDateNameChange:"startDateNameChange",startDateOutOfRangeMessageChange:"startDateOutOfRangeMessageChange",startDatePlaceholderChange:"startDatePlaceholderChange",startDateTextChange:"startDateTextChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",todayButtonTextChange:"todayButtonTextChange",useMaskBehaviorChange:"useMaskBehaviorChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([Ue.zF,Ue.jS,st,Ue.fH,Ue.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(Re,Fe){},encapsulation:2})}return Ye})(),Ke=(()=>{class Ye{static \u0275fac=function(Re){return new(Re||Ye)};static \u0275mod=W.$C({type:Ye});static \u0275inj=W.G2t({imports:[ot.GIV,ot.u4t,ot.QWP,ot.f8z,ot.df_,ot.YLo,ot.YaD,ot.eNx,ot.Bkf,ot.nwt,ot.hXw,ot.YGc,ot.gf0,ot.rvW,ot.Tob,ot.$Ql,ot.isg,Ue.p_,Ue.xZ,ot.GIV,ot.u4t,ot.QWP,ot.f8z,ot.df_,ot.YLo,ot.YaD,ot.eNx,ot.Bkf,ot.nwt,ot.hXw,ot.YGc,ot.gf0,ot.rvW,ot.Tob,ot.$Ql,ot.isg,Ue.xZ]})}return Ye})()},7316:(In,Ze,M)=>{"use strict";M.d(Ze,{b:()=>f,i:()=>S});var W=M(7788),o=M(215),P=M(3349);const b=["*"];let f=(()=>{class T extends P.ic{instance=null;get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get animationDuration(){return this._getOption("animationDuration")}set animationDuration(d){this._setOption("animationDuration",d)}get animationEnabled(){return this._getOption("animationEnabled")}set animationEnabled(d){this._setOption("animationEnabled",d)}get closeOnOutsideClick(){return this._getOption("closeOnOutsideClick")}set closeOnOutsideClick(d){this._setOption("closeOnOutsideClick",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get maxSize(){return this._getOption("maxSize")}set maxSize(d){this._setOption("maxSize",d)}get minSize(){return this._getOption("minSize")}set minSize(d){this._setOption("minSize",d)}get opened(){return this._getOption("opened")}set opened(d){this._setOption("opened",d)}get openedStateMode(){return this._getOption("openedStateMode")}set openedStateMode(d){this._setOption("openedStateMode",d)}get position(){return this._getOption("position")}set position(d){this._setOption("position",d)}get revealMode(){return this._getOption("revealMode")}set revealMode(d){this._setOption("revealMode",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get shading(){return this._getOption("shading")}set shading(d){this._setOption("shading",d)}get template(){return this._getOption("template")}set template(d){this._setOption("template",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onDisposing;onInitialized;onOptionChanged;activeStateEnabledChange;animationDurationChange;animationEnabledChange;closeOnOutsideClickChange;disabledChange;elementAttrChange;heightChange;hintChange;hoverStateEnabledChange;maxSizeChange;minSizeChange;openedChange;openedStateModeChange;positionChange;revealModeChange;rtlEnabledChange;shadingChange;templateChange;visibleChange;widthChange;constructor(d,c,s,a,u,h,g){super(d,c,s,a,h,g),this._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{emit:"activeStateEnabledChange"},{emit:"animationDurationChange"},{emit:"animationEnabledChange"},{emit:"closeOnOutsideClickChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"maxSizeChange"},{emit:"minSizeChange"},{emit:"openedChange"},{emit:"openedStateModeChange"},{emit:"positionChange"},{emit:"revealModeChange"},{emit:"rtlEnabledChange"},{emit:"shadingChange"},{emit:"templateChange"},{emit:"visibleChange"},{emit:"widthChange"}]),u.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-drawer"]],inputs:{activeStateEnabled:"activeStateEnabled",animationDuration:"animationDuration",animationEnabled:"animationEnabled",closeOnOutsideClick:"closeOnOutsideClick",disabled:"disabled",elementAttr:"elementAttr",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",maxSize:"maxSize",minSize:"minSize",opened:"opened",openedStateMode:"openedStateMode",position:"position",revealMode:"revealMode",rtlEnabled:"rtlEnabled",shading:"shading",template:"template",visible:"visible",width:"width"},outputs:{onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",activeStateEnabledChange:"activeStateEnabledChange",animationDurationChange:"animationDurationChange",animationEnabledChange:"animationEnabledChange",closeOnOutsideClickChange:"closeOnOutsideClickChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",maxSizeChange:"maxSizeChange",minSizeChange:"minSizeChange",openedChange:"openedChange",openedStateModeChange:"openedStateModeChange",positionChange:"positionChange",revealModeChange:"revealModeChange",rtlEnabledChange:"rtlEnabledChange",shadingChange:"shadingChange",templateChange:"templateChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH]),W.Vt3],ngContentSelectors:b,decls:1,vars:0,template:function(c,s){1&c&&(W.NAR(),W.SdG(0))},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[P.p_,P.xZ,P.xZ]})}return T})()},3486:(In,Ze,M)=>{"use strict";M.d(Ze,{h:()=>f,m:()=>S});var W=M(7788),o=M(4083),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get dataSource(){return this._getOption("dataSource")}set dataSource(d){this._setOption("dataSource",d)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(d){this._setOption("deferRendering",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(d){this._setOption("displayExpr",d)}get dropDownContentTemplate(){return this._getOption("dropDownContentTemplate")}set dropDownContentTemplate(d){this._setOption("dropDownContentTemplate",d)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(d){this._setOption("dropDownOptions",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get icon(){return this._getOption("icon")}set icon(d){this._setOption("icon",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(d){this._setOption("itemTemplate",d)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(d){this._setOption("keyExpr",d)}get noDataText(){return this._getOption("noDataText")}set noDataText(d){this._setOption("noDataText",d)}get opened(){return this._getOption("opened")}set opened(d){this._setOption("opened",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(d){this._setOption("selectedItem",d)}get selectedItemKey(){return this._getOption("selectedItemKey")}set selectedItemKey(d){this._setOption("selectedItemKey",d)}get showArrowIcon(){return this._getOption("showArrowIcon")}set showArrowIcon(d){this._setOption("showArrowIcon",d)}get splitButton(){return this._getOption("splitButton")}set splitButton(d){this._setOption("splitButton",d)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(d){this._setOption("stylingMode",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get template(){return this._getOption("template")}set template(d){this._setOption("template",d)}get text(){return this._getOption("text")}set text(d){this._setOption("text",d)}get type(){return this._getOption("type")}set type(d){this._setOption("type",d)}get useItemTextAsTitle(){return this._getOption("useItemTextAsTitle")}set useItemTextAsTitle(d){this._setOption("useItemTextAsTitle",d)}get useSelectMode(){return this._getOption("useSelectMode")}set useSelectMode(d){this._setOption("useSelectMode",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}get wrapItemText(){return this._getOption("wrapItemText")}set wrapItemText(d){this._setOption("wrapItemText",d)}onButtonClick;onContentReady;onDisposing;onInitialized;onItemClick;onOptionChanged;onSelectionChanged;accessKeyChange;activeStateEnabledChange;dataSourceChange;deferRenderingChange;disabledChange;displayExprChange;dropDownContentTemplateChange;dropDownOptionsChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;iconChange;itemsChange;itemTemplateChange;keyExprChange;noDataTextChange;openedChange;rtlEnabledChange;selectedItemChange;selectedItemKeyChange;showArrowIconChange;splitButtonChange;stylingModeChange;tabIndexChange;templateChange;textChange;typeChange;useItemTextAsTitleChange;useSelectModeChange;visibleChange;widthChange;wrapItemTextChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"buttonClick",emit:"onButtonClick"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"dropDownContentTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"iconChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"keyExprChange"},{emit:"noDataTextChange"},{emit:"openedChange"},{emit:"rtlEnabledChange"},{emit:"selectedItemChange"},{emit:"selectedItemKeyChange"},{emit:"showArrowIconChange"},{emit:"splitButtonChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"templateChange"},{emit:"textChange"},{emit:"typeChange"},{emit:"useItemTextAsTitleChange"},{emit:"useSelectModeChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapItemTextChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("dataSource",d),this.setupChanges("items",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-drop-down-button"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayExpr:"displayExpr",dropDownContentTemplate:"dropDownContentTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",icon:"icon",items:"items",itemTemplate:"itemTemplate",keyExpr:"keyExpr",noDataText:"noDataText",opened:"opened",rtlEnabled:"rtlEnabled",selectedItem:"selectedItem",selectedItemKey:"selectedItemKey",showArrowIcon:"showArrowIcon",splitButton:"splitButton",stylingMode:"stylingMode",tabIndex:"tabIndex",template:"template",text:"text",type:"type",useItemTextAsTitle:"useItemTextAsTitle",useSelectMode:"useSelectMode",visible:"visible",width:"width",wrapItemText:"wrapItemText"},outputs:{onButtonClick:"onButtonClick",onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",dropDownContentTemplateChange:"dropDownContentTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",iconChange:"iconChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",keyExprChange:"keyExprChange",noDataTextChange:"noDataTextChange",openedChange:"openedChange",rtlEnabledChange:"rtlEnabledChange",selectedItemChange:"selectedItemChange",selectedItemKeyChange:"selectedItemKeyChange",showArrowIconChange:"showArrowIconChange",splitButtonChange:"splitButtonChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",templateChange:"templateChange",textChange:"textChange",typeChange:"typeChange",useItemTextAsTitleChange:"useItemTextAsTitleChange",useSelectModeChange:"useSelectModeChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapItemTextChange:"wrapItemTextChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.df_,b.YLo,b.YaD,b.eNx,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b.Tob,b.$Ql,b.isg,b.POb,P.p_,P.xZ,b.df_,b.YLo,b.YaD,b.eNx,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b.Tob,b.$Ql,b.isg,b.POb,P.xZ]})}return T})()},6511:(In,Ze,M)=>{"use strict";M.d(Ze,{b:()=>T,m:()=>S});var W=M(7788),o=M(5730),P=M(1491),b=M(3349);const f={provide:P.kq,useExisting:(0,W.Rfq)(()=>S),multi:!0};let S=(()=>{class y extends b.ic{_watcherHelper;_idh;instance=null;get abortUpload(){return this._getOption("abortUpload")}set abortUpload(c){this._setOption("abortUpload",c)}get accept(){return this._getOption("accept")}set accept(c){this._setOption("accept",c)}get accessKey(){return this._getOption("accessKey")}set accessKey(c){this._setOption("accessKey",c)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(c){this._setOption("activeStateEnabled",c)}get allowCanceling(){return this._getOption("allowCanceling")}set allowCanceling(c){this._setOption("allowCanceling",c)}get allowedFileExtensions(){return this._getOption("allowedFileExtensions")}set allowedFileExtensions(c){this._setOption("allowedFileExtensions",c)}get chunkSize(){return this._getOption("chunkSize")}set chunkSize(c){this._setOption("chunkSize",c)}get dialogTrigger(){return this._getOption("dialogTrigger")}set dialogTrigger(c){this._setOption("dialogTrigger",c)}get disabled(){return this._getOption("disabled")}set disabled(c){this._setOption("disabled",c)}get dropZone(){return this._getOption("dropZone")}set dropZone(c){this._setOption("dropZone",c)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(c){this._setOption("elementAttr",c)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(c){this._setOption("focusStateEnabled",c)}get height(){return this._getOption("height")}set height(c){this._setOption("height",c)}get hint(){return this._getOption("hint")}set hint(c){this._setOption("hint",c)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(c){this._setOption("hoverStateEnabled",c)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(c){this._setOption("inputAttr",c)}get invalidFileExtensionMessage(){return this._getOption("invalidFileExtensionMessage")}set invalidFileExtensionMessage(c){this._setOption("invalidFileExtensionMessage",c)}get invalidMaxFileSizeMessage(){return this._getOption("invalidMaxFileSizeMessage")}set invalidMaxFileSizeMessage(c){this._setOption("invalidMaxFileSizeMessage",c)}get invalidMinFileSizeMessage(){return this._getOption("invalidMinFileSizeMessage")}set invalidMinFileSizeMessage(c){this._setOption("invalidMinFileSizeMessage",c)}get isDirty(){return this._getOption("isDirty")}set isDirty(c){this._setOption("isDirty",c)}get isValid(){return this._getOption("isValid")}set isValid(c){this._setOption("isValid",c)}get labelText(){return this._getOption("labelText")}set labelText(c){this._setOption("labelText",c)}get maxFileSize(){return this._getOption("maxFileSize")}set maxFileSize(c){this._setOption("maxFileSize",c)}get minFileSize(){return this._getOption("minFileSize")}set minFileSize(c){this._setOption("minFileSize",c)}get multiple(){return this._getOption("multiple")}set multiple(c){this._setOption("multiple",c)}get name(){return this._getOption("name")}set name(c){this._setOption("name",c)}get progress(){return this._getOption("progress")}set progress(c){this._setOption("progress",c)}get readOnly(){return this._getOption("readOnly")}set readOnly(c){this._setOption("readOnly",c)}get readyToUploadMessage(){return this._getOption("readyToUploadMessage")}set readyToUploadMessage(c){this._setOption("readyToUploadMessage",c)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(c){this._setOption("rtlEnabled",c)}get selectButtonText(){return this._getOption("selectButtonText")}set selectButtonText(c){this._setOption("selectButtonText",c)}get showFileList(){return this._getOption("showFileList")}set showFileList(c){this._setOption("showFileList",c)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(c){this._setOption("tabIndex",c)}get uploadAbortedMessage(){return this._getOption("uploadAbortedMessage")}set uploadAbortedMessage(c){this._setOption("uploadAbortedMessage",c)}get uploadButtonText(){return this._getOption("uploadButtonText")}set uploadButtonText(c){this._setOption("uploadButtonText",c)}get uploadChunk(){return this._getOption("uploadChunk")}set uploadChunk(c){this._setOption("uploadChunk",c)}get uploadCustomData(){return this._getOption("uploadCustomData")}set uploadCustomData(c){this._setOption("uploadCustomData",c)}get uploadedMessage(){return this._getOption("uploadedMessage")}set uploadedMessage(c){this._setOption("uploadedMessage",c)}get uploadFailedMessage(){return this._getOption("uploadFailedMessage")}set uploadFailedMessage(c){this._setOption("uploadFailedMessage",c)}get uploadFile(){return this._getOption("uploadFile")}set uploadFile(c){this._setOption("uploadFile",c)}get uploadHeaders(){return this._getOption("uploadHeaders")}set uploadHeaders(c){this._setOption("uploadHeaders",c)}get uploadMethod(){return this._getOption("uploadMethod")}set uploadMethod(c){this._setOption("uploadMethod",c)}get uploadMode(){return this._getOption("uploadMode")}set uploadMode(c){this._setOption("uploadMode",c)}get uploadUrl(){return this._getOption("uploadUrl")}set uploadUrl(c){this._setOption("uploadUrl",c)}get validationError(){return this._getOption("validationError")}set validationError(c){this._setOption("validationError",c)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(c){this._setOption("validationErrors",c)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(c){this._setOption("validationStatus",c)}get value(){return this._getOption("value")}set value(c){this._setOption("value",c)}get visible(){return this._getOption("visible")}set visible(c){this._setOption("visible",c)}get width(){return this._getOption("width")}set width(c){this._setOption("width",c)}onBeforeSend;onContentReady;onDisposing;onDropZoneEnter;onDropZoneLeave;onFilesUploaded;onInitialized;onOptionChanged;onProgress;onUploadAborted;onUploaded;onUploadError;onUploadStarted;onValueChanged;abortUploadChange;acceptChange;accessKeyChange;activeStateEnabledChange;allowCancelingChange;allowedFileExtensionsChange;chunkSizeChange;dialogTriggerChange;disabledChange;dropZoneChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;invalidFileExtensionMessageChange;invalidMaxFileSizeMessageChange;invalidMinFileSizeMessageChange;isDirtyChange;isValidChange;labelTextChange;maxFileSizeChange;minFileSizeChange;multipleChange;nameChange;progressChange;readOnlyChange;readyToUploadMessageChange;rtlEnabledChange;selectButtonTextChange;showFileListChange;tabIndexChange;uploadAbortedMessageChange;uploadButtonTextChange;uploadChunkChange;uploadCustomDataChange;uploadedMessageChange;uploadFailedMessageChange;uploadFileChange;uploadHeadersChange;uploadMethodChange;uploadModeChange;uploadUrlChange;validationErrorChange;validationErrorsChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(c){}touched=c=>{};constructor(c,s,a,u,h,g,_,x){super(c,s,a,u,_,x),this._watcherHelper=u,this._idh=h,this._createEventEmitters([{subscribe:"beforeSend",emit:"onBeforeSend"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"dropZoneEnter",emit:"onDropZoneEnter"},{subscribe:"dropZoneLeave",emit:"onDropZoneLeave"},{subscribe:"filesUploaded",emit:"onFilesUploaded"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"progress",emit:"onProgress"},{subscribe:"uploadAborted",emit:"onUploadAborted"},{subscribe:"uploaded",emit:"onUploaded"},{subscribe:"uploadError",emit:"onUploadError"},{subscribe:"uploadStarted",emit:"onUploadStarted"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"abortUploadChange"},{emit:"acceptChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"allowCancelingChange"},{emit:"allowedFileExtensionsChange"},{emit:"chunkSizeChange"},{emit:"dialogTriggerChange"},{emit:"disabledChange"},{emit:"dropZoneChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"invalidFileExtensionMessageChange"},{emit:"invalidMaxFileSizeMessageChange"},{emit:"invalidMinFileSizeMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelTextChange"},{emit:"maxFileSizeChange"},{emit:"minFileSizeChange"},{emit:"multipleChange"},{emit:"nameChange"},{emit:"progressChange"},{emit:"readOnlyChange"},{emit:"readyToUploadMessageChange"},{emit:"rtlEnabledChange"},{emit:"selectButtonTextChange"},{emit:"showFileListChange"},{emit:"tabIndexChange"},{emit:"uploadAbortedMessageChange"},{emit:"uploadButtonTextChange"},{emit:"uploadChunkChange"},{emit:"uploadCustomDataChange"},{emit:"uploadedMessageChange"},{emit:"uploadFailedMessageChange"},{emit:"uploadFileChange"},{emit:"uploadHeadersChange"},{emit:"uploadMethodChange"},{emit:"uploadModeChange"},{emit:"uploadUrlChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),g.setHost(this)}_createInstance(c,s){return new o.A(c,s)}writeValue(c){this.eventHelper.lockedValueChangeEvent=!0,this.value=c,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(c){this.disabled=c}registerOnChange(c){this.change=c}registerOnTouched(c){this.touched=c}_createWidget(c){super._createWidget(c),this.instance.on("focusOut",s=>{this.eventHelper.fireNgEvent("onBlur",[s])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(c){super.ngOnChanges(c),this.setupChanges("allowedFileExtensions",c),this.setupChanges("validationErrors",c),this.setupChanges("value",c)}setupChanges(c,s){c in this._optionsToUpdate||this._idh.setup(c,s)}ngDoCheck(){this._idh.doCheck("allowedFileExtensions"),this._idh.doCheck("validationErrors"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(c,s){let a=this._idh.setupSingle(c,s),u=null!==this._idh.getChanges(c,s);(a||u)&&super._setOption(c,s)}static \u0275fac=function(s){return new(s||y)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:y,selectors:[["dx-file-uploader"]],hostBindings:function(s,a){1&s&&W.bIt("valueChange",function(h){return a.change(h)})("onBlur",function(h){return a.touched(h)})},inputs:{abortUpload:"abortUpload",accept:"accept",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",allowCanceling:"allowCanceling",allowedFileExtensions:"allowedFileExtensions",chunkSize:"chunkSize",dialogTrigger:"dialogTrigger",disabled:"disabled",dropZone:"dropZone",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",invalidFileExtensionMessage:"invalidFileExtensionMessage",invalidMaxFileSizeMessage:"invalidMaxFileSizeMessage",invalidMinFileSizeMessage:"invalidMinFileSizeMessage",isDirty:"isDirty",isValid:"isValid",labelText:"labelText",maxFileSize:"maxFileSize",minFileSize:"minFileSize",multiple:"multiple",name:"name",progress:"progress",readOnly:"readOnly",readyToUploadMessage:"readyToUploadMessage",rtlEnabled:"rtlEnabled",selectButtonText:"selectButtonText",showFileList:"showFileList",tabIndex:"tabIndex",uploadAbortedMessage:"uploadAbortedMessage",uploadButtonText:"uploadButtonText",uploadChunk:"uploadChunk",uploadCustomData:"uploadCustomData",uploadedMessage:"uploadedMessage",uploadFailedMessage:"uploadFailedMessage",uploadFile:"uploadFile",uploadHeaders:"uploadHeaders",uploadMethod:"uploadMethod",uploadMode:"uploadMode",uploadUrl:"uploadUrl",validationError:"validationError",validationErrors:"validationErrors",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onBeforeSend:"onBeforeSend",onContentReady:"onContentReady",onDisposing:"onDisposing",onDropZoneEnter:"onDropZoneEnter",onDropZoneLeave:"onDropZoneLeave",onFilesUploaded:"onFilesUploaded",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onProgress:"onProgress",onUploadAborted:"onUploadAborted",onUploaded:"onUploaded",onUploadError:"onUploadError",onUploadStarted:"onUploadStarted",onValueChanged:"onValueChanged",abortUploadChange:"abortUploadChange",acceptChange:"acceptChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",allowCancelingChange:"allowCancelingChange",allowedFileExtensionsChange:"allowedFileExtensionsChange",chunkSizeChange:"chunkSizeChange",dialogTriggerChange:"dialogTriggerChange",disabledChange:"disabledChange",dropZoneChange:"dropZoneChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",invalidFileExtensionMessageChange:"invalidFileExtensionMessageChange",invalidMaxFileSizeMessageChange:"invalidMaxFileSizeMessageChange",invalidMinFileSizeMessageChange:"invalidMinFileSizeMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelTextChange:"labelTextChange",maxFileSizeChange:"maxFileSizeChange",minFileSizeChange:"minFileSizeChange",multipleChange:"multipleChange",nameChange:"nameChange",progressChange:"progressChange",readOnlyChange:"readOnlyChange",readyToUploadMessageChange:"readyToUploadMessageChange",rtlEnabledChange:"rtlEnabledChange",selectButtonTextChange:"selectButtonTextChange",showFileListChange:"showFileListChange",tabIndexChange:"tabIndexChange",uploadAbortedMessageChange:"uploadAbortedMessageChange",uploadButtonTextChange:"uploadButtonTextChange",uploadChunkChange:"uploadChunkChange",uploadCustomDataChange:"uploadCustomDataChange",uploadedMessageChange:"uploadedMessageChange",uploadFailedMessageChange:"uploadFailedMessageChange",uploadFileChange:"uploadFileChange",uploadHeadersChange:"uploadHeadersChange",uploadMethodChange:"uploadMethodChange",uploadModeChange:"uploadModeChange",uploadUrlChange:"uploadUrlChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,f,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(s,a){},encapsulation:2})}return y})(),T=(()=>{class y{static \u0275fac=function(s){return new(s||y)};static \u0275mod=W.$C({type:y});static \u0275inj=W.G2t({imports:[b.p_,b.xZ,b.xZ]})}return y})()},3425:(In,Ze,M)=>{"use strict";M.d(Ze,{F:()=>S,o:()=>f});var W=M(7788),o=M(6232),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get alignItemLabels(){return this._getOption("alignItemLabels")}set alignItemLabels(d){this._setOption("alignItemLabels",d)}get alignItemLabelsInAllGroups(){return this._getOption("alignItemLabelsInAllGroups")}set alignItemLabelsInAllGroups(d){this._setOption("alignItemLabelsInAllGroups",d)}get colCount(){return this._getOption("colCount")}set colCount(d){this._setOption("colCount",d)}get colCountByScreen(){return this._getOption("colCountByScreen")}set colCountByScreen(d){this._setOption("colCountByScreen",d)}get customizeItem(){return this._getOption("customizeItem")}set customizeItem(d){this._setOption("customizeItem",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get formData(){return this._getOption("formData")}set formData(d){this._setOption("formData",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get isDirty(){return this._getOption("isDirty")}set isDirty(d){this._setOption("isDirty",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get labelLocation(){return this._getOption("labelLocation")}set labelLocation(d){this._setOption("labelLocation",d)}get labelMode(){return this._getOption("labelMode")}set labelMode(d){this._setOption("labelMode",d)}get minColWidth(){return this._getOption("minColWidth")}set minColWidth(d){this._setOption("minColWidth",d)}get optionalMark(){return this._getOption("optionalMark")}set optionalMark(d){this._setOption("optionalMark",d)}get readOnly(){return this._getOption("readOnly")}set readOnly(d){this._setOption("readOnly",d)}get requiredMark(){return this._getOption("requiredMark")}set requiredMark(d){this._setOption("requiredMark",d)}get requiredMessage(){return this._getOption("requiredMessage")}set requiredMessage(d){this._setOption("requiredMessage",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get screenByWidth(){return this._getOption("screenByWidth")}set screenByWidth(d){this._setOption("screenByWidth",d)}get scrollingEnabled(){return this._getOption("scrollingEnabled")}set scrollingEnabled(d){this._setOption("scrollingEnabled",d)}get showColonAfterLabel(){return this._getOption("showColonAfterLabel")}set showColonAfterLabel(d){this._setOption("showColonAfterLabel",d)}get showOptionalMark(){return this._getOption("showOptionalMark")}set showOptionalMark(d){this._setOption("showOptionalMark",d)}get showRequiredMark(){return this._getOption("showRequiredMark")}set showRequiredMark(d){this._setOption("showRequiredMark",d)}get showValidationSummary(){return this._getOption("showValidationSummary")}set showValidationSummary(d){this._setOption("showValidationSummary",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get validationGroup(){return this._getOption("validationGroup")}set validationGroup(d){this._setOption("validationGroup",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onContentReady;onDisposing;onEditorEnterKey;onFieldDataChanged;onInitialized;onOptionChanged;accessKeyChange;activeStateEnabledChange;alignItemLabelsChange;alignItemLabelsInAllGroupsChange;colCountChange;colCountByScreenChange;customizeItemChange;disabledChange;elementAttrChange;focusStateEnabledChange;formDataChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;itemsChange;labelLocationChange;labelModeChange;minColWidthChange;optionalMarkChange;readOnlyChange;requiredMarkChange;requiredMessageChange;rtlEnabledChange;screenByWidthChange;scrollingEnabledChange;showColonAfterLabelChange;showOptionalMarkChange;showRequiredMarkChange;showValidationSummaryChange;tabIndexChange;validationGroupChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"editorEnterKey",emit:"onEditorEnterKey"},{subscribe:"fieldDataChanged",emit:"onFieldDataChanged"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"alignItemLabelsChange"},{emit:"alignItemLabelsInAllGroupsChange"},{emit:"colCountChange"},{emit:"colCountByScreenChange"},{emit:"customizeItemChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"formDataChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"itemsChange"},{emit:"labelLocationChange"},{emit:"labelModeChange"},{emit:"minColWidthChange"},{emit:"optionalMarkChange"},{emit:"readOnlyChange"},{emit:"requiredMarkChange"},{emit:"requiredMessageChange"},{emit:"rtlEnabledChange"},{emit:"screenByWidthChange"},{emit:"scrollingEnabledChange"},{emit:"showColonAfterLabelChange"},{emit:"showOptionalMarkChange"},{emit:"showRequiredMarkChange"},{emit:"showValidationSummaryChange"},{emit:"tabIndexChange"},{emit:"validationGroupChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("items",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-form"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",alignItemLabels:"alignItemLabels",alignItemLabelsInAllGroups:"alignItemLabelsInAllGroups",colCount:"colCount",colCountByScreen:"colCountByScreen",customizeItem:"customizeItem",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",formData:"formData",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",items:"items",labelLocation:"labelLocation",labelMode:"labelMode",minColWidth:"minColWidth",optionalMark:"optionalMark",readOnly:"readOnly",requiredMark:"requiredMark",requiredMessage:"requiredMessage",rtlEnabled:"rtlEnabled",screenByWidth:"screenByWidth",scrollingEnabled:"scrollingEnabled",showColonAfterLabel:"showColonAfterLabel",showOptionalMark:"showOptionalMark",showRequiredMark:"showRequiredMark",showValidationSummary:"showValidationSummary",tabIndex:"tabIndex",validationGroup:"validationGroup",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onEditorEnterKey:"onEditorEnterKey",onFieldDataChanged:"onFieldDataChanged",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",alignItemLabelsChange:"alignItemLabelsChange",alignItemLabelsInAllGroupsChange:"alignItemLabelsInAllGroupsChange",colCountChange:"colCountChange",colCountByScreenChange:"colCountByScreenChange",customizeItemChange:"customizeItemChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",formDataChange:"formDataChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",itemsChange:"itemsChange",labelLocationChange:"labelLocationChange",labelModeChange:"labelModeChange",minColWidthChange:"minColWidthChange",optionalMarkChange:"optionalMarkChange",readOnlyChange:"readOnlyChange",requiredMarkChange:"requiredMarkChange",requiredMessageChange:"requiredMessageChange",rtlEnabledChange:"rtlEnabledChange",screenByWidthChange:"screenByWidthChange",scrollingEnabledChange:"scrollingEnabledChange",showColonAfterLabelChange:"showColonAfterLabelChange",showOptionalMarkChange:"showOptionalMarkChange",showRequiredMarkChange:"showRequiredMarkChange",showValidationSummaryChange:"showValidationSummaryChange",tabIndexChange:"tabIndexChange",validationGroupChange:"validationGroupChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.k61,b.POb,b.uE7,b.$lK,b.hUd,b.HKo,b.Ixj,P.p_,P.xZ,b.k61,b.POb,b.uE7,b.$lK,b.hUd,b.HKo,b.Ixj,P.xZ]})}return T})()},7421:(In,Ze,M)=>{"use strict";M.d(Ze,{O:()=>Ce,L:()=>ye});var W=M(7788),o=M(2583),P=M(4504),b=M(1973),f=M(5973),S=M(9522),T=M(5704),y=M(5944),d=M(4859),c=M(6021),s=M(3090),a=M(1363),u=M(1830),h=M(6110),g=M(778),_=M(4072),x=M(6790),w=M(9293),D=M(9229),C=M(8360),I=M(4481);const he=M(7080).A.inherit({_supportedKeys(){return(0,s.X)(this.callBase(),{pageUp:d.lQ,pageDown:d.lQ})},_getDefaultOptions(){return(0,s.X)(this.callBase(),{direction:"next",onClick:null,hoverStateEnabled:!0,activeStateEnabled:!0})},_render(){this.callBase();const ge=this,fe=this.$element(),xe=(0,w.b4)(g.U,this.NAME);fe.addClass(`dx-gallery-nav-button-${this.option("direction")}`),_.A.off(fe,xe),_.A.on(fe,xe,Te=>{ge._createActionByOption("onClick")({event:Te})})},_optionChanged(ge){switch(ge.name){case"onClick":case"direction":this._invalidate();break;default:this.callBase(ge)}}}),de=I.A.inherit({_activeStateUnit:".dx-gallery-item",_wasAnyItemTemplateRendered:!1,_getDefaultOptions(){return(0,s.X)(this.callBase(),{activeStateEnabled:!1,animationDuration:400,animationEnabled:!0,loop:!1,swipeEnabled:!0,indicatorEnabled:!0,showIndicator:!0,selectedIndex:0,slideshowDelay:0,showNavButtons:!1,wrapAround:!1,initialItemWidth:void 0,stretchImages:!1,_itemAttributes:{role:"option","aria-label":C.A.format("dxGallery-itemName")},loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===f.A.real().deviceType&&!f.A.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this.option("loopItemFocus",this.option("loop"))},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new y.U((ge,fe)=>{const xe=(0,T.A)("<img>").addClass("dx-gallery-item-image");(0,u.Qd)(fe)?(this._prepareDefaultItemTemplate(fe,ge),xe.attr({src:fe.imageSrc,alt:fe.imageAlt}).appendTo(ge)):xe.attr("src",String(fe)).appendTo(ge)},["imageSrc","imageAlt","text","html"],this.option("integrationOptions.watchMethod"))})},_dataSourceOptions:()=>({paginate:!1}),_itemContainer(){return this._$container},_itemClass:()=>"dx-gallery-item",_itemDataKey:()=>"dxGalleryItemData",_actualItemWidth(){const ge=this.option("wrapAround");return this.option("stretchImages")?1/(ge?this._itemsPerPage()+1:this._itemsPerPage()):ge?this._itemPercentWidth()*this._itemsPerPage()/(this._itemsPerPage()+1):this._itemPercentWidth()},_itemPercentWidth(){let ge;const fe=(0,a.Ot)(this.$element()),xe=this.option("initialItemWidth");return ge=xe&&xe<=fe?xe/fe:1,ge},_itemsPerPage(){const ge=(0,h.Vd)()?Math.floor(1/this._itemPercentWidth()):1;return Math.min(ge,this._itemsCount())},_pagesCount(){return Math.ceil(this._itemsCount()/this._itemsPerPage())},_itemsCount(){return(this.option("items")||[]).length},_offsetDirection(){return this.option("rtlEnabled")?-1:1},_initMarkup(){this._renderWrapper(),this._renderItemsContainer(),this.$element().addClass("dx-gallery"),this.$element().toggleClass("dx-gallery-loop",this.option("loop")),this.callBase();const fe={role:this._itemsCount()>0?"listbox":void 0,label:"gallery"};this.setAria(fe)},_render(){this._renderDragHandler(),this._renderContainerPosition(),this._renderItemSizes(),this._renderItemPositions(),this._renderNavButtons(),this._renderIndicator(),this._renderSelectedItem(),this._renderItemVisibility(),this._renderUserInteraction(),this._setupSlideShow(),this._reviseDimensions(),this.callBase()},_dimensionChanged(){const ge=this.option("selectedIndex")||0;this._stopItemAnimations(),this._clearCacheWidth(),this._cloneDuplicateItems(),this._renderItemSizes(),this._renderItemPositions(),this._renderIndicator(),this._renderContainerPosition(this._calculateIndexOffset(ge),!0),this._renderItemVisibility()},_renderDragHandler(){const ge=(0,w.b4)("dragstart",this.NAME);_.A.off(this.$element(),ge),_.A.on(this.$element(),ge,"img",()=>!1)},_renderWrapper(){this._$wrapper||(this._$wrapper=(0,T.A)("<div>").addClass("dx-gallery-wrapper").appendTo(this.$element()))},_renderItems(ge){if(!(0,h.Vd)()){const fe=this.option("selectedIndex");ge=ge.length>fe?ge.slice(fe,fe+1):ge.slice(0,1)}this.callBase(ge),this._loadNextPageIfNeeded()},_onItemTemplateRendered(){return()=>{this._wasAnyItemTemplateRendered||(this._wasAnyItemTemplateRendered=!0,(0,D.ho)(this.$element()))}},_renderItemsContainer(){this._$container||(this._$container=(0,T.A)("<div>").addClass("dx-gallery-container").appendTo(this._$wrapper))},_cloneDuplicateItems(){if(!this.option("loop"))return;const fe=(this.option("items")||[]).length,xe=fe-1;let Te;if(!fe)return;this._getLoopedItems().remove();const Ee=Math.min(this._itemsPerPage(),fe),Oe=this._getRealItems(),ze=this._itemContainer();for(Te=0;Te<Ee;Te++)this._cloneItemForDuplicate(Oe[Te],ze);for(Te=0;Te<Ee;Te++)this._cloneItemForDuplicate(Oe[xe-Te],ze)},_cloneItemForDuplicate(ge,fe){if(ge){const xe=(0,T.A)(ge).clone(!1).addClass("dx-gallery-item-loop").removeAttr("id").css("margin",0).appendTo(fe);this.setAria({hidden:!0},xe)}},_getRealItems(){return this.$element().find(".dx-gallery-item:not(.dx-gallery-item-loop)")},_getLoopedItems(){return this.$element().find(".dx-gallery-item-loop")},_emptyMessageContainer(){return this._$wrapper},_renderItemSizes(ge){let fe=this._itemElements();const xe=this._actualItemWidth();void 0!==ge&&(fe=fe.slice(ge)),fe.each(Te=>{(0,a.iT)((0,T.A)(fe[Te]),100*xe+"%")})},_renderItemPositions(){const ge=this._actualItemWidth(),fe=this._itemsCount(),xe=this._itemsPerPage(),Te=this.$element().find(".dx-gallery-item-loop").length,Ee=fe+Te-1,Oe=this.option("wrapAround")?.5:0,ze=this._itemFreeSpace(),$e=!!ze,Be=this.option("rtlEnabled"),Ue=this.option("selectedIndex"),ot=Be?"Right":"Left";this._itemElements().each(function(st){let et=st;const Ke=(0,T.A)(this).hasClass("dx-gallery-item-loop");if(st>fe+xe-1&&(et=Ee-et-xe),!Ke&&0!==et)return void($e&&(0,T.A)(this).css(`margin${ot}`,100*ze+"%"));const Ye=ge*(et+Oe)+ze*(et+1-Oe),Pe=Ke?ot.toLowerCase():`margin${ot}`;(0,T.A)(this).css(Pe,100*Ye+"%")}),this._relocateItems(Ue,Ue,!0)},_itemFreeSpace(){let ge=this._itemsPerPage();return this.option("wrapAround")&&(ge+=1),(1-this._actualItemWidth()*ge)/(ge+1)},_renderContainerPosition(ge,fe,xe){this._releaseInvisibleItems(),ge=ge||0;const Te=this,Ee=this._actualItemWidth(),Oe=ge,ze=this._offsetDirection()*Oe*(Ee+this._itemFreeSpace());let $e;return(0,u.O9)(this._animationOverride)&&(xe=this._animationOverride,delete this._animationOverride),xe?(Te._startSwipe(),$e=Te._animate(ze).done(Te._endSwipe.bind(Te))):((0,P.Cy)(this._$container,{left:ze*this._elementWidth(),top:0}),$e=(0,c.cY)().resolveWith(Te)),$e.done(function(){this._deferredAnimate&&Te._deferredAnimate.resolveWith(Te),fe&&this._renderItemVisibility()}),$e.promise()},_startSwipe(){this.$element().addClass("dx-gallery-active")},_endSwipe(){this.$element().removeClass("dx-gallery-active")},_animate(ge,fe){const xe=this,Te=this._$container,Ee=(0,c.cY)();return o.A.animate(this._$container,(0,s.X)({type:"slide",to:{left:ge*this._elementWidth()},duration:xe.option("animationDuration"),complete(){xe._needMoveContainerForward()&&(0,P.Cy)(Te,{left:0,top:0}),xe._needMoveContainerBack()&&(0,P.Cy)(Te,{left:xe._maxContainerOffset()*xe._elementWidth(),top:0}),Ee.resolveWith(xe)}},fe||{})),Ee},_needMoveContainerForward(){return this._$container.position().left*this._offsetDirection()<=-this._maxItemWidth()*this._elementWidth()*this._itemsCount()+1},_needMoveContainerBack(){return this._$container.position().left*this._offsetDirection()>=this._actualItemWidth()*this._elementWidth()-1},_maxContainerOffset(){return-this._maxItemWidth()*(this._itemsCount()-this._itemsPerPage())*this._offsetDirection()},_maxItemWidth(){return this._actualItemWidth()+this._itemFreeSpace()},_reviseDimensions(){const ge=this,fe=ge._itemElements().first().find(".dx-item-content");!fe||fe.is(":hidden")||(ge.option("height")||ge.option("height",(0,a.P$)(fe)),ge.option("width")||ge.option("width",(0,a.Ot)(fe)),this._dimensionChanged())},_renderIndicator(){const{showIndicator:ge}=this.option();if(this._cleanIndicators(),this.$element().toggleClass("dx-gallery-indicator-visible",ge),!ge)return;const fe=this._$indicator=(0,T.A)("<div>").addClass("dx-gallery-indicator").appendTo(this._$wrapper),xe=this.option("indicatorEnabled");for(let Te=0;Te<this._pagesCount();Te++){const Ee=(0,T.A)("<div>").addClass("dx-gallery-indicator-item").appendTo(fe);xe&&this._attachIndicatorClickHandler(Ee,Te)}this._renderSelectedPageIndicator()},_attachIndicatorClickHandler(ge,fe){_.A.on(ge,(0,w.b4)(g.U,this.NAME),xe=>{this._indicatorSelectHandler(xe,fe)})},_detachIndicatorClickHandler(ge){_.A.off(ge,(0,w.b4)(g.U,this.NAME))},_toggleIndicatorInteraction(ge){var fe;const xe=(null===(fe=this._$indicator)||void 0===fe?void 0:fe.find(".dx-gallery-indicator-item"))||[];xe.length&&xe.each((Te,Ee)=>{ge?this._attachIndicatorClickHandler((0,T.A)(Ee),Te):this._detachIndicatorClickHandler((0,T.A)(Ee))})},_cleanIndicators(){this._$indicator&&this._$indicator.remove()},_renderSelectedItem(){const ge=this.option("selectedIndex");this._itemElements().removeClass("dx-gallery-item-selected").eq(ge).addClass("dx-gallery-item-selected")},_renderItemVisibility(){if(this.option("initialItemWidth")||this.option("wrapAround"))return void this._releaseInvisibleItems();const ge=this.option("selectedIndex");this._itemElements().each((fe,xe)=>{ge!==fe&&(0,T.A)(xe).find(".dx-item-content").addClass("dx-gallery-item-invisible")})},_releaseInvisibleItems(){this._itemElements().find(".dx-item-content").removeClass("dx-gallery-item-invisible")},_renderSelectedPageIndicator(){if(!this._$indicator)return;const ge=this.option("selectedIndex"),fe=this._pagesCount()-1;let xe=Math.ceil(ge/this._itemsPerPage());xe=Math.min(fe,xe),this._$indicator.find(".dx-gallery-indicator-item").removeClass("dx-gallery-indicator-item-selected").eq(xe).addClass("dx-gallery-indicator-item-selected")},_renderUserInteraction(){const ge=this.$element(),fe=this.option("swipeEnabled")&&this._itemsCount()>1;this._createComponent(ge,x.A,{disabled:this.option("disabled")||!fe,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._elementWidth.bind(this)})},_indicatorSelectHandler(ge,fe){if(!this.option("indicatorEnabled"))return;const xe=this._fitPaginatedIndex(fe*this._itemsPerPage());this._needLongMove=!0,this.option("selectedIndex",xe),this._loadNextPageIfNeeded(xe)},_renderNavButtons(){const ge=this;ge.option("showNavButtons")?(ge._prevNavButton=(0,T.A)("<div>").appendTo(this._$wrapper),ge._createComponent(ge._prevNavButton,he,{direction:"prev",onClick(){ge._prevPage()}}),ge._nextNavButton=(0,T.A)("<div>").appendTo(this._$wrapper),ge._createComponent(ge._nextNavButton,he,{direction:"next",onClick(){ge._nextPage()}}),this._renderNavButtonsVisibility()):ge._cleanNavButtons()},_prevPage(){const ge=this._itemsPerPage(),fe=this.option("selectedIndex")-ge;return fe===-ge&&ge===this._itemsCount()?this._relocateItems(fe,0):this.goToItem(this._fitPaginatedIndex(fe))},_nextPage(){const ge=this._itemsPerPage(),fe=this.option("selectedIndex")+ge;return fe===ge&&ge===this._itemsCount()?this._relocateItems(fe,0):this.goToItem(this._fitPaginatedIndex(fe)).done(this._loadNextPageIfNeeded)},_loadNextPageIfNeeded(ge){ge=void 0===ge?this.option("selectedIndex"):ge,this._dataSource&&this._dataSource.paginate()&&this._shouldLoadNextPage(ge)&&!this._isDataSourceLoading()&&!this._isLastPage()&&this._loadNextPage().done(()=>{this._renderIndicator(),this._cloneDuplicateItems(),this._renderItemPositions(),this._renderNavButtonsVisibility(),this._renderItemSizes(ge)})},_shouldLoadNextPage(ge){return ge+2*this._itemsPerPage()>this.option("items").length},_allowDynamicItemsAppend:()=>!0,_fitPaginatedIndex(ge){const fe=this._itemsPerPage(),xe=ge<0?fe+ge:this._itemsCount()-ge;return ge>this._itemsCount()-1?(ge=0,this._goToGhostItem=!0):xe<fe&&xe>0&&(ge>0?ge-=fe-xe:ge+=fe-xe),ge},_cleanNavButtons(){this._prevNavButton&&(this._prevNavButton.remove(),delete this._prevNavButton),this._nextNavButton&&(this._nextNavButton.remove(),delete this._nextNavButton)},_renderNavButtonsVisibility(){if(!this.option("showNavButtons")||!this._prevNavButton||!this._nextNavButton)return;const ge=this.option("selectedIndex"),fe=this.option("loop"),xe=this._itemsCount();if(this._prevNavButton.show(),this._nextNavButton.show(),0===xe&&(this._prevNavButton.hide(),this._nextNavButton.hide()),fe)return;let Te=ge===xe-this._itemsPerPage();const Ee=xe<2||0===ge;Te=this._dataSource&&this._dataSource.paginate()?Te&&this._isLastPage():Te||xe<2,Ee&&this._prevNavButton.hide(),Te&&this._nextNavButton.hide()},_setupSlideShow(){const ge=this,fe=ge.option("slideshowDelay");clearTimeout(ge._slideshowTimer),fe&&(ge._slideshowTimer=setTimeout(()=>{ge._userInteraction?ge._setupSlideShow():ge.nextItem(!0).done(ge._setupSlideShow)},fe))},_elementWidth(){return this._cacheElementWidth||(this._cacheElementWidth=(0,a.RG)(this.$element())),this._cacheElementWidth},_clearCacheWidth(){delete this._cacheElementWidth},_swipeStartHandler(ge){this._releaseInvisibleItems(),this._clearCacheWidth(),this._elementWidth();const fe=this._itemsCount();if(fe){if(this._stopItemAnimations(),this._startSwipe(),this._userInteraction=!0,!this.option("loop")){const xe=this.option("selectedIndex"),Te=fe-xe-this._itemsPerPage(),Ee=xe,Oe=this.option("rtlEnabled");ge.event.maxLeftOffset=Oe?Ee:Te,ge.event.maxRightOffset=Oe?Te:Ee}}else ge.event.cancel=!0},_stopItemAnimations(){o.A.stop(this._$container,!0)},_swipeUpdateHandler(ge){const fe=this.option("wrapAround")?1:0,xe=this._offsetDirection()*ge.event.offset*(this._itemsPerPage()+fe)-this.option("selectedIndex");xe<0&&this._loadNextPageIfNeeded(Math.ceil(Math.abs(xe))),this._renderContainerPosition(xe)},_swipeEndHandler(ge){const fe=ge.event.targetOffset*this._offsetDirection()*this._itemsPerPage(),xe=this.option("selectedIndex"),Te=this._fitIndex(xe-fe),Ee=this._fitPaginatedIndex(Te);Math.abs(fe)<this._itemsPerPage()?this._relocateItems(xe):this._itemsPerPage()!==this._itemsCount()?this.option("selectedIndex",Ee):this._relocateItems(fe>0?-fe:0)},_setFocusOnSelect(){this._userInteraction=!0;const ge=this._getRealItems().filter(".dx-gallery-item-selected");this.option("focusedElement",(0,S.cc)(ge)),this._userInteraction=!1},_flipIndex(ge){const fe=this._itemsCount();return(ge%=fe)>(fe+1)/2&&(ge-=fe),ge<-(fe-1)/2&&(ge+=fe),ge},_fitIndex(ge){if(!this.option("loop"))return ge;const fe=this._itemsCount();return(ge>=fe||ge<0)&&(this._goToGhostItem=!0),ge>=fe&&(ge=fe-ge),(ge%=fe)<0&&(ge+=fe),ge},_clean(){this.callBase(),this._cleanIndicators(),this._cleanNavButtons()},_dispose(){this._wasAnyItemTemplateRendered=null,clearTimeout(this._slideshowTimer),this.callBase()},_updateSelection(ge,fe){this._stopItemAnimations(),this._renderNavButtonsVisibility(),this._renderSelectedItem(),this._relocateItems(ge[0],fe[0]),this._renderSelectedPageIndicator()},_relocateItems(ge,fe,xe){void 0===fe&&(fe=ge);const Te=this._calculateIndexOffset(ge,fe);this._renderContainerPosition(Te,!0,this.option("animationEnabled")&&!xe).done(function(){this._setFocusOnSelect(),this._userInteraction=!1,this._setupSlideShow()})},_focusInHandler(){o.A.isAnimating(this._$container)||this._userInteraction||this.callBase.apply(this,arguments)},_focusOutHandler(){o.A.isAnimating(this._$container)||this._userInteraction||this.callBase.apply(this,arguments)},_selectFocusedItem:d.lQ,_moveFocus(){this._stopItemAnimations(),this.callBase.apply(this,arguments);const ge=this.itemElements().index((0,T.A)(this.option("focusedElement")));this.goToItem(ge,this.option("animationEnabled"))},_visibilityChanged(ge){ge&&this._reviseDimensions()},_calculateIndexOffset(ge,fe){void 0===fe&&(fe=ge);let xe=fe-ge;return this.option("loop")&&!this._needLongMove&&this._goToGhostItem&&(this._isItemOnFirstPage(ge)&&this._isItemOnLastPage(fe)?xe=-this._itemsPerPage():this._isItemOnLastPage(ge)&&this._isItemOnFirstPage(fe)&&(xe=this._itemsPerPage()),this._goToGhostItem=!1),this._needLongMove=!1,xe-=fe,xe},_isItemOnLastPage(ge){return ge>=this._itemsCount()-this._itemsPerPage()},_isItemOnFirstPage(ge){return ge<=this._itemsPerPage()},_optionChanged(ge){switch(ge.name){case"width":case"initialItemWidth":this.callBase.apply(this,arguments),this._dimensionChanged();break;case"animationDuration":this._renderNavButtonsVisibility();break;case"animationEnabled":break;case"loop":this.$element().toggleClass("dx-gallery-loop",ge.value),this.option("loopItemFocus",ge.value),(0,h.Vd)()&&(this._cloneDuplicateItems(),this._renderItemPositions(),this._renderNavButtonsVisibility());break;case"showIndicator":this._renderIndicator();break;case"showNavButtons":this._renderNavButtons();break;case"slideshowDelay":this._setupSlideShow();break;case"wrapAround":case"stretchImages":(0,h.Vd)()&&(this._renderItemSizes(),this._renderItemPositions(),this._renderItemVisibility());break;case"swipeEnabled":this._renderUserInteraction();break;case"indicatorEnabled":this._toggleIndicatorInteraction(ge.value);break;default:this.callBase(ge)}},goToItem(ge,fe){const xe=this.option("selectedIndex"),Te=this._itemsCount();return void 0!==fe&&(this._animationOverride=fe),ge=this._fitIndex(ge),this._deferredAnimate=(0,c.cY)(),ge>Te-1||ge<0||xe===ge?this._deferredAnimate.resolveWith(this).promise():(this.option("selectedIndex",ge),this._deferredAnimate.promise())},prevItem(ge){return this.goToItem(this.option("selectedIndex")-1,ge)},nextItem(ge){return this.goToItem(this.option("selectedIndex")+1,ge)}});(0,b.A)("dxGallery",de);const be=de;var ve=M(3349),le=M(8914);let Ce=(()=>{class ge extends ve.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(xe){this._setOption("accessKey",xe)}get animationDuration(){return this._getOption("animationDuration")}set animationDuration(xe){this._setOption("animationDuration",xe)}get animationEnabled(){return this._getOption("animationEnabled")}set animationEnabled(xe){this._setOption("animationEnabled",xe)}get dataSource(){return this._getOption("dataSource")}set dataSource(xe){this._setOption("dataSource",xe)}get disabled(){return this._getOption("disabled")}set disabled(xe){this._setOption("disabled",xe)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(xe){this._setOption("elementAttr",xe)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(xe){this._setOption("focusStateEnabled",xe)}get height(){return this._getOption("height")}set height(xe){this._setOption("height",xe)}get hint(){return this._getOption("hint")}set hint(xe){this._setOption("hint",xe)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(xe){this._setOption("hoverStateEnabled",xe)}get indicatorEnabled(){return this._getOption("indicatorEnabled")}set indicatorEnabled(xe){this._setOption("indicatorEnabled",xe)}get initialItemWidth(){return this._getOption("initialItemWidth")}set initialItemWidth(xe){this._setOption("initialItemWidth",xe)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(xe){this._setOption("itemHoldTimeout",xe)}get items(){return this._getOption("items")}set items(xe){this._setOption("items",xe)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(xe){this._setOption("itemTemplate",xe)}get loop(){return this._getOption("loop")}set loop(xe){this._setOption("loop",xe)}get noDataText(){return this._getOption("noDataText")}set noDataText(xe){this._setOption("noDataText",xe)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(xe){this._setOption("rtlEnabled",xe)}get selectedIndex(){return this._getOption("selectedIndex")}set selectedIndex(xe){this._setOption("selectedIndex",xe)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(xe){this._setOption("selectedItem",xe)}get showIndicator(){return this._getOption("showIndicator")}set showIndicator(xe){this._setOption("showIndicator",xe)}get showNavButtons(){return this._getOption("showNavButtons")}set showNavButtons(xe){this._setOption("showNavButtons",xe)}get slideshowDelay(){return this._getOption("slideshowDelay")}set slideshowDelay(xe){this._setOption("slideshowDelay",xe)}get stretchImages(){return this._getOption("stretchImages")}set stretchImages(xe){this._setOption("stretchImages",xe)}get swipeEnabled(){return this._getOption("swipeEnabled")}set swipeEnabled(xe){this._setOption("swipeEnabled",xe)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(xe){this._setOption("tabIndex",xe)}get visible(){return this._getOption("visible")}set visible(xe){this._setOption("visible",xe)}get width(){return this._getOption("width")}set width(xe){this._setOption("width",xe)}get wrapAround(){return this._getOption("wrapAround")}set wrapAround(xe){this._setOption("wrapAround",xe)}onContentReady;onDisposing;onInitialized;onItemClick;onItemContextMenu;onItemHold;onItemRendered;onOptionChanged;onSelectionChanged;accessKeyChange;animationDurationChange;animationEnabledChange;dataSourceChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;indicatorEnabledChange;initialItemWidthChange;itemHoldTimeoutChange;itemsChange;itemTemplateChange;loopChange;noDataTextChange;rtlEnabledChange;selectedIndexChange;selectedItemChange;showIndicatorChange;showNavButtonsChange;slideshowDelayChange;stretchImagesChange;swipeEnabledChange;tabIndexChange;visibleChange;widthChange;wrapAroundChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(xe){this.setChildren("items",xe)}constructor(xe,Te,Ee,Oe,ze,$e,Be,Ue){super(xe,Te,Ee,Oe,Be,Ue),this._watcherHelper=Oe,this._idh=ze,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"animationDurationChange"},{emit:"animationEnabledChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"indicatorEnabledChange"},{emit:"initialItemWidthChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"loopChange"},{emit:"noDataTextChange"},{emit:"rtlEnabledChange"},{emit:"selectedIndexChange"},{emit:"selectedItemChange"},{emit:"showIndicatorChange"},{emit:"showNavButtonsChange"},{emit:"slideshowDelayChange"},{emit:"stretchImagesChange"},{emit:"swipeEnabledChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapAroundChange"}]),this._idh.setHost(this),$e.setHost(this)}_createInstance(xe,Te){return new be(xe,Te)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(xe){super.ngOnChanges(xe),this.setupChanges("dataSource",xe),this.setupChanges("items",xe)}setupChanges(xe,Te){xe in this._optionsToUpdate||this._idh.setup(xe,Te)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(xe,Te){let Ee=this._idh.setupSingle(xe,Te),Oe=null!==this._idh.getChanges(xe,Te);(Ee||Oe)&&super._setOption(xe,Te)}static \u0275fac=function(Te){return new(Te||ge)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(ve.zF),W.rXU(ve.jS),W.rXU(ve.$M),W.rXU(ve.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:ge,selectors:[["dx-gallery"]],contentQueries:function(Te,Ee,Oe){if(1&Te&&W.wni(Oe,le.CVf,4),2&Te){let ze;W.mGM(ze=W.lsd())&&(Ee.itemsChildren=ze)}},inputs:{accessKey:"accessKey",animationDuration:"animationDuration",animationEnabled:"animationEnabled",dataSource:"dataSource",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",indicatorEnabled:"indicatorEnabled",initialItemWidth:"initialItemWidth",itemHoldTimeout:"itemHoldTimeout",items:"items",itemTemplate:"itemTemplate",loop:"loop",noDataText:"noDataText",rtlEnabled:"rtlEnabled",selectedIndex:"selectedIndex",selectedItem:"selectedItem",showIndicator:"showIndicator",showNavButtons:"showNavButtons",slideshowDelay:"slideshowDelay",stretchImages:"stretchImages",swipeEnabled:"swipeEnabled",tabIndex:"tabIndex",visible:"visible",width:"width",wrapAround:"wrapAround"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",animationDurationChange:"animationDurationChange",animationEnabledChange:"animationEnabledChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",indicatorEnabledChange:"indicatorEnabledChange",initialItemWidthChange:"initialItemWidthChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",loopChange:"loopChange",noDataTextChange:"noDataTextChange",rtlEnabledChange:"rtlEnabledChange",selectedIndexChange:"selectedIndexChange",selectedItemChange:"selectedItemChange",showIndicatorChange:"showIndicatorChange",showNavButtonsChange:"showNavButtonsChange",slideshowDelayChange:"slideshowDelayChange",stretchImagesChange:"stretchImagesChange",swipeEnabledChange:"swipeEnabledChange",tabIndexChange:"tabIndexChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapAroundChange:"wrapAroundChange"},features:[W.Jv_([ve.zF,ve.jS,ve.fH,ve.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(Te,Ee){},encapsulation:2})}return ge})(),ye=(()=>{class ge{static \u0275fac=function(Te){return new(Te||ge)};static \u0275mod=W.$C({type:ge});static \u0275inj=W.G2t({imports:[le.POb,ve.p_,ve.xZ,le.POb,ve.xZ]})}return ge})()},1705:(In,Ze,M)=>{"use strict";M.d(Ze,{m:()=>Ji,D:()=>Wo});var W=M(7788),o=M(5737);const f=new class P{constructor(){this._converters={},this._converters={}}addConverter(Bt,kt){this._converters[Bt]=kt}getConverter(Bt){return this._converters[Bt]}};f.addConverter("delta",class S{setQuillInstance(Bt){this.quillInstance=Bt}toHtml(){if(this.quillInstance)return this._isQuillEmpty()?"":this.quillInstance.getSemanticHTML(0,this.quillInstance.getLength()+1)}_isQuillEmpty(){const Bt=this.quillInstance.getContents();return 1===Bt.length()&&this._isDeltaEmpty(Bt)}_isDeltaEmpty(Bt){return Bt.reduce((kt,Rn)=>{let{insert:ti}=Rn;return-1!==ti.indexOf("\n")})}});var y=M(1973),d=M(3686),c=M(5973),s=M(9522),a=M(5704),u=M(8412),h=M(8684),g=M(4859),_=M(6021),x=M(3090),w=M(1830),D=M(4072),C=M(7940),I=M(1216),L=M(9209),N=M(9293),G=M(6620),k=M(127),U=M(4647),B=M(681),K=M.n(B);function J(){if(!K())throw k.A.Error("E1041","Quill");return K()}let ie={};K()&&(ie=K().import("attributors/style/align"),ie.whitelist.push("left"));const re=ie;let q={};K()&&(q=K().import("attributors/style/font"),q.whitelist=null);const Y=q;let Z={};if(K()){const ln=K().import("formats/image");Z=class extends ln{static create(Bt){const Rn=super.create(Bt&&Bt.src||Bt);if((0,w.Gv)(Bt)){const ti=(Ri,Oi)=>{Bt[Ri]&&Rn.setAttribute(Ri,Oi)};ti("alt",Bt.alt),ti("width",Bt.width),ti("height",Bt.height)}return Rn}static formats(Bt){const kt=super.formats(Bt);return kt.imageSrc=Bt.getAttribute("src"),kt}formats(){const Bt=super.formats(),kt=this.domNode.style.float;return kt&&(Bt.float=kt),Bt}format(Bt,kt){"float"===Bt?this.domNode.style[Bt]=kt:super.format(Bt,kt)}static value(Bt){return{src:Bt.getAttribute("src"),width:Bt.getAttribute("width"),height:Bt.getAttribute("height"),alt:Bt.getAttribute("alt")}}},Z.blotName="extendedImage"}const Q=Z;let te={};if(K()){const ln=K().import("formats/link");te=class lX extends ln{static create(kt){const ti=super.create(kt?.href??kt);return(0,w.Gv)(kt)&&(kt.text&&(ti.innerText=kt.text),kt.target||ti.removeAttribute("target")),ti}static formats(kt){return{href:kt.getAttribute("href"),target:kt.getAttribute("target")}}formats(){const kt=super.formats(),{href:Rn,target:ti}=lX.formats(this.domNode);return kt.link=Rn,kt.target=ti,kt}format(kt,Rn){"link"===kt&&(0,w.Gv)(Rn)?(Rn.text&&(this.domNode.innerText=Rn.text),Rn.target?this.domNode.setAttribute("target","_blank"):this.domNode.removeAttribute("target"),this.domNode.setAttribute("href",Rn.href)):super.format(kt,Rn)}static value(kt){return{href:kt.getAttribute("href"),text:kt.innerText,target:!!kt.getAttribute("target")}}}}const pe=te;let z={};K()&&(z=K().import("attributors/style/size"),z.whitelist=null);const oe=z;var ae=M(36),ee=M(2660),he=M(6110);let ue=class de{};if(K()){const ln=K().import("core/module");ue=class extends ln{constructor(Bt,kt){super(Bt,kt),this.editorInstance=kt.editorInstance}saveValueChangeEvent(Bt){this.editorInstance._saveValueChangeEvent(Bt)}addCleanCallback(Bt){this.editorInstance.addCleanCallback(Bt)}handleOptionChangeValue(Bt){(0,w.Gv)(Bt)?Object.entries(Bt).forEach(kt=>{let[Rn,ti]=kt;return this.option(Rn,ti)}):(0,w.O9)(Bt)||null==this||this.clean()}}}const be=ue;let ve=be;K()&&(ve=class extends be{constructor(ln,Bt){super(ln,Bt);const kt=this.editorInstance.NAME;D.A.on(this.quill.root,(0,N.b4)("drop",kt),this._dropHandler.bind(this)),D.A.on(this.quill.root,(0,N.b4)("paste",kt),this._pasteHandler.bind(this))}_dropHandler(ln){var Bt;const{dataTransfer:kt}=ln.originalEvent,Rn=null==kt||null===(Bt=kt.files)||void 0===Bt?void 0:Bt.length;this.saveValueChangeEvent(ln),ln.preventDefault(),Rn&&this._getImage(kt.files,this._addImage.bind(this))}_pasteHandler(ln){var Bt;const{clipboardData:kt}=ln.originalEvent;if(this.saveValueChangeEvent(ln),!kt)return;const Rn=null===(Bt=kt.items)||void 0===Bt?void 0:Bt.length;!kt.getData("text/html")&&Rn&&this._getImage(kt.items,Ri=>{ae.A.mozilla||this._addImage(Ri)})}_isImage(ln){return!!ln.type.match(/^image\/(a?png|bmp|gif|p?jpe?g|svg|vnd\.microsoft\.icon|webp)/i)}_getImage(ln,Bt){const kt=(0,he.zk)();(0,ee.__)(ln,(Rn,ti)=>{if(!this._isImage(ti))return;const Ri=new kt.FileReader;Ri.onload=eo=>{let{target:So}=eo;Bt(So.result)};const Oi=ti.getAsFile?ti.getAsFile():ti;Oi instanceof kt.Blob&&Ri.readAsDataURL(Oi)})}_addImage(ln){const Bt=this.quill.getSelection(),kt=Bt?Bt.index:this.quill.getLength();this.quill.insertEmbed(kt,"extendedImage",ln,"user")}});const le=ve,ye=(0,N.b4)("dxclick","dxHtmlEditorImageCursor");let ge=be;K()&&(ge=class extends be{constructor(ln,Bt){super(ln,Bt),this.addCleanCallback(this.clean.bind(this)),this._attachEvents()}_attachEvents(){D.A.on(this.quill.root,ye,this._clickHandler.bind(this))}_detachEvents(){D.A.off(this.quill.root,ye)}_clickHandler(ln){this._isAllowedTarget(ln.target)&&this._adjustSelection(ln)}_isAllowedTarget(ln){return this._isImage(ln)}_isImage(ln){return"IMG"===ln.tagName.toUpperCase()}_adjustSelection(ln){const Bt=this.quill.scroll.find(ln.target);if(Bt){const kt=Bt.offset(this.quill.scroll);this.quill.setSelection(kt+1,0)}else this.quill.setSelection(0,0)}clean(){this._detachEvents()}});const fe=ge;var xe=M(5730),Te=M(9144),Ee=M(1363),Oe=M(8360),ze=M(4308),$e=M(8910),Be=M(9212);const Ue=["imageSrc","src"],ot="phone"===c.A.current().deviceType,En="user";class Jn{constructor(Bt,kt){this.module=Bt,this.config=kt??{},this.quill=this.module.quill,this.editorInstance=this.module.editorInstance}render(){this.editorInstance._formDialog&&(this.editorInstance._formDialog.beforeAddButtonAction=()=>this.getCurrentTab().upload()),this.tabPanelIndex=0,this.formData=this.getFormData(),this.isUpdating=this.isImageUpdating(),this.tabsModel=this.createTabsModel(this.config.tabs),this.tabs=this.createTabs(this.formData);const Bt=this.getFormConfig();this.updatePopupConfig(),this.updateAddButtonState(),this.editorInstance.showFormDialog(Bt).done((kt,Rn)=>{this.tabs[this.getActiveTabIndex()].strategy.pasteImage(kt,Rn)}).always(()=>{this.resetDialogPopupOptions(),this.quill.focus()})}getCurrentTab(){return this.tabs[this.tabPanelIndex]}updateAddButtonState(){const Bt=this.getCurrentTab().isDisableButton();this.setAddButtonDisabled(Bt)}setAddButtonDisabled(Bt){this.editorInstance.formDialogOption({"toolbarItems[0].options.disabled":Bt})}getActiveTabIndex(){return this.isUpdating?0:this.tabPanelIndex}getFormData(){return this.getUpdateDialogFormData(this.quill.getFormat())}getUpdateDialogFormData(Bt){const{imageSrc:kt,src:Rn}=Bt,ti=(0,Te.A)(Bt,Ue);return(0,o.A)({src:kt??Rn},ti)}createUrlTab(Bt){return new Bn(this.module,{config:this.config,formData:Bt,isUpdating:this.isUpdating},()=>this.updateAddButtonState())}createFileTab(){return new gi(this.module,{config:this.config},()=>this.updateAddButtonState())}createTabsModel(){let Bt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return 0===Bt.length||this.isUpdating?["url"]:Bt.map(kt=>"object"==typeof kt?kt.name:kt)}createTabs(Bt){return this.tabsModel.map(kt=>"url"===kt?this.createUrlTab(Bt):this.createFileTab())}isImageUpdating(){return Object.prototype.hasOwnProperty.call(this.module.quill.getFormat()??{},"imageSrc")}updatePopupConfig(){let Bt="dx-htmleditor-add-image-popup dx-formdialog";this.useTabbedItems()&&(Bt+=" dx-htmleditor-add-image-popup-with-tabs");const Rn=this.isUpdating?"dxHtmlEditor-dialogImageUpdateButton":"dxHtmlEditor-dialogImageAddButton";this.editorInstance.formDialogOption({title:Oe.A.format(this.isUpdating?"dxHtmlEditor-dialogUpdateImageCaption":"dxHtmlEditor-dialogImageCaption"),"toolbarItems[0].options.text":Oe.A.format(Rn),wrapperAttr:{class:Bt}})}resetDialogPopupOptions(){this.editorInstance.formDialogOption({"toolbarItems[0].options.text":Oe.A.format("OK"),"toolbarItems[0].options.visible":!0,"toolbarItems[0].options.disabled":!1,wrapperAttr:{class:"dx-formdialog"}})}useTabbedItems(){return this.tabsModel.length>1}getFormWidth(){return ot?"100%":493}getFormConfig(){return{formData:this.formData,width:this.getFormWidth(),labelLocation:"top",colCount:this.useTabbedItems()?1:11,items:this.getItemsConfig()}}getItemsConfig(){return this.useTabbedItems()?[{itemType:"tabbed",tabPanelOptions:{onSelectionChanged:kt=>{this.tabPanelIndex=kt.component.option("selectedIndex"),this.updateAddButtonState()}},tabs:(0,ee.Tj)(this.tabs,kt=>({title:kt.getTabName(),colCount:11,items:kt.getItemsConfig()}))}]:this.tabs[0].getItemsConfig()}}class wi{constructor(Bt,kt,Rn){let{config:ti,formData:Ri,isUpdating:Oi}=kt;this.module=Bt,this.config=ti,this.formData=Ri,this.isUpdating=Oi,this.onFileSelected=Rn,this.strategy=this.createStrategy()}getItemsConfig(){return this.strategy.getItemsConfig()}createStrategy(){return this.isUpdating?new Dt(this.module,this.config,this.formData):new pt(this.module,this.config,this.onFileSelected)}isDisableButton(){return!1}upload(){return this.strategy.upload()}}class Bn extends wi{getTabName(){return Oe.A.format("dxHtmlEditor-dialogImageSpecifyUrl")}}class gi extends wi{getTabName(){return Oe.A.format("dxHtmlEditor-dialogImageSelectFile")}createStrategy(){return new cn(this.module,this.config,this.onFileSelected)}isDisableButton(){return!this.strategy.isValid()}}class Ai{constructor(Bt,kt){this.module=Bt,this.config=kt,this.editorInstance=Bt.editorInstance,this.quill=Bt.quill,this.selection=this.getQuillSelection()}getQuillSelection(){return this.quill.getSelection()??{index:this.quill.getLength(),length:0}}pasteImage(Bt,kt){}isValid(){return!0}upload(){}}class pt extends Ai{constructor(Bt,kt,Rn){super(Bt,kt,Rn),this.shouldKeepAspectRatio=!0}pasteImage(Bt,kt){this.module.saveValueChangeEvent(kt),hn(this.quill,this.selection.index,Bt)}keepAspectRatio(Bt,kt){let{dependentEditor:Rn,e:ti}=kt;const Ri=parseInt(ti.value),Oi=parseInt(ti.previousValue),eo=parseInt(Rn.option("value"));Bt.component.updateData(Bt.dataField,Ri),this.shouldKeepAspectRatio&&eo&&Oi&&!this.preventRecalculating&&(this.preventRecalculating=!0,Rn.option("value",Math.round(Ri*eo/parseInt(Oi)).toString())),this.preventRecalculating=!1}createKeepAspectRatioEditor(Bt,kt,Rn){return this.editorInstance._createComponent(Bt,$e.A,(0,x.X)(!0,kt.editorOptions,{value:kt.component.option("formData")[kt.dataField],onEnterKey:kt.component.option("onEditorEnterKey").bind(this.editorInstance._formDialog,kt),onValueChanged:ti=>{this.keepAspectRatio(kt,{dependentEditor:this[`${Rn}Editor`],e:ti})}}))}upload(){return this.editorInstance._formDialog._form.validate().isValid}getItemsConfig(){const Bt=(0,Be.Ft)()?"text":"outlined";return[{dataField:"src",colSpan:11,label:{text:Oe.A.format("dxHtmlEditor-dialogImageUrlField")},validationRules:[{type:"required"},{type:"stringLength",min:1}]},{dataField:"width",colSpan:6,label:{text:Oe.A.format("dxHtmlEditor-dialogImageWidthField")},template:kt=>{const Rn=(0,a.A)("<div>").addClass("dx-fix-ratio-container"),ti=(0,a.A)("<div>").appendTo(Rn);this.widthEditor=this.createKeepAspectRatioEditor(ti,kt,"height");const Ri=(0,a.A)("<div>").appendTo(Rn);return this.editorInstance._createComponent(Ri,ze.A,{items:[{icon:"imgarlock",value:"keepRatio"}],hint:Oe.A.format("dxHtmlEditor-dialogImageKeepAspectRatio"),focusStateEnabled:!1,keyExpr:"value",stylingMode:Bt,selectionMode:"multiple",selectedItemKeys:["keepRatio"],onSelectionChanged:Oi=>{this.shouldKeepAspectRatio=!!Oi.component.option("selectedItems").length}}),Rn}},{dataField:"height",colSpan:5,label:{text:Oe.A.format("dxHtmlEditor-dialogImageHeightField")},template:kt=>{const Rn=(0,a.A)("<div>");return this.heightEditor=this.createKeepAspectRatioEditor(Rn,kt,"width"),Rn}},{dataField:"alt",colSpan:11,label:{text:Oe.A.format("dxHtmlEditor-dialogImageAltField")}}]}}class Dt extends pt{constructor(Bt,kt,Rn,ti){super(Bt,kt,ti),this.formData=Rn,this.modifyFormData()}modifyFormData(){const{imageSrc:Bt}=this.quill.getFormat(this.selection.index-1,1);(!Bt||0===this.selection.index)&&(this.selection={index:this.selection.index+1,length:0},this.quill.setSelection(this.selection.index,this.selection.length,"silent"));const kt=this.quill.getLeaf(this.selection.index)[0].domNode;kt&&(this.formData.width=this.formData.width??(0,Ee.RG)((0,a.A)(kt)),this.formData.height=this.formData.height??(0,Ee.Oq)((0,a.A)(kt)))}pasteImage(Bt,kt){this.quill.deleteText(this.embedFormatIndex(),1,"silent"),this.selection.index-=1,super.pasteImage(Bt,kt)}embedFormatIndex(){const Bt=this.selection??this.quill.getSelection();return Bt?Bt.length?Bt.index:Bt.index-1:this.quill.getLength()}}class cn extends Ai{constructor(Bt,kt,Rn){super(Bt,kt,Rn),this.useBase64=!(0,w.O9)(this.config.fileUploadMode)||"base64"===this.config.fileUploadMode,this.isValidInternal=!1,this.onFileSelected=Rn,this.data=null}upload(){return this.useBase64?this.base64Upload(this.data):this.data.value.length&&this.data.component.upload(),!0}isValid(){return this.isValidInternal}onUploaded(Bt){$n(this.config.uploadDirectory,Bt.file.name,this.quill,this.selection.index)}base64Upload(Bt){this.quill.getModule("uploader").upload(this.selection,Bt.value,!0)}pasteImage(Bt,kt){this.useBase64&&super.pasteImage(Bt,kt)}isBase64Editable(){return"both"===this.config.fileUploadMode}validate(Bt){const kt=Bt.component;this.isValidInternal=!kt._files.some(Rn=>!Rn.isValid()),0===kt._files.length&&(this.isValidInternal=!1)}getFileUploaderOptions(){return(0,x.X)({},{value:[],name:"dx-htmleditor-image",accept:"image/*",uploadMode:"useButtons"},{uploadUrl:this.config.uploadUrl,onValueChanged:kt=>{this.validate(kt),this.data=kt,this.onFileSelected()},onUploaded:kt=>this.onUploaded(kt)},this.config.fileUploaderOptions)}getItemsConfig(){return[{itemType:"simple",dataField:"files",colSpan:11,label:{visible:!1},template:()=>{const Bt=(0,a.A)("<div>");return this.module.editorInstance._createComponent(Bt,xe.A,this.getFileUploaderOptions()),Bt}},{itemType:"simple",colSpan:11,label:{visible:!1},editorType:"dxCheckBox",editorOptions:{value:this.useBase64,visible:this.isBase64Editable(),text:Oe.A.format("dxHtmlEditor-dialogImageEncodeToBase64"),onValueChanged:Bt=>{this.isBase64Editable()&&(this.useBase64=Bt.value)}}}]}}function hn(ln,Bt,kt){ln.insertEmbed(Bt,"extendedImage",kt,En),ln.setSelection(Bt+1,0,En)}function $n(ln,Bt,kt,Rn){if(ln){const ti=function dt(ln){return"/"!==ln[ln.length-1]?`${ln}/`:ln}(ln)+Bt;hn(kt,Rn,{src:ti})}}const Ln="dxHtmlEditorImageUpload";let Gt=be;K()&&(Gt=class extends be{constructor(ln,Bt){super(ln,Bt),this.options=Bt,this._quillContainer=this.editorInstance._getQuillContainer(),this.addCleanCallback(this.prepareCleanCallback()),this._handleServerUpload()}_handleServerUpload(){(0,w.O9)(this.options.fileUploadMode)&&"base64"!==this.options.fileUploadMode?this._enableDragAndDropUploading():this._disableDragAndDropUploading()}_getUploaderModule(){return this._uploaderModule||(this._uploaderModule=this.quill.getModule("uploader")),this._uploaderModule}_disableDragAndDropUploading(){var ln;this._getUploaderModule().preventImageUploading(!1),this._detachEvents(),null===(ln=this._fileUploader)||void 0===ln||ln.dispose()}_enableDragAndDropUploading(){this._initFileUploader(),this._getUploaderModule().preventImageUploading(!0),this._attachEvents()}_initFileUploader(){const ln=(0,a.A)("<div>").addClass("dx-htmleditor-hidden-content").appendTo(this._quillContainer),Bt=(0,x.X)({},{value:[],name:"dx-htmleditor-image",accept:"image/*",uploadMode:"useButtons"},{uploadUrl:this.options.uploadUrl,onUploaded:this._onUploaded.bind(this)},this.options.fileUploaderOptions);return this._fileUploader=this.editorInstance._createComponent(ln,xe.A,Bt),ln}_onUploaded(ln){const{index:Bt}=this.quill.getSelection()??{index:this.quill.getLength()};$n(this.options.uploadDirectory,ln.file.name,this.quill,Bt)}_attachEvents(){D.A.on(this.quill.root,(0,N.b4)("drop",Ln),this._dropHandler.bind(this)),D.A.on(this.quill.root,(0,N.b4)("paste",Ln),this._pasteHandler.bind(this))}_detachEvents(){D.A.off(this.quill.root,Ln)}_dropHandler(ln){this._handleInsertImages(ln,"dataTransfer")}_pasteHandler(ln){this._handleInsertImages(ln,"clipboardData")}_handleInsertImages(ln,Bt){this.saveValueChangeEvent(ln);const Rn=Array.from(ln.originalEvent[Bt].files||[]);Rn.length&&(ln.preventDefault(),ln.stopPropagation(),this._fileUploader.option("value",Rn),this._fileUploader.upload())}clean(){this._disableDragAndDropUploading()}prepareCleanCallback(){return()=>{this.clean()}}option(ln,Bt){switch(ln){case"imageUpload":this.handleOptionChangeValue(Bt);break;case"fileUploadMode":this.options.fileUploadMode=Bt,this._handleServerUpload();break;case"fileUploaderOptions":this._fileUploader.option(Bt)}}});const on=Gt;var sn=M(4270);class It{constructor(){this._storage={}}set(Bt,kt){let{editorKey:Rn,marker:ti}=Bt;var Ri;(Ri=this._storage)[Rn]??(Ri[Rn]={}),this._storage[Rn][ti]=kt}get(Bt){var kt,Rn;let{editorKey:ti,marker:Ri}=Bt;return(0,w.O9)(ti)?null===(Rn=this._storage[ti])||void 0===Rn?void 0:Rn[Ri]:null===(kt=Object.values(this._storage).at(-1))||void 0===kt?void 0:kt[Ri]}delete(Bt){let{editorKey:kt,marker:Rn}=Bt;this._storage[kt]&&(delete this._storage[kt][Rn],(0,w.RI)(this._storage[kt])&&delete this._storage[kt])}}let Ot={};if(K()){const ln=K().import("blots/embed"),Bt="dx-mention";Ot=class xj extends ln{constructor(Rn,ti){super(Rn,ti),this.renderContent(this.contentNode,xj.value(ti))}static create(Rn){const ti=super.create();return ti.setAttribute("spellcheck",!1),ti.dataset.marker=Rn.marker,ti.dataset.mentionValue=Rn.value,ti.dataset.id=Rn.id,ti}static value(Rn){return{marker:Rn.dataset.marker,id:Rn.dataset.id,value:Rn.dataset.mentionValue}}renderContent(Rn,ti){const Ri=xj._templatesStorage.get({editorKey:ti.keyInTemplateStorage,marker:ti.marker});Ri?Ri.render({model:ti,container:Rn}):this.baseContentRender(Rn,ti)}baseContentRender(Rn,ti){const Ri=(0,a.A)("<span>").text(ti.marker);(0,a.A)(Rn).append(Ri).append(ti.value)}static addTemplate(Rn,ti){this._templatesStorage.set(Rn,ti)}static removeTemplate(Rn){this._templatesStorage.delete(Rn)}},Ot.blotName="mention",Ot.tagName="span",Ot.className=Bt,Ot._templatesStorage=new It}const zt=Ot;var un=M(6828),Pn=M(5169);let Ei=be;if(K()){const ln="dx-suggestion-list",Bt="dx-suggestion-list-wrapper",kt="dx-dropdowneditor-overlay";Ei=class extends be{constructor(ti,Ri){super(ti,Ri),this.options=(0,x.X)({},this._getDefaultOptions(),Ri),this._popup=this.renderPopup(),this._popup.$wrapper().addClass(`${Bt} ${kt}`),this._renderPreventFocusOut()}_getDefaultOptions(){return{dataSource:null}}renderList(ti,Ri){const Oi=(0,a.A)("<div>").addClass(ln).appendTo(ti);this._list=this.options.editorInstance._createComponent(Oi,un.A,Ri)}renderPopup(){const{editorInstance:ti}=this.options,Ri=(0,a.A)("<div>").appendTo(ti.$element()),Oi=this._getPopupConfig();return ti._createComponent(Ri,Pn.A,Oi)}_getPopupConfig(){return{contentTemplate:ti=>{const Ri=this._getListConfig(this.options);this.renderList((0,a.A)(ti),Ri)},deferRendering:!1,onShown:()=>{this._list.focus()},onHidden:()=>{this._list.unselectAll(),this._list.option("focusedElement",null)},showTitle:!1,width:"auto",height:"auto",shading:!1,hideOnParentScroll:!0,hideOnOutsideClick:!0,animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},fullScreen:!1,maxHeight:this.maxHeight}}_getListConfig(ti){return{dataSource:ti.dataSource,onSelectionChanged:this.selectionChangedHandler.bind(this),selectionMode:"single",pageLoadMode:"scrollBottom"}}get maxHeight(){const ti=(0,he.zk)(),Ri=ti&&(0,Ee.Oq)(ti)||0;return Math.max(100,.5*Ri)}selectionChangedHandler(ti){this._popup.option("visible")&&(this._popup.hide(),this.insertEmbedContent(ti))}_renderPreventFocusOut(){const ti=(0,N.b4)("mousedown","dxHtmlEditorPopupModule");D.A.on(this._popup.$wrapper(),ti,Ri=>{Ri.preventDefault()})}insertEmbedContent(ti){}showPopup(){this._popup&&this._popup.show()}savePosition(ti){this.caretPosition=ti}getPosition(){return this.caretPosition}}}const Hi=Ei;let mo=be;if(K()){const ln="user",Bt="@",kt={ARROW_UP:"upArrow",ARROW_DOWN:"downArrow",ARROW_LEFT:"leftArrow",ARROW_RIGHT:"rightArrow",ENTER:"enter",ESCAPE:"escape",SPACE:"space",PAGE_UP:"pageUp",PAGE_DOWN:"pageDown",END:"end",HOME:"home"},Rn=[kt.ARROW_LEFT,kt.ARROW_RIGHT,kt.PAGE_UP,kt.PAGE_DOWN,kt.END,kt.HOME],ti=[" ","\n"],Ri="dx-state-disabled";K().register({"formats/mention":zt},!0),mo=class extends Hi{constructor(Oi,eo){super(Oi,eo),this._mentions={},eo.mentions.forEach(So=>{let{marker:Oo}=So;Oo||(So.marker=Oo=Bt);const{template:Yo}=So;if(Yo){const zo=this.editorInstance._getTemplate(Yo);zo&&zt.addTemplate({marker:Oo,editorKey:this.editorInstance.getMentionKeyInTemplateStorage()},zo)}this._mentions[Oo]=(0,x.X)({},this._getDefaultOptions(),So)}),this._attachKeyboardHandlers(),this.addCleanCallback(this.clean.bind(this)),this.quill.on("text-change",this.onTextChange.bind(this))}_getDefaultOptions(){const Oi=super._getDefaultOptions();return(0,x.X)(Oi,{itemTemplate:"item",valueExpr:"this",displayExpr:"this",template:null,searchExpr:null,searchTimeout:500,minSearchLength:0})}_attachKeyboardHandlers(){this.quill.keyboard.addBinding({key:kt.ARROW_UP},this._moveToItem.bind(this,"prev")),this.quill.keyboard.addBinding({key:kt.ARROW_DOWN},this._moveToItem.bind(this,"next")),this.quill.keyboard.addBinding({key:[kt.ENTER,kt.SPACE]},this._selectItemHandler.bind(this));const Oi=this.quill.keyboard.bindings[kt.ENTER];Oi.unshift(Oi.pop()),this.quill.keyboard.addBinding({key:kt.ESCAPE},this._escapeKeyHandler.bind(this)),this.quill.keyboard.addBinding({key:[kt.ARROW_LEFT,kt.ARROW_RIGHT],shiftKey:!0},this._ignoreKeyHandler.bind(this)),this.quill.keyboard.addBinding({key:Rn},this._ignoreKeyHandler.bind(this))}_moveToItem(Oi){const eo=this._list.getDataSource();if(this._isMentionActive&&!eo.isLoading()){const Oo="next"===Oi?"first":"last";let Yo=(0,a.A)(this._list.option("focusedElement"))[Oi]();Yo=Yo.length?Yo:this._activeListItems[Oo](),this._list.option("focusedElement",(0,s.cc)(Yo)),this._list.scrollToItem(Yo)}return!this._isMentionActive}_ignoreKeyHandler(){return!this._isMentionActive}_fitIntoRange(Oi,eo,So){return Oi>So?eo:Oi<eo?So:Oi}_selectItemHandler(){return this._isMentionActive&&(this._list.option("items").length?this._list.selectItem(this._list.option("focusedElement")):this._popup.hide()),!this._isMentionActive}_escapeKeyHandler(){return this._isMentionActive&&this._popup.hide(),!this._isMentionActive}renderList(Oi,eo){this.compileGetters(this.options),super.renderList(Oi,eo)}compileGetters(Oi){let{displayExpr:eo,valueExpr:So}=Oi;this._valueGetter=(0,sn.Hz)(eo),this._idGetter=(0,sn.Hz)(So)}_getListConfig(Oi){const eo=super._getListConfig(Oi);return(0,x.X)(eo,{itemTemplate:this.options.itemTemplate,onContentReady:()=>{this._hasSearch&&(this._popup.repaint(),this._focusFirstElement(),this._hasSearch=!1)}})}insertEmbedContent(){const Oi=this._activeMentionConfig.marker.length,eo=Oi+this._searchValue.length,So=this.getPosition(),Oo=this._list.option("selectedItem"),Yo={value:this._valueGetter(Oo),id:this._idGetter(Oo),marker:this._activeMentionConfig.marker,keyInTemplateStorage:this.editorInstance.getMentionKeyInTemplateStorage()},zo=K().import("delta"),jr=Math.max(0,So-Oi),qr=this.quill.getFormat(jr),bs=(new zo).retain(jr).delete(eo).insert({mention:Yo}).insert(" ",qr);this.quill.updateContents(bs),this.quill.setSelection(jr+2)}_getLastInsertOperation(Oi){const eo=Oi[Oi.length-1];if("insert"in eo)return eo;const Oo="delete"in eo;if(Oo&&Oi.length>=2){const Yo=Oi[Oi.length-2];if(Oo&&"insert"in Yo)return Yo}return null}onTextChange(Oi,eo,So){if(So===ln)if(this._isMentionActive&&this._isPopupVisible)this._processSearchValue(Oi.ops[Oi.ops.length-1])&&this._filterList(this._searchValue);else{const{ops:Yo}=Oi,zo=this._getLastInsertOperation(Yo);zo&&this.checkMentionRequest(zo,Yo)}}get _isPopupVisible(){var Oi;return null===(Oi=this._popup)||void 0===Oi?void 0:Oi.option("visible")}_processSearchValue(Oi){if("insert"in Oi)this._searchValue+=Oi.insert;else{if(!this._searchValue.length||Oi.delete>1)return this._popup.hide(),!1;this._searchValue=this._searchValue.slice(0,-1)}return!0}checkMentionRequest(Oi,eo){let{insert:So}=Oi;const Oo=this.quill.getSelection();if(So&&(0,w.Kg)(So)&&Oo&&!this._isMarkerPartOfText(eo[0].retain)&&(this._activeMentionConfig=this._mentions[So],this._activeMentionConfig)){this._updateList(this._activeMentionConfig);const Yo=Oo.index&&"\n"===this._getCharByIndex(Oo.index-1);this.savePosition(Oo.index+Yo),this._popup.option("position",this._popupPosition),this._searchValue="",this._popup.show()}}_isMarkerPartOfText(Oi){return!(!Oi||ti.includes(this._getCharByIndex(Oi-1)))}_getCharByIndex(Oi){return this.quill.getContents(Oi,1).ops[0].insert}_updateList(Oi){let{dataSource:eo,displayExpr:So,valueExpr:Oo,itemTemplate:Yo,searchExpr:zo}=Oi;this.compileGetters({displayExpr:So,valueExpr:Oo}),this._list.unselectAll(),this._list.option({dataSource:eo,displayExpr:So,itemTemplate:Yo,searchExpr:zo})}_filterList(Oi){if(!this._isMinSearchLengthExceeded(Oi))return void this._resetFilter();const{searchTimeout:eo}=this._activeMentionConfig;eo?(clearTimeout(this._searchTimer),this._searchTimer=setTimeout(()=>{this._search(Oi)},eo)):this._search(Oi)}_isMinSearchLengthExceeded(Oi){return Oi.length>=this._activeMentionConfig.minSearchLength}_resetFilter(){clearTimeout(this._searchTimer),this._search(null)}_search(Oi){this._hasSearch=!0,this._list.option("searchValue",Oi)}_focusFirstElement(){if(!this._list)return;const Oi=this._activeListItems.first();this._list.option("focusedElement",(0,s.cc)(Oi)),this._list.scrollToItem(Oi)}_toggleActiveDescendant(Oi){if(Oi){const eo=this._list.getFocusedItemId();this.quill.root.setAttribute("aria-activedescendant",eo)}else this.quill.root.removeAttribute("aria-activedescendant")}get _popupPosition(){const Oi=this.getPosition(),{left:eo,top:So,height:Oo}=this.quill.getBounds(Oi&&Oi-1),{left:Yo,top:zo}=(0,a.A)(this.quill.root).offset();return{of:D.A.Event("positionEvent",{pageX:Yo+eo,pageY:zo+So}),offset:{v:Oo},my:"top left",at:"top left",collision:{y:"flip",x:"flipfit"}}}_getPopupConfig(){return(0,x.X)(super._getPopupConfig(),{hideOnParentScroll:!1,onShown:()=>{this._toggleActiveDescendant(!0),this._isMentionActive=!0,this._hasSearch=!1,this._focusFirstElement()},onHidden:()=>{this._toggleActiveDescendant(!1),this._list.unselectAll(),this._list.option("focusedElement",null),this._isMentionActive=!1,this._search(null)},focusStateEnabled:!1})}get _activeListItems(){return this._list.itemElements().filter(`:not(.${Ri})`)}clean(){Object.keys(this._mentions).forEach(Oi=>{this._mentions[Oi].template&&zt.removeTemplate({marker:Oi,editorKey:this.editorInstance.getMentionKeyInTemplateStorage()})})}}}const xo=mo;var vr=M(4504),rn=M(4757),en=M(778),Zn=M(1220);const nr="dxHtmlResizingModule",Xo=(0,N.b4)("keydown",nr),Hn=(0,N.b4)("scroll",nr),ui=(0,N.b4)("mousedown",nr);class ao extends be{constructor(Bt,kt){super(Bt,kt),this.allowedTargets=kt.allowedTargets||["image"],this.enabled=!!kt.enabled,this._hideFrameWithContext=this.hideFrame.bind(this),this._framePositionChangedHandler=this._prepareFramePositionChangedHandler(),this.enabled&&(this._attachEvents(),this._createResizeFrame())}_attachEvents(){D.A.on(this.quill.root,(0,N.b4)(en.U,nr),this._clickHandler.bind(this)),D.A.on(this.quill.root,Hn,this._framePositionChangedHandler),this.editorInstance.on("focusOut",this._hideFrameWithContext),this.quill.on("text-change",this._framePositionChangedHandler)}_detachEvents(){D.A.off(this.quill.root,`.${nr}`),this.editorInstance.off("focusOut",this._hideFrameWithContext),this.quill.off("text-change",this._framePositionChangedHandler)}_clickHandler(Bt){if(this._isAllowedTarget(Bt.target)){if(this._$target===Bt.target)return;this._$target=Bt.target;const kt=(0,a.A)(this._$target),Rn=Math.max((0,Ee.Ot)(kt)-(0,Ee.RG)(kt),this.resizable.option("minWidth")),ti=Math.max((0,Ee.P$)(kt)-(0,Ee.Oq)(kt),this.resizable.option("minHeight"));this.resizable.option({minWidth:Rn,minHeight:ti}),this.updateFramePosition(),this.showFrame(),this._adjustSelection()}else this._$target&&this.hideFrame()}_prepareFramePositionChangedHandler(){return()=>{this._$target&&this.updateFramePosition()}}_adjustSelection(){this.quill.getSelection()||this.quill.setSelection(0,0)}_isAllowedTarget(Bt){return this._isImage(Bt)}_isImage(Bt){return-1!==this.allowedTargets.indexOf("image")&&"IMG"===Bt.tagName.toUpperCase()}showFrame(){this._$resizeFrame.show(),D.A.on(this.quill.root,Xo,this._handleFrameKeyDown.bind(this))}_handleFrameKeyDown(Bt){const kt=(0,N.YD)(Bt);("del"===kt||"backspace"===kt)&&this._deleteImage(),this.hideFrame()}hideFrame(){this._$target=null,this._$resizeFrame.hide(),D.A.off(this.quill.root,Xo)}updateFramePosition(){const{height:Bt,width:kt,top:Rn,left:ti}=(0,rn.N)(this._$target),{top:Ri,left:Oi}=(0,rn.N)(this.quill.root),eo=this._getBorderWidth();this._$resizeFrame.css({height:Bt,width:kt,padding:1,top:Rn-Ri-eo-1,left:ti-Oi-eo-1}),(0,vr.Cy)(this._$resizeFrame,{left:0,top:0})}_getBorderWidth(){return parseInt(this._$resizeFrame.css("borderTopWidth"))}_createResizeFrame(){if(this._$resizeFrame)return;const{deviceType:Bt}=c.A.current();this._$resizeFrame=(0,a.A)("<div>").addClass("dx-resize-frame").toggleClass("dx-touch-device","desktop"!==Bt).appendTo(this.editorInstance._getQuillContainer()).hide(),D.A.on(this._$resizeFrame,ui,kt=>{kt.preventDefault()}),this.resizable=this.editorInstance._createComponent(this._$resizeFrame,Zn.A,{onResize:kt=>{this._$target&&((0,a.A)(this._$target).attr({height:kt.height,width:kt.width}),this.updateFramePosition())}})}_deleteImage(){var Bt;this._isAllowedTarget(this._$target)&&(null===(Bt=K().find(this._$target))||void 0===Bt||Bt.deleteAt(0))}option(Bt,kt){if("mediaResizing"!==Bt)if("enabled"===Bt){if(this.enabled===kt)return;this.enabled=kt,kt?(this._attachEvents(),this._createResizeFrame()):this.clean()}else"allowedTargets"===Bt&&Array.isArray(kt)&&(this.allowedTargets=kt);else this.handleOptionChangeValue(kt)}clean(){this._detachEvents(),this._$resizeFrame.remove(),this._$resizeFrame=void 0}}var Wi=M(6946),Ko=M(784);const Zo=["table","tableHeaderCell"],xr=["insertTable","insertHeaderRow","insertRowAbove","insertRowBelow","insertColumnLeft","insertColumnRight","deleteColumn","deleteRow","deleteTable","cellProperties","tableProperties"];function hr(ln){const Bt=ln.getModule("table");return null!=Bt&&Bt.tableFormats?Bt.tableFormats():Zo}function mn(ln,Bt){let{tableBlot:kt,quill:Rn}=Bt;(kt??Rn.scroll.find(ln.get(0))).format("tableWidth","initial")}function pi(ln){let Bt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ln.find("tr").eq(Bt).find("th, td")}function Ti(ln){const kt=[],Rn="horizontal"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"horizontal");return(Rn?pi(ln):Jo(ln)).each((Ri,Oi)=>{const eo=(0,a.A)(Oi);""===eo.get(0).style[Rn?"width":"height"]&&kt.push(eo)}),kt}function lo(ln,Bt){let{elements:kt,property:Rn,value:ti}=Bt;const Ri=ln.quill.getModule("table").tableBlots,Oi=`cell${(0,Wi.PT)(Rn,!0)}`;(0,ee.__)(kt,(eo,So)=>{var Oo;let Yo=ln.quill.scroll.find(So);if(!Ri.includes(Yo.statics.blotName)){const zo=Yo.descendant(jr=>Ri.includes(jr.statics.blotName));Yo=zo?zo[0]:null}null===(Oo=Yo)||void 0===Oo||Oo.format(Oi,`${ti}px`)})}function Eo(ln,Bt){return"horizontal"===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"horizontal")?Jo(ln,Bt):pi(ln,Bt)}function Jo(ln){let Bt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ln.find(`th:nth-child(${1+Bt}), td:nth-child(${1+Bt})`)}function fr(ln,Bt){for(var kt=arguments.length,Rn=new Array(kt>2?kt-2:0),ti=2;ti<kt;ti++)Rn[ti-2]=arguments[ti];return()=>{const Ri=ln.getModule("table");if(Ri)return ln.focus(),Ri[Bt](...Rn)}}var Gr=M(2148),Yn=M(6232),ei=M(9994);const Ii=400,ko=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"].map(ln=>({id:ln,value:Oe.A.format(`dxHtmlEditor-borderStyle${(0,Wi.PT)(ln,!0)}`)})),er="user",or="silent",Jr="dxHtmlEditor-dialogColorCaption",Wr="dxHtmlEditor-dialogBackgroundCaption",Xr="dxHtmlEditor-dialogLinkCaption",Mr="dxHtmlEditor-dialogInsertTableCaption",dn="dxHtmlEditor-dialogLinkUrlField",an="dxHtmlEditor-dialogLinkTextField",_n="dxHtmlEditor-dialogLinkTargetField",Wt="dx-formdialog-field-target",zn="dxHtmlEditor-dialogInsertTableRowsField",mi="dxHtmlEditor-dialogInsertTableColumnsField",Si={insertHeaderRow:"header",clear:"clearformat"};function go(ln){return{clear:Bt=>{let{event:kt}=Bt;const Rn=ln.quill.getSelection();var ti;Rn&&(ln.saveValueChangeEvent(kt),ln.quill.removeFormat(Rn),null===(ti=gn(ln))||void 0===ti||ti.updateFormatWidgets())},link:jn(ln),image:Ci(ln,ln.editorInstance.option("imageUpload")),color:Ki(ln,"color"),background:Ki(ln,"background"),orderedList:bt(ln,"list","ordered"),bulletList:bt(ln,"list","bullet"),alignLeft:bt(ln,"align","left"),alignCenter:bt(ln,"align","center"),alignRight:bt(ln,"align","right"),alignJustify:bt(ln,"align","justify"),codeBlock:Kt(ln,"code-block"),undo:Bt=>{let{event:kt}=Bt;ln.saveValueChangeEvent(kt),ln.quill.history.undo()},redo:Bt=>{let{event:kt}=Bt;ln.saveValueChangeEvent(kt),ln.quill.history.redo()},increaseIndent:Bt=>{let{event:kt}=Bt;pr(ln,["indent","+1",er],kt)},decreaseIndent:Bt=>{let{event:kt}=Bt;pr(ln,["indent","-1",er],kt)},superscript:bt(ln,"script","super"),subscript:bt(ln,"script","sub"),insertTable:_i(ln),insertHeaderRow:fr(ln.quill,"insertHeaderRow"),insertRowAbove:fr(ln.quill,"insertRowAbove"),insertRowBelow:fr(ln.quill,"insertRowBelow"),insertColumnLeft:fr(ln.quill,"insertColumnLeft"),insertColumnRight:fr(ln.quill,"insertColumnRight"),deleteColumn:fr(ln.quill,"deleteColumn"),deleteRow:fr(ln.quill,"deleteRow"),deleteTable:fr(ln.quill,"deleteTable"),cellProperties:Sr(ln,"cell"),tableProperties:Sr(ln,"table")}}function No(ln,Bt){let{contentTemplate:kt,title:Rn,minHeight:ti,minWidth:Ri,maxWidth:Oi}=Bt;ln.formDialogOption({contentTemplate:kt,title:Rn,minHeight:ti??0,minWidth:Ri??0,maxWidth:Oi??"none"})}function Sr(ln,Bt){return kt=>{var Rn;null!==(Rn=kt)&&void 0!==Rn&&Rn.length||(kt=(0,a.A)(function Vr(ln,Bt){const kt=ln.quill.getModule("table").getTable();return"table"===Bt?kt[0].domNode:kt[2].domNode}(ln,Bt)));const[ti,Ri]=ln.quill.getModule("table").getTable()??[],Oi=ln.quill.getFormat(ln.editorInstance.getSelection(!0)),eo=function $o(ln){return"cell"===ln?Co:Qi}(Bt)(ln,{$element:kt,formats:Oi,tableBlot:ti,rowBlot:Ri}),{contentTemplate:So,title:Oo,minHeight:Yo,minWidth:zo,maxWidth:jr}=ln.editorInstance._formDialog._popup.option(),qr={contentTemplate:So,title:Oo,minHeight:Yo,minWidth:zo,maxWidth:jr};let bs;ln.editorInstance.formDialogOption({contentTemplate:Pt=>{const St=(0,a.A)("<div>").appendTo(Pt),Dn=(0,a.A)("<div>").appendTo(St);return ln.editorInstance._createComponent(Dn,Yn.A,eo.formOptions),ln.editorInstance._createComponent(St,ei.A,{}),bs=Dn.dxForm("instance"),St},title:Oe.A.format(`dxHtmlEditor-${Bt}Properties`),minHeight:Ii,minWidth:Math.min(800,.9*(0,Ee.RG)((0,he.zk)())-1),maxWidth:.9*(0,Ee.RG)((0,he.zk)())});const Io=ln.editorInstance.showFormDialog();Io.done((Pt,St)=>{ln.saveValueChangeEvent(St),eo.applyHandler(bs),No(ln.editorInstance,qr)}),Io.fail(()=>{ln.quill.focus(),No(ln.editorInstance,qr)})}}function pr(ln,Bt,kt){ln.saveValueChangeEvent(kt),ln.quill.format(...Bt)}function bn(ln){return Array.isArray(ln)?ln[0]:ln}function jn(ln){return()=>{var Bt;ln.quill.focus();let kt=ln.quill.getSelection();const Rn=kt?ln.quill.getFormat():{},ti=void 0!==Rn.link&&0===(null===(Bt=kt)||void 0===Bt?void 0:Bt.length);let Ri=Rn.link||"";if(ti){const Oo=function Lt(ln,Bt){const Rn=J().import("formats/link");let ti,Ri;return[ti,Ri]=ln.quill.scroll.descendant(Rn,Bt.index),!ti&&0===Bt.length&&([ti,Ri]=ln.quill.scroll.descendant(Rn,Bt.index-1),ti&&(Ri+=1)),ti?{index:Bt.index-Ri,length:ti.length()}:null}(ln,kt);Oo?kt=Oo:Ri=""}const Oi=function Rt(ln,Bt){return!!Bt&&ln.quill.getText(Bt).length<Bt.length}(ln,kt),eo={href:Ri,text:kt&&!Oi?ln.quill.getText(kt):"",target:!Object.prototype.hasOwnProperty.call(Rn,"target")||!!Rn.target};ln.editorInstance.formDialogOption("title",Oe.A.format(Xr));const So=ln.editorInstance.showFormDialog({formData:eo,items:Mi(Oi)});So.done((Oo,Yo)=>{if(kt&&!Oi){const zo=Oo.text||Oo.href,{index:jr,length:qr}=kt;Oo.text=void 0,ln.saveValueChangeEvent(Yo),qr&&ln.quill.deleteText(jr,qr,or),ln.quill.insertText(jr,zo,"link",Oo,er),ln.quill.setSelection(jr+zo.length,0,er)}else Oo.text=kt||Oo.text?Oo.text:Oo.href,pr(ln,["link",Oo,er],Yo)}),So.fail(()=>{ln.quill.focus()})}}function Ci(ln,Bt){const kt=new Jn(ln,Bt);return()=>{kt.render()}}function Mi(ln){return[{dataField:"href",label:{text:Oe.A.format(dn)}},{dataField:"text",label:{text:Oe.A.format(an)},visible:!ln},{dataField:"target",editorType:"dxCheckBox",editorOptions:{text:Oe.A.format(_n)},cssClass:Wt,label:{visible:!1}}]}function Ki(ln,Bt){return()=>{const kt=ln.quill.getFormat();ln.editorInstance.formDialogOption("title",Oe.A.format("color"===Bt?Jr:Wr));const ti=ln.editorInstance.showFormDialog({formData:kt,items:[{dataField:Bt,editorType:"dxColorView",editorOptions:{focusStateEnabled:!1},label:{visible:!1}}]});ti.done((Ri,Oi)=>{pr(ln,[Bt,Ri[Bt],er],Oi)}),ti.fail(()=>{ln.quill.focus()})}}function bt(ln,Bt,kt){return Rn=>{var ti;let{event:Ri}=Rn;const eo=ln.quill.getFormat()[Bt]!==kt&&kt;pr(ln,[Bt,eo,er],Ri),null===(ti=gn(ln))||void 0===ti||ti.updateFormatWidgets(!0)}}function gn(ln){return ln._updateFormatWidget?ln:ln.quill.getModule("toolbar")}function Kt(ln,Bt){return kt=>{var Rn;let{event:ti}=kt;const Ri=ln.quill.getFormat(),Oi=Ri[Bt],eo=!((0,w.Lm)(Oi)?Oi:(0,w.O9)(Oi));pr(ln,[Bt,eo,er],ti),null===(Rn=gn(ln))||void 0===Rn||Rn._updateFormatWidget(Bt,eo,Ri)}}function _i(ln){return()=>{const Bt=ln.quill.getFormat();ln._tableFormats.some(ti=>Object.prototype.hasOwnProperty.call(Bt,ti))?ln.quill.focus():(ln.editorInstance.formDialogOption("title",Oe.A.format(Mr)),ln.editorInstance.showFormDialog({formData:{rows:1,columns:1},items:[{dataField:"columns",editorType:"dxNumberBox",editorOptions:{min:1},label:{text:Oe.A.format(zn)}},{dataField:"rows",editorType:"dxNumberBox",editorOptions:{min:1},label:{text:Oe.A.format(mi)}}]}).done((ti,Ri)=>{ln.quill.focus();const Oi=ln.quill.getModule("table");if(Oi){ln.saveValueChangeEvent(Ri);const{columns:eo,rows:So}=ti;Oi.insertTable(eo,So)}}).always(()=>{ln.quill.focus()}))}}function Qi(ln,Bt){let{$element:kt,formats:Rn,tableBlot:ti}=Bt;const Ri=(0,he.zk)();let Oi,eo,So;const Oo=kt,{editorInstance:Yo}=ln,zo=parseInt(Rn.tableWidth)||(0,Ee.Ot)(Oo),jr=Ri.getComputedStyle(Oo.get(0)),qr="start"===jr.textAlign?"left":jr.textAlign;return{formOptions:{colCount:2,formData:{width:zo,height:(0,w.O9)(Rn.tableHeight)?parseInt(Rn.tableHeight):(0,Ee.P$)(Oo),backgroundColor:Rn.tableBackgroundColor||jr.backgroundColor,borderStyle:Rn.tableBorderStyle||jr.borderTopStyle,borderColor:Rn.tableBorderColor||jr.borderTopColor,borderWidth:parseInt((0,w.O9)(Rn.tableBorderWidth)?Rn.tableBorderWidth:jr.borderTopWidth),alignment:Rn.tableAlign||qr},items:[{itemType:"group",caption:Oe.A.format("dxHtmlEditor-border"),colCountByScreen:{xs:2},colCount:2,items:[{dataField:"borderStyle",label:{text:Oe.A.format("dxHtmlEditor-style")},editorType:"dxSelectBox",editorOptions:{items:ko,valueExpr:"id",displayExpr:"value",placeholder:"Select style"}},{dataField:"borderWidth",label:{text:Oe.A.format("dxHtmlEditor-borderWidth")},editorOptions:{placeholder:Oe.A.format("dxHtmlEditor-pixels")}},{itemType:"simple",dataField:"borderColor",label:{text:Oe.A.format("dxHtmlEditor-borderColor")},colSpan:2,template:Io=>{const Pt=(0,a.A)("<div>");return Yo._createComponent(Pt,Gr.A,{editAlphaChannel:!0,value:Io.component.option("formData").borderColor,onInitialized:St=>{eo=St.component}}),Pt}}]},{itemType:"group",caption:Oe.A.format("dxHtmlEditor-dimensions"),colCountByScreen:{xs:2},colCount:2,items:[{dataField:"width",label:{text:Oe.A.format("dxHtmlEditor-width")},editorOptions:{min:0,placeholder:Oe.A.format("dxHtmlEditor-pixels")}},{dataField:"height",label:{text:Oe.A.format("dxHtmlEditor-height")},editorOptions:{min:0,placeholder:Oe.A.format("dxHtmlEditor-pixels")}}]},{itemType:"group",caption:Oe.A.format("dxHtmlEditor-tableBackground"),items:[{itemType:"simple",dataField:"backgroundColor",label:{text:Oe.A.format("dxHtmlEditor-borderColor")},template:Io=>{const Pt=(0,a.A)("<div>");return Yo._createComponent(Pt,Gr.A,{editAlphaChannel:!0,value:Io.component.option("formData").backgroundColor,onInitialized:St=>{So=St.component}}),Pt}}]},{itemType:"group",caption:Oe.A.format("dxHtmlEditor-alignment"),items:[{itemType:"simple",label:{text:Oe.A.format("dxHtmlEditor-horizontal")},template:()=>{const Io=(0,a.A)("<div>");return Yo._createComponent(Io,ze.A,{items:[{value:"left",icon:"alignleft"},{value:"center",icon:"aligncenter"},{value:"right",icon:"alignright"},{value:"justify",icon:"alignjustify"}],keyExpr:"value",selectedItemKeys:[qr],onInitialized:Pt=>{Oi=Pt.component}}),Io}}]}],showColonAfterLabel:!0,labelLocation:"top",minColWidth:400},applyHandler:Io=>{const Pt=Io.option("formData");(function sr(ln,Bt){let{$table:kt,newHeight:Rn,newWidth:ti,tableBlot:Ri}=Bt;if((0,w.O9)(ti))if(Ti(kt).length>0)ln.editorInstance.format("tableWidth",`${ti}px`);else{const So=pi(kt),Oo=(0,Ee.Ot)(kt);mn(kt,{tableBlot:Ri}),(0,ee.__)(So,(Yo,zo)=>{const jr=(0,a.A)(zo),qr=ti/Oo*(0,Ee.Ot)(jr),bs=Eo(kt,jr.index(),"horizontal");lo(ln,{elements:bs,property:"width",value:qr})})}const Oi=Ti(kt,"vertical");if(Oi?.length>0)Ri.format("tableHeight",`${Rn}px`);else{const eo=Jo(kt),So=(0,Ee.P$)(kt);(0,ee.__)(eo,(Oo,Yo)=>{const zo=(0,a.A)(Yo),jr=Rn/So*(0,Ee.P$)(zo),qr=Eo(kt,Oo,"vertical");lo(ln,{elements:qr,property:"height",value:jr})})}})(ln,{$table:Oo,newHeight:Pt.height,newWidth:Pt.width===zo?void 0:Pt.width,tableBlot:ti}),ln.editorInstance.format("tableBorderStyle",Pt.borderStyle),ln.editorInstance.format("tableBorderWidth",`${Pt.borderWidth}px`),ln.editorInstance.format("tableBorderColor",eo.option("value")),ln.editorInstance.format("tableBackgroundColor",So.option("value")),ln.editorInstance.format("tableTextAlign",Oi.option("selectedItemKeys")[0])}}}function Co(ln,Bt){let{$element:kt,formats:Rn,tableBlot:ti,rowBlot:Ri}=Bt;const Oi=(0,he.zk)();let eo,So,Oo,Yo;const zo=kt,jr=(0,w.O9)(Rn.cellWidth)?parseInt(Rn.cellWidth):(0,Ee.Ot)(zo),{editorInstance:qr}=ln,bs=Oi.getComputedStyle(zo.get(0)),Io="start"===bs.textAlign?"left":bs.textAlign;return{formOptions:{colCount:2,formData:{width:jr,height:(0,w.O9)(Rn.cellHeight)?parseInt(Rn.cellHeight):(0,Ee.P$)(zo),backgroundColor:bn(Rn.cellBackgroundColor)||bs.backgroundColor,borderStyle:Rn.cellBorderStyle||bs.borderTopStyle,borderColor:bn(Rn.cellBorderColor)||bs.borderTopColor,borderWidth:parseInt((0,w.O9)(Rn.cellBorderWidth)?Rn.cellBorderWidth:bs.borderTopWidth),alignment:Rn.cellTextAlign||Io,verticalAlignment:Rn.cellVerticalAlign||bs.verticalAlign,verticalPadding:parseInt((0,w.O9)(Rn.cellPaddingTop)?Rn.cellPaddingTop:bs.paddingTop),horizontalPadding:parseInt((0,w.O9)(Rn.cellPaddingLeft)?Rn.cellPaddingLeft:bs.paddingLeft)},items:[{itemType:"group",caption:Oe.A.format("dxHtmlEditor-border"),colCountByScreen:{xs:2},colCount:2,items:[{dataField:"borderStyle",label:{text:Oe.A.format("dxHtmlEditor-style")},editorType:"dxSelectBox",editorOptions:{items:ko,valueExpr:"id",displayExpr:"value"}},{dataField:"borderWidth",label:{text:Oe.A.format("dxHtmlEditor-borderWidth")},editorOptions:{placeholder:Oe.A.format("dxHtmlEditor-pixels")}},{itemType:"simple",dataField:"borderColor",colSpan:2,label:{text:Oe.A.format("dxHtmlEditor-borderColor")},template:St=>{const Dn=(0,a.A)("<div>");return qr._createComponent(Dn,Gr.A,{editAlphaChannel:!0,value:St.component.option("formData").borderColor,onInitialized:ai=>{Oo=ai.component}}),Dn}}]},{itemType:"group",caption:Oe.A.format("dxHtmlEditor-dimensions"),colCount:2,colCountByScreen:{xs:2},items:[{dataField:"width",label:{text:Oe.A.format("dxHtmlEditor-width")},editorOptions:{min:0,placeholder:Oe.A.format("dxHtmlEditor-pixels")}},{dataField:"height",label:{text:Oe.A.format("dxHtmlEditor-height")},editorOptions:{min:0,placeholder:Oe.A.format("dxHtmlEditor-pixels")}},{dataField:"verticalPadding",label:{text:Oe.A.format("dxHtmlEditor-paddingVertical")},editorOptions:{placeholder:Oe.A.format("dxHtmlEditor-pixels")}},{label:{text:Oe.A.format("dxHtmlEditor-paddingHorizontal")},dataField:"horizontalPadding",editorOptions:{placeholder:Oe.A.format("dxHtmlEditor-pixels")}}]},{itemType:"group",caption:Oe.A.format("dxHtmlEditor-tableBackground"),items:[{itemType:"simple",dataField:"backgroundColor",label:{text:Oe.A.format("dxHtmlEditor-borderColor")},template:St=>{const Dn=(0,a.A)("<div>");return qr._createComponent(Dn,Gr.A,{editAlphaChannel:!0,value:St.component.option("formData").backgroundColor,onInitialized:ai=>{Yo=ai.component}}),Dn}}]},{itemType:"group",caption:Oe.A.format("dxHtmlEditor-alignment"),colCount:2,items:[{itemType:"simple",label:{text:Oe.A.format("dxHtmlEditor-horizontal")},template:()=>{const St=(0,a.A)("<div>");return qr._createComponent(St,ze.A,{items:[{value:"left",icon:"alignleft"},{value:"center",icon:"aligncenter"},{value:"right",icon:"alignright"},{value:"justify",icon:"alignjustify"}],keyExpr:"value",selectedItemKeys:[Io],onInitialized:Dn=>{eo=Dn.component}}),St}},{itemType:"simple",label:{text:Oe.A.format("dxHtmlEditor-vertical")},template:()=>{const St=(0,a.A)("<div>");return qr._createComponent(St,ze.A,{items:[{value:"top",icon:"verticalaligntop"},{value:"middle",icon:"verticalaligncenter"},{value:"bottom",icon:"verticalalignbottom"}],keyExpr:"value",selectedItemKeys:[bs.verticalAlign],onInitialized:Dn=>{So=Dn.component}}),St}}]}],showColonAfterLabel:!0,labelLocation:"top",minColWidth:400},applyHandler:St=>{const Dn=St.option("formData"),ai=Dn.width===parseInt(jr)?void 0:Dn.width;(function lr(ln,Bt){let{$cell:kt,newHeight:Rn,newWidth:ti,tableBlot:Ri,rowBlot:Oi}=Bt;const eo=(0,a.A)(kt.closest("table"));if((0,w.O9)(ti)){const Oo=(0,a.A)(kt).index();let Yo=Eo(eo,Oo);const zo=ti-(0,Ee.Ot)(kt);ti>(0,Ee.Ot)(eo)&&mn(eo,{tableBlot:Ri}),lo(ln,{elements:Yo,property:"width",value:ti});const qr=kt.next();if(0===Ti(eo).length)if(mn(eo,{tableBlot:Ri}),1===qr.length){Yo=Eo(eo,Oo+1);const Io=(0,Ee.Ot)(Yo.eq(0))-zo;lo(ln,{elements:Yo,property:"width",value:Math.max(Io,0)})}else if(1===kt.prev().length){Yo=Eo(eo,Oo-1);const Pt=(0,Ee.Ot)(Yo.eq(0))-zo;lo(ln,{elements:Yo,property:"width",value:Math.max(Pt,0)})}}Oi.children.forEach(Oo=>{Oo.format("cellHeight",`${Rn}px`)}),0===Ti(eo,"vertical").length&&eo.css("height","auto")})(ln,{$cell:zo,newHeight:Dn.height,newWidth:ai,tableBlot:ti,rowBlot:Ri}),ln.editorInstance.format("cellBorderWidth",`${Dn.borderWidth}px`),ln.editorInstance.format("cellBorderColor",Oo.option("value")),ln.editorInstance.format("cellBorderStyle",Dn.borderStyle),ln.editorInstance.format("cellBackgroundColor",Yo.option("value")),ln.editorInstance.format("cellTextAlign",eo.option("selectedItemKeys")[0]),ln.editorInstance.format("cellVerticalAlign",So.option("selectedItemKeys")[0]),ln.editorInstance.format("cellPaddingLeft",`${Dn.horizontalPadding}px`),ln.editorInstance.format("cellPaddingRight",`${Dn.horizontalPadding}px`),ln.editorInstance.format("cellPaddingTop",`${Dn.verticalPadding}px`),ln.editorInstance.format("cellPaddingBottom",`${Dn.verticalPadding}px`)}}}const Pr=(0,N.b4)("dxcontextmenu","dxHtmlEditorTableContextMenu");let wr=be;const Fo=ln=>Oe.A.format(`dxHtmlEditor-${(0,Wi.PT)(ln)}`);K()&&(wr=class extends be{constructor(ln,Bt){super(ln,Bt),this.enabled=!!Bt.enabled,this._quillContainer=this.editorInstance._getQuillContainer(),this.addCleanCallback(this.prepareCleanCallback()),this._formatHandlers=go(this),this._tableFormats=hr(ln),this.enabled&&this._enableContextMenu(Bt.items)}_enableContextMenu(ln){var Bt;null===(Bt=this._contextMenu)||void 0===Bt||Bt.dispose(),this._contextMenu=this._createContextMenu(ln),this._attachEvents()}_attachEvents(){D.A.on(this.editorInstance._getContent(),Pr,this._prepareContextMenuHandler())}_detachEvents(){D.A.off(this.editorInstance._getContent(),Pr)}_createContextMenu(ln){const Bt=(0,a.A)("<div>").appendTo(this.editorInstance.$element()),kt=this._getMenuConfig(ln);return this.editorInstance._createComponent(Bt,Ko.A,kt)}showPropertiesForm(){let ln=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cell";const Bt=(0,a.A)(this._targetElement).closest("cell"===ln?"th, td":"table");this._contextMenu.hide(),this._formatHandlers[`${ln}Properties`](Bt),this._targetElement=null}_isAcceptableItem(ln,Bt){return!ln||ln===Bt}_handleObjectItem(ln){if(ln.name&&this._isAcceptableItem(ln.widget,"dxButton")){const Bt=this._prepareMenuItemConfig(ln.name);return(0,x.X)(!0,Bt,ln)}return ln.items&&(ln.items=this._prepareMenuItems(ln.items)),ln}_prepareMenuItemConfig(ln){const Bt=Si[ln]??ln,kt=(0,Wi.Ns)(ln);return{text:Fo(kt),icon:Bt.toLowerCase(),onClick:this._formatHandlers[ln]??Kt(this,ln)}}_prepareMenuItems(ln){const Bt=[];return(0,ee.__)(ln,(kt,Rn)=>{let ti;(0,w.Gv)(Rn)?ti=this._handleObjectItem(Rn):(0,w.Kg)(Rn)&&(ti=this._prepareMenuItemConfig(Rn)),ti&&Bt.push(ti)}),Bt}_getMenuConfig(ln){const Bt=[{text:Fo("insert"),items:["insertHeaderRow","insertRowAbove","insertRowBelow",(0,x.X)(this._prepareMenuItemConfig("insertColumnLeft"),{beginGroup:!0}),"insertColumnRight"]},{text:Fo("delete"),items:["deleteColumn","deleteRow","deleteTable"]},(0,x.X)(this._prepareMenuItemConfig("cellProperties"),{onClick:()=>{this.showPropertiesForm("cell")}}),(0,x.X)(this._prepareMenuItemConfig("tableProperties"),{onClick:()=>{this.showPropertiesForm("table")}})],kt=this._prepareMenuItems(null!=ln&&ln.length?ln:Bt);return{target:this._quillContainer,showEvent:null,hideOnParentScroll:!1,items:kt}}_prepareContextMenuHandler(){return ln=>{this._isTableTarget(ln.target)&&(this._targetElement=ln.target,this._setContextMenuPosition(ln),this._contextMenu.show(),ln.preventDefault())}}_setContextMenuPosition(ln){const Bt=this._quillContainer.get(0).getBoundingClientRect();this._contextMenu.option({position:{my:"left top",at:"left top",collision:"fit fit",offset:{x:ln.clientX-Bt.left,y:ln.clientY-Bt.top}}})}_isTableTarget(ln){return!!(0,a.A)(ln).closest(".dx-htmleditor-content td, .dx-htmleditor-content th").length}clean(){this._detachEvents()}option(ln,Bt){if("tableContextMenu"!==ln){if("enabled"===ln)this.enabled=Bt,Bt?this._enableContextMenu():this.clean();else if("items"===ln){var kt;null===(kt=this._contextMenu)||void 0===kt||kt.dispose(),this._contextMenu=this._createContextMenu(Bt)}}else this.handleOptionChangeValue(Bt)}prepareCleanCallback(){return()=>{this.clean()}}});const os=wr;var fs=M(1773),js=M(3312);const es="dx-htmleditor-column-resizer",gs="dx-htmleditor-row-resizer",Ca={minColumnWidth:40,minRowHeight:24},ct="dxHtmlTableResizingModule",Ut=(0,N.b4)("dxpointerdown",ct),nn=(0,N.b4)("scroll",ct);class kn extends be{constructor(Bt,kt){super(Bt,kt),this.enabled=!!kt.enabled,this._tableResizeFrames=[],this._minColumnWidth=this._minSizeLimit("minColumnWidth",kt.minColumnWidth),this._minRowHeight=this._minSizeLimit("minRowHeight",kt.minRowHeight),this._quillContainer=this.editorInstance._getQuillContainer(),this._tableData=[],this.enabled&&this._applyResizing()}_applyResizing(Bt){Bt?this._applyResizingImpl():this.editorInstance.addContentInitializedCallback(this._applyResizingImpl.bind(this)),this.addCleanCallback(this.clean.bind(this)),this._resizeHandlerWithContext=fs.A.add(this._resizeHandler.bind(this))}_minSizeLimit(Bt,kt){return(0,w.O9)(kt)?Math.max(kt,0):Ca[Bt]}_applyResizingImpl(){const Bt=this._findTables();Bt.length&&(this._fixTablesWidths(Bt),this._createResizeFrames(Bt),this._updateFramesPositions(),this._updateFramesSeparators()),this._attachEvents()}_attachEvents(){D.A.on(this.editorInstance._getContent(),nn,this._updateFramesPositions.bind(this)),this.quill.on("text-change",this._getQuillTextChangeHandler())}_detachEvents(){D.A.off(this.editorInstance._getContent(),ct),this.quill.off("text-change",this._quillTextChangeHandler)}_getQuillTextChangeHandler(Bt,kt,Rn){return(ti,Ri,Oi)=>{if(this._isTableChanging()){const eo=this._findTables();this._removeResizeFrames(),"api"===Oi&&this._fixTablesWidths(eo),this._updateTablesColumnsWidth(eo),this._createResizeFrames(eo),this._updateFramesPositions(),this._updateFramesSeparators()}else this._updateFramesPositions(),this._isDragging||this._updateFramesSeparators()}}_getFrameForTable(Bt){var kt;return null===(kt=this._framesForTables)||void 0===kt?void 0:kt.get(Bt.get(0))}_resizeHandler(){this._windowResizeTimeout=setTimeout(()=>{const Bt=this._findTables();(0,ee.__)(Bt,(kt,Rn)=>{const ti=(0,a.A)(Rn),Ri=this._tableResizeFrames[kt],Oi=(0,Ee.Ot)(ti),eo=this._tableLastWidth(Ri);Math.abs(Oi-eo)>1&&(this._tableLastWidth(Ri,Oi),this._updateColumnsWidth(ti,kt))}),this._updateFramesPositions(),this._updateFramesSeparators()})}_findTables(){return(0,a.A)(this._quillContainer).find("table")}_getWidthStyleValue(Bt){const kt=Bt[0].style.width;return""!==kt?parseInt(kt):void 0}_tableLastWidth(Bt,kt){if(!(0,w.O9)(kt))return Bt?.lastWidth;Bt.lastWidth=kt}_fixTablesWidths(Bt){(0,ee.__)(Bt,(kt,Rn)=>{const ti=(0,a.A)(Rn),Ri=this._getTableDeterminantElements(ti,"horizontal");this._tableResizeFrames[kt]||(this._tableResizeFrames[kt]={lastWidth:void 0});const Oi=this._getFrameForTable(ti);if(Oi||this._tableResizeFrames.push({$table:ti}),0===Ti(ti).length){const{columnsSum:eo}=this._getColumnElementsSum(Ri);mn(ti,{quill:this.quill});const So=this._tableLastWidth(Oi)??(0,Ee.Ot)(ti);Oi&&this._tableLastWidth(Oi,Math.max(eo,So))}})}_createResizeFrames(Bt){this._framesForTables=new Map,Bt.each((kt,Rn)=>{var ti;const Ri=(0,a.A)(Rn),Oi=null===(ti=this._tableResizeFrames[kt])||void 0===ti?void 0:ti.$table,eo=this._tableResizeFrames[kt].lastWidth;this._tableResizeFrames[kt]={$frame:this._createTableResizeFrame(Rn),$table:Ri,index:kt,lastWidth:Oi&&Rn===Oi.get(0)?eo:void 0,columnsCount:this._getTableDeterminantElements(Ri,"horizontal").length,rowsCount:this._getTableDeterminantElements(Ri,"vertical").length},this._framesForTables.set(Rn,this._tableResizeFrames[kt])}),this._tableResizeFrames.length=Bt.length}_isTableChanging(){const Bt=this._findTables();let kt=!1;return Bt.length!==this._tableResizeFrames.length?kt=!0:(0,ee.__)(Bt,(Rn,ti)=>{const Ri=(0,a.A)(ti),Oi=this._tableResizeFrames[Rn],eo=Oi?.columnsCount!==this._getTableDeterminantElements(Ri,"horizontal").length,So=Oi?.rowsCount!==this._getTableDeterminantElements(Ri,"vertical").length;if(eo||So)return kt=!0,!1}),kt}_removeResizeFrames(Bt){var kt;(0,ee.__)(this._tableResizeFrames,(Rn,ti)=>{var Ri;ti.$frame&&(this._detachSeparatorEvents(null===(Ri=ti.$frame)||void 0===Ri?void 0:Ri.find(`.${es}, .${gs}`)),ti.$frame.remove())}),null===(kt=this._framesForTables)||void 0===kt||kt.clear(),Bt&&(this._tableResizeFrames=[])}_detachSeparatorEvents(Bt){Bt.each((kt,Rn)=>{D.A.off(Rn,Ut)})}_createTableResizeFrame(Bt){return(0,a.A)("<div>").addClass("dx-table-resize-frame").appendTo(this._quillContainer)}_updateFramesPositions(){(0,ee.__)(this._tableResizeFrames,(Bt,kt)=>{this._updateFramePosition(kt.$table,kt.$frame)})}_updateFramePosition(Bt,kt){const{height:Rn,width:ti,top:Ri,left:Oi}=(0,rn.N)(Bt.get(0)),{top:eo,left:So}=(0,rn.N)(this.quill.root);kt.css({height:Rn,width:ti,top:Ri-eo,left:Oi-So}),(0,vr.Cy)(kt,{left:0,top:0})}_updateFramesSeparators(Bt){(0,ee.__)(this._tableResizeFrames,(kt,Rn)=>{Bt?this._updateFrameSeparators(Rn,Bt):(this._updateFrameSeparators(Rn,"vertical"),this._updateFrameSeparators(Rn,"horizontal"))})}_isDraggable(Bt){return Bt.hasClass("dx-draggable")&&Bt.is(":visible")}_removeDraggable(Bt,kt){this._isDraggable(Bt)&&((0,a.A)(Bt).dxDraggable("instance").dispose(),(0,a.A)(Bt).addClass(kt))}_getDirectionInfo(Bt){return"vertical"===Bt?{lineResizerClass:gs,sizeFunction:kt=>(0,Ee.P$)(kt),positionCoordinate:"top",positionStyleProperty:"height",positionCoordinateName:"y"}:{lineResizerClass:es,sizeFunction:kt=>(0,Ee.Ot)(kt),positionCoordinate:this.editorInstance.option("rtlEnabled")?"right":"left",positionStyleProperty:"width",positionCoordinateName:"x"}}_getSize(Bt,kt){return kt.sizeFunction(Bt)}_updateFrameSeparators(Bt,kt){const Rn=this._getTableDeterminantElements(Bt.$table,kt),Ri=Rn.length-1,Oi=this._getDirectionInfo(kt),eo=Bt.$frame.find(`.${Oi.lineResizerClass}`),So={transform:"none"};let Oo=0;for(let Yo=0;Yo<=Ri;Yo++){Oo+=this._getSize(Rn.eq(Yo),Oi),(0,w.O9)(eo[Yo])||(eo[Yo]=(0,a.A)("<div>").addClass(Oi.lineResizerClass).appendTo(Bt.$frame).get(0));const zo=(0,a.A)(eo[Yo]);this._removeDraggable(zo,Oi.lineResizerClass),So[Oi.positionCoordinate]=Oo-2,(0,a.A)(zo).css(So),this._attachColumnSeparatorEvents({lineSeparator:eo[Yo],index:Yo,$determinantElements:Rn,frame:Bt,direction:kt})}}_getTableDeterminantElements(Bt,kt){return"vertical"===kt?Bt.find("th:first-child, td:first-child"):pi(Bt)}_attachColumnSeparatorEvents(Bt){D.A.on(Bt.lineSeparator,Ut,()=>{this._createDraggableElement(Bt)})}_dragStartHandler(Bt){let{$determinantElements:kt,index:Rn,frame:ti,direction:Ri,lineSeparator:Oi}=Bt;const eo=this._getDirectionInfo(Ri);this._isDragging=!0,this._fixColumnsWidth(ti.$table),this._startLineSize=parseInt(this._getSize((0,a.A)(kt[Rn]),eo)),this._startTableWidth=(0,Ee.Ot)(ti.$table),this._startLineSeparatorPosition=parseInt((0,a.A)(Oi).css(eo.positionCoordinate)),this._nextLineSize=0,kt[Rn+1]?this._nextLineSize=parseInt(this._getSize((0,a.A)(kt[Rn+1]),eo)):"horizontal"===Ri&&mn(ti.$table,{quill:this.quill})}_shouldRevertOffset(Bt){return"horizontal"===Bt&&this.editorInstance.option("rtlEnabled")}_isNextColumnWidthEnough(Bt,kt,Rn){if(!this._nextLineSize)return!0;if(Bt>=this._minColumnWidth){const ti=this._nextColumnOffsetLimit?Rn<this._nextColumnOffsetLimit:Rn<0,Ri=Math.abs(this._getWidthStyleValue(kt)-(0,Ee.Ot)(kt))>3;return ti||!Ri}return!1}_shouldSetNextColumnWidth(Bt){return this._nextLineSize&&Bt>0}_horizontalDragHandler(Bt){let{currentLineNewSize:kt,directionInfo:Rn,eventOffset:ti,$determinantElements:Ri,index:Oi,frame:eo}=Bt,So=this._nextLineSize&&this._nextLineSize-ti;const Oo=kt>=this._minColumnWidth,Yo=Eo(eo.$table,Oi),zo=Eo(eo.$table,Oi+1),jr=(0,Ee.Ot)(Yo.eq(0))-kt;if(Oo)if(this._isNextColumnWidthEnough(So,Ri.eq(Oi+1),ti)){lo(this,{elements:Yo,property:Rn.positionStyleProperty,value:kt}),this._shouldSetNextColumnWidth(So)&&lo(this,{elements:zo,property:Rn.positionStyleProperty,value:So});const qr=Math.abs(this._startTableWidth-(0,Ee.Ot)(eo.$table))<3;(Math.abs(jr)>3||!this._nextLineSize&&qr)&&(lo(this,{elements:Yo,property:Rn.positionStyleProperty,value:(0,Ee.Ot)(Yo.eq(0))}),So+=kt-(0,Ee.Ot)(Yo.eq(0)),this._shouldSetNextColumnWidth(So)&&lo(this,{elements:zo,property:Rn.positionStyleProperty,value:So}))}else this._nextColumnOffsetLimit=this._nextColumnOffsetLimit||ti;this._$highlightedElement.css(Rn.positionCoordinate,`${this._startLineSeparatorPosition+ti+jr}px`)}_verticalDragHandler(Bt){let{currentLineNewSize:kt,directionInfo:Rn,eventOffset:ti,$determinantElements:Ri,index:Oi,frame:eo}=Bt;const So=Math.max(kt,this._minRowHeight);lo(this,{elements:Eo(eo.$table,Oi,"vertical"),property:Rn.positionStyleProperty,value:So});const Yo=(0,Ee.P$)(Ri.eq(Oi))-kt;this._$highlightedElement.css(Rn.positionCoordinate,`${this._startLineSeparatorPosition+ti+Yo}px`)}_dragMoveHandler(Bt,kt){let{$determinantElements:Rn,index:ti,frame:Ri,direction:Oi}=kt;const eo=this._getDirectionInfo(Oi);let So=Bt.offset[eo.positionCoordinateName];this.editorInstance._saveValueChangeEvent(Bt),this._shouldRevertOffset(Oi)&&(So=-So);const Oo=this._startLineSize+So;"horizontal"===Oi?this._horizontalDragHandler({currentLineNewSize:Oo,directionInfo:eo,eventOffset:So,$determinantElements:Rn,index:ti,frame:Ri}):this._verticalDragHandler({currentLineNewSize:Oo,directionInfo:eo,eventOffset:So,$determinantElements:Rn,index:ti,frame:Ri}),this._updateFramePosition(Ri.$table,Ri.$frame)}_dragEndHandler(Bt){var kt;null===(kt=this._$highlightedElement)||void 0===kt||kt.remove(),this._isDragging=void 0,this._nextColumnOffsetLimit=void 0,this._tableLastWidth(Bt.frame,(0,Ee.Ot)(Bt.frame.$table)),this._updateFramesPositions(),this._updateFramesSeparators()}_isLastColumnResizing(Bt){let{$determinantElements:kt,index:Rn}=Bt;return!(0,w.O9)(kt[Rn+1])}_getBoundaryConfig(Bt){const kt={};if("vertical"===Bt.direction)kt.boundary=Bt.frame.$table,kt.boundOffset={bottom:(0,he.Vd)()?-(0,Ee.Oq)((0,he.zk)()):-(0,Ee.P$)(this._quillContainer),top:0,left:0,right:0};else if(this._isLastColumnResizing(Bt)){const Rn=this.editorInstance._getContent();kt.boundary=Rn,kt.boundOffset={bottom:0,top:0,left:Rn.css("paddingLeft"),right:Rn.css("paddingRight")}}else kt.boundary=Bt.frame.$table;return kt}_createDraggableElement(Bt){var kt;const Rn=this._getBoundaryConfig(Bt),ti="vertical"===Bt.direction?"dx-htmleditor-highlighted-row":"dx-htmleditor-highlighted-column";null===(kt=this._$highlightedElement)||void 0===kt||kt.remove(),this._$highlightedElement=(0,a.A)("<div>").addClass(`${ti}`).insertAfter((0,a.A)(Bt.lineSeparator));const Ri={contentTemplate:null,allowMoveByClick:!1,dragDirection:Bt.direction,onDragMove:Oi=>{let{event:So}=Oi;this._dragMoveHandler(So,Bt)},onDragStart:()=>{this._dragStartHandler(Bt)},onDragEnd:()=>{this._dragEndHandler(Bt)}};(0,x.X)(Ri,Rn),this._currentDraggableElement=this.editorInstance._createComponent(Bt.lineSeparator,js.A,Ri)}_fixColumnsWidth(Bt){const kt=this._getTableDeterminantElements(Bt);(0,ee.__)(kt,(Rn,ti)=>{const Ri=(0,Ee.Ot)(ti);lo(this,{elements:Eo(Bt,Rn),property:"width",value:Math.max(Ri,this._minColumnWidth)})})}_getColumnElementsSum(Bt){const kt=[];let Rn=0;return(0,ee.__)(Bt,(ti,Ri)=>{const Oi=(0,a.A)(Ri),eo=this._getWidthStyleValue(Oi)||(0,Ee.Ot)(Oi);kt[ti]=Math.max(eo,this._minColumnWidth),Rn+=kt[ti]}),{columnsWidths:kt,columnsSum:Rn}}_setColumnsRatioWidth(Bt,kt,Rn,ti){(0,ee.__)(Bt,Ri=>{const Oi=Eo(ti,Ri);let eo;eo=kt>0?this._minColumnWidth+Math.round((Rn[Ri]-this._minColumnWidth)*kt):this._minColumnWidth,lo(this,{elements:Oi,property:"width",value:eo})})}_updateColumnsWidth(Bt,kt){const Rn=this._getTableDeterminantElements(Bt);let ti=this._tableResizeFrames[kt];ti||(this._tableResizeFrames[kt]={}),ti=this._tableResizeFrames[kt];const Ri=this._tableLastWidth(ti)||(0,Ee.Ot)(Bt);let Oi;const{columnsWidths:eo,columnsSum:So}=this._getColumnElementsSum(Rn),Oo=Rn.length*this._minColumnWidth;Oi=So>Oo?(Ri-Oo)/(So-Oo):-1,this._tableLastWidth(ti,Oi>0?Ri:Oo),this._setColumnsRatioWidth(Rn,Oi,eo,Bt)}_updateTablesColumnsWidth(Bt){(0,ee.__)(Bt,(kt,Rn)=>{this._updateColumnsWidth((0,a.A)(Rn),kt)})}option(Bt,kt){"tableResizing"!==Bt?"enabled"===Bt?(this.enabled=kt,kt?this._applyResizing(!0):this.clean()):["minColumnWidth","minRowHeight"].includes(Bt)&&(this[`_${Bt}`]=this._minSizeLimit(Bt,kt)):this.handleOptionChangeValue(kt)}clean(){this._removeResizeFrames(!0),this._detachEvents(),fs.A.remove(this._resizeHandlerWithContext),clearTimeout(this._windowResizeTimeout),this._resizeHandlerWithContext=void 0,this._isDragging=void 0,this._startTableWidth=void 0,clearTimeout(this._attachResizerTimeout)}}M(6520),M(9430),M(9810);var fo=M(3651);class Xi{constructor(){this._collection=[]}clear(){this._collection=[]}add(Bt,kt){this._collection.push({name:Bt,instance:kt})}remove(Bt){this._collection=this._collection.filter(kt=>kt.name!==Bt)}getByName(Bt){let kt=null;return(0,ee.__)(this._collection,(Rn,ti)=>{let{name:Ri,instance:Oi}=ti;if(Ri===Bt)return kt=Oi,!1}),kt}each(Bt){this._collection.forEach(kt=>{let{name:Rn,instance:ti}=kt;return ti&&Bt(Rn,ti)})}}let Vo=be;if(K()){const ln="dx-htmleditor-toolbar-wrapper",Bt="dx-htmleditor-toolbar",kt="dx-htmleditor-toolbar-format",Rn="dx-htmleditor-toolbar-separator",ti="dx-htmleditor-toolbar-menu-separator",Ri="dx-format-active",Oi="dx-state-selected",eo="dx-icon",So="selection-change",Oo="user",Yo="silent",zo={66:"bold",73:"italic",85:"underline"},jr={b:66,i:73,u:85},qr=Io=>Oe.A.format(`dxHtmlEditor-${(0,Wi.PT)(Io)}`),bs=(Io,Pt)=>"header"===Pt?(0,w.O9)(Io)&&!1!==Io?`${qr("heading")} ${Io}`:qr("normalText"):qr(Io)||Io;Vo=class extends be{constructor(Io,Pt){var St;if(super(Io,Pt),St=this,this._toolbarWidgets=new Xi,this._formatHandlers=go(this),this._tableFormats=hr(Io),(0,w.O9)(Pt.items)){this._addCallbacks(),this._renderToolbar();const Dn=this.toolbarInstance._layoutStrategy._menu;if(Dn){const{_renderPopup:ai}=Dn;Dn._renderPopup=function(){for(var ro=arguments.length,jo=new Array(ro),ia=0;ia<ro;ia++)jo[ia]=arguments[ia];ai.apply(Dn,...jo),Dn._popup.on("showing",()=>{St._updateToolbar(!0)})}}this.quill.on("editor-change",(ai,ro,jo,ia)=>{ia===Yo&&(0,w.RI)(this.quill.getFormat())||this._updateToolbar(ai===So)})}}_addCallbacks(){this.addCleanCallback(this.clean.bind(this)),this.editorInstance.addContentInitializedCallback(this.updateHistoryWidgets.bind(this))}_updateToolbar(Io){this.updateFormatWidgets(Io),this.updateHistoryWidgets(),this.updateTableWidgets()}_updateFormatWidget(Io,Pt,St){const Dn=this._toolbarWidgets.getByName(Io);Dn&&(Pt?this._markActiveFormatWidget(Io,Dn,St):(this._resetFormatWidget(Io,Dn),Object.prototype.hasOwnProperty.call(Io)&&delete St[Io]),this._toggleClearFormatting(Pt||!(0,w.RI)(St)))}_renderToolbar(){const Io=this.options.container||this._getContainer();this._$toolbar=(0,a.A)("<div>").addClass(Bt).appendTo(Io),this._$toolbarContainer=(0,a.A)(Io).addClass(ln),D.A.on(this._$toolbarContainer,(0,N.b4)("mousedown",this.editorInstance.NAME),Pt=>{Pt.target.focus(),Pt.preventDefault()}),this._subscribeFormatHotKeys(),this.toolbarInstance=this.editorInstance._createComponent(this._$toolbar,fo.A,this.toolbarConfig),this.editorInstance.on("optionChanged",Pt=>{let{name:St}=Pt;("readOnly"===St||"disabled"===St)&&this.toolbarInstance.option("disabled",this.isInteractionDisabled)})}get toolbarConfig(){return{dataSource:this._prepareToolbarItems(),disabled:this.isInteractionDisabled,menuContainer:this._$toolbarContainer,multiline:this.isMultilineMode()}}get isInteractionDisabled(){return this.editorInstance.option("readOnly")||this.editorInstance.option("disabled")}isMultilineMode(){return this.options.multiline??!0}clean(){this._toolbarWidgets.clear(),this._$toolbarContainer&&this._$toolbarContainer.empty().removeClass(ln)}repaint(){this.toolbarInstance&&this.toolbarInstance.repaint()}_getContainer(){const Io=(0,a.A)("<div>");return this.editorInstance.$element().prepend(Io),Io}_detectRenamedOptions(Io){(0,w.Gv)(Io)&&(0,ee.__)([{newName:"name",oldName:"formatName"},{newName:"acceptedValues",oldName:"formatValues"}],(St,Dn)=>{Object.prototype.hasOwnProperty.call(Io,Dn.oldName)&&k.A.log("W1016",Dn.oldName,Dn.newName)})}_subscribeFormatHotKeys(){this.quill.keyboard.addBinding({which:jr.b,shortKey:!0},this._handleFormatHotKey.bind(this)),this.quill.keyboard.addBinding({which:jr.i,shortKey:!0},this._handleFormatHotKey.bind(this)),this.quill.keyboard.addBinding({which:jr.u,shortKey:!0},this._handleFormatHotKey.bind(this))}_handleFormatHotKey(Io,Pt,St){let{which:Dn}=St;this._updateButtonState(zo[Dn])}_updateButtonState(Io){const Pt=this._toolbarWidgets.getByName(Io),St=this.quill.getFormat();St[Io]?this._markActiveFormatWidget(Io,Pt,St):this._resetFormatWidget(Io,Pt)}_prepareToolbarItems(){const Io=[];return(0,ee.__)(this.options.items,(Pt,St)=>{let Dn;if(this._detectRenamedOptions(St),(0,w.Gv)(St))Dn=this._handleObjectItem(St);else if((0,w.Kg)(St)){const ai=this._prepareButtonItemConfig(St);Dn=this._getToolbarItem(ai)}Dn&&Io.push(Dn)}),Io}_handleObjectItem(Io){if(Io.name&&Io.acceptedValues&&this._isAcceptableItem(Io.widget,"dxSelectBox")){const Pt=this._prepareSelectItemConfig(Io);return this._getToolbarItem(Pt)}if(Io.name&&this._isAcceptableItem(Io.widget,"dxButton")){const Pt=this._prepareButtonItemConfig(Io.name),St=(0,x.X)(!0,Pt,Io);return this._getToolbarItem(St)}return this._getToolbarItem(Io)}_isAcceptableItem(Io,Pt){return!Io||Io===Pt}_prepareButtonItemConfig(Io){const Pt=Si[Io]??Io,St=(0,Wi.Ns)(Io);return{widget:"dxButton",name:Io,options:{hint:qr(St),text:qr(St),icon:Pt.toLowerCase(),onClick:this._formatHandlers[Io]||Kt(this,Io),stylingMode:"text"},showText:"inMenu"}}_prepareSelectItemConfig(Io){const{name:Pt,acceptedValues:St}=Io;return(0,x.X)(!0,{widget:"dxSelectBox",name:Pt,options:{stylingMode:"filled",dataSource:St,displayExpr:Dn=>bs(Dn,Pt),placeholder:qr(Pt),onValueChanged:Dn=>{this._isReset||(this._hideAdaptiveMenu(),pr(this,[Pt,Dn.value,Oo],Dn.event),this._setValueSilent(Dn.component,Dn.value))}}},Io)}_hideAdaptiveMenu(){this.toolbarInstance.option("overflowMenuVisible")&&this.toolbarInstance.option("overflowMenuVisible",!1)}_getToolbarItem(Io){const Pt={options:{onInitialized:St=>{Io.name&&(St.component.$element().addClass(kt),St.component.$element().toggleClass(`dx-${Io.name.toLowerCase()}-format`,!!Io.name),this._toolbarWidgets.add(Io.name,St.component))},onDisposing:()=>{this._toolbarWidgets.remove(Io.name)}}};return(0,x.X)(!0,{location:"before",locateInMenu:"auto"},this._getDefaultConfig(Io.name),Io,Pt)}_getDefaultItemsConfig(){return{clear:{options:{disabled:!0}},undo:{options:{disabled:!0}},redo:{options:{disabled:!0}},insertRowAbove:{options:{disabled:!0}},insertRowBelow:{options:{disabled:!0}},insertHeaderRow:{options:{disabled:!0}},insertColumnLeft:{options:{disabled:!0}},insertColumnRight:{options:{disabled:!0}},deleteRow:{options:{disabled:!0}},deleteColumn:{options:{disabled:!0}},deleteTable:{options:{disabled:!0}},cellProperties:{options:{disabled:!0}},tableProperties:{options:{disabled:!0}},separator:{template:(Io,Pt,St)=>{(0,a.A)(St).addClass(Rn)},menuItemTemplate:(Io,Pt,St)=>{(0,a.A)(St).addClass(ti)}}}}_getDefaultConfig(Io){return this._getDefaultItemsConfig()[Io]}updateHistoryWidgets(){const Io=this.quill.history;if(!Io)return;const{undo:Pt,redo:St}=Io.stack;this._updateManipulationWidget(this._toolbarWidgets.getByName("undo"),!!Pt.length),this._updateManipulationWidget(this._toolbarWidgets.getByName("redo"),!!St.length)}updateTableWidgets(){if(!this.quill.getModule("table"))return;const Pt=this.quill.getSelection(),St=Pt&&this.quill.getFormat(Pt)||{},Dn=this._tableFormats.some(ai=>!!St[ai]);xr.forEach(ai=>{const ro="insertTable"===ai,jo=this._toolbarWidgets.getByName(ai);this._updateManipulationWidget(jo,ro?!Dn:Dn)})}_updateManipulationWidget(Io,Pt){Io&&Io.option("disabled",!Pt)}updateFormatWidgets(Io){const Pt=this.quill.getSelection();if(!Pt)return;const St=this.quill.getFormat(Pt),Dn=!(0,w.RI)(St);(!Dn||Io)&&this._resetFormatWidgets();for(const ai in St){const ro=this._getFormatWidgetName(ai,St),jo=this._toolbarWidgets.getByName(ro)??this._toolbarWidgets.getByName(ai);jo&&this._markActiveFormatWidget(ai,jo,St)}this._toggleClearFormatting(Dn||Pt.length>1)}_markActiveFormatWidget(Io,Pt,St){this._isColorFormat(Io)&&this._updateColorWidget(Io,St[Io]),"value"in Pt.option()?this._setValueSilent(Pt,St[Io]):(Pt.$element().addClass(Ri),Pt.$element().addClass(Oi))}_toggleClearFormatting(Io){const Pt=this._toolbarWidgets.getByName("clear");Pt&&Pt.option("disabled",!Io)}_isColorFormat(Io){return"color"===Io||"background"===Io}_updateColorWidget(Io,Pt){const St=this._toolbarWidgets.getByName(Io);St&&St.$element().find(`.${eo}`).css("borderBottomColor",Pt||"transparent")}_getFormatWidgetName(Io,Pt){let St;switch(Io){case"align":St=Io+(0,Wi.Ns)(Pt[Io]);break;case"list":St=Pt[Io]+(0,Wi.Ns)(Io);break;case"code-block":St="codeBlock";break;case"script":St=Pt[Io]+Io;break;case"imageSrc":St="image";break;default:St=Io}return St}_setValueSilent(Io,Pt){this._isReset=!0,Io.option("value",Pt),this._isReset=!1}_resetFormatWidgets(){this._toolbarWidgets.each((Io,Pt)=>{this._resetFormatWidget(Io,Pt)})}_resetFormatWidget(Io,Pt){Pt.$element().removeClass(Ri),Pt.$element().removeClass(Oi),this._isColorFormat(Io)&&this._updateColorWidget(Io),"clear"===Io&&Pt.option("disabled",!0),"dxSelectBox"===Pt.NAME&&this._setValueSilent(Pt,null)}addClickHandler(Io,Pt){this._formatHandlers[Io]=Pt;const St=this._toolbarWidgets.getByName(Io);St&&"dxButton"===St.NAME&&St.option("onClick",Pt)}}}const Go=Vo;let Er={};if(K()){const ln=K().import("blots/embed"),Bt="dx-variable";Er=class extends ln{static create(kt){const Rn=super.create();let ti,Ri;const Oi=kt.value;return Array.isArray(kt.escapeChar)?(ti=(0,g.YD)(kt.escapeChar[0],""),Ri=(0,g.YD)(kt.escapeChar[1],"")):ti=Ri=kt.escapeChar,Rn.innerText=ti+Oi+Ri,Rn.dataset.varStartEscChar=ti,Rn.dataset.varEndEscChar=Ri,Rn.dataset.varValue=kt.value,Rn}static value(kt){return(0,x.X)({},{value:kt.dataset.varValue,escapeChar:[kt.dataset.varStartEscChar||"",kt.dataset.varEndEscChar||""]})}},Er.blotName="variable",Er.tagName="span",Er.className=Bt}const Ts=Er;let ms=be;if(K()){const ln="dx-variable-format",Bt="dx-format-active",kt="dx-state-selected";K().register({"formats/variable":Ts},!0),ms=class extends Hi{constructor(Rn,ti){super(Rn,ti);const Ri=Rn.getModule("toolbar");Ri&&Ri.addClickHandler("variable",this.showPopup.bind(this)),Rn.keyboard.addBinding({key:"P",altKey:!0},this.showPopup.bind(this)),this._popup.on("shown",Oi=>{const eo=(0,a.A)(Oi.component.option("position").of);eo.hasClass(ln)&&(eo.addClass(Bt),eo.addClass(kt))})}_getDefaultOptions(){const Rn=super._getDefaultOptions();return(0,x.X)(Rn,{escapeChar:""})}showPopup(Rn){const ti=this.quill.getSelection(!0),Ri=ti?ti.index:this.quill.getLength();this.savePosition(Ri),this._resetPopupPosition(Rn,Ri),super.showPopup()}_resetPopupPosition(Rn,ti){if(Rn&&Rn.element)this._popup.option("position",{of:Rn.element,offset:{h:0,v:0},my:"top center",at:"bottom center",collision:"fit"});else{const Ri=this.quill.getBounds(ti),Oi=(0,rn.N)(this.quill.root);this._popup.option("position",{of:this.quill.root,offset:{h:Ri.left,v:Ri.bottom-Oi.height},my:"top center",at:"bottom left",collision:"fit flip"})}}insertEmbedContent(Rn){const ti=this.getPosition(),Ri=Rn.component.option("selectedItem"),Oi=(0,x.X)({},{value:Ri,escapeChar:this.options.escapeChar});setTimeout(()=>{this.quill.insertEmbed(ti,"variable",Oi),this.quill.setSelection(ti+1)})}}}const rs=ms;let $r;if(K()){const ln=K().import("core/theme");$r=class extends ln{constructor(Bt,kt){super(Bt,kt),this.quill.root.classList.add("dx-htmleditor-content"),this.quill.root.setAttribute("role","textbox"),this.quill.root.setAttribute("aria-label","Editor content")}}}else $r={};const Qa=$r;class Gs{constructor(){if(this._customModules=[],Gs.initialized)return;const Bt=this.getQuill(),kt=Bt.import("attributors/style/direction");Bt.register({"formats/align":re,"formats/direction":kt,"formats/font":Y,"formats/size":oe,"formats/extendedImage":Q,"formats/link":pe,"modules/toolbar":Go,"modules/dropImage":le,"modules/variables":rs,"modules/resizing":ao,"modules/tableResizing":kn,"modules/tableContextMenu":os,"modules/imageUpload":on,"modules/imageCursor":fe,"modules/mentions":xo,"themes/basic":Qa},!0),this._customModules=[],Gs._initialized=!0}createEditor(Bt,kt){return new(this.getQuill())(Bt,kt)}registerModules(Bt){const kt=RegExp("modules/*"),Rn=this.getQuill(),ti=Ri=>!!Rn.imports[Ri];for(const Ri in Bt)kt.test(Ri)&&!ti(Ri)&&this._customModules.push(Ri.slice(8));Rn.register(Bt,!0)}getRegisteredModuleNames(){return this._customModules}getQuill(){return J()}}const Vl=Gs;function Ma(ln){return ln[1].match(/\S+\./)?"ordered":"bullet"}const Hl="dx-formdialog",Kn=class Ht{constructor(Bt,kt){this._editorInstance=Bt,this._popupUserConfig=kt,this._renderPopup(),this._attachOptionChangedHandler()}_renderPopup(){const Bt=this._editorInstance,kt=(0,a.A)("<div>").addClass(Hl).appendTo(Bt.$element()),Rn=this._getPopupConfig();return Bt._createComponent(kt,Pn.A,Rn)}_attachOptionChangedHandler(){var Bt;null===(Bt=this._popup)||void 0===Bt||Bt.on("optionChanged",kt=>{let{name:Rn,value:ti}=kt;"title"===Rn&&this._updateFormLabel(ti)})}_escKeyHandler(){this._popup.hide()}_addEscapeHandler(Bt){Bt.component.registerKeyHandler("escape",this._escKeyHandler.bind(this))}_isSmallScreen(){const Bt=(0,he.Vd)()?(0,he.ne)():null;return"phone"===c.A.real().deviceType||"xs"===Bt}_getPopupConfig(){return(0,x.X)({onInitialized:Bt=>{this._popup=Bt.component,this._popup.on("hiding",()=>this.onHiding()),this._popup.on("shown",()=>{this._form.focus()})},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,fullScreen:this._isSmallScreen(),contentTemplate:Bt=>{const kt=(0,a.A)("<div>").appendTo(Bt);this._renderForm(kt,{onEditorEnterKey:Rn=>this.callAddButtonAction(Rn.event),customizeItem:Rn=>{"simple"===Rn.itemType&&(Rn.editorOptions=(0,x.X)(!0,{},Rn.editorOptions,{onInitialized:this._addEscapeHandler.bind(this)}))}})},toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:(0,o.A)({onInitialized:this._addEscapeHandler.bind(this),text:Oe.A.format("OK"),onClick:Bt=>this.callAddButtonAction(Bt.event)},(0,Be.Ft)()?{stylingMode:"contained",type:"default"}:{})},{toolbar:"bottom",location:"after",widget:"dxButton",options:(0,o.A)({onInitialized:this._addEscapeHandler.bind(this),text:Oe.A.format("Cancel"),onClick:()=>{this._popup.hide()}},(0,Be.Ft)()?{stylingMode:"outlined",type:"normal"}:{})}],_wrapperClassExternal:`${Hl} dx-dropdowneditor-overlay`},this._popupUserConfig)}onHiding(){this.beforeAddButtonAction=void 0,this.deferred.reject()}callAddButtonAction(Bt){this.beforeAddButtonAction&&!this.beforeAddButtonAction()||this.hide(this._form.option("formData"),Bt)}_renderForm(Bt,kt){Bt.addClass("dx-formdialog-form"),this._form=this._editorInstance._createComponent(Bt,Yn.A,kt),this._updateFormLabel()}_updateFormLabel(Bt){var kt;const Rn=Bt??this.popupOption("title");null===(kt=this._form)||void 0===kt||kt.$element().attr("aria-label",Rn)}_getDefaultFormOptions(){return{colCount:1,width:"auto",labelLocation:(0,Be.Nt)()?"top":"left"}}formOption(Bt,kt){return this._form.option.apply(this._form,arguments)}show(Bt){if(this._popup.option("visible"))return;this.deferred=(0,_.cY)();const kt=(0,x.X)(this._getDefaultFormOptions(),Bt);return this._form.option(kt),this._popup.show(),this.deferred.promise()}hide(Bt,kt){this.deferred.resolve(Bt,kt),this._popup.hide()}popupOption(Bt,kt){return this._popup.option.apply(this._popup,arguments)}},ht="ios"===c.A.current().platform;let jt=0;const yn=G.A.inherit({_getDefaultOptions(){return(0,x.X)(this.callBase(),{focusStateEnabled:!0,valueType:"html",placeholder:"",toolbar:null,variables:null,mediaResizing:null,tableResizing:null,mentions:null,customizeModules:null,tableContextMenu:null,allowSoftLineBreak:!1,formDialogOptions:null,imageUpload:null,stylingMode:(0,d.A)().editorStylingMode||"outlined"})},_init(){this._mentionKeyInTemplateStorage=jt++,this.callBase(),this._cleanCallback=(0,h.A)(),this._contentInitializedCallback=(0,h.A)()},_getAnonymousTemplateName:()=>"htmlContent",_initTemplates(){this._templateManager.addDefaultTemplates({htmlContent:new u.A}),this.callBase()},_focusTarget(){return this._getContent()},_getContent(){return this.$element().find(".dx-htmleditor-content")},_focusInHandler(ln){let{relatedTarget:Bt}=ln;this._shouldSkipFocusEvent(Bt)||(this._toggleFocusClass(!0,this.$element()),this.callBase.apply(this,arguments))},_focusOutHandler(ln){let{relatedTarget:Bt}=ln;this._shouldSkipFocusEvent(Bt)||(this._toggleFocusClass(!1,this.$element()),this.callBase.apply(this,arguments))},_shouldSkipFocusEvent:ln=>(0,a.A)(ln).hasClass("ql-clipboard"),_initMarkup(){this._$htmlContainer=(0,a.A)("<div>").addClass("dx-quill-container"),this.$element().attr("role","application").addClass("dx-htmleditor").wrapInner(this._$htmlContainer),this._renderStylingMode();const ln=this._getTemplate("htmlContent");this._$templateResult=ln&&ln.render({container:(0,s.cc)(this._$htmlContainer),noModel:!0,transclude:!0}),this._renderSubmitElement(),this.callBase(),this._updateContainerMarkup()},_renderValidationState(){1===this._getContent().length&&this.callBase()},_renderSubmitElement(){this._$submitElement=(0,a.A)("<textarea>").addClass("dx-htmleditor-submit-element").attr("hidden",!0).appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(ln){this._getSubmitElement().val(ln)},_getSubmitElement(){return this._$submitElement},_createNoScriptFrame:()=>(0,a.A)("<iframe>").css("display","none").attr({srcdoc:"",id:"xss-frame",sandbox:"allow-same-origin"}),_removeXSSVulnerableHtml(ln){const Bt=this._createNoScriptFrame().appendTo("body"),Ri=Bt.get(0).contentWindow.document.body,eo=J().replaceStyleAttribute(ln);Ri.innerHTML=eo;const So=Yo=>{if(Yo.attributes)for(let zo=0;zo<Yo.attributes.length;zo++){const{name:jr}=Yo.attributes[zo];jr.startsWith("on")&&Yo.removeAttribute(jr)}if(Yo.childNodes)for(let zo=0;zo<Yo.childNodes.length;zo++)So(Yo.childNodes[zo])};So(Ri),Ri.querySelectorAll("script").forEach(Yo=>{Yo.remove()});const Oo=Ri.innerHTML;return Bt.remove(),Oo},_updateContainerMarkup(){let ln=this.option("value");if(this._isMarkdownValue()&&(this._prepareMarkdownConverter(),ln=this._markdownConverter.toHtml(ln)),ln){const Bt=this._removeXSSVulnerableHtml(ln);this._$htmlContainer.html(Bt)}},_prepareMarkdownConverter(){const ln=f.getConverter("markdown");if(!ln)throw k.A.Error("E1051","markdown");this._markdownConverter=new ln},_render(){this._prepareConverters(),this.callBase()},_prepareQuillRegistrator(){this._quillRegistrator||(this._quillRegistrator=new Vl)},_getRegistrator(){return this._prepareQuillRegistrator(),this._quillRegistrator},_prepareConverters(){if(!this._deltaConverter){const ln=f.getConverter("delta");ln&&(this._deltaConverter=new ln)}"markdown"===this.option("valueType")&&!this._markdownConverter&&this._prepareMarkdownConverter()},_renderContentImpl(){this._contentRenderedDeferred=(0,_.cY)();const ln=this._contentRenderedDeferred.promise();return this.callBase(),this._renderHtmlEditor(),this._renderFormDialog(),this._addKeyPressHandler(),ln},_pointerMoveHandler(ln){ht&&ln.stopPropagation()},_attachFocusEvents(){(0,g.zE)(this.callBase.bind(this))},_addKeyPressHandler(){const ln=(0,N.b4)("keydown",`${this.NAME}TextChange`);D.A.on(this._$htmlContainer,ln,this._keyDownHandler.bind(this))},_keyDownHandler(ln){this._saveValueChangeEvent(ln)},_renderHtmlEditor(){const ln=this.option("customizeModules"),Bt=this._getModulesConfig();(0,w.Tn)(ln)&&ln(Bt),this._quillInstance=this._getRegistrator().createEditor(this._$htmlContainer[0],{placeholder:this.option("placeholder"),readOnly:this.option("readOnly")||this.option("disabled"),modules:Bt,theme:"basic"}),this._renderValidationState(),this._deltaConverter.setQuillInstance(this._quillInstance),this._textChangeHandlerWithContext=this._textChangeHandler.bind(this),this._quillInstance.on("text-change",this._textChangeHandlerWithContext),this._renderScrollHandler(),this._hasTranscludedContent()?this._updateContentTask=(0,g.uG)(()=>{this._applyTranscludedContent()}):this._finalizeContentRendering()},_renderScrollHandler(){const ln=this._getContent(),Bt=(0,U.N)(ln);D.A.on(ln,(0,N.b4)(C.A.init,this.NAME),Bt,g.lQ),D.A.on(ln,(0,N.b4)(L.A.move,this.NAME),this._pointerMoveHandler.bind(this))},_applyTranscludedContent(){const ln=this.option("value");if(!(0,w.O9)(ln)){const Bt=this._deltaConverter.toHtml(),kt=this._quillInstance.clipboard.convert({html:Bt});if(kt.ops.length)return void this._quillInstance.setContents(kt)}this._finalizeContentRendering()},_hasTranscludedContent(){return this._$templateResult&&this._$templateResult.length},_getModulesConfig(){const Bt=(ln=>{const Bt=ln.import("delta"),kt=ln.MS_LIST_DATA_KEY;return(Rn,ti)=>{const Ri=ti.ops.slice(),Oi=Ri[0];Oi.insert=Oi.insert.replace(/^\s+/,"");const eo=Oi.insert.match(/^(\S+)\s+/),So=eo&&function Lo(ln,Bt){const kt=ln.getAttribute(Bt);if(kt){const Rn=kt.replace(/\n+/g,"").match(/level(\d+)/);return Rn?Rn[1]-1:0}return!1}(Rn,kt);return eo&&!1!==So?(Oi.insert=Oi.insert.substring(eo[0].length,Oi.insert.length),function Ms(ln){const Bt=ln[ln.length-1];Bt.insert=Bt.insert.trim()}(Ri),Ri.push({insert:"\n",attributes:{list:Ma(eo),indent:So}}),new Bt(Ri)):ti}})(this._getRegistrator().getQuill());return(0,x.X)({},{table:!0,toolbar:this._getModuleConfigByOption("toolbar"),variables:this._getModuleConfigByOption("variables"),resizing:this._getModuleConfigByOption("mediaResizing"),tableResizing:this._getModuleConfigByOption("tableResizing"),tableContextMenu:this._getModuleConfigByOption("tableContextMenu"),imageUpload:this._getModuleConfigByOption("imageUpload"),imageCursor:this._getBaseModuleConfig(),mentions:this._getModuleConfigByOption("mentions"),uploader:{onDrop:Rn=>this._saveValueChangeEvent((0,I.Jh)(Rn)),imageBlot:"extendedImage"},keyboard:{onKeydown:Rn=>this._saveValueChangeEvent((0,I.Jh)(Rn))},clipboard:{onPaste:Rn=>this._saveValueChangeEvent((0,I.Jh)(Rn)),onCut:Rn=>this._saveValueChangeEvent((0,I.Jh)(Rn)),matchers:[["p.MsoListParagraphCxSpFirst",Bt],["p.MsoListParagraphCxSpMiddle",Bt],["p.MsoListParagraphCxSpLast",Bt]]},multiline:!!this.option("allowSoftLineBreak")},this._getCustomModules())},_getModuleConfigByOption(ln){const Bt=this.option(ln);let kt={};if((0,w.O9)(Bt))return Array.isArray(Bt)?kt[ln]=Bt:kt=Bt,(0,x.X)(this._getBaseModuleConfig(),kt)},_getBaseModuleConfig(){return{editorInstance:this}},_getCustomModules(){const ln={};return this._getRegistrator().getRegisteredModuleNames().forEach(kt=>{ln[kt]=this._getBaseModuleConfig()}),ln},_textChangeHandler(ln,Bt,kt){const Rn=this._deltaConverter.toHtml(),ti=this._isMarkdownValue()?this._updateValueByType("markdown",Rn):Rn,Ri=this.option("value");Ri!==ti&&!this._isNullValueConverted(Ri,ti)&&(this._isEditorUpdating=!0,this.option("value",ti)),this._finalizeContentRendering()},_isNullValueConverted:(ln,Bt)=>null===ln&&""===Bt,_finalizeContentRendering(){this._contentRenderedDeferred&&(this.clearHistory(),this._contentInitializedCallback.fire(),this._contentRenderedDeferred.resolve(),this._contentRenderedDeferred=void 0)},_updateValueByType(ln,Bt){const kt=this._markdownConverter;if(!(0,w.O9)(kt))return;const Rn=(0,g.YD)(Bt,this.option("value"));return"markdown"===ln?kt.toMarkdown(Rn):kt.toHtml(Rn)},_isMarkdownValue(){return"markdown"===this.option("valueType")},_resetEnabledState(){if(this._quillInstance){const ln=!(this.option("readOnly")||this.option("disabled"));this._quillInstance.enable(ln)}},_renderFormDialog(){const ln=(0,x.X)(!0,{width:"auto",height:"auto",hideOnOutsideClick:!0},this.option("formDialogOptions"));this._formDialog=new Kn(this,ln)},_getStylingModePrefix:()=>"dx-htmleditor-",_getQuillContainer(){return this._$htmlContainer},_prepareModuleOptions(ln){var Bt;const kt=null===(Bt=ln.fullName)||void 0===Bt?void 0:Bt.split(".");let{value:Rn}=ln;return 3===kt.length&&(Rn={[kt[2]]:Rn}),[kt.length>=2?kt[1]:ln.name,Rn]},_moduleOptionChanged(ln,Bt){const kt=this.getModule(ln);kt?kt.option(...this._prepareModuleOptions(Bt)):this._invalidate()},_optionChanged(ln){switch(ln.name){case"value":{if(this._quillInstance)if(this._isEditorUpdating)this._isEditorUpdating=!1;else{const kt=this._isMarkdownValue()?this._updateValueByType("HTML",ln.value):ln.value;this._suppressValueChangeAction(),this._updateHtmlContent(kt),this._resumeValueChangeAction()}else this._$htmlContainer.html(ln.value);const Bt=this.option("value");Bt!==ln.previousValue&&(this._setSubmitValue(Bt),this.callBase((0,o.A)({},ln,{value:Bt})));break}case"placeholder":case"variables":case"toolbar":case"mentions":case"customizeModules":case"allowSoftLineBreak":this._invalidate();break;case"tableResizing":this._moduleOptionChanged("tableResizing",ln);break;case"valueType":{this._prepareConverters();const Bt=this._updateValueByType(ln.value);"html"===ln.value&&this._quillInstance?this._updateHtmlContent(Bt):this.option("value",Bt);break}case"stylingMode":this._renderStylingMode();break;case"readOnly":case"disabled":this.callBase(ln),this._resetEnabledState();break;case"formDialogOptions":this._renderFormDialog();break;case"tableContextMenu":this._moduleOptionChanged("tableContextMenu",ln);break;case"mediaResizing":this._moduleOptionChanged("resizing",ln);break;case"width":this.callBase(ln),this._repaintToolbar();break;case"imageUpload":this._moduleOptionChanged("imageUpload",ln);break;default:this.callBase(ln)}},_repaintToolbar(){this._applyToolbarMethod("repaint")},_updateHtmlContent(ln){const Bt=this._quillInstance.clipboard.convert({html:ln});this._quillInstance.setContents(Bt)},_clean(){this._quillInstance&&(D.A.off(this._getContent(),`.${this.NAME}`),this._quillInstance.off("text-change",this._textChangeHandlerWithContext),this._cleanCallback.fire()),this._abortUpdateContentTask(),this._cleanCallback.empty(),this._contentInitializedCallback.empty(),this.callBase()},_abortUpdateContentTask(){this._updateContentTask&&(this._updateContentTask.abort(),this._updateContentTask=void 0)},_applyQuillMethod(ln,Bt){if(this._quillInstance)return this._quillInstance[ln].apply(this._quillInstance,Bt)},_applyQuillHistoryMethod(ln){this._quillInstance&&this._quillInstance.history&&this._quillInstance.history[ln]()},_applyToolbarMethod(ln){var Bt;null===(Bt=this.getModule("toolbar"))||void 0===Bt||Bt[ln]()},addCleanCallback(ln){this._cleanCallback.add(ln)},addContentInitializedCallback(ln){this._contentInitializedCallback.add(ln)},register(ln){this._getRegistrator().registerModules(ln),this._quillInstance&&this.repaint()},get(ln){return this._getRegistrator().getQuill().import(ln)},getModule(ln){return this._applyQuillMethod("getModule",arguments)},getQuillInstance(){return this._quillInstance},getSelection(ln){return this._applyQuillMethod("getSelection",arguments)},setSelection(ln,Bt){this._applyQuillMethod("setSelection",arguments)},getText(ln,Bt){return this._applyQuillMethod("getText",arguments)},format(ln,Bt){this._applyQuillMethod("format",arguments)},formatText(ln,Bt,kt,Rn){this._applyQuillMethod("formatText",arguments)},formatLine(ln,Bt,kt,Rn){this._applyQuillMethod("formatLine",arguments)},getFormat(ln,Bt){return this._applyQuillMethod("getFormat",arguments)},removeFormat(ln,Bt){return this._applyQuillMethod("removeFormat",arguments)},clearHistory(){this._applyQuillHistoryMethod("clear"),this._applyToolbarMethod("updateHistoryWidgets")},undo(){this._applyQuillHistoryMethod("undo")},redo(){this._applyQuillHistoryMethod("redo")},getLength(){return this._applyQuillMethod("getLength")},getBounds(ln,Bt){return this._applyQuillMethod("getBounds",arguments)},delete(ln,Bt){this._applyQuillMethod("deleteText",arguments)},insertText(ln,Bt,kt){this._applyQuillMethod("insertText",arguments)},insertEmbed(ln,Bt,kt){this._applyQuillMethod("insertEmbed",arguments)},showFormDialog(ln){return this._formDialog.show(ln)},formDialogOption(ln,Bt){return this._formDialog.popupOption.apply(this._formDialog,arguments)},focus(){this.callBase(),this._applyQuillMethod("focus")},blur(){this._applyQuillMethod("blur")},getMentionKeyInTemplateStorage(){return this._mentionKeyInTemplateStorage}});(0,y.A)("dxHtmlEditor",yn);const xi=yn;var to=M(1491),Yi=M(3349),uo=M(8914);const so=["*"],To={provide:to.kq,useExisting:(0,W.Rfq)(()=>Ji),multi:!0};let Ji=(()=>{class ln extends Yi.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(kt){this._setOption("accessKey",kt)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(kt){this._setOption("activeStateEnabled",kt)}get allowSoftLineBreak(){return this._getOption("allowSoftLineBreak")}set allowSoftLineBreak(kt){this._setOption("allowSoftLineBreak",kt)}get customizeModules(){return this._getOption("customizeModules")}set customizeModules(kt){this._setOption("customizeModules",kt)}get disabled(){return this._getOption("disabled")}set disabled(kt){this._setOption("disabled",kt)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(kt){this._setOption("elementAttr",kt)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(kt){this._setOption("focusStateEnabled",kt)}get height(){return this._getOption("height")}set height(kt){this._setOption("height",kt)}get hint(){return this._getOption("hint")}set hint(kt){this._setOption("hint",kt)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(kt){this._setOption("hoverStateEnabled",kt)}get imageUpload(){return this._getOption("imageUpload")}set imageUpload(kt){this._setOption("imageUpload",kt)}get isDirty(){return this._getOption("isDirty")}set isDirty(kt){this._setOption("isDirty",kt)}get isValid(){return this._getOption("isValid")}set isValid(kt){this._setOption("isValid",kt)}get mediaResizing(){return this._getOption("mediaResizing")}set mediaResizing(kt){this._setOption("mediaResizing",kt)}get mentions(){return this._getOption("mentions")}set mentions(kt){this._setOption("mentions",kt)}get name(){return this._getOption("name")}set name(kt){this._setOption("name",kt)}get placeholder(){return this._getOption("placeholder")}set placeholder(kt){this._setOption("placeholder",kt)}get readOnly(){return this._getOption("readOnly")}set readOnly(kt){this._setOption("readOnly",kt)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(kt){this._setOption("rtlEnabled",kt)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(kt){this._setOption("stylingMode",kt)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(kt){this._setOption("tabIndex",kt)}get tableContextMenu(){return this._getOption("tableContextMenu")}set tableContextMenu(kt){this._setOption("tableContextMenu",kt)}get tableResizing(){return this._getOption("tableResizing")}set tableResizing(kt){this._setOption("tableResizing",kt)}get toolbar(){return this._getOption("toolbar")}set toolbar(kt){this._setOption("toolbar",kt)}get validationError(){return this._getOption("validationError")}set validationError(kt){this._setOption("validationError",kt)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(kt){this._setOption("validationErrors",kt)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(kt){this._setOption("validationMessageMode",kt)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(kt){this._setOption("validationMessagePosition",kt)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(kt){this._setOption("validationStatus",kt)}get value(){return this._getOption("value")}set value(kt){this._setOption("value",kt)}get valueType(){return this._getOption("valueType")}set valueType(kt){this._setOption("valueType",kt)}get variables(){return this._getOption("variables")}set variables(kt){this._setOption("variables",kt)}get visible(){return this._getOption("visible")}set visible(kt){this._setOption("visible",kt)}get width(){return this._getOption("width")}set width(kt){this._setOption("width",kt)}onContentReady;onDisposing;onFocusIn;onFocusOut;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;allowSoftLineBreakChange;customizeModulesChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;imageUploadChange;isDirtyChange;isValidChange;mediaResizingChange;mentionsChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;stylingModeChange;tabIndexChange;tableContextMenuChange;tableResizingChange;toolbarChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueTypeChange;variablesChange;visibleChange;widthChange;onBlur;change(kt){}touched=kt=>{};get mentionsChildren(){return this._getOption("mentions")}set mentionsChildren(kt){this.setChildren("mentions",kt)}constructor(kt,Rn,ti,Ri,Oi,eo,So,Oo){super(kt,Rn,ti,Ri,So,Oo),this._watcherHelper=Ri,this._idh=Oi,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"allowSoftLineBreakChange"},{emit:"customizeModulesChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"imageUploadChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"mediaResizingChange"},{emit:"mentionsChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"tableContextMenuChange"},{emit:"tableResizingChange"},{emit:"toolbarChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueTypeChange"},{emit:"variablesChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),eo.setHost(this)}_createInstance(kt,Rn){return new xi(kt,Rn)}writeValue(kt){this.eventHelper.lockedValueChangeEvent=!0,this.value=kt,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(kt){this.disabled=kt}registerOnChange(kt){this.change=kt}registerOnTouched(kt){this.touched=kt}_createWidget(kt){super._createWidget(kt),this.instance.on("focusOut",Rn=>{this.eventHelper.fireNgEvent("onBlur",[Rn])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(kt){super.ngOnChanges(kt),this.setupChanges("mentions",kt),this.setupChanges("validationErrors",kt)}setupChanges(kt,Rn){kt in this._optionsToUpdate||this._idh.setup(kt,Rn)}ngDoCheck(){this._idh.doCheck("mentions"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(kt,Rn){let ti=this._idh.setupSingle(kt,Rn),Ri=null!==this._idh.getChanges(kt,Rn);(ti||Ri)&&super._setOption(kt,Rn)}static \u0275fac=function(Rn){return new(Rn||ln)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(Yi.zF),W.rXU(Yi.jS),W.rXU(Yi.$M),W.rXU(Yi.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:ln,selectors:[["dx-html-editor"]],contentQueries:function(Rn,ti,Ri){if(1&Rn&&W.wni(Ri,uo.VY_,4),2&Rn){let Oi;W.mGM(Oi=W.lsd())&&(ti.mentionsChildren=Oi)}},hostBindings:function(Rn,ti){1&Rn&&W.bIt("valueChange",function(Oi){return ti.change(Oi)})("onBlur",function(Oi){return ti.touched(Oi)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",allowSoftLineBreak:"allowSoftLineBreak",customizeModules:"customizeModules",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",imageUpload:"imageUpload",isDirty:"isDirty",isValid:"isValid",mediaResizing:"mediaResizing",mentions:"mentions",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",stylingMode:"stylingMode",tabIndex:"tabIndex",tableContextMenu:"tableContextMenu",tableResizing:"tableResizing",toolbar:"toolbar",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueType:"valueType",variables:"variables",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",allowSoftLineBreakChange:"allowSoftLineBreakChange",customizeModulesChange:"customizeModulesChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",imageUploadChange:"imageUploadChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",mediaResizingChange:"mediaResizingChange",mentionsChange:"mentionsChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",tableContextMenuChange:"tableContextMenuChange",tableResizingChange:"tableResizingChange",toolbarChange:"toolbarChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueTypeChange:"valueTypeChange",variablesChange:"variablesChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([Yi.zF,Yi.jS,To,Yi.fH,Yi.$M]),W.Vt3,W.OA$],ngContentSelectors:so,decls:1,vars:0,template:function(Rn,ti){1&Rn&&(W.NAR(),W.SdG(0))},encapsulation:2})}return ln})(),Wo=(()=>{class ln{static \u0275fac=function(Rn){return new(Rn||ln)};static \u0275mod=W.$C({type:ln});static \u0275inj=W.G2t({imports:[uo.k4A,uo.OWJ,uo.HKo,uo.hAh,uo.m56,uo.GLd,uo.POb,uo.rj$,uo.l4W,uo.TsZ,Yi.p_,Yi.xZ,uo.k4A,uo.OWJ,uo.HKo,uo.hAh,uo.m56,uo.GLd,uo.POb,uo.rj$,uo.l4W,uo.TsZ,Yi.xZ]})}return ln})()},1246:(In,Ze,M)=>{"use strict";M.d(Ze,{a:()=>L,R:()=>N});var W=M(7788),o=M(6828),f=(M(5470),M(4055),M(5704)),S=M(3090),T=M(1363),y=M(4072),d=M(9293),c=M(3125),s=M(5651),a=M(1605);const h="dx-list-reorder-handle";(0,a.k)("reorder","default",s.A.inherit({_init(){const G=this._list;this._groupedEnabled=this._list.option("grouped"),this._lockedDrag=!1;const k=this._groupedEnabled?"> .dx-list-items > .dx-list-group > .dx-list-group-body > .dx-list-item":"> .dx-list-items > .dx-list-item";this._sortable=G._createComponent(G._scrollView.content(),c.A,(0,S.X)({component:G,contentTemplate:null,allowReordering:!1,filter:k,container:G.$element(),dragDirection:G.option("itemDragging.group")?"both":"vertical",handle:`.${h}`,dragTemplate:this._dragTemplate,onDragStart:this._dragStartHandler.bind(this),onDragChange:this._dragChangeHandler.bind(this),onReorder:this._reorderHandler.bind(this)},G.option("itemDragging")))},afterRender(){this._sortable.update()},_dragTemplate(G){const k=(0,f.A)(G.itemElement).clone().addClass("dx-list-item-ghost-reordering").addClass("dx-state-hover");return(0,T.zj)(k,(0,T.RG)(G.itemElement)),k},_dragStartHandler(G){this._lockedDrag&&(G.cancel=!0)},_dragChangeHandler(G){this._groupedEnabled&&!this._sameParent(G.fromIndex,G.toIndex)&&(G.cancel=!0)},_sameParent(G,k){const U=this._list.getItemElementByFlatIndex(G);return this._list.getItemElementByFlatIndex(k).parent().get(0)===U.parent().get(0)},_reorderHandler(G){const k=this._list.getItemElementByFlatIndex(G.toIndex);this._list.reorderItem((0,f.A)(G.itemElement),k)},afterBag(G){const k=(0,f.A)("<div>").addClass(h);y.A.on(k,"dxpointerdown",U=>{this._lockedDrag=!(0,d.Er)(U)}),y.A.on(k,"dxhold",{timeout:30},U=>{U.cancel=!0,this._lockedDrag=!1}),G.$container.addClass("dx-list-reorder-handle-container").append(k)}})),M(1636),M(6998);const D=o.A;var C=M(3349),I=M(8914);let L=(()=>{class G extends C.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(U){this._setOption("accessKey",U)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(U){this._setOption("activeStateEnabled",U)}get allowItemDeleting(){return this._getOption("allowItemDeleting")}set allowItemDeleting(U){this._setOption("allowItemDeleting",U)}get bounceEnabled(){return this._getOption("bounceEnabled")}set bounceEnabled(U){this._setOption("bounceEnabled",U)}get collapsibleGroups(){return this._getOption("collapsibleGroups")}set collapsibleGroups(U){this._setOption("collapsibleGroups",U)}get dataSource(){return this._getOption("dataSource")}set dataSource(U){this._setOption("dataSource",U)}get disabled(){return this._getOption("disabled")}set disabled(U){this._setOption("disabled",U)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(U){this._setOption("displayExpr",U)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(U){this._setOption("elementAttr",U)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(U){this._setOption("focusStateEnabled",U)}get grouped(){return this._getOption("grouped")}set grouped(U){this._setOption("grouped",U)}get groupTemplate(){return this._getOption("groupTemplate")}set groupTemplate(U){this._setOption("groupTemplate",U)}get height(){return this._getOption("height")}set height(U){this._setOption("height",U)}get hint(){return this._getOption("hint")}set hint(U){this._setOption("hint",U)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(U){this._setOption("hoverStateEnabled",U)}get indicateLoading(){return this._getOption("indicateLoading")}set indicateLoading(U){this._setOption("indicateLoading",U)}get itemDeleteMode(){return this._getOption("itemDeleteMode")}set itemDeleteMode(U){this._setOption("itemDeleteMode",U)}get itemDragging(){return this._getOption("itemDragging")}set itemDragging(U){this._setOption("itemDragging",U)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(U){this._setOption("itemHoldTimeout",U)}get items(){return this._getOption("items")}set items(U){this._setOption("items",U)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(U){this._setOption("itemTemplate",U)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(U){this._setOption("keyExpr",U)}get menuItems(){return this._getOption("menuItems")}set menuItems(U){this._setOption("menuItems",U)}get menuMode(){return this._getOption("menuMode")}set menuMode(U){this._setOption("menuMode",U)}get nextButtonText(){return this._getOption("nextButtonText")}set nextButtonText(U){this._setOption("nextButtonText",U)}get noDataText(){return this._getOption("noDataText")}set noDataText(U){this._setOption("noDataText",U)}get pageLoadingText(){return this._getOption("pageLoadingText")}set pageLoadingText(U){this._setOption("pageLoadingText",U)}get pageLoadMode(){return this._getOption("pageLoadMode")}set pageLoadMode(U){this._setOption("pageLoadMode",U)}get pulledDownText(){return this._getOption("pulledDownText")}set pulledDownText(U){this._setOption("pulledDownText",U)}get pullingDownText(){return this._getOption("pullingDownText")}set pullingDownText(U){this._setOption("pullingDownText",U)}get pullRefreshEnabled(){return this._getOption("pullRefreshEnabled")}set pullRefreshEnabled(U){this._setOption("pullRefreshEnabled",U)}get refreshingText(){return this._getOption("refreshingText")}set refreshingText(U){this._setOption("refreshingText",U)}get repaintChangesOnly(){return this._getOption("repaintChangesOnly")}set repaintChangesOnly(U){this._setOption("repaintChangesOnly",U)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(U){this._setOption("rtlEnabled",U)}get scrollByContent(){return this._getOption("scrollByContent")}set scrollByContent(U){this._setOption("scrollByContent",U)}get scrollByThumb(){return this._getOption("scrollByThumb")}set scrollByThumb(U){this._setOption("scrollByThumb",U)}get scrollingEnabled(){return this._getOption("scrollingEnabled")}set scrollingEnabled(U){this._setOption("scrollingEnabled",U)}get searchEditorOptions(){return this._getOption("searchEditorOptions")}set searchEditorOptions(U){this._setOption("searchEditorOptions",U)}get searchEnabled(){return this._getOption("searchEnabled")}set searchEnabled(U){this._setOption("searchEnabled",U)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(U){this._setOption("searchExpr",U)}get searchMode(){return this._getOption("searchMode")}set searchMode(U){this._setOption("searchMode",U)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(U){this._setOption("searchTimeout",U)}get searchValue(){return this._getOption("searchValue")}set searchValue(U){this._setOption("searchValue",U)}get selectAllMode(){return this._getOption("selectAllMode")}set selectAllMode(U){this._setOption("selectAllMode",U)}get selectAllText(){return this._getOption("selectAllText")}set selectAllText(U){this._setOption("selectAllText",U)}get selectByClick(){return this._getOption("selectByClick")}set selectByClick(U){this._setOption("selectByClick",U)}get selectedItemKeys(){return this._getOption("selectedItemKeys")}set selectedItemKeys(U){this._setOption("selectedItemKeys",U)}get selectedItems(){return this._getOption("selectedItems")}set selectedItems(U){this._setOption("selectedItems",U)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(U){this._setOption("selectionMode",U)}get showScrollbar(){return this._getOption("showScrollbar")}set showScrollbar(U){this._setOption("showScrollbar",U)}get showSelectionControls(){return this._getOption("showSelectionControls")}set showSelectionControls(U){this._setOption("showSelectionControls",U)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(U){this._setOption("tabIndex",U)}get useNativeScrolling(){return this._getOption("useNativeScrolling")}set useNativeScrolling(U){this._setOption("useNativeScrolling",U)}get visible(){return this._getOption("visible")}set visible(U){this._setOption("visible",U)}get width(){return this._getOption("width")}set width(U){this._setOption("width",U)}onContentReady;onDisposing;onGroupRendered;onInitialized;onItemClick;onItemContextMenu;onItemDeleted;onItemDeleting;onItemHold;onItemRendered;onItemReordered;onItemSwipe;onOptionChanged;onPageLoading;onPullRefresh;onScroll;onSelectAllValueChanged;onSelectionChanged;accessKeyChange;activeStateEnabledChange;allowItemDeletingChange;bounceEnabledChange;collapsibleGroupsChange;dataSourceChange;disabledChange;displayExprChange;elementAttrChange;focusStateEnabledChange;groupedChange;groupTemplateChange;heightChange;hintChange;hoverStateEnabledChange;indicateLoadingChange;itemDeleteModeChange;itemDraggingChange;itemHoldTimeoutChange;itemsChange;itemTemplateChange;keyExprChange;menuItemsChange;menuModeChange;nextButtonTextChange;noDataTextChange;pageLoadingTextChange;pageLoadModeChange;pulledDownTextChange;pullingDownTextChange;pullRefreshEnabledChange;refreshingTextChange;repaintChangesOnlyChange;rtlEnabledChange;scrollByContentChange;scrollByThumbChange;scrollingEnabledChange;searchEditorOptionsChange;searchEnabledChange;searchExprChange;searchModeChange;searchTimeoutChange;searchValueChange;selectAllModeChange;selectAllTextChange;selectByClickChange;selectedItemKeysChange;selectedItemsChange;selectionModeChange;showScrollbarChange;showSelectionControlsChange;tabIndexChange;useNativeScrollingChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(U){this.setChildren("items",U)}get menuItemsChildren(){return this._getOption("menuItems")}set menuItemsChildren(U){this.setChildren("menuItems",U)}constructor(U,B,K,J,ie,re,q,Y){super(U,B,K,J,q,Y),this._watcherHelper=J,this._idh=ie,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"groupRendered",emit:"onGroupRendered"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemDeleted",emit:"onItemDeleted"},{subscribe:"itemDeleting",emit:"onItemDeleting"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"itemReordered",emit:"onItemReordered"},{subscribe:"itemSwipe",emit:"onItemSwipe"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"pageLoading",emit:"onPageLoading"},{subscribe:"pullRefresh",emit:"onPullRefresh"},{subscribe:"scroll",emit:"onScroll"},{subscribe:"selectAllValueChanged",emit:"onSelectAllValueChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"allowItemDeletingChange"},{emit:"bounceEnabledChange"},{emit:"collapsibleGroupsChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"groupedChange"},{emit:"groupTemplateChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"indicateLoadingChange"},{emit:"itemDeleteModeChange"},{emit:"itemDraggingChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"keyExprChange"},{emit:"menuItemsChange"},{emit:"menuModeChange"},{emit:"nextButtonTextChange"},{emit:"noDataTextChange"},{emit:"pageLoadingTextChange"},{emit:"pageLoadModeChange"},{emit:"pulledDownTextChange"},{emit:"pullingDownTextChange"},{emit:"pullRefreshEnabledChange"},{emit:"refreshingTextChange"},{emit:"repaintChangesOnlyChange"},{emit:"rtlEnabledChange"},{emit:"scrollByContentChange"},{emit:"scrollByThumbChange"},{emit:"scrollingEnabledChange"},{emit:"searchEditorOptionsChange"},{emit:"searchEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchTimeoutChange"},{emit:"searchValueChange"},{emit:"selectAllModeChange"},{emit:"selectAllTextChange"},{emit:"selectByClickChange"},{emit:"selectedItemKeysChange"},{emit:"selectedItemsChange"},{emit:"selectionModeChange"},{emit:"showScrollbarChange"},{emit:"showSelectionControlsChange"},{emit:"tabIndexChange"},{emit:"useNativeScrollingChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),re.setHost(this)}_createInstance(U,B){return new D(U,B)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(U){super.ngOnChanges(U),this.setupChanges("dataSource",U),this.setupChanges("items",U),this.setupChanges("menuItems",U),this.setupChanges("searchExpr",U),this.setupChanges("selectedItemKeys",U),this.setupChanges("selectedItems",U)}setupChanges(U,B){U in this._optionsToUpdate||this._idh.setup(U,B)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("menuItems"),this._idh.doCheck("searchExpr"),this._idh.doCheck("selectedItemKeys"),this._idh.doCheck("selectedItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(U,B){let K=this._idh.setupSingle(U,B),J=null!==this._idh.getChanges(U,B);(K||J)&&super._setOption(U,B)}static \u0275fac=function(B){return new(B||G)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(C.zF),W.rXU(C.jS),W.rXU(C.$M),W.rXU(C.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:G,selectors:[["dx-list"]],contentQueries:function(B,K,J){if(1&B&&(W.wni(J,I.CVf,4),W.wni(J,I.T0t,4)),2&B){let ie;W.mGM(ie=W.lsd())&&(K.itemsChildren=ie),W.mGM(ie=W.lsd())&&(K.menuItemsChildren=ie)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",allowItemDeleting:"allowItemDeleting",bounceEnabled:"bounceEnabled",collapsibleGroups:"collapsibleGroups",dataSource:"dataSource",disabled:"disabled",displayExpr:"displayExpr",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",grouped:"grouped",groupTemplate:"groupTemplate",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",indicateLoading:"indicateLoading",itemDeleteMode:"itemDeleteMode",itemDragging:"itemDragging",itemHoldTimeout:"itemHoldTimeout",items:"items",itemTemplate:"itemTemplate",keyExpr:"keyExpr",menuItems:"menuItems",menuMode:"menuMode",nextButtonText:"nextButtonText",noDataText:"noDataText",pageLoadingText:"pageLoadingText",pageLoadMode:"pageLoadMode",pulledDownText:"pulledDownText",pullingDownText:"pullingDownText",pullRefreshEnabled:"pullRefreshEnabled",refreshingText:"refreshingText",repaintChangesOnly:"repaintChangesOnly",rtlEnabled:"rtlEnabled",scrollByContent:"scrollByContent",scrollByThumb:"scrollByThumb",scrollingEnabled:"scrollingEnabled",searchEditorOptions:"searchEditorOptions",searchEnabled:"searchEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchTimeout:"searchTimeout",searchValue:"searchValue",selectAllMode:"selectAllMode",selectAllText:"selectAllText",selectByClick:"selectByClick",selectedItemKeys:"selectedItemKeys",selectedItems:"selectedItems",selectionMode:"selectionMode",showScrollbar:"showScrollbar",showSelectionControls:"showSelectionControls",tabIndex:"tabIndex",useNativeScrolling:"useNativeScrolling",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onGroupRendered:"onGroupRendered",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemDeleted:"onItemDeleted",onItemDeleting:"onItemDeleting",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onItemReordered:"onItemReordered",onItemSwipe:"onItemSwipe",onOptionChanged:"onOptionChanged",onPageLoading:"onPageLoading",onPullRefresh:"onPullRefresh",onScroll:"onScroll",onSelectAllValueChanged:"onSelectAllValueChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",allowItemDeletingChange:"allowItemDeletingChange",bounceEnabledChange:"bounceEnabledChange",collapsibleGroupsChange:"collapsibleGroupsChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",groupedChange:"groupedChange",groupTemplateChange:"groupTemplateChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",indicateLoadingChange:"indicateLoadingChange",itemDeleteModeChange:"itemDeleteModeChange",itemDraggingChange:"itemDraggingChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",keyExprChange:"keyExprChange",menuItemsChange:"menuItemsChange",menuModeChange:"menuModeChange",nextButtonTextChange:"nextButtonTextChange",noDataTextChange:"noDataTextChange",pageLoadingTextChange:"pageLoadingTextChange",pageLoadModeChange:"pageLoadModeChange",pulledDownTextChange:"pulledDownTextChange",pullingDownTextChange:"pullingDownTextChange",pullRefreshEnabledChange:"pullRefreshEnabledChange",refreshingTextChange:"refreshingTextChange",repaintChangesOnlyChange:"repaintChangesOnlyChange",rtlEnabledChange:"rtlEnabledChange",scrollByContentChange:"scrollByContentChange",scrollByThumbChange:"scrollByThumbChange",scrollingEnabledChange:"scrollingEnabledChange",searchEditorOptionsChange:"searchEditorOptionsChange",searchEnabledChange:"searchEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchTimeoutChange:"searchTimeoutChange",searchValueChange:"searchValueChange",selectAllModeChange:"selectAllModeChange",selectAllTextChange:"selectAllTextChange",selectByClickChange:"selectByClickChange",selectedItemKeysChange:"selectedItemKeysChange",selectedItemsChange:"selectedItemsChange",selectionModeChange:"selectionModeChange",showScrollbarChange:"showScrollbarChange",showSelectionControlsChange:"showSelectionControlsChange",tabIndexChange:"tabIndexChange",useNativeScrollingChange:"useNativeScrollingChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([C.zF,C.jS,C.fH,C.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(B,K){},encapsulation:2})}return G})(),N=(()=>{class G{static \u0275fac=function(B){return new(B||G)};static \u0275mod=W.$C({type:G});static \u0275inj=W.G2t({imports:[I.iiR,I.XUe,I.POb,I.S2P,I.B9H,I.GIV,I.u4t,C.p_,C.xZ,I.iiR,I.XUe,I.POb,I.S2P,I.B9H,I.GIV,I.u4t,C.xZ]})}return G})()},1983:(In,Ze,M)=>{"use strict";M.d(Ze,{B:()=>b,S:()=>f});var W=M(7788),o=M(2359),P=M(3349);let b=(()=>{class S extends P.ic{instance=null;get elementAttr(){return this._getOption("elementAttr")}set elementAttr(y){this._setOption("elementAttr",y)}get height(){return this._getOption("height")}set height(y){this._setOption("height",y)}get hint(){return this._getOption("hint")}set hint(y){this._setOption("hint",y)}get indicatorSrc(){return this._getOption("indicatorSrc")}set indicatorSrc(y){this._setOption("indicatorSrc",y)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(y){this._setOption("rtlEnabled",y)}get visible(){return this._getOption("visible")}set visible(y){this._setOption("visible",y)}get width(){return this._getOption("width")}set width(y){this._setOption("width",y)}onContentReady;onDisposing;onInitialized;onOptionChanged;elementAttrChange;heightChange;hintChange;indicatorSrcChange;rtlEnabledChange;visibleChange;widthChange;constructor(y,d,c,s,a,u,h){super(y,d,c,s,u,h),this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"indicatorSrcChange"},{emit:"rtlEnabledChange"},{emit:"visibleChange"},{emit:"widthChange"}]),a.setHost(this)}_createInstance(y,d){return new o.A(y,d)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(d){return new(d||S)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:S,selectors:[["dx-load-indicator"]],inputs:{elementAttr:"elementAttr",height:"height",hint:"hint",indicatorSrc:"indicatorSrc",rtlEnabled:"rtlEnabled",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",elementAttrChange:"elementAttrChange",heightChange:"heightChange",hintChange:"hintChange",indicatorSrcChange:"indicatorSrcChange",rtlEnabledChange:"rtlEnabledChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH]),W.Vt3],decls:0,vars:0,template:function(d,c){},encapsulation:2})}return S})(),f=(()=>{class S{static \u0275fac=function(d){return new(d||S)};static \u0275mod=W.$C({type:S});static \u0275inj=W.G2t({imports:[P.p_,P.xZ,P.xZ]})}return S})()},2333:(In,Ze,M)=>{"use strict";M.d(Ze,{W:()=>fe,t:()=>xe});var W=M(7788),o=M(4504),P=M(1973),b=M(5973),f=M(9522),S=M(5170),T=M(5704),y=M(7591),d=M(4859),c=M(3090),s=M(2660),a=M(1363),u=M(7007),h=M(1830),g=M(6110),_=M(4072),x=M(8360),w=M(1010),D=M(3608),C=M(8910),I=M(9212),L=M(2773);const N=(0,g.zk)(),ue=w.A.inherit({_supportedKeys(){return(0,c.X)(this.callBase(),{space(Te){Te.preventDefault(),this._validatedOpening()},enter(){this._validatedOpening()}})},_getDefaultOptions(){const Te=Ee=>{let Oe;return Oe="phone"===b.A.real().deviceType&&N.visualViewport?N.visualViewport[Ee]:"width"===Ee?(0,a.RG)(N):(0,a.Oq)(N),.8*Oe};return(0,c.X)(this.callBase(),{placeholder:x.A.format("Select"),searchPlaceholder:x.A.format("Search"),searchEnabled:!0,searchStartEvent:"input change keyup",cleanSearchOnOpening:!0,showCancelButton:!0,showClearButton:!1,clearButtonText:x.A.format("Clear"),applyButtonText:x.A.format("OK"),pullRefreshEnabled:!1,useNativeScrolling:!0,pullingDownText:x.A.format("dxList-pullingDownText"),pulledDownText:x.A.format("dxList-pulledDownText"),refreshingText:x.A.format("dxList-refreshingText"),pageLoadingText:x.A.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:x.A.format("dxList-nextButtonText"),grouped:!1,groupTemplate:"group",usePopover:!1,openOnFieldClick:!0,showDropDownButton:!1,focusStateEnabled:!1,dropDownOptions:{showTitle:!0,width:()=>Te("width"),height:()=>Te("height"),shading:!0,hideOnOutsideClick:!1,position:void 0,animation:{},title:"",titleTemplate:"title",onTitleRendered:null,fullScreen:!1},dropDownCentered:!1,_scrollToSelectedItemEnabled:!1,useHiddenSubmitElement:!0})},_setDeprecatedOptions(){this.callBase(),(0,c.X)(this._deprecatedOptions,{valueChangeEvent:{since:"22.1",alias:"searchStartEvent"}})},_defaultOptionsRules(){const Te=(0,I.ss)();return this.callBase().concat([{device:()=>!u.nativeScrolling,options:{useNativeScrolling:!1}},{device:Ee=>!b.A.isSimulator()&&"desktop"===b.A.real().deviceType&&"generic"===Ee.platform,options:{usePopover:!0,dropDownOptions:{height:"auto"}}},{device:{platform:"ios",phone:!0},options:{dropDownOptions:{fullScreen:!0}}},{device:{platform:"ios",tablet:!0},options:{dropDownOptions:{width:()=>.4*Math.min((0,a.RG)(N),(0,a.Oq)(N)),height:"auto"},usePopover:!0}},{device:()=>"desktop"===b.A.real().deviceType&&!b.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,I.gx)(Te),options:{usePopover:!1,searchEnabled:!1,showCancelButton:!1,dropDownCentered:!0,_scrollToSelectedItemEnabled:!0,dropDownOptions:{hideOnOutsideClick:!0,_ignoreFunctionValueDeprecation:!0,width:()=>(0,L.v)(this.$element()),height:function(){return this._getPopupHeight()}.bind(this),showTitle:!1,shading:!1}}}])},_init(){this.callBase(),this._initActions()},_initActions(){this.callBase(),this._initScrollAction(),this._initPageLoadingAction(),this._initPullRefreshAction()},_initPageLoadingAction(){this._pageLoadingAction=this._createActionByOption("onPageLoading")},_initPullRefreshAction(){this._pullRefreshAction=this._createActionByOption("onPullRefresh")},_initScrollAction(){this._scrollAction=this._createActionByOption("onScroll")},_scrollHandler(Te){this._scrollAction(Te)},_pullRefreshHandler(Te){this._pullRefreshAction(Te)},_pageLoadingHandler(Te){this._pageLoadingAction(Te)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({group:new y.M("group"),title:new y.M("title")})},_initMarkup(){this.$element().addClass("dx-lookup").toggleClass("dx-lookup-popover-mode",this.option("usePopover")),this.callBase()},_inputWrapper(){return this.$element().find(".dx-lookup-field-wrapper")},_dataSourceOptions(){return(0,c.X)(this.callBase(),{paginate:!0})},_fireContentReadyAction:d.lQ,_popupWrapperClass:()=>"",_renderInput(){this._$field=(0,T.A)("<div>").addClass("dx-lookup-field"),this._applyInputAttributes(this.option("inputAttr"));const Te=(0,T.A)("<div>").addClass("dx-lookup-arrow");this._$fieldWrapper=(0,T.A)("<div>").addClass("dx-lookup-field-wrapper").append(this._$field).append(Te).appendTo(this.$element())},_applyInputAttributes(Te){this._$field.attr(Te)},_getInputContainer(){return this._$fieldWrapper},_renderField(){const Te=this._getTemplateByOption("fieldTemplate");if(Te&&this.option("fieldTemplate"))return void this._renderFieldTemplate(Te);const Ee=this.option("displayValue");this._updateField(Ee);const Oe=!this.option("selectedItem");this.$element().toggleClass("dx-lookup-empty",Oe).toggleClass("dx-texteditor-empty",Oe)},_getLabelContainer(){return this._$field},_renderDisplayText(Te){this._input().length?this.callBase(Te):this._updateField(Te)},_updateField(Te){if(Te=(0,h.O9)(Te)&&String(Te),this._$field.empty(),Te)this._$field.text(Te);else{const Ee=(0,T.A)("<div>").attr({"data-dx_placeholder":this.option("placeholder")});this._$field.append(Ee),Ee.addClass("dx-placeholder")}},_renderButtonContainers:d.lQ,_renderFieldTemplate(Te){this._$field.empty();const Ee=this._fieldRenderData();Te.render({model:Ee,container:(0,f.cc)(this._$field)})},_fieldRenderData(){return this.option("selectedItem")},_popupShowingHandler(){this.callBase.apply(this,arguments),this.option("cleanSearchOnOpening")&&(this.option("searchEnabled")&&this._searchBox.option("value")&&(this._searchBox.option("value",""),this._searchCanceled()),this._list&&this._list.option("focusedElement",null)),this.option("dropDownOptions.fullScreen")&&this.option("_scrollToSelectedItemEnabled")&&(this._popup.option("position").of=(0,T.A)(N))},_popupShownHandler(){const Te=this.option("_scrollToSelectedItemEnabled");!this.option("dropDownOptions.fullScreen")&&Te&&this._setPopupPosition(),this.callBase()},_scrollToSelectedItem(){const Te=this._list.option("selectedIndex"),Ee=this._list.option("items"),Oe=Ee.length;0!==Oe&&(this._list.option("grouped")?this._list.scrollToItem({group:Oe-1,item:Ee[Oe-1].items.length-1}):this._list.scrollToItem(Oe-1),this._list.scrollToItem(Te))},_getDifferenceOffsets(Te){return Te.offset().top-(0,T.A)(this.element()).offset().top},_isCenteringEnabled:(Te,Ee)=>Te>1&&Te<Ee-2,_getPopupOffset(){const Te=this._listItemElements().length;if(0===Te)return;const Ee=(0,T.A)(this._list.element()).find(".dx-list-item-selected"),Oe=this._listItemElements().index(Ee),ze=((0,a.Oq)(Ee)-(0,a.Oq)(this.element()))/2,$e=(0,T.A)(this._list.element()).offset().top,Be=this.option("dropDownOptions.height"),Ue="function"==typeof Be?Be():Be,ot=(0,a.Oq)(N);let st=0;if(-1!==Oe){if(this._isCenteringEnabled(Oe,Te)){this._scrollToSelectedItem();const Ke=(Ue-(0,a.Oq)(Ee))/2-this._getDifferenceOffsets(Ee);this._list.scrollTo(this._list.scrollTop()+4-Ke),st=ze+this._getDifferenceOffsets(Ee),$e<st&&Oe!==Te-3&&(this._list.scrollTo(this._list.scrollTop()+this._getDifferenceOffsets(Ee)/2),st=ze+this._getDifferenceOffsets(Ee))}else Oe<=1?(this._list.scrollTo(0),st=ze+this._getDifferenceOffsets(Ee)):Oe>=Te-2&&(this._scrollToSelectedItem(),st=ze+this._getDifferenceOffsets(Ee));$e<st&&(this._scrollToSelectedItem(),st=ze+8)}const et=Ue-st-(0,a.Oq)(this.element());return ot-$e<et&&(this._list.scrollTo(this._list.scrollTop()+ze-et),st=Ue-(0,a.Oq)(this.element())-8),st},_setPopupPosition(){if(!this.option("dropDownCentered")||this._popup.$wrapper().hasClass("dx-popover-flipped-vertical"))return;const Ee=(0,T.A)(this._popup.$content()).parent(),Oe=this._getPopupOffset(),ze=(0,o.x5)(Ee);(0,o.Cy)(Ee,{top:ze.top-Oe})},_listItemGroupedElements(){const Te=this._list._getItemsContainer().children(),Ee=[];return Te.each((Oe,ze)=>{Ee.push((0,T.A)(ze).find(".dx-list-group-header")[0]),(0,T.A)(ze).find(".dx-list-item").each((Be,Ue)=>{Ee.push(Ue)})}),(0,T.A)(Ee)},_calculateListHeight(Te){const Ee=Te?this._listItemGroupedElements():this._listItemElements(),Oe=(0,T.A)(".dx-list-item-selected"),ze=Ee.index(Oe);let $e=0,Be=[];return 0===Ee.length?$e+=8:Ee.length<5?Ee.each((Ue,ot)=>{$e+=(0,a.P$)(ot)}):(Be=ze<=1?Ee.slice(0,5):this._isCenteringEnabled(ze,Ee.length)?Ee.slice(ze-2,ze+3):Ee.slice(Ee.length-5,Ee.length),Be.each((Ue,ot)=>{$e+=(0,a.P$)(ot)})),$e+(Te?8:16)},_getPopupHeight(){var Te;return null!==(Te=this._list)&&void 0!==Te&&Te.itemElements().length?this._calculateListHeight(this.option("grouped"))+(this._$searchWrapper?(0,a.P$)(this._$searchWrapper):0)+(this._popup._$bottom?(0,a.P$)(this._popup._$bottom):0)+(this._popup._$title?(0,a.P$)(this._popup._$title):0):"auto"},_popupTabHandler:d.lQ,_renderPopup(){this.option("usePopover")&&!this.option("dropDownOptions.fullScreen")?this.option("_scrollToSelectedItemEnabled")?this.callBase():(this._renderPopover(),this._attachPopupKeyHandler()):this.callBase(),this._$popup.addClass("dx-lookup-popup"),this._popup.$wrapper().addClass("dx-lookup-popup-wrapper")},_renderPopover(){this._popup=this._createComponent(this._$popup,D.A,(0,c.X)(this._popupConfig(),this._options.cache("dropDownOptions"),{showEvent:null,hideEvent:null,target:this.$element(),fullScreen:!1,shading:!1,hideOnParentScroll:!0,_fixWrapperPosition:!1,width:this._isInitialOptionValue("dropDownOptions.width")?function(){return(0,a.Ot)(this.$element())}.bind(this):this._popupConfig().width})),this._popup.$overlayContent().attr("role","dialog"),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this.option("_scrollToSelectedItemEnabled")&&this._popup._$arrow.remove(),this._setPopupContentId(this._popup.$content()),this._contentReadyHandler()},_popupHidingHandler(){this.callBase(),this.option("focusStateEnabled")&&this.focus()},_popupHiddenHandler(){this.callBase(),this.option("_scrollToSelectedItemEnabled")&&(0,o.fw)((0,T.A)(this._popup.content()).parent())},_preventFocusOnPopup:d.lQ,_popupConfig(){const Te=(0,c.X)(this.callBase(),{toolbarItems:this._getPopupToolbarItems(),hideOnParentScroll:!1,onPositioned:null,maxHeight:"100vh",showTitle:this.option("dropDownOptions.showTitle"),title:this.option("dropDownOptions.title"),titleTemplate:this._getTemplateByOption("dropDownOptions.titleTemplate"),onTitleRendered:this.option("dropDownOptions.onTitleRendered"),fullScreen:this.option("dropDownOptions.fullScreen"),shading:this.option("dropDownOptions.shading"),hideOnOutsideClick:this.option("dropDownOptions.hideOnOutsideClick")||this.option("dropDownOptions.closeOnOutsideClick")});return delete Te.animation,delete Te.position,this.option("_scrollToSelectedItemEnabled")&&(Te.position=this.option("dropDownCentered")?{my:"left top",at:"left top",of:this.element()}:{my:"left top",at:"left bottom",of:this.element()},Te.hideOnParentScroll=!0),(0,s.__)(["position","animation","width","height"],(Ee,Oe)=>{const ze=this.option(`dropDownOptions.${Oe}`);void 0!==ze&&(Te[Oe]=ze)}),Te},_getPopupToolbarItems(){const Te="useButtons"===this.option("applyValueMode")?this._popupToolbarItemsConfig():[],Ee=this._getCancelButtonConfig();Ee&&Te.push(Ee);const Oe=this._getClearButtonConfig();return Oe&&Te.push(Oe),this._applyButtonsLocation(Te)},_popupToolbarItemsConfig(){return[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText")}}]},_getCancelButtonConfig(){return this.option("showCancelButton")?{shortcut:"cancel",onClick:this._cancelButtonHandler.bind(this),options:{text:this.option("cancelButtonText")}}:null},_getClearButtonConfig(){return this.option("showClearButton")?{shortcut:"clear",onClick:this._resetValue.bind(this),options:{text:this.option("clearButtonText")}}:null},_applyButtonHandler(Te){Te&&this._saveValueChangeEvent(Te.event),this.option("value",this._valueGetter(this._currentSelectedItem())),this.callBase()},_cancelButtonHandler(){this._refreshSelected(),this.callBase()},_refreshPopupVisibility(){this.option("opened")&&this._updateListDimensions()},_dimensionChanged(){this.option("usePopover")&&!this.option("dropDownOptions.width")&&this.option("dropDownOptions.width",(0,a.RG)(this.$element())),this._updateListDimensions()},_input(){return this._$searchBox||this.callBase()},_renderPopupContent(){this.callBase(),this._renderSearch()},_renderValueChangeEvent:d.lQ,_renderSearch(){const Te=this.option("searchEnabled");if(this._toggleSearchClass(Te),Te){const Ee=this._$searchWrapper=(0,T.A)("<div>").addClass("dx-lookup-search-wrapper"),Oe=this._$searchBox=(0,T.A)("<div>").addClass("dx-lookup-search").appendTo(Ee),$e=b.A.current().android?"text":"search";let Be=!1;const Ue={mode:$e,showClearButton:!0,valueChangeEvent:this.option("searchStartEvent"),inputAttr:{"aria-label":"Search"},onDisposing:()=>Be=!1,onFocusIn:()=>Be=!0,onFocusOut:()=>Be=!1,onKeyboardHandled:ot=>Be&&this._list._keyboardHandler(ot),onValueChanged:ot=>this._searchHandler(ot)};this._searchBox=this._createComponent(Oe,C.A,Ue),this._registerSearchKeyHandlers(),Ee.insertBefore(this._$list),this._setSearchPlaceholder()}},_updateActiveDescendant(){if(this.callBase(),!this._$searchBox)return;const Te=this._$searchBox.find("input");this.callBase(Te)},_removeSearch(){this._$searchWrapper&&this._$searchWrapper.remove(),delete this._$searchWrapper,this._$searchBox&&this._$searchBox.remove(),delete this._$searchBox,delete this._searchBox},_selectListItemHandler(Te){const Ee=(0,T.A)(this._list.option("focusedElement"));Ee.length&&(Te.preventDefault(),Te.target=Ee.get(0),this._saveValueChangeEvent(Te),this._selectListItem(Te.itemData,Ee))},_registerSearchKeyHandlers(){this._searchBox.registerKeyHandler("enter",this._selectListItemHandler.bind(this)),this._searchBox.registerKeyHandler("space",this._selectListItemHandler.bind(this)),this._searchBox.registerKeyHandler("end",d.lQ),this._searchBox.registerKeyHandler("home",d.lQ)},_toggleSearchClass(Te){this._popup&&this._popup.$wrapper().toggleClass("dx-lookup-popup-search",Te)},_setSearchPlaceholder(){if(!this._$searchBox)return;const Te=this.option("minSearchLength");let Ee=this.option("searchPlaceholder");Te&&Ee===x.A.format("Search")&&(Ee=x.A.getFormatter("dxLookup-searchPlaceholder")(Te)),this._searchBox.option("placeholder",Ee)},_setAriaTargetForList:d.lQ,_listConfig(){return(0,c.X)(this.callBase(),{tabIndex:0,grouped:this.option("grouped"),groupTemplate:this._getTemplateByOption("groupTemplate"),pullRefreshEnabled:this.option("pullRefreshEnabled"),useNativeScrolling:this.option("useNativeScrolling"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),pageLoadingText:this.option("pageLoadingText"),onScroll:this._scrollHandler.bind(this),onPullRefresh:this._pullRefreshHandler.bind(this),onPageLoading:this._pageLoadingHandler.bind(this),pageLoadMode:this.option("pageLoadMode"),nextButtonText:this.option("nextButtonText"),indicateLoading:this.option("searchEnabled"),onSelectionChanged:this._getSelectionChangedHandler()})},_getSelectionChangedHandler(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):d.lQ},_listContentReadyHandler(){this.callBase(...arguments),this._refreshSelected()},_runWithoutCloseOnScroll(Te){const{_scrollToSelectedItemEnabled:Ee}=this.option(),Oe=this._popup.option("hideOnParentScroll");Ee?(this._popup.option("hideOnParentScroll",!1),Te(),this._hideOnParentScrollTimer=setTimeout(()=>{this._popup.option("hideOnParentScroll",Oe)})):Te()},_setFocusPolicy(){this.option("focusStateEnabled")&&this._runWithoutCloseOnScroll(()=>{this.option("searchEnabled")?this._searchBox.focus():this._list.focus()})},_focusTarget(){return this._$field},_keyboardEventBindingTarget(){return this._$field},_listItemClickHandler(Te){this._saveValueChangeEvent(Te.event),this._selectListItem(Te.itemData,Te.event.currentTarget)},_selectListItem(Te,Ee){this._list.selectItem(Ee),"instantly"===this.option("applyValueMode")&&this._applyButtonHandler()},_currentSelectedItem(){return this.option("grouped")?this._list.option("selectedItems[0]").items[0]:this._list.option("selectedItems[0]")},_resetValue(Te){this._saveValueChangeEvent(Te.event),this.option("value",null),this.option("opened",!1)},_searchValue(){return this.option("searchEnabled")&&this._searchBox?this._searchBox.option("value"):""},_renderInputValue(){return this.callBase().always(()=>{this._refreshSelected()})},_renderPlaceholder(){0!==this.$element().find(".dx-texteditor-input").length&&this.callBase()},_clean(){this._$fieldWrapper.remove(),clearTimeout(this._hideOnParentScrollTimer),this._hideOnParentScrollTimer=null,this._$searchBox=null,this.callBase()},_optionChanged(Te){var Ee;const{name:Oe,fullName:ze,value:$e}=Te;switch(Oe){case"dataSource":this.callBase(...arguments),this._renderField();break;case"searchEnabled":this._popup&&(this._removeSearch(),this._renderSearch());break;case"searchPlaceholder":this._setSearchPlaceholder();break;case"minSearchLength":this._setSearchPlaceholder(),this.callBase(...arguments);break;case"inputAttr":this._applyInputAttributes($e);break;case"usePopover":case"placeholder":this._invalidate();break;case"clearButtonText":case"showClearButton":case"showCancelButton":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"applyValueMode":default:this.callBase(...arguments);break;case"onPageLoading":this._initPageLoadingAction();break;case"onPullRefresh":this._initPullRefreshAction();break;case"pullRefreshEnabled":case"useNativeScrolling":case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"nextButtonText":case"grouped":case"groupTemplate":this._setListOption(Oe);break;case"searchStartEvent":null===(Ee=this._searchBox)||void 0===Ee||Ee.option("valueChangeEvent",$e);break;case"onScroll":this._initScrollAction();break;case"pageLoadMode":this._setListOption("pageLoadMode",this.option("pageLoadMode"));break;case"cleanSearchOnOpening":case"_scrollToSelectedItemEnabled":break;case"dropDownOptions":switch(ze){case"dropDownOptions.width":case"dropDownOptions.height":this._popupOptionChanged({name:Oe,fullName:ze,value:"auto"===$e?this.initialOption("dropDownOptions")[(0,S.MO)(ze)]:$e}),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;default:this.callBase(...arguments)}break;case"dropDownCentered":this.option("_scrollToSelectedItemEnabled")&&(this.option("dropDownOptions.position",void 0),this._renderPopup())}},focus(){this.option("opened")?this._setFocusPolicy():_.A.trigger(this._focusTarget(),"focus")},field(){return this._$field}});(0,P.A)("dxLookup",ue);const ve=ue;var le=M(1491),Ce=M(3349),ye=M(8914);const ge={provide:le.kq,useExisting:(0,W.Rfq)(()=>fe),multi:!0};let fe=(()=>{class Te extends Ce.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(Oe){this._setOption("accessKey",Oe)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(Oe){this._setOption("activeStateEnabled",Oe)}get applyButtonText(){return this._getOption("applyButtonText")}set applyButtonText(Oe){this._setOption("applyButtonText",Oe)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(Oe){this._setOption("applyValueMode",Oe)}get cancelButtonText(){return this._getOption("cancelButtonText")}set cancelButtonText(Oe){this._setOption("cancelButtonText",Oe)}get cleanSearchOnOpening(){return this._getOption("cleanSearchOnOpening")}set cleanSearchOnOpening(Oe){this._setOption("cleanSearchOnOpening",Oe)}get clearButtonText(){return this._getOption("clearButtonText")}set clearButtonText(Oe){this._setOption("clearButtonText",Oe)}get dataSource(){return this._getOption("dataSource")}set dataSource(Oe){this._setOption("dataSource",Oe)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(Oe){this._setOption("deferRendering",Oe)}get disabled(){return this._getOption("disabled")}set disabled(Oe){this._setOption("disabled",Oe)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(Oe){this._setOption("displayExpr",Oe)}get displayValue(){return this._getOption("displayValue")}set displayValue(Oe){this._setOption("displayValue",Oe)}get dropDownCentered(){return this._getOption("dropDownCentered")}set dropDownCentered(Oe){this._setOption("dropDownCentered",Oe)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(Oe){this._setOption("dropDownOptions",Oe)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(Oe){this._setOption("elementAttr",Oe)}get fieldTemplate(){return this._getOption("fieldTemplate")}set fieldTemplate(Oe){this._setOption("fieldTemplate",Oe)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(Oe){this._setOption("focusStateEnabled",Oe)}get fullScreen(){return this._getOption("fullScreen")}set fullScreen(Oe){this._setOption("fullScreen",Oe)}get grouped(){return this._getOption("grouped")}set grouped(Oe){this._setOption("grouped",Oe)}get groupTemplate(){return this._getOption("groupTemplate")}set groupTemplate(Oe){this._setOption("groupTemplate",Oe)}get height(){return this._getOption("height")}set height(Oe){this._setOption("height",Oe)}get hint(){return this._getOption("hint")}set hint(Oe){this._setOption("hint",Oe)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(Oe){this._setOption("hoverStateEnabled",Oe)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(Oe){this._setOption("inputAttr",Oe)}get isDirty(){return this._getOption("isDirty")}set isDirty(Oe){this._setOption("isDirty",Oe)}get isValid(){return this._getOption("isValid")}set isValid(Oe){this._setOption("isValid",Oe)}get items(){return this._getOption("items")}set items(Oe){this._setOption("items",Oe)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(Oe){this._setOption("itemTemplate",Oe)}get label(){return this._getOption("label")}set label(Oe){this._setOption("label",Oe)}get labelMode(){return this._getOption("labelMode")}set labelMode(Oe){this._setOption("labelMode",Oe)}get minSearchLength(){return this._getOption("minSearchLength")}set minSearchLength(Oe){this._setOption("minSearchLength",Oe)}get name(){return this._getOption("name")}set name(Oe){this._setOption("name",Oe)}get nextButtonText(){return this._getOption("nextButtonText")}set nextButtonText(Oe){this._setOption("nextButtonText",Oe)}get noDataText(){return this._getOption("noDataText")}set noDataText(Oe){this._setOption("noDataText",Oe)}get opened(){return this._getOption("opened")}set opened(Oe){this._setOption("opened",Oe)}get pageLoadingText(){return this._getOption("pageLoadingText")}set pageLoadingText(Oe){this._setOption("pageLoadingText",Oe)}get pageLoadMode(){return this._getOption("pageLoadMode")}set pageLoadMode(Oe){this._setOption("pageLoadMode",Oe)}get placeholder(){return this._getOption("placeholder")}set placeholder(Oe){this._setOption("placeholder",Oe)}get pulledDownText(){return this._getOption("pulledDownText")}set pulledDownText(Oe){this._setOption("pulledDownText",Oe)}get pullingDownText(){return this._getOption("pullingDownText")}set pullingDownText(Oe){this._setOption("pullingDownText",Oe)}get pullRefreshEnabled(){return this._getOption("pullRefreshEnabled")}set pullRefreshEnabled(Oe){this._setOption("pullRefreshEnabled",Oe)}get refreshingText(){return this._getOption("refreshingText")}set refreshingText(Oe){this._setOption("refreshingText",Oe)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(Oe){this._setOption("rtlEnabled",Oe)}get searchEnabled(){return this._getOption("searchEnabled")}set searchEnabled(Oe){this._setOption("searchEnabled",Oe)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(Oe){this._setOption("searchExpr",Oe)}get searchMode(){return this._getOption("searchMode")}set searchMode(Oe){this._setOption("searchMode",Oe)}get searchPlaceholder(){return this._getOption("searchPlaceholder")}set searchPlaceholder(Oe){this._setOption("searchPlaceholder",Oe)}get searchStartEvent(){return this._getOption("searchStartEvent")}set searchStartEvent(Oe){this._setOption("searchStartEvent",Oe)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(Oe){this._setOption("searchTimeout",Oe)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(Oe){this._setOption("selectedItem",Oe)}get showCancelButton(){return this._getOption("showCancelButton")}set showCancelButton(Oe){this._setOption("showCancelButton",Oe)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(Oe){this._setOption("showClearButton",Oe)}get showDataBeforeSearch(){return this._getOption("showDataBeforeSearch")}set showDataBeforeSearch(Oe){this._setOption("showDataBeforeSearch",Oe)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(Oe){this._setOption("stylingMode",Oe)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(Oe){this._setOption("tabIndex",Oe)}get text(){return this._getOption("text")}set text(Oe){this._setOption("text",Oe)}get useItemTextAsTitle(){return this._getOption("useItemTextAsTitle")}set useItemTextAsTitle(Oe){this._setOption("useItemTextAsTitle",Oe)}get useNativeScrolling(){return this._getOption("useNativeScrolling")}set useNativeScrolling(Oe){this._setOption("useNativeScrolling",Oe)}get usePopover(){return this._getOption("usePopover")}set usePopover(Oe){this._setOption("usePopover",Oe)}get validationError(){return this._getOption("validationError")}set validationError(Oe){this._setOption("validationError",Oe)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(Oe){this._setOption("validationErrors",Oe)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(Oe){this._setOption("validationMessageMode",Oe)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(Oe){this._setOption("validationMessagePosition",Oe)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(Oe){this._setOption("validationStatus",Oe)}get value(){return this._getOption("value")}set value(Oe){this._setOption("value",Oe)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(Oe){this._setOption("valueChangeEvent",Oe)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(Oe){this._setOption("valueExpr",Oe)}get visible(){return this._getOption("visible")}set visible(Oe){this._setOption("visible",Oe)}get width(){return this._getOption("width")}set width(Oe){this._setOption("width",Oe)}get wrapItemText(){return this._getOption("wrapItemText")}set wrapItemText(Oe){this._setOption("wrapItemText",Oe)}onClosed;onContentReady;onDisposing;onInitialized;onItemClick;onOpened;onOptionChanged;onPageLoading;onPullRefresh;onScroll;onSelectionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;applyButtonTextChange;applyValueModeChange;cancelButtonTextChange;cleanSearchOnOpeningChange;clearButtonTextChange;dataSourceChange;deferRenderingChange;disabledChange;displayExprChange;displayValueChange;dropDownCenteredChange;dropDownOptionsChange;elementAttrChange;fieldTemplateChange;focusStateEnabledChange;fullScreenChange;groupedChange;groupTemplateChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;itemsChange;itemTemplateChange;labelChange;labelModeChange;minSearchLengthChange;nameChange;nextButtonTextChange;noDataTextChange;openedChange;pageLoadingTextChange;pageLoadModeChange;placeholderChange;pulledDownTextChange;pullingDownTextChange;pullRefreshEnabledChange;refreshingTextChange;rtlEnabledChange;searchEnabledChange;searchExprChange;searchModeChange;searchPlaceholderChange;searchStartEventChange;searchTimeoutChange;selectedItemChange;showCancelButtonChange;showClearButtonChange;showDataBeforeSearchChange;stylingModeChange;tabIndexChange;textChange;useItemTextAsTitleChange;useNativeScrollingChange;usePopoverChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;valueExprChange;visibleChange;widthChange;wrapItemTextChange;onBlur;change(Oe){}touched=Oe=>{};get itemsChildren(){return this._getOption("items")}set itemsChildren(Oe){this.setChildren("items",Oe)}constructor(Oe,ze,$e,Be,Ue,ot,st,et){super(Oe,ze,$e,Be,st,et),this._watcherHelper=Be,this._idh=Ue,this._createEventEmitters([{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"pageLoading",emit:"onPageLoading"},{subscribe:"pullRefresh",emit:"onPullRefresh"},{subscribe:"scroll",emit:"onScroll"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"applyButtonTextChange"},{emit:"applyValueModeChange"},{emit:"cancelButtonTextChange"},{emit:"cleanSearchOnOpeningChange"},{emit:"clearButtonTextChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"displayValueChange"},{emit:"dropDownCenteredChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"fieldTemplateChange"},{emit:"focusStateEnabledChange"},{emit:"fullScreenChange"},{emit:"groupedChange"},{emit:"groupTemplateChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"minSearchLengthChange"},{emit:"nameChange"},{emit:"nextButtonTextChange"},{emit:"noDataTextChange"},{emit:"openedChange"},{emit:"pageLoadingTextChange"},{emit:"pageLoadModeChange"},{emit:"placeholderChange"},{emit:"pulledDownTextChange"},{emit:"pullingDownTextChange"},{emit:"pullRefreshEnabledChange"},{emit:"refreshingTextChange"},{emit:"rtlEnabledChange"},{emit:"searchEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchPlaceholderChange"},{emit:"searchStartEventChange"},{emit:"searchTimeoutChange"},{emit:"selectedItemChange"},{emit:"showCancelButtonChange"},{emit:"showClearButtonChange"},{emit:"showDataBeforeSearchChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useItemTextAsTitleChange"},{emit:"useNativeScrollingChange"},{emit:"usePopoverChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapItemTextChange"},{emit:"onBlur"}]),this._idh.setHost(this),ot.setHost(this)}_createInstance(Oe,ze){return new ve(Oe,ze)}writeValue(Oe){this.eventHelper.lockedValueChangeEvent=!0,this.value=Oe,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(Oe){this.disabled=Oe}registerOnChange(Oe){this.change=Oe}registerOnTouched(Oe){this.touched=Oe}_createWidget(Oe){super._createWidget(Oe),this.instance.on("focusOut",ze=>{this.eventHelper.fireNgEvent("onBlur",[ze])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(Oe){super.ngOnChanges(Oe),this.setupChanges("dataSource",Oe),this.setupChanges("items",Oe),this.setupChanges("searchExpr",Oe),this.setupChanges("validationErrors",Oe)}setupChanges(Oe,ze){Oe in this._optionsToUpdate||this._idh.setup(Oe,ze)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("searchExpr"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(Oe,ze){let $e=this._idh.setupSingle(Oe,ze),Be=null!==this._idh.getChanges(Oe,ze);($e||Be)&&super._setOption(Oe,ze)}static \u0275fac=function(ze){return new(ze||Te)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(Ce.zF),W.rXU(Ce.jS),W.rXU(Ce.$M),W.rXU(Ce.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:Te,selectors:[["dx-lookup"]],contentQueries:function(ze,$e,Be){if(1&ze&&W.wni(Be,ye.CVf,4),2&ze){let Ue;W.mGM(Ue=W.lsd())&&($e.itemsChildren=Ue)}},hostBindings:function(ze,$e){1&ze&&W.bIt("valueChange",function(Ue){return $e.change(Ue)})("onBlur",function(Ue){return $e.touched(Ue)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",applyButtonText:"applyButtonText",applyValueMode:"applyValueMode",cancelButtonText:"cancelButtonText",cleanSearchOnOpening:"cleanSearchOnOpening",clearButtonText:"clearButtonText",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayExpr:"displayExpr",displayValue:"displayValue",dropDownCentered:"dropDownCentered",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",fieldTemplate:"fieldTemplate",focusStateEnabled:"focusStateEnabled",fullScreen:"fullScreen",grouped:"grouped",groupTemplate:"groupTemplate",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",items:"items",itemTemplate:"itemTemplate",label:"label",labelMode:"labelMode",minSearchLength:"minSearchLength",name:"name",nextButtonText:"nextButtonText",noDataText:"noDataText",opened:"opened",pageLoadingText:"pageLoadingText",pageLoadMode:"pageLoadMode",placeholder:"placeholder",pulledDownText:"pulledDownText",pullingDownText:"pullingDownText",pullRefreshEnabled:"pullRefreshEnabled",refreshingText:"refreshingText",rtlEnabled:"rtlEnabled",searchEnabled:"searchEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchPlaceholder:"searchPlaceholder",searchStartEvent:"searchStartEvent",searchTimeout:"searchTimeout",selectedItem:"selectedItem",showCancelButton:"showCancelButton",showClearButton:"showClearButton",showDataBeforeSearch:"showDataBeforeSearch",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useItemTextAsTitle:"useItemTextAsTitle",useNativeScrolling:"useNativeScrolling",usePopover:"usePopover",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",valueExpr:"valueExpr",visible:"visible",width:"width",wrapItemText:"wrapItemText"},outputs:{onClosed:"onClosed",onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPageLoading:"onPageLoading",onPullRefresh:"onPullRefresh",onScroll:"onScroll",onSelectionChanged:"onSelectionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",applyButtonTextChange:"applyButtonTextChange",applyValueModeChange:"applyValueModeChange",cancelButtonTextChange:"cancelButtonTextChange",cleanSearchOnOpeningChange:"cleanSearchOnOpeningChange",clearButtonTextChange:"clearButtonTextChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",displayValueChange:"displayValueChange",dropDownCenteredChange:"dropDownCenteredChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",fieldTemplateChange:"fieldTemplateChange",focusStateEnabledChange:"focusStateEnabledChange",fullScreenChange:"fullScreenChange",groupedChange:"groupedChange",groupTemplateChange:"groupTemplateChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",labelChange:"labelChange",labelModeChange:"labelModeChange",minSearchLengthChange:"minSearchLengthChange",nameChange:"nameChange",nextButtonTextChange:"nextButtonTextChange",noDataTextChange:"noDataTextChange",openedChange:"openedChange",pageLoadingTextChange:"pageLoadingTextChange",pageLoadModeChange:"pageLoadModeChange",placeholderChange:"placeholderChange",pulledDownTextChange:"pulledDownTextChange",pullingDownTextChange:"pullingDownTextChange",pullRefreshEnabledChange:"pullRefreshEnabledChange",refreshingTextChange:"refreshingTextChange",rtlEnabledChange:"rtlEnabledChange",searchEnabledChange:"searchEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchPlaceholderChange:"searchPlaceholderChange",searchStartEventChange:"searchStartEventChange",searchTimeoutChange:"searchTimeoutChange",selectedItemChange:"selectedItemChange",showCancelButtonChange:"showCancelButtonChange",showClearButtonChange:"showClearButtonChange",showDataBeforeSearchChange:"showDataBeforeSearchChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useItemTextAsTitleChange:"useItemTextAsTitleChange",useNativeScrollingChange:"useNativeScrollingChange",usePopoverChange:"usePopoverChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapItemTextChange:"wrapItemTextChange",onBlur:"onBlur"},features:[W.Jv_([Ce.zF,Ce.jS,ge,Ce.fH,Ce.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(ze,$e){},encapsulation:2})}return Te})(),xe=(()=>{class Te{static \u0275fac=function(ze){return new(ze||Te)};static \u0275mod=W.$C({type:Te});static \u0275inj=W.G2t({imports:[ye.df_,ye.YLo,ye.YaD,ye.eNx,ye.Bkf,ye.nwt,ye.hXw,ye.YGc,ye.gf0,ye.rvW,ye.Tob,ye.$Ql,ye.i9t,ye.TBD,ye.isg,ye.POb,Ce.p_,Ce.xZ,ye.df_,ye.YLo,ye.YaD,ye.eNx,ye.Bkf,ye.nwt,ye.hXw,ye.YGc,ye.gf0,ye.rvW,ye.Tob,ye.$Ql,ye.i9t,ye.TBD,ye.isg,ye.POb,Ce.xZ]})}return Te})()},3070:(In,Ze,M)=>{"use strict";M.d(Ze,{I:()=>S,b:()=>f});var W=M(7788),o=M(6314),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get adaptivityEnabled(){return this._getOption("adaptivityEnabled")}set adaptivityEnabled(d){this._setOption("adaptivityEnabled",d)}get animation(){return this._getOption("animation")}set animation(d){this._setOption("animation",d)}get cssClass(){return this._getOption("cssClass")}set cssClass(d){this._setOption("cssClass",d)}get dataSource(){return this._getOption("dataSource")}set dataSource(d){this._setOption("dataSource",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get disabledExpr(){return this._getOption("disabledExpr")}set disabledExpr(d){this._setOption("disabledExpr",d)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(d){this._setOption("displayExpr",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hideSubmenuOnMouseLeave(){return this._getOption("hideSubmenuOnMouseLeave")}set hideSubmenuOnMouseLeave(d){this._setOption("hideSubmenuOnMouseLeave",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get itemsExpr(){return this._getOption("itemsExpr")}set itemsExpr(d){this._setOption("itemsExpr",d)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(d){this._setOption("itemTemplate",d)}get orientation(){return this._getOption("orientation")}set orientation(d){this._setOption("orientation",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get selectByClick(){return this._getOption("selectByClick")}set selectByClick(d){this._setOption("selectByClick",d)}get selectedExpr(){return this._getOption("selectedExpr")}set selectedExpr(d){this._setOption("selectedExpr",d)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(d){this._setOption("selectedItem",d)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(d){this._setOption("selectionMode",d)}get showFirstSubmenuMode(){return this._getOption("showFirstSubmenuMode")}set showFirstSubmenuMode(d){this._setOption("showFirstSubmenuMode",d)}get showSubmenuMode(){return this._getOption("showSubmenuMode")}set showSubmenuMode(d){this._setOption("showSubmenuMode",d)}get submenuDirection(){return this._getOption("submenuDirection")}set submenuDirection(d){this._setOption("submenuDirection",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onContentReady;onDisposing;onInitialized;onItemClick;onItemContextMenu;onItemRendered;onOptionChanged;onSelectionChanged;onSubmenuHidden;onSubmenuHiding;onSubmenuShowing;onSubmenuShown;accessKeyChange;activeStateEnabledChange;adaptivityEnabledChange;animationChange;cssClassChange;dataSourceChange;disabledChange;disabledExprChange;displayExprChange;elementAttrChange;focusStateEnabledChange;heightChange;hideSubmenuOnMouseLeaveChange;hintChange;hoverStateEnabledChange;itemsChange;itemsExprChange;itemTemplateChange;orientationChange;rtlEnabledChange;selectByClickChange;selectedExprChange;selectedItemChange;selectionModeChange;showFirstSubmenuModeChange;showSubmenuModeChange;submenuDirectionChange;tabIndexChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"submenuHidden",emit:"onSubmenuHidden"},{subscribe:"submenuHiding",emit:"onSubmenuHiding"},{subscribe:"submenuShowing",emit:"onSubmenuShowing"},{subscribe:"submenuShown",emit:"onSubmenuShown"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"adaptivityEnabledChange"},{emit:"animationChange"},{emit:"cssClassChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"disabledExprChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hideSubmenuOnMouseLeaveChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemsChange"},{emit:"itemsExprChange"},{emit:"itemTemplateChange"},{emit:"orientationChange"},{emit:"rtlEnabledChange"},{emit:"selectByClickChange"},{emit:"selectedExprChange"},{emit:"selectedItemChange"},{emit:"selectionModeChange"},{emit:"showFirstSubmenuModeChange"},{emit:"showSubmenuModeChange"},{emit:"submenuDirectionChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("dataSource",d),this.setupChanges("items",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-menu"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",adaptivityEnabled:"adaptivityEnabled",animation:"animation",cssClass:"cssClass",dataSource:"dataSource",disabled:"disabled",disabledExpr:"disabledExpr",displayExpr:"displayExpr",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hideSubmenuOnMouseLeave:"hideSubmenuOnMouseLeave",hint:"hint",hoverStateEnabled:"hoverStateEnabled",items:"items",itemsExpr:"itemsExpr",itemTemplate:"itemTemplate",orientation:"orientation",rtlEnabled:"rtlEnabled",selectByClick:"selectByClick",selectedExpr:"selectedExpr",selectedItem:"selectedItem",selectionMode:"selectionMode",showFirstSubmenuMode:"showFirstSubmenuMode",showSubmenuMode:"showSubmenuMode",submenuDirection:"submenuDirection",tabIndex:"tabIndex",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemRendered:"onItemRendered",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",onSubmenuHidden:"onSubmenuHidden",onSubmenuHiding:"onSubmenuHiding",onSubmenuShowing:"onSubmenuShowing",onSubmenuShown:"onSubmenuShown",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",adaptivityEnabledChange:"adaptivityEnabledChange",animationChange:"animationChange",cssClassChange:"cssClassChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",disabledExprChange:"disabledExprChange",displayExprChange:"displayExprChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hideSubmenuOnMouseLeaveChange:"hideSubmenuOnMouseLeaveChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",itemsChange:"itemsChange",itemsExprChange:"itemsExprChange",itemTemplateChange:"itemTemplateChange",orientationChange:"orientationChange",rtlEnabledChange:"rtlEnabledChange",selectByClickChange:"selectByClickChange",selectedExprChange:"selectedExprChange",selectedItemChange:"selectedItemChange",selectionModeChange:"selectionModeChange",showFirstSubmenuModeChange:"showFirstSubmenuModeChange",showSubmenuModeChange:"showSubmenuModeChange",submenuDirectionChange:"submenuDirectionChange",tabIndexChange:"tabIndexChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.YLo,b.YaD,b.eNx,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b.Tob,b.$Ql,b.POb,b.dFh,b.pGU,b.vwi,P.p_,P.xZ,b.YLo,b.YaD,b.eNx,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b.Tob,b.$Ql,b.POb,b.dFh,b.pGU,b.vwi,P.xZ]})}return T})()},8914:(In,Ze,M)=>{"use strict";M.d(Ze,{$3K:()=>fn,$Ql:()=>sp,$T:()=>TC,$VD:()=>yC,$Xk:()=>Pr,$Yy:()=>js,$jZ:()=>zf,$lK:()=>Be,A1g:()=>xe,A4G:()=>Oc,A_:()=>Dh,AaL:()=>er,Af1:()=>ti,B6P:()=>C,B80:()=>uv,B9H:()=>xC,BM2:()=>ah,BR_:()=>Ma,Bfr:()=>qe,Bkf:()=>Hg,BrI:()=>ri,CBY:()=>ie,CGH:()=>op,CQq:()=>iv,CVf:()=>Xe,CWj:()=>Yi,Dgy:()=>Fe,DjQ:()=>Gf,DlA:()=>w,Dll:()=>Nr,Dvy:()=>Io,E9w:()=>kp,EED:()=>Od,EaX:()=>Js,Ek1:()=>Pi,F1M:()=>mr,F2g:()=>Oo,FOK:()=>Ji,FXg:()=>od,Fhh:()=>Va,Fii:()=>Eo,GCl:()=>Ln,GIV:()=>Tn,GKz:()=>Mg,GLd:()=>fv,GQ:()=>Zp,GYs:()=>St,GzL:()=>Um,H8D:()=>Si,H8O:()=>ld,HCS:()=>K,HKo:()=>Se,Hh_:()=>Et,Hk4:()=>Kp,Hl$:()=>$f,I1b:()=>Vf,IWb:()=>vo,Inh:()=>$e,Ist:()=>q,Ixj:()=>Bn,JjR:()=>Qi,K0w:()=>an,KNc:()=>Mn,Kkw:()=>Es,L0X:()=>Ni,Lcs:()=>fc,M5G:()=>wt,MBy:()=>ms,MXF:()=>Wt,Mj3:()=>$m,Mru:()=>su,MtA:()=>Mr,MwW:()=>Pn,N32:()=>ut,N3e:()=>lt,N7r:()=>Ga,NWO:()=>ou,Naz:()=>vC,NhN:()=>k,OWJ:()=>Ut,OZC:()=>Eh,Oap:()=>rr,OeI:()=>Ho,OlT:()=>eu,POb:()=>tt,PRc:()=>Nf,PTP:()=>ya,PVd:()=>Yl,PXE:()=>ue,Pcp:()=>Ye,Pk1:()=>Oh,Pxf:()=>Hl,QWP:()=>pt,Qx:()=>zl,REv:()=>mo,RKC:()=>cn,ROy:()=>c,RZI:()=>Xr,S2P:()=>ad,SB8:()=>jt,Sn2:()=>Go,Sy5:()=>cl,T0t:()=>Hs,TBD:()=>qa,Tob:()=>ns,TsZ:()=>Zg,Tv$:()=>Bo,U5N:()=>wd,U9o:()=>ts,ULL:()=>CC,VG3:()=>Ht,VTr:()=>Nu,VWK:()=>ql,VY_:()=>nu,Vku:()=>Il,W6p:()=>Nc,WC8:()=>Wc,WG2:()=>a,WNh:()=>up,WXx:()=>Yg,WYf:()=>Gi,Who:()=>rd,Wnt:()=>lc,X19:()=>ln,X1G:()=>eo,X6g:()=>OC,XUe:()=>Jr,XWi:()=>hr,XjV:()=>Vr,YC7:()=>po,YGc:()=>Ei,YLo:()=>g,YPq:()=>Fg,YTS:()=>Ru,YaD:()=>qr,Yh3:()=>rc,YkV:()=>Xg,Ypp:()=>es,YyV:()=>Vd,ZRW:()=>Ce,ZSJ:()=>Qp,ZaD:()=>Gp,Zac:()=>Z_,ZlI:()=>ap,ZnA:()=>ee,ZqW:()=>Ec,_RO:()=>Ur,_ZY:()=>mn,_cl:()=>ei,_gx:()=>Mu,_ql:()=>ba,_sw:()=>Fd,_zS:()=>ov,a6E:()=>Nd,aJg:()=>wr,aUY:()=>Z,aqX:()=>oa,ath:()=>Gr,b$1:()=>et,bSv:()=>Wg,cCU:()=>xi,cug:()=>cc,dFh:()=>oh,dSF:()=>qd,df_:()=>sr,eA9:()=>Al,eNx:()=>Cn,eeS:()=>_l,f8z:()=>gn,fnp:()=>Vs,gVd:()=>Zo,gb2:()=>jp,gf0:()=>cd,gmz:()=>dd,hAh:()=>ip,hJ:()=>zm,hLh:()=>Nn,hU2:()=>Td,hUd:()=>ud,hVU:()=>Or,hXY:()=>Gg,hXw:()=>Ee,hyP:()=>Xo,hzo:()=>sh,i9t:()=>zo,iDF:()=>jc,iMv:()=>ge,iVO:()=>ss,iiR:()=>tp,ikq:()=>ft,isg:()=>Co,jTB:()=>vr,jiL:()=>Ci,joz:()=>kt,k4A:()=>ia,k5A:()=>Ki,k61:()=>zt,kY_:()=>Xl,kYc:()=>Lu,kaJ:()=>L,kxR:()=>lv,l4W:()=>Ya,lPC:()=>ep,lWu:()=>ai,lX9:()=>Ds,lkr:()=>Nm,m1r:()=>Bm,m56:()=>gc,mGe:()=>Np,mQ_:()=>co,mjx:()=>Bd,nE5:()=>kg,nj_:()=>Di,nrj:()=>en,nu6:()=>Ul,nwt:()=>oe,nz1:()=>S,o4I:()=>It,oCB:()=>Xi,okf:()=>Wy,pGU:()=>bn,qCh:()=>J_,r2Z:()=>Qa,rER:()=>tv,rj$:()=>Zt,rkl:()=>ki,rvW:()=>km,s5o:()=>tu,sAn:()=>us,sVF:()=>el,sVQ:()=>th,saD:()=>Km,t7Z:()=>Th,tML:()=>Ti,tOy:()=>yi,tWd:()=>so,tXi:()=>bi,tl:()=>Wi,tq_:()=>tg,u4t:()=>eh,uE7:()=>Ao,uIe:()=>os,ur_:()=>Tt,uvP:()=>y,v5y:()=>Gm,vLQ:()=>Vc,vQM:()=>Hp,vsH:()=>Ff,vwi:()=>rp,w0m:()=>Wp,w8p:()=>Us,wnp:()=>Gx,x$q:()=>dp,xJR:()=>Sr,xOT:()=>on,x_w:()=>An,y$D:()=>ve,y1E:()=>Dd,y7y:()=>pe,yA4:()=>go,zd$:()=>Un,zkV:()=>kn});var W=M(7788),o=M(3349),P=M(6610);const b=["*"];let S=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),y=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),c=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),a=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),g=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),w=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),C=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),L=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),k=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),K=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ie=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),q=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Z=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),pe=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),oe=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ee=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ue=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ve=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ce=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ge=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),xe=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ee=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ze=(()=>{class De extends o.l9{get disabled(){return this._getOption("disabled")}set disabled(H){this._setOption("disabled",H)}get html(){return this._getOption("html")}set html(H){this._setOption("html",H)}get icon(){return this._getOption("icon")}set icon(H){this._setOption("icon",H)}get template(){return this._getOption("template")}set template(H){this._setOption("template",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get title(){return this._getOption("title")}set title(H){this._setOption("title",H)}get titleTemplate(){return this._getOption("titleTemplate")}set titleTemplate(H){this._setOption("titleTemplate",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get onClick(){return this._getOption("onClick")}set onClick(H){this._setOption("onClick",H)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(H){this._setOption("stylingMode",H)}get type(){return this._getOption("type")}set type(H){this._setOption("type",H)}get baseSize(){return this._getOption("baseSize")}set baseSize(H){this._setOption("baseSize",H)}get box(){return this._getOption("box")}set box(H){this._setOption("box",H)}get ratio(){return this._getOption("ratio")}set ratio(H){this._setOption("ratio",H)}get shrink(){return this._getOption("shrink")}set shrink(H){this._setOption("shrink",H)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(H){this._setOption("elementAttr",H)}get hint(){return this._getOption("hint")}set hint(H){this._setOption("hint",H)}get beginGroup(){return this._getOption("beginGroup")}set beginGroup(H){this._setOption("beginGroup",H)}get closeMenuOnClick(){return this._getOption("closeMenuOnClick")}set closeMenuOnClick(H){this._setOption("closeMenuOnClick",H)}get items(){return this._getOption("items")}set items(H){this._setOption("items",H)}get selectable(){return this._getOption("selectable")}set selectable(H){this._setOption("selectable",H)}get selected(){return this._getOption("selected")}set selected(H){this._setOption("selected",H)}get colSpan(){return this._getOption("colSpan")}set colSpan(H){this._setOption("colSpan",H)}get cssClass(){return this._getOption("cssClass")}set cssClass(H){this._setOption("cssClass",H)}get dataField(){return this._getOption("dataField")}set dataField(H){this._setOption("dataField",H)}get editorOptions(){return this._getOption("editorOptions")}set editorOptions(H){this._setOption("editorOptions",H)}get editorType(){return this._getOption("editorType")}set editorType(H){this._setOption("editorType",H)}get helpText(){return this._getOption("helpText")}set helpText(H){this._setOption("helpText",H)}get isRequired(){return this._getOption("isRequired")}set isRequired(H){this._setOption("isRequired",H)}get itemType(){return this._getOption("itemType")}set itemType(H){this._setOption("itemType",H)}get label(){return this._getOption("label")}set label(H){this._setOption("label",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}get validationRules(){return this._getOption("validationRules")}set validationRules(H){this._setOption("validationRules",H)}get visibleIndex(){return this._getOption("visibleIndex")}set visibleIndex(H){this._setOption("visibleIndex",H)}get alignItemLabels(){return this._getOption("alignItemLabels")}set alignItemLabels(H){this._setOption("alignItemLabels",H)}get caption(){return this._getOption("caption")}set caption(H){this._setOption("caption",H)}get captionTemplate(){return this._getOption("captionTemplate")}set captionTemplate(H){this._setOption("captionTemplate",H)}get colCount(){return this._getOption("colCount")}set colCount(H){this._setOption("colCount",H)}get colCountByScreen(){return this._getOption("colCountByScreen")}set colCountByScreen(H){this._setOption("colCountByScreen",H)}get tabPanelOptions(){return this._getOption("tabPanelOptions")}set tabPanelOptions(H){this._setOption("tabPanelOptions",H)}get tabs(){return this._getOption("tabs")}set tabs(H){this._setOption("tabs",H)}get badge(){return this._getOption("badge")}set badge(H){this._setOption("badge",H)}get tabTemplate(){return this._getOption("tabTemplate")}set tabTemplate(H){this._setOption("tabTemplate",H)}get buttonOptions(){return this._getOption("buttonOptions")}set buttonOptions(H){this._setOption("buttonOptions",H)}get horizontalAlignment(){return this._getOption("horizontalAlignment")}set horizontalAlignment(H){this._setOption("horizontalAlignment",H)}get verticalAlignment(){return this._getOption("verticalAlignment")}set verticalAlignment(H){this._setOption("verticalAlignment",H)}get locateInMenu(){return this._getOption("locateInMenu")}set locateInMenu(H){this._setOption("locateInMenu",H)}get location(){return this._getOption("location")}set location(H){this._setOption("location",H)}get menuItemTemplate(){return this._getOption("menuItemTemplate")}set menuItemTemplate(H){this._setOption("menuItemTemplate",H)}get options(){return this._getOption("options")}set options(H){this._setOption("options",H)}get showText(){return this._getOption("showText")}set showText(H){this._setOption("showText",H)}get widget(){return this._getOption("widget")}set widget(H){this._setOption("widget",H)}get height(){return this._getOption("height")}set height(H){this._setOption("height",H)}get width(){return this._getOption("width")}set width(H){this._setOption("width",H)}get imageAlt(){return this._getOption("imageAlt")}set imageAlt(H){this._setOption("imageAlt",H)}get imageSrc(){return this._getOption("imageSrc")}set imageSrc(H){this._setOption("imageSrc",H)}get acceptedValues(){return this._getOption("acceptedValues")}set acceptedValues(H){this._setOption("acceptedValues",H)}get formatName(){return this._getOption("formatName")}set formatName(H){this._setOption("formatName",H)}get formatValues(){return this._getOption("formatValues")}set formatValues(H){this._setOption("formatValues",H)}get key(){return this._getOption("key")}set key(H){this._setOption("key",H)}get showChevron(){return this._getOption("showChevron")}set showChevron(H){this._setOption("showChevron",H)}get linkAttr(){return this._getOption("linkAttr")}set linkAttr(H){this._setOption("linkAttr",H)}get url(){return this._getOption("url")}set url(H){this._setOption("url",H)}get collapsed(){return this._getOption("collapsed")}set collapsed(H){this._setOption("collapsed",H)}get collapsedSize(){return this._getOption("collapsedSize")}set collapsedSize(H){this._setOption("collapsedSize",H)}get collapsible(){return this._getOption("collapsible")}set collapsible(H){this._setOption("collapsible",H)}get maxSize(){return this._getOption("maxSize")}set maxSize(H){this._setOption("maxSize",H)}get minSize(){return this._getOption("minSize")}set minSize(H){this._setOption("minSize",H)}get resizable(){return this._getOption("resizable")}set resizable(H){this._setOption("resizable",H)}get size(){return this._getOption("size")}set size(H){this._setOption("size",H)}get splitter(){return this._getOption("splitter")}set splitter(H){this._setOption("splitter",H)}get heightRatio(){return this._getOption("heightRatio")}set heightRatio(H){this._setOption("heightRatio",H)}get widthRatio(){return this._getOption("widthRatio")}set widthRatio(H){this._setOption("widthRatio",H)}get expanded(){return this._getOption("expanded")}set expanded(H){this._setOption("expanded",H)}get hasItems(){return this._getOption("hasItems")}set hasItems(H){this._setOption("hasItems",H)}get id(){return this._getOption("id")}set id(H){this._setOption("id",H)}get parentId(){return this._getOption("parentId")}set parentId(H){this._setOption("parentId",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),$e=(()=>{class De extends o.l9{get message(){return this._getOption("message")}set message(H){this._setOption("message",H)}get trim(){return this._getOption("trim")}set trim(H){this._setOption("trim",H)}get type(){return this._getOption("type")}set type(H){this._setOption("type",H)}get ignoreEmptyValue(){return this._getOption("ignoreEmptyValue")}set ignoreEmptyValue(H){this._setOption("ignoreEmptyValue",H)}get max(){return this._getOption("max")}set max(H){this._setOption("max",H)}get min(){return this._getOption("min")}set min(H){this._setOption("min",H)}get reevaluate(){return this._getOption("reevaluate")}set reevaluate(H){this._setOption("reevaluate",H)}get validationCallback(){return this._getOption("validationCallback")}set validationCallback(H){this._setOption("validationCallback",H)}get comparisonTarget(){return this._getOption("comparisonTarget")}set comparisonTarget(H){this._setOption("comparisonTarget",H)}get comparisonType(){return this._getOption("comparisonType")}set comparisonType(H){this._setOption("comparisonType",H)}get pattern(){return this._getOption("pattern")}set pattern(H){this._setOption("pattern",H)}get _optionPath(){return"validationRules"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-validation-rule"]],inputs:{message:"message",trim:"trim",type:"type",ignoreEmptyValue:"ignoreEmptyValue",max:"max",min:"min",reevaluate:"reevaluate",validationCallback:"validationCallback",comparisonTarget:"comparisonTarget",comparisonType:"comparisonType",pattern:"pattern"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Be=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ue=(()=>{class De extends o.l9{get alignItemLabels(){return this._getOption("alignItemLabels")}set alignItemLabels(H){this._setOption("alignItemLabels",H)}get badge(){return this._getOption("badge")}set badge(H){this._setOption("badge",H)}get colCount(){return this._getOption("colCount")}set colCount(H){this._setOption("colCount",H)}get colCountByScreen(){return this._getOption("colCountByScreen")}set colCountByScreen(H){this._setOption("colCountByScreen",H)}get disabled(){return this._getOption("disabled")}set disabled(H){this._setOption("disabled",H)}get icon(){return this._getOption("icon")}set icon(H){this._setOption("icon",H)}get items(){return this._getOption("items")}set items(H){this._setOption("items",H)}get tabTemplate(){return this._getOption("tabTemplate")}set tabTemplate(H){this._setOption("tabTemplate",H)}get template(){return this._getOption("template")}set template(H){this._setOption("template",H)}get title(){return this._getOption("title")}set title(H){this._setOption("title",H)}get commands(){return this._getOption("commands")}set commands(H){this._setOption("commands",H)}get groups(){return this._getOption("groups")}set groups(H){this._setOption("groups",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),ot=(()=>{class De extends o.l9{get icon(){return this._getOption("icon")}set icon(H){this._setOption("icon",H)}get items(){return this._getOption("items")}set items(H){this._setOption("items",H)}get location(){return this._getOption("location")}set location(H){this._setOption("location",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),st=(()=>{class De extends ot{get _optionPath(){return"commands"}get itemsChildren(){return this._getOption("items")}set itemsChildren(H){this.setChildren("items",H)}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-command"]],contentQueries:function(Ne,Vn,vs){if(1&Ne&&W.wni(vs,Xe,4),2&Ne){let Yr;W.mGM(Yr=W.lsd())&&(Vn.itemsChildren=Yr)}},inputs:{icon:"icon",items:"items",location:"location",name:"name",text:"text"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),et=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ke=(()=>{class De extends o.l9{get commands(){return this._getOption("commands")}set commands(H){this._setOption("commands",H)}get title(){return this._getOption("title")}set title(H){this._setOption("title",H)}get category(){return this._getOption("category")}set category(H){this._setOption("category",H)}get displayMode(){return this._getOption("displayMode")}set displayMode(H){this._setOption("displayMode",H)}get expanded(){return this._getOption("expanded")}set expanded(H){this._setOption("expanded",H)}get shapes(){return this._getOption("shapes")}set shapes(H){this._setOption("shapes",H)}get _optionPath(){return"groups"}get commandsChildren(){return this._getOption("commands")}set commandsChildren(H){this.setChildren("commands",H)}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-group"]],contentQueries:function(Ne,Vn,vs){if(1&Ne&&W.wni(vs,st,4),2&Ne){let Yr;W.mGM(Yr=W.lsd())&&(Vn.commandsChildren=Yr)}},inputs:{commands:"commands",title:"title",category:"category",displayMode:"displayMode",expanded:"expanded",shapes:"shapes"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Ye=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Pe=(()=>{class De extends Ue{renderer;document;element;get _optionPath(){return"tabs"}get itemsChildren(){return this._getOption("items")}set itemsChildren(H){this.setChildren("items",H)}get commandsChildren(){return this._getOption("commands")}set commandsChildren(H){this.setChildren("commands",H)}get groupsChildren(){return this._getOption("groups")}set groupsChildren(H){this.setChildren("groups",H)}constructor(H,Ne,Vn,vs,Yr,ng){super(),this.renderer=Vn,this.document=vs,this.element=ng,H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this)),Yr.setHost(this)}setTemplate(H){this.template=H}ngAfterViewInit(){(0,o.ym)(this,this.element,this.renderer,this.document)}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1),W.rXU(W.sFG),W.rXU(P.qQ),W.rXU(o.zF,1),W.rXU(W.aKT))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-tab"]],contentQueries:function(Ne,Vn,vs){if(1&Ne&&(W.wni(vs,Xe,4),W.wni(vs,st,4),W.wni(vs,Ke,4)),2&Ne){let Yr;W.mGM(Yr=W.lsd())&&(Vn.itemsChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.commandsChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.groupsChildren=Yr)}},inputs:{alignItemLabels:"alignItemLabels",badge:"badge",colCount:"colCount",colCountByScreen:"colCountByScreen",disabled:"disabled",icon:"icon",items:"items",tabTemplate:"tabTemplate",template:"template",title:"title",commands:"commands",groups:"groups",name:"name"},features:[W.Jv_([o.fH,o.zF]),W.Vt3],ngContentSelectors:b,decls:1,vars:0,template:function(Ne,Vn){1&Ne&&(W.NAR(),W.SdG(0))},styles:["[_nghost-%COMP%]{display:block}"]})}return De})(),Se=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Re=(()=>{class De extends o.l9{get lat(){return this._getOption("lat")}set lat(H){this._setOption("lat",H)}get lng(){return this._getOption("lng")}set lng(H){this._setOption("lng",H)}get col(){return this._getOption("col")}set col(H){this._setOption("col",H)}get colspan(){return this._getOption("colspan")}set colspan(H){this._setOption("colspan",H)}get row(){return this._getOption("row")}set row(H){this._setOption("row",H)}get rowspan(){return this._getOption("rowspan")}set rowspan(H){this._setOption("rowspan",H)}get screen(){return this._getOption("screen")}set screen(H){this._setOption("screen",H)}get _optionPath(){return"location"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-location"]],inputs:{lat:"lat",lng:"lng",col:"col",colspan:"colspan",row:"row",rowspan:"rowspan",screen:"screen"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Fe=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Xe=(()=>{class De extends ze{renderer;document;element;get _optionPath(){return"items"}get itemsChildren(){return this._getOption("items")}set itemsChildren(H){this.setChildren("items",H)}get validationRulesChildren(){return this._getOption("validationRules")}set validationRulesChildren(H){this.setChildren("validationRules",H)}get tabsChildren(){return this._getOption("tabs")}set tabsChildren(H){this.setChildren("tabs",H)}get locationChildren(){return this._getOption("location")}set locationChildren(H){this.setChildren("location",H)}constructor(H,Ne,Vn,vs,Yr,ng){super(),this.renderer=Vn,this.document=vs,this.element=ng,H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this)),Yr.setHost(this)}setTemplate(H){this.template=H}ngAfterViewInit(){(0,o.ym)(this,this.element,this.renderer,this.document)}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1),W.rXU(W.sFG),W.rXU(P.qQ),W.rXU(o.zF,1),W.rXU(W.aKT))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-item"]],contentQueries:function(Ne,Vn,vs){if(1&Ne&&(W.wni(vs,De,4),W.wni(vs,$e,4),W.wni(vs,Pe,4),W.wni(vs,Re,4)),2&Ne){let Yr;W.mGM(Yr=W.lsd())&&(Vn.itemsChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.validationRulesChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.tabsChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.locationChildren=Yr)}},inputs:{disabled:"disabled",html:"html",icon:"icon",template:"template",text:"text",title:"title",titleTemplate:"titleTemplate",visible:"visible",onClick:"onClick",stylingMode:"stylingMode",type:"type",baseSize:"baseSize",box:"box",ratio:"ratio",shrink:"shrink",elementAttr:"elementAttr",hint:"hint",beginGroup:"beginGroup",closeMenuOnClick:"closeMenuOnClick",items:"items",selectable:"selectable",selected:"selected",colSpan:"colSpan",cssClass:"cssClass",dataField:"dataField",editorOptions:"editorOptions",editorType:"editorType",helpText:"helpText",isRequired:"isRequired",itemType:"itemType",label:"label",name:"name",validationRules:"validationRules",visibleIndex:"visibleIndex",alignItemLabels:"alignItemLabels",caption:"caption",captionTemplate:"captionTemplate",colCount:"colCount",colCountByScreen:"colCountByScreen",tabPanelOptions:"tabPanelOptions",tabs:"tabs",badge:"badge",tabTemplate:"tabTemplate",buttonOptions:"buttonOptions",horizontalAlignment:"horizontalAlignment",verticalAlignment:"verticalAlignment",locateInMenu:"locateInMenu",location:"location",menuItemTemplate:"menuItemTemplate",options:"options",showText:"showText",widget:"widget",height:"height",width:"width",imageAlt:"imageAlt",imageSrc:"imageSrc",acceptedValues:"acceptedValues",formatName:"formatName",formatValues:"formatValues",key:"key",showChevron:"showChevron",linkAttr:"linkAttr",url:"url",collapsed:"collapsed",collapsedSize:"collapsedSize",collapsible:"collapsible",maxSize:"maxSize",minSize:"minSize",resizable:"resizable",size:"size",splitter:"splitter",heightRatio:"heightRatio",widthRatio:"widthRatio",expanded:"expanded",hasItems:"hasItems",id:"id",parentId:"parentId"},features:[W.Jv_([o.fH,o.zF]),W.Vt3],ngContentSelectors:b,decls:1,vars:0,template:function(Ne,Vn){1&Ne&&(W.NAR(),W.SdG(0))},styles:["[_nghost-%COMP%]{display:block}"]})}return De})(),tt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),qe=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Tt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),wt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),En=(()=>{class De extends o.l9{get location(){return this._getOption("location")}set location(H){this._setOption("location",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}get options(){return this._getOption("options")}set options(H){this._setOption("options",H)}get cssClass(){return this._getOption("cssClass")}set cssClass(H){this._setOption("cssClass",H)}get disabled(){return this._getOption("disabled")}set disabled(H){this._setOption("disabled",H)}get hint(){return this._getOption("hint")}set hint(H){this._setOption("hint",H)}get icon(){return this._getOption("icon")}set icon(H){this._setOption("icon",H)}get onClick(){return this._getOption("onClick")}set onClick(H){this._setOption("onClick",H)}get template(){return this._getOption("template")}set template(H){this._setOption("template",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),ri=(()=>{class De extends En{get _optionPath(){return"buttons"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-button"]],inputs:{location:"location",name:"name",options:"options",cssClass:"cssClass",disabled:"disabled",hint:"hint",icon:"icon",onClick:"onClick",template:"template",text:"text",visible:"visible"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Tn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Bn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),pt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),cn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Et=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),hn=(()=>{class De extends o.l9{get data(){return this._getOption("data")}set data(H){this._setOption("data",H)}get insertAfterKey(){return this._getOption("insertAfterKey")}set insertAfterKey(H){this._setOption("insertAfterKey",H)}get insertBeforeKey(){return this._getOption("insertBeforeKey")}set insertBeforeKey(H){this._setOption("insertBeforeKey",H)}get key(){return this._getOption("key")}set key(H){this._setOption("key",H)}get type(){return this._getOption("type")}set type(H){this._setOption("type",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),$n=(()=>{class De extends hn{get _optionPath(){return"changes"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-change"]],inputs:{data:"data",insertAfterKey:"insertAfterKey",insertBeforeKey:"insertBeforeKey",key:"key",type:"type"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Ln=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),on=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),It=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),zt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Pn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ei=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),mo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),vr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),en=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Zn=(()=>{class De extends o.l9{get alignment(){return this._getOption("alignment")}set alignment(H){this._setOption("alignment",H)}get allowEditing(){return this._getOption("allowEditing")}set allowEditing(H){this._setOption("allowEditing",H)}get allowExporting(){return this._getOption("allowExporting")}set allowExporting(H){this._setOption("allowExporting",H)}get allowFiltering(){return this._getOption("allowFiltering")}set allowFiltering(H){this._setOption("allowFiltering",H)}get allowFixing(){return this._getOption("allowFixing")}set allowFixing(H){this._setOption("allowFixing",H)}get allowGrouping(){return this._getOption("allowGrouping")}set allowGrouping(H){this._setOption("allowGrouping",H)}get allowHeaderFiltering(){return this._getOption("allowHeaderFiltering")}set allowHeaderFiltering(H){this._setOption("allowHeaderFiltering",H)}get allowHiding(){return this._getOption("allowHiding")}set allowHiding(H){this._setOption("allowHiding",H)}get allowReordering(){return this._getOption("allowReordering")}set allowReordering(H){this._setOption("allowReordering",H)}get allowResizing(){return this._getOption("allowResizing")}set allowResizing(H){this._setOption("allowResizing",H)}get allowSearch(){return this._getOption("allowSearch")}set allowSearch(H){this._setOption("allowSearch",H)}get allowSorting(){return this._getOption("allowSorting")}set allowSorting(H){this._setOption("allowSorting",H)}get autoExpandGroup(){return this._getOption("autoExpandGroup")}set autoExpandGroup(H){this._setOption("autoExpandGroup",H)}get buttons(){return this._getOption("buttons")}set buttons(H){this._setOption("buttons",H)}get calculateCellValue(){return this._getOption("calculateCellValue")}set calculateCellValue(H){this._setOption("calculateCellValue",H)}get calculateDisplayValue(){return this._getOption("calculateDisplayValue")}set calculateDisplayValue(H){this._setOption("calculateDisplayValue",H)}get calculateFilterExpression(){return this._getOption("calculateFilterExpression")}set calculateFilterExpression(H){this._setOption("calculateFilterExpression",H)}get calculateGroupValue(){return this._getOption("calculateGroupValue")}set calculateGroupValue(H){this._setOption("calculateGroupValue",H)}get calculateSortValue(){return this._getOption("calculateSortValue")}set calculateSortValue(H){this._setOption("calculateSortValue",H)}get caption(){return this._getOption("caption")}set caption(H){this._setOption("caption",H)}get cellTemplate(){return this._getOption("cellTemplate")}set cellTemplate(H){this._setOption("cellTemplate",H)}get columns(){return this._getOption("columns")}set columns(H){this._setOption("columns",H)}get cssClass(){return this._getOption("cssClass")}set cssClass(H){this._setOption("cssClass",H)}get customizeText(){return this._getOption("customizeText")}set customizeText(H){this._setOption("customizeText",H)}get dataField(){return this._getOption("dataField")}set dataField(H){this._setOption("dataField",H)}get dataType(){return this._getOption("dataType")}set dataType(H){this._setOption("dataType",H)}get editCellTemplate(){return this._getOption("editCellTemplate")}set editCellTemplate(H){this._setOption("editCellTemplate",H)}get editorOptions(){return this._getOption("editorOptions")}set editorOptions(H){this._setOption("editorOptions",H)}get encodeHtml(){return this._getOption("encodeHtml")}set encodeHtml(H){this._setOption("encodeHtml",H)}get falseText(){return this._getOption("falseText")}set falseText(H){this._setOption("falseText",H)}get filterOperations(){return this._getOption("filterOperations")}set filterOperations(H){this._setOption("filterOperations",H)}get filterType(){return this._getOption("filterType")}set filterType(H){this._setOption("filterType",H)}get filterValue(){return this._getOption("filterValue")}set filterValue(H){this._setOption("filterValue",H)}get filterValues(){return this._getOption("filterValues")}set filterValues(H){this._setOption("filterValues",H)}get fixed(){return this._getOption("fixed")}set fixed(H){this._setOption("fixed",H)}get fixedPosition(){return this._getOption("fixedPosition")}set fixedPosition(H){this._setOption("fixedPosition",H)}get format(){return this._getOption("format")}set format(H){this._setOption("format",H)}get formItem(){return this._getOption("formItem")}set formItem(H){this._setOption("formItem",H)}get groupCellTemplate(){return this._getOption("groupCellTemplate")}set groupCellTemplate(H){this._setOption("groupCellTemplate",H)}get groupIndex(){return this._getOption("groupIndex")}set groupIndex(H){this._setOption("groupIndex",H)}get headerCellTemplate(){return this._getOption("headerCellTemplate")}set headerCellTemplate(H){this._setOption("headerCellTemplate",H)}get headerFilter(){return this._getOption("headerFilter")}set headerFilter(H){this._setOption("headerFilter",H)}get hidingPriority(){return this._getOption("hidingPriority")}set hidingPriority(H){this._setOption("hidingPriority",H)}get isBand(){return this._getOption("isBand")}set isBand(H){this._setOption("isBand",H)}get lookup(){return this._getOption("lookup")}set lookup(H){this._setOption("lookup",H)}get minWidth(){return this._getOption("minWidth")}set minWidth(H){this._setOption("minWidth",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}get ownerBand(){return this._getOption("ownerBand")}set ownerBand(H){this._setOption("ownerBand",H)}get renderAsync(){return this._getOption("renderAsync")}set renderAsync(H){this._setOption("renderAsync",H)}get selectedFilterOperation(){return this._getOption("selectedFilterOperation")}set selectedFilterOperation(H){this._setOption("selectedFilterOperation",H)}get setCellValue(){return this._getOption("setCellValue")}set setCellValue(H){this._setOption("setCellValue",H)}get showEditorAlways(){return this._getOption("showEditorAlways")}set showEditorAlways(H){this._setOption("showEditorAlways",H)}get showInColumnChooser(){return this._getOption("showInColumnChooser")}set showInColumnChooser(H){this._setOption("showInColumnChooser",H)}get showWhenGrouped(){return this._getOption("showWhenGrouped")}set showWhenGrouped(H){this._setOption("showWhenGrouped",H)}get sortIndex(){return this._getOption("sortIndex")}set sortIndex(H){this._setOption("sortIndex",H)}get sortingMethod(){return this._getOption("sortingMethod")}set sortingMethod(H){this._setOption("sortingMethod",H)}get sortOrder(){return this._getOption("sortOrder")}set sortOrder(H){this._setOption("sortOrder",H)}get trueText(){return this._getOption("trueText")}set trueText(H){this._setOption("trueText",H)}get type(){return this._getOption("type")}set type(H){this._setOption("type",H)}get validationRules(){return this._getOption("validationRules")}set validationRules(H){this._setOption("validationRules",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get visibleIndex(){return this._getOption("visibleIndex")}set visibleIndex(H){this._setOption("visibleIndex",H)}get width(){return this._getOption("width")}set width(H){this._setOption("width",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Di=(()=>{class De extends Zn{filterValueChange;filterValuesChange;groupIndexChange;selectedFilterOperationChange;sortIndexChange;sortOrderChange;visibleChange;visibleIndexChange;get _optionPath(){return"columns"}get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(H){this.setChildren("buttons",H)}get columnsChildren(){return this._getOption("columns")}set columnsChildren(H){this.setChildren("columns",H)}get validationRulesChildren(){return this._getOption("validationRules")}set validationRulesChildren(H){this.setChildren("validationRules",H)}constructor(H,Ne){super(),this._createEventEmitters([{emit:"filterValueChange"},{emit:"filterValuesChange"},{emit:"groupIndexChange"},{emit:"selectedFilterOperationChange"},{emit:"sortIndexChange"},{emit:"sortOrderChange"},{emit:"visibleChange"},{emit:"visibleIndexChange"}]),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-column"]],contentQueries:function(Ne,Vn,vs){if(1&Ne&&(W.wni(vs,ri,4),W.wni(vs,De,4),W.wni(vs,$e,4)),2&Ne){let Yr;W.mGM(Yr=W.lsd())&&(Vn.buttonsChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.columnsChildren=Yr),W.mGM(Yr=W.lsd())&&(Vn.validationRulesChildren=Yr)}},inputs:{alignment:"alignment",allowEditing:"allowEditing",allowExporting:"allowExporting",allowFiltering:"allowFiltering",allowFixing:"allowFixing",allowGrouping:"allowGrouping",allowHeaderFiltering:"allowHeaderFiltering",allowHiding:"allowHiding",allowReordering:"allowReordering",allowResizing:"allowResizing",allowSearch:"allowSearch",allowSorting:"allowSorting",autoExpandGroup:"autoExpandGroup",buttons:"buttons",calculateCellValue:"calculateCellValue",calculateDisplayValue:"calculateDisplayValue",calculateFilterExpression:"calculateFilterExpression",calculateGroupValue:"calculateGroupValue",calculateSortValue:"calculateSortValue",caption:"caption",cellTemplate:"cellTemplate",columns:"columns",cssClass:"cssClass",customizeText:"customizeText",dataField:"dataField",dataType:"dataType",editCellTemplate:"editCellTemplate",editorOptions:"editorOptions",encodeHtml:"encodeHtml",falseText:"falseText",filterOperations:"filterOperations",filterType:"filterType",filterValue:"filterValue",filterValues:"filterValues",fixed:"fixed",fixedPosition:"fixedPosition",format:"format",formItem:"formItem",groupCellTemplate:"groupCellTemplate",groupIndex:"groupIndex",headerCellTemplate:"headerCellTemplate",headerFilter:"headerFilter",hidingPriority:"hidingPriority",isBand:"isBand",lookup:"lookup",minWidth:"minWidth",name:"name",ownerBand:"ownerBand",renderAsync:"renderAsync",selectedFilterOperation:"selectedFilterOperation",setCellValue:"setCellValue",showEditorAlways:"showEditorAlways",showInColumnChooser:"showInColumnChooser",showWhenGrouped:"showWhenGrouped",sortIndex:"sortIndex",sortingMethod:"sortingMethod",sortOrder:"sortOrder",trueText:"trueText",type:"type",validationRules:"validationRules",visible:"visible",visibleIndex:"visibleIndex",width:"width"},outputs:{filterValueChange:"filterValueChange",filterValuesChange:"filterValuesChange",groupIndexChange:"groupIndexChange",selectedFilterOperationChange:"selectedFilterOperationChange",sortIndexChange:"sortIndexChange",sortOrderChange:"sortOrderChange",visibleChange:"visibleChange",visibleIndexChange:"visibleIndexChange"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),po=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Xo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),bi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Wi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Zo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),hr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),mn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ti=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Eo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Gr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ei=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),co=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),er=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Jr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Wr=(()=>{class De extends o.l9{get calculateFilterExpression(){return this._getOption("calculateFilterExpression")}set calculateFilterExpression(H){this._setOption("calculateFilterExpression",H)}get caption(){return this._getOption("caption")}set caption(H){this._setOption("caption",H)}get customizeText(){return this._getOption("customizeText")}set customizeText(H){this._setOption("customizeText",H)}get dataTypes(){return this._getOption("dataTypes")}set dataTypes(H){this._setOption("dataTypes",H)}get editorTemplate(){return this._getOption("editorTemplate")}set editorTemplate(H){this._setOption("editorTemplate",H)}get hasValue(){return this._getOption("hasValue")}set hasValue(H){this._setOption("hasValue",H)}get icon(){return this._getOption("icon")}set icon(H){this._setOption("icon",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Xr=(()=>{class De extends Wr{get _optionPath(){return"customOperations"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-custom-operation"]],inputs:{calculateFilterExpression:"calculateFilterExpression",caption:"caption",customizeText:"customizeText",dataTypes:"dataTypes",editorTemplate:"editorTemplate",hasValue:"hasValue",icon:"icon",name:"name"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Mr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),an=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Wt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),mi=(()=>{class De extends o.l9{get calculateFilterExpression(){return this._getOption("calculateFilterExpression")}set calculateFilterExpression(H){this._setOption("calculateFilterExpression",H)}get caption(){return this._getOption("caption")}set caption(H){this._setOption("caption",H)}get customizeText(){return this._getOption("customizeText")}set customizeText(H){this._setOption("customizeText",H)}get dataField(){return this._getOption("dataField")}set dataField(H){this._setOption("dataField",H)}get dataType(){return this._getOption("dataType")}set dataType(H){this._setOption("dataType",H)}get editorOptions(){return this._getOption("editorOptions")}set editorOptions(H){this._setOption("editorOptions",H)}get editorTemplate(){return this._getOption("editorTemplate")}set editorTemplate(H){this._setOption("editorTemplate",H)}get falseText(){return this._getOption("falseText")}set falseText(H){this._setOption("falseText",H)}get filterOperations(){return this._getOption("filterOperations")}set filterOperations(H){this._setOption("filterOperations",H)}get format(){return this._getOption("format")}set format(H){this._setOption("format",H)}get lookup(){return this._getOption("lookup")}set lookup(H){this._setOption("lookup",H)}get name(){return this._getOption("name")}set name(H){this._setOption("name",H)}get trueText(){return this._getOption("trueText")}set trueText(H){this._setOption("trueText",H)}get allowCrossGroupCalculation(){return this._getOption("allowCrossGroupCalculation")}set allowCrossGroupCalculation(H){this._setOption("allowCrossGroupCalculation",H)}get allowExpandAll(){return this._getOption("allowExpandAll")}set allowExpandAll(H){this._setOption("allowExpandAll",H)}get allowFiltering(){return this._getOption("allowFiltering")}set allowFiltering(H){this._setOption("allowFiltering",H)}get allowSorting(){return this._getOption("allowSorting")}set allowSorting(H){this._setOption("allowSorting",H)}get allowSortingBySummary(){return this._getOption("allowSortingBySummary")}set allowSortingBySummary(H){this._setOption("allowSortingBySummary",H)}get area(){return this._getOption("area")}set area(H){this._setOption("area",H)}get areaIndex(){return this._getOption("areaIndex")}set areaIndex(H){this._setOption("areaIndex",H)}get calculateCustomSummary(){return this._getOption("calculateCustomSummary")}set calculateCustomSummary(H){this._setOption("calculateCustomSummary",H)}get calculateSummaryValue(){return this._getOption("calculateSummaryValue")}set calculateSummaryValue(H){this._setOption("calculateSummaryValue",H)}get displayFolder(){return this._getOption("displayFolder")}set displayFolder(H){this._setOption("displayFolder",H)}get expanded(){return this._getOption("expanded")}set expanded(H){this._setOption("expanded",H)}get filterType(){return this._getOption("filterType")}set filterType(H){this._setOption("filterType",H)}get filterValues(){return this._getOption("filterValues")}set filterValues(H){this._setOption("filterValues",H)}get groupIndex(){return this._getOption("groupIndex")}set groupIndex(H){this._setOption("groupIndex",H)}get groupInterval(){return this._getOption("groupInterval")}set groupInterval(H){this._setOption("groupInterval",H)}get groupName(){return this._getOption("groupName")}set groupName(H){this._setOption("groupName",H)}get headerFilter(){return this._getOption("headerFilter")}set headerFilter(H){this._setOption("headerFilter",H)}get isMeasure(){return this._getOption("isMeasure")}set isMeasure(H){this._setOption("isMeasure",H)}get precision(){return this._getOption("precision")}set precision(H){this._setOption("precision",H)}get runningTotal(){return this._getOption("runningTotal")}set runningTotal(H){this._setOption("runningTotal",H)}get selector(){return this._getOption("selector")}set selector(H){this._setOption("selector",H)}get showGrandTotals(){return this._getOption("showGrandTotals")}set showGrandTotals(H){this._setOption("showGrandTotals",H)}get showTotals(){return this._getOption("showTotals")}set showTotals(H){this._setOption("showTotals",H)}get showValues(){return this._getOption("showValues")}set showValues(H){this._setOption("showValues",H)}get sortBy(){return this._getOption("sortBy")}set sortBy(H){this._setOption("sortBy",H)}get sortBySummaryField(){return this._getOption("sortBySummaryField")}set sortBySummaryField(H){this._setOption("sortBySummaryField",H)}get sortBySummaryPath(){return this._getOption("sortBySummaryPath")}set sortBySummaryPath(H){this._setOption("sortBySummaryPath",H)}get sortingMethod(){return this._getOption("sortingMethod")}set sortingMethod(H){this._setOption("sortingMethod",H)}get sortOrder(){return this._getOption("sortOrder")}set sortOrder(H){this._setOption("sortOrder",H)}get summaryDisplayMode(){return this._getOption("summaryDisplayMode")}set summaryDisplayMode(H){this._setOption("summaryDisplayMode",H)}get summaryType(){return this._getOption("summaryType")}set summaryType(H){this._setOption("summaryType",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get width(){return this._getOption("width")}set width(H){this._setOption("width",H)}get wordWrapEnabled(){return this._getOption("wordWrapEnabled")}set wordWrapEnabled(H){this._setOption("wordWrapEnabled",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Si=(()=>{class De extends mi{get _optionPath(){return"fields"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-field"]],inputs:{calculateFilterExpression:"calculateFilterExpression",caption:"caption",customizeText:"customizeText",dataField:"dataField",dataType:"dataType",editorOptions:"editorOptions",editorTemplate:"editorTemplate",falseText:"falseText",filterOperations:"filterOperations",format:"format",lookup:"lookup",name:"name",trueText:"trueText",allowCrossGroupCalculation:"allowCrossGroupCalculation",allowExpandAll:"allowExpandAll",allowFiltering:"allowFiltering",allowSorting:"allowSorting",allowSortingBySummary:"allowSortingBySummary",area:"area",areaIndex:"areaIndex",calculateCustomSummary:"calculateCustomSummary",calculateSummaryValue:"calculateSummaryValue",displayFolder:"displayFolder",expanded:"expanded",filterType:"filterType",filterValues:"filterValues",groupIndex:"groupIndex",groupInterval:"groupInterval",groupName:"groupName",headerFilter:"headerFilter",isMeasure:"isMeasure",precision:"precision",runningTotal:"runningTotal",selector:"selector",showGrandTotals:"showGrandTotals",showTotals:"showTotals",showValues:"showValues",sortBy:"sortBy",sortBySummaryField:"sortBySummaryField",sortBySummaryPath:"sortBySummaryPath",sortingMethod:"sortingMethod",sortOrder:"sortOrder",summaryDisplayMode:"summaryDisplayMode",summaryType:"summaryType",visible:"visible",width:"width",wordWrapEnabled:"wordWrapEnabled"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),go=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Sr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Vr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),bn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ci=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ki=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),gn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Mn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Qi=(()=>{class De extends o.l9{renderer;document;element;get cssClass(){return this._getOption("cssClass")}set cssClass(H){this._setOption("cssClass",H)}get disabled(){return this._getOption("disabled")}set disabled(H){this._setOption("disabled",H)}get html(){return this._getOption("html")}set html(H){this._setOption("html",H)}get locateInMenu(){return this._getOption("locateInMenu")}set locateInMenu(H){this._setOption("locateInMenu",H)}get location(){return this._getOption("location")}set location(H){this._setOption("location",H)}get menuItemTemplate(){return this._getOption("menuItemTemplate")}set menuItemTemplate(H){this._setOption("menuItemTemplate",H)}get options(){return this._getOption("options")}set options(H){this._setOption("options",H)}get showText(){return this._getOption("showText")}set showText(H){this._setOption("showText",H)}get template(){return this._getOption("template")}set template(H){this._setOption("template",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get toolbar(){return this._getOption("toolbar")}set toolbar(H){this._setOption("toolbar",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get widget(){return this._getOption("widget")}set widget(H){this._setOption("widget",H)}get _optionPath(){return"toolbarItems"}constructor(H,Ne,Vn,vs,Yr,ng){super(),this.renderer=Vn,this.document=vs,this.element=ng,H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this)),Yr.setHost(this)}setTemplate(H){this.template=H}ngAfterViewInit(){(0,o.ym)(this,this.element,this.renderer,this.document)}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1),W.rXU(W.sFG),W.rXU(P.qQ),W.rXU(o.zF,1),W.rXU(W.aKT))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-toolbar-item"]],inputs:{cssClass:"cssClass",disabled:"disabled",html:"html",locateInMenu:"locateInMenu",location:"location",menuItemTemplate:"menuItemTemplate",options:"options",showText:"showText",template:"template",text:"text",toolbar:"toolbar",visible:"visible",widget:"widget"},features:[W.Jv_([o.fH,o.zF]),W.Vt3],ngContentSelectors:b,decls:1,vars:0,template:function(Ne,Vn){1&Ne&&(W.NAR(),W.SdG(0))},styles:["[_nghost-%COMP%]{display:block}"]})}return De})(),Co=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),sr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),rr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Pr=(()=>{class De extends o.t${get allowAdding(){return this._getOption("allowAdding")}set allowAdding(H){this._setOption("allowAdding",H)}get allowDeleting(){return this._getOption("allowDeleting")}set allowDeleting(H){this._setOption("allowDeleting",H)}get allowUpdating(){return this._getOption("allowUpdating")}set allowUpdating(H){this._setOption("allowUpdating",H)}get changes(){return this._getOption("changes")}set changes(H){this._setOption("changes",H)}get confirmDelete(){return this._getOption("confirmDelete")}set confirmDelete(H){this._setOption("confirmDelete",H)}get editColumnName(){return this._getOption("editColumnName")}set editColumnName(H){this._setOption("editColumnName",H)}get editRowKey(){return this._getOption("editRowKey")}set editRowKey(H){this._setOption("editRowKey",H)}get form(){return this._getOption("form")}set form(H){this._setOption("form",H)}get mode(){return this._getOption("mode")}set mode(H){this._setOption("mode",H)}get newRowPosition(){return this._getOption("newRowPosition")}set newRowPosition(H){this._setOption("newRowPosition",H)}get popup(){return this._getOption("popup")}set popup(H){this._setOption("popup",H)}get refreshMode(){return this._getOption("refreshMode")}set refreshMode(H){this._setOption("refreshMode",H)}get selectTextOnEditStart(){return this._getOption("selectTextOnEditStart")}set selectTextOnEditStart(H){this._setOption("selectTextOnEditStart",H)}get startEditAction(){return this._getOption("startEditAction")}set startEditAction(H){this._setOption("startEditAction",H)}get texts(){return this._getOption("texts")}set texts(H){this._setOption("texts",H)}get useIcons(){return this._getOption("useIcons")}set useIcons(H){this._setOption("useIcons",H)}get allowAddShape(){return this._getOption("allowAddShape")}set allowAddShape(H){this._setOption("allowAddShape",H)}get allowChangeConnection(){return this._getOption("allowChangeConnection")}set allowChangeConnection(H){this._setOption("allowChangeConnection",H)}get allowChangeConnectorPoints(){return this._getOption("allowChangeConnectorPoints")}set allowChangeConnectorPoints(H){this._setOption("allowChangeConnectorPoints",H)}get allowChangeConnectorText(){return this._getOption("allowChangeConnectorText")}set allowChangeConnectorText(H){this._setOption("allowChangeConnectorText",H)}get allowChangeShapeText(){return this._getOption("allowChangeShapeText")}set allowChangeShapeText(H){this._setOption("allowChangeShapeText",H)}get allowDeleteConnector(){return this._getOption("allowDeleteConnector")}set allowDeleteConnector(H){this._setOption("allowDeleteConnector",H)}get allowDeleteShape(){return this._getOption("allowDeleteShape")}set allowDeleteShape(H){this._setOption("allowDeleteShape",H)}get allowMoveShape(){return this._getOption("allowMoveShape")}set allowMoveShape(H){this._setOption("allowMoveShape",H)}get allowResizeShape(){return this._getOption("allowResizeShape")}set allowResizeShape(H){this._setOption("allowResizeShape",H)}get allowDependencyAdding(){return this._getOption("allowDependencyAdding")}set allowDependencyAdding(H){this._setOption("allowDependencyAdding",H)}get allowDependencyDeleting(){return this._getOption("allowDependencyDeleting")}set allowDependencyDeleting(H){this._setOption("allowDependencyDeleting",H)}get allowResourceAdding(){return this._getOption("allowResourceAdding")}set allowResourceAdding(H){this._setOption("allowResourceAdding",H)}get allowResourceDeleting(){return this._getOption("allowResourceDeleting")}set allowResourceDeleting(H){this._setOption("allowResourceDeleting",H)}get allowResourceUpdating(){return this._getOption("allowResourceUpdating")}set allowResourceUpdating(H){this._setOption("allowResourceUpdating",H)}get allowTaskAdding(){return this._getOption("allowTaskAdding")}set allowTaskAdding(H){this._setOption("allowTaskAdding",H)}get allowTaskDeleting(){return this._getOption("allowTaskDeleting")}set allowTaskDeleting(H){this._setOption("allowTaskDeleting",H)}get allowTaskResourceUpdating(){return this._getOption("allowTaskResourceUpdating")}set allowTaskResourceUpdating(H){this._setOption("allowTaskResourceUpdating",H)}get allowTaskUpdating(){return this._getOption("allowTaskUpdating")}set allowTaskUpdating(H){this._setOption("allowTaskUpdating",H)}get enabled(){return this._getOption("enabled")}set enabled(H){this._setOption("enabled",H)}get allowDragging(){return this._getOption("allowDragging")}set allowDragging(H){this._setOption("allowDragging",H)}get allowResizing(){return this._getOption("allowResizing")}set allowResizing(H){this._setOption("allowResizing",H)}get allowTimeZoneEditing(){return this._getOption("allowTimeZoneEditing")}set allowTimeZoneEditing(H){this._setOption("allowTimeZoneEditing",H)}changesChange;editColumnNameChange;editRowKeyChange;get _optionPath(){return"editing"}get changesChildren(){return this._getOption("changes")}set changesChildren(H){this.setChildren("changes",H)}constructor(H,Ne){super(),this._createEventEmitters([{emit:"changesChange"},{emit:"editColumnNameChange"},{emit:"editRowKeyChange"}]),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-editing"]],contentQueries:function(Ne,Vn,vs){if(1&Ne&&W.wni(vs,$n,4),2&Ne){let Yr;W.mGM(Yr=W.lsd())&&(Vn.changesChildren=Yr)}},inputs:{allowAdding:"allowAdding",allowDeleting:"allowDeleting",allowUpdating:"allowUpdating",changes:"changes",confirmDelete:"confirmDelete",editColumnName:"editColumnName",editRowKey:"editRowKey",form:"form",mode:"mode",newRowPosition:"newRowPosition",popup:"popup",refreshMode:"refreshMode",selectTextOnEditStart:"selectTextOnEditStart",startEditAction:"startEditAction",texts:"texts",useIcons:"useIcons",allowAddShape:"allowAddShape",allowChangeConnection:"allowChangeConnection",allowChangeConnectorPoints:"allowChangeConnectorPoints",allowChangeConnectorText:"allowChangeConnectorText",allowChangeShapeText:"allowChangeShapeText",allowDeleteConnector:"allowDeleteConnector",allowDeleteShape:"allowDeleteShape",allowMoveShape:"allowMoveShape",allowResizeShape:"allowResizeShape",allowDependencyAdding:"allowDependencyAdding",allowDependencyDeleting:"allowDependencyDeleting",allowResourceAdding:"allowResourceAdding",allowResourceDeleting:"allowResourceDeleting",allowResourceUpdating:"allowResourceUpdating",allowTaskAdding:"allowTaskAdding",allowTaskDeleting:"allowTaskDeleting",allowTaskResourceUpdating:"allowTaskResourceUpdating",allowTaskUpdating:"allowTaskUpdating",enabled:"enabled",allowDragging:"allowDragging",allowResizing:"allowResizing",allowTimeZoneEditing:"allowTimeZoneEditing"},outputs:{changesChange:"changesChange",editColumnNameChange:"editColumnNameChange",editRowKeyChange:"editRowKeyChange"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),wr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),os=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),js=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),es=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ga=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ut=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),kn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ni=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Xi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Go=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ms=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Qa=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ma=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),cl=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Hl=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Cn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ht=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),yi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),us=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ya=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ft=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),jt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Nn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),xi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Yi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),so=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ji=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ln=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),kt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ti=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),eo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Oo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),zo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),qr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Io=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),St=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ai=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ia=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ep=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Mu=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),tp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),qd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),kp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Un=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),An=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ki=(()=>{class De extends o.t${get connectorColor(){return this._getOption("connectorColor")}set connectorColor(H){this._setOption("connectorColor",H)}get connectorWidth(){return this._getOption("connectorWidth")}set connectorWidth(H){this._setOption("connectorWidth",H)}get customizeText(){return this._getOption("customizeText")}set customizeText(H){this._setOption("customizeText",H)}get font(){return this._getOption("font")}set font(H){this._setOption("font",H)}get format(){return this._getOption("format")}set format(H){this._setOption("format",H)}get indent(){return this._getOption("indent")}set indent(H){this._setOption("indent",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get horizontalAlignment(){return this._getOption("horizontalAlignment")}set horizontalAlignment(H){this._setOption("horizontalAlignment",H)}get position(){return this._getOption("position")}set position(H){this._setOption("position",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get verticalAlignment(){return this._getOption("verticalAlignment")}set verticalAlignment(H){this._setOption("verticalAlignment",H)}get alignment(){return this._getOption("alignment")}set alignment(H){this._setOption("alignment",H)}get customizeHint(){return this._getOption("customizeHint")}set customizeHint(H){this._setOption("customizeHint",H)}get displayMode(){return this._getOption("displayMode")}set displayMode(H){this._setOption("displayMode",H)}get indentFromAxis(){return this._getOption("indentFromAxis")}set indentFromAxis(H){this._setOption("indentFromAxis",H)}get overlappingBehavior(){return this._getOption("overlappingBehavior")}set overlappingBehavior(H){this._setOption("overlappingBehavior",H)}get rotationAngle(){return this._getOption("rotationAngle")}set rotationAngle(H){this._setOption("rotationAngle",H)}get staggeringSpacing(){return this._getOption("staggeringSpacing")}set staggeringSpacing(H){this._setOption("staggeringSpacing",H)}get template(){return this._getOption("template")}set template(H){this._setOption("template",H)}get textOverflow(){return this._getOption("textOverflow")}set textOverflow(H){this._setOption("textOverflow",H)}get wordWrap(){return this._getOption("wordWrap")}set wordWrap(H){this._setOption("wordWrap",H)}get argumentFormat(){return this._getOption("argumentFormat")}set argumentFormat(H){this._setOption("argumentFormat",H)}get backgroundColor(){return this._getOption("backgroundColor")}set backgroundColor(H){this._setOption("backgroundColor",H)}get border(){return this._getOption("border")}set border(H){this._setOption("border",H)}get connector(){return this._getOption("connector")}set connector(H){this._setOption("connector",H)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(H){this._setOption("displayFormat",H)}get horizontalOffset(){return this._getOption("horizontalOffset")}set horizontalOffset(H){this._setOption("horizontalOffset",H)}get showForZeroValues(){return this._getOption("showForZeroValues")}set showForZeroValues(H){this._setOption("showForZeroValues",H)}get verticalOffset(){return this._getOption("verticalOffset")}set verticalOffset(H){this._setOption("verticalOffset",H)}get hideFirstOrLast(){return this._getOption("hideFirstOrLast")}set hideFirstOrLast(H){this._setOption("hideFirstOrLast",H)}get indentFromTick(){return this._getOption("indentFromTick")}set indentFromTick(H){this._setOption("indentFromTick",H)}get useRangeColors(){return this._getOption("useRangeColors")}set useRangeColors(H){this._setOption("useRangeColors",H)}get location(){return this._getOption("location")}set location(H){this._setOption("location",H)}get showColon(){return this._getOption("showColon")}set showColon(H){this._setOption("showColon",H)}get radialOffset(){return this._getOption("radialOffset")}set radialOffset(H){this._setOption("radialOffset",H)}get topIndent(){return this._getOption("topIndent")}set topIndent(H){this._setOption("topIndent",H)}get shadow(){return this._getOption("shadow")}set shadow(H){this._setOption("shadow",H)}get useNodeColors(){return this._getOption("useNodeColors")}set useNodeColors(H){this._setOption("useNodeColors",H)}get dataField(){return this._getOption("dataField")}set dataField(H){this._setOption("dataField",H)}get enabled(){return this._getOption("enabled")}set enabled(H){this._setOption("enabled",H)}get _optionPath(){return"label"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-label"]],inputs:{connectorColor:"connectorColor",connectorWidth:"connectorWidth",customizeText:"customizeText",font:"font",format:"format",indent:"indent",visible:"visible",horizontalAlignment:"horizontalAlignment",position:"position",text:"text",verticalAlignment:"verticalAlignment",alignment:"alignment",customizeHint:"customizeHint",displayMode:"displayMode",indentFromAxis:"indentFromAxis",overlappingBehavior:"overlappingBehavior",rotationAngle:"rotationAngle",staggeringSpacing:"staggeringSpacing",template:"template",textOverflow:"textOverflow",wordWrap:"wordWrap",argumentFormat:"argumentFormat",backgroundColor:"backgroundColor",border:"border",connector:"connector",displayFormat:"displayFormat",horizontalOffset:"horizontalOffset",showForZeroValues:"showForZeroValues",verticalOffset:"verticalOffset",hideFirstOrLast:"hideFirstOrLast",indentFromTick:"indentFromTick",useRangeColors:"useRangeColors",location:"location",showColon:"showColon",radialOffset:"radialOffset",topIndent:"topIndent",shadow:"shadow",useNodeColors:"useNodeColors",dataField:"dataField",enabled:"enabled"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Ao=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Nr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Vs=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),mr=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),oa=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),eu=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),tu=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),od=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Nc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Eh=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),rc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),rd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Mg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Z_=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Nf=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),pc=(()=>{class De extends o.t${get allowedTargets(){return this._getOption("allowedTargets")}set allowedTargets(H){this._setOption("allowedTargets",H)}get enabled(){return this._getOption("enabled")}set enabled(H){this._setOption("enabled",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Np=(()=>{class De extends pc{get _optionPath(){return"mediaResizing"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-media-resizing"]],inputs:{allowedTargets:"allowedTargets",enabled:"enabled"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),ip=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),sd=(()=>{class De extends o.l9{get dataSource(){return this._getOption("dataSource")}set dataSource(H){this._setOption("dataSource",H)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(H){this._setOption("displayExpr",H)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(H){this._setOption("itemTemplate",H)}get marker(){return this._getOption("marker")}set marker(H){this._setOption("marker",H)}get minSearchLength(){return this._getOption("minSearchLength")}set minSearchLength(H){this._setOption("minSearchLength",H)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(H){this._setOption("searchExpr",H)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(H){this._setOption("searchTimeout",H)}get template(){return this._getOption("template")}set template(H){this._setOption("template",H)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(H){this._setOption("valueExpr",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),nu=(()=>{class De extends sd{get _optionPath(){return"mentions"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-mention"]],inputs:{dataSource:"dataSource",displayExpr:"displayExpr",itemTemplate:"itemTemplate",marker:"marker",minSearchLength:"minSearchLength",searchExpr:"searchExpr",searchTimeout:"searchTimeout",template:"template",valueExpr:"valueExpr"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),gc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Hs=(()=>{class De extends o.l9{get action(){return this._getOption("action")}set action(H){this._setOption("action",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get _optionPath(){return"menuItems"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-menu-item"]],inputs:{action:"action",text:"text"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),ad=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Oh=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Hp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ld=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),kg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Od=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),cd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Xl=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ff=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),dd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),km=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),J_=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),eh=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Fg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),th=(()=>{class De extends o.t${get allowedPageSizes(){return this._getOption("allowedPageSizes")}set allowedPageSizes(H){this._setOption("allowedPageSizes",H)}get displayMode(){return this._getOption("displayMode")}set displayMode(H){this._setOption("displayMode",H)}get infoText(){return this._getOption("infoText")}set infoText(H){this._setOption("infoText",H)}get label(){return this._getOption("label")}set label(H){this._setOption("label",H)}get showInfo(){return this._getOption("showInfo")}set showInfo(H){this._setOption("showInfo",H)}get showNavigationButtons(){return this._getOption("showNavigationButtons")}set showNavigationButtons(H){this._setOption("showNavigationButtons",H)}get showPageSizeSelector(){return this._getOption("showPageSizeSelector")}set showPageSizeSelector(H){this._setOption("showPageSizeSelector",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get _optionPath(){return"pager"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-pager"]],inputs:{allowedPageSizes:"allowedPageSizes",displayMode:"displayMode",infoText:"infoText",label:"label",showInfo:"showInfo",showNavigationButtons:"showNavigationButtons",showPageSizeSelector:"showPageSizeSelector",visible:"visible"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Gp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Yl=(()=>{class De extends o.t${get enabled(){return this._getOption("enabled")}set enabled(H){this._setOption("enabled",H)}get pageIndex(){return this._getOption("pageIndex")}set pageIndex(H){this._setOption("pageIndex",H)}get pageSize(){return this._getOption("pageSize")}set pageSize(H){this._setOption("pageSize",H)}pageIndexChange;pageSizeChange;get _optionPath(){return"paging"}constructor(H,Ne){super(),this._createEventEmitters([{emit:"pageIndexChange"},{emit:"pageSizeChange"}]),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-paging"]],inputs:{enabled:"enabled",pageIndex:"pageIndex",pageSize:"pageSize"},outputs:{pageIndexChange:"pageIndexChange",pageSizeChange:"pageSizeChange"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Bm=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Wp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Bd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),_l=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Nd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),sc=(()=>{class De extends o.t${get at(){return this._getOption("at")}set at(H){this._setOption("at",H)}get boundary(){return this._getOption("boundary")}set boundary(H){this._setOption("boundary",H)}get boundaryOffset(){return this._getOption("boundaryOffset")}set boundaryOffset(H){this._setOption("boundaryOffset",H)}get collision(){return this._getOption("collision")}set collision(H){this._setOption("collision",H)}get my(){return this._getOption("my")}set my(H){this._setOption("my",H)}get of(){return this._getOption("of")}set of(H){this._setOption("of",H)}get offset(){return this._getOption("offset")}set offset(H){this._setOption("offset",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Vf=(()=>{class De extends sc{get _optionPath(){return"position"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-position"]],inputs:{at:"at",boundary:"boundary",boundaryOffset:"boundaryOffset",collision:"collision",my:"my",of:"of",offset:"offset"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Hg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),lt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ut=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),fn=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Pi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),vo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Es=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Va=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),lc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),wd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),jp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Kp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),vC=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),tv=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),CC=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),yC=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),iv=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ru=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),op=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),bC=(()=>{class De extends o.t${get columnRenderingMode(){return this._getOption("columnRenderingMode")}set columnRenderingMode(H){this._setOption("columnRenderingMode",H)}get mode(){return this._getOption("mode")}set mode(H){this._setOption("mode",H)}get preloadEnabled(){return this._getOption("preloadEnabled")}set preloadEnabled(H){this._setOption("preloadEnabled",H)}get renderAsync(){return this._getOption("renderAsync")}set renderAsync(H){this._setOption("renderAsync",H)}get rowRenderingMode(){return this._getOption("rowRenderingMode")}set rowRenderingMode(H){this._setOption("rowRenderingMode",H)}get scrollByContent(){return this._getOption("scrollByContent")}set scrollByContent(H){this._setOption("scrollByContent",H)}get scrollByThumb(){return this._getOption("scrollByThumb")}set scrollByThumb(H){this._setOption("scrollByThumb",H)}get showScrollbar(){return this._getOption("showScrollbar")}set showScrollbar(H){this._setOption("showScrollbar",H)}get useNative(){return this._getOption("useNative")}set useNative(H){this._setOption("useNative",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Al=(()=>{class De extends bC{get _optionPath(){return"scrolling"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-scrolling"]],inputs:{columnRenderingMode:"columnRenderingMode",mode:"mode",preloadEnabled:"preloadEnabled",renderAsync:"renderAsync",rowRenderingMode:"rowRenderingMode",scrollByContent:"scrollByContent",scrollByThumb:"scrollByThumb",showScrollbar:"showScrollbar",useNative:"useNative"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Nm=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),xC=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Gg=(()=>{class De extends o.t${get highlightCaseSensitive(){return this._getOption("highlightCaseSensitive")}set highlightCaseSensitive(H){this._setOption("highlightCaseSensitive",H)}get highlightSearchText(){return this._getOption("highlightSearchText")}set highlightSearchText(H){this._setOption("highlightSearchText",H)}get placeholder(){return this._getOption("placeholder")}set placeholder(H){this._setOption("placeholder",H)}get searchVisibleColumnsOnly(){return this._getOption("searchVisibleColumnsOnly")}set searchVisibleColumnsOnly(H){this._setOption("searchVisibleColumnsOnly",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get visible(){return this._getOption("visible")}set visible(H){this._setOption("visible",H)}get width(){return this._getOption("width")}set width(H){this._setOption("width",H)}textChange;get _optionPath(){return"searchPanel"}constructor(H,Ne){super(),this._createEventEmitters([{emit:"textChange"}]),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-search-panel"]],inputs:{highlightCaseSensitive:"highlightCaseSensitive",highlightSearchText:"highlightSearchText",placeholder:"placeholder",searchVisibleColumnsOnly:"searchVisibleColumnsOnly",text:"text",visible:"visible",width:"width"},outputs:{textChange:"textChange"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Wc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ov=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),zf=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),vl=(()=>{class De extends o.t${get allowSelectAll(){return this._getOption("allowSelectAll")}set allowSelectAll(H){this._setOption("allowSelectAll",H)}get recursive(){return this._getOption("recursive")}set recursive(H){this._setOption("recursive",H)}get selectByClick(){return this._getOption("selectByClick")}set selectByClick(H){this._setOption("selectByClick",H)}get deferred(){return this._getOption("deferred")}set deferred(H){this._setOption("deferred",H)}get mode(){return this._getOption("mode")}set mode(H){this._setOption("mode",H)}get selectAllMode(){return this._getOption("selectAllMode")}set selectAllMode(H){this._setOption("selectAllMode",H)}get showCheckBoxesMode(){return this._getOption("showCheckBoxesMode")}set showCheckBoxesMode(H){this._setOption("showCheckBoxesMode",H)}static \u0275fac=(()=>{let H;return function(Vn){return(H||(H=W.xGo(De)))(Vn||De)}})();static \u0275cmp=W.VBU({type:De,selectors:[["ng-component"]],features:[W.Vt3],decls:0,vars:0,template:function(Ne,Vn){},encapsulation:2})}return De})(),Or=(()=>{class De extends vl{get _optionPath(){return"selection"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-selection"]],inputs:{allowSelectAll:"allowSelectAll",recursive:"recursive",selectByClick:"selectByClick",deferred:"deferred",mode:"mode",selectAllMode:"selectAllMode",showCheckBoxesMode:"showCheckBoxesMode"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),ts=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Td=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),cc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),qa=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),oh=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),rp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),sp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ap=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),sh=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Gf=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ou=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ss=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),dp=(()=>{class De extends o.l9{get groupColumn(){return this._getOption("groupColumn")}set groupColumn(H){this._setOption("groupColumn",H)}get sortOrder(){return this._getOption("sortOrder")}set sortOrder(H){this._setOption("sortOrder",H)}get summaryItem(){return this._getOption("summaryItem")}set summaryItem(H){this._setOption("summaryItem",H)}get _optionPath(){return"sortByGroupSummaryInfo"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxi-sort-by-group-summary-info"]],inputs:{groupColumn:"groupColumn",sortOrder:"sortOrder",summaryItem:"summaryItem"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Zp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Lu=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Wg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ul=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Dd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ah=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Um=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),lv=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Qp=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),up=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),zm=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),OC=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Gm=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Wy=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),$m=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Th=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Gx=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),uv=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Xg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Km=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),$f=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Yg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ud=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),fv=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Zt=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Gi=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Bo=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ur=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Us=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ds=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Js=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),el=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ns=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ya=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ql=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),zl=(()=>{class De extends o.t${get arrowLength(){return this._getOption("arrowLength")}set arrowLength(H){this._setOption("arrowLength",H)}get border(){return this._getOption("border")}set border(H){this._setOption("border",H)}get color(){return this._getOption("color")}set color(H){this._setOption("color",H)}get container(){return this._getOption("container")}set container(H){this._setOption("container",H)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(H){this._setOption("contentTemplate",H)}get cornerRadius(){return this._getOption("cornerRadius")}set cornerRadius(H){this._setOption("cornerRadius",H)}get customizeTooltip(){return this._getOption("customizeTooltip")}set customizeTooltip(H){this._setOption("customizeTooltip",H)}get enabled(){return this._getOption("enabled")}set enabled(H){this._setOption("enabled",H)}get font(){return this._getOption("font")}set font(H){this._setOption("font",H)}get format(){return this._getOption("format")}set format(H){this._setOption("format",H)}get interactive(){return this._getOption("interactive")}set interactive(H){this._setOption("interactive",H)}get opacity(){return this._getOption("opacity")}set opacity(H){this._setOption("opacity",H)}get paddingLeftRight(){return this._getOption("paddingLeftRight")}set paddingLeftRight(H){this._setOption("paddingLeftRight",H)}get paddingTopBottom(){return this._getOption("paddingTopBottom")}set paddingTopBottom(H){this._setOption("paddingTopBottom",H)}get shadow(){return this._getOption("shadow")}set shadow(H){this._setOption("shadow",H)}get zIndex(){return this._getOption("zIndex")}set zIndex(H){this._setOption("zIndex",H)}get argumentFormat(){return this._getOption("argumentFormat")}set argumentFormat(H){this._setOption("argumentFormat",H)}get location(){return this._getOption("location")}set location(H){this._setOption("location",H)}get shared(){return this._getOption("shared")}set shared(H){this._setOption("shared",H)}get isShown(){return this._getOption("isShown")}set isShown(H){this._setOption("isShown",H)}get text(){return this._getOption("text")}set text(H){this._setOption("text",H)}get position(){return this._getOption("position")}set position(H){this._setOption("position",H)}get showMode(){return this._getOption("showMode")}set showMode(H){this._setOption("showMode",H)}get customizeLinkTooltip(){return this._getOption("customizeLinkTooltip")}set customizeLinkTooltip(H){this._setOption("customizeLinkTooltip",H)}get customizeNodeTooltip(){return this._getOption("customizeNodeTooltip")}set customizeNodeTooltip(H){this._setOption("customizeNodeTooltip",H)}get linkTooltipTemplate(){return this._getOption("linkTooltipTemplate")}set linkTooltipTemplate(H){this._setOption("linkTooltipTemplate",H)}get nodeTooltipTemplate(){return this._getOption("nodeTooltipTemplate")}set nodeTooltipTemplate(H){this._setOption("nodeTooltipTemplate",H)}get _optionPath(){return"tooltip"}constructor(H,Ne){super(),H.setNestedOption(this),Ne.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(Ne){return new(Ne||De)(W.rXU(o.fH,5),W.rXU(o.fH,1))};static \u0275cmp=W.VBU({type:De,selectors:[["dxo-tooltip"]],inputs:{arrowLength:"arrowLength",border:"border",color:"color",container:"container",contentTemplate:"contentTemplate",cornerRadius:"cornerRadius",customizeTooltip:"customizeTooltip",enabled:"enabled",font:"font",format:"format",interactive:"interactive",opacity:"opacity",paddingLeftRight:"paddingLeftRight",paddingTopBottom:"paddingTopBottom",shadow:"shadow",zIndex:"zIndex",argumentFormat:"argumentFormat",location:"location",shared:"shared",isShown:"isShown",text:"text",position:"position",showMode:"showMode",customizeLinkTooltip:"customizeLinkTooltip",customizeNodeTooltip:"customizeNodeTooltip",linkTooltipTemplate:"linkTooltipTemplate",nodeTooltipTemplate:"nodeTooltipTemplate"},features:[W.Jv_([o.fH]),W.Vt3],decls:0,vars:0,template:function(Ne,Vn){}})}return De})(),Il=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),fc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Nu=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Vc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ho=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Dh=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),ba=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),su=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Fd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Zg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Vd=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Ec=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),Oc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),jc=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),TC=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})(),tg=(()=>{class De{static \u0275fac=function(Ne){return new(Ne||De)};static \u0275mod=W.$C({type:De});static \u0275inj=W.G2t({})}return De})()},827:(In,Ze,M)=>{"use strict";M.d(Ze,{i:()=>S,p:()=>T});var W=M(7788),o=M(5169),P=M(3349),b=M(8914);const f=["*"];let S=(()=>{class y extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(c){this._setOption("accessKey",c)}get animation(){return this._getOption("animation")}set animation(c){this._setOption("animation",c)}get closeOnOutsideClick(){return this._getOption("closeOnOutsideClick")}set closeOnOutsideClick(c){this._setOption("closeOnOutsideClick",c)}get container(){return this._getOption("container")}set container(c){this._setOption("container",c)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(c){this._setOption("contentTemplate",c)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(c){this._setOption("deferRendering",c)}get disabled(){return this._getOption("disabled")}set disabled(c){this._setOption("disabled",c)}get dragAndResizeArea(){return this._getOption("dragAndResizeArea")}set dragAndResizeArea(c){this._setOption("dragAndResizeArea",c)}get dragEnabled(){return this._getOption("dragEnabled")}set dragEnabled(c){this._setOption("dragEnabled",c)}get dragOutsideBoundary(){return this._getOption("dragOutsideBoundary")}set dragOutsideBoundary(c){this._setOption("dragOutsideBoundary",c)}get enableBodyScroll(){return this._getOption("enableBodyScroll")}set enableBodyScroll(c){this._setOption("enableBodyScroll",c)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(c){this._setOption("focusStateEnabled",c)}get fullScreen(){return this._getOption("fullScreen")}set fullScreen(c){this._setOption("fullScreen",c)}get height(){return this._getOption("height")}set height(c){this._setOption("height",c)}get hideOnOutsideClick(){return this._getOption("hideOnOutsideClick")}set hideOnOutsideClick(c){this._setOption("hideOnOutsideClick",c)}get hideOnParentScroll(){return this._getOption("hideOnParentScroll")}set hideOnParentScroll(c){this._setOption("hideOnParentScroll",c)}get hint(){return this._getOption("hint")}set hint(c){this._setOption("hint",c)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(c){this._setOption("hoverStateEnabled",c)}get maxHeight(){return this._getOption("maxHeight")}set maxHeight(c){this._setOption("maxHeight",c)}get maxWidth(){return this._getOption("maxWidth")}set maxWidth(c){this._setOption("maxWidth",c)}get minHeight(){return this._getOption("minHeight")}set minHeight(c){this._setOption("minHeight",c)}get minWidth(){return this._getOption("minWidth")}set minWidth(c){this._setOption("minWidth",c)}get position(){return this._getOption("position")}set position(c){this._setOption("position",c)}get resizeEnabled(){return this._getOption("resizeEnabled")}set resizeEnabled(c){this._setOption("resizeEnabled",c)}get restorePosition(){return this._getOption("restorePosition")}set restorePosition(c){this._setOption("restorePosition",c)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(c){this._setOption("rtlEnabled",c)}get shading(){return this._getOption("shading")}set shading(c){this._setOption("shading",c)}get shadingColor(){return this._getOption("shadingColor")}set shadingColor(c){this._setOption("shadingColor",c)}get showCloseButton(){return this._getOption("showCloseButton")}set showCloseButton(c){this._setOption("showCloseButton",c)}get showTitle(){return this._getOption("showTitle")}set showTitle(c){this._setOption("showTitle",c)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(c){this._setOption("tabIndex",c)}get title(){return this._getOption("title")}set title(c){this._setOption("title",c)}get titleTemplate(){return this._getOption("titleTemplate")}set titleTemplate(c){this._setOption("titleTemplate",c)}get toolbarItems(){return this._getOption("toolbarItems")}set toolbarItems(c){this._setOption("toolbarItems",c)}get visible(){return this._getOption("visible")}set visible(c){this._setOption("visible",c)}get width(){return this._getOption("width")}set width(c){this._setOption("width",c)}get wrapperAttr(){return this._getOption("wrapperAttr")}set wrapperAttr(c){this._setOption("wrapperAttr",c)}onContentReady;onDisposing;onHidden;onHiding;onInitialized;onOptionChanged;onResize;onResizeEnd;onResizeStart;onShowing;onShown;onTitleRendered;accessKeyChange;animationChange;closeOnOutsideClickChange;containerChange;contentTemplateChange;deferRenderingChange;disabledChange;dragAndResizeAreaChange;dragEnabledChange;dragOutsideBoundaryChange;enableBodyScrollChange;focusStateEnabledChange;fullScreenChange;heightChange;hideOnOutsideClickChange;hideOnParentScrollChange;hintChange;hoverStateEnabledChange;maxHeightChange;maxWidthChange;minHeightChange;minWidthChange;positionChange;resizeEnabledChange;restorePositionChange;rtlEnabledChange;shadingChange;shadingColorChange;showCloseButtonChange;showTitleChange;tabIndexChange;titleChange;titleTemplateChange;toolbarItemsChange;visibleChange;widthChange;wrapperAttrChange;get toolbarItemsChildren(){return this._getOption("toolbarItems")}set toolbarItemsChildren(c){this.setChildren("toolbarItems",c)}constructor(c,s,a,u,h,g,_,x){super(c,s,a,u,_,x),this._watcherHelper=u,this._idh=h,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"hidden",emit:"onHidden"},{subscribe:"hiding",emit:"onHiding"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"resize",emit:"onResize"},{subscribe:"resizeEnd",emit:"onResizeEnd"},{subscribe:"resizeStart",emit:"onResizeStart"},{subscribe:"showing",emit:"onShowing"},{subscribe:"shown",emit:"onShown"},{subscribe:"titleRendered",emit:"onTitleRendered"},{emit:"accessKeyChange"},{emit:"animationChange"},{emit:"closeOnOutsideClickChange"},{emit:"containerChange"},{emit:"contentTemplateChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"dragAndResizeAreaChange"},{emit:"dragEnabledChange"},{emit:"dragOutsideBoundaryChange"},{emit:"enableBodyScrollChange"},{emit:"focusStateEnabledChange"},{emit:"fullScreenChange"},{emit:"heightChange"},{emit:"hideOnOutsideClickChange"},{emit:"hideOnParentScrollChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"maxHeightChange"},{emit:"maxWidthChange"},{emit:"minHeightChange"},{emit:"minWidthChange"},{emit:"positionChange"},{emit:"resizeEnabledChange"},{emit:"restorePositionChange"},{emit:"rtlEnabledChange"},{emit:"shadingChange"},{emit:"shadingColorChange"},{emit:"showCloseButtonChange"},{emit:"showTitleChange"},{emit:"tabIndexChange"},{emit:"titleChange"},{emit:"titleTemplateChange"},{emit:"toolbarItemsChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapperAttrChange"}]),this._idh.setHost(this),g.setHost(this)}_createInstance(c,s){return new o.A(c,s)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(c){super.ngOnChanges(c),this.setupChanges("toolbarItems",c)}setupChanges(c,s){c in this._optionsToUpdate||this._idh.setup(c,s)}ngDoCheck(){this._idh.doCheck("toolbarItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(c,s){let a=this._idh.setupSingle(c,s),u=null!==this._idh.getChanges(c,s);(a||u)&&super._setOption(c,s)}static \u0275fac=function(s){return new(s||y)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:y,selectors:[["dx-popup"]],contentQueries:function(s,a,u){if(1&s&&W.wni(u,b.JjR,4),2&s){let h;W.mGM(h=W.lsd())&&(a.toolbarItemsChildren=h)}},inputs:{accessKey:"accessKey",animation:"animation",closeOnOutsideClick:"closeOnOutsideClick",container:"container",contentTemplate:"contentTemplate",deferRendering:"deferRendering",disabled:"disabled",dragAndResizeArea:"dragAndResizeArea",dragEnabled:"dragEnabled",dragOutsideBoundary:"dragOutsideBoundary",enableBodyScroll:"enableBodyScroll",focusStateEnabled:"focusStateEnabled",fullScreen:"fullScreen",height:"height",hideOnOutsideClick:"hideOnOutsideClick",hideOnParentScroll:"hideOnParentScroll",hint:"hint",hoverStateEnabled:"hoverStateEnabled",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",position:"position",resizeEnabled:"resizeEnabled",restorePosition:"restorePosition",rtlEnabled:"rtlEnabled",shading:"shading",shadingColor:"shadingColor",showCloseButton:"showCloseButton",showTitle:"showTitle",tabIndex:"tabIndex",title:"title",titleTemplate:"titleTemplate",toolbarItems:"toolbarItems",visible:"visible",width:"width",wrapperAttr:"wrapperAttr"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onHidden:"onHidden",onHiding:"onHiding",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onResize:"onResize",onResizeEnd:"onResizeEnd",onResizeStart:"onResizeStart",onShowing:"onShowing",onShown:"onShown",onTitleRendered:"onTitleRendered",accessKeyChange:"accessKeyChange",animationChange:"animationChange",closeOnOutsideClickChange:"closeOnOutsideClickChange",containerChange:"containerChange",contentTemplateChange:"contentTemplateChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",dragAndResizeAreaChange:"dragAndResizeAreaChange",dragEnabledChange:"dragEnabledChange",dragOutsideBoundaryChange:"dragOutsideBoundaryChange",enableBodyScrollChange:"enableBodyScrollChange",focusStateEnabledChange:"focusStateEnabledChange",fullScreenChange:"fullScreenChange",heightChange:"heightChange",hideOnOutsideClickChange:"hideOnOutsideClickChange",hideOnParentScrollChange:"hideOnParentScrollChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",maxHeightChange:"maxHeightChange",maxWidthChange:"maxWidthChange",minHeightChange:"minHeightChange",minWidthChange:"minWidthChange",positionChange:"positionChange",resizeEnabledChange:"resizeEnabledChange",restorePositionChange:"restorePositionChange",rtlEnabledChange:"rtlEnabledChange",shadingChange:"shadingChange",shadingColorChange:"shadingColorChange",showCloseButtonChange:"showCloseButtonChange",showTitleChange:"showTitleChange",tabIndexChange:"tabIndexChange",titleChange:"titleChange",titleTemplateChange:"titleTemplateChange",toolbarItemsChange:"toolbarItemsChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapperAttrChange:"wrapperAttrChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],ngContentSelectors:f,decls:1,vars:0,template:function(s,a){1&s&&(W.NAR(),W.SdG(0))},encapsulation:2})}return y})(),T=(()=>{class y{static \u0275fac=function(s){return new(s||y)};static \u0275mod=W.$C({type:y});static \u0275inj=W.G2t({imports:[b.YLo,b.YaD,b.eNx,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b.Tob,b.$Ql,b.isg,P.p_,P.xZ,b.YLo,b.YaD,b.eNx,b.Bkf,b.nwt,b.hXw,b.YGc,b.gf0,b.rvW,b.Tob,b.$Ql,b.isg,P.xZ]})}return y})()},1106:(In,Ze,M)=>{"use strict";M.d(Ze,{s:()=>T,z:()=>y});var W=M(7788),o=M(1751),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get dataSource(){return this._getOption("dataSource")}set dataSource(s){this._setOption("dataSource",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(s){this._setOption("displayExpr",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get items(){return this._getOption("items")}set items(s){this._setOption("items",s)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(s){this._setOption("itemTemplate",s)}get layout(){return this._getOption("layout")}set layout(s){this._setOption("layout",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(s){this._setOption("valueExpr",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;dataSourceChange;disabledChange;displayExprChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;itemsChange;itemTemplateChange;layoutChange;nameChange;readOnlyChange;rtlEnabledChange;tabIndexChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueExprChange;visibleChange;widthChange;onBlur;change(s){}touched=s=>{};get itemsChildren(){return this._getOption("items")}set itemsChildren(s){this.setChildren("items",s)}constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"layoutChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("dataSource",s),this.setupChanges("items",s),this.setupChanges("validationErrors",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-radio-group"]],contentQueries:function(a,u,h){if(1&a&&W.wni(h,f.CVf,4),2&a){let g;W.mGM(g=W.lsd())&&(u.itemsChildren=g)}},hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",dataSource:"dataSource",disabled:"disabled",displayExpr:"displayExpr",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",items:"items",itemTemplate:"itemTemplate",layout:"layout",name:"name",readOnly:"readOnly",rtlEnabled:"rtlEnabled",tabIndex:"tabIndex",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueExpr:"valueExpr",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",layoutChange:"layoutChange",nameChange:"nameChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",tabIndexChange:"tabIndexChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.POb,b.p_,b.xZ,f.POb,b.xZ]})}return d})()},7866:(In,Ze,M)=>{"use strict";M.d(Ze,{e:()=>f,t:()=>S});var W=M(7788),o=M(9994),P=M(3349);const b=["*"];let f=(()=>{class T extends P.ic{instance=null;get bounceEnabled(){return this._getOption("bounceEnabled")}set bounceEnabled(d){this._setOption("bounceEnabled",d)}get direction(){return this._getOption("direction")}set direction(d){this._setOption("direction",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get pulledDownText(){return this._getOption("pulledDownText")}set pulledDownText(d){this._setOption("pulledDownText",d)}get pullingDownText(){return this._getOption("pullingDownText")}set pullingDownText(d){this._setOption("pullingDownText",d)}get reachBottomText(){return this._getOption("reachBottomText")}set reachBottomText(d){this._setOption("reachBottomText",d)}get refreshingText(){return this._getOption("refreshingText")}set refreshingText(d){this._setOption("refreshingText",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get scrollByContent(){return this._getOption("scrollByContent")}set scrollByContent(d){this._setOption("scrollByContent",d)}get scrollByThumb(){return this._getOption("scrollByThumb")}set scrollByThumb(d){this._setOption("scrollByThumb",d)}get showScrollbar(){return this._getOption("showScrollbar")}set showScrollbar(d){this._setOption("showScrollbar",d)}get useNative(){return this._getOption("useNative")}set useNative(d){this._setOption("useNative",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onDisposing;onInitialized;onOptionChanged;onPullDown;onReachBottom;onScroll;onUpdated;bounceEnabledChange;directionChange;disabledChange;elementAttrChange;heightChange;pulledDownTextChange;pullingDownTextChange;reachBottomTextChange;refreshingTextChange;rtlEnabledChange;scrollByContentChange;scrollByThumbChange;showScrollbarChange;useNativeChange;widthChange;constructor(d,c,s,a,u,h,g){super(d,c,s,a,h,g),this._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"pullDown",emit:"onPullDown"},{subscribe:"reachBottom",emit:"onReachBottom"},{subscribe:"scroll",emit:"onScroll"},{subscribe:"updated",emit:"onUpdated"},{emit:"bounceEnabledChange"},{emit:"directionChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"pulledDownTextChange"},{emit:"pullingDownTextChange"},{emit:"reachBottomTextChange"},{emit:"refreshingTextChange"},{emit:"rtlEnabledChange"},{emit:"scrollByContentChange"},{emit:"scrollByThumbChange"},{emit:"showScrollbarChange"},{emit:"useNativeChange"},{emit:"widthChange"}]),u.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-scroll-view"]],inputs:{bounceEnabled:"bounceEnabled",direction:"direction",disabled:"disabled",elementAttr:"elementAttr",height:"height",pulledDownText:"pulledDownText",pullingDownText:"pullingDownText",reachBottomText:"reachBottomText",refreshingText:"refreshingText",rtlEnabled:"rtlEnabled",scrollByContent:"scrollByContent",scrollByThumb:"scrollByThumb",showScrollbar:"showScrollbar",useNative:"useNative",width:"width"},outputs:{onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onPullDown:"onPullDown",onReachBottom:"onReachBottom",onScroll:"onScroll",onUpdated:"onUpdated",bounceEnabledChange:"bounceEnabledChange",directionChange:"directionChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",heightChange:"heightChange",pulledDownTextChange:"pulledDownTextChange",pullingDownTextChange:"pullingDownTextChange",reachBottomTextChange:"reachBottomTextChange",refreshingTextChange:"refreshingTextChange",rtlEnabledChange:"rtlEnabledChange",scrollByContentChange:"scrollByContentChange",scrollByThumbChange:"scrollByThumbChange",showScrollbarChange:"showScrollbarChange",useNativeChange:"useNativeChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH]),W.Vt3],ngContentSelectors:b,decls:1,vars:0,template:function(c,s){1&c&&(W.NAR(),W.SdG(0))},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[P.p_,P.xZ,P.xZ]})}return T})()},5463:(In,Ze,M)=>{"use strict";M.d(Ze,{S:()=>y,l:()=>T});var W=M(7788),o=M(6520),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(s){this._setOption("acceptCustomValue",s)}get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get buttons(){return this._getOption("buttons")}set buttons(s){this._setOption("buttons",s)}get customItemCreateEvent(){return this._getOption("customItemCreateEvent")}set customItemCreateEvent(s){this._setOption("customItemCreateEvent",s)}get dataSource(){return this._getOption("dataSource")}set dataSource(s){this._setOption("dataSource",s)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(s){this._setOption("deferRendering",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(s){this._setOption("displayExpr",s)}get displayValue(){return this._getOption("displayValue")}set displayValue(s){this._setOption("displayValue",s)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(s){this._setOption("dropDownButtonTemplate",s)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(s){this._setOption("dropDownOptions",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get fieldTemplate(){return this._getOption("fieldTemplate")}set fieldTemplate(s){this._setOption("fieldTemplate",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get grouped(){return this._getOption("grouped")}set grouped(s){this._setOption("grouped",s)}get groupTemplate(){return this._getOption("groupTemplate")}set groupTemplate(s){this._setOption("groupTemplate",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(s){this._setOption("inputAttr",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get items(){return this._getOption("items")}set items(s){this._setOption("items",s)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(s){this._setOption("itemTemplate",s)}get label(){return this._getOption("label")}set label(s){this._setOption("label",s)}get labelMode(){return this._getOption("labelMode")}set labelMode(s){this._setOption("labelMode",s)}get maxLength(){return this._getOption("maxLength")}set maxLength(s){this._setOption("maxLength",s)}get minSearchLength(){return this._getOption("minSearchLength")}set minSearchLength(s){this._setOption("minSearchLength",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get noDataText(){return this._getOption("noDataText")}set noDataText(s){this._setOption("noDataText",s)}get opened(){return this._getOption("opened")}set opened(s){this._setOption("opened",s)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(s){this._setOption("openOnFieldClick",s)}get placeholder(){return this._getOption("placeholder")}set placeholder(s){this._setOption("placeholder",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get searchEnabled(){return this._getOption("searchEnabled")}set searchEnabled(s){this._setOption("searchEnabled",s)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(s){this._setOption("searchExpr",s)}get searchMode(){return this._getOption("searchMode")}set searchMode(s){this._setOption("searchMode",s)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(s){this._setOption("searchTimeout",s)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(s){this._setOption("selectedItem",s)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(s){this._setOption("showClearButton",s)}get showDataBeforeSearch(){return this._getOption("showDataBeforeSearch")}set showDataBeforeSearch(s){this._setOption("showDataBeforeSearch",s)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(s){this._setOption("showDropDownButton",s)}get showSelectionControls(){return this._getOption("showSelectionControls")}set showSelectionControls(s){this._setOption("showSelectionControls",s)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(s){this._setOption("spellcheck",s)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(s){this._setOption("stylingMode",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get text(){return this._getOption("text")}set text(s){this._setOption("text",s)}get useItemTextAsTitle(){return this._getOption("useItemTextAsTitle")}set useItemTextAsTitle(s){this._setOption("useItemTextAsTitle",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(s){this._setOption("valueChangeEvent",s)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(s){this._setOption("valueExpr",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}get wrapItemText(){return this._getOption("wrapItemText")}set wrapItemText(s){this._setOption("wrapItemText",s)}onChange;onClosed;onContentReady;onCopy;onCustomItemCreating;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onItemClick;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onSelectionChanged;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;buttonsChange;customItemCreateEventChange;dataSourceChange;deferRenderingChange;disabledChange;displayExprChange;displayValueChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;fieldTemplateChange;focusStateEnabledChange;groupedChange;groupTemplateChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;itemsChange;itemTemplateChange;labelChange;labelModeChange;maxLengthChange;minSearchLengthChange;nameChange;noDataTextChange;openedChange;openOnFieldClickChange;placeholderChange;readOnlyChange;rtlEnabledChange;searchEnabledChange;searchExprChange;searchModeChange;searchTimeoutChange;selectedItemChange;showClearButtonChange;showDataBeforeSearchChange;showDropDownButtonChange;showSelectionControlsChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;useItemTextAsTitleChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;valueExprChange;visibleChange;widthChange;wrapItemTextChange;onBlur;change(s){}touched=s=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(s){this.setChildren("buttons",s)}get itemsChildren(){return this._getOption("items")}set itemsChildren(s){this.setChildren("items",s)}constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"customItemCreating",emit:"onCustomItemCreating"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"customItemCreateEventChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"displayValueChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"fieldTemplateChange"},{emit:"focusStateEnabledChange"},{emit:"groupedChange"},{emit:"groupTemplateChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxLengthChange"},{emit:"minSearchLengthChange"},{emit:"nameChange"},{emit:"noDataTextChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"searchEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchTimeoutChange"},{emit:"selectedItemChange"},{emit:"showClearButtonChange"},{emit:"showDataBeforeSearchChange"},{emit:"showDropDownButtonChange"},{emit:"showSelectionControlsChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useItemTextAsTitleChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapItemTextChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("buttons",s),this.setupChanges("dataSource",s),this.setupChanges("items",s),this.setupChanges("searchExpr",s),this.setupChanges("validationErrors",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("searchExpr"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-select-box"]],contentQueries:function(a,u,h){if(1&a&&(W.wni(h,f.BrI,4),W.wni(h,f.CVf,4)),2&a){let g;W.mGM(g=W.lsd())&&(u.buttonsChildren=g),W.mGM(g=W.lsd())&&(u.itemsChildren=g)}},hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",customItemCreateEvent:"customItemCreateEvent",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayExpr:"displayExpr",displayValue:"displayValue",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",fieldTemplate:"fieldTemplate",focusStateEnabled:"focusStateEnabled",grouped:"grouped",groupTemplate:"groupTemplate",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",items:"items",itemTemplate:"itemTemplate",label:"label",labelMode:"labelMode",maxLength:"maxLength",minSearchLength:"minSearchLength",name:"name",noDataText:"noDataText",opened:"opened",openOnFieldClick:"openOnFieldClick",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",searchEnabled:"searchEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchTimeout:"searchTimeout",selectedItem:"selectedItem",showClearButton:"showClearButton",showDataBeforeSearch:"showDataBeforeSearch",showDropDownButton:"showDropDownButton",showSelectionControls:"showSelectionControls",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useItemTextAsTitle:"useItemTextAsTitle",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",valueExpr:"valueExpr",visible:"visible",width:"width",wrapItemText:"wrapItemText"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCopy:"onCopy",onCustomItemCreating:"onCustomItemCreating",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onItemClick:"onItemClick",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onSelectionChanged:"onSelectionChanged",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",customItemCreateEventChange:"customItemCreateEventChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",displayValueChange:"displayValueChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",fieldTemplateChange:"fieldTemplateChange",focusStateEnabledChange:"focusStateEnabledChange",groupedChange:"groupedChange",groupTemplateChange:"groupTemplateChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxLengthChange:"maxLengthChange",minSearchLengthChange:"minSearchLengthChange",nameChange:"nameChange",noDataTextChange:"noDataTextChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",searchEnabledChange:"searchEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchTimeoutChange:"searchTimeoutChange",selectedItemChange:"selectedItemChange",showClearButtonChange:"showClearButtonChange",showDataBeforeSearchChange:"showDataBeforeSearchChange",showDropDownButtonChange:"showDropDownButtonChange",showSelectionControlsChange:"showSelectionControlsChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useItemTextAsTitleChange:"useItemTextAsTitleChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapItemTextChange:"wrapItemTextChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.GIV,f.u4t,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,f.POb,b.p_,b.xZ,f.GIV,f.u4t,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,f.POb,b.xZ]})}return d})()},7052:(In,Ze,M)=>{"use strict";M.d(Ze,{L:()=>T,k:()=>y});var W=M(7788),o=M(3205),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get keyStep(){return this._getOption("keyStep")}set keyStep(s){this._setOption("keyStep",s)}get label(){return this._getOption("label")}set label(s){this._setOption("label",s)}get max(){return this._getOption("max")}set max(s){this._setOption("max",s)}get min(){return this._getOption("min")}set min(s){this._setOption("min",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get showRange(){return this._getOption("showRange")}set showRange(s){this._setOption("showRange",s)}get step(){return this._getOption("step")}set step(s){this._setOption("step",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get tooltip(){return this._getOption("tooltip")}set tooltip(s){this._setOption("tooltip",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get valueChangeMode(){return this._getOption("valueChangeMode")}set valueChangeMode(s){this._setOption("valueChangeMode",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;keyStepChange;labelChange;maxChange;minChange;nameChange;readOnlyChange;rtlEnabledChange;showRangeChange;stepChange;tabIndexChange;tooltipChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeModeChange;visibleChange;widthChange;onBlur;change(s){}touched=s=>{};constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"keyStepChange"},{emit:"labelChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showRangeChange"},{emit:"stepChange"},{emit:"tabIndexChange"},{emit:"tooltipChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeModeChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("validationErrors",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-slider"]],hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",keyStep:"keyStep",label:"label",max:"max",min:"min",name:"name",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showRange:"showRange",step:"step",tabIndex:"tabIndex",tooltip:"tooltip",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeMode:"valueChangeMode",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",keyStepChange:"keyStepChange",labelChange:"labelChange",maxChange:"maxChange",minChange:"minChange",nameChange:"nameChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showRangeChange:"showRangeChange",stepChange:"stepChange",tabIndexChange:"tabIndexChange",tooltipChange:"tooltipChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeModeChange:"valueChangeModeChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.uE7,f.Pxf,f.Vku,b.p_,b.xZ,f.uE7,f.Pxf,f.Vku,b.xZ]})}return d})()},5947:(In,Ze,M)=>{"use strict";M.d(Ze,{Y:()=>S,d:()=>T});var W=M(7788),o=M(4775),P=M(1491),b=M(3349);const f={provide:P.kq,useExisting:(0,W.Rfq)(()=>S),multi:!0};let S=(()=>{class y extends b.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(c){this._setOption("accessKey",c)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(c){this._setOption("activeStateEnabled",c)}get disabled(){return this._getOption("disabled")}set disabled(c){this._setOption("disabled",c)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(c){this._setOption("elementAttr",c)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(c){this._setOption("focusStateEnabled",c)}get height(){return this._getOption("height")}set height(c){this._setOption("height",c)}get hint(){return this._getOption("hint")}set hint(c){this._setOption("hint",c)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(c){this._setOption("hoverStateEnabled",c)}get isDirty(){return this._getOption("isDirty")}set isDirty(c){this._setOption("isDirty",c)}get isValid(){return this._getOption("isValid")}set isValid(c){this._setOption("isValid",c)}get name(){return this._getOption("name")}set name(c){this._setOption("name",c)}get readOnly(){return this._getOption("readOnly")}set readOnly(c){this._setOption("readOnly",c)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(c){this._setOption("rtlEnabled",c)}get switchedOffText(){return this._getOption("switchedOffText")}set switchedOffText(c){this._setOption("switchedOffText",c)}get switchedOnText(){return this._getOption("switchedOnText")}set switchedOnText(c){this._setOption("switchedOnText",c)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(c){this._setOption("tabIndex",c)}get validationError(){return this._getOption("validationError")}set validationError(c){this._setOption("validationError",c)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(c){this._setOption("validationErrors",c)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(c){this._setOption("validationMessageMode",c)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(c){this._setOption("validationMessagePosition",c)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(c){this._setOption("validationStatus",c)}get value(){return this._getOption("value")}set value(c){this._setOption("value",c)}get visible(){return this._getOption("visible")}set visible(c){this._setOption("visible",c)}get width(){return this._getOption("width")}set width(c){this._setOption("width",c)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;nameChange;readOnlyChange;rtlEnabledChange;switchedOffTextChange;switchedOnTextChange;tabIndexChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(c){}touched=c=>{};constructor(c,s,a,u,h,g,_,x){super(c,s,a,u,_,x),this._watcherHelper=u,this._idh=h,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"switchedOffTextChange"},{emit:"switchedOnTextChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),g.setHost(this)}_createInstance(c,s){return new o.A(c,s)}writeValue(c){this.eventHelper.lockedValueChangeEvent=!0,this.value=c,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(c){this.disabled=c}registerOnChange(c){this.change=c}registerOnTouched(c){this.touched=c}_createWidget(c){super._createWidget(c),this.instance.on("focusOut",s=>{this.eventHelper.fireNgEvent("onBlur",[s])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(c){super.ngOnChanges(c),this.setupChanges("validationErrors",c)}setupChanges(c,s){c in this._optionsToUpdate||this._idh.setup(c,s)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(c,s){let a=this._idh.setupSingle(c,s),u=null!==this._idh.getChanges(c,s);(a||u)&&super._setOption(c,s)}static \u0275fac=function(s){return new(s||y)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:y,selectors:[["dx-switch"]],hostBindings:function(s,a){1&s&&W.bIt("valueChange",function(h){return a.change(h)})("onBlur",function(h){return a.touched(h)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",name:"name",readOnly:"readOnly",rtlEnabled:"rtlEnabled",switchedOffText:"switchedOffText",switchedOnText:"switchedOnText",tabIndex:"tabIndex",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",nameChange:"nameChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",switchedOffTextChange:"switchedOffTextChange",switchedOnTextChange:"switchedOnTextChange",tabIndexChange:"tabIndexChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,f,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(s,a){},encapsulation:2})}return y})(),T=(()=>{class y{static \u0275fac=function(s){return new(s||y)};static \u0275mod=W.$C({type:y});static \u0275inj=W.G2t({imports:[b.p_,b.xZ,b.xZ]})}return y})()},2459:(In,Ze,M)=>{"use strict";M.d(Ze,{B:()=>S,s:()=>f});var W=M(7788),o=M(6942),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get dataSource(){return this._getOption("dataSource")}set dataSource(d){this._setOption("dataSource",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get iconPosition(){return this._getOption("iconPosition")}set iconPosition(d){this._setOption("iconPosition",d)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(d){this._setOption("itemHoldTimeout",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(d){this._setOption("itemTemplate",d)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(d){this._setOption("keyExpr",d)}get noDataText(){return this._getOption("noDataText")}set noDataText(d){this._setOption("noDataText",d)}get orientation(){return this._getOption("orientation")}set orientation(d){this._setOption("orientation",d)}get repaintChangesOnly(){return this._getOption("repaintChangesOnly")}set repaintChangesOnly(d){this._setOption("repaintChangesOnly",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get scrollByContent(){return this._getOption("scrollByContent")}set scrollByContent(d){this._setOption("scrollByContent",d)}get scrollingEnabled(){return this._getOption("scrollingEnabled")}set scrollingEnabled(d){this._setOption("scrollingEnabled",d)}get selectedIndex(){return this._getOption("selectedIndex")}set selectedIndex(d){this._setOption("selectedIndex",d)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(d){this._setOption("selectedItem",d)}get selectedItemKeys(){return this._getOption("selectedItemKeys")}set selectedItemKeys(d){this._setOption("selectedItemKeys",d)}get selectedItems(){return this._getOption("selectedItems")}set selectedItems(d){this._setOption("selectedItems",d)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(d){this._setOption("selectionMode",d)}get showNavButtons(){return this._getOption("showNavButtons")}set showNavButtons(d){this._setOption("showNavButtons",d)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(d){this._setOption("stylingMode",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onContentReady;onDisposing;onInitialized;onItemClick;onItemContextMenu;onItemHold;onItemRendered;onOptionChanged;onSelectionChanged;accessKeyChange;dataSourceChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;iconPositionChange;itemHoldTimeoutChange;itemsChange;itemTemplateChange;keyExprChange;noDataTextChange;orientationChange;repaintChangesOnlyChange;rtlEnabledChange;scrollByContentChange;scrollingEnabledChange;selectedIndexChange;selectedItemChange;selectedItemKeysChange;selectedItemsChange;selectionModeChange;showNavButtonsChange;stylingModeChange;tabIndexChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"iconPositionChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"keyExprChange"},{emit:"noDataTextChange"},{emit:"orientationChange"},{emit:"repaintChangesOnlyChange"},{emit:"rtlEnabledChange"},{emit:"scrollByContentChange"},{emit:"scrollingEnabledChange"},{emit:"selectedIndexChange"},{emit:"selectedItemChange"},{emit:"selectedItemKeysChange"},{emit:"selectedItemsChange"},{emit:"selectionModeChange"},{emit:"showNavButtonsChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("dataSource",d),this.setupChanges("items",d),this.setupChanges("selectedItemKeys",d),this.setupChanges("selectedItems",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("selectedItemKeys"),this._idh.doCheck("selectedItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-tabs"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{accessKey:"accessKey",dataSource:"dataSource",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",iconPosition:"iconPosition",itemHoldTimeout:"itemHoldTimeout",items:"items",itemTemplate:"itemTemplate",keyExpr:"keyExpr",noDataText:"noDataText",orientation:"orientation",repaintChangesOnly:"repaintChangesOnly",rtlEnabled:"rtlEnabled",scrollByContent:"scrollByContent",scrollingEnabled:"scrollingEnabled",selectedIndex:"selectedIndex",selectedItem:"selectedItem",selectedItemKeys:"selectedItemKeys",selectedItems:"selectedItems",selectionMode:"selectionMode",showNavButtons:"showNavButtons",stylingMode:"stylingMode",tabIndex:"tabIndex",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",iconPositionChange:"iconPositionChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",keyExprChange:"keyExprChange",noDataTextChange:"noDataTextChange",orientationChange:"orientationChange",repaintChangesOnlyChange:"repaintChangesOnlyChange",rtlEnabledChange:"rtlEnabledChange",scrollByContentChange:"scrollByContentChange",scrollingEnabledChange:"scrollingEnabledChange",selectedIndexChange:"selectedIndexChange",selectedItemChange:"selectedItemChange",selectedItemKeysChange:"selectedItemKeysChange",selectedItemsChange:"selectedItemsChange",selectionModeChange:"selectionModeChange",showNavButtonsChange:"showNavButtonsChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.POb,P.p_,P.xZ,b.POb,P.xZ]})}return T})()},6165:(In,Ze,M)=>{"use strict";M.d(Ze,{T:()=>T,u:()=>y});var W=M(7788),o=M(3577),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(s){this._setOption("acceptCustomValue",s)}get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(s){this._setOption("applyValueMode",s)}get buttons(){return this._getOption("buttons")}set buttons(s){this._setOption("buttons",s)}get customItemCreateEvent(){return this._getOption("customItemCreateEvent")}set customItemCreateEvent(s){this._setOption("customItemCreateEvent",s)}get dataSource(){return this._getOption("dataSource")}set dataSource(s){this._setOption("dataSource",s)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(s){this._setOption("deferRendering",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(s){this._setOption("displayExpr",s)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(s){this._setOption("dropDownButtonTemplate",s)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(s){this._setOption("dropDownOptions",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get fieldTemplate(){return this._getOption("fieldTemplate")}set fieldTemplate(s){this._setOption("fieldTemplate",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get grouped(){return this._getOption("grouped")}set grouped(s){this._setOption("grouped",s)}get groupTemplate(){return this._getOption("groupTemplate")}set groupTemplate(s){this._setOption("groupTemplate",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hideSelectedItems(){return this._getOption("hideSelectedItems")}set hideSelectedItems(s){this._setOption("hideSelectedItems",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(s){this._setOption("inputAttr",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get items(){return this._getOption("items")}set items(s){this._setOption("items",s)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(s){this._setOption("itemTemplate",s)}get label(){return this._getOption("label")}set label(s){this._setOption("label",s)}get labelMode(){return this._getOption("labelMode")}set labelMode(s){this._setOption("labelMode",s)}get maxDisplayedTags(){return this._getOption("maxDisplayedTags")}set maxDisplayedTags(s){this._setOption("maxDisplayedTags",s)}get maxFilterQueryLength(){return this._getOption("maxFilterQueryLength")}set maxFilterQueryLength(s){this._setOption("maxFilterQueryLength",s)}get maxLength(){return this._getOption("maxLength")}set maxLength(s){this._setOption("maxLength",s)}get minSearchLength(){return this._getOption("minSearchLength")}set minSearchLength(s){this._setOption("minSearchLength",s)}get multiline(){return this._getOption("multiline")}set multiline(s){this._setOption("multiline",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get noDataText(){return this._getOption("noDataText")}set noDataText(s){this._setOption("noDataText",s)}get opened(){return this._getOption("opened")}set opened(s){this._setOption("opened",s)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(s){this._setOption("openOnFieldClick",s)}get placeholder(){return this._getOption("placeholder")}set placeholder(s){this._setOption("placeholder",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get searchEnabled(){return this._getOption("searchEnabled")}set searchEnabled(s){this._setOption("searchEnabled",s)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(s){this._setOption("searchExpr",s)}get searchMode(){return this._getOption("searchMode")}set searchMode(s){this._setOption("searchMode",s)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(s){this._setOption("searchTimeout",s)}get selectAllMode(){return this._getOption("selectAllMode")}set selectAllMode(s){this._setOption("selectAllMode",s)}get selectAllText(){return this._getOption("selectAllText")}set selectAllText(s){this._setOption("selectAllText",s)}get selectedItems(){return this._getOption("selectedItems")}set selectedItems(s){this._setOption("selectedItems",s)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(s){this._setOption("showClearButton",s)}get showDataBeforeSearch(){return this._getOption("showDataBeforeSearch")}set showDataBeforeSearch(s){this._setOption("showDataBeforeSearch",s)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(s){this._setOption("showDropDownButton",s)}get showMultiTagOnly(){return this._getOption("showMultiTagOnly")}set showMultiTagOnly(s){this._setOption("showMultiTagOnly",s)}get showSelectionControls(){return this._getOption("showSelectionControls")}set showSelectionControls(s){this._setOption("showSelectionControls",s)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(s){this._setOption("stylingMode",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get tagTemplate(){return this._getOption("tagTemplate")}set tagTemplate(s){this._setOption("tagTemplate",s)}get text(){return this._getOption("text")}set text(s){this._setOption("text",s)}get useItemTextAsTitle(){return this._getOption("useItemTextAsTitle")}set useItemTextAsTitle(s){this._setOption("useItemTextAsTitle",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(s){this._setOption("valueChangeEvent",s)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(s){this._setOption("valueExpr",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}get wrapItemText(){return this._getOption("wrapItemText")}set wrapItemText(s){this._setOption("wrapItemText",s)}onChange;onClosed;onContentReady;onCustomItemCreating;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onItemClick;onKeyDown;onKeyUp;onMultiTagPreparing;onOpened;onOptionChanged;onSelectAllValueChanged;onSelectionChanged;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;applyValueModeChange;buttonsChange;customItemCreateEventChange;dataSourceChange;deferRenderingChange;disabledChange;displayExprChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;fieldTemplateChange;focusStateEnabledChange;groupedChange;groupTemplateChange;heightChange;hideSelectedItemsChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;itemsChange;itemTemplateChange;labelChange;labelModeChange;maxDisplayedTagsChange;maxFilterQueryLengthChange;maxLengthChange;minSearchLengthChange;multilineChange;nameChange;noDataTextChange;openedChange;openOnFieldClickChange;placeholderChange;readOnlyChange;rtlEnabledChange;searchEnabledChange;searchExprChange;searchModeChange;searchTimeoutChange;selectAllModeChange;selectAllTextChange;selectedItemsChange;showClearButtonChange;showDataBeforeSearchChange;showDropDownButtonChange;showMultiTagOnlyChange;showSelectionControlsChange;stylingModeChange;tabIndexChange;tagTemplateChange;textChange;useItemTextAsTitleChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;valueExprChange;visibleChange;widthChange;wrapItemTextChange;onBlur;change(s){}touched=s=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(s){this.setChildren("buttons",s)}get itemsChildren(){return this._getOption("items")}set itemsChildren(s){this.setChildren("items",s)}constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"customItemCreating",emit:"onCustomItemCreating"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"multiTagPreparing",emit:"onMultiTagPreparing"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectAllValueChanged",emit:"onSelectAllValueChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"applyValueModeChange"},{emit:"buttonsChange"},{emit:"customItemCreateEventChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"fieldTemplateChange"},{emit:"focusStateEnabledChange"},{emit:"groupedChange"},{emit:"groupTemplateChange"},{emit:"heightChange"},{emit:"hideSelectedItemsChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxDisplayedTagsChange"},{emit:"maxFilterQueryLengthChange"},{emit:"maxLengthChange"},{emit:"minSearchLengthChange"},{emit:"multilineChange"},{emit:"nameChange"},{emit:"noDataTextChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"searchEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchTimeoutChange"},{emit:"selectAllModeChange"},{emit:"selectAllTextChange"},{emit:"selectedItemsChange"},{emit:"showClearButtonChange"},{emit:"showDataBeforeSearchChange"},{emit:"showDropDownButtonChange"},{emit:"showMultiTagOnlyChange"},{emit:"showSelectionControlsChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"tagTemplateChange"},{emit:"textChange"},{emit:"useItemTextAsTitleChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapItemTextChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("buttons",s),this.setupChanges("dataSource",s),this.setupChanges("items",s),this.setupChanges("searchExpr",s),this.setupChanges("selectedItems",s),this.setupChanges("validationErrors",s),this.setupChanges("value",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("searchExpr"),this._idh.doCheck("selectedItems"),this._idh.doCheck("validationErrors"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-tag-box"]],contentQueries:function(a,u,h){if(1&a&&(W.wni(h,f.BrI,4),W.wni(h,f.CVf,4)),2&a){let g;W.mGM(g=W.lsd())&&(u.buttonsChildren=g),W.mGM(g=W.lsd())&&(u.itemsChildren=g)}},hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",applyValueMode:"applyValueMode",buttons:"buttons",customItemCreateEvent:"customItemCreateEvent",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayExpr:"displayExpr",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",fieldTemplate:"fieldTemplate",focusStateEnabled:"focusStateEnabled",grouped:"grouped",groupTemplate:"groupTemplate",height:"height",hideSelectedItems:"hideSelectedItems",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",items:"items",itemTemplate:"itemTemplate",label:"label",labelMode:"labelMode",maxDisplayedTags:"maxDisplayedTags",maxFilterQueryLength:"maxFilterQueryLength",maxLength:"maxLength",minSearchLength:"minSearchLength",multiline:"multiline",name:"name",noDataText:"noDataText",opened:"opened",openOnFieldClick:"openOnFieldClick",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",searchEnabled:"searchEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchTimeout:"searchTimeout",selectAllMode:"selectAllMode",selectAllText:"selectAllText",selectedItems:"selectedItems",showClearButton:"showClearButton",showDataBeforeSearch:"showDataBeforeSearch",showDropDownButton:"showDropDownButton",showMultiTagOnly:"showMultiTagOnly",showSelectionControls:"showSelectionControls",stylingMode:"stylingMode",tabIndex:"tabIndex",tagTemplate:"tagTemplate",text:"text",useItemTextAsTitle:"useItemTextAsTitle",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",valueExpr:"valueExpr",visible:"visible",width:"width",wrapItemText:"wrapItemText"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCustomItemCreating:"onCustomItemCreating",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onItemClick:"onItemClick",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onMultiTagPreparing:"onMultiTagPreparing",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onSelectAllValueChanged:"onSelectAllValueChanged",onSelectionChanged:"onSelectionChanged",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",applyValueModeChange:"applyValueModeChange",buttonsChange:"buttonsChange",customItemCreateEventChange:"customItemCreateEventChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",fieldTemplateChange:"fieldTemplateChange",focusStateEnabledChange:"focusStateEnabledChange",groupedChange:"groupedChange",groupTemplateChange:"groupTemplateChange",heightChange:"heightChange",hideSelectedItemsChange:"hideSelectedItemsChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxDisplayedTagsChange:"maxDisplayedTagsChange",maxFilterQueryLengthChange:"maxFilterQueryLengthChange",maxLengthChange:"maxLengthChange",minSearchLengthChange:"minSearchLengthChange",multilineChange:"multilineChange",nameChange:"nameChange",noDataTextChange:"noDataTextChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",searchEnabledChange:"searchEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchTimeoutChange:"searchTimeoutChange",selectAllModeChange:"selectAllModeChange",selectAllTextChange:"selectAllTextChange",selectedItemsChange:"selectedItemsChange",showClearButtonChange:"showClearButtonChange",showDataBeforeSearchChange:"showDataBeforeSearchChange",showDropDownButtonChange:"showDropDownButtonChange",showMultiTagOnlyChange:"showMultiTagOnlyChange",showSelectionControlsChange:"showSelectionControlsChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",tagTemplateChange:"tagTemplateChange",textChange:"textChange",useItemTextAsTitleChange:"useItemTextAsTitleChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapItemTextChange:"wrapItemTextChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.GIV,f.u4t,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,f.POb,b.p_,b.xZ,f.GIV,f.u4t,f.df_,f.YLo,f.YaD,f.eNx,f.Bkf,f.nwt,f.hXw,f.YGc,f.gf0,f.rvW,f.Tob,f.$Ql,f.isg,f.POb,b.xZ]})}return d})()},862:(In,Ze,M)=>{"use strict";M.d(Ze,{Z:()=>y,m:()=>T});var W=M(7788),o=M(8910),P=M(1491),b=M(3349),f=M(8914);const S={provide:P.kq,useExisting:(0,W.Rfq)(()=>T),multi:!0};let T=(()=>{class d extends b.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(s){this._setOption("accessKey",s)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(s){this._setOption("activeStateEnabled",s)}get buttons(){return this._getOption("buttons")}set buttons(s){this._setOption("buttons",s)}get disabled(){return this._getOption("disabled")}set disabled(s){this._setOption("disabled",s)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(s){this._setOption("elementAttr",s)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(s){this._setOption("focusStateEnabled",s)}get height(){return this._getOption("height")}set height(s){this._setOption("height",s)}get hint(){return this._getOption("hint")}set hint(s){this._setOption("hint",s)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(s){this._setOption("hoverStateEnabled",s)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(s){this._setOption("inputAttr",s)}get isDirty(){return this._getOption("isDirty")}set isDirty(s){this._setOption("isDirty",s)}get isValid(){return this._getOption("isValid")}set isValid(s){this._setOption("isValid",s)}get label(){return this._getOption("label")}set label(s){this._setOption("label",s)}get labelMode(){return this._getOption("labelMode")}set labelMode(s){this._setOption("labelMode",s)}get mask(){return this._getOption("mask")}set mask(s){this._setOption("mask",s)}get maskChar(){return this._getOption("maskChar")}set maskChar(s){this._setOption("maskChar",s)}get maskInvalidMessage(){return this._getOption("maskInvalidMessage")}set maskInvalidMessage(s){this._setOption("maskInvalidMessage",s)}get maskRules(){return this._getOption("maskRules")}set maskRules(s){this._setOption("maskRules",s)}get maxLength(){return this._getOption("maxLength")}set maxLength(s){this._setOption("maxLength",s)}get mode(){return this._getOption("mode")}set mode(s){this._setOption("mode",s)}get name(){return this._getOption("name")}set name(s){this._setOption("name",s)}get placeholder(){return this._getOption("placeholder")}set placeholder(s){this._setOption("placeholder",s)}get readOnly(){return this._getOption("readOnly")}set readOnly(s){this._setOption("readOnly",s)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(s){this._setOption("rtlEnabled",s)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(s){this._setOption("showClearButton",s)}get showMaskMode(){return this._getOption("showMaskMode")}set showMaskMode(s){this._setOption("showMaskMode",s)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(s){this._setOption("spellcheck",s)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(s){this._setOption("stylingMode",s)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(s){this._setOption("tabIndex",s)}get text(){return this._getOption("text")}set text(s){this._setOption("text",s)}get useMaskedValue(){return this._getOption("useMaskedValue")}set useMaskedValue(s){this._setOption("useMaskedValue",s)}get validationError(){return this._getOption("validationError")}set validationError(s){this._setOption("validationError",s)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(s){this._setOption("validationErrors",s)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(s){this._setOption("validationMessageMode",s)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(s){this._setOption("validationMessagePosition",s)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(s){this._setOption("validationStatus",s)}get value(){return this._getOption("value")}set value(s){this._setOption("value",s)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(s){this._setOption("valueChangeEvent",s)}get visible(){return this._getOption("visible")}set visible(s){this._setOption("visible",s)}get width(){return this._getOption("width")}set width(s){this._setOption("width",s)}onChange;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOptionChanged;onPaste;onValueChanged;accessKeyChange;activeStateEnabledChange;buttonsChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maskChange;maskCharChange;maskInvalidMessageChange;maskRulesChange;maxLengthChange;modeChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showMaskModeChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;useMaskedValueChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(s){}touched=s=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(s){this.setChildren("buttons",s)}constructor(s,a,u,h,g,_,x,w){super(s,a,u,h,x,w),this._watcherHelper=h,this._idh=g,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maskChange"},{emit:"maskCharChange"},{emit:"maskInvalidMessageChange"},{emit:"maskRulesChange"},{emit:"maxLengthChange"},{emit:"modeChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showMaskModeChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useMaskedValueChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),_.setHost(this)}_createInstance(s,a){return new o.A(s,a)}writeValue(s){this.eventHelper.lockedValueChangeEvent=!0,this.value=s,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(s){this.disabled=s}registerOnChange(s){this.change=s}registerOnTouched(s){this.touched=s}_createWidget(s){super._createWidget(s),this.instance.on("focusOut",a=>{this.eventHelper.fireNgEvent("onBlur",[a])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(s){super.ngOnChanges(s),this.setupChanges("buttons",s),this.setupChanges("validationErrors",s)}setupChanges(s,a){s in this._optionsToUpdate||this._idh.setup(s,a)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(s,a){let u=this._idh.setupSingle(s,a),h=null!==this._idh.getChanges(s,a);(u||h)&&super._setOption(s,a)}static \u0275fac=function(a){return new(a||d)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(b.zF),W.rXU(b.jS),W.rXU(b.$M),W.rXU(b.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:d,selectors:[["dx-text-box"]],contentQueries:function(a,u,h){if(1&a&&W.wni(h,f.BrI,4),2&a){let g;W.mGM(g=W.lsd())&&(u.buttonsChildren=g)}},hostBindings:function(a,u){1&a&&W.bIt("valueChange",function(g){return u.change(g)})("onBlur",function(g){return u.touched(g)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",mask:"mask",maskChar:"maskChar",maskInvalidMessage:"maskInvalidMessage",maskRules:"maskRules",maxLength:"maxLength",mode:"mode",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showMaskMode:"showMaskMode",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useMaskedValue:"useMaskedValue",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maskChange:"maskChange",maskCharChange:"maskCharChange",maskInvalidMessageChange:"maskInvalidMessageChange",maskRulesChange:"maskRulesChange",maxLengthChange:"maxLengthChange",modeChange:"modeChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showMaskModeChange:"showMaskModeChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useMaskedValueChange:"useMaskedValueChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[W.Jv_([b.zF,b.jS,S,b.fH,b.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(a,u){},encapsulation:2})}return d})(),y=(()=>{class d{static \u0275fac=function(a){return new(a||d)};static \u0275mod=W.$C({type:d});static \u0275inj=W.G2t({imports:[f.GIV,f.u4t,b.p_,b.xZ,f.GIV,f.u4t,b.xZ]})}return d})()},471:(In,Ze,M)=>{"use strict";M.d(Ze,{c:()=>S,t:()=>f});var W=M(7788),o=M(1757),P=M(3349),b=M(8914);let f=(()=>{class T extends P.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(d){this._setOption("accessKey",d)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(d){this._setOption("activeStateEnabled",d)}get animationEnabled(){return this._getOption("animationEnabled")}set animationEnabled(d){this._setOption("animationEnabled",d)}get collapseIcon(){return this._getOption("collapseIcon")}set collapseIcon(d){this._setOption("collapseIcon",d)}get createChildren(){return this._getOption("createChildren")}set createChildren(d){this._setOption("createChildren",d)}get dataSource(){return this._getOption("dataSource")}set dataSource(d){this._setOption("dataSource",d)}get dataStructure(){return this._getOption("dataStructure")}set dataStructure(d){this._setOption("dataStructure",d)}get disabled(){return this._getOption("disabled")}set disabled(d){this._setOption("disabled",d)}get disabledExpr(){return this._getOption("disabledExpr")}set disabledExpr(d){this._setOption("disabledExpr",d)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(d){this._setOption("displayExpr",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get expandAllEnabled(){return this._getOption("expandAllEnabled")}set expandAllEnabled(d){this._setOption("expandAllEnabled",d)}get expandedExpr(){return this._getOption("expandedExpr")}set expandedExpr(d){this._setOption("expandedExpr",d)}get expandEvent(){return this._getOption("expandEvent")}set expandEvent(d){this._setOption("expandEvent",d)}get expandIcon(){return this._getOption("expandIcon")}set expandIcon(d){this._setOption("expandIcon",d)}get expandNodesRecursive(){return this._getOption("expandNodesRecursive")}set expandNodesRecursive(d){this._setOption("expandNodesRecursive",d)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(d){this._setOption("focusStateEnabled",d)}get hasItemsExpr(){return this._getOption("hasItemsExpr")}set hasItemsExpr(d){this._setOption("hasItemsExpr",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get hint(){return this._getOption("hint")}set hint(d){this._setOption("hint",d)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(d){this._setOption("hoverStateEnabled",d)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(d){this._setOption("itemHoldTimeout",d)}get items(){return this._getOption("items")}set items(d){this._setOption("items",d)}get itemsExpr(){return this._getOption("itemsExpr")}set itemsExpr(d){this._setOption("itemsExpr",d)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(d){this._setOption("itemTemplate",d)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(d){this._setOption("keyExpr",d)}get noDataText(){return this._getOption("noDataText")}set noDataText(d){this._setOption("noDataText",d)}get parentIdExpr(){return this._getOption("parentIdExpr")}set parentIdExpr(d){this._setOption("parentIdExpr",d)}get rootValue(){return this._getOption("rootValue")}set rootValue(d){this._setOption("rootValue",d)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(d){this._setOption("rtlEnabled",d)}get scrollDirection(){return this._getOption("scrollDirection")}set scrollDirection(d){this._setOption("scrollDirection",d)}get searchEditorOptions(){return this._getOption("searchEditorOptions")}set searchEditorOptions(d){this._setOption("searchEditorOptions",d)}get searchEnabled(){return this._getOption("searchEnabled")}set searchEnabled(d){this._setOption("searchEnabled",d)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(d){this._setOption("searchExpr",d)}get searchMode(){return this._getOption("searchMode")}set searchMode(d){this._setOption("searchMode",d)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(d){this._setOption("searchTimeout",d)}get searchValue(){return this._getOption("searchValue")}set searchValue(d){this._setOption("searchValue",d)}get selectAllText(){return this._getOption("selectAllText")}set selectAllText(d){this._setOption("selectAllText",d)}get selectByClick(){return this._getOption("selectByClick")}set selectByClick(d){this._setOption("selectByClick",d)}get selectedExpr(){return this._getOption("selectedExpr")}set selectedExpr(d){this._setOption("selectedExpr",d)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(d){this._setOption("selectionMode",d)}get selectNodesRecursive(){return this._getOption("selectNodesRecursive")}set selectNodesRecursive(d){this._setOption("selectNodesRecursive",d)}get showCheckBoxesMode(){return this._getOption("showCheckBoxesMode")}set showCheckBoxesMode(d){this._setOption("showCheckBoxesMode",d)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(d){this._setOption("tabIndex",d)}get useNativeScrolling(){return this._getOption("useNativeScrolling")}set useNativeScrolling(d){this._setOption("useNativeScrolling",d)}get virtualModeEnabled(){return this._getOption("virtualModeEnabled")}set virtualModeEnabled(d){this._setOption("virtualModeEnabled",d)}get visible(){return this._getOption("visible")}set visible(d){this._setOption("visible",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onContentReady;onDisposing;onInitialized;onItemClick;onItemCollapsed;onItemContextMenu;onItemExpanded;onItemHold;onItemRendered;onItemSelectionChanged;onOptionChanged;onSelectAllValueChanged;onSelectionChanged;accessKeyChange;activeStateEnabledChange;animationEnabledChange;collapseIconChange;createChildrenChange;dataSourceChange;dataStructureChange;disabledChange;disabledExprChange;displayExprChange;elementAttrChange;expandAllEnabledChange;expandedExprChange;expandEventChange;expandIconChange;expandNodesRecursiveChange;focusStateEnabledChange;hasItemsExprChange;heightChange;hintChange;hoverStateEnabledChange;itemHoldTimeoutChange;itemsChange;itemsExprChange;itemTemplateChange;keyExprChange;noDataTextChange;parentIdExprChange;rootValueChange;rtlEnabledChange;scrollDirectionChange;searchEditorOptionsChange;searchEnabledChange;searchExprChange;searchModeChange;searchTimeoutChange;searchValueChange;selectAllTextChange;selectByClickChange;selectedExprChange;selectionModeChange;selectNodesRecursiveChange;showCheckBoxesModeChange;tabIndexChange;useNativeScrollingChange;virtualModeEnabledChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(d){this.setChildren("items",d)}constructor(d,c,s,a,u,h,g,_){super(d,c,s,a,g,_),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemCollapsed",emit:"onItemCollapsed"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemExpanded",emit:"onItemExpanded"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"itemSelectionChanged",emit:"onItemSelectionChanged"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectAllValueChanged",emit:"onSelectAllValueChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"animationEnabledChange"},{emit:"collapseIconChange"},{emit:"createChildrenChange"},{emit:"dataSourceChange"},{emit:"dataStructureChange"},{emit:"disabledChange"},{emit:"disabledExprChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"expandAllEnabledChange"},{emit:"expandedExprChange"},{emit:"expandEventChange"},{emit:"expandIconChange"},{emit:"expandNodesRecursiveChange"},{emit:"focusStateEnabledChange"},{emit:"hasItemsExprChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemsExprChange"},{emit:"itemTemplateChange"},{emit:"keyExprChange"},{emit:"noDataTextChange"},{emit:"parentIdExprChange"},{emit:"rootValueChange"},{emit:"rtlEnabledChange"},{emit:"scrollDirectionChange"},{emit:"searchEditorOptionsChange"},{emit:"searchEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchTimeoutChange"},{emit:"searchValueChange"},{emit:"selectAllTextChange"},{emit:"selectByClickChange"},{emit:"selectedExprChange"},{emit:"selectionModeChange"},{emit:"selectNodesRecursiveChange"},{emit:"showCheckBoxesModeChange"},{emit:"tabIndexChange"},{emit:"useNativeScrollingChange"},{emit:"virtualModeEnabledChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),h.setHost(this)}_createInstance(d,c){return new o.A(d,c)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("dataSource",d),this.setupChanges("items",d),this.setupChanges("searchExpr",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("searchExpr"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-tree-view"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.CVf,4),2&c){let u;W.mGM(u=W.lsd())&&(s.itemsChildren=u)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",animationEnabled:"animationEnabled",collapseIcon:"collapseIcon",createChildren:"createChildren",dataSource:"dataSource",dataStructure:"dataStructure",disabled:"disabled",disabledExpr:"disabledExpr",displayExpr:"displayExpr",elementAttr:"elementAttr",expandAllEnabled:"expandAllEnabled",expandedExpr:"expandedExpr",expandEvent:"expandEvent",expandIcon:"expandIcon",expandNodesRecursive:"expandNodesRecursive",focusStateEnabled:"focusStateEnabled",hasItemsExpr:"hasItemsExpr",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",itemHoldTimeout:"itemHoldTimeout",items:"items",itemsExpr:"itemsExpr",itemTemplate:"itemTemplate",keyExpr:"keyExpr",noDataText:"noDataText",parentIdExpr:"parentIdExpr",rootValue:"rootValue",rtlEnabled:"rtlEnabled",scrollDirection:"scrollDirection",searchEditorOptions:"searchEditorOptions",searchEnabled:"searchEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchTimeout:"searchTimeout",searchValue:"searchValue",selectAllText:"selectAllText",selectByClick:"selectByClick",selectedExpr:"selectedExpr",selectionMode:"selectionMode",selectNodesRecursive:"selectNodesRecursive",showCheckBoxesMode:"showCheckBoxesMode",tabIndex:"tabIndex",useNativeScrolling:"useNativeScrolling",virtualModeEnabled:"virtualModeEnabled",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemCollapsed:"onItemCollapsed",onItemContextMenu:"onItemContextMenu",onItemExpanded:"onItemExpanded",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onItemSelectionChanged:"onItemSelectionChanged",onOptionChanged:"onOptionChanged",onSelectAllValueChanged:"onSelectAllValueChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",animationEnabledChange:"animationEnabledChange",collapseIconChange:"collapseIconChange",createChildrenChange:"createChildrenChange",dataSourceChange:"dataSourceChange",dataStructureChange:"dataStructureChange",disabledChange:"disabledChange",disabledExprChange:"disabledExprChange",displayExprChange:"displayExprChange",elementAttrChange:"elementAttrChange",expandAllEnabledChange:"expandAllEnabledChange",expandedExprChange:"expandedExprChange",expandEventChange:"expandEventChange",expandIconChange:"expandIconChange",expandNodesRecursiveChange:"expandNodesRecursiveChange",focusStateEnabledChange:"focusStateEnabledChange",hasItemsExprChange:"hasItemsExprChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemsExprChange:"itemsExprChange",itemTemplateChange:"itemTemplateChange",keyExprChange:"keyExprChange",noDataTextChange:"noDataTextChange",parentIdExprChange:"parentIdExprChange",rootValueChange:"rootValueChange",rtlEnabledChange:"rtlEnabledChange",scrollDirectionChange:"scrollDirectionChange",searchEditorOptionsChange:"searchEditorOptionsChange",searchEnabledChange:"searchEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchTimeoutChange:"searchTimeoutChange",searchValueChange:"searchValueChange",selectAllTextChange:"selectAllTextChange",selectByClickChange:"selectByClickChange",selectedExprChange:"selectedExprChange",selectionModeChange:"selectionModeChange",selectNodesRecursiveChange:"selectNodesRecursiveChange",showCheckBoxesModeChange:"showCheckBoxesModeChange",tabIndexChange:"tabIndexChange",useNativeScrollingChange:"useNativeScrollingChange",virtualModeEnabledChange:"virtualModeEnabledChange",visibleChange:"visibleChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.POb,b.B9H,b.GIV,b.u4t,P.p_,P.xZ,b.POb,b.B9H,b.GIV,b.u4t,P.xZ]})}return T})()},1767:(In,Ze,M)=>{"use strict";M.d(Ze,{L:()=>S,_:()=>f});var W=M(7788),o=M(8025),P=M(3349),b=M(8914);let f=(()=>{class T extends P.PF{_watcherHelper;_idh;instance=null;get adapter(){return this._getOption("adapter")}set adapter(d){this._setOption("adapter",d)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(d){this._setOption("elementAttr",d)}get height(){return this._getOption("height")}set height(d){this._setOption("height",d)}get name(){return this._getOption("name")}set name(d){this._setOption("name",d)}get validationGroup(){return this._getOption("validationGroup")}set validationGroup(d){this._setOption("validationGroup",d)}get validationRules(){return this._getOption("validationRules")}set validationRules(d){this._setOption("validationRules",d)}get width(){return this._getOption("width")}set width(d){this._setOption("width",d)}onDisposing;onInitialized;onOptionChanged;onValidated;adapterChange;elementAttrChange;heightChange;nameChange;validationGroupChange;validationRulesChange;widthChange;get validationRulesChildren(){return this._getOption("validationRules")}set validationRulesChildren(d){this.setChildren("validationRules",d)}parentElement;constructor(d,c,s,a,u,h,g,_,x){super(d,c,s,a,_,x),this._watcherHelper=a,this._idh=u,this._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"validated",emit:"onValidated"},{emit:"adapterChange"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"nameChange"},{emit:"validationGroupChange"},{emit:"validationRulesChange"},{emit:"widthChange"}]),this.parentElement=this.getParentElement(h),this._idh.setHost(this),g.setHost(this)}_createInstance(d,c){return new o.A(this.parentElement?this.parentElement:d,c)}getParentElement(d){if(d)return d.getHost().element.nativeElement}ngOnDestroy(){this._destroyWidget()}ngOnChanges(d){super.ngOnChanges(d),this.setupChanges("validationRules",d)}setupChanges(d,c){d in this._optionsToUpdate||this._idh.setup(d,c)}ngDoCheck(){this._idh.doCheck("validationRules"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(d,c){let s=this._idh.setupSingle(d,c),a=null!==this._idh.getChanges(d,c);(s||a)&&super._setOption(d,c)}static \u0275fac=function(c){return new(c||T)(W.rXU(W.aKT),W.rXU(W.SKi),W.rXU(P.zF),W.rXU(P.jS),W.rXU(P.$M),W.rXU(P.fH,13),W.rXU(P.fH),W.rXU(W.pJN),W.rXU(W.Agw))};static \u0275cmp=W.VBU({type:T,selectors:[["dx-validator"]],contentQueries:function(c,s,a){if(1&c&&W.wni(a,b.Inh,4),2&c){let u;W.mGM(u=W.lsd())&&(s.validationRulesChildren=u)}},inputs:{adapter:"adapter",elementAttr:"elementAttr",height:"height",name:"name",validationGroup:"validationGroup",validationRules:"validationRules",width:"width"},outputs:{onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValidated:"onValidated",adapterChange:"adapterChange",elementAttrChange:"elementAttrChange",heightChange:"heightChange",nameChange:"nameChange",validationGroupChange:"validationGroupChange",validationRulesChange:"validationRulesChange",widthChange:"widthChange"},features:[W.Jv_([P.zF,P.jS,P.fH,P.$M]),W.Vt3,W.OA$],decls:0,vars:0,template:function(c,s){},encapsulation:2})}return T})(),S=(()=>{class T{static \u0275fac=function(c){return new(c||T)};static \u0275mod=W.$C({type:T});static \u0275inj=W.G2t({imports:[b.nz1,b.$lK,P.p_,P.xZ,b.nz1,b.$lK,P.xZ]})}return T})()},449:(In,Ze,M)=>{"use strict";M.d(Ze,{CCL:()=>Gde});var W={};M.r(W),M.d(W,{ChartTracker:()=>js,PieTracker:()=>Ta});var o={};M.r(o),M.d(o,{donut:()=>zT,doughnut:()=>uf,pie:()=>Qc});var P={};M.r(P),M.d(P,{candlestick:()=>sm,stock:()=>wb});var b={};M.r(b),M.d(b,{circular:()=>U0,circularSpider:()=>cy,linear:()=>S_,linearSpider:()=>vm});var f=M(3349),S=M(7788),T=M(2583),y=M(1973),d=M(5973),c=M(6054),s=M(9522),a=M(5704),u=M(5944),h=M(4859),g=M(6021),_=M(3090),x=M(8535),w=M(2660),D=M(1363),C=M(1830),I=M(778),L=M(4072),N=M(9293),G=M(6067),k=M(9212);const Q=G.A.inherit({_activeStateUnit:".dx-accordion-item",_getDefaultOptions(){return(0,_.X)(this.callBase(),{hoverStateEnabled:!0,height:void 0,itemTitleTemplate:"title",onItemTitleClick:null,selectedIndex:0,collapsible:!1,multiple:!1,animationDuration:300,deferRendering:!0,selectByClick:!0,activeStateEnabled:!0,_itemAttributes:{role:"tab"},_animationEasing:"ease"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===d.A.real().deviceType&&!d.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,k.Nt)(),options:{animationDuration:200,_animationEasing:"cubic-bezier(0.4, 0, 0.2, 1)"}}])},_itemElements(){return this._itemContainer().children(this._itemSelector())},_init(){this.callBase(),this.option("selectionRequired",!this.option("collapsible")),this.option("selectionMode",this.option("multiple")?"multiple":"single");const n=this.$element();n.addClass("dx-accordion"),this._$container=(0,a.A)("<div>").addClass("dx-accordion-wrapper"),n.append(this._$container)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new u.U((n,e)=>{if((0,C.Qd)(e)){const t=(0,x.N)(e.icon);t&&n.append(t),(0,C.O9)(e.title)&&!(0,C.Qd)(e.title)&&n.append(c.A.createTextNode(e.title))}else(0,C.O9)(e)&&n.text(String(e));n.wrapInner((0,a.A)("<div>").addClass("dx-accordion-item-title-caption"))},["title","icon"],this.option("integrationOptions.watchMethod"))})},_initMarkup(){this._deferredItems=[],this._deferredTemplateItems=[],this.callBase(),this.setAria({role:"tablist",multiselectable:this.option("multiple")}),(0,h.zE)(()=>{const n=this._getSelectedItemIndices();this._renderSelection(n,[])})},_render(){this.callBase(),g.z7.apply(this,this._deferredTemplateItems).done(()=>{this._updateItemHeights(!0)})},_itemDataKey:()=>"dxAccordionItemData",_itemClass:()=>"dx-accordion-item",_itemContainer(){return this._$container},_itemTitles(){return this._itemElements().find(".dx-accordion-item-title")},_itemContents(){return this._itemElements().find(".dx-accordion-item-body")},_getItemData(n){return(0,a.A)(n).parent().data(this._itemDataKey())||this.callBase.apply(this,arguments)},_executeItemRenderAction(n){n.type||this.callBase.apply(this,arguments)},_itemSelectHandler(n){(0,a.A)(n.target).closest(this._itemContents()).length||this.callBase.apply(this,arguments)},_afterItemElementDeleted(n,e){this._deferredItems.splice(e.itemIndex,1),this.callBase.apply(this,arguments)},_renderItemContent(n){this._deferredTemplateItems[n.index]=(0,g.cY)();const e=this.callBase((0,_.X)({},n,{contentClass:"dx-accordion-item-title",templateProperty:"titleTemplate",defaultTemplateName:this.option("itemTitleTemplate")}));this._attachItemTitleClickAction(e);const t=(0,g.cY)();(0,C.O9)(this._deferredItems[n.index])?this._deferredItems[n.index]=t:this._deferredItems.push(t),(!this.option("deferRendering")||this._getSelectedItemIndices().indexOf(n.index)>=0)&&t.resolve(),t.done(this.callBase.bind(this,(0,_.X)({},n,{contentClass:"dx-accordion-item-body",container:(0,s.cc)((0,a.A)("<div>").appendTo((0,a.A)(e).parent()))})))},_onItemTemplateRendered(n,e){return()=>{const t=this._deferredTemplateItems[e.index];t&&t.resolve()}},_attachItemTitleClickAction(n){const e=(0,N.b4)(I.U,this.NAME);L.A.off(n,e),L.A.on(n,e,this._itemTitleClickHandler.bind(this))},_itemTitleClickHandler(n){this._itemDXEventHandler(n,"onItemTitleClick")},_renderSelection(n,e){this._itemElements().addClass("dx-accordion-item-closed"),this.setAria("hidden",!0,this._itemContents()),this._updateItems(n,e)},_updateSelection(n,e){this._updateItems(n,e),this._updateItemHeightsWrapper(!1)},_updateItems(n,e){const t=this._itemElements();w.__(n,(i,r)=>{var m;null===(m=this._deferredItems[r])||void 0===m||m.resolve();const A=t.eq(r).addClass("dx-accordion-item-opened").removeClass("dx-accordion-item-closed");this.setAria("hidden",!1,A.find(".dx-accordion-item-body"))}),w.__(e,(i,r)=>{const m=t.eq(r).removeClass("dx-accordion-item-opened");this.setAria("hidden",!0,m.find(".dx-accordion-item-body"))})},_updateItemHeightsWrapper(n){this.option("templatesRenderAsynchronously")?this._animationTimer=setTimeout(()=>{this._updateItemHeights(n)}):this._updateItemHeights(n)},_updateItemHeights(n){const e=this,t=e._deferredAnimate,i=this._splitFreeSpace(this._calculateFreeSpace());return clearTimeout(this._animationTimer),g.z7.apply(a.A,[].slice.call(this._itemElements()).map(r=>e._updateItemHeight((0,a.A)(r),i,n))).done(()=>{t&&t.resolveWith(e)})},_updateItemHeight(n,e,t){const i=n.children(".dx-accordion-item-title");T.A.isAnimating(n)&&T.A.stop(n);const r=(0,D.P$)(n);let m;return n.hasClass("dx-accordion-item-opened")?(m=e+(0,D.P$)(i),m||((0,D.k$)(n,"auto"),m=(0,D.P$)(n))):m=(0,D.P$)(i),this._animateItem(n,r,m,t,!!e)},_animateItem(n,e,t,i,r){let m;return i||e===t?(n.css("height",t),m=(0,g.cY)().resolve()):m=T.A.animate(n,{type:"custom",from:{height:e},to:{height:t},duration:this.option("animationDuration"),easing:this.option("_animationEasing")}),m.done(()=>{n.hasClass("dx-accordion-item-opened")&&!r&&n.css("height",""),n.not(".dx-accordion-item-opened").addClass("dx-accordion-item-closed")})},_splitFreeSpace(n){return n&&n/this.option("selectedItems").length},_calculateFreeSpace(){const n=this.option("height");if(void 0===n||"auto"===n)return;const e=this._itemTitles();let t=0;return w.__(e,(i,r)=>{t+=(0,D.P$)(r)}),(0,D.Oq)(this.$element())-t},_visibilityChanged(n){n&&this._dimensionChanged()},_dimensionChanged(){this._updateItemHeights(!0)},_clean(){this._deferredTemplateItems.forEach(n=>{n.reject()}),this._deferredTemplateItems=[],clearTimeout(this._animationTimer),this.callBase()},_tryParseItemPropertyName(n){const e=n.match(/.*\.(.*)/);if((0,C.O9)(e)&&e.length>=1)return e[1]},_optionChanged(n){switch(n.name){case"items":this.callBase(n),"title"===this._tryParseItemPropertyName(n.fullName)&&this._renderSelection(this._getSelectedItemIndices(),[]),"visible"===this._tryParseItemPropertyName(n.fullName)&&this._updateItemHeightsWrapper(!0),!0===this.option("repaintChangesOnly")&&"items"===n.fullName&&(this._updateItemHeightsWrapper(!0),this._renderSelection(this._getSelectedItemIndices(),[]));break;case"animationDuration":case"onItemTitleClick":case"_animationEasing":break;case"collapsible":this.option("selectionRequired",!this.option("collapsible"));break;case"itemTitleTemplate":case"height":case"deferRendering":this._invalidate();break;case"multiple":this.option("selectionMode",n.value?"multiple":"single");break;default:this.callBase(n)}},expandItem(n){return this._deferredAnimate=(0,g.cY)(),this.selectItem(n),this._deferredAnimate.promise()},collapseItem(n){return this._deferredAnimate=(0,g.cY)(),this.unselectItem(n),this._deferredAnimate.promise()},updateDimensions(){return this._updateItemHeights(!1)}});(0,y.A)("dxAccordion",Q);const pe=Q;var z=M(8914);let ae=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,f.p_,f.xZ,z.POb,f.xZ]})}return n})();var ee=M(9055);const be=M(1010).A.inherit({_supportedKeys(){let n=this._list?this._list.option("focusedElement"):null;const e=this.callBase();return n=n&&(0,a.A)(n),(0,_.X)({},e,{upArrow(t){return!(e.upArrow.apply(this,arguments)&&!(0,N.By)(t)&&(t.preventDefault(),t.stopPropagation(),n&&!this._calcNextItem(-1))&&(this._clearFocusedItem(),1))},downArrow(t){return!(e.downArrow.apply(this,arguments)&&!(0,N.By)(t)&&(t.preventDefault(),t.stopPropagation(),n&&!this._calcNextItem(1))&&(this._clearFocusedItem(),1))},enter(t){n||this.close();const i=this.option("opened");return i&&t.preventDefault(),i}})},_getDefaultOptions(){return(0,_.X)(this.callBase(),{minSearchLength:1,maxItemCount:10,noDataText:"",showDropDownButton:!1,searchEnabled:!0})},_initMarkup(){this.callBase(),this.$element().addClass("dx-autocomplete")},_getAriaAutocomplete(){const{disabled:n,readOnly:e}=this.option();return e||n?"none":"list"},_displayGetterExpr(){return this.option("valueExpr")},_closeOutsideDropDownHandler(n){let{target:e}=n;return!(0,a.A)(e).closest(this.$element()).length},_renderDimensions(){this.callBase(),this._updatePopupWidth(),this._updateListDimensions()},_popupWrapperClass(){return`${this.callBase()} dx-autocomplete-popup-wrapper`},_listConfig(){return(0,_.X)(this.callBase(),{pageLoadMode:"none",onSelectionChanged:n=>{this._setSelectedItem(n.addedItems[0])}})},_listItemClickHandler(n){this._saveValueChangeEvent(n.event);const e=this._displayGetter(n.itemData);this.option("value",e),this.close()},_setListDataSource(){this._list&&(this._list.option("selectedItems",[]),this.callBase())},_refreshSelected:h.lQ,_searchCanceled(){this.callBase(),this.close()},_loadItem(n,e){const t=this._getItemFromPlain(n,e);return(0,g.cY)().resolve(t).promise()},_dataSourceOptions(){return{paginate:!0,pageSize:this.option("maxItemCount")}},_searchDataSource(n){this._dataSource.pageSize(this.option("maxItemCount")),this.callBase(n),this._clearFocusedItem()},_clearFocusedItem(){this._list&&(this._list.option("focusedElement",null),this._list.option("selectedIndex",-1))},_renderValueEventName:()=>"input keyup",_valueChangeEventHandler(n){const e=this._input().val()||null;return this.callBase(n,e)},_optionChanged(n){switch(n.name){case"readOnly":case"disabled":this.callBase(n),this._setDefaultAria();break;case"maxItemCount":this._searchDataSource();break;case"valueExpr":this._compileDisplayGetter(),this._setListOption("displayExpr",this._displayGetterExpr()),this.callBase(n);break;default:this.callBase(n)}},clear(){this.callBase(),this.close()},reset(){arguments.length?this.callBase(arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0):this.callBase(),this.close()}});(0,y.A)("dxAutocomplete",be);const le=be;var Ce=M(1491);const ye={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>ge),multi:!0};let ge=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get displayValue(){return this._getOption("displayValue")}set displayValue(t){this._setOption("displayValue",t)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(t){this._setOption("dropDownButtonTemplate",t)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(t){this._setOption("dropDownOptions",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get grouped(){return this._getOption("grouped")}set grouped(t){this._setOption("grouped",t)}get groupTemplate(){return this._getOption("groupTemplate")}set groupTemplate(t){this._setOption("groupTemplate",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(t){this._setOption("itemTemplate",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get maxItemCount(){return this._getOption("maxItemCount")}set maxItemCount(t){this._setOption("maxItemCount",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get minSearchLength(){return this._getOption("minSearchLength")}set minSearchLength(t){this._setOption("minSearchLength",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get opened(){return this._getOption("opened")}set opened(t){this._setOption("opened",t)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(t){this._setOption("openOnFieldClick",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(t){this._setOption("searchExpr",t)}get searchMode(){return this._getOption("searchMode")}set searchMode(t){this._setOption("searchMode",t)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(t){this._setOption("searchTimeout",t)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(t){this._setOption("selectedItem",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(t){this._setOption("showDropDownButton",t)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(t){this._setOption("spellcheck",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get useItemTextAsTitle(){return this._getOption("useItemTextAsTitle")}set useItemTextAsTitle(t){this._setOption("useItemTextAsTitle",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(t){this._setOption("valueExpr",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get wrapItemText(){return this._getOption("wrapItemText")}set wrapItemText(t){this._setOption("wrapItemText",t)}onChange;onClosed;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onItemClick;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onSelectionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;buttonsChange;dataSourceChange;deferRenderingChange;disabledChange;displayValueChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;focusStateEnabledChange;groupedChange;groupTemplateChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;itemsChange;itemTemplateChange;labelChange;labelModeChange;maxItemCountChange;maxLengthChange;minSearchLengthChange;nameChange;openedChange;openOnFieldClickChange;placeholderChange;readOnlyChange;rtlEnabledChange;searchExprChange;searchModeChange;searchTimeoutChange;selectedItemChange;showClearButtonChange;showDropDownButtonChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;useItemTextAsTitleChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;valueExprChange;visibleChange;widthChange;wrapItemTextChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayValueChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"groupedChange"},{emit:"groupTemplateChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxItemCountChange"},{emit:"maxLengthChange"},{emit:"minSearchLengthChange"},{emit:"nameChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchTimeoutChange"},{emit:"selectedItemChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useItemTextAsTitleChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapItemTextChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new le(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("dataSource",t),this.setupChanges("items",t),this.setupChanges("searchExpr",t),this.setupChanges("validationErrors",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("searchExpr"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-autocomplete"]],contentQueries:function(i,r,m){if(1&i&&(S.wni(m,z.BrI,4),S.wni(m,z.CVf,4)),2&i){let A;S.mGM(A=S.lsd())&&(r.buttonsChildren=A),S.mGM(A=S.lsd())&&(r.itemsChildren=A)}},hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayValue:"displayValue",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",grouped:"grouped",groupTemplate:"groupTemplate",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",items:"items",itemTemplate:"itemTemplate",label:"label",labelMode:"labelMode",maxItemCount:"maxItemCount",maxLength:"maxLength",minSearchLength:"minSearchLength",name:"name",opened:"opened",openOnFieldClick:"openOnFieldClick",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchTimeout:"searchTimeout",selectedItem:"selectedItem",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useItemTextAsTitle:"useItemTextAsTitle",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",valueExpr:"valueExpr",visible:"visible",width:"width",wrapItemText:"wrapItemText"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onItemClick:"onItemClick",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onSelectionChanged:"onSelectionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayValueChange:"displayValueChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",groupedChange:"groupedChange",groupTemplateChange:"groupTemplateChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxItemCountChange:"maxItemCountChange",maxLengthChange:"maxLengthChange",minSearchLengthChange:"minSearchLengthChange",nameChange:"nameChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchTimeoutChange:"searchTimeoutChange",selectedItemChange:"selectedItemChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useItemTextAsTitleChange:"useItemTextAsTitleChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapItemTextChange:"wrapItemTextChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,ye,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),fe=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.GIV,z.u4t,z.df_,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.isg,z.POb,f.p_,f.xZ,z.GIV,z.u4t,z.df_,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.isg,z.POb,f.xZ]})}return n})();var xe=M(6509);const Te={events:{mouseover:"mouseover",mouseout:"mouseout",mousemove:"mousemove",touchstart:"touchstart",touchmove:"touchmove",touchend:"touchend",mousedown:"mousedown",mouseup:"mouseup",click:"click",selectSeries:"selectseries",deselectSeries:"deselectseries",selectPoint:"selectpoint",deselectPoint:"deselectpoint",showPointTooltip:"showpointtooltip",hidePointTooltip:"hidepointtooltip"},states:{hover:"hover",normal:"normal",selection:"selection",normalMark:0,hoverMark:1,selectedMark:2,applyHover:"applyHover",applySelected:"applySelected",resetItem:"resetItem"},radialLabelIndent:30,pieLabelSpacing:10,pieSeriesSpacing:4},Ee=Math.round,Oe={horizontal:0,vertical:0},ze={center:.5,right:1,bottom:1,left:0,top:0};function $e(n){this._options=n}function Be(n,e){this._renderElement=n,this._cacheBBox=e}$e.prototype={constructor:$e,position:function(n){const e=n.of.getLayoutOptions(),t=this.getLayoutOptions(),i=n.at,r=n.my,m=n.offset||Oe,A=-ze[r.horizontal]*t.width+e.x+ze[i.horizontal]*e.width+parseInt(m.horizontal),V=-ze[r.vertical]*t.height+e.y+ze[i.vertical]*e.height+parseInt(m.vertical);this.shift(Ee(A),Ee(V))},getLayoutOptions:h.lQ};const Ue=Be.prototype=(0,xe.o8)($e.prototype);Ue.constructor=Be,Ue.getLayoutOptions=function(){return this._cacheBBox||this._renderElement.getBBox()},Ue.shift=function(n,e){const t=this.getLayoutOptions();this._renderElement.move(Ee(n-t.x),Ee(e-t.y))};const{floor:ot,sqrt:st}=Math,et=Math.min,Ke=Math.max,Pe=Te.radialLabelIndent;function Se(n,e,t){let i;return i=t<n?n:e<t?e:t,i}function Re(n){if(n._label.isVisible()&&"inside"!==n._label.getLayoutOptions().position)return n._label.getBoundingRect()}function Xe(n){return n.reduce(function(e,t){let i=t.getVisiblePoints().reduce(function(m,A){const V=Re(A);return V&&V.width>m&&(m=V.width),m},0),r=i;return i&&(e.outerLabelsCount++,e.outerLabelsCount>1&&(i+=Te.pieLabelSpacing),r+=Te.pieLabelSpacing),e.sizes.push(i),e.rSizes.push(r),e.common+=i,e},{sizes:[],rSizes:[],common:0,outerLabelsCount:0})}function tt(n,e,t,i,r,m){let A,V,X=0;const ce=n.sizes,_e=n.rSizes;for(V=0;V<t.length;V++)0!==ce[V]?(A=ot(A?A+_e[V-1]:e),t[V].correctLabelRadius(A),X+=r||ce[V],_e[V]=r||_e[V],t[V].setVisibleArea({left:ot(m-e-X),right:ot(i.width-(m+e+X)),top:i.top,bottom:i.bottom,width:i.width,height:i.height})):A&&(A+=_e[V-1])}function qe(n){let{type:e,innerRadius:t}=n;return"pie"===e?0:(0,C.kf)(t)?Number(t):.5}function At(){}function Tt(n,e,t,i){return(n-e-Pe-t.left)/i.outerLabelsCount}function wt(n,e,t,i,r,m){const A=Xe(t);let V;const X=function qt(n,e,t){return n-e.left-(t.outerLabelsCount>0?t.common+Pe:0)}(r,e,A);return X<i?V=Tt(r,n=i,e,A):n=et(function Fe(n,e,t,i,r){return n.some(function(m){return m.getVisiblePoints().reduce(function(A,V){const X=Re(V);if(X){const ce=Se(X.x,X.x+X.width,e),_e=Se(X.y,X.y+X.height,t);i=et(Ke(function vt(n,e,t,i){return st((n-t)*(n-t)+(e-i)*(e-i))}(ce,_e,e,t)-Pe,r),i),A=!0}return A},!1)}),i}(t,r,m,n,i),X),tt(A,n+Pe,t,e,V,r),n}function En(n){return new Be(null,{x:n.left,y:n.top,width:n.width-n.left-n.right,height:n.height-n.top-n.bottom})}At.prototype={constructor:At,setOptions:function(n){this._options=n},applyPieChartSeriesLayout:function(n,e,t){const i=n.height-n.top-n.bottom,r=n.width-n.left-n.right,m=r/2+n.left,A=i/2+n.top,V=this._options.piePercentage;let X,ce;return(0,C.kf)(V)?X=ce=V*et(n.height,n.width)/2:(X=et(r,i)/2,ce=this._options.minPiePercentage*X),t||(X=wt(X,n,e,ce,m,A)),{centerX:ot(m),centerY:ot(A),radiusInner:ot(X*qe(e[0])),radiusOuter:ot(X)}},applyEqualPieChartLayout:function(n,e){const t=e.radius;return{centerX:ot(e.x),centerY:ot(e.y),radiusInner:ot(t*qe(n[0])),radiusOuter:ot(t)}},correctPieLabelRadius:function(n,e,t){const i=Xe(n);let r;const m=e.radiusOuter+Pe;i.common+Pe>e.centerX-t.left-m&&(r=Tt(e.centerX,e.radiusOuter,t,i)),tt(i,m,n,t,r,e.centerX)},needMoreSpaceForPanesCanvas(n,e,t){const i=this._options,r=i.width,m=i.height,A=i.piePercentage,V=(0,C.kf)(A);let X=0,ce=0;return n.forEach(_e=>{const Me=_e.canvas,Ve=V?et(Me.width,Me.height)*A:void 0,Je=t?t(_e):{width:!1,height:!1},rt=Je.width?0:(V?Ve:r)-(Me.width-Me.left-Me.right),Ct=Je.height?0:(V?Ve:m)-(Me.height-Me.top-Me.bottom);e?(X+=rt>0?rt:0,ce=Ke(Ct>0?Ct:0,ce)):(X=Ke(rt>0?rt:0,X),ce+=Ct>0?Ct:0)}),(X>0||ce>0)&&{width:X,height:ce}},layoutInsideLegend:function(n,e){const t=n.getLayoutOptions();if(!t)return;const i=t.position,r=t.cutSide,m={horizontal:i.horizontal,vertical:i.vertical};e[t.cutLayoutSide]+="horizontal"===t.cutSide?t.width:t.height,m[r]={left:"right",right:"left",top:"bottom",bottom:"top",center:"center"}[m[r]],n.position({of:En(e),my:m,at:i})}};var ri=M(3012),Tn=M(676),Jn=M(851);const{PI:wi,LN10:Bn,abs:gi,log:Ai,floor:pt,ceil:Dt,pow:cn,sqrt:dt,atan2:Et}=Math,$n=(Math,Math.max),Ln=Math.cos,Nt=Math.sin,Gt=Math.round,on=Tn.A.dateToMilliseconds,sn=1e10,It=wi/180,Ot=isNaN,zt=Number;let Pn=1;const Ei=function(n,e){return n?Ai(n)/Ai(e):NaN},Hi=function(n){return(0,ri.Ai)(Ei(n,10))},mo=function(n,e){return cn(e,n)},xo=function(n){return(n%360+360)%360},vr=function(n){return 90-n},rn=function(n){return wi*n/180},en=function(n){const e=rn(n);return{cos:Ln(e),sin:Nt(e)}},Di=function(n,e,t,i){const r=t-n,m=i-e;return dt(m*m+r*r)},po=function(n){let t,e=gi(n);return Ot(e)?NaN:e>0?(e=Ai(e)/Bn,t=Dt(e),t-e<1e-14?t:pt(e)):0},Xo=function(n,e){if(e>20&&(e=20),(0,C.kf)(n))return(0,C.O4)(n)?zt(n.toExponential(e)):zt(n.toFixed(e))},Hn=function(n){return n.toExponential().split("e")[1]};function ui(n,e){let t=0;const i=n.length,r=[];let m;for(;t<i;)m=e(n[t],t),null!==m&&r.push(m),t++;return r}function Wi(n){return String(n).toLowerCase()}function Ko(n){return n&&(n.originalTop=n.top,n.originalBottom=n.bottom,n.originalLeft=n.left,n.originalRight=n.right),n}function Zo(n){return-sn<n&&n<+sn?n:0}function xr(n){const e=Zo(pt(n.x)),t=Zo(pt(n.y)),m={x:e,y:t,width:Zo(Dt(n.width+n.x))-e,height:Zo(Dt(n.height+n.y))-t};return m.isEmpty=!(m.x||m.y||m.width||m.height),m}function hr(n,e,t){const i=zt(Ln(t*It).toFixed(3)),r=zt(Nt(t*It).toFixed(3)),m=n.width/2,A=n.height/2,V=n.x+m,X=n.y+A,ce=gi(m*i)+gi(A*r),_e=gi(m*r)+gi(A*i);return xr({x:e[0]+(V-e[0])*i+(X-e[1])*r-ce,y:e[1]-(V-e[0])*r+(X-e[1])*i-_e,width:2*ce,height:2*_e})}const mn=function(n,e){return void 0!==n?n:e},pi=function(n){const e={};let t,i;for(t=0,i=n.length;t<i;++t)e[Wi(n[t])]=1;return function(r,m){const A=Wi(r);return e[A]?A:m}},Ti=function(n){const e={};return(0,w.__)(n||{},function(t,i){if(!/^(cursor)$/i.test(t))if("opacity"===t)i=null;else if("color"===t){if(t="fill","opacity"in n){const r=new Jn.A(i);i=`rgba(${r.r},${r.g},${r.b},${n.opacity})`}}else t="font-"+t;e[t]=i}),e};function lo(n,e,t,i){const r=i>0?i:0;t=(0,C.O9)(t)?t+e-90:0;const m=en(t);return{x:Gt(n.x+r*m.cos),y:Gt(n.y+r*m.sin)}}const Eo=function(n,e,t){const i=Di(n.x,n.y,e,t),r=Et(t-n.y,e-n.x);return{phi:Gt(xo(180*r/wi)),r:Gt(i)}},Jo=function(n,e){const t=(0,C.Tn)(n.customizeSeries)?n.customizeSeries:h.lQ,i=n.nameField,r={},m=[];let A,X,ce,V=0;for(X=(e=e||[]).length;V<X;V++)ce=e[V],i in ce&&(A=r[ce[i]],A||(A=r[ce[i]]={name:ce[i],nameFieldValue:ce[i]},m.push(A.name)));return ui(m,function(_e){const Me=r[_e];return(0,_.X)(Me,t.call(null,Me.name))})},fr=function(n,e,t){if(0===n.length)return{categories:[]};e=(0,C.O9)(e)?e:n[0],t=(0,C.O9)(t)?t:n[n.length-1];const i=ui(n,_e=>_e?.valueOf());let A,r=i.indexOf(e.valueOf()),m=i.indexOf(t.valueOf()),V=!1;r<0&&(r=0),m<0&&(m=n.length-1),m<r&&(A=m,m=r,r=A,V=!0);const X=n.slice(r,m+1),ce=X.length-1;return{categories:X,start:X[V?ce:0],end:X[V?0:ce],inverted:V}};function Gr(n){return!(n.unit%2)}const Ii=function(n){const e={};return ui(n,function(t){const i=e[t]?null:t;return e[t]=!0,i})},co=function(n,e,t){const i=n.x+n.width/2>=t.x,r=(i?n.x:n.x+n.width)-t.x,m=n.y-t.y,A=m+e,V=Gt(dt(r*r+m*m-A*A)),X=(i?+V:-V)||r;return{x:t.x+(i?X:X-n.width),y:n.y+e}};function ko(n,e){return{checkInterval:n.checkInterval||e.checkInterval,size:$n(n.size||0,e.size||0),percentStick:n.percentStick||e.percentStick,sizePointNormalState:$n(n.sizePointNormalState||0,e.sizePointNormalState||0)}}function er(n){return Array.isArray(n)?{startValue:n[0],endValue:n[1]}:n||{}}function or(n,e,t,i,r,m){let A,V=!0;const X=Xo(m,3)-Xo(r,3);return X&&(gi(X)%360==0&&(r=0,m=360,A=!0,m-=.01),r>360&&(r%=360),m>360&&(m%=360),r>m&&(r-=360),V=!1),r*=It,m*=It,[n,e,Math.min(i,t),Math.max(i,t),Math.cos(r),Math.sin(r),Math.cos(m),Math.sin(m),A,pt(gi(m-r)/wi)%2?"1":"0",V]}function Jr(n,e){return e?n:[n.startValue,n.endValue]}function Wr(n,e){return"datetime"===n.dataType?function(t,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new Date(t.getTime()+r*i)}:"logarithmic"===n.axisType?function(t,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return dn(Mr(t,n.base)+r*i,n.base)}:function(t,i){const m=t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)*i;return e&&m*t<=0?0:m}}function Xr(n,e,t,i){const r=(0,C.O9)(e.startValue),m=(0,C.O9)(e.endValue),A="discrete"!==n.axisType;i=i||t;const V=Wr(n,!1);let X=r?e.startValue:i.min,ce=m?e.endValue:i.max,_e=e.length;const Me=i.categories;if(A&&!(0,C.O9)(X)&&!(0,C.O9)(ce))return{startValue:X,endValue:ce};if((0,C.O9)(_e))if(A)"datetime"===n.dataType&&!(0,C.kf)(_e)&&(_e=on(_e)),m&&!r||!m&&!r?((0,C.O9)(t.max)&&(ce=ce>t.max?t.max:ce),X=V(ce,_e,-1)):r&&!m&&((0,C.O9)(t.min)&&(X=X<t.min?t.min:X),ce=V(X,_e));else if(_e=parseInt(_e),!isNaN(_e)&&isFinite(_e))if(_e--,m||r){if(r&&!m)ce=fr(Me,X,void 0).categories[_e];else if(!r&&m){const Ve=fr(Me,void 0,ce);X=Ve.categories[Ve.categories.length-1-_e]}}else ce=Me[Me.length-1],X=Me[Me.length-1-_e];return A&&((0,C.O9)(t.max)&&ce>t.max&&(ce=t.max),(0,C.O9)(t.min)&&X<t.min&&(X=t.min)),{startValue:X,endValue:ce}}function Mr(n,e){let i=arguments.length>3?arguments[3]:void 0;if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2]))return Ei(n,e);if(0===n)return 0;const r=Ei(gi(n),e)-(i-1);return r<0?0:(0,ri.Ai)((0,ri._S)(n)*r,Number(cn(e,i-1).toFixed(gi(i))))}function dn(n,e){let i=arguments.length>3?arguments[3]:void 0;if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2]))return mo(n,e);if(0===n)return 0;const r=mo(gi(n)+(i-1),e);return r<0?0:(0,ri.Ai)((0,ri._S)(n)*r,Number(cn(e,i).toFixed(gi(i))))}function an(n,e){return Array.isArray(e)?n.length===e.length&&n.every((t,i)=>_n(t)===_n(e[i])):_n(n.startValue)===_n(e.startValue)&&_n(n.endValue)===_n(e.endValue)}function _n(n){return n&&n.valueOf()}function Wt(n,e,t){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom}const zn=()=>"DevExpress_"+Pn++;function mi(n,e){return(0,C.Kg)(n)||!n?n:e?n.base:n.fillId||n.base}var Si=M(9209),go=M(7251);const No=Math.floor,Sr=Te.events,pr=Te.states,Vr=pr.hoverMark,Lt=pr.normalMark,bn="dxChartTracker",jn="."+bn,Ci=(0,N.b4)([Si.A.down,Si.A.move],bn),Mi="legendClick",Ki="seriesClick",bt="pointClick",gn="chart-data-point",Kt="chart-data-series",Mn="chart-data-argument",rr=["includepoints","excludepoints","none"];function Pr(n,e,t){const i=n.target;if("tspan"===i.tagName)return i.parentNode[e];const r=i[e];if(t&&!(0,C.O9)(r)){const m=function(A){if(A.parentNode)return(0,C.O9)(A.parentNode[e])?A.parentNode[e]:m(A.parentNode)};return m(i)}return r}function wr(n,e,t){let{event:i,cancel:r}=n;const m=i.cancel,A=r||m;return m&&go.A.log("W0003",`${t}Click handler argument`,"event.cancel","22.1","Use the 'cancel' field instead"),A||!e.getOptions()}function os(n){const e=n.getOptions().hoverMode;return"none"===e?e:"allargumentpoints"}const fs={ctor:function(n){const e=this,t={tracker:e};e._renderer=n.renderer,e._legend=n.legend,e._tooltip=n.tooltip,e._eventTrigger=n.eventTrigger,e._seriesGroup=n.seriesGroup,n.seriesGroup.off(jn).on((0,N.b4)(Sr.showPointTooltip,bn),t,e._showPointTooltip).on((0,N.b4)(Sr.hidePointTooltip,bn),t,e._hidePointTooltip),e._renderer.root.off(jn).on(Ci,t,e._pointerHandler).on((0,N.b4)(Si.A.up,bn),()=>clearTimeout(e._holdTimer)).on((0,N.b4)(I.U,bn),t,e._clickHandler)},update:function(n){this._chart=n.chart},updateSeries(n,e){const t=this,i=!(null!=n&&n.some(r=>r===t.hoveredSeries)||t._hoveredPoint&&t._hoveredPoint.series);t._storedSeries!==n&&(t._storedSeries=n||[]),i&&(t._clean(),t._renderer.initDefsElements()),e&&(t.clearSelection(),i||(t._hideTooltip(t.pointAtShownTooltip),t.clearHover()))},setCanvases:function(n,e){this._mainCanvas=n,this._canvases=e},repairTooltip:function(){const n=this.pointAtShownTooltip;n&&n.series&&n.isVisible()?this._showTooltip(n):this._hideTooltip(n,!0)},_setHoveredPoint:function(n){n!==this._hoveredPoint&&(this._releaseHoveredPoint(),n.hover(),this._hoveredPoint=n)},_releaseHoveredPoint:function(n){this._hoveredPoint&&this._hoveredPoint.getOptions()&&(this._hoveredPoint.clearHover(),this._hoveredPoint=null,this._tooltip.isEnabled()&&this._hideTooltip(this._hoveredPoint,!1,n))},_setHoveredSeries:function(n,e){this._releaseHoveredSeries(),this._releaseHoveredPoint(),n.hover(e),this.hoveredSeries=n},_releaseHoveredSeries(){this.hoveredSeries&&(this.hoveredSeries.clearHover(),this.hoveredSeries=null)},clearSelection(){this._storedSeries.forEach(n=>{n&&(n.clearSelection(),n.getPoints().forEach(e=>e.clearSelection()))})},_clean:function(){this.hoveredPoint=this.hoveredSeries=this._hoveredArgumentPoints=null,this._hideTooltip(this.pointAtShownTooltip)},clearHover:function(n){this._resetHoveredArgument(),this._releaseHoveredSeries(),this._releaseHoveredPoint(n)},_hideTooltip:function(n,e,t){const i=this;!i._tooltip||n&&i.pointAtShownTooltip!==n||(!e&&i.pointAtShownTooltip&&(i.pointAtShownTooltip=null),i._tooltip.hide(!!t))},_showTooltip:function(n){const e=this;let t;const i={target:n};if(null!=n&&n.getOptions()){if(t=n.getTooltipFormatObject(e._tooltip,e._tooltip.isShared()&&e._chart.getStackedPoints(n)),!(0,C.O9)(t.valueText)&&!t.points||!n.isVisible())return;const r=n.getTooltipParams(e._tooltip.getLocation()),m=e._renderer.getRootOffset();r.x+=m.left,r.y+=m.top;const A=V=>{V&&(e.pointAtShownTooltip=n)};A(e._tooltip.show(t,r,i,void 0,A))}},_showPointTooltip:function(n,e){const t=n.data.tracker,i=t.pointAtShownTooltip;i&&i!==e&&t._hideTooltip(i),t._showTooltip(e)},_hidePointTooltip:function(n,e){n.data.tracker._hideTooltip(e,!1,!0)},_enableOutHandler:function(){if(this._outHandler)return;const n=this,e=function(t){const i=n._renderer.getRootOffset(),r=No(t.pageX-i.left),m=No(t.pageY-i.top);!Wt(n._mainCanvas,r,m)&&!n._isCursorOnTooltip(t)&&(n._pointerOut(),n._disableOutHandler())};L.A.on(c.A.getDocument(),Ci,e),this._outHandler=e},_isCursorOnTooltip:function(n){return this._tooltip.isEnabled()&&this._tooltip.isCursorOnTooltip(n.pageX,n.pageY)},_disableOutHandler:function(){this._outHandler&&L.A.off(c.A.getDocument(),Ci,this._outHandler),this._outHandler=null},stopCurrentHandling:function(){this._pointerOut(!0)},_pointerOut:function(n){this.clearHover(!0),(n||this._tooltip.isEnabled())&&this._hideTooltip(this.pointAtShownTooltip,!1,!0)},_triggerLegendClick:function(n,e){const t=this._eventTrigger;t(Mi,n,function(){!wr(n,n.target,"legend")&&t(e,n)})},_hoverLegendItem:function(n,e){const t=this,i=t._legend.getItemByCoord(n,e);let r;const m=function Fo(n){return rr.indexOf(n)>-1?n:"includepoints"}(t._legend.getOptions().hoverMode);i?(r=t._storedSeries[i.id],(!r.isHovered()||r.lastHoverMode!==m)&&t._setHoveredSeries(r,m),t._tooltip.isEnabled()&&t._hideTooltip(t.pointAtShownTooltip)):t.clearHover()},_hoverArgument:function(n,e){const t=this,i=t._getArgumentHoverMode();(0,C.O9)(n)&&(t._releaseHoveredPoint(),t._hoveredArgument=n,t._argumentIndex=e,t._notifySeries({action:"pointHover",notifyLegend:t._notifyLegendOnHoverArgument,target:{argument:n,fullState:Vr,argumentIndex:e,getOptions:function(){return{hoverMode:i}}}}))},_resetHoveredArgument:function(){const n=this;let e;(0,C.O9)(n._hoveredArgument)&&(e=n._getArgumentHoverMode(),n._notifySeries({action:"clearPointHover",notifyLegend:n._notifyLegendOnHoverArgument,target:{fullState:Lt,argumentIndex:n._argumentIndex,argument:n._hoveredArgument,getOptions:function(){return{hoverMode:e}}}}),n._hoveredArgument=null)},_notifySeries:function(n){this._storedSeries.forEach(function(e){e.notify(n)})},_pointerHandler:function(n){var e;const t=n.data.tracker,i=t._renderer.getRootOffset(),r=No(n.pageX-i.left),m=No(n.pageY-i.top),A=t._getCanvas(r,m);let V=Pr(n,Kt),X=Pr(n,gn)||(null===(e=V)||void 0===e?void 0:e.getPointByCoord(r,m));if(t._isHolding=!1,clearTimeout(t._holdTimer),n.type===Si.A.down&&(t._holdTimer=setTimeout(()=>t._isHolding=!0,300)),X&&!X.getMarkerVisibility()&&(X=void 0),t._enableOutHandler(),t._legend.coordsIn(r,m))t._hoverLegendItem(r,m);else if(t.hoveredSeries&&t.hoveredSeries!==t._stuckSeries&&t._releaseHoveredSeries(),!t._hoverArgumentAxis(r,m,n)&&(t._isPointerOut(A,X)&&t._pointerOut(),A||X)){if(V&&!X){if(X=V.getNeighborPoint(r,m),!t._stickyHovering&&X&&!X.coordsIn(r,m)&&(X=null),V!==t.hoveredSeries)return void t._setTimeout(function(){t._setHoveredSeries(V),t._setStuckSeries(n,V,r,m),t._pointerComplete(X,r,m)},V)}else{if(X){if(n.type!==Si.A.move&&"touch"!==n.pointerType)return;return void(t.hoveredSeries?t._setTimeout(()=>t._pointerOnPoint(X,r,m,n),X):t._pointerOnPoint(X,r,m,n))}var ce;t._setStuckSeries(n,void 0,r,m)&&t._stickyHovering?(V=t._stuckSeries,X=V.getNeighborPoint(r,m),t._releaseHoveredSeries(),null!==(ce=X)&&void 0!==ce&&ce.getMarkerVisibility()&&t._setHoveredPoint(X)):t._stickyHovering||t._pointerOut()}t._pointerComplete(X,r,m)}},_pointerOnPoint:function(n,e,t){this._resetHoveredArgument(),this._setHoveredPoint(n),this._pointerComplete(n,e,t)},_pointerComplete:function(n){this.pointAtShownTooltip!==n&&this._tooltip.isEnabled()&&this._showTooltip(n)},_clickHandler:function(n){var e;const t=n.data.tracker;if(t._isHolding)return;const i=t._renderer.getRootOffset(),r=No(n.pageX-i.left),m=No(n.pageY-i.top);let A=Pr(n,gn);const V=t._stuckSeries||Pr(n,Kt)||(null===(e=A)||void 0===e?void 0:e.series),X=t._argumentAxis;if(t._legend.coordsIn(r,m)){const _e=t._legend.getItemByCoord(r,m);_e&&t._legendClick(_e,n)}else if(null!=X&&X.coordsIn(r,m)){const _e=Pr(n,Mn,!0);(0,C.O9)(_e)&&t._eventTrigger("argumentAxisClick",{argument:_e,event:n})}else if(V){var ce;A=A||V.getPointByCoord(r,m),null!==(ce=A)&&void 0!==ce&&ce.getMarkerVisibility()?t._pointClick(A,n):Pr(n,Kt)&&t._eventTrigger(Ki,{target:V,event:n})}},dispose:function(){this._disableOutHandler(),this._renderer.root.off(jn),this._seriesGroup.off(jn)}},js=function(n){this.ctor(n)};(0,_.X)(js.prototype,fs,{_pointClick:function(n,e){const t=this._eventTrigger,i=n.series,r={target:n,event:e};t(bt,r,function(){!wr(r,i,"point")&&t(Ki,{target:i,event:e})})},update:function(n){fs.update.call(this,n),this._argumentAxis=n.argumentAxis||{},this._axisHoverEnabled=this._argumentAxis&&"allargumentpoints"===Wi(this._argumentAxis.getOptions().hoverMode),this._rotated=n.rotated,this._crosshair=n.crosshair,this._stickyHovering=n.stickyHovering},_getCanvas:function(n,e){const t=this._canvases||[];for(let i=0;i<t.length;i++){const r=t[i];if(Wt(r,n,e))return r}return null},_isPointerOut:function(n){return!n&&this._stuckSeries},_hideCrosshair:function(){var n;null===(n=this._crosshair)||void 0===n||n.hide()},_moveCrosshair:function(n,e,t){this._crosshair&&null!=n&&n.isVisible()&&this._crosshair.show({point:n,x:e,y:t})},_clean:function(){fs._clean.call(this),this._resetTimer(),this._stuckSeries=null},_getSeriesForShared:function(n,e){var t;const i=this,r=[];let m=null,A=1/0;return i._tooltip.isShared()&&!i.hoveredSeries&&((0,w.__)(i._storedSeries,function(V,X){const ce=X.getNeighborPoint(n,e);ce&&r.push(ce)}),(0,w.__)(r,function(V,X){const ce=X.getCrosshairData(n,e),_e=Di(n,e,ce.x,ce.y);_e<A&&(m=X,A=_e)})),null===(t=m)||void 0===t?void 0:t.series},_setTimeout:function(n,e){const t=this;t._timeoutKeeper!==e&&(t._resetTimer(),t._hoverTimeout=setTimeout(function(){n(),t._timeoutKeeper=null},100),t._timeoutKeeper=e)},_resetTimer:function(){clearTimeout(this._hoverTimeout),this._timeoutKeeper=this._hoverTimeout=null},_stopEvent:function(n){(!(0,C.O9)(n.cancelable)||n.cancelable)&&(n.preventDefault(),n.stopPropagation())},_setStuckSeries:function(n,e,t,i){return this._stuckSeries="mouse"!==n.pointerType?null:e||this._stuckSeries||this._getSeriesForShared(t,i),!!this._stuckSeries},_pointerOut:function(){this._stuckSeries=null,this._hideCrosshair(),this._resetTimer(),fs._pointerOut.apply(this,arguments)},_hoverArgumentAxis:function(n,e,t){const i=this;if(i._resetHoveredArgument(),i._axisHoverEnabled&&i._argumentAxis.coordsIn(n,e))return i._hoverArgument(Pr(t,Mn,!0)),!0},_pointerComplete:function(n,e,t){this.hoveredSeries&&this.hoveredSeries.updateHover(e,t),this._resetTimer(),this._moveCrosshair(n,e,t),fs._pointerComplete.call(this,n)},_legendClick:function(n,e){this._triggerLegendClick({target:this._storedSeries[n.id],event:e},Ki)},_hoverLegendItem:function(n,e){this._stuckSeries=null,this._hideCrosshair(),fs._hoverLegendItem.call(this,n,e)},_pointerOnPoint:function(n,e,t,i){this._setStuckSeries(i,n.series,e,t),this._releaseHoveredSeries(),fs._pointerOnPoint.call(this,n,e,t,i)},_notifyLegendOnHoverArgument:!1,_getArgumentHoverMode:function(){return os(this._argumentAxis)},dispose:function(){this._resetTimer(),fs.dispose.call(this)}});const Ta=function(n){this.ctor(n)};(0,_.X)(Ta.prototype,fs,{_isPointerOut:function(n,e){return!e},_legendClick:function(n,e){const t=[];this._storedSeries.forEach(i=>t.push.apply(t,i.getPointsByKeys(n.argument,n.argumentIndex))),this._eventTrigger(Mi,{target:n.argument,points:t,event:e})},_pointClick:function(n,e){this._eventTrigger(bt,{target:n,event:e})},_hoverLegendItem:function(n,e){const t=this,i=t._legend.getItemByCoord(n,e);i&&t._hoveredArgument!==i.argument?(t._resetHoveredArgument(),t._hoverArgument(i.argument,i.argumentIndex)):i||t.clearHover()},_getArgumentHoverMode:function(){return os(this._legend)},_hoverArgumentAxis:h.lQ,_setStuckSeries:h.lQ,_getCanvas:h.lQ,_notifyLegendOnHoverArgument:!0});var es=M(3538);const gs=Math.floor,Ca=Math.ceil,Ga=Array.isArray,Fi=50,ct="material",nn={[ct]:{simpleSet:["#1db2f5","#f5564a","#97c95c","#ffc720","#eb3573","#a63db8"],indicatingSet:["#97c95c","#ffc720","#f5564a"],gradientSet:["#1db2f5","#97c95c"],accentColor:"#1db2f5"},office:{simpleSet:["#5f8b95","#ba4d51","#af8a53","#955f71","#859666","#7e688c"],indicatingSet:["#a3b97c","#e1b676","#ec7f83"],gradientSet:["#5f8b95","#ba4d51"],accentColor:"#ba4d51"},"harmony light":{simpleSet:["#fcb65e","#679ec5","#ad79ce","#7abd5c","#e18e92","#b6d623","#b7abea","#85dbd5"],indicatingSet:["#b6d623","#fcb65e","#e18e92"],gradientSet:["#7abd5c","#fcb65e"],accentColor:"#679ec5"},"soft pastel":{simpleSet:["#60a69f","#78b6d9","#6682bb","#a37182","#eeba69","#90ba58","#456c68","#7565a4"],indicatingSet:["#90ba58","#eeba69","#a37182"],gradientSet:["#78b6d9","#eeba69"],accentColor:"#60a69f"},pastel:{simpleSet:["#bb7862","#70b3a1","#bb626a","#057d85","#ab394b","#dac599","#153459","#b1d2c6"],indicatingSet:["#70b3a1","#dac599","#bb626a"],gradientSet:["#bb7862","#70b3a1"],accentColor:"#bb7862"},bright:{simpleSet:["#70c92f","#f8ca00","#bd1550","#e97f02","#9d419c","#7e4452","#9ab57e","#36a3a6"],indicatingSet:["#70c92f","#f8ca00","#bd1550"],gradientSet:["#e97f02","#f8ca00"],accentColor:"#e97f02"},soft:{simpleSet:["#cbc87b","#9ab57e","#e55253","#7e4452","#e8c267","#565077","#6babac","#ad6082"],indicatingSet:["#9ab57e","#e8c267","#e55253"],gradientSet:["#9ab57e","#e8c267"],accentColor:"#565077"},ocean:{simpleSet:["#75c099","#acc371","#378a8a","#5fa26a","#064970","#38c5d2","#00a7c6","#6f84bb"],indicatingSet:["#c8e394","#7bc59d","#397c8b"],gradientSet:["#acc371","#38c5d2"],accentColor:"#378a8a"},vintage:{simpleSet:["#dea484","#efc59c","#cb715e","#eb9692","#a85c4c","#f2c0b5","#c96374","#dd956c"],indicatingSet:["#ffe5c6","#f4bb9d","#e57660"],gradientSet:["#efc59c","#cb715e"],accentColor:"#cb715e"},violet:{simpleSet:["#d1a1d1","#eeacc5","#7b5685","#7e7cad","#a13d73","#5b41ab","#e287e2","#689cc1"],indicatingSet:["#d8e2f6","#d0b2da","#d56a8a"],gradientSet:["#eeacc5","#7b5685"],accentColor:"#7b5685"},carmine:{simpleSet:["#fb7764","#73d47f","#fed85e","#d47683","#dde392","#757ab2"],indicatingSet:["#5cb85c","#f0ad4e","#d9534f"],gradientSet:["#fb7764","#73d47f"],accentColor:"#f05b41"},"dark moon":{simpleSet:["#4ddac1","#f4c99a","#80dd9b","#f998b3","#4aaaa0","#a5aef1"],indicatingSet:["#59d8a4","#f0ad4e","#f9517e"],gradientSet:["#4ddac1","#f4c99a"],accentColor:"#3debd3"},"soft blue":{simpleSet:["#7ab8eb","#97da97","#facb86","#e78683","#839bda","#4db7be"],indicatingSet:["#5cb85c","#f0ad4e","#d9534f"],gradientSet:["#7ab8eb","#97da97"],accentColor:"#7ab8eb"},"dark violet":{simpleSet:["#9c63ff","#64c064","#eead51","#d2504b","#4b6bbf","#2da7b0"],indicatingSet:["#5cb85c","#f0ad4e","#d9534f"],gradientSet:["#9c63ff","#64c064"],accentColor:"#9c63ff"},"green mist":{simpleSet:["#3cbab2","#8ed962","#5b9d95","#efcc7c","#f1929f","#4d8dab"],indicatingSet:["#72d63c","#ffc852","#f74a5e"],gradientSet:["#3cbab2","#8ed962"],accentColor:"#3cbab2"}};let kn;function si(n){if(void 0===n)return kn||ct;n=Wi(n),kn=n in nn?n:void 0}function Ni(n,e){let t;e=e||{},n=n||(void 0===kn?e.themeDefault:si());const i=e.type;return Ga(n)?n.slice(0):((0,C.Kg)(n)&&(t=nn[Wi(n)]),t||(t=nn[si()]),i?t[i].slice(0):t)}function Vo(n){let e=0;this.next=function(){const t=n[e++];return e===n.length&&this.reset(),t},this.reset=function(){e=0}}function ms(n,e,t){const i={dispose(){this._extensionStrategy=null},getNextColor(A){return this._extensionStrategy.getColor(this._currentColor++,A)},generateColors(A,V){return this._extensionStrategy.generateColors(A,(V||{}).repeat)},reset(){return this._currentColor=0,this._extensionStrategy.reset(),this}},r=((e=e||{}).extensionMode||"").toLowerCase(),m=Ni(n,{type:e.type||"simpleSet",themeDefault:t});return i._extensionStrategy="alternate"===r?function Go(n,e){const t=e.useHighlight?Fi:0,i=new Vo([0,t,-t]);let r=[];function m(){const A=i.next();r=A?function rs(n,e){const t=[];let i;const r=n.length;for(i=0;i<r;++i)t.push($r(n[i],e));return t}(n,A):n.slice(0)}return{getColor:function(A){const V=r[A%n.length];return A%n.length==n.length-1&&m(),V},generateColors:function(A){const V=[];A=A||e.count;for(let X=0;X<A;X++)V.push(this.getColor(X));return V},reset:function(){i.reset(),m()}}}(m,e):"extrapolate"===r?function Er(n,e){return{getColor:function(t,i){const r=n.length,m=gs((i-1)/r+1),A=n[t%r];return m>1?function(V,X,ce){const _e=new Jn.A(V).hsl;let Me=_e.l/100;const Ve=ce-1/ce;let Je=Me-.5*Ve,rt=Me+.5*Ve;const Ct=(ce-1)/2,Xt=X-Ct;return Je<Math.min(.5,.9*Me)&&(Je=Math.min(.5,.9*Me)),rt>Math.max(.8,Me+.15*(1-Me))&&(rt=Math.max(.8,Me+.15*(1-Me))),Xt<0?Me-=(Je-Me)*Xt/Ct:Me+=Xt/Ct*(rt-Me),_e.l=100*Me,Jn.A.prototype.fromHSL(_e).toHex()}(A,gs(t/r),m):A},generateColors:function(t){const i=[];t=t||e.count;for(let r=0;r<t;r++)i.push(this.getColor(r,t));return i},reset:function(){}}}(m,e):function Ts(n,e){const t=n.length;let i=[];function r(V,X,ce,_e){const Me=Math.floor(V/X);let rt,Ct,Ve=V-X*Me,Je=ce;for(;Je<ce+V;)Ct=Me,Ve>0&&(Ct+=1,Ve--),rt=Ct>2?Math.floor(Ct/2):0,_e.push(Je+rt),Je+=Ct;return _e.sort(function(Xt,On){return Xt-On})}function m(V,X,ce){let _e=0;for(let Me=X=(ce+X)%ce;Me<2*ce;Me+=1){const Ve=(ce+Me)%ce;if(V[Ve])return[V[Ve],_e];_e++}}function A(V){if(V<=t)return n;let X=[],_e=0,Me=[];Me=e.keepLastColorInEnd?r(V-2,t-2,1,[0,V-1]):r(V-1,t-1,1,[0]);for(let Ve=0;Ve<V;Ve++)Me.indexOf(Ve)>-1&&(X[Ve]=n[_e++]);return X=function(Ve,Je){for(let rt=0;rt<Je;rt++)if(!Ve[rt]){let Xt=Ve[rt-1];if(!Xt)continue;{const On=m(Ve,rt,Je),Fn=new Jn.A(On[0]);Xt=new Jn.A(Xt);for(let oi=0;oi<On[1];oi++,rt++)Ve[rt]=Xt.blend(Fn,(oi+1)/(On[1]+1)).toHex()}}return Ve}(X,V),X}return{getColor:function(V,X){return i.length!==(X=X||e.count||t)&&(i=A(X)),i[V%X]},generateColors:function(V,X){if(V=V||e.count||t,X&&V>t){const ce=A(t);for(let _e=0;_e<V-t;_e++)ce.push(ce[_e]);return ce}return t>0?A(V).slice(0,V):[]},reset:function(){}}}(m,e),i.reset(),i}function $r(n,e){let t=new Jn.A(n).alter(e);const i=function Qa(n){return.3*n.r+.59*n.g+.11*n.b}(t);return(i>200||i<55)&&(t=new Jn.A(n).alter(-e/2)),t.toHex()}var Lo=M(5737);const Ms="#ffffff",cl="#000000",Fs="#d3d3d3",Hl="#303030",nd="#ff0000",Cn="#232323",vn="#767676",Ht="none",Kn="solid",yi="top",Dr="right",us="bottom",la="left",ya="center",Wa="inside",ft="outside",Nn={funnel:{sortData:!0,valueField:"val",colorField:"color",argumentField:"arg",hoverEnabled:!0,selectionMode:"single",item:{border:{visible:!1,width:2,color:Ms},hoverStyle:{hatching:{opacity:.75,step:6,width:2,direction:Dr},border:{}},selectionStyle:{hatching:{opacity:.5,step:6,width:2,direction:Dr},border:{}}},title:{margin:10},adaptiveLayout:{width:80,height:80,keepLabels:!0},legend:{visible:!1},_rtl:{legend:{itemTextPosition:la}},tooltip:{customizeTooltip:n=>({text:`${n.item.argument} ${n.valueText}`})},inverted:!1,algorithm:"dynamicSlope",neckWidth:0,neckHeight:0,resolveLabelOverlapping:"shift",label:{textOverflow:"ellipsis",wordWrap:"normal",visible:!0,horizontalAlignment:Dr,horizontalOffset:0,verticalOffset:0,showForZeroValues:!1,customizeText:n=>`${n.item.argument} ${n.valueText}`,position:"columns",font:{color:Ms},border:{visible:!1,width:1,color:Fs,dashStyle:Kn},connector:{visible:!0,width:1,opacity:.5}}}},uo={sankey:{sourceField:"source",targetField:"target",weightField:"weight",hoverEnabled:!0,alignment:ya,adaptiveLayout:{width:80,height:80,keepLabels:!0},label:{visible:!0,horizontalOffset:8,verticalOffset:0,overlappingBehavior:"ellipsis",useNodeColors:!1,font:{color:cl,weight:500},border:{visible:!1,width:2,color:Ms},customizeText:n=>n.title,shadow:{opacity:.2,offsetX:0,offsetY:1,blur:1,color:Ms}},title:{margin:10,font:{size:28,weight:200},subtitle:{font:{size:16}}},tooltip:{enabled:!0},node:{padding:30,width:8,opacity:1,border:{color:Ms,width:1,visible:!1},hoverStyle:{hatching:{opacity:.75,step:6,width:2,direction:Dr},border:{}}},link:{color:"#888888",colorMode:"none",opacity:.3,border:{color:Ms,width:1,visible:!1},hoverStyle:{opacity:.5,hatching:{opacity:.75,step:6,width:2,direction:Dr},border:{}}}}},Wo=[{baseThemeName:void 0,theme:(0,Lo.A)({name:"generic.light",isDefault:!0,font:{color:vn,family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif",weight:400,size:12,cursor:"default"},redrawOnResize:!0,backgroundColor:Ms,primaryTitleColor:Cn,secondaryTitleColor:vn,gridColor:Fs,axisColor:vn,title:{backgroundColor:Ms,font:{size:28,family:"'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif",weight:200},subtitle:{font:{size:16},offset:0,wordWrap:"normal",textOverflow:"ellipsis"},wordWrap:"normal",textOverflow:"ellipsis"},loadingIndicator:{text:"Loading..."},export:{backgroundColor:Ms,margin:10,font:{size:14,color:Cn,weight:400},button:{margin:{top:8,left:10,right:10,bottom:8},default:{color:"#333",borderColor:"#ddd",backgroundColor:Ms},hover:{color:"#333",borderColor:"#bebebe",backgroundColor:"#e6e6e6"},focus:{color:cl,borderColor:"#9d9d9d",backgroundColor:"#e6e6e6"},active:{color:"#333",borderColor:"#9d9d9d",backgroundColor:"#d4d4d4"}},shadowColor:Fs},tooltip:{enabled:!1,border:{width:1,color:Fs,dashStyle:Kn,visible:!0},font:{color:Cn},color:Ms,arrowLength:10,paddingLeftRight:18,paddingTopBottom:15,textAlignment:"center",shared:!1,location:ya,shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:cl},interactive:!1},legend:{hoverMode:"includePoints",verticalAlignment:yi,horizontalAlignment:Dr,position:ft,visible:!0,margin:10,markerSize:12,border:{visible:!1,width:1,cornerRadius:0,dashStyle:Kn},paddingLeftRight:20,paddingTopBottom:15,columnCount:0,rowCount:0,columnItemSpacing:20,rowItemSpacing:8,title:{backgroundColor:Ms,margin:{left:0,bottom:9,right:0,top:0},font:{size:18,weight:200},subtitle:{offset:0,font:{size:14},wordWrap:"none",textOverflow:"ellipsis"},wordWrap:"none",textOverflow:"ellipsis"}}},{"chart:common":{animation:{enabled:!0,duration:1e3,easing:"easeOutCubic",maxPointCountSupported:300},commonSeriesSettings:{border:{visible:!1,width:2},showInLegend:!0,visible:!0,hoverMode:"nearestPoint",selectionMode:"includePoints",hoverStyle:{hatching:{direction:Dr,width:2,step:6,opacity:.75},highlight:!0,border:{visible:!1,width:3}},selectionStyle:{hatching:{direction:Dr,width:2,step:6,opacity:.5},highlight:!0,border:{visible:!1,width:3}},valueErrorBar:{displayMode:"auto",value:1,color:cl,lineWidth:2,edgeLength:8},label:{visible:!1,alignment:ya,rotationAngle:0,horizontalOffset:0,verticalOffset:0,radialOffset:0,showForZeroValues:!0,customizeText:void 0,maxLabelCount:void 0,position:ft,font:{color:Ms},border:{visible:!1,width:1,color:Fs,dashStyle:Kn},connector:{visible:!1,width:1}}},seriesSelectionMode:"single",pointSelectionMode:"single",equalRowHeight:!0,dataPrepareSettings:{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0},title:{margin:10},adaptiveLayout:{width:80,height:80,keepLabels:!0},_rtl:{legend:{itemTextPosition:la}},resolveLabelOverlapping:Ht},"chart:common:axis":{visible:!0,valueMarginsEnabled:!0,placeholderSize:null,logarithmBase:10,discreteAxisDivisionMode:"betweenLabels",aggregatedPointsPosition:"betweenTicks",width:1,label:{visible:!0},grid:{visible:!1,width:1},minorGrid:{visible:!1,width:1,opacity:.3},tick:{visible:!0,width:1,length:7,shift:3},minorTick:{visible:!1,width:1,opacity:.3,length:7,shift:3},stripStyle:{paddingLeftRight:10,paddingTopBottom:5},constantLineStyle:{width:1,color:cl,dashStyle:Kn,label:{visible:!0,position:Wa}},marker:{label:{}}},"chart:common:annotation":{font:{color:"#333333"},tooltipEnabled:!0,border:{width:1,color:"#dddddd",dashStyle:Kn,visible:!0},color:Ms,opacity:.9,arrowLength:14,arrowWidth:14,paddingLeftRight:10,paddingTopBottom:10,shadow:{opacity:.15,offsetX:0,offsetY:1,blur:4,color:cl},image:{width:30,height:30},wordWrap:"normal",textOverflow:"ellipsis",allowDragging:!1},chart:{commonSeriesSettings:{type:"line",stack:"default",aggregation:{enabled:void 0},point:{visible:!0,symbol:"circle",size:12,border:{visible:!1,width:1},hoverMode:"onlyPoint",selectionMode:"onlyPoint",hoverStyle:{border:{visible:!0,width:4}},selectionStyle:{border:{visible:!0,width:4}}},scatter:{},line:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},stackedline:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},stackedspline:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},fullstackedline:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},fullstackedspline:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},stepline:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},area:{point:{visible:!1},opacity:.5},stackedarea:{point:{visible:!1},opacity:.5},fullstackedarea:{point:{visible:!1},opacity:.5},fullstackedsplinearea:{point:{visible:!1},opacity:.5},steparea:{border:{visible:!0,width:2},point:{visible:!1},hoverStyle:{border:{visible:!0,width:3}},selectionStyle:{border:{visible:!0,width:3}},opacity:.5},spline:{width:2,hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3}},splinearea:{point:{visible:!1},opacity:.5},stackedsplinearea:{point:{visible:!1},opacity:.5},bar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},stackedbar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}},label:{position:Wa}},fullstackedbar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}},label:{position:Wa}},rangebar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},rangearea:{point:{visible:!1},opacity:.5},rangesplinearea:{point:{visible:!1},opacity:.5},bubble:{opacity:.5,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},candlestick:{width:1,reduction:{color:nd},hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3,highlight:!1},point:{border:{visible:!0}}},stock:{width:1,reduction:{color:nd},hoverStyle:{width:3,hatching:{direction:Ht},highlight:!1},selectionStyle:{width:3,highlight:!1},point:{border:{visible:!0}}}},crosshair:{enabled:!1,color:"#f05b41",width:1,dashStyle:Kn,label:{visible:!1,font:{color:Ms,size:12}},verticalLine:{visible:!0},horizontalLine:{visible:!0}},commonAxisSettings:{multipleAxesSpacing:5,forceUserTickInterval:!1,breakStyle:{width:5,color:"#ababab",line:"waved"},label:{displayMode:"standard",overlappingBehavior:"hide",indentFromAxis:10,wordWrap:"normal",textOverflow:"none"},title:{font:{size:16},margin:6,alignment:ya},constantLineStyle:{paddingLeftRight:10,paddingTopBottom:10}},horizontalAxis:{position:us,axisDivisionFactor:70,label:{rotationAngle:90,staggeringSpacing:5,alignment:ya},stripStyle:{label:{horizontalAlignment:ya,verticalAlignment:yi}},constantLineStyle:{label:{horizontalAlignment:Dr,verticalAlignment:yi}},constantLines:[]},verticalAxis:{position:la,axisDivisionFactor:40,label:{alignment:Dr},stripStyle:{label:{horizontalAlignment:la,verticalAlignment:ya}},constantLineStyle:{label:{horizontalAlignment:la,verticalAlignment:yi}},constantLines:[]},argumentAxis:{endOnTick:!1,aggregateByCategory:!0,workWeek:[1,2,3,4,5]},valueAxis:{grid:{visible:!0},autoBreaksEnabled:!1,maxAutoBreakCount:4},commonPaneSettings:{backgroundColor:Ht,border:{color:Fs,width:1,visible:!1,top:!0,bottom:!0,left:!0,right:!0,dashStyle:Kn}},scrollBar:{visible:!1,offset:5,color:"gray",width:10},adjustOnZoom:!0,autoHidePointMarkers:!0,rotated:!1,synchronizeMultiAxes:!0,stickyHovering:!0,barGroupPadding:.3,minBubbleSize:12,maxBubbleSize:.2,zoomAndPan:{dragBoxStyle:{color:"#2a2a2a",opacity:.2},panKey:"shift",allowMouseWheel:!0,allowTouchGestures:!0}}},Nn,{gauge:{scale:{tick:{visible:!0,length:5,width:2,opacity:1},minorTick:{visible:!1,length:3,width:1,opacity:1},label:{visible:!0,alignment:ya,hideFirstOrLast:"last",overlappingBehavior:"hide"},position:yi,endOnTick:!1},rangeContainer:{offset:0,width:5,backgroundColor:"#808080"},valueIndicators:{_default:{color:"#c2c2c2"},rangebar:{space:2,size:10,color:"#cbc5cf",backgroundColor:Ht,text:{indent:0,font:{size:14,color:null}}},twocolorneedle:{secondColor:"#e18e92"},trianglemarker:{space:2,length:14,width:13,color:"#8798a5"},textcloud:{arrowLength:5,horizontalOffset:6,verticalOffset:3,color:"#679ec5",text:{font:{color:Ms,size:18}}}},indicator:{hasPositiveMeaning:!0,layout:{horizontalAlignment:ya,verticalAlignment:us},text:{font:{size:18}}},_circular:{scale:{scaleDivisionFactor:17,orientation:ft,label:{indentFromTick:10}},rangeContainer:{orientation:ft},valueIndicatorType:"rectangleneedle",subvalueIndicatorType:"trianglemarker",valueIndicators:{_type:"rectangleneedle",_default:{offset:20,indentFromCenter:0,width:2,spindleSize:14,spindleGapSize:10,beginAdaptingAtRadius:50},triangleneedle:{width:4},twocolorneedle:{space:2,secondFraction:.4},rangebar:{offset:30},trianglemarker:{offset:6},textcloud:{offset:-6}}},_linear:{scale:{scaleDivisionFactor:25,horizontalOrientation:Dr,verticalOrientation:us,label:{indentFromTick:-10}},rangeContainer:{horizontalOrientation:Dr,verticalOrientation:us},valueIndicatorType:"rangebar",subvalueIndicatorType:"trianglemarker",valueIndicators:{_type:"rectangle",_default:{offset:2.5,length:15,width:15},rectangle:{width:10},rangebar:{offset:10,horizontalOrientation:Dr,verticalOrientation:us},trianglemarker:{offset:10,horizontalOrientation:la,verticalOrientation:yi},textcloud:{offset:-1,horizontalOrientation:la,verticalOrientation:yi}}}}},{barGauge:{backgroundColor:"#e0e0e0",relativeInnerRadius:.3,barSpacing:4,resolveLabelOverlapping:"hide",label:{indent:20,connectorWidth:2,font:{size:16}},legend:{visible:!1},indicator:{hasPositiveMeaning:!0,layout:{horizontalAlignment:ya,verticalAlignment:us},text:{font:{size:18}}}}},{map:{title:{margin:10},background:{borderWidth:1,borderColor:"#cacaca"},layer:{label:{enabled:!1,stroke:Ms,"stroke-width":1,"stroke-opacity":.7,font:{color:"#2b2b2b",size:12}}},"layer:area":{borderWidth:1,borderColor:Ms,color:"#d2d2d2",hoveredBorderColor:Hl,selectedBorderWidth:2,selectedBorderColor:Hl,label:{"stroke-width":2,font:{size:16}}},"layer:line":{borderWidth:2,color:"#ba8365",hoveredColor:"#a94813",selectedBorderWidth:3,selectedColor:"#e55100",label:{"stroke-width":2,font:{size:16}}},"layer:marker":{label:{enabled:!0,"stroke-width":1,font:{size:12}}},"layer:marker:dot":{borderWidth:2,borderColor:Ms,size:8,selectedStep:2,backStep:18,backColor:Ms,backOpacity:.32,shadow:!0},"layer:marker:bubble":{minSize:20,maxSize:50,hoveredBorderWidth:1,hoveredBorderColor:Hl,selectedBorderWidth:2,selectedBorderColor:Hl},"layer:marker:pie":{size:50,hoveredBorderWidth:1,hoveredBorderColor:Hl,selectedBorderWidth:2,selectedBorderColor:Hl},"layer:marker:image":{size:20},legend:{verticalAlignment:us,horizontalAlignment:Dr,position:Wa,backgroundOpacity:.65,border:{visible:!0},paddingLeftRight:16,paddingTopBottom:12},controlBar:{borderColor:"#5d5d5d",borderWidth:3,color:Ms,margin:20,opacity:.3},_rtl:{legend:{itemTextPosition:la}}}},{pie:{innerRadius:.5,minDiameter:.5,type:"pie",dataPrepareSettings:{_skipArgumentSorting:!0},commonSeriesSettings:{pie:{border:{visible:!1,width:2,color:Ms},hoverStyle:{hatching:{direction:Dr,width:4,step:10,opacity:.75},highlight:!0,border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:Dr,width:4,step:10,opacity:.5},highlight:!0,border:{visible:!1,width:2}}},doughnut:{border:{visible:!1,width:2,color:Ms},hoverStyle:{hatching:{direction:Dr,width:4,step:10,opacity:.75},highlight:!0,border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:Dr,width:4,step:10,opacity:.5},highlight:!0,border:{visible:!1,width:2}}},donut:{border:{visible:!1,width:2,color:Ms},hoverStyle:{hatching:{direction:Dr,width:4,step:10,opacity:.75},highlight:!0,border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:Dr,width:4,step:10,opacity:.5},highlight:!0,border:{visible:!1,width:2}}},label:{textOverflow:"ellipsis",wordWrap:"normal"}},legend:{hoverMode:"allArgumentPoints",backgroundColor:Ht},adaptiveLayout:{keepLabels:!1}}},{polar:{commonSeriesSettings:{type:"scatter",closed:!0,point:{visible:!0,symbol:"circle",size:12,border:{visible:!1,width:1},hoverMode:"onlyPoint",selectionMode:"onlyPoint",hoverStyle:{border:{visible:!0,width:4},size:12},selectionStyle:{border:{visible:!0,width:4},size:12}},scatter:{},line:{width:2,dashStyle:Kn,hoverStyle:{width:3,hatching:{direction:Ht}},selectionStyle:{width:3}},area:{point:{visible:!1},opacity:.5},stackedline:{width:2},bar:{opacity:.8},stackedbar:{opacity:.8}},adaptiveLayout:{width:80,height:80,keepLabels:!0},barGroupPadding:.3,commonAxisSettings:{visible:!0,forceUserTickInterval:!1,label:{overlappingBehavior:"hide",indentFromAxis:5},grid:{visible:!0},minorGrid:{visible:!0},tick:{visible:!0},title:{font:{size:16},margin:10}},argumentAxis:{startAngle:0,firstPointOnStartAngle:!1,period:void 0},valueAxis:{endOnTick:!1,tick:{visible:!1}},horizontalAxis:{position:yi,axisDivisionFactor:50,label:{alignment:ya}},verticalAxis:{position:yi,axisDivisionFactor:30,label:{alignment:Dr}}}},{rangeSelector:{scale:{valueMarginsEnabled:!0,width:1,color:cl,opacity:.1,showCustomBoundaryTicks:!0,aggregateByCategory:!0,label:{overlappingBehavior:"hide",alignment:ya,visible:!0,topIndent:7,font:{size:11}},tick:{width:1,color:cl,opacity:.17,visible:!0,length:12},minorTick:{width:1,color:cl,opacity:.05,visible:!0,length:12},marker:{width:1,color:"#000000",opacity:.1,visible:!0,separatorHeight:33,topIndent:10,textLeftIndent:7,textTopIndent:11,label:{}},logarithmBase:10,workWeek:[1,2,3,4,5],breakStyle:{width:5,color:"#ababab",line:"waved"},endOnTick:!1},selectedRangeColor:"#606060",sliderMarker:{visible:!0,paddingTopBottom:2,paddingLeftRight:4,color:"#606060",invalidRangeColor:nd,font:{color:Ms,size:11}},sliderHandle:{width:1,color:cl,opacity:.2},shutter:{opacity:.75},background:{color:"#c0bae1",visible:!0,image:{location:"full"}},behavior:{snapToTicks:!0,animationEnabled:!0,moveSelectedRangeByClick:!0,manualRangeSelectionEnabled:!0,allowSlidersSwap:!0,valueChangeMode:"onHandleRelease"},redrawOnResize:!0,chart:{barGroupPadding:.3,minBubbleSize:12,maxBubbleSize:.2,topIndent:.1,bottomIndent:0,valueAxis:{inverted:!1,logarithmBase:10},commonSeriesSettings:{type:"area",aggregation:{enabled:void 0},point:{visible:!1},scatter:{point:{visible:!0}}}}}},uo,{sparkline:{lineColor:"#666666",lineWidth:2,areaOpacity:.2,minColor:"#e8c267",maxColor:"#e55253",barPositiveColor:"#a9a9a9",barNegativeColor:"#d7d7d7",winColor:"#a9a9a9",lossColor:"#d7d7d7",firstLastColor:"#666666",pointSymbol:"circle",pointColor:Ms,pointSize:4,type:"line",argumentField:"arg",valueField:"val",winlossThreshold:0,showFirstLast:!0,showMinMax:!1,tooltip:{enabled:!0}}},{bullet:{color:"#e8c267",targetColor:"#666666",targetWidth:4,showTarget:!0,showZeroLevel:!0,tooltip:{enabled:!0}}},{treeMap:{tile:{border:{width:1,opacity:.2,color:"#000000"},color:"#5f8b95",hoverStyle:{hatching:{opacity:.75,step:6,width:2,direction:"right"},border:{}},selectionStyle:{hatching:{opacity:.5,step:6,width:2,direction:"right"},border:{opacity:1}},label:{visible:!0,paddingLeftRight:5,paddingTopBottom:4,font:{color:"#ffffff",weight:600},shadow:{opacity:.6,offsetX:0,offsetY:1,blur:2,color:"#000000"},wordWrap:"normal",textOverflow:"ellipsis"}},group:{padding:4,border:{width:1},color:"#eeeeee",hoverStyle:{hatching:{opacity:0,step:6,width:2,direction:"right"},border:{}},selectionStyle:{hatching:{opacity:0,step:6,width:2,direction:"right"},border:{}},label:{visible:!0,paddingLeftRight:5,paddingTopBottom:4,font:{color:vn,weight:600},textOverflow:"ellipsis"}},title:{subtitle:{}},tooltip:{},loadingIndicator:{}}})},{baseThemeName:"generic.light",theme:{name:"generic.light.compact"}}],eo="#ffffff",St=[{baseThemeName:"generic.light",theme:{name:"generic.dark",font:{color:"#808080"},backgroundColor:"#2a2a2a",primaryTitleColor:"#dedede",secondaryTitleColor:"#a3a3a3",gridColor:"#555555",axisColor:"#a3a3a3",export:{backgroundColor:"#2a2a2a",font:{color:"#dbdbdb"},button:{default:{color:"#dedede",borderColor:"#4d4d4d",backgroundColor:"#2e2e2e"},hover:{color:"#dedede",borderColor:"#6c6c6c",backgroundColor:"#444"},focus:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#444444"},active:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#555555"}},shadowColor:"#292929"},tooltip:{color:"#2b2b2b",border:{color:"#494949"},font:{color:"#929292"}},"chart:common":{commonSeriesSettings:{label:{border:{color:"#494949"}},valueErrorBar:{color:eo}}},"chart:common:axis":{constantLineStyle:{color:eo}},"chart:common:annotation":{font:{color:"#929292"},border:{color:"#494949"},color:"#2b2b2b",shadow:{opacity:.008,offsetY:4,blur:8}},chart:{commonPaneSettings:{border:{color:"#494949"}},commonAxisSettings:{breakStyle:{color:"#818181"}},zoomAndPan:{dragBoxStyle:{color:eo}}},gauge:{rangeContainer:{backgroundColor:"#b5b5b5"},valueIndicators:{_default:{color:"#b5b5b5"},rangebar:{color:"#84788b"},twocolorneedle:{secondColor:"#ba544d"},trianglemarker:{color:"#b7918f"},textcloud:{color:"#ba544d"}}},barGauge:{backgroundColor:"#3c3c3c"},rangeSelector:{scale:{tick:{color:eo,opacity:.32},minorTick:{color:eo,opacity:.1},breakStyle:{color:"#818181"}},selectedRangeColor:"#b5b5b5",sliderMarker:{color:"#b5b5b5",font:{color:"#303030"}},sliderHandle:{color:eo,opacity:.2},shutter:{color:"#2b2b2b",opacity:.9}},map:{background:{borderColor:"#3f3f3f"},layer:{label:{stroke:"#000000",font:{color:eo}}},"layer:area":{borderColor:"#303030",color:"#686868",hoveredBorderColor:eo,selectedBorderColor:eo},"layer:line":{color:"#c77244",hoveredColor:"#ff5d04",selectedColor:"#ff784f"},"layer:marker:bubble":{hoveredBorderColor:eo,selectedBorderColor:eo},"layer:marker:pie":{hoveredBorderColor:eo,selectedBorderColor:eo},legend:{border:{color:"#3f3f3f"},font:{color:eo}},controlBar:{borderColor:"#c7c7c7",color:"#303030"}},treeMap:{group:{color:"#4c4c4c",label:{font:{color:"#a3a3a3"}}}},sparkline:{lineColor:"#c7c7c7",firstLastColor:"#c7c7c7",barPositiveColor:"#b8b8b8",barNegativeColor:"#8e8e8e",winColor:"#b8b8b8",lossColor:"#8e8e8e",pointColor:"#303030"},bullet:{targetColor:"#8e8e8e"},funnel:{item:{border:{color:"#2a2a2a"}}},sankey:{label:{font:{color:eo},shadow:{opacity:0}},node:{border:{color:"#2a2a2a"}},link:{color:"#888888",border:{color:"#2a2a2a"},hoverStyle:{color:"#bbbbbb"}}}}},{baseThemeName:"generic.dark",theme:{name:"generic.dark.compact"}}],Dn="#ffffff",ai="#000000",Sh=[{baseThemeName:"generic.light",theme:{name:"generic.contrast",defaultPalette:"Bright",font:{color:Dn},backgroundColor:ai,primaryTitleColor:Dn,secondaryTitleColor:Dn,gridColor:Dn,axisColor:Dn,export:{backgroundColor:ai,font:{color:Dn},button:{default:{color:Dn,borderColor:Dn,backgroundColor:ai},hover:{color:Dn,borderColor:Dn,backgroundColor:"#cf00d7"},focus:{color:Dn,borderColor:"#cf00d7",backgroundColor:ai},active:{color:ai,borderColor:Dn,backgroundColor:Dn}},borderColor:Dn,menuButtonColor:ai,activeBackgroundColor:Dn,activeColor:ai,selectedBorderColor:"#cf00da",selectedColor:"#cf00da",shadowColor:"none"},tooltip:{border:{color:Dn},font:{color:Dn},color:ai},"chart:common":{commonSeriesSettings:{valueErrorBar:{color:Dn},hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}},label:{font:{color:Dn},border:{color:Dn}}}},"chart:common:axis":{constantLineStyle:{color:Dn}},"chart:common:annotation":{font:{color:Dn},border:{color:Dn},color:ai},chart:{commonSeriesSettings:{},crosshair:{color:"#cf00d7"},commonPaneSettings:{backgroundColor:ai,border:{color:Dn}},scrollBar:{color:Dn},commonAxisSettings:{breakStyle:{color:"#cf00d7"}},zoomAndPan:{dragBoxStyle:{color:Dn,opacity:.7}}},pie:{commonSeriesSettings:{pie:{hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}}},doughnut:{hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}}},donut:{hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}}}}},gauge:{rangeContainer:{backgroundColor:Dn},valueIndicators:{_default:{color:Dn},rangebar:{color:Dn,backgroundColor:ai},twocolorneedle:{secondColor:Dn},trianglemarker:{color:Dn},textcloud:{color:Dn,text:{font:{color:ai}}}}},barGauge:{backgroundColor:"#3c3c3c"},rangeSelector:{scale:{tick:{color:Dn,opacity:.4},minorTick:{color:Dn,opacity:.12},breakStyle:{color:"#cf00d7"}},selectedRangeColor:"#cf00da",sliderMarker:{color:"#cf00da"},sliderHandle:{color:"#cf00da",opacity:1},shutter:{opacity:.75},background:{color:ai}},map:{background:{borderColor:Dn},layer:{label:{stroke:ai,font:{color:Dn}}},"layer:area":{borderColor:ai,color:"#686868",hoveredBorderColor:Dn,selectedBorderColor:Dn,label:{font:{opacity:1}}},"layer:line":{color:"#267cff",hoveredColor:"#f613ff",selectedColor:Dn},"layer:marker:dot":{borderColor:ai,color:"#f8ca00",backColor:ai,backOpacity:.32},"layer:marker:bubble":{color:"#f8ca00",hoveredBorderColor:Dn,selectedBorderColor:Dn},"layer:marker:pie":{hoveredBorderColor:Dn,selectedBorderColor:Dn},controlBar:{borderColor:Dn,color:ai,opacity:.3}},treeMap:{tile:{color:"#70c92f"},group:{color:"#797979",label:{font:{color:Dn}}}},sparkline:{pointColor:ai},bullet:{},polar:{commonSeriesSettings:{}},funnel:{label:{connector:{opacity:1}}},sankey:{label:{font:{color:Dn},shadow:{opacity:0}},node:{border:{visible:!0,width:1,color:Dn}},link:{opacity:.5,border:{visible:!0,width:1,color:Dn},hoverStyle:{opacity:.9}}}}},{baseThemeName:"generic.contrast",theme:{name:"generic.contrast.compact"}}],id="'Roboto', 'RobotoFallback', 'Helvetica', 'Arial', sans-serif",Sd="rgba(0,0,0,0.54)",Nc="rgba(255,255,255,0.87)",np="rgba(255,255,255,0.54)",Kl="#ffffff",Nf=[{baseThemeName:"generic.light",theme:{name:"material",defaultPalette:"Material",font:{family:id},title:{margin:{top:20,bottom:20,left:0,right:0},font:{size:20,family:id,weight:500},horizontalAlignment:"left",subtitle:{font:{size:14},horizontalAlignment:"left"}},tooltip:{shadow:{opacity:0},border:{visible:!1},paddingLeftRight:8,paddingTopBottom:6,arrowLength:0,location:"edge",color:"#616161",font:{color:Kl},cornerRadius:4},chart:{commonAxisSettings:{minorTick:{opacity:.5},label:{font:{size:11}}},commonAnnotationSettings:{font:{color:Kl},border:{color:"#616161"},color:"#616161",arrowLength:14,arrowWidth:0,shadow:{opacity:.08,offsetY:4,blur:8},cornerRadius:4}},pie:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},polar:{commonAxisSettings:{minorTick:{opacity:.5}},title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},funnel:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},gauge:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},barGauge:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},rangeSelector:{sliderHandle:{opacity:.5}},treeMap:{group:{label:{font:{weight:500}}}}}},{baseThemeName:"material",theme:{name:"material.light",gridColor:"#e0e0e0",axisColor:Sd,primaryTitleColor:"rgba(0,0,0,0.87)",legend:{font:{color:Sd}},chart:{scrollBar:{color:"#bfbfbf",opacity:.7}},gauge:{rangeContainer:{backgroundColor:"rgba(0,0,0,0.2)"}},barGauge:{backgroundColor:"#efefef"}}},{baseThemeName:"material",theme:{name:"material.dark",gridColor:"#515159",backgroundColor:"#363640",axisColor:np,font:{color:np},primaryTitleColor:Nc,secondaryTitleColor:Nc,tooltip:{color:"#000"},export:{backgroundColor:"#363640",font:{color:"#dbdbdb"},button:{default:{color:"#dedede",borderColor:"#4d4d4d",backgroundColor:"#363640"},hover:{color:"#dedede",borderColor:"#6c6c6c",backgroundColor:"#3f3f4b"},focus:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#494956"},active:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#494956"}},shadowColor:"#292929"},"chart:common":{commonSeriesSettings:{label:{border:{color:"#494949"}},valueErrorBar:{color:Kl}}},"chart:common:axis":{constantLineStyle:{color:Kl}},"chart:common:annotation":{border:{color:"#000"},color:"#000"},chart:{commonPaneSettings:{border:{color:"#494949"}},commonAxisSettings:{breakStyle:{color:"#818181"}},zoomAndPan:{dragBoxStyle:{color:Kl}}},gauge:{rangeContainer:{backgroundColor:"#b5b5b5"},valueIndicators:{_default:{color:"#b5b5b5"},rangebar:{color:"#84788b"},twocolorneedle:{secondColor:"#ba544d"},trianglemarker:{color:"#b7918f"},textcloud:{color:"#ba544d"}}},barGauge:{backgroundColor:"#3c3c3c"},rangeSelector:{scale:{tick:{color:Kl,opacity:.32},minorTick:{color:Kl,opacity:.1},breakStyle:{color:"#818181"}},selectedRangeColor:"#b5b5b5",sliderMarker:{color:"#b5b5b5",font:{color:"#363640"}},sliderHandle:{color:Kl,opacity:.2},shutter:{color:Kl,opacity:.1}},map:{background:{borderColor:"#3f3f3f"},layer:{label:{stroke:"#000000",font:{color:Kl}}},"layer:area":{borderColor:"#363640",color:"#686868",hoveredBorderColor:Kl,selectedBorderColor:Kl},"layer:line":{color:"#c77244",hoveredColor:"#ff5d04",selectedColor:"#ff784f"},"layer:marker:bubble":{hoveredBorderColor:Kl,selectedBorderColor:Kl},"layer:marker:pie":{hoveredBorderColor:Kl,selectedBorderColor:Kl},legend:{border:{color:"#3f3f3f"},font:{color:Kl}},controlBar:{borderColor:"#c7c7c7",color:"#363640"}},treeMap:{group:{color:"#4c4c4c",label:{font:{color:"#a3a3a3"}}}},sparkline:{lineColor:"#c7c7c7",firstLastColor:"#c7c7c7",barPositiveColor:"#b8b8b8",barNegativeColor:"#8e8e8e",winColor:"#b8b8b8",lossColor:"#8e8e8e",pointColor:"#363640"},bullet:{targetColor:"#8e8e8e"},funnel:{item:{border:{color:"#363640"}}},sankey:{label:{font:{color:Kl}}}}}];function pc(n,e,t){return{theme:{name:`material.${n}.${e}`,rangeSelector:{selectedRangeColor:t,sliderMarker:{color:t},sliderHandle:{color:t}},map:{"layer:marker:dot":{color:t},"layer:marker:bubble":{color:t},legend:{markerColor:t}},bullet:{color:t},gauge:{valueIndicators:{rangebar:{color:t},textcloud:{color:t}}}},baseThemeName:`material.${e}`}}const Np={blue:"#03a9f4",lime:"#cddc39",orange:"#ff5722",purple:"#9c27b0",teal:"#009688"};Object.keys(Np).forEach(n=>{const e=Np[n];Nf.push(pc(n,"light",e),pc(n,"dark",e),{theme:{name:`material.${n}.light.compact`},baseThemeName:`material.${n}.light`},{theme:{name:`material.${n}.dark.compact`},baseThemeName:`material.${n}.dark`})});const ip=Nf,gc={},Hs={},ad={},Fp=_.X;let Vp,Oh=null,Hp=0;const Ed={};function ld(n){const e=Wi(n);return gc[e]||gc[Hs[e]||function Up(n,e){if(!arguments.length)return Oh||qu((0,k.ss)())||Vp;const t=Wi(e);return Oh=(null!=n&&n.platform?function kg(n,e,t){return qu(n+e,t)||qu(n,t)}(Wi(n.platform),n.version,t):qu(Wi(n),t))||Oh,this}()]}function qu(n,e){const t=`${n}.${e}`;return Hs[t]||ad[t]||Hs[n]}function Xl(n,e,t,i){const r=t?.[e]??i;void 0!==r&&void 0===n[e]&&(n[e]=r)}function bc(n,e,t,i){const r=t?.[e]??i;void 0!==r&&(n[e]=Fp(!0,{},r,n[e]))}(0,C.RI)(gc)&&(0,C.RI)(Hs)&&!Vp&&[].concat(Wo,[{baseThemeName:"generic.light",theme:{name:"generic.carmine",defaultPalette:"Carmine",backgroundColor:"#fff",primaryTitleColor:"#333",secondaryTitleColor:"#8899a8",gridColor:"#dee1e3",axisColor:"#707070",export:{backgroundColor:"#fff",font:{color:"#333"},button:{default:{color:"#333",borderColor:"#b1b7bd",backgroundColor:"#fff"},hover:{color:"#333",borderColor:"#b1b7bd",backgroundColor:"#faf2f0"},focus:{color:"#333",borderColor:"#6d7781",backgroundColor:"#faf2f0"},active:{color:"#333",borderColor:"#6d7781",backgroundColor:"#f5e7e4"}}},legend:{font:{color:"#707070"}},tooltip:{color:"#fff",border:{color:"#dee1e3"},font:{color:"#333"}},"chart:common":{commonSeriesSettings:{label:{border:{color:"#dee1e3"}}}},"chart:common:annotation":{font:{color:"#333"},border:{color:"#dee1e3"},color:"#fff"},chart:{commonPaneSettings:{border:{color:"#dee1e3"}},commonAxisSettings:{breakStyle:{color:"#c1c5c7"}}},rangeSelector:{scale:{breakStyle:{color:"#c1c5c7"},tick:{opacity:.12}},selectedRangeColor:"#f05b41",sliderMarker:{color:"#f05b41"},sliderHandle:{color:"#f05b41",opacity:.5}},sparkline:{pointColor:"#fff",minColor:"#f0ad4e",maxColor:"#f74d61"},treeMap:{group:{color:"#dee1e3",label:{font:{color:"#8899a8"}}}},bullet:{color:"#f05b41"},gauge:{valueIndicators:{rangebar:{color:"#f05b41"},textcloud:{color:"#f05b41"}}}}},{baseThemeName:"generic.carmine",theme:{name:"generic.carmine.compact"}}],St,Sh,[{baseThemeName:"generic.dark",theme:{name:"generic.darkmoon",defaultPalette:"Dark Moon",backgroundColor:"#465672",primaryTitleColor:"#fff",secondaryTitleColor:"#919bac",gridColor:"#596980",axisColor:"#c7ccd4",export:{backgroundColor:"#465672",font:{color:"#fff"},button:{default:{color:"#fff",borderColor:"#7a889e",backgroundColor:"#465672"},hover:{color:"#fff",borderColor:"#9da8b8",backgroundColor:"#596e92"},focus:{color:"#fff",borderColor:"#c4cad4",backgroundColor:"#596e92"},active:{color:"#fff",borderColor:"#c4cad4",backgroundColor:"#6b80a4"}}},legend:{font:{color:"#c7ccd4"}},tooltip:{color:"#62789e",border:{color:"#596980"},font:{color:"#fff"}},"chart:common":{commonSeriesSettings:{label:{border:{color:"#596980"}}}},"chart:common:annotation":{font:{color:"#fff"},border:{color:"#596980"},color:"#62789e"},chart:{commonPaneSettings:{border:{color:"#596980"}},commonAxisSettings:{breakStyle:{color:"#73869e"}}},gauge:{valueIndicators:{rangebar:{color:"#3debd3"},textcloud:{color:"#3debd3",text:{font:{color:"#465672"}}}}},barGauge:{backgroundColor:"#526280"},funnel:{item:{border:{color:"#465672"}}},sparkline:{pointColor:"#465672",minColor:"#f0ad4e",maxColor:"#f9517e"},treeMap:{group:{color:"#596980",label:{font:{color:"#fff"}}}},map:{background:{borderColor:"#596980"},"layer:area":{color:"#97a3b6",borderColor:"#465672"}},rangeSelector:{shutter:{color:"#465672"},scale:{breakStyle:{color:"#73869e"},tick:{opacity:.2}},selectedRangeColor:"#3debd3",sliderMarker:{color:"#3debd3",font:{color:"#000"}},sliderHandle:{color:"#3debd3",opacity:.5}},bullet:{color:"#3debd3"},sankey:{link:{border:{color:"#465672"}},node:{border:{color:"#465672"}}}}},{baseThemeName:"generic.darkmoon",theme:{name:"generic.darkmoon.compact"}}],[{baseThemeName:"generic.dark",theme:{name:"generic.darkviolet",defaultPalette:"Dark Violet",backgroundColor:"#17171f",primaryTitleColor:"#f5f6f7",secondaryTitleColor:"#fff",gridColor:"#343840",axisColor:"#b2b2b6",export:{backgroundColor:"#17171f",font:{color:"#f5f6f7"},button:{default:{color:"#f5f6f7",borderColor:"#414152",backgroundColor:"#17171f"},hover:{color:"#f5f6f7",borderColor:"#5c5c74",backgroundColor:"#2d2d3c"},focus:{color:"#f5f6f7",borderColor:"#7c7c97",backgroundColor:"#2d2d3c"},active:{color:"#f5f6f7",borderColor:"#7c7c97",backgroundColor:"#3c3c51"}}},legend:{font:{color:"#b2b2b6"}},tooltip:{color:"#17171f",border:{color:"#414152"},font:{color:"#f5f6f7"}},"chart:common":{commonSeriesSettings:{label:{border:{color:"#343840"}}}},"chart:common:annotation":{font:{color:"#f5f6f7"},border:{color:"#414152"},color:"#17171f"},chart:{commonPaneSettings:{border:{color:"#343840"}},commonAxisSettings:{breakStyle:{color:"#575e6b"}}},funnel:{item:{border:{color:"#17171f"}}},sparkline:{pointColor:"#17171f",minColor:"#f0ad4e",maxColor:"#d9534f"},treeMap:{group:{color:"#343840",label:{font:{color:"#fff"}}}},rangeSelector:{shutter:{color:"#17171f"},scale:{breakStyle:{color:"#575e6b"},tick:{opacity:.2}},selectedRangeColor:"#9c63ff",sliderMarker:{color:"#9c63ff",font:{color:"#fff"}},sliderHandle:{color:"#9c63ff",opacity:.5}},bullet:{color:"#9c63ff"},gauge:{valueIndicators:{rangebar:{color:"#9c63ff"},textcloud:{color:"#9c63ff"}}},sankey:{link:{border:{color:"#17171f"}},node:{border:{color:"#17171f"}}}}},{baseThemeName:"generic.darkviolet",theme:{name:"generic.darkviolet.compact"}}],[{baseThemeName:"generic.light",theme:{name:"generic.greenmist",defaultPalette:"Green Mist",backgroundColor:"#f5f5f5",primaryTitleColor:"#28484f",secondaryTitleColor:"#7eb2be",gridColor:"#dedede",axisColor:"#657c80",export:{backgroundColor:"#f5f5f5",font:{color:"#28484f"},button:{default:{color:"#28484f",borderColor:"#a2b4b8",backgroundColor:"#f5f5f5"},hover:{color:"#28484f",borderColor:"#7f989e",backgroundColor:"rgba(222, 222, 222, 0.4)"},focus:{color:"#28484f",borderColor:"#5f777c",backgroundColor:"rgba(222, 222, 222, 0.4)"},active:{color:"#28484f",borderColor:"#5f777c",backgroundColor:"rgba(222, 222, 222, 0.8)"}}},legend:{font:{color:"#657c80"}},tooltip:{color:"#fff",border:{color:"#dedede"},font:{color:"#28484f"}},"chart:common":{commonSeriesSettings:{label:{border:{color:"#dedede"}}}},"chart:common:annotation":{color:"#fff",border:{color:"#dedede"},font:{color:"#28484f"}},chart:{commonPaneSettings:{border:{color:"#dedede"}},commonAxisSettings:{breakStyle:{color:"#c1c1c1"}}},funnel:{item:{border:{color:"#f5f5f5"}}},sparkline:{pointColor:"#f5f5f5",minColor:"#ffc852",maxColor:"#f74a5e"},treeMap:{group:{color:"#dedede",label:{font:{color:"#7eb2be"}}}},rangeSelector:{shutter:{color:"#f5f5f5"},scale:{breakStyle:{color:"#c1c1c1"},tick:{opacity:.12}},selectedRangeColor:"#3cbab2",sliderMarker:{color:"#3cbab2"},sliderHandle:{color:"#3cbab2",opacity:.5}},bullet:{color:"#3cbab2"},gauge:{valueIndicators:{rangebar:{color:"#3cbab2"},textcloud:{color:"#3cbab2"}}}}},{baseThemeName:"generic.greenmist",theme:{name:"generic.greenmist.compact"}}],[{baseThemeName:"generic.light",theme:{name:"generic.softblue",defaultPalette:"Soft Blue",backgroundColor:"#fff",primaryTitleColor:"#333",secondaryTitleColor:"#99a1a8",gridColor:"#e8eaeb",axisColor:"#707070",export:{backgroundColor:"#fff",font:{color:"#333"},button:{default:{color:"#333",borderColor:"#c9d0d4",backgroundColor:"#fff"},hover:{color:"#333",borderColor:"#a7b2b9",backgroundColor:"#e6e6e6"},focus:{color:"#333",borderColor:"#82929b",backgroundColor:"#e6e6e6"},active:{color:"#333",borderColor:"#82929b",backgroundColor:"#d4d4d4"}}},legend:{font:{color:"#707070"}},tooltip:{color:"#fff",border:{color:"#e8eaeb"},font:{color:"#333"}},"chart:common":{commonSeriesSettings:{label:{border:{color:"#e8eaeb"}}}},"chart:common:annotation":{color:"#fff",border:{color:"#e8eaeb"},font:{color:"#333"}},chart:{commonPaneSettings:{border:{color:"#e8eaeb"}},commonAxisSettings:{breakStyle:{color:"#cfd2d3"}}},rangeSelector:{scale:{breakStyle:{color:"#cfd2d3"},tick:{opacity:.12}},selectedRangeColor:"#7ab8eb",sliderMarker:{color:"#7ab8eb"},sliderHandle:{color:"#7ab8eb",opacity:.5}},sparkline:{pointColor:"#fff",minColor:"#f0ad4e",maxColor:"#d9534f"},treeMap:{group:{color:"#e8eaeb",label:{font:{color:"#99a1a8"}}}},bullet:{color:"#7ab8eb"},gauge:{valueIndicators:{rangebar:{color:"#7ab8eb"},textcloud:{color:"#7ab8eb"}}}}},{baseThemeName:"generic.softblue",theme:{name:"generic.softblue.compact"}}],ip,[{baseThemeName:"material.blue.light",theme:{name:"fluent.blue.light"}},{baseThemeName:"fluent.blue.light",theme:{name:"fluent.blue.light.compact"}},{baseThemeName:"material.blue.dark",theme:{name:"fluent.blue.dark"}},{baseThemeName:"fluent.blue.dark",theme:{name:"fluent.blue.dark.compact"}}]).forEach(n=>{!function cd(n,e){const t=Wi(n&&n.name);t&&(n.isDefault&&(Vp=t),function Lg(n,e){const t=function Od(n,e){const t=n.indexOf(e);return t>0?{name:n.substring(0,t),scheme:n.substring(t+1)}:null}(n,".")||{name:n},i=t.name,r=t.scheme;if(r){const m=`${i}.${r}`;Hs[i]=Hs[i]||e,Hs[m]=e}else Hs[i]=e}(t,t),gc[t]=Fp(!0,{},ld(e),function Ff(n){return Xl((n=Fp(!0,{loadingIndicator:{font:{}},export:{font:{}},legend:{font:{},border:{}},title:{font:{}},tooltip:{font:{}},"chart:common":{},"chart:common:axis":{grid:{},minorGrid:{},tick:{},minorTick:{},title:{font:{}},label:{font:{}}},"chart:common:annotation":{font:{},border:{}},chart:{commonSeriesSettings:{candlestick:{}}},pie:{},polar:{},gauge:{scale:{tick:{},minorTick:{},label:{font:{}}}},barGauge:{},funnel:{},sankey:{},map:{background:{}},treeMap:{tile:{selectionStyle:{border:{}}},group:{border:{},selectionStyle:{border:{}},label:{font:{}}}},rangeSelector:{scale:{tick:{},minorTick:{},label:{font:{}}},chart:{}},sparkline:{},bullet:{}},n)).loadingIndicator,"backgroundColor",n),Xl(n.chart.commonSeriesSettings.candlestick,"innerColor",null,n.backgroundColor),Xl(n.map.background,"color",null,n.backgroundColor),Xl(n.title.font,"color",null,n.primaryTitleColor),bc(n.title,"subtitle",null,n.title),Xl(n.legend.font,"color",null,n.secondaryTitleColor),Xl(n.legend.border,"color",null,n.gridColor),function Bg(n){const e=n["chart:common:axis"];[e.grid,e.minorGrid].forEach(t=>{Xl(t,"color",null,n.gridColor)}),[e,e.tick,e.minorTick,e.label.font].forEach(t=>{Xl(t,"color",null,n.axisColor)}),Xl(e.title.font,"color",null,n.secondaryTitleColor),Xl(n.gauge.scale.label.font,"color",null,n.axisColor),Xl(n.gauge.scale.tick,"color",null,n.backgroundColor),Xl(n.gauge.scale.minorTick,"color",null,n.backgroundColor),Xl(n.rangeSelector.scale.label.font,"color",null,n.axisColor)}(n),["chart","pie","polar","gauge","barGauge","map","treeMap","funnel","rangeSelector","sparkline","bullet","sankey"].forEach(e=>{Xl(n[e],"redrawOnResize",n),Xl(n[e],"containerBackgroundColor",null,n.backgroundColor),bc(n[e],"tooltip",n),bc(n[e],"export",n)}),["chart","pie","polar","gauge","barGauge","map","treeMap","funnel","rangeSelector","sankey"].forEach(e=>{bc(n[e],"loadingIndicator",n),bc(n[e],"legend",n),bc(n[e],"title",n)}),["chart","pie","polar"].forEach(e=>{bc(n,e,null,n["chart:common"])}),["chart","polar"].forEach(e=>{n[e]=n[e]||{},bc(n[e],"commonAxisSettings",null,n["chart:common:axis"])}),["chart","polar","map","pie"].forEach(e=>{n[e]=n[e]||{},bc(n[e],"commonAnnotationSettings",null,n["chart:common:annotation"])}),bc(n.rangeSelector.chart,"commonSeriesSettings",n.chart),bc(n.rangeSelector.chart,"dataPrepareSettings",n.chart),Xl(n.treeMap.group.border,"color",null,n.gridColor),Xl(n.treeMap.tile.selectionStyle.border,"color",null,n.primaryTitleColor),Xl(n.treeMap.group.selectionStyle.border,"color",null,n.primaryTitleColor),Xl(n.map.legend,"backgroundColor",n),function dd(n){const e=n.map;["area","line","marker"].forEach(t=>{bc(e,"layer:"+t,null,e.layer)}),["dot","bubble","pie","image"].forEach(t=>{bc(e,"layer:marker:"+t,null,e["layer:marker"])})}(n),n}(n)))}(n.theme,n.baseThemeName)});const iu=ld,eh=_.X,Ng=w.__;function Fg(n,e){let t=n;return e&&Ng(e.split("."),function(i,r){return t=t[r]}),t}const th=es.A.inherit({ctor:function(n){this._themeSection=n.themeSection,this._fontFields=n.fontFields||[],function Q_(n){const e=++Hp;n._cache=e,Ed[e]=n}(this)},dispose:function(){return function km(n){delete Ed[n._cache]}(this),this._callback=this._theme=this._font=null,this},setCallback:function(n){return this._callback=n,this},setTheme:function(n,e){return this._current=n,this._rtl=e,this.refresh()},refresh:function(){const n=this,e=n._current||{};let t=iu(e.name||e);return n._themeName=t.name,n._defaultPalette=t.defaultPalette,n._font=eh({},t.font,e.font),n._themeSection&&Ng(n._themeSection.split("."),function(i,r){t=eh(!0,{},t[r])}),n._theme=eh(!0,{},t,(0,C.Kg)(e)?{}:e),n._initializeTheme(),mn(n._rtl,n._theme.rtlEnabled)&&eh(!0,n._theme,n._theme._rtl),n._callback(),n},theme:function(n){return Fg(this._theme,n)},themeName:function(){return this._themeName},createPalette:function(n,e){return ms(n,e,this._defaultPalette)},createDiscretePalette:function(n,e){return function Gs(n,e,t){const i=e>0?function Vl(n,e){const t=e-1,i=n.length-1,r=[],m=[];let A;function V(X){const ce=i*X,_e=gs(ce),Me=Ca(ce);m.push(r[_e].blend(r[Me],ce-_e).toHex())}for(A=0;A<=i;++A)r.push(new Jn.A(n[A]));if(t>0)for(A=0;A<=t;++A)V(A/t);else V(.5);return m}(Ni(n,{type:"gradientSet",themeDefault:t}),e):[];return{getColor:function(r){return i[r]||null}}}(n,e,this._defaultPalette)},createGradientPalette:function(n){return function Ma(n,e){const t=Ni(n,{type:"gradientSet",themeDefault:e}),i=new Jn.A(t[0]),r=new Jn.A(t[1]);return{getColor:function(m){return 0<=m&&m<=1?i.blend(r,m).toHex():null}}}(n,this._defaultPalette)},getAccentColor:function(n){return function Xi(n,e){return(n=Ni(n,{themeDefault:e})).accentColor||n[0]}(n,this._defaultPalette)},_initializeTheme:function(){const n=this;Ng(n._fontFields||[],function(e,t){n._initializeFont(Fg(n._theme,t))})},_initializeFont:function(n){eh(n,this._font,eh({},n))}}),Gp=th.inherit(function(){const n=function(r){return r?((r=(0,_.X)(!0,{},r)).title=(0,C.Kg)(m=r.title)?{text:m}:m,("logarithmic"===r.type&&r.logarithmBase<=0||r.logarithmBase&&!(0,C.kf)(r.logarithmBase))&&(r.logarithmBase=void 0,r.logarithmBaseError=!0),r.label&&r.label.alignment&&(r.label.userAlignment=!0),r):{};var m},e=function(r,m,A){const V=this._theme,X=A^"valueAxis"===r?"verticalAxis":"horizontalAxis",ce=n(m),_e=n(this._userOptions.commonAxisSettings),Me=(0,_.X)(!0,{},V.commonAxisSettings,V[X],V[r],_e,ce);return Me.workWeek=ce.workWeek||V[r].workWeek,Me.forceUserTickInterval|=(0,C.O9)(ce.tickInterval)&&!(0,C.O9)(ce.axisDivisionFactor),Me},t=function(r,m){m=m||this._userOptions[r];const A=this._theme[r];let V=this._mergedSettings[r];return V||(V=(0,C.Qd)(A)&&(0,C.Qd)(m)?(0,_.X)(!0,{},A,m):(0,C.O9)(m)?m:A,this._mergedSettings[r]=V,V)},i={base:t,argumentAxis:e,valueAxisRangeSelector:function(){return t.call(this,"valueAxis")},valueAxis:e,series:function(r,m,A){const V=this,X=V._theme;let ce=V._userOptions.commonSeriesSettings||{};const _e=X.commonSeriesSettings,Me=V._themeSection.split(".").slice(-1)[0],Ve=Wi(m.type||ce.type||_e.type||"pie"===Me&&X.type),Je=V.palette,rt=~Ve.indexOf("bar"),Ct=~Ve.indexOf("line"),Xt=~Ve.indexOf("area"),On="bubble"===Ve;let Fn;const oi=V.getOptions("resolveLabelsOverlapping"),Yt=V.getOptions("containerBackgroundColor"),$t=i.seriesTemplate.call(this);let xn;(rt||On)&&(xn=(m=(0,_.X)(!0,{},ce,ce[Ve],m)).visible,ce={type:{}},(0,_.X)(!0,m,m.point),m.visible=xn);const Gn=(0,_.X)(!0,{aggregation:{}},_e,_e[Ve],ce,ce[Ve],m);return Gn.aggregation.enabled="chart"===Me&&!!Gn.aggregation.enabled,Gn.type=Ve,Gn.widgetType=Me,Gn.containerBackgroundColor=Yt,Fn="pie"!==Me?mi(Gn.color,!0)||Je.getNextColor(A):function(qn,ii,qi){const ji=`${qn}-${ii}`;return V._multiPieColors[ji]||(V._multiPieColors[ji]=Je.getNextColor(qi)),V._multiPieColors[ji]},Gn.mainSeriesColor=Fn,Gn.resolveLabelsOverlapping=oi,Gn.label&&(Ct||Xt&&"rangearea"!==Ve||"scatter"===Ve)&&(Gn.label.position="outside"),$t&&(Gn.nameField=$t.nameField),Gn},animation:function(r){let m=this._userOptions[r];return m=(0,C.Qd)(m)?m:(0,C.O9)(m)?{enabled:!!m}:{},t.call(this,r,m)},seriesTemplate(){const r=t.call(this,"seriesTemplate");return r&&(r.nameField=r.nameField||"series"),r},zoomAndPan(){function r(A){const V="pan"===(A=Wi(A))||"both"===A,X="zoom"===A||"both"===A;return{pan:V,zoom:X,none:!V&&!X}}const m=t.call(this,"zoomAndPan");return{valueAxis:r(m.valueAxis),argumentAxis:r(m.argumentAxis),dragToZoom:!!m.dragToZoom,dragBoxStyle:{class:"dxc-shutter",fill:m.dragBoxStyle.color,opacity:m.dragBoxStyle.opacity},panKey:m.panKey,allowMouseWheel:!!m.allowMouseWheel,allowTouchGestures:!!m.allowTouchGestures}}};return{_themeSection:"chart",ctor:function(r){this.callBase.apply(this,arguments),this._userOptions=r.options||{},this._mergeAxisTitleOptions=[],this._multiPieColors={},this._callback=h.lQ},dispose:function(){return this.palette&&this.palette.dispose(),this.palette=this._userOptions=this._mergedSettings=this._multiPieColors=null,this.callBase.apply(this,arguments)},resetPalette:function(){this.palette.reset(),this._multiPieColors={}},getOptions:function(r){return(i[r]||i.base).apply(this,arguments)},refresh:function(){return this._mergedSettings={},this.callBase.apply(this,arguments)},_initializeTheme:function(){this.callBase.apply(this,arguments),this.updatePalette()},resetOptions:function(r){this._mergedSettings[r]=null},update:function(r){this._userOptions=r},updatePalette:function(){this.palette=this.createPalette(this.getOptions("palette"),{useHighlight:!0,extensionMode:this.getOptions("paletteExtensionMode")})}}}());var Yl=M(4761);const Bm={string:function(n){return(0,C.O9)(n)?""+n:n},numeric:function(n){if(!(0,C.O9)(n))return n;let e=Number(n);return isNaN(e)&&(e=void 0),e},datetime:function(n){if(!(0,C.O9)(n))return n;let e;const t=Number(n);return e=isNaN(t)?Yl.A.deserializeDate(n):new Date(t),isNaN(Number(e))&&(e=void 0),e}};function Vg(n){return"numeric"===n||"datetime"===n||"string"===n?n:""}const Wp=function(n){return Bm[Vg(n)]||h.lQ},nh="string",Bd="numeric",Qs="datetime",_l="discrete",nl="semidiscrete",Nd="continuous",sc="logarithmic",Vf="valueType",Hg="argumentType",$p=pi([nh,Bd,Qs]),q_=Array.isArray;function ut(n,e,t){const i=e?function(r,m){return r-m}:function(r,m){return m-r};return n.sort(function(r,m){const A=t(r),V=t(m),X=(0,C.O9)(A)?1:0,ce=(0,C.O9)(V)?1:0;return X&&ce?i(A,V):i(X,ce)}),n}function fn(n,e){const t=[];return n.forEach(function(i){const r=e(i);void 0!==r&&t.push(r)}),t}function Pi(n){return n}function Mo(n,e){let t=e;return e===nh||(0,C.Kg)(n)?t=nh:e===Qs||(0,C.$P)(n)?t=Qs:(0,C.kf)(n)&&(t=Bd),t}function vo(n,e,t,i){return n===nh&&(e===Nd||e===sc||e===nl)&&i("E2002"),e===sc?sc:t||e===_l||n===nh?_l:e===nl?nl:Nd}function Es(n,e,t){const i=n?Wp(n):Pi,r=e!==_l?function(m){return isFinite(m)||void 0===m?m:null}:Pi;return function(m,A){const V=r(i(m));return void 0===V&&function Ir(n,e,t){n&&t((0,C.kf)(n)||(0,C.$P)(n)||(0,C.Kg)(n)?"E2004":"E2003",[e])}(m,A,t),V}}function Va(n,e){let t;const i=e.length,r=(0,_.X)({},n);let m,A;for(t=0;t<i;++t)m=e[t][0],A=n[m],r[m]=e[t][1](A,m);return r}function xc(n,e){const t=n-e;return isNaN(t)?(0,C.O9)(n)?(0,C.O9)(e)?0:-1:1:t}function Kp(n,e){return n.slice().sort(function(t,i){return xc(t[e],i[e])})}function Hf(n,e,t,i){return n=function iv(n,e){const t=[],i=(0,C.O9)(n);let m,A,V,X,r=i&&!q_(n);if(i&&!r)for(m=0,A=n.length,V=0;m<A;++m)X=n[m],(0,C.Gv)(X)?t[V++]=X:X&&(r=!0);return r&&e("E2001"),t}(n,t),e.argumentType=e.argumentAxisType=null,function mt(n){n.forEach(function(e){e.valueType=e.valueAxisType=null,e.series.forEach(function(t){t.updateDataType({})}),e.valueAxis&&e.valueAxis.resetTypes(Vf)})}(e.groups),function Mt(n){n&&n.forEach(function(e){e.resetTypes(Hg)})}(e.argumentAxes),function yC(n,e,t){const i=[],r=[],m=e.argumentOptions&&$p(e.argumentOptions.argumentType);let A;e.groups.forEach(function(V){if(!V.series.length)return;const X=V.valueOptions&&$p(V.valueOptions.valueType);V.valueType=X,e.argumentType=m,!X&&i.push(V),!m&&r.push(V)}),(i.length||r.length)&&(A=i.map(function(V,X){return X}),n.some(function(V){let X;if(i.forEach(function(ce,_e){(function vC(n,e){return n.series.forEach(function(t){t.getValueFields().forEach(function(i){n.valueType=Mo(e[i],n.valueType)})}),n.valueType})(ce,V)&&A.indexOf(_e)>=0&&A.splice(_e,1)}),X||r.forEach(function(ce){X=function nv(n,e,t){return n.forEach(function(i){t.argumentType=Mo(e[i.getArgumentField()],t.argumentType)}),t.argumentType}(ce.series,V,e)}),!t&&X&&0===A.length)return!0}))}(n,e,i.checkTypeForAllData),function zg(n,e){const t=n.argumentOptions||{},r=vo(n.argumentType,t.type,!!(t&&t.categories||[]).length,e);n.groups.forEach(function(m){const A=m.valueOptions||{},X=vo(m.valueType,A.type,!!(A.categories||[]).length,e);m.series.forEach(function(ce){const _e={};_e.argumentAxisType=r,_e.valueAxisType=X,n.argumentAxisType=n.argumentAxisType||_e.argumentAxisType,m.valueAxisType=m.valueAxisType||_e.valueAxisType,_e.argumentType=n.argumentType,_e.valueType=m.valueType,_e.showZero=A.showZero,ce.updateDataType(_e)}),m.valueAxisType=m.valueAxisType||X,m.valueAxis&&(m.valueAxis.setTypes(m.valueAxisType,m.valueType,Vf),m.valueAxis.validate())}),n.argumentAxisType=n.argumentAxisType||r,n.argumentAxes&&n.argumentAxes.forEach(function(m){m.setTypes(n.argumentAxisType,n.argumentType,Hg),m.validate()})}(e,t),i.convertToAxisDataType&&(n=function ac(n,e){const t=[];let i;const r=n.length;for(t.length=r,i=0;i<r;++i)t[i]=Va(n[i],e);return t}(n,function Bs(n,e){const t=Es(n.argumentType,n.argumentAxisType,e);let i,r;const m=[t],A={},V=[];n.groups.forEach(function(X,ce){X.series.forEach(function(_e){r=Es(X.valueType,X.valueAxisType,e),i=Es(Bd,Nd,e),A[_e.getArgumentField()]=t,_e.getValueFields().forEach(function(Me){m[ce+1]=r,A[Me]=r}),_e.getSizeField()&&(A[_e.getSizeField()]=i)})});for(const X in A)V.push([X,A[X]]);return V.length&&function ni(n,e){const t=n.argumentOptions&&n.argumentOptions.categories;n.groups.forEach(function(i,r){const m=i.valueOptions&&i.valueOptions.categories;m&&(i.valueOptions.categories=fn(m,e[r+1]))}),t&&(n.argumentOptions.categories=fn(t,e[0]))}(n,m),V}(e,t))),function wd(n,e){const t=e.groups[0]&&e.groups[0].series[0];t&&("pie"===t.type||"doughnut"===t.type||"donut"===t.type)&&e.groups.forEach(function(r){r.series.forEach(function(m){!function Fc(n,e,t,i){const r=(i=i||{}).mode,m={};if(!r||"none"===r)return;m[e]=String(i.groupName||"others"),m[t]=0;const A=ut(n.slice(),!1,function(V){return V[t]});(function lt(n,e,t,i){i>=0&&n.slice(i).forEach(function(r){(0,C.O9)(r[t])&&(e[t]+=r[t],r[t]=void 0)})})(A,m,t,"smallValueThreshold"===r?function lc(n,e,t){let i;const r=n.length;let m;for(i=0;i<r&&(m=n[i][e],!((0,C.O9)(m)&&t>m));++i);return i}(A,t,i.threshold):i.topCount),m[t]&&n.push(m)}(n,m.getArgumentField(),m.getValueFields()[0],m.getOptions().smallValuesGrouping)})})}(n,e),function tv(n,e,t,i){const r={},m=e.argumentAxisType===_l,A=m&&e.argumentOptions&&e.argumentOptions.categories;let V=function(_e){return _e};const X=t.sortingMethod;let ce;return!A&&(0,C.Tn)(X)&&(n=function ev(n,e){return n.slice().sort(e)}(n,X)),m&&(e.categories=function CC(n,e,t){const i=t?t.slice():[];return e.forEach(function(r){n.forEach(function(m){const A=m[r];(0,C.O9)(A)&&function Ug(n,e){return-1===n.map(function(t){return t.valueOf()}).indexOf(e.valueOf())}(i,A)&&i.push(A)})}),i}(n,i,A)),A||!(0,C.Tn)(X)&&e.argumentType===nh&&!t._skipArgumentSorting?V=function Gy(n){const e={};return n.forEach(function(t,i){e[t]=i}),function(t,i){return ut(t.slice(),!0,function(r){return e[r[i]]})}}(e.categories):!0===X&&e.argumentType!==nh&&(V=Kp,ce=m),i.forEach(function(_e){r[_e]=V(n,_e)}),ce&&(e.categories=e.categories.sort(xc)),r}(n,e,i,function jp(n){const e=[],t={};return n.groups.forEach(function(i){i.series.forEach(function(r){!function wh(n,e,t){t[n]||(e.push(n),t[n]=!0)}(r.getArgumentField(),e,t)})}),e}(e))}const Ru=Number,ih=pi(["left","center","right"]),op=pi(["top","bottom"]);function Al(n){return!!(n&&String(n).length>0)}function Nm(n,e,t,i,r){n.attr({text:e}).setMaxSize(t,r,i).textChanged&&n.setTitle(e)}function Fm(n){return n>=0?Ru(n):10}let Gg=function(n){this._params=n,this._group=n.renderer.g().attr({class:n.cssClass}).linkOn(n.root||n.renderer.root,"title"),this._hasText=!1};(0,_.X)(Gg.prototype,$e.prototype,{dispose:function(){const n=this;n._group.linkRemove(),n._group.linkOff(),n._titleElement&&(n._clipRect.dispose(),n._titleElement=n._subtitleElement=n._clipRect=null),n._params=n._group=n._options=null},_updateOptions:function(n){this._options=n,this._options.horizontalAlignment=ih(n.horizontalAlignment,"center"),this._options.verticalAlignment=op(n.verticalAlignment,"top"),this._options.margin=function Uf(n){let e;return e=n>=0?{left:Ru(n),top:Ru(n),right:Ru(n),bottom:Ru(n)}:{left:Fm((n=n||{}).left),top:Fm(n.top),right:Fm(n.right),bottom:Fm(n.bottom)},e}(n.margin)},_updateStructure:function(){const n=this,e=n._params.renderer,t=n._group,i=n._options,r=i.horizontalAlignment;n._titleElement||(n._titleElement=e.text().append(t),n._subtitleElement=e.text(),n._clipRect=e.clipRect(),t.attr({"clip-path":n._clipRect.id})),n._titleElement.attr({align:r,class:i.cssClass}),n._subtitleElement.attr({align:r,class:i.subtitle.cssClass}),t.linkAppend(),Al(i.subtitle.text)?n._subtitleElement.append(t):n._subtitleElement.remove()},_updateTexts:function(){const n=this._options,e=n.subtitle,t=this._titleElement,i=this._subtitleElement;let r;t.attr({text:"A",y:0}).css(Ti(n.font)),r=t.getBBox(),this._baseLineCorrection=r.height+r.y,t.attr({text:n.text}),r=t.getBBox(),t.attr({y:-r.y}),Al(e.text)&&i.attr({text:e.text,y:0}).css(Ti(e.font))},_shiftSubtitle(){const n=this._titleElement.getBBox(),e=this._subtitleElement,t=this._options.subtitle.offset;e.move(0,n.y+n.height-e.getBBox().y-t)},_updateBoundingRectAlignment:function(){const n=this._boundingRect,e=this._options;n.verticalAlignment=e.verticalAlignment,n.horizontalAlignment=e.horizontalAlignment,n.cutLayoutSide=e.verticalAlignment,n.cutSide="vertical",n.position={horizontal:e.horizontalAlignment,vertical:e.verticalAlignment}},hasText:function(){return this._hasText},update:function(n,e){const t=this,i=(0,_.X)(!0,{},n,function Wc(n){const e=(0,C.Kg)(n)?{text:n}:n||{};return e.subtitle=(0,C.Kg)(e.subtitle)?{text:e.subtitle}:e.subtitle||{},e}(e)),r=Al(i.text),m=r||r!==t._hasText;return t._baseLineCorrection=0,t._updateOptions(i),t._boundingRect={},r?(t._updateStructure(),t._updateTexts()):t._group.linkRemove(),t._updateBoundingRect(),t._updateBoundingRectAlignment(),t._hasText=r,m},draw:function(n,e){const t=this;return t._hasText&&(t._group.linkAppend(),t._correctTitleLength(n),t._group.getBBox().height>e&&this.freeSpace()),t},_correctTitleLength:function(n){const e=this,t=e._options,i=t.margin,r=n-i.left-i.right;let m=t.placeholderSize;Nm(e._titleElement,t.text,r,t,m),e._subtitleElement&&(Ru(m)>0&&(m-=e._titleElement.getBBox().height),Nm(e._subtitleElement,t.subtitle.text,r,t.subtitle,m),e._shiftSubtitle()),e._updateBoundingRect();const{x:A,y:V,height:X}=this.getCorrectedLayoutOptions();this._clipRect.attr({x:A,y:V,width:n,height:X})},getLayoutOptions:function(){return this._boundingRect||null},shift:function(n,e){const t=this.getLayoutOptions();return this._group.move(n-t.x,e-t.y),this},_updateBoundingRect:function(){const n=this,e=n._options,t=e.margin,i=n._boundingRect,r=n._hasText?n._group.getBBox():{width:0,height:0,x:0,y:0,isEmpty:!0};r.isEmpty||(r.height+=t.top+t.bottom-n._baseLineCorrection,r.width+=t.left+t.right,r.x-=t.left,r.y+=n._baseLineCorrection-t.top),e.placeholderSize>0&&(r.height=e.placeholderSize),i.height=r.height,i.width=r.width,i.x=r.x,i.y=r.y},getCorrectedLayoutOptions(){const n=this.getLayoutOptions(),e=this._baseLineCorrection;return(0,_.X)({},n,{y:n.y-e,height:n.height+e})},layoutOptions:function(){return this._hasText?{horizontalAlignment:this._boundingRect.horizontalAlignment,verticalAlignment:this._boundingRect.verticalAlignment,priority:0}:null},measure:function(n){return this.draw(n[0],n[1]),[this._boundingRect.width,this._boundingRect.height]},move:function(n,e){!function xC(n,e){return n[2]-n[0]<e.width||n[3]-n[1]<e.height}(n,this._boundingRect)?this.shift(Math.round(n[0]),Math.round(n[1])):this.shift(e[0],e[1])},freeSpace:function(){this._params.incidentOccurred("W2103"),this._group.linkRemove(),this._boundingRect.width=this._boundingRect.height=0},getOptions:function(){return this._options},changeLink:function(n){this._group.linkRemove(),this._group.linkOn(n,"title")}});const Xp={name:"title",init:function(){this._title=new Gg({renderer:this._renderer,cssClass:this._rootClassPrefix+"-title",incidentOccurred:this._incidentOccurred}),this._layout.add(this._title)},dispose:function(){this._title.dispose(),this._title=null},customize:function(n){n.addChange({code:"TITLE",handler:function(){this._title.update(this._themeManager.theme("title"),this.option("title"))&&this._change(["LAYOUT"])},isThemeDependent:!0,option:"title",isOptionChange:!0})},fontFields:["title.font","title.subtitle.font"]};var gr=M(6110),ov=M(4356);const rv=(0,gr.zk)(),ts="hidden-for-export";function ra(n,e){return function vl(n){let e=!0;return-1===n.indexOf("xmlns:xlink")&&(n=n.replace("<svg",'<svg xmlns:xlink="http://www.w3.org/1999/xlink"')),(n=n.replace(/xmlns="[\s\S]*?"/gi,function(t){return e?(e=!1,t):""})).replace(/xmlns:NS1="[\s\S]*?"/gi,"").replace(/NS1:xmlns:xlink="([\s\S]*?)"/gi,'xmlns:xlink="$1"')}(function Or(n){return n.replace(/&quot;/gi,"&#34;").replace(/&amp;/gi,"&#38;").replace(/&apos;/gi,"&#39;").replace(/&lt;/gi,"&#60;").replace(/&gt;/gi,"&#62;").replace(/&nbsp;/gi,"&#160;").replace(/&shy;/gi,"&#173;")}(function zf(n,e){const t=c.A.createElement("div"),i=n.cloneNode(!0);return e&&(0,a.A)(i).css("backgroundColor",e),t.appendChild(i),t.innerHTML}(n,e)))}function Td(n){return(0,C.Kg)(n)?(new rv.DOMParser).parseFromString(n,"image/svg+xml").childNodes[0]:c.A.isNode(n)?n:(0,C.Kb)(n)?n.get(0):void 0}var Zl=M(608);const cc=function(){},Yp={easeOutCubic:function(n,e,t){return 1===n?t:(1-Math.pow(1-n,3))*(t-e)+ +e},linear:function(n,e,t){return 1===n?t:n*(t-e)+ +e}},qa={segments:function(n,e,t,i,r){const m=e.from,A=e.to;let V,X,ce,_e;const Me=[];for(ce=0;ce<m.length;ce++){if(V=m[ce],X=[V[0]],V.length>1)for(_e=1;_e<V.length;_e++)X.push(i(t,V[_e],A[ce][_e]));Me.push(X)}r.segments=e.end&&1===t?e.end:Me,n.attr({segments:Me})},arc:function(n,e,t,i){const r=e.from,m=e.to,A={};for(const V in r)A[V]=i(t,r[V],m[V]);n.attr(A)},transform:function(n,e,t,i,r){const m=e.from,A=e.to,V={};for(const X in m)V[X]=r[X]=i(t,m[X],A[X]);n.attr(V)},base:function(n,e,t,i,r,m){const A={};A[m]=r[m]=i(t,e.from,e.to),n.attr(A)},_:cc,complete:function(n,e){n.attr(e)}};function Ql(n){const e=this,t=e._animateStep;let i;for(i in e._progress=e._calcProgress(n),e.params)(t[i]||t.base)(e.element,e.params[i],e._progress,e._easing,e._currentParams,i);return e.options.step&&e.options.step(e._easing(e._progress,0,1),e._progress),1!==e._progress||e.stop()}function oh(n){return n-this._startTime>=this.delay&&(this.tick=Ql),!0}function Is(n){return this._startTime=n,this.tick=this.delay?oh:Ql,!0}function rp(n,e,t){this._progress=0,this.element=n,this.params=e,this.options=t,this.duration=t.partitionDuration?t.duration*t.partitionDuration:t.duration,this.delay=t.delay&&t.duration*t.delay||0,this._animateStep=t.animateStep||qa,this._easing=Yp[t.easing]||Yp.easeOutCubic,this._currentParams={},this.tick=Is}function sv(n){this._animationCount=0,this._timerId=null,this._animations={},this.element=n}rp.prototype={_calcProgress:function(n){return Math.min(1,(n-this.delay-this._startTime)/this.duration)},stop:function(n){const e=this.options,t=this._animateStep;this.stop=this.tick=cc,t.complete&&t.complete(this.element,this._currentParams),e.complete&&!n&&e.complete()}},sv.prototype={_loop:function(){const n=this,e=n._animations;let t=0;const i=(new Date).getTime();let r;const m=n._endAnimation;for(r in e)e[r].tick(i)||delete e[r],t++;if(0===t)return n.stop(),void(n._endAnimationTimer=m&&setTimeout(function(){0===n._animationCount&&(m(),n._endAnimation=null)}));n._timerId=Zl.x.call(null,function(){n._loop()},n.element)},addAnimation:function(n){const e=this;e._animations[e._animationCount++]=n,clearTimeout(e._endAnimationTimer),e._timerId||(clearTimeout(e._startDelay),e._startDelay=setTimeout(function(){e._timerId=1,e._loop()},0))},animateElement:function(n,e,t){n&&e&&t&&(n.animation&&n.animation.stop(),this.addAnimation(n.animation=new rp(n,e,t)))},onEndAnimation:function(n){this._animationCount?this._endAnimation=n:n()},dispose:function(){this.stop(),this.element=null},stop:function(){this._animations={},this._animationCount=0,(0,Zl.u)(this._timerId),clearTimeout(this._startDelay),clearTimeout(this._endAnimationTimer),this._timerId=null},lock:function(){let n;const e=this._animations;let t,i;for(n in e)t=e[n].options.unstoppable,i=i||t,t||(e[n].stop(!0),delete e[n]);!i&&this.stop()}};const sp=(0,gr.zk)(),{max:Ol,round:ap}=Math,Gf={"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,widows:!0,"z-index":!0,zoom:!0},ou="stroke",Ha="stroke-width",ss="stroke-opacity",dp="font-size",Zp="font-style",ku="font-weight",Wf="text-decoration",il="none",Wg=12,sl="...",Ul=function(){return Object.create?function(n){return Object.create(n)}:function(n){const e=function(){};return e.prototype=n,new e}}(),Vm={scaleX:1,scaleY:1,"pointer-events":null},Dd=(0,ov.A)(function(){const n=c.A.createElement("div");return n.style.left="-9999px",n.style.position="absolute",{backupContainer:n,backupCounter:0}});function ah(n){return n&&"string"!=typeof n}function av(n){return c.A.createElementNS("http://www.w3.org/2000/svg",n)}function Um(n,e){return null!==n?"url("+(e?sp.location.href.split("#")[0]:"")+"#"+n+")":n}function Jl(n,e){let t;for(t in e)n[t]=e[t];return n}const lv={full:il,lefttop:"xMinYMin",leftcenter:"xMinYMid",leftbottom:"xMinYMax",centertop:"xMidYMin",center:"xMidYMid",centerbottom:"xMidYMax",righttop:"xMaxYMin",rightcenter:"xMaxYMid",rightbottom:"xMaxYMax"};function cv(n,e){return e.hatching&&"none"!==Wi(e.hatching.direction)?((e=Jl({},e)).fill=n._hatching=n.renderer.lockDefsElements({color:e.fill,hatching:e.hatching},n._hatching,"pattern"),delete e.filter):n._hatching?(n.renderer.releaseDefsElements(n._hatching),n._hatching=null,delete e.filter):e.filter?(e=Jl({},e)).filter=n._filter=n.renderer.lockDefsElements({},n._filter,"filter"):n._filter&&(n.renderer.releaseDefsElements(n._filter),n._filter=null),delete e.hatching,e}const Qp=function(n,e,t,i,r,m,A,V,X,ce){return["M",(n+i*r).toFixed(5),(e-i*m).toFixed(5),"A",i.toFixed(5),i.toFixed(5),0,ce,0,(n+i*A).toFixed(5),(e-i*V).toFixed(5),X?"M":"L",(n+t*A).toFixed(5),(e-t*V).toFixed(5),"A",t.toFixed(5),t.toFixed(5),0,ce,1,(n+t*r).toFixed(5),(e-t*m).toFixed(5),"Z"].join(" ")};function SC(n,e){let t=[["M",0,0]];switch(e){case"line":t=up(n);break;case"area":t=up(n,!0);break;case"bezier":t=EC(n);break;case"bezierarea":t=EC(n,!0)}return t}function up(n,e){return zm(n,dv,e)}function EC(n,e){return zm(n,OC,e)}function zm(n,e,t){var i;let r,m;const A=[];if(null!==(i=n[0])&&void 0!==i&&i.length)for(r=0,m=n.length;r<m;++r)e(n[r],t,A);else e(n,t,A);return A}function dv(n,e,t){let i=0;const r=t.length;let m=r;const A=(n||[]).length;if(A){if(void 0!==n[0].x)for(;i<A;)t[m++]=["L",n[i].x,n[i++].y];else for(;i<A;)t[m++]=["L",n[i++],n[i++]];t[r][0]="M"}else t[m]=["M",0,0];return e&&t.push(["Z"]),t}function OC(n,e,t){let i,r=t.length;const m=(n||[]).length;if(m)if(void 0!==n[0].x)for(t[r++]=["M",n[0].x,n[0].y],i=1;i<m;)t[r++]=["C",n[i].x,n[i++].y,n[i].x,n[i++].y,n[i].x,n[i++].y];else for(t[r++]=["M",n[0],n[1]],i=2;i<m;)t[r++]=["C",n[i++],n[i++],n[i++],n[i++],n[i++],n[i++]];else t[r]=["M",0,0];return e&&t.push(["Z"]),t}function Wm(n,e){const t=n[n.length-2],i=n[n.length-1];switch(e){case"line":case"area":n[0]="L";break;case"bezier":case"bezierarea":n[0]="C",n[1]=n[3]=n[5]=t,n[2]=n[4]=n[6]=i}}function Wy(n,e,t){const i=n[n.length-1].slice();let r=n.length;for(Wm(i,t);r<e.length;r++)n[r]=i.slice(0)}function Ux(n,e,t){let i,r;const m=n.length,A=e.length;let V,X;if((m-1)%2==0&&(A-1)%2==0){i=(m-1)/2-1,r=n.slice(0,i+1),V=r[r.length-1].slice(0),X=n.slice(i+1)[0].slice(0),Wm(V,t),Wm(X,t);for(let ce=i;ce<(A-1)/2-1;ce++)n.splice(ce+1,0,V),n.splice(ce+3,0,X)}}function $m(n,e){const t=n._styles;let i,r;for(i in e=e||{})r=e[i],(0,C.O9)(r)&&(r+="number"!=typeof r||Gf[i]?"":"px",t[i]=""!==r?r:null);for(i in t)r=t[i],r?n.element.style[i]=r:null===r&&(n.element.style[i]="");return n}function $g(n,e){const t=n.element,i=n.attr(e);i&&-1!==i.indexOf("DevExpress")&&(t.removeAttribute(e),t.setAttribute(e,Um(i,n.renderer.pathModified)))}function Th(n,e){const t=n._settings,i={};let r,m;const A=n.element,V=n.renderer,X=V.rtl;let ce,_e,Me,Ve;if(!ah(e=e||{}))return e in t?t[e]:e in Vm?Vm[e]:0;for(r in Jl(i,e),i)if(m=i[r],void 0!==m){if(t[r]=m,"align"===r)r="text-anchor",m={left:X?"end":"start",center:"middle",right:X?"start":"end"}[m]||null;else{if("dashStyle"===r){_e=!0;continue}if(r===Ha)_e=!0;else if(!m||"fill"!==r&&"clip-path"!==r&&"filter"!==r||0!==m.indexOf("DevExpress")){if(/^(translate(X|Y)|rotate[XY]?|scale(X|Y)|sharp|sharpDirection)$/i.test(r)){ce=!0;continue}/^(x|y|d)$/i.test(r)&&(ce=!0)}else n._addFixIRICallback(),m=Um(m,V.pathModified)}null===m?A.removeAttribute(r):A.setAttribute(r,m)}if(_e&&"dashStyle"in t)if(m=t.dashStyle,Me=("_originalSW"in n?n._originalSW:t[Ha])||1,r="stroke-dasharray",m=null===m?"":Wi(m),""===m||"solid"===m||m===il)n.element.removeAttribute(r);else{for(m=m.replace(/longdash/g,"8,3,").replace(/dash/g,"4,3,").replace(/dot/g,"1,3,").replace(/,$/,"").split(","),Ve=m.length;Ve--;)m[Ve]=parseInt(m[Ve])*Me;n.element.setAttribute(r,m.join(","))}return ce&&n._applyTransformation(),n}function jm(n,e,t,i,r){let m,A,V,X,ce;if(void 0!==t.wholeText)n.push({value:t.wholeText,style:i,className:r,line:e,height:i[dp]||0});else if("BR"===t.tagName)++e;else if(c.A.isElementNode(t)){switch(Jl(m={},i),t.tagName){case"B":case"STRONG":m[ku]="bold";break;case"I":case"EM":m[Zp]="italic";break;case"U":m[Wf]="underline"}for(A=t.style,A.color&&(m.fill=A.color),A.fontSize&&(m[dp]=A.fontSize),A.fontStyle&&(m[Zp]=A.fontStyle),A.fontWeight&&(m[ku]=A.fontWeight),A.textDecoration&&(m[Wf]=A.textDecoration),V=0,ce=t.childNodes,X=ce.length;V<X;++V)e=jm(n,e,ce[V],m,t.className||r)}return e}function Xm(n,e,t){let i,r,m;for(i=0,r=n.length;i<r;++i)m=n[i],m[t]=av("tspan"),m[t].appendChild(c.A.createTextNode(m.value)),m.style&&$m({element:m[t],_styles:{}},m.style),m.className&&m[t].setAttribute("class",m.className),e.appendChild(m[t])}function $f(){this._hasEllipsis&&this.attr({text:this._settings.text})}function Yg(n){let e;return n&&(e=n.cloneNode(),e.removeAttribute("y"),e.removeAttribute("x")),e||n}function jf(n){const e=c.A.querySelectorAll(n,"title");for(let t=0;t<e.length;t++)n.removeChild(e[t]);return e}function gv(n,e,t,i){let r,m;if(t<=e&&i>e)for(r=1,m=n.value.length;r<=m;++r)if(t+n.tspan.getSubStringLength(0,r)>e)return r-1}function ha(n){return n.value.length?n.tspan.getSubStringLength(0,n.value.length):0}function Zt(n,e){let{hideOverflowEllipsis:t}=e;return t&&0===n?"":sl}function li(n,e,t){const i=Zt(e,t);if(n.value.length&&n.tspan.parentNode)for(let r=n.value.length-1;r>=1;r--){if(n.startBox+n.tspan.getSubStringLength(0,r)<e){yr(n,r,i);break}1===r&&yr(n,0,i)}}function Gi(n,e,t,i,r){const m=n.value;let A;"none"!==i.wordWrap&&(A="normal"===i.wordWrap?function Sn(n,e){const t=n.startBox>0?[0]:[],i=n.value.split("").reduce((m,A,V)=>(" "===A&&m.push(V),m),t);let r=0;for(;void 0!==i[r+1]&&n.startBox+n.tspan.getSubStringLength(0,i[r+1])<e;)r++;return i[r]}(n,e):function nt(n,e){for(let t=0;t<n.value.length-1;t++)if(n.startBox+n.tspan.getSubStringLength(0,t+1)>e)return t}(n,e));let X,V=[];if(isFinite(A)&&(0!==r||0!==A)){yr(n,A,"");const Me=m.slice(A+(" "===m[A]?1:0));if(Me.length){const Ve=Yg(n.tspan);if(Ve.textContent=Me,n.tspan.parentNode.appendChild(Ve),X=Jl(Jl({},n),{value:Me,startBox:0,height:0,tspan:Ve,stroke:Yg(n.stroke),endBox:Ve.getSubStringLength(0,Me.length)}),X.stroke&&(X.stroke.textContent=Me),X.endBox>e&&(V=Gi(X,e,t,i,A),!V.length))return[]}}if(n.value.length){if("ellipsis"===i.textOverflow&&n.tspan.getSubStringLength(0,n.value.length)>e&&li(n,t,i),"hide"===i.textOverflow&&n.tspan.getSubStringLength(0,n.value.length)>e)return[]}else n.tspan.parentNode.removeChild(n.tspan);const ce=[];return X&&ce.push(X),[{commonLength:m.length,parts:ce}].concat(V)}function yr(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sl;const i=n.value.substr(0,e)+t;n.value=n.tspan.textContent=i,n.stroke&&(n.stroke.textContent=i),t===sl&&(n.hasEllipsis=!0)}function Ur(n){n.tspan.parentNode&&n.tspan.parentNode.removeChild(n.tspan),n.stroke&&n.stroke.parentNode&&n.stroke.parentNode.removeChild(n.stroke)}function Us(n,e,t){n.tspan.setAttribute(e,t),n.stroke&&n.stroke.setAttribute(e,t)}function ca(n,e){return n.inherits?Js(n.height,e):n.height||e}function Ds(n){if(!n._texts)return;const e=n._texts,t=n._settings.x,i=n._getLineHeight();let r,m,A=e[0];for(Us(A,"x",t),Us(A,"y",n._settings.y),r=1,m=e.length;r<m;++r)A=e[r],parseFloat(A.height)>=0&&(Us(A,"x",t),Us(A,"dy",ca(A,i)))}function Js(n,e){const t=parseFloat(n),i=parseFloat(e),r=t||Wg,m=i||Wg;return r>m?isNaN(t)?r:n:isNaN(i)?m:e}function el(n,e,t,i){let r,m;t=t||{};const A=n.renderer,V=n._settings,X={},ce={translateX:0,translateY:0,scaleX:1,scaleY:1,rotate:0,rotateX:0,rotateY:0};if(i&&(t.complete=i),A.animationEnabled()){for(r in e)m=e[r],/^(translate(X|Y)|rotate[XY]?|scale(X|Y))$/i.test(r)?(X.transform=X.transform||{from:{},to:{}},X.transform.from[r]=r in V?Number(V[r].toFixed(3)):ce[r],X.transform.to[r]=m):X[r]="arc"===r||"segments"===r?m:{from:r in V?V[r]:parseFloat(n.element.getAttribute(r)||0),to:m};A.animateElement(n,X,Jl(Jl({},A._animation),t))}else t.step&&t.step.call(n,1,1),t.complete&&t.complete.call(n),n.attr(e);return n}function pa(n,e){const t={is:!1,name:e.name||e,after:e.after};return n?t.to=n:t.virtual=!0,t}let ga=function(n,e,t){const i=this;i.renderer=n,i.element=av(e),i._settings={},i._styles={},"path"===e&&(i.type=t||"line")};function Ya(n){Vc.remove(n)}ga.prototype={constructor:ga,_getJQElement:function(){return this._$element||(this._$element=(0,a.A)(this.element))},_addFixIRICallback:function(){const n=this,e=function(){$g(n,"fill"),$g(n,"clip-path"),$g(n,"filter")};n.element._fixFuncIri=e,e.renderer=n.renderer,Vc.add(e),n._addFixIRICallback=function(){}},_clearChildrenFuncIri:function(){const n=function(e){let t;for(t=0;t<e.childNodes.length;t++)Ya(e.childNodes[t]._fixFuncIri),n(e.childNodes[t])};n(this.element)},dispose:function(){return Ya(this.element._fixFuncIri),this._clearChildrenFuncIri(),this._getJQElement().remove(),this},append:function(n){return(n||this.renderer.root).element.appendChild(this.element),this},remove:function(){const n=this.element;return n.parentNode&&n.parentNode.removeChild(n),this},enableLinks:function(){return this._links=[],this},virtualLink:function(n){return fc({_link:pa(null,n)},this),this},linkAfter:function(n){return this._linkAfter=n,this},linkOn:function(n,e){return this._link=pa(n,e),fc(this,n),this},linkOff:function(){return function hd(n){let e;const t=n._link.to._links;for(e=0;t[e]!==n;++e);t.splice(e,1),Sc(t,e)}(this),this._link=null,this},linkAppend:function(){const n=this._link,e=n.to._links;let t,i;for(t=n.i+1;(i=e[t])&&!i._link.is;++t);return this._insert(n.to,i),n.is=!0,this},_insert:function(n,e){n.element.insertBefore(this.element,e?e.element:null)},linkRemove:function(){return this.remove(),this._link.is=!1,this},clear:function(){return this._clearChildrenFuncIri(),this._getJQElement().empty(),this},toBackground:function(){const n=this.element,e=n.parentNode;return e&&e.insertBefore(n,e.firstChild),this},toForeground:function(){const n=this.element,e=n.parentNode;return e&&e.appendChild(n),this},attr:function(n){return Th(this,n)},smartAttr:function(n){return this.attr(cv(this,n))},css:function(n){return $m(this,n)},animate:function(n,e,t){return el(this,n,e,t)},sharp(n,e){return this.attr({sharp:n||!0,sharpDirection:e})},_applyTransformation(){const n=this._settings;let e,t;const i=[],r=n.sharp,m=n.sharpDirection||1,A=n[Ha]%2;i.push("translate("+((n.translateX||0)+(!A||"h"!==r&&!0!==r?0:.5*m))+","+((n.translateY||0)+(!A||"v"!==r&&!0!==r?0:.5*m))+")"),n.rotate&&(e="rotateX"in n?n.rotateX:n.x,t="rotateY"in n?n.rotateY:n.y,i.push("rotate("+n.rotate+","+(e||0)+","+(t||0)+")"));const ce=(0,C.O9)(n.scaleX),_e=(0,C.O9)(n.scaleY);(ce||_e)&&i.push("scale("+(ce?n.scaleX:1)+","+(_e?n.scaleY:1)+")"),i.length&&this.element.setAttribute("transform",i.join(" "))},move:function(n,e,t,i){const r={};return(0,C.O9)(n)&&(r.translateX=n),(0,C.O9)(e)&&(r.translateY=e),t?this.animate(r,i):this.attr(r),this},rotate:function(n,e,t,i,r){const m={rotate:n||0};return(0,C.O9)(e)&&(m.rotateX=e),(0,C.O9)(t)&&(m.rotateY=t),i?this.animate(m,r):this.attr(m),this},_getElementBBox:function(){const n=this.element;let e;try{e=n.getBBox&&n.getBBox()}catch{}return e||{x:0,y:0,width:n.offsetWidth||0,height:n.offsetHeight||0}},getBBox:function(){const n=this._settings;let e=this._getElementBBox();return e=n.rotate?hr(e,[("rotateX"in n?n.rotateX:n.x)||0,("rotateY"in n?n.rotateY:n.y)||0],-n.rotate):xr(e),e},markup:function(){return ra(this.element)},getOffset:function(){return this._getJQElement().offset()},stopAnimation:function(n){const e=this.animation;return e&&e.stop(n),this},setTitle:function(n){const e=av("title");e.textContent=n||"",this.element.appendChild(e)},removeTitle(){jf(this.element)},data:function(n,e){const t=this.element;let i;if(void 0!==e)t[n]=e;else for(i in n)t[i]=n[i];return this},on:function(){const n=[this._getJQElement()];return n.push.apply(n,arguments),L.A.on.apply(L.A,n),this},off:function(){const n=[this._getJQElement()];return n.push.apply(n,arguments),L.A.off.apply(L.A,n),this},trigger:function(){const n=[this._getJQElement()];return n.push.apply(n,arguments),L.A.trigger.apply(L.A,n),this}};let Cl=function(n,e){ga.call(this,n,"path",e)};Jl(Cl.prototype=Ul(ga.prototype),{constructor:Cl,attr:function jg(n){const e=this;let t;return ah(n)&&(t=(n=Jl({},n)).segments,"points"in n&&(t=SC(n.points,e.type),delete n.points),t&&(n.d=function Hx(n){const e=[];let i,t=0;const r=n.length;let m,A,V;for(i=0;i<r;++i)for(m=n[i],A=0,V=m.length;A<V;++A)e[t++]=m[A];return e.join(" ")}(t),e.segments=t,delete n.segments)),Th(e,n)},animate:function ol(n,e,t){const i=this,r=i.segments||[];let m,A;return i.renderer.animationEnabled()&&"points"in n&&(m=SC(n.points,i.type),A=function Gm(n,e,t){const i=n.length,r=e.length;let m,A;const V=-1!==t.indexOf("area")?Ux:Wy;if(0===i)for(m=0;m<r;m++)n.push(e[m].slice(0));else i<r?V(n,e,t):i>r&&(A=e.slice(0),V(e,n,t));return A}(r,m,i.type),n.segments={from:r,to:m,end:A},delete n.points),el(i,n,e,t)}});let ql=function(n){ga.call(this,n,"path","arc")};Jl(ql.prototype=Ul(ga.prototype),{constructor:ql,attr:function zx(n){const e=this._settings;let t,i,r,m,A,V;return ah(n)&&("x"in(n=Jl({},n))||"y"in n||"innerRadius"in n||"outerRadius"in n||"startAngle"in n||"endAngle"in n)&&(e.x=t="x"in n?n.x:e.x,delete n.x,e.y=i="y"in n?n.y:e.y,delete n.y,e.innerRadius=r="innerRadius"in n?n.innerRadius:e.innerRadius,delete n.innerRadius,e.outerRadius=m="outerRadius"in n?n.outerRadius:e.outerRadius,delete n.outerRadius,e.startAngle=A="startAngle"in n?n.startAngle:e.startAngle,delete n.startAngle,e.endAngle=V="endAngle"in n?n.endAngle:e.endAngle,delete n.endAngle,n.d=Qp.apply(null,or(t,i,r,m,A,V))),Th(this,n)},animate:function ns(n,e,t){const i=this._settings,r={from:{},to:{}};return this.renderer.animationEnabled()&&("x"in n||"y"in n||"innerRadius"in n||"outerRadius"in n||"startAngle"in n||"endAngle"in n)&&(r.from.x=i.x||0,r.from.y=i.y||0,r.from.innerRadius=i.innerRadius||0,r.from.outerRadius=i.outerRadius||0,r.from.startAngle=i.startAngle||0,r.from.endAngle=i.endAngle||0,r.to.x="x"in n?n.x:i.x,delete n.x,r.to.y="y"in n?n.y:i.y,delete n.y,r.to.innerRadius="innerRadius"in n?n.innerRadius:i.innerRadius,delete n.innerRadius,r.to.outerRadius="outerRadius"in n?n.outerRadius:i.outerRadius,delete n.outerRadius,r.to.startAngle="startAngle"in n?n.startAngle:i.startAngle,delete n.startAngle,r.to.endAngle="endAngle"in n?n.endAngle:i.endAngle,delete n.endAngle,n.arc=r),el(this,n,e,t)}});let zl=function(n){ga.call(this,n,"rect")};Jl(zl.prototype=Ul(ga.prototype),{constructor:zl,attr:function Gx(n){const e=this;let t,i,r,m,A,V,X;return ah(n)&&((void 0!==(n=Jl({},n)).x||void 0!==n.y||void 0!==n.width||void 0!==n.height||void 0!==n[Ha])&&(t=void 0!==n.x?e._originalX=n.x:e._originalX||0,i=void 0!==n.y?e._originalY=n.y:e._originalY||0,r=void 0!==n.width?e._originalWidth=n.width:e._originalWidth||0,m=void 0!==n.height?e._originalHeight=n.height:e._originalHeight||0,A=void 0!==n[Ha]?e._originalSW=n[Ha]:e._originalSW,V=~~((r<m?r:m)/2),X=(A||0)<V?A||0:V,n.x=t+X/2,n.y=i+X/2,n.width=r-X,n.height=m-X,((A||0)!==X||!(0===X&&void 0===A))&&(n[Ha]=X)),"sharp"in n&&delete n.sharp),Th(e,n)}});let Il=function(n){ga.call(this,n,"text"),this.css({"white-space":"pre"})};function Sc(n,e){let t,i;for(t=e;i=n[t];++t)i._link.i=t}function fc(n,e){const t=e._links,i=n._link.after=n._link.after||e._linkAfter;let r,m;if(i){for(r=0;(m=t[r])&&m._link.name!==i;++r);if(m)for(++r;(m=t[r])&&m._link.after===i;++r);}else r=t.length;t.splice(r,0,n),Sc(t,r)}function Nu(n){this.root=this._createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",fill:il,stroke:il,"stroke-width":0}).attr({class:n.cssClass}).css({"line-height":"normal","-moz-user-select":il,"-webkit-user-select":il,"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)",display:"block",overflow:"hidden"}),this._init(),this.pathModified=!!n.pathModified,this._$container=(0,a.A)(n.container),this.root.append({element:n.container}),this._locker=0,this._backed=!1}Jl(Il.prototype=Ul(ga.prototype),{constructor:Il,attr:function Kg(n){const e=this;let t;if(!ah(n))return Th(e,n);n=Jl({},n);const i=e._settings,r=(0,C.O9)(i[ou])&&(0,C.O9)(i[Ha]);void 0!==n.text&&(i.text=n.text,delete n.text,t=!0),void 0!==n[ou]&&(i[ou]=n[ou],delete n[ou]),void 0!==n[Ha]&&(i[Ha]=n[Ha],delete n[Ha]),void 0!==n[ss]&&(i[ss]=n[ss],delete n[ss]),void 0!==n.textsAlignment&&(function al(n,e){if(!n._texts||"center"===e)return;const t=n._texts,i="left"===e?-1:1,r=Math.max.apply(Math,t.map(m=>ha(m)));for(let m=0;m<t.length;m++){const A=t[m],V=ha(A);0!==r&&r!==V&&Us(A,"dx",i*ap((r-V)/2*10)/10)}}(e,n.textsAlignment),delete n.textsAlignment);const m=(0,C.O9)(i[ou])&&(0,C.O9)(i[Ha]);return Th(e,n),t=t||m!==r&&i.text,t&&(function Ar(n,e,t){let i,r;n._texts=null,n.clear(),null!==e&&(e=""+e,n.renderer.encodeHtml||!/<[a-z][\s\S]*>/i.test(e)&&-1===e.indexOf("&")?/\n/g.test(e)?i=function Km(n){const e=n.replace(/\r/g,"").split(/\n/g);let t=0;const i=[];for(;t<e.length;t++)i.push({value:e[t].trim(),height:0,line:t});return i}(e):t&&(i=[{value:e.trim(),height:0}]):(r=function wC(n){const e=/(style|class)\s*=\s*(["'])(?:(?!\2).)*\2\s?/gi;return n.replace(/(?:(<[a-z0-9]+\s*))([\s\S]*?)(>|\/>)/gi,function(t,i,r,m){return i+(r=(r&&r.match(e)||[]).map(function(A){return A}).join(" "))+m})}(e),i=function hv(n){const e=[],t=c.A.createElement("div");return t.innerHTML=n.replace(/\r/g,"").replace(/\n/g,"<br/>").replace(/style=/g,"data-style="),t.querySelectorAll("[data-style]").forEach(i=>{i.style=i.getAttribute("data-style"),i.removeAttribute("data-style")}),jm(e,0,t,{},""),function Xg(n){let e,t,r,i=n[0];for(e=1,t=n.length;e<t;++e)r=n[e],r.line===i.line?(i.height=Js(i.height,r.height),i.inherits=i.inherits||0===parseFloat(r.height),r.height=NaN):i=r}(e),e}(r)),i?i.length&&(n._texts=i,t&&Xm(i,n.element,ou),Xm(i,n.element,"tspan")):n.element.appendChild(c.A.createTextNode(e)))}(e,i.text,m),e._hasEllipsis=!1),(t||void 0!==n.x||void 0!==n.y)&&Ds(e),m&&function Ra(n){if(!n._texts)return;const e=n._texts,t=n._settings[ou],i=n._settings[Ha],r=n._settings[ss]||1;let m,A,V;for(A=0,V=e.length;A<V;++A)m=e[A].stroke,m.setAttribute(ou,t),m.setAttribute(Ha,i),m.setAttribute(ss,r),m.setAttribute("stroke-linejoin","round")}(e),e},css:function uv(n){return $m(this,n=n||{}),dp in n&&Ds(this),this},applyEllipsis:function pv(n){const e=this;let t,r,m,A,V,X,ce,i=!1;$f.call(e);const _e=e.renderer.text(sl).attr(e._styles).append(e.renderer.root),Me=_e.getBBox().width;if(e._getElementBBox().width>n)for(n-Me<0?n=0:n-=Me,t=function fv(n,e,t){let r,m,A,V,X,i=[];if(e)for(r=0,m=e.length;r<m;++r)A=e[r],i[A.line]?(A.startBox=V,i[A.line].parts.push(A),i[A.line].commonLength+=A.value.length):(A.startBox=V=0,i.push({commonLength:A.value.length,parts:[A]})),X=V+A.tspan.getSubStringLength(0,A.value.length),A.endIndex=gv(A,t,V,X),V=X;else A={value:n.textContent,tspan:n},A.startBox=V=0,X=V+ha(A),A.endIndex=gv(A,t,V,X),i=[{commonLength:n.textContent.length,parts:[A]}];return i}(e.element,e._texts,n),r=0,m=t.length;r<m;++r)if(A=t[r].parts,1!==t[r].commonLength)for(V=0,X=A.length;V<X;++V)ce=A[V],(0,C.O9)(ce.endIndex)?(yr(ce,ce.endIndex),i=!0):ce.startBox>n&&Ur(ce);return _e.remove(),e._hasEllipsis=i,i},setMaxSize:function ud(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this;let r=[],m=!1,A=!1,V=n;$f.call(i);const X=function $c(n){const e=jf(n);return()=>{for(let t=0;t<e.length;t++)n.appendChild(e[t])}}(this.element),ce=i.renderer.text(sl).attr(i._styles).append(i.renderer.root),_e=ce.getBBox().width,{width:Me,height:Ve}=i._getElementBBox();return(Me||Ve)&&(Me>n||e&&Ve>e)&&(n-_e<0?V=0:V-=_e,r=function ir(n,e,t,i,r){if(!e){const A={value:n.textContent,height:0,line:0};n.textContent="",Xm([A],n,"tspan"),e=[A]}return e.reduce((m,A)=>{let[V,X,ce,_e,Me]=m;const Ve=V[V.length-1];if(_e)return[V,X,ce,_e];if(Ve&&A.line===Me){if(A.startBox=X,X>i&&"none"===r.wordWrap&&"ellipsis"===r.textOverflow)return Ur(A),[V,X,ce,_e,Me];Ve.parts.push(A),Ve.commonLength+=A.value.length}else A.startBox=X=0,V.push({commonLength:A.value.length,parts:[A]});if(A.endBox=ce=X+ha(A),X=ce,(0,C.O9)(t)&&ce>t){const Je=Gi(A,t,i,r);Je.length?V=V.concat(Je.filter(rt=>rt.parts.length>0)):(V=[],_e=!0)}return[V,X,ce,_e,A.line]},[[],0,0,!1,0])[0]}(i.element,i._texts,n,V,t),r=function Bo(n,e,t,i,r){const m=t.textOverflow;if(!isFinite(i)||0===Number(i)||"none"===m)return n;const A=n.reduce((V,X,ce,_e)=>{let[Me,Ve]=V;const Je=function bo(n,e){return n.parts.reduce((t,i)=>Ol(t,ca(i,e)),0)}(X,r);if(Ve+=Je,Ve<i)Me.push(X);else if(X.parts.forEach(rt=>{Ur(rt)}),"ellipsis"===m){const rt=_e[ce-1];if(rt){const Ct=rt.parts[rt.parts.length-1];Ct.hasEllipsis||(0===e||Ct.endBox<e?yr(Ct,Ct.value.length,Zt(e,t)):li(Ct,e,t))}}return[Me,Ve]},[[],0]);return"hide"===m&&A[1]>i?(A[0].forEach(V=>{V.parts.forEach(X=>{Ur(X)})}),[]):A[0]}(r,V,t,e,parseFloat(this._getLineHeight())),this._texts=r.reduce((Je,rt)=>Je.concat(rt.parts),[]).filter(Je=>""!==Je.value).map(Je=>(Je.stroke&&Je.tspan.parentNode.appendChild(Je.stroke),Je)).map(Je=>(Je.tspan.parentNode.appendChild(Je.tspan),Je)),!this._texts.length&&(this._texts=null),m=!0,this._texts?Ds(this):(this.element.textContent="",A=!0)),ce.remove(),i._hasEllipsis=m,X(),{rowCount:r.length,textChanged:m,textIsEmpty:A}},restoreText:$f,_getLineHeight(){return isNaN(parseFloat(this._styles[dp]))?Wg:this._styles[dp]}}),Nu.prototype={constructor:Nu,_init:function(){this._defs=this._createElement("defs").append(this.root),this._animationController=new sv(this.root.element),this._animation={enabled:!0,duration:1e3,easing:"easeOutCubic"}},setOptions:function(n){return this.rtl=!!n.rtl,this.encodeHtml=!!n.encodeHtml,this.updateAnimationOptions(n.animation||{}),this.root.attr({direction:this.rtl?"rtl":"ltr"}),this},_createElement:function(n,e,t){const i=new ga(this,n,t);return e&&i.attr(e),i},lock:function(){const n=this;return 0===n._locker&&(n._backed=!n._$container.is(":visible"),n._backed&&function Hm(n){0===Dd().backupCounter&&c.A.getBody().appendChild(Dd().backupContainer),++Dd().backupCounter,n.append({element:Dd().backupContainer})}(n.root)),++n._locker,n},unlock:function(){const n=this;return--n._locker,0===n._locker&&(n._backed&&function Bu(n,e){n.append({element:e}),--Dd().backupCounter,0===Dd().backupCounter&&c.A.getBody().removeChild(Dd().backupContainer)}(n.root,n._$container[0]),n._backed=!1),n},resize:function(n,e){return n>=0&&e>=0&&this.root.attr({width:n,height:e}),this},dispose:function(){const n=this;let e;for(e in n.root.dispose(),n._defs.dispose(),n._animationController.dispose(),Vc.removeByRenderer(n),n)n[e]=null;return n},animationEnabled:function(){return!!this._animation.enabled},updateAnimationOptions:function(n){return Jl(this._animation,n),this},stopAllAnimations:function(n){return this._animationController[n?"lock":"stop"](),this},animateElement:function(n,e,t){return this._animationController.animateElement(n,e,t),this},svg:function(){return this.root.markup()},getRootOffset:function(){return this.root.getOffset()},onEndAnimation:function(n){this._animationController.onEndAnimation(n)},rect:function(n,e,t,i){return new zl(this).attr({x:n||0,y:e||0,width:t||0,height:i||0})},simpleRect:function(){return this._createElement("rect")},circle:function(n,e,t){return this._createElement("circle",{cx:n||0,cy:e||0,r:t||0})},g:function(){return this._createElement("g")},image:function(n,e,t,i,r,m){const A=this._createElement("image",{x:n||0,y:e||0,width:t||0,height:i||0,preserveAspectRatio:lv[Wi(m)]||il});return A.element.setAttributeNS("http://www.w3.org/1999/xlink","href",r||""),A},path:function(n,e){return new Cl(this,e).attr({points:n||[]})},arc:function(n,e,t,i,r,m){return new ql(this).attr({x:n||0,y:e||0,innerRadius:t||0,outerRadius:i||0,startAngle:r||0,endAngle:m||0})},text:function(n,e,t){return new Il(this).attr({text:n,x:e||0,y:t||0})},linearGradient:function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zn();const i=this._createElement("linearGradient",{id:e,gradientTransform:`rotate(${(arguments.length>2?arguments[2]:void 0)||0})`}).append(this._defs);return i.id=e,this._createGradientStops(n,i),i},radialGradient:function(n,e){const t=this._createElement("radialGradient",{id:e}).append(this._defs);return this._createGradientStops(n,t),t},_createGradientStops:function(n,e){n.forEach(t=>{this._createElement("stop",{offset:t.offset,"stop-color":t["stop-color"]??t.color,"stop-opacity":t.opacity}).append(e)})},pattern:function(n,e,t){const i=(e=e||{}).step||6,r=i/2,m=1.5*i,A=t||zn(),V="right"===Wi(e.direction)?"M "+r+" "+-r+" L "+-r+" "+r+" M 0 "+i+" L "+i+" 0 M "+m+" "+r+" L "+r+" "+m:"M 0 0 L "+i+" "+i+" M "+-r+" "+r+" L "+r+" "+m+" M "+r+" "+-r+" L "+m+" "+r,X=this._createElement("pattern",{id:A,width:i,height:i,patternUnits:"userSpaceOnUse"}).append(this._defs);return X.id=A,this.rect(0,0,i,i).attr({fill:n,opacity:e.opacity}).append(X),new Cl(this).attr({d:V,"stroke-width":e.width||1,stroke:n}).append(X),X},customPattern:function(n,e,t,i){const r={id:n,width:t,height:i,patternContentUnits:"userSpaceOnUse",patternUnits:this._getPatternUnits(t,i)},m=this._createElement("pattern",r).append(this._defs);return e.render({container:m.element}),m},_getPatternUnits:function(n,e){if(Number(n)&&Number(e))return"userSpaceOnUse"},_getPointsWithYOffset:function(n,e){return n.map(function(t,i){return i%2!=0?t+e:t})},clipShape:function(n,e){const t=zn();let i=this._createElement("clipPath",{id:t}).append(this._defs);const r=n.apply(this,e).append(i);return r.id=t,r.remove=function(){throw"Not implemented"},r.dispose=function(){return i.dispose(),i=null,this},r},clipRect(n,e,t,i){return this.clipShape(this.rect,arguments)},clipCircle(n,e,t){return this.clipShape(this.circle,arguments)},shadowFilter:function(n,e,t,i,r,m,A,V,X){const ce=zn(),_e=this._createElement("filter",{id:ce,x:n||0,y:e||0,width:t||0,height:i||0}).append(this._defs),Me=this._createElement("feGaussianBlur",{in:"SourceGraphic",result:"gaussianBlurResult",stdDeviation:A||0}).append(_e),Ve=this._createElement("feOffset",{in:"gaussianBlurResult",result:"offsetResult",dx:r||0,dy:m||0}).append(_e),Je=this._createElement("feFlood",{result:"floodResult","flood-color":V||"","flood-opacity":X}).append(_e),rt=this._createElement("feComposite",{in:"floodResult",in2:"offsetResult",operator:"in",result:"compositeResult"}).append(_e),Ct=this._createElement("feComposite",{in:"SourceGraphic",in2:"compositeResult",operator:"over"}).append(_e);return _e.id=ce,_e.gaussianBlur=Me,_e.offset=Ve,_e.flood=Je,_e.composite=rt,_e.finalComposite=Ct,_e.attr=function(Xt){const On={},Fn={},oi={};return"x"in Xt&&(On.x=Xt.x),"y"in Xt&&(On.y=Xt.y),"width"in Xt&&(On.width=Xt.width),"height"in Xt&&(On.height=Xt.height),Th(this,On),"blur"in Xt&&this.gaussianBlur.attr({stdDeviation:Xt.blur}),"offsetX"in Xt&&(Fn.dx=Xt.offsetX),"offsetY"in Xt&&(Fn.dy=Xt.offsetY),this.offset.attr(Fn),"color"in Xt&&(oi["flood-color"]=Xt.color),"opacity"in Xt&&(oi["flood-opacity"]=Xt.opacity),this.flood.attr(oi),this},_e},brightFilter:function(n,e){const t=zn(),i=this._createElement("filter",{id:t}).append(this._defs),r=this._createElement("feComponentTransfer").append(i),m={type:n,slope:e};return i.id=t,this._createElement("feFuncR",m).append(r),this._createElement("feFuncG",m).append(r),this._createElement("feFuncB",m).append(r),i},getGrayScaleFilter:function(){if(this._grayScaleFilter)return this._grayScaleFilter;const n=zn(),e=this._createElement("filter",{id:n}).append(this._defs);return this._createElement("feColorMatrix").attr({type:"matrix",values:"0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 0.6 0"}).append(e),e.id=n,this._grayScaleFilter=e,e},lightenFilter:function(n){const e=this._createElement("filter",{id:n}).append(this._defs);return this._createElement("feColorMatrix",{type:"matrix",values:"1.3 0 0 0 0 0 1.3 0 0 0 0 0 1.3 0 0 0 0 0 1 0"}).append(e),e.id=n,e},initDefsElements:function(){const n=this._defsElementsStorage=this._defsElementsStorage||{byHash:{},baseId:zn()},e=n.byHash;let t;for(t in e)e[t].pattern.dispose();n.byHash={},n.refToHash={},n.nextId=0},drawPattern:function(n,e,t){let{color:i,hatching:r}=n;return this.pattern(i,r,`${e}-hatching-${t++}`)},drawFilter:function(n,e,t){return this.lightenFilter(`${e}-lightening-${t++}`)},lockDefsElements:function(n,e,t){const i=this._defsElementsStorage;let r;const m="pattern"===t?function Jp(n){let{color:e,hatching:t}=n;return"@"+e+"::"+t.step+":"+t.width+":"+t.opacity+":"+t.direction}(n):"@filter::lightening",A="pattern"===t?this.drawPattern:this.drawFilter;let V;return i.refToHash[e]!==m&&(e&&this.releaseDefsElements(e),r=i.byHash[m],r||(V=A.call(this,n,i.baseId,i.nextId++),r=i.byHash[m]={pattern:V,count:0},i.refToHash[V.id]=m),++r.count,e=r.pattern.id),e},releaseDefsElements:function(n){const e=this._defsElementsStorage,t=e.refToHash[n],i=e.byHash[t];i&&0==--i.count&&(i.pattern.dispose(),delete e.byHash[t],delete e.refToHash[n])}};const Vc=function(){let n=[];return{add:function(e){n.push(e)},remove:function(e){n=n.filter(function(t){return t!==e})},removeByRenderer:function(e){n=n.filter(function(t){return t.renderer!==e})},fire:function(){n.forEach(function(e){e()})}}}(),Ho=Number,ks=Math,Dh=ks.round,ru=ks.max,ba=ks.min,qp=ks.ceil,su=C.O9,mc=C.Tn,Fd=pi,eg=Wi,hp=_.X,ec="center",Ec="right",yl="left",Oc="top",Fu="bottom",jc="horizontal",Ah="vertical",Ih="outside",tg="none",H=Fd([yl,ec,Ec]),Ne=Fd([Oc,Fu]),Vn=Fd([Ah,jc]),vs=Fd([yl,Ec,Oc,Fu]),Yr=Fd([Ih,"inside"]),ng=Fd([yl,ec,Ec]);function Wx(n,e,t){if(!n)return;const i=n.fill;return(0,_.X)({},{state:t,fill:i===tg?e:i,opacity:n.opacity,filter:n.filter,hatching:hp({},n.hatching,{step:5,width:2})})}function $x(n,e,t){const i=cv(n,e);return i.fill&&0===i.fill.indexOf("DevExpress")&&(i.fill=Um(i.fill)),i.opacity=i.opacity>=0?i.opacity:1,(0,_.X)({},i,{size:t})}function $y(n,e,t,i){const r=e&&t[e[n]];r&&r.renderMarker(r.states[i])}function Ym(n,e){return n.rect(0,0,e,e)}function Pl(n,e){return n.circle(e/2,e/2,e/2)}function mv(n,e,t){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom}function ZS(n,e,t,i){const r={x:0,y:0};let m=0,A=0,V=0;if(V="y"===e.direction?i.top+i.bottom:i.left+i.right,n.forEach(function(X,ce){const _e=X[0],Me=X.length;X.forEach(function(Ve,Je){r[e.direction]+=Ve[e.measure]+(Je!==Me-1?Ve.offset||e.spacing:0),m=ru(m,r[e.direction])}),r[e.direction]=0,r[e.altDirection]+=_e[e.altMeasure]+_e.altOffset||e.altSpacing,A=ru(A,r[e.altDirection])}),m+V>e.length)return e.countItem=function Xw(n,e){return n.altCountItem++,qp(e/n.altCountItem)}(e,t),!0}function DC(n,e){return n.reduce((t,i)=>t+i[e.measure]+(i.offset||e.spacing),0)}function Ae(n){switch(n.itemTextPosition){case Fu:return{horizontal:ec,vertical:Oc};case Oc:return{horizontal:ec,vertical:Fu};case yl:return{horizontal:Ec,vertical:ec};case Ec:return{horizontal:yl,vertical:ec}}}function Ge(n,e){const t=n.reduce((i,r)=>ru(i,r?r[e]:i),0);n.forEach(i=>{i&&(i[e]=t)})}function Qe(n){const e=n.length,t=n[0].length;let i,r;const m=[];for(i=0;i<t;i++)for(m[i]=[],r=0;r<e;r++)m[i][r]=n[r][i];return m}let Qt=function(n){this._renderer=n.renderer,this._legendGroup=n.group,this._backgroundClass=n.backgroundClass,this._itemGroupClass=n.itemGroupClass,this._textField=n.textField,this._getCustomizeObject=n.getFormatObject,this._titleGroupClass=n.titleGroupClass,this._allowInsidePosition=n.allowInsidePosition,this._widget=n.widget,this._updated=!1};const Xn=Qt,Vi=Xn.prototype=(0,xe.o8)($e.prototype);(0,_.X)(Vi,{constructor:Xn,getOptions:function(){return this._options},update:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this;e=i._options=function Ad(n,e,t){return n?(function jw(n){let e=n.margin;e>=0?(e=Ho(n.margin),e={top:e,bottom:e,left:e,right:e}):e={top:e.top>=0?Ho(e.top):10,bottom:e.bottom>=0?Ho(e.bottom):10,left:e.left>=0?Ho(e.left):10,right:e.right>=0?Ho(e.right):10},n.margin=e}(n),n.horizontalAlignment=H(n.horizontalAlignment,Ec),n.verticalAlignment=Ne(n.verticalAlignment,n.horizontalAlignment===ec?Fu:Oc),n.orientation=Vn(n.orientation,n.horizontalAlignment===ec?jc:Ah),n.itemTextPosition=vs(n.itemTextPosition,n.orientation===jc?Fu:Ec),n.position=t?Yr(n.position,Ih):Ih,n.itemsAlignment=ng(n.itemsAlignment,null),n.hoverMode=eg(n.hoverMode),n.customizeText=mc(n.customizeText)?n.customizeText:function(){return this[e]},n.customizeHint=mc(n.customizeHint)?n.customizeHint:h.lQ,n._incidentOccurred=n._incidentOccurred||h.lQ,n):null}(e,i._textField,i._allowInsidePosition)||{};const r=e.markerSize;var m;if(this._updated=!0,this._data=n.map(A=>(A.size=Ho(A.size>0?A.size:r),A.marker=$x(A,A.states.normal),Object.defineProperty(A.marker,"size",{get:()=>A.size,set(V){A.size=V}}),Object.defineProperty(A.marker,"opacity",{get:()=>A.states.normal.opacity,set(V){A.states.normal.opacity=A.states.hover.opacity=A.states.selection.opacity=V}}),A)),e.customizeItems&&(i._data=e.customizeItems(n.slice())||n),i._boundingRect={width:0,height:0,x:0,y:0},i.isVisible()&&(null===(m=i._title)||void 0===m||m.dispose(),i._title=new Gg({renderer:i._renderer,cssClass:i._titleGroupClass,root:i._legendGroup})),i._title){const A=e.title;t.horizontalAlignment=function Vt(n){return n.horizontalAlignment===ec?ec:n.itemTextPosition===Ec?yl:n.itemTextPosition===yl?Ec:ec}(e),i._title.update(t,A)}return this.erase(),i},isVisible:function(){return this._options&&this._options.visible},draw:function(n,e){const t=this,i=t._getItemData();return t.erase(),t.isVisible()&&i&&i.length?(t._insideLegendGroup=t._renderer.g().enableLinks().append(t._legendGroup),t._title.changeLink(t._insideLegendGroup),t._createBackground(),t._title.hasText()&&t._title.draw(n-(t._background?2*t._options.paddingLeftRight:0),e),t._markersGroup=t._renderer.g().attr({class:t._itemGroupClass}).append(t._insideLegendGroup),t._createItems(i),t._updateElementsPosition(n,e),t):t},_measureElements:function(){const n=this._options;let e=0;this._items.forEach(t=>{const i=t.label.getBBox(),r=t.marker.getBBox();t.markerBBox=r,t.markerSize=Math.max(r.width,r.height);const m=function Kw(n,e,t){let i,r;switch(n.itemTextPosition){case yl:case Ec:i=e.width+7+t.width,r=ru(e.height,t.height);break;case Oc:case Fu:i=ru(e.width,t.width),r=e.height+4+t.height}return{width:i,height:r}}(n,r,i);t.labelBBox=i,t.bBox=m,e=ru(e,m.height)}),n.equalRowHeight&&this._items.forEach(t=>t.bBox.height=e)},_updateElementsPosition:function(n,e){const t=this,i=t._options;this._size={width:n,height:e},t._measureElements(),t._locateElements(i),t._finalUpdate(i);const r=t.getLayoutOptions();(r.width>n||r.height>e)&&t.freeSpace()},_createItems:function(n){const e=this,t=e._options,i=e._renderer,r=function(n){return function YS(n){return"circle"===eg(n)}(n)?Pl:Ym}(t.markerShape);e._markersId={};const A=e._widget._getTemplate(t.markerTemplate?t.markerTemplate:(X,ce)=>{const _e=X.marker;r(i,_e.size).attr({fill:_e.fill,opacity:_e.opacity,filter:_e.filter}).append({element:ce})}),V=e._markersGroup;V.css(Ti(t.font)),e._deferredItems=[],e._templatesGroups=[],e._items=(n||[]).map((X,ce)=>{const _e=X.states,Me=_e.normal,Ve=Me.fill;X.size=X.marker.size;const Je={normal:(0,_.X)(Me,{fill:Ve||t.markerColor||t.defaultColor,state:"normal"}),hover:Wx(_e.hover,Ve,"hovered"),selection:Wx(_e.selection,Ve,"selected")};X.states=Je;const rt=i.g().append(V),Ct=i.g().attr({class:"dxl-marker"}).append(rt);e._deferredItems[ce]=new g.cY,e._templatesGroups.push(Ct);const Xt={label:e._createLabel(X,rt),marker:Ct,renderer:i,group:rt,tracker:{id:X.id,argument:X.argument,argumentIndex:X.argumentIndex},states:Je,itemTextPosition:t.itemTextPosition,markerOffset:0,bBoxes:[],renderMarker(On){X.marker=$x(Xt,On,X.size),Ct.clear(),A.render({model:X,container:Ct.element,onRendered:e._deferredItems[ce].resolve})}};return Xt.renderMarker(Je.normal),e._createHint(X,rt),void 0!==X.id&&(e._markersId[X.id]=ce),Xt})},getTemplatesGroups:function(){return this._templatesGroups||[]},getTemplatesDef:function(){return this._deferredItems||[]},_getItemData:function(){let n=this._data||[];return(this._options||{}).inverted&&(n=n.slice().reverse()),n.filter(t=>t.visible)},_finalUpdate:function(n){this._adjustBackgroundSettings(n),this._setBoundingRect(n.margin)},erase:function(){const n=this._insideLegendGroup;return n&&n.dispose(),this._insideLegendGroup=this._markersGroup=this._x1=this._x2=this._y2=this._y2=null,this},_locateElements:function(n){this._moveInInitialValues(),this._locateRowsColumns(n)},_moveInInitialValues:function(){this._title.hasText()&&this._title.move([0,0]),this._legendGroup&&this._legendGroup.move(0,0),this._background&&this._background.attr({x:0,y:0,width:0,height:0})},applySelected:function(n){return $y(n,this._markersId,this._items,"selection"),this},applyHover:function(n){return $y(n,this._markersId,this._items,"hover"),this},resetItem:function(n){return $y(n,this._markersId,this._items,"normal"),this},_createLabel:function(n,e){const t=this._getCustomizeObject(n),i=this._options,r=function it(n){switch(n){case Oc:case Fu:return ec;case yl:return Ec;case Ec:return yl}}(i.itemTextPosition),m=i.customizeText.call(t,t),A=su(n.textOpacity)?{color:i.font.color,opacity:n.textOpacity}:{};return this._renderer.text(m,0,0).css(Ti(A)).attr({align:r,class:i.cssClass}).append(e)},_createHint:function(n,e){const t=this._getCustomizeObject(n),i=this._options.customizeHint.call(t,t);su(i)&&""!==i&&e.setTitle(i)},_createBackground:function(){const n=this,e="inside"===n._options.position,t=n._options.backgroundColor,i=t||(e?n._options.containerBackgroundColor:tg);(n._options.border.visible||(e||t)&&t!==tg)&&(n._background=n._renderer.rect(0,0,0,0).attr({fill:i,class:n._backgroundClass}).append(n._insideLegendGroup))},_locateRowsColumns:function(n){const e=this;let t=0;const i=e._getItemsLayoutOptions(),r=e._items.length;let m;do{m=[],e._createLines(m,i),e._alignLines(m,i),t++}while(ZS(m,i,r,n.margin)&&t<r);e._applyItemPosition(m,i)},_createLines:function(n,e){this._items.forEach((t,i)=>{const r=function ke(n,e,t){const i={};return t%e.countItem==0&&(e.markerOffset?n.push([],[]):n.push([])),e.markerOffset?(i.firstLine=n[n.length-1],i.secondLine=n[n.length-2]):i.firstLine=i.secondLine=n[n.length-1],i}(n,e,i),m={width:t.labelBBox.width,height:t.labelBBox.height,element:t.label,bBox:t.labelBBox,pos:Ae(e),itemIndex:i},A={width:t.markerBBox.width,height:t.markerBBox.height,element:t.marker,pos:{horizontal:ec,vertical:ec},bBox:{width:t.markerBBox.width,height:t.markerBBox.height,x:t.markerBBox.x,y:t.markerBBox.y},itemIndex:i};let V,X;e.inverseLabelPosition?(V=m,X=A):(V=A,X=m),V[e.markerOffset?"altOffset":"offset"]=e.labelOffset,r.secondLine.push(V),r.firstLine.push(X)})},_alignLines:function(n,e){let t,i=e.altMeasure;if(n.forEach(m=>Ge(m,i)),i=e.measure,e.itemsAlignment){if(e.markerOffset)for(t=0;t<n.length;)Qe([n[t++],n[t++]]).forEach(r)}else Qe(n).forEach(r);function r(m){Ge(m,i)}},_applyItemPosition:function(n,e){const t=this,i={x:0,y:0},r=function He(n,e){return n.reduce((t,i)=>ru(t,DC(i,e)),0)}(n,e);n.forEach(m=>{const A=m[0],V=A.altOffset||e.altSpacing;i[e.direction]=function Le(n,e,t){const i=DC(n,e);let r;switch(e.itemsAlignment){case Ec:r=t-i;break;case ec:r=(t-i)/2;break;default:r=0}return r}(m,e,r),m.forEach(X=>{const ce=X.offset||e.spacing,_e=new Be(X.element,X.bBox),Ve=new Be(null,{x:i.x,y:i.y,width:X.width,height:X.height}),Je=t._items[X.itemIndex];_e.position({of:Ve,my:X.pos,at:X.pos}),Je.bBoxes.push(Ve),i[e.direction]+=X[e.measure]+ce}),i[e.altDirection]+=A[e.altMeasure]+V}),this._items.forEach(m=>{const A=function XS(n,e){const t={};return t.left=ba(n.x,e.x),t.top=ba(n.y,e.y),t.right=ru(n.x+n.width,e.x+e.width),t.bottom=ru(n.y+n.height,e.y+e.height),t}(m.bBoxes[0].getLayoutOptions(),m.bBoxes[1].getLayoutOptions()),V=t._options.columnItemSpacing/2,X=t._options.rowItemSpacing/2;m.tracker.left=A.left-V,m.tracker.right=A.right+V,m.tracker.top=A.top-X,m.tracker.bottom=A.bottom+X})},_getItemsLayoutOptions:function(){const n=this,e=n._options,i={itemsAlignment:e.itemsAlignment,orientation:e.orientation},m=n._size.height-(n._background?2*e.paddingTopBottom:0);return e.orientation===jc?(i.length=n._size.width-(n._background?2*e.paddingLeftRight:0),i.spacing=e.columnItemSpacing,i.direction="x",i.measure="width",i.altMeasure="height",i.altDirection="y",i.altSpacing=e.rowItemSpacing,i.countItem=e.columnCount,i.altCountItem=e.rowCount,i.marginTextLabel=4,i.labelOffset=7,(e.itemTextPosition===Fu||e.itemTextPosition===Oc)&&(i.labelOffset=4,i.markerOffset=!0)):(i.length=m,i.spacing=e.rowItemSpacing,i.direction="y",i.measure="height",i.altMeasure="width",i.altDirection="x",i.altSpacing=e.columnItemSpacing,i.countItem=e.rowCount,i.altCountItem=e.columnCount,i.marginTextLabel=7,i.labelOffset=4,(e.itemTextPosition===Ec||e.itemTextPosition===yl)&&(i.labelOffset=7,i.markerOffset=!0)),i.countItem||(i.countItem=i.altCountItem?qp(n._items.length/i.altCountItem):n._items.length),(e.itemTextPosition===Oc||e.itemTextPosition===yl)&&(i.inverseLabelPosition=!0),i.itemTextPosition=e.itemTextPosition,i.altCountItem=i.altCountItem||qp(n._items.length/i.countItem),i},_adjustBackgroundSettings:function(n){if(!this._background)return;const e=n.border,t=this._calculateTotalBox(),i={x:Dh(t.x-n.paddingLeftRight),y:Dh(t.y-n.paddingTopBottom),width:Dh(t.width)+2*n.paddingLeftRight,height:Dh(t.height),opacity:n.backgroundOpacity};e.visible&&e.width&&e.color&&e.color!==tg&&(i["stroke-width"]=e.width,i.stroke=e.color,i["stroke-opacity"]=e.opacity,i.dashStyle=e.dashStyle,i.rx=e.cornerRadius||0,i.ry=e.cornerRadius||0),this._background.attr(i)},_setBoundingRect:function(n){if(!this._insideLegendGroup)return;const e=this._calculateTotalBox();e.height+=n.top+n.bottom,e.widthWithoutMargins=e.width,e.width+=n.left+n.right,e.x-=n.left,e.y-=n.top,this._boundingRect=e},_calculateTotalBox:function(){const n=this._markersGroup.getBBox(),e=this._title.getCorrectedLayoutOptions(),t=this._insideLegendGroup.getBBox();return t.height=n.height+e.height+(this._background?2*this._options.paddingTopBottom:0),e.width>t.width&&(t.width=e.width),t},getActionCallback:function(n){const e=this;return e._options.visible?function(t){e[t](n.index)}:h.lQ},getLayoutOptions:function(){const n=this._options,e=this._insideLegendGroup?this._boundingRect:{width:0,height:0,x:0,y:0};return n?(e.verticalAlignment=n.verticalAlignment,e.horizontalAlignment=n.horizontalAlignment,n.orientation===jc||n.horizontalAlignment===ec?(e.cutLayoutSide=n.verticalAlignment,e.cutSide="vertical"):(e.cutLayoutSide=n.horizontalAlignment,e.cutSide="horizontal"),e.position={horizontal:n.horizontalAlignment,vertical:n.verticalAlignment},e):null},shift:function(n,e){const t=this;let i={};return t._insideLegendGroup&&t._insideLegendGroup.attr({translateX:n-t._boundingRect.x,translateY:e-t._boundingRect.y}),t._title&&t._shiftTitle(t._boundingRect.widthWithoutMargins),t._markersGroup&&t._shiftMarkers(),t._insideLegendGroup&&(i=t._legendGroup.getBBox()),t._x1=i.x,t._y1=i.y,t._x2=i.x+i.width,t._y2=i.y+i.height,t},_shiftTitle:function(n){const e=this,t=e._title,i=t.getCorrectedLayoutOptions();if(!i||!t.hasText())return;const r=n-(e._background?2*e._options.paddingLeftRight:0),m=t.getOptions();let A=i.y+m.margin.top,V=0;m.verticalAlignment===Fu&&e._markersGroup&&(A+=e._markersGroup.getBBox().height),m.horizontalAlignment===Ec?V=r-i.width:m.horizontalAlignment===ec&&(V=(r-i.width)/2),t.shift(V,A)},_shiftMarkers:function(){const n=this._title.getLayoutOptions(),e=this._markersGroup.getBBox(),t=this._title.getOptions()||{};let i=0,r=0;n.width>e.width&&this._options.horizontalAlignment===ec&&(i=n.width/2-e.width/2),t.verticalAlignment===Oc&&(r=n.height),(0!==i||0!==r)&&(this._markersGroup.attr({translateX:i,translateY:r}),this._items.forEach(m=>{m.tracker.left+=i,m.tracker.right+=i,m.tracker.top+=r,m.tracker.bottom+=r}))},getPosition:function(){return this._options.position},coordsIn:function(n,e){return n>=this._x1&&n<=this._x2&&e>=this._y1&&e<=this._y2},getItemByCoord:function(n,e){const t=this._items,i=this._insideLegendGroup;n-=i.attr("translateX"),e-=i.attr("translateY");for(let r=0;r<t.length;r++)if(mv(t[r].tracker,n,e))return t[r].tracker;return null},dispose:function(){return this._title&&this._title.dispose(),this._legendGroup=this._insideLegendGroup=this._title=this._renderer=this._options=this._data=this._items=null,this},layoutOptions:function(){if(!this.isVisible())return null;const n=this.getLayoutOptions();return{horizontalAlignment:this._options.horizontalAlignment,verticalAlignment:this._options.verticalAlignment,side:n.cutSide,priority:1,position:this.getPosition()}},measure:function(n){this._updated||!this._insideLegendGroup?(this.draw(n[0],n[1]),this._updated=!1):(this._items.forEach(t=>{t.bBoxes=[]}),this._updateElementsPosition(n[0],n[1]));const e=this.getLayoutOptions();return[e.width,e.height]},move:function(n){this.shift(n[0],n[1])},freeSpace:function(){this._options._incidentOccurred("W2104"),this.erase()}});const Ui={name:"legend",init:function(){const n=this._renderer.g().attr({class:this._rootClassPrefix+"-legend"}).enableLinks().append(this._renderer.root);this._legend=new Qt({renderer:this._renderer,group:n,widget:this,itemGroupClass:this._rootClassPrefix+"-item",titleGroupClass:this._rootClassPrefix+"-title",textField:"text",getFormatObject:function(e){return{item:e.item,text:e.text}}}),this._layout.add(this._legend)},extenders:{_applyTilesAppearance:function(){const n=this;this._items.forEach(function(e){n._applyLegendItemStyle(e.id,e.getState())})},_buildNodes:function(){this._createLegendItems()}},members:{_applyLegendItemStyle:function(n,e){const t=this._legend;switch(e){case"hover":t.applyHover(n);break;case"selection":t.applySelected(n);break;default:t.resetItem(n)}},_createLegendItems:function(){this._legend.update(this._getLegendData(),this._getOption("legend"),this._themeManager.theme("legend").title)&&this._requestChange(["LAYOUT"])}},dispose:function(){this._legend.dispose()},customize:function(n){n.prototype._proxyData.push(function(e,t){if(this._legend.coordsIn(e,t)){const i=this._legend.getItemByCoord(e,t);if(i)return{id:i.id,type:"legend"}}}),n.addChange({code:"LEGEND",handler:function(){this._createLegendItems()},isThemeDependent:!0,option:"legend",isOptionChange:!0})}};var Do=M(5801);const Qo=Do.A.postCtor;let tr;const Fr={_dataSourceLoadErrorHandler:function(){this._dataSourceChangedHandler()},_dataSourceOptions:function(){return{paginate:!1}},_updateDataSource:function(){this._refreshDataSource(),this.option("dataSource")||this._dataSourceChangedHandler()},_dataIsLoaded:function(){return!this._dataSource||this._dataSource.isLoaded()},_dataSourceItems:function(){return this._dataSource&&this._dataSource.items()}};for(tr in Do.A)"postCtor"!==tr&&(Fr[tr]=Do.A[tr]);const cs={name:"data_source",init:function(){Qo.call(this)},dispose:h.lQ,members:Fr};var is=M(127),Ks=M(8181);const dc=(0,gr.zk)(),pd=(0,gr.w3)(),jy={EXCEL:"xlsx",CSS:"css",PNG:"png",JPEG:"jpeg",GIF:"gif",SVG:"svg",PDF:"pdf"},jx={CSS:"text/css",EXCEL:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PNG:"image/png",JPEG:"image/jpeg",GIF:"image/gif",SVG:"image/svg+xml",PDF:"application/pdf"},QS={_revokeObjectURLTimeout:3e4,_getDataUri:function(n,e){return`data:${this._getMimeType(n)};base64,${e}`},_getMimeType:function(n){return jx[n]||"application/octet-stream"},_linkDownloader:function(n,e){const t=c.A.createElement("a");return t.download=n,t.href=e,t.target="_blank",t},_winJSBlobSave:function(n,e,t){const i=new Windows.Storage.Pickers.FileSavePicker;i.suggestedStartLocation=Windows.Storage.Pickers.PickerLocationId.documentsLibrary;const r=jy[t];if(r){const m=this._getMimeType(t);i.fileTypeChoices.insert(m,["."+r])}i.suggestedFileName=e,i.pickSaveFileAsync().then(function(m){m&&m.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function(A){const V=n.msDetachStream();Windows.Storage.Streams.RandomAccessStream.copyAsync(V,A).then(function(){A.flushAsync().done(function(){V.close(),A.close()})})})})},_click:function(n){try{n.dispatchEvent(new MouseEvent("click",{cancelable:!0}))}catch{const t=c.A.getDocument().createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,dc,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(t)}},_saveBlobAs:function(n,e,t){if(this._blobSaved=!1,(0,C.O9)(pd.msSaveOrOpenBlob))pd.msSaveOrOpenBlob(t,n),this._blobSaved=!0;else if((0,C.O9)(dc.WinJS))this._winJSBlobSave(t,n,e),this._blobSaved=!0;else{const i=dc.URL||dc.webkitURL||dc.mozURL||dc.msURL||dc.oURL;if((0,C.O9)(i)){const r=i.createObjectURL(t),m=this._linkDownloader(n,r);setTimeout(()=>{i.revokeObjectURL(r),this._objectUrlRevoked=!0},this._revokeObjectURLTimeout),this._click(m)}else Ks.v.warn("window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL is not defined")}},saveAs:function(n,e,t){const i=jy[e];if(i&&(n+="."+i),(0,C.Tn)(dc.Blob))this._saveBlobAs(n,e,t);else{(0,C.O9)(pd.userAgent.match(/iPad/i))||is.A.log("E1034");const r=this._linkDownloader(n,this._getDataUri(e,t));this._click(r)}}};var _v=M(1832),vv=M(6946);const Zm=(0,gr.zk)(),Qg=Math,EP=Qg.PI,OP=Qg.min,wP=Qg.abs,ig=Qg.sqrt,Ph=Qg.pow,AC=Qg.atan2,JS=Qg.cos,Yw=Qg.sin,ka=Number,qS=.05,pL="10px",TP="sans-serif",DP="#000";let eE;function IP(n,e,t,i,r,m,A,V){const X=(n+t)/2,ce=(e+i)/2;let _e=AC(e-i,n-t);const Me=m?1:-1;_e+=EP/180*90*(A?1:-1);const Ve=ig(Ph(t-n,2)+Ph(i-e,2))/2,Je=ig(wP(Ph(r,2)-Ph(Ve,2))),rt=X+Me*(Je*JS(_e)),Ct=ce+Me*(Je*Yw(_e)),Xt=AC(e-Ct,n-rt),On=AC(i-Ct,t-rt);V.arc(rt,Ct,r,Xt,On,!A)}function IC(n,e){const t=eE(n.attributes||{}),i=(0,_.X)({},t,{text:n.textContent.replace(/\s+/g," "),textAlign:"middle"===t["text-anchor"]?"center":t["text-anchor"]}),r=t.transform;let m;return r&&(m=r.match(/translate\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*)*/),m&&(m=m[0].match(/-*\d+([.]\d+)*/g),i.translateX=ka(m[0]),i.translateY=m[1]?ka(m[1]):0),m=r.match(/rotate\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*,*\s*-*\d+([.]\d+)*)*/),m&&(m=m[0].match(/-*\d+([.]\d+)*/g),i.rotationAngle=ka(m[0]),i.rotationX=m[1]&&ka(m[1]),i.rotationY=m[2]&&ka(m[2])),m=r.match(/scale\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*)*/),m&&(m=m[0].match(/-*\d+([.]\d+)*/g),i.scaleX=ka(m[0]),i.scaleY=m.length>1?ka(m[1]):i.scaleX)),function MP(n,e,t){let r,i=n.style||{};for(r in i)""!==i[r]&&(e[(0,vv.PT)(r)]=i[r]);t&&c.A.isElementNode(n)&&(i=Zm.getComputedStyle(n),["fill","stroke","stroke-width","font-family","font-size","font-style","font-weight"].forEach(function(m){m in i&&""!==i[m]&&(e[(0,vv.PT)(m)]=i[m])}),["opacity","fill-opacity","stroke-opacity"].forEach(function(m){m in i&&""!==i[m]&&"1"!==i[m]&&(e[m]=ka(i[m]))})),e.textDecoration=e.textDecoration||e.textDecorationLine,e.globalAlpha=(0,C.O9)(e.opacity)?e.opacity:e.globalAlpha}(n,i,e),i}function Qm(n){const e=n&&n.match(/url\(.*#(.*?)["']?\)/i);return e&&e[1]}function MC(n,e){const t=[];e.fontSize=e.fontSize||pL,e.fontFamily=e.fontFamily||TP,e.fill=e.fill||DP,e.fontStyle&&t.push(e.fontStyle),e.fontWeight&&t.push(e.fontWeight),t.push(e.fontSize),t.push(e.fontFamily),n.font=t.join(" "),n.textAlign=e.textAlign,n.fillStyle=e.fill,n.globalAlpha=e.globalAlpha}function Qw(n){const e=n.childNodes;for(let t=0;t<e.length;t++)if("tspan"===e[t].tagName)return!0;return!1}function Jw(n,e,t,i){const r=[];let m,A=0;for(let V=0;V<n.length;V++){const X=n[V];if(void 0===X.tagName)tE(X,e,t,i);else if("tspan"===X.tagName||"text"===X.tagName){const ce=IC(X,i.rootAppended),_e=(0,_.X)({},t,ce);if("tspan"===X.tagName&&Qw(X)){Jw(X.childNodes,e,_e,i);continue}_e.textAlign="start",(!m||void 0!==ce.x)&&(m={elements:[],options:[],widths:[],offsets:[]},r.push(m)),void 0!==ce.y&&(A=0),void 0!==ce.dy&&(A+=parseFloat(ce.dy)),m.elements.push(X),m.options.push(_e),m.offsets.push(A),MC(e,_e),m.widths.push(e.measureText(_e.text).width)}}r.forEach(function(V){const X=V.widths.reduce(function(Me,Ve){return Me+Ve},0);let ce=0,_e=0;"center"===t.textAlign&&(ce=X/2),"end"===t.textAlign&&(ce=X),V.options.forEach(function(Me,Ve){const Je=V.widths[Ve];Me.x=Me.x-ce+_e,Me.y+=V.offsets[Ve],_e+=Je}),V.elements.forEach(function(Me,Ve){Jw(Me.childNodes,e,V.options[Ve],i)})})}function tE(n,e,t,i){const r=n.tagName,m="text"===r||"tspan"===r||void 0===r,A="image"===r,V=8===n.nodeType,X=(0,_.X)({},t,IC(n,i.rootAppended));if("hidden"===X.visibility||X[ts]||V)return;let ce;switch(e.save(),!A&&nE(e,X),Xx(e,X,i),function RP(n){n.strokeOpacity=void 0!==n["stroke-opacity"]?n["stroke-opacity"]:1,n.fillOpacity=void 0!==n["fill-opacity"]?n["fill-opacity"]:1,void 0!==n.opacity&&(n.strokeOpacity*=n.opacity,n.fillOpacity*=n.opacity)}(X),e.beginPath(),n.tagName){case void 0:!function Id(n,e,t){MC(n,e),kP(n,e,t),e.text&&n.fillText(e.text,e.x||0,e.y||0),eT(n,e,!0),function fL(n,e,t){if(!e.textDecoration||"none"===e.textDecoration)return;const i=e.x,r=n.measureText(e.text).width,m=parseInt(e.fontSize,10),A=m*qS<1?1:m*qS;let V=e.y;switch(e.textDecoration){case"line-through":V-=m/3+A/2;break;case"overline":V-=m-A;break;case"underline":V+=A}n.rect(i,V,r,A),FP(n,e,t),eT(n,e)}(n,e,t)}(e,X,i);break;case"text":case"tspan":Jw(n.childNodes,e,X,i);break;case"image":ce=function gL(n,e,t){const i=new g.cY,r=new Zm.Image;return r.onload=function(){n.save(),n.globalAlpha=e.globalAlpha,nE(n,e),Xx(n,e,t),n.drawImage(r,e.x||0,e.y||0,e.width,e.height),n.restore(),i.resolve()},r.onerror=function(){i.resolve()},r.setAttribute("crossOrigin","anonymous"),r.src=e.href||e["xlink:href"],i}(e,X,i);break;case"path":!function PP(n,e){const t=e.replace(/,/g," ").split(/([A-Z])/i).filter(V=>""!==V.trim());let r,m,A,i=0;do{switch(r=(t[i+1]||"").trim().split(" "),t[i]){case"M":n.moveTo(ka(r[0]),ka(r[1])),i+=2;break;case"L":for(let V=0;V<r.length/2;V++)n.lineTo(ka(r[2*V]),ka(r[2*V+1]));i+=2;break;case"C":n.bezierCurveTo(ka(r[0]),ka(r[1]),ka(r[2]),ka(r[3]),ka(r[4]),ka(r[5])),i+=2;break;case"a":m=t[i-1].trim().split(" "),A=m.length-1,IP(ka(m[A-1]),ka(m[A]),ka(m[A-1])+ka(r[5]),ka(m[A])+ka(r[6]),ka(r[0]),ka(r[3]),ka(r[4]),n),i+=2;break;case"A":m=t[i-1].trim().split(" "),A=m.length-1,IP(ka(m[A-1]),ka(m[A]),ka(r[5]),ka(r[6]),ka(r[0]),ka(r[3]),ka(r[4]),n),i+=2;break;case"Z":n.closePath(),i+=1;break;default:i++}}while(i<t.length)}(e,X.d);break;case"rect":(function PC(n,e){const t=e.x,i=e.y,r=e.width,m=e.height;let A=e.rx;A?(A=OP(A,r/2,m/2),n.save(),n.translate(t,i),n.moveTo(r/2,0),n.arcTo(r,0,r,m,A),n.arcTo(r,m,0,m,A),n.arcTo(0,m,0,0,A),n.arcTo(0,0,A,0,A),n.lineTo(r/2,0),n.restore()):n.rect(t,i,r,m)})(e,X),e.closePath();break;case"circle":e.arc(X.cx,X.cy,X.r,0,2*EP,1)}return m||(kP(e,X,i),A||(ce=FP(e,X,i)),eT(e,X)),Kx(e,X,i,n,"linear"),Kx(e,X,i,n,"radial"),e.restore(),ce}function Kx(n,e,t,i,r){let{linearGradients:m,radialGradients:A}=t;const V="linear"===r?m:A;if(0===Object.keys(V).length)return;const X=Qm(e.fill);if(X&&V[X]){const _e=i.getBBox(),Me=_e.x+_e.width/2,Ve=_e.y+_e.height/2,Je=Math.max(_e.height/2,_e.width/2),rt="linear"===r?n.createLinearGradient(_e.x,0,_e.x+_e.width,0):n.createRadialGradient(Me,Ve,0,Me,Ve,Je);if(V[X].colors.forEach(Ct=>{const Xt=parseInt(Ct.offset.replace(/%/,""));rt.addColorStop(Xt/100,Ct.stopColor)}),"linear"===r){var ce;const Ct=(null===(ce=V[X].transform)||void 0===ce?void 0:ce.replace(/\D/g,""))*Math.PI/180;n.translate(Me,Ve),n.rotate(Ct),n.translate(-Me,-Ve)}n.globalAlpha=e.opacity,n.fillStyle=rt,n.fill()}}function kP(n,e,t){let i;const r=Qm(e.filter);r&&(i=t.filters[r],i||(i={offsetX:0,offsetY:0,blur:0,color:"#000"}),n.shadowOffsetX=i.offsetX,n.shadowOffsetY=i.offsetY,n.shadowColor=i.color,n.shadowBlur=i.blur)}function nE(n,e){n.translate(e.translateX||0,e.translateY||0),e.translateX=void 0,e.translateY=void 0,e.rotationAngle&&(n.translate(e.rotationX||0,e.rotationY||0),n.rotate(e.rotationAngle*EP/180),n.translate(-(e.rotationX||0),-(e.rotationY||0)),e.rotationAngle=void 0,e.rotationX=void 0,e.rotationY=void 0),isFinite(e.scaleX)&&(n.scale(e.scaleX,e.scaleY),e.scaleX=void 0,e.scaleY=void 0)}function Xx(n,e,t){e["clip-path"]&&(tE(t.clipPaths[Qm(e["clip-path"])],n,{},t),n.clip(),e["clip-path"]=void 0)}function qw(n){var e;const t={colors:[],transform:null===(e=n.attributes.gradientTransform)||void 0===e?void 0:e.textContent};return(0,w.__)(n.childNodes,(i,r)=>{let{attributes:m}=r;t.colors.push({offset:m.offset.value,stopColor:m["stop-color"].value})}),t}function LP(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new g.cY,i=0;for(;i<n.length;i++){const r=e(n[i]);if((0,C.yL)(r)){r.then(()=>{LP(Array.prototype.slice.call(n,i+1),e,t)});break}}return i===n.length&&t.resolve(),t}function oE(n,e,t,i){return LP(n,function(r){switch(r.tagName&&r.tagName.toLowerCase()){case"g":case"svg":{const m=(0,_.X)({},t,IC(r,i.rootAppended));e.save(),nE(e,m),Xx(e,m,i);const A=()=>{e.restore()},V=oE(r.childNodes,e,m,i);return(0,C.yL)(V)?V.then(A):A(),V}case"defs":return oE(r.childNodes,e,{},i);case"clippath":i.clipPaths[r.attributes.id.textContent]=r.childNodes[0];break;case"pattern":i.patterns[r.attributes.id.textContent]=r;break;case"filter":i.filters[r.id]=function mL(n){let e,t;const i={};return(0,w.__)(n.childNodes,function(r,m){const A=m.attributes;if(A.result)switch(A.result.value){case"gaussianBlurResult":i.blur=ka(A.stdDeviation.value);break;case"offsetResult":i.offsetX=ka(A.dx.value),i.offsetY=ka(A.dy.value);break;case"floodResult":e=A["flood-color"]?A["flood-color"].value:"#000",t=A["flood-opacity"]?A["flood-opacity"].value:1,i.color=function iE(n,e){const t=new Jn.A(n);return"rgba("+t.r+","+t.g+","+t.b+","+e+")"}(e,t)}}),i}(r);break;case"lineargradient":i.linearGradients[r.attributes.id.textContent]=qw(r);break;case"radialgradient":i.radialGradients[r.attributes.id.textContent]=qw(r);break;default:return tE(r,e,t,i)}})}function eT(n,e,t){const i=e.stroke;i&&"none"!==i&&0!==e["stroke-width"]&&(function BP(n,e){let t=e["stroke-dasharray"]&&e["stroke-dasharray"].match(/(\d+)/g);t&&t.length&&(t=(0,w.Tj)(t,function(i){return ka(i)}),n.setLineDash(t))}(n,e),n.lineJoin=e["stroke-linejoin"],n.lineWidth=e["stroke-width"],n.globalAlpha=e.strokeOpacity,n.strokeStyle=i,t?n.strokeText(e.text,e.x,e.y):n.stroke(),n.globalAlpha=1)}function FP(n,e,t){const i=e.fill;let r;if(i&&"none"!==i)if(-1===i.search(/url/))n.fillStyle=i,n.globalAlpha=e.fillOpacity,n.fill(),n.globalAlpha=1;else{const m=t.patterns[Qm(i)];if(!m)return;r=function NP(n,e,t,i){const r=IC(e,t.rootAppended),m=uc._createCanvas(r.width,r.height,0),A=m.getContext("2d"),V=oE(e.childNodes,A,r,t),X=()=>{n.fillStyle=n.createPattern(m,"repeat"),n.globalAlpha=i.fillOpacity,n.fill(),n.globalAlpha=1};return(0,C.yL)(V)?V.then(X):X(),V}(n,m,t,e)}return r}function VP(n,e,t){return oE(n.childNodes,e.getContext("2d"),{},{clipPaths:{},patterns:{},filters:{},linearGradients:{},radialGradients:{},rootAppended:t})}eE=function(n){const e={};let t;return(0,w.__)(n,function(i,r){t=r.textContent,isFinite(t)&&(t=ka(t)),e[r.name.toLowerCase()]=t}),e};const uc={getImageData:function(n,e){const t="image/"+e.format;return(0,C.Tn)(e.__parseAttributesFn)&&(eE=e.__parseAttributesFn),function HP(n,e){let{width:t,height:i,backgroundColor:r,margin:m,svgToCanvas:A=VP}=e;const V=vL(t,i),X=uc._createCanvas(V.width,V.height,m),ce=X.getContext("2d");ce.setTransform(V.pixelRatio,0,0,V.pixelRatio,0,0);const _e=Td(n);let Me;const Ve=c.A.isElementNode(n)||(0,C.Kb)(n);return ce.translate(m,m),c.A.getBody().appendChild(X),Ve||(Me=function LV(){const n=c.A.createElement("div");return n.style.left="-9999px",n.style.position="absolute",n}(),Me.appendChild(_e),c.A.getBody().appendChild(Me)),_e.attributes.direction&&(X.dir=_e.attributes.direction.textContent),function _L(n,e,t,i,r){n.fillStyle=i||"#ffffff",n.fillRect(-r,-r,e+2*r,t+2*r)}(ce,t,i,r,m),(0,g.Sx)(A(_e,X,Ve&&(0,_v.gR)(c.A.getBody(),(0,a.A)(n).get(0)))).then(()=>X).always(()=>{Me&&c.A.getBody().removeChild(Me),c.A.getBody().removeChild(X)})}(n,e).then(i=>function AP(n,e){const t=n.toDataURL(e,1);return Zm.atob(t.substring(("data:"+e+";base64,").length))}(i,t))},getData:function(n,e){const t=this;return uc.getImageData(n,e).then(i=>{const r="image/"+e.format;return(0,C.Tn)(Zm.Blob)&&!e.useBase64?t._getBlob(i,r):t._getBase64(i)})},_getBlob:function(n,e){let t;const i=new Uint8Array(n.length);for(t=0;t<n.length;t++)i[t]=n.charCodeAt(t);return new Zm.Blob([i.buffer],{type:e})},_getBase64:function(n){return Zm.btoa(n)},_createCanvas(n,e,t){const i=(0,a.A)("<canvas>")[0];return i.width=n+2*t,i.height=e+2*t,i.hidden=!0,i}};function vL(n,e){const t=Zm.devicePixelRatio||1;return{pixelRatio:t,width:n*t,height:e*t}}var Cv=M(1113);const tT=(0,gr.zk)(),rE={_markup:"",_imageArray:{},_imageDeferreds:[],_getBinaryFile:function(n,e){Cv.A.sendRequest({url:n,method:"GET",responseType:"arraybuffer"}).done(e).fail(function(){e(!1)})},_loadImages:function(){const n=this;(0,w.__)(n._imageArray,function(e){const t=new g.cY;n._imageDeferreds.push(t),n._getBinaryFile(e,function(i){if(!i)return delete n._imageArray[e],void t.resolve();let r,m="";const A=new Uint8Array(i),V=A.byteLength;for(r=0;r<V;r++)m+=String.fromCharCode(A[r]);n._imageArray[e]="data:image/png;base64,"+tT.btoa(m),t.resolve()})})},_parseImages:function(n){let e;const t=this;"image"===n.tagName&&(e=(0,a.A)(n).attr("href")||(0,a.A)(n).attr("xlink:href"),t._imageArray[e]||(t._imageArray[e]="")),(0,w.__)(n.childNodes,function(i,r){t._parseImages(r)})},_prepareImages:function(n){return this._parseImages(n),this._loadImages(),g.z7.apply(a.A,this._imageDeferreds)},getData:function(n,e){let t;const i=this,r=Td(n),m=(0,a.A)(r);return m.find(`[${ts}]`).remove(),t='<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'+ra(m.get(0),e.backgroundColor),i._prepareImages(r).then(()=>((0,w.__)(i._imageArray,function(A,V){t=t.replace(new RegExp(`href=['|"]${A}['|"]`,"gi"),`href="${V}"`)}),(0,C.Tn)(tT.Blob)?i._getBlob(t):i._getBase64(t)))},_getBlob:function(n){return new tT.Blob([n],{type:"image/svg+xml"})},_getBase64:function(n){return tT.btoa(n)}};var nT=M(9274);const RC=(0,gr.zk)(),iT=function(n,e){return n.length<e?iT("0"+n,e):n};function sE(n){return 1===n.toString().length?`0${n}`:n}function aE(n,e,t){if(!n)return(new g.cY).resolve();const i=e.exportingAction,r=e.exportedAction,m=e.fileSavingAction,A={fileName:e.fileName,format:e.format,cancel:!1};return(0,C.Lm)(e.selectedRowsOnly)&&(A.selectedRowsOnly=e.selectedRowsOnly),(0,C.Tn)(i)&&i(A),A.cancel?(new g.cY).resolve():t(n,e).then(V=>{(0,C.Tn)(r)&&r(),(0,C.Tn)(m)&&(A.data=V,m(A)),A.cancel||QS.saveAs(A.fileName,"xlsx"===e.format?"EXCEL":e.format,V)})}const lE={creator:uc,getData:function BV(n,e){return uc.getData(n,e)},testFormats:function UP(n){const e=uc._createCanvas(100,100,0);return n.reduce(function(t,i){const r=("image/"+i).toLowerCase();return-1!==e.toDataURL(r).indexOf(r)?t.supported.push(i):t.unsupported.push(i),t},{supported:[],unsupported:[]})}},Zx={getData:function Kf(n,e){return uc.getImageData(n,(0,_.X)({},e,{format:"JPEG"})).then(t=>{const i=function(n,e,t){const i=2*(e.margin||0);let{width:r,height:m}=vL(e.width,e.height);r+=i,m+=i;const A=(.75*r).toFixed(2),V=(.75*m).toFixed(2),X=Math.floor(r),ce=Math.floor(m),_e="%PDF-1.3\r\n2 0 obj\r\n<</ProcSet[/PDF/ImageB/ImageC/ImageI]/XObject<</I0 5 0 R>>>>\r\nendobj\r\n4 0 obj\r\n<</Type/Pages/Kids[1 0 R]/Count 1>>\r\nendobj\r\n7 0 obj\r\n<</OpenAction[1 0 R /FitH null]/Type/Catalog/Pages 4 0 R/PageLayout/OneColumn>>\r\nendobj\r\n1 0 obj\r\n<</Type/Page/Resources 2 0 R/MediaBox[0 0 _width_ _height_]/Contents 3 0 R/Parent 4 0 R>>\r\nendobj\r\n".replace("_width_",A).replace("_height_",V),Me="3 0 obj\r\n<</Length 52>>stream\r\n0.20 w\n0 G\nq _width_ 0 0 _height_ 0.00 0.00 cm /I0 Do Q\r\nendstream\r\nendobj\r\n".replace("_width_",A).replace("_height_",V),Ve="6 0 obj\r\n<</CreationDate _date_/Producer(DevExtreme _version_)>>\r\nendobj\r\n".replace("_date_",t).replace("_version_",nT.r),Je="5 0 obj\r\n<</Type/XObject/Subtype/Image/Width _width_/Height _height_/ColorSpace/DeviceRGB/BitsPerComponent 8/Filter/DCTDecode/Length _length_>>stream\r\n".replace("_width_",X).replace("_height_",ce).replace("_length_",n.length)+n+"\r\nendstream\r\nendobj\r\n",rt=function Ky(n,e,t){return"xref\r\n0 8\r\n0000000000 65535 f\r\n0000000241 00000 n\r\n0000000010 00000 n\r\n_main_ 00000 n\r\n0000000089 00000 n\r\n_image_ 00000 n\r\n_info_ 00000 n\r\n0000000143 00000 n\r\n".replace("_main_",iT(n+"",10)).replace("_info_",iT(n+e+"",10)).replace("_image_",iT(n+e+t+"",10))}(_e.length,Me.length,Ve.length),Ct=_e+Me+Ve+Je;return Ct+rt+"trailer\r\n<<\r\n/Size 8\r\n/Root 7 0 R\r\n/Info 6 0 R\r\n>>\r\nstartxref\r\n_length_\r\n%%EOF".replace("_length_",Ct.length)}(t,e,function xL(n){return`(D:${[n.getUTCFullYear(),sE(n.getUTCMonth()),sE(n.getUTCDate()),sE(n.getUTCHours()),sE(n.getUTCMinutes()),sE(n.getUTCSeconds())].join("")}Z00'00')`}(new Date));return(0,C.Tn)(RC.Blob)?function(n){let e=0;const t=new Uint8Array(n.length);for(;e<n.length;e++)t[e]=n.charCodeAt(e);return new RC.Blob([t.buffer],{type:"application/pdf"})}(i):function(n){return RC.btoa(n)}(i)})}},SL={creator:rE,getData:function Jg(n,e){return rE.getData(n,e)}};var Wn=M(8360),oT=M(1134);const cE=[Si.A.down,Si.A.move].join(" "),rT=[[9,12,26,12,26,14,9,14],[9,17,26,17,26,19,9,19],[9,22,26,22,26,24,9,24]],UV=["PNG","JPEG","GIF"],zV=["PDF","SVG"],Pd="dx-export-menu",lT="export-element-type",cT="export-element-format";function KP(){const n=lE.testFormats(UV);return{unsupported:n.unsupported,supported:n.supported.concat(zV)}}function dE(n,e,t){if(t=t||KP(),n=String(n).toUpperCase(),-1!==t.supported.indexOf(n))return n;-1!==t.unsupported.indexOf(n)&&e&&e("W2108",[n])}function dT(n){return"SVG"===n?SL.getData:"PDF"===n?Zx.getData:lE.getData}function YP(n,e,t){const i={},r=t.type,m=t.format,A=function AL(n,e,t){const i=-85,r=40+30*t,m={rect:{width:118,height:30,x:-84,y:r},text:{x:i+(n.rtl?105:15),y:r+30-8}};return"printing"===e&&(m.separator={stroke:n.button.default.borderColor,"stroke-width":1,cursor:"pointer",sharp:"v",d:"M -85 "+(r+30-1)+" L 35 "+(r+30-1)}),m}(e,r,t.itemIndex),V=Ti(e.font);V["pointer-events"]="none";const X=n.g().attr({class:Pd+"-list-item"});i[lT]=r,m&&(i[cT]=m);const ce=n.rect();ce.attr(A.rect).css({cursor:"pointer","pointer-events":"all"}).data(i),ce.on(oT.n+".export",()=>ce.attr({fill:e.button.hover.backgroundColor})).on(oT._+".export",()=>ce.attr({fill:null})),ce.append(X);const _e=n.text(t.text).css(V).attr(A.text).append(X);return"printing"===r&&n.path(null,"line").attr(A.separator).append(X),{g:X,rect:ce,resetState:()=>ce.attr({fill:null}),fixPosition:()=>{const Me=_e.getBBox();_e.move(A.text.x-Me.x-(e.rtl?Me.width:0))}}}let pT=function(n){const e=this._renderer=n.renderer;this._incidentOccurred=n.incidentOccurred,this._exportTo=n.exportTo,this._print=n.print,this._shadow=e.shadowFilter("-50%","-50%","200%","200%",2,6,3),this._shadow.attr({opacity:.8}),this._group=e.g().attr({class:Pd,[ts]:!0}).linkOn(e.root,{name:"export-menu",after:"peripheral"}),this._buttonGroup=e.g().attr({class:Pd+"-button"}).append(this._group),this._listGroup=e.g().attr({class:Pd+"-list"}).append(this._group),this._overlay=e.rect(-85,39,120,0),this._overlay.attr({"stroke-width":1,cursor:"pointer",rx:4,ry:4,filter:this._shadow.id}),this._overlay.data({"export-element-type":"list"}),this.validFormats=KP(),this._subscribeEvents()};function eM(n,e,t,i){(i||e.format)&&(i=dE(i||e.format,n._incidentOccurred));const{width:r,height:m}=n.getSize();return{format:i||"PNG",fileName:t||e.fileName||"file",backgroundColor:e.backgroundColor,width:r,height:m,margin:e.margin,svgToCanvas:e.svgToCanvas,exportingAction:n._createActionByOption("onExporting",{excludeValidators:["disabled"]}),exportedAction:n._createActionByOption("onExported",{excludeValidators:["disabled"]}),fileSavingAction:n._createActionByOption("onFileSaving",{excludeValidators:["disabled"]})}}(0,_.X)(pT.prototype,{getLayoutOptions(){if(this._hiddenDueToLayout)return{width:0,height:0,cutSide:"vertical",cutLayoutSide:"top"};const n=this._buttonGroup.getBBox();return n.cutSide="vertical",n.cutLayoutSide="top",n.height+=10,n.position={vertical:"top",horizontal:"right"},n.verticalAlignment="top",n.horizontalAlignment="right",n},shift(n,e){this._group.attr({translateY:this._group.attr("translateY")+e})},draw(n,e,t){this._group.move(n-35-2-3+t.left,Math.floor(e/2-17.5));const i=this.getLayoutOptions();return(i.width>n||i.height>e)&&this.freeSpace(),this},show(){this._group.linkAppend()},hide(){this._group.linkRemove()},setOptions(n){this._options=n,n.formats=n.formats?n.formats.reduce((e,t)=>((t=dE(t,this._incidentOccurred,this.validFormats))&&e.push(t),e),[]):this.validFormats.supported.slice(),n.printingEnabled=void 0===n.printingEnabled||n.printingEnabled,n.enabled&&(n.formats.length||n.printingEnabled)?(this.show(),this._updateButton(),this._updateList(),this._hideList()):this.hide()},dispose(){this._unsubscribeEvents(),this._group.linkRemove().linkOff(),this._group.dispose(),this._shadow.dispose()},layoutOptions(){return this._options.enabled&&{horizontalAlignment:"right",verticalAlignment:"top",weak:!0}},measure(){this._fillSpace();const n=this._options.button.margin;return[35+n.left+n.right,35+n.top+n.bottom]},move(n){const e=this._options.button.margin;this._group.attr({translateX:Math.round(n[0])+e.left,translateY:Math.round(n[1])+e.top})},_fillSpace(){this._hiddenDueToLayout=!1,this.show()},freeSpace(){this._incidentOccurred("W2107"),this._hiddenDueToLayout=!0,this.hide()},_hideList(){this._listGroup.remove(),this._listShown=!1,this._setButtonState("default"),this._menuItems.forEach(n=>n.resetState())},_showList(){this._listGroup.append(this._group),this._listShown=!0,this._menuItems.forEach(n=>n.fixPosition())},_setButtonState(n){const e=this._options.button[n];this._button.attr({stroke:e.borderColor,fill:e.backgroundColor}),this._icon.attr({fill:e.color})},_subscribeEvents(){this._renderer.root.on(Si.A.up+".export",n=>{const e=n.target[lT];e?"button"===e?this._listShown?(this._setButtonState("default"),this._hideList()):(this._setButtonState("focus"),this._showList()):"printing"===e?(this._print(),this._hideList()):"exporting"===e&&(this._exportTo(n.target[cT]),this._hideList()):this._button&&this._hideList()}),this._listGroup.on(cE,n=>n.stopPropagation()),this._buttonGroup.on(Si.A.enter,()=>this._setButtonState("hover")),this._buttonGroup.on(Si.A.leave,()=>this._setButtonState(this._listShown?"focus":"default")),this._buttonGroup.on(Si.A.down+".export",()=>this._setButtonState("active"))},_unsubscribeEvents(){this._renderer.root.off(".export"),this._listGroup.off(),this._buttonGroup.off()},_updateButton(){const n=this._renderer,e=this._options,t={"export-element-type":"button"};this._button||(this._button=n.rect(0,0,35,35).append(this._buttonGroup),this._button.attr({rx:4,ry:4,fill:e.button.default.backgroundColor,stroke:e.button.default.borderColor,"stroke-width":1,cursor:"pointer"}),this._button.data(t),this._icon=n.path(rT).append(this._buttonGroup),this._icon.attr({fill:e.button.default.color,cursor:"pointer"}),this._icon.data(t),this._buttonGroup.setTitle(Wn.A.format("vizExport-titleMenuText")))},_updateList(){const n=this._options,e=n.button.default,t=this._listGroup,i=function ZP(n,e){let t=[];return e.printingEnabled&&t.push(YP(n,e,{type:"printing",text:Wn.A.format("vizExport-printingButtonText"),itemIndex:t.length})),t=e.formats.reduce((i,r)=>(i.push(YP(n,e,{type:"exporting",text:Wn.A.getFormatter("vizExport-exportButtonText")(r),format:r,itemIndex:i.length})),i),t),t}(this._renderer,n);this._shadow.attr({color:n.shadowColor}),this._overlay.attr({height:30*i.length+2,fill:e.backgroundColor,stroke:e.borderColor}),t.clear(),this._overlay.append(t),i.forEach(r=>r.g.append(t)),this._menuItems=i}});const bv={name:"export",init(){this._exportMenu=new pT({renderer:this._renderer,incidentOccurred:this._incidentOccurred,print:()=>this.print(),exportTo:n=>this.exportTo(void 0,n)}),this._layout.add(this._exportMenu)},dispose(){this._exportMenu.dispose()},members:{_getExportMenuOptions(){return(0,_.X)({},this._getOption("export"),{rtl:this._getOption("rtlEnabled",!0)})},_disablePointerEvents(){const n=this._renderer.root.attr("pointer-events");return this._renderer.root.attr({"pointer-events":"none"}),n},exportTo(n,e){const t=this._exportMenu,i=eM(this,this._getOption("export")||{},n,e);t&&t.hide();const r=this._disablePointerEvents(),m=aE(this._renderer.root.element,i,dT(i.format)).fail(Ks.v.error).always(()=>{this._renderer.root.attr({"pointer-events":r})});return t&&t.show(),m},print(){const n=this._exportMenu,e=eM(this,this._getOption("export")||{});e.exportingAction=null,e.exportedAction=null,e.margin=0,e.format="PNG",e.useBase64=!0,e.fileSavingAction=r=>{(function XP(n,e){const t=(0,gr.zk)().document,i=t.createElement("iframe");i.onload=function DL(n,e){return function(){let t=this.contentWindow;const i=t.document.createElement("img");t.document.body.appendChild(i);const r=function TL(n){n.style.width="21cm";const e=(0,D.RG)(n);return n.style.width="",e}(t.document.body)/e.width;r<1&&(t.document.body.style.transform=`scale(${r})`,t.document.body.style["transform-origin"]="0 0");const m=()=>{this.parentElement.removeChild(this)};i.addEventListener("load",()=>{t.focus(),t.print()}),i.addEventListener("error",m),t.addEventListener("afterprint",()=>{setTimeout(m,0)}),i.src=n}}(n,e),i.style.position="fixed",i.style.width="0",i.style.height="0",i.style.right="0",i.style.bottom="0",t.body.appendChild(i)})(`data:image/png;base64,${r.data}`,{width:e.width,__test:e.__test}),r.cancel=!0};const t=this._disablePointerEvents();n&&n.hide();const i=aE(this._renderer.root.element,e,dT(e.format)).fail(Ks.v.error).always(()=>{this._renderer.root.attr({"pointer-events":t})});return n&&n.show(),i}},customize(n){const e=n.prototype;n.addChange({code:"EXPORT",handler(){this._exportMenu.setOptions(this._getExportMenuOptions()),this._change(["LAYOUT"])},isThemeDependent:!0,isOptionChange:!0,option:"export"}),e._optionChangesMap.onExporting="EXPORT",e._optionChangesMap.onExported="EXPORT",e._optionChangesMap.onFileSaving="EXPORT"},fontFields:["export.font"]};let gT=function(n){const e=n.renderer;this._group=e.g().attr({class:"dx-loading-indicator"}).linkOn(e.root,{name:"loading-indicator",after:"peripheral"}),this._rect=e.rect().attr({opacity:0}).append(this._group),this._text=e.text().attr({align:"center"}).append(this._group),this._createStates(n.eventTrigger,this._group,e.root,n.notify)};gT.prototype={constructor:gT,_createStates:function(n,e,t,i){this._states=[{opacity:0,start:function(){i(!1)},complete:function(){e.linkRemove(),t.css({"pointer-events":""}),n("loadingIndicatorReady")}},{opacity:.85,start:function(){e.linkAppend(),t.css({"pointer-events":"none"}),i(!0)},complete:function(){n("loadingIndicatorReady")}}],this._state=0},setSize:function(n){const e=n.width,t=n.height;this._rect.attr({width:e,height:t}),this._text.attr({x:e/2,y:t/2})},setOptions:function(n){this._rect.attr({fill:n.backgroundColor}),this._text.css(Ti(n.font)).attr({text:n.text,class:n.cssClass}),this[n.show?"show":"hide"]()},dispose:function(){this._group.linkRemove().linkOff(),this._group=this._rect=this._text=this._states=null},_transit:function(n){const e=this;let t;e._state!==n&&(e._state=n,e._isHiding=!1,t=e._states[n],e._rect.stopAnimation().animate({opacity:t.opacity},{complete:t.complete,easing:"linear",duration:400,unstoppable:!0}),e._noHiding=!0,t.start(),e._noHiding=!1)},show:function(){this._transit(1)},hide:function(){this._transit(0)},scheduleHiding:function(){this._noHiding||(this._isHiding=!0)},fulfillHiding:function(){this._isHiding&&this.hide()}};const LC={name:"loading_indicator",init:function(){const n=this;n._loadingIndicator=new gT({eventTrigger:n._eventTrigger,renderer:n._renderer,notify:function(e){n._skipLoadingIndicatorOptions=!0,n.option("loadingIndicator",{show:e}),n._skipLoadingIndicatorOptions=!1,e&&n._stopCurrentHandling()}}),n._scheduleLoadingIndicatorHiding()},dispose:function(){this._loadingIndicator.dispose(),this._loadingIndicator=null},members:{_scheduleLoadingIndicatorHiding:function(){this._loadingIndicator.scheduleHiding()},_fulfillLoadingIndicatorHiding:function(){this._loadingIndicator.fulfillHiding()},showLoadingIndicator:function(){this._loadingIndicator.show()},hideLoadingIndicator:function(){this._loadingIndicator.hide()},_onBeginUpdate:function(){this._optionChangedLocker||this._scheduleLoadingIndicatorHiding()}},extenders:{_dataSourceLoadingChangedHandler(n){n&&(this._options.silent("loadingIndicator")||{}).enabled&&this._loadingIndicator.show()},_setContentSize(){this._loadingIndicator.setSize(this._canvas)},endUpdate(){this._initialized&&this._dataIsReady()&&this._fulfillLoadingIndicatorHiding()}},customize:function(n){const e=n.prototype;if(e._dataSourceChangedHandler){const i=e._dataSourceChangedHandler;e._dataSourceChangedHandler=function(){this._scheduleLoadingIndicatorHiding(),i.apply(this,arguments)}}n.addChange({code:"LOADING_INDICATOR",handler:function(){this._skipLoadingIndicatorOptions||this._loadingIndicator.setOptions(this._getOption("loadingIndicator")),this._scheduleLoadingIndicatorHiding()},isThemeDependent:!0,option:"loadingIndicator",isOptionChange:!0}),e._eventsMap.onLoadingIndicatorReady={name:"loadingIndicatorReady"};const t=e._drawn;e._drawn=function(){t.apply(this,arguments),this._dataIsReady()&&this._fulfillLoadingIndicatorHiding()}},fontFields:["loadingIndicator.font"]};var Hd=M(6772),fp=M(9144);const tM=["x","y","canvas","offsetX","offsetY","offset"],qm=Math,e_=qm.round,Vu=qm.max,Qx=qm.min,Hu=qm.sin,au=qm.cos,BC=qm.asin,fT=qm.PI,qg=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return e.join("")};function gd(n,e,t){return`a ${n} ${n} 0 0 1 ${e*n} ${t*n}`}function Jx(n,e,t){return`A ${n} ${n} 0 0 1 ${e} ${t}`}function RL(n,e,t,i,r){return(n-i)*e_(au(t))+(e-r)*e_(Hu(t))+i}function kL(n,e,t,i,r){return-(n-i)*e_(Hu(t))+(e-r)*e_(au(t))+r}function LL(n,e){return e%90==0&&e%180!=0?{width:n.height,height:n.width}:n}function Qy(n,e,t,i,r){let{width:m,height:A}=n;const V=m/2,X=A/2,ce=Math.ceil(e+V),_e=Math.floor(e-V),Me=Math.floor(t-X),Ve=Math.ceil(t+X);return i<_e&&r<Me||i>=_e&&i<=ce&&r<Me?270:i>ce&&r>Ve||i>=_e&&i<=ce&&r>Ve?90:i<_e&&r>Ve||i<_e&&r>=Me&&r<=Ve?180:0}function BL(n,e,t,i,r,m,A){let{width:V,height:X}=n,{arrowWidth:ce,cornerRadius:_e=0}=m;const Me=ce/2,Ve=V/2,Je=X/2,rt=Math.ceil(e+Ve),Ct=Math.floor(e-Ve),Xt=Math.floor(t-Je),On=Math.ceil(t+Je),Fn=[Ct,Xt],oi=[rt,Xt],Yt=[rt,On],$t=[Ct,On],xn=i<=Ct?Ct:rt<=i?rt:i,Gn=r<=Xt?Xt:On<=r?On:r,qn=Qx(Gn+Me,On),ii=Vu(Gn-Me,Xt),qi=Vu(xn-Me,Ct);let ji;if(_e=Math.min(V/2,X/2,_e),Fn[1]+=_e,oi[0]-=_e,Yt[1]-=_e,$t[0]+=_e,!A||Ct<=i&&i<=rt&&Xt<=r&&r<=On)ji=qg(Fn,gd(_e,1,-1),"L",oi,gd(_e,1,1),"L",Yt,gd(_e,-1,1),"L",$t,gd(_e,-1,-1));else if(i>rt&&r<Xt){const $i=ce/_e||0,ho=fT/4+$i/2,io=fT/4-$i/2,Uo=oi[0]+au(io)*_e,zr=oi[1]+(1-Hu(io))*_e;let Os=qg("L",oi,gd(_e,au(ho),1-Hu(ho)),"L",[i,r,Uo,zr],Jx(_e,oi[0]+_e,oi[1]+_e));Math.abs(ho)>fT/2&&(Os=qg("L",[qi,Xt,i,r,rt,qn])),ji=qg(Fn,gd(_e,1,-1),Os,"L",Yt,gd(_e,-1,1),"L",$t,gd(_e,-1,-1))}else if(i>rt&&r>=Xt&&r<=On){let $i;if(ii>=oi[1]+_e&&qn<=Yt[1])$i=qg(gd(_e,1,1),"L",[rt,ii,i,r,rt,qn],"L",Yt,gd(_e,-1,1));else if(ii<oi[1]+_e&&qn>=oi[1]+_e&&qn<=Yt[1]){const io=(oi[1]+_e-ii)/_e,Uo=oi[0]+au(io)*_e,zr=oi[1]+(1-Hu(io))*_e;$i=qg(gd(_e,au(io),1-Hu(io)),"L",[Uo,zr,i,r,rt,qn],"L",Yt,gd(_e,-1,1))}else if(ii<oi[1]+_e&&qn<oi[1]+_e){const Uo=(oi[1]+_e-ii)/_e,zr=oi[0]+au(Uo)*_e,Os=oi[1]+(1-Hu(Uo))*_e,wa=Math.sin((oi[1]+_e-qn)/_e),$l=oi[0]+_e*au(wa),Gc=oi[1]+_e*(1-Hu(wa));$i=qg(gd(_e,au(Uo),1-Hu(Uo)),"L",[zr,Os,i,r,$l,Gc],Jx(_e,oi[0]+_e,oi[1]+_e),"L",Yt,gd(_e,-1,1))}else if(ii<=oi[1]+_e&&qn>=Yt[1]){const ho=BC((oi[1]+_e-ii)/_e),io=oi[0]+_e*au(ho),Uo=oi[1]+_e*(1-Hu(ho)),zr=BC((qn-Yt[1])/_e),Os=Yt[0]+_e*(au(zr)-1),wa=Yt[1]+_e*Hu(zr);$i=qg(gd(_e,au(ho),1-Hu(ho)),"L",[io,Uo,i,r,Os,wa],Jx(_e,Yt[0]-_e,Yt[1]+_e))}else if(ii>oi[1]+_e&&ii<=Yt[1]&&qn>Yt[1]){const ho=BC((qn-Yt[1])/_e),io=Yt[0]+_e*(au(ho)-1),Uo=Yt[1]+_e*Hu(ho);$i=qg(gd(_e,1,1),"L",[rt,ii,i,r,io,Uo],Jx(_e,Yt[0]-_e,Yt[1]+_e))}else if(ii>oi[1]+_e&&qn>Yt[1]){const ho=BC((qn-Yt[1])/_e),io=Yt[0]+_e*(au(ho)-1),Uo=Yt[1]+_e*Hu(ho),zr=BC((ii-Yt[1])/_e),Os=Yt[0]+_e*(au(zr)-1),wa=Yt[1]+_e*Hu(zr);$i=qg(gd(_e,1,1),"L",Yt,gd(_e,au(zr)-1,Hu(zr)),"L",[Os,wa,i,r,io,Uo],Jx(_e,Yt[0]-_e,Yt[1]+_e))}ji=qg(Fn,gd(_e,1,-1),"L",oi,$i,"L",$t,gd(_e,-1,-1))}return qg("M",ji,"Z")}class qx{constructor(e,t,i,r){let m=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],A=arguments.length>5&&void 0!==arguments[5]?arguments[5]:(X,ce)=>ce.getBBox(),V=arguments.length>6&&void 0!==arguments[6]?arguments[6]:(X,ce,_e,Me)=>ce.move(_e,Me);this.widget=t,this.options=e,this.root=i,this.contentTemplate=r,this.bonded=m,this.measureContent=A,this.moveContentGroup=V}draw(e){let{x:t,y:i,canvas:r={},offsetX:m,offsetY:A,offset:V=0}=e,X=(0,fp.A)(e,tM);const ce=this.options;let{x:_e,y:Me}=ce;const Ve=r.left,Je=r.width-r.right,rt=r.width-r.right-r.left,Ct=r.top,Xt=r.height-r.bottom,On=r.height-r.bottom-r.top;if((!(0,C.O9)(t)||!(0,C.O9)(i))&&(!(0,C.O9)(_e)||!(0,C.O9)(Me))||(0,C.O9)(t)&&(t<Ve||Je<t||i<Ct||Xt<i))return!1;this._root||this._draw();const Fn=(0,_.X)({x:"-50%",y:"-50%",width:"200%",height:"200%"},ce.shadow),oi=ce.width>0?ce.width:null,Yt=ce.height>0?ce.height:null,$t=()=>{var xn;const Gn=this._contentBBox=this.measureContent(this.widget,this._contentGroup),qn=this._size={width:Vu(oi,Gn.width)+2*ce.paddingLeftRight,height:Vu(Yt,Gn.height)+2*ce.paddingTopBottom,offset:V},ii=Fn.offsetX,qi=Fn.offsetY,ji=2*Fn.blur+1,$i=Vu(ji-ii,0),ho=Vu(ji+ii,0),io=Vu(ji-qi,0),Uo=Vu(ji+qi,0);if(this.margins={lm:$i,rm:ho,tm:io,bm:Uo},(0,C.O9)(_e)?(_e+=m||0,(0,C.O9)(t)||(t=_e)):_e=(0,C.O9)(m)?t+m:rt<qn.width?e_(Ve+rt/2):Qx(Vu(t,Math.ceil(Ve+qn.width/2+$i)),Math.floor(Je-qn.width/2-ho)),(0,C.O9)(Me))Me+=A||0,(0,C.O9)(i)||(i=Me+qn.height/2);else if((0,C.O9)(A))Me=i+A;else{const zr=i-ce.arrowLength-qn.height/2-V,Os=i+ce.arrowLength+qn.height/2+V;On<qn.height+ce.arrowLength?Me=e_(Ct+qn.height/2):zr-qn.height/2-io<Ct?Os+qn.height/2+Uo<Xt?(Me=Os,i+=V):Me=e_(Ct+qn.height/2):(Me=zr,i-=V)}this.anchorX=t,this.anchorY=i,this.move(_e,Me),null===(xn=this._root)||void 0===xn||xn.append(this.root)};return this.contentTemplate.render?(this.contentTemplate.render({model:ce,container:this._contentGroup.element,onRendered:$t}),!0):this.contentTemplate((0,Lo.A)({group:this._contentGroup,onRender:$t},X))}_draw(){const e=this.widget._renderer,t=this.options,i=(0,_.X)({x:"-50%",y:"-50%",width:"200%",height:"200%"},t.shadow),r=this._shadow=e.shadowFilter().attr(i),m={opacity:t.opacity,"stroke-width":0,fill:t.color},A=t.border||{};A.visible&&(0,_.X)(m,{"stroke-width":A.width,stroke:A.color,"stroke-opacity":A.opacity,dashStyle:A.dashStyle});const V=this._root=e.g().append(this.root);t.type&&V.attr({class:`dxc-${t.type}-annotation`});const X=e.g().attr({filter:r.id}).append(V);this._cloud=e.path([],"area").attr(m).sharp().append(X),this._contentGroup=e.g().append(V)}getBBox(){const e=this._size||{},t=this.margins||{},i=Qy(e,this.x,this.y,this.anchorX,this.anchorY);return{x:Math.floor(this.x-e.width/2-t.lm),y:Math.floor(this.y-e.height/2-t.tm-(270===i?this.options.arrowLength:0)),width:e.width+t.lm+t.rm,height:e.height+t.tm+t.bm+(90===i||270===i?this.options.arrowLength:0)}}clear(){return this._root&&(this._root.remove(),this._shadow.remove(),this._root=null),this}customizeCloud(e){this._cloud&&this._cloud.attr(e)}moveRoot(e,t){this._root&&this._root.move(e,t)}move(e,t){e=e_(e),t=e_(t),this.x=e,this.y=t;const i=Qy(this._size,e,t,this.anchorX,this.anchorY),r=i*fT/180;this._cloud.attr({d:BL(LL(this._size,i),e,t,RL(this.anchorX,this.anchorY,r,e,t),kL(this.anchorX,this.anchorY,r,e,t),this.options,this.bonded)}).rotate(i,e,t),this.moveContentGroup(this.widget,this._contentGroup,e-this._contentBBox.x-this._contentBBox.width/2,t-this._contentBBox.y-this._contentBBox.height/2)}hitTest(e,t){const{width:i,height:r}=this._size||{};return Math.abs(e-this.x)<=i/2&&Math.abs(t-this.y)<=r/2}}const mT=Hd.A.format,xv=Math.ceil,NC=Math.max,uE=Math.min,FC=(0,gr.zk)();function VC(n){n.css({left:"-9999px"}).detach()}function e0(){return(0,a.A)("<div>").css({position:"relative",display:"inline-block",padding:0,margin:0,border:"0px solid transparent"})}let Jy=function(n){this._eventTrigger=n.eventTrigger,this._widgetRoot=n.widgetRoot,this._widget=n.widget,this._textHtmlContainers=[],this._wrapper=(0,a.A)("<div>").css({position:"absolute",overflow:"hidden",pointerEvents:"none"}).addClass(n.cssClass);const e=this._renderer=new Nu({pathModified:n.pathModified,container:this._wrapper[0]});e.root.attr({"pointer-events":"none"}),this._text=e.text(void 0,0,0),this._textGroupHtml=(0,a.A)("<div>").css({position:"absolute",padding:0,margin:0,border:"0px solid transparent"}).appendTo(this._wrapper),this._textHtml=e0().appendTo(this._textGroupHtml)};Jy.prototype={constructor:Jy,dispose:function(){this._wrapper.remove(),this._renderer.dispose(),this._options=this._widgetRoot=null},_getContainer:function(){const n=this._options;let e=(0,a.A)(this._widgetRoot).closest(n.container);return 0===e.length&&(e=(0,a.A)(n.container)),(e.length?e:(0,a.A)("body")).get(0)},setTemplate(n){this._template=n?this._widget._getTemplate(n):null},setOptions:function(n){const e=this;e._options=n=n||{},e._textFontStyles=Ti(n.font),e._textFontStyles.color=e._textFontStyles.fill,e._wrapper.css({zIndex:n.zIndex}),e._customizeTooltip=n.customizeTooltip;const t=e._textGroupHtml;this.plaque&&this.plaque.clear(),this.setTemplate(n.contentTemplate);const i=n.interactive?"auto":"none";return n.interactive&&this._renderer.root.css({"-moz-user-select":"auto","-webkit-user-select":"auto"}),this.plaque=new qx({opacity:e._options.opacity,color:e._options.color,border:e._options.border,paddingLeftRight:e._options.paddingLeftRight,paddingTopBottom:e._options.paddingTopBottom,arrowLength:e._options.arrowLength,arrowWidth:20,shadow:e._options.shadow,cornerRadius:e._options.cornerRadius},e,e._renderer.root,r=>{let{group:m,onRender:A,eventData:V,isMoving:X,templateCallback:ce=(()=>{})}=r;const _e=e._state;if(!X){const Me=e._template,Ve=Me&&!_e.formatObject.skipTemplate;if(_e.html||Ve){if(t.css({color:_e.textColor,width:3e3,pointerEvents:i}),Ve){const Je=e._textHtmlContainers,rt=e0().appendTo(e._textGroupHtml);return Je.push(rt),void Me.render({model:_e.formatObject,container:rt,onRendered:()=>{if(function t0(n){n.forEach(e=>e.remove())}(Je.splice(0,Je.length-1)),e._textHtml=(0,_v.bG)(e._textHtml,rt),_e.html=e._textHtml.html(),0===(0,D.RG)(e._textHtml)&&0===(0,D.Oq)(e._textHtml))return this.plaque.clear(),void ce(!1);A(),e._riseEvents(V),e._moveWrapper(),e.plaque.customizeCloud({fill:_e.color,stroke:_e.borderColor,"pointer-events":i}),ce(!0),e._textHtmlContainers=[]}})}e._text.attr({text:""}),e._textHtml.html(_e.html)}else e._text.css({fill:_e.textColor}).attr({text:_e.text,class:n.cssClass,"pointer-events":i}).append(m.attr({align:n.textAlignment}));e._riseEvents(V),e.plaque.customizeCloud({fill:_e.color,stroke:_e.borderColor,"pointer-events":i})}return A(),e._moveWrapper(),!0},!0,(r,m)=>{if(r._state.html){let V=FC.getComputedStyle(e._textHtml.get(0));return V={x:0,y:0,width:xv(parseFloat(V.width)),height:xv(parseFloat(V.height))},V}return m.getBBox()},(r,m,A,V)=>{r._state.html?e._textGroupHtml.css({left:A,top:V}):m.move(A,V)}),e},_riseEvents:function(n){this._eventData&&this._eventTrigger("tooltipHidden",this._eventData),this._eventData=n,this._eventTrigger("tooltipShown",this._eventData)},setRendererOptions:function(n){return this._renderer.setOptions(n),this._textGroupHtml.css({direction:n.rtl?"rtl":"ltr"}),this},update:function(n){const e=this;e.setOptions(n),VC(e._wrapper);const t={};for(const i in e._textFontStyles)t[(0,vv.PT)(i)]=e._textFontStyles[i];return e._textGroupHtml.css(t),e._text.css(e._textFontStyles),e._eventData=null,e},_prepare:function(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._customizeTooltip;const i=this._options;let r={};return(0,C.Tn)(t)&&(r=t.call(n,n),r=(0,C.Qd)(r)?r:{},"text"in r&&(e.text=(0,C.O9)(r.text)?String(r.text):""),"html"in r&&(e.html=(0,C.O9)(r.html)?String(r.html):"")),!("text"in e)&&!("html"in e)&&(e.text=n.valueText||n.description||""),e.color=r.color||i.color,e.borderColor=r.borderColor||(i.border||{}).color,e.textColor=r.fontColor||(this._textFontStyles||{}).color,!!e.text||!!e.html||!!this._template},show:function(n,e,t,i,r){const m=this;if(m._options.forceEvents)return t.x=e.x,t.y=e.y-e.offset,m._riseEvents(t),!0;const A={formatObject:n,eventData:t,templateCallback:r};if(!m._prepare(n,A,i))return!1;m._state=A,m._wrapper.appendTo(m._getContainer()),m._clear();const V=(0,_.X)({},m._options,{canvas:m._getCanvas()},A,{x:e.x,y:e.y,offset:e.offset});return this.plaque.clear().draw(V)},isCursorOnTooltip:function(n,e){if(this._options.interactive){const t=this.plaque.getBBox();return n>t.x&&n<t.x+t.width&&e>t.y&&e<t.y+t.height}return!1},hide:function(n){const e=this;VC(e._wrapper),e._eventData&&(e._eventTrigger("tooltipHidden",e._options.forceEvents?(0,_.X)({isPointerOut:n},e._eventData):e._eventData),e._clear(),e._eventData=null)},_clear(){this._textHtml.empty()},move:function(n,e,t){this.plaque.draw({x:n,y:e,offset:t,canvas:this._getCanvas(),isMoving:!0})},_moveWrapper:function(){const n=this,e=this.plaque.getBBox();n._renderer.resize(e.width,e.height);const t=n._wrapper.css({left:0,top:0}).offset(),i=e.x,r=e.y;n._wrapper.css({left:i-t.left,top:r-t.top}),this.plaque.moveRoot(-i,-r),this._state.html&&(n._textHtml.css({left:-i,top:-r}),n._textGroupHtml.css({width:xv((0,D.RG)(n._textHtml))}))},formatValue:function(n,e){const t=e?function vT(n,e){let t=n;switch(e){case"argument":t={format:n.argumentFormat};break;case"percent":t={format:{type:"percent",precision:n.format&&n.format.percentPrecision}}}return t}(this._options,e):this._options;return mT(n,t.format)},getOptions(){return this._options},getLocation:function(){return Wi(this._options.location)},isEnabled:function(){return!!this._options.enabled||!!this._options.forceEvents},isShared:function(){return!!this._options.shared},_getCanvas:function(){const n=this._getContainer(),e=n.getBoundingClientRect(),t=c.A.getDocumentElement(),i=c.A.getDocument();let r=FC.pageXOffset||t.scrollLeft||0,m=FC.pageYOffset||t.scrollTop||0;const A={left:r,top:m,width:NC(t.clientWidth,i.body.clientWidth)+r,height:NC(i.body.scrollHeight,t.scrollHeight,i.body.offsetHeight,t.offsetHeight,i.body.clientHeight,t.clientHeight),right:0,bottom:0};return n!==c.A.getBody()&&(r=NC(A.left,A.left+e.left),m=NC(A.top,A.top+e.top),A.width=uE(e.width,A.width)+r+A.left,A.height=uE(e.height,A.height)+m+A.top,A.left=r,A.top=m),A}};const qy={name:"tooltip",init:function(){this._initTooltip()},dispose:function(){this._disposeTooltip()},members:{_initTooltip:function(){this._tooltip=new Jy({cssClass:this._rootClassPrefix+"-tooltip",eventTrigger:this._eventTrigger,pathModified:this.option("pathModified"),widgetRoot:this.element(),widget:this})},_disposeTooltip:function(){this._tooltip.dispose(),this._tooltip=null},_setTooltipRendererOptions:function(){this._tooltip.setRendererOptions(this._getRendererOptions())},_setTooltipOptions:function(){this._tooltip.update(this._getOption("tooltip"))}},extenders:{_stopCurrentHandling(){this._tooltip&&this._tooltip.hide()}},customize:function(n){const e=n.prototype;e._eventsMap.onTooltipShown={name:"tooltipShown"},e._eventsMap.onTooltipHidden={name:"tooltipHidden"},n.addChange({code:"TOOLTIP_RENDERER",handler:function(){this._setTooltipRendererOptions()},isThemeDependent:!0,isOptionChange:!0}),n.addChange({code:"TOOLTIP",handler:function(){this._setTooltipOptions()},isThemeDependent:!0,isOptionChange:!0,option:"tooltip"})},fontFields:["tooltip.font"]};var hE=M(2923);const nM=":";function FL(n,e){let t="";const i=n.indexOf(nM);return i>0&&(t=n.substr(i+1),n=n.substr(0,i)),function NL(n,e){if(e){if(n instanceof Date)return(0,hE.Yq)(n,e);if("number"==typeof n)return(0,hE.ZV)(n,e)}return n}(e[n],t)}const Xf=Hd.A.format,yT=Math,t_=yT.round,Sv=yT.floor,n_=yT.abs;function VL(n,e){let i,t=1/0;return(0,w.__)(e,function(r,m){const A=n[0]-m[0],V=n[1]-m[1],X=A*A+V*V;X<t&&(t=X,i=m)}),[Sv(i[0]),Sv(i[1])]}function eb(n,e,t){return(e-n[0+t])/(n[2+t]-n[0+t])*(n[3-t]-n[1-t])+n[1-t]}const gE={isLabelInside:function(n,e){const t=n.x+n.width/2,i=n.y+n.height/2;return e.x<=t&&t<=e.x+e.width&&e.y<=i&&i<=e.y+e.height},prepareLabelPoints:function(n,e,t,i,r){const m=e.x,A=m+e.width/2,V=m+e.width-1,X=e.y,ce=X+e.height/2,_e=X+e.height-1;let Me;const Ve=n_(i)%90==0;return Me=r[0]>m&&r[0]<V?Ve?[[r[0],n_(r[1]-X)<n_(r[1]-_e)?X:_e]]:[[r[0],eb([m,X,V,_e],r[0],0)]]:r[1]>X&&r[1]<_e?Ve?[[n_(r[0]-m)<n_(r[0]-V)?m:V,r[1]]]:[[eb([m,X,V,_e],r[1],1),r[1]]]:Ve?[[m,X],[t?m:A,t?ce:X],[V,X],[m,_e],[t?V:A,t?ce:_e],[V,_e]]:[[A,ce]],Me},isHorizontal:function(n,e){return n.x>e.x+e.width||n.x+n.width<e.x},getFigureCenter:function(n){return[Sv(n.x+n.width/2),Sv(n.y+n.height/2)]},findFigurePoint:function(n,e){const t=gE.getFigureCenter(n);return VL(e,[[n.x,t[1]],[t[0],n.y+n.height],[n.x+n.width,t[1]],[t[0],n.y]])},adjustPoints:function(n){const e=n_(n[1]-n[3])<=1;return n_(n[0]-n[2])<=1&&(n[0]=n[2]),e&&(n[1]=n[3]),n}},n0={isLabelInside:function(){return!1},prepareLabelPoints:gE.prepareLabelPoints,isHorizontal:function(n,e){return n.x>e.x+e.r||n.x+n.width<e.x-e.r},getFigureCenter:function(n){return[n.x,n.y]},findFigurePoint:function(n,e){const t=Math.atan2(n.y-e[1],e[0]-n.x);return[t_(n.x+n.r*Math.cos(t)),t_(n.y-n.r*Math.sin(t))]},adjustPoints:gE.adjustPoints},bT={isLabelInside:function(n,e,t){return!t},prepareLabelPoints:function(n,e,t,i){const r=n.x,m=r+n.width,A=r+t_(n.width/2),V=n.y,X=V+n.height,ce=V+t_(n.height/2);let _e=[[[r,V],[m,V]],[[m,V],[m,X]],[[m,X],[r,X]],[[r,X],[r,V]]];const Me=en(i);return _e=0===i?t?[[r,ce],[m,ce]]:[[A,V],[A,X]]:_e.map(function(Ve){return Ve.map(function(Je){return[t_((Je[0]-A)*Me.cos+(Je[1]-ce)*Me.sin+A),t_(-(Je[0]-A)*Me.sin+(Je[1]-ce)*Me.cos+ce)]})}).reduce(function(Ve,Je){const rt=Je[0][0],Ct=Je[0][1],Xt=Je[1][0],On=Je[1][1];return t?(Ct>=ce&&ce>=On||Ct<=ce&&ce<=On)&&Ve.push([(ce-Ct)*(Xt-rt)/(On-Ct)+rt,ce]):(rt>=A&&A>=Xt||rt<=A&&A<=Xt)&&Ve.push([A,(A-rt)*(On-Ct)/(Xt-rt)+Ct]),Ve},[]),_e},isHorizontal:function(n,e){return n.x>e.x||e.x>n.x+n.width},getFigureCenter:n0.getFigureCenter,findFigurePoint:function(n,e,t){if(!t)return[n.x,n.y];const i=e[0],r=t_(n.x+(n.y-e[1])/Math.tan(rn(n.angle)));let m=[n.x,n.y,r,e[1]];return!(n.x<=r&&r<=i)&&!(i<=r&&r<=n.x)&&(n_(n.x-i)<12?m=[n.x,n.y]:m[2]=n.x<=i?n.x+12:n.x-12),m},adjustPoints:function(n){return n}};function xT(n){return void 0!==n.angle&&bT||void 0!==n.r&&n0||gE}function fE(n,e){n[e]&&n[e].dispose(),n[e]=null}function mE(n){return n&&(n.fill&&"none"!==n.fill||n["stroke-width"]>0&&n.stroke&&"none"!==n.stroke)}function _E(n){return n&&n["stroke-width"]>0&&n.stroke&&"none"!==n.stroke}function ef(n){this._renderer=n.renderer,this._container=n.labelsGroup,this._point=n.point,this._strategy=n.strategy,this._rowCount=1}ef.prototype={constructor:ef,setColor:function(n){this._color=n},setOptions:function(n){this._options=n},setData:function(n){this._data=n},setDataField:function(n,e){this._data=this._data||{},this._data[n]=e},getData:function(){return this._data},setFigureToDrawConnector:function(n){this._figure=n},dispose:function(){fE(this,"_group"),this._data=this._options=this._textContent=this._visible=this._insideGroup=this._text=this._background=this._connector=this._figure=null},_setVisibility:function(n,e){this._group&&this._group.attr({visibility:n}),this._visible=e},isVisible:function(){return this._visible},hide:function(n){this._holdVisibility=!!n,this._hide()},_hide:function(){this._setVisibility("hidden",!1)},show:function(n){const e=!this._drawn;this._point.hasValue()&&(this._holdVisibility=!!n,this._show(),e&&this._point.correctLabelPosition(this))},_show:function(){const n=this,e=n._renderer,t=n._container,i=n._options||{},r=n._textContent=function oM(n,e){const t=e.format;return n.valueText=Xf(n.value,t),n.argumentText=Xf(n.argument,e.argumentFormat),void 0!==n.percent&&(n.percentText=Xf(n.percent,{type:"percent",precision:t&&t.percentPrecision})),void 0!==n.total&&(n.totalText=Xf(n.total,t)),void 0!==n.openValue&&(n.openValueText=Xf(n.openValue,t)),void 0!==n.closeValue&&(n.closeValueText=Xf(n.closeValue,t)),void 0!==n.lowValue&&(n.lowValueText=Xf(n.lowValue,t)),void 0!==n.highValue&&(n.highValueText=Xf(n.highValue,t)),void 0!==n.reductionValue&&(n.reductionValueText=Xf(n.reductionValue,t)),e.customizeText?e.customizeText.call(n,n):e.displayFormat?function CT(n,e){let t=n,i=!0;for(;i;){const r=t.indexOf("{"),m=t.indexOf("}");if(r>=0&&m>0){const V=FL(t.substring(r+1,m),e);t=t.substr(0,r)+V+t.substr(m+1)}else i=!1}return t}(e.displayFormat,n):n.valueText}(n._data,i)||null;r?(n._group||(n._group=e.g().append(t),n._insideGroup=e.g().append(n._group),n._text=e.text("",0,0).append(n._insideGroup)),n._text.css(i.attributes?Ti(i.attributes.font):{}),mE(i.background)?(n._background=n._background||e.rect().append(n._insideGroup).toBackground(),n._background.attr(i.background),n._color&&n._background.attr({fill:n._color})):fE(n,"_background"),_E(i.connector)?(n._connector=n._connector||e.path([],"line").sharp().append(n._group).toBackground(),n._connector.attr(i.connector),n._color&&n._connector.attr({stroke:n._color})):fE(n,"_connector"),n._text.attr({text:r,align:i.textAlignment,class:i.cssClass}),n._updateBackground(n._text.getBBox()),n._setVisibility("visible",!0),n._drawn=!0):n._hide()},_getLabelVisibility:function(n){return this._holdVisibility?this.isVisible():n},draw:function(n){return this._getLabelVisibility(n)?(this._show(),this._point&&this._point.correctLabelPosition(this)):(this._drawn=!1,this._hide()),this},_updateBackground:function(n){const e=this;e._background&&(n.x-=8,n.y-=4,n.width+=16,n.height+=8,e._background.attr(n)),e._bBoxWithoutRotation=(0,_.X)({},n);const t=e._options.rotationAngle||0;e._insideGroup.rotate(t,n.x+n.width/2,n.y+n.height/2),n=hr(n,[n.x+n.width/2,n.y+n.height/2],-t),e._bBox=n},getFigureCenter(){const n=this._figure;return(this._strategy||xT(n)).getFigureCenter(n)},_getConnectorPoints:function(){const n=this,e=n._figure,t=n._options,i=n._strategy||xT(e),r=n._shiftBBox(n._bBoxWithoutRotation),m=n.getBoundingRect();let A,X,V=[];if(!i.isLabelInside(r,e,"inside"!==t.position)){X=i.isHorizontal(r,e);const ce=n.getFigureCenter();V=i.prepareLabelPoints(r,m,X,-t.rotationAngle||0,ce),A=VL(ce,V),V=i.findFigurePoint(e,A,X),V=V.concat(A)}return i.adjustPoints(V)},fit:function(n){let t=!1;if(this._text){const i=this._text.setMaxSize(n-(this._background?16:0),void 0,this._options);let r=i.rowCount;0===r&&(r=1),r!==this._rowCount&&(t=!0,this._rowCount=r),i.textIsEmpty&&fE(this,"_background")}return this._updateBackground(this._text.getBBox()),t},resetEllipsis:function(){this._text&&this._text.restoreText(),this._updateBackground(this._text.getBBox())},setTrackerData:function(n){this._text.data({"chart-data-point":n}),this._background&&this._background.data({"chart-data-point":n})},hideInsideLabel:function(n){return this._point.hideInsideLabel(this,n)},getPoint(){return this._point},shift:function(n,e){const t=this;return t._textContent&&(t._insideGroup.attr({translateX:t._x=t_(n-t._bBox.x),translateY:t._y=t_(e-t._bBox.y)}),t._connector&&t._connector.attr({points:t._getConnectorPoints()})),t},getBoundingRect:function(){return this._shiftBBox(this._bBox)},_shiftBBox:function(n){return this._textContent?{x:n.x+this._x,y:n.y+this._y,width:n.width,height:n.height}:{}},getLayoutOptions:function(){const n=this._options;return{alignment:n.alignment,background:mE(n.background),horizontalOffset:n.horizontalOffset,verticalOffset:n.verticalOffset,radialOffset:n.radialOffset,position:n.position,connectorOffset:(_E(n.connector)?12:0)+(mE(n.background)?8:0)}}};const i_=(0,gr.zk)(),tf=_.X,vE=Math,HC=vE.round,CE=vE.floor,Uu=vE.ceil,Ev="canvas_position_default",wc={deleteLabel:function(){this._label.dispose(),this._label=null},_hasGraphic:function(){return this.graphic},clearVisibility:function(){const n=this.graphic;n&&n.attr("visibility")&&n.attr({visibility:null})},isVisible:function(){return this.inVisibleArea&&this.series.isVisible()},setInvisibility:function(){const n=this.graphic;n&&"hidden"!==n.attr("visibility")&&n.attr({visibility:"hidden"}),this._errorBar&&this._errorBar.attr({visibility:"hidden"}),this._label.draw(!1)},clearMarker:function(){const n=this.graphic;n&&n.attr(this._emptySettings)},_createLabel:function(){this._label=new ef({renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this})},_calculateVisibility:function(n,e){const{minX:t,maxX:i,minY:r,maxY:m}=this._getVisibleArea();this.inVisibleArea=t<=n&&i>=n&&r<=e&&m>=e},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_updateLabelOptions:function(){!this._label&&this._createLabel(),this._label.setOptions(this._options.label)},_checkImage:function(n){return(0,C.O9)(n)&&("string"==typeof n||(0,C.O9)(n.url))},_fillStyle:function(){this._styles=this._options.styles},_checkSymbol:function(n,e){const t=n.symbol,i=e.symbol,r="circle"===t&&"circle"!==i||"circle"!==t&&"circle"===i,m=this._checkImage(n.image)!==this._checkImage(e.image);return!(!r&&!m)},_populatePointShape:function(n,e){switch(n){case"square":return function ib(n){return[-n,-n,n,-n,n,n,-n,n,-n,-n]}(e);case"polygon":return function Ml(n){const e=Uu(n);return[-e,0,0,-e,e,0,0,e,-e,0]}(e);case"triangle":case"triangleDown":return function jV(n){return[-n,-n,n,-n,0,n,-n,-n]}(e);case"triangleUp":return function yE(n){return[-n,n,n,n,0,-n,-n,n]}(e);case"cross":return function ob(n){const e=Uu(n),t=CE(e/2),i=Uu(e/2);return[-e,-t,-t,-e,0,-i,t,-e,e,-t,i,0,e,t,t,e,0,i,-t,e,-e,t,-i,0]}(e)}},hasCoords:function(){return null!==this.x&&null!==this.y},correctValue:function(n){const e=this,t=e.series.getValueAxis();e.hasValue()&&(e.value=e.properValue=t.validateUnit(e.initialValue.valueOf()+n.valueOf()),e.minValue=t.validateUnit(n))},resetCorrection:function(){this.value=this.properValue=this.initialValue,this.minValue=Ev},resetValue:function(){const n=this;n.hasValue()&&(n.value=n.properValue=n.initialValue=0,n.minValue=0,n._label.setDataField("value",n.value))},_getTranslates:function(n){let e=this.x,t=this.y;return n&&(this._options.rotated?e=this.defaultX:t=this.defaultY),{x:e,y:t}},_createImageMarker:function(n,e,t){const i=t.width||20,r=t.height||20;return n.image(-HC(.5*i),-HC(.5*r),i,r,t.url?t.url.toString():t.toString(),"center").attr({translateX:e.translateX,translateY:e.translateY,visibility:e.visibility})},_createSymbolMarker:function(n,e){let t;const i=this._options.symbol;return"circle"===i?(delete e.points,t=n.circle().attr(e)):("square"===i||"polygon"===i||"triangle"===i||"triangleDown"===i||"triangleUp"===i||"cross"===i)&&(t=n.path([],"area").attr(e).sharp()),t},_createMarker:function(n,e,t,i){const r=this,m=r._checkImage(t)?r._createImageMarker(n,i,t):r._createSymbolMarker(n,i);return m&&m.data({"chart-data-point":r}).append(e),m},_getSymbolBBox:function(n,e,t){return{x:n-t,y:e-t,width:2*t,height:2*t}},_getImageBBox:function(n,e){const t=this._options.image,i=t.width||20,r=t.height||20;return{x:n-HC(i/2),y:e-HC(r/2),width:i,height:r}},_getGraphicBBox:function(){const n=this,e=n._options,t=n.x,i=n.y;let r;return r=e.visible?n._checkImage(e.image)?n._getImageBBox(t,i):n._getSymbolBBox(t,i,e.styles.normal.r):{x:t,y:i,width:0,height:0},r},hideInsideLabel:h.lQ,_getShiftLabelCoords:function(n){const e=this._addLabelAlignmentAndOffset(n,this._getLabelCoords(n));return this._checkLabelPosition(n,e)},_drawLabel:function(){const n=this._getCustomLabelVisibility(),e=this._label,t=this._showForZeroValues()&&this.hasValue()&&!1!==n&&(this.series.getLabelVisibility()||n);e.draw(!!t)},correctLabelPosition:function(n){const e=this,t=e._getShiftLabelCoords(n);e.hideInsideLabel(n,t)||(n.setFigureToDrawConnector(e._getLabelConnector(n.pointPosition)),n.shift(HC(t.x),HC(t.y)))},_showForZeroValues:function(){return!0},_getLabelConnector:function(n){const e=this._getGraphicBBox(n),t=e.width/2,i=e.height/2;return{x:e.x+t,y:e.y+i,r:this._options.visible?Math.max(t,i):0}},_getPositionFromLocation:function(){return{x:this.x,y:this.y}},_isPointInVisibleArea:function(n,e){return n.minX<=e.x+e.width&&n.maxX>=e.x&&n.minY<=e.y+e.height&&n.maxY>=e.y},_checkLabelPosition:function(n,e){const t=this,i=t._getVisibleArea(),r=n.getBoundingRect(),m=t._getGraphicBBox(n.pointPosition),A=t._getGraphicBBox(),V="inside"===n.getLayoutOptions().position;return t._isPointInVisibleArea(i,A)&&(t._options.rotated?(i.minX>e.x&&(e.x=V?i.minX:m.x+m.width+10),i.maxX<e.x+r.width&&(e.x=V?i.maxX-r.width:m.x-10-r.width),i.minY>e.y&&(e.y=i.minY),i.maxY<e.y+r.height&&(e.y=i.maxY-r.height)):(i.minX>e.x&&(e.x=i.minX),i.maxX<e.x+r.width&&(e.x=i.maxX-r.width),i.minY>e.y&&(e.y=V?i.minY:m.y+m.height+10),i.maxY<e.y+r.height&&(e.y=V?i.maxY-r.height:m.y-r.height-10))),e},_addLabelAlignmentAndOffset:function(n,e){const t=n.getBoundingRect(),i=n.getLayoutOptions();return this._options.rotated||("left"===i.alignment?e.x+=t.width/2:"right"===i.alignment&&(e.x-=t.width/2)),e.x+=i.horizontalOffset,e.y+=i.verticalOffset,e},_getLabelCoords:function(n){return this._getLabelCoordOfPosition(n,this._getLabelPosition(n.pointPosition))},_getLabelCoordOfPosition:function(n,e){const t=n.getBoundingRect(),i=this._getGraphicBBox(n.pointPosition),r=i.height/2-t.height/2,m=i.width/2-t.width/2;let A=i.x,V=i.y;switch(e){case"left":A-=t.width+10,V+=r;break;case"right":A+=i.width+10,V+=r;break;case"top":A+=m,V-=t.height+10;break;case"bottom":A+=m,V+=i.height+10;break;case"inside":A+=m,V+=r}return{x:A,y:V}},_drawMarker:function(n,e,t){const i=this._options,r=this._getTranslates(t),m=this._getStyle();this.graphic=this._createMarker(n,e,i.image,tf({translateX:r.x,translateY:r.y,points:this._populatePointShape(i.symbol,m.r)},m))},_getErrorBarSettings:function(){return{visibility:"visible"}},_getErrorBarBaseEdgeLength(){return 2*this.getPointRadius()},_drawErrorBar:function(n,e){if(!this._options.errorBars)return;const t=this,i=t._options,r=i.errorBars,m=[];let A;const V=t._errorBarPos;let X=t._highErrorCoord,ce=t._lowErrorCoord;const _e=Wi(r.displayMode),Me="high"===_e,Ve="low"===_e,Je=(Me||!(0,C.O9)(ce))&&(0,C.O9)(X)&&!Ve,rt=(Ve||!(0,C.O9)(X))&&(0,C.O9)(ce)&&!Me;let Ct=r.edgeLength;Ct<=1&&Ct>0&&(Ct=this._getErrorBarBaseEdgeLength()*r.edgeLength),Ct=CE(parseInt(Ct)/2),Je&&(ce=t._baseErrorBarPos),rt&&(X=t._baseErrorBarPos),"none"!==_e&&(0,C.O9)(X)&&(0,C.O9)(ce)&&(0,C.O9)(V)?(!rt&&m.push([V-Ct,X,V+Ct,X]),m.push([V,X,V,ce]),!Je&&m.push([V+Ct,ce,V-Ct,ce]),i.rotated&&(0,w.__)(m,function(Xt,On){On.reverse()}),A=t._getErrorBarSettings(r),t._errorBar?(A.points=m,t._errorBar.attr(A)):t._errorBar=n.path(m,"line").attr(A).append(e)):t._errorBar&&t._errorBar.attr({visibility:"hidden"})},getTooltipParams:function(){const n=this.graphic;return{x:this.x,y:this.y,offset:n?n.getBBox().height/2:0}},setPercentValue:function(n,e,t,i){const r=this,m=r.value/n||0,A=r.minValue/n||0;r._label.setDataField("percent",m-A),r._label.setDataField("total",e),r.series.isFullStackedSeries()&&r.hasValue()&&(r.leftHole&&(r.leftHole/=n-t,r.minLeftHole/=n-t),r.rightHole&&(r.rightHole/=n-i,r.minRightHole/=n-i),r.value=r.properValue=m,r.minValue=A||r.minValue)},_storeTrackerR:function(){let n=i_.navigator;const e=this._options.styles.normal.r,t=(0,gr.i5)("ontouchstart")||n.msPointerEnabled&&n.msMaxTouchPoints||n.pointerEnabled&&n.maxTouchPoints?20:6;return this._options.trackerR=e<t?t:e,this._options.trackerR},_translateErrorBars:function(){const n=this._options,e=n.rotated,t=n.errorBars,i=this._getValTranslator();t&&((0,C.O9)(this.lowError)&&(this._lowErrorCoord=i.translate(this.lowError)),(0,C.O9)(this.highError)&&(this._highErrorCoord=i.translate(this.highError)),this._errorBarPos=CE(e?this.vy:this.vx),this._baseErrorBarPos="stdDeviation"===t.type?this._lowErrorCoord+(this._highErrorCoord-this._lowErrorCoord)/2:e?this.vx:this.vy)},_translate:function(){const n=this,e=n._getValTranslator(),t=n._getArgTranslator();n._options.rotated?(n.vx=n.x=e.translate(n.value,void 0,!0),n.vy=n.y=t.translate(n.argument,void 0,!0),n.minX=e.translate(n.minValue,void 0,!0),n.defaultX=e.translate(Ev)):(n.vy=n.y=e.translate(n.value,void 0,!0),n.vx=n.x=t.translate(n.argument,void 0,!0),n.minY=e.translate(n.minValue,void 0,!0),n.defaultY=e.translate(Ev)),n._translateErrorBars(),n._calculateVisibility(n.x,n.y)},_updateData:function(n){this.value=this.properValue=this.initialValue=this.originalValue=n.value,this.minValue=this.initialMinValue=this.originalMinValue=(0,C.O9)(n.minValue)?n.minValue:Ev},_getImageSettings:function(n){return{href:n.url||n.toString(),width:n.width||20,height:n.height||20}},getCrosshairData:function(){const n=this._options.rotated,e=this.properValue,t=this.argument;return{x:this.vx,y:this.vy,xValue:n?e:t,yValue:n?t:e,axis:this.series.axis}},getPointRadius:function(){const n=this._getStyle(),e=this._options,t=n.r;let i;const r=e.symbol;return e.visible&&!e.image&&t?(i=n["stroke-width"]/2,("square"===r||"triangle"===r||"triangleDown"===r||"triangleUp"===r?1.4*t:t)+i):0},_updateMarker:function(n,e){const t=this,i=t._options;let r;const m=i.image,A=t.isVisible()?{}:{visibility:"hidden"};r=t._checkImage(m)?tf({},{visibility:e.visibility},A,t._getImageSettings(m)):tf({},e,A,{points:t._populatePointShape(i.symbol,e.r)}),n||(r.translateX=t.x,r.translateY=t.y),t.graphic.attr(r).sharp()},_getLabelFormatObject:function(){return{argument:this.initialArgument,value:this.initialValue,originalArgument:this.originalArgument,originalValue:this.originalValue,seriesName:this.series.name,lowErrorValue:this.lowError,highErrorValue:this.highError,point:this}},_getLabelPosition:function(){const n=this._options.rotated;return this.initialValue>0?n?"right":"top":n?"left":"bottom"},_getFormatObject:function(n){const e=this._label.getData();return tf({},e,{argumentText:n.formatValue(this.initialArgument,"argument"),valueText:n.formatValue(this.initialValue)},(0,C.O9)(e.percent)?{percentText:n.formatValue(e.percent,"percent")}:{},(0,C.O9)(e.total)?{totalText:n.formatValue(e.total)}:{})},getMarkerVisibility:function(){return this._options.visible},coordsIn:function(n,e){const t=this._storeTrackerR();return n>=this.x-t&&n<=this.x+t&&e>=this.y-t&&e<=this.y+t},getMinValue:function(n){const e=this._options.errorBars;if(e&&!n){const t=e.displayMode,i="high"!==t&&(0,C.O9)(this.lowError)?this.lowError:this.value,r="low"!==t&&(0,C.O9)(this.highError)?this.highError:this.value;return i<r?i:r}return this.value},getMaxValue:function(n){const e=this._options.errorBars;if(e&&!n){const t=e.displayMode,i="high"!==t&&(0,C.O9)(this.lowError)?this.lowError:this.value,r="low"!==t&&(0,C.O9)(this.highError)?this.highError:this.value;return i>r?i:r}return this.value}},rb=_.X,rM=Math,r0=rM.floor,Ov=rM.abs;function lM(n){const e=n.initialValue,t=n._getValTranslator().getBusinessRange().invert,i="discrete"===n.series.valueAxisType,r=n.series.isFullStackedSeries();return!i&&(e>=0&&!t||e<0&&t)||i&&!t||r?"top":"bottom"}const o_=rb({},wc,{correctCoordinates(n){const e=this,t=r0(n.offset-n.width/2);e._options.rotated?(e.height=n.width,e.yCorrection=t,e.xCorrection=null):(e.width=n.width,e.xCorrection=t,e.yCorrection=null)},_calculateVisibility:function(n,e,t,i){const{minX:r,maxX:m,minY:A,maxY:V}=this._getVisibleArea();this.inVisibleArea=r<=n+t&&m>=n&&A<=e+i&&V>=e},_cacheVisibility:function(n,e,t,i){const r=Math.abs(e-t);e=Math.min(e,t),i?this._calculateVisibility(e,n,r,this.height):this._calculateVisibility(n,e,this.width,r)},_getGraphicBBox:function(n){const e={x:this.x,y:this.y,width:this.width,height:this.height};if(n){const t="top"===n;this._options.rotated?(e.x=t?e.x+e.width:e.x,e.width=0):(e.y=t?e.y:e.y+e.height,e.height=0)}return e},_getLabelConnector:function(n){return this._getGraphicBBox(n)},_getLabelPosition:function(){let n=lM(this);return this._options.rotated&&(n="top"===n?"right":"left"),n},_getLabelCoords:function(n){const e=this;let t;return t=0===e.initialValue&&e.series.isFullStackedSeries()?e._getLabelCoordOfPosition(n,this._options.rotated?"right":"top"):"inside"===n.getLayoutOptions().position?e._getLabelCoordOfPosition(n,"inside"):wc._getLabelCoords.call(this,n),t},_drawLabel:function(){this._label.pointPosition="inside"!==this._label.getLayoutOptions().position&&lM(this),wc._drawLabel.call(this)},hideInsideLabel:function(n,e){const t=this._getGraphicBBox(),i=n.getBoundingRect();return!(!this._options.resolveLabelsOverlapping||!(e.y<=t.y&&e.y+i.height>=t.y+t.height||e.x<=t.x&&e.x+i.width>=t.x+t.width)||e.y>t.y+t.height||e.y+i.height<t.y||e.x>t.x+t.width||e.x+i.width<t.x||(n.draw(!1),0))},_showForZeroValues:function(){return this._options.label.showForZeroValues||this.initialValue},_drawMarker(n,e,t){const i=this,r=i._getStyle(),m=i._options.cornerRadius,A=i._options.rotated;let{x:V,y:X,width:ce,height:_e}=i.getMarkerCoords();t&&(A?(ce=0,V=i.defaultX):(_e=0,X=i.defaultY)),i.graphic=n.rect(V,X,ce,_e).attr({rx:m,ry:m}).smartAttr(r).data({"chart-data-point":i}).append(e)},_getSettingsForTracker:function(){let n=this.y,e=this.height,t=this.x,i=this.width;return this._options.rotated?1===i&&(i=9,t-=4):1===e&&(e=9,n-=4),{x:t,y:n,width:i,height:e}},getGraphicSettings:function(){const n=this.graphic;return{x:n.attr("x"),y:n.attr("y"),height:n.attr("height"),width:n.attr("width")}},_getEdgeTooltipParams(){const n=this.value>=0;let e,t;const i=this._getValTranslator().getBusinessRange().invert,{x:r,y:m,width:A,height:V}=this;return this._options.rotated?(t=m+V/2,e=i?n?r:r+A:n?r+A:r):(e=r+A/2,t=i?n?m+V:m:n?m:m+V),{x:e,y:t,offset:0}},getTooltipParams:function(n){if("edge"===n)return this._getEdgeTooltipParams();const e=this.getCenterCoord();return e.offset=0,e},getCenterCoord(){const{width:n,height:e,x:t,y:i}=this;return{x:t+n/2,y:i+e/2}},_truncateCoord:function(n,e){return null===n?n:n<e[0]?e[0]:n>e[1]?e[1]:n},_getErrorBarBaseEdgeLength(){return this._options.rotated?this.height:this.width},_translateErrorBars:function(n){wc._translateErrorBars.call(this),(this._errorBarPos<n[0]||this._errorBarPos>n[1])&&(this._errorBarPos=void 0)},_translate:function(){const n=this,e=n._options.rotated,t=e?"x":"y",i=e?"y":"x",r=e?"width":"height",m=e?"height":"width",A=n._getArgTranslator(),V=n._getValTranslator(),X=n.series.getArgumentAxis().getVisibleArea(),ce=n.series.getValueAxis().getVisibleArea();let _e=A.translate(n.argument),Me=V.translate(n.value,1),Ve=V.translate(n.minValue,-1);n[i]=_e=null===_e?_e:_e+(n[i+"Correction"]||0),n["v"+t]=Me,n["v"+i]=_e+n[m]/2,this._cacheVisibility(_e,Me,Ve,e),Me=n._truncateCoord(Me,ce),Ve=n._truncateCoord(Ve,ce),n[r]=Ov(Me-Ve),Me=Me<Ve?Me:Ve,n[t]=null===Me?Me:Me+(n[t+"Correction"]||0),n["min"+t.toUpperCase()]=null===Ve?Ve:Ve+(n[t+"Correction"]||0),n["default"+t.toUpperCase()]=V.translate("canvas_position_default"),n._translateErrorBars(X),n.inVisibleArea&&null!==n[i]&&(n[i]<X[0]&&(n[m]=n[m]-(X[0]-n[i]),n[i]=X[0]),n[i]+n[m]>X[1]&&(n[m]=X[1]-n[i]))},_updateMarker:function(n,e){this.graphic.smartAttr(rb({},e,n?{}:this.getMarkerCoords()))},getMarkerCoords:function(){const n=this;let e=n.x;const t=n.y;let i=n.width,r=n.height;const m=n.series.getArgumentAxis(),A=n._options.rotated;if(m.getAxisPosition){const V=m.getOptions(),X=Math.round(V.width/2),ce=m.getAxisPosition();if(V.visible)if(A){const _e=n.minX===n.defaultX&&n.minX===ce-m.getAxisShift();e+=_e?X:0,i-=_e?X:0,i<0&&(i=0)}else r-=n.minY===n.defaultY&&n.minY===ce-m.getAxisShift()?X:0,r<0&&(r=0)}return{x:e,y:t,width:i,height:r}},coordsIn:function(n,e){return n>=this.x&&n<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}}),ET=_.X,cM=ET({},wc,{correctCoordinates:function(n){this.bubbleSize=n/2},_drawMarker:function(n,e,t){const i=ET({translateX:this.x,translateY:this.y},this._getStyle());this.graphic=n.circle(0,0,t?0:this.bubbleSize).smartAttr(i).data({"chart-data-point":this}).append(e)},getTooltipParams:function(n){const e=this.graphic;if(!e)return;const t=e.getBBox().height;return{x:this.x,y:this.y,offset:t<20||"edge"===n?t/2:0}},_getLabelFormatObject:function(){const n=wc._getLabelFormatObject.call(this);return n.size=this.initialSize,n},_updateData:function(n){wc._updateData.call(this,n),this.size=this.initialSize=n.size},_getGraphicBBox:function(){return this._getSymbolBBox(this.x,this.y,this.bubbleSize)},_updateMarker:function(n,e){const t=this;n||(e=ET({r:t.bubbleSize,translateX:t.x,translateY:t.y},e)),t.graphic.smartAttr(e)},_getFormatObject:function(n){const e=wc._getFormatObject.call(this,n);return e.sizeText=n.formatValue(this.initialSize),e},_storeTrackerR:function(){return this.bubbleSize},_getLabelCoords:function(n){let e;return e="inside"===n.getLayoutOptions().position?this._getLabelCoordOfPosition(n,"inside"):wc._getLabelCoords.call(this,n),e}}),OT=_.X,Yf=Math.round,wT=Math.sqrt,ab=Math.acos,GL=180/Math.PI,TT=Math.abs,bE=Te.radialLabelIndent,lu=OT({},wc,{_updateData:function(n,e){const t=this;wc._updateData.call(this,n),(e||!(0,C.O9)(t._visible))&&(t._visible=!0),t.minValue=t.initialMinValue=t.originalMinValue=(0,C.O9)(n.minValue)?n.minValue:0},animate:function(n,e,t){this.graphic.animate({x:this.centerX,y:this.centerY,outerRadius:this.radiusOuter,innerRadius:this.radiusInner,startAngle:this.toAngle,endAngle:this.fromAngle},{delay:t,partitionDuration:e},n)},correctPosition:function(n){this.correctRadius(n),this.correctLabelRadius(n.radiusOuter+bE),this.centerX=n.centerX,this.centerY=n.centerY},correctRadius:function(n){this.radiusInner=n.radiusInner,this.radiusOuter=n.radiusOuter},correctLabelRadius:function(n){this.radiusLabels=n},correctValue:function(n,e,t){this.value=(t||this.normalInitialValue)+n,this.minValue=n,this.percent=e,this._label.setDataField("percent",e)},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_getShiftLabelCoords:function(){const n=this,e=n._label.getBoundingRect(),t=n._getLabelCoords(n._label),i=n._getVisibleArea();return n._isLabelDrawingWithoutPoints?n._checkLabelPosition(t,e,i):n._getLabelExtraCoord(t,n._checkVerticalLabelPosition(t,e,i),e)},_getLabelPosition:function(n){return n.position},getAnnotationCoords:function(n){return this._getElementCoords("edge"!==n?"inside":"outside",this.radiusOuter,0)},_getElementCoords:function(n,e,t){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:0,y:0,width:0,height:0};const r=this,m=en(r.middleAngle),A=r.radiusInner,X="columns"===n;let ce,_e;return"inside"===n?(ce=A+(r.radiusOuter-A)/2+t,_e=r.centerX+ce*m.cos-i.width/2):(ce=e+t,_e=m.cos>.1||X&&m.cos>=0?r.centerX+ce*m.cos:m.cos<-.1||X&&m.cos<0?r.centerX+ce*m.cos-i.width:r.centerX+ce*m.cos-i.width/2),{x:_e,y:Yf(r.centerY-ce*m.sin-i.height/2)}},_getLabelCoords:function(n){const e=n.getBoundingRect(),t=n.getLayoutOptions(),i=this._getLabelPosition(t);return this._getElementCoords(i,this.radiusLabels,t.radialOffset,e)},_correctLabelCoord:function(n,e){const t=this._label,r=t.getBoundingRect().width,m=t.getLayoutOptions(),A=this._getVisibleArea(),V=A.maxX-r,X=A.minX,ce=xo(this.middleAngle),_e=this.centerX,Me=m.connectorOffset;let Ve=n.x;return"columns"===m.position?(Ve=ce<=90||ce>=270?V:X,n.x=Ve):"inside"!==m.position&&e&&(ce<=90||ce>=270?Ve-Me<_e&&(Ve=_e+Me):Ve+r+Me>_e&&(Ve=_e-r-Me),n.x=Ve),n},drawLabel:function(){this.translate(),this._isLabelDrawingWithoutPoints=!0,this._drawLabel(),this._isLabelDrawingWithoutPoints=!1},updateLabelCoord:function(n){const e=this._label.getBoundingRect();let t=this._correctLabelCoord(e,n);t=this._checkHorizontalLabelPosition(t,e,this._getVisibleArea()),this._label.shift(Yf(t.x),Yf(e.y))},_checkVerticalLabelPosition:function(n,e,t){let r=n.y;return n.y+e.height>t.maxY?r=t.maxY-e.height:n.y<t.minY&&(r=t.minY),{x:n.x,y:r}},_getLabelExtraCoord:function(n,e,t){return n.y!==e.y?co({x:n.x,y:n.y,width:t.width,height:t.height},e.y-n.y,{x:this.centerX,y:this.centerY}):n},_checkHorizontalLabelPosition:function(n,e,t){let i=n.x;return n.x+e.width>t.maxX?i=t.maxX-e.width:n.x<t.minX&&(i=t.minX),{x:i,y:n.y}},applyWordWrap:function(n){const e=this,t=e._label,i=t.getBoundingRect(),r=e._getVisibleArea(),m=t.getLayoutOptions().position;let A=i.width,V=!1;return"columns"===m&&e.series.index>0?A=r.maxX-e.centerX-e.radiusLabels:"inside"===m?A>r.maxX-r.minX&&(A=r.maxX-r.minX):n&&i.x<e.centerX&&i.width+i.x>e.centerX?A=Math.floor((r.maxX-r.minX)/2):i.x+A>r.maxX?A=r.maxX-i.x:i.x<r.minX&&(A=i.x+A-r.minX),A<i.width&&(V=t.fit(A)),V},setLabelTrackerData:function(){this._label.setTrackerData(this)},_checkLabelPosition:function(n,e,t){return n=this._checkHorizontalLabelPosition(n,e,t),this._checkVerticalLabelPosition(n,e,t)},_getLabelConnector:function(){const n=this.radiusOuter,e=this._options.styles.normal,t=e["stroke-width"]/2,i=this.series.getOptions().containerBackgroundColor===e.stroke?Yf(t):Yf(-t),r=en(Yf(this.middleAngle));return{x:Yf(this.centerX+(n-i)*r.cos),y:Yf(this.centerY-(n-i)*r.sin),angle:this.middleAngle}},_drawMarker:function(n,e,t,i){const r=this;let m=r.radiusOuter,A=r.radiusInner,V=r.fromAngle,X=r.toAngle;t&&(A=m=0,i||(V=X=r.shiftedAngle)),r.graphic=n.arc(r.centerX,r.centerY,A,m,X,V).attr({"stroke-linejoin":"round"}).smartAttr(r._getStyle()).data({"chart-data-point":r}).sharp().append(e)},getTooltipParams:function(){const n=en(this.middleAngle),e=this.radiusInner,t=this.radiusOuter;return{x:this.centerX+(e+(t-e)/2)*n.cos,y:this.centerY-(e+(t-e)/2)*n.sin,offset:0}},_translate:function(){const n=this,e=n.shiftedAngle||0,t=n.value,i=n.minValue,r=n._getValTranslator();n.fromAngle=r.translate(i)+e,n.toAngle=r.translate(t)+e,n.middleAngle=r.translate((t-i)/2+i)+e,n.isVisible()||(n.middleAngle=n.toAngle=n.fromAngle=n.fromAngle||e)},getMarkerVisibility:function(){return!0},_updateMarker:function(n,e,t,i){const r=this;n||(e=OT({x:r.centerX,y:r.centerY,outerRadius:r.radiusOuter,innerRadius:r.radiusInner,startAngle:r.toAngle,endAngle:r.fromAngle},e)),r.graphic.smartAttr(e).sharp(),i&&i()},getLegendStyles:function(){return this._styles.legendStyles},isInVisibleArea:function(){return!0},hide:function(){const n=this;n._visible&&(n._visible=!1,n.hideTooltip(),n._options.visibilityChanged())},show:function(){const n=this;n._visible||(n._visible=!0,n._options.visibilityChanged())},setInvisibility:function(){this._label.draw(!1)},isVisible:function(){return this._visible},_getFormatObject:function(n){const e=wc._getFormatObject.call(this,n),t=this.percent;return e.percent=t,e.percentText=n.formatValue(t,"percent"),e},getColor:function(){return this._styles.normal.fill},coordsIn:function(n,e){const t=n-this.centerX,i=e-this.centerY,r=wT(t*t+i*i),m=this.fromAngle%360,A=this.toAngle%360;let V;return!(r<this.radiusInner||r>this.radiusOuter||0===r)&&(V=ab(t/r)*GL*(i>0?-1:1),V<0&&(V+=360),m===A&&TT(this.toAngle-this.fromAngle)>1e-4||(m>=A?V<=m&&V>=A:!(V>=m&&V<=A)))}}),UC=_.X,zC=Math,og=zC.abs,Kc=zC.min,rg=zC.max,Zf=zC.round,Tc=UC({},wc,{deleteLabel:function(){this._topLabel.dispose(),this._topLabel=null,this._bottomLabel.dispose(),this._bottomLabel=null},hideMarker:function(n){const e=this.graphic,t=e&&e[n+"Marker"],i=this["_"+n+"Label"];t&&"hidden"!==t.attr("visibility")&&t.attr({visibility:"hidden"}),i.draw(!1)},setInvisibility:function(){this.hideMarker("top"),this.hideMarker("bottom")},clearVisibility:function(){const n=this.graphic,e=n&&n.topMarker,t=n&&n.bottomMarker;e&&e.attr("visibility")&&e.attr({visibility:null}),t&&t.attr("visibility")&&t.attr({visibility:null})},clearMarker:function(){const n=this.graphic,e=n&&n.topMarker,t=n&&n.bottomMarker,i=this._emptySettings;e&&e.attr(i),t&&t.attr(i)},_getLabelPosition:function(n){let e;const t="inside"===this._options.label.position;return e=this._options.rotated?"top"===n^t?"right":"left":"top"===n^t?"top":"bottom",e},_getLabelMinFormatObject:function(){return{index:0,argument:this.initialArgument,value:this.initialMinValue,seriesName:this.series.name,originalValue:this.originalMinValue,originalArgument:this.originalArgument,point:this}},_updateLabelData:function(){const n=this._getLabelFormatObject();n.index=1,this._topLabel.setData(n),this._bottomLabel.setData(this._getLabelMinFormatObject())},_updateLabelOptions:function(){const n=this._options.label;(!this._topLabel||!this._bottomLabel)&&this._createLabel(),this._topLabel.setOptions(n),this._bottomLabel.setOptions(n)},_createLabel:function(){const n={renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this};this._topLabel=new ef(n),this._bottomLabel=new ef(n)},_getGraphicBBox:function(n){const e=this._options,t=this._getImage(e.image),i=this._checkImage("top"===n?t.top:t.bottom);let r;const m=this._getPositionFromLocation(n);return r=e.visible?i?this._getImageBBox(m.x,m.y):this._getSymbolBBox(m.x,m.y,e.styles.normal.r):{x:m.x,y:m.y,width:0,height:0},r},_getPositionFromLocation:function(n){let e,t;const i="top"===n;return this._options.rotated?(e=i?rg(this.x,this.minX):Kc(this.x,this.minX),t=this.y):(e=this.x,t=i?Kc(this.y,this.minY):rg(this.y,this.minY)),{x:e,y:t}},_checkOverlay:function(n,e,t){return n<e+t},_getOverlayCorrections:function(n,e){const t=this._options.rotated,i=t?"x":"y",r=t?"width":"height",m=this.series.getValueAxis().getVisibleArea(),A=m[0],V=m[1];let X=Zf((n[i]+n[r]-e[i])/2),ce=n[i]-X,_e=e[i]+X;return ce<A?(X=A-ce,ce+=X,_e+=X):_e+e[r]>V&&(X=V-_e-e[r],ce+=X,_e+=X),{coord1:ce,coord2:_e}},_checkLabelsOverlay:function(n){const e=this,t=e._topLabel.getBoundingRect(),i=e._bottomLabel.getBoundingRect();let r={};e._options.rotated?"top"===n?this._checkOverlay(t.x,i.x,i.width)&&(r=this._getOverlayCorrections(i,t),e._topLabel.shift(r.coord2,t.y),e._bottomLabel.shift(r.coord1,i.y)):this._checkOverlay(i.x,t.x,t.width)&&(r=this._getOverlayCorrections(t,i),e._topLabel.shift(r.coord1,t.y),e._bottomLabel.shift(r.coord2,i.y)):"top"===n?this._checkOverlay(i.y,t.y,t.height)&&(r=this._getOverlayCorrections(t,i),e._topLabel.shift(t.x,r.coord1),e._bottomLabel.shift(i.x,r.coord2)):this._checkOverlay(t.y,i.y,i.height)&&(r=this._getOverlayCorrections(i,t),e._topLabel.shift(t.x,r.coord2),e._bottomLabel.shift(i.x,r.coord1))},_drawLabel:function(){const n=this,e=[],t=n._options.rotated?n.x>=n.minX:n.y<n.minY,i=n._getCustomLabelVisibility(),r=n._topLabel,m=n._bottomLabel;r.pointPosition=t?"top":"bottom",m.pointPosition=t?"bottom":"top",(n.series.getLabelVisibility()||i)&&n.hasValue()&&!1!==i?(!1!==n.visibleTopMarker&&e.push(r),!1!==n.visibleBottomMarker&&e.push(m),(0,w.__)(e,function(A,V){V.draw(!0)}),n._checkLabelsOverlay(n._topLabel.pointPosition)):(r.draw(!1),m.draw(!1))},_getImage:function(n){const e={};return(0,C.O9)(n)&&("string"==typeof n?e.top=e.bottom=n:(e.top={url:"string"==typeof n.url?n.url:n.url&&n.url.rangeMaxPoint,width:"number"==typeof n.width?n.width:n.width&&n.width.rangeMaxPoint,height:"number"==typeof n.height?n.height:n.height&&n.height.rangeMaxPoint},e.bottom={url:"string"==typeof n.url?n.url:n.url&&n.url.rangeMinPoint,width:"number"==typeof n.width?n.width:n.width&&n.width.rangeMinPoint,height:"number"==typeof n.height?n.height:n.height&&n.height.rangeMinPoint})),e},_checkSymbol:function(n,e){const t=n.symbol,i=e.symbol,r="circle"===t&&"circle"!==i||"circle"!==t&&"circle"===i,m=this._getImage(n.image),A=this._getImage(e.image),V=this._checkImage(m.top)!==this._checkImage(A.top),X=this._checkImage(m.bottom)!==this._checkImage(A.bottom);return r||V||X},_getSettingsForTwoMarkers:function(n){const e=this._options,t={},i=e.rotated?Kc(this.x,this.minX):this.x,r=e.rotated?this.y:Kc(this.y,this.minY),m=n.r,A=this._populatePointShape(e.symbol,m);return t.top=UC({translateX:i+this.width,translateY:r,r:m},n),t.bottom=UC({translateX:i,translateY:r+this.height,r:m},n),A&&(t.top.points=t.bottom.points=A),t},_hasGraphic:function(){return this.graphic&&this.graphic.topMarker&&this.graphic.bottomMarker},_drawOneMarker:function(n,e,t,i){const r=this,m=r.graphic;m[e]?r._updateOneMarker(e,i):m[e]=r._createMarker(n,m,t,i)},_drawMarker:function(n,e,t,i,r){const m=this,A=m._getSettingsForTwoMarkers(r||m._getStyle()),V=m._getImage(m._options.image);m._checkImage(V.top)&&(A.top=m._getImageSettings(A.top,V.top)),m._checkImage(V.bottom)&&(A.bottom=m._getImageSettings(A.bottom,V.bottom)),m.graphic=m.graphic||n.g().append(e),m.visibleTopMarker&&m._drawOneMarker(n,"topMarker",V.top,A.top),m.visibleBottomMarker&&m._drawOneMarker(n,"bottomMarker",V.bottom,A.bottom)},_getSettingsForTracker:function(n){const e=this._options.rotated;return{translateX:e?Kc(this.x,this.minX)-n:this.x-n,translateY:e?this.y-n:Kc(this.y,this.minY)-n,width:this.width+2*n,height:this.height+2*n}},isInVisibleArea:function(){const n=this._options.rotated,e=n?this.y:this.x,t=n?rg(this.minX,this.x):rg(this.minY,this.y),i=n?Kc(this.minX,this.x):Kc(this.minY,this.y);let r,m,A,V=!0;const X=this.series.getArgumentAxis().getVisibleArea(),ce=this.series.getValueAxis().getVisibleArea();return X[1]<e||X[0]>e||ce[0]>i&&ce[0]>t||ce[1]<i&&ce[1]<t?m=A=V=!1:(m=ce[0]<=i&&ce[1]>i,A=ce[0]<t&&ce[1]>=t,n&&(r=m,m=A,A=r)),this.visibleTopMarker=m,this.visibleBottomMarker=A,V},getTooltipParams:function(){const n=this;let e,t;const i=n._options.rotated,r=i?Kc(n.x,n.minX):Kc(n.y,n.minY),m=i?"width":"height",A=n._getVisibleArea(),X=i?A.maxX:A.maxY,ce=rg(i?A.minX:A.minY,r),_e=Kc(X,r+n[m]);return i?(t=n.y,e=ce+(_e-ce)/2):(e=n.x,t=ce+(_e-ce)/2),{x:e,y:t,offset:0}},_translate:function(){const n=this._options.rotated;wc._translate.call(this),this.height=n?0:og(this.minY-this.y),this.width=n?og(this.x-this.minX):0},hasCoords:function(){return wc.hasCoords.call(this)&&!(null===this.minX||null===this.minY)},_updateData:function(n){wc._updateData.call(this,n),this.minValue=this.initialMinValue=this.originalMinValue=n.minValue},_getImageSettings:function(n,e){return{href:e.url||e.toString(),width:e.width||20,height:e.height||20,translateX:n.translateX,translateY:n.translateY}},getCrosshairData:function(n,e){const i=this.minX,r=this.minY,m=this.vx,A=this.vy,V=this.value,X=this.minValue,ce=this.argument,_e={axis:this.series.axis,x:m,y:A,yValue:V,xValue:ce};return this._options.rotated?(_e.yValue=ce,og(m-n)<og(i-n)?_e.xValue=V:(_e.x=i,_e.xValue=X)):og(A-e)>=og(r-e)&&(_e.y=r,_e.yValue=X),_e},_updateOneMarker:function(n,e){this.graphic&&this.graphic[n]&&this.graphic[n].attr(e)},_updateMarker:function(n,e){this._drawMarker(void 0,void 0,!1,!1,e)},_getFormatObject:function(n){const e=this.initialMinValue,t=this.initialValue,i=this.initialArgument,r=n.formatValue(e),m=n.formatValue(t);return{argument:i,argumentText:n.formatValue(i,"argument"),valueText:r+" - "+m,rangeValue1Text:r,rangeValue2Text:m,rangeValue1:e,rangeValue2:t,seriesName:this.series.name,point:this,originalMinValue:this.originalMinValue,originalValue:this.originalValue,originalArgument:this.originalArgument}},getLabel:function(){return[this._topLabel,this._bottomLabel]},getLabels:function(){return[this._topLabel,this._bottomLabel]},getBoundingRect:h.lQ,coordsIn:function(n,e){const t=this._storeTrackerR(),i=n>=this.x-t&&n<=this.x+t,r=e>=this.y-t&&e<=this.y+t;return this._options.rotated?r&&(i||n>=this.minX-t&&n<=this.minX+t):i&&(r||e>=this.minY-t&&e<=this.minY+t)},getMaxValue:function(){return"discrete"!==this.series.valueAxisType&&this.minValue>this.value?this.minValue:this.value},getMinValue:function(){return"discrete"!==this.series.valueAxisType?this.minValue<this.value?this.minValue:this.value:this.minValue}}),sg=(0,_.X)({},o_,{deleteLabel:Tc.deleteLabel,_getFormatObject:Tc._getFormatObject,clearVisibility:function(){const n=this.graphic;n&&n.attr("visibility")&&n.attr({visibility:null})},setInvisibility:function(){const n=this.graphic;n&&"hidden"!==n.attr("visibility")&&n.attr({visibility:"hidden"}),this._topLabel.draw(!1),this._bottomLabel.draw(!1)},getTooltipParams:function(n){const e=this,t="edge"===n;let i,r;return e._options.rotated?(i=t?e.x+e.width:e.x+e.width/2,r=e.y+e.height/2):(i=e.x+e.width/2,r=t?e.y:e.y+e.height/2),{x:i,y:r,offset:0}},_translate:function(){const n=this;o_._translate.call(n),n._options.rotated?n.width=n.width||1:n.height=n.height||1},hasCoords:Tc.hasCoords,_updateData:Tc._updateData,_getLabelPosition:Tc._getLabelPosition,_getLabelMinFormatObject:Tc._getLabelMinFormatObject,_updateLabelData:Tc._updateLabelData,_updateLabelOptions:Tc._updateLabelOptions,getCrosshairData:Tc.getCrosshairData,_createLabel:Tc._createLabel,_checkOverlay:Tc._checkOverlay,_checkLabelsOverlay:Tc._checkLabelsOverlay,_getOverlayCorrections:Tc._getOverlayCorrections,_drawLabel:Tc._drawLabel,_getLabelCoords:Tc._getLabelCoords,getLabel:Tc.getLabel,getLabels:Tc.getLabels,getBoundingRect:h.lQ,getMinValue:Tc.getMinValue,getMaxValue:Tc.getMaxValue}),lb=Math,sf=lb.abs,Qf=lb.min,cb=lb.max,uM=lb.round,wv=(0,_.X)({},o_,{_calculateVisibility:wc._calculateVisibility,_getContinuousPoints:function(n,e){const t=this,i=t.x,r=t._options.rotated?function(_e,Me){return[Me,_e]}:function(_e,Me){return[_e,Me]},m=t.width,A=t.highY,V=sf(A-n)<sf(A-e)?n:e,X=V===e?n:e;let ce;return ce=X===V?[].concat(r(i,t.highY)).concat(r(i,t.lowY)).concat(r(i,t.closeY)).concat(r(i-m/2,t.closeY)).concat(r(i+m/2,t.closeY)).concat(r(i,t.closeY)):[].concat(r(i,t.highY)).concat(r(i,V)).concat(r(i+m/2,V)).concat(r(i+m/2,X)).concat(r(i,X)).concat(r(i,t.lowY)).concat(r(i,X)).concat(r(i-m/2,X)).concat(r(i-m/2,V)).concat(r(i,V)),ce},_getCrockPoints:function(n){const e=this.x,t=this._options.rotated?function(i,r){return[r,i]}:function(i,r){return[i,r]};return[].concat(t(e,this.highY)).concat(t(e,this.lowY)).concat(t(e,n)).concat(t(e-this.width/2,n)).concat(t(e+this.width/2,n)).concat(t(e,n))},_getPoints:function(){const n=this;let e;const t=n.closeY,i=n.openY;return e=null!==t&&null!==i?n._getContinuousPoints(i,t):i===t?[n.x,n.highY,n.x,n.lowY]:n._getCrockPoints(null!==i?i:t),e},getColor:function(){return this._isReduction?this._options.reduction.color:this._styles.normal.stroke||this.series.getColor()},_drawMarkerInGroup:function(n,e,t){this.graphic=t.path(this._getPoints(),"area").attr({"stroke-linecap":"square"}).attr(e).data({"chart-data-point":this}).sharp().append(n)},_fillStyle:function(){const n=this,e=n._options.styles;n._styles=n._isReduction&&n._isPositive?e.reductionPositive:n._isReduction?e.reduction:n._isPositive?e.positive:e},_getMinTrackerWidth:function(){return 2+2*this._styles.normal["stroke-width"]},correctCoordinates:function(n){const e=this._getMinTrackerWidth();let t=n.width;t=t<e?e:t>10?10:t,this.width=t+t%2,this.xCorrection=n.offset},_getMarkerGroup:function(n){let e;return e=this._isReduction&&this._isPositive?n.reductionPositiveMarkersGroup:this._isReduction?n.reductionMarkersGroup:this._isPositive?n.defaultPositiveMarkersGroup:n.defaultMarkersGroup,e},_drawMarker:function(n,e){this._drawMarkerInGroup(this._getMarkerGroup(e),this._getStyle(),n)},_getSettingsForTracker:function(){const n=this;let e=n.highY,t=n.lowY;const i=n._options.rotated;let r,m,A,V;return e===t&&(e=i?e+2:e-2,t=i?t-2:t+2),i?(r=Qf(t,e),m=n.x-n.width/2,A=sf(t-e),V=n.width):(r=n.x-n.width/2,m=Qf(t,e),A=n.width,V=sf(t-e)),{x:r,y:m,width:A,height:V}},_getGraphicBBox:function(n){const e=this,t=e._options.rotated,i=e.x,r=e.width;let m=e.lowY,A=e.highY;if(n){const X=e.series.getValueAxis().getVisibleArea();A=e._truncateCoord(A,X),m=e._truncateCoord(m,X)}const V={x:t?m:i-uM(r/2),y:t?i-uM(r/2):A,width:t?A-m:r,height:t?r:m-A};if(n){const X="top"===n;this._options.rotated?(V.x=X?V.x+V.width:V.x,V.width=0):(V.y=X?V.y:V.y+V.height,V.height=0)}return V},getTooltipParams:function(n){const e=this;if(e.graphic){const t=Qf(e.lowY,e.highY),i=cb(e.lowY,e.highY),r=e._getVisibleArea(),m=e._options.rotated,V=m?r.maxX:r.maxY,X=cb(m?r.minX:r.minY,t),ce=Qf(V,i),_e=e.getCenterCoord();return"edge"===n&&(_e[m?"x":"y"]=m?ce:X),_e.offset=0,_e}},getCenterCoord(){if(this.graphic){const n=this;let e,t;const i=Qf(n.lowY,n.highY),r=cb(n.lowY,n.highY),m=n._getVisibleArea(),A=n._options.rotated,X=A?m.maxX:m.maxY,ce=cb(A?m.minX:m.minY,i),Me=ce+(Qf(X,r)-ce)/2;return A?(t=n.x,e=Me):(e=n.x,t=Me),{x:e,y:t}}},hasValue:function(){return null!==this.highValue&&null!==this.lowValue},hasCoords:function(){return null!==this.x&&null!==this.lowY&&null!==this.highY},_translate:function(){const n=this._options.rotated,e=this._getValTranslator(),t=this._getArgTranslator().translate(this.argument);this.vx=this.vy=this.x=null===t?t:t+(this.xCorrection||0),this.openY=null!==this.openValue?e.translate(this.openValue):null,this.highY=e.translate(this.highValue),this.lowY=e.translate(this.lowValue),this.closeY=null!==this.closeValue?e.translate(this.closeValue):null;const i=Qf(this.lowY,this.highY)+sf(this.lowY-this.highY)/2;this._calculateVisibility(n?i:this.x,n?this.x:i)},getCrosshairData:function(n,e){const t=this,i=t._options.rotated,r=i?n:e;let m;const A=t.argument;let V,X="low";return sf(t.lowY-r)<sf(t.closeY-r)?m=t.lowY:(m=t.closeY,X="close"),sf(m-r)>=sf(t.openY-r)&&(m=t.openY,X="open"),sf(m-r)>=sf(t.highY-r)&&(m=t.highY,X="high"),V=i?{y:t.vy,x:m,xValue:t[X+"Value"],yValue:A}:{x:t.vx,y:m,xValue:A,yValue:t[X+"Value"]},V.axis=t.series.axis,V},_updateData:function(n){const e=this._label,t=this._options.reduction.color;this.value=this.initialValue=n.reductionValue,this.originalValue=n.value,this.lowValue=this.originalLowValue=n.lowValue,this.highValue=this.originalHighValue=n.highValue,this.openValue=this.originalOpenValue=n.openValue,this.closeValue=this.originalCloseValue=n.closeValue,this._isPositive=n.openValue<n.closeValue,this._isReduction=n.isReduction,this._isReduction&&e.setColor(t)},_updateMarker:function(n,e,t){const i=this.graphic;i.attr({points:this._getPoints()}).smartAttr(e).sharp(),t&&i.append(this._getMarkerGroup(t))},_getLabelFormatObject:function(){return{openValue:this.openValue,highValue:this.highValue,lowValue:this.lowValue,closeValue:this.closeValue,reductionValue:this.initialValue,argument:this.initialArgument,value:this.initialValue,seriesName:this.series.name,originalOpenValue:this.originalOpenValue,originalCloseValue:this.originalCloseValue,originalLowValue:this.originalLowValue,originalHighValue:this.originalHighValue,originalArgument:this.originalArgument,point:this}},_getFormatObject:function(n){const e=n.formatValue(this.highValue),t=n.formatValue(this.openValue),i=n.formatValue(this.closeValue),r=n.formatValue(this.lowValue),A=wc._getFormatObject.call(this,n);return(0,_.X)({},A,{valueText:"h: "+e+(""!==t?" o: "+t:"")+(""!==i?" c: "+i:"")+" l: "+r,highValueText:e,openValueText:t,closeValueText:i,lowValueText:r})},getMaxValue:function(){return this.highValue},getMinValue:function(){return this.lowValue}}),DT=C.kf,hM=(0,_.X)({},wv,{_getPoints:function(){const n=this._options.rotated?function(A,V){return[V,A]}:function(A,V){return[A,V]},e=DT(this.openY),t=DT(this.closeY),i=this.x,r=this.width;let m=[].concat(n(i,this.highY));return e&&(m=m.concat(n(i,this.openY))),e&&(m=m.concat(n(i-r/2,this.openY))),e&&(m=m.concat(n(i,this.openY))),t&&(m=m.concat(n(i,this.closeY))),t&&(m=m.concat(n(i+r/2,this.closeY))),t&&(m=m.concat(n(i,this.closeY))),m=m.concat(n(i,this.lowY)),m},_drawMarkerInGroup:function(n,e,t){this.graphic=t.path(this._getPoints(),"line").attr({"stroke-linecap":"square"}).attr(e).data({"chart-data-point":this}).sharp().append(n)},_getMinTrackerWidth:function(){const n=2+this._styles.normal["stroke-width"];return n+n%2}}),cu=_.X,$a=Math,ch=$a.max,af=Te.radialLabelIndent,mp="canvas_position_start",r_="canvas_position_end",s_="canvas_position_default",_c=cu({},wc,{_getLabelCoords:lu._getLabelCoords,_getElementCoords:lu._getElementCoords,_moveLabelOnCanvas:function(n,e,t){let i=n.x,r=n.y;return e.minX>i&&(i=e.minX),e.maxX<i+t.width&&(i=e.maxX-t.width),e.minY>r&&(r=e.minY),e.maxY<r+t.height&&(r=e.maxY-t.height),{x:i,y:r}},_getLabelPosition:function(){return"outside"},_getCoords:function(n,e){const t=this.series.getValueAxis(),i=t.getAngles()[0],r=this._getArgTranslator().translate(n),m=this._getValTranslator().translate(e),A=lo(t.getCenter(),t.getAngles()[0],r,m);return A.angle=r+i-90,A.radius=m,A},_translate(){const n=this.series.getValueAxis().getCenter(),e=this._getCoords(this.argument,this.value),t=this._getValTranslator(),i=t.isInverted()?t.translate(mp):t.translate(r_),r=(0,C.O9)(e.radius)&&e.radius>=0?e.radius:null;this.vx=xo(e.angle),this.vy=this.radiusOuter=this.radiusLabels=r,this.radiusLabels+=af,this.radius=r,this.middleAngle=-e.angle,this.angle=-e.angle,this.x=e.x,this.y=e.y,this.defaultX=this.centerX=n.x,this.defaultY=this.centerY=n.y,this._translateErrorBars(),this.inVisibleArea=this._checkRadiusForVisibleArea(r,i)},_checkRadiusForVisibleArea:(n,e)=>(0,C.O9)(n)&&n<=e,_translateErrorBars:function(){const n=this._options.errorBars,e=this._getValTranslator();n&&((0,C.O9)(this.lowError)&&(this._lowErrorCoord=this.centerY-e.translate(this.lowError)),(0,C.O9)(this.highError)&&(this._highErrorCoord=this.centerY-e.translate(this.highError)),this._errorBarPos=this.centerX,this._baseErrorBarPos="stdDeviation"===n.type?this._lowErrorCoord+(this._highErrorCoord-this._lowErrorCoord)/2:this.centerY-this.radius)},_getTranslates:function(n){return n?this.getDefaultCoords():{x:this.x,y:this.y}},getDefaultCoords:function(){const n=en(-this.angle),e=this._getValTranslator().translate(s_);return{x:this.defaultX+e*n.cos,y:this.defaultY+e*n.sin}},_addLabelAlignmentAndOffset:function(n,e){return e},_checkLabelPosition:function(n,e){const t=this,i=t._getVisibleArea(),r=t._getGraphicBBox();return t._isPointInVisibleArea(i,r)&&(e=t._moveLabelOnCanvas(e,i,n.getBoundingRect())),e},_getErrorBarSettings:function(n,e){const t=wc._getErrorBarSettings.call(this,n,e);return t.rotate=90-this.angle,t.rotateX=this.centerX,t.rotateY=this.centerY,t},getCoords:function(n){return n?this.getDefaultCoords():{x:this.x,y:this.y}}}),Tv=cu({},o_,{_translateErrorBars:_c._translateErrorBars,_getErrorBarSettings:_c._getErrorBarSettings,_moveLabelOnCanvas:_c._moveLabelOnCanvas,_getLabelCoords:lu._getLabelCoords,_getElementCoords:lu._getElementCoords,_getLabelConnector:lu._getLabelConnector,getTooltipParams:lu.getTooltipParams,_getLabelPosition:lu._getLabelPosition,_getCoords:_c._getCoords,_translate(){const n=this,e=n._getValTranslator(),t=e.getBusinessRange(),i=e.isInverted()?e.translate(mp):e.translate(r_);n.radiusInner=e.translate(n.minValue),_c._translate.call(n),null===n.radiusInner?n.radiusInner=n.radius=i:null===n.radius?n.radius=n.value>=t.minVisible?i:0:n.radius>i&&(n.radius=i),n.radiusOuter=n.radiusLabels=ch(n.radiusInner,n.radius),n.radiusLabels+=af,n.radiusInner=n.defaultRadius=$a.min(n.radiusInner,n.radius),n.middleAngle=n.angle=-xo(n.middleAngleCorrection-n.angle)},_checkRadiusForVisibleArea(n){return(0,C.O9)(n)||this._getValTranslator().translate(this.minValue)>0},_getErrorBarBaseEdgeLength(){const n=this.getMarkerCoords();return $a.PI*n.outerRadius*$a.abs(n.startAngle-n.endAngle)/180},getMarkerCoords:function(){return{x:this.centerX,y:this.centerY,outerRadius:this.radiusOuter,innerRadius:this.defaultRadius,startAngle:this.middleAngle-this.interval/2,endAngle:this.middleAngle+this.interval/2}},_drawMarker:function(n,e,t){const i=this._getStyle(),r=this.getMarkerCoords();let m=r.innerRadius,A=r.outerRadius;const V=this._getCoords(this.argument,s_);let X=r.x,ce=r.y;t&&(m=0,A=0,X=V.x,ce=V.y),this.graphic=n.arc(X,ce,m,A,r.startAngle,r.endAngle).attr(i).data({"chart-data-point":this}).append(e)},_checkLabelPosition:function(n,e){const t=this,i=t._getVisibleArea(),r=en(t.middleAngle),m=t.centerX+t.defaultRadius*r.cos,A=t.centerY-t.defaultRadius*r.sin;return m>i.minX&&m<i.maxX&&A>i.minY&&A<i.maxY&&(e=t._moveLabelOnCanvas(e,i,n.getBoundingRect())),e},_addLabelAlignmentAndOffset:function(n,e){return e},correctCoordinates:function(n){this.middleAngleCorrection=n.offset,this.interval=n.width},coordsIn:function(n,e){const t=Eo(this.series.getValueAxis().getCenter(),n,e),i=this.getMarkerCoords();return t.r>=i.innerRadius&&t.r<=i.outerRadius&&(i.startAngle<i.endAngle?-t.phi>=i.startAngle&&-t.phi<=i.endAngle:-t.phi<=i.startAngle&&-t.phi>=i.endAngle)}}),Ud={},fd=_.X,a_=Te.states,zd="symbolPoint",ub="barPoint",Dv="piePoint",AT=a_.selectedMark,GC=a_.hoverMark,s0=a_.normalMark,xE=a_.hover,WL=a_.normal,hb=a_.selection,IT={chart:{scatter:zd,line:zd,spline:zd,stepline:zd,stackedline:zd,fullstackedline:zd,stackedspline:zd,fullstackedspline:zd,stackedsplinearea:zd,fullstackedsplinearea:zd,area:zd,splinearea:zd,steparea:zd,stackedarea:zd,fullstackedarea:zd,rangearea:"rangeSymbolPoint",bar:ub,stackedbar:ub,fullstackedbar:ub,rangebar:"rangeBarPoint",bubble:"bubblePoint",stock:"stockPoint",candlestick:"candlestickPoint"},pie:{pie:Dv,doughnut:Dv,donut:Dv},polar:{scatter:"polarSymbolPoint",line:"polarSymbolPoint",area:"polarSymbolPoint",bar:"polarBarPoint",stackedbar:"polarBarPoint"}};function qf(n){return"none"===Wi(n)}function PT(n,e,t){this.fullState=s0,this.series=n,this.update(e,t),this._viewCounters={hover:0,selection:0},this._emptySettings={fill:null,stroke:null,dashStyle:null,filter:null}}Ud.symbolPoint=wc,Ud.barPoint=o_,Ud.bubblePoint=cM,Ud.piePoint=lu,Ud.rangeSymbolPoint=Tc,Ud.rangeBarPoint=sg,Ud.candlestickPoint=wv,Ud.stockPoint=hM,Ud.polarSymbolPoint=_c,Ud.polarBarPoint=Tv,PT.prototype={constructor:PT,getColor:function(){return!this.hasValue()&&!this._styles.usePointCustomOptions&&this.series.customizePoint(this,this._dataItem),this._styles.normal.fill||this.series.getColor()},_getStyle:function(){return this._styles[this._currentStyle||"normal"]},update:function(n,e){this.updateOptions(e),this.updateData(n)},updateData:function(n){const e=this.argument!==n.argument;this.argument=this.initialArgument=this.originalArgument=n.argument,this.tag=n.tag,this.index=n.index,this._dataItem=n,this.data=n.data,this.lowError=n.lowError,this.highError=n.highError,this.aggregationInfo=n.aggregationInfo,this._updateData(n,e),!this.hasValue()&&this.setInvisibility(),this._fillStyle(),this._updateLabelData()},deleteMarker:function(){const n=this;n.graphic&&n.graphic.dispose(),n.graphic=null},draw:function(n,e,t,i){const r=this;return(r._needDeletingOnDraw||r.series.autoHidePointMarkers&&!r.isSelected())&&(r.deleteMarker(),r._needDeletingOnDraw=!1),r._needClearingOnDraw&&(r.clearMarker(),r._needClearingOnDraw=!1),r._hasGraphic()?r._updateMarker(t,this._getStyle(),e.markers):r.getMarkerVisibility()&&!r.series.autoHidePointMarkers&&r._drawMarker(n,e.markers,t,i),r._drawLabel(),r._drawErrorBar(n,e.errorBars,t),r},_getViewStyle:function(){let n=s0,e=this.fullState;const t=[WL,xE,hb,hb];return this._viewCounters.hover&&(n|=GC),this._viewCounters.selection&&(n|=AT),qf(this.getOptions().selectionMode)&&(e&=~AT),qf(this.getOptions().hoverMode)&&(e&=~GC),n|=e,t[n]},applyView:function(n){const e=this,t=e._getViewStyle();e._currentStyle=t,!e.graphic&&e.getMarkerVisibility()&&e.series.autoHidePointMarkers&&(t===hb||t===xE)&&e._drawMarker(e.series.getRenderer(),e.series.getMarkersGroup()),e.graphic&&(e.series.autoHidePointMarkers&&t!==hb&&t!==xE?e.deleteMarker():("normal"===t?e.clearMarker():e.graphic.toForeground(),e._updateMarker(!0,e._styles[t],void 0,n)))},setView:function(n){this._viewCounters[n]++,this.applyView()},resetView:function(n){const e=this._viewCounters;--e[n],e[n]<0&&(e[n]=0),this.applyView()},releaseHoverState:function(){const n=this;n.graphic&&!n.isSelected()&&n.graphic.toBackground()},select:function(){this.series.selectPoint(this)},clearSelection:function(){this.series.deselectPoint(this)},hover:function(){this.series.hoverPoint(this)},clearHover:function(){this.series.clearPointHover()},showTooltip:function(){this.series.showPointTooltip(this)},hideTooltip:function(){this.series.hidePointTooltip(this)},_checkLabelsChanging:function(n,e){const t=~e.indexOf("range"),i=~n.indexOf("range");return i&&!t||!i&&t},updateOptions:function(n){if(!n)return;const e=this,t=e._options,r=t&&t.type,m=n.type,A=IT[n.widgetType][m];r!==m?(e._needDeletingOnDraw=!0,e._needClearingOnDraw=!1,r&&(e._checkLabelsChanging(r,m)&&e.deleteLabel(),e._resetType(Ud[IT[r]])),e._setType(Ud[A])):(e._needDeletingOnDraw=e._checkSymbol(t,n),e._needClearingOnDraw=e._checkCustomize(t,n)),e._options=n,e._fillStyle(),e._updateLabelOptions(A)},translate:function(){this.hasValue()&&(this._translate(),this.translated=!0)},_checkCustomize:function(n,e){return n.styles.usePointCustomOptions&&!e.styles.usePointCustomOptions},_getCustomLabelVisibility:function(){return this._styles.useLabelCustomOptions?!!this._options.label.visible:null},getBoundingRect:function(){return this._getGraphicBBox()},_resetType:function(n){for(const e in n)delete this[e]},_setType:function(n){for(const e in n)this[e]=n[e]},isInVisibleArea:function(){return this.inVisibleArea},isSelected:function(){return!!(this.fullState&AT)},isHovered:function(){return!!(this.fullState&GC)},getOptions:function(){return this._options},animate:function(n,e,t){this.graphic?this.graphic.animate(e,{partitionDuration:t},n):n&&n()},getCoords:function(n){const e=this;return n?e._options.rotated?{x:e.minX-(e.x-e.minX?0:1),y:e.y}:{x:e.x,y:e.minY+(e.y-e.minY?0:1)}:{x:e.x,y:e.y}},getDefaultCoords:function(){return this._options.rotated?{x:this.defaultX,y:this.y}:{x:this.x,y:this.defaultY}},setDefaultCoords(){const n=this.getDefaultCoords();this.x=n.x,this.y=n.y},_getVisibleArea:function(){return this.series.getVisibleArea()},_getArgTranslator:function(){return this.series.getArgumentAxis().getTranslator()},_getValTranslator:function(){return this.series.getValueAxis().getTranslator()},isArgumentCorrect(){return this.series._argumentChecker(this.argument)},isValueCorrect(){const n=this.series._valueChecker;return n(this.getMinValue())&&n(this.getMaxValue())},hasValue:function(){return null!==this.value&&null!==this.minValue&&this.isArgumentCorrect()&&this.isValueCorrect()},hasCoords:h.lQ,correctPosition:h.lQ,correctRadius:h.lQ,correctLabelRadius:h.lQ,getCrosshairData:h.lQ,getPointRadius:h.lQ,_populatePointShape:h.lQ,_checkSymbol:h.lQ,getMarkerCoords:h.lQ,hide:h.lQ,show:h.lQ,hideMarker:h.lQ,setInvisibility:h.lQ,clearVisibility:h.lQ,isVisible:h.lQ,resetCorrection:h.lQ,correctValue:h.lQ,resetValue:h.lQ,setPercentValue:h.lQ,correctCoordinates:h.lQ,coordsIn:h.lQ,getTooltipParams:h.lQ,applyWordWrap:h.lQ,setLabelTrackerData:h.lQ,updateLabelCoord:h.lQ,drawLabel:h.lQ,correctLabelPosition:h.lQ,getMinValue:h.lQ,getMaxValue:h.lQ,_drawErrorBar:h.lQ,getMarkerVisibility:h.lQ,dispose:function(){this.deleteMarker(),this.deleteLabel(),this._errorBar&&this._errorBar.dispose(),this._options=this._styles=this.series=this._errorBar=null},getTooltipFormatObject:function(n,e){const t=this,i=t._getFormatObject(n),r=[],m=[];e&&(e.forEach(V=>{if(!V.isVisible())return;const X=V._getFormatObject(n);m.push(X),r.push(X.seriesName+": "+X.valueText)}),fd(i,{points:m,valueText:r.join("\n"),stackName:t.series.getStackName()||null}));const A=t.aggregationInfo;if(A){const X=t.series.getArgumentAxis().formatRange(A.intervalStart,A.intervalEnd,A.aggregationInterval,n.getOptions().argumentFormat);X&&(i.valueText+=`\n${X}`)}return i},setHole:function(n,e){const t=this,i=isFinite(t.minValue)?t.minValue:0;(0,C.O9)(n)&&("left"===e?(t.leftHole=t.value-n,t.minLeftHole=i-n):(t.rightHole=t.value-n,t.minRightHole=i-n))},resetHoles:function(){this.leftHole=null,this.minLeftHole=null,this.rightHole=null,this.minRightHole=null},getLabel:function(){return this._label},getLabels:function(){return[this._label]},getCenterCoord(){return{x:this.x,y:this.y}}};const Mh="discrete",{abs:l_,floor:pb,ceil:vc,min:Rh}=Math;function c_(n,e,t){n.min=n.min<e?n.min:e,n.max=n.max>t?n.max:t}function d_(n,e){if("logarithmic"!==n)return null;const t=e.getOptions().logarithmBase;return i=>{const r=Ei(l_(i),t);return(r<0?pb:vc)(r)}}function Ua(n,e,t){let i=c_;return n===Mh?i=function(r,m,A){m!==A&&r.categories.push(A),r.categories.push(m)}:e&&(i=function(r,m){const A=e.calculateInterval(m,r.prevValue),V=r.interval;r.interval=(V<A?V:A)||V,r.prevValue=m,c_(r,m,m)}),t?(r,m,A)=>{const V=[];i(r,m,A),0!==m&&V.push(t(m)),0!==A&&V.push(t(A));const X=Rh.apply(null,V);r.linearThreshold=r.linearThreshold<X?r.linearThreshold:X}:i}function du(n,e,t){const i={axisType:n,dataType:e};return n===Mh?i.categories=[]:(i.min=(0,C.Gv)(t)?t.min:t,i.max=(0,C.Gv)(t)?t.max:t),i}function ag(n){return n.categories&&(n.categories=Ii(n.categories)),n}function em(n,e,t,i,r){const m=function kh(n,e,t,i){if(e&&(0,C.O9)(e.value)){const r=n.value,A=n.argument,X=(t-A)*(e.value-r)/(e.argument-A)+r.valueOf();return"datetime"===i.dataType?new Date(X):X}return n.value}(t,i,r,e);n(e,m,m)}function uu(n){return n.type.toLowerCase().indexOf("line")>=0||n.type.toLowerCase().indexOf("area")>=0}function gb(n){const e=Ua(n.valueAxisType),t=n.getArgumentAxis(),i=t&&n.getArgumentAxis().visualRange()||{},r=uu(n)?em:h.lQ;if(t&&t.getMarginOptions().checkInterval){const A=n.getArgumentAxis().getTranslator().getBusinessRange(),V=Wr(A,!1),X=A.interval;isFinite(X)&&(0,C.O9)(i.startValue)&&(0,C.O9)(i.endValue)&&(i.startValue=V(i.startValue,X,-1),i.endValue=V(i.endValue,X))}const m=lf(i);return function(A,V,X,ce){const _e=V.argument;return V.hasValue()&&(m(_e)?(A.startCalc||(A.startCalc=!0,r(e,A,V,ce[X-1],i.startValue)),e(A,V.getMinValue(),V.getMaxValue())):!i.categories&&(0,C.O9)(i.startValue)&&_e>i.startValue&&(A.startCalc||r(e,A,V,ce[X-1],i.startValue),A.endCalc=!0,r(e,A,V,ce[X-1],i.endValue))),A}}function lf(n){if(n.categories){const e=n.categories.reduce((t,i)=>(t[i.valueOf()]=!0,t),{});return t=>(0,C.O9)(t)&&e[t.valueOf()]}return(0,C.O9)(n.startValue)||(0,C.O9)(n.endValue)?(0,C.O9)(n.endValue)?(0,C.O9)(n.startValue)?e=>e>=n.startValue&&e<=n.endValue:e=>e<=n.endValue:e=>e>=n.startValue:()=>!0}const tm={getViewPortFilter:lf,getArgumentRange:function(n){const e=n._data||[];let t={};if(e.length)if(n.argumentAxisType===Mh)t={categories:e.map(i=>i.argument)};else{let i;if(e.length>1){const r=n.getArgumentAxis().calculateInterval(e[0].argument,e[1].argument),m=n.getArgumentAxis().calculateInterval(e[e.length-1].argument,e[e.length-2].argument);i=Rh(r,m)}t={min:e[0].argument,max:e[e.length-1].argument,interval:i}}return ag(t)},getRangeData:function(n){const e=n.getPoints(),t=n.useAggregation(),i=n.getArgumentAxis(),r=Ua(n.argumentAxisType,e.length>1&&i,d_(n.argumentAxisType,i)),m=Ua(n.valueAxisType,null,d_(n.valueAxisType,n.getValueAxis())),A=gb(n),V=e.reduce(function(X,ce,_e,Me){const Ve=ce.argument;return ce.isArgumentCorrect()&&(r(X.arg,Ve,Ve),ce.hasValue()&&(m(X.val,ce.getMinValue(),ce.getMaxValue()),A(X.viewport,ce,_e,Me))),X},{arg:du(n.argumentAxisType,n.argumentType,null!=i&&i.aggregatedPointBetweenTicks()?void 0:n.getArgumentRangeInitialValue()),val:du(n.valueAxisType,n.valueType,e.length?n.getValueRangeInitialValue():void 0),viewport:du(n.valueAxisType,n.valueType,e.length?n.getValueRangeInitialValue():void 0)});if(t){const X=this.getArgumentRange(n);if(n.argumentAxisType===Mh)V.arg=X;else{const ce=i.getViewport();((0,C.O9)(ce.startValue)||(0,C.O9)(ce.length))&&r(V.arg,X.min,X.min),((0,C.O9)(ce.endValue)||(0,C.O9)(ce.length)&&(0,C.O9)(ce.startValue))&&r(V.arg,X.max,X.max)}}return ag(V.arg),ag(V.val),V},getViewport:function(n){const e=n.getPoints();let t={};const i=gb(n);return t=du(n.valueAxisType,n.valueType,e.length?n.getValueRangeInitialValue():void 0),e.some(function(r,m){return i(t,r,m,e),t.endCalc}),t},getPointsInViewPort:function(n){const e=lf(n.getArgumentAxis().visualRange()||{}),t=n.getValueAxis().visualRange()||{},i=lf(t),r=n.getPoints(),m=function(V,X,ce){const _e=X.getMinValue(),Me=X.getMaxValue(),Ve=i(_e),Je=i(Me);Ve&&V.push(_e),Me!==_e&&Je&&V.push(Me),ce&&!Ve&&!Je&&V.push(V.length?t.endValue:t.startValue)},A=uu(n)?function(V,X,ce){const _e=X[ce],Me=X[ce-1],Ve=X[ce+1];Ve&&e(Ve.argument)&&m(V[1],_e,!0),Me&&e(Me.argument)&&m(V[1],_e,!0)}:h.lQ;return r.reduce(function(V,X,ce){return e(X.argument)?m(V[0],X):A(V,r,ce),V},[[],[]])}},Xc=Math,SE=Xc.abs,a0=Xc.sqrt,cf=Xc.max,hu="highError",pu="lowError",fb="variance",$L="stddeviation",jL="stderror",EE="percent",Xs="fixed";let tc={},Ns={};function nc(n){let e=0;return(0,w.__)(n,function(t,i){e+=i}),e}function mb(n,e){return nc(ui(n,function(t){return(t-e)*(t-e)}))/n.length}function _b(n){return(e,t)=>{let{intervalStart:i,intervalEnd:r,data:m}=e;const A=t.getValueFields()[0];let V=m[0];return V=m.reduce((X,ce)=>{const _e=ce[A];return null===X[A]&&(X=ce),null!==_e&&n(_e,X[A])?ce:X},V),(0,_.X)({},V,{[t.getArgumentField()]:t._getIntervalCenter(i,r)})}}const no={_defaultDuration:400,_defaultTrackerWidth:12,_applyStyle:h.lQ,_updateOptions:h.lQ,_parseStyle:h.lQ,_prepareSegment:h.lQ,_drawSegment:h.lQ,_appendInGroup:function(){this._group.append(this._extGroups.seriesGroup)},_createLegendState:function(n,e){return{fill:mi(n.color,!0)||e,hatching:n.hatching?(0,_.X)({},n.hatching,{direction:"right"}):void 0}},_getColorId:h.lQ,_applyElementsClipRect:function(n){n["clip-path"]=this._paneClipRectID},_applyMarkerClipRect:function(n){n["clip-path"]=this._forceClipping?this._paneClipRectID:null},_createGroup:function(n,e,t,i){const r=e[n]=e[n]||this._renderer.g();t&&r.append(t),i&&r.attr(i)},_applyClearingSettings:function(n){n.opacity=null,n.scale=null,this._options.rotated?n.translateX=null:n.translateY=null},_createGroups:function(){this._createGroup("_markersGroup",this,this._group),this._createGroup("_labelsGroup",this)},_setMarkerGroupSettings:function(){const n=this._createPointStyles(this._getMarkerGroupOptions()).normal;n.class="dxc-markers",n.opacity=1,this._applyMarkerClipRect(n),this._markersGroup.attr(n)},getVisibleArea:function(){return this._visibleArea},areErrorBarsVisible:function(){const n=this._options.valueErrorBar;return n&&this._errorBarsEnabled()&&"none"!==n.displayMode&&(function pM(n){return[Xs,EE,fb,$L,jL].includes(n)}(Wi(n.type))||(0,C.O9)(n.lowValueField)||(0,C.O9)(n.highValueField))},groupPointsByCoords(n){const e=[];return(0,w.__)(this.getVisiblePoints(),function(t,i){const r=parseInt(n?i.vy:i.vx);e[r]?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i}),e},_createErrorBarGroup:function(n){const e=this,t=e._options.valueErrorBar;let i;e.areErrorBarsVisible()&&(i={class:"dxc-error-bars",stroke:t.color,"stroke-width":t.lineWidth,opacity:n?.001:t.opacity||1,"stroke-linecap":"square",sharp:!0,"clip-path":e._forceClipping?e._paneClipRectID:e._widePaneClipRectID},e._createGroup("_errorBarGroup",e,e._group,i))},_setGroupsSettings:function(n){this._setMarkerGroupSettings(),this._setLabelGroupSettings(n),this._createErrorBarGroup(n)},_getCreatingPointOptions:function(){const n=this;let e,i,t=n._predefinedPointOptions;return t||(e=n._getPointOptions(),n._predefinedPointOptions=t=(0,_.X)(!0,{styles:{}},e),i=e.styles&&e.styles.normal||{},t.styles=t.styles||{},t.styles.normal={"stroke-width":i["stroke-width"],r:i.r,opacity:i.opacity}),t},_getPointOptions:function(){return this._parsePointOptions(this._preparePointOptions(),this._options.label)},_getOptionsForPoint:function(){return this._options.point},_parsePointStyle:function(n,e,t,i){const r=n.border||{},m=void 0!==n.size?n.size:i;return{fill:mi(n.color,!0)||e,stroke:r.color||t,"stroke-width":r.visible?r.width:0,r:m/2+(r.visible&&0!==m&&~~(r.width/2)||0)}},_createPointStyles:function(n){const e=mi(n.color,!0)||this._options.mainSeriesColor,t=this._options.containerBackgroundColor,i=this._parsePointStyle(n,e,e);return i.visibility=n.visible?"visible":"hidden",{labelColor:e,normal:i,hover:this._parsePointStyle(n.hoverStyle,t,e,n.size),selection:this._parsePointStyle(n.selectionStyle,t,e,n.size)}},_checkData:function(n,e,t){return(t=t||{value:this.getValueFields()[0]}).argument=this.getArgumentField(),function RT(n,e,t){let i=!0;for(const r in e){const m="argument"===r;if(m||"size"===r?!(0,C.O9)(n[r]):void 0===n[r]){const A=e[r];m||(t[A]=(t[A]||0)+1),i=!1}}return i}(n,t,e||{})&&n.value==n.value},getArgumentRangeInitialValue(){const n=this.getPoints();var e,t;if(this.useAggregation()&&n.length)return{min:null===(e=n[0].aggregationInfo)||void 0===e?void 0:e.intervalStart,max:null===(t=n[n.length-1].aggregationInfo)||void 0===t?void 0:t.intervalEnd}},getValueRangeInitialValue:function(){},_getRangeData:function(){return tm.getRangeData(this)},_getPointDataSelector:function(){const n=this.getValueFields()[0],e=this.getArgumentField(),t=this.getTagField(),i=this.areErrorBarsVisible();let r,m;if(i){const A=this._options.valueErrorBar;r=A.lowValueField||pu,m=A.highValueField||hu}return A=>{const V={value:this._processEmptyValue(A[n]),argument:A[e],tag:A[t],data:A};return i&&(V.lowError=A[r],V.highError=A[m]),V}},_errorBarsEnabled:function(){return"discrete"!==this.valueAxisType&&"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType},_drawPoint:function(n){const e=n.point;e.isInVisibleArea()?(e.clearVisibility(),e.draw(this._renderer,n.groups,n.hasAnimation,n.firstDrawing),this._drawnPoints.push(e)):e.setInvisibility()},_animateComplete:function(){const n={duration:this._defaultDuration};this._labelsGroup&&this._labelsGroup.animate({opacity:1},n),this._errorBarGroup&&this._errorBarGroup.animate({opacity:this._options.valueErrorBar.opacity||1},n)},_animate:function(){const n=this,e=n._drawnPoints.length-1;(0,w.__)(n._drawnPoints||[],function(t,i){i.animate(t===e?function(){n._animateComplete()}:void 0,{translateX:i.x,translateY:i.y})})},_getIntervalCenter(n,e){const t=this.getArgumentAxis(),i=t.getOptions();return t.aggregatedPointBetweenTicks()?n:"discrete"!==i.type?t.getVisualRangeCenter({minVisible:n,maxVisible:e},!0):n},_defaultAggregator:"avg",_aggregators:{avg(n,e){let{data:t,intervalStart:i,intervalEnd:r}=n;if(!t.length)return;const m=e.getValueFields()[0],A=t.reduce((V,X)=>{const ce=X[m];return(0,C.O9)(ce)?(V[0]+=ce,V[1]++):null===ce&&V[2]++,V},[0,0,0]);return function nm(n,e,t){const i=t.getOptions().valueErrorBar,r=t.getValueFields()[0],m=i.lowValueField||pu,A=i.highValueField||hu;if(t.areErrorBarsVisible()&&void 0===i.type){const V=e.reduce(function(X,ce){return(0,C.O9)(ce[m])&&(X[0]+=ce[r]-ce[m],X[1]++),(0,C.O9)(ce[A])&&(X[2]+=ce[A]-ce[r],X[3]++),X},[0,0,0,0]);V[1]&&(n[m]=n[r]-V[0]/V[1]),V[2]&&(n[A]=n[r]+V[2]/V[3])}return n}({[m]:A[2]===t.length?null:A[0]/A[1],[e.getArgumentField()]:e._getIntervalCenter(i,r)},t,e)},sum(n,e){let{intervalStart:t,intervalEnd:i,data:r}=n;if(!r.length)return;const m=e.getValueFields()[0],A=r.reduce((X,ce)=>{const _e=ce[m];return void 0!==_e&&(X[0]+=_e),null===_e?X[1]++:void 0===_e&&X[2]++,X},[0,0,0]);let V=A[0];return A[1]===r.length&&(V=null),A[2]!==r.length?function Zc(n,e,t){const i=t.getOptions().valueErrorBar,r=i.lowValueField||pu,m=i.highValueField||hu;return t.areErrorBarsVisible()&&void 0===i.type&&(n[r]=0,n[m]=0,n=e.reduce(function(A,V){return A[r]+=V[r],A[m]+=V[m],A},n)),n}({[m]:V,[e.getArgumentField()]:e._getIntervalCenter(t,i)},r,e):void 0},count(n,e){let{data:t,intervalStart:i,intervalEnd:r}=n;const m=e.getValueFields()[0];return{[e.getArgumentField()]:e._getIntervalCenter(i,r),[m]:t.filter(A=>void 0!==A[m]).length}},min:_b((n,e)=>n<e),max:_b((n,e)=>n>e)},_endUpdateData:function(){delete this._predefinedPointOptions},getArgumentField:function(){return this._options.argumentField||"arg"},getValueFields:function(){const n=this._options,e=n.valueErrorBar,t=[n.valueField||"val"];let i,r;return e&&(i=e.lowValueField,r=e.highValueField,(0,C.Kg)(i)&&t.push(i),(0,C.Kg)(r)&&t.push(r)),t},_calculateErrorBars:function(n){if(!this.areErrorBarsVisible())return;const t=this._options.valueErrorBar,i=Wi(t.type);let r=parseFloat(t.value);const m=this.getValueFields()[0];let A;const V=t.lowValueField||pu,X=t.highValueField||hu;let ce,_e,Me,Ve;const Je=function(rt,Ct){A=Ct.value,Ct.lowError=A-r,Ct.highError=A+r};switch(i){case Xs:Ve=Je;break;case EE:Ve=function(rt,Ct){A=Ct.value;const Xt=A*r/100;Ct.lowError=A-Xt,Ct.highError=A+Xt};break;case"undefined":Ve=function(rt,Ct){Ct.lowError=Ct.data[V],Ct.highError=Ct.data[X]};break;default:switch(ce=ui(n,function(rt){return(0,C.O9)(rt.data[m])?rt.data[m]:null}),_e=ce.length,r=r||1,i){case fb:r=mb(ce,nc(ce)/_e)*r,Ve=Je;break;case $L:Me=nc(ce)/_e,r=a0(mb(ce,Me))*r,Ve=function(rt,Ct){Ct.lowError=Me-r,Ct.highError=Me+r};break;case jL:r=a0(mb(ce,nc(ce)/_e)/_e)*r,Ve=Je}}Ve&&(0,w.__)(n,Ve)},_patchMarginOptions:function(n){const e=this._getCreatingPointOptions(),t=e.styles,i=[t.normal,t.hover,t.selection].reduce(function(r,m){return cf(r,2*m.r+m["stroke-width"])},0);return n.size=e.visible?i:0,n.sizePointNormalState=e.visible?2*t.normal.r+t.normal["stroke-width"]:2,n},usePointsToDefineAutoHiding:()=>!0};tc=(0,_.X)({},no,{drawTrackers:function(){const n=this;let e,t;const i=n._segments||[],r=n._options.rotated;n.isVisible()&&(i.length&&(e=n._trackers=n._trackers||[],t=n._trackersGroup=(n._trackersGroup||n._renderer.g().attr({fill:"gray",opacity:.001,stroke:"gray",class:"dxc-trackers"})).attr({"clip-path":this._paneClipRectID||null}).append(n._group),(0,w.__)(i,function(m,A){e[m]?n._updateTrackerElement(A,e[m]):e[m]=n._drawTrackerElement(A).data({"chart-data-series":n}).append(t)})),n._trackersTranslator=n.groupPointsByCoords(r))},_checkAxisVisibleAreaCoord(n,e){const i=(n?this.getArgumentAxis():this.getValueAxis()).getVisibleArea();return(0,C.O9)(e)&&i[0]<=e&&i[1]>=e},checkSeriesViewportCoord(n,e){return this.getPoints().length&&this.isVisible()},getSeriesPairCoord(n,e){let t=null;const i=!e&&!this._options.rotated||e&&this._options.rotated,r=i?"vy":"vx",m=i?"vx":"vy",A=this.getVisiblePoints();for(let V=0;V<A.length;V++){const X=A[V],ce=X[r]===n?X[m]:void 0;if(this._checkAxisVisibleAreaCoord(!e,ce)){t=ce;break}}return t},_getNearestPoints:(n,e)=>[n,e],_getBezierPoints:()=>[],_getNearestPointsByCoord(n,e){const t=this,i=t.getOptions().rotated,m=!e&&!i||e&&i?"vy":"vx",A=t.getPoints(),V=t._getBezierPoints(),X=[];return A.length>1?A.forEach((ce,_e)=>{const Me=A[_e+1];Me&&(ce[m]<=n&&Me[m]>=n||ce[m]>=n&&Me[m]<=n)&&X.push(t._getNearestPoints(ce,Me,V))}):X.push([A[0],A[0]]),X},getNeighborPoint:function(n,e){let t=this._options.rotated?e:n,i=t;const r=this._trackersTranslator;let A,m=null;const V=this._options.rotated?n:e,X=this._options.rotated?"vx":"vy";if(this.isVisible()&&r){m=r[t];do{m=r[i]||r[t],t--,i++}while((t>=0||i<r.length)&&!m);Array.isArray(m)&&(A=SE(m[0][X]-V),(0,w.__)(m,function(ce,_e){const Me=SE(_e[X]-V);A>=Me&&(A=Me,m=_e)}))}return m},_applyVisibleArea:function(){const n=this._options.rotated,e=(n?this.getValueAxis():this.getArgumentAxis()).getVisibleArea(),t=(n?this.getArgumentAxis():this.getValueAxis()).getVisibleArea();this._visibleArea={minX:e[0],maxX:e[1],minY:t[0],maxY:t[1]}},getPointCenterByArg(n){const e=this.getPointsByArg(n)[0];return e?e.getCenterCoord():void 0}}),Ns=(0,_.X)({},no,{drawTrackers:function(){tc.drawTrackers.call(this);const n=this._trackersTranslator;let e;this.isVisible()&&((0,w.__)(n,function(t,i){if(i)return e=t,!1}),n[e+360]=n[e])},getNeighborPoint:function(n,e){const t=Eo(this.getValueAxis().getCenter(),n,e);return tc.getNeighborPoint.call(this,t.phi,t.r)},_applyVisibleArea:function(){const n=this.getValueAxis().getCanvas();this._visibleArea={minX:n.left,maxX:n.width-n.right,minY:n.top,maxY:n.height-n.bottom}},getSeriesPairCoord(n,e){let t=null;const i=e?"argument":"radius",r=this.getVisiblePoints();for(let m=0;m<r.length;m++){const A=r[m],V=(0,C.O9)(A[i])&&(0,C.O9)(n[i])&&A[i].valueOf()===n[i].valueOf()?{x:A.x,y:A.y}:void 0;if((0,C.O9)(V)){t=V;break}}return t}});const l0="discrete",{round:kT,sqrt:vb,pow:u_,min:wE,max:TE,abs:gM}=Math,md={},Cb={};function im(n,e,t,i){const r=(0,xe.o8)(n);return r.x=e,r.y=t,r.angle=i,r}function om(n,e,t,i,r){const m=n.angle+r,A=en(m);return im(e,t.x+(n.radius+i*r)*A.cos,t.y-(n.radius+i*r)*A.sin,m)}function WC(n,e,t,i,r){return(0,ri.cB)(r-3*i+3*t-e,3*i-6*t+3*e,3*t-3*e,e-n)}const LT={autoHidePointMarkersEnabled:()=>!0,_applyGroupSettings:function(n,e,t){e=(0,_.X)(e,n),this._applyElementsClipRect(e),t.attr(e)},_setGroupsSettings:function(n){const e=this._styles.normal;this._applyGroupSettings(e.elements,{class:"dxc-elements"},this._elementsGroup),this._bordersGroup&&this._applyGroupSettings(e.border,{class:"dxc-borders"},this._bordersGroup),tc._setGroupsSettings.call(this,n),n&&this._markersGroup&&this._markersGroup.attr({opacity:.001})},_createGroups:function(){this._createGroup("_elementsGroup",this,this._group),this._areBordersVisible()&&this._createGroup("_bordersGroup",this,this._group),tc._createGroups.call(this)},_areBordersVisible:function(){return!1},_getDefaultSegment:function(n){return{line:ui(n.line||[],function(e){return e.getDefaultCoords()})}},_prepareSegment:function(n){return{line:n}},_parseLineOptions:function(n,e){return{stroke:mi(n.color,!0)||e,"stroke-width":n.width,dashStyle:n.dashStyle||"solid"}},_parseStyle:function(n,e){return{elements:this._parseLineOptions(n,e)}},_applyStyle:function(n){this._elementsGroup&&this._elementsGroup.attr(n.elements),(0,w.__)(this._graphics||[],function(e,t){t.line&&t.line.attr({"stroke-width":n.elements["stroke-width"]}).sharp()})},_drawElement:function(n,e){return{line:this._createMainElement(n.line,{"stroke-width":this._styles.normal.elements["stroke-width"]}).append(e)}},_removeElement:function(n){n.line.remove()},_updateElement:function(n,e,t,i){const r={points:e.line},m=n.line;t?m.animate(r,{},i):m.attr(r)},_animateComplete:function(){tc._animateComplete.call(this),this._markersGroup&&this._markersGroup.animate({opacity:1},{duration:this._defaultDuration})},_animate:function(){const n=this,e=n._graphics.length-1;(0,w.__)(n._graphics||[],function(t,i){let r;t===e&&(r=function(){n._animateComplete()}),n._updateElement(i,n._segments[t],!0,r)})},_drawPoint:function(n){tc._drawPoint.call(this,{point:n.point,groups:n.groups})},_createMainElement:function(n,e){return this._renderer.path(n,"line").attr(e)},_sortPoints:function(n,e){return n.sort(e?function(t,i){return i.y-t.y}:function(t,i){return t.x-i.x})},_drawSegment:function(n,e,t,i){const r=this,A=r._prepareSegment(n,r._options.rotated,i);r._segments.push(A),r._graphics[t]?e||r._updateElement(r._graphics[t],A):r._graphics[t]=r._drawElement(e?r._getDefaultSegment(A):A,r._elementsGroup)},_getTrackerSettings:function(){const n=this._defaultTrackerWidth,e=this._styles.normal.elements["stroke-width"];return{"stroke-width":e>n?e:n,fill:"none"}},_getMainPointsFromSegment:function(n){return n.line},_drawTrackerElement:function(n){return this._createMainElement(this._getMainPointsFromSegment(n),this._getTrackerSettings(n))},_updateTrackerElement:function(n,e){const t=this._getTrackerSettings(n);t.points=this._getMainPointsFromSegment(n),e.attr(t)},checkSeriesViewportCoord(n,e){if(!tc.checkSeriesViewportCoord.call(this))return!1;const t=n.isArgumentAxis?this.getArgumentRange():this.getViewport(),i=n.getTranslator().translate(t.categories?t.categories[0]:t.min),r=n.getTranslator().translate(t.categories?t.categories[t.categories.length-1]:t.max),m=this.getOptions().rotated,A=n.getOptions().inverted;return n.isArgumentAxis&&(!m&&!A||m&&A)||!n.isArgumentAxis&&(m&&!A||!m&&A)?e>=i&&e<=r:e>=r&&e<=i}},yb=md.line=(0,_.X)({},tc,LT,{getPointCenterByArg(n){const e=this.getArgumentAxis().getTranslator().translate(n);return{x:e,y:e}},getSeriesPairCoord(n,e){let t=null;const i=this._getNearestPointsByCoord(n,e),r=e&&!this._options.rotated||!e&&this._options.rotated;for(let m=0;m<i.length;m++){const A=i[m],V=(A[1].vy-A[0].vy)/(A[1].vx-A[0].vx),X=A[0].vy-A[0].vx*V;let ce;if(ce=A[1].vx-A[0].vx==0?r?A[0].vy:A[0].vx:r?V*n+X:(n-X)/V,this._checkAxisVisibleAreaCoord(!e,ce)){t=ce;break}}return t}});md.stepline=(0,_.X)({},yb,{_calculateStepLinePoints(n){const e=[],t=this._options.rotated?"x":"y";return(0,w.__)(n,function(i,r){let m;if(!i)return void e.push(r);const A=e[e.length-1][t];A!==r[t]&&(m=(0,xe.o8)(r),m[t]=A,e.push(m)),e.push(r)}),e},_prepareSegment:function(n){return yb._prepareSegment(this._calculateStepLinePoints(n))},getSeriesPairCoord(n,e){let t;const i=this._options.rotated,r=!e&&!i||e&&i,m=r?"vy":"vx",A=r?"vx":"vy",V=this._getNearestPointsByCoord(n,e);for(let X=0;X<V.length;X++){const ce=V[X];let _e;if(_e=e?n!==ce[1][m]?ce[0][A]:ce[1][A]:n===ce[0][m]?ce[0][A]:ce[1][A],this._checkAxisVisibleAreaCoord(!e,_e)){t=_e;break}}return t}}),md.spline=(0,_.X)({},yb,{_calculateBezierPoints:function(n,e){const t=[],i=n,r=function(m,A,V){return m>A&&V>m||m<A&&V<m?m:V};return 1!==i.length?i.forEach(function(m,A){let V,X,ce,_e;const Me=i[A-1],Ve=i[A+1];let Je,rt,Ct,Xt,On,Fn,oi,Yt,$t,xn;if(!A||A===i.length-1)return void t.push(m,m);const Gn=m.x,qn=m.y;if(Je=Me.x,rt=Ve.x,Ct=Me.y,Xt=Ve.y,!e&&(qn<=Me.y&&qn<=Ve.y||qn>=Me.y&&qn>=Ve.y)||e&&(Gn<=Me.x&&Gn<=Ve.x||Gn>=Me.x&&Gn>=Ve.x))e?(ce=V=Gn,_e=(qn+Ve.y)/2,X=(qn+Me.y)/2):(_e=X=qn,ce=(Gn+Ve.x)/2,V=(Gn+Me.x)/2);else{if(On=Xt-Ct,Fn=Je-rt,oi=Ct*rt-Je*Xt,e){if(!On)return void t.push(m,m,m);$t=qn,Yt=-1*(Fn*$t+oi)/On,xn=Yt-Gn,Je-=xn,rt-=xn}else{if(!Fn)return void t.push(m,m,m);Yt=Gn,$t=-1*(On*Yt+oi)/Fn,xn=$t-qn,Ct-=xn,Xt-=xn}ce=(Gn+.5*rt)/1.5,_e=(qn+.5*Xt)/1.5,V=(Gn+.5*Je)/1.5,X=(qn+.5*Ct)/1.5}e?(V=r(Me.x,Gn,V),ce=r(Ve.x,Gn,ce)):(X=r(Me.y,qn,X),_e=r(Ve.y,qn,_e));const qi=im(m,V,X),ji=im(m,ce,_e);t.push(qi,m,ji)}):t.push(i[0]),t},_prepareSegment:function(n,e){return yb._prepareSegment(this._calculateBezierPoints(n,e))},_createMainElement:function(n,e){return this._renderer.path(n,"bezier").attr(e)},getSeriesPairCoord(n,e){let t=null;const i=!e&&!this._options.rotated||e&&this._options.rotated,r=i?"vy":"vx",m=i?"y":"x",A=i?"vx":"vy",V=i?"x":"y",ce=(e?this.getValueAxis():this.getArgumentAxis()).getVisibleArea(),_e=this._getNearestPointsByCoord(n,e);for(let Me=0;Me<_e.length;Me++){const Ve=_e[Me];if(1===Ve.length?ce[0]<=Ve[0][A]&&ce[1]>=Ve[0][A]&&(t=Ve[0][A]):WC(n,Ve[0][r],Ve[1][m],Ve[2][m],Ve[3][r]).forEach(rt=>{if(rt>=0&&rt<=1){const Ct=Math.pow(1-rt,3)*Ve[0][A]+3*Math.pow(1-rt,2)*rt*Ve[1][V]+3*(1-rt)*rt*rt*Ve[2][V]+rt*rt*rt*Ve[3][A];ce[0]<=Ct&&ce[1]>=Ct&&(t=Ct)}}),null!==t)break}return t},_getNearestPoints(n,e,t){const i=t.indexOf(n);return[n,t[i+1],t[i+2],e]},_getBezierPoints(){return this._segments.length>0?this._segments.reduce((n,e)=>n.concat(e.line),[]):[]}}),Cb.line=(0,_.X)({},Ns,LT,{_sortPoints:function(n){return n},_prepareSegment:function(n,e,t){let i=[];const r=this.getValueAxis().getCenter();let m;if(t&&this._closeSegment(n),this.argumentAxisType===l0||this.valueAxisType===l0)return yb._prepareSegment.call(this,n);for(m=1;m<n.length;m++)i=i.concat(this._getTangentPoints(n[m],n[m-1],r,m===n.length-1));return i.length||(i=n),{line:i}},_getRemainingAngle:function(n){const e=xo(n);return n>=0?360-e:-e},_closeSegment(n){const e=this._segments.length?this._segments[0].line[0]:n[0];let t=im(e,e.x,e.y,e.angle);t=this._modifyReflectedPoint(t,n.at(-1)),t&&n.push(t)},_modifyReflectedPoint(n,e){if(e.angle!==n.angle)return n.angle=xo(kT(e.angle))===xo(kT(n.angle))?e.angle:e.angle+this._getRemainingAngle(e.angle-n.angle),n},_getTangentPoints:function(n,e,t,i){let r=[];const m=Math.round(e.angle-n.angle),A=(e.radius-n.radius)/m;let V;if(0===m)r=[e,n];else if(m>0)for(V=i?m:m-1;V>=0;V--)r.push(om(n,e,t,A,V));else{const X=i?m:m+1;for(V=0;V>=X;V--)r.push(om(n,e,t,A,m-V))}return r},getSeriesPairCoord(n,e){const t=this,i=t.getArgumentAxis(),r=e?"angle":"radius",m=n[r],A=i.getCenter(),V=(_e,Me,Ve)=>{let{x:Je,y:rt}=Ve;return vb(u_((Ct={x:Je,y:rt}).x-(Xt=A).x,2)+u_(Ct.y-Xt.y,2))<=i.getRadius()&&wE(_e.x,Me.x)<=Je&&TE(_e.x,Me.x)>=Je&&wE(_e.y,Me.y)<=rt&&TE(_e.y,Me.y)>=rt;var Ct,Xt};let X;const ce=t.getNeighborPoints(m,r);if(1===ce.length)X=ce[0];else if(ce.length>1){const _e=ce[0],Me=ce[1];if(t.argumentAxisType!==l0&&t.valueAxisType!==l0){let Ve,Je;e?(Ve=(_e.radius-Me.radius)/(_e.angle-Me.angle),Je=m-Me.angle):(Ve=(_e.radius-Me.radius)/(_e.angle-Me.angle),Je=(m-Me.radius)/Ve),X=om(Me,_e,A,Ve,Je)}else if(e){const Ve=en(-m),Je=(Me.y-_e.y)/(Me.x-_e.x),rt=_e.y-_e.x*Je,Ct=Ve.sin/Ve.cos,On=(A.y-Ct*A.x-rt)/(Je-Ct),Fn=Je*On+rt;if(V(_e,Me,{x:On,y:Fn})){const oi=gM((0,ri.BU)((360+m)/90)%4);(0===oi&&On>=A.x&&Fn<=A.y||1===oi&&On<=A.x&&Fn<=A.y||2===oi&&On<=A.x&&Fn>=A.y||3===oi&&On>=A.x&&Fn>=A.y)&&(X={x:On,y:Fn})}}else{const Ve=(Me.y-_e.y)/(Me.x-_e.x),Je=_e.y-_e.x*Ve,rt=1+Ve*Ve,Ct=-2*A.x+2*Ve*Je-2*Ve*A.y,On=Ct*Ct-4*rt*(-u_(m,2)+u_(Je-A.y,2)+u_(A.x,2));if(On>=0){const Fn=(-Ct-vb(On))/(2*rt),oi=(-Ct+vb(On))/(2*rt),Yt=Ve*Fn+Je,$t=Ve*oi+Je;X=V(_e,Me,{x:Fn,y:Yt})?{x:Fn,y:Yt}:V(_e,Me,{x:oi,y:$t})?{x:oi,y:$t}:void 0}}}return X},getNeighborPoints(n,e){let t=this.getPoints();const i=[];if(this.getOptions().closed){t=(0,_.X)(!0,[],t);const r=t[t.length-1],m=im(t[0],t[0].x,t[0].y,t[0].angle),A=im(r,r.x,r.y,r.angle),V=this._modifyReflectedPoint(m,r),X=this._modifyReflectedPoint(A,t[0]);X&&t.unshift(X),V&&t.push(V)}for(let r=1;r<t.length&&(t[r-1][e]===n?i.push(t[r-1]):t[r][e]===n?i.push(t[r]):(t[r][e]>n&&t[r-1][e]<n||t[r-1][e]>n&&t[r][e]<n)&&(i.push(t[r-1]),i.push(t[r])),!(i.length>0));r++);return i}});const oo=md.line,Bi=Cb.line,DE=_.X,fM=md.spline._calculateBezierPoints,Lh={},BT={},c0={_createBorderElement:oo._createMainElement,_createLegendState:function(n,e){return{fill:mi(n.color)||e,opacity:n.opacity,hatching:n.hatching,filter:n.highlight}},_getColorId:function(n){var e;return null===(e=n.color)||void 0===e?void 0:e.fillId},getValueRangeInitialValue:function(){return"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType&&!1!==this.showZero?0:tc.getValueRangeInitialValue.call(this)},_getDefaultSegment:function(n){const e=oo._getDefaultSegment(n);return e.area=e.line.concat(e.line.slice().reverse()),e},_updateElement:function(n,e,t,i){const r={points:e.line},m={points:e.area},A=n.line;t?(A&&A.animate(r),n.area.animate(m,{},i)):(A&&A.attr(r),n.area.attr(m))},_removeElement:function(n){n.line&&n.line.remove(),n.area.remove()},_drawElement:function(n){return{line:this._bordersGroup&&this._createBorderElement(n.line,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),area:this._createMainElement(n.area).append(this._elementsGroup)}},_applyStyle:function(n){this._elementsGroup&&this._elementsGroup.smartAttr(n.elements),this._bordersGroup&&this._bordersGroup.attr(n.border),(this._graphics||[]).forEach(function(e){e.line&&e.line.attr({"stroke-width":n.border["stroke-width"]}).sharp()})},_parseStyle:function(n,e,t){const i=n.border||{},r=oo._parseLineOptions(i,t);return r.stroke=i.visible&&r["stroke-width"]?r.stroke:"none",r["stroke-width"]=r["stroke-width"]||1,{border:r,elements:{stroke:"none",fill:mi(n.color)||e,hatching:n.hatching,opacity:n.opacity,filter:n.highlight??null}}},_areBordersVisible:function(){const n=this._options;return n.border.visible||n.hoverStyle.border.visible||n.selectionStyle.border.visible},_createMainElement:function(n,e){return this._renderer.path(n,"area").attr(e)},_getTrackerSettings:function(n){return{"stroke-width":n.singlePointSegment?this._defaultTrackerWidth:0}},_getMainPointsFromSegment:function(n){return n.area}},rm=Lh.area=DE({},oo,c0,{_prepareSegment(n,e){const t=this._processSinglePointsAreaSegment(n,e),i=function mM(n){return ui(n,function(e){return e.getCoords()}).concat(ui(n.slice().reverse(),function(e){return e.getCoords(!0)}))}(t),r=this.getArgumentAxis();if(r.getAxisPosition){const m=r.getAxisPosition(),A=r.getOptions(),V=(e?1:-1)*Math.round(A.width/2);A.visible&&i.forEach((X,ce)=>{if(X){const _e=1===n.length?0:ce<n.length?ce:i.length-1-ce;e&&X.x===n[_e].defaultX&&X.x===m-r.getAxisShift()&&(X.x+=V),!e&&X.y===n[_e].defaultY&&X.y===m-r.getAxisShift()&&(X.y+=V)}})}return{line:t,area:i,singlePointSegment:t!==n}},_processSinglePointsAreaSegment:function(n,e){if(n&&1===n.length){const t=n[0],i=(0,xe.o8)(t);return i[e?"y":"x"]+=1,i.argument=null,[t,i]}return n}});BT.area=DE({},Bi,c0,{_prepareSegment:function(n,e,t){return t&&Bi._closeSegment.call(this,n),rm._prepareSegment.call(this,n)},_processSinglePointsAreaSegment:function(n){return Cb.line._prepareSegment.call(this,n).line}}),Lh.steparea=DE({},rm,{_prepareSegment:function(n,e){const t=md.stepline;return n=rm._processSinglePointsAreaSegment(n,e),rm._prepareSegment.call(this,t._calculateStepLinePoints.call(this,n),e)},getSeriesPairCoord:md.stepline.getSeriesPairCoord}),Lh.splinearea=DE({},rm,{_areaPointsToSplineAreaPoints:function(n){const e=n[n.length/2-1],t=n[n.length/2];n.splice(n.length/2,0,{x:e.x,y:e.y},{x:t.x,y:t.y})},_prepareSegment:function(n,e){const t=rm._processSinglePointsAreaSegment(n,e),i=rm._prepareSegment.call(this,fM(t,e));return this._areaPointsToSplineAreaPoints(i.area),i.singlePointSegment=t!==n,i},_getDefaultSegment:function(n){const e=rm._getDefaultSegment(n);return this._areaPointsToSplineAreaPoints(e.area),e},_createMainElement:function(n,e){return this._renderer.path(n,"bezierarea").attr(e)},_createBorderElement:md.spline._createMainElement,getSeriesPairCoord:md.spline.getSeriesPairCoord,_getNearestPoints:md.spline._getNearestPoints,_getBezierPoints:md.spline._getBezierPoints,obtainCubicBezierTCoef:md.spline.obtainCubicBezierTCoef});const $C=Lh.area,h_=tc,AE=Ns,jC=_.X,bb=w.__,Av={},xb={},NT={_createLegendState:function(n,e){return{fill:mi(n.color)||e,hatching:n.hatching,filter:n.highlight}},_getColorId:$C._getColorId,_parsePointStyle:function(n,e,t){const i=mi(n.color)||e,r=h_._parsePointStyle.call(this,n,i,t);return r.fill=i,r.hatching=n.hatching,r.filter=n.highlight,r.dashStyle=n.border&&n.border.dashStyle||"solid",delete r.r,r},_applyMarkerClipRect:function(n){n["clip-path"]=null},_setGroupsSettings:function(n,e){let t={};h_._setGroupsSettings.apply(this,arguments),n&&e?t=this._getAffineCoordOptions():n||(t={scaleX:1,scaleY:1,translateX:0,translateY:0}),this._markersGroup.attr(t)},_drawPoint:function(n){n.hasAnimation=n.hasAnimation&&!n.firstDrawing,n.firstDrawing=!1,h_._drawPoint.call(this,n)},_getMainColor:function(){return this._options.mainSeriesColor},_createPointStyles:function(n){var e;const t=this,i=mi(n.color,!0)||t._getMainColor(),r=null===(e=n.color)||void 0===e?void 0:e.fillId,m=n.hoverStyle||{},A=n.selectionStyle||{};return r&&t._turnOffHatching(m,A),{labelColor:i,normal:t._parsePointStyle(n,i,i),hover:t._parsePointStyle(m,r||i,i),selection:t._parsePointStyle(A,r||i,i)}},_updatePointsVisibility:function(){const n=this._options.visible;(0,w.__)(this._points,function(e,t){t._options.visible=n})},_getOptionsForPoint:function(){return this._options},_animate:function(n){const e=this;e._animatePoints(n,function(){e._animateComplete()},function(t,i){const r=t.length-1;bb(t||[],function(m,A){A.animate(m===r?i:void 0,A.getMarkerCoords())})})},getValueRangeInitialValue:$C.getValueRangeInitialValue,_patchMarginOptions:function(n){var e;return n.checkInterval=!this.useAggregation()||(null===(e=this.getArgumentAxis())||void 0===e?void 0:e.aggregatedPointBetweenTicks()),n},_defaultAggregator:"sum",_defineDrawingState(){},usePointsToDefineAutoHiding:()=>!1};Av.bar=jC({},h_,NT,{_getAffineCoordOptions:function(){const n=this._options.rotated,t={scaleX:n?.001:1,scaleY:n?1:.001};return t["translate"+(n?"X":"Y")]=this.getValueAxis().getTranslator().translate("canvas_position_default"),t},_animatePoints:function(n,e,t){this._markersGroup.animate({scaleX:1,scaleY:1,translateY:0,translateX:0},void 0,e),n||t(this._drawnPoints,e)},checkSeriesViewportCoord(n,e){if(!h_.checkSeriesViewportCoord.call(this))return!1;if(n.isArgumentAxis)return!0;const t=n.getTranslator(),i=this.getViewport(),r=t.translate(i.categories?i.categories[0]:i.min),m=t.translate(i.categories?i.categories[i.categories.length-1]:i.max),A=this.getOptions().rotated,V=n.getOptions().inverted;return A&&!V||!A&&V?e>=r&&e<=m:e>=m&&e<=r},getSeriesPairCoord(n,e){let t=null;const{rotated:i}=this._options,r=!e&&!i||e&&i,m=r?"vy":"vx",A=r?"vx":"vy",V=this.getPoints();for(let X=0;X<V.length;X++){const ce=V[X];let _e;if(_e=e?ce.getCenterCoord()[m[1]]===n?ce[A]:void 0:ce[m]===n?ce[A]:void 0,this._checkAxisVisibleAreaCoord(!e,_e)){t=_e;break}}return t}}),xb.bar=jC({},AE,NT,{_animatePoints:function(n,e,t){t(this._drawnPoints,e)},_setGroupsSettings:h_._setGroupsSettings,_drawPoint:function(n,e,t){h_._drawPoint.call(this,n,e,t)},_parsePointStyle:function(n){const e=NT._parsePointStyle.apply(this,arguments);return e.opacity=n.opacity,e},_createGroups:h_._createGroups,_setMarkerGroupSettings:function(){const n=this._createPointStyles(this._getMarkerGroupOptions()).normal;n.class="dxc-markers",this._applyMarkerClipRect(n);const e=jC({},n);delete e.opacity,this._markersGroup.attr(e)},getSeriesPairCoord(n,e){let t=null;const i=e?"argument":"radius",r=this.getVisiblePoints(),m=this.getArgumentAxis(),A=m.getAngles()[0];for(let V=0;V<r.length;V++){const X=r[V],ce=(0,C.O9)(X[i])&&(0,C.O9)(n[i])&&X[i].valueOf()===n[i].valueOf()?lo(m.getCenter(),A,-m.getTranslatedAngle(X.angle),X.radius):void 0;if((0,C.O9)(ce)){t=ce;break}}return t},_createLegendState:$C._createLegendState});const FT=_.X,d0=Lh.area,Sb={},VT={areErrorBarsVisible:h.lQ,_createErrorBarGroup:h.lQ,_checkData:function(n,e){const t=this.getValueFields();return tc._checkData.call(this,n,e,{minValue:t[0],value:t[1]})&&n.minValue==n.minValue},getValueRangeInitialValue:tc.getValueRangeInitialValue,_getPointDataSelector:function(n){const e=this.getValueFields(),t=e[0],i=e[1],r=this.getTagField(),m=this.getArgumentField();return A=>({tag:A[r],minValue:this._processEmptyValue(A[t]),value:this._processEmptyValue(A[i]),argument:A[m],data:A})},_defaultAggregator:"range",_aggregators:{range(n,e){let{intervalStart:t,intervalEnd:i,data:r}=n;if(!r.length)return;const m=e.getValueFields(),A=m[0],V=m[1],X=r.reduce((ce,_e)=>{const Me=_e[A],Ve=_e[V];return!(0,C.O9)(Me)||!(0,C.O9)(Ve)||(ce[A]=Math.min(ce[A],Math.min(Me,Ve)),ce[V]=Math.max(ce[V],Math.max(Me,Ve))),ce},{[A]:1/0,[V]:-1/0,[e.getArgumentField()]:e._getIntervalCenter(t,i)});if(!isFinite(X[A])||!isFinite(X[V])){if(r.filter(ce=>null===ce[A]&&null===ce[V]).length!==r.length)return;X[A]=X[V]=null}return X}},getValueFields:function(){return[this._options.rangeValue1Field||"val1",this._options.rangeValue2Field||"val2"]},getSeriesPairCoord(n,e){let t=null;const{rotated:i}=this._options,r=!e&&!i||e&&i,m=r?"vy":"vx",A=i?"minX":"minY",V=r?"vx":"vy",X=this.getPoints();for(let ce=0;ce<X.length;ce++){const _e=X[ce];let Me;if(e)Me=_e.getCenterCoord()[m[1]]===n?_e[V]:void 0;else{const Ve=[Math.min(_e[m],_e[A]),Math.max(_e[m],_e[A])];Me=n>=Ve[0]&&n<=Ve[1]?_e[V]:void 0}if(this._checkAxisVisibleAreaCoord(!e,Me)){t=Me;break}}return t}};Sb.rangebar=FT({},Av.bar,VT),Sb.rangearea=FT({},d0,{_drawPoint:function(n){const e=n.point;e.isInVisibleArea()?(e.clearVisibility(),e.draw(this._renderer,n.groups),this._drawnPoints.push(e),e.visibleTopMarker||e.hideMarker("top"),e.visibleBottomMarker||e.hideMarker("bottom")):e.setInvisibility()},_prepareSegment:function(n,e){const t=this._processSinglePointsAreaSegment(n,e),i=ui(t,function(r){return r.getCoords(!0)});return{line:t,bottomLine:i,area:ui(t,function(r){return r.getCoords()}).concat(i.slice().reverse()),singlePointSegment:t!==n}},_getDefaultSegment:function(n){const e=d0._getDefaultSegment.call(this,n);return e.bottomLine=e.line,e},_removeElement:function(n){d0._removeElement.call(this,n),n.bottomLine&&n.bottomLine.remove()},_drawElement:function(n,e){const t=d0._drawElement.call(this,n,e);return t.bottomLine=this._bordersGroup&&this._createBorderElement(n.bottomLine,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),t},_applyStyle:function(n){const e=this._elementsGroup,t=this._bordersGroup;e&&e.smartAttr(n.elements),t&&t.attr(n.border),(this._graphics||[]).forEach(function(i){i.line&&i.line.attr({"stroke-width":n.border["stroke-width"]}),i.bottomLine&&i.bottomLine.attr({"stroke-width":n.border["stroke-width"]})})},_updateElement:function(n,e,t,i){const r={points:e.bottomLine},m=n.bottomLine;d0._updateElement.apply(this,arguments),m&&(t?m.animate(r):m.attr(r))}},VT);const da=Lh.area,u0=Av.bar,h0=xb.bar,IE=w.__,PE=h.lQ,Iv={};Iv.bubble=(0,_.X)({},tc,{_calculateErrorBars:PE,_getMainColor:u0._getMainColor,_createPointStyles:u0._createPointStyles,_updatePointsVisibility:u0._updatePointsVisibility,_getOptionsForPoint:u0._getOptionsForPoint,_applyMarkerClipRect:md.line._applyElementsClipRect,_parsePointStyle:h0._parsePointStyle,_createLegendState:da._createLegendState,_getColorId:da._getColorId,_setMarkerGroupSettings:h0._setMarkerGroupSettings,areErrorBarsVisible:PE,_createErrorBarGroup:PE,_checkData:function(n,e){return tc._checkData.call(this,n,e,{value:this.getValueFields()[0],size:this.getSizeField()})},_getPointDataSelector:function(n,e){const t=this.getSizeField(),i=tc._getPointDataSelector.call(this);return r=>{const m=i(r);return m.size=r[t],m}},_aggregators:{avg(n,e){let{data:t,intervalStart:i,intervalEnd:r}=n;if(!t.length)return;const m=e.getValueFields()[0],A=e.getSizeField(),V=t.reduce((X,ce)=>(X[0]+=ce[m],X[1]+=ce[A],X[2]++,X),[0,0,0]);return{[m]:V[0]/V[2],[A]:V[1]/V[2],[e.getArgumentField()]:e._getIntervalCenter(i,r)}}},getValueFields:function(){return[this._options.valueField||"val"]},getSizeField:function(){return this._options.sizeField||"size"},_animate:function(){const n=this,e=n._drawnPoints.length-1,t=n._labelsGroup,i=function(){t&&t.animate({opacity:1},{duration:n._defaultDuration})};IE(n._drawnPoints||[],function(r,m){m.animate(r===e?i:void 0,{r:m.bubbleSize,translateX:m.x,translateY:m.y})})},_patchMarginOptions:function(n){return n.processBubbleSize=!0,n}});const XC=tc,df=Av.bar,Ob=w.__,p0=h.lQ,RE=ui,_M=isFinite,HT=Math.max,Qc=(0,_.X)({},df,{_setGroupsSettings:function(){XC._setGroupsSettings.apply(this,arguments),this._labelsGroup.attr({"pointer-events":null})},_createErrorBarGroup:p0,_drawPoint:function(n){const e=n.point,t=this._legendCallback;XC._drawPoint.call(this,n),!e.isVisible()&&e.setInvisibility(),e.isSelected()&&t()},_getOldPoint:function(n,e,t){const i=(this._points||[])[t];return i&&(e[i.argument.valueOf()]=e[i.argument.valueOf()].filter(r=>r!==i)),i},adjustLabels:function(n){return(this._points||[]).reduce((e,t)=>{if(t._label.isVisible())return t.setLabelTrackerData(),e=t.applyWordWrap(n)||e,t.updateLabelCoord(n),e},!1)},_applyElementsClipRect:p0,getColor:p0,areErrorBarsVisible:p0,drawLabelsWOPoints:function(){return"inside"!==this._options.label.position&&(this._labelsGroup.append(this._extGroups.labelsGroup),(this._points||[]).forEach(function(n){n.drawLabel()}),!0)},getPointsCount:function(){return this._data.filter(n=>this._checkData(n)).length},setMaxPointsCount:function(n){this._pointsCount=n},_getCreatingPointOptions:function(n,e){return this._getPointOptions(n,e)},_updateOptions:function(n){this.labelSpace=0,this.innerRadius="pie"===this.type?0:n.innerRadius},_checkData:function(n,e){const t=df._checkData.call(this,n,e,{value:this.getValueFields()[0]});return this._options.paintNullPoints?t:t&&null!==n.value},_createGroups:XC._createGroups,_setMarkerGroupSettings:function(){this._markersGroup.attr({class:"dxc-markers"})},_getMainColor(n,e){const t=this.getPointsByArg(n.argument),i=e?t.indexOf(e):t.length;return this._options.mainSeriesColor(n.argument,i,this._pointsCount)},_getPointOptions:function(n){return this._parsePointOptions(this._preparePointOptions(),this._options.label,n)},_getRangeData:function(){return this._rangeData},_createPointStyles:function(n,e,t){var i;const r=this,m=mi(n.color,!0)||r._getMainColor(e,t),A=null===(i=n.color)||void 0===i?void 0:i.fillId,V=n.hoverStyle||{},X=n.selectionStyle||{};return A&&r._turnOffHatching(V,X),{labelColor:m,normal:r._parsePointStyle(n,m,m),hover:r._parsePointStyle(V,A||m,m),selection:r._parsePointStyle(X,A||m,m),legendStyles:{normal:r._createLegendState(n,m),hover:r._createLegendState(V,A||m),selection:r._createLegendState(X,A||m)}}},_getArrangeMinShownValue:function(n,e){const t=this._options.minSegmentSize;let i=0,r=0;return e=e||n.length,Ob(n,function(m,A){A.isVisible()&&(A.normalInitialValue<t*e/360?i+=t:r+=A.normalInitialValue)}),i<360?t*r/(360-i):0},_applyArrangeCorrection:function(n,e,t){const i=this._options,r="anticlockwise"!==i.segmentsDirection,m=_M(i.startAngle)?xo(i.startAngle):0,A=i.minSegmentSize;let V,X=0,ce=0;0===t&&(t=n.filter(function(_e){return _e.isVisible()}).length,ce=1),Ob(r?n:n.concat([]).reverse(),function(_e,Me){const Ve=Me.isVisible()?ce||Me.normalInitialValue:0;let Je;A&&Me.isVisible()&&Ve<e&&(Je=e),V=Ve/t,Me.correctValue(X,V,ce+(Je||0)),Me.shiftedAngle=m,X+=Je||Ve}),this._rangeData={val:{min:0,max:X}}},_removePoint:function(n){const e=this.getPointsByArg(n.argument);e.splice(e.indexOf(n),1),n.dispose()},arrangePoints:function(){const n=this,e=n._points||[],t=n._options.minSegmentSize;let i,r=!0,m=0;const A=e.length;for(;m<A&&r;)r=e[m].value<=0,m++;const V=n._points=RE(e,function(_e){return null===_e.value||!r&&_e.value<0?(n._removePoint(_e),null):_e}),X=V.reduce(function(_e,Me){return HT(_e,Math.abs(Me.initialValue))},0);V.forEach(function(_e){_e.normalInitialValue=_e.initialValue/(0!==X?X:1)});const ce=V.reduce(function(_e,Me){return _e+(Me.isVisible()?Me.normalInitialValue:0)},0);t&&(i=this._getArrangeMinShownValue(V,ce)),n._applyArrangeCorrection(V,i,ce)},correctPosition:function(n,e){Ob(this._points,function(t,i){i.correctPosition(n)}),this.setVisibleArea(e)},correctRadius:function(n){this._points.forEach(function(e){e.correctRadius(n)})},correctLabelRadius:function(n){this._points.forEach(function(e){e.correctLabelRadius(n)})},setVisibleArea:function(n){this._visibleArea={minX:n.left,maxX:n.width-n.right,minY:n.top,maxY:n.height-n.bottom}},_applyVisibleArea:p0,_animate:function(n){const e=this,t=e._points,i=t&&t.length,r=function(){e._animateComplete()};let m;m=n?function(A,V){A.animate(V===i-1?r:void 0,.7,(1-.7)*V/(i-1))}:function(A,V){A.animate(V===i-1?r:void 0)},t.forEach(m)},getVisiblePoints:function(){return RE(this._points,function(n){return n.isVisible()?n:null})},getPointsByKeys:function(n,e){const t=this.getPointsByArg(n);return t[e]&&[t[e]]||[]}}),uf=Qc,zT=Qc,Pv=Av.bar,wb=(0,_.X)({},tc,{_animate:h.lQ,_applyMarkerClipRect:function(n){n["clip-path"]=this._forceClipping?this._paneClipRectID:this._widePaneClipRectID},_updatePointsVisibility:Pv._updatePointsVisibility,_getOptionsForPoint:Pv._getOptionsForPoint,_createErrorBarGroup:h.lQ,areErrorBarsVisible:h.lQ,_createGroups:tc._createGroups,_setMarkerGroupSettings:function(){const n=this._markersGroup,e=this._createPointStyles(this._getMarkerGroupOptions()),t=(0,_.X)(e.normal,{class:"default-markers"}),i=(0,_.X)(e.positive.normal,{class:"default-positive-markers"}),r=(0,_.X)(e.reduction.normal,{class:"reduction-markers"}),m=(0,_.X)(e.reductionPositive.normal,{class:"reduction-positive-markers"}),A={class:"dxc-markers"};this._applyMarkerClipRect(A),n.attr(A),this._createGroup("defaultMarkersGroup",n,n,t),this._createGroup("reductionMarkersGroup",n,n,r),this._createGroup("defaultPositiveMarkersGroup",n,n,i),this._createGroup("reductionPositiveMarkersGroup",n,n,m)},_setGroupsSettings:function(){tc._setGroupsSettings.call(this,!1)},_getCreatingPointOptions:function(){let e,t=this._predefinedPointOptions;return t||(e=this._getPointOptions(),this._predefinedPointOptions=t=(0,_.X)(!0,{styles:{}},e),t.styles.normal=t.styles.positive.normal=t.styles.reduction.normal=t.styles.reductionPositive.normal={"stroke-width":e.styles&&e.styles.normal&&e.styles.normal["stroke-width"]}),t},_checkData:function(n,e){const t=this.getValueFields();return tc._checkData.call(this,n,e,{openValue:t[0],highValue:t[1],lowValue:t[2],closeValue:t[3]})&&n.highValue==n.highValue&&n.lowValue==n.lowValue},_getPointDataSelector:function(n,e){const t=this;let i;const r=t.getValueFields(),m=t.getArgumentField(),A=r[0],V=r[1],X=r[2],ce=r[3];switch(t.level=t._options.reduction.level,Wi(t.level)){case"open":i=A;break;case"high":i=V;break;case"low":i=X;break;default:i=ce,t.level="close"}let _e;return Me=>{const Ve=Me[i];let Je=!1;return(0,C.O9)(Ve)&&((0,C.O9)(_e)&&(Je=Ve<_e),_e=Ve),{argument:Me[m],highValue:this._processEmptyValue(Me[V]),lowValue:this._processEmptyValue(Me[X]),closeValue:this._processEmptyValue(Me[ce]),openValue:this._processEmptyValue(Me[A]),reductionValue:Ve,tag:Me[t.getTagField()],isReduction:Je,data:Me}}},_parsePointStyle:function(n,e,t){const i=mi(n.color,!0);return{stroke:i||e,"stroke-width":n.width,fill:i||t}},_getDefaultStyle:function(n){const e=mi(n.color,!0)||this._options.mainSeriesColor;return{normal:this._parsePointStyle(n,e,e),hover:this._parsePointStyle(n.hoverStyle,e,e),selection:this._parsePointStyle(n.selectionStyle,e,e)}},_getReductionStyle:function(n){const e=n.reduction.color;return{normal:this._parsePointStyle({color:e,width:n.width,hatching:n.hatching},e,e),hover:this._parsePointStyle(n.hoverStyle,e,e),selection:this._parsePointStyle(n.selectionStyle,e,e)}},_createPointStyles:function(n){const e=this._options.innerColor,t=this._getDefaultStyle(n),i=(0,_.X)(!0,{},t),r=this._getReductionStyle(n),m=(0,_.X)(!0,{},r);return i.normal.fill=i.hover.fill=i.selection.fill=e,m.normal.fill=m.hover.fill=m.selection.fill=e,t.positive=i,t.reduction=r,t.reductionPositive=m,t.labelColor=this._options.mainSeriesColor,t},_endUpdateData:function(){delete this._predefinedPointOptions},_defaultAggregator:"ohlc",_aggregators:{ohlc:(n,e)=>{let{intervalStart:t,intervalEnd:i,data:r}=n;if(!r.length)return;let m={};const A=e.getValueFields(),V=A[1],X=A[2];return m[V]=-1/0,m[X]=1/0,m=r.reduce(function(ce,_e){return null!==_e[V]&&(ce[V]=Math.max(ce[V],_e[V])),null!==_e[X]&&(ce[X]=Math.min(ce[X],_e[X])),ce},m),m[A[0]]=r[0][A[0]],m[A[3]]=r[r.length-1][A[3]],isFinite(m[V])||(m[V]=null),isFinite(m[X])||(m[X]=null),m[e.getArgumentField()]=e._getIntervalCenter(t,i),m}},getValueFields:function(){const n=this._options;return[n.openValueField||"open",n.highValueField||"high",n.lowValueField||"low",n.closeValueField||"close"]},getArgumentField:function(){return this._options.argumentField||"date"},_patchMarginOptions:function(n){const t=this._getCreatingPointOptions().styles,i=[t.normal,t.hover,t.selection].reduce(function(r,m){return Math.max(r,m["stroke-width"])},0);return n.size=10+i,n.sizePointNormalState=10,n},getSeriesPairCoord(n,e){let t=null;const i=this.getVisiblePoints();for(let r=0;r<i.length;r++){const m=i[r];let A;if(e)A=m.vx===n?(m.openY+m.closeY)/2:void 0;else{const V=[Math.min(m.lowY,m.highY),Math.max(m.lowY,m.highY)];A=n>=V[0]&&n<=V[1]?m.vx:void 0}if(this._checkAxisVisibleAreaCoord(!e,A)){t=A;break}}return t},usePointsToDefineAutoHiding:()=>!1}),sm=(0,_.X)({},wb,{_parsePointStyle:function(n,e,t){const i=mi(n.color,!0)||t,r=wb._parsePointStyle.call(this,n,e,i);return r.fill=i,r.hatching=n.hatching,r}}),p_=Lh.area,LE=Av.bar,dh={_calculateErrorBars:h.lQ,_updateOptions:function(n){this._stackName="axis_"+(n.axis||"default")}},zu={},CM={};zu.stackedline=(0,_.X)({},md.line,dh,{}),zu.stackedspline=(0,_.X)({},md.spline,dh,{}),zu.fullstackedline=(0,_.X)({},md.line,dh,{getValueRangeInitialValue:Lh.area.getValueRangeInitialValue}),zu.fullstackedspline=(0,_.X)({},md.spline,dh,{getValueRangeInitialValue:Lh.area.getValueRangeInitialValue});const Bh=zu.stackedbar=(0,_.X)({},LE,dh,{_updateOptions:function(n){dh._updateOptions.call(this,n),this._stackName=this._stackName+"_stack_"+(n.stack||"default")}});function GT(n,e,t,i){return(n=(0,xe.o8)(n)).value=e,n.minValue=t,n.translate(),n.argument=n.argument+i,n}function yM(n){let t,e=0;const i=[];let r;const m=n.length;for(;e<m;)t=n[e],r=[t],t.leftHole&&(r=[GT(t,t.leftHole,t.minLeftHole,"left"),t]),t.rightHole&&r.push(GT(t,t.rightHole,t.minRightHole,"right")),i.push(r),e++;return[].concat.apply([],i)}zu.fullstackedbar=(0,_.X)({},LE,dh,{_updateOptions:Bh._updateOptions}),zu.stackedarea=(0,_.X)({},p_,dh,{_prepareSegment:function(n,e){return p_._prepareSegment.call(this,yM(n),e)},_appendInGroup:function(){this._group.append(this._extGroups.seriesGroup).toBackground()}}),zu.stackedsplinearea=(0,_.X)({},Lh.splinearea,dh,{_prepareSegment:function(n,e){const t=this;let i;if(n=yM(n),this._prevSeries&&1!==n.length){const r=md.spline._calculateBezierPoints(n,e);let m=ui(n,function(_e){const Me=_e.getCoords(!0);return Me.argument=_e.argument,Me}),A=[];const V={};let X=0;const ce=t._prevSeries._segments.length;for(;X<ce;)A=A.concat(t._prevSeries._segments[X].line),X++;(0,w.__)(A,function(_e,Me){if(null!==Me.argument){const Ve=Me.argument.valueOf();V[Ve]?V[Ve].push(Me):V[Ve]=[Me]}}),t._prevSeries._segmentByArg=V,m=md.spline._calculateBezierPoints(m,e),(0,w.__)(m,function(_e,Me){const Ve=Me.argument.valueOf();let Je;_e%3==0&&(Je=V[Ve]||function KV(n,e){let t;for(;!t&&n;)t=n._segmentByArg&&n._segmentByArg[e],n=n._prevSeries;return t}(t._prevSeries,Ve),Je&&(m[_e-1]&&Je[0]&&(m[_e-1]=Je[0]),m[_e+1]&&(m[_e+1]=Je[2]||Me)))}),i={line:r,area:r.concat(m.reverse())},t._areaPointsToSplineAreaPoints(i.area)}else i=Lh.splinearea._prepareSegment.call(this,n,e);return i},_appendInGroup:zu.stackedarea._appendInGroup}),zu.fullstackedarea=(0,_.X)({},p_,dh,{_prepareSegment:zu.stackedarea._prepareSegment,_appendInGroup:zu.stackedarea._appendInGroup}),zu.fullstackedsplinearea=(0,_.X)({},Lh.splinearea,dh,{_prepareSegment:zu.stackedsplinearea._prepareSegment,_appendInGroup:zu.stackedarea._appendInGroup}),CM.stackedbar=(0,_.X)({},xb.bar,dh,{_updateOptions:function(n){dh._updateOptions.call(this,n),this._stackName=this._stackName+"_stack_"+(n.stack||"default")}});const Nh={},_p=Te.states,Dc="discrete",Mv=_p.selectedMark,gu=_p.hoverMark,fu=_p.hover,g0=_p.normal,vp=_p.selection,Rv=_p.applySelected,YC=_p.applyHover,BE=_p.resetItem,Gu="pointHover",m0="seriesSelect",QC="pointSelect",Db="pointDeselect";function uh(n,e,t){n&&n.trigger(e,t)}function hh(n){return"includepoints"===(n=Wi(n))||"allseriespoints"===n}function lm(n,e){const t=(0,_.X)({},n,e);return t.border=(0,_.X)({},n&&n.border,e&&e.border),t}function Hc(n,e){this.fullState=0,this._extGroups=n,this._renderer=n.renderer,this._group=n.renderer.g().attr({class:"dxc-series"}),this._eventTrigger=n.eventTrigger,this._eventPipe=n.eventPipe,this._incidentOccurred=n.incidentOccurred,this._legendCallback=h.lQ,this.updateOptions(e,n)}function cm(n){return n.data}function VE(n,e){return e&&"logarithmic"===n&&!1===e.getOptions().allowNegatives?t=>t>0:()=>!0}Nh.mixins={chart:{},pie:{},polar:{}},Nh.mixins.chart.scatter=tc,Nh.mixins.polar.scatter=Ns,(0,_.X)(Nh.mixins.pie,o),(0,_.X)(Nh.mixins.chart,md,Lh,Av,Sb,Iv,P,zu),(0,_.X)(Nh.mixins.polar,Cb,BT,xb,CM),Hc.prototype={constructor:Hc,_createLegendState:h.lQ,getLegendStyles:function(){return this._styles.legendStyles},_createStyles:function(n){const e=this,t=n.mainSeriesColor,i=this._getColorId(n),r=n.hoverStyle||{},m=n.selectionStyle||{};i&&e._turnOffHatching(r,m),e._styles={labelColor:t,normal:e._parseStyle(n,t,t),hover:e._parseStyle(r,i||t,t),selection:e._parseStyle(m,i||t,t),legendStyles:{normal:e._createLegendState(n,i||t),hover:e._createLegendState(r,i||t),selection:e._createLegendState(m,i||t)}}},setClippingParams(n,e,t){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._paneClipRectID=n,this._widePaneClipRectID=e,this._forceClipping=t,this._clipLabels=i},applyClip:function(){this._group.attr({"clip-path":this._paneClipRectID})},resetClip:function(){this._group.attr({"clip-path":null})},getTagField:function(){return this._options.tagField||"tag"},getValueFields:h.lQ,getSizeField:h.lQ,getArgumentField:h.lQ,getPoints:function(){return this._points},getPointsInViewPort:function(){return tm.getPointsInViewPort(this)},_createPoint:function(n,e,t){n.index=e;const i=this,r=i.pointsByArgument,m=i._getCreatingPointOptions(n),A=n.argument.valueOf();let V=t;V?V.update(n,m):(V=new PT(i,n,m),i.isSelected()&&hh(i.lastSelectionMode)&&V.setView(vp));const X=r[A];return X?X.push(V):r[A]=[V],V.hasValue()&&i.customizePoint(V,n),V},getRangeData:function(){return this._visible?this._getRangeData():{arg:{},val:{}}},getArgumentRange:function(){return this._visible?tm.getArgumentRange(this):{arg:{},val:{}}},getViewport:function(){return tm.getViewport(this)},_deleteGroup:function(n){const e=this[n];e&&(e.dispose(),this[n]=null)},updateOptions(n,e){const t=this,i=n.widgetType,r=t.type,m=n.type;if(t.type=m&&Wi(m.toString()),!t._checkType(i)||t._checkPolarBarType(i,n))return t.dispose(),void(t.isUpdated=!1);r!==t.type?(t._firstDrawing=!0,t._resetType(r,i),t._setType(t.type,i)):t._defineDrawingState(),t._options=n,t._pointOptions=null,t.name=n.name,t.pane=n.pane,t.tag=n.tag,e&&(t._seriesModes=e.commonSeriesModes||t._seriesModes,t._valueAxis=e.valueAxis||t._valueAxis,t.axis=t._valueAxis&&t._valueAxis.name,t._argumentAxis=e.argumentAxis||t._argumentAxis),t._createStyles(n),t._stackName=null,t._updateOptions(n),t._visible=n.visible,t.isUpdated=!0,t.stack=n.stack,t.barOverlapGroup=n.barOverlapGroup,t._createGroups(),t._processEmptyValue=n.ignoreEmptyPoints?A=>null===A?void 0:A:A=>A},_defineDrawingState(){this._firstDrawing=!0},_disposePoints:function(n){(0,w.__)(n||[],function(e,t){t.dispose()})},updateDataType:function(n){return this.argumentType=n.argumentType,this.valueType=n.valueType,this.argumentAxisType=n.argumentAxisType,this.valueAxisType=n.valueAxisType,this.showZero=n.showZero,this._argumentChecker=VE(n.argumentAxisType,this.getArgumentAxis()),this._valueChecker=VE(n.valueAxisType,this.getValueAxis()),this},_argumentChecker:function(){return!0},_valueChecker:function(){return!0},getOptions:function(){return this._options},_getOldPoint:function(n,e,t){const i=n.argument&&n.argument.valueOf(),r=(e[i]||[])[0];return r&&e[i].splice(0,1),r},updateData:function(n){const e=this,t=e._options,i=t.nameField;(n=n||[]).length&&(e._canRenderCompleteHandle=!0);const r=this._getPointDataSelector();let m=0;e._data=n.reduce((A,V,X)=>{const ce=r(V);return(0,C.O9)(ce.argument)?(!i||V[i]===t.nameFieldValue)&&(ce.index=X,A.push(ce)):m++,A},[]),m&&m===n.length&&e._incidentOccurred("W2002",[e.name,e.getArgumentField()]),e._endUpdateData()},_getData(){let n=this._data||[];if(this.useAggregation()){const e=this.argumentAxisType!==Dc?this.getArgumentRange():{},t=this.getArgumentAxis().getAggregationInfo(this._useAllAggregatedPoints,e);n=this._resample(t,n)}return n},useAggregation:function(){const n=this.getOptions().aggregation;return n&&n.enabled},autoHidePointMarkersEnabled:h.lQ,usePointsToDefineAutoHiding:h.lQ,createPoints(n){this._normalizeUsingAllAggregatedPoints(n),this._createPoints()},_normalizeUsingAllAggregatedPoints:function(n){this._useAllAggregatedPoints=this.useAggregation()&&(this.argumentAxisType===Dc||(this._data||[]).length>1&&!!n)},_createPoints:function(){const n=this,e=n.pointsByArgument||{},t=n._getData();n.pointsByArgument={},n._calculateErrorBars(t);const i={},r=t.reduce((m,A)=>{if(n._checkData(A,i)){const V=m.length,X=n._getOldPoint(A,e,V),ce=n._createPoint(A,V,X);m.push(ce)}return m},[]);for(const m in i)i[m]===t.length&&n._incidentOccurred("W2002",[n.name,m]);Object.keys(e).forEach(m=>n._disposePoints(e[m])),n._points=r},_removeOldSegments:function(){const n=this,e=n._segments.length;(0,w.__)(n._graphics.splice(e,n._graphics.length)||[],function(t,i){n._removeElement(i)}),n._trackers&&(0,w.__)(n._trackers.splice(e,n._trackers.length)||[],function(t,i){i.remove()})},_prepareSegmentsPosition(){const n=this._points||[],e=n[0]&&n[0].hasValue()&&this._options.closed,t=n.reduce(function(i,r){const m=i.at(-1);return r.translated||r.setDefaultCoords(),r.hasValue()&&r.hasCoords()?m.push(r):!r.hasValue()&&m.length&&i.push([]),i},[[]]);this._drawSegments(t,e,!1)},_drawElements(n,e){const t=this,i=t._points||[],r=i[0]&&i[0].hasValue()&&t._options.closed,m={markers:t._markersGroup,errorBars:t._errorBarGroup};t._drawnPoints=[],t._graphics=t._graphics||[],t._segments=[];const A=i.reduce(function(V,X){const ce=V.at(-1);return X.hasValue()&&X.hasCoords()?(t._drawPoint({point:X,groups:m,hasAnimation:n,firstDrawing:e}),ce.push(X)):X.hasValue()?X.setInvisibility():ce.length&&V.push([]),V},[[]]);t._drawSegments(A,r,n),t._firstDrawing=!i.length,t._removeOldSegments(),n&&t._animate(e)},_drawSegments(n,e,t){n.forEach((i,r)=>{i.length&&this._drawSegment(i,t,r,e&&r===n.length-1)})},draw(n,e,t){const i=this,r=i._firstDrawing;i._legendCallback=t||i._legendCallback,i._visible?(i._appendInGroup(),i._isAllPointsTranslated||i.prepareCoordinatesForPoints(),i._setGroupsSettings(n,r),!r&&!i._resetApplyingAnimation&&i._prepareSegmentsPosition(),i._drawElements(n,r),e&&i.hideLabels(),i.isSelected()?i._changeStyle(i.lastSelectionMode,void 0,!0):i.isHovered()?i._changeStyle(i.lastHoverMode,void 0,!0):i._applyStyle(i._styles.normal),i._isAllPointsTranslated=!1,i._resetApplyingAnimation=!1):i._group.remove()},_translatePoints(){(this._points??[]).forEach(e=>{e.translate()})},prepareCoordinatesForPoints(){this._applyVisibleArea(),this._translatePoints(),this._isAllPointsTranslated=!0},_setLabelGroupSettings:function(n){const e={class:"dxc-labels","pointer-events":"none"};this._clipLabels&&this._applyElementsClipRect(e),this._applyClearingSettings(e),n&&(e.opacity=.001),this._labelsGroup.attr(e).append(this._extGroups.labelsGroup)},_checkType:function(n){return!!Nh.mixins[n][this.type]},_checkPolarBarType:function(n,e){return"polar"===n&&e.spiderWidget&&-1!==this.type.indexOf("bar")},_resetType:function(n,e){let t,i;if(n)for(t in i=Nh.mixins[e][n],i)delete this[t]},_setType:function(n,e){let t;const i=Nh.mixins[e][n];for(t in i)this[t]=i[t]},_setPointsView:function(n,e){this.getPoints().forEach(function(t){e!==t&&t.setView(n)})},_resetPointsView:function(n,e){this.getPoints().forEach(function(t){e!==t&&t.resetView(n)})},_resetNearestPoint:function(){this._nearestPoint&&null!==this._nearestPoint.series&&this._nearestPoint.resetView(fu),this._nearestPoint=null},_setSelectedState:function(n){const e=this;e.lastSelectionMode=Wi(n||e._options.selectionMode),e.fullState=e.fullState|Mv,e._resetNearestPoint(),e._changeStyle(e.lastSelectionMode),"none"!==e.lastSelectionMode&&e.isHovered()&&hh(e.lastHoverMode)&&e._resetPointsView(fu)},_releaseSelectedState:function(){const n=this;n.fullState=n.fullState&~Mv,n._changeStyle(n.lastSelectionMode,vp),"none"!==n.lastSelectionMode&&n.isHovered()&&hh(n.lastHoverMode)&&n._setPointsView(fu)},isFullStackedSeries:function(){return 0===this.type.indexOf("fullstacked")},isStackedSeries:function(){return 0===this.type.indexOf("stacked")},resetApplyingAnimation:function(n){this._resetApplyingAnimation=!0,n&&(this._firstDrawing=!0)},isFinancialSeries:function(){return"stock"===this.type||"candlestick"===this.type},_canChangeView:function(){return!this.isSelected()&&"none"!==Wi(this._options.hoverMode)},_changeStyle:function(n,e,t){const i=this;let r=i.fullState;const m=[g0,fu,vp,vp];"none"===i.lastHoverMode&&(r&=~gu),"none"===i.lastSelectionMode&&(r&=~Mv),hh(n)&&!t&&(e?i._resetPointsView(e):i._setPointsView(m[r])),i._legendCallback([BE,YC,Rv,Rv][r]),i._applyStyle(i._styles[m[r]])},updateHover:function(n,e){const t=this,i=t._nearestPoint,r=t.isHovered()&&"nearestpoint"===t.lastHoverMode&&t.getNeighborPoint(n,e);r!==i&&(!t.isSelected()||"none"===t.lastSelectionMode)&&(t._resetNearestPoint(),r&&(r.setView(fu),t._nearestPoint=r))},_getMainAxisName:function(){return this._options.rotated?"X":"Y"},areLabelsVisible:function(){return!(0,C.O9)(this._options.maxLabelCount)||this._points.length<=this._options.maxLabelCount},getLabelVisibility:function(){return this.areLabelsVisible()&&this._options.label&&this._options.label.visible},customizePoint:function(n,e){const t=this,i=t._options,r=i.customizePoint;let m,A,V,X;const ce=i.customizeLabel;let _e,Me;ce&&ce.call&&(m=(0,_.X)({seriesName:t.name},e),m.series=t,V=ce.call(m,m),_e=V&&!(0,C.RI)(V),V=_e?(0,_.X)(!0,{},i.label,V):null),r&&r.call&&(m=m||(0,_.X)({seriesName:t.name},e),m.series=t,X=r.call(m,m),Me=X&&!(0,C.RI)(X)),(_e||Me)&&(A=t._parsePointOptions(t._preparePointOptions(X),V||i.label,e,n),A.styles.useLabelCustomOptions=_e,A.styles.usePointCustomOptions=Me,n.updateOptions(A))},show:function(){this._visible||this._changeVisibility(!0)},hide:function(){this._visible&&this._changeVisibility(!1)},_changeVisibility:function(n){this._visible=this._options.visible=n,this._updatePointsVisibility(),this.hidePointTooltip(),this._options.visibilityChanged(this)},_updatePointsVisibility:h.lQ,hideLabels:function(){(0,w.__)(this._points,function(n,e){e._label.draw(!1)})},_turnOffHatching(n,e){n.hatching&&(n.hatching.direction="none"),e.hatching&&(e.hatching.direction="none")},_parsePointOptions:function(n,e,t,i){const r=this._options,m=this._createPointStyles(n,t,i),A=(0,_.X)({},n,{type:r.type,rotated:r.rotated,styles:m,widgetType:r.widgetType,visibilityChanged:r.visibilityChanged});return A.label=function pf(n,e){const t=n||{},i=(0,_.X)({},t.font)||{},r=t.border||{},m=t.connector||{},A={fill:t.backgroundColor||e,"stroke-width":r.visible&&r.width||0,stroke:r.visible&&r.width?r.color:"none",dashStyle:r.dashStyle},V={stroke:m.visible&&m.width?m.color||e:"none","stroke-width":m.visible&&m.width||0};return i.color="none"===t.backgroundColor&&"#ffffff"===Wi(i.color)&&"inside"!==t.position?e:i.color,{alignment:t.alignment,format:t.format,argumentFormat:t.argumentFormat,customizeText:(0,C.Tn)(t.customizeText)?t.customizeText:void 0,attributes:{font:i},visible:0!==i.size&&t.visible,showForZeroValues:t.showForZeroValues,horizontalOffset:t.horizontalOffset,verticalOffset:t.verticalOffset,radialOffset:t.radialOffset,background:A,position:t.position,connector:V,rotationAngle:t.rotationAngle,wordWrap:t.wordWrap,textOverflow:t.textOverflow,cssClass:t.cssClass,displayFormat:t.displayFormat}}(e,m.labelColor),this.areErrorBarsVisible()&&(A.errorBars=r.valueErrorBar),A},_preparePointOptions:function(n){const e=this._getOptionsForPoint();return n?function g_(n,e){const t=lm(n,e);return t.image=(0,_.X)(!0,{},n.image,e.image),t.selectionStyle=lm(n.selectionStyle,e.selectionStyle),t.hoverStyle=lm(n.hoverStyle,e.hoverStyle),t}(e,n):e},_getMarkerGroupOptions:function(){return(0,_.X)(!1,{},this._getOptionsForPoint(),{hoverStyle:{},selectionStyle:{}})},_getAggregationMethod:function(n,e){const t=this.getOptions().aggregation,i=Wi(t.method);let m;return m=n&&!e?A=>{let{data:V}=A;return V[0]}:this._aggregators[i]||this._aggregators[this._defaultAggregator],"custom"===i&&t.calculate||m},_resample(n,e){let{interval:t,ticks:i,aggregateByCategory:r}=n;const m=this,A=m.argumentAxisType===Dc||m.valueAxisType===Dc;let V=0;const X=this._getPointDataSelector(),ce=m.getOptions(),_e=(Je,rt,Ct)=>{if(!rt)return;const Xt=On=>{const Fn=On&&X(On,ce);Fn&&m._checkData(Fn)&&(Fn.aggregationInfo=Ct,Je.push(Fn))};Array.isArray(rt)?rt.forEach(Xt):Xt(rt)},Me=this._getAggregationMethod(A,r);if(A){if(r){const Je=this.getArgumentAxis().getTranslator().getBusinessRange().categories,rt=Je.reduce((Ct,Xt)=>(Ct[Xt.valueOf()]=[],Ct),{});return e.forEach(Ct=>{rt[Ct.argument.valueOf()].push(Ct)}),Je.reduce((Ct,Xt)=>(_e(Ct,Me({aggregationInterval:null,intervalStart:Xt,intervalEnd:Xt,data:rt[Xt.valueOf()].map(cm)},m)),Ct),[])}return e.reduce((Je,rt,Ct,Xt)=>{if(Je[1].push(rt),Ct===Xt.length-1||(Ct+1)%t==0){const Fn={aggregationInterval:t,data:Je[1].map(cm)};_e(Je[0],Me(Fn,m)),Je[1]=[]}return Je},[[],[]])[0]}const Ve=[];if(1===i.length){const Je={intervalStart:i[0],intervalEnd:i[0],aggregationInterval:null,data:e.map(cm)};_e(Ve,Me(Je,m),Je)}else for(let Je=1;Je<i.length;Je++){const rt=i[Je],Ct=i[Je-1],Xt=[];for(;e[V]&&e[V].argument<rt;)e[V].argument>=Ct&&Xt.push(e[V]),V++;const On={intervalStart:Ct,intervalEnd:rt,aggregationInterval:t,data:Xt.map(cm)};_e(Ve,Me(On,m),On)}return m._endUpdateData(),Ve},canRenderCompleteHandle:function(){const n=this._canRenderCompleteHandle;return delete this._canRenderCompleteHandle,!!n},isHovered:function(){return!!(1&this.fullState)},isSelected:function(){return!!(2&this.fullState)},isVisible:function(){return this._visible},getAllPoints:function(){return this._createAllAggregatedPoints(),(this._points||[]).slice()},getPointByPos:function(n){return this._createAllAggregatedPoints(),(this._points||[])[n]},getVisiblePoints:function(){return(this._drawnPoints||[]).slice()},selectPoint:function(n){n.isSelected()||(function bM(n,e){n.fullState|=Mv,n.applyView(e)}(n,this._legendCallback),this._eventPipe({action:QC,target:n}),this._eventTrigger("pointSelectionChanged",{target:n}))},deselectPoint:function(n){n.isSelected()&&(function XV(n,e){n.fullState&=~Mv,n.applyView(e)}(n,this._legendCallback),this._eventPipe({action:Db,target:n}),this._eventTrigger("pointSelectionChanged",{target:n}))},hover:function(n){const e=this._eventTrigger;this.isHovered()||(this.lastHoverMode=Wi(n||this._options.hoverMode),this.fullState=this.fullState|gu,this._changeStyle(this.lastHoverMode,void 0,this.isSelected()&&"none"!==this.lastSelectionMode),e("seriesHoverChanged",{target:this}))},clearHover:function(){const n=this._eventTrigger;this.isHovered()&&(this._resetNearestPoint(),this.fullState=this.fullState&~gu,this._changeStyle(this.lastHoverMode,fu,this.isSelected()&&"none"!==this.lastSelectionMode),n("seriesHoverChanged",{target:this}))},hoverPoint:function(n){const e=this;n.isHovered()||(n.clearHover(),function XL(n,e){n.fullState|=gu,n.applyView(e)}(n,e._legendCallback),e._canChangeView()&&e._applyStyle(e._styles.hover),e._eventPipe({action:Gu,target:n}),e._eventTrigger("pointHoverChanged",{target:n}))},clearPointHover:function(){const n=this;n.getPoints().some(function(e){return!!e.isHovered()&&(function jT(n,e){n.fullState&=~gu,n.applyView(e),n.releaseHoverState()}(e,n._legendCallback),n._canChangeView()&&n._applyStyle(n._styles.normal),n._eventPipe({action:"clearPointHover",target:e}),n._eventTrigger("pointHoverChanged",{target:e}),!0)})},showPointTooltip:function(n){uh(this._extGroups.seriesGroup,"showpointtooltip",n)},hidePointTooltip:function(n){uh(this._extGroups.seriesGroup,"hidepointtooltip",n)},select:function(){const n=this;n.isSelected()||(n._setSelectedState(n._options.selectionMode),n._eventPipe({action:m0,target:n}),n._group.toForeground(),n._eventTrigger("seriesSelectionChanged",{target:n}))},clearSelection:function(){const n=this;n.isSelected()&&(n._releaseSelectedState(),n._eventTrigger("seriesSelectionChanged",{target:n}))},getPointsByArg:function(n,e){const t=this,i=n.valueOf();let r=t.pointsByArgument[i];return!r&&!e&&t._createAllAggregatedPoints()&&(r=t.pointsByArgument[i]),r||[]},_createAllAggregatedPoints:function(){return!(!this.useAggregation()||this._useAllAggregatedPoints||(this.createPoints(!0),0))},getPointsByKeys:function(n){return this.getPointsByArg(n)},notify:function(n){const e=this,t=n.action,i=e._seriesModes,r=n.target,m=r.getOptions(),A=Wi(m.hoverMode),V=Wi(m.selectionMode);t===Gu?e._hoverPointHandler(r,A,n.notifyLegend):"clearPointHover"===t?e._clearPointHoverHandler(r,A,n.notifyLegend):t===m0?r!==e&&"single"===i.seriesSelectionMode&&e.clearSelection():t===QC?("single"===i.pointSelectionMode&&e.getPoints().some(function(X){return!(X===r||!X.isSelected()||(e.deselectPoint(X),0))}),e._selectPointHandler(r,V)):t===Db&&e._deselectPointHandler(r,V)},_selectPointHandler:function(n,e){const t=this;"allseriespoints"===e?n.series===t&&t._setPointsView(vp,n):"allargumentpoints"===e&&t.getPointsByKeys(n.argument,n.argumentIndex).forEach(function(i){i!==n&&i.setView(vp)})},_deselectPointHandler:function(n,e){"allseriespoints"===e?n.series===this&&this._resetPointsView(vp,n):"allargumentpoints"===e&&this.getPointsByKeys(n.argument,n.argumentIndex).forEach(function(t){t!==n&&t.resetView(vp)})},_hoverPointHandler:function(n,e,t){const i=this;n.series!==i&&"allargumentpoints"===e?(i.getPointsByKeys(n.argument,n.argumentIndex).forEach(function(r){r.setView(fu)}),t&&i._legendCallback(n)):"allseriespoints"===e&&n.series===i&&i._setPointsView(fu,n)},_clearPointHoverHandler:function(n,e,t){const i=this;"allargumentpoints"===e?(n.series!==i&&i.getPointsByKeys(n.argument,n.argumentIndex).forEach(function(r){r.resetView(fu)}),t&&i._legendCallback(n)):"allseriespoints"===e&&n.series===i&&i._resetPointsView(fu,n)},_deletePoints:function(){this._disposePoints(this._points),this._points=this._drawnPoints=null},_deleteTrackers:function(){(0,w.__)(this._trackers||[],function(n,e){e.remove()}),this._trackersGroup&&this._trackersGroup.dispose(),this._trackers=this._trackersGroup=null},dispose:function(){this._deletePoints(),this._group.dispose(),this._labelsGroup&&this._labelsGroup.dispose(),this._errorBarGroup&&this._errorBarGroup.dispose(),this._deleteTrackers(),this._group=this._extGroups=this._markersGroup=this._elementsGroup=this._bordersGroup=this._labelsGroup=this._errorBarGroup=this._graphics=this._rangeData=this._renderer=this._styles=this._options=this._pointOptions=this._drawnPoints=this.pointsByArgument=this._segments=this._prevSeries=null},correctPosition:h.lQ,drawTrackers:h.lQ,getNeighborPoint:h.lQ,areErrorBarsVisible:h.lQ,_getColorId:h.lQ,getMarginOptions:function(){return this._patchMarginOptions({percentStick:this.isFullStackedSeries()})},getColor:function(){return this.getLegendStyles().normal.fill},getOpacity:function(){return this._options.opacity},getStackName:function(){return this._stackName},getBarOverlapGroup:function(){return this._options.barOverlapGroup},getPointByCoord:function(n,e){const t=this.getNeighborPoint(n,e);return null!=t&&t.coordsIn(n,e)?t:null},getValueAxis:function(){return this._valueAxis},getArgumentAxis:function(){return this._argumentAxis},getMarkersGroup(){return this._markersGroup},getRenderer(){return this._renderer},removePointElements(){this._markersGroup&&((0,w.__)(this._points,(n,e)=>e.deleteMarker()),this._markersGroup.dispose(),this._markersGroup=null)},removeGraphicElements(){const n=this;n._elementsGroup&&(n._elementsGroup.dispose(),n._elementsGroup=null),(0,w.__)(n._graphics||[],(e,t)=>{n._removeElement(t)}),n._graphics=null},removeBordersGroup(){this._bordersGroup&&(this._bordersGroup.dispose(),this._bordersGroup=null)}};var kv=M(7631),Ea=M(9495);const KT=(0,M(7754).A)(go.A.ERROR_MESSAGES,{E2001:"Invalid data source",E2002:"Axis type and data type are incompatible",E2003:'The "{0}" data source field contains data of unsupported type',E2004:'The "{0}" data source field is inconsistent',E2005:'The value field "{0}" is absent in the data source or all its values are negative',E2006:"A cycle is detected in provided data",E2007:'The value field "{0}" is absent in the data source',E2008:'The value field "{0}" must be a string',E2009:'The value field "{0}" must be a positive numeric value',E2101:"Unknown series type: {0}",E2102:"Ambiguity occurred between two value axes with the same name",E2103:'The "{0}" option is given an invalid value. Assign a function instead',E2104:"Invalid logarithm base",E2105:'Invalid value of a "{0}"',E2202:"Invalid {0} scale value",E2203:"The range you are trying to set is invalid",W2002:"The {0} series cannot be drawn because the {1} data field is missing",W2003:"Tick interval is too small",W2101:'The "{0}" pane does not exist; the last pane is used by default',W2102:'A value axis with the "{0}" name was created automatically',W2103:"The chart title was hidden due to the container size",W2104:"The legend was hidden due to the container size",W2105:'The title of the "{0}" axis was hidden due to the container size',W2106:'The labels of the "{0}" axis were hidden due to the container size',W2107:"The export menu was hidden due to the container size",W2108:"The browser does not support exporting images to {0} format.",W2301:"Invalid value range"});var HE=M(1773),UE=M(2013);const XT=KT.ERROR_MESSAGES;const GE=!(0,gr.Vd)();function v0(){this.reset()}function Fh(n,e){return n!==e?(0,_.X)({},n,e):(0,_.X)({},n)}function Cp(n,e){return n!==e?n.concat(e):n.slice()}function xM(n){n._totalChangesOrder=n._optionChangesOrder.concat(n._layoutChangesOrder,n._customChangesOrder)}function SM(n){const e=this.prototype,t=n.code;e["_change_"+t]=n.handler,n.isThemeDependent&&e._themeDependentChanges.push(t),n.option&&(e._optionChangesMap[n.option]=t),(n.isOptionChange?e._optionChangesOrder:e._customChangesOrder).push(t),xM(e)}function WE(){const n=function(){let e;const t=n._chain.length;let i;for(e=0;e<t;++e)i=n._chain[e].apply(this,arguments);return i};return n._chain=[],n.add=function(e){n._chain.push(e)},n.copy=function(e){n._chain=e._chain.slice()},n}function Wd(n,e,t){let i=n[e];i?i.add?(!1===Object.prototype.hasOwnProperty.call(n,e)&&(i=WE(),i.copy(n[e])),i.add(t)):(i=WE(),i.add(n[e]),i.add(t)):i=t,n[e]=i}function Ib(n){const e=this.prototype;e._plugins.push(n),n.fontFields&&e._fontFields.push.apply(e._fontFields,n.fontFields),n.members&&(0,_.X)(this.prototype,n.members),n.customize&&n.customize(this),n.extenders&&Object.keys(n.extenders).forEach(function(t){Wd(e,t,n.extenders[t])},this)}v0.prototype={constructor:v0,add:function(n){let e;const t=n.length,i=this._flags;for(e=0;e<t;++e)i[n[e]]=1},has:function(n){return this._flags[n]>0},count:function(){return Object.keys(this._flags).length},reset:function(){this._flags={}}};const Pb=GE?function(n){const e=n.inherit;n.inherit=function(){const t=e.apply(this,arguments),i=t.prototype;return["_plugins","_eventsMap","_initialChanges","_themeDependentChanges","_optionChangesMap","_optionChangesOrder","_layoutChangesOrder","_customChangesOrder","_totalChangesOrder"].forEach(function(r){i[r]={}}),t.addPlugin=h.lQ,t},n.addChange=h.lQ,n.addPlugin=h.lQ}:function(n){const e=n.inherit;n.inherit=function(){let t=this.prototype;const i=t._plugins,r=t._fontFields,m=t._eventsMap,A=t._initialChanges,V=t._themeDependentChanges,X=t._optionChangesMap,ce=t._partialOptionChangesMap,_e=t._partialOptionChangesPath,Me=t._optionChangesOrder,Ve=t._layoutChangesOrder,Je=t._customChangesOrder,rt=e.apply(this,arguments);return t=rt.prototype,t._plugins=Cp(i,t._plugins),t._fontFields=Cp(r,t._fontFields),t._eventsMap=Fh(m,t._eventsMap),t._initialChanges=Cp(A,t._initialChanges),t._themeDependentChanges=Cp(V,t._themeDependentChanges),t._optionChangesMap=Fh(X,t._optionChangesMap),t._partialOptionChangesMap=Fh(ce,t._partialOptionChangesMap),t._partialOptionChangesPath=Fh(_e,t._partialOptionChangesPath),t._optionChangesOrder=Cp(Me,t._optionChangesOrder),t._layoutChangesOrder=Cp(Ve,t._layoutChangesOrder),t._customChangesOrder=Cp(Je,t._customChangesOrder),xM(t),rt.addPlugin=Ib,rt},n.prototype._plugins=[],n.prototype._fontFields=[],n.addChange=SM,n.addPlugin=Ib},ff=Math.min,$E=Math.max,Rb=Math.round,EM={left:0,center:1,right:2},ZT={top:0,center:1,bottom:2},QT={horizontal:0,vertical:1},C0={};function KE(n,e,t){const i=Wi(n);return i in e?e[i]:t}function OM(n){const e=KE(n.side,QT,1),t=[KE(n.horizontalAlignment,EM,1),KE(n.verticalAlignment,ZT,0)];return{side:e,primary:mf(t[e]),secondary:t[1-e],weak:n.weak,priority:n.priority||0,header:n.header,position:n.position}}function mf(n){return n<2?0:2}function ey(n,e){return(n>0?-1:1)*e}function Lb(n,e,t){const i=n.side,r=n.element.measure([e[2]-e[0],e[3]-e[1]]),A=r[i]<e[2+i]-e[i]-("indside"===n.position?0:t[i]);return A&&("inside"!==n.position&&(e[n.primary+i]+=ey(n.primary,r[i])),n.size=r),A}function y0(n,e,t){const i=n.side,r=function XE(n){return 1-n}(i),m=[],A=function kb(n,e,t,i){return C0[n](e,t,i)}(n.secondary,t[r],t[2+r],n.size[r]);return m[i]=Rb(m[2+i]=e[n.primary+i]+("inside"===n.position?ey(n.primary,n.size[i]):0)),m[n.primary+i]=Rb(e[n.primary+i]-ey(n.primary,n.size[i])),"inside"!==n.position&&(e[n.primary+i]=m[n.primary+i]),m[r]=Rb(A[0]),m[2+r]=Rb(A[1]),m}function kl(n,e,t,i,r,m){const A=y0(n,e,t),V=y0(n,i,i);r[n.side]>0?(r[n.side]-=n.size[n.side],m[n.primary+n.side]=A[n.primary+n.side],n.element.freeSpace()):n.element.move(A,V)}function mu(){this._targets=[]}function m_(n,e){const t=e.slice(),i=y0(n,t,t);return i[n.side]=e[n.side],i[2+n.side]=e[2+n.side],i}function dg(n,e){const t=n.side,i=n.primary;return{side:t,primary:i,secondary:n.secondary,priority:0,element:{measure:function(m){const A=m.slice(),V=e.element.measure(m.slice());m[i]-=V[i];const X=n.element.measure(m.slice());return A[t]=V[t]=X[t]=Math.max(X[t],V[t]),e.size=V,n.size=X,A},move:function(m,A){if(A[2]-A[0]<n.size[0]+e.size[0]-2)return void this.freeSpace();const V=m_(e,A);A[2+e.primary]=V[e.primary];const X=m_(n,A);A[2+e.primary]<m[2+e.primary]&&n.size[n.primary]>m[2+n.primary]-m[n.primary]&&(m[2+e.primary]=A[2+e.primary]);let ce=m_(n,m);ce[2+e.primary]>A[2+e.primary]&&(m[2+e.primary]=A[2+e.primary],ce=m_(n,m)),e.element.move(V),n.element.move(ce,X)},freeSpace:function(){n.element.freeSpace(),e.element.freeSpace()}}}}C0[0]=function(n,e,t){return[n,ff(e,n+t)]},C0[1]=function(n,e,t){return[$E(n,(n+e-t)/2),ff(e,(n+e+t)/2)]},C0[2]=function(n,e,t){return[$E(n,e-t),e]},mu.prototype={constructor:mu,dispose:function(){this._targets=null},add:function(n){this._targets.push(n)},forward:function(n,e){const t=n.slice(),i=function yp(n){let e;const t=n.length;let r,i=[];for(e=0;e<t;++e)r=n[e].layoutOptions(),r&&(r=OM(r),r.element=n[e],i.push(r));return i.sort(function(m,A){return A.side-m.side||m.priority-A.priority}),i=function cg(n){const e=n.filter(function(i){return!0===i.weak})[0];let t;return e&&(t=n.filter(function(i){return e.primary===i.primary&&i.side===e.side&&i!==e})[0]),e&&t?[dg(t,e)].concat(n.filter(function(i){return!(i===t||i===e)})):n}(i),i}(this._targets);let r;const m=i.length,A=[];for(r=0;r<m;++r)Lb(i[r],t,e)?A.push(i[r]):i[r].element.freeSpace();return this._cache=A.reverse(),t},backward:function(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],i=n.slice();const r=n.slice(),m=this._cache;let V,X,A=0;const ce=m.length;for(X=0;X<ce;++X)V=m[X],V.side!==A&&(i=n.slice()),kl(V,i,e,r,t,n),A=V.side;return t}};const um=mu,{floor:Lv}=Math,wM=function(n,e){const t=["width","height"].every(r=>Math.abs(n[r]-e[r])<1),i=["left","right","top","bottom"].every(r=>n[r]===e[r]);return!(t&&i)},JT=function(n){return(0,Lo.A)({},n,{height:Lv(n.height),width:Lv(n.width)})},qT={},{log:JL}=KT,nD=kv.A.prototype.option;function Ys(){return!0}function tl(){return!1}function ja(n){n.component._eventsStrategy.hasEvent("incidentOccurred")||JL.apply(null,[n.target.id].concat(n.target.args||[]))}function Bv(n){return n.reduce((e,t)=>t>0&&!e?t:e,0)}function TM(n){n.forEach(e=>e())}const Nv=(0,gr.Vd)()?kv.A.inherit({_eventsMap:{onIncidentOccurred:{name:"incidentOccurred",actionSettings:{excludeValidators:["disabled"]}},onDrawn:{name:"drawn",actionSettings:{excludeValidators:["disabled"]}}},_getDefaultOptions(){return(0,_.X)(this.callBase(),{onIncidentOccurred:ja})},_useLinks:!0,_init(){this._$element.children(".dx-sized-element").remove(),this._graphicObjects={},this.callBase(...arguments),this._changesLocker=0,this._optionChangedLocker=0,this._asyncFirstDrawing=!0,this._changes=function Mb(){return new v0}(),this._suspendChanges(),this._themeManager=this._createThemeManager(),this._themeManager.setCallback(()=>{this._requestChange(this._themeDependentChanges)}),this._renderElementAttributes(),this._initRenderer();const n=this._useLinks;n&&this._renderer.root.enableLinks().virtualLink("core").virtualLink("peripheral"),this._renderVisibilityChange(),this._attachVisibilityChangeHandlers(),this._toggleParentsScrollSubscription(this._isVisible()),this._initEventTrigger(),this._incidentOccurred=function(n,e){return function(t,i){e("incidentOccurred",{target:{id:t,type:"E"===t[0]?"error":"warning",args:i,text:Ea.GP.apply(null,[XT[t]].concat(i||[])),widget:n,version:nT.r}})}}(this.NAME,this._eventTrigger),this._layout=new um,n&&this._renderer.root.linkAfter("core"),this._initPlugins(),this._initCore(),n&&this._renderer.root.linkAfter(),this._change(this._initialChanges)},_createThemeManager(){return new th(this._getThemeManagerOptions())},_getThemeManagerOptions(){return{themeSection:this._themeSection,fontFields:this._fontFields}},_initialChanges:["LAYOUT","RESIZE_HANDLER","THEME","DISABLED"],_initPlugins(){(0,w.__)(this._plugins,(n,e)=>{e.init.call(this)})},_disposePlugins(){(0,w.__)(this._plugins.slice().reverse(),(n,e)=>{e.dispose.call(this)})},_change(n){this._changes.add(n)},_suspendChanges(){this._changesLocker+=1},_resumeChanges(){0==--this._changesLocker&&this._changes.count()>0&&!this._applyingChanges&&(this._renderer.lock(),this._applyingChanges=!0,this._applyChanges(),this._changes.reset(),this._applyingChanges=!1,this._changesApplied(),this._renderer.unlock(),this._optionsQueue&&this._applyQueuedOptions(),this.resolveItemsDeferred(this._legend?[this._legend]:[]),this._optionChangedLocker+=1,this._notify(),this._optionChangedLocker-=1)},resolveItemsDeferred(n){this._resolveDeferred(this._getTemplatesItems(n))},_collectTemplatesFromItems:n=>n.reduce((e,t)=>({items:e.items.concat(t.getTemplatesDef()),groups:e.groups.concat(t.getTemplatesGroups())}),{items:[],groups:[]}),_getTemplatesItems(n){const e=this._collectTemplatesFromItems(n),t=this._getExtraTemplatesItems();return{items:t.items.concat(e.items),groups:t.groups.concat(e.groups),launchRequest:[t.launchRequest],doneRequest:[t.doneRequest]}},_getExtraTemplatesItems:()=>({items:[],groups:[],launchRequest:()=>{},doneRequest:()=>{}}),_resolveDeferred(n){let{items:e,launchRequest:t,doneRequest:i,groups:r}=n;if(this._setGroupsVisibility(r,"hidden"),this._changesApplying)return this._changesApplying=!1,void TM(i);let m=!0;g.z7.apply(this,e).done(()=>{if(m)return void this._setGroupsVisibility(r,"visible");TM(t),this._changesApplying=!0;const A=["LAYOUT","FULL_RENDER"];this._asyncFirstDrawing?(A.push("FORCE_FIRST_DRAWING"),this._asyncFirstDrawing=!1):A.push("FORCE_DRAWING"),this._requestChange(A),this._setGroupsVisibility(r,"visible")}),m=!1},_setGroupsVisibility(n,e){n.forEach(t=>t.attr({visibility:e}))},_applyQueuedOptions(){const n=this._optionsQueue;this._optionsQueue=null,this.beginUpdate(),(0,w.__)(n,(e,t)=>{t()}),this.endUpdate()},_requestChange(n){this._suspendChanges(),this._change(n),this._resumeChanges()},_applyChanges(){const n=this._changes,e=this._totalChangesOrder,t=e.length;for(let i=0;i<t;i+=1)n.has(e[i])&&this[`_change_${e[i]}`]()},_optionChangesOrder:["EVENTS","THEME","RENDERER","RESIZE_HANDLER"],_layoutChangesOrder:["ELEMENT_ATTR","CONTAINER_SIZE","LAYOUT"],_customChangesOrder:["DISABLED"],_change_EVENTS(){this._eventTrigger.applyChanges()},_change_THEME(){this._setThemeAndRtl()},_change_RENDERER(){this._setRendererOptions()},_change_RESIZE_HANDLER(){this._setupResizeHandler()},_change_ELEMENT_ATTR(){this._renderElementAttributes(),this._change(["CONTAINER_SIZE"])},_change_CONTAINER_SIZE(){this._updateSize()},_change_LAYOUT(){this._setContentSize()},_change_DISABLED(){const n=this._renderer,{root:e}=n;this.option("disabled")?(this._initDisabledState=e.attr("pointer-events"),e.attr({"pointer-events":"none",filter:n.getGrayScaleFilter().id})):"none"===e.attr("pointer-events")&&e.attr({"pointer-events":(0,C.O9)(this._initDisabledState)?this._initDisabledState:null,filter:null})},_themeDependentChanges:["RENDERER"],_initRenderer(){const n=this._calculateRawCanvas();this._canvas=JT(n),this._renderer=new Nu({cssClass:`${this._rootClassPrefix} ${this._rootClass}`,pathModified:this.option("pathModified"),container:this._$element[0]}),this._renderer.resize(this._canvas.width,this._canvas.height)},_disposeRenderer(){this._renderer.dispose()},_disposeGraphicObjects(){Object.keys(this._graphicObjects).forEach(n=>{this._graphicObjects[n].dispose()}),this._graphicObjects=null},_getAnimationOptions:h.lQ,render(){this._requestChange(["CONTAINER_SIZE"]);const n=this._isVisible();this._toggleParentsScrollSubscription(n),!n&&this._stopCurrentHandling()},_toggleParentsScrollSubscription(n){let e=(0,a.A)(this._renderer.root.element).parents();"generic"===d.A.real().platform&&(e=e.add((0,gr.zk)())),this._proxiedTargetParentsScrollHandler=this._proxiedTargetParentsScrollHandler||function(){this._stopCurrentHandling()}.bind(this),L.A.off((0,a.A)("").add(this._$prevRootParents),"scroll.viz_widgets",this._proxiedTargetParentsScrollHandler),n&&(L.A.on(e,"scroll.viz_widgets",this._proxiedTargetParentsScrollHandler),this._$prevRootParents=e)},_stopCurrentHandling:h.lQ,_dispose(){this._disposed||(this.callBase(...arguments),this._toggleParentsScrollSubscription(!1),this._removeResizeHandler(),this._layout.dispose(),this._eventTrigger.dispose(),this._disposeCore(),this._disposePlugins(),this._disposeGraphicObjects(),this._disposeRenderer(),this._themeManager.dispose(),this._themeManager=null,this._renderer=null,this._eventTrigger=null)},_initEventTrigger(){this._eventTrigger=function YT(n,e){let i,t={};return(0,w.__)(n,function(A,V){V.name&&r(A)}),m.change=function(A){const V=n[A];return V&&((i=i||{})[A]=V),!!V},m.applyChanges=function(){i&&((0,w.__)(i,function(A,V){r(V.newName||A)}),i=null)},m.dispose=function(){n=e=t=null},m;function r(A){const V=n[A];t[V.name]=e(A,V.actionSettings)}function m(A,V,X){t[A](V),X&&X()}}(this._eventsMap,(n,e)=>this._createActionByOption(n,e))},_calculateRawCanvas(){const n=this.option("size")||{},e=this.option("margin")||{},t=this._getDefaultSize()||{},i=(V,X,ce)=>{if(function qL(n){return(0,C.O9)(n)&&n>0}(V[X])||!(0,gr.Vd)())return 0;const _e=ce(this._$element);return _e<=1?0:_e},r=i(n,"width",V=>(0,D.RG)(V)),m=i(n,"height",V=>(0,D.Oq)(V));let A={width:n.width<=0?0:Bv([n.width,r,t.width]),height:n.height<=0?0:Bv([n.height,m,t.height]),left:Bv([e.left,t.left]),top:Bv([e.top,t.top]),right:Bv([e.right,t.right]),bottom:Bv([e.bottom,t.bottom])};return(A.width-A.left-A.right<=0||A.height-A.top-A.bottom<=0)&&(A={width:0,height:0}),A},_updateSize(){const n=this._calculateRawCanvas();(wM(this._canvas,n)||this.__forceRender)&&(this._canvas=JT(n),this._recreateSizeDependentObjects(!0),this._renderer.resize(this._canvas.width,this._canvas.height),this._change(["LAYOUT"]))},_recreateSizeDependentObjects:h.lQ,_getMinSize:()=>[0,0],_getAlignmentRect:h.lQ,_setContentSize(){const n=this._canvas,e=this._layout;let t=n.width>0&&n.height>0?[n.left,n.top,n.width-n.right,n.height-n.bottom]:[0,0,0,0];t=e.forward(t,this._getMinSize());const i=this._applySize(t)||t;e.backward(i,this._getAlignmentRect()||i)},_getOption(n,e){const t=this._themeManager.theme(n),i=this.option(n);return e?void 0!==i?i:t:(0,_.X)(!0,{},t,i)},_setupResizeHandler(){const n=mn(this._getOption("redrawOnResize",!0),!0);this._disposeResizeHandler&&this._removeResizeHandler(),this._disposeResizeHandler=function zE(n,e,t){let i;const r=function JC(n){return(e,t)=>{const{handler:i,dispose:r}=function qC(n,e){let t;const i=function(){clearTimeout(t),t=setTimeout(n,100)};return{handler:i,dispose(){clearTimeout(t),e(i)}}}(n,t);return e(i),r}}(t);return"windowonly"===Wi(e)?i=r(m=>HE.A.add(m),m=>HE.A.remove(m)):!0===e&&(i=r(m=>UE.A.observe(n,m),()=>UE.A.unobserve(n))),i}(this._$element[0],n,()=>this._requestChange(["CONTAINER_SIZE"]))},_removeResizeHandler(){this._disposeResizeHandler&&(this._disposeResizeHandler(),this._disposeResizeHandler=null)},_onBeginUpdate:h.lQ,beginUpdate(){return this._initialized&&this._isUpdateAllowed()&&(this._onBeginUpdate(),this._suspendChanges()),this.callBase(...arguments),this},endUpdate(){return this.callBase(),this._isUpdateAllowed()&&this._resumeChanges(),this},option(n){if(!(this._initialized&&this._applyingChanges&&(arguments.length>1||(0,C.Gv)(n))))return nD.apply(this,arguments);this._optionsQueue=this._optionsQueue||[],this._optionsQueue.push(this._getActionForUpdating(arguments))},_getActionForUpdating(n){return()=>{nD.apply(this,n)}},_clean:h.lQ,_render:h.lQ,_optionChanged(n){if(this._optionChangedLocker)return;const e=this.getPartialChangeOptionsName(n);let t=[];e.length>0?e.forEach(i=>t.push(this._partialOptionChangesMap[i])):t.push(this._optionChangesMap[n.name]),t=t.filter(i=>!!i),this._eventTrigger.change(n.name)?this._change(["EVENTS"]):t.length>0?this._change(t):this.callBase.apply(this,arguments)},_notify:h.lQ,_changesApplied:h.lQ,_optionChangesMap:{size:"CONTAINER_SIZE",margin:"CONTAINER_SIZE",redrawOnResize:"RESIZE_HANDLER",theme:"THEME",rtlEnabled:"THEME",encodeHtml:"THEME",elementAttr:"ELEMENT_ATTR",disabled:"DISABLED"},_partialOptionChangesMap:{},_partialOptionChangesPath:{},getPartialChangeOptionsName(n){const{fullName:e}=n,t=e.split(/[.]/),{name:i}=n,{value:r}=n,m=this._partialOptionChangesPath[i],A=[];return m&&(!0===m?A.push(i):(m.forEach(V=>{e.indexOf(V)>=0&&A.push(V)}),1===t.length&&("object"===(0,C.NW)(r)?this._addOptionsNameForPartialUpdate(r,m,A):"array"===(0,C.NW)(r)&&r.length>0&&r.every(V=>this._checkOptionsForPartialUpdate(V,m))&&r.forEach(V=>{this._addOptionsNameForPartialUpdate(V,m,A)})))),A.filter((V,X,ce)=>ce.indexOf(V)===X)},_checkOptionsForPartialUpdate:(n,e)=>!Object.keys(n).some(t=>-1===e.indexOf(t)),_addOptionsNameForPartialUpdate(n,e,t){const i=Object.keys(n);this._checkOptionsForPartialUpdate(n,e)&&i.forEach(r=>e.indexOf(r)>-1&&t.push(r))},_visibilityChanged(){this.render()},_setThemeAndRtl(){this._themeManager.setTheme(this.option("theme"),this.option("rtlEnabled"))},_getRendererOptions(){return{rtl:this.option("rtlEnabled"),encodeHtml:this.option("encodeHtml"),animation:this._getAnimationOptions()}},_setRendererOptions(){this._renderer.setOptions(this._getRendererOptions())},svg(){return this._renderer.svg()},getSize(){const n=this._canvas||{};return{width:n.width,height:n.height}},isReady:tl,_dataIsReady:Ys,_resetIsReady(){this.isReady=tl},_renderGraphicObjects(){const n=this._renderer,e=qT;Object.keys(e).forEach(t=>{if(!this._graphicObjects[t]){const{type:i,colors:r,rotationAngle:m,template:A,width:V,height:X}=e[t];switch(i){case"linear":this._graphicObjects[t]=n.linearGradient(r,t,m);break;case"radial":this._graphicObjects[t]=n.radialGradient(r,t);break;case"pattern":this._graphicObjects[t]=n.customPattern(t,this._getTemplate(A),V,X)}}})},_drawn(){this.isReady=tl,this._dataIsReady()&&this._renderer.onEndAnimation(()=>{this.isReady=Ys}),this._eventTrigger("drawn",{})}}):function(){const e=kv.A.inherit({_initTemplates(){},ctor(i,r){this.callBase(i,r);const m=c.A.createElement("div"),A=r&&(0,C.kf)(r.width)?`${r.width}px`:"100%",V=r&&(0,C.kf)(r.height)?`${r.height}px`:`${this._getDefaultSize().height}px`;c.A.setStyle(m,"width",A),c.A.setStyle(m,"height",V),c.A.setClass(m,"dx-sized-element",!1),c.A.insertElement(i,m)}}),t=e.inherit;return e.inherit=function(i){return Object.keys(i).forEach(r=>{((0,C.Tn)(i[r])&&"_"!==r.substr(0,1)&&"option"!==r||"_dispose"===r||"_optionChanged"===r)&&(i[r]=h.lQ)}),t.call(this,i)},e}(),Vh=Nv;Pb(Nv);class eB{constructor(e,t,i){const r=e.getBoundingRect(),{x:m}=r,{y:A}=r,V=r.x+r.width,X=r.y+r.height;this.labels=[e],this.shiftFunction=i,this.bBox={start:t?m:A,width:t?r.width:r.height,end:t?V:X,oppositeStart:t?A:m,oppositeEnd:t?X:V},this.initialPosition=t?r.x:r.y}toChain(e){const t=e.getBoundingRect();e.shift(t.start-this.bBox.end),this.changeBoxWidth(t.width),this.labels=this.labels.concat(e.labels)}getBoundingRect(){return this.bBox}shift(e){this.labels.forEach(t=>{const i=t.getBoundingRect(),r=this.shiftFunction(i,e);t.hideInsideLabel(r)||t.shift(r.x,r.y)}),this.bBox.end-=e,this.bBox.start-=e}setRollingStockInCanvas(e){this.bBox.end>e.end&&this.shift(this.bBox.end-e.end)}getLabels(){return this.labels}value(){return this.labels[0].getData().value}getInitialPosition(){return this.initialPosition}changeBoxWidth(e){this.bBox.end+=e,this.bBox.width+=e}}const{isArray:iD}=Array,Nb=["_reinit","_updateDataSource","_dataInit","_forceRender","_resize"],x0="font";function sD(n){const e=n.reduce((i,r,m)=>{if(!r)return i;const A=r.value();return A<i.value?{value:A,rollingStock:r,index:m}:i},{rollingStock:void 0,value:1/0,index:void 0});e.rollingStock.getLabels()[0].draw(!1);const{width:t}=e.rollingStock.getBoundingRect();return n[e.index]=null,t}function S0(n,e,t){if(!n||!e)return;const i=n.getBoundingRect(),r=e.getBoundingRect();return i.end>r.start&&(!t||i.oppositeStart<=r.oppositeStart&&i.oppositeEnd>r.oppositeStart||r.oppositeStart<=i.oppositeStart&&r.oppositeEnd>i.oppositeStart)}function IM(n,e){return n.getBoundingRect().end>e.end}function Jc(n,e){return(n.x<=e.x&&e.x<=n.x+n.width||n.x>=e.x&&n.x<=e.x+e.width)&&(n.y<=e.y&&e.y<=n.y+n.height||n.y>=e.y&&n.y<=e.y+e.height)}const iy_resolveLabelOverlappingInOneDirection=function ZE(n,e,t,i,r){let m=arguments.length>5&&void 0!==arguments[5]?arguments[5]:()=>0;const A=[],V={start:t?e.left:e.top,end:t?e.width-e.right:e.height-e.bottom};let ce,X=!1;if(n.forEach(_e=>{_e&&(X=X||_e.series.isStackedSeries()||_e.series.isFullStackedSeries(),_e.getLabels().forEach(Me=>{Me.isVisible()&&A.push(new eB(Me,t,r))}))}),X)+!t^Number(i)&&A.reverse(),ce=i?A:function ny(n){const e=[],t=[];return n.forEach(i=>{i.value()>0?e.push(i):t.unshift(i)}),e.concat(t)}(A);else{const _e=A.slice();ce=A.sort((Me,Ve)=>m(Me,Ve)||Me.getInitialPosition()-Ve.getInitialPosition()||_e.indexOf(Me)-_e.indexOf(Ve))}return!!function Fb(n){let e,t,i,r,m=!1;for(e=0,i=n.length-1;e<i;e++){for(t=e+1,r=n.length;t<r;t++)if(e!==t&&S0(n[e],n[t],!0)){m=!0;break}if(m)break}return m}(ce)&&(function oB(n,e){const t=e.end-e.start;let i=0;for(n.forEach(r=>{i+=r.getBoundingRect().width});t<i;)i-=sD(n)}(ce,V),function aD(n){let e;for(let t=0;t<n.length-1;t+=1){const i=e||n[t];S0(i,n[t+1])?(i.toChain(n[t+1]),n[t+1]=null,e=i):e=n[t+1]||i}}(ce),ce.reverse(),function QV(n,e){for(let t=0;t<n.length;t+=1){const i=n[t];let r=!0;if(null!==i&&IM(i,e)){const m=i.getBoundingRect();for(let A=t+1;A<n.length;A+=1){const V=n[A];if(V&&V.getBoundingRect().end>m.start-(m.end-e.end)){V.toChain(i),r=!1;break}}}r&&i?.setRollingStockInCanvas(e)}}(ce,V),!0)},ug=Vh.inherit({_eventsMap:{onSeriesClick:{name:"seriesClick"},onPointClick:{name:"pointClick"},onArgumentAxisClick:{name:"argumentAxisClick"},onLegendClick:{name:"legendClick"},onSeriesSelectionChanged:{name:"seriesSelectionChanged"},onPointSelectionChanged:{name:"pointSelectionChanged"},onSeriesHoverChanged:{name:"seriesHoverChanged"},onPointHoverChanged:{name:"pointHoverChanged"},onDone:{name:"done",actionSettings:{excludeValidators:["disabled"]}},onZoomStart:{name:"zoomStart"},onZoomEnd:{name:"zoomEnd"}},_fontFields:[`legend.${x0}`,`legend.title.${x0}`,`legend.title.subtitle.${x0}`,`commonSeriesSettings.label.${x0}`],_rootClassPrefix:"dxc",_rootClass:"dxc-chart",_initialChanges:["INIT"],_themeDependentChanges:["REFRESH_SERIES_REINIT"],_getThemeManagerOptions(){const n=this.callBase.apply(this,arguments);return n.options=this.option(),n},_createThemeManager(){const n=this.option(),e=new Gp(this._getThemeManagerOptions());return e.setTheme(n.theme,n.rtlEnabled),e},_initCore(){this._canvasClipRect=this._renderer.clipRect(),this._createHtmlStructure(),this._createLegend(),this._createTracker(),this._needHandleRenderComplete=!0,this.layoutManager=new At,this._createScrollBar(),L.A.on(this._$element,"contextmenu",n=>{((0,N.kH)(n)||(0,N.EE)(n))&&n.preventDefault()}),L.A.on(this._$element,"MSHoldVisual",n=>{n.preventDefault()})},_getLayoutItems:h.lQ,_layoutManagerOptions(){return this._themeManager.getOptions("adaptiveLayout")},_reinit(){Ko(this._canvas),this._reinitAxes(),this._requestChange(["DATA_SOURCE","DATA_INIT","CORRECT_AXIS","FULL_RENDER"])},_correctAxes:h.lQ,_createHtmlStructure(){const n=this._renderer,{root:e}=n,t=function(){return n.g().attr({class:"dxc-constant-lines-group"}).linkOn(e,"constant-lines")};this._constantLinesGroup={dispose(){this.under.dispose(),this.above.dispose()},linkOff(){this.under.linkOff(),this.above.linkOff()},clear(){this.under.linkRemove().clear(),this.above.linkRemove().clear()},linkAppend(){this.under.linkAppend(),this.above.linkAppend()}},this._labelsAxesGroup=n.g().attr({class:"dxc-elements-axes-group"});const i=()=>{this._labelsAxesGroup.linkOn(e,"elements")};this._backgroundRect=n.rect().attr({fill:"gray",opacity:1e-4}).append(e),this._panesBackgroundGroup=n.g().attr({class:"dxc-background"}).append(e),this._stripsGroup=n.g().attr({class:"dxc-strips-group"}).linkOn(e,"strips"),this._gridGroup=n.g().attr({class:"dxc-grids-group"}).linkOn(e,"grids"),this._panesBorderGroup=n.g().attr({class:"dxc-border"}).linkOn(e,"border"),this._axesGroup=n.g().attr({class:"dxc-axes-group"}).linkOn(e,"axes"),this._executeAppendBeforeSeries(i),this._stripLabelAxesGroup=n.g().attr({class:"dxc-strips-labels-group"}).linkOn(e,"strips-labels"),this._constantLinesGroup.under=t(),this._seriesGroup=n.g().attr({class:"dxc-series-group"}).linkOn(e,"series"),this._executeAppendAfterSeries(i),this._constantLinesGroup.above=t(),this._scaleBreaksGroup=n.g().attr({class:"dxc-scale-breaks"}).linkOn(e,"scale-breaks"),this._labelsGroup=n.g().attr({class:"dxc-labels-group"}).linkOn(e,"labels"),this._crosshairCursorGroup=n.g().attr({class:"dxc-crosshair-cursor"}).linkOn(e,"crosshair"),this._legendGroup=n.g().attr({class:"dxc-legend","clip-path":this._getCanvasClipRectID()}).linkOn(e,"legend").linkAppend(e).enableLinks(),this._scrollBarGroup=n.g().attr({class:"dxc-scroll-bar"}).linkOn(e,"scroll-bar")},_executeAppendBeforeSeries(){},_executeAppendAfterSeries(){},_disposeObjectsInArray(n,e){(this[n]||[]).forEach(t=>{e&&t?e.forEach(i=>{var r;null===(r=t[i])||void 0===r||r.dispose()}):t?.dispose()}),this[n]=null},_disposeCore(){const n=i=>{this[i]&&(this[i].dispose(),this[i]=null)},e=i=>{this[i].linkOff()},t=this._disposeObjectsInArray;this._renderer.stopAllAnimations(),t.call(this,"series"),n("_tracker"),n("_crosshair"),this.layoutManager=this._userOptions=this._canvas=this._groupsData=null,e("_stripsGroup"),e("_gridGroup"),e("_axesGroup"),e("_constantLinesGroup"),e("_stripLabelAxesGroup"),e("_panesBorderGroup"),e("_seriesGroup"),e("_labelsGroup"),e("_crosshairCursorGroup"),e("_legendGroup"),e("_scrollBarGroup"),e("_scaleBreaksGroup"),n("_canvasClipRect"),n("_panesBackgroundGroup"),n("_backgroundRect"),n("_stripsGroup"),n("_gridGroup"),n("_axesGroup"),n("_constantLinesGroup"),n("_stripLabelAxesGroup"),n("_panesBorderGroup"),n("_seriesGroup"),n("_labelsGroup"),n("_crosshairCursorGroup"),n("_legendGroup"),n("_scrollBarGroup"),n("_scaleBreaksGroup")},_getAnimationOptions(){return this._themeManager.getOptions("animation")},_getDefaultSize:()=>({width:400,height:400}),_getOption(n){return this._themeManager.getOptions(n)},_applySize(n){this._rect=n.slice(),this._changes.has("FULL_RENDER")||this._processRefreshData("_resize")},_resize(){this._doRender(this.__renderOptions||{animate:!1,isResize:!0})},_trackerType:"ChartTracker",_createTracker(){this._tracker=new W[this._trackerType]({seriesGroup:this._seriesGroup,renderer:this._renderer,tooltip:this._tooltip,legend:this._legend,eventTrigger:this._eventTrigger})},_getTrackerSettings(){return(0,_.X)({chart:this},this._getSelectionModes())},_getSelectionModes(){const n=this._themeManager;return{seriesSelectionMode:n.getOptions("seriesSelectionMode"),pointSelectionMode:n.getOptions("pointSelectionMode")}},_updateTracker(n){this._tracker.update(this._getTrackerSettings()),this._tracker.setCanvases({left:0,right:this._canvas.width,top:0,bottom:this._canvas.height},n)},_createCanvasFromRect(n){const e=this._canvas;return Ko({left:n[0],top:n[1],right:e.width-n[2],bottom:e.height-n[3],width:e.width,height:e.height})},_doRender(n){if(0===this._canvas.width&&0===this._canvas.height)return;this._resetIsReady();const e=this._prepareDrawOptions(n),{recreateCanvas:t}=e;this._preserveOriginalCanvas(),t?this.__currentCanvas=this._canvas:this._canvas=this.__currentCanvas,t&&this._updateCanvasClipRect(this._canvas),this._canvas=this._createCanvasFromRect(this._rect),this._renderer.stopAllAnimations(!0),this._cleanGroups();const i=new Date;this._renderElements(e),this._lastRenderingTime=Number(new Date)-Number(i)},_preserveOriginalCanvas(){this.__originalCanvas=this._canvas,this._canvas=(0,_.X)({},this._canvas)},_layoutAxes:h.lQ,_renderElements(n){const e=this._prepareToRender(n),t=this._isRotated(),i=this._isLegendInside(),r=[];let m,A,V;(0,_.X)({},this._canvas),this._renderer.lock(),n.drawLegend&&this._legend&&this._legendGroup.linkAppend(),this.layoutManager.setOptions(this._layoutManagerOptions());const X=this._getLayoutTargets();this._layoutAxes(ce=>{const _e=ce?(0,_.X)({},n,{animate:!1,recreateCanvas:!0}):n,Me=this._renderAxes(_e,e);this._shrinkAxes(ce,Me)}),this._applyClipRects(e),this._appendSeriesGroups(),this._createCrosshairCursor(),X.forEach(ce=>{let{canvas:_e}=ce;r.push({left:_e.left,right:_e.width-_e.right,top:_e.top,bottom:_e.height-_e.bottom})}),this._scrollBar&&(m=this._argumentAxes[0].getTranslator().getBusinessRange(),"discrete"===m.axisType&&m.categories&&m.categories.length<=1||"discrete"!==m.axisType&&m.min===m.max?A=V=void 0:(A=m.minVisible,V=m.maxVisible),this._scrollBar.init(m,!this._argumentAxes[0].getOptions().valueMarginsEnabled).setPosition(A,V)),this._updateTracker(r),this._updateLegendPosition(n,i),this._applyPointMarkersAutoHiding(),this._renderSeries(n,t,i),this._renderGraphicObjects(),this._renderer.unlock()},_updateLegendPosition:h.lQ,_createCrosshairCursor:h.lQ,_appendSeriesGroups(){this._seriesGroup.linkAppend(),this._labelsGroup.linkAppend(),this._appendAdditionalSeriesGroups()},_renderSeries(n,e,t){this._calculateSeriesLayout(n,e),this._renderSeriesElements(n,t)},_calculateSeriesLayout(n,e){n.hideLayoutLabels=this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),e)&&!this._themeManager.getOptions("adaptiveLayout").keepLabels,this._updateSeriesDimensions(n)},_getArgFilter:()=>()=>!0,_getValFilter:()=>()=>!0,_getPointsToAnimation(n){const e=this._getArgFilter();return n.map(t=>{const i=this._getValFilter(t);return t.getPoints().filter(r=>r.getOptions().visible&&e(r.argument)&&(i(r.getMinValue(!0))||i(r.getMaxValue(!0)))).length})},_renderSeriesElements(n,e){const{series:t}=this,i=this._themeManager.getOptions("resolveLabelOverlapping"),r=this._getPointsToAnimation(t);t.forEach((m,A)=>{this._applyExtraSettings(m,n);const V=n.animate&&r[A]<=n.animationPointsLimit&&this._renderer.animationEnabled();m.draw(V,n.hideLayoutLabels,this._getLegendCallBack(m))}),"none"===i?this._adjustSeriesLabels(!1):this._locateLabels(i),this._renderTrackers(e),this._tracker.repairTooltip(),this._renderExtraElements(),this._clearCanvas(),this._seriesElementsDrawn=!0},_changesApplied(){this._seriesElementsDrawn&&(this._seriesElementsDrawn=!1,this._drawn(),this._renderCompleteHandler())},_locateLabels(n){this._resolveLabelOverlapping(n)},_renderExtraElements(){},_clearCanvas(){this._canvas=this.__originalCanvas},_resolveLabelOverlapping(n){let e;switch(n){case"stack":e=this._resolveLabelOverlappingStack;break;case"hide":e=this._resolveLabelOverlappingHide;break;case"shift":e=this._resolveLabelOverlappingShift}return(0,C.Tn)(e)&&e.call(this)},_getVisibleSeries(){return(0,h.VM)(this.getAllSeries(),n=>n.isVisible())},_resolveLabelOverlappingHide(){const n=[];let e,t,i,r,m,A,V;const X=this._getVisibleSeries();for(m=0;m<X.length;m++)for(V=X[m].getVisiblePoints(),A=0;A<V.length;A++)n.push.apply(n,V[A].getLabels());for(m=0;m<n.length;m++)if(e=n[m],e.isVisible())for(i=e.getBoundingRect(),A=m+1;A<n.length;A++)t=n[A],r=t.getBoundingRect(),Jc(i,r)&&t.draw(!1)},_cleanGroups(){this._stripsGroup.linkRemove().clear(),this._gridGroup.linkRemove().clear(),this._axesGroup.linkRemove().clear(),this._constantLinesGroup.clear(),this._stripLabelAxesGroup.linkRemove().clear(),this._labelsGroup.linkRemove().clear(),this._crosshairCursorGroup.linkRemove().clear(),this._scaleBreaksGroup.linkRemove().clear()},_allowLegendInsidePosition:()=>!1,_createLegend(){const n=function lD(n){const e=function ph(n){return{nameField:`${n}Name`,colorField:`${n}Color`,indexField:`${n}Index`}}(n);return{getFormatObject(t){const i={};return i[e.indexField]=t.id,i[e.colorField]=t.states.normal.fill,i[e.nameField]=t.text,i},textField:e.nameField}}(this._legendDataField);this._legend=new Qt({renderer:this._renderer,widget:this,group:this._legendGroup,backgroundClass:"dxc-border",itemGroupClass:"dxc-item",titleGroupClass:"dxc-title",textField:n.textField,getFormatObject:n.getFormatObject,allowInsidePosition:this._allowLegendInsidePosition()}),this._updateLegend(),this._layout.add(this._legend)},_updateLegend(){const n=this._themeManager,e=n.getOptions("legend"),t=this._getLegendData();e.containerBackgroundColor=n.getOptions("containerBackgroundColor"),e._incidentOccurred=this._incidentOccurred,this._legend.update(t,e,n.theme("legend").title),this._change(["LAYOUT"])},_prepareDrawOptions(n){const e=this._getAnimationOptions(),t=(0,_.X)({},{force:!1,adjustAxes:!0,drawLegend:!0,drawTitle:!0,animate:e.enabled,animationPointsLimit:e.maxPointCountSupported},n,this.__renderOptions);return(0,C.O9)(t.recreateCanvas)||(t.recreateCanvas=t.adjustAxes&&t.drawLegend&&t.drawTitle),t},_processRefreshData(n){const e=Nb.indexOf(this._currentRefreshData),t=Nb.indexOf(n);(!this._currentRefreshData||e>=0&&t<e)&&(this._currentRefreshData=n),this._requestChange(["REFRESH"])},_getLegendData(){return ui(this._getLegendTargets(),n=>{const{legendData:e}=n,t=n.getLegendStyles;let{opacity:i}=t.normal;n.visible||((!(0,C.O9)(i)||i>.3)&&(i=.3),e.textOpacity=.3);const r={opacity:i};return e.states={hover:(0,_.X)({},t.hover,r),selection:(0,_.X)({},t.selection,r),normal:(0,_.X)({},t.normal,r)},e})},_getLegendOptions(n){return{legendData:{text:n[this._legendItemTextField],id:n.index,visible:!0},getLegendStyles:n.getLegendStyles(),visible:n.isVisible()}},_disposeSeries(n){var e;this.series&&((0,C.O9)(n)?(this.series[n].dispose(),this.series.splice(n,1)):(this.series.forEach(t=>t.dispose()),this.series.length=0)),null!==(e=this.series)&&void 0!==e&&e.length||(this.series=[])},_disposeSeriesFamilies(){(this.seriesFamilies||[]).forEach(n=>{n.dispose()}),this.seriesFamilies=null,this._needHandleRenderComplete=!0},_optionChanged(n){this._themeManager.resetOptions(n.name),this.callBase.apply(this,arguments)},_applyChanges(){this._themeManager.update(this._options.silent()),this.callBase(...arguments)},_optionChangesMap:{animation:"ANIMATION",dataSource:"DATA_SOURCE",palette:"PALETTE",paletteExtensionMode:"PALETTE",legend:"FORCE_DATA_INIT",seriesTemplate:"FORCE_DATA_INIT",export:"FORCE_RENDER",valueAxis:"AXES_AND_PANES",argumentAxis:"AXES_AND_PANES",commonAxisSettings:"AXES_AND_PANES",panes:"AXES_AND_PANES",commonPaneSettings:"AXES_AND_PANES",defaultPane:"AXES_AND_PANES",containerBackgroundColor:"AXES_AND_PANES",rotated:"ROTATED",autoHidePointMarkers:"REFRESH_SERIES_REINIT",customizePoint:"REFRESH_SERIES_REINIT",customizeLabel:"REFRESH_SERIES_REINIT",scrollBar:"SCROLL_BAR"},_optionChangesOrder:["ROTATED","PALETTE","REFRESH_SERIES_REINIT","USE_SPIDER_WEB","AXES_AND_PANES","INIT","REINIT","DATA_SOURCE","REFRESH_SERIES_DATA_INIT","DATA_INIT","FORCE_DATA_INIT","REFRESH_AXES","CORRECT_AXIS"],_customChangesOrder:["ANIMATION","REFRESH_SERIES_FAMILIES","FORCE_FIRST_DRAWING","FORCE_DRAWING","FORCE_RENDER","VISUAL_RANGE","SCROLL_BAR","REINIT","REFRESH","FULL_RENDER"],_change_ANIMATION(){this._renderer.updateAnimationOptions(this._getAnimationOptions())},_change_DATA_SOURCE(){this._needHandleRenderComplete=!0,this._updateDataSource()},_change_PALETTE(){this._themeManager.updatePalette(),this._refreshSeries("DATA_INIT")},_change_REFRESH_SERIES_DATA_INIT(){this._refreshSeries("DATA_INIT")},_change_DATA_INIT(){(!this.series||this.needToPopulateSeries)&&!this._changes.has("FORCE_DATA_INIT")&&this._dataInit()},_change_FORCE_DATA_INIT(){this._dataInit()},_change_REFRESH_SERIES_FAMILIES(){this._processSeriesFamilies(),this._populateBusinessRange(),this._processRefreshData("_forceRender")},_change_FORCE_RENDER(){this._processRefreshData("_forceRender")},_change_AXES_AND_PANES(){this._refreshSeries("INIT")},_change_ROTATED(){this._createScrollBar(),this._refreshSeries("INIT")},_change_REFRESH_SERIES_REINIT(){this._refreshSeries("INIT")},_change_REFRESH_AXES(){Ko(this._canvas),this._reinitAxes(),this._requestChange(["CORRECT_AXIS","FULL_RENDER"])},_change_SCROLL_BAR(){this._createScrollBar(),this._processRefreshData("_forceRender")},_change_REINIT(){this._processRefreshData("_reinit")},_change_FORCE_DRAWING(){this._resetComponentsAnimation()},_change_FORCE_FIRST_DRAWING(){this._resetComponentsAnimation(!0)},_resetComponentsAnimation(n){this.series.forEach(e=>{e.resetApplyingAnimation(n)}),this._resetAxesAnimation(n)},_resetAxesAnimation:h.lQ,_refreshSeries(n){this.needToPopulateSeries=!0,this._requestChange([n])},_change_CORRECT_AXIS(){this._correctAxes()},_doRefresh(){const n=this._currentRefreshData;n&&(this._currentRefreshData=null,this._renderer.stopAllAnimations(!0),this[n]())},_updateCanvasClipRect(n){const e=Math.max(n.width-n.left-n.right,0),t=Math.max(n.height-n.top-n.bottom,0);this._canvasClipRect.attr({x:n.left,y:n.top,width:e,height:t}),this._backgroundRect.attr({x:n.left,y:n.top,width:e,height:t})},_getCanvasClipRectID(){return this._canvasClipRect.id},_dataSourceChangedHandler(){this._changes.has("INIT")?this._requestChange(["DATA_INIT"]):this._requestChange(["FORCE_DATA_INIT"])},_dataInit(){this._dataSpecificInit(!0)},_processSingleSeries(n){n.createPoints(!1)},_handleSeriesDataUpdated(){this._getVisibleSeries().some(n=>n.useAggregation())&&this._populateMarginOptions(),this.series.forEach(n=>this._processSingleSeries(n),this)},_dataSpecificInit(n){(!this.series||this.needToPopulateSeries)&&(this.series=this._populateSeries()),this._repopulateSeries(),this._seriesPopulatedHandlerCore(),this._populateBusinessRange(),this._tracker.updateSeries(this.series,this._changes.has("INIT")),this._updateLegend(),n&&this._requestChange(["FULL_RENDER"])},_forceRender(){this._doRender({force:!0})},_repopulateSeries(){const n=this._themeManager,e=this._dataSourceItems(),t=n.getOptions("dataPrepareSettings");n.getOptions("seriesTemplate")&&this._populateSeries(e),this._groupSeries();const r=Hf(e,this._groupsData,this._incidentOccurred,t);n.resetPalette(),this.series.forEach(m=>{m.updateData(r[m.getArgumentField()])}),this._handleSeriesDataUpdated()},_renderCompleteHandler(){let n=!0;this._needHandleRenderComplete&&(this.series.forEach(e=>{n=n&&e.canRenderCompleteHandle()}),n&&(this._needHandleRenderComplete=!1,this._eventTrigger("done",{target:this})))},_dataIsReady(){return(0,C.O9)(this.option("dataSource"))&&this._dataIsLoaded()},_populateSeriesOptions(n){const e=this._themeManager,t=e.getOptions("seriesTemplate"),i=t?Jo(t,n||[]):this.option("series"),r=iD(i)?i:i?[i]:[],m=this._getExtraOptions();let A,V;const X=[],ce=_e=>{this._specialProcessSeries(),this._populateBusinessRange(_e&&_e.getValueAxis(),!0),this._renderer.stopAllAnimations(!0),this._updateLegend(),this._requestChange(["FULL_RENDER"])};for(let _e=0;_e<r.length;_e++)A=(0,_.X)(!0,{},r[_e],m),(!(0,C.O9)(A.name)||""===A.name)&&(A.name=`Series ${(_e+1).toString()}`),A.rotated=this._isRotated(),A.customizePoint=e.getOptions("customizePoint"),A.customizeLabel=e.getOptions("customizeLabel"),A.visibilityChanged=ce,A.incidentOccurred=this._incidentOccurred,V=e.getOptions("series",A,r.length),this._checkPaneName(V)&&X.push(V);return X},_populateSeries(n){var e;const t=[],i=this._incidentOccurred,r=this._populateSeriesOptions(n);let m,A=!1;this.needToPopulateSeries=!1,r.forEach(X=>{var ce;const _e=null===(ce=this.series)||void 0===ce?void 0:ce.find(Me=>Me.name===X.name&&!t.map(Ve=>Ve.series).includes(Me));_e&&_e.type===X.type?t.push({series:_e,options:X}):(t.push({options:X}),A=!0)}),0!==(null===(e=this.series)||void 0===e?void 0:e.length)&&this._tracker.clearHover(),(0,w.iW)(this.series,(X,ce)=>{t.some(_e=>ce===_e.series)||(this._disposeSeries(X),A=!0)}),!A&&(A=t.some(X=>X.series.name!==r[X.series.index].name)),this.series=[],A&&this._disposeSeriesFamilies(),this._themeManager.resetPalette();const V=X=>{this.series.forEach(ce=>{ce.notify(X)})};return t.forEach(X=>{var ce;const _e=X.options,Me=(null===(ce=this._argumentAxes)||void 0===ce?void 0:ce.filter(Je=>Je.pane===_e.pane)[0])??this.getArgumentAxis(),Ve={commonSeriesModes:this._getSelectionModes(),argumentAxis:Me,valueAxis:this._getValueAxis(_e.pane,_e.axis)};X.series?(m=X.series,m.updateOptions(_e,Ve)):m=new Hc((0,_.X)({renderer:this._renderer,seriesGroup:this._seriesGroup,labelsGroup:this._labelsGroup,eventTrigger:this._eventTrigger,eventPipe:V,incidentOccurred:i},Ve),_e),m.isUpdated?(m.index=this.series.length,this.series.push(m)):i("E2101",[_e.type])}),this.series},getStackedPoints(n){const e=n.series.getStackName();return this._getVisibleSeries().reduce((t,i)=>((!(0,C.O9)(i.getStackName())||!(0,C.O9)(e)||e===i.getStackName())&&(t=t.concat(i.getPointsByArg(n.argument))),t),[])},getAllSeries:function(){return(this.series||[]).slice()},getSeriesByName:function(n){return(this.series||[]).find(t=>t.name===n)||null},getSeriesByPos:function(n){return(this.series||[])[n]},clearSelection:function(){this._tracker.clearSelection()},hideTooltip(){this._tracker._hideTooltip()},clearHover(){this._tracker.clearHover()},render(n){return this.__renderOptions=n,this.__forceRender=n&&n.force,this.callBase.apply(this,arguments),this.__renderOptions=this.__forceRender=null,this},refresh(){this._disposeSeries(),this._disposeSeriesFamilies(),this._requestChange(["CONTAINER_SIZE","REFRESH_SERIES_REINIT"])},_getMinSize(){const n=this._layoutManagerOptions();return[n.width,n.height]},_change_REFRESH(){this._changes.has("INIT")?this._currentRefreshData=null:this._doRefresh()},_change_FULL_RENDER(){this._forceRender()},_change_INIT(){this._reinit()},_stopCurrentHandling(){this._disposed||this._tracker.stopCurrentHandling()}});["series","commonSeriesSettings","dataPrepareSettings","seriesSelectionMode","pointSelectionMode","synchronizeMultiAxes","resolveLabelsOverlapping"].forEach(n=>{ug.prototype._optionChangesMap[n]="REFRESH_SERIES_DATA_INIT"}),["adaptiveLayout","crosshair","resolveLabelOverlapping","adjustOnZoom","stickyHovering"].forEach(n=>{ug.prototype._optionChangesMap[n]="FORCE_RENDER"}),["minBubbleSize","maxBubbleSize","barGroupPadding","barGroupWidth","negativesAsZeroes","negativesAsZeros"].forEach(n=>{ug.prototype._optionChangesMap[n]="REFRESH_SERIES_FAMILIES"}),ug.addPlugin(bv),ug.addPlugin(Xp),ug.addPlugin(cs),ug.addPlugin(qy),ug.addPlugin(LC);const{_change_TITLE:PM}=ug.prototype;ug.prototype._change_TITLE=function(){PM.apply(this,arguments),this._change(["FORCE_RENDER"])};const Fv=Number;function _f(){this.setDomain(arguments[0],arguments[1]).setCodomain(arguments[2],arguments[3]).setInverted(!1)}_f.prototype={constructor:_f,setDomain:function(n,e){return this._domain1=Fv(n),this._domain2=Fv(e),this._domainDelta=this._domain2-this._domain1,this},setCodomain:function(n,e){return this._codomain1=Fv(n),this._codomain2=Fv(e),this._codomainDelta=this._codomain2-this._codomain1,this},setInverted(n){this.inverted=n},getDomain:function(){return[this._domain1,this._domain2]},getCodomain:function(){return[this._codomain1,this._codomain2]},getDomainStart:function(){return this._domain1},getDomainEnd:function(){return this._domain2},getCodomainStart:function(){return this._codomain1},getCodomainEnd:function(){return this._codomain2},getDomainRange:function(){return this._domainDelta},getCodomainRange:function(){return this._codomainDelta},translate:function(n){let e=(Fv(n)-this._domain1)/this._domainDelta;return this.inverted&&(e=1-e),0<=e&&e<=1?this._codomain1+e*this._codomainDelta:NaN},adjust:function(n){const e=(Fv(n)-this._domain1)/this._domainDelta;let t=NaN;return e<0?t=this._domain1:e>1?t=this._domain2:0<=e&&e<=1&&(t=Fv(n)),t}};const oy=_.X,cD={ThemeManager:th.inherit({ctor(n){this.callBase.apply(this,arguments),this._subTheme=n.subTheme},_initializeTheme:function(){const n=this;let e;n._subTheme&&(e=oy(!0,{},n._theme[n._subTheme],n._theme),oy(!0,n._theme,e)),n.callBase.apply(n,arguments)}})};var Vb=M(8573),$d=M(2720);const hm="gauge-tooltip",rB=$d.A.add,dD=es.A.inherit({ctor:function(n){const e=this;e._element=n.renderer.g().attr({class:"dxg-tracker",stroke:"none","stroke-width":0,fill:"#000000",opacity:1e-4}).linkOn(n.container,{name:"tracker",after:"peripheral"}),e._showTooltipCallback=function(){const t=e._tooltipEvent.target,i=t["gauge-data-target"],r=t["gauge-data-info"];if(e._targetEvent=null,e._tooltipTarget!==t){const m=A=>{A&&(e._tooltipTarget=t)};m(e._callbacks["tooltip-show"](i,r,m))}},e._hideTooltipCallback=function(){e._hideTooltipTimeout=null,e._targetEvent=null,e._tooltipTarget&&(e._callbacks["tooltip-hide"](),e._tooltipTarget=null)},e._dispose=function(){clearTimeout(e._hideTooltipTimeout),e._showTooltipCallback=e._hideTooltipCallback=e._dispose=null}},dispose:function(){return this._dispose(),this.deactivate(),this._element.off("."+hm),this._element.linkOff(),this._element=this._context=this._callbacks=null,this},activate:function(){return this._element.linkAppend(),this},deactivate:function(){return this._element.linkRemove().clear(),this},attach:function(n,e,t){return n.data({"gauge-data-target":e,"gauge-data-info":t}).append(this._element),this},detach:function(n){return n.remove(),this},setTooltipState:function(n){const e=this;if(e._element.off("."+hm),n){const t={tracker:e};e._element.on((0,N.b4)([Si.A.move],hm),t,uD).on((0,N.b4)([Si.A.out],hm),t,hD).on((0,N.b4)([Si.A.down],hm),t,gD).on((0,N.b4)([Si.A.up],hm),t,Hb).on((0,N.b4)([Vb.U],hm),t,pD)}return e},setCallbacks:function(n){return this._callbacks=n,this},_showTooltip:function(n){clearTimeout(this._hideTooltipTimeout),this._hideTooltipTimeout=null,this._tooltipTarget!==n.target&&(this._tooltipEvent=n,this._showTooltipCallback())},_hideTooltip:function(n){const e=this;clearTimeout(e._hideTooltipTimeout),n?e._hideTooltipTimeout=setTimeout(e._hideTooltipCallback,n):e._hideTooltipCallback()}});let pm=null;function uD(n){const e=n.data.tracker;e._x=n.pageX,e._y=n.pageY,e._showTooltip(n)}function hD(n){n.data.tracker._hideTooltip(100)}function pD(n){n.data.tracker._hideTooltip()}function gD(n){(pm=n.data.tracker)._touch=!0,uD(n)}function Hb(){pm._touch=!1}function E0(n){pm&&!pm._touch&&(pm._hideTooltip(100),pm=null)}rB(function(){L.A.subscribeGlobal(c.A.getDocument(),(0,N.b4)([Si.A.down],hm),E0)});const RM=dD,QE=Number,fD=_.X,JE=Hd.A.format,qc=Vh.inherit({_rootClassPrefix:"dxg",_themeSection:"gauge",_createThemeManager:function(){return new cD.ThemeManager(this._getThemeManagerOptions())},_initCore:function(){const n=this._renderer.root;this._valueChangingLocker=0,this._translator=this._factory.createTranslator(),this._tracker=this._factory.createTracker({renderer:this._renderer,container:n}),this._setTrackerCallbacks()},_beginValueChanging:function(){this._resetIsReady(),this._onBeginUpdate(),++this._valueChangingLocker},_endValueChanging:function(){0==--this._valueChangingLocker&&this._drawn()},_setTrackerCallbacks:function(){const n=this._renderer,e=this._tooltip;this._tracker.setCallbacks({"tooltip-show":function(t,i,r){const m=t.getTooltipParameters(),A=n.getRootOffset(),V=fD({value:m.value,valueText:e.formatValue(m.value),color:m.color},i);return e.show(V,{x:m.x+A.left,y:m.y+A.top,offset:m.offset},{target:i},void 0,r)},"tooltip-hide":function(){return e.hide()}})},_dispose:function(){this._cleanCore(),this.callBase.apply(this,arguments)},_disposeCore:function(){this._themeManager.dispose(),this._tracker.dispose(),this._translator=this._tracker=null},_cleanCore:function(){this._tracker.deactivate(),this._cleanContent()},_renderCore:function(){this._isValidDomain&&(this._renderContent(),this._renderGraphicObjects(),this._tracker.setTooltipState(this._tooltip.isEnabled()),this._tracker.activate(),this._noAnimation=!1)},_applyChanges:function(){this.callBase.apply(this,arguments),this._resizing=this._noAnimation=!1},_setContentSize:function(){this._resizing=this._noAnimation=2===this._changes.count(),this.callBase.apply(this,arguments)},_applySize:function(n){this._innerRect={left:n[0],top:n[1],right:n[2],bottom:n[3]};const e=this._layout._cache;return this._cleanCore(),this._renderCore(),this._layout._cache=this._layout._cache||e,[n[0],this._innerRect.top,n[2],this._innerRect.bottom]},_initialChanges:["DOMAIN"],_themeDependentChanges:["DOMAIN"],_optionChangesMap:{subtitle:"MOSTLY_TOTAL",indicator:"MOSTLY_TOTAL",geometry:"MOSTLY_TOTAL",animation:"MOSTLY_TOTAL",startValue:"DOMAIN",endValue:"DOMAIN"},_optionChangesOrder:["DOMAIN","MOSTLY_TOTAL"],_change_DOMAIN:function(){this._setupDomain()},_change_MOSTLY_TOTAL:function(){this._applyMostlyTotalChange()},_updateExtraElements:h.lQ,_setupDomain:function(){const n=this;n._setupDomainCore(),n._isValidDomain=isFinite(1/(n._translator.getDomain()[1]-n._translator.getDomain()[0])),n._isValidDomain||n._incidentOccurred("W2301"),n._change(["MOSTLY_TOTAL"])},_applyMostlyTotalChange:function(){this._setupCodomain(),this._setupAnimationSettings(),this._setupDefaultFormat(),this._change(["LAYOUT"])},_setupAnimationSettings:function(){const n=this;let e=n.option("animation");n._animationSettings=null,(void 0===e||e)&&(e=fD({enabled:!0,duration:1e3,easing:"easeOutCubic"},e),e.enabled&&e.duration>0&&(n._animationSettings={duration:QE(e.duration),easing:e.easing})),n._containerBackgroundColor=n.option("containerBackgroundColor")||n._themeManager.theme().containerBackgroundColor},_setupDefaultFormat:function(){const n=this._translator.getDomain();this._defaultFormatOptions=function(n,e,t){const i=$n(po(n),po(e));let m,r=-po(gi(e-n)/t);return Ot(i)||Ot(r)?null:(gi(i)<=4?(m="fixedPoint",r<0&&(r=0),r>4&&(r=4)):(m="exponential",r+=i-1,r>3&&(r=3)),{type:m,precision:r})}(n[0],n[1],this._getApproximateScreenRange())},_setupDomainCore:null,_calculateSize:null,_cleanContent:null,_renderContent:null,_setupCodomain:null,_getApproximateScreenRange:null,_factory:{createTranslator:function(){return new _f},createTracker:function(n){return new RM(n)}}}),_u=function(n,e,t){Object.is(n,-0)&&(n=0);const i=JE(n,(e=e||{}).format);let r;return"function"==typeof e.customizeText?(r=fD({value:n,valueText:i},t),String(e.customizeText.call(r,r))):i},$u=function(n,e){const t=_u(n.getDomainStart(),e),i=_u(n.getDomainEnd(),e);return t.length>=i.length?t:i};function sB(n,e){return n&&e&&n.length===e.length&&function mD(n,e){let t;const i=n.length;let r,m;for(t=0;t<i;++t)if(r=n[t]!=n[t],m=e[t]!=e[t],!(r&&m||n[t]===e[t]))return!1;return!0}(n,e)}qc.addPlugin(bv),qc.addPlugin(Xp),qc.addPlugin(qy),qc.addPlugin(LC);const hg=qc.prototype._setTooltipOptions;qc.prototype._setTooltipOptions=function(){hg.apply(this,arguments),this._tracker&&this._tracker.setTooltipState(this._tooltip.isEnabled())};const vf=Hd.A.format,{abs:vu,floor:bp}=Math,gm="exponential",Cu=["fixedPoint","thousands","millions","billions","trillions",gm],ju=["millisecond","second","minute","hour","day","month","year"],v_={week:"day",quarter:"month",shorttime:"hour",longtime:"second"};function Ub(n,e,t,i){const r=ju.indexOf(i=v_[i]||i);if(t){const m=Tn.A.getDatesDifferences(e,t);return m[i]&&function Vv(n,e){for(let t=e;t<ju.length-1;t++){const i=ju[t];if(t===e){qE(n,e+(n.millisecond?2:1));break}if(n[i]&&n.count>1){aB(n,t);break}}}(m,r),m}{const m=Tn.A.getDatesDifferences(n,e);return!function kM(n,e){let t=!1;for(let i=ju.length-1;i>=e;i--)if(n[ju[i]]&&i-e>1){for(let m=0;m<=e;m++)aB(n,m),t=!0;break}return t}(m,r)&&1===m.count&&qE(m,r),m}}function aB(n,e){const t=ju[e];n[t]&&(n[t]=!1,n.count--)}function qE(n,e){const t=ju[e];!1===n[t]&&(n[t]=!0,n.count++)}function _D(n,e){let t,i,r,m=0;for(r=vu(e-n[0]),t=1;t<n.length;t++)i=vu(e-n[t]),i<r&&(r=i,m=t);return m}function eO(n){return n.toString().split(".")}function O0(n){let e;return(0,C.Tn)(n)&&(e=n,n=null),{type:n,formatter:e}}function w0(n,e){const t=vu(n).toString();return(0,C.O4)(n)?Math.max(vu((0,ri.Ke)(n)-(0,ri.Ke)(e)),vu((0,ri.XV)(n)-(0,ri.XV)(e))):vu(function _d(n){return n.length-parseInt(n).toString().length}(t.split(".")[1])-(0,ri.Ke)(e)+1)}function D0(n,e){let t=e.tickInterval;const i=vu(n).toString();let r=e.labelOptions.format;const m=e.ticks,A="logarithmic"===e.type;if(1===m.length&&0===m.indexOf(n)&&!(0,C.O9)(t)&&(t=vu(n)>=1?1:(0,ri.Ai)(1-vu(n),n)),Object.is(n,-0)&&(n=0),!(0,C.O9)(r)&&"discrete"!==e.type&&n&&(10===e.logarithmBase||!A))if("datetime"!==e.dataType&&(0,C.O9)(t)){if(m.length&&-1===m.indexOf(n)){const V=_D(m,n);t=(0,ri.Ai)(vu(n-m[V]),n)}if(A)return function vD(n){const e=Hi(vu(n));let t;if(e>0)t=Cu[bp(e/3)]||gm;else{if(!(e<-4))return vf((0,ri.Ai)(n));t=gm}return vf(n,{type:t,precision:0})}(n);{let V=eO(t);V<2&&(V=eO(n)),r=V.length>1&&!(0,C.O4)(t)?{type:Cu[0],precision:V[1].length}:(0,C.O4)(t)&&(-1!==i.indexOf(".")||(0,C.O4)(n))?{type:gm,precision:w0(n,t)}:function Hv(n,e){const t=bp(Hi(e));let i,r=0,m=i=bp(Hi(vu(n)));i-t>=2&&(m=t);let A=bp(m/3);const V=3*A;A<0&&(A=0);const X=Cu[A]||Cu[Cu.length-1];if(V>0){const ce=eO(e/Math.pow(10,V));ce[1]&&(r=ce[1].length)}return{precision:r,type:X}}(n,t)}}else"datetime"===e.dataType&&(r=function bl(n,e){let A,V,{showTransition:t,ticks:i,tickInterval:r}=e,m=Tn.A.getDateFormatByTickInterval(r);if(t&&i.length){const X=i.map(Number).indexOf(+n);if(1===i.length&&0===X)m=Hd.A.getDateFormatByTicks(i);else{-1===X?A=_D(i,n):(A=0===X?i.length-1:X-1,V=0===X?1:-1);const ce=Ub(i[A],n,i[V],m);m=Hd.A.getDateFormatByDifferences(ce,m)}}return O0(m)}(n,e));return vf(n,r)}function A0(n){let{startValue:e,endValue:t,tickInterval:i,argumentFormat:r,axisOptions:{dataType:m,type:A,logarithmBase:V}}=n;if("discrete"===A)return"";if("datetime"===m)return function C_(n,e,t){const i=Ub(n,e),r=Tn.A.getDateFormatByTickInterval(t),A=O0(Hd.A.getDateFormatByDifferences(i,r)),V=[];if(t in i){const X=function T0(n,e){let t=!1;for(const i in n)t?n[i]=!1:i===e?t=!0:n[i]=!0;return O0(Hd.A.getDateFormatByDifferences(n))}(Ub(n,e),t),ce=vf(n,X);ce&&V.push(ce)}else{const X=function lB(n){let e=!1;for(const t in n)!0===n[t]||"hour"===t||e?(n[t]=!1,e=!0):!1===n[t]&&(n[t]=!0);return O0(Hd.A.getDateFormatByDifferences(n))}(Ub(n,e)),ce=vf(n,X);ce&&V.push(ce),V.push(`${vf(n,A)} - ${vf(e,A)}`)}return V.join(", ")}(e,t,function LM(n){if((0,C.Gv)(n)){const e=Object.keys(n);if(1===e.reduce((i,r)=>n[r]+i,0)){const i=e.filter(r=>1===n[r])[0];return i.slice(0,i.length-1)}}return n}(i));const X={ticks:[],type:A,dataType:m,tickInterval:i,logarithmBase:V,labelOptions:{format:r}};return`${D0(e,X)} - ${D0(t,X)}`}const qs={logarithmic:"logarithmic",discrete:"discrete",numeric:"numeric",left:"left",right:"right",top:"top",bottom:"bottom",center:"center",horizontal:"horizontal",vertical:"vertical",convertTicksToValues:function(n){return ui(n||[],function(e){return e.value})},validateOverlappingMode:function(n){return"ignore"===n||"none"===n?n:"hide"},getTicksCountInRange:function(n,e,t){let i=1;if(n.length>1)for(;i<n.length&&!(Math.abs(n[i].coords[e]-n[0].coords[e])>=t);i++);return i},areLabelsOverlap:function(n,e,t,i){let A=n.x,V=e.x;const X=n.width,ce=e.width;return"left"===i?(A+=X/2,V+=ce/2):"right"===i&&(A-=X/2,V-=ce/2),(n.x>e.x?V+ce+t>A:A+X+t>V)&&(n.y>e.y?e.y+e.height>n.y:n.y+n.height>e.y)}},CD=Tn.A.convertDateUnitToMilliseconds,fm=Tn.A.dateToMilliseconds,Uv=Math,Ac=Uv.abs,y_=Uv.floor,xp=Uv.ceil,mm=Uv.pow,tO=[1,2,2.5,5],Hh=[1,2,3,5],nO={millisecond:[1,2,5,10,25,50,100,250,500],second:[1,2,3,5,10,15,20,30],minute:[1,2,3,5,10,15,20,30],hour:[1,2,3,4,6,8,12],day:[1,2],week:[1,2],month:[1,2,3,6]},JV=(0,_.X)({},nO,{day:[1]}),qV={millisecond:[1,2,5,10,25,50,100,250,500],second:[1,2,3,5,10,15,20,30],minute:[1,2,3,5,10,15,20,30],hour:[1,2,3,4,6,8,12],day:[1,2,3,7,14],month:[1,2,3,6]},zb=[2,4,5,8,10],yD=3,Ll=n=>n,iO=(n,e,t)=>i=>Mr(i,n,e,t),Ep=(n,e,t)=>(i,r)=>(0,ri.Ai)(n(e((0,ri.Ai)(t(i)/r))*r));function Ws(n,e,t,i){return(0,C.O9)(i)?i?n:e:function(r,m,A,V){const X=n(r,m);return r-X==0||!(0,C.O9)(A)||t(r,X,m,A)||V?X:e(r,m)}}function _m(n,e,t,i){const r=t-Ac(e-n),m=Uv.max(xp(i.businessDelta/t),2),A=i.screenDelta/(m*t),V=Uv.round(A*r),X=Mr(A*t/i.axisDivisionFactor,2)+1,_e=Uv.round(yD*((i.isSpacedMargin?2:1)*X));return i.businessDelta>i.interval&&V>=_e}function ea(n){return function(e,t,i,r){return _m(Mr(e,n),Mr(t,n),i,r)}}function bD(n,e,t,i){return _m(n.valueOf(),e.valueOf(),fm(t),i)}function xD(n,e){let t=0;return e&&(t=e.reduce((i,r)=>i+(r.to-r.from),0)),Ac(n.max-n.min-t)}function pg(n,e,t,i){let r=e/t-(i||0);return r=r<1?1:r,n/r}function SD(n,e){return mm(10,y_(Mr(n,10))+(e||0))}function dB(n,e,t,i,r,m,A,V,X,ce){const _e=pg(n,e,r,V);let Me=1;const Ve=!1===A;return(!i||!t)&&((_e>=1||!Ve&&_e>0)&&(Me=Wb(_e,m,Ve)),(!t||!i&&t<Me)&&(t=Me)),!i&&ce&&(ce=Wb(ce,m,Ve))>t&&(t=ce),t}function Wb(n,e,t){const i=SD(n,-1);let r=1;return e=e||tO,n>0&&(n/=i,r=e.concat(10*e[0]).map(m=>10*m).reduce((m,A)=>.1===i&&t&&25===A?m:m<n?A:m,0),r=(0,ri.Ai)(r*i,i)),r}function NM(n,e,t,i){const r=pg(n,e,i);return t||zb.reduce((m,A)=>{const V=n/A;return V>=r?V:m},0)}function ED(n){return function(e,t){let i=SD(e);return!n&&i<1&&(i=1),(t=t||Hh).concat(10*t[0]).reduce((r,m)=>r<e?m*i:r,0)}}function pB(n,e){return function(t,i){return!t&&n<=CD(e,i)&&((t={})[e+"s"]=i),t}}function oO(n,e){return function(t,i){const r=e*i;return!t&&n<=CD("year",r)&&2.5!==r&&(t={years:r}),t}}function OD(n,e,t,i,r,m,A,V,X,ce){if(!i||!t){const _e=I0(pg(n,e,r),m,0,X);(!t||!i&&fm(t)<=fm(_e))&&(t=_e)}return!i&&ce&&(ce=I0(ce,m,0,X),fm(ce)>fm(t)&&(t=ce)),t}function I0(n,e,t,i){let r;e=e||function hB(n){return n&&n>2?JV:nO}(i);for(const m in e)if(r=e[m].reduce(pB(n,m),r),r)break;if(!r)for(let m=1;r=tO.reduce(oO(n,m),r),!r;m*=10);return r}function FM(n,e,t,i){return OD(n,e,t,!0,i,qV)}function Gv(n,e){return t=>t&&e(Ac((0,ri.Ai)(n(t[1])-n(t[0]))))||void 0}function Ku(n,e,t){return Tn.A.addInterval(n,e,t)}function rO(n,e,t){return Ku(n,e,t)}function sO(n,e,t){return e=e.filter(i=>!i.gapSize),function(i,r,m){let A;return i=n(i,r,m),e.every(V=>(i>=n(V.from,r)&&n(i,r)<V.to&&(A=V.to-V.from-2*(n(V.from,r)-V.from)),!A))||(i=t(n(i,A),r)),i}}function P0(n,e,t,i){return function(r,m,A,V,X,ce,_e,Me,Ve){const Je=function HM(n,e){return function(t){let i;return e.every(r=>(t>=r.from&&t<r.to&&(i=r.gapSize),!i))||(t=n(t,i)),t}}(n,V),rt=r.min,Ct=r.max,Xt={screenDelta:_e,businessDelta:ce,axisDivisionFactor:Me,isSpacedMargin:r.isSpacedMargin,interval:m};let On=e(rt,m,Xt);const Fn=[];let oi;for(null!=X&&X.length&&(n=sO(n,X,e)),On>Ct&&(On=e(rt,t(ce/2),Xt),On>Ct&&(On=e(rt,m,Xt,A=!0))),On=Je(On);On<Ct&&On!==oi||Ve&&On<=Ct;)Fn.push(On),oi=On,On=Je(n(On,m));return(A||On-Ct==0||!(0,C.O9)(A)&&i(Ct,On,m,Xt))&&Fn.push(On),Fn}}function $b(n,e,t,i,r){return function(m,A,V,X,ce,_e,Me){const Ve=ce/X,Je=V[V.length-1],rt=V[0];let Ct=Me-1;if(null!=_e&&_e.length&&(e=sO(e,_e,t)),0===(X=n(X,rt,rt,Ve)))return[];let Xt=i(t(m,ce,m),X);X=n(X,rt,Xt,Ve);let On=[];for(;Xt<rt&&(!Ct||Ct>0);)Xt>=m&&On.push(Xt),Ct--,Xt=e(Xt,X);const Fn=V.reduce(($t,xn)=>{if(Ct=Me-1,null===$t.prevTick)return $t.prevTick=xn,$t;X=n(X,xn,$t.prevTick,Ve);let Gn=i($t.prevTick,X);for(;Gn<xn&&(!Ct||Ct>0);)Gn!==$t.prevTick&&$t.minors.push(Gn),Ct--,Gn=e(Gn,X);return $t.prevTick=xn,$t},{prevTick:null,minors:[]});On=On.concat(Fn.minors);const oi=r(A,ce,m);let Yt;for(X=n(X,oi,oi,Ve),Xt=i(Je,X);Xt<A&&Xt!==Yt;)On.push(Xt),Yt=Xt,Xt=e(Xt,X);return Je-A!=0&&Xt-A==0&&On.push(Xt),On}}function wD(n,e){if(e.length){const t=e.reduce((i,r)=>{const m=[];let A;for(A=i[1];A<n.length;A++){const V=n[A];if(V<r.from&&m.push(V),V>=r.to)break}return[i[0].concat(m),A]},[[],0]);return t[0].concat(n.slice(t[1]))}return n}function aO(n,e,t,i,r,m,A,V,X,ce){function _e(Me,Ve,Je){return Me&&Ve/A(Me)>=Je+1&&(n.incidentOccurred("W2003"),Me=void 0),Me}return function(Me,Ve,Je,rt,Ct,Xt,On,Fn){Ct=Ct||{};const oi=e(Me,Fn);let Yt={tickInterval:r(($t=Ct).majors),ticks:$t.majors||[],minorTickInterval:m($t.minors),minorTicks:$t.minors||[]};var $t;return isNaN(oi)||(0!==oi||Ct.majors?(Yt=function($t,xn,Gn,qn,ii,qi,ji,$i){if(ji.majors)return $t.breaks=$i,$t;const ho=$i.filter(Uo=>Uo.gapSize);let io;return ii=n.skipCalculationLimits?ii:_e(ii,Gn,qn),ii=t(Gn,qn,ii,qi,n.axisDivisionFactor,n.numberMultipliers,n.allowDecimals,$i.length,ho[0]&&ho[0].gapSize.days,n.minTickInterval),n.skipTickGeneration||(io=V(xn,ii,n.endOnTick,ho,$i,Gn,qn,n.axisDivisionFactor,n.generateExtraTick),io=wD(io,$i=ce($i,io,ii)),$t.breaks=$i,$t.ticks=$t.ticks.concat(io)),$t.tickInterval=ii,$t}(Yt,Me,oi,Ve,Je,rt,Ct,Fn||[]),!n.skipTickGeneration&&oi>0&&(Yt=function($t,xn,Gn,qn,ii,qi,ji){if(!n.calculateMinors||ji.minors)return $t;const $i=A($t.tickInterval),ho=qn*$i/Gn,io=$t.breaks;return!ii&&qi?ii=m([$i/(qi+1),$i/(qi+1)*2]):qi=void 0,ii=_e(ii,$i,ho),ii=i($i,ho,ii,n.minorAxisDivisionFactor),$t.minorTicks=wD($t.minorTicks.concat(X(xn.min,xn.max,$t.ticks,ii,$t.tickInterval,io,qi)),io),$t.minorTickInterval=ii,$t}(Yt,Me,oi,Ve,Xt,On,Ct))):Yt.ticks=[Me.min]),Yt}}function Wv(n,e,t,i){let[r,m]=e;return(!(0,C.O9)(r)||Ac(i(n)-i(r))/t>.25)&&((0,C.O9)(m)&&Ac(i(m)-i(r))/t<2?r=m:(0,C.O9)(r)||(r=n)),r}function M0(n,e,t){return function(i,r,m){const A=n(m),V=.5*A;return i.reduce((X,ce)=>{let _e=r.filter(Je=>Je<=ce.from);const Me=t(Wv(ce.from,[].concat(_e[_e.length-1],r[_e.length]),A,e),V);_e=r.filter(Je=>Je>=ce.to);const Ve=t(Wv(ce.to,[].concat(_e[0],r[r.length-_e.length-1]),A,e),-V);return e(Ve)-e(Me)<A&&!ce.gapSize?X:X.concat(ce.gapSize?[ce]:[{from:Me,to:Ve,cumulativeWidth:ce.cumulativeWidth}])},[])}}const lO=(n,e,t)=>(i,r)=>(0,ri._S)(i)*(0,ri.Ai)(n(e(i)((0,ri.Ai)(t(i)/r))*r));const UM=function(n){let e;return e=n.rangeIsEmpty?function Sp(n){return function(e,t,i,r){let m=y_(t/n.axisDivisionFactor);m=m<1?1:m;const A=t/m;return{ticks:A>0?Array.apply(null,new Array(m+1)).map((V,X)=>A*X):[],tickInterval:A}}}(n):"discrete"===n.axisType?function Gb(n){return function(e,t,i,r){const m=fr(e.categories,e.min,e.max).categories;return{ticks:m,tickInterval:xp(m.length*n.axisDivisionFactor/t)}}}(n):"logarithmic"===n.axisType?function DD(n){const e=n.logBase,t=((n,e,t)=>i=>dn(i,n,e,t))(e,n.allowNegatives,n.linearThreshold),i=iO(e,n.allowNegatives,n.linearThreshold),r=(n=>e=>0===e?0:Ei(Ac(e),n))(e),m=(n=>e=>mo(e,n))(e),A=lO(m,ce=>ce<0?xp:y_,r),V=lO(m,ce=>ce<0?y_:xp,r),X=Ep(Ll,xp,Ll);return aO(n,function cB(n,e,t){const i=iO(n,e,t);return function(r,m){let A=0;return m&&(A=m.reduce((V,X)=>V+Ac(i(X.to/X.from)),0)),xp(Ac(i(r.max)-i(r.min))-A)}}(e,n.allowNegatives,n.linearThreshold),function uB(n){return function(e,t,i,r,m,A,V,X,ce,_e){const Me=pg(e,t,m);let Ve=0;const Je=ED(n);return(!r||!i)&&(Me>0&&(Ve=Je(Me,A)),(!i||!r&&i<Ve)&&(i=Ve)),!r&&_e&&(_e=Je(_e,A))>i&&(i=_e),i}}(n.skipCalculationLimits),NM,Gv(i,Ll),Gv(Ll,Ll),Ll,P0(function VM(n,e){return(t,i,r)=>e(Ku(n(t),i,r))}(i,t),Ws(A,V,ea(e),n.endOnTick),ED(n.skipCalculationLimits),ea(e)),$b((ce,_e,Me,Ve)=>Math.max(Math.abs(_e),Math.abs(Me))/Ve,Ku,A,X,V),M0(Ll,i,(ce,_e)=>t(i(ce)+_e)))}(n):"datetime"===n.dataType?function AD(n){function e(i,r){const m=Ep(Ll,y_,Ll);let A=(0,C.Kg)(r)?Tn.A.getDateIntervalByString(r.toLowerCase()):r;const V=fm(r);(A.days%7==0||r.quarters)&&(A=I0(V));const X=_e=>Tn.A.correctDateWithUnitBeginning(_e,A,null,n.firstDayOfWeek),ce=_e=>new Date(y_((_e.getTime()-6e4*_e.getTimezoneOffset())/V)*V+6e4*_e.getTimezoneOffset());return i=X(i),"years"in A?i.setFullYear(m(i.getFullYear(),A.years)):"quarters"in A?i=X(ce(i)):"months"in A?i.setMonth(m(i.getMonth(),A.months)):"weeks"in A||"days"in A?i=X(ce(i)):"hours"in A?i.setHours(m(i.getHours(),A.hours)):"minutes"in A?i.setMinutes(m(i.getMinutes(),A.minutes)):"seconds"in A?i.setSeconds(m(i.getSeconds(),A.seconds)):"milliseconds"in A&&(i=ce(i)),i}const t=Gv(Ll,Tn.A.convertMillisecondsToDateUnits);return aO(n,xD,OD,FM,t,t,fm,P0(rO,Ws(e,function(i,r){let m=e(i,r);for(;i-m>0;)m=rO(m,r);return m},bD,n.endOnTick),I0,bD),$b(Ll,rO,e,rO,Ll),M0(fm,Ll,(i,r)=>new Date(i.getTime()+r)))}(n):function TD(n){const e=Ep(Ll,y_,Ll),t=Ep(Ll,xp,Ll),i=Gv(Ll,Ll);return aO(n,xD,dB,NM,i,i,Ll,P0(Ku,Ws(e,t,_m,n.endOnTick),Wb,_m),$b(Ll,Ku,e,Ku,Ll),M0(Ll,Ll,(r,m)=>r+m))}(n),e},jb=C.O9,R0=C.$P,ID=C.Tn;function Kb(n,e){return e<n}function Xb(n,e){return e>n}function $M(n,e,t,i){const r=jb(e);jb(n)?r&&i(n,e)&&t(e):r&&t(e)}const Bl=function(n){n&&(0,_.X)(this,n)};Bl.prototype={constructor:Bl,addRange:function(n){const e=this,t=e.categories,i=n.categories,r="discrete"===e.axisType,m=function(X,ce){$M(e[X],n[X],function(_e){e[X]=_e},ce)},A=function(X,ce,_e){$M(e[X],e[ce],function(Me){jb(e[X])&&(e[X]=Me)},_e)},V=function(X){e[X]=e[X]||n[X]};return V("invert"),V("containsConstantLine"),V("axisType"),V("dataType"),V("isSpacedMargin"),"logarithmic"===e.axisType?V("base"):e.base=void 0,m("min",Kb),m("max",Xb),r?(V("minVisible"),V("maxVisible")):(m("minVisible",Kb),m("maxVisible",Xb)),m("interval",Kb),r||(A("min","minVisible",Kb),A("min","maxVisible",Kb),A("max","maxVisible",Xb),A("max","minVisible",Xb)),e.categories=void 0===t?i:i?Ii(t.concat(i)):t,"logarithmic"===e.axisType&&(V("allowNegatives"),m("linearThreshold",Kb)),e},isEmpty:function(){return!(jb(this.min)&&jb(this.max)||this.categories&&0!==this.categories.length)},correctValueZeroLevel:function(){const n=this;if(R0(n.max)||R0(n.min))return n;function e(t,i){n[t]<0&&n[i]<0&&(n[i]=0),n[t]>0&&n[i]>0&&(n[t]=0)}return e("min","max"),e("minVisible","maxVisible"),n},sortCategories(n){if(!1!==n&&this.categories)if(Array.isArray(n)){const e=n.map(i=>i.valueOf()),t=this.categories.filter(i=>-1===e.indexOf(i.valueOf()));this.categories=n.concat(t)}else{const e=!ID(n);e&&"string"!==this.dataType?n=(t,i)=>t.valueOf()-i.valueOf():e&&(n=!1),n&&this.categories.sort(n)}}};const k0=Math.round;function fB(n){return n}const e2={translate:function(n,e){const t=this._canvasOptions,i=this._categoriesToPoints[n?.valueOf()],r=this.translateSpecialCase(n),m=t.startPointIndex||0,A=this._options.stick?0:.5;return(0,C.O9)(r)?k0(r):i||0===i?k0(this._calculateProjection(t.interval*(i+A-m+.5*(e=e||0)))):null},getInterval:function(){return this._canvasOptions.interval},getEventScale:function(n){return 1-(1-(n.deltaScale||1))/(.75+this.visibleCategories.length/this._categories.length)},zoom:function(n,e){const t=this._categories,i=this._canvasOptions,r=this._options.stick,m=i.invert,A=i.interval*e,V=n/A,X=(this.visibleCategories||[]).length;let ce=parseInt((i.startPointIndex||0)+V+.5);const _e=parseInt((0,ri.Ai)(i.canvasLength/A)+(r?1:0))||1;let Me;m&&(ce=parseInt((i.startPointIndex||0)+X-V+.5)-_e),ce<0&&(ce=0),Me=ce+_e,Me>t.length&&(Me=t.length,ce=Me-_e,ce<0&&(ce=0));const Ve=t.slice(parseInt(ce),parseInt(Me)),Je=this._getDiscreteInterval(Ve.length,i);return e=Je/i.interval,n=this.translate(m?Ve[Ve.length-1]:Ve[0])*e-(i.startPoint+(r?0:Je/2)),{min:Ve[0],max:Ve[Ve.length-1],translate:n,scale:e}},getMinScale:function(n){const e=this._canvasOptions;let t=(this.visibleCategories||this._categories).length;return t+=(parseInt(.1*t)||1)*(n?-2:2),e.canvasLength/(Math.max(t,1)*e.interval)},getScale:function(n,e){const t=this._canvasOptions,i=this.getCanvasVisibleArea(),r=!this._options.stick&&1;let m=(0,C.O9)(n)?this.translate(n,-r):null,A=(0,C.O9)(e)?this.translate(e,+r):null;return null===m&&(m=t.invert?i.max:i.min),null===A&&(A=t.invert?i.min:i.max),this.canvasLength/Math.abs(A-m)},isValid:function(n){return!!(0,C.O9)(n)&&this._categoriesToPoints[n.valueOf()]>=0},getCorrectValue:fB,to:function(n,e){const t=this._canvasOptions,i=this._categoriesToPoints[n?.valueOf()];return k0(this._calculateProjection(t.interval*(i+(this._options.stick?0:.5)-(t.startPointIndex||0)+(this._businessRange.invert?-1:1)*e*.5)))},from:function(n){const t=this._canvasOptions,r=this.visibleCategories||this._categories,m=r.length;let V=k0((n-t.startPoint)/t.interval+(this._options.stick?.5:0)-.5-.5*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0));return V>=m&&(V=m-1),V<0&&(V=0),t.invert&&(V=m-V-1),r[V]},_add:function(){return NaN},toValue:fB,isValueProlonged:!0,getRangeByMinZoomValue(n,e){const t=this._categories,i=t.indexOf(e.minVisible),r=t.indexOf(e.maxVisible),m=i+n-1;return t[m]?[e.minVisible,t[m]]:[t[r-n+1],e.maxVisible]}},RD=Math.floor,cO={_intervalize:function(n,e){if((0,C.O9)(n))return"datetime"===this._businessRange.dataType?(n=(0,C.kf)(n)?new Date(n):new Date(n.getTime()),n=Tn.A.correctDateWithUnitBeginning(n,e,null,this._options.firstDayOfWeek)):n=(0,ri.Ai)(RD((0,ri.Ai)(n/e))*e,e),n},translate:function(n,e,t,i){const r=this.translateSpecialCase(n);return(0,C.O9)(r)?Math.round(r):this.isValid(n,i=i||this._options.interval)?this.to(n,e,t,i):null},getInterval:function(){return Math.round(this._canvasOptions.ratioOfCanvasRange*(this._businessRange.interval||Math.abs(this._canvasOptions.rangeMax-this._canvasOptions.rangeMin)))},zoom:function(){},getMinScale:function(){},getScale:function(){},_parse:function(n){return"datetime"===this._businessRange.dataType?new Date(n):Number(n)},fromValue:function(n){return this._parse(n)},toValue:function(n){return this._parse(n)},isValid:function(n,e){const t=this,i=t._canvasOptions;let r=i.rangeMin,m=i.rangeMax;return e=e||t._options.interval,!(null===n||isNaN(n)||(n="datetime"===t._businessRange.dataType&&(0,C.kf)(n)?new Date(n):n,e!==t._options.interval&&(r=t._intervalize(r,e),m=t._intervalize(m,e)),n.valueOf()<r||n.valueOf()>=Tn.A.addInterval(m,e)))},to:function(n,e,t,i){const r=this._intervalize(n,i=i||this._options.interval),m=Tn.A.addInterval(r,i);let A=this._to(r,t);const V=this._to(m,t);return e?e>0&&(A=V):A=RD((A+V)/2),A},_to:function(n,e){const t=this._canvasOptions,i=t.rangeMinVisible,r=t.rangeMaxVisible;let m=n-i;n<i?m=0:n>r&&(m=Tn.A.addInterval(r,this._options.interval)-i);const A=this._calculateProjection(m*this._canvasOptions.ratioOfCanvasRange);return this._conversionValue(A,e)},from:function(n,e){const t=this._options.interval;let i=t;const r=this._canvasOptions,m=r.rangeMinVisible,A=r.rangeMaxVisible;let V;return"datetime"===this._businessRange.dataType&&(i=Tn.A.dateToMilliseconds(t)),V=this._calculateUnProjection((n-this._canvasOptions.startPoint)/this._canvasOptions.ratioOfCanvasRange),V=this._intervalize(Tn.A.addInterval(V,i/2,e>0),t),V<m?V=m:V>A&&(V=A),V},_add:function(){return NaN},isValueProlonged:!0};function kD(n){return null!==n?new Date(n):n}const L0={fromValue:kD,toValue:kD,_add:Tn.A.addDateInterval,convert:Tn.A.dateToMilliseconds},jM={fromValue:function(n){return null!==n?Mr(n,this._canvasOptions.base,this._businessRange.allowNegatives,this._businessRange.linearThreshold):n},toValue:function(n){return null!==n?dn(n,this._canvasOptions.base,this._businessRange.allowNegatives,this._businessRange.linearThreshold):n},getMinBarSize:function(n){const e=this.getCanvasVisibleArea(),t=this.from(e.min+n),i=this._canvasOptions,r=this.fromValue(this.from(e.min)),m=this.fromValue(t??this.from(e.max)),A=Math.abs(r-m);return Math.pow(i.base,A)},checkMinBarSize:function(n,e,t){const i=this._canvasOptions,r=t?t-n:0,m=this.constructor.prototype.checkMinBarSize;let A,V;return(0,C.O9)(e)&&r>0?(A=m(this.fromValue(t/r),this.fromValue(e)-i.rangeMinVisible),V=Math.pow(i.base,this.fromValue(r)+A)-r):V=m(n,e),V}},dO=Math.abs,LD=["width","height","left","top","bottom","right"],BD={to(n){const e=this._canvasOptions.startPoint+(this._options.conversionValue?n:Math.round(n));return e>this._canvasOptions.endPoint?this._canvasOptions.endPoint:e},from(n){return n-this._canvasOptions.startPoint}},ND=function(n){return(0,w.__)(LD,function(e,t){n[t]=parseInt(n[t])||0}),n};function uO(n){return{isStartSide:n?function(e,t,i,r){return e<=t[t.length-1][r]}:function(e,t,i,r){return e<t[0][i]},isEndSide:n?function(e,t,i,r){return e>t[0][i]}:function(e,t,i,r){return e>=t[t.length-1][r]},isInBreak:n?function(e,t,i,r){return e>t[r]&&e<=t[i]}:function(e,t,i,r){return e>=t[i]&&e<t[r]},isBetweenBreaks:n?function(e,t,i,r,m){return e>=t[m]&&e<i[r]}:function(e,t,i,r,m){return e<t[r]&&e>=i[m]},getLength:n?function(e,t){return t.length-e.length}:function(e){return e.length},getBreaksSize:n?function(e,t){return t.cumulativeWidth-e.cumulativeWidth}:function(e){return e.cumulativeWidth}}}const hO=function(n,e,t){this.update(n,e,t)};function mB(n){return{stroke:n.color,"stroke-width":n.width,"stroke-opacity":n.opacity,opacity:1}}function FD(n,e,t,i,r,m,A){const V=A||n._tickOffset,X=n._axisLineGroup,ce=n._axisElementsGroup,_e=mB(t),Me=mB(i),Ve=/^\s+$/,rt=n.getOptions().label,Ct=n._textOptions;function Xt(Fn){let oi=n._textFontStyles;const Yt=rt.customizeColor;return Yt&&Yt.call&&(oi=(0,_.X)({},n._textFontStyles,{fill:Yt.call(Fn,Fn)})),oi}function On(Fn,oi){const Yt=n.formatHint(Fn.value,rt,oi);(0,C.O9)(Yt)&&""!==Yt&&Fn.getContentContainer().setTitle(Yt)}return function(Fn){const oi={value:Fn,updateValue(Yt){this.value=Fn=Yt},initCoords:function(){this.coords=n._getTranslatedValue(Fn,V),this.labelCoords=n._getTranslatedValue(Fn)},saveCoords(){this._lastStoredCoordinates={coords:this._storedCoords,labelCoords:this._storedLabelsCoords},this._storedCoords=this.coords,this._storedLabelsCoords=this.templateContainer?this._getTemplateCoords():this.labelCoords},resetCoordinates(){this._lastStoredCoordinates&&(this._storedCoords=this._lastStoredCoordinates.coords,this._storedLabelsCoords=this._lastStoredCoordinates.labelCoords)},drawMark(Yt){!t.visible||r===Fn||n.areCoordsOutsideAxis(this.coords)||(this.mark?(this.mark.append(X),n.sharp(this.mark,n.getSharpDirectionByCoords(this.coords)),this.updateTickPosition(Yt)):(this.mark=n._createPathElement([],_e,n.getSharpDirectionByCoords(this.coords)).append(X),this.updateTickPosition(Yt)))},setSkippedCategory(Yt){r=Yt},_updateLine(Yt,$t,xn,Gn,qn){if(Yt){if(null===$t.points||null===$t.r)return void Yt.remove();Gn&&xn&&null!==xn.points?($t.opacity=1,Yt.attr(xn),Yt.animate($t)):($t.opacity=Gn?0:1,Yt.attr($t),Gn&&Yt.animate({opacity:1},{delay:.5,partitionDuration:.5})),this.coords.angle&&n._rotateTick(Yt,this.coords,qn)}},updateTickPosition:function(Yt,$t){this._updateLine(this.mark,{points:n._getTickMarkPoints(oi.coords,t.length,Yt)},this._storedCoords&&{points:n._getTickMarkPoints(oi._storedCoords,t.length,Yt)},$t,!1)},drawLabel:function(Yt,$t){if(this.templateContainer&&n.isRendered())return void this.updateLabelPosition();if(!rt.visible||m||n.getTranslator().getBusinessRange().isEmpty()||n.areCoordsOutsideAxis(this.labelCoords))return void(this.label&&this.removeLabel());const Gn=rt.template,qn=n.formatLabel(Fn,rt,Yt);if(this.label)return this.label.attr({text:qn,rotate:0}).append(ce),On(this,Yt),void this.updateLabelPosition();Gn?(this.templateContainer=e.g().append(ce),this._templateDef&&this._templateDef.reject(),this._templateDef=new g.cY,$t.render({model:{valueText:qn,value:this.value,labelFontStyle:Xt(this),labelStyle:Ct},container:this.templateContainer.element,onRendered:()=>{this.updateLabelPosition(),this._templateDef&&this._templateDef.resolve()}})):(0,C.O9)(qn)&&""!==qn&&!Ve.test(qn)&&(this.label=e.text(qn).css(Xt(this)).attr(Ct).append(ce),this.updateLabelPosition(),On(this,Yt));const ii=this.getContentContainer();ii&&ii.data("chart-data-argument",this.value),this.templateContainer&&On(this,Yt)},getTemplateDeferred(){return this._templateDef},getContentContainer(){return this.templateContainer||this.label},fadeOutElements(){const Yt={opacity:1},$t={opacity:0},xn={partitionDuration:.5};this.getContentContainer()&&this._fadeOutLabel(),this.grid&&this.grid.append(n._axisGridGroup).attr(Yt).animate($t,xn),this.mark&&this.mark.append(n._axisLineGroup).attr(Yt).animate($t,xn)},_fadeInLabel(){const Yt=n._renderer.g().attr({opacity:0}).append(n._axisElementsGroup).animate({opacity:1},{delay:.5,partitionDuration:.5});this.getContentContainer().append(Yt)},_fadeOutLabel(){const Yt=n._renderer.g().attr({opacity:1}).animate({opacity:0},{partitionDuration:.5}).append(n._axisElementsGroup).toBackground();this.getContentContainer().append(Yt)},_getTemplateCoords(){return n._getLabelAdjustedCoord(this,(n._constantLabelOffset||0)+(oi.labelOffset||0))},updateLabelPosition:function(Yt){const $t=this.templateContainer;if(this.getContentContainer())if(Yt&&this._storedLabelsCoords)if($t){$t.attr(this._storedLabelsCoords);const xn=this._getTemplateCoords();$t.animate(xn)}else this.label.attr({x:this._storedLabelsCoords.x,y:this._storedLabelsCoords.y}),this.label.animate({x:this.labelCoords.x,y:this.labelCoords.y});else{if($t){const xn=this._getTemplateCoords();$t.attr(xn)}else this.label.attr({x:this.labelCoords.x,y:this.labelCoords.y});Yt&&this._fadeInLabel()}},updateMultilineTextAlignment(){rt.template||!this.label||this.label.attr({textsAlignment:this.labelAlignment||n.getOptions().label.alignment})},drawGrid:function(Yt){i.visible&&r!==this.value&&(this.grid?(this.grid.append(n._axisGridGroup),n.sharp(this.grid,n.getSharpDirectionByCoords(this.coords)),this.updateGridPosition()):(this.grid=Yt(this,Me),this.grid&&this.grid.append(n._axisGridGroup)))},updateGridPosition:function(Yt){this._updateLine(this.grid,n._getGridPoints(oi.coords),this._storedCoords&&n._getGridPoints(this._storedCoords),Yt,!0)},removeLabel(){const Yt=this.getContentContainer();Yt&&Yt.remove(),this._templateDef&&this._templateDef.reject(),this._templateDef=this.templateContainer=this.label=null}};return oi}}hO.prototype={constructor:hO,reinit:function(){const n=this,e=n._options,t=n._businessRange,i=t.categories||[];let r={};const m=n._prepareCanvasOptions(),A=fr(i,t.minVisible,t.maxVisible).categories,V=A.length;if(t.isEmpty())r=BD;else switch(t.axisType){case"logarithmic":r=jM;break;case"semidiscrete":r=cO,m.ratioOfCanvasRange=m.canvasLength/(Tn.A.addInterval(m.rangeMaxVisible,e.interval)-m.rangeMinVisible);break;case"discrete":r=e2,n._categories=i,m.interval=n._getDiscreteInterval(e.addSpiderCategory?V+1:V,m),n._categoriesToPoints=function(n){const e={};return n.forEach(function(t,i){e[t.valueOf()]=i}),e}(i),V&&(m.startPointIndex=n._categoriesToPoints[A[0].valueOf()],n.visibleCategories=A);break;default:"datetime"===t.dataType&&(r=L0)}(n._oldMethods||[]).forEach(function(X){delete n[X]}),n._oldMethods=Object.keys(r),(0,_.X)(n,r),n._conversionValue=e.conversionValue?X=>X:(X,ce)=>ce?X:Math.round(X),n.sc={},n._checkingMethodsAboutBreaks=[uO(!1),uO(n.isInverted())],n._translateBreaks(),n._calculateSpecialValues()},_translateBreaks:function(){const n=this._breaks,e=this._options.breaksSize;let t,i,r,m;if(void 0!==n)for(t=0,m=n.length;t<m;t++)i=n[t],r=this.translate(i.to),i.end=r,i.start=i.gapSize?r:this.isInverted()?r+e:r-e},_checkValueAboutBreaks:function(n,e,t,i,r){let m,A,X,ce,V={length:0,breaksSize:void 0,inBreak:!1};const _e=n[n.length-1];if(r.isStartSide(e,n,t,i))return V;if(r.isEndSide(e,n,t,i))return{length:_e.length,breaksSize:_e.cumulativeWidth,inBreak:!1};for(m=0,A=n.length;m<A;m++){if(X=n[m],ce=n[m-1],r.isInBreak(e,X,t,i)){V.inBreak=!0,V.break=X;break}if(ce&&r.isBetweenBreaks(e,X,ce,t,i)){V={length:r.getLength(ce,_e),breaksSize:r.getBreaksSize(ce,_e),inBreak:!1};break}}return V},isInverted:function(){return!(this._options.isHorizontal^this._businessRange.invert)},_getDiscreteInterval:function(n,e){const t=n-(this._options.stick?1:0);return t>0?e.canvasLength/t:e.canvasLength},_prepareCanvasOptions(){const n=this._businessRange,e=this._canvasOptions=function KM(n){let e=n.min,t=n.max,i=n.minVisible,r=n.maxVisible;return"logarithmic"===n.axisType&&(r=Mr(r,n.base,n.allowNegatives,n.linearThreshold),i=Mr(i,n.base,n.allowNegatives,n.linearThreshold),e=Mr(e,n.base,n.allowNegatives,n.linearThreshold),t=Mr(t,n.base,n.allowNegatives,n.linearThreshold)),{base:n.base,rangeMin:e,rangeMax:t,rangeMinVisible:i,rangeMaxVisible:r}}(n),t=this._canvas,i=this._breaks;let r;if(e.startPadding=t.startPadding||0,e.endPadding=t.endPadding||0,this._options.isHorizontal?(e.startPoint=t.left+e.startPadding,r=t.width,e.endPoint=t.width-t.right-e.endPadding,e.invert=n.invert):(e.startPoint=t.top+e.startPadding,r=t.height,e.endPoint=t.height-t.bottom-e.endPadding,e.invert=!n.invert),this.canvasLength=e.canvasLength=e.endPoint-e.startPoint,e.rangeDoubleError=Math.pow(10,Hn(e.rangeMax-e.rangeMin)-Hn(r)-2),e.ratioOfCanvasRange=e.canvasLength/(e.rangeMaxVisible-e.rangeMinVisible),void 0!==i){const m=e.rangeMaxVisible-e.rangeMinVisible-i[i.length-1].length;0!==m&&(e.ratioOfCanvasRange=(e.canvasLength-i[i.length-1].cumulativeWidth)/m)}return e},updateCanvas:function(n){this._canvas=ND(n),this.reinit()},updateBusinessRange:function(n){const e=n.breaks||[];this._userBreaks=n.userBreaks||[],this._businessRange=function(n){function e(t,i){!(0,C.O9)(n[t])&&(0,C.O9)(n[i])&&(n[t]=n[i])}return n instanceof Bl||(n=new Bl(n)),e("minVisible","min"),e("maxVisible","max"),n}(n),this._breaks=e.length?function i2(n,e){const t="logarithmic"===e.axisType?function(_e){return Mr(_e,e.base)}:function(_e){return _e},i=[];let r,m,A,V;const X=n.length;let ce=0;for(V=0;V<X;V++)r=n[V],m=t(r.from),A=t(r.to),ce+=A-m,i.push({trFrom:m,trTo:A,from:r.from,to:r.to,length:ce,cumulativeWidth:r.cumulativeWidth});return i}(e,this._businessRange):void 0,this.reinit()},update:function(n,e,t){this._options=(0,_.X)(this._options||{},t),this._canvas=ND(e),this.updateBusinessRange(n)},getBusinessRange:function(){return this._businessRange},getEventScale:function(n){return n.deltaScale||1},getCanvasVisibleArea:function(){return{min:this._canvasOptions.startPoint,max:this._canvasOptions.endPoint}},_calculateSpecialValues:function(){const n=this,e=n._canvasOptions,t=e.startPoint-e.startPadding,i=e.endPoint+e.endPadding,r=n._businessRange,m=r.minVisible,A=r.maxVisible,V=t+e.canvasLength/2;let X;if(m<0&&A>0&&m!==A&&(X=n.translate(0,1)),!(0,C.O9)(X)){const ce=r.invert^(m<0&&A<=0);X=n._options.isHorizontal?ce?i:t:ce?t:i}n.sc={canvas_position_default:X,canvas_position_left:t,canvas_position_top:t,canvas_position_center:V,canvas_position_middle:V,canvas_position_right:i,canvas_position_bottom:i,canvas_position_start:e.invert?i:t,canvas_position_end:e.invert?t:i}},translateSpecialCase(n){return this.sc[n]},_calculateProjection:function(n){const e=this._canvasOptions;return e.invert?e.endPoint-n:e.startPoint+n},_calculateUnProjection:function(n){const e=this._canvasOptions;return"datetime"===this._businessRange.dataType&&(n=Math.round(n)),e.invert?e.rangeMaxVisible.valueOf()-n:e.rangeMinVisible.valueOf()+n},getMinBarSize:function(n){const e=this.getCanvasVisibleArea(),t=this.from(e.min+n);return dO(this.from(e.min)-((0,C.O9)(t)?t:this.from(e.max)))},checkMinBarSize:function(n,e){return dO(n)<e?n>=0?e:-e:n},translate(n,e,t){const i=this.translateSpecialCase(n);return(0,C.O9)(i)?Math.round(i):isNaN(n)?null:this.to(n,e,t)},getInterval:function(n){const e=this._canvasOptions;return n=n??this._businessRange.interval,Math.round(n?e.ratioOfCanvasRange*n:e.endPoint-e.startPoint)},zoom(n,e,t){const i=this._canvasOptions;if(i.rangeMinVisible.valueOf()===i.rangeMaxVisible.valueOf()&&0!==n)return this.zoomZeroLengthRange(n,e);const r=i.startPoint,m=i.endPoint,A=this.isInverted();let V=(r+n)/e,X=(m+n)/e;t=t||{};const ce=this.to(A?t.endValue:t.startValue),_e=this.to(A?t.startValue:t.endValue);let Me,Ve;return ce>V&&(X-=V-ce,V=ce,Me=A?t.endValue:t.startValue),_e<X&&(V-=X-_e,X=_e,Ve=A?t.startValue:t.endValue),_e-ce<X-V&&(V=ce,X=_e),e=(r+(n=(m-r)*V/(X-V)-r))/V||1,Me=(0,C.O9)(Me)?Me:(0,ri.Ai)(this.from(V,1)),Ve=(0,C.O9)(Ve)?Ve:(0,ri.Ai)(this.from(X,-1)),e<=1&&(Me=this._correctValueAboutBreaks(Me,1===e?n:-1),Ve=this._correctValueAboutBreaks(Ve,1===e?n:1)),Me>Ve?(Me=Me>t.endValue?t.endValue:Me,Ve=Ve<t.startValue?t.startValue:Ve):(Me=Me<t.startValue?t.startValue:Me,Ve=Ve>t.endValue?t.endValue:Ve),{min:Me,max:Ve,translate:(0,ri.Ai)(n),scale:(0,ri.Ai)(e)}},_correctValueAboutBreaks(n,e){const t=this._userBreaks.filter(i=>n>=i.from&&n<=i.to);return t.length?e>0?t[0].to:t[0].from:n},zoomZeroLengthRange(n,e){const t=this._canvasOptions,i=t.rangeMin,r=t.rangeMax,m=(r.valueOf()!==i.valueOf()?r.valueOf()-i.valueOf():dO(t.rangeMinVisible.valueOf()-i.valueOf()))/t.canvasLength,A=(0,C.$P)(r)||(0,C.$P)(i),V="logarithmic"===this._businessRange.axisType;let X=t.rangeMinVisible.valueOf()-m,ce=t.rangeMaxVisible.valueOf()+m;return X=V?(0,ri.Ai)(dn(X,t.base)):A?new Date(X):X,ce=V?(0,ri.Ai)(dn(ce,t.base)):A?new Date(ce):ce,{min:X,max:ce,translate:n,scale:e}},getMinScale:function(n){const{dataType:e,interval:t}=this._businessRange;return"datetime"===e&&1===t?this.getDateTimeMinScale(n):n?1.1:.9},getDateTimeMinScale(n){const e=this._canvasOptions;let t=e.canvasLength/e.ratioOfCanvasRange;return t+=(parseInt(.1*t)||1)*(n?-2:2),e.canvasLength/(Math.max(t,1)*e.ratioOfCanvasRange)},getScale:function(n,e){const t=this._canvasOptions;return t.rangeMax===t.rangeMin?1:(n=(0,C.O9)(n)?this.fromValue(n):t.rangeMin,e=(0,C.O9)(e)?this.fromValue(e):t.rangeMax,(t.rangeMax-t.rangeMin)/Math.abs(n-e))},isValid:function(n){const e=this._canvasOptions;return null!==(n=this.fromValue(n))&&!isNaN(n)&&n.valueOf()+e.rangeDoubleError>=e.rangeMin&&n.valueOf()-e.rangeDoubleError<=e.rangeMax},getCorrectValue:function(n,e){const t=this,i=t._breaks;let r;return n=t.fromValue(n),t._breaks&&(r=t._checkValueAboutBreaks(i,n,"trFrom","trTo",t._checkingMethodsAboutBreaks[0]),!0===r.inBreak)?t.toValue(e>0?r.break.trTo:r.break.trFrom):t.toValue(n)},to:function(n,e,t){const i=this.getBusinessRange();if((0,C.O9)(i.maxVisible)&&(0,C.O9)(i.minVisible)&&i.maxVisible.valueOf()===i.minVisible.valueOf())return(0,C.O9)(n)&&i.maxVisible.valueOf()===n.valueOf()?this.translateSpecialCase(0===n&&this._options.shiftZeroValue?"canvas_position_default":"canvas_position_middle"):null;n=this.fromValue(n);const r=this,m=r._canvasOptions,A=r._breaks;let V={length:0},X=0;return void 0!==A&&(V=r._checkValueAboutBreaks(A,n,"trFrom","trTo",r._checkingMethodsAboutBreaks[0]),X=(0,C.O9)(V.breaksSize)?V.breaksSize:0),!0===V.inBreak?e>0?V.break.start:e<0?V.break.end:null:r._conversionValue(r._calculateProjection((n-m.rangeMinVisible-V.length)*m.ratioOfCanvasRange+X),t)},from:function(n,e){const t=this,i=t._breaks;let r={length:0};const m=t._canvasOptions,A=m.startPoint;let V=0;return void 0!==i&&(r=t._checkValueAboutBreaks(i,n,"start","end",t._checkingMethodsAboutBreaks[1]),V=(0,C.O9)(r.breaksSize)?r.breaksSize:0),!0===r.inBreak?e>0?t.toValue(r.break.trTo):e<0?t.toValue(r.break.trFrom):null:t.toValue(t._calculateUnProjection((n-A-V)/m.ratioOfCanvasRange+r.length))},isValueProlonged:!1,getRange:function(){return[this.toValue(this._canvasOptions.rangeMin),this.toValue(this._canvasOptions.rangeMax)]},getScreenRange:function(){return[this._canvasOptions.startPoint,this._canvasOptions.endPoint]},add:function(n,e,t){return this._add(n,e,(this._businessRange.invert?-1:1)*t)},_add:function(n,e,t){return this.toValue(this.fromValue(n)+e*t)},fromValue:function(n){return null!==n?Number(n):null},toValue:function(n){return null!==n?Number(n):null},ratioOfCanvasRange(){return this._canvasOptions.ratioOfCanvasRange},convert:n=>n,getRangeByMinZoomValue(n,e){return e.minVisible+n<=this._businessRange.max?[e.minVisible,e.minVisible+n]:[e.maxVisible-n,e.maxVisible]}};const XM=[0,1,2,3,4,5,6];function Yb(n){return(n+1)%7}function o2(n,e){let t=n.start;const i=n.end;for(;t!==i;){if(t===e)return!0;t=Yb(t)}return!1}function r2(n,e){let t=0;for(;n!==e;)n=Yb(n),t++;return t}function B0(n,e,t,i,r){const m=function Cs(n){const e=function YM(n){return XM.filter(function(e){return!n.some(function(t){return t===e})})}(n);if(e.length<7)for(;Yb(e[e.length-1])===e[0];)e.unshift(e.pop());return e}(t),A=function yf(n,e,t){let i=n.getDate();const r=[];return t.reduce(function(A,V){let X=A[1];return void 0===X.start?(X={start:V,end:Yb(V)},A[0].push(X),[A[0],X]):X.end===V?(X.end=Yb(V),A):(X={start:V,end:Yb(V)},A[0].push(X),[A[0],X])},[[],{}])[0].forEach(function(A){let V=new Date(n);for(V=Tn.A.trimTime(V);V<e;){i=V.getDay();const X=V.getDate();if(o2(A,i)){const ce=new Date(V);V.setDate(X+r2(i,A.end));const _e=new Date(V);r.push({from:ce,to:_e})}V.setDate(V.getDate()+1)}}),r}(n,e,m);return A.push.apply(A,function gg(n,e,t,i){let r;const m=function(X){return X===r},A=Tn.A.trimTime(n),V=Tn.A.trimTime(e);return V.setDate(e.getDate()+1),t.reduce(function(X,ce){let _e,Me;return ce=new Date(ce),r=ce.getDay(),!i.some(m)&&ce>=A&&ce<=V&&(_e=Tn.A.trimTime(ce),Me=new Date(_e),Me.setDate(_e.getDate()+1),X.push({from:_e,to:Me})),X},[])}(n,e,r||[],m)),function xs(n){return n.map(function(e){return{from:e.from,to:e.to,gapSize:Tn.A.convertMillisecondsToDateUnits(e.to-e.from)}})}(function yu(n,e){const t=n.slice();let i;const r=function(m){if(m=Tn.A.trimTime(new Date(m)),t[i].from<=m&&t[i].to>m){const A=function Qn(n,e){const t=[],i=new Date(e);return i.setDate(e.getDate()+1),e>n.from&&t.push({from:n.from,to:e}),i<n.to&&t.push({from:i,to:n.to}),t}(t[i],m);2===A.length?t.splice(i,1,A[0],A[1]):1===A.length?t.splice(i,1,A[0]):t.splice(i,1)}};for(i=0;i<t.length;i++)e.forEach(r);return t}(A,i||[]))}const fg=Tn.A.getNextDateUnit,rl=Tn.A.correctDateWithUnitBeginning,ic=Math,xl=ic.max,Ic=qs.top,gl=qs.bottom,Pc=qs.left,jd=qs.right,bu=qs.center,gO={left:-1,top:-1,right:0,bottom:0,center:-.5};function bf(n){return n.sort(function(e,t){return e.from-t.from})}function xf(n,e,t,i){let r=i;const m=e&&Tn.A.getDatesDifferences(e,n);return e&&"year"!==t&&(function _B(n,e){let t,i;if("week"===e&&(e="day"),"quarter"===e&&(e="month"),n[e])for(i=0;i<Tn.A.dateUnitIntervals.length&&(t=Tn.A.dateUnitIntervals[i],n[t]&&(n[t]=!1,n.count--),t!==e);i++);}(m,t),r=Hd.A.getDateFormatByDifferences(m)),r}function ZM(n,e){return e.reduce(function(t,i){return xl(t,n(i))},0)}function QM(n,e,t){return n.some(function(i){return i.label.verticalAlignment===e})&&t||0}function JM(n){return ic.abs(n.x)||0}function qM(n){return ic.abs(n.width-ic.abs(n.x))||0}const fO={linear:{_getStep:function(n,e){const t=this._options.label.minSpacing;let r=ZM(this._isHorizontal?function(m){return m.width+t}:function(m){return m.height},n);return e&&(r=function CB(n,e){const t=(e=(e=ic.abs(e))%180>=90?90-e%90:e%90)*(ic.PI/180);return t>=ic.atan(n.height/n.width)?n.height/ic.abs(ic.sin(t)):n.width}({width:r,height:this._getMaxLabelHeight(n,0)},e)),qs.getTicksCountInRange(this._majorTicks,this._isHorizontal?"x":"y",r)},_getMaxLabelHeight:function(n,e){return ZM(function(t){return t.height},n)+e},_validateOverlappingMode:function(n,e){return this._isHorizontal&&("rotate"===e||"stagger"===e)||!this._isHorizontal?qs.validateOverlappingMode(n):n},_validateDisplayMode:function(n){return this._isHorizontal?n:"standard"},getMarkerTrackers:function(){return this._markerTrackers},_getSharpParam:function(n){return this._isHorizontal^n?"h":"v"},_createAxisElement:function(){return this._renderer.path([],"line")},_updateAxisElementPosition:function(){const n=this._axisPosition,e=this._getCanvasStartEnd();this._axisElement.attr({points:this._isHorizontal?[e.start,n,e.end,n]:[n,e.start,n,e.end]})},_getTranslatedCoord:function(n,e){return this._translator.translate(n,e)},_initAxisPositions(){const n=this;n.customPositionIsAvailable()&&(n._customBoundaryPosition=n.getCustomBoundaryPosition()),n._axisPosition=!n.customPositionIsAvailable()||n.customPositionIsBoundary()?n.getPredefinedPosition(n.getResolvedBoundaryPosition()):n.getCustomPosition()},_getTickMarkPoints(n,e,t){const i=this._isHorizontal,r=this._options.tickOrientation,m=this._options.label.position;let A;if((0,C.O9)(r))A=gO[r]*e;else{let V=t.shift||0;(!i&&m===Pc||i&&m!==gl)&&(V=-V),A=V+this.getTickStartPositionShift(e)}return[n.x+(i?0:A),n.y+(i?A:0),n.x+(i?0:A+e),n.y+(i?A+e:0)]},getTickStartPositionShift(n){const e=this._options.width,t=this.getResolvedBoundaryPosition();return n%2==1?(e%2!=0||t!==Pc&&t!==Ic)&&(e%2!=1||t!==jd&&t!==gl||this.hasNonBoundaryPosition())?-Math.floor(n/2):Math.floor(-n/2):-n/2+(e%2==0?0:t===gl||t===jd?-1:1)},_getTitleCoords:function(){const n=this._isHorizontal;let e=this._axisPosition,t=this._axisPosition;const i=this._options.title.alignment,r=this._getCanvasStartEnd(),m=n||this._options.position===Pc,X=i===Pc?m?r.start:r.end:i===jd?m?r.end:r.start:r.start+(r.end-r.start)/2;return n?e=X:t=X,{x:e,y:t}},_drawTitleText:function(n,e){const t=this._options,i=t.title,r={opacity:i.opacity,align:i.alignment,class:i.cssClass};if(!i.text||!n)return;e=e||this._getTitleCoords(),this._isHorizontal||(r.rotate=t.position===Pc?270:90);const m=this._renderer.text(i.text,e.x,e.y).css(Ti(i.font)).attr(r).append(n);return this._checkTitleOverflow(m),m},_updateTitleCoords:function(){this._title&&this._title.element.attr(this._getTitleCoords())},_drawTitle:function(){const n=this._drawTitleText(this._axisTitleGroup);n&&(this._title={element:n})},_measureTitle:function(){this._title&&(this._title.bBox&&!this._title.originalSize&&(this._title.originalSize=this._title.bBox),this._title.bBox=this._title.element.getBBox())},_drawDateMarker:function(n,e,t){const i=this,r=i._options.marker,m=i._translator.getBusinessRange().invert,A=r.width+r.textLeftIndent;let V;if(null===e.x)return;e.withoutStick||(V=i._renderer.path([e.x,e.y,e.x,e.y+r.separatorHeight],"line").attr({"stroke-width":r.width,stroke:r.color,"stroke-opacity":r.opacity,sharp:"h"}).append(i._axisElementsGroup));const X=String(i.formatLabel(n,e.labelOptions,t));return{date:n,x:e.x,y:e.y,cropped:e.withoutStick,label:i._renderer.text(X,e.x,e.y).css(Ti(r.label.font)).append(i._axisElementsGroup),line:V,getContentContainer(){return this.label},getEnd:function(){return this.x+(m?-1:1)*(A+this.labelBBox.width)},setTitle:function(){this.title=X},hideLabel:function(){this.label.dispose(),this.label=null,this.title=X},hide:function(){V&&(V.dispose(),V=null),this.label.dispose(),this.label=null,this.hidden=!0}}},_drawDateMarkers:function(){const n=this,e=n._options,t=n._translator,i=n._getViewportRange(),r=i.minVisible;let A,m=[];function V(Ve,Je,rt){return n._drawDateMarker(Ve,{x:t.translate(Ve),y:X,labelOptions:n._getLabelFormatOptions(Je),withoutStick:rt},i)}if(i.isEmpty()||!e.marker.visible||"datetime"!==e.argumentType||"discrete"===e.type||n._majorTicks.length<=1)return[];const X=n._axisPosition+e.marker.topIndent,ce=Tn.A.getDateUnitInterval(this._tickInterval),_e=function Md(n){let e=fg(n);return"quarter"===e&&(e=fg(e)),e}(ce),Me=function b_(n,e,t){const i=n;let r;return n=rl(n,t),e=rl(e,t),r=Tn.A.getSequenceByInterval(n,e,t),r.length&&i>r[0]&&(r=r.slice(1)),r}(r,i.maxVisible,_e);return(Me.length>1||1===Me.length&&r<Me[0])&&(m=Me.reduce(function(Ve,Je,rt,Ct){const Xt=V(Je,xf(Je,Ct[rt-1]||r<Je&&r,ce,_e));return Xt&&Ve.push(Xt),Ve},[]),r<Me[0]&&(A=V(r,xf(r,Me[0],ce,_e),!0),A&&m.unshift(A))),m},_adjustDateMarkers:function(n){n=n||0;const e=this,t=this._options.marker,i=t.width+t.textLeftIndent,r=this._translator.getBusinessRange().invert,m=e._getCanvasStartEnd(),A=this._dateMarkers;if(!A.length)return n;let V;return A[0].cropped&&(this._checkMarkersPosition(r,A[1],A[0])||A[0].hideLabel()),A.forEach(function(X,ce,_e){X.cropped||((r?X.getEnd()<m.end:X.getEnd()>m.end)?X.hideLabel():e._checkMarkersPosition(r,X,V)?V=X:X.hide())}),this._dateMarkers.forEach(function(X){if(X.label){const ce=X.labelBBox;X.label.attr({translateX:r?X.x-i-ce.x-ce.width:X.x+i-ce.x,translateY:X.y+t.textTopIndent-ce.y+n})}X.line&&X.line.attr({translateY:n})}),e._initializeMarkersTrackers(n),n+t.topIndent+t.separatorHeight},_checkMarkersPosition:function(n,e,t){return void 0===t||(n?e.x<t.getEnd():e.x>t.getEnd())},_initializeMarkersTrackers:function(n){const e=this._options.marker.separatorHeight,t=this._renderer,i=this._translator.getBusinessRange(),r=this._getCanvasStartEnd(),m=this._axisElementsGroup;this._markerTrackers=this._dateMarkers.filter(function(A){return!A.hidden}).map(function(A,V,X){const ce=X[V+1]||{x:r.end,date:i.max},_e=A.x,Me=A.y+n,Ve=t.path([_e,Me,_e,Me+e,ce.x,Me+e,ce.x,Me,_e,Me],"area").attr({"stroke-width":1,stroke:"grey",fill:"grey",opacity:1e-4}).append(m);return Ve.data("range",{startValue:A.date,endValue:ce.date}),A.title&&Ve.setTitle(A.title),Ve})},_getLabelFormatOptions:function(n){const e=this;let t=e._markerLabelOptions;return t||(e._markerLabelOptions=t=(0,_.X)(!0,{},e._options.marker.label)),(0,C.O9)(e._options.marker.label.format)||(t.format=n),t},_adjustConstantLineLabels:function(n){const e=this,t=e._options.position,i=e.getCanvas(),r=i.left,m=i.width-i.right,A=i.top,V=i.height-i.bottom,X=A+(V-A)/2,ce=r+(m-r)/2;let _e=0;return n.forEach(function(Me){const Je=Me.options,rt=Je.paddingTopBottom,Ct=Je.paddingLeftRight,Xt=Je.label,On=Xt.verticalAlignment,Fn=Xt.horizontalAlignment,oi="inside"===Xt.position,Yt=Me.label,$t=Me.labelBBox;let xn,Gn;if(null!==Yt&&!$t.isEmpty){if(e._isHorizontal)if(oi)switch(xn=Fn===Pc?Me.coord-Ct-$t.x-$t.width:Me.coord+Ct-$t.x,On){case bu:Gn=X-$t.y-$t.height/2;break;case gl:Gn=V-rt-$t.y-$t.height;break;default:Gn=A+rt-$t.y}else t===On&&(_e=xl(_e,$t.height+rt)),xn=Me.coord-$t.x-$t.width/2,Gn=On===gl?V+rt-$t.y:A-rt-$t.y-$t.height;else if(oi)switch(Gn=On===gl?Me.coord+rt-$t.y:Me.coord-rt-$t.y-$t.height,Fn){case bu:xn=ce-$t.x-$t.width/2;break;case jd:xn=m-Ct-$t.x-$t.width;break;default:xn=r+Ct-$t.x}else t===Fn&&(_e=xl(_e,$t.width+Ct)),Gn=Me.coord-$t.y-$t.height/2,xn=Fn===jd?m+Ct-$t.x:r-Ct-$t.x-$t.width;Yt.attr({translateX:xn,translateY:Gn})}}),_e},_drawConstantLinesForEstimating:function(n){const e=this,t=this._renderer,i=t.g();return n.forEach(function(r){e._drawConstantLineLabelText(r.label.text,0,0,r.label,i).attr({align:"center"})}),i.append(t.root)},_estimateLabelHeight:function(n,e){let t=n.height;const i=e.drawingType;if(("stagger"===this._validateDisplayMode(i)||"stagger"===this._validateOverlappingMode(e.overlappingBehavior,i))&&(t=2*t+e.staggeringSpacing),"rotate"===this._validateDisplayMode(i)||"rotate"===this._validateOverlappingMode(e.overlappingBehavior,i)){const r=en(e.rotationAngle);t=t*r.cos+n.width*r.sin}return t&&(t+e.indentFromAxis||0)||0},estimateMargins:function(n){this.updateCanvas(n);const{position:e,placeholderSize:t}=this._options,i=this._getViewportRange(),r=this._createTicksAndLabelFormat(i),m=r.ticks,A=r.tickInterval,V=this._options,X=this._outsideConstantLines.filter(Gn=>Gn.labelOptions.visible).map(Gn=>Gn.options),ce=this._renderer.root,_e=V.label.visible&&!i.isEmpty()&&m.length,Me=_e&&this.formatLabel(m[m.length-1],V.label,void 0,void 0,A,m),Ve=_e&&this._renderer.text(Me,0,0).css(this._textFontStyles).attr(this._textOptions).append(ce),Je=this._drawTitleText(ce,{x:0,y:0}),rt=this._drawConstantLinesForEstimating(X),Ct=!V.label.template&&Ve&&Ve.getBBox()||{x:0,y:0,width:0,height:0},Xt=Je&&Je.getBBox()||{x:0,y:0,width:0,height:0},On=rt.getBBox(),Fn=Xt.height?Xt.height+V.title.margin:0,oi=this._estimateLabelHeight(Ct,V.label),Yt=On.height?On.height+function yB(n){return n.reduce(function(e,t){return xl(e,t.paddingTopBottom)},0)}(X):0,$t=oi+Fn,xn={left:xl(JM(Ct),JM(On)),right:xl(qM(Ct),qM(On)),top:("top"===V.position?$t:0)+QM(X,"top",Yt),bottom:("top"!==V.position?$t:0)+QM(X,"bottom",Yt)};return t&&(xn[e]=t),Ve&&Ve.remove(),Je&&Je.remove(),rt&&rt.remove(),xn},_checkAlignmentConstantLineLabels:function(n){const e=n.position;let t=(n.verticalAlignment||"").toLowerCase(),i=(n.horizontalAlignment||"").toLowerCase();this._isHorizontal?"outside"===e?(t=t===gl?gl:Ic,i=bu):(t=t===bu?bu:t===gl?gl:Ic,i=i===Pc?Pc:jd):"outside"===e?(t=bu,i=i===Pc?Pc:jd):(t=t===gl?gl:Ic,i=i===jd?jd:i===bu?bu:Pc),n.verticalAlignment=t,n.horizontalAlignment=i},_getConstantLineLabelsCoords:function(n,e){const t=this;let i=n,r=n;return t._isHorizontal?r=t._orthogonalPositions["top"===e.verticalAlignment?"start":"end"]:i=t._orthogonalPositions["right"===e.horizontalAlignment?"end":"start"],{x:i,y:r}},_getAdjustedStripLabelCoords:function(n){const e=n.options,t=e.paddingTopBottom,i=e.paddingLeftRight,r=e.label.horizontalAlignment,m=e.label.verticalAlignment,A=n.labelBBox,V=A.height,X=A.width,ce=n.labelCoords;let _e=ce.y-A.y,Me=ce.x-A.x;return m===Ic?_e+=t:m===bu?_e-=V/2:m===gl&&(_e-=t+V),r===Pc?Me+=i:r===bu?Me-=X/2:r===jd&&(Me-=i+X),{translateX:Me,translateY:_e}},_adjustTitle:function(n){if(!this._title)return;const e=this._options,t=e.position,i=e.title.margin,r=this._title,m=r.bBox,A=m.x,V=m.y,X=m.width,_e=this._axisPosition,Me=_e-i-(n=n||0),Ve=_e+i+n,Je={};this._isHorizontal?Je.translateY=t===Ic?Me-(V+m.height):Ve-V:Je.translateX=t===Pc?Me-(A+X):Ve-A,r.element.attr(Je)},_checkTitleOverflow:function(n){if(!this._title&&!n)return;const e=this._getScreenDelta(),t=n?{bBox:n.getBBox(),element:n}:this._title,i=this._options.title,r=t.bBox;(this._isHorizontal?r.width:r.height)>e?(t.element.setMaxSize(e,void 0,{wordWrap:i.wordWrap||"none",textOverflow:i.textOverflow||"ellipsis"}),this._wrapped=i.wordWrap&&"none"!==i.wordWrap):!this._wrapped&&t.originalSize&&e>(this._isHorizontal?t.originalSize.width:t.originalSize.height)&&t.element.restoreText()},coordsIn:function(n,e){const t=this.getCanvas(),i=this._options.isHorizontal,r=this._options.position,m=i?e:n;return!(i&&(n<t.left||n>t.width-t.right)||!i&&(e<t.top||e>t.height-t.bottom))&&(i&&r===qs.top||!i&&r===qs.left?m<t[r]:m>t[i?"height":"width"]-t[r])},_boundaryTicksVisibility:{min:!0,max:!0},adjust(){const n=this._seriesData,e=this._series.filter(t=>t.isVisible()).reduce((t,i)=>{const r=i.getViewport();return t.min=(0,C.O9)(r.min)?t.min<r.min?t.min:r.min:t.min,t.max=(0,C.O9)(r.max)?t.max>r.max?t.max:r.max:t.max,i.showZero&&(t=new Bl(t)).correctValueZeroLevel(),t},{});(0,C.O9)(e.min)&&(0,C.O9)(e.max)&&(n.minVisible=e.min,n.maxVisible=e.max),n.userBreaks=this._getScaleBreaks(this._options,{minVisible:n.minVisible,maxVisible:n.maxVisible},this._series,this.isArgumentAxis),this._translator.updateBusinessRange(this._getViewportRange())},hasWrap(){return this._wrapped},getAxisPosition(){return this._axisPosition},_getStick:function(){return!this._options.valueMarginsEnabled},_getStripLabelCoords:function(n,e,t){const i=this._orthogonalPositions,m=t.horizontalAlignment,A=t.verticalAlignment;let V,X;return this._isHorizontal?(m===bu?V=n+(e-n)/2:m===Pc?V=n:m===jd&&(V=e),X=i[function vB(n){let e="start";return"center"===n&&(e="center"),"bottom"===n&&(e="end"),e}(A)]):(V=i[function ua(n){let e="start";return"center"===n&&(e="center"),"right"===n&&(e="end"),e}(m)],A===Ic?X=n:A===bu?X=e+(n-e)/2:A===gl&&(X=e)),{x:V,y:X}},_getTranslatedValue:function(n,e){let t;"semidiscrete"===this._options.type&&(t=this._options.tickInterval);const i=this._translator.translate(n,e,!1,t),r=this._axisPosition,m=this._isHorizontal;return{x:m?i:r,y:m?r:i}},areCoordsOutsideAxis:function(n){const e=this._isHorizontal?n.x:n.y,t=this.getVisibleArea();return e<t[0]||e>t[1]},_getSkippedCategory:function(n){let e;return this._options.type===qs.discrete&&this._tickOffset&&0!==n.length&&(e=n[n.length-1]),e},_filterBreaks:function(n,e,t){const i=e.minVisible,r=e.maxVisible,m=t?t.width:0;return n.reduce(function(A,V){let X=V.from,ce=V.to;const _e=A[A.length-1];let Me;return!(0,C.O9)(X)||!(0,C.O9)(ce)||(X>ce&&(ce=[X,X=ce][0]),A.length&&X<_e.to?ce>_e.to&&(_e.to=ce>r?r:ce,_e.gapSize&&(_e.gapSize=void 0,_e.cumulativeWidth+=m)):(X>=i&&X<r||ce<=r&&ce>i)&&(X=X>=i?X:i,ce=ce<=r?ce:r,ce-X<r-i&&(Me={from:X,to:ce,cumulativeWidth:(_e?.cumulativeWidth??0)+m},V.gapSize&&(Me.gapSize=Tn.A.convertMillisecondsToDateUnits(ce-X),Me.cumulativeWidth=_e?.cumulativeWidth??0),A.push(Me)))),A},[])},_getScaleBreaks:function(n,e,t,i){const r=this;let m=(n.breaks||[]).map(function(A){return{from:r.parser(A.startValue),to:r.parser(A.endValue)}});return"discrete"!==n.type&&"datetime"===n.dataType&&n.workdaysOnly&&(m=m.concat(B0(e.minVisible,e.maxVisible,n.workWeek,n.singleWorkdays,n.holidays))),!i&&"discrete"!==n.type&&"datetime"!==n.dataType&&n.autoBreaksEnabled&&0!==n.maxAutoBreakCount&&(m=m.concat(function eR(n,e,t){let{logarithmBase:i,type:r,maxAutoBreakCount:m}=n,{minVisible:A,maxVisible:V}=t;const X=[],ce="logarithmic"===r?(Fn,oi)=>Ei(oi/Fn,i):(Fn,oi)=>oi-Fn;let _e=ce(A,V);const Me=e.reduce((Fn,oi)=>{const Yt=oi.getPointsInViewPort();return Fn[0]=Fn[0].concat(Yt[0]),Fn[1]=Fn[1].concat(Yt[1]),Fn},[[],[]]);let rt=.3*_e;const Ct=function bB(n,e,t){let i,r,m=null;const A=[];let V,X,ce;for(i=1,r=n.length;i<r;i++)V=n[i],X=n[i-1],ce=t(V,X),e.indexOf(V)>=0?(!m||ce>m.length)&&(m={start:V,end:X,length:ce}):(A.push(m&&ce<m.length?m:{start:V,end:X,length:ce}),m=null);return m&&A.push(m),A}(Me[0].concat(Me[1]).sort((Fn,oi)=>oi-Fn),Me[1].filter(Fn=>Me[0].indexOf(Fn)<0),ce).sort((Fn,oi)=>oi.length-Fn.length),Xt=ic.min.apply(null,Ct.map(Fn=>Fn.length))/1e3,On=(0,C.O9)(m)?ic.min(m,Ct.length):Ct.length;for(let Fn=0;Fn<On&&Ct[Fn].length>=rt&&!(_e<=Ct[Fn].length);Fn++)_e-=Ct[Fn].length,(_e>Xt||_e<-Xt)&&(X.push({from:Ct[Fn].start,to:Ct[Fn].end}),rt=.3*_e);return bf(X),X}(n,t,e))),bf(m)},_drawBreak:function(n,e,t,i,r,m){const A=n-(this._translator.isInverted()?0:i+1),V={"stroke-width":1,stroke:r.borderColor,sharp:r.isWaved?void 0:r.isHorizontal?"h":"v"},X={stroke:r.color,"stroke-width":i},_e=function xB(n,e,t,i,r,m,A){const V=A?"bezier":"line",X=n.g().append(e);return function(ce,_e){n.path(t(function s2(n,e,t,i,r){if(!r)return[n,e+i,t,e+i];let m;const A=(e+=i)+0,V=e+2,X=e+4,ce=[[n,V]];for(m=n;m<t+24;m+=24)ce.push([m+6,A,m+6,A,m+12,V,m+18,X,m+18,X,m+24,V]);return[].concat.apply([],ce)}(i,r,m,ce,A)),V).attr(_e).append(X)}}(this._renderer,m,this._isHorizontal?HD:function(Me){return Me},e,A,t,r.isWaved);_e(i/2,X),_e(0,V),_e(i,V)},_createBreakClipRect:function(n,e){const t=this,i=t._canvas,r=e-n;let m;return m=t._isHorizontal?t._renderer.clipRect(i.left,n,i.width,r):t._renderer.clipRect(n,i.top,r,i.height),t._breaksElements=t._breaksElements||[],t._breaksElements.push(m),m.id},_createBreaksGroup:function(n,e){const t=this._renderer.g().attr({class:this._axisCssPrefix+"breaks","clip-path":this._createBreakClipRect(n,e)}).append(this._scaleBreaksGroup);return this._breaksElements=this._breaksElements||[],this._breaksElements.push(t),t},_disposeBreaksGroup:function(){(this._breaksElements||[]).forEach(function(n){n.dispose()}),this._breaksElements=null},drawScaleBreaks:function(n){const e=this,t=e._options,i=t.breakStyle,r=t.position;let m,A;const V=e._translator.getBusinessRange().breaks||[];let X,ce,_e;if(e._disposeBreaksGroup(),!V||!V.length)return;const Me={color:e._options.containerColor,borderColor:i.color,isHorizontal:e._isHorizontal,isWaved:"straight"!==i.line.toLowerCase()};n?(m=n.start,A=n.end):(m=e._orthogonalPositions.start-(!t.visible||e._axisShift||r!==Pc&&r!==Ic?0:3),A=e._orthogonalPositions.end+(!t.visible||r!==jd&&r!==gl?0:3));const Ve=e._createBreaksGroup(m,A);e._axisShift&&t.visible&&(ce=e._axisPosition-e._axisShift-3,_e=ce+6,X=e._createBreaksGroup(ce,_e)),V.forEach(function(Je){if(!Je.gapSize){const rt=e._getTranslatedCoord(Je.to);e._drawBreak(rt,m,A,i.width,Me,Ve),e._axisShift&&t.visible&&e._drawBreak(rt,ce,_e,i.width,Me,X)}})},_getSpiderCategoryOption:h.lQ,shift:function(n){const e=this._options,t=e.isHorizontal,i=this.getMultipleAxesSpacing(),r=this._axisConstantLineGroups;function m(A,V){const X={translateX:0,translateY:0},ce=n[A]?n[A]+i:0;return X[t?"translateY":"translateX"]=(A===Pc||A===Ic?-1:1)*ce,(V[A]||V).attr(X),ce}this._axisShift=m(e.position,this._axisGroup),m(e.position,this._axisElementsGroup),(t?[Ic,gl]:[Pc,jd]).forEach(A=>{m(A,r.above),m(A,r.under)})},getCustomPosition(n){const e=this,t=e.getOrthogonalAxis(),i=n??e.getResolvedPositionOption(),r=e.getOptions().offset,m=t.getTranslator(),A=t.getOptions().type;let X,V=t.validateUnit(i);return"discrete"===A&&(!m._categories||m._categories.indexOf(V)<0)&&(V=void 0),X=e.positionIsBoundary(i)?e.getPredefinedPosition(i):(0,C.O9)(V)?m.to(V,-1):e.getPredefinedPosition(e.getOptions().position),isFinite(X)&&isFinite(r)&&(X+=r),X},getCustomBoundaryPosition(n){const e=this,{customPosition:t,offset:i}=e.getOptions(),r=n??e.getResolvedPositionOption(),m=e.getOrthogonalAxis(),A=m.getTranslator(),V=A.getCanvasVisibleArea();if(!(0,C.O9)(m._orthogonalPositions)||0===A.canvasLength)return;const X=e.getCustomPosition(r);if(!(0,C.O9)(X))return e.getResolvedBoundaryPosition();if((0,C.O9)(t)){if(X<=V.min)return e._isHorizontal?Ic:Pc;if(X>=V.max)return e._isHorizontal?gl:jd}else if((0,C.O9)(i)){if(X<=e._orthogonalPositions.start)return e._isHorizontal?Ic:Pc;if(X>=e._orthogonalPositions.end)return e._isHorizontal?gl:jd}return X},getResolvedPositionOption(){const n=this.getOptions();return n.customPosition??n.position},customPositionIsAvailable(){const n=this.getOptions();return(0,C.O9)(this.getOrthogonalAxis())&&((0,C.O9)(n.customPosition)||isFinite(n.offset))},hasNonBoundaryPosition(){return this.customPositionIsAvailable()&&!this.customPositionIsBoundary()},getResolvedBoundaryPosition(){return this.customPositionIsBoundary()?this._customBoundaryPosition:this.getOptions().position},customPositionEqualsToPredefined(){return this.customPositionIsBoundary()&&this._customBoundaryPosition===this.getOptions().position},customPositionIsBoundary(){return this.positionIsBoundary(this._customBoundaryPosition)},positionIsBoundary:n=>[Ic,Pc,gl,jd].indexOf(n)>=0,getPredefinedPosition(n){var e;return null===(e=this._orthogonalPositions)||void 0===e?void 0:e[n===Ic||n===Pc?"start":"end"]},resolveOverlappingForCustomPositioning(n){const e=this;if(!e.hasNonBoundaryPosition()&&!e.customPositionIsBoundary()&&!n.some(i=>i.hasNonBoundaryPosition()))return;const t={axes:[],ticks:[]};n.filter(i=>i.pane===e.pane).forEach(i=>{for(let r=0;r<e._majorTicks.length;r++){const m=e._majorTicks[r],A=m.label;if(A){t.axes.indexOf(i)<0&&e._detectElementsOverlapping(A,i._axisElement)&&(t.axes.push(i),e._shiftThroughOrthogonalAxisOverlappedTick(A,i));for(let V=0;V<i._majorTicks.length;V++){const ce=i._majorTicks[V].label;if(ce&&e._detectElementsOverlapping(A,ce)){t.ticks.push(m),e._shiftThroughAxisOverlappedTick(m),r=e._majorTicks.length;break}}}m.mark&&t.ticks.indexOf(m)<0&&(e._isHorizontal&&m.mark.attr("translateY")?m.mark.attr({translateY:0}):!e._isHorizontal&&m.mark.attr("translateX")&&m.mark.attr({translateX:0}))}})},_shiftThroughOrthogonalAxisOverlappedTick(n,e){const t=n.getBBox(),i=e.getAxisPosition(),r=e.getOptions().label,m=r.position,A=r.indentFromAxis/2,V=this._isHorizontal?"translateX":"translateY",X=this._isHorizontal?Pc:Ic,ce=n.attr(V),_e=(this._isHorizontal?t.x:t.y)+ce,Ve=i-_e,Je=_e+(this._isHorizontal?t.width:t.height)-i,rt={};rt[V]=ce,Ve>0&&Je>0&&(Je-Ve>1?rt[V]+=Ve+A:Ve-Je>1?rt[V]-=Je+A:rt[V]+=m===X?Ve+A:-(Je+A),n.attr(rt))},_shiftThroughAxisOverlappedTick(n){var e;const t=this,i=n.label;if(!i)return;const r=i.getBBox(),m=null===(e=n.mark)||void 0===e?void 0:e.getBBox(),A=t.getAxisPosition(),V=t.getOptions().label,X=V.indentFromAxis,ce=V.position,_e=t._isHorizontal?Ic:Pc,Me=t._isHorizontal?"translateY":"translateX",Ve=i.attr(Me),Je=(t._isHorizontal?r.y:r.x)+Ve,Ct={};Ct[Me]=Ve+(ce===_e?A-Je+X:-(Je-A+(t._isHorizontal?r.height:r.width)+X)),i.attr(Ct),n.mark&&(Ct[Me]=(ce===_e?1:-1)*((t._isHorizontal?m.height:m.width)-1),n.mark.attr(Ct))},_detectElementsOverlapping(n,e){if(!n||!e)return!1;const t=n.getBBox(),i=t.x+n.attr("translateX"),r=t.y+n.attr("translateY"),m=e.getBBox(),A=m.x+e.attr("translateX"),V=m.y+e.attr("translateY");return(A>=i&&A<=i+t.width||i>=A&&i<=A+m.width)&&(V>=r&&V<=r+t.height||r>=V&&r<=V+m.height)}}};function HD(n){const e=[];let t;for(t=0;t<n.length;t+=2)e.push(n[t+1]),e.push(n[t]);return e}const N0=Math.max,$v=function(n,e){const t=e.left,i=e.top,r=e.width-e.right,m=e.height-e.bottom;return n.reduce(function(A,V){return!V||V.isEmpty?A:{left:N0(A.left,t-V.x),top:N0(A.top,i-V.y),right:N0(A.right,V.x+V.width-r),bottom:N0(A.bottom,V.y+V.height-m)}},{left:0,right:0,top:0,bottom:0})},x_=function(n){n.forEach(function(e){const t=e.getContentContainer();e.labelBBox=t?t.getBBox():{x:0,y:0,width:0,height:0}})},{PI:mO,abs:ly,atan:F0,round:Sf}=Math,tR=Math.min,V0=Math.max,H0=fO.linear;function Nl(n){let e;return(n=xo(n))>=315&&n<=360||n<45&&n>=0?e=1:n>=45&&n<135?e=2:n>=135&&n<225?e=3:n>=225&&n<315&&(e=4),e}const wl={_calculateValueMargins(n){let{minVisible:e,maxVisible:t}=this._getViewportRange();return n&&n.length>1&&(e=e<n[0].value?e:n[0].value,t=e>n[n.length-1].value?t:n[n.length-1].value),{minValue:e,maxValue:t}},applyMargins(){const n=this._calculateValueMargins(this._majorTicks),e=this._translator.getBusinessRange();e.addRange({minVisible:n.minValue,maxVisible:n.maxValue,interval:this._calculateRangeInterval(e.interval)}),this._translator.updateBusinessRange(e)},_getTranslatorOptions:function(){return{isHorizontal:!0,conversionValue:!0,addSpiderCategory:this._getSpiderCategoryOption(),stick:this._getStick()}},getCenter:function(){return this._center},getRadius:function(){return this._radius},getAngles:function(){const n=this._options;return[n.startAngle,n.endAngle]},_updateRadius(n){const e=tR(n.width-n.left-n.right,n.height-n.top-n.bottom)/2;this._radius=e<0?0:e},_updateCenter:function(n){this._center={x:n.left+(n.width-n.right-n.left)/2,y:n.top+(n.height-n.top-n.bottom)/2}},_processCanvas:function(n){return this._updateRadius(n),this._updateCenter(n),{left:0,right:0,width:this._getScreenDelta()}},_createAxisElement:function(){return this._renderer.circle()},_updateAxisElementPosition:function(){const n=this.getCenter();this._axisElement.attr({cx:n.x,cy:n.y,r:this.getRadius()})},_boundaryTicksVisibility:{min:!0},_getSpiderCategoryOption:function(){return this._options.firstPointOnStartAngle},_validateOptions(n){let t=n.originValue;const i=n.wholeRange={},r=n.period;(0,C.O9)(t)&&(t=this.validateUnit(t)),r>0&&n.argumentType===qs.numeric&&(t=t||0,i.endValue=t+r,this._viewport=er([t,i.endValue])),(0,C.O9)(t)&&(i.startValue=t)},getMargins(){const n=this._options.tick,e=V0(n.visible?n.length/2+n.shift:0,0),t=this.getRadius(),{x:i,y:r}=this._center,m=this._majorTicks.map(X=>X.label&&X.label.getBBox()).filter(X=>X),A=(0,_.X)({},this._canvas,{left:i-t,top:r-t,right:this._canvas.width-(i+t),bottom:this._canvas.height-(r+t)}),V=$v(m,A);return Object.keys(V).forEach(X=>V[X]=V[X]<e?e:V[X]),V},_updateLabelsPosition(){x_(this._majorTicks),this._adjustLabelsCoord(0,0,!0),this._checkBoundedLabelsOverlapping(this._majorTicks,this._majorTicks.map(n=>n.labelBBox))},_setVisualRange:h.lQ,applyVisualRangeSetter:h.lQ,_getStick:function(){return this._options.firstPointOnStartAngle||this._options.type!==qs.discrete},_getTranslatedCoord:function(n,e){return this._translator.translate(n,e)-90},_getCanvasStartEnd:function(){return{start:-90,end:270}},_getStripGraphicAttributes:function(n,e){const t=this.getCenter(),i=this.getAngles()[0],r=this.getRadius();return{x:t.x,y:t.y,innerRadius:0,outerRadius:r,startAngle:-e-i,endAngle:-n-i}},_createStrip:function(n){return this._renderer.arc(n.x,n.y,n.innerRadius,n.outerRadius,n.startAngle,n.endAngle)},_getStripLabelCoords:function(n,e){const t=this._getStripGraphicAttributes(n,e),r=en(t.startAngle+(t.endAngle-t.startAngle)/2),m=this.getRadius()/2,A=this.getCenter();return{x:Sf(A.x+m*r.cos),y:Sf(A.y-m*r.sin),align:qs.center}},_getConstantLineGraphicAttributes:function(n){const e=this.getCenter(),t=this.getRadius();return{points:[e.x,e.y,e.x+t,e.y]}},_createConstantLine:function(n,e){return this._createPathElement(this._getConstantLineGraphicAttributes(n).points,e)},_rotateConstantLine(n,e){const{x:t,y:i}=this.getCenter();n.rotate(e+this.getAngles()[0],t,i)},_getConstantLineLabelsCoords:function(n){const e=en(-n-this.getAngles()[0]),t=this.getRadius()/2,i=this.getCenter();return{x:Sf(i.x+t*e.cos),y:Sf(i.y-t*e.sin)}},_checkAlignmentConstantLineLabels:h.lQ,_adjustDivisionFactor:function(n){return 180*n/(this.getRadius()*mO)},_getScreenDelta:function(){const n=this.getAngles();return ly(n[0]-n[1])},_getTickMarkPoints:function(n,e,t){let{shift:i=0}=t;const r=this.getCenter(),m=this.getRadius()+e*{inside:-1,center:-.5,outside:0}[this._options.tickOrientation||"center"];return[r.x+m+i,r.y,r.x+m+e+i,r.y]},_getLabelAdjustedCoord:function(n,e,t,i){const r=this,m=n.labelCoords,A=m.y,V=m.angle,X=en(V),ce=X.cos,_e=X.sin,Me=n.labelBBox,Ve=Me.width/2,Je=Me.height/2,rt=r._options.label.indentFromAxis||0,Ct=m.x+rt*ce,Xt=A+(A-Me.y-Je)+rt*_e;let On=0,Fn=0;switch(Nl(V)){case 1:On=Ve,Fn=Je*_e;break;case 2:On=Ve*ce,Fn=Je;break;case 3:On=-Ve,Fn=Je*_e;break;case 4:On=Ve*ce,Fn=-Je}if(i){const oi=r._canvas,Yt=Ct-m.x+On,$t=Xt-m.y+Fn;Me.x+Yt<oi.originalLeft&&(On-=Me.x+Yt-oi.originalLeft),Me.x+Me.width+Yt>oi.width-oi.originalRight&&(On-=Me.x+Me.width+Yt-(oi.width-oi.originalRight)),Me.y+$t<oi.originalTop&&(Fn-=Me.y+$t-oi.originalTop),Me.y+Me.height+$t>oi.height-oi.originalBottom&&(Fn-=Me.y+Me.height+$t-(oi.height-oi.originalBottom))}return{x:Ct+On,y:Xt+Fn}},_getGridLineDrawer:function(){const n=this;return function(e,t){const i=n.getCenter();return n._createPathElement(n._getGridPoints().points,t).rotate(e.coords.angle,i.x,i.y)}},_getGridPoints:function(){const n=this.getRadius(),e=this.getCenter();return{points:[e.x,e.y,e.x+n,e.y]}},_getTranslatedValue:function(n,e){const t=this.getAngles()[0],i=this._translator.translate(n,-e),r=lo(this.getCenter(),t,i,this.getRadius());return{x:r.x,y:r.y,angle:this.getTranslatedAngle(i)}},_getAdjustedStripLabelCoords:function(n){const e=n.labelBBox;return{translateY:n.label.attr("y")-e.y-e.height/2}},coordsIn:function(n,e){return Eo(this.getCenter(),n,e).r>this.getRadius()},_rotateTick:function(n,e){const t=this.getCenter();n.rotate(e.angle,t.x,t.y)},_validateOverlappingMode:function(n){return qs.validateOverlappingMode(n)},_validateDisplayMode:function(){return"standard"},_getStep:function(n){const e=this.getRadius()+(this._options.label.indentFromAxis||0),t=n.reduce(function(m,A){const V=m;return m.width<A.width&&(V.width=A.width),m.height<A.height&&(V.height=A.height),V},{width:0,height:0}),i=ly(2*F0(t.height/(2*e-t.width))*180/mO),r=ly(2*F0(t.width/(2*e-t.height))*180/mO);return qs.getTicksCountInRange(this._majorTicks,"angle",V0(i,r))},_checkBoundedLabelsOverlapping:function(n,e,t){const i=this._options.label;if("hide"!==(t=t||this._validateOverlappingMode(i.overlappingBehavior)))return;const r=n.reduce((m,A,V)=>A.label?V:m,null);r&&qs.areLabelsOverlap(e[0],e[r],i.minSpacing,qs.center)&&("first"===i.hideFirstOrLast?n[0].removeLabel():n[r].removeLabel())},shift:function(n){this._axisGroup.attr({translateX:n.right,translateY:n.bottom}),this._axisElementsGroup.attr({translateX:n.right,translateY:n.bottom})},getTranslatedAngle(n){return n+this.getAngles()[0]-90}},U0=wl,cy=(0,_.X)({},wl,{_createAxisElement:function(){return this._renderer.path([],"area")},_updateAxisElementPosition:function(){this._axisElement.attr({points:ui(this.getSpiderTicks(),function(n){return{x:n.coords.x,y:n.coords.y}})})},_getStick:function(){return!0},_getSpiderCategoryOption:function(){return!0},getSpiderTicks:function(){const n=this.getFullTicks();return this._spiderTicks=n.map(FD(this,this.renderer,{},{},this._getSkippedCategory(n),!0)),this._spiderTicks.forEach(function(e){e.initCoords()}),this._spiderTicks},_getStripGraphicAttributes:function(n,e){const t=this.getCenter(),i=this.getSpiderTicks();let r,m,A,V;const X=[];let ce=0;const _e=i.length;for(;ce<_e;)V=i[ce].coords,V.angle>=n&&V.angle<=e&&(r||(r=(i[ce-1]||i[i.length-1]).coords,X.push((V.x+r.x)/2,(V.y+r.y)/2)),X.push(V.x,V.y),A=(i[ce+1]||i[0]).coords,m={x:(V.x+A.x)/2,y:(V.y+A.y)/2}),ce++;return X.push(m.x,m.y),X.push(t.x,t.y),{points:X}},_createStrip:function(n){let{points:e}=n;return this._renderer.path(e,"area")},_getTranslatedCoord:function(n,e){return this._translator.translate(n,e)-90},_setTickOffset:function(){this._tickOffset=!1}}),S_={_resetMargins(){this._reinitTranslator(this._getViewportRange())},_getStick:H0._getStick,_getSpiderCategoryOption:h.lQ,_getTranslatorOptions:function(){return{isHorizontal:!0,stick:this._getStick()}},getRadius:wl.getRadius,getCenter:wl.getCenter,getAngles:wl.getAngles,_updateRadius:wl._updateRadius,_updateCenter:wl._updateCenter,_processCanvas(n){return this._updateRadius(n),this._updateCenter(n),{left:0,right:0,startPadding:n.startPadding,endPadding:n.endPadding,width:this.getRadius()}},_createAxisElement:H0._createAxisElement,_updateAxisElementPosition:function(){const n=this.getCenter();this._axisElement.attr({points:[n.x,n.y,n.x+this.getRadius(),n.y]}).rotate(this.getAngles()[0]-90,n.x,n.y)},_getScreenDelta:function(){return this.getRadius()},_getTickMarkPoints:function(n,e){return[n.x-e/2,n.y,n.x+e/2,n.y]},_getLabelAdjustedCoord:function(n){const e=n.labelCoords,t=e.y,i=en(e.angle),r=this._options.label.indentFromAxis||0,m=n.labelBBox;return{x:e.x-ly(r*i.sin)+ly(m.width/2*i.cos)-m.width/2,y:t+(t-m.y)-ly(m.height/2*i.sin)+ly(r*i.cos)}},_getGridLineDrawer:function(){const n=this;return function(e,t){const i=n._getGridPoints(e.coords);return n._renderer.circle(i.cx,i.cy,i.r).attr(t).sharp()}},_getGridPoints:function(n){const e=this.getCenter(),t=Di(e.x,e.y,n.x,n.y);return t>this.getRadius()?{cx:null,cy:null,r:null}:{cx:e.x,cy:e.y,r:t}},_getTranslatedValue:function(n,e){const t=this.getAngles()[0],i=lo(this.getCenter(),t,0,this._translator.translate(n,e));return{x:i.x,y:i.y,angle:t-90}},_getTranslatedCoord:function(n,e){return this._translator.translate(n,e)},_getCanvasStartEnd(){const n=this.getTranslator().getBusinessRange().invert,e=[0,this.getRadius()];return n&&e.reverse(),{start:e[0],end:e[1]}},_getStripGraphicAttributes:function(n,e){const t=this.getCenter();return{x:t.x,y:t.y,innerRadius:n,outerRadius:e}},_createStrip:function(n){return this._renderer.arc(n.x,n.y,n.innerRadius,n.outerRadius,0,360)},_getAdjustedStripLabelCoords:wl._getAdjustedStripLabelCoords,_getStripLabelCoords:function(n,e){const t=n+(e-n)/2,i=this.getCenter(),r=Sf(i.y-t);return{x:i.x,y:r,align:qs.center}},_getConstantLineGraphicAttributes:function(n){const e=this.getCenter();return{cx:e.x,cy:e.y,r:n}},_createConstantLine:function(n,e){const t=this._getConstantLineGraphicAttributes(n);return this._renderer.circle(t.cx,t.cy,t.r).attr(e).sharp()},_getConstantLineLabelsCoords:function(n){const e=this.getCenter(),t=Sf(e.y-n);return{x:e.x,y:t}},_checkAlignmentConstantLineLabels:h.lQ,_rotateTick:function(n,e,t){!t&&n.rotate(e.angle+90,e.x,e.y)},_validateOverlappingMode:wl._validateOverlappingMode,_validateDisplayMode:wl._validateDisplayMode,_getStep:function(n){const e=Nl(this.getAngles()[0]),t=this._options.label.minSpacing,i=2===e||4===e?function(m){return m.width+t}:function(m){return m.height},r=n.reduce((m,A)=>V0(m,i(A)),0);return qs.getTicksCountInRange(this._majorTicks,2===e||4===e?"x":"y",r)}},vm=(0,_.X)({},S_,{_createPathElement:function(n,e){return this._renderer.path(n,"area").attr(e).sharp()},setSpiderTicks:function(n){this._spiderTicks=n},_getGridLineDrawer:function(){const n=this;return function(e,t){return n._createPathElement(n._getGridPoints(e.coords).points,t)}},_getGridPoints:function(n){const e=this.getCenter(),t=Di(e.x,e.y,n.x,n.y);return this._getGridPointsByRadius(t)},_getGridPointsByRadius:function(n){const e=this.getCenter();return n>this.getRadius()?{points:null}:{points:ui(this._spiderTicks,function(t){const i=en(t.coords.angle);return{x:Sf(e.x+n*i.cos),y:Sf(e.y+n*i.sin)}})}},_getStripGraphicAttributes:function(n,e){const t=this._getGridPointsByRadius(e).points;return{points:[this._getGridPointsByRadius(n).points,t.reverse()]}},_createStrip:cy._createStrip,_getConstantLineGraphicAttributes:function(n){return this._getGridPointsByRadius(n)},_createConstantLine:function(n,e){return this._createPathElement(this._getConstantLineGraphicAttributes(n).points,e)}}),Tl=qs.convertTicksToValues,gh=Math,xu=gh.abs,Cc=gh.max,Kd=gh.min,O_=Array.isArray,Of=qs.top,Wh=qs.bottom,Su=qs.left,Xd=qs.right,fl=qs.center,fh="keep",Op="shift",Za="reset",wp="rotate";function Kr(n,e,t,i,r,m){var A;let{allowNegatives:V,linearThreshold:X}=m;return UM({axisType:n.type,dataType:n.dataType,logBase:n.logarithmBase,allowNegatives:V,linearThreshold:X,axisDivisionFactor:r(n.axisDivisionFactor||50),minorAxisDivisionFactor:r(n.minorAxisDivisionFactor||15),numberMultipliers:n.numberMultipliers,calculateMinors:n.minorTick.visible||n.minorGrid.visible||n.calculateMinors,allowDecimals:n.allowDecimals,endOnTick:n.endOnTick,incidentOccurred:e,firstDayOfWeek:null===(A=n.workWeek)||void 0===A?void 0:A[0],skipTickGeneration:t,skipCalculationLimits:n.skipCalculationLimits,generateExtraTick:n.generateExtraTick,minTickInterval:n.minTickInterval,rangeIsEmpty:i})}function T_(n,e,t){const i=n.getOptions();return FD(n,e,i.tick,i.grid,t,!1)}function z0(n,e){const t=n.getOptions();return FD(n,e,t.minorTick,t.minorGrid)}function _r(n,e,t){const i=n.getOptions();return FD(n,e,(0,_.X)({},i.tick,{visible:i.showCustomBoundaryTicks}),i.grid,void 0,!1,t?-1:1)}function Xa(n,e,t,i){(n||[]).forEach(r=>r[e](t,i))}function _g(n){Xa(n,"initCoords")}function bm(n,e){Xa(n,"drawMark",e)}function $h(n,e){Xa(n,"drawGrid",e)}function Zb(n,e,t){Xa(n,"updateTickPosition",e,t)}function nR(n,e){Xa(n,"updateGridPosition",e)}function G0(n){let e=n.length-1;for(;e>=0&&zD(n,e);e--);for(e=0;e<n.length&&zD(n,e);e++)e--}function zD(n,e){return(null===n[e].coords.x||null===n[e].coords.y)&&(n.splice(e,1),!0)}function oR(n,e){return 180*gh.asin((n[0].height+e.minSpacing)/(n[1].x-n[0].x))/gh.PI<45?-45:-90}function _O(n,e,t){n.forEach(function(i,r){i.getContentContainer()&&(r%e!=0?i.removeLabel():t&&t(i,r))})}function W0(n,e){return void 0===n?e:null===n?void 0:n}const Tp=function(n){this._renderer=n.renderer,this._incidentOccurred=n.incidentOccurred,this._eventTrigger=n.eventTrigger,this._stripsGroup=n.stripsGroup,this._stripLabelAxesGroup=n.stripLabelAxesGroup,this._labelsAxesGroup=n.labelsAxesGroup,this._constantLinesGroup=n.constantLinesGroup,this._scaleBreaksGroup=n.scaleBreaksGroup,this._axesContainerGroup=n.axesContainerGroup,this._gridContainerGroup=n.gridGroup,this._axisCssPrefix=n.widgetClass+"-"+(n.axisClass?n.axisClass+"-":""),this._setType(n.axisType,n.drawingType),this._createAxisGroups(),this._translator=this._createTranslator(),this.isArgumentAxis=n.isArgumentAxis,this._viewport={},this._prevDataInfo={},this._firstDrawing=!0,this._initRange={},this._getTemplate=n.getTemplate};Tp.prototype={constructor:Tp,_drawAxis(){const n=this._options;n.visible&&(this._axisElement=this._createAxisElement(),this._updateAxisElementPosition(),this._axisElement.attr({"stroke-width":n.width,stroke:n.color,"stroke-opacity":n.opacity}).sharp(this._getSharpParam(!0),this.getAxisSharpDirection()).append(this._axisLineGroup))},_createPathElement(n,e,t){return this.sharp(this._renderer.path(n,"line").attr(e),t)},sharp(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n.sharp(this._getSharpParam(),e)},customPositionIsAvailable:()=>!1,getOrthogonalAxis:h.lQ,getCustomPosition:h.lQ,getCustomBoundaryPosition:h.lQ,resolveOverlappingForCustomPositioning:h.lQ,hasNonBoundaryPosition:()=>!1,customPositionIsBoundaryOrthogonalAxis:()=>!1,getResolvedBoundaryPosition(){return this.getOptions().position},getAxisSharpDirection(){const n=this.getResolvedBoundaryPosition();return this.hasNonBoundaryPosition()||n!==Wh&&n!==Xd?1:-1},getSharpDirectionByCoords(n){const e=this._getCanvasStartEnd(),t=Math.max(e.start,e.end);return this.getRadius?0:t!==n[this._isHorizontal?"x":"y"]?1:-1},_getGridLineDrawer:function(){const n=this;return function(e,t){const i=n._getGridPoints(e.coords);return i.points?n._createPathElement(i.points,t,n.getSharpDirectionByCoords(e.coords)):null}},_getGridPoints:function(n){const e=this._isHorizontal,t=e?"x":"y",i=this._orthogonalPositions,r=i.start,m=i.end,A=this.borderOptions,V=e?Su:Of,X=e?Xd:Wh,ce=this.getCanvas(),_e={left:ce.left,right:ce.width-ce.right,top:ce.top,bottom:ce.height-ce.bottom},Je=4+(A.visible&&A[V]?_e[V]:void 0),rt=(A.visible&&A[X]?_e[X]:void 0)-4;return this.areCoordsOutsideAxis(n)||void 0===n[t]||n[t]<Je||n[t]>rt?{points:null}:{points:e?null!==n[t]?[n[t],r,n[t],m]:null:null!==n[t]?[r,n[t],m,n[t]]:null}},_getConstantLinePos:function(n,e,t){const i=this._getTranslatedCoord(n);if(!(!(0,C.O9)(i)||i<Kd(e,t)||i>Cc(e,t)))return i},_getConstantLineGraphicAttributes:function(n){const e=this._orthogonalPositions.start,t=this._orthogonalPositions.end;return{points:this._isHorizontal?[n,e,n,t]:[e,n,t,n]}},_createConstantLine:function(n,e){return this._createPathElement(this._getConstantLineGraphicAttributes(n).points,e,function GD(n,e){return Math.max(e.start,e.end)!==n?1:-1}(n,this._getCanvasStartEnd()))},_drawConstantLineLabelText:function(n,e,t,i,r){let{font:m,cssClass:A}=i;return this._renderer.text(n,e,t).css(Ti((0,_.X)({},this._options.label.font,m))).attr({align:"center",class:A}).append(r)},_drawConstantLineLabels:function(n,e,t,i){let r=e.text;const A=this._options.label;this._checkAlignmentConstantLineLabels(e),r=r??this.formatLabel(n,A);const V=this._getConstantLineLabelsCoords(t,e);return this._drawConstantLineLabelText(r,V.x,V.y,e,i)},_getStripPos:function(n,e,t,i,r){const m=!(!r.minVisible&&!r.maxVisible),A=(r.categories||[]).reduce(function(rt,Ct){return rt.push(Ct.valueOf()),rt},[]);let V,X,ce,_e,Me;if(!m&&(0,C.O9)(n)&&(0,C.O9)(e)){const rt=this.parser(n),Ct=this.parser(e);if(_e=A.indexOf(rt?.valueOf()??void 0),Me=A.indexOf(Ct?.valueOf()??void 0),-1===_e||-1===Me)return{from:0,to:0,outOfCanvas:!0};_e>Me&&(ce=e,e=n,n=ce)}(0,C.O9)(n)?(n=this.validateUnit(n,"E2105","strip"),V=this._getTranslatedCoord(n,-1)):V=t,(0,C.O9)(e)?(e=this.validateUnit(e,"E2105","strip"),X=this._getTranslatedCoord(e,1)):X=i;const Ve=V<X?{from:V,to:X}:{from:X,to:V},Je=this.getVisibleArea();return(Ve.from<=Je[0]&&Ve.to<=Je[0]||Ve.from>=Je[1]&&Ve.to>=Je[1])&&(Ve.outOfCanvas=!0),Ve},_getStripGraphicAttributes:function(n,e){let t,i,r,m;const A=this._orthogonalPositions,V=A.start,X=A.end;return this._isHorizontal?(t=n,i=Kd(V,X),r=e-n,m=xu(V-X)):(t=Kd(V,X),i=n,r=xu(V-X),m=xu(n-e)),{x:t,y:i,width:r,height:m}},_createStrip:function(n){return this._renderer.rect(n.x,n.y,n.width,n.height)},_adjustStripLabels:function(){const n=this;this._strips.forEach(function(e){e.label&&e.label.attr(n._getAdjustedStripLabelCoords(e))})},_adjustLabelsCoord(n,e,t){const i=r=>this._getLabelAdjustedCoord(r,n+(r.labelOffset||0),e,t);this._majorTicks.forEach(function(r){r.label?(r.updateMultilineTextAlignment(),r.label.attr(i(r))):r.templateContainer&&r.templateContainer.attr(i(r))})},_adjustLabels:function(n){const e=this.getOptions(),t=e.position===e.label.position,i=this._majorTicks.reduce(function(m,A){if(!A.getContentContainer())return m;const V=A.labelRotationAngle?hr(A.labelBBox,[A.labelCoords.x,A.labelCoords.y],-A.labelRotationAngle):A.labelBBox;return{width:Cc(m.width||0,V.width),height:Cc(m.height||0,V.height),offset:Cc(m.offset||0,A.labelOffset||0)}},{}),r=t?this._isHorizontal?i.height:i.width:0;return this._adjustLabelsCoord(n,i.width),n+r+(r&&this._options.label.indentFromAxis)+(t?i.offset:0)},_getLabelAdjustedCoord:function(n,e,t){e=e||0;const i=this._options,m=n.templateContainer&&n.templateContainer.getBBox()||hr(n.labelBBox,[n.labelCoords.x,n.labelCoords.y],-n.labelRotationAngle||0),A=n.labelAlignment||i.label.alignment,V="discrete"===this._options.type,X=n.labelRotationAngle%90==0,ce=i.label.indentFromAxis,_e=i.label.position,Me=this._axisPosition,Ve=n.labelCoords,Je=Ve.x;let rt,Ct;return this._isHorizontal?(Ct=_e===Wh?Me+ce-m.y+e:Me-ce-(m.y+m.height)-e,rt=A===Xd?V&&X?n.coords.x-(m.x+m.width):Je-m.x-m.width:A===Su?V&&X?Je-m.x-(n.coords.x-Je):Je-m.x:Je-m.x-m.width/2):(Ct=Ve.y-m.y-m.height/2,_e===Su?(rt=A===Su?Me-ce-t-m.x:A===fl?Me-ce-t/2-m.x-m.width/2:Me-ce-m.x-m.width,rt-=e):(rt=A===Xd?Me+ce+t-m.x-m.width:A===fl?Me+ce+t/2-m.x-m.width/2:Me+ce-m.x,rt+=e)),{translateX:rt,translateY:Ct}},_createAxisConstantLineGroups:function(){const n=this._renderer,t=this._axisCssPrefix+"constant-lines",i=n.g().attr({class:t}),r=n.g().attr({class:t}),m=n.g().attr({class:t});return{inside:i,outside1:r,left:r,top:r,outside2:m,right:m,bottom:m,remove:function(){this.inside.remove(),this.outside1.remove(),this.outside2.remove()},clear:function(){this.inside.clear(),this.outside1.clear(),this.outside2.clear()}}},_createAxisGroups:function(){const n=this._renderer,e=this._axisCssPrefix;this._axisGroup=n.g().attr({class:e+"axis"}).enableLinks(),this._axisStripGroup=n.g().attr({class:e+"strips"}),this._axisGridGroup=n.g().attr({class:e+"grid"}),this._axisElementsGroup=n.g().attr({class:e+"elements"}),this._axisLineGroup=n.g().attr({class:e+"line"}).linkOn(this._axisGroup,"axisLine").linkAppend(),this._axisTitleGroup=n.g().attr({class:e+"title"}).append(this._axisGroup),this._axisConstantLineGroups={above:this._createAxisConstantLineGroups(),under:this._createAxisConstantLineGroups()},this._axisStripLabelGroup=n.g().attr({class:e+"axis-labels"})},_clearAxisGroups:function(){const n=this;n._axisGroup.remove(),n._axisStripGroup.remove(),n._axisStripLabelGroup.remove(),n._axisConstantLineGroups.above.remove(),n._axisConstantLineGroups.under.remove(),n._axisGridGroup.remove(),n._axisTitleGroup.clear(),(!n._options.label.template||!n.isRendered())&&(n._axisElementsGroup.remove(),n._axisElementsGroup.clear()),n._axisLineGroup&&n._axisLineGroup.clear(),n._axisStripGroup&&n._axisStripGroup.clear(),n._axisGridGroup&&n._axisGridGroup.clear(),n._axisConstantLineGroups.above.clear(),n._axisConstantLineGroups.under.clear(),n._axisStripLabelGroup&&n._axisStripLabelGroup.clear()},_getLabelFormatObject:function(n,e,t,i,r,m){t=t||this._getViewportRange();const A={value:n,valueText:D0(n,{labelOptions:e,ticks:m||Tl(this._majorTicks),tickInterval:r??this._tickInterval,dataType:this._options.dataType,logarithmBase:this._options.logarithmBase,type:this._options.type,showTransition:!this._options.marker.visible,point:i})||"",min:t.minVisible,max:t.maxVisible};return i&&(A.point=i),A},formatLabel:function(n,e,t,i,r,m){const A=this._getLabelFormatObject(n,e,t,i,r,m);return(0,C.Tn)(e.customizeText)?e.customizeText.call(A,A):A.valueText},formatHint:function(n,e,t){const i=this._getLabelFormatObject(n,e,t);return(0,C.Tn)(e.customizeHint)?e.customizeHint.call(i,i):void 0},formatRange(n,e,t,i){return A0({startValue:n,endValue:e,tickInterval:t,argumentFormat:i,axisOptions:this.getOptions()})},_setTickOffset:function(){const e=this._options.discreteAxisDivisionMode;this._tickOffset=+("crossLabels"!==e||!e)},aggregatedPointBetweenTicks(){return"crossTicks"===this._options.aggregatedPointsPosition},resetApplyingAnimation:function(n){this._resetApplyingAnimation=!0,n&&(this._firstDrawing=!0)},isFirstDrawing(){return this._firstDrawing},getMargins:function(){const n=this,{position:e,offset:t,customPosition:i,placeholderSize:r,grid:m,tick:A,crosshairMargin:V}=n._options,X=(0,C.O9)(i),ce=n.getResolvedBoundaryPosition(),_e=n.getCanvas(),Me=_e.left,Ve=_e.top,Je=_e.width-_e.right,rt=_e.height-_e.bottom,Ct=Cc(m.visible&&m.width||0,A.visible&&A.width||0),Xt=n._axisConstantLineGroups.above,On=n._axisConstantLineGroups.under,Fn=[n._axisElementsGroup,Xt.outside1,Xt.outside2,On.outside1,On.outside2,n._axisLineGroup].map(Yt=>Yt&&Yt.getBBox()).concat(function(Yt){const $t=Yt&&Yt.getBBox();return!$t||$t.isEmpty||(n._isHorizontal?($t.x=Me,$t.width=Je-Me):($t.y=Ve,$t.height=rt-Ve)),$t}(n._axisTitleGroup)),oi=$v(Fn,_e);if(oi[e]+=V,n.hasNonBoundaryPosition()&&X&&(oi[ce]=0),r&&(oi[e]=r),Ct&&(n._isHorizontal&&_e.right<Ct&&oi.right<Ct&&(oi.right=Ct),!n._isHorizontal&&_e.bottom<Ct&&oi.bottom<Ct&&(oi.bottom=Ct)),!X&&(0,C.O9)(t)){const Yt=n.customPositionIsBoundary()&&(t>0&&(ce===Su||ce===Of)||t<0&&(ce===Xd||ce===Wh));oi[ce]-=Yt?t:0}return oi},validateUnit:function(n,e,t){return void 0===(n=this.parser(n))&&e&&this._incidentOccurred(e,[t]),n},_setType:function(n,e){let t;switch(n){case"xyAxes":t=fO;break;case"polarAxes":t=b}(0,_.X)(this,t[e])},_getSharpParam:function(){return!0},_disposeBreaksGroup:h.lQ,dispose:function(){[this._axisElementsGroup,this._axisStripGroup,this._axisGroup].forEach(function(n){n.dispose()}),this._strips=this._title=null,this._axisStripGroup=this._axisConstantLineGroups=this._axisStripLabelGroup=this._axisBreaksGroup=null,this._axisLineGroup=this._axisElementsGroup=this._axisGridGroup=null,this._axisGroup=this._axisTitleGroup=null,this._axesContainerGroup=this._stripsGroup=this._constantLinesGroup=this._labelsAxesGroup=null,this._renderer=this._options=this._textOptions=this._textFontStyles=null,this._translator=null,this._majorTicks=this._minorTicks=null,this._disposeBreaksGroup(),this._templatesRendered&&this._templatesRendered.reject()},getOptions:function(){return this._options},setPane:function(n){this.pane=n,this._options.pane=n},setTypes:function(n,e,t){this._options.type=n||this._options.type,this._options[t]=e||this._options[t],this._updateTranslator()},resetTypes:function(n){this._options.type=this._initTypes.type,this._options[n]=this._initTypes[n]},getTranslator:function(){return this._translator},updateOptions:function(n){const e=this,t=n.label;(function iR(n){const e=n.label;let t=n.position;const i=n.isHorizontal?Wh:Su,r=n.isHorizontal?Of:Xd;let m=e.position;t!==i&&t!==r&&(t=i),m&&"outside"!==m?"inside"===m&&(m={[Of]:Wh,[Wh]:Of,[Su]:Xd,[Xd]:Su}[t]):m=t,m!==i&&m!==r&&(m=t),e.alignment!==fl&&!e.userAlignment&&(e.alignment={[Of]:fl,[Wh]:fl,[Su]:Xd,[Xd]:Su}[m]),n.position=t,e.position=m,n.hoverMode=n.hoverMode?n.hoverMode.toLowerCase():"none",e.minSpacing=e.minSpacing??5,n.type&&(n.type=n.type.toLowerCase()),n.argumentType&&(n.argumentType=n.argumentType.toLowerCase()),n.valueType&&(n.valueType=n.valueType.toLowerCase())})(n),function WD(n,e){n&&"shift"===e.visualRangeUpdateMode&&go.A.log("W0016","valueAxis.visualRangeUpdateMode","shift","23.1","Specify another value")}(!e.isArgumentAxis,n),e._options=n,n.tick=n.tick||{},n.minorTick=n.minorTick||{},n.grid=n.grid||{},n.minorGrid=n.minorGrid||{},n.title=n.title||{},n.marker=n.marker||{},e._initTypes={type:n.type,argumentType:n.argumentType,valueType:n.valueType},e._setTickOffset(),e._isHorizontal=n.isHorizontal,e.pane=n.pane,e.name=n.name,e.priority=n.priority,e._hasLabelFormat=""!==t.format&&(0,C.O9)(t.format),e._textOptions={opacity:t.opacity,align:"center",class:t.cssClass},e._textFontStyles=Ti(t.font),n.type===qs.logarithmic&&n.logarithmBaseError&&(e._incidentOccurred("E2104"),delete n.logarithmBaseError),e._updateTranslator(),e._createConstantLines(),e._strips=(n.strips||[]).map(i=>function E_(n,e){let t,i;const r=e.label||{};return{options:e,label:null,rect:null,_getCoord(){const m=n._getCanvasStartEnd(),A=n._translator.getBusinessRange();return n._getStripPos(e.startValue,e.endValue,m.start,m.end,A)},_drawLabel:m=>n._renderer.text(r.text,m.x,m.y).css(Ti((0,_.X)({},n.getOptions().label.font,r.font))).attr({align:"center",class:r.cssClass}).append(n._axisStripLabelGroup),draw(){if(!n._translator.getBusinessRange().isEmpty()&&((0,C.O9)(e.startValue)||(0,C.O9)(e.endValue))&&(0,C.O9)(e.color)){const m=this._getCoord();if(this.labelCoords=r.text?n._getStripLabelCoords(m.from,m.to,r):null,m.outOfCanvas||!(0,C.O9)(m.to)||!(0,C.O9)(m.from))return;this.rect=n._createStrip(n._getStripGraphicAttributes(m.from,m.to)).attr({fill:e.color}).append(n._axisStripGroup),this.label=r.text?this._drawLabel(this.labelCoords):null}},getContentContainer(){return this.label},removeLabel(){},updatePosition(m){const A=this._getCoord();m&&t?(this.label&&this.label.attr(n._getStripLabelCoords(t.from,t.to,e.label)),this.rect&&this.rect.attr(n._getStripGraphicAttributes(t.from,t.to)),this.label&&this.label.animate(n._getStripLabelCoords(A.from,A.to,e.label)),this.rect&&this.rect.animate(n._getStripGraphicAttributes(A.from,A.to))):(this.label&&this.label.attr(n._getStripLabelCoords(A.from,A.to,e.label)),this.rect&&this.rect.attr(n._getStripGraphicAttributes(A.from,A.to)))},saveCoords(){i=t,t=this._getCoord()},resetCoordinates(){t=i}}}(e,i)),e._majorTicks=e._minorTicks=null,e._firstDrawing=!0},calculateInterval:function(n,e){const t=this._options;if(!t||t.type!==qs.logarithmic)return xu(n-e);const{allowNegatives:i,linearThreshold:r}=new Bl(this.getTranslator().getBusinessRange());return xu(Mr(n,t.logarithmBase,i,r)-Mr(e,t.logarithmBase,i,r))},getCanvasRange(){const n=this._translator;return{startValue:n.from(n.translate("canvas_position_start")),endValue:n.from(n.translate("canvas_position_end"))}},_processCanvas:function(n){return n},updateCanvas:function(n,e){if(e)this._orthogonalPositions=null;else{const t=this._orthogonalPositions={start:this._isHorizontal?n.top:n.left,end:this._isHorizontal?n.height-n.bottom:n.width-n.right};t.center=t.start+(t.end-t.start)/2}this._canvas=n,this._translator.updateCanvas(this._processCanvas(n)),this._initAxisPositions()},getCanvas:function(){return this._canvas},getAxisShift(){return this._axisShift||0},hideTitle:function(){const n=this;n._options.title.text&&(n._incidentOccurred("W2105",[n._isHorizontal?"horizontal":"vertical"]),n._axisTitleGroup.clear())},getTitle:function(){return this._title},hideOuterElements:function(){const n=this;(n._options.label.visible||n._outsideConstantLines.length)&&!n._translator.getBusinessRange().isEmpty()&&(n._incidentOccurred("W2106",[n._isHorizontal?"horizontal":"vertical"]),n._axisElementsGroup.clear(),Xa(n._outsideConstantLines,"removeLabel"))},_resolveLogarithmicOptionsForRange(n){const e=this._options;e.type===qs.logarithmic&&(n.addRange({allowNegatives:void 0!==e.allowNegatives?e.allowNegatives:n.min<=0}),isNaN(e.linearThreshold)||(n.linearThreshold=e.linearThreshold))},adjustViewport(n){const e=this._options,t=e.type===qs.discrete;let i=this._seriesData&&this._seriesData.categories||[];const r=this.adjustRange(er(e.wholeRange)),m=this.getViewport()||{},A=new Bl(n);this._addConstantLinesToRange(A);let V=(0,C.O9)(m.startValue),X=(0,C.O9)(m.endValue);t||(V=V&&(!(0,C.O9)(r.endValue)||m.startValue<r.endValue),X=X&&(!(0,C.O9)(r.startValue)||m.endValue>r.startValue));const ce=V?m.startValue:A.minVisible,_e=X?m.endValue:A.maxVisible;t?(i=fr(i,r.startValue,r.endValue).categories,A.categories=i):(A.min=r.startValue??A.min,A.max=r.endValue??A.max);const Me=Xr({axisType:e.type,dataType:e.dataType,base:e.logarithmBase},{startValue:V?m.startValue:void 0,endValue:X?m.endValue:void 0,length:m.length},{categories:i,min:r.startValue,max:r.endValue},{categories:i,min:ce,max:_e});return A.minVisible=Me.startValue,A.maxVisible=Me.endValue,!(0,C.O9)(A.min)&&(A.min=A.minVisible),!(0,C.O9)(A.max)&&(A.max=A.maxVisible),A.addRange({}),this._resolveLogarithmicOptionsForRange(A),A},adjustRange(n){n=n||{};const e=this._options.type===qs.discrete,i=!1===this._options.allowNegatives;if(this._options.type===qs.logarithmic&&(n.startValue=i&&n.startValue<=0?null:n.startValue,n.endValue=i&&n.endValue<=0?null:n.endValue),!e&&(0,C.O9)(n.startValue)&&(0,C.O9)(n.endValue)&&n.startValue>n.endValue){const r=n.endValue;n.endValue=n.startValue,n.startValue=r}return n},_getVisualRangeUpdateMode(n,e,t){let i=this._options.visualRangeUpdateMode;const r=this._translator,m=this._seriesData,A=this._prevDataInfo;if(A.isEmpty&&!A.containsConstantLine)return fh;if(!this.isArgumentAxis){const V=this.getViewport();if(!(0,C.O9)(V.startValue)&&!(0,C.O9)(V.endValue)&&!(0,C.O9)(V.length))return Za}if(this.isArgumentAxis){if(-1===[Op,fh,Za].indexOf(i)){if(m.axisType===qs.discrete){const V=m.categories,X=e.categories,ce=this.visualRange();i=V&&X&&V.length&&-1!==X.map(_e=>_e.valueOf()).join(",").indexOf(V.map(_e=>_e.valueOf()).join(","))&&(ce.startValue.valueOf()!==V[0].valueOf()||ce.endValue.valueOf()!==V[V.length-1].valueOf())?fh:Za}else{const V=r.translate(m.min),X=r.translate(n.startValue),ce=r.translate(m.max),_e=r.translate(n.endValue);i=V===X&&ce===_e?Za:V!==X&&ce===_e?Op:fh}i===fh&&A.isEmpty&&A.containsConstantLine&&(i=Za)}}else-1===[fh,Za].indexOf(i)&&(i=t===fh?fh:Za);return i},_handleBusinessRangeChanged(n,e,t){const i=this,r=this.visualRange();if(e||i._translator.getBusinessRange().isEmpty())return;const m=i._lastVisualRangeUpdateMode=i._getVisualRangeUpdateMode(r,t,n);m===fh?i._setVisualRange([r.startValue,r.endValue]):m===Za?i._setVisualRange([null,null]):m===Op&&i._setVisualRange({length:i.getVisualRangeLength()})},getVisualRangeLength(n){const e=n||this._translator.getBusinessRange(),{type:t}=this._options;let i;return i=t===qs.logarithmic?(0,ri.Ai)(this.calculateInterval(e.maxVisible,e.minVisible)):t===qs.discrete?fr(e.categories,e.minVisible,e.maxVisible).categories.length:e.maxVisible-e.minVisible,i},getVisualRangeCenter(n,e){const t=this.getTranslator(),i=t.getBusinessRange(),r=e?(0,_.X)(!0,{},i,n||{}):n||i,{type:m,logarithmBase:A}=this._options;let V;if((0,C.O9)(r.minVisible)&&(0,C.O9)(r.maxVisible)){if(m===qs.logarithmic){const{allowNegatives:X,linearThreshold:ce,minVisible:_e,maxVisible:Me}=r;V=dn((0,ri.Ai)(Mr(Me,A,X,ce)+Mr(_e,A,X,ce))/2,A,X,ce)}else if(m===qs.discrete){const X=fr(r.categories,r.minVisible,r.maxVisible),ce=Math.ceil(X.categories.length/2)-1;V=i.categories.indexOf(X.categories[ce])}else V=t.toValue((r.maxVisible.valueOf()+r.minVisible.valueOf())/2);return V}},setBusinessRange(n,e,t,i){const r=this,m=r._options,A=m.type===qs.discrete;r._handleBusinessRangeChanged(t,e,n),r._seriesData=new Bl(n);const V=r._seriesData.isEmpty(),X=new Bl(r._seriesData);if(r._addConstantLinesToRange(X),r._prevDataInfo={isEmpty:V,containsConstantLine:X.containsConstantLine},r._seriesData.addRange({categories:m.categories,dataType:m.dataType,axisType:m.type,base:m.logarithmBase,invert:m.inverted}),r._resolveLogarithmicOptionsForRange(r._seriesData),!A){if(!(0,C.O9)(r._seriesData.min)&&!(0,C.O9)(r._seriesData.max)){const _e=r.getViewport();_e&&r._seriesData.addRange({min:_e.startValue,max:_e.endValue})}const ce=m.synchronizedValue;(0,C.O9)(ce)&&r._seriesData.addRange({min:ce,max:ce})}r._seriesData.minVisible=r._seriesData.minVisible??r._seriesData.min,r._seriesData.maxVisible=r._seriesData.maxVisible??r._seriesData.max,!r.isArgumentAxis&&m.showZero&&r._seriesData.correctValueZeroLevel(),r._seriesData.sortCategories(r.getCategoriesSorter(i)),r._seriesData.userBreaks=r._seriesData.isEmpty()?[]:r._getScaleBreaks(m,r._seriesData,r._series,r.isArgumentAxis),r._translator.updateBusinessRange(r._getViewportRange())},_addConstantLinesToRange(n){this._outsideConstantLines.concat(this._insideConstantLines||[]).forEach(e=>{if(e.options.extendAxis){const t=e.getParsedValue();n.addRange({containsConstantLine:!0,minVisible:t,maxVisible:t,min:(0,C.O9)(n.min)?n.min:t,max:(0,C.O9)(n.max)?n.max:t})}})},setGroupSeries:function(n){this._series=n},getLabelsPosition:function(){const n=this._options,e=n.position,t=n.label.indentFromAxis+(this._axisShift||0)+this._constantLabelOffset,i=this._axisPosition;return e===Of||e===Su?i-t:i+t},getFormattedValue:function(n,e,t){const i=this._options.label;return(0,C.O9)(n)?this.formatLabel(n,(0,_.X)(!0,{},i,e),void 0,t):null},_getBoundaryTicks:function(n,e){const t=this,i=n.length,r=t._options,m=r.customBoundTicks,A=e.minVisible,V=e.maxVisible,X=r.showCustomBoundaryTicks?t._boundaryTicksVisibility:{};let ce=[];return r.type===qs.discrete?t._tickOffset&&0!==n.length&&(ce=[n[0],n[n.length-1]]):m?(X.min&&(0,C.O9)(m[0])&&ce.push(m[0]),X.max&&(0,C.O9)(m[1])&&ce.push(m[1])):(X.min&&(0===i||n[0]>A)&&ce.push(A),X.max&&(0===i||n[i-1]<V)&&ce.push(V)),ce},setPercentLabelFormat:function(){this._hasLabelFormat||(this._options.label.format="percent")},resetAutoLabelFormat:function(){this._hasLabelFormat||delete this._options.label.format},getMultipleAxesSpacing:function(){return this._options.multipleAxesSpacing||0},getTicksValues:function(){return{majorTicksValues:Tl(this._majorTicks),minorTicksValues:Tl(this._minorTicks)}},estimateTickInterval:function(n){return this.updateCanvas(n),this._tickInterval!==this._getTicks(this._getViewportRange(),h.lQ,!0).tickInterval},setTicks:function(n){const e=n.majorTicks||[];this._majorTicks=e.map(T_(this,this._renderer,this._getSkippedCategory(e))),this._minorTicks=(n.minorTicks||[]).map(z0(this,this._renderer)),this._isSynchronized=!0},_adjustDivisionFactor:function(n){return n},_getTicks:function(n,e,t){const i=this._options,r=i.customTicks,m=i.customMinorTicks;return Kr(i,e||this._incidentOccurred,t,this._translator.getBusinessRange().isEmpty(),this._adjustDivisionFactor.bind(this),n)({min:n.minVisible,max:n.maxVisible,categories:n.categories,isSpacedMargin:n.isSpacedMargin},this._getScreenDelta(),i.tickInterval,"ignore"===i.label.overlappingBehavior||i.forceUserTickInterval,{majors:r,minors:m},i.minorTickInterval,i.minorTickCount,this._initialBreaks)},_createTicksAndLabelFormat:function(n,e){const t=this._options,i=this._getTicks(n,e,!1);return!n.isEmpty()&&t.type===qs.discrete&&"datetime"===t.dataType&&!this._hasLabelFormat&&i.ticks.length&&(t.label.format=Hd.A.getDateFormatByTicks(i.ticks)),i},getAggregationInfo(n,e){var t;const i=this,r=i._options,m=i._marginOptions,A=new Bl(i.getTranslator().getBusinessRange()).addRange(e),V=i.getViewport(),X=V?.startValue??A.minVisible,ce=V?.endValue??A.maxVisible;let _e=[];if(r.type===qs.discrete&&r.aggregateByCategory)return{aggregateByCategory:!0};const Me=r.aggregationInterval;let Ve=r.aggregationGroupWidth;!Ve&&m&&(m.checkInterval&&(Ve=r.axisDivisionFactor),m.sizePointNormalState&&(Ve=Math.min(m.sizePointNormalState,r.axisDivisionFactor)));const Je=!r.aggregationGroupWidth&&!Me&&e.interval,rt=function $0(n,e,t,i,r){const m=(0,_.X)({},n,{endOnTick:!0,axisDivisionFactor:e,skipCalculationLimits:!0,generateExtraTick:!0,minTickInterval:r});return function(A,V,X,ce,_e){return Kr(m,h.lQ,V,t.isEmpty(),Me=>Me,t)({min:X,max:ce,categories:t.categories,isSpacedMargin:t.isSpacedMargin},i,A,(0,C.O9)(A),void 0,void 0,void 0,_e)}}(r,Ve,A,i._getScreenDelta(),Je),Ct=rt(Me,!0,X,ce,null===(t=i._seriesData)||void 0===t?void 0:t.breaks).tickInterval;if(r.type!==qs.discrete){const Xt=n?A.min:X,On=n?A.max:ce;if((0,C.O9)(Xt)&&(0,C.O9)(On)){const Fn=Wr({base:r.logarithmBase,axisType:r.type,dataType:r.dataType},!1);let oi=Xt,Yt=On;if(!n&&(0,C.O9)(Ct)){const Gn=Math.max(i.calculateInterval(On,Xt),"datetime"===r.dataType?Tn.A.dateToMilliseconds(Ct):Ct);oi=Fn(Xt,Gn,-1),Yt=Fn(On,Gn)}oi=oi<A.min?A.min:oi,Yt=Yt>A.max?A.max:Yt;const $t=i._getScaleBreaks(r,{minVisible:oi,maxVisible:Yt},i._series,i.isArgumentAxis);_e=rt(Ct,!1,oi,Yt,i._filterBreaks($t,{minVisible:oi,maxVisible:Yt},r.breakStyle)).ticks}}return i._aggregationInterval=Ct,{interval:Ct,ticks:_e}},getTickInterval(){return this._tickInterval},getAggregationInterval(){return this._aggregationInterval},createTicks:function(n){const e=this,t=e._renderer,i=e._options;if(!n)return;e._isSynchronized=!1,e.updateCanvas(n);const r=e._getViewportRange();e._initialBreaks=r.breaks=this._seriesData.breaks=e._filterBreaks(this._seriesData.userBreaks,r,i.breakStyle),e._estimatedTickInterval=e._getTicks(e.adjustViewport(this._seriesData),h.lQ,!0).tickInterval;const m=this._calculateValueMargins();r.addRange({minVisible:m.minValue,maxVisible:m.maxValue,isSpacedMargin:m.isSpacedMargin});const A=e._createTicksAndLabelFormat(r),V=e._getBoundaryTicks(A.ticks,e._getViewportRange());i.showCustomBoundaryTicks&&V.length?(e._boundaryTicks=[V[0]].map(_r(e,t,!0)),V.length>1&&(e._boundaryTicks=e._boundaryTicks.concat([V[1]].map(_r(e,t,!1))))):e._boundaryTicks=[];const X=(A.minorTicks||[]).filter(function(Ct){return!V.some(function(Xt){return _n(Xt)===_n(Ct)})});e._tickInterval=A.tickInterval,e._minorTickInterval=A.minorTickInterval;const ce=e._majorTicks||[],_e=ce.reduce((Ct,Xt)=>(Ct[Xt.value.valueOf()]=Xt,Ct),{}),Me=(0,C.NW)(A.ticks[0])===(0,C.NW)(ce[0]&&ce[0].value),Ve=e._getSkippedCategory(A.ticks),Je=A.ticks.map(Ct=>{const Xt=_e[Ct.valueOf()];return Xt&&Me?(delete _e[Ct.valueOf()],Xt.setSkippedCategory(Ve),Xt):T_(e,t,Ve)(Ct)});e._majorTicks=Je;const rt=e._minorTicks||[];e._minorTicks=X.map((Ct,Xt)=>{const On=rt[Xt];return On?(On.updateValue(Ct),On):z0(e,t)(Ct)}),e._ticksToRemove=Object.keys(_e).map(Ct=>_e[Ct]).concat(rt.slice(e._minorTicks.length,rt.length)),e._ticksToRemove.forEach(Ct=>{var Xt;return null===(Xt=Ct.label)||void 0===Xt?void 0:Xt.removeTitle()}),A.breaks&&(e._seriesData.breaks=A.breaks),e._reinitTranslator(e._getViewportRange())},_reinitTranslator:function(n){this._isSynchronized||this._translator.updateBusinessRange(n)},_getViewportRange(){return this.adjustViewport(this._seriesData)},setMarginOptions:function(n){this._marginOptions=n},getMarginOptions(){return this._marginOptions??{}},_calculateRangeInterval:function(n){const e="datetime"===this._options.dataType,t=[],i=function(r){(0,C.O9)(r)&&t.push(e?Tn.A.dateToMilliseconds(r):r)};return i(this._tickInterval),i(this._estimatedTickInterval),(0,C.O9)(n)&&t.push(n),i(this._aggregationInterval),this._calculateWorkWeekInterval(Kd.apply(this,t))},_calculateWorkWeekInterval(n){const e=this._options;if("datetime"===e.dataType&&e.workdaysOnly&&n){const t=864e5*e.workWeek.length,i=6048e5-t;t!==n&&i<n?n-=i*Math.ceil(n/6048e5):i>=n&&n>864e5&&(n=864e5)}return n},_getConvertIntervalCoefficient(n,e){const t=this._translator.ratioOfCanvasRange();return t/(t*e/(n+e))},_calculateValueMargins(n){this._resetMargins();const e=this,t=e.getMarginOptions(),i=(t.size||0)/2,r=e._options,m=e._getViewportRange(),A=e.getViewport(),V=e._getScreenDelta(),X=-1!==(r.type||"").indexOf(qs.discrete),ce=r.valueMarginsEnabled&&!X&&!e.customPositionIsBoundaryOrthogonalAxis(),_e=e._translator,Me=r.minValueMargin,Ve=r.maxValueMargin;let Xt,On,Fn,Je=0,rt=0,Ct=0;if(m.stubData||!V)return{startPadding:0,endPadding:0};if(e.isArgumentAxis&&t.checkInterval){Xt=e._calculateRangeInterval(m.interval);const io=_e.getInterval(Xt);isFinite(io)?Ct=Math.ceil(io/(2*e._getConvertIntervalCoefficient(io,V))):Xt=0}const oi=.8*V/2;ce&&((0,C.O9)(Me)?On=isFinite(Me)?Me:0:!e.isArgumentAxis&&t.checkInterval&&_n(m.minVisible)>0&&_n(m.minVisible)===_n(m.min)?Je=5:(Je=Math.max(i,Ct),Je=Math.min(oi,Je)),(0,C.O9)(Ve)?Fn=isFinite(Ve)?Ve:0:!e.isArgumentAxis&&t.checkInterval&&_n(m.maxVisible)<0&&_n(m.maxVisible)===_n(m.max)?rt=5:(rt=Math.max(i,Ct),rt=Math.min(oi,rt))),t.percentStick&&!this.isArgumentAxis&&(1===xu(m.max)&&(rt=0),1===xu(m.min)&&(Je=0));const $t=e._getCanvasStartEnd(),Gn=(V-Je-rt)/(1+(On||0)+(Fn||0))||V;let qn,ii;if((void 0!==On||void 0!==Fn)&&(void 0!==On&&(Je=Gn*On),void 0!==Fn&&(rt=Gn*Fn)),r.type!==qs.discrete&&n&&n.length>1&&!r.skipViewportExtending&&!A.action&&!1!==r.endOnTick){const io=n.length,Uo=_e.translate(n[0].value),zr=_e.translate(n[io-1].value),Os=Uo>zr?-1:1,wa=Cc(Os*($t.start-Uo),0),$l=Cc(Os*(zr-$t.end),0);if(wa>Je||$l>rt){const Jd=e._getConvertIntervalCoefficient($l+wa,V);wa>=Je&&(qn=n[0].value),$l>=rt&&(ii=n[io-1].value),Je=Cc(wa,Je)/Jd,rt=Cc($l,rt)/Jd}}On=void 0===On?Je/Gn:On,Fn=void 0===Fn?rt/Gn:Fn,X||(this._translator.isInverted()?(qn=qn??_e.from($t.start+V*On,-1),ii=ii??_e.from($t.end-V*Fn,1)):(qn=qn??_e.from($t.start-V*On,-1),ii=ii??_e.from($t.end+V*Fn,1)));const{correctedMin:qi,correctedMax:ji,start:$i,end:ho}=e.getCorrectedValuesToZero(qn,ii);return Je=$i??Je,rt=ho??rt,{startPadding:_e.isInverted()?rt:Je,endPadding:_e.isInverted()?Je:rt,minValue:qi??qn,maxValue:ji??ii,interval:Xt,isSpacedMargin:Je===rt&&0!==Je}},getCorrectedValuesToZero(n,e){const t=this,i=t._translator,r=t._getCanvasStartEnd(),m=t._getViewportRange(),A=t._getScreenDelta();let X,ce,_e,Me;const Ve=(Je,rt)=>{const Ct=xu(r.start-Je),Xt=xu(r.end-rt),On=t._getConvertIntervalCoefficient(Ct+Xt,A);X=Ct/On,ce=Xt/On};return!t.isArgumentAxis&&"datetime"!==t._options.dataType&&(n*m.min<=0&&n*m.minVisible<=0&&(Ve(i.translate(0),i.translate(e)),_e=0),e*m.max<=0&&e*m.maxVisible<=0&&(Ve(i.translate(n),i.translate(0)),Me=0)),{start:isFinite(X)?X:null,end:isFinite(ce)?ce:null,correctedMin:_e,correctedMax:Me}},applyMargins(){if(this._isSynchronized)return;const n=this._calculateValueMargins(this._majorTicks),e=(0,_.X)({},this._canvas,{startPadding:n.startPadding,endPadding:n.endPadding});if(this._translator.updateCanvas(this._processCanvas(e)),isFinite(n.interval)){const t=this._translator.getBusinessRange();t.addRange({interval:n.interval}),this._translator.updateBusinessRange(t)}},_resetMargins:function(){this._reinitTranslator(this._getViewportRange()),this._canvas&&this._translator.updateCanvas(this._processCanvas(this._canvas))},_createConstantLines(){const n=(this._options.constantLines||[]).map(e=>function Gh(n,e){const t=e.label||{},i=t.position||"inside";let r,A,V,m=!1;return n._checkAlignmentConstantLineLabels(t),{options:e,labelOptions:t,labelPosition:i,label:null,line:null,getParsedValue:()=>(m||(r=n.validateUnit(e.value,"E2105","constantLine"),m=!0),r),draw(){if(!(0,C.O9)(e.value)||n._translator.getBusinessRange().isEmpty())return this;const X=n._getCanvasStartEnd(),ce=this.getParsedValue();this.coord=n._getConstantLinePos(ce,X.start,X.end);const _e=e.displayBehindSeries?n._axisConstantLineGroups.under:n._axisConstantLineGroups.above;let Me=_e[i];if(Me||(Me=_e[n._isHorizontal?t.verticalAlignment:t.horizontalAlignment]),!(0,C.O9)(this.coord))return this;const Ve=n._createConstantLine(this.coord,{stroke:e.color,"stroke-width":e.width,dashStyle:e.dashStyle});return this.line=Ve.append(_e.inside),this.label=t.visible?n._drawConstantLineLabels(ce,t,this.coord,Me):null,this.updatePosition(),this},getContentContainer(){return this.label},removeLabel(){this.label&&this.label.remove()},updatePosition(X){const ce=n._getCanvasStartEnd(),_e=n._getConstantLinePos(this.getParsedValue(),ce.start,ce.end);(0,C.O9)(_e)&&(this.coord=_e,X&&V?(this.label&&this.label.attr(n._getConstantLineLabelsCoords(V,this.labelOptions)),this.line&&this.line.attr(n._getConstantLineGraphicAttributes(V)),this.label&&this.label.animate(n._getConstantLineLabelsCoords(this.coord,this.labelOptions)),this.line&&this.line.animate(n._getConstantLineGraphicAttributes(this.coord))):(this.label&&this.label.attr(n._getConstantLineLabelsCoords(this.coord,this.labelOptions)),this.line&&this.line.attr(n._getConstantLineGraphicAttributes(this.coord)),n._rotateConstantLine(this.line,this.coord)))},saveCoords(){A=V,V=this.coord},resetCoordinates(){V=A}}}(this,e));this._outsideConstantLines=n.filter(e=>"outside"===e.labelPosition),this._insideConstantLines=n.filter(e=>"inside"===e.labelPosition)},draw:function(n,e){const t=this,i=this._options;t.borderOptions=e||{visible:!1},t._resetMargins(),t.createTicks(n),t.applyMargins(),t._clearAxisGroups(),_g(t._majorTicks),_g(t._minorTicks),_g(t._boundaryTicks),t._axisGroup.append(t._axesContainerGroup),t._drawAxis(),t._drawTitle(),bm(t._majorTicks,i.tick),bm(t._minorTicks,i.minorTick),bm(t._boundaryTicks,i.tick);const r=t._getGridLineDrawer();$h(t._majorTicks,r),$h(t._minorTicks,r),Xa(t._majorTicks,"drawLabel",t._getViewportRange(),t._getTemplate(i.label.template)),t._templatesRendered&&t._templatesRendered.reject(),t._templatesRendered=new g.cY,t._majorTicks.forEach(function(A){A.labelRotationAngle=0,A.labelAlignment=void 0,A.labelOffset=0}),Xa(t._outsideConstantLines.concat(t._insideConstantLines),"draw"),Xa(t._strips,"draw"),t._dateMarkers=t._drawDateMarkers()||[],t._stripLabelAxesGroup&&t._axisStripLabelGroup.append(t._stripLabelAxesGroup),t._gridContainerGroup&&t._axisGridGroup.append(t._gridContainerGroup),t._stripsGroup&&t._axisStripGroup.append(t._stripsGroup),t._labelsAxesGroup&&t._axisElementsGroup.append(t._labelsAxesGroup),t._constantLinesGroup&&(t._axisConstantLineGroups.above.inside.append(t._constantLinesGroup.above),t._axisConstantLineGroups.above.outside1.append(t._constantLinesGroup.above),t._axisConstantLineGroups.above.outside2.append(t._constantLinesGroup.above),t._axisConstantLineGroups.under.inside.append(t._constantLinesGroup.under),t._axisConstantLineGroups.under.outside1.append(t._constantLinesGroup.under),t._axisConstantLineGroups.under.outside2.append(t._constantLinesGroup.under)),t._measureTitle(),x_(t._majorTicks),!i.label.template&&t._applyWordWrap(),x_(t._outsideConstantLines),x_(t._insideConstantLines),x_(t._strips),x_(t._dateMarkers),t._adjustConstantLineLabels(t._insideConstantLines),t._adjustStripLabels();let m=t._constantLabelOffset=t._adjustConstantLineLabels(t._outsideConstantLines);t._translator.getBusinessRange().isEmpty()||(t._setLabelsPlacement(),m=t._adjustLabels(m)),g.z7.apply(this,t._majorTicks.map(A=>A.getTemplateDeferred())).done(()=>{t._templatesRendered.resolve()}),m=t._adjustDateMarkers(m),t._adjustTitle(m)},getTemplatesDef(){return this._templatesRendered},setRenderedState(n){this._drawn=n},isRendered(){return this._drawn},_applyWordWrap(){const n=this;let e,t,i;const r=this._options,m=n._tickInterval;(0,C.O9)(m)&&(e=n.getTranslator().getInterval("datetime"===r.dataType?Tn.A.dateToMilliseconds(m):m));const A=n._validateDisplayMode(r.label.displayMode),V=n._validateOverlappingMode(r.label.overlappingBehavior,A);if(("none"!==(r.label.wordWrap||"none")||"none"!==(r.label.textOverflow||"none"))&&A!==wp&&V!==wp&&"auto"!==V){const _e=(0,C.O9)(r.placeholderSize)?r.placeholderSize-r.label.indentFromAxis:void 0;n._isHorizontal?(t=e,i=_e):(t=_e,i=e);let Me=!1,Ve=!1;t&&n._majorTicks.some(Je=>Je.labelBBox.width>t)&&(Me=!0),i&&n._majorTicks.some(Je=>Je.labelBBox.height>i)&&(Ve=!0),(Me||Ve)&&(n._majorTicks.forEach(Je=>{Je.label&&Je.label.setMaxSize(t,i,r.label)}),x_(n._majorTicks))}},_measureTitle:h.lQ,animate(){Xa(this._majorTicks,"animateLabels")},updateSize(n,e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=this;i.updateCanvas(n),t&&(i._checkTitleOverflow(),i._measureTitle(),i._updateTitleCoords()),i._reinitTranslator(i._getViewportRange()),i.applyMargins();const r=!i._firstDrawing&&e,m=i._options;_g(i._majorTicks),_g(i._minorTicks),_g(i._boundaryTicks),i._resetApplyingAnimation&&!i._firstDrawing&&i._resetStartCoordinates(),G0(i._majorTicks),G0(i._minorTicks),G0(i._boundaryTicks),i._axisElement&&i._updateAxisElementPosition(),Zb(i._majorTicks,m.tick,r),Zb(i._minorTicks,m.minorTick,r),Zb(i._boundaryTicks,m.tick),Xa(i._majorTicks,"updateLabelPosition",r),i._outsideConstantLines.concat(i._insideConstantLines||[]).forEach(A=>A.updatePosition(r)),Xa(i._strips,"updatePosition",r),nR(i._majorTicks,r),nR(i._minorTicks,r),r&&Xa(i._ticksToRemove||[],"fadeOutElements"),i.prepareAnimation(),i._ticksToRemove=null,i._translator.getBusinessRange().isEmpty()||(i._firstDrawing=!1),i._resetApplyingAnimation=!1,i._updateLabelsPosition()},_updateLabelsPosition:h.lQ,prepareAnimation(){const n="saveCoords";Xa(this._majorTicks,n),Xa(this._minorTicks,n),Xa(this._insideConstantLines,n),Xa(this._outsideConstantLines,n),Xa(this._strips,n)},_resetStartCoordinates(){const n="resetCoordinates";Xa(this._majorTicks,n),Xa(this._minorTicks,n),Xa(this._insideConstantLines,n),Xa(this._outsideConstantLines,n),Xa(this._strips,n)},applyClipRects:function(n,e){this._axisGroup.attr({"clip-path":e}),this._axisStripGroup.attr({"clip-path":n}),this._axisElementsGroup.attr({"clip-path":e})},_validateVisualRange(n){const e=er(n);return void 0!==e.startValue&&(e.startValue=this.validateUnit(e.startValue)),void 0!==e.endValue&&(e.endValue=this.validateUnit(e.endValue)),Jr(e,!O_(n))},_validateOptions(n){n.wholeRange=this._validateVisualRange(n.wholeRange),n.visualRange=n._customVisualRange=this._validateVisualRange(n._customVisualRange),this._setVisualRange(n._customVisualRange)},validate(){const n=this._options,e=this.isArgumentAxis?n.argumentType:n.valueType,t=e?Wp(e):function(i){return i};this.parser=t,n.dataType=e,this._validateOptions(n)},resetVisualRange(n){this._seriesData.minVisible=this._seriesData.min,this._seriesData.maxVisible=this._seriesData.max,this.handleZooming([null,null],{start:!!n,end:!!n})},_setVisualRange(n,e){const t=this.adjustRange(er(n));e?((0,C.O9)(t.startValue)&&(this._viewport.startValue=t.startValue),(0,C.O9)(t.endValue)&&(this._viewport.endValue=t.endValue)):this._viewport=t},_applyZooming(n,e){this._resetVisualRangeOption(),this._setVisualRange(n,e);const t=this.getViewport();this._seriesData.userBreaks=this._getScaleBreaks(this._options,{minVisible:t.startValue,maxVisible:t.endValue},this._series,this.isArgumentAxis),this._translator.updateBusinessRange(this._getViewportRange())},getZoomStartEventArg(n,e){return{axis:this,range:this.visualRange(),cancel:!1,event:n,actionType:e}},_getZoomEndEventArg(n,e,t,i,r){const m=this.visualRange();return{axis:this,previousRange:n,range:m,cancel:!1,event:e,actionType:t,zoomFactor:i,shift:r,rangeStart:m.startValue,rangeEnd:m.endValue}},getZoomBounds(){const n=er(this._options.wholeRange),e=this.getTranslator().getBusinessRange(),t={startValue:W0(this._initRange.startValue,e.min),endValue:W0(this._initRange.endValue,e.max)};return{startValue:W0(n.startValue,t.startValue),endValue:W0(n.endValue,t.endValue)}},setInitRange(){this._initRange={},0===Object.keys(this._options.wholeRange||{}).length&&(this._initRange=this.getZoomBounds())},_resetVisualRangeOption(){this._options._customVisualRange={}},getTemplatesGroups(){return this._majorTicks?this._majorTicks.map(e=>e.templateContainer).filter(e=>(0,C.O9)(e)):[]},setCustomVisualRange(n){this._options._customVisualRange=n},visualRange(){const n=this,e=arguments;let t;if(0===e.length){const r=n._getAdjustedBusinessRange();let m=r.minVisible,A=r.maxVisible;return n._options.type===qs.discrete?(m=m??r.categories[0],A=A??r.categories[r.categories.length-1],{startValue:m,endValue:A,categories:fr(r.categories,m,A).categories}):{startValue:m,endValue:A}}t=O_(e[0])?e[0]:(0,C.Qd)(e[0])?(0,_.X)({},e[0]):[e[0],e[1]];const i=n.handleZooming(t,e[1]);i.isPrevented||n._visualRange(n,i)},handleZooming(n,e,t,i){const r=this;e=e||{},(0,C.O9)(n)&&((n=r._validateVisualRange(n)).action=i);const m=r.getZoomStartEventArg(t,i),A=m.range;!e.start&&r._eventTrigger("zoomStart",m);const V={isPrevented:m.cancel,skipEventRising:e.skipEventRising,range:n||m.range};return m.cancel||((0,C.O9)(n)&&r._applyZooming(n,e.allowPartialUpdate),(0,C.O9)(r._storedZoomEndParams)||(r._storedZoomEndParams={startRange:A,type:this.getOptions().type}),r._storedZoomEndParams.event=t,r._storedZoomEndParams.action=i,r._storedZoomEndParams.prevent=!!e.end),V},handleZoomEnd(){const n=this;if((0,C.O9)(n._storedZoomEndParams)&&!n._storedZoomEndParams.prevent){const e=n._storedZoomEndParams.startRange,t=n._storedZoomEndParams.event,i=n._storedZoomEndParams.action,r={minVisible:e.startValue,maxVisible:e.endValue,categories:e.categories},m=n.getOptions().type===n._storedZoomEndParams.type,A=m?(0,ri.Ai)(n.getVisualRangeCenter()-n.getVisualRangeCenter(r,!1)):NaN,V=m?+(Math.round(n.getVisualRangeLength(r)/(n.getVisualRangeLength()||1)+"e+2")+"e-2"):NaN,X=n._getZoomEndEventArg(e,t,i,V,A);X.cancel=n.checkZoomingLowerLimitOvercome(1===V?"pan":"zoom",V).stopInteraction,n._eventTrigger("zoomEnd",X),X.cancel&&n._restorePreviousVisualRange(e),n._storedZoomEndParams=null}},_restorePreviousVisualRange(n){this._storedZoomEndParams=null,this._applyZooming(n),this._visualRange(this,n)},checkZoomingLowerLimitOvercome(n,e,t){const i=this,r=i._options,m=i._translator;let X,A=r.minVisualRangeLength,V=t,ce="zoom"===n&&e>=1;const _e=m.getBusinessRange();t&&(X=i.adjustRange(er(t)),X={minVisible:X.startValue,maxVisible:X.endValue,categories:_e.categories});const Me=i.getVisualRangeLength(_e),Ve=i.getVisualRangeLength(X);if((0,C.O9)(A)||"discrete"===r.type)A=m.convert(A),X&&A<Me&&A>=Ve?(V=er(m.getRangeByMinZoomValue(A,X)),ce=!1):ce&=A>Ve;else{const Je=i._translator.canvasLength;ce&=i.getVisualRangeLength({minVisible:_e.min,maxVisible:_e.max,categories:_e.categories})/Je>=Ve}return{stopInteraction:!!ce,correctedRange:V}},isExtremePosition(n){let e,t;"discrete"===this._options.type?(t=this._translator.getBusinessRange(),e=n?t.categories[t.categories.length-1]:t.categories[0]):(t=this.getZoomBounds(),e=n?t.endValue:t.startValue);const i=this.getTranslator(),r=i.translate(e),m=this.visualRange(),A=i.translate(n?m.endValue:m.startValue);return xu(A-r)<5},getViewport(){return this._viewport},getFullTicks:function(){const n=this._majorTicks||[];return this._options.type===qs.discrete?Tl(n):Tl(n.concat(this._minorTicks,this._boundaryTicks)).sort(function(e,t){return _n(e)-_n(t)})},measureLabels:function(n,e){const t=this,i=t._options,r=i.visible?i.width:0;let m;const A=e?i.label.indentFromAxis+.5*i.tick.length:0;let V;const X=t._getViewportRange();if(X.isEmpty()||!i.label.visible||!t._axisElementsGroup)return{height:r,width:r,x:0,y:0};t._majorTicks?m=Tl(t._majorTicks):(t.updateCanvas(n),m=t._createTicksAndLabelFormat(X,h.lQ),V=m.tickInterval,m=m.ticks);const ce=m.reduce(function(Ve,Je,rt){const Ct=t.formatLabel(Je,i.label,X,void 0,V,m);return Ve.length<Ct.length?Ct:Ve},t.formatLabel(m[0],i.label,X,void 0,V,m)),_e=t._renderer.text(ce,0,0).css(t._textFontStyles).attr(t._textOptions).append(t._renderer.root),Me=_e.getBBox();return _e.remove(),{x:Me.x,y:Me.y,width:Me.width+A,height:Me.height+A}},_setLabelsPlacement:function(){if(!this._options.label.visible)return;const n=this,e=n._options.label,t=n._validateDisplayMode(e.displayMode),i=n._validateOverlappingMode(e.overlappingBehavior,t),r="none"===i||"ignore"===i,m={rotationAngle:e.rotationAngle,staggeringSpacing:e.staggeringSpacing};let A;const V=n._majorTicks.map(function(ce){return ce.labelBBox});let X=n._getStep(V);switch(t){case wp:r&&(A=!0,X=1),n._applyLabelMode(t,X,V,e,A);break;case"stagger":r&&(X=2),n._applyLabelMode(t,Cc(X,2),V,e);break;default:n._applyLabelOverlapping(V,i,X,m)}},_applyLabelOverlapping:function(n,e,t,i){const r=this,m=r._options.label,A=r._majorTicks;"none"===e||"ignore"===e||(t>1&&n.some(function(V,X,ce){return 0!==X&&qs.areLabelsOverlap(V,ce[X-1],m.minSpacing,m.alignment)})&&r._applyLabelMode(e,t,n,i),r._checkBoundedLabelsOverlapping(A,n,e),r._checkShiftedLabels(A,n,m.minSpacing,m.alignment))},_applyLabelMode:function(n,e,t,i,r){const m=this,A=m._majorTicks,V=m._options.label,X=i.rotationAngle;let ce,_e,Me;switch(n){case wp:V.userAlignment||(_e=X<0?Xd:Su,X%90==0&&(_e=fl)),Me=function(Ve){const Je=Ve.getContentContainer();Je&&(Je.rotate(X),Ve.labelRotationAngle=X,_e&&(Ve.labelAlignment=_e))},_O(A,e=r?e:m._getStep(t,X),Me);break;case"stagger":ce=m._getMaxLabelHeight(t,i.staggeringSpacing),Me=function(Ve,Je){Je/(e-1)%2!=0&&(Ve.labelOffset=ce)},_O(A,e-1,Me);break;case"auto":case"_auto":2===e?m._applyLabelMode("stagger",e,t,i):m._applyLabelMode(wp,e,t,{rotationAngle:oR(t,V)});break;default:_O(A,e)}},getMarkerTrackers:h.lQ,_drawDateMarkers:h.lQ,_adjustDateMarkers:h.lQ,coordsIn:h.lQ,areCoordsOutsideAxis:h.lQ,_getSkippedCategory:h.lQ,_initAxisPositions:h.lQ,_drawTitle:h.lQ,_updateTitleCoords:h.lQ,_adjustConstantLineLabels:h.lQ,_createTranslator:function(){return new hO({},{},{})},_updateTranslator:function(){const n=this._translator;n.update(n.getBusinessRange(),this._canvas||{},this._getTranslatorOptions())},_getTranslatorOptions:function(){var n,e;const t=this._options;return{isHorizontal:this._isHorizontal,shiftZeroValue:!this.isArgumentAxis,interval:t.semiDiscreteInterval,firstDayOfWeek:null===(n=t.workWeek)||void 0===n?void 0:n[0],stick:this._getStick(),breaksSize:(null===(e=t.breakStyle)||void 0===e?void 0:e.width)??0}},getVisibleArea(){const n=this._getCanvasStartEnd();return[n.start,n.end].sort((e,t)=>e-t)},_getCanvasStartEnd:function(){const n=this._isHorizontal,e=this._canvas||{},t=this._translator.getBusinessRange().invert,i=n?[e.left,e.width-e.right]:[e.height-e.bottom,e.top];return t&&i.reverse(),{start:i[0],end:i[1]}},_getScreenDelta:function(){const n=this._getCanvasStartEnd(),e=this._seriesData&&this._seriesData.breaks||[],t=e.length;return xu(n.start-n.end)-(t?e[t-1].cumulativeWidth:0)},_getScaleBreaks:function(){return[]},_filterBreaks:function(){return[]},_adjustTitle:h.lQ,_checkTitleOverflow:h.lQ,getSpiderTicks:h.lQ,setSpiderTicks:h.lQ,_checkBoundedLabelsOverlapping:h.lQ,_checkShiftedLabels:h.lQ,drawScaleBreaks:h.lQ,_visualRange:h.lQ,_rotateConstantLine:h.lQ,applyVisualRangeSetter(n){this._visualRange=n},getCategoriesSorter(n){let e;return e=this.isArgumentAxis?n:this._options.categoriesSortingMethod??this._options.categories,e},_getAdjustedBusinessRange(){return this.adjustViewport(this._translator.getBusinessRange())}};const Xu=Array.isArray,vO=isFinite,Eu=Number,j0=Math.min,K0=Math.max,dy=_.X,Kv=[1,2,5];function Qb(n,e){return null===n?n:vO(n)?Eu(n):e}function $D(n){return Xu(n)?n:(0,C.kf)(n)?[n]:null}const jD=qc.inherit({_initCore:function(){const n=this._renderer;this._setupValue(this.option("value")),this.__subvalues=$D(this.option("subvalues")),this._setupSubvalues(this.__subvalues),function bO(n){void 0===n.option("value")&&void 0===n.option("subvalues")&&void 0!==n.option("valueIndicators")&&(function rR(n){n.value=n.subvalues=h.lQ,n._setupValue=n._setupSubvalues=n._updateValueIndicator=n._updateSubvalueIndicators=null}(n),function uy(n){n._indicatorValues=[],yO(n,"_indicatorValues",n.option("valueIndicators")),n._valueIndicators=[];const e=n._applyMostlyTotalChange;n._applyMostlyTotalChange=function(){yO(this,"_indicatorValues",this.option("valueIndicators")),e.call(this)},n._updateActiveElements=sR,n._prepareValueIndicators=KD,n._disposeValueIndicators=XD,n._cleanValueIndicators=EB,n.indicatorValue=OB}(n))}(this),this.callBase.apply(this,arguments),this._rangeContainer=new this._factory.RangeContainer({renderer:n,container:n.root,translator:this._translator,themeManager:this._themeManager}),this._initScale(),this._subvalueIndicatorContainer=this._renderer.g().attr({class:"dxg-subvalue-indicators"}).linkOn(this._renderer.root,"valueIndicator").enableLinks()},_fontFields:["scale.label.font","valueIndicators.rangebar.text.font","valueIndicators.textcloud.text.font","indicator.text.font"],_initScale:function(){this._scaleGroup=this._renderer.g().attr({class:"dxg-scale"}).linkOn(this._renderer.root,"scale"),this._labelsAxesGroup=this._renderer.g().attr({class:"dxg-scale-elements"}).linkOn(this._renderer.root,"scale-elements"),this._scale=new Tp({incidentOccurred:this._incidentOccurred,renderer:this._renderer,axesContainerGroup:this._scaleGroup,labelsAxesGroup:this._labelsAxesGroup,axisType:this._scaleTypes.type,drawingType:this._scaleTypes.drawingType,widgetClass:"dxg",getTemplate(){}})},_disposeCore:function(){this.callBase.apply(this,arguments),this._scale.dispose(),this._scaleGroup.linkOff(),this._labelsAxesGroup.linkOff(),this._rangeContainer.dispose(),this._disposeValueIndicators(),this._subvalueIndicatorContainer.linkOff(),this._scale=this._scaleGroup=this._labelsAxesGroup=this._rangeContainer=null},_disposeValueIndicators:function(){this._valueIndicator&&this._valueIndicator.dispose(),this._subvalueIndicatorsSet&&this._subvalueIndicatorsSet.dispose(),this._valueIndicator=this._subvalueIndicatorsSet=null},_setupDomainCore:function(){const n=this.option("scale")||{};let e=this.option("startValue"),t=this.option("endValue");e=(0,C.kf)(e)?Eu(e):(0,C.kf)(n.startValue)?Eu(n.startValue):0,t=(0,C.kf)(t)?Eu(t):(0,C.kf)(n.endValue)?Eu(n.endValue):100,this._baseValue=e<t?e:t,this._translator.setDomain(e,t)},_cleanContent:function(){this._rangeContainer.clean(),this._cleanValueIndicators()},_measureScale:function(n){const e=n.tick,t=e.visible&&e.length>0&&e.width>0,i=n.minorTick,r=i.visible&&i.length>0&&i.width>0,m=n.label,A=Number(m.indentFromTick);if(!t&&!r&&!m.visible)return{};const V=this._scale.measureLabels((0,_.X)({},this._canvas)),X=this._getScaleLayoutValue(),ce={min:X,max:X},_e=this._getTicksCoefficients(n),Me=_e.inner,Ve=_e.outer;return t&&(ce.min=j0(ce.min,X-Me*e.length),ce.max=K0(ce.max,X+Ve*e.length)),r&&(ce.min=j0(ce.min,X-Me*i.length),ce.max=K0(ce.max,X+Ve*i.length)),m.visible&&this._correctScaleIndents(ce,A,V),ce},_renderContent:function(){const n=this,e=n._prepareScaleSettings();n._rangeContainer.render(dy(n._getOption("rangeContainer"),{vertical:n._area.vertical})),n._renderScale(e),n._subvalueIndicatorContainer.linkAppend();const t=ui([n._rangeContainer].concat(n._prepareValueIndicators()),function(i){return i&&i.enabled?i:null});n._applyMainLayout(t,n._measureScale(e)),t.forEach(i=>i.resize(n._getElementLayout(i.getOffset()))),n._shiftScale(n._getElementLayout(0),e),n._beginValueChanging(),n._updateActiveElements(),n._endValueChanging()},_prepareScaleSettings:function(){const n=this,e=n.option("scale"),t=(0,_.X)(!0,{},n._themeManager.theme("scale"),e);return t.label.indentFromAxis=0,t.isHorizontal=!n._area.vertical,t.forceUserTickInterval|=(0,C.O9)(e)&&(0,C.O9)(e.tickInterval)&&!(0,C.O9)(e.scaleDivisionFactor),t.axisDivisionFactor=t.scaleDivisionFactor||n._gridSpacingFactor,t.minorAxisDivisionFactor=t.minorScaleDivisionFactor||5,t.numberMultipliers=Kv,t.tickOrientation=n._getTicksOrientation(t),t.label.useRangeColors&&(t.label.customizeColor=function(){return n._rangeContainer.getColorForValue(this.value)}),t},_renderScale:function(n){const e=this._translator.getDomain(),t=e[0],i=e[1],r=this._translator.getCodomain(),m=!!(t>i^n.inverted),A=j0(t,i),V=K0(t,i);n.min=A,n.max=V,n.startAngle=90-r[0],n.endAngle=90-r[1],n.skipViewportExtending=!0,n.inverted=m,this._scale.updateOptions(n),this._scale.setBusinessRange({axisType:"continuous",dataType:"numeric",min:A,max:V,invert:m}),this._updateScaleTickIndent(n),this._scaleGroup.linkAppend(),this._labelsAxesGroup.linkAppend(),this._scale.draw((0,_.X)({},this._canvas))},_updateIndicatorSettings:function(n){const e=this;n.currentValue=n.baseValue=vO(e._translator.translate(n.baseValue))?Eu(n.baseValue):e._baseValue,n.vertical=e._area.vertical,n.text&&!n.text.format&&(n.text.format=e._defaultFormatOptions)},_prepareIndicatorSettings:function(n,e){const t=this._themeManager.theme("valueIndicators"),i=Wi(n.type||this._themeManager.theme(e)),r=dy(!0,{},t._default,t[i],n);return r.type=i,r.animation=this._animationSettings,r.containerBackgroundColor=this._containerBackgroundColor,this._updateIndicatorSettings(r),r},_cleanValueIndicators:function(){this._valueIndicator&&this._valueIndicator.clean(),this._subvalueIndicatorsSet&&this._subvalueIndicatorsSet.clean()},_prepareValueIndicators:function(){return this._prepareValueIndicator(),null!==this.__subvalues&&this._prepareSubvalueIndicators(),[this._valueIndicator,this._subvalueIndicatorsSet]},_updateActiveElements:function(){this._updateValueIndicator(),this._updateSubvalueIndicators()},_prepareValueIndicator:function(){const n=this;let e=n._valueIndicator;const t=n._prepareIndicatorSettings(n.option("valueIndicator")||{},"valueIndicatorType");e&&e.type!==t.type&&(e.dispose(),e=null),e||(e=n._valueIndicator=n._createIndicator(t.type,n._renderer.root,"dxg-value-indicator","value-indicator")),e.render(t)},_createSubvalueIndicatorsSet:function(){const n=this,e=n._subvalueIndicatorContainer;return new YD({createIndicator:function(t,i){return n._createIndicator(t,e,"dxg-subvalue-indicator","subvalue-indicator",i)},createPalette:function(t){return n._themeManager.createPalette(t)}})},_prepareSubvalueIndicators:function(){const n=this;let e=n._subvalueIndicatorsSet;const t=n._prepareIndicatorSettings(n.option("subvalueIndicator")||{},"subvalueIndicatorType");e||(e=n._subvalueIndicatorsSet=n._createSubvalueIndicatorsSet());const i=t.type!==e.type;e.type=t.type;const r=n._createIndicator(t.type,n._renderer.root);r&&(r.dispose(),e.render(t,i))},_setupValue:function(n){this.__value=Qb(n,this.__value)},_setupSubvalues:function(n){const e=void 0===n?this.__subvalues:$D(n);let t,i,r;if(null!==e){for(t=0,i=e.length,r=[];t<i;++t)r.push(Qb(e[t],this.__subvalues[t]));this.__subvalues=r}},_updateValueIndicator:function(){this._valueIndicator&&this._valueIndicator.value(this.__value,this._noAnimation)},_updateSubvalueIndicators:function(){this._subvalueIndicatorsSet&&this._subvalueIndicatorsSet.values(this.__subvalues,this._noAnimation)},value:function(n){return void 0!==n?(this._changeValue(n),this):this.__value},subvalues:function(n){return void 0!==n?(this._changeSubvalues(n),this):null!==this.__subvalues?this.__subvalues.slice():void 0},_changeValue:function(n){this._setupValue(n),this._beginValueChanging(),this._updateValueIndicator(),this._updateExtraElements(),this.__value!==this.option("value")&&this.option("value",this.__value),this._endValueChanging()},_changeSubvalues:function(n){null!==this.__subvalues?(this._setupSubvalues(n),this._beginValueChanging(),this._updateSubvalueIndicators(),this._updateExtraElements(),this._endValueChanging()):(this.__subvalues=$D(n),this._setContentSize(),this._renderContent()),sB(this.__subvalues,this.option("subvalues"))||this.option("subvalues",this.__subvalues)},_optionChangesMap:{scale:"DOMAIN",rangeContainer:"MOSTLY_TOTAL",valueIndicator:"MOSTLY_TOTAL",subvalueIndicator:"MOSTLY_TOTAL",containerBackgroundColor:"MOSTLY_TOTAL",value:"VALUE",subvalues:"SUBVALUES",valueIndicators:"MOSTLY_TOTAL"},_customChangesOrder:["VALUE","SUBVALUES"],_change_VALUE:function(){this._changeValue(this.option("value"))},_change_SUBVALUES:function(){this._changeSubvalues(this.option("subvalues"))},_applyMainLayout:null,_getElementLayout:null,_createIndicator:function(n,e,t,i,r,m){const A=this._factory.createIndicator({renderer:this._renderer,translator:this._translator,owner:e,tracker:this._tracker,className:t},n,m);return A&&(A.type=n,A._trackerInfo={type:i,index:r}),A},_getApproximateScreenRange:null});function Zr(n){return n?n.value:null}function yO(n,e,t){const i=n[e],r=Xu(t)?ui(t,Zr):[];let m=0;const A=r.length,V=[];for(;m<A;++m)V.push(Qb(r[m],i[m]));n[e]=V}function sR(){const n=this;n._valueIndicators.forEach(e=>{e.value(n._indicatorValues[e.index],n._noAnimation)})}function KD(){const n=this,e=n._valueIndicators||[],t=n.option("valueIndicators"),i=[];let m,r=0;for(m=Xu(t)?t.length:0;r<m;++r)i.push(t[r]);for(m=e.length;r<m;++r)i.push(null);const A=[];return i.forEach((V,X)=>{let ce=e[X];if(!V)return void(ce&&ce.dispose());const _e=n._prepareIndicatorSettings(V,"valueIndicatorType");ce&&ce.type!==_e.type&&(ce.dispose(),ce=null),ce||(ce=n._createIndicator(_e.type,n._renderer.root,"dxg-value-indicator","value-indicator",X,!0)),ce&&(ce.index=X,ce.render(_e),A.push(ce))}),n._valueIndicators=A,n._valueIndicators}function XD(){this._valueIndicators.forEach(n=>n.dispose()),this._valueIndicators=null}function EB(){this._valueIndicators.forEach(n=>n.clean())}function OB(n,e){return function wB(n,e,t,i,r){return void 0!==r?(void 0!==t[i]&&(t[i]=Qb(r,t[i]),e[i]&&e[i].value(t[i])),n):t[i]}(this,this._valueIndicators,this._indicatorValues,n,e)}function YD(n){this._parameters=n,this._indicators=[]}function xO(n){return function(e,t,i){const r=n[Wi(t)]||!i&&n._default;return r?new r(e):null}}YD.prototype={constructor:YD,dispose:function(){return this._indicators.forEach(n=>n.dispose()),this._parameters=this._options=this._indicators=this._colorPalette=this._palette=null,this},clean:function(){return this._sample&&this._sample.clean().dispose(),this._indicators.forEach(n=>n.clean()),this._sample=this._options=this._palette=null,this},render:function(n,e){const t=this;return t._options=n,t._sample=t._parameters.createIndicator(t.type),t._sample.render(n),t.enabled=t._sample.enabled,t._palette=(0,C.O9)(n.palette)?t._parameters.createPalette(n.palette):null,t.enabled&&(t._generatePalette(t._indicators.length),t._indicators=ui(t._indicators,function(i,r){return e&&(i.dispose(),i=t._parameters.createIndicator(t.type,r)),i.render(t._getIndicatorOptions(r)),i})),t},getOffset:function(){return this._sample.getOffset()},resize:function(n){return this._layout=n,this._indicators.forEach(e=>e.resize(n)),this},measure:function(n){return this._sample.measure(n)},_getIndicatorOptions:function(n){let e=this._options;return this._colorPalette&&(e=dy({},e,{color:this._colorPalette[n]})),e},_generatePalette:function(n){const e=this;let t=null;e._palette&&(e._palette.reset(),t=e._palette.generateColors(n,{repeat:!0})),e._colorPalette=t},_adjustIndicatorsCount:function(n){const e=this,t=e._indicators;let i,r,m;const A=t.length;if(A>n){for(i=n,r=A;i<r;++i)t[i].clean().dispose();e._indicators=t.slice(0,n),e._generatePalette(t.length)}else if(A<n)for(e._generatePalette(n),i=A,r=n;i<r;++i)m=e._parameters.createIndicator(e.type,i),m.render(e._getIndicatorOptions(i)).resize(e._layout),t.push(m)},values:function(n,e){const t=this;if(t.enabled)return void 0!==n?(Xu(n)||(n=vO(n)?[Number(n)]:null),n&&(t._adjustIndicatorsCount(n.length),t._indicators.forEach((i,r)=>i.value(n[r],e))),t):ui(t._indicators,function(i){return i.value()})}};const SO={name:"center_template_pie_chart",init:h.lQ,dispose:function(){this._centerTemplateGroup.linkOff().dispose()},extenders:{_createHtmlStructure(){const n=Ti(this._themeManager._font);this._centerTemplateGroup=this._renderer.g().attr({class:"dxc-hole-template"}).linkOn(this._renderer.root,"center-template").css(n).linkAppend()},_renderExtraElements(){this._requestChange(["CENTER_TEMPLATE"])}},members:{_renderCenterTemplate(){const n=this.option("centerTemplate"),e=this._centerTemplateGroup.clear();if(!n)return;e.attr({visibility:"hidden"});const t=this._getCenter();this._getTemplate(n).render({model:this,container:e.element,onRendered:()=>{const i=e,r=i.getBBox();i.move(t.x-(r.x+r.width/2),t.y-(r.y+r.height/2)),i.attr({visibility:"visible"})}})}},customize(n){n.addChange({code:"CENTER_TEMPLATE",handler:function(){this._renderCenterTemplate()},option:"centerTemplate"})}},Jb={name:"center_template_gauge",init:h.lQ,dispose:SO.dispose,extenders:{_initCore(){this._createCenterTemplateGroup()},_renderContent(){const n=Ti(this._themeManager._font);this._centerTemplateGroup.css(n),this._requestChange(["CENTER_TEMPLATE"])},_updateExtraElements(){this._requestChange(["CENTER_TEMPLATE"])}},members:{_renderCenterTemplate:SO.members._renderCenterTemplate,_createCenterTemplateGroup(){this._centerTemplateGroup=this._renderer.g().attr({class:"dxg-hole-template"}).linkOn(this._renderer.root,"center-template").linkAppend()}},customize:SO.customize},ZD={pieChart:SO,gauge:Jb},TB=isFinite,aR=Number,vg=Math.round,lR=_u,cR=$u,QD=es.A.inherit({ctor:function(n){const e=this;(0,w.__)(n,function(t,i){e["_"+t]=i}),e._init()},dispose:function(){const n=this;return n._dispose(),(0,w.__)(n,function(e){n[e]=null}),n},getOffset:function(){return aR(this._options.offset)||0}}),EO=QD.inherit({_init:function(){this._rootElement=this._createRoot().linkOn(this._owner,{name:"value-indicator",after:"core"}),this._trackerElement=this._createTracker()},_dispose:function(){this._rootElement.linkOff()},_setupAnimation:function(){const n=this;n._options.animation&&(n._animation={step:function(e){n._actualValue=n._animation.start+n._animation.delta*e,n._actualPosition=n._translator.translate(n._actualValue),n._move()},duration:n._options.animation.duration>0?aR(n._options.animation.duration):0,easing:n._options.animation.easing})},_runAnimation:function(n){const e=this._animation;e.start=this._actualValue,e.delta=n-this._actualValue,this._rootElement.animate({_:0},{step:e.step,duration:e.duration,easing:e.easing})},_createRoot:function(){return this._renderer.g().attr({class:this._className})},_createTracker:function(){return this._renderer.path([],"area")},_getTrackerSettings:h.lQ,clean:function(){return this._animation&&this._rootElement.stopAnimation(),this._rootElement.linkRemove().clear(),this._clear(),this._tracker.detach(this._trackerElement),this._options=this.enabled=this._animation=null,this},render:function(n){const e=this;return e.type=n.type,e._options=n,e._actualValue=e._currentValue=e._translator.adjust(e._options.currentValue),e.enabled=e._isEnabled(),e.enabled&&(e._setupAnimation(),e._rootElement.attr({fill:mi(e._options.color)}).linkAppend(),e._tracker.attach(e._trackerElement,e,e._trackerInfo)),e},resize:function(n){const e=this;return e._rootElement.clear(),e._clear(),e.visible=e._isVisible(n),e.visible&&((0,_.X)(e._options,n),e._actualPosition=e._translator.translate(e._actualValue),e._render(),e._trackerElement.attr(e._getTrackerSettings()),e._move()),e},value:function(n,e){const t=this;let i;const r=this._rootElement;let m=null;return void 0===n?t._currentValue:(null===n?(m="hidden",t._currentValue=n):(i=t._translator.adjust(n),t._currentValue!==i&&TB(i)&&(t._currentValue=i,t.visible&&(t._animation&&!e?t._runAnimation(i):(t._actualValue=i,t._actualPosition=t._translator.translate(i),t._move())))),r.attr({visibility:m}),t)},_isEnabled:null,_isVisible:null,_render:null,_clear:null,_move:null}),Ou={};Ou["right-bottom"]=Ou.rb=[0,-1,-1,0,0,1,1,0],Ou["bottom-right"]=Ou.br=[-1,0,0,-1,1,0,0,1],Ou["left-bottom"]=Ou.lb=[0,-1,1,0,0,1,-1,0],Ou["bottom-left"]=Ou.bl=[1,0,0,-1,-1,0,0,1],Ou["left-top"]=Ou.lt=[0,1,1,0,0,-1,-1,0],Ou["top-left"]=Ou.tl=[1,0,0,1,-1,0,0,-1],Ou["right-top"]=Ou.rt=[0,1,-1,0,0,-1,1,0],Ou["top-right"]=Ou.tr=[-1,0,0,1,1,0,0,-1];const OO=EO.inherit({_move:function(){const n=this._options,e=this._getTextCloudOptions(),t=lR(this._actualValue,n.text);this._text.attr({text:t});const i=this._text.getBBox(),r=e.x,m=e.y,A=(i.width||t.length*this._textUnitWidth)+2*n.horizontalOffset,V=(i.height||this._textHeight)+2*n.verticalOffset,X=function dR(n){let e=n.x,t=n.y;const i=Ou[n.type],r=n.cloudWidth,m=n.cloudHeight;let A,V;const X=e,ce=t;return A=V=n.tailLength,1&i[0]?V=Math.min(V,m/3):A=Math.min(A,r/3),{cx:vg(X+i[0]*A+(i[0]+i[2])*r/2),cy:vg(ce+i[1]*V+(i[1]+i[3])*m/2),points:[vg(e),vg(t),vg(e+=i[0]*(r+A)),vg(t+=i[1]*(m+V)),vg(e+=i[2]*r),vg(t+=i[3]*m),vg(e+=i[4]*r),vg(t+=i[5]*m),vg(e+=i[6]*(r-A)),vg(t+=i[7]*(m-V))]}}({x:r,y:m,cloudWidth:A,cloudHeight:V,tailLength:n.arrowLength,type:this._correctCloudType(e.type,{x:r,y:m},{width:A,height:V})});this._text.attr({x:X.cx,y:X.cy+this._textVerticalOffset}),this._cloud.attr({points:X.points}),this._trackerElement&&this._trackerElement.attr({points:X.points})},_measureText:function(){const n=this;let e,t,i,r;n._textVerticalOffset||(e=n._createRoot().append(n._owner),r=cR(n._translator,n._options.text),t=n._renderer.text(r,0,0).attr({align:"center"}).css(Ti(n._options.text.font)).append(e),i=t.getBBox(),e.remove(),n._textVerticalOffset=-i.y-i.height/2,n._textWidth=i.width,n._textHeight=i.height,n._textUnitWidth=n._textWidth/r.length,n._textFullWidth=n._textWidth+2*n._options.horizontalOffset,n._textFullHeight=n._textHeight+2*n._options.verticalOffset)},_render:function(){this._measureText(),this._cloud=this._cloud||this._renderer.path([],"area").append(this._rootElement),this._text=this._text||this._renderer.text().append(this._rootElement),this._text.attr({align:"center"}).css(Ti(this._options.text.font))},_clear:function(){delete this._cloud,delete this._text},getTooltipParameters:function(){const n=this._getTextCloudOptions();return{x:n.x,y:n.y,value:this._currentValue,color:this._options.color}},_correctCloudType:n=>n}),D_=EO.inherit({_measureText:function(){const n=this;let e,t,i;n._hasText=n._isTextVisible(),n._hasText&&!n._textVerticalOffset&&(e=n._createRoot().append(n._owner),t=n._renderer.text(cR(n._translator,n._options.text),0,0).attr({class:"dxg-text",align:"center"}).css(Ti(n._options.text.font)).append(e),i=t.getBBox(),e.remove(),n._textVerticalOffset=-i.y-i.height/2,n._textWidth=i.width,n._textHeight=i.height)},_move:function(){const n=this;n._updateBarItemsPositions(),n._hasText&&(n._text.attr({text:lR(n._actualValue,n._options.text)}),n._updateTextPosition(),n._updateLinePosition())},_updateBarItems:function(){const n=this,e=n._options;let t;const i=n._translator;n._setBarSides(),n._startPosition=i.translate(i.getDomainStart()),n._endPosition=i.translate(i.getDomainEnd()),n._basePosition=i.translate(e.baseValue),n._space=n._getSpace();const r=e.backgroundColor||"none";"none"!==r&&n._space>0?t=e.containerBackgroundColor||"none":(n._space=0,t="none"),n._backItem1.attr({fill:r}),n._backItem2.attr({fill:r}),n._spaceItem1.attr({fill:t}),n._spaceItem2.attr({fill:t})},_getSpace:function(){return 0},_updateTextItems:function(){const n=this;n._hasText?(n._line=n._line||n._renderer.path([],"line").attr({class:"dxg-main-bar","stroke-linecap":"square"}).append(n._rootElement),n._text=n._text||n._renderer.text("",0,0).attr({class:"dxg-text"}).append(n._rootElement),n._text.attr({align:n._getTextAlign()}).css(n._getFontOptions()),n._setTextItemsSides()):(n._line&&(n._line.remove(),delete n._line),n._text&&(n._text.remove(),delete n._text))},_isTextVisible:function(){return!1},_getTextAlign:function(){return"center"},_getFontOptions:function(){const n=this._options;let e=n.text.font;return(!e||!e.color)&&(e=(0,_.X)({},e,{color:n.color})),Ti(e)},_updateBarItemsPositions:function(){const n=this._getPositions();this._backItem1.attr(this._buildItemSettings(n.start,n.back1)),this._backItem2.attr(this._buildItemSettings(n.back2,n.end)),this._spaceItem1.attr(this._buildItemSettings(n.back1,n.main1)),this._spaceItem2.attr(this._buildItemSettings(n.main2,n.back2)),this._mainItem.attr(this._buildItemSettings(n.main1,n.main2)),this._trackerElement&&this._trackerElement.attr(this._buildItemSettings(n.main1,n.main2))},_render:function(){const n=this;n._measureText(),n._backItem1||(n._backItem1=n._createBarItem(),n._backItem1.attr({class:"dxg-back-bar"})),n._backItem2||(n._backItem2=n._createBarItem(),n._backItem2.attr({class:"dxg-back-bar"})),n._spaceItem1||(n._spaceItem1=n._createBarItem(),n._spaceItem1.attr({class:"dxg-space-bar"})),n._spaceItem2||(n._spaceItem2=n._createBarItem(),n._spaceItem2.attr({class:"dxg-space-bar"})),n._mainItem||(n._mainItem=n._createBarItem(),n._mainItem.attr({class:"dxg-main-bar"})),n._updateBarItems(),n._updateTextItems()},_clear:function(){delete this._backItem1,delete this._backItem2,delete this._spaceItem1,delete this._spaceItem2,delete this._mainItem,delete this._hasText,delete this._line,delete this._text},getTooltipParameters:function(){const n=this._getTooltipPosition();return{x:n.x,y:n.y,value:this._currentValue,color:this._options.color,offset:0}}}),wu=Number,xm=en,JD=vr;function wO(n,e){return n&&n.radius-e<=0&&(n.radius=e+1),n}const Xv=EO.inherit({_move:function(){const n=this._options,e=JD(this._actualPosition);this._rootElement.rotate(e,n.x,n.y),this._trackerElement&&this._trackerElement.rotate(e,n.x,n.y)},_isEnabled:function(){return this._options.width>0},_isVisible:function(n){return n.radius-wu(this._options.indentFromCenter)>0},_getTrackerSettings:function(){const n=this._options,e=this._getRadius(),t=this._getIndentFromCenter(),i=n.x,r=n.y-(e+t)/2;let m=n.width/2,A=(e-t)/2;return m>10||(m=10),A>10||(A=10),{points:[i-m,r-A,i-m,r+A,i+m,r+A,i+m,r-A]}},_render:function(){this._renderPointer()},_clearPointer:function(){delete this._element},_clear:function(){this._clearPointer()},_getIndentFromCenter:function(n){return Number(this._options.indentFromCenter)||0},_getRadius:function(){return 0},measure:function(n){const e={max:n.radius};return this._options.indentFromCenter<0&&(e.inverseHorizontalOffset=e.inverseVerticalOffset=-wu(this._options.indentFromCenter)),e},getTooltipParameters:function(){const n=this._options,e=xm(this._actualPosition),t=(this._getRadius()+this._getIndentFromCenter())/2;return{x:n.x+e.cos*t,y:n.y-e.sin*t,value:this._currentValue,color:n.color,offset:n.width/2}}}),TO=Xv.inherit({_isVisible:function(n){const e=this._adjustOffset(Number(this._options.indentFromCenter),n.radius),t=this._adjustOffset(Number(this._options.offset),n.radius);return n.radius-e-t>0},getOffset:function(){return 0},_adjustOffset:function(n,e){const i=e/Number(this._options.beginAdaptingAtRadius);return i<1&&(n=Math.floor(n*i)),n||0},_getIndentFromCenter:function(n){return this._adjustOffset(Number(this._options.indentFromCenter),this._options.radius)},_getRadius:function(){const n=this._options;return n.radius-this._adjustOffset(Number(n.offset),n.radius)},_renderSpindle:function(){const n=this,e=n._options,t=e.radius,i=2*this._adjustOffset(wu(e.spindleSize)/2,t);let r=2*this._adjustOffset(wu(e.spindleGapSize)/2,t)||0;r>0&&(r=r<=i?r:i),i>0&&(n._spindleOuter=n._spindleOuter||n._renderer.circle().append(n._rootElement),n._spindleInner=n._spindleInner||n._renderer.circle().append(n._rootElement),n._spindleOuter.attr({class:"dxg-spindle-border",cx:e.x,cy:e.y,r:i/2}),n._spindleInner.attr({class:"dxg-spindle-hole",cx:e.x,cy:e.y,r:r/2,fill:e.containerBackgroundColor}))},_render:function(){this.callBase(),this._renderSpindle()},_clear:function(){this.callBase(),delete this._spindleOuter,delete this._spindleInner}}),qb=TO.inherit({_renderPointer:function(){const n=this._options,e=n.y-this._getRadius(),t=n.y-this._getIndentFromCenter(),i=n.x-n.width/2,r=i+wu(n.width);this._element=this._element||this._renderer.path([],"area").append(this._rootElement),this._element.attr({points:[i,t,i,e,r,e,r,t]})}}),X0=TO.inherit({_renderPointer:function(){const n=this._options,e=n.y-this._getRadius(),t=n.y-this._getIndentFromCenter(),i=n.x-n.width/2,r=n.x+n.width/2;this._element=this._element||this._renderer.path([],"area").append(this._rootElement),this._element.attr({points:[i,t,n.x,e,r,t]})}}),ex=TO.inherit({_renderPointer:function(){const n=this._options,e=n.x-n.width/2,t=n.x+n.width/2,i=n.y-this._getRadius(),r=n.y-this._getIndentFromCenter(),m=wu(n.secondFraction)||0;let A,V;m>=1?A=V=r:m<=0?A=V=i:(V=i+(r-i)*m,A=V+wu(n.space)),this._firstElement=this._firstElement||this._renderer.path([],"area").append(this._rootElement),this._spaceElement=this._spaceElement||this._renderer.path([],"area").append(this._rootElement),this._secondElement=this._secondElement||this._renderer.path([],"area").append(this._rootElement),this._firstElement.attr({points:[e,r,e,A,t,A,t,r]}),this._spaceElement.attr({points:[e,A,e,V,t,V,t,A],class:"dxg-hole",fill:n.containerBackgroundColor}),this._secondElement.attr({points:[e,V,e,i,t,i,t,V],class:"dxg-part",fill:n.secondColor})},_clearPointer:function(){delete this._firstElement,delete this._secondElement,delete this._spaceElement}}),uR=Xv.inherit({_isEnabled:function(){return this._options.length>0&&this._options.width>0},_isVisible:n=>!0,resize(n){return this.callBase(wO(n,0))},_render:function(){const n=this._options,e=n.x,t=n.y-n.radius,i=n.width/2||0,r=t-wu(n.length);this._element=this._element||this._renderer.path([],"area").append(this._rootElement);const m={points:[e,t,e-i,r,e+i,r],stroke:"none","stroke-width":0,"stroke-linecap":"square"};n.space>0&&(m["stroke-width"]=Math.min(n.space,n.width/4)||0,m.stroke=m["stroke-width"]>0&&n.containerBackgroundColor||"none"),this._element.attr(m).sharp()},_clear:function(){delete this._element},_getTrackerSettings:function(){const n=this._options,e=n.x,t=n.y-n.radius-n.length/2;let i=n.width/2,r=n.length/2;return i>10||(i=10),r>10||(r=10),{points:[e-i,t-r,e-i,t+r,e+i,t+r,e+i,t-r]}},measure:function(n){return{min:n.radius,max:n.radius+wu(this._options.length)}},getTooltipParameters:function(){const n=this._options,e=xm(this._actualPosition),t=n.radius+n.length/2,i=this.callBase();return i.x=n.x+e.cos*t,i.y=n.y-e.sin*t,i.offset=n.length/2,i}}),tx=OO.inherit({_isEnabled:function(){return!0},_isVisible:n=>!0,resize(n){return this.callBase(wO(n,0))},_getTextCloudOptions:function(){const n=xm(this._actualPosition),e=xo(this._actualPosition);return{x:this._options.x+n.cos*this._options.radius,y:this._options.y-n.sin*this._options.radius,type:e>270?"left-top":e>180?"top-right":e>90?"right-bottom":"bottom-left"}},measure:function(n){const e=wu(this._options.arrowLength)||0;this._measureText();const t=this._textFullHeight+e,i=this._textFullWidth+e;return{min:n.radius,max:n.radius,horizontalOffset:i,verticalOffset:t,inverseHorizontalOffset:i,inverseVerticalOffset:t}}}),qD=D_.inherit({_isEnabled:function(){return this._options.size>0},_isVisible:n=>!0,resize(n){return this.callBase(wO(n,wu(this._options.size)))},_createBarItem:function(){return this._renderer.arc().attr({"stroke-linejoin":"round"}).append(this._rootElement)},_createTracker:function(){return this._renderer.arc().attr({"stroke-linejoin":"round"})},_setBarSides:function(){this._maxSide=this._options.radius,this._minSide=this._maxSide-wu(this._options.size)},_getSpace:function(){const n=this._options;return n.space>0?180*n.space/n.radius/Math.PI:0},_isTextVisible:function(){return(this._options.text||{}).indent>0},_setTextItemsSides:function(){const n=this._options,e=wu(n.text.indent);this._lineFrom=n.y-n.radius,this._lineTo=this._lineFrom-e,this._textRadius=n.radius+e},_getPositions:function(){const n=this._basePosition,e=this._actualPosition;let t,i;return n>=e?(t=n,i=e):(t=e,i=n),{start:this._startPosition,end:this._endPosition,main1:t,main2:i,back1:Math.min(t+this._space,this._startPosition),back2:Math.max(i-this._space,this._endPosition)}},_buildItemSettings:function(n,e){return{x:this._options.x,y:this._options.y,innerRadius:this._minSide,outerRadius:this._maxSide,startAngle:e,endAngle:n}},_updateTextPosition:function(){const n=xm(this._actualPosition);let e=this._options.x+this._textRadius*n.cos,t=this._options.y-this._textRadius*n.sin;e+=n.cos*this._textWidth*.6,t-=n.sin*this._textHeight*.6,this._text.attr({x:e,y:t+this._textVerticalOffset})},_updateLinePosition:function(){const n=this._options.x;let e,t;this._basePosition>this._actualPosition?(e=n-2,t=n):this._basePosition<this._actualPosition?(e=n,t=n+2):(e=n-1,t=n+1),this._line.attr({points:[e,this._lineFrom,e,this._lineTo,t,this._lineTo,t,this._lineFrom]}).rotate(JD(this._actualPosition),n,this._options.y).sharp()},_getTooltipPosition:function(){const n=xm((this._basePosition+this._actualPosition)/2),e=(this._minSide+this._maxSide)/2;return{x:this._options.x+n.cos*e,y:this._options.y-n.sin*e}},measure:function(n){const e=this,t={min:n.radius-wu(e._options.size),max:n.radius};return e._measureText(),e._hasText&&(t.max+=wu(e._options.text.indent),t.horizontalOffset=e._textWidth,t.verticalOffset=e._textHeight),t}}),hy=Number,py=Array.isArray,gy=isFinite,nx=QD.inherit({_init:function(){this._root=this._renderer.g().attr({class:"dxg-range-container"}).linkOn(this._container,"range-container")},_dispose:function(){this._root.linkOff()},clean:function(){return this._root.linkRemove().clear(),this._options=this.enabled=null,this},_getRanges:function(){const n=this._options,e=this._translator,t=e.getDomain()[0],i=e.getDomain()[1],r=i-t,m=r>=0?Y0:Tu,A=r>=0?ix:ox;let V=[],X=[],ce=[{start:t,end:i}];const _e=mi(n.backgroundColor)||"none",Me=n.width||{},Ve=hy(Me>0?Me:Me.start),Je=hy(Me>0?Me:Me.end),rt=Je-Ve;if(void 0!==n.ranges&&!py(n.ranges)||!(Ve>=0&&Je>=0&&Ve+Je>0))return null;V=(py(n.ranges)?n.ranges:[]).reduce((Xt,On,Fn)=>{const oi=e.adjust((On=On||{}).startValue),Yt=e.adjust(On.endValue);return gy(oi)&&gy(Yt)&&m(oi,Yt,On)&&Xt.push({start:oi,end:Yt,color:mi(On.color),classIndex:Fn}),Xt},[]);const Ct=this._themeManager.createPalette(n.palette,{type:"indicatingSet",extensionMode:n.paletteExtensionMode,keepLastColorInEnd:!0,count:V.length});return(0,w.__)(V,function(Xt,On){const Fn=Ct.getNextColor();On.color=(0,C.Kg)(On.color)&&On.color||Fn||"none",On.className="dxg-range dxg-range-"+On.classIndex,delete On.classIndex}),(0,w.__)(V,function(Xt,On){let Fn,oi,Yt,$t,xn;const Gn=[],qn=[];for(Fn=0,oi=X.length;Fn<oi;++Fn)xn=X[Fn],$t=A(xn.start,xn.end,On.start,On.end),(Yt=$t[0])&&(Yt.color=xn.color)&&(Yt.className=xn.className)&&Gn.push(Yt),(Yt=$t[1])&&(Yt.color=xn.color)&&(Yt.className=xn.className)&&Gn.push(Yt);for(Gn.push(On),X=Gn,Fn=0,oi=ce.length;Fn<oi;++Fn)xn=ce[Fn],$t=A(xn.start,xn.end,On.start,On.end),(Yt=$t[0])&&qn.push(Yt),(Yt=$t[1])&&qn.push(Yt);ce=qn}),(0,w.__)(ce,function(Xt,On){On.color=_e,On.className="dxg-range dxg-background-range",X.push(On)}),(0,w.__)(X,function(Xt,On){On.startWidth=(On.start-t)/r*rt+Ve,On.endWidth=(On.end-t)/r*rt+Ve}),X},render:function(n){const e=this;return e._options=n,e._processOptions(),e._ranges=e._getRanges(),e._ranges&&(e.enabled=!0,e._root.linkAppend()),e},resize:function(n){const e=this;return e._root.clear(),e._isVisible(n)&&(0,w.__)(e._ranges,function(t,i){e._createRange(i,n).attr({fill:i.color,class:i.className}).append(e._root)}),e},_processOptions:null,_isVisible:null,_createRange:null,getColorForValue:function(n){let e=null;return(0,w.__)(this._ranges,function(t,i){if(i.start<=n&&n<=i.end||i.start>=n&&n>=i.end)return e=i.color,!1}),e}});function ix(n,e,t,i){let r;return t>n&&i<e?r=[{start:n,end:t},{start:i,end:e}]:t>=e||i<=n?r=[{start:n,end:e}]:t<=n&&i>=e?r=[]:t>n?r=[{start:n,end:t}]:i<e&&(r=[{start:i,end:e}]),r}function ox(n,e,t,i){let r;return t<n&&i>e?r=[{start:n,end:t},{start:i,end:e}]:t<=e||i>=n?r=[{start:n,end:e}]:t>=n&&i<=e?r=[]:t<n?r=[{start:n,end:t}]:i>e&&(r=[{start:i,end:e}]),r}function fy(n,e,t){let{startValue:i,endValue:r}=t;return r===i&&i===n&&e===n}function Y0(n,e,t){return e-n>0||fy(n,e,t)}function Tu(n,e,t){return n-e>0||fy(n,e,t)}const eA=nx,my=Number,Yv=Math.max,hR=eA.inherit({_processOptions:function(){const n=this;switch(n._inner=n._outer=0,Wi(n._options.orientation)){case"inside":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}},_isVisible:function(n){let e=this._options.width;return e=my(e)||Yv(my(e.start),my(e.end)),n.radius-this._inner*e>0},_createRange:function(n,e){const t=(n.startWidth+n.endWidth)/2;return this._renderer.arc(e.x,e.y,e.radius-this._inner*t,e.radius+this._outer*t,this._translator.translate(n.end),this._translator.translate(n.start)).attr({"stroke-linejoin":"round"})},measure:function(n){let e=this._options.width;return e=my(e)||Yv(my(e.start),my(e.end)),{min:n.radius-this._inner*e,max:n.radius+this._outer*e}}}),DO=isFinite,tA=xo,nA=en,pR=Math.abs,mh=Math.max,Cg=Math.min,iA=Math.round,AB=w.__,oA=Math.PI,Zv=jD.inherit({_rootClass:"dxg-circular-gauge",_factoryMethods:{rangeContainer:"createCircularRangeContainer",indicator:"createCircularIndicator"},_gridSpacingFactor:17,_scaleTypes:{type:"polarAxes",drawingType:"circular"},_getThemeManagerOptions(){const n=this.callBase.apply(this,arguments);return n.subTheme="_circular",n},_updateScaleTickIndent:function(n){const e=n.label.indentFromTick,t=n.tick.visible?n.tick.length:0,i=this._scale.measureLabels((0,_.X)({},this._canvas)),r=n.orientation,m=t;let A=e;e>=0?"outside"===r?A+=m:"center"===r&&(A+=m/2):(A-=mh(i.width,i.height),"inside"===r?A-=m:"center"===r&&(A-=m/2)),n.label.indentFromAxis=A,this._scale.updateOptions(n)},_setupCodomain:function(){const n=this.option("geometry")||{};let i,e=n.startAngle,t=n.endAngle;e=DO(e)?tA(e):225,t=DO(t)?tA(t):-45,pR(e-t)<1?(t-=360,i={left:-1,up:-1,right:1,down:1}):(e<t&&(t-=360),i=function _y(n,e){const t=nA(n),i=nA(e),r=t.cos,m=t.sin,A=i.cos,V=i.sin;return{left:m<=0&&V>=0||m<=0&&V<=0&&r<=A||m>=0&&V>=0&&r>=A?-1:Cg(r,A,0),right:m>=0&&V<=0||m>=0&&V>=0&&r>=A||m<=0&&V<=0&&r<=A?1:mh(r,A,0),up:r<=0&&A>=0||r<=0&&A<=0&&m>=V||r>=0&&A>=0&&m<=V?-1:-mh(m,V,0),down:r>=0&&A<=0||r>=0&&A>=0&&m<=V||r<=0&&A<=0&&m>=V?1:-Cg(m,V,0)}}(e,t)),this._area={x:0,y:0,radius:100,startCoord:e,endCoord:t,sides:i},this._translator.setCodomain(e,t)},_getCenter:function(){return this._getElementLayout()},_shiftScale:function(n){const e=this._scale,t=e.getCanvas();t.width=t.height=2*n.radius,e.draw(t);const i=e.getCenter();e.shift({right:n.x-i.x,bottom:n.y-i.y})},_getScaleLayoutValue:function(){return this._area.radius},_getTicksOrientation:function(n){return n.orientation},_getTicksCoefficients:function(n){const e={inner:0,outer:1};return"inside"===n.orientation?(e.inner=1,e.outer=0):"center"===n.orientation&&(e.inner=e.outer=.5),e},_correctScaleIndents:function(n,e,t){e>=0?(n.horizontalOffset=e+t.width,n.verticalOffset=e+t.height):(n.horizontalOffset=n.verticalOffset=0,n.min-=-e+mh(t.width,t.height)),n.inverseHorizontalOffset=t.width/2,n.inverseVerticalOffset=t.height/2},_measureMainElements:function(n,e){const t=this._area.radius;let i=0,r=1/0,m=0,A=0,V=0,X=0;return AB(n.concat(this._scale),function(_e,Me){const Ve=Me.measure?Me.measure({radius:t-Me.getOffset()}):e;Ve.min>0&&(r=Cg(r,Ve.min)),Ve.max>0&&(i=mh(i,Ve.max)),Ve.horizontalOffset>0&&(m=mh(m,Ve.max+Ve.horizontalOffset)),Ve.verticalOffset>0&&(A=mh(A,Ve.max+Ve.verticalOffset)),Ve.inverseHorizontalOffset>0&&(V=mh(V,Ve.inverseHorizontalOffset)),Ve.inverseVerticalOffset>0&&(X=mh(X,Ve.inverseVerticalOffset))}),m=mh(m-i,0),A=mh(A-i,0),{minRadius:r,maxRadius:i,horizontalMargin:m,verticalMargin:A,inverseHorizontalMargin:V,inverseVerticalMargin:X}},_applyMainLayout:function(n,e){const t=this._measureMainElements(n,e),i=this._area,r=i.sides,m={left:(r.left<-.1?t.horizontalMargin:t.inverseHorizontalMargin)||0,right:(r.right>.1?t.horizontalMargin:t.inverseHorizontalMargin)||0,top:(r.up<-.1?t.verticalMargin:t.inverseVerticalMargin)||0,bottom:(r.down>.1?t.verticalMargin:t.inverseVerticalMargin)||0},A=function c2(n,e,t){const i=(0,_.X)({},n);let r,m=0,A=0;return t=t||{},e>0&&(i.left+=t.left||0,i.right-=t.right||0,i.top+=t.top||0,i.bottom-=t.bottom||0,vy(i)>0&&A_(i)>0?(r=A_(i)/vy(i),r>1?e<r?m=vy(i):A=A_(i):e>r?A=A_(i):m=vy(i),m>0||(m=A/e),A>0||(A=m*e),m=(vy(i)-m)/2,A=(A_(i)-A)/2,i.left+=m,i.right-=m,i.top+=A,i.bottom-=A):(i.left=i.right=(i.left+i.right)/2,i.top=i.bottom=(i.top+i.bottom)/2)),i}(this._innerRect,(r.down-r.up)/(r.right-r.left),m);let V=Cg(vy(A)/(r.right-r.left),A_(A)/(r.down-r.up));V=V-t.maxRadius+i.radius;const X=A.left-vy(A)*r.left/(r.right-r.left),ce=A.top-A_(A)*r.up/(r.down-r.up);i.x=iA(X),i.y=iA(ce),i.radius=V,A.left-=m.left,A.right+=m.right,A.top-=m.top,A.bottom+=m.bottom,this._innerRect=A},_getElementLayout:function(){return{x:this._area.x,y:this._area.y,radius:iA(this._area.radius-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0))}},_getApproximateScreenRange:function(){const n=this._area;let e=Cg(this._canvas.width/(n.sides.right-n.sides.left),this._canvas.height/(n.sides.down-n.sides.up));return e>n.totalRadius&&(e=n.totalRadius),e*=.8,-this._translator.getCodomainRange()*e*oA/180},_getDefaultSize:function(){return{width:300,height:300}},_factory:(0,xe.o8)(qc.prototype._factory)});function vy(n){return n.right-n.left}function A_(n){return n.bottom-n.top}const Cy=Zv.prototype._factory.indicators={};Zv.prototype._factory.createIndicator=xO(Cy),Cy._default=qb,Cy.rectangleneedle=qb,Cy.triangleneedle=X0,Cy.twocolorneedle=ex,Cy.trianglemarker=uR,Cy.textcloud=tx,Cy.rangebar=qD,Zv.prototype._factory.RangeContainer=hR,(0,y.A)("dxCircularGauge",Zv),Zv.addPlugin(ZD.gauge);const rA=Zv,IB=Math.PI/180,I_=Math.abs,sA=Math.round,ed=Math.floor,AO=Math.min,rx=Math.max,PB=$u,Z0=_u,MB=sB,aA=Array.isArray,lA=vr,Qv=en,gR=Ti,sx=Number,yy=isFinite,RB=h.lQ,Jv=_.X;let qv;const Q0=qc.inherit({_rootClass:"dxbg-bar-gauge",_themeSection:"barGauge",_fontFields:["label.font","legend.font","legend.title.font","legend.title.subtitle.font"],_initCore:function(){const n=this;n.callBase.apply(n,arguments),n._barsGroup=n._renderer.g().attr({class:"dxbg-bars"}).linkOn(n._renderer.root,"bars"),n._values=[],n._context={renderer:n._renderer,translator:n._translator,tracker:n._tracker,group:n._barsGroup},n._animateStep=function(e){const t=n._bars;let i,r;for(i=0,r=t.length;i<r;++i)t[i].animate(e)},n._animateComplete=function(){n._bars.forEach(e=>e.endAnimation()),n._checkOverlap()}},_disposeCore:function(){this._barsGroup.linkOff(),this._barsGroup=this._values=this._context=this._animateStep=this._animateComplete=null,this.callBase.apply(this,arguments)},_setupDomainCore:function(){let n=this.option("startValue"),e=this.option("endValue");yy(n)||(n=0),yy(e)||(e=100),this._translator.setDomain(n,e),this._baseValue=this._translator.adjust(this.option("baseValue")),yy(this._baseValue)||(this._baseValue=n<e?n:e)},_getDefaultSize:function(){return{width:300,height:300}},_setupCodomain:rA.prototype._setupCodomain,_getApproximateScreenRange:function(){const n=this._area.sides,e=this._canvas.width/(n.right-n.left),t=this._canvas.height/(n.down-n.up),i=e<t?e:t;return-this._translator.getCodomainRange()*i*IB},_setupAnimationSettings:function(){const n=this;n.callBase.apply(n,arguments),n._animationSettings&&(n._animationSettings.step=n._animateStep,n._animationSettings.complete=n._animateComplete)},_cleanContent:function(){this._barsGroup.linkRemove(),this._animationSettings&&this._barsGroup.stopAnimation(),this._barsGroup.clear()},_renderContent:function(){const n=this;let e=n.option("label");const t=n._context;if(n._barsGroup.linkAppend(),t.textEnabled=void 0===e||e&&(!("visible"in e)||e.visible),t.textEnabled){var i,r;t.fontStyles=gR(Jv({},n._themeManager.theme().label.font,null===(i=e)||void 0===i?void 0:i.font,{color:(null===(r=e)||void 0===r||null===(r=r.font)||void 0===r?void 0:r.color)||null})),e=Jv(!0,{},n._themeManager.theme().label,e),t.formatOptions={format:void 0!==e.format?e.format:n._defaultFormatOptions,customizeText:e.customizeText},t.textOptions={align:"center"},n._textIndent=e.indent>0?sx(e.indent):0,t.lineWidth=e.connectorWidth>0?sx(e.connectorWidth):0,t.lineColor=e.connectorColor||null;const m=n._renderer.text(PB(n._translator,t.formatOptions),0,0).attr(t.textOptions).css(t.fontStyles).append(n._barsGroup),A=m.getBBox();m.remove(),t.textY=A.y,t.textWidth=A.width,t.textHeight=A.height}rA.prototype._applyMainLayout.call(n),n._renderBars()},_measureMainElements:function(){const n={maxRadius:this._area.radius};return this._context.textEnabled&&(n.horizontalMargin=this._context.textWidth,n.verticalMargin=this._context.textHeight,n.inverseHorizontalMargin=this._context.textWidth/2,n.inverseVerticalMargin=this._context.textHeight/2),n},_renderBars:function(){const n=this,e=Jv({},n._themeManager.theme(),n.option());let t;const i=n._area,r=e.relativeInnerRadius>0&&e.relativeInnerRadius<1?sx(e.relativeInnerRadius):.1;t=i.radius,n._context.textEnabled&&(n._textIndent=sA(AO(n._textIndent,t/2)),t-=n._textIndent),n._outerRadius=ed(t),n._innerRadius=ed(t*r),n._barSpacing=e.barSpacing>0?sx(e.barSpacing):0,Jv(n._context,{backgroundColor:e.backgroundColor,x:i.x,y:i.y,startAngle:i.startCoord,endAngle:i.endCoord,baseAngle:n._translator.translate(n._baseValue)}),n._arrangeBars()},_arrangeBars:function(){const n=this;let e=n._outerRadius-n._innerRadius;const t=n._context;let i;const r=n._bars.length;n._beginValueChanging(),t.barSize=r>0?rx((e-(r-1)*n._barSpacing)/r,1):0;const m=r>1?rx(AO((e-r*t.barSize)/(r-1),n._barSpacing),0):0,A=AO(ed((e+m)/t.barSize),r);n._setBarsCount(r),e=n._outerRadius,t.textRadius=e,t.textIndent=n._textIndent,n._palette.reset();const V=t.barSize+m,X=n._palette.generateColors(A);for(i=0;i<A;++i,e-=V)n._bars[i].arrange({radius:e,color:X[i]});for(let ce=A;ce<r;ce++)n._bars[ce].hide();n._animationSettings&&!n._noAnimation?n._animateBars():n._updateBars(),n._endValueChanging()},_setBarsCount:function(){const n=this;n._bars.length>0?n._dummyBackground&&(n._dummyBackground.dispose(),n._dummyBackground=null):(n._dummyBackground||(n._dummyBackground=n._renderer.arc().attr({"stroke-linejoin":"round"})),n._dummyBackground.attr({x:n._context.x,y:n._context.y,outerRadius:n._outerRadius,innerRadius:n._innerRadius,startAngle:n._context.endAngle,endAngle:n._context.startAngle,fill:n._context.backgroundColor}).append(n._barsGroup))},_getCenter:function(){return{x:this._context.x,y:this._context.y}},_updateBars:function(){this._bars.forEach(n=>n.applyValue()),this._checkOverlap()},_checkOverlap:function(){const n=this,e=Wi(n._getOption("resolveLabelOverlapping",!0));function t(i,r){return co(i,-r,n._context)}if("none"!==e)if("shift"===e){const i=n._dividePoints();iy_resolveLabelOverlappingInOneDirection(i.left,n._canvas,!1,!1,t),iy_resolveLabelOverlappingInOneDirection(i.right,n._canvas,!1,!1,t),n._clearLabelsCrossTitle(),n._drawConnector()}else n._clearOverlappingLabels()},_drawConnector(){const n=this,e=n._bars,{connectorWidth:t}=n._getOption("label");e.forEach(i=>{if(!i._isLabelShifted)return;const r=i._bar.attr("x"),m=i._bar.attr("y"),A=i._bar.attr("innerRadius"),V=i._bar.attr("outerRadius"),X=i._bar.attr("startAngle"),ce=i._bar.attr("endAngle"),_e=La.apply(null,or(r,m,A,V,X,ce)),{cos:Me,sin:Ve}=Qv(i._angle),Je=_e.x-Ve*t/2-Me,rt=_e.y-Me*t/2+Ve,Ct=i._text.getBBox(),Xt=i._text._lastCoords,On=n._context.textWidth/2,oi=[Je,rt,Ct.x+Ct.width/2+Xt.x,Ct.y+Xt.y];if(i._angle>90?oi[2]+=On:oi[2]-=On,i._angle<=180&&i._angle>0&&(oi[3]+=Ct.height),t%2){const $t=-Ve/2,xn=-Me/2;i._angle>180?(oi[0]-=$t,oi[1]-=xn):i._angle>0&&i._angle<=90&&(oi[0]+=$t,oi[1]+=xn)}const Yt=oi.map($t=>(0,ri.ar)($t,4));i._line.attr({points:Yt}),i._line.rotate(0),i._isLabelShifted=!1})},_dividePoints(){return this._bars.reduce(function(e,t){const i=xo(t._angle),r=i<=90||i>=270;return t._text._lastCoords={x:0,y:0},(r?e.right:e.left).push({series:{isStackedSeries:()=>!1,isFullStackedSeries:()=>!1},getLabels:()=>[{isVisible:()=>!0,getBoundingRect:()=>{const{height:A,width:V,x:X,y:ce}=t._text.getBBox(),_e=t._text._lastCoords;return{x:X+_e.x,y:ce+_e.y,width:V,height:A}},shift:(A,V)=>{const X=t._text.getBBox();t._text._lastCoords={x:A-X.x,y:V-X.y},t._text.attr({translateX:A-X.x,translateY:V-X.y}),t._isLabelShifted=!0},draw:()=>t.hideLabel(),getData:()=>({value:t.getValue()}),hideInsideLabel:()=>!1}]}),e},{left:[],right:[]})},_clearOverlappingLabels(){let e=0,t=1;const i=this._bars.concat().sort((r,m)=>r.getValue()-m.getValue());for(;e<i.length&&t<i.length;){const m=i[t];i[e].checkIntersect(m)?(m.hideLabel(),t++):(e=t,t=e+1)}},_clearLabelsCrossTitle(){const n=this._bars,e=this._title.getLayoutOptions()||{x:0,y:0,height:0,width:0},t=e.y+e.height;n.forEach(i=>{const r=i._text.getBBox();t>r.y+i._text._lastCoords.y&&i.hideLabel()})},_animateBars:function(){const n=this;let e;const t=n._bars.length;if(t>0){for(e=0;e<t;++e)n._bars[e].beginAnimation();n._barsGroup.animate({_:0},n._animationSettings)}},_buildNodes(){const n=this,e=n._options.silent();n._palette=n._themeManager.createPalette(e.palette,{useHighlight:!0,extensionMode:e.paletteExtensionMode}),n._palette.reset(),n._bars=n._bars||[],n._animationSettings&&n._barsGroup.stopAnimation();const t=n._values.filter(yy),i=t.length;if(n._bars.length>i){const r=n._bars.length;for(let m=i;m<r;++m)n._bars[m].dispose();n._bars.splice(i,r-i)}else if(n._bars.length<i)for(let r=n._bars.length;r<i;++r)n._bars.push(new qv(r,n._context));n._bars.forEach((r,m)=>{r.update({color:n._palette.getNextColor(i),value:t[m]})})},_updateValues:function(n){const e=this,t=aA(n)&&n||yy(n)&&[n]||[];let i;const r=t.length;let m;for(e._values.length=r,i=0;i<r;++i)m=t[i],e._values[i]=sx(yy(m)?m:e._values[i]);e._resizing||MB(e._values,e.option("values"))||e.option("values",e._values.slice()),this._change(["NODES"])},values:function(n){return void 0!==n?(this._updateValues(n),this):this._values.slice(0)},_optionChangesMap:{backgroundColor:"MOSTLY_TOTAL",relativeInnerRadius:"MOSTLY_TOTAL",barSpacing:"MOSTLY_TOTAL",label:"MOSTLY_TOTAL",resolveLabelOverlapping:"MOSTLY_TOTAL",palette:"MOSTLY_TOTAL",paletteExtensionMode:"MOSTLY_TOTAL",values:"VALUES"},_change_VALUES:function(){this._updateValues(this.option("values"))},_factory:(0,xe.o8)(qc.prototype._factory),_optionChangesOrder:["VALUES","NODES"],_initialChanges:["VALUES"],_change_NODES(){this._buildNodes()},_change_MOSTLY_TOTAL:function(){this._change(["NODES"]),this.callBase()},_proxyData:[],_getLegendData(){const e={},t=this._options.silent();return e.format=(t.legend||{}).itemTextFormat||(t.label||{}).format||this._defaultFormatOptions,(this._bars||[]).map(m=>({id:m.index,item:{value:m.getValue(),color:m.getColor(),index:m.index},text:Z0(m.getValue(),e),visible:!0,states:{normal:{fill:m.getColor()}}}))}});function IO(n,e,t){n.startAngle=e<t?e:t,n.endAngle=e<t?t:e}function yg(n,e){return I_(n-e)<1e-4}function La(n,e,t,i,r,m){return{x:(n+i*r).toFixed(5),y:(e-i*m).toFixed(5)}}qv=function(n,e){this._context=e,this._tracker=e.renderer.arc().attr({"stroke-linejoin":"round"}),this.index=n},Jv(qv.prototype,{dispose:function(){const n=this;return n._background.dispose(),n._bar.dispose(),n._context.textEnabled&&(n._line.dispose(),n._text.dispose()),n._context.tracker.detach(n._tracker),n._context=n._settings=n._background=n._bar=n._line=n._text=n._tracker=null,n},arrange:function(n){const e=this,t=e._context;return this._visible=!0,t.tracker.attach(e._tracker,e,{index:e.index}),e._background=t.renderer.arc().attr({"stroke-linejoin":"round",fill:t.backgroundColor}).append(t.group),e._settings=e._settings||{x:t.x,y:t.y,startAngle:t.baseAngle,endAngle:t.baseAngle},e._bar=t.renderer.arc().attr(Jv({"stroke-linejoin":"round"},e._settings)).append(t.group),t.textEnabled&&(e._line=t.renderer.path([],"line").attr({"stroke-width":t.lineWidth}).append(t.group),e._text=t.renderer.text().css(t.fontStyles).attr(t.textOptions).append(t.group)),e._angle=isFinite(e._angle)?e._angle:t.baseAngle,e._settings.outerRadius=n.radius,e._settings.innerRadius=n.radius-t.barSize,e._settings.x=t.x,e._settings.y=t.y,e._background.attr(Jv({},e._settings,{startAngle:t.endAngle,endAngle:t.startAngle,fill:e._context.backgroundColor})),e._bar.attr({x:t.x,y:t.y,outerRadius:e._settings.outerRadius,innerRadius:e._settings.innerRadius,fill:e._color}),e._tracker.attr(e._settings),t.textEnabled&&(e._line.attr({points:[t.x,t.y-e._settings.innerRadius,t.x,t.y-t.textRadius-t.textIndent],stroke:t.lineColor||e._color}).sharp(),e._text.css({fill:t.fontStyles.fill||e._color})),e},getTooltipParameters:function(){const n=Qv((this._angle+this._context.baseAngle)/2);return{x:sA(this._context.x+(this._settings.outerRadius+this._settings.innerRadius)/2*n.cos),y:sA(this._context.y-(this._settings.outerRadius+this._settings.innerRadius)/2*n.sin),offset:0,color:this._color,value:this._value}},setAngle:function(n){const e=this,t=e._context,i=e._settings;let r;if(e._angle=n,IO(i,t.baseAngle,n),e._bar.attr(i),e._tracker.attr(i),t.textEnabled){r=Qv(n);const m=t.textIndent,A=t.textRadius+m;let V=t.x+A*r.cos,X=t.y-A*r.sin;const ce=.5*t.textWidth,_e=t.textHeight,Me=t.textY;I_(V-t.x)>m&&(V+=V<t.x?-ce:ce),I_(X-t.y)<=m?X-=Me+.5*_e:X-=X<t.y?Me+_e:Me;const Ve=Z0(e._value,t.formatOptions,{index:e.index}),Je=""===Ve?"hidden":null;e._text.attr({text:Ve,x:V,y:X,visibility:Je}),e._line.attr({visibility:Je}),e._line.rotate(lA(n),t.x,t.y)}return e},hideLabel:function(){this._text.attr({visibility:"hidden"}),this._line.attr({visibility:"hidden"})},checkIntersect:function(n){const e=this.calculateLabelCoords(),t=n.calculateLabelCoords();return!(!e||!t)&&Math.max(0,Math.min(e.bottomRight.x,t.bottomRight.x)-Math.max(e.topLeft.x,t.topLeft.x))*Math.max(0,Math.min(e.bottomRight.y,t.bottomRight.y)-Math.max(e.topLeft.y,t.topLeft.y))!=0},calculateLabelCoords:function(){if(!this._text)return;const n=this._text.getBBox();return{topLeft:{x:n.x,y:n.y},bottomRight:{x:n.x+n.width,y:n.y+n.height}}},_processValue:function(n){return this._context.translator.translate(this._context.translator.adjust(n))},applyValue(){return this._visible?this.setAngle(this._processValue(this.getValue())):this},update(n){let{color:e,value:t}=n;this._color=e,this._value=t},hide(){this._visible=!1},getColor(){return this._color},getValue(){return this._value},beginAnimation:function(){if(!this._visible)return this;const n=this,e=this._processValue(this.getValue());yg(n._angle,e)?(n.animate=RB,n.setAngle(n._angle)):(n._start=n._angle,n._delta=e-n._angle,n._tracker.attr({visibility:"hidden"}),n._context.textEnabled&&(n._line.attr({visibility:"hidden"}),n._text.attr({visibility:"hidden"})))},animate:function(n){if(!this._visible)return this;this._angle=this._start+this._delta*n,IO(this._settings,this._context.baseAngle,this._angle),this._bar.attr(this._settings)},endAnimation:function(){const n=this;void 0!==n._delta?yg(n._angle,n._start+n._delta)&&(n._tracker.attr({visibility:null}),n.setAngle(n._angle)):delete n.animate,delete n._start,delete n._delta}}),(0,y.A)("dxBarGauge",Q0),Q0.addPlugin(Ui),Q0.addPlugin(ZD.gauge);let Cd=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.uIe,z.SB8,z.uE7,z.r2Z,z.Pxf,z.F1M,z.A1g,z.dSF,z.Yh3,z.sVF,z.YkV,z.FXg,z.hzo,z.Vku,z.cug,f.p_,f.xZ,z.YLo,z.uIe,z.SB8,z.uE7,z.r2Z,z.Pxf,z.F1M,z.A1g,z.dSF,z.Yh3,z.sVF,z.YkV,z.FXg,z.hzo,z.Vku,z.cug,f.xZ]})}return n})();M(625);let cA=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,z.Bfr,f.p_,f.xZ,z.POb,z.Bfr,f.xZ]})}return n})();const dA="sparkline-tooltip",J0=(0,N.b4)([Si.A.down,Si.A.move],dA),eC=_.X,uA=Math.floor;function h2(n){let{data:e}=n;const t=e.widget;t._enableOutHandler(),t._showTooltip()}function pA(n){const e=new hO({},{},{shiftZeroValue:!n,isHorizontal:!!n});return{getTranslator:function(){return e},update:function(t,i,r){e.update(t,i,r)},getVisibleArea(){const t=e.getCanvasVisibleArea();return[t.min,t.max]},visualRange:h.lQ,calculateInterval:h.lQ,getMarginOptions:()=>({}),aggregatedPointBetweenTicks:()=>!1}}let gA;const Dp=Vh.inherit({_getLayoutItems:h.lQ,_useLinks:!1,_themeDependentChanges:["OPTIONS"],_initCore:function(){this._tooltipTracker=this._renderer.root,this._tooltipTracker.attr({"pointer-events":"visible"}),this._createHtmlElements(),this._initTooltipEvents(),this._argumentAxis=pA(!0),this._valueAxis=pA()},_getDefaultSize:function(){return this._defaultSize},_disposeCore:function(){this._disposeWidgetElements(),this._disposeTooltipEvents(),this._ranges=null},_optionChangesOrder:["OPTIONS"],_change_OPTIONS:function(){this._prepareOptions(),this._change(["UPDATE"])},_customChangesOrder:["UPDATE"],_change_UPDATE:function(){this._update()},_update:function(){const n=this;n._tooltipShown&&(n._tooltipShown=!1,n._tooltip.hide()),n._cleanWidgetElements(),n._updateWidgetElements(),n._drawWidgetElements()},_updateWidgetElements:function(){const n=this._getCorrectCanvas();this._updateRange(),this._argumentAxis.update(this._ranges.arg,n,this._getStick()),this._valueAxis.update(this._ranges.val,n)},_getStick:function(){},_applySize:function(n){this._allOptions.size={width:n[2]-n[0],height:n[3]-n[1]},this._change(["UPDATE"])},_setupResizeHandler:h.lQ,_prepareOptions:function(){return eC(!0,{},this._themeManager.theme(),this.option())},_getTooltipCoords:function(){const n=this._canvas,e=this._renderer.getRootOffset();return{x:n.width/2+e.left,y:n.height/2+e.top}},_initTooltipEvents(){const n={widget:this};this._renderer.root.off("."+dA).on(J0,n,h2)},_showTooltip(){const n=this;let e;n._tooltipShown||(n._tooltipShown=!0,e=n._getTooltip(),e.isEnabled()&&n._tooltip.show(n._getTooltipData(),n._getTooltipCoords(),{}))},_hideTooltip(){this._tooltipShown&&(this._tooltipShown=!1,this._tooltip.hide())},_stopCurrentHandling(){this._hideTooltip()},_enableOutHandler(){const n=this;if(n._outHandler)return;const e=t=>{let{pageX:i,pageY:r}=t;const{left:m,top:A}=n._renderer.getRootOffset(),V=uA(i-m),X=uA(r-A);(function PO(n,e,t){let{width:i,height:r}=n;return Wt({left:0,top:0,right:i,bottom:r,width:i,height:r},e,t)})(n._canvas,V,X)||(n._hideTooltip(),n._disableOutHandler())};L.A.on(c.A.getDocument(),J0,e),this._outHandler=e},_disableOutHandler(){this._outHandler&&L.A.off(c.A.getDocument(),J0,this._outHandler),this._outHandler=null},_disposeTooltipEvents:function(){this._tooltipTracker.off(),this._disableOutHandler(),this._renderer.root.off("."+dA)},_getTooltip:function(){const n=this;return n._tooltip||(gA.apply(this,arguments),n._setTooltipRendererOptions(n._tooltipRendererOptions),n._tooltipRendererOptions=null,n._setTooltipOptions()),n._tooltip}}),mR=Dp;Dp.addPlugin(qy),gA=Dp.prototype._initTooltip,Dp.prototype._initTooltip=h.lQ;const _R=Dp.prototype._disposeTooltip;Dp.prototype._disposeTooltip=function(){this._tooltip&&_R.apply(this,arguments)},Dp.prototype._setTooltipRendererOptions=function(){const n=this._getRendererOptions();this._tooltip?this._tooltip.setRendererOptions(n):this._tooltipRendererOptions=n},Dp.prototype._setTooltipOptions=function(){if(this._tooltip){const n=this._getOption("tooltip"),e=this._getDefaultTooltipTemplate(n),i=eC(e?{contentTemplate:e}:{},n,{enabled:n.enabled&&this._isTooltipEnabled()});this._tooltip.update(i)}},Dp.prototype._getDefaultTooltipTemplate=function(n){let e=!0;const t=this.option("rtlEnabled")?"left":"right";if((0,C.Tn)(n.customizeTooltip)){this._tooltip.update(n);const i=this._getTooltipData(),r=n.customizeTooltip.call(i,i)??{};e=!("html"in r)&&!("text"in r)}return e&&function hA(n,e){let{lineSpacing:t,size:i}=n;const r=`${(t??2)+i}px`;return function(m,A){let{valueText:V}=m;const X=(0,a.A)("<table>").css({borderSpacing:0,lineHeight:r});for(let ce=0;ce<V.length;ce+=2){const _e=(0,a.A)("<tr>");(0,a.A)("<td>").text(V[ce]).appendTo(_e),(0,a.A)("<td>").css({width:15}).appendTo(_e),(0,a.A)("<td>").css({textAlign:e}).text(V[ce+1]).appendTo(_e),X.append(_e)}A.append(X)}}(n.font,t)};const vR=(0,_.X)(!0,{},bv,{init:h.lQ,dispose:h.lQ,customize:null,members:{_getExportMenuOptions:null}});Dp.addPlugin(vR);const nS=Number,by=isFinite,_h=mR.inherit({_rootClassPrefix:"dxb",_rootClass:"dxb-bullet",_themeSection:"bullet",_defaultSize:{width:300,height:30,left:1,right:1,top:2,bottom:2},_disposeWidgetElements:function(){delete this._zeroLevelPath,delete this._targetPath,delete this._barValuePath},_cleanWidgetElements:function(){this._zeroLevelPath.remove(),this._targetPath.remove(),this._barValuePath.remove()},_drawWidgetElements:function(){this._drawBullet(),this._drawn()},_createHtmlElements:function(){const n=this._renderer;this._zeroLevelPath=n.path(void 0,"line").attr({class:"dxb-zero-level","stroke-linecap":"square"}),this._targetPath=n.path(void 0,"line").attr({class:"dxb-target","stroke-linecap":"square"}),this._barValuePath=n.path(void 0,"line").attr({class:"dxb-bar-value","stroke-linecap":"square"})},_prepareOptions:function(){const n=this;let e,t,i,r,m,A;n._allOptions=e=n.callBase();const V=void 0===n._allOptions.value,X=void 0===n._allOptions.target;n._tooltipEnabled=!(V&&X),V&&(n._allOptions.value=0),X&&(n._allOptions.target=0),e.value=m=nS(e.value),e.target=A=nS(e.target),void 0===n._allOptions.startScaleValue&&(n._allOptions.startScaleValue=A<m?A:m,n._allOptions.startScaleValue=n._allOptions.startScaleValue<0?n._allOptions.startScaleValue:0),void 0===n._allOptions.endScaleValue&&(n._allOptions.endScaleValue=A>m?A:m),e.startScaleValue=t=nS(e.startScaleValue),e.endScaleValue=i=nS(e.endScaleValue),i<t&&(r=i,n._allOptions.endScaleValue=t,n._allOptions.startScaleValue=r,n._allOptions.inverted=!0)},_updateRange:function(){const n=this._allOptions;this._ranges={arg:{invert:n.rtlEnabled?!n.inverted:n.inverted,min:n.startScaleValue,max:n.endScaleValue,axisType:"continuous",dataType:"numeric"},val:{min:0,max:1,axisType:"continuous",dataType:"numeric"}}},_drawBullet:function(){const n=this._allOptions,e=n.startScaleValue!==n.endScaleValue,t=by(n.startScaleValue),i=by(n.endScaleValue),r=by(n.value),m=by(n.target);e&&i&&t&&m&&r&&(this._drawBarValue(),this._drawTarget(),this._drawZeroLevel())},_getTargetParams:function(){const n=this._allOptions,e=this._valueAxis.getTranslator(),t=this._argumentAxis.getTranslator().translate(n.target);return{points:[t,e.translate(.02),t,e.translate(.98)],stroke:n.targetColor,"stroke-width":n.targetWidth}},_getBarValueParams:function(){const n=this._allOptions,e=this._argumentAxis.getTranslator(),t=this._valueAxis.getTranslator(),i=n.startScaleValue,r=n.endScaleValue,m=n.value,A=t.translate(.1),V=t.translate(.9);let X,ce;return m>0?(X=i<=0?0:i,ce=m>=r?r:m<X?X:m):(X=r>=0?0:r,ce=m<i?i:m>X?X:m),X=e.translate(X),ce=e.translate(ce),{points:[X,V,ce,V,ce,A,X,A],fill:n.color}},_getCorrectCanvas:function(){return this._canvas},_getZeroLevelParams:function(){const n=this._valueAxis.getTranslator(),e=this._argumentAxis.getTranslator().translate(0);return{points:[e,n.translate(.02),e,n.translate(.98)],stroke:this._allOptions.targetColor,"stroke-width":1}},_drawZeroLevel:function(){const n=this._allOptions;0>n.endScaleValue||0<n.startScaleValue||!n.showZeroLevel||this._zeroLevelPath.attr(this._getZeroLevelParams()).sharp().append(this._renderer.root)},_drawTarget:function(){const n=this._allOptions,e=n.target;e>n.endScaleValue||e<n.startScaleValue||!n.showTarget||this._targetPath.attr(this._getTargetParams()).sharp().append(this._renderer.root)},_drawBarValue:function(){this._barValuePath.attr(this._getBarValueParams()).append(this._renderer.root)},_getTooltipCoords:function(){const n=this._canvas,e=this._renderer.getRootOffset(),t=this._barValuePath.getBBox();return{x:t.x+t.width/2+e.left,y:n.height/2+e.top}},_getTooltipData:function(){const n=this._tooltip,e=this._allOptions,t=e.value,i=e.target,r=n.formatValue(t),m=n.formatValue(i);return{originalValue:t,originalTarget:i,value:r,target:m,valueText:["Actual Value:",r,"Target Value:",m]}},_isTooltipEnabled:function(){return this._tooltipEnabled}});(0,w.__)(["color","targetColor","targetWidth","showTarget","showZeroLevel","value","target","startScaleValue","endScaleValue"],function(n,e){_h.prototype._optionChangesMap[e]="OPTIONS"}),(0,y.A)("dxBullet",_h);let LO=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.Yh3,z.hzo,z.Vku,z.A1g,z.r2Z,z.Pxf,z.cug,f.p_,f.xZ,z.Yh3,z.hzo,z.Vku,z.A1g,z.r2Z,z.Pxf,z.cug,f.xZ]})}return n})();var Ps=M(4539),CR=M(4925),ax=M(3086);const yR={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>BO),multi:!0};let BO=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get cellTemplate(){return this._getOption("cellTemplate")}set cellTemplate(t){this._setOption("cellTemplate",t)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(t){this._setOption("dateSerializationFormat",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get disabledDates(){return this._getOption("disabledDates")}set disabledDates(t){this._setOption("disabledDates",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get firstDayOfWeek(){return this._getOption("firstDayOfWeek")}set firstDayOfWeek(t){this._setOption("firstDayOfWeek",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get maxZoomLevel(){return this._getOption("maxZoomLevel")}set maxZoomLevel(t){this._setOption("maxZoomLevel",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get minZoomLevel(){return this._getOption("minZoomLevel")}set minZoomLevel(t){this._setOption("minZoomLevel",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(t){this._setOption("selectionMode",t)}get selectWeekOnClick(){return this._getOption("selectWeekOnClick")}set selectWeekOnClick(t){this._setOption("selectWeekOnClick",t)}get showTodayButton(){return this._getOption("showTodayButton")}set showTodayButton(t){this._setOption("showTodayButton",t)}get showWeekNumbers(){return this._getOption("showWeekNumbers")}set showWeekNumbers(t){this._setOption("showWeekNumbers",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get weekNumberRule(){return this._getOption("weekNumberRule")}set weekNumberRule(t){this._setOption("weekNumberRule",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get zoomLevel(){return this._getOption("zoomLevel")}set zoomLevel(t){this._setOption("zoomLevel",t)}onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;cellTemplateChange;dateSerializationFormatChange;disabledChange;disabledDatesChange;elementAttrChange;firstDayOfWeekChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;maxChange;maxZoomLevelChange;minChange;minZoomLevelChange;nameChange;readOnlyChange;rtlEnabledChange;selectionModeChange;selectWeekOnClickChange;showTodayButtonChange;showWeekNumbersChange;tabIndexChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;weekNumberRuleChange;widthChange;zoomLevelChange;onBlur;change(t){}touched=t=>{};constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"cellTemplateChange"},{emit:"dateSerializationFormatChange"},{emit:"disabledChange"},{emit:"disabledDatesChange"},{emit:"elementAttrChange"},{emit:"firstDayOfWeekChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"maxChange"},{emit:"maxZoomLevelChange"},{emit:"minChange"},{emit:"minZoomLevelChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"selectionModeChange"},{emit:"selectWeekOnClickChange"},{emit:"showTodayButtonChange"},{emit:"showWeekNumbersChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"weekNumberRuleChange"},{emit:"widthChange"},{emit:"zoomLevelChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new ax.A(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("disabledDates",t),this.setupChanges("validationErrors",t),this.setupChanges("value",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("disabledDates"),this._idh.doCheck("validationErrors"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-calendar"]],hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",cellTemplate:"cellTemplate",dateSerializationFormat:"dateSerializationFormat",disabled:"disabled",disabledDates:"disabledDates",elementAttr:"elementAttr",firstDayOfWeek:"firstDayOfWeek",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",max:"max",maxZoomLevel:"maxZoomLevel",min:"min",minZoomLevel:"minZoomLevel",name:"name",readOnly:"readOnly",rtlEnabled:"rtlEnabled",selectionMode:"selectionMode",selectWeekOnClick:"selectWeekOnClick",showTodayButton:"showTodayButton",showWeekNumbers:"showWeekNumbers",tabIndex:"tabIndex",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",weekNumberRule:"weekNumberRule",width:"width",zoomLevel:"zoomLevel"},outputs:{onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",cellTemplateChange:"cellTemplateChange",dateSerializationFormatChange:"dateSerializationFormatChange",disabledChange:"disabledChange",disabledDatesChange:"disabledDatesChange",elementAttrChange:"elementAttrChange",firstDayOfWeekChange:"firstDayOfWeekChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",maxChange:"maxChange",maxZoomLevelChange:"maxZoomLevelChange",minChange:"minChange",minZoomLevelChange:"minZoomLevelChange",nameChange:"nameChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",selectionModeChange:"selectionModeChange",selectWeekOnClickChange:"selectWeekOnClickChange",showTodayButtonChange:"showTodayButtonChange",showWeekNumbersChange:"showWeekNumbersChange",tabIndexChange:"tabIndexChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",weekNumberRuleChange:"weekNumberRuleChange",widthChange:"widthChange",zoomLevelChange:"zoomLevelChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,yR,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),mA=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();const NO=Math,_A=NO.abs,HB=NO.min,UB=NO.max,bR=NO.floor,VO=8,vA=4;function yA(n){return{x:n.x-VO,y:n.y-vA,width:n.width+2*VO,height:n.height+2*vA}}function ER(n,e,t,i){const r=t?["x","width","y","height",e,0]:["y","height","x","width",n,1];return function(m,A,V){const X={x:V.x,y:V.y},ce=yA(m),_e=t?V.y-m.y-m.height/2:V.y-m.y;return X.y=t||!t&&"bottom"===A?V.y+_e:V.y,ce[r[0]]<0?X[r[0]]-=ce[r[0]]:ce[r[0]]+ce[r[1]]+_e*r[5]>i[r[1]]&&(X[r[0]]-=ce[r[0]]+ce[r[1]]+_e*r[5]-i[r[1]]),r[4]-ce[r[3]]/2<0?X[r[2]]-=r[4]-ce[r[3]]/2:r[4]+ce[r[3]]/2>i[r[3]]&&(X[r[2]]-=r[4]+ce[r[3]]/2-i[r[3]]),X}}function bA(n,e,t,i){this._renderer=n,this._crosshairGroup=i,this._options={},this.update(e,t)}bA.prototype={constructor:bA,update:function(n,e){const t=e.canvas;this._canvas={top:t.top,bottom:t.height-t.bottom,left:t.left,right:t.width-t.right,width:t.width,height:t.height},this._axes=e.axes,this._panes=e.panes,this._prepareOptions(n,"horizontal"),this._prepareOptions(n,"vertical")},dispose:function(){this._renderer=this._crosshairGroup=this._options=this._axes=this._canvas=this._horizontalGroup=this._verticalGroup=this._horizontal=this._vertical=this._circle=this._panes=null},_prepareOptions:function(n,e){const t=n[e+"Line"];this._options[e]={visible:t.visible,line:{stroke:t.color||n.color,"stroke-width":t.width||n.width,dashStyle:t.dashStyle||n.dashStyle,opacity:t.opacity||n.opacity,"stroke-linecap":"butt"},label:(0,_.X)(!0,{},n.label,t.label)}},_createLines:function(n,e,t){const i=[],r=this._canvas,m=[r.left,r.top,r.left,r.top];for(let A=0;A<2;A++)i.push(this._renderer.path(m,"line").attr(n).sharp(e).append(t));return i},render:function(){const n=this,e=n._renderer,t=n._options,i=t.vertical,r=t.horizontal,m=r.visible?r.line:i.line,A={stroke:m.stroke,"stroke-width":m["stroke-width"],dashStyle:m.dashStyle,opacity:m.opacity},V=n._canvas;n._horizontal={},n._vertical={},n._circle=e.circle(V.left,V.top,0).attr(A).append(n._crosshairGroup),n._horizontalGroup=e.g().append(n._crosshairGroup),n._verticalGroup=e.g().append(n._crosshairGroup),i.visible&&(n._vertical.lines=n._createLines(i.line,"h",n._verticalGroup),n._vertical.labels=n._createLabels(n._axes[0],i,!1,n._verticalGroup)),r.visible&&(n._horizontal.lines=n._createLines(r.line,"v",n._horizontalGroup),n._horizontal.labels=n._createLabels(n._axes[1],r,!0,n._horizontalGroup)),n.hide()},_createLabels:function(n,e,t,i){const r=this._canvas,m=this._renderer;let A,V,X;const ce=[];let _e,Me;const Ve=e.label;return Ve.visible&&n.forEach(function(Je){const rt=Je.getOptions().position;if(Je.getTranslator().getBusinessRange().isEmpty())return;Me=Je.getLabelsPosition(),t?(V=r.top,A=Me):(A=r.left,V=Me);const Ct="top"===rt||"bottom"===rt?"center":"right"===rt?"left":"right";_e=m.rect(0,0,0,0).attr({fill:Ve.backgroundColor||e.line.stroke}).append(i),X=m.text("0",0,0).css(Ti(e.label.font)).attr({align:Ct,class:Ve.cssClass}).append(i),ce.push({text:X,background:_e,axis:Je,options:Ve,pos:{coord:Me,side:rt},startXY:{x:A,y:V}})}),ce},_updateText:function(n,e,t,i,r){const m=this;t.forEach(function(A){const V=A.axis,X=A.startXY,ce=A.text,_e=A.background;let Me="";(!V.name||V.name===e)&&(Me=V.getFormattedValue(n,A.options,i)),Me?(ce.attr({text:Me,x:X.x,y:X.y}),ce.attr(r(ce.getBBox(),A.pos.side,X)),m._updateLinesCanvas(A),_e.attr(yA(ce.getBBox()))):(ce.attr({text:""}),_e.attr({x:0,y:0,width:0,height:0}))})},hide:function(){this._crosshairGroup.attr({visibility:"hidden"})},_updateLinesCanvas:function(n){const e=n.pos.side,t=n.pos.coord,i=this._linesCanvas,r=this._canvas;i[e]=i[e]!==r[e]&&_A(i[e]-r[e])<_A(t-r[e])?i[e]:t},_updateLines:function(n,e,t,i,r){const m=this._linesCanvas,A=this._canvas,V=r?[[HB(e-i,m.left),A.top,e-i,A.top],[e+i,A.top,UB(m.right,e+i),A.top]]:[[A.left,HB(m.top,t-i),A.left,t-i],[A.left,t+i,A.left,UB(m.bottom,t+i)]];for(let X=0;X<2;X++)n[X].attr({points:V[X]}).sharp(r?"v":"h",r?t===A.bottom?-1:1:e===A.right?-1:1)},_resetLinesCanvas:function(){const n=this._canvas;this._linesCanvas={left:n.left,right:n.right,top:n.top,bottom:n.bottom}},_getClipRectForPane:function(n,e){const t=this._panes;let i,r;for(i=0;i<t.length;i++)if(r=t[i].coords,r.left<=n&&r.right>=n&&r.top<=e&&r.bottom>=e)return t[i].clipRect;return{id:null}},show:function(n){const e=this,t=n.point,i=t.getCrosshairData(n.x,n.y),r=t.getPointRadius(),m=e._horizontal,A=e._vertical,V=r?r+3:0,X=e._canvas,ce=bR(i.x),_e=bR(i.y);ce>=X.left&&ce<=X.right&&_e>=X.top&&_e<=X.bottom?(e._crosshairGroup.attr({visibility:"visible"}),e._resetLinesCanvas(),e._circle.attr({cx:ce,cy:_e,r:V,"clip-path":e._getClipRectForPane(ce,_e).id}),m.lines&&(e._updateText(i.yValue,i.axis,m.labels,t,ER(ce,_e,!0,X)),e._updateLines(m.lines,ce,_e,V,!0),e._horizontalGroup.attr({translateY:_e-X.top})),A.lines&&(e._updateText(i.xValue,i.axis,A.labels,t,ER(ce,_e,!1,X)),e._updateLines(A.lines,ce,_e,V,!1),e._verticalGroup.attr({translateX:ce-X.left}))):e.hide()}};const tC=Math,xy=tC.floor,oS=tC.max,xA=tC.abs,GB=n=>({transform:function(e,t){return(0,ri.Ai)(Mr(e,t,n.allowNegatives,n.linearThreshold))},getTicks:function(e,t,i){const r=[];let m=this.transform(t[0],i);for(;r.length<t.length;)r.push(m),m=(0,ri.Ai)(m+e);return r}}),OR=n=>({transform:function(e,t){return(0,ri.Ai)(dn(e,t,n.allowNegatives,n.linearThreshold))},getTicks:function(e,t,i){const r=[];let m;for(let A=0;A<t.length;A+=1)m=this.transform(t[A],i),r.push(m);return r}});function SA(n,e){if(!n.isLogarithmic)return;const t=n.logarithmicBase,i=n.tickValues;n.minValue=e.transform(n.minValue,t),n.oldMinValue=e.transform(n.oldMinValue,t),n.maxValue=e.transform(n.maxValue,t),n.oldMaxValue=e.transform(n.oldMaxValue,t),n.tickInterval=tC.round(n.tickInterval),n.tickInterval<1&&(n.tickInterval=1);const r=e.getTicks(n.tickInterval,i,t);r.tickInterval=n.tickInterval,n.tickValues=r}function R_(n){return n.maxValue-n.minValue||1}function HO(n){for(let e=0;e<n.length;e++)if(!n[e].stubData)return n[e];return null}var ul=M(8664);const zO=Math.min,dx=Math.max,vh=function(n,e){this._translator=new hO({},{},{}),this._scroll=n.rect().append(e),this._addEvents()};function TA(n,e,t,i){let r=0;return"right"===e?r=n.width-n.right+t:"left"===e&&(r=n.left-t-i),r}function AR(n,e,t,i){let r=0;return"top"===e?r=n.top-t:"bottom"===e&&(r=n.height-n.bottom+i+t),r}vh.prototype={_addEvents:function(){const n=this._scroll.element;L.A.on(n,ul.ni,e=>{(0,N.rC)({type:"dxc-scroll-start",originalEvent:e,target:n})}),L.A.on(n,ul.Cy,e=>{const t=-e.offset.x*this._scale,i=-e.offset.y*this._scale,r=this._offset-(this._layoutOptions.vertical?i:t)/this._scale;this._applyPosition(r,r+this._translator.canvasLength/this._scale),(0,N.rC)({type:"dxc-scroll-move",originalEvent:e,target:n,offset:{x:t,y:i}})}),L.A.on(n,ul._N,e=>{(0,N.rC)({type:"dxc-scroll-end",originalEvent:e,target:n,offset:{x:-e.offset.x*this._scale,y:-e.offset.y*this._scale}})})},update:function(n){let e=n.position;const t=n.rotated,i=t?"right":"top";return e!==i&&e!==(t?"left":"bottom")&&(e=i),this._scroll.attr({rotate:n.rotated?0:-90,rotateX:0,rotateY:0,fill:n.color,width:n.width,opacity:n.opacity}),this._layoutOptions={width:n.width,offset:n.offset,vertical:t,position:e},this},init:function(n,e){const t="discrete"===n.axisType;return this._translateWithOffset=t&&!e?1:0,this._translator.update((0,_.X)({},n,{minVisible:null,maxVisible:null,visibleCategories:null},t&&{min:null,max:null}||{}),this._canvas,{isHorizontal:!this._layoutOptions.vertical,stick:e}),this},getOptions:function(){return this._layoutOptions},setPane:function(n){const e=this._layoutOptions.position;let t;return t="left"===e||"top"===e?n[0]:n[n.length-1],this.pane=t.name,this},updateSize:function(n){this._canvas=(0,_.X)({},n);const e=this._layoutOptions,t=e.position,i=e.offset,r=e.width;this._scroll.attr({translateX:TA(n,t,i,r),translateY:AR(n,t,i,r)})},getMultipleAxesSpacing:function(){return 0},estimateMargins:function(){return this.getMargins()},getMargins:function(){const n=this._layoutOptions,e={left:0,top:0,right:0,bottom:0};return e[n.position]=n.width+n.offset,e},shift:function(n){const e=this._layoutOptions,t=e.position,i=e.vertical,r={translateX:this._scroll.attr("translateX")??0,translateY:this._scroll.attr("translateY")??0};r[i?"translateX":"translateY"]+=("left"===t||"top"===t?-1:1)*n[t],this._scroll.attr(r)},hideTitle:h.lQ,hideOuterElements:h.lQ,setPosition:function(n,e){const t=this._translator,i=(0,C.O9)(n)?t.translate(n,-this._translateWithOffset):t.translate("canvas_position_start"),r=(0,C.O9)(e)?t.translate(e,this._translateWithOffset):t.translate("canvas_position_end");this._offset=zO(i,r),this._scale=t.getScale(n,e),this._applyPosition(zO(i,r),dx(i,r))},customPositionIsAvailable:()=>!1,dispose:function(){this._scroll.dispose(),this._scroll=this._translator=null},_applyPosition:function(n,e){const t=this._translator.getCanvasVisibleArea();n=dx(n,t.min),n=zO(n,t.max),e=zO(e,t.max),e=dx(e,t.min);const i=Math.abs(e-n);this._scroll.attr({y:n,height:i<2?2:i})}};const rS=ul.ni+".shutter-zoom",k_=ul.Cy+".shutter-zoom",GO=ul._N+".shutter-zoom";function WO(n,e,t,i){let r=Math.floor(t?i.pageY-n.top:i.pageX-n.left);const m=t?e.y1:e.x1,A=t?e.y2:e.x2;return r<m?r=m:r>A&&(r=A),r}const AA={name:"shutter_zoom",init:function(){const n=this.option("shutterZoom")||{};n.enabled&&(this._shutterZoom=function PR(n){const e=n.chart,t=n.renderer,i=n.rotated,r=t.rect(0,0,0,0).attr(n.shutterOptions),m={rect:r,root:t.root,rotated:i,triggerStart:function(){e._eventTrigger("zoomStart")},triggerEnd:function(){const A=e._argumentAxes[0].getTranslator(),V=Math.min(this.startCoord,this.curCoord),X=Math.max(this.startCoord,this.curCoord);e._eventTrigger("zoomEnd",{rangeStart:A.from(V),rangeEnd:A.from(X)})},dispose:function(){t.root.off(".shutter-zoom"),r.dispose()},getRootOffset:function(){return t.getRootOffset()},getCanvas:function(){const A=e._canvas,V=e.panes,X=V[0].canvas,ce=V[V.length-1].canvas;return{x1:X.left,y1:X.top,x2:A.width-ce.right,y2:A.height-ce.bottom,width:A.width-X.left-ce.right,height:A.height-X.top-ce.bottom}}};return t.root.off(".shutter-zoom").on(rS,{direction:i?"vertical":"horizontal",immediate:!0},function L_(n){return function(e){const t=n.getRootOffset(),i=n.getCanvas();!function Zd(n,e,t){const i=t.pageX-n.left,r=t.pageY-n.top;return i>=e.x1&&i<=e.x2&&r>=e.y1&&r<=e.y2}(t,i,e)?e.cancel=!0:(n.rootOffset=t,n.canvas=i,n.startCoord=WO(t,i,n.rotated,e),n.triggerStart(),n.rect.attr({x:i.x1,y:i.y1,width:i.width,height:i.height}).append(n.root))}}(m)).on(k_,function IR(n){return function(e){const t=WO(n.rootOffset,n.canvas,n.rotated,e),i={};n.curCoord=t,i[n.rotated?"y":"x"]=Math.min(n.startCoord,t),i[n.rotated?"height":"width"]=Math.abs(n.startCoord-t),n.rect.attr(i)}}(m)).on(GO,function DA(n){return function(e){n.triggerEnd(),n.rect.remove()}}(m)),m}({chart:this,renderer:this._renderer,rotated:this.option("rotated"),shutterOptions:n}))},dispose:function(){this._shutterZoom&&this._shutterZoom.dispose()}};var IA=M(1208),MR=M(6211);const KB="start",XB="",MA="end",ux=[],$O=function(n,e){ux.push({name:n,args:e})};$O("transform",{scale:!0,deltaScale:!0,rotation:!0,deltaRotation:!0,translation:!0,deltaTranslation:!0}),$O("translate",{translation:!0,deltaTranslation:!0}),$O("pinch",{scale:!0,deltaScale:!0}),$O("rotate",{rotation:!0,deltaRotation:!0});const RA=function(n){const e=n.pointers;return function(n,e){return{x:e.pageX-n.pageX,y:-e.pageY+n.pageY,centerX:.5*(e.pageX+n.pageX),centerY:.5*(e.pageY+n.pageY)}}(e[0],e[1])},iC=function(n){return Math.sqrt(n.x*n.x+n.y*n.y)},RR=function(n,e){return iC(n)/iC(e)},kR=function(n,e){const t=n.x*e.x+n.y*e.y,i=iC(n)*iC(e);return 0===i?0:(0,ri._S)(n.x*e.y-e.x*n.y)*Math.acos((0,ri.df)(t/i,-1,1))},LR=function(n,e){return{x:n.centerX-e.centerX,y:n.centerY-e.centerY}},kA=IA.A.inherit({validatePointers:function(n){return(0,N.Ic)(n)>1},start:function(n){this._accept(n);const e=RA(n);this._startVector=e,this._prevVector=e,this._fireEventAliases(KB,n)},move:function(n){const e=RA(n),t=this._getEventArgs(e);this._fireEventAliases(XB,n,t),this._prevVector=e},end:function(n){const e=this._getEventArgs(this._prevVector);this._fireEventAliases(MA,n,e)},_getEventArgs:function(n){return{scale:RR(n,this._startVector),deltaScale:RR(n,this._prevVector),rotation:kR(n,this._startVector),deltaRotation:kR(n,this._prevVector),translation:LR(n,this._startVector),deltaTranslation:LR(n,this._prevVector)}},_fireEventAliases:function(n,e,t){t=t||{},w.__(ux,function(i,r){const m={};w.__(r.args,function(A){A in t&&(m[A]=t[A])}),this._fireEvent("dx"+r.name+n,e,m)}.bind(this))}}),BR=ux.reduce((n,e)=>([KB,XB,MA].forEach(t=>{n.push("dx"+e.name+t)}),n),[]);(0,MR.A)({emitter:kA,events:BR});const NR={};w.__(BR,function(n,e){NR[e.substring(2)]=e});const{pinchstart:eN,pinch:LA,pinchend:tN}=NR,Df=".zoomAndPanNS",VR=ul.ni+Df,BA=ul.Cy+Df,oN=ul._N+Df,hx=eN+Df,rN=LA+Df,sN=tN+Df,NA="dxc-scroll-start"+Df,aN="dxc-scroll-move"+Df,HR="dxc-scroll-end"+Df,px=Math.min,FA=Math.max,gx=Math.abs;function jh(n){return{x:n.left,y:n.top,width:n.width-n.left-n.right,height:n.height-n.top-n.bottom}}function B_(n,e){const t=e.x,i=e.y;return t>=n.x&&t<=n.width+n.x&&i>=n.y&&i<=n.height+n.y}function aS(n){return n.filter(e=>!e.getTranslator().getBusinessRange().isEmpty())}function VA(n){return n.some(e=>!e.isExtremePosition(!1)||!e.isExtremePosition(!0))}function HA(n,e,t,i,r,m,A){const V=e&&n!==e,X=t(n),{stopInteraction:ce,correctedRange:_e}=n.checkZoomingLowerLimitOvercome(r,m,X),Me=n.handleZooming(ce?null:_e,i(V),A,r);return ce&&n.handleZoomEnd(),{stopInteraction:ce,result:Me}}function lS(n,e,t,i,r,m){e=function UR(n,e){return e&&(n=n.sort((t,i)=>t===e?-1:i===e?1:0)),n}(e,m);let A=!1;const V=X=>({start:!!X,end:!!X});return aS(e).some(X=>{const ce=X.getTranslator(),_e=ce.getMinScale(i),{stopInteraction:Me,result:Ve}=HA(X,m,t((0,Lo.A)({scale:_e,translator:ce,axis:X},r)),V,"zoom",_e,n);return A=!Me,m&&Ve.isPrevented}),A}function Sy(n){n.originalEvent&&Sy(n.originalEvent),!1!==n.cancelable&&(n.cancel=!0)}const zR={name:"zoom_and_pan",init:function(){const n=this,e=this._renderer;function t(Je,rt){let Ct=[];const Xt=Je.options,On=Je.actionData;return Xt.argumentAxis[rt]&&Ct.push(n.getArgumentAxis()),Xt.valueAxis[rt]&&(Ct=Ct.concat(On.valueAxes)),Ct}function i(Je,rt,Ct){aS(t(Je,rt)).some(On=>On.handleZooming(null,{end:!0},Ct,rt).isPrevented)&&Sy(Ct)}function r(Je,rt,Ct,Xt,On){function Fn(ji,$i,ho,io,Uo){let zr={zoomed:!1};return $i&&aS(ji).forEach(Os=>{const wa=Os.getOptions(),$l=Os.visualRange(),Gc=Os.getTranslator().getEventScale(io),Jd=-Xt(io,Uo,ho,Gc);zr=(0,_.X)(!0,zr,Os.getTranslator().zoom(Jd,Gc,Os.getZoomBounds()));const Dg=Os.adjustRange(er([zr.min,zr.max])),{stopInteraction:xh,correctedRange:wo}=Os.checkZoomingLowerLimitOvercome(rt,Gc,Dg);if((0,C.O9)($l)&&$l.startValue.valueOf()===wo.startValue.valueOf()&&$l.endValue.valueOf()===wo.endValue.valueOf()){if("touch"===io.pointerType&&"discrete"===wa.type){const dr=Os.isExtremePosition(!1),Cr=Os.isExtremePosition(!0);zr.enabled=Gc>1&&!xh||Gc<1&&(!dr||!Cr)||1===Gc&&!(dr&&(Jd<0&&!wa.inverted||Jd>0&&wa.inverted)||Cr&&(Jd>0&&!wa.inverted||Jd<0&&wa.inverted))}}else Os.handleZooming(xh?null:wo,{start:!0,end:!0},io,rt),xh||(zr.zoomed=!0,zr.deltaTranslate=Jd-zr.translate)}),zr}function oi(ji,$i,ho,io){ho.zoomed&&($i.offset[io]=(ji.offset?ji.offset[io]:$i.offset[io])+ho.deltaTranslate)}function Yt(ji,$i,ho,io){ho.zoomed&&($i.center[io]=ji[io]+ho.deltaTranslate)}const $t=n.option("rotated"),xn=Je.actionData,Gn=Je.options;let qn={},ii={};xn.fallback||(qn=Fn(n._argumentAxes,Gn.argumentAxis[rt],$t?"y":"x",Ct,xn),ii=Fn(xn.valueAxes,Gn.valueAxis[rt],$t?"x":"y",Ct,xn),n._requestChange(["VISUAL_RANGE"]),oi(Ct,xn,qn,$t?"y":"x"),oi(Ct,xn,ii,$t?"x":"y"));const qi=On(Ct);return Yt(qi,xn,qn,$t?"y":"x"),Yt(qi,xn,ii,$t?"x":"y"),!qn.zoomed&&!ii.zoomed&&(xn.center=qi),qn.zoomed||ii.zoomed||xn.fallback||qn.enabled||ii.enabled}function m(Je,rt,Ct,Xt){function On(xn,Gn,qn,ii){let qi=!1;const ji=Ct.scale||1,$i=io=>{const Uo=io.getTranslator().zoom(-Xt(Ct,qn,Gn,ji),ji,io.getZoomBounds());return{startValue:Uo.min,endValue:Uo.max}},ho=io=>({start:!0,end:io});return aS(xn).forEach(io=>{qi=!HA(io,ii,$i,ho,rt,ji,Ct).stopInteraction}),qi}const Fn=n.option("rotated"),oi=Je.actionData,Yt=Je.options;let $t=!0;if(oi.fallback)$t&=Yt.argumentAxis[rt]&&On(n._argumentAxes,Fn?"y":"x",oi,n.getArgumentAxis()),$t|=Yt.valueAxis[rt]&&On(oi.valueAxes,Fn?"x":"y",oi);else{const xn=t(Je,rt);aS(xn).forEach(Gn=>{Gn.handleZooming(null,{start:!0},Ct,rt)}),$t=xn.length}$t&&n._requestChange(["VISUAL_RANGE"])}function A(Je,rt){const Ct=n._argumentAxes.filter(Xt=>B_(jh(Xt.getCanvas()),Je));return{fallback:n._lastRenderingTime>300,cancel:!Ct.length||!(0,C.O9)(rt),action:rt,curAxisRect:Ct.length&&jh(Ct[0].getCanvas()),valueAxes:Ct.length&&n._valueAxes.filter(Xt=>B_(jh(Xt.getCanvas()),Je)),offset:{x:0,y:0},center:Je,startCenter:Je}}function V(Je,rt){const Ct=e.getRootOffset();return{x:px(FA(rt.pageX-Ct.left,Je.x),Je.width+Je.x),y:px(FA(rt.pageY-Ct.top,Je.y),Je.height+Je.y)}}function X(Je){const rt=e.getRootOffset(),Ct=Je.pointers[0].pageX,Xt=Je.pointers[1].pageX,On=Je.pointers[0].pageY,Fn=Je.pointers[1].pageY;return{x:px(Ct,Xt)+gx(Xt-Ct)/2-rt.left,y:px(On,Fn)+gx(Fn-On)/2-rt.top}}function ce(Je){const rt=e.getRootOffset();return{x:Je.pageX-rt.left,y:Je.pageY-rt.top}}function _e(Je,rt,Ct){return Je.offset[Ct]-rt.offset[Ct]}function Me(Je){!1!==Je.cancelable&&(Je.preventDefault(),Je.stopPropagation()),n._stopCurrentHandling()}const Ve={dragStartHandler:function(Je){const rt=Ve.options,Ct="touch"===Je.pointerType,Xt=rt.argumentAxis.pan||rt.valueAxis.pan,On=rt.argumentAxis.zoom||rt.valueAxis.zoom,Fn=(0,C.O9)(rt.panKey)&&Je[Wi(rt.panKey)+"Key"],oi=rt.dragToZoom;let Yt;Je._cancelPreventDefault=!0,Ct?rt.allowTouchGestures&&Xt&&(Yt=!Ve.panningVisualRangeEnabled()||Ve.skipEvent?null:"pan"):oi&&Xt&&Fn||!oi&&Xt?Yt="pan":oi&&On&&(Yt="zoom");const $t=A(ce(Je),Yt);if($t.cancel)return Ve.skipEvent=!1,void(!1!==Je.cancelable&&(Je.cancel=!0));Ve.actionData=$t,"zoom"===Yt?($t.startCoords=V($t.curAxisRect,Je),$t.rect=e.rect(0,0,0,0).attr(rt.dragBoxStyle).append(e.root)):i(Ve,"pan",Je)},dragHandler:function(Je){const rt=n.option("rotated"),Ct=Ve.options,Xt=Ve.actionData,On="touch"===Je.pointerType;if(Je._cancelPreventDefault=!0,Xt&&(!On||Ve.panningVisualRangeEnabled()))if("zoom"===Xt.action){Me(Je);const Fn=Xt.curAxisRect,oi=Xt.startCoords,Yt=V(Fn,Je),$t=Ct.argumentAxis.zoom,xn=Ct.valueAxis.zoom,Gn={x:px(oi.x,Yt.x),y:px(oi.y,Yt.y),width:gx(oi.x-Yt.x),height:gx(oi.y-Yt.y)};(!$t||!xn)&&(!$t&&!rt||!xn&&rt?(Gn.x=Fn.x,Gn.width=Fn.width):(Gn.y=Fn.y,Gn.height=Fn.height)),Xt.rect.attr(Gn)}else if("pan"===Xt.action){r(Ve,"pan",Je,_e,Yt=>Yt.offset);const Fn=Math.abs(Je.offset.y-Xt.offset.y),oi=Math.abs(Je.offset.x-Xt.offset.x);if(On&&(Fn>5&&Fn>Math.abs(Xt.offset.x)||oi>5&&oi>Math.abs(Xt.offset.y)))return;Me(Je)}},dragEndHandler:function(Je){const rt=n.option("rotated"),Ct=Ve.options,Xt=Ve.actionData,On="touch"===Je.pointerType,Fn=xn=>{let{translator:Gn,startCoord:qn,curCoord:ii}=xn;return()=>[Gn.from(qn),Gn.from(ii)]},oi=(xn,Gn,qn)=>({curCoord:xn[qn],startCoord:Gn[qn]}),Yt=(xn,Gn)=>xn.zoom&&gx(Gn.curCoord-Gn.startCoord)>5,$t=Xt&&"pan"===Xt.action&&!Xt.fallback&&0===Xt.offset.x&&0===Xt.offset.y;if(Xt&&(!On||Ve.panningVisualRangeEnabled())&&!$t){if(!On&&Me(Je),"zoom"===Xt.action){const xn=V(Xt.curAxisRect,Je),Gn=oi(xn,Xt.startCoords,rt?"y":"x"),qn=oi(xn,Xt.startCoords,rt?"x":"y"),ii=Yt(Ct.argumentAxis,Gn)&&lS(Je,n._argumentAxes,Fn,!0,Gn,n.getArgumentAxis());(Yt(Ct.valueAxis,qn)&&lS(Je,Xt.valueAxes,Fn,!0,qn)||ii)&&n._requestChange(["VISUAL_RANGE"]),Xt.rect.dispose()}else"pan"===Xt.action&&m(Ve,"pan",Je,_e);Ve.actionData=null}},pinchStartHandler:function(Je){const rt=A(X(Je),"zoom");rt.cancel?Sy(Je):(Ve.actionData=rt,i(Ve,"zoom",Je))},pinchHandler:function(Je){Ve.actionData&&(r(Ve,"zoom",Je,(rt,Ct,Xt,On)=>X(rt)[Xt]-Ct.center[Xt]+(Ct.center[Xt]-Ct.center[Xt]*On),X),Me(Je))},pinchEndHandler:function(Je){Ve.actionData&&(m(Ve,"zoom",Je,(rt,Ct,Xt,On)=>Ct.center[Xt]-Ct.startCenter[Xt]+(Ct.startCenter[Xt]-Ct.startCenter[Xt]*On)),Ve.actionData=null)},mouseWheelHandler:function(Je){const rt=Ve.options,Ct=n.option("rotated"),Xt=Yt=>{let{translator:$t,coord:xn,scale:Gn,axis:qn}=Yt;return()=>{const ii=$t.zoom(-(xn-xn*Gn),Gn,qn.getZoomBounds());return{startValue:ii.min,endValue:ii.max}}},On=ce(Je);let oi,Fn=!1;if(rt.valueAxis.zoom){if(oi=n._valueAxes.filter(Yt=>B_(jh(Yt.getCanvas()),On)),0===oi.length){const Yt=n._valueAxes.reduce(($t,xn)=>(!$t&&xn.coordsIn(On.x,On.y)&&($t=xn.getCanvas()),$t),null);Yt&&(oi=n._valueAxes.filter($t=>B_(jh($t.getCanvas()),{x:Yt.left,y:Yt.top})))}Fn|=lS(Je,oi,Xt,Je.delta>0,{coord:Ct?On.x:On.y})}rt.argumentAxis.zoom&&(Fn|=n._argumentAxes.some($t=>!(!B_(jh($t.getCanvas()),On)&&!$t.coordsIn(On.x,On.y)))&&lS(Je,n._argumentAxes,Xt,Je.delta>0,{coord:Ct?On.y:On.x},n.getArgumentAxis())),Fn&&(n._requestChange(["VISUAL_RANGE"]),(oi&&VA(oi)||!oi&&Ve.panningVisualRangeEnabled())&&Me(Je))},cleanup:function(){e.root.off(Df),Ve.actionData&&Ve.actionData.rect&&Ve.actionData.rect.dispose(),Ve.actionData=null,e.root.css({"touch-action":""})},setup:function(Je){Ve.cleanup(),Je.argumentAxis.pan||e.root.on(NA,Sy),(!Je.argumentAxis.none||!Je.valueAxis.none)&&(Ve.options=Je,(Je.argumentAxis.zoom||Je.valueAxis.zoom)&&Je.allowMouseWheel&&e.root.on(Vb.U+Df,Ve.mouseWheelHandler),(Je.argumentAxis.zoom||Je.valueAxis.zoom)&&Je.allowTouchGestures&&e.root.on(hx,{passive:!1},Ve.pinchStartHandler).on(rN,{passive:!1},Ve.pinchHandler).on(sN,Ve.pinchEndHandler),e.root.on(VR,{immediate:!0,passive:!1},Ve.dragStartHandler).on(BA,{immediate:!0,passive:!1},Ve.dragHandler).on(oN,Ve.dragEndHandler),e.root.on(NA,function(rt){Ve.actionData={valueAxes:[],offset:{x:0,y:0},center:{x:0,y:0}},Me(rt),i(Ve,"pan",rt)}).on(aN,function(rt){Me(rt),r(Ve,"pan",rt,_e,Ct=>Ct.offset)}).on(HR,function(rt){Me(rt),m(Ve,"pan",rt,_e),Ve.actionData=null}))},panningVisualRangeEnabled:function(){return VA(n._valueAxes)||VA(n._argumentAxes)}};this._zoomAndPan=Ve},members:{_setupZoomAndPan:function(){this._zoomAndPan.setup(this._themeManager.getOptions("zoomAndPan"))}},dispose:function(){this._zoomAndPan.cleanup()},customize:function(n){n.addChange({code:"ZOOM_AND_PAN",handler:function(){this._setupZoomAndPan()},isThemeDependent:!0,isOptionChange:!0,option:"zoomAndPan"})}},jO=c.A.getDocument,fx="annotations",N_="."+fx,UA=(0,N.b4)([Si.A.down,Si.A.move],fx),O2=(0,N.b4)(Si.A.up,fx),GR=ul.ni+N_,lN=ul.Cy+N_,WR=ul._N+N_;function cS(n){return"string"==typeof n?{url:n}:n}const Yu={name:"annotations_chart",init(){},dispose(){},members:{_getAnnotationCoords(n){var e,t;const i={offsetX:n.offsetX,offsetY:n.offsetY},r=this._options.silent("rotated")?"y":"x",m=this._options.silent("rotated")?"x":"y",A=this.getArgumentAxis(),V=A.validateUnit(n.argument);let ce,X=this.getValueAxis(n.axis),_e=null===(e=X)||void 0===e?void 0:e.pane;var Me;if(n.series&&(ce=this.series.filter(Ct=>Ct.name===n.series)[0],X=null===(Me=ce)||void 0===Me?void 0:Me.getValueAxis(),(0,C.O9)(X)&&(_e=X.pane)),(0,C.O9)(V)){if(ce){const Ct=ce.getPointCenterByArg(V);Ct&&(i[r]=Ct[r])}else i[r]=A.getTranslator().translate(V);!(0,C.O9)(_e)&&(_e=A.pane)}const Ve=null===(t=X)||void 0===t?void 0:t.validateUnit(n.value);var Je,rt;return(0,C.O9)(Ve)&&(i[m]=null===(Je=X)||void 0===Je?void 0:Je.getTranslator().translate(Ve),!(0,C.O9)(_e)&&(0,C.O9)(X)&&(_e=X.pane)),i.canvas=this._getCanvasForPane(_e),(0,C.O9)(i[r])&&!(0,C.O9)(Ve)&&((0,C.O9)(X)||(0,C.O9)(ce)?(0,C.O9)(X)&&!(0,C.O9)(ce)?i[m]=this._argumentAxes.filter(Ct=>Ct.pane===X.pane)[0].getAxisPosition():null!==(rt=ce)&&void 0!==rt&&rt.checkSeriesViewportCoord(A,i[r])&&(i[m]=ce.getSeriesPairCoord(i[r],!0)):i[m]=A.getAxisPosition()),!(0,C.O9)(V)&&(0,C.O9)(i[m])&&((0,C.O9)(X)&&!(0,C.O9)(ce)?i[r]=X.getAxisPosition():(0,C.O9)(ce)&&ce.checkSeriesViewportCoord(X,i[m])&&(i[r]=ce.getSeriesPairCoord(i[m],!1))),i},_annotationsPointerEventHandler(n){if(this._disposed)return;const e=n.originalEvent||{},t=e.touches&&e.touches[0]||{},i=this._renderer.getRootOffset(),r={x:t.pageX||e.pageX||n.pageX,y:t.pageY||e.pageY||n.pageY},m=this._annotations.items.filter(A=>A.hitTest(r.x-i.left,r.y-i.top))[0];m&&m.options.tooltipEnabled?(this._clear(),m.options.allowDragging&&n.type===Si.A.down&&(this._annotations._hideToolTipForDrag=!0),this._annotations._hideToolTipForDrag||(m.showTooltip(this._annotations.tooltip,r),n.stopPropagation())):this._annotations.hideTooltip()},_isAnnotationBounded:n=>(0,C.O9)(n.value)||(0,C.O9)(n.argument),_pullOptions:n=>({type:n.type,name:n.name,x:n.x,y:n.y,value:n.value,argument:n.argument,axis:n.axis,series:n.series,options:n,offsetX:n.offsetX,offsetY:n.offsetY}),_forceAnnotationRender(){this._change(["FORCE_RENDER"])},_clear(){this.hideTooltip(),this.clearHover()}}},jR={name:"annotations_polar_chart",init(){},dispose(){},members:{_getAnnotationCoords(n){const e={offsetX:n.offsetX,offsetY:n.offsetY,canvas:this._calcCanvas()},t=this.getArgumentAxis();let i=t.validateUnit(n.argument);const r=this.getValueAxis().validateUnit(n.value),m=n.radius,A=n.angle;let V,X;return n.series&&(X=this.series.filter(ce=>ce.name===n.series)[0]),(0,_.X)(!0,e,this.getXYFromPolar(A,m,i,r)),(0,C.O9)(X)&&(!(0,C.O9)(e.angle)||(0,C.O9)(r)||(0,C.O9)(m)?(0,C.O9)(e.radius)&&!(0,C.O9)(i)&&!(0,C.O9)(A)&&(V=X.getSeriesPairCoord({radius:e.radius},!1)):((0,C.O9)(i)||(i=t.getTranslator().from(isFinite(A)?this.getActualAngle(A):e.angle)),V=X.getSeriesPairCoord({argument:i,angle:-e.angle},!0)),(0,C.O9)(V)&&(e.x=V.x,e.y=V.y)),n.series&&!(0,C.O9)(V)&&(e.x=e.y=void 0),e},_annotationsPointerEventHandler:Yu.members._annotationsPointerEventHandler,_isAnnotationBounded:Yu.members._isAnnotationBounded,_pullOptions(n){const e=(0,_.X)({},{radius:n.radius,angle:n.angle},Yu.members._pullOptions(n));return delete e.axis,e},_forceAnnotationRender:Yu.members._forceAnnotationRender,_clear:Yu.members._clear}},KR={name:"annotations_vector_map",init(){},dispose(){this._annotations._offTracker(),this._annotations._offTracker=null},members:{_getAnnotationCoords(n){const e={offsetX:n.offsetX,offsetY:n.offsetY};if(e.canvas=this._projection.getCanvas(),n.coordinates){const t=this._projection.toScreenPoint(n.coordinates);e.x=t[0],e.y=t[1]}return e},_annotationsPointerEventHandler:Yu.members._annotationsPointerEventHandler,_isAnnotationBounded:n=>(0,C.O9)(n.coordinates),_pullOptions(n){const e=(0,_.X)({},{coordinates:n.coordinates},Yu.members._pullOptions(n));return delete e.axis,delete e.series,delete e.argument,delete e.value,e},_forceAnnotationRender(){this._change(["EXTRA_ELEMENTS"])},_getAnnotationStyles:()=>({"text-anchor":"start"}),_clear(){}},extenders:{_prepareExtraElements(){const n=this,e=()=>{n._renderExtraElements()};n._annotations._offTracker=n._tracker.on({move:e,zoom:e,end:e})}}},XR={name:"annotations_pie_chart",init(){},dispose(){},members:{_getAnnotationCoords(n){let e;const t={offsetX:n.offsetX,offsetY:n.offsetY,canvas:this._canvas};if(n.argument){e=n.series?this.getSeriesByName(n.series):this.series[0];const i=e.getPointsByArg(n.argument)[0],{x:r,y:m}=i.getAnnotationCoords(n.location);t.x=r,t.y=m}return t},_isAnnotationBounded:n=>n.argument,_annotationsPointerEventHandler:Yu.members._annotationsPointerEventHandler,_pullOptions(n){const e=(0,_.X)({},{location:n.location},Yu.members._pullOptions(n));return delete e.axis,e},_clear:Yu.members._clear,_forceAnnotationRender:Yu.members._forceAnnotationRender}},F_={core:{name:"annotations_core",init(){this._annotations={items:[],_hideToolTipForDrag:!1,tooltip:new Jy({cssClass:`${this._rootClassPrefix}-annotation-tooltip`,eventTrigger:this._eventTrigger,widgetRoot:this.element(),widget:this}),hideTooltip(){this.tooltip.annotation=null,this.tooltip.hide()},clearItems(){this.items.forEach(n=>n.plaque.clear()),this.items=[]}},this._annotations.tooltip.setRendererOptions(this._getRendererOptions())},dispose(){this._annotationsGroup.linkRemove().linkOff(),L.A.off(jO(),N_),this._annotationsGroup.off(N_),this._annotations.tooltip&&this._annotations.tooltip.dispose()},extenders:{_createHtmlStructure(){this._annotationsGroup=this._renderer.g().attr({class:`${this._rootClassPrefix}-annotations`}).css(this._getAnnotationStyles()).linkOn(this._renderer.root,"annotations").linkAppend(),L.A.on(jO(),UA,n=>{this._disposed||this._annotations.tooltip.isCursorOnTooltip(n.pageX,n.pageY)||this._annotations.hideTooltip()}),L.A.on(jO(),O2,n=>{this._annotations._hideToolTipForDrag=!1,this._annotationsPointerEventHandler(n)}),this._annotationsGroup.on(UA,this._annotationsPointerEventHandler.bind(this))},_renderExtraElements(){this._annotationsGroup.clear(),this._annotations.items.forEach(n=>n.draw(this,this._annotationsGroup))},_stopCurrentHandling(){this._annotations.hideTooltip()}},members:{_buildAnnotations(){this._annotations.clearItems();const n=this._getOption("annotations",!0);null!=n&&n.length&&(this._annotations.items=function(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;const m=cS(t.image);return e.reduce((A,V)=>{const X=cS(V.image),ce=(0,C.Tn)(i)?i(V):{};ce&&(ce.image=cS(ce.image));const _e=(0,_.X)(!0,{},t,V,{image:m},{image:X},ce),Me=function cN(n,e){let t;return"text"===n.type?t=function(i,r){const m=e._renderer.text(i.text).attr({class:i.cssClass}).append({element:r});(i.width>0||i.height>0)&&m.setMaxSize(i.width,i.height,{wordWrap:i.wordWrap,textOverflow:i.textOverflow})}:"image"===n.type?t=function(i,r){const{width:m,height:A,url:V,location:X}=i.image||{},{width:ce,height:_e}=i,Me=ce>0?Math.min(m,ce):m,Ve=_e>0?Math.min(A,_e):A;e._renderer.image(0,0,Me,Ve,V,X||"center").append({element:r})}:"custom"===n.type&&(t=n.template),t}(_e,n),Ve=Me&&(0,_.X)(!0,r(_e),function $R(n,e){return{draw:function(t,i){const r=t._renderer.g().append(i).css(Ti(n.font));this.plaque&&this.plaque.clear(),this.plaque=new qx((0,_.X)(!0,{},n,{cornerRadius:(n.border||{}).cornerRadius}),t,r,e,t._isAnnotationBounded(n)),this.plaque.draw(t._getAnnotationCoords(this)),n.allowDragging&&r.on(GR,{immediate:!0},m=>{this._dragOffsetX=this.plaque.x-m.pageX,this._dragOffsetY=this.plaque.y-m.pageY}).on(lN,m=>{this.plaque.move(m.pageX+this._dragOffsetX,m.pageY+this._dragOffsetY)}).on(WR,m=>{this.offsetX=(this.offsetX||0)+m.offset.x,this.offsetY=(this.offsetY||0)+m.offset.y})},hitTest(t,i){return this.plaque.hitTest(t,i)},showTooltip(t,i){let{x:r,y:m}=i;const A=this,V=A.options;if(t.annotation!==A){t.setTemplate(V.tooltipTemplate);const X=ce=>{ce&&(t.annotation=A)};X(t.show(V,{x:r,y:m},{target:V},V.customizeTooltip,X))}else t.isCursorOnTooltip(r,m)||t.move(r,m)}}}(_e,n._getTemplate(Me)));return Ve&&A.push(Ve),A},[])}(this,n,this._getOption("commonAnnotationSettings"),this._getOption("customizeAnnotation",!0),this._pullOptions))},_setAnnotationTooltipOptions(){const n=(0,_.X)({},this._getOption("tooltip"));n.contentTemplate=n.customizeTooltip=void 0,this._annotations.tooltip.update(n)},_getAnnotationCoords:()=>({}),_pullOptions:()=>({}),_getAnnotationStyles:()=>({})},customize(n){n.addChange({code:"ANNOTATIONITEMS",handler(){this._requestChange(["ANNOTATIONS"])},isOptionChange:!0,option:"annotations"}),n.addChange({code:"ANNOTATIONSSETTINGS",handler(){this._requestChange(["ANNOTATIONS"])},isOptionChange:!0,option:"commonAnnotationSettings"}),n.addChange({code:"ANNOTATIONS",handler(){this._buildAnnotations(),this._setAnnotationTooltipOptions(),this._forceAnnotationRender()},isThemeDependent:!0,isOptionChange:!0})},fontFields:["commonAnnotationSettings.font"]},chart:Yu,polarChart:jR,vectorMap:KR,pieChart:XR},{round:oC,abs:KO,pow:zA,sqrt:uS}=Math,GA=Math.min,YR=.3;function XO(n){return n.getStackName()||n.getBarOverlapGroup()}function $A(n,e,t){var i,r;const m=[],A=[],V={},X=e.barGroupWidth,ce=null===(i=n[0])||void 0===i?void 0:i.getArgumentAxis();let _e;if(null!==(r=n[0])&&void 0!==r&&r.useAggregation()){var Me;const Je="datetime"===(null===(Me=n[0])||void 0===Me?void 0:Me.argumentType);let rt=ce.getTickInterval(),Ct=ce.getAggregationInterval();rt=Je?Tn.A.dateToMilliseconds(rt):rt,Ct=Je?Tn.A.dateToMilliseconds(Ct):Ct,_e=Ct<rt?Ct:rt}_e=ce?.getTranslator().getInterval(_e);const Ve=X?_e>X?X:_e:_e*(1-function hN(n){return n<0||n>1?YR:n}(e.barGroupPadding));n.forEach(function(Je,rt){const Ct=XO(Je)||rt.toString();let Xt;for(Xt in Je.pointsByArgument)-1===A.indexOf(Xt.valueOf())&&A.push(Xt.valueOf());-1===m.indexOf(Ct)&&(m.push(Ct),V[Ct]=[]),V[Ct].push(Je)}),A.forEach(function(Je){const rt=m.reduce((Xt,On)=>(function pN(n,e){return n.some(function(t){return!t.getOptions().ignoreEmptyPoints||t.getPointsByArg(e,!0).some(function(i){return i.hasValue()})})}(V[On],Je)&&Xt.push(On),Xt),[]),Ct=jA(Ve,rt.length);m.forEach(Xt=>{!function WA(n,e,t,i,r,m,A){n.forEach(function(V){const X=A(e.indexOf(i),e.length),ce=V.getPointsByArg(t,!0),_e=function uN(n){return n<0||n>1?void 0:n}(V.getOptions().barPadding),Me=V.getOptions().barWidth;let rt,Ve=ZR(X,r),Je=r.width;-1!==X&&(((0,C.O9)(_e)||(0,C.O9)(Me))&&(rt=jA(m,e.length,1-_e,Me),Je=rt.width,V.getBarOverlapGroup()||(Ve=ZR(X,rt))),function gN(n,e,t){(0,w.__)(n,function(i,r){r.correctCoordinates({width:e,offset:t})})}(ce,Je,Ve))})}(V[Xt],rt,Je,Xt,Ct,Ve,t)})})}function jA(n,e,t,i){let r,m;return i?(m=GA(i,n/e),r=e>1?oC((n-oC(m)*e)/(e-1)):0):(0,C.O9)(t)?(m=n*t/e,r=e>1?oC((n-n*t)/(e-1)):0):(r=oC(n/e*.2),m=(n-r*(e-1))/e),{width:m>1?oC(m):1,spacing:r,middleIndex:e/2,rawWidth:m}}function ZR(n,e){return(n-e.middleIndex+.5)*(e.rawWidth<1?e.rawWidth:e.width)-(e.middleIndex-n-.5)*e.spacing}function mx(n){return n.series.filter(function(e){return e.isVisible()})}function KA(n,e,t){return((n.positive[e]||{})[t]||0)+(-(n.negative[e]||{})[t]||0)}function QR(n){return n?function(e,t){return t-e-1}:function(e){return e}}function XA(n){return n[0]&&n[0].getArgumentAxis().getTranslator().isInverted()}function hS(){const n=mx(this);$A(n,this._options,QR(XA(n)))}function _x(){const n=this._options.negativesAsZeroes,e=mx(this),t={positive:{},negative:{}},i={left:{},right:{}},r={},m={};e.forEach(function(A){const V=XO(A);let X=!1;const ce=function JR(n){const e=n.getPoints();let t;for(let i=0;i<e.length;i++){const r=e[i];if(t=r.initialValue&&r.initialValue.valueOf(),KO(t)>0)break}return(0,ri._S)(t)}(A)<0?m:r;A._prevSeries=ce[V],ce[V]=A,A.holes=(0,_.X)(!0,{},i),A.getPoints().forEach(function(_e,Me,Ve){let Je=_e.initialValue&&_e.initialValue.valueOf(),rt=_e.argument.valueOf(),Ct=Je>=0?t.positive:t.negative;const Xt="bar"!==A.type;n&&Je<0&&(Ct=t.positive,Je=0,_e.resetValue()),Ct[V]=Ct[V]||{};const On=Ct[V];if(On[rt]?(Xt&&_e.correctValue(On[rt]),On[rt]+=Je):(On[rt]=Je,Xt&&_e.resetCorrection()),_e.hasValue())X&&(X=!1,i.left[rt]=(i.left[rt]||0)+(_e.value.valueOf()-(isFinite(_e.minValue)?_e.minValue.valueOf():0)),_e._skipSetLeftHole=!0);else{const Fn=Ve[Me-1];!X&&Fn&&Fn.hasValue()&&(rt=Fn.argument.valueOf(),Fn._skipSetRightHole=!0,i.right[rt]=(i.right[rt]||0)+(Fn.value.valueOf()-(isFinite(Fn.minValue)?Fn.minValue.valueOf():0))),X=!0}})}),e.forEach(function(A){const V=A.holes;A.getPoints().forEach(function(X){const ce=X.argument.valueOf();X.resetHoles(),!X._skipSetLeftHole&&X.setHole(V.left[ce]||i.left[ce]&&0,"left"),!X._skipSetRightHole&&X.setHole(V.right[ce]||i.right[ce]&&0,"right"),X._skipSetLeftHole=null,X._skipSetRightHole=null})}),this._stackKeepers=t,e.forEach(function(A){A.getPoints().forEach(function(V){const X=V.argument.valueOf(),ce=XO(A),_e=KA(t,ce,X),Me=function mN(n,e,t){return((n.positive[e]||{})[t]||0)+((n.negative[e]||{})[t]||0)}(t,ce,X);V.setPercentValue(_e,Me,i.left[X],i.right[X])})})}function YA(){const n=this,e=mx(n),t=n._stackKeepers,i={positive:{},negative:{}};(0,w.__)(e,function(r,m){const A=m.getOptions().minBarSize,V=m.getValueAxis().getTranslator(),X=A&&V.getMinBarSize(A),ce=m.getStackName();(0,w.__)(m.getPoints(),function(_e,Me){if(!Me.hasValue())return;let Ve=Me.initialValue&&Me.initialValue.valueOf();const Je=Me.argument.valueOf();n.fullStacked&&(Ve=Ve/KA(t,ce,Je)||0);const rt=V.checkMinBarSize(Ve,X,Me.value),Ct=function fN(n){return n>=0?"positive":"negative"}(rt),Xt=i[Ct][ce]=i[Ct][ce]||{};Xt[Je]?(Me.minValue=Xt[Je],Xt[Je]+=rt):Xt[Je]=rt,Me.value=Xt[Je]})}),n.fullStacked&&function qR(n,e){(0,w.__)(n,function(t,i){const r=i.getStackName?i.getStackName():"default";(0,w.__)(i.getPoints(),function(m,A){const V=KA(e,r,A.argument.valueOf());0!==V&&(A.value=A.value/V,(0,C.kf)(A.minValue)&&(A.minValue=A.minValue/V))})})}(e,i)}function e1(){const n=mx(this);(0,w.__)(n,function(e,t){const i=t.getOptions().minBarSize,r=t.getValueAxis().getTranslator(),m=i&&r.getMinBarSize(i);m&&(0,w.__)(t.getPoints(),function(A,V){V.hasValue()&&V.value.valueOf()-V.minValue.valueOf()<m&&(V.value=r.toValue(V.value.valueOf()+m/2),V.minValue=r.toValue(V.minValue.valueOf()-m/2))})})}function t1(){(0,w.__)(this.series,function(n,e){const t=e.getOptions().minBarSize,i=e.getValueAxis().getTranslator(),r=t&&i.getMinBarSize(t);r&&(0,w.__)(e.getPoints(),function(m,A){A.hasValue()&&(A.value=i.checkMinBarSize(A.initialValue,r))})})}function n1(){const n=mx(this);$A(n,{barGroupPadding:.3},QR(XA(n)))}function o1(){const n=mx(this);if(!n.length)return;const e=this._options,t=n[0].getArgumentAxis().getVisibleArea(),i=n[0].getValueAxis().getVisibleArea(),r=GA(t[1]-t[0],i[1]-i[0]),m=zA(e.minBubbleSize,2),A=zA(r*e.maxBubbleSize,2),V=(r*e.maxBubbleSize+e.minBubbleSize)/2;let _e,Me,Ve,X=1/0,ce=-1/0;(0,w.__)(n,function(Ct,Xt){(0,w.__)(Xt.getPoints(),function(On,Fn){ce=ce>Fn.size?ce:Fn.size,X=X<Fn.size?X:Fn.size})});const Je=ce-X,rt=KO(A-m);(0,w.__)(n,function(Ct,Xt){(0,w.__)(Xt.getPoints(),function(On,Fn){ce===X?_e=oC(V):(Ve=KO(Fn.size-X)/Je,Me=rt*Ve+m,_e=oC(uS(Me))),Fn.correctCoordinates(_e)})})}function pS(n){const e=this;switch(e.type=Wi(n.type),e.pane=n.pane,e.series=[],e.updateOptions(n),e.type){case"bar":e.adjustSeriesDimensions=hS,e.updateSeriesValues=t1,e.adjustSeriesValues=_x;break;case"rangebar":e.adjustSeriesDimensions=hS,e.updateSeriesValues=e1;break;case"fullstackedbar":e.fullStacked=!0,e.adjustSeriesDimensions=hS,e.adjustSeriesValues=_x,e.updateSeriesValues=YA;break;case"stackedbar":e.adjustSeriesDimensions=hS,e.adjustSeriesValues=_x,e.updateSeriesValues=YA;break;case"fullstackedarea":case"fullstackedline":case"fullstackedspline":case"fullstackedsplinearea":e.fullStacked=!0,e.adjustSeriesValues=_x;break;case"stackedarea":case"stackedsplinearea":case"stackedline":case"stackedspline":e.adjustSeriesValues=_x;break;case"candlestick":case"stock":e.adjustSeriesDimensions=n1;break;case"bubble":e.adjustSeriesDimensions=o1}}pS.prototype={constructor:pS,adjustSeriesDimensions:h.lQ,adjustSeriesValues:h.lQ,updateSeriesValues:h.lQ,updateOptions:function(n){this._options=n},dispose:function(){this.series=null},add:function(n){const e=this.type;this.series=ui(n,t=>t.type===e?t:null)}};const{isArray:Ey}=Array,vx="VISUAL_RANGE";function ZO(n){return Ey(n)?0===n.length?[{}]:n:[n]}function JA(n,e,t,i){let r,m;if(t){m=n.value,r={skipEventRising:!0};const A=qA(n.fullName,m);A&&(r={allowPartialUpdate:!0},m=A)}else m=((0,C.O9)(i)?n.value[i]:n.value).visualRange;e.visualRange(m,r)}function qA(n,e){const i=n.split(".").at(-1);if("endValue"===i||"startValue"===i)return{[i]:e}}const QO=ug.inherit({_fontFields:["commonAxisSettings.label.font","commonAxisSettings.title.font"],_partialOptionChangesMap:{visualRange:vx,_customVisualRange:vx,strips:"REFRESH_AXES",constantLines:"REFRESH_AXES"},_partialOptionChangesPath:{argumentAxis:["strips","constantLines","visualRange","_customVisualRange"],valueAxis:["strips","constantLines","visualRange","_customVisualRange"]},_initCore(){this._panesClipRects={},this.callBase()},_disposeCore(){const n=this._disposeObjectsInArray,e=this._panesClipRects;this.callBase(),n.call(e,"fixed"),n.call(e,"base"),n.call(e,"wide"),this._panesClipRects=null,this._labelsAxesGroup.linkOff(),this._labelsAxesGroup.dispose(),this._labelsAxesGroup=null},_dispose(){const n=this._disposeObjectsInArray;this.callBase(),this.panes=null,this._legend&&(this._legend.dispose(),this._legend=null),n.call(this,"panesBackground"),n.call(this,"seriesFamilies"),this._disposeAxes()},_createPanes(){this._cleanPanesClipRects("fixed"),this._cleanPanesClipRects("base"),this._cleanPanesClipRects("wide")},_cleanPanesClipRects(n){(this._panesClipRects[n]||[]).forEach(t=>{t?.dispose()}),this._panesClipRects[n]=[]},_getElementsClipRectID(n){const e=this._panesClipRects.fixed[this._getPaneIndex(n)];return e?.id},_getPaneIndex(n){const e=n||"default";return this.panes.findIndex(t=>t.name===e)},_updateSize(n){this.callBase(),n&&wM(this.__currentCanvas,this._canvas)&&(this.__currentCanvas=JT(this._canvas)),Ko(this._canvas)},_reinitAxes(){this.panes=this._createPanes(),this._populateAxes(),this._axesReinitialized=!0},_populateAxes(){const{panes:n}=this,e=this._isRotated(),t=ZO(this.option("argumentAxis")||{})[0],i=this.option("valueAxis"),r=ZO(i||{});let m=[];const A=[],V=[];let ce,X=0;const _e=this._getCrosshairMargins();function Me(){const Ve="defaultAxisName"+String(X);return X+=1,Ve}ce=e?"right"===t.position?n[n.length-1].name:n[0].name:"top"===t.position?n[0].name:n[n.length-1].name,m=ui(n,Ve=>this._populateAxesOptions("argumentAxis",t,{pane:Ve.name,name:null,optionPath:"argumentAxis",crosshairMargin:e?_e.x:_e.y},e,Ve.name!==ce)),r.forEach((Ve,Je)=>{var rt;let Ct=[];const{name:Xt}=Ve;Xt&&V.includes(Xt)?this._incidentOccurred("E2102"):(Xt&&V.push(Xt),Ve.pane&&Ct.push(Ve.pane),null!==(rt=Ve.panes)&&void 0!==rt&&rt.length&&(Ct=Ct.concat(Ve.panes.slice(0))),Ct=Ii(Ct),Ct.length||Ct.push(void 0),Ct.forEach(On=>{const Fn=Ey(i)?`valueAxis[${String(Je)}]`:"valueAxis";A.push(this._populateAxesOptions("valueAxis",Ve,{name:Xt||Me(),pane:On,priority:Je,optionPath:Fn,crosshairMargin:e?_e.y:_e.x},e))}))}),this._redesignAxes(m,!0,ce),this._redesignAxes(A,!1)},_redesignAxes(n,e,t){const i=[];let r=e?this._argumentAxes:this._valueAxes;n.forEach(m=>{var A;const V=null===(A=r)||void 0===A?void 0:A.filter(X=>X.name===m.name&&(!(0,C.O9)(m.pane)&&this.panes.some(ce=>ce.name===X.pane)||X.pane===m.pane));null!=V&&V.length?V.forEach(X=>{const ce=function a1(n,e,t){if(t)return{argumentAxisType:n.argumentAxisType,argumentType:n.argumentType};const{valueAxisType:i,valueType:r}=n.groups.find(m=>m.valueAxis===e);return{valueAxisType:i,valueType:r}}(this._groupsData,X,e);X.updateOptions(m),e?X.setTypes(ce.argumentAxisType,ce.argumentType,"argumentType"):X.setTypes(ce.valueAxisType,ce.valueType,"valueType"),X.validate(),i.push({axis:X})}):i.push({options:m})}),r?(0,w.iW)(r,(m,A)=>{i.some(V=>V.axis&&V.axis===A)||this._disposeAxis(m,e)}):r=e?this._argumentAxes=[]:this._valueAxes=[],i.forEach(m=>{let{axis:A}=m;m.axis&&e?m.axis.isVirtual=m.axis.pane!==t:m.options&&(A=this._createAxis(e,m.options,e?m.options.pane!==t:void 0),r.push(A)),A.applyVisualRangeSetter(this._getVisualRangeSetter())})},_disposeAxis(n,e){const t=e?this._argumentAxes:this._valueAxes,i=t[n];i&&(i.dispose(),t.splice(n,1))},_disposeAxes(){const n=this._disposeObjectsInArray;n.call(this,"_argumentAxes"),n.call(this,"_valueAxes")},_appendAdditionalSeriesGroups(){this._crosshairCursorGroup.linkAppend(),this._scrollBar&&this._scrollBarGroup.linkAppend()},_getLegendTargets(){return(this.series||[]).map(n=>{const e=this._getLegendOptions(n);return e.legendData.series=n,n.getOptions().showInLegend||(e.legendData.visible=!1),e})},_legendItemTextField:"name",_seriesPopulatedHandlerCore(){this._processSeriesFamilies(),this._processValueAxisFormat()},_renderTrackers(){for(let n=0;n<this.series.length;n+=1)this.series[n].drawTrackers()},_specialProcessSeries(){this._processSeriesFamilies()},_processSeriesFamilies(){var n;const e=[],t=[];let i;const r=this._themeManager,m=r.getOptions("negativesAsZeroes"),A=r.getOptions("negativesAsZeros"),V={minBubbleSize:r.getOptions("minBubbleSize"),maxBubbleSize:r.getOptions("maxBubbleSize"),barGroupPadding:r.getOptions("barGroupPadding"),barGroupWidth:r.getOptions("barGroupWidth"),negativesAsZeroes:(0,C.O9)(m)?m:A};null!==(n=this.seriesFamilies)&&void 0!==n&&n.length?this.seriesFamilies.forEach(X=>{X.updateOptions(V),X.adjustSeriesValues()}):(this.series.forEach(X=>{e.includes(X.type)||e.push(X.type)}),this._getLayoutTargets().forEach(X=>{i=this._getSeriesForPane(X.name),e.forEach(ce=>{const _e=new pS({type:ce,pane:X.name,minBubbleSize:V.minBubbleSize,maxBubbleSize:V.maxBubbleSize,barGroupPadding:V.barGroupPadding,barGroupWidth:V.barGroupWidth,negativesAsZeroes:V.negativesAsZeroes,rotated:this._isRotated()});_e.add(i),_e.adjustSeriesValues(),t.push(_e)})}),this.seriesFamilies=t)},_updateSeriesDimensions(){const n=this.seriesFamilies||[];for(let e=0;e<n.length;e+=1){const t=n[e];t.updateSeriesValues(),t.adjustSeriesDimensions()}},_getLegendCallBack(n){var e;return null===(e=this._legend)||void 0===e?void 0:e.getActionCallback(n)},_appendAxesGroups(){this._stripsGroup.linkAppend(),this._gridGroup.linkAppend(),this._axesGroup.linkAppend(),this._labelsAxesGroup.linkAppend(),this._constantLinesGroup.linkAppend(),this._stripLabelAxesGroup.linkAppend(),this._scaleBreaksGroup.linkAppend()},_populateMarginOptions(){const n=function QA(n,e,t,i){return Math.min(i?n.width/e:n.width,i?n.height:n.height/e)*t}(this.getSize(),this.panes.length,this._themeManager.getOptions("maxBubbleSize"),this._isRotated());let e={};this._valueAxes.forEach(t=>{const i=this.series.filter(m=>m.getValueAxis()===t);let r={};i.forEach(m=>{if(m.isVisible()){const A=function s1(n,e){return n.processBubbleSize&&(n.size=e),n}(m.getMarginOptions(),n);r=ko(r,A),e=ko(e,A)}}),t.setMarginOptions(r)}),this._argumentAxes.forEach(t=>t.setMarginOptions(e))},_populateBusinessRange(n,e){const t=this._isRotated(),i=this._getVisibleSeries(),r={},m=new Bl({rotated:!!t}),A=V=>V.pane||"default";if(this.panes.forEach(V=>{r[V.name]=new Bl({rotated:!!t})}),this._valueAxes.forEach(V=>{const X=new Bl({rotated:!!t,pane:V.pane,axis:V.name}),ce=i.filter(_e=>_e.getValueAxis()===V);ce.forEach(_e=>{const Me=_e.getRangeData();X.addRange(Me.val),r[A(V)].addRange(Me.arg)}),(!n||n&&ce.length&&V===n)&&(V.setGroupSeries(ce),V.setBusinessRange(X,this._axesReinitialized||e,this._argumentAxes[0]._lastVisualRangeUpdateMode))}),!n||n&&i.length){Object.keys(r).forEach(X=>m.addRange(r[X]));const V=m.interval;this._argumentAxes.forEach(X=>{const ce=r[A(X)].interval??V;X.setBusinessRange(new Bl((0,Lo.A)({},m,{interval:ce})),this._axesReinitialized,void 0,this._groupsData.categories)})}this._populateMarginOptions()},getArgumentAxis(){return(this._argumentAxes||[]).find(n=>!n.isVirtual)},getValueAxis(n){return(this._valueAxes||[]).find((0,C.O9)(n)?e=>e.name===n:e=>e.pane===this.defaultPane)},_getGroupsData(){const n=[];return this._valueAxes.forEach(e=>{n.push({series:this.series.filter(t=>t.getValueAxis()===e),valueAxis:e,valueOptions:e.getOptions()})}),{groups:n,argumentAxes:this._argumentAxes,argumentOptions:this._argumentAxes[0].getOptions()}},_groupSeries(){this._correctValueAxes(!1),this._groupsData=this._getGroupsData()},_processValueAxisFormat(){const n=[];this.series.forEach(e=>{const t=e.getValueAxis();e.isFullStackedSeries()&&(t.setPercentLabelFormat(),n.push(t))}),this._valueAxes.forEach(e=>{n.includes(e)||e.resetAutoLabelFormat()})},_populateAxesOptions(n,e,t,i,r){const m=this._prepareStripsAndConstantLines(n,e,i),A=(0,_.X)(!0,{},m,t,this._prepareAxisOptions(n,m,i));return r&&(A.visible=!1,A.tick.visible=!1,A.minorTick.visible=!1,A.label.visible=!1,A.title={}),A},_getValFilter:n=>tm.getViewPortFilter(n.getValueAxis().visualRange()||{}),_createAxis(n,e,t){const r=(0,_.X)({renderer:this._renderer,incidentOccurred:this._incidentOccurred,eventTrigger:this._eventTrigger,axisClass:n?"arg":"val",widgetClass:"dxc",stripsGroup:this._stripsGroup,stripLabelAxesGroup:this._stripLabelAxesGroup,constantLinesGroup:this._constantLinesGroup,scaleBreaksGroup:this._scaleBreaksGroup,axesContainerGroup:this._axesGroup,labelsAxesGroup:this._labelsAxesGroup,gridGroup:this._gridGroup,isArgumentAxis:n,getTemplate:A=>this._getTemplate(A)},this._getAxisRenderingOptions(n?"argumentAxis":"valueAxis")),m=new Tp(r);return m.updateOptions(e),m.isVirtual=t,m},_applyVisualRangeByVirtualAxes:()=>!1,_applyCustomVisualRangeOption(n,e){n.getOptions().optionPath&&this._parseVisualRangeOption(`${n.getOptions().optionPath}.visualRange`,e)},_getVisualRangeSetter(){return(n,e)=>{let{skipEventRising:t,range:i}=e;this._applyCustomVisualRangeOption(n,i),n.setCustomVisualRange(i),n.skipEventRising=t,this._applyVisualRangeByVirtualAxes(n,i)||(this._applyingChanges?this._change_VISUAL_RANGE():this._requestChange([vx]))}},_getTrackerSettings(){return(0,_.X)(this.callBase(),{argumentAxis:this.getArgumentAxis()})},_prepareStripsAndConstantLines(n,e,t){return(e=this._themeManager.getOptions(n,e,t)).strips&&e.strips.forEach((i,r)=>{e.strips[r]=(0,_.X)(!0,{},e.stripStyle,i)}),e.constantLines&&e.constantLines.forEach((i,r)=>{e.constantLines[r]=(0,_.X)(!0,{},e.constantLineStyle,i)}),e},refresh(){this._disposeAxes(),this.callBase()},_layoutAxes(n){n();const e=this.checkForMoreSpaceForPanesCanvas();if(e){const t=this._rect.slice(),i=this._layout.backward(t,t,[e.width,e.height]);e.width=Math.max(0,i[0]),e.height=Math.max(0,i[1]),this._canvas=this._createCanvasFromRect(t),n(e)}},checkForMoreSpaceForPanesCanvas(){return this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),this._isRotated())},_parseVisualRangeOption(n,e){const t=n.split(/[.[]/)[0];let i=n.match(/\d+/g);i=(0,C.O9)(i)?parseInt(i[0],10):i,n.indexOf("visualRange")>0?("object"!==(0,C.NW)(e)&&(e=qA(n,e)??e),this._setCustomVisualRange(t,i,e)):("object"===(0,C.NW)(e)||Ey(e))&&t.indexOf("Axis")>0&&JSON.stringify(e).indexOf("visualRange")>0&&((0,C.O9)(e.visualRange)?this._setCustomVisualRange(t,i,e.visualRange):Ey(e)&&e.forEach((r,m)=>{(0,C.O9)(r.visualRange)&&this._setCustomVisualRange(t,m,r.visualRange)}))},_setCustomVisualRange(n,e,t){const i=this._options.silent(n);i&&((0,C.O9)(e)?i[e]._customVisualRange=t:i._customVisualRange=t,this._axesReinitialized=!0)},_raiseZoomEndHandlers(){this._valueAxes.forEach(n=>n.handleZoomEnd())},_setOptionsByReference(){this.callBase(),(0,_.X)(this._optionsByReference,{"valueAxis.visualRange":!0})},_notifyOptionChanged(n,e){this.callBase.apply(this,arguments),this._optionChangedLocker||this._parseVisualRangeOption(n,e)},_notifyVisualRange(){this._valueAxes.forEach(n=>{const e=n.getOptions().optionPath;if(e){const t=`${e}.visualRange`,i=Jr(n.visualRange(),!Ey(this.option(t)));n.skipEventRising&&an(i,this.option(t))?n.skipEventRising=null:this.option(e)||"valueAxis"===e?this.option(t,i):this.option(e,{name:n.name,visualRange:i})}})},_notify(){this.callBase(),this._axesReinitialized=!1,!0!==this.option("disableTwoWayBinding")&&(this.skipOptionsRollBack=!0,this._notifyVisualRange(),this.skipOptionsRollBack=!1)},_getAxesForScaling(){return this._valueAxes},_getAxesByOptionPath(n,e,t){const i=this._getAxesForScaling();let r=[];if(e){let m;n.fullName&&(m=n.fullName.slice(0,n.fullName.indexOf("."))),r=i.filter(A=>A.getOptions().optionPath===m)}else"object"===(0,C.NW)(n.value)?r=i.filter(m=>m.getOptions().optionPath===n.name):Ey(n.value)&&n.value.forEach((m,A)=>{const V=i.filter(X=>X.getOptions().optionPath===`${n.name}[${A}]`)[0];(0,C.O9)(m[t])&&(0,C.O9)(V)&&(r[A]=V)});return r},_optionChanged(n){if(!this._optionChangedLocker){const e="visualRange";let t;const i=n.fullName.indexOf(e)>0||!(this.getPartialChangeOptionsName(n).indexOf(e)>-1)&&void 0;(0,C.O9)(i)&&(t=this._getAxesByOptionPath(n,i,e),t&&(t.length>1||Ey(n.value)?t.forEach((r,m)=>JA(n,r,i,m)):1===t.length&&JA(n,t[0],i)))}this.callBase(n)},_change_VISUAL_RANGE(){if(this._recreateSizeDependentObjects(!1),!this._changes.has("FULL_RENDER")){const n=this.option("resizePanesOnZoom");this._doRender({force:!0,drawTitle:!1,drawLegend:!1,adjustAxes:n??(this.option("adjustAxesOnZoom")||!1),animate:!1}),this._raiseZoomEndHandlers()}},resetVisualRange(){this._valueAxes.forEach(n=>{n.resetVisualRange(!1),this._applyCustomVisualRangeOption(n)}),this._requestChange([vx])},_getCrosshairMargins:()=>({x:0,y:0}),_legendDataField:"series",_adjustSeriesLabels:h.lQ,_correctValueAxes:h.lQ}),l1=[{name:"default",border:{}}],gS="discrete",{isArray:fS}=Array;function JO(n,e,t){const i=n.getOptions().grid,r=n.getOptions().minorGrid;i.visible=e,r&&(r.visible=t)}function iI(n,e,t){return t.find(r=>r.name===e&&r.pane===n)||(n?iI(void 0,e,t):void 0)}function oI(n,e){return n.priority-e.priority}function c1(n,e){let t=!1;return(0,w.__)(n,(i,r)=>{if(r.name===e)return t=!0,!1}),t}function Cx(n,e,t,i){const r=e[n]||0,m=t[n]||0;return r+m+(r&&m?i:0)}function Kh(n,e,t){return d1(e[n],t[n])}function d1(n,e){return Math.max(n||0,e||0)}function mS(n){return n.getMargins()}function qO(n,e){return n.reduce((t,i)=>{var r;const m=e(i),A=t.panes[i.pane]=t.panes[i.pane]||{},V=i.getMultipleAxesSpacing();A.top=Cx("top",A,m,V),A.bottom=Cx("bottom",A,m,V),A.left=Kh("left",A,m),A.right=Kh("right",A,m),t.top=Kh("top",A,t),t.bottom=Kh("bottom",A,t),t.left=Kh("left",A,t),t.right=Kh("right",A,t);const X=null===(r=i.getOrthogonalAxis)||void 0===r?void 0:r.call(i);return X?.customPositionIsAvailable()&&(!i.customPositionIsBoundaryOrthogonalAxis()||!X.customPositionEqualsToPredefined())&&(t[X.getResolvedBoundaryPosition()]=0),t},{panes:{}})}function V_(n){return n.reduce((e,t)=>{const i=t.getMargins(),r=e.panes[t.pane]=e.panes[t.pane]||{},m=t.getMultipleAxesSpacing();return r.top=Kh("top",r,i),r.bottom=Kh("bottom",r,i),r.left=Cx("left",r,i,m),r.right=Cx("right",r,i,m),e.top=Kh("top",r,e),e.bottom=Kh("bottom",r,e),e.left=Kh("left",r,e),e.right=Kh("right",r,e),e},{panes:{}})}function ta(n,e,t,i,r){n.forEach(m=>{m[e](t?.[m.pane],i?.[m.pane]||i,r)})}function ew(n,e,t,i,r){function m(_e,Me,Ve){return((n?["left","right"]:["top","bottom"]).includes(_e)?Me.panes[Ve]||{}:Me)[_e]}function A(_e,Me,Ve,Je){return d1(m(_e,Me,Je),m(_e,Ve,Je))}const V=_e=>`original${_e[0].toUpperCase()}${_e.slice(1)}`;function X(_e,Me,Ve,Je,rt,Ct){(Me=Me.sort((Yt,$t)=>_e[$t][Je]-_e[Yt][Je])).forEach(Yt=>{const $t=_e[Yt];Ct.forEach(xn=>{$t[xn]=$t[V(xn)]+A(xn,i,r,Yt)})});const Xt=_e[Me[0]],On=Xt[Ve]-Xt[V(rt)]-_e[Me.at(-1)][V(Je)];let Fn=Me.reduce((Yt,$t)=>Yt-A(Je,i,r,$t)-A(rt,i,r,$t),On)-10*(Me.length-1);Fn-=Object.keys(t).reduce((Yt,$t)=>Yt+(Gr(t[$t])?0:t[$t].height),0);const oi=Xt[Ve]-Xt[V(rt)]-(Fn<0?Fn:0);Me.reduce((Yt,$t)=>{const xn=_e[$t],Gn=t[$t];return Yt-=A(rt,i,r,$t),xn[rt]=Xt[Ve]-Yt,Yt-=Gr(Gn)?Math.floor(Fn*Gn.height):Gn.height,xn[Je]=Yt,Yt-(A(Je,i,r,$t)+10)},oi)}const ce=Object.keys(e);return n?X(e,ce,"width","left","right",["top","bottom"]):X(e,ce,"height","top","bottom",["left","right"]),e}function yx(n,e,t,i){e&&(ta(n,"createTicks",t),function(n){(0,w.__)(function zB(n){const e={};return n.forEach(t=>{const i=t.pane;e[i]||(e[i]=[]),e[i].push(t)}),e}(n),function(e,t){let i,r;if(t.length>1){if(i=function Sm(n){return n.reduce(function(e,t){const i=t.getTicksValues(),r=i.majorTicksValues,m=t.getOptions(),A=t.getTranslator().getBusinessRange(),V=t.getVisibleArea();let X,ce=t._tickInterval;const _e=m.synchronizedValue,Me=t.getViewport().action;if(r&&r.length>0&&(0,C.kf)(r[0])&&"discrete"!==m.type&&!A.isEmpty()&&(!A.breaks||!A.breaks.length)&&"zoom"!==Me&&"pan"!==Me){t.applyMargins();const Ve=t.getTranslator().from(V[0]),Je=t.getTranslator().from(V[1]);let rt=Ve<Je?Ve:Je,Ct=Ve<Je?Je:Ve;rt===Ct&&(0,C.O9)(_e)&&(ce=xA(r[0]-_e)||1,rt=r[0]-ce,Ct=r[0]+ce),X={axis:t,isLogarithmic:"logarithmic"===m.type,logarithmicBase:A.base,tickValues:r,minorValues:i.minorTicksValues,minorTickInterval:t._minorTickInterval,minValue:rt,oldMinValue:rt,maxValue:Ct,oldMaxValue:Ct,inverted:A.invert,tickInterval:ce,synchronizedValue:_e},SA(X,GB(t.getTranslator().getBusinessRange())),e.push(X)}return e},[])}(t),i.length<2||!HO(i))return;(function Em(n){const e=n.reduce((t,i)=>oS(t,i.tickValues.length),0);n.forEach(t=>{let i,r,m=0;const A=t.synchronizedValue,V=t.tickValues,X=t.tickInterval;if((0,C.O9)(A))t.baseTickValue=t.invertedBaseTickValue=A,t.tickValues=[t.baseTickValue];else{if(V.length>1&&X){for(i=xy((e+1)/V.length),r=i>1?xy((e+1)/i):e,m=xy((r-V.length)/2);m>0&&0!==V[0];)V.unshift((0,ri.Ai)(V[0]-X)),m--;for(;V.length<r;)V.push((0,ri.Ai)(V[V.length-1]+X));t.tickInterval=X/i}t.baseTickValue=V[0],t.invertedBaseTickValue=V[V.length-1]}})})(i),function cx(n){const e=HO(n),t=e.tickInterval;n.forEach(i=>{let r,m,A,V;i!==e&&(t&&i.tickInterval&&(i.stubData&&(0,C.O9)(i.synchronizedValue)&&(i.oldMinValue=i.minValue=i.baseTickValue-(e.baseTickValue-e.minValue)/t*i.tickInterval,i.oldMaxValue=i.maxValue=i.baseTickValue-(e.baseTickValue-e.maxValue)/t*i.tickInterval),r=t/R_(e)/i.tickInterval*R_(i),i.maxValue=i.minValue+R_(i)/r),A=e.inverted&&!i.inverted||!e.inverted&&i.inverted?e.maxValue-e.invertedBaseTickValue:e.baseTickValue-e.minValue,V=R_(i),m=(A/R_(e)-(i.baseTickValue-i.minValue)/V)*V,i.minValue-=m,i.maxValue-=m)})}(i),r=function f2(n){let e,t,i=0,r=0;return n.forEach(m=>{const A=m.inverted;e=m.minValue>m.oldMinValue?(m.minValue-m.oldMinValue)/R_(m):0,t=m.maxValue<m.oldMaxValue?(m.oldMaxValue-m.maxValue)/R_(m):0,i=oS(i,A?t:e),r=oS(r,A?e:t)}),{start:i,end:r}}(i),r=function WB(n,e){return function nC(n){let e=!0,t=!0;return n.forEach(i=>{(i.oldMinValue>0||i.oldMaxValue>0)&&(t=!1),(i.oldMinValue<0||i.oldMaxValue<0)&&(e=!1)}),e||t}(n)?n.reduce((t,i)=>{const r=i.inverted,{start:m,end:A}=i.axis.getCorrectedValuesToZero(i.minValue,i.maxValue);return(0,C.O9)(m)||(0,C.O9)(A)?r?{start:t.start,end:Math.min(t.end,A)}:{start:Math.min(t.start,m),end:t.end}:t},e):e}(i,r),function EA(n,e){n.forEach(t=>{const i=R_(t),r=t.inverted;t.minValue=(0,ri.Ai)(t.minValue-e[r?"end":"start"]*i),t.maxValue=(0,ri.Ai)(t.maxValue+e[r?"start":"end"]*i)})}(i,r),function wR(n){const e=[];let t;n.forEach(i=>{i.oldMaxValue-i.oldMinValue==0?e.push(i):!(0,C.O9)(t)&&!(0,C.O9)(i.synchronizedValue)&&(t=xA((i.maxValue-i.minValue)/(i.tickValues[xy(i.tickValues.length/2)]-i.minValue||i.maxValue)))}),(0,C.O9)(t)&&e.forEach(i=>{const r=i.tickValues[0],m=r*t;r>0?(i.maxValue=m,i.minValue=0):r<0&&(i.minValue=m,i.maxValue=0)})}(i),function UO(n){let e=!1;n.forEach(t=>{e=e||(0,C.O9)(t.synchronizedValue)}),n.forEach(t=>{const i=t.tickInterval,r=t.tickValues,m=t.maxValue,A=t.minValue;let V;if(e&&i){for(;(V=(0,ri.Ai)(r[0]-i))>=A;)r.unshift(V);for(V=r[r.length-1];(V=(0,ri.Ai)(V+i))<=m;)r.push(V)}for(;r[0]+i/10<A;)r.shift();for(;r[r.length-1]-i/10>m;)r.pop()})}(i),function TR(n){n.forEach(function(e){if(!e.minorTickInterval)return;const t=[],i=e.minorTickInterval,r=e.tickInterval/i-1;for(let m=1;m<e.tickValues.length;m++){let A=e.tickValues[m-1];for(let V=0;V<r;V++)A+=i,t.push(A)}e.minorValues=t})}(i),i.forEach(m=>{SA(m,OR(m.axis.getTranslator().getBusinessRange()))}),function OA(n){n.forEach(e=>{const t=e.axis,i=t.getTranslator().getBusinessRange();i.min===i.minVisible&&(i.min=e.minValue),i.max===i.maxVisible&&(i.max=e.maxValue),i.minVisible=e.minValue,i.maxVisible=e.maxValue,i.min>i.minVisible&&(i.min=i.minVisible),i.max<i.maxVisible&&(i.max=i.maxVisible),t.getTranslator().updateBusinessRange(i),t.setTicks({majorTicks:e.tickValues,minorTicks:e.minorValues})})}(i)}})}(n)),ta(n,"draw",!e&&t,i)}function _S(n,e){const t={};return function(i){if(!i.customPositionIsAvailable()||i.customPositionEqualsToPredefined()){const r=t[i.pane]=t[i.pane]||{top:0,left:0,bottom:0,right:0},m=i.getMultipleAxesSpacing(),A=i.getMargins();i.shift(r),r[n]=Cx(n,r,A,m),r[e]=Cx(e,r,A,m)}else i.shift({top:0,left:0,bottom:0,right:0})}}function vS(n,e){let i,t=0;return Object.keys(e.panes).forEach(r=>{i=e.panes[r],t+="height"===n?i.top+i.bottom:i.left+i.right}),t}function CN(n,e,t,i){let r=0;n[e]>0&&(r=vS(e,i(t,mS)),ta(t,"hideTitle"),n[e]-=r-vS(e,i(t,mS))),n[e]>0&&ta(t,"hideOuterElements")}const h1=(n,e,t)=>e.x-t<=n.x&&e.x+t>=n.x&&e.y-t<=n.y&&e.y+t>=n.y,tw=(n,e,t)=>{const i=n.getOptions().size/2;for(let r=0;r<e.length;r+=1)if((t||e[r].x!==n.x||e[r].y!==n.y)&&h1(n,e[r],i))return!0;return!1},bx=QO.inherit({_themeSection:"chart",_fontFields:["crosshair.label.font"],_initCore(){this.paneAxis={},this.callBase()},_init(){this._containerInitialHeight=(0,gr.Vd)()?(0,D.Oq)(this._$element):0,this.callBase()},_correctAxes(){this._correctValueAxes(!0)},_setDeprecatedOptions(){this.callBase(),(0,_.X)(this._deprecatedOptions,{"argumentAxis.aggregateByCategory":{since:"23.1",message:"Use the aggregation.enabled property"}})},_getExtraOptions:h.lQ,_createPanes(){let t,n=this.option("panes"),e=0;return(!n||fS(n)&&!n.length)&&(n=l1),this.callBase(),t=this.option("defaultPane"),n=(0,_.X)(!0,[],fS(n)?n:[n]),(0,w.__)(n,(i,r)=>{r.name=(0,C.O9)(r.name)?r.name:"default"+e++}),(0,C.O9)(t)?c1(n,t)||(this._incidentOccurred("W2101",[t]),t=n[n.length-1].name):t=n[n.length-1].name,this.defaultPane=t,n=this._isRotated()?n.reverse():n,n},_getAxisRenderingOptions:()=>({axisType:"xyAxes",drawingType:"linear"}),_prepareAxisOptions(n,e,t){return{isHorizontal:"argumentAxis"===n!==t,containerColor:this._themeManager.getOptions("containerBackgroundColor")}},_checkPaneName(n){const e=ui(this.panes,t=>t.name);return n.pane=n.pane||this.defaultPane,e.includes(n.pane)},_initCustomPositioningAxes(){const n=this.getArgumentAxis(),e=n.getOptions().customPositionAxis,t=this._valueAxes.find(i=>i.pane===n.pane&&(!e||e===i.name));this._valueAxes.forEach(i=>{n!==i.getOrthogonalAxis()&&(i.getOrthogonalAxis=()=>n,i.customPositionIsBoundaryOrthogonalAxis=()=>n.customPositionIsBoundary())}),(0,C.O9)(t)&&t!==n.getOrthogonalAxis()?(n.getOrthogonalAxis=()=>t,n.customPositionIsBoundaryOrthogonalAxis=()=>this._valueAxes.some(i=>i.customPositionIsBoundary())):(0,C.O9)(n.getOrthogonalAxis())&&!(0,C.O9)(t)&&(n.getOrthogonalAxis=h.lQ)},_getAllAxes(){return this._argumentAxes.concat(this._valueAxes)},_resetAxesAnimation(n,e){let t;t=(0,C.O9)(e)?e^this._isRotated()?this._argumentAxes:this._valueAxes:this._getAllAxes(),t.forEach(i=>{i.resetApplyingAnimation(n)})},_axesBoundaryPositioning(){const n=this._getAllAxes();let e=!1;return n.forEach(t=>{if(!t.customPositionIsAvailable())return;const i=t.customPositionIsBoundary();t._customBoundaryPosition=t.getCustomBoundaryPosition(),e=e||i!==t.customPositionIsBoundary()}),e},_getCrosshairMargins(){const n=this._getCrosshairOptions()||{},e=n.enabled,t=function CA(){return{x:VO,y:vA}}(),i=(0,_.X)(!0,{},n.label,n.horizontalLine.label),r=(0,_.X)(!0,{},n.label,n.verticalLine.label);return{x:e&&n.horizontalLine.visible&&i.visible?t.x:0,y:e&&n.verticalLine.visible&&r.visible?t.y:0}},_getValueAxis(n,e){const t=this._valueAxes,i=this.option("valueAxis")||{},r=fS(i)?i:[i],m=this._isRotated(),A=this._getCrosshairMargins();let V,X;return e=e||function vN(n,e,t){let i;for(let r=0;r<n.length;r+=1)if(n[r].pane===e||void 0===n[r].pane&&e===t){i=n[r].name;break}return i||(i=n[0].name),i}(t,n,this.defaultPane),X=iI(n,e,t),X||(V=function nI(n,e,t){let i,r;for(r=0;r<e.length;r+=1)if(e[r].name===t){i=e[r],i.priority=r;break}if(!i)for(r=0;r<n.length;r+=1)if(n[r].name===t){i=n[r].getOptions(),i.priority=n[r].priority;break}return i}(t,r,e),V||(this._incidentOccurred("W2102",[e]),V={name:e,priority:t.length}),X=this._createAxis(!1,this._populateAxesOptions("valueAxis",V,{pane:n,name:e,optionPath:fS(i)?`valueAxis[${V.priority}]`:"valueAxis",crosshairMargin:m?A.y:A.x},m)),X.applyVisualRangeSetter(this._getVisualRangeSetter()),t.push(X)),X.setPane(n),X},_correctValueAxes(n){const e=this._themeManager.getOptions("synchronizeMultiAxes"),t=this._valueAxes,i={};this.series.forEach(m=>{const A=m.getValueAxis();i[A.pane]=!0}),this.panes.forEach(m=>{const A=m.name;i[A]||this._getValueAxis(A),n&&e&&function tI(n){let e=!1;const t=[],i=n.some(m=>{const A=m.getOptions().minorGrid;return A?.visible}),r=n.some(m=>{const A=m.getOptions().grid;return A?.visible});n.length>1&&(n.forEach(m=>{const A=m.getOptions().grid;e?JO(m,!1,!1):null!=A&&A.visible&&(m.getTranslator().getBusinessRange().isEmpty()?(JO(m,!1,!1),t.push(m)):(e=!0,JO(m,r,i)))}),!e&&t.length&&JO(t[0],r,i))}(t.filter(V=>V.pane===A))}),this._valueAxes=t.filter(m=>{m.pane||m.setPane(this.defaultPane);const A=c1(this.panes,m.pane);return A||(m.dispose(),m=null),A}).sort(oI);const r=this.getValueAxis();this._valueAxes.forEach(m=>{const{optionPath:A}=m.getOptions();if(A){const V=this._valueAxes.filter(X=>X.getOptions().optionPath===A);V.length>1&&(V.some(X=>X===r)?V.forEach(X=>{X!==r&&(X.getOptions().optionPath=null)}):V.forEach((X,ce)=>{0!==ce&&(X.getOptions().optionPath=null)}))}})},_getSeriesForPane(n){const e=[];return(0,w.__)(this.series,(t,i)=>{i.pane===n&&e.push(i)}),e},_createPanesBorderOptions(){const n=this._themeManager.getOptions("commonPaneSettings").border,e={};return this.panes.forEach(t=>{e[t.name]=(0,_.X)(!0,{},n,t.border)}),e},_createScrollBar(){const n=this._themeManager.getOptions("scrollBar")||{},e=this._scrollBarGroup;var t;n.visible?(n.rotated=this._isRotated(),this._scrollBar=(this._scrollBar||new vh(this._renderer,e)).update(n)):(e.linkRemove(),null===(t=this._scrollBar)||void 0===t||t.dispose(),this._scrollBar=null)},_executeAppendAfterSeries(n){n()},_prepareToRender(){const n=this._createPanesBorderOptions();return this._createPanesBackground(),this._appendAxesGroups(),this._adjustViewport(),n},_adjustViewport(){this._themeManager.getOptions("adjustOnZoom")&&this._valueAxes.forEach(e=>e.adjust())},_recreateSizeDependentObjects(n){const e=this._getVisibleSeries(),t=e.some(r=>r.useAggregation()),i=this._isZooming();t&&(this._argumentAxes.forEach(r=>{r.updateCanvas(this._canvas,!0)}),e.forEach(r=>{r.useAggregation()&&(n||i||!r._useAllAggregatedPoints)&&r.createPoints()}),this._processSeriesFamilies())},_isZooming(){const n=this.getArgumentAxis();if(null==n||!n.getTranslator())return!1;const e=n.getTranslator().getBusinessRange(),t=n.getViewport();let i=t?t.min:0,r=t?t.max:0;"logarithmic"===e.axisType&&(i=Ei(i,e.base),r=Ei(r,e.base));const m=e.axisType===gS?fr(e.categories,i,r).categories.length:Math.abs(r-i);let A=(0,ri.XV)(m);A=A>1?10**(A-2):1;const V=Math.round((this._zoomLength-m)*A)/A!=0;return this._zoomLength=m,V},_handleSeriesDataUpdated(){const n=new Bl;this.series.forEach(e=>{n.addRange(e.getArgumentRange())}),this._argumentAxes.forEach(e=>{e.updateCanvas(this._canvas,!0),e.setBusinessRange(n,this._axesReinitialized)}),this.callBase()},_isLegendInside(){return this._legend&&"inside"===this._legend.getPosition()},_isRotated(){return this._themeManager.getOptions("rotated")},_getLayoutTargets(){return this.panes},_applyClipRects(n){this._drawPanesBorders(n),this._createClipRectsForPanes(),this._applyClipRectsForAxes(),this._fillPanesBackground()},_updateLegendPosition(n,e){if(n.drawLegend&&this._legend&&e){const{panes:t}=this,i=(0,_.X)({},t[0].canvas),r=new At;i.right=t[t.length-1].canvas.right,i.bottom=t[t.length-1].canvas.bottom,r.layoutInsideLegend(this._legend,i)}},_allowLegendInsidePosition:()=>!0,_applyExtraSettings(n){const e=this._getPaneIndex(n.pane),t=this._panesClipRects,i=t.wide[e];n.setClippingParams(t.base[e].id,i?.id,this._getPaneBorderVisibility(e))},_updatePanesCanvases(n){n.recreateCanvas&&function ei(n,e,t){let i=0;const r=t?e.width-e.left-e.right:e.height-e.top-e.bottom,m=n.reduce((ce,_e)=>ce+(Gr(_e)?0:_e.height),0),A=r-10*(n.length-1)-m,V=t?"left":"top",X=t?"right":"bottom";n.forEach(ce=>{const _e=Gr(ce)?Gt(ce.height*A):ce.height;ce.canvas=ce.canvas||{},(0,_.X)(ce.canvas,e),ce.canvas[V]=e[V]+i,ce.canvas[X]=e[X]+(r-_e-i),i=i+_e+10,Ko(ce.canvas)})}(this.panes,this._canvas,this._isRotated())},_normalizePanesHeight(){!function Yn(n){n.forEach(A=>{const V=A.height;let X=0,ce=parseFloat(V)||void 0;((0,C.Kg)(V)&&V.indexOf("px")>-1||(0,C.kf)(V)&&V>1)&&(ce=Gt(ce),X=1),!X&&ce&&((0,C.Kg)(V)&&V.indexOf("%")>-1?(ce/=100,X=2):ce<0&&(ce=ce<-1?1:gi(ce))),A.height=ce,A.unit=X});const e=n.filter(Gr),t=e.reduce((A,V)=>A+(V.height||0),0),i=e.length,r=e.filter(A=>!A.height),m=r.length;if(t<1&&m)r.forEach(A=>A.height=(1-t)/m);else if(t>1||t<1&&!m||1===t&&m){if(m){const A=t/i,V=m*A;e.filter(X=>X.height).forEach(X=>X.height*=(t-V)/t),r.forEach(X=>X.height=A)}e.forEach(A=>A.height*=1/t)}}(this.panes)},_renderScaleBreaks(){this._valueAxes.concat(this._argumentAxes).forEach(n=>{n.drawScaleBreaks()})},_getArgFilter(){return tm.getViewPortFilter(this.getArgumentAxis().visualRange()||{})},_hidePointsForSingleSeriesIfNeeded(n){const e=n.getPoints();let t=0;for(let i=0;i<e.length;i+=1){const r=e[i],m=e.slice(i+1);if(t+=Number(tw(r,m)),t>e.length/2){n.autoHidePointMarkers=!0;break}}},_applyAutoHidePointMarkers(n){let e=[];const t=(i,r)=>i+tw(r,e,!0);for(let i=n.length-1;i>=0;i-=1){const r=n[i];if(r.autoHidePointMarkersEnabled()&&(r.autoHidePointMarkers=!1,this._hidePointsForSingleSeriesIfNeeded(r),!r.autoHidePointMarkers)){const m=r.getPoints();m.reduce(t,0)<m.length?e=e.concat(m):r.autoHidePointMarkers=!0}}},_applyPointMarkersAutoHiding(){const n=this.series;this._themeManager.getOptions("autoHidePointMarkers")?this.panes.forEach(e=>{let{borderCoords:t,name:i}=e;const r=n.filter(V=>V.pane===i&&V.usePointsToDefineAutoHiding());r.forEach(V=>{V.prepareCoordinatesForPoints()});const m=this.getArgumentAxis(),A=function u1(n,e,t){const i=[],r={},m=t.visualRange(),A=t.getTranslator(),V=tm.getViewPortFilter(m||{});return e.forEach(X=>{const ce=X.getValueAxis(),_e=ce.getCanvasRange(),Me=ce.getTranslator(),Ve=n.indexOf(X),Je=tm.getViewPortFilter(_e||{});r[Ve]={},e.forEach(Xt=>{r[Ve][n.indexOf(Xt)]=0});const rt=[];X.getPoints().filter(Xt=>Xt.getOptions().visible&&V(Xt.argument)&&(Je(Xt.getMinValue(!0))||Je(Xt.getMaxValue(!0)))).forEach(Xt=>{const On={seriesIndex:Ve,argument:Xt.argument,value:Xt.getMaxValue(!0),size:Xt.bubbleSize||Xt.getOptions().size,x:void 0,y:void 0};if(Xt.getMinValue(!0)!==Xt.getMaxValue(!0)){const Fn=(0,_.X)({},On);Fn.value=Xt.getMinValue(!0),Fn.x=A.to(Fn.argument,1),Fn.y=Me.to(Fn.value,1),rt.push(Fn)}On.x=A.to(On.argument,1),On.y=Me.to(On.value,1),rt.push(On)}),r[Ve].pointsCount=rt.length,r[Ve].total=0,r[Ve].continuousSeries=0,i.push({name:X.name,index:Ve,points:rt})}),{series:i,overloadedSeries:r}}(n,r,m);if(function Oy(n,e,t){const i=n.width*n.height,r=e.series;for(let m=r.length-1;m>=0;m-=1){const A=t.filter(_e=>_e.name===r[m].name)[0],{points:V}=r[m],X=V.length?V[0].size:0,ce=X*X*V.length;if(A.autoHidePointMarkersEnabled()&&ce>=i/r.length){const{index:_e}=r[m];A.autoHidePointMarkers=!0,r.splice(m,1),t.splice(t.indexOf(A),1),e.overloadedSeries[_e]=null}}}(t,A,r),A.series.length){const V=m.visualRange(),ce=m.getOptions().type===gS?(Me,Ve)=>V.categories.indexOf(Me.argument)-V.categories.indexOf(Ve.argument):(Me,Ve)=>Me.argument-Ve.argument;let _e=[];A.series.forEach(Me=>{_e=_e.concat(Me.points)}),_e.sort(ce),function p1(n,e){let t=!1;for(let i=0;i<n.length-1;i+=1){const r=n[i],{size:m}=r;if((0,C.O9)(r.x)&&(0,C.O9)(r.y))for(let A=i+1;A<n.length;A+=1){const V=n[A],X=V?.x,ce=V?.y;if(!(0,C.O9)(X)||Math.abs(r.x-X)>=m){t=t&&A!==i+1;break}{const _e=(0,C.O9)(X)&&(0,C.O9)(ce)&&Math.sqrt((r.x-X)**2+(r.y-ce)**2);_e&&_e<m&&(e[r.seriesIndex][V.seriesIndex]+=1,e[r.seriesIndex].total+=1,t||(e[r.seriesIndex].continuousSeries+=1,t=!0))}}}}(_e,A.overloadedSeries),this._applyAutoHidePointMarkers(r)}}):n.forEach(e=>{e.autoHidePointMarkers=!1})},_renderAxes(n,e){function t(ii){return ii.map(qi=>{if(!qi.getTitle)return 0;const ji=qi.getTitle();return ji?ji.bBox.width:0})}const i=this._isRotated(),r=this._themeManager.getOptions("synchronizeMultiAxes"),m=this._scrollBar?[this._scrollBar]:[],A=this._isArgumentAxisBeforeScrollBar()?this._argumentAxes.concat(m):m.concat(this._argumentAxes),V=i?this._argumentAxes:this._valueAxes,X=i?A:this._valueAxes,ce=i?this._valueAxes:this._argumentAxes,_e=i?this._valueAxes:A,Me=V.concat(ce),Ve=Me.concat(m),Je=V.some(ii=>ii.isFirstDrawing());this._normalizePanesHeight(),this._updatePanesCanvases(n);let rt=this.panes.reduce((ii,qi)=>(ii[qi.name]=(0,_.X)({},qi.canvas),ii),{});const Ct=this.panes.reduce((ii,qi)=>(ii[qi.name]={height:qi.height,unit:qi.unit},ii),{}),Xt=(0,_.X)(!0,{},rt);this._initCustomPositioningAxes();const On=this._axesBoundaryPositioning();if(!n.adjustAxes&&!On)return yx(V,!i&&r,rt,e),yx(ce,i&&r,rt,e),ta(Me,"prepareAnimation"),this._renderScaleBreaks(),ce.forEach(ii=>ii.resolveOverlappingForCustomPositioning(V)),V.forEach(ii=>ii.resolveOverlappingForCustomPositioning(ce)),!1;On&&Me.forEach(ii=>ii.customPositionIsAvailable()&&ii.shift({top:0,left:0,bottom:0,right:0})),this._scrollBar&&this._scrollBar.setPane(this.panes);let Fn={panes:{},left:0,right:0},oi=qO(_e,ii=>ii.estimateMargins(rt[ii.pane]));rt=ew(i,rt,Ct,Fn,oi);const Yt=ii=>{yx(ii?ce:V,(ii?i:!i)&&r,rt,e),ii?oi=qO(_e,mS):Fn=V_(X),rt=ew(i,rt,Ct,Fn,oi)};Yt(!1),Yt(!0),!this._changesApplying&&this._estimateTickIntervals(V,rt)&&Yt(!1);let $t=t(V);const xn=this._getVisibleSeries(),qn=function yN(n,e){const t=e.reduce((i,r)=>i+r,0)/e.length;return n.animate&&t<=n.animationPointsLimit}(n,this._getPointsToAnimation(xn));return ta(Ve,"updateSize",rt,qn),_e.forEach(_S("top","bottom")),X.forEach(_S("left","right")),this._renderScaleBreaks(),this.panes.forEach(ii=>{(0,_.X)(ii.canvas,rt[ii.name])}),this._valueAxes.forEach(ii=>{ii.setInitRange()}),V.forEach((ii,qi)=>{var ji;if(null!==(ji=ii.hasWrap)&&void 0!==ji&&ji.call(ii)){const $i=ii.getTitle(),io=($i?$i.bBox.width:0)-$t[qi];"right"===ii.getOptions().position?Fn.right+=io:(Fn.left+=io,this.panes.forEach(Uo=>{let{name:zr}=Uo;Fn.panes[zr].left+=io})),rt=ew(i,rt,Ct,Fn,oi),ta(Ve,"updateSize",rt,!1,!1),$t=t(V)}}),V.some(ii=>ii.customPositionIsAvailable()&&ii.getCustomPosition()!==ii._axisPosition)&&(qn&&this._resetAxesAnimation(Je,!1),ta(V,"updateSize",rt,qn)),ce.forEach(ii=>ii.resolveOverlappingForCustomPositioning(V)),V.forEach(ii=>ii.resolveOverlappingForCustomPositioning(ce)),Xt},_getExtraTemplatesItems(){const n=(this._argumentAxes||[]).concat(this._valueAxes||[]),e=this._collectTemplatesFromItems(n);return{items:e.items,groups:e.groups,launchRequest(){n.forEach(t=>{t.setRenderedState(!0)})},doneRequest(){n.forEach(t=>{t.setRenderedState(!1)})}}},_estimateTickIntervals:(n,e)=>n.some(t=>t.estimateTickInterval(e[t.pane])),checkForMoreSpaceForPanesCanvas(){const n=this._isRotated();let t=!1;if(this.panes.filter(i=>i.unit).length===this.panes.length){let i=0,r=0;if(n){const m=this.getArgumentAxis().getMargins().right,A=Math.min(...this.panes.map(V=>V.canvas.right));i=this._canvas.right+m-A}else{const m=this.getArgumentAxis().getMargins().bottom,A=Math.min(...this.panes.map(V=>V.canvas.bottom));r=this._canvas.bottom+m-A}if(t=(i>0||r>0)&&{width:i,height:r},0!==r){const m=this.getSize(),A=this.option("size"),X=!!parseInt(this._$element[0].style.height,10)||0!==this._containerInitialHeight;!n&&(null==A||!A.height)&&!X&&(this._forceResize(m.width,m.height+r),t=!1)}}else t=this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),n,i=>({width:n&&!!i.unit,height:!n&&!!i.unit}));return t},_forceResize(n,e){this._renderer.resize(n,e),this._updateSize(!0),this._setContentSize(),this._preserveOriginalCanvas(),this._updateCanvasClipRect(this._canvas)},_shrinkAxes(n,e){if(!n||!e)return;this._renderer.stopAllAnimations(!0);const t=this._isRotated(),i=this._scrollBar?[this._scrollBar]:[],r=this._isArgumentAxisBeforeScrollBar()?this._argumentAxes.concat(i):i.concat(this._argumentAxes),m=t?r:this._valueAxes,A=t?this._valueAxes:r,V=m.concat(A);if(n.width||n.height){CN(n,"height",A,qO),CN(n,"width",m,V_),ta(V,"updateSize",e);const X=this.panes.reduce((ce,_e)=>(ce[_e.name]={height:_e.height,unit:_e.unit},ce),{});ta(V,"updateSize",e=ew(t,e,X,V_(m),qO(A,mS))),A.forEach(_S("top","bottom")),m.forEach(_S("left","right")),this.panes.forEach(ce=>(0,_.X)(ce.canvas,e[ce.name]))}},_isArgumentAxisBeforeScrollBar(){const n=this.getArgumentAxis();if(this._scrollBar){var e;const t=n.getResolvedBoundaryPosition(),i=null===(e=n.getOptions().label)||void 0===e?void 0:e.position,r=this._scrollBar.getOptions().position;return n.hasNonBoundaryPosition()||r===t&&i!==r}return!1},_getPanesParameters(){const{panes:n}=this,e=[];for(let t=0;t<n.length;t+=1)this._getPaneBorderVisibility(t)&&e.push({coords:n[t].borderCoords,clipRect:this._panesClipRects.fixed[t]});return e},_createCrosshairCursor(){const n=this._themeManager.getOptions("crosshair")||{},e=this.getArgumentAxis(),t=this._isRotated()?[this._valueAxes,[e]]:[[e],this._valueAxes],i={canvas:this._getCommonCanvas(),panes:this._getPanesParameters(),axes:t};null!=n&&n.enabled&&(this._crosshair?this._crosshair.update(n,i):this._crosshair=new bA(this._renderer,n,i,this._crosshairCursorGroup),this._crosshair.render())},_getCommonCanvas(){let n;const{panes:e}=this;for(let t=0;t<e.length;t+=1){const{canvas:i}=e[t];n?(n.right=i.right,n.bottom=i.bottom):n=(0,_.X)({},i)}return n},_createPanesBackground(){const n=this._themeManager.getOptions("commonPaneSettings").backgroundColor,e=this._renderer,t=[];this._panesBackgroundGroup.clear();for(let i=0;i<this.panes.length;i+=1){const r=this.panes[i].backgroundColor||n;if(!r||"none"===r){t.push(null);continue}const m=e.rect(0,0,0,0).attr({fill:mi(r),"stroke-width":0}).append(this._panesBackgroundGroup);t.push(m)}this.panesBackground=t},_fillPanesBackground(){(0,w.__)(this.panes,(n,e)=>{const t=e.borderCoords;null!==this.panesBackground[n]&&this.panesBackground[n].attr({x:t.left,y:t.top,width:t.width,height:t.height})})},_calcPaneBorderCoords(n){const{canvas:e}=n,t=n.borderCoords=n.borderCoords||{};t.left=e.left,t.top=e.top,t.right=e.width-e.right,t.bottom=e.height-e.bottom,t.width=Math.max(t.right-t.left,0),t.height=Math.max(t.bottom-t.top,0)},_drawPanesBorders(n){const e=this._isRotated();this._panesBorderGroup.linkRemove().clear(),(0,w.__)(this.panes,(t,i)=>{const r=n[i.name],m={fill:"none",stroke:r.color,"stroke-opacity":r.opacity,"stroke-width":r.width,dashStyle:r.dashStyle,"stroke-linecap":"square"};if(this._calcPaneBorderCoords(i,e),!r.visible)return;const A=i.borderCoords,V=function(n,e,t,i,r){const m=~~((t<i?t:i)/2),A=r.width||0,V=A<m?A:m,X=(n+=V/2)+(t-=V),ce=(e+=V/2)+(i-=V);let Ve,_e=[],Me=[],Je=0,rt=0;const Ct={top:[[n,e],[X,e]],right:[[X,e],[X,ce]],bottom:[[X,ce],[n,ce]],left:[[n,ce],[n,e]]};switch((0,w.__)(Ct,function(Xt){Je=2*Je+~~!!r[Xt]}),Je){case 13:case 9:Ve=["left","top","right","bottom"];break;case 11:Ve=["bottom","left","top","right"];break;default:Ve=["top","right","bottom","left"]}return(0,w.__)(Ve,function(Xt,On){const Fn=!!r[On];!rt&&Me.length&&(_e.push(Me),Me=[]),Fn&&(0,w.__)(Ct[On].slice(rt),function(oi,Yt){Me=Me.concat(Yt)}),rt=~~Fn}),Me.length&&_e.push(Me),1===_e.length&&(_e=_e[0]),{points:_e,pathType:15===Je?"area":"line"}}(A.left,A.top,A.width,A.height,r);this._renderer.path(V.points,V.pathType).attr(m).append(this._panesBorderGroup)}),this._panesBorderGroup.linkAppend()},_createClipRect(n,e,t,i,r,m){let A=n[e];A?A.attr({x:t,y:i,width:r,height:m}):(A=this._renderer.clipRect(t,i,r,m),n[e]=A)},_createClipRectsForPanes(){const n=this._canvas;(0,w.__)(this.panes,(e,t)=>{let i=!1;const r=t.borderCoords;let{left:m}=r,{top:A}=r,{width:V}=r,{height:X}=r;const ce=this._panesClipRects;this._createClipRect(ce.fixed,e,m,A,V,X),this._createClipRect(ce.base,e,m,A,V,X),(0,w.__)(this.series,(_e,Me)=>{Me.pane===t.name&&(Me.isFinancialSeries()||Me.areErrorBarsVisible())&&(i=!0)}),i?(this._isRotated()?(A=0,X=n.height):(m=0,V=n.width),this._createClipRect(ce.wide,e,m,A,V,X)):ce.wide[e]=null})},_applyClipRectsForAxes(){const n=this._getAllAxes(),e=this._getCanvasClipRectID();for(let t=0;t<n.length;t+=1){const i=this._getElementsClipRectID(n[t].pane);n[t].applyClipRects(i,e)}},_getPaneBorderVisibility(n){var e;const t=this._themeManager.getOptions("commonPaneSettings").border.visible,i=this.panes[n],r=null==i||null===(e=i.border)||void 0===e?void 0:e.visible;return void 0===r?t:r},_getCanvasForPane(n){var e;return null===(e=this.panes.find(t=>t.name===n))||void 0===e?void 0:e.canvas},_getTrackerSettings(){return(0,_.X)(this.callBase(),{chart:this,rotated:this._isRotated(),crosshair:this._getCrosshairOptions().enabled?this._crosshair:null,stickyHovering:this._themeManager.getOptions("stickyHovering")})},_resolveLabelOverlappingStack(){const n=this._isRotated(),e=n?(i,r)=>({x:i.x-r,y:i.y}):(i,r)=>({x:i.x,y:i.y-r}),t=(i,r)=>{const m=n?1:0;if(i.labels[0].getFigureCenter()[m]-r.labels[0].getFigureCenter()[m]==0){const ce=i.labels[0].getPoint().series.getValueAxis().getTranslator().isInverted()?-1:1;return(i.value()-r.value())*ce}return 0};(0,w.__)(this._getStackPoints(),(i,r)=>{(0,w.__)(r,(m,A)=>{const V=A[0].series.getValueAxis().getOptions().inverted;iy_resolveLabelOverlappingInOneDirection(A,this._getCommonCanvas(),n,V,e,t)})})},_getStackPoints(){const n={},e=this._getVisibleSeries();return(0,w.__)(e,(t,i)=>{const r=i.getPoints(),m=i.getStackName()||null;(0,w.__)(r,(A,V)=>{const{argument:X}=V;n[X]||(n[X]={}),n[X][m]||(n[X][m]=[]),n[X][m].push(V)})}),n},_getCrosshairOptions(){return this._getOption("crosshair")},zoomArgument(n,e){!this._initialized||!(0,C.O9)(n)&&!(0,C.O9)(e)||this.getArgumentAxis().visualRange([n,e])},resetVisualRange(){const n=this._argumentAxes,e=this.getArgumentAxis();n.forEach(t=>{t.resetVisualRange(e!==t),this._applyCustomVisualRangeOption(t)}),this.callBase()},getVisibleArgumentBounds(){const e=this._argumentAxes[0].getTranslator().getBusinessRange(),t=e.axisType===gS,{categories:i}=e;return{minVisible:t?e.minVisible||i[0]:e.minVisible,maxVisible:t?e.maxVisible||i[i.length-1]:e.maxVisible}},_change_FULL_RENDER(){this.callBase(),this._changes.has("VISUAL_RANGE")&&this._raiseZoomEndHandlers()},_getAxesForScaling(){return[this.getArgumentAxis()].concat(this._valueAxes)},_applyVisualRangeByVirtualAxes(n,e){if(n.isArgumentAxis){if(n!==this.getArgumentAxis())return!0;this._argumentAxes.filter(t=>t!==n).forEach(t=>t.visualRange(e,{start:!0,end:!0}))}return!1},_raiseZoomEndHandlers(){this._argumentAxes.forEach(n=>n.handleZoomEnd()),this.callBase()},_setOptionsByReference(){this.callBase(),(0,_.X)(this._optionsByReference,{"argumentAxis.visualRange":!0})},option(){const n=this.callBase(...arguments),e=this._options.silent("valueAxis");if("array"===(0,C.NW)(e))for(let t=0;t<e.length;t+=1)this._optionsByReference[`valueAxis[${t}].visualRange`]=!0;return n},_notifyVisualRange(){const n=this._argumentAxes[0],e=Jr(n.visualRange(),!fS(this.option("argumentAxis.visualRange")));n.skipEventRising&&an(e,this.option("argumentAxis.visualRange"))?n.skipEventRising=null:this.option("argumentAxis.visualRange",e),this.callBase()}});bx.addPlugin(AA),bx.addPlugin(zR),bx.addPlugin(F_.core),bx.addPlugin(F_.chart),(0,y.A)("dxChart",bx);let rI=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.uvP,z.YLo,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.aUY,z.ROy,z.HCS,z.ur_,z.CBY,z.uE7,z.Fii,z.cCU,z.Pxf,z.H8O,z.EED,z.nE5,z.vQM,z.Ist,z.B80,z.lX9,z.w8p,z.sVF,z.tXi,z.tl,z.gVd,z.PXE,z.XWi,z.WG2,z.NhN,z.lWu,z.Af1,z.tML,z.eeS,z.F2g,z.VTr,z.iDF,z.$jZ,z.Fhh,z._ql,z.ZRW,z.M5G,z.RKC,z.REv,z.VG3,z.tOy,z.sAn,z.PTP,z.ikq,z.y7y,z.aqX,z.IWb,z.Kkw,z.YTS,z.nu6,z.y1E,z.GzL,z.kxR,z.ZSJ,z.WNh,z.hJ,z.v5y,z.okf,z.Mj3,z.AaL,z.GYs,z.YyV,z.MXF,z.uIe,z.F1M,z.Yh3,z.YkV,z.FXg,z.w0m,z.CGH,z.xOT,z.hU2,z.hzo,z.Vku,z.OeI,z.$T,z.KNc,f.p_,f.xZ,z.uvP,z.YLo,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.aUY,z.ROy,z.HCS,z.ur_,z.CBY,z.uE7,z.Fii,z.cCU,z.Pxf,z.H8O,z.EED,z.nE5,z.vQM,z.Ist,z.B80,z.lX9,z.w8p,z.sVF,z.tXi,z.tl,z.gVd,z.PXE,z.XWi,z.WG2,z.NhN,z.lWu,z.Af1,z.tML,z.eeS,z.F2g,z.VTr,z.iDF,z.$jZ,z.Fhh,z._ql,z.ZRW,z.M5G,z.RKC,z.REv,z.VG3,z.tOy,z.sAn,z.PTP,z.ikq,z.y7y,z.aqX,z.IWb,z.Kkw,z.YTS,z.nu6,z.y1E,z.GzL,z.kxR,z.ZSJ,z.WNh,z.hJ,z.v5y,z.okf,z.Mj3,z.AaL,z.GYs,z.YyV,z.MXF,z.uIe,z.F1M,z.Yh3,z.YkV,z.FXg,z.w0m,z.CGH,z.xOT,z.hU2,z.hzo,z.Vku,z.OeI,z.$T,z.KNc,f.xZ]})}return n})();var sI=M(6553);let aI=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.uIe,z.SB8,z.FXg,z.r2Z,z.Yh3,z.Ek1,z.PXE,z.$3K,z.REv,z.CQq,z.uE7,z.Pxf,z.EED,z.lX9,z.hzo,z.saD,z.Tv$,z.sVF,z.YkV,z.Vku,z.A1g,z.cug,z._sw,f.p_,f.xZ,z.YLo,z.uIe,z.SB8,z.FXg,z.r2Z,z.Yh3,z.Ek1,z.PXE,z.$3K,z.REv,z.CQq,z.uE7,z.Pxf,z.EED,z.lX9,z.hzo,z.saD,z.Tv$,z.sVF,z.YkV,z.Vku,z.A1g,z.cug,z._sw,f.xZ]})}return n})();var lI=M(444),H_=M(784);let iw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.POb,z.TBD,z.vwi,z.pGU,f.p_,f.xZ,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.POb,z.TBD,z.vwi,z.pGU,f.xZ]})}return n})();var g1=M(8844),rC=M(6523),f1=M(6761),CS=M(5021);const wy={forward:" dx-forward",backward:" dx-backward",none:" dx-no-direction",undefined:" dx-no-direction"},m1=CS.u.inherit({ctor:function(){this.callBase.apply(this,arguments),this._registeredPresets=[],this.resetToDefaults()},_getDefaultOptions:function(){return(0,_.X)(this.callBase(),{defaultAnimationDuration:400,defaultAnimationDelay:0,defaultStaggerAnimationDuration:300,defaultStaggerAnimationDelay:40,defaultStaggerAnimationStartDelay:500})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(n){return n.phone},options:{defaultStaggerAnimationDuration:350,defaultStaggerAnimationDelay:50,defaultStaggerAnimationStartDelay:0}},{device:function(){return d.A.current().android||d.A.real.android},options:{defaultAnimationDelay:100}}])},_getPresetOptionName:function(n){return"preset_"+n},_createAndroidSlideAnimationConfig:function(n,e){const t=this,i=function(r){return{type:"slide",delay:void 0===r.delay?t.option("defaultAnimationDelay"):r.delay,duration:void 0===r.duration?t.option("defaultAnimationDuration"):r.duration}};return{enter:function(r,m){const A=(0,D.RG)(r.parent())*e,V=m.direction,X=i(m);return X.to={left:0,opacity:1},X.from="forward"===V?{left:A,opacity:n}:"backward"===V?{left:-A,opacity:n}:{left:0,opacity:0},T.A.createAnimation(r,X)},leave:function(r,m){const A=(0,D.RG)(r.parent())*e,V=m.direction,X=i(m);return X.from={left:0,opacity:1},X.to="forward"===V?{left:-A,opacity:n}:"backward"===V?{left:A,opacity:n}:{left:0,opacity:0},T.A.createAnimation(r,X)}}},_createOpenDoorConfig:function(){const n=this,e=function(t){return{type:"css",extraCssClasses:"dx-opendoor-animation",delay:void 0===t.delay?n.option("defaultAnimationDelay"):t.delay,duration:void 0===t.duration?n.option("defaultAnimationDuration"):t.duration}};return{enter:function(t,i){const r=i.direction,m=e(i);return m.delay="none"===r?m.delay:m.duration,m.from="dx-enter dx-opendoor-animation"+wy[r],m.to="dx-enter-active",T.A.createAnimation(t,m)},leave:function(t,i){const r=i.direction,m=e(i);return m.from="dx-leave dx-opendoor-animation"+wy[r],m.to="dx-leave-active",T.A.createAnimation(t,m)}}},_createWinPopConfig:function(){const n=this,e={type:"css",extraCssClasses:"dx-win-pop-animation",duration:n.option("defaultAnimationDuration")};return{enter:function(t,i){const r=e,m=i.direction;return r.delay="none"===m?n.option("defaultAnimationDelay"):n.option("defaultAnimationDuration")/2,r.from="dx-enter dx-win-pop-animation"+wy[m],r.to="dx-enter-active",T.A.createAnimation(t,r)},leave:function(t,i){const r=e,m=i.direction;return r.delay=n.option("defaultAnimationDelay"),r.from="dx-leave dx-win-pop-animation"+wy[m],r.to="dx-leave-active",T.A.createAnimation(t,r)}}},resetToDefaults:function(){this.clear(),this.registerDefaultPresets(),this.applyChanges()},clear:function(n){const e=this,t=[];(0,w.__)(this._registeredPresets,function(i,r){n&&n!==r.name?t.push(r):e.option(e._getPresetOptionName(r.name),void 0)}),this._registeredPresets=t,this.applyChanges()},registerPreset:function(n,e){this._registeredPresets.push({name:n,config:e})},applyChanges:function(){const n=this,e=[];(0,w.__)(this._registeredPresets,function(t,i){const r={device:i.config.device,options:{}};r.options[n._getPresetOptionName(i.name)]=i.config.animation,e.push(r)}),this._setOptionsByDevice(e)},getPreset:function(n){let e=n;for(;"string"==typeof e;)e=this.option(this._getPresetOptionName(e));return e},registerDefaultPresets:function(){this.registerPreset("pop",{animation:{extraCssClasses:"dx-android-pop-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("openDoor",{animation:this._createOpenDoorConfig()}),this.registerPreset("win-pop",{animation:this._createWinPopConfig()}),this.registerPreset("fade",{animation:{extraCssClasses:"dx-fade-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("slide",{device:function(){return d.A.current().android||d.A.real.android},animation:this._createAndroidSlideAnimationConfig(1,1)}),this.registerPreset("slide",{device:function(){return!d.A.current().android&&!d.A.real.android},animation:{extraCssClasses:"dx-slide-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("ios7-slide",{animation:{extraCssClasses:"dx-ios7-slide-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("overflow",{animation:{extraCssClasses:"dx-overflow-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("ios7-toolbar",{device:function(){return!d.A.current().android&&!d.A.real.android},animation:{extraCssClasses:"dx-ios7-toolbar-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("ios7-toolbar",{device:function(){return d.A.current().android||d.A.real.android},animation:this._createAndroidSlideAnimationConfig(0,.4)}),this.registerPreset("stagger-fade",{animation:{extraCssClasses:"dx-fade-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-slide",{animation:{extraCssClasses:"dx-slide-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-slide",{animation:{extraCssClasses:"dx-fade-slide-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-drop",{animation:{extraCssClasses:"dx-drop-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-drop",{animation:{extraCssClasses:"dx-fade-drop-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-rise",{animation:{extraCssClasses:"dx-fade-rise-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-3d-drop",{animation:{extraCssClasses:"dx-3d-drop-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-zoom",{animation:{extraCssClasses:"dx-fade-zoom-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}})}}),xx=new m1,yS={forward:" dx-forward",backward:" dx-backward",none:" dx-no-direction",undefined:" dx-no-direction"},ON=es.A.inherit({ctor:function(){this._accumulatedDelays={enter:0,leave:0},this._animations=[],this.reset()},_createAnimations:function(n,e,t,i){n=(0,a.A)(n);const r=this,m=[],A=this._prepareElementAnimationConfig(e,t=t||{},i);return A&&n.each(function(){const V=r._createAnimation((0,a.A)(this),A,t);V&&(V.element.addClass("dx-animating"),V.setup(),m.push(V))}),m},_prepareElementAnimationConfig:function(n,e,t){let i;if("string"==typeof n&&(n=xx.getPreset(n)),n)if((0,C.Tn)(n[t]))i=n[t];else{if(i=(0,_.X)({skipElementInitialStyles:!0,cleanupWhen:this._completePromise},n,e),!i.type||"css"===i.type){const r="dx-"+t,m=(i.extraCssClasses?" "+i.extraCssClasses:"")+yS[i.direction];i.type="css",i.from=(i.from||r)+m,i.to=i.to||r+"-active"}i.staggerDelay=i.staggerDelay||0,i.delay=i.delay||0,i.staggerDelay&&(i.delay+=this._accumulatedDelays[t],this._accumulatedDelays[t]+=i.staggerDelay)}else i=void 0;return i},_createAnimation:function(n,e,t){let i;return(0,C.Qd)(e)?i=T.A.createAnimation(n,e):(0,C.Tn)(e)&&(i=e(n,t)),i},_startAnimations:function(){const n=this._animations;for(let e=0;e<n.length;e++)n[e].start()},_stopAnimations:function(n){const e=this._animations;for(let t=0;t<e.length;t++)e[t].stop(n)},_clearAnimations:function(){const n=this._animations;for(let e=0;e<n.length;e++)n[e].element.removeClass("dx-animating");this._animations.length=0},reset:function(){this._accumulatedDelays.enter=0,this._accumulatedDelays.leave=0,this._clearAnimations(),this._completeDeferred=new g.cY,this._completePromise=this._completeDeferred.promise()},enter:function(n,e,t){const i=this._createAnimations(n,e,t,"enter");this._animations.push.apply(this._animations,i)},leave:function(n,e,t){const i=this._createAnimations(n,e,t,"leave");this._animations.push.apply(this._animations,i)},start:function(){const n=this;let e;if(this._animations.length){const t=(0,w.Tj)(this._animations,function(i){const r=new g.cY;return i.deferred.always(function(){r.resolve()}),r.promise()});e=g.z7.apply(a.A,t).always(function(){n._completeDeferred.resolve(),n.reset()}),(0,h.uG)(function(){n._startAnimations()})}else n.reset(),e=(new g.cY).resolve().promise();return e},stop:function(n){this._stopAnimations(n)}});var za=M(4757),Du=M(9229),Ty=M(2359),Sl=M(7080);const _1=(0,gr.zk)(),b1=["onRendered","onShown"],DN=Sl.A.inherit({_getDefaultOptions(){return(0,_.X)(this.callBase(),{showLoadIndicator:!1,renderWhen:void 0,animation:void 0,staggerItemSelector:void 0,onRendered:null,onShown:null})},_getAnonymousTemplateName:()=>"content",_init(){this.transitionExecutor=new ON,this._initElement(),this._initRender(),this._$initialContent=this.$element().clone().contents(),this._initActions(),this.callBase()},_initElement(){this.$element().addClass("dx-deferrendering")},_initRender(){const n=this,e=this.$element(),t=this.option("renderWhen"),i=()=>n._renderDeferredContent();(0,C.yL)(t)?(0,g.Sx)(t).done(i):(e.data("dx-render-delegate",i),void 0===t&&e.addClass("dx-pending-rendering-manual"))},_initActions(){this._actions={},(0,w.__)(b1,(n,e)=>{this._actions[e]=this._createActionByOption(e)||h.lQ})},_initMarkup(){this.callBase(),this._initContent||(this._initContent=this._renderContent,this._renderContent=()=>{}),this._initContent()},_renderContentImpl(){this.$element().removeClass("dx-widget"),this.$element().append(this._$initialContent),this._setLoadingState()},_renderDeferredContent(){const n=this,e=this.$element(),t=(0,g.cY)();return e.removeClass("dx-pending-rendering-manual"),e.addClass("dx-pending-rendering-active"),this._abortRenderTask(),this._renderTask=(0,h.uG)(()=>{n._renderImpl().done(()=>{const i={element:e};n._actions.onShown([i]),t.resolve(i)}).fail(function(){t.rejectWith(t,arguments)})}),t.promise()},_isElementInViewport(n){const e=(0,za.N)(n);return e.bottom>=0&&e.right>=0&&e.top<=(_1.innerHeight||c.A.getDocumentElement().clientHeight)&&e.left<=(_1.innerWidth||c.A.getDocumentElement().clientWidth)},_animate(){const n=this,e=this.$element(),t=(0,gr.Vd)()&&this.option("animation"),i=this.option("staggerItemSelector");let r;return n.transitionExecutor.stop(),t?(i?e.find(i).each(function(){n._isElementInViewport(this)&&n.transitionExecutor.enter((0,a.A)(this),t)}):n.transitionExecutor.enter(e,t),r=n.transitionExecutor.start()):r=(0,g.cY)().resolve().promise(),r},_renderImpl(){const n=this.$element(),e={element:n},t=this._getTemplate(this._templateManager.anonymousTemplateName);return t&&t.render({container:n.empty(),noModel:!0}),this._setRenderedState(n),L.A.trigger(n,"dxcontentrendered"),this._actions.onRendered([e]),this._isRendered=!0,this._animate()},_setLoadingState(){const n=this.$element(),e=!!n.find(".dx-visible-while-pending-rendering").length;n.addClass("dx-pending-rendering"),e||n.children().addClass("dx-invisible-while-pending-rendering"),this.option("showLoadIndicator")&&this._showLoadIndicator(n)},_showLoadIndicator(n){this._$loadIndicator=new Ty.A((0,a.A)("<div>"),{visible:!0}).$element().addClass("dx-deferrendering-load-indicator"),(0,a.A)("<div>").addClass("dx-loadindicator-container").addClass("dx-deferrendering-loadindicator-container").append(this._$loadIndicator).appendTo(n)},_setRenderedState(){const n=this.$element();this._$loadIndicator&&this._$loadIndicator.remove(),n.removeClass("dx-pending-rendering"),n.removeClass("dx-pending-rendering-active"),(0,Du.I9)(n.children())},_optionChanged(n){const{value:e}=n,{previousValue:t}=n;switch(n.name){case"renderWhen":!1===t&&!0===e?this._renderOrAnimate():!0===t&&!1===e&&(this.transitionExecutor.stop(),this._setLoadingState());break;case"showLoadIndicator":case"onRendered":case"onShown":break;default:this.callBase(n)}},_renderOrAnimate(){let n;return this._isRendered?(this._setRenderedState(),n=this._animate()):n=this._renderDeferredContent(),n},renderContent(){return this._renderOrAnimate()},_abortRenderTask(){this._renderTask&&(this._renderTask.abort(),this._renderTask=void 0)},_dispose(){this.transitionExecutor.stop(!0),this._abortRenderTask(),this._actions=void 0,this._$initialContent=void 0,this.callBase()}});(0,y.A)("dxDeferRendering",DN);let uI=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,f.p_,f.xZ,z.YLo,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,f.xZ]})}return n})();var fa=M(4270),Uc=M(6870),U_=M(8111),hI=M.n(U_);function As(){if(!hI())throw is.A.Error("E1041","devexpress-diagram");return U_}var bS=M(1520),pI=M(3183),gI=M(3949),xS=M(3651);const rw=class AN{constructor(e){const{EventDispatcher:t}=As();this.onChanged=new t,this._owner=e}raiseBarCommandExecuted(e,t){this.onChanged.raise("notifyBarCommandExecuted",parseInt(e),t)}getCommandKeys(){throw"Not Implemented"}setItemValue(e,t){}setItemEnabled(e,t){}setItemVisible(e,t){}setEnabled(e){}setItemSubItems(e,t){}isVisible(){return!0}_getKeys(e){return e.reduce((i,r)=>(void 0!==r.command&&i.push(r.command),r.items&&(i=i.concat(this._getKeys(r.items))),i),[])}},fI=(0,N.b4)(Si.A.up,"dxDiagramPanel"),mI=class S1 extends Sl.A{_init(){super._init(),this._createOnPointerUpAction()}_render(){super._render(),this._attachPointerUpEvent()}_getPointerUpElements(){return[this.$element()]}_attachPointerUpEvent(){this._getPointerUpElements().forEach(t=>{L.A.off(t,fI),L.A.on(t,fI,i=>{(0,a.A)(i.target).closest(".dx-textbox").length||this._onPointerUpAction()})})}_createOnPointerUpAction(){this._onPointerUpAction=this._createActionByOption("onPointerUp")}_optionChanged(e){"onPointerUp"===e.name?this._createOnPointerUpAction():super._optionChanged(e)}},sw={getContextMenuItemTemplate(n,e,t,i){const r=(0,a.A)(i);r.empty();const m=void 0!==e.rootCommand?e.rootCommand:-1;if(e.icon&&!e.checked){const A=(0,x.N)(e.icon);r.append(A)}else if(n._menuHasCheckedItems&&!0===n._menuHasCheckedItems[m]){const A=(0,x.N)("check");A.css("visibility",e.checked?"visible":"hidden"),r.append(A)}r.append('<span class="dx-menu-item-text">'+e.text+"</span>"),Array.isArray(e.items)&&e.items.length>0&&r.append('<span class="dx-menu-item-popout-container"><div class="dx-menu-item-popout"></div></span>')},getContextMenuCssClass:()=>"dx-diagram-contextmenu",onContextMenuItemClick(n,e,t){if(void 0===e.command&&void 0===e.name||Array.isArray(e.items)&&e.items.length){if(void 0!==e.rootCommand&&void 0!==e.value){const i=sw.getItemCommandParameter(n,e,e.value);t.call(this,e.rootCommand,void 0,i)}}else{const i=sw.getItemCommandParameter(n,e);t.call(this,e.command,e.name,i)}},getItemValue:n=>"object"==typeof n.value?JSON.stringify(n.value):n.value,getItemOptionText(n,e){if(n){e=e.slice();const t=this._getParentItemOptionText(e);n._originalItemsInfo&&n._originalItemsInfo[t]&&(e[e.length-1]+=n._originalItemsInfo[t].indexPathCorrection)}return this._getItemOptionTextCore(e)},_getParentItemOptionText(n){const e=n.slice(0,n.length-1);return this._getItemOptionTextCore(e)},_getItemOptionTextCore:n=>n.reduce((e,t)=>e+`items[${t}].`,""),getItemCommandParameter:(n,e,t)=>e.getParameter?e.getParameter(n):t,updateContextMenuItems(n,e,t,i){n._originalItemsInfo||(n._originalItemsInfo={}),n._originalItemsInfo[e]||(n._originalItemsInfo[e]={items:n.option(e+"items")||[]}),i=i.map(m=>({value:this.getItemValue(m),text:m.text,checked:m.checked,widget:n,rootCommand:t}));const r=n._originalItemsInfo[e].items;n.option(e+"items",i.concat(r)),n._originalItemsInfo[e]&&r.length&&(n._originalItemsInfo[e].indexPathCorrection=i.length)},updateContextMenuItemVisible(n,e,t){n.option(e+"visible",t)},updateContextMenuItemValue(n,e,t,i){const r=n.option(e+"items");"boolean"!=typeof i||r&&r.length?void 0!==i&&(this._setContextMenuHasCheckedItems(n,t),Array.isArray(r)&&r.forEach((m,A)=>{m.checked=m.value===i})):(this._setContextMenuHasCheckedItems(n,-1),n.option(e+"checked",i))},_setContextMenuHasCheckedItems(n,e){n._menuHasCheckedItems||(n._menuHasCheckedItems={}),n._menuHasCheckedItems[e]=!0}},Rd=sw;M(6520),M(2148),M(3480);class L2 extends rw{getCommandKeys(){return this._getKeys(this._owner._commands)}setItemValue(e,t){this._owner._setItemValue(e,t)}setItemEnabled(e,t){this._owner._setItemEnabled(e,t)}setEnabled(e){this._owner._setEnabled(e)}setItemSubItems(e,t){this._owner._setItemSubItems(e,t)}}class RN{constructor(e){this._widget=e}canUpdate(e){return void 0===e}setEnabled(e){this._widget.option("disabled",!e)}setValue(e,t,i,r){"value"in this._widget.option()?this._updateEditorValue(e,t):void 0!==e&&this._updateButtonValue(e),i&&this._updateContextMenuItemValue(i,"",r,e)}setItems(e,t,i){t?this._updateContextMenuItems(t,"",i,e):this._updateEditorItems(e)}_updateContextMenuItems(e,t,i,r){Rd.updateContextMenuItems(e,t,i,r)}_updateEditorItems(e){"items"in this._widget.option()&&this._widget.option("items",e.map(t=>({value:Rd.getItemValue(t),text:t.text})))}_updateEditorValue(e,t){this._widget.option("value",e),!this._widget.option("selectedItem")&&t&&this._widget.option("value",t)}_updateButtonValue(e){this._widget.option("iconChecked")&&this._widget.option("iconUnchecked")?this._widget.option("icon",this._widget.option(e?"iconChecked":"iconUnchecked")):this._widget.$element().toggleClass("dx-format-active",e)}_updateContextMenuItemValue(e,t,i,r){Rd.updateContextMenuItemValue(e,t,i,r)}}class B2 extends RN{constructor(e,t,i,r){super(e),this._indexPath=t,this._rootCommandKey=i,this._rootWidget=r}canUpdate(e){return super.canUpdate(e)||e===this._widget}setEnabled(e){this._widget.option(this._getItemOptionText()+"disabled",!e);const t=this._hasEnabledCommandItems(this._widget.option("items"));this._rootWidget.option("disabled",!t)}_hasEnabledCommandItems(e){return!!e&&e.some(t=>void 0!==t.command&&!t.disabled||this._hasEnabledCommandItems(t.items))}setValue(e){this._updateContextMenuItemValue(this._widget,this._getItemOptionText(),this._rootCommandKey,e)}setItems(e){this._updateContextMenuItems(this._widget,this._getItemOptionText(),this._rootCommandKey,e)}_getItemOptionText(){return Rd.getItemOptionText(this._widget,this._indexPath)}}const lw=class w1 extends mI{_init(){this._commands=[],this._itemHelpers={},this._commandContextMenus={},this._contextMenuList=[],this._valueConverters={},this.bar=new L2(this),this._createOnInternalCommand(),this._createOnCustomCommand(),this._createOnSubMenuVisibilityChangingAction(),super._init()}_initMarkup(){super._initMarkup();const e=!(0,gr.Vd)();!this.option("skipAdjustSize")&&!e&&(0,D.zj)(this.$element(),""),this._commands=this._getCommands(),this._itemHelpers={},this._commandContextMenus={},this._contextMenuList=[];const t=this._createMainElement();if(this._renderToolbar(t),!this.option("skipAdjustSize")&&!e){const i=this.$element().find(".dx-toolbar-before");(0,D.zj)(this.$element(),(0,D.RG)(i))}}_createMainElement(){return(0,a.A)("<div>").addClass("dx-diagram-toolbar").appendTo(this._$element)}_getCommands(){return this.option("commands")||[]}_renderToolbar(e){const t=this._commands.filter(A=>-1===["after","center"].indexOf(A.location)),i=this._commands.filter(A=>"center"===A.location),r=this._commands.filter(A=>"after"===A.location),m=[].concat(this._prepareToolbarItems(t,"before",this._executeCommand)).concat(this._prepareToolbarItems(i,"center",this._executeCommand)).concat(this._prepareToolbarItems(r,"after",this._executeCommand));this._toolbarInstance=this._createComponent(e,xS.A,{dataSource:m})}_prepareToolbarItems(e,t,i){return e.map(r=>(0,_.X)(!0,{location:t,locateInMenu:this.option("locateInMenu")},this._createItem(r,t,i),this._createItemOptions(r),this._createItemActionOptions(r,i)))}_createItem(e,t,i){return(e.getCommandValue||e.getEditorValue||e.getEditorDisplayValue)&&(this._valueConverters[e.command]={getCommandValue:e.getCommandValue,getEditorValue:e.getEditorValue,getEditorDisplayValue:e.getEditorDisplayValue}),"separator"===e.widget?{template:(r,m,A)=>{(0,a.A)(A).addClass("dx-diagram-toolbar-separator")},menuItemTemplate:(r,m,A)=>{(0,a.A)(A).addClass("dx-diagram-toolbar-menu-separator")}}:{widget:e.widget||"dxButton",cssClass:e.cssClass,options:{stylingMode:this.option("buttonStylingMode"),type:this.option("buttonType"),text:e.text,hint:e.hint,icon:e.icon||e.iconUnchecked||e.iconChecked,iconChecked:e.iconChecked,iconUnchecked:e.iconUnchecked,onInitialized:r=>this._onItemInitialized(r.component,e),onContentReady:r=>this._onItemContentReady(r.component,e,i)}}}_createItemOptions(e){let{widget:t,command:i,items:r,valueExpr:m,displayExpr:A,showText:V,hint:X,icon:ce}=e;return"dxSelectBox"===t?this._createSelectBoxItemOptions(i,X,r,m,A):"dxTextBox"===t?this._createTextBoxItemOptions(i,X):"dxColorBox"===t?this._createColorBoxItemOptions(i,X,ce):t&&"dxButton"!==t?void 0:{showText:V||"inMenu"}}_createSelectBoxItemOptions(e,t,i,r,m){let A=this._createTextEditorItemOptions(t);return A=(0,_.X)(!0,A,{options:{dataSource:i,displayExpr:m||"text",valueExpr:r||"value"}}),i&&i.every(X=>void 0!==X.icon)&&(A=(0,_.X)(!0,A,{options:{fieldTemplate:(X,ce)=>{(0,a.A)("<i>").addClass(X&&X.icon||"dx-diagram-i-selectbox-null-icon dx-diagram-i").appendTo(ce),(0,a.A)("<div>").dxTextBox({readOnly:!0,stylingMode:"outlined"}).appendTo(ce)},itemTemplate:(X,ce,_e)=>((0,a.A)(_e).attr("title",X.hint),`<i class="${X.icon}"></i>`)}})),A}_createTextBoxItemOptions(e,t){let i=this._createTextEditorItemOptions(t);return i=(0,_.X)(!0,i,{options:{readOnly:!0,focusStateEnabled:!1,hoverStateEnabled:!1,buttons:[{name:"dropDown",location:"after",options:{icon:"spindown",disabled:!1,stylingMode:"text",onClick:r=>{const m=this._commandContextMenus[e];m&&this._toggleContextMenu(m)}}}]}}),i}_createColorBoxItemOptions(e,t,i){let r=this._createTextEditorItemOptions(t);return i&&(r=(0,_.X)(!0,r,{options:{openOnFieldClick:!0,fieldTemplate:(m,A)=>{(0,a.A)("<i>").addClass(i).css("borderBottomColor",m).appendTo(A),(0,a.A)("<div>").dxTextBox({readOnly:!0,stylingMode:"outlined"}).appendTo(A)}}})),r=(0,_.X)(!0,r,{options:{onOpened:()=>{this.option("isMobileView")&&(0,a.A)("body").addClass("dx-diagram-mobile-toolbar-color-box-opened")},onClosed:()=>{(0,a.A)("body").removeClass("dx-diagram-mobile-toolbar-color-box-opened")}}}),r}_createTextEditorItemOptions(e){return{options:{stylingMode:this.option("editorStylingMode"),hint:e}}}_createItemActionOptions(e,t){switch(e.widget){case"dxSelectBox":case"dxColorBox":case"dxCheckBox":return{options:{onValueChanged:i=>{const r=Rd.getItemCommandParameter(this,e,i.component.option("value"));t.call(this,e.command,e.name,r)}}};case"dxTextBox":return{};default:return{options:{onClick:i=>{if(e.items){const r=i.component._contextMenu;r&&this._toggleContextMenu(r)}else{const r=Rd.getItemCommandParameter(this,e);t.call(this,e.command,e.name,r)}}}}}}_toggleContextMenu(e){this._contextMenuList.forEach(t=>{e!==t&&t.hide()}),e.toggle()}_onItemInitialized(e,t){this._addItemHelper(t.command,new RN(e))}_onItemContentReady(e,t,i){if(("dxButton"===e.NAME||"dxTextBox"===e.NAME)&&t.items){const r=this._isTouchMode(),m=(0,a.A)("<div>").appendTo(this.$element());e._contextMenu=this._createComponent(m,H_.A,{items:t.items,target:e.$element(),cssClass:Rd.getContextMenuCssClass(),showEvent:"",hideOnOutsideClick:A=>!r&&0===(0,a.A)(A.target).closest(e._contextMenu._dropDownButtonElement).length,focusStateEnabled:!1,position:{at:"left bottom"},itemTemplate:function(A,V,X){Rd.getContextMenuItemTemplate(this,A,V,X)},onItemClick:A=>{let{component:V,itemData:X}=A;Rd.onContextMenuItemClick(this,X,i.bind(this)),(!X.items||!X.items.length)&&V.hide()},onShowing:A=>{this._showingSubMenu||(this._showingSubMenu=A.component,this._onSubMenuVisibilityChangingAction({visible:!0,component:this}),A.component.option("items",A.component.option("items")),delete this._showingSubMenu)},onInitialized:A=>{let{component:V}=A;return this._onContextMenuInitialized(V,t,e)},onDisposing:A=>{let{component:V}=A;return this._onContextMenuDisposing(V,t)}}),r||(e._contextMenu._dropDownButtonElement=e.$element(),"dxTextBox"===e.NAME&&(e._contextMenu._dropDownButtonElement=e.getButton("dropDown").element()))}}_isTouchMode(){const{Browser:e}=As();return e.TouchUI}_onContextMenuInitialized(e,t,i){this._contextMenuList.push(e),t.command&&(this._commandContextMenus[t.command]=e),this._addContextMenuHelper(t,e,[],i)}_addItemHelper(e,t){if(void 0!==e){if(this._itemHelpers[e])throw new Error("Toolbar cannot contain duplicated commands.");this._itemHelpers[e]=t}}_addContextMenuHelper(e,t,i,r){e.items&&e.items.forEach((m,A)=>{const V=i.concat(A);this._addItemHelper(m.command,new B2(t,V,m.command,r)),this._addContextMenuHelper(m,t,V,r)})}_onContextMenuDisposing(e,t){this._contextMenuList.splice(this._contextMenuList.indexOf(e),1),delete this._commandContextMenus[t.command]}_executeCommand(e,t,i){if(!this._updateLocked){if("number"==typeof e){const r=this._valueConverters[e];r&&r.getCommandValue&&(i=r.getCommandValue(i)),this.bar.raiseBarCommandExecuted(e,i)}else"string"==typeof e&&this._onInternalCommandAction({command:e});void 0!==t&&this._onCustomCommandAction({name:t})}}_createOnInternalCommand(){this._onInternalCommandAction=this._createActionByOption("onInternalCommand")}_createOnCustomCommand(){this._onCustomCommandAction=this._createActionByOption("onCustomCommand")}_setItemEnabled(e,t){if(e in this._itemHelpers){const i=this._itemHelpers[e];i.canUpdate(this._showingSubMenu)&&i.setEnabled(t)}}_setEnabled(e){this._toolbarInstance.option("disabled",!e),this._contextMenuList.forEach(t=>{t.option("disabled",!e)})}_setItemValue(e,t){try{if(this._updateLocked=!0,e in this._itemHelpers){const i=this._itemHelpers[e];if(i.canUpdate(this._showingSubMenu)){const r=this._valueConverters[e];let m;r&&r.getEditorValue&&(t=r.getEditorValue(t)),r&&r.getEditorDisplayValue&&(m=r.getEditorDisplayValue(t));const A=this._commandContextMenus[e];i.setValue(t,m,A,A&&e)}}}finally{this._updateLocked=!1}}_setItemSubItems(e,t){if(this._updateLocked=!0,e in this._itemHelpers){const i=this._itemHelpers[e];if(i.canUpdate(this._showingSubMenu)){const r=this._commandContextMenus[e];i.setItems(t,r,r&&e)}}this._updateLocked=!1}_createOnSubMenuVisibilityChangingAction(){this._onSubMenuVisibilityChangingAction=this._createActionByOption("onSubMenuVisibilityChanging")}_optionChanged(e){switch(e.name){case"isMobileView":(0,a.A)("body").removeClass("dx-diagram-mobile-toolbar-color-box-opened"),this._invalidate();break;case"onSubMenuVisibilityChanging":this._createOnSubMenuVisibilityChangingAction();break;case"onInternalCommand":this._createOnInternalCommand();break;case"onCustomCommand":this._createOnCustomCommand();break;case"container":case"commands":this._invalidate();break;case"export":break;default:super._optionChanged(e)}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{isMobileView:!1,export:{fileName:"Diagram"},locateInMenu:"auto",buttonStylingMode:"text",buttonType:"normal",editorStylingMode:"filled",skipAdjustSize:!1})}setCommandChecked(e,t){this._setItemValue(e,t)}setCommandEnabled(e,t){this._setItemEnabled(e,t)}},_I="separator",Om={widget:_I},zc_LARGE_ICON_ITEM="dx-diagram-lg-icon-item",Qd={SHOW_TOOLBOX_COMMAND_NAME:"toolbox",SHOW_PROPERTIES_PANEL_COMMAND_NAME:"propertiesPanel",getAllCommands:function(){const{DiagramCommand:n}=As();return this._allCommands||(this._allCommands={separator:Om,exportSvg:{command:n.ExportSvg,text:Wn.A.format("dxDiagram-commandExportToSvg"),getParameter:e=>t=>this._exportTo(e,t,"SVG","image/svg+xml")},exportPng:{command:n.ExportPng,text:Wn.A.format("dxDiagram-commandExportToPng"),getParameter:e=>t=>this._exportTo(e,t,"PNG","image/png")},exportJpg:{command:n.ExportJpg,text:Wn.A.format("dxDiagram-commandExportToJpg"),getParameter:e=>t=>this._exportTo(e,t,"JPEG","image/jpeg")},undo:{command:n.Undo,hint:Wn.A.format("dxDiagram-commandUndo"),text:Wn.A.format("dxDiagram-commandUndo"),icon:"undo",menuIcon:"undo"},redo:{command:n.Redo,hint:Wn.A.format("dxDiagram-commandRedo"),text:Wn.A.format("dxDiagram-commandRedo"),icon:"redo",menuIcon:"redo"},cut:{command:n.Cut,hint:Wn.A.format("dxDiagram-commandCut"),text:Wn.A.format("dxDiagram-commandCut"),icon:"cut",menuIcon:"cut"},copy:{command:n.Copy,hint:Wn.A.format("dxDiagram-commandCopy"),text:Wn.A.format("dxDiagram-commandCopy"),icon:"copy",menuIcon:"copy"},paste:{command:n.PasteInPosition,hint:Wn.A.format("dxDiagram-commandPaste"),text:Wn.A.format("dxDiagram-commandPaste"),icon:"paste",menuIcon:"paste"},selectAll:{command:n.SelectAll,hint:Wn.A.format("dxDiagram-commandSelectAll"),text:Wn.A.format("dxDiagram-commandSelectAll"),icon:"dx-diagram-i-button-select-all dx-diagram-i",menuIcon:"dx-diagram-i-menu-select-all dx-diagram-i"},delete:{command:n.Delete,hint:Wn.A.format("dxDiagram-commandDelete"),text:Wn.A.format("dxDiagram-commandDelete"),icon:"remove",menuIcon:"remove"},fontName:{command:n.FontName,hint:Wn.A.format("dxDiagram-commandFontName"),text:Wn.A.format("dxDiagram-commandFontName"),widget:"dxSelectBox",items:["Arial","Arial Black","Helvetica","Times New Roman","Courier New","Courier","Verdana","Georgia","Comic Sans MS","Trebuchet MS"].map(e=>({text:e,value:e})),cssClass:"dx-diagram-md-edit-item"},fontSize:{command:n.FontSize,hint:Wn.A.format("dxDiagram-commandFontSize"),text:Wn.A.format("dxDiagram-commandFontSize"),widget:"dxSelectBox",items:[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72].map(e=>({text:e+"pt",value:e+"pt"})),cssClass:"dx-diagram-sm-edit-item"},bold:{command:n.Bold,hint:Wn.A.format("dxDiagram-commandBold"),text:Wn.A.format("dxDiagram-commandBold"),icon:"bold",menuIcon:"bold"},italic:{command:n.Italic,hint:Wn.A.format("dxDiagram-commandItalic"),text:Wn.A.format("dxDiagram-commandItalic"),icon:"italic",menuIcon:"italic"},underline:{command:n.Underline,hint:Wn.A.format("dxDiagram-commandUnderline"),text:Wn.A.format("dxDiagram-commandUnderline"),icon:"underline",menuIcon:"underline"},fontColor:{command:n.FontColor,text:Wn.A.format("dxDiagram-commandTextColor"),hint:Wn.A.format("dxDiagram-commandTextColor"),widget:"dxColorBox",icon:"dx-icon dx-icon-color",menuIcon:"dx-icon dx-icon-color",cssClass:"dx-diagram-color-edit-item"},lineColor:{command:n.StrokeColor,text:Wn.A.format("dxDiagram-commandLineColor"),hint:Wn.A.format("dxDiagram-commandLineColor"),widget:"dxColorBox",icon:"dx-icon dx-icon-background",menuIcon:"dx-icon dx-icon-background",cssClass:"dx-diagram-color-edit-item"},lineWidth:{command:n.StrokeWidth,text:Wn.A.format("dxDiagram-commandLineWidth"),hint:Wn.A.format("dxDiagram-commandLineWidth"),widget:"dxSelectBox",items:[1,2,3,4,5,6,7,8].map(e=>({text:e+"px",value:e.toString()})),cssClass:"dx-diagram-sm-edit-item"},lineStyle:{command:n.StrokeStyle,text:Wn.A.format("dxDiagram-commandLineStyle"),hint:Wn.A.format("dxDiagram-commandLineStyle"),widget:"dxSelectBox",items:[{value:"",menuIcon:"dx-diagram-i-line-solid dx-diagram-i",hint:Wn.A.format("dxDiagram-commandLineStyleSolid")},{value:"2,2",menuIcon:"dx-diagram-i-line-dotted dx-diagram-i",hint:Wn.A.format("dxDiagram-commandLineStyleDotted")},{value:"6,2",menuIcon:"dx-diagram-i-line-dashed dx-diagram-i",hint:Wn.A.format("dxDiagram-commandLineStyleDashed")}],cssClass:"dx-diagram-image-dropdown-item"},fillColor:{command:n.FillColor,text:Wn.A.format("dxDiagram-commandFillColor"),hint:Wn.A.format("dxDiagram-commandFillColor"),widget:"dxColorBox",icon:"dx-diagram-i dx-diagram-i-button-fill",menuIcon:"dx-diagram-i dx-diagram-i-menu-fill",cssClass:"dx-diagram-color-edit-item"},textAlignLeft:{command:n.TextLeftAlign,hint:Wn.A.format("dxDiagram-commandAlignLeft"),text:Wn.A.format("dxDiagram-commandAlignLeft"),icon:"alignleft",menuIcon:"alignleft"},textAlignCenter:{command:n.TextCenterAlign,hint:Wn.A.format("dxDiagram-commandAlignCenter"),text:Wn.A.format("dxDiagram-commandAlignCenter"),icon:"aligncenter",menuIcon:"aligncenter"},textAlignRight:{command:n.TextRightAlign,hint:Wn.A.format("dxDiagram-commandAlignRight"),text:Wn.A.format("dxDiagram-commandAlignRight"),icon:"alignright",menuIcon:"alignright"},lock:{command:n.Lock,hint:Wn.A.format("dxDiagram-commandLock"),text:Wn.A.format("dxDiagram-commandLock"),icon:"dx-diagram-i-button-lock dx-diagram-i",menuIcon:"dx-diagram-i-menu-lock dx-diagram-i"},unlock:{command:n.Unlock,hint:Wn.A.format("dxDiagram-commandUnlock"),text:Wn.A.format("dxDiagram-commandUnlock"),icon:"dx-diagram-i-button-unlock dx-diagram-i",menuIcon:"dx-diagram-i-menu-unlock dx-diagram-i"},bringToFront:{command:n.BringToFront,hint:Wn.A.format("dxDiagram-commandBringToFront"),text:Wn.A.format("dxDiagram-commandBringToFront"),icon:"dx-diagram-i-button-bring-to-front dx-diagram-i",menuIcon:"dx-diagram-i-menu-bring-to-front dx-diagram-i"},sendToBack:{command:n.SendToBack,hint:Wn.A.format("dxDiagram-commandSendToBack"),text:Wn.A.format("dxDiagram-commandSendToBack"),icon:"dx-diagram-i-button-send-to-back dx-diagram-i",menuIcon:"dx-diagram-i-menu-send-to-back dx-diagram-i"},insertShapeImage:{command:n.InsertShapeImage,text:Wn.A.format("dxDiagram-commandInsertShapeImage"),icon:"dx-diagram-i-button-image-insert dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-insert dx-diagram-i"},editShapeImage:{command:n.EditShapeImage,text:Wn.A.format("dxDiagram-commandEditShapeImage"),icon:"dx-diagram-i-button-image-edit dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-edit dx-diagram-i"},deleteShapeImage:{command:n.DeleteShapeImage,text:Wn.A.format("dxDiagram-commandDeleteShapeImage"),icon:"dx-diagram-i-button-image-delete dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-delete dx-diagram-i"},connectorLineType:{command:n.ConnectorLineOption,widget:"dxSelectBox",hint:Wn.A.format("dxDiagram-commandConnectorLineType"),text:Wn.A.format("dxDiagram-commandConnectorLineType"),items:[{value:0,menuIcon:"dx-diagram-i-connector-straight dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineStraight"),text:Wn.A.format("dxDiagram-commandConnectorLineStraight")},{value:1,menuIcon:"dx-diagram-i-connector-orthogonal dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineOrthogonal"),text:Wn.A.format("dxDiagram-commandConnectorLineOrthogonal")}],cssClass:"dx-diagram-image-dropdown-item"},connectorLineStart:{command:n.ConnectorStartLineEnding,widget:"dxSelectBox",items:[{value:0,menuIcon:"dx-diagram-i-connector-begin-none dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineNone"),text:Wn.A.format("dxDiagram-commandConnectorLineNone")},{value:1,menuIcon:"dx-diagram-i-connector-begin-arrow dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineArrow"),text:Wn.A.format("dxDiagram-commandConnectorLineArrow")},{value:2,menuIcon:"dx-diagram-i-connector-begin-outlined-triangle dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineArrow"),text:Wn.A.format("dxDiagram-commandConnectorLineArrow")},{value:3,menuIcon:"dx-diagram-i-connector-begin-filled-triangle dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineArrow"),text:Wn.A.format("dxDiagram-commandConnectorLineArrow")}],hint:Wn.A.format("dxDiagram-commandConnectorLineStart"),text:Wn.A.format("dxDiagram-commandConnectorLineStart"),cssClass:"dx-diagram-image-dropdown-item"},connectorLineEnd:{command:n.ConnectorEndLineEnding,widget:"dxSelectBox",items:[{value:0,menuIcon:"dx-diagram-i-connector-end-none dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineNone"),text:Wn.A.format("dxDiagram-commandConnectorLineNone")},{value:1,menuIcon:"dx-diagram-i-connector-end-arrow dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineArrow"),text:Wn.A.format("dxDiagram-commandConnectorLineArrow")},{value:2,menuIcon:"dx-diagram-i-connector-end-outlined-triangle dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineArrow"),text:Wn.A.format("dxDiagram-commandConnectorLineArrow")},{value:3,menuIcon:"dx-diagram-i-connector-end-filled-triangle dx-diagram-i",hint:Wn.A.format("dxDiagram-commandConnectorLineArrow"),text:Wn.A.format("dxDiagram-commandConnectorLineArrow")}],hint:Wn.A.format("dxDiagram-commandConnectorLineEnd"),text:Wn.A.format("dxDiagram-commandConnectorLineEnd"),cssClass:"dx-diagram-image-dropdown-item"},layoutTreeTopToBottom:{command:n.AutoLayoutTreeVertical,text:Wn.A.format("dxDiagram-commandLayoutTopToBottom"),hint:Wn.A.format("dxDiagram-commandLayoutTopToBottom"),icon:"dx-diagram-i-button-layout-tree-tb dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutTreeBottomToTop:{command:n.AutoLayoutTreeVerticalBottomToTop,text:Wn.A.format("dxDiagram-commandLayoutBottomToTop"),hint:Wn.A.format("dxDiagram-commandLayoutBottomToTop"),icon:"dx-diagram-i-button-layout-tree-bt dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutTreeLeftToRight:{command:n.AutoLayoutTreeHorizontal,text:Wn.A.format("dxDiagram-commandLayoutLeftToRight"),hint:Wn.A.format("dxDiagram-commandLayoutLeftToRight"),icon:"dx-diagram-i-button-layout-tree-lr dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutTreeRightToLeft:{command:n.AutoLayoutTreeHorizontalRightToLeft,text:Wn.A.format("dxDiagram-commandLayoutRightToLeft"),hint:Wn.A.format("dxDiagram-commandLayoutRightToLeft"),icon:"dx-diagram-i-button-layout-tree-rl dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutLayeredTopToBottom:{command:n.AutoLayoutLayeredVertical,text:Wn.A.format("dxDiagram-commandLayoutTopToBottom"),hint:Wn.A.format("dxDiagram-commandLayoutTopToBottom"),icon:"dx-diagram-i-button-layout-layered-tb dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutLayeredBottomToTop:{command:n.AutoLayoutLayeredVerticalBottomToTop,text:Wn.A.format("dxDiagram-commandLayoutBottomToTop"),hint:Wn.A.format("dxDiagram-commandLayoutBottomToTop"),icon:"dx-diagram-i-button-layout-layered-bt dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutLayeredLeftToRight:{command:n.AutoLayoutLayeredHorizontal,text:Wn.A.format("dxDiagram-commandLayoutLeftToRight"),hint:Wn.A.format("dxDiagram-commandLayoutLeftToRight"),icon:"dx-diagram-i-button-layout-layered-lr dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},layoutLayeredRightToLeft:{command:n.AutoLayoutLayeredHorizontalRightToLeft,text:Wn.A.format("dxDiagram-commandLayoutRightToLeft"),hint:Wn.A.format("dxDiagram-commandLayoutRightToLeft"),icon:"dx-diagram-i-button-layout-layered-rl dx-diagram-i",cssClass:zc_LARGE_ICON_ITEM},fullScreen:{command:n.Fullscreen,hint:Wn.A.format("dxDiagram-commandFullscreen"),text:Wn.A.format("dxDiagram-commandFullscreen"),icon:"dx-diagram-i dx-diagram-i-button-fullscreen",menuIcon:"dx-diagram-i dx-diagram-i-menu-fullscreen",cssClass:"dx-diagram-color-edit-item"},units:{command:n.ViewUnits,hint:Wn.A.format("dxDiagram-commandUnits"),text:Wn.A.format("dxDiagram-commandUnits"),widget:"dxSelectBox"},simpleView:{command:n.ToggleSimpleView,hint:Wn.A.format("dxDiagram-commandSimpleView"),text:Wn.A.format("dxDiagram-commandSimpleView"),widget:"dxCheckBox"},showGrid:{command:n.ShowGrid,hint:Wn.A.format("dxDiagram-commandShowGrid"),text:Wn.A.format("dxDiagram-commandShowGrid"),widget:"dxCheckBox"},snapToGrid:{command:n.SnapToGrid,hint:Wn.A.format("dxDiagram-commandSnapToGrid"),text:Wn.A.format("dxDiagram-commandSnapToGrid"),widget:"dxCheckBox"},gridSize:{command:n.GridSize,hint:Wn.A.format("dxDiagram-commandGridSize"),text:Wn.A.format("dxDiagram-commandGridSize"),widget:"dxSelectBox"},pageSize:{command:n.PageSize,hint:Wn.A.format("dxDiagram-commandPageSize"),text:Wn.A.format("dxDiagram-commandPageSize"),widget:"dxSelectBox",cssClass:"dx-diagram-lg-edit-item",getCommandValue:e=>JSON.parse(e),getEditorValue:e=>JSON.stringify(e)},pageOrientation:{command:n.PageLandscape,hint:Wn.A.format("dxDiagram-commandPageOrientation"),text:Wn.A.format("dxDiagram-commandPageOrientation"),widget:"dxSelectBox",items:[{value:!0,text:Wn.A.format("dxDiagram-commandPageOrientationLandscape")},{value:!1,text:Wn.A.format("dxDiagram-commandPageOrientationPortrait")}],cssClass:"dx-diagram-md-edit-item"},pageColor:{command:n.PageColor,hint:Wn.A.format("dxDiagram-commandPageColor"),text:Wn.A.format("dxDiagram-commandPageColor"),widget:"dxColorBox",icon:"dx-diagram-i dx-diagram-i-button-fill",menuIcon:"dx-diagram-i dx-diagram-i-menu-fill",cssClass:"dx-diagram-color-edit-item"},zoomLevel:{command:n.ZoomLevel,hint:Wn.A.format("dxDiagram-commandZoomLevel"),text:Wn.A.format("dxDiagram-commandZoomLevel"),widget:"dxTextBox",items:[Om,{command:n.FitToScreen,hint:Wn.A.format("dxDiagram-commandFitToContent"),text:Wn.A.format("dxDiagram-commandFitToContent")},{command:n.FitToWidth,hint:Wn.A.format("dxDiagram-commandFitToWidth"),text:Wn.A.format("dxDiagram-commandFitToWidth")},Om,{command:n.AutoZoomToContent,hint:Wn.A.format("dxDiagram-commandAutoZoomByContent"),text:Wn.A.format("dxDiagram-commandAutoZoomByContent")},{command:n.AutoZoomToWidth,hint:Wn.A.format("dxDiagram-commandAutoZoomByWidth"),text:Wn.A.format("dxDiagram-commandAutoZoomByWidth")}],getEditorDisplayValue:e=>Math.round(100*e)+"%",cssClass:"dx-diagram-sm-edit-item"},toolbox:{command:this.SHOW_TOOLBOX_COMMAND_NAME,iconChecked:"dx-diagram-i dx-diagram-i-button-toolbox-close",iconUnchecked:"dx-diagram-i dx-diagram-i-button-toolbox-open",hint:Wn.A.format("dxDiagram-uiShowToolbox"),text:Wn.A.format("dxDiagram-uiShowToolbox")},propertiesPanel:{command:this.SHOW_PROPERTIES_PANEL_COMMAND_NAME,iconChecked:"close",iconUnchecked:"dx-diagram-i dx-diagram-i-button-properties-panel-open",hint:Wn.A.format("dxDiagram-uiProperties"),text:Wn.A.format("dxDiagram-uiProperties")}})},getMainToolbarCommands:function(n,e){const t=this.getAllCommands(),i=n?this._getPreparedCommands(t,n):this._getDefaultMainToolbarCommands(t);return this._prepareToolbarCommands(i,e)},_getDefaultMainToolbarCommands:function(n){return this._defaultMainToolbarCommands||(this._defaultMainToolbarCommands=[n.undo,n.redo,n.separator,n.fontName,n.fontSize,n.bold,n.italic,n.underline,n.separator,n.lineWidth,n.lineStyle,n.separator,n.fontColor,n.lineColor,n.fillColor,n.separator,n.textAlignLeft,n.textAlignCenter,n.textAlignRight,n.separator,n.connectorLineType,n.connectorLineStart,n.connectorLineEnd,n.separator,{text:Wn.A.format("dxDiagram-uiLayout"),showText:"always",items:[{text:Wn.A.format("dxDiagram-uiLayoutTree"),items:[n.layoutTreeTopToBottom,n.layoutTreeBottomToTop,n.layoutTreeLeftToRight,n.layoutTreeRightToLeft]},{text:Wn.A.format("dxDiagram-uiLayoutLayered"),items:[n.layoutLayeredTopToBottom,n.layoutLayeredBottomToTop,n.layoutLayeredLeftToRight,n.layoutLayeredRightToLeft]}]}])},getHistoryToolbarCommands:function(n,e){const t=this.getAllCommands(),i=n?this._getPreparedCommands(t,n):this._getDefaultHistoryToolbarCommands(t);return this._prepareToolbarCommands(i,e)},_getDefaultHistoryToolbarCommands:function(n){return this._defaultHistoryToolbarCommands||(this._defaultHistoryToolbarCommands=[n.undo,n.redo,n.separator,n.toolbox])},getViewToolbarCommands:function(n,e){const t=this.getAllCommands(),i=n?this._getPreparedCommands(t,n):this._getDefaultViewToolbarCommands(t);return this._prepareToolbarCommands(i,e)},_getDefaultViewToolbarCommands:function(n){return this._defaultViewToolbarCommands||(this._defaultViewToolbarCommands=[n.zoomLevel,n.separator,n.fullScreen,n.separator,{widget:"dxButton",icon:"export",text:Wn.A.format("dxDiagram-uiExport"),hint:Wn.A.format("dxDiagram-uiExport"),items:[n.exportSvg,n.exportPng,n.exportJpg]},{icon:"preferences",hint:Wn.A.format("dxDiagram-uiSettings"),text:Wn.A.format("dxDiagram-uiSettings"),items:[n.units,n.separator,n.showGrid,n.snapToGrid,n.gridSize,n.separator,n.simpleView,n.toolbox]}])},getPropertiesToolbarCommands:function(n,e){const t=this.getAllCommands(),i=n?this._getPreparedCommands(t,n):this._getDefaultPropertiesToolbarCommands(t);return this._prepareToolbarCommands(i,e)},_getDefaultPropertiesToolbarCommands:function(n){return this._defaultPropertiesToolbarCommands||(this._defaultPropertiesToolbarCommands=[n.propertiesPanel])},_getDefaultPropertyPanelCommandGroups:function(){return this._defaultPropertyPanelCommandGroups||(this._defaultPropertyPanelCommandGroups=[{title:Wn.A.format("dxDiagram-uiStyle"),groups:[{title:Wn.A.format("dxDiagram-uiText"),commands:["fontName","fontSize","bold","italic","underline","textAlignLeft","textAlignCenter","textAlignRight","fontColor"]},{title:Wn.A.format("dxDiagram-uiObject"),commands:["lineStyle","lineWidth","lineColor","fillColor"]},{title:Wn.A.format("dxDiagram-uiConnector"),commands:["connectorLineType","connectorLineStart","connectorLineEnd"]}]},{title:Wn.A.format("dxDiagram-uiLayout"),groups:[{title:Wn.A.format("dxDiagram-uiLayoutLayered"),commands:["layoutLayeredTopToBottom","layoutLayeredBottomToTop","layoutLayeredLeftToRight","layoutLayeredRightToLeft"]},{title:Wn.A.format("dxDiagram-uiLayoutTree"),commands:["layoutTreeTopToBottom","layoutTreeBottomToTop","layoutTreeLeftToRight","layoutTreeRightToLeft"]}]},{title:Wn.A.format("dxDiagram-uiDiagram"),groups:[{title:Wn.A.format("dxDiagram-uiPage"),commands:["pageSize","pageOrientation","pageColor"]}]}])},_preparePropertyPanelGroups:function(n){const e=this.getAllCommands(),t=[];return n.forEach(i=>{let m,r=i.commands;r&&(r=this._getPreparedCommands(e,r),r=this._prepareToolbarCommands(r)),i.groups&&(m=[],i.groups.forEach(A=>{let V=A.commands;V&&(V=this._getPreparedCommands(e,V),V=this._prepareToolbarCommands(V)),m.push({title:A.title,commands:V})})),t.push({title:i.title,commands:r,groups:m})}),t},getPropertyPanelCommandTabs:function(n){return n=n||this._getDefaultPropertyPanelCommandGroups(),this._preparePropertyPanelGroups(n)},getContextMenuCommands:function(n){const e=this.getAllCommands(),t=n?this._getPreparedCommands(e,n):this._getDefaultContextMenuCommands(e);return this._prepareContextMenuCommands(t)},_getDefaultContextMenuCommands:function(n){return this._defaultContextMenuCommands||(this._defaultContextMenuCommands=[n.cut,n.copy,n.paste,n.delete,n.separator,n.selectAll,n.separator,n.bringToFront,n.sendToBack,n.separator,n.lock,n.unlock,n.separator,n.insertShapeImage,n.editShapeImage,n.deleteShapeImage])},_getPreparedCommands(n,e){return e.map(t=>{if(t.widget&&t.widget===_I)return{command:t,location:t.location};if(n[t])return n[t];if(t.text||t.icon||t.name){const i=t.name&&n[t.name],r={command:i&&i.command,name:t.name,location:t.location,text:t.text||i&&i.text,hint:t.text||i&&i.hint,icon:t.icon||i&&i.icon,menuIcon:t.icon||i&&i.menuIcon,widget:i&&i.widget,cssClass:i&&i.cssClass,getParameter:i&&i.getParameter,getCommandValue:i&&i.getCommandValue,getEditorValue:i&&i.getEditorValue,getEditorDisplayValue:i&&i.getEditorDisplayValue,iconChecked:i&&i.iconChecked,iconUnchecked:i&&i.iconUnchecked};return r.items=Array.isArray(t.items)?this._getPreparedCommands(n,t.items):i&&i.items,r}}).filter(t=>t)},_prepareContextMenuCommands(n,e,t){let i=!1;return n.map(r=>{if(this._isValidCommand(r,e)){if(!r.widget||r.widget!==_I){const m=this._cloneCommand(r,e);return m.icon=m.menuIcon,m.beginGroup=i,m.rootCommand=m.command?void 0:t&&t.command,i=!1,m}i=!0}}).filter(r=>r)},_prepareToolbarCommands(n,e){return n.map(t=>{if(this._isValidCommand(t,e))return this._cloneCommand(t,e)}).filter(t=>t).filter((t,i,r)=>(t.widget!==_I||i!==r.length-1)&&t)},_cloneCommand(n,e){const t=(0,_.X)({},n);return Array.isArray(n.items)&&(t.items=this._prepareContextMenuCommands(n.items,e,t)),t},_isValidCommand:(n,e)=>-1===(e=e||[]).indexOf(n.command),_exportTo(n,e,t,i){const r=(0,gr.zk)();if(r&&r.atob&&(0,C.Tn)(r.Blob)){const m=this._getBlobByDataURI(r,e,i),A=n.option("export");QS.saveAs(A.fileName||"foo",t,m)}},_getBlobByDataURI(n,e,t){const i=n.atob(e.split(",")[1]),r=new Uint8Array(i.length);for(let m=0;m<i.length;m++)r[m]=i.charCodeAt(m);return new n.Blob([r.buffer],{type:t})}},kN=class T1 extends lw{_getCommands(){return Qd.getMainToolbarCommands(this.option("commands"),this.option("excludeCommands"))}},LN=class D1 extends lw{_getCommands(){return Qd.getHistoryToolbarCommands(this.option("commands"),this._getExcludeCommands())}_getExcludeCommands(){const e=[].concat(this.option("excludeCommands"));return this.option("isMobileView")||e.push(Qd.SHOW_TOOLBOX_COMMAND_NAME),e}},cw=class sC extends lw{_getCommands(){return Qd.getViewToolbarCommands(this.option("commands"),this.option("excludeCommands"))}},NN=class BN extends lw{_getCommands(){return Qd.getPropertiesToolbarCommands()}};class wm extends H_.A{_renderContextMenuOverlay(){super._renderContextMenuOverlay(),this._overlay&&this.option("isTouchBarMode")&&this._overlay&&this._overlay.option("onShown",()=>{(0,a.A)(this._overlay.$content()).parent().addClass("dx-diagram-touchbar-overlay")})}}class VN extends rw{constructor(e){super(e)}getCommandKeys(){return this._getKeys(this._owner._commands)}setItemValue(e,t){this._owner._setItemValue(e,t)}setItemEnabled(e,t){this._owner._setItemEnabled(e,t)}setItemVisible(e,t){this._owner._setItemVisible(e,t)}setItemSubItems(e,t){this._owner._setItemSubItems(e,t)}setEnabled(e){this._owner._setEnabled(e)}isVisible(){return this._owner.isVisible()}}const HN_DiagramContextMenuWrapper=class I1 extends Sl.A{_init(){super._init(),this._createOnVisibilityChangingAction(),this._createOnInternalCommand(),this._createOnCustomCommand(),this._createOnItemClickAction(),this._tempState=void 0,this._commands=[],this._commandToIndexMap={},this.bar=new VN(this)}_initMarkup(){super._initMarkup(),this._commands=this._getCommands(),this._commandToIndexMap={},this._fillCommandToIndexMap(this._commands,[]),this._$contextMenuTargetElement=(0,a.A)("<div>").addClass("dx-diagram-touchbar-target").appendTo(this.$element());const e=(0,a.A)("<div>").appendTo(this.$element());this._contextMenuInstance=this._createComponent(e,wm,{isTouchBarMode:this._isTouchBarMode(),cssClass:this._isTouchBarMode()?"dx-diagram-touchbar":Rd.getContextMenuCssClass(),hideOnOutsideClick:!1,showEvent:"",focusStateEnabled:!1,items:this._commands,position:this._isTouchBarMode()?{my:{x:"center",y:"bottom"},at:{x:"center",y:"top"},of:this._$contextMenuTargetElement}:{},itemTemplate:function(t,i,r){Rd.getContextMenuItemTemplate(this,t,i,r)},onItemClick:t=>{let{itemData:i}=t;return this._onItemClick(i)},onShowing:t=>{!0!==this._inOnShowing&&(this._inOnShowing=!0,this._onVisibilityChangingAction({visible:!0,component:this}),t.component.option("items",t.component.option("items")),delete this._inOnShowing)}})}_show(e,t,i){if(this._contextMenuInstance.hide(),this._isTouchBarMode()){this._$contextMenuTargetElement.show(),i||(i={x:e,y:t,width:0,height:0});const r=i.width>800?0:(800-i.width)/2;this._$contextMenuTargetElement.css({left:i.x-r,top:i.y-32,width:i.width+2*r,height:i.height+64}),this._contextMenuInstance.show()}else this._contextMenuInstance.option("position",{offset:e+" "+t}),this._contextMenuInstance.show()}_hide(){this._$contextMenuTargetElement.hide(),this._contextMenuInstance.hide()}_isTouchBarMode(){const{Browser:e}=As();return e.TouchUI}_onItemClick(e){let t=!1;this._onItemClickAction&&(t=this._onItemClickAction(e)),t||(Rd.onContextMenuItemClick(this,e,this._executeCommand.bind(this)),this._contextMenuInstance.hide())}_executeCommand(e,t,i){"number"==typeof e?this.bar.raiseBarCommandExecuted(e,i):"string"==typeof e&&this._onInternalCommandAction({command:e}),void 0!==t&&this._onCustomCommandAction({name:t})}_createOnInternalCommand(){this._onInternalCommandAction=this._createActionByOption("onInternalCommand")}_createOnCustomCommand(){this._onCustomCommandAction=this._createActionByOption("onCustomCommand")}_getCommands(){return Qd.getContextMenuCommands(this.option("commands"))}_fillCommandToIndexMap(e,t){e.forEach((i,r)=>{const m=t.concat([r]);void 0!==i.command&&(this._commandToIndexMap[i.command]=m),Array.isArray(i.items)&&this._fillCommandToIndexMap(i.items,m)})}_setItemEnabled(e,t){this._setItemVisible(e,t)}_setItemVisible(e,t){const i=Rd.getItemOptionText(this._contextMenuInstance,this._commandToIndexMap[e]);Rd.updateContextMenuItemVisible(this._contextMenuInstance,i,t)}_setItemValue(e,t){const i=Rd.getItemOptionText(this._contextMenuInstance,this._commandToIndexMap[e]);Rd.updateContextMenuItemValue(this._contextMenuInstance,i,e,t)}_setItemSubItems(e,t){const i=Rd.getItemOptionText(this._contextMenuInstance,this._commandToIndexMap[e]);Rd.updateContextMenuItems(this._contextMenuInstance,i,e,t)}_setEnabled(e){this._contextMenuInstance.option("disabled",!e)}isVisible(){return this._inOnShowing}_createOnVisibilityChangingAction(){this._onVisibilityChangingAction=this._createActionByOption("onVisibilityChanging")}_createOnItemClickAction(){this._onItemClickAction=this._createActionByOption("onItemClick")}_optionChanged(e){switch(e.name){case"onVisibilityChanging":this._createOnVisibilityChangingAction();break;case"onInternalCommand":this._createOnInternalCommand();break;case"onCustomCommand":this._createOnCustomCommand();break;case"onItemClick":this._createOnItemClickAction();break;case"commands":this._invalidate();break;case"export":break;default:super._optionChanged(e)}}};var Dy=M(3608);const uw=class Au extends Sl.A{_init(){super._init(),this._onShownAction=this._createActionByOption("onShown");const e=(0,gr.zk)();this._popoverPositionData=[{my:{x:"center",y:"top"},at:{x:"center",y:"bottom"},offset:{x:0,y:5},calcMaxHeight:t=>Math.max(150,e.innerHeight-t.bottom-6)},{my:{x:"right",y:"center"},at:{x:"left",y:"center"},offset:{x:-5,y:0},calcMaxHeight:t=>Math.max(150,2*Math.min(t.top,e.innerHeight-t.bottom)-2)},{my:{x:"center",y:"bottom"},at:{x:"center",y:"top"},offset:{x:0,y:-5},calcMaxHeight:t=>Math.max(150,t.top-6)},{my:{x:"left",y:"center"},at:{x:"right",y:"center"},offset:{x:5,y:0},calcMaxHeight:t=>Math.max(150,2*Math.min(t.top,e.innerHeight-t.bottom)-2)}]}_initMarkup(){super._initMarkup(),this._$popoverTargetElement=(0,a.A)("<div>").addClass("dx-diagram-context-toolbox-target").appendTo(this.$element());const e=(0,a.A)("<div>").addClass("dx-diagram-context-toolbox").appendTo(this.$element());this._isTouchMode()&&e.addClass("dx-diagram-touch-context-toolbox"),this._popoverInstance=this._createComponent(e,Dy.A,{hideOnOutsideClick:!1,container:this.$element()})}_isTouchMode(){const{Browser:e}=As();return e.TouchUI}_show(e,t,i,r,m){this._popoverInstance.hide(),this._$popoverTargetElement.css({left:e+this._popoverPositionData[i].offset.x,top:t+this._popoverPositionData[i].offset.y}).show();const A=(0,gr.zk)(),V=this._$popoverTargetElement.get(0);this._$popoverTargetElement.css({left:V.offsetLeft-(V.getBoundingClientRect().left+A.scrollX-V.offsetLeft),top:V.offsetTop-(V.getBoundingClientRect().top+A.scrollY-V.offsetTop)});const X=V.getBoundingClientRect();this._popoverInstance.option({maxHeight:this._popoverPositionData[i].calcMaxHeight(X),width:void 0!==this.option("toolboxWidth")?this.option("toolboxWidth"):void 0,position:{my:this._popoverPositionData[i].my,at:this._popoverPositionData[i].at,of:this._$popoverTargetElement},contentTemplate:()=>(0,a.A)("<div>").append((0,a.A)("<div>").addClass("dx-diagram-context-toolbox-content")).dxScrollView({width:"100%",height:"100%"}),onContentReady:()=>{const ce=this.$element().find(".dx-diagram-context-toolbox-content");this._onShownAction({category:r,callback:m,$element:ce,hide:()=>this._popoverInstance.hide()})}}),this._popoverInstance.show()}_hide(){this._$popoverTargetElement.hide(),this._popoverInstance.hide()}};var bg=M(8628);const M1=class GN extends Sl.A{_init(){super._init(),this._command=void 0,this._isShown=!1,this._createOnGetContentOption(),this._createOnHiddenOption()}_initMarkup(){super._initMarkup(),this._command=this.option("command"),this._$popupElement=(0,a.A)("<div>").appendTo(this.$element()),this._popup=this._createComponent(this._$popupElement,bg.A,{title:this.option("title"),maxWidth:this.option("maxWidth"),height:this.option("height"),toolbarItems:this.option("toolbarItems"),onHidden:this._onHiddenAction})}_clean(){delete this._popup,this._$popupElement&&this._$popupElement.remove()}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{title:"",maxWidth:500,height:"auto",toolbarItems:this._getToolbarItems()})}_getToolbarItems(){return[this._getOkToolbarItem(),this._getCancelToolbarItem()]}_getOkToolbarItem(){return{widget:"dxButton",location:"after",toolbar:"bottom",options:{text:Wn.A.format("dxDiagram-dialogButtonOK"),onClick:function(){this._command.execute(this._commandParameter),this._hide()}.bind(this)}}}_getCancelToolbarItem(){return{widget:"dxButton",location:"after",toolbar:"bottom",options:{text:Wn.A.format("dxDiagram-dialogButtonCancel"),onClick:this._hide.bind(this)}}}_optionChanged(e){switch(e.name){case"title":case"maxWidth":case"height":case"toolbarItems":this._popup.option(e.name,e.value);break;case"command":this._command=e.value;break;case"onGetContent":this._createOnGetContentOption();break;case"onHidden":this._createOnHiddenOption();break;default:super._optionChanged(e)}}_createOnGetContentOption(){this._onGetContentAction=this._createActionByOption("onGetContent")}_createOnHiddenOption(){this._onHiddenAction=this._createActionByOption("onHidden")}_hide(){this._popup.hide(),this._isShown=!1}_show(){this._popup.$content().empty().append(this._onGetContentAction()),this._popup.show(),this._isShown=!0}isVisible(){return this._isShown}};var Af=M(9994),Ay=M(1614),aC=M(1221),sa=M(9061);const If=function(n,e,t,i){const r=n._initProperties=n._initProperties||{},m=i?t:n[e];(!Object.prototype.hasOwnProperty.call(r,e)||i)&&"_initProperties"!==e&&(r[e]=m),n[e]=t};let R1=new Date;function hw(n){const e=function(t,i,r,m,A,V){let X,ce;function _e(Me,Ve,Je){(0,g.z7)(e(t,i,r,m,Ve,Je)).done(Me.resolve)}for(m=m||[],t=t||[],X=A=A||0;X<t.length;X+=1){if(n&&X>A&&X%1e4==0&&new Date-R1>=300)return R1=new Date,ce=new g.cY,_e(ce,X,!1),ce;const Me=t[X];if(!V){if(m.unshift(Me),r&&!1===i(m,X))return;if(Me.children){const Ve=e(Me.children,i,r,m);if(n&&Ve)return ce=new g.cY,Ve.done(_e(ce,X,!0)),ce}}if(V=!1,!r&&!1===i(m,X))return;m.shift(),t[X]!==Me&&(X-=1)}};return e}const td=hw(!1),z_=hw(!0);function lC(n,e){if(n&&(0,C.O9)(e))for(let t=0;t<n.length;t+=1){const i=n[t];if(i.name===e||i.caption===e||i.dataField===e||i.index===e)return t}return-1}function SS(n,e){const i={value:n,valueText:n==n&&Hd.A.format(n,e.format)||""};return e.customizeText?e.customizeText.call(e,i):i.valueText}function Iy(n){return function(e,t){let i=0;const r=n(e),m=n(t),A=(0,C.O9)(r),V=(0,C.O9)(m);return A&&V&&(r>m?i=1:r<m&&(i=-1)),A&&!V&&(i=1),!A&&V&&(i=-1),i}}function Zu(n){const e=[];for(let t=n.length-1;t>=0;t-=1)e.push(n[t].key||n[t].value);return e}function Ox(n,e,t,i){t=t||0,i=i||"children",n.length&&e(n,t);for(let r=0;r<n.length;r+=1){const m=n[r];m[i]&&m[i].length&&Ox(m[i],e,t+1,i)}}function k1(n,e){const t=[];for(let i=0;i<n.length;i+=1)t.push(Math.max(n[i]||0,e[i]||0));return t}function Py(n,e){const t=n[e];let i=0;for(n.headerName===e?i=n.path.length:n.headerName&&n.headerName!==e&&n.oppositePath?i=n.oppositePath.length:(0,w.__)(("columns"===e?n.columnExpandedPaths:n.rowExpandedPaths)||[],(m,A)=>{i=Math.max(i,A.length)});t[i+1]&&t[i].expanded;)i+=1;return i}function jN(n,e,t,i){const r=[];return Object.keys(e||[]).forEach(m=>{if(m&&m.startsWith("__"))return;let A=1;const V=t.length?`${t}.${m}`:m;let X=i[V];const ce=(0,fa.Hz)(V);let Me,_e=e[m];for(;!(0,C.O9)(_e)&&n[A];)_e=ce(n[A]),A+=1;!X&&(0,C.O9)(_e)&&(X=(0,C.NW)(_e)),Me=[{dataField:V,dataType:X,groupName:"date"===X?m:void 0,groupInterval:void 0,displayFolder:t}],"date"===X?Me=Me.concat(function ES(n){return(0,w.Tj)(["year","quarter","month"],(e,t)=>(0,_.X)({},n,{groupInterval:e,groupIndex:t}))}(Me[0])):"object"===X&&(Me=jN(n,_e,V,i)),r.push.apply(r,Me)}),r}function vI(n,e){const t=CI(e);return jN(n,n[0],"",t)}function CI(n){const e={};return(0,w.__)(n,(t,i)=>{e[i.dataField]=e[i.dataField]||i.dataType}),e}const H2={month:n=>sa.A.getMonthNames()[n-1],quarter:n=>sa.A.format(new Date(2e3,3*n-1),"quarter"),dayOfWeek:n=>sa.A.getDayNames()[n]};function OS(n){if("date"===n.dataType)n.format||If(n,"format",H2[n.groupInterval]);else if("number"===n.dataType){const e=(0,C.kf)(n.groupInterval)&&n.groupInterval>0&&n.groupInterval;e&&!n.customizeText&&If(n,"customizeText",t=>{const r=Hd.A.format(t.value+e,n.format);return t.valueText&&r?`${t.valueText} - ${r}`:""})}}function cC(n,e){const t=[];e=e||[];for(let i=0;i<e.length;i+=1)t.push((0,_.X)({},n[i],{groupIndex:null,groupName:null,filterType:"include",filterValues:[e[i]]}));return t}const yI={createDrillDownDataSource(n,e){const t=this.getDrillDownItems(n,e);function i(m){return function(A){let V;return V=new g.cY,(0,g.z7)(t).done(X=>{new Ay.A(X)[m](A).done(V.resolve).fail(V.reject)}).fail(V.reject),V}}return new aC.q({load:i("load"),totalCount:i("totalCount"),key:this.key()})}};function Ch(n){return n.charAt(0).toUpperCase()+n.slice(1)}const My=n=>n.offsetWidth-n.clientWidth,Ap=(0,ov.A)(()=>{const n=c.A.getDocument();n.body.insertAdjacentHTML("beforeend",'<div class="dx-pivotgrid-scrollbar-measure-element"></div>');const e=n.body.lastElementChild,t=My(e);return e&&n.body.removeChild(e),t}),pw={setFieldProperty:If,sendRequest:function $N(n){return Cv.A.sendRequest(n)},foreachTree:td,foreachTreeAsync:z_,findField:lC,formatValue:SS,getCompareFunction:Iy,createPath:Zu,foreachDataLevel:Ox,mergeArraysByMaxValue:k1,getExpandedLevel:Py,discoverObjectFields:vI,getFieldsDataType:CI,setDefaultFieldValueFormatting:OS,getFiltersByPath:cC,storeDrillDownMixin:yI,capitalizeFirstLetter:Ch,getScrollbarWidth:My,calculateScrollbarWidth:Ap},XN=class KN extends Sl.A{_init(){super._init();const{EventDispatcher:e}=As();this.onScroll=new e,this._createOnCreateDiagramAction()}_initMarkup(){super._initMarkup();const e=(0,a.A)("<div>").appendTo(this.$element()),t={direction:"both",bounceEnabled:!1,scrollByContent:!1,onScroll:r=>{let{scrollOffset:m}=r;this._raiseOnScroll(m.left,m.top)}},i=this.option("useNativeScrolling");void 0!==i&&(t.useNative=i),this._scrollView=this._createComponent(e,Af.A,t),this._onCreateDiagramAction({$parent:(0,a.A)(this._scrollView.content()),scrollView:this})}setScroll(e,t){this._scrollView.scrollTo({left:e,top:t}),this._raiseOnScrollWithoutPoint()}offsetScroll(e,t){this._scrollView.scrollBy({left:e,top:t}),this._raiseOnScrollWithoutPoint()}getSize(){const{Size:e}=As(),t=this._scrollView.$element();return new e(Math.floor((0,D.RG)(t)),Math.floor((0,D.Oq)(t)))}getScrollContainer(){return this._scrollView.$element()[0]}getScrollBarWidth(){return this.option("useNativeScrolling")?Ap():0}detachEvents(){}_raiseOnScroll(e,t){const{Point:i}=As();this.onScroll.raise("notifyScrollChanged",()=>new i(e,t))}_raiseOnScrollWithoutPoint(){const{Point:e}=As();this.onScroll.raise("notifyScrollChanged",()=>new e(this._scrollView.scrollLeft(),this._scrollView.scrollTop()))}_createOnCreateDiagramAction(){this._onCreateDiagramAction=this._createActionByOption("onCreateDiagram")}_optionChanged(e){switch(e.name){case"onCreateDiagram":this._createOnCreateDiagramAction();break;case"useNativeScrolling":break;default:super._optionChanged(e)}}},L1={getDefaultGroups(){return this._groups||(this._groups={general:{category:"general",title:Wn.A.format("dxDiagram-categoryGeneral")},flowchart:{category:"flowchart",title:Wn.A.format("dxDiagram-categoryFlowchart")},orgChart:{category:"orgChart",title:Wn.A.format("dxDiagram-categoryOrgChart")},containers:{category:"containers",title:Wn.A.format("dxDiagram-categoryContainers")},custom:{category:"custom",title:Wn.A.format("dxDiagram-categoryCustom")}})},getGroups:function(n){const e=this.getDefaultGroups();return n?n.map(function(t){return"string"==typeof t?{category:t,title:e[t]&&e[t].title||t}:t}).filter(function(t){return t}):[e.general,e.flowchart,e.orgChart,e.containers]}};var bI=M(8910),B1=M(8787);const N1=class ZN extends mI{_init(){super._init(),this._createOnVisibilityChangingAction(),this._createOnVisibilityChangedAction()}isVisible(){return this.option("isVisible")}isMobileView(){return this.option("isMobileView")}_initMarkup(){super._initMarkup();const e=this.$element(),t=(0,a.A)("<div>").addClass(this._getPopupClass()).addClass(this.isMobileView()&&"dx-diagram-mobile-popup").appendTo(e);this._popup=this._createComponent(t,bg.A,this._getPopupOptions()),this._updatePopupVisible()}show(){this.option("isVisible",!0)}hide(){this.option("isVisible",!1)}toggle(){this.option("isVisible",!this.isVisible())}repaint(){this._popup.repaint()}_getPopupContent(){return this._popup.content()}_getPopupTitle(){return(0,a.A)(this._getPopupContent()).parent().find(".dx-popup-title")}_getPointerUpElements(){return[this._getPopupContent(),this._getPopupTitle()]}_getVerticalPaddingsAndBorders(){const e=(0,a.A)(this._getPopupContent());return(0,D.P$)(e)-(0,D.Oq)(e)}_getHorizontalPaddingsAndBorders(){const e=(0,a.A)(this._getPopupContent());return(0,D.Ot)(e)-(0,D.RG)(e)}_getPopupClass(){return""}_getPopupWidth(){return this.option("width")||"auto"}_getPopupMaxWidth(){return this.option("maxWidth")}_getPopupMinWidth(){return this.option("minWidth")}_getPopupHeight(){return this.option("height")||"auto"}_getPopupMaxHeight(){return this.option("maxHeight")}_getPopupMinHeight(){return this.option("minHeight")}_getPopupPosition(){return{}}_getPopupContainer(){return this.option("container")}_getPopupSlideAnimationObject(e){return(0,_.X)({type:"slide",start:()=>{(0,a.A)("body").css("overflow","hidden")},complete:()=>{(0,a.A)("body").css("overflow","")}},e)}_getPopupAnimation(){return{hide:{type:"fadeOut"},show:{type:"fadeIn"}}}_getPopupOptions(){const e=this;let t=this._getPopupClass();return this.isMobileView()&&(t+=" dx-diagram-mobile-popup"),{animation:(0,gr.Vd)()?this._getPopupAnimation():null,shading:!1,showTitle:!1,focusStateEnabled:!1,container:this._getPopupContainer(),width:this._getPopupWidth(),height:this._getPopupHeight(),maxWidth:this._getPopupMaxWidth(),maxHeight:this._getPopupMaxHeight(),minWidth:this._getPopupMinWidth(),minHeight:this._getPopupMinHeight(),position:this._getPopupPosition(),showCloseButton:!0,wrapperAttr:{class:t},onContentReady:function(){e._renderPopupContent(e._popup.content())},onShowing:()=>{this._onVisibilityChangingAction({visible:!0,component:this})},onShown:()=>{this.option("isVisible",!0),this._onVisibilityChangedAction({visible:!0,component:this})},onHiding:()=>{this._onVisibilityChangingAction({visible:!1,component:this})},onHidden:()=>{this.option("isVisible",!1),this._onVisibilityChangedAction({visible:!1,component:this})}}}_renderPopupContent(e){}_updatePopupVisible(){this._popup.option("visible",this.isVisible())}_createOnVisibilityChangingAction(){this._onVisibilityChangingAction=this._createActionByOption("onVisibilityChanging")}_createOnVisibilityChangedAction(){this._onVisibilityChangedAction=this._createActionByOption("onVisibilityChanged")}_optionChanged(e){switch(e.name){case"onVisibilityChanging":this._createOnVisibilityChangingAction();break;case"onVisibilityChanged":this._createOnVisibilityChangedAction();break;case"container":this._popup.option("container",this._getPopupContainer());break;case"width":this._popup.option("width",this._getPopupWidth());break;case"height":this._popup.option("height",this._getPopupHeight());break;case"maxWidth":this._popup.option("maxWidth",this._getPopupMaxWidth());break;case"maxHeight":this._popup.option("maxHeight",this._getPopupMaxHeight());break;case"minWidth":this._popup.option("minWidth",this._getPopupMinWidth());break;case"minHeight":this._popup.option("minHeight",this._getPopupMinHeight());break;case"isMobileView":this._invalidate();break;case"isVisible":this._updatePopupVisible();break;default:super._optionChanged(e)}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{isVisible:!0,isMobileView:!1,offsetX:0,offsetY:0})}},z1=class U1 extends N1{_init(){super._init(),this._toolboxes=[],this._filterText="",this._createOnShapeCategoryRenderedAction(),this._createOnFilterChangedAction()}_getPopupClass(){return"dx-diagram-toolbox-popup"}_getPopupHeight(){return this.isMobileView()?"100%":super._getPopupHeight()}_getPopupMaxHeight(){return this.isMobileView()?"100%":super._getPopupMaxHeight()}_getPopupMinHeight(){return 130}_getPopupPosition(){const t={my:"left top",at:"left top",of:this.option("offsetParent")};return this.isMobileView()?t:(0,_.X)(t,{offset:this.option("offsetX")+" "+this.option("offsetY")})}_getPopupAnimation(){const e=this.option("offsetParent");return this.isMobileView()?{hide:this._getPopupSlideAnimationObject({direction:"left",from:{position:{my:"left top",at:"left top",of:e}},to:{position:{my:"right top",at:"left top",of:e}}}),show:this._getPopupSlideAnimationObject({direction:"right",from:{position:{my:"right top",at:"left top",of:e}},to:{position:{my:"left top",at:"left top",of:e}}})}:super._getPopupAnimation()}_getPopupOptions(){const e=super._getPopupOptions();return this.isMobileView()?e:(0,_.X)(e,{showTitle:!0,toolbarItems:[{widget:"dxButton",location:"center",options:{activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,icon:"diagram-toolbox-drag",stylingMode:"outlined",type:"normal"}}]})}_renderPopupContent(e){let t="100%";if(this.option("showSearch")){const r=(0,a.A)("<div>").addClass("dx-diagram-toolbox-input-container").appendTo(e);this._updateElementWidth(r),this._renderSearchInput(r),(0,gr.Vd)()&&(t="calc(100% - "+(0,D.Oq)(this._searchInput.$element())+"px)")}const i=(0,a.A)("<div>").addClass("dx-diagram-toolbox-panel").appendTo(e);(0,D.k$)(i,t),this._updateElementWidth(i),this._renderScrollView(i)}_updateElementWidth(e){void 0!==this.option("toolboxWidth")&&e.css("width",this.option("toolboxWidth"))}updateMaxHeight(){if(this.isMobileView())return;let e=6;if(this._popup){const t=this._getPopupTitle();e+=(0,D.P$)(t)}this._accordion&&(e+=(0,D.P$)(this._accordion.$element())),this._searchInput&&(e+=(0,D.P$)(this._searchInput.$element())),this.option("maxHeight",e)}_renderSearchInput(e){const t=(0,a.A)("<div>").addClass("dx-diagram-toolbox-input").appendTo(e);this._searchInput=this._createComponent(t,bI.A,{stylingMode:"outlined",placeholder:Wn.A.format("dxDiagram-uiSearch"),onValueChanged:i=>{this._onInputChanged(i.value)},valueChangeEvent:"keyup",buttons:[{name:"search",location:"after",options:{activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,icon:"search",stylingMode:"outlined",type:"normal",onClick:()=>{this._searchInput.focus()}}}]})}_renderScrollView(e){const t=(0,a.A)("<div>").appendTo(e);this._scrollView=this._createComponent(t,Af.A);const i=this._scrollView._moveIsAllowed.bind(this._scrollView);this._scrollView._moveIsAllowed=m=>{for(let A=0;A<this._toolboxes.length;A++)if((0,a.A)(this._toolboxes[A]).children(".dxdi-tb-start-drag-flag").length)return!1;return i(m)};const r=(0,a.A)("<div>").appendTo(this._scrollView.content());this._updateElementWidth(r),this._renderAccordion(r)}_getAccordionDataSource(){const e=[],t=this.option("toolboxGroups");for(let i=0;i<t.length;i++){const r=t[i].category;e.push({category:r,title:t[i].title||r,expanded:t[i].expanded,displayMode:t[i].displayMode,shapes:t[i].shapes,onTemplate:(V,X,ce)=>{const _e=(0,a.A)(X);this._onShapeCategoryRenderedAction({category:ce.category,displayMode:ce.displayMode,dataToggle:"shape-toolbox-tooltip",shapes:ce.shapes,$element:_e}),this._toolboxes.push(_e),""!==this._filterText&&this._onFilterChangedAction({text:this._filterText,filteringToolboxes:this._toolboxes.length-1}),this._createTooltips(_e)}})}return e}_createTooltips(e){if(this._isTouchMode())return;const t=e.find('[data-toggle="shape-toolbox-tooltip"]'),i=this.$element();t.each((r,m)=>{const A=(0,a.A)(m),V=A.attr("title");if(V){const X=(0,a.A)("<div>").text(V).appendTo(i);this._createComponent(X,B1.A,{target:A.get(0),showEvent:"mouseenter",hideEvent:"mouseleave",position:"top",animation:{show:{type:"fade",from:0,to:1,delay:500},hide:{type:"fade",from:1,to:0,delay:100}}})}})}_isTouchMode(){const{Browser:e}=As();return e.TouchUI}_renderAccordion(e){this._accordion=this._createComponent(e,pe,{multiple:!0,animationDuration:0,activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,collapsible:!0,displayExpr:"title",dataSource:this._getAccordionDataSource(),disabled:this.option("disabled"),itemTemplate:(t,i,r)=>{t.onTemplate(this,r,t)},onSelectionChanged:t=>{this._updateScrollAnimateSubscription(t.component)},onContentReady:t=>{t.component.option("selectedItems",[]);const i=t.component.option("dataSource");for(let r=0;r<i.length;r++)!1===i[r].expanded?t.component.collapseItem(r):!0===i[r].expanded&&t.component.expandItem(r);i.length&&void 0===i[0].expanded&&t.component.expandItem(0),this._updateScrollAnimateSubscription(t.component)}})}_updateScrollAnimateSubscription(e){e._deferredAnimate=new g.cY,e._deferredAnimate.done(()=>{this.updateMaxHeight(),this._scrollView.update(),this._updateScrollAnimateSubscription(e)})}_onInputChanged(e){this._filterText=e,this._onFilterChangedAction({text:this._filterText,filteringToolboxes:this._toolboxes.map((t,i)=>i)}),this.updateTooltips(),this.updateMaxHeight(),this._scrollView.update()}updateFilter(){this._onInputChanged(this._filterText)}updateTooltips(){this._toolboxes.forEach(e=>{const t=(0,a.A)(e);this._createTooltips(t)})}_createOnShapeCategoryRenderedAction(){this._onShapeCategoryRenderedAction=this._createActionByOption("onShapeCategoryRendered")}_createOnFilterChangedAction(){this._onFilterChangedAction=this._createActionByOption("onFilterChanged")}_optionChanged(e){switch(e.name){case"onShapeCategoryRendered":this._createOnShapeCategoryRenderedAction();break;case"onFilterChanged":this._createOnFilterChangedAction();break;case"showSearch":case"toolboxWidth":this._invalidate();break;case"toolboxGroups":this._accordion.option("dataSource",this._getAccordionDataSource());break;default:super._optionChanged(e)}}};var wS=M(1168);const SI=class xI extends N1{_init(){super._init(),this._commandTabs=Qd.getPropertyPanelCommandTabs(this.option("propertyTabs")),this._createOnCreateToolbar(),this._createOnSelectedGroupChanged()}_initMarkup(){this._toolbars=[],this._selectedToolbar=void 0,super._initMarkup()}_getPopupClass(){let e="dx-diagram-properties-popup";return this._hasTabPanel()||(e+=" dx-diagram-properties-popup-notabs"),e}_getPopupWidth(){return this.isMobileView()?"100%":420}_getPopupHeight(){return 340}_getPopupPosition(){const e=this.option("offsetParent");return this.isMobileView()?{my:"left bottom",at:"left bottom",of:e}:{my:"right bottom",at:"right bottom",of:e,offset:"-"+this.option("offsetX")+" -"+this.option("offsetY")}}_getPopupAnimation(){const e=this.option("offsetParent");return this.isMobileView()?{hide:this._getPopupSlideAnimationObject({direction:"bottom",from:{position:{my:"left bottom",at:"left bottom",of:e}},to:{position:{my:"left top",at:"left bottom",of:e}}}),show:this._getPopupSlideAnimationObject({direction:"top",from:{position:{my:"left top",at:"left bottom",of:e}},to:{position:{my:"left bottom",at:"left bottom",of:e}}})}:super._getPopupAnimation()}_getPopupOptions(){return(0,_.X)(super._getPopupOptions(),{showTitle:this.isMobileView(),showCloseButton:this.isMobileView()})}_renderPopupContent(e){if(!this._commandTabs.length)return;const t=(0,a.A)("<div>").addClass("dx-diagram-properties-panel").appendTo(e);this._hasTabPanel()?this._renderTabPanel(t):this._renderTabContent(t,this._commandTabs[0],0,!0)}_hasTabPanel(){return this._commandTabs.length>1}_renderTabPanel(e){const t=(0,a.A)("<div>").appendTo(e);this._tabPanel=this._createComponent(t,wS.A,{focusStateEnabled:!1,dataSource:this._commandTabs,itemTemplate:(i,r,m)=>{this._renderTabContent(m,i,r)},onSelectionChanged:i=>{this._onSelectedGroupChangedAction(),this._onPointerUpAction()},onContentReady:i=>{this._popup.option("height",(0,D.Oq)(i.component.$element())+this._getVerticalPaddingsAndBorders()),this._firstScrollView&&(this._scrollViewHeight=(0,D.P$)(this._firstScrollView.$element()),this._firstScrollView.option("height",this._scrollViewHeight))}})}_renderTabContent(e,t,i,r){const m=(0,a.A)("<div>").appendTo(e),A=this._createComponent(m,Af.A,{height:this._scrollViewHeight});this._renderTabInnerContent(A.content(),t,i),r?this._popup.option("height",(0,D.Oq)(A.$element())+this._getVerticalPaddingsAndBorders()):this._firstScrollView=this._firstScrollView||A}_renderTabInnerContent(e,t,i){t.groups?t.groups.forEach((r,m)=>{this._renderTabGroupContent(e,i,r.title,r.commands)}):t.commands&&this._renderTabGroupContent(e,i,void 0,t.commands)}_renderTabGroupContent(e,t,i,r){i&&(0,a.A)("<div>").addClass("dx-diagram-properties-panel-group-title").appendTo(e).text(i);const A={$parent:(0,a.A)("<div>").addClass("dx-diagram-properties-panel-group-toolbar").appendTo(e),commands:r};this._onCreateToolbarAction(A),this._toolbars[t]||(this._toolbars[t]=[]),this._toolbars[t].push(A.toolbar),this._selectedToolbar=A.toolbar}getActiveToolbars(){const e=this._tabPanel?this._tabPanel.option("selectedIndex"):0;return this._toolbars[e]}_createOnCreateToolbar(){this._onCreateToolbarAction=this._createActionByOption("onCreateToolbar")}_createOnSelectedGroupChanged(){this._onSelectedGroupChangedAction=this._createActionByOption("onSelectedGroupChanged")}_optionChanged(e){switch(e.name){case"onCreateToolbar":this._createOnCreateToolbar();break;case"onSelectedGroupChanged":this._createOnSelectedGroupChanged();break;case"propertyTabs":this._invalidate();break;default:super._optionChanged(e)}}},G1=class dC extends rw{constructor(e){super(e);const{DiagramCommand:t}=As();this.commandOptions={},this.commandOptions[t.Fullscreen]="fullScreen",this.commandOptions[t.ZoomLevel]=function(i){"object"==typeof this._getOption("zoomLevel")?this._setOption("zoomLevel.value",i):this._setOption("zoomLevel",i)},this.commandOptions[t.SwitchAutoZoom]=function(i){const{AutoZoomMode:r}=As();switch(i){case r.FitContent:this._setOption("autoZoomMode","fitContent");break;case r.FitToWidth:this._setOption("autoZoomMode","fitWidth");break;case r.Disabled:this._setOption("autoZoomMode","disabled")}},this.commandOptions[t.ToggleSimpleView]="simpleView",this.commandOptions[t.ShowGrid]="showGrid",this.commandOptions[t.SnapToGrid]="snapToGrid",this.commandOptions[t.GridSize]=function(i){"object"==typeof this._getOption("gridSize")?this._setOption("gridSize.value",i):this._setOption("gridSize",i)},this.commandOptions[t.ViewUnits]="viewUnits",this.commandOptions[t.PageSize]=function(i){const r=this._getOption("pageSize");(void 0===r||r.width!==i.width||r.height!==i.height)&&this._setOption("pageSize",i)},this.commandOptions[t.PageLandscape]=function(i){this._setOption("pageOrientation",i?"landscape":"portrait")},this.commandOptions[t.ViewUnits]=function(i){const{DiagramUnit:r}=As();switch(i){case r.In:this._setOption("viewUnits","in");break;case r.Cm:this._setOption("viewUnits","cm");break;case r.Px:this._setOption("viewUnits","px")}},this.commandOptions[t.PageColor]="pageColor",this._updateLock=0}getCommandKeys(){return Object.keys(this.commandOptions).map(function(e){return parseInt(e)})}setItemValue(e,t){if(!this.isUpdateLocked()){this.beginUpdate();try{"function"==typeof this.commandOptions[e]?this.commandOptions[e].call(this,t):this._setOption(this.commandOptions[e],t)}finally{this.endUpdate()}}}beginUpdate(){this._updateLock++}endUpdate(){this._updateLock--}isUpdateLocked(){return this._updateLock>0}_getOption(e){return this._owner.option(e)}_setOption(e,t){this._owner.option(e,t)}};var wx=M(5730);const $1={getConfigurations:function(){const{DiagramCommand:n}=As();return this.dialogList||(this.dialogList=[{command:n.InsertShapeImage,title:Wn.A.format("dxDiagram-dialogInsertShapeImageTitle"),onGetContent:this.getChangeImageDialogContent},{command:n.EditShapeImage,title:Wn.A.format("dxDiagram-dialogEditShapeImageTitle"),onGetContent:this.getChangeImageDialogContent}])},getChangeImageDialogContent:function(n){const e=(0,a.A)("<div>");return n.component._createComponent(e,wx.A,{selectButtonText:Wn.A.format("dxDiagram-dialogEditShapeImageSelectButton"),accept:"image/*",uploadMode:"useForm",onValueChanged:function(t){const r=new((0,gr.zk)().FileReader);r.onload=function(m){n.component._commandParameter=m.target.result},r.readAsDataURL(t.value[0])}}),e},getDialogParameters(n){const e=this.getConfigurations().map(t=>t.command).indexOf(n);return e>=0?this.getConfigurations()[e]:null}},eF=CS.u.inherit({}).include(Do.A),j1=class EI extends eF{constructor(e){super(),this._diagramWidget=e,this._resetCache()}_dataSourceChangedHandler(e,t){if(this._resetCache(),this._items=e.map(i=>(0,_.X)(!0,{},i)),this._dataSourceItems=e.slice(),t&&t.changes){const i=t.changes.filter(m=>m.internalChange),r=t.changes.filter(m=>!m.internalChange);i.length&&this._reloadContentByChanges(i,!1),r.length&&this._reloadContentByChanges(r,!0)}else this._diagramWidget._onDataSourceChanged()}_dataSourceLoadingChangedHandler(e){e&&!this._dataSource.isLoaded()?this._diagramWidget._showLoadingIndicator():this._diagramWidget._hideLoadingIndicator()}_prepareData(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&void 0===e[t]&&(e[t]=null);return e}insert(e,t,i){this._resetCache();const r=this._getStore();r.insert(this._prepareData(e)).done((m,A)=>{r.push([{type:"insert",key:A,data:m,internalChange:!0}]),t&&t(m),this._resetCache()}).fail(m=>{i&&i(m),this._resetCache()})}update(e,t,i,r){const m=this._getStore(),A=this._getStoreKey(m,e,t);m.update(A,this._prepareData(t)).done((V,X)=>{m.push([{type:"update",key:X,data:V,internalChange:!0}]),i&&i(X,V)}).fail(V=>{r&&r(V)})}remove(e,t,i,r){this._resetCache();const m=this._getStore(),A=this._getStoreKey(m,e,t);m.remove(A).done(V=>{m.push([{type:"remove",key:V,internalChange:!0}]),i&&i(V),this._resetCache()}).fail(V=>{r&&r(V),this._resetCache()})}findItem(e){return this._items?this._getItemByKey(e):null}getItems(){return this._items}hasItems(){return!!this._items}_reloadContentByChanges(e,t){e=e.map(i=>(0,_.X)(i,{internalKey:this._getInternalKey(i.key)})),this._diagramWidget._reloadContentByChanges(e,t)}_getItemByKey(e){this._ensureCache();const t=this._cache,i=this._getIndexByKey(e);return t.items[i]}_getIndexByKey(e){this._ensureCache();const t=this._cache;if("object"!=typeof e){const i=t.keySet||t.keys.reduce((r,m,A)=>(r[m]=A,r),{});return t.keySet||(t.keySet=i),i[e]}for(let i=0,r=t.keys.length;i<r;i++)if(t.keys[i]===e)return i;return-1}_ensureCache(){const e=this._cache;e.keys||(e.keys=[],e.items=[],this._fillCache(e,this._items))}_fillCache(e,t){if(!t||!t.length)return;const i=this._getKeyExpr();i&&t.forEach(A=>{e.keys.push(i(A)),e.items.push(A)});const r=this._getItemsExpr();r&&t.forEach(A=>this._fillCache(e,r(A)));const m=this._getContainerChildrenExpr();m&&t.forEach(A=>this._fillCache(e,m(A)))}_getKeyExpr(){throw"Not Implemented"}_getItemsExpr(){}_getContainerChildrenExpr(){}_initDataSource(){super._initDataSource(),this._dataSource&&this._dataSource.paginate(!1)}_dataSourceOptions(){return{paginate:!1}}_getStore(){return this._dataSource&&this._dataSource.store()}_getStoreKey(e,t,i){let r=e.keyOf(i);if(r===i){const m=this._getKeyExpr();this._dataSourceItems.forEach(A=>{m(A)===t&&(r=A)})}return r}_getInternalKey(e){return"object"==typeof e?this._getKeyExpr()(e):e}_resetCache(){this._cache={}}},OI=class Xh extends j1{_getKeyExpr(){return this._diagramWidget._createOptionGetter("nodes.keyExpr")}_getItemsExpr(){return this._diagramWidget._createOptionGetter("nodes.itemsExpr")}_getContainerChildrenExpr(){return this._diagramWidget._createOptionGetter("nodes.containerChildrenExpr")}},nF=class tF extends j1{_getKeyExpr(){return this._diagramWidget._createOptionGetter("edges.keyExpr")}},mw=(0,N.b4)("fullscreenchange","dxDiagramEvent"),Q1=(0,N.b4)("msfullscreenchange","dxDiagramEvent"),_w=(0,N.b4)("webkitfullscreenchange","dxDiagramEvent"),TS=(0,N.b4)("mozfullscreenchange","dxDiagramEvent");(0,y.A)("dxDiagram",class DS extends Sl.A{_init(){this._updateDiagramLockCount=0,this.toggleFullscreenLock=0,this._toolbars=[],super._init(),this._initDiagram(),this._createCustomCommand()}_initMarkup(){super._initMarkup(),this._toolbars=[],delete this._isMobileScreenSize;const e=!(0,gr.Vd)();this.$element().addClass("dx-diagram"),delete this._mainToolbar,this.option("mainToolbar.visible")&&this._renderMainToolbar();const t=(0,a.A)("<div>").addClass("dx-diagram-content-wrapper").appendTo(this.$element());if(delete this._historyToolbar,delete this._historyToolbarResizeCallback,this._isHistoryToolbarVisible()&&this._renderHistoryToolbar(t),delete this._propertiesToolbar,delete this._propertiesToolbarResizeCallback,this._isPropertiesPanelEnabled()&&this._renderPropertiesToolbar(t),delete this._viewToolbar,delete this._viewToolbarResizeCallback,this.option("viewToolbar.visible")&&this._renderViewToolbar(t),delete this._toolbox,delete this._toolboxResizeCallback,this._isToolboxEnabled()&&this._renderToolbox(t),delete this._propertiesPanel,delete this._propertiesPanelResizeCallback,this._isPropertiesPanelEnabled()&&this._renderPropertiesPanel(t),this._$content=(0,a.A)("<div>").addClass("dx-diagram-content").appendTo(t),delete this._contextMenu,this._diagramInstance.settings.contextMenuEnabled=this.option("contextMenu.enabled"),this._diagramInstance.settings.contextMenuEnabled&&this._renderContextMenu(t),delete this._contextToolbox,this.option("contextToolbox.enabled")&&this._renderContextToolbox(t),this._renderDialog(t),!e){const i=(0,a.A)("<div>").addClass("dx-diagram-scroll-view").appendTo(this._$content);this._createComponent(i,XN,{useNativeScrolling:this.option("useNativeScrolling"),onCreateDiagram:r=>{this._diagramInstance.createDocument(r.$parent[0],r.scrollView,t[0])}})}this._setCustomCommandChecked(Qd.SHOW_PROPERTIES_PANEL_COMMAND_NAME,this._isPropertiesPanelVisible()),this._setCustomCommandChecked(Qd.SHOW_TOOLBOX_COMMAND_NAME,this._isToolboxVisible()),this._createOptionsUpdateBar()}_dimensionChanged(){this._isMobileScreenSize=void 0,this._processDiagramResize()}_visibilityChanged(e){e&&(this._bindDiagramData(),this.repaint())}_processDiagramResize(){this._diagramInstance.onDimensionChanged(),this._historyToolbarResizeCallback&&this._historyToolbarResizeCallback.call(this),this._propertiesToolbarResizeCallback&&this._propertiesToolbarResizeCallback.call(this),this._propertiesPanelResizeCallback&&this._propertiesPanelResizeCallback.call(this),this._viewToolbarResizeCallback&&this._viewToolbarResizeCallback.call(this),this._toolboxResizeCallback&&this._toolboxResizeCallback.call(this)}isMobileScreenSize(){return void 0===this._isMobileScreenSize&&(this._isMobileScreenSize=(0,gr.Vd)()&&(0,D.Ot)(this.$element())<576),this._isMobileScreenSize}_captureFocus(){this._diagramInstance&&this._diagramInstance.captureFocus()}_captureFocusOnTimeout(){this._captureFocusTimeout=setTimeout(()=>{this._captureFocus(),delete this._captureFocusTimeout},100)}_killCaptureFocusTimeout(){this._captureFocusTimeout&&(clearTimeout(this._captureFocusTimeout),delete this._captureFocusTimeout)}notifyBarCommandExecuted(){this._captureFocusOnTimeout()}_registerToolbar(e){this._registerBar(e),this._toolbars.push(e)}_registerBar(e){e.bar.onChanged.add(this),this._diagramInstance.registerBar(e.bar)}_getExcludeCommands(){const e=[];return this._isToolboxEnabled()||e.push(Qd.SHOW_TOOLBOX_COMMAND_NAME),this._isPropertiesPanelEnabled()||e.push(Qd.SHOW_PROPERTIES_PANEL_COMMAND_NAME),e}_getToolbarBaseOptions(){return{onContentReady:e=>{let{component:t}=e;return this._registerToolbar(t)},onSubMenuVisibilityChanging:e=>{let{component:t}=e;return this._diagramInstance.updateBarItemsState(t.bar)},onPointerUp:this._onPanelPointerUp.bind(this),export:this.option("export"),excludeCommands:this._getExcludeCommands(),onInternalCommand:this._onInternalCommand.bind(this),onCustomCommand:this._onCustomCommand.bind(this),isMobileView:this.isMobileScreenSize()}}_onInternalCommand(e){switch(e.command){case Qd.SHOW_TOOLBOX_COMMAND_NAME:this._toolbox&&this._toolbox.toggle();break;case Qd.SHOW_PROPERTIES_PANEL_COMMAND_NAME:this._propertiesPanel&&this._propertiesPanel.toggle()}}_onCustomCommand(e){this._customCommandAction({name:e.name})}_renderMainToolbar(){const e=(0,a.A)("<div>").addClass("dx-diagram-toolbar-wrapper").appendTo(this.$element());this._mainToolbar=this._createComponent(e,kN,(0,_.X)(this._getToolbarBaseOptions(),{commands:this.option("mainToolbar.commands"),skipAdjustSize:!0}))}_isHistoryToolbarVisible(){return this.option("historyToolbar.visible")&&!this.isReadOnlyMode()}_renderHistoryToolbar(e){const t=(0,a.A)("<div>").addClass("dx-diagram-floating-toolbar-container").appendTo(e);this._historyToolbar=this._createComponent(t,LN,(0,_.X)(this._getToolbarBaseOptions(),{commands:this.option("historyToolbar.commands"),locateInMenu:"never"})),this._updateHistoryToolbarPosition(),this._historyToolbarResizeCallback=()=>{this._historyToolbar.option("isMobileView",this.isMobileScreenSize())}}_updateHistoryToolbarPosition(){(0,gr.Vd)()&&Uc.A.setup(this._historyToolbar.$element(),{my:"left top",at:"left top",of:this._historyToolbar.$element().parent(),offset:"12 12"})}_isToolboxEnabled(){return"disabled"!==this.option("toolbox.visibility")&&!this.isReadOnlyMode()}_isToolboxVisible(){return"visible"===this.option("toolbox.visibility")||"auto"===this.option("toolbox.visibility")&&!this.isMobileScreenSize()}_renderToolbox(e){const t=!(0,gr.Vd)(),i=(0,a.A)("<div>").appendTo(e),r=this._getToolboxBounds(e,t);this._toolbox=this._createComponent(i,z1,{isMobileView:this.isMobileScreenSize(),isVisible:this._isToolboxVisible(),container:this.$element(),height:r.height,offsetParent:e,offsetX:r.offsetX,offsetY:r.offsetY,showSearch:this.option("toolbox.showSearch"),toolboxGroups:this._getToolboxGroups(),toolboxWidth:this.option("toolbox.width"),onShapeCategoryRendered:m=>{t||this._diagramInstance.createToolbox(m.$element[0],"texts"===m.displayMode,m.shapes||m.category,{shapeIconSpacing:12,shapeIconCountInRow:this.option("toolbox.shapeIconsPerRow"),shapeIconAttributes:{"data-toggle":m.dataToggle}})},onFilterChanged:m=>{t||this._diagramInstance.applyToolboxFilter(m.text,m.filteringToolboxes)},onVisibilityChanging:m=>{t||(this._setCustomCommandChecked(Qd.SHOW_TOOLBOX_COMMAND_NAME,m.visible),this._propertiesPanel&&m.visible&&this.isMobileScreenSize()&&this._propertiesPanel.hide(),this._historyToolbar&&m.visible&&this.isMobileScreenSize()&&(this._historyToolbarZIndex=pI.vt(gI.A.baseZIndex()),this._historyToolbar.$element().css("zIndex",this._historyToolbarZIndex),this._historyToolbar.$element().css("boxShadow","none")),this._viewToolbar&&(this._viewToolbar.$element().css("opacity",m.visible&&this.isMobileScreenSize()?"0":"1"),this._viewToolbar.$element().css("pointerEvents",m.visible&&this.isMobileScreenSize()?"none":"")))},onVisibilityChanged:m=>{!m.visible&&!this._textInputStarted&&this._captureFocus(),t||this._historyToolbar&&!m.visible&&this.isMobileScreenSize()&&this._historyToolbarZIndex&&(pI.TF(this._historyToolbarZIndex),this._historyToolbar.$element().css("zIndex",""),this._historyToolbar.$element().css("boxShadow",""),this._historyToolbarZIndex=void 0)},onPointerUp:this._onPanelPointerUp.bind(this)}),this._toolbox._popup.option("propagateOutsideClick",!this.option("fullScreen")),this._toolboxResizeCallback=()=>{const m=this._getToolboxBounds(e,t);this._toolbox.option("height",m.height),this._toolbox.option("isMobileView")!==this.isMobileScreenSize()&&(this._toolbox.option({isMobileView:this.isMobileScreenSize(),isVisible:this._isToolboxVisible()}),this._setCustomCommandChecked(Qd.SHOW_TOOLBOX_COMMAND_NAME,this._isToolboxVisible())),this._toolbox.updateMaxHeight()}}_getToolboxBounds(e,t){const i={offsetX:12,offsetY:12,height:t?0:(0,D.Oq)(e)-24};return this._historyToolbar&&!t&&(i.offsetY+=(0,D.P$)(this._historyToolbar.$element())+12,i.height-=(0,D.P$)(this._historyToolbar.$element())+12),this._viewToolbar&&!t&&(i.height-=(0,D.P$)(this._viewToolbar.$element())+this._getViewToolbarYOffset(t)),i}_renderViewToolbar(e){const t=!(0,gr.Vd)(),i=(0,a.A)("<div>").addClass("dx-diagram-floating-toolbar-container").appendTo(e);this._viewToolbar=this._createComponent(i,cw,(0,_.X)(this._getToolbarBaseOptions(),{commands:this.option("viewToolbar.commands"),locateInMenu:"never"})),this._updateViewToolbarPosition(i,e,t),this._viewToolbarResizeCallback=()=>{this._updateViewToolbarPosition(i,e,t)}}_getViewToolbarYOffset(e){if(e)return;let t=12;return this._viewToolbar&&this._propertiesToolbar&&(t+=((0,D.P$)(this._propertiesToolbar.$element())-(0,D.P$)(this._viewToolbar.$element()))/2),t}_updateViewToolbarPosition(e,t,i){i||Uc.A.setup(e,{my:"left bottom",at:"left bottom",of:t,offset:"12 -"+this._getViewToolbarYOffset(i)})}_isPropertiesPanelEnabled(){return"disabled"!==this.option("propertiesPanel.visibility")&&!this.isReadOnlyMode()}_isPropertiesPanelVisible(){return"visible"===this.option("propertiesPanel.visibility")}_renderPropertiesToolbar(e){const t=!(0,gr.Vd)(),i=(0,a.A)("<div>").addClass("dx-diagram-floating-toolbar-container").addClass("dx-diagram-properties-panel-toolbar-container").appendTo(e);this._propertiesToolbar=this._createComponent(i,NN,(0,_.X)(this._getToolbarBaseOptions(),{buttonStylingMode:"contained",buttonType:"default",locateInMenu:"never"})),this._updatePropertiesToolbarPosition(i,e,t),this._propertiesToolbarResizeCallback=()=>{this._updatePropertiesToolbarPosition(i,e,t)}}_updatePropertiesToolbarPosition(e,t,i){i||Uc.A.setup(e,{my:"right bottom",at:"right bottom",of:t,offset:"-12 -12"})}_renderPropertiesPanel(e){const t=!(0,gr.Vd)(),i=(0,a.A)("<div>").appendTo(e),r=24+(t?0:(0,D.P$)(this._propertiesToolbar.$element()));this._propertiesPanel=this._createComponent(i,SI,{isMobileView:this.isMobileScreenSize(),isVisible:this._isPropertiesPanelVisible(),container:this.$element(),offsetParent:e,offsetX:12,offsetY:r,propertyTabs:this.option("propertiesPanel.tabs"),onCreateToolbar:m=>{m.toolbar=this._createComponent(m.$parent,lw,(0,_.X)(this._getToolbarBaseOptions(),{commands:m.commands,locateInMenu:"never",editorStylingMode:"outlined"}))},onVisibilityChanging:m=>{t||(this._updatePropertiesPanelGroupBars(m.component),this._setCustomCommandChecked(Qd.SHOW_PROPERTIES_PANEL_COMMAND_NAME,m.visible),this._toolbox&&m.visible&&this.isMobileScreenSize()&&this._toolbox.hide())},onVisibilityChanged:m=>{!m.visible&&!this._textInputStarted&&this._captureFocus()},onSelectedGroupChanged:m=>{let{component:A}=m;return this._updatePropertiesPanelGroupBars(A)},onPointerUp:this._onPanelPointerUp.bind(this)}),this._propertiesPanelResizeCallback=()=>{this._propertiesPanel.option("isMobileView")!==this.isMobileScreenSize()&&(this._propertiesPanel.option({isMobileView:this.isMobileScreenSize(),isVisible:this._isPropertiesPanelVisible()}),this._setCustomCommandChecked(Qd.SHOW_PROPERTIES_PANEL_COMMAND_NAME,this._isPropertiesPanelVisible()))}}_updatePropertiesPanelGroupBars(e){e.getActiveToolbars().forEach(t=>{this._diagramInstance.updateBarItemsState(t.bar)})}_onPanelPointerUp(){this._captureFocusOnTimeout()}_renderContextMenu(e){const t=(0,a.A)("<div>").appendTo(e);this._contextMenu=this._createComponent(t,HN_DiagramContextMenuWrapper,{commands:this.option("contextMenu.commands"),onContentReady:i=>{let{component:r}=i;return this._registerBar(r)},onVisibilityChanging:i=>{let{component:r}=i;return this._diagramInstance.updateBarItemsState(r.bar)},onItemClick:i=>this._onBeforeCommandExecuted(i.command),export:this.option("export"),excludeCommands:this._getExcludeCommands(),onInternalCommand:this._onInternalCommand.bind(this),onCustomCommand:this._onCustomCommand.bind(this)})}_renderContextToolbox(e){const t=!(0,gr.Vd)(),i=this.option("contextToolbox.category"),r=this.option("contextToolbox.displayMode"),m=this.option("contextToolbox.shapes"),A=(0,a.A)("<div>").appendTo(e);this._contextToolbox=this._createComponent(A,uw,{toolboxWidth:this.option("contextToolbox.width"),onShown:V=>{if(t)return;const X=(0,a.A)(V.$element);let ce="texts"===r;if(!m&&!i&&!ce){const _e=this._getToolboxGroups().filter(function(Me){return Me.category===V.category})[0];_e&&(ce="texts"===_e.displayMode)}this._diagramInstance.createContextToolbox(X[0],ce,m||i||V.category,{shapeIconSpacing:12,shapeIconCountInRow:this.option("contextToolbox.shapeIconsPerRow")},_e=>{V.callback(_e),this._captureFocus(),V.hide()})}})}_setCustomCommandChecked(e,t){this._toolbars.forEach(i=>{i.setCommandChecked(e,t)})}_onBeforeCommandExecuted(e){const t=$1.getDialogParameters(e);return t&&this._showDialog(t),!!t}_renderDialog(e){const t=(0,a.A)("<div>").appendTo(e);this._dialogInstance=this._createComponent(t,M1,{})}_showDialog(e){this._dialogInstance&&(this._dialogInstance.option("onGetContent",e.onGetContent),this._dialogInstance.option("onHidden",function(){this._captureFocus()}.bind(this)),this._dialogInstance.option("command",this._diagramInstance.getCommand(e.command)),this._dialogInstance.option("title",e.title),this._dialogInstance._show())}_showLoadingIndicator(){this._loadingIndicator=(0,a.A)("<div>").addClass("dx-diagram-loading-indicator"),this._createComponent(this._loadingIndicator,Ty.A,{}),(this._$content||this.$element()).append(this._loadingIndicator)}_hideLoadingIndicator(){this._loadingIndicator&&(this._loadingIndicator.remove(),this._loadingIndicator=null)}_initDiagram(){const{DiagramControl:e}=As();if(this._diagramInstance=new e,this._diagramInstance.onChanged=this._raiseDataChangeAction.bind(this),this._diagramInstance.onEdgeInserted=this._raiseEdgeInsertedAction.bind(this),this._diagramInstance.onEdgeUpdated=this._raiseEdgeUpdatedAction.bind(this),this._diagramInstance.onEdgeRemoved=this._raiseEdgeRemovedAction.bind(this),this._diagramInstance.onNodeInserted=this._raiseNodeInsertedAction.bind(this),this._diagramInstance.onNodeUpdated=this._raiseNodeUpdatedAction.bind(this),this._diagramInstance.onNodeRemoved=this._raiseNodeRemovedAction.bind(this),this._diagramInstance.onToolboxDragStart=this._raiseToolboxDragStart.bind(this),this._diagramInstance.onToolboxDragEnd=this._raiseToolboxDragEnd.bind(this),this._diagramInstance.onTextInputStart=this._raiseTextInputStart.bind(this),this._diagramInstance.onTextInputEnd=this._raiseTextInputEnd.bind(this),this._diagramInstance.onToggleFullscreen=this._onToggleFullScreen.bind(this),this._diagramInstance.onShowContextMenu=this._onShowContextMenu.bind(this),this._diagramInstance.onHideContextMenu=this._onHideContextMenu.bind(this),this._diagramInstance.onShowContextToolbox=this._onShowContextToolbox.bind(this),this._diagramInstance.onHideContextToolbox=this._onHideContextToolbox.bind(this),this._diagramInstance.onNativeAction.add({notifyItemClick:this._raiseItemClickAction.bind(this),notifyItemDblClick:this._raiseItemDblClickAction.bind(this),notifySelectionChanged:this._raiseSelectionChanged.bind(this)}),this._diagramInstance.onRequestOperation=this._raiseRequestEditOperation.bind(this),this._updateEventSubscriptionMethods(),this._updateDefaultItemProperties(),this._updateEditingSettings(),this._updateShapeTexts(),this._updateUnitItems(),this._updateFormatUnitsMethod(),"in"!==this.option("units")&&this._updateUnitsState(),this.isReadOnlyMode()&&this._updateReadOnlyState(),this.option("pageSize")&&(this.option("pageSize.items")&&this._updatePageSizeItemsState(),this.option("pageSize.width")&&this.option("pageSize.height")&&this._updatePageSizeState()),"portrait"!==this.option("pageOrientation")&&this._updatePageOrientationState(),"#ffffff"!==this.option("pageColor")&&this._updatePageColorState(),"in"!==this.option("viewUnits")&&this._updateViewUnitsState(),this.option("showGrid")||this._updateShowGridState(),this.option("snapToGrid")||this._updateSnapToGridState(),this.option("gridSize")&&this._updateGridSizeState(),1!==this.option("zoomLevel")&&this._updateZoomLevelState(),this.option("simpleView")&&this._updateSimpleViewState(),"disabled"!==this.option("autoZoomMode")&&this._updateAutoZoomState(),this.option("fullScreen")){const t=(0,gr.zk)();t&&t.self!==t.top?this.option("fullScreen",!1):this._updateFullscreenState()}this._createOptionsUpdateBar(),(0,gr.Vd)()&&this._diagramInstance.initMeasurer(this.$element()[0]),this._updateCustomShapes(this._getCustomShapes()),this._refreshDataSources()}_createOptionsUpdateBar(){this.optionsUpdateBar||(this.optionsUpdateBar=new G1(this),this._diagramInstance.registerBar(this.optionsUpdateBar))}_deleteOptionsUpdateBar(){delete this.optionsUpdateBar}_clean(){this._diagramInstance&&(this._diagramInstance.cleanMarkup(e=>{(0,a.A)(e).empty()}),this._deleteOptionsUpdateBar()),super._clean()}_dispose(){this._killCaptureFocusTimeout(),super._dispose(),this._diagramInstance&&(this._diagramInstance.dispose(),this._diagramInstance=void 0)}_executeDiagramCommand(e,t){this._diagramInstance.getCommand(e).execute(t)}getNodeDataSource(){return this._nodesOption&&this._nodesOption.getDataSource()}getEdgeDataSource(){return this._edgesOption&&this._edgesOption.getDataSource()}_refreshDataSources(){this._beginUpdateDiagram(),this._refreshNodesDataSource(),this._refreshEdgesDataSource(),this._endUpdateDiagram()}_refreshNodesDataSource(){this._nodesOption&&(this._nodesOption._disposeDataSource(),delete this._nodesOption),this.option("nodes.dataSource")&&(this._nodesOption=new OI(this),this._nodesOption.option("dataSource",this.option("nodes.dataSource")),this._nodesOption._refreshDataSource())}_refreshEdgesDataSource(){this._edgesOption&&(this._edgesOption._disposeDataSource(),delete this._edgesOption),this.option("edges.dataSource")&&(this._edgesOption=new nF(this),this._edgesOption.option("dataSource",this.option("edges.dataSource")),this._edgesOption._refreshDataSource())}_getDiagramData(){let e;const{DiagramCommand:t}=As();return this._executeDiagramCommand(t.Export,function(i){e=i}),e}_setDiagramData(e,t){const{DiagramCommand:i}=As();this._executeDiagramCommand(i.Import,{data:e,keepExistingItems:t})}isReadOnlyMode(){return this.option("readOnly")||this.option("disabled")}_onDataSourceChanged(){this._bindDiagramData()}_getChangesKeys(e){return e.map(t=>(0,C.O9)(t.internalKey)?t.internalKey:(0,C.O9)(t.key)?t.key:null).filter(t=>(0,C.O9)(t))}_createOptionGetter(e){const t=this.option(e);return t&&(0,fa.Hz)(t)}_onRequestUpdateLayout(e){this._requestLayoutUpdateAction||this._createRequestLayoutUpdateAction();const t={changes:e,allowed:!1};return this._requestLayoutUpdateAction(t),t.allowed}_createOptionSetter(e){const t=this.option(e);return(0,C.Tn)(t)?t:t&&(0,fa.vL)(t)}_bindDiagramData(){if(this._updateDiagramLockCount||!this._isBindingMode())return;const{DiagramCommand:e,ConnectorLineOption:t,ConnectorLineEnding:i}=As();let r,m,A,V,X,ce,_e,Me;const Ve={nodeDataSource:this._nodesOption&&this._nodesOption.getItems(),edgeDataSource:this._edgesOption&&this._edgesOption.getItems(),nodeDataImporter:{getKey:this._createOptionGetter("nodes.keyExpr"),setKey:this._createOptionSetter("nodes.keyExpr"),getCustomData:this._createOptionGetter("nodes.customDataExpr"),setCustomData:this._createOptionSetter("nodes.customDataExpr"),getLocked:this._createOptionGetter("nodes.lockedExpr"),setLocked:this._createOptionSetter("nodes.lockedExpr"),getStyle:this._createOptionGetter("nodes.styleExpr"),setStyle:this._createOptionSetter("nodes.styleExpr"),getStyleText:this._createOptionGetter("nodes.textStyleExpr"),setStyleText:this._createOptionSetter("nodes.textStyleExpr"),getZIndex:this._createOptionGetter("nodes.zIndexExpr"),setZIndex:this._createOptionSetter("nodes.zIndexExpr"),getType:this._createOptionGetter("nodes.typeExpr"),setType:this._createOptionSetter("nodes.typeExpr"),getText:this._createOptionGetter("nodes.textExpr"),setText:this._createOptionSetter("nodes.textExpr"),getImage:this._createOptionGetter("nodes.imageUrlExpr"),setImage:this._createOptionSetter("nodes.imageUrlExpr"),getLeft:this._createOptionGetter("nodes.leftExpr"),setLeft:this._createOptionSetter("nodes.leftExpr"),getTop:this._createOptionGetter("nodes.topExpr"),setTop:this._createOptionSetter("nodes.topExpr"),getWidth:this._createOptionGetter("nodes.widthExpr"),setWidth:this._createOptionSetter("nodes.widthExpr"),getHeight:this._createOptionGetter("nodes.heightExpr"),setHeight:this._createOptionSetter("nodes.heightExpr"),getParentKey:this._createOptionGetter("nodes.parentKeyExpr"),setParentKey:this._createOptionSetter("nodes.parentKeyExpr"),getItems:this._createOptionGetter("nodes.itemsExpr"),setItems:this._createOptionSetter("nodes.itemsExpr"),getChildren:_e=this._createOptionGetter("nodes.containerChildrenExpr"),setChildren:Me=this._createOptionSetter("nodes.containerChildrenExpr"),getContainerKey:!_e&&!Me&&this._createOptionGetter("nodes.containerKeyExpr"),setContainerKey:!_e&&!Me&&this._createOptionSetter("nodes.containerKeyExpr")},edgeDataImporter:{getKey:this._createOptionGetter("edges.keyExpr"),setKey:this._createOptionSetter("edges.keyExpr"),getCustomData:this._createOptionGetter("edges.customDataExpr"),setCustomData:this._createOptionSetter("edges.customDataExpr"),getLocked:this._createOptionGetter("edges.lockedExpr"),setLocked:this._createOptionSetter("edges.lockedExpr"),getStyle:this._createOptionGetter("edges.styleExpr"),setStyle:this._createOptionSetter("edges.styleExpr"),getStyleText:this._createOptionGetter("edges.textStyleExpr"),setStyleText:this._createOptionSetter("edges.textStyleExpr"),getZIndex:this._createOptionGetter("edges.zIndexExpr"),setZIndex:this._createOptionSetter("edges.zIndexExpr"),getFrom:this._createOptionGetter("edges.fromExpr"),setFrom:this._createOptionSetter("edges.fromExpr"),getFromPointIndex:this._createOptionGetter("edges.fromPointIndexExpr"),setFromPointIndex:this._createOptionSetter("edges.fromPointIndexExpr"),getTo:this._createOptionGetter("edges.toExpr"),setTo:this._createOptionSetter("edges.toExpr"),getToPointIndex:this._createOptionGetter("edges.toPointIndexExpr"),setToPointIndex:this._createOptionSetter("edges.toPointIndexExpr"),getPoints:this._createOptionGetter("edges.pointsExpr"),setPoints:this._createOptionSetter("edges.pointsExpr"),getText:this._createOptionGetter("edges.textExpr"),setText:this._createOptionSetter("edges.textExpr"),getLineOption:(r=this._createOptionGetter("edges.lineTypeExpr"))&&function(Je){const rt=r(Je);return this._getConnectorLineOption(rt)}.bind(this),setLineOption:(m=this._createOptionSetter("edges.lineTypeExpr"))&&function(Je,rt){switch(rt){case t.Straight:rt="straight";break;case t.Orthogonal:rt="orthogonal"}m(Je,rt)}.bind(this),getStartLineEnding:(A=this._createOptionGetter("edges.fromLineEndExpr"))&&function(Je){const rt=A(Je);return this._getConnectorLineEnding(rt)}.bind(this),setStartLineEnding:(V=this._createOptionSetter("edges.fromLineEndExpr"))&&function(Je,rt){switch(rt){case i.Arrow:rt="arrow";break;case i.OutlinedTriangle:rt="outlinedTriangle";break;case i.FilledTriangle:rt="filledTriangle";break;case i.None:rt="none"}V(Je,rt)}.bind(this),getEndLineEnding:(X=this._createOptionGetter("edges.toLineEndExpr"))&&function(Je){const rt=X(Je);return this._getConnectorLineEnding(rt)}.bind(this),setEndLineEnding:(ce=this._createOptionSetter("edges.toLineEndExpr"))&&function(Je,rt){switch(rt){case i.Arrow:rt="arrow";break;case i.OutlinedTriangle:rt="outlinedTriangle";break;case i.FilledTriangle:rt="filledTriangle";break;case i.None:rt="none"}ce(Je,rt)}.bind(this)},layoutParameters:this._getDataBindingLayoutParameters()};Ve.nodeDataSource&&this._executeDiagramCommand(e.BindDocument,Ve)}_reloadContentByChanges(e,t){const i=this._getChangesKeys(e),r=this._onRequestUpdateLayout(e);this._reloadContent(i,r,t)}_reloadContent(e,t,i){this._diagramInstance.reloadContent(e,()=>{let r,m;return this._nodesOption&&i&&(r=this._nodesOption.getItems()),this._edgesOption&&i&&(m=this._edgesOption.getItems()),{nodeDataSource:r,edgeDataSource:m}},t&&this._getDataBindingLayoutParameters(),i)}_getConnectorLineOption(e){const{ConnectorLineOption:t}=As();return"straight"===e?t.Straight:t.Orthogonal}_getConnectorLineEnding(e){const{ConnectorLineEnding:t}=As();switch(e){case"arrow":return t.Arrow;case"outlinedTriangle":return t.OutlinedTriangle;case"filledTriangle":return t.FilledTriangle;default:return t.None}}_getDataBindingLayoutParameters(){const{DataLayoutType:e,DataLayoutOrientation:t}=As(),i=this.option("nodes.autoLayout")||"off",r=i.type||i,m={};if("off"!==r&&("auto"!==r||!this._hasNodePositionExprs())){switch(m.type="tree"===r?e.Tree:e.Sugiyama,i.orientation){case"vertical":m.orientation=t.Vertical;break;case"horizontal":m.orientation=t.Horizontal}(this.option("edges.fromPointIndexExpr")||this.option("edges.toPointIndexExpr"))&&(m.skipPointIndices=!0)}return m.autoSizeEnabled=!!this.option("nodes.autoSizeEnabled"),m}_hasNodePositionExprs(){return this.option("nodes.topExpr")&&this.option("nodes.leftExpr")}_getAutoZoomValue(e){const{AutoZoomMode:t}=As();switch(e){case"fitContent":return t.FitContent;case"fitWidth":return t.FitToWidth;default:return t.Disabled}}_isBindingMode(){return this._nodesOption&&this._nodesOption.hasItems()||this._edgesOption&&this._edgesOption.hasItems()}_beginUpdateDiagram(){this._updateDiagramLockCount++}_endUpdateDiagram(){this._updateDiagramLockCount=Math.max(this._updateDiagramLockCount-1,0),this._updateDiagramLockCount||this._bindDiagramData()}_getCustomShapes(){return this.option("customShapes")||[]}_getToolboxGroups(){return L1.getGroups(this.option("toolbox.groups"))}_updateAllCustomShapes(){this._diagramInstance.removeAllCustomShapes(),this._updateCustomShapes(this._getCustomShapes())}_updateCustomShapes(e,t){Array.isArray(t)&&this._diagramInstance.removeCustomShapes(t.map(i=>i.type)),Array.isArray(e)&&this._diagramInstance.addCustomShapes(e.map(i=>{const r=i.template||this.option("customShapeTemplate"),m=r&&this._getTemplate(r),A=i.toolboxTemplate||this.option("customShapeToolboxTemplate"),V=A&&this._getTemplate(A);return{category:i.category,type:i.type,baseType:i.baseType,title:i.title,svgUrl:i.backgroundImageUrl,svgToolboxUrl:i.backgroundImageToolboxUrl,svgLeft:i.backgroundImageLeft,svgTop:i.backgroundImageTop,svgWidth:i.backgroundImageWidth,svgHeight:i.backgroundImageHeight,defaultWidth:i.defaultWidth,defaultHeight:i.defaultHeight,toolboxWidthToHeightRatio:i.toolboxWidthToHeightRatio,minWidth:i.minWidth,minHeight:i.minHeight,maxWidth:i.maxWidth,maxHeight:i.maxHeight,allowResize:i.allowResize,defaultText:i.defaultText,allowEditText:i.allowEditText,textLeft:i.textLeft,textTop:i.textTop,textWidth:i.textWidth,textHeight:i.textHeight,defaultImageUrl:i.defaultImageUrl,allowEditImage:i.allowEditImage,imageLeft:i.imageLeft,imageTop:i.imageTop,imageWidth:i.imageWidth,imageHeight:i.imageHeight,connectionPoints:i.connectionPoints&&i.connectionPoints.map(X=>({x:X.x,y:X.y})),createTemplate:m&&((X,ce)=>{m.render({model:this._nativeItemToDiagramItem(ce),container:(0,s.cc)((0,a.A)(X))})}),createToolboxTemplate:V&&((X,ce)=>{V.render({model:this._nativeItemToDiagramItem(ce),container:(0,s.cc)((0,a.A)(X))})}),destroyTemplate:m&&(X=>{(0,a.A)(X).empty()}),templateLeft:i.templateLeft,templateTop:i.templateTop,templateWidth:i.templateWidth,templateHeight:i.templateHeight,keepRatioOnAutoSize:i.keepRatioOnAutoSize}}))}_getViewport(){const e=this.$element().closest(".dx-viewport");return e.length?e:(0,a.A)("body")}_onToggleFullScreen(e){this.toggleFullscreenLock>0||(this._changeNativeFullscreen(e),e?(this._prevParent=this.$element().parent(),this._prevFullScreenZIndex=this.$element().css("zIndex"),this._fullScreenZIndex=pI.vt(gI.A.baseZIndex()),this.$element().css("zIndex",this._fullScreenZIndex),this.$element().appendTo(this._getViewport())):(this.$element().appendTo(this._prevParent),this._fullScreenZIndex&&(pI.TF(this._fullScreenZIndex),this.$element().css("zIndex",this._prevFullScreenZIndex))),this.$element().toggleClass("dx-diagram-fullscreen",e),this._processDiagramResize(),this._toolbox&&(this._toolbox.repaint(),this._toolbox._popup.option("propagateOutsideClick",!e)),this._propertiesPanel&&this._propertiesPanel.repaint(),this._historyToolbar&&this._updateHistoryToolbarPosition())}_changeNativeFullscreen(e){const t=(0,gr.zk)();t.self===t.top||e===this._inNativeFullscreen()||(e?this._subscribeFullscreenNativeChanged():this._unsubscribeFullscreenNativeChanged(),this._setNativeFullscreen(e))}_setNativeFullscreen(e){const t=(0,gr.zk)(),i=t.self.document,r=t.self.document.body;e?r.requestFullscreen?r.requestFullscreen():r.mozRequestFullscreen?r.mozRequestFullscreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():i.exitFullscreen?i.exitFullscreen():i.mozCancelFullscreen?i.mozCancelFullscreen():i.webkitExitFullscreen?i.webkitExitFullscreen():i.msExitFullscreen&&i.msExitFullscreen()}_inNativeFullscreen(){const e=(0,gr.zk)().document;return!((e.fullscreenElement||e.msFullscreenElement||e.webkitFullscreenElement)!==e.body&&!e.webkitIsFullscreen)}_subscribeFullscreenNativeChanged(){const e=(0,gr.zk)().document,t=this._onNativeFullscreenChangeHandler.bind(this);L.A.on(e,mw,t),L.A.on(e,Q1,t),L.A.on(e,_w,t),L.A.on(e,TS,t)}_unsubscribeFullscreenNativeChanged(){const e=(0,gr.zk)().document;L.A.off(e,mw),L.A.off(e,Q1),L.A.off(e,_w),L.A.off(e,TS)}_onNativeFullscreenChangeHandler(){this._inNativeFullscreen()||(this._unsubscribeFullscreenNativeChanged(),this.option("fullScreen",!1))}_executeDiagramFullscreenCommand(e){const{DiagramCommand:t}=As();this.toggleFullscreenLock++,this._executeDiagramCommand(t.Fullscreen,e),this.toggleFullscreenLock--}_onShowContextMenu(e,t,i){this._contextMenu&&this._contextMenu._show(e,t,i)}_onHideContextMenu(){this._contextMenu&&this._contextMenu._hide()}_onShowContextToolbox(e,t,i,r,m){this._contextToolbox&&this._contextToolbox._show(e,t,i,r,m)}_onHideContextToolbox(){this._contextToolbox&&this._contextToolbox._hide()}_getDiagramUnitValue(e){const{DiagramUnit:t}=As();switch(e){case"in":default:return t.In;case"cm":return t.Cm;case"px":return t.Px}}_updateReadOnlyState(){const{DiagramCommand:e}=As(),t=this.isReadOnlyMode();this._executeDiagramCommand(e.ToggleReadOnly,t)}_updateZoomLevelState(){if(this.option("zoomLevel.items")){this._updateZoomLevelItemsState();const e=this.option("zoomLevel.value");if(!e)return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.ZoomLevel,e)}else{const e=this.option("zoomLevel.value")||this.option("zoomLevel");if(!e)return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.ZoomLevel,e)}}_updateZoomLevelItemsState(){const e=this.option("zoomLevel.items");if(!Array.isArray(e))return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.ZoomLevelItems,e)}_updateAutoZoomState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.SwitchAutoZoom,this._getAutoZoomValue(this.option("autoZoomMode")))}_updateSimpleViewState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.ToggleSimpleView,this.option("simpleView"))}_updateFullscreenState(){const e=this.option("fullScreen");this._executeDiagramFullscreenCommand(e),this._onToggleFullScreen(e)}_updateShowGridState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.ShowGrid,this.option("showGrid"))}_updateSnapToGridState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.SnapToGrid,this.option("snapToGrid"))}_updateGridSizeState(){if(this.option("gridSize.items")){this._updateGridSizeItemsState();const e=this.option("gridSize.value");if(!e)return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.GridSize,e)}else{const e=this.option("gridSize.value")||this.option("gridSize");if(!e)return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.GridSize,e)}}_updateGridSizeItemsState(){const e=this.option("gridSize.items");if(!Array.isArray(e))return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.GridSizeItems,e)}_updateUnitItems(){const{DiagramLocalizationService:e}=As(),t=this._getUnitItems();this._unitItems!==t&&(this._unitItems=t,e.unitItems=t)}_getUnitItems(){const{DiagramUnit:e}=As(),t={};return t[e.In]=Wn.A.format("dxDiagram-unitIn"),t[e.Cm]=Wn.A.format("dxDiagram-unitCm"),t[e.Px]=Wn.A.format("dxDiagram-unitPx"),t}_updateFormatUnitsMethod(){const{DiagramLocalizationService:e}=As();e.formatUnit=function(t){return bS.A.format(t)}}_updateViewUnitsState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.ViewUnits,this._getDiagramUnitValue(this.option("viewUnits")))}_updateUnitsState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.Units,this._getDiagramUnitValue(this.option("units")))}_updatePageSizeState(){const e=this.option("pageSize");if(!e||!e.width||!e.height)return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.PageSize,e)}_updatePageSizeItemsState(){const e=this.option("pageSize.items");if(!Array.isArray(e))return;const{DiagramCommand:t}=As();this._executeDiagramCommand(t.PageSizeItems,e)}_updatePageOrientationState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.PageLandscape,"landscape"===this.option("pageOrientation"))}_updatePageColorState(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.PageColor,this.option("pageColor"))}_updateShapeTexts(){const{DiagramLocalizationService:e}=As(),t=this._getShapeTexts();this._shapeTexts!==t&&(this._shapeTexts=t,e.shapeTexts=t)}_getShapeTexts(){const{ShapeTypes:e}=As(),t={};return t[e.Text]=Wn.A.format("dxDiagram-shapeText"),t[e.Rectangle]=Wn.A.format("dxDiagram-shapeRectangle"),t[e.Ellipse]=Wn.A.format("dxDiagram-shapeEllipse"),t[e.Cross]=Wn.A.format("dxDiagram-shapeCross"),t[e.Triangle]=Wn.A.format("dxDiagram-shapeTriangle"),t[e.Diamond]=Wn.A.format("dxDiagram-shapeDiamond"),t[e.Heart]=Wn.A.format("dxDiagram-shapeHeart"),t[e.Pentagon]=Wn.A.format("dxDiagram-shapePentagon"),t[e.Hexagon]=Wn.A.format("dxDiagram-shapeHexagon"),t[e.Octagon]=Wn.A.format("dxDiagram-shapeOctagon"),t[e.Star]=Wn.A.format("dxDiagram-shapeStar"),t[e.ArrowLeft]=Wn.A.format("dxDiagram-shapeArrowLeft"),t[e.ArrowUp]=Wn.A.format("dxDiagram-shapeArrowUp"),t[e.ArrowRight]=Wn.A.format("dxDiagram-shapeArrowRight"),t[e.ArrowDown]=Wn.A.format("dxDiagram-shapeArrowDown"),t[e.ArrowUpDown]=Wn.A.format("dxDiagram-shapeArrowUpDown"),t[e.ArrowLeftRight]=Wn.A.format("dxDiagram-shapeArrowLeftRight"),t[e.Process]=Wn.A.format("dxDiagram-shapeProcess"),t[e.Decision]=Wn.A.format("dxDiagram-shapeDecision"),t[e.Terminator]=Wn.A.format("dxDiagram-shapeTerminator"),t[e.PredefinedProcess]=Wn.A.format("dxDiagram-shapePredefinedProcess"),t[e.Document]=Wn.A.format("dxDiagram-shapeDocument"),t[e.MultipleDocuments]=Wn.A.format("dxDiagram-shapeMultipleDocuments"),t[e.ManualInput]=Wn.A.format("dxDiagram-shapeManualInput"),t[e.Preparation]=Wn.A.format("dxDiagram-shapePreparation"),t[e.Data]=Wn.A.format("dxDiagram-shapeData"),t[e.Database]=Wn.A.format("dxDiagram-shapeDatabase"),t[e.HardDisk]=Wn.A.format("dxDiagram-shapeHardDisk"),t[e.InternalStorage]=Wn.A.format("dxDiagram-shapeInternalStorage"),t[e.PaperTape]=Wn.A.format("dxDiagram-shapePaperTape"),t[e.ManualOperation]=Wn.A.format("dxDiagram-shapeManualOperation"),t[e.Delay]=Wn.A.format("dxDiagram-shapeDelay"),t[e.StoredData]=Wn.A.format("dxDiagram-shapeStoredData"),t[e.Display]=Wn.A.format("dxDiagram-shapeDisplay"),t[e.Merge]=Wn.A.format("dxDiagram-shapeMerge"),t[e.Connector]=Wn.A.format("dxDiagram-shapeConnector"),t[e.Or]=Wn.A.format("dxDiagram-shapeOr"),t[e.SummingJunction]=Wn.A.format("dxDiagram-shapeSummingJunction"),t[e.Container]=Wn.A.format("dxDiagram-shapeContainerDefaultText"),t[e.VerticalContainer]=Wn.A.format("dxDiagram-shapeVerticalContainer"),t[e.HorizontalContainer]=Wn.A.format("dxDiagram-shapeHorizontalContainer"),t[e.Card]=Wn.A.format("dxDiagram-shapeCardDefaultText"),t[e.CardWithImageOnLeft]=Wn.A.format("dxDiagram-shapeCardWithImageOnLeft"),t[e.CardWithImageOnTop]=Wn.A.format("dxDiagram-shapeCardWithImageOnTop"),t[e.CardWithImageOnRight]=Wn.A.format("dxDiagram-shapeCardWithImageOnRight"),t}_updateEventSubscriptionMethods(){const{RenderHelper:e}=As();e.addEventListener=(t,i,r)=>{L.A.on(t,i,r)},e.removeEventListener=(t,i,r)=>{L.A.off(t,i,r)}}_updateDefaultItemProperties(){this.option("defaultItemProperties.style")&&this._diagramInstance.setInitialStyleProperties(this.option("defaultItemProperties.style")),this.option("defaultItemProperties.textStyle")&&this._diagramInstance.setInitialTextStyleProperties(this.option("defaultItemProperties.textStyle")),this._diagramInstance.setInitialConnectorProperties({lineOption:this._getConnectorLineOption(this.option("defaultItemProperties.connectorLineType")),startLineEnding:this._getConnectorLineEnding(this.option("defaultItemProperties.connectorLineStart")),endLineEnding:this._getConnectorLineEnding(this.option("defaultItemProperties.connectorLineEnd"))}),this._diagramInstance.applyShapeSizeSettings({shapeMinWidth:this.option("defaultItemProperties.shapeMinWidth"),shapeMaxWidth:this.option("defaultItemProperties.shapeMaxWidth"),shapeMinHeight:this.option("defaultItemProperties.shapeMinHeight"),shapeMaxHeight:this.option("defaultItemProperties.shapeMaxHeight")})}_updateEditingSettings(){this._diagramInstance.applyOperationSettings({addShape:this.option("editing.allowAddShape"),addShapeFromToolbox:this.option("editing.allowAddShape"),deleteShape:this.option("editing.allowDeleteShape"),deleteConnector:this.option("editing.allowDeleteConnector"),changeConnection:this.option("editing.allowChangeConnection"),changeConnectorPoints:this.option("editing.allowChangeConnectorPoints"),changeShapeText:this.option("editing.allowChangeShapeText"),changeConnectorText:this.option("editing.allowChangeConnectorText"),resizeShape:this.option("editing.allowResizeShape"),moveShape:this.option("editing.allowMoveShape")})}fitToContent(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.FitToScreen)}fitToWidth(){const{DiagramCommand:e}=As();this._executeDiagramCommand(e.FitToWidth)}focus(){this._captureFocus()}export(){return this._getDiagramData()}exportTo(e,t){const i=this._getDiagramExportToCommand(e);this._executeDiagramCommand(i,t)}_getDiagramExportToCommand(e){const{DiagramCommand:t}=As();switch(e){case"png":return t.ExportPng;case"jpg":return t.ExportJpg;default:return t.ExportSvg}}import(e,t){this._setDiagramData(e,t),this._raiseDataChangeAction()}updateToolbox(){this._diagramInstance&&this._diagramInstance.refreshToolbox(),this._toolbox&&(this._toolbox.updateTooltips(),this._toolbox.updateFilter(),this._toolbox.updateMaxHeight())}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{readOnly:!1,zoomLevel:1,simpleView:!1,autoZoomMode:"disabled",fullScreen:!1,showGrid:!0,snapToGrid:!0,units:"in",viewUnits:"in",pageOrientation:"portrait",pageColor:"#ffffff",hasChanges:!1,nodes:{dataSource:null,keyExpr:"id",customDataExpr:void 0,lockedExpr:void 0,styleExpr:void 0,textStyleExpr:void 0,zIndexExpr:void 0,typeExpr:"type",textExpr:"text",imageUrlExpr:void 0,parentKeyExpr:void 0,itemsExpr:void 0,leftExpr:void 0,topExpr:void 0,widthExpr:void 0,heightExpr:void 0,containerKeyExpr:"containerKey",containerChildrenExpr:void 0,autoLayout:"auto",autoSizeEnabled:!0},edges:{dataSource:null,keyExpr:"id",customDataExpr:void 0,lockedExpr:void 0,styleExpr:void 0,textStyleExpr:void 0,zIndexExpr:void 0,fromExpr:"from",fromPointIndexExpr:void 0,toExpr:"to",toPointIndexExpr:void 0,pointsExpr:void 0,textExpr:void 0,lineTypeExpr:void 0,fromLineEndExpr:void 0,toLineEndExpr:void 0},customShapes:[],toolbox:{visibility:"auto",shapeIconsPerRow:3,showSearch:!0},mainToolbar:{visible:!1},historyToolbar:{visible:!0},viewToolbar:{visible:!0},contextMenu:{enabled:!0},contextToolbox:{enabled:!0,shapeIconsPerRow:4,width:152},propertiesPanel:{visibility:"auto"},defaultItemProperties:{connectorLineType:"orthogonal",connectorLineStart:"none",connectorLineEnd:"arrow"},editing:{allowAddShape:!0,allowDeleteShape:!0,allowDeleteConnector:!0,allowChangeConnection:!0,allowChangeConnectorPoints:!0,allowChangeShapeText:!0,allowChangeConnectorText:!0,allowResizeShape:!0,allowMoveShape:!0},export:{fileName:"Diagram"},onItemClick:null,onItemDblClick:null,onSelectionChanged:null,onRequestEditOperation:null,onRequestLayoutUpdate:null})}_raiseDataChangeAction(){this._initialized&&this.option("hasChanges",!0)}_raiseEdgeInsertedAction(e,t,i){this._edgesOption&&this._edgesOption.insert(e,t,i)}_raiseEdgeUpdatedAction(e,t,i,r){this._edgesOption&&this._edgesOption.update(e,t,i,r)}_raiseEdgeRemovedAction(e,t,i,r){this._edgesOption&&this._edgesOption.remove(e,t,i,r)}_raiseNodeInsertedAction(e,t,i){this._nodesOption&&this._nodesOption.insert(e,t,i)}_raiseNodeUpdatedAction(e,t,i,r){this._nodesOption&&this._nodesOption.update(e,t,i,r)}_raiseNodeRemovedAction(e,t,i,r){this._nodesOption&&this._nodesOption.remove(e,t,i,r)}_raiseToolboxDragStart(){this._toolbox&&this.isMobileScreenSize()&&(this._toolbox.hide(),this._toolboxDragHidden=!0)}_raiseToolboxDragEnd(){this._toolbox&&this._toolboxDragHidden&&(this._toolbox.show(),delete this._toolboxDragHidden)}_raiseTextInputStart(){this._textInputStarted=!0,this._propertiesPanel&&this.isMobileScreenSize()&&this._propertiesPanel.isVisible()&&(this._propertiesPanel.hide(),this._propertiesPanelTextInputHidden=!0),this._toolbox&&this.isMobileScreenSize()&&this._toolbox.isVisible()&&(this._toolbox.hide(),this._toolboxTextInputHidden=!0)}_raiseTextInputEnd(){this._propertiesPanel&&this._propertiesPanelTextInputHidden&&(this._propertiesPanel.show(),delete this._propertiesPanelTextInputHidden),this._toolbox&&this._toolboxTextInputHidden&&(this._toolbox.show(),delete this._toolboxTextInputHidden),this._textInputStarted=!1}_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")}_createItemDblClickAction(){this._itemDblClickAction=this._createActionByOption("onItemDblClick")}_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")}_createRequestEditOperationAction(){this._requestEditOperationAction=this._createActionByOption("onRequestEditOperation")}_createRequestLayoutUpdateAction(){this._requestLayoutUpdateAction=this._createActionByOption("onRequestLayoutUpdate")}_createCustomCommand(){this._customCommandAction=this._createActionByOption("onCustomCommand")}_raiseItemClickAction(e){this._itemClickAction||this._createItemClickAction(),this._itemClickAction({item:this._nativeItemToDiagramItem(e)})}_raiseItemDblClickAction(e){this._itemDblClickAction||this._createItemDblClickAction(),this._itemDblClickAction({item:this._nativeItemToDiagramItem(e)})}_raiseSelectionChanged(e){this._selectionChangedAction||this._createSelectionChangedAction(),this._selectionChangedAction({items:e.map(this._nativeItemToDiagramItem.bind(this))})}_raiseRequestEditOperation(e,t){this._requestEditOperationAction||this._createRequestEditOperationAction();const i=this._getRequestEditOperationEventArgs(e,t);this._requestEditOperationAction(i),t.allowed=i.allowed}_getModelOperation(e){const{DiagramModelOperation:t}=As();switch(e){case t.AddShape:return"addShape";case t.AddShapeFromToolbox:return"addShapeFromToolbox";case t.DeleteShape:return"deleteShape";case t.DeleteConnector:return"deleteConnector";case t.ChangeConnection:return"changeConnection";case t.ChangeConnectorPoints:return"changeConnectorPoints";case t.BeforeChangeShapeText:return"beforeChangeShapeText";case t.ChangeShapeText:return"changeShapeText";case t.BeforeChangeConnectorText:return"beforeChangeConnectorText";case t.ChangeConnectorText:return"changeConnectorText";case t.ResizeShape:return"resizeShape";case t.MoveShape:return"moveShape"}}_getRequestEditOperationEventArgs(e,t){const{DiagramModelOperation:i,ConnectorPosition:r}=As(),m={operation:this._getModelOperation(e),allowed:t.allowed,updateUI:t.updateUI,reason:t.updateUI?"checkUIElementAvailability":"modelModification"};switch(e){case i.AddShape:m.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),position:t.position&&{x:t.position.x,y:t.position.y}};break;case i.AddShapeFromToolbox:m.args={shapeType:t.shapeType};break;case i.DeleteShape:m.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape)};break;case i.DeleteConnector:m.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector)};break;case i.ChangeConnection:m.args={newShape:t.shape&&this._nativeItemToDiagramItem(t.shape),oldShape:t.oldShape&&this._nativeItemToDiagramItem(t.oldShape),connector:t.connector&&this._nativeItemToDiagramItem(t.connector),connectionPointIndex:t.connectionPointIndex,connectorPosition:t.position===r.Begin?"start":"end"};break;case i.ChangeConnectorPoints:m.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector),newPoints:t.points&&t.points.map(A=>({x:A.x,y:A.y})),oldPoints:t.oldPoints&&t.oldPoints.map(A=>({x:A.x,y:A.y}))};break;case i.BeforeChangeShapeText:m.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape)};break;case i.ChangeShapeText:m.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),text:t.text};break;case i.BeforeChangeConnectorText:m.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector),index:t.index};break;case i.ChangeConnectorText:m.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector),index:t.index,text:t.text};break;case i.ResizeShape:m.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),newSize:t.size&&{width:t.size.width,height:t.size.height},oldSize:t.oldSize&&{width:t.oldSize.width,height:t.oldSize.height}};break;case i.MoveShape:m.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),newPosition:t.position&&{x:t.position.x,y:t.position.y},oldPosition:t.oldPosition&&{x:t.oldPosition.x,y:t.oldPosition.y}}}return m}_nativeItemToDiagramItem(e){const{NativeShape:t}=As(),i=e instanceof t?this._nativeShapeToDiagramShape.bind(this):this._nativeConnectorToDiagramConnector.bind(this);return(0,_.X)({id:e.id,key:e.key,dataItem:void 0},i(e))}_nativeShapeToDiagramShape(e){return{dataItem:this._nodesOption&&this._nodesOption.findItem(e.key),itemType:"shape",text:e.text,type:e.type,position:{x:e.position.x,y:e.position.y},size:{width:e.size.width,height:e.size.height},attachedConnectorIds:e.attachedConnectorIds,containerId:e.containerId,containerChildItemIds:e.containerChildItemIds,containerExpanded:e.containerExpanded}}_nativeConnectorToDiagramConnector(e){return{dataItem:this._edgesOption&&this._edgesOption.findItem(e.key),itemType:"connector",texts:e.texts,fromKey:e.fromKey,toKey:e.toKey,fromId:e.fromId,fromPointIndex:e.fromPointIndex,toId:e.toId,toPointIndex:e.toPointIndex,points:e.points.map(t=>({x:t.x,y:t.y}))}}getItemByKey(e){const t=this._diagramInstance&&this._diagramInstance.getNativeItemByDataKey(e);return t&&this._nativeItemToDiagramItem(t)}getItemById(e){const t=this._diagramInstance&&this._diagramInstance.getNativeItemByKey(e);return t&&this._nativeItemToDiagramItem(t)}getItems(){return this._diagramInstance.getNativeItems().map(e=>e&&this._nativeItemToDiagramItem(e))}getSelectedItems(){return this._diagramInstance.getNativeSelectedItems().map(e=>e&&this._nativeItemToDiagramItem(e))}setSelectedItems(e){return this._diagramInstance.setSelectedItems(e.map(t=>t.id))}scrollToItem(e){return this._diagramInstance.scrollToItems([e.id])}_invalidateContextMenuCommands(){this._contextMenu&&this._contextMenu.option({commands:this.option("contextMenu.commands")})}_invalidateMainToolbarCommands(){this._mainToolbar&&this._mainToolbar.option({commands:this.option("mainToolbar.commands")})}_invalidateHistoryToolbarCommands(){this._historyToolbar&&this._historyToolbar.option({commands:this.option("historyToolbar.commands")})}_invalidateViewToolbarCommands(){this._viewToolbar&&this._viewToolbar.option({commands:this.option("viewToolbar.commands")})}_invalidateToolboxGroups(){this._toolbox&&this._toolbox.option({toolboxGroups:this._getToolboxGroups()})}_optionChanged(e){if(this.optionsUpdateBar&&!this.optionsUpdateBar.isUpdateLocked()){this.optionsUpdateBar.beginUpdate();try{this._optionChangedCore(e)}finally{this.optionsUpdateBar.endUpdate()}}}_optionChangedCore(e){switch(e.name){case"readOnly":case"disabled":this._updateReadOnlyState(),this._invalidate();break;case"zoomLevel":("zoomLevel"===e.fullName||"zoomLevel.items"===e.fullName||"zoomLevel.value"===e.fullName)&&this._updateZoomLevelState();break;case"autoZoomMode":this._updateAutoZoomState();break;case"simpleView":this._updateSimpleViewState();break;case"useNativeScrolling":case"contextToolbox":case"propertiesPanel":this._invalidate();break;case"fullScreen":this._updateFullscreenState();break;case"showGrid":this._updateShowGridState();break;case"snapToGrid":this._updateSnapToGridState();break;case"gridSize":("gridSize"===e.fullName||"gridSize.items"===e.fullName||"gridSize.value"===e.fullName)&&this._updateGridSizeState();break;case"viewUnits":this._updateViewUnitsState();break;case"units":this._updateUnitsState();break;case"pageSize":("pageSize"===e.fullName||"pageSize.items"===e.fullName)&&this._updatePageSizeItemsState(),("pageSize"===e.fullName||"pageSize.width"===e.fullName||"pageSize.height"===e.fullName)&&this._updatePageSizeState();break;case"pageOrientation":this._updatePageOrientationState();break;case"pageColor":this._updatePageColorState();break;case"nodes":0===e.fullName.indexOf("nodes.autoLayout")?this._refreshDataSources():this._refreshNodesDataSource();break;case"edges":this._refreshEdgesDataSource();break;case"customShapes":e.fullName!==e.name?this._updateAllCustomShapes():this._updateCustomShapes(e.value,e.previousValue),this._invalidate();break;case"contextMenu":"contextMenu.commands"===e.fullName?this._invalidateContextMenuCommands():this._invalidate();break;case"toolbox":"toolbox.groups"===e.fullName?this._invalidateToolboxGroups():this._invalidate();break;case"mainToolbar":"mainToolbar.commands"===e.fullName?this._invalidateMainToolbarCommands():this._invalidate();break;case"historyToolbar":"historyToolbar.commands"===e.fullName?this._invalidateHistoryToolbarCommands():this._invalidate();break;case"viewToolbar":"viewToolbar.commands"===e.fullName?this._invalidateViewToolbarCommands():this._invalidate();break;case"onItemClick":this._createItemClickAction();break;case"onItemDblClick":this._createItemDblClickAction();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"onRequestEditOperation":this._createRequestEditOperationAction();break;case"onRequestLayoutUpdate":this._createRequestLayoutUpdateAction();break;case"onCustomCommand":this._createCustomCommand();break;case"defaultItemProperties":this._updateDefaultItemProperties();break;case"editing":this._updateEditingSettings();break;case"export":this._toolbars.forEach(t=>{t.option("export",this.option("export"))}),this._contextMenu&&this._contextMenu.option("export",this.option("export"));break;case"hasChanges":break;default:super._optionChanged(e)}}});let DI=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.ath,z.b$1,z.POb,z._cl,z.K0w,z._ZY,z.XjV,z.Oap,z.aJg,z.uIe,z.hLh,z.Dvy,z.OZC,z.vsH,z.ZnA,z.YPq,z.N32,z.HKo,z.Pcp,z.VWK,z.A4G,z.tq_,f.p_,f.xZ,z.ath,z.b$1,z.POb,z._cl,z.K0w,z._ZY,z.XjV,z.Oap,z.aJg,z.uIe,z.hLh,z.Dvy,z.OZC,z.vsH,z.ZnA,z.YPq,z.N32,z.HKo,z.Pcp,z.VWK,z.A4G,z.tq_,f.xZ]})}return n})();var AS=M(3312);let J1=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.XUe,f.p_,f.xZ,z.XUe,f.xZ]})}return n})();var AI=M(7316),q1=M(5267),ek=M(402),tk=M(3684),II=M(6163);const{getActiveElement:nk}=c.A,PI=d.A.real(),ky=tk.A.inherit({_supportedKeys(){return(0,_.X)({},this.callBase(),{tab(n){if(!this.option("opened"))return;const e=this._getTabbableElements(),t=n.shiftKey?e.last():e.first();t&&L.A.trigger(t,"focus"),n.preventDefault()}})},_getTabbableElements(){return this._getElements().filter(ek.Kr)},_getElements(){return(0,a.A)(this.content()).find("*")},_getDefaultOptions(){return(0,_.X)(this.callBase(),{acceptCustomValue:!1,contentTemplate:"content",openOnFieldClick:!0,displayValueFormatter:n=>Array.isArray(n)?n.join(", "):n,useHiddenSubmitElement:!0})},_getAnonymousTemplateName:()=>"content",_initTemplates(){this.callBase()},_initMarkup(){this._initDataExpressions(),this.$element().addClass("dx-dropdownbox"),this.callBase()},_setSubmitValue(){const n=this.option("value"),e=this._shouldUseDisplayValue(n)?this._displayGetter(n):n;this._getSubmitElement().val(e)},_shouldUseDisplayValue(n){return"this"===this.option("valueExpr")&&(0,C.Gv)(n)},_sortValuesByKeysOrder:(n,e)=>e.sort((i,r)=>n.indexOf(i.itemKey)-n.indexOf(r.itemKey)).map(i=>i.itemDisplayValue),_renderInputValue(){this._rejectValueLoading();const n=[];if(!this._dataSource)return this.callBase(n),(0,g.cY)().resolve();let t=this._getCurrentValue()??[];t=Array.isArray(t)?t:[t];const i=(0,w.Tj)(t,m=>{const A=(0,g.cY)();return this._loadItem(m).always(V=>{const X=this._displayGetter(V);(0,C.O9)(X)?n.push({itemKey:m,itemDisplayValue:X}):this.option("acceptCustomValue")&&n.push({itemKey:m,itemDisplayValue:m}),A.resolve()}),A}),r=this.callBase.bind(this);return g.z7.apply(this,i).always(()=>{const m=this._sortValuesByKeysOrder(t,n);this.option("displayValue",m),r(n.length&&m)})},_loadItem(n){const e=(0,g.cY)(),t=this,i=(0,h.VM)(this.option("items")||[],r=>this._isValueEquals(this._valueGetter(r),n))[0];return void 0!==i?e.resolve(i):this._loadValue(n).done(r=>{e.resolve(r)}).fail(r=>{null!=r&&r.shouldSkipCallback||(t.option("acceptCustomValue")?e.resolve(n):e.reject())}),e.promise()},_popupTabHandler(n){if("tab"!==(0,N.YD)(n))return;const e=this._getTabbableElements().first().get(0),t=this._getTabbableElements().last().get(0),i=n.target,r=!(i!==e||!n.shiftKey);(r||i===t&&!n.shiftKey)&&(this.close(),L.A.trigger(this._input(),"focus"),r&&n.preventDefault())},_renderPopupContent(){if("content"===this.option("contentTemplate"))return;const n=this._getTemplateByOption("contentTemplate");if(!n||!this.option("contentTemplate"))return;const e=this._popup.$content(),t={value:this._fieldRenderData(),component:this};e.empty(),n.render({container:(0,s.cc)(e),model:t})},_canShowVirtualKeyboard:()=>PI.mac,_isNestedElementActive(){const n=nk();return n&&this._popup.$content().get(0).contains(n)},_shouldHideOnParentScroll(){return"desktop"===PI.deviceType&&this._canShowVirtualKeyboard()&&this._isNestedElementActive()},_popupHiddenHandler(){this.callBase(),this._popupPosition=void 0},_popupPositionedHandler(n){this.callBase(n),this._popupPosition=n.position},_getDefaultPopupPosition(n){const{my:e,at:t}=this.callBase(n);return{my:e,at:t,offset:{v:-1},collision:"flipfit"}},_popupConfig(){const{focusStateEnabled:n}=this.option();return(0,_.X)(this.callBase(),{tabIndex:-1,dragEnabled:!1,focusStateEnabled:n,contentTemplate:"content",hideOnParentScroll:this._shouldHideOnParentScroll.bind(this),position:(0,_.X)(this.option("popupPosition"),{of:this.$element()}),_ignoreFunctionValueDeprecation:!0,maxHeight:function(){var e;const t=null===(e=this._popupPosition)||void 0===e?void 0:e.v.location;return(0,II.J)(this.$element(),t)}.bind(this)})},_popupShownHandler(){this.callBase();const n=this._getTabbableElements().first();L.A.trigger(n,"focus")},_setCollectionWidgetOption:h.lQ,_optionChanged(n){switch(this._dataExpressionOptionChanged(n),n.name){case"dataSource":this._renderInputValue();break;case"displayValue":this.option("text",n.value);break;case"displayExpr":this._renderValue();break;case"contentTemplate":this._invalidate();break;default:this.callBase(n)}}}).include(q1.A);(0,y.A)("dxDropDownBox",ky);const ok=ky,dF=["*"],uF={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>rk),multi:!0};let rk=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(t){this._setOption("acceptCustomValue",t)}get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(t){this._setOption("contentTemplate",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(t){this._setOption("displayExpr",t)}get displayValueFormatter(){return this._getOption("displayValueFormatter")}set displayValueFormatter(t){this._setOption("displayValueFormatter",t)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(t){this._setOption("dropDownButtonTemplate",t)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(t){this._setOption("dropDownOptions",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get fieldTemplate(){return this._getOption("fieldTemplate")}set fieldTemplate(t){this._setOption("fieldTemplate",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get opened(){return this._getOption("opened")}set opened(t){this._setOption("opened",t)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(t){this._setOption("openOnFieldClick",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(t){this._setOption("showDropDownButton",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(t){this._setOption("valueExpr",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onClosed;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;buttonsChange;contentTemplateChange;dataSourceChange;deferRenderingChange;disabledChange;displayExprChange;displayValueFormatterChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;fieldTemplateChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;itemsChange;labelChange;labelModeChange;maxLengthChange;nameChange;openedChange;openOnFieldClickChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showDropDownButtonChange;stylingModeChange;tabIndexChange;textChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;valueExprChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"contentTemplateChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"displayValueFormatterChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"fieldTemplateChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxLengthChange"},{emit:"nameChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new ok(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("dataSource",t),this.setupChanges("items",t),this.setupChanges("validationErrors",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-drop-down-box"]],contentQueries:function(i,r,m){if(1&i&&(S.wni(m,z.BrI,4),S.wni(m,z.CVf,4)),2&i){let A;S.mGM(A=S.lsd())&&(r.buttonsChildren=A),S.mGM(A=S.lsd())&&(r.itemsChildren=A)}},hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",contentTemplate:"contentTemplate",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayExpr:"displayExpr",displayValueFormatter:"displayValueFormatter",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",fieldTemplate:"fieldTemplate",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",items:"items",label:"label",labelMode:"labelMode",maxLength:"maxLength",name:"name",opened:"opened",openOnFieldClick:"openOnFieldClick",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",valueExpr:"valueExpr",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",contentTemplateChange:"contentTemplateChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",displayValueFormatterChange:"displayValueFormatterChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",fieldTemplateChange:"fieldTemplateChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxLengthChange:"maxLengthChange",nameChange:"nameChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,uF,f.fH,f.$M]),S.Vt3,S.OA$],ngContentSelectors:dF,decls:1,vars:0,template:function(i,r){1&i&&(S.NAR(),S.SdG(0))},encapsulation:2})}return n})(),sk=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.GIV,z.u4t,z.df_,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.isg,z.POb,f.p_,f.xZ,z.GIV,z.u4t,z.df_,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.isg,z.POb,f.xZ]})}return n})();var hF=M(3486),yd=M(8992);const Ly=function(n,e,t){e=e||h.lQ,t=t||h.lQ,Array.isArray(n)||(n=[n]);const i=n.map((r,m)=>(0,g.z7)(r).then(A=>((0,C.Tn)(e)&&e({item:r,index:m,result:A}),A),A=>(A||(A={}),A.index=m,(0,C.Tn)(t)&&t(A),(new g.cY).resolve().promise())));return g.z7.apply(null,i)},IS=function(n){const e=["B","KB","MB","GB","TB"];let t=0,i=n;for(;i>=1024&&t<=e.length-1;)i/=1024,t++;return i=Math.round(10*i)/10,`${i} ${e[t]}`},xg=function(n,e,t){return t.forEach(i=>{(0,_.X)(!0,n,(0,C.O9)(e[i])?{[i]:e[i]}:{})}),n},ak=function(n){const e=Object.keys(n),t=[];return e.forEach(i=>t.push(n[i])),{keys:e,values:t}},lk=n=>{const e=n.lastIndexOf(".");return-1!==e?n.substr(e):""},gF=n=>{const e=n.lastIndexOf("/");return-1!==e?n.substr(e+1):n},dk=(n,e)=>{if(!n||"/"===n)return[];const t=[];let i="";for(let r=0;r<n.length;r++){let m=n.charAt(r);if("/"===m){const A=n.charAt(r+1);"/"!==A&&(i&&(t.push(i),i=""),m=A),r++}i+=m}if(i&&t.push(i),e)for(let r=0;r<t.length;r++)t[r]=Mf(0===r?"":t[r-1],Cw(t[r]));return t},Cw=function(n){return n.replace(/\/{1,1}/g,"//")},Mf=function(){let n="";return(0,w.__)(arguments,(e,t)=>{t&&(n&&(n+="/"),n+=t)}),n};class MI{constructor(){((0,C.Kg)(arguments[0])?this._publicCtor:this._internalCtor).apply(this,arguments)}_internalCtor(e,t,i,r){this.name=t||"",this.pathInfo=e&&[...e]||[],this.parentPath=this._getPathByPathInfo(this.pathInfo),this.relativeName=Mf(this.parentPath,t),this.key=r||this._getPathByPathInfo(this.getFullPathInfo(),!0),this.path=Mf(this.parentPath,t),this.pathKeys=this.pathInfo.map(m=>{let{key:A}=m;return A}),this.isRoot()||this.pathKeys.push(this.key),this._initialize(i)}_publicCtor(e,t,i){this.path=e||"",this.pathKeys=i||[];const r=[],m=dk(e,!0);for(let A=0;A<m.length-1;A++){const V=m[A],X={key:this.pathKeys[A]||V,name:gF(V)};r.push(X)}this.pathInfo=r,this.relativeName=e,this.name=gF(e),this.key=this.pathKeys.length?this.pathKeys[this.pathKeys.length-1]:e,this.parentPath=m.length>1?m[m.length-2]:"",this._initialize(t)}_initialize(e){this.isDirectory=!!e,this.size=0,this.dateModified=new Date,this.thumbnail="",this.tooltipText=""}getFullPathInfo(){const e=[...this.pathInfo];return this.isRoot()||e.push({key:this.key,name:this.name}),e}isRoot(){return""===this.path}getFileExtension(){return this.isDirectory?"":lk(this.name)}equals(e){return e&&this.key===e.key}createClone(){const e=new MI(this.pathInfo,this.name,this.isDirectory,this.key);return e.key=this.key,e.size=this.size,e.dateModified=this.dateModified,e.thumbnail=this.thumbnail,e.tooltipText=this.tooltipText,e.hasSubDirectories=this.hasSubDirectories,e.dataItem=this.dataItem,e}_getPathByPathInfo(e,t){return e.map(i=>t?Cw(i.name):i.name).join("/")}}const Dx=MI,bw=class yw{constructor(e){e=(0,h.YD)(e,{}),this._keyGetter=(0,fa.Hz)(this._getKeyExpr(e)),this._nameGetter=(0,fa.Hz)(this._getNameExpr(e)),this._isDirGetter=(0,fa.Hz)(this._getIsDirExpr(e)),this._sizeGetter=(0,fa.Hz)(this._getSizeExpr(e)),this._dateModifiedGetter=(0,fa.Hz)(this._getDateModifiedExpr(e)),this._thumbnailGetter=(0,fa.Hz)(e.thumbnailExpr||"thumbnail")}getItems(e){return[]}renameItem(e,t){}createDirectory(e,t){}deleteItems(e){}moveItems(e,t){}copyItems(e,t){}uploadFileChunk(e,t,i){}abortFileUpload(e,t,i){}downloadItems(e){}getItemsContent(e){}getFileUploadChunkSize(){return 2e5}_convertDataObjectsToFileItems(e,t){const i=[];return(0,w.__)(e,(r,m)=>{const A=this._createFileItem(m,t);i.push(A)}),i}_createFileItem(e,t){const i=this._keyGetter(e),r=new Dx(t,this._nameGetter(e),!!this._isDirGetter(e),i);return r.size=this._sizeGetter(e),void 0===r.size&&(r.size=0),r.dateModified=Yl.A.deserializeDate(this._dateModifiedGetter(e)),void 0===r.dateModified&&(r.dateModified=new Date),r.isDirectory&&(r.hasSubDirectories=this._hasSubDirs(e)),i||(r.key=r.relativeName),r.thumbnail=this._thumbnailGetter(e)||"",r.dataItem=e,r}_hasSubDirs(e){return!0}_getKeyExpr(e){return e.keyExpr||this._defaultKeyExpr}_defaultKeyExpr(e){if(2!==arguments.length)return Object.prototype.hasOwnProperty.call(e,"__KEY__")?e.__KEY__:null;e.__KEY__=arguments[1]}_getNameExpr(e){return e.nameExpr||"name"}_getIsDirExpr(e){return e.isDirectoryExpr||"isDirectory"}_getSizeExpr(e){return e.sizeExpr||"size"}_getDateModifiedExpr(e){return e.dateModifiedExpr||"dateModified"}_executeActionAsDeferred(e,t){const i=new g.cY;try{const r=e();(0,C.yL)(r)?(0,g.Sx)(r).done(m=>i.resolve(t&&m||void 0)).fail(m=>i.reject(m)):i.resolve(t&&r||void 0)}catch(r){return i.reject(r)}return i.promise()}};var Rf=M(2925),Tm=M(2614),Ax=M(8322),G_=M.n(Ax);const Ix=class xw{constructor(e,t,i){this.errorCode=e,this.fileSystemItem=t,this.errorText=i}},kI=(0,gr.zk)(),LI=class fF extends bw{constructor(e){super(e=(0,h.YD)(e,{}));const t=e.data;if(t&&!Array.isArray(t))throw Tm.sO.Error("E4006");const i=e.itemsExpr||"items";this._subFileItemsGetter=(0,fa.Hz)(i),this._subFileItemsSetter=this._getSetter(i);const r=e.contentExpr||"content";this._contentGetter=(0,fa.Hz)(r),this._contentSetter=this._getSetter(r);const m=this._getNameExpr(e);this._nameSetter=this._getSetter(m);const A=this._getIsDirExpr(e);this._getIsDirSetter=this._getSetter(A);const V=this._getKeyExpr(e);this._keySetter=this._getSetter(V);const X=this._getSizeExpr(e);this._sizeSetter=this._getSetter(X);const ce=this._getDateModifiedExpr(e);this._dateModifiedSetter=this._getSetter(ce),this._data=t||[]}getItems(e){return this._executeActionAsDeferred(()=>this._getItems(e),!0)}renameItem(e,t){return this._executeActionAsDeferred(()=>this._renameItemCore(e,t))}_renameItemCore(e,t){if(!e)return;const i=this._findDataObject(e);this._nameSetter(i,t),e.name=t,e.key=this._ensureDataObjectKey(i)}createDirectory(e,t){return this._executeActionAsDeferred(()=>{this._validateDirectoryExists(e),this._createDataObject(e,t,!0)})}deleteItems(e){return e.map(t=>this._executeActionAsDeferred(()=>this._deleteItem(t)))}moveItems(e,t){const i=this._findDataObject(t),r=this._getDirectoryDataItems(i);return e.map(A=>this._executeActionAsDeferred(()=>{this._checkAbilityToMoveOrCopyItem(A,t);const V=this._findDataObject(A);this._deleteItem(A),r.push(V)}))}copyItems(e,t){const i=this._findDataObject(t),r=this._getDirectoryDataItems(i);return e.map(A=>this._executeActionAsDeferred(()=>{this._checkAbilityToMoveOrCopyItem(A,t);const V=this._findDataObject(A),X=this._createCopy(V);r.push(X)}))}uploadFileChunk(e,t,i){if(t.chunkIndex>0)return t.customData.deferred;this._validateDirectoryExists(i);const r=t.customData.deferred=new g.cY,m=this._createFileReader();return m.readAsDataURL(e),m.onload=()=>{const A=m.result.split(",")[1],V=this._createDataObject(i,e.name,!1);this._sizeSetter(V,e.size),this._dateModifiedSetter(V,e.lastModifiedDate),this._contentSetter(V,A),r.resolve()},m.onerror=A=>r.reject(A),r}downloadItems(e){1===e.length?this._downloadSingleFile(e[0]):this._downloadMultipleFiles(e)}_downloadSingleFile(e){const t=this._getFileContent(e),i=kI.atob(t),r=new ArrayBuffer(i.length),m=new Uint8Array(r);for(let V=0;V<i.length;V++)m[V]=i.charCodeAt(V);const A=new kI.Blob([r],{type:"application/octet-stream"});QS.saveAs(e.name,null,A)}_downloadMultipleFiles(e){const i=new(function uk(){if(!G_())throw is.A.Error("E1041","JSZip");return G_()}());e.forEach(A=>i.file(A.name,this._getFileContent(A),{base64:!0}));const r={type:"blob",compression:"DEFLATE",mimeType:"application/zip"},m=new g.cY;i.generateAsync?i.generateAsync(r).then(m.resolve):m.resolve(i.generate(r)),m.done(A=>QS.saveAs("files.zip",null,A))}_getFileContent(e){const t=this._findDataObject(e);return this._contentGetter(t)||""}_validateDirectoryExists(e){if(!this._isFileItemExists(e)||this._isDirGetter(e.fileItem))throw new Ix(4,e)}_checkAbilityToMoveOrCopyItem(e,t){const i=this._findDataObject(e),r=this._getKeyFromDataObject(i,e.parentPath),m=t.getFullPathInfo();let A="";m.forEach(V=>{if(A=Mf(A,V.name),this._getDataObjectKey(V.key,A)===r)throw new Ix(32767,e)})}_createDataObject(e,t,i){const r={};this._nameSetter(r,t),this._getIsDirSetter(r,i),this._keySetter(r,String(new Rf.A));const m=this._findDataObject(e);return this._getDirectoryDataItems(m).push(r),r}_createCopy(e){const t={};this._nameSetter(t,this._nameGetter(e)),this._getIsDirSetter(t,this._isDirGetter(e));const i=this._subFileItemsGetter(e);if(Array.isArray(i)){const r=[];i.forEach(m=>{const A=this._createCopy(m);r.push(A)}),this._subFileItemsSetter(t,r)}return t}_deleteItem(e){const t=this._findDataObject(e),i=this._findFileItemObj(e.pathInfo),r=this._getDirectoryDataItems(i),m=r.indexOf(t);r.splice(m,1)}_getDirectoryDataItems(e){if(!e)return this._data;let t=this._subFileItemsGetter(e);return Array.isArray(t)||(t=[],this._subFileItemsSetter(e,t)),t}_getItems(e){this._validateDirectoryExists(e);const t=e.getFullPathInfo();let r=this._data;if(t&&t.length>0&&t[t.length-1].key){const m=this._findFileItemObj(t);r=m&&this._subFileItemsGetter(m)||[]}return this._ensureKeysForDuplicateNameItems(r),this._convertDataObjectsToFileItems(r,t)}_ensureKeysForDuplicateNameItems(e){const t={};e.forEach(i=>{const r=this._nameGetter(i);t[r]?this._ensureDataObjectKey(i):t[r]=!0})}_findDataObject(e){if(e.isRoot())return null;const t=this._findFileItemObj(e.getFullPathInfo());if(!t)throw new Ix(e.isDirectory?4:2,e);return t}_findFileItemObj(e){Array.isArray(e)||(e=[]);let t="",i=null,r=this._data;for(let m=0;m<e.length&&(0===m||i);m++)i=r.find(A=>{const V=this._isDirGetter(A)||m===e.length-1;return this._getKeyFromDataObject(A,t)===e[m].key&&this._nameGetter(A)===e[m].name&&V}),i&&(t=Mf(t,this._nameGetter(i)),r=this._subFileItemsGetter(i));return i}_getKeyFromDataObject(e,t){const i=this._keyGetter(e),r=Mf(t,this._nameGetter(e));return this._getDataObjectKey(i,r)}_getDataObjectKey(e,t){return e||t}_ensureDataObjectKey(e){let t=this._keyGetter(e);return t||(t=String(new Rf.A),this._keySetter(e,t)),t}_hasSubDirs(e){const t=(0,h.YD)(this._subFileItemsGetter(e),[]);if(!Array.isArray(t))return!0;for(let i=0;i<t.length;i++)if(!0===this._isDirGetter(t[i]))return!0;return!1}_getSetter(e){return(0,C.Tn)(e)?e:(0,fa.vL)(e)}_isFileItemExists(e){return e.isDirectory&&e.isRoot()||!!this._findFileItemObj(e.getFullPathInfo())}_createFileReader(){return new kI.FileReader}},mF=(0,gr.zk)(),eH=class Ew extends bw{constructor(e){super(e=(0,h.YD)(e,{})),this._endpointUrl=e.endpointUrl,this._beforeAjaxSend=e.beforeAjaxSend,this._beforeSubmit=e.beforeSubmit,this._requestHeaders=e.requestHeaders,this._hasSubDirsGetter=(0,fa.Hz)(e.hasSubDirectoriesExpr||"hasSubDirectories")}getItems(e){const t=e.getFullPathInfo();return this._executeRequest("GetDirContents",{pathInfo:t}).then(i=>this._convertDataObjectsToFileItems(i.result,t))}renameItem(e,t){return this._executeRequest("Rename",{pathInfo:e.getFullPathInfo(),isDirectory:e.isDirectory,name:t})}createDirectory(e,t){return this._executeRequest("CreateDir",{pathInfo:e.getFullPathInfo(),name:t})}deleteItems(e){return e.map(t=>this._executeRequest("Remove",{pathInfo:t.getFullPathInfo(),isDirectory:t.isDirectory}))}moveItems(e,t){return e.map(i=>this._executeRequest("Move",{sourcePathInfo:i.getFullPathInfo(),sourceIsDirectory:i.isDirectory,destinationPathInfo:t.getFullPathInfo()}))}copyItems(e,t){return e.map(i=>this._executeRequest("Copy",{sourcePathInfo:i.getFullPathInfo(),sourceIsDirectory:i.isDirectory,destinationPathInfo:t.getFullPathInfo()}))}uploadFileChunk(e,t,i){0===t.chunkIndex&&(t.customData.uploadId=new Rf.A);const r={destinationPathInfo:i.getFullPathInfo(),chunkMetadata:JSON.stringify({UploadId:t.customData.uploadId,FileName:e.name,Index:t.chunkIndex,TotalCount:t.chunkCount,FileSize:e.size})},m={url:this._endpointUrl,headers:this._requestHeaders||{},method:"POST",dataType:"json",data:{chunk:t.chunkBlob,arguments:JSON.stringify(r),command:"UploadChunk"},upload:{onprogress:h.lQ,onloadstart:h.lQ,onabort:h.lQ},xhrFields:{},cache:!1},A=new g.cY;return this._beforeSendInternal(m),Cv.A.sendRequest(m).done(V=>{!V.success&&A.reject(V)||A.resolve()}).fail(A.reject),A.promise()}abortFileUpload(e,t,i){return this._executeRequest("AbortUpload",{uploadId:t.customData.uploadId})}downloadItems(e){const t=this._getDownloadArgs(e),i=(0,a.A)("<form>").css({display:"none"}).attr({method:"POST",action:t.url}),r={command:t.command,arguments:t.arguments};this._beforeSubmitInternal(r),this._appendFormDataInputsToForm(r,i),i.appendTo("body"),L.A.trigger(i,"submit"),setTimeout(()=>i.remove())}getItemsContent(e){const t=this._getDownloadArgs(e),i={url:t.url,headers:this._requestHeaders||{},method:"POST",responseType:"arraybuffer",data:{command:t.command,arguments:t.arguments},upload:{onprogress:h.lQ,onloadstart:h.lQ,onabort:h.lQ},xhrFields:{},cache:!1};return this._beforeSendInternal(i),Cv.A.sendRequest(i)}_getDownloadArgs(e){const i={pathInfoList:e.map(m=>m.getFullPathInfo())},r=JSON.stringify(i);return{url:this._endpointUrl,arguments:r,command:"Download"}}_getItemsIds(e){return e.map(t=>t.relativeName)}_executeRequest(e,t){const i="GetDirContents"===e?"GET":"POST",r=new g.cY,m={url:this._getEndpointUrl(e,t),headers:this._requestHeaders||{},method:i,dataType:"json",data:{},xhrFields:{},cache:!1};return this._beforeSendInternal(m),Cv.A.sendRequest(m).then(A=>{!A.success&&r.reject(A)||r.resolve(A)},A=>r.reject(A)),r.promise()}_beforeSubmitInternal(e){(0,C.Tn)(this._beforeSubmit)&&this._beforeSubmit({formData:e})}_beforeSendInternal(e){if((0,C.Tn)(this._beforeAjaxSend)){const t={headers:e.headers,formData:e.data,xhrFields:e.xhrFields};this._beforeAjaxSend(t),e.headers=t.headers,e.data=t.formData,e.xhrFields=t.xhrFields}(0,C.RI)(e.data)?delete e.data:(e.responseType||e.upload)&&(e.data=this._createFormData(e.data))}_createFormData(e){const t=new mF.FormData;for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(0,C.O9)(e[i])&&t.append(i,e[i]);return t}_appendFormDataInputsToForm(e,t){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(0,C.O9)(e[i])&&(0,a.A)("<input>").attr({type:"hidden",name:i,value:e[i]}).appendTo(t)}_getEndpointUrl(e,t){const i=this._getQueryString({command:e,arguments:JSON.stringify(t)}),r=this._endpointUrl&&this._endpointUrl.indexOf("?")>0?"&":"?";return this._endpointUrl+r+i}_getQueryString(e){const t=[],i=Object.keys(e);for(let r=0;r<i.length;r++){const m=i[r];let A=e[m];if(void 0!==A)if(null===A&&(A=""),Array.isArray(A))this._processQueryStringArrayParam(m,A,t);else{const V=this._getQueryStringPair(m,A);t.push(V)}}return t.join("&")}_processQueryStringArrayParam(e,t,i){(0,w.__)(t,(r,m)=>{const A=this._getQueryStringPair(e,m);i.push(A)})}_getQueryStringPair(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(t)}_hasSubDirs(e){const t=this._hasSubDirsGetter(e);return"boolean"!=typeof t||t}_getKeyExpr(e){return e.keyExpr||"key"}},tH=class pk extends bw{constructor(e){super(e=(0,h.YD)(e,{})),this._hasSubDirsGetter=(0,fa.Hz)(e.hasSubDirectoriesExpr||"hasSubDirectories"),this._getItemsFunction=this._ensureFunction(e.getItems,()=>[]),this._renameItemFunction=this._ensureFunction(e.renameItem),this._createDirectoryFunction=this._ensureFunction(e.createDirectory),this._deleteItemFunction=this._ensureFunction(e.deleteItem),this._moveItemFunction=this._ensureFunction(e.moveItem),this._copyItemFunction=this._ensureFunction(e.copyItem),this._uploadFileChunkFunction=this._ensureFunction(e.uploadFileChunk),this._abortFileUploadFunction=this._ensureFunction(e.abortFileUpload),this._downloadItemsFunction=this._ensureFunction(e.downloadItems),this._getItemsContentFunction=this._ensureFunction(e.getItemsContent)}getItems(e){const t=e.getFullPathInfo();return this._executeActionAsDeferred(()=>this._getItemsFunction(e),!0).then(i=>this._convertDataObjectsToFileItems(i,t))}renameItem(e,t){return this._executeActionAsDeferred(()=>this._renameItemFunction(e,t))}createDirectory(e,t){return this._executeActionAsDeferred(()=>this._createDirectoryFunction(e,t))}deleteItems(e){return e.map(t=>this._executeActionAsDeferred(()=>this._deleteItemFunction(t)))}moveItems(e,t){return e.map(i=>this._executeActionAsDeferred(()=>this._moveItemFunction(i,t)))}copyItems(e,t){return e.map(i=>this._executeActionAsDeferred(()=>this._copyItemFunction(i,t)))}uploadFileChunk(e,t,i){return this._executeActionAsDeferred(()=>this._uploadFileChunkFunction(e,t,i))}abortFileUpload(e,t,i){return this._executeActionAsDeferred(()=>this._abortFileUploadFunction(e,t,i))}downloadItems(e){return this._executeActionAsDeferred(()=>this._downloadItemsFunction(e))}getItemsContent(e){return this._executeActionAsDeferred(()=>this._getItemsContentFunction(e))}_hasSubDirs(e){const t=this._hasSubDirsGetter(e);return"boolean"!=typeof t||t}_getKeyExpr(e){return e.keyExpr||"key"}_ensureFunction(e,t){return t=t||h.lQ,(0,C.Tn)(e)?e:t}};class PS{constructor(e){this._options=(0,_.X)({},e=e||{}),this._isInitialized=!1,this._dataLoading=!1,this._dataLoadingDeferred=null,this._rootDirectoryInfo=this._createRootDirectoryInfo(e.rootText),this._currentDirectoryInfo=this._rootDirectoryInfo,this._defaultIconMap=this._createDefaultIconMap(),this.startSingleLoad(),this._setSecurityController(),this._setProvider(e.fileProvider),this._initialize()}_initialize(){const e=this._options.currentPathKeys&&this._options.currentPathKeys.length?this.setCurrentPathByKeys(this._options.currentPathKeys):this.setCurrentPath(this._options.currentPath),t=()=>{this._isInitialized=!0,this._raiseInitialized()};e?(0,g.z7)(e).always(t):t()}_setSecurityController(){this._securityController=new gk({allowedFileExtensions:this._options.allowedFileExtensions,maxFileSize:this._options.uploadMaxFileSize}),this._resetState()}setAllowedFileExtensions(e){(0,C.O9)(e)&&(this._options.allowedFileExtensions=e),this._setSecurityController(),this.refresh()}setUploadOptions(e){let{maxFileSize:t,chunkSize:i}=e;(0,C.O9)(i)&&(this._options.uploadChunkSize=i),(0,C.O9)(t)&&(this._options.uploadMaxFileSize=t,this._setSecurityController(),this.refresh())}_setProvider(e){this._fileProvider=this._createFileProvider(e),this._resetState()}updateProvider(e,t){return(0,C.O9)(t)?(0,g.z7)(this._getDirectoryByPathParts(this._rootDirectoryInfo,t,!0)).then(i=>{i!==this._rootDirectoryInfo&&this._resetCurrentDirectory(),this._setProvider(e)}).then(()=>this.setCurrentPathByKeys(t)):this._updateProviderOnly(e)}_updateProviderOnly(e){return this._resetCurrentDirectory(),this._setProvider(e),(0,g.z7)(this.refresh())}_createFileProvider(e){if(e||(e=[]),Array.isArray(e))return new LI({data:e});if(e instanceof bw)return e;switch(e.type){case"remote":return new eH(e);case"custom":return new tH(e)}return new LI(e)}setCurrentPath(e){const t=dk(e),i=Mf(...t);return this.getCurrentDirectory().fileItem.relativeName===i?(new g.cY).resolve().promise():this._setCurrentDirectoryByPathParts(t)}setCurrentPathByKeys(e){return(0,h.RL)(this.getCurrentDirectory().fileItem.pathKeys,e)?(new g.cY).resolve().promise():this._setCurrentDirectoryByPathParts(e,!0)}getCurrentPath(){let e="",t=this.getCurrentDirectory();for(;t&&!t.fileItem.isRoot();){const i=Cw(t.fileItem.name);e=Mf(i,e),t=t.parentDirectory}return e}getCurrentPathKeys(){return this.getCurrentDirectory().fileItem.pathKeys}getCurrentDirectory(){return this._currentDirectoryInfo}setCurrentDirectory(e,t){if(!e)return;if(t&&(e=this._getActualDirectoryInfo(e)),this._currentDirectoryInfo&&this._currentDirectoryInfo===e)return void this._raisePathPotentiallyChanged();const i=this._currentDirectoryInfo.fileItem.key!==e.fileItem.key;this._currentDirectoryInfo=e,i&&this._isInitialized&&(this._dataLoading||this._raiseDataLoading("navigation"),this._raiseSelectedDirectoryChanged(e))}_resetCurrentDirectory(){this._currentDirectoryInfo=this._rootDirectoryInfo}getCurrentItems(e){return this._dataLoadingDeferred?this._dataLoadingDeferred.then(()=>this._getCurrentItemsInternal(e)):this._getCurrentItemsInternal(e)}_getCurrentItemsInternal(e){const t=this.getCurrentDirectory();return this.getDirectoryContents(t).then(r=>{const m=this._separateItemsByType(r);return t.fileItem.hasSubDirectories=!!m.folders.length,e?m.files:r})}getDirectories(e,t){return this.getDirectoryContents(e,t).then(i=>i.filter(r=>r.fileItem.isDirectory))}_separateItemsByType(e){const t=[],i=[];return e.forEach(r=>r.fileItem.isDirectory?t.push(r):i.push(r)),{folders:t,files:i}}getDirectoryContents(e,t){if(!e)return(new g.cY).resolve([this._rootDirectoryInfo]).promise();if(e.itemsLoaded)return(new g.cY).resolve(e.items).promise();if(this._singleOperationLockId&&e.itemsSingleLoadErrorId===this._singleOperationLockId)return this._changeDirectoryOnError(e,t,!0),(new g.cY).reject().promise();const i=e.getInternalKey();let r=this._loadedItems[i];return r||(r=this._getFileItems(e,t).then(m=>(e.items=(m=m||[]).map(A=>A.isDirectory&&this._createDirectoryInfo(A,e)||this._createFileInfo(A,e)),e.itemsLoaded=!0,e.items),()=>(this._singleOperationLockId&&e.itemsSingleLoadErrorId!==this._singleOperationLockId&&(e.itemsSingleLoadErrorId=this._singleOperationLockId),[])),this._loadedItems[i]=r,r.always(()=>{delete this._loadedItems[i]}),r)}_getFileItems(e,t){let i=null;try{i=this._fileProvider.getItems(e.fileItem)}catch(r){return this._handleItemLoadError(e,r,t)}return(0,g.z7)(i).then(r=>this._securityController.getAllowedItems(r),r=>this._handleItemLoadError(e,r,t))}createDirectory(e,t){const i=e.fileItem,r=this._createDirInfoByName(t,e),m=this._createEditActionInfo("create",r,e);return this._processEditAction(m,A=>{A.parentDirectory=i,A.name=t,this._editingEvents.onDirectoryCreating(A)},()=>this._fileProvider.createDirectory(i,t).done(A=>(i.isRoot()||(i.hasSubDirectories=!0),A)),()=>{this._editingEvents.onDirectoryCreated({parentDirectory:i,name:t})},()=>this._resetDirectoryState(e,!0))}renameItem(e,t){const i=e.fileItem.createClone(),r=this._createEditActionInfo("rename",e,e.parentDirectory,{itemNewName:t});return this._processEditAction(r,(m,A)=>{A.fileItem.isDirectory||this._securityController.validateExtension(t),m.item=i,m.newName=t,this._editingEvents.onItemRenaming(m)},m=>this._fileProvider.renameItem(m,t),()=>{this._editingEvents.onItemRenamed({sourceItem:i,itemName:t})},()=>{const m=this._getActualDirectoryInfo(e.parentDirectory);this._resetDirectoryState(m),this.setCurrentDirectory(m)})}moveItems(e,t){const i=this._createEditActionInfo("move",e,t);return this._processEditAction(i,(r,m)=>{r.item=m.fileItem,r.destinationDirectory=t.fileItem,this._editingEvents.onItemMoving(r)},r=>this._fileProvider.moveItems([r],t.fileItem),r=>{const m={sourceItem:r.fileItem,parentDirectory:t.fileItem,itemName:r.fileItem.name,itemPath:Mf(t.fileItem.path,r.fileItem.name)};this._editingEvents.onItemMoved(m)},r=>{e.forEach(m=>this._resetDirectoryState(m.parentDirectory,!0)),r&&(this._resetDirectoryState(t),this.setCurrentPathByKeys(t.fileItem.pathKeys),t.expanded=!0)})}copyItems(e,t){const i=this._createEditActionInfo("copy",e,t);return this._processEditAction(i,(r,m)=>{r.item=m.fileItem,r.destinationDirectory=t.fileItem,this._editingEvents.onItemCopying(r)},r=>this._fileProvider.copyItems([r],t.fileItem),r=>{const m={sourceItem:r.fileItem,parentDirectory:t.fileItem,itemName:r.fileItem.name,itemPath:Mf(t.fileItem.path,r.fileItem.name)};this._editingEvents.onItemCopied(m)},r=>{r&&(t=this._getActualDirectoryInfo(t),this._resetDirectoryState(t),this.setCurrentDirectory(t),t.expanded=!0)})}deleteItems(e){const i=this._createEditActionInfo("delete",e,e.length>0?e[0].parentDirectory:null);return this._processEditAction(i,(r,m)=>{r.item=m.fileItem,this._editingEvents.onItemDeleting(r)},r=>this._fileProvider.deleteItems([r]),r=>this._editingEvents.onItemDeleted({item:r.fileItem}),()=>{e.forEach(r=>{const m=this._getActualDirectoryInfo(r.parentDirectory);this._resetDirectoryState(m),this.setCurrentDirectory(m)})})}processUploadSession(e,t){const i=this._getItemInfosForUploaderFiles(e.files,t),r=this._createEditActionInfo("upload",i,t,{sessionInfo:e});return this._processEditAction(r,()=>{},(m,A)=>e.deferreds[A],()=>{},()=>this._resetDirectoryState(t,!0))}uploadFileChunk(e,t,i){let r=null;0===t.chunkIndex?(this._securityController.validateMaxFileSize(e.size),this._securityController.validateExtension(e.name),r=this._processBeforeItemEditAction(A=>{A.fileData=e,A.destinationDirectory=i,this._editingEvents.onFileUploading(A)})):r=(new g.cY).resolve().promise();let m=r.then(()=>this._fileProvider.uploadFileChunk(e,t,i));return t.chunkIndex===t.chunkCount-1&&(m=m.done(()=>{this._editingEvents.onFileUploaded({fileData:e,parentDirectory:i})})),m}abortFileUpload(e,t,i){return(0,g.z7)(this._fileProvider.abortFileUpload(e,t,i))}getFileUploadChunkSize(){const e=this._options.uploadChunkSize;return e&&e>0?e:this._fileProvider.getFileUploadChunkSize()}downloadItems(e){const t=e.map(i=>this._processBeforeItemEditAction(r=>{r.item=i.fileItem,this._editingEvents.onItemDownloading(r)},i));return(0,g.z7)(...t).then(()=>{const i=e.map(r=>r.fileItem);return(0,g.z7)(this._getItemActionResult(this._fileProvider.downloadItems(i))).then(()=>{},r=>{this._raiseDownloadItemsError(e,e[0].parentDirectory,r)})},i=>{this._raiseDownloadItemsError(e,e[0].parentDirectory,i)})}getItemContent(e){const t=e.map(i=>i.fileItem);return(0,g.z7)(this._fileProvider.getItemsContent(t))}_handleItemLoadError(e,t,i){return e=this._getActualDirectoryInfo(e),this._raiseGetItemsError(e,t),this._changeDirectoryOnError(e,i),(new g.cY).reject().promise()}_raiseGetItemsError(e,t){const i=this._createEditActionInfo("getItems",e,e);this._raiseEditActionStarting(i),this._raiseEditActionResultAcquired(i),this._raiseEditActionError(i,{errorCode:t.errorCode,errorText:t.errorText,fileItem:e.fileItem,index:0})}_raiseDownloadItemsError(e,t,i){const r=this._createEditActionInfo("download",e,t),m=e.length;r.singleRequest=1===m,this._raiseEditActionStarting(r),this._raiseEditActionResultAcquired(r);for(let A=0;A<m-1;A++)this._raiseEditActionItemError(r,{errorCode:i.errorCode,errorText:i.errorText,fileItem:e[A].fileItem,index:A});this._raiseEditActionError(r,{errorCode:i.errorCode,errorText:i.errorText,fileItem:e[m-1].fileItem,index:m-1})}_changeDirectoryOnError(e,t,i){i&&(e=this._getActualDirectoryInfo(e)),this._resetDirectoryState(e),e.expanded=!1,t||this.setCurrentDirectory(e.parentDirectory)}_getItemActionResult(e){return Array.isArray(e)?e[0]:e}_processEditAction(e,t,i,r,m){let A=!1;this._raiseEditActionStarting(e);const V=e.itemInfos.map((X,ce)=>this._processBeforeItemEditAction(t,X).then(()=>this._getItemActionResult(i(X.fileItem,ce)).done(()=>r(X))));return e.singleRequest=1===V.length,this._raiseEditActionResultAcquired(e),Ly(V,X=>{A=!0,this._raiseCompleteEditActionItem(e,X)},X=>this._raiseEditActionItemError(e,X)).then(()=>{m(A),this._raiseCompleteEditAction(e)})}_createEditActionInfo(e,t,i,r){r=r||{};const m=(t=Array.isArray(t)?t:[t]).map(A=>A.fileItem);return{name:e,itemInfos:t,items:m,directory:i,customData:r,singleRequest:!0}}_processBeforeItemEditAction(e,t){const i=new g.cY,r=this._createBeforeActionArgs();try{e(r,t)}catch(m){return i.reject(m).promise()}if(r.cancel){if(!0===r.cancel)return i.reject({errorText:r.errorText,errorCode:r.errorCode});(0,C.yL)(r.cancel)&&(0,g.z7)(r.cancel).then(m=>{!0===m?i.reject():(0,C.Gv)(m)&&!0===m.cancel&&i.reject({errorText:m.errorText,errorCode:m.errorCode}),i.resolve()},i.resolve)}else i.resolve();return i.promise()}_createBeforeActionArgs(){return{errorCode:void 0,errorText:"",cancel:!1}}_getItemInfosForUploaderFiles(e,t){const i=this._getPathInfo(t),r=[];for(let m=0;m<e.length;m++){const V=new Dx(i,e[m].name,!1),X=this._createFileInfo(V,t);r.push(X)}return r}refresh(){return this._lockRefresh?this._refreshDeferred:(this._lockRefresh=!0,this._executeDataLoad(()=>this._refreshDeferred=this._refreshInternal(),"refresh"))}startSingleLoad(){this._singleOperationLockId=(new Rf.A).toString()}endSingleLoad(){delete this._singleOperationLockId}_refreshInternal(){const e={items:this._rootDirectoryInfo.items},t=this._getDirectoryPathKeyParts(this.getCurrentDirectory());return this._resetDirectoryState(this._rootDirectoryInfo),this._loadItemsRecursive(this._rootDirectoryInfo,e).then(()=>{const i=this._findDirectoryByPathKeyParts(t);this.setCurrentDirectory(i),delete this._lockRefresh})}_loadItemsRecursive(e,t){return this.getDirectories(e).then(i=>{const r=[];for(let m=0;m<i.length;m++){const A=t.items.find(V=>i[m].fileItem.key===V.fileItem.key);A&&(i[m].expanded=A.expanded,i[m].expanded&&r.push(this._loadItemsRecursive(i[m],A)))}return Ly(r)},()=>null)}_setCurrentDirectoryByPathParts(e,t){return this._executeDataLoad(()=>this._setCurrentDirectoryByPathPartsInternal(e,t),"navigation")}_setCurrentDirectoryByPathPartsInternal(e,t){return this._getDirectoryByPathParts(this._rootDirectoryInfo,e,t).then(i=>{for(let r=i.parentDirectory;r;r=r.parentDirectory)r.expanded=!0;this.setCurrentDirectory(i)},()=>{this._raisePathPotentiallyChanged()})}_executeDataLoad(e,t){return this._dataLoadingDeferred?this._dataLoadingDeferred.then(()=>this._executeDataLoad(e,t)):(this._dataLoading=!0,this._dataLoadingDeferred=new g.cY,this._isInitialized&&this._raiseDataLoading(t),e().always(()=>{const i=this._dataLoadingDeferred;this._dataLoadingDeferred=null,this._dataLoading=!1,i.resolve()}))}_getDirectoryByPathParts(e,t,i){if(t.length<1)return(new g.cY).resolve(e).promise();const r=i?"key":"name";return this.getDirectories(e).then(m=>{const A=m.find(X=>X.fileItem[r]===t[0]);if(!A)return(new g.cY).reject().promise();const V=[...t].splice(1);return this._getDirectoryByPathParts(A,V,i)})}_getDirectoryPathKeyParts(e){const t=[];for(;e&&e.parentDirectory;)t.unshift(e.fileItem.key),e=e.parentDirectory;return t}_findDirectoryByPathKeyParts(e){let t=this._rootDirectoryInfo;if(0===e.length)return t;let i=0,r=t;for(;r&&i<e.length;)r=t.items.find(m=>m.fileItem.key===e[i]),r&&(t=r),i++;return t}_getActualDirectoryInfo(e){const t=this._getDirectoryPathKeyParts(e);return this._findDirectoryByPathKeyParts(t)}_createDirInfoByName(e,t){const i=this._getPathInfo(t),r=new Dx(i,e,!0);return this._createDirectoryInfo(r,t)}_createDirectoryInfo(e,t){return(0,_.X)(this._createFileInfo(e,t),{icon:"folder",expanded:e.isRoot(),items:[]})}_createFileInfo(e,t){return{fileItem:e,parentDirectory:t,icon:this._getFileItemDefaultIcon(e),getInternalKey(){return`FIK_${this.fileItem.key}`},getDisplayName(){return this.displayName||this.fileItem.name}}}_resetDirectoryState(e,t){t&&(e=this._getActualDirectoryInfo(e)),e.itemsLoaded=!1,e.items=[]}_getFileItemDefaultIcon(e){if(e.isDirectory)return"folder";const t=e.getFileExtension();return this._defaultIconMap[t]||"doc"}_createDefaultIconMap(){const e={".txt":"txtfile",".rtf":"rtffile",".doc":"docfile",".docx":"docxfile",".xls":"xlsfile",".xlsx":"xlsxfile",".ppt":"pptfile",".pptx":"pptxfile",".pdf":"pdffile"};return[".png",".gif",".jpg",".jpeg",".ico",".bmp"].forEach(t=>{e[t]="image"}),e}_createRootDirectoryInfo(e){const t=new Dx(null,"",!0),i=this._createDirectoryInfo(t,null);return i.displayName=e||"Files",i}setRootText(e){this._rootDirectoryInfo.displayName=e||"Files"}_raiseInitialized(){this._tryCallAction("onInitialized",{controller:this})}_raiseDataLoading(e){this._tryCallAction("onDataLoading",{operation:e})}_raiseSelectedDirectoryChanged(e){this._tryCallAction("onSelectedDirectoryChanged",{selectedDirectoryInfo:e})}_raiseEditActionStarting(e){this._tryCallAction("onEditActionStarting",e)}_raiseEditActionResultAcquired(e){this._tryCallAction("onEditActionResultAcquired",e)}_raiseEditActionError(e,t){this._tryCallAction("onEditActionError",e,t)}_raiseEditActionItemError(e,t){this._tryCallAction("onEditActionItemError",e,t)}_raiseCompleteEditActionItem(e,t){this._tryCallAction("onCompleteEditActionItem",e,t)}_raiseCompleteEditAction(e){this._tryCallAction("onCompleteEditAction",e)}_raisePathPotentiallyChanged(){this._tryCallAction("onPathPotentiallyChanged")}_tryCallAction(e){const t=Array.prototype.slice.call(arguments,1);this._isInitialized&&this._options[e]&&this._options[e](...t)}_resetState(){this._selectedDirectory=null,this._rootDirectoryInfo.items=[],this._rootDirectoryInfo.itemsLoaded=!1,this._loadedItems={}}_getPathInfo(e){const t=[];for(let i=e;i&&!i.fileItem.isRoot();i=i.parentDirectory)t.unshift({key:i.fileItem.key,name:i.fileItem.name});return t}on(e,t){this._options[`on${e}`]=t}get _editingEvents(){return this._options.editingEvents}}class gk{constructor(e){this._options=(0,_.X)({allowedFileExtensions:[],maxFileSize:0},e),this._extensionsMap={},this._allowedFileExtensions.forEach(t=>{this._extensionsMap[t.toUpperCase()]=!0})}getAllowedItems(e){return 0===this._allowedFileExtensions.length?e:e.filter(t=>t.isDirectory||this._isValidExtension(t.name))}validateExtension(e){if(!this._isValidExtension(e))throw new Ix(5,null)}validateMaxFileSize(e){if(this._maxFileSize&&e>this._maxFileSize)throw new Ix(6,null)}_isValidExtension(e){if(0===this._allowedFileExtensions.length)return!0;const t=lk(e).toUpperCase();return this._extensionsMap[t]}get _allowedFileExtensions(){return this._options.allowedFileExtensions}get _maxFileSize(){return this._options.maxFileSize}}const BI={create:!1,copy:!1,move:!1,delete:!1,rename:!1,upload:!1,download:!1};class iH{constructor(e){this._actions={},this._permissions=e||{},this._initCommands()}_initCommands(){this._commands=[{name:"create",text:Wn.A.format("dxFileManager-commandCreate"),icon:"newfolder",enabled:this._permissions.create,noFileItemRequired:!0},{name:"rename",text:Wn.A.format("dxFileManager-commandRename"),icon:"rename",enabled:this._permissions.rename,isSingleFileItemCommand:!0},{name:"move",text:Wn.A.format("dxFileManager-commandMove"),icon:"movetofolder",enabled:this._permissions.move},{name:"copy",text:Wn.A.format("dxFileManager-commandCopy"),icon:"copy",enabled:this._permissions.copy},{name:"delete",text:Wn.A.format("dxFileManager-commandDelete"),icon:"trash",enabled:this._permissions.delete},{name:"download",text:Wn.A.format("dxFileManager-commandDownload"),icon:"download",enabled:this._permissions.download},{name:"upload",text:Wn.A.format("dxFileManager-commandUpload"),icon:"upload",enabled:this._permissions.upload,noFileItemRequired:!0},{name:"refresh",text:Wn.A.format("dxFileManager-commandRefresh"),icon:"dx-filemanager-i dx-filemanager-i-refresh",enabled:!0,noFileItemRequired:!0},{name:"thumbnails",text:Wn.A.format("dxFileManager-commandThumbnails"),icon:"mediumiconslayout",enabled:!0,noFileItemRequired:!0},{name:"details",text:Wn.A.format("dxFileManager-commandDetails"),icon:"detailslayout",enabled:!0,noFileItemRequired:!0},{name:"clearSelection",text:Wn.A.format("dxFileManager-commandClearSelection"),icon:"remove",enabled:!0},{name:"showNavPane",hint:Wn.A.format("dxFileManager-commandShowNavPane"),icon:"menu",enabled:!1,noFileItemRequired:!0}],this._commandMap={},this._commands.forEach(e=>{this._commandMap[e.name]=e})}registerActions(e){this._actions=(0,_.X)(this._actions,e)}executeCommand(e,t){const i=(0,C.Kg)(e)?e:e.name,r=this._actions[i];if(r)return r(t)}updatePermissions(e){const t=(0,_.X)({},BI,e);this._permissions=t,(0,w.__)(this._permissions,i=>{this._commandMap[i].enabled=this._permissions[i]})}setCommandEnabled(e,t){const i=this.getCommandByName(e);i&&(i.enabled=t)}getCommandByName(e){return this._commandMap[e]}isCommandAvailable(e,t){const i=this.getCommandByName(e);if(!i||!i.enabled)return!1;if(i.noFileItemRequired)return!0;const r=t&&t.length||0;return 0!==r&&!t.some(m=>m.fileItem.isRoot()||m.fileItem.isParentFolder)&&("download"===e?t.every(m=>!m.fileItem.isDirectory):!i.isSingleFileItemCommand||1===r)}}const NI={create:{},upload:{},download:{},rename:{},move:{},copy:{},delete:{},refresh:{beginGroup:!0}},_F=["beginGroup","closeMenuOnClick","disabled","icon","selectable","selected","text","visible"],mk=class vF extends Sl.A{_initMarkup(){this._initActions(),this._isVisible=!1;const e=(0,a.A)("<div>").appendTo(this.$element());this._contextMenu=this._createComponent(e,H_.A,{cssClass:"dx-filemanager-context-menu",showEvent:"",onItemClick:t=>this._onContextMenuItemClick(t.itemData.name,t),onShowing:t=>this._onContextMenuShowing(t),onShown:()=>this._onContextMenuShown(),onHidden:()=>this._onContextMenuHidden()}),super._initMarkup()}showAt(e,t,i,r){const{itemData:m,itemElement:A,isActionButton:V=!1}=r;this._isVisible&&this._onContextMenuHidden(),this._menuShowingContext={targetElement:A,itemData:m,fileItems:e,event:i,isActionButton:V};const X={of:t,at:"top left",my:"top left",offset:""};i?X.offset=i.offsetX+" "+i.offsetY:(X.my="left top",X.at="left bottom",X.boundaryOffset="1"),this._contextMenu.option({target:t,position:X}),this._contextMenu.show()}createContextMenuItems(e,t,i){this._targetFileItems=e,this._targetFileItem=(0,C.O9)(i)?i:e?.[0];const r=[];return(t||this.option("items")).forEach(A=>{const V=(0,C.Kg)(A)?A:A.name,X=this._configureItemByCommandName(V,A,e,this._targetFileItem);this._isContextMenuItemAvailable(X,e)&&r.push(X)}),r}_isContextMenuItemAvailable(e,t){return this._isDefaultItem(e.name)&&e._autoHide?!(this._isIsolatedCreationItemCommand(e.name)&&t&&t.length)&&this._commandManager.isCommandAvailable(e.name,t):(0,h.YD)(e.visible,!0)}_isIsolatedCreationItemCommand(e){return("create"===e||"upload"===e)&&this.option("isolateCreationItemCommands")}_isDefaultItem(e){return!!NI[e]}_configureItemByCommandName(e,t,i,r){if(!this._isDefaultItem(e)){const V=(0,_.X)(!0,{},t);return V.originalItemData=t,this._addItemClickHandler(e,V),Array.isArray(t.items)&&(V.items=this.createContextMenuItems(i,t.items,r)),V}const m=this._createMenuItemByCommandName(e);return(0,_.X)(m,NI[e]),m.originalItemData=t,xg(m,t,_F),(0,C.O9)(m.visible)||(m._autoHide=!0),e&&!m.name&&(0,_.X)(m,{name:e}),m}_createMenuItemByCommandName(e){const{text:t,icon:i}=this._commandManager.getCommandByName(e),r={name:e,text:t,icon:i};return this._addItemClickHandler(e,r),r}_addItemClickHandler(e,t){t.onItemClick=i=>this._onContextMenuItemClick(e,i)}_onContextMenuItemClick(e,t){var i;const r=(0,_.X)(!0,{},t);if(r.itemData=t.itemData.originalItemData,r.fileSystemItem=null===(i=this._targetFileItem)||void 0===i?void 0:i.fileItem,r.viewArea=this.option("viewArea"),this._actions.onItemClick(r),this._isDefaultItem(e)){const m=this._isIsolatedCreationItemCommand(e)?null:this._targetFileItems;this._commandManager.executeCommand(e,m)}}_initActions(){this._actions={onContextMenuHidden:this._createActionByOption("onContextMenuHidden"),onContextMenuShowing:this._createActionByOption("onContextMenuShowing"),onItemClick:this._createActionByOption("onItemClick")}}_onContextMenuShowing(e){if(this._isVisible&&this._onContextMenuHidden(!0),e=(0,_.X)(e,this._menuShowingContext,{options:this.option(),cancel:!1}),this._actions.onContextMenuShowing(e),!e.cancel){const t=this.createContextMenuItems(this._menuShowingContext.fileItems,null,this._menuShowingContext.fileSystemItem);this._contextMenu.option("dataSource",t)}}tryUpdateVisibleContextMenu(){if(this._isVisible){const e=this.createContextMenuItems(this._targetFileItems);this._contextMenu.option("dataSource",e)}}_onContextMenuShown(){this._isVisible=!0}_onContextMenuHidden(e){this._isVisible=!1,e||(this._menuShowingContext={}),this._contextMenu.option("visible",!1),this._raiseContextMenuHidden()}_raiseContextMenuHidden(){this._actions.onContextMenuHidden()}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{commandManager:null,onContextMenuHidden:null,onItemClick:null})}_optionChanged(e){const t=e.name;switch(t){case"commandManager":this.repaint();break;case"items":this.tryUpdateVisibleContextMenu();break;case"onItemClick":case"onContextMenuShowing":case"onContextMenuHidden":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}get _commandManager(){return this.option("commandManager")}};var CF=M(1757),uC=M(9012);const vk=class _k extends Sl.A{_initMarkup(){this._createClickAction();const e=(0,a.A)("<div>");this.$element().append(e).addClass("dx-filemanager-file-actions-button"),this._button=this._createComponent(e,uC.A,{icon:"overflow",stylingMode:"text",onClick:t=>this._raiseClick(t)}),super._initMarkup()}_createClickAction(){this._clickAction=this._createActionByOption("onClick")}_raiseClick(e){this._clickAction(e)}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{cssClass:"",onClick:null})}_optionChanged(e){switch(e.name){case"cssClass":this.repaint();break;case"onClick":this._createClickAction();break;default:super._optionChanged(e)}}setActive(e){this.$element().toggleClass("dx-filemanager-file-actions-button-activated",e),setTimeout(()=>this._button.$element().toggleClass("dx-state-active",e))}},OF=class EF extends Sl.A{_initMarkup(){this._initActions(),this._getCurrentDirectory=this.option("getCurrentDirectory"),this._createFileActionsButton=h.lQ,this._storeExpandedState=this.option("storeExpandedState")||!1;const e=(0,a.A)("<div>").addClass("dx-filemanager-dirs-tree").appendTo(this.$element()),t={dataStructure:"plain",rootValue:"",createChildren:this._onFilesTreeViewCreateSubDirectories.bind(this),itemTemplate:this._createFilesTreeViewItemTemplate.bind(this),keyExpr:"getInternalKey",parentIdExpr:"parentDirectory.getInternalKey",displayExpr:i=>i.getDisplayName(),hasItemsExpr:"fileItem.hasSubDirectories",onItemClick:i=>this._actions.onDirectoryClick(i),onItemExpanded:i=>this._onFilesTreeViewItemExpanded(i),onItemCollapsed:i=>this._onFilesTreeViewItemCollapsed(i),onItemRendered:i=>this._onFilesTreeViewItemRendered(i),onContentReady:()=>this._actions.onFilesTreeViewContentReady()};this._contextMenu&&(this._contextMenu.option("onContextMenuHidden",()=>this._onContextMenuHidden()),t.onItemContextMenu=i=>this._onFilesTreeViewItemContextMenu(i),this._createFileActionsButton=(i,r)=>this._createComponent(i,vk,r)),this._filesTreeView=this._createComponent(e,CF.A,t)}_initActions(){this._actions={onDirectoryClick:this._createActionByOption("onDirectoryClick"),onFilesTreeViewContentReady:this._createActionByOption("onFilesTreeViewContentReady")}}_render(){super._render();const e=this;setTimeout(()=>{e._updateFocusedElement()})}_onFilesTreeViewCreateSubDirectories(e){const t=this.option("getDirectories");return t&&t(e&&e.itemData||null,!0)}_onFilesTreeViewItemRendered(e){let{itemData:t}=e;const i=this._getCurrentDirectory();i&&i.fileItem.equals(t.fileItem)&&(this._updateFocusedElement(),this._restoreScrollTopPosition())}_onFilesTreeViewItemExpanded(e){let{itemData:t}=e;this._storeExpandedState&&(t.expanded=!0)}_onFilesTreeViewItemCollapsed(e){let{itemData:t}=e;this._storeExpandedState&&(t.expanded=!1)}_createFilesTreeViewItemTemplate(e,t,i){const r=(0,a.A)(i);r.closest(this._filesTreeViewItemSelector).data("item",e);const A=(0,x.N)(e.icon),V=(0,a.A)("<span>").text(e.getDisplayName()).addClass("dx-filemanager-dirs-tree-item-text"),X=(0,a.A)("<div>");r.append(A,V,X),this._createFileActionsButton(X,{onClick:ce=>this._onFileItemActionButtonClick(ce)})}_onFilesTreeViewItemContextMenu(e){let{itemElement:t,event:i}=e;i.preventDefault(),i.stopPropagation();const r=(0,a.A)(t).data("item");this._contextMenu.showAt([r],t,i,{itemData:r,itemElement:t})}_onFileItemActionButtonClick(e){let{component:t,element:i,event:r}=e;r.stopPropagation();const m=t.$element().closest(this._filesTreeViewItemSelector),A=m.data("item");this._contextMenu.showAt([A],i,r,{itemData:A,itemElement:m,isActionButton:!0}),this._activeFileActionsButton=t,this._activeFileActionsButton.setActive(!0)}_onContextMenuHidden(){this._activeFileActionsButton&&this._activeFileActionsButton.setActive(!1)}toggleNodeDisabledState(e,t){const i=this._getNodeByKey(e);if(!i)return;const m=this._filesTreeView.option("items").map(A=>A.getInternalKey()).indexOf(i.getInternalKey());-1!==m&&this._filesTreeView.option(`items[${m}].disabled`,t)}_saveScrollTopPosition(){(0,gr.Vd)()&&(this._scrollTopPosition=this._filesTreeView.getScrollable().scrollTop())}_restoreScrollTopPosition(){!(0,gr.Vd)()||!(0,C.kf)(this._scrollTopPosition)||setTimeout(()=>this._filesTreeView.getScrollable().scrollTo(this._scrollTopPosition))}_updateFocusedElement(){const e=this._getCurrentDirectory(),t=this._getItemElementByKey(e?.getInternalKey());this._$focusedElement&&this._$focusedElement.toggleClass("dx-filemanager-focused-item",!1),this._$focusedElement=t||(0,a.A)(),this._$focusedElement.toggleClass("dx-filemanager-focused-item",!0)}_getNodeByKey(e){var t;return null===(t=this._filesTreeView)||void 0===t?void 0:t._getNode(e)}_getPublicNode(e){var t;const i=[...null===(t=this._filesTreeView)||void 0===t?void 0:t.getNodes()];for(;i.length;){const r=i.shift();if(r.itemData.getInternalKey()===e)return r;r.children.length&&i.push(...r.children)}}_getItemElementByKey(e){const t=this._getNodeByKey(e);if(t){const i=this._filesTreeView._getNodeElement(t);if(i)return i.children(this._filesTreeViewItemSelector)}return null}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{storeExpandedState:!1,initialFolder:null,contextMenu:null,getItems:null,getCurrentDirectory:null,onDirectoryClick:null})}_optionChanged(e){const t=e.name;switch(t){case"storeExpandedState":this._storeExpandedState=this.option(t);break;case"getItems":case"rootFolderDisplayName":case"initialFolder":case"contextMenu":this.repaint();break;case"getCurrentDirectory":this.getCurrentDirectory=this.option(t);break;case"onDirectoryClick":case"onFilesTreeViewContentReady":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}get _filesTreeViewItemSelector(){return".dx-treeview-item"}get _contextMenu(){return this.option("contextMenu")}toggleDirectoryExpandedState(e,t){const i=new g.cY,r=this._getPublicNode(e?.getInternalKey());return r?r.expanded===t||r.itemsLoaded&&!r.itemData.fileItem.hasSubDirectories?i.resolve().promise():this._filesTreeView[t?"expandItem":"collapseItem"](e.getInternalKey()):i.reject().promise()}refresh(){this._$focusedElement=null,this._saveScrollTopPosition(),this._filesTreeView.option("dataSource",[])}updateCurrentDirectory(){this._disposed||(this._updateFocusedElement(),this._storeExpandedState&&this._updateExpandedStateToCurrentDirectory())}_updateExpandedStateToCurrentDirectory(){return this.toggleDirectoryExpandedStateRecursive(this._getCurrentDirectory().parentDirectory,!0)}toggleDirectoryExpandedStateRecursive(e,t){const i=[];for(let r=e;r;r=r.parentDirectory)i.unshift(r);return this.toggleDirectoryLineExpandedState(i,t)}toggleDirectoryLineExpandedState(e,t){return e.length?this.toggleDirectoryExpandedState(e.shift(),t).then(()=>this.toggleDirectoryLineExpandedState(e,t)):(new g.cY).resolve().promise()}};var VI=M(1175),HI=M(1395),Ow=M(2440);const yk=class wF extends Sl.A{_init(){this._initActions(),this._lockFocusedItemProcessing=!1,this._focusedItemKey=this.option("focusedItemKey"),super._init()}_initMarkup(){this._needResetScrollPosition=!1,this.$element().addClass("dx-filemanager-files-view");const e=(0,N.b4)(HI.U,"dxFileManager_open");L.A.on(this.$element(),e,this._getItemSelector(),this._onItemDblClick.bind(this)),super._initMarkup()}_initActions(){this._actions={onError:this._createActionByOption("onError"),onSelectionChanged:this._createActionByOption("onSelectionChanged"),onFocusedItemChanged:this._createActionByOption("onFocusedItemChanged"),onSelectedItemOpened:this._createActionByOption("onSelectedItemOpened"),onContextMenuShowing:this._createActionByOption("onContextMenuShowing"),onItemListDataLoaded:this._createActionByOption("onItemListDataLoaded")}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{selectionMode:"single",selectedItemKeys:[],focusedItemKey:void 0,contextMenu:null,getItems:null,getItemThumbnail:null,onError:null,onSelectionChanged:null,onFocusedItemChanged:null,onSelectedItemOpened:null,onContextMenuShowing:null})}_optionChanged(e){const t=e.name;switch(t){case"selectionMode":case"contextMenu":case"getItems":case"getItemThumbnail":this.repaint();break;case"selectedItemKeys":this._setSelectedItemKeys(e.value);break;case"focusedItemKey":this._lockFocusedItemProcessing||this._setFocusedItemKey(e.value);break;case"onError":case"onSelectedItemOpened":case"onSelectionChanged":case"onFocusedItemChanged":case"onContextMenuShowing":case"onItemListDataLoaded":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}_getItems(){return this._getItemsInternal().done(e=>{this._itemCount=e.length,0===this._itemCount&&this._resetFocus();const t=this._findParentDirectoryItem(e);this._hasParentDirectoryItem=!!t,this._parentDirectoryItemKey=t?t.fileItem.key:null}).always(()=>{this._onDataLoaded()})}_getItemsInternal(){const e=this.option("getItems"),t=e?e():[];return(0,g.z7)(t)}_raiseOnError(e){this._actions.onError({error:e})}_raiseSelectionChanged(e){this._actions.onSelectionChanged(e)}_raiseFocusedItemChanged(e){this._actions.onFocusedItemChanged(e)}_raiseSelectedItemOpened(e){this._actions.onSelectedItemOpened({fileItemInfo:e})}_raiseContextMenuShowing(e){this._actions.onContextMenuShowing(e)}_raiseItemListDataLoaded(){this._actions.onItemListDataLoaded()}_onDataLoaded(){var e;this._raiseItemListDataLoaded(),null===(e=this._refreshDeferred)||void 0===e||e.resolve()}_onContentReady(){this._needResetScrollPosition&&(this._resetScrollTopPosition(),this._needResetScrollPosition=!1)}_tryRaiseSelectionChanged(e){let{selectedItemInfos:t,selectedItems:i,selectedItemKeys:r,currentSelectedItemKeys:m,currentDeselectedItemKeys:A}=e;const V=this._findParentDirectoryItem(this.getSelectedItems());V&&this._deselectItem(V);let X=!this._hasParentDirectoryItem;X=X||this._hasValidKeys(m)||this._hasValidKeys(A),X&&(t=this._filterOutItemByPredicate(t,ce=>ce.fileItem.key===this._parentDirectoryItemKey),i=this._filterOutParentDirectory(i),r=this._filterOutParentDirectoryKey(r,!0),m=this._filterOutParentDirectoryKey(m,!0),A=this._filterOutParentDirectoryKey(A,!0),this._raiseSelectionChanged({selectedItemInfos:t,selectedItems:i,selectedItemKeys:r,currentSelectedItemKeys:m,currentDeselectedItemKeys:A}))}_onFocusedItemChanged(e){this._focusedItemKey!==e.itemKey&&(this._focusedItemKey=e.itemKey,this._lockFocusedItemProcessing=!0,this.option("focusedItemKey",e.itemKey),this._lockFocusedItemProcessing=!1,this._raiseFocusedItemChanged(e))}_resetFocus(){}_resetScrollTopPosition(){(0,gr.Vd)()&&setTimeout(()=>{var e;return null===(e=this._getScrollable())||void 0===e?void 0:e.scrollTo(0)})}_getScrollable(){}_getItemThumbnail(e){const t=this.option("getItemThumbnail");return t?t(e):{thumbnail:""}}_getItemThumbnailContainer(e){const{thumbnail:t,cssClass:i}=this._getItemThumbnail(e),r=(0,x.N)(t).addClass(this._getItemThumbnailCssClass());return i&&r.addClass(i),r}_getItemThumbnailCssClass(){return""}_getItemSelector(){}_onItemDblClick(e){}_isDesktop(){return"desktop"===d.A.real().deviceType}_showContextMenu(e,t,i,r){this._contextMenu.showAt(e,t,i,r)}get _contextMenu(){return this.option("contextMenu")}_findParentDirectoryItem(e){for(let t=0;t<e.length;t++){const i=e[t];if(this._isParentDirectoryItem(i))return i}return null}_getFileItemsForContextMenu(e){const t=this.getSelectedItems();return this._isParentDirectoryItem(e)&&t.push(e),t}_isParentDirectoryItem(e){return e.fileItem.isParentFolder}_hasValidKeys(e){return e.length>1||1===e.length&&e[0]!==this._parentDirectoryItemKey}_filterOutParentDirectory(e,t){return this._filterOutItemByPredicate(e,i=>i.key===this._parentDirectoryItemKey,t)}_filterOutParentDirectoryKey(e,t){return this._filterOutItemByPredicate(e,i=>i===this._parentDirectoryItemKey,t)}_filterOutItemByPredicate(e,t,i){let r=e,m=-1;for(let A=0;A<e.length;A++)if(t(e[A])){m=A;break}return-1!==m&&(i&&(r=[...e]),r.splice(m,1)),r}_isMultipleSelectionMode(){return"multiple"===this.option("selectionMode")}_deselectItem(e){}_setSelectedItemKeys(e){}_setFocusedItemKey(e){}_createDataSource(){return{store:new Ow.A({key:"fileItem.key",load:this._getItems.bind(this)})}}getSelectedItems(){}clearSelection(){}selectItem(){}refresh(e,t){}},bk={thumbnail:{caption:"",calculateSortValue:"isDirectory",width:36,alignment:"center",cssClass:"dx-filemanager-details-item-is-directory"},name:{caption:Wn.A.format("dxFileManager-listDetailsColumnCaptionName")},dateModified:{caption:Wn.A.format("dxFileManager-listDetailsColumnCaptionDateModified"),width:110,hidingPriority:1},size:{caption:Wn.A.format("dxFileManager-listDetailsColumnCaptionFileSize"),width:90,alignment:"right",hidingPriority:0},isParentFolder:{caption:"isParentFolder",visible:!1,sortIndex:0,sortOrder:"asc"}},ww=class MS extends yk{_initMarkup(){this._itemCount=0,this._focusedItem=null,this._hasParentDirectoryItem=!1,this._parentDirectoryItemKey=null,this._selectAllCheckBox=null,this._selectAllCheckBoxUpdating=!1,this.$element().addClass("dx-filemanager-details"),this._createFilesView(),this._contextMenu.option("onContextMenuHidden",()=>this._onContextMenuHidden()),super._initMarkup()}_createFilesView(){const e=(0,a.A)("<div>").appendTo(this.$element()),t=this._isMultipleSelectionMode()?"multiple":"none";this._filesView=this._createComponent(e,VI.A,{dataSource:this._createDataSource(),hoverStateEnabled:!0,selection:{mode:t,showCheckBoxesMode:this._isDesktop()?"onClick":"none"},selectedRowKeys:this.option("selectedItemKeys"),focusedRowKey:this.option("focusedItemKey"),focusedRowEnabled:!0,allowColumnResizing:!0,scrolling:{mode:"virtual"},sorting:{mode:"single",showSortIndexes:!1},loadPanel:{shading:!0},showColumnLines:!1,showRowLines:!1,columnHidingEnabled:!1,columns:this._createColumns(),onEditorPreparing:this._onEditorPreparing.bind(this),onRowPrepared:this._onRowPrepared.bind(this),onContextMenuPreparing:this._onContextMenuPreparing.bind(this),onSelectionChanged:this._onFilesViewSelectionChanged.bind(this),onFocusedRowChanged:this._onFilesViewFocusedRowChanged.bind(this),onOptionChanged:this._onFilesViewOptionChanged.bind(this),onContentReady:this._onContentReady.bind(this)})}_createColumns(){let e=this.option("detailColumns");e=e.slice(0),e=e.map(i=>{let r=i;return(0,C.Kg)(i)&&(r={dataField:i}),this._getPreparedColumn(r)});const t=this.option("customizeDetailColumns");return(0,C.Tn)(t)&&(e=t(e)),e.push(this._getPreparedColumn({dataField:"isParentFolder"})),e.forEach(i=>this._updateColumnDataField(i)),e}_getPreparedColumn(e){const t={};let i="";if(this._isDefaultColumn(e.dataField)){const r=(0,_.X)(!0,{},bk[e.dataField]);switch(i=r.cssClass||"",e.dataField){case"thumbnail":r.cellTemplate=this._createThumbnailColumnCell.bind(this),r.calculateSortValue=`fileItem.${r.calculateSortValue}`;break;case"name":r.cellTemplate=this._createNameColumnCell.bind(this),r.caption=Wn.A.format("dxFileManager-listDetailsColumnCaptionName");break;case"size":r.calculateCellValue=this._calculateSizeColumnCellValue.bind(this),r.caption=Wn.A.format("dxFileManager-listDetailsColumnCaptionFileSize"),r.calculateSortValue=m=>m.fileItem.isDirectory?-1:m.fileItem.size;break;case"dateModified":r.caption=Wn.A.format("dxFileManager-listDetailsColumnCaptionDateModified")}(0,_.X)(!0,t,r)}return xg(t,e,["alignment","caption","dataField","dataType","hidingPriority","sortIndex","sortOrder","visible","visibleIndex","width"]),e.cssClass&&(i=`${i} ${e.cssClass}`),i&&(t.cssClass=i),t}_updateColumnDataField(e){const t=this._isDefaultColumn(e.dataField)?"":"dataItem.";return e.dataField="fileItem."+t+e.dataField,e}_isDefaultColumn(e){return!!bk[e]}_onFileItemActionButtonClick(e){let{component:t,element:i,event:r}=e;r.stopPropagation();const m=t.$element().closest(this._getItemSelector()),A=m.data("item");this._selectItem(A);const V={itemData:A,itemElement:m,isActionButton:!0},X=this._getFileItemsForContextMenu(A);this._showContextMenu(X,i,r,V),this._activeFileActionsButton=t,this._activeFileActionsButton.setActive(!0)}_onContextMenuHidden(){this._activeFileActionsButton&&this._activeFileActionsButton.setActive(!1)}_getItemThumbnailCssClass(){return"dx-filemanager-details-item-thumbnail"}_getItemSelector(){return".dx-data-row"}_onItemDblClick(e){const i=(0,a.A)(e.currentTarget).data("item");this._raiseSelectedItemOpened(i)}_isAllItemsSelected(){const e=this._hasParentDirectoryItem?this._itemCount-1:this._itemCount,t=this._filesView.option("selectedRowKeys");return!!t.length&&(t.length>=e||void 0)}_onEditorPreparing(e){let{component:t,command:i,row:r,parentType:m,editorOptions:A}=e;this._filesView||(this._filesView=t),"select"===i&&r?this._isParentDirectoryItem(r.data)&&(A.disabled=!0):"headerRow"===m&&(A.onInitialized=V=>{let{component:X}=V;this._selectAllCheckBox=X},A.value=this._isAllItemsSelected(),A.onValueChanged=V=>this._onSelectAllCheckBoxValueChanged(V))}_onSelectAllCheckBoxValueChanged(e){let{event:t,previousValue:i,value:r}=e;t?this._isAllItemsSelected()!==r&&(r?this._filesView.selectAll():this._filesView.deselectAll(),t.preventDefault()):i&&!this._selectAllCheckBoxUpdating&&this._selectAllCheckBox&&this._selectAllCheckBox.option("value",i)}_onRowPrepared(e){let{rowType:t,rowElement:i,data:r}=e;if("data"===t){const m=(0,a.A)(i);m.data("item",r),this._isParentDirectoryItem(r)&&m.addClass("dx-filemanager-parent-directory-item")}}_onContextMenuPreparing(e){if(!this._isDesktop())return;let t=null,i={};e.row&&"data"===e.row.rowType&&(i=e.row.data,this._selectItem(i),t=this._getFileItemsForContextMenu(i));const r=(0,_.X)({},{targetElement:"content"===e.target&&(0,C.O9)(e.row)?this._filesView.getRowElement(e.rowIndex):void 0,itemData:i,options:this._contextMenu.option(),event:e.event,isActionButton:!1,cancel:!1});this._raiseContextMenuShowing(r),e.items=r.cancel?[]:this._contextMenu.createContextMenuItems(t,null,i)}_onFilesViewSelectionChanged(e){let{component:t,selectedRowsData:i,selectedRowKeys:r,currentSelectedRowKeys:m,currentDeselectedRowKeys:A}=e;this._filesView=this._filesView||t,this._selectAllCheckBox&&(this._selectAllCheckBoxUpdating=!0,this._selectAllCheckBox.option("value",this._isAllItemsSelected()),this._selectAllCheckBoxUpdating=!1);const V=i.map(X=>X.fileItem);this._tryRaiseSelectionChanged({selectedItemInfos:i,selectedItems:V,selectedItemKeys:r,currentSelectedItemKeys:m,currentDeselectedItemKeys:A})}_onFilesViewFocusedRowChanged(e){var t,i;this._isMultipleSelectionMode()||this._selectItemSingleSelection(null===(i=e.row)||void 0===i?void 0:i.data);const r=(null===(t=e.row)||void 0===t?void 0:t.data.fileItem)||null;this._onFocusedItemChanged({item:r,itemKey:r?.key,itemElement:e.rowElement})}_onFilesViewOptionChanged(e){let{fullName:t}=e;t.indexOf("sortOrder")>-1&&this._filesView.columnOption("isParentFolder",{sortOrder:"asc",sortIndex:0})}_resetFocus(){this._setFocusedItemKey(void 0)}_createThumbnailColumnCell(e,t){this._getItemThumbnailContainer(t.data).appendTo(e)}_createNameColumnCell(e,t){const i=(0,a.A)("<div>"),r=(0,a.A)("<span>").text(t.data.fileItem.name).addClass("dx-filemanager-details-item-name"),m=(0,a.A)("<div>").append(r,i).addClass("dx-filemanager-details-item-name-wrapper");(0,a.A)(e).append(m),this._createComponent(i,vk,{onClick:A=>this._onFileItemActionButtonClick(A)})}_calculateSizeColumnCellValue(e){return e.fileItem.isDirectory?"":IS(e.fileItem.size)}_selectItem(e){(this._isMultipleSelectionMode()?this._selectItemMultipleSelection:this._selectItemSingleSelection).call(this,e)}_deselectItem(e){this._filesView.deselectRows([e.fileItem.key])}_selectItemSingleSelection(e){if(!this._focusedItem||!e||this._focusedItem.fileItem.key!==e.fileItem.key){const t=this._focusedItem;this._focusedItem=e;const i=[];t&&i.push(t.fileItem.key);const r=[],m=[];e&&!this._isParentDirectoryItem(e)&&(r.push(e.fileItem),m.push(e.fileItem.key)),this._raiseSelectionChanged({selectedItems:r,selectedItemKeys:m,currentSelectedItemKeys:[...m],currentDeselectedItemKeys:i})}}_selectItemMultipleSelection(e){let{fileItem:t}=e;if(!this._filesView.isRowSelected(t.key)){const r=this._filesView.getController("selection").isSelectionWithCheckboxes();this._filesView.selectRows([t.key],r)}}_setSelectedItemKeys(e){this._filesView.option("selectedRowKeys",e)}_setFocusedItemKey(e){var t;null===(t=this._filesView)||void 0===t||t.option("focusedRowKey",e)}clearSelection(){this._isMultipleSelectionMode()?this._filesView.clearSelection():this._filesView.option("focusedRowIndex",-1)}refresh(e,t){const i={dataSource:this._createDataSource()};return e&&Object.prototype.hasOwnProperty.call(e,"focusedItemKey")&&((0,C.O9)(e.focusedItemKey)?i.focusedRowKey=e.focusedItemKey:i.focusedRowIndex=-1),!(0,C.O9)(i.focusedRowKey)&&-1===i.focusedRowIndex&&"navigation"===t&&(i.paging={pageIndex:0},this._needResetScrollPosition=!0),this._filesView.option(i),this._refreshDeferred=new g.cY,this._refreshDeferred.promise()}_getScrollable(){return this._filesView.getScrollable()}getSelectedItems(){return this._isMultipleSelectionMode()?this._filesView.getSelectedRowsData():this._focusedItem&&!this._isParentDirectoryItem(this._focusedItem)?[this._focusedItem]:[]}};var GI=M(5656),IF=M(3535),WI=M(4481),W_=M(9658);const RF=(0,N.b4)(IF.A.name,"dxFileManagerThumbnailsListBox");class dH{constructor(e,t,i,r){this._layoutModel=null,this._scrollView=e,this._$viewPort=t,this._$itemContainer=i,this._$item=r}updateItems(e){this._$item=e}reset(){this._layoutModel=null}getLayoutModel(){return this._layoutModel||(this._layoutModel=this._createLayoutModel()),this._layoutModel}_createLayoutModel(){if(!this._$item)return null;const e=(0,D.Ot)(this._$item,!0);if(0===e)return null;const t=(0,D.P$)(this._$item,!0),i=(0,D.hh)(this._$itemContainer),r=(0,D.yV)(this._$viewPort),m=this._scrollView.scrollTop();return{itemWidth:e,itemHeight:t,viewPortWidth:i,viewPortHeight:r,viewPortScrollTop:m,viewPortScrollBottom:m+r,itemPerRowCount:Math.floor(i/e),rowPerPageRate:r/t}}createItemLayoutModel(e){const t=this.getLayoutModel();if(!t)return null;const i=Math.floor(e/t.itemPerRowCount),m=i*t.itemHeight;return{itemRowIndex:i,itemColumnIndex:e%t.itemPerRowCount,itemTop:m,itemBottom:m+t.itemHeight}}scrollToItem(e){const t=this.getLayoutModel();if(!t)return;const r=Math.floor(e/t.itemPerRowCount)*t.itemHeight,m=r+t.itemHeight;let A=t.viewPortScrollTop;r<t.viewPortScrollTop?A=r:m>t.viewPortScrollBottom&&(A=m-t.viewPortHeight),this._scrollView.scrollTo(A)}}const xk=class kF extends WI.A{_initMarkup(){this._initActions(),this._lockFocusedItemProcessing=!1,this.$element().addClass("dx-filemanager-thumbnails-view-port"),this._renderScrollView(),this._renderItemsContainer(),this._createScrollViewControl(),super._initMarkup(),this.onFocusedItemChanged=this._onFocusedItemChanged.bind(this),this._layoutUtils=new dH(this._scrollView,this.$element(),this._$itemContainer,this.itemElements().first()),this._syncFocusedItemKey()}_initActions(){this._actions={onItemEnterKeyPressed:this._createActionByOption("onItemEnterKeyPressed"),onFocusedItemChanged:this._createActionByOption("onFocusedItemChanged")}}_initTemplates(){super._initTemplates(),this._itemThumbnailTemplate=this.option("itemThumbnailTemplate"),this._getTooltipText=this.option("getTooltipText"),this._templateManager.addDefaultTemplates({item:new u.U(function(e,t,i){const r=this._getDefaultItemTemplate(i,e);e.append(r)}.bind(this),["fileItem"],this.option("integrationOptions.watchMethod"))})}_createScrollViewControl(){this._scrollView||(this._scrollView=this._createComponent(this._$scrollView,Af.A,{scrollByContent:!0,scrollByThumb:!0,useKeyboard:!1,showScrollbar:"onHover"}))}_renderScrollView(){this._$scrollView||(this._$scrollView=(0,a.A)("<div>").appendTo(this.$element()))}getScrollable(){return this._scrollView}_renderItemsContainer(){this._$itemContainer||(this._$itemContainer=(0,a.A)("<div>").addClass("dx-filemanager-thumbnails-container").appendTo(this._$scrollView))}_render(){super._render(),this._detachEventHandlers(),this._attachEventHandlers()}_clean(){this._detachEventHandlers(),super._clean()}_supportedKeys(){return(0,_.X)(super._supportedKeys(),{upArrow(e){this._beforeKeyProcessing(e),this._processArrowKeys(-1,!1,e)},downArrow(e){this._beforeKeyProcessing(e),this._processArrowKeys(1,!1,e)},home(e){this._beforeKeyProcessing(e),this._processHomeEndKeys(0,!0,e)},end(e){this._beforeKeyProcessing(e),this._processHomeEndKeys(this._getItemsLength()-1,!0,e)},pageUp(e){this._beforeKeyProcessing(e),this._processPageChange(!0,e)},pageDown(e){this._beforeKeyProcessing(e),this._processPageChange(!1,e)},enter(e){this._beforeKeyProcessing(e),this._actions.onItemEnterKeyPressed(this._getFocusedItem())},A(e){this._beforeKeyProcessing(e),(0,N.By)(e)&&this.selectAll()}})}_beforeKeyProcessing(e){e.preventDefault(),this._layoutUtils.reset()}_processArrowKeys(e,t,i){const r=this._getFocusedItem();if(r){if(!t){const A=this._layoutUtils.getLayoutModel();if(!A)return;e*=A.itemPerRowCount}const m=this._getIndexByItem(r)+e;this._focusItemByIndex(m,!0,i)}}_processHomeEndKeys(e,t,i){this._focusItemByIndex(e,t,i)}_processPageChange(e,t){const i=this._getFocusedItem();if(!i)return;const r=this._layoutUtils.getLayoutModel();if(!r)return;const m=this._layoutUtils.createItemLayoutModel(this._getIndexByItem(i));let _e=(e?Math.ceil:Math.floor)(m.itemRowIndex-(e?r.rowPerPageRate:-r.rowPerPageRate))*r.itemPerRowCount+m.itemColumnIndex;_e<0?_e=0:_e>=this._getItemsLength()&&(_e=this._getItemsLength()-1),this._focusItemByIndex(_e,!0,t)}_processLongTap(e){const t=this._closestItemElement((0,a.A)(e.target)),i=this._getIndexByItemElement(t);this._selection.changeItemSelection(i,{control:!0})}_attachEventHandlers(){"multiple"===this.option("selectionMode")&&L.A.on(this._itemContainer(),RF,`.${this._itemContentClass()}`,e=>{this._processLongTap(e),e.stopPropagation()}),L.A.on(this._itemContainer(),"mousedown selectstart",e=>{e.shiftKey&&e.preventDefault()})}_detachEventHandlers(){L.A.off(this._itemContainer(),RF),L.A.off(this._itemContainer(),"mousedown selectstart")}_itemContainer(){return this._$itemContainer}_itemClass(){return"dx-filemanager-thumbnails-item"}_itemDataKey(){return"dxFileManagerItemData"}_getDefaultItemTemplate(e,t){t.attr("title",this._getTooltipText(e));const i=this._itemThumbnailTemplate(e),r=(0,a.A)("<div>").addClass("dx-filemanager-thumbnails-item-spacer"),m=(0,a.A)("<div>").addClass("dx-filemanager-thumbnails-item-name").text(e.fileItem.name);t.append(i,r,m)}_itemSelectHandler(e){let t={};"multiple"===this.option("selectionMode")&&(this._isPreserveSelectionMode||(this._isPreserveSelectionMode=(0,N.By)(e)||e.shiftKey),t={control:this._isPreserveSelectionMode,shift:e.shiftKey});const i=this._getIndexByItemElement(e.currentTarget);this._selection.changeItemSelection(i,t)}_initSelectionModule(){super._initSelectionModule();const e=(0,_.X)(this._selection.options,{selectedKeys:this.option("selectedItemKeys"),onSelectionChanged:t=>{this.option("selectedItems",this._getItemsByKeys(t.selectedItemKeys,t.selectedItems)),this._updateSelectedItems(t)}});this._selection=new W_.A(e)}_updateSelectedItems(e){const t=e.addedItemKeys,i=e.removedItemKeys;if(this._rendered&&(t.length||i.length)){const r=this._selectionChangePromise;if(!this._rendering){const m=[];let A;const V=[];this._editStrategy.beginCache();for(let X=0;X<i.length;X++)A=this._getIndexByKey(i[X]),V.push(A),this._removeSelection(A);for(let X=0;X<t.length;X++)A=this._getIndexByKey(t[X]),m.push(A),this._addSelection(A);this._editStrategy.endCache(),this._updateSelection(m,V)}(0,g.z7)(r).done(()=>this._fireSelectionChangeEvent(e))}}_fireSelectionChangeEvent(e){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})(e)}_updateSelection(e,t){0===this.getSelectedItems().length&&(this._isPreserveSelectionMode=!1)}_normalizeSelectedItems(){const e=this._getKeysByItems(this.option("selectedItems")),t=this._selection.getSelectedItemKeys();return this._compareKeys(t,e)||this._selection.setSelection(e),(new g.cY).resolve().promise()}_focusOutHandler(){}_getItems(){return this.option("items")||[]}_getItemsLength(){return this._getItems().length}_getIndexByItemElement(e){return this._editStrategy.getNormalizedIndex(e)}_getItemByIndex(e){return this._getItems()[e]}_getFocusedItem(){return this.getItemByItemElement(this.option("focusedElement"))}_focusItem(e,t){this.option("focusedElement",this.getItemElementByItem(e)),t&&this._layoutUtils.scrollToItem(this._getIndexByItem(e))}_focusItemByIndex(e,t,i){if(e>=0&&e<this._getItemsLength()){const r=this._getItemByIndex(e);this._focusItem(r,t,i)}}_syncFocusedItemKey(){this._syncFocusedItemKeyDeferred||(this._syncFocusedItemKeyDeferred=new g.cY);const e=this._syncFocusedItemKeyDeferred;if(this._dataSource&&this._dataSource.isLoading())return e.promise();const t=this.option("focusedItemKey");if((0,C.O9)(t)){const r=this.option("items").find(m=>this.keyOf(m)===t);r?(this._focusItem(r,!0),e.resolve()):(this.option("focusedItemKey",void 0),e.reject())}else e.resolve();return this._syncFocusedItemKeyDeferred=null,e.promise()}_onFocusedItemChanged(){const e=this._getFocusedItem(),t=this.keyOf(e);t!==this.option("focusedItemKey")&&(this._lockFocusedItemProcessing=!0,this.option("focusedItemKey",t),this._lockFocusedItemProcessing=!1,this._raiseFocusedItemChanged(e))}_raiseFocusedItemChanged(e){const t={item:e,itemElement:this.option("focusedElement")};this._actions.onFocusedItemChanged(t)}_changeItemSelection(e,t){if(this.isItemSelected(e)===t)return;const i=this.getItemElementByItem(e),r=this._getIndexByItemElement(i);this._selection.changeItemSelection(r,{control:this._isPreserveSelectionMode})}_chooseSelectOption(){return"selectedItemKeys"}getSelectedItems(){return this._selection.getSelectedItems()}getItemElementByItem(e){return this._editStrategy.getItemElement(e)}getItemByItemElement(e){return this._getItemByIndex(this._getIndexByItemElement(e))}selectAll(){"multiple"===this.option("selectionMode")&&(this._selection.selectAll(),this._isPreserveSelectionMode=!0)}selectItem(e){this._changeItemSelection(e,!0)}deselectItem(e){this._changeItemSelection(e,!1)}clearSelection(){this._selection.deselectAll()}_optionChanged(e){switch(e.name){case"items":this._layoutUtils&&this._layoutUtils.updateItems(this.itemElements().first()),super._optionChanged(e);break;case"focusedItemKey":if(this._lockFocusedItemProcessing)break;(0,C.O9)(e.value)?this._syncFocusedItemKey().done(()=>{const t=this._getFocusedItem();this._raiseFocusedItemChanged(t)}):(this.option("focusedElement",null),this._raiseFocusedItemChanged(null));break;case"onItemEnterKeyPressed":case"onFocusedItemChanged":this._actions[e.name]=this._createActionByOption(e.name);break;default:super._optionChanged(e)}}},hH=class BF extends yk{_initMarkup(){super._initMarkup(),this.$element().addClass("dx-filemanager-thumbnails");const e=(0,N.b4)(GI.U,"dxFileManager_thumbnails");L.A.on(this.$element(),e,this._onContextMenu.bind(this)),this._createItemList()}_createItemList(){const e=this._isMultipleSelectionMode()?"multiple":"single",t=(0,a.A)("<div>").appendTo(this.$element());this._itemList=this._createComponent(t,xk,{dataSource:this._createDataSource(),selectionMode:e,selectedItemKeys:this.option("selectedItemKeys"),focusedItemKey:this.option("focusedItemKey"),activeStateEnabled:!0,hoverStateEnabled:!0,loopItemFocus:!1,focusStateEnabled:!0,onItemEnterKeyPressed:this._tryOpen.bind(this),itemThumbnailTemplate:this._getItemThumbnailContainer.bind(this),getTooltipText:this._getTooltipText.bind(this),onSelectionChanged:this._onItemListSelectionChanged.bind(this),onFocusedItemChanged:this._onItemListFocusedItemChanged.bind(this),onContentReady:this._onContentReady.bind(this)})}_onContextMenu(e){if(e.preventDefault(),e.stopPropagation(),!this._isDesktop())return;let t=null;const i=(0,a.A)(e.target).closest(this._getItemSelector());let r=null;i.length>0&&(r=this._itemList.getItemByItemElement(i),this._itemList.selectItem(r),t=this._getFileItemsForContextMenu(r)),this._showContextMenu(t,e.target,e,{itemData:r,itemElement:i.length?i:void 0})}_getItemThumbnailCssClass(){return"dx-filemanager-thumbnails-item-thumbnail"}_getItemSelector(){return".dx-filemanager-thumbnails-item"}_getTooltipText(e){const t=e.fileItem;if(t.tooltipText)return t.tooltipText;let i=`${t.name}\r\n`;return t.isDirectory||(i+=`${Wn.A.format("dxFileManager-listThumbnailsTooltipTextSize")}: ${IS(t.size)}\r\n`),i+=`${Wn.A.format("dxFileManager-listThumbnailsTooltipTextDateModified")}: ${t.dateModified}`,i}_onItemDblClick(e){const t=(0,a.A)(e.currentTarget),i=this._itemList.getItemByItemElement(t);this._tryOpen(i)}_tryOpen(e){e&&this._raiseSelectedItemOpened(e)}_getItemsInternal(){return super._getItemsInternal().then(e=>{const t=new g.cY;return setTimeout(()=>t.resolve(e)),t.promise()})}_disableDragging(){return!1}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{focusStateEnabled:!0})}_onItemListSelectionChanged(e){let{addedItemKeys:t,removedItemKeys:i}=e;const r=this.getSelectedItems(),m=r.map(V=>V.fileItem),A=m.map(V=>V.key);this._tryRaiseSelectionChanged({selectedItemInfos:r,selectedItems:m,selectedItemKeys:A,currentSelectedItemKeys:t,currentDeselectedItemKeys:i})}_onItemListFocusedItemChanged(e){let{item:t,itemElement:i}=e;this._isMultipleSelectionMode()||this._selectItemSingleSelection(t);const r=t?.fileItem||null;this._onFocusedItemChanged({item:r,itemKey:r?.key,itemElement:i||void 0})}_getScrollable(){return this._itemList.getScrollable()}_setSelectedItemKeys(e){this._itemList.option("selectedItemKeys",e)}_setFocusedItemKey(e){this._itemList.option("focusedItemKey",e)}refresh(e,t){const i={dataSource:this._createDataSource()};return e&&Object.prototype.hasOwnProperty.call(e,"focusedItemKey")&&(i.focusedItemKey=e.focusedItemKey),e&&Object.prototype.hasOwnProperty.call(e,"selectedItemKeys")&&(i.selectedItemKeys=e.selectedItemKeys),!(0,C.O9)(i.focusedItemKey)&&"navigation"===t&&(this._needResetScrollPosition=!0),this._itemList.option(i),this._refreshDeferred=new g.cY,this._refreshDeferred.promise()}_deselectItem(e){const t=this._itemList.getItemElementByItem(e);this._itemList.unselectItem(t)}_selectItemSingleSelection(e){e?this._itemList.selectItem(e):this._itemList.clearSelection()}clearSelection(){this._itemList.clearSelection()}getSelectedItems(){return this._itemList.getSelectedItems()}};M(4083);const Ek={showNavPane:{location:"before"},create:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},upload:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},refresh:{location:"after",showText:"inMenu",cssClass:"dx-filemanager-toolbar-has-large-icon",compactMode:{showText:"inMenu",locateInMenu:"auto"}},switchView:{location:"after"},download:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},move:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},copy:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},rename:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},delete:{location:"before",compactMode:{showText:"inMenu"}},clearSelection:{location:"after",locateInMenu:"never",compactMode:{showText:"inMenu"}},separator:{location:"before"}},gH=["visible","location","locateInMenu","disabled","showText"],$I=["accessKey","elementAttr","height","hint","icon","stylingMode","tabIndex","text","width"],NF=["separator","switchView"],Ok={default:"dx-filemanager-i dx-filemanager-i-refresh",progress:"dx-filemanager-i dx-filemanager-i-progress",success:"dx-filemanager-i dx-filemanager-i-done",error:"dx-filemanager-i dx-filemanager-i-danger"},VF=class FF extends Sl.A{_init(){super._init(),this._generalToolbarVisible=!0,this._refreshItemState={message:"",status:"default"}}_initMarkup(){this._createItemClickedAction(),this._$viewSwitcherPopup=(0,a.A)("<div>").addClass("dx-filemanager-view-switcher-popup"),this._generalToolbar=this._createToolbar(this.option("generalItems"),!this._generalToolbarVisible),this._fileToolbar=this._createToolbar(this.option("fileItems"),this._generalToolbarVisible),this._$viewSwitcherPopup.appendTo(this.$element()),this.$element().addClass("dx-filemanager-toolbar dx-filemanager-general-toolbar")}_render(){super._render();const e=this._getVisibleToolbar();this._checkCompactMode(e)}_clean(){delete this._commandManager,delete this._itemClickedAction,delete this._$viewSwitcherPopup,delete this._generalToolbar,delete this._fileToolbar,super._clean()}_dimensionChanged(e){if(!e||"height"!==e){const t=this._getVisibleToolbar();this._checkCompactMode(t)}}_getVisibleToolbar(){return this._generalToolbarVisible?this._generalToolbar:this._fileToolbar}_createToolbar(e,t){const i=this._getPreparedItems(e),r=(0,a.A)("<div>").appendTo(this.$element()),m=this._createComponent(r,xS.A,{items:i,visible:!t,onItemClick:A=>this._raiseItemClicked(A)});return m.compactMode=!1,m}_getPreparedItems(e){return e=e.map(t=>{let i=t;(0,C.Kg)(t)&&(i={name:t});const r=i.name,m=this._configureItemByCommandName(r,i);return m.originalItemData=t,"separator"!==r&&this._setItemVisibleAvailable(m),m}),this._updateSeparatorsVisibility(e),e}_updateSeparatorsVisibility(e,t){let i=!1;const r=this._getMenuItems(t),m={before:!1,center:!1,after:!1},A={before:this._getItemsInGroup(e,r,"before"),center:this._getItemsInGroup(e,r,"center"),after:this._getItemsInGroup(e,r,"after")};return e.forEach((V,X)=>{const ce=V.location;if("separator"===V.name){const _e=m[ce]&&this._groupHasItemsAfter(A[ce]);V.visible!==_e&&(i=!0,V.visible=_e),m[ce]=!1}else this._isItemInMenu(r,V)||(m[ce]=m[ce]||V.visible),A[ce].shift()}),t&&i&&t.repaint(),i}_getMenuItems(e){return(e?e._getMenuItems():[]).map(i=>i.originalItemData)}_isItemInMenu(e,t){return!!e.length&&"never"!==(0,h.YD)(t.locateInMenu,"never")&&-1!==e.indexOf(t.originalItemData)}_getItemsInGroup(e,t,i){return e.filter(r=>r.location===i&&!this._isItemInMenu(t,r))}_groupHasItemsAfter(e){for(let t=0;t<e.length;t++)if("separator"!==e[t].name&&e[t].visible)return!0;return!1}_configureItemByCommandName(e,t){var i;let r={};const m=this._commandManager.getCommandByName(e);switch(m&&(r=this._createCommandItem(m)),e){case"separator":r=this._createSeparatorItem();break;case"switchView":r=this._createViewModeItem()}if(this._isDefaultItem(e)){(0,_.X)(!0,r,Ek[e]);let V=r.cssClass||"";xg(r,t,gH),(0,C.O9)(t.options)&&xg(r.options,t.options,$I),xg(r.options,t,["text","icon"]),t.cssClass&&(V=`${V} ${t.cssClass}`),V&&(r.cssClass=V),(0,C.O9)(t.visible)||(r._autoHide=!0),"dxButton"===r.widget&&("inMenu"===r.showText&&!(0,C.O9)(r.options.hint)&&(r.options.hint=r.options.text),r.compactMode&&!(0,C.O9)(r.options.hint)&&this._configureHintForCompactMode(r))}else(0,_.X)(!0,r,t),r.widget||(r.widget="dxButton"),"dxButton"===r.widget&&!r.compactMode&&!r.showText&&r.options&&r.options.icon&&r.options.text&&(r.compactMode={showText:"inMenu"});return e&&!r.name&&(0,_.X)(r,{name:e}),r.location=(0,h.YD)(r.location,"before"),(0,C.O9)(null===(i=r.options)||void 0===i?void 0:i.stylingMode)||("dxButton"===r.widget&&(0,_.X)(!0,r,{options:{stylingMode:"text"}}),"dxSelectBox"===r.widget&&(0,_.X)(!0,r,{options:{stylingMode:"filled"}})),r}_isDefaultItem(e){return!!Ek[e]}_createCommandItem(e){return{widget:"dxButton",options:{text:e.text,hint:e.hint,commandText:e.text,icon:e.icon,stylingMode:"text",onClick:t=>this._executeCommand(e)}}}_createSeparatorItem(){return{template:(e,t,i)=>{(0,a.A)(i).addClass("dx-filemanager-toolbar-separator-item")}}}_createViewModeItem(){const e=["details","thumbnails"].map(r=>{const{text:m,icon:A}=this._commandManager.getCommandByName(r);return{name:r,text:m,icon:A}}),t="thumbnails"===this.option("itemViewMode")?1:0,i={container:this._$viewSwitcherPopup};return(0,k.gx)()?i.width=(0,k.ip)()?28:36:(0,k.Ft)()&&(i.width=(0,k.ip)()?34:40),{cssClass:"dx-filemanager-toolbar-viewmode-item",widget:"dxDropDownButton",options:{items:e,keyExpr:"name",selectedItemKey:this.option("itemViewMode"),displayExpr:" ",hint:e[t].text,stylingMode:"text",showArrowIcon:!1,useSelectMode:!0,dropDownOptions:i,onItemClick:r=>this._executeCommand(r.itemData.name)}}}_configureHintForCompactMode(e){e.options.hint="",e.compactMode.options=e.compactMode.options||{},e.compactMode.options.hint=e.options.text}_checkCompactMode(e){e.compactMode&&this._toggleCompactMode(e,!1);const t=this._toolbarHasItemsOverflow(e);e.compactMode!==t?(e.compactMode||this._toggleCompactMode(e,t),e.compactMode=t):e.compactMode&&this._toggleCompactMode(e,!0)}_toolbarHasItemsOverflow(e){return(0,D.RG)(e.$element())<e._getItemsWidth()}_toggleCompactMode(e,t){let i=!1;const r=e.option("items");r.forEach(m=>{if(m.compactMode){let A=null;t?(m.saved=this._getCompactModeOptions(m,m._available),A=m.compactMode):A=m.saved;const V=this._getCompactModeOptions(A,m._available);(0,_.X)(!0,m,V),i=!0}}),i=this._updateSeparatorsVisibility(r)||i,i&&e.repaint(),this._updateSeparatorsVisibility(r,e)}_getCompactModeOptions(e,t){let{showText:i,locateInMenu:r,options:m}=e;return{visible:t,showText:(0,h.YD)(i,"always"),locateInMenu:(0,h.YD)(r,"never"),options:{hint:m?.hint}}}_ensureAvailableCommandsVisible(e){let t=!1;const i=e.option("items");i.forEach(r=>{if("separator"!==r.name){const m=r._available;this._setItemVisibleAvailable(r),r._available!==m&&(t=!0)}}),t=this._updateSeparatorsVisibility(i)||t,t&&e.repaint(),this._updateSeparatorsVisibility(i,e)}_setItemVisibleAvailable(e){var t;const i=null===(t=e.originalItemData)||void 0===t?void 0:t.visible;e._available=this._isToolbarItemAvailable(e),e.visible=(0,C.O9)(i)?i:e._available}_fileToolbarHasEffectiveItems(){return this._fileToolbar.option("items").some(t=>this._isFileToolbarItemAvailable(t))}_executeCommand(e){this._commandManager.executeCommand(e)}_isToolbarItemAvailable(e){return this._isDefaultItem(e.name)&&e._autoHide?"refresh"===e.name?this._generalToolbarVisible||!!this._isRefreshVisibleInFileToolbar:NF.indexOf(e.name)>-1||this._isCommandAvailable(e.name):(0,h.YD)(e.visible,!0)}_isFileToolbarItemAvailable(e){let{name:t,visible:i}=e;return!this._isDefaultItem(t)&&(0,h.YD)(i,!0)||"clearSelection"!==t&&"refresh"!==t&&this._isCommandAvailable(t)}_isCommandAvailable(e){return this._commandManager.isCommandAvailable(e,this.option("contextItems"))}_updateItemInToolbar(e,t,i){e.beginUpdate();const r=e.option("items");for(let m=0;m<r.length;m++)if(r[m].name===t){e.option(`items[${m}]`,i);break}e.endUpdate()}_raiseItemClicked(e){const t=(0,_.X)(!0,{},e);t.itemData=e.itemData.originalItemData,this._itemClickedAction(t)}_createItemClickedAction(){this._itemClickedAction=this._createActionByOption("onItemClick")}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{commandManager:null,generalItems:[],fileItems:[],contextItems:[],itemViewMode:"details",onItemClick:null})}_optionChanged(e){const t=e.name;switch(t){case"commandManager":case"itemViewMode":case"generalItems":case"fileItems":this.repaint();break;case"contextItems":this._update();break;case"onItemClick":this._itemClickedAction=this._createActionByOption(t);break;default:super._optionChanged(e)}}updateItemPermissions(){this.repaint(),this._restoreRefreshItemState()}_restoreRefreshItemState(){this.updateRefreshItem(this._refreshItemState.message,this._refreshItemState.status)}updateRefreshItem(e,t){let i=null,r=Wn.A.format("dxFileManager-commandRefresh"),m="inMenu";this._isRefreshVisibleInFileToolbar=!1,this._refreshItemState={message:e,status:t},"default"===t?i={options:{icon:Ok.default}}:(i={options:{icon:Ok[t]}},this._isRefreshVisibleInFileToolbar=!0,r=e,m="always");const A=(0,_.X)({},i,{visible:this._isRefreshVisibleInFileToolbar});this._applyRefreshItemOptions(i,A),this._refreshItemTextTimeout=this._updateRefreshItemText("progress"===t,r,m)}_updateRefreshItemText(e,t,i){const r={showText:i,options:{text:t}};if(e)return setTimeout(()=>{this._applyRefreshItemOptions(r),this._refreshItemTextTimeout=void 0},500);this._refreshItemTextTimeout&&clearTimeout(this._refreshItemTextTimeout),this._applyRefreshItemOptions(r)}_applyRefreshItemOptions(e,t){t||(t=(0,_.X)({},e)),this._updateItemInToolbar(this._generalToolbar,"refresh",e),this._updateItemInToolbar(this._fileToolbar,"refresh",t)}_update(){const e=0===this.option("contextItems").length||!this._fileToolbarHasEffectiveItems();this._generalToolbarVisible!==e&&(this._generalToolbar.option("visible",e),this._fileToolbar.option("visible",!e),this._generalToolbarVisible=e,this.$element().toggleClass("dx-filemanager-general-toolbar",e),this.$element().toggleClass("dx-filemanager-file-toolbar",!e));const t=this._getVisibleToolbar();this._ensureAvailableCommandsVisible(t),this._checkCompactMode(t)}get _commandManager(){return this.option("commandManager")}};var Tw=M(215),jI=M(357);const zs=class ur extends Sl.A{_initMarkup(){super._initMarkup(),this._initActions(),this._operationCount=0,this.$element().addClass("dx-filemanager-progress-panel");const e=(0,a.A)("<div>").appendTo(this.$element()),t=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-container").appendTo(e);this._scrollView=this._createComponent(e,Af.A,{scrollByContent:!0,scrollByThumb:!0,showScrollbar:"onScroll"});const i=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-title").appendTo(t);(0,a.A)("<div>").text(Wn.A.format("dxFileManager-notificationProgressPanelTitle")).addClass("dx-filemanager-progress-panel-title-text").appendTo(i);const r=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-close-button").appendTo(i);this._createComponent(r,uC.A,{icon:"close",stylingMode:"text",onClick:()=>this._raisePanelClosed()}),this._$infosContainer=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-infos-container").appendTo(t),this._renderEmptyListText()}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{onOperationClosed:null,onOperationCanceled:null,onOperationItemCanceled:null,onPanelClosed:null})}_initActions(){this._actions={onOperationClosed:this._createActionByOption("onOperationClosed"),onOperationCanceled:this._createActionByOption("onOperationCanceled"),onOperationItemCanceled:this._createActionByOption("onOperationItemCanceled"),onPanelClosed:this._createActionByOption("onPanelClosed")}}_optionChanged(e){const t=e.name;switch(t){case"test":break;case"onOperationClosed":case"onOperationCanceled":case"onOperationItemCanceled":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}addOperation(e,t,i){this._operationCount?(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-separator").prependTo(this._$infosContainer):this._$infosContainer.empty(),this._operationCount++;const r={customCloseHandling:t,allowProgressAutoUpdate:(0,h.YD)(i,!0)},m=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-info").prependTo(this._$infosContainer);r.$info=m;const A=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-common").appendTo(m);return r.common=this._createProgressBox(A,{commonText:e,showCloseButton:!0,showCloseButtonAlways:t,onCloseButtonClick:()=>this._closeOperation(r)}),r}addOperationDetails(e,t,i){e.$info.addClass("dx-filemanager-progress-panel-info-with-details");const r=(0,a.A)("<div>").addClass("dx-filemanager-progress-panel-details").appendTo(e.$info);e.details=t.map((m,A)=>(m.info=e,this._createDetailsItem(r,m,A,!1,i)))}_createDetailsItem(e,t,i,r,m){const A=(0,a.A)("<div>").appendTo(e);return-1!==i&&A.addClass("dx-card"),this._createProgressBox(A,{commonText:t.commonText,imageUrl:t.imageUrl,skipProgressBox:r,showCloseButton:m,showCloseButtonAlways:m,onCloseButtonClick:()=>this._cancelOperationItem(t,i)})}completeOperationItem(e,t,i){e.allowProgressAutoUpdate&&this.updateOperationItemProgress(e,t,100,i),this._setCloseButtonVisible(e.details[t],!1)}updateOperationItemProgress(e,t,i,r){this.updateOperationCommonProgress(e,r),e.details&&e.details[t].progressBar.option("value",i)}updateOperationCommonProgress(e,t){var i;null===(i=e.common.progressBar)||void 0===i||i.option("value",t)}completeOperation(e,t,i,r){e.completed=!0,e.common.$commonText.text(t),i?this._removeProgressBar(e.common):e.allowProgressAutoUpdate&&this.updateOperationCommonProgress(e,100),r&&this._setProgressBarText(e.common,r),this._setCloseButtonVisible(e.common,!0)}completeSingleOperationWithError(e,t){var i;const r=null===(i=e.details)||void 0===i?void 0:i[0];e.completed=!0,this._renderOperationError(r||e.common,t),this._setCloseButtonVisible(e.common,!0),r&&this._setCloseButtonVisible(r,!1)}addOperationDetailsError(e,t,i){const r=e.details[t];this._renderOperationError(r,i),this._setCloseButtonVisible(r,!1)}_renderError(e,t,i){(0,a.A)("<div>").text(i).addClass("dx-filemanager-progress-box-error").appendTo(e)}_renderEmptyListText(){this._$infosContainer.text(Wn.A.format("dxFileManager-notificationProgressPanelEmptyListText"))}_renderOperationError(e,t){this._removeProgressBar(e),this._renderError(e.$wrapper,e.$commonText,t)}_removeProgressBar(e){e.progressBar&&(e.progressBar.dispose(),e.progressBar.$element().remove(),e.progressBar=null)}_createProgressBox(e,t){e.addClass("dx-filemanager-progress-box"),t.showCloseButtonAlways||e.addClass("dx-filemanager-progress-box-without-close-button"),t.imageUrl&&(0,x.N)(t.imageUrl).addClass("dx-filemanager-progress-box-image").appendTo(e);const i=(0,a.A)("<div>").addClass("dx-filemanager-progress-box-wrapper").appendTo(e),r=(0,a.A)("<div>").addClass("dx-filemanager-progress-box-common").text(t.commonText).appendTo(i);let m=null;if(!t.skipProgressBox){const V=(0,a.A)("<div>").addClass("dx-filemanager-progress-box-progress-bar").appendTo(i);m=this._createComponent(V,jI.A,{min:0,max:100,width:"100%",validationMessageMode:"always",statusFormat:(X,ce)=>this._getStatusString(X,ce)})}let A=null;if(t.showCloseButton){const V=(0,a.A)("<div>").addClass("dx-filemanager-progress-box-close-button").appendTo(e);A=this._createComponent(V,uC.A,{icon:"dx-filemanager-i dx-filemanager-i-cancel",stylingMode:"text",visible:t.showCloseButtonAlways,onClick:t.onCloseButtonClick})}return{$commonText:r,progressBar:m,$element:e,$wrapper:i,closeButton:A}}_setCloseButtonVisible(e,t){e.closeButton&&(e.$element.toggleClass("dx-filemanager-progress-box-without-close-button",!t),e.closeButton.option("visible",t))}_setProgressBarText(e,t){e.progressBar.option("statusFormat",()=>t)}_closeOperation(e){e.customCloseHandling&&!e.completed?(this._raiseOperationCanceled(e),this._setCloseButtonVisible(e.common,!1),e.details.forEach(t=>this._displayClosedOperationItem(t))):(this._raiseOperationClosed(e),e.$info.next(".dx-filemanager-progress-panel-separator").remove(),e.$info.remove(),this._operationCount--,this._operationCount||this._renderEmptyListText())}_cancelOperationItem(e,t){this._raiseOperationItemCanceled(e,t),this._displayClosedOperationItem(e.info.details[t])}_displayClosedOperationItem(e){this._setProgressBarText(e,Wn.A.format("dxFileManager-notificationProgressPanelOperationCanceled")),this._setCloseButtonVisible(e,!1)}_getStatusString(e,t){return 1===e?Wn.A.format("Done"):Math.round(100*e)+"%"}_raiseOperationClosed(e){this._actions.onOperationClosed({info:e})}_raiseOperationCanceled(e){this._actions.onOperationCanceled({info:e})}_raiseOperationItemCanceled(e,t){this._actions.onOperationItemCanceled({item:e,itemIndex:t})}_raisePanelClosed(){this._actions.onPanelClosed()}},KI="__operationInfoManager";class mH{constructor(e){let{onActionProgressStatusChanged:t,isActual:i}=e;this._id=(new Rf.A).toString(),this._isActual=i||!1,this._actionProgressStatus="default",this._raiseActionProgress=t}getId(){return this._id}isActual(){return this._isActual}createErrorDetailsProgressBox(e,t,i){const r=this._createDetailsItem(e,t);this.renderError(r.$wrapper,i)}renderError(e,t){(0,a.A)("<div>").text(t).addClass("dx-filemanager-progress-box-error").appendTo(e)}isActionProgressStatusDefault(){return"default"===this._actionProgressStatus}_createDetailsItem(e,t){const i=(0,a.A)("<div>").appendTo(e);return this._createProgressBox(i,{commonText:t.commonText,imageUrl:t.imageUrl})}_createProgressBox(e,t){e.addClass("dx-filemanager-progress-box"),t.imageUrl&&(0,x.N)(t.imageUrl).addClass("dx-filemanager-progress-box-image").appendTo(e);const i=(0,a.A)("<div>").addClass("dx-filemanager-progress-box-wrapper").appendTo(e);return{$commonText:(0,a.A)("<div>").addClass("dx-filemanager-progress-box-common").text(t.commonText).appendTo(i),$element:e,$wrapper:i}}}class _H extends mH{addOperation(){return{[KI]:this._id}}addOperationDetails(){}updateOperationItemProgress(){}completeOperationItem(){}finishOperation(){}completeOperation(){}completeSingleOperationWithError(){}addOperationDetailsError(){}handleDimensionChanged(){return!1}ensureProgressPanelCreated(){}tryHideActionProgress(){this._updateActionProgress("","default")}updateActionProgressStatus(){this._updateActionProgress("","default")}_updateActionProgress(e,t){"default"!==t&&"progress"!==t||(this._actionProgressStatus=t,this._raiseActionProgress(e,t))}hasNoOperations(){return!0}get _operationInProgressCount(){return 0}set _operationInProgressCount(e){}get _failedOperationCount(){return 0}set _failedOperationCount(e){}}class vH extends mH{constructor(e){super(e),this._failedOperationCount=0,this._operationInProgressCount=0}addOperation(e,t,i){this._operationInProgressCount++;const r=this._progressPanel.addOperation(e,t,i);return r[KI]=this._id,this._updateActionProgress(e,"progress"),r}addOperationDetails(e,t,i){this._progressPanel.addOperationDetails(e,t,i)}updateOperationItemProgress(e,t,i,r){this._progressPanel.updateOperationItemProgress(e,t,i,r)}completeOperationItem(e,t,i){this._progressPanel.completeOperationItem(e,t,i)}finishOperation(e,t){this._progressPanel.updateOperationCommonProgress(e,t)}completeOperation(e,t,i,r){this._operationInProgressCount--,i&&this._failedOperationCount++,this._progressPanel.completeOperation(e,t,i,r)}completeSingleOperationWithError(e,t){this._progressPanel.completeSingleOperationWithError(e,t.detailErrorText),this._notifyError(t)}addOperationDetailsError(e,t){this._progressPanel.addOperationDetailsError(e,t.itemIndex,t.detailErrorText),this._notifyError(t)}handleDimensionChanged(){return this._progressPanel&&this._progressPanel.$element().detach(),!0}ensureProgressPanelCreated(e,t){if(this._progressPanel)this._progressPanel.$element().appendTo(e);else{const i=(0,a.A)("<div>").appendTo(e),r=this._getProgressPanelComponent();this._progressPanel=new r(i,(0,_.X)({},t,{onOperationClosed:m=>{let{info:A}=m;return this._onProgressPanelOperationClosed(A)}}))}}_getProgressPanelComponent(){return zs}_onProgressPanelOperationClosed(e){e.hasError&&(this._failedOperationCount--,this.tryHideActionProgress())}tryHideActionProgress(){this.hasNoOperations()&&this._updateActionProgress("","default")}updateActionProgressStatus(e){e&&this._updateActionProgress("",0===this._failedOperationCount?"success":"error")}_notifyError(e){const t=this.hasNoOperations()?"default":"error";this._updateActionProgress(e.commonErrorText,t)}_updateActionProgress(e,t){this._actionProgressStatus=t,this._raiseActionProgress(e,t)}hasNoOperations(){return 0===this._operationInProgressCount&&0===this._failedOperationCount}get _operationInProgressCount(){return this._operationInProgressCountInternal}set _operationInProgressCount(e){this._operationInProgressCountInternal=e}get _failedOperationCount(){return this._failedOperationCountInternal}set _failedOperationCount(e){this._failedOperationCountInternal=e}}const $z=(0,gr.zk)();class Mj extends Sl.A{_initMarkup(){super._initMarkup(),this._initActions(),this._isInAdaptiveState=this._isSmallScreen(),this._managerMap={},this._notificationManagerStubId=null,this._setNotificationManager();const e=this.option("progressPanelContainer"),t=(0,a.A)("<div>").addClass("dx-filemanager-notification-drawer").appendTo(e);(0,a.A)("<div>").addClass("dx-filemanager-notification-drawer-panel").appendTo(t);const i=(0,_.X)({opened:!1,position:"right",template:A=>this._ensureProgressPanelCreated(A)},this._getProgressDrawerAdaptiveOptions());this._progressDrawer=this._createComponent(t,Tw.A,i);const r=t.find(".dx-filemanager-notification-drawer-panel").first(),m=this.option("contentTemplate");(0,C.Tn)(m)&&m(r,this)}_setNotificationManager(e){if(e=(0,_.X)({onActionProgressStatusChanged:this._raiseActionProgress.bind(this)},e),!this._notificationManagerStubId){const t=new _H(e);this._notificationManagerStubId=t.getId(),this._managerMap[this._notificationManagerStubId]=t}if(!this._isProgressDrawerDisabled()){const t=this._getProgressManagerComponent();e.isActual=!0;const i=new t(e);this._managerMap[i.getId()]=i}}_getNotificationManager(e){const t=e?.[KI]||this._getActualNotificationManagerId();return this._managerMap[t]||this._managerMap[this._notificationManagerStubId]}_clearManagerMap(){const e=this._managerMap[this._notificationManagerStubId];delete this._managerMap,this._managerMap={[this._notificationManagerStubId]:e}}_getActualNotificationManagerId(){return Object.keys(this._managerMap).filter(e=>this._managerMap[e].isActual())[0]}tryShowProgressPanel(){const e=new g.cY,t=this._getNotificationManager();return t.isActionProgressStatusDefault()||this._isProgressDrawerOpened()||this._isProgressDrawerDisabled()?e.resolve().promise():(setTimeout(()=>{this._progressDrawer.show().done(e.resolve),this._hidePopup(),t.tryHideActionProgress()}),e.promise())}addOperation(e,t,i){return this._getNotificationManager().addOperation(e,t,i)}addOperationDetails(e,t,i){this._getNotificationManager(e).addOperationDetails(e,t,i)}updateOperationItemProgress(e,t,i,r){this._getNotificationManager(e).updateOperationItemProgress(e,t,i,r)}completeOperationItem(e,t,i){this._getNotificationManager(e).completeOperationItem(e,t,i)}finishOperation(e,t){this._getNotificationManager(e).finishOperation(e,t)}completeOperation(e,t,i,r){const m=this._getNotificationManager(e);i||this._showPopup(t),m.completeOperation(e,t,i,r),this._isProgressDrawerOpened()&&m.hasNoOperations()?m.tryHideActionProgress():m.updateActionProgressStatus(e)}completeSingleOperationWithError(e,t){this._getNotificationManager(e).completeSingleOperationWithError(e,t),this._showPopupError(t)}addOperationDetailsError(e,t){this._getNotificationManager(e).addOperationDetailsError(e,t),this._showPopupError(t)}_hideProgressPanel(){setTimeout(()=>this._progressDrawer.hide())}_isSmallScreen(){return!!(0,gr.Vd)()&&(0,D.RG)($z)<=1e3}_dimensionChanged(e){e&&"height"===e||this._checkAdaptiveState()}_checkAdaptiveState(){const e=this._isInAdaptiveState;if(this._isInAdaptiveState=this._isSmallScreen(),e!==this._isInAdaptiveState&&this._progressDrawer&&this._getNotificationManager().handleDimensionChanged()){const i=this._getProgressDrawerAdaptiveOptions();this._progressDrawer.option(i)}}_getProgressDrawerAdaptiveOptions(){return this._isInAdaptiveState?{openedStateMode:"overlap",shading:!0,hideOnOutsideClick:!0}:{openedStateMode:"shrink",shading:!1,hideOnOutsideClick:!1}}_ensureProgressPanelCreated(e){this._getNotificationManager().ensureProgressPanelCreated(e,{onOperationCanceled:i=>{let{info:r}=i;return this._raiseOperationCanceled(r)},onOperationItemCanceled:i=>{let{item:r,itemIndex:m}=i;return this._raiseOperationItemCanceled(r,m)},onPanelClosed:()=>this._hideProgressPanel()})}_getProgressManagerComponent(){return vH}_isProgressDrawerDisabled(){return!this.option("showProgressPanel")}_isProgressDrawerOpened(){return this._progressDrawer.option("opened")}_hidePopup(e){!this.option("showNotificationPopup")&&!e||this._getNotificationPopup().hide()}_showPopup(e,t){this._isProgressDrawerOpened()||!this.option("showNotificationPopup")||(this._getNotificationPopup().$wrapper().toggleClass("dx-filemanager-notification-popup-error",!!t),this._getNotificationPopup().option("contentTemplate",e),this._getNotificationPopup().option("visible")||this._getNotificationPopup().show())}_showPopupError(e){if(!this.option("showNotificationPopup"))return;const t=this._getNotificationManager(),i=(0,a.A)("<div>"),r=(0,a.A)("<div>").addClass("dx-filemanager-notification-common").text(e.commonErrorText),m=(0,a.A)("<div>").addClass("dx-filemanager-notification-separator");(0,a.A)("<div>").appendTo(m);const A=(0,a.A)("<div>").addClass("dx-filemanager-notification-details");e.item?t.createErrorDetailsProgressBox(A,e.item,e.detailErrorText):(r.addClass("dx-filemanager-notification-common-no-item"),t.renderError(A,e.detailErrorText)),i.append(r,m,A),this._showPopup(i,!0)}_getNotificationPopup(){if(!this._notificationPopup){const e=(0,a.A)("<div>").appendTo(this.$element());this._notificationPopup=this._createComponent(e,bg.A,{container:this.$element(),width:"auto",height:"auto",showTitle:!1,dragEnabled:!1,shading:!1,visible:!1,hideOnOutsideClick:!0,animation:{duration:0},position:{my:"right top",at:"right top",of:this.option("positionTarget"),offset:"-10 -5"},_wrapperClassExternal:"dx-filemanager-notification-popup"})}return this._notificationPopup}_raiseActionProgress(e,t){this._actions.onActionProgress({message:e,status:t})}_raiseOperationCanceled(e){this._actions.onOperationCanceled({info:e})}_raiseOperationItemCanceled(e,t){this._actions.onOperationItemCanceled({item:e,itemIndex:t})}_initActions(){this._actions={onActionProgress:this._createActionByOption("onActionProgress"),onOperationCanceled:this._createActionByOption("onOperationCanceled"),onOperationItemCanceled:this._createActionByOption("onOperationItemCanceled")}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{progressPanelContainer:null,contentTemplate:null,onActionProgress:null,onOperationCanceled:null,onOperationItemCanceled:null,showProgressPanel:!0,showNotificationPopup:!0})}_optionChanged(e){const t=e.name;switch(t){case"progressPanelContainer":case"contentTemplate":break;case"showProgressPanel":this._setNotificationManager(),this._getNotificationManager().updateActionProgressStatus(),e.value||(this._hideProgressPanel(),this._clearManagerMap()),this._progressDrawer.repaint();break;case"showNotificationPopup":e.value||this._hidePopup(!0);break;case"onActionProgress":case"onOperationCanceled":case"onOperationItemCanceled":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}}const UF=class jz extends Sl.A{_initMarkup(){super._initMarkup(),this._createOnClosedAction();const e=this._getDialogOptions(),t=(0,a.A)("<div>").appendTo(this.$element()),i={showTitle:!0,title:e.title,visible:!1,hideOnOutsideClick:!0,contentTemplate:this._createContentTemplate.bind(this),toolbarItems:[{widget:"dxButton",toolbar:"bottom",location:"after",options:{text:e.buttonText,onClick:this._applyDialogChanges.bind(this)}},{widget:"dxButton",toolbar:"bottom",location:"after",options:{text:Wn.A.format("dxFileManager-dialogButtonCancel"),onClick:this._closeDialog.bind(this)}}],onInitialized:r=>{let{component:m}=r;m.registerKeyHandler("enter",this._applyDialogChanges.bind(this))},onHiding:this._onPopupHiding.bind(this),onShown:this._onPopupShown.bind(this),_wrapperClassExternal:`dx-filemanager-dialog-popup ${e.popupCssClass??""}`};(0,C.O9)(e.height)&&(i.height=e.height),(0,C.O9)(e.maxHeight)&&(i.maxHeight=e.maxHeight),this._popup=this._createComponent(t,bg.A,i)}show(){this._dialogResult=null,this._popup.show()}_getDialogOptions(){return{title:"Title",buttonText:"ButtonText",contentCssClass:"",popupCssClass:""}}_createContentTemplate(e){this._$contentElement=(0,a.A)("<div>").appendTo(e).addClass("dx-filemanager-dialog");const t=this._getDialogOptions().contentCssClass;t&&this._$contentElement.addClass(t)}_getDialogResult(){return null}_applyDialogChanges(){const e=this._getDialogResult();e&&(this._dialogResult=e,this._closeDialog())}_closeDialog(){this._popup.hide()}_onPopupHiding(){this._onClosedAction({dialogResult:this._dialogResult})}_onPopupShown(){}_createOnClosedAction(){this._onClosedAction=this._createActionByOption("onClosed")}_setTitle(e){this._popup.option("title",e)}_setApplyButtonOptions(e){this._popup.option("toolbarItems[0].options",e)}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{onClosed:null})}_optionChanged(e){"onClosed"===e.name?this._createOnPathChangedAction():super._optionChanged(e)}},Yz=class Xz extends UF{show(e){e=e||"",this._nameTextBox?this._nameTextBox.option("value",e):this._initialNameValue=e,super.show()}_onPopupShown(){if(!this._nameTextBox)return;const e=this._nameTextBox._input();e.length&&e[0].select(),this._nameTextBox.focus()}_getDialogOptions(){return(0,_.X)(super._getDialogOptions(),{title:this.option("title"),buttonText:this.option("buttonText"),contentCssClass:"dx-filemanager-dialog-name-editor",popupCssClass:"dx-filemanager-dialog-name-editor-popup"})}_createContentTemplate(e){super._createContentTemplate(e),this._nameTextBox=this._createComponent((0,a.A)("<div>"),bI.A,{value:this._initialNameValue,onEnterKey:()=>this._hasCompositionJustEnded&&this._applyDialogChanges(),onKeyDown:t=>this._checkCompositionEnded(t)}),this._$contentElement.append(this._nameTextBox.$element())}_checkCompositionEnded(e){let{event:t}=e;this._hasCompositionJustEnded=229!==t.which}_getDialogResult(){const e=this._nameTextBox.option("value");return e?{name:e}:null}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{title:"",buttonText:""})}},Jz=class Bj extends UF{show(){var e;this._setSelectedDirInfo(null),null===(e=this._filesTreeView)||void 0===e||e.refresh(),super.show()}switchToCopyDialog(e){this._targetItemInfos=e,this._setTitle(Wn.A.format("dxFileManager-dialogDirectoryChooserCopyTitle")),this._setApplyButtonOptions({text:Wn.A.format("dxFileManager-dialogDirectoryChooserCopyButtonText"),disabled:!0})}switchToMoveDialog(e){this._targetItemInfos=e,this._setTitle(Wn.A.format("dxFileManager-dialogDirectoryChooserMoveTitle")),this._setApplyButtonOptions({text:Wn.A.format("dxFileManager-dialogDirectoryChooserMoveButtonText"),disabled:!0})}_getDialogOptions(){return(0,_.X)(super._getDialogOptions(),{contentCssClass:"dx-filemanager-dialog-folder-chooser",popupCssClass:"dx-filemanager-dialog-folder-chooser-popup"})}_createContentTemplate(e){super._createContentTemplate(e),this._filesTreeView=this._createComponent((0,a.A)("<div>"),OF,{getDirectories:this.option("getDirectories"),getCurrentDirectory:()=>this._getDialogSelectedDirectory(),onDirectoryClick:t=>this._onFilesTreeViewDirectoryClick(t),onFilesTreeViewContentReady:()=>this._toggleUnavailableLocationsDisabled(!0)}),this._$contentElement.append(this._filesTreeView.$element())}_getDialogResult(){const e=this._getDialogSelectedDirectory();return e&&{folder:e}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{getItems:null})}_getDialogSelectedDirectory(){return this._selectedDirectoryInfo}_onFilesTreeViewDirectoryClick(e){let{itemData:t}=e;this._setSelectedDirInfo(t),this._filesTreeView.updateCurrentDirectory()}_setSelectedDirInfo(e){this._selectedDirectoryInfo=e,this._setApplyButtonOptions({disabled:!e})}_onPopupShown(){this._toggleUnavailableLocationsDisabled(!0),super._onPopupShown()}_onPopupHiding(){this._toggleUnavailableLocationsDisabled(!1),super._onPopupHiding()}_toggleUnavailableLocationsDisabled(e){if(!this._filesTreeView)return;const t=this._getLocationsToProcess(e);this._filesTreeView.toggleDirectoryExpandedStateRecursive(t.locationsToExpand[0],e).then(()=>this._filesTreeView.toggleDirectoryLineExpandedState(t.locationsToCollapse,!e).then(()=>t.locationKeysToDisable.forEach(i=>this._filesTreeView.toggleNodeDisabledState(i,e))))}_getLocationsToProcess(e){const t={},i={};this._targetItemInfos.forEach(A=>{A.parentDirectory&&(t[A.parentDirectory.getInternalKey()]=A.parentDirectory),A.fileItem.isDirectory&&(i[A.getInternalKey()]=A)});const r=ak(t),m=ak(i);return{locationsToExpand:e?r.values:[],locationsToCollapse:e?m.values:[],locationKeysToDisable:r.keys.concat(...m.keys)}}},yH=class eG extends UF{show(e){let{itemName:t,itemCount:i}=e;const r=1===i?Wn.A.format("dxFileManager-dialogDeleteItemSingleItemConfirmation",t):Wn.A.format("dxFileManager-dialogDeleteItemMultipleItemsConfirmation",i);this._$text?this._$text.text(r):this._initialText=r,super.show()}_getDialogOptions(){return(0,_.X)(super._getDialogOptions(),{title:Wn.A.format("dxFileManager-dialogDeleteItemTitle"),buttonText:Wn.A.format("dxFileManager-dialogDeleteItemButtonText"),contentCssClass:"dx-filemanager-dialog-delete-item",popupCssClass:"dx-filemanager-dialog-delete-item-popup",height:"auto",maxHeight:"80vh"})}_createContentTemplate(e){super._createContentTemplate(e),this._$text=(0,a.A)("<div>").text(this._initialText).appendTo(this._$contentElement),this._createComponent(this._$contentElement,Af.A,{width:"100%",height:"100%"})}_getDialogResult(){return{}}},Nj=class tG{constructor(e,t){this._$element=e,this._options=t;const i={onClosed:this._options.onDialogClosed,rtlEnabled:this._options.rtlEnabled},r=(0,a.A)("<div>").appendTo(this._$element);this._chooseDirectoryDialog=new Jz(r,(0,_.X)(i,this._options.chooseDirectoryDialog));const m=(0,a.A)("<div>").appendTo(this._$element);this._renameItemDialog=new Yz(m,(0,_.X)(i,{title:Wn.A.format("dxFileManager-dialogRenameItemTitle"),buttonText:Wn.A.format("dxFileManager-dialogRenameItemButtonText")}));const A=(0,a.A)("<div>").appendTo(this._$element);this._createItemDialog=new Yz(A,(0,_.X)(i,{title:Wn.A.format("dxFileManager-dialogCreateDirectoryTitle"),buttonText:Wn.A.format("dxFileManager-dialogCreateDirectoryButtonText")}));const V=(0,a.A)("<div>").appendTo(this._$element);this._deleteItemDialog=new yH(V,i)}getCopyDialog(e){return this._chooseDirectoryDialog.switchToCopyDialog(e),this._chooseDirectoryDialog}getMoveDialog(e){return this._chooseDirectoryDialog.switchToMoveDialog(e),this._chooseDirectoryDialog}getRenameItemDialog(){return this._renameItemDialog}getCreateItemDialog(){return this._createItemDialog}getDeleteItemDialog(){return this._deleteItemDialog}updateDialogRtl(e){[this._chooseDirectoryDialog,this._renameItemDialog,this._createItemDialog,this._deleteItemDialog].forEach(t=>{t.option("rtlEnabled",e)})}},Hj=class Vj extends Sl.A{_initMarkup(){this._initActions(),this.$element().addClass("dx-filemanager-fileuploader"),this._uploaderInfos=[],this._createInternalFileUploader(),this._createDropZonePlaceholder(),this._setDropZonePlaceholderVisible(!1),super._initMarkup()}_createInternalFileUploader(){const e=this._getController().chunkSize,t=(0,a.A)("<div>").appendTo(this.$element()),i=this._createComponent(t,wx.A,{name:"file",multiple:!0,showFileList:!1,activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,labelText:"",readyToUploadMessage:"",accept:"*",chunkSize:e,dropZone:this.option("dropZone"),onValueChanged:m=>this._onFileUploaderValueChanged(m),onProgress:m=>this._onFileUploaderProgress(m),onUploaded:m=>this._onFileUploaderUploaded(m),onFilesUploaded:m=>this._onFileUploaderAllFilesUploaded(m),onUploadAborted:m=>this._onFileUploaderUploadAborted(m),onUploadError:m=>this._onFileUploaderUploadError(m),onDropZoneEnter:()=>this._setDropZonePlaceholderVisible(!0),onDropZoneLeave:()=>this._setDropZonePlaceholderVisible(!1)});i.option({uploadChunk:(m,A)=>this._fileUploaderUploadChunk(i,m,A),abortUpload:(m,A)=>this._fileUploaderAbortUpload(i,m,A)}),i._shouldRaiseDragLeaveBase=i._shouldRaiseDragLeave,i._shouldRaiseDragLeave=m=>this._shouldRaiseDragLeave(m,i),this._uploaderInfos.push({fileUploader:i})}tryUpload(){const e=this._findAndUpdateAvailableUploaderInfo();e&&e.fileUploader._selectButtonClickHandler()}cancelUpload(e){this._cancelUpload(e)}cancelFileUpload(e,t){this._cancelUpload(e,t)}_cancelUpload(e,t){const{fileUploader:i}=this._findUploaderInfoBySessionId(e);i.abortUpload(t)}_fileUploaderUploadChunk(e,t,i){const{session:r,fileIndex:m}=this._findSessionByFile(e,t),A=r.controller;return i.fileIndex=m,A.uploadFileChunk(t,i)}_fileUploaderAbortUpload(e,t,i){const{session:r,fileIndex:m}=this._findSessionByFile(e,t),A=r.controller;return i.fileIndex=m,A.abortFileUpload(t,i)}_onFileUploaderValueChanged(e){let{component:t,value:i}=e;if(0===i.length)return;const r=i.slice(),m=this._findUploaderInfo(t);this._uploadFiles(m,r),setTimeout(()=>{this._findAndUpdateAvailableUploaderInfo()||this._createInternalFileUploader()})}_onFileUploaderProgress(e){let{component:t,file:i,bytesLoaded:r,bytesTotal:m}=e;const{session:A,fileIndex:V}=this._findSessionByFile(t,i),X=0!==m?r/m:1,ce=t.option("progress")/100;this._raiseUploadProgress({sessionId:A.id,fileIndex:V,commonValue:ce,fileValue:X})}_onFileUploaderAllFilesUploaded(e){let{component:t}=e;const{session:i}=this._findSessionByFile(t,t._files[0].value);this._raiseUploadFinished({sessionId:i.id,commonValue:t.option("progress")/100})}_onFileUploaderUploaded(e){let{component:t,file:i}=e;this._getDeferredForFile(t,i).resolve()}_onFileUploaderUploadAborted(e){let{component:t,file:i}=e;this._getDeferredForFile(t,i).resolve({canceled:!0})}_onFileUploaderUploadError(e){let{component:t,file:i,error:r}=e;this._getDeferredForFile(t,i).reject(r)}_createDropZonePlaceholder(){this._$dropZonePlaceholder=(0,a.A)("<div>").addClass("dx-filemanager-fileuploader-dropzone-placeholder").appendTo(this.option("dropZonePlaceholderContainer"))}_adjustDropZonePlaceholder(){const e=this.option("dropZone");if(!(0,gr.Vd)()||0===e.length)return;const t=parseFloat(this._$dropZonePlaceholder.css("borderTopWidth")),i=parseFloat(this._$dropZonePlaceholder.css("borderLeftWidth")),r=this.option("dropZonePlaceholderContainer"),m=parseFloat(r.css("borderBottomWidth")),A=parseFloat(r.css("borderLeftWidth")),V=(0,D.yV)(r),X=r.offset(),ce=e.offset();this._$dropZonePlaceholder.css({top:ce.top-X.top-V-m,left:ce.left-X.left-A}),(0,D.k$)(this._$dropZonePlaceholder,e.get(0).offsetHeight-2*t),(0,D.zj)(this._$dropZonePlaceholder,e.get(0).offsetWidth-2*i)}_setDropZonePlaceholderVisible(e){e?(this._adjustDropZonePlaceholder(),this._$dropZonePlaceholder.css("display","")):this._$dropZonePlaceholder.css("display","none")}_shouldRaiseDragLeave(e,t){return t.isMouseOverElement(e,this.option("splitterElement"))||t._shouldRaiseDragLeaveBase(e,!0)}_uploadFiles(e,t){this._setDropZonePlaceholderVisible(!1);const i=(new Rf.A).toString(),r=this._getController(),m=t.map(()=>new g.cY);return e.session={id:i,controller:r,files:t,deferreds:m},this._raiseUploadSessionStarted({sessionId:i,deferreds:m,files:t}),Ly(m).always(()=>setTimeout(()=>{e.fileUploader.clear(),e.session=null}))}_getDeferredForFile(e,t){const{session:i,fileIndex:r}=this._findSessionByFile(e,t);return i.deferreds[r]}_findSessionByFile(e,t){const r=this._findUploaderInfo(e).session,m=r.files.indexOf(t);return{session:r,fileIndex:m}}_findUploaderInfoBySessionId(e){for(let t=0;t<this._uploaderInfos.length;t++){const i=this._uploaderInfos[t],r=i.session;if(r&&r.id===e)return i}return null}_findAndUpdateAvailableUploaderInfo(){var e;let t=null;for(let i=0;i<this._uploaderInfos.length;i++){const r=this._uploaderInfos[i];r.fileUploader.option("dropZone",""),!t&&!r.session&&(t=r)}return null===(e=t)||void 0===e||e.fileUploader.option("dropZone",this.option("dropZone")),t}_findUploaderInfo(e){for(let t=0;t<this._uploaderInfos.length;t++){const i=this._uploaderInfos[t];if(i.fileUploader===e)return i}return null}_getController(){return this.option("getController")()}_raiseUploadSessionStarted(e){this._actions.onUploadSessionStarted({sessionInfo:e})}_raiseUploadProgress(e){this._actions.onUploadProgress(e)}_raiseUploadFinished(e){this._actions.onUploadFinished(e)}_initActions(){this._actions={onUploadSessionStarted:this._createActionByOption("onUploadSessionStarted"),onUploadProgress:this._createActionByOption("onUploadProgress"),onUploadFinished:this._createActionByOption("onUploadFinished")}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{getController:null,onUploadSessionStarted:null,onUploadProgress:null,onUploadFinished:null,splitterElement:null})}_optionChanged(e){const t=e.name;switch(t){case"getController":this.repaint();break;case"onUploadSessionStarted":case"onUploadProgress":case"onUploadFinished":this._actions[t]=this._createActionByOption(t);break;case"dropZone":this._findAndUpdateAvailableUploaderInfo(),this._adjustDropZonePlaceholder();break;case"dropZonePlaceholderContainer":this._$dropZonePlaceholder.detach(),this._$dropZonePlaceholder.appendTo(e.value);break;case"splitterElement":break;default:super._optionChanged(e)}}};class oG{constructor(e,t,i){this._actionMetadata=e,this._itemInfos=t,this._onlyFiles=!this._actionMetadata.affectsAllItems&&this._itemInfos.every(r=>!r.fileItem.isDirectory),this._items=this._itemInfos.map(r=>r.fileItem),this._multipleItems=this._items.length>1,this._location=i.getDisplayName(),this._singleRequest=!0,this._completedItems=[],this._commonProgress=0,this._errorState={failedCount:0},this._itemNewName=""}completeOperationItem(e){this._singleRequest?this._completedItems=[...this._items]:this._completedItems.push(this._items[e]),this._actionMetadata.allowItemProgress||(this._commonProgress=this._completedItems.length/this._items.length*100)}processSingleRequestError(e){this._errorState.failedCount=1,this._errorState.commonErrorText=this._multipleItems?this._actionMetadata.commonErrorMessage:this._actionMetadata.singleItemErrorMessage;const t=this._multipleItems?-1:1,i=this.getItemForSingleRequestError();this._setCurrentDetailError(t,i,e)}processMultipleRequestError(e,t){this._errorState.failedCount++,this._errorState.commonErrorText=this._errorState.failedCount>1?(0,Ea.GP)(this._actionMetadata.multipleItemsErrorMessage,this._errorState.failedCount):this._actionMetadata.singleItemErrorMessage;const i=this.getItemForMultipleRequestError(e);this._setCurrentDetailError(e,i,t)}hasModifiedItems(){return this._hasCompletedItems()||this._singleRequest&&!this.success&&this._multipleItems}getItemForSingleRequestError(){return this._multipleItems?null:this._itemInfos[0]}getItemForMultipleRequestError(e){return this._itemInfos[e]}getItemName(e,t){const i=this.singleRequest?this.getItemForSingleRequestError():this.getItemForMultipleRequestError(t);let r=i?.fileItem.name;return this.itemNewName&&this._isItemExistsErrorCode(e)&&(r=this.itemNewName),r}_isItemExistsErrorCode(e){return 3===e||1===e}_setCurrentDetailError(e,t,i){this._errorState.currentDetailError={itemIndex:e,itemInfo:t,errorText:i}}_hasCompletedItems(){return this._completedItems.length>0}get actionMetadata(){return this._actionMetadata}get itemInfos(){return this._itemInfos}get itemNewName(){return this._itemNewName}set itemNewName(e){this._itemNewName=e}get errorState(){return this._errorState}get singleRequest(){return this._singleRequest}set singleRequest(e){this._singleRequest=e}get multipleItems(){return this._multipleItems}get onlyFiles(){return this._onlyFiles}get processingMessage(){return this._multipleItems?(0,Ea.GP)(this._actionMetadata.multipleItemsProcessingMessage,this._items.length,this._location):(0,Ea.GP)(this._actionMetadata.singleItemProcessingMessage,this._location)}get successMessage(){return this._hasCompletedItems()?this._multipleItems?(0,Ea.GP)(this._actionMetadata.multipleItemsSuccessMessage,this._completedItems.length,this._location):(0,Ea.GP)(this._actionMetadata.singleItemSuccessMessage,this._location):this._multipleItems?(0,Ea.GP)(this._actionMetadata.multipleItemsErrorMessage,this._items.length):this._actionMetadata.singleItemErrorMessage}get completionMessage(){return this.success?this.successMessage:this.errorState.commonErrorText}get statusText(){return this.success&&!this._hasCompletedItems()?this._actionMetadata.canceledMessage:void 0}get commonProgress(){return this._commonProgress}get success(){return!this._errorState.failedCount}}const bH=class iG extends Sl.A{_initMarkup(){super._initMarkup(),this._initActions(),this._controller=this.option("controller"),this._controller.on("EditActionStarting",this._onEditActionStarting.bind(this)),this._controller.on("EditActionResultAcquired",this._onEditActionResultAcquired.bind(this)),this._controller.on("EditActionItemError",this._onEditActionItemError.bind(this)),this._controller.on("EditActionError",this._onEditActionError.bind(this)),this._controller.on("CompleteEditActionItem",this._onCompleteEditActionItem.bind(this)),this._controller.on("CompleteEditAction",this._onCompleteEditAction.bind(this)),this._model=this.option("model"),this._uploadOperationInfoMap={},this._dialogManager=new Nj(this.$element(),{chooseDirectoryDialog:{provider:this._controller._fileProvider,getDirectories:this._controller.getDirectories.bind(this._controller),getCurrentDirectory:this._controller.getCurrentDirectory.bind(this._controller)},rtlEnabled:this.option("rtlEnabled"),onDialogClosed:this._onDialogClosed.bind(this)}),this._fileUploader=this._createFileUploader();const e=this.option("notificationControl");e&&this._initNotificationControl(e),this._createMetadataMap()}_initNotificationControl(e){this._notificationControl=e,this._notificationControl.option({onOperationCanceled:t=>{let{info:i}=t;return this._onCancelUploadSession(i)},onOperationItemCanceled:t=>{let{item:i,itemIndex:r}=t;return this._onCancelFileUpload(i,r)}})}_getFileUploaderComponent(){return Hj}_createFileUploader(){const e=(0,a.A)("<div>").appendTo(this.$element());return this._createComponent(e,this._getFileUploaderComponent(),{getController:this._getFileUploaderController.bind(this),dropZonePlaceholderContainer:this.option("uploadDropZonePlaceholderContainer"),onUploadSessionStarted:t=>this._onUploadSessionStarted(t),onUploadProgress:t=>this._onUploadProgress(t),onUploadFinished:t=>this._onUploadFinished(t)})}setUploaderDropZone(e){this._fileUploader.option("dropZone",e)}setUploaderSplitterElement(e){this._fileUploader.option("splitterElement",e)}_getFileUploaderController(){const e=this.uploadDirectoryInfo.fileItem;return{chunkSize:this._controller.getFileUploadChunkSize(),uploadFileChunk:(t,i)=>this._controller.uploadFileChunk(t,i,e),abortFileUpload:(t,i)=>this._controller.abortFileUpload(t,i,e)}}_createMetadataMap(){this._metadataMap={create:{action:e=>this._tryCreate(e),affectsAllItems:!0,singleItemProcessingMessage:Wn.A.format("dxFileManager-editingCreateSingleItemProcessingMessage"),singleItemSuccessMessage:Wn.A.format("dxFileManager-editingCreateSingleItemSuccessMessage"),singleItemErrorMessage:Wn.A.format("dxFileManager-editingCreateSingleItemErrorMessage"),commonErrorMessage:Wn.A.format("dxFileManager-editingCreateCommonErrorMessage")},rename:{action:e=>this._tryRename(e),singleItemProcessingMessage:Wn.A.format("dxFileManager-editingRenameSingleItemProcessingMessage"),singleItemSuccessMessage:Wn.A.format("dxFileManager-editingRenameSingleItemSuccessMessage"),singleItemErrorMessage:Wn.A.format("dxFileManager-editingRenameSingleItemErrorMessage"),commonErrorMessage:Wn.A.format("dxFileManager-editingRenameCommonErrorMessage")},delete:{action:e=>this._tryDelete(e),singleItemProcessingMessage:Wn.A.format("dxFileManager-editingDeleteSingleItemProcessingMessage"),multipleItemsProcessingMessage:Wn.A.format("dxFileManager-editingDeleteMultipleItemsProcessingMessage"),singleItemSuccessMessage:Wn.A.format("dxFileManager-editingDeleteSingleItemSuccessMessage"),multipleItemsSuccessMessage:Wn.A.format("dxFileManager-editingDeleteMultipleItemsSuccessMessage"),singleItemErrorMessage:Wn.A.format("dxFileManager-editingDeleteSingleItemErrorMessage"),multipleItemsErrorMessage:Wn.A.format("dxFileManager-editingDeleteMultipleItemsErrorMessage"),commonErrorMessage:Wn.A.format("dxFileManager-editingDeleteCommonErrorMessage")},move:{action:e=>this._tryMove(e),singleItemProcessingMessage:Wn.A.format("dxFileManager-editingMoveSingleItemProcessingMessage"),multipleItemsProcessingMessage:Wn.A.format("dxFileManager-editingMoveMultipleItemsProcessingMessage"),singleItemSuccessMessage:Wn.A.format("dxFileManager-editingMoveSingleItemSuccessMessage"),multipleItemsSuccessMessage:Wn.A.format("dxFileManager-editingMoveMultipleItemsSuccessMessage"),singleItemErrorMessage:Wn.A.format("dxFileManager-editingMoveSingleItemErrorMessage"),multipleItemsErrorMessage:Wn.A.format("dxFileManager-editingMoveMultipleItemsErrorMessage"),commonErrorMessage:Wn.A.format("dxFileManager-editingMoveCommonErrorMessage")},copy:{action:e=>this._tryCopy(e),singleItemProcessingMessage:Wn.A.format("dxFileManager-editingCopySingleItemProcessingMessage"),multipleItemsProcessingMessage:Wn.A.format("dxFileManager-editingCopyMultipleItemsProcessingMessage"),singleItemSuccessMessage:Wn.A.format("dxFileManager-editingCopySingleItemSuccessMessage"),multipleItemsSuccessMessage:Wn.A.format("dxFileManager-editingCopyMultipleItemsSuccessMessage"),singleItemErrorMessage:Wn.A.format("dxFileManager-editingCopySingleItemErrorMessage"),multipleItemsErrorMessage:Wn.A.format("dxFileManager-editingCopyMultipleItemsErrorMessage"),commonErrorMessage:Wn.A.format("dxFileManager-editingCopyCommonErrorMessage")},upload:{action:e=>this._tryUpload(e),allowCancel:!0,allowItemProgress:!0,singleItemProcessingMessage:Wn.A.format("dxFileManager-editingUploadSingleItemProcessingMessage"),multipleItemsProcessingMessage:Wn.A.format("dxFileManager-editingUploadMultipleItemsProcessingMessage"),singleItemSuccessMessage:Wn.A.format("dxFileManager-editingUploadSingleItemSuccessMessage"),multipleItemsSuccessMessage:Wn.A.format("dxFileManager-editingUploadMultipleItemsSuccessMessage"),singleItemErrorMessage:Wn.A.format("dxFileManager-editingUploadSingleItemErrorMessage"),multipleItemsErrorMessage:Wn.A.format("dxFileManager-editingUploadMultipleItemsErrorMessage"),canceledMessage:Wn.A.format("dxFileManager-editingUploadCanceledMessage")},download:{action:e=>this._download(e),singleItemProcessingMessage:"",multipleItemsProcessingMessage:"",singleItemErrorMessage:Wn.A.format("dxFileManager-editingDownloadSingleItemErrorMessage"),multipleItemsErrorMessage:Wn.A.format("dxFileManager-editingDownloadMultipleItemsErrorMessage")},getItemContent:{action:e=>this._getItemContent(e)},getItems:{singleItemProcessingMessage:"",singleItemErrorMessage:Wn.A.format("dxFileManager-errorDirectoryOpenFailed"),commonErrorMessage:Wn.A.format("dxFileManager-errorDirectoryOpenFailed")}}}getCommandActions(){const e={};return(0,w.__)(this._metadataMap,t=>{Object.prototype.hasOwnProperty.call(this._metadataMap,t)&&(e[t]=i=>this._executeAction(t,i))}),e}_executeAction(e,t){const i=this._metadataMap[e];return i?i.action(t):null}_onCancelUploadSession(e){this._fileUploader.cancelUpload(e.uploadSessionId)}_onCancelFileUpload(e,t){this._fileUploader.cancelFileUpload(e.info.uploadSessionId,t)}_onUploadProgress(e){let{sessionId:t,fileIndex:i,commonValue:r,fileValue:m}=e;const{operationInfo:A}=this._uploadOperationInfoMap[t];this._notificationControl.updateOperationItemProgress(A,i,100*m,100*r)}_onUploadFinished(e){let{sessionId:t,commonValue:i}=e;const{operationInfo:r}=this._uploadOperationInfoMap[t];this._notificationControl.finishOperation(r,100*i),this._scheduleUploadSessionDisposal(t,"uploader")}_onUploadSessionStarted(e){let{sessionInfo:t}=e;this._controller.processUploadSession(t,this.uploadDirectoryInfo)}_onEditActionStarting(e){const t=this._metadataMap[e.name],i=new oG(t,e.itemInfos,e.directory),r=this._notificationControl.addOperation(i.processingMessage,t.allowCancel,!t.allowItemProgress);switch((0,_.X)(e.customData,{context:i,operationInfo:r}),e.name){case"upload":{const m=e.customData.sessionInfo.sessionId;r.uploadSessionId=m,this._uploadOperationInfoMap[m]={operationInfo:r}}break;case"rename":e.customData.context.itemNewName=e.customData.itemNewName}}_onEditActionResultAcquired(e){const{context:t,operationInfo:i}=e.customData;t.singleRequest=e.singleRequest;const r=t.itemInfos.map(m=>this._getItemProgressDisplayInfo(m));this._notificationControl.addOperationDetails(i,r,t.actionMetadata.allowCancel)}_onEditActionError(e,t){const{context:i,operationInfo:r}=e.customData;i.singleRequest=e.singleRequest,this._handleActionError(r,i,t),this._completeAction(r,i)}_onEditActionItemError(e,t){const{context:i,operationInfo:r}=e.customData;this._handleActionError(r,i,t)}_onCompleteEditActionItem(e,t){const{context:i,operationInfo:r}=e.customData;(!t.result||!t.result.canceled)&&(i.completeOperationItem(t.index),this._notificationControl.completeOperationItem(r,t.index,i.commonProgress))}_onCompleteEditAction(e){const{context:t,operationInfo:i}=e.customData;this._completeAction(i,t),"upload"===e.name&&this._scheduleUploadSessionDisposal(e.customData.sessionInfo.sessionId,"controller")}_scheduleUploadSessionDisposal(e,t){(0,C.O9)(this._uploadOperationInfoMap[e].requester)&&this._uploadOperationInfoMap[e].requester!==t?delete this._uploadOperationInfoMap[e]:this._uploadOperationInfoMap[e].requester=t}_tryCreate(e){const t=e&&e[0]||this._getCurrentDirectory(),i=Wn.A.format("dxFileManager-newDirectoryName");return this._showDialog(this._dialogManager.getCreateItemDialog(),i).then(r=>{let{name:m}=r;return this._controller.createDirectory(t,m)})}_tryRename(e){const t=e&&e[0]||this._model.getMultipleSelectedItems()[0];return t?this._showDialog(this._dialogManager.getRenameItemDialog(),t.fileItem.name).then(i=>{let{name:r}=i;return this._controller.renameItem(t,r)}):(new g.cY).reject().promise()}_tryDelete(e){if(0===(e=e||this._model.getMultipleSelectedItems()).length)return(new g.cY).reject().promise();const t=e[0].fileItem.name,i=e.length;return this._showDialog(this._dialogManager.getDeleteItemDialog(),{itemName:t,itemCount:i}).then(()=>this._controller.deleteItems(e))}_tryMove(e){return 0===(e=e||this._model.getMultipleSelectedItems()).length?(new g.cY).reject().promise():this._showDialog(this._dialogManager.getMoveDialog(e)).then(t=>{let{folder:i}=t;return this._controller.moveItems(e,i)})}_tryCopy(e){return 0===(e=e||this._model.getMultipleSelectedItems()).length?(new g.cY).reject().promise():this._showDialog(this._dialogManager.getCopyDialog(e)).then(t=>{let{folder:i}=t;return this._controller.copyItems(e,i)})}_tryUpload(e){this._uploadDirectoryInfo=e?.[0],this._fileUploader.tryUpload()}_download(e){return 0===(e=e||this._model.getMultipleSelectedItems()).length?(new g.cY).reject().promise():this._controller.downloadItems(e)}_getItemContent(e){return e=e||this._model.getMultipleSelectedItems(),this._controller.getItemContent(e)}_completeAction(e,t){this._notificationControl.completeOperation(e,t.completionMessage,!t.success,t.statusText),t.hasModifiedItems()&&this._raiseOnSuccess(t.onlyFiles)}_handleActionError(e,t,i){e.hasError=!0,t.singleRequest?this._handleSingleRequestActionError(e,t,i):this._handleMultipleRequestActionError(e,t,i)}_handleSingleRequestActionError(e,t,i){const r=t.getItemForSingleRequestError(),m=t.getItemName(i.errorCode),A=this._getErrorText(i,r,m);t.processSingleRequestError(A);const V=this._getOperationErrorInfo(t);this._notificationControl.completeSingleOperationWithError(e,V),t.multipleItems&&this._raiseOnSuccess(t.onlyFiles)}_handleMultipleRequestActionError(e,t,i){const r=t.getItemForMultipleRequestError(i.index),m=t.getItemName(i.errorCode,i.index),A=this._getErrorText(i,r,m);t.processMultipleRequestError(i.index,A);const V=this._getOperationErrorInfo(t);this._notificationControl.addOperationDetailsError(e,V)}_getOperationErrorInfo(e){const t=e.errorState.currentDetailError;return{commonErrorText:e.errorState.commonErrorText,item:t.itemInfo?this._getItemProgressDisplayInfo(t.itemInfo):null,itemIndex:t.itemIndex,detailErrorText:t.errorText}}_getErrorText(e,t,i){const r=e.errorText||((n,e)=>{switch(n){case 0:return Wn.A.format("dxFileManager-errorNoAccess");case 1:return Wn.A.format("dxFileManager-errorFileExistsFormat",e);case 2:return Wn.A.format("dxFileManager-errorFileNotFoundFormat",e);case 3:return Wn.A.format("dxFileManager-errorDirectoryExistsFormat",e);case 4:return Wn.A.format("dxFileManager-errorDirectoryNotFoundFormat",e);case 5:return Wn.A.format("dxFileManager-errorWrongFileExtension");case 6:return Wn.A.format("dxFileManager-errorMaxFileSizeExceeded");case 7:return Wn.A.format("dxFileManager-errorInvalidSymbols")}return Wn.A.format("dxFileManager-errorDefault")})(e.errorCode,i),m={fileSystemItem:t?.fileItem,errorCode:e.errorCode,errorText:r};return this._raiseOnError(m),m.errorText}_getItemProgressDisplayInfo(e){return{commonText:e.fileItem.name,imageUrl:this._getItemThumbnail(e)}}_showDialog(e,t){return this._dialogDeferred=new g.cY,e.show(t),this._dialogDeferred.promise()}_onDialogClosed(e){const t=e.dialogResult;t?this._dialogDeferred.resolve(t):this._dialogDeferred.reject()}updateDialogRtl(e){this._dialogManager.updateDialogRtl(e)}_getItemThumbnail(e){const t=this.option("getItemThumbnail");if(!t)return null;const i=t(e);return i?i.thumbnail:null}_initActions(){this._actions={onSuccess:this._createActionByOption("onSuccess"),onError:this._createActionByOption("onError")}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{model:{getMultipleSelectedItems:null},notificationControl:null,getItemThumbnail:null,onSuccess:null,onError:null})}_optionChanged(e){const t=e.name;switch(t){case"model":this.repaint();break;case"notificationControl":this._initNotificationControl(e.value);break;case"getItemThumbnail":break;case"uploadDropZonePlaceholderContainer":this._fileUploader.option("dropZonePlaceholderContainer",e.value);break;case"onSuccess":case"onError":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}_raiseOnSuccess(e){this._actions.onSuccess({updatedOnlyFiles:e})}_raiseOnError(e){this._actions.onError(e)}_getCurrentDirectory(){return this._controller.getCurrentDirectory()}get uploadDirectoryInfo(){return this._uploadDirectoryInfo||this._getCurrentDirectory()}};var rG=M(6314);const aG=class sG extends Sl.A{_init(){super._init(),this._currentDirectory=null}_initMarkup(){super._initMarkup(),this._initActions(),this._currentDirectory&&this._renderMenu(),this.$element().addClass("dx-filemanager-breadcrumbs")}setCurrentDirectory(e){this._areDirsEqual(this._currentDirectory,e)||(this._currentDirectory=e,this.repaint())}_renderMenu(){const e=(0,a.A)("<div>").appendTo(this.$element());this._menu=this._createComponent(e,rG.A,{dataSource:this._getMenuItems(),onItemClick:this._onItemClick.bind(this),onItemRendered:this._onItemRendered.bind(this)})}_getMenuItems(){const e=this._getParentDirsLine(),t=[{icon:"arrowup",directory:this._currentDirectory.parentDirectory,isPathItem:!0,cssClass:"dx-filemanager-breadcrumbs-parent-folder-item"},{text:"\xa0",cssClass:"dx-filemanager-breadcrumbs-separator-item"}];return e.forEach((i,r)=>{t.push({text:i.getDisplayName(),directory:i,isPathItem:!0}),r!==e.length-1&&t.push({icon:"spinnext",cssClass:"dx-filemanager-breadcrumbs-path-separator-item"})}),t}_onItemClick(e){let{itemData:t}=e;if(!t.isPathItem)return;const i=t.directory;this._areDirsEqual(i,this._currentDirectory)||this._raiseCurrentDirectoryChanged(i)}_onItemRendered(e){let{itemElement:t,itemData:i}=e;i.cssClass&&(0,a.A)(t).addClass(i.cssClass)}_getParentDirsLine(){let e=this._currentDirectory;const t=[];for(;e;)t.unshift(e),e=e.parentDirectory;return t}_areDirsEqual(e,t){return e&&t&&e===t&&e.fileItem.key===t.fileItem.key}_initActions(){this._actions={onCurrentDirectoryChanging:this._createActionByOption("onCurrentDirectoryChanging")}}_raiseCurrentDirectoryChanged(e){this._actions.onCurrentDirectoryChanging({currentDirectory:e})}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{rootFolderDisplayName:"Files",onCurrentDirectoryChanging:null})}_optionChanged(e){const t=e.name;switch(t){case"rootFolderDisplayName":this.repaint();break;case"onCurrentDirectoryChanging":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}},xH=(0,gr.zk)();class SH extends Sl.A{_init(){super._init();const e=(new Rf.A).toString();this.SPLITTER_POINTER_DOWN_EVENT_NAME=(0,N.b4)(Si.A.down,"dxSplitterResizing"+e),this.SPLITTER_POINTER_MOVE_EVENT_NAME=(0,N.b4)(Si.A.move,"dxSplitterResizing"+e),this.SPLITTER_POINTER_UP_EVENT_NAME=(0,N.b4)(Si.A.up,"dxSplitterResizing"+e)}_initMarkup(){super._initMarkup(),this._initActions(),this._$container=this.option("container"),this._$leftElement=this.option("leftElement"),this._$rightElement=this.option("rightElement"),this.$element().addClass("dx-splitter-wrapper").addClass("dx-splitter-initial"),this._$splitterBorder=(0,a.A)("<div>").addClass("dx-splitter-border").appendTo(this.$element()),this._$splitter=(0,a.A)("<div>").addClass("dx-splitter-bar").addClass("dx-splitter-inactive").appendTo(this._$splitterBorder)}_initActions(){this._actions={onApplyPanelSize:this._createActionByOption("onApplyPanelSize"),onActiveStateChanged:this._createActionByOption("onActiveStateChanged")}}_render(){super._render(),this._detachEventHandlers(),this._attachEventHandlers()}_clean(){this._detachEventHandlers(),super._clean()}_attachEventHandlers(){const e=c.A.getDocument();L.A.on(this._$splitterBorder,this.SPLITTER_POINTER_DOWN_EVENT_NAME,this._onMouseDownHandler.bind(this)),L.A.on(e,this.SPLITTER_POINTER_MOVE_EVENT_NAME,this._onMouseMoveHandler.bind(this)),L.A.on(e,this.SPLITTER_POINTER_UP_EVENT_NAME,this._onMouseUpHandler.bind(this))}_detachEventHandlers(){const e=c.A.getDocument();L.A.off(this._$splitterBorder,this.SPLITTER_POINTER_DOWN_EVENT_NAME),L.A.off(e,this.SPLITTER_POINTER_MOVE_EVENT_NAME),L.A.off(e,this.SPLITTER_POINTER_UP_EVENT_NAME)}_dimensionChanged(e){(!e||"height"!==e)&&(this._containerWidth=this._$container.get(0).clientWidth,this._setSplitterPositionLeft({needUpdatePanels:!0,usePercentagePanelsWidth:!0}))}_onMouseDownHandler(e){e.preventDefault(),this._offsetX=e.pageX-this._$splitterBorder.offset().left<=this._getSplitterBorderWidth()?e.pageX-this._$splitterBorder.offset().left:0,this._containerWidth=this._$container.get(0).clientWidth,this.$element().removeClass("dx-splitter-initial"),this._toggleActive(!0),this._setSplitterPositionLeft({needUpdatePanels:!0})}_onMouseMoveHandler(e){this._isSplitterActive&&this._setSplitterPositionLeft({splitterPositionLeft:this._getNewSplitterPositionLeft(e),needUpdatePanels:!0})}_onMouseUpHandler(){this._isSplitterActive&&(this._leftPanelPercentageWidth=null,this._toggleActive(!1),this._setSplitterPositionLeft({needUpdatePanels:!0,usePercentagePanelsWidth:!0}))}_getNewSplitterPositionLeft(e){let t=e.pageX-this._getContainerLeftOffset()-this._offsetX;return t=Math.max(0-this._getSplitterOffset(),t),t=Math.min(this._containerWidth-this._getSplitterOffset()-this._getSplitterWidth(),t),t}_getContainerLeftOffset(){let e=this._$container.offset().left;if(xH){const t=xH.getComputedStyle(this._$container.get(0));e+=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.borderLeftWidth)||0)}return e}_getSplitterOffset(){return(this._getSplitterBorderWidth()-this._getSplitterWidth())/2}_getSplitterWidth(){return this._$splitter.get(0).clientWidth}_getSplitterBorderWidth(){return this._$splitterBorder.get(0).clientWidth}_getLeftPanelWidth(){return this._$leftElement.get(0).clientWidth}getSplitterBorderElement(){return this._$splitterBorder}_toggleActive(e){this.$element().toggleClass("dx-splitter-inactive",!e),this._$splitter.toggleClass("dx-splitter-inactive",!e),this._isSplitterActive=e,this._actions.onActiveStateChanged({isActive:e})}toggleDisabled(e){this.$element().toggleClass("dx-state-disabled",e),this._$splitter.toggleClass("dx-state-disabled",e)}isSplitterMoved(){return!this.$element().hasClass("dx-splitter-initial")}disableSplitterCalculation(e){this._isSplitterCalculationDisabled=e}_setSplitterPositionLeft(){let{splitterPositionLeft:e=null,needUpdatePanels:t=!1,usePercentagePanelsWidth:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=e||this._getLeftPanelWidth()-this._getSplitterOffset();const r=e+this._getSplitterOffset(),m=this._containerWidth-r;this._isSplitterCalculationDisabled||this.$element().css("left",e),this._leftPanelPercentageWidth=this._leftPanelPercentageWidth||this._convertToPercentage(r);const A=this._convertToPercentage(this._containerWidth-this._convertToPixels(this._leftPanelPercentageWidth));t&&this._actions.onApplyPanelSize({leftPanelWidth:i?`${this._leftPanelPercentageWidth}%`:r,rightPanelWidth:i?`${A}%`:m})}_optionChanged(e){switch(e.name){case"initialLeftPanelWidth":this._leftPanelPercentageWidth=this._convertToPercentage(e.value),this._dimensionChanged();break;case"leftElement":this.repaint();break;case"onActiveStateChanged":case"onApplyPanelSize":this._actions[e.name]=this._createActionByOption(e.name);break;default:super._optionChanged(e)}}_convertToPercentage(e){return e/this._$container.get(0).clientWidth*100}_convertToPixels(e){return e/100*this._$container.get(0).clientWidth}}const Kj=(0,gr.zk)(),EH="dx-drawer-panel-content-initial",v=class hG extends Sl.A{_initMarkup(){super._initMarkup(),this._initActions(),this._isInAdaptiveState=!1;const e=(0,a.A)("<div>").appendTo(this.$element());(0,a.A)("<div>").addClass("dx-filemanager-adaptivity-drawer-panel").appendTo(e),this._drawer=this._createComponent(e,Tw.A),this._drawer.option({opened:!0,template:this._createDrawerTemplate.bind(this)}),(0,a.A)(this._drawer.content()).addClass(EH);const t=e.find(".dx-filemanager-adaptivity-drawer-panel").first(),i=this.option("contentTemplate");(0,C.Tn)(i)&&i(t),this._updateDrawerMaxSize()}_createDrawerTemplate(e){this.option("drawerTemplate")(e),this._splitter=this._createComponent("<div>",SH,{container:this.$element(),leftElement:(0,a.A)(this._drawer.content()),rightElement:(0,a.A)(this._drawer.viewContent()),onApplyPanelSize:this._onApplyPanelSize.bind(this),onActiveStateChanged:this._onActiveStateChanged.bind(this)}),this._splitter.$element().appendTo(e),this._splitter.disableSplitterCalculation(!0)}_render(){super._render(),this._checkAdaptiveState()}_onApplyPanelSize(e){if((0,gr.Vd)()){if(!this._splitter.isSplitterMoved())return void this._setDrawerWidth("");(0,a.A)(this._drawer.content()).removeClass(EH),this._setDrawerWidth(e.leftPanelWidth)}}_onActiveStateChanged(e){let{isActive:t}=e;this._splitter.disableSplitterCalculation(!t),!t&&this._splitter.$element().css("left","auto")}_setDrawerWidth(e){(0,a.A)(this._drawer.content()).css("width",e),this._updateDrawerMaxSize(),this._drawer.resizeViewContent()}_updateDrawerMaxSize(){this._drawer.option("maxSize",this._drawer.getRealPanelWidth())}_dimensionChanged(e){(!e||"height"!==e)&&this._checkAdaptiveState()}_checkAdaptiveState(){const e=this._isInAdaptiveState;this._isInAdaptiveState=this._isSmallScreen(),e!==this._isInAdaptiveState&&(this.toggleDrawer(!this._isInAdaptiveState,!0),(0,a.A)(this._drawer.content()).toggleClass("dx-drawer-panel-content-adaptive",this._isInAdaptiveState),this._raiseAdaptiveStateChanged(this._isInAdaptiveState)),this._isInAdaptiveState&&this._isDrawerOpened()&&this._updateDrawerMaxSize()}_isSmallScreen(){return(0,D.RG)(Kj)<=573}_isDrawerOpened(){return this._drawer.option("opened")}_initActions(){this._actions={onAdaptiveStateChanged:this._createActionByOption("onAdaptiveStateChanged")}}_raiseAdaptiveStateChanged(e){this._actions.onAdaptiveStateChanged({enabled:e})}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{drawerTemplate:null,contentTemplate:null,onAdaptiveStateChanged:null})}_optionChanged(e){const t=e.name;switch(t){case"drawerTemplate":case"contentTemplate":this.repaint();break;case"onAdaptiveStateChanged":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}isInAdaptiveState(){return this._isInAdaptiveState}toggleDrawer(e,t){this._updateDrawerMaxSize(),this._drawer.option("animationEnabled",!t),this._drawer.toggle(e);const i=this._isDrawerOpened()&&!this.isInAdaptiveState();this._splitter.toggleDisabled(!i)}getSplitterElement(){return this._splitter.getSplitterBorderElement().get(0)}};var p=M(5170),l=M(5866);(0,y.A)("dxFileManager",class _o extends Sl.A{_initTemplates(){}_init(){super._init(),this._initActions(),this._providerUpdateDeferred=null,this._lockCurrentPathProcessing=!1,this._wasRendered=!1,this._controller=new PS({currentPath:this.option("currentPath"),currentPathKeys:this.option("currentPathKeys"),rootText:this.option("rootFolderName"),fileProvider:this.option("fileSystemProvider"),allowedFileExtensions:this.option("allowedFileExtensions"),uploadMaxFileSize:this.option("upload").maxFileSize,uploadChunkSize:this.option("upload").chunkSize,onInitialized:this._onControllerInitialized.bind(this),onDataLoading:this._onDataLoading.bind(this),onSelectedDirectoryChanged:this._onSelectedDirectoryChanged.bind(this),onPathPotentiallyChanged:this._checkPathActuality.bind(this),editingEvents:this._actions.editing})}_initMarkup(){super._initMarkup(),this._firstItemViewLoad=!0,this._lockSelectionProcessing=!1,this._lockFocusedItemProcessing=!1,this._itemKeyToFocus=void 0,this._loadedWidgets=[],this._commandManager=new iH(this.option("permissions")),this.$element().addClass("dx-filemanager"),this._wasRendered?this._prepareToLoad():this._wasRendered=!0,this._createNotificationControl(),this._initCommandManager()}_createNotificationControl(){const e=(0,a.A)("<div>").addClass("dx-filemanager-notification-container").appendTo(this.$element());this._notificationControl=this._createComponent(e,Mj,{progressPanelContainer:this.$element(),contentTemplate:(t,i)=>this._createWrapper(t,i),onActionProgress:t=>this._onActionProgress(t),positionTarget:".dx-filemanager-container",showProgressPanel:this.option("notifications.showPanel"),showNotificationPopup:this.option("notifications.showPopup")})}_createWrapper(e,t){this._$wrapper=(0,a.A)("<div>").addClass("dx-filemanager-wrapper").appendTo(e),this._createEditing(t);const i=(0,a.A)("<div>").appendTo(this._$wrapper);this._toolbar=this._createComponent(i,VF,{commandManager:this._commandManager,generalItems:this.option("toolbar.items"),fileItems:this.option("toolbar.fileSelectionItems"),itemViewMode:this.option("itemView").mode,onItemClick:r=>this._actions.onToolbarItemClick(r)}),this._createAdaptivityControl()}_createAdaptivityControl(){const e=(0,a.A)("<div>").addClass("dx-filemanager-container").appendTo(this._$wrapper);this._adaptivityControl=this._createComponent(e,v,{drawerTemplate:t=>this._createFilesTreeView(t),contentTemplate:t=>this._createItemsPanel(t),onAdaptiveStateChanged:t=>this._onAdaptiveStateChanged(t)}),this._editing.setUploaderSplitterElement(this._adaptivityControl.getSplitterElement())}_createEditing(e){const t=(0,a.A)("<div>").addClass("dx-filemanager-editing-container").appendTo(this.$element());this._editing=this._createComponent(t,bH,{controller:this._controller,model:{getMultipleSelectedItems:this._getSelectedItemInfos.bind(this)},getItemThumbnail:this._getItemThumbnailInfo.bind(this),notificationControl:e,uploadDropZonePlaceholderContainer:this.$element(),rtlEnabled:this.option("rtlEnabled"),onSuccess:i=>{let{updatedOnlyFiles:r}=i;return this._redrawComponent(r)},onError:i=>this._onEditingError(i)})}_createItemsPanel(e){this._$itemsPanel=(0,a.A)("<div>").addClass("dx-filemanager-items-panel").appendTo(e),this._createBreadcrumbs(this._$itemsPanel),this._createItemView(this._$itemsPanel),this._updateUploadDropZone()}_updateUploadDropZone(){const e=this._commandManager.isCommandAvailable("upload")?this._$itemsPanel:(0,a.A)();this._editing.setUploaderDropZone(e)}_createFilesTreeView(e){this._filesTreeViewContextMenu=this._createContextMenu(!1,"navPane");const t=(0,a.A)("<div>").addClass("dx-filemanager-dirs-panel").appendTo(e);this._filesTreeView=this._createComponent(t,OF,{storeExpandedState:!0,contextMenu:this._filesTreeViewContextMenu,getDirectories:this.getDirectories.bind(this),getCurrentDirectory:this._getCurrentDirectory.bind(this),onDirectoryClick:i=>{let{itemData:r}=i;return this._setCurrentDirectory(r)},onItemListDataLoaded:()=>this._tryEndLoading("navPane")}),this._filesTreeView.updateCurrentDirectory()}_createItemView(e,t){this._itemViewContextMenu=this._createContextMenu(!0,"itemView");const i=this.option("itemView"),r={selectionMode:this.option("selectionMode"),selectedItemKeys:this.option("selectedItemKeys"),focusedItemKey:this.option("focusedItemKey"),contextMenu:this._itemViewContextMenu,getItems:this._getItemViewItems.bind(this),onError:V=>{let{error:X}=V;return this._showError(X)},onSelectionChanged:this._onItemViewSelectionChanged.bind(this),onFocusedItemChanged:this._onItemViewFocusedItemChanged.bind(this),onSelectedItemOpened:this._onSelectedItemOpened.bind(this),onContextMenuShowing:V=>this._onContextMenuShowing("itemView",V),onItemListItemsLoaded:()=>this._tryEndLoading("itemView"),getItemThumbnail:this._getItemThumbnailInfo.bind(this),customizeDetailColumns:this.option("customizeDetailColumns"),detailColumns:this.option("itemView.details.columns")},m=(0,a.A)("<div>").appendTo(e);this._itemView=this._createComponent(m,"thumbnails"===(t=t||i.mode)?hH:ww,r)}_createBreadcrumbs(e){const t=(0,a.A)("<div>").appendTo(e);this._breadcrumbs=this._createComponent(t,aG,{rootFolderDisplayName:this.option("rootFolderName"),onCurrentDirectoryChanging:i=>{let{currentDirectory:r}=i;return this._setCurrentDirectory(r,!0)}}),this._breadcrumbs.setCurrentDirectory(this._getCurrentDirectory())}_createContextMenu(e,t){const i=(0,a.A)("<div>").appendTo(this._$wrapper);return this._createComponent(i,mk,{commandManager:this._commandManager,items:this.option("contextMenu.items"),onItemClick:r=>this._actions.onContextMenuItemClick(r),onContextMenuShowing:r=>this._onContextMenuShowing(t,r),isolateCreationItemCommands:e,viewArea:t})}_initCommandManager(){const e=(0,_.X)(this._editing.getCommandActions(),{refresh:()=>this._refreshAndShowProgress(),thumbnails:()=>this.option("itemView.mode","thumbnails"),details:()=>this.option("itemView.mode","details"),clearSelection:()=>this._clearSelection(),showNavPane:()=>this._adaptivityControl.toggleDrawer()});this._commandManager.registerActions(e)}_onItemViewSelectionChanged(e){let{selectedItemInfos:t,selectedItems:i,selectedItemKeys:r,currentSelectedItemKeys:m,currentDeselectedItemKeys:A}=e;this._lockSelectionProcessing=!0,this.option("selectedItemKeys",r),this._lockSelectionProcessing=!1,this._actions.onSelectionChanged({selectedItems:i,selectedItemKeys:r,currentSelectedItemKeys:m,currentDeselectedItemKeys:A}),this._updateToolbar(t)}_onItemViewFocusedItemChanged(e){this._lockFocusedItemProcessing=!0,this.option("focusedItemKey",e.itemKey),this._lockFocusedItemProcessing=!1,this._actions.onFocusedItemChanged({item:e.item,itemElement:e.itemElement})}_onAdaptiveStateChanged(e){let{enabled:t}=e;this._commandManager.setCommandEnabled("showNavPane",t),this._updateToolbar()}_onActionProgress(e){let{message:t,status:i}=e;this._toolbar.updateRefreshItem(t,i),this._updateToolbar()}_onEditingError(e){const t=xg({},e,["errorCode","errorText","fileSystemItem"]);this._actions.onErrorOccurred(t),e.errorText=t.errorText}_refreshAndShowProgress(){return this._prepareToLoad(),(0,g.z7)(this._notificationControl.tryShowProgressPanel(),this._controller.refresh()).then(()=>this._filesTreeView.refresh())}_isAllWidgetsLoaded(){return 2===this._loadedWidgets.length&&-1!==this._loadedWidgets.indexOf("navPane")&&-1!==this._loadedWidgets.indexOf("itemView")}_tryEndLoading(e){this._loadedWidgets.push(e),this._isAllWidgetsLoaded()&&this._controller.endSingleLoad()}_prepareToLoad(){this._loadedWidgets=[],this._controller.startSingleLoad()}_updateToolbar(e){const t=e||this._getSelectedItemInfos();this._toolbar.option("contextItems",(0,h.YD)(t,[]))}_switchView(e){this._disposeWidget(this._itemView.option("contextMenu")),this._disposeWidget(this._itemView),this._createItemView(this._$itemsPanel,e),this._toolbar.option({itemViewMode:e})}_disposeWidget(e){e.dispose(),e.$element().remove()}_clearSelection(){this._itemView.clearSelection()}_showError(e){this._showNotification(e,!1)}_showNotification(e,t){(0,yd.A)({message:e,width:450},t?"success":"error",5e3)}_redrawComponent(e){this._itemView.refresh().then(()=>!e&&this._filesTreeView.refresh())}_getItemViewItems(){const e=this.option("itemView").showFolders;let t=this._controller.getCurrentItems(!e);return this._updateToolbarWithSelectionOnFirstLoad(t),this.option("itemView.showParentFolder")&&(t=(0,g.z7)(t).then(i=>this._getPreparedItemViewItems(i))),t}_updateToolbarWithSelectionOnFirstLoad(e){if(!this._firstItemViewLoad)return;this._firstItemViewLoad=!1;const t=this.option("selectedItemKeys");t.length>0&&(0,g.z7)(e).done(i=>{const r=((n,e)=>{const t={};e.forEach(r=>{t[r]=null}),n.forEach(r=>{const m=r.fileItem.key;Object.prototype.hasOwnProperty.call(t,m)&&(t[m]=r)});const i=[];return e.forEach(r=>{const m=t[r];m&&i.push(m)}),i})(i,t);r.length>0&&this._updateToolbar(r)})}_getPreparedItemViewItems(e){const t=this._getCurrentDirectory();if(t.fileItem.isRoot())return e;const i=t.fileItem.createClone();i.isParentFolder=!0,i.name="..",i.relativeName="..",i.key=`[*DXPDK*]$40F96F03-FBD8-43DF-91BE-F55F4B8BA871$${t.fileItem.key}`;const r=[...e];return r.unshift({fileItem:i,icon:"parentfolder"}),r}_onContextMenuShowing(e,t){var i;let r=xg({},t,["targetElement","cancel","event"]);r=(0,_.X)(r,{viewArea:e,fileSystemItem:null===(i=t.itemData)||void 0===i?void 0:i.fileItem,_isActionButton:t.isActionButton}),this._actions.onContextMenuShowing(r),t.cancel=(0,h.YD)(r.cancel,!1)}_getItemThumbnailInfo(e){const t=this.option("customizeThumbnail"),i=(0,C.Tn)(t)?t(e.fileItem):e.fileItem.thumbnail;return i?{thumbnail:i,cssClass:"dx-filemanager-item-custom-thumbnail"}:{thumbnail:e.icon}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{fileSystemProvider:null,currentPath:"",currentPathKeys:[],rootFolderName:Wn.A.format("dxFileManager-rootDirectoryName"),selectionMode:"multiple",selectedItemKeys:[],focusedItemKey:void 0,toolbar:{items:["showNavPane","create","upload","switchView",{name:"separator",location:"after"},"refresh"],fileSelectionItems:["download","separator","move","copy","rename","separator","delete","clearSelection",{name:"separator",location:"after"},"refresh"]},contextMenu:{items:["create","upload","rename","move","copy","delete","refresh","download"]},itemView:{details:{columns:["thumbnail","name","dateModified","size"]},mode:"details",showFolders:!0,showParentFolder:!0},customizeThumbnail:null,customizeDetailColumns:null,onContextMenuItemClick:null,onContextMenuShowing:null,onCurrentDirectoryChanged:null,onSelectedFileOpened:null,onSelectionChanged:null,onFocusedItemChanged:null,onToolbarItemClick:null,onErrorOccurred:null,onDirectoryCreating:null,onDirectoryCreated:null,onItemRenaming:null,onItemRenamed:null,onItemDeleting:null,onItemDeleted:null,onItemCopying:null,onItemCopied:null,onItemMoving:null,onItemMoved:null,onFileUploading:null,onFileUploaded:null,onItemDownloading:null,allowedFileExtensions:[],upload:{maxFileSize:0,chunkSize:2e5},permissions:(0,_.X)({},BI),notifications:{showPanel:!0,showPopup:!0}})}option(e,t){const i=(0,p.a5)(e,t),r=arguments.length<2&&"object"!==(0,C.NW)(e),m=V=>(0,C.O9)(i[V]),A=V=>{if(!m(V))return!1;const X=this.option(V);return!(0,l.a)(X,i[V])};return!r&&m("fileSystemProvider")&&(this._providerUpdateDeferred=new g.cY,(A("currentPath")||A("currentPathKeys"))&&(this._lockCurrentPathProcessing=!0)),super.option(...arguments)}_optionChanged(e){const t=e.name;switch(t){case"currentPath":{const i=()=>(this._lockCurrentPathProcessing=!1,this._controller.setCurrentPath(e.value));this._lockCurrentPathProcessing=!0,this._providerUpdateDeferred?this._providerUpdateDeferred.then(i):i()}break;case"currentPathKeys":{const i=()=>(this._lockCurrentPathProcessing=!1,this._controller.setCurrentPathByKeys(e.value));this._lockCurrentPathProcessing=!0,this._providerUpdateDeferred?this._providerUpdateDeferred.then(i):i()}break;case"selectedItemKeys":!this._lockSelectionProcessing&&this._itemView&&this._itemView.option("selectedItemKeys",e.value);break;case"focusedItemKey":!this._lockFocusedItemProcessing&&this._itemView&&this._itemView.option("focusedItemKey",e.value);break;case"rootFolderName":this._controller.setRootText(e.value),this._invalidate();break;case"fileSystemProvider":{this._lockCurrentPathProcessing||(this._providerUpdateDeferred=new g.cY);const i=this._lockCurrentPathProcessing?void 0:this.option("currentPathKeys");this._controller.updateProvider(e.value,i).then(()=>this._providerUpdateDeferred.resolve()).always(()=>{this._providerUpdateDeferred=null,this.repaint()});break}case"allowedFileExtensions":this._controller.setAllowedFileExtensions(e.value),this._invalidate();break;case"upload":this._controller.setUploadOptions(this.option("upload")),this._invalidate();break;case"permissions":this._commandManager.updatePermissions(this.option("permissions")),this._filesTreeViewContextMenu.tryUpdateVisibleContextMenu(),this._itemViewContextMenu.tryUpdateVisibleContextMenu(),this._toolbar.updateItemPermissions(),this._updateUploadDropZone();break;case"selectionMode":case"customizeThumbnail":case"customizeDetailColumns":this._invalidate();break;case"itemView":"itemView.mode"===e.fullName?this._switchView(e.value):this._invalidate();break;case"toolbar":{const i={};"toolbar"===e.fullName&&(e.value.items&&(i.generalItems=e.value.items),e.value.fileSelectionItems&&(i.fileItems=e.value.fileSelectionItems)),0===e.fullName.indexOf("toolbar.items")&&(i.generalItems=this.option("toolbar.items")),0===e.fullName.indexOf("toolbar.fileSelectionItems")&&(i.fileItems=this.option("toolbar.fileSelectionItems")),this._toolbar.option(i)}break;case"contextMenu":if("contextMenu"===e.fullName&&e.value.items||0===e.fullName.indexOf("contextMenu.items")){const i=this.option("contextMenu.items");this._filesTreeViewContextMenu.option("items",i),this._itemViewContextMenu.option("items",i)}break;case"notifications":this._notificationControl.option("showProgressPanel",this.option("notifications.showPanel")),this._notificationControl.option("showNotificationPopup",this.option("notifications.showPopup"));break;case"onContextMenuItemClick":case"onContextMenuShowing":case"onCurrentDirectoryChanged":case"onSelectedFileOpened":case"onSelectionChanged":case"onFocusedItemChanged":case"onToolbarItemClick":case"onErrorOccurred":this._actions[t]=this._createActionByOption(t);break;case"onDirectoryCreating":case"onDirectoryCreated":case"onItemRenaming":case"onItemRenamed":case"onItemDeleting":case"onItemDeleted":case"onItemCopying":case"onItemCopied":case"onItemMoving":case"onItemMoved":case"onFileUploading":case"onFileUploaded":case"onItemDownloading":this._actions.editing[t]=this._createActionByOption(t);break;case"rtlEnabled":this._editing.updateDialogRtl(e.value),super._optionChanged(e);break;default:super._optionChanged(e)}}_initActions(){this._actions={onContextMenuItemClick:this._createActionByOption("onContextMenuItemClick"),onContextMenuShowing:this._createActionByOption("onContextMenuShowing"),onCurrentDirectoryChanged:this._createActionByOption("onCurrentDirectoryChanged"),onSelectedFileOpened:this._createActionByOption("onSelectedFileOpened"),onSelectionChanged:this._createActionByOption("onSelectionChanged"),onFocusedItemChanged:this._createActionByOption("onFocusedItemChanged"),onToolbarItemClick:this._createActionByOption("onToolbarItemClick"),onErrorOccurred:this._createActionByOption("onErrorOccurred"),editing:{onDirectoryCreating:this._createActionByOption("onDirectoryCreating"),onDirectoryCreated:this._createActionByOption("onDirectoryCreated"),onItemRenaming:this._createActionByOption("onItemRenaming"),onItemRenamed:this._createActionByOption("onItemRenamed"),onItemDeleting:this._createActionByOption("onItemDeleting"),onItemDeleted:this._createActionByOption("onItemDeleted"),onItemCopying:this._createActionByOption("onItemCopying"),onItemCopied:this._createActionByOption("onItemCopied"),onItemMoving:this._createActionByOption("onItemMoving"),onItemMoved:this._createActionByOption("onItemMoved"),onFileUploading:this._createActionByOption("onFileUploading"),onFileUploaded:this._createActionByOption("onFileUploaded"),onItemDownloading:this._createActionByOption("onItemDownloading")}}}executeCommand(e){return this._commandManager.executeCommand(e)}_setCurrentDirectory(e,t){this._controller.setCurrentDirectory(e,t)}_getCurrentDirectory(){return this._controller.getCurrentDirectory()}_onControllerInitialized(e){let{controller:t}=e;this._controller=this._controller||t,this._syncToCurrentDirectory()}_onDataLoading(e){let{operation:t}=e,i=null;"navigation"===t&&(i={focusedItemKey:this._itemKeyToFocus,selectedItemKeys:this.option("selectedItemKeys")},this._itemKeyToFocus=void 0),this._itemView.refresh(i,t)}_onSelectedDirectoryChanged(){const e=this._getCurrentDirectory();this._syncToCurrentDirectory(),this._actions.onCurrentDirectoryChanged({directory:e.fileItem})}_syncToCurrentDirectory(){const e=this._getCurrentDirectory();this._filesTreeView&&this._filesTreeView.updateCurrentDirectory(),this._breadcrumbs&&this._breadcrumbs.setCurrentDirectory(e),this._checkPathActuality()}_checkPathActuality(){if(this._lockCurrentPathProcessing)return;const e=this._controller.getCurrentPath(),t=this._controller.getCurrentPathKeys(),i={};this.option("currentPath")!==e&&(i.currentPath=e),(0,h.RL)(this.option("currentPathKeys"),t)||(i.currentPathKeys=t),(0,C.RI)(i)||this.option(i)}getDirectories(e,t){return this._controller.getDirectories(e,t)}_getSelectedItemInfos(){return this._itemView?this._itemView.getSelectedItems():[]}refresh(){return this.executeCommand("refresh")}getCurrentDirectory(){const e=this._getCurrentDirectory();return e&&e.fileItem||null}getSelectedItems(){return this._getSelectedItemInfos().map(e=>e.fileItem)}_onSelectedItemOpened(e){let{fileItemInfo:t}=e;const i=t.fileItem;if(!i.isDirectory)return void this._actions.onSelectedFileOpened({file:i});i.isParentFolder&&(this._itemKeyToFocus=this._getCurrentDirectory().fileItem.key);const r=i.isParentFolder?this._getCurrentDirectory().parentDirectory:t;this._setCurrentDirectory(r),r&&this._filesTreeView.toggleDirectoryExpandedState(r.parentDirectory,!0)}});let br=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.ath,z.POb,z.E9w,z.k5A,z.YC7,z.gmz,z.mjx,z.l4W,z.N7r,z.Lcs,f.p_,f.xZ,z.ath,z.POb,z.E9w,z.k5A,z.YC7,z.gmz,z.mjx,z.l4W,z.N7r,z.Lcs,f.xZ]})}return n})();var cr=M(6511),ds=M(8941);const Ss={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>Zs),multi:!0};let Zs=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get allowHierarchicalFields(){return this._getOption("allowHierarchicalFields")}set allowHierarchicalFields(t){this._setOption("allowHierarchicalFields",t)}get customOperations(){return this._getOption("customOperations")}set customOperations(t){this._setOption("customOperations",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get fields(){return this._getOption("fields")}set fields(t){this._setOption("fields",t)}get filterOperationDescriptions(){return this._getOption("filterOperationDescriptions")}set filterOperationDescriptions(t){this._setOption("filterOperationDescriptions",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get groupOperationDescriptions(){return this._getOption("groupOperationDescriptions")}set groupOperationDescriptions(t){this._setOption("groupOperationDescriptions",t)}get groupOperations(){return this._getOption("groupOperations")}set groupOperations(t){this._setOption("groupOperations",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get maxGroupLevel(){return this._getOption("maxGroupLevel")}set maxGroupLevel(t){this._setOption("maxGroupLevel",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onContentReady;onDisposing;onEditorPrepared;onEditorPreparing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;allowHierarchicalFieldsChange;customOperationsChange;disabledChange;elementAttrChange;fieldsChange;filterOperationDescriptionsChange;focusStateEnabledChange;groupOperationDescriptionsChange;groupOperationsChange;heightChange;hintChange;hoverStateEnabledChange;maxGroupLevelChange;rtlEnabledChange;tabIndexChange;valueChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get customOperationsChildren(){return this._getOption("customOperations")}set customOperationsChildren(t){this.setChildren("customOperations",t)}get fieldsChildren(){return this._getOption("fields")}set fieldsChildren(t){this.setChildren("fields",t)}constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"editorPrepared",emit:"onEditorPrepared"},{subscribe:"editorPreparing",emit:"onEditorPreparing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"allowHierarchicalFieldsChange"},{emit:"customOperationsChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"fieldsChange"},{emit:"filterOperationDescriptionsChange"},{emit:"focusStateEnabledChange"},{emit:"groupOperationDescriptionsChange"},{emit:"groupOperationsChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"maxGroupLevelChange"},{emit:"rtlEnabledChange"},{emit:"tabIndexChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new ds.A(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("customOperations",t),this.setupChanges("fields",t),this.setupChanges("groupOperations",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("customOperations"),this._idh.doCheck("fields"),this._idh.doCheck("groupOperations"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-filter-builder"]],contentQueries:function(i,r,m){if(1&i&&(S.wni(m,z.RZI,4),S.wni(m,z.H8D,4)),2&i){let A;S.mGM(A=S.lsd())&&(r.customOperationsChildren=A),S.mGM(A=S.lsd())&&(r.fieldsChildren=A)}},hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",allowHierarchicalFields:"allowHierarchicalFields",customOperations:"customOperations",disabled:"disabled",elementAttr:"elementAttr",fields:"fields",filterOperationDescriptions:"filterOperationDescriptions",focusStateEnabled:"focusStateEnabled",groupOperationDescriptions:"groupOperationDescriptions",groupOperations:"groupOperations",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",maxGroupLevel:"maxGroupLevel",rtlEnabled:"rtlEnabled",tabIndex:"tabIndex",value:"value",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onEditorPrepared:"onEditorPrepared",onEditorPreparing:"onEditorPreparing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",allowHierarchicalFieldsChange:"allowHierarchicalFieldsChange",customOperationsChange:"customOperationsChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",fieldsChange:"fieldsChange",filterOperationDescriptionsChange:"filterOperationDescriptionsChange",focusStateEnabledChange:"focusStateEnabledChange",groupOperationDescriptionsChange:"groupOperationDescriptionsChange",groupOperationsChange:"groupOperationsChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",maxGroupLevelChange:"maxGroupLevelChange",rtlEnabledChange:"rtlEnabledChange",tabIndexChange:"tabIndexChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,Ss,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),xd=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.MtA,z.yA4,z.Pxf,z.W6p,z.oCB,z.tWd,f.p_,f.xZ,z.MtA,z.yA4,z.Pxf,z.W6p,z.oCB,z.tWd,f.xZ]})}return n})();var bh=M(3425);const Iu={};let Eg;function Zj(n,e,t){Iu[n]=e,t&&(Eg=Iu[n])}const uX={getFigures:function(n){const e=1/n.length;return n.map(function(t,i,r){const m=r[i+1]?r[i+1]:r[i];return[.5-t/2,e*i,.5+t/2,e*i,.5+m/2,e*(i+1),.5-m/2,e*(i+1)]})},normalizeValues:function(n){const e=n.reduce(function(t,i){return Math.max(i.value,t)},n[0]&&n[0].value||0);return n.map(function(t){return t.value/e})}},pX=["normal","hover","selection","selection"];function pG(n,e,t){const i=e.border,r=t.border,m=(0,C.O9)(i.visible)?i.visible:r.visible,A=(0,C.O9)(i.width)?i.width:r.width;return{fill:n,hatching:e.hatching,stroke:i.color||r.color,"stroke-width":m?A:0}}function Qj(n,e){const t=e.data;this.code=0,this.widget=n,this.figure=e.figure,this.argument=t.argument,this.value=t.value,this.data=t.dataItem,this.percent=e.percent,this.id=e.id,this.color=e.color,this.states={normal:pG(e.color,e.itemOptions,e.itemOptions),hover:pG(e.color,e.itemOptions.hoverStyle,e.itemOptions),selection:pG(e.color,e.itemOptions.selectionStyle,e.itemOptions)}}Qj.prototype={getState:function(){return pX[this.code]},getNormalStyle:function(){return this.states.normal},setHover:function(){this.hover(!0)},hover:function(n){!this.widget._getOption("hoverEnabled",!0)||n===this.isHovered()||(this.widget._suspend(),n&&this.widget.clearHover(),this.setState(1,n),this.widget._eventTrigger("hoverChanged",{item:this}),this.widget._resume())},setState:function(n,e){e?this.code|=n:this.code&=~n,this.widget._applyTilesAppearance()},select:function(n){const e=this.widget._getOption("selectionMode",!0);"none"===e||n===this.isSelected()||(this.widget._suspend(),n&&"multiple"!==e&&this.widget.clearSelection(),this.setState(2,n),this.widget._eventTrigger("selectionChanged",{item:this}),this.widget._resume())},showTooltip:function(n){this.widget._showTooltip(this.id,n)},getColor:function(){return this.color},isHovered:function(){return!!(1&this.code)},isSelected:function(){return!!(2&this.code)}};const gX=Qj;function gG(n){return{fill:n.fill,hatching:n.hatching}}Zj("dynamicslope",uX,!0),Zj("dynamicheight",{getFigures:function(n,e,t){let i=0,r=0,m=0,A=0;const V=e/2,X=.5-V,ce=1-t,_e=.5-V,Me=.5+V;return n.map(function(Ve){return m=A,r=i,i+=Ve,A=X*i/ce,r<=ce&&i<=ce?[m,r,1-m,r,1-A,i,0+A,i]:r<=ce&&i>ce?[m,r,1-m,r,Me,ce,Me,i,_e,i,_e,ce]:[_e,r,Me,r,Me,i,_e,i]})},normalizeValues:function(n){const e=n.reduce(function(t,i){return t+i.value},0);return n.map(function(t){return t.value/e})}});const fG=Vh.inherit({_rootClass:"dxf-funnel",_rootClassPrefix:"dxf",_proxyData:[],_optionChangesMap:{dataSource:"DATA_SOURCE",neckWidth:"NODES_CREATE",neckHeight:"NODES_CREATE",inverted:"NODES_CREATE",algorithm:"NODES_CREATE",item:"NODES_CREATE",valueField:"NODES_CREATE",argumentField:"NODES_CREATE",colorField:"NODES_CREATE",palette:"NODES_CREATE",paletteExtensionMode:"NODES_CREATE",sortData:"NODES_CREATE"},_themeDependentChanges:["NODES_CREATE"],_getDefaultSize:function(){return{width:400,height:400}},_themeSection:"funnel",_fontFields:["legend.title.font","legend.title.subtitle.font","legend.font"],_optionChangesOrder:["DATA_SOURCE"],_initialChanges:["DATA_SOURCE"],_initCore:function(){this._group=this._renderer.g().append(this._renderer.root),this._items=[]},_eventsMap:{onHoverChanged:{name:"hoverChanged"},onSelectionChanged:{name:"selectionChanged"}},_disposeCore:h.lQ,_applySize:function(n){return this._rect=n.slice(),this._change(["TILING"]),this._rect},_getAlignmentRect:function(){return this._rect},_change_TILING:function(){const n=this,e=n._items,t=n._rect,i=function(r,m){const A=m%2;return t[0+A]+(t[2+A]-t[0+A])*r};this._group.clear(),e.forEach(function(r,m){const A=r.figure.map(i),V=n._renderer.path([],"area").attr({points:A}).append(n._group);r.coords=A,r.element=V}),this._requestChange(["TILES"])},_customChangesOrder:["NODES_CREATE","LAYOUT","TILING","TILES","DRAWN"],_dataSourceChangedHandler:function(){this._requestChange(["NODES_CREATE"])},_change_DRAWN:function(){this._drawn()},_change_DATA_SOURCE:function(){this._change(["DRAWN"]),this._updateDataSource()},_change_NODES_CREATE:function(){this._buildNodes()},_change_TILES:function(){this._applyTilesAppearance()},_suspend:function(){this._applyingChanges||this._suspendChanges()},_resume:function(){this._applyingChanges||this._resumeChanges()},_applyTilesAppearance:function(){this._items.forEach(function(n){const e=n.getState();n.element.smartAttr(n.states[e])})},_hitTestTargets:function(n,e){const t=this;let i;return this._proxyData.some(function(r){if(i=r.call(t,n,e),i)return!0}),i},clearHover:function(){this._suspend(),this._items.forEach(function(n){n.isHovered()&&n.hover(!1)}),this._resume()},clearSelection:function(){this._suspend(),this._items.forEach(function(n){n.isSelected()&&n.select(!1)}),this._resume()},_getData:function(){const n=this,e=n._dataSourceItems()||[],t=n._getOption("valueField",!0),i=n._getOption("argumentField",!0),r=n._getOption("colorField",!0),m=e.reduce(function(V,X){const ce=Number(X[t]);return ce>=0&&(V[0].push({value:ce,color:X[r],argument:X[i],dataItem:X}),V[1]+=ce),V},[[],0]),A=m[0];return e.length>0&&0===A.length&&n._incidentOccurred("E2005",t),m[1]?(n._getOption("sortData",!0)&&A.sort(function(V,X){return X.value-V.value}),A):[]},_buildNodes:function(){const n=this,e=n._getData(),t=function kS(n){return Iu[Wi(n)]||Eg}(n._getOption("algorithm",!0)),i=t.normalizeValues(e),r=n._getOption("item"),m=t.getFigures(i,n._getOption("neckWidth",!0),n._getOption("neckHeight",!0)),A=n._themeManager.createPalette(n._getOption("palette",!0),{useHighlight:!0,extensionMode:n._getOption("paletteExtensionMode",!0),count:m.length});n._items=m.map(function(V,X){const ce=e[X];return new gX(n,{figure:V,data:ce,percent:i[X],id:X,color:ce.color||A.getNextColor(),itemOptions:r})}),n._getOption("inverted",!0)&&n._items.forEach(function(V){V.figure=function fX(n){return n.map(function(e,t){return t%2?1-e:e})}(V.figure)}),n._renderer.initDefsElements(),n._change(["TILING","DRAWN"])},_showTooltip:h.lQ,hideTooltip:h.lQ,getAllItems:function(){return this._items.slice()},_getLegendData(){return this._items.map(n=>{const e=n.states;return{id:n.id,visible:!0,text:n.argument,item:n,states:{normal:gG(e.normal),hover:gG(e.hover),selection:gG(e.selection)}}})},_getMinSize:function(){const n=this._getOption("adaptiveLayout");return[n.width,n.height]}});(0,y.A)("dxFunnel",fG);const Dw=fG;fG.addPlugin(cs);const mG="outside";function YI(n){return(n=Wi(n))===mG||"inside"!==n}function OH(n,e,t){return t?n-e.height:n}function _X(n,e,t,i){return{x:n[2]+t.horizontalOffset+5,y:OH(n[3]+t.verticalOffset,e,i)}}function vX(n,e,t,i){return{x:n[0]-e.width-t.horizontalOffset-5,y:OH(n[1]+t.verticalOffset,e,i)}}function CX(n,e,t){return{x:n[0]+(n[2]-n[0])/2+t.horizontalOffset-e.width/2,y:n[1]+t.verticalOffset+(n[7]-n[1])/2-e.height/2}}const wX={name:"lables",init:h.lQ,dispose:h.lQ,extenders:{_initCore:function(){this._labelsGroup=this._renderer.g().attr({class:this._rootClassPrefix+"-labels"}).append(this._renderer.root),this._labels=[]},_applySize:function(){const n=this._getOption("label"),e=this._getOption("adaptiveLayout"),t=this._rect;let i=0;const r=t[2]-t[0];this._labelRect=t.slice(),this._labels.length&&YI(n.position)?(i=this._labels.map(function(A){return A.resetEllipsis(),A.getBoundingRect().width}).reduce(function(A,V){return Math.max(A,V)},0)+n.horizontalOffset+function mX(n){return(n=Wi(n))===mG?5:"inside"===n?0:20}(n.position),!e.keepLabels&&r-i<e.width?this._labels.forEach(function(A){A.draw(!1)}):(r-i<e.width&&(i=r-e.width,i=i>0?i:0),this._labels.forEach(function(A){A.draw(!0)}),"left"===n.horizontalAlignment?t[0]+=i:t[2]-=i)):Wi("none"!==this._getOption("resolveLabelOverlapping",!0))&&this._labels.forEach(A=>!A.isVisible()&&A.draw(!0))},_buildNodes:function(){this._createLabels()},_change_TILING:function(){const n=this,e=n._getOption("label");let t=CX;const i=n._getOption("inverted",!0);let r;YI(e.position)&&(Wi(e.position)===mG?t="left"===e.horizontalAlignment?vX:_X:(r=this._defaultLabelTextAlignment(),t="left"===e.horizontalAlignment?function bX(n,e,t){return function(i,r,m,A){return{x:"left"===t?n[0]:e[0]-r.width-m.horizontalOffset-20,y:OH(i[3]+m.verticalOffset,r,A)}}}(this._labelRect,this._rect,r):function yX(n,e,t){return function(i,r,m,A){return{x:"left"===t?e[2]+m.horizontalOffset+20:n[2]-r.width,y:OH(i[3]+m.verticalOffset,r,A)}}}(this._labelRect,this._rect,r))),n._labels.forEach(function(m,A){const V=n._items[A],X=V.getNormalStyle()["stroke-width"],ce=i?X/2:-X/2,_e=ce?V.coords.map(function(Je,rt){return 1===rt||3===rt?Je-ce:2===rt?Je-X:0===rt?Je+X:Je}):V.coords;if(!e.showForZeroValues&&0===V.value)return void m.draw(!1);YI(e.position)&&n._correctLabelWidth(m,V.coords,e);const Me=m.getBoundingRect(),Ve=function EX(n,e,t){return n.x<t[0]&&(n.x=t[0]),n.x+e.width>t[2]&&(n.x=t[2]-e.width),n.y<t[1]&&(n.y=t[1]),n.y+e.height>t[3]&&(n.y=t[3]-e.height),n}(t(_e,Me,e,i),Me,n._labelRect);m.setFigureToDrawConnector(_e),m.shift(Ve.x,Ve.y)}),n._resolveLabelOverlapping()}},members:{_resolveLabelOverlapping(){const n=this,e=Wi(n._getOption("resolveLabelOverlapping",!0)),t=this._getOption("inverted",!0)?n._labels.slice().reverse():n._labels;if("hide"===e)t.reduce((i,r)=>(r.getBoundingRect().y<i?r.hide():i=r.getBoundingRect().y+r.getBoundingRect().height,i),0);else if("shift"===e){const i=this._labelRect[3];t.filter(r=>r.isVisible()).reduce((r,m,A,V)=>{let[X,ce]=r;const _e=m.getBoundingRect();let Me=_e.y;return _e.y<X&&(m.shift(_e.x,X),Me=X),Me-X>0&&(ce+=Me-X),Me+_e.height>i?ce&&ce>Me+_e.height-i?(function OX(n,e,t){n.reduce((i,r,m,A)=>{const V=A[m+1];if(i>0){const X=r.getBoundingRect(),ce=V?V.getBoundingRect().y+V.getBoundingRect().height:t,Me=Math.min(X.y-ce,i);A.slice(0,m+1).forEach(Ve=>{const Je=Ve.getBoundingRect();Ve.shift(Je.x,Je.y-Me)}),i-=Me}return i},e)}(V.slice(0,A).reverse(),Me+_e.height-i,n._labelRect[1]),ce-=Me+_e.height-i,m.shift(_e.x,Me-(Me+_e.height-i)),X=Me-(Me+_e.height-i)+_e.height):m.hide():X=Me+_e.height,[X,ce]},[this._labelRect[1],0])}},_defaultLabelTextAlignment:function(){return this._getOption("rtlEnabled",!0)?"right":"left"},_correctLabelWidth:function(n,e,t){const i="left"===t.horizontalAlignment,A=(i?e[0]:this._labelRect[2])-(i?this._labelRect[0]:e[2]);n.getBoundingRect().width>A&&n.fit(A)},_createLabels:function(){const n=this,e=n._getOption("label"),t=function xX(n,e){const t="left"===n.horizontalAlignment,i=t?4:-4,r=e?-1:0;function m(A){return t?[A[0]+1,A[1]+r]:[A[2]-1,A[3]+r]}return{isLabelInside:function(){return!YI(n.position)},getFigureCenter:m,prepareLabelPoints:function(A){const V=A.x+i,X=A.y,ce=V+A.width;return[...Array(A.height+1)].map((_e,Me)=>[V,X+Me]).concat([...Array(A.height+1)].map((_e,Me)=>[ce,X+Me]))},isHorizontal:function(){return!0},findFigurePoint:function(A){return m(A)},adjustPoints:function(A){return A.map(Math.round)}}}(e,n._getOption("inverted",!0));this._labelsGroup.clear(),e.visible&&(this._labels=n._items.map(function(i){const r=new ef({renderer:n._renderer,labelsGroup:n._labelsGroup,strategy:t});return r.setOptions(function SX(n,e,t){const i=n||{},r=(0,_.X)({},i.font)||{},m=i.border||{},A=i.connector||{},V={fill:i.backgroundColor||e,"stroke-width":m.visible&&m.width||0,stroke:m.visible&&m.width?m.color:"none",dashStyle:m.dashStyle},X={stroke:A.visible&&A.width?A.color||e:"none","stroke-width":A.visible&&A.width||0,opacity:A.opacity};return r.color="none"===i.backgroundColor&&"#ffffff"===Wi(r.color)&&"inside"!==i.position?e:r.color,{format:i.format,textAlignment:i.textAlignment||(YI(i.position)?t:"center"),customizeText:i.customizeText,attributes:{font:r},visible:0!==r.size&&i.visible,showForZeroValues:i.showForZeroValues,horizontalOffset:i.horizontalOffset,verticalOffset:i.verticalOffset,background:V,connector:X,wordWrap:n.wordWrap,textOverflow:n.textOverflow}}(e,i.color,n._defaultLabelTextAlignment())),r.setData({item:i,value:i.value,percent:i.percent}),r.draw(!0),r}),this._labels.length&&YI(e.position)&&this._requestChange(["LAYOUT"]))}},customize:function(n){n.prototype._proxyData.push(function(e,t){const i=this;let r;return i._labels.forEach(function(m,A){const V=m.getBoundingRect();if(e>=V.x&&e<=V.x+V.width&&t>=V.y&&t<=V.y+V.height){const X=YI(i._getOption("label").position)?"outside":"inside";return r={id:A,type:X+"-label"},!0}}),r}),["label","resolveLabelOverlapping"].forEach(e=>{n.addChange({code:e.toUpperCase(),handler:function(){this._createLabels(),this._requestChange(["LAYOUT"])},isThemeDependent:!0,isOptionChange:!0,option:e})})},fontFields:["label.font"]},wH=Si.A.down,qj=Si.A.move;function GF(n){this._initHandlers(n)}GF.prototype={constructor:GF,_initHandlers:function(n){const e=c.A.getDocument();function t(A){!function TX(n,e){const t=e.getData(n);t>=0&&e.click({node:e.getNode(t),coords:e.getCoords(n),event:n})}(A,n)}n.getCoords=function(A){const V=(0,N.rw)(A),X=n.widget._renderer.getRootOffset();return[V.x-X.left,V.y-X.top]},n.root.on(I.U,t),n.root.on(wH,r),L.A.on(e,wH,r),L.A.on(e,qj,m),this._disposeHandlers=function(){n.root.off(I.U,t),n.root.off(wH,r),L.A.off(e,wH,r),L.A.off(e,qj,m)};let i=!1;function r(A){i?i=!1:(void 0!==n.getData(A)&&(i=!0),m(A))}function m(A){(function DX(n,e){const t=e.getData(n);t>=0?e.getNode(t).setHover():e.widget.clearHover()})(A,n),n.widget._getOption("tooltip").enabled&&function AX(n,e){const t=e.getData(n,!0);let i;t>=0?(i=(0,N.rw)(n),e.getNode(t).showTooltip([i.x,i.y])):e.widget.hideTooltip()}(A,n)}},dispose:function(){this._disposeHandlers()}};let PX=0;const e3=Dw.prototype;e3._eventsMap.onItemClick={name:"itemClick"},e3._eventsMap.onLegendClick={name:"legendClick"};const RX={name:"tracker",init:function(){const n=this,e="__funnel_data_"+PX++,t=function(i){const r=n._renderer.getRootOffset(),m=Math.floor(i.pageX-r.left),A=Math.floor(i.pageY-r.top);return n._hitTestTargets(m,A)};n._tracker=new GF({widget:n,root:n._renderer.root,getData:function(i,r){const A=i.target[e];if((0,C.O9)(A))return A;const V=t(i);return r&&V&&"inside-label"!==V.type?void 0:V&&V.id},getNode:function(i){return n._items[i]},click:function(i){const r=t(i.event);n._eventTrigger("legend"===(r&&r.type)?"legendClick":"itemClick",{item:i.node,event:i.event})}}),this._dataKey=e},dispose:function(){this._tracker.dispose()},extenders:{_change_TILING:function(){const n=this._dataKey;this._items.forEach(function(e,t){e.element.data(n,t)})}}};function t3(n,e,t){const i=t.getRootOffset();return n||e&&[(e[0]+e[2])/2+i.left,(e[1]+e[5])/2+i.top]||[-1e3,-1e3]}const kX={name:"funnel-tooltip",init:h.lQ,dispose:h.lQ,extenders:{_buildNodes:function(){this.hideTooltip()},_change_TILING:function(){this._tooltipIndex>=0&&this._moveTooltip(this._items[this._tooltipIndex])}},members:{hideTooltip:function(){this._tooltipIndex>=0&&(this._tooltipIndex=-1,this._tooltip.hide())},_moveTooltip:function(n,e){const t=t3(e,n.coords,this._renderer);this._tooltip.move(t[0],t[1],0)},_showTooltip:function(n,e){const t=this,i=t._tooltip,r=t._items[n];if(t._tooltipIndex===n)return void t._moveTooltip(r,e);const m=V=>{void 0!==V&&(V||i.hide(),t._tooltipIndex=V?n:-1)},A=t3(e,r.coords,this._renderer);m(i.show({value:r.value,valueText:i.formatValue(r.value),percentText:i.formatValue(r.percent,"percent"),percent:r.percent,item:r},{x:A[0],y:A[1],offset:0},{item:r},void 0,m))}},customize:function(n){n.addPlugin(qy)}};Dw.addPlugin(wX),Dw.addPlugin(bv),Dw.addPlugin(Xp),Dw.addPlugin(Ui),Dw.addPlugin(RX),Dw.addPlugin(kX),Dw.addPlugin(LC);let n3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.uvP,z.uIe,z.zd$,z.A1g,z.lWu,z.Af1,z.$jZ,z.uE7,z.tML,z.r2Z,z.Pxf,z.F1M,z.Yh3,z.sVF,z.YkV,z.FXg,z.hzo,z.Vku,z.cug,f.p_,f.xZ,z.uvP,z.uIe,z.zd$,z.A1g,z.lWu,z.Af1,z.$jZ,z.uE7,z.tML,z.r2Z,z.Pxf,z.F1M,z.Yh3,z.sVF,z.YkV,z.FXg,z.hzo,z.Vku,z.cug,f.xZ]})}return n})();var i3=M(7421);const LX_create=n=>({NotifyTaskCreated:(e,t,i)=>{n._onRecordInserted("tasks",e,t)},NotifyTaskRemoved:(e,t,i)=>{n._onRecordRemoved("tasks",e,i)},NotifyTaskUpdated:(e,t,i)=>{n._onRecordUpdated("tasks",e,t)},NotifyParentTaskUpdated:(e,t)=>{n._onParentTaskUpdated(e)},NotifyDependencyInserted:(e,t,i)=>{n._onRecordInserted("dependencies",e,t)},NotifyDependencyRemoved:(e,t,i)=>{n._onRecordRemoved("dependencies",e,i)},NotifyResourceCreated:(e,t,i)=>{n._onRecordInserted("resources",e,t)},NotifyResourceRemoved:(e,t,i)=>{n._onRecordRemoved("resources",e,i)},NotifyResourceAssigned:(e,t,i)=>{n._onRecordInserted("resourceAssignments",e,t)},NotifyResourceUnassigned:(e,t,i)=>{n._onRecordRemoved("resourceAssignments",e,i)},NotifyParentDataRecalculated:e=>{n._onParentTasksRecalculated(e)},NotifyTaskCreating:e=>{n._actionsManager.raiseInsertingAction("tasks",e)},NotifyTaskRemoving:e=>{n._actionsManager.raiseDeletingAction("tasks",e)},NotifyTaskUpdating:e=>{n._actionsManager.raiseUpdatingAction("tasks",e)},NotifyTaskMoving:e=>{n._actionsManager.raiseUpdatingAction("tasks",e,n._actionsManager.getTaskMovingAction())},NotifyTaskEditDialogShowing:e=>{n._actionsManager.raiseTaskEditDialogShowingAction(e)},NotifyResourceManagerDialogShowing:e=>{n._actionsManager.raiseResourceManagerDialogShowingAction(e)},NotifyDependencyInserting:e=>{n._actionsManager.raiseInsertingAction("dependencies",e)},NotifyDependencyRemoving:e=>{n._actionsManager.raiseDeletingAction("dependencies",e)},NotifyResourceCreating:e=>{n._actionsManager.raiseInsertingAction("resources",e)},NotifyResourceRemoving:e=>{n._actionsManager.raiseDeletingAction("resources",e)},NotifyResourceAssigning:e=>{n._actionsManager.raiseInsertingAction("resourceAssignments",e)},NotifyResourceUnassigning:e=>{n._actionsManager.raiseDeletingAction("resourceAssignments",e)},NotifyScaleCellPrepared:e=>{n._actionsManager.raiseScaleCellPreparedAction(e)},NotifyGanttViewUpdated:()=>{n._onGanttViewCoreUpdated()}});class o3 extends CS.u{constructor(e,t,i){super(),this._optionName=e,this._getLoadPanel=t,this._dataSourceChangedCallback=i}insert(e,t,i){this._showLoadPanel(),this._getStore().insert(e).done(r=>{t&&t(r),this._hideLoadPanel()}).fail(r=>{i&&i(r),this._hideLoadPanel()})}update(e,t,i,r){this._showLoadPanel(),this._getStore().update(e,t).done((m,A)=>{i&&i(m,A),this._hideLoadPanel()}).fail(m=>{r&&r(m),this._hideLoadPanel()})}remove(e,t,i){this._showLoadPanel(),this._getStore().remove(e).done(r=>{t&&t(r),this._hideLoadPanel()}).fail(r=>{i&&i(r),this._hideLoadPanel()})}_dataSourceChangedHandler(e,t){this._dataSourceChangedCallback(this._optionName,e)}_dataSourceOptions(){return{paginate:!1}}_dataSourceLoadingChangedHandler(e){e&&!this._dataSource.isLoaded()?this._showLoadPanel():this._hideLoadPanel()}_showLoadPanel(){var e;null===(e=this._getLoadPanel())||void 0===e||e.show()}_hideLoadPanel(){var e;null===(e=this._getLoadPanel())||void 0===e||e.hide()}_getStore(){return this._dataSource.store()}_getItems(){return this._getStore()._array||this._dataSource.items()}_reloadDataSource(){return this._dataSource.load()}dispose(){this._disposeDataSource()}_optionChanged(e){}}o3.include(Do.A);const BX=o3;var r3=M(7281);class NX{constructor(e){this._gantt=e,this._mappingHelper=e._mappingHelper,this._customFieldsManager=e._customFieldsManager}_createActionByOption(e){return this._gantt._createActionByOption(e)}_getTaskData(e){return this._gantt.getTaskData(e)}_convertCoreToMappedData(e,t){return this._mappingHelper.convertCoreToMappedData(e,t)}_convertMappedToCoreData(e,t){return this._mappingHelper.convertMappedToCoreData(e,t)}_convertMappedToCoreFields(e,t){return this._mappingHelper.convertMappedToCoreFields(e,t)}_convertCoreToMappedFields(e,t){return this._mappingHelper.convertCoreToMappedFields(e,t)}_saveCustomFieldsDataToCache(e,t){this._customFieldsManager.saveCustomFieldsDataToCache(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3])}createTaskDblClickAction(){this._taskDblClickAction=this._createActionByOption("onTaskDblClick")}taskDblClickAction(e){this._taskDblClickAction||this.createTaskDblClickAction(),this._taskDblClickAction(e)}raiseTaskDblClickAction(e,t){const i={cancel:!1,data:this._getTaskData(e),event:t,key:e};return this.taskDblClickAction(i),!i.cancel}createTaskClickAction(){this._taskClickAction=this._createActionByOption("onTaskClick")}taskClickAction(e){this._taskClickAction||this.createTaskClickAction(),this._taskClickAction(e)}raiseTaskClickAction(e,t){const i={key:e,event:t,data:this._getTaskData(e)};this.taskClickAction(i)}createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")}selectionChangedAction(e){this._selectionChangedAction||this.createSelectionChangedAction(),this._selectionChangedAction(e)}raiseSelectionChangedAction(e){this.selectionChangedAction({selectedRowKey:e})}createCustomCommandAction(){this._customCommandAction=this._createActionByOption("onCustomCommand")}customCommandAction(e){this._customCommandAction||this.createCustomCommandAction(),this._customCommandAction(e)}raiseCustomCommand(e){this.customCommandAction({name:e})}createContextMenuPreparingAction(){this._contextMenuPreparingAction=this._createActionByOption("onContextMenuPreparing")}contextMenuPreparingAction(e){this._contextMenuPreparingAction||this.createContextMenuPreparingAction(),this._contextMenuPreparingAction(e)}raiseContextMenuPreparing(e){this.contextMenuPreparingAction(e)}_getInsertingAction(e){switch(e){case"tasks":return this._getTaskInsertingAction();case"dependencies":return this._getDependencyInsertingAction();case"resources":return this._getResourceInsertingAction();case"resourceAssignments":return this._getResourceAssigningAction()}return()=>{}}raiseInsertingAction(e,t){const i=this._getInsertingAction(e);if(i){const r={cancel:!1,values:this._convertCoreToMappedData(e,t.values)};i(r),t.cancel=r.cancel,(0,_.X)(t.values,this._convertMappedToCoreData(e,r.values)),"tasks"===e&&this._saveCustomFieldsDataToCache("gantt_new_task_key",r.values)}}createTaskInsertingAction(){this._taskInsertingAction=this._createActionByOption("onTaskInserting")}taskInsertingAction(e){this._getTaskInsertingAction()(e)}_getTaskInsertingAction(){return this._taskInsertingAction||this.createTaskInsertingAction(),this._taskInsertingAction}createDependencyInsertingAction(){this._dependencyInsertingAction=this._createActionByOption("onDependencyInserting")}dependencyInsertingAction(e){this._getDependencyInsertingAction()(e)}_getDependencyInsertingAction(){return this._dependencyInsertingAction||this.createDependencyInsertingAction(),this._dependencyInsertingAction}createResourceInsertingAction(){this._resourceInsertingAction=this._createActionByOption("onResourceInserting")}resourceInsertingAction(e){this._getResourceInsertingAction()(e)}_getResourceInsertingAction(){return this._resourceInsertingAction||this.createResourceInsertingAction(),this._resourceInsertingAction}createResourceAssigningAction(){this._resourceAssigningAction=this._createActionByOption("onResourceAssigning")}resourceAssigningAction(e){this._getResourceAssigningAction()(e)}_getResourceAssigningAction(){return this._resourceAssigningAction||this.createResourceAssigningAction(),this._resourceAssigningAction}_getInsertedAction(e){switch(e){case"tasks":return this._getTaskInsertedAction();case"dependencies":return this._getDependencyInsertedAction();case"resources":return this._getResourceInsertedAction();case"resourceAssignments":return this._getResourceAssignedAction()}return()=>{}}raiseInsertedAction(e,t,i){const r=this._getInsertedAction(e);r&&r({values:t,key:i})}createTaskInsertedAction(){this._taskInsertedAction=this._createActionByOption("onTaskInserted")}taskInsertedAction(e){this._getTaskInsertedAction()(e)}_getTaskInsertedAction(){return this._taskInsertedAction||this.createTaskInsertedAction(),this._taskInsertedAction}createDependencyInsertedAction(){this._dependencyInsertedAction=this._createActionByOption("onDependencyInserted")}dependencyInsertedAction(e){this._getDependencyInsertedAction()(e)}_getDependencyInsertedAction(){return this._dependencyInsertedAction||this.createDependencyInsertedAction(),this._dependencyInsertedAction}createResourceInsertedAction(){this._resourceInsertedAction=this._createActionByOption("onResourceInserted")}resourceInsertedAction(e){this._getResourceInsertedAction()(e)}_getResourceInsertedAction(){return this._resourceInsertedAction||this.createResourceInsertedAction(),this._resourceInsertedAction}createResourceAssignedAction(){this._resourceAssignedAction=this._createActionByOption("onResourceAssigned")}resourceAssignedAction(e){this._getResourceAssignedAction()(e)}_getResourceAssignedAction(){return this._resourceAssignedAction||this.createResourceAssignedAction(),this._resourceAssignedAction}_getDeletingAction(e){switch(e){case"tasks":return this._getTaskDeletingAction();case"dependencies":return this._getDependencyDeletingAction();case"resources":return this._getResourceDeletingAction();case"resourceAssignments":return this._getResourceUnassigningAction()}return()=>{}}raiseDeletingAction(e,t){const i=this._getDeletingAction(e);if(i){const r={cancel:!1,key:t.key,values:this._convertCoreToMappedData(e,t.values)};i(r),t.cancel=r.cancel}}createTaskDeletingAction(){this._taskDeletingAction=this._createActionByOption("onTaskDeleting")}taskDeletingAction(e){this._getTaskDeletingAction()(e)}_getTaskDeletingAction(){return this._taskDeletingAction||this.createTaskDeletingAction(),this._taskDeletingAction}createDependencyDeletingAction(){this._dependencyDeletingAction=this._createActionByOption("onDependencyDeleting")}dependencyDeletingAction(e){this._getDependencyDeletingAction()(e)}_getDependencyDeletingAction(){return this._dependencyDeletingAction||this.createDependencyDeletingAction(),this._dependencyDeletingAction}createResourceDeletingAction(){this._resourceDeletingAction=this._createActionByOption("onResourceDeleting")}resourceDeletingAction(e){this._getResourceDeletingAction()(e)}_getResourceDeletingAction(){return this._resourceDeletingAction||this.createResourceDeletingAction(),this._resourceDeletingAction}createResourceUnassigningAction(){this._resourceUnassigningAction=this._createActionByOption("onResourceUnassigning")}resourceUnassigningAction(e){this._getResourceUnassigningAction()(e)}_getResourceUnassigningAction(){return this._resourceUnassigningAction||this.createResourceUnassigningAction(),this._resourceUnassigningAction}_getDeletedAction(e){switch(e){case"tasks":return this._getTaskDeletedAction();case"dependencies":return this._getDependencyDeletedAction();case"resources":return this._getResourceDeletedAction();case"resourceAssignments":return this._getResourceUnassignedAction()}return()=>{}}raiseDeletedAction(e,t,i){const r=this._getDeletedAction(e);r&&r({key:t,values:i})}createTaskDeletedAction(){this._taskDeletedAction=this._createActionByOption("onTaskDeleted")}taskDeletedAction(e){this._getTaskDeletedAction()(e)}_getTaskDeletedAction(){return this._taskDeletedAction||this.createTaskDeletedAction(),this._taskDeletedAction}createDependencyDeletedAction(){this._dependencyDeletedAction=this._createActionByOption("onDependencyDeleted")}dependencyDeletedAction(e){this._getDependencyDeletedAction()(e)}_getDependencyDeletedAction(){return this._dependencyDeletedAction||this.createDependencyDeletedAction(),this._dependencyDeletedAction}createResourceDeletedAction(){this._resourceDeletedAction=this._createActionByOption("onResourceDeleted")}resourceDeletedAction(e){this._getResourceDeletedAction()(e)}_getResourceDeletedAction(){return this._resourceDeletedAction||this.createResourceDeletedAction(),this._resourceDeletedAction}createResourceUnassignedAction(){this._resourceUnassignedAction=this._createActionByOption("onResourceUnassigned")}resourceUnassignedAction(e){this._getResourceUnassignedAction()(e)}_getResourceUnassignedAction(){return this._resourceUnassignedAction||this.createResourceUnassignedAction(),this._resourceUnassignedAction}_getUpdatingAction(e){return"tasks"===e?this._getTaskUpdatingAction():()=>{}}raiseUpdatingAction(e,t,i){if(i=i||this._getUpdatingAction(e)){const r="tasks"===e,m={cancel:!1,key:t.key,newValues:this._convertCoreToMappedData(e,t.newValues),values:r?this._getTaskData(t.key):this._convertCoreToMappedData(e,t.values)};if(r&&this._customFieldsManager.cache.hasData(m.key)&&this._customFieldsManager.addCustomFieldsDataFromCache(m.key,m.newValues),i(m),t.cancel=m.cancel,(0,_.X)(t.newValues,this._convertMappedToCoreData(e,m.newValues)),r)if(m.cancel)this._customFieldsManager.resetCustomFieldsDataCache(m.key);else{const A=!Object.keys(t.newValues).length;this._saveCustomFieldsDataToCache(m.key,m.newValues,A)}}}createTaskUpdatingAction(){this._taskUpdatingAction=this._createActionByOption("onTaskUpdating")}taskUpdatingAction(e){this._getTaskUpdatingAction()(e)}_getTaskUpdatingAction(){return this._taskUpdatingAction||this.createTaskUpdatingAction(),this._taskUpdatingAction}_getUpdatedAction(e){return"tasks"===e?this._getTaskUpdatedAction():()=>{}}raiseUpdatedAction(e,t,i){const r=this._getUpdatedAction(e);r&&r({values:t,key:i})}createTaskUpdatedAction(){this._taskUpdatedAction=this._createActionByOption("onTaskUpdated")}taskUpdatedAction(e){this._getTaskUpdatedAction()(e)}_getTaskUpdatedAction(){return this._taskUpdatedAction||this.createTaskUpdatedAction(),this._taskUpdatedAction}createTaskEditDialogShowingAction(){this._taskEditDialogShowingAction=this._createActionByOption("onTaskEditDialogShowing")}taskEditDialogShowingAction(e){this._getTaskEditDialogShowingAction()(e)}_getTaskEditDialogShowingAction(){return this._taskEditDialogShowingAction||this.createTaskEditDialogShowingAction(),this._taskEditDialogShowingAction}raiseTaskEditDialogShowingAction(e){const t=this._getTaskEditDialogShowingAction();if(t){const i={cancel:!1,key:e.key,values:this._convertCoreToMappedData("tasks",e.values),readOnlyFields:this._convertCoreToMappedFields("tasks",e.readOnlyFields),hiddenFields:this._convertCoreToMappedFields("tasks",e.hiddenFields)};t(i),e.cancel=i.cancel,(0,_.X)(e.values,this._convertMappedToCoreData("tasks",i.values)),e.readOnlyFields=this._convertMappedToCoreFields("tasks",i.readOnlyFields),e.hiddenFields=this._convertMappedToCoreFields("tasks",i.hiddenFields)}}createResourceManagerDialogShowingAction(){this._resourceManagerDialogShowingAction=this._createActionByOption("onResourceManagerDialogShowing")}resourceManagerDialogShowingAction(e){this._getResourceManagerDialogShowingAction()(e)}_getResourceManagerDialogShowingAction(){return this._resourceManagerDialogShowingAction||this.createResourceManagerDialogShowingAction(),this._resourceManagerDialogShowingAction}raiseResourceManagerDialogShowingAction(e){const t=this._getResourceManagerDialogShowingAction();if(t){const r={cancel:!1,values:e.values.resources.items.map(m=>this._convertMappedToCoreData("resources",m))};t(r),e.cancel=r.cancel}}createTaskMovingAction(){this._taskMovingAction=this._createActionByOption("onTaskMoving")}taskMovingAction(e){this.getTaskMovingAction()(e)}getTaskMovingAction(){return this._taskMovingAction||this.createTaskMovingAction(),this._taskMovingAction}getScaleCellPreparedAction(){return this._scaleCellPreparedAction||this.createScaleCellPreparedAction(),this._scaleCellPreparedAction}createScaleCellPreparedAction(){this._scaleCellPreparedAction=this._createActionByOption("onScaleCellPrepared")}raiseScaleCellPreparedAction(e){const t=this.getScaleCellPreparedAction();t&&t({scaleIndex:e.scaleIndex,scaleType:this._getScaleType(e.scaleType),scaleElement:(0,s.cc)((0,a.A)(e.scaleElement)),separatorElement:(0,s.cc)((0,a.A)(e.separatorElement)),startDate:new Date(e.start),endDate:new Date(e.end)})}_getScaleType(e){switch(e){case 0:return"minutes";case 1:return"hours";case 2:return"sixHours";case 3:return"days";case 4:return"weeks";case 5:return"months";case 6:return"quarters";case 7:return"years";case 8:return"fiveYears";default:return}}}class FX{constructor(){this._cache={},this._timers={}}saveData(e,t,i){if(t){this._clearTimer(e);const r=this._getCache(e,!0);(0,_.a)(r,t,!0),i&&this._setExpireTimer(e,i)}}pullDataFromCache(e,t){const i=this._getCache(e);i&&(0,_.a)(t,i),this._onKeyExpired(e)}hasData(e){return!!this._cache[e]}resetCache(e){this._onKeyExpired(e)}_getCache(e,t){return!this._cache[e]&&t&&(this._cache[e]={}),this._cache[e]}_setExpireTimer(e,t){this._timers[e]=setTimeout(()=>{t(e,this._getCache(e)),this._onKeyExpired(e)},200)}_onKeyExpired(e){this._clearCache(e),this._clearTimer(e)}_clearCache(e){delete this._cache[e]}_clearTimer(e){const t=this._timers;t&&t[e]&&(clearTimeout(t[e]),delete t[e])}}const Pu={prepareMapHandler:n=>e=>Object.keys(n).reduce((t,i)=>(t["key"===i?"id":i]=n[i](e),t),{}),prepareSetterMapHandler:n=>e=>Object.keys(n).reduce((t,i)=>(n[i](t,e["key"===i?"id":i]),t),{}),compileGettersByOption(n){const e={};for(const t in n){const i=t.match(/(\w*)Expr/);i&&(e[i[1]]=(0,fa.Hz)(n[i[0]]))}return e},compileSettersByOption(n){const e={};for(const t in n){const i=t.match(/(\w*)Expr/);i&&!(0,C.Tn)(n[i[0]])&&(e[i[1]]=(0,fa.vL)(n[i[0]]))}return e},compileFuncSettersByOption(n){const e={};for(const t in n){const i=t.match(/(\w*)Expr/);i&&(0,C.Tn)(n[i[0]])&&(e[i[1]]=n[i[0]])}return e},getStoreObject(n,e){const t=Pu.compileSettersByOption(n);return Object.keys(t).reduce((i,r)=>("key"!==r&&t[r](i,e[r]),i),{})},getInvertedData(n,e){const t={};if(n)for(let i=0;i<n.length;i++){const r=n[i];t[e(r)]=r}return t},getArrayFromOneElement:n=>null==n?[]:[n],getSelectionMode:n=>n?"single":"none",convertTreeToList(n,e){null!=n&&n.data&&null!=n&&n.visible&&e.push(n.data);for(let i=0;i<(null===(t=n.children)||void 0===t?void 0:t.length);i++){var t;Pu.convertTreeToList(n.children[i],e)}},getAllParentNodesKeys(n,e){var t;null!=n&&n.data&&e.push(n.key),null!=n&&null!==(t=n.parent)&&void 0!==t&&t.data&&Pu.getAllParentNodesKeys(n.parent,e)},getDefaultOptions:()=>({tasks:{dataSource:null,keyExpr:"id",parentIdExpr:"parentId",startExpr:"start",endExpr:"end",progressExpr:"progress",titleExpr:"title",colorExpr:"color"},dependencies:{dataSource:null,keyExpr:"id",predecessorIdExpr:"predecessorId",successorIdExpr:"successorId",typeExpr:"type"},resources:{dataSource:null,keyExpr:"id",textExpr:"text",colorExpr:"color"},resourceAssignments:{dataSource:null,keyExpr:"id",taskIdExpr:"taskId",resourceIdExpr:"resourceId"},columns:void 0,taskListWidth:300,showResources:!0,showDependencies:!0,taskTitlePosition:"inside",firstDayOfWeek:void 0,selectedRowKey:void 0,onSelectionChanged:null,onTaskClick:null,onTaskDblClick:null,onTaskInserting:null,onTaskInserted:null,onTaskDeleting:null,onTaskDeleted:null,onTaskUpdating:null,onTaskUpdated:null,onTaskMoving:null,onTaskEditDialogShowing:null,onDependencyInserting:null,onDependencyInserted:null,onDependencyDeleting:null,onDependencyDeleted:null,onResourceInserting:null,onResourceInserted:null,onResourceDeleting:null,onResourceDeleted:null,onResourceAssigning:null,onResourceAssigned:null,onResourceUnassigning:null,onResourceUnassigned:null,onCustomCommand:null,onContextMenuPreparing:null,allowSelection:!0,showRowLines:!0,stripLines:void 0,scaleType:"auto",scaleTypeRange:{min:"minutes",max:"years"},editing:{enabled:!1,allowTaskAdding:!0,allowTaskDeleting:!0,allowTaskUpdating:!0,allowDependencyAdding:!0,allowDependencyDeleting:!0,allowResourceAdding:!0,allowResourceDeleting:!0,allowResourceUpdating:!0,allowTaskResourceUpdating:!0},validation:{validateDependencies:!1,autoUpdateParentTasks:!1,enablePredecessorGap:!1},toolbar:null,contextMenu:{enabled:!0,items:void 0},taskTooltipContentTemplate:null,taskProgressTooltipContentTemplate:null,taskTimeTooltipContentTemplate:null,taskContentTemplate:null,rootValue:0,sorting:{ascendingText:Wn.A.format("dxGantt-sortingAscendingText"),descendingText:Wn.A.format("dxGantt-sortingDescendingText"),clearText:Wn.A.format("dxGantt-sortingClearText"),mode:"single",showSortIndexes:!1},filterRow:void 0,headerFilter:void 0,rtlEnabled:!1})};class VX{constructor(e){this._gantt=e,this._mappingHelper=e._mappingHelper,this.cache=new FX}_getTaskCustomFields(){const e=this._gantt.option("columns"),t=e&&e.map(r=>r.dataField),i=this._mappingHelper.getTaskMappedFieldNames();return t?t.filter(r=>i.indexOf(r)<0):[]}_getCustomFieldsData(e){return this._getTaskCustomFields().reduce((t,i)=>(e&&void 0!==e[i]&&(t[i]=e[i]),t),{})}addCustomFieldsData(e,t){if(t){const i=this._gantt._tasksOption&&this._gantt._tasksOption._getItems(),r=(0,fa.Hz)(this._gantt.option("tasks.keyExpr")),m=i&&i.filter(V=>r(V)===e)[0],A=this._getTaskCustomFields();if(m)for(let V=0;V<A.length;V++){const X=A[V];Object.prototype.hasOwnProperty.call(m,X)&&(t[X]=m[X])}}}appendCustomFields(e){const t=this._gantt._tasksOption&&this._gantt._tasksOption._getItems(),i=this._gantt._getTaskKeyGetter(),r=Pu.getInvertedData(t,i);return e.reduce((m,A)=>{const V=i(A),X=r[V];if(X){const ce={};for(const _e in X)ce[_e]=Object.prototype.hasOwnProperty.call(A,_e)?A[_e]:X[_e];m.push(ce)}else m.push(A);return m},[])}addCustomFieldsDataFromCache(e,t){this.cache.pullDataFromCache(e,t)}saveCustomFieldsDataToCache(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const m=this._getCustomFieldsData(t);Object.keys(m).length>0&&this.cache.saveData(e,m,i?(V,X)=>{const ce=this._gantt._tasksOption;ce&&X&&ce.update(V,X,(_e,Me)=>{const Ve={};this.addCustomFieldsData(Me,Ve),ce._reloadDataSource().done(rt=>{this._gantt._ganttTreeList.updateDataSource(rt??ce._dataSource,!1,r)});const Je=this._gantt.option("selectedRowKey");this._gantt._ganttView._selectTask(Je),this._gantt._actionsManager.raiseUpdatedAction("tasks",Ve,Me)})}:null)}resetCustomFieldsDataCache(e){this.cache.resetCache(e)}}var _G=M(6232);M(3577),M(1751),M(6828),M(4055);class HX{constructor(e,t){this._popupInstance=e._createComponent(t,bg.A),this.infoMap={TaskEdit:UX,Resources:zX,Confirmation:GX,ConstraintViolation:WX}}_apply(){if(this._dialogInfo.isValidated()){const e=this._dialogInfo.getResult();this._callback(e),this.hide()}}show(e,t,i,r,m){if(this._callback=i,this._afterClosing=r,!this.infoMap[e])return;const A=this._popupInstance._isVisible()&&this._dialogInfo&&this._dialogInfo instanceof this.infoMap[e];this._dialogInfo=new this.infoMap[e](t,this._apply.bind(this),this.hide.bind(this),m),this._popupInstance.option({showTitle:!!this._dialogInfo.getTitle(),title:this._dialogInfo.getTitle(),toolbarItems:this._dialogInfo.getToolbarItems(),maxWidth:this._dialogInfo.getMaxWidth(),height:this._dialogInfo.getHeight(),contentTemplate:this._dialogInfo.getContentTemplate()}),this._afterClosing&&this._popupInstance.option("onHidden",this._afterClosing),A||this._popupInstance.show()}hide(){this._popupInstance.hide(),this._afterClosing&&this._afterClosing()}}class TH{constructor(e,t,i,r){this._parameters=e,this._applyAction=t,this._hideAction=i,this._editingOptions=r}_getFormItems(){return{}}_getFormCssClass(){return""}_getFormData(){return this._parameters}_updateParameters(){}_getOkToolbarItem(){return this._getToolbarItem("OK",this._applyAction)}_getCancelToolbarItem(){return this._getToolbarItem("Cancel",this._hideAction)}_getYesToolbarItem(){return this._getToolbarItem("Yes",this._applyAction)}_getNoToolbarItem(){return this._getToolbarItem("No",this._hideAction)}_getToolbarItem(e,t){return{widget:"dxButton",toolbar:"bottom",options:{text:Wn.A.format(e),onClick:t}}}getTitle(){return""}getToolbarItems(){return this._editingOptions.enabled?[this._getOkToolbarItem(),this._getCancelToolbarItem()]:[this._getCancelToolbarItem()]}getMaxWidth(){return 400}getHeight(){return"auto"}getContentTemplate(){return e=>(this._form=new _G.A(e,{formData:this._getFormData(),items:this._getFormItems(),elementAttr:{class:this._getFormCssClass()},rtlEnabled:!1}),e)}getResult(){const e=this.getFormData();return this._updateParameters(e),this._parameters}getFormData(){return this._form&&this._form.option("formData")}isValidated(){return!0}}class UX extends TH{getTitle(){return Wn.A.format("dxGantt-dialogTaskDetailsTitle")}_getFormItems(){const e=!this._editingOptions.enabled||!this._editingOptions.allowTaskUpdating,t=e||!this._parameters.enableRangeEdit;return[{dataField:"title",editorType:"dxTextBox",label:{text:Wn.A.format("dxGantt-dialogTitle")},editorOptions:{readOnly:e||this._isReadOnlyField("title")},visible:!this._isHiddenField("title")},{dataField:"start",editorType:"dxDateBox",label:{text:Wn.A.format("dxGantt-dialogStartTitle")},editorOptions:{type:"datetime",width:"100%",readOnly:t||this._isReadOnlyField("start")},visible:!this._isHiddenField("start"),validationRules:[{type:"required",message:Wn.A.format("validation-required-formatted",Wn.A.format("dxGantt-dialogStartTitle"))},{type:"custom",validationCallback:i=>{if(this._parameters.isValidationRequired){const r=this._parameters.getCorrectDateRange(this._parameters.id,i.value,this._parameters.end);if(r.start.getTime()!==i.value.getTime())return i.rule.message=this._getValidationMessage(!0,r.start),!1}return!0}}]},{dataField:"end",editorType:"dxDateBox",label:{text:Wn.A.format("dxGantt-dialogEndTitle")},editorOptions:{type:"datetime",width:"100%",readOnly:t||this._isReadOnlyField("end")},visible:!this._isHiddenField("end"),validationRules:[{type:"required",message:Wn.A.format("validation-required-formatted",Wn.A.format("dxGantt-dialogEndTitle"))},{type:"custom",validationCallback:i=>{if(this._parameters.isValidationRequired){const r=this._parameters.getCorrectDateRange(this._parameters.id,this._parameters.start,i.value);if(r.end.getTime()!==i.value.getTime())return i.rule.message=this._getValidationMessage(!1,r.end),!1}return!0}}]},{dataField:"progress",editorType:"dxNumberBox",label:{text:Wn.A.format("dxGantt-dialogProgressTitle")},editorOptions:{showSpinButtons:!0,min:0,max:1,format:"#0%",step:.01,readOnly:t||this._isReadOnlyField("progress")},visible:!this._isHiddenField("progress")},{dataField:"assigned.items",editorType:"dxTagBox",label:{text:Wn.A.format("dxGantt-dialogResourcesTitle")},editorOptions:{readOnly:e||!this._editingOptions.allowTaskResourceUpdating,dataSource:this._parameters.resources.items,displayExpr:"text",buttons:[{name:"editResources",location:"after",options:{disabled:!this._editingOptions.allowResourceAdding&&!this._editingOptions.allowResourceDeleting,text:"...",hint:Wn.A.format("dxGantt-dialogEditResourceListHint"),onClick:()=>{this._parameters.showResourcesDialogCommand.execute(()=>{this._parameters.showTaskEditDialogCommand.execute()})}}}]}}]}_getValidationMessage(e,t){return Wn.A.format(e?"dxGantt-dialogStartDateValidation":"dxGantt-dialogEndDateValidation",this._getFormattedDateText(t))}_getFormattedDateText(e){return e?sa.A.format(e,"shortDateShortTime"):""}_isReadOnlyField(e){return this._parameters.readOnlyFields.indexOf(e)>-1}_isHiddenField(e){return this._parameters.hiddenFields.indexOf(e)>-1}_getFormData(){const e={};for(const t in this._parameters)e[t]="progress"===t?this._parameters[t]/100:this._parameters[t];return e}_updateParameters(e){this._parameters.title=e.title,this._parameters.start=e.start,this._parameters.end=e.end,this._parameters.progress=100*e.progress,this._parameters.assigned=e.assigned}isValidated(){var e;const t=null===(e=this._form)||void 0===e?void 0:e.validate();return t?.isValid}}class zX extends TH{getTitle(){return Wn.A.format("dxGantt-dialogResourceManagerTitle")}_getFormItems(){return[{label:{visible:!1},dataField:"resources.items",editorType:"dxList",editorOptions:{allowItemDeleting:this._editingOptions.enabled&&this._editingOptions.allowResourceDeleting,itemDeleteMode:"static",selectionMode:"none",items:this._parameters.resources.items,height:250,noDataText:Wn.A.format("dxGantt-dialogEditNoResources"),onInitialized:e=>{this.list=e.component},onItemDeleted:e=>{this._parameters.resources.remove(e.itemData)}}},{label:{visible:!1},editorType:"dxTextBox",editorOptions:{readOnly:!this._editingOptions.enabled||!this._editingOptions.allowResourceAdding,onInitialized:e=>{this.textBox=e.component},onInput:e=>{const t=e.component.getButton("addResource"),i=e.component.option("text");t.option("disabled",0===i.length)},buttons:[{name:"addResource",location:"after",options:{text:Wn.A.format("dxGantt-dialogButtonAdd"),disabled:!0,onClick:e=>{const t=this._parameters.resources.createItem();t.text=this.textBox.option("text"),this._parameters.resources.add(t),this.list.option("items",this._parameters.resources.items),this.list.scrollToItem(t),this.textBox.clear(),e.component.option("disabled",!0)}}}]}}]}}class GX extends TH{getContentTemplate(){return e=>this._getConfirmMessage()}_getConfirmMessage(){switch(this._parameters.type){case 0:return Wn.A.format("dxGantt-dialogTaskDeleteConfirmation");case 1:return Wn.A.format("dxGantt-dialogDependencyDeleteConfirmation");case 2:return Wn.A.format("dxGantt-dialogResourcesDeleteConfirmation",this._parameters.message);default:return""}}getToolbarItems(){return[this._getYesToolbarItem(),this._getNoToolbarItem()]}}class WX extends TH{_getFormItems(){const e=this._parameters.hasCriticalErrors,t=this._parameters.errorsCount>1,i=[],r=t?"dxGantt-dialogDeleteDependenciesMessage":"dxGantt-dialogDeleteDependencyMessage",m=t?"dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"dxGantt-dialogMoveTaskAndKeepDependencyMessage";let A;return A=e?t?"dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"dxGantt-dialogConstraintCriticalViolationMessage":t?"dxGantt-dialogConstraintViolationSeveralTasksMessage":"dxGantt-dialogConstraintViolationMessage",i.push({text:Wn.A.format("dxGantt-dialogCancelOperationMessage"),value:0}),i.push({text:Wn.A.format(r),value:1}),e||i.push({text:Wn.A.format(m),value:2}),[{template:Wn.A.format(A)},{cssClass:"dx-cv-dialog-row",dataField:"option",label:{visible:!1},editorType:"dxRadioGroup",editorOptions:{items:i,valueExpr:"value",value:0}}]}_getFormCssClass(){return"dx-cv-dialog"}_updateParameters(e){this._parameters.option=e.option}}var hC=M(8736);const DH=(0,gr.zk)();class KX{constructor(e){this._gantt=e,this._treeList=e._treeList,this._cache={}}reset(){this._cache={}}getTreeListTableStyle(){const e=this._getTreeListTable(),t=DH.getComputedStyle(e);return{color:t.color,backgroundColor:t.backgroundColor,fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontStyle:t.fontStyle,textAlign:"left",verticalAlign:"middle"}}getTreeListColCount(){return this._getHeaderView().getColumnWidths().filter(i=>i>0).length}getTreeListHeaderInfo(e){const t=this._getHeaderElement(e);if(!t)return null;const i=DH.getComputedStyle(t),r={color:i.color,padding:i.padding,paddingLeft:i.paddingLeft,paddingTop:i.paddingTop,paddingRight:i.paddingRight,paddingBottom:i.paddingBottom,verticalAlign:i.verticalAlign,width:this._getColumnWidth(e)};return{content:t.textContent,styles:r}}getTreeListCellInfo(e,t){const i=this._treeList.getNodeByKey(e),r=this._treeList.getRowIndexByKey(e),m=r>-1?this._getDataCell(r,t):null,A=m?DH.getComputedStyle(m):this._getColumnCellStyle(t),V={color:A.color,padding:A.padding,paddingLeft:A.paddingLeft,paddingTop:A.paddingTop,paddingRight:A.paddingRight,paddingBottom:A.paddingBottom,width:this._getColumnWidth(t)};return 0===t&&(V.extraLeftPadding=this._getEmptySpaceWidth(i.level)),{content:m?.textContent??this._getDisplayText(e,t),styles:V}}getTreeListEmptyDataCellInfo(){return{content:this._treeList.option("noDataText")}}_ensureColumnWidthCache(e){var t;if((t=this._cache).columnWidths??(t.columnWidths={}),!this._cache.columnWidths[e]){const i=this._getHeaderElement(e);this._cache.columnWidths[e]=i?.clientWidth??0}}_getColumnWidth(e){this._ensureColumnWidthCache(e);const t=this._cache.columnWidths;return t&&t[e]}_getEmptySpaceWidth(e){if(!this._cache.emptyWidth){var t;const i=this._getTreeListElement("dx-treelist-empty-space");(t=this._cache).emptyWidth??(t.emptyWidth=i.offsetWidth??0)}return this._cache.emptyWidth*(e+1)}_getColumnCellStyle(e){return this._ensureColumnCellStyleCache(e),this._cache.columnStyles[e]}_ensureColumnCellStyleCache(e){var t;if((t=this._cache).columnStyles??(t.columnStyles={}),!this._cache.columnStyles[e]){const i=this._getDataCell(0,e);this._cache.columnStyles[e]=DH.getComputedStyle(i)}}_getTask(e){return this._ensureTaskCache(e),this._cache.tasks[e]}_ensureTaskCache(e){var t,i;(t=this._cache).tasks??(t.tasks={}),(i=this._cache.tasks)[e]??(i[e]=this._gantt._findTaskByKey(e))}_getTreeListTable(){return this._getTreeListElement("dx-treelist-table")}_getTreeListElement(e){return this._treeList._$element.find("."+e).get(0)}_getDataCell(e,t){const r=this._treeList.getCellElement(e,t);return r&&r.length?r[0]:r}_getHeaderElement(e){return this._getHeaderView().getHeaderElement(e).get(0)}_getHeaderView(){return this._treeList._views.columnHeadersView}_getDisplayText(e,t){const i=this._getTask(e);return i&&this._getGridDisplayText(t,i)}_getGridDisplayText(e,t){const r=this._treeList.getController("columns").getColumns()[e],m=r?.dataField,A=r?.format,V=hC.A.getDisplayValue(r,t[m],t,"data");if((0,C.O9)(A)){if("date"===r?.dataType||"datetime"===r?.dataType){const X=(0,C.$P)(V)?V:new Date(V);return sa.A.format(X,A)}if((0,C.kf)(V))return bS.A.format(V,A)}return"string"==typeof V?V:V?.toString()}}const vG=/(\w*)Expr/;class XX{constructor(e){this._gantt=e}_getMappedFieldName(e,t){let i=t;return"id"===t&&(i="key"),this._gantt.option(`${e}.${i}Expr`)}getTaskMappedFieldNames(){const e=[],t=this._gantt.option("tasks");for(const i in t){const r=i.match(vG),m=r&&t[r[0]];m&&e.push(m)}return e}convertCoreToMappedData(e,t){return Object.keys(t).reduce((i,r)=>{const m=this._getMappedFieldName(e,r);return m&&!(0,C.Tn)(m)&&(0,fa.vL)(m)(i,t[r]),i},{})}convertMappedToCoreData(e,t){const i={};if(t){const r=this._gantt.option(e);for(const m in r){const A=m.match(vG),V=A&&r[A[0]];if(V&&void 0!==t[V]){const X=(0,fa.Hz)(V);i[A[1]]=X(t)}}}return i}convertCoreToMappedFields(e,t){return t.reduce((i,r)=>{const m=this._getMappedFieldName(e,r);return m&&i.push(m),i},[])}convertMappedToCoreFields(e,t){const i=[],r=this._gantt.option(e);for(const m in r){const A=m.match(vG),V=A&&r[A[0]];V&&t.indexOf(V)>-1&&i.push(A[1])}return i}}class YX{constructor(e){this._gantt=e}_setTreeListDimension(e,t){var i;const m="width"===e?D.RG:D.Oq;("width"===e?D.zj:D.k$)(this._gantt._$treeListWrapper,t),null===(i=this._gantt._ganttTreeList)||void 0===i||i.setOption(e,m(this._gantt._$treeListWrapper))}_setGanttViewDimension(e,t){const r="width"===e?D.RG:D.Oq;("width"===e?D.zj:D.k$)(this._gantt._$ganttView,t),this._gantt._setGanttViewOption(e,r(this._gantt._$ganttView))}_getPanelsWidthByOption(){var e,t;const i=(0,D.RG)(this._gantt._$element),r=this._gantt.option("taskListWidth");let m;return isNaN(r)?(null===(e=r.indexOf)||void 0===e?void 0:e.call(r,"px"))>0?m=i-parseInt(r.replace("px",""))+"px":(null===(t=r.indexOf)||void 0===t?void 0:t.call(r,"%"))>0&&(m=100-parseInt(r.replace("%",""))+"%"):m=i-parseInt(r),{leftPanelWidth:r,rightPanelWidth:m}}onAdjustControl(){const e=(0,D.Oq)(this._gantt._$element);this.updateGanttWidth(),this.setGanttHeight(e)}onApplyPanelSize(e){this.setInnerElementsWidth(e),this.updateGanttRowHeights()}updateGanttRowHeights(){const e=this._gantt._ganttTreeList.getRowHeight();var t;this._gantt._getGanttViewOption("rowHeight")!==e&&(this._gantt._setGanttViewOption("rowHeight",e),null===(t=this._gantt._ganttView)||void 0===t||t._ganttViewCore.updateRowHeights(e))}adjustHeight(){this._gantt._hasHeight||(this._gantt._setGanttViewOption("height",0),this._gantt._setGanttViewOption("height",this._gantt._ganttTreeList.getOffsetHeight()))}setInnerElementsWidth(e){if(!(0,gr.Vd)())return;const t=!e;t&&(e=this._getPanelsWidthByOption(),this._setTreeListDimension("width",0),this._setGanttViewDimension("width",0)),this._setTreeListDimension("width",e.leftPanelWidth),this._setGanttViewDimension("width",e.rightPanelWidth),t&&this._gantt._splitter._setSplitterPositionLeft()}updateGanttWidth(){this._gantt._splitter._dimensionChanged()}setGanttHeight(e){var t;const r=e-this._gantt._$toolbarWrapper.get(0).offsetHeight;this._setTreeListDimension("height",r),this._setGanttViewDimension("height",r),null===(t=this._gantt._ganttView)||void 0===t||t._ganttViewCore.resetAndUpdate()}}class ZX{constructor(e){this._gantt=e}getTaskTooltipContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((r,m,A)=>(t.render({model:this._gantt.getTaskDataByCoreData(m),container:(0,s.cc)((0,a.A)(r)),onRendered:()=>{A()}}),!0))}getTaskProgressTooltipContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((r,m,A)=>(t.render({model:m,container:(0,s.cc)((0,a.A)(r)),onRendered:()=>{A()}}),!0))}getTaskTimeTooltipContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((r,m,A)=>(t.render({model:m,container:(0,s.cc)((0,a.A)(r)),onRendered:()=>{A()}}),!0))}getTaskContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((r,m,A,V)=>(m.taskData=this._gantt.getTaskDataByCoreData(m.taskData),t.render({model:m,container:(0,s.cc)((0,a.A)(r)),onRendered:()=>{A(r,V)}}),!0))}}class s3{constructor(e,t){this._element=e,this._owner=t,this._items=[],this._createControl()}createItems(e){this._cache=null,this._items=this._createItemsCore(e),this._menu.option("items",this._items)}_createItemsCore(e){return e.map(t=>{let i;return i="string"==typeof t?this._createItemByText(t):(0,_.X)(t.name?this._createItemByText(t.name):this._getDefaultItemOptions(),t),t.items&&(i.items=this._createItemsCore(t.items)),i})}_createItemByText(e){switch(e.toLowerCase()){case"separator":return this._createSeparator();case"undo":return this._createDefaultItem(6,Wn.A.format("dxGantt-undo"),this._getIcon("undo"));case"redo":return this._createDefaultItem(7,Wn.A.format("dxGantt-redo"),this._getIcon("redo"));case"expandall":return this._createDefaultItem(12,Wn.A.format("dxGantt-expandAll"),this._getIcon("expand"));case"collapseall":return this._createDefaultItem(11,Wn.A.format("dxGantt-collapseAll"),this._getIcon("collapse"));case"addtask":return this._createDefaultItem(0,Wn.A.format("dxGantt-addNewTask"),this._getIcon("add"));case"addsubtask":return this._createDefaultItem(1,Wn.A.format("dxGantt-contextMenuNewSubtask"),this._getIcon("add-sub-task"));case"deletetask":return this._createDefaultItem(2,Wn.A.format("dxGantt-deleteSelectedTask"),this._getIcon("delete"));case"deletedependency":return this._createDefaultItem(3,Wn.A.format("dxGantt-contextMenuDeleteDependency"),this._getIcon("delete-dependency"));case"zoomin":return this._createDefaultItem(8,Wn.A.format("dxGantt-zoomIn"),this._getIcon("zoom-in"));case"zoomout":return this._createDefaultItem(9,Wn.A.format("dxGantt-zoomOut"),this._getIcon("zoom-out"));case"fullscreen":return this._createDefaultItem(10,Wn.A.format("dxGantt-fullScreen"),this._getIcon("full-screen"));case"taskdetails":return this._createDefaultItem(4,Wn.A.format("dxGantt-dialogTaskDetailsTitle")+"...",this._getIcon("task-details"));case"resourcemanager":return this._createDefaultItem(13,Wn.A.format("dxGantt-dialogResourceManagerTitle"),this._getIcon("resource-manager"));case"showresources":return this._createDefaultItem(14,Wn.A.format("dxGantt-showResources"),this._getIcon("toggle-resources"));case"showdependencies":return this._createDefaultItem(15,Wn.A.format("dxGantt-showDependencies"),this._getIcon("toggle-dependencies"));default:return(0,_.X)(this._getDefaultItemOptions(),{options:{text:e}})}}_getDefaultItemOptions(){return{}}_getItemsCache(){return this._cache||(this._cache={},this._fillCache(this._items)),this._cache}_fillCache(e){e.forEach(t=>{const i=t.commandId;void 0!==i&&(this._cache[i]||(this._cache[i]=[]),this._cache[i].push(t)),t.items&&this._fillCache(t.items)})}_getIcon(e){return"dx-gantt-i dx-gantt-i-"+e}getCommandKeys(){const e=this._getItemsCache(),t=[];for(const i in e)t.push(parseInt(i));return t}setItemEnabled(e,t){this._getItemsCache()[e].forEach(r=>{r.disabled=!t})}setItemVisible(e,t){this._getItemsCache()[e].forEach(r=>{r.visible=t})}setItemValue(e,t){}setEnabled(e){this._menu.option("disabled",!e)}updateItemsList(){}isVisible(){return!0}isContextMenu(){return!1}completeUpdate(){}}class JX extends s3{_createControl(){this._menu=this._owner._createComponent(this._element,xS.A,{onItemClick:e=>{void 0!==e.itemData.commandId&&this._executeCommand(e.itemData.commandId)}})}_executeCommand(e){switch(e){case 14:this._owner.option("showResources",!this._owner.option("showResources"));break;case 15:this._owner.option("showDependencies",!this._owner.option("showDependencies"));break;default:this._owner._executeCoreCommand(e)}}_createDefaultItem(e,t,i){return{commandId:e,disabled:!0,widget:"dxButton",location:"before",options:{icon:i,stylingMode:"text",hint:t}}}_createSeparator(){return{location:"before",template:(e,t,i)=>{(0,a.A)(i).addClass("dx-gantt-toolbar-separator")}}}_getDefaultItemOptions(){return{location:"before",widget:"dxButton"}}completeUpdate(){this._menu.option("items",this._items)}}class qX extends s3{_createControl(){this._menu=this._owner._createComponent(this._element,H_.A,{showEvent:void 0,onItemClick:e=>{void 0!==e.itemData.commandId?this._owner._executeCoreCommand(e.itemData.commandId):void 0!==e.itemData.name&&this._owner._actionsManager.raiseCustomCommand(e.itemData.name)}})}createItems(e){(!e||0===e.length)&&(e=this._getDefaultItems()),super.createItems(e)}_getDefaultItems(){return[{text:Wn.A.format("dxGantt-dialogButtonAdd"),commandId:5,icon:this._getIcon("add"),items:[{text:Wn.A.format("dxGantt-contextMenuNewTask"),commandId:0,icon:this._getIcon("add-task")},{text:Wn.A.format("dxGantt-contextMenuNewSubtask"),commandId:1,icon:this._getIcon("add-sub-task")}]},{text:Wn.A.format("dxGantt-dialogTaskDetailsTitle")+"...",commandId:4,icon:this._getIcon("task-details")},{text:Wn.A.format("dxGantt-contextMenuDeleteTask"),commandId:2,icon:this._getIcon("delete")},{text:Wn.A.format("dxGantt-contextMenuDeleteDependency"),commandId:3,icon:this._getIcon("delete-dependency")}]}_createDefaultItem(e,t,i){return{commandId:e,text:t,icon:i}}show(e,t){this._menu.option("items",t||this._items),this._menu.option("position.offset",{x:e.x,y:e.y}),this._menu.option("position.collision","fit"),this._menu.show()}hide(){this._menu.hide()}isContextMenu(){return!0}}var eY=M(6622),tY=M(3376);const Sa=(0,_.X)({},tY.Ay,{modules:[],foreachNodes(n,e,t){for(let i=0;i<n.length;i++)!1!==e(n[i])&&(t||n[i].hasChildren)&&n[i].children.length&&this.foreachNodes(n[i].children,e,t)}});Sa.registerModule("columnHeaders",eY.J);var a3=M(4169);Sa.registerModule("columns",{defaultOptions:a3.a.defaultOptions,controllers:{columns:class nY extends a3._{_getFirstItems(e){return super._getFirstItems(e).map(t=>t.data)}getFirstDataColumnIndex(){const e=this.getVisibleColumns(),t=e.length;let i=0;for(let r=0;r<=t-1;r++)if(!(0,C.O9)(e[r].command)){i=e[r].index;break}return i}}}});var l3=M(8483),iY=M(2946),Aw=M(1541),oY=M(1435),rY=M(810);const{queryByOptions:c3}=oY.A,AH=n=>"fullBranch"===n.option("filterMode"),d3=(n,e)=>c3((0,Aw.A)(n),{sort:e}).toArray();let CG=class aY extends rY.A{_createKeyGetter(){const e=this.getKeyExpr();return(0,fa.Hz)(e)}_createKeySetter(){const e=this.getKeyExpr();return(0,C.Tn)(e)?e:(0,fa.vL)(e)}createParentIdGetter(){return(0,fa.Hz)(this.option("parentIdExpr"))}createParentIdSetter(){const e=this.option("parentIdExpr");return(0,C.Tn)(e)?e:(0,fa.vL)(e)}_createItemsGetter(){return(0,fa.Hz)(this.option("itemsExpr"))}_createHasItemsGetter(){const e=this.option("hasItemsExpr");return e&&(0,fa.Hz)(e)}_createHasItemsSetter(){const e=this.option("hasItemsExpr");return(0,C.Tn)(e)?e:e&&(0,fa.vL)(e)}_updateIndexByKeyObject(e){const t=this;t._indexByKey={},(0,w.__)(e,(i,r)=>{t._indexByKey[r.key]=i})}_calculateHasItems(e,t){const i=this,{parentIds:r}=t.storeLoadOptions;let m;const A=AH(i);return i._hasItemsGetter&&(r||!t.storeLoadOptions.filter||A)&&(m=i._hasItemsGetter(e.data)),void 0===m&&(m=!(i._isChildrenLoaded[e.key]||!t.remoteOperations.filtering||!r&&!A)||(t.loadOptions.filter&&!t.remoteOperations.filtering&&A?e.children.length:e.hasChildren)),!!m}_fillVisibleItemsByNodes(e,t,i){for(let r=0;r<e.length;r++)e[r].visible&&i.push(e[r]),(this.isRowExpanded(e[r].key,t)||!e[r].visible)&&e[r].hasChildren&&e[r].children.length&&this._fillVisibleItemsByNodes(e[r].children,t,i)}_convertItemToNode(e,t,i){const r=this._keyGetter(e);let m=this._parentIdGetter(e);m=(0,C.O9)(m)?m:t;const A=i[m]=i[m]||{key:m,children:[]},V=i[r]=i[r]||{key:r,children:[]};return V.data=e,V.parent=A,V}_createNodesByItems(e,t){const i=this,r=i.option("rootValue"),m={},A=i._nodeByKey={};let V;if(t)for(V=0;V<t.length;V++)m[this._keyGetter(t[V])]=!0;for(V=0;V<e.length;V++){const ce=i._convertItemToNode(e[V],r,A);if(void 0===ce.key)return;ce.visible=!t||!!m[ce.key],ce.parent&&ce.parent.children.push(ce)}const X=A[r]||{key:r,children:[]};return X.level=-1,X}_convertDataToPlainStructure(e,t,i){let r;if(this._itemsGetter&&!e.isConverted){i=i||[];for(let m=0;m<e.length;m++){const A=(0,iY.lj)(e[m]);r=this._keyGetter(A),void 0===r&&(r=i.length+1,this._keySetter(A,r)),this._parentIdSetter(A,void 0===t?this.option("rootValue"):t),i.push(A);const V=this._itemsGetter(A);if(V&&V.length){this._convertDataToPlainStructure(V,r,i);const X=this.option("itemsExpr");(0,C.Tn)(X)||delete A[X]}}return i.isConverted=!0,i}return e}_createIdFilter(e,t){const i=[];for(let r=0;r<t.length;r++)i.push([e,"=",t[r]]);return hC.A.combineFilters(i,"or")}_customizeRemoteOperations(e,t){super._customizeRemoteOperations.apply(this,arguments),e.remoteOperations.paging=!1;let i=!1;this.option("autoExpandAll")&&(e.remoteOperations.sorting=!1,e.remoteOperations.filtering=!1,(!this._lastLoadOptions||t.filtering&&!e.storeLoadOptions.filter)&&!e.isCustomLoading&&(i=!0)),e.isCustomLoading||(this._isReload=this._isReload||t.reload,e.cachedStoreData||(this._isChildrenLoaded={},this._isReload&&(this._nodeByKey={})),this.option("expandNodesOnFiltering")&&(t.filtering||this._isReload&&e.storeLoadOptions.filter)&&(e.storeLoadOptions.filter?i=!0:e.collapseVisibleNodes=!0)),e.expandVisibleNodes=i}_getParentIdsToLoad(e){const t=[];for(let i=0;i<e.length;i++){const r=this.getNodeByKey(e[i]);(!r||r.hasChildren&&!r.children.length)&&t.push(e[i])}return t}_handleCustomizeStoreLoadOptions(e){const t=this.option("rootValue"),i=this.option("parentIdExpr");let{parentIds:r}=e.storeLoadOptions;if(r&&(e.isCustomLoading=!1),super._handleCustomizeStoreLoadOptions.apply(this,arguments),e.remoteOperations.filtering&&!e.isCustomLoading&&(AH(this)&&e.cachedStoreData||!e.storeLoadOptions.filter)){const m=e.collapseVisibleNodes?[]:this.option("expandedRowKeys");r=[t].concat(m).concat(r||[]);const A=e.data?this._getParentIdsToLoad(r):r;A.length&&(e.cachedPagingData=void 0,e.data=void 0,e.mergeStoreLoadData=!0,e.delay=this.option("loadingTimeout")),e.storeLoadOptions.parentIds=A,e.storeLoadOptions.filter=this._createIdFilter(i,A)}}_generateInfoToLoad(e,t){const i=this;let r;const m={},A={},V=[],X=i.option("rootValue");let ce;for(ce=0;ce<e.length;ce++)r=t?i._parentIdGetter(e[ce]):i._keyGetter(e[ce]),m[r]=!0;for(ce=0;ce<e.length;ce++){r=t?i._keyGetter(e[ce]):i._parentIdGetter(e[ce]);const _e=t?i.isRowExpanded(r):r!==X;!m[r]&&!A[r]&&_e&&(A[r]=!0,V.push(r))}return{keyMap:A,keys:V}}_loadParentsOrChildren(e,t,i){var r,m;let A,V;const{keys:X,keyMap:ce}=this._generateInfoToLoad(e,i),_e=new g.cY,Me=t.remoteOperations.filtering,Ve=this.option("maxFilterLengthInRequest"),Je=(null===(r=t.storeLoadOptions)||void 0===r?void 0:r.sort)??(null===(m=t.loadOptions)||void 0===m?void 0:m.sort);let rt=Me?t.storeLoadOptions:t.loadOptions;const Ct=Yt=>(Me&&(this._cachedStoreData=d3(this._cachedStoreData.concat(Yt),Je)),d3(e.concat(Yt),Je));if(!X.length)return _e.resolve(e);let Xt=X.map(Yt=>this.getNodeByKey(Yt)).filter(Yt=>Yt&&Yt.data);if(Xt.length===X.length&&(i&&(Xt=Xt.reduce((Yt,$t)=>Yt.concat($t.children),[])),Xt.length))return this._loadParentsOrChildren(Ct(Xt.map(Yt=>Yt.data)),t,i);const On=i?this.option("parentIdExpr"):this.getKeyExpr();A=this._createIdFilter(On,X),encodeURI(JSON.stringify(A)).length>Ve&&(A=Yt=>ce[i?this._parentIdGetter(Yt):this._keyGetter(Yt)],V=Me),rt=(0,_.X)({},rt,{filter:V?null:A});const oi=t.fullData?new Ay.A(t.fullData):this._dataSource.store();return this.loadFromStore(rt,oi).done(Yt=>{Yt.length?(V&&(Yt=(0,Aw.A)(Yt).filter(A).toArray()),this._loadParentsOrChildren(Ct(Yt),t,i).done(_e.resolve).fail(_e.reject)):_e.resolve(e)}).fail(_e.reject),_e}_loadParents(e,t){return this._loadParentsOrChildren(e,t)}_loadChildrenIfNeed(e,t){return AH(this)?this._loadParentsOrChildren(e,t,!0):(0,g.z7)(e)}_updateHasItemsMap(e){const{parentIds:t}=e.storeLoadOptions;if(t)for(let i=0;i<t.length;i++)this._isChildrenLoaded[t[i]]=!0}_getKeyInfo(){return{key:()=>"key",keyOf:e=>e.key}}_processChanges(e){let t=[];return e.forEach(i=>{"insert"===i.type?t=t.concat(this._applyInsert(i)):"remove"===i.type?t=t.concat(this._applyRemove(i)):"update"===i.type&&t.push({type:i.type,key:i.key,data:{data:i.data}})}),t}_handleChanging(e){super._handleChanging.apply(this,arguments),e.postProcessChanges=t=>{const i=t.filter(r=>"update"===r.type);return this._processChanges(i)}}_applyBatch(e){const t=this._processChanges(e);super._applyBatch(t)}_setHasItems(e,t){const i=this._hasItemsSetter;e.hasChildren=t,i&&e.data&&i(e.data,t)}_applyInsert(e){const t=this,i=[],r=t.parentKeyOf(e.data),m=t.getNodeByKey(r);if(m){const A=t.option("rootValue"),V=t._convertItemToNode(e.data,A,t._nodeByKey);if(V.hasChildren=!1,V.level=m.level+1,V.visible=!0,m.children.push(V),t._isChildrenLoaded[V.key]=!0,t._setHasItems(m,!0),(!m.parent||t.isRowExpanded(m.key))&&void 0!==e.index){let X=t.items().indexOf(m)+1;X+=e.index>=0?Math.min(e.index,m.children.length):m.children.length,i.push({type:e.type,data:V,index:X})}}return i}_needToCopyDataObject(){return!1}_applyRemove(e){let t=[];const i=this.getNodeByKey(e.key),r=i&&i.parent;if(r){const m=r.children.indexOf(i);m>=0&&(r.children.splice(m,1),r.children.length||this._setHasItems(r,!1),t.push(e),t=t.concat(this.getChildNodeKeys(e.key).map(A=>({type:e.type,key:A}))))}return t}_handleDataLoaded(e){const t=e.data=this._convertDataToPlainStructure(e.data);!e.remoteOperations.filtering&&e.loadOptions.filter&&(e.fullData=c3((0,Aw.A)(e.data),{sort:e.loadOptions&&e.loadOptions.sort}).toArray()),this._updateHasItemsMap(e),super._handleDataLoaded(e),t.isConverted&&this._cachedStoreData&&(this._cachedStoreData.isConverted=!0)}_fillNodes(e,t,i,r){const m=AH(this);r=r||0;for(let A=0;A<e.length;A++){const V=e[A];let X=!1;this._fillNodes(e[A].children,t,i,r+1),V.level=r,V.hasChildren=this._calculateHasItems(V,t),V.visible&&V.hasChildren&&(m?V.children.filter(ce=>ce.visible).length?X=!0:V.children.length&&Sa.foreachNodes(V.children,ce=>{ce.visible=!0}):X=!0,t.expandVisibleNodes&&X&&i.push(V.key)),(V.visible||V.hasChildren)&&(V.parent.hasChildren=!0)}}_processTreeStructure(e,t){let{data:i}=e;const{parentIds:r}=e.storeLoadOptions,m=[];if(r&&r.length||this._isReload){if(e.fullData&&e.fullData.length>e.data.length&&(i=e.fullData,t=t||e.data),this._rootNode=this._createNodesByItems(i,t),!this._rootNode)return void(e.data=(new g.cY).reject(is.A.Error("E1046",this.getKeyExpr())));this._fillNodes(this._rootNode.children,e,m),this._isNodesInitializing=!0,(e.collapseVisibleNodes||m.length)&&this.option("expandedRowKeys",m),this._isReload=!1,this.executeAction("onNodesInitialized",{root:this._rootNode}),this._isNodesInitializing=!1}const A=[];this._fillVisibleItemsByNodes(this._rootNode.children,e,A),e.data=A,this._totalItemsCount=A.length}_handleDataLoadedCore(e){const t=this,{data:i}=e,r=e.storeLoadOptions.filter||e.loadOptions.filter,m=t.option("filterMode");let A;const{parentIds:V}=e.storeLoadOptions;if(!e.isCustomLoading){if(r&&(!V||!V.length)&&"standard"!==m){const ce=e.data=new g.cY;return"matchOnly"===m&&(A=i),t._loadParents(i,e).done(_e=>{t._loadChildrenIfNeed(_e,e).done(Me=>{e.data=Me,t._processTreeStructure(e,A),super._handleDataLoadedCore.call(t,e),ce.resolve(e.data)})}).fail(ce.reject)}t._processTreeStructure(e)}super._handleDataLoadedCore(e)}_handlePush(e){let{changes:t}=e;this._dataSource._reshapeOnPush&&!!t.length&&(this._isReload=!0),t.forEach(m=>{m.index??(m.index=-1)}),super._handlePush.apply(this,arguments)}init(e,t){super.init.apply(this,arguments);const i=this.option("dataStructure");this._keyGetter=this._createKeyGetter(),this._parentIdGetter=this.createParentIdGetter(),this._hasItemsGetter=this._createHasItemsGetter(),this._hasItemsSetter=this._createHasItemsSetter(),"tree"===i&&(this._itemsGetter=this._createItemsGetter(),this._keySetter=this._createKeySetter(),this._parentIdSetter=this.createParentIdSetter()),this._nodeByKey={},this._isChildrenLoaded={},this._totalItemsCount=0,this.createAction("onNodesInitialized")}getKeyExpr(){const e=this.store(),t=e&&e.key(),i=this.option("keyExpr");if((0,C.O9)(t)&&(0,C.O9)(i)&&!(0,h.RL)(t,i))throw is.A.Error("E1044");return t||i||"id"}keyOf(e){return this._keyGetter&&this._keyGetter(e)}parentKeyOf(e){return this._parentIdGetter&&this._parentIdGetter(e)}getRootNode(){return this._rootNode}totalItemsCount(){return this._totalItemsCount+this._totalCountCorrection}isRowExpanded(e,t){if(t){let{isExpandedByKey:r}=t;if(!r){const m=this.option("expandedRowKeys")??[];r=t.isExpandedByKey={},m.forEach(A=>{r[A]=!0})}return!!r[e]}return hC.A.getIndexByKey(e,this.option("expandedRowKeys"),null)>=0}_changeRowExpandCore(e){const t=this.option("expandedRowKeys").slice(),i=hC.A.getIndexByKey(e,t,null);i<0?t.push(e):t.splice(i,1),this.option("expandedRowKeys",t)}changeRowExpand(e){return this._changeRowExpandCore(e),this._isNodesInitializing?(new g.cY).resolve():this.load()}getNodeByKey(e){if(this._nodeByKey)return this._nodeByKey[e]}getNodeLeafKeys(){const e=this,t=[];return(e._rootNode?[e._rootNode.key]:[]).forEach(r=>{const m=e.getNodeByKey(r);m&&Sa.foreachNodes([m],A=>{!A.children.length&&t.push(A.key)})}),t}getChildNodeKeys(e){const t=this.getNodeByKey(e),i=[];return t&&Sa.foreachNodes(t.children,r=>{i.push(r.key)}),i}loadDescendants(e,t){const i=this,r=new g.cY,m=i.remoteOperations();if(e=(0,C.O9)(e)?Array.isArray(e)?e:[e]:i.getNodeLeafKeys(),!m.filtering||!e.length)return r.resolve();const A=i._dataSource._createStoreLoadOptions();return A.parentIds=e,i.load(A).done(()=>{if(!t){const V=function(n,e){const t=[];return e.forEach(i=>{const r=n.getNodeByKey(i);r&&r.children.forEach(m=>{t.push(m.key)})}),t}(i,e);if(V.length)return void i.loadDescendants(V,t).done(r.resolve).fail(r.reject)}r.resolve()}).fail(r.reject),r.promise()}forEachNode(){let t,e=[];if(1===arguments.length){t=arguments[0];const i=this.getRootNode();e=i&&i.children||[]}else 2===arguments.length&&(t=arguments[1],e=arguments[0],e=Array.isArray(e)?e:[e]);Sa.foreachNodes(e,t)}};const u3={extend(n){CG=n(CG)},create:n=>new CG(n)};Sa.registerModule("data",{defaultOptions:()=>(0,_.X)({},l3.X.defaultOptions(),{itemsExpr:"items",parentIdExpr:"parentId",rootValue:0,dataStructure:"plain",expandedRowKeys:[],filterMode:"withAncestors",expandNodesOnFiltering:!0,autoExpandAll:!1,onNodesInitialized:null,maxFilterLengthInRequest:1500,paging:{enabled:!1}}),controllers:{data:class lY extends l3.P{_getDataSourceAdapter(){return u3}_getNodeLevel(e){let t=-1;for(;e.parent;)e.visible&&t++,e=e.parent;return t}_generateDataItem(e,t){return{rowType:"data",node:e,key:e.key,data:e.data,isExpanded:this.isRowExpanded(e.key,t),level:this._getNodeLevel(e)}}_loadOnOptionChange(){this._dataSource.load()}_isItemEquals(e,t){return!(e.isSelected!==t.isSelected||e.node&&t.node&&e.node.hasChildren!==t.node.hasChildren||e.level!==t.level||e.isExpanded!==t.isExpanded)&&super._isItemEquals.apply(this,arguments)}_isCellChanged(e,t,i,r,m){return r===this._columnsController.getFirstDataColumnIndex()&&e.isSelected!==t.isSelected||super._isCellChanged.apply(this,arguments)}init(){this.createAction("onRowExpanding"),this.createAction("onRowExpanded"),this.createAction("onRowCollapsing"),this.createAction("onRowCollapsed"),super.init.apply(this,arguments)}keyOf(e){const t=this._dataSource;if(t)return t.keyOf(e)}key(){const e=this._dataSource;if(e)return e.getKeyExpr()}publicMethods(){return super.publicMethods().concat(["expandRow","collapseRow","isRowExpanded","getRootNode","getNodeByKey","loadDescendants","forEachNode"])}changeRowExpand(e){if(this._dataSource){const t={key:e},i=this.isRowExpanded(e);if(this.executeAction(i?"onRowCollapsing":"onRowExpanding",t),!t.cancel)return this._dataSource.changeRowExpand(e).done(()=>{this.executeAction(i?"onRowCollapsed":"onRowExpanded",t)})}return(new g.cY).resolve()}isRowExpanded(e,t){return this._dataSource&&this._dataSource.isRowExpanded(e,t)}expandRow(e){return this.isRowExpanded(e)?(new g.cY).resolve():this.changeRowExpand(e)}collapseRow(e){return this.isRowExpanded(e)?this.changeRowExpand(e):(new g.cY).resolve()}getRootNode(){return this._dataSource&&this._dataSource.getRootNode()}optionChanged(e){switch(e.name){case"rootValue":case"parentIdExpr":case"itemsExpr":case"filterMode":case"expandNodesOnFiltering":case"autoExpandAll":case"hasItemsExpr":case"dataStructure":this._columnsController.reset(),this._items=[],this._refreshDataSource(),e.handled=!0;break;case"expandedRowKeys":case"onNodesInitialized":this._dataSource&&!this._dataSource._isNodesInitializing&&!(0,h.RL)(e.value,e.previousValue)&&this._loadOnOptionChange(),e.handled=!0;break;case"maxFilterLengthInRequest":e.handled=!0;break;default:super.optionChanged(e)}}getNodeByKey(e){if(this._dataSource)return this._dataSource.getNodeByKey(e)}getChildNodeKeys(e){if(this._dataSource)return this._dataSource.getChildNodeKeys(e)}loadDescendants(e,t){if(this._dataSource)return this._dataSource.loadDescendants(e,t)}forEachNode(){this._dataSource.forEachNode.apply(this,arguments)}}}});var cY=M(1282);Sa.registerModule("sorting",cY.L);var dY=M(1110),h3=M(2391);const p3="dx-treelist-text-content",pY=function(n,e){const t=(0,a.A)("<div>").addClass("dx-treelist-empty-space");return n&&t.toggleClass("dx-treelist-expanded",e).toggleClass("dx-treelist-collapsed",!e).append((0,a.A)("<span>")),t};Sa.registerModule("rows",{defaultOptions:h3.E.defaultOptions,views:{rowsView:class gY extends h3.x{_renderIconContainer(e,t){const i=(0,a.A)("<div>").addClass("dx-treelist-icon-container").appendTo(e);if(t.watch){const r=t.watch(()=>[t.row.level,t.row.isExpanded,t.row.node.hasChildren],()=>{i.empty(),this._renderIcons(i,t)});L.A.on(i,dY.N,r)}return e.addClass("dx-treelist-cell-expandable"),this._renderIcons(i,t)}_renderIcons(e,t){const{row:i}=t,{level:r}=i;for(let m=0;m<=r;m++)e.append(pY(m===r&&i.node.hasChildren,i.isExpanded));return e}_renderCellCommandContent(e,t){return this._renderIconContainer(e,t),!0}_processTemplate(e,t){var i;const r=this;let m;const A=super._processTemplate(e),V=r._columnsController.getFirstDataColumnIndex();return m=A&&(null===(i=t.column)||void 0===i?void 0:i.index)===V?{render(X){const ce=X.container;var n;r._renderCellCommandContent(ce,X.model)&&(X.container=(n=ce,(0,a.A)("<div>").addClass(p3).appendTo(n))),A.render(X)}}:A,m}_updateCell(e,t){e=e.hasClass(p3)?e.parent():e,super._updateCell(e,t)}_rowClick(e){const t=this._dataController,i=(0,a.A)(e.event.target),r=this.isExpandIcon(i),m=t?.items()[e.rowIndex];r&&m&&t.changeRowExpand(m.key),super._rowClick(e)}_createRow(e){const t=e&&e.node,i=super._createRow.apply(this,arguments);return t&&(this.setAria("level",e.level+1,i),t.hasChildren&&this.setAria("expanded",e.isExpanded,i)),i}_getGridRoleName(){return"treegrid"}isExpandIcon(e){return!!e.closest(".dx-treelist-expanded, .dx-treelist-collapsed").length}setAriaExpandedAttribute(e,t){const i=t.isExpanded;this.setAria("expanded",(0,C.O9)(i)&&i.toString(),e)}}}});var fY=M(5494);Sa.registerModule("contextMenu",fY.pL);var mY=M(7228);Sa.registerModule("errorHandling",mY.y);var IH=M(7992);Sa.registerModule("gridView",{defaultOptions:IH.my.defaultOptions,controllers:(0,Lo.A)({},IH.my.controllers,{resizing:class _Y extends IH.Oz{_getWidgetAriaLabel(){return"dxTreeList-ariaTreeList"}_toggleBestFitMode(e){super._toggleBestFitMode(e),this._rowsView.getTableElement().find(".dx-treelist-cell-expandable").toggleClass(this.addWidgetPrefix("best-fit"),e)}}}),views:IH.my.views});var vY=M(8956);Sa.registerModule("headerPanel",vY.k);var CY=M(1610);Sa.registerModulesOrder(["stateStoring","columns","selection","editorFactory","columnChooser","editingRowBased","editingFormBased","editingCellBased","editing","grouping","masterDetail","validating","adaptivity","data","virtualScrolling","columnHeaders","filterRow","headerPanel","headerFilter","sorting","search","rows","pager","columnsResizingReordering","contextMenu","keyboardNavigation","errorHandling","summary","columnFixing","export","gridView"]);class g3 extends CY.A{_initMarkup(){super._initMarkup.apply(this,arguments),this.$element().addClass("dx-treelist"),this.getView("gridView").render(this.$element())}static registerModule(){Sa.registerModule.apply(Sa,arguments)}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,k.Nt)(),options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0}}}])}_init(){super._init(),this.option("_disableDeprecationWarnings")||hC.A.logHeaderFilterDeprecatedWarningIfNeed(this),Sa.processModules(this,Sa),Sa.callModuleItemsMethod(this,"init")}getGridCoreHelper(){return Sa}focus(e){super.focus(),(0,C.O9)(e)&&this.getController("keyboardNavigation").focus(e)}}(0,y.A)("dxTreeList",g3);const yY=g3;var WF=M(9262);Sa.registerModule("stateStoring",(0,Lo.A)({},WF.u,{extenders:(0,Lo.A)({},WF.u.extenders,{controllers:(0,Lo.A)({},WF.u.extenders.controllers,{stateStoring:n=>class extends(WF.u.extenders.controllers.stateStoring(n)){applyState(e){super.applyState(e),this.option("expandedRowKeys",e.expandedRowKeys?e.expandedRowKeys.slice():[])}},data:n=>class extends(WF.u.extenders.controllers.data(n)){getUserState(){const e=super.getUserState();return this.option("autoExpandAll")||(e.expandedRowKeys=this.option("expandedRowKeys")),e}}})})}));var SY=M(9820);Sa.registerModule("columnChooser",SY.CI);var f3=M(1781);Sa.registerModule("masterDetail",(0,_.X)(!0,{},f3.g,{extenders:{controllers:{data:n=>class extends((0,f3.o)(n)){isRowExpanded(){return this.isRowExpandedHack.apply(this,arguments)}_processItems(){return this._processItemsHack.apply(this,arguments)}_processDataItem(){return this._processDataItemHack.apply(this,arguments)}}}}}));var OY=M(476);Sa.registerModule("editorFactory",OY.k);var $F=M(8970);Sa.registerModule("editing",{defaultOptions:()=>(0,_.X)(!0,$F.l.defaultOptions(),{editing:{texts:{addRowToNode:Wn.A.format("dxTreeList-editingAddRowToNode")}}}),controllers:{editing:class wY extends $F.l.controllers.editing{_generateNewItem(e){const t=super._generateNewItem(e);return t.data={key:e},t.children=[],t.level=0,t.parentKey=this.option("rootValue"),t}_isProcessedItem(){return!0}_setInsertAfterOrBeforeKey(e,t){void 0!==t&&t!==this.option("rootValue")?e.insertAfterKey=t:super._setInsertAfterOrBeforeKey.apply(this,arguments)}_getLoadedRowIndex(e,t){const i=this._dataController.dataSource(),r=i?.parentKeyOf(t.data);if(void 0!==r&&r!==this.option("rootValue")){const m=hC.A.getIndexByKey(r,e);return m>=0&&this._dataController.isRowExpanded(r)?m+1:-1}return super._getLoadedRowIndex.apply(this,arguments)}_isEditColumnVisible(){const e=super._isEditColumnVisible.apply(this,arguments),t=this.option("editing");return e||t.allowAdding}_isDefaultButtonVisible(e,t){const i=super._isDefaultButtonVisible.apply(this,arguments),{row:r}=t;return"add"===e.name?this.allowAdding(t)&&r.rowIndex!==this._getVisibleEditRowIndex()&&!(r.removed||r.isNewRow):i}_getEditingButtons(e){const t=super._getEditingButtons.apply(this,arguments);return e.column.buttons||t.unshift(this._getButtonConfig("add",e)),t}_beforeSaveEditData(e){const t=super._beforeSaveEditData.apply(this,arguments);if(e&&"insert"!==e.type){var i;const r=null===(i=this._dataController)||void 0===i?void 0:i.store(),m=r?.key();if(!(0,C.O9)(m))throw is.A.Error("E1045")}return t}addRowByRowIndex(e){const t=this._dataController.getVisibleRows()[e];return this.addRow(t?t.key:void 0)}addRow(e){return void 0===e&&(e=this.option("rootValue")),super.addRow.call(this,e)}_addRowCore(e,t,i){const r=this.option("rootValue");if(void 0!==(t=this._dataController.dataSource().createParentIdGetter()(e))&&t!==r&&!this._dataController.isRowExpanded(t)){const V=new g.cY;return this._dataController.expandRow(t).done(()=>{setTimeout(()=>{super._addRowCore.call(this,e,t,i).done(V.resolve).fail(V.reject)})}).fail(V.reject),V.promise()}return super._addRowCore.call(this,e,t,i)}_initNewRow(e,t){return this._dataController.dataSource().createParentIdSetter()(e.data,t),super._initNewRow.apply(this,arguments)}allowAdding(e){return this._allowEditAction("allowAdding",e)}_needToCloseEditableCell(e){return super._needToCloseEditableCell.apply(this,arguments)||e.closest(".dx-treelist-icon-container").length&&this.isEditing()}getButtonLocalizationNames(){const e=super.getButtonLocalizationNames.apply(this);return e.add="dxTreeList-editingAddRowToNode",e}}},extenders:{controllers:{data:n=>class extends((0,$F.B)(n)){changeRowExpand(){return this._editingController.refresh(),super.changeRowExpand.apply(this,arguments)}}},views:{rowsView:n=>class extends($F.l.extenders.views.rowsView(n)){_renderCellCommandContent(e,t){const r=t.row&&this._editingController.isEditRow(t.row.rowIndex);return!t.isOnForm&&!(t.isEditing||r)&&super._renderCellCommandContent.apply(this,arguments)}validateClick(e){const t=(0,a.A)(e.event.target),i="dxdblclick"===e.event.type?super._rowDblClick:super._rowClick;return!t.closest(".dx-select-checkbox").length&&!this.needToCallOriginalClickHandler(e,i)}needToCallOriginalClickHandler(e,t){return!(0,a.A)(e.event.target).closest(".dx-treelist-icon-container").length&&(t.call(this,e),!0)}_rowClick(e){this.validateClick(e)&&super._rowClickTreeListHack.apply(this,arguments)}_rowDblClick(e){this.validateClick(e)&&super._rowDblClickTreeListHack.apply(this,arguments)}},headerPanel:$F.l.extenders.views.headerPanel}}});var AY=M(225);Sa.registerModule("editingRowBased",AY.a);var IY=M(2255);Sa.registerModule("editingFormBased",IY.I);var PY=M(933);Sa.registerModule("editingCellBased",PY.W);var jF=M(4394);Sa.registerModule("validating",{defaultOptions:jF.WY.defaultOptions,controllers:jF.WY.controllers,extenders:{controllers:{editing:n=>class extends(jF.WY.extenders.controllers.editing(n)){processDataItem(e){super.processDataItemTreeListHack.apply(this,arguments)}processItems(e,t){return super.processItemsTreeListHack.apply(this,arguments)}},editorFactory:jF.WY.extenders.controllers.editorFactory},views:jF.WY.extenders.views}});var KF=M(830);const RY=KF.f4.defaultOptions;KF.f4.extenders.controllers.data=n=>class extends((0,KF.p)(n)){_loadOnOptionChange(){var e;const t=null===(e=this._dataSource)||void 0===e?void 0:e._virtualScrollController;t?.reset(),super._loadOnOptionChange()}},Sa.registerModule("virtualScrolling",(0,Lo.A)({},KF.f4,{defaultOptions:()=>(0,_.X)(!0,RY(),{scrolling:{mode:"virtual"}})})),u3.extend(n=>class extends((0,KF.yo)(n)){changeRowExpand(){return super.changeRowExpand.apply(this,arguments).done(()=>{const e=this.getViewportItemIndex();e>=0&&this.setViewportItemIndex(e)})}});var LY=M(9095);Sa.registerModule("filterRow",LY.$);var BY=M(3918);Sa.registerModule("headerFilter",BY.Qy);var NY=M(6010);Sa.registerModule("filterSync",NY.a);var FY=M(6480);Sa.registerModule("filterBuilder",FY.s);var VY=M(7973);Sa.registerModule("filterPanel",VY.$);var HY=M(8645);Sa.registerModule("pager",HY.u);var UY=M(5918);Sa.registerModule("columnsResizingReordering",UY.Qu);var zY=M(9038);Sa.registerModule("columnFixing",zY.o);var GY=M(6218);Sa.registerModule("adaptivity",GY.A);var XF=M(3530);const WY=function(n,e){return!!n.filter(t=>t===e).length};Sa.registerModule("selection",(0,_.X)(!0,{},XF.nx,{defaultOptions:()=>(0,_.X)(!0,XF.nx.defaultOptions(),{selection:{showCheckBoxesMode:"always",recursive:!1}}),extenders:{controllers:{data:n=>class extends((0,XF.Py)(n)){_handleDataChanged(e){this._selectionController.isRecursiveSelection()&&(!e||"updateSelectionState"!==e.changeType)&&this._selectionController.updateSelectionState({selectedItemKeys:this.option("selectedRowKeys")}),super._handleDataChanged.apply(this,arguments)}loadDescendants(){const e=this,t=super.loadDescendants.apply(e,arguments);return this._selectionController.isRecursiveSelection()&&t.done(()=>{this._selectionController.updateSelectionState({selectedItemKeys:e.option("selectedRowKeys")})}),t}},selection:n=>class extends n{constructor(){super(...arguments),this._updateSelectColumn=h.lQ}init(){super.init.apply(this,arguments),this._selectionStateByKey={}}_getSelectionConfig(){const e=super._getSelectionConfig.apply(this,arguments),{plainItems:t}=e;return e.plainItems=i=>{let r;return i&&(r=this._dataController.getCachedStoreData()),r||(r=t.apply(this,arguments).map(m=>m.data)),r||[]},e.isItemSelected=i=>{const r=this._dataController.keyOf(i);return this.isRowSelected(r)},e.isSelectableItem=i=>!!i,e.getItemData=i=>i,e.allowLoadByRange=void 0,e}renderSelectCheckBoxContainer(e,t){const i=this.component.getView("rowsView"),r=i._renderSelectCheckBox(e,{value:t.row.isSelected,row:t.row,column:t.column});i._attachCheckBoxClickEvent(r)}_getSelectAllNodeKeys(){const{component:e}=this,t=e.getRootNode(),i={},r=[],m=this.isRecursiveSelection();return t&&Sa.foreachNodes(t.children,A=>(void 0!==A.key&&(A.visible||m)&&r.push(A.key),!A.visible||!m&&e.isRowExpanded(A.key,i))),r}isSelectAll(){if(0===(this.option("selectedRowKeys")||[]).length)return!1;const{component:t}=this,i=this._getSelectAllNodeKeys(),r=this.isRecursiveSelection();let m=!1;const A=i.filter(V=>{const X=t.isRowSelected(V,r);return void 0===X&&(m=!0),X});return A.length?A.length===i.length||void 0:!!m&&void 0}selectAll(){const e=this._getSelectAllNodeKeys().filter(t=>!this.isRowSelected(t));return this.focusedItemIndex(-1),this.selectRows(e,!0)}deselectAll(){const e=this._getSelectAllNodeKeys();return this.focusedItemIndex(-1),this.deselectRows(e)}selectedItemKeys(e,t,i,r){const m=this,A=m.option("selectedRowKeys"),X=this.isRecursiveSelection()&&m._normalizeSelectionArgs({keys:(0,C.O9)(e)?e:[]},t,!i);return X&&!(0,h.RL)(X.selectedRowKeys,A)?(m._isSelectionNormalizing=!0,super.selectedItemKeys(X.selectedRowKeys,!1,!1,!1).always(()=>{m._isSelectionNormalizing=!1}).done(ce=>{X.selectedRowsData=ce,m._fireSelectionChanged(X)})):super.selectedItemKeys(e,t,i,r)}changeItemSelection(e,t,i){const r=this.isRecursiveSelection(),m=super.changeItemSelection.bind(this);if(r&&!t.shift){const A=this._dataController.getKeyByRowIndex(e);return this.selectedItemKeys(A,!0,this.isRowSelected(A)).done(()=>{this.isRowSelected(A)&&m(e,t,!0)})}return super.changeItemSelection.apply(this,arguments)}_updateParentSelectionState(e,t){const i=this;let r=t;const m=e.parent;m&&(m.children.length>1&&(!1===t?r=!!m.children.some(V=>i._selectionStateByKey[V.key])&&void 0:!0===t&&(r=!m.children.some(V=>!i._selectionStateByKey[V.key])||void 0)),this._selectionStateByKey[m.key]=r,m.parent&&m.parent.level>=0&&this._updateParentSelectionState(m,r))}_updateChildrenSelectionState(e,t){const i=this,{children:r}=e;r&&r.forEach(m=>{i._selectionStateByKey[m.key]=t,m.children.length>0&&i._updateChildrenSelectionState(m,t)})}_updateSelectionStateCore(e,t){const i=this._dataController;for(let r=0;r<e.length;r++){this._selectionStateByKey[e[r]]=t;const m=i.getNodeByKey(e[r]);m&&(this._updateParentSelectionState(m,t),this._updateChildrenSelectionState(m,t))}}_getSelectedParentKeys(e,t,i){let r;const m=this._dataController.getNodeByKey(e);let A=m&&m.parent,V=[];for(;A&&A.level>=0;){if(V.unshift(A.key),i?!WY(t,A.key)&&this.isRowSelected(A.key):t.indexOf(A.key)>=0){r=A,V=this._getSelectedParentKeys(r.key,t,i).concat(V);break}if(i)break;A=A.parent}return r&&V||[]}_getSelectedChildKeys(e,t){const i=[],r=this._dataController.getNodeByKey(e);return r&&Sa.foreachNodes(r.children,m=>{const A=t.indexOf(m.key);return A<0&&i.push(m.key),A>0||A<0&&void 0===this._selectionStateByKey[m.key]}),i}_normalizeParentKeys(e,t){const i=this;let r=[e];const m=i._getSelectedParentKeys(e,t.selectedRowKeys);if(m.length){r=r.concat(m),r.forEach(V=>{const X=t.selectedRowKeys.indexOf(V);X>=0&&t.selectedRowKeys.splice(X,1)});const A=i._getSelectedChildKeys(m[0],r);t.selectedRowKeys=t.selectedRowKeys.concat(A)}}_normalizeChildrenKeys(e,t){const i=this._dataController.getNodeByKey(e);i&&i.children.forEach(r=>{const m=t.selectedRowKeys.indexOf(r.key);m>=0&&t.selectedRowKeys.splice(m,1),this._normalizeChildrenKeys(r.key,t)})}_normalizeSelectedRowKeysCore(e,t,i,r){const m=this;e.forEach(A=>{if(i&&m.isRowSelected(A)===r)return;m._normalizeChildrenKeys(A,t);const V=t.selectedRowKeys.indexOf(A);r?(V<0&&t.selectedRowKeys.push(A),t.currentSelectedRowKeys.push(A)):(V>=0&&t.selectedRowKeys.splice(V,1),t.currentDeselectedRowKeys.push(A),m._normalizeParentKeys(A,t))})}_normalizeSelectionArgs(e,t,i){let r;const m=Array.isArray(e.keys)?e.keys:[e.keys],A=this.option("selectedRowKeys")||[];return m.length&&(r={currentSelectedRowKeys:[],currentDeselectedRowKeys:[],selectedRowKeys:t?A.slice(0):[]},this._normalizeSelectedRowKeysCore(m,r,t,i)),r}_updateSelectedItems(e){this.updateSelectionState(e),super._updateSelectedItems(e)}_fireSelectionChanged(){this._isSelectionNormalizing||super._fireSelectionChanged.apply(this,arguments)}_isModeLeavesOnly(e){return"leavesOnly"===e}_removeDuplicatedKeys(e){const t=[],i={};return e.forEach(r=>{i[r]||(i[r]=!0,t.push(r))}),t}_getAllChildKeys(e){const t=[],i=this._dataController.getNodeByKey(e);return i&&Sa.foreachNodes(i.children,r=>{t.push(r.key)},!0),t}_getAllSelectedRowKeys(e){let t=[];return e.forEach(i=>{const r=this._getSelectedParentKeys(i,[],!0),m=this._getAllChildKeys(i);t.push.apply(t,r.concat([i],m))}),t=this._removeDuplicatedKeys(t),t}_getParentSelectedRowKeys(e){const t=this,i=[];return e.forEach(r=>{!t._getSelectedParentKeys(r,e).length&&i.push(r)}),i}_getLeafSelectedRowKeys(e){const t=[],i=this._dataController;return e.forEach(r=>{const m=i.getNodeByKey(r);m&&!m.hasChildren&&t.push(r)}),t}isRecursiveSelection(){const e=this.option("selection.mode"),t=this.option("selection.recursive");return"multiple"===e&&t}updateSelectionState(e){const t=e.removedItemKeys||[],i=e.selectedItemKeys||[];this.isRecursiveSelection()&&(this._updateSelectionStateCore(t,!1),this._updateSelectionStateCore(i,!0))}isRowSelected(e,t){const i=super.isRowSelected.apply(this,arguments);return t=t??this.isRecursiveSelection(),!i&&t?e in this._selectionStateByKey&&this._selectionStateByKey[e]:i}getSelectedRowKeys(e){const t=this;if(!t._dataController)return[];let i=super.getSelectedRowKeys.apply(t,arguments);return e&&(this.isRecursiveSelection()&&(i=this._getAllSelectedRowKeys(i)),"all"!==e&&("excludeRecursive"===e?i=t._getParentSelectedRowKeys(i):t._isModeLeavesOnly(e)&&(i=t._getLeafSelectedRowKeys(i)))),i}getSelectedRowsData(e){const t=this._dataController,i=this.getSelectedRowKeys(e)||[],r=[];return i.forEach(m=>{const A=t.getNodeByKey(m);A&&r.push(A.data)}),r}refresh(){return this._selectionStateByKey={},super.refresh.apply(this,arguments)}}},views:{columnHeadersView:n=>class extends((0,XF.tO)(n)){_processTemplate(e,t){const i=this;let r;const m=super._processTemplate(e,t),A=i._columnsController.getFirstDataColumnIndex();return r=m&&"header"===t.rowType&&t.column.index===A?{render(V){"multiple"===i.option("selection.mode")&&i.renderSelectAll(V.container,V.model),m.render(V)}}:m,r}renderSelectAll(e,t){e.addClass("dx-treelist-select-all"),this._renderSelectAllCheckBox(e)}_isSortableElement(e){return super._isSortableElement(e)&&!e.closest(".dx-select-checkbox").length}},rowsView:n=>class extends((0,XF.$O)(n)){_renderIcons(e,t){return super._renderIcons.apply(this,arguments),!t.row.isNewRow&&"multiple"===this.option("selection.mode")&&this._selectionController.renderSelectCheckBoxContainer(e,t),e}_rowClick(e){const t=(0,a.A)(e.event.target);this.isExpandIcon(t)?super._rowClickForTreeList.apply(this,arguments):super._rowClick.apply(this,arguments)}}}}}));var YY=M(2896);Sa.registerModule("search",YY.J);var ZY=M(1076),QY=M(3760);Sa.registerModule("keyboardNavigation",(0,_.X)(!0,{},ZY.S,{extenders:{controllers:{keyboardNavigation:n=>class extends((0,QY.g)(n)){_leftRightKeysHandler(e,t){const i=this.getVisibleRowIndex(),r=this._dataController;if(!e.ctrl)return super._leftRightKeysHandler.apply(this,arguments);{const m=this._getDirectionCodeByKey(e.keyName),A=r.getKeyByRowIndex(i);"nextInRow"===m?r.expandRow(A):r.collapseRow(A)}}}}}}));var qY=M(4318);Sa.registerModule("virtualColumns",qY.j);var PH=M(7214);Sa.registerModule("focus",(0,Lo.A)({},PH.h,{extenders:(0,Lo.A)({},PH.h.extenders,{controllers:(0,Lo.A)({},PH.h.extenders.controllers,{data:n=>class extends(PH.h.extenders.controllers.data(n)){changeRowExpand(e){return this.option("focusedRowEnabled")&&this.isRowExpanded(e)&&this._isFocusedRowInside(e)&&this.option("focusedRowKey",e),super.changeRowExpand.apply(this,arguments)}_isFocusedRowInside(e){const t=this.option("focusedRowKey"),i=this.getRowIndexByKey(t),r=i>=0&&this.getVisibleRows()[i];let m=r&&r.node.parent;for(;m;){if(m.key===e)return!0;m=m.parent}return!1}getParentKey(e){const t=this._dataSource,i=this.getNodeByKey(e),r=new g.cY;return i?r.resolve(i.parent?i.parent.key:void 0):t.load({filter:[t.getKeyExpr(),"=",e]}).done(m=>{const A=m[0];A?r.resolve(t.parentKeyOf(A)):r.resolve()}).fail(r.reject),r.promise()}expandAscendants(e){const t=this,i=t._dataSource,r=new g.cY;return t.getParentKey(e).done(m=>{i&&void 0!==m&&m!==t.option("rootValue")?(i._isNodesInitializing=!0,t.expandRow(m),i._isNodesInitializing=!1,t.expandAscendants(m).done(r.resolve).fail(r.reject)):r.resolve()}).fail(r.reject),r.promise()}getPageIndexByKey(e){const t=this,i=t._dataSource,r=new g.cY;return t.expandAscendants(e).done(()=>{i.load({parentIds:[]}).done(m=>{const A=function eZ(n,e){let t=-1;return n.forEach((i,r)=>{e(i)&&(t=r)}),t}(m,X=>t.keyOf(X.data)===e);let V=-1;A>=0&&(V=Math.floor(A/t.pageSize())),r.resolve(V)}).fail(r.reject)}).fail(r.reject),r.promise()}}})})}));var nZ=M(931);Sa.registerModule("rowDragging",nZ.e);const oZ=yY;class rZ{constructor(e){var t;this.collapsed=!1,this.key=e.key,this.children=e.children.map(i=>i.key),this.parentKey=null===(t=e.parent)||void 0===t?void 0:t.key}hasChildren(){return this.children.length>0}removeChild(e){const t=this.children.indexOf(e.key);t>-1&&(this.children=this.children.splice(t,1))}equal(e){return!(!e||e.key!==this.key||e.parentKey!==this.parentKey||this.children.length!==e.children.length||this.children.some((t,i)=>t!==e.children[i]))}}class sZ{constructor(){this._resetHash()}clear(){this._resetHash()}applyNodes(e,t){this._rootValue!==t&&(this._resetHash(),this._rootValue=t),this._removeNonExistentNodes(e.map(i=>i.key)),e.forEach(i=>this._applyNode(i)),this._validateHash()}saveExpandedState(e){this._hasCollapsed=!1,this._forEachState(t=>{t.hasChildren()&&!e.includes(t.key)&&(t.collapsed=!0,this._hasCollapsed=!0)})}getExpandedKeys(){if(this._hasCollapsed){const e=[];return this._forEachState(t=>{t.hasChildren()&&!t.collapsed&&e.push(t.key)}),e}return null}_resetHash(){this._nodeHash={},this._hasCollapsed=!1}_getNodeState(e){return this._nodeHash[e]}_removeNonExistentNodes(e){e&&this._forEachState(t=>{e.includes(t.key)||this._removeStateWithChildren(t)})}_removeStateWithChildren(e){const t=this._getNodeState(e);if(t){t.children.forEach(r=>this._removeStateWithChildren(r));const i=this._getNodeState(t.parentKey);i&&i.removeChild(t),delete this._nodeHash[e]}}_applyNode(e){const t=new rZ(e),i=this._getNodeState(e.key);null!=i&&i.equal(t)||(this._nodeHash[e.key]=t,this._expandTreelineToNode(e.key))}_expandTreelineToNode(e){const t=this._getNodeState(e);let i=this._getNodeState(t?.parentKey);for(;i;)i.collapsed=!1,i=this._getNodeState(i.parentKey)}_validateHash(){Object.keys(this._nodeHash).forEach(e=>{const t=this._getNodeState(e),i=t?.parentKey;i!==this._rootValue&&!this._getNodeState(i)&&this._removeStateWithChildren(e)})}_forEachState(e){Object.keys(this._nodeHash).forEach(t=>{const i=this._nodeHash[t];i&&e(i)})}}class lZ{constructor(e){this._gantt=e,this._$treeList=this._gantt._$treeList}getTreeList(){const{keyExpr:e,parentIdExpr:t}=this._gantt.option("tasks");return this._treeList=this._gantt._createComponent(this._$treeList,oZ,{dataSource:this.createDataSource(this._gantt._tasksRaw,e),keyExpr:e,filterSyncEnabled:!0,parentIdExpr:t,columns:this.getColumns(),columnResizingMode:"nextColumn",height:this._getHeight(),width:this._gantt.option("taskListWidth"),selection:{mode:Pu.getSelectionMode(this._gantt.option("allowSelection"))},selectedRowKeys:Pu.getArrayFromOneElement(this._gantt.option("selectedRowKey")),sorting:this._gantt.option("sorting"),filterRow:this._gantt.option("filterRow"),headerFilter:this._gantt.option("headerFilter"),scrolling:{showScrollbar:"onHover",mode:"virtual"},allowColumnResizing:!0,autoExpandAll:!0,showRowLines:this._gantt.option("showRowLines"),rootValue:this._gantt.option("rootValue"),onContentReady:i=>{this._onContentReady(i)},onSelectionChanged:i=>{this._onSelectionChanged(i)},onRowCollapsed:i=>{this._onRowCollapsed(i)},onRowExpanded:i=>{this._onRowExpanded(i)},onRowPrepared:i=>{this._onRowPrepared(i)},onContextMenuPreparing:i=>{this._onContextMenuPreparing(i)},onRowClick:i=>{this.onRowClick(i)},onRowDblClick:i=>{this.onRowDblClick(i)},onNodesInitialized:i=>{this._onNodesInitialized(i)},_disableDeprecationWarnings:!0}),this._treeList}onAfterTreeListCreate(){this._postponedGanttInitRequired&&(this._initGanttOnContentReady({component:this._treeList}),delete this._postponedGanttInitRequired)}_onContentReady(e){this._treeList?this._initGanttOnContentReady(e):this._postponedGanttInitRequired=!0,this._gantt._onTreeListContentReady(e)}_initGanttOnContentReady(e){e.component.getDataSource()&&(this._gantt._initGanttView(),this._initScrollSync(e.component)),this._gantt._sortAndFilter(),this._gantt._sizeHelper.updateGanttRowHeights()}_onSelectionChanged(e){const t=e.currentSelectedRowKeys[0];this._gantt._setGanttViewOption("selectedRowKey",t),this._gantt._setOptionWithoutOptionChange("selectedRowKey",t),this._gantt._actionsManager.raiseSelectionChangedAction(t)}_onRowCollapsed(e){this._gantt._onTreeListRowExpandChanged(e,!1)}_onRowExpanded(e){this._gantt._onTreeListRowExpandChanged(e,!0)}_onRowPrepared(e){"data"===e.rowType&&e.node.children.length>0&&(0,a.A)(e.rowElement).addClass("dx-gantt-collapsable-row")}_onContextMenuPreparing(e){var t,i;if("header"===e.target)return;"data"===(null===(t=e.row)||void 0===t?void 0:t.rowType)&&this.setOption("selectedRowKeys",[e.row.data[this._gantt.option("tasks.keyExpr")]]),e.items=[];const r={cancel:!1,event:e.event,type:"task",key:null===(i=e.row)||void 0===i?void 0:i.key,position:{x:e.event.pageX,y:e.event.pageY}};this._gantt._showPopupMenu(r)}_getHeight(){return(0,D.Oq)(this._$treeList)?(0,D.Oq)(this._$treeList):(this._gantt._hasHeight=(0,C.O9)(this._gantt.option("height"))&&""!==this._gantt.option("height"),this._gantt._hasHeight?"100%":"")}_initScrollSync(e){const t=e.getScrollable();t&&(t.off("scroll"),t.on("scroll",i=>{this._onScroll(i)}))}_onScroll(e){const t=this._gantt._ganttView.getTaskAreaContainer();t.scrollTop!==e.component.scrollTop()&&(t.scrollTop=e.component.scrollTop())}_correctRowsViewRowHeight(e){const t=this._treeList._views&&this._treeList._views.rowsView;t?._rowHeight!==e&&(t._rowHeight=e)}_skipUpdateTreeListDataSource(){return this._gantt.option("validation.autoUpdateParentTasks")}selectRows(e){this.setOption("selectedRowKeys",e)}scrollBy(e){const t=this._treeList.getScrollable();if(t){const i=e-t.scrollTop();Math.abs(i)>=2&&t.scrollBy({left:0,top:i})}}updateDataSource(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this._skipUpdateTreeListDataSource()||t)this.setDataSource(e);else if(i){const r=this._treeList.option("dataSource");this._gantt._onParentTasksRecalculated(r)}}setDataSource(e){this.setOption("dataSource",this.createDataSource(e))}createDataSource(e,t){return e&&new aC.q({store:new Ay.A({data:e,key:t||this.getOption("keyExpr")})})}onRowClick(e){this._gantt._actionsManager.raiseTaskClickAction(e.key,e.event)}onRowDblClick(e){this._gantt._actionsManager.raiseTaskDblClickAction(e.key,e.event)&&this._gantt._ganttView._ganttViewCore.showTaskEditDialog()}saveExpandedKeys(){const e=this._treeList,t=e?.getVisibleRows().length;if(t>0){const i=this.getAllNodes(),r=this.getOption("expandedRowKeys");if(r&&i.length!==t){const A=this.getNodesState();A.applyNodes(i,this.getOption("rootValue")),A.saveExpandedState(r)}}}_onNodesInitialized(e){const t=this.getNodesState(),i=t.getExpandedKeys(),r=this.getAllNodes();t.applyNodes(r,this.getOption("rootValue"));const m=t.getExpandedKeys();if(m&&this.setOption("expandedRowKeys",m),this.isExpandedStateChanged(i,m)){const A=r.reduce((V,X)=>(V[X.key]=!m||m.includes(X.key),V),{});this._gantt._ganttView.applyTasksExpandedState(A)}t.clear()}getNodesState(){return this._nodeState||(this._nodeState=new sZ),this._nodeState}getAllNodes(){var e,t;const i=null===(e=this._treeList)||void 0===e||null===(e=e.getDataSource())||void 0===e?void 0:e.store();if(!i||null===(t=this._treeList)||void 0===t||!t.getNodeByKey)return[];const r=(0,fa.Hz)(i.key());return i._array.map(m=>this._treeList.getNodeByKey(r(m))).filter(m=>!!m)}isExpandedStateChanged(e,t){return(null!==e||null!==t)&&(e?.length!==t?.length||e.some((i,r)=>i!==t[r]))}getOffsetHeight(){return this._gantt._treeList._$element.get(0).offsetHeight}getRowHeight(){const e=this._treeList._$element.find(".dx-data-row");let t=e.length?(0,za.N)(e.last().get(0)).height:34;return t||(t=34),this._correctRowsViewRowHeight(t),t}getHeaderHeight(){return(0,za.N)(this._treeList._$element.find(".dx-treelist-headers").get(0)).height}getColumns(){const e=this._gantt.option("columns");if(e)for(let t=0;t<e.length;t++){const i=e[t];(i.dataField===this._gantt.option("tasks.keyExpr")||i.dataField===this._gantt.option("tasks.parentIdExpr"))&&!i.dataType&&(i.dataType="object")}return e}getSievedItems(){const e=this._treeList.getRootNode();if(!e)return;const t=[];Pu.convertTreeToList(e,t);const i=Pu.compileGettersByOption(this._gantt.option("tasks"));return this._gantt._validateSourceData("tasks",t).map(Pu.prepareMapHandler(i))}setOption(e,t){this._treeList&&this._treeList.option(e,t)}getOption(e){var t;return null===(t=this._treeList)||void 0===t?void 0:t.option(e)}onTaskInserted(e,t){if((0,C.O9)(t)){const i=this.getOption("expandedRowKeys");-1===i.indexOf(t)&&(i.push(t),this.setOption("expandedRowKeys",i))}this.selectRows(Pu.getArrayFromOneElement(e)),this.setOption("focusedRowKey",e)}getDataSource(){var e;return null===(e=this._treeList)||void 0===e?void 0:e.getDataSource()}}var cZ=M(2499),m3=M.n(cZ);class uZ{constructor(e,t){this._element=e,this._scrollView=t._createComponent(this._element,Af.A,{scrollByContent:!1,scrollByThumb:!0,showScrollbar:"onHover",direction:"both",onScroll:()=>{t.updateView()}})}get scrollTop(){return this._scrollView.scrollTop()}set scrollTop(e){const t=e-this._scrollView.scrollTop();0!==t&&this._scrollView.scrollBy({left:0,top:t})}get scrollLeft(){return this._scrollView.scrollLeft()}set scrollLeft(e){const t=e-this._scrollView.scrollLeft();0!==t&&this._scrollView.scrollBy({left:t,top:0})}get scrollWidth(){return this._scrollView.scrollWidth()}get scrollHeight(){return this._scrollView.scrollHeight()}get isExternal(){return!0}getWidth(){return this._element.offsetWidth}getHeight(){return this._element.offsetHeight}getElement(){return this._element}}var _3=M(7280);class pZ extends Sl.A{_init(){super._init(),this._onSelectionChanged=this._createActionByOption("onSelectionChanged"),this._onViewTypeChanged=this._createActionByOption("onViewTypeChanged"),this._onScroll=this._createActionByOption("onScroll"),this._onDialogShowing=this._createActionByOption("onDialogShowing"),this._onPopupMenuShowing=this._createActionByOption("onPopupMenuShowing"),this._onPopupMenuHiding=this._createActionByOption("onPopupMenuHiding"),this._expandAll=this._createActionByOption("onExpandAll"),this._collapseAll=this._createActionByOption("onCollapseAll"),this._taskClick=this._createActionByOption("onTaskClick"),this._taskDblClick=this._createActionByOption("onTaskDblClick"),this._onAdjustControl=this._createActionByOption("onAdjustControl")}_initMarkup(){const e=function dZ(){if(!m3())throw is.A.Error("E1041","devexpress-gantt");return m3()}();this._ganttViewCore=new e(this.$element().get(0),this,{showResources:this.option("showResources"),showDependencies:this.option("showDependencies"),taskTitlePosition:this._getTaskTitlePosition(this.option("taskTitlePosition")),firstDayOfWeek:this._getFirstDayOfWeek(this.option("firstDayOfWeek")),allowSelectTask:this.option("allowSelection"),startDateRange:this.option("startDateRange"),endDateRange:this.option("endDateRange"),editing:this._parseEditingSettings(this.option("editing")),validation:this.option("validation"),stripLines:{stripLines:this.option("stripLines")},areHorizontalBordersEnabled:this.option("showRowLines"),areAlternateRowsEnabled:!1,viewType:this._getViewTypeByScaleType(this.option("scaleType")),viewTypeRange:this._parseViewTypeRangeSettings(this.option("scaleTypeRange")),cultureInfo:this._getCultureInfo(),taskTooltipContentTemplate:this.option("taskTooltipContentTemplate"),taskProgressTooltipContentTemplate:this.option("taskProgressTooltipContentTemplate"),taskTimeTooltipContentTemplate:this.option("taskTimeTooltipContentTemplate"),taskContentTemplate:this.option("taskContentTemplate"),sieve:this.option("sieve")}),this._selectTask(this.option("selectedRowKey")),this.updateBarItemsState();const t=this.option("visualState");t&&(this._restoreStateFrameId=(0,Zl.x)(()=>this._restoreVisualState(t)))}_dispose(){super._dispose(),(0,Zl.u)(this._restoreStateFrameId)}_restoreVisualState(e){e.fullScreen&&this._ganttViewCore.setFullScreenMode()}_getFirstDayOfWeek(e){return(0,C.O9)(e)?e:sa.A.firstDayOfWeekIndex()}getTaskAreaContainer(){return this._ganttViewCore.getTaskAreaContainer()}getBarManager(){return this._ganttViewCore.barManager}executeCoreCommand(e){const t=this._ganttViewCore.getCommandByKey(e);t&&t.execute()}changeTaskExpanded(e,t){this._ganttViewCore.changeTaskExpanded(e,t)}updateView(){var e;null===(e=this._ganttViewCore)||void 0===e||e.updateView()}updateBarItemsState(){this._ganttViewCore.barManager.updateItemsState([])}setWidth(e){this._ganttViewCore.setWidth(e)}_onDimensionChanged(){this._ganttViewCore.onBrowserWindowResize()}_selectTask(e){this._ganttViewCore.selectTaskById(e)}_update(e){var t;null===(t=this._ganttViewCore)||void 0===t||t.updateWithDataReload(e)}_getCultureInfo(){return{monthNames:sa.A.getMonthNames("wide"),dayNames:sa.A.getDayNames("wide"),abbrMonthNames:sa.A.getMonthNames("abbreviated"),abbrDayNames:sa.A.getDayNames("abbreviated"),quarterNames:this._getQuarterNames(),amText:this._getAmText(),pmText:this._getPmText(),start:Wn.A.format("dxGantt-dialogStartTitle"),end:Wn.A.format("dxGantt-dialogEndTitle"),progress:Wn.A.format("dxGantt-dialogProgressTitle")}}_getAmText(){return this._hasAmPM()?sa.A.getPeriodNames()[0]:""}_getPmText(){return this._hasAmPM()?sa.A.getPeriodNames()[1]:""}_hasAmPM(){const e=new Date(Date.UTC(2012,11,12,3,0,0));return e.toLocaleTimeString(_3.A.locale()).match(/am|pm/i)||e.toString().match(/am|pm/i)}_getQuarterNames(){const e=Wn.A.format("dxGantt-quarter");return e?[(0,Ea.GP)(e,1),(0,Ea.GP)(e,2),(0,Ea.GP)(e,3),(0,Ea.GP)(e,4)]:sa.A.getQuarterNames()}_getTaskTitlePosition(e){switch(e){case"outside":return 1;case"none":return 2;default:return 0}}_getViewTypeByScaleType(e){switch(e){case"minutes":return 0;case"hours":return 1;case"sixHours":return 2;case"days":return 3;case"weeks":return 4;case"months":return 5;case"quarters":return 6;case"years":return 7;default:return}}_parseEditingSettings(e){return{enabled:e.enabled,allowDependencyDelete:e.allowDependencyDeleting,allowDependencyInsert:e.allowDependencyAdding,allowTaskDelete:e.allowTaskDeleting,allowTaskInsert:e.allowTaskAdding,allowTaskUpdate:e.allowTaskUpdating,allowResourceDelete:e.allowResourceDeleting,allowResourceInsert:e.allowResourceAdding,allowResourceUpdate:e.allowResourceUpdating,allowTaskResourceUpdate:e.allowTaskResourceUpdating}}_parseViewTypeRangeSettings(e){return{min:this._getViewTypeByScaleType(e.min),max:this._getViewTypeByScaleType(e.max)}}_optionChanged(e){switch(e.name){case"width":super._optionChanged(e),this._ganttViewCore.setWidth(e.value);break;case"height":this._ganttViewCore.setHeight(e.value);break;case"tasks":case"dependencies":case"resources":case"resourceAssignments":this._sieveOptions=void 0,this._update(!0);break;case"showResources":this._ganttViewCore.setShowResources(e.value);break;case"showDependencies":this._ganttViewCore.setShowDependencies(e.value);break;case"taskTitlePosition":this._ganttViewCore.setTaskTitlePosition(this._getTaskTitlePosition(e.value));break;case"firstDayOfWeek":this._ganttViewCore.setFirstDayOfWeek(this._getFirstDayOfWeek(e.value));break;case"startDateRange":this._ganttViewCore.setStartDateRange(e.value);break;case"endDateRange":this._ganttViewCore.setEndDateRange(e.value);break;case"allowSelection":this._ganttViewCore.setAllowSelection(e.value);break;case"selectedRowKey":this._selectTask(e.value);break;case"editing":this._ganttViewCore.setEditingSettings(this._parseEditingSettings(e.value));break;case"validation":this._ganttViewCore.setValidationSettings(e.value),this._update(!0);break;case"showRowLines":this._ganttViewCore.setRowLinesVisible(e.value);break;case"scaleType":this._ganttViewCore.setViewType(this._getViewTypeByScaleType(e.value));break;case"scaleTypeRange":this._ganttViewCore.setViewTypeRange(this._getViewTypeByScaleType(e.value.min),this._getViewTypeByScaleType(e.value.max));break;case"stripLines":this._ganttViewCore.setStripLines({stripLines:e.value});break;case"taskTooltipContentTemplate":this._ganttViewCore.setTaskTooltipContentTemplate(e.value);break;case"taskProgressTooltipContentTemplate":this._ganttViewCore.setTaskProgressTooltipContentTemplate(e.value);break;case"taskTimeTooltipContentTemplate":this._ganttViewCore.setTaskTimeTooltipContentTemplate(e.value);break;case"taskContentTemplate":this._ganttViewCore.setTaskContentTemplate(e.value);break;case"sieve":this._sortAndFilter(e.value);break;default:super._optionChanged(e)}}get bars(){return this.option("bars")}getRowHeight(){return this.option("rowHeight")}getHeaderHeight(){return this.option("headerHeight")}getGanttTasksData(){const e=this.option("tasks"),t=this.getSieveOptions();return null!=t&&t.sievedItems&&null!=t&&t.sieveColumn?t.sievedItems:e}_sortAndFilter(e){this._sieveOptions=e,this._update(!(null!=e&&e.expandTasks));const t=this.option("selectedRowKey");this._selectTask(t)}getSieveOptions(){return this._sieveOptions}getGanttDependenciesData(){return this.option("dependencies")}getGanttResourcesData(){return this.option("resources")}getGanttResourceAssignmentsData(){return this.option("resourceAssignments")}getGanttWorkTimeRules(){return null}getExternalTaskAreaContainer(e){return this._taskAreaContainer||(this._taskAreaContainer=new uZ(e,this)),this._taskAreaContainer}prepareExternalTaskAreaContainer(e,t){null!=t&&t.height&&this._taskAreaContainer._scrollView.option("height",t.height)}changeGanttTaskSelection(e,t){this._onSelectionChanged({id:e,selected:t})}onGanttScroll(e){this._onScroll({scrollTop:e})}showDialog(e,t,i,r){this._onDialogShowing({name:e,parameters:t,callback:i,afterClosing:r})}getModelChangesListener(){return this.option("modelChangesListener")}getExportInfo(){return this.option("exportInfo")}showPopupMenu(e){this._onPopupMenuShowing(e)}hidePopupMenu(e){this._onPopupMenuHiding(e)}getMainElement(){return this.option("mainElement").get(0)}adjustControl(){this._onAdjustControl()}getRequireFirstLoadParentAutoCalc(){return this.option("validation.autoUpdateParentTasks")}collapseAll(){this._collapseAll()}expandAll(){this._expandAll()}onTaskClick(e,t){return this._taskClick({key:e,event:t}),!0}onTaskDblClick(e,t){return this._taskDblClick({key:e,event:t})}onGanttViewContextMenu(e,t,i){return!0}getFormattedDateText(e){let t="";if(e){const i=sa.A.format(e,"shortDate"),r=this._hasAmPM()?"hh:mm a":"HH:mm";t=i+" "+sa.A.format(e,r)}return t}destroyTemplate(e){(0,a.A)(e).empty()}onTaskAreaSizeChanged(e){const t=this._taskAreaContainer._scrollView;if((0,C.O9)(e?.height)){const i=e?.height>this._taskAreaContainer.getHeight()?"both":"horizontal";t.option("direction",i)}}updateGanttViewType(e){this._onViewTypeChanged({type:e})}getTreeListTableStyle(){return this.callExportHelperMethod("getTreeListTableStyle")}getTreeListColCount(){return this.callExportHelperMethod("getTreeListColCount")}getTreeListHeaderInfo(e){return this.callExportHelperMethod("getTreeListHeaderInfo",e)}getTreeListCellInfo(e,t,i){return this.callExportHelperMethod("getTreeListCellInfo",i,t)}getTreeListEmptyDataCellInfo(){return this.callExportHelperMethod("getTreeListEmptyDataCellInfo")}callExportHelperMethod(e){const t=this.option("exportHelper");for(var i=arguments.length,r=new Array(i>1?i-1:0),m=1;m<i;m++)r[m-1]=arguments[m];return t[e](...r)}applyTasksExpandedState(e){var t;null===(t=this._ganttViewCore)||void 0===t||t.applyTasksExpandedState(e)}getVisualStateToRestore(){var e;return{fullScreen:null===(e=this._ganttViewCore)||void 0===e?void 0:e.isInFullScreenMode()}}}class gZ{constructor(){this._waitingForGanttViewReady=!1,this._waitingForTreeListReady=!1,this._completionActions=[]}onGanttViewReady(){this._stopWaitForGanttViewReady(),this.executeActionsIfPossible()}onTreeListReady(){this._stopWaitForTreeListReady(),this.executeActionsIfPossible()}addCompletionAction(e,t,i){e&&(t&&this._startWaitForGanttViewReady(),i&&this._startWaitForTreeListReady(),this._completionActions.push(e))}executeActionsIfPossible(){this._canExecuteActions()&&(this._completionActions.forEach(e=>e()),this._completionActions=[])}_startWaitForGanttViewReady(){this._waitingForGanttViewReady=!0}_stopWaitForGanttViewReady(){this._waitingForGanttViewReady=!1}_startWaitForTreeListReady(){this._waitingForTreeListReady=!0}_stopWaitForTreeListReady(){this._waitingForTreeListReady=!1}_canExecuteActions(){return!(this._waitingForGanttViewReady||this._waitingForTreeListReady)}}const v3=(0,gr.zk)();(0,y.A)("dxGantt",class vZ extends Sl.A{_init(){super._init(),hC.A.logHeaderFilterDeprecatedWarningIfNeed(this),this._initGantt(),this._isGanttRendered=!1,this._initHelpers()}_initGantt(){this._refreshDataSources()}_initMarkup(){super._initMarkup(),this.$element().addClass("dx-gantt"),this._$toolbarWrapper=(0,a.A)("<div>").addClass("dx-gantt-toolbar-wrapper").appendTo(this.$element()),this._$toolbar=(0,a.A)("<div>").appendTo(this._$toolbarWrapper),this._$mainWrapper=(0,a.A)("<div>").addClass("dx-gantt-main-wrapper").appendTo(this.$element()),this._$treeListWrapper=(0,a.A)("<div>").addClass("dx-gantt-treelist-wrapper").appendTo(this._$mainWrapper),this._$treeList=(0,a.A)("<div>").appendTo(this._$treeListWrapper),this._$splitter=(0,a.A)("<div>").appendTo(this._$mainWrapper),this._$ganttView=(0,a.A)("<div>").addClass("dx-gantt-view").appendTo(this._$mainWrapper),this._$dialog=(0,a.A)("<div>").appendTo(this.$element()),this._$loadPanel=(0,a.A)("<div>").appendTo(this.$element()),this._$contextMenu=(0,a.A)("<div>").appendTo(this.$element())}_clean(){var e,t;this._savedGanttViewState=null===(e=this._ganttView)||void 0===e?void 0:e.getVisualStateToRestore(),null===(t=this._ganttView)||void 0===t||t._ganttViewCore.cleanMarkup(),delete this._ganttView,delete this._dialogInstance,delete this._loadPanel,delete this._exportHelper,super._clean()}_refresh(){this._isGanttRendered=!1,this._contentReadyRaised=!1,super._refresh()}_fireContentReadyAction(){this._contentReadyRaised||super._fireContentReadyAction(),this._contentReadyRaised=!0}_dimensionChanged(){var e;null===(e=this._ganttView)||void 0===e||e._onDimensionChanged()}_visibilityChanged(e){e&&this._refreshGantt()}_refreshGantt(){this._refreshDataSources(),this._refresh()}_refreshDataSources(){this._refreshDataSource("tasks"),this._refreshDataSource("dependencies"),this._refreshDataSource("resources"),this._refreshDataSource("resourceAssignments")}_renderContent(){this._isMainElementVisible=this.$element().is(":visible"),this._isMainElementVisible&&!this._isGanttRendered&&(this._isGanttRendered=!0,this._renderBars(),this._renderTreeList(),this._renderSplitter())}_renderTreeList(){this._ganttTreeList=new lZ(this),this._treeList=this._ganttTreeList.getTreeList(),this._ganttTreeList.onAfterTreeListCreate()}_renderSplitter(){this._splitter=this._createComponent(this._$splitter,SH,{container:this.$element(),leftElement:this._$treeListWrapper,rightElement:this._$ganttView,onApplyPanelSize:e=>{this._sizeHelper.onApplyPanelSize(e)}}),this._splitter.option("initialLeftPanelWidth",this.option("taskListWidth"))}_renderBars(){this._bars=[],this._toolbar=new JX(this._$toolbar,this),this._updateToolbarContent(),this._bars.push(this._toolbar),this._contextMenuBar=new qX(this._$contextMenu,this),this._updateContextMenu(),this._bars.push(this._contextMenuBar)}_initHelpers(){this._mappingHelper=new XX(this),this._customFieldsManager=new VX(this),this._actionsManager=new NX(this),this._ganttTemplatesManager=new ZX(this),this._sizeHelper=new YX(this),this._dataProcessingHelper=new gZ}_initGanttView(){this._ganttView||(this._ganttView=this._createComponent(this._$ganttView,pZ,{width:"100%",height:this._ganttTreeList.getOffsetHeight(),rowHeight:this._ganttTreeList.getRowHeight(),headerHeight:this._ganttTreeList.getHeaderHeight(),tasks:this._tasks,dependencies:this._dependencies,resources:this._resources,resourceAssignments:this._resourceAssignments,allowSelection:this.option("allowSelection"),selectedRowKey:this.option("selectedRowKey"),showResources:this.option("showResources"),showDependencies:this.option("showDependencies"),startDateRange:this.option("startDateRange"),endDateRange:this.option("endDateRange"),taskTitlePosition:this.option("taskTitlePosition"),firstDayOfWeek:this.option("firstDayOfWeek"),showRowLines:this.option("showRowLines"),scaleType:this.option("scaleType"),scaleTypeRange:this.option("scaleTypeRange"),editing:this.option("editing"),validation:this.option("validation"),stripLines:this.option("stripLines"),bars:this._bars,mainElement:this.$element(),onSelectionChanged:e=>{this._ganttTreeList.selectRows(Pu.getArrayFromOneElement(e.id))},onViewTypeChanged:e=>{this._onViewTypeChanged(e.type)},onScroll:e=>{this._ganttTreeList.scrollBy(e.scrollTop)},onDialogShowing:this._showDialog.bind(this),onPopupMenuShowing:this._showPopupMenu.bind(this),onPopupMenuHiding:this._hidePopupMenu.bind(this),onExpandAll:this._expandAll.bind(this),onCollapseAll:this._collapseAll.bind(this),modelChangesListener:LX_create(this),exportHelper:this._getExportHelper(),taskTooltipContentTemplate:this._ganttTemplatesManager.getTaskTooltipContentTemplateFunc(this.option("taskTooltipContentTemplate")),taskProgressTooltipContentTemplate:this._ganttTemplatesManager.getTaskProgressTooltipContentTemplateFunc(this.option("taskProgressTooltipContentTemplate")),taskTimeTooltipContentTemplate:this._ganttTemplatesManager.getTaskTimeTooltipContentTemplateFunc(this.option("taskTimeTooltipContentTemplate")),taskContentTemplate:this._ganttTemplatesManager.getTaskContentTemplateFunc(this.option("taskContentTemplate")),onTaskClick:e=>{this._ganttTreeList.onRowClick(e)},onTaskDblClick:e=>{this._ganttTreeList.onRowDblClick(e)},onAdjustControl:()=>{this._sizeHelper.onAdjustControl()},onContentReady:this._onGanttViewContentReady.bind(this),visualState:this._savedGanttViewState}),delete this._savedGanttViewState)}_onGanttViewContentReady(e){this._isParentAutoUpdateMode()||this._fireContentReadyAction()}_isParentAutoUpdateMode(){return this.option("validation.autoUpdateParentTasks")}_onTreeListContentReady(e){this._isParentAutoUpdateMode()&&this._treeListParentRecalculatedDataUpdating&&this._fireContentReadyAction(),delete this._treeListParentRecalculatedDataUpdating,this._dataProcessingHelper.onTreeListReady()}_onViewTypeChanged(e){this.option("scaleType",this._actionsManager._getScaleType(e))}_refreshDataSource(e){let t=this[`_${e}Option`];t&&(t.dispose(),delete this[`_${e}Option`],delete this[`_${e}`]),t=new BX(e,this._getLoadPanel.bind(this),(i,r)=>{this._dataSourceChanged(i,r)}),t.option("dataSource",this._getSpecificDataSourceOption(e)),t._refreshDataSource(),this[`_${e}Option`]=t}_getSpecificDataSourceOption(e){const t=this.option(`${e}.dataSource`);return!t||Array.isArray(t)?{store:{type:"array",data:t??[],key:this.option(`${e}.keyExpr`)}}:t}_dataSourceChanged(e,t){const i=Pu.compileGettersByOption(this.option(e)),r=this._validateSourceData(e,t),m=r.map(Pu.prepareMapHandler(i));if(this[`_${e}`]=m,this._setGanttViewOption(e,m),"tasks"===e){var A,V,X;this._tasksRaw=r;const ce=!(null!==(A=this._ganttTreeList)&&void 0!==A&&A.getDataSource()||this._ganttView);null===(V=this._ganttTreeList)||void 0===V||V.saveExpandedKeys(),null===(X=this._ganttTreeList)||void 0===X||X.updateDataSource(r,ce)}}_validateSourceData(e,t){return t&&"tasks"===e?this._validateTaskData(t):t}_validateTaskData(e){const t=(0,fa.Hz)(this.option("tasks.keyExpr")),i=(0,fa.Hz)(this.option("tasks.parentIdExpr")),r=this.option("rootValue")??"dx_dxt_gantt_default_root_value",m={};for(let V=0;V<e.length;V++){const X=e[V];if(X){const ce=t(X),_e=ce===r,Me=m[ce]??(m[ce]={key:ce,children:[]});if(!_e){const Ve=i(X)??r,Je=m[Ve]??(m[Ve]={key:Ve,children:[]});Je.children.push(Me),Me.parent=Je}}}const A=[r];return this._appendChildKeys(m[r],A),e.filter(V=>A.indexOf(t(V))>-1)}_appendChildKeys(e,t){const i=e?.children;for(let r=0;r<i?.length;r++){const m=i[r];t.push(m.key),this._appendChildKeys(m,t)}}_onRecordInserted(e,t,i){const r=this[`_${e}Option`];if(r){const m=Pu.getStoreObject(this.option(e),t),A="tasks"===e;A&&this._customFieldsManager.addCustomFieldsDataFromCache("gantt_new_task_key",m),r.insert(m,V=>{const ce=(0,fa.Hz)(this.option(`${e}.keyExpr`))(V);i(ce),this._executeFuncSetters(e,t,ce),this._dataProcessingHelper.addCompletionAction(()=>{this._actionsManager.raiseInsertedAction(e,m,ce)},!0,A),this._ganttTreeList.saveExpandedKeys(),r._reloadDataSource().done(_e=>{A&&this._ganttTreeList.onTaskInserted(ce,t.parentId)})})}}_onRecordUpdated(e,t,i){const r=this[`_${e}Option`],m="tasks"===e;if(r){const A=this._mappingHelper.convertCoreToMappedData(e,i);m&&this._customFieldsManager.cache.hasData(t)&&this._customFieldsManager.addCustomFieldsDataFromCache(t,A),r.update(t,A,()=>{this._executeFuncSetters(e,i,t),this._ganttTreeList.saveExpandedKeys(),this._dataProcessingHelper.addCompletionAction(()=>{this._actionsManager.raiseUpdatedAction(e,A,t)},!0,m),r._reloadDataSource()})}}_onRecordRemoved(e,t,i){const r=this[`_${e}Option`];r&&r.remove(t,()=>{this._ganttTreeList.saveExpandedKeys(),this._dataProcessingHelper.addCompletionAction(()=>{this._actionsManager.raiseDeletedAction(e,t,this._mappingHelper.convertCoreToMappedData(e,i))},!0,"tasks"===e),r._reloadDataSource()})}_onParentTaskUpdated(e){const t=this.getTaskDataByCoreData(e);this._actionsManager.raiseUpdatedAction("tasks",t,e.id)}_onParentTasksRecalculated(e){if(!this.isSieving){const t=Pu.compileSettersByOption(this.option("tasks")),i=this._customFieldsManager.appendCustomFields(e.map(Pu.prepareSetterMapHandler(t)));setTimeout(()=>{var r;this._treeListParentRecalculatedDataUpdating=!0,null===(r=this._ganttTreeList)||void 0===r||r.setDataSource(i)})}this.isSieving=!1}_onGanttViewCoreUpdated(){this._dataProcessingHelper.onGanttViewReady()}_executeFuncSetters(e,t,i){const r=Pu.compileFuncSettersByOption(this.option(e)),m=Object.keys(r).filter(A=>(0,C.O9)(t[A]));if(m.length>0){const A=this._getDataSourceItem(e,i);m.forEach(V=>{(0,r[V])(A,t[V])})}}_sortAndFilter(){var e,t,i;const r=this._treeList,m=r.getVisibleColumns(),A=m.filter(Je=>Je.sortIndex>-1),V=A.map(Je=>({sortIndex:Je.sortIndex,sortOrder:Je.sortOrder})),X=!this._compareSortedState(null===(e=this._savedSortFilterState)||void 0===e?void 0:e.sort,V),ce=r.option("filterValue"),_e=r.option("expandNodesOnFiltering")&&ce!==(null===(t=this._savedSortFilterState)||void 0===t?void 0:t.filter),Me=A[0]||m.filter(Je=>{var rt;return(0,C.O9)(Je.filterValue)||(null===(rt=Je.filterValues)||void 0===rt?void 0:rt.length)})[0],Ve=(null===(i=this._savedSortFilterState)||void 0===i?void 0:i.sieveColumn)&&!Me;if(Me||Ve){const Je=Me&&{sievedItems:this._ganttTreeList.getSievedItems(),sieveColumn:Me,expandTasks:_e||ce&&X};this.isSieving=!Ve,this._setGanttViewOption("sieve",Je)}this._savedSortFilterState={sort:V,filter:ce,sieveColumn:Me}}_compareSortedState(e,t){return!(!e||!t||e.length!==t.length)&&e.every((i,r)=>i.sortIndex===t[r].sortIndex&&i.sortOrder===t[r].sortOrder)}_getToolbarItems(){return this.option("toolbar.items")||[]}_updateToolbarContent(){const e=this._getToolbarItems();e.length?this._$toolbarWrapper.show():this._$toolbarWrapper.hide(),this._toolbar&&this._toolbar.createItems(e),this._updateBarItemsState()}_updateContextMenu(){const e=this.option("contextMenu");e.enabled&&this._contextMenuBar&&(this._contextMenuBar.createItems(e.items),this._updateBarItemsState())}_updateBarItemsState(){this._ganttView&&this._ganttView.updateBarItemsState()}_showDialog(e){this._dialogInstance||(this._dialogInstance=new HX(this,this._$dialog)),this._dialogInstance.show(e.name,e.parameters,e.callback,e.afterClosing,this.option("editing"))}_showPopupMenu(e){if(this.option("contextMenu.enabled")){this._ganttView.getBarManager().updateContextMenu();const t={cancel:!1,event:e.event,targetType:e.type,targetKey:e.key,items:(0,_.X)(!0,[],this._contextMenuBar._items),data:"task"===e.type?this.getTaskData(e.key):this.getDependencyData(e.key)};this._actionsManager.raiseContextMenuPreparing(t),t.cancel||this._contextMenuBar.show(e.position,t.items)}}_hidePopupMenu(){this._contextMenuBar.hide()}_getLoadPanel(){return this._loadPanel||(this._loadPanel=this._createComponent(this._$loadPanel,r3.A,{position:{of:this.$element()}})),this._loadPanel}_getTaskKeyGetter(){return this._getDataSourceItemKeyGetter("tasks")}_findTaskByKey(e){return this._getDataSourceItem("tasks",e)}_getDataSourceItem(e,t){const i=this[`_${e}Option`],r=this._getDataSourceItemKeyGetter(e);return(i?._getItems()).find(A=>r(A)===t)}_getDataSourceItemKeyGetter(e){return(0,fa.Hz)(this.option(`${e}.keyExpr`))}_setGanttViewOption(e,t){this._ganttView&&this._ganttView.option(e,t)}_getGanttViewOption(e,t){var i;return null===(i=this._ganttView)||void 0===i?void 0:i.option(e)}_getExportHelper(){return this._exportHelper??(this._exportHelper=new KX(this)),this._exportHelper}_executeCoreCommand(e){this._ganttView.executeCoreCommand(e)}_expandAll(){this._changeExpandAll(!0)}_collapseAll(){this._changeExpandAll(!1)}_onTreeListRowExpandChanged(e,t){this._lockRowExpandEvent||(this._ganttView.changeTaskExpanded(e.key,t),this._sizeHelper.adjustHeight())}_changeExpandAll(e,t,i){var r;const m=[],A=[];if(this._treeList.forEachNode(ce=>{var _e;null!==(_e=ce.children)&&void 0!==_e&&_e.length&&m.push(ce)}),i){const ce=this._treeList.getNodeByKey(i);Pu.getAllParentNodesKeys(ce,A)}let V;this._lockRowExpandEvent=m.length>0;const X=m.reduce((ce,_e,Me)=>{i?e=A.includes(_e.key):t&&(e=_e.level<t),ce[_e.key]=e;const Ve=e?this._treeList.expandRow:this._treeList.collapseRow;return Me===m.length-1?V=Ve(_e.key):Ve(_e.key),ce},{});null===(r=V)||void 0===r||r.then(()=>{this._ganttView.applyTasksExpandedState(X),this._sizeHelper.adjustHeight(),delete this._lockRowExpandEvent})}getTaskResources(e){return(0,C.O9)(e)?this._ganttView._ganttViewCore.getTaskResources(e).map(i=>this._mappingHelper.convertCoreToMappedData("resources",i)):null}getVisibleTaskKeys(){return this._ganttView._ganttViewCore.getVisibleTaskKeys()}getVisibleDependencyKeys(){return this._ganttView._ganttViewCore.getVisibleDependencyKeys()}getVisibleResourceKeys(){return this._ganttView._ganttViewCore.getVisibleResourceKeys()}getVisibleResourceAssignmentKeys(){return this._ganttView._ganttViewCore.getVisibleResourceAssignmentKeys()}getTaskData(e){if(!(0,C.O9)(e))return null;const t=this._ganttView._ganttViewCore.getTaskData(e);return this.getTaskDataByCoreData(t)}getTaskDataByCoreData(e){const t=e?this._mappingHelper.convertCoreToMappedData("tasks",e):null;return this._customFieldsManager.addCustomFieldsData(e.id,t),t}insertTask(e){this._customFieldsManager.saveCustomFieldsDataToCache("gantt_new_task_key",e),this._ganttView._ganttViewCore.insertTask(this._mappingHelper.convertMappedToCoreData("tasks",e))}deleteTask(e){this._ganttView._ganttViewCore.deleteTask(e)}updateTask(e,t){const i=this._mappingHelper.convertMappedToCoreData("tasks",t),r=!Object.keys(i).length;if(this._customFieldsManager.saveCustomFieldsDataToCache(e,t,!0,r),r){const m=this._customFieldsManager._getCustomFieldsData(t);Object.keys(m).length>0&&this._actionsManager.raiseUpdatingAction("tasks",{cancel:!1,key:e,newValues:{}})}else this._ganttView._ganttViewCore.updateTask(e,i)}getDependencyData(e){if(!(0,C.O9)(e))return null;const t=this._ganttView._ganttViewCore.getDependencyData(e);return t?this._mappingHelper.convertCoreToMappedData("dependencies",t):null}insertDependency(e){this._ganttView._ganttViewCore.insertDependency(this._mappingHelper.convertMappedToCoreData("dependencies",e))}deleteDependency(e){this._ganttView._ganttViewCore.deleteDependency(e)}getResourceData(e){const t=this._ganttView._ganttViewCore.getResourceData(e);return t?this._mappingHelper.convertCoreToMappedData("resources",t):null}deleteResource(e){this._ganttView._ganttViewCore.deleteResource(e)}insertResource(e,t){this._ganttView._ganttViewCore.insertResource(this._mappingHelper.convertMappedToCoreData("resources",e),t)}getResourceAssignmentData(e){const t=this._ganttView._ganttViewCore.getResourceAssignmentData(e);return t?this._mappingHelper.convertCoreToMappedData("resourceAssignments",t):null}assignResourceToTask(e,t){this._ganttView._ganttViewCore.assignResourceToTask(e,t)}unassignResourceFromTask(e,t){this._ganttView._ganttViewCore.unassignResourceFromTask(e,t)}unassignAllResourcesFromTask(e){this._ganttView._ganttViewCore.unassignAllResourcesFromTask(e)}updateDimensions(){this._sizeHelper.onAdjustControl()}scrollToDate(e){this._ganttView._ganttViewCore.scrollToDate(e)}showResourceManagerDialog(){this._ganttView._ganttViewCore.showResourcesDialog()}showTaskDetailsDialog(e){this._ganttView._ganttViewCore.showTaskDetailsDialog(e)}exportToPdf(e){return this._exportToPdf(e)}_exportToPdf(e){var t;this._exportHelper.reset();const i=(0,_.X)({},e);return i.createDocumentMethod&&(i.docCreateMethod=i.createDocumentMethod),i.pdfDocument??(i.pdfDocument=i.jsPDFDocument),i.docCreateMethod??(i.docCreateMethod=(null===(t=v3.jspdf)||void 0===t?void 0:t.jsPDF)??v3.jsPDF),i.format??(i.format="a4"),new Promise(r=>{var m;r(null===(m=this._ganttView)||void 0===m?void 0:m._ganttViewCore.exportToPdf(i))})}refresh(){return new Promise((e,t)=>{try{this._refreshGantt(),e()}catch(i){t(i.message)}})}expandAll(){this._expandAll()}collapseAll(){this._collapseAll()}expandAllToLevel(e){this._changeExpandAll(!1,e)}expandToTask(e){var t;const i=this._treeList.getNodeByKey(e);this._changeExpandAll(!1,0,null==i||null===(t=i.parent)||void 0===t?void 0:t.key)}collapseTask(e){this._treeList.collapseRow(e)}expandTask(e){this._treeList.expandRow(e)}showResources(e){this.option("showResources",e)}showDependencies(e){this.option("showDependencies",e)}zoomIn(){this._ganttView._ganttViewCore.zoomIn()}zoomOut(){this._ganttView._ganttViewCore.zoomOut()}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),Pu.getDefaultOptions())}_optionChanged(e){var t,i,r,m,A,V,X,ce,_e,Me,Ve,Je,rt,Ct,Xt,On,Fn,oi,Yt,$t,xn,Gn,qn,ii,qi,ji,$i,ho,io,Uo,zr,Os,wa,$l,Gc,Jd,Dg,xh,wo,dr,Cr,Hr;switch(e.name){case"tasks":this._refreshDataSource("tasks");break;case"dependencies":this._refreshDataSource("dependencies");break;case"resources":this._refreshDataSource("resources");break;case"resourceAssignments":this._refreshDataSource("resourceAssignments");break;case"columns":null===(t=this._ganttTreeList)||void 0===t||t.setOption("columns",this._ganttTreeList.getColumns());break;case"taskListWidth":null===(i=this._sizeHelper)||void 0===i||i.setInnerElementsWidth();break;case"showResources":this._setGanttViewOption("showResources",e.value);break;case"showDependencies":this._setGanttViewOption("showDependencies",e.value);break;case"taskTitlePosition":this._setGanttViewOption("taskTitlePosition",e.value);break;case"firstDayOfWeek":this._setGanttViewOption("firstDayOfWeek",e.value);break;case"startDateRange":this._setGanttViewOption("startDateRange",e.value);break;case"endDateRange":this._setGanttViewOption("endDateRange",e.value);break;case"selectedRowKey":null===(r=this._ganttTreeList)||void 0===r||r.selectRows(Pu.getArrayFromOneElement(e.value));break;case"onSelectionChanged":null===(m=this._actionsManager)||void 0===m||m.createSelectionChangedAction();break;case"onTaskClick":null===(A=this._actionsManager)||void 0===A||A.createTaskClickAction();break;case"onTaskDblClick":null===(V=this._actionsManager)||void 0===V||V.createTaskDblClickAction();break;case"onTaskInserting":null===(X=this._actionsManager)||void 0===X||X.createTaskInsertingAction();break;case"onTaskInserted":null===(ce=this._actionsManager)||void 0===ce||ce.createTaskInsertedAction();break;case"onTaskDeleting":null===(_e=this._actionsManager)||void 0===_e||_e.createTaskDeletingAction();break;case"onTaskDeleted":null===(Me=this._actionsManager)||void 0===Me||Me.createTaskDeletedAction();break;case"onTaskUpdating":null===(Ve=this._actionsManager)||void 0===Ve||Ve.createTaskUpdatingAction();break;case"onTaskUpdated":null===(Je=this._actionsManager)||void 0===Je||Je.createTaskUpdatedAction();break;case"onTaskMoving":null===(rt=this._actionsManager)||void 0===rt||rt.createTaskMovingAction();break;case"onTaskEditDialogShowing":null===(Ct=this._actionsManager)||void 0===Ct||Ct.createTaskEditDialogShowingAction();break;case"onResourceManagerDialogShowing":null===(Xt=this._actionsManager)||void 0===Xt||Xt.createResourceManagerDialogShowingAction();break;case"onDependencyInserting":null===(On=this._actionsManager)||void 0===On||On.createDependencyInsertingAction();break;case"onDependencyInserted":null===(Fn=this._actionsManager)||void 0===Fn||Fn.createDependencyInsertedAction();break;case"onDependencyDeleting":null===(oi=this._actionsManager)||void 0===oi||oi.createDependencyDeletingAction();break;case"onDependencyDeleted":null===(Yt=this._actionsManager)||void 0===Yt||Yt.createDependencyDeletedAction();break;case"onResourceInserting":null===($t=this._actionsManager)||void 0===$t||$t.createResourceInsertingAction();break;case"onResourceInserted":null===(xn=this._actionsManager)||void 0===xn||xn.createResourceInsertedAction();break;case"onResourceDeleting":null===(Gn=this._actionsManager)||void 0===Gn||Gn.createResourceDeletingAction();break;case"onResourceDeleted":null===(qn=this._actionsManager)||void 0===qn||qn.createResourceDeletedAction();break;case"onResourceAssigning":null===(ii=this._actionsManager)||void 0===ii||ii.createResourceAssigningAction();break;case"onResourceAssigned":null===(qi=this._actionsManager)||void 0===qi||qi.createResourceAssignedAction();break;case"onResourceUnassigning":null===(ji=this._actionsManager)||void 0===ji||ji.createResourceUnassigningAction();break;case"onResourceUnassigned":null===($i=this._actionsManager)||void 0===$i||$i.createResourceUnassignedAction();break;case"onCustomCommand":null===(ho=this._actionsManager)||void 0===ho||ho.createCustomCommandAction();break;case"onContextMenuPreparing":null===(io=this._actionsManager)||void 0===io||io.createContextMenuPreparingAction();break;case"onScaleCellPrepared":null===(Uo=this._actionsManager)||void 0===Uo||Uo.createScaleCellPreparedAction();break;case"allowSelection":null===(zr=this._ganttTreeList)||void 0===zr||zr.setOption("selection.mode",Pu.getSelectionMode(e.value)),this._setGanttViewOption("allowSelection",e.value);break;case"showRowLines":null===(Os=this._ganttTreeList)||void 0===Os||Os.setOption("showRowLines",e.value),this._setGanttViewOption("showRowLines",e.value);break;case"stripLines":this._setGanttViewOption("stripLines",e.value);break;case"scaleType":this._setGanttViewOption("scaleType",e.value);break;case"scaleTypeRange":this._setGanttViewOption("scaleTypeRange",this.option(e.name));break;case"editing":this._setGanttViewOption("editing",this.option(e.name));break;case"validation":this._setGanttViewOption("validation",this.option(e.name));break;case"toolbar":this._updateToolbarContent();break;case"contextMenu":this._updateContextMenu();break;case"taskTooltipContentTemplate":this._setGanttViewOption("taskTooltipContentTemplate",null===(wa=this._ganttTemplatesManager)||void 0===wa?void 0:wa.getTaskTooltipContentTemplateFunc(e.value));break;case"taskProgressTooltipContentTemplate":this._setGanttViewOption("taskProgressTooltipContentTemplate",null===($l=this._ganttTemplatesManager)||void 0===$l?void 0:$l.getTaskProgressTooltipContentTemplateFunc(e.value));break;case"taskTimeTooltipContentTemplate":this._setGanttViewOption("taskTimeTooltipContentTemplate",null===(Gc=this._ganttTemplatesManager)||void 0===Gc?void 0:Gc.getTaskTimeTooltipContentTemplateFunc(e.value));break;case"taskContentTemplate":this._setGanttViewOption("taskContentTemplate",null===(Jd=this._ganttTemplatesManager)||void 0===Jd?void 0:Jd.getTaskContentTemplateFunc(e.value));break;case"rootValue":null===(Dg=this._ganttTreeList)||void 0===Dg||Dg.setOption("rootValue",e.value);break;case"width":super._optionChanged(e),null===(xh=this._sizeHelper)||void 0===xh||xh.updateGanttWidth();break;case"height":super._optionChanged(e),null===(wo=this._sizeHelper)||void 0===wo||wo.setGanttHeight((0,D.Oq)(this._$element));break;case"sorting":null===(dr=this._ganttTreeList)||void 0===dr||dr.setOption("sorting",this.option(e.name));break;case"filterRow":null===(Cr=this._ganttTreeList)||void 0===Cr||Cr.setOption("filterRow",this.option(e.name));break;case"headerFilter":null===(Hr=this._ganttTreeList)||void 0===Hr||Hr.setOption("headerFilter",this.option(e.name));break;default:super._optionChanged(e)}}});let C3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YC7,z.Pxf,z.X1G,z._zS,z.ath,z.POb,z.jiL,z.aJg,z.MBy,z.qCh,z._RO,z.U5N,z.Hk4,z.$VD,z.kYc,z.wnp,z.WYf,z.l4W,z.vLQ,f.p_,f.xZ,z.YC7,z.Pxf,z.X1G,z._zS,z.ath,z.POb,z.jiL,z.aJg,z.MBy,z.qCh,z._RO,z.U5N,z.Hk4,z.$VD,z.kYc,z.wnp,z.WYf,z.l4W,z.vLQ,f.xZ]})}return n})();var y3=M(1705);const Rx=Number,MH=EO.inherit({_move:function(){const n=this._actualPosition-this._zeroPosition;this._rootElement.move(this.vertical?0:n,this.vertical?n:0),this._trackerElement&&this._trackerElement.move(this.vertical?0:n,this.vertical?n:0)},_isEnabled:function(){return this.vertical=this._options.vertical,this._options.length>0&&this._options.width>0},_isVisible:function(){return!0},_getTrackerSettings:function(){const n=this._options;let e,t,i,r,m=n.width/2,A=n.length/2;const V=this._zeroPosition;return m>10||(m=10),A>10||(A=10),this.vertical?(e=n.x-A,t=n.x+A,i=V+m,r=V-m):(e=V-m,t=V+m,i=n.y+A,r=n.y-A),{points:[e,i,e,r,t,r,t,i]}},_render:function(){this._zeroPosition=this._translator.getCodomainStart()},_clear:function(){delete this._element},measure:function(n){const e=this.vertical?n.x:n.y;return{min:e-this._options.length/2,max:e+this._options.length/2}},getTooltipParameters:function(){const n=this._options,e=this._actualPosition,t={x:e,y:e,value:this._currentValue,color:n.color,offset:n.width/2};return this.vertical?t.x=n.x:t.y=n.y,t}}),CZ=MH.inherit({_render:function(){const n=this._options;let e,t,i,r;this.callBase();const m=this._zeroPosition;this.vertical?(e=n.x-n.length/2,t=n.x+n.length/2,i=m+n.width/2,r=m-n.width/2):(e=m-n.width/2,t=m+n.width/2,i=n.y+n.length/2,r=n.y-n.length/2),this._element=this._element||this._renderer.path([],"area").append(this._rootElement),this._element.attr({points:[e,i,e,r,t,r,t,i]})}}),yZ=MH.inherit({_render:function(){const n=this,e=n._options;let t,i,r,m;n.callBase(),n.vertical?(t=e.x,i=n._zeroPosition,r=e.length/2||0,m=e.width/2||0):(t=n._zeroPosition,i=e.y,r=e.width/2||0,m=e.length/2||0),n._element=n._element||n._renderer.path([],"area").append(n._rootElement),n._element.attr({points:[t-r,i,t,i-m,t+r,i,t,i+m]})}}),bZ=MH.inherit({_render:function(){const n=this,e=n._options;let t,i;n.callBase(),n.vertical?(t=e.x,i=n._zeroPosition):(t=n._zeroPosition,i=e.y);const r=e.length/2||0;n._element=n._element||n._renderer.circle().append(n._rootElement),n._element.attr({cx:t,cy:i,r})}}),xZ=MH.inherit({_isEnabled:function(){return this.vertical=this._options.vertical,this._inverted=this.vertical?"right"===Wi(this._options.horizontalOrientation):"bottom"===Wi(this._options.verticalOrientation),this._options.length>0&&this._options.width>0},_isVisible:function(){return!0},_render:function(){const n=this,e=n._options;let t,i,r,m;const A={stroke:"none","stroke-width":0,"stroke-linecap":"square"};n.callBase(),n.vertical?(t=e.x,r=n._zeroPosition,i=t+Rx(n._inverted?e.length:-e.length),A.points=[t,r,i,r-e.width/2,i,r+e.width/2]):(r=e.y,t=n._zeroPosition,m=r+Rx(n._inverted?e.length:-e.length),A.points=[t,r,t-e.width/2,m,t+e.width/2,m]),e.space>0&&(A["stroke-width"]=Math.min(e.space,e.width/4)||0,A.stroke=A["stroke-width"]>0&&e.containerBackgroundColor||"none"),n._element=n._element||n._renderer.path([],"area").append(n._rootElement),n._element.attr(A).sharp()},_getTrackerSettings:function(){const n=this,e=n._options;let r,m,A,V,X,t=e.width/2,i=Rx(e.length);return t>10||(t=10),i>20||(i=20),n.vertical?(r=e.x,m=r+(n._inverted?i:-i),A=n._zeroPosition+t,V=n._zeroPosition-t,X=[r,A,m,A,m,V,r,V]):(A=e.y,V=A+(n._inverted?i:-i),r=n._zeroPosition-t,m=n._zeroPosition+t,X=[r,A,r,V,m,V,m,A]),{points:X}},measure:function(n){const e=this,t=Rx(e._options.length);let i,r;return e.vertical?(i=r=n.x,e._inverted?r=i+t:i=r-t):(i=r=n.y,e._inverted?r=i+t:i=r-t),{min:i,max:r}},getTooltipParameters:function(){const n=this._options,e=(this._inverted?n.length:-n.length)/2,t=this.callBase();return this.vertical?t.x+=e:t.y+=e,t.offset=n.length/2,t}}),SZ=OO.inherit({_isEnabled:function(){return this.vertical=this._options.vertical,this._inverted=this.vertical?"right"===Wi(this._options.horizontalOrientation):"bottom"===Wi(this._options.verticalOrientation),!0},_isVisible:function(){return!0},_getTextCloudOptions:function(){const n=this;let i,e=n._actualPosition,t=n._actualPosition;return n.vertical?(e=n._options.x,i=n._inverted?"top-left":"top-right"):(t=n._options.y,i=n._inverted?"right-top":"right-bottom"),{x:e,y:t,type:i}},measure:function(n){const e=this;let t,i;const r=Rx(e._options.arrowLength)||0;return e._measureText(),e.vertical?e._inverted?(t=n.x,i=n.x+r+e._textFullWidth):(t=n.x-r-e._textFullWidth,i=n.x):e._inverted?(t=n.y,i=n.y+r+e._textFullHeight):(t=n.y-r-e._textFullHeight,i=n.y),{min:t,max:i,indent:0}},_correctCloudType(n,e,t){let{x:i,y:r}=e,{width:m,height:A}=t;return"right-top"===n||"right-bottom"===n?i-m<this._translator.getCodomainStart()&&(n=`left-${n.split("-")[1]}`):("top-left"===n||"top-right"===n)&&r+A>this._translator.getCodomainStart()&&(n=`bottom-${n.split("-")[1]}`),n}}),b3=D_.inherit({_isEnabled:function(){return this.vertical=this._options.vertical,this._inverted=this.vertical?"right"===Wi(this._options.horizontalOrientation):"bottom"===Wi(this._options.verticalOrientation),this._options.size>0},_isVisible:function(){return!0},_createBarItem:function(){return this._renderer.path([],"area").append(this._rootElement)},_createTracker:function(){return this._renderer.path([],"area")},_setBarSides:function(){const n=this,e=n._options,t=Rx(e.size);let i,r;n.vertical?n._inverted?(i=e.x,r=e.x+t):(i=e.x-t,r=e.x):n._inverted?(i=e.y,r=e.y+t):(i=e.y-t,r=e.y),n._minSide=i,n._maxSide=r,n._minBound=i,n._maxBound=r},_getSpace:function(){const n=this._options;return n.space>0?Rx(n.space):0},_isTextVisible:function(){const n=this._options.text||{};return n.indent>0||n.indent<0},_getTextAlign:function(){return this.vertical?this._options.text.indent>0?"left":"right":"center"},_setTextItemsSides:function(){const n=this,e=Rx(n._options.text.indent);e>0?(n._lineStart=n._maxSide,n._lineEnd=n._maxSide+e,n._textPosition=n._lineEnd+(n.vertical?2:n._textHeight/2),n._maxBound=n._textPosition+(n.vertical?n._textWidth:n._textHeight/2)):e<0&&(n._lineStart=n._minSide,n._lineEnd=n._minSide+e,n._textPosition=n._lineEnd-(n.vertical?2:n._textHeight/2),n._minBound=n._textPosition-(n.vertical?n._textWidth:n._textHeight/2))},_getPositions:function(){const n=this._startPosition,e=this._endPosition,t=this._space,i=this._basePosition,r=this._actualPosition;let m,A,V,X;return n<e?(i<r?(m=i,A=r):(m=r,A=i),V=m-t,X=A+t):(i>r?(m=i,A=r):(m=r,A=i),V=m+t,X=A-t),{start:n,end:e,main1:m,main2:A,back1:V,back2:X}},_buildItemSettings:function(n,e){const t=this._minSide,i=this._maxSide;return{points:this.vertical?[t,n,t,e,i,e,i,n]:[n,t,n,i,e,i,e,t]}},_updateTextPosition:function(){this._text.attr(this.vertical?{x:this._textPosition,y:this._actualPosition+this._textVerticalOffset}:{x:this._actualPosition,y:this._textPosition+this._textVerticalOffset})},_updateLinePosition:function(){const n=this,e=n._actualPosition;let t,i,r;n.vertical?(n._basePosition>=e?(t=e,i=e+2):(t=e-2,i=e),r=[n._lineStart,t,n._lineStart,i,n._lineEnd,i,n._lineEnd,t]):(n._basePosition<=e?(t=e-2,i=e):(t=e,i=e+2),r=[t,n._lineStart,t,n._lineEnd,i,n._lineEnd,i,n._lineStart]),n._line.attr({points:r}).sharp()},_getTooltipPosition:function(){const n=(this._minSide+this._maxSide)/2,e=(this._basePosition+this._actualPosition)/2;return this.vertical?{x:n,y:e}:{x:e,y:n}},measure:function(n){const e=this,t=Rx(e._options.size),i=Rx(e._options.text.indent);let r,m,A;return e._measureText(),e.vertical?(r=m=n.x,e._inverted?m+=t:r-=t,e._hasText&&(A=e._textHeight/2,i>0&&(m+=i+e._textWidth),i<0&&(r+=i-e._textWidth))):(r=m=n.y,e._inverted?m+=t:r-=t,e._hasText&&(A=e._textWidth/2,i>0&&(m+=i+e._textHeight),i<0&&(r+=i-e._textHeight))),{min:r,max:m,indent:A}}}),yG=Number,EZ=Math.max,OZ=eA.inherit({_processOptions:function(){const n=this;if(n.vertical=n._options.vertical,n._inner=n._outer=0,n.vertical)switch(Wi(n._options.horizontalOrientation)){case"left":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}else switch(Wi(n._options.verticalOrientation)){case"top":n._inner=1;break;case"center":n._inner=n._outer=.5;break;default:n._outer=1}},_isVisible:function(){return!0},_createRange:function(n,e){const t=this._inner,i=this._outer,r=this._translator.translate(n.start),m=this._translator.translate(n.end);let A;const V=e.x,X=e.y,ce=n.startWidth,_e=n.endWidth;return A=this.vertical?[V-ce*t,r,V-_e*t,m,V+_e*i,m,V+ce*i,r]:[r,X+ce*i,r,X-ce*t,m,X-_e*t,m,X+_e*i],this._renderer.path(A,"area")},measure:function(n){const e={};let t;return e.min=e.max=n[this.vertical?"x":"y"],t=this._options.width,t=yG(t)||EZ(yG(t.start),yG(t.end)),e.min-=this._inner*t,e.max+=this._outer*t,e}}),x3=Math.max,wZ=Math.min,RH=Math.round,kH=jD.inherit({_rootClass:"dxg-linear-gauge",_factoryMethods:{rangeContainer:"createLinearRangeContainer",indicator:"createLinearIndicator"},_gridSpacingFactor:25,_scaleTypes:{type:"xyAxes",drawingType:"linear"},_getTicksOrientation:function(n){return n.isHorizontal?n.verticalOrientation:n.horizontalOrientation},_getThemeManagerOptions(){const n=this.callBase.apply(this,arguments);return n.subTheme="_linear",n},_getInvertedState(){return!this._area.vertical&&this.option("rtlEnabled")},_prepareScaleSettings:function(){const n=this.callBase();return n.inverted=this._getInvertedState(),n},_updateScaleTickIndent:function(n){const e=n.label.indentFromTick,t=n.tick.length,i=this._scale.measureLabels((0,_.X)({},this._canvas)),m=e>0;let A,V,X;n.isHorizontal?(A=m?{center:.5,top:0,bottom:1}:{center:.5,top:1,bottom:0},X=t*A[n.verticalOrientation],V=i.y):(A=m?{center:.5,left:0,right:1}:{center:.5,left:1,right:0},X=t*A[n.horizontalOrientation],V=-i.width),n.label.indentFromAxis=-e+(m?-X+V:X-(n.isHorizontal?i.height+i.y:0)),this._scale.updateOptions(n)},_shiftScale:function(n,e){const t=(0,_.X)({},this._canvas),i=e.isHorizontal,r=this._scale;t[i?"left":"top"]=this._area[i?"startCoord":"endCoord"],t[i?"right":"bottom"]=t[i?"width":"height"]-this._area[i?"endCoord":"startCoord"],r.draw(t),r.shift({left:-n.x,top:-n.y})},_setupCodomain:function(){const e="vertical"===Wi((this.option("geometry")||{}).orientation);this._area={vertical:e,x:0,y:0,startCoord:-100,endCoord:100},this._rangeContainer.vertical=e,this._translator.setInverted(this._getInvertedState()),this._translator.setCodomain(-100,100)},_getScaleLayoutValue:function(){return this._area[this._area.vertical?"x":"y"]},_getTicksCoefficients:function(n){const e={inner:0,outer:1};return this._area.vertical?"left"===n.horizontalOrientation?(e.inner=1,e.outer=0):"center"===n.horizontalOrientation&&(e.inner=e.outer=.5):"top"===n.verticalOrientation?(e.inner=1,e.outer=0):"center"===n.verticalOrientation&&(e.inner=e.outer=.5),e},_correctScaleIndents:function(n,e,t){const i=this._area.vertical;e>=0?n.max+=e+t[i?"width":"height"]:n.min-=-e+t[i?"width":"height"],n.indent=t[i?"height":"width"]/2},_measureMainElements:function(n,e){const t=this._area.x,i=this._area.y;let r=1e3,m=0,A=0;return(0,w.__)(n.concat(this._scale),function(X,ce){const _e=ce.measure?ce.measure({x:t+ce.getOffset(),y:i+ce.getOffset()}):e;void 0!==_e.max&&(m=x3(m,_e.max)),void 0!==_e.min&&(r=wZ(r,_e.min)),_e.indent>0&&(A=x3(A,_e.indent))}),{minBound:r,maxBound:m,indent:A}},_applyMainLayout:function(n,e){const t=this,i=t._measureMainElements(n,e),r=t._area;let m,A;r.vertical?(m=S3(t._innerRect,{width:i.maxBound-i.minBound}),A=(m.left+m.right)/2-(i.minBound+i.maxBound)/2,r.startCoord=m.bottom-i.indent,r.endCoord=m.top+i.indent,r.x=RH(r.x+A)):(m=S3(t._innerRect,{height:i.maxBound-i.minBound}),A=(m.top+m.bottom)/2-(i.minBound+i.maxBound)/2,r.startCoord=m.left+i.indent,r.endCoord=m.right-i.indent,r.y=RH(r.y+A)),t._translator.setCodomain(r.startCoord,r.endCoord),t._innerRect=m},_getElementLayout:function(n){return{x:RH(this._area.x+n),y:RH(this._area.y+n)}},_getApproximateScreenRange:function(){const n=this._area;let e=n.vertical?this._canvas.height:this._canvas.width;return e>n.totalSize&&(e=n.totalSize),e*=.8,e},_getDefaultSize:function(){return"vertical"===(this.option("geometry")||{}).orientation?{width:100,height:300}:{width:300,height:100}},_factory:(0,xe.o8)(qc.prototype._factory)});function S3(n,e,t){const i=(0,_.X)({},n);let r;return t=t||{},e&&(i.left+=t.left||0,i.right-=t.right||0,i.top+=t.top||0,i.bottom-=t.bottom||0,e.width>0&&(r=(i.right-i.left-e.width)/2,r>0&&(i.left+=r,i.right-=r)),e.height>0&&(r=(i.bottom-i.top-e.height)/2,r>0&&(i.top+=r,i.bottom-=r))),i}const Iw=kH.prototype._factory.indicators={};kH.prototype._factory.createIndicator=xO(Iw),Iw._default=b3,Iw.rectangle=CZ,Iw.rhombus=yZ,Iw.circle=bZ,Iw.trianglemarker=xZ,Iw.textcloud=SZ,Iw.rangebar=b3,kH.prototype._factory.RangeContainer=OZ,(0,y.A)("dxLinearGauge",kH);let E3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.uIe,z.SB8,z.FXg,z.r2Z,z.Yh3,z.Ek1,z.PXE,z.$3K,z.REv,z.iDF,z.CQq,z.uE7,z.Pxf,z.EED,z.lX9,z.hzo,z.saD,z.Tv$,z.sVF,z.YkV,z.Vku,z.A1g,z.cug,z._sw,f.p_,f.xZ,z.YLo,z.uIe,z.SB8,z.FXg,z.r2Z,z.Yh3,z.Ek1,z.PXE,z.$3K,z.REv,z.iDF,z.CQq,z.uE7,z.Pxf,z.EED,z.lX9,z.hzo,z.saD,z.Tv$,z.sVF,z.YkV,z.Vku,z.A1g,z.cug,z._sw,f.xZ]})}return n})();var O3=M(1246),w3=M(1983);let T3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,f.p_,f.xZ,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,f.xZ]})}return n})();var D3=M(2333),By=M(5345);const{abstract:j_}=es.A,bG=es.A.inherit({_defaultRouteWeight:()=>5,_defaultRouteOpacity:()=>.5,_defaultRouteColor:()=>"#0000FF",ctor(n,e){this._mapWidget=n,this._$container=e},render(n,e){return this._renderImpl().then(()=>Promise.all([this._applyFunctionIfNeeded("addMarkers",n),this._applyFunctionIfNeeded("addRoutes",e)]).then(()=>!0))},_renderImpl:j_,updateDimensions:j_,updateMapType:j_,updateBounds:j_,updateCenter:j_,updateZoom:j_,updateControls:j_,updateMarkers(n,e){return new Promise(t=>this._applyFunctionIfNeeded("removeMarkers",n).then(i=>{this._applyFunctionIfNeeded("addMarkers",e).then(r=>{t(r||i)})}))},addMarkers:j_,removeMarkers:j_,adjustViewport:j_,updateRoutes(n,e){return new Promise(t=>this._applyFunctionIfNeeded("removeRoutes",n).then(i=>{this._applyFunctionIfNeeded("addRoutes",e).then(r=>{t(r||i)})}))},addRoutes:j_,removeRoutes:j_,clean:j_,map(){return this._map},isEventsCanceled:()=>!1,_option(n,e){if(void 0===e)return this._mapWidget.option(n);this._mapWidget.setOptionSilent(n,e)},_keyOption(n){const e=this._option("apiKey");return void 0===e[n]?e:e[n]},_parseTooltipOptions:n=>({text:n.text||n,visible:n.isShown||!1}),_getLatLng(n){if("string"==typeof n){const e=(0,w.Tj)(n.split(","),i=>i.trim()),t=/^[-+]?[0-9]*\.?[0-9]*$/;if(2===e.length&&e[0].match(t)&&e[1].match(t))return{lat:parseFloat(e[0]),lng:parseFloat(e[1])}}else{if(Array.isArray(n)&&2===n.length)return{lat:n[0],lng:n[1]};if((0,C.Qd)(n)&&(0,C.kf)(n.lat)&&(0,C.kf)(n.lng))return n}return null},_areBoundsSet(){return this._option("bounds.northEast")&&this._option("bounds.southWest")},_addEventNamespace(n){return(0,N.b4)(n,this._mapWidget.NAME)},_applyFunctionIfNeeded(n,e){return e.length?this[n](e):Promise.resolve()},_fireAction(n,e){this._mapWidget._createActionByOption(n)(e)},_fireClickAction(n){this._fireAction("onClick",n)},_fireMarkerAddedAction(n){this._fireAction("onMarkerAdded",n)},_fireMarkerRemovedAction(n){this._fireAction("onMarkerRemoved",n)},_fireRouteAddedAction(n){this._fireAction("onRouteAdded",n)},_fireRouteRemovedAction(n){this._fireAction("onRouteRemoved",n)}}),{abstract:LS}=bG,A3=bG.inherit({_geocodeLocation(n){return new Promise(e=>{const t=this._geocodedLocations,i=t[n];i?e(i):this._geocodeLocationImpl(n).then(r=>{t[n]=r,e(r)})})},_renderImpl(){return this._load().then(()=>this._init()).then(()=>Promise.all([this.updateMapType(),this._areBoundsSet()?this.updateBounds():this.updateCenter()])).then(()=>(this._attachHandlers(),new Promise(n=>{const e=setTimeout(()=>{clearTimeout(e),n()})})))},_load(){return this._mapsLoader||(this._mapsLoader=this._loadImpl()),this._markers=[],this._routes=[],this._mapsLoader},_loadImpl:LS,_init:LS,_attachHandlers:LS,addMarkers(n){return Promise.all((0,w.Tj)(n,e=>this._addMarker(e))).then(e=>(this._fitBounds(),[!1,(0,w.Tj)(e,t=>t.marker)]))},_addMarker(n){return this._renderMarker(n).then(e=>(this._markers.push((0,_.X)({options:n},e)),this._fireMarkerAddedAction({options:n,originalMarker:e.marker}),e))},_renderMarker:LS,removeMarkers(n){const e=this;return(0,w.__)(n,(t,i)=>{e._removeMarker(i)}),Promise.resolve()},_removeMarker(n){const e=this;(0,w.__)(this._markers,(t,i)=>i.options!==n||(e._destroyMarker(i),e._markers.splice(t,1),e._fireMarkerRemovedAction({options:i.options}),!1))},_destroyMarker:LS,_clearMarkers(){for(;this._markers.length>0;)this._removeMarker(this._markers[0].options)},addRoutes(n){return Promise.all((0,w.Tj)(n,e=>this._addRoute(e))).then(e=>(this._fitBounds(),[!1,(0,w.Tj)(e,t=>t.instance)]))},_addRoute(n){return this._renderRoute(n).then(e=>(this._routes.push((0,_.X)({options:n},e)),this._fireRouteAddedAction({options:n,originalRoute:e.instance}),e))},_renderRoute:LS,removeRoutes(n){const e=this;return(0,w.__)(n,(t,i)=>{e._removeRoute(i)}),Promise.resolve()},_removeRoute(n){const e=this;(0,w.__)(this._routes,(t,i)=>i.options!==n||(e._destroyRoute(i),e._routes.splice(t,1),e._fireRouteRemovedAction({options:n}),!1))},_destroyRoute:LS,_clearRoutes(){for(;this._routes.length>0;)this._removeRoute(this._routes[0].options)},adjustViewport(){return this._fitBounds()},isEventsCanceled:()=>!0,_fitBounds:LS,_updateBounds(){const n=this;this._clearBounds(),this._option("autoAdjust")&&((0,w.__)(this._markers,(e,t)=>{n._extendBounds(t.location)}),(0,w.__)(this._routes,(e,t)=>{t.northEast&&n._extendBounds(t.northEast),t.southWest&&n._extendBounds(t.southWest)}))},_clearBounds(){this._bounds=null},_extendBounds:LS}),YF=(0,gr.zk)(),LH="_bingScriptReady";let TZ=`https://www.bing.com/api/maps/mapcontrol?callback=${LH}`;const I3=function(){return YF.Microsoft&&YF.Microsoft.Maps};let xG;const DZ=A3.inherit({_mapType(n){const e={roadmap:Microsoft.Maps.MapTypeId.road,hybrid:Microsoft.Maps.MapTypeId.aerial,satellite:Microsoft.Maps.MapTypeId.aerial};return e[n]||e.road},_movementMode(n){const e={driving:Microsoft.Maps.Directions.RouteMode.driving,walking:Microsoft.Maps.Directions.RouteMode.walking};return e[n]||e.driving},_resolveLocation(n){return new Promise(e=>{const t=this._getLatLng(n);t?e(new Microsoft.Maps.Location(t.lat,t.lng)):this._geocodeLocation(n).then(i=>{e(i)})})},_geocodedLocations:{},_geocodeLocationImpl(n){return new Promise(e=>{(0,C.O9)(n)?new Microsoft.Maps.Search.SearchManager(this._map).geocode({where:n,count:1,callback(r){if(r.results[0]){const A=r.results[0].location;e(new Microsoft.Maps.Location(A.latitude,A.longitude))}else e(new Microsoft.Maps.Location(0,0))}}):e(new Microsoft.Maps.Location(0,0))})},_normalizeLocation:n=>({lat:n.latitude,lng:n.longitude}),_normalizeLocationRect(n){const e=this._normalizeLocation(n.getNorthwest()),t=this._normalizeLocation(n.getSoutheast());return{northEast:{lat:e.lat,lng:t.lng},southWest:{lat:t.lat,lng:e.lng}}},_loadImpl(){return new Promise(n=>{I3()?n():(xG||(xG=this._loadMapScript()),xG.then(()=>{I3()?n():this._loadMapScript().then(n)}))}).then(()=>Promise.all([new Promise(n=>{Microsoft.Maps.loadModule("Microsoft.Maps.Search",{callback:n})}),new Promise(n=>{Microsoft.Maps.loadModule("Microsoft.Maps.Directions",{callback:n})})]))},_loadMapScript:()=>new Promise(n=>{YF[LH]=n,Cv.A.sendRequest({url:TZ,dataType:"script"})}).then(()=>{try{delete YF[LH]}catch{YF[LH]=void 0}}),_init(){return this._createMap(),Promise.resolve()},_createMap(){const n=this._option("controls");this._map=new Microsoft.Maps.Map(this._$container[0],{credentials:this._keyOption("bing"),zoom:this._option("zoom"),showDashboard:n,showMapTypeSelector:n,showScalebar:n})},_attachHandlers(){this._providerViewChangeHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",this._viewChangeHandler.bind(this)),this._providerClickHandler=Microsoft.Maps.Events.addHandler(this._map,"click",this._clickActionHandler.bind(this))},_viewChangeHandler(){const n=this._map.getBounds();this._option("bounds",this._normalizeLocationRect(n));const e=this._map.getCenter();this._option("center",this._normalizeLocation(e)),this._preventZoomChangeEvent||this._option("zoom",this._map.getZoom())},_clickActionHandler(n){"map"===n.targetType&&this._fireClickAction({location:this._normalizeLocation(n.location)})},updateDimensions(){const n=this._$container;return this._map.setOptions({width:(0,D.RG)(n),height:(0,D.Oq)(n)}),Promise.resolve()},updateMapType(){const n=this._option("type"),e=Microsoft.Maps.LabelOverlay;return this._map.setView({animate:!1,mapTypeId:this._mapType(n),labelOverlay:"satellite"===n?e.hidden:e.visible}),Promise.resolve()},updateBounds(){return Promise.all([this._resolveLocation(this._option("bounds.northEast")),this._resolveLocation(this._option("bounds.southWest"))]).then(n=>{const e=new Microsoft.Maps.LocationRect.fromLocations(n[0],n[1]);this._map.setView({animate:!1,bounds:e})})},updateCenter(){return this._resolveLocation(this._option("center")).then(n=>{this._map.setView({animate:!1,center:n})})},updateZoom(){return this._map.setView({animate:!1,zoom:this._option("zoom")}),Promise.resolve()},updateControls(){return this.clean(),this.render.apply(this,arguments)},_renderMarker(n){return this._resolveLocation(n.location).then(e=>{const t={icon:n.iconSrc||this._option("markerIconSrc")};if(n.html){(0,_.X)(t,{htmlContent:n.html,width:null,height:null});const{htmlOffset:A}=n;A&&(t.anchor=new Microsoft.Maps.Point(-A.left,-A.top))}const i=new Microsoft.Maps.Pushpin(e,t);this._map.entities.push(i);const r=this._renderTooltip(e,n.tooltip);let m;if(n.onClick||n.tooltip){const A=this._mapWidget._createAction(n.onClick||h.lQ),V=this._normalizeLocation(e);m=Microsoft.Maps.Events.addHandler(i,"click",()=>{A({location:V}),r&&r.setOptions({visible:!0})})}return{location:e,marker:i,infobox:r,handler:m}})},_renderTooltip(n,e){if(!e)return;e=this._parseTooltipOptions(e);const t=new Microsoft.Maps.Infobox(n,{description:e.text,offset:new Microsoft.Maps.Point(0,13),visible:e.visible});return t.setMap(this._map),t},_destroyMarker(n){this._map.entities.remove(n.marker),n.infobox&&n.infobox.setMap(null),n.handler&&Microsoft.Maps.Events.removeHandler(n.handler)},_renderRoute(n){return Promise.all((0,w.Tj)(n.locations,e=>this._resolveLocation(e))).then(e=>new Promise(t=>{const i=new Microsoft.Maps.Directions.DirectionsManager(this._map),r=new Jn.A(n.color||this._defaultRouteColor()).toHex(),m=new Microsoft.Maps.Color.fromHex(r);m.a=255*(n.opacity||this._defaultRouteOpacity()),i.setRenderOptions({autoUpdateMapView:!1,displayRouteSelector:!1,waypointPushpinOptions:{visible:!1},drivingPolylineOptions:{strokeColor:m,strokeThickness:n.weight||this._defaultRouteWeight()},walkingPolylineOptions:{strokeColor:m,strokeThickness:n.weight||this._defaultRouteWeight()}}),i.setRequestOptions({routeMode:this._movementMode(n.mode),routeDraggable:!1}),(0,w.__)(e,(V,X)=>{const ce=new Microsoft.Maps.Directions.Waypoint({location:X});i.addWaypoint(ce)});const A=[];A.push(Microsoft.Maps.Events.addHandler(i,"directionsUpdated",V=>{for(;A.length;)Microsoft.Maps.Events.removeHandler(A.pop());const X=V.routeSummary[0];t({instance:i,northEast:X.northEast,southWest:X.southWest})})),A.push(Microsoft.Maps.Events.addHandler(i,"directionsError",V=>{for(;A.length;)Microsoft.Maps.Events.removeHandler(A.pop());is.A.log("W1006",`RouteResponseCode: ${V.responseCode} - ${V.message}`),t({instance:i})})),i.calculateDirections()}))},_destroyRoute(n){n.instance.dispose()},_fitBounds(){if(this._updateBounds(),this._bounds&&this._option("autoAdjust")){const n=this._map.getZoom();this._preventZoomChangeEvent=!0;const e=this._bounds.clone();e.height*=1.1,e.width*=1.1,this._map.setView({animate:!1,bounds:e,zoom:n});const t=this._map.getZoom();n<t?this._map.setView({animate:!1,zoom:n}):this._option("zoom",t),delete this._preventZoomChangeEvent}return Promise.resolve()},_extendBounds(n){this._bounds=this._bounds?new Microsoft.Maps.LocationRect.fromLocations(this._bounds.getNorthwest(),this._bounds.getSoutheast(),n):new Microsoft.Maps.LocationRect(n,1e-16,1e-16)},clean(){return this._map&&(Microsoft.Maps.Events.removeHandler(this._providerViewChangeHandler),Microsoft.Maps.Events.removeHandler(this._providerClickHandler),this._clearMarkers(),this._clearRoutes(),this._map.dispose()),Promise.resolve()}}),ZF=(0,gr.zk)(),BH="_googleScriptReady";let wk,AZ=`https://maps.googleapis.com/maps/api/js?callback=${BH}`;const P3=function(){return ZF.google&&ZF.google.maps};let SG;const PZ=A3.inherit({_mapType(n){const e={hybrid:google.maps.MapTypeId.HYBRID,roadmap:google.maps.MapTypeId.ROADMAP,satellite:google.maps.MapTypeId.SATELLITE};return e[n]||e.hybrid},_movementMode(n){const e={driving:google.maps.TravelMode.DRIVING,walking:google.maps.TravelMode.WALKING};return e[n]||e.driving},_resolveLocation(n){return new Promise(e=>{const t=this._getLatLng(n);t?e(new google.maps.LatLng(t.lat,t.lng)):this._geocodeLocation(n).then(i=>{e(i)})})},_geocodedLocations:{},_geocodeLocationImpl:n=>new Promise(e=>{(0,C.O9)(n)?(new google.maps.Geocoder).geocode({address:n},(i,r)=>{r===google.maps.GeocoderStatus.OK?e(i[0].geometry.location):(is.A.log("W1006",r),e(new google.maps.LatLng(0,0)))}):e(new google.maps.LatLng(0,0))}),_normalizeLocation:n=>({lat:n.lat(),lng:n.lng()}),_normalizeLocationRect(n){return{northEast:this._normalizeLocation(n.getNorthEast()),southWest:this._normalizeLocation(n.getSouthWest())}},_loadImpl(){return new Promise(n=>{P3()?n():(SG||(SG=this._loadMapScript()),SG.then(()=>{P3()?n():this._loadMapScript().then(n)}))}).then(()=>{wk=function(n){this._position=n.position,this._offset=n.offset,this._$overlayContainer=(0,a.A)("<div>").css({position:"absolute",display:"none",cursor:"pointer"}).append(n.html),this.setMap(n.map)},wk.prototype=new google.maps.OverlayView,wk.prototype.onAdd=function(){(0,a.A)(this.getPanes().overlayMouseTarget).append(this._$overlayContainer),this._clickListener=google.maps.event.addDomListener(this._$overlayContainer.get(0),"click",e=>{google.maps.event.trigger(this,"click"),e.preventDefault()}),this.draw()},wk.prototype.onRemove=function(){google.maps.event.removeListener(this._clickListener),this._$overlayContainer.remove()},wk.prototype.draw=function(){const n=this.getProjection().fromLatLngToDivPixel(this._position);this._$overlayContainer.css({left:n.x+this._offset.left,top:n.y+this._offset.top,display:"block"})}})},_loadMapScript(){return new Promise(n=>{const e=this._keyOption("google");ZF[BH]=n,Cv.A.sendRequest({url:AZ+(e?`&key=${e}`:""),dataType:"script"})}).then(()=>{try{delete ZF[BH]}catch{ZF[BH]=void 0}})},_init(){return new Promise(n=>{this._resolveLocation(this._option("center")).then(e=>{const t=this._option("controls");this._map=new google.maps.Map(this._$container[0],{zoom:this._option("zoom"),center:e,disableDefaultUI:!t});const i=google.maps.event.addListener(this._map,"idle",()=>{n(i)})})}).then(n=>{google.maps.event.removeListener(n)})},_attachHandlers(){this._boundsChangeListener=google.maps.event.addListener(this._map,"bounds_changed",this._boundsChangeHandler.bind(this)),this._clickListener=google.maps.event.addListener(this._map,"click",this._clickActionHandler.bind(this))},_boundsChangeHandler(){const n=this._map.getBounds();this._option("bounds",this._normalizeLocationRect(n));const e=this._map.getCenter();this._option("center",this._normalizeLocation(e)),this._preventZoomChangeEvent||this._option("zoom",this._map.getZoom())},_clickActionHandler(n){this._fireClickAction({location:this._normalizeLocation(n.latLng)})},updateDimensions(){const n=this._option("center");return google.maps.event.trigger(this._map,"resize"),this._option("center",n),this.updateCenter()},updateMapType(){return this._map.setMapTypeId(this._mapType(this._option("type"))),Promise.resolve()},updateBounds(){return Promise.all([this._resolveLocation(this._option("bounds.northEast")),this._resolveLocation(this._option("bounds.southWest"))]).then(n=>{const e=new google.maps.LatLngBounds;e.extend(n[0]),e.extend(n[1]),this._map.fitBounds(e)})},updateCenter(){return this._resolveLocation(this._option("center")).then(n=>{this._map.setCenter(n),this._option("center",this._normalizeLocation(n))})},updateZoom(){return this._map.setZoom(this._option("zoom")),Promise.resolve()},updateControls(){const n=this._option("controls");return this._map.setOptions({disableDefaultUI:!n}),Promise.resolve()},isEventsCanceled(n){const e=this._map&&this._map.get("gestureHandling");return!((0,a.A)(n.target).closest(".gm-style-iw").length>0||"desktop"!==d.A.real().deviceType&&"cooperative"===e)&&this.callBase()},_renderMarker(n){return this._resolveLocation(n.location).then(e=>{let t;t=n.html?new wk({map:this._map,position:e,html:n.html,offset:(0,_.X)({top:0,left:0},n.htmlOffset)}):new google.maps.Marker({position:e,map:this._map,icon:n.iconSrc||this._option("markerIconSrc")});const i=this._renderTooltip(t,n.tooltip);let r;if(n.onClick||n.tooltip){const m=this._mapWidget._createAction(n.onClick||h.lQ),A=this._normalizeLocation(e);r=google.maps.event.addListener(t,"click",()=>{m({location:A}),i&&i.open(this._map,t)})}return{location:e,marker:t,listener:r}})},_renderTooltip(n,e){if(!e)return;e=this._parseTooltipOptions(e);const t=new google.maps.InfoWindow({content:e.text});return e.visible&&t.open(this._map,n),t},_destroyMarker(n){n.marker.setMap(null),n.listener&&google.maps.event.removeListener(n.listener)},_renderRoute(n){return Promise.all((0,w.Tj)(n.locations,e=>this._resolveLocation(e))).then(e=>new Promise(t=>{const A={origin:e.shift(),destination:e.pop(),waypoints:(0,w.Tj)(e,V=>({location:V,stopover:!0})),optimizeWaypoints:!0,travelMode:this._movementMode(n.mode)};(new google.maps.DirectionsService).route(A,(V,X)=>{if(X===google.maps.DirectionsStatus.OK){const ce=new Jn.A(n.color||this._defaultRouteColor()).toHex(),_e={directions:V,map:this._map,suppressMarkers:!0,preserveViewport:!0,polylineOptions:{strokeWeight:n.weight||this._defaultRouteWeight(),strokeOpacity:n.opacity||this._defaultRouteOpacity(),strokeColor:ce}},Me=new google.maps.DirectionsRenderer(_e),{bounds:Ve}=V.routes[0];t({instance:Me,northEast:Ve.getNorthEast(),southWest:Ve.getSouthWest()})}else is.A.log("W1006",X),t({instance:new google.maps.DirectionsRenderer({})})})}))},_destroyRoute(n){n.instance.setMap(null)},_fitBounds(){if(this._updateBounds(),this._bounds&&this._option("autoAdjust")){const n=this._map.getZoom();this._preventZoomChangeEvent=!0,this._map.fitBounds(this._bounds),this._boundsChangeHandler();const e=this._map.getZoom();n<e?this._map.setZoom(n):this._option("zoom",e),delete this._preventZoomChangeEvent}return Promise.resolve()},_extendBounds(n){this._bounds||(this._bounds=new google.maps.LatLngBounds),this._bounds.extend(n)},clean(){return this._map&&(google.maps.event.removeListener(this._boundsChangeListener),google.maps.event.removeListener(this._clickListener),this._clearMarkers(),this._clearRoutes(),delete this._map,this._$container.empty()),Promise.resolve()}}),RZ={googleStatic:bG.inherit({_locationToString(n){const e=this._getLatLng(n);return e?`${e.lat},${e.lng}`:n.toString().replace(/ /g,"+")},_renderImpl(){return this._updateMap()},updateDimensions(){return this._updateMap()},updateMapType(){return this._updateMap()},updateBounds:()=>Promise.resolve(),updateCenter(){return this._updateMap()},updateZoom(){return this._updateMap()},updateControls:()=>Promise.resolve(),addMarkers(n){const e=this;return this._updateMap().then(t=>((0,w.__)(n,(i,r)=>{e._fireMarkerAddedAction({options:r})}),t))},removeMarkers(n){const e=this;return this._updateMap().then(t=>((0,w.__)(n,(i,r)=>{e._fireMarkerRemovedAction({options:r})}),t))},adjustViewport:()=>Promise.resolve(),addRoutes(n){const e=this;return this._updateMap().then(t=>((0,w.__)(n,(i,r)=>{e._fireRouteAddedAction({options:r})}),t))},removeRoutes(n){const e=this;return this._updateMap().then(t=>((0,w.__)(n,(i,r)=>{e._fireRouteRemovedAction({options:r})}),t))},clean(){return this._$container.css("backgroundImage","none"),L.A.off(this._$container,this._addEventNamespace(I.U)),Promise.resolve()},mapRendered:()=>!0,_updateMap(){const n=this._keyOption("googleStatic"),e=this._$container,t=["sensor=false",`size=${Math.round((0,D.RG)(e))}x${Math.round((0,D.Oq)(e))}`,`maptype=${this._option("type")}`,`center=${this._locationToString(this._option("center"))}`,`zoom=${this._option("zoom")}`,this._markersSubstring()];t.push.apply(t,this._routeSubstrings()),n&&t.push(`key=${n}`);const i="https://maps.google.com/maps/api/staticmap?"+t.join("&");return this._$container.css("background",`url("${i}") no-repeat 0 0`),this._attachClickEvent(),Promise.resolve(!0)},_markersSubstring(){const n=this,e=[],t=this._option("markerIconSrc");return t&&e.push(`icon:${t}`),(0,w.__)(this._option("markers"),(i,r)=>{e.push(n._locationToString(r.location))}),`markers=${e.join("|")}`},_routeSubstrings(){const n=this,e=[];return(0,w.__)(this._option("routes"),(t,i)=>{const r=new Jn.A(i.color||n._defaultRouteColor()).toHex().replace("#","0x"),m=Math.round(255*(i.opacity||n._defaultRouteOpacity())).toString(16),A=i.weight||n._defaultRouteWeight(),V=[];(0,w.__)(i.locations,(X,ce)=>{V.push(n._locationToString(ce))}),e.push(`path=color:${r}${m}|weight:${A}|${V.join("|")}`)}),e},_attachClickEvent(){const n=this,e=this._addEventNamespace(I.U);L.A.off(this._$container,e),L.A.on(this._$container,e,t=>{n._fireClickAction({event:t})})}}),google:PZ,bing:DZ},kZ=Sl.A.inherit({_getDefaultOptions(){return(0,_.X)(this.callBase(),{bounds:{northEast:null,southWest:null},center:{lat:0,lng:0},zoom:1,width:300,height:300,type:"roadmap",provider:"google",autoAdjust:!0,markers:[],markerIconSrc:null,onMarkerAdded:null,onMarkerRemoved:null,routes:[],onRouteAdded:null,onRouteRemoved:null,apiKey:{bing:"",google:"",googleStatic:""},controls:!1,onReady:null,onUpdated:null,onClick:null})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===d.A.real().deviceType&&!d.A.isSimulator(),options:{focusStateEnabled:!0}}])},_renderFocusTarget:h.lQ,_init(){this.callBase(),this.$element().addClass("dx-map"),this._lastAsyncAction=Promise.resolve(),this._checkOption("provider"),this._checkOption("markers"),this._checkOption("routes"),this._initContainer(),this._grabEvents(),this._rendered={}},_useTemplates:()=>!1,_checkOption(n){const e=this.option(n);if("markers"===n&&!Array.isArray(e))throw is.A.Error("E1022");if("routes"===n&&!Array.isArray(e))throw is.A.Error("E1023")},_initContainer(){this._$container=(0,a.A)("<div>").addClass("dx-map-container"),this.$element().append(this._$container)},_grabEvents(){const n=(0,N.b4)(Si.A.down,this.NAME);L.A.on(this.$element(),n,this._cancelEvent.bind(this))},_cancelEvent(n){this._provider&&this._provider.isEventsCanceled(n)&&!this.option("disabled")&&n.stopPropagation()},_saveRendered(n){const e=this.option(n);this._rendered[n]=e.slice()},_render(){this.callBase(),this._renderShield(),this._saveRendered("markers"),this._saveRendered("routes"),this._provider=new(RZ[this.option("provider")])(this,this._$container),this._queueAsyncAction("render",this._rendered.markers,this._rendered.routes)},_renderShield(){let n;this.option("disabled")?(n=(0,a.A)("<div>").addClass("dx-map-shield"),this.$element().append(n)):(n=this.$element().find(".dx-map-shield"),n.remove())},_clean(){this._cleanFocusState(),this._provider&&this._provider.clean(),this._provider=null,this._lastAsyncAction=Promise.resolve(),this.setOptionSilent("bounds",{northEast:null,southWest:null}),delete this._suppressAsyncAction},_optionChanged(n){const{name:e}=n,t=this._optionChangeBag;switch(this._optionChangeBag=null,e){case"disabled":this._renderShield(),this.callBase(n);break;case"width":case"height":this.callBase(n),this._dimensionChanged();break;case"provider":this._suppressAsyncAction=!0,this._invalidate();break;case"apiKey":is.A.log("W1001");break;case"bounds":this._queueAsyncAction("updateBounds");break;case"center":this._queueAsyncAction("updateCenter");break;case"zoom":this._queueAsyncAction("updateZoom");break;case"type":this._queueAsyncAction("updateMapType");break;case"controls":this._queueAsyncAction("updateControls",this._rendered.markers,this._rendered.routes);break;case"autoAdjust":this._queueAsyncAction("adjustViewport");break;case"markers":case"routes":{this._checkOption(e);const i=this._rendered[e];this._saveRendered(e),this._queueAsyncAction(`update${(0,vv.Ns)(e)}`,t?t.removed:i,t?t.added:this._rendered[e]).then(r=>{t&&t.resolve(r)});break}case"markerIconSrc":this._queueAsyncAction("updateMarkers",this._rendered.markers,this._rendered.markers);break;case"onReady":case"onUpdated":case"onMarkerAdded":case"onMarkerRemoved":case"onRouteAdded":case"onRouteRemoved":case"onClick":break;default:this.callBase.apply(this,arguments)}},_visibilityChanged(n){n&&this._dimensionChanged()},_dimensionChanged(){this._queueAsyncAction("updateDimensions")},_queueAsyncAction(n){const e=[].slice.call(arguments).slice(1),t=this._suppressAsyncAction;return this._lastAsyncAction=this._lastAsyncAction.then(()=>!this._provider||t?Promise.resolve():this._provider[n].apply(this._provider,e).then(i=>((i=(0,By.BO)(i))[0]&&!this._disposed&&this._triggerReadyAction(),i[1]))),this._lastAsyncAction},_triggerReadyAction(){this._createActionByOption("onReady")({originalMap:this._provider.map()})},_triggerUpdateAction(){this._createActionByOption("onUpdated")()},setOptionSilent(n,e){this._setOptionWithoutOptionChange(n,e)},addMarker(n){return this._addFunction("markers",n)},removeMarker(n){return this._removeFunction("markers",n)},addRoute(n){return this._addFunction("routes",n)},removeRoute(n){return this._removeFunction("routes",n)},_addFunction(n,e){const t=this.option(n),i=(0,By.BO)(e);return t.push.apply(t,i),this._partialArrayOptionChange(n,t,i,[])},_removeFunction(n,e){const t=this.option(n),i=(0,By.BO)(e);return(0,w.__)(i,(r,m)=>{const A=(0,C.kf)(m)?m:t?.indexOf(m);if(-1===A)throw is.A.log("E1021",(0,vv.Ns)(n.substring(0,n.length-1)),m);{const V=t.splice(A,1)[0];i.splice(r,1,V)}}),this._partialArrayOptionChange(n,t,[],i)},_partialArrayOptionChange(n,e,t,i){return(0,g.Sx)(new Promise(r=>{this._optionChangeBag={resolve:r,added:t,removed:i},this.option(n,e)}).then(r=>r&&1===r.length?r[0]:r),this)}});(0,y.A)("dxMap",kZ);let M3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.B6P,z.Hh_,z.Who,z.Dgy,z.Vku,z.Naz,f.p_,f.xZ,z.B6P,z.Hh_,z.Who,z.Dgy,z.Vku,z.Naz,f.xZ]})}return n})();var R3=M(3070);M(3951);let k3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,f.p_,f.xZ,z.POb,f.xZ]})}return n})();var L3=M(9810);const LZ={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>BZ),multi:!0};let BZ=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get format(){return this._getOption("format")}set format(t){this._setOption("format",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get invalidValueMessage(){return this._getOption("invalidValueMessage")}set invalidValueMessage(t){this._setOption("invalidValueMessage",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get mode(){return this._getOption("mode")}set mode(t){this._setOption("mode",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showSpinButtons(){return this._getOption("showSpinButtons")}set showSpinButtons(t){this._setOption("showSpinButtons",t)}get step(){return this._getOption("step")}set step(t){this._setOption("step",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get useLargeSpinButtons(){return this._getOption("useLargeSpinButtons")}set useLargeSpinButtons(t){this._setOption("useLargeSpinButtons",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOptionChanged;onPaste;onValueChanged;accessKeyChange;activeStateEnabledChange;buttonsChange;disabledChange;elementAttrChange;focusStateEnabledChange;formatChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;invalidValueMessageChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maxChange;minChange;modeChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showSpinButtonsChange;stepChange;stylingModeChange;tabIndexChange;textChange;useLargeSpinButtonsChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"formatChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"invalidValueMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"modeChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showSpinButtonsChange"},{emit:"stepChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useLargeSpinButtonsChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new L3.A(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("validationErrors",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-number-box"]],contentQueries:function(i,r,m){if(1&i&&S.wni(m,z.BrI,4),2&i){let A;S.mGM(A=S.lsd())&&(r.buttonsChildren=A)}},hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",format:"format",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",invalidValueMessage:"invalidValueMessage",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",max:"max",min:"min",mode:"mode",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showSpinButtons:"showSpinButtons",step:"step",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useLargeSpinButtons:"useLargeSpinButtons",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",formatChange:"formatChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",invalidValueMessageChange:"invalidValueMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxChange:"maxChange",minChange:"minChange",modeChange:"modeChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showSpinButtonsChange:"showSpinButtonsChange",stepChange:"stepChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useLargeSpinButtonsChange:"useLargeSpinButtonsChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,LZ,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),B3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.GIV,z.u4t,z.Pxf,f.p_,f.xZ,z.GIV,z.u4t,z.Pxf,f.xZ]})}return n})();const{states:ZI}=Te,N3=Te.pieSeriesSpacing,FZ=ZI.normalMark,VZ=ZI.hoverMark,HZ=ZI.selectedMark,UZ=[ZI.resetItem,ZI.applyHover,ZI.applySelected,ZI.applySelected];function F3(n,e){return{x:n.x,y:n.y-e}}function V3(n,e){return n.getVisiblePoints().reduce((t,i)=>{const r=xo(i.middleAngle);return(r<=90||r>=270?t.right:t.left).push(i),t},e||{left:[],right:[]})}function EG(n,e,t,i){let r=!1;return t&&(n.left.reverse(),n.right.reverse()),r=iy_resolveLabelOverlappingInOneDirection(n.left,i,!1,!1,e),iy_resolveLabelOverlappingInOneDirection(n.right,i,!1,!1,e)||r}function H3(n){return(0,C.kf)(n)?n>1?n=1:n<0&&(n=0):n=void 0,n}const U3=function(){function n(i,r){return i.filter(m=>m!==r)}let e=[],t={};return{queue(i){const r=i.getSizeGroup();var A;e=n(e,A=i).concat(A),clearTimeout(t[r]),t[r]=setTimeout(()=>{!function(V,X){const ce=X.filter(Ve=>Ve._isVisible()&&Ve.getSizeGroup()===V),_e=Math.min.apply(null,ce.map(Ve=>Ve.getSizeGroupLayout().radius)),Me=ce.filter(Ve=>Ve.getSizeGroupLayout().radius===_e);ce.forEach(Ve=>Ve.render({force:!0,sizeGroupLayout:Me.length?Me[0].getSizeGroupLayout():{}}))}(r,e)})},remove(i){e=n(e,i),e.length||(t={})}}}(),QF=ug.inherit({_themeSection:"pie",_layoutManagerOptions(){return(0,_.X)(!0,{},this.callBase(),{piePercentage:H3(this._themeManager.getOptions("diameter")),minPiePercentage:H3(this._themeManager.getOptions("minDiameter"))})},_optionChangesMap:{diameter:"REINIT",minDiameter:"REINIT",sizeGroup:"REINIT"},_disposeCore(){U3.remove(this),this.callBase()},_groupSeries(){var n;const{series:e}=this;this._groupsData={groups:[{series:e,valueOptions:{valueType:"numeric"}}],argumentOptions:null===(n=e[0])||void 0===n?void 0:n.getOptions()}},getArgumentAxis:()=>null,_getValueAxis(){const n=(new _f).setCodomain(360,0);return{getTranslator:()=>n,setBusinessRange(e){n.setDomain(e.min,e.max)}}},_populateBusinessRange(){this.series.map(n=>{const e=new Bl;return e.addRange(n.getRangeData().val),n.getValueAxis().setBusinessRange(e),e})},_specialProcessSeries(){(0,w.__)(this.series,(n,e)=>{e.arrangePoints()})},_checkPaneName:()=>!0,_processSingleSeries(n){this.callBase(n),n.arrangePoints()},_handleSeriesDataUpdated(){let n=0;this.series.forEach(e=>{n=Math.max(e.getPointsCount(),n)}),this.series.forEach(e=>{e.setMaxPointsCount(n)}),this.callBase()},_getLegendOptions(n){const e=this.callBase(n),{legendData:t}=e;return t.argument=n.argument,t.argumentIndex=n.argumentIndex,t.points=[n],e},_getLegendTargets(){const n={};(this.series||[]).forEach(t=>{t.getPoints().forEach(i=>{const r=i.argument.valueOf(),m=t.getPointsByArg(r).indexOf(i),A=r.valueOf().toString()+m;n[A]=n[A]||[];const V=n[A].push(i);i.index=n[A][V-2]?n[A][V-2].index:Object.keys(n).length-1,i.argumentIndex=m})});const e=[];return(0,w.__)(n,(t,i)=>{i.forEach((r,m)=>{if(0===m)return void e.push(this._getLegendOptions(r));const A=e[e.length-1];A.legendData.points.push(r),A.visible||(A.visible=r.isVisible())})}),e},_getLayoutTargets(){return[{canvas:this._canvas}]},_getLayoutSeries(n,e){let t;const i=this._canvas;let r=!1;return t=this.layoutManager.applyPieChartSeriesLayout(i,n,!0),n.forEach(m=>{m.correctPosition(t,i),r=m.drawLabelsWOPoints()||r}),r&&(t=this.layoutManager.applyPieChartSeriesLayout(i,n,e.hideLayoutLabels)),n.forEach(m=>{m.hideLabels()}),this._sizeGroupLayout={x:t.centerX,y:t.centerY,radius:t.radiusOuter,drawOptions:e},t},_getLayoutSeriesForEqualPies(n,e){const t=this._canvas,i=this.layoutManager.applyEqualPieChartLayout(n,e);return n.forEach(r=>{r.correctPosition(i,t),r.drawLabelsWOPoints()}),this.layoutManager.correctPieLabelRadius(n,i,t),i},_updateSeriesDimensions(n){const e=this._getVisibleSeries(),t=e.length;let i,r,m;const{sizeGroupLayout:A}=n;t&&(m=A?this._getLayoutSeriesForEqualPies(e,A):this._getLayoutSeries(e,n),r=(m.radiusOuter-m.radiusInner-N3*(t-1))/t,i=m.radiusInner,this._setGeometry(m),e.forEach(V=>{V.correctRadius({radiusInner:i,radiusOuter:i+r}),i+=r+N3}))},_renderSeries(n,e,t){if(this._calculateSeriesLayout(n,e),!n.sizeGroupLayout&&this.getSizeGroup())return U3.queue(this),void this._clearCanvas();this._renderSeriesElements(n,t)},_getCenter(){return this._center},getInnerRadius(){return this._innerRadius},_getLegendCallBack(){const n=this._legend,e=this._getLegendTargets().map(t=>t.legendData);return t=>{e.forEach(i=>{const r=[],m=n.getActionCallback({index:i.id});this.series.forEach(A=>{const V=A.getPointsByKeys(i.argument,i.argumentIndex);r.push.apply(r,V)}),t&&t.argument===i.argument&&t.argumentIndex===i.argumentIndex&&r.push(t),m(function zZ(n){let e=FZ;return n.forEach(t=>{var i;const r=null===(i=t.series)||void 0===i?void 0:i.getOptions();let m=t.fullState;"none"===r?.hoverMode&&(m&=~VZ),"none"===r?.selectionMode&&(m&=~HZ),e|=m}),UZ[e]}(r))})}},_locateLabels(n){let t,i,e=0;do{i=this._adjustSeriesLabels("shift"===n),t=this._resolveLabelOverlapping(n)}while((t||i)&&++e<5)},_adjustSeriesLabels(n){return this.series.reduce((e,t)=>t.adjustLabels(n)||e,!1)},_applyExtraSettings:h.lQ,_resolveLabelOverlappingShift(){const n="anticlockwise"===this.option("segmentsDirection"),e=this.series.reduce((r,m)=>((r[m.getOptions().label.position]||r.outside).push(m),r),{inside:[],columns:[],outside:[]});let t=!1;return e.inside.length>0&&(t=EG(e.inside.reduce((m,A)=>A.getVisiblePoints().reduce((X,ce)=>(X.left.push(ce),X),m),{left:[],right:[]}),F3,n,this._canvas)||t),t=e.columns.reduce((r,m)=>EG(V3(m),F3,n,this._canvas)||r,t),e.outside.length>0&&(t=EG(e.outside.reduce((r,m)=>V3(m,r),null),(r,m)=>co(r,-m,this._center),n,this._canvas)||t),t},_setGeometry(n){let{centerX:e,centerY:t,radiusInner:i}=n;this._center={x:e,y:t},this._innerRadius=i},_disposeSeries(){this.callBase.apply(this,arguments),this._abstractSeries=null},_legendDataField:"point",_legendItemTextField:"argument",_applyPointMarkersAutoHiding:h.lQ,_renderTrackers:h.lQ,_trackerType:"PieTracker",_createScrollBar:h.lQ,_updateAxesLayout:h.lQ,_applyClipRects:h.lQ,_appendAdditionalSeriesGroups:h.lQ,_prepareToRender:h.lQ,_isLegendInside:h.lQ,_renderAxes:h.lQ,_shrinkAxes:h.lQ,_isRotated:h.lQ,_seriesPopulatedHandlerCore:h.lQ,_reinitAxes:h.lQ,_correctAxes:h.lQ,_getExtraOptions(){return{startAngle:this.option("startAngle"),innerRadius:this.option("innerRadius"),segmentsDirection:this.option("segmentsDirection"),type:this.option("type")}},getSizeGroup(){return this._themeManager.getOptions("sizeGroup")},getSizeGroupLayout(){return this._sizeGroupLayout||{}}});(0,w.__)(["startAngle","innerRadius","segmentsDirection","type"],(n,e)=>{QF.prototype._optionChangesMap[e]="REFRESH_SERIES_DATA_INIT"}),QF.addPlugin(ZD.pieChart),QF.addPlugin(F_.core),QF.addPlugin(F_.pieChart),(0,y.A)("dxPieChart",QF);let z3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.uvP,z.YLo,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.tXi,z.XWi,z.REv,z.lWu,z.Af1,z.uE7,z.y7y,z.tML,z.Pxf,z.$jZ,z.iVO,z.uIe,z.F1M,z.Yh3,z.sVF,z.YkV,z.FXg,z.xOT,z.hU2,z.hzo,z.Vku,f.p_,f.xZ,z.uvP,z.YLo,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.tXi,z.XWi,z.REv,z.lWu,z.Af1,z.uE7,z.y7y,z.tML,z.Pxf,z.$jZ,z.iVO,z.uIe,z.F1M,z.Yh3,z.sVF,z.YkV,z.FXg,z.xOT,z.hU2,z.hzo,z.Vku,f.xZ]})}return n})();const GZ={number:"numeric",date:"datetime"},OG="dxPivotGridUnbinding";function G3(n,e){const t=[],i=e.length-1;return(0,w.__)(n,(r,m)=>{t.push(m.text||SS(m.value,e[i-r]))}),t.reverse()}function W3(n){let e=0;return td(n,t=>{e=Math.max(e,t.length-1)}),e}function jZ(n,e){const t=n.getAreaFields("data");if("args"!==e.putDataFieldsInto&&"singleAxis"!==e.dataFieldsDisplayMode||1===t.length){const i=[];return(0,w.__)(t,(r,m)=>{const A={name:m.caption,title:m.caption,valueType:GZ[m.dataType]||m.dataType,label:{format:m.format}};m.customizeText&&(A.label.customizeText=function(V){return m.customizeText.call(m,V)}),"splitPanes"===e.dataFieldsDisplayMode&&(A.pane=m.caption),i.push(A)}),i}return[{}]}function KZ(n,e){const t=[],i=n.getAreaFields("data");return i.length>1&&"splitPanes"===e.dataFieldsDisplayMode&&"args"!==e.putDataFieldsInto&&(0,w.__)(i,(r,m)=>{t.push({name:m.caption})}),t.length||t.push({}),t}const $3={bindChart(n,e){e=(0,_.X)({},e);const t=this,i=function(){e.grandTotalText=t.option("texts.grandTotal");const m=function XZ(n,e){const{customizeSeries:t}=e,{customizeChart:i}=e;let r={valueAxis:jZ(n,e),panes:KZ(n,e)};const m={};return i&&(r=(0,_.X)(!0,{},r,i(r))),r.dataSource=function $Z(n,e,t){const i=n.getData(),r=[],m=n.getAreaFields("data"),A=n.getAreaFields("row"),V=n.getAreaFields("column"),X=[{index:i.grandTotalColumnIndex,children:i.columns}],ce=[{index:i.grandTotalRowIndex,children:i.rows}],_e=W3(ce),Me=W3(X);let Ve,Je,rt,Ct,Xt,On,Fn,oi,Yt,$t;function xn(){const ii=(i.values[rt]||[])[Fn]||[],qi=ii[Ve];let ji,$i={rowPath:On,maxRowLevel:_e,rowPathFormatted:Xt,rowFields:A,columnPathFormatted:$t,maxColumnLevel:Me,columnPath:Yt,columnFields:V,dataFields:m,dataIndex:Ve,dataValues:ii,visible:oi&&Ct},ho=(e.inverted?$t:Xt).join(" - "),io=(e.inverted?Xt:$t).join("/");m.length>1&&(("args"===e.putDataFieldsInto||"both"===e.putDataFieldsInto)&&(io+=` | ${Je.caption}`),"args"!==e.putDataFieldsInto&&(ho+=` | ${Je.caption}`,"singleAxis"!==e.dataFieldsDisplayMode&&(ji=Je.caption))),$i.chartDataItem={val:void 0===qi?null:qi,series:ho,arg:io},$i=function WZ(n,e){let{chartDataItem:t}=n,i=e&&e(n);return i?(t=(0,_.X)({},t,i.chartDataItem),i=(0,_.X)({},n,i,{chartDataItem:t}),i):n}($i,e.processCell),$i.visible&&(t[$i.chartDataItem.series]=t[$i.chartDataItem.series]||ji,r.push($i.chartDataItem))}function Gn(ii){td(ce,qi=>{rt=qi[0].index,qi=qi.slice(0,qi.length-1),Ct=_e===qi.length,On=Zu(qi),Xt=G3(qi,A),0===On.length&&(Xt=[e.grandTotalText]),td(X,ji=>{Fn=ji[0].index,ji=ji.slice(0,ji.length-1),oi=Me===ji.length,Yt=Zu(ji),$t=G3(ji,V),0===Yt.length&&($t=[e.grandTotalText]),ii()})})}function qn(ii){(0,w.__)(m,(qi,ji)=>{Je=ji,Ve=qi,ii()})}return!1===e.alternateDataFields?qn(()=>{Gn(xn)}):Gn(()=>{qn(xn)}),r}(n,e,m),r.seriesTemplate={nameField:"series",customizeSeries(A){let V={};return"splitPanes"===e.dataFieldsDisplayMode?V.pane=m[A]:"singleAxis"!==e.dataFieldsDisplayMode&&(V.axis=m[A]),t&&(V=(0,_.X)(V,t(A,V))),V}},r}(t.getDataSource(),e);n.option(m)};if(n=function YZ(n){if(!n)return!1;if(n.NAME)return"dxChart"===n.NAME&&n;const e=(0,a.A)(n);return e.data("dxChart")&&e.dxChart("instance")}(n),!n)return null;(function ZZ(n){const e=n.$element().data(OG);e&&e()})(n),t.on("changed",i),i();const r=function(){n.$element().removeData(OG),t.off("changed",i)};return n.on("disposing",r),this.on("disposing",r),n.$element().data(OG,r),r}};var Tk=M(7007),JF=M(8649);function NH(n){const e=n();let t={};return function(i){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const m={top:void 0!==i.top?Math.ceil(i.top):void 0,left:void 0!==i.left?Math.ceil(i.left):void 0};!r&&m.top===t.top&&m.left===t.left||(t=m,e.scrollTo(i))}}const j3=function(n){let e=0;const{offsetWidth:t}=n;if(n.getBoundingClientRect){const i=(0,za.N)(n);e=i.width,e||(e=i.right-i.left),e<=t-1&&(e=t)}return e>0?e:t};function K3(n,e,t,i){let r=0,m=0;const A=t/2;return n+i-(e+t)>1?(n>=e+t+A&&(m=parseInt((n-(e+t))/A,10)),r=e+t+A*m):n<e?(n<=e-A&&(m=parseInt((n-(e-A))/A,10)),r=e-(t-A*m)):r=e,r}const FH=es.A.inherit({ctor(n){this.component=n},option(){return this.component.option.apply(this.component,arguments)},_getRowElement(n){const e=this;return e._tableElement&&e._tableElement.length>0?e._tableElement[0].rows[n]:null},_createGroupElement:()=>(0,a.A)("<div>"),_createTableElement:()=>(0,a.A)("<table>"),_getCellText(n,e){let t=n.isWhiteSpace?"&nbsp":n.text||"&nbsp";return e&&(-1!==t.indexOf("<")||-1!==t.indexOf(">"))&&(t=(0,a.A)("<div>").text(t).html()),t},_getRowClassNames(){},_applyCustomStyles(n){n.cell.width&&n.cssArray.push(`min-width:${n.cell.width}px`),n.cell.sorted&&n.classArray.push("dx-pivotgrid-sorted")},_getMainElementMarkup:()=>c.A.createElement("tbody"),_getCloseMainElementMarkup:()=>"</tbody>",_renderTableContent(n,e){const t=this,i=e.length;let r,m,A,V,X;const ce=t.option("rtlEnabled"),_e=t.option("encodeHtml");let Me;n.data("area",t._getAreaName()),n.data("data",e),n.css("width","");const Ve=this._getMainElementMarkup();for(A=0;A<i;A+=1){r=e[A],Me=[];const Je=c.A.createElement("tr");for(V=0;V<r.length;V+=1){m=r[V],this._getRowClassNames(A,m,Me);const rt=c.A.createElement("td");if(m){m.rowspan&&rt.setAttribute("rowspan",m.rowspan||1),m.colspan&&rt.setAttribute("colspan",m.colspan||1);const Xt={cellElement:void 0,cell:m,cellsCount:r.length,cellIndex:V,rowElement:void 0,rowIndex:A,rowsCount:i,rtlEnabled:ce,classArray:[],cssArray:[]};if(t._applyCustomStyles(Xt),Xt.cssArray.length&&(0,JF.eC)(rt,Xt.cssArray.join(";")),Xt.classArray.length&&rt.setAttribute("class",Xt.classArray.join(" ")),(0,C.O9)(m.expanded)){const On=c.A.createElement("div");On.classList.add("dx-expand-icon-container");const Fn=c.A.createElement("span");Fn.classList.add("dx-expand"),On.appendChild(Fn),rt.appendChild(On)}X=this._getCellText(m,_e)}else X="";const Ct=c.A.createElement("span");if((0,C.O9)(m.wordWrapEnabled)&&(Ct.style.whiteSpace=m.wordWrapEnabled?"normal":"nowrap"),Ct.innerHTML=X,rt.appendChild(Ct),m.sorted){const Xt=c.A.createElement("span");Xt.classList.add("dx-icon-sorted"),rt.appendChild(Xt)}Je.appendChild(rt)}Me.length&&Je.setAttribute("class",Me.join(" ")),Ve.appendChild(Je)}n.append(Ve),this._triggerOnCellPrepared(n,e)},_triggerOnCellPrepared(n,e){const t=this,i=n.find("tr"),r=t._getAreaName(),m=t.option("onCellPrepared"),A=t.component._eventsStrategy.hasEvent("cellPrepared");let V,X,ce;const _e=this.component._defaultActionArgs();let Me,Ve,Je,rt;if(m||A)for(Je=0;Je<e.length;Je+=1)for(Me=e[Je],V=i.eq(Je),rt=0;rt<Me.length;rt+=1)Ve=Me[rt],X=V.children().eq(rt),ce={area:r,rowIndex:Je,columnIndex:rt,cellElement:(0,s.cc)(X),cell:Ve},A?t.component._trigger("onCellPrepared",ce):m((0,_.X)(ce,_e))},_getRowHeight(n){const e=this._getRowElement(n);let t=0;const{offsetHeight:i}=e;return e&&e.lastChild?(e.getBoundingClientRect&&(t=(0,za.N)(e).height,t<=i-1&&(t=i)),t>0?t:i):0},_setRowHeight(n,e){const t=this._getRowElement(n);t&&(t.style.height=`${e}px`)},getRowsLength(){const n=this;return n._tableElement&&n._tableElement.length>0?n._tableElement[0].rows.length:0},getRowsHeight(){const n=this,e=[],t=n.getRowsLength();for(let i=0;i<t;i+=1)e.push(n._getRowHeight(i));return e},setRowsHeight(n){const e=this;let t=0;const i=n.length;for(let r=0;r<i;r+=1)t+=n[r],e._setRowHeight(r,n[r]);this._tableHeight=t,this._tableElement[0].style.height=`${t}px`},getColumnsWidth(){const n=this.getRowsLength();let e,t,i,r;const m=[],A=[],V=function(X,ce,_e,Me,Ve){let Je,rt;for(Je=0;Je<Me;Je+=1)for(rt=0;rt<Ve;rt+=1)X[ce+Je]=X[ce+Je]||[],X[ce+Je][_e+rt]=!0};if(n)for(e=0;e<n;e+=1)for(m[e]=m[e]||[],t=this._getRowElement(e),i=0;i<t.cells.length;i+=1){for(r=0;m[e][r];r+=1);V(m,e,r,t.cells[i].rowSpan,t.cells[i].colSpan),1===t.cells[i].colSpan&&(A[r]=A[r]||j3(t.cells[i]))}return A},setColumnsWidth(n){let e;const t=this._tableElement[0];this._colgroupElement.html("");const i=this.getColumnsCount(),r=[];for(e=0;e<i;e+=1)r.push(n[e]||0);for(e=i;e<n.length&&n;e+=1)r[i-1]+=n[e];for(e=0;e<i;e+=1){const m=c.A.createElement("col");m.style.width=`${r[e]}px`,this._colgroupElement.append(m)}this._tableWidth=r.reduce((m,A)=>m+A,0),t.style.width=`${this._tableWidth}px`,t.style.tableLayout="fixed"},resetColumnsWidth(){(0,D.zj)(this._colgroupElement.find("col"),"auto"),this._tableElement.css({width:"",tableLayout:""})},setGroupWidth(n){this._getScrollable().option("width",n)},setGroupHeight(n){this._getScrollable().option("height",n)},getGroupHeight(){return this._getGroupElementSize("height")},getGroupWidth(){return this._getGroupElementSize("width")},_getGroupElementSize(n){const e=this.groupElement()[0].style[n];return e.indexOf("px")>0?parseFloat(e):null},groupElement(){return this._groupElement},tableElement(){return this._tableElement},element(){return this._rootElement},headElement(){return this._tableElement.find("thead")},_setTableCss(n){this.option("rtlEnabled")&&(n.right=n.left,delete n.left),this.tableElement().css(n)},setVirtualContentParams(n){this._virtualContent.css({width:n.width,height:n.height});const e=this._getScrollable();null!=e&&e.isRenovated()?this._getScrollable().option("classes","dx-virtual-mode"):this.groupElement().addClass("dx-virtual-mode")},disableVirtualMode(){const n=this._getScrollable();null!=n&&n.isRenovated()?this._getScrollable().option("classes",""):this.groupElement().removeClass("dx-virtual-mode")},_renderVirtualContent(){const n=this;!n._virtualContent&&"virtual"===n.option("scrolling.mode")&&(n._virtualContent=(0,a.A)("<div>").addClass("dx-virtual-content").insertBefore(n._tableElement))},reset(){const n=this._tableElement[0];if(this._fakeTable&&this._fakeTable.detach(),this._fakeTable=null,this.disableVirtualMode(),this.setGroupWidth("100%"),this.setGroupHeight("auto"),this.resetColumnsWidth(),n){for(let e=0;e<n.rows.length;e+=1)n.rows[e].style.height="";n.style.height="",n.style.width="100%"}},_updateFakeTableVisibility(){const n=this,e=n.tableElement()[0],t=n.option("rtlEnabled")?"right":"left",i=n._fakeTable[0];e.style.top===i.style.top&&i.style[t]===e.style[t]?n._fakeTable.addClass("dx-hidden"):n._fakeTable.removeClass("dx-hidden")},_moveFakeTableHorizontally(n){const e=this,i=e.option("rtlEnabled")?"right":"left",m=K3(n,parseFloat(e.tableElement()[0].style[i]),e._tableWidth,e.getGroupWidth());parseFloat(e._fakeTable[0].style[i])!==m&&(e._fakeTable[0].style[i]=`${m}px`)},_moveFakeTableTop(n){const e=this,i=K3(n,parseFloat(e.tableElement()[0].style.top),e._tableHeight,e.getGroupHeight());parseFloat(e._fakeTable[0].style.top)!==i&&(e._fakeTable[0].style.top=`${i}px`)},_moveFakeTable(){this._updateFakeTableVisibility()},_createFakeTable(){const n=this;n._fakeTable||(n._fakeTable=n.tableElement().clone().addClass("dx-pivot-grid-fake-table").appendTo(n._virtualContent))},render(n,e){const t=this;if(t._tableElement){try{t._tableElement[0].innerHTML=""}catch{t._tableElement.empty()}t._tableElement.removeAttr("style")}else t._groupElement=t._createGroupElement(),t._tableElement=t._createTableElement(),t._tableElement.appendTo(t._groupElement),t._groupElement.appendTo(n),t._rootElement=n;t._colgroupElement=(0,a.A)("<colgroup>").appendTo(t._tableElement),t._renderTableContent(t._tableElement,e),t._renderVirtualContent()},_getScrollable(){return this.groupElement().data("dxScrollable")},_getMemoizeScrollTo(){return this._memoizeScrollTo=this._memoizeScrollTo??NH(()=>this._getScrollable()),this._memoizeScrollTo},_getMaxLeftOffset(n){const e=(0,a.A)(n.container()).get(0);return e.scrollWidth-e.clientWidth},on(n,e){const t=this,i=t._getScrollable();return i&&i.on(n,r=>{t.option("rtlEnabled")&&(0,C.O9)(r.scrollOffset.left)&&(r.scrollOffset.left=t._getMaxLeftOffset(i)-r.scrollOffset.left),e(r)}),this},off(n){const e=this._getScrollable();return e&&e.off(n),this},scrollTo(n){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const t=this._getScrollable();if(!t)return;const i=this.option("rtlEnabled"),r=this._getAreaName(),m=(0,Lo.A)({},n,{left:!i||"column"!==r&&"data"!==r?n.left:this._getMaxLeftOffset(t)-n.left});this._getMemoizeScrollTo()(m,e),this._virtualContent&&(this._createFakeTable(),this._moveFakeTable(n))},updateScrollable(){const n=this._getScrollable();if(n)return n.update()},getColumnsCount(){let n=0;const e=this._getRowElement(0);let t;if(e){t=e.cells;for(let i=0,r=t.length;i<r;++i)n+=t[i].colSpan}return n},getData(){const n=this._tableElement;return n?n.data("data"):[]}}),QZ={DataArea:FH.inherit({_getAreaName:()=>"data",_createGroupElement:()=>(0,a.A)("<div>").addClass("dx-pivotgrid-area").addClass("dx-pivotgrid-area-data").css("borderTopWidth",0),_applyCustomStyles(n){const{cell:e}=n,{classArray:t}=n;("T"===e.rowType||"T"===e.columnType)&&t.push("dx-total"),("GT"===e.rowType||"GT"===e.columnType)&&t.push("dx-grandtotal"),("T"===e.rowType||"GT"===e.rowType)&&t.push("dx-row-total"),n.rowIndex===n.rowsCount-1&&n.cssArray.push("border-bottom: 0px"),this.callBase(n)},_moveFakeTable(n){this._moveFakeTableHorizontally(n.x),this._moveFakeTableTop(n.y),this.callBase()},renderScrollable(){this._groupElement.dxScrollable({useNative:this.getUseNativeValue(),useSimulatedScrollbar:!1,rtlEnabled:this.component.option("rtlEnabled"),bounceEnabled:!1,updateManually:!0})},getUseNativeValue(){const{useNative:n}=this.component.option("scrolling");return"auto"===n?!!Tk.nativeScrolling:!!n},getScrollbarWidth(){return this.getUseNativeValue()?Ap():0},updateScrollableOptions(n){let{direction:e,rtlEnabled:t}=n;const i=this._getScrollable();i.option("useNative",this.getUseNativeValue()),i.option({direction:e,rtlEnabled:t})},getScrollableDirection:(n,e)=>n&&!e?"horizontal":!n&&e?"vertical":"both",reset(){this.callBase(),this._virtualContent&&this._virtualContent.parent().css("height","auto")},setVirtualContentParams(n){this.callBase(n),this._virtualContent.parent().css("height",n.height),this._setTableCss({top:n.top,left:n.left})}})};var BS=M(8684),JZ=M(2658),wG=M(2),qZ=M(1948),eQ=M(6101),tQ=M(6569),VH=M(5335),X3=M(9916);const Y3=es.A.inherit(function(){const n={year:$t=>$t&&$t.getFullYear(),quarter:$t=>$t&&Math.floor($t.getMonth()/3)+1,month:$t=>$t&&$t.getMonth()+1,day:$t=>$t&&$t.getDate(),dayOfWeek:$t=>$t&&$t.getDay()};function e($t){return-1!==$t.indexOf(".")?(0,fa.Hz)($t):function(xn){return xn[$t]}}function t($t){return function(xn){let Gn=$t(xn);return Gn&&!(Gn instanceof Date)&&(Gn=Yl.A.deserializeDate(Gn)),Gn}}function i($t){(0,w.__)($t||[],(xn,Gn)=>{let qn,ii;const{dataField:qi}=Gn;let ji;const{levels:$i}=Gn;let ho;if(!Gn.selector){if(ho=qi?e(qi):function(io){return io},$i&&i($i),"date"===Gn.dataType){ii=n[Gn.groupInterval];const io=t(ho);qn=function(Uo){const zr=io(Uo);return ii?ii(zr):zr}}else"number"===Gn.dataType?(ji=(0,C.kf)(Gn.groupInterval)&&Gn.groupInterval>0&&Gn.groupInterval,qn=function(io){let Uo=ho(io);return(0,C.Kg)(Uo)&&(Uo=Number(Uo)),ji?Math.floor(Uo/ji)*ji:Uo}):qn=ho;OS(Gn),If(Gn,"selector",qn)}})}const r=function($t,xn,Gn,qn){let ii=qn[Gn];return ii||(ii={value:$t,index:qn.length++},qn[Gn]=ii,xn.push(ii)),ii};function m($t,xn,Gn,qn,ii){const qi=xn.dimensions[qn],{expandedPathsHash:ji}=xn;let $i,ho;qi&&($i=qi.selector(xn.data),ho=r($i,Gn,ii=void 0!==ii?ii+"/./"+$i:`${$i}`,xn.childrenHash),$t.push(ho.index),(ji&&ji[ii]||qi.expanded)&&(ho.children||(ho.children=[]),m($t,xn,ho.children,qn+1,ii)))}function A($t,xn,Gn,qn){const ii=[0],ji="rows"===qn?xn.rowExpandedPaths:xn.columnExpandedPaths;return m(ii,{data:$t,childrenHash:Gn[`${qn}Hash`],dimensions:xn[qn],expandedPathsHash:xn.headerName!==qn&&ji&&ji.hash},Gn[qn],xn.headerName===qn?xn.path.length:0),ii}function V($t,xn,Gn,qn){const ii=[];let qi,ji,$i,ho;const io=A($t,qn,Gn,"rows"),Uo=A($t,qn,Gn,"columns");for(ji=0;ji<io.length;ji+=1)for($i=io[ji],xn[$i]=xn[$i]||[],qi=0;qi<Uo.length;qi+=1)ho=Uo[qi],ii.push(xn[$i][ho]=xn[$i][ho]||[]);return ii}function X($t){if($t){const xn=$t.hash={};$t.forEach(Gn=>{const qn=Gn.map(ii=>`${ii}`).join("/./");xn[qn]=!0})}}function ce($t){$t.rows=$t.rows||[],$t.columns=$t.columns||[],$t.filters=$t.filters||[],X($t.columnExpandedPaths),X($t.rowExpandedPaths),i($t.columns),i($t.rows),i($t.values),i($t.filters)}function _e($t){return"custom"===$t.summaryType?($t.calculateCustomSummary=$t.calculateCustomSummary||h.lQ,{seed(){const xn={summaryProcess:"start",totalValue:void 0};return $t.calculateCustomSummary(xn),xn},step:(xn,Gn)=>(xn.summaryProcess="calculate",xn.value=Gn,$t.calculateCustomSummary(xn),xn),finalize:xn=>(xn.summaryProcess="finalize",delete xn.value,$t.calculateCustomSummary(xn),xn.totalValue)}):X3.zL[$t.summaryType]||X3.zL.count}function Me($t,xn,Gn){for(let qn=0;qn<$t.length;qn+=1){const ii=$t[qn],qi=ii.selector(Gn),ji=_e(ii),$i="function"==typeof ji.seed;for(let ho=0;ho<xn.length;ho+=1){const io=xn[ho];io.length<=qn&&(io[qn]=$i?ji.seed():ji.seed),void 0===io[qn]?io[qn]=qi:(0,C.O9)(qi)&&(io[qn]=ji.step(io[qn],qi))}}}function Ve($t,xn){let Gn=$t&&$t.valueOf(),qn=xn&&xn.valueOf();if(Array.isArray($t)){xn=xn||[];for(let ii=0;ii<$t.length;ii+=1)if(Gn=$t[ii]&&$t[ii].valueOf(),qn=xn[ii]&&xn[ii].valueOf(),Gn!==qn)return!1;return!0}return Gn===qn}function Je($t){const xn=[];return(0,w.__)($t,(Gn,qn)=>{const ii=qn.filterValues||[],{groupName:qi}=qn;qi&&(0,C.kf)(qn.groupIndex)||ii.length&&xn.push(function(ji){const $i=qn.levels?function(io,Uo){const zr=[];return(0,w.__)(io,(Os,wa)=>{zr.push(wa.selector(Uo))}),zr}(qn.levels,ji):qn.selector(ji);let ho=!1;for(let io=0;io<ii.length;io+=1)if(Ve(ii[io],$i)){ho=!0;break}return"exclude"===qn.filterType?!ho:ho})}),xn}function rt($t){const xn=Je($t.rows).concat(Je($t.columns)).concat(Je($t.filters)),Gn=$t[$t.headerName],{path:qn}=$t;return Gn&&xn.push(ii=>{let qi;for(let ji=0;ji<qn.length;ji+=1)if(qi=Gn[ji].selector(ii),(0,fa.ao)(qi,!0)!==(0,fa.ao)(qn[ji],!0))return!1;return!0}),function(ii){for(let qi=0;qi<xn.length;qi+=1)if(!xn[qi](ii))return!1;return!0}}function Xt($t,xn){let Gn=$t.filter();return $t.store()instanceof Ow.A&&Gn?(Gn=Yt(Gn,xn),(0,Aw.A)($t.items()).filter(Gn).toArray()):$t.items()}function On($t,xn,Gn){const qn=new g.cY,ii=function(qi){$t.store()instanceof Ay.A&&(qi.storeLoadOptions.filter=Yt(qi.storeLoadOptions.filter,xn))};if($t.on("customizeStoreLoadOptions",ii),!$t.isLoaded()||Gn){const qi=Gn?$t.load():$t.reload();(0,g.z7)(qi).done(()=>{On($t,xn).done(()=>{qn.resolve(Xt($t,xn))}).fail(qn.reject)}).fail(qn.reject)}else qn.resolve(Xt($t,xn));return qn.always(()=>{$t.off("customizeStoreLoadOptions",ii)})}function Fn($t,xn){xn.forEach(Gn=>{if(Gn.dataField&&"date"===Gn.dataType){const qn=t(e(Gn.dataField));$t[Gn.dataField]=function(ii){return qn(ii)}}})}function oi($t){const xn={};return Array.isArray($t)?Fn(xn,$t):$t&&["rows","columns","filters"].forEach(Gn=>{$t[Gn]&&Fn(xn,$t[Gn])}),xn}function Yt($t,xn){if(!Array.isArray($t))return $t;$t=$t.slice(0),(0,C.Kg)($t[0])&&($t[1]instanceof Date||$t[2]instanceof Date)&&($t[0]=xn[$t[0]]);for(let Gn=0;Gn<$t.length;Gn+=1)$t[Gn]=Yt($t[Gn],xn);return $t}return{ctor($t){this._progressChanged=$t.onProgressChanged||h.lQ,this._dataSource=new aC.q($t),this._dataSource.paginate(!1)},getFields($t){const xn=this._dataSource,Gn=new g.cY;return On(xn,oi($t)).done(qn=>{Gn.resolve(vI(qn,$t))}).fail(Gn.reject),Gn},key(){return this._dataSource.key()},load($t){const xn=this,Gn=xn._dataSource,qn=new g.cY;return ce($t),On(Gn,oi($t),$t.reload).done(ii=>{(0,g.z7)(function Ct($t,xn,Gn){const qn={columns:[],rows:[],columnsHash:{length:1},rowsHash:{length:1}},ii=[];let qi,ji;const $i=new g.cY;let ho=0;const io=rt(xn);return function Uo(){const zr=new Date,Os=ho;for(;ho<$t.length;ho+=1){if(ho>Os&&ho%1e4==0&&new Date-zr>=300)return Gn(ho/$t.length),void setTimeout(Uo,0);ji=$t[ho],io(ji)&&(qi=V(ji,ii,qn,xn),Me(xn.values,qi,ji))}var $l;$l=ii,(0,w.__)(xn.values,(Gc,Jd)=>{const Dg=_e(Jd);Dg.finalize&&(0,w.__)($l,(xh,wo)=>{(0,w.__)(wo,(dr,Cr)=>{Cr&&void 0!==Cr[Gc]&&(Cr[Gc]=Dg.finalize(Cr[Gc]))})})}),Gn(1),$i.resolve({rows:qn.rows,columns:qn.columns,values:ii,grandTotalRowIndex:0,grandTotalColumnIndex:0})}(),$i}(ii,$t,xn._progressChanged)).done(qn.resolve)}).fail(qn.reject),qn},filter(){const $t=this._dataSource;return $t.filter.apply($t,arguments)},supportPaging:()=>!1,getDrillDownItems($t,xn){xn=xn||{},ce($t=$t||{});const Gn=[],qn=this._dataSource.items();let ii;const{maxRowCount:qi}=xn,{customColumns:ji}=xn,$i=rt($t),ho=rt({rows:cC($t.rows,xn.rowPath),columns:cC($t.columns,xn.columnPath),filters:[]});for(let io=0;io<qn.length;io+=1){if(ho(qn[io])&&$i(qn[io])){if(ji){ii={};for(let Uo=0;Uo<ji.length;Uo+=1)ii[ji[Uo]]=qn[io][ji[Uo]]}else ii=qn[io];Gn.push(ii)}if(qi>0&&Gn.length===qi)break}return Gn}}}()).include(yI),TG=function(n,e,t){n=n||[],t=t||0;for(let i=0;i<n.length;i+=1){const r=n[i];e(r,t),r&&r.items&&r.items.length&&TG(r.items,e,t+1)}};function Z3(n,e){const t=[];return(0,w.__)(n,(i,r)=>{t.push({selector:r.dataField,groupInterval:r.groupInterval,desc:e&&"desc"===r.sortOrder,isExpanded:i<n.length-1})}),t}function Q3(n,e,t,i){return[[n,i?"<":">=",t],i?"or":"and",[n,i?">=":"<",t+e]]}function J3(n,e){const t=[];return n.searchValue?[n.dataField,"contains",n.searchValue]:(e="exclude"===n.filterType?e||"and":e||"or",(0,w.__)(n.filterValues,(i,r)=>{let m=[];Array.isArray(r)?n.levels&&n.levels.length&&(m=J3({filterValues:r,filterType:n.filterType,levels:n.levels},"and")):m=function iQ(n,e){const t=function nQ(n){let e=n.dataField,{groupInterval:t}=n;return"date"===n.dataType&&"string"==typeof t&&("quarter"===t.toLowerCase()&&(t="Month"),e=`${e}.${Ch(t)}`),e}(n),i="exclude"===n.filterType;let r=[t,i?"<>":"=",e];return(0,C.O9)(n.groupInterval)&&("string"==typeof n.groupInterval&&"quarter"===n.groupInterval.toLowerCase()?r=Q3(t,3,3*(e-1)+1,i):"number"==typeof n.groupInterval&&"date"!==n.dataType&&(r=Q3(t,n.groupInterval,e,i))),r}(n.levels?n.levels[i]:n,r),m.length&&(t.length&&t.push(e),t.push(m))}),t)}function q3(n){let e=[];return(0,w.__)(n,(t,i)=>{const r=J3(i);if(!r.length)return[];e.length&&e.push("and"),e.push(r)}),1===e.length&&(e=e[0]),e}function e4(n,e){let t;const i=function(r){return r&&r.length};return t=i(n)&&i(e)?[n,"and",e]:i(n)?n:e,t}function t4(n,e,t,i,r){n[t]=n[t]||[],n[t][i]=n[t][i]||[],(0,C.O9)(n[t][i][r])||(n[t][i][r]=e)}function rQ(n,e){return e&&"number"===e.dataType&&(0,C.Kg)(n)?Number(n):!e||"date"!==e.dataType||e.groupInterval||n instanceof Date?n:Yl.A.deserializeDate(n)}function HH(n){return(n||[]).filter(e=>e.filterValues&&e.filterValues.length||e.searchValue)}function n4(n,e){if(n.headerName){if(e===n.headerName)return n.path.length;if(n.oppositePath)return n.oppositePath.length}return 0}function DG(n,e,t,i){const r=[],m=t>i?0:i,A=n.headerName!==e?n[e].slice(m,t):[],V="rows"===e?n.rowExpandedPaths:n.columnExpandedPaths;return(0,w.__)(A,(X,ce)=>{const _e=[];(0,w.__)(V,(Me,Ve)=>{if(Ve=Ve.slice(m,t),X<Ve.length){const Je=Ve[X];_e.includes(Je)||_e.push(Je)}}),_e.length&&r.push((0,_.X)({},ce,{filterType:"include",filterValues:_e}))}),r}function i4(n,e,t,i,r,m){const V="columns"===e?"rows":"columns",X=n[e],ce=[];let _e;if((("columns"===e?n.columnExpandedPaths:n.rowExpandedPaths)||[]).length)for(let Me=t;Me<i+1;Me+=1)_e={filters:r.concat(DG(n,e,Me,m))},_e[e]=X.slice(t,Me+1),_e[V]=[],ce.push((0,_.X)({},n,_e));else _e={filters:r},_e[e]=X.slice(t,i+1),_e[V]=[],ce.push((0,_.X)({},n,_e));return ce[0].includeTotalSummary=!0,ce}function o4(n){let e=0;return(0,w.__)(n,(t,i)=>{if(!i.expanded)return e=t,!1}),e}function UH(n){(0,w.__)(n||[],(e,t)=>{const{levels:i}=t;i&&UH(i),OS(t)})}const r4=es.A.inherit({ctor(n){this._dataSource=new aC.q(n),this._store=this._dataSource.store()},getFields(n){const e=new g.cY;return this._store.load({skip:0,take:20}).done(t=>{const i=(0,VH.Xp)(t);e.resolve(pw.discoverObjectFields(i.data,n))}).fail(e.reject),e},key(){return this._store.key()},load(n){const e=this,t=new g.cY,i={rows:[],columns:[],values:[],grandTotalRowIndex:0,grandTotalColumnIndex:0,rowHash:{},columnHash:{},rowIndex:1,columnIndex:1},r=function lQ(n){const e=Py(n,"rows"),t=Py(n,"columns");let i=n.filters||[];const r=n4(n,"columns"),m=o4(n.columns),A=o4(n.rows),V=n4(n,"rows");let X=[];i=i.concat(HH(n.rows)).concat(HH(n.columns)).concat(function aQ(n){return cC(n[n.headerName],n.path).concat(cC(n["rows"===n.headerName?"columns":"rows"],n.oppositePath||[]))}(n));const ce=i4(n,"columns",r,t,i,m);if(n.rows.length&&n.columns.length){"rows"!==n.headerName&&(X=X.concat(ce));for(let _e=V;_e<e+1;_e+=1){const Me=n.rows.slice(V,_e+1),Ve=DG(n,"rows",_e,A);for(let Je=r;Je<t+1;Je+=1){const rt=(0,_.X)({},n,{columns:n.columns.slice(r,Je+1),rows:Me,filters:i.concat(DG(n,"columns",Je,m)).concat(Ve)});X.push(rt)}}}else X=n.columns.length?ce:i4(n,"rows",V,e,i,A);return X}(n),m=[];return UH(n.rows),UH(n.columns),UH(n.filters),(0,w.__)(r,(A,V)=>{m.push(e._store.load(function oQ(n,e,t){let i=q3(n.filters);const r=Z3(n.rows,n.rowTake).concat(Z3(n.columns,n.columnTake)),m={groupSummary:[],totalSummary:[],group:r.length?r:void 0,take:r.length?void 0:1};return n.rows.length&&n.rowTake?(m.skip=n.rowSkip,m.take=n.rowTake,m.requireGroupCount=!0):n.columns.length&&n.columnTake&&!t&&(m.skip=n.columnSkip,m.take=n.columnTake,m.requireGroupCount=!0),e&&(i=e4(i,e)),i.length&&(m.filter=i),(0,w.__)(n.values,(A,V)=>{const X={selector:V.dataField,summaryType:V.summaryType||"count"};m.groupSummary.push(X),n.includeTotalSummary&&m.totalSummary.push(X)}),m}(V,e.filter(),n.rows.length)))}),g.z7.apply(null,m).done(function(){(0,w.__)(m.length>1?arguments:[arguments],(V,X)=>{const ce=(0,VH.Xp)(X[0],X[1]);!function sQ(n,e,t,i){const r=[];let m=[];const{rowHash:A}=i,{columnHash:V}=i;function X(ce,_e,Me,Ve,Je){const rt=i[`${_e}Hash`];let Ct,Xt,On;const Fn=Me.slice(0,Ve+1).join("/");let oi;return void 0!==rt[Fn]?On=rt[Fn]:(On={value:rQ(ce.key,Je),index:i[`${_e}Index`]++,displayText:ce.displayText},oi=Me.slice(0,Ve).join("/"),Ve>0&&void 0!==rt[oi]?(Ct=rt[oi],Xt=Ct.children=Ct.children||[]):Xt=i[`${_e}s`],Xt.push(On),rt[Fn]=On),On}e&&e.summary&&(0,w.__)(e.summary,(ce,_e)=>{t4(i.values,_e,i.grandTotalRowIndex,i.grandTotalColumnIndex,ce)}),e&&e.groupCount>=0&&((n=[...Array(t.rows.length?t.rowSkip:t.columnSkip)].concat(n)).length=e.groupCount),TG(n,(ce,_e)=>{const Me=_e>=t.rows.length?t.rows.length:_e,Ve=_e>=t.rows.length?_e-t.rows.length:0;let Je,rt;if(_e>=t.rows.length&&Ve>=t.columns.length)return;_e<t.rows.length&&(m=[]),_e>=t.rows.length?ce?(m[Ve]=`${ce.key}`,Je=X(ce,"column",m,Ve,t.columns[Ve]),rt=A[r.slice(0,Me+1).join("/")]):i.columns.push({}):ce?(r[Me]=`${ce.key}`,rt=X(ce,"row",r,Me,t.rows[Me]),Je=V[m.slice(0,Ve+1).join("/")]):i.rows.push({});const Ct=rt&&rt.index||i.grandTotalRowIndex,Xt=Je&&Je.index||i.grandTotalColumnIndex;(0,w.__)(ce&&ce.summary||[],(On,Fn)=>{t4(i.values,Fn,Ct,Xt,On)})})}(ce.data,ce.extra,r[V],i)}),t.resolve({rows:i.rows,columns:i.columns,values:i.values,grandTotalRowIndex:i.grandTotalRowIndex,grandTotalColumnIndex:i.grandTotalColumnIndex})}).fail(t.reject),t},filter(){return this._dataSource.filter.apply(this._dataSource,arguments)},supportPaging:()=>!1,createDrillDownDataSource(n,e){const t=this._store,r=q3(cC((n=n||{}).rows,(e=e||{}).rowPath).concat(cC(n.columns,e.columnPath)).concat(HH(n.rows)).concat(n.filters||[]).concat(HH(n.columns)));return new aC.q({load:m=>t.load((0,_.X)({},m,{filter:e4(r,m.filter),select:e.customColumns}))})}}),QI="column",Dk="row",kf=null,s4=function(n,e){let t=n/e;return(!(0,C.O9)(n)||isNaN(t))&&(t=kf),t},AG=function(n,e){return s4(n.value(),n.grandTotal(e).value())},a4=function(n,e){const t=n.parent(e),i=t?t.value():n.value();return s4(n.value(),i)},l4=function(n){return function(e){const t=e.prev(QI,n),i=t&&t.value();return(0,C.O9)(i)&&(0,C.O9)(e.value())?e.value()-i:kf}},c4={percentOfColumnTotal:n=>a4(n,Dk),percentOfRowTotal:n=>a4(n,QI),percentOfColumnGrandTotal:n=>AG(n,Dk),percentOfRowGrandTotal:n=>AG(n,QI),percentOfGrandTotal:n=>AG(n)},d4=function(n,e){if(!n||!n.parent(e))return;let t=n.prev(e);return t||(t=d4(n.parent(e),e)),t},dQ=n=>{if(!n.runningTotal)return;const e=n.runningTotal===QI?Dk:QI;return t=>{const i=n.allowCrossGroupCalculation?d4(t,e):t.prev(e,!1),r=t.value(!0),m=t.value(!1),A=i?.value(!0);switch(!0){case(0,C.O9)(r)&&(0,C.O9)(m)&&(0,C.O9)(A):return A+r;case(0,C.O9)(A):return A;default:return r}}};function PG(n,e,t){let i={index:-1};if(!(0,C.Gv)(e))if(t.fields[e])e=t[e];else{const r=n.columns.concat(n.rows).concat(n.values),m=lC(r,e);e=t[e]=r[m]}if(e){const r=e.area||"data";i=t.positions[e.index]=t.positions[e.index]||{area:r,index:n["data"===r?"values":`${r}s`].indexOf(e)}}return i}function qF(n){return n===Dk?"_rowPath":"_columnPath"}const JI=function(n,e,t,i,r,m){this._columnPath=n,this._rowPath=e,this._fieldIndex=r,this._fieldsCache=m||{fields:{},positions:{}},this._data=t,this._descriptions=i;const A=t.values&&t.values[e[0].index]&&t.values[e[0].index][n[0].index];A&&(A.originalCell=A.originalCell||A.slice(),A.postProcessedFlags=A.postProcessedFlags||[],this._cell=A)};function u4(n){const{summaryDisplayMode:e}=n,t=n.allowCrossGroupCalculation;let i=kf;return(0,C.Tn)(n.calculateSummaryValue)?i=n.calculateSummaryValue:e&&(i="absoluteVariation"===e?l4(t):"percentVariation"===e?function(n){const e=l4(n);return function(t){const i=e(t),r=t.prev(QI,n),m=r&&r.value();return i!==kf&&m?i/m:kf}}(t):c4[e],i&&!n.format&&-1!==e.indexOf("percent")&&pw.setFieldProperty(n,"format","percent")),i}function h4(n,e,t,i){const r=n.values[e][t]=n.values[e][t]||[],{originalCell:m}=r;m&&((r.allowResetting||!i)&&(n.values[e][t]=m.slice()),n.values[e][t].allowResetting=i)}JI.prototype=(0,_.X)(JI.prototype,{_getPath(n){return this[qF(n)]},_getDimension(n){return this._descriptions[n=n===Dk?"rows":"columns"]},_createCell(n){return new JI(n._columnPath||this._columnPath,n._rowPath||this._rowPath,this._data,this._descriptions,this._fieldIndex)},parent(n){const e=this._getPath(n).slice(),t={};return e.shift(),e.length?(t[qF(n)]=e,this._createCell(t)):kf},children(n){const e=this._getPath(n).slice(),t=e[0],i=[],r={};if(t.children)for(let m=0;m<t.children.length;m+=1)r[qF(n)]=[t.children[m]].concat(e.slice()),i.push(this._createCell(r));return i},grandTotal(n){const e={},t=this._rowPath,i=this._columnPath,r=this._getPath(n),m=qF(n);return n?e[m]=[r[r.length-1]]:(e._rowPath=[t[t.length-1]],e._columnPath=[i[i.length-1]]),this._createCell(e)},next(n,e){const t=this._getPath(n),i=t[0];let m,r=this.parent(n);if(r){const A=t[1].children.indexOf(i);if(m=r.children(n),m[A+1])return m[A+1]}if(e&&r){do{r=r.next(n,e),m=r?r.children(n):[]}while(r&&!m.length);return m[0]||kf}return kf},prev(n,e){const t=this._getPath(n),i=t[0];let m,r=this.parent(n);if(r){const A=t[1].children.indexOf(i);if(m=r.children(n),m[A-1])return m[A-1]}if(e&&r){do{r=r.prev(n,e),m=r?r.children(n):[]}while(r&&!m.length);return m[m.length-1]||kf}return kf},cell(){return this._cell},field(n){if("data"===n)return this._descriptions.values[this._fieldIndex];const e=this._getPath(n);return this._getDimension(n)[e.length-2]||kf},child(n,e){let t;const i=this.children(n);for(let r=0;r<i.length;r+=1)if(t=t||i[r].field(n),i[r].value(t)===e)return i[r];return kf},slice(n,e){const t=this,i={},r=PG(this._descriptions,n,this._fieldsCache),{area:m}=r,A=r.index;let V=kf;const X=[];if(m===Dk||m===QI){const ce=this._getPath(m).slice(),_e=-1!==A&&ce.length-2-A;if(ce[_e]){X[ce.length-1]=ce[ce.length-1];for(let Me=_e;Me>=0;Me-=1){if(ce[Me+1]){const Ve=ce[Me+1].children||[],Je=Me===_e?e:ce[Me].value;ce[Me]=void 0;for(let rt=0;rt<Ve.length;rt+=1)if(Ve[rt].value===Je){ce[Me]=Ve[rt];break}}if(void 0===ce[Me])return V}i[qF(m)]=ce,V=t._createCell(i)}}return V},value(n,e){const t=this._cell;let i=this._fieldIndex;const r=!0===n||!1===n,m=r?kf:n,A=r&&n||e;if((0,C.O9)(m)){const V=PG(this._descriptions,m,this._fieldsCache);if(i=V.index,"data"!==V.area){const X=this._getPath(V.area),ce=-1!==i&&X.length-2-i;return X[ce]&&X[ce].value}}return t&&t.originalCell?A?t[i]:t.originalCell[i]:kf},isPostProcessed(n){let e=this._fieldIndex;if((0,C.O9)(n)){const t=PG(this._descriptions,n,this._fieldsCache);if(e=t.index,"data"!==t.area)return!1}return!(!this._cell||!this._cell.postProcessedFlags[e])}});const MG_applyRunningTotal=function hQ(n,e){const t=[],i=[{index:e.grandTotalColumnIndex,children:e.columns}],r=[{index:e.grandTotalRowIndex,children:e.rows}],m=n.values,A={fields:{},positions:{}};e.values=e.values||[],td(r,V=>{const X=V[0];e.values[X.index]=e.values[X.index]||[],td(i,ce=>{h4(e,X.index,ce[0].index,!0);for(let Me=0;Me<m.length;Me+=1){const Je=t[Me]=void 0===t[Me]?dQ(m[Me]):t[Me];if(Je){const rt=new JI(ce,V,e,n,Me,A),Ct=rt.cell();Ct[Me]=Je(rt),Ct.postProcessedFlags[Me]=!0}}},!1)},!1)},MG_createMockSummaryCell=function pQ(n,e,t){const i=new JI([],[],{},n,0);return i.value=function(r){if((0,C.O9)(r)){const m=lC(e,r),A=e[m];!t[m]&&A&&!(0,C.O9)(A.area)&&(n.values.push(A),t[m]=!0)}},i.grandTotal=function(){return this},i.children=function(){return[]},i},MG_applyDisplaySummaryMode=function uQ(n,e){const t=[],i=[{index:e.grandTotalColumnIndex,children:e.columns}],r=[{index:e.grandTotalRowIndex,children:e.rows}],m=n.values,A={fields:{},positions:{}};e.values=e.values||[],td(i,V=>{V[0].isEmpty=[]},!1),td(r,V=>{const X=V[0];X.isEmpty=[],e.values[X.index]=e.values[X.index]||[],td(i,ce=>{const _e=ce[0];let Me;h4(e,X.index,_e.index,!1);for(let Ve=0;Ve<m.length;Ve+=1){const rt=t[Ve]=void 0===t[Ve]?u4(m[Ve]):t[Ve];if(Me=!1,rt){const Ct=new JI(ce,V,e,n,Ve,A),Xt=Ct.cell(),On=Xt[Ve]=rt(Ct);Xt.postProcessedFlags[Ve]=!0,Me=null==On}void 0===_e.isEmpty[Ve]&&(_e.isEmpty[Ve]=!0),void 0===X.isEmpty[Ve]&&(X.isEmpty[Ve]=!0),Me||(X.isEmpty[Ve]=_e.isEmpty[Ve]=!1)}},!1)},!1),e.isEmptyGrandTotalRow=r[0].isEmpty,e.isEmptyGrandTotalColumn=i[0].isEmpty},gQ={ar:1,bg:2,ca:3,"zh-Hans":4,cs:5,da:6,de:7,el:8,en:9,es:10,fi:11,fr:12,he:13,hu:14,is:15,it:16,ja:17,ko:18,nl:19,no:20,pl:21,pt:22,rm:23,ro:24,ru:25,hr:26,sk:27,sq:28,sv:29,th:30,tr:31,ur:32,id:33,uk:34,be:35,sl:36,et:37,lv:38,lt:39,tg:40,fa:41,vi:42,hy:43,az:44,eu:45,hsb:46,mk:47,tn:50,xh:52,zu:53,af:54,ka:55,fo:56,hi:57,mt:58,se:59,ga:60,ms:62,kk:63,ky:64,sw:65,tk:66,uz:67,tt:68,bn:69,pa:70,gu:71,or:72,ta:73,te:74,kn:75,ml:76,as:77,mr:78,sa:79,mn:80,bo:81,cy:82,km:83,lo:84,gl:86,kok:87,syr:90,si:91,iu:93,am:94,tzm:95,ne:97,fy:98,ps:99,fil:100,dv:101,ha:104,yo:106,quz:107,nso:108,ba:109,lb:110,kl:111,ig:112,ii:120,arn:122,moh:124,br:126,ug:128,mi:129,oc:130,co:131,gsw:132,sah:133,qut:134,rw:135,wo:136,prs:140,gd:145,"ar-SA":1025,"bg-BG":1026,"ca-ES":1027,"zh-TW":1028,"cs-CZ":1029,"da-DK":1030,"de-DE":1031,"el-GR":1032,"en-US":1033,"fi-FI":1035,"fr-FR":1036,"he-IL":1037,"hu-HU":1038,"is-IS":1039,"it-IT":1040,"ja-JP":1041,"ko-KR":1042,"nl-NL":1043,"nb-NO":1044,"pl-PL":1045,"pt-BR":1046,"rm-CH":1047,"ro-RO":1048,"ru-RU":1049,"hr-HR":1050,"sk-SK":1051,"sq-AL":1052,"sv-SE":1053,"th-TH":1054,"tr-TR":1055,"ur-PK":1056,"id-ID":1057,"uk-UA":1058,"be-BY":1059,"sl-SI":1060,"et-EE":1061,"lv-LV":1062,"lt-LT":1063,"tg-Cyrl-TJ":1064,"fa-IR":1065,"vi-VN":1066,"hy-AM":1067,"az-Latn-AZ":1068,"eu-ES":1069,"hsb-DE":1070,"mk-MK":1071,"tn-ZA":1074,"xh-ZA":1076,"zu-ZA":1077,"af-ZA":1078,"ka-GE":1079,"fo-FO":1080,"hi-IN":1081,"mt-MT":1082,"se-NO":1083,"ms-MY":1086,"kk-KZ":1087,"ky-KG":1088,"sw-KE":1089,"tk-TM":1090,"uz-Latn-UZ":1091,"tt-RU":1092,"bn-IN":1093,"pa-IN":1094,"gu-IN":1095,"or-IN":1096,"ta-IN":1097,"te-IN":1098,"kn-IN":1099,"ml-IN":1100,"as-IN":1101,"mr-IN":1102,"sa-IN":1103,"mn-MN":1104,"bo-CN":1105,"cy-GB":1106,"km-KH":1107,"lo-LA":1108,"gl-ES":1110,"kok-IN":1111,"syr-SY":1114,"si-LK":1115,"iu-Cans-CA":1117,"am-ET":1118,"ne-NP":1121,"fy-NL":1122,"ps-AF":1123,"fil-PH":1124,"dv-MV":1125,"ha-Latn-NG":1128,"yo-NG":1130,"quz-BO":1131,"nso-ZA":1132,"ba-RU":1133,"lb-LU":1134,"kl-GL":1135,"ig-NG":1136,"ii-CN":1144,"arn-CL":1146,"moh-CA":1148,"br-FR":1150,"ug-CN":1152,"mi-NZ":1153,"oc-FR":1154,"co-FR":1155,"gsw-FR":1156,"sah-RU":1157,"qut-GT":1158,"rw-RW":1159,"wo-SN":1160,"prs-AF":1164,"gd-GB":1169,"ar-IQ":2049,"zh-CN":2052,"de-CH":2055,"en-GB":2057,"es-MX":2058,"fr-BE":2060,"it-CH":2064,"nl-BE":2067,"nn-NO":2068,"pt-PT":2070,"sr-Latn-CS":2074,"sv-FI":2077,"az-Cyrl-AZ":2092,"dsb-DE":2094,"se-SE":2107,"ga-IE":2108,"ms-BN":2110,"uz-Cyrl-UZ":2115,"bn-BD":2117,"mn-Mong-CN":2128,"iu-Latn-CA":2141,"tzm-Latn-DZ":2143,"quz-EC":2155,"ar-EG":3073,"zh-HK":3076,"de-AT":3079,"en-AU":3081,"es-ES":3082,"fr-CA":3084,"sr-Cyrl-CS":3098,"se-FI":3131,"quz-PE":3179,"ar-LY":4097,"zh-SG":4100,"de-LU":4103,"en-CA":4105,"es-GT":4106,"fr-CH":4108,"hr-BA":4122,"smj-NO":4155,"ar-DZ":5121,"zh-MO":5124,"de-LI":5127,"en-NZ":5129,"es-CR":5130,"fr-LU":5132,"bs-Latn-BA":5146,"smj-SE":5179,"ar-MA":6145,"en-IE":6153,"es-PA":6154,"fr-MC":6156,"sr-Latn-BA":6170,"sma-NO":6203,"ar-TN":7169,"en-ZA":7177,"es-DO":7178,"sr-Cyrl-BA":7194,"sma-SE":7227,"ar-OM":8193,"en-JM":8201,"es-VE":8202,"bs-Cyrl-BA":8218,"sms-FI":8251,"ar-YE":9217,"en-029":9225,"es-CO":9226,"sr-Latn-RS":9242,"smn-FI":9275,"ar-SY":10241,"en-BZ":10249,"es-PE":10250,"sr-Cyrl-RS":10266,"ar-JO":11265,"en-TT":11273,"es-AR":11274,"sr-Latn-ME":11290,"ar-LB":12289,"en-ZW":12297,"es-EC":12298,"sr-Cyrl-ME":12314,"ar-KW":13313,"en-PH":13321,"es-CL":13322,"ar-AE":14337,"es-UY":14346,"ar-BH":15361,"es-PY":15370,"ar-QA":16385,"en-IN":16393,"es-BO":16394,"en-MY":17417,"es-SV":17418,"en-SG":18441,"es-HN":18442,"es-NI":19466,"es-PR":20490,"es-US":21514,"bs-Cyrl":25626,"bs-Latn":26650,"sr-Cyrl":27674,"sr-Latn":28698,smn:28731,"az-Cyrl":29740,sms:29755,zh:30724,nn:30740,bs:30746,"az-Latn":30764,sma:30779,"uz-Cyrl":30787,"mn-Cyrl":30800,"iu-Cans":30813,"zh-Hant":31748,nb:31764,sr:31770,"tg-Cyrl":31784,dsb:31790,smj:31803,"uz-Latn":31811,"mn-Mong":31824,"iu-Latn":31837,"tzm-Latn":31839,"ha-Latn":31848},mQ=(0,gr.zk)(),_Q={XmlaStore:es.A.inherit(function(){const n='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis"><RequestType>{2}</RequestType><Restrictions><RestrictionList><CATALOG_NAME>{0}</CATALOG_NAME><CUBE_NAME>{1}</CUBE_NAME></RestrictionList></Restrictions><Properties><PropertyList><Catalog>{0}</Catalog>{3}</PropertyList></Properties></Discover></Body></Envelope>',e="SELECT {2} FROM {0} {1} CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS",t="(SELECT {0} FROM {1})",i="Subset({0}, {1}, {2})",r="Order({0}, {1}, {2})",m="{0} {1} as {2}",A="WHERE ({0})",V="NonEmpty({0}, {1})",X="{0} DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME, MEMBER_VALUE ON {1}",ce="CrossJoin({0})",_e="{{0}}";function Me(wo,dr){const Cr=new g.cY,{beforeSend:Hr}=wo,ls={url:wo.url,dataType:"text",data:dr,headers:{"Content-Type":"text/xml"},xhrFields:{},method:"POST"};return(0,C.Tn)(Hr)&&Hr(ls),pw.sendRequest(ls).fail(function(){Cr.reject(arguments)}).done(Qr=>{const _a=new mQ.DOMParser;let _s;try{try{_s=_a.parseFromString(Qr,"text/xml")}catch{_s=void 0}if(!_s||_s.getElementsByTagName("parsererror").length||0===_s.childNodes.length)throw new Tm.sO.Error("E4023",Qr)}catch(ys){Cr.reject({statusText:ys.message,stack:ys.stack,responseText:Qr})}Cr.resolve(_s)}),Cr}function Ve(){const wo=function fQ(){return gQ[_3.A.locale()]}();return void 0!==wo?(0,Ea.GP)("<LocaleIdentifier>{0}</LocaleIdentifier>",wo):""}function Je(wo,dr,Cr){return`Descendants({${dr||wo}}, ${Cr}, SELF_AND_BEFORE)`}function rt(wo){return`${wo.hierarchyName||wo.dataField}.[All]`}function Ct(wo){let dr=`${wo.dataField}.allMembers`,{searchValue:Cr}=wo;return Cr&&(Cr=Cr.replace(/'/g,"''"),dr=`Filter(${dr}, instr(${wo.dataField}.currentmember.member_caption,'${Cr}') > 0)`),dr}function Xt(wo){const dr=wo.join(",");return wo.length>1?(0,Ea.GP)(ce,dr):dr}function On(wo,dr,Cr,Hr,ls,Qr,_a,_s){const ys=[],ws=Qr[_a],Ba=[];let ps,Na,Pa;for(let aa=Hr;aa<=dr;aa+=1){const va=ws[aa],{dataField:jl}=va,Ju=ws[aa-1]&&ws[aa-1].hierarchyName,{hierarchyName:Dl}=va,Ag=!Dl||!ws[aa+1]||ws[aa+1].hierarchyName!==Dl,Y_=wo.length+Cr+Hr;if(ps=null,Ba.push(va),aa<wo.length)Ag&&(ps=`(${jl}.${Uo(wo[aa],jl)})`);else if(aa<=Y_)if(0===aa&&0===Cr){const oc=rt(ws[Hr]);ps=Dl?`${oc},${ws[Hr].dataField}`:Ct(ws[Hr])}else Dl?(Pa=Uo(ls[ls.length-1]),(Ag||aa===Y_)&&(Ju===Dl?(ls.length&&(Na=ws[ls.length-1]),(!Na||Na.hierarchyName!==Dl)&&(Na=ws[aa-1],Pa=""),ps=Je(Na.dataField,Pa,jl)):ps=Ct(va))):ps=Ct(va);else(!Dl||Ju!==Dl)&&(ps=`(${rt(va)})`);ps&&(ps=(0,Ea.GP)(_e,ps),_s&&(ps=(0,Ea.GP)(r,ps,(va.hierarchyName||va.dataField)+("displayText"===va.sortBy?".MEMBER_CAPTION":".MEMBER_VALUE"),"desc"===va.sortOrder?"DESC":"ASC")),ys.push(ps))}return Xt(ys)}function Fn(wo,dr,Cr,Hr,ls,Qr,_a,_s,ys,ws){let Ba=-1;const ps=Qr[_a];let Na;do{Ba+=1,Na=dr.length+Ba+Hr;let Pa=On(dr,Cr,Ba,Hr,ls,Qr,_a,ys);!ys&&!ws&&(Pa=(0,Ea.GP)(V,Pa,_s)),wo.push(Pa)}while(ps[Na]&&ps[Na+1]&&ps[Na].expanded)}function oi(wo,dr,Cr,Hr){return dr.push((0,Ea.GP)(m,Hr=Hr||"set",Cr=Cr||`[DX_Set_${dr.length}]`,wo)),Cr}function Yt(wo,dr,Cr,Hr,ls){const Qr=wo[dr],_a=[];let _s=[],ys=[],ws=0,Ba=0;const ps=[],Na=(0,Ea.GP)(_e,Cr.join(","));if(Qr&&Qr.length){wo.headerName===dr?(_s=wo.path,ws=_s.length):wo.headerName&&wo.oppositePath?(_s=wo.oppositePath,ws=_s.length):ys=("columns"===dr?wo.columnExpandedPaths:wo.rowExpandedPaths)||ys,Ba=Py(wo,dr),Fn(_a,[],Ba,ws,_s,wo,dr,Na,"rows"===dr?wo.rowTake:wo.columnTake,wo.totalsOnly),(0,w.__)(ys,(Pa,aa)=>{Fn(_a,aa,Ba,ws,aa,wo,dr,Na)});for(let Pa=Ba;Pa>=_s.length;Pa-=1)Qr[Pa].hierarchyName&&(ls.visibleLevels[Qr[Pa].hierarchyName]=ls.visibleLevels[Qr[Pa].hierarchyName]||[],ls.visibleLevels[Qr[Pa].hierarchyName].push(Qr[Pa].dataField))}if(_a.length){let Pa=function(va){const jl=va.join(",");return va.length>1?`Union(${jl})`:jl}(_a);"rows"===dr&&wo.rowTake&&(Pa=(0,Ea.GP)(i,Pa,wo.rowSkip>0?wo.rowSkip+1:0,wo.rowSkip>0?wo.rowTake:wo.rowTake+1)),"columns"===dr&&wo.columnTake&&(Pa=(0,Ea.GP)(i,Pa,wo.columnSkip>0?wo.columnSkip+1:0,wo.columnSkip>0?wo.columnTake:wo.columnTake+1));const aa=`[DX_${dr}]`;ps.push(oi(Pa,Hr,aa)),wo.totalsOnly&&ps.push(oi(`COUNT(${aa})`,Hr,`[DX_${dr}_count]`,"member"))}return"columns"===dr&&Cr.length&&!wo.skipValues&&ps.push(Na),(0,Ea.GP)(X,Xt(ps),dr)}function $t(wo){const dr=[];return(0,w.__)(wo,(Cr,Hr)=>{const{dataField:ls}=Hr,Qr=[],_a=Hr.filterValues||[];let _s;Hr.hierarchyName&&(0,C.kf)(Hr.groupIndex)||((0,w.__)(_a,(ys,ws)=>{let Ba=`${ls}.${Uo(Array.isArray(ws)?ws[ws.length-1]:ws,ls)}`;"exclude"===Hr.filterType&&(Qr.push(`${Ba}.parent`),Ba=`Descendants(${Ba})`),Qr.push(Ba)}),_a.length&&(_s=(0,Ea.GP)(_e,Qr.join(",")),"exclude"===Hr.filterType&&(_s=`Except(${Ct(Hr)},${_s})`),dr.push(_s)))}),dr.length?Xt(dr):""}function xn(wo,dr,Cr,Hr,ls,Qr,_a){let _s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},ys="";const ws=(dr.length?`with ${dr.join(" ")}`:"")+" ";if(wo.length){let Ba;if(_s.totalsOnly){const ps=[];Hr.length&&ps.push("[DX_rows_count]"),Cr.length&&ps.push("[DX_columns_count]"),Ba=`{${ps.join(",")}} on columns`}else Ba=wo.join(",");ys=ws+(0,Ea.GP)(e,function(ps,Na,Pa,aa){let va=`[${aa}]`;return(0,w.__)([ps,Na,Pa],(jl,Ju)=>{Ju&&(va=(0,Ea.GP)(t,`${Ju}on 0`,va))}),va}($t(Cr),$t(Hr),$t(ls||[]),_a),Qr.length?(0,Ea.GP)(A,Qr.join(",")):"",Ba)}return ys}function Gn(wo,dr){return(0,w.Tj)(dr,Cr=>((0,C.Kg)(Cr.expression)&&oi(Cr.expression,wo,Cr.dataField,"member"),Cr.dataField))}function qn(wo,dr,Cr,Hr){(0,w.__)(Hr,(ls,Qr)=>{const _a=dr[Cr][ls];(!_a.hierarchyName||_a.hierarchyName!==dr[Cr][ls+1].hierarchyName)&&wo.push(`${_a.dataField}.${Uo(Qr,_a.dataField)}`)})}function ii(wo,dr,Cr){const Hr=wo.columns||[],ls=wo.rows||[],Qr=wo.values&&wo.values.length?wo.values:[{dataField:"[Measures]"}],_a=[],_s=[],ys=[],ws=Gn(_s,Qr);return Cr.measureCount=wo.skipValues?1:Qr.length,Cr.visibleLevels={},wo.headerName&&wo.path&&qn(_a,wo,wo.headerName,wo.path),wo.headerName&&wo.oppositePath&&qn(_a,wo,"rows"===wo.headerName?"columns":"rows",wo.oppositePath),(Hr.length||ws.length)&&ys.push(Yt(wo,"columns",ws,_s,Cr)),ls.length&&ys.push(Yt(wo,"rows",ws,_s,Cr)),xn(ys,_s,Hr,ls,wo.filters,_a,dr,wo)}function qi(wo,dr,Cr){(0,w.__)(Cr,(Hr,ls)=>{const Qr=dr[Hr];Qr.hierarchyName&&(dr[Hr+1]||{}).hierarchyName===Qr.hierarchyName||wo.push(`${Qr.dataField}.${Uo(ls,Qr.dataField)}`)})}function ji(wo){return parseInt(wo,10)}function $i(wo,dr){return ho((wo.getElementsByTagName(dr)||[])[0])}function ho(wo){return wo&&(wo.textContent||wo.text||wo.innerHTML)||""}function io(wo,dr,Cr){const Hr=[];let ls=[],Qr=0;const _a=[],_s=wo.getElementsByTagName("Cell"),ys={};for(let ws=0;ws<_s.length;ws+=1){const Ba=_s[ws],ps=Ba.getElementsByTagName("Value")[0],Na=ps&&ps.getElementsByTagName("Error")||[],Pa=0===Na.length?ho(ps):"#N/A",aa=parseFloat(Pa),va=Pa-aa+1>0,jl=ji(Ba.getAttribute("CellOrdinal"));Na.length&&(ys[ho(Na[0].getElementsByTagName("ErrorCode")[0])]=ho(Na[0].getElementsByTagName("Description")[0])),_a[jl]={value:va?aa:Pa||null}}return(0,w.__)(dr[1],()=>{const ws=[];Hr.push(ws),(0,w.__)(dr[0],()=>{Qr%Cr==0&&(ls=[],ws.push(ls)),ls.push(_a[Qr]?_a[Qr].value:null),Qr+=1})}),Object.keys(ys).forEach(ws=>{Tm.sO.log("W4002",ys[ws])}),Hr}function Uo(wo,dr){return wo&&(wo=(0,C.Kg)(wo)&&wo.includes("&")?wo:`[${wo}]`,dr&&0===wo.indexOf(`${dr}.`)&&(wo=wo.slice(dr.length+1,wo.length))),wo}function zr(wo,dr,Cr,Hr){let ls=wo[dr];return ls||(ls={},wo[dr]=ls),!(0,C.O9)(ls.value)&&Cr&&(ls.text=Cr.caption,ls.value=Cr.value,ls.key=dr||"",ls.levelName=Cr.levelName,ls.hierarchyName=Cr.hierarchyName,ls.parentName=Cr.parentName,ls.index=Hr,ls.level=Cr.level),ls}function Os(wo,dr){const Cr=[],Hr=wo.children&&(wo.children.length?wo.children:Object.keys(wo.children.grandTotalHash||{}).reduce((Qr,_a)=>Qr.concat(wo.children.grandTotalHash[_a].children),[])),ls=Hr&&Hr[0];if(ls&&(dr[ls.hierarchyName]&&dr[ls.hierarchyName].includes(ls.levelName)||!dr[ls.hierarchyName]||0===ls.level)){const Qr=Hr.filter(_a=>_a.hierarchyName===ls.hierarchyName);return Qr.grandTotalHash=Hr.grandTotalHash,Qr}if(ls)for(let Qr=0;Qr<Hr.length;Qr+=1)Hr[Qr].hierarchyName===ls.hierarchyName&&Cr.push.apply(Cr,Os(Hr[Qr],dr));return Cr}function wa(wo,dr,Cr,Hr){const ls=[];(0,w.__)(dr,(_s,ys)=>{let ws={children:ls};const Ba=(0,C.O9)(Cr)?Math.floor(_s/Cr):_s;(0,w.__)(ys,(ps,Na)=>{ws=function(Pa,aa,va){let jl=va.children=va.children||[];const Ju=jl.hash=jl.hash||{},Dl=jl.grandTotalHash=jl.grandTotalHash||{};aa.parentName&&(jl=(va=zr(Ju,aa.parentName)).children=va.children||[]);const Ag=zr(Ju,aa.name,aa,Pa);return aa.hasValue&&!Ag.added&&(Ag.index=Pa,Ag.added=!0,jl.push(Ag)),va.value&&va.parentName||!aa.parentName?Dl[va.name]&&delete Dl[aa.parentName]:Dl[aa.parentName]=va,Ag}(Ba,Na,ws)})});const Qr={children:ls};Qr.children=Os(Qr,Hr);const _a=function(_s,ys){let ws;if(1===_s.children.length&&""===_s.children[0].parentName){ws=_s.children[0].index;const{grandTotalHash:Ba}=_s.children;_s.children=_s.children[0].children||[],_s.children.grandTotalHash=Ba,_s.children=Os(_s,ys)}else 0===_s.children.length&&(ws=0);return ws}(Qr,Hr);return td(Qr.children,_s=>{const ys=_s[0],ws=Os(ys,Hr);ws.length?ys.children=ws:delete ys.children,delete ys.levelName,delete ys.hierarchyName,delete ys.added,delete ys.parentName,delete ys.level},!0),(0,w.__)(Qr.children||[],(_s,ys)=>{wo.push(ys)}),_a}function $l(wo){const dr=wo.getElementsByTagName("soap:Fault"),Cr=wo.getElementsByTagName("Fault"),Hr=(0,a.A)([].slice.call(Cr.length?Cr:dr)).find("Error");if(Hr.length){const ls=Hr.attr("Description"),Qr=new Tm.sO.Error("E4000",ls);return Tm.sO.log("E4000",ls),Qr}return null}function Jd(wo,dr,Cr,Hr){const ls=[],Qr="MEASURE"===dr,_a=Qr?"MEASUREGROUP_NAME":`${dr}_DISPLAY_FOLDER`;return(0,w.__)(wo.getElementsByTagName("row"),(_s,ys)=>{const ws="LEVEL"===dr?$i(ys,"HIERARCHY_UNIQUE_NAME"):void 0,Ba=$i(ys,"LEVEL_NUMBER");let ps=$i(ys,_a);if(Qr&&(ps=Hr[ps]||ps),("0"!==Ba||"true"!==$i(ys,`${dr}_IS_VISIBLE`))&&"2"!==$i(ys,"DIMENSION_TYPE")){const Na=Qr?"DX_MEASURES":$i(ys,"DIMENSION_UNIQUE_NAME"),Pa=$i(ys,`${dr}_UNIQUE_NAME`);ls.push({dimension:Cr.names[Na]||Na,groupIndex:Ba?ji(Ba)-1:void 0,dataField:Pa,caption:$i(ys,`${dr}_CAPTION`),hierarchyName:ws,groupName:ws,displayFolder:ps,isMeasure:Qr,isDefault:!!Cr.defaultHierarchies[Pa]})}}),ls}function Dg(wo){const dr=(wo=wo.replace(/_x(....)_/g,(Cr,Hr)=>String.fromCharCode(parseInt(Hr,16)))).match(/\[.+?\]/gi);return dr&&dr.length&&(wo=dr[dr.length-1]),wo.replace(/\[/gi,"").replace(/\]/gi,"").replace(/\$/gi,"").replace(/\./gi," ")}function xh(wo,dr){return dr=(0,a.A)("<div>").text(dr).html(),Me(wo,(0,Ea.GP)('<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>{0}</Statement></Command><Properties><PropertyList><Catalog>{1}</Catalog><ShowHiddenCubes>True</ShowHiddenCubes><SspropInitAppName>Microsoft SQL Server Management Studio</SspropInitAppName><Timeout>3600</Timeout>{2}</PropertyList></Properties></Execute></Body></Envelope>',dr,wo.catalog,Ve()))}return{ctor(wo){this._options=wo},getFields(){const wo=this._options,{catalog:dr}=wo,{cube:Cr}=wo,Hr=Ve(),ls=Me(wo,(0,Ea.GP)(n,dr,Cr,"MDSCHEMA_DIMENSIONS",Hr)),Qr=Me(wo,(0,Ea.GP)(n,dr,Cr,"MDSCHEMA_MEASURES",Hr)),_a=Me(wo,(0,Ea.GP)(n,dr,Cr,"MDSCHEMA_HIERARCHIES",Hr)),_s=Me(wo,(0,Ea.GP)(n,dr,Cr,"MDSCHEMA_LEVELS",Hr)),ys=new g.cY;return(0,g.z7)(ls,Qr,_a,_s).then((ws,Ba,ps,Na)=>{Me(wo,(0,Ea.GP)(n,dr,Cr,"MDSCHEMA_MEASUREGROUPS",Hr)).done(Pa=>{const aa=function(Y_){const oc={names:{},defaultHierarchies:{}};return(0,w.__)((0,a.A)(Y_).find("row"),function(){const mC=(0,a.A)(this),Wde="2"===mC.children("DIMENSION_TYPE").text()?"DX_MEASURES":mC.children("DIMENSION_UNIQUE_NAME").text();oc.names[Wde]=mC.children("DIMENSION_CAPTION").text(),oc.defaultHierarchies[mC.children("DEFAULT_HIERARCHY").text()]=!0}),oc}(ws),va=Jd(ps,"HIERARCHY",aa),jl=Jd(Na,"LEVEL",aa),Ju=function(Y_){const oc={};return(0,w.__)(Y_.getElementsByTagName("row"),(mC,SP)=>{oc[$i(SP,"MEASUREGROUP_NAME")]=$i(SP,"MEASUREGROUP_CAPTION")}),oc}(Pa),Dl=Jd(Ba,"MEASURE",aa,Ju).concat(va),Ag={};(0,w.__)(jl,(Y_,oc)=>{Ag[oc.hierarchyName]=Ag[oc.hierarchyName]||[],Ag[oc.hierarchyName].push(oc)}),(0,w.__)(va,(Y_,oc)=>{Ag[oc.dataField]&&Ag[oc.dataField].length>1&&(oc.groupName=oc.hierarchyName=oc.dataField,Dl.push.apply(Dl,Ag[oc.hierarchyName]))}),ys.resolve(Dl)}).fail(ys.reject)}).fail(ys.reject),ys},load(wo){const dr=new g.cY,Cr=this._options,Hr={skipValues:wo.skipValues},ls=ii(wo,Cr.cube,Hr);let Qr;(wo.rowSkip||wo.rowTake||wo.columnTake||wo.columnSkip)&&(Qr=ii((0,_.X)({},wo,{totalsOnly:!0,rowSkip:null,rowTake:null,columnSkip:null,columnTake:null}),Cr.cube,{}));const _a=()=>{ls?(0,g.z7)(xh(Cr,ls),Qr&&xh(Cr,Qr)).done((_s,ys)=>{const ws=$l(_s)||ys&&$l(ys);if(ws)dr.reject(ws);else{const Ba=function Gc(wo,dr){const Cr={columns:[],rows:[]},{measureCount:Hr}=dr,ls=function(Qr,_a){const _s=[];for((0,w.__)(Qr.getElementsByTagName("Axis"),(ys,ws)=>{const Ba=ws.getAttribute("name"),ps=[];let Na=0;0===Ba.indexOf("Axis")&&(0,C.kf)(ji(Ba.substr(4)))&&(_s.push(ps),(0,w.__)(ws.getElementsByTagName("Tuple"),(Pa,aa)=>{const va=aa.childNodes;let jl=0;const Ju=[];let Dl=_a?va.length:va.length-1;1===_s.length&&(Dl-=1),ps.push(Ju);for(let oc=Dl;oc>=0;oc-=1){const mC=va[oc],SP=ji($i(mC,"LNum"));Ju[oc]={caption:$i(mC,"Caption"),value:(Y_=$i(mC,"MEMBER_VALUE"),(0,C.kf)(Y_)?parseFloat(Y_):Y_),level:SP,index:Na++,hasValue:!(jl||!SP&&0!==oc),name:$i(mC,"UName"),hierarchyName:va[oc].getAttribute("Hierarchy"),parentName:$i(mC,"PARENT_UNIQUE_NAME"),levelName:$i(mC,"LName")},jl+=SP}var Y_}))});_s.length<2;)_s.push([[{level:0}]]);return _s}(wo,dr.skipValues);return Cr.grandTotalColumnIndex=wa(Cr.columns,ls[0],Hr,dr.visibleLevels),Cr.grandTotalRowIndex=wa(Cr.rows,ls[1],void 0,dr.visibleLevels),Cr.values=io(wo,ls,Hr),Cr}(_s,Hr);ys&&function(ps,Na,Pa){const aa=[],va=Na.columns||[],jl=Na.rows||[];va.length&&aa.push({}),jl.length&&aa.push({});const Ju=io(Pa,[[{}],[{},{}]],1);if(!va.length&&jl.length&&(ps.rowCount=Math.max(Ju[0][0][0]-1,0)),!jl.length&&va.length&&(ps.columnCount=Math.max(Ju[0][0][0]-1,0)),jl.length&&va.length&&(ps.rowCount=Math.max(Ju[0][0][0]-1,0),ps.columnCount=Math.max(Ju[1][0][0]-1,0)),void 0!==ps.rowCount&&Na.rowTake){ps.rows=[...Array(Na.rowSkip)].concat(ps.rows),ps.rows.length=ps.rowCount;for(let Dl=0;Dl<ps.rows.length;Dl+=1)ps.rows[Dl]=ps.rows[Dl]||{}}if(void 0!==ps.columnCount&&Na.columnTake){ps.columns=[...Array(Na.columnSkip)].concat(ps.columns),ps.columns.length=ps.columnCount;for(let Dl=0;Dl<ps.columns.length;Dl+=1)ps.columns[Dl]=ps.columns[Dl]||{}}}(Ba,wo,ys),dr.resolve(Ba)}}).fail(dr.reject):dr.resolve({columns:[],rows:[],values:[],grandTotalColumnIndex:0,grandTotalRowIndex:0})};return wo.delay?setTimeout(_a,wo.delay):_a(),dr},supportPaging:()=>!0,getDrillDownItems(wo,dr){const Cr=new g.cY,Hr=this._options,ls=function(Qr,_a,_s){const ys=Qr.columns||[],ws=Qr.rows||[],ps=[],Na=[],Pa=[],aa=Gn(Na,Qr.values&&Qr.values.length?Qr.values:[{dataField:"[Measures]"}]),{maxRowCount:va}=_s,jl=_s.customColumns||[],Ju=jl.length>0?` return ${jl.join(",")}`:"";qi(ps,ys,_s.columnPath||[]),qi(ps,ws,_s.rowPath||[]),(ys.length||aa.length)&&Pa.push([`${aa[_s.dataIndex]||aa[0]} on 0`]);const Dl=xn(Pa,Na,ys,ws,Qr.filters,ps,_a);return Dl&&`drillthrough${va>0?` maxrows ${va}`:""}${Dl}${Ju}`}(wo,Hr.cube,dr);return ls?(0,g.z7)(xh(Hr,ls)).done(Qr=>{const _a=$l(Qr);_a?Cr.reject(_a):Cr.resolve(function(_s){const ys=_s.getElementsByTagName("row"),ws=[],Ba={};for(let ps=0;ps<ys.length;ps+=1){const Na=ys[ps].childNodes,Pa={};for(let aa=0;aa<Na.length;aa+=1){const{tagName:va}=Na[aa];Pa[Ba[va]=Ba[va]||Dg(va)]=ho(Na[aa])}ws.push(Pa)}return ws}(Qr))}).fail(Cr.reject):Cr.resolve([]),Cr},key:h.lQ,filter:h.lQ}}()).include(yI)};function g4(n,e,t,i){const r=e[t]||[],A=[];Ox(n[t],(V,X)=>{const _e=A[X]=A[X]||function vQ(n,e,t,i,r){const m=r?"asc":n.sortOrder,A=function yQ(n,e){let t="text";return"none"===n?t="index":(e||"displayText"!==n)&&(t="value"),t}(n.sortBy,r),V=n.sortingMethod?function(_e,Me){return n.sortingMethod(_e,Me)}:Iy(_e=>_e[A]),X=!r&&function CQ(n,e,t,i){const{values:r}=e,m=lC(t.values,n.sortBySummaryField),A="rows"===i,X=A?e.grandTotalRowIndex:e.grandTotalColumnIndex,ce=n.sortBySummaryPath||[],_e=ce.length?function bQ(n,e){let t=null;const i=(e||[]).join(".");return i.length&&td(n,r=>{const m=r[0],A=Zu(r).join("."),V=(0,w.Tj)(r,X=>X.text).reverse().join(".");if(i===A||m.key&&V===i)return t=r[0].index,!1}),t}(A?e.columns:e.rows,ce):X;if(r&&r.length&&m>=0&&(0,C.O9)(_e))return function(Me){const rt=((r[A?Me.index:_e]||[[]])[A?_e:Me.index]||[])[m];return(0,C.O9)(rt)?rt:null}}(n,e,t,i),ce=X&&Iy(X);return function(_e,Me){const Ve=ce&&ce(_e,Me)||V(_e,Me);return"desc"===m?-Ve:Ve}}(r[X]||{},n,e,t,i);V.sort(_e)},e.headerName===t?e.path.length:0)}const RG={row:"rows",column:"columns",data:"values",filter:"filters"},kG=["area","areaIndex","sortOrder","filterType","filterValues","sortBy","sortBySummaryField","sortBySummaryPath","expanded","summaryType","summaryDisplayMode"],LG=["format","selector","customizeText","caption"],f4=LG.concat(["allowSorting","allowSortingBySummary","allowFiltering","allowExpandAll"]);function BG(n,e){const t=n._initProperties||{};(0,w.__)(e,(i,r)=>{Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})}function NG(n,e){BG(n,e),(0,C.O9)(n.caption)||If(n,"caption",function xQ(n){let e=n.dataField||n.groupName||"",t=(n.summaryType||"").toLowerCase();return(0,C.Kg)(n.groupInterval)&&(e+=`_${n.groupInterval}`),t&&"custom"!==t?(t=t.replace(/^./,t[0].toUpperCase()),e.length&&(t=` (${t})`)):t="",(0,vv.Ns)(e)+t}(n))}function OQ(n){return n.rows.length||n.columns.length||n.values.length}const FG=es.A.inherit(function(){const n=function(Yt,$t){if(Yt._cacheByPath)return Yt._cacheByPath[$t.join(".")]||null},e=function(Yt,$t){let xn,qn,Gn=-1;if(Yt)for(xn=0;xn<Yt.length;xn+=1)qn=Yt[xn],void 0!==qn.index&&(Gn=Math.max(Gn,qn.index)),qn.children?Gn=Math.max(Gn,e(qn.children)):qn.collapsedChildren&&(Gn=Math.max(Gn,e(qn.collapsedChildren)));return(0,C.O9)($t)&&(Gn=Math.max(Gn,$t)),Gn},t=function(Yt,$t,xn,Gn){const qn=e(xn)+1;let qi,ii=e(Yt,Gn)+1;const ji=[];let $i=!1;const ho=new g.cY;if($t.children&&$t.children.length===xn.length)for(let io=0;io<xn.length;io+=1){const Uo=xn[io];void 0!==Uo.index&&(void 0===$t.children[io].index?(Uo.index=ji[Uo.index]=ii++,$t.children[io]=Uo):ji[Uo.index]=$t.children[io].index)}else{for($i=!0,qi=0;qi<qn;qi+=1)ji[qi]=ii++;$t.children=xn}return(0,g.z7)(z_($t.children,io=>{$i&&(io[0].index=ji[io[0].index])})).done(()=>{ho.resolve(ji)}),ho},i=function(Yt,$t,xn){const Gn=new g.cY;let qn=xn>=0&&e(Yt,xn)+1;const ii=[];return(0,g.z7)(z_(Yt,qi=>{delete qi[0].collapsedChildren})).done(()=>{(0,g.z7)(z_($t,(qi,ji)=>{const $i=qi[0];if($i.index>=0){let ho=n(Yt,Zu(qi));if(ho&&ho.index>=0)ii[$i.index]=ho.index;else if(qn){const io=Zu(qi.slice(1));ho=n(Yt,io);const Uo=io.length?ho&&ho.children:Yt;Uo&&(Uo[ji]=$i,$i.index=ii[$i.index]=qn++)}}})).done(()=>{Gn.resolve(ii)})}),Gn},r=function(Yt,$t,xn,Gn){let qn,ii,qi,ji,$i,ho;const io=Yt.values;if($t)for(qn=0;qn<$t.length;qn+=1)if(qi=$t[qn],$i=xn[qn],(0,C.O9)($i)||($i=Yt.grandTotalRowIndex),qi&&(0,C.O9)($i))for(io[$i]||(io[$i]=[]),ii=0;ii<qi.length;ii+=1)ji=qi[ii],ho=Gn[ii],(0,C.O9)(ho)||(ho=Yt.grandTotalColumnIndex),(0,C.O9)(ji)&&(0,C.O9)(ho)&&(io[$i][ho]=ji)};function m(Yt,$t){return new(Yt.remoteOperations||Yt.paginate?r4:Y3)((0,_.X)((0,VH.ho)(Yt),{onChanged:null,onLoadingChanged:null,onProgressChanged:$t}))}function A(Yt,$t,xn,Gn){const qn=[],ii=$t&&$t[xn]||[],qi=Gn&&Gn[xn]||[];return td(Yt[xn],ji=>{const $i=ji[0],ho=Zu(ji);$i.children&&ii[ho.length-1]&&!ii[ho.length-1].expanded&&ho.length<ii.length&&(!Gn||function(io,Uo,zr){for(let Os=0;Os<zr;Os+=1)if(!io[Os]||!Uo[Os]||io[Os].index!==Uo[Os].index)return!1;return!0}(ii,qi,ho.length))&&qn.push(ho.slice())},!0),qn}function V(Yt,$t,xn,Gn){return $t?(0,w.__)(Gn,(qn,ii)=>{if(xn)Yt[ii]=$t[ii];else{if(("summaryType"===ii||"summaryDisplayMode"===ii)&&void 0===$t[ii])return;If(Yt,ii,$t[ii])}}):BG(Yt,Gn),Yt}function X(Yt,$t){const xn=[];return(0,w.__)(Yt,(Gn,qn)=>{xn.push(V({dataField:qn.dataField,name:qn.name},qn,!0,$t))}),xn}function ce(Yt){return Yt.name?Yt.name:`${Yt.dataField}`}function _e(Yt,$t){const xn=[];return(0,w.__)(Yt||[],(Gn,qn)=>{ce(qn)===$t&&xn.push(qn)}),xn}function Me(Yt,$t){Yt=Yt||[];const xn={};let Gn;return(0,w.__)($t,(qn,ii)=>{Gn=ce(ii),xn[Gn]||(xn[Gn]=_e($t,ce(ii)))}),(0,w.__)(xn,(qn,ii)=>{var qi;qi=(qi=_e(Yt,qn))||[],(0,w.__)(ii,($i,ho)=>{V(ho,qi[$i],!1,kG),NG(ho,LG)})}),$t}function Ve(Yt){Yt.sort(($t,xn)=>$t.areaIndex-xn.areaIndex||$t.groupIndex-xn.groupIndex)}function Je(Yt,$t){const xn=Yt.groupName||"";return(Yt.dataField||xn)+(Yt.groupInterval?xn+Yt.groupInterval:"NOGROUP")+($t?"":xn)}function rt(Yt,$t,xn){let Gn=[];const qn={},ii={},qi=CI(Yt);return $t?((0,w.__)($t,(ji,$i)=>{qn[Je($i,xn)]=$i}),(0,w.__)(Yt,(ji,$i)=>{const ho=Je($i,xn),io=qn[ho]||ii[ho];let Uo;io?(io._initProperties&&BG(io,f4),Uo=(0,_.X)({},io,$i,{_initProperties:null})):qn[ho]=Uo=$i,!Uo.dataType&&qi[$i.dataField]&&(Uo.dataType=qi[$i.dataField]),delete qn[ho],ii[ho]=io,Gn.push(Uo)}),xn&&(0,w.__)(qn,(ji,$i)=>{Gn.push($i)})):Gn=Yt,Gn.push.apply(Gn,[]),(ji=Gn).forEach($i=>{if($i.groupName&&$i.groupInterval&&void 0===$i.groupIndex){const ho=ji.filter(io=>io.groupName===$i.groupName&&(0,C.kf)(io.groupIndex)).map(io=>io.groupIndex).reduce((io,Uo)=>Math.max(io,Uo),-1);$i.groupIndex=ho+1}}),Gn;var ji}function Ct(Yt){const $t=new g.cY,xn=Yt._store,Gn=xn&&xn.getFields(Yt._fields);let qn;return(0,g.z7)(Gn).done(ii=>{Yt._storeFields=ii,qn=rt(Yt._fields,ii,Yt._retrieveFields),$t.resolve(qn)}).fail($t.reject),$t}function Xt(Yt,$t,xn){return z_(Yt[xn],Gn=>{const qn=Gn[0];qn.text=qn.text||SS(qn.value,$t[xn][Zu(Gn).length-1])})}function On(Yt,$t){return(0,g.z7)(Xt($t,Yt,"columns"),Xt($t,Yt,"rows"))}function Fn(Yt){const $t=new g.cY,xn={};return(0,g.z7)(z_(Yt,Gn=>{const qn=Zu(Gn).join(".");xn[qn]=Gn[0]})).done($t.resolve),Yt._cacheByPath=xn,$t}function oi(Yt,$t){const xn=[];return(0,w.__)(Yt,function(){(function(Gn,qn){const ii="data"===qn||!1!==Gn.visible;return Gn.area===qn&&!(0,C.O9)(Gn.groupIndex)&&ii})(this,$t)&&xn.push(this)}),xn}return{ctor(Yt){Yt=Yt||{},this._eventsStrategy=new eQ.h(this);const $t=this,xn=function(Gn,qn){let ii,qi;return(0,C.Qd)(Gn)&&Gn.load?ii=m(Gn,qn):(Gn&&!Gn.store&&(Gn={store:Gn}),qi=Gn.store,"xmla"===qi.type?ii=new _Q.XmlaStore(qi):(0,C.Qd)(qi)&&qi.type||qi instanceof tQ.A||Array.isArray(qi)?ii=m(Gn,qn):qi instanceof es.A&&(ii=qi)),ii}(Yt,Gn=>{$t._eventsStrategy.fireEvent("progressChanged",[Gn])});$t._store=xn,$t._paginate=!!Yt.paginate,$t._pageSize=Yt.pageSize||40,$t._data={rows:[],columns:[],values:[]},$t._loadingCount=0,$t._isFieldsModified=!1,(0,w.__)(["changed","loadError","loadingChanged","progressChanged","fieldsPrepared","expandValueChanging"],(Gn,qn)=>{const ii=`on${qn[0].toUpperCase()}${qn.slice(1)}`;Object.prototype.hasOwnProperty.call(Yt,ii)&&this.on(qn,Yt[ii])}),$t._retrieveFields=!(0,C.O9)(Yt.retrieveFields)||Yt.retrieveFields,$t._fields=Yt.fields||[],$t._descriptions=Yt.descriptions?(0,_.X)($t._createDescriptions(),Yt.descriptions):void 0,xn||(0,_.X)(!0,$t._data,Yt.store||Yt)},getData(){return this._data},getAreaFields(Yt,$t){let Gn,xn=[];return $t||"data"===Yt?(xn=oi(this._fields,Yt),Ve(xn)):(Gn=this._descriptions||{},xn=Gn[RG[Yt]]||[]),xn},getSummaryFields(){return this.getAreaFields("data").filter(Yt=>(0,C.O9)(Yt.summaryType))},fields(Yt){const $t=this;return Yt&&($t._fields=rt(Yt,$t._storeFields,$t._retrieveFields),$t._fieldsPrepared($t._fields)),$t._fields},field(Yt,$t){const xn=this,Gn=xn._fields,qn=Gn&&Gn[(0,C.kf)(Yt)?Yt:lC(Gn,Yt)];let ii;return qn&&$t&&((0,w.__)($t,(qi,ji)=>{const $i=!kG.includes(qi);if(If(qn,qi,ji,$i),"sortOrder"===qi){ii=qn.levels||[];for(let ho=0;ho<ii.length;ho+=1)ii[ho][qi]=ji}}),NG(qn,LG),xn._descriptions=xn._createDescriptions(qn),xn._isFieldsModified=!0,xn._eventsStrategy.fireEvent("fieldChanged",[qn])),qn},getFieldValues(Yt,$t,xn){const Gn=this,qn=this._fields&&this._fields[Yt],ii=this.store(),qi=[],ji={columns:qi,rows:[],values:this.getAreaFields("data"),filters:$t?this._fields.filter(io=>io!==qn&&io.area&&io.filterValues&&io.filterValues.length):[],skipValues:!0};let $i;const ho=new g.cY;return xn&&($i=xn.searchValue,ji.columnSkip=xn.skip,ji.columnTake=xn.take),qn&&ii?((0,w.__)(qn.levels||[qn],function(){qi.push((0,_.X)({},this,{expanded:!0,filterValues:null,sortOrder:"asc",sortBySummaryField:null,searchValue:$i}))}),ii.load(ji).done(io=>{ji.columnSkip&&(io.columns=io.columns.slice(ji.columnSkip)),ji.columnTake&&(io.columns=io.columns.slice(0,ji.columnTake)),On(ji,io),ji.columnTake||Gn._sort(ji,io),ho.resolve(io.columns)}).fail(ho)):ho.reject(),ho},reload(){return this.load({reload:!0})},filter(){const Yt=this._store;return Yt.filter.apply(Yt,arguments)},load:function(Yt){const $t=this,xn=new g.cY;function Gn(){$t._delayedLoadTask=void 0,$t._descriptions?$t._loadCore(Yt,xn):(0,g.z7)(Ct($t)).done(qn=>{$t._fieldsPrepared(qn),$t._loadCore(Yt,xn)}).fail(xn.reject).fail($t._loadErrorHandler)}return Yt=Yt||{},$t.beginLoading(),xn.fail(qn=>{$t._eventsStrategy.fireEvent("loadError",[qn])}).always(()=>{$t.endLoading()}),$t.store()?$t._delayedLoadTask=(0,h.uG)(Gn):Gn(),xn},createDrillDownDataSource(Yt){return this._store.createDrillDownDataSource(this._descriptions,Yt)},_createDescriptions(Yt){const $t=this.fields(),xn={rows:[],columns:[],values:[],filters:[]};(0,w.__)(["row","column","data","filter"],(qn,ii)=>{(0,By.Il)(oi($t,ii),"areaIndex",Yt)}),(0,w.__)($t||[],(qn,ii)=>{const ji=xn[RG[ii.area]],{groupName:$i}=ii;var io;$i&&!(0,C.kf)(ii.groupIndex)&&(ii.levels=(io=ii,$t.filter(Uo=>Uo.groupName===io.groupName&&(0,C.kf)(Uo.groupIndex)&&!1!==Uo.visible).map(Uo=>(0,_.X)(Uo,{areaIndex:io.areaIndex,area:io.area,expanded:(0,C.O9)(Uo.expanded)?Uo.expanded:io.expanded,dataField:Uo.dataField||io.dataField,dataType:Uo.dataType||io.dataType,sortBy:Uo.sortBy||io.sortBy,sortOrder:Uo.sortOrder||io.sortOrder,sortBySummaryField:Uo.sortBySummaryField||io.sortBySummaryField,sortBySummaryPath:Uo.sortBySummaryPath||io.sortBySummaryPath,visible:Uo.visible||io.visible,showTotals:(0,C.O9)(Uo.showTotals)?Uo.showTotals:io.showTotals,showGrandTotals:(0,C.O9)(Uo.showGrandTotals)?Uo.showGrandTotals:io.showGrandTotals})).sort((Uo,zr)=>Uo.groupIndex-zr.groupIndex))),!(!ji||$i&&(0,C.kf)(ii.groupIndex)||!1===ii.visible&&"data"!==ii.area&&"filter"!==ii.area)&&(ii.levels&&ji!==xn.filters&&ji!==xn.values?(ji.push.apply(ji,ii.levels),ii.filterValues&&ii.filterValues.length&&xn.filters.push(ii)):ji.push(ii))}),(0,w.__)(xn,(qn,ii)=>{Ve(ii)});const Gn={};return(0,w.__)(xn.values,(qn,ii)=>{const qi=ii.calculateSummaryValue;(0,C.Tn)(qi)&&qi(MG_createMockSummaryCell(xn,$t,Gn))}),xn},_fieldsPrepared(Yt){this._fields=Yt,(0,w.__)(Yt,(xn,Gn)=>{Gn.index=xn,NG(Gn,f4)});const $t=X(Yt,["caption"]);this._eventsStrategy.fireEvent("fieldsPrepared",[Yt]);for(let xn=0;xn<Yt.length;xn+=1)Yt[xn].caption!==$t[xn].caption&&If(Yt[xn],"caption",Yt[xn].caption,!0);this._descriptions=this._createDescriptions()},isLoading(){return this._loadingCount>0},state(Yt,$t){const xn=this;return arguments.length?(Yt=(0,_.X)({rowExpandedPaths:[],columnExpandedPaths:[]},Yt),void(xn._descriptions?(xn._fields=Me(Yt.fields,xn._fields),xn._descriptions=xn._createDescriptions(),!$t&&xn.load(Yt)):(xn.beginLoading(),(0,g.z7)(Ct(xn)).done(Gn=>{xn._fields=Me(Yt.fields,Gn),xn._fieldsPrepared(Gn),!$t&&xn.load(Yt)}).always(()=>{xn.endLoading()})))):{fields:X(xn._fields,kG),columnExpandedPaths:A(xn._data,xn._descriptions,"columns",xn._lastLoadOptions),rowExpandedPaths:A(xn._data,xn._descriptions,"rows",xn._lastLoadOptions)}},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_changeLoadingCount(Yt){const $t=this.isLoading();this._loadingCount+=Yt;const xn=this.isLoading();$t^xn&&this._eventsStrategy.fireEvent("loadingChanged",[xn])},_hasPagingValues(Yt,$t,xn){const Gn=`${$t}Take`,qn=`${$t}Skip`,{values:ii}=this._data;let qi=this._data[`${$t}s`];const ji="row"===$t?"column":"row",$i=[];if(Yt.path&&Yt.area===$t){const ho=n(qi,Yt.path);if(qi=ho&&ho.children,!qi)return!1}if(Yt.oppositePath&&Yt.area===ji){const ho=n(qi,Yt.oppositePath);if(qi=ho&&ho.children,!qi)return!1}for(let ho=Yt[qn];ho<Yt[qn]+Yt[Gn];ho+=1)qi[ho]&&$i.push(qi[ho].index);return $i.every(ho=>{if(void 0!==ho)return"row"===$t?(ii[ho]||[])[xn]:(ii[xn]||[])[ho]})},_processPagingCacheByArea(Yt,$t,xn){const Gn=`${xn}Take`,qn=`${xn}Skip`;let ii=this._data[`${xn}s`];const qi="row"===xn?"column":"row";let ji;if(Yt[Gn]){if(Yt.path&&Yt.area===xn){const $i=n(ii,Yt.path);ii=$i&&$i.children||[]}if(Yt.oppositePath&&Yt.area===qi){const $i=n(ii,Yt.oppositePath);ii=$i&&$i.children||[]}do{if(ji=ii[Yt[qn]],ji&&void 0!==ji.index){if(!this._hasPagingValues(Yt,qi,ji.index))break;Yt[qn]++,Yt[Gn]--}}while(ji&&void 0!==ji.index&&Yt[Gn]);if(Yt[Gn]){const $i=Math.floor(Yt[qn]/$t)*$t,ho=Math.ceil((Yt[qn]+Yt[Gn])/$t)*$t;Yt[qn]=$i,Yt[Gn]=ho-$i}}},_processPagingCache(Yt){const $t=this._pageSize;if(!($t<0))for(let xn=0;xn<Yt.length;xn+=1)this._processPagingCacheByArea(Yt[xn],$t,"row"),this._processPagingCacheByArea(Yt[xn],$t,"column")},_loadCore(Yt,$t){const xn=this,Gn=this._store,qn=this._descriptions,ii=Yt.reload||this.paginate()&&xn._isFieldsModified,qi=this.paginate(),ji=RG[Yt.area];if(Yt=Yt||{},Gn){(0,_.X)(Yt,qn),Yt.columnExpandedPaths=Yt.columnExpandedPaths||A(this._data,Yt,"columns",xn._lastLoadOptions),Yt.rowExpandedPaths=Yt.rowExpandedPaths||A(this._data,Yt,"rows",xn._lastLoadOptions),qi&&(Yt.pageSize=this._pageSize),ji&&(Yt.headerName=ji),xn.beginLoading(),$t.always(()=>{xn.endLoading()});let $i=[Yt];if(xn._eventsStrategy.fireEvent("customizeStoreLoadOptions",[$i,ii]),ii||xn._processPagingCache($i),$i=$i.filter(io=>!(io.rows.length&&0===io.rowTake||io.columns.length&&0===io.columnTake)),!$i.length)return void xn._update($t);const ho=$i.map(io=>Gn.load(io));g.z7.apply(null,ho).done(function(){const io=arguments;for(let Uo=0;Uo<io.length;Uo+=1){const zr=$i[Uo],Os=io[Uo],wa=Uo===io.length-1;zr.path?xn.applyPartialDataSource(zr.area,zr.path,Os,!!wa&&$t,zr.oppositePath):qi&&!ii&&OQ(xn._data)?xn.mergePartialDataSource(Os,!!wa&&$t):((0,_.X)(xn._data,Os),xn._lastLoadOptions=zr,xn._update(!!wa&&$t))}}).fail($t.reject)}else xn._update($t)},_sort(Yt,$t,xn){this._store&&!this._paginate&&function p4(n,e,t){g4(e,n,"rows",t),g4(e,n,"columns",t)}(Yt,$t,xn)},sortLocal(){this._sort(this._descriptions,this._data),this._eventsStrategy.fireEvent("changed")},paginate(){return this._paginate&&this._store&&this._store.supportPaging()},isEmpty(){const Yt=this.getAreaFields("data").filter(xn=>!1!==xn.visible),$t=this.getData();return!Yt.length||!$t.values.length},_update(Yt){const $t=this,xn=$t._descriptions,Gn=$t._data,qn=xn.values,ii=function SQ(n){return n.some(e=>e.summaryDisplayMode||e.calculateSummaryValue)}(qn);return(0,g.z7)(On(xn,Gn),Fn(Gn.rows),Fn(Gn.columns)).done(()=>{ii&&($t._sort(xn,Gn,ii),!$t.isEmpty()&&MG_applyDisplaySummaryMode(xn,Gn)),$t._sort(xn,Gn),!$t.isEmpty()&&function EQ(n){return n.some(e=>!!e.runningTotal)}(qn)&&MG_applyRunningTotal(xn,Gn),$t._data=Gn,!1!==Yt&&(0,g.z7)(Yt).done(()=>{$t._isFieldsModified=!1,$t._eventsStrategy.fireEvent("changed"),(0,C.O9)($t._data.grandTotalRowIndex)&&(Gn.grandTotalRowIndex=$t._data.grandTotalRowIndex),(0,C.O9)($t._data.grandTotalColumnIndex)&&(Gn.grandTotalColumnIndex=$t._data.grandTotalColumnIndex)}),Yt&&Yt.resolve($t._data)}),Yt},store(){return this._store},collapseHeaderItem(Yt,$t){const xn=this,qn=n("column"===Yt?xn._data.columns:xn._data.rows,$t),ii=xn.getAreaFields(Yt)[$t.length-1];return!(!qn||!qn.children||(xn._eventsStrategy.fireEvent("expandValueChanging",[{area:Yt,path:$t,expanded:!1}]),ii&&(ii.expanded=!1),qn.collapsedChildren=qn.children,delete qn.children,xn._update(),xn.paginate()&&xn.load(),0))},collapseAll(Yt){let $t=!1;const xn=this.field(Yt)||{};let Gn=[this.getAreaFields(xn.area).indexOf(xn)];xn.expanded=!1,xn&&xn.levels&&(Gn=[],xn.levels.forEach(qn=>{Gn.push(this.getAreaFields(xn.area).indexOf(qn)),qn.expanded=!1})),td(this._data[`${xn.area}s`],qn=>{const ii=qn[0],qi=Zu(qn);ii&&ii.children&&Gn.includes(qi.length-1)&&(ii.collapsedChildren=ii.children,delete ii.children,$t=!0)},!0),$t&&this._update()},expandAll(Yt){const $t=this.field(Yt);$t&&$t.area&&($t.expanded=!0,$t&&$t.levels&&$t.levels.forEach(xn=>{xn.expanded=!0}),this.load())},expandHeaderItem(Yt,$t){const xn=this,qn=n("column"===Yt?xn._data.columns:xn._data.rows,$t);if(qn&&!qn.children){const ii=!!qn.collapsedChildren,qi={area:Yt,path:$t,expanded:!0,needExpandData:!ii};return xn._eventsStrategy.fireEvent("expandValueChanging",[qi]),ii?(qn.children=qn.collapsedChildren,delete qn.collapsedChildren,xn._update()):this.store()&&xn.load(qi),ii}return!1},mergePartialDataSource(Yt,$t){const xn=this,Gn=xn._data;let qn,ii;Yt&&Yt.values&&(Yt.rows=Yt.rows||[],Yt.columns=Yt.columns||[],qn=i(Gn.rows,Yt.rows,Gn.grandTotalColumnIndex),ii=i(Gn.columns,Yt.columns,Gn.grandTotalColumnIndex),(0,g.z7)(qn,ii).done((qi,ji)=>{(qi.length||ji.length)&&r(Gn,Yt.values,qi,ji),xn._update($t)}))},applyPartialDataSource(Yt,$t,xn,Gn,qn){const ii=this,qi=ii._data,ji="column"===Yt?qi.columns:qi.rows;let $i;const ho="column"===Yt?qi.rows:qi.columns;let io,Uo,zr;xn&&xn.values&&(xn.rows=xn.rows||[],xn.columns=xn.columns||[],$i=n(ji,$t),io=qn&&n(ho,qn),$i&&("column"===Yt?(zr=t(ji,$i,xn.columns,qi.grandTotalColumnIndex),Uo=io?t(ho,io,xn.rows,qi.grandTotalRowIndex):i(qi.rows,xn.rows,qi.grandTotalRowIndex)):(Uo=t(ji,$i,xn.rows,qi.grandTotalRowIndex),zr=io?t(ho,io,xn.columns,qi.grandTotalColumnIndex):i(qi.columns,xn.columns,qi.grandTotalColumnIndex)),(0,g.z7)(Uo,zr).done((Os,wa)=>{("row"===Yt&&Os.length||"column"===Yt&&wa.length)&&r(qi,xn.values,Os,wa),ii._update(Gn)})))},on(Yt,$t){return this._eventsStrategy.on(Yt,$t),this},off(Yt,$t){return this._eventsStrategy.off(Yt,$t),this},dispose(){const Yt=this._delayedLoadTask;this._eventsStrategy.dispose(),Yt&&Yt.abort(),this._isDisposed=!0},isDisposed(){return!!this._isDisposed}}}()),VG=Math,eV=function(n,e,t){n[e]||(n[e]=function(){const i=this._dataSource;return i?i[e].apply(i,arguments):t})},wQ={DataController:es.A.inherit(function(){function n(V,X,ce){return"#N/A"===V?ce:SS(V,X)}const e=function(){function ce(Me,Ve,Je){const Ct=(Me[Ve]=Me[Ve]||[])[Je]={};if(Me[Ve+1]){Ct.children=Me[Ve+1];for(let Xt=Ve+1;Xt<Me.length;Xt+=1)Me[Xt]=void 0;Me.length=Ve+1}return Ct}const _e=function(Me,Ve){const Je=Me[Ve+1];!Me[Ve].children.length&&Je&&Je.children&&(Je.children.splice(Je.children.indexOf(Me[Ve]),1),_e(Me,Ve+1))};return function(Me,Ve,Je,rt,Ct){const Xt=[],On=function(oi){let Yt=0;return td(oi,$t=>{Yt=VG.max(Yt,$t.length)}),Yt}(Me)||1,Fn=new g.cY;return function(Me,Ve,Je,rt,Ct){const Xt=Je.length,On=function(Yt,$t){const xn=$t&&$t.length||0,Gn=[],qn=new g.cY;let ii;return(0,g.z7)(z_(Yt,(qi,ji)=>{const $i=qi[0],ho=Zu(qi);ii=ce(Gn,ho.length,ji),ii.type="D",ii.value=$i.value,ii.path=ho,ii.text=$i.text,ii.index=$i.index,ii.displayText=$i.displayText,ii.key=$i.key,ii.isEmpty=$i.isEmpty,ho.length<xn&&(!$i.children||0!==$i.children.length)&&(ii.expanded=!!$i.children)})).done(()=>{qn.resolve(ce(Gn,0,0).children||[])}),qn}(Me,Ve),{dataFields:Fn}=Ct,oi=new g.cY;return(0,g.z7)(On).done(Yt=>{Ct.notifyProgress(.5),Ct.showGrandTotals&&Yt[Ct.showTotalsPrior?"unshift":"push"]({type:"GT",isEmpty:Ct.isEmptyGrandTotal});const $t=!1===Ct.showTotals||Fn.length>0&&Fn.length===Ct.hiddenTotals.length,xn=Fn.length>0&&Ct.hiddenValues.length===Fn.length;var Gn,qn,ii,qi;xn&&$t&&(rt=1),(!$t||"tree"===Ct.layout)&&(qn=Ve,qi="tree"===Ct.layout,ii=(ii=Ct.showTotalsPrior)||qi,td(Gn=Yt,(ji,$i)=>{const ho=ji[0];"D"===ho.type&&ho.expanded&&(!1!==qn[ji.length-1].showTotals||qi)&&(-1!==$i&&((ji[1]?ji[1].children:Gn)||[]).splice(ii?$i:$i+1,0,(0,_.X)({},ho,{children:null,type:"T",expanded:!!ii||null,isAdditionalTotal:!0})),ii&&(ho.expanded=null))})),(0,g.z7)(z_(Yt,Gn=>{const qn=Gn[0];(!qn.children||0===qn.children.length)&&(qn.depthSize=rt-Gn.length+1)})).done(()=>{Xt>1&&function(Gn,qn,ii){td(Gn,qi=>{const ji=qi[0];let $i;if(!ji.children||0===ji.children.length)for(ji.children=[],$i=0;$i<qn.length;$i+=1){const io="T"===ji.type,Uo="D"===ji.type;!1===qn[$i].visible||"GT"===ji.type&&ii.hiddenGrandTotals.includes($i)||io&&ii.hiddenTotals.includes($i)||Uo&&ii.hiddenValues.includes($i)||ji.children.push({caption:qn[$i].caption,path:ji.path,type:ji.type,value:$i,index:ji.index,dataIndex:$i,isMetric:!0,isEmpty:ji.isEmpty&&ji.isEmpty[$i]})}})}(Yt,Je,Ct),!Ct.showEmpty&&function(Gn){td([{children:Gn}],(qn,ii)=>{const qi=qn[0],ji=(qn[1]?qn[1].children:Gn)||[];let{isEmpty:$i}=qi;$i&&$i.length&&($i=qi.isEmpty.filter(ho=>ho).length===$i.length),qi&&!qi.children&&$i&&(ji.splice(ii,1),_e(qn,1))})}(Yt),Ct.notifyProgress(.75),(0,g.z7)(z_(Yt,Gn=>{const qn=Gn[0],{isMetric:ii}=qn,qi=Ve[Gn.length-1]||{};if("D"===qn.type&&!ii&&(qn.width=qi.width),xn&&"D"===qn.type){const ji=(Gn[1]?Gn[1].children:Yt)||[];ji.splice(ji.indexOf(qn),1)}else qn.wordWrapEnabled=ii?Je[qn.dataIndex].wordWrapEnabled:qi.wordWrapEnabled,qn.isLast=!qn.children||!qn.children.length,qn.isLast&&(0,w.__)(Ct.sortBySummaryPaths,(ji,$i)=>{if((0,C.O9)(qn.dataIndex)||($i=$i.slice(0)).pop(),function(ho,io){let Uo;const zr=ho[0],Os=(0,C.Kg)(io[0]),wa=zr.dataIndex>=0?ho[1]:zr;return Uo=Os&&-1!==io[0].indexOf("&[")&&wa.key||!wa.key?Zu(ho):(0,w.Tj)(ho,$l=>$l.dataIndex>=0?$l.value:$l.text).reverse(),"GT"===zr.type&&(Uo=Uo.slice(1)),Uo.join("/")===io.join("/")}(Gn,$i))return qn.sorted=!0,!1}),qn.text=function(ji,$i,ho){let{text:io}=ji;return(0,C.O9)(ji.displayText)?io=ji.displayText:(0,C.O9)(ji.caption)?io=ji.caption:"GT"===ji.type&&(io=ho.texts.grandTotal),ji.isAdditionalTotal&&(io=(0,Ea.GP)(ho.texts.total||"",io)),io}(qn,0,Ct)})).done(()=>{Yt.length||Yt.push({}),Ct.notifyProgress(1),oi.resolve(Yt)})})}),oi}(Me,Ve,Je,On,Ct).done(oi=>{(function(Yt,$t,xn,Gn,qn){let qi,ji,ii=0;const $i=[0];td($t,ho=>{const io=ho[0];for(ji=io.isMetric?xn:ho.length-1;$i.length-1<ji;)$i.push($i[$i.length-1]);qi=$i[ji]||0,ii=function(Me,Ve){return function(Ct,Xt,On,Fn,oi){const Yt=oi?Fn:On;for(;!Ct[Yt];)Ct.push([]);oi?Ct[Yt].push(Xt):Ct[Yt].unshift(Xt)}(Me,function(Ct,Xt,On,Fn){const oi={type:Ct.type,text:Ct.text};return Ct.path&&(oi.path=Ct.path),Ct.width&&(oi.width=Ct.width),(0,C.O9)(Ct.wordWrapEnabled)&&(oi.wordWrapEnabled=Ct.wordWrapEnabled),Ct.isLast&&(oi.isLast=!0),Ct.sorted&&(oi.sorted=!0),Ct.isMetric&&(oi.dataIndex=Ct.dataIndex),(0,C.O9)(Ct.expanded)&&(oi.expanded=Ct.expanded),Xt>1&&(oi[On?"colspan":"rowspan"]=Xt),Ct.depthSize&&Ct.depthSize>1&&(oi[On?"rowspan":"colspan"]=Ct.depthSize),Ct.index>=0&&(oi.dataSourceIndex=Ct.index),Fn&&Ct.children&&Ct.children.length&&!Ct.children[0].isMetric&&(oi.width=null,oi.isWhiteSpace=!0),oi}(Ve.headerItem,Ve.lastIndex-Ve.index||1,Ve.isHorizontal,Ve.isTree),Ve.index,Ve.depth,Ve.isHorizontal),Ve.headerItem.children&&0!==Ve.headerItem.children.length?Ve.lastIndex:Ve.lastIndex+1}(Yt,{headerItem:io,index:qi,lastIndex:ii,depth:ji,isHorizontal:Gn,isTree:qn}),$i.length=ji,$i.push(ii)})})(Xt,oi,On,rt,"tree"===Ct.layout),Ct.notifyProgress(1),Fn.resolve(Xt)}),Fn}}();function t(V,X){const ce=[];return(0,w.__)(V,(_e,Me)=>{const Ve=lC(X,Me.sortBySummaryField);Ve>=0&&ce.push((Me.sortBySummaryPath||[]).concat([Ve]))}),ce}function i(V,X){let ce=0;const _e=[];for(let Me=0;Me<V.length;Me+=1)for(let Ve=0;Ve<V[Me].length;Ve+=1){const rt=Me+((V[Me][Ve].rowspan||1)-1);if(_e[Me]&&(ce-=_e[Me],_e[Me]=0),!1===X(V[Me][Ve],rt,Me,Ve,ce))break;_e[Me+(V[Me][Ve].rowspan||1)]=(_e[Me+(V[Me][Ve].rowspan||1)]||0)+1,ce+=1}}function r(V,X){let ce=0;const _e=[];return td(V,Me=>{const Ve=Me[0],Je=Zu(Me);if(Ve.children&&!1===X.showTotals)return;const rt=(0,_.X)(!0,{},Ve,{visibleIndex:ce+=1,path:Je});(0,C.O9)(rt.index)?_e[rt.index]=rt:_e.push(rt)}),_e}function m(V,X,ce){return new qZ.Ay.VirtualScrollController(X,(0,_.X)({hasKnownLastPage:()=>!0,pageCount(){return VG.ceil(this.totalItemsCount()/this.pageSize())},updateLoading(){},itemsCount(){return this.pageIndex()<this.pageCount()-1?this.pageSize():this.totalItemsCount()%this.pageSize()},items:()=>[],viewportItems:()=>[],onChanged(){},isLoading:()=>V.isLoading(),changingDuration:()=>V._dataSource.paginate()?300:V._changingDuration||0},ce))}const A={ctor(V){const X=this,ce=X._fireChanged.bind(X);V=X._options=V||{},X.dataSourceChanged=(0,BS.A)(),X._dataSource=X._createDataSource(V),V.component&&"virtual"===V.component.option("scrolling.mode")&&(X._rowsScrollController=m(X,V.component,{totalItemsCount:()=>X.totalRowCount(),pageIndex:_e=>X.rowPageIndex(_e),pageSize:()=>X.rowPageSize(),load(){return X._rowsScrollController.pageIndex()>=this.pageCount()&&X._rowsScrollController.pageIndex(this.pageCount()-1),X._rowsScrollController.handleDataChanged(function(){X._dataSource.paginate()?X._dataSource.load():ce.apply(this,arguments)})}}),X._columnsScrollController=m(X,V.component,{totalItemsCount:()=>X.totalColumnCount(),pageIndex:_e=>X.columnPageIndex(_e),pageSize:()=>X.columnPageSize(),load(){return X._columnsScrollController.pageIndex()>=this.pageCount()&&X._columnsScrollController.pageIndex(this.pageCount()-1),X._columnsScrollController.handleDataChanged(function(){X._dataSource.paginate()?X._dataSource.load():ce.apply(this,arguments)})}})),X._stateStoringController=new JZ.A.StateStoringController(V.component).init(),X._columnsInfo=[],X._rowsInfo=[],X._cellsInfo=[],X.expandValueChanging=(0,BS.A)(),X.loadingChanged=(0,BS.A)(),X.progressChanged=(0,BS.A)(),X.scrollChanged=(0,BS.A)(),X.load(),X._update(),X.changed=(0,BS.A)()},_fireChanged(){const V=new Date;this.changed&&!this._lockChanged&&this.changed.fire(),this._changingDuration=new Date-V},_correctSkipsTakes(V,X,ce,_e,Me,Ve){const Je=ce?V+ce-1:V;Me[_e.length]=Me[_e.length]||0,Ve[_e.length]=Ve[_e.length]||0,Je<X?Me[_e.length]+=1:Ve[_e.length]+=1},_calculatePagingForRowExpandedPaths(V,X,ce,_e,Me){const Ve=this._rowsInfo,Je=Math.min(V.rowSkip+V.rowTake,Ve.length),{rowExpandedPaths:rt}=V;let Ct=[];const Xt={};let On,Fn,oi;for(rt.forEach((Yt,$t)=>{Xt[Yt]=$t}),On=0;On<Je;On+=1){for(ce.length=X.length=Ct.length+1,Fn=0;Fn<Ve[On].length;Fn+=1){const Yt=Ve[On][Fn];if("D"===Yt.type){this._correctSkipsTakes(On,V.rowSkip,Yt.rowspan,Ct,X,ce),oi=Yt.path||oi;const $t=oi&&oi.length>1?Xt[oi.slice(0,-1)]:-1;$t>=0&&(_e[$t]=X[Ct.length]||0,Me[$t]=ce[Ct.length]||0),Yt.rowspan&&Ct.push(Yt.rowspan)}}Ct=Ct.map(Yt=>Yt-1).filter(Yt=>Yt>0)}},_calculatePagingForColumnExpandedPaths(V,X,ce,_e,Me){const Ve={},Je={};(0,wG.z)(this._columnsInfo,(rt,Ct)=>{if("D"===rt.type&&rt.path&&void 0===rt.dataIndex){const Xt=rt.colspan||1,On=rt.path.slice(0,-1).toString();Ve[On]=Ve[On]||0,Je[On]=Je[On]||0,Ct+Xt<=V.columnSkip?Ve[On]+=1:Ct<V.columnSkip+V.columnTake&&(Je[On]+=1)}}),X[0]=Ve[""],ce[0]=Je[""],V.columnExpandedPaths.forEach((rt,Ct)=>{const Xt=Ve[rt],On=Je[rt];void 0!==Xt&&(_e[Ct]=Xt),void 0!==On&&(Me[Ct]=On)})},_processPagingForExpandedPaths(V,X,ce,_e){const Me=V[`${X}ExpandedPaths`],Ve=Me.map(()=>0),Je=Me.map(()=>_e?V.pageSize:0),rt=[],Ct=[];_e||("row"===X?this._calculatePagingForRowExpandedPaths(V,rt,Ct,Ve,Je):this._calculatePagingForColumnExpandedPaths(V,rt,Ct,Ve,Je)),this._savePagingForExpandedPaths(V,X,ce,rt[0],Ct[0],Ve,Je)},_savePagingForExpandedPaths(V,X,ce,_e,Me,Ve,Je){const rt=V[`${X}ExpandedPaths`];V[`${X}ExpandedPaths`]=[],V[`${X}Skip`]=void 0!==_e?_e:V[`${X}Skip`],V[`${X}Take`]=void 0!==Me?Me:V[`${X}Take`];for(let Ct=0;Ct<rt.length;Ct+=1)Je[Ct]&&ce.push((0,_.X)({area:X,headerName:`${X}s`},V,{[`${X}Skip`]:Ve[Ct],[`${X}Take`]:Je[Ct],[V.area&&V.area!==X?"oppositePath":"path"]:rt[Ct]}))},_handleCustomizeStoreLoadOptions(V,X){const ce=V[0],_e=this._rowsScrollController;if(this._dataSource.paginate()&&_e){const Ve=_e.pageSize();"rows"===ce.headerName?(ce.rowSkip=0,ce.rowTake=Ve,ce.rowExpandedPaths=[]):(ce.rowSkip=_e.beginPageIndex()*Ve,ce.rowTake=(_e.endPageIndex()-_e.beginPageIndex()+1)*Ve,this._processPagingForExpandedPaths(ce,"row",V,X))}const Me=this._columnsScrollController;if(this._dataSource.paginate()&&Me){const Ve=Me.pageSize();V.forEach(Je=>{"columns"===Je.headerName?(Je.columnSkip=0,Je.columnTake=Ve,Je.columnExpandedPaths=[]):(Je.columnSkip=Me.beginPageIndex()*Ve,Je.columnTake=(Me.endPageIndex()-Me.beginPageIndex()+1)*Ve,this._processPagingForExpandedPaths(Je,"column",V,X))})}},load(){const V=this,X=this._stateStoringController;X.isEnabled()&&!X.isLoaded()?X.load().always(ce=>{ce?V._dataSource.state(ce):V._dataSource.load()}):V._dataSource.load()},calculateVirtualContentParams(V){const X=this,ce=X._rowsScrollController,_e=X._columnsScrollController;if(ce&&_e)return ce.viewportItemSize(V.virtualRowHeight),ce.viewportSize(V.viewportHeight/ce.viewportItemSize()),ce.setContentItemSizes(V.itemHeights),_e.viewportItemSize(V.virtualColumnWidth),_e.viewportSize(V.viewportWidth/_e.viewportItemSize()),_e.setContentItemSizes(V.itemWidths),(0,h.OX)(()=>{_e.loadIfNeed(),ce.loadIfNeed()}),X.scrollChanged.fire({left:_e.getViewportPosition(),top:ce.getViewportPosition()}),{contentTop:ce.getContentOffset(),contentLeft:_e.getContentOffset(),width:_e.getVirtualContentSize(),height:ce.getVirtualContentSize()}},setViewportPosition(V,X){this._rowsScrollController.setViewportPosition(X||0),this._columnsScrollController.setViewportPosition(V||0)},subscribeToWindowScrollEvents(V){var X;null===(X=this._rowsScrollController)||void 0===X||X.subscribeToWindowScrollEvents(V)},updateWindowScrollPosition(V){var X;null===(X=this._rowsScrollController)||void 0===X||X.scrollTo(V)},updateViewOptions(V){(0,_.X)(this._options,V),this._update()},_handleExpandValueChanging(V){this.expandValueChanging.fire(V)},_handleLoadingChanged(V){this.loadingChanged.fire(V)},_handleProgressChanged(V){this.progressChanged.fire(V)},_handleFieldsPrepared(V){this._options.onFieldsPrepared&&this._options.onFieldsPrepared(V)},_createDataSource(V){const X=this,ce=V.dataSource;let _e;return X._isSharedDataSource=ce instanceof FG,_e=X._isSharedDataSource?ce:new FG(ce),X._expandValueChangingHandler=X._handleExpandValueChanging.bind(X),X._loadingChangedHandler=X._handleLoadingChanged.bind(X),X._fieldsPreparedHandler=X._handleFieldsPrepared.bind(X),X._customizeStoreLoadOptionsHandler=X._handleCustomizeStoreLoadOptions.bind(X),X._changedHandler=function(){X._update(),X.dataSourceChanged.fire()},X._progressChangedHandler=function(Me){X._handleProgressChanged(.8*Me)},_e.on("changed",X._changedHandler),_e.on("expandValueChanging",X._expandValueChangingHandler),_e.on("loadingChanged",X._loadingChangedHandler),_e.on("progressChanged",X._progressChangedHandler),_e.on("fieldsPrepared",X._fieldsPreparedHandler),_e.on("customizeStoreLoadOptions",X._customizeStoreLoadOptionsHandler),_e},getDataSource(){return this._dataSource},isLoading(){return this._dataSource.isLoading()},beginLoading(){this._dataSource.beginLoading()},endLoading(){this._dataSource.endLoading()},_update(){const V=this,X=V._dataSource,ce=V._options,_e=X.getAreaFields("column"),Me=X.getAreaFields("row"),Ve=X.getAreaFields("data"),Je="row"===ce.dataFieldArea?Ve:[],rt="row"!==ce.dataFieldArea?Ve:[],Ct=X.getData(),Xt=function(Gn){const qn=[];return(0,w.__)(Gn,(ii,qi)=>{!1===qi.showTotals&&qn.push(ii)}),qn}(Ve),On=function(Gn){const qn=[];return Gn.forEach((ii,qi)=>{(void 0===ii.showValues&&!1===ii.showTotals||!1===ii.showValues)&&qn.push(qi)}),qn}(Ve),Fn=function(Gn,qn){let ii=[];return(0,w.__)(Gn,(qi,ji)=>{!1===ji.showGrandTotals&&ii.push(qi)}),0===qn.length&&ii.length===Gn.length&&(ii=[]),ii}(Ve,_e),oi=!(Ve.length>0)||Fn.length!==Ve.length,Yt={isEmptyGrandTotal:Ct.isEmptyGrandTotalRow,texts:ce.texts||{},hiddenTotals:Xt,hiddenValues:On,hiddenGrandTotals:[],showTotals:ce.showRowTotals,showGrandTotals:!1!==ce.showRowGrandTotals&&oi,sortBySummaryPaths:t(_e,Ve),showTotalsPrior:"rows"===ce.showTotalsPrior||"both"===ce.showTotalsPrior,showEmpty:!ce.hideEmptySummaryCells,layout:ce.rowHeaderLayout,fields:Me,dataFields:Ve,progress:0},$t={isEmptyGrandTotal:Ct.isEmptyGrandTotalColumn,texts:ce.texts||{},hiddenTotals:Xt,hiddenValues:On,hiddenGrandTotals:Fn,showTotals:ce.showColumnTotals,showTotalsPrior:"columns"===ce.showTotalsPrior||"both"===ce.showTotalsPrior,showGrandTotals:!1!==ce.showColumnGrandTotals&&oi,sortBySummaryPaths:t(Me,Ve),showEmpty:!ce.hideEmptySummaryCells,fields:_e,dataFields:Ve,progress:0},xn=function(Gn){this.progress=Gn,V._handleProgressChanged(.8+.1*Yt.progress+.1*$t.progress)};Yt.notifyProgress=xn,$t.notifyProgress=xn,(0,C.O9)(Ct.grandTotalRowIndex)||(Ct.grandTotalRowIndex=r(Ct.rows,Yt).length),(0,C.O9)(Ct.grandTotalColumnIndex)||(Ct.grandTotalColumnIndex=r(Ct.columns,$t).length),X._changeLoadingCount(1),(0,g.z7)(e(Ct.columns,_e,rt,!0,$t),e(Ct.rows,Me,Je,!1,Yt)).always(()=>{X._changeLoadingCount(-1)}).done((Gn,qn)=>{V._columnsInfo=Gn,V._rowsInfo=qn,V._rowsScrollController&&V._columnsScrollController&&V.changed&&!V._dataSource.paginate()&&(V._rowsScrollController.reset(!0),V._columnsScrollController.reset(!0),V._lockChanged=!0,V._rowsScrollController.load(),V._columnsScrollController.load(),V._lockChanged=!1)}).done(()=>{V._fireChanged(),V._stateStoringController.isEnabled()&&!V._dataSource.isLoading()&&(V._stateStoringController.state(V._dataSource.state()),V._stateStoringController.save())})},getRowsInfo(V){const X=this,ce=X._rowsInfo,_e=X._rowsScrollController;let Me;if(_e&&!V){const Ve=_e.beginPageIndex()*X.rowPageSize(),Je=_e.endPageIndex()*X.rowPageSize()+X.rowPageSize(),rt=X._dataSource.getSummaryFields(),Ct="row"===this._options.dataFieldArea,Xt=[];let On=1;return i(ce,(Fn,oi,Yt,$t,xn)=>{const qn=Yt<Ve?0:Yt-Ve;let ii=Fn;if(!(oi>=Ve&&Yt<Je))return!1;{Xt[qn]=Xt[qn]||[],Me=Yt<Ve?Fn.rowspan-(Ve-Yt)||1:Fn.rowspan,Ve+qn+Me>Je&&(Me=Je-(qn+Ve)||1),Me!==Fn.rowspan&&(ii=(0,_.X)({},ii,{rowspan:Me})),Xt[qn].push(ii);const qi=rt.some(ji=>ji.caption===ii.text);(!Ct||!qi)&&(On=VG.max(On,xn+1))}}),i(Xt,(Fn,oi,Yt,$t,xn)=>{xn+(Fn.colspan||1)>On&&(Xt[Yt][$t]=(0,_.X)({},Fn,{colspan:On-xn||1}))}),Xt}return ce},getColumnsInfo(V){const X=this;let ce=X._columnsInfo;const _e=X._columnsScrollController;if(_e&&!V){const Me=_e.beginPageIndex()*X.columnPageSize(),Ve=_e.endPageIndex()*X.columnPageSize()+X.columnPageSize();ce=(0,wG.i)(ce,Me,Ve)}return ce},totalRowCount(){return this._rowsInfo.length},rowPageIndex(V){return void 0!==V&&(this._rowPageIndex=V),this._rowPageIndex||0},totalColumnCount(){let V=0;if(this._columnsInfo&&this._columnsInfo.length)for(let X=0;X<this._columnsInfo[0].length;X+=1)V+=this._columnsInfo[0][X].colspan||1;return V},rowPageSize(V){return void 0!==V&&(this._rowPageSize=V),this._rowPageSize||20},columnPageSize(V){return void 0!==V&&(this._columnPageSize=V),this._columnPageSize||20},columnPageIndex(V){return void 0!==V&&(this._columnPageIndex=V),this._columnPageIndex||0},getCellsInfo(V){const X=this.getRowsInfo(V),ce=this.getColumnsInfo(V),_e=this._dataSource.getData(),Me=this._options.texts||{};return function(Ve,Je,rt,Ct,Xt,On){const Fn=[],oi="row"===Xt,Yt=rt.values;return Yt.length&&i(Ve,($t,xn)=>{const Gn=Fn[xn]=[],qn=Yt[$t.dataSourceIndex>=0?$t.dataSourceIndex:rt.grandTotalRowIndex]||[];$t.isLast&&(0,wG.z)(Je,(ii,qi)=>{const ji=(oi?$t.dataIndex:ii.dataIndex)||0,$i=Ct[ji];if(ii.isLast&&$i&&!1!==$i.visible){let ho=qn[ii.dataSourceIndex>=0?ii.dataSourceIndex:rt.grandTotalColumnIndex];Array.isArray(ho)||(ho=[ho]);const io=ho[ji];Gn[qi]={text:n(io,$i,On),value:io,format:$i.format,dataType:$i.dataType,columnType:ii.type,rowType:$t.type,rowPath:$t.path||[],columnPath:ii.path||[],dataIndex:ji},$i.width&&(Gn[qi].width=$i.width)}})}),Fn}(X,ce,_e,this._dataSource.getAreaFields("data"),this._options.dataFieldArea,Me.dataNotAvailable)},dispose(){const V=this;V._isSharedDataSource?(V._dataSource.off("changed",V._changedHandler),V._dataSource.off("expandValueChanging",V._expandValueChangingHandler),V._dataSource.off("loadingChanged",V._loadingChangedHandler),V._dataSource.off("progressChanged",V._progressChangedHandler),V._dataSource.off("fieldsPrepared",V._fieldsPreparedHandler),V._dataSource.off("customizeStoreLoadOptions",V._customizeStoreLoadOptionsHandler)):V._dataSource.dispose(),V._columnsScrollController&&V._columnsScrollController.dispose(),V._rowsScrollController&&V._rowsScrollController.dispose(),V._stateStoringController.dispose(),V.expandValueChanging.empty(),V.changed.empty(),V.loadingChanged.empty(),V.progressChanged.empty(),V.scrollChanged.empty(),V.dataSourceChanged.empty()}};return eV(A,"applyPartialDataSource"),eV(A,"collapseHeaderItem"),eV(A,"expandHeaderItem"),eV(A,"getData"),eV(A,"isEmpty"),A}()),DataController__internals:{NO_DATA_AVAILABLE_TEXT:"#N/A"}};var TQ=M(5155);const m4={exportTo(){const n=this._createActionByOption("onExporting"),e={rtlEnabled:this.option("rtlEnabled"),fileName:"PivotGrid",cancel:!1};(0,C.Tn)(n)&&n(e)},_getLength(n){let e;const t=n[0].length;let i=0;for(e=0;e<t;e+=1)i+=n[0][e].colspan||1;return i},_correctCellsInfoItemLengths(n,e){for(let t=0;t<n.length;t+=1)for(;n[t].length<e;)n[t].push({});return n},_calculateCellInfoItemLength(n){let e=0;for(let t=0;t<n.length;t+=1)e+=(0,C.O9)(n[t].colspan)?n[t].colspan:1;return e},_getEmptyCell:()=>({text:"",value:void 0,colspan:1,rowspan:1}),_getAllItems(n,e,t){let i,r,m=t;const A=this._getLength(e),V=n.length;if(n.length>0&&n[0].length>0&&t.length>0&&0===t[0].length){const ce=this._calculateCellInfoItemLength(n[0]);ce>0&&(m=this._correctCellsInfoItemLengths(t,ce))}if(0===m.length){const ce=e.length,_e=n.map(Me=>Me.filter(Ve=>!Ve.expanded).length).reduce((Me,Ve)=>Me+Ve,0);for(let Me=0;Me<ce;Me+=1){m[Me]=[];for(let Ve=0;Ve<_e;Ve+=1)m[Me][Ve]=this._getEmptyCell()}}const X=n.concat(m);for(r=0;r<e.length;r+=1)for(i=e[r].length-1;i>=0;i-=1)(0,C.O9)(X[r+V])||(X[r+V]=[]),X[r+V].splice(0,0,(0,_.X)({},e[r][i]));return X[0].splice(0,0,(0,_.X)({},this._getEmptyCell(),{alignment:(0,za.n)(this._options.rtlEnabled),colspan:A,rowspan:V})),(0,TQ.Q)(X,this._getEmptyCell())},getDataProvider(){return new _4(this)}},_4=es.A.inherit({ctor(n){this._exportController=n},ready(){this._initOptions();const n=this._options;return(0,g.z7)(n.items).done(e=>{const i=e[e[0][0].rowspan-1];(0,w.__)(i,(r,m)=>{m.width=100}),n.columns=i,n.items=e})},_initOptions(){const n=this._exportController,e=n._dataController,t=new g.cY;e.beginLoading(),setTimeout(()=>{const i=(0,_.X)(!0,[],e.getColumnsInfo(!0)),r=(0,_.X)(!0,[],e.getRowsInfo(!0)),m=e.getCellsInfo(!0);t.resolve(n._getAllItems(i,r,m)),e.endLoading()}),this._options={items:t,rtlEnabled:n.option("rtlEnabled"),dataFields:n.getDataSource().getAreaFields("data"),rowsArea:n._rowsArea,columnsArea:n._columnsArea}},getColumns(){return this._options.columns},getColumnsWidths(){const n=this._options.columnsArea,{rowsArea:e}=this._options,{columns:t}=this._options;return!(0,gr.Vd)()||"virtual"===n.option("scrolling.mode")||n.element().is(":hidden")?t.map(()=>100):e.getColumnsWidth().concat(n.getColumnsWidth())},getRowsCount(){return this._options.items.length},getGroupLevel:()=>0,getCellMerging(n,e){const{items:t}=this._options,i=t[n]&&t[n][e];return i?{colspan:i.colspan-1,rowspan:i.rowspan-1}:{colspan:0,rowspan:0}},getFrozenArea(){return{x:this.getRowAreaColCount(),y:this.getColumnAreaRowCount()}},getCellType(n,e){const t=this.getStyles()[this.getStyleId(n,e)];return t&&t.dataType||"string"},getCellData(n,e,t){const i={},{items:r}=this._options,m=r[n]&&r[n][e]||{};if(t){i.cellSourceData=m;const A=this._tryGetAreaName(m,n,e);A&&(i.cellSourceData.area=A),i.cellSourceData.rowIndex=n,i.cellSourceData.columnIndex=e}return i.value="string"===this.getCellType(n,e)?m.text:m.value,i.cellSourceData&&i.cellSourceData.isWhiteSpace&&(i.value=""),i},_tryGetAreaName(n,e,t){return this.isColumnAreaCell(e,t)?"column":this.isRowAreaCell(e,t)?"row":(0,C.O9)(n.dataIndex)?"data":void 0},isRowAreaCell(n,e){return n>=this.getColumnAreaRowCount()&&e<this.getRowAreaColCount()},isColumnAreaCell(n,e){return e>=this.getRowAreaColCount()&&n<this.getColumnAreaRowCount()},getColumnAreaRowCount(){return this._options.items[0][0].rowspan},getRowAreaColCount(){return this._options.items[0][0].colspan},getHeaderStyles(){return[{alignment:"center",dataType:"string"},{alignment:(0,za.n)(this._options.rtlEnabled),dataType:"string"}]},getDataFieldStyles(){const{dataFields:n}=this._options,e={alignment:this._options.rtlEnabled?"left":"right"},t=[];return n.length?(n.forEach(i=>{t.push((0,Lo.A)({},e,{format:i.format,dataType:this.getCellDataType(i)}))}),t):[e]},getStyles(){return this._styles||(this._styles=[...this.getHeaderStyles(),...this.getDataFieldStyles()]),this._styles},getCellDataType(n){if(n&&n.customizeText)return"string";if(n.dataType)return n.dataType;if(n.format){if(1===bS.A.parse(Hd.A.format(1,n.format)))return"number";if(Hd.A.format(new Date,n.format))return"date"}return"string"},getStyleId(n,e){const{items:t}=this._options,i=t[n]&&t[n][e]||{};return 0===e&&0===n||this.isColumnAreaCell(n,e)?0:this.isRowAreaCell(n,e)?1:this.getHeaderStyles().length+(i.dataIndex||0)}}),zH={treeViewItem:"tree-view-item",allowScrolling:"allow-scrolling",itemGroup:"item-group"},na={area:{self:"dx-area",box:"dx-area-box",caption:"dx-area-caption",icon:"dx-area-icon",field:"dx-area-field",fieldContainer:"dx-area-field-container",fieldContent:"dx-area-field-content",fieldList:"dx-area-fields",fieldListHeader:"dx-area-fields-header"},pivotGrid:{dragAction:"dx-pivotgrid-drag-action",fieldsContainer:"dx-pivotgrid-fields-container"},fieldChooser:{self:"dx-pivotgridfieldchooser",container:"dx-pivotgridfieldchooser-container",contextMenu:"dx-pivotgridfieldchooser-context-menu"},layout:{zero:"dx-layout-0",second:"dx-layout-2"},treeView:{self:"dx-treeview",borderVisible:"dx-treeview-border-visible"},scrollable:{self:"dx-scrollable"},allFields:"dx-all-fields",col:"dx-col",headerFilter:"dx-header-filter",row:"dx-row",widget:"dx-widget"},GH={all:"smalliconslayout",column:"columnfield",row:"rowfield",filter:"filter",data:"formula",measure:"formula",hierarchy:"hierarchy",dimension:"detailslayout"},v4={targets:{drag:"drag"}};var DQ=M(4316),UG=M(546),AQ=M(3392),C4=M(7358);const{getSwatchContainer:IQ}=C4.A,y4="dx-sortable-old";function MQ(n,e,t){return!(0,C.O9)(e.posHorizontal)||(t?n>e.posHorizontal:n<e.posHorizontal)}const b4=kv.A.inherit({_getDefaultOptions(){return(0,_.X)(this.callBase(),{onChanged:null,onDragging:null,itemRender:null,groupSelector:null,itemSelector:".dx-sort-item",itemContainerSelector:".dx-sortable-old",sourceClass:"dx-drag-source",dragClass:"dx-drag",targetClass:"dx-drag-target",direction:"vertical",allowDragging:!0,groupFilter:null,useIndicator:!1})},_renderItem(n,e){const t=this.option("itemRender");let i;return t?i=t(n,e):(i=n.clone(),i.css({width:(0,D.RG)(n),height:(0,D.Oq)(n)})),i},_renderIndicator(n,e,t,i){const r=(0,D.P$)(n,!0),m=(0,D.Ot)(n,!0),A=n.offset().top-t.offset().top,V=n.offset().left-t.offset().left;this._indicator.css({position:"absolute",top:i&&e?A+r:A,left:i&&!e?V+m:V}).toggleClass("dx-position-indicator-horizontal",!e).toggleClass("dx-position-indicator-vertical",!!e).toggleClass("dx-position-indicator-last",!!i).appendTo(t),(0,D.k$)(this._indicator,""),(0,D.zj)(this._indicator,""),e?(0,D.zj)(this._indicator,m):(0,D.k$)(this._indicator,r)},_renderDraggable(n){this._$draggable&&this._$draggable.remove(),this._$draggable=this._renderItem(n,"drag").addClass(this.option("dragClass")).appendTo(IQ(n)).css({zIndex:1e6,position:"absolute"})},_detachEventHandlers(){const n=[ul.Cy,ul.ni,ul._N,ul.Ve,ul.qG,ul.gv].join(" ");L.A.off(this._getEventListener(),(0,N.b4)(n,"dxSortable"),void 0)},_getItemOffset(n,e,t){for(let i=0;i<e.length;i+=1){let r;const m=t.pageY<e[i].posVertical;if(n?r=m:m&&(r=MQ(t.pageX,e[i],this.option("rtlEnabled")),!r&&e[i+1]&&e[i+1].posVertical>e[i].posVertical&&(r=!0)),r)return e[i]}},_getEventListener(){const n=this.option("groupSelector"),e=this.$element();return n?e.find(n):e},_attachEventHandlers(){const n=this,e=n.option("itemSelector"),t=n.option("itemContainerSelector"),i=n.option("groupSelector"),r=n.option("sourceClass"),m=n.option("targetClass"),A=n.option("onDragging"),V=n.option("groupFilter");let X,ce,_e,Me,Ve,Je;const rt=n.$element();let Ct,Xt=null,On=-1;const Fn=function(){var oi;null===(oi=Xt)||void 0===oi||oi.dispose(),Xt=null};if(n._detachEventHandlers(),n.option("allowDragging")){const oi=n._getEventListener();L.A.on(oi,(0,N.b4)(ul.ni,"dxSortable"),e,Yt=>{X=(0,a.A)(Yt.currentTarget);const $t=X.closest(i);Je=$t.attr("group"),ce=function RQ(n,e){let t=-1;const i=e.get(0);return(0,w.__)(n,(r,m)=>{const A=(0,a.A)(m);if(A.attr("item-group")&&A.attr("item-group")===n.eq(r-1).attr("item-group")||(t+=1),m===i)return!1}),t===n.length?-1:t}((i?$t:rt).find(e),X),X.attr("item-group")&&(X=$t.find(`[item-group='${X.attr("item-group")}']`)),n._renderDraggable(X),_e=n._renderItem(X,"target").addClass(m),X.addClass(r),Ve=[],(0,w.__)(X,(xn,Gn)=>{Ve.push((0,a.A)(Gn).offset())}),Ct=function(){const xn=c.A.getRootNode(n.$element().get(0));return i?V?(0,a.A)(xn).find(i).filter(V):rt.find(i):rt}(),n._indicator=(0,a.A)("<div>").addClass("dx-position-indicator")}),L.A.on(oi,(0,N.b4)(ul.Cy,"dxSortable"),Yt=>{let $t,xn,Gn;if(!X)return;if(On=-1,n._indicator.detach(),(0,w.__)(n._$draggable,(Uo,zr)=>{(0,a.A)(zr).css({top:Ve[Uo].top+Yt.offset.y,left:Ve[Uo].left+Yt.offset.x})}),Me&&Me.removeClass(m),Me=function kQ(n,e){let t;return(0,w.__)(e,function(){(function PQ(n,e,t){const i=(0,a.A)(n),r=i.offset();if(e>=r.left&&e<=r.left+(0,D.Ot)(i,!0)&&t>=r.top&&t<=r.top+(0,D.P$)(i,!0))return!0})(this,n.pageX,n.pageY)&&(t=(0,a.A)(this))}),t}(Yt,Ct),Me&&function(){const Uo={sourceGroup:Je,sourceIndex:ce,sourceElement:X,targetGroup:Me.attr("group"),targetIndex:Me.find(e).index(_e)};A&&A(Uo),Uo.cancel&&(Me=void 0)}(),Me&&Xt&&Me.get(0)!==Xt.element().get(0)&&Fn(),Xt&&Xt.moveIfNeed(Yt),!Me)return void _e.detach();!Xt&&Me.attr("allow-scrolling")&&(Xt=function BQ(n){let e,t=n.scrollTop();const i=n.$element(),{top:r}=i.offset(),m=(0,D.Oq)(i);let A=0;function V(_e){t=_e.scrollOffset.top}function X(){ce(),n.scrollTo(t+=A),e=setTimeout(X,10)}function ce(){clearTimeout(e)}return n.on("scroll",V),{moveIfNeed:function(_e){if(_e.pageY<=r+20)A=-2;else{if(!(_e.pageY>=r+m-20))return A=0,void ce();A=2}X()},element:()=>i,dispose(){ce(),n.off("scroll",V)}}}(Me.dxScrollable("instance"))),Me.addClass(m);const qn=Me.find(t),ii=qn.find(e),qi=Me.closest(`.${y4}`).data("dxSortableOld"),ji=qi.option("useIndicator"),$i="vertical"===(qi||n).option("direction"),ho=function LQ(n,e,t){const i=[];let r=[];for(let m=0;m<n.length;m+=r.length)if(r=n.eq(m),r.attr("item-group")&&(r=t.find(`[item-group='${r.attr("item-group")}']`)),r.is(":visible")){const A={item:r,index:i.length,posVertical:e?(r.last().offset().top+r.offset().top+(0,D.P$)(r.last(),!0))/2:(0,D.P$)(r.last(),!0)+r.last().offset().top,posHorizontal:e?void 0:((0,D.Ot)(r.last(),!0)+r.last().offset().left+r.offset().left)/2};i.push(A)}return i}(ii,$i,qn),io=n._getItemOffset($i,ho,Yt);if(io){if($t=io.item,Gn=ho[io.index-1]&&ho[io.index-1].item,$t.hasClass(r)||Gn&&Gn.hasClass(r)&&Gn.is(":visible"))return void _e.detach();if(On=io.index,!ji)return void _e.insertBefore($t);const Uo=Me.attr("group")!==Je,zr=On===ce,Os=On===ce+1;if(Uo)return void n._renderIndicator($t,$i,Me,n.option("rtlEnabled")&&!$i);!zr&&!Os&&n._renderIndicator($t,$i,Me,n.option("rtlEnabled")&&!$i)}else{if(xn=ii.last(),xn.is(":visible")&&xn.hasClass(r))return;qn.length&&(On=ho.length?ho[ho.length-1].index+1:0),ji?ii.length&&n._renderIndicator(xn,$i,Me,!n.option("rtlEnabled")||$i):_e.appendTo(qn)}}),L.A.on(oi,(0,N.b4)(ul._N,"dxSortable"),()=>{if(Fn(),!X)return;const Yt=n.option("onChanged"),$t={sourceIndex:ce,sourceElement:X,sourceGroup:Je,targetIndex:On,removeSourceElement:!0,removeTargetElement:!1,removeSourceClass:!0};Me&&(Me.removeClass(m),$t.targetGroup=Me.attr("group"),(Je!==$t.targetGroup||On>-1)&&(Yt&&Yt($t),$t.removeSourceElement&&X.remove())),n._indicator.detach(),$t.removeSourceClass&&X.removeClass(r),X=null,n._$draggable.remove(),n._$draggable=null,$t.removeTargetElement&&_e.remove(),_e.removeClass(m),_e=null})}},_init(){this.callBase(),this._attachEventHandlers()},_render(){this.callBase(),this.$element().addClass(y4)},_dispose(){this.callBase.apply(this,arguments),this._$draggable&&this._$draggable.detach(),this._indicator&&this._indicator.detach()},_optionChanged(n){const e=this;switch(n.name){case"onDragging":case"onChanged":case"itemRender":case"groupSelector":case"itemSelector":case"itemContainerSelector":case"sourceClass":case"targetClass":case"dragClass":case"allowDragging":case"groupFilter":case"useIndicator":e._attachEventHandlers();break;case"direction":break;default:e.callBase(n)}},_useTemplates:()=>!1});(0,y.A)("dxSortableOld",b4);const NQ={Sortable:b4};function GQ(n,e){const t=function UQ(n,e){const t=n.hasClass(na.area.box),i=n.attr(zH.treeViewItem);return t?function VQ(n,e){const t=n.clone();return e===v4.targets.drag&&n.each((i,r)=>{const m=parseFloat((0,D.Ot)(r));return t.eq(i).css("width",m),!0}),t}(n,e):i?function FQ(n){return n.clone().addClass(na.area.box).css("width",parseFloat((0,D.Ot)(n)))}(n):function HQ(n){return(0,a.A)("<div>").addClass(na.area.field).addClass(na.area.box).text(n.text())}(n)}(n,e);return e===v4.targets.drag?function zQ(n){const e=(0,a.A)("<div>");return n.each((t,i)=>{const r=(0,a.A)("<div>").addClass(na.pivotGrid.fieldsContainer).addClass(na.widget).append((0,a.A)(i));return e.append(r),!0}),e.children()}(t):t}const{Sortable:$Q}=NQ;class jQ extends UG.$k{_getSearchExpr(e,t){return e.useDefaultSearchExpr=!0,super._getSearchExpr(e,t)}}function zG(n,e){let t=e;return(0,C.O9)(e.groupIndex)&&(t=n.getAreaFields(e.area,!0)[e.areaIndex]),t}function S4(n){return n=n||{},JSON.stringify([n.fields,n.columnExpandedPaths,n.rowExpandedPaths])}const XQ=(0,UG.v2)((0,AQ.A)((0,DQ.A)(Sl.A)));class WH extends XQ{_getDefaultOptions(){return(0,Lo.A)({},super._getDefaultOptions(),{allowFieldDragging:!0,applyChangesMode:"instantly",state:null,headerFilter:{width:252,height:325,allowSelectAll:!0,showRelevantValues:!1,search:{enabled:!1,timeout:500,editorOptions:{},mode:"contains"},texts:{emptyValue:Wn.A.format("dxDataGrid-headerFilterEmptyValue"),ok:Wn.A.format("dxDataGrid-headerFilterOK"),cancel:Wn.A.format("dxDataGrid-headerFilterCancel")}},remoteSort:!1})}_init(){super._init(),this._headerFilterView=new jQ(this),this._refreshDataSource(),this.subscribeToEvents(),hC.A.logHeaderFilterDeprecatedWarningIfNeed(this)}_refreshDataSource(){const e=this.option("dataSource");e&&e.fields&&e.load&&(this._dataSource=e)}_optionChanged(e){switch(e.name){case"dataSource":this._refreshDataSource();break;case"applyChangesMode":case"remoteSort":break;case"state":if(this._skipStateChange||!this._dataSource)break;"instantly"===this.option("applyChangesMode")&&S4(this._dataSource.state())!==S4(e.value)?this._dataSource.state(e.value):(this._clean(!0),this._renderComponent());break;case"headerFilter":case"allowFieldDragging":this._invalidate();break;default:super._optionChanged(e)}}renderField(e,t){const i=this,r=(0,a.A)("<div>").addClass(na.area.fieldContent).text(e.caption||e.dataField),m=(0,a.A)("<div>").addClass(na.area.field).addClass(na.area.box).data("field",e).append(r),A=zG(i._dataSource,e);return"data"!==e.area&&(e.allowSorting&&i._applyColumnState({name:"sort",rootElement:m,column:{alignment:i.option("rtlEnabled")?"right":"left",sortOrder:"desc"===e.sortOrder?"desc":"asc",allowSorting:e.allowSorting},showColumnLines:t}),i._applyColumnState({name:"headerFilter",rootElement:m,column:{alignment:i.option("rtlEnabled")?"right":"left",filterValues:A.filterValues,allowFiltering:A.allowFiltering&&!e.groupIndex,allowSorting:e.allowSorting},showColumnLines:t})),e.groupName&&m.attr(zH.itemGroup,e.groupName),m}_clean(e){}_render(){super._render(),this._headerFilterView.render(this.$element())}renderSortable(){const e=this;e._createComponent(e.$element(),$Q,(0,_.X)({allowDragging:e.option("allowFieldDragging"),itemSelector:`.${na.area.field}`,itemContainerSelector:`.${na.area.fieldContainer}`,groupSelector:`.${na.area.fieldList}`,groupFilter(){const t=e._dataSource,i=(0,a.A)(this).closest(".dx-sortable-old"),r=i.data("dxPivotGrid"),m=i.data("dxPivotGridFieldChooser");return r?r.getDataSource()===t:!!m&&m.option("dataSource")===t},itemRender:GQ,onDragging(t){const i=t.sourceElement.data("field"),{targetGroup:r}=t;t.cancel=!1,!0===i.isMeasure?("column"===r||"row"===r||"filter"===r)&&(t.cancel=!0):!1===i.isMeasure&&"data"===r&&(t.cancel=!0)},useIndicator:!0,onChanged(t){const i=t.sourceElement.data("field");if(t.removeSourceElement=!!t.sourceGroup,e._adjustSortableOnChangedArgs(t),i){const{targetIndex:r}=t;let m,A=0;e._processDemandState(V=>{const X=V.getAreaFields(i.area,!0);m=zG(V,i);const _e=X.filter(Me=>!1!==Me.visible)[r-1];_e&&(A=X.filter(Me=>!1===Me.visible&&Me.areaIndex<=_e.areaIndex).length)}),e._applyChanges([m],{area:t.targetGroup,areaIndex:r+A})}}},e._getSortableOptions()))}_processDemandState(e){const t=this,i="instantly"===t.option("applyChangesMode"),r=t._dataSource;if(i)e(r,i);else{const m=r.state(),A=t.option("state");A&&r.state(A,!0),e(r,i),r.state(m,!0)}}_applyChanges(e,t){const i=this;i._processDemandState((r,m)=>{e.forEach(A=>{let{index:V}=A;r.field(V,t)}),m?r.load():i._changedHandler()})}_applyLocalSortChanges(e,t){this._processDemandState(i=>{i.field(e,{sortOrder:t}),i.sortLocal()})}_adjustSortableOnChangedArgs(e){e.removeSourceElement=!1,e.removeTargetElement=!0,e.removeSourceClass=!1}_getSortableOptions(){return{direction:"auto"}}subscribeToEvents(e){const t=this;L.A.on(e||t.$element(),I.U,`.${na.area.field}.${na.area.box}`,function(r){const m=(0,a.A)(r.currentTarget).data("field"),A=(0,_.X)(!0,{},zG(t._dataSource,m)),V=(0,a.A)(r.target).hasClass(na.headerFilter),X=t._dataSource,ce=A.groupName?"tree":"list",_e=X.paginate()&&"list"===ce;if(V)t._headerFilterView.showHeaderFilterMenu((0,a.A)(r.currentTarget),(0,_.X)(A,{type:ce,encodeHtml:t.option("encodeHtml"),dataSource:{useDefaultSearch:!_e,load(Me){const{userData:Ve}=Me;if(Ve.store)return Ve.store.load(Me);const Je=new g.cY;return X.getFieldValues(A.index,t.option("headerFilter.showRelevantValues"),_e?Me:void 0).done(rt=>{const Ct=t.option("headerFilter.texts.emptyValue");rt.forEach(Xt=>{Xt.text||(Xt.text=Ct)}),_e?Je.resolve(rt):(Ve.store=new Ay.A(rt),Ve.store.load(Me).done(Je.resolve).fail(Je.reject))}).fail(Je.reject),Je},postProcess:Me=>(function(n,e){const t=[],i=!!e.groupName,r="exclude"===e.filterType;e.filterValues&&(0,w.__)(e.filterValues,(m,A)=>{t.push(Array.isArray(A)?A.join("/"):A&&A.valueOf())}),td(n,m=>{const A=m[0],V=Zu(m),X=i?(0,w.Tj)(m,_e=>_e.text).reverse().join("/"):A.text;A.value=i?V.slice(0):A.key||A.value;const ce=i?V.join("/"):A.value&&A.value.valueOf();A.children&&(A.items=A.children,A.children=null),(0,UG.NX)(A,A.key&&t.includes(X)||t.includes(ce),r)})}(Me,A),Me)},apply(){t._applyChanges([A],{filterValues:this.filterValues,filterType:this.filterType})}}));else if(m.allowSorting&&"data"!==m.area){const Me=t.option("remoteSort"),Ve="desc"===m.sortOrder?"asc":"desc";Me?t._applyChanges([m],{sortOrder:Ve}):t._applyLocalSortChanges(m.index,Ve)}})}_initTemplates(){}addWidgetPrefix(e){return`dx-pivotgrid-${e}`}}(0,y.A)("dxPivotGridFieldChooserBase",WH);const Yh="<div>",YQ=(0,gr.Vd)();function E4(n,e){const t=[];if(n.items)for(let i=0;i<n.items.length;i+=1)t.push.apply(t,E4(n.items[i],e));else(0,C.O9)(n.index)&&t.push(e[n.index]);return t}function GG(n,e){if(n.items)for(let t=0;t<n.items.length;t+=1){const i=GG(n.items[t],e);if(i)return i}if(e(n))return n}const O4=[function(n,e){return+!!e.isMeasure-!!n.isMeasure},function(n,e){return+!(!e.items||!e.items.length)-!(!n.items||!n.items.length)},function(n,e){return+!!(!1===n.isMeasure&&n.field&&n.field.levels&&n.field.levels.length)-!!(!1===e.isMeasure&&e.field&&e.field.levels&&e.field.levels.length)},Iy(n=>n.text)];function ZQ(n,e){let t=0,i=0;for(;!t&&O4[i];)t=O4[i++](n,e);return t}function w4(n){return n.find(`.${na.scrollable.self}`).dxScrollable("instance")}class WG extends WH{_getDefaultOptions(){return(0,Lo.A)({},super._getDefaultOptions(),{height:400,layout:0,dataSource:null,encodeHtml:!0,onContextMenuPreparing:null,allowSearch:!1,searchTimeout:500,texts:{columnFields:Wn.A.format("dxPivotGrid-columnFields"),rowFields:Wn.A.format("dxPivotGrid-rowFields"),dataFields:Wn.A.format("dxPivotGrid-dataFields"),filterFields:Wn.A.format("dxPivotGrid-filterFields"),allFields:Wn.A.format("dxPivotGrid-allFields")}})}_refreshDataSource(){const e=this;e._expandedPaths=[],e._changedHandler=e._changedHandler||function(){(0,w.__)(e._dataChangedHandlers,(t,i)=>{i()}),e._fireContentReadyAction(),e._skipStateChange=!0,e.option("state",e._dataSource.state()),e._skipStateChange=!1},e._disposeDataSource(),super._refreshDataSource(),e._dataSource&&e._dataSource.on("changed",e._changedHandler)}_disposeDataSource(){const e=this,t=e._dataSource;t&&(t.off("changed",e._changedHandler),e._dataSource=void 0)}_dispose(){this._disposeDataSource(),super._dispose.apply(this,arguments)}_init(){super._init(),this._refreshDataSource(),this._dataChangedHandlers=[],this._initActions()}_initActions(){this._actions={onContextMenuPreparing:this._createActionByOption("onContextMenuPreparing")}}_trigger(e,t){this._actions[e](t)}_setOptionsByReference(){super._setOptionsByReference(),(0,_.X)(this._optionsByReference,{dataSource:!0})}_optionChanged(e){const t=this;switch(e.name){case"dataSource":t._refreshDataSource(),t._invalidate();break;case"layout":case"texts":case"allowSearch":case"searchTimeout":case"encodeHtml":t._invalidate();break;case"onContextMenuPreparing":t._actions[e.name]=t._createActionByOption(e.name);break;default:super._optionChanged(e)}}_clean(e){!e&&this._dataSource&&this.option("state",this._dataSource.state()),this.$element().children(`.${na.fieldChooser.container}`).remove()}_renderLayout0(e){e.addClass(na.layout.zero);const t=(0,a.A)(Yh).addClass(na.row).appendTo(e),i=(0,a.A)(Yh).addClass(na.row).appendTo(e),r=(0,a.A)(Yh).addClass(na.col).appendTo(t),m=(0,a.A)(Yh).addClass(na.col).appendTo(t),A=(0,a.A)(Yh).addClass(na.col).appendTo(i),V=(0,a.A)(Yh).addClass(na.col).appendTo(i);this._renderArea(r,"all"),this._renderArea(m,"row"),this._renderArea(m,"column"),this._renderArea(A,"filter"),this._renderArea(V,"data")}_renderLayout1(e){const t=(0,a.A)(Yh).addClass(na.col).appendTo(e),i=(0,a.A)(Yh).addClass(na.col).appendTo(e);this._renderArea(t,"all"),this._renderArea(i,"filter"),this._renderArea(i,"row"),this._renderArea(i,"column"),this._renderArea(i,"data")}_renderLayout2(e){e.addClass(na.layout.second);const t=(0,a.A)(Yh).addClass(na.row).appendTo(e);this._renderArea(t,"all");const i=(0,a.A)(Yh).addClass(na.row).appendTo(e),r=(0,a.A)(Yh).addClass(na.col).appendTo(i),m=(0,a.A)(Yh).addClass(na.col).appendTo(i);this._renderArea(r,"filter"),this._renderArea(r,"row"),this._renderArea(m,"column"),this._renderArea(m,"data")}_initMarkup(){const e=this,t=this.$element(),i=(0,a.A)(Yh).addClass(na.fieldChooser.container).appendTo(t),r=e.option("layout");super._initMarkup(),t.addClass(na.fieldChooser.self).addClass(na.pivotGrid.fieldsContainer),e._dataChangedHandlers=[];const m=this._dataSource,A="instantly"!==e.option("applyChangesMode")&&m&&m.state();A&&e.option("state")&&m.state(e.option("state"),!0),0===r?e._renderLayout0(i):1===r?e._renderLayout1(i):e._renderLayout2(i),A&&m.state(A,!0)}_renderContentImpl(){super._renderContentImpl(),this.renderSortable(),this._renderContextMenu(),this.updateDimensions()}_fireContentReadyAction(){(!this._dataSource||!this._dataSource.isLoading())&&super._fireContentReadyAction()}_getContextMenuArgs(e){const t=(0,a.A)(e.target).closest(`.${na.area.field}`),i=(0,a.A)(e.target).closest(`.${na.area.fieldList}`);let r,m;if(t.length){const A=t.data("field");A&&(r=this.getDataSource().field(A.index)||A)}return i.length&&(m=i.attr("group")),{event:e,field:r,area:m,items:[]}}_renderContextMenu(){const e=this,t=e.$element();e._contextMenu&&e._contextMenu.$element().remove(),e._contextMenu=e._createComponent((0,a.A)(Yh).appendTo(t),H_.A,{onPositioning(i){const{event:r}=i;if(!r)return;const m=e._getContextMenuArgs(r);e._trigger("onContextMenuPreparing",m),m.items&&m.items.length?i.component.option("items",m.items):i.cancel=!0},target:t,onItemClick(i){i.itemData.onItemClick&&i.itemData.onItemClick(i)},cssClass:na.fieldChooser.contextMenu})}_createTreeItems(e,t,i){const r=this;let m,A=[];const V=[],X=t[0],ce={};return X?((0,w.__)(e,(_e,Me)=>{const Ve=Me[X]||"";ce[Ve]=ce[Ve]||[],ce[Ve].push(Me),void 0===m&&(m=!0),m=m&&!0===Me.isMeasure}),(0,w.__)(ce,(_e,Me)=>{const Ve=i?`${i}.${_e}`:_e,Je=r._createTreeItems(Me,t.slice(1),Ve);_e?V.push({key:_e,text:_e,path:Ve,isMeasure:Je.isMeasure,expanded:r._expandedPaths.includes(Ve),items:Je}):A=Je}),A=V.concat(A),A.isMeasure=m):(0,w.__)(e,(_e,Me)=>{let Ve;!0===Me.isMeasure&&(Ve=GH.measure),!1===Me.isMeasure&&(Ve=Me.groupName?GH.hierarchy:GH.dimension),A.push({index:Me.index,field:Me,key:Me.dataField,selected:(0,C.O9)(Me.area),text:Me.caption||Me.dataField,icon:Ve,isMeasure:Me.isMeasure,isDefault:Me.isDefault})}),A}_createFieldsDataSource(e){let t=e&&e.fields()||[];t=t.filter(r=>!1!==r.visible&&!(0,C.O9)(r.groupIndex));const i=this._createTreeItems(t,["dimension","displayFolder"]);return Ox(i,r=>{r.sort(ZQ)},0,"items"),i}_renderFieldsTreeView(e){const t=this,i=t._dataSource,r=t._createComponent(e,CF.A,{dataSource:t._createFieldsDataSource(i),showCheckBoxesMode:"normal",expandNodesRecursive:!1,searchEnabled:t.option("allowSearch"),searchTimeout:t.option("searchTimeout"),useNativeScrolling:!1,itemTemplate(m,A,V){const X=(0,a.A)("<div>").toggleClass(na.area.field,!m.items).attr(zH.treeViewItem,!0).data("field",m.field).appendTo(V);var ce;m.icon&&(null===(ce=(0,x.N)(m.icon))||void 0===ce||ce.appendTo(X)),(0,a.A)("<span>").text(m.text).appendTo(X)},onItemCollapsed(m){const A=t._expandedPaths.indexOf(m.itemData.path);A>=0&&t._expandedPaths.splice(A,1)},onItemExpanded(m){t._expandedPaths.indexOf(m.itemData.path)<0&&t._expandedPaths.push(m.itemData.path)},onItemSelectionChanged(m){const A=m.itemData;let V,X,_e,ce=!0;if(A.items){if(A.selected)return void r.unselectItem(A);if(t._processDemandState(()=>{X=E4(A,i.fields());for(let Me=0;Me<X.length;Me+=1)if(X[Me].area){ce=!1;break}}),ce){const Me=GG(A,Ve=>Ve.isDefault)||GG(A,Ve=>(0,C.O9)(Ve.index));return void(Me&&r.selectItem(Me))}}else V=i.fields()[A.index],A.selected&&(_e=V.isMeasure?"data":"column"),V&&(X=[V]);t._applyChanges(X,{area:_e,areaIndex:void 0})}});t._dataChangedHandlers.push(function(){let m=w4(e);const A=m?m.scrollTop():0;r.option({dataSource:t._createFieldsDataSource(i)}),m=w4(e),m&&(m.scrollTo({y:A}),m.update())})}_renderAreaFields(e,t){const i=this,r=i._dataSource,m=r?(0,_.X)(!0,[],r.getAreaFields(t,!0)):[];e.empty(),(0,w.__)(m,(A,V)=>{!1!==V.visible&&i.renderField(V,!0).appendTo(e)})}_renderArea(e,t){const i=this,r=(0,a.A)(Yh).addClass(na.area.self).appendTo(e),m=(0,a.A)(Yh).addClass(na.area.fieldListHeader).appendTo(r),A=i.option(`texts.${t}Fields`);let V,X;(0,a.A)("<span>").addClass(na.area.icon).addClass(`dx-icon-${GH[t]}`).appendTo(m),(0,a.A)("<span>").html("&nbsp;").appendTo(m),(0,a.A)("<span>").addClass(na.area.caption).text(A).appendTo(m);const ce=(0,a.A)(Yh).addClass(na.area.fieldList).addClass(na.pivotGrid.dragAction).appendTo(r);"all"!==t?(ce.attr("group",t).attr(zH.allowScrolling,!0),V=(0,a.A)(Yh).addClass(na.area.fieldContainer).appendTo(ce),X=function(){i._renderAreaFields(V,t)},i._dataChangedHandlers.push(X),X(),ce.dxScrollable({useNative:!1})):(r.addClass(na.allFields),ce.addClass(na.treeView.borderVisible),i._renderFieldsTreeView(ce))}_getSortableOptions(){return{direction:""}}_adjustSortableOnChangedArgs(){}resetTreeView(){const e=this.$element().find(`.${na.treeView.self}`).dxTreeView("instance");e&&(e.option("searchValue",""),e.collapseAll())}applyChanges(){const e=this.option("state");(0,C.O9)(e)&&this._dataSource.state(e)}cancelChanges(){const e=this._dataSource;return!e.isLoading()&&(this.option("state",e.state()),!0)}getDataSource(){return this._dataSource}updateDimensions(){this.$element().find(`.${na.area.self} .${na.scrollable.self}`).dxScrollable("update")}_visibilityChanged(e){e&&YQ&&this.updateDimensions()}}(0,y.A)("dxPivotGridFieldChooser",WG);const Ak="<div>",tV=FH.inherit({ctor(n,e){this.callBase(n),this._area=e},_getAreaName:()=>"fields",_createGroupElement(){return(0,a.A)(Ak).addClass("dx-pivotgrid-fields-area").addClass("dx-area-fields").addClass("dx-pivotgrid-drag-action").attr("group",this._area)},isVisible(){return!!this.option("fieldPanel.visible")&&this.option(`fieldPanel.show${Ch(this._area)}Fields`)},_renderButton(n){const e=this,t=(0,a.A)("<td>").appendTo((0,a.A)("<tr>").appendTo(n));e.component._createComponent((0,a.A)(Ak).appendTo(t),uC.A,{text:"Fields",icon:"menu",width:"auto",onClick(){const r=e.tableElement().find(".dx-fields-area-popup").dxPopup("instance");r.option("visible")||r.show()}}).$element().addClass("dx-pivotgrid-fields-area-hamburger")},_getPopupOptions:(n,e)=>({contentTemplate:()=>(0,a.A)("<table>").addClass("dx-area-field-container").append((0,a.A)("<thead>").addClass("dx-pivotgrid-fields-area-head").append(n)),height:"auto",width:"auto",position:{at:"left",my:"left",of:e},dragEnabled:!1,animation:{show:{type:"pop",duration:200}},shading:!1,showTitle:!1,hideOnOutsideClick:!0,container:e.parent()}),_renderPopup(n,e){const t=this,i=n.find(".dx-button"),r=t._getPopupOptions(e,i),m=t.component.$element().dxPivotGridFieldChooserBase("instance");t._rowPopup&&t._rowPopup.$element().remove(),t._rowPopup=t.component._createComponent((0,a.A)(Ak).appendTo(n),bg.A,r),t._rowPopup.$element().addClass("dx-fields-area-popup"),t._rowPopup.content().addClass("dx-pivotgrid-fields-container"),t._rowPopup.content().parent().attr("group","row"),m.subscribeToEvents(t._rowPopup.content()),m.renderSortable(t._rowPopup.content())},_shouldCreateButton:()=>!1,_renderTableContent(n,e){const t=this,i=this.groupElement(),r=this.isVisible(),m=t.component.$element().dxPivotGridFieldChooserBase("instance"),A=(0,a.A)("<thead>").addClass("dx-pivotgrid-fields-area-head").appendTo(n),V=t._area,X=(0,a.A)("<tr>");i.toggleClass("dx-hidden",!r),n.addClass("dx-area-field-container"),r&&((0,w.__)(e,(ce,_e)=>{if(_e.area===V&&!1!==_e.visible){const Me=(0,a.A)("<td>").append(m.renderField(_e,"row"===_e.area)),Ve=Me.find(".dx-column-indicators");Ve.length&&t._shouldCreateButton()&&Ve.insertAfter(Ve.next()),Me.appendTo(X),function JQ(n,e,t,i){t&&t.groupName&&t.groupName===n.groupName&&(0,a.A)(Ak).addClass("dx-group-connector").addClass("dx-group-connector-prev").appendTo(i),e&&e.groupName&&e.groupName===n.groupName&&(0,a.A)(Ak).addClass("dx-group-connector").addClass("dx-group-connector-next").appendTo(i)}(_e,e[ce+1],e[ce-1],Me)}}),X.children().length||(0,a.A)("<td>").append((0,a.A)(Ak).addClass("dx-empty-area-text").text(this.option(`fieldPanel.texts.${V}FieldArea`))).appendTo(X),t._shouldCreateButton()?(t._renderButton(A),t._renderPopup(n,X)):A.append(X))},setGroupWidth(n){(0,JF.zj)(this.groupElement(),n)},setGroupHeight(n){(0,JF.k$)(this.groupElement(),n)},reset(){this.callBase(),this.groupElement().css("marginTop",0)},_renderVirtualContent:h.lQ});var nV=M(4602);const T4=!!nV.A.IS_RENOVATED_WIDGET;function D4(n,e){if(e){const{data:t}=n.data(),{rowIndex:i}=e.parentNode,{cellIndex:r}=e;return t[i]&&t[i][r]&&t[i][r].path}}const A4=FH.inherit({ctor(n){this.callBase(n),this._scrollBarWidth=0},_getAreaName:()=>"column",_getAreaClassName:()=>"dx-pivotgrid-horizontal-headers",_createGroupElement(){return(0,a.A)("<div>").addClass(this._getAreaClassName()).addClass("dx-pivotgrid-area")},_applyCustomStyles(n){const{cssArray:e}=n,{cell:t}=n,{rowsCount:i}=n,{classArray:r}=n;n.cellIndex===n.cellsCount-1&&e.push((n.rtlEnabled?"border-left:":"border-right:")+"0px"),(t.rowspan===i-n.rowIndex||n.rowIndex+1===i)&&e.push("border-bottom-width:0px"),("T"===t.type||"GT"===t.type)&&r.push("dx-row-total"),"T"===n.cell.type&&r.push("dx-total"),"GT"===n.cell.type&&r.push("dx-grandtotal"),(0,C.O9)(t.expanded)&&r.push(t.expanded?"dx-pivotgrid-expanded":"dx-pivotgrid-collapsed"),this.callBase(n)},_getMainElementMarkup(){const n=c.A.createElement("thead");return n.setAttribute("class",this._getAreaClassName()),n},_getCloseMainElementMarkup:()=>"</thead>",setVirtualContentParams(n){this.callBase(n),this._setTableCss({left:n.left,top:0}),this._virtualContentWidth=n.width},hasScroll(){const n=this._virtualContent?this._virtualContentWidth:this._tableWidth,e=this.getGroupWidth();return!(!e||!n)&&n-e>=1},renderScrollable(){this._groupElement.dxScrollable({useNative:!1,useSimulatedScrollbar:!1,showScrollbar:"never",bounceEnabled:!1,direction:"horizontal",rtlEnabled:!!T4&&this.component.option("rtlEnabled"),updateManually:!0})},updateScrollableOptions(n){let{rtlEnabled:e}=n;const t=this._getScrollable();T4&&t.option({rtlEnabled:e})},processScrollBarSpacing(n){const e=this.option("rtlEnabled")?"right":"left",t=this.getGroupWidth();t&&this.setGroupWidth(t-n),this._scrollBarWidth&&this._groupElement.next().remove(),this._groupElement.toggleClass("dx-vertical-scroll",n>0),(0,D.zj)(this._groupElement.css("float",e),this.getGroupHeight()),this._scrollBarWidth=n},getScrollPath(n){const e=this.tableElement();let t;return n-=parseInt(e[0].style.left,10)||0,(0,w.__)(e.find("td"),(i,r)=>{if(1===r.colSpan&&r.offsetLeft<=n&&r.offsetWidth+r.offsetLeft>n)return t=r,!1}),D4(e,t)},_moveFakeTable(n){this._moveFakeTableHorizontally(n),this.callBase()}}),tJ=A4.inherit({_getAreaClassName:()=>"dx-pivotgrid-vertical-headers",_applyCustomStyles(n){this.callBase(n),n.cellIndex===n.cellsCount-1&&n.classArray.push("dx-last-cell"),n.rowIndex===n.rowsCount-1&&n.cssArray.push("border-bottom: 0px"),n.cell.isWhiteSpace&&n.classArray.push("dx-white-space-column")},_getAreaName:()=>"row",setVirtualContentParams(n){this.callBase(n),this._setTableCss({top:n.top,left:0}),this._virtualContentHeight=n.height},hasScroll(){const n=this._virtualContent?this._virtualContentHeight:this._tableHeight,e=this.getGroupHeight();return!(!e||!n)&&n-e>=1},renderScrollable(){this._groupElement.dxScrollable({useNative:!1,useSimulatedScrollbar:!1,showScrollbar:"never",bounceEnabled:!1,direction:"vertical",updateManually:!0})},processScrollBarSpacing(n){const e=this.getGroupHeight();if(e&&this.setGroupHeight(e-n),this._scrollBarWidth&&this._groupElement.next().remove(),n){const t=(0,a.A)("<div>");(0,D.zj)(t,"100%"),(0,D.k$)(t,n-1),this._groupElement.after(t)}this._scrollBarWidth=n},getScrollPath(n){const e=this.tableElement();let t;return n-=parseInt(e[0].style.top,10)||0,(0,w.__)(e.find("tr"),(i,r)=>{const m=r.childNodes[r.childNodes.length-1];if(m&&1===m.rowSpan&&m.offsetTop<=n&&m.offsetHeight+m.offsetTop>n)return t=m,!1}),D4(e,t)},_moveFakeTable(n){this._moveFakeTableTop(n),this.callBase()},_getRowClassNames(n,e,t){0!==n&e.expanded&&!t.includes("dx-expand-border")&&t.push("dx-expand-border")},_getMainElementMarkup(){const n=c.A.createElement("tbody");return n.classList.add(this._getAreaClassName()),n},_getCloseMainElementMarkup:()=>"</tbody>",updateColspans(n){const{rows:e}=this.tableElement()[0];let t=0;const i=[];if(!(this.getColumnsCount()-n>0))for(let r=0;r<e.length;r+=1)for(let m=0;m<e[r].cells.length;m+=1){const A=e[r].cells[m],{rowSpan:V}=A;i[r]&&(t-=i[r],i[r]=0);const X=n-(t+A.colSpan);m===e[r].cells.length-1&&X>0&&(A.colSpan+=X),i[r+V]=(i[r+V]||0)+A.colSpan,t+=A.colSpan}}}),I4={HorizontalHeadersArea:A4,VerticalHeadersArea:tJ},P4=(0,gr.zk)(),M4="dx-pivotgrid-border",R4="dx-area-fields",$H="<tr>",Ik="<td>",qI="<div>",k4=["allowSorting","allowSortingBySummary","allowFiltering","allowExpandAll"];function $G(n){let e=0;return(0,w.__)(n,(t,i)=>{e+=i||0}),e}function jG(n,e){const t=e/n.length;for(let i=0;i<n.length;i+=1)n[i]-=t}function L4(n){n.off("scroll").off("stop")}function B4(n,e){const t="width"===e?["borderLeftWidth","borderRightWidth"]:["borderTopWidth","borderBottomWidth"];let i=0;return(0,w.__)(n,(r,m)=>{const A=P4.getComputedStyle(m.get(0));t.forEach(V=>{i+=parseFloat(A[V])||0})}),i}const N4=Sl.A.inherit({_getDefaultOptions(){return(0,_.X)(this.callBase(),{scrolling:{timeout:300,renderingThreshold:150,minTimeout:10,mode:"standard",useNative:"auto",removeInvisiblePages:!0,virtualRowHeight:50,virtualColumnWidth:100,loadTwoPagesOnStart:!0},encodeHtml:!0,dataSource:null,activeStateEnabled:!1,fieldChooser:{minWidth:250,minHeight:250,enabled:!0,allowSearch:!1,searchTimeout:500,layout:0,title:Wn.A.format("dxPivotGrid-fieldChooserTitle"),width:600,height:600,applyChangesMode:"instantly"},onContextMenuPreparing:null,allowSorting:!1,allowSortingBySummary:!1,allowFiltering:!1,allowExpandAll:!1,wordWrapEnabled:!0,fieldPanel:{showColumnFields:!0,showFilterFields:!0,showDataFields:!0,showRowFields:!0,allowFieldDragging:!0,visible:!1,texts:{columnFieldArea:Wn.A.format("dxPivotGrid-columnFieldArea"),rowFieldArea:Wn.A.format("dxPivotGrid-rowFieldArea"),filterFieldArea:Wn.A.format("dxPivotGrid-filterFieldArea"),dataFieldArea:Wn.A.format("dxPivotGrid-dataFieldArea")}},dataFieldArea:"column",export:{enabled:!1,fileName:"PivotGrid"},showRowTotals:!0,showRowGrandTotals:!0,showColumnTotals:!0,showColumnGrandTotals:!0,hideEmptySummaryCells:!0,showTotalsPrior:"none",rowHeaderLayout:"standard",loadPanel:{enabled:!0,text:Wn.A.format("Loading"),width:200,height:70,showIndicator:!0,indicatorSrc:"",showPane:!0},texts:{grandTotal:Wn.A.format("dxPivotGrid-grandTotal"),total:Wn.A.getFormatter("dxPivotGrid-total"),noData:Wn.A.format("dxDataGrid-noDataText"),showFieldChooser:Wn.A.format("dxPivotGrid-showFieldChooser"),expandAll:Wn.A.format("dxPivotGrid-expandAll"),collapseAll:Wn.A.format("dxPivotGrid-collapseAll"),sortColumnBySummary:Wn.A.getFormatter("dxPivotGrid-sortColumnBySummary"),sortRowBySummary:Wn.A.getFormatter("dxPivotGrid-sortRowBySummary"),removeAllSorting:Wn.A.format("dxPivotGrid-removeAllSorting"),exportToExcel:Wn.A.format("dxDataGrid-exportToExcel"),dataNotAvailable:Wn.A.format("dxPivotGrid-dataNotAvailable")},onCellClick:null,onCellPrepared:null,showBorders:!1,stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3},onExpandValueChanging:null,renderCellCountLimit:2e4,onExporting:null,headerFilter:{width:252,height:325,allowSelectAll:!0,showRelevantValues:!1,search:{enabled:!1,timeout:500,editorOptions:{},mode:"contains"},texts:{emptyValue:Wn.A.format("dxDataGrid-headerFilterEmptyValue"),ok:Wn.A.format("dxDataGrid-headerFilterOK"),cancel:Wn.A.format("dxDataGrid-headerFilterCancel")}}})},_updateCalculatedOptions(n){const e=this;(0,w.__)(n,(t,i)=>{(0,w.__)(k4,(r,m)=>{(void 0===i[m]||i._initProperties&&m in i._initProperties&&void 0===i._initProperties[m])&&If(i,m,e.option(m))})})},_getDataControllerOptions(){const n=this;return{component:n,dataSource:n.option("dataSource"),texts:n.option("texts"),showRowTotals:n.option("showRowTotals"),showRowGrandTotals:n.option("showRowGrandTotals"),showColumnTotals:n.option("showColumnTotals"),showTotalsPrior:n.option("showTotalsPrior"),showColumnGrandTotals:n.option("showColumnGrandTotals"),dataFieldArea:n.option("dataFieldArea"),rowHeaderLayout:n.option("rowHeaderLayout"),hideEmptySummaryCells:n.option("hideEmptySummaryCells"),onFieldsPrepared(e){n._updateCalculatedOptions(e)}}},_initDataController(){const n=this;n._dataController&&n._dataController.dispose(),n._dataController=new wQ.DataController(n._getDataControllerOptions()),(0,gr.Vd)()&&n._dataController.changed.add(()=>{n._render()}),n._dataController.scrollChanged.add(t=>{n._scrollLeft=t.left,n._scrollTop=t.top}),n._dataController.loadingChanged.add(()=>{n._updateLoading()}),n._dataController.progressChanged.add(n._updateLoading.bind(n)),n._dataController.dataSourceChanged.add(()=>{n._trigger("onChanged")});const e=n.option("onExpandValueChanging");e&&n._dataController.expandValueChanging.add(t=>{e(t)})},_init(){this.callBase(),this._initDataController(),hC.A.logHeaderFilterDeprecatedWarningIfNeed(this),this._scrollLeft=this._scrollTop=null,this._initActions()},_initActions(){this._actions={onChanged:this._createActionByOption("onChanged"),onContextMenuPreparing:this._createActionByOption("onContextMenuPreparing"),onCellClick:this._createActionByOption("onCellClick"),onExporting:this._createActionByOption("onExporting"),onCellPrepared:this._createActionByOption("onCellPrepared")}},_trigger(n,e){this._actions[n](e)},_optionChanged(n){const e=this;if(k4.includes(n.name)){const t=this.getDataSource().fields();this._updateCalculatedOptions(t)}switch(n.name){case"dataSource":case"allowSorting":case"allowFiltering":case"allowExpandAll":case"allowSortingBySummary":case"scrolling":case"stateStoring":e._initDataController(),e._fieldChooserPopup.hide(),e._renderFieldChooser(),e._invalidate();break;case"texts":case"showTotalsPrior":case"showRowTotals":case"showRowGrandTotals":case"showColumnTotals":case"showColumnGrandTotals":case"hideEmptySummaryCells":case"dataFieldArea":e._dataController.updateViewOptions(e._getDataControllerOptions());break;case"useNativeScrolling":case"encodeHtml":case"renderCellCountLimit":case"onExpandValueChanging":break;case"rtlEnabled":e.callBase(n),e._renderFieldChooser(),e._renderContextMenu(),(0,gr.Vd)()&&e._renderLoadPanel(e._dataArea.groupElement(),e.$element()),e._invalidate();break;case"export":e._renderDescriptionArea();break;case"onCellClick":case"onContextMenuPreparing":case"onExporting":case"onExported":case"onFileSaving":case"onCellPrepared":e._actions[n.name]=e._createActionByOption(n.name);break;case"fieldChooser":e._renderFieldChooser(),e._renderDescriptionArea();break;case"loadPanel":(0,gr.Vd)()&&("loadPanel.enabled"===n.fullName?(clearTimeout(this._hideLoadingTimeoutID),e._renderLoadPanel(e._dataArea.groupElement(),e.$element())):(e._renderLoadPanel(e._dataArea.groupElement(),e.$element()),e._invalidate()));break;case"fieldPanel":e._renderDescriptionArea(),e._invalidate();break;case"headerFilter":e._renderFieldChooser(),e._invalidate();break;case"showBorders":e._tableElement().toggleClass(M4,!!n.value),e.updateDimensions();break;case"wordWrapEnabled":e._tableElement().toggleClass("dx-word-wrap",!!n.value),e.updateDimensions();break;case"rowHeaderLayout":e._tableElement().find(".dx-area-row-cell").toggleClass("dx-area-tree-view","tree"===n.value),e._dataController.updateViewOptions(e._getDataControllerOptions());break;case"height":case"width":e._hasHeight=null,e.callBase(n),e.resize();break;default:e.callBase(n)}},_updateScrollPosition(n,e,t){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=this;let m,A;const V=r._scrollTop||r._scrollLeft;r._scrollUpdating||(r._scrollUpdating=!0,e&&!e.hasScroll()&&r._hasHeight&&(r._scrollTop=null),n&&!n.hasScroll()&&(r._scrollLeft=null),(null!==r._scrollTop||null!==r._scrollLeft||V||r.option("rtlEnabled"))&&(m=r._scrollTop||0,A=r._scrollLeft||0,t.scrollTo({left:A,top:m},i),n.scrollTo({left:A},i),e.scrollTo({top:m},i),r._dataController.updateWindowScrollPosition(r._scrollTop)),r._scrollUpdating=!1)},_subscribeToEvents(n,e,t){const i=this;(0,w.__)([n,e,t],(r,m)=>{!function iJ(n,e){L4(n),n.on("scroll",e).on("stop",e)}(m,A=>function(V,X){const{scrollOffset:ce}=V,_e=X._getScrollable(),Me="vertical"!==_e.option("direction")?ce.left:i._scrollLeft,Ve="horizontal"!==_e.option("direction")&&i._hasHeight?ce.top:i._scrollTop;((i._scrollLeft||0)!==(Me||0)||(i._scrollTop||0)!==(Ve||0))&&(i._scrollLeft=Me,i._scrollTop=Ve,i._updateScrollPosition(n,e,t),"virtual"===i.option("scrolling.mode")&&i._dataController.setViewportPosition(i._scrollLeft,i._scrollTop))}(A,m))}),!i._hasHeight&&i._dataController.subscribeToWindowScrollEvents(t.groupElement())},_clean:h.lQ,_needDelayResizing(n){return n.length*(n.length?n[0].length:0)>this.option("renderCellCountLimit")},_renderFieldChooser(){const n=this,e=n._pivotGridContainer,t=n.option("fieldChooser")||{},i="onDemand"===t.applyChangesMode?[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:Wn.A.format("OK"),onClick(){n._fieldChooserPopup.$content().dxPivotGridFieldChooser("applyChanges"),n._fieldChooserPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:Wn.A.format("Cancel"),onClick(){n._fieldChooserPopup.hide()}}}]:[],r={layout:t.layout,texts:t.texts||{},dataSource:n.getDataSource(),allowSearch:t.allowSearch,searchTimeout:t.searchTimeout,width:void 0,height:void 0,headerFilter:n.option("headerFilter"),encodeHtml:n.option("fieldChooser.encodeHtml")??n.option("encodeHtml"),applyChangesMode:t.applyChangesMode,onContextMenuPreparing(A){n._trigger("onContextMenuPreparing",A)}},m={shading:!1,title:t.title,width:t.width,height:t.height,showCloseButton:!0,resizeEnabled:!0,minWidth:t.minWidth,minHeight:t.minHeight,toolbarItems:i,onResize(A){A.component.$content().dxPivotGridFieldChooser("updateDimensions")},onShown(A){n._createComponent(A.component.content(),WG,r)},onHidden(A){const V=A.component.$content().dxPivotGridFieldChooser("instance");V.resetTreeView(),V.cancelChanges()}};n._fieldChooserPopup?(n._fieldChooserPopup.option(m),n._fieldChooserPopup.$content().dxPivotGridFieldChooser(r)):n._fieldChooserPopup=n._createComponent((0,a.A)(qI).addClass("dx-fieldchooser-popup").appendTo(e),bg.A,m)},_renderContextMenu(){const n=this,e=n._pivotGridContainer;n._contextMenu&&n._contextMenu.$element().remove(),n._contextMenu=n._createComponent((0,a.A)(qI).appendTo(e),H_.A,{onPositioning(t){const{event:i}=t;if(t.cancel=!0,!i)return;const r=i.target.cellIndex>=0?i.target:(0,a.A)(i.target).closest("td").get(0);if(!r)return;const m=n._createEventArgs(r,i),A=n._getContextMenuItems(m);A&&(t.component.option("items",A),t.cancel=!1)},onItemClick(t){t.itemData.onItemClick&&t.itemData.onItemClick(t)},cssClass:"dx-pivotgrid",target:n.$element()})},_getContextMenuItems(n){const e=this;let t=[];const i=e.option("texts");if("row"===n.area||"column"===n.area){const m=n["column"===n.area?"rowFields":"columnFields"],A=n.cell.path&&n[`${n.area}Fields`][n.cell.path.length-1],V=e.getDataSource();if(A&&A.allowExpandAll&&n.cell.path.length<n[`${n.area}Fields`].length&&!V.paginate()&&(t.push({beginGroup:!0,icon:"none",text:i.expandAll,onItemClick(){V.expandAll(A.index)}}),t.push({text:i.collapseAll,icon:"none",onItemClick(){V.collapseAll(A.index)}})),n.cell.isLast&&!V.paginate()){let X=0;(0,w.__)(m,(ce,_e)=>{_e.allowSortingBySummary&&(0,w.__)(n.dataFields,(Me,Ve)=>{if((0,C.O9)(n.cell.dataIndex)&&n.cell.dataIndex!==Me)return;const Je=!(0,C.O9)(n.cell.dataIndex)&&n.dataFields.length>1,rt="column"===n.area?i.sortColumnBySummary:i.sortRowBySummary,Ct=lC(n.dataFields,_e.sortBySummaryField)===Me&&(n.cell.path||[]).join("/")===(_e.sortBySummaryPath||[]).join("/"),Xt=(0,Ea.GP)(rt,Je?`${_e.caption} - ${Ve.caption}`:_e.caption);t.push({beginGroup:0===X,icon:Ct?"desc"===_e.sortOrder?"sortdowntext":"sortuptext":"none",text:Xt,onItemClick(){V.field(_e.index,{sortBySummaryField:Ve.name||Ve.caption||Ve.dataField,sortBySummaryPath:n.cell.path,sortOrder:"desc"===_e.sortOrder?"asc":"desc"}),V.load()}}),X+=1})}),(0,w.__)(m,(ce,_e)=>{if(_e.allowSortingBySummary&&(0,C.O9)(_e.sortBySummaryField))return t.push({beginGroup:0===X,icon:"none",text:i.removeAllSorting,onItemClick(){(0,w.__)(m,(Me,Ve)=>{V.field(Ve.index,{sortBySummaryField:void 0,sortBySummaryPath:void 0,sortOrder:void 0})}),V.load()}}),!1})}}if(e.option("fieldChooser.enabled")&&t.push({beginGroup:!0,icon:"columnchooser",text:i.showFieldChooser,onItemClick(){e._fieldChooserPopup.show()}}),e.option("export.enabled")&&t.push({beginGroup:!0,icon:"xlsxfile",text:i.exportToExcel,onItemClick(){e.exportTo()}}),n.items=t,e._trigger("onContextMenuPreparing",n),t=n.items,t&&t.length)return t},_createEventArgs(n,e){const t=this,i=t.getDataSource(),r={rowFields:i.getAreaFields("row"),columnFields:i.getAreaFields("column"),dataFields:i.getAreaFields("data"),event:e};return function oJ(n){return n.closest(`.${R4}`).length||n.find(`.${R4}`).length}((0,a.A)(n))?(0,_.X)(t._createFieldArgs(n),r):(0,_.X)(t._createCellArgs(n),r)},_createFieldArgs(n){const e=(0,a.A)(n).children().data("field"),t={field:e};return(0,C.O9)(e)?t:{}},_createCellArgs(n){const e=(0,a.A)(n),t=n.cellIndex,{rowIndex:i}=n.parentElement,r=e.closest("table"),m=r.data("data"),A=m&&m[i]&&m[i][t];return{area:r.data("area"),rowIndex:i,columnIndex:t,cellElement:(0,s.cc)(e),cell:A}},_handleCellClick(n){const e=this,t=e._createEventArgs(n.currentTarget,n),{cell:i}=t;!i||!t.area&&(t.rowIndex||t.columnIndex)||(e._trigger("onCellClick",t),i&&!t.cancel&&(0,C.O9)(i.expanded)&&setTimeout(()=>{e._dataController[i.expanded?"collapseHeaderItem":"expandHeaderItem"](t.area,i.path)}))},_getNoDataText(){return this.option("texts.noData")},_renderNoDataText:hC.A.renderNoDataText,_renderLoadPanel:hC.A.renderLoadPanel,_updateLoading(n){const e=this,t=e._dataController.isLoading();if(!e._loadPanel)return;const i=e._loadPanel.option("visible");if(i||(e._startLoadingTime=new Date),t&&(n?new Date-e._startLoadingTime>=1e3&&e._loadPanel.option("message",`${Math.floor(100*n)}%`):e._loadPanel.option("message",e.option("loadPanel.text"))),clearTimeout(e._hideLoadingTimeoutID),i&&!t)e._hideLoadingTimeoutID=setTimeout(()=>{e._loadPanel.option("visible",!1),e.$element().removeClass("dx-overflow-hidden")});else{const r={visible:t};t&&(r.position=hC.A.calculateLoadPanelPosition(e._dataArea.groupElement())),e._loadPanel.option(r),e.$element().toggleClass("dx-overflow-hidden",!t)}},_renderDescriptionArea(){const n=this.$element(),e=n.find(".dx-area-description-cell"),t=(0,a.A)(qI).addClass("dx-pivotgrid-toolbar"),i=this.option("fieldPanel"),r=n.find(".dx-filter-header"),m=n.find(".dx-column-header");let A;A=i.visible&&i.showFilterFields?r:i.visible&&(i.showDataFields||i.showColumnFields)?m:e,m.toggleClass("dx-bottom-border",!(!i.visible||!i.showDataFields&&!i.showColumnFields)),r.toggleClass("dx-bottom-border",!(!i.visible||!i.showFilterFields)),e.toggleClass("dx-pivotgrid-background",i.visible&&(i.showDataFields||i.showColumnFields||i.showRowFields)),this.$element().find(".dx-pivotgrid-toolbar").remove(),t.prependTo(A);const V=(0,k.Ft)((0,k.ss)())?"text":"contained";if(this.option("fieldChooser.enabled")){const X=(0,a.A)(qI).appendTo(t).addClass("dx-pivotgrid-field-chooser-button"),ce={icon:"columnchooser",hint:this.option("texts.showFieldChooser"),stylingMode:V,onClick:()=>{this.getFieldChooserPopup().show()}};this._createComponent(X,uC.A,ce)}if(this.option("export.enabled")){const X=(0,a.A)(qI).appendTo(t).addClass("dx-pivotgrid-export-button"),ce={icon:"xlsxfile",hint:this.option("texts.exportToExcel"),stylingMode:V,onClick:()=>{this.exportTo()}};this._createComponent(X,uC.A,ce)}},_detectHasContainerHeight(){const n=this,e=n.$element();if((0,C.O9)(n._hasHeight)){const i=n.option("height")||n.$element().get(0).style.height;i&&n._hasHeight^"auto"!==i&&(n._hasHeight=null)}if((0,C.O9)(n._hasHeight)||e.is(":hidden"))return;n._pivotGridContainer.addClass("dx-hidden");const t=(0,a.A)(qI);(0,D.k$)(t,66666),e.append(t),n._hasHeight=66666!==(0,D.Oq)(e),n._pivotGridContainer.removeClass("dx-hidden"),t.remove()},_renderHeaders(n,e,t,i){const r=this.getDataSource();this._rowFields=this._rowFields||new tV(this,"row"),this._rowFields.render(n,r.getAreaFields("row")),this._columnFields=this._columnFields||new tV(this,"column"),this._columnFields.render(e,r.getAreaFields("column")),this._filterFields=this._filterFields||new tV(this,"filter"),this._filterFields.render(t,r.getAreaFields("filter")),this._dataFields=this._dataFields||new tV(this,"data"),this._dataFields.render(i,r.getAreaFields("data")),this.$element().dxPivotGridFieldChooserBase("instance").renderSortable()},_createTableElement(){const n=(0,a.A)("<table>").css({width:"100%"}).toggleClass(M4,!!this.option("showBorders")).toggleClass("dx-word-wrap",!!this.option("wordWrapEnabled"));return L.A.on(n,(0,N.b4)(I.U,"dxPivotGrid"),"td",this._handleCellClick.bind(this)),n},_renderDataArea(n){const e=this._dataArea||new QZ.DataArea(this);return this._dataArea=e,e.render(n,this._dataController.getCellsInfo()),e},_renderRowsArea(n){const e=this._rowsArea||new I4.VerticalHeadersArea(this);return this._rowsArea=e,e.render(n,this._dataController.getRowsInfo()),e},_renderColumnsArea(n){const e=this._columnsArea||new I4.HorizontalHeadersArea(this);return this._columnsArea=e,e.render(n,this._dataController.getColumnsInfo()),e},_initMarkup(){this.callBase.apply(this,arguments),this.$element().addClass("dx-pivotgrid")},_renderContentImpl(){const n=this;let e,t,i,r;const m=!n._pivotGridContainer;let A,V,X,ce;r=!m&&n._tableElement(),r||(n.$element().addClass("dx-row-lines").addClass("dx-pivotgrid-fields-container"),n._pivotGridContainer=(0,a.A)(qI).addClass("dx-pivotgrid-container"),n._renderFieldChooser(),n._renderContextMenu(),e=(0,a.A)(Ik).addClass("dx-area-column-cell"),t=(0,a.A)(Ik).addClass("dx-area-row-cell"),i=(0,a.A)(Ik).addClass("dx-area-data-cell"),r=n._createTableElement(),ce=(0,a.A)(Ik).addClass("dx-data-header"),X=(0,a.A)("<td>").attr("colspan","2").addClass("dx-filter-header"),V=(0,a.A)(Ik).addClass("dx-column-header"),A=(0,a.A)(Ik).addClass("dx-area-description-cell"),(0,a.A)($H).append(X).appendTo(r),(0,a.A)($H).append(ce).append(V).appendTo(r),(0,a.A)($H).append(A).append(e).appendTo(r),(0,a.A)($H).addClass("dx-bottom-row").append(t).append(i).appendTo(r),n._pivotGridContainer.append(r),n.$element().append(n._pivotGridContainer),"tree"===n.option("rowHeaderLayout")&&t.addClass("dx-area-tree-view")),n.$element().addClass("dx-overflow-hidden"),n._createComponent(n.$element(),WH,{dataSource:n.getDataSource(),encodeHtml:n.option("encodeHtml"),allowFieldDragging:n.option("fieldPanel.allowFieldDragging"),headerFilter:n.option("headerFilter"),visible:n.option("visible"),remoteSort:"virtual"===n.option("scrolling.mode")});const _e=n._renderDataArea(i),Me=n._renderRowsArea(t),Ve=n._renderColumnsArea(e);_e.tableElement().prepend(Ve.headElement()),m&&(n._renderLoadPanel(_e.groupElement().parent(),n.$element()),n._renderDescriptionArea(),Me.renderScrollable(),Ve.renderScrollable(),_e.renderScrollable()),[_e,Me,Ve].forEach(Je=>{L4(Je)}),n._renderHeaders(A,V,X,ce),n._update(m)},_update(n){const e=this,t=function(){e.updateDimensions()};e._needDelayResizing(e._dataArea.getData())&&n?setTimeout(t):t()},_fireContentReadyAction(){this._dataController.isLoading()||this.callBase()},getScrollPath(n){const e=this;return"column"===n?e._columnsArea.getScrollPath(e._scrollLeft):e._rowsArea.getScrollPath(e._scrollTop)},getDataSource(){return this._dataController.getDataSource()},getFieldChooserPopup(){return this._fieldChooserPopup},hasScroll(n){return"column"===n?this._columnsArea.hasScroll():this._rowsArea.hasScroll()},_dimensionChanged(){this.updateDimensions()},_visibilityChanged(n){n&&this.updateDimensions()},_dispose(){const n=this;clearTimeout(n._hideLoadingTimeoutID),n.callBase.apply(n,arguments),n._dataController&&n._dataController.dispose()},_tableElement(){return this.$element().find("table").first()},addWidgetPrefix:n=>`dx-pivotgrid-${n}`,resize(){this.updateDimensions()},isReady(){return this.callBase()&&!this._dataController.isLoading()},updateDimensions(){const n=this;let e;const t=n._tableElement();let i,V,X,r=0,m=0,A=0;const ce=t.find(".dx-area-data-cell"),_e=t.find(".dx-area-row-cell"),Me=t.find(".dx-area-column-cell"),Ve=t.find(".dx-area-description-cell"),Je=t.find(".dx-filter-header"),rt=t.find(".dx-column-header"),Ct=n._rowFields,Xt=new g.cY;if(!(0,gr.Vd)())return;const On=Ct.isVisible()&&"tree"!==n.option("rowHeaderLayout");n._detectHasContainerHeight(),n._dataArea.headElement().length||n._dataArea.tableElement().prepend(n._columnsArea.headElement()),On&&(n._rowsArea.updateColspans(Ct.getColumnsCount()),n._rowsArea.tableElement().prepend(Ct.headElement())),t.addClass("dx-incompressible-fields"),n._dataArea.reset(),n._rowsArea.reset(),n._columnsArea.reset(),Ct.reset();const Fn=(Yt,$t)=>$t-Yt>=1,oi=(Yt,$t,xn,Gn,qn)=>xn?Yt:$t+(Gn?qn:0);return(0,h.OX)(()=>{const Yt=n._rowsArea.getRowsHeight(),$t=(0,D.P$)(Ve[0],!0)+(On?Yt[0]:0);let xn=0,Gn=0;if(n._hasHeight){xn=(0,D.Oq)(Je);const xh=t.find(".dx-data-header"),wo=(0,D.Oq)(xh);i=B4([Me,ce,t,rt,Je],"height"),Gn=(0,D.Oq)(n.$element())-xn-wo-(Math.max((0,D.Oq)(n._dataArea.headElement()),(0,D.Oq)(Me),$t)+i)}const qn=n._dataArea.getScrollbarWidth(),ii=(0,D.Oq)(n._dataArea.tableElement())-(0,D.Oq)(n._dataArea.headElement()),qi=Fn(Gn,ii);n._dataArea.tableElement().css({width:n._hasHeight&&qi&&qn?`calc(100% - ${qn}px)`:"100%"});const ji=n._dataArea.getColumnsWidth(),$i=On?Yt.slice(1):Yt,ho=n._dataArea.getRowsHeight(),io=n._dataController.getColumnsInfo().length,Uo=k1($i,ho.slice(io)),zr=ho.slice(0,io),Os=$G(zr),wa=n._rowsArea.getColumnsWidth();if(r=(0,D.RG)(n._dataArea.tableElement()),m=$G(Uo),!r||!m)return void Xt.resolve();A=$G(wa);const $l=(0,D.RG)(n.$element());i=B4([_e,ce,t],"width"),e=$l-A-i,e=e>0?e:r;const Gc=r-e;Gc>=0&&Gc<=2&&(jG(ji,Gc),r=e),V=n._hasHeight&&Fn(Gn,m),X=Fn(e,r);const Dg=oi(Gn,m,V,X,qn);(0,h.zE)(()=>{if(n._columnsArea.tableElement().append(n._dataArea.headElement()),Ct.tableElement().append(n._rowsArea.headElement()),$t>Os&&(jG(zr,Os-$t),n._columnsArea.setRowsHeight(zr)),t.removeClass("dx-incompressible-fields"),rt.children().css("maxWidth",e),n._columnsArea.setGroupWidth(e),n._columnsArea.processScrollBarSpacing(V?qn:0),n._columnsArea.setColumnsWidth(ji),n._rowsArea.setGroupHeight(n._hasHeight?Dg:"auto"),n._rowsArea.processScrollBarSpacing(X?qn:0),n._rowsArea.setColumnsWidth(wa),n._rowsArea.setRowsHeight(Uo),n._dataArea.setColumnsWidth(ji),n._dataArea.setRowsHeight(Uo),n._dataArea.setGroupWidth(e),n._dataArea.setGroupHeight(n._hasHeight?Dg:"auto"),On&&Ct.setColumnsWidth(wa),ce.toggleClass("dx-bottom-border",!V),_e.toggleClass("dx-bottom-border",!V),!n._hasHeight&&$l!==(0,D.RG)(n.$element())){const dr=$l-(0,D.RG)(n.$element());X||(jG(ji,dr),n._columnsArea.setColumnsWidth(ji),n._dataArea.setColumnsWidth(ji)),n._dataArea.setGroupWidth(e-dr),n._columnsArea.setGroupWidth(e-dr)}if(n._hasHeight&&n._filterFields.isVisible()&&(0,D.Oq)(Je)!==xn){const dr=(0,D.Oq)(Je)-xn;if(dr>0){V=Fn(Gn-dr,m);const Cr=oi(Gn-dr,m,V,X,qn);n._dataArea.setGroupHeight(Cr),n._rowsArea.setGroupHeight(Cr)}}const xh=n.option("scrolling");"virtual"===xh.mode&&n._setVirtualContentParams(xh,ji,Uo,e,Dg,n._hasHeight,A);const wo=[];n._dataArea.updateScrollableOptions({direction:n._dataArea.getScrollableDirection(X,V),rtlEnabled:n.option("rtlEnabled")}),n._columnsArea.updateScrollableOptions({rtlEnabled:n.option("rtlEnabled")}),(0,w.__)([n._columnsArea,n._rowsArea,n._dataArea],(dr,Cr)=>{wo.push(Cr&&Cr.updateScrollable())}),n._updateLoading(),n._renderNoDataText(ce),g.z7.apply(a.A,wo).done(()=>{n._updateScrollPosition(n._columnsArea,n._rowsArea,n._dataArea,!0),n._subscribeToEvents(n._columnsArea,n._rowsArea,n._dataArea),Xt.resolve()})})}),Xt},_setVirtualContentParams(n,e,t,i,r,m,A){const V=this._dataController.calculateVirtualContentParams({virtualRowHeight:n.virtualRowHeight,virtualColumnWidth:n.virtualColumnWidth,itemWidths:e,itemHeights:t,rowCount:t.length,columnCount:e.length,viewportWidth:i,viewportHeight:m?r:(0,D.P$)(P4)});this._dataArea.setVirtualContentParams({top:V.contentTop,left:V.contentLeft,width:V.width,height:V.height}),this._rowsArea.setVirtualContentParams({top:V.contentTop,width:A,height:V.height}),this._columnsArea.setVirtualContentParams({left:V.contentLeft,width:V.width,height:(0,D.Oq)(this._columnsArea.groupElement())})},applyPartialDataSource(n,e,t){this._dataController.applyPartialDataSource(n,e,t)}}).inherit(m4).include($3);(0,y.A)("dxPivotGrid",N4);let F4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.xJR,z.yA4,z.Pxf,z.X1G,z.t7Z,z.uIe,z.$Yy,z._RO,z.Ypp,z._zS,z.s5o,z.lkr,z.X6g,f.p_,f.xZ,z.xJR,z.yA4,z.Pxf,z.X1G,z.t7Z,z.uIe,z.$Yy,z._RO,z.Ypp,z._zS,z.s5o,z.lkr,z.X6g,f.xZ]})}return n})(),V4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.X1G,z._zS,z._RO,f.p_,f.xZ,z.X1G,z._zS,z._RO,f.xZ]})}return n})();const KG=QO.inherit({_themeSection:"polar",_createPanes(){return this.callBase(),[{name:"default"}]},_checkPaneName:()=>!0,_getAxisRenderingOptions(n){let t="argumentAxis"===n?"circular":"linear";return this.option("useSpiderWeb")&&(t+="Spider"),{axisType:"polarAxes",drawingType:t}},_executeAppendBeforeSeries(n){n()},_prepareAxisOptions(n,e){const t="argumentAxis"===n,i=this._themeManager,r=this.option("argumentAxis"),m=i.getOptions("argumentAxis",r)||{},A=isFinite(m.startAngle)?xo(m.startAngle):0;return{type:this.option("useSpiderWeb")&&t?"discrete":e.type,isHorizontal:!0,showCustomBoundaryTicks:t,startAngle:A,endAngle:A+360}},_optionChangesMap:{useSpiderWeb:"USE_SPIDER_WEB"},_change_USE_SPIDER_WEB(){this._disposeAxes(),this._requestChange(["AXES_AND_PANES"])},_getExtraOptions(){return{spiderWidget:this.option("useSpiderWeb")}},_prepareToRender(){return this._appendAxesGroups(),{}},_calcCanvas(){const n=(0,_.X)({},this._canvas),t=this.getArgumentAxis().getMargins();return Object.keys(t).forEach(i=>{n[i]=n[`original${i[0].toUpperCase()}${i.slice(1)}`]+t[i]}),n},_renderAxes(){const n=this._getValueAxis(),e=this.getArgumentAxis();e.draw(this._canvas),n.setSpiderTicks(e.getSpiderTicks());const t=this._calcCanvas();return e.updateSize(t),n.draw(t),t},_getValueAxis(){return this._valueAxes[0]},_shrinkAxes(n){const e=this._getValueAxis(),t=this.getArgumentAxis();if(n&&(n.width||n.height)){t.hideOuterElements();const i=this._calcCanvas();t.updateSize(i),e.updateSize(i)}},checkForMoreSpaceForPanesCanvas(){return this.layoutManager.needMoreSpaceForPanesCanvas([{canvas:this.getArgumentAxis().getCanvas()}],this._isRotated())},_getLayoutTargets(){return[{canvas:this._canvas}]},_getSeriesForPane(){return this.series},_applyClipRects(){const n=this._getCanvasClipRectID();this._createClipPathForPane(),this.getArgumentAxis().applyClipRects(this._getElementsClipRectID(),n),this._getValueAxis().applyClipRects(this._getElementsClipRectID(),n)},_createClipPathForPane(){const n=this._getValueAxis();let e=n.getCenter();const t=n.getRadius(),i=this._panesClipRects;e={x:Math.round(e.x),y:Math.round(e.y)},this._createClipCircle(i.fixed,e.x,e.y,t),this._createClipCircle(i.base,e.x,e.y,t),this.series.some(r=>r.areErrorBarsVisible())?this._createClipCircle(i.wide,e.x,e.y,t):i.wide[0]=null},_createClipCircle(n,e,t,i){let r=n[0];r?r.attr({cx:e,cy:t,r:i}):(r=this._renderer.clipCircle(e,t,i),n[0]=r)},_applyExtraSettings(n){const e=this._panesClipRects.wide[0];n.setClippingParams(this._panesClipRects.base[0].id,e&&e.id,!1,!1)},getActualAngle(n){return this.getArgumentAxis().getOptions().inverted?360-n:n},getXYFromPolar(n,e,t,i){const r={angle:void 0,radius:void 0,x:void 0,y:void 0};if(!((0,C.O9)(n)||(0,C.O9)(e)||(0,C.O9)(t)||(0,C.O9)(i)))return r;const m=this.getArgumentAxis(),A=m.getAngles()[0];let V,X;if((0,C.O9)(t)?V=m.getTranslator().translate(t):isFinite(n)?V=this.getActualAngle(n):(0,C.O9)(n)||(V=0),(0,C.O9)(i)?X=this.getValueAxis().getTranslator().translate(i):isFinite(e)?X=e:(0,C.O9)(e)||(X=m.getRadius()),(0,C.O9)(V)&&(0,C.O9)(X)){const ce=lo(m.getCenter(),A,V,X);(0,_.X)(r,ce,{angle:m.getTranslatedAngle(V),radius:X})}return r},_applyPointMarkersAutoHiding:h.lQ,_createScrollBar:h.lQ,_isRotated:h.lQ,_getCrosshairOptions:h.lQ,_isLegendInside:h.lQ});KG.addPlugin(F_.core),KG.addPlugin(F_.polarChart),(0,y.A)("dxPolarChart",KG);let H4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.uvP,z.YLo,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.aUY,z.CBY,z.uE7,z.Fii,z.cCU,z.Pxf,z.H8O,z.EED,z.nE5,z.Ist,z.B80,z.lX9,z.w8p,z.tXi,z.tl,z.XWi,z.NhN,z.lWu,z.Af1,z.tML,z.eeS,z.$jZ,z._ql,z.ZRW,z.REv,z.y7y,z.aqX,z.YTS,z.kxR,z.MXF,z.uIe,z.F1M,z.Yh3,z.sVF,z.YkV,z.FXg,z.xOT,z.hU2,z.hzo,z.Vku,z.A_,z.vQM,f.p_,f.xZ,z.uvP,z.YLo,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.aUY,z.CBY,z.uE7,z.Fii,z.cCU,z.Pxf,z.H8O,z.EED,z.nE5,z.Ist,z.B80,z.lX9,z.w8p,z.tXi,z.tl,z.XWi,z.NhN,z.lWu,z.Af1,z.tML,z.eeS,z.$jZ,z._ql,z.ZRW,z.REv,z.y7y,z.aqX,z.YTS,z.kxR,z.MXF,z.uIe,z.F1M,z.Yh3,z.sVF,z.YkV,z.FXg,z.xOT,z.hU2,z.hzo,z.Vku,z.A_,z.vQM,f.xZ]})}return n})(),rJ=(()=>{class n extends Dy.A{_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{preventScrollEvents:!1})}_getToolbarName(){return"dxToolbar"}}return n.defaultOptions=function(e){Dy.A.defaultOptions(e)},n})();(0,y.A)("dxPopover",rJ);let U4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.i9t,z.TBD,z.isg,f.p_,f.xZ,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.i9t,z.TBD,z.isg,f.xZ]})}return n})();var z4=M(827);const sJ={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>aJ),multi:!0};let aJ=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showStatus(){return this._getOption("showStatus")}set showStatus(t){this._setOption("showStatus",t)}get statusFormat(){return this._getOption("statusFormat")}set statusFormat(t){this._setOption("statusFormat",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onComplete;onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;disabledChange;elementAttrChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;maxChange;minChange;readOnlyChange;rtlEnabledChange;showStatusChange;statusFormatChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"complete",emit:"onComplete"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showStatusChange"},{emit:"statusFormatChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new jI.A(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("validationErrors",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-progress-bar"]],hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{disabled:"disabled",elementAttr:"elementAttr",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",max:"max",min:"min",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showStatus:"showStatus",statusFormat:"statusFormat",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onComplete:"onComplete",onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",maxChange:"maxChange",minChange:"minChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showStatusChange:"showStatusChange",statusFormatChange:"statusFormatChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,sJ,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),G4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();var W4=M(1106);const $4_animationSettings={duration:250},jH_emptySliderMarkerText=". . .",jH_pointerSize=4,KH=function(n,e,t,i,r,m){const A={value:n,valueText:D0(n,{labelOptions:e,ticks:t?t.ticks:[],tickInterval:t?t.tickInterval:void 0,dataType:i,type:r,logarithmBase:m})};return String((0,C.Tn)(e.customizeText)?e.customizeText.call(A,A):A.valueText)},Pk=jH_pointerSize;function XG(n,e,t){this._isLeftPointer=t,this._isOverlapped=!1,this._group=n.g().attr({class:"slider-marker"}).append(e),this._area=n.path(null,"area").append(this._group),this._label=n.text().attr({align:"left"}).append(this._group),this._tracker=n.rect().attr({class:"slider-marker-tracker",fill:"#000000",opacity:1e-4}).css({cursor:"pointer"}).append(this._group),this._border=n.rect(0,0,1,0)}XG.prototype={constructor:XG,_getRectSize:function(n){return{width:Math.round(2*this._paddingLeftRight+n.width),height:Math.round(2*this._paddingTopBottom+n.height)}},_getTextSize:function(){const n=this._label.getBBox();return!this._textHeight&&isFinite(n.height)&&(this._textHeight=n.height),{width:n.width,height:this._textHeight,y:n.y}},_getAreaPointsInfo:function(n){const e=this,t=e._getRectSize(n),i=t.width,r=t.height;let m=-i,A=0,V=Pk,X=0,ce=-Pk;const _e=e._position,Me=e._isLeftPointer,Ve=function(){m++,A++,V++,X++,ce++},Je=function(){V>A?V=A:ce<m&&(ce=m),Me&&Ve()};let rt=_e;return Me?_e>e._range[1]-i?(A=-_e+e._range[1],m=A-i,Je(),rt+=m):(m=ce=0,A=i):_e-e._range[0]<i?(m=-(_e-e._range[0]),A=m+i,Je(),rt+=A):(V=0,Ve()),e._borderPosition=rt,{offset:m,isCut:(!Me||X!==ce)&&(Me||X!==V),points:[m,0,A,0,A,r,V,r,X,r+Pk,ce,r,m,r]}},_update:function(){const n=this;let e;clearTimeout(n._timeout),n._label.attr({text:n._text||""});const t=n._getTextSize(),i=n._getRectSize(t);function r(m,A){A=A||n._getRectSize(m),n._group.attr({translateY:-(A.height+Pk)});const V=n._getAreaPointsInfo(m),X=V.points,ce=V.offset;n._area.attr({points:X}),n._border.attr({x:n._isLeftPointer?X[0]-1:X[2],height:V.isCut?A.height:A.height+Pk}),n._tracker.attr({translateX:ce,width:A.width,height:A.height+Pk}),n._label.attr({translateX:n._paddingLeftRight+ce,translateY:A.height/2-(m.y+m.height/2)})}e=n._textSize||t,e=n._textSize=t.width>e.width||t.height>e.height?t:e,n._timeout=setTimeout(function(){r(t,i),n._textSize=t},75),r(e)},setText:function(n){this._text=n},setPosition:function(n){this._position=n,this._update()},applyOptions:function(n,e){this._range=e,this._paddingLeftRight=n.paddingLeftRight,this._paddingTopBottom=n.paddingTopBottom,this._textHeight=null,this._colors=[n.invalidRangeColor,n.color],this._area.attr({fill:n.color}),this._border.attr({fill:n.borderColor}),this._label.css(Ti(n.font)),this._update()},getTracker:function(){return this._tracker},setValid:function(n){this._area.attr({fill:this._colors[Number(n)]})},setColor:function(n){this._area.attr({fill:n})},dispose:function(){clearTimeout(this._timeout)},setOverlapped:function(n){const e=this;e._isOverlapped!==n&&(n?e._border.append(e._group):e._isOverlapped&&e._border.remove(),e._isOverlapped=n)},getBorderPosition:function(){return this._borderPosition}};const cJ=XG,j4=$4_animationSettings;function YG(n,e){this._translator=n.translator,this._sliderGroup=n.renderer.g().attr({class:"slider"}).append(n.root),this._line=n.renderer.path(null,"line").append(this._sliderGroup),this._marker=new cJ(n.renderer,this._sliderGroup,1===e),this._tracker=n.renderer.rect().attr({class:"slider-tracker",fill:"#000000",opacity:1e-4}).css({cursor:"w-resize"}).append(n.trackersGroup)}YG.prototype={constructor:YG,cancelAnimation:function(){this._sliderGroup.stopAnimation(),this._tracker.stopAnimation()},applyPosition:function(n){const e=this._sliderGroup,t=this._tracker,i={translateX:this._position};this._marker.setPosition(this._position),n?(e.animate(i,j4),t.animate(i,j4)):(e.attr(i),t.attr(i))},_setValid:function(n){this._marker.setValid(n),this._line.attr({stroke:this._colors[Number(n)]})},_setText:function(n){this._marker.setText(n)},update:function(n,e,t){this._formatOptions={format:t.format,customizeText:t.customizeText},this._marker.applyOptions(t,this._translator.getScreenRange()),this._colors=[t.invalidRangeColor,e.color],this._sliderGroup.attr({translateY:n[0]}),this._line.attr({"stroke-width":e.width,stroke:e.color,"stroke-opacity":e.opacity,sharp:"h",points:[0,0,0,n[1]-n[0]]});const i=function dJ(n){return Tk.touchEvents||Tk.pointerEvents?20:8<n?n:8}(e.width);this._tracker.attr({x:-i/2,y:0,width:i,height:n[1]-n[0],translateY:n[0]})},toForeground:function(){this._sliderGroup.toForeground()},getSliderTracker:function(){return this._tracker},getPosition:function(){return this._position},setDisplayValue:function(n){this._value=n,this._setText(KH(n,this._formatOptions))},setOverlapped:function(n){this._marker.setOverlapped(n)},getValue:function(){return this._value},on:function(n,e){this._tracker.on(n,e),this._marker.getTracker().on(n,e)},getCloudBorder:function(){return this._marker.getBorderPosition()},dispose:function(){this._marker.dispose()}};const K4=YG,uJ=$4_animationSettings,X4=jH_emptySliderMarkerText;function XH(n,e,t,i){return[n,e,t,e,t,i,n,i]}function YH(n,e){return n<e}function ZH(n,e){return n>e}function Pw(n,e){let r,t=0,i=e?e.length-1:0,m=n;for(;i-t>1;){if(r=t+i>>1,m=e[r],m===n)return n;n<m?i=r:t=r}return e&&(m=e[n-e[t]<=e[i]-n?t:i]),m}function Y4(){this._lastSelectedRange=this.getSelectedRange(),delete this._processSelectionChanged}function ZG(n){const e={renderer:n.renderer,root:n.root,trackersGroup:n.trackersGroup,translator:n.translator};this._params=n,this._areaTracker=n.renderer.path(null,"area").attr({class:"area-tracker",fill:"#000000",opacity:1e-4}).append(n.trackersGroup),this._selectedAreaTracker=n.renderer.path(null,"area").attr({class:"selected-area-tracker",fill:"#000000",opacity:1e-4}).append(n.trackersGroup),this._shutter=n.renderer.path(null,"area").append(n.root),this._sliders=[new K4(e,0),new K4(e,1)],this._processSelectionChanged=Y4}ZG.prototype={constructor:ZG,dispose:function(){this._sliders[0].dispose(),this._sliders[1].dispose()},getTrackerTargets:function(){return{area:this._areaTracker,selectedArea:this._selectedAreaTracker,sliders:this._sliders}},_processSelectionChanged:function(n){const e=this,t=e.getSelectedRange();an(t,e._lastSelectedRange)||(e._params.updateSelectedRange(t,e._lastSelectedRange,n),e._lastSelectedRange=t)},update:function(n,e,t,i,r,m,A,V,X){const ce=this._params.translator.getScreenRange();this._verticalRange=n,this._minRange=A.minRange,this._maxRange=A.maxRange,this._animationEnabled=e.animationEnabled&&this._params.renderer.animationEnabled(),this._allowSlidersSwap=e.allowSlidersSwap,this._sliders[0].update(n,i,r),this._sliders[1].update(n,i,r),this._sliders[0]._position=this._sliders[1]._position=ce[0],this._values=!this._params.translator.isValueProlonged&&e.snapToTicks?V:null,this._areaTracker.attr({points:XH(ce[0],n[0],ce[1],n[1])}),this._isCompactMode=t,this._shutterOffset=i.width/2,this._updateSelectedView(m,X),this._isOnMoving="onhandlemove"===Wi(e.valueChangeMode)||"onmoving"===Wi(e.callValueChanged),this._updateSelectedRange(),this._applyTotalPosition(!1)},_updateSelectedView:function(n,e){const t={fill:null,"fill-opacity":null,stroke:null,"stroke-width":null};this._isCompactMode?(t.stroke=e,t["stroke-width"]=3,t.sharp="v"):(t.fill=n.color,t["fill-opacity"]=n.opacity),this._shutter.attr(t)},_updateSelectedRange:function(){const n=this,e=n._sliders;e[0].cancelAnimation(),e[1].cancelAnimation(),n._shutter.stopAnimation(),n._params.translator.getBusinessRange().isEmpty()?(e[0]._setText(X4),e[1]._setText(X4),e[0]._value=e[1]._value=void 0,e[0]._position=n._params.translator.getScreenRange()[0],e[1]._position=n._params.translator.getScreenRange()[1],n._applyTotalPosition(!1),function hJ(n){n.setSelectedRange=h.lQ,n._processSelectionChanged===Y4&&n._processSelectionChanged()}(n)):function pJ(n){delete n.setSelectedRange}(n)},_applyTotalPosition:function(n){const e=this._sliders;e[0].applyPosition(n=this._animationEnabled&&n),e[1].applyPosition(n);const t=e[0].getCloudBorder()>e[1].getCloudBorder();e[0].setOverlapped(t),e[1].setOverlapped(t),this._applyAreaTrackersPosition(),this._applySelectedRangePosition(n)},_applyAreaTrackersPosition:function(){const n=this._sliders[0].getPosition(),e=this._sliders[1].getPosition();this._selectedAreaTracker.attr({points:XH(n,this._verticalRange[0],e,this._verticalRange[1])}).css({cursor:Math.abs(this._params.translator.getScreenRange()[1]-this._params.translator.getScreenRange()[0]-e+n)<.001?"default":"pointer"})},_applySelectedRangePosition:function(n){const e=this,t=e._verticalRange,i=e._sliders[0].getPosition(),r=e._sliders[1].getPosition();let m,A;e._isCompactMode?A=[i+Math.ceil(e._shutterOffset),(t[0]+t[1])/2,r-Math.floor(e._shutterOffset),(t[0]+t[1])/2]:(m=e._params.axis.getVisibleArea(),A=[XH(m[0],t[0],Math.max(i-Math.floor(e._shutterOffset),m[0]),t[1]),XH(m[1],t[0],Math.min(r+Math.ceil(e._shutterOffset),m[1]),t[1])]),n?e._shutter.animate({points:A},uJ):e._shutter.attr({points:A})},getSelectedRange:function(){return{startValue:this._sliders[0].getValue(),endValue:this._sliders[1].getValue()}},setSelectedRange:function(n,e){n=n||{};const t=this._params.translator,i=t.getBusinessRange(),r="discrete"===i.axisType?function(X,ce){return X<ce}:function(X,ce){return X<=ce};let{startValue:m,endValue:A}=Xr({dataType:i.dataType,axisType:i.axisType,base:i.base},{startValue:t.isValid(n.startValue)?t.getCorrectValue(n.startValue,1):void 0,endValue:t.isValid(n.endValue)?t.getCorrectValue(n.endValue,-1):void 0,length:n.length},{min:i.minVisible,max:i.maxVisible,categories:i.categories});m=(0,C.kf)(m)?(0,ri.Ai)(m):m,A=(0,C.kf)(A)?(0,ri.Ai)(A):A;const V=r(t.to(m,-1),t.to(A,1))?[m,A]:[A,m];this._sliders[0].setDisplayValue(V[0]),this._sliders[1].setDisplayValue(V[1]),this._sliders[0]._position=t.to(V[0],-1),this._sliders[1]._position=t.to(V[1],1),this._applyTotalPosition(!0),this._processSelectionChanged(e)},beginSelectedAreaMoving:function(n){const e=this,t=e._sliders,i=(t[0].getPosition()+t[1].getPosition())/2-n;let r=n;return m.complete=function(A){e._dockSelectedArea(A)},m;function m(A,V){A!==r&&A>r==A>(t[0].getPosition()+t[1].getPosition())/2-i&&e._moveSelectedArea(A+i,!1,V),r=A}},_dockSelectedArea:function(n){const e=this._params.translator,t=this._sliders;t[0]._position=e.to(t[0].getValue(),-1),t[1]._position=e.to(t[1].getValue(),1),this._applyTotalPosition(!0),this._processSelectionChanged(n)},moveSelectedArea:function(n,e){this._moveSelectedArea(n,!0,e),this._dockSelectedArea(e)},_moveSelectedArea:function(n,e,t){const i=this,r=i._params.translator,m=i._sliders,A=m[1].getPosition()-m[0].getPosition();let V=n-A/2,X=n+A/2;V<r.getScreenRange()[0]&&(V=r.getScreenRange()[0],X=V+A),X>r.getScreenRange()[1]&&(X=r.getScreenRange()[1],V=X-A);const ce=Pw(r.from(V,-1),i._values);m[0].setDisplayValue(ce),m[1].setDisplayValue(Pw(r.from(r.to(ce,-1)+A,1),i._values)),m[0]._position=V,m[1]._position=X,i._applyTotalPosition(e),i._isOnMoving&&i._processSelectionChanged(t)},placeSliderAndBeginMoving:function(n,e,t){const i=this,r=i._params.translator,m=i._sliders,A=n<e?0:1,V=A>0?1:-1,X=A>0?ZH:YH,ce=A>0?YH:ZH;let _e;const Me=[],Ve=[];Ve[A]=r.from(n,V),Ve[1-A]=r.from(e,-V),Me[1-A]=e,r.isValueProlonged&&(X(n,r.to(Ve[A],V))&&(Ve[A]=r.from(n,-V)),X(e,r.to(Ve[A],-V))&&(Ve[1-A]=Ve[A])),i._minRange&&(_e=r.to(r.add(Pw(Ve[A],i._values),i._minRange,-V),-V),X(e,_e)&&(Ve[1-A]=r.add(Ve[A],i._minRange,-V)),_e=r.to(r.add(r.getRange()[1-A],i._minRange,V),-V),ce(n,_e)&&(Ve[1-A]=r.getRange()[1-A],Ve[A]=r.add(Ve[1-A],i._minRange,V),Me[1-A]=n)),Ve[0]=Pw(Ve[0],i._values),Ve[1]=Pw(Ve[1],i._values),Me[A]=r.to(Ve[A],V),m[0].setDisplayValue(Ve[0]),m[1].setDisplayValue(Ve[1]),m[0]._position=Me[0],m[1]._position=Me[1],i._applyTotalPosition(!0),i._isOnMoving&&i._processSelectionChanged(t);const Je=i.beginSliderMoving(1-A,e);return m[1-A]._sliderGroup.stopAnimation(),i._shutter.stopAnimation(),Je(e),Je},beginSliderMoving:function(n,e){const t=this,i=t._params.translator,r=t._sliders,m=i.getScreenRange()[0],A=i.getScreenRange()[1];let V=n;const X=r[1-V].getPosition();let ce=e,_e=V>0?1:-1,Me=V>0?YH:ZH,Ve=V>0?ZH:YH,Je=r[V].getPosition()-e,rt=Me(r[V].getPosition(),e)?-Je:Je;return Ct.complete=function(Xt){r[V]._setValid(!0),t._dockSelectedArea(Xt)},Ct;function Ct(Xt,On){let Fn,oi,Yt,$t,xn;if(Xt!==ce&&(Me(Xt+rt,X)&&(Fn=t._allowSlidersSwap,Fn&&!i.isValueProlonged&&t._minRange&&(Fn=i.isValid(i.add(r[1-V].getValue(),t._minRange,-_e))),Fn&&(t._changeMovingSlider(V),V=1-V,_e=-_e,oi=Me,Me=Ve,Ve=oi,Je=-_e*Math.abs(Je),rt=-Je)),Ve(Xt+Je,X))){let Gn;$t=r[V],xn=r[1-V].getValue(),Yt=Math.max(Math.min(Xt+Je,A),m),Fn=!i.isValueProlonged||!Me(Yt,i.to(xn,_e)),Fn&&t._minRange&&(Fn=!Me(Yt,i.to(i.add(xn,t._minRange,_e),_e)),Fn||(Gn=i.add(xn,t._minRange,_e))),Fn&&t._maxRange&&(Fn=!Ve(Yt,i.to(i.add(xn,t._maxRange,_e),_e)),Fn||(Gn=i.add(xn,t._maxRange,_e))),$t._setValid(Fn),$t.setDisplayValue(Fn?Pw(i.from(Yt,_e),t._values):(0,C.O9)(Gn)?Gn:$t.getValue()),$t._position=Yt,t._applyTotalPosition(!1),$t.toForeground(),t._isOnMoving&&t._processSelectionChanged(On)}ce=Xt}},_changeMovingSlider:function(n){const e=this,t=e._params.translator,i=e._sliders,r=i[1-n].getPosition(),m=n>0?1:-1;let A;i[n].setDisplayValue(Pw(t.from(r,m),e._values)),A=t.from(r,-m),t.isValueProlonged?A=t.from(r,m):e._minRange&&(A=t.add(A,e._minRange,-m)),i[1-n].setDisplayValue(Pw(A,e._values)),i[n]._setValid(!0),i[n]._marker._update(),i[0]._position=i[1]._position=r},foregroundSlider:function(n){this._sliders[n].toForeground()}};const Z4=10,gJ=(0,gr.zk)();function Mk(n){const e=n||gJ.event,t=e.originalEvent,i=e.touches,r=!!t&&t.pointerType,m=!!t&&t.touches;return 1===e.which||t&&void 0!==r&&(r===(t.MSPOINTER_TYPE_TOUCH||"touch")||r===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&1===t.buttons)||i&&i.length>0||m&&m.length>0}function Q4(n){const e=n.originalEvent,t=n.touches,i=e&&e.touches;return t&&t.length>1||i&&i.length>1||null}function J4(n){Q4(n)||n.preventDefault()}function q4(n){Q4(n)||(n.stopPropagation(),n.preventDefault())}function Rk(n){return n&&n.type&&0===n.type.indexOf("touch")}function eP(n){const e=n.originalEvent;let t=0;return n.pageX?t=n.pageX:e&&e.pageX&&(t=e.pageX),e&&e.touches&&(e.touches.length>0?t=e.touches[0].pageX:e.changedTouches.length>0&&(t=e.changedTouches[0].pageX)),t}function fJ(n,e,t,i){let r,A,m=!1,V=null;const X={[Si.A.move](_e){let Me,Ve;r===Rk(_e)&&(Mk(_e)||ce(_e),m&&(Me=eP(_e),Ve=i(),V?V(Me-Ve,_e):t.manualRangeSelectionEnabled&&Math.abs(A-Me)>=Z4&&(V=n.placeSliderAndBeginMoving(A-Ve,Me-Ve,_e))))},[Si.A.up](_e){let Me;m&&(Me=eP(_e),!V&&t.moveSelectedRangeByClick&&Math.abs(A-Me)<Z4&&n.moveSelectedArea(Me-i(),_e),ce(_e))}};function ce(_e){m&&(m=!1,V&&(V.complete(_e),V=null))}return e.on(Si.A.down,function(_e){!t.enabled||!Mk(_e)||m||(m=!0,r=Rk(_e),A=eP(_e))}),X}function mJ(n,e,t,i){let r,m=!1,A=null;const V={[Si.A.move](ce){r===Rk(ce)&&(Mk(ce)||X(ce),m&&(J4(ce),A(eP(ce)-i(),ce)))},[Si.A.up]:X};function X(ce){m&&(m=!1,A.complete(ce),A=null)}return e.on(Si.A.down,function(ce){!t.enabled||!Mk(ce)||m||(m=!0,r=Rk(ce),A=n.beginSelectedAreaMoving(eP(ce)-i()),q4(ce))}),V}function _J(n,e,t,i){let r,m=!1,A=null;const V={[Si.A.move](ce){r===Rk(ce)&&(Mk(ce)||X(ce),m&&(J4(ce),A(eP(ce)-i(),ce)))},[Si.A.up]:X};function X(ce){m&&(m=!1,A.complete(ce),A=null)}return(0,w.__)(e,function(ce,_e){_e.on({[Si.A.down](Me){!t.enabled||!Mk(Me)||m||(m=!0,r=Rk(Me),A=n.beginSliderMoving(ce,eP(Me)-i()),q4(Me))},[Si.A.move](){A||n.foregroundSlider(ce)}})}),V}function QG(n){const e=this._state={},t=n.controller.getTrackerTargets();function i(){return n.renderer.getRootOffset().left}Tk.pointerEvents&&n.renderer.root.css({msTouchAction:"pinch-zoom"}),this._docEvents=[mJ(n.controller,t.selectedArea,e,i),fJ(n.controller,t.area,e,i),_J(n.controller,t.sliders,e,i)],(0,w.__)(this._docEvents,function(r,m){L.A.on(c.A.getDocument(),m)})}function JG(n,e){return void 0!==n?n:e}function qG(n){this._params=n,this._clipRect=n.renderer.clipRect(),n.root.attr({"clip-path":this._clipRect.id})}QG.prototype={constructor:QG,dispose:function(){(0,w.__)(this._docEvents,function(n,e){L.A.off(c.A.getDocument(),e)})},update:function(n,e){const t=this._state;t.enabled=n,t.moveSelectedRangeByClick=e.moveSelectedRangeByClick,t.manualRangeSelectionEnabled=e.manualRangeSelectionEnabled}},qG.prototype={constructor:qG,update:function(n,e,t,i,r,m){const A=this._params.renderer,V=this._params.root,X=t.width-t.left;let ce;n=n||{},V.clear(),this._clipRect.attr({x:t.left,y:t.top,width:X,height:t.height}),i||(JG(n.visible,e.visible)&&(n.color&&A.rect(t.left,t.top,X+1,t.height).attr({fill:JG(n.color,e.color),class:"dx-range-selector-background"}).append(V),n.image&&n.image.url&&A.image(t.left,t.top,X+1,t.height,n.image.url,JG(n.image.location,e.image.location)).append(V)),m&&m.isShowChart()&&(ce=A.g().attr({class:"dxrs-series-group"}).append(V),function vJ(n,e,t,i){const r=e.getSeries();if(!r.length)return;const m=r[0].getValueAxis();m.updateCanvas({top:t.top,bottom:0,height:t.height+t.top}),e.adjustSeriesDimensions();const A=e.getBoundRange().val;A.sortCategories(m.getCategoriesSorter()),m.setBusinessRange(A),r.forEach(V=>{V._extGroups.seriesGroup=V._extGroups.labelsGroup=n,V.draw(i)})}(ce,m,t,r)))}};const eW=function(n){const e=this._themeManager=function(n){return new Gp({options:n,themeSection:"rangeSelector.chart",fontFields:["commonSeriesSettings.label.font"]})}(n.chart);e.setTheme(n.chart.theme);const t=e.getOptions("topIndent"),i=e.getOptions("bottomIndent");this._indent={top:t>=0&&t<1?t:0,bottom:i>=0&&i<1?i:0},this._valueAxis=e.getOptions("valueAxisRangeSelector")||{},this._hideChart=!1,this._series=this._calculateSeries(n),this._seriesFamilies=[]};eW.prototype={constructor:eW,_calculateSeries:function(n){const e=this,t=[];let i,r;const m=n.dataSource||[];let A;const V=e._themeManager,X=V.getOptions("seriesTemplate");let _e,ce=X?Jo(X,m):n.chart.series;const Me=e._valueAxis;let Ve,Je,rt;for(n.dataSource&&!ce&&(_e=n.dataSourceField||"arg",ce={argumentField:_e,valueField:_e},e._hideChart=!0),ce=Array.isArray(ce)?ce:ce?[ce]:[],Ve=0;Ve<ce.length;Ve++)i=(0,_.X)(!0,{},ce[Ve]),i.rotated=!1,r=V.getOptions("series",i,ce.length),r.argumentField=r.argumentField||n.dataSourceField,r.name||(r.name="Series "+(Ve+1).toString()),m&&m.length>0&&(Je=new Hc({renderer:n.renderer,argumentAxis:n.argumentAxis,valueAxis:n.valueAxis,incidentOccurred:n.incidentOccurred},r),t.push(Je));if(t.length)for(rt={groups:[{series:t,valueAxis:n.valueAxis,valueOptions:{type:Me.type,valueType:_e?n.valueType:Me.valueType}}],argumentOptions:{categories:n.categories,argumentType:n.valueType,type:n.axisType}},A=Hf(m,rt,n.incidentOccurred,V.getOptions("dataPrepareSettings")),e.argCategories=rt.categories,Ve=0;Ve<t.length;Ve++)t[Ve].updateData(A[t[Ve].getArgumentField()]);return t},createPoints(){if(0===this._series.length)return;const n=this._series,e=new Bl,t=n[0].getArgumentAxis(),i=this._themeManager,r=i.getOptions("negativesAsZeroes"),m=i.getOptions("negativesAsZeros");n.forEach(function(A){e.addRange(A.getArgumentRange())}),t.getTranslator().updateBusinessRange(e),n.forEach(function(A){A.createPoints()}),this._seriesFamilies=function(n,e,t,i,r){const m=[],A=[];return(0,w.__)(n,function(V,X){A.includes(X.type)||A.push(X.type)}),(0,w.__)(A,function(V,X){const ce=new pS({type:X,minBubbleSize:e,maxBubbleSize:t,barGroupPadding:i.barGroupPadding,barGroupWidth:i.barGroupWidth,negativesAsZeroes:r});ce.add(n),ce.adjustSeriesValues(),m.push(ce)}),m}(n,i.getOptions("minBubbleSize"),i.getOptions("maxBubbleSize"),{barGroupPadding:i.getOptions("barGroupPadding"),barGroupWidth:i.getOptions("barGroupWidth")},(0,C.O9)(r)?r:m)},adjustSeriesDimensions:function(){(0,w.__)(this._seriesFamilies,function(n,e){e.adjustSeriesDimensions()})},getBoundRange:function(){const n=this;let e;const t=n._valueAxis,i=new Bl({min:t.min,minVisible:t.min,max:t.max,maxVisible:t.max,axisType:t.type,base:t.logarithmBase}),r=new Bl({});let m,A,V,X;return(0,w.__)(n._series,function(ce,_e){e=_e.getRangeData(),i.addRange(e.val),r.addRange(e.arg)}),!i.isEmpty()&&!r.isEmpty()&&(V=t.inverted?n._indent.top:n._indent.bottom,X=t.inverted?n._indent.bottom:n._indent.top,m=i.max-i.min,A=((0,C.kf)(i.maxVisible)?i.maxVisible:i.max)-((0,C.kf)(i.minVisible)?i.minVisible:i.min),(0,C.$P)(i.min)?i.min=new Date(i.min.valueOf()-m*V):i.min-=m*V,(0,C.$P)(i.max)?i.max=new Date(i.max.valueOf()+m*X):i.max+=m*X,(0,C.kf)(A)&&(i.maxVisible=i.maxVisible?i.maxVisible+A*X:void 0,i.minVisible=i.minVisible?i.minVisible-A*V:void 0),i.invert=t.inverted),{arg:r,val:i}},getMarginOptions:function(n){const e=Math.min(n.width,n.height)*this._themeManager.getOptions("maxBubbleSize");return this._series.reduce(function(t,i){const r=i.getMarginOptions();return!0===r.processBubbleSize&&(r.size=e),ko(t,r)},{})},getSeries:function(){return this._series},isEmpty:function(){return 0===this.getSeries().length},isShowChart:function(){return!this._hideChart},getCalculatedValueType:function(){const n=this._series[0];return n?.argumentType},getThemeManager:function(){return this._themeManager}};const tW=Math.max,kk=Math.ceil,QH=Math.floor,eK="startValue",JH="datetime",tP="value",Lk="discrete",Bk="semidiscrete",qH="string",tK="valueChanged",nK="logarithmic",nW="reset",rK=-1e3;function aK(n,e,t){const r=iW(n,void 0===e?jH_emptySliderMarkerText:KH(e,t),t.font);return kk(r.height)+2*t.paddingTopBottom+jH_pointerSize}function lK(n,e,t,i){const m=iW(n,KH(e,t.label,i,t.valueType,t.type,t.logarithmBase),t.label.font);return kk(m.width/2)}function cK(n,e){const t=(0,C.NW)(n),i=(0,C.NW)(e),r=function(m){return t===m||i===m};return r("date")?JH:r("number")?"numeric":r(qH)?qH:""}function EJ(n){return n.valueType===JH&&n.marker.visible}function dK(n,e,t){if(!n)return;const i=n.logarithmBase;n.type===nK&&i<=0||i&&!(0,C.kf)(i)?(n.logarithmBase=e,t("E2104")):n.type!==nK&&(n.logarithmBase=void 0)}function wJ(n,e,t,i){const r=e.label,m=e.marker,A=e.placeholderHeight,X=KH(("semidiscrete"===e.type?e.customTicks:i.ticks)[0],r);return A||(r.visible?r.topIndent+iW(n,X,r.font).height:0)+(t?m.topIndent+m.separatorHeight:0)}function DJ(n,e,t){return n?t?n=Tn.A.getNextDateUnit(n):n+=e:n=e,n}function uK(n){var e;return null===(e=n.workWeek)||void 0===e?void 0:e[0]}function iW(n,e,t){const i=n.text(e,rK,rK).css(Ti(t)).append(n.root),r=i.getBBox();return i.remove(),r}function Mw(n,e,t,i){return(0,C.O9)(n)&&(n=e?Tn.A.correctDateWithUnitBeginning(new Date(n),t,null,i):(0,ri.Ai)(QH((0,ri.Ai)(n/t))*t)),n}function NJ(n,e,t){const i=Math.abs(e-n)/t,r=i-QH(i);return r>0?kk(Math.abs((0,ri.Ai)(Ei(r,10)))):0}const nP=Vh.inherit({_toggleParentsScrollSubscription(){},_eventsMap:{onValueChanged:{name:tK}},_rootClassPrefix:"dxrs",_rootClass:"dxrs-range-selector",_dataIsReady:function(){return this._dataIsLoaded()},_initialChanges:["DATA_SOURCE","VALUE"],_themeDependentChanges:["MOSTLY_TOTAL"],_themeSection:"rangeSelector",_fontFields:["scale.label.font","sliderMarker.font"],_setDeprecatedOptions(){this.callBase(),(0,_.X)(this._deprecatedOptions,{"behavior.callValueChanged":{since:"23.1",message:'Use the "behavior.valueChangeMode" property instead'},"scale.aggregateByCategory":{since:"23.1",message:"Use the aggregation.enabled property"}})},_initCore:function(){const n=this,e=n._renderer,t=e.root;t.css({"touch-action":"pan-y"}),n._clipRect=e.clipRect();const i=e.g().attr({class:"dxrs-view"}).append(t),r=e.g().attr({class:"dxrs-slidersContainer","clip-path":n._clipRect.id}).append(t),m=e.g().attr({class:"dxrs-scale","clip-path":n._clipRect.id}).append(t),A=e.g().attr({class:"dxrs-scale-elements","clip-path":n._clipRect.id}).append(t),V=e.g().attr({class:"dxrs-scale-breaks"}).append(t),X=e.g().attr({class:"dxrs-trackers"}).append(t);n._axis=new iV({renderer:e,root:m,scaleBreaksGroup:V,labelsAxesGroup:A,updateSelectedRange:function(ce,_e){n.setValue(Jr(ce),_e)},incidentOccurred:n._incidentOccurred}),n._rangeView=new qG({renderer:e,root:i,translator:n._axis.getTranslator()}),n._slidersController=new ZG({renderer:e,root:r,trackersGroup:X,updateSelectedRange:function(ce,_e,Me){n._rangeOption||n.option(tP,Jr(ce,(0,C.Qd)(n._options.silent(tP)))),n._eventTrigger(tK,{value:Jr(ce),previousValue:Jr(_e),event:Me})},axis:n._axis,translator:n._axis.getTranslator()}),n._tracker=new QG({renderer:e,controller:n._slidersController})},_getDefaultSize:function(){return{width:400,height:160}},_disposeCore:function(){this._axis.dispose(),this._slidersController.dispose(),this._tracker.dispose()},_applySize:function(n){this._clientRect=n.slice(),this._change(["MOSTLY_TOTAL"])},_optionChangesMap:{scale:"SCALE",value:"VALUE",dataSource:"DATA_SOURCE"},_optionChangesOrder:["SCALE","DATA_SOURCE"],_change_SCALE:function(){this._change(["MOSTLY_TOTAL"])},_setValueByDataSource(){const n=this,e=n._options.silent(),t=n._axis;if(e.dataSource){let i=n.option("selectedRangeUpdateMode");const r=n.getValue(),m=(0,C.O9)(r[0])&&(0,C.O9)(r[1]);if((0,C.O9)(i)?(i=Wi(i),n.__skipAnimation=!0):m&&!n._dataSourceIsAsync&&(i=nW),"auto"===i&&m){const A=t.allScaleSelected(r);i=A.startValue&&A.endValue?nW:A.endValue?"shift":"keep"}if(i===nW)e[tP]=null;else if("shift"===i&&m){const A=n.getValue();n.__skipAnimation=!0,e[tP]={length:t.getVisualRangeLength({minVisible:A[0],maxVisible:A[1]})}}else"keep"===i&&(n.__skipAnimation=!0)}n._dataSourceIsAsync=void 0},_change_DATA_SOURCE:function(){this._options.silent("dataSource")&&this._updateDataSource()},_customChangesOrder:["MOSTLY_TOTAL","VALUE","SLIDER_SELECTION"],_change_MOSTLY_TOTAL:function(){this._applyMostlyTotalChange()},_change_SLIDER_SELECTION:function(){const n=this._options.silent(tP);this._slidersController.setSelectedRange(n&&er(n))},_change_VALUE:function(){const n=this,e=n._rangeOption;n._dataSourceIsAsync=!n._dataIsReady(),e&&(n._options.silent(tP,e),n.setValue(e))},_validateRange:function(n,e){const t=i=>(0,C.O9)(i)&&!this._axis.getTranslator().isValid(i);this._dataIsReady()&&(t(n)||t(e))&&this._incidentOccurred("E2203")},_applyChanges:function(){const n=this,e=n._options.silent(tP);n._changes.has("VALUE")&&e&&(n._rangeOption=e),n.callBase.apply(n,arguments),n._rangeOption=null,n.__isResizing=n.__skipAnimation=!1},_applyMostlyTotalChange:function(){const n=this._renderer,e=this._clientRect;let t;const i={left:e[0],top:e[1],width:e[2]-e[0],height:e[3]-e[1]};(this.__isResizing||this.__skipAnimation)&&(t=n.animationEnabled(),n.updateAnimationOptions({enabled:!1})),this._clipRect.attr({x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}),this._axis.getTranslator().update(new Bl,i,{isHorizontal:!0}),this._updateContent({left:e[0],top:e[1],width:e[2]-e[0],height:e[3]-e[1]}),(this.__isResizing||this.__skipAnimation)&&n.updateAnimationOptions({enabled:t}),this._drawn()},_dataSourceChangedHandler:function(){this._setValueByDataSource(),this._requestChange(["MOSTLY_TOTAL"])},_completeSeriesDataSourceCreation(n,e){const t=this._clientRect,i={left:t[0],top:t[1],width:t[2]-t[0],height:t[3]-t[1]};this._axis.updateOptions((0,_.X)({},n,{isHorizontal:!0,label:{}})),e.isShowChart()&&this._axis.setMarginOptions(e.getMarginOptions(i)),this._axis.updateCanvas(i),e.createPoints()},_updateContent:function(n){const e=this,t=e.option("chart"),i=e._createSeriesDataSource(t),r=!(i&&i.isShowChart()||e.option("background.image.url")),m=function LJ(n,e,t,i){let r=0,m=Vg(Wi(n.valueType));const A=function(X,ce){const _e=X===eK?"start":"end";(0,C.O9)(n[X])&&(r=ce(n[X]),(0,C.O9)(r)?n[X]=r:(n[X]=void 0,t("E2202",[_e])))};m=e||m,m||(m=cK(n.startValue,n.endValue)||"numeric"),(m===qH||n.categories)&&(n.type=Lk,m=qH),n.containerColor=i,n.valueType=m,n.dataType=m;const V=Wp(m);return A(eK,V),A("endValue",V),dK(n,10,t),n.type||(n.type="continuous"),n.parser=V,n.type===Bk&&(n.minorTick.visible=!1,n.minorTickInterval=n.minRange,n.marker.visible=!1,n.maxRange=void 0),n.forceUserTickInterval|=(0,C.O9)(n.tickInterval)&&!(0,C.O9)(n.axisDivisionFactor),n.axisDivisionFactor=(0,C.O9)(n.axisDivisionFactor)?n.axisDivisionFactor:30,n.minorAxisDivisionFactor=(0,C.O9)(n.minorAxisDivisionFactor)?n.minorAxisDivisionFactor:15,n}(e._getOption("scale"),i&&i.getCalculatedValueType(),e._incidentOccurred,this._getOption("containerBackgroundColor",!0));i&&e._completeSeriesDataSourceCreation(m,i);const A=function PJ(n,e){let t,i,V,X,_e,r=!1,m=e.startValue,A=e.endValue,ce=n?n.getBoundRange().arg:new Bl;const Me="datetime"===e.valueType,Ve=uK(e),Je=e.minRange;return e.type===Lk&&(_e=new Bl({minVisible:m,maxVisible:A}),_e.addRange(ce),ce=_e,V=n?n.argCategories:e.categories||m&&A&&[m,A],V=V||[],e._categoriesInfo=X=fr(V,m,A)),e.type===Bk&&(m=e.startValue=Mw(e.startValue,Me,Je,Ve),A=e.endValue=Mw(e.endValue,Me,Je,Ve),ce.minVisible=Mw(ce.minVisible,Me,Je,Ve),ce.maxVisible=Mw(ce.maxVisible,Me,Je,Ve),ce.min=Mw(ce.min,Me,Je,Ve),ce.max=Mw(ce.max,Me,Je,Ve)),(0,C.O9)(m)&&(0,C.O9)(A)?(r=X?X.inverted:m>A,t=X?X.start:r?A:m,i=X?X.end:r?m:A):(0,C.O9)(m)||(0,C.O9)(A)?(t=m,i=A):X&&(t=X.start,i=X.end),ce.addRange({invert:r,min:t,max:i,minVisible:t,maxVisible:i,dataType:e.valueType}),ce.addRange({categories:n?void 0:V,base:e.logarithmBase,axisType:e.type,dataType:e.valueType}),n&&ce.sortCategories(V),ce}(i,m),V=function IJ(n,e,t,i){let r;const m=(0,C.O9)(i.minVisible)?i.minVisible:i.min,A=(0,C.O9)(i.maxVisible)?i.maxVisible:i.max,V=n._categoriesInfo;let X,ce;const _e={};return n.type===Bk?r=function AJ(n,e,t,i){const r=n.minorTickInterval;let A,m=n.tickInterval;const V="datetime"===n.valueType,X=n.axisDivisionFactor||{};let ce,_e;if(!m)do{if(A=DJ(m,r,V),m===A)break;m=A,V&&(A=Tn.A.dateToMilliseconds(m)),ce=kk((t-e)/A),_e=QH(i/(X[m]||50))||1}while(A&&ce>_e);return{tickInterval:m,minorTickInterval:r,bounds:{minVisible:e,maxVisible:t},ticks:[]}}(n,m,A,e):(X=UM({axisType:n.type,dataType:n.valueType,logBase:n.logarithmBase,allowNegatives:!0,linearThreshold:Math.abs(n.linearThreshold||0),axisDivisionFactor:n.axisDivisionFactor,minorAxisDivisionFactor:n.minorAxisDivisionFactor,calculateMinors:!0,allowDecimals:n.allowDecimals,endOnTick:n.endOnTick,incidentOccurred:t,rangeIsEmpty:i.isEmpty()})({min:m,max:A,categories:(0,C.O9)(V)?V.categories:[]},e,n.tickInterval,n.forceUserTickInterval,void 0,n.minorTickInterval,n.minorTickCount),ce=X.ticks.length,_e.minVisible=X.ticks[0]<m?X.ticks[0]:m,_e.maxVisible=X.ticks[ce-1]>A?X.ticks[ce-1]:A,r={tickInterval:X.tickInterval,minorTickInterval:0===n.minorTickInterval?0:X.minorTickInterval,bounds:_e,ticks:X.ticks}),r}(m,n.width,e._incidentOccurred,A),X=i&&i.isShowChart()&&i.getThemeManager();X&&dK(t&&t.valueAxis,X.getOptions("valueAxis").logarithmBase,e._incidentOccurred),function kJ(n,e,t,i,r){let m,A;const V=n._categoriesInfo;let X;const ce=n.valueType===JH;e&&!e.isEmpty()&&!t.isEmpty()&&(m=i.bounds,t.addRange(m),n.startValue=t.invert?m.maxVisible:m.minVisible,n.endValue=t.invert?m.minVisible:m.maxVisible),n.marker.visible=r(ce&&-1===n.type.indexOf(Lk),n.marker.visible,n.startValue,n.endValue,i.tickInterval),V&&(n.startValue=V.start,n.endValue=V.end),-1===n.type.indexOf(Lk)&&(A=(0,C.$P)(n.startValue)&&(0,C.$P)(n.endValue)&&n.startValue.getTime()===n.endValue.getTime()||n.startValue===n.endValue),n.isEmpty=function MJ(n,e){return!(0,C.O9)(n)||!(0,C.O9)(e)}(n.startValue,n.endValue)||A,n.isEmpty?n.startValue=n.endValue=void 0:(n.minorTickInterval=i.minorTickInterval,n.tickInterval=i.tickInterval,ce&&(!(0,C.O9)(n.label.format)||n.type===Bk&&n.minorTickInterval!==n.tickInterval)&&(n.label.format=n.type===Lk?Hd.A.getDateFormatByTicks(i.ticks):n.marker.visible?Tn.A.getDateFormatByTickInterval(n.tickInterval):Hd.A.getDateFormatByTickInterval(n.startValue,n.endValue,n.tickInterval))),n.type===Bk&&(X=function BJ(n){let e=n.startValue,t=n.endValue;const i="datetime"===n.valueType,r=uK(n),m=n.tickInterval,A={intervals:[]};return!(0,C.O9)(e)||!(0,C.O9)(t)||(A.intervals=Tn.A.getSequenceByInterval(e,t,n.minorTickInterval),m!==n.minorTickInterval&&(A.altIntervals=A.intervals,e=Mw(e,i,m,r),t=Mw(t,i,m,r),A.intervals=Tn.A.getSequenceByInterval(e,t,m),A.intervals[0]=A.altIntervals[0])),A}(n),n.customMinorTicks=X.altIntervals,n.customTicks=X.intervals,n.customBoundTicks=[n.customTicks[0]])}(m,i,A,V,function RJ(n){return function(e,t,i,r,m){return t&&e&&(!(0,C.O9)(m)||m.years||m.months>=6||n/50<kk((r-i)/Tn.A.dateToMilliseconds("year"))+1)&&(t=!1),t}}(n.width)),function OJ(n,e){let t=e.minorTickInterval||e.tickInterval;"datetime"===e.valueType&&(t=Tn.A.dateToMilliseconds(t)),n.addRange({interval:t})}(A,m);const ce=e._prepareSliderMarkersOptions(m,n.width,V,A),_e=function SJ(n,e,t,i,r){let m,X,ce,_e,Me,A=0,V=0;const Ve="semidiscrete"===e.type?e.customTicks:r.ticks;let Je,rt;return ce=(i=i||{}).left,_e=i.right,Me=t.placeholderHeight,t.visible&&(m=aK(n,e.startValue,t),X=aK(n,e.endValue,t),void 0===Me&&(Me=tW(m,X))),e.label.visible&&(Je=(0,C.O9)(e.startValue)?Ve[0]:void 0,rt=(0,C.O9)(e.endValue)?Ve[Ve.length-1]:void 0,A=lK(n,Je,e,r),V=lK(n,rt,e,r)),ce=void 0!==ce?ce:A,_e=(void 0!==_e?_e:V)||1,{left:ce,right:_e,top:Me||0,bottom:0}}(e._renderer,m,ce,e.option("indent"),V),Me={left:n.left+_e.left,top:n.top+_e.top,width:n.left+_e.left+tW(n.width-_e.left-_e.right,1),height:tW(r?24:n.height-_e.top-_e.bottom-wJ(e._renderer,m,EJ(m),V),0),right:0,bottom:0};e._axis.update(m,r,Me,A,i),m.minorTickInterval=m.isEmpty?0:m.minorTickInterval,e._updateElements(m,ce,r,Me,i),X&&X.dispose()},_updateElements:function(n,e,t,i,r){const m=this._getOption("behavior"),A=this._getOption("shutter"),V=n.type!==Bk;A.color=A.color||this._getOption("containerBackgroundColor",!0),this._rangeView.update(this.option("background"),this._themeManager.theme("background"),i,t,m.animationEnabled&&this._renderer.animationEnabled(),r),this._isUpdating=!0,this._slidersController.update([i.top,i.top+i.height],m,t,this._getOption("sliderHandle"),e,A,{minRange:V?this.option("scale.minRange"):void 0,maxRange:V?this.option("scale.maxRange"):void 0},this._axis.getFullTicks(),this._getOption("selectedRangeColor",!0)),this._requestChange(["SLIDER_SELECTION"]),this._isUpdating=!1,this._tracker.update(!this._axis.getTranslator().getBusinessRange().isEmpty(),m)},_createSeriesDataSource:function(n){const e=this;let t;const i=e._dataSourceItems(),r=e._getOption("scale"),m=r.valueType||cK(r.startValue,r.endValue),A=new Tp({renderer:e._renderer,axisType:"xyAxes",drawingType:"linear"});return A.updateOptions({isHorizontal:!1,label:{},categoriesSortingMethod:e._getOption("chart").valueAxis.categoriesSortingMethod}),(i||n&&n.series)&&(n=(0,_.X)({},n,{theme:e.option("theme")}),t=new eW({renderer:e._renderer,dataSource:i,valueType:Wi(m),axisType:r.type,chart:n,dataSourceField:e.option("dataSourceField"),incidentOccurred:e._incidentOccurred,categories:r.categories,argumentAxis:e._axis,valueAxis:A})),t},_prepareSliderMarkersOptions:function(n,e,t,i){const r=t.minorTickInterval,m=t.tickInterval;let A=m;const V=n.endValue,X=n.startValue,ce=this._getOption("sliderMarker"),_e=!this._getOption("behavior").snapToTicks,Me=n.type===Lk,Ve=n.valueType===JH;return ce.borderColor=this._getOption("containerBackgroundColor",!0),!ce.format&&!i.isEmpty()&&(_e&&(0,C.kf)(n.startValue)&&(ce.format={type:"fixedPoint",precision:NJ(X,V,e)}),Ve&&!Me&&((0,C.O9)(r)&&0!==r&&(A=function TJ(n,e,t){let i=Tn.A.getDateUnitInterval(e);const r=Tn.A.getDateUnitInterval(n),m=Tn.A.dateUnitIntervals.indexOf(i);return t&&i===r&&m>0&&(i=Tn.A.dateUnitIntervals[m-1]),i}(m,r,_e)),n.marker.visible?ce.format=Tn.A.getDateFormatByTickInterval(A):(0,C.O9)(X)&&(0,C.O9)(V)&&(ce.format=Hd.A.getDateFormatByTickInterval(X,V,A))),Ve&&Me&&t.ticks.length&&(ce.format=Hd.A.getDateFormatByTicks(t.ticks))),ce},getValue:function(){return Jr(this._slidersController.getSelectedRange())},setValue:function(n,e){const t=er(n);!this._isUpdating&&n&&(this._validateRange(t.startValue,t.endValue),!an(t,this._slidersController.getSelectedRange())&&this._slidersController.setSelectedRange(t,e))},_setContentSize:function(){this.__isResizing=2===this._changes.count(),this.callBase.apply(this,arguments)}});function HJ(){return 1}function UJ(n){return n%2==1?-QH(n/2):-n/2}function zJ(n,e,t,i){function r(A){2===A.length&&qs.areLabelsOverlap(e[A[0]],e[A[1]],t,i)&&n[A[0]].removeLabel()}function m(A){const V=[];for(let X=A;V.length<2&&X<n.length;X++)n[X].label&&V.push(X);return V}n.length<3||(r(m(0)),r(m(n.length-2).reverse()))}function iV(n){this._axis=new Tp({renderer:n.renderer,axesContainerGroup:n.root,scaleBreaksGroup:n.scaleBreaksGroup,labelsAxesGroup:n.labelsAxesGroup,incidentOccurred:n.incidentOccurred,axisType:"xyAxes",drawingType:"linear",widgetClass:"dxrs",axisClass:"range-selector",isArgumentAxis:!0,getTemplate(){}}),this._updateSelectedRangeCallback=n.updateSelectedRange,this._axis.getAxisSharpDirection=this._axis.getSharpDirectionByCoords=HJ,this._axis.getTickStartPositionShift=UJ,this._axis._checkShiftedLabels=zJ}(0,w.__)(["selectedRangeColor","containerBackgroundColor","sliderMarker","sliderHandle","shutter","background","behavior","chart","indent"],function(n,e){nP.prototype._optionChangesMap[e]="MOSTLY_TOTAL"}),iV.prototype={constructor:iV,update:function(n,e,t,i,r){const m=this._axis;m.updateOptions(function FJ(n,e,t,i){return n.marker.label.font=n.label.font,n.color=n.marker.color=n.tick.color,n.opacity=n.marker.opacity=n.tick.opacity,n.width=n.marker.width=n.tick.width,n.placeholderSize=(n.placeholderHeight||0)+i,n.argumentType=n.valueType,n.visible=e,n.isHorizontal=!0,n.calculateMinors=!0,n.semiDiscreteInterval=n.minRange,e||(n.minorTick.length=n.tick.length=t),n.label.indentFromAxis=n.label.topIndent+i,n}(n,e,t.height,t.height/2-kk(n.width/2))),m.validate(),m.setBusinessRange(i,!0),void 0!==r&&r.isShowChart()&&m.setMarginOptions(r.getMarginOptions(t)),m.draw(t),m.shift({left:0,bottom:-t.height/2+t.top}),m.getMarkerTrackers()&&function VJ(n,e,t){function i(r){const m=r.target.range,A=n.minRange?Tn.A.addInterval(m.startValue,n.minRange):void 0,V=n.maxRange?Tn.A.addInterval(m.startValue,n.maxRange):void 0;A&&A>m.endValue||V&&V<m.endValue||t(m,r)}(0,w.__)(e,function(r,m){m.on("dxpointerdown",i)})}(n,m.getMarkerTrackers(),this._updateSelectedRangeCallback),m.drawScaleBreaks({start:t.top,end:t.top+t.height})},visualRange:function(){},getViewport:function(){return{}},allScaleSelected(n){const{startValue:e,endValue:t}=this._axis.visualRange();return{startValue:n[0].valueOf()===e.valueOf(),endValue:n[1].valueOf()===t.valueOf()}},getOptions(){return this._axis.getOptions()||{}}},(0,w.__)(Tp.prototype,n=>{"constructor"!==n&&"_"!==n[0]&&(0,C.Tn)(Tp.prototype[n])&&!(n in iV.prototype)&&(iV.prototype[n]=function(){const e=this._axis;return e[n].apply(e,arguments)})}),(0,y.A)("dxRangeSelector",nP);const GJ=nP;nP.addPlugin(bv),nP.addPlugin(Xp),nP.addPlugin(LC),nP.addPlugin(cs);const WJ=GJ,$J={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>jJ),multi:!0};let jJ=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get background(){return this._getOption("background")}set background(t){this._setOption("background",t)}get behavior(){return this._getOption("behavior")}set behavior(t){this._setOption("behavior",t)}get chart(){return this._getOption("chart")}set chart(t){this._setOption("chart",t)}get containerBackgroundColor(){return this._getOption("containerBackgroundColor")}set containerBackgroundColor(t){this._setOption("containerBackgroundColor",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get dataSourceField(){return this._getOption("dataSourceField")}set dataSourceField(t){this._setOption("dataSourceField",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get export(){return this._getOption("export")}set export(t){this._setOption("export",t)}get indent(){return this._getOption("indent")}set indent(t){this._setOption("indent",t)}get loadingIndicator(){return this._getOption("loadingIndicator")}set loadingIndicator(t){this._setOption("loadingIndicator",t)}get margin(){return this._getOption("margin")}set margin(t){this._setOption("margin",t)}get pathModified(){return this._getOption("pathModified")}set pathModified(t){this._setOption("pathModified",t)}get redrawOnResize(){return this._getOption("redrawOnResize")}set redrawOnResize(t){this._setOption("redrawOnResize",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get scale(){return this._getOption("scale")}set scale(t){this._setOption("scale",t)}get selectedRangeColor(){return this._getOption("selectedRangeColor")}set selectedRangeColor(t){this._setOption("selectedRangeColor",t)}get selectedRangeUpdateMode(){return this._getOption("selectedRangeUpdateMode")}set selectedRangeUpdateMode(t){this._setOption("selectedRangeUpdateMode",t)}get shutter(){return this._getOption("shutter")}set shutter(t){this._setOption("shutter",t)}get size(){return this._getOption("size")}set size(t){this._setOption("size",t)}get sliderHandle(){return this._getOption("sliderHandle")}set sliderHandle(t){this._setOption("sliderHandle",t)}get sliderMarker(){return this._getOption("sliderMarker")}set sliderMarker(t){this._setOption("sliderMarker",t)}get theme(){return this._getOption("theme")}set theme(t){this._setOption("theme",t)}get title(){return this._getOption("title")}set title(t){this._setOption("title",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}onDisposing;onDrawn;onExported;onExporting;onFileSaving;onIncidentOccurred;onInitialized;onOptionChanged;onValueChanged;backgroundChange;behaviorChange;chartChange;containerBackgroundColorChange;dataSourceChange;dataSourceFieldChange;disabledChange;elementAttrChange;exportChange;indentChange;loadingIndicatorChange;marginChange;pathModifiedChange;redrawOnResizeChange;rtlEnabledChange;scaleChange;selectedRangeColorChange;selectedRangeUpdateModeChange;shutterChange;sizeChange;sliderHandleChange;sliderMarkerChange;themeChange;titleChange;valueChange;onBlur;change(t){}touched=t=>{};constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"drawn",emit:"onDrawn"},{subscribe:"exported",emit:"onExported"},{subscribe:"exporting",emit:"onExporting"},{subscribe:"fileSaving",emit:"onFileSaving"},{subscribe:"incidentOccurred",emit:"onIncidentOccurred"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"backgroundChange"},{emit:"behaviorChange"},{emit:"chartChange"},{emit:"containerBackgroundColorChange"},{emit:"dataSourceChange"},{emit:"dataSourceFieldChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"exportChange"},{emit:"indentChange"},{emit:"loadingIndicatorChange"},{emit:"marginChange"},{emit:"pathModifiedChange"},{emit:"redrawOnResizeChange"},{emit:"rtlEnabledChange"},{emit:"scaleChange"},{emit:"selectedRangeColorChange"},{emit:"selectedRangeUpdateModeChange"},{emit:"shutterChange"},{emit:"sizeChange"},{emit:"sliderHandleChange"},{emit:"sliderMarkerChange"},{emit:"themeChange"},{emit:"titleChange"},{emit:"valueChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new WJ(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("dataSource",t),this.setupChanges("value",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-range-selector"]],hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{background:"background",behavior:"behavior",chart:"chart",containerBackgroundColor:"containerBackgroundColor",dataSource:"dataSource",dataSourceField:"dataSourceField",disabled:"disabled",elementAttr:"elementAttr",export:"export",indent:"indent",loadingIndicator:"loadingIndicator",margin:"margin",pathModified:"pathModified",redrawOnResize:"redrawOnResize",rtlEnabled:"rtlEnabled",scale:"scale",selectedRangeColor:"selectedRangeColor",selectedRangeUpdateMode:"selectedRangeUpdateMode",shutter:"shutter",size:"size",sliderHandle:"sliderHandle",sliderMarker:"sliderMarker",theme:"theme",title:"title",value:"value"},outputs:{onDisposing:"onDisposing",onDrawn:"onDrawn",onExported:"onExported",onExporting:"onExporting",onFileSaving:"onFileSaving",onIncidentOccurred:"onIncidentOccurred",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",backgroundChange:"backgroundChange",behaviorChange:"behaviorChange",chartChange:"chartChange",containerBackgroundColorChange:"containerBackgroundColorChange",dataSourceChange:"dataSourceChange",dataSourceFieldChange:"dataSourceFieldChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",exportChange:"exportChange",indentChange:"indentChange",loadingIndicatorChange:"loadingIndicatorChange",marginChange:"marginChange",pathModifiedChange:"pathModifiedChange",redrawOnResizeChange:"redrawOnResizeChange",rtlEnabledChange:"rtlEnabledChange",scaleChange:"scaleChange",selectedRangeColorChange:"selectedRangeColorChange",selectedRangeUpdateModeChange:"selectedRangeUpdateModeChange",shutterChange:"shutterChange",sizeChange:"sizeChange",sliderHandleChange:"sliderHandleChange",sliderMarkerChange:"sliderMarkerChange",themeChange:"themeChange",titleChange:"titleChange",valueChange:"valueChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,$J,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},styles:["[_nghost-%COMP%]{display:block}"]})}return n})(),hK=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.y$D,z.lPC,z.iMv,z.o4I,z.XWi,z.WG2,z.NhN,z.A1g,z.lWu,z.Af1,z.uE7,z.tML,z.eeS,z.F2g,z.VTr,z.iDF,z.$jZ,z.Fhh,z._ql,z.ZRW,z.M5G,z.RKC,z.REv,z.VG3,z.tOy,z.sAn,z.PTP,z.ikq,z.y7y,z.r2Z,z.Pxf,z.aqX,z.IWb,z.Kkw,z.YTS,z.nu6,z.y1E,z.GzL,z.kxR,z.ZSJ,z.WNh,z.hJ,z.v5y,z.okf,z.Mj3,z.MXF,z.xOT,z.hU2,z.A_,z.uIe,z._gx,z.FXg,z.Yh3,z.CQq,z.ROy,z.HCS,z.ur_,z.GKz,z.PRc,z.EED,z.nE5,z.Pk1,z.lX9,z.w8p,z.ZlI,z.hzo,z.DjQ,z.NWO,z.sVF,z.YkV,f.p_,f.xZ,z.y$D,z.lPC,z.iMv,z.o4I,z.XWi,z.WG2,z.NhN,z.A1g,z.lWu,z.Af1,z.uE7,z.tML,z.eeS,z.F2g,z.VTr,z.iDF,z.$jZ,z.Fhh,z._ql,z.ZRW,z.M5G,z.RKC,z.REv,z.VG3,z.tOy,z.sAn,z.PTP,z.ikq,z.y7y,z.r2Z,z.Pxf,z.aqX,z.IWb,z.Kkw,z.YTS,z.nu6,z.y1E,z.GzL,z.kxR,z.ZSJ,z.WNh,z.hJ,z.v5y,z.okf,z.Mj3,z.MXF,z.xOT,z.hU2,z.A_,z.uIe,z._gx,z.FXg,z.Yh3,z.CQq,z.ROy,z.HCS,z.ur_,z.GKz,z.PRc,z.EED,z.nE5,z.Pk1,z.lX9,z.w8p,z.ZlI,z.hzo,z.DjQ,z.NWO,z.sVF,z.YkV,f.xZ]})}return n})();var KJ=M(3205),oV=M(8571);const pK=KJ.A.inherit({_supportedKeys(){const n=this.option("rtlEnabled"),e=this,t=function(A,V){e.option("start")===e.option("end")&&(e._capturedHandle=V,A.target=e._capturedHandle,L.A.trigger(e._capturedHandle,"focus"))},i=function(A,V,X){const _e=(0,a.A)(A.target).hasClass("dx-rangeslider-start-handle")?"start":"end";let Me=e.option(_e);V=e._valueStep(V),Me+=X*(n?-V:V),e.option(_e,Me)},r=function(A,V){t(A,n?e._$handleStart:e._$handleEnd),i(A,V,1)},m=function(A,V){t(A,n?e._$handleEnd:e._$handleStart),i(A,V,-1)};return(0,_.X)(this.callBase(),{leftArrow(A){this._processKeyboardEvent(A),m(A,this.option("step"))},rightArrow(A){this._processKeyboardEvent(A),r(A,this.option("step"))},pageUp(A){this._processKeyboardEvent(A),r(A,this.option("step")*this.option("keyStep"))},pageDown(A){this._processKeyboardEvent(A),m(A,this.option("step")*this.option("keyStep"))},home(A){this._processKeyboardEvent(A);const V=(0,a.A)(A.target).hasClass("dx-rangeslider-start-handle"),X=V?"start":"end",_e=this.option(V?"min":"start");this.option(X,_e)},end(A){this._processKeyboardEvent(A);const V=(0,a.A)(A.target).hasClass("dx-rangeslider-start-handle"),X=V?"start":"end",_e=this.option(V?"end":"max");this.option(X,_e)}})},_getDefaultOptions(){return(0,_.X)(this.callBase(),{start:40,end:60,value:[40,60],startName:"",endName:""})},_renderSubmitElement(){const n=this.$element();this._$submitStartElement=(0,a.A)("<input>").attr("type","hidden").attr("name",this.option("startName")).appendTo(n),this._$submitEndElement=(0,a.A)("<input>").attr("type","hidden").attr("name",this.option("endName")).appendTo(n)},_initOptions(n){this.callBase(n);const e=this.initialOption("value"),t=this.option("value");t[0]===e[0]&&t[1]===e[1]?this.option("value",[this.option("start"),this.option("end")]):this.option({start:t[0],end:t[1]})},_initMarkup(){this.$element().addClass("dx-rangeslider"),this.callBase()},_renderContentImpl(){this._callHandlerMethod("repaint"),this.callBase()},_renderHandle(){this._$handleStart=this._renderHandleImpl(this.option("start"),this._$handleStart).addClass("dx-rangeslider-start-handle"),this._$handleEnd=this._renderHandleImpl(this.option("end"),this._$handleEnd).addClass("dx-rangeslider-end-handle"),this._updateHandleAriaLabels()},_startHandler(n){const e=n.event,t=this._$range,i=(0,D.RG)(t),r=(0,N.rw)(e).x-this._$bar.offset().left,m=t.position().left,A=t.position().left+i,X=(this.option("rtlEnabled")?-1:1)*((m+A)/2-r)>0;this._capturedHandle=X?this._$handleStart:this._$handleEnd,this.callBase(n)},_updateHandleAriaLabels(){this.setAria("label",Wn.A.getFormatter("dxRangeSlider-ariaFrom")(this.option("dxRangeSlider-ariaFrom")),this._$handleStart),this.setAria("label",Wn.A.getFormatter("dxRangeSlider-ariaTill")(this.option("dxRangeSlider-ariaTill")),this._$handleEnd)},_activeHandle(){return this._capturedHandle},_updateHandlePosition(n){const t=this.option("rtlEnabled")?-1:1,i=this.option("max"),r=this.option("min");let m=this._startOffset+t*n.event.offset/this._swipePixelRatio();m=m.toPrecision(12);const A=m*(i-r)+r;this._updateSelectedRangePosition(m,m),oV.A.getInstance(this._activeHandle()),this._changeValueOnSwipe(m);const[V,X]=this._getActualValue();let ce;V===X&&(ce=A<V?this._$handleStart:this._$handleEnd,L.A.trigger(ce,"focus"),ce&&ce!==this._capturedHandle&&(this._updateSelectedRangePosition((V-r)/(i-r),(X-r)/(i-r)),this._toggleActiveState(this._activeHandle(),!1),this._toggleActiveState(ce,!0),this._capturedHandle=ce),this._updateSelectedRangePosition(m,m),this._changeValueOnSwipe(m))},_updateSelectedRangePosition(n,e){const t=this.option("rtlEnabled"),i=this._capturedHandle===this._$handleStart&&t||this._capturedHandle===this._$handleEnd&&!t;this._$range.css(i?"right":"left",t^i?100-100*e+"%":100*n+"%")},_setValueOnSwipe(n){const e=this._capturedHandle===this._$handleStart?"start":"end";let[t,i]=this._getActualValue();const r=this.option("max"),m=this.option("min");t=Math.min(Math.max(t,m),r),i=Math.min(Math.max(i,m),r),"start"===e?t=n>i?i:n:i=n<t?t:n,"onHandleMove"===this.option("valueChangeMode")?this.option("value",[t,i]):(this._actualValue=[t,i],this._renderValue())},_renderValue(){let[n,e]=this._getActualValue();const t=this.option("min"),i=this.option("max"),r=this.option("rtlEnabled");n=Math.max(t,Math.min(n,i)),e=Math.max(n,Math.min(e,i)),"onHandleMove"===this.option("valueChangeMode")&&(this._setOptionWithoutOptionChange("start",n),this._setOptionWithoutOptionChange("end",e),this._setOptionWithoutOptionChange("value",[n,e])),this._$submitStartElement.val((0,h.EG)(n)),this._$submitEndElement.val((0,h.EG)(e));const A=i===t?0:(e-t)/(i-t),V=`${parseFloat((100*(i===t?0:(n-t)/(i-t))).toPrecision(12))}%`,X=`${parseFloat((100*(1-A)).toPrecision(12))}%`;!this._needPreventAnimation&&this._setRangeStyles({right:r?V:X,left:r?X:V}),oV.A.getInstance(this._$handleStart).option("value",n),oV.A.getInstance(this._$handleEnd).option("value",e)},_callHandlerMethod(n,e){oV.A.getInstance(this._$handleStart)[n](e),oV.A.getInstance(this._$handleEnd)[n](e)},_setValueOption(){const n=this.option("start"),e=this.option("end");this.option("value",[n,e])},_rangesAreEqual:(n,e)=>n[0]===e[0]&&n[1]===e[1],_optionChanged(n){switch(n.name){case"value":{if(this._rangesAreEqual(n.value,n.previousValue))break;this._setOptionWithoutOptionChange("start",n.value[0]),this._setOptionWithoutOptionChange("end",n.value[1]),this._renderValue();const e=this.option("start"),t=this.option("end"),i=!this._rangesAreEqual(this._initialValue,n.value);this.option("isDirty",i),this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})({start:e,end:t,value:[e,t],event:this._valueChangeEventInstance,previousValue:n.previousValue}),this.validationRequest.fire({value:[e,t],editor:this}),this._saveValueChangeEvent(void 0);break}case"start":case"end":this._setValueOption();break;case"startName":this._$submitStartElement.attr("name",n.value);break;case"endName":this._$submitEndElement.attr("name",n.value);break;case"name":break;default:this.callBase(n)}}});(0,y.A)("dxRangeSlider",pK);const XJ=pK,YJ={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>ZJ),multi:!0};let ZJ=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get end(){return this._getOption("end")}set end(t){this._setOption("end",t)}get endName(){return this._getOption("endName")}set endName(t){this._setOption("endName",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get keyStep(){return this._getOption("keyStep")}set keyStep(t){this._setOption("keyStep",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showRange(){return this._getOption("showRange")}set showRange(t){this._setOption("showRange",t)}get start(){return this._getOption("start")}set start(t){this._setOption("start",t)}get startName(){return this._getOption("startName")}set startName(t){this._setOption("startName",t)}get step(){return this._getOption("step")}set step(t){this._setOption("step",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get tooltip(){return this._getOption("tooltip")}set tooltip(t){this._setOption("tooltip",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeMode(){return this._getOption("valueChangeMode")}set valueChangeMode(t){this._setOption("valueChangeMode",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;endChange;endNameChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;keyStepChange;labelChange;maxChange;minChange;readOnlyChange;rtlEnabledChange;showRangeChange;startChange;startNameChange;stepChange;tabIndexChange;tooltipChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeModeChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"endChange"},{emit:"endNameChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"keyStepChange"},{emit:"labelChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showRangeChange"},{emit:"startChange"},{emit:"startNameChange"},{emit:"stepChange"},{emit:"tabIndexChange"},{emit:"tooltipChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeModeChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new XJ(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("validationErrors",t),this.setupChanges("value",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-range-slider"]],hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",end:"end",endName:"endName",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",keyStep:"keyStep",label:"label",max:"max",min:"min",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showRange:"showRange",start:"start",startName:"startName",step:"step",tabIndex:"tabIndex",tooltip:"tooltip",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeMode:"valueChangeMode",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",endChange:"endChange",endNameChange:"endNameChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",keyStepChange:"keyStepChange",labelChange:"labelChange",maxChange:"maxChange",minChange:"minChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showRangeChange:"showRangeChange",startChange:"startChange",startNameChange:"startNameChange",stepChange:"stepChange",tabIndexChange:"tabIndexChange",tooltipChange:"tooltipChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeModeChange:"valueChangeModeChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,YJ,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),gK=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.uE7,z.Pxf,z.Vku,f.p_,f.xZ,z.uE7,z.Pxf,z.Vku,f.xZ]})}return n})();var QJ=M(4308),JJ=M(8638),qJ=M(6620);const $s_addOffsets=(n,e)=>{const t=e.reduce((i,r)=>i+r,n.getTime());return new Date(t)};var kx,n;(n=kx||(kx={})).fromSourceToAppointment="toAppointment",n.fromAppointmentToSource="fromAppointment",n.fromSourceToGrid="toGrid",n.fromGridToSource="fromGrid";const fK=Tn.A.dateToMilliseconds;class eq{constructor(e){this.options=e}createDate(e,t){const i=new Date(e);switch(t.path){case kx.fromSourceToAppointment:return this.getConvertedDate(i,t.appointmentTimeZone,!0,!1);case kx.fromAppointmentToSource:return this.getConvertedDate(i,t.appointmentTimeZone,!0,!0);case kx.fromSourceToGrid:return this.getConvertedDate(i,t.appointmentTimeZone,!1,!1);case kx.fromGridToSource:return this.getConvertedDate(i,t.appointmentTimeZone,!1,!0);default:throw new Error("not specified pathTimeZoneConversion")}}getOffsets(e,t){const i=-this.getClientOffset(e)/Tn.A.dateToMilliseconds("hour"),r=this.getCommonOffset(e),m=this.getAppointmentOffset(e,t);return{client:i,common:(0,C.O9)(r)?r:i,appointment:"number"!=typeof m?i:m}}getConvertedDateByOffsets(e,t,i,r){const m=r?-1:1,A=new Date(e);return $s_addOffsets(A,[m*(fK("hour")*i),-m*(fK("hour")*t)])}getOriginStartDateOffsetInMs(e,t,i){return 36e5*this.getOffsetInHours(e,t,i)}getOffsetInHours(e,t,i){const{client:r,appointment:m,common:A}=this.getOffsets(e,t);return t&&i?m-r:t&&!i?m-A:!t&&i?A-r:0}getClientOffset(e){return this.options.getClientOffset(e)}getCommonOffset(e){return this.options.tryGetCommonOffset(e)}getAppointmentOffset(e,t){return this.options.tryGetAppointmentOffset(e,t)}getConvertedDate(e,t,i,r){const m=new Date(e.getTime()),A=this.getOffsets(m,t);return this.getConvertedDateByOffsets(e,A.client,i&&t?A.appointment:A.common,r)}}const tq=Tn.A.dateToMilliseconds;class nq{constructor(e){this._source=new Date(e.getTime?e.getTime():e)}get source(){return this._source}result(){return this._source}getTimezoneOffset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;const t=this._source.getTimezoneOffset();return"minute"===e?t*tq("minute"):t}getTime(){return this._source.getTime()}setTime(e){return this._source.setTime(e),this}addTime(e){return this._source.setTime(this._source.getTime()+e),this}setMinutes(e){return this._source.setMinutes(e),this}addMinutes(e){return this._source.setMinutes(this._source.getMinutes()+e),this}subtractMinutes(e){return this._source.setMinutes(this._source.getMinutes()-e),this}}var oW=M(3686);const rW=new class sq{constructor(){this.map=new Map}tryGet(e){if(!this.map.get(e)){const t=mK.getTimezoneById(e);if(!t)return!1;const i=(n=>{const{offsets:e}=n,{offsetIndices:t}=n,{untils:i}=n,r=e.split("|").map(X=>parseInt(X)),m=t.split("").map(X=>parseInt(X)),A=(n=>n.split("|").map(e=>"Infinity"===e?null:1e3*parseInt(e,36)))(i).map((V=0,X=>V+=X));var V;return{offsetList:r,offsetIndexList:m,dateList:A}})(t);this.map.set(e,i)}return this.map.get(e)}},mK={_tzCache:rW,getTimeZonesOld:()=>(0,oW.A)().timezones??[],formatOffset(n){const e=Math.floor(n),t=n-e;return((0,ri._S)(n)>=0?"+":"-")+`0${Math.abs(e)}`.slice(-2)+(t>0?":"+60*t:":00")},formatId:n=>n.split("/").join(" - ").split("_").join(" "),getTimezoneById(n){if(!n)return;const e=this.getTimeZonesOld();for(let t=0;t<e.length;t++)if(e[t].id===n)return e[t]},getTimeZoneOffsetById(n,e){const t=rW.tryGet(n);return t?this.getUtcOffset(t,e):void 0},getTimeZoneDeclarationTuple(n,e){const t=rW.tryGet(n);return t?this.getTimeZoneDeclarationTupleCore(t,e):[]},getTimeZoneDeclarationTupleCore(n,e){const{offsetList:t}=n,{offsetIndexList:i}=n,{dateList:r}=n,m=[];for(let A=0;A<r.length;A++){const V=r[A],X=new Date(V).getFullYear();if(X===e&&m.push({date:V,offset:-t[i[A+1]]/60}),X>e)break}return m},getUtcOffset(n,e){const{offsetList:t}=n,{offsetIndexList:i}=n,{dateList:r}=n;let A=r.length-1-1;for(;A>=0&&e<r[A];)A--;const V=t[i[A+1]];return-V/60||V}},rV=mK,_K={value:["Etc/GMT+12","Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago","Pacific/Samoa","US/Samoa","Etc/GMT+10","HST","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti","US/Hawaii","Pacific/Marquesas","America/Adak","America/Atka","Etc/GMT+9","Pacific/Gambier","US/Aleutian","America/Anchorage","America/Juneau","America/Metlakatla","America/Nome","America/Sitka","America/Yakutat","Etc/GMT+8","Pacific/Pitcairn","US/Alaska","America/Creston","America/Dawson_Creek","America/Dawson","America/Ensenada","America/Fort_Nelson","America/Hermosillo","America/Los_Angeles","America/Phoenix","America/Santa_Isabel","America/Tijuana","America/Vancouver","America/Whitehorse","Canada/Pacific","Canada/Yukon","Etc/GMT+7","Mexico/BajaNorte","MST","PST8PDT","US/Arizona","US/Pacific","America/Belize","America/Boise","America/Cambridge_Bay","America/Chihuahua","America/Costa_Rica","America/Denver","America/Edmonton","America/El_Salvador","America/Guatemala","America/Inuvik","America/Managua","America/Mazatlan","America/Monterrey","America/Ojinaga","America/Regina","America/Shiprock","America/Swift_Current","America/Tegucigalpa","America/Yellowknife","Canada/Mountain","Canada/Saskatchewan","Chile/EasterIsland","Etc/GMT+6","Mexico/BajaSur","MST7MDT","Navajo","Pacific/Easter","Pacific/Galapagos","US/Mountain","America/Atikokan","America/Bahia_Banderas","America/Bogota","America/Cancun","America/Cayman","America/Chicago","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Indiana/Knox","America/Indiana/Tell_City","America/Jamaica","America/Knox_IN","America/Lima","America/Matamoros","America/Menominee","America/Merida","America/Mexico_City","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Panama","America/Porto_Acre","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Rio_Branco","America/Winnipeg","Brazil/Acre","Canada/Central","CST6CDT","EST","Etc/GMT+5","Jamaica","Mexico/General","US/Central","US/Indiana-Starke","America/Anguilla","America/Antigua","America/Aruba","America/Asuncion","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Campo_Grande","America/Caracas","America/Cuiaba","America/Curacao","America/Detroit","America/Dominica","America/Fort_Wayne","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Havana","America/Indiana/Indianapolis","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Iqaluit","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Louisville","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port_of_Spain","America/Port-au-Prince","America/Porto_Velho","America/Puerto_Rico","America/Santiago","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Thunder_Bay","America/Toronto","America/Tortola","America/Virgin","Brazil/West","Canada/Eastern","Chile/Continental","Cuba","EST5EDT","Etc/GMT+4","US/East-Indiana","US/Eastern","US/Michigan","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Bahia","America/Belem","America/Buenos_Aires","America/Catamarca","America/Cayenne","America/Cordoba","America/Fortaleza","America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Jujuy","America/Maceio","America/Mendoza","America/Moncton","America/Montevideo","America/Paramaribo","America/Punta_Arenas","America/Recife","America/Rosario","America/Santarem","America/Sao_Paulo","America/Thule","Antarctica/Palmer","Antarctica/Rothera","Atlantic/Bermuda","Atlantic/Stanley","Brazil/East","Canada/Atlantic","Etc/GMT+3","America/St_Johns","Canada/Newfoundland","America/Godthab","America/Miquelon","America/Noronha","America/Nuuk","Atlantic/South_Georgia","Brazil/DeNoronha","Etc/GMT+2","Atlantic/Cape_Verde","Etc/GMT+1","Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Africa/Timbuktu","America/Danmarkshavn","America/Scoresbysund","Atlantic/Azores","Atlantic/Reykjavik","Atlantic/St_Helena","Etc/GMT-0","Etc/GMT","Etc/GMT+0","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/Universal","Etc/UTC","Etc/Zulu","GMT-0","GMT","GMT+0","GMT0","Greenwich","Iceland","UCT","Universal","UTC","Zulu","Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Casablanca","Africa/Douala","Africa/El_Aaiun","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Atlantic/Canary","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Madeira","Eire","Etc/GMT-1","Europe/Belfast","Europe/Dublin","Europe/Guernsey","Europe/Isle_of_Man","Europe/Jersey","Europe/Lisbon","Europe/London","GB-Eire","GB","Portugal","WET","Africa/Blantyre","Africa/Bujumbura","Africa/Cairo","Africa/Ceuta","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Khartoum","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Tripoli","Africa/Windhoek","Antarctica/Troll","Arctic/Longyearbyen","Atlantic/Jan_Mayen","CET","Egypt","Etc/GMT-2","Europe/Amsterdam","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Busingen","Europe/Copenhagen","Europe/Gibraltar","Europe/Kaliningrad","Europe/Ljubljana","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/San_Marino","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Libya","MET","Poland","Africa/Addis_Ababa","Africa/Asmara","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Asia/Aden","Asia/Amman","Asia/Baghdad","Asia/Bahrain","Asia/Beirut","Asia/Damascus","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Istanbul","Asia/Jerusalem","Asia/Kuwait","Asia/Nicosia","Asia/Qatar","Asia/Riyadh","Asia/Tel_Aviv","EET","Etc/GMT-3","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Istanbul","Europe/Kiev","Europe/Kirov","Europe/Mariehamn","Europe/Minsk","Europe/Moscow","Europe/Nicosia","Europe/Riga","Europe/Simferopol","Europe/Sofia","Europe/Tallinn","Europe/Tiraspol","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte","Israel","Turkey","W-SU","Asia/Baku","Asia/Dubai","Asia/Muscat","Asia/Tbilisi","Asia/Yerevan","Etc/GMT-4","Europe/Astrakhan","Europe/Samara","Europe/Saratov","Europe/Ulyanovsk","Europe/Volgograd","Indian/Mahe","Indian/Mauritius","Indian/Reunion","Asia/Kabul","Asia/Tehran","Iran","Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Dushanbe","Asia/Karachi","Asia/Oral","Asia/Qyzylorda","Asia/Samarkand","Asia/Tashkent","Asia/Yekaterinburg","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives","Asia/Calcutta","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Katmandu","Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Dacca","Asia/Dhaka","Asia/Kashgar","Asia/Omsk","Asia/Qostanay","Asia/Thimbu","Asia/Thimphu","Asia/Urumqi","Etc/GMT-6","Indian/Chagos","Asia/Rangoon","Asia/Yangon","Indian/Cocos","Antarctica/Davis","Asia/Bangkok","Asia/Barnaul","Asia/Ho_Chi_Minh","Asia/Hovd","Asia/Jakarta","Asia/Krasnoyarsk","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Tomsk","Asia/Vientiane","Etc/GMT-7","Indian/Christmas","Antarctica/Casey","Asia/Brunei","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Harbin","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macao","Asia/Macau","Asia/Makassar","Asia/Manila","Asia/Shanghai","Asia/Singapore","Asia/Taipei","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Australia/Perth","Australia/West","Etc/GMT-8","Hongkong","PRC","ROC","Singapore","Australia/Eucla","Asia/Chita","Asia/Dili","Asia/Jayapura","Asia/Khandyga","Asia/Pyongyang","Asia/Seoul","Asia/Tokyo","Asia/Yakutsk","Etc/GMT-9","Japan","Pacific/Palau","ROK","Australia/Adelaide","Australia/Broken_Hill","Australia/Darwin","Australia/North","Australia/South","Australia/Yancowinna","Antarctica/DumontDUrville","Asia/Ust-Nera","Asia/Vladivostok","Australia/ACT","Australia/Brisbane","Australia/Canberra","Australia/Currie","Australia/Hobart","Australia/Lindeman","Australia/Melbourne","Australia/NSW","Australia/Queensland","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Etc/GMT-10","Pacific/Chuuk","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk","Pacific/Yap","Australia/LHI","Australia/Lord_Howe","Antarctica/Macquarie","Asia/Magadan","Asia/Sakhalin","Asia/Srednekolymsk","Etc/GMT-11","Pacific/Bougainville","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Norfolk","Pacific/Noumea","Pacific/Pohnpei","Pacific/Ponape","Antarctica/McMurdo","Antarctica/South_Pole","Asia/Anadyr","Asia/Kamchatka","Etc/GMT-12","Kwajalein","NZ","Pacific/Auckland","Pacific/Fiji","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis","NZ-CHAT","Pacific/Chatham","Etc/GMT-13","Pacific/Apia","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu","Etc/GMT-14","Pacific/Kiritimati"]},sV=Tn.A.dateToMilliseconds,eU="GMT",aq=/^GMT(?:[+-]\d{2}:\d{2})?$/,vK=n=>new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes())),CK=(n,e,t,i)=>tU(t,i)-tU(n,e),tU=(n,e)=>new Date(n).getTimezoneOffset()-new Date(e).getTimezoneOffset(),sW=(n,e)=>tU(n,e)*sV("minute"),yK=n=>n instanceof Date&&!isNaN(n.valueOf()),nU=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!n)return;if(!_K.value.includes(n))return void go.A.log("W0009",n);if(!yK(e))return;let i=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(0===rV.getTimeZonesOld().length)return;const i=vK(e);return rV.getTimeZoneOffsetById(n,i.getTime())}(n,e);return void 0===i&&(i=function(n){const t=bK(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date);if(void 0===t)return;if(t===eU)return 0;const i="-"===t.substring(3,4),r=t.substring(4,6),m=t.substring(7,9),A=parseInt(r,10)+parseInt(m,10)/60;return i?-A:A}(n,e)),i},bK=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,t="";try{var i;t=(null===(i=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).formatToParts(e).find(A=>{let{type:V}=A;return"timeZoneName"===V}))||void 0===i?void 0:i.value)??""}catch{return void go.A.log("W0009",n)}if(aq.test(t))return t;go.A.log("W0009",n)},fq=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!yK(e))return"";const t=n.replace(/\//g," - ").replace(/_/g," "),i=bK(n,e);return void 0===i?void 0:`(${(n=>n===eU?`${n} +00:00`:n.replace(eU,`${eU} `))(i)}) ${t}`},iU=(n,e,t)=>{const i=nU(t,n),r=nU(t,e);return void 0===i||void 0===r?0:i-r},xK=n=>{const e=new Date(new Date(n).setHours(0,0,0,0)),t=new Date(new Date(n).setHours(23,59,59,0));return e.getTimezoneOffset()-t.getTimezoneOffset()!=0},aW=function(){return 6e4*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date).getTimezoneOffset()},SK=()=>{const[n,e]=Sq();return n.getTimezoneOffset()!==e.getTimezoneOffset()},aV=n=>-n.getTimezoneOffset()/60,EK=n=>new Date(n-sV("hour")),OK=(n,e)=>1===rV.getTimeZonesOld().filter(r=>r.id===n).length&&((n,e)=>{const t=e.getFullYear(),i=rV.getTimeZoneDeclarationTuple(n,t),[r,m]=i;if(i.length<2)return rV.getTimeZoneOffsetById(n,e)===aV(e)&&!SK();const V=aV(new Date(r.date)),X=aV(new Date(m.date));return!(V!==r.offset||V===aV(EK(r.date))||X!==m.offset||X===aV(EK(m.date)))})(n,e),Sq=()=>{const n=new Date(Date.now()),e=new Date,t=new Date;return e.setFullYear(n.getFullYear(),0,1),t.setFullYear(n.getFullYear(),6,1),[e,t]},Aa={getDaylightOffset:tU,getDaylightOffsetInMs:sW,getTimezoneOffsetChangeInMinutes:CK,getTimezoneOffsetChangeInMs:(n,e,t,i)=>CK(n,e,t,i)*sV("minute"),calculateTimezoneByValue:nU,getCorrectedDateByDaylightOffsets:(n,e,t,i,r)=>{const V=iU(n,e,i)-iU(n,e,r);return new Date(t.getTime()-V*sV("hour"))},isSameAppointmentDates:(n,e)=>(e=new Date(e.getTime()-1),Tn.A.sameDate(n,e)),correctRecurrenceExceptionByTimezone:function(n,e,t,i){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],m=(n.getTimezoneOffset()-e.getTimezoneOffset())/60;return i?m=iU(e,n,i):t&&(m=iU(e,n,t)),new Date(n.getTime()+(r?-1:1)*m*sV("hour"))},getClientTimezoneOffset:aW,getDiffBetweenClientTimezoneOffsets:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return aW(n)-aW(e)},createUTCDateWithLocalOffset:n=>n?new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds())):null,createDateFromUTCWithLocalOffset:n=>{const e=(n=>new nq(n))(n),t=e.getTimezoneOffset();return e.addTime(e.getTimezoneOffset("minute")),e.subtractMinutes(t-e.getTimezoneOffset()),e.source},createUTCDate:vK,isTimezoneChangeInDate:xK,getDateWithoutTimezoneChange:n=>{const e=new Date(n);if(xK(e)){const t=new Date(e);return new Date(t.setDate(t.getDate()+1))}return e},hasDSTInLocalTimeZone:SK,isEqualLocalTimeZone:function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return!(!Intl||Intl.DateTimeFormat().resolvedOptions().timeZone!==n)||OK(n,e)},isEqualLocalTimeZoneByDeclaration:OK,getTimeZones:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return _K.value.map(e=>({offset:nU(e,n),title:fq(e,n),id:e}))},setOffsetsToDate:(n,e)=>{const t=e.reduce((i,r)=>i+r,n.getTime());return new Date(t)},addOffsetsWithoutDST:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];const r=$s_addOffsets(n,t),m=sW(n,r);if(!m)return r;const A=$s_addOffsets(r,[-m]);return sW(r,A)?r:A}};var lW=["MO","TU","WE","TH","FR","SA","SU"],Lf=function(){function n(e,t){if(0===t)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return n.fromStr=function(e){return new n(lW.indexOf(e))},n.prototype.nth=function(e){return this.n===e?this:new n(this.weekday,e)},n.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},n.prototype.toString=function(){var e=lW[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},n.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},n}(),Qu=function(n){return null!=n},Lx=function(n){return"number"==typeof n},wK=function(n){return"string"==typeof n&&lW.includes(n)},K_=Array.isArray,Bx=function(n,e){void 0===e&&(e=n),1===arguments.length&&(e=n,n=0);for(var t=[],i=n;i<e;i++)t.push(i);return t},Fl=function(n,e){var t=0,i=[];if(K_(n))for(;t<e;t++)i[t]=[].concat(n);else for(;t<e;t++)i[t]=n;return i},Oq=function(n){return K_(n)?n:[n]};function Nk(n,e,t){void 0===t&&(t=" ");var i=String(n);return i.length>(e|=0)?String(i):((e-=i.length)>t.length&&(t+=Fl(t,e/t.length)),t.slice(0,e)+String(i))}var wq=function(n,e,t){var i=n.split(e);return t?i.slice(0,t).concat([i.slice(t).join(e)]):i},pC=function(n,e){var t=n%e;return t*e<0?t+e:t},cW=function(n,e){return{div:Math.floor(n/e),mod:pC(n,e)}},Nx=function(n){return!Qu(n)||0===n.length},Zh=function(n){return!Nx(n)},Rc=function(n,e){return Zh(n)&&-1!==n.indexOf(e)},iP=function(n,e,t,i,r,m){return void 0===i&&(i=0),void 0===r&&(r=0),void 0===m&&(m=0),new Date(Date.UTC(n,e-1,t,i,r,m))},Tq=[31,28,31,30,31,30,31,31,30,31,30,31],DK=iP(1970,1,1),Dq=[6,0,1,2,3,4,5],lV=function(n){return n%4==0&&n%100!=0||n%400==0},AK=function(n){return n instanceof Date},cV=function(n){return AK(n)&&!isNaN(n.getTime())},uW=function(n){return function(n,e){var t=n.getTime(),i=e.getTime();return Math.round((t-i)/864e5)}(n,DK)},IK=function(n){return new Date(DK.getTime()+864e5*n)},Iq=function(n){var e=n.getUTCMonth();return 1===e&&lV(n.getUTCFullYear())?29:Tq[e]},Fk=function(n){return Dq[n.getUTCDay()]},PK=function(n,e){var t=iP(n,e+1,1);return[Fk(t),Iq(t)]},MK=function(n,e){return e=e||n,new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},hW=function(n){return new Date(n.getTime())},RK=function(n){for(var e=[],t=0;t<n.length;t++)e.push(hW(n[t]));return e},dV=function(n){n.sort(function(e,t){return e.getTime()-t.getTime()})},pW=function(n,e){void 0===e&&(e=!0);var t=new Date(n);return[Nk(t.getUTCFullYear().toString(),4,"0"),Nk(t.getUTCMonth()+1,2,"0"),Nk(t.getUTCDate(),2,"0"),"T",Nk(t.getUTCHours(),2,"0"),Nk(t.getUTCMinutes(),2,"0"),Nk(t.getUTCSeconds(),2,"0"),e?"Z":""].join("")},gW=function(n){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(n);if(!t)throw new Error("Invalid UNTIL value: ".concat(n));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},kK=function(n,e){return n.toLocaleString("sv-SE",{timeZone:e}).replace(" ","T")+"Z"},Mq=function(){function n(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return n.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,i=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(i)return!1}else if("before"===this.method){if(i)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},n.prototype.add=function(e){return this._result.push(e),!0},n.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},n.prototype.clone=function(){return new n(this.method,this.args)},n}();const Vk=Mq;var Lr=M(7270),Rq=function(n){function e(t,i,r){var m=n.call(this,t,i)||this;return m.iterator=r,m}return(0,Lr.C6)(e,n),e.prototype.add=function(t){return!!this.iterator(t,this._result.length)&&(this._result.push(t),!0)},e}(Vk);const LK=Rq,oU={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var BK=function(n,e){return-1!==n.indexOf(e)},Lq=function(n){return n.toString()},Bq=function(n,e,t){return"".concat(e," ").concat(t,", ").concat(n)},Nq=function(){function n(e,t,i,r){if(void 0===t&&(t=Lq),void 0===i&&(i=oU),void 0===r&&(r=Bq),this.text=[],this.language=i||oU,this.gettext=t,this.dateFormatter=r,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var m=[].concat(this.options.bymonthday),A=[].concat(this.options.bynmonthday);m.sort(function(_e,Me){return _e-Me}),A.sort(function(_e,Me){return Me-_e}),this.bymonthday=m.concat(A),this.bymonthday.length||(this.bymonthday=null)}if(Qu(this.origOptions.byweekday)){var V=K_(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],X=String(V);this.byweekday={allWeeks:V.filter(function(_e){return!_e.n}),someWeeks:V.filter(function(_e){return!!_e.n}),isWeekdays:-1!==X.indexOf("MO")&&-1!==X.indexOf("TU")&&-1!==X.indexOf("WE")&&-1!==X.indexOf("TH")&&-1!==X.indexOf("FR")&&-1===X.indexOf("SA")&&-1===X.indexOf("SU"),isEveryDay:-1!==X.indexOf("MO")&&-1!==X.indexOf("TU")&&-1!==X.indexOf("WE")&&-1!==X.indexOf("TH")&&-1!==X.indexOf("FR")&&-1!==X.indexOf("SA")&&-1!==X.indexOf("SU")};var ce=function(_e,Me){return _e.weekday-Me.weekday};this.byweekday.allWeeks.sort(ce),this.byweekday.someWeeks.sort(ce),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(e){if(!(e.options.freq in n.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var i in e.origOptions){if(BK(["dtstart","tzid","wkst","freq"],i))return!0;if(!BK(n.IMPLEMENTED[e.options.freq],i))return!1}return!0},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[ma.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},n.prototype.HOURLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},n.prototype.MINUTELY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},n.prototype.DAILY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.byweekday&&this.byweekday.isWeekdays?this.plural(this.options.interval)?e("weekdays"):e("weekday"):this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},n.prototype.WEEKLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(1===this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},n.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},n.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},n.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},n.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},n.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,i=this.gettext;if(-1===e)return i("last");var r=Math.abs(e);switch(r){case 1:case 21:case 31:t=r+i("st");break;case 2:case 22:t=r+i("nd");break;case 3:case 23:t=r+i("rd");break;default:t=r+i("th")}return e<0?t+" "+i("last"):t},n.prototype.monthtext=function(e){return this.language.monthNames[e-1]},n.prototype.weekdaytext=function(e){var t=Lx(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},n.prototype.plural=function(e){return e%100!=1},n.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},n.prototype.list=function(e,t,i,r){var m=this;void 0===r&&(r=","),K_(e)||(e=[e]),t=t||function(X){return X.toString()};var V=function(X){return t&&t.call(m,X)};return i?function(X,ce,_e){for(var Me="",Ve=0;Ve<X.length;Ve++)0!==Ve&&(Me+=Ve===X.length-1?" "+_e+" ":ce+" "),Me+=X[Ve];return Me}(e.map(V),r,i):e.map(V).join(r+" ")},n}();const NS=Nq;var Fq=function(){function n(e){this.done=!0,this.rules=e}return n.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},n.prototype.isDone=function(){return this.done&&null===this.symbol},n.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;for(var r in e=null,this.rules){var m=this.rules[r].exec(this.text);m&&(null===e||m[0].length>e[0].length)&&(e=m,t=r)}if(null!=e&&(this.text=this.text.substr(e[0].length),""===this.text&&(this.done=!0)),null==e)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===t);return this.symbol=t,this.value=e,!0},n.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},n}();function NK(n,e){void 0===e&&(e=oU);var t={},i=new Fq(e.tokens);return i.start(n)?(function r(){i.expect("every");var Ve=i.acceptNumber();if(Ve&&(t.interval=parseInt(Ve[0],10)),i.isDone())throw new Error("Unexpected end");switch(i.symbol){case"day(s)":t.freq=ma.DAILY,i.nextSymbol()&&(A(),Me());break;case"weekday(s)":t.freq=ma.WEEKLY,t.byweekday=[ma.MO,ma.TU,ma.WE,ma.TH,ma.FR],i.nextSymbol(),A(),Me();break;case"week(s)":t.freq=ma.WEEKLY,i.nextSymbol()&&(m(),A(),Me());break;case"hour(s)":t.freq=ma.HOURLY,i.nextSymbol()&&(m(),Me());break;case"minute(s)":t.freq=ma.MINUTELY,i.nextSymbol()&&(m(),Me());break;case"month(s)":t.freq=ma.MONTHLY,i.nextSymbol()&&(m(),Me());break;case"year(s)":t.freq=ma.YEARLY,i.nextSymbol()&&(m(),Me());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=ma.WEEKLY;var Je=i.symbol.substr(0,2).toUpperCase();if(t.byweekday=[ma[Je]],!i.nextSymbol())return;for(;i.accept("comma");){if(i.isDone())throw new Error("Unexpected end");var rt=X();if(!rt)throw new Error("Unexpected symbol "+i.symbol+", expected weekday");t.byweekday.push(ma[rt]),i.nextSymbol()}A(),function _e(){i.accept("on"),i.accept("the");var Ve=ce();if(Ve)for(t.bymonthday=[Ve],i.nextSymbol();i.accept("comma");){if(!(Ve=ce()))throw new Error("Unexpected symbol "+i.symbol+"; expected monthday");t.bymonthday.push(Ve),i.nextSymbol()}}(),Me();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=ma.YEARLY,t.bymonth=[V()],!i.nextSymbol())return;for(;i.accept("comma");){if(i.isDone())throw new Error("Unexpected end");var Ct=V();if(!Ct)throw new Error("Unexpected symbol "+i.symbol+", expected month");t.bymonth.push(Ct),i.nextSymbol()}m(),Me();break;default:throw new Error("Unknown symbol")}}(),t):null;function m(){var Ve=i.accept("on"),Je=i.accept("the");if(Ve||Je)do{var rt=ce(),Ct=X(),Xt=V();if(rt)Ct?(i.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(ma[Ct].nth(rt))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(rt),i.accept("day(s)"));else if(Ct)i.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(ma[Ct]);else if("weekday(s)"===i.symbol)i.nextSymbol(),t.byweekday||(t.byweekday=[ma.MO,ma.TU,ma.WE,ma.TH,ma.FR]);else if("week(s)"===i.symbol){i.nextSymbol();var On=i.acceptNumber();if(!On)throw new Error("Unexpected symbol "+i.symbol+", expected week number");for(t.byweekno=[parseInt(On[0],10)];i.accept("comma");){if(!(On=i.acceptNumber()))throw new Error("Unexpected symbol "+i.symbol+"; expected monthday");t.byweekno.push(parseInt(On[0],10))}}else{if(!Xt)return;i.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(Xt)}}while(i.accept("comma")||i.accept("the")||i.accept("on"))}function A(){if(i.accept("at"))do{var Je=i.acceptNumber();if(!Je)throw new Error("Unexpected symbol "+i.symbol+", expected hour");for(t.byhour=[parseInt(Je[0],10)];i.accept("comma");){if(!(Je=i.acceptNumber()))throw new Error("Unexpected symbol "+i.symbol+"; expected hour");t.byhour.push(parseInt(Je[0],10))}}while(i.accept("comma")||i.accept("at"))}function V(){switch(i.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function X(){switch(i.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return i.symbol.substr(0,2).toUpperCase();default:return!1}}function ce(){switch(i.symbol){case"last":return i.nextSymbol(),-1;case"first":return i.nextSymbol(),1;case"second":return i.nextSymbol(),i.accept("last")?-2:2;case"third":return i.nextSymbol(),i.accept("last")?-3:3;case"nth":var Ve=parseInt(i.value[1],10);if(Ve<-366||Ve>366)throw new Error("Nth out of range: "+Ve);return i.nextSymbol(),i.accept("last")?-Ve:Ve;default:return!1}}function Me(){if("until"===i.symbol){var Ve=Date.parse(i.text);if(!Ve)throw new Error("Cannot parse until date:"+i.text);t.until=new Date(Ve)}else i.accept("for")&&(t.count=parseInt(i.value[0],10),i.expect("number"))}}var Gl=function(n){return n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY",n}(Gl||{});function fW(n){return n<Gl.HOURLY}var Hk=["count","until","interval","byweekday","bymonthday","bymonth"];NS.IMPLEMENTED=[],NS.IMPLEMENTED[Gl.HOURLY]=Hk,NS.IMPLEMENTED[Gl.MINUTELY]=Hk,NS.IMPLEMENTED[Gl.DAILY]=["byhour"].concat(Hk),NS.IMPLEMENTED[Gl.WEEKLY]=Hk,NS.IMPLEMENTED[Gl.MONTHLY]=Hk,NS.IMPLEMENTED[Gl.YEARLY]=["byweekno","byyearday"].concat(Hk);var Uq=NS.isFullyConvertible,rU=function(){function n(e,t,i,r){this.hour=e,this.minute=t,this.second=i,this.millisecond=r||0}return n.prototype.getHours=function(){return this.hour},n.prototype.getMinutes=function(){return this.minute},n.prototype.getSeconds=function(){return this.second},n.prototype.getMilliseconds=function(){return this.millisecond},n.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},n}(),zq=function(n){function e(t,i,r,m,A,V,X){var ce=n.call(this,m,A,V,X)||this;return ce.year=t,ce.month=i,ce.day=r,ce}return(0,Lr.C6)(e,n),e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return Fk(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var i=Math.floor(this.month/12),r=pC(this.month,12);this.month=r,this.year+=i,0===this.month&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,i){i>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-i))+7*t:this.day+=-(this.getWeekday()-i)+7*t,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,i,r){for(i&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var m=cW(this.hour,24),A=m.div;if(A&&(this.hour=m.mod,this.addDaily(A)),Nx(r)||Rc(r,this.hour))break}},e.prototype.addMinutes=function(t,i,r,m){for(i&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var A=cW(this.minute,60),V=A.div;if(V&&(this.minute=A.mod,this.addHours(V,!1,r)),(Nx(r)||Rc(r,this.hour))&&(Nx(m)||Rc(m,this.minute)))break}},e.prototype.addSeconds=function(t,i,r,m,A){for(i&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var V=cW(this.second,60),X=V.div;if(X&&(this.second=V.mod,this.addMinutes(X,!1,r,m)),(Nx(r)||Rc(r,this.hour))&&(Nx(m)||Rc(m,this.minute))&&(Nx(A)||Rc(A,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=PK(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;t=PK(this.year,this.month-1)[1]}}},e.prototype.add=function(t,i){var m=t.interval,A=t.wkst,V=t.byhour,X=t.byminute,ce=t.bysecond;switch(t.freq){case Gl.YEARLY:return this.addYears(m);case Gl.MONTHLY:return this.addMonths(m);case Gl.WEEKLY:return this.addWeekly(m,A);case Gl.DAILY:return this.addDaily(m);case Gl.HOURLY:return this.addHours(m,i,V);case Gl.MINUTELY:return this.addMinutes(m,i,V,X);case Gl.SECONDLY:return this.addSeconds(m,i,V,X,ce)}},e}(rU);function FK(n){for(var e=[],i=0,r=Object.keys(n);i<r.length;i++){var m=r[i];Rc(Cee,m)||e.push(m),AK(n[m])&&!cV(n[m])&&e.push(m)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return(0,Lr.Cl)({},n)}function mW(n){var e=n.split("\n").map($q).filter(function(t){return null!==t});return(0,Lr.Cl)((0,Lr.Cl)({},e[0]),e[1])}function sU(n){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!t)return e;var i=t[1],r=t[2];return i&&(e.tzid=i),e.dtstart=gW(r),e}function $q(n){if(!(n=n.replace(/^\s+|\s+$/,"")).length)return null;var e=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!e)return VK(n);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return VK(n);case"DTSTART":return sU(n);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(n))}}function VK(n){var t=sU(n.replace(/^RRULE:/i,""));return n.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach(function(r){var m=r.split("="),A=m[0],V=m[1];switch(A.toUpperCase()){case"FREQ":t.freq=Gl[V.toUpperCase()];break;case"WKST":t.wkst=Ny[V.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var X=function jq(n){return-1!==n.indexOf(",")?n.split(",").map(HK):HK(n)}(V),ce=A.toLowerCase();t[ce]=X;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=function Kq(n){return n.split(",").map(function(t){if(2===t.length)return Ny[t];var i=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!i||i.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var r=Number(i[1]);return new Lf(Ny[i[2]].weekday,r)})}(V);break;case"DTSTART":case"TZID":var _e=sU(n);t.tzid=_e.tzid,t.dtstart=_e.dtstart;break;case"UNTIL":t.until=gW(V);break;case"BYEASTER":t.byeaster=Number(V);break;default:throw new Error("Unknown RRULE property '"+A+"'")}}),t}function HK(n){return/^[+-]?\d+$/.test(n)?Number(n):n}var aU=function(){function n(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var e=pW(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:function(n,e){var t=Intl.DateTimeFormat().resolvedOptions().timeZone,i=new Date(kK(n,t)),m=new Date(kK(n,e??"UTC")).getTime()-i.getTime();return new Date(n.getTime()-m)}(this.date,this.tzid)},n}();function _W(n){for(var e=[],t="",i=Object.keys(n),r=Object.keys(vW),m=0;m<i.length;m++)if("tzid"!==i[m]&&Rc(r,i[m])){var A=i[m].toUpperCase(),V=n[i[m]],X="";if(Qu(V)&&(!K_(V)||V.length)){switch(A){case"FREQ":X=ma.FREQUENCIES[n.freq];break;case"WKST":X=Lx(V)?new Lf(V).toString():V.toString();break;case"BYWEEKDAY":A="BYDAY",X=Oq(V).map(function(Je){return Je instanceof Lf?Je:K_(Je)?new Lf(Je[0],Je[1]):new Lf(Je)}).toString();break;case"DTSTART":t=Xq(V,n.tzid);break;case"UNTIL":X=pW(V,!n.tzid);break;default:if(K_(V)){for(var ce=[],_e=0;_e<V.length;_e++)ce[_e]=String(V[_e]);X=ce.toString()}else X=String(V)}X&&e.push([A,X])}}var Me=e.map(function(Je){var Ct=Je[1];return"".concat(Je[0],"=").concat(Ct.toString())}).join(";"),Ve="";return""!==Me&&(Ve="RRULE:".concat(Me)),[t,Ve].filter(function(Je){return!!Je}).join("\n")}function Xq(n,e){return n?"DTSTART"+new aU(new Date(n),e).toString():""}function Yq(n,e){return Array.isArray(n)?!(!Array.isArray(e)||n.length!==e.length)&&n.every(function(t,i){return t.getTime()===e[i].getTime()}):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():n===e}var Zq=function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(e,t,i){t&&(t=t instanceof Date?hW(t):RK(t)),"all"===e?this.all=t:(i._value=t,this[e].push(i))},n.prototype._cacheGet=function(e,t){var i=!1,r=t?Object.keys(t):[],m=function(_e){for(var Me=0;Me<r.length;Me++){var Ve=r[Me];if(!Yq(t[Ve],_e[Ve]))return!0}return!1},A=this[e];if("all"===e)i=this.all;else if(K_(A))for(var V=0;V<A.length;V++){var X=A[V];if(!r.length||!m(X)){i=X._value;break}}if(!i&&this.all){var ce=new Vk(e,t);for(V=0;V<this.all.length&&ce.accept(this.all[V]);V++);i=ce.getValue(),this._cacheAdd(e,i,t)}return K_(i)?RK(i):i instanceof Date?hW(i):i},n}(),Qq=(0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)([],Fl(1,31),!0),Fl(2,28),!0),Fl(3,31),!0),Fl(4,30),!0),Fl(5,31),!0),Fl(6,30),!0),Fl(7,31),!0),Fl(8,31),!0),Fl(9,30),!0),Fl(10,31),!0),Fl(11,30),!0),Fl(12,31),!0),Fl(1,7),!0),Jq=(0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)([],Fl(1,31),!0),Fl(2,29),!0),Fl(3,31),!0),Fl(4,30),!0),Fl(5,31),!0),Fl(6,30),!0),Fl(7,31),!0),Fl(8,31),!0),Fl(9,30),!0),Fl(10,31),!0),Fl(11,30),!0),Fl(12,31),!0),Fl(1,7),!0),qq=Bx(1,29),eee=Bx(1,30),Rw=Bx(1,31),Og=Bx(1,32),tee=(0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)([],Og,!0),eee,!0),Og,!0),Rw,!0),Og,!0),Rw,!0),Og,!0),Og,!0),Rw,!0),Og,!0),Rw,!0),Og,!0),Og.slice(0,7),!0),nee=(0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)([],Og,!0),qq,!0),Og,!0),Rw,!0),Og,!0),Rw,!0),Og,!0),Og,!0),Rw,!0),Og,!0),Rw,!0),Og,!0),Og.slice(0,7),!0),iee=Bx(-28,0),oee=Bx(-29,0),kw=Bx(-30,0),wg=Bx(-31,0),ree=(0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)([],wg,!0),oee,!0),wg,!0),kw,!0),wg,!0),kw,!0),wg,!0),wg,!0),kw,!0),wg,!0),kw,!0),wg,!0),wg.slice(0,7),!0),see=(0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)((0,Lr.fX)([],wg,!0),iee,!0),wg,!0),kw,!0),wg,!0),kw,!0),wg,!0),wg,!0),kw,!0),wg,!0),kw,!0),wg,!0),wg.slice(0,7),!0),aee=[0,31,60,91,121,152,182,213,244,274,305,335,366],lee=[0,31,59,90,120,151,181,212,243,273,304,334,365],UK=function(){for(var n=[],e=0;e<55;e++)n=n.concat(Bx(7));return n}();var pee=function(){function n(e){this.options=e}return n.prototype.rebuild=function(e,t){var i=this.options;if(e!==this.lastyear&&(this.yearinfo=function cee(n,e){var t=iP(n,1,1),i=lV(n)?366:365,r=lV(n+1)?366:365,m=uW(t),A=Fk(t),V=(0,Lr.Cl)((0,Lr.Cl)({yearlen:i,nextyearlen:r,yearordinal:m,yearweekday:A},function dee(n){var e=lV(n)?366:365,t=iP(n,1,1),i=Fk(t);return 365===e?{mmask:Qq,mdaymask:nee,nmdaymask:see,wdaymask:UK.slice(i),mrange:lee}:{mmask:Jq,mdaymask:tee,nmdaymask:ree,wdaymask:UK.slice(i),mrange:aee}}(n)),{wnomask:null});if(Nx(e.byweekno))return V;V.wnomask=Fl(0,i+7);var X,ce,_e=X=pC(7-A+e.wkst,7);_e>=4?(_e=0,ce=V.yearlen+pC(A-e.wkst,7)):ce=i-_e;for(var Me=Math.floor(ce/7),Ve=pC(ce,7),Je=Math.floor(Me+Ve/4),rt=0;rt<e.byweekno.length;rt++){var Ct=e.byweekno[rt];if(Ct<0&&(Ct+=Je+1),Ct>0&&Ct<=Je){var Xt=void 0;Ct>1?(Xt=_e+7*(Ct-1),_e!==X&&(Xt-=7-X)):Xt=_e;for(var On=0;On<7&&(V.wnomask[Xt]=1,Xt++,V.wdaymask[Xt]!==e.wkst);On++);}}if(Rc(e.byweekno,1)&&(Xt=_e+7*Je,_e!==X&&(Xt-=7-X),Xt<i))for(rt=0;rt<7&&(V.wnomask[Xt]=1,V.wdaymask[Xt+=1]!==e.wkst);rt++);if(_e){var Fn=void 0;if(Rc(e.byweekno,-1))Fn=-1;else{var oi=Fk(iP(n-1,1,1)),Yt=pC(7-oi.valueOf()+e.wkst,7),$t=lV(n-1)?366:365,xn=void 0;Yt>=4?(Yt=0,xn=$t+pC(oi-e.wkst,7)):xn=i-_e,Fn=Math.floor(52+pC(xn,7)/4)}if(Rc(e.byweekno,Fn))for(Xt=0;Xt<_e;Xt++)V.wnomask[Xt]=1}return V}(e,i)),Zh(i.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var r=this.yearinfo;this.monthinfo=function uee(n,e,t,i,r,m){var A={lastyear:n,lastmonth:e,nwdaymask:[]},V=[];if(m.freq===ma.YEARLY)if(Nx(m.bymonth))V=[[0,t]];else for(var X=0;X<m.bymonth.length;X++)V.push(i.slice((e=m.bymonth[X])-1,e+1));else m.freq===ma.MONTHLY&&(V=[i.slice(e-1,e+1)]);if(Nx(V))return A;for(A.nwdaymask=Fl(0,t),X=0;X<V.length;X++)for(var ce=V[X],_e=ce[0],Me=ce[1]-1,Ve=0;Ve<m.bynweekday.length;Ve++){var Je=void 0,rt=m.bynweekday[Ve],Ct=rt[0],Xt=rt[1];Xt<0?(Je=Me+7*(Xt+1),Je-=pC(r[Je]-Ct,7)):(Je=_e+7*(Xt-1),Je+=pC(7-r[Je]+Ct,7)),_e<=Je&&Je<=Me&&(A.nwdaymask[Je]=1)}return A}(e,t,r.yearlen,r.mrange,r.wdaymask,i)}Qu(i.byeaster)&&(this.eastermask=function hee(n,e){void 0===e&&(e=0);var t=n%19,i=Math.floor(n/100),r=n%100,m=Math.floor(i/4),A=i%4,V=Math.floor((i+8)/25),X=Math.floor((i-V+1)/3),ce=Math.floor(19*t+i-m-X+15)%30,_e=Math.floor(r/4),Ve=Math.floor(32+2*A+2*_e-ce-r%4)%7,Je=Math.floor((t+11*ce+22*Ve)/451),rt=Math.floor((ce+Ve-7*Je+114)/31),Xt=Date.UTC(n,rt-1,(ce+Ve-7*Je+114)%31+1+e),On=Date.UTC(n,0,1);return[Math.ceil((Xt-On)/864e5)]}(e,i.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),n.prototype.ydayset=function(){return[Bx(this.yearlen),0,this.yearlen]},n.prototype.mdayset=function(e,t){for(var i=this.mrange[t-1],r=this.mrange[t],m=Fl(null,this.yearlen),A=i;A<r;A++)m[A]=A;return[m,i,r]},n.prototype.wdayset=function(e,t,i){for(var r=Fl(null,this.yearlen+7),m=uW(iP(e,t,i))-this.yearordinal,A=m,V=0;V<7&&(r[m]=m,++m,this.wdaymask[m]!==this.options.wkst);V++);return[r,A,m]},n.prototype.ddayset=function(e,t,i){var r=Fl(null,this.yearlen),m=uW(iP(e,t,i))-this.yearordinal;return r[m]=m,[r,m,m+1]},n.prototype.htimeset=function(e,t,i,r){var m=this,A=[];return this.options.byminute.forEach(function(V){A=A.concat(m.mtimeset(e,V,i,r))}),dV(A),A},n.prototype.mtimeset=function(e,t,i,r){var m=this.options.bysecond.map(function(A){return new rU(e,t,A,r)});return dV(m),m},n.prototype.stimeset=function(e,t,i,r){return[new rU(e,t,i,r)]},n.prototype.getdayset=function(e){switch(e){case Gl.YEARLY:return this.ydayset.bind(this);case Gl.MONTHLY:return this.mdayset.bind(this);case Gl.WEEKLY:return this.wdayset.bind(this);default:return this.ddayset.bind(this)}},n.prototype.gettimeset=function(e){switch(e){case Gl.HOURLY:return this.htimeset.bind(this);case Gl.MINUTELY:return this.mtimeset.bind(this);case Gl.SECONDLY:return this.stimeset.bind(this)}},n}();const gee=pee;function fee(n,e,t,i,r,m){for(var A=[],V=0;V<n.length;V++){var X=void 0,ce=void 0,_e=n[V];_e<0?(X=Math.floor(_e/e.length),ce=pC(_e,e.length)):(X=Math.floor((_e-1)/e.length),ce=pC(_e-1,e.length));for(var Me=[],Ve=t;Ve<i;Ve++){var Je=m[Ve];Qu(Je)&&Me.push(Je)}var rt;rt=X<0?Me.slice(X)[0]:Me[X];var Ct=e[ce],Xt=IK(r.yearordinal+rt),On=MK(Xt,Ct);Rc(A,On)||A.push(On)}return dV(A),A}function zK(n,e){var t=e.dtstart,i=e.freq,m=e.until,A=e.bysetpos,V=e.count;if(0===V||0===e.interval)return FS(n);var X=zq.fromDate(t),ce=new gee(e);ce.rebuild(X.year,X.month);for(var _e=function vee(n,e,t){var i=t.freq,r=t.byhour,m=t.byminute,A=t.bysecond;return fW(i)?function Wq(n){var e=n.dtstart.getTime()%1e3;if(!fW(n.freq))return[];var t=[];return n.byhour.forEach(function(i){n.byminute.forEach(function(r){n.bysecond.forEach(function(m){t.push(new rU(i,r,m,e))})})}),t}(t):i>=ma.HOURLY&&Zh(r)&&!Rc(r,e.hour)||i>=ma.MINUTELY&&Zh(m)&&!Rc(m,e.minute)||i>=ma.SECONDLY&&Zh(A)&&!Rc(A,e.second)?[]:n.gettimeset(i)(e.hour,e.minute,e.second,e.millisecond)}(ce,X,e);;){var Me=ce.getdayset(i)(X.year,X.month,X.day),Ve=Me[0],Je=Me[1],rt=Me[2],Ct=_ee(Ve,Je,rt,ce,e);if(Zh(A))for(var Xt=fee(A,_e,Je,rt,ce,Ve),On=0;On<Xt.length;On++){var Fn=Xt[On];if(m&&Fn>m)return FS(n);if(Fn>=t){var oi=GK(Fn,e);if(!n.accept(oi)||V&&! --V)return FS(n)}}else for(On=Je;On<rt;On++){var Yt=Ve[On];if(Qu(Yt))for(var $t=IK(ce.yearordinal+Yt),xn=0;xn<_e.length;xn++){if(Fn=MK($t,_e[xn]),m&&Fn>m)return FS(n);if(Fn>=t&&(oi=GK(Fn,e),!n.accept(oi)||V&&! --V))return FS(n)}}if(0===e.interval||(X.add(e,Ct),X.year>9999))return FS(n);fW(i)||(_e=ce.gettimeset(i)(X.hour,X.minute,X.second,0)),ce.rebuild(X.year,X.month)}}function mee(n,e,t){var i=t.bymonth,r=t.byweekno,m=t.byweekday,A=t.byeaster,V=t.bymonthday,X=t.bynmonthday,ce=t.byyearday;return Zh(i)&&!Rc(i,n.mmask[e])||Zh(r)&&!n.wnomask[e]||Zh(m)&&!Rc(m,n.wdaymask[e])||Zh(n.nwdaymask)&&!n.nwdaymask[e]||null!==A&&!Rc(n.eastermask,e)||(Zh(V)||Zh(X))&&!Rc(V,n.mdaymask[e])&&!Rc(X,n.nmdaymask[e])||Zh(ce)&&(e<n.yearlen&&!Rc(ce,e+1)&&!Rc(ce,-n.yearlen+e)||e>=n.yearlen&&!Rc(ce,e+1-n.yearlen)&&!Rc(ce,-n.nextyearlen+e-n.yearlen))}function GK(n,e){return new aU(n,e.tzid).rezonedDate()}function FS(n){return n.getValue()}function _ee(n,e,t,i,r){for(var m=!1,A=e;A<t;A++){var V=n[A];(m=mee(i,V,r))&&(n[V]=null)}return m}var Ny={MO:new Lf(0),TU:new Lf(1),WE:new Lf(2),TH:new Lf(3),FR:new Lf(4),SA:new Lf(5),SU:new Lf(6)},vW={freq:Gl.YEARLY,dtstart:null,interval:1,wkst:Ny.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Cee=Object.keys(vW),ma=function(){function n(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new Zq,this.origOptions=FK(e);var i=function Gq(n){var e=(0,Lr.Cl)((0,Lr.Cl)({},vW),FK(n));if(Qu(e.byeaster)&&(e.freq=ma.YEARLY),!Qu(e.freq)||!ma.FREQUENCIES[e.freq])throw new Error("Invalid frequency: ".concat(e.freq," ").concat(n.freq));if(e.dtstart||(e.dtstart=new Date((new Date).setMilliseconds(0))),Qu(e.wkst)?Lx(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=ma.MO.weekday,Qu(e.bysetpos)){Lx(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++)if(0===(i=e.bysetpos[t])||!(i>=-366&&i<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}if(!(e.byweekno||Zh(e.byweekno)||Zh(e.byyearday)||e.bymonthday||Zh(e.bymonthday)||Qu(e.byweekday)||Qu(e.byeaster)))switch(e.freq){case ma.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case ma.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case ma.WEEKLY:e.byweekday=[Fk(e.dtstart)]}if(Qu(e.bymonth)&&!K_(e.bymonth)&&(e.bymonth=[e.bymonth]),Qu(e.byyearday)&&!K_(e.byyearday)&&Lx(e.byyearday)&&(e.byyearday=[e.byyearday]),Qu(e.bymonthday))if(K_(e.bymonthday)){var r=[],m=[];for(t=0;t<e.bymonthday.length;t++){var i;(i=e.bymonthday[t])>0?r.push(i):i<0&&m.push(i)}e.bymonthday=r,e.bynmonthday=m}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);else e.bymonthday=[],e.bynmonthday=[];if(Qu(e.byweekno)&&!K_(e.byweekno)&&(e.byweekno=[e.byweekno]),Qu(e.byweekday))if(Lx(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(wK(e.byweekday))e.byweekday=[Lf.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Lf)!e.byweekday.n||e.freq>ma.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{var A=[],V=[];for(t=0;t<e.byweekday.length;t++){var X=e.byweekday[t];Lx(X)?A.push(X):wK(X)?A.push(Lf.fromStr(X).weekday):!X.n||e.freq>ma.MONTHLY?A.push(X.weekday):V.push([X.weekday,X.n])}e.byweekday=Zh(A)?A:null,e.bynweekday=Zh(V)?V:null}else e.bynweekday=null;return Qu(e.byhour)?Lx(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<ma.HOURLY?[e.dtstart.getUTCHours()]:null,Qu(e.byminute)?Lx(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<ma.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Qu(e.bysecond)?Lx(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<ma.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}(e).parsedOptions;this.options=i}return n.parseText=function(e,t){return NK(e,t)},n.fromText=function(e,t){return function(n,e){return void 0===e&&(e=oU),new ma(NK(n,e)||void 0)}(e,t)},n.fromString=function(e){return new n(n.parseString(e)||void 0)},n.prototype._iter=function(e){return zK(e,this.options)},n.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},n.prototype._cacheAdd=function(e,t,i){if(this._cache)return this._cache._cacheAdd(e,t,i)},n.prototype.all=function(e){if(e)return this._iter(new LK("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new Vk("all",{})),this._cacheAdd("all",t)),t},n.prototype.between=function(e,t,i,r){if(void 0===i&&(i=!1),!cV(e)||!cV(t))throw new Error("Invalid date passed in to RRule.between");var m={before:t,after:e,inc:i};if(r)return this._iter(new LK("between",m,r));var A=this._cacheGet("between",m);return!1===A&&(A=this._iter(new Vk("between",m)),this._cacheAdd("between",A,m)),A},n.prototype.before=function(e,t){if(void 0===t&&(t=!1),!cV(e))throw new Error("Invalid date passed in to RRule.before");var i={dt:e,inc:t},r=this._cacheGet("before",i);return!1===r&&(r=this._iter(new Vk("before",i)),this._cacheAdd("before",r,i)),r},n.prototype.after=function(e,t){if(void 0===t&&(t=!1),!cV(e))throw new Error("Invalid date passed in to RRule.after");var i={dt:e,inc:t},r=this._cacheGet("after",i);return!1===r&&(r=this._iter(new Vk("after",i)),this._cacheAdd("after",r,i)),r},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return _W(this.origOptions)},n.prototype.toText=function(e,t,i){return function(n,e,t,i){return new NS(n,e,t,i).toString()}(this,e,t,i)},n.prototype.isFullyConvertibleToText=function(){return Uq(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=Gl.YEARLY,n.MONTHLY=Gl.MONTHLY,n.WEEKLY=Gl.WEEKLY,n.DAILY=Gl.DAILY,n.HOURLY=Gl.HOURLY,n.MINUTELY=Gl.MINUTELY,n.SECONDLY=Gl.SECONDLY,n.MO=Ny.MO,n.TU=Ny.TU,n.WE=Ny.WE,n.TH=Ny.TH,n.FR=Ny.FR,n.SA=Ny.SA,n.SU=Ny.SU,n.parseString=mW,n.optionsToString=_W,n}(),WK={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function $K(n,e){return void 0===e&&(e={}),function xee(n,e){var t=function bee(n,e){var t=[],i=[],r=[],m=[],A=sU(n),V=A.dtstart,X=A.tzid,ce=function wee(n,e){if(void 0===e&&(e=!1),!(n=n&&n.trim()))throw new Error("Invalid empty string");if(!e)return n.split(/\s/);for(var t=n.split("\n"),i=0;i<t.length;){var r=t[i]=t[i].replace(/\s+$/g,"");r?i>0&&" "===r[0]?(t[i-1]+=r.slice(1),t.splice(i,1)):i+=1:t.splice(i,1)}return t}(n,e.unfold);return ce.forEach(function(_e){var Me;if(_e){var Ve=function Oee(n){var e=function Eee(n){if(-1===n.indexOf(":"))return{name:"RRULE",value:n};var e=wq(n,":",1);return{name:e[0],value:e[1]}}(n),i=e.value,r=e.name.split(";");if(!r)throw new Error("empty property name");return{name:r[0].toUpperCase(),parms:r.slice(1),value:i}}(_e),Je=Ve.name,rt=Ve.parms,Ct=Ve.value;switch(Je.toUpperCase()){case"RRULE":if(rt.length)throw new Error("unsupported RRULE parm: ".concat(rt.join(",")));t.push(mW(_e));break;case"RDATE":var On=(null!==(Me=/RDATE(?:;TZID=([^:=]+))?/i.exec(_e))&&void 0!==Me?Me:[])[1];On&&!X&&(X=On),i=i.concat(jK(Ct,rt));break;case"EXRULE":if(rt.length)throw new Error("unsupported EXRULE parm: ".concat(rt.join(",")));r.push(mW(Ct));break;case"EXDATE":m=m.concat(jK(Ct,rt));break;case"DTSTART":break;default:throw new Error("unsupported property: "+Je)}}}),{dtstart:V,tzid:X,rrulevals:t,rdatevals:i,exrulevals:r,exdatevals:m}}(n,e),i=t.rrulevals,r=t.rdatevals,m=t.exrulevals,A=t.exdatevals,V=t.dtstart,X=t.tzid,ce=!1===e.cache;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||i.length>1||r.length||m.length||A.length){var _e=new XK(ce);return _e.dtstart(V),_e.tzid(X||void 0),i.forEach(function(Ve){_e.rrule(new ma(CW(Ve,V,X),ce))}),r.forEach(function(Ve){_e.rdate(Ve)}),m.forEach(function(Ve){_e.exrule(new ma(CW(Ve,V,X),ce))}),A.forEach(function(Ve){_e.exdate(Ve)}),e.compatible&&e.dtstart&&_e.rdate(V),_e}var Me=i[0]||{};return new ma(CW(Me,Me.dtstart||e.dtstart||V,Me.tzid||e.tzid||X),ce)}(n,function See(n){var e=[],t=Object.keys(n),i=Object.keys(WK);if(t.forEach(function(r){Rc(i,r)||e.push(r)}),e.length)throw new Error("Invalid options: "+e.join(", "));return(0,Lr.Cl)((0,Lr.Cl)({},WK),n)}(e))}function CW(n,e,t){return(0,Lr.Cl)((0,Lr.Cl)({},n),{dtstart:e,tzid:t})}function jK(n,e){return function Tee(n){n.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}(e),n.split(",").map(function(t){return gW(t)})}function KK(n){var e=this;return function(t){if(void 0!==t&&(e["_".concat(n)]=t),void 0!==e["_".concat(n)])return e["_".concat(n)];for(var i=0;i<e._rrule.length;i++){var r=e._rrule[i].origOptions[n];if(r)return r}}}var XK=function(n){function e(t){void 0===t&&(t=!1);var i=n.call(this,{},t)||this;return i.dtstart=KK.apply(i,["dtstart"]),i.tzid=KK.apply(i,["tzid"]),i._rrule=[],i._rdate=[],i._exrule=[],i._exdate=[],i}return(0,Lr.C6)(e,n),e.prototype._iter=function(t){return function yee(n,e,t,i,r,m){var A={},V=n.accept;function X(Ve,Je){t.forEach(function(rt){rt.between(Ve,Je,!0).forEach(function(Ct){A[Number(Ct)]=!0})})}r.forEach(function(Ve){var Je=new aU(Ve,m).rezonedDate();A[Number(Je)]=!0}),n.accept=function(Ve){var Je=Number(Ve);return isNaN(Je)?V.call(this,Ve):!(!A[Je]&&(X(new Date(Je-1),new Date(Je+1)),!A[Je]))||(A[Je]=!0,V.call(this,Ve))},"between"===n.method&&(X(n.args.after,n.args.before),n.accept=function(Ve){var Je=Number(Ve);return!!A[Je]||(A[Je]=!0,V.call(this,Ve))});for(var ce=0;ce<i.length;ce++){var _e=new aU(i[ce],m).rezonedDate();if(!n.accept(new Date(_e.getTime())))break}e.forEach(function(Ve){zK(n,Ve.options)});var Me=n._result;switch(dV(Me),n.method){case"all":case"between":return Me;case"before":return Me.length&&Me[Me.length-1]||null;default:return Me.length&&Me[0]||null}}(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){YK(t,this._rrule)},e.prototype.exrule=function(t){YK(t,this._exrule)},e.prototype.rdate=function(t){ZK(t,this._rdate)},e.prototype.exdate=function(t){ZK(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return $K(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return $K(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(_W({dtstart:this._dtstart}))),this._rrule.forEach(function(i){t=t.concat(i.toString().split("\n"))}),this._exrule.forEach(function(i){t=t.concat(i.toString().split("\n").map(function(r){return r.replace(/^RRULE:/,"EXRULE:")}).filter(function(r){return!/^DTSTART/.test(r)}))}),this._rdate.length&&t.push(QK("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(QK("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join("\n")},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(i){return t.rrule(i.clone())}),this._exrule.forEach(function(i){return t.exrule(i.clone())}),this._rdate.forEach(function(i){return t.rdate(new Date(i.getTime()))}),this._exdate.forEach(function(i){return t.exdate(new Date(i.getTime()))}),t},e}(ma);function YK(n,e){if(!(n instanceof ma))throw new TypeError(String(n)+" is not RRule instance");Rc(e.map(String),String(n))||e.push(n)}function ZK(n,e){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Rc(e.map(Number),Number(n))||(e.push(n),dV(e))}function QK(n,e,t){var i=!t||"UTC"===t.toUpperCase(),r=i?"".concat(n,":"):"".concat(n,";TZID=").concat(t,":"),m=e.map(function(A){return pW(A.valueOf(),i)}).join(",");return"".concat(r).concat(m)}const Dee=Tn.A.dateToMilliseconds,Aee=["freq","interval","byday","byweekno","byyearday","bymonth","bymonthday","count","until","byhour","byminute","bysecond","bysetpos","wkst"],Iee=["DAILY","WEEKLY","MONTHLY","YEARLY","SECONDLY","MINUTELY","HOURLY"],Pee={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},JK=[],Mee=["Etc/GMT-13","MIT","Pacific/Apia","Pacific/Enderbury","Pacific/Tongatapu","Etc/GMT-14","Pacific/Kiritimati"];let yW=null;function Fy(){return yW||(yW=new Ree),yW}class Ree{constructor(){this.rRule=null,this.rRuleSet=null,this.validator=new kee}generateDates(e){const t=this.evalRecurrenceRule(e.rule),{rule:i}=t;if(!t.isValid||!i.freq)return[];const r=this._createRruleIntervalParams(e);return this._initializeRRule(e,r.startIntervalDate,i.until),this.rRuleSet.between(r.minViewDate,r.maxViewDate,!0).filter(m=>m.getTime()+r.appointmentDuration>=r.minViewTime).map(m=>this._convertRruleResult(r,e,m))}_createRruleIntervalParams(e){const{start:t,min:i,max:r,appointmentTimezoneOffset:m}=e,A=Aa.getClientTimezoneOffset(t),V=Aa.getClientTimezoneOffset(i),X=Aa.getClientTimezoneOffset(r),ce=e.end?e.end.getTime()-e.start.getTime():0,_e=Aa.setOffsetsToDate(e.start,[-A,m]),Me=e.min.getTime()-V+m,Ve=new Date(Me-ce),Je=Aa.setOffsetsToDate(e.max,[-X,m]),rt=Aa.getDiffBetweenClientTimezoneOffsets(e.start,_e);return{startIntervalDate:_e,minViewTime:Me,minViewDate:Ve,maxViewDate:Je,startIntervalDateDSTShift:rt<0?0:rt,appointmentDuration:ce}}_convertRruleResult(e,t,i){const r=Aa.setOffsetsToDate(i,[...this._getLocalMachineOffset(i),-t.appointmentTimezoneOffset,e.startIntervalDateDSTShift]),m=Aa.getDiffBetweenClientTimezoneOffsets(r,i),A=m<0,V=Aa.setOffsetsToDate(r,[m]),X=Aa.getDiffBetweenClientTimezoneOffsets(V,r);return X&&A?new Date(V.getTime()+X):V}_getLocalMachineOffset(e){const t=Aa.getClientTimezoneOffset(e),i=Tn.A.getMachineTimezoneName(),r=[t],m=t/36e5<=-13,A=!i||Mee.some(V=>i.includes(V));return m&&A&&r.push(-864e5),r}hasRecurrence(e){return!!this.generateDates(e).length}evalRecurrenceRule(e){const t={rule:{},isValid:!1};return e&&(t.rule=this._parseRecurrenceRule(e),t.isValid=this.validator.validateRRule(t.rule,e)),t}isValidRecurrenceRule(e){return this.evalRecurrenceRule(e).isValid}daysFromByDayRule(e){let t=[];return e.byday&&(t=Array.isArray(e.byday)?e.byday:e.byday.split(",")),t.map(i=>{const r=i.match(/[A-Za-z]+/);return!!r&&r[0]}).filter(i=>!!i)}getAsciiStringByDate(e){const t=e.getTimezoneOffset()*Dee("minute"),i=new Date(e.getTime()+t);return`${i.getFullYear()+`0${i.getMonth()+1}`.slice(-2)+`0${i.getDate()}`.slice(-2)}T${`0${i.getHours()}`.slice(-2)}${`0${i.getMinutes()}`.slice(-2)}${`0${i.getSeconds()}`.slice(-2)}Z`}getRecurrenceString(e){if(!e||!e.freq)return;let t="";for(const i in e){let r=e[i];"interval"===i&&r<2||("until"===i&&(r=this.getAsciiStringByDate(r)),t+=`${i}=${r};`)}return t=t.substring(0,t.length-1),t.toUpperCase()}_parseExceptionToRawArray(e){return e.match(/(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2}))?(Z)?/)}getDateByAsciiString(e){if("string"!=typeof e)return e;const t=this._parseExceptionToRawArray(e);if(!t)return null;const[i,r,m,A,V,X,ce]=this._createDateTuple(t);return ce?new Date(Date.UTC(i,r,m,A,V,X)):new Date(i,r,m,A,V,X)}_dispose(){this.rRuleSet&&(delete this.rRuleSet,this.rRuleSet=null),this.rRule&&(delete this.rRule,this.rRule=null)}_getTimeZoneOffset(){return(new Date).getTimezoneOffset()}_initializeRRule(e,t,i){const r=ma.parseString(e.rule),{firstDayOfWeek:m}=e;r.dtstart=t,!r.wkst&&m&&(r.wkst=[6,0,1,2,3,4,5][m]),i&&(r.until=Aa.setOffsetsToDate(i,[-Aa.getClientTimezoneOffset(i),e.appointmentTimezoneOffset])),this._createRRule(r),e.exception&&e.exception.split(",").map(X=>this.getDateByAsciiString(X)).forEach(X=>{e.getPostProcessedException&&(X=e.getPostProcessedException(X));const ce=Aa.setOffsetsToDate(X,[-Aa.getClientTimezoneOffset(X),e.appointmentTimezoneOffset]);this.rRuleSet.exdate(ce)})}_createRRule(e){this._dispose(),this.rRuleSet=new XK,this.rRule=new ma(e),this.rRuleSet.rrule(this.rRule)}_parseRecurrenceRule(e){const t={},i=e.split(";");for(let m=0,A=i.length;m<A;m++){const V=i[m].split("=");t[V[0].toLowerCase()]=V[1]}const r=parseInt(t.count);if(isNaN(r)||(t.count=r),t.interval){const m=parseInt(t.interval);isNaN(m)||(t.interval=m)}else t.interval=1;return t.freq&&t.until&&(t.until=this.getDateByAsciiString(t.until)),t}_createDateTuple(e){const t=void 0!==e[8];return e.shift(),void 0===e[3]?e.splice(3):(e.splice(3,1),e.splice(6)),e[1]--,e.unshift(null),[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),parseInt(e[4])||0,parseInt(e[5])||0,parseInt(e[6])||0,t]}}class kee{validateRRule(e,t){return!(this._brokenRuleNameExists(e)||!Iee.includes(e.freq)||this._wrongCountRule(e)||this._wrongIntervalRule(e)||this._wrongDayOfWeek(e)||this._wrongByMonthDayRule(e)||this._wrongByMonth(e)||this._wrongUntilRule(e))||(this._logBrokenRule(t),!1)}_wrongUntilRule(e){let t=!1;const{until:i}=e;return void 0!==i&&!(i instanceof Date)&&(t=!0),t}_wrongCountRule(e){let t=!1;const{count:i}=e;return i&&"string"==typeof i&&(t=!0),t}_wrongByMonthDayRule(e){let t=!1;const i=e.bymonthday;return i&&isNaN(parseInt(i))&&(t=!0),t}_wrongByMonth(e){let t=!1;const i=e.bymonth;return i&&isNaN(parseInt(i))&&(t=!0),t}_wrongIntervalRule(e){let t=!1;const{interval:i}=e;return i&&"string"==typeof i&&(t=!0),t}_wrongDayOfWeek(e){const t=e.byday,i=Fy().daysFromByDayRule(e);let r=!1;return""===t&&(r=!0),(0,w.__)(i,(m,A)=>{if(!Object.prototype.hasOwnProperty.call(Pee,A))return r=!0,!1}),r}_brokenRuleNameExists(e){let t=!1;return(0,w.__)(e,i=>{if(!Aee.includes(i))return t=!0,!1}),t}_logBrokenRule(e){JK.includes(e)||(go.A.log("W0006",e),JK.push(e))}}const oP="dx-recurrence-repeat-end",qK="dx-recurrence-selectbox-freq",bW="dx-recurrence-numberbox-interval",e5="dx-recurrence-repeat-on",lU=[{recurrence:"dxScheduler-recurrenceHourly",value:"hourly"},{recurrence:"dxScheduler-recurrenceDaily",value:"daily"},{recurrence:"dxScheduler-recurrenceWeekly",value:"weekly"},{recurrence:"dxScheduler-recurrenceMonthly",value:"monthly"},{recurrence:"dxScheduler-recurrenceYearly",value:"yearly"}],Gee=lU.map(n=>({text:()=>Wn.A.format(n.recurrence),value:n.value})),Wee=[{type:"never"},{type:"until"},{type:"count"}],uV=["SU","MO","TU","WE","TH","FR","SA"],Uk=()=>(0,k.Ft)((0,k.ss)())?"filled":void 0;class $ee{constructor(e){this._recurrenceProcessor=Fy(),this._recurrenceProcessor=Fy(),this._recurrenceRule=this._recurrenceProcessor.evalRecurrenceRule(e).rule}makeRules(e){this._recurrenceRule=this._recurrenceProcessor.evalRecurrenceRule(e).rule}makeRule(e,t){!t||Array.isArray(t)&&!t.length?delete this._recurrenceRule[e]:(0,C.O9)(e)&&("until"===e&&delete this._recurrenceRule.count,"count"===e&&delete this._recurrenceRule.until,this._recurrenceRule[e]=t)}getRepeatEndRule(){const e=this._recurrenceRule;return"count"in e?"count":"until"in e?"until":"never"}getRecurrenceString(){return this._recurrenceProcessor.getRecurrenceString(this._recurrenceRule)}getRules(){return this._recurrenceRule}getDaysFromByDayRule(){return this._recurrenceProcessor.daysFromByDayRule(this._recurrenceRule)}}class t5 extends qJ.A{_getDefaultOptions(){const e=super._getDefaultOptions();return(0,_.X)(e,{value:null,startDate:new Date,firstDayOfWeek:void 0})}_getFirstDayOfWeek(){const e=this.option("firstDayOfWeek");return(0,C.O9)(e)?e:sa.A.firstDayOfWeekIndex()}_createComponent(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._extendConfig(i,{readOnly:this.option("readOnly")}),super._createComponent(e,t,i)}_init(){super._init(),this._recurrenceRule=new $ee(this.option("value"))}_render(){super._render(),this.$element().addClass("dx-recurrence-editor"),this._$container=(0,a.A)("<div>").addClass("dx-recurrence-editor-container").appendTo(this.$element()),this._prepareEditors(),this._renderEditors(this._$container)}getEditorByField(e){let t=this.getRecurrenceForm().getEditor(e);if(!(0,C.O9)(t))switch(e){case"byday":t=this._weekEditor;break;case"count":t=this._repeatCountEditor;break;case"until":t=this._repeatUntilDate}return t}_prepareEditors(){const e=(this._recurrenceRule.getRules().freq||lU[1].value).toLowerCase();return this._editors=[this._createFreqEditor(e),this._createIntervalEditor(e),this._createRepeatOnLabel(e),{itemType:"group",cssClass:e5,colCount:2,colCountByScreen:{xs:2},items:this._createRepeatOnEditor(e)},{itemType:"group",items:this._createRepeatEndEditor()}],this._editors}_createFreqEditor(e){return{dataField:"freq",name:"FREQ",editorType:"dxSelectBox",cssClass:qK,editorOptions:{stylingMode:Uk(),items:Gee,value:e,field:"freq",valueExpr:"value",displayExpr:"text",layout:"horizontal",elementAttr:{class:qK},onValueChanged:t=>this._valueChangedHandler(t)},label:{text:Wn.A.format("dxScheduler-editorLabelRecurrence")}}}_createIntervalEditor(e){const t=this._recurrenceRule.getRules().interval||1;return{itemType:"group",colCount:2,cssClass:`${bW}-wrapper`,colCountByScreen:{xs:2},items:[{dataField:"interval",editorType:"dxNumberBox",editorOptions:{stylingMode:Uk(),format:"#",width:70,min:1,field:"interval",value:t,showSpinButtons:!0,useLargeSpinButtons:!1,elementAttr:{class:bW},onValueChanged:i=>this._valueChangedHandler(i)},label:{text:Wn.A.format("dxScheduler-recurrenceRepeatEvery")}},{name:"intervalLabel",cssClass:`${bW}-label`,template:()=>Wn.A.format(`dxScheduler-recurrenceRepeat${e.charAt(0).toUpperCase()}${e.substr(1).toLowerCase()}`)}]}}_createRepeatOnLabel(e){return{itemType:"group",cssClass:`${e5}-label`,items:[{name:"repeatOnLabel",colSpan:2,template:()=>Wn.A.format("dxScheduler-recurrenceRepeatOn"),visible:e&&"daily"!==e&&"hourly"!==e}]}}_createRepeatOnEditor(e){return[this._createByDayEditor(e),this._createByMonthEditor(e),this._createByMonthDayEditor(e)]}_createByDayEditor(e){return{dataField:"byday",colSpan:2,template:(t,i)=>{const r=this._getFirstDayOfWeek(),m=this._daysOfWeekByRules(),A=sa.A.getDayNames("abbreviated"),V=uV.slice(r).concat(uV.slice(0,r)),X=A.slice(r).concat(A.slice(0,r)).map((ce,_e)=>({text:ce,key:V[_e]}));this._$repeatOnWeek=(0,a.A)("<div>").addClass("dx-recurrence-button-group").appendTo(i),this._weekEditor=this._createComponent(this._$repeatOnWeek,QJ.A,{items:X,field:"byday",selectionMode:"multiple",selectedItemKeys:m,keyExpr:"key",onSelectionChanged:ce=>{const _e=ce.component.option("selectedItemKeys"),Me=null!=_e&&_e.length?_e:this._getDefaultByDayValue();this._recurrenceRule.makeRule("byday",Me),this._changeEditorValue()}})},visible:"weekly"===e,label:{visible:!1}}}_createByMonthEditor(e){const t=sa.A.getMonthNames("wide"),i=[...Array(12)].map((r,m)=>({value:`${m+1}`,text:t[m]}));return{dataField:"bymonth",editorType:"dxSelectBox",editorOptions:{stylingMode:Uk(),field:"bymonth",items:i,value:this._monthOfYearByRules(),width:120,displayExpr:"text",valueExpr:"value",elementAttr:{class:"dx-recurrence-selectbox-month-of-year"},onValueChanged:r=>this._valueChangedHandler(r)},visible:"yearly"===e,label:{visible:!1}}}_createByMonthDayEditor(e){return{dataField:"bymonthday",editorType:"dxNumberBox",editorOptions:{stylingMode:Uk(),min:1,max:31,format:"#",width:70,field:"bymonthday",showSpinButtons:!0,useLargeSpinButtons:!1,value:this._dayOfMonthByRules(),elementAttr:{class:"dx-recurrence-numberbox-day-of-month"},onValueChanged:t=>this._valueChangedHandler(t)},visible:"monthly"===e||"yearly"===e,label:{visible:!1}}}_createRepeatEndEditor(){const e=this._recurrenceRule.getRepeatEndRule();return[{dataField:"repeatEnd",editorType:"dxRadioGroup",editorOptions:{items:Wee,value:e,valueExpr:"type",field:"repeatEnd",itemTemplate:t=>"count"===t.type?this._renderRepeatCountEditor():"until"===t.type?this._renderRepeatUntilEditor():this._renderDefaultRepeatEnd(),layout:"vertical",elementAttr:{class:"dx-recurrence-radiogroup-repeat-type"},onValueChanged:t=>this._repeatEndValueChangedHandler(t)},label:{text:Wn.A.format("dxScheduler-recurrenceEnd")}}]}_renderEditors(e){this._recurrenceForm=this._createComponent(e,_G.A,{items:this._editors,showValidationSummary:!1,scrollingEnabled:!0,showColonAfterLabel:!1,labelLocation:"top"}),this._disableRepeatEndParts()}_setAriaDescribedBy(e,t){const i=`label-${new Rf.A}`;e.setAria("describedby",i),e.setAria("id",i,t)}getRecurrenceForm(){return this._recurrenceForm}changeValueByVisibility(e){e?this.option("value")||this._handleDefaults():(this._recurrenceRule.makeRules(""),this.option("value",""))}_handleDefaults(){this._recurrenceRule.makeRule("freq",lU[1].value),this._changeEditorValue()}_changeEditorValue(){this.option("value",this._recurrenceRule.getRecurrenceString()||"")}_daysOfWeekByRules(){let e=this._recurrenceRule.getDaysFromByDayRule();return e.length||(e=this._getDefaultByDayValue()),e}_getDefaultByDayValue(){const t=this.option("startDate").getDay();return[uV[t]]}_dayOfMonthByRules(){let e=this._recurrenceRule.getRules().bymonthday;return e||(e=this.option("startDate").getDate()),e}_monthOfYearByRules(){let e=this._recurrenceRule.getRules().bymonth;return e||(e=this.option("startDate").getMonth()+1),String(e)}_renderDefaultRepeatEnd(){const e=(0,a.A)("<div>").addClass(oP+"-wrapper");return(0,a.A)("<div>").text(Wn.A.format("dxScheduler-recurrenceNever")).addClass(oP+"-label").appendTo(e),e}_repeatEndValueChangedHandler(e){const{value:t}=e;this._disableRepeatEndParts(t),"until"===t&&this._recurrenceRule.makeRule(t,this._getUntilValue()),"count"===t&&this._recurrenceRule.makeRule(t,this._repeatCountEditor.option("value")),"never"===t&&(this._recurrenceRule.makeRule("count",""),this._recurrenceRule.makeRule("until","")),this._changeEditorValue()}_disableRepeatEndParts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._recurrenceRule.getRepeatEndRule();"until"===e&&(this._repeatCountEditor.option("disabled",!0),this._repeatUntilDate.option("disabled",!1)),"count"===e&&(this._repeatCountEditor.option("disabled",!1),this._repeatUntilDate.option("disabled",!0)),"never"===e&&(this._repeatCountEditor.option("disabled",!0),this._repeatUntilDate.option("disabled",!0))}_renderRepeatCountEditor(){const e=this._recurrenceRule.getRules().count||1,t=(0,a.A)("<div>").addClass(oP+"-wrapper");return(0,a.A)("<div>").text(Wn.A.format("dxScheduler-recurrenceAfter")).addClass(oP+"-label").appendTo(t),this._$repeatCountEditor=(0,a.A)("<div>").addClass("dx-recurrence-numberbox-repeat-count").appendTo(t),(0,a.A)("<div>").text(Wn.A.format("dxScheduler-recurrenceRepeatCount")).addClass(oP+"-label").appendTo(t),this._repeatCountEditor=this._createComponent(this._$repeatCountEditor,L3.A,{stylingMode:Uk(),field:"count",format:"#",width:70,min:1,showSpinButtons:!0,useLargeSpinButtons:!1,value:e,onValueChanged:this._repeatCountValueChangeHandler.bind(this)}),t}_repeatCountValueChangeHandler(e){if("count"===this._recurrenceRule.getRepeatEndRule()){const{value:t}=e;this._recurrenceRule.makeRule("count",t),this._changeEditorValue()}}_formatUntilDate(e){return this._recurrenceRule.getRules().until&&Tn.A.sameDate(this._recurrenceRule.getRules().until,e)?e:Tn.A.setToDayEnd(e)}_renderRepeatUntilEditor(){const e=this._getUntilValue(),t=(0,a.A)("<div>").addClass(oP+"-wrapper");return(0,a.A)("<div>").text(Wn.A.format("dxScheduler-recurrenceOn")).addClass(oP+"-label").appendTo(t),this._$repeatDateEditor=(0,a.A)("<div>").addClass("dx-recurrence-datebox-until-date").appendTo(t),this._repeatUntilDate=this._createComponent(this._$repeatDateEditor,JJ.A,{stylingMode:Uk(),field:"until",value:e,type:"date",onValueChanged:this._repeatUntilValueChangeHandler.bind(this),calendarOptions:{firstDayOfWeek:this._getFirstDayOfWeek()},useMaskBehavior:!0}),t}_repeatUntilValueChangeHandler(e){if("until"===this._recurrenceRule.getRepeatEndRule()){const t=this._formatUntilDate(new Date(e.value)),r=this.option("getStartDateTimeZone")(),m=r?kx.fromAppointmentToSource:kx.fromGridToSource,A=this.option("timeZoneCalculator").createDate(t,{path:m,appointmentTimeZone:r});this._recurrenceRule.makeRule("until",A),this._changeEditorValue()}}_valueChangedHandler(e){const{value:t,previousValue:i}=e,r=e.component.option("field");this.option("visible")?(this._recurrenceRule.makeRule(r,t),"freq"===r&&(this._makeRepeatOnRule(t),this._changeRepeatOnVisibility(t,i)),this._changeEditorValue()):this.option("value","")}_makeRepeatOnRule(e){("daily"===e||"hourly"===e)&&(this._recurrenceRule.makeRule("byday",""),this._recurrenceRule.makeRule("bymonth",""),this._recurrenceRule.makeRule("bymonthday","")),"weekly"===e&&(this._recurrenceRule.makeRule("byday",this._daysOfWeekByRules()),this._recurrenceRule.makeRule("bymonth",""),this._recurrenceRule.makeRule("bymonthday","")),"monthly"===e&&(this._recurrenceRule.makeRule("bymonthday",this._dayOfMonthByRules()),this._recurrenceRule.makeRule("bymonth",""),this._recurrenceRule.makeRule("byday","")),"yearly"===e&&(this._recurrenceRule.makeRule("bymonthday",this._dayOfMonthByRules()),this._recurrenceRule.makeRule("bymonth",this._monthOfYearByRules()),this._recurrenceRule.makeRule("byday",""))}_optionChanged(e){var t,i,r,m;switch(e.name){case"readOnly":null===(t=this._recurrenceForm)||void 0===t||t.option("readOnly",e.value),null===(i=this._repeatCountEditor)||void 0===i||i.option("readOnly",e.value),null===(r=this._weekEditor)||void 0===r||r.option("readOnly",e.value),null===(m=this._repeatUntilDate)||void 0===m||m.option("readOnly",e.value),super._optionChanged(e);break;case"value":this._recurrenceRule.makeRules(e.value),this._changeRepeatIntervalLabel(),this._disableRepeatEndParts(),this._changeEditorsValue(this._recurrenceRule.getRules()),super._optionChanged(e);break;case"startDate":this._makeRepeatOnRule(this._recurrenceRule.getRules().freq),(0,C.O9)(this._recurrenceRule.getRecurrenceString())&&this._changeEditorValue();break;case"firstDayOfWeek":if(this._weekEditor){const A=sa.A.getDayNames("abbreviated"),V=uV.slice(e.value).concat(uV.slice(0,e.value)),X=A.slice(e.value).concat(A.slice(0,e.value)).map((ce,_e)=>({text:ce,key:V[_e]}));this._weekEditor.option("items",X)}this._$repeatDateEditor&&this._repeatUntilDate.option("calendarOptions.firstDayOfWeek",this._getFirstDayOfWeek());break;default:super._optionChanged(e)}}_changeRepeatOnVisibility(e,t){e!==t&&(this._recurrenceForm.itemOption("byday","visible",!1),this._recurrenceForm.itemOption("bymonthday","visible",!1),this._recurrenceForm.itemOption("bymonth","visible",!1),this._recurrenceForm.itemOption("repeatOnLabel","visible",e&&"daily"!==e&&"hourly"!==e),"weekly"===e&&this._recurrenceForm.itemOption("byday","visible",!0),"monthly"===e&&this._recurrenceForm.itemOption("bymonthday","visible",!0),"yearly"===e&&(this._recurrenceForm.itemOption("bymonthday","visible",!0),this._recurrenceForm.itemOption("bymonth","visible",!0)))}_changeRepeatIntervalLabel(){const{freq:e}=this._recurrenceRule.getRules();e&&this._recurrenceForm.itemOption("intervalLabel","template",Wn.A.format(`dxScheduler-recurrenceRepeat${e.charAt(0).toUpperCase()}${e.substr(1).toLowerCase()}`))}_changeEditorsValue(e){this._recurrenceForm.getEditor("freq").option("value",(e.freq||lU[1].value).toLowerCase()),this._changeDayOfWeekValue(),this._changeDayOfMonthValue(),this._changeMonthOfYearValue(),this._changeIntervalValue(e.interval),this._changeRepeatCountValue(),this._changeRepeatEndValue(),this._changeRepeatUntilValue()}_changeIntervalValue(e){this._recurrenceForm.getEditor("interval").option("value",e||1)}_changeRepeatEndValue(){const e=this._recurrenceRule.getRepeatEndRule();this._recurrenceForm.getEditor("repeatEnd").option("value",e)}_changeDayOfWeekValue(){if(this._recurrenceForm.itemOption("byday").visible){const t=this._daysOfWeekByRules();this.getEditorByField("byday").option("selectedItemKeys",t)}}_changeDayOfMonthValue(){if(this._recurrenceForm.itemOption("bymonthday").visible){const t=this._dayOfMonthByRules();this._recurrenceForm.getEditor("bymonthday").option("value",t)}}_changeMonthOfYearValue(){if(this._recurrenceForm.itemOption("bymonth").visible){const t=this._monthOfYearByRules();this._recurrenceForm.getEditor("bymonth").option("value",t)}}_changeRepeatCountValue(){const e=this._recurrenceRule.getRules().count||1;this._repeatCountEditor.option("value",e)}_changeRepeatUntilValue(){this._repeatUntilDate.option("value",this._getUntilValue())}_getUntilValue(){const e=this._recurrenceRule.getRules().until;if(!e)return this._formatUntilDate(new Date);const i=this.option("getStartDateTimeZone")(),r=i?kx.fromSourceToAppointment:kx.fromSourceToGrid;return this.option("timeZoneCalculator").createDate(e,{path:r,appointmentTimeZone:i})}toggle(){this._freqEditor.focus()}setAria(){this._switchEditor&&this._switchEditor.setAria(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1])}}(0,y.A)("dxRecurrenceEditor",t5);const jee=t5,Kee={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>Xee),multi:!0};let Xee=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;readOnlyChange;rtlEnabledChange;tabIndexChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new jee(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("validationErrors",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-recurrence-editor"]],hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",readOnly:"readOnly",rtlEnabled:"rtlEnabled",tabIndex:"tabIndex",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",tabIndexChange:"tabIndexChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,Kee,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),n5=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();var Yee=M(1220);let i5=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();M(5444);let o5=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.MwW,z.POb,z.Dgy,z.ULL,f.p_,f.xZ,z.MwW,z.POb,z.Dgy,z.ULL,f.xZ]})}return n})();const r5="gradient",s5="source",a5="target",Zee=["normal","hover"];function xW(n,e,t){const i=e.border,r=t.border,m=(0,C.O9)(i.visible)?i.visible:r.visible,A=(0,C.O9)(i.width)?i.width:r.width,V=(0,C.O9)(i.opacity)?i.opacity:(0,C.O9)(r.opacity)?r.opacity:1,X=(0,C.O9)(e.opacity)?e.opacity:(0,C.O9)(t.opacity)?t.opacity:1;return{fill:e.color||n,"stroke-width":m?A:0,stroke:e.border.color||t.border.color,"stroke-opacity":V,opacity:X,hatching:e.hatching}}function l5(n,e){const t=n._renderer.getRootOffset();this.code=0,this.widget=n,this.color=e.color,this.options=e.options,this.rect=e.rect,this.label=this.title=e.rect._name,this.coords={x:e.rect.x+e.rect.width/2+t.left,y:e.rect.y+e.rect.height/2+t.top},this.id=e.id,this.linksIn=e.linksIn,this.linksOut=e.linksOut,this.states={normal:xW(this.color,this.options,this.options),hover:xW(this.color,this.options.hoverStyle,this.options)}}l5.prototype={compileAttrs:function(){return xW(this.color,this.options)},getState:function(){return Zee[this.code]},isHovered:function(){return!!(1&this.code)},setState:function(n,e){e?this.code|=n:this.code&=~n,e?this.linksIn.concat(this.linksOut).forEach(t=>{this.widget._links[t.index].setAdjacentNodeHover(!0)}):(this.widget._links.forEach(function(t){t.isAdjacentNodeHovered()&&t.adjacentNodeHover(!1)}),this.hideTooltip()),this.widget._applyNodesAppearance(),this.widget._applyLinksAppearance()},hover:function(n){!this.widget._getOption("hoverEnabled",!0)||n===this.isHovered()||(this.widget._suspend(),n&&this.widget.clearHover(),this.setState(1,n),this.widget._eventTrigger("nodeHoverChanged",{target:this}),this.widget._resume())},setHover:function(){this.hover(!0)},showTooltip:function(n){this.widget._getOption("hoverEnabled",!0)&&this.widget._tooltip&&this.widget._tooltip.show({type:"node",info:{label:this.label,title:this.label,weightIn:this.linksIn.reduce(function(e,t){return e+t.weight},0),weightOut:this.linksOut.reduce(function(e,t){return e+t.weight},0)}},typeof n<"u"?{x:n[0],y:n[1]}:this.coords)},hideTooltip:function(){this.widget._tooltip&&this.widget._tooltip.hide()},getLabelAttributes:function(n,e){return function Qee(n,e,t){const i=Ti;n.useNodeColors&&(n.font.color=t.color);const r=!!(0,C.O9)(n.border.visible)&&n.border.visible,m=(0,C.O9)(n.border.width)?n.border.width:0,A=(0,C.O9)(n.border.color)?n.border.color:n.font.color,V=(0,C.O9)(n.border.opacity)?n.border.opacity:1,X={filter:e};return r&&m&&(X.stroke=A,X["stroke-width"]=r?m:0,X["stroke-opacity"]=V),{attr:X,css:i(n.font)}}(n,e,this)}};const Jee=l5,qee=["normal","adjacentNodeHover","hover"];function zk(n,e,t,i){const r=e.border,m=t.border,A=(0,C.O9)(r.visible)?r.visible:m.visible,V=(0,C.O9)(r.width)?r.width:m.width,X=(0,C.O9)(r.opacity)?r.opacity:(0,C.O9)(m.opacity)?m.opacity:1,ce=(0,C.O9)(e.opacity)?e.opacity:(0,C.O9)(t.opacity)?t.opacity:1;let _e=e.color||n;return t.colorMode===a5||t.colorMode===s5?_e=n:t.colorMode===r5&&i&&(0,C.O9)(i.id)&&(_e=i.id),{fill:_e,"stroke-width":A?V:0,stroke:e.border.color||t.border.color,"stroke-opacity":X,opacity:ce,hatching:e.hatching}}function c5(n,e){const t=n._renderer.getRootOffset();this.code=0,this.widget=n,this.color=e.color,this.connection=e.connection,this.d=e.d,this.options=e.options,this.boundingRect=e.boundingRect,this.coords={x:e.boundingRect.x+e.boundingRect.width/2+t.left,y:e.boundingRect.y+e.boundingRect.height/2+t.top},this.states={normal:zk(this.color,this.options,this.options,e.gradient),adjacentNodeHover:zk(this.color,{opacity:0,border:{}},this.options,e.gradient),hover:zk(this.color,{opacity:0,border:{}},this.options,e.gradient)},this.overlayStates={normal:zk(this.color,{opacity:0,border:{}},this.options),adjacentNodeHover:zk(this.color,this.options.hoverStyle,this.options),hover:zk(this.color,this.options.hoverStyle,this.options)}}c5.prototype={getState:function(){return qee[this.code]},isHovered:function(){return 2===this.code},isAdjacentNodeHovered:function(){return 1===this.code},setState:function(n,e){e?this.code=n:(this.code=0,this.hideTooltip()),this.widget._applyLinksAppearance()},setHover:function(){this.hover(!0)},hover:function(n){!this.widget._getOption("hoverEnabled",!0)||n===this.isHovered()||(this.widget._suspend(),n&&this.widget.clearHover(),this.setState(2,n),this.widget._eventTrigger("linkHoverChanged",{target:this}),this.widget._resume())},adjacentNodeHover:function(n){!this.widget._getOption("hoverEnabled",!0)||n===this.isAdjacentNodeHovered()||(this.widget._suspend(),this.setState(1,n),this.widget._resume())},setAdjacentNodeHover:function(){this.adjacentNodeHover(!0)},showTooltip:function(n){this.widget._getOption("hoverEnabled",!0)&&this.widget._tooltip&&this.widget._tooltip.show({type:"link",info:{source:this.connection.source,target:this.connection.target,weight:this.connection.weight}},typeof n<"u"?{x:n[0],y:n[1]}:this.coords)},hideTooltip:function(){this.widget._tooltip&&this.widget._tooltip.hide()}};const ete=c5,SW="white",u5={maxOfArray:function(n,e){let t=0,i=r=>r;e&&(i=e);for(let r=0;r<n.length;r++)i(n[r])>t&&(t=i(n[r]));return t}},h5=function(n){const e=[];return n.forEach(t=>{-1===e.indexOf(t[0])&&e.push(t[0]),-1===e.indexOf(t[1])&&e.push(t[1])}),e},EW=function(n,e){const t=[];return n.forEach(i=>{i[0]===e&&-1===t.indexOf(i[1])&&t.push(i[1])}),t},OW=function(n,e){const t=[];return n.forEach(i=>{i[1]===e&&-1===t.indexOf(i[0])&&t.push(i[0])}),t},Gk={struct:{_hasCycle:!1,_sortedList:[],hasCycle:function(n){this._hasCycle=!1,this._sortedList=[];const e={},t=h5(n);return t.forEach(i=>{e[i]={color:SW}}),t.forEach(i=>{e[i].color===SW&&this._depthFirstSearch(n,e,i)}),this._sortedList.reverse(),this._hasCycle},_depthFirstSearch:function(n,e,t){e[t].color="gray";const i=EW(n,t);for(let r=0;r<i.length;r++)e[i[r]].color===SW?this._depthFirstSearch(n,e,i[r]):"gray"===e[i[r]].color&&(this._hasCycle=!0);this._sortedList.push({name:t,lp:null,incoming:OW(n,t),outgoing:EW(n,t)}),e[t].color="black"},computeLongestPaths(n){const e=this._sortedList;return e.forEach(t=>{const i=OW(n,t.name);if(0===i.length)t.lp=0;else{const r=[];i.forEach(m=>{r.push(e.filter(A=>A.name===m)[0].lp)}),t.lp=u5.maxOfArray(r)+1}}),this._sortedList}},routines:u5,getVertices:h5,getAdjacentVertices:EW,getReverseAdjacentVertices:OW},nte={validate:function(n,e){let t=null;return this._hasCycle(n)&&(t="E2006",e("E2006")),t},_hasCycle:function(n){return Gk.struct.hasCycle(n)}},p5={_weightPerPixel:null,_getCascadeIdx:function(n,e){const t=e.filter(i=>i.name===n)[0];return t.outgoing.length>0?t.lp:Gk.routines.maxOfArray(e.map(i=>i.lp))},_getInWeightForNode:function(n,e){let t=0;return e.forEach(i=>{i[1]===n&&(t+=i[2])}),t},_getOutWeightForNode:function(n,e){let t=0;return e.forEach(i=>{i[0]===n&&(t+=i[2])}),t},_computeCascades:function(n){const e=Gk.struct.computeLongestPaths(n),t=Gk.routines.maxOfArray(e.map(r=>r.lp)),i=[];for(let r=0;r<t+1;r++)i.push({});return n.forEach(r=>{let m=i[this._getCascadeIdx(r[0],e)];m[r[0]]||(m[r[0]]={nodeTitle:r[0]}),m=i[this._getCascadeIdx(r[1],e)],m[r[1]]||(m[r[1]]={nodeTitle:r[1]})}),i.forEach(r=>{Object.keys(r).forEach(m=>{const A=r[m];A.inWeight=this._getInWeightForNode(A.nodeTitle,n),A.outWeight=this._getOutWeightForNode(A.nodeTitle,n),A.maxWeight=Math.max(A.inWeight,A.outWeight)})}),i},_getWeightForCascade:function(n,e){let t=0;const i=n[e];return Object.keys(i).forEach(r=>{t+=Math.max(i[r].inWeight,i[r].outWeight)}),t},_getMaxWeightThroughCascades:function(n){const e=[];return n.forEach(t=>{let i=0;Object.keys(t).forEach(r=>{const m=t[r];i+=Math.max(m.inWeight,m.outWeight)}),e.push(i)}),Gk.routines.maxOfArray(e)},_computeNodes:function(n,e){const t=[],i=this._getMaxWeightThroughCascades(n),r=Gk.routines.maxOfArray(n.map(X=>Object.keys(X).length));let m=e.nodePadding,A=e.height-m*(r-1);A<0&&(m=0,A=e.height-m*(r-1)),this._weightPerPixel=i/A;let V=0;return n.forEach(X=>{const ce=[];let _e=0;const Me=Object.keys(X).length,Ve=this._getWeightForCascade(n,V)/this._weightPerPixel+m*(Me-1);let Je;Je=Array.isArray(e.nodeAlign)?V<e.nodeAlign.length?e.nodeAlign[V]:"center":e.nodeAlign,"bottom"===Je?_e=e.height-Ve:"center"===Je&&(_e=.5*(e.height-Ve)),_e=Math.round(_e),Object.keys(X).forEach(rt=>{X[rt].sort=this._sort&&Object.prototype.hasOwnProperty.call(this._sort,rt)?this._sort[rt]:1}),Object.keys(X).sort((rt,Ct)=>X[rt].sort-X[Ct].sort).forEach(rt=>{const Xt=Math.floor(A*X[rt].maxWeight/i),On=Math.round(V*e.width/(n.length-1))-(0===V?0:e.nodeWidth),Fn={};Fn._name=rt,Fn.width=e.nodeWidth,Fn.height=Xt,Fn.x=On+e.x,Fn.y=_e+e.y,_e+=Xt+m,ce.push(Fn)}),V++,t.push(ce)}),t},_findRectByName:function(n,e){for(let t=0;t<n.length;t++)for(let i=0;i<n[t].length;i++)if(e===n[t][i]._name)return n[t][i];return null},_findIndexByName:function(n,e){let t=0;for(let i=0;i<n.length;i++)for(let r=0;r<n[i].length;r++){if(e===n[i][r]._name)return t;t++}return null},_computeLinks:function(n,e,t){const i={},r=[],m=[];return t.forEach(A=>{Object.keys(A).forEach(V=>{i[V]={in:0,out:0}})}),e.forEach(A=>{A.forEach(V=>{const X=V._name,ce=this._findRectByName(e,X),_e=n.filter(Me=>Me[0]===X);_e.forEach(Me=>{Me.sort=this._findIndexByName(e,Me[1])}),_e.sort((Me,Ve)=>Me.sort-Ve.sort).forEach(Me=>{const Ve=this._findRectByName(e,Me[1]),Je=Math.round(Me[2]/this._weightPerPixel);r.push({from:{x:ce.x,y:ce.y+i[Me[0]].out,width:ce.width,height:i[Me[0]].out+Je>ce.height?ce.height-i[Me[0]].out:Je,node:ce,weight:Me[2]},to:{x:Ve.x,y:Ve.y+i[Me[1]].in,width:Ve.width,height:i[Me[1]].in+Je>Ve.height?Ve.height-i[Me[1]].in:Je,node:Ve}}),i[Me[0]].out+=Je,i[Me[1]].in+=Je})})}),r.forEach(A=>{const V={d:this._spline(A.from,A.to),_boundingRect:{x:A.from.x+A.from.width,y:Math.min(A.from.y,A.to.y),width:A.to.x-(A.from.x+A.from.width),height:Math.max(A.from.x+A.from.height,A.to.y+A.to.height)-Math.min(A.from.y,A.to.y)},_weight:A.from.weight,_from:A.from.node,_to:A.to.node};m.push(V)}),this._fitAllNodesHeight(e,r),m},_fitNodeHeight:function(n,e,t){const i=this._findRectByName(e,n);let r=0,m=0;t.forEach(function(A){A.from.node._name===n&&(m+=A.from.height),A.to.node._name===n&&(r+=A.to.height)}),i.height=Math.max(r,m)},_fitAllNodesHeight:function(n,e){for(let t=0;t<n.length;t++)for(let i=0;i<n[t].length;i++)this._fitNodeHeight(n[t][i]._name,n,e)},_spline:function(n,e){const t=n.x+n.width,i=n.y,r=n.x+n.width,m=n.y+n.height,A=e.x,V=e.y,X=e.x,ce=e.y+e.height,_e=.3*(A-t);return`M ${t} ${i} C ${t+_e} ${i} ${A-_e} ${V} ${A} ${V} L ${X} ${ce} C ${X-_e} ${ce} ${r+_e} ${m} ${r} ${m} Z`},computeLayout:function(n,e,t,i){this._sort=e;const r={},m=nte.validate(n,i);return m?r.error=m:(r.cascades=this._computeCascades(n),r.nodes=this._computeNodes(r.cascades,{width:t.availableRect.width,height:t.availableRect.height,x:t.availableRect.x,y:t.availableRect.y,nodePadding:t.nodePadding,nodeWidth:t.nodeWidth,nodeAlign:t.nodeAlign}),r.links=this._computeLinks(n,r.nodes,r.cascades)),r},overlap:function(n,e){return!(e.x>n.x+n.width||e.x+e.width<n.x||e.y>=n.y+n.height||e.y+e.height<=n.y)}};function g5(n,e,t){const i=[],r="in"===t?"_to":"_from",m="in"===t?"_from":"_to";return n.links.map(A=>A[r]._name===e).forEach((A,V)=>{A&&i.push({index:V,weight:n.links[V]._weight,node:n.links[V][m]._name})}),i}const wW=Vh.inherit({_rootClass:"dxs-sankey",_rootClassPrefix:"dxs",_proxyData:[],_optionChangesMap:{dataSource:"DATA_SOURCE",sortData:"DATA_SOURCE",alignment:"DATA_SOURCE",node:"BUILD_LAYOUT",label:"LABELS",link:"BUILD_LAYOUT",palette:"BUILD_LAYOUT",paletteExtensionMode:"BUILD_LAYOUT"},_themeDependentChanges:["BUILD_LAYOUT"],_getDefaultSize:function(){return{width:400,height:400}},_themeSection:"sankey",_fontFields:["label.font"],_optionChangesOrder:["DATA_SOURCE"],_initialChanges:["DATA_SOURCE"],_initCore:function(){this._groupLinks=this._renderer.g().append(this._renderer.root),this._groupNodes=this._renderer.g().append(this._renderer.root),this._groupLabels=this._renderer.g().attr({class:this._rootClassPrefix+"-labels"}).append(this._renderer.root),this._drawLabels=!0,this._nodes=[],this._links=[],this._gradients=[]},_disposeCore:h.lQ,_applySize:function(n){this._rect=n.slice();const e=this._getOption("adaptiveLayout");return this._drawLabels=!!(e.keepLabels||this._rect[2]-this._rect[0]>e.width),this._change(["BUILD_LAYOUT"]),this._rect},_eventsMap:{onNodeHoverChanged:{name:"nodeHoverChanged"},onLinkHoverChanged:{name:"linkHoverChanged"}},_customChangesOrder:["BUILD_LAYOUT","NODES_DRAW","LINKS_DRAW","LABELS","DRAWN"],_dataSourceChangedHandler:function(){this._requestChange(["BUILD_LAYOUT"])},_change_DRAWN:function(){this._drawn()},_change_DATA_SOURCE:function(){this._change(["DRAWN"]),this._updateDataSource()},_change_LABELS:function(){this._applyLabelsAppearance()},_change_BUILD_LAYOUT:function(){this._groupNodes.clear(),this._groupLinks.clear(),this._groupLabels.clear(),this._buildLayout()},_change_NODES_DRAW:function(){const n=this;n._nodes.forEach(function(t,i){const r=n._renderer.rect().attr(t.rect).append(n._groupNodes);t.element=r}),this._applyNodesAppearance()},_change_LINKS_DRAW:function(){const n=this;n._links.forEach(function(t,i){const r=n._renderer.g().attr({class:"link","data-link-idx":i}).append(n._groupLinks);t.overlayElement=n._renderer.path([],"area").attr({d:t.d}).append(r),t.element=n._renderer.path([],"area").attr({d:t.d}).append(r)}),this._applyLinksAppearance()},_suspend:function(){this._applyingChanges||this._suspendChanges()},_resume:function(){this._applyingChanges||this._resumeChanges()},_showTooltip:h.lQ,hideTooltip:h.lQ,clearHover:function(){this._suspend(),this._nodes.forEach(function(n){n.isHovered()&&n.hover(!1)}),this._links.forEach(function(n){n.isHovered()&&n.hover(!1),n.isAdjacentNodeHovered()&&n.adjacentNodeHover(!1)}),this._resume()},_applyNodesAppearance:function(){this._nodes.forEach(function(n){const e=n.getState();n.element.smartAttr(n.states[e])})},_applyLinksAppearance:function(){this._links.forEach(function(n){const e=n.getState();n.element.smartAttr(n.states[e]),n.overlayElement.smartAttr(n.overlayStates[e])})},_hitTestTargets:function(n,e){const t=this;let i;return this._proxyData.some(function(r){if(i=r.call(t,n,e),i)return!0}),i},_getData:function(){const n=this,e=n._dataSourceItems()||[],t=n._getOption("sourceField",!0),i=n._getOption("targetField",!0),r=n._getOption("weightField",!0),m=[];return e.forEach(function(A){const V=Object.prototype.hasOwnProperty.bind(A);V(t)?V(i)?V(r)?(0,C.Kg)(A[t])?(0,C.Kg)(A[i])?!(0,C.kf)(A[r])||A[r]<=0?n._incidentOccurred("E2009",r):m.push([A[t],A[i],A[r]]):n._incidentOccurred("E2008",i):n._incidentOccurred("E2008",t):n._incidentOccurred("E2007",r):n._incidentOccurred("E2007",i):n._incidentOccurred("E2007",t)}),m},_buildLayout:function(){const n=this,e=n._getData(),t=this._rect,i=n._getOption("node"),r=n._getOption("sortData"),V=(n._getOption("layoutBuilder",!0)||p5).computeLayout(e,r,{availableRect:{x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]},nodePadding:i.padding,nodeWidth:i.width,nodeAlign:n._getOption("alignment",!0)},n._incidentOccurred);if(n._layoutMap=V,!Object.prototype.hasOwnProperty.call(V,"error")){const X={};let ce=0;const _e=n._getOption("link"),Me=V.nodes.map(Je=>Je.length).reduce((Je,rt)=>Je+rt,0),Ve=n._themeManager.createPalette(n._getOption("palette",!0),{useHighlight:!0,extensionMode:n._getOption("paletteExtensionMode",!0),count:Me});n._nodes=[],n._links=[],n._gradients.forEach(Je=>{Je.dispose()}),n._gradients=[],n._shadowFilter&&n._shadowFilter.dispose(),V.nodes.forEach(Je=>{Je.forEach(rt=>{const Ct=i.color||Ve.getNextColor(),Xt=new Jee(n,{id:ce,color:Ct,rect:rt,options:i,linksIn:g5(V,rt._name,"in"),linksOut:g5(V,rt._name,"out")});n._nodes.push(Xt),ce++,X[rt._name]=Ct})}),V.links.forEach(Je=>{let rt=null;_e.colorMode===r5&&(rt=n._renderer.linearGradient([{offset:"0%","stop-color":X[Je._from._name]},{offset:"100%","stop-color":X[Je._to._name]}]),this._gradients.push(rt));let Ct=_e.color;_e.colorMode===s5?Ct=X[Je._from._name]:_e.colorMode===a5&&(Ct=X[Je._to._name]);const Xt=new ete(n,{d:Je.d,boundingRect:Je._boundingRect,color:Ct,options:_e,connection:{source:Je._from._name,target:Je._to._name,weight:Je._weight},gradient:rt});n._links.push(Xt)}),n._renderer.initDefsElements(),n._change(["NODES_DRAW","LINKS_DRAW","LABELS"])}n._change(["DRAWN"])},_applyLabelsAppearance:function(){const n=this,e=n._getOption("label"),t=n._rect[2]-n._rect[0],i=n._getOption("node");if(n._shadowFilter=n._renderer.shadowFilter("-50%","-50%","200%","200%").attr(e.shadow),n._groupLabels.clear(),n._drawLabels&&e.visible){const r=(t-(i.width+e.horizontalOffset)-n._layoutMap.cascades.length*i.width)/(n._layoutMap.cascades.length-1)-e.horizontalOffset;n._nodes.forEach(function(m){n._createLabel(m,e,n._shadowFilter.id),function ite(n,e,t,i){n._label.getBBox().width>t&&n.labelText.applyEllipsis(t);const r=n._label.getBBox(),m=e.verticalOffset,A=e.horizontalOffset;let V=Math.round(n.rect.y+n.rect.height/2-r.y-r.height/2)+m,X=n.rect.x+A+n.rect.width-r.x;X+r.width>=i[2]-i[0]&&(X=n.rect.x-A-r.x-r.width),V>=i[3]&&(V=i[3]),V-r.height<i[1]&&(V=n.rect.y-r.y+m),n.labelText.attr({translateX:X,translateY:V})}(m,e,r,n._rect)}),"none"!==e.overlappingBehavior&&n._nodes.forEach(function(m){const A=m._label.getBBox();n._nodes.forEach(function(V){const X=V._label.getBBox();m.id!==V.id&&p5.overlap(A,X)&&("ellipsis"===e.overlappingBehavior?m.labelText.applyEllipsis(X.x-A.x):"hide"===e.overlappingBehavior&&m.labelText.remove())})})}},_createLabel:function(n,e,t){const i=e.customizeText(n),r=n.getLabelAttributes(e,t);i&&(n._label=this._renderer.g().append(this._groupLabels),n.labelText=this._renderer.text(i).attr(r.attr).css(r.css),n.labelText.append(n._label))},_getMinSize:function(){const n=this._getOption("adaptiveLayout");return[n.width,n.height]},getAllNodes:function(){return this._nodes.slice()},getAllLinks:function(){return this._links.slice()}});(0,y.A)("dxSankey",wW);const rP=wW;wW.addPlugin(cs);const f5=function(n,e){return function(t){let i=(0,C.Tn)(n)?n.call(t,t):{};const r=Object.prototype.hasOwnProperty.bind(i);return!r("html")&&!r("text")&&(i=(0,_.X)(i,e.call(t,t))),i}},m5=rP.prototype;let lte=0;m5._eventsMap.onNodeClick={name:"nodeClick"},m5._eventsMap.onLinkClick={name:"linkClick"};const dte={name:"tracker",init:function(){const n=this,e="__sankey_data_"+lte++;n._tracker=new GF({widget:n,root:n._renderer.root,getData:function(t){return t.target[e]},getNode:function(t){return t<n._nodes.length?n._nodes[t]:n._links[t-n._nodes.length]},click:function(t){const i=this.getData(t.event)<n._nodes.length?"nodeClick":"linkClick";n._eventTrigger(i,{target:t.node,event:t.event})}}),this._dataKey=e},dispose:function(){this._tracker.dispose()},extenders:{_change_LINKS_DRAW:function(){const n=this._dataKey;this._nodes.concat(this._links).forEach(function(e,t){e.element.data(n,t)})}}};rP.addPlugin(bv),rP.addPlugin(Xp),rP.addPlugin(dte),rP.addPlugin(LC),rP.addPlugin(qy),function ste(n){n.prototype._setTooltipOptions=function(){const e=this._tooltip,t=e&&this._getOption("tooltip");let i,r;t.linkTooltipTemplate&&(i=this._getTemplate(t.linkTooltipTemplate)),t.nodeTooltipTemplate&&(r=this._getTemplate(t.nodeTooltipTemplate)),e&&e.update((0,_.X)({},t,{customizeTooltip:function(m){i&&"link"===m.type||r&&"node"===m.type||(m.skipTemplate=!0);const A=V=>e.formatValue(V);return"node"===m.type?f5(t.customizeNodeTooltip,(n=>function(e){return{html:`<strong>${e.label}</strong><br/>Incoming weight: ${n(e.weightIn)}<br/>Outgoing weight: ${n(e.weightOut)}`}})(A))(m.info):"link"===m.type?f5(t.customizeLinkTooltip,(n=>function(e){return{html:`<strong>${e.source} > ${e.target}</strong><br/>Weight: ${n(e.weight)}`}})(A))(m.info):{}},contentTemplate(m,A){const V={model:m.info,container:A};return i&&"link"===m.type?i.render(V):r&&"node"===m.type?r.render(V):void 0},enabled:t.enabled}))},n.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()}}(rP);let _5=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.uvP,z.uIe,z.uE7,z.A1g,z.r2Z,z.cug,z.OlT,z.lWu,z.Af1,z.FXg,z.Yh3,z.kY_,z.hzo,z.sVF,z.YkV,z.Vku,z.Pxf,f.p_,f.xZ,z.uvP,z.uIe,z.uE7,z.A1g,z.r2Z,z.cug,z.OlT,z.lWu,z.Af1,z.FXg,z.Yh3,z.kY_,z.hzo,z.sVF,z.YkV,z.Vku,z.Pxf,f.xZ]})}return n})();var v5=M(8412),ute=M(8761);const C5=()=>{const n=(0,k.ss)();return{isCompact:(0,k.ip)(n),isMaterial:(0,k.gx)(n),isFluent:(0,k.Ft)(n),isMaterialBased:(0,k.Nt)(n)}},y5="dx-scheduler-fixed-appointments",_te={head:"dx-scheduler-appointment-head",body:"dx-scheduler-appointment-body",tail:"dx-scheduler-appointment-tail"},vte={horizontal:"dx-scheduler-appointment-horizontal",vertical:"dx-scheduler-appointment-vertical"},b5="dx-scheduler-appointment-drag-source",cU="dx-scheduler-header-panel-current-time-cell",dU="dx-scheduler-virtual-cell",x5="dx-scheduler-time-panel",TW="dx-scheduler-date-table",DW="dx-scheduler-date-table-row",Wk="dx-scheduler-group-row",AW="dx-scheduler-group-header-content",uU="dx-scheduler-last-group-cell",hU="dx-scheduler-first-group-cell",pU=["dx-scheduler-group-column-count-one","dx-scheduler-group-column-count-two","dx-scheduler-group-column-count-three"],IW="dxListItemData",VS="dxAppointmentSettings",S5="horizontal",kc={DAY:"day",WEEK:"week",WORK_WEEK:"workWeek",MONTH:"month",TIMELINE_DAY:"timelineDay",TIMELINE_WEEK:"timelineWeek",TIMELINE_WORK_WEEK:"timelineWorkWeek",TIMELINE_MONTH:"timelineMonth",AGENDA:"agenda"},E5="vertical",Ete={timelineDay:!0,timelineWeek:!0,timelineWorkWeek:!0,timelineMonth:!0},Ote=["day","week","workWeek","month","timelineDay","timelineWeek","timelineWorkWeek","timelineMonth","agenda"],wte=Tn.A.dateToMilliseconds,PW=(n,e)=>{const t=Tn.A.trimTime(n),i=Tn.A.trimTime(e);return i.setDate(i.getDate()+1),[t,i]},$k=(n,e)=>{const{startDate:t,endDate:i,allDay:r}=n;switch(e){case"hidden":return!1;case"allDay":return r;default:return!!r||!!(0,C.O9)(i)&&((n,e)=>Math.floor((e.getTime()-n.getTime())/wte("hour")))(t,i)>=24}},Ate=n=>{const{left:e,top:t,width:i,height:r}=n;return`${e}-${t}-${i}-${r}`},O5=(n,e)=>(0,C.O9)(n.find(t=>(0,h.RL)(t,e))),w5=n=>{switch(n?.length){case 1:return pU[0];case 2:return pU[1];case 3:return pU[2];default:return}},Lw=(n,e)=>{const t=new Date(n);return(0,C.O9)(e)&&t.setHours(e,e%1*60,0,0),t},MW=(n,e)=>e-n,T5=(n,e)=>{const t=Math.floor(e);return Aa.isTimezoneChangeInDate(n)&&t!==n.getHours()?Tn.A.dateToMilliseconds("hour"):0},D5=(n,e)=>{let{startViewDate:t,startDayHour:i,cellIndexShift:r,viewOffset:m}=e;const A=$s_addOffsets(n,[-m]);if(!Aa.isTimezoneChangeInDate(A))return n;const X=new Date(new Date(t).setDate(t.getDate()+2)),ce=T5(t,i);return $s_addOffsets(X,[m,r,-ce])},RW=n=>n[n.length-1].length,A5=(n,e)=>n??RW(e),gU=(n,e)=>e===E5&&!!n.length,HS=n=>{let e=0;for(let t=0,i=n.length;t<i;t+=1)t?e*=n[t].items.length:e=n[t].items.length;return e},kW=(n,e)=>{const t=HS(n)||1;return gU(n,e)?1:t},fU=n=>!!Ete[n],sP=n=>n!==kc.TIMELINE_MONTH&&n!==kc.MONTH,LW=n=>{switch(n){case kc.TIMELINE_DAY:case kc.TIMELINE_WEEK:case kc.TIMELINE_WORK_WEEK:case kc.TIMELINE_MONTH:case kc.MONTH:return!0;default:return!1}},I5=(n,e,t,i)=>i>0?Tn.A.dateInRange(n,e,new Date(t.getTime()-1)):Tn.A.dateInRange(n,t,e,"date"),P5=(n,e)=>1===n.getDate()&&e>1,mU=(n,e,t,i)=>{if(!n)return new Date(e);let r=Tn.A.trimTime(i);const m=r.getTime()<=e.getTime()?1:-1;let A=new Date(r.getTime()+t*m);for(;!I5(e,r,A,m);)r=A,A=new Date(r.getTime()+t*m);return m>0?r:A},M5=(n,e,t)=>gU(n,e)&&t,R5=(n,e,t,i)=>{switch(n){case"month":return 36e5*MW(e,t);case"timelineMonth":return Tn.A.dateToMilliseconds("day");default:return 36e5*i}},k5=n=>n.length,BW=(n,e)=>n??k5(e),L5=(n,e)=>n&&e,B5=(n,e)=>e&&n?n.toString():"0",N5=(n,e)=>{const t=n??new Date;return e?.createDate(t,{path:"toGrid"})||t},F5=n=>(0,C.O9)(n)?n:sa.A.firstDayOfWeekIndex(),hV=(n,e)=>"horizontal"===e&&!!n.length,Lte=(n,e,t)=>{const i=hV(n,e);return t&&i},V5=(n,e,t,i)=>{const r=t&&!i.viewType.includes("timeline");let m=0;const A=new Date(n);A.setDate(A.getDate()+1),A.setHours(0,0,0,0);const V=new Date(e);V.setHours(0,0,0,0);const{startDayHour:X,endDayHour:ce}=i.getViewOptions(),_e=r?24:ce-X;for(;A<V;)i.isSkippedDate(A)&&(m+=_e),A.setDate(A.getDate()+1);const Me=n.getHours(),Ve=e.getHours()+Math.ceil(e.getTime()%36e5);return i.isSkippedDate(n)&&(r?m+=24:Me<X?m+=_e:Me<ce&&(m+=ce-Me)),i.isSkippedDate(e)&&(r?m+=24:Ve>ce?m+=_e:Ve>X&&(m+=Ve-X)),m},H5=n=>{const e=n.getDay();return 6===e||0===e},U5=n=>2*Math.floor(n/7),z5=(n,e)=>Array.from({length:Math.ceil(n/e)},(t,i)=>Math.min(n-e*i,e)),NW=(n,e,t,i)=>{if(!n)return new Date(e);let r=new Date(i);const m=new Date(i),A=r.getTime()<=e.getTime()?1:-1;let V=new Date(new Date(m.setMonth(m.getMonth()+A*t)));for(;!I5(e,r,V,A);)r=new Date(V),A>0&&r.setDate(1),V=new Date(new Date(V.setMonth(V.getMonth()+A*t)));return A>0?r:V},FW=(n,e)=>{const t=e??{},i=(0,Lo.A)({},t);return n.forEach(r=>{let{attr:m,value:A}=r;i[m]=A||t[m]}),i},G5=n=>Object.keys(n).filter(e=>!!e&&n[e]).join(" "),W5=(n,e)=>n?Tn.A.getFirstWeekDate(n,e):void 0,ll_getField=(n,e,t)=>{if((0,C.O9)(n.getter[e]))return n.getter[e](t)},ll_setField=(n,e,t,i)=>{if((0,C.O9)(n.setter[e]))return n.setter[e](t,i),t},VW=Tn.A.dateToMilliseconds,HW=n=>!Tn.A.sameDate(n.startDate,n.endDate),lne=(n,e,t,i)=>{n=n.replace(/\s/g,"");const r=X=>t.createDate(X,{path:"toGrid"}),m=Yl.A.deserializeDate(n),A=r(e);let V=r(m);return V=Aa.correctRecurrenceExceptionByTimezone(V,A,i),Yl.A.serializeDate(V,"yyyyMMddTHHmmss")},$5=(n,e,t,i,r)=>{if(((n,e)=>!e||isNaN(e.getTime())||n.getTime()>e.getTime())(e,t)){const A=(X=e,ll_getField(r,"allDay",n)?Tn.A.setToDayEnd(new Date(X)):new Date(X.getTime()+i*VW("minute")));r.setter.endDate(n,A)}var X},j5=(n,e)=>{n.sort((t,i)=>{const r=new Date(ll_getField(e,"startDate",t.settings||t)),m=new Date(ll_getField(e,"startDate",i.settings||i));return Math.sign(r.getTime()-m.getTime())})};class UW{constructor(e,t,i,r){this.rawAppointment=e,this.dataAccessors=t,this.timeZoneCalculator=i,this.options=r}get duration(){return this.endDate?this.endDate-this.startDate:0}get startDate(){const e=this.getField("startDate");return void 0===e?e:new Date(e)}set startDate(e){this.setField("startDate",e)}get endDate(){const e=this.getField("endDate");return void 0===e?e:new Date(e)}set endDate(e){this.setField("endDate",e)}get allDay(){return this.getField("allDay")}set allDay(e){this.setField("allDay",e)}get text(){return this.getField("text")}set text(e){this.setField("text",e)}get description(){return this.getField("description")}set description(e){this.setField("description",e)}get startDateTimeZone(){return this.getField("startDateTimeZone")}get endDateTimeZone(){return this.getField("endDateTimeZone")}get recurrenceRule(){return this.getField("recurrenceRule")}set recurrenceRule(e){this.setField("recurrenceRule",e)}get recurrenceException(){return this.getField("recurrenceException")}set recurrenceException(e){this.setField("recurrenceException",e)}get disabled(){return!!this.getField("disabled")}get isRecurrent(){return Fy().isValidRecurrenceRule(this.recurrenceRule)}getField(e){return ll_getField(this.dataAccessors,e,this.rawAppointment)}setField(e,t){return ll_setField(this.dataAccessors,e,this.rawAppointment,t)}calculateStartDate(e){if(!this.startDate||isNaN(this.startDate.getTime()))throw is.A.Error("E1032",this.text);return this.calculateDate(this.startDate,this.startDateTimeZone,e)}calculateEndDate(e){return this.calculateDate(this.endDate,this.endDateTimeZone,e)}calculateDate(e,t,i){if(e)return this.timeZoneCalculator.createDate(e,{appointmentTimeZone:t,path:i})}clone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;const t=new UW((0,xe.tm)({},this.rawAppointment),this.dataAccessors,this.timeZoneCalculator,e);return null!=e&&e.pathTimeZone&&(t.startDate=t.calculateStartDate(e.pathTimeZone),t.endDate=t.calculateEndDate(e.pathTimeZone)),t}source(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]){const t=this.clone();return t.startDate=this.startDate,t.endDate=this.endDate,t.source()}return(0,_.X)({},this.rawAppointment)}}const hc=(n,e,t,i)=>new UW(n,e,t,i),zW=n=>sa.A.getDayNames("abbreviated")[n.getDay()],_U=n=>`${zW(n)} ${sa.A.format(n,"day")}`,vU_getTimePanelCellText=(n,e,t,i,r,m)=>{if(n%2!=0)return"";const A=D5(e,{startViewDate:t,startDayHour:r,cellIndexShift:Math.round(i)*n,viewOffset:m});return sa.A.format(A,"shorttime")},Bw_getViewStartByOptions=NW,Bw_getCellText=(n,e)=>P5(n,e)?[sa.A.getMonthNames("abbreviated")[n.getMonth()],sa.A.format(n,"day")].join(" "):sa.A.format(n,"dd"),Bw_calculateCellIndex=(n,e,t,i)=>n*i+e,_ne={getDateForHeaderText:(n,e,t)=>{let{startDayHour:i,startViewDate:r,cellCountInDay:m,interval:A,viewOffset:V}=t;return D5(e,{startViewDate:r,startDayHour:i,cellIndexShift:n%m*A,viewOffset:V})}},GW_getCurrentView=(n,e)=>{let t=e.find(i=>!!((0,C.Gv)(i)?[i.name,i.type]:[i]).includes(n));return void 0===t&&(Ote.includes(n)?t=n:[t]=e),t},Qh_addWidthToStyle=(n,e)=>FW([{attr:"width",value:n?`${n}px`:""}],e),Qh_addHeightToStyle=(n,e)=>FW([{attr:"height",value:n?`${n}px`:""}],e),Qh_getGroupCellClasses=function(){return G5({"dx-scheduler-first-group-cell":arguments.length>0&&void 0!==arguments[0]&&arguments[0],"dx-scheduler-last-group-cell":arguments.length>1&&void 0!==arguments[1]&&arguments[1],[arguments.length>2&&void 0!==arguments[2]?arguments[2]:""]:!0})},Qh_combineClasses=G5,Qh_getCellSizeHorizontalClass=(n,e)=>{switch(n){case"day":case"week":case"workWeek":case"month":return e?"dx-scheduler-cell-sizes-horizontal":"";default:return"dx-scheduler-cell-sizes-horizontal"}},Qh_getCellSizeVerticalClass=n=>n?"":"dx-scheduler-cell-sizes-vertical",Cne_getThemeType=C5;var yne=M(7940),K5=M(4647);const X5=bI.A.inherit({_getDefaultOptions(){return(0,_.X)(this.callBase(),{spellcheck:!0,minHeight:void 0,maxHeight:void 0,autoResizeEnabled:!1})},_initMarkup(){this.$element().addClass("dx-textarea"),this.callBase(),this.setAria("multiline","true")},_renderContentImpl(){this._updateInputHeight(),this.callBase()},_renderInput(){this.callBase(),this._renderScrollHandler()},_createInput(){const n=(0,a.A)("<textarea>");return this._applyInputAttributes(n,this.option("inputAttr")),this._updateInputAutoResizeAppearance(n),n},_setInputMinHeight:h.lQ,_renderScrollHandler(){this._eventY=0;const n=this._input(),e=(0,K5.N)(n,!0);L.A.on(n,(0,N.b4)(yne.A.init,this.NAME),e,h.lQ),L.A.on(n,(0,N.b4)(Si.A.down,this.NAME),this._pointerDownHandler.bind(this)),L.A.on(n,(0,N.b4)(Si.A.move,this.NAME),this._pointerMoveHandler.bind(this))},_pointerDownHandler(n){this._eventY=(0,N.rw)(n).y},_pointerMoveHandler(n){const e=(0,N.rw)(n).y,t=this._eventY-e;(0,K5.f)(this._input(),t)&&(n.isScrollingEvent=!0,n.stopPropagation()),this._eventY=e},_renderDimensions(){const n=this.$element(),e=n.get(0),t=this._getOptionValue("width",e),i=this._getOptionValue("height",e),r=this.option("minHeight"),m=this.option("maxHeight");n.css({minHeight:void 0!==r?r:"",maxHeight:void 0!==m?m:"",width:t,height:i})},_resetDimensions(){this.$element().css({height:"",minHeight:"",maxHeight:""})},_renderEvents(){this.option("autoResizeEnabled")&&L.A.on(this._input(),(0,N.b4)("input paste",this.NAME),this._updateInputHeight.bind(this)),this.callBase()},_refreshEvents(){L.A.off(this._input(),(0,N.b4)("input paste",this.NAME)),this.callBase()},_getHeightDifference(n){return(0,D.pD)(this._$element.get(0),!1)+(0,D.pD)(this._$textEditorContainer.get(0),!1)+(0,D.pD)(this._$textEditorInputContainer.get(0),!0)+(0,D.GU)("height",(0,gr.zk)().getComputedStyle(n.get(0))).margin},_updateInputHeight(){if(!(0,gr.Vd)())return;const n=this._input(),e=this.option("height"),t=void 0===e&&this.option("autoResizeEnabled");if(!(t||void 0===e&&this.option("minHeight")))return void n.css("height","");this._resetDimensions(),this._$element.css("height",(0,D.P$)(this._$element)),n.css("height",0);const r=this._getHeightDifference(n);this._renderDimensions();const m=this._getBoundaryHeight("minHeight"),A=this._getBoundaryHeight("maxHeight");let V=n[0].scrollHeight;if(void 0!==m&&(V=Math.max(V,m-r)),void 0!==A){const X=A-r,ce=V>X;V=Math.min(V,X),this._updateInputAutoResizeAppearance(n,!ce)}n.css("height",V),t&&this._$element.css("height","auto")},_getBoundaryHeight(n){const e=this.option(n);if((0,C.O9)(e))return"number"==typeof e?e:(0,D.hP)(e,this.$element().get(0).parentElement,this._$element.get(0))},_renderInputType:h.lQ,_visibilityChanged(n){n&&this._updateInputHeight()},_updateInputAutoResizeAppearance(n,e){if(n){const t=(0,h.YD)(e,this.option("autoResizeEnabled"));n.toggleClass("dx-texteditor-input-auto-resize",t)}},_dimensionChanged(){this.option("visible")&&this._updateInputHeight()},_optionChanged(n){switch(n.name){case"autoResizeEnabled":this._updateInputAutoResizeAppearance(this._input(),n.value),this._refreshEvents(),this._updateInputHeight();break;case"value":case"height":this.callBase(n),this._updateInputHeight();break;case"minHeight":case"maxHeight":this._renderDimensions(),this._updateInputHeight();break;case"visible":this.callBase(n),n.value&&this._updateInputHeight();break;default:this.callBase(n)}}});(0,y.A)("dxTextArea",X5);const bne=X5;M(4775);var xne=M(6285);class Sne{constructor(){this.counter=0}isFree(){return 0===this.counter}take(){this.counter+=1}release(){this.counter-=1,this.counter<0&&(this.counter=0)}}const jk={Main:"mainGroup",Recurrence:"recurrenceGroup"},WW=()=>(0,k.Ft)((0,k.ss)())?"filled":void 0;class Tne{constructor(e){this.scheduler=e,this.form=null,this.semaphore=new Sne}get dxForm(){return this.form}set readOnly(e){this.form.option("readOnly",e);const{recurrenceRuleExpr:t}=this.scheduler.getDataAccessors().expr,i=this.form.getEditor(t);i?.option("readOnly",e)}get formData(){return this.form.option("formData")}set formData(e){this.form.option("formData",e)}create(e,t,i){const{allowTimeZoneEditing:r}=this.scheduler.getEditingConfig(),m=this.scheduler.getDataAccessors(),{expr:A}=m,V=!!ll_getField(m,"recurrenceRule",i),X=V?1:2,ce=[...this._createMainItems(A,e,t,r),...this.scheduler.createResourceEditorModel()];t(V);const _e=[{itemType:"group",name:jk.Main,colCountByScreen:{lg:2,xs:1},colSpan:X,items:ce},{itemType:"group",name:jk.Recurrence,visible:V,colSpan:X,items:this._createRecurrenceEditor(A)}],Me=(0,a.A)("<div>");this.scheduler.createComponent(Me,_G.A,{items:_e,showValidationSummary:!0,scrollingEnabled:!0,colCount:"auto",colCountByScreen:{lg:2,xs:1},formData:i,showColonAfterLabel:!1,labelLocation:"top",onInitialized:Ve=>{this.form=Ve.component},customizeItem:Ve=>{if(this.form&&"group"===Ve.itemType){const Je=this.scheduler.getDataAccessors().expr,rt=new Date(this.formData[Je.startDateExpr]),Ct=new Date(this.formData[Je.endDateExpr]),Xt=Ve.items.find(Fn=>Fn.dataField===Je.startDateTimeZoneExpr),On=Ve.items.find(Fn=>Fn.dataField===Je.endDateTimeZoneExpr);Xt&&(Xt.editorOptions.dataSource=this.createTimeZoneDataSource(rt)),On&&(On.editorOptions.dataSource=this.createTimeZoneDataSource(Ct))}},screenByWidth:Ve=>Ve<600||"desktop"!==d.A.current().deviceType?"xs":"lg",elementAttr:{class:"e2e-dx-scheduler-form"}})}createTimeZoneDataSource(e){return new xne.A({store:Aa.getTimeZones(e),paginate:!0,pageSize:10})}_createAppointmentAdapter(e){return hc(e,this.scheduler.getDataAccessors())}_dateBoxValueChanged(e,t,i){((n,e,t)=>{null!==e&&!e&&(null===t||t)&&n.option("value",t)})(e.component,e.value,e.previousValue);const r=Yl.A.deserializeDate(e.value),m=Yl.A.deserializeDate(e.previousValue),A=this.form.getEditor(t),V=Yl.A.deserializeDate(A.option("value"));if(this.semaphore.isFree()&&V&&r&&i(V,r)){const X=m?V.getTime()-m.getTime():0;A.option("value",new Date(r.getTime()+X))}}_createTimezoneEditor(e,t,i,r,m,A){let V=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const X=Wn.A.format("dxScheduler-noTimezoneTitle");return{name:this.normalizeEditorName(e),dataField:e,editorType:"dxSelectBox",visibleIndex:i,colSpan:r,cssClass:A,label:{text:" "},editorOptions:{displayExpr:"title",valueExpr:"id",placeholder:X,searchEnabled:!0,onValueChanged:ce=>{const{form:_e}=this,Me=_e.getEditor(t);m&&Me.option("value",ce.value)}},visible:V}}_createDateBoxItems(e,t){const i=t?2:1,r=this.scheduler.getFirstDayOfWeek();return[this.createDateBoxEditor(e.startDateExpr,i,r,"dxScheduler-editorLabelStartDate","e2e-dx-scheduler-form-start-date",m=>{this._dateBoxValueChanged(m,e.endDateExpr,(A,V)=>A<V)}),this._createTimezoneEditor(e.startDateTimeZoneExpr,e.endDateTimeZoneExpr,1,i,!0,"e2e-dx-scheduler-form-start-date-timezone",t),this.createDateBoxEditor(e.endDateExpr,i,r,"dxScheduler-editorLabelEndDate","e2e-dx-scheduler-form-end-date",m=>{this._dateBoxValueChanged(m,e.startDateExpr,(A,V)=>V<A)}),this._createTimezoneEditor(e.endDateTimeZoneExpr,e.startDateTimeZoneExpr,3,i,!1,"e2e-dx-scheduler-form-end-date-timezone",t)]}_changeFormItemDateType(e,t,i){const r=this.getEditorPath(e,t),m=this.form.itemOption(r).editorOptions,V=(0,Lo.A)({},m,{type:i?"date":"datetime"});this.form.itemOption(r,"editorOptions",V)}_createMainItems(e,t,i,r){return[{name:this.normalizeEditorName(e.textExpr),dataField:e.textExpr,cssClass:"e2e-dx-scheduler-form-text",editorType:"dxTextBox",colSpan:2,label:{text:Wn.A.format("dxScheduler-editorLabelTitle")},editorOptions:{stylingMode:WW()}},{itemType:"group",colSpan:2,colCountByScreen:{lg:2,xs:1},items:this._createDateBoxItems(e,r)},{itemType:"group",colSpan:2,colCountByScreen:{lg:2,xs:2},items:[{name:this.normalizeEditorName(e.allDayExpr),dataField:e.allDayExpr,cssClass:"dx-appointment-form-switch e2e-dx-scheduler-form-all-day-switch",editorType:"dxSwitch",label:{text:Wn.A.format("dxScheduler-allDay"),location:"right"},editorOptions:{onValueChanged:m=>{const{value:A}=m,V=this.form.getEditor(e.startDateExpr),X=this.form.getEditor(e.endDateExpr),ce=Yl.A.deserializeDate(V.option("value"));if(this.semaphore.isFree()&&ce)if(A){const _e=Tn.A.trimTime(ce);V.option("value",new Date(_e)),X.option("value",new Date(_e))}else{const _e=((n,e)=>new Date(new Date(n).setHours(e)))(ce,this.scheduler.getStartDayHour()),Me=this.scheduler.getCalculatedEndDate(_e);V.option("value",_e),X.option("value",Me)}this._changeFormItemDateType(e.startDateExpr,"Main",A),this._changeFormItemDateType(e.endDateExpr,"Main",A)}}},{editorType:"dxSwitch",dataField:"repeat",cssClass:"dx-appointment-form-switch e2e-dx-scheduler-form-recurrence-switch",name:"visibilityChanged",label:{text:Wn.A.format("dxScheduler-editorLabelRecurrence"),location:"right"},editorOptions:{onValueChanged:m=>{const{form:A}=this,V=m.value?1:2;A.itemOption(jk.Main,"colSpan",V),A.itemOption(jk.Recurrence,"colSpan",V),((n,e,t)=>{var i;t.itemOption(jk.Recurrence,"visible",e),null===(i=t.getEditor(n))||void 0===i||i.changeValueByVisibility(e)})(e.recurrenceRuleExpr,m.value,A),i(m.value),t()}}}]},{itemType:"empty",colSpan:2},{name:this.normalizeEditorName(e.descriptionExpr),dataField:e.descriptionExpr,cssClass:"e2e-dx-scheduler-form-description",editorType:"dxTextArea",colSpan:2,label:{text:Wn.A.format("dxScheduler-editorLabelDescription")},editorOptions:{stylingMode:WW()}},{itemType:"empty",colSpan:2}]}_createRecurrenceEditor(e){return[{name:this.normalizeEditorName(e.recurrenceRuleExpr),dataField:e.recurrenceRuleExpr,editorType:"dxRecurrenceEditor",editorOptions:{firstDayOfWeek:this.scheduler.getFirstDayOfWeek(),timeZoneCalculator:this.scheduler.getTimeZoneCalculator(),getStartDateTimeZone:()=>this._createAppointmentAdapter(this.formData).startDateTimeZone},label:{text:" ",visible:!1}}]}setEditorsType(e){const{startDateExpr:t,endDateExpr:i}=this.scheduler.getDataAccessors().expr,r=this.getEditorPath(t,"Main"),m=this.getEditorPath(i,"Main"),A=this.form.itemOption(r),V=this.form.itemOption(m);if(A&&V){const X=A.editorOptions,ce=V.editorOptions;X.type=ce.type=e?"date":"datetime",this.form.itemOption(r,"editorOptions",X),this.form.itemOption(m,"editorOptions",ce)}}updateRecurrenceEditorStartDate(e,t){this.setEditorOptions(t,"Recurrence",{startDate:e})}setEditorOptions(e,t,i){const r=this.getEditorPath(e,t),m=this.form.itemOption(r);m&&this.form.itemOption(r,"editorOptions",(0,_.X)({},m.editorOptions,i))}setTimeZoneEditorDataSource(e,t){const i=this.createTimeZoneDataSource(e);this.setEditorOptions(t,"Main",{dataSource:i})}updateFormData(e){this.semaphore.take(),this.form.option("formData",e);const t=this.scheduler.getDataAccessors(),{expr:i}=t,r=ll_getField(t,"startDate",e),m=ll_getField(t,"endDate",e),A=ll_getField(t,"allDay",e),V=new Date(r),X=new Date(m);this.setTimeZoneEditorDataSource(V,i.startDateTimeZoneExpr),this.setTimeZoneEditorDataSource(X,i.endDateTimeZoneExpr),this.updateRecurrenceEditorStartDate(V,i.recurrenceRuleExpr),this.setEditorsType(A),this.semaphore.release()}createDateBoxEditor(e,t,i,r,m,A){return{editorType:"dxDateBox",name:this.normalizeEditorName(e),dataField:e,colSpan:t,cssClass:m,label:{text:Wn.A.format(r)},validationRules:[{type:"required"}],editorOptions:{stylingMode:WW(),width:"100%",calendarOptions:{firstDayOfWeek:i},onValueChanged:A,useMaskBehavior:!0}}}getEditorPath(e,t){const i=this.normalizeEditorName(e);return`${jk[t]}.${i}`}normalizeEditorName(e){return e&&e.replace(/\./g,"_")}}const pV_MOBILE_DEFAULT=350,pV_MOBILE_FULLSCREEN=500,Y5=()=>"desktop"!==d.A.current().deviceType;var J5=M(4017);let aP=null;const q5=function(){aP&&(aP.$element().remove(),aP=null)};function e7(n){return q5(),aP=function(n){return new r3.A((0,a.A)("<div>").appendTo(n&&n.container||(0,J5.Uq)()),n)}(n),aP.show()}function CU(){return aP?aP.hide().done(q5).promise():(new g.cY).resolve()}const gV=n=>n.valueExpr||"id",jW=n=>n.displayExpr||"text",Nw=n=>n.fieldExpr||n.field,yU=n=>{if(n instanceof aC.q)return n;const e=(0,Lo.A)({},(0,VH.ho)(n),{pageSize:0});return Array.isArray(n)||(e.filter=n.filter),new aC.q(e)},fV=n=>{let e=0;const t=(i,r,m,A)=>{m=m||[];for(let X=0;X<i.items.length;X++){var V;const ce=i.items[X],_e={name:i.name,value:ce.id,title:ce.text,data:null===(V=i.data)||void 0===V?void 0:V[X],children:[],parent:A||null},Me=r+1;n[Me]&&t(n[Me],Me,_e.children,_e),_e.children.length||(_e.leafIndex=e,e++),m.push(_e)}return m};return t(n[0],0)},t7=(n,e)=>{const t=fV(e),i=(A,V)=>{for(let X=0;X<A.length;X++){if(A[X].leafIndex===V)return A[X];const ce=i(A[X].children,V);if(ce)return ce}},r=(A,V)=>((V=V||[]).push(A.value),A.parent&&r(A.parent,V),V),m=i(t,n);return r(m).reverse()},Kk=(n,e)=>{const t=[];if(HS(e)){if(n<0)return;const i=t7(n,e);for(let r=0;r<e.length;r++)t.push({name:e[r].name,id:i[r]})}return t},bU=n=>n.reduce((e,t)=>{let{name:i,id:r}=t;return(0,Lo.A)({},e,{[i]:r})},{}),n7=n=>{const e=HS(n);return[...new Array(e)].map((t,i)=>{const r=Kk(i,n);return bU(r)})},i7=(n,e)=>{const t=n.find(i=>Nw(i)===e);return!(null==t||!t.allowMultiple)},xU=(n,e)=>n.filter(t=>{const i=Nw(t);return e.indexOf(i)>-1}),SU=(n,e,t)=>n[t][e],KW=(n,e,t,i)=>{i=i||[];for(let r=0;r<e.length;r++)Fne(n,t,e[r].name,e[r].value)&&((0,C.O9)(e[r].leafIndex)&&i.push(e[r].leafIndex),e[r].children&&KW(n,e[r].children,t,i));return i},Fne=(n,e,t,i)=>{const r=n(t,"getter")(e);return O5((0,By.BO)(r),i)},o7=(n,e,t,i)=>(i=i?i.children:[],e.forEach((r,m)=>{let A=!1;const V=r.name,X=r.value,ce=r.title,_e=r.data,Me=n(V,"getter");t.forEach(Ve=>{if(!A){const Je=Me(Ve);Array.isArray(Je)?Je.includes(X)&&(i.push({name:V,value:X,title:ce,data:_e,children:[]}),A=!0):Je===X&&(i.push({name:V,value:X,title:ce,data:_e,children:[]}),A=!0)}}),A&&r.children&&r.children.length&&o7(n,r.children,t,i[m])}),i),Gne=(n,e)=>{const{resources:t,dataAccessors:i,loadedResources:r,resourceLoaderMap:m}=n,{groupIndex:A,groups:V,itemData:X}=e,ce=((n,e)=>{const t=e||[],i=n.find(m=>m.useColorAsDefault);if(i)return i;const r=t.length?xU(n,t):n;return r[r.length-1]})(t||[],V);if(ce){const _e=Nw(ce),Me=Kk(A,r),Ve=SU(i,_e,"getter");let rt=(0,By.BO)(Ve(X))[0];for(let Ct=0;Ct<Me.length;Ct++)if(Me[Ct].name===_e){rt=Me[Ct].id;break}return((n,e,t,i)=>{const r=new g.cY,A=(xU(n,[t])[0]||{}).colorExpr||"color",V=(0,fa.Hz)(A);return((n,e,t,i)=>{const r=new g.cY;return n.filter(m=>Nw(m)===t&&(0,C.O9)(m.dataSource)).forEach(m=>{const A=yU(m.dataSource),V=gV(m);e.has(t)||e.set(t,A.load()),e.get(t).done(X=>{const ce=(0,fa.Hz)(V),_e=X.filter(Me=>(0,h.RL)(ce(Me),i));r.resolve(_e[0])}).fail(()=>{e.delete(t),r.reject()})}),r.promise()})(n,e,t,i).done(X=>r.resolve(V(X))).fail(()=>r.reject()),r.promise()})(t,m,_e,rt)}return(new g.cY).resolve().promise()},r7=function(){const e={getter:{},setter:{}};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(t=>{const i=Nw(t);e.getter[i]=(0,fa.Hz)(i),e.setter[i]=(0,fa.vL)(i)}),e},s7=(n,e,t)=>{const i=new g.cY,r=[];let V=[];return xU(e||[],n||[]).forEach(X=>{const ce=new g.cY,_e=Nw(X);r.push(ce);const Me=yU(X.dataSource).load();t.set(_e,Me),Me.done(Ve=>{const Je=((n,e)=>{const t=(0,fa.Hz)(gV(n)),i=(0,fa.Hz)(jW(n));return e.map(r=>{const m={id:t(r),text:i(r)};return r.color&&(m.color=r.color),m})})(X,Ve);ce.resolve({name:_e,items:Je,data:Ve})}).fail(()=>ce.reject())}),r.length?(g.z7.apply(null,r).done(function(){for(var X=arguments.length,ce=new Array(X),_e=0;_e<X;_e++)ce[_e]=arguments[_e];V=ce.some(Ve=>0===Ve.items.length)?[]:ce,i.resolve(V)}).fail(()=>i.reject()),i.promise()):i.resolve(V)},a7=(n,e,t)=>{const i={};return(0,w.__)(e.resources.getter,r=>{const m=e.resources.getter[r](n);if((0,C.O9)(m)){const V=i7(t,r)?(0,By.BO)(m):m;i[r]=V}}),i},l7=Tn.A.dateToMilliseconds,c7="dx-scheduler-appointment-popup",$ne=l7("day"),jne={height:"auto",maxHeight:"100%",showCloseButton:!1,showTitle:!1,preventScrollEvents:!1,enableBodyScroll:!1,defaultOptionsRules:[{device:()=>d.A.current().android,options:{showTitle:!1}}],_ignorePreventScrollEventsDeprecation:!0};class Kne{constructor(e,t){this.scheduler=e,this.form=t,this.popup=null,this.state={action:null,lastEditData:null,saveChangesLocker:!1,appointment:{data:null}}}get visible(){return!!this.popup&&this.popup.option("visible")}show(e,t){if(this.state.appointment.data=e,this.state.action=t.action,this.state.excludeInfo=t.excludeInfo,!this.popup){const i=this._createPopupConfig();this.popup=this._createPopup(i)}this.popup.option("toolbarItems",((n,e)=>{const t=[],i={doneButton:{shortcut:"done",options:{text:Wn.A.format("Done")},location:"after"},cancelButton:{shortcut:"cancel",location:"ios"===d.A.current().platform?"before":"after"}};return n&&t.push((0,Lo.A)({},i.doneButton,{onClick:e})),t.push(i.cancelButton),t})(t.isToolbarVisible,i=>this._doneButtonClickHandler(i))),this.popup.show()}hide(){this.popup.hide()}dispose(){var e;null===(e=this.popup)||void 0===e||e.$element().remove()}_createPopup(e){const t=(0,a.A)("<div>").addClass(c7).appendTo(this.scheduler.getElement());return this.scheduler.createComponent(t,bg.A,e)}_createPopupConfig(){return(0,Lo.A)({},jne,{onHiding:()=>this.scheduler.focus(),contentTemplate:()=>this._createPopupContent(),onShowing:e=>this._onShowing(e),wrapperAttr:{class:c7}})}_onShowing(e){this._updateForm();const t={form:this.form.dxForm,popup:this.popup,appointmentData:this.state.appointment.data,cancel:!1};this.scheduler.getAppointmentFormOpening()(t),this.scheduler.processActionResult(t,i=>{i?e.cancel=!0:this.updatePopupFullScreenMode()})}_createPopupContent(){return this._createForm(),this.form.dxForm.$element()}_createFormData(e){const t=this._createAppointmentAdapter(e),i=this.scheduler.getDataAccessors(),r=this.scheduler.getResources(),m=a7(e,i,r);return(0,Lo.A)({},e,m,{repeat:!!t.recurrenceRule})}_createForm(){const t=this._createFormData(this.state.appointment.data);this.form.create(this.triggerResize.bind(this),this.changeSize.bind(this),t)}_isReadOnly(e){const t=this._createAppointmentAdapter(e);return!(!e||!t.disabled)||0!==this.state.action&&!this.scheduler.getEditingConfig().allowUpdating}_createAppointmentAdapter(e){return hc(e,this.scheduler.getDataAccessors(),this.scheduler.getTimeZoneCalculator())}_updateForm(){const{data:e}=this.state.appointment,t=this._createAppointmentAdapter(this._createFormData(e));t.startDate&&(t.startDate=t.calculateStartDate("toAppointment")),t.endDate&&(t.endDate=t.calculateEndDate("toAppointment"));const i=t.clone().source();this.form.readOnly=this._isReadOnly(i),this.form.updateFormData(i)}triggerResize(){this.popup&&(0,Du.ho)(this.popup.$element())}changeSize(e){if(this.popup){const t=(()=>{const n=(0,gr.zk)(),e=n&&(0,D.RG)(n);return!!e&&(Y5()?e<pV_MOBILE_FULLSCREEN:e<1e3)})(),i=t?"100%":(n=>Y5()?pV_MOBILE_DEFAULT:n?970:485)(e);this.popup.option("fullScreen",t),this.popup.option("maxWidth",i)}}updatePopupFullScreenMode(){if(this.form.dxForm&&this.visible){const{formData:e}=this.form,t=this.scheduler.getDataAccessors(),i=ll_getField(t,"recurrenceRule",e);this.changeSize(i)}}saveChangesAsync(e){const t=new g.cY,i=this.form.dxForm.validate();return e&&this._showLoadPanel(),(0,g.z7)(i&&i.complete||i).done(r=>{if(r&&!r.isValid)return CU(),void t.resolve(!1);const{repeat:m}=this.form.formData,A=this._createAppointmentAdapter(this.form.formData),V=A.clone({pathTimeZone:"fromAppointment"}),X=!m&&!!V.recurrenceRule;this._addMissingDSTTime(A,V),X&&(V.recurrenceRule="");const ce=V.source();switch(delete ce.repeat,this.state.action){case 0:this.scheduler.addAppointment(ce).done(t.resolve);break;case 1:this.scheduler.updateAppointment(this.state.appointment.data,ce).done(t.resolve);break;case 2:this.scheduler.updateAppointment(this.state.excludeInfo.sourceAppointment,this.state.excludeInfo.updatedAppointment),this.scheduler.addAppointment(ce).done(t.resolve)}t.done(()=>{CU(),this.state.lastEditData=ce})}),t.promise()}_doneButtonClickHandler(e){e.cancel=!0,this.saveEditDataAsync()}saveEditDataAsync(){const e=new g.cY;return this._tryLockSaveChanges()&&(0,g.z7)(this.saveChangesAsync(!0)).done(()=>{if(this.state.lastEditData){const t=this._createAppointmentAdapter(this.state.lastEditData),{startDate:i,endDate:r,allDay:m}=t,A=i.getTime(),V=r.getTime(),X=m||V-A>=$ne,ce=this.scheduler.getDataAccessors(),_e=this.scheduler.getResources(),Me=a7(this.state.lastEditData,ce,_e);this.scheduler.updateScrollPosition(i,Me,X),this.state.lastEditData=null}this._unlockSaveChanges(),e.resolve()}),e.promise()}_showLoadPanel(){const e=this.popup.$overlayContent();e7({container:e,position:{of:e}})}_tryLockSaveChanges(){return!1===this.state.saveChangesLocker&&(this.state.saveChangesLocker=!0,!0)}_unlockSaveChanges(){this.state.saveChangesLocker=!1}_addMissingDSTTime(e,t){const i=this.scheduler.getTimeZoneCalculator();t.startDate=this._addMissingDSTShiftToDate(i,e.startDate,t.startDate),t.endDate&&(t.endDate=this._addMissingDSTShiftToDate(i,e.endDate,t.endDate))}_addMissingDSTShiftToDate(e,t,i){var r,m;const X=(null===(r=e.getOffsets(t))||void 0===r?void 0:r.common)-(null===(m=e.getOffsets(i))||void 0===m?void 0:m.common);return X?new Date(i.getTime()+X*l7("hour")):i}}class Xne{constructor(e){this.options=e}get dataAccessors(){return this.options.dataAccessors}get dataSourceFilter(){return this.options.dataSourceFilter}get dateSerializationFormat(){return this.options.dateSerializationFormat}get forceIsoDateParsing(){return!(0,C.O9)(this.options.forceIsoDateParsing)||this.options.forceIsoDateParsing}makeDateFilter(e,t){const{startDateExpr:i,endDateExpr:r,recurrenceRuleExpr:m}=this.dataAccessors.expr,A=[[[r,">=",e],[i,"<",t]],"or",[m,"startswith","freq"],"or",[[r,e],[i,e]]];return m||A.splice(1,2),A}combineFilters(e,t){const i=[];return e&&i.push(e),t&&i.push(t),this.serializeRemoteFilter(i)}serializeRemoteFilter(e){if(!Array.isArray(e))return e;const{startDateExpr:t,endDateExpr:i}=this.dataAccessors.expr,r=(0,_.X)([],e);(0,C.Kg)(r[0])&&this.forceIsoDateParsing&&r.length>1&&(r[0]===t||r[0]===i)&&(r[r.length-1]=Yl.A.serializeDate(new Date(r[r.length-1]),this.dateSerializationFormat));for(let m=0;m<r.length;m+=1)r[m]=this.serializeRemoteFilter(r[m]);return r}getUserFilter(e){return!this.dataSourceFilter||(0,h.RL)(this.dataSourceFilter,e)?void 0:this.dataSourceFilter.length>0&&(0,h.RL)(this.dataSourceFilter[0],e)?this.dataSourceFilter[1]:this.dataSourceFilter}combine(e,t){const[i,r]=PW(e,t),m=this.makeDateFilter(i,r),A=this.getUserFilter(m);return this.combineFilters(m,A)}}class Zne{constructor(e){this.setDataSource(e),this._updatedAppointmentKeys=[]}get keyName(){return this._dataSource.store().key()}get isDataSourceInit(){return!!this._dataSource}_getStoreKey(e){return this._dataSource.store().keyOf(e)}setDataSource(e){this._dataSource=e,this.cleanState(),this._initStoreChangeHandlers()}_initStoreChangeHandlers(){const e=this._dataSource,t=e?.store();t&&(t.on("updating",i=>{const r=t.key();r?this._updatedAppointmentKeys.push({key:r,value:i}):this._updatedAppointment=i}),t.on("push",i=>{const r=e.items(),m=t.key();i.forEach(A=>{if(0!==r.filter(X=>X[m]===A.key).length)this._updatedAppointmentKeys.push({key:m,value:A.key});else{const{data:X}=A;X&&r.push(X)}}),e.load()}))}getUpdatedAppointment(){return this._updatedAppointment}getUpdatedAppointmentKeys(){return this._updatedAppointmentKeys}cleanState(){this._updatedAppointment=null,this._updatedAppointmentKeys=[]}add(e){return this._dataSource.store().insert(e).done(()=>this._dataSource.load())}update(e,t){const i=this._getStoreKey(e),r=new g.cY;return this._dataSource.store().update(i,t).done(m=>this._dataSource.load().done(()=>r.resolve(m)).fail(r.reject)).fail(r.reject),r.promise()}remove(e){const t=this._getStoreKey(e);return this._dataSource.store().remove(t).done(()=>this._dataSource.load())}destroy(){var e;const t=null===(e=this._dataSource)||void 0===e?void 0:e.store();t&&(t.off("updating"),t.off("push"))}}const u7=Tn.A.dateToMilliseconds;class p7{constructor(e){this.options=e,this.dataAccessors=this.options.dataAccessors,this._init()}get strategyName(){return"standard"}get timeZoneCalculator(){return this.options.timeZoneCalculator}get viewStartDayHour(){return this.options.startDayHour}get viewEndDayHour(){return this.options.endDayHour}get timezone(){return this.options.timezone}get firstDayOfWeek(){return this.options.firstDayOfWeek}get showAllDayPanel(){return this.options.showAllDayPanel}get loadedResources(){return this._resolveOption("loadedResources")}get supportAllDayRow(){return this._resolveOption("supportAllDayRow")}get viewType(){return this._resolveOption("viewType")}get viewDirection(){return this._resolveOption("viewDirection")}get dateRange(){return this._resolveOption("dateRange")}get groupCount(){return this._resolveOption("groupCount")}get viewDataProvider(){return this._resolveOption("viewDataProvider")}get allDayPanelMode(){return this._resolveOption("allDayPanelMode")}_resolveOption(e){const t=this.options[e];return"function"==typeof t?t():t}_init(){this.setDataAccessors(this.dataAccessors)}filter(e){const[t,i]=this.dateRange,{viewOffset:r}=this.options;return this.filterLoadedAppointments({startDayHour:this.viewStartDayHour,endDayHour:this.viewEndDayHour,viewOffset:r,viewStartDayHour:this.viewStartDayHour,viewEndDayHour:this.viewEndDayHour,min:t,max:i,resources:this.loadedResources,allDay:!(!this.showAllDayPanel&&this.supportAllDayRow)&&void 0,supportMultiDayAppointments:fU(this.viewType),firstDayOfWeek:this.firstDayOfWeek},e)}hasAllDayAppointments(e,t){const i=e.map(m=>hc(m,this.dataAccessors,this.timeZoneCalculator));let r=!1;return(0,w.__)(i,(m,A)=>{if($k(A,this.allDayPanelMode))return r=!0,!1}),r}setDataAccessors(e){this.dataAccessors=e}_createAllDayAppointmentFilter(){return[[e=>$k(e,this.allDayPanelMode)]]}_createCombinedFilter(e){const t=new Date(e.min),i=new Date(e.max),{startDayHour:r,endDayHour:m,viewOffset:A,viewStartDayHour:V,viewEndDayHour:X,resources:ce,firstDayOfWeek:_e,checkIntersectViewport:Me,supportMultiDayAppointments:Ve}=e,[Je,rt]=PW(t,i),Ct=(0,C.O9)(this.dataAccessors.getter.recurrenceRule);return[[Xt=>{if(!(Xt.visible??1))return!1;const{allDay:Fn,hasRecurrenceRule:oi}=Xt,Yt=$s_addOffsets(Xt.startDate,[-A]),$t=$s_addOffsets(Xt.endDate,[-A]),xn=$k(Xt,this.allDayPanelMode);if(!oi&&!($t>=Je&&Yt<rt||Tn.A.sameDate($t,Je)&&Tn.A.sameDate(Yt,Je)))return!1;const Gn=HW(Xt),qn=Gn||xn;if(null!=ce&&ce.length&&!this._filterAppointmentByResources(Xt.rawAppointment,ce)||xn&&!1===e.allDay)return!1;if(oi){const ii=((n,e,t)=>{const{recurrenceException:i}=n;if(i){const r=i.split(",");for(let m=0;m<r.length;m++)r[m]=lne(r[m],n.startDate,e,t);return r.join()}return i})(Xt,this.timeZoneCalculator,this.timezone);if(!this._filterAppointmentByRRule((0,Lo.A)({},Xt,{recurrenceException:ii,allDay:xn}),t,i,r,m,_e))return!1}return!(!Fn&&Ve&&qn&&$t<t&&(!Ct||Ct&&!oi)||!Fn&&(0,C.O9)(r)&&(!Ct||!e.isVirtualScrolling)&&!((n,e,t,i,r)=>{const m=Tn.A.dateTimeFromDecimal(t);return n.getHours()>=m.hours&&n.getMinutes()>=m.minutes||e.getHours()===m.hours&&e.getMinutes()>m.minutes||e.getHours()>m.hours||r||i})(Yt,$t,r,xn,Gn)||!Fn&&(0,C.O9)(m)&&!(n=>{const{startDate:e,endDate:t,startDayHour:i,endDayHour:r,viewStartDayHour:m,viewEndDayHour:A,allDay:V,severalDays:X,min:ce,max:_e,checkIntersectViewport:Me}=n,Ve=(24-A+m)*VW("hour"),Je=t.getTime()-e.getTime(),rt=(Ve-Je)/VW("hour"),Ct=e.getHours(),Xt=e.getMinutes();let On;const Fn=Tn.A.dateTimeFromDecimal(r),oi=Tn.A.dateTimeFromDecimal(i),Yt=e<_e&&t>ce;return On=Me&&Yt||Ct<Fn.hours||Ct===Fn.hours&&Xt<Fn.minutes||V&&e<=_e||X&&Yt&&(Ct<Fn.hours||60*t.getHours()+t.getMinutes()>60*oi.hours),Je<Ve&&Ct>Fn.hours&&Xt>Fn.minutes&&rt<=Ct-r&&(On=!1),On})({startDate:Yt,endDate:$t,startDayHour:r,endDayHour:m,viewOffset:A,viewStartDayHour:V,viewEndDayHour:X,allDay:xn,severalDays:Gn,min:t,max:i,checkIntersectViewport:Me})||!Fn&&(!qn||Ve)&&$t<t&&Ct&&!oi)}]]}_createAppointmentFilter(e){return this._createCombinedFilter(e)}_filterAppointmentByResources(e,t){const i=(m,A)=>{const V=this.dataAccessors.resources.getter[m];let X;(0,C.Tn)(V)&&(X=V(e));const ce=(0,By.BO)(X),_e=(0,w.Tj)(t[A].items,Me=>{let{id:Ve}=Me;return Ve});for(let Me=0;Me<ce.length;Me++)if(O5(_e,ce[Me]))return!0;return!1};let r=!1;for(let m=0;m<t.length;m++)if(r=i(t[m].name,m),!r)return!1;return r}_filterAppointmentByRRule(e,t,i,r,m,A){const{recurrenceRule:V}=e,{recurrenceException:X}=e,{allDay:ce}=e;let _e=!0;const Me=e.startDate,Ve=e.endDate,Je=Fy();if(ce||((n,e,t,i)=>{const r=n.getHours(),m=e.getHours();return r<=t&&m<=i&&m>=t||m>=i&&r<=i&&r>=t})(Me,Ve,r,m)){const[rt,Ct]=PW(t,i);t=rt,i=new Date(Ct.getTime()-u7("minute"))}if(V&&!Je.isValidRecurrenceRule(V)&&(_e=Ve>t&&Me<=i),_e&&Je.isValidRecurrenceRule(V)){const{viewOffset:rt}=this.options;_e=Je.hasRecurrence({rule:V,exception:X,start:Me,end:Ve,min:$s_addOffsets(t,[rt]),max:$s_addOffsets(i,[rt]),firstDayOfWeek:A,appointmentTimezoneOffset:this.timeZoneCalculator.getOriginStartDateOffsetInMs(Me,e.startDateTimeZone,!1)})}return _e}filterLoadedAppointments(e,t){return this.filterPreparedItems(e,t).map(r=>{let{rawAppointment:m}=r;return m})}filterPreparedItems(e,t){const i=this._createAppointmentFilter(e);return(0,Aw.A)(t).filter(i).toArray()}filterAllDayAppointments(e){const t=this._createAllDayAppointmentFilter();return(0,Aw.A)(e).filter(t).toArray().map(i=>{let{rawAppointment:r}=i;return r})}}class Qne extends p7{get strategyName(){return"virtual"}get resources(){return this.options.resources}filter(e){const{viewOffset:t}=this.options,i=u7("hour"),r=sP(this.viewType),m=r&&"horizontal"===this.viewDirection,A=!this.supportAllDayRow,V=this.showAllDayPanel||A,X=this.viewDataProvider.getLastViewDateByEndDayHour(this.viewEndDayHour),ce=$s_addOffsets(X,[t]),_e=[];return this.viewDataProvider.getCompletedGroupsInfo().forEach(Ve=>{const{groupIndex:Je}=Ve,rt=Ve.startDate,Ct=new Date(Math.min(Ve.endDate.getTime(),ce.getTime())),Xt=r?rt.getHours():this.viewStartDayHour,On=r?Xt+rt.getMinutes()/60+(Ct.getTime()-rt.getTime())/i:this.viewEndDayHour,Fn=this._getPrerenderFilterResources(Je),oi=this.viewDataProvider.hasGroupAllDayPanel(Je),Yt=A||!!V&&oi;_e.push({isVirtualScrolling:!0,startDayHour:Xt,endDayHour:On,viewOffset:t,viewStartDayHour:this.viewStartDayHour,viewEndDayHour:this.viewEndDayHour,min:$s_addOffsets(rt,[-t]),max:$s_addOffsets(Ct,[-t]),supportMultiDayAppointments:fU(this.viewType),allDay:Yt,resources:Fn,firstDayOfWeek:this.firstDayOfWeek,checkIntersectViewport:m})}),this.filterLoadedAppointments({filterOptions:_e,groupCount:this.groupCount},e)}filterPreparedItems(e,t){let{filterOptions:i,groupCount:r}=e;const m=[];let A=t;return r>0&&(A=A.filter(X=>{let{rawAppointment:ce}=X;for(let _e=0;_e<i.length;++_e){const{resources:Me}=i[_e];if(this._filterAppointmentByResources(ce,Me))return!0}})),i.forEach(X=>{m.length&&m.push("or");const ce=this._createAppointmentFilter(X);m.push(ce)}),(0,Aw.A)(A).filter(m).toArray()}hasAllDayAppointments(e,t){return this.filterAllDayAppointments(t).length>0}_getPrerenderFilterResources(e){const t=this.viewDataProvider.getCellsGroup(e);return((n,e,t)=>{if(!t||!t.length)return n;const i={},r=[];return t.forEach(A=>{(0,w.__)(A,(V,X)=>{i[V]=X})}),n.filter(A=>{let{name:V}=A;return(0,C.O9)(i[V])}).forEach(A=>r.push((0,_.X)({},A))),r.forEach(A=>{const{items:V,data:X,name:ce}=A,_e=xU(e,[ce])[0]||{},Me=gV(_e),Ve=[],Je=[];t.filter(rt=>(0,C.O9)(rt[ce])).forEach(rt=>{(0,w.__)(rt,(Ct,Xt)=>{if(!Ve.filter(On=>On.id===Xt&&On[Me]===Ct).length){const On=V.filter(oi=>oi.id===Xt),Fn=X.filter(oi=>oi[Me]===Xt);Ve.push(...On),Je.push(...Fn)}})}),A.items=Ve,A.data=Je}),r})(this.loadedResources,this.resources,[t])}}class Jne{constructor(e){this.options=e,this.dataSource=this.options.dataSource,this.dataAccessors=this.options.dataAccessors,this.timeZoneCalculator=this.options.timeZoneCalculator,this.appointmentDataSource=new Zne(this.dataSource),this.initFilterStrategy()}get keyName(){return this.appointmentDataSource.keyName}get isDataSourceInit(){return!!this.dataSource}get filterStrategyName(){return this.options.getIsVirtualScrolling()?"virtual":"standard"}getFilterStrategy(){return(!this.filterStrategy||this.filterStrategy.strategyName!==this.filterStrategyName)&&this.initFilterStrategy(),this.filterStrategy}initFilterStrategy(){const e={resources:this.options.resources,dataAccessors:this.dataAccessors,startDayHour:this.options.startDayHour,endDayHour:this.options.endDayHour,viewOffset:this.options.viewOffset,showAllDayPanel:this.options.showAllDayPanel,timeZoneCalculator:this.options.timeZoneCalculator,loadedResources:this.options.getLoadedResources,supportAllDayRow:this.options.getSupportAllDayRow,viewType:this.options.getViewType,viewDirection:this.options.getViewDirection,dateRange:this.options.getDateRange,groupCount:this.options.getGroupCount,viewDataProvider:this.options.getViewDataProvider,allDayPanelMode:this.options.allDayPanelMode};this.filterStrategy="virtual"===this.filterStrategyName?new Qne(e):new p7(e)}setDataSource(e){this.dataSource=e,this.initFilterStrategy(),this.appointmentDataSource.setDataSource(this.dataSource)}updateDataAccessors(e){this.dataAccessors=e,this.initFilterStrategy()}filter(e){return this.getFilterStrategy().filter(e)}filterByDate(e,t,i,r){if(!this.dataSource||!i)return;const A=(n=>new Xne(n).combine(n.min,n.max))({dataSourceFilter:this.dataSource.filter(),dataAccessors:this.dataAccessors,min:e,max:t,dateSerializationFormat:r,forceIsoDateParsing:(0,oW.A)().forceIsoDateParsing});this.dataSource.filter(A)}hasAllDayAppointments(e,t){return this.getFilterStrategy().hasAllDayAppointments(e,t)}filterLoadedAppointments(e,t){return this.getFilterStrategy().filterLoadedAppointments(e,t)}calculateAppointmentEndDate(e,t){return this.getFilterStrategy().calculateAppointmentEndDate(e,t)}cleanState(){this.appointmentDataSource.cleanState()}getUpdatedAppointment(){return this.appointmentDataSource._updatedAppointment}getUpdatedAppointmentKeys(){return this.appointmentDataSource._updatedAppointmentKeys}add(e){return this.appointmentDataSource.add(e)}update(e,t){return this.appointmentDataSource.update(e,t)}remove(e){return this.appointmentDataSource.remove(e)}destroy(){this.appointmentDataSource.destroy()}}var Fw=M(4504),g7=M(5397);let Xk=null,f7=null;const m7=function(){Xk&&(f7(),Xk=null)};const _7=(0,N.b4)(Si.A.enter,"dxSchedulerAppointment"),v7=(0,N.b4)(Si.A.leave,"dxSchedulerAppointment");class YW extends kv.A{get coloredElement(){return this.$element()}get rawAppointment(){return this.option("data")}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{data:{},groupIndex:-1,groups:[],geometry:{top:0,left:0,width:0,height:0},allowDrag:!0,allowResize:!0,reduced:null,isCompact:!1,direction:"vertical",resizableConfig:{keepAspectRatio:!1},cellHeight:0,cellWidth:0,isDragSource:!1})}notifyObserver(e,t){const i=this.option("observer");i&&i.fire(e,t)}invoke(e){const t=this.option("observer");if(t)return t.fire.apply(t,arguments)}_optionChanged(e){switch(e.name){case"data":case"groupIndex":case"geometry":case"allowDrag":case"allowResize":case"reduced":case"sortedIndex":case"isCompact":case"direction":case"resizableConfig":case"cellHeight":case"cellWidth":this._invalidate();break;case"isDragSource":this._renderDragSourceClass();break;default:super._optionChanged(e)}}_getHorizontalResizingRule(){const e={head:this.option("rtlEnabled")?"right":"left",body:"",tail:this.option("rtlEnabled")?"left":"right"},t=this.option("getResizableStep"),i=t?t():0;return{handles:this.option("reduced")?e[this.option("reduced")]:"left right",minHeight:0,minWidth:this.invoke("getCellWidth"),step:i,roundStepValue:!1}}_getVerticalResizingRule(){const e=Math.round(this.invoke("getCellHeight"));return{handles:"top bottom",minWidth:0,minHeight:e,step:e,roundStepValue:!0}}_render(){super._render(),this._renderAppointmentGeometry(),this._renderEmptyClass(),this._renderReducedAppointment(),this._renderAllDayClass(),this._renderDragSourceClass(),this._renderDirection(),this.$element().data("dxAppointmentStartDate",this.option("startDate"));const e=ll_getField(this.option("dataAccessors"),"text",this.rawAppointment);this.$element().attr("title",e),this.$element().attr("role","button"),this._renderRecurrenceClass(),this._renderResizable(),this._setResourceColor()}_setResourceColor(){const e={itemData:this.rawAppointment,groupIndex:this.option("groupIndex"),groups:this.option("groups")};this.option("getAppointmentColor")(e).done(i=>{i&&(this.coloredElement.css("backgroundColor",i),this.coloredElement.addClass("dx-scheduler-appointment-has-resource-color"))})}_renderAppointmentGeometry(){const e=this.option("geometry"),t=this.$element();(0,Fw.Cy)(t,{top:e.top,left:e.left}),t.css({width:e.width<0?0:e.width,height:e.height<0?0:e.height})}_renderEmptyClass(){(this.option("geometry").empty||this.option("isCompact"))&&this.$element().addClass("dx-scheduler-appointment-empty")}_renderReducedAppointment(){const e=this.option("reduced");e&&(this.$element().toggleClass("dx-scheduler-appointment-reduced",!0).toggleClass(_te[e],!0),this._renderAppointmentReducedIcon())}_renderAppointmentReducedIcon(){const e=(0,a.A)("<div>").addClass("dx-scheduler-appointment-reduced-icon").appendTo(this.$element()),t=this._getEndDate(),r=[Wn.A.format("dxScheduler-editorLabelEndDate"),": ",sa.A.format(t,"monthAndDay"),", ",sa.A.format(t,"year")].join("");L.A.off(e,_7),L.A.on(e,_7,()=>{!function eie(n){return m7(),function(n){n=(0,_.X)({position:"top"},n);const{content:e}=n;delete n.content;const t=(0,a.A)("<div>").html(e).appendTo((0,J5.Uq)());f7=function(){t.remove()},Xk=new B1.A(t,n)}(n),Xk.show()}({target:e,content:r})}),L.A.off(e,v7),L.A.on(e,v7,()=>{!function tie(){Xk?Xk.hide().done(m7).promise():(0,g.cY)().resolve()}()})}_getEndDate(){const e=ll_getField(this.option("dataAccessors"),"endDate",this.rawAppointment);return e&&new Date(e)}_renderAllDayClass(){this.$element().toggleClass("dx-scheduler-all-day-appointment",!!this.option("allDay"))}_renderDragSourceClass(){this.$element().toggleClass(b5,!!this.option("isDragSource"))}_renderRecurrenceClass(){const e=ll_getField(this.option("dataAccessors"),"recurrenceRule",this.rawAppointment);Fy().isValidRecurrenceRule(e)&&this.$element().addClass("dx-scheduler-appointment-recurrence")}_renderDirection(){this.$element().addClass(vte[this.option("direction")])}_createResizingConfig(){const e="vertical"===this.option("direction")?this._getVerticalResizingRule():this._getHorizontalResizingRule();return this.invoke("isGroupedByDate")||(e.stepPrecision="strict"),e}_renderResizable(){this.option("allowResize")&&this._createComponent(this.$element(),Yee.A,(0,_.X)(this._createResizingConfig(),this.option("resizableConfig")))}_useTemplates(){return!1}}(0,y.A)("dxSchedulerAppointment",YW);class nie extends YW{get coloredElement(){return this.$element().find(".dx-scheduler-agenda-appointment-marker")}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{createPlainResourceListAsync:new g.cY})}_renderResourceList(e,t){t.forEach(i=>{const r=(0,a.A)("<div>").addClass("dx-scheduler-appointment-resource-item").appendTo(e);(0,a.A)("<div>").text(`${i.label}:`).appendTo(r),(0,a.A)("<div>").addClass("dx-scheduler-appointment-resource-item-value").text(i.values.join(", ")).appendTo(r)})}_render(){super._render(),this.option("createPlainResourceListAsync")(this.rawAppointment).done(t=>{const i=this.$element().find(".dx-scheduler-appointment-content-details"),r=(0,a.A)("<div>").addClass("dx-scheduler-appointment-resource-list").appendTo(i);this._renderResourceList(r,t)})}}const C7=` ${Wn.A.format("dxScheduler-allDay")}: `,y7=n=>{const{cellHeight:e,cellWidth:t,viewDataProvider:i,relativeAppointmentRect:r,appointmentSettings:m,rtlEnabled:A}=n,V=Math.floor(r.top/e),X=Math.round(r.left/t);return i.getCellData(V,X,m.allDay,A)},b7=(0,N.b4)(HI.U,"dxSchedulerAppointment"),x7=Tn.A.dateToMilliseconds;class S7 extends WI.A{get isAgendaView(){return this.invoke("isCurrentViewAgenda")}get isVirtualScrolling(){return this.invoke("isVirtualScrolling")}get appointmentDataProvider(){return this.option("getAppointmentDataProvider")()}constructor(e,t){super(e,t),this._virtualAppointments={}}option(e,t){return super.option(...arguments)}notifyObserver(e,t){const i=this.option("observer");i&&i.fire(e,t)}invoke(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];const m=this.option("observer");if(m)return m.fire.apply(m,arguments)}_dispose(){clearTimeout(this._appointmentClickTimeout),super._dispose()}_supportedKeys(){const e=super._supportedKeys(),t=this._$currentAppointment;return(0,_.X)(e,{escape:function(){var i,r,m;this.resizeOccur&&(this.moveAppointmentBack(),this.resizeOccur=!1,null===(i=t.dxResizable("instance"))||void 0===i||i._detachEventHandlers(),null===(r=t.dxResizable("instance"))||void 0===r||r._attachEventHandlers(),null===(m=t.dxResizable("instance"))||void 0===m||m._toggleResizingClass(!1))}.bind(this),del:function(i){if(this.option("allowDelete")){i.preventDefault();const r=this._getItemData(i.target);this.notifyObserver("onDeleteButtonPress",{data:r,target:i.target})}}.bind(this),tab:function(i){const r=this._getAccessAppointments();let A=r.filter(".dx-state-focused").data(VS).sortedIndex;if(A>0&&i.shiftKey||A<r.length-1&&!i.shiftKey){i.preventDefault(),i.shiftKey?A--:A++;const X=this._getAppointmentByIndex(A);this._resetTabIndex(X),L.A.trigger(X,"focus")}}})}_getAppointmentByIndex(e){return this._getAccessAppointments().filter((i,r)=>(0,g7.p)(r,VS).sortedIndex===e).eq(0)}_getAccessAppointments(){return this._itemElements().filter(":visible").not(".dx-state-disabled")}_resetTabIndex(e){this._focusTarget().attr("tabIndex",-1),e.attr("tabIndex",this.option("tabIndex"))}_moveFocus(){}_focusTarget(){return this._itemElements()}_renderFocusTarget(){const e=this._getAppointmentByIndex(0);this._resetTabIndex(e)}_focusInHandler(e){super._focusInHandler(e),this._$currentAppointment=(0,a.A)(e.target),this.option("focusedElement",(0,s.cc)((0,a.A)(e.target)))}_focusOutHandler(e){const t=this._getAppointmentByIndex(0);this.option("focusedElement",(0,s.cc)(t)),super._focusOutHandler(e)}_eventBindingTarget(){return this._itemContainer()}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{noDataText:null,activeStateEnabled:!0,hoverStateEnabled:!0,tabIndex:0,fixedContainer:null,allDayContainer:null,allowDrag:!0,allowResize:!0,allowAllDayResize:!0,onAppointmentDblClick:null,_collectorOffset:0,groups:[],resources:[]})}_optionChanged(e){switch(e.name){case"items":this._cleanFocusState(),this._clearDropDownItems(),this._clearDropDownItemsElements(),this._repaintAppointments(e.value),this._renderDropDownAppointments(),this._attachAppointmentsEvents();break;case"fixedContainer":case"allDayContainer":case"onAppointmentDblClick":case"allowDelete":break;case"allowDrag":case"allowResize":case"allowAllDayResize":this._invalidate();break;case"focusedElement":this._resetTabIndex((0,a.A)(e.value)),super._optionChanged(e);break;case"focusStateEnabled":this._clearDropDownItemsElements(),this._renderDropDownAppointments(),super._optionChanged(e);break;default:super._optionChanged(e)}}_isAllDayAppointment(e){return e.settings.length&&e.settings[0].allDay||!1}_isRepaintAppointment(e){return!(0,C.O9)(e.needRepaint)||!0===e.needRepaint}_isRepaintAll(e){if(this.isAgendaView)return!0;for(let t=0;t<e.length;t++)if(!this._isRepaintAppointment(e[t]))return!1;return!0}_applyFragment(e,t){e.children().length>0&&this._getAppointmentContainer(t).append(e)}_onEachAppointment(e,t,i,r){!0===e?.needRemove?this._clearItem(e):(r||this._isRepaintAppointment(e))&&(()=>{e.needRepaint=!1,this._clearItem(e),this._renderItem(t,e,i)})()}_repaintAppointments(e){this._renderByFragments((t,i)=>{const r=this._isRepaintAll(e);r&&(this._getAppointmentContainer(!0).html(""),this._getAppointmentContainer(!1).html("")),!e.length&&this._cleanItemContainer(),e.forEach((m,A)=>{const V=this._isAllDayAppointment(m)?i:t;this._onEachAppointment(m,A,V,r)})})}_renderByFragments(e){if(this.isVirtualScrolling){const t=(0,a.A)(c.A.createDocumentFragment()),i=(0,a.A)(c.A.createDocumentFragment());e(t,i),this._applyFragment(t,!1),this._applyFragment(i,!0)}else e(this._getAppointmentContainer(!1),this._getAppointmentContainer(!0))}_attachAppointmentsEvents(){this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent(),this._attachAppointmentDblClick(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents()}_clearItem(e){const t=this._findItemElementByItem(e.itemData);t.length&&(0,w.__)(t,(i,r)=>{r.detach(),r.remove()})}_clearDropDownItems(){this._virtualAppointments={}}_clearDropDownItemsElements(){this.invoke("clearCompactAppointments")}_findItemElementByItem(e){const t=[],i=this;return this.itemElements().each(function(){const r=(0,a.A)(this);r.data(i._itemDataKey())===e&&t.push(r)}),t}_itemClass(){return"dx-scheduler-appointment"}_itemContainer(){const e=super._itemContainer();let t=e;const i=this.option("allDayContainer");return i&&(t=e.add(i)),t}_cleanItemContainer(){super._cleanItemContainer();const e=this.option("allDayContainer");e&&e.empty(),this._virtualAppointments={}}_clean(){super._clean(),delete this._$currentAppointment,delete this._initialSize,delete this._initialCoordinates}_init(){super._init(),this.$element().addClass("dx-scheduler-scrollable-appointments"),this._preventSingleAppointmentClick=!1}_renderAppointmentTemplate(e,t,i){var r;const m={isAllDay:t.allDay,isRecurrence:t.recurrenceRule,html:(0,C.Qd)(t)&&t.html?t.html:void 0},A=this.invoke("getTextAndFormatDate",i.appointmentData,(null===(r=this._currentAppointmentSettings)||void 0===r?void 0:r.agendaSettings)||i.targetedAppointmentData,"TIME");e.append(this.isAgendaView?((n,e)=>{const t=(0,a.A)(c.A.createDocumentFragment()),i=(0,a.A)("<div>").addClass("dx-scheduler-agenda-appointment-left-layout").appendTo(t),r=(0,a.A)("<div>").addClass("dx-scheduler-agenda-appointment-right-layout").appendTo(t),m=(0,a.A)("<div>").addClass("dx-scheduler-agenda-appointment-marker").appendTo(i);e.isRecurrence&&(0,a.A)("<span>").addClass("dx-scheduler-appointment-recurrence-icon dx-icon-repeat").appendTo(m),(0,a.A)("<div>").addClass("dx-scheduler-appointment-title").text(n.text).appendTo(r);const A=(0,a.A)("<div>").addClass("dx-scheduler-appointment-content-details").appendTo(r);return(0,a.A)("<div>").addClass("dx-scheduler-appointment-content-date").text(n.formatDate).appendTo(A),e.isAllDay&&(0,a.A)("<div>").text(C7).addClass("dx-scheduler-appointment-content-allday").prependTo(A),t})(A,m):((n,e)=>{const t=(0,a.A)(c.A.createDocumentFragment());(0,a.A)("<div>").text(n.text).addClass("dx-scheduler-appointment-title").appendTo(t),e.html&&t.html(e.html);const i=(0,a.A)("<div>").addClass("dx-scheduler-appointment-content-details").appendTo(t);return(0,a.A)("<div>").addClass("dx-scheduler-appointment-content-date").text(n.formatDate).appendTo(i),e.isRecurrence&&(0,a.A)("<span>").addClass("dx-scheduler-appointment-recurrence-icon dx-icon-repeat").appendTo(t),e.isAllDay&&(0,a.A)("<div>").text(C7).addClass("dx-scheduler-appointment-content-allday").prependTo(i),t})(A,m)),this.isAgendaView||e.parent().prepend((0,a.A)("<div>").addClass("dx-scheduler-appointment-strip"))}_executeItemRenderAction(e,t,i){const r=this._getItemRenderAction();r&&r(this.invoke("mapAppointmentFields",{itemData:t,itemElement:i})),delete this._currentAppointmentSettings}_itemClickHandler(e){super._itemClickHandler(e,{},{afterExecute:function(t){this._processItemClick(t.args[0].event)}.bind(this)})}_processItemClick(e){const t=(0,a.A)(e.currentTarget),i=this._getItemData(t);"keydown"===e.type||(0,N._0)(e)?this.notifyObserver("showEditAppointmentPopup",{data:i,target:t}):this._appointmentClickTimeout=setTimeout(()=>{!this._preventSingleAppointmentClick&&(0,_v.A1)(t)&&this.notifyObserver("showAppointmentTooltip",{data:i,target:t}),this._preventSingleAppointmentClick=!1},300)}_extendActionArgs(e){const t=super._extendActionArgs(e);return this.invoke("mapAppointmentFields",t)}_render(){super._render(),this._attachAppointmentDblClick()}_attachAppointmentDblClick(){const e=this,t=e._itemSelector(),i=this._itemContainer();L.A.off(i,b7,t),L.A.on(i,b7,t,r=>{e._itemDXEventHandler(r,"onAppointmentDblClick",{},{afterExecute(m){e._dblClickHandler(m.args[0].event)}})})}_dblClickHandler(e){const t=(0,a.A)(e.currentTarget),i=this._getItemData(t);clearTimeout(this._appointmentClickTimeout),this._preventSingleAppointmentClick=!0,this.notifyObserver("showEditAppointmentPopup",{data:i,target:t})}_renderItem(e,t,i){const{itemData:r}=t,m=[];for(let A=0;A<t.settings.length;A++){const V=t.settings[A];this._currentAppointmentSettings=V;const X=super._renderItem(e,r,i);X.data(VS,V),m.push(X)}return m}_getItemContent(e){return e.data(VS,this._currentAppointmentSettings),super._getItemContent(e)}_createItemByTemplate(e,t){const{itemData:i,container:r,index:m}=t;return e.render({model:{appointmentData:i,targetedAppointmentData:this.invoke("getTargetedAppointmentData",i,(0,a.A)(r).parent())},container:r,index:m})}_getAppointmentContainer(e){const t=this.option("allDayContainer");let i=this.itemsContainer().not(t);return e&&t&&(i=t),i}_postprocessRenderItem(e){this._renderAppointment(e.itemElement,this._currentAppointmentSettings)}_renderAppointment(e,t){e.data(VS,t),this._applyResourceDataAttr(e);const i=this._getItemData(e),r=this.invoke("getAppointmentGeometry",t),m=this.option("allowResize")&&(!(0,C.O9)(t.skipResizing)||(0,C.Kg)(t.skipResizing)),A=this.option("allowDrag"),{allDay:V}=t;if(this.invoke("setCellDataCacheAlias",this._currentAppointmentSettings,r),t.virtual){const ce={itemData:i,groupIndex:t.groupIndex,groups:this.option("groups")},_e=this.option("getAppointmentColor")(ce);this._processVirtualAppointment(t,e,i,_e)}else{var X;const ce={data:i,groupIndex:t.groupIndex,observer:this.option("observer"),geometry:r,direction:t.direction||"vertical",allowResize:m,allowDrag:A,allDay:V,reduced:t.appointmentReduced,isCompact:t.isCompact,startDate:new Date(null===(X=t.info)||void 0===X?void 0:X.appointment.startDate),cellWidth:this.invoke("getCellWidth"),cellHeight:this.invoke("getCellHeight"),resizableConfig:this._resizableConfig(i,t),groups:this.option("groups"),getAppointmentColor:this.option("getAppointmentColor"),getResourceDataAccessors:this.option("getResourceDataAccessors")};if(this.isAgendaView){const _e=this.option("getAgendaResourceProcessor")();ce.createPlainResourceListAsync=Me=>_e.createListAsync(Me)}this._createComponent(e,this.isAgendaView?nie:YW,(0,Lo.A)({},ce,{dataAccessors:this.option("dataAccessors"),getResizableStep:this.option("getResizableStep")}))}}_applyResourceDataAttr(e){const t=this.option("getResourceDataAccessors")(),i=this._getItemData(e);(0,w.__)(t.getter,r=>{const m=t.getter[r](i);if((0,C.O9)(m)){const A=`data-${(0,h.l5)(r.toLowerCase())}-`;(0,By.BO)(m).forEach(V=>e.attr(A+(0,h.l5)(V),!0))}})}_resizableConfig(e,t){return{area:this._calculateResizableArea(t,e),onResizeStart:function(i){if(this.resizeOccur=!0,this._$currentAppointment=(0,a.A)(i.element),this.invoke("needRecalculateResizableArea")){const r=this._calculateResizableArea(this._$currentAppointment.data(VS),this._$currentAppointment.data("dxItemData"));i.component.option("area",r),i.component._renderDragOffsets(i.event)}this._initialSize={width:i.width,height:i.height},this._initialCoordinates=(0,Fw.x5)(this._$currentAppointment)}.bind(this),onResizeEnd:function(i){this.resizeOccur=!1,this._resizeEndHandler(i)}.bind(this)}}_calculateResizableArea(e,t){const i=this.$element().closest(".dx-scrollable-content");return this.invoke("getResizableAppointmentArea",{coordinates:{left:e.left,top:0,groupIndex:e.groupIndex},allDay:e.allDay})||i}_resizeEndHandler(e){const t=(0,a.A)(e.element),{allDay:i,info:r}=t.data("dxAppointmentSettings"),m=this._getItemData(t),A=this.invoke("getViewOffsetMs");let V;if(i)V=this.resizeAllDay(e);else{const X=this._getEndResizeAppointmentStartDate(e,m,r.appointment),{endDate:ce}=r.appointment,_e=$s_addOffsets(X,[-A]),Me=$s_addOffsets(ce,[-A]);V=this._getDateRange(e,_e,Me),V.startDate=$s_addOffsets(V.startDate,[A]),V.endDate=$s_addOffsets(V.endDate,[A])}this.updateResizedAppointment(t,V,this.option("dataAccessors"),this.option("timeZoneCalculator"))}resizeAllDay(e){const t=(0,a.A)(e.element),i=this.option("timeZoneCalculator"),r=this.option("dataAccessors");return(n=>{const{appointmentSettings:e}=n,t=((n,e)=>{const t=n.left-e.left,i=n.top-e.top,r=t<0?n.width+t:n.width,m=i<0?n.height+i:n.height;return{left:Math.max(0,t),top:Math.max(0,i),width:r,height:m}})(n.appointmentRect,n.parentAppointmentRect),i=(n=>{const{appointmentSettings:e,isVerticalGroupedWorkSpace:t,DOMMetaData:i}=n,r=e.allDay&&!t?[i.allDayPanelCellsMeta]:i.dateTableCellsMeta,{positionByMap:m}=e,{height:A,width:V}=r[m.rowIndex][m.columnIndex];return{cellWidth:V,cellHeight:A,cellCountInRow:r[m.rowIndex].length}})(n),m=(0,Lo.A)({},n,i,{considerTime:!n.isDateAndTimeView||e.allDay,relativeAppointmentRect:t});return n.rtlEnabled?(n=>{const{viewDataProvider:e,cellCountInRow:t,appointmentSettings:i,handles:r,cellWidth:m,relativeAppointmentRect:A}=n,V=y7(n),{sourceAppointment:X}=i.info,{allDay:ce}=i.info.appointment;if(r.right){const Me=V.index,Je=Me-Math.round(A.width/m)+1,rt=Math.floor(Me/t),Ct=e.getCellData(rt,Je,ce,!0);return{startDate:Ct.startDate,endDate:Ct.startDate>X.endDate?Ct.startDate:X.endDate}}const _e=n.considerTime?V.startDate:V.endDate;return{startDate:_e<X.startDate?_e:X.startDate,endDate:_e}})(m):(n=>{const{cellWidth:e,cellCountInRow:t,relativeAppointmentRect:i,viewDataProvider:r,appointmentSettings:m,handles:A}=n,V=y7(n),X=Math.round(i.width/e),ce=V.index+(X-1),{sourceAppointment:_e}=m.info,{allDay:Me}=m.info.appointment;if(A.left)return{startDate:V.startDate,endDate:V.startDate>_e.endDate?V.startDate:_e.endDate};const Ve=Math.floor(ce/t),rt=r.getCellData(Ve,ce%t,Me),Ct=n.considerTime?rt.startDate:rt.endDate;return{startDate:Ct<_e.startDate?Ct:_e.startDate,endDate:Ct}})(m)})({handles:e.handles,appointmentSettings:t.data("dxAppointmentSettings"),isVerticalViewDirection:this.option("isVerticalViewDirection")(),isVerticalGroupedWorkSpace:this.option("isVerticalGroupedWorkSpace")(),appointmentRect:(0,za.N)(t[0]),parentAppointmentRect:(0,za.N)(t.parent()[0]),viewDataProvider:this.option("getViewDataProvider")(),isDateAndTimeView:this.option("isDateAndTimeView")(),startDayHour:this.invoke("getStartDayHour"),endDayHour:this.invoke("getEndDayHour"),timeZoneCalculator:i,dataAccessors:r,rtlEnabled:this.option("rtlEnabled"),DOMMetaData:this.option("getDOMElementsMetaData")(),viewOffset:this.invoke("getViewOffsetMs")})}updateResizedAppointment(e,t,i,r){const m=this._getItemData(e),A=hc(m,i,r).clone();A.startDate=new Date(t.startDate),A.endDate=new Date(t.endDate),this.notifyObserver("updateAppointmentAfterResize",{target:m,data:A.clone({pathTimeZone:"fromGrid"}).source(),$appointment:e})}_getEndResizeAppointmentStartDate(e,t,i){const r=this.option("timeZoneCalculator"),m=hc(t,this.option("dataAccessors"),r);let{startDate:A}=i;const V=Fy(),{recurrenceRule:X,startDateTimeZone:ce}=m,_e=this.invoke("isAllDay",t),Me=V.isValidRecurrenceRule(X);return!e.handles.top&&!Me&&!_e&&(A=r.createDate(m.startDate,{appointmentTimeZone:ce,path:"toGrid"})),A}_getDateRange(e,t,i){const r=this._getItemData(e.element),m=this.invoke("getDeltaTime",e,this._initialSize,r),A=this.invoke("getRenderingStrategyDirection");let V=!1;const X=this.invoke("isAllDay",r),ce=this.invoke("needCorrectAppointmentDates")&&!X;let _e,Me;return V="vertical"!==A||X?this.option("rtlEnabled")?e.handles.right:e.handles.left:e.handles.top,V?(_e=ce?this._correctStartDateByDelta(t,m):t.getTime()-m,_e+=Aa.getTimezoneOffsetChangeInMs(t,i,_e,i),Me=i.getTime()):(_e=t.getTime(),Me=ce?this._correctEndDateByDelta(i,m):i.getTime()+m,Me-=Aa.getTimezoneOffsetChangeInMs(t,i,t,Me)),{startDate:new Date(_e),endDate:new Date(Me)}}_correctEndDateByDelta(e,t){const i=this.invoke("getEndDayHour"),r=this.invoke("getStartDayHour"),m=new Date(e),A=new Date(e),V=new Date(e);A.setHours(r,0,0,0),m.setHours(i,0,0,0),V>m&&V.setHours(i,0,0,0);let X=V.getTime()+t;const ce=(i-r)*x7("hour"),_e=t>0?Math.ceil(t/ce):Math.floor(t/ce);if(X>m.getTime()||X<=A.getTime()){const Ve=t-(m.getTime()-V.getTime()),Je=new Date(V).setDate(V.getDate()+_e),rt=new Date(Je);rt.setHours(r,0,0,0),X=rt.getTime()+Ve-ce*(_e-1)}return X}_correctStartDateByDelta(e,t){const i=this.invoke("getEndDayHour"),r=this.invoke("getStartDayHour"),m=new Date(e),A=new Date(e),V=new Date(e);A.setHours(r,0,0,0),m.setHours(i,0,0,0),V<A&&V.setHours(r,0,0,0);let X=V.getTime()-t;const ce=(i-r)*x7("hour"),_e=t>0?Math.ceil(t/ce):Math.floor(t/ce);if(X<A.getTime()||X>=m.getTime()){const Ve=t-(V.getTime()-A.getTime()),Je=new Date(V.setDate(V.getDate()-_e));Je.setHours(i,0,0,0),X=Je.getTime()-Ve+ce*(_e-1)}return X}_processVirtualAppointment(e,t,i,r){const m=e.virtual,A=m.index;(0,C.O9)(this._virtualAppointments[A])||(this._virtualAppointments[A]={coordinates:{top:m.top,left:m.left},items:{data:[],colors:[],settings:[]},isAllDay:!!m.isAllDay,buttonColor:r}),e.targetedAppointmentData=this.invoke("getTargetedAppointmentData",i,t),this._virtualAppointments[A].items.settings.push(e),this._virtualAppointments[A].items.data.push(i),this._virtualAppointments[A].items.colors.push(r),t.remove()}_renderContentImpl(){super._renderContentImpl(),this._renderDropDownAppointments()}_renderDropDownAppointments(){this._renderByFragments((e,t)=>{(0,w.__)(this._virtualAppointments,i=>{const r=this._virtualAppointments[i],m=r.items,A=r.coordinates,V=r.isAllDay?t:e,{left:X}=A,ce=this.invoke("getDropDownAppointmentWidth",r.isAllDay),_e=this.invoke("getDropDownAppointmentHeight"),Me=this.option("rtlEnabled")?ce:0;this.notifyObserver("renderCompactAppointments",{$container:V,coordinates:{top:A.top,left:X+Me},items:m,buttonColor:r.buttonColor,width:ce-this.option("_collectorOffset"),height:_e,onAppointmentClick:this.option("onItemClick"),allowDrag:this.option("allowDrag"),cellWidth:this.invoke("getCellWidth"),isCompact:this.invoke("isAdaptive")||this._isGroupCompact(r)})})})}_isGroupCompact(e){return!e.isAllDay&&this.invoke("supportCompactDropDownAppointments")}_sortAppointmentsByStartDate(e){return j5(e,this.option("dataAccessors"))}_processRecurrenceAppointment(e,t,i){const r=ll_getField(this.option("dataAccessors"),"recurrenceRule",e),m={parts:[],indexes:[]};if(r){const A=e.settings||e,V=new Date(ll_getField(this.option("dataAccessors"),"startDate",A)),X=ll_getField(this.option("dataAccessors"),"startDateTimeZone",e),ce=new Date(ll_getField(this.option("dataAccessors"),"endDate",A)),_e=ce.getTime()-V.getTime(),Me=ll_getField(this.option("dataAccessors"),"recurrenceException",e),Ve=this.invoke("getStartViewDate"),Je=this.invoke("getEndViewDate"),rt=this.option("timeZoneCalculator"),Ct=Fy().generateDates({rule:r,exception:Me,start:V,end:ce,min:Ve,max:Je,appointmentTimezoneOffset:rt.getOriginStartDateOffsetInMs(V,X,!1)}),Xt=e.settings?1:Ct.length;for(let On=0;On<Xt;On++){const Fn=(0,_.X)({},e,!0);if(Ct[On]){const oi=this._applyStartDateToObj(Ct[On],{});this._applyEndDateToObj(new Date(Ct[On].getTime()+_e),oi),Fn.settings=oi}else Fn.settings=A;m.parts.push(Fn),i||this._processLongAppointment(Fn,m)}m.indexes.push(t)}return m}_processLongAppointment(e,t){const i=this.splitAppointmentByDay(e),r=i.length,m=this.invoke("getEndViewDate").getTime(),A=this.invoke("getStartViewDate").getTime(),V=this.option("timeZoneCalculator");if(t=t||{parts:[]},r>1){(0,_.X)(e,i[0]);for(let X=1;X<r;X++){let ce=ll_getField(this.option("dataAccessors"),"startDate",i[X].settings).getTime();ce=V.createDate(ce,{path:"toGrid"}),ce<m&&ce>A&&t.parts.push(i[X])}}return t}_reduceRecurrenceAppointments(e,t){(0,w.__)(e,(i,r)=>{t.splice(r-i,1)})}_combineAppointments(e,t){t.length&&e.push(...t),this._sortAppointmentsByStartDate(e)}_applyStartDateToObj(e,t){return ll_setField(this.option("dataAccessors"),"startDate",t,e),t}_applyEndDateToObj(e,t){return ll_setField(this.option("dataAccessors"),"endDate",t,e),t}moveAppointmentBack(e){const t=this._$currentAppointment,i=this._initialSize,r=this._initialCoordinates;e&&(this._removeDragSourceClassFromDraggedAppointment(),(0,C.uF)(e.cancel)?e.cancel.resolve(!0):e.cancel=!0),t&&!e&&(r&&((0,Fw.Cy)(t,r),delete this._initialSize),i&&((0,D.iT)(t,i.width),(0,D.NG)(t,i.height),delete this._initialCoordinates))}focus(){if(this._$currentAppointment){const e=(0,s.cc)(this._$currentAppointment);this.option("focusedElement",e),L.A.trigger(e,"focus")}}splitAppointmentByDay(e){const t=e.settings||e,i=this.option("dataAccessors"),r=new Date(ll_getField(i,"startDate",t));let m=Tn.A.makeDate(r),A=Tn.A.makeDate(ll_getField(i,"endDate",t));const V=this.invoke("getEndViewDate"),X=this.invoke("getStartDayHour"),ce=this.invoke("getEndDayHour"),_e=this.option("timeZoneCalculator"),Me=hc(e,i,_e),Ve=HW(Me),Je=[];for(m=_e.createDate(m,{path:"toGrid"}),A=_e.createDate(A,{path:"toGrid"}),m.getHours()<=ce&&m.getHours()>=X&&!Ve&&(Je.push(this._applyStartDateToObj(new Date(m),{appointmentData:e})),m.setDate(m.getDate()+1));Ve&&m.getTime()<A.getTime()&&m<V;){const rt=new Date(m),Ct=new Date(m);this._checkStartDate(rt,r,X),this._checkEndDate(Ct,A,ce);const Xt=(0,xe.tm)({},e,!0),On={};this._applyStartDateToObj(rt,On),this._applyEndDateToObj(Ct,On),Xt.settings=On,Je.push(Xt),m=Tn.A.trimTime(m),m.setDate(m.getDate()+1),m.setHours(X)}return Je}_checkStartDate(e,t,i){!Tn.A.sameDate(e,t)||e.getHours()<=i?e.setHours(i,0,0,0):e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}_checkEndDate(e,t,i){!Tn.A.sameDate(e,t)||e.getHours()>i?e.setHours(i,0,0,0):e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}_removeDragSourceClassFromDraggedAppointment(){this._itemElements().filter(`.${b5}`).each((t,i)=>{(0,a.A)(i).dxSchedulerAppointment("instance").option("isDragSource",!1)})}_setDragSourceAppointment(e,t){const i=this._findItemElementByItem(e),{startDate:r,endDate:m}=t.info.sourceAppointment,{groupIndex:A}=t;i.forEach(V=>{const{info:X,groupIndex:ce}=V.data(VS),{startDate:_e,endDate:Me}=X.sourceAppointment,Ve=V.dxSchedulerAppointment("instance"),Je=r.getTime()===_e.getTime()&&m.getTime()===Me.getTime()&&A===ce;Ve.option("isDragSource",Je)})}updateResizableArea(){const e=this.$element().find(".dx-scheduler-appointment.dx-resizable"),t=(0,h.VM)(e,i=>{const m=(0,a.A)(i).dxResizable("instance"),{area:A,handles:V}=m.option();return("right left"===V||"left right"===V)&&(0,C.Qd)(A)});(0,w.__)(t,(i,r)=>{const m=(0,a.A)(r),A=(0,Fw.x5)(m),V=this._getItemData(m),X=this._calculateResizableArea({left:A.left},V);m.dxResizable("instance").option("area",X)})}}(0,y.A)("dxSchedulerAppointments",S7);const uie=S7;class E7 extends Sl.A{show(e){this._isMobileLayout()||this._overlay.option("target",e),this._overlay.show()}hide(){this._overlay.hide()}_keyboardHandler(e){var t;null===(t=this._calendar)||void 0===t||t._keyboardHandler(e)}_init(){super._init(),this.$element()}_render(){super._render(),this._renderOverlay()}_renderOverlay(){this.$element().addClass("dx-scheduler-navigator-calendar-popover");const e=this._isMobileLayout(),t=e?bg.A:Dy.A;this._overlay=this._createComponent(this.$element(),t,{contentTemplate:()=>this._createOverlayContent(),onShown:()=>this._calendar.focus(),defaultOptionsRules:[{device:()=>e,options:{fullScreen:!0,showCloseButton:!1,toolbarItems:[{shortcut:"cancel"}],_ignorePreventScrollEventsDeprecation:!0,preventScrollEvents:!1,enableBodyScroll:!1}}]})}_createOverlayContent(){const e=(0,a.A)("<div>").addClass("dx-scheduler-navigator-calendar");return this._calendar=this._createComponent(e,ax.A,this._getCalendarOptions()),this._isMobileLayout()?this._createScrollable(e).$element():e}_createScrollable(e){const t=this._createComponent("<div>",nV.A,{height:"auto",direction:"both"});return t.$content().append(e),t}_optionChanged(e){var t;let{name:i,value:r}=e;"value"===i&&(null===(t=this._calendar)||void 0===t||t.option("value",r))}_getCalendarOptions(){return{value:this.option("value"),min:this.option("min"),max:this.option("max"),firstDayOfWeek:this.option("firstDayOfWeek"),focusStateEnabled:this.option("focusStateEnabled"),onValueChanged:this.option("onValueChanged"),skipFocusCheck:!0,tabIndex:this.option("tabIndex")}}_isMobileLayout(){return!d.A.current().generic}}(0,y.A)("dxSchedulerCalendarPopup",E7);const{trimTime:gie}=Tn.A,yie=n=>({key:"previous",icon:"chevronprev",elementAttr:{class:"dx-scheduler-navigator-previous"},clickHandler:()=>n._updateDateByDirection(-1),onContentReady:e=>{const t=e.component;t.option("disabled",OU(n)),n._addEvent("min",()=>{t.option("disabled",OU(n))}),n._addEvent("currentDate",()=>{t.option("disabled",OU(n))}),n._addEvent("startViewDate",()=>{t.option("disabled",OU(n))})}}),bie=n=>({key:"calendar",text:n.captionText,elementAttr:{class:"dx-scheduler-navigator-caption"},clickHandler:e=>n._showCalendar(e),onContentReady:e=>{const t=e.component;n._addEvent("currentView",()=>{t.option("text",n.captionText)}),n._addEvent("currentDate",()=>{t.option("text",n.captionText)}),n._addEvent("startViewDate",()=>{t.option("text",n.captionText)}),n._addEvent("views",()=>{t.option("text",n.captionText)}),n._addEvent("firstDayOfWeek",()=>{t.option("text",n.captionText)})}}),xie=n=>({key:"next",icon:"chevronnext",elementAttr:{class:"dx-scheduler-navigator-next"},clickHandler:()=>n._updateDateByDirection(1),onContentReady:e=>{const t=e.component;t.option("disabled",wU(n)),n._addEvent("min",()=>{t.option("disabled",wU(n))}),n._addEvent("currentDate",()=>{t.option("disabled",wU(n))}),n._addEvent("startViewDate",()=>{t.option("disabled",wU(n))})}}),OU=n=>{let e=n.option("min");if(!e)return!1;e=new Date(e);const t=n._getCaption();return e=gie(e),n._getNextDate(-1,t.endDate)<e},wU=n=>{let e=n.option("max");if(!e)return!1;e=new Date(e);const t=n._getCaption();return e=e.setHours(23,59,59),n._getNextDate(1,t.startDate)>e},{correctDateWithUnitBeginning:Sie,getFirstWeekDate:Eie,getLastMonthDay:O7,addDateInterval:cP}=Tn.A,{format:zS}=sa.A,w7={milliseconds:1},Oie={days:1},wie={days:7},TU=n=>cP(n,Oie,1),T7=n=>cP(n,wie,1),ZW=n=>6===n.getDay()||0===n.getDay(),Lie=(n,e)=>{const{intervalCount:t,step:i,agendaDuration:r}=e;let m,A,V=new Date(n);for(let X=0;X<t;X++)m=V,A=Bie(m,i,r),V=Nie(A,i);return A},Bie=(n,e,t)=>{let i;switch(e){case"day":i=TU(n);break;case"week":i=T7(n);break;case"month":i=(n=>{const e=O7(n);return cP(n,{days:e},1)})(n);break;case"workWeek":i=(n=>{let e=new Date(n),t=0;for(;t<5;)ZW(e)||t++,e=TU(e);return e})(n);break;case"agenda":i=((n,e)=>cP(n,{days:e},1))(n,t)}return(n=>cP(n,w7,-1))(i)},Nie=(n,e)=>{let t=(n=>cP(n,w7,1))(n);if("workWeek"===e)for(;ZW(t);)t=TU(t);return t},QW=n=>{const t=sa.A.getMonthNames(n?"abbreviated":"wide");return i=>`${zS(i,"day")} ${t[i.getMonth()]}`},D7=n=>`${sa.A.getMonthNames("abbreviated")[n.getMonth()]} ${zS(n,"year")}`,JW=n=>e=>`${QW(n)(e)} ${zS(e,"year")}`,$ie=(n,e,t,i)=>Tn.A.sameDate(n,e)?((n,e,t)=>`${QW("agenda"===e&&t)(n)} ${zS(n,"year")}`)(n,i,t):"month"===i?((n,e)=>Tn.A.sameMonth(n,e)?zS(n,"monthandyear"):`${Tn.A.sameYear(n,e)?sa.A.getMonthNames("abbreviated")[n.getMonth()]:D7(n)}-${D7(e)}`)(n,e):((n,e,t)=>n.getFullYear()!==e.getFullYear()?((n,e)=>`${zS(n,JW(!0))}-${zS(e,JW(!0))}`)(n,e):((n,e,t)=>{const i=n.getMonth()!==e.getMonth(),r=i||t,m=i?QW(r):"d";return`${zS(n,m)}-${zS(e,JW(r))}`})(n,e,t))(n,e,t),jie=(n,e,t)=>{const{startDate:i,endDate:r}=(n=>{const e=(n=>{const{date:e,step:t,firstDayOfWeek:i}=n;switch(t){case"day":case"week":case"month":return Sie(e,t,!1,i);case"workWeek":return(n=>{let e=new Date(n);for(;ZW(e);)e=TU(e);return e})(Eie(e,i));case"agenda":return new Date(e)}})(n);return{startDate:e,endDate:Lie(e,n)}})(n);let m=$ie(i,r,e,n.step);return(0,C.Tn)(t)&&(m=t({startDate:i,endDate:r,text:m})),{startDate:i,endDate:r,text:m}},Kie={day:"day",week:"week",workWeek:"workWeek",month:"month",timelineDay:"day",timelineWeek:"week",timelineWorkWeek:"workWeek",timelineMonth:"month",agenda:"agenda"},DU=n=>(0,C.Gv)(n)&&n.type?n.type:n,Yk=n=>(0,C.Gv)(n)?n.name?n.name:n.type:n,A7=n=>{n.forEach(e=>{const t=DU(e);(n=>Object.values(kc).includes(n))(t)||go.A.log("W0008",t)})},I7=n=>(A7(n),n.map(e=>{const t=(n=>{if(n.name)return n.name;const e=(0,vv.PT)(n.type||n,!0);return Wn.A.format(`dxScheduler-switcher${e}`)})(e),i=DU(e),r=Yk(e);return{text:t,name:r,view:{text:t,type:i,name:r}}})),P7=(n,e)=>1===n.length&&n[0].name===e,M7="dx-scheduler-view-switcher",R7=n=>{const e=I7(n.views);let t=Yk(n.currentView);return t=e.some(r=>r.name===t)?t:void 0,{selectedView:t,views:e}},k7="defaultElement";class L7 extends Sl.A{get views(){return this.option("views")}get captionText(){return this._getCaption().text}get intervalOptions(){return{step:(n=>Kie[DU(this.currentView)])(),intervalCount:this.option("intervalCount"),firstDayOfWeek:this.option("firstDayOfWeek"),agendaDuration:this.option("agendaDuration")}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{_useShortDateFormat:!d.A.real().generic||d.A.isSimulator()})}_createEventMap(){this.eventMap=new Map([["currentView",[e=>{this.currentView=GW_getCurrentView(Yk(e),this.option("views"))}]],["items",[this.repaint.bind(this)]],["views",[A7]],["currentDate",[this._getCalendarOptionUpdater("value")]],["min",[this._getCalendarOptionUpdater("min")]],["max",[this._getCalendarOptionUpdater("max")]],["tabIndex",[this.repaint.bind(this)]],["focusStateEnabled",[this.repaint.bind(this)]],["useDropDownViewSwitcher",[this.repaint.bind(this)]]])}_addEvent(e,t){this.eventMap.has(e)||this.eventMap.set(e,[]);const i=this.eventMap.get(e);this.eventMap.set(e,[...i,t])}_optionChanged(e){const{name:t,value:i}=e;this.eventMap.has(t)&&this.eventMap.get(t).forEach(m=>{m(i)})}_init(){super._init(),this._createEventMap(),this.$element().addClass("dx-scheduler-header"),this.currentView=GW_getCurrentView(Yk(this.option("currentView")),this.option("views"))}_render(){super._render(),this._createEventMap(),this._renderToolbar()}_renderToolbar(){const e=this._createToolbarConfig(),t=(0,a.A)("<div>");t.appendTo(this.$element()),this._toolbar=this._createComponent(t,xS.A,e)}_createToolbarConfig(){return{items:this.option("items").map(i=>this._parseItem(i))}}_parseItem(e){if(this._isDefaultItem(e)){const i=e[k7];switch(i){case"viewSwitcher":return this.option("useDropDownViewSwitcher")?((n,e)=>{const{selectedView:t,views:i}=R7(n),r=P7(i,t);return(0,Lo.A)({widget:"dxDropDownButton",locateInMenu:"never",cssClass:M7,options:{items:i,useSelectMode:!0,keyExpr:"name",selectedItemKey:t,displayExpr:"text",showArrowIcon:!r,elementAttr:{class:"dx-scheduler-view-switcher-dropdown-button"},onItemClick:m=>{const{view:A}=m.itemData;n._updateCurrentView(A)},onContentReady:m=>{const A=m.component;n._addEvent("currentView",V=>{const X=I7(n.views);P7(X,V)&&n.repaint(),A.option("selectedItemKey",Yk(V))})},dropDownOptions:{onShowing:m=>{r&&(m.cancel=!0)},width:"max-content",_wrapperClassExternal:"dx-scheduler-view-switcher-dropdown-button-content"}}},e)})(this,e):((n,e)=>{const{selectedView:t,views:i}=R7(n),r=(0,k.Ft)()?"outlined":"contained";return(0,Lo.A)({widget:"dxButtonGroup",locateInMenu:"auto",cssClass:M7,options:{items:i,keyExpr:"name",selectedItemKeys:[t],stylingMode:r,onItemClick:m=>{const{view:A}=m.itemData;n._updateCurrentView(A)},onContentReady:m=>{const A=m.component;n._addEvent("currentView",V=>{A.option("selectedItemKeys",[Yk(V)])})}}},e)})(this,e);case"dateNavigator":return this._renderCalendar(),((n,e)=>{const t=[yie(n),bie(n),xie(n)],i=(0,k.Nt)()?"text":"contained";return(0,Lo.A)({widget:"dxButtonGroup",cssClass:"dx-scheduler-navigator",options:{items:t,stylingMode:i,selectionMode:"none",onItemClick:r=>{r.itemData.clickHandler(r)}}},e)})(this,e);default:go.A.log(`Unknown default element type: ${i}`)}}return e}_callEvent(e,t){this.eventMap.has(e)&&this.eventMap.get(e).forEach(r=>r(t))}_updateCurrentView(e){this.option("onCurrentViewChange")(e.name),this._callEvent("currentView",e)}_updateCalendarValueAndCurrentDate(e){this._updateCurrentDate(e),this._calendar.option("value",e)}_updateCurrentDate(e){this.option("onCurrentDateChange")(e),this._callEvent("currentDate",e)}_renderCalendar(){this._calendar=this._createComponent("<div>",E7,{value:this.option("currentDate"),min:this.option("min"),max:this.option("max"),firstDayOfWeek:this.option("firstDayOfWeek"),focusStateEnabled:this.option("focusStateEnabled"),tabIndex:this.option("tabIndex"),onValueChanged:e=>{this._updateCurrentDate(e.value),this._calendar.hide()}}),this._calendar.$element().appendTo(this.$element())}_getCalendarOptionUpdater(e){return t=>{this._calendar&&this._calendar.option(e,t)}}_getNextDate(e){const i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)??this.option("currentDate");return((n,e)=>{const{date:t,step:i,intervalCount:r,agendaDuration:m}=n;let A;switch(i){case"day":A=1*r;break;case"week":case"workWeek":A=7*r;break;case"agenda":A=m;break;case"month":return((n,e,t)=>{const i=n.getDate(),r=new Date(new Date(n.getTime()).setDate(1)),m=new Date(r.setMonth(r.getMonth()+e*t)),A=O7(m),V=i<A?i:A,X=new Date(new Date(n.getTime()).setDate(V));return new Date(X.setMonth(X.getMonth()+e*t))})(t,r,e)}return cP(t,{days:A},e)})((0,Lo.A)({},this.intervalOptions,{date:i}),e)}_isMonth(){const{currentView:e}=this;return"month"===DU(e)}_getDisplayedDate(){const e=this.option("startViewDate");return this._isMonth()?T7(e):new Date(e)}_getCaption(){let e=this.option("currentDate");this.option("startViewDate")&&(e=this._getDisplayedDate()),e=Tn.A.trimTime(e);const t=(0,Lo.A)({},this.intervalOptions,{date:e}),i=this.option("customizeDateNavigatorText"),r=this.option("_useShortDateFormat");return jie(t,r,i)}_updateDateByDirection(e){const t=this._getNextDate(e);this._updateCalendarValueAndCurrentDate(t)}_showCalendar(e){this._calendar.show(e.element)}_hideCalendar(){this._calendar.hide()}_isDefaultItem(e){return Object.prototype.hasOwnProperty.call(e,k7)}}(0,y.A)("dxSchedulerHeader",L7);class B7{constructor(e){this.isVirtualScrolling=!1,this.options=e}get DOMMetaData(){return this.options.DOMMetaData}get appointments(){return this.options.dateSettings}get viewDataProvider(){return this.options.viewDataProvider}get positionHelper(){return this.options.positionHelper}get startViewDate(){return this.options.startViewDate}get viewStartDayHour(){return this.options.viewStartDayHour}get viewEndDayHour(){return this.options.viewEndDayHour}get cellDuration(){return this.options.cellDuration}get getPositionShift(){return this.options.getPositionShiftCallback}get groupCount(){return this.options.groupCount}get rtlEnabled(){return this.options.rtlEnabled}get isVerticalGrouping(){return this.options.isVerticalGroupOrientation}get showAllDayPanel(){return this.options.showAllDayPanel}get supportAllDayRow(){return this.options.supportAllDayRow}get isGroupedAllDayPanel(){return this.options.isGroupedAllDayPanel}calculateCellPositions(e,t,i){const r=[];return this.appointments.forEach((m,A)=>{this.getCoordinateInfos({appointment:m,groupIndices:e,isAllDayRowAppointment:t,isRecurrentAppointment:i}).forEach(X=>{X&&r.push(this._prepareObject(X,A))})}),r}getCoordinateInfos(e){const{appointment:t,isAllDayRowAppointment:i,groupIndices:r,recurrent:m}=e,{startDate:A}=t;return this.getCoordinatesByDateInGroup(A,r,i,m?void 0:t.source.groupIndex)}_prepareObject(e,t){return e.dateSettingIndex=t,{coordinates:e,dateSettingIndex:t}}getCoordinatesByDate(e,t,i){const r=t||0,A=this.viewDataProvider.findCellPositionInMap({groupIndex:r,startDate:e,isAllDay:i},!0);if(!A)return;const V=this.getCellPosition(A,i&&!this.isVerticalGrouping),X=i?0:this.getTimeShiftRatio(A,e),ce=this.getPositionShift(X,i),_e=this.positionHelper.getHorizontalMax(r,e),Me=this.positionHelper.getVerticalMax({groupIndex:r,isVirtualScrolling:this.isVirtualScrolling,showAllDayPanel:this.showAllDayPanel,supportAllDayRow:this.supportAllDayRow,isGroupedAllDayPanel:this.isGroupedAllDayPanel,isVerticalGrouping:this.isVerticalGrouping});return{positionByMap:A,cellPosition:V.left+ce.cellPosition,top:V.top+ce.top,left:V.left+ce.left,rowIndex:V.rowIndex,columnIndex:V.columnIndex,hMax:_e,vMax:Me,groupIndex:r}}getCoordinatesByDateInGroup(e,t,i,r){const m=[];if(this.viewDataProvider.isSkippedDate(e))return m;let A=[r];return(0,C.O9)(r)||(A=this.groupCount?t:[0]),A.forEach(V=>{const X=this.getCoordinatesByDate(e,V,i);X&&m.push(X)}),m}getCellPosition(e,t){const{dateTableCellsMeta:i,allDayPanelCellsMeta:r}=this.DOMMetaData,{columnIndex:m,rowIndex:A}=e,V=t?r[m]:i[A][m],X=(0,Lo.A)({},V);return this.rtlEnabled&&(X.left+=V.width),X&&(X.rowIndex=e.rowIndex,X.columnIndex=e.columnIndex),X}getTimeShiftRatio(e,t){const{cellDuration:i,viewOffset:r}=this.options,{rowIndex:m,columnIndex:A}=e,X=$s_addOffsets(this.viewDataProvider.viewDataMap.dateTableMap[m][A].cellData.startDate,[-r]);return(t.getTime()-X.getTime())/i%1}}class ooe extends B7{constructor(){super(...arguments),this.isVirtualScrolling=!0}calculateCellPositions(e,t,i){const r=t?this.appointments:this.appointments.filter(m=>{let{source:A,startDate:V,endDate:X}=m;return this.viewDataProvider.isGroupIntersectDateInterval(A.groupIndex,V,X)});return i?this.createRecurrentAppointmentInfos(r,t):super.calculateCellPositions(e,t,i)}createRecurrentAppointmentInfos(e,t){const i=[];return e.forEach((r,m)=>{let{source:A,startDate:V}=r;const X=this.getCoordinatesByDate(V,A.groupIndex,t);X&&i.push(this._prepareObject(X,m))}),i}}class roe{constructor(e){this.options=e}calculateCellPositions(e,t,i){return(this.options.isVirtualScrolling?new ooe(this.options):new B7(this.options)).calculateCellPositions(e,t,i)}}const N7=(n,e,t,i)=>t?"DATE":i&&Tn.A.sameDate(n,e)?"TIME":"DATETIME",F7=(n,e,t)=>{const i=n.getDate()===e.getDate();switch(t){case"DATETIME":return[sa.A.format(n,"monthandday")," ",sa.A.format(n,"shorttime")," - ",i?"":`${sa.A.format(e,"monthandday")} `,sa.A.format(e,"shorttime")].join("");case"TIME":return`${sa.A.format(n,"shorttime")} - ${sa.A.format(e,"shorttime")}`;case"DATE":return`${sa.A.format(n,"monthandday")}${i?"":` - ${sa.A.format(e,"monthandday")}`}`}},dP=Tn.A.dateToMilliseconds;class V7{constructor(e){this.options=e}get rawAppointment(){return this.options.rawAppointment}get timeZoneCalculator(){return this.options.timeZoneCalculator}get viewDataProvider(){return this.options.viewDataProvider}get appointmentTakesAllDay(){return this.options.appointmentTakesAllDay}get supportAllDayRow(){return this.options.supportAllDayRow}get isAllDayRowAppointment(){return this.options.isAllDayRowAppointment}get timeZone(){return this.options.timeZone}get dateRange(){return this.options.dateRange}get firstDayOfWeek(){return this.options.firstDayOfWeek}get viewStartDayHour(){return this.options.viewStartDayHour}get viewEndDayHour(){return this.options.viewEndDayHour}get endViewDate(){return this.options.endViewDate}get viewType(){return this.options.viewType}get isGroupedByDate(){return this.options.isGroupedByDate}get isVerticalOrientation(){return this.options.isVerticalGroupOrientation}get dataAccessors(){return this.options.dataAccessors}get loadedResources(){return this.options.loadedResources}get isDateAppointment(){return!sP(this.viewType)&&this.appointmentTakesAllDay}getIntervalDuration(){return this.appointmentTakesAllDay?this.options.allDayIntervalDuration:this.options.intervalDuration}generate(e){const{isRecurrent:t}=e,i=this._getGroupIndices(this.rawAppointment);let r=this._createAppointments(e,i);r=this._getProcessedByAppointmentTimeZone(r,e),this._canProcessNotNativeTimezoneDates(e)&&(r=this._getProcessedNotNativeTimezoneDates(r,e));let m=this._createGridAppointmentList(r,e);const A=this._getAppointmentsFirstViewDate(m);return m=this._fillNormalizedStartDate(m,A),m=this._cropAppointmentsByStartDayHour(m,A),m=this._fillNormalizedEndDate(m,this.rawAppointment),this._needSeparateLongParts()&&(m=this._separateLongParts(m,e)),m=this.shiftSourceAppointmentDates(m),{dateSettings:m,itemGroupIndices:i,isRecurrent:t}}shiftSourceAppointmentDates(e){const{viewOffset:t}=this.options;return e.map(i=>(0,Lo.A)({},i,{source:(0,Lo.A)({},i.source,{startDate:$s_addOffsets(i.source.startDate,[t]),endDate:$s_addOffsets(i.source.endDate,[t])})}))}_getProcessedByAppointmentTimeZone(e,t){if(!(0,C.RI)(t.startDateTimeZone)||!(0,C.RI)(t.endDateTimeZone)){const r={startDate:this.timeZoneCalculator.getOffsets(t.startDate,t.startDateTimeZone),endDate:this.timeZoneCalculator.getOffsets(t.endDate,t.endDateTimeZone)};e.forEach(m=>{const A=this.timeZoneCalculator.getOffsets(m.startDate,t.startDateTimeZone),V=this.timeZoneCalculator.getOffsets(m.endDate,t.endDateTimeZone),X=r.startDate.appointment-A.appointment,ce=r.endDate.appointment-V.appointment;A.appointment!==A.common&&(m.startDate=new Date(m.startDate.getTime()+X*dP("hour"))),V.appointment!==V.common&&(m.endDate=new Date(m.endDate.getTime()+ce*dP("hour")))})}return e}_createAppointments(e,t){let i=this._createRecurrenceAppointments(e,t);return!e.isRecurrent&&0===i.length&&i.push({startDate:e.startDate,endDate:e.endDate}),i=i.map(r=>{var m;const A=null===(m=r.endDate)||void 0===m?void 0:m.getTime();return r.startDate.getTime()===A&&r.endDate.setTime(A+dP("minute")),(0,Lo.A)({},r,{exceptionDate:new Date(r.startDate)})}),i}_canProcessNotNativeTimezoneDates(e){return!((0,C.RI)(this.timeZone)||!e.isRecurrent||Aa.isEqualLocalTimeZone(this.timeZone,e.startDate))}_getProcessedNotNativeDateIfCrossDST(e,t){if(t<0){const i=new Date(e),r=new Date(i);if(r.setHours(r.getHours()-1),this.timeZoneCalculator.getOffsets(i).common!==this.timeZoneCalculator.getOffsets(r).common)return 0}return t}_getCommonOffset(e){return this.timeZoneCalculator.getOffsets(e).common}_getProcessedNotNativeTimezoneDates(e,t){return e.map(i=>{let r=this._getCommonOffset(t.startDate)-this._getCommonOffset(i.startDate),m=this._getCommonOffset(t.endDate)-this._getCommonOffset(i.endDate);if(0===r&&0===m)return i;r=this._getProcessedNotNativeDateIfCrossDST(i.startDate,r),m=this._getProcessedNotNativeDateIfCrossDST(i.endDate,m);const A=new Date(i.startDate.getTime()+r*dP("hour"));let V=new Date(i.endDate.getTime()+m*dP("hour"));const X=this.timeZoneCalculator.createDate(A,{path:"toGrid"}),ce=this.timeZoneCalculator.createDate(V,{path:"toGrid"});return t.duration>ce.getTime()-X.getTime()&&(V=new Date(A.getTime()+t.duration)),(0,Lo.A)({},i,{startDate:A,endDate:V,exceptionDate:new Date(A)})})}_needSeparateLongParts(){return this.isVerticalOrientation?this.isGroupedByDate:this.isGroupedByDate&&this.appointmentTakesAllDay}normalizeEndDateByViewEnd(e,t){let i=new Date(t.getTime());if(!sP(this.viewType)||!this.appointmentTakesAllDay){const X=Tn.A.roundToHour(this.endViewDate);i>X&&(i=X)}const m=this.viewEndDayHour,A=ll_getField(this.dataAccessors,"allDay",e),V=new Date(new Date(t.getTime()).setHours(m,0,0,0));return(i.getTime()>V.getTime()||A&&i.getHours()<m)&&(i=V),i}_fillNormalizedEndDate(e,t){return e.map(i=>(0,Lo.A)({},i,{normalizedEndDate:this.normalizeEndDateByViewEnd(t,i.endDate)}))}_separateLongParts(e,t){let i=[];return e.forEach(r=>{const m=new Date(this.dateRange[1]),{startDate:A,normalizedEndDate:V}=r,ce=Tn.A.getDatesOfInterval(A,V,{milliseconds:this.getIntervalDuration()}).filter(_e=>new Date(_e)<m).map(_e=>{const Me=new Date(new Date(_e).setMilliseconds(t.duration));return{startDate:_e,endDate:Me,normalizedEndDate:this.normalizeEndDateByViewEnd(this.rawAppointment,Me),source:r.source}});i=i.concat(ce)}),i}_createGridAppointmentList(e,t){return e.map(i=>{const r=t.startDate.getTimezoneOffset()-i.startDate.getTimezoneOffset();0!==r&&this._canProcessNotNativeTimezoneDates(t)&&(i.startDate=$s_addOffsets(i.startDate,[r*dP("minute")]),i.endDate=$s_addOffsets(i.endDate,[r*dP("minute")]),i.exceptionDate=new Date(i.startDate));const m=i.endDate.getTime()-i.startDate.getTime(),A=this.timeZoneCalculator.createDate(i.startDate,{path:"toGrid"});return{startDate:A,endDate:$s_addOffsets(A,[m]),allDay:t.allDay||!1,source:i}})}_createExtremeRecurrenceDates(e){let t=this.appointmentTakesAllDay?Tn.A.trimTime(this.dateRange[0]):this.dateRange[0],i=this.dateRange[1];if(this.timeZone){t=this.timeZoneCalculator.createDate(t,{path:"fromGrid"}),i=this.timeZoneCalculator.createDate(i,{path:"fromGrid"});const r=Aa.getDaylightOffsetInMs(t,i);r&&(i=new Date(i.getTime()+r))}return[t,i]}_createRecurrenceOptions(e,t){const{viewOffset:i}=this.options,r=$s_addOffsets(e.startDate,[i]),m=$s_addOffsets(e.endDate,[i]),[A,V]=this._createExtremeRecurrenceDates(t),X=$s_addOffsets(A,[i]),ce=$s_addOffsets(V,[i]);return{rule:e.recurrenceRule,exception:e.recurrenceException,min:X,max:ce,firstDayOfWeek:this.firstDayOfWeek,start:r,end:m,appointmentTimezoneOffset:this.timeZoneCalculator.getOriginStartDateOffsetInMs(r,e.rawAppointment.startDateTimeZone,!0),getPostProcessedException:_e=>{if((0,C.RI)(this.timeZone)||Aa.isEqualLocalTimeZone(this.timeZone,_e))return _e;let Je=this.timeZoneCalculator.getOffsets(r).common-this.timeZoneCalculator.getOffsets(_e).common;return Je=this._getProcessedNotNativeDateIfCrossDST(_e,Je),new Date(_e.getTime()-Je*Tn.A.dateToMilliseconds("hour"))}}}_createRecurrenceAppointments(e,t){const{duration:i}=e,{viewOffset:r}=this.options,m=this._createRecurrenceOptions(e);return Fy().generateDates(m).map(V=>{const X=Aa.createUTCDateWithLocalOffset(V);X.setTime(X.getTime()+i);const ce=Aa.createDateFromUTCWithLocalOffset(X);return{startDate:new Date(V),endDate:ce}}).map(V=>{let{startDate:X,endDate:ce}=V;return{startDate:$s_addOffsets(X,[-r]),endDate:$s_addOffsets(ce,[-r])}})}_getAppointmentsFirstViewDate(e){const{viewOffset:t}=this.options;return e.map(i=>{const r=this._getAppointmentFirstViewDate((0,Lo.A)({},i,{startDate:$s_addOffsets(i.startDate,[t]),endDate:$s_addOffsets(i.endDate,[t])}));if(!r)return i.startDate;const m=$s_addOffsets(r,[-t]);return m>i.startDate?m:i.startDate})}_fillNormalizedStartDate(e,t,i){return e.map((r,m)=>(0,Lo.A)({},r,{startDate:this._getAppointmentResultDate({appointment:r,rawAppointment:i,startDate:new Date(r.startDate),startDayHour:this.viewStartDayHour,firstViewDate:t[m]})}))}_cropAppointmentsByStartDayHour(e,t){return e.filter((i,r)=>!!t[r]&&(!!this.appointmentTakesAllDay||i.endDate>i.startDate))}_getAppointmentResultDate(e){const{appointment:t,startDayHour:i,firstViewDate:r}=e;let A,{startDate:m}=e;return this.appointmentTakesAllDay?A=Tn.A.normalizeDate(m,r):(m<r&&(m=r),A=Tn.A.normalizeDate(t.startDate,m)),this.isDateAppointment?A:Tn.A.roundDateByStartDayHour(A,i)}_getAppointmentFirstViewDate(e){const t=e.source.groupIndex||0,{startDate:i,endDate:r}=e;return this.isAllDayRowAppointment||e.allDay?this.viewDataProvider.findAllDayGroupCellStartDate(t):this.viewDataProvider.findGroupCellStartDate(t,i,r,this.isDateAppointment)}_getGroupIndices(e){let t=[];if(e&&this.loadedResources.length){const i=fV(this.loadedResources);t=KW((r,m)=>SU(this.options.dataAccessors.resources,r,m),i,e)}return t}}class aoe extends V7{get groupCount(){return HS(this.loadedResources)}_createRecurrenceAppointments(e,t){const{duration:i}=e,r=[];return(this.groupCount?t:[0]).forEach(A=>{const V=this._createRecurrenceOptions(e,A),ce=Fy().generateDates(V).map(_e=>{const Me=new Date(_e),Ve=Aa.createUTCDateWithLocalOffset(_e);return Ve.setTime(Ve.getTime()+i),{startDate:Me,endDate:Aa.createDateFromUTCWithLocalOffset(Ve),groupIndex:A}});r.push(...ce)}),r}_updateGroupIndices(e,t){const i=[];return t.forEach(r=>{this.viewDataProvider.getGroupStartDate(r)&&e.forEach(A=>{const V=(0,_.X)({},A);V.groupIndex=r,i.push(V)})}),i}_getGroupIndices(e){var t;let i=super._getGroupIndices(e);const r=this.viewDataProvider.getGroupIndices();return null!==(t=i)&&void 0!==t&&t.length||(i=[0]),i.filter(m=>-1!==r.indexOf(m))}_createAppointments(e,t){const i=super._createAppointments(e,t);return e.isRecurrent?i:this._updateGroupIndices(i,t)}}class loe{constructor(e){this.options=e,this.appointmentAdapter=hc(this.rawAppointment,this.dataAccessors,this.timeZoneCalculator)}get rawAppointment(){return this.options.rawAppointment}get dataAccessors(){return this.options.dataAccessors}get timeZoneCalculator(){return this.options.timeZoneCalculator}get isAllDayRowAppointment(){return this.options.appointmentTakesAllDay&&this.options.supportAllDayRow}get groups(){return this.options.groups}get dateSettingsStrategy(){const e=(0,Lo.A)({},this.options,{isAllDayRowAppointment:this.isAllDayRowAppointment});return this.options.isVirtualScrolling?new aoe(e):new V7(e)}create(){const{dateSettings:e,itemGroupIndices:t,isRecurrent:i}=this._generateDateSettings(),r=this._calculateCellPositions(e,t);return this._prepareAppointmentInfos(e,r,i)}_generateDateSettings(){return this.dateSettingsStrategy.generate(this.appointmentAdapter)}_calculateCellPositions(e,t){return new roe((0,Lo.A)({},this.options,{dateSettings:e})).calculateCellPositions(t,this.isAllDayRowAppointment,this.appointmentAdapter.isRecurrent)}_prepareAppointmentInfos(e,t,i){const r=[];return t.forEach(m=>{let{coordinates:A,dateSettingIndex:V}=m;const X=e[V],ce=this._getAppointmentDateText(X);r.push((0,Lo.A)({},A,{info:{appointment:X,sourceAppointment:X.source,dateText:ce,isRecurrent:i}}))}),r}_getAppointmentDateText(e){const{startDate:t,endDate:i,allDay:r}=e;return(n=>{const{startDate:e,endDate:t,allDay:i,format:r}=n,m=r||N7(e,t,i);return F7(e,t,m)})({startDate:t,endDate:i,allDay:r,format:"TIME"})}}const H7=class coe{constructor(e){this._renderingStrategy=e}getDropDownAppointmentWidth(e,t){return t||!(0,C.O9)(t)?75*this._renderingStrategy.cellWidth/100:24}getCollectorTopOffset(e){return 3}getCollectorLeftOffset(){return 3}getAppointmentDefaultOffset(){return this._renderingStrategy._isCompactTheme()?22:this._renderingStrategy.appointmentOffset}getDynamicAppointmentCountPerCell(){const e=this._renderingStrategy,{cellHeight:t}=e,i=Math.floor((t-e._getAppointmentDefaultOffset())/e._getAppointmentDefaultHeight())||this._getAppointmentMinCount();return e.allDaySupported()?{allDay:"vertical"===e.groupOrientation?i:this._renderingStrategy.appointmentCountPerCell,simple:this._calculateDynamicAppointmentCountPerCell()||this._getAppointmentMinCount()}:i}getDropDownAppointmentHeight(){}_getAppointmentMinCount(){return 1}_calculateDynamicAppointmentCountPerCell(){return Math.floor(this._renderingStrategy._getAppointmentMaxWidth()/50)}_getAppointmentDefaultWidth(){return 40}},uoe=class doe extends H7{getDropDownAppointmentWidth(e,t){return this.getDropDownButtonAdaptiveSize()}getDropDownButtonAdaptiveSize(){return 28}getCollectorTopOffset(e){const t=this._renderingStrategy;return t.allDaySupported()&&e?(t.allDayHeight-t.getDropDownButtonAdaptiveSize())/2:this._renderingStrategy.cellHeight-40}getCollectorLeftOffset(){const e=this._renderingStrategy.getDropDownAppointmentWidth();return(this._renderingStrategy.cellWidth-e)/2}getAppointmentDefaultOffset(){return 35}getDynamicAppointmentCountPerCell(){return this._renderingStrategy.allDaySupported()?{allDay:0,simple:this._calculateDynamicAppointmentCountPerCell()||this._getAppointmentMinCount()}:0}getDropDownAppointmentHeight(){return 28}_getAppointmentMinCount(){return 0}_getAppointmentDefaultWidth(){return this._renderingStrategy.allDaySupported()?30:super._getAppointmentDefaultWidth()}_calculateDynamicAppointmentCountPerCell(){return Math.floor(this._renderingStrategy._getAppointmentMaxWidth()/this._renderingStrategy._getAppointmentDefaultWidth())}},AU=Tn.A.dateToMilliseconds,qW=class hoe{constructor(e){this.options=e,this._initPositioningStrategy()}get isAdaptive(){return this.options.adaptivityEnabled}get rtlEnabled(){return this.options.rtlEnabled}get startDayHour(){return this.options.startDayHour}get endDayHour(){return this.options.endDayHour}get maxAppointmentsPerCell(){return this.options.maxAppointmentsPerCell}get cellWidth(){return this.options.cellWidth}get cellHeight(){return this.options.cellHeight}get allDayHeight(){return this.options.allDayHeight}get resizableStep(){return this.options.resizableStep}get isGroupedByDate(){return this.options.isGroupedByDate}get visibleDayDuration(){return this.options.visibleDayDuration}get viewStartDayHour(){return this.options.viewStartDayHour}get viewEndDayHour(){return this.options.viewEndDayHour}get cellDuration(){return this.options.cellDuration}get cellDurationInMinutes(){return this.options.cellDurationInMinutes}get leftVirtualCellCount(){return this.options.leftVirtualCellCount}get topVirtualCellCount(){return this.options.topVirtualCellCount}get positionHelper(){return this.options.positionHelper}get showAllDayPanel(){return this.options.showAllDayPanel}get isGroupedAllDayPanel(){return this.options.isGroupedAllDayPanel}get groupOrientation(){return this.options.groupOrientation}get rowCount(){return this.options.rowCount}get groupCount(){return this.options.groupCount}get currentDate(){return this.options.currentDate}get appointmentCountPerCell(){return this.options.appointmentCountPerCell}get appointmentOffset(){return this.options.appointmentOffset}get allowResizing(){return this.options.allowResizing}get allowAllDayResizing(){return this.options.allowAllDayResizing}get viewDataProvider(){return this.options.viewDataProvider}get dataAccessors(){return this.options.dataAccessors}get timeZoneCalculator(){return this.options.timeZoneCalculator}get intervalCount(){return this.options.intervalCount}get allDayPanelMode(){return this.options.allDayPanelMode}get isVirtualScrolling(){return this.options.isVirtualScrolling}_correctCollectorCoordinatesInAdaptive(e,t){e.top+=this.getCollectorTopOffset(t),e.left+=this.getCollectorLeftOffset()}_initPositioningStrategy(){this._positioningStrategy=this.isAdaptive?new uoe(this):new H7(this)}getPositioningStrategy(){return this._positioningStrategy}getAppointmentMinSize(){return 2}keepAppointmentSettings(){return!1}getDeltaTime(e,t,i){}getAppointmentGeometry(e){return e}needCorrectAppointmentDates(){return!0}getDirection(){return"horizontal"}createTaskPositionMap(e,t){delete this._maxAppointmentCountPerCell;const i=e?.length;if(!i)return;const r=[];for(let V=0;V<i;V++){let X=this._getItemPosition(e[V]);X.length&&this.rtlEnabled&&(X=this._correctRtlCoordinates(X)),X.forEach(ce=>{ce.leftVirtualCellCount=this.leftVirtualCellCount,ce.topVirtualCellCount=this.topVirtualCellCount,ce.leftVirtualWidth=this.leftVirtualCellCount*this.cellWidth,ce.topVirtualHeight=this.topVirtualCellCount*this.cellHeight}),r.push(X)}const m=this._getSortedPositions(r),A=this._getResultPositions(m);return this._getExtendedPositionMap(r,A)}_getDeltaWidth(e,t){const i=this.resizableStep||this.getAppointmentMinSize();return Math.round((e.width-t.width)/i)}_correctRtlCoordinates(e){const t=e[0].width||this._getAppointmentMaxWidth();return e.forEach(i=>{i.appointmentReduced||(i.left-=t)}),e}_getAppointmentMaxWidth(){return this.cellWidth}_getItemPosition(e){const t=this.shiftAppointmentByViewOffset(e),i=this.generateAppointmentSettings(t),r=this.isAllDay(t);let m=[];for(let A=0;A<i.length;A++){const V=this.calculateAppointmentHeight(t,i[A]),X=this.calculateAppointmentWidth(t,i[A]);let ce=X,_e=null,Me=[],Ve=i[A].rowIndex,Je=i[A].columnIndex;if(this._needVerifyItemSize()||r){const rt=i[A].hMax;this.isAppointmentGreaterThan(rt,{left:i[A].left,width:X})&&(_e="head",Ve=i[A].rowIndex,Je=i[A].columnIndex,ce=this._reduceMultiWeekAppointment(X,{left:i[A].left,right:rt}),Me=this._getAppointmentParts({sourceAppointmentWidth:X,reducedWidth:ce,height:V},i[A]),this.rtlEnabled&&(i[A].left=rt))}(0,_.X)(i[A],{height:V,width:ce,allDay:r,rowIndex:Ve,columnIndex:Je,appointmentReduced:_e}),m=this._getAppointmentPartsPosition(Me,i[A],m)}return m}_getAppointmentPartsPosition(e,t,i){return e.length?(e.unshift(t),i=i.concat(e)):i.push(t),i}getAppointmentSettingsGenerator(e){return new loe((0,Lo.A)({rawAppointment:e,appointmentTakesAllDay:this.isAppointmentTakesAllDay(e),getPositionShiftCallback:this.getPositionShift.bind(this)},this.options))}generateAppointmentSettings(e){return this.getAppointmentSettingsGenerator(e).create()}isAppointmentTakesAllDay(e){const t=hc(e,this.dataAccessors,this.timeZoneCalculator);return $k(t,this.allDayPanelMode)}_getAppointmentParts(e,t){return[]}_getCompactAppointmentParts(e){const t=this.cellWidth||this.getAppointmentMinSize();return Math.round(e/t)}_reduceMultiWeekAppointment(e,t){return this.rtlEnabled?Math.floor(t.left-t.right):t.right-Math.floor(t.left)}calculateAppointmentHeight(e,t){return 0}calculateAppointmentWidth(e,t){return 0}isAppointmentGreaterThan(e,t){let i=t.left+t.width-e;return this.rtlEnabled&&(i=e+t.width-t.left),i>this.cellWidth/2}isAllDay(e){return!1}cropAppointmentWidth(e,t){return this.isGroupedByDate?t:e}_getSortedPositions(e,t){const i=[],r=A=>Math.round(100*A)/100,m=(A,V,X,ce,_e,Me,Ve,Je)=>({i:A,j:V,top:r(X),left:r(ce),bottom:r(_e),right:r(Me),cellPosition:Ve,allDay:Je});for(let A=0,V=e.length;A<V;A++)for(let X=0,ce=e[A].length;X<ce;X++){const{top:_e,left:Me,height:Ve,width:Je,cellPosition:rt,allDay:Ct}=e[A][X];i.push(m(A,X,_e,Me,_e+Ve,Me+Je,rt,Ct))}return i.sort((A,V)=>this._sortCondition(A,V))}_sortCondition(e,t){}_getConditions(e,t){const i=this._isSomeEdge(e,t);return{columnCondition:i||this._normalizeCondition(e.left,t.left),rowCondition:i||this._normalizeCondition(e.top,t.top),cellPositionCondition:i||this._normalizeCondition(e.cellPosition,t.cellPosition)}}_rowCondition(e,t){const i=this._getConditions(e,t);return i.columnCondition||i.rowCondition}_columnCondition(e,t){const i=this._getConditions(e,t);return i.rowCondition||i.columnCondition}_isSomeEdge(e,t){return e.i===t.i&&e.j===t.j}_normalizeCondition(e,t){const i=e-t;return Math.abs(i)>1?i:0}_isItemsCross(e,t){if(!!e.allDay==!!t.allDay){const m=this._getOrientation(e.allDay&&t.allDay);return this._checkItemsCrossing(e,t,m)}return!1}_checkItemsCrossing(e,t,i){const r=Math.floor(e[i[0]]),m=Math.floor(e[i[1]]),A=Math.ceil(t[i[0]]),V=Math.ceil(t[i[1]]);return Math.abs(e[i[2]]-t[i[2]])<=1&&(r<=A&&m>A||r<V&&m>=V||r===A&&m===V)}_getOrientation(e){return e?["left","right","top"]:["top","bottom","left"]}_getResultPositions(e){const t=[];let i,m,A,V,r=0,X=0,ce={};const _e=(rt,Ct)=>rt.some(On=>On===Ct)?_e(rt,++Ct):Ct,Me=(rt,Ct)=>{const Xt=Ct||0;return{index:Xt,i:rt.i,j:rt.j,left:rt.left,right:rt.right,top:rt.top,bottom:rt.bottom,allDay:rt.allDay,sortedIndex:this._skipSortedIndex(Xt)?null:r++}},Ve=rt=>{ce.items=[Me(rt)],ce.left=rt.left,ce.right=rt.right,ce.top=rt.top,ce.bottom=rt.bottom,ce.allDay=rt.allDay},Je=rt=>{rt.forEach(Ct=>{t.push({index:Ct.index,count:X+1,i:Ct.i,j:Ct.j,sortedIndex:Ct.sortedIndex})})};for(i=0;i<e.length;i++)m=e[i],A=[],ce.items?this._isItemsCross(ce,m)?(ce.items.forEach(rt=>{this._isItemsCross(rt,m)&&A.push(rt.index)}),V=A.length?_e(A,0):0,ce.items.push(Me(m,V)),X=Math.max(V,X),ce.left=Math.min(ce.left,m.left),ce.right=Math.max(ce.right,m.right),ce.top=Math.min(ce.top,m.top),ce.bottom=Math.max(ce.bottom,m.bottom),ce.allDay=m.allDay):(Je(ce.items),ce={},Ve(m),X=0):Ve(m);return ce.items&&Je(ce.items),t.sort((rt,Ct)=>rt.i-Ct.i||rt.j-Ct.j)}_skipSortedIndex(e){return e>this._getMaxAppointmentCountPerCell()-1}_findIndexByKey(e,t,i,r,m){let A=0;for(let V=0,X=e.length;V<X;V++)if(e[V][t]===r&&e[V][i]===m){A=V;break}return A}_getExtendedPositionMap(e,t){let i=0;const r=[];for(let m=0,A=e.length;m<A;m++){const V=[];for(let X=0,ce=e[m].length;X<ce;X++)e[m][X].index=t[i].index,e[m][X].sortedIndex=t[i].sortedIndex,e[m][X].count=t[i++].count,V.push(e[m][X]),this._checkLongCompactAppointment(e[m][X],V);r.push(V)}return r}_checkLongCompactAppointment(e,t){return this._splitLongCompactAppointment(e,t),t}_splitLongCompactAppointment(e,t){const i=this._getMaxAppointmentCountPerCellByType(e.allDay);let r=0;if(void 0!==i&&e.index>i-1){e.isCompact=!0,r=this._getCompactAppointmentParts(e.width);for(let m=1;m<r;m++){const A=(0,_.X)(!0,{},e);A.left=this._getCompactLeftCoordinate(e.left,m),A.columnIndex+=m,A.sortedIndex=null,t.push(A)}}return t}_adjustDurationByDaylightDiff(e,t,i){const{viewOffset:r}=this.options,m=$s_addOffsets(t,[r]),A=$s_addOffsets(i,[r]),V=Aa.getDaylightOffset(m,A),X=this._needAdjustDuration(V)?this._calculateDurationByDaylightDiff(e,V):e;return X<=Math.abs(V)?e:X}_needAdjustDuration(e){return 0!==e}_calculateDurationByDaylightDiff(e,t){return e+t*AU("minute")}_getCollectorLeftOffset(e){if(e||!this.isApplyCompactAppointmentOffset())return 0;const t=this.getDropDownAppointmentWidth(this.intervalCount,e),i=this._isCompactTheme()?1:5;return this.cellWidth-t-i}_markAppointmentAsVirtual(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this._getMaxAppointmentCountPerCellByType(t);if(e.count-i>0){const{top:r,left:m}=e,A=this.isAdaptive||!t&&this.supportCompactDropDownAppointments();e.virtual={left:m+this._getCollectorLeftOffset(t),top:r,width:this.getDropDownAppointmentWidth(this.intervalCount,t),height:this.getDropDownAppointmentHeight(),index:this._generateAppointmentCollectorIndex(e,t),isAllDay:t,groupIndex:e.groupIndex,isCompact:A}}}isApplyCompactAppointmentOffset(){return this.supportCompactDropDownAppointments()}supportCompactDropDownAppointments(){return!0}_generateAppointmentCollectorIndex(e,t){let{groupIndex:i,rowIndex:r,columnIndex:m}=e;return`${i}-${r}-${m}-${t}`}_getMaxAppointmentCountPerCellByType(e){const t=this._getMaxAppointmentCountPerCell();return(0,C.Gv)(t)?e?t.allDay:t.simple:t}getDropDownAppointmentWidth(e,t){return this.getPositioningStrategy().getDropDownAppointmentWidth(e,t)}getDropDownAppointmentHeight(){return this.getPositioningStrategy().getDropDownAppointmentHeight()}getDropDownButtonAdaptiveSize(){return 28}getCollectorTopOffset(e){return this.getPositioningStrategy().getCollectorTopOffset(e)}getCollectorLeftOffset(){return this.getPositioningStrategy().getCollectorLeftOffset()}getAppointmentDataCalculator(){}getVerticalAppointmentHeight(e,t,i){let r=i;if((0,C.kf)(this.maxAppointmentsPerCell)){const m=this._getDynamicAppointmentCountPerCell(),V=Math.max(t,m.allDay||m);r=Math.min(V,i)}return e/r}_customizeCoordinates(e,t,i,r,m){const{index:A,count:V}=e,X=this.getVerticalAppointmentHeight(t,V,i),_e=e.top+A*X+r,{width:Me}=e,{left:Ve}=e;return e.isCompact&&(this.isAdaptive&&this._correctCollectorCoordinatesInAdaptive(e,m),this._markAppointmentAsVirtual(e,m)),{height:X,width:Me,top:_e,left:Ve,empty:this._isAppointmentEmpty(t,Me)}}_isAppointmentEmpty(e,t){return e<this._getAppointmentMinHeight()||t<this._getAppointmentMinWidth()}_calculateGeometryConfig(e){const t=this.maxAppointmentsPerCell,i=this._getOffsets(),r=this._getAppointmentDefaultOffset();let m=this._getAppointmentCount(t,e),A=this._getDefaultRatio(e,m),V=this._getMaxHeight();(0,C.kf)(m)||(m=e.count,A=(V-i.unlimited)/V);let X=(1-A)*V;return("auto"===t||(0,C.kf)(t))&&(A=1,V-=r,X=r),{height:A*V,appointmentCountPerCell:m,offset:X}}_getAppointmentCount(e,t){}_getDefaultRatio(e,t){}_getOffsets(){}_getMaxHeight(){}_needVerifyItemSize(){return!1}_getMaxAppointmentCountPerCell(){if(!this._maxAppointmentCountPerCell){const e=this.maxAppointmentsPerCell;let t;(0,C.kf)(e)&&(t=e),"auto"===e&&(t=this._getDynamicAppointmentCountPerCell()),"unlimited"===e&&(t=void 0),this._maxAppointmentCountPerCell=t}return this._maxAppointmentCountPerCell}_getDynamicAppointmentCountPerCell(){return this.getPositioningStrategy().getDynamicAppointmentCountPerCell()}allDaySupported(){return!1}_isCompactTheme(){return"compact"===((0,k.ss)()||"").split(".").pop()}_getAppointmentDefaultOffset(){return this.getPositioningStrategy().getAppointmentDefaultOffset()}_getAppointmentDefaultHeight(){return this._getAppointmentHeightByTheme()}_getAppointmentMinHeight(){return this._getAppointmentDefaultHeight()}_getAppointmentHeightByTheme(){return this._isCompactTheme()?18:20}_getAppointmentDefaultWidth(){return this.getPositioningStrategy()._getAppointmentDefaultWidth()}_getAppointmentMinWidth(){return this._getAppointmentDefaultWidth()}_needVerticalGroupBounds(e){return!1}_needHorizontalGroupBounds(){return!1}getAppointmentDurationInMs(e,t,i){if(i){const Xt=t.getTime()-e.getTime();return Math.ceil(Xt/AU("day"))*this.visibleDayDuration}const r=AU("hour"),m=Tn.A.trimTime(e),A=Tn.A.trimTime(t),X=(A-m)/AU("day")+1,ce=this.endDayHour-this.startDayHour,_e=ce*X,Ve=Math.max(0,(e-m)/r-this.startDayHour),Je=Math.max(0,(t-A)/r-this.startDayHour);return(_e-(Ve+Math.max(0,ce-Je)))*r}getPositionShift(e,t){return{top:e*this.cellHeight,left:0,cellPosition:0}}shiftAppointmentByViewOffset(e){const{viewOffset:t}=this.options,i=this.dataAccessors.expr.startDateExpr,r=this.dataAccessors.expr.endDateExpr;let m=new Date(ll_getField(this.dataAccessors,"startDate",e));m=$s_addOffsets(m,[-t]);let A=new Date(ll_getField(this.dataAccessors,"endDate",e));return A=$s_addOffsets(A,[-t]),(0,Lo.A)({},e,{[i]:m,[r]:A})}},e$=Tn.A.dateToMilliseconds,U7=class foe extends qW{_needVerifyItemSize(){return!0}calculateAppointmentWidth(e,t){const i=this.cellWidth||this.getAppointmentMinSize(),r=ll_getField(this.dataAccessors,"allDay",e),{startDate:m,endDate:A,normalizedEndDate:V}=t.info.appointment;let X=this.getAppointmentDurationInMs(m,V,r);X=this._adjustDurationByDaylightDiff(X,m,V);const ce=this.cellDurationInMinutes*e$("minute"),Me=(X-V5(m,A,e.allDay,this.viewDataProvider)*e$("hour"))/ce;return this.cropAppointmentWidth(Me*i,i)}_needAdjustDuration(e){return e<0}getAppointmentGeometry(e){const t=this._customizeAppointmentGeometry(e);return super.getAppointmentGeometry(t)}_customizeAppointmentGeometry(e){const t=this._calculateGeometryConfig(e);return this._customizeCoordinates(e,t.height,t.appointmentCountPerCell,t.offset)}_getOffsets(){return{unlimited:0,auto:0}}_getCompactLeftCoordinate(e,t){return e+(this.cellWidth||this.getAppointmentMinSize())*t}_getMaxHeight(){return this.cellHeight||this.getAppointmentMinSize()}_getAppointmentCount(e,t){return this._getMaxAppointmentCountPerCellByType(!1)}_getAppointmentDefaultHeight(){return 60}_getAppointmentMinHeight(){return 35}_sortCondition(e,t){return this._columnCondition(e,t)}_getOrientation(){return["left","right","top"]}getDropDownAppointmentWidth(e,t){return this.cellWidth-4}getDeltaTime(e,t){let i=0;const r=e.width-t.width;return i=e$("minute")*Math.round(r/this.cellWidth*this.cellDurationInMinutes),i}isAllDay(e){return ll_getField(this.dataAccessors,"allDay",e)}_isItemsCross(e,t){const i=this._getOrientation();return this._checkItemsCrossing(e,t,i)}getPositionShift(e){const t=super.getPositionShift(e);let i=this.cellWidth*e;return this.rtlEnabled&&(i*=-1),i+=t.left,{top:0,left:i,cellPosition:i}}supportCompactDropDownAppointments(){return!1}},z7=n=>{const{dateTableCellsMeta:e}=n,t=e?.length;if(!t)return{width:0,height:0};const r=e[t>1?1:0][0];return{width:r.width,height:r.height}},t$=n=>z7(n).height,IU=n=>z7(n).width,mV=(n,e,t)=>{if(!n)return 0;if(e){const{dateTableCellsMeta:r}=t;return r?.length?r[0][0].height:0}const{allDayPanelCellsMeta:i}=t;return null!=i&&i.length?i[0].height:0},n$=(n,e,t,i)=>((n,e,t,i)=>{const{dateTableCellsMeta:r}=i,m=r[0];if(!m)return 0;const{columnIndex:A}=e.getLastGroupCellPosition(n),V=m[A];return V?t?V.left:V.left+V.width:0})(n||0,e,t,i);class voe{get viewDataProvider(){return this.options.viewDataProvider}get rtlEnabled(){return this.options.rtlEnabled}get isGroupedByDate(){return this.options.isGroupedByDate}get groupCount(){return this.options.groupCount}get DOMMetaData(){return this.options.getDOMMetaDataCallback()}constructor(e){this.options=e,this.groupStrategy=this.options.isVerticalGrouping?new G7(this.options):new Coe(this.options)}getHorizontalMax(e){const t=i=>n$(i,this.viewDataProvider,this.rtlEnabled,this.DOMMetaData);if(this.isGroupedByDate){const i=this.viewDataProvider.getViewPortGroupCount();return Math.max(t(e),t(i-1))}return t(e)}getResizableStep(){const e=IU(this.DOMMetaData);return this.isGroupedByDate?this.groupCount*e:e}getVerticalMax(e){return this.groupStrategy.getVerticalMax(e)}getOffsetByAllDayPanel(e){return this.groupStrategy.getOffsetByAllDayPanel(e)}getGroupTop(e){return this.groupStrategy.getGroupTop(e)}}class G7{constructor(e){this.options=e}get viewDataProvider(){return this.options.viewDataProvider}get isGroupedByDate(){return this.options.isGroupedByDate}get rtlEnabled(){return this.options.rtlEnabled}get groupCount(){return this.options.groupCount}get DOMMetaData(){return this.options.getDOMMetaDataCallback()}getOffsetByAllDayPanel(e){let{groupIndex:t,supportAllDayRow:i,showAllDayPanel:r}=e,m=0;return i&&r&&(m=mV(r,!0,this.DOMMetaData)*(t+1)),m}getVerticalMax(e){let t=this._getMaxAllowedVerticalPosition((0,Lo.A)({},e,{viewDataProvider:this.viewDataProvider,rtlEnabled:this.rtlEnabled,DOMMetaData:this.DOMMetaData}));return t+=this.getOffsetByAllDayPanel(e),t}getGroupTop(e){let{groupIndex:t,showAllDayPanel:i,isGroupedAllDayPanel:r}=e;const m=this.viewDataProvider.getRowCountInGroup(t);return this._getMaxAllowedVerticalPosition({groupIndex:t,viewDataProvider:this.viewDataProvider,showAllDayPanel:i,isGroupedAllDayPanel:r,isVerticalGrouping:!0,DOMMetaData:this.DOMMetaData})-t$(this.DOMMetaData)*m}_getAllDayHeight(e){return mV(e,!0,this.DOMMetaData)}_getMaxAllowedVerticalPosition(e){let{groupIndex:t,showAllDayPanel:i,isGroupedAllDayPanel:r}=e;const{rowIndex:m}=this.viewDataProvider.getLastGroupCellPosition(t),{dateTableCellsMeta:A}=this.DOMMetaData,V=A[m];if(!V)return 0;let X=V[0].top+V[0].height;return r&&(X-=(t+1)*this._getAllDayHeight(i)),X}}class Coe extends G7{getOffsetByAllDayPanel(){return 0}getVerticalMax(e){const{isVirtualScrolling:t,groupIndex:i}=e;return this._getMaxAllowedVerticalPosition((0,Lo.A)({},e,{groupIndex:t?i:0}))}getGroupTop(){return 0}_getAllDayHeight(e){return mV(e,!1,this.DOMMetaData)}}const W7=class yoe extends U7{calculateAppointmentWidth(e,t){const{startDate:i,normalizedEndDate:r}=t.info.appointment,m=Tn.A.trimTime(i),A=this.cellWidth||this.getAppointmentMinSize(),V=Math.ceil(this._getDurationInDays(m,r));let X=this.cropAppointmentWidth(V*A,A);return this.isVirtualScrolling&&(X-=this.viewDataProvider.getSkippedDaysCount(t.groupIndex,m,r,V)*A),X}_columnCondition(e,t){const i=this._getConditions(e,t);return i.rowCondition||i.columnCondition||i.cellPositionCondition}_getDurationInDays(e,t){return this._adjustDurationByDaylightDiff(t.getTime()-e.getTime(),e,t)/Tn.A.dateToMilliseconds("day")||1}getDeltaTime(e,t){return 864e5*this._getDeltaWidth(e,t)}isAllDay(){return!1}createTaskPositionMap(e,t){return t||j5(e,this.dataAccessors),super.createTaskPositionMap(e)}_getSortedPositions(e,t){let i=super._getSortedPositions(e);return t||(i=(0,Aw.A)(i).sortBy("top").thenBy("left").thenBy("cellPosition").thenBy("i").toArray()),i}needCorrectAppointmentDates(){return!1}getPositionShift(e){return{top:0,left:0,cellPosition:e*this.cellWidth}}},boe=Tn.A.dateToMilliseconds,PU=Tn.A.dateToMilliseconds,$7=class Eoe extends qW{getDeltaTime(e,t,i){let r=0;if(this.isAllDay(i))r=this._getDeltaWidth(e,t)*PU("day");else{const m=e.height-t.height;r=PU("minute")*Math.round(m/this.cellHeight*this.cellDurationInMinutes)}return r}_correctCollectorCoordinatesInAdaptive(e,t){if(t)super._correctCollectorCoordinatesInAdaptive(e,t);else if(0===this._getMaxAppointmentCountPerCellByType()){const{cellHeight:i}=this,{cellWidth:r}=this;e.top+=(i-this.getDropDownButtonAdaptiveSize())/2,e.left+=(r-this.getDropDownButtonAdaptiveSize())/2}}getAppointmentGeometry(e){let t=null;return t=e.allDay?this._getAllDayAppointmentGeometry(e):this.isAdaptive&&e.isCompact?this._getAdaptiveGeometry(e):this._getVerticalAppointmentGeometry(e),super.getAppointmentGeometry(t)}_getAdaptiveGeometry(e){const t=this._calculateGeometryConfig(e);return this._customizeCoordinates(e,t.height,t.appointmentCountPerCell,t.offset)}_getItemPosition(e){const t=this.isAllDay(e);if(t)return super._getItemPosition(e);const i=super.shiftAppointmentByViewOffset(e),r=hc(i,this.dataAccessors,this.timeZoneCalculator),m=!!r.recurrenceRule,A=r.calculateStartDate("toGrid"),V=r.calculateEndDate("toGrid"),X=V-A,ce=this.options.startViewDate<A,_e=!Aa.isSameAppointmentDates(A,V),Me=this.generateAppointmentSettings(i);let Ve=[];for(let Je=0;Je<Me.length;Je++){const rt=Me[Je],Ct=this.calculateAppointmentHeight(i,rt),Xt=this.calculateAppointmentWidth(i,rt);let On=Ct,Fn=null,oi=[];const Yt=rt.vMax;if(this._isMultiViewAppointment(rt,Ct)||_e&&!m){(Tn.A.trimTime(A)<=Tn.A.trimTime(rt.info.appointment.startDate)||m)&&(On=this._reduceMultiDayAppointment(Ct,{top:rt.top,bottom:Yt}),oi=this._getAppointmentParts({sourceAppointmentHeight:Ct,reducedHeight:On,width:Xt},rt));const{startDate:qn,normalizedEndDate:ii}=rt.info.appointment;Fn=ii-qn<X?ce?"head":"body":ce?"head":"tail"}(0,_.X)(rt,{height:On,width:Xt,allDay:t,appointmentReduced:Fn}),Ve=this._getAppointmentPartsPosition(oi,rt,Ve)}return Ve}_isMultiViewAppointment(e,t){let{vMax:i,top:r}=e;return(0,ri.ar)(t,2)>(0,ri.ar)(i-r,2)}_reduceMultiDayAppointment(e,t){return Math.min(e,t.bottom-Math.floor(t.top))}_getGroupHeight(){return this.cellHeight*this.rowCount}_getGroupTopOffset(e){const{groupIndex:t}=e,i=Math.max(0,this.positionHelper.getGroupTop({groupIndex:t,showAllDayPanel:this.showAllDayPanel,isGroupedAllDayPanel:this.isGroupedAllDayPanel})),r=this.positionHelper.getOffsetByAllDayPanel({groupIndex:t,supportAllDayRow:this.allDaySupported(),showAllDayPanel:this.showAllDayPanel});return e.top-i-r}_getTailHeight(e,t){if(!this.isVirtualScrolling)return e.sourceAppointmentHeight-e.reducedHeight;const i=this._getGroupTopOffset(t),{sourceAppointmentHeight:r}=e;return i+r-this._getGroupHeight()}_getAppointmentParts(e,t){const{width:i}=e,r=[];let m=Math.max(0,this.positionHelper.getGroupTop({groupIndex:t.groupIndex,showAllDayPanel:this.showAllDayPanel,isGroupedAllDayPanel:this.isGroupedAllDayPanel}));const A=this.isGroupedByDate?this.groupCount:1,V=this.cellWidth*A;m+=this.positionHelper.getOffsetByAllDayPanel({groupIndex:t.groupIndex,supportAllDayRow:this.allDaySupported(),showAllDayPanel:this.showAllDayPanel});const ce=this.getAppointmentMinSize(),{vMax:_e,hMax:Me}=t,Ve=this.options.endViewDate>t.info.appointment.endDate;let Je=Math.round(t.left+V),rt=this._getTailHeight(e,t),{columnIndex:Ct}=t;for(;rt>0&&Je<Me;){rt=Math.max(ce,rt),Ct+=A;const Xt=Math.min(rt,_e);r.push((0,Lo.A)({},t,{top:m,left:Je,height:Xt,width:i,appointmentReduced:"body",rowIndex:0,columnIndex:Ct})),Je+=V,rt-=_e}return Ve&&r.length>0&&(r[r.length-1].appointmentReduced="tail"),r}_getMinuteHeight(){return this.cellHeight/this.cellDurationInMinutes}_getCompactLeftCoordinate(e,t){return e+(1+(this.cellWidth||this.getAppointmentMinSize()))*t}_getVerticalAppointmentGeometry(e){const t=this._calculateVerticalGeometryConfig(e);return this._customizeVerticalCoordinates(e,t.width,t.appointmentCountPerCell,t.offset)}_customizeVerticalCoordinates(e,t,i,r,m){const A=Math.max(t/i,t/e.count),{height:V}=e,X=e.left+e.index*A,{top:ce}=e;return e.isCompact&&this._markAppointmentAsVirtual(e,m),{height:V,width:A,top:ce,left:X,empty:this._isAppointmentEmpty(V,t)}}_calculateVerticalGeometryConfig(e){const t=this.maxAppointmentsPerCell,i=this._getOffsets(),r=this._getAppointmentDefaultOffset();let m=this._getAppointmentCount(t,e),A=this._getDefaultRatio(e,m),V=this._getMaxWidth();m||(m=e.count,A=(V-i.unlimited)/V);let X=(1-A)*V;return("auto"===t||(0,C.kf)(t))&&(A=1,V-=r,X=0),{width:A*V,appointmentCountPerCell:m,offset:X}}_getMaxWidth(){return this.cellWidth}isAllDay(e){return $k(hc(e,this.dataAccessors,this.timeZoneCalculator),this.allDayPanelMode)}_getAppointmentMaxWidth(){return this.cellWidth-this._getAppointmentDefaultOffset()}calculateAppointmentWidth(e,t){if(!this.isAllDay(e))return 0;const{startDate:i,endDate:r,normalizedEndDate:m}=t.info.appointment,A=Tn.A.trimTime(i),V=this.cellWidth||this.getAppointmentMinSize(),X=(m.getTime()-A.getTime())/PU("hour"),ce=V5(A,r,e.allDay,this.viewDataProvider);let _e=Math.ceil((X-ce)/24)*V;return _e=this.cropAppointmentWidth(_e,V),_e}calculateAppointmentHeight(e,t){if(this.isAllDay(e))return 0;const{startDate:i,normalizedEndDate:r}=t.info.appointment,m=ll_getField(this.dataAccessors,"allDay",e),A=this.getAppointmentDurationInMs(i,r,m);return this._adjustDurationByDaylightDiff(A,i,r)/PU("minute")*this._getMinuteHeight()}getDirection(){return"vertical"}_sortCondition(e,t){return!!e.allDay!=!!t.allDay?e.allDay?1:-1:"vertical"===this.groupOrientation&&e.allDay&&t.allDay?this._columnCondition(e,t):this._rowCondition(e,t)}allDaySupported(){return!0}_getAllDayAppointmentGeometry(e){const t=this._calculateGeometryConfig(e);return this._customizeCoordinates(e,t.height,t.appointmentCountPerCell,t.offset,!0)}_calculateGeometryConfig(e){(!this.allowResizing||!this.allowAllDayResizing)&&(e.skipResizing=!0);const t=super._calculateGeometryConfig(e),i=Math.min(t.appointmentCountPerCell,this._getDynamicAppointmentCountPerCell().allDay);return e.allDay&&e.count<=i&&(t.offset=0),t}_getAppointmentCount(e,t){return"auto"===e||1!==t.count||(0,C.kf)(e)?this._getMaxAppointmentCountPerCellByType(t.allDay):t.count}_getDefaultRatio(e,t){return e.count>this.appointmentCountPerCell?.65:1}_getOffsets(){return{unlimited:5,auto:20}}_getMaxHeight(){return this.allDayHeight||this.getAppointmentMinSize()}_needVerticalGroupBounds(e){return!e}_needHorizontalGroupBounds(){return!1}getPositionShift(e,t){return!t&&this.isAdaptive&&0===this._getMaxAppointmentCountPerCellByType(t)?{top:0,left:0,cellPosition:0}:super.getPositionShift(e,t)}},woe={horizontal:U7,horizontalMonth:class xoe extends W7{get endViewDate(){return this.options.endViewDate}get adaptivityEnabled(){return this.options.adaptivityEnabled}get DOMMetaData(){return this.options.DOMMetaData}_getLeftPosition(e){const t=this.getGroupWidth(e.groupIndex);return this._calculateMultiWeekAppointmentLeftOffset(e.hMax,t)}_getChunkCount(e,t,i,r){const{groupIndex:m,info:{appointment:{startDate:A}}}=r,X=Math.ceil((e-t+i)/i),ce=this._tryGetRowIndexInView(A);if(void 0!==ce){const Me=this.viewDataProvider.getRowCountInGroup(m)-ce;return X<=Me?X:Me}return X}_tryGetRowIndexInView(e){var t;const i=this.viewDataProvider.getColumnsCount();if((null===(t=this.options.dataRange)||void 0===t?void 0:t.length)<1||!i)return;const[r]=this.options.dateRange,m=boe("day"),A=e.getTime()-r.getTime();return Math.floor(A/m/i)}_getChunkWidths(e,t,i){const r=e.reducedWidth,m=Math.floor(e.sourceAppointmentWidth);return[r,m,m-r]}_getTailChunkSettings(e,t,i){const r=e%t||t;return[r,this.rtlEnabled?i+(t-r):i]}_getAppointmentParts(e,t){const i=[],r=Math.round(this.getGroupWidth(t.groupIndex)),[m,A,V]=this._getChunkWidths(e,t,r),X=this._getLeftPosition(t),{endDate:ce}=t.info.appointment,_e=this.endViewDate>ce,Me=this._getChunkCount(A,m,r,t),[Ve,Je]=this._getTailChunkSettings(V,r,X);for(let rt=1;rt<Me;rt++){const Xt=_e&&rt===Me-1;i.push((0,Lo.A)({},t,{top:t.top+this.cellHeight*rt,left:Xt?Je:X,height:e.height,width:Xt?Ve:r,appointmentReduced:Xt?"tail":"body",rowIndex:++t.rowIndex,columnIndex:0}))}return i}_calculateMultiWeekAppointmentLeftOffset(e,t){return this.rtlEnabled?e:e-t}getGroupWidth(e){return((n,e,t)=>{const{isVirtualScrolling:i,rtlEnabled:r,DOMMetaData:m}=t,A=IU(m);let V=e.getCellCount(t)*A;i&&(V=e.groupedDataMap.dateTableGroupedMap[n][0].length*A);const X=n$(n,e,r,m),ce=X[n];return ce&&(V=r?ce-X[n+1]:0===n?ce:ce-X[n-1]),V})(e,this.viewDataProvider,{intervalCount:this.options.intervalCount,currentDate:this.options.currentDate,viewType:this.options.viewType,hoursInterval:this.options.hoursInterval,startDayHour:this.options.startDayHour,endDayHour:this.options.endDayHour,isVirtualScrolling:this.isVirtualScrolling,rtlEnabled:this.rtlEnabled,DOMMetaData:this.DOMMetaData})}_getAppointmentDefaultHeight(){return this._getAppointmentHeightByTheme()}_getAppointmentMinHeight(){return this._getAppointmentDefaultHeight()}createTaskPositionMap(e){return super.createTaskPositionMap(e,!0)}_getSortedPositions(e){return super._getSortedPositions(e,!0)}_getDefaultRatio(){return.6}_getOffsets(){return{unlimited:26,auto:30}}getDropDownAppointmentWidth(e,t){return this.adaptivityEnabled?this.getDropDownButtonAdaptiveSize():this.cellWidth-(e>1?60:36)}needCorrectAppointmentDates(){return!1}_needVerticalGroupBounds(){return!1}_needHorizontalGroupBounds(){return!0}},horizontalMonthLine:W7,vertical:$7,week:class Ooe extends $7{isApplyCompactAppointmentOffset(){return(!this.isAdaptive||0!==this._getMaxAppointmentCountPerCellByType())&&this.supportCompactDropDownAppointments()}},agenda:class poe extends qW{get instance(){return this.options.instance}get agendaDuration(){return this.options.agendaDuration}getAppointmentMinSize(){}getDeltaTime(){}keepAppointmentSettings(){return!0}getAppointmentGeometry(e){return e}groupAppointmentByResources(e){const t=this.instance._getCurrentViewOption("groups");return function(n,e){let i={0:e};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).length&&n.loadedResources.length&&(i=((n,e,t)=>{const i=fV(t),r={};return e.forEach(m=>{const A=KW((V,X)=>SU(n.dataAccessors,V,X),i,m);for(let V=0;V<A.length;V++)r[A[V]]||(r[A[V]]=[]),r[A[V]].push((0,xe.tm)({},m,!0))}),r})(n,e,n.loadedResources));let r=0;n.loadedResources.forEach((m,A)=>{A?r*=m.items.length:r=m.items.length});for(let m=0;m<r;m++){const A=m.toString();i[A]||(i[A]=[])}return i}({loadedResources:this.options.loadedResources,resources:this.options.resources,dataAccessors:this.dataAccessors.resources},e,t)}createTaskPositionMap(e){let t,i;if(this.calculateRows(e,this.agendaDuration,this.currentDate),e.length){t=this.instance.fire("getAgendaVerticalStepHeight"),i=this.groupAppointmentByResources(e);let A=[];(0,w.__)(i,(V,X)=>{let ce=[],_e=[];(0,w.__)(X,(Me,Ve)=>{const Je=this.instance.getAppointmentsInstance()._processRecurrenceAppointment(Ve,Me);let rt=null;Je.indexes.length||(rt=this.instance.getAppointmentsInstance()._processLongAppointment(Ve),ce=ce.concat(rt.parts)),ce=ce.concat(Je.parts),_e=_e.concat(Je.indexes)}),this.instance.getAppointmentsInstance()._reduceRecurrenceAppointments(_e,X),this.instance.getAppointmentsInstance()._combineAppointments(X,ce),A=A.concat(X)}),Array.prototype.splice.apply(e,[0,e.length].concat(A))}const r=[];let m=0;return e.forEach((A,V)=>{r.push([{height:t,width:"100%",sortedIndex:m++,groupIndex:this._calculateGroupIndex(V,i),agendaSettings:A.settings}]),delete A.settings}),r}_calculateGroupIndex(e,t){let i,r=0;for(const m in t){const A=t[m].length;if(e>=r&&e<r+A){i=Number(m);break}r+=A}return i}_getDeltaWidth(e,t){}_getAppointmentMaxWidth(){return this.cellWidth}_needVerifyItemSize(){return!1}_getAppointmentParts(e,t){}_reduceMultiWeekAppointment(){}calculateAppointmentHeight(){return 0}calculateAppointmentWidth(){return 0}isAppointmentGreaterThan(e,t){}isAllDay(){return!1}_sortCondition(){}_rowCondition(e,t){}_columnCondition(e,t){}_findIndexByKey(e,t,i,r,m){}_markAppointmentAsVirtual(){}getDropDownAppointmentWidth(){}getCollectorLeftOffset(){}getCollectorTopOffset(){}replaceWrongAppointmentEndDate(e,t,i){const r=hc(e,this.dataAccessors,this.timeZoneCalculator);$5(r,t,i,this.cellDuration,this.dataAccessors)}calculateRows(e,t,i,r){this._rows=[],i=Tn.A.trimTime(new Date(i));const m=this.groupAppointmentByResources(e);return(0,w.__)(m,(A,V)=>{const X=[],ce={indexes:[],parts:[]};if(!V.length)return this._rows.push([]),!0;(0,w.__)(V,(Me,Ve)=>{const Je=ll_getField(this.dataAccessors,"startDate",Ve),rt=ll_getField(this.dataAccessors,"endDate",Ve);this.replaceWrongAppointmentEndDate(Ve,Je,rt),r&&delete Ve.settings;const Ct=this.instance.getAppointmentsInstance()._processRecurrenceAppointment(Ve,Me,!1);ce.parts=ce.parts.concat(Ct.parts),ce.indexes=ce.indexes.concat(Ct.indexes)}),this.instance.getAppointmentsInstance()._reduceRecurrenceAppointments(ce.indexes,V),V.push(...ce.parts);const _e=V.length;for(let Me=0;Me<t;Me++){const Ve=new Date(i);Ve.setMilliseconds(Ve.getMilliseconds()+864e5*Me),void 0===X[Me]&&(X[Me]=0);for(let Je=0;Je<_e;Je++){const rt=V[Je].settings||V[Je],Ct=hc(V[Je],this.dataAccessors,this.timeZoneCalculator),Xt=HW(Ct),On=ll_getField(this.dataAccessors,"recurrenceRule",V[Je]);(this.instance.fire("dayHasAppointment",Ve,rt,!0)||!On&&Xt&&this.instance.fire("dayHasAppointment",Ve,V[Je],!0))&&(X[Me]+=1)}}this._rows.push(X)}),this._rows}_iterateRow(e,t,i){for(let r=0;r<e.length;r++)if(t.counter+=e[r],t.counter>=i){t.indexInRow=r;break}}getDateByIndex(e,t,i){const r={counter:0,indexInRow:0};e++;for(let m=0;m<t.length&&(this._iterateRow(t[m],r,e),!r.indexInRow);m++);return new Date(new Date(i).setDate(i.getDate()+r.indexInRow))}getAppointmentDataCalculator(){return(e,t)=>{const i=e.index(),r=this.instance.getStartViewDate(),m=this.getDateByIndex(i,this._rows,r),A=new Date(t);return{startDate:new Date(m.setHours(A.getHours(),A.getMinutes(),A.getSeconds(),A.getMilliseconds()))}}}}};class Toe{initRenderingStrategy(e){this.renderingStrategy=new(0,woe[e.appointmentRenderingStrategyName])(e)}generate(e,t){const{viewOffset:i}=t,r=e?e.slice():[];this.initRenderingStrategy(t);const A=this.getRenderingStrategy().createTaskPositionMap(r),V=this.postProcess(r,A);return{positionMap:A,viewModel:this.unshiftViewModelAppointmentsByViewOffset(V,i)}}postProcess(e,t){const i=this.getRenderingStrategy();return e.map((r,m)=>{i.keepAppointmentSettings()||delete r.settings;const A=t[m];A.forEach(X=>{X.direction="vertical"!==i.getDirection()||X.allDay?"horizontal":"vertical"});return{itemData:r,settings:A,needRepaint:!0,needRemove:!1}})}makeRenovatedViewModels(e,t,i){const r=this.getRenderingStrategy(),m=[],A=[],V=[],X=t&&!i;e.forEach(Me=>{let{itemData:Ve,settings:Je}=Me;Je.forEach(rt=>{const Ct=this.prepareViewModel(rt,r,Ve);rt.isCompact?V.push({compactViewModel:rt.virtual,appointmentViewModel:Ct}):rt.allDay&&X?A.push(Ct):m.push(Ct)})});const ce=this.prepareCompactViewModels(V,t);return(0,Lo.A)({allDay:A,regular:m},ce)}prepareViewModel(e,t,i){const r=t.getAppointmentGeometry(e);return{key:Ate(r),appointment:i,geometry:(0,Lo.A)({},r,{leftVirtualWidth:e.leftVirtualWidth,topVirtualHeight:e.topVirtualHeight}),info:(0,Lo.A)({},e.info,{allDay:e.allDay,direction:e.direction,appointmentReduced:e.appointmentReduced,groupIndex:e.groupIndex})}}getCompactViewModelFrame(e){return{isAllDay:!!e.isAllDay,isCompact:e.isCompact,groupIndex:e.groupIndex,geometry:{left:e.left,top:e.top,width:e.width,height:e.height},items:{colors:[],data:[],settings:[]}}}prepareCompactViewModels(e,t){const i={},r={};e.forEach(X=>{let{compactViewModel:ce,appointmentViewModel:_e}=X;const{index:Me,isAllDay:Ve}=ce,Je=Ve&&t?r:i;Je[Me]||(Je[Me]=this.getCompactViewModelFrame(ce));const{settings:rt,data:Ct,colors:Xt}=Je[Me].items;rt.push(_e),Ct.push(_e.appointment),Xt.push(_e.info.resourceColor)});const m=X=>Object.keys(X).map(ce=>(0,Lo.A)({key:ce},X[ce]));return{allDayCompact:m(r),regularCompact:m(i)}}getRenderingStrategy(){return this.renderingStrategy}unshiftViewModelAppointmentsByViewOffset(e,t){const i=new Set;for(const m of e)for(const A of m.settings??[]){var r;const V=null==A||null===(r=A.info)||void 0===r?void 0:r.appointment;V&&!i.has(V)&&(V.startDate=$s_addOffsets(V.startDate,[t]),V.endDate=$s_addOffsets(V.endDate,[t]),V.normalizedEndDate=$s_addOffsets(V.normalizedEndDate,[t]),i.add(V))}return e}}const Doe=Tn.A.dateToMilliseconds,Ioe=class Aoe{constructor(e){this.instance=e,this.appointmentViewModel=new Toe}get appointmentRenderingStrategyName(){return(n=>{const{renderingStrategy:e}={day:{renderingStrategy:"vertical"},week:{renderingStrategy:"week"},workWeek:{renderingStrategy:"week"},month:{renderingStrategy:"horizontalMonth"},timelineDay:{renderingStrategy:"horizontal"},timelineWeek:{renderingStrategy:"horizontal"},timelineWorkWeek:{renderingStrategy:"horizontal"},timelineMonth:{renderingStrategy:"horizontalMonthLine"},agenda:{renderingStrategy:"agenda"}}[n];return e})(this.instance.currentViewType)}getCellDimensions(e){if(this.instance._workSpace)return{width:this.instance._workSpace.getCellWidth(),height:this.instance._workSpace.getCellHeight(),allDayHeight:this.instance._workSpace.getAllDayHeight()}}_getRenderingStrategyOptions(){const e=this.instance.getWorkSpace(),{virtualScrollingDispatcher:t}=this.instance.getWorkSpace(),{cellCountInsideLeftVirtualCell:i,cellCountInsideTopVirtualRow:r}=t,m=HS(this.instance.option("loadedResources")),A=e.getDOMElementsMetaData(),V=mV(e.option("showAllDayPanel"),e._isVerticalGroupedWorkSpace(),A),X=e._getRowCount(),{positionHelper:ce,viewDataProvider:_e}=e,Me=_e.getVisibleDayDuration(e.option("startDayHour"),e.option("endDayHour"),e.option("hoursInterval")),Ve=R5(e.type,e.option("startDayHour"),e.option("endDayHour"),e.option("hoursInterval"));return{resources:this.instance.option("resources"),loadedResources:this.instance.option("loadedResources"),getAppointmentColor:this.instance.createGetAppointmentColor(),dataAccessors:this.instance._dataAccessors,appointmentRenderingStrategyName:this.appointmentRenderingStrategyName,adaptivityEnabled:this.instance.option("adaptivityEnabled"),rtlEnabled:this.instance.option("rtlEnabled"),startDayHour:this.instance._getCurrentViewOption("startDayHour"),endDayHour:this.instance._getCurrentViewOption("endDayHour"),viewOffset:this.instance._getCurrentViewOption("offset")*Doe("minute"),maxAppointmentsPerCell:this.instance._getCurrentViewOption("maxAppointmentsPerCell"),currentDate:this.instance.option("currentDate"),isVirtualScrolling:this.instance.isVirtualScrolling(),leftVirtualCellCount:i,topVirtualCellCount:r,intervalCount:e.option("intervalCount"),hoursInterval:e.option("hoursInterval"),showAllDayPanel:e.option("showAllDayPanel"),isGroupedAllDayPanel:e.isGroupedAllDayPanel(),groups:this.instance._getCurrentViewOption("groups"),groupCount:m,rowCount:X,appointmentCountPerCell:this.instance.option("_appointmentCountPerCell"),appointmentOffset:this.instance.option("_appointmentOffset"),allowResizing:this.instance._allowResizing(),allowAllDayResizing:this.instance._allowAllDayResizing(),startViewDate:e.getStartViewDate(),groupOrientation:e._getRealGroupOrientation(),cellWidth:IU(A),cellHeight:t$(A),allDayHeight:V,resizableStep:ce.getResizableStep(),visibleDayDuration:Me,allDayPanelMode:this.instance._getCurrentViewOption("allDayPanelMode"),timeZoneCalculator:this.instance.timeZoneCalculator,timeZone:this.instance.option("timeZone"),firstDayOfWeek:this.instance.getFirstDayOfWeek(),viewStartDayHour:this.instance._getCurrentViewOption("startDayHour"),viewEndDayHour:this.instance._getCurrentViewOption("endDayHour"),viewType:e.type,endViewDate:e.getEndViewDate(),positionHelper:ce,isGroupedByDate:e.isGroupedByDate(),cellDuration:Ve,cellDurationInMinutes:e.option("cellDuration"),viewDataProvider:e.viewDataProvider,supportAllDayRow:e.supportAllDayRow(),dateRange:e.getDateRange(),intervalDuration:e.getIntervalDuration(),allDayIntervalDuration:e.getIntervalDuration(!0),isVerticalGroupOrientation:e.isVerticalOrientation(),DOMMetaData:A,instance:this.instance,agendaDuration:e.option("agendaDuration")}}createAppointmentsMap(e){const t=this._getRenderingStrategyOptions(),{viewModel:i,positionMap:r}=this.appointmentViewModel.generate(e,t);return this._positionMap=r,i}_isDataChanged(e){const{appointmentDataProvider:t}=this.instance;return t.getUpdatedAppointment()===e||t.getUpdatedAppointmentKeys().some(r=>e[r.key]===r.value)}_isAppointmentShouldAppear(e,t){return e.needRepaint&&t.needRemove}_isSettingChanged(e,t){if(e.length!==t.length)return!0;const i=(r,m)=>{const A=r[m];return(0,Lo.A)({},A,{columnIndex:A.columnIndex+(A.leftVirtualCellCount||0),rowIndex:A.rowIndex+(A.topVirtualCellCount||0),positionByMap:void 0,topVirtualCellCount:void 0,leftVirtualCellCount:void 0,leftVirtualWidth:void 0,topVirtualHeight:void 0,hMax:A.reduced?A.hMax:void 0,vMax:A.reduced?A.vMax:void 0,info:{}})};for(let r=0;r<e.length;r++){const m=i(e,r),A=i(t,r);if(A&&(A.sortedIndex=m.sortedIndex),!(0,h.RL)(m,A))return!0}return!1}_getAssociatedSourceAppointment(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(r.itemData===e.itemData)return r}return null}_getDeletedAppointments(e,t){const i=[];for(let r=0;r<t.length;r++){const m=t[r];this._getAssociatedSourceAppointment(m,e)||(m.needRemove=!0,i.push(m))}return i}getRepaintedAppointments(e,t){return 0===t.length||"agenda"===this.appointmentRenderingStrategyName?e:(e.forEach(i=>{const r=this._getAssociatedSourceAppointment(i,t);if(r){const m=this._isDataChanged(i.itemData),A=this._isSettingChanged(i.settings,r.settings),V=this._isAppointmentShouldAppear(i,r);i.needRepaint=m||A||V}}),e.concat(this._getDeletedAppointments(e,t)))}getRenderingStrategyInstance(){if(!this.appointmentViewModel.getRenderingStrategy()){const t=this._getRenderingStrategyOptions();this.appointmentViewModel.initRenderingStrategy(t)}return this.appointmentViewModel.getRenderingStrategy()}};var MU=M(5645);class j7{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];this.appointment=e,this.targetedAppointment=t,this.color=i,this.settings=r}}const i$="dx-scheduler-appointment-collector",Poe=`${i$}-compact`,Moe=`${i$}-content`;class Roe{constructor(e){this.instance=e,this.elements=[]}render(e){const{isCompact:t,items:i,buttonColor:r}=e,m=this._createTemplate(i.data.length,t),V=this._createCompactButton(m,e).$element();return this._makeBackgroundColor(V,i.colors,r),this._makeBackgroundDarker(V),this.elements.push(V),V.data("items",this._createTooltipInfos(i)),V}clear(){this.elements.forEach(e=>{e.detach(),e.remove()}),this.elements=[]}_createTooltipInfos(e){return e.data.map((t,i)=>{var r;const m=hc(t,this.instance._dataAccessors,this.instance.timeZoneCalculator).clone();if((null===(r=e.settings)||void 0===r?void 0:r.length)>0){const{info:A}=e.settings[i];m.startDate=A.sourceAppointment.startDate,m.endDate=A.sourceAppointment.endDate}return new j7(t,m.source(),e.colors[i],e.settings[i])})}_onButtonClick(e,t){const i=(0,a.A)(e.element);this.instance.showAppointmentTooltipCore(i,i.data("items"),this._getExtraOptionsForTooltip(t,i))}_getExtraOptionsForTooltip(e,t){return{clickEvent:this._clickEvent(e.onAppointmentClick).bind(this),dragBehavior:e.allowDrag&&this._createTooltipDragBehavior(t).bind(this),dropDownAppointmentTemplate:this.instance.option().dropDownAppointmentTemplate,isButtonClick:!0}}_clickEvent(e){return t=>{const i=this.instance._createEventArgs(t);e(i)}}_createTooltipDragBehavior(e){return t=>{const i=(0,a.A)(t.element),r=(0,a.A)(this.instance.element()),m=this.instance.getWorkSpace(),A=(0,Fw.x5)(e);m._createDragBehaviorBase(i,r,{filter:".dx-list-item",isSetCursorOffset:!0,initialPosition:A,getItemData:X=>{var ce;return null===(ce=(0,a.A)(X).data(IW))||void 0===ce?void 0:ce.appointment},getItemSettings:(X,ce)=>ce.itemSettings})}}_getCollectorOffset(e,t){return t-e-this._getCollectorRightOffset()}_getCollectorRightOffset(){return this.instance.getRenderingStrategyInstance()._isCompactTheme()?1:5}_makeBackgroundDarker(e){e.css("boxShadow",`inset ${(0,za.N)(e.get(0)).width}px 0 0 0 rgba(0, 0, 0, 0.3)`)}_makeBackgroundColor(e,t,i){g.z7.apply(null,t).done(function(){this._makeBackgroundColorCore(e,i,[...arguments])}.bind(this))}_makeBackgroundColorCore(e,t,i){t&&t.done(r=>{const m=((n,e)=>e.length&&0!==e.filter(t=>t!==n).length?void 0:n)(r,i);m&&e.css("backgroundColor",m)})}_setPosition(e,t){(0,Fw.Cy)(e,{top:t.top,left:t.left})}_createCompactButton(e,t){const i=this._createCompactButtonElement(t);return this.instance._createComponent(i,uC.A,{type:"default",width:t.width,height:t.height,onClick:r=>this._onButtonClick(r,t),template:this._renderTemplate(e,t.items,t.isCompact)})}_createCompactButtonElement(e){let{isCompact:t,$container:i,coordinates:r}=e;const m=(0,a.A)("<div>").addClass(i$).toggleClass(Poe,t).appendTo(i);return this._setPosition(m,r),m}_renderTemplate(e,t,i){return new MU.l(r=>e.render({model:{appointmentCount:t.data.length,isCompact:i},container:r.container}))}_createTemplate(e,t){return this._initButtonTemplate(e,t),this.instance._getAppointmentTemplate("appointmentCollectorTemplate")}_initButtonTemplate(e,t){this.instance._templateManager.addDefaultTemplates({appointmentCollector:new MU.l(i=>this._createButtonTemplate(e,(0,a.A)(i.container),t))})}_createButtonTemplate(e,t,i){const r=i?e:Wn.A.getFormatter("dxScheduler-moreAppointments")(e);return t.append((0,a.A)("<span>").text(r)).addClass(Moe)}}const Tg={dataAccessors:{getAppointmentSettings:n=>(0,a.A)(n).data(VS),getAppointmentInfo:n=>{const e=Tg.dataAccessors.getAppointmentSettings(n);return e?.info},create:(n,e,t,i)=>{const r=e?(0,Lo.A)({},e):{getter:{},setter:{},expr:{}};return(0,w.__)(n,(m,A)=>{if(A){const X=(0,fa.Hz)(A),ce=(0,fa.vL)(A);let _e,Me,Ve;("startDate"===(V=m)||"endDate"===V)&&(_e=Je=>{let rt=X(Je);return t&&(rt=Yl.A.deserializeDate(rt)),rt},Me=(Je,rt)=>{if(i)Ve=i;else if(t&&!Ve){const Xt=X(Je);Ve=Yl.A.getDateSerializationFormat(Xt)}const Ct=Yl.A.serializeDate(rt,Ve);ce(Je,Ct)}),r.getter[m]=_e||X,r.setter[m]=Me||ce,r.expr[`${m}Expr`]=A}else delete r.getter[m],delete r.setter[m],delete r.expr[`${m}Expr`];var V}),r}},DOM:{getHeaderHeight:n=>n?n._$element&&parseInt((0,D.P$)(n._$element),10):0},renovation:{renderComponent:(n,e,t,i,r)=>{let m=n[i];if(m){const A=m.$element(),V=A.get(0).style,{height:X}=V,{width:ce}=V;m.option(r),X&&(0,D.k$)(A,X),ce&&(0,D.zj)(A,ce)}else{const A=(0,s.cc)(e);m=n._createComponent(A,t,r),n[i]=m}}}},koe=Tn.A.dateToMilliseconds,K7={isCurrentViewAgenda(){return"agenda"===this.currentViewType},currentViewUpdated(n){this.option("currentView",n)},currentDateUpdated(n){this.option("currentDate",n)},getOption(n){return this.option(n)},getWorkspaceOption(n){return this.getWorkSpace().option(n)},isVirtualScrolling(){return this.isVirtualScrolling()},setCellDataCacheAlias(n,e){this._workSpace.setCellDataCacheAlias(n,e)},isGroupedByDate(){return this.getWorkSpace().isGroupedByDate()},showAppointmentTooltip(n){const e=this.getTargetedAppointment(n.data,n.target);this.showAppointmentTooltip(n.data,n.target,e)},hideAppointmentTooltip(){this.hideAppointmentTooltip()},showEditAppointmentPopup(n){const e=this.getTargetedAppointment(n.data,n.target);this.showAppointmentPopup(n.data,!1,e)},updateAppointmentAfterResize(n){const e=Tg.dataAccessors.getAppointmentInfo(n.$appointment),{exceptionDate:t}=e.sourceAppointment;this._checkRecurringAppointment(n.target,n.data,t,()=>{this._updateAppointment(n.target,n.data,function(){this._appointments.moveAppointmentBack()})})},getUpdatedData(n){return this._getUpdatedData(n)},updateAppointmentAfterDrag(n){let{event:e,element:t,rawAppointment:i,newCellIndex:r,oldCellIndex:m}=n;const A=Tg.dataAccessors.getAppointmentInfo(t),V=hc(i,this._dataAccessors,this.timeZoneCalculator),X=hc((0,_.X)({},i,this._getUpdatedData(i)),this._dataAccessors,this.timeZoneCalculator),ce=X.source(),_e=X.allDay,Me=V.allDay,Ve=this._workSpace.supportAllDayRow()&&(Me&&!_e||!Me&&_e),Je=e.fromComponent!==e.toComponent;-1!==r?r!==m||Je||Ve?this._checkRecurringAppointment(i,ce,A.sourceAppointment.exceptionDate,()=>{this._updateAppointment(i,ce,function(){this._appointments.moveAppointmentBack(e)},e)},void 0,void 0,e):this._appointments.moveAppointmentBack(e):Je||this._appointments.moveAppointmentBack(e)},onDeleteButtonPress(n){const e=this.getTargetedAppointment(n.data,(0,a.A)(n.target));this.checkAndDeleteAppointment(n.data,e),this.hideAppointmentTooltip()},getTextAndFormatDate(n,e,t){const i=hc(n,this._dataAccessors,this.timeZoneCalculator),r=hc(e||n,this._dataAccessors,this.timeZoneCalculator),m=this.timeZoneCalculator.createDate(r.startDate,{path:"toGrid"}),A=this.timeZoneCalculator.createDate(r.endDate,{path:"toGrid"}),V=t||N7(m,A,r.allDay,"month"!==this.currentViewType);return{text:r.text||i.text,formatDate:F7(m,A,V)}},_createAppointmentTitle:n=>(0,C.Qd)(n)?n.text:String(n),getResizableAppointmentArea(n){const{allDay:e}=n,t=this._getCurrentViewOption("groups");if(t&&t.length){if(e||this.getLayoutManager().getRenderingStrategyInstance()._needHorizontalGroupBounds()){const i=this._workSpace.getGroupBounds(n.coordinates);return{left:i.left,right:i.right,top:0,bottom:0}}if(this.getLayoutManager().getRenderingStrategyInstance()._needVerticalGroupBounds(e)&&this._workSpace._isVerticalGroupedWorkSpace()){const i=this._workSpace.getGroupBounds(n.coordinates);return{left:0,right:0,top:i.top,bottom:i.bottom}}}},needRecalculateResizableArea(){return this.getWorkSpace().needRecalculateResizableArea()},getAppointmentGeometry(n){return this.getLayoutManager().getRenderingStrategyInstance().getAppointmentGeometry(n)},isAllDay(n){return this.getLayoutManager().getRenderingStrategyInstance().isAllDay(n)},getDeltaTime(n,e,t){return this.getLayoutManager().getRenderingStrategyInstance().getDeltaTime(n,e,t)},getDropDownAppointmentWidth(n){return this.getLayoutManager().getRenderingStrategyInstance().getDropDownAppointmentWidth(this._getViewCountConfig().intervalCount,n)},getDropDownAppointmentHeight(){return this.getLayoutManager().getRenderingStrategyInstance().getDropDownAppointmentHeight()},getCellWidth(){return this.getWorkSpace().getCellWidth()},getCellHeight(){return this.getWorkSpace().getCellHeight()},getMaxAppointmentCountPerCellByType(n){return this.getRenderingStrategyInstance()._getMaxAppointmentCountPerCellByType(n)},needCorrectAppointmentDates(){return this.getRenderingStrategyInstance().needCorrectAppointmentDates()},getRenderingStrategyDirection(){return this.getRenderingStrategyInstance().getDirection()},updateAppointmentEndDate(n){const{endDate:e}=n,t=this._getCurrentViewOption("endDayHour"),i=this._getCurrentViewOption("startDayHour");let r=e;return e.getHours()>=t?r.setHours(t,0,0,0):!n.isSameDate&&i>0&&60*e.getHours()+e.getMinutes()<60*i&&(r=new Date(r.getTime()-koe("day")),r.setHours(t,0,0,0)),r},renderCompactAppointments(n){this._compactAppointmentsHelper.render(n)},clearCompactAppointments(){this._compactAppointmentsHelper.clear()},supportCompactDropDownAppointments(){return this.getLayoutManager().getRenderingStrategyInstance().supportCompactDropDownAppointments()},getGroupCount(){return this._workSpace._getGroupCount()},mapAppointmentFields(n){const{itemData:e,itemElement:t,targetedAppointment:i}=n,r=i||this.getTargetedAppointment(e,t);return{appointmentData:n.itemData,appointmentElement:n.itemElement,targetedAppointmentData:r}},dayHasAppointment(n,e,t){return this.dayHasAppointment(n,e,t)},getLayoutManager(){return this._layoutManager},getAgendaVerticalStepHeight(){return this.getWorkSpace().getAgendaVerticalStepHeight()},getAgendaDuration(){return this._getCurrentViewOption("agendaDuration")},getStartViewDate(){return this.getStartViewDate()},getEndViewDate(){return this.getEndViewDate()},forceMaxAppointmentPerCell(){return this.forceMaxAppointmentPerCell()},onAgendaReady(n){const e=this.getAppointmentsInstance()._itemElements();let t=0;const i=function(r,m){e.eq(m+t-1).addClass("dx-scheduler-last-in-date-agenda-appointment"),t+=m};for(let r=0;r<n.length;r++)(0,w.__)(n[r],i)},getTimezone(){return this._getTimezoneOffsetByOption()},getTargetedAppointmentData(n,e){return this.getTargetedAppointment(n,e)},getEndDayHour(){return this._workSpace.option("endDayHour")||this.option("endDayHour")},getStartDayHour(){return this._workSpace.option("startDayHour")||this.option("startDayHour")},getViewOffsetMs(){return this.getViewOffsetMs()},isAdaptive(){return this.option("adaptivityEnabled")},removeDroppableCellClass(){this._workSpace.removeDroppableCellClass()}},X7=function(n,e){return arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?n>=e:n>e},Y7=(n,e)=>n%e==0;class Foe{constructor(e){this.validators=e}validate(e){const t=Object.entries(this.validators).reduce((i,r)=>{let[m,A]=r;const V=A.validate(e);return!0!==V&&(i[m]=V),i},{});return!(Object.keys(t).length>0)||t}}class Voe{constructor(e,t){this.validatorNameToErrorCodeMap=e,this.globalErrorHandler=t}handleValidationResult(e){if(!0===e)return;const i=[...Object.keys(e).reduce((r,m)=>{const A=this.validatorNameToErrorCodeMap[m];return A&&r.add(A),r},new Set)];i.forEach((r,m)=>{m===i.length-1?this.globalErrorHandler.throwError(r):this.globalErrorHandler.logError(r)})}}class Zk{constructor(e,t){this.valueSelector=e,this.rules=t}validate(e){const t=this.valueSelector(e),i=this.rules.reduce((r,m)=>{const A=m(t);return!0!==A&&(r[m.name]=A),r},{});return!Object.keys(i).length||i}}const uP=(n,e)=>(Object.defineProperty(e,"name",{value:n,writable:!1}),e),RU=uP("mustBeInteger",n=>(n=>Number.isInteger(n))(n)||`${n} must be an integer.`),Hoe=function(n){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return uP("mustBeGreaterThan",t=>X7(t,n,e)||`${t} must be ${e?">":">="} than ${n}.`)},o$=n=>uP("mustBeInRange",e=>((n,e)=>{let[t,i]=e;return n>=t&&n<=i})(e,n)||`${e} must be in range [${n[0]}, ${n[1]}].`),Uoe=n=>uP("mustBeDivisibleBy",e=>Y7(e,n)||`${e} must be divisible by ${n}.`),zoe=uP("endDayHourGreaterThanStartDayHour",n=>{let{startDayHour:e,endDayHour:t}=n;return X7(t,e)||`endDayHour: ${t} must be greater that startDayHour: ${e}.`}),Goe=uP("visibleIntervalMustBeDivisibleByCellDuration",n=>{let{cellDuration:e,startDayHour:t,endDayHour:i}=n;const r=60*(i-t);return Y7(r,e)||`endDayHour - startDayHour: ${r} (minutes), must be divisible by cellDuration: ${e} (minutes).`}),Woe=uP("cellDurationMustBeLessThanVisibleInterval",n=>{let{cellDuration:e,startDayHour:t,endDayHour:i}=n;const r=60*(i-t);return function(n,e){return arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?n<=e:n<e}(e,r,!1)||`endDayHour - startDayHour: ${r} (minutes), must be greater or equal the cellDuration: ${e} (minutes).`});class $oe extends Foe{constructor(){super({startDayHour:new Zk(e=>{let{startDayHour:t}=e;return t},[RU,o$([0,24])]),endDayHour:new Zk(e=>{let{endDayHour:t}=e;return t},[RU,o$([0,24])]),offset:new Zk(e=>{let{offset:t}=e;return t},[RU,o$([-1440,1440]),Uoe(5)]),cellDuration:new Zk(e=>{let{cellDuration:t}=e;return t},[RU,Hoe(0)]),startDayHourAndEndDayHour:new Zk(e=>e,[zoe]),cellDurationAndVisibleInterval:new Zk(e=>e,[Goe,Woe])})}}const joe={logError:n=>{is.A.log(n)},throwError:n=>{throw is.A.Error(n)}};class Koe extends Voe{constructor(){super({startDayHour:"E1058",endDayHour:"E1058",startDayHourAndEndDayHour:"E1058",offset:"E1061",cellDuration:"E1062",cellDurationAndVisibleInterval:"E1062"},joe)}}class Xoe{constructor(e,t){this.rawAppointment=e,this.promise=t}}class Yoe{get resourceDeclarations(){return this._resourceDeclarations}set resourceDeclarations(e){this._resourceDeclarations=e,this.isLoaded=!1,this.isLoading=!1,this.resourceMap.clear(),this.appointmentPromiseQueue=[]}constructor(){this._resourceDeclarations=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],this.isLoaded=!1,this.isLoading=!1,this.resourceMap=new Map,this.appointmentPromiseQueue=[]}_pushAllResources(){this.appointmentPromiseQueue.forEach(e=>{let{promise:t,rawAppointment:i}=e;const r=[];this.resourceMap.forEach((m,A)=>{const V={label:m.label,values:[]};A in i&&(0,By.BO)(i[A]).forEach(X=>V.values.push(m.map.get(X))),V.values.length&&r.push(V)}),t.resolve(r)}),this.appointmentPromiseQueue=[]}_onPullResource(e,t,i,r,m){const A=new Map;m.forEach(V=>A.set(V[t],V[i])),this.resourceMap.set(e,{label:r,map:A})}_hasResourceDeclarations(e){return 0!==e.length||(this.appointmentPromiseQueue.forEach(t=>{let{promise:i}=t;return i.resolve([])}),this.appointmentPromiseQueue=[],!1)}_tryPullResources(e,t){if(!this.isLoading){this.isLoading=!0;const i=[];e.forEach(r=>{const m=(new g.cY).done(V=>this._onPullResource(Nw(r),gV(r),jW(r),r.label,V));i.push(m);const A=yU(r.dataSource);A.isLoaded()?m.resolve(A.items()):A.load().done(V=>m.resolve(V)).fail(()=>m.reject())}),g.z7.apply(null,i).done(()=>{this.isLoaded=!0,this.isLoading=!1,this._pushAllResources()}).fail(()=>t.reject())}}initializeState(){this.resourceDeclarations=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]}createListAsync(e){const t=new g.cY;return this.appointmentPromiseQueue.push(new Xoe(e,t)),this._hasResourceDeclarations(this.resourceDeclarations)&&(this.isLoaded?this._pushAllResources():this._tryPullResources(this.resourceDeclarations,t)),t.promise()}}var Zoe=M(2806),Joe=M(4292);const Vw="dx-tooltip-appointment-item",qoe=`${Vw}-content`,ere=`${Vw}-content-subject`,tre=`${Vw}-content-date`,nre=`${Vw}-marker`,ire=`${Vw}-marker-body`,ore=`${Vw}-delete-button-container`,rre=`${Vw}-delete-button`;class Z7{constructor(e){this.asyncTemplatePromises=new Set,this._tooltip=null,this._options=e,this._extraOptions=null}show(e,t,i){this._canShowTooltip(t)&&(this.hide(),this._extraOptions=i,this._showCore(e,t))}_showCore(e,t){this._tooltip?(this._shouldUseTarget()&&this._tooltip.option("target",e),this._list.option("dataSource",t)):this._tooltip=this._createTooltip(e,t),this._prepareBeforeVisibleChanged(t),this._tooltip.option("visible",!0)}_prepareBeforeVisibleChanged(e){}_getContentTemplate(e){return t=>{const i=(0,a.A)("<div>");(0,a.A)(t).append(i),this._list=this._createList(i,e)}}isAlreadyShown(e){if(this._tooltip&&this._tooltip.option("visible"))return this._tooltip.option("target")[0]===e[0]}_onShown(){this._list.option("focusStateEnabled",this._extraOptions.focusStateEnabled)}dispose(){}hide(){this._tooltip&&this._tooltip.option("visible",!1)}_shouldUseTarget(){return!0}_createTooltip(e,t){}_canShowTooltip(e){return!!e.length}_createListOption(e){return{dataSource:e,onContentReady:this._onListRender.bind(this),onItemClick:t=>this._onListItemClick(t),onItemContextMenu:this._onListItemContextMenu.bind(this),itemTemplate:(t,i)=>this._renderTemplate(t.appointment,t.targetedAppointment,i,t.color),_swipeEnabled:!1,pageLoadMode:"scrollBottom"}}_onListRender(e){}_createTooltipElement(e){return(0,a.A)("<div>").appendTo(this._options.container).addClass(e)}_createList(e,t){return this._options.createComponent(e,Joe.A,this._createListOption(t))}_renderTemplate(e,t,i,r){const m=this._createItemListContent(e,t,r);this._options.addDefaultTemplates({[this._getItemListTemplateName()]:new MU.l(V=>{const X=(0,a.A)(V.container);return X.append(m),X})});const A=this._options.getAppointmentTemplate(`${this._getItemListTemplateName()}Template`);return this._createFunctionTemplate(A,e,t,i)}_createFunctionTemplate(e,t,i,r){const m=!!this._extraOptions.isButtonClick,A=this._isEmptyDropDownAppointmentTemplate();return new MU.l(V=>{const{promise:X,resolve:ce}=function Qoe(){let n,e;return{promise:new Promise((i,r)=>{n=i,e=r}),resolve:n,reject:e}}();return this.asyncTemplatePromises.add(X),e.render({model:A?{appointmentData:t,targetedAppointmentData:i,isButtonClicked:m}:t,container:V.container,index:r,onRendered:()=>{this.asyncTemplatePromises.delete(X),ce()}})})}_getItemListTemplateName(){return this._isEmptyDropDownAppointmentTemplate()?"appointmentTooltip":"dropDownAppointment"}_isEmptyDropDownAppointmentTemplate(){return!this._extraOptions.dropDownAppointmentTemplate||"dropDownAppointment"===this._extraOptions.dropDownAppointmentTemplate}_onListItemClick(e){this.hide(),this._extraOptions.clickEvent&&this._extraOptions.clickEvent(e),this._options.showAppointmentPopup(e.itemData.appointment,!1,e.itemData.targetedAppointment)}_onListItemContextMenu(e){}_createItemListContent(e,t,i){const{editing:r}=this._extraOptions,m=(0,a.A)("<div>").addClass(Vw);return m.append(this._createItemListMarker(i)),m.append(this._createItemListInfo(this._options.createFormattedDateText(e,t))),!this._options.getAppointmentDisabled(e)&&(r&&!0===r.allowDeleting||!0===r)&&m.append(this._createDeleteButton(e,t)),m}_createItemListMarker(e){const t=(0,a.A)("<div>").addClass(nre),i=(0,a.A)("<div>").addClass(ire);return t.append(i),e&&e.done(r=>i.css("background",r)),t}_createItemListInfo(e){const t=(0,a.A)("<div>").addClass(qoe),i=(0,a.A)("<div>").addClass(ere).text(e.text),r=(0,a.A)("<div>").addClass(tre).text(e.formatDate);return t.append(i).append(r)}_createDeleteButton(e,t){const i=(0,a.A)("<div>").addClass(ore),r=(0,a.A)("<div>").addClass(rre);return i.append(r),this._options.createComponent(r,uC.A,{icon:"trash",stylingMode:"text",onClick:m=>{this.hide(),m.event.stopPropagation(),this._options.checkAndDeleteAppointment(e,t)}}),i}}const Q7="dx-scheduler-appointment-tooltip-wrapper";class sre extends Z7{_prepareBeforeVisibleChanged(e){this._tooltip.option("position",{my:"bottom",at:"top",boundary:this._getBoundary(e),offset:this._extraOptions.offset,collision:"fit flipfit"})}_getBoundary(e){return this._options.isAppointmentInAllDayPanel(e[0].appointment)?this._options.container:this._options.getScrollableContainer()}_onShown(){super._onShown(),this._extraOptions.isButtonClick&&(this._list.focus(),this._list.option("focusedElement",null))}_createListOption(e,t){const i=super._createListOption(e,t);return i.showScrollbar=Tk.touch?"always":"onHover",i}_createTooltip(e,t){const i=this._createTooltipElement(Q7);return this._options.createComponent(i,Zoe.A,{target:e,maxHeight:200,rtlEnabled:this._extraOptions.rtlEnabled,onShown:this._onShown.bind(this),contentTemplate:this._getContentTemplate(t),wrapperAttr:{class:Q7}})}_onListRender(e){return this._extraOptions.dragBehavior&&this._extraOptions.dragBehavior(e)}_onListItemContextMenu(e){const t=this._options.createEventArgs(e);this._options.onItemContextMenu(t)}}var are=M(3308);const lre={show:{type:"slide",duration:300,from:{position:{my:"top",at:"bottom",of:(0,gr.zk)()}},to:{position:{my:"center",at:"center",of:(0,gr.zk)()}}},hide:{type:"slide",duration:300,to:{position:{my:"top",at:"bottom",of:(0,gr.zk)()}},from:{position:{my:"center",at:"center",of:(0,gr.zk)()}}}};class ure extends Z7{_shouldUseTarget(){return!1}setTooltipConfig(){const e=(0,D.RG)((0,gr.zk)())>700,t=(0,D.P$)(this._list.$element().find(".dx-scrollable-content"));this._tooltip.option(e?(n=>({shading:!0,width:"80%",height:n>.9*(0,D.Oq)((0,gr.zk)())?"90%":"auto",position:{my:"center",at:"center",of:(0,gr.zk)()}}))(t):(n=>({shading:!1,width:"100%",height:n>250?250:"auto",position:{my:"bottom",at:"bottom",of:(0,gr.zk)()}}))(t))}_onShowing(){var e=this;return(0,are.A)(function*(){e._tooltip.option("height","auto"),e.setTooltipConfig(),yield Promise.all([...e.asyncTemplatePromises]),e.setTooltipConfig()})()}_createTooltip(e,t){const i=this._createTooltipElement("dx-scheduler-overlay-panel");return this._options.createComponent(i,gI.A,{target:(0,gr.zk)(),hideOnOutsideClick:!0,animation:lre,onShowing:()=>this._onShowing(),onShown:this._onShown.bind(this),contentTemplate:this._getContentTemplate(t),wrapperAttr:{class:"dx-scheduler-overlay-panel"}})}}const s$={tableCreator:new class hre{constructor(){this.VERTICAL="vertical",this.HORIZONTAL="horizontal"}insertAllDayRow(e,t,i){if(e[i]){let r=e[i].find("tr");r.length||(r=(0,a.A)(c.A.createElement("tr")),r.append(e[i].get(0))),t.appendChild(r.get?r.get(0):r)}}makeTable(e){const t=c.A.createElement("tbody"),i=[];let r;const m=e.groupCount?e.rowCount/e.groupCount:e.rowCount;let A=0;const{allDayElements:V}=e,{groupIndex:X}=e,{rowCount:ce}=e;(0,a.A)(e.container).append(t),V&&(this.insertAllDayRow(V,t,0),A++);for(let Me=0;Me<ce;Me++){r=c.A.createElement("tr"),t.appendChild(r);const Ve=(Me+1)%m==0;e.rowClass&&(r.className=e.rowClass);for(let Je=0;Je<e.cellCount;Je++){var _e;const rt=c.A.createElement("td");let Ct,Xt,On;if(r.appendChild(rt),e.cellClass&&(rt.className=(0,C.Tn)(e.cellClass)?e.cellClass(Me,Je):e.cellClass),e.getCellData&&(Ct=e.getCellData(rt,Me,Je,X),Xt=Ct.key,On=Ct.value,Xt&&(0,g7.p)(rt,Xt,On)),null===(_e=e.setAdditionalClasses)||void 0===_e||_e.call(e,(0,a.A)(rt),On),e.cellTemplate&&e.cellTemplate.render){const Fn=e.getTemplateData?e.getTemplateData(Me):{},oi={model:(0,Lo.A)({text:e.getCellText?e.getCellText(Me,Je):"",date:e.getCellDate?e.getCellDate(Me):void 0},Fn),container:(0,s.cc)((0,a.A)(rt)),index:Me*e.cellCount+Je};On&&(On.startDate&&(oi.model.startDate=On.startDate),On.endDate&&(oi.model.endDate=On.endDate),On.groups&&(oi.model.groups=On.groups),On.allDay&&(oi.model.allDay=On.allDay)),i.push(e.cellTemplate.render.bind(e.cellTemplate,oi))}else e.getCellText&&(0,a.A)("<div>").text(e.getCellText(Me,Je)).addClass(e.getCellTextClass).appendTo((0,a.A)(rt))}V&&Ve&&(this.insertAllDayRow(V,t,A),A++)}return i}makeGroupedTable(e,t,i,r,m,A,V){let X=[];return X=e===this.VERTICAL?this._makeVerticalGroupedRows(t,i,m,A):this._makeHorizontalGroupedRows(t,i,r,m,V),X}makeGroupedTableFromJSON(e,t,i){let r;const m=[];let A=0;const V=(i=i||{}).cellTag||"td",X=i.childrenField||"children",ce=i.titleField||"title",{groupTableClass:_e}=i,{groupRowClass:Me}=i,{groupCellClass:Ve}=i,{groupCellCustomContent:Je}=i;function rt(Xt){return Xt[X]?Xt[X].length:0}function Ct(Xt,On,Fn,oi){const Yt={element:c.A.createElement(V),childCount:On};Ve&&(Yt.element.className=Ve);const $t=c.A.createTextNode(Xt);return"function"==typeof Je?Je(Yt.element,$t,Fn,oi):Yt.element.appendChild($t),Yt}return r=c.A.createElement("table"),_e&&(r.className=_e),function Xt(On){for(let Fn=0;Fn<On.length;Fn++){const oi=rt(On[Fn]),Yt=Ct(On[Fn][ce],oi,Fn,On[Fn]);m[A]||(m[A]=[]),m[A].push(Yt),oi?Xt(On[Fn][X]):A++}}(t),m.forEach(Xt=>{const On=c.A.createElement("tr");Me&&(On.className=Me);const Fn=[];for(let oi=Xt.length-1;oi>=0;oi--){const Yt=Xt[oi+1];let $t=Xt[oi].childCount;Yt&&Yt.childCount&&($t*=Yt.childCount),Fn.push($t)}Fn.reverse(),Xt.forEach((oi,Yt)=>{Fn[Yt]&&oi.element.setAttribute("rowSpan",Fn[Yt]),On.appendChild(oi.element)}),r.appendChild(On)}),r}_makeFlexGroupedRowCells(e,t,i,r){let m=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;const A=[],{items:V}=e,X=V.length;for(let ce=0;ce<t*m;ce++)for(let _e=0;_e<X;_e++){let Me=(0,a.A)("<div>");const Ve={};if(r&&r.render){const rt={model:V[_e],container:(0,s.cc)(Me),index:ce*X+_e};e.data&&(rt.model.data=e.data[_e]),Ve.template=r.render.bind(r,rt)}else Me.text(V[_e].text).attr("title",V[_e].text).addClass("dx-scheduler-group-header-content"),Me=(0,a.A)("<div>").append(Me);const Je=(0,C.Tn)(i.groupHeaderClass)?i.groupHeaderClass(_e):i.groupHeaderClass;Ve.element=Me.addClass(Je),A.push(Ve)}return A}_makeVerticalGroupedRows(e,t,i,r){const m=[];let A=1;const V=[],X=function(Me){Me.template&&m.push(Me.template)};for(let Me=0;Me<e.length;Me++){Me>0&&(A*=e[Me-1].items.length);const Ve=this._makeFlexGroupedRowCells(e[Me],A,t,i);Ve.forEach(X),V.push(Ve)}const ce=[],_e=V.length;for(let Me=0;Me<_e;Me++)ce.push((0,a.A)("<div>").addClass(t.groupHeaderRowClass));for(let Me=_e-1;Me>=0;Me--){const Ve=V[Me].length;for(let Je=0;Je<Ve;Je++)ce[Me].append(V[Me][Je].element)}return{elements:(0,a.A)("<div>").addClass("dx-scheduler-group-flex-container").append(ce),cellTemplates:m}}_makeHorizontalGroupedRows(e,t,i,r,m){let A=1;const V=e.length,X=[],ce=[],_e=m?i:1,Me=function(Je){return Je.template&&ce.push(Je.template),Je.element};for(let Je=0;Je<V;Je++){Je>0&&(A*=e[Je-1].items.length);const rt=this._makeGroupedRowCells(e[Je],A,t,r,_e);X.push((0,a.A)("<tr>").addClass(t.groupRowClass).append(rt.map(Me)))}const Ve=X[V-1].find("th").length;for(let Je=0;Je<V;Je++){const rt=X[Je].find("th");let Ct=Ve/rt.length;m||(Ct*=i),(Ct>1&&1===_e||m&&V>1)&&rt.attr("colSpan",Ct)}return{elements:X,cellTemplates:ce}}_makeGroupedRowCells(e,t,i,r,m){t*=m=m||1;const A=[],{items:V}=e,X=V.length;for(let ce=0;ce<t;ce++)for(let _e=0;_e<X;_e++){let Me=(0,a.A)("<div>");const Ve={};if(r&&r.render){const rt={model:V[_e],container:(0,s.cc)(Me),index:ce*X+_e};e.data&&(rt.model.data=e.data[_e]),Ve.template=r.render.bind(r,rt)}else Me.text(V[_e].text),Me=(0,a.A)("<div>").append(Me);let Je;Me.addClass(i.groupHeaderContentClass),Je=(0,C.Tn)(i.groupHeaderClass)?i.groupHeaderClass(_e):i.groupHeaderClass,Ve.element=(0,a.A)("<th>").addClass(Je).append(Me),A.push(Ve)}return A}}};var pre=M(4451),as=M(5328),Jk=M(4267),gre=M(7426),Ia=M(5652);const fre=(n,e)=>Object.keys(n).length===Object.keys(e).length&&Object.keys(n).every(t=>n[t]===e[t]),mre=["isEqual"];class q7 extends Ia.JP{constructor(e){super(e),this.renderTemplate=this.renderTemplate.bind(this)}renderTemplate(){const e=(0,as.UV)(this.$LI,!0);if(null==e||!e.parentNode)return()=>{};const t=e.parentNode,i=(0,a.A)(t),r=i.contents().toArray(),m=((n,e)=>{const{data:t,index:i}=n.model??{data:{}};t&&Object.keys(t).forEach(m=>{t[m]&&c.A.isNode(t[m])&&(t[m]=(0,s.cc)((0,a.A)(t[m])))});const r=n.template.render((0,Lo.A)({container:e,transclude:n.transclude},{renovated:n.renovated},n.transclude?{}:{model:t},!n.transclude&&Number.isFinite(i)?{index:i}:{}));return void 0===r?[]:(n=>!!n.toArray)(r)?r.toArray():[(0,a.A)(r).get(0)]})(this.props,(0,s.cc)(i));return(0,_v.bG)((0,a.A)(e),(0,a.A)(m)),()=>{const A=(0,a.A)(t).contents().toArray();((n,e)=>{e.forEach(t=>{!n.find(r=>t===r)&&t.parentNode&&(0,a.A)(t).remove()})})(r,A),t.appendChild(e)}}shouldComponentUpdate(e){const{template:t,model:i}=this.props,{template:r,model:m,isEqual:A}=e,V=A??fre;if(t!==r)return!0;if(!(0,C.O9)(i)||!(0,C.O9)(m))return i!==m;const{data:X,index:ce}=i,{data:_e,index:Me}=m;return ce!==Me||!V(X,_e)}createEffects(){return[new Ia.Lt(this.renderTemplate,[this.props.template,this.props.model])]}updateEffects(){this._effects[0].update([this.props.template,this.props.model])}componentWillUnmount(){}render(){return null}}const Wl=n=>n&&(n.defaultProps?e=>(0,as._B)((0,as.sO)(2,n,(0,Lo.A)({},e))):n),a$=n=>Array.isArray(n)?[...n]:(0,Lo.A)({},n),e8=(n,e,t)=>{const i=a$(t.length>0&&e&&n!==e?e:n),r=t[0];return t.length>1?i[r]=e8(n[r],e?.[r],t.slice(1)):r&&(i[r]=(0,C.Qd)(n[r])?a$(n[r]):n[r]),i},l$=(n,e)=>t=>{Object.prototype.hasOwnProperty.call(n,t)&&void 0===n[t]&&(n[t]=e(t))};let _V=(()=>{class n extends kv.A{get _propsInfo(){return{allowNull:[],twoWay:[],elements:[],templates:[],props:[]}}constructor(t,i){super(t,i),this._shouldRaiseContentReady=!1,this.validateKeyDownHandler()}validateKeyDownHandler(){if(this.getSupportedKeyNames().length>0&&"function"!=typeof this._viewComponent.prototype.keyDown)throw Error("Component's declaration must have 'keyDown' method.")}get viewRef(){var t;return null===(t=this._viewRef)||void 0===t?void 0:t.current}_checkContentReadyOption(t){const i=this._getContentReadyOptions().reduce((r,m)=>(r[m]=!0,r),{});return this._checkContentReadyOption=r=>!!i[r],this._checkContentReadyOption(t)}_getContentReadyOptions(){return["rtlEnabled"]}_fireContentReady(){this._actionsMap.onContentReady({})}_getDefaultOptions(){const t=this._getViewComponentDefaultProps();return(0,_.X)(!0,super._getDefaultOptions(),t,this._propsInfo.twoWay.reduce((i,r)=>{let[m,A,V]=r;return(0,Lo.A)({},i,{[m]:t[A],[V]:X=>this.option(m,X)})},{}),this._propsInfo.templates.reduce((i,r)=>(0,Lo.A)({},i,{[r]:null}),{}))}_getUnwrappedOption(){const t={};return Object.keys(this.option()).forEach(i=>{t[i]=this.option(i)}),t}_initializeComponent(){var t;super._initializeComponent(),null===(t=this._templateManager)||void 0===t||t.addDefaultTemplates(this.getDefaultTemplates());const i=this._getUnwrappedOption();this._props=this._optionsWithDefaultTemplates(i),this._propsInfo.templates.forEach(r=>{this._componentTemplates[r]=this._createTemplateComponent(this._props[r])}),Object.keys(this._getActionConfigsFull()).forEach(r=>this._addAction(r)),this._viewRef=(0,as._3)(),this.defaultKeyHandlers=this._createDefaultKeyHandlers()}_initMarkup(){const t=this.getProps();this._renderWrapper(t)}_renderWrapper(t){const i=this.$element()[0];this._isNodeReplaced||Jk.A.onPreRender(),Jk.A.render(this._viewComponent,t,i,this._isNodeReplaced),this._isNodeReplaced||(this._isNodeReplaced=!0,Jk.A.onAfterRender(),this._shouldRaiseContentReady=!0),this._shouldRaiseContentReady&&(this._fireContentReady(),this._shouldRaiseContentReady=!1)}_silent(t,i){this._options.silent(t,i)}_render(){}_removeWidget(){Jk.A.remove(this.$element()[0])}_dispose(){this._removeWidget(),super._dispose()}get elementAttr(){const t=this.$element()[0];if(!this._elementAttr){const{attributes:m}=t,A=Array.from(m).filter(V=>{var X;return!this._propsInfo.templates.includes(V.name)&&(null===(X=m[V.name])||void 0===X?void 0:X.specified)}).reduce((V,X)=>{let{name:ce,value:_e}=X;const Me=V;return Me[ce]=""===_e&&ce in t?t[ce]:_e,Me},{});this._elementAttr=A,this._storedClasses=t.getAttribute("class")||""}const i=t.style,r={};for(let m=0;m<i.length;m+=1)r[i[m]]=i.getPropertyValue(i[m]);return this._elementAttr.style=r,this._elementAttr.class=this._storedClasses,this._elementAttr}_getAdditionalActionConfigs(){return{onContentReady:{excludeValidators:["disabled","readOnly"]}}}_getAdditionalProps(){return[]}_patchOptionValues(t){const{allowNull:i,twoWay:r,elements:m,props:A}=this._propsInfo,V=this._getViewComponentDefaultProps(),X=Object.keys(V),ce=this._getDefaultOptions(),{ref:_e,children:Me,onKeyboardHandled:Ve}=t,rt={ref:_e,children:Me,onKeyDown:Ve?(Ct,Xt)=>{Ve(Xt)}:void 0};return[...A,...this._getAdditionalProps()].forEach(Ct=>{Object.prototype.hasOwnProperty.call(t,Ct)&&(rt[Ct]=t[Ct])}),i.forEach(l$(rt,()=>null)),X.forEach(l$(rt,Ct=>ce[Ct])),r.forEach(Ct=>{let[Xt,On]=Ct;l$(rt,()=>ce[On])(Xt)}),m.forEach(Ct=>{if(Ct in rt){const Xt=rt[Ct];(0,C.Kb)(Xt)&&(rt[Ct]=this._patchElementParam(Xt))}}),rt}getSupportedKeyNames(){return[]}prepareStyleProp(t){return"string"==typeof t.style?(0,Lo.A)({},t,{style:{},cssText:t.style}):t}getProps(){const{elementAttr:t}=this.option(),i=this._patchOptionValues((0,Lo.A)({},this._props,{ref:this._viewRef,children:this._extractDefaultSlot(),aria:this._aria}));return this._propsInfo.templates.forEach(r=>{i[r]=this._componentTemplates[r]}),this.prepareStyleProp((0,Lo.A)({},i,this.elementAttr,t,{className:[...(this.elementAttr.class??"").split(" "),...(t?.class??"").split(" ")].filter((r,m,A)=>r&&A.indexOf(r)===m).join(" ").trim(),class:""},this._actionsMap))}_getActionConfigs(){return{}}_getActionConfigsFull(){return(0,Lo.A)({},this._getActionConfigs(),this._getAdditionalActionConfigs())}getDefaultTemplates(){const t=Object.values(this._templatesInfo),i={};return t.forEach(r=>{i[r]="dx-renovation-template-mock"}),i}get _templatesInfo(){return{}}_optionsWithDefaultTemplates(t){const i=Object.entries(this._templatesInfo).reduce((r,m)=>{let[A,V]=m;return(0,Lo.A)({},r,{[A]:t[A]??V})},{});return(0,Lo.A)({},t,i)}_init(){super._init(),this.customKeyHandlers={},this._actionsMap={},this._aria={},this._componentTemplates={}}_createDefaultKeyHandlers(){const t={};return this.getSupportedKeyNames().forEach(r=>{t[r]=m=>this.viewRef.keyDown(gre.A.createKeyDownOptions(m))}),t}_addAction(t,i){let r=i;if(!r){const m=this._createActionByOption(t,this._getActionConfigsFull()[t]);r=A=>(Object.keys(A).forEach(V=>{(0,C.O9)(A[V])&&c.A.isNode(A[V])&&(A[V]=(0,s.cc)((0,a.A)(A[V])))}),m(A))}this._actionsMap[t]=r}_optionChanged(t){const{name:i,fullName:r,value:m,previousValue:A}=t;((n,e,t,i)=>{const r=e[t],m=n[t];n[t]=(0,C.Qd)(r)||t!==i&&Array.isArray(r)?e8(r,m,(0,fa.u7)(i).slice(1)):r})(this._props,this.option(),i,r),this._propsInfo.templates.includes(i)&&m!==A&&(this._componentTemplates[i]=this._createTemplateComponent(m)),i&&this._getActionConfigsFull()[i]&&this._addAction(i),this._shouldRaiseContentReady=this._shouldRaiseContentReady||this._checkContentReadyOption(r),super._optionChanged(t),this._invalidate()}_extractDefaultSlot(){return this.option("_hasAnonymousTemplateContent")?Jk.A.createElement(q7,{template:this._getTemplate(this._templateManager.anonymousTemplateName),transclude:!0,renovated:!0}):null}_createTemplateComponent(t){if(!t)return;const i=this._getTemplate(t);return(0,C.Kg)(i)&&"dx-renovation-template-mock"===i?void 0:r=>Jk.A.createElement(q7,((n,e)=>{const t={template:e,model:(0,Lo.A)({},n)},i=n.data??{},{isEqual:r}=i,m=(0,fp.A)(i,mre);return r&&(t.model.data=m,t.isEqual=r),t})(r,i))}_wrapKeyDownHandler(t){return i=>{const{originalEvent:r,keyName:m,which:A}=i,V=this.customKeyHandlers,X=V[m]||V[A];return void 0===X||X.bind(this)(r,i)?t?.(r,i):(r.cancel=!0,r)}}_toPublicElement(t){return(0,s.cc)((0,a.A)(t))}_patchElementParam(t){try{const i=(0,a.A)(t),r=i?.get(0);return null!=r&&r.nodeType?r:t}catch{return t}}repaint(){this._isNodeReplaced=!1,this._shouldRaiseContentReady=!0,this._removeWidget(),this._refresh()}_supportedKeys(){return(0,Lo.A)({},this.defaultKeyHandlers,this.customKeyHandlers)}registerKeyHandler(t,i){this.customKeyHandlers[t]=i}setAria(t,i){this._aria[t]=i,this._initMarkup()}_getViewComponentDefaultProps(){return this._viewComponent.defaultProps||{}}}return n.IS_RENOVATED_WIDGET=!1,n.IS_RENOVATED_WIDGET=!0,n})(),t8=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const t=Wn.A.format("dxScheduler-allDay");return(0,as.bF)(1,"div","dx-scheduler-all-day-title",t,0)}}return n.defaultProps={},n})();class n8 extends _V{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:[],props:[]}}get _viewComponent(){return t8}}(0,y.A)("dxAllDayPanelTitle",n8);const Am={className:"",isFirstGroupCell:!1,isLastGroupCell:!1,startDate:new Date,endDate:new Date,allDay:!1,text:"",index:0,contentTemplateProps:{data:{},index:0}};let c$=(()=>{class n extends Ia.eh{render(){const{className:t,isFirstGroupCell:i,isLastGroupCell:r,children:m,ariaLabel:A}=this.props,V=Qh_getGroupCellClasses(i,r,t);return(0,as.bF)(1,"td",V,m,0,{"aria-label":A})}}return n.defaultProps=Am,n})();const d$=(0,Lo.A)({},Am,{otherMonth:!1,today:!1,firstDayOfMonth:!1,isSelected:!1,isFocused:!1});let kU=(()=>{class n extends Ia.eh{constructor(){super(...arguments),this.dataCellTemplateProps=null}getDataCellTemplateProps(){if(null!==this.dataCellTemplateProps)return this.dataCellTemplateProps;const{allDay:t,contentTemplateProps:i,endDate:r,groupIndex:m,groups:A,index:V,startDate:X}=this.props;return this.dataCellTemplateProps={data:(0,Lo.A)({startDate:X,endDate:r,groups:A,groupIndex:A?m:void 0,text:"",allDay:!!t||void 0},i?.data),index:V},this.dataCellTemplateProps}componentWillUpdate(t){(this.props.allDay!==t.allDay||this.props.contentTemplateProps!==t.contentTemplateProps||this.props.endDate!==t.endDate||this.props.groupIndex!==t.groupIndex||this.props.groups!==t.groups||this.props.index!==t.index||this.props.startDate!==t.startDate)&&(this.dataCellTemplateProps=null)}render(){const{viewContext:t,allDay:i,className:r,isFocused:m,isSelected:A,isFirstGroupCell:V,isLastGroupCell:X,dataCellTemplate:ce,children:_e}=this.props,{view:{type:Me},crossScrollingEnabled:Ve}=t,Je=Qh_getCellSizeHorizontalClass(Me,Ve),rt=Qh_getCellSizeVerticalClass(!!i),Ct=Qh_combineClasses({[Je]:!0,[rt]:!0,"dx-scheduler-date-table-cell":!i,"dx-state-focused":A,"dx-scheduler-focused-cell":m,[r??""]:!0}),Xt=A?"Add appointment":void 0,On=this.getDataCellTemplateProps(),Fn=Wl(ce);return(0,as.sO)(2,c$,{className:Ct,viewContext:t,isFirstGroupCell:V,isLastGroupCell:X,ariaLabel:Xt,startDate:Am.startDate,endDate:Am.endDate,index:Am.index,children:(0,as.nl)([!Fn&&_e,!!Fn&&Fn({index:On.index,data:On.data})],0)})}}return n.defaultProps=d$,n})(),wre=(()=>{class n extends Ia.eh{render(){const{className:t,viewContext:i,dataCellTemplate:r,endDate:m,groupIndex:A,groups:V,index:X,isFirstGroupCell:ce,isFocused:_e,isLastGroupCell:Me,isSelected:Ve,startDate:Je}=this.props,rt=Wl(r);return(0,as.sO)(2,kU,{className:`dx-scheduler-all-day-table-cell ${t}`,viewContext:i,startDate:Je,endDate:m,groups:V,groupIndex:A,allDay:!0,isFirstGroupCell:ce,isLastGroupCell:Me,index:X,dataCellTemplate:rt,isSelected:Ve,isFocused:_e})}}return n.defaultProps=d$,n})();const i8={};let Tre=(()=>{class n extends Ia.eh{render(){const{children:t,className:i,colSpan:r,styles:m}=this.props;return(0,as.bF)(1,"td",i,t,0,{style:(0,Ia.gs)(m),colSpan:r})}}return n.defaultProps=i8,n})(),Dre=(()=>{class n extends Ia.eh{render(){const{children:t,className:i,colSpan:r,styles:m}=this.props;return(0,as.bF)(1,"th",i,t,0,{style:(0,Ia.gs)(m),colSpan:r})}}return n.defaultProps=i8,n})();const vV={width:0,isHeaderCell:!1};let u$=(()=>{class n extends Ia.eh{render(){const{colSpan:t,isHeaderCell:i,width:r,styles:m}=this.props,A=Qh_addWidthToStyle(r,m);return(0,as.sO)(2,i?Dre:Tre,{className:"dx-scheduler-virtual-cell",styles:A,colSpan:t})}}return n.defaultProps=vV,n})();const Fx={className:"",leftVirtualCellWidth:0,rightVirtualCellWidth:0,isHeaderRow:!1};let hP=(()=>{class n extends Ia.eh{render(){const{children:t,className:i,isHeaderRow:r,leftVirtualCellCount:m,leftVirtualCellWidth:A,rightVirtualCellCount:V,rightVirtualCellWidth:X,styles:ce}=this.props,Me=!!V;return(0,as.bF)(1,"tr",i,[!!m&&null!=m&&z5(m,1e3).map((Ve,Je)=>(0,as.sO)(2,u$,{className:`left-virtual-cell-${Je}`,width:A*(Ve/m),colSpan:Ve,isHeaderCell:r??vV.isHeaderCell})),t,Me&&null!=V&&z5(V,1e3).map((Ve,Je)=>(0,as.sO)(2,u$,{className:`right-virtual-cell-${Je}`,width:X*(Ve/V),colSpan:Ve,isHeaderCell:r??vV.isHeaderCell}))],0,{style:(0,Ia.gs)(ce)})}}return n.defaultProps=Fx,n})();const pP={viewData:[],isVerticalGroupOrientation:!1,className:"",leftVirtualCellWidth:0,rightVirtualCellWidth:0};let o8=(()=>{class n extends Ia.eh{render(){const{className:t,viewData:i,viewContext:r,leftVirtualCellWidth:m,rightVirtualCellWidth:A,leftVirtualCellCount:V,rightVirtualCellCount:X,isVerticalGroupOrientation:ce,dataCellTemplate:_e}=this.props,Me=Qh_combineClasses({"dx-scheduler-all-day-table-row":!0,[t??""]:!!t}),Ve=Wl(_e);return(0,as.sO)(2,hP,{leftVirtualCellWidth:m,rightVirtualCellWidth:A,leftVirtualCellCount:V,rightVirtualCellCount:X,className:Me,children:i.map(Je=>{let{endDate:rt,groupIndex:Ct,groups:Xt,index:On,isFirstGroupCell:Fn,isFocused:oi,isLastGroupCell:Yt,isSelected:$t,key:xn,startDate:Gn}=Je;return(0,as.sO)(2,wre,{viewContext:r,isFirstGroupCell:!ce&&Fn,isLastGroupCell:!ce&&Yt,startDate:Gn,endDate:rt,groups:Xt,groupIndex:Ct,index:On,dataCellTemplate:Ve,isSelected:$t??!1,isFocused:oi??!1},xn)})})}}return n.defaultProps=pP,n})();const h$={viewData:{groupedData:[],leftVirtualCellCount:0,rightVirtualCellCount:0,topVirtualRowCount:0,bottomVirtualRowCount:0},leftVirtualCellWidth:0,rightVirtualCellWidth:0,topVirtualRowHeight:0,bottomVirtualRowHeight:0,addDateTableClass:!0,addVerticalSizesClassToRows:!0},gP=(0,Lo.A)({},Fx,{leftVirtualCellWidth:0,rightVirtualCellWidth:0,cellsCount:1});let r8=(()=>{class n extends Ia.eh{constructor(){super(...arguments),this.virtualCells=null}getVirtualCells(){if(null!==this.virtualCells)return this.virtualCells;const{cellsCount:t}=this.props;return this.virtualCells=[...Array(t)],this.virtualCells}componentWillUpdate(t){this.props.cellsCount!==t.cellsCount&&(this.virtualCells=null)}render(){const{className:t,leftVirtualCellCount:i,leftVirtualCellWidth:r,rightVirtualCellCount:m,rightVirtualCellWidth:A,styles:V,height:X}=this.props,ce=`dx-scheduler-virtual-row ${t}`,_e=Qh_addHeightToStyle(X,V),Me=this.getVirtualCells();return(0,as.sO)(2,hP,{className:ce,styles:_e,leftVirtualCellWidth:r,rightVirtualCellWidth:A,leftVirtualCellCount:i,rightVirtualCellCount:m,children:Me.map((Ve,Je)=>(0,as.sO)(2,u$,{width:vV.width,isHeaderCell:vV.isHeaderCell},Je.toString()))})}}return n.defaultProps=gP,n})();const Are={topVirtualRowHeight:0,bottomVirtualRowHeight:0,leftVirtualCellWidth:0,rightVirtualCellWidth:0,virtualCellsCount:0};let p$=(()=>{class n extends Ia.eh{getResultStyles(){const{height:t,width:i,styles:r}=this.props,m=Qh_addHeightToStyle(t,r);return Qh_addWidthToStyle(i,m)}render(){const{className:t,topVirtualRowHeight:i,bottomVirtualRowHeight:r,children:m,leftVirtualCellCount:A,leftVirtualCellWidth:V,rightVirtualCellCount:X,rightVirtualCellWidth:ce,tableRef:_e,virtualCellsCount:Me}=this.props,Ve=!!i,Je=!!r,rt=this.getResultStyles();return(0,as.bF)(1,"table",t,(0,as.bF)(1,"tbody",null,[Ve&&(0,as.sO)(2,r8,{height:i,cellsCount:Me??gP.cellsCount,leftVirtualCellWidth:V??gP.leftVirtualCellWidth,rightVirtualCellWidth:ce??gP.rightVirtualCellWidth,leftVirtualCellCount:A,rightVirtualCellCount:X}),m,Je&&(0,as.sO)(2,r8,{height:r,cellsCount:Me??gP.cellsCount,leftVirtualCellWidth:V??gP.leftVirtualCellWidth,rightVirtualCellWidth:ce??gP.rightVirtualCellWidth,leftVirtualCellCount:A,rightVirtualCellCount:X})],0),2,{style:(0,Ia.gs)(rt)},null,_e)}}return n.defaultProps=Are,n})(),Ire=(()=>{class n extends Ia.oe{constructor(){super(...arguments),this.allDayPanelData=null}createEffects(){return[(0,Ia.h2)()]}getAllDayPanelData(){return null!==this.allDayPanelData||(this.allDayPanelData=this.props.viewData.groupedData[0].allDayPanel),this.allDayPanelData}componentWillUpdate(t){super.componentWillUpdate(),this.props.viewData!==t.viewData&&(this.allDayPanelData=null)}render(){const{viewData:t,viewContext:i,width:r,tableRef:m,dataCellTemplate:A}=this.props,V=this.getAllDayPanelData(),X=Wl(A);return(0,as.sO)(2,p$,{className:"dx-scheduler-all-day-table",height:V?void 0:25,width:r,tableRef:m,children:(0,as.sO)(2,o8,{viewData:V??pP.viewData,viewContext:i,leftVirtualCellWidth:t.leftVirtualCellWidth??pP.leftVirtualCellWidth,rightVirtualCellWidth:t.rightVirtualCellWidth??pP.rightVirtualCellWidth,leftVirtualCellCount:t.leftVirtualCellCount,rightVirtualCellCount:t.rightVirtualCellCount,dataCellTemplate:X})})}}return n.defaultProps=h$,n})();const LU=(0,Lo.A)({},h$,{cellTemplate:kU});let Pre=(()=>{class n extends Ia.eh{render(){const{viewData:t,viewContext:i,addVerticalSizesClassToRows:r,cellTemplate:m,dataCellTemplate:A}=this.props,V=Qh_combineClasses({"dx-scheduler-date-table-row":!0,"dx-scheduler-cell-sizes-vertical":r}),X=Wl(m),ce=Wl(A);return(0,as.nl)(t.groupedData.map(_e=>{let{allDayPanel:Me,dateTable:Ve,isGroupedAllDayPanel:Je,key:rt}=_e;return(0,as.nl)([Je&&(0,as.sO)(2,o8,{viewData:Me??pP.viewData,viewContext:i,dataCellTemplate:ce,isVerticalGroupOrientation:!0,leftVirtualCellWidth:t.leftVirtualCellWidth??pP.leftVirtualCellWidth,rightVirtualCellWidth:t.rightVirtualCellWidth??pP.rightVirtualCellWidth,leftVirtualCellCount:t.leftVirtualCellCount,rightVirtualCellCount:t.rightVirtualCellCount}),Ve.map(Ct=>{let{cells:Xt,key:On}=Ct;return(0,as.sO)(2,hP,{className:V,leftVirtualCellWidth:t.leftVirtualCellWidth??Fx.leftVirtualCellWidth,rightVirtualCellWidth:t.rightVirtualCellWidth??Fx.rightVirtualCellWidth,leftVirtualCellCount:t.leftVirtualCellCount,rightVirtualCellCount:t.rightVirtualCellCount,children:Xt.map(Fn=>{let{key:oi,endDate:Yt,firstDayOfMonth:$t,groupIndex:xn,groups:Gn,index:qn,isFirstGroupCell:ii,isFocused:qi,isLastGroupCell:ji,isSelected:$i,otherMonth:ho,startDate:io,text:Uo,today:zr}=Fn;return X({key:oi,viewContext:i,isFirstGroupCell:ii,isLastGroupCell:ji,startDate:io,endDate:Yt,groups:Gn,groupIndex:xn,index:qn,dataCellTemplate:ce,text:Uo,today:zr,otherMonth:ho,firstDayOfMonth:$t,isSelected:$i,isFocused:qi})})},On)})],0,rt)}),0)}}return n.defaultProps=LU,n})();const Mre=["viewData","viewContext","tableRef","addDateTableClass","width","cellTemplate","dataCellTemplate","groupOrientation","addVerticalSizesClassToRows"],s8=(0,Lo.A)({},h$,{cellTemplate:kU});let a8=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const t=this.props,{viewData:i,viewContext:r,tableRef:m,addDateTableClass:A,width:V,cellTemplate:X,dataCellTemplate:ce,groupOrientation:_e,addVerticalSizesClassToRows:Me}=t,Ve=(0,fp.A)(t,Mre),Je=A?"dx-scheduler-date-table":void 0,rt=i.topVirtualRowHeight??0,Ct=i.bottomVirtualRowHeight??0,Xt=i.leftVirtualCellWidth??0,On=i.rightVirtualCellWidth??0,Fn=i.groupedData[0].dateTable[0].cells.length,oi=Wl(X),Yt=Wl(ce);return(0,as._B)((0,as.sO)(2,p$,(0,Lo.A)({},Ve,{tableRef:m,topVirtualRowHeight:rt,bottomVirtualRowHeight:Ct,leftVirtualCellWidth:Xt,rightVirtualCellWidth:On,leftVirtualCellCount:i.leftVirtualCellCount,rightVirtualCellCount:i.rightVirtualCellCount,virtualCellsCount:Fn,className:Je,width:V,children:(0,as.sO)(2,Pre,{viewData:i,viewContext:r,cellTemplate:oi,dataCellTemplate:Yt,leftVirtualCellWidth:Xt,rightVirtualCellWidth:On,groupOrientation:_e,addVerticalSizesClassToRows:Me,topVirtualRowHeight:LU.topVirtualRowHeight,bottomVirtualRowHeight:LU.bottomVirtualRowHeight,addDateTableClass:LU.addDateTableClass})})))}}return n.defaultProps=s8,n})();class BU extends _V{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=(0,Lo.A)({},this._optionsByReference,{dataCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["cellTemplate","dataCellTemplate"],props:["viewData","viewContext","cellTemplate","groupOrientation","leftVirtualCellWidth","rightVirtualCellWidth","topVirtualRowHeight","bottomVirtualRowHeight","addDateTableClass","addVerticalSizesClassToRows","width","dataCellTemplate"]}}get _viewComponent(){return a8}}(0,y.A)("dxDateTableLayoutBase",BU);class l8 extends BU{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["dataCellTemplate"],props:["viewData","viewContext","groupOrientation","leftVirtualCellWidth","rightVirtualCellWidth","topVirtualRowHeight","bottomVirtualRowHeight","addDateTableClass","addVerticalSizesClassToRows","width","dataCellTemplate"]}}get _viewComponent(){return Ire}}(0,y.A)("dxAllDayTable",l8);let Rre=(()=>{class n extends Ia.eh{constructor(){super(...arguments),this.contentTemplateProps=null}getContentTemplateProps(){if(null!==this.contentTemplateProps)return this.contentTemplateProps;const{index:t,text:i}=this.props;return this.contentTemplateProps={data:{text:i},index:t},this.contentTemplateProps}componentWillUpdate(t){(this.props.index!==t.index||this.props.text!==t.text)&&(this.contentTemplateProps=null)}render(){const{viewContext:t,dataCellTemplate:i,endDate:r,groupIndex:m,groups:A,index:V,isFirstGroupCell:X,isFocused:ce,isLastGroupCell:_e,isSelected:Me,startDate:Ve,text:Je,className:rt,firstDayOfMonth:Ct,otherMonth:Xt,today:On}=this.props,Fn=Qh_combineClasses({"dx-scheduler-date-table-other-month":!!Xt,"dx-scheduler-date-table-current-date":!!On,"dx-scheduler-date-table-first-of-month":!!Ct,[rt??""]:!!rt}),oi=this.getContentTemplateProps(),Yt=Wl(i);return(0,as.sO)(2,kU,{className:Fn,viewContext:t,dataCellTemplate:Yt,startDate:Ve,endDate:r,text:Je,groups:A,groupIndex:m,index:V,isFirstGroupCell:X,isLastGroupCell:_e,isSelected:Me,isFocused:ce,contentTemplateProps:oi,children:(0,as.bF)(1,"div","dx-scheduler-date-table-cell-text",Je,0)})}}return n.defaultProps=d$,n})();const kre=["viewData","viewContext","addDateTableClass","addVerticalSizesClassToRows","dataCellTemplate","groupOrientation","tableRef","width"];let Lre=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const t=this.props,{viewData:i,viewContext:r,addDateTableClass:m,addVerticalSizesClassToRows:A,dataCellTemplate:V,groupOrientation:X,tableRef:ce,width:_e}=t,Me=(0,fp.A)(t,kre),Ve=Wl(V);return(0,as._B)((0,as.sO)(2,a8,(0,Lo.A)({},Me,{viewData:i,viewContext:r,groupOrientation:X,addDateTableClass:m,dataCellTemplate:Ve,cellTemplate:Rre,tableRef:ce,addVerticalSizesClassToRows:A,width:_e})))}}return n.defaultProps=s8,n})();class c8 extends BU{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["cellTemplate","dataCellTemplate"],props:["viewData","viewContext","cellTemplate","groupOrientation","leftVirtualCellWidth","rightVirtualCellWidth","topVirtualRowHeight","bottomVirtualRowHeight","addDateTableClass","addVerticalSizesClassToRows","width","dataCellTemplate"]}}get _viewComponent(){return Lre}}(0,y.A)("dxMonthDateTableLayout",c8);const g$={groupPanelData:{groupPanelItems:[],baseColSpan:1},groupByDate:!1,styles:{}},d8={id:0,text:"",data:{id:0},className:""},u8={groupItems:[],className:""},h8=(0,Lo.A)({},d8,{isFirstGroupCell:!1,isLastGroupCell:!1,colSpan:1});let Bre=(()=>{class n extends Ia.eh{render(){const{cellTemplate:t,colSpan:i,color:r,data:m,id:A,index:V,text:X,className:ce,isFirstGroupCell:_e,isLastGroupCell:Me}=this.props,Ve=Qh_combineClasses({"dx-scheduler-group-header":!0,"dx-scheduler-first-group-cell":_e,"dx-scheduler-last-group-cell":Me,[ce??""]:!!ce}),Je=Wl(t);return(0,as.bF)(1,"th",Ve,(0,as.bF)(1,"div","dx-scheduler-group-header-content",Je?Je({data:{data:m,id:A,color:r,text:X},index:V}):(0,as.bF)(1,"div",null,X,0),0),2,{colSpan:i})}}return n.defaultProps=h8,n})(),Nre=(()=>{class n extends Ia.eh{render(){const{cellTemplate:t,className:i,groupItems:r}=this.props,m=Wl(t);return(0,as.bF)(1,"tr",`dx-scheduler-group-row ${i}`,r.map((A,V)=>{let{colSpan:X,color:ce,data:_e,id:Me,isFirstGroupCell:Ve,isLastGroupCell:Je,key:rt,text:Ct}=A;return(0,as.sO)(2,Bre,{text:Ct,id:Me,data:_e,index:V,color:ce,colSpan:X??h8.colSpan,isFirstGroupCell:!!Ve,isLastGroupCell:!!Je,cellTemplate:m},rt)}),0)}}return n.defaultProps=u8,n})(),Fre=(()=>{class n extends Ia.eh{constructor(){super(...arguments),this._groupPanelItems=null}getGroupPanelItems(){if(null!==this._groupPanelItems)return this._groupPanelItems;const{groupPanelData:{baseColSpan:t,groupPanelItems:i}}=this.props,r=i.reduceRight((m,A,V)=>{const X=m,ce=A.length;return X[V]=(V===i.length-1?ce:i[V+1].length)/ce*(V===i.length-1?t:m[V+1]),X},[...new Array(i.length)]);return this._groupPanelItems=i.map((m,A)=>{const V=r[A];return m.map(X=>(0,Lo.A)({},X,{colSpan:V}))}),this._groupPanelItems}componentWillUpdate(t){this.props.groupPanelData!==t.groupPanelData&&(this._groupPanelItems=null)}render(){const{resourceCellTemplate:t}=this.props,i=this.getGroupPanelItems(),r=Wl(t);return(0,as.nl)(i.map(m=>(0,as.sO)(2,Nre,{groupItems:m,cellTemplate:r},m[0].key)),0)}}return n.defaultProps=g$,n})(),Vre=(()=>{class n extends Ia.eh{render(){const{className:t,data:i,id:r,color:m,text:A,index:V,cellTemplate:X}=this.props,ce=Wl(X);return(0,as.bF)(1,"div",`dx-scheduler-group-header ${t}`,ce?ce({data:{data:i,id:r,color:m,text:A},index:V}):(0,as.bF)(1,"div","dx-scheduler-group-header-content",A,0),0)}}return n.defaultProps=d8,n})(),Hre=(()=>{class n extends Ia.eh{render(){const{className:t,groupItems:i,cellTemplate:r}=this.props,m=Wl(r);return(0,as.bF)(1,"div",`dx-scheduler-group-row ${t}`,i.map((A,V)=>{let{color:X,data:ce,id:_e,key:Me,text:Ve}=A;return(0,as.sO)(2,Vre,{text:Ve,id:_e,data:ce,index:V,color:X,cellTemplate:m},Me)}),0)}}return n.defaultProps=u8,n})(),Ure=(()=>{class n extends Ia.eh{render(){const{className:t,elementRef:i,groupPanelData:r,resourceCellTemplate:m,height:A,styles:V}=this.props,X=(0,Ia.gs)(Qh_addHeightToStyle(A,V)),ce=Wl(m);return(0,as.bF)(1,"div",t,(0,as.bF)(1,"div","dx-scheduler-group-flex-container",r.groupPanelItems.map(_e=>(0,as.sO)(2,Hre,{groupItems:_e,cellTemplate:ce},_e[0].key)),0),2,{style:X},null,i)}}return n.defaultProps=g$,n})();const CV=(0,Lo.A)({},g$,{groups:[],groupOrientation:E5});let f$=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const{className:t,viewContext:i,elementRef:r,groupPanelData:m,height:A,resourceCellTemplate:V,groupOrientation:X,groups:ce,styles:_e}=this.props,Me=Wl(V),Je=gU(ce,X)?Ure:Fre;return(0,as.sO)(2,Je,{viewContext:i,height:A,resourceCellTemplate:Me,className:t,groupPanelData:m,elementRef:r,styles:_e,groups:CV.groups,groupOrientation:CV.groupOrientation,groupByDate:CV.groupByDate})}}return n.defaultProps=CV,n})();class p8 extends _V{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=(0,Lo.A)({},this._optionsByReference,{resourceCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["resourceCellTemplate"],props:["viewContext","groups","groupOrientation","groupPanelData","groupByDate","height","className","resourceCellTemplate"]}}get _viewComponent(){return f$}}(0,y.A)("dxGroupPanel",p8);const zre={text:"",splitText:!1};let Gre=(()=>{class n extends Ia.eh{constructor(){super(...arguments),this._textCache=null}getTextParts(){if(null!==this._textCache)return this._textCache;const{text:t}=this.props;return this._textCache=t?t.split(" "):[""],this._textCache}componentWillUpdate(t){this.props.text!==t.text&&(this._textCache=null)}render(){const{splitText:t,text:i}=this.props,r=this.getTextParts();return(0,as.nl)(t?r.map(m=>(0,as.bF)(1,"div","dx-scheduler-header-panel-cell-date",(0,as.bF)(1,"span",null,m,0),2)):i,0)}}return n.defaultProps=zre,n})();const g8=(0,Lo.A)({},Am,{today:!1,colSpan:1,isWeekDayCell:!1,splitText:!1,isTimeCellTemplate:!1});let f8=(()=>{class n extends Ia.eh{render(){const{viewContext:{view:{type:t},crossScrollingEnabled:i},colSpan:r,dateCellTemplate:m,groupIndex:A,groups:V,index:X,isTimeCellTemplate:ce,splitText:_e,startDate:Me,text:Ve,timeCellTemplate:Je,className:rt,isFirstGroupCell:Ct,isLastGroupCell:Xt,isWeekDayCell:On,today:Fn}=this.props,oi=Qh_getCellSizeHorizontalClass(t,i),Yt=Qh_combineClasses({"dx-scheduler-header-panel-cell":!0,[oi]:!0,"dx-scheduler-header-panel-current-time-cell":Fn,"dx-scheduler-header-panel-week-cell":On,[rt??""]:!!rt}),$t=Qh_getGroupCellClasses(Ct,Xt,Yt),xn=!ce&&!!m||ce&&!!Je,Gn=Wl(Je),qn=Wl(m),ii=xn?(0,as.nl)([ce&&Gn&&Gn({data:{date:Me,text:Ve,groups:V,groupIndex:A},index:X}),!ce&&qn&&qn({data:{date:Me,text:Ve,groups:V,groupIndex:A},index:X})],0):(0,as.sO)(2,Gre,{splitText:_e,text:Ve});return(0,as.bF)(1,"th",$t,ii,0,{colSpan:r,title:Ve})}}return n.defaultProps=g8,n})();const{isMaterialBased:Wre}=Cne_getThemeType(),m8={groupOrientation:"horizontal",groupByDate:!1,groups:[]};let $re=(()=>{class n extends Ia.eh{render(){const{viewContext:t,dateCellTemplate:i,dateHeaderData:{dataMap:r,leftVirtualCellCount:m,leftVirtualCellWidth:A,rightVirtualCellCount:V,rightVirtualCellWidth:X},groupByDate:ce,groupOrientation:_e,groups:Me}=this.props,Ve=hV(Me,_e)&&!ce,Je=Wl(i);return(0,as.nl)(r.map((rt,Ct)=>(0,as.sO)(2,hP,{className:"dx-scheduler-header-row",leftVirtualCellWidth:A,leftVirtualCellCount:m,rightVirtualCellWidth:X,rightVirtualCellCount:V,isHeaderRow:!0,children:rt.map(Xt=>{let{colSpan:On,endDate:Fn,groupIndex:oi,groups:Yt,index:$t,isFirstGroupCell:xn,isLastGroupCell:Gn,key:qn,startDate:ii,text:qi,today:ji}=Xt;return(0,as.sO)(2,f8,{viewContext:t,startDate:ii,endDate:Fn,groups:Ve?Yt:void 0,groupIndex:Ve?oi:void 0,today:ji??!1,isWeekDayCell:!1,isTimeCellTemplate:!1,index:$t,text:qi,isFirstGroupCell:xn,isLastGroupCell:Gn,dateCellTemplate:Je,colSpan:On,splitText:Wre},qn)})},Ct.toString())),0)}}return n.defaultProps=m8,n})();const _8=(0,Lo.A)({},CV,{isRenderDateHeader:!0,dateHeaderTemplate:$re});let v8=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const{viewContext:t,dateHeaderData:i,groupByDate:r,groupOrientation:m,groupPanelData:A,groups:V,isRenderDateHeader:X,dateCellTemplate:ce,dateHeaderTemplate:_e,resourceCellTemplate:Me,timeCellTemplate:Ve}=this.props,Je=hV(V,m),rt=Wl(ce),Ct=Wl(_e),Xt=Wl(Me),On=Wl(Ve);return(0,as.bF)(1,"thead",null,[Je&&!r&&(0,as.sO)(2,f$,{viewContext:t,groupPanelData:A,groups:V,groupByDate:r,groupOrientation:m,resourceCellTemplate:Xt}),X&&Ct({viewContext:t,groupByDate:r,dateHeaderData:i,groupOrientation:m,groups:V,dateCellTemplate:rt,timeCellTemplate:On}),r&&(0,as.sO)(2,f$,{viewContext:t,groupPanelData:A,groups:V,groupByDate:r,groupOrientation:m,resourceCellTemplate:Xt})],0)}}return n.defaultProps=_8,n})();class NU extends _V{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=(0,Lo.A)({},this._optionsByReference,{dateHeaderData:!0,resourceCellTemplate:!0,dateCellTemplate:!0,timeCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["dateCellTemplate","timeCellTemplate","dateHeaderTemplate","resourceCellTemplate"],props:["viewContext","dateHeaderData","isRenderDateHeader","dateCellTemplate","timeCellTemplate","dateHeaderTemplate","groups","groupOrientation","groupPanelData","groupByDate","height","className","resourceCellTemplate"]}}get _viewComponent(){return v8}}(0,y.A)("dxHeaderPanelLayout",NU);const{isMaterialBased:jre}=C5();let Kre=(()=>{class n extends Ia.eh{render(){const{viewContext:t,groupByDate:i,groupOrientation:r,groups:m,dateHeaderData:A,dateCellTemplate:V,timeCellTemplate:X}=this.props,{dataMap:ce,isMonthDateHeader:_e,leftVirtualCellCount:Me,leftVirtualCellWidth:Ve,rightVirtualCellCount:Je,rightVirtualCellWidth:rt,weekDayLeftVirtualCellCount:Ct,weekDayLeftVirtualCellWidth:Xt,weekDayRightVirtualCellCount:On,weekDayRightVirtualCellWidth:Fn}=A,oi=hV(m,r)&&!i,Yt=Wl(V),$t=Wl(X);return(0,as.nl)(ce.map((xn,Gn)=>{const qn=ce.length,ii=qn-1===Gn,qi=qn>1&&0===Gn,ji=jre&&(_e||qi);let $i=Me,ho=Je,io=rt,Uo=Ve;return qi&&($i=Ct,ho=On,io=Fn,Uo=Xt),(0,as.sO)(2,hP,{className:"dx-scheduler-header-row",leftVirtualCellWidth:Uo??Fx.leftVirtualCellWidth,leftVirtualCellCount:$i,rightVirtualCellWidth:io??Fx.rightVirtualCellWidth,rightVirtualCellCount:ho,children:xn.map(zr=>{let{colSpan:Os,endDate:wa,groupIndex:$l,groups:Gc,index:Jd,isFirstGroupCell:Dg,isLastGroupCell:xh,key:wo,startDate:dr,text:Cr,today:Hr}=zr;return(0,as.sO)(2,f8,{viewContext:t,startDate:dr,endDate:wa,groups:oi?Gc:void 0,groupIndex:oi?$l:void 0,today:Hr??g8.today,index:Jd,text:Cr,isFirstGroupCell:Dg,isLastGroupCell:xh,isWeekDayCell:qi,colSpan:Os,splitText:ji,dateCellTemplate:Yt,timeCellTemplate:$t,isTimeCellTemplate:ii},wo)})},Gn.toString())}),0)}}return n.defaultProps=m8,n})(),Xre=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const{viewContext:t,dateCellTemplate:i,dateHeaderData:r,groupByDate:m,groupOrientation:A,groupPanelData:V,groups:X,isRenderDateHeader:ce,resourceCellTemplate:_e,timeCellTemplate:Me}=this.props,Ve=Wl(i),Je=Wl(_e),rt=Wl(Me);return(0,as.sO)(2,v8,{viewContext:t,dateHeaderData:r,groupPanelData:V,groupByDate:m,groups:X,groupOrientation:A,isRenderDateHeader:ce,dateHeaderTemplate:Kre,resourceCellTemplate:Je,dateCellTemplate:Ve,timeCellTemplate:rt})}}return n.defaultProps=_8,n})();class C8 extends NU{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["dateCellTemplate","timeCellTemplate","dateHeaderTemplate","resourceCellTemplate"],props:["viewContext","dateHeaderData","isRenderDateHeader","dateCellTemplate","timeCellTemplate","dateHeaderTemplate","groups","groupOrientation","groupPanelData","groupByDate","height","className","resourceCellTemplate"]}}get _viewComponent(){return Xre}}(0,y.A)("dxTimelineHeaderPanelLayout",C8);let Yre=(()=>{class n extends Ia.eh{constructor(){super(...arguments),this.timeCellTemplateProps=null}getTimeCellTemplateProps(){if(null!==this.timeCellTemplateProps)return this.timeCellTemplateProps;const{groupIndex:t,groups:i,index:r,startDate:m,text:A}=this.props;return this.timeCellTemplateProps={data:{date:m,groups:i,groupIndex:t,text:A},index:r},this.timeCellTemplateProps}componentWillUpdate(t){(this.props.groupIndex!==t.groupIndex||this.props.groups!==t.groups||this.props.index!==t.index||this.props.startDate!==t.startDate||this.props.text!==t.text)&&(this.timeCellTemplateProps=null)}render(){const{className:t,viewContext:i,highlighted:r,isFirstGroupCell:m,isLastGroupCell:A,text:V,timeCellTemplate:X}=this.props,ce=Qh_getCellSizeVerticalClass(!1),_e=Qh_combineClasses({"dx-scheduler-time-panel-cell":!0,[ce]:!0,"dx-scheduler-time-panel-current-time-cell":!!r,[t??""]:!0}),Me=this.getTimeCellTemplateProps(),Ve=Wl(X);return(0,as.sO)(2,c$,{className:_e,viewContext:i,isFirstGroupCell:m,isLastGroupCell:A,startDate:Am.startDate,endDate:Am.endDate,index:Am.index,children:Ve?Ve({index:Me.index,data:Me.data}):(0,as.bF)(1,"div",null,V,0)})}}return n.defaultProps=Am,n})();const Zre=["timePanelData","viewContext","tableRef","timeCellTemplate"],Qre={timePanelData:{groupedData:[],leftVirtualCellCount:0,rightVirtualCellCount:0,topVirtualRowCount:0,bottomVirtualRowCount:0}};let Jre=(()=>{class n extends Ia.oe{createEffects(){return[(0,Ia.h2)()]}render(){const t=this.props,{timePanelData:i,viewContext:r,tableRef:m,timeCellTemplate:A}=t,V=(0,fp.A)(t,Zre),{topVirtualRowHeight:X,bottomVirtualRowHeight:ce}=i,_e=Wl(A);return(0,as._B)((0,as.sO)(2,p$,(0,Lo.A)({},V,{className:"dx-scheduler-time-panel",topVirtualRowHeight:X??0,bottomVirtualRowHeight:ce??0,virtualCellsCount:1,tableRef:m,children:i.groupedData.map(Me=>{let{dateTable:Ve,groupIndex:Je,isGroupedAllDayPanel:rt,key:Ct}=Me;return(0,as.nl)([rt&&(0,as.sO)(2,hP,{leftVirtualCellWidth:Fx.leftVirtualCellWidth,rightVirtualCellWidth:Fx.rightVirtualCellWidth,children:(0,as.sO)(2,c$,{className:"dx-scheduler-time-panel-title-cell",viewContext:r,startDate:Am.startDate,endDate:Am.endDate,index:Am.index,children:(0,as.sO)(2,t8)})}),Ve.map(Xt=>{let{groups:On,highlighted:Fn,index:oi,isFirstGroupCell:Yt,isLastGroupCell:$t,key:xn,startDate:Gn,text:qn}=Xt;return(0,as.sO)(2,hP,{className:"dx-scheduler-time-panel-row",leftVirtualCellWidth:Fx.leftVirtualCellWidth,rightVirtualCellWidth:Fx.rightVirtualCellWidth,children:(0,as.sO)(2,Yre,{viewContext:r,startDate:Gn,endDate:Am.endDate,text:qn,groups:On,groupIndex:Je,isFirstGroupCell:Yt,isLastGroupCell:$t,index:oi,timeCellTemplate:_e,highlighted:Fn})},xn)})],0,Ct)})})))}}return n.defaultProps=Qre,n})();class y8 extends _V{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=(0,Lo.A)({},this._optionsByReference,{timeCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["timeCellTemplate"],props:["viewContext","groupOrientation","timePanelData","timeCellTemplate"]}}get _viewComponent(){return Jre}}(0,y.A)("dxTimePanelTableLayout",y8);const b8=class qre extends Sl.A{notifyObserver(e,t){const i=this.option("observer");i&&i.fire(e,t)}invoke(){const e=this.option("observer");if(e)return e.fire.apply(e,arguments)}};class nse{constructor(e){this.scheduler=e,this.workspace=this.scheduler._workSpace,this.appointments=this.scheduler._appointments,this.initialPosition={left:0,top:0},this.appointmentInfo=null,this.dragBetweenComponentsPromise=null}isAllDay(e){return e.data("dxAppointmentSettings").allDay}onDragStart(e){const{itemSettings:t,itemData:i,initialPosition:r}=e;this.initialPosition=r,this.appointmentInfo={appointment:i,settings:t},this.appointments.notifyObserver("hideAppointmentTooltip")}onDragMove(e){e.fromComponent!==e.toComponent&&this.appointments.notifyObserver("removeDroppableCellClass")}getAppointmentElement(e){return(0,a.A)(e.event.data&&e.event.data.itemElement||e.itemElement)}onDragEnd(e){const t=this.getAppointmentElement(e),i=this.appointments._getItemData(t);this.appointments._getAppointmentContainer(this.isAllDay(t)).append(t);const m=this.workspace.getDroppableCellIndex(),A=this.workspace.getCellIndexByCoordinates(this.initialPosition);this.appointments.notifyObserver("updateAppointmentAfterDrag",{event:e,element:t,rawAppointment:i,newCellIndex:m,oldCellIndex:A})}onDragCancel(){this.removeDroppableClasses()}getItemData(e){const t=(0,a.A)(e).data(IW),i=t?.appointment,r=this.appointments._getItemData(e);return i||r}getItemSettings(e){const t=(0,a.A)(e).data(IW);return t&&t.settings||[]}createDragStartHandler(e,t){return i=>{i.itemData=this.getItemData(i.itemElement),i.itemSettings=this.getItemSettings(i.itemElement),t.onDragStart&&t.onDragStart(i),i.cancel||e.onDragStart(i)}}createDragMoveHandler(e,t){return i=>{t.onDragMove&&t.onDragMove(i),i.cancel||e.onDragMove(i)}}createDragEndHandler(e,t){return i=>{const r=this.appointments.invoke("getUpdatedData",i.itemData);this.appointmentInfo=null,i.toItemData=(0,_.X)({},i.itemData,r),t.onDragEnd&&t.onDragEnd(i),i.cancel||(e.onDragEnd(i),i.fromComponent!==i.toComponent&&t.onRemove&&t.onRemove(i)),!0===i.cancel&&this.removeDroppableClasses(),!0!==i.cancel&&function ese(n){return"dxScheduler"===n.NAME}(i.toComponent)&&(i.toComponent._getDragBehavior().dragBetweenComponentsPromise=new g.cY)}}createDropHandler(e){return t=>{const i=this.appointments.invoke("getUpdatedData",t.itemData);t.itemData=(0,_.X)({},t.itemData,i),t.fromComponent!==t.toComponent&&e.onAdd&&e.onAdd(t),this.dragBetweenComponentsPromise&&this.dragBetweenComponentsPromise.resolve()}}addTo(e,t){const i=this.scheduler.option("appointmentDragging")||{},r=(0,_.X)({component:this.scheduler,contentTemplate:null,filter:".dx-scheduler-appointment",immediate:!1,onDragStart:this.onDragStart.bind(this),onDragMove:this.onDragMove.bind(this),onDragEnd:this.onDragEnd.bind(this),onDragCancel:this.onDragCancel.bind(this)},t);this.appointments._createComponent(e,AS.A,(0,_.X)({},r,i,{onDragStart:this.createDragStartHandler(r,i),onDragMove:this.createDragMoveHandler(r,i),onDragEnd:this.createDragEndHandler(r,i),onDrop:this.createDropHandler(i),onCancelByEsc:!0}))}updateDragSource(e,t){const{appointmentInfo:i}=this;(i||e)&&this.appointments._setDragSourceAppointment(e||i.appointment,t||i.settings)}removeDroppableClasses(){this.appointments._removeDragSourceClassFromDraggedAppointment(),this.workspace.removeDroppableCellClass()}}const x8="dx-scheduler-date-time-shader",S8=class ise{constructor(e){this._workSpace=e,this._$container=this._workSpace._dateTableScrollable.$content()}render(){this.initShaderElements(),this.renderShader(),this._shader.forEach(e=>{this._$container.append(e)})}initShaderElements(){this._$shader=this.createShader(),this._shader=[],this._shader.push(this._$shader)}renderShader(){}createShader(){return(0,a.A)("<div>").addClass(x8)}clean(){this._$container&&this._$container.find(`.${x8}`).remove()}},E8="dx-scheduler-date-time-shader-all-day",ase=class sse extends S8{renderShader(){let e=this._getShaderHeight();const t=this._getShaderMaxHeight(),i=e>t;e>t&&(e=t),(0,D.k$)(this._$shader,e);const r=this._workSpace._getGroupCount()||1;this._workSpace.isGroupedByDate()?this._renderGroupedByDateShaderParts(r,e,t,i):this._renderShaderParts(r,e,t,i)}_renderShaderParts(e,t,i,r){for(let m=0;m<e;m++){const A=this._getShaderWidth(m);this._renderTopShader(this._$shader,t,A,m),!r&&this._renderBottomShader(this._$shader,i,t,A,m),this._renderAllDayShader(A,m)}}_renderGroupedByDateShaderParts(e,t,i,r){const m=this._getShaderWidth(0);let A=m-this._workSpace.getCellWidth();t<0&&(t=0,A=m),this._renderTopShader(this._$shader,t,m*e,0),!r&&this._renderBottomShader(this._$shader,i,t,A*e+this._workSpace.getCellWidth(),0),this._renderAllDayShader(m*e,0)}_renderTopShader(e,t,i,r){this._$topShader=(0,a.A)("<div>").addClass("dx-scheduler-date-time-shader-top"),i&&(0,D.zj)(this._$topShader,i),t&&(0,D.k$)(this._$topShader,t),this._$topShader.css("marginTop",this._getShaderTopOffset(r)),this._$topShader.css("left",this._getShaderOffset(r,i)),e.append(this._$topShader)}_renderBottomShader(e,t,i,r,m){this._$bottomShader=(0,a.A)("<div>").addClass("dx-scheduler-date-time-shader-bottom");const A=i<0?r:r-this._workSpace.getCellWidth(),V=i<0?t:t-i;(0,D.zj)(this._$bottomShader,A),(0,D.k$)(this._$bottomShader,V),this._$bottomShader.css("left",this._getShaderOffset(m,r-this._workSpace.getCellWidth())),e.append(this._$bottomShader)}_renderAllDayShader(e,t){this._workSpace.option("showAllDayPanel")&&(this._$allDayIndicator=(0,a.A)("<div>").addClass(E8),(0,D.k$)(this._$allDayIndicator,this._workSpace.getAllDayHeight()),(0,D.zj)(this._$allDayIndicator,e),this._$allDayIndicator.css("left",this._getShaderOffset(t,e)),this._workSpace._$allDayPanel.prepend(this._$allDayIndicator))}_getShaderOffset(e,t){return this._workSpace.getGroupedStrategy().getShaderOffset(e,t)}_getShaderTopOffset(e){return this._workSpace.getGroupedStrategy().getShaderTopOffset(e)}_getShaderHeight(){return this._workSpace.getGroupedStrategy().getShaderHeight()}_getShaderMaxHeight(){return this._workSpace.getGroupedStrategy().getShaderMaxHeight()}_getShaderWidth(e){return this._workSpace.getGroupedStrategy().getShaderWidth(e)}clean(){super.clean(),this._workSpace&&this._workSpace._$allDayPanel&&this._workSpace._$allDayPanel.find(`.${E8}`).remove()}};class O8{constructor(){this._cache=new Map}get size(){return this._cache.size}clear(){this._cache.clear()}get(e,t){return!this._cache.has(e)&&t&&this.set(e,t()),this._cache.get(e)}set(e,t){(0,C.O9)(t)&&this._cache.set(e,t)}}class lse{handleArrowClick(e){const{key:t,focusedCellPosition:i,edgeIndices:r,getCellDataByPosition:m,isAllDayPanelCell:A}=e;let V;switch(t){case"down":V=this.getCellFromNextRowPosition(i,"next",r);break;case"up":V=this.getCellFromNextRowPosition(i,"prev",r);break;case"left":V=this.getCellFromNextColumnPosition((0,Lo.A)({},e,{direction:"prev"}));break;case"right":V=this.getCellFromNextColumnPosition((0,Lo.A)({},e,{direction:"next"}))}const X=m(V.rowIndex,V.columnIndex,A);return this.moveToCell((0,Lo.A)({},e,{currentCellData:X}))}getCellFromNextRowPosition(e,t,i){const{columnIndex:r,rowIndex:m}=e,V=m+("next"===t?1:-1);return{columnIndex:r,rowIndex:V>=0&&V<=i.lastRowIndex?V:m}}getCellFromNextColumnPosition(e){const{focusedCellPosition:t,direction:i,edgeIndices:r,isRTL:m,isGroupedByDate:A,groupCount:V,isMultiSelection:X,viewType:ce}=e,{columnIndex:_e,rowIndex:Me}=t,{firstColumnIndex:Ve,lastColumnIndex:Je,firstRowIndex:rt,lastRowIndex:Ct}=r,Xt=A&&X?V:1,On=m?-1:1,oi=_e+("next"===i?On*Xt:-1*On*Xt);return oi>=Ve&&oi<=Je?{columnIndex:oi,rowIndex:Me}:sP(ce)?t:this._processEdgeCell({nextColumnIndex:oi,rowIndex:Me,columnIndex:_e,firstColumnIndex:Ve,lastColumnIndex:Je,firstRowIndex:rt,lastRowIndex:Ct,step:Xt})}_processEdgeCell(e){const{nextColumnIndex:t,rowIndex:i,columnIndex:r,firstColumnIndex:m,lastColumnIndex:A,firstRowIndex:V,lastRowIndex:X,step:ce}=e;let _e=t,Me=i;if(t<m){const Ct=i-1,Xt=Ct>=V;Me=Xt?Ct:i,_e=Xt?A-(ce-r%ce-1):r}if(t>A){const Ct=i+1,Xt=Ct<=X;Me=Xt?Ct:i,_e=Xt?m+r%ce:r}return{columnIndex:_e,rowIndex:Me}}moveToCell(e){const{isMultiSelection:t,isMultiSelectionAllowed:i,focusedCellData:r,currentCellData:m}=e;return t&&i?this._getNextCellData(m,r):m}_getNextCellData(e,t,i){return i?t:this._isValidNextFocusedCell(e,t)?e:t}_isValidNextFocusedCell(e,t){if(!t)return!0;const{groupIndex:i,allDay:r}=t,{groupIndex:m,allDay:A}=e;return i===m&&r===A}}class cse{constructor(e){this._viewDataProvider=e,this._focusedCell=null,this._selectedCells=null,this._firstSelectedCell=null,this._prevFocusedCell=null,this._prevSelectedCells=null}get viewDataProvider(){return this._viewDataProvider}get focusedCell(){const e=this._focusedCell;if(!e)return;const{groupIndex:t,startDate:i,allDay:r}=e;return{coordinates:this.viewDataProvider.findCellPositionInMap({groupIndex:t,startDate:i,isAllDay:r,index:e.index}),cellData:e}}setFocusedCell(e,t,i){if(e>=0){const r=this._viewDataProvider.getCellData(e,t,i);this._focusedCell=r}}setSelectedCells(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const i=this._viewDataProvider,{rowIndex:r,columnIndex:m,allDay:A}=e;if(r<0)return;const V=t?i.getCellData(t.rowIndex,t.columnIndex,t.allDay):this._firstSelectedCell,X=i.getCellData(r,m,A);this._firstSelectedCell=V,this._selectedCells=this._viewDataProvider.getCellsBetween(V,X)}setSelectedCellsByData(e){this._selectedCells=e}getSelectedCells(){return this._selectedCells}releaseSelectedAndFocusedCells(){this.releaseSelectedCells(),this.releaseFocusedCell()}releaseSelectedCells(){this._prevSelectedCells=this._selectedCells,this._prevFirstSelectedCell=this._firstSelectedCell,this._selectedCells=null,this._firstSelectedCell=null}releaseFocusedCell(){this._prevFocusedCell=this._focusedCell,this._focusedCell=null}restoreSelectedAndFocusedCells(){this._selectedCells=this._selectedCells||this._prevSelectedCells,this._focusedCell=this._focusedCell||this._prevFocusedCell,this._firstSelectedCell=this._firstSelectedCell||this._prevFirstSelectedCell,this._prevSelectedCells=null,this._prevFirstSelectedCell=null,this._prevFocusedCell=null}clearSelectedAndFocusedCells(){this._prevSelectedCells=null,this._selectedCells=null,this._prevFocusedCell=null,this._focusedCell=null}}const w8=(0,N.b4)("scroll","dxSchedulerVirtualScrolling");class use{constructor(e){this.options=e,e&&(this._rowHeight=this.getCellHeight(),this._cellWidth=this.getCellWidth(),this._createVirtualScrollingBase())}get isRTL(){return this.options.isRTL()}get verticalVirtualScrolling(){return this._verticalVirtualScrolling}set verticalVirtualScrolling(e){this._verticalVirtualScrolling=e}get horizontalVirtualScrolling(){return this._horizontalVirtualScrolling}set horizontalVirtualScrolling(e){this._horizontalVirtualScrolling=e}get document(){return c.A.getDocument()}get height(){return this.options.getSchedulerHeight()}get width(){return this.options.getSchedulerWidth()}get rowHeight(){return this._rowHeight}set rowHeight(e){this._rowHeight=e}get outlineCount(){return this.options.getScrolling().outlineCount}get cellWidth(){return this._cellWidth}set cellWidth(e){this._cellWidth=e}get viewportWidth(){const e=this.width&&this.options.getViewWidth();return e>0?e:this.options.getWindowWidth()}get viewportHeight(){const e=this.height&&this.options.getViewHeight();return e>0?e:this.options.getWindowHeight()}get cellCountInsideTopVirtualRow(){var e;return(null===(e=this.verticalScrollingState)||void 0===e?void 0:e.virtualItemCountBefore)||0}get cellCountInsideLeftVirtualCell(){var e;return(null===(e=this.horizontalScrollingState)||void 0===e?void 0:e.virtualItemCountBefore)||0}get cellCountInsideRightVirtualCell(){var e;return(null===(e=this.horizontalScrollingState)||void 0===e?void 0:e.virtualItemCountAfter)||0}get topVirtualRowsCount(){return this.cellCountInsideTopVirtualRow>0?1:0}get leftVirtualCellsCount(){return Math.ceil((this.isRTL?this.cellCountInsideRightVirtualCell:this.cellCountInsideLeftVirtualCell)/1e3)}get virtualRowOffset(){var e;return(null===(e=this.verticalScrollingState)||void 0===e?void 0:e.virtualItemSizeBefore)||0}get virtualCellOffset(){var e;return(null===(e=this.horizontalScrollingState)||void 0===e?void 0:e.virtualItemSizeBefore)||0}get scrollingState(){var e,t;return{vertical:null===(e=this.verticalVirtualScrolling)||void 0===e?void 0:e.state,horizontal:null===(t=this.horizontalVirtualScrolling)||void 0===t?void 0:t.state}}get verticalScrollingState(){return this.scrollingState.vertical}get horizontalScrollingState(){return this.scrollingState.horizontal}get scrollingOrientation(){const e=this.options.getScrolling();return"standard"===e.mode?"none":e.orientation||"both"}get verticalScrollingAllowed(){return"vertical"===this.scrollingOrientation||"both"===this.scrollingOrientation}get horizontalScrollingAllowed(){return"horizontal"===this.scrollingOrientation||"both"===this.scrollingOrientation}setViewOptions(e){this.options=e,this.verticalVirtualScrolling&&(this.verticalVirtualScrolling.options=e,this.verticalVirtualScrolling.itemSize=this.rowHeight,this.verticalVirtualScrolling.viewportSize=this.viewportHeight),this.horizontalVirtualScrolling&&(this.horizontalVirtualScrolling.options=e,this.verticalVirtualScrolling.itemSize=this.cellWidth,this.verticalVirtualScrolling.viewportSize=this.viewportWidth)}getRenderState(){var e,t;const i=(null===(e=this.verticalVirtualScrolling)||void 0===e?void 0:e.getRenderState())||{},r=(null===(t=this.horizontalVirtualScrolling)||void 0===t?void 0:t.getRenderState())||{};return(0,Lo.A)({},i,r)}getCellHeight(){const e=this.options.getCellHeight();return Math.floor(e>0?e:50)}getCellWidth(){let e=this.options.getCellWidth();const t=this.options.getCellMinWidth();return(!e||e<t)&&(e=t),Math.floor(e>0?e:1)}calculateCoordinatesByDataAndPosition(e,t,i,r,m){const{rowIndex:A,columnIndex:V}=t,{startDate:X,endDate:ce,allDay:_e}=e,Me=i.getTime(),Ve=X.getTime(),Je=ce.getTime(),rt=_e||!r?0:(Me-Ve)/(Je-Ve),Ct=this.getCellWidth(),Xt=this.getCellHeight(),On=m?(A+rt)*Xt:A*Xt;let Fn=m?V*Ct:(V+rt)*Ct;return this.isRTL&&(Fn=this.options.getScrollableOuterWidth()-Fn),{top:On,left:Fn}}dispose(){this._onScrollHandler&&L.A.off(this.document,w8,this._onScrollHandler)}createVirtualScrolling(){(this.verticalScrollingAllowed!==!!this.verticalVirtualScrolling||this.horizontalScrollingAllowed!==!!this.horizontalVirtualScrolling)&&(this._rowHeight=this.getCellHeight(),this._cellWidth=this.getCellWidth(),this._createVirtualScrollingBase())}_createVirtualScrollingBase(){this.verticalScrollingAllowed&&(this.verticalVirtualScrolling=new hse((0,Lo.A)({},this.options,{viewportHeight:this.viewportHeight,rowHeight:this.rowHeight,outlineCount:this.outlineCount}))),this.horizontalScrollingAllowed&&(this.horizontalVirtualScrolling=new pse((0,Lo.A)({},this.options,{viewportWidth:this.viewportWidth,cellWidth:this.cellWidth,outlineCount:this.outlineCount})))}isAttachWindowScrollEvent(){return(this.horizontalScrollingAllowed||this.verticalScrollingAllowed)&&!this.height}attachScrollableEvents(){this.isAttachWindowScrollEvent()&&this._attachWindowScroll()}_attachWindowScroll(){const e=(0,gr.zk)();this._onScrollHandler=this.options.createAction(()=>{const{scrollX:t,scrollY:i}=e;(t>=10||i>=10)&&this.handleOnScrollEvent({left:t,top:i})}),L.A.on(this.document,w8,this._onScrollHandler)}handleOnScrollEvent(e){if(e){var t,i;const{left:A,top:V}=e,X=(0,C.O9)(V)&&(null===(t=this.verticalVirtualScrolling)||void 0===t?void 0:t.updateState(V)),ce=(0,C.O9)(A)&&(null===(i=this.horizontalVirtualScrolling)||void 0===i?void 0:i.updateState(A));var r,m;(X||ce)&&(null===(r=(m=this.options).updateRender)||void 0===r||r.call(m))}}updateDimensions(e){const t=this.getCellHeight(),i=this.verticalScrollingAllowed&&t!==this.rowHeight;(i||e)&&this.verticalVirtualScrolling&&(this.rowHeight=t,this.verticalVirtualScrolling.viewportSize=this.viewportHeight,this.verticalVirtualScrolling.reinitState(t,e));const r=this.getCellWidth(),m=this.horizontalScrollingAllowed&&r!==this.cellWidth;var A,V;(m||e)&&this.horizontalVirtualScrolling&&(this.cellWidth=r,this.horizontalVirtualScrolling.viewportSize=this.viewportWidth,this.horizontalVirtualScrolling.reinitState(r,e)),(i||m)&&(null===(A=(V=this.options).updateGrid)||void 0===A||A.call(V))}}class T8{constructor(e){this.options=e,this._state=this.defaultState,this.viewportSize=this.options.viewportSize,this._itemSize=this.options.itemSize,this._position=-1,this._itemSizeChanged=!1,this.updateState(0)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSizeChanged=this._itemSize!==e,this._itemSize=e}get state(){return this._state}set state(e){this._state=e}get startIndex(){return this.state.startIndex}get pageSize(){return Math.ceil(this.viewportSize/this.itemSize)}get outlineCount(){return(0,C.O9)(this.options.outlineCount)?this.options.outlineCount:Math.floor(this.pageSize/2)}get groupCount(){return this.options.getGroupCount()}get isVerticalGrouping(){return this.options.isVerticalGrouping()}get defaultState(){return{prevPosition:0,startIndex:-1,itemCount:0,virtualItemCountBefore:0,virtualItemCountAfter:0,outlineCountBefore:0,outlineCountAfter:0,virtualItemSizeBefore:0,virtualItemSizeAfter:0,outlineSizeBefore:0,outlineSizeAfter:0}}get maxScrollPosition(){return this.getTotalItemCount()*this.itemSize-this.viewportSize}get position(){return this._position}set position(e){this._position=e}needUpdateState(e){const{prevPosition:t,startIndex:i}=this.state;if(i<0)return!0;let m=!1;if(this._validateAndSavePosition(e)){if(0===e||e===this.maxScrollPosition)return!0;const V=Math.floor(t/this.itemSize),X=Math.floor(e/this.itemSize);m=Math.abs(V-X)>=this.outlineCount}return m}_validateAndSavePosition(e){if(!(0,C.O9)(e))return!1;const t=this.position!==e;return this.position=e,t}_correctPosition(e){return e>=0?Math.min(e,this.maxScrollPosition):-1}updateState(e,t){if(e=this._correctPosition(e),!this.needUpdateState(e)&&!t)return!1;const i=this._calcItemInfoBefore(e),r=this._calcItemDeltaBefore(i),{outlineCountAfter:m,virtualItemCountAfter:A,itemCountWithAfter:V}=this._calcItemInfoAfter(r),{virtualItemCountBefore:X,outlineCountBefore:ce}=i,_e=ce+V+m,Me=Math.floor(e/this.itemSize);return this.state.prevPosition=Me*this.itemSize,this.state.startIndex=Me-ce,this.state.virtualItemCountBefore=X,this.state.outlineCountBefore=ce,this.state.itemCount=_e,this.state.outlineCountAfter=m,this.state.virtualItemCountAfter=A,this._updateStateCore(),!0}reinitState(e,t){const{position:i}=this;this.itemSize=e,this.updateState(0,t),i>0&&this.updateState(i,t)}_calcItemInfoBefore(e){let t=Math.floor(e/this.itemSize);const i=Math.min(t,this.outlineCount);return t-=i,{virtualItemCountBefore:t,outlineCountBefore:i}}_calcItemDeltaBefore(e){const{virtualItemCountBefore:t,outlineCountBefore:i}=e;return this.getTotalItemCount()-t-i}getTotalItemCount(){throw"getTotalItemCount method should be implemented"}getRenderState(){throw"getRenderState method should be implemented"}_calcItemInfoAfter(e){const t=e>=this.pageSize?this.pageSize:e;let i=e-t;const r=i>0?Math.min(i,this.outlineCount):0;return i>0&&(i-=r),{virtualItemCountAfter:i,outlineCountAfter:r,itemCountWithAfter:t}}_updateStateCore(){const{state:e}=this,{virtualItemCountBefore:t}=e,{virtualItemCountAfter:i}=e,{outlineCountBefore:r}=e,{outlineCountAfter:m}=e,_e=this.itemSize*t,Me=this.itemSize*i;(this._itemSizeChanged||e.virtualItemSizeBefore+e.outlineSizeBefore<_e+this.itemSize*r||e.virtualItemSizeAfter+e.outlineSizeAfter<Me+this.itemSize*m)&&this._updateStateVirtualItems(_e,Me)}_updateStateVirtualItems(e,t){const{state:i}=this;i.virtualItemSizeBefore=e,i.virtualItemSizeAfter=t}}class hse extends T8{constructor(e){super((0,Lo.A)({},e,{itemSize:e.rowHeight,viewportSize:e.viewportHeight}))}get prevTopPosition(){return this.state.prevPosition}get rowCount(){return this.state.itemCount}get topVirtualRowCount(){return this.state.virtualItemCountBefore}get bottomVirtualRowCount(){return this.state.virtualItemCountAfter}getTotalItemCount(){return this.options.getTotalRowCount(this.groupCount,this.isVerticalGrouping)}getRenderState(){return{topVirtualRowHeight:this.state.virtualItemSizeBefore,bottomVirtualRowHeight:this.state.virtualItemSizeAfter,startRowIndex:this.state.startIndex,rowCount:this.state.itemCount,startIndex:this.state.startIndex}}}class pse extends T8{constructor(e){super((0,Lo.A)({},e,{itemSize:e.cellWidth,viewportSize:e.viewportWidth}))}get isRTL(){return this.options.isRTL()}getTotalItemCount(){return this.options.getTotalCellCount(this.groupCount,this.isVerticalGrouping)}getRenderState(){return{leftVirtualCellWidth:this.state.virtualItemSizeBefore,rightVirtualCellWidth:this.state.virtualItemSizeAfter,startCellIndex:this.state.startIndex,cellCount:this.state.itemCount,cellWidth:this.itemSize}}_updateStateVirtualItems(e,t){if(this.isRTL){const{state:i}=this;i.virtualItemSizeAfter=e,i.virtualItemSizeBefore=t,i.startIndex=this.getTotalItemCount()-this.startIndex-this.state.itemCount}else super._updateStateVirtualItems(e,t)}}class gse{constructor(e){this._workspace=e,this._renderAppointmentTimeoutID=null}getRenderTimeout(){return 15}get workspace(){return this._workspace}updateRender(){this._renderGrid(),this._renderAppointments()}_renderGrid(){this.workspace.renderWorkSpace(!1)}_renderAppointments(){const e=this.getRenderTimeout();e>=0?(clearTimeout(this._renderAppointmentTimeoutID),this._renderAppointmentTimeoutID=setTimeout(()=>this.workspace.updateAppointments(),e)):this.workspace.updateAppointments()}}const mse=class fse{constructor(e){this._workSpace=e}prepareCellIndexes(e,t,i){return this._workSpace.isGroupedByDate()?{rowIndex:e.rowIndex,columnIndex:e.columnIndex*this._workSpace._getGroupCount()+t}:{rowIndex:e.rowIndex,columnIndex:e.columnIndex+t*this._workSpace._getCellCount()}}getGroupIndex(e,t){const i=this._workSpace.isGroupedByDate(),r=this._workSpace._getGroupCount();return i?t%r:Math.floor(t/this._workSpace._getCellCount())}calculateHeaderCellRepeatCount(){return this._workSpace._getGroupCount()||1}insertAllDayRowsIntoDateTable(){return!1}getTotalCellCount(e){return e=e||1,this._workSpace._getCellCount()*e}getTotalRowCount(){return this._workSpace._getRowCount()}calculateTimeCellRepeatCount(){return 1}getWorkSpaceMinWidth(){return(0,za.N)(this._workSpace.$element().get(0)).width-this._workSpace.getTimePanelWidth()-2}getAllDayOffset(){return this._workSpace.getAllDayHeight()}getGroupCountClass(e){}getLeftOffset(){return this._workSpace.getTimePanelWidth()}_createGroupBoundOffset(e,t,i){const r=i/2;return{left:e?e.offset().left-r:0,right:t?t.offset().left+i+r:0,top:0,bottom:0}}_getGroupedByDateBoundOffset(e,t){const i=e.length-1,r=e.eq(0),m=e.eq(i);return this._createGroupBoundOffset(r,m,t)}getGroupBoundsOffset(e,t,i,r,m){if(this._workSpace.isGroupedByDate())return this._getGroupedByDateBoundOffset(t,i);let A,V;const X=this._workSpace.getCellIndexByCoordinates(r),ce=r.groupIndex||Math.floor(X/e),_e=m.dateTableGroupedMap[ce];if(_e){const Je=_e[0][_e[0].length-1].position;A=t.eq(_e[0][0].position.columnIndex),V=t.eq(Je.columnIndex)}return this._createGroupBoundOffset(A,V,i)}shiftIndicator(e,t,i,r){const m=this._getIndicatorOffset(r);e.css("left",i?i-m:m),e.css("top",t)}_getIndicatorOffset(e){return this._workSpace.isGroupedByDate()?this._calculateGroupByDateOffset(e):this._calculateOffset(e)}_calculateOffset(e){return this._workSpace.getIndicatorOffset(e)+this._workSpace._getCellCount()*this._workSpace.getRoundedCellWidth(e-1,0)*e}_calculateGroupByDateOffset(e){return this._workSpace.getIndicatorOffset(0)*this._workSpace._getGroupCount()+this._workSpace.getRoundedCellWidth(e-1,0)*e}getShaderOffset(e,t){const i=this._workSpace._getCellCount()*this._workSpace.getRoundedCellWidth(e-1)*e;return this._workSpace.option("rtlEnabled")?(0,za.N)(this._workSpace._dateTableScrollable.$content().get(0)).width-i-this._workSpace.getTimePanelWidth()-t:i}getShaderTopOffset(e){return-this.getShaderMaxHeight()*(e>0?1:0)}getShaderHeight(){return this._workSpace.getIndicationHeight()}getShaderMaxHeight(){return(0,za.N)(this._workSpace._dateTableScrollable.$content().get(0)).height}getShaderWidth(e){return this._workSpace.getIndicationWidth(e)}getScrollableScrollTop(e){return e?0:this._workSpace.getScrollable().scrollTop()}addAdditionalGroupCellClasses(e,t,i,r){let m=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return e=this._addLastGroupCellClass(e,t,m),this._addFirstGroupCellClass(e,t,m)}_addLastGroupCellClass(e,t,i){if(i)return`${e} ${uU}`;if(this._workSpace.isGroupedByDate()){if(t%this._workSpace._getGroupCount()==0)return`${e} ${uU}`}else if(t%this._workSpace._getCellCount()==0)return`${e} ${uU}`;return e}_addFirstGroupCellClass(e,t,i){if(i)return`${e} ${hU}`;if(this._workSpace.isGroupedByDate()){if((t-1)%this._workSpace._getGroupCount()==0)return`${e} ${hU}`}else if((t-1)%this._workSpace._getCellCount()==0)return`${e} ${hU}`;return e}},A8=class _se{constructor(e){this._workSpace=e,this.cache=new O8}prepareCellIndexes(e,t,i){let r=e.rowIndex+t*this._workSpace._getRowCount();return this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(r+=t,i||(r+=1)),{rowIndex:r,columnIndex:e.columnIndex}}getGroupIndex(e){return Math.floor(e/this._workSpace._getRowCount())}calculateHeaderCellRepeatCount(){return 1}insertAllDayRowsIntoDateTable(){return this._workSpace.option("showAllDayPanel")}getTotalCellCount(){return this._workSpace._getCellCount()}getTotalRowCount(){return this._workSpace._getRowCount()*this._workSpace._getGroupCount()}calculateTimeCellRepeatCount(){return this._workSpace._getGroupCount()||1}getWorkSpaceMinWidth(){let e=this._workSpace._getWorkSpaceWidth();const i=(0,za.N)(this._workSpace.$element().get(0)).width-this._workSpace.getTimePanelWidth()-this._workSpace.getGroupTableWidth()-2;return e<i&&(e=i),e}getAllDayOffset(){return 0}getGroupCountClass(e){return w5(e)}getLeftOffset(){return this._workSpace.getTimePanelWidth()+this._workSpace.getGroupTableWidth()}getGroupBoundsOffset(e,t){let[i,r]=t;return this.cache.get(`groupBoundsOffset${e}`,()=>{const m=this._workSpace.option("startDayHour"),A=this._workSpace.option("endDayHour"),V=this._workSpace.option("hoursInterval"),X=MW(m,A)/V*this._workSpace.getCellHeight(),ce=this.getScrollableScrollTop(),_e=(0,za.N)(this._workSpace._$headerPanelContainer.get(0)).height;let Me=e*X+_e+this._workSpace.option("getHeaderHeight")()-ce;this._workSpace.option("showAllDayPanel")&&this._workSpace.supportAllDayRow()&&(Me+=this._workSpace.getCellHeight()*(e+1));const Ve=Me+X,{left:Je}=i.getBoundingClientRect(),{right:rt}=r.getBoundingClientRect();return this._groupBoundsOffset={left:Je,right:rt,top:Me,bottom:Ve},this._groupBoundsOffset})}shiftIndicator(e,t,i,r){const m=this._workSpace.getIndicatorOffset(0),A=this._workSpace.option("crossScrollingEnabled")?0:this._workSpace.getGroupTableWidth(),V=i?i-m:m;let X=this._workSpace._getRowCount()*this._workSpace.getCellHeight()*r;this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(X+=this._workSpace.getAllDayHeight()*(r+1)),e.css("left",V+A),e.css("top",t+X)}getShaderOffset(e,t){const i=this._workSpace.option("crossScrollingEnabled")?0:this._workSpace.getGroupTableWidth();return this._workSpace.option("rtlEnabled")?(0,za.N)(this._$container.get(0)).width-i-this._workSpace.getWorkSpaceLeftOffset()-t:i}getShaderTopOffset(e){return 0}getShaderHeight(){let e=this._workSpace.getIndicationHeight();return this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(e+=this._workSpace.getCellHeight()),e}getShaderMaxHeight(){let e=this._workSpace._getRowCount()*this._workSpace.getCellHeight();return this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(e+=this._workSpace.getCellHeight()),e}getShaderWidth(){return this._workSpace.getIndicationWidth(0)}getScrollableScrollTop(){return this._workSpace.getScrollable().scrollTop()}addAdditionalGroupCellClasses(e,t,i,r){return e=this._addLastGroupCellClass(e,i+1),this._addFirstGroupCellClass(e,i+1)}_addLastGroupCellClass(e,t){return t%this._workSpace._getRowCount()==0?`${e} ${uU}`:e}_addFirstGroupCellClass(e,t){return(t-1)%this._workSpace._getRowCount()==0?`${e} ${hU}`:e}},vse=["startDate","endDate","isFirstGroupCell","isLastGroupCell"];class Cse{constructor(e){this._viewDataGenerator=e}getCompleteDateHeaderMap(e,t){const{isGenerateWeekDaysHeaderData:i}=e,r=[];if(i){const A=this._generateWeekDaysHeaderRowMap(e,t);r.push(A)}const m=this._generateHeaderDateRow(e,t);return r.push(m),r}_generateWeekDaysHeaderRowMap(e,t){const{isGroupedByDate:i,groups:r,groupOrientation:m,startDayHour:A,endDayHour:V,hoursInterval:X,isHorizontalGrouping:ce,intervalCount:_e,viewOffset:Me}=e,Ve=this._viewDataGenerator.getCellCountInDay(A,V,X),Je=kW(r,m),rt=t[0][0].allDay?1:0,Ct=i?Je*Ve:Ve,Xt=HS(r),oi=this._viewDataGenerator.daysInInterval*_e*(ce&&!i?Xt:1),Yt=[];for(let $t=0;$t<oi;$t+=1){const xn=t[rt][$t*Ct],Gn=Aa.addOffsetsWithoutDST(xn.startDate,-Me);Yt.push((0,Lo.A)({},xn,{colSpan:Ct,text:_U(Gn),isFirstGroupCell:!1,isLastGroupCell:!1}))}return Yt}_generateHeaderDateRow(e,t){const{today:i,isGroupedByDate:r,groupOrientation:m,groups:A,headerCellTextFormat:V,getDateForHeaderText:X,interval:ce,startViewDate:_e,startDayHour:Me,endDayHour:Ve,hoursInterval:Je,intervalCount:rt,currentDate:Ct,viewType:Xt,viewOffset:On}=e,Fn=kW(A,m),oi=t[0][0].allDay?1:0,Yt=r?Fn:1,$t="vertical"===m,xn=this._viewDataGenerator.getCellCount({intervalCount:rt,currentDate:Ct,viewType:Xt,hoursInterval:Je,startDayHour:Me,endDayHour:Ve}),Gn=this._viewDataGenerator.getCellCountInDay(Me,Ve,Je),qn=r?t[oi].filter((qi,ji)=>ji%Fn==0):t[oi],ii=!fU(Xt)||Xt===kc.TIMELINE_MONTH;return qn.map((qi,ji)=>{let{startDate:$i,isFirstGroupCell:ho,isLastGroupCell:io}=qi,Uo=(0,fp.A)(qi,vse);const zr=Aa.addOffsetsWithoutDST($i,-On),wa=((n,e,t,i,r)=>{const m=i(n,e,r);return sa.A.format(m,t)})(ji%xn,ii?zr:$i,V,X,{interval:ce,startViewDate:_e,startDayHour:Me,cellCountInDay:Gn,viewOffset:On});return(0,Lo.A)({},Uo,{startDate:$i,text:wa,today:Tn.A.sameDate(zr,i),colSpan:Yt,isFirstGroupCell:r||ho&&!$t,isLastGroupCell:r||io&&!$t})})}generateDateHeaderData(e,t,i){const{isGenerateWeekDaysHeaderData:r,cellWidth:m,isProvideVirtualCellsWidth:A,startDayHour:V,endDayHour:X,hoursInterval:ce,isMonthDateHeader:_e}=i,Me=[];let Ve={};const Je=m||0;r&&(Ve=this._generateDateHeaderDataRow(i,e,t,this._viewDataGenerator.getCellCountInDay(V,X,ce),0,Je),Me.push(Ve.dateRow));const rt=this._generateDateHeaderDataRow(i,e,t,1,r?1:0,Je);return Me.push(rt.dateRow),{dataMap:Me,leftVirtualCellWidth:A?rt.leftVirtualCellWidth:void 0,rightVirtualCellWidth:A?rt.rightVirtualCellWidth:void 0,leftVirtualCellCount:rt.leftVirtualCellCount,rightVirtualCellCount:rt.rightVirtualCellCount,weekDayLeftVirtualCellWidth:Ve.leftVirtualCellWidth,weekDayRightVirtualCellWidth:Ve.rightVirtualCellWidth,weekDayLeftVirtualCellCount:Ve.leftVirtualCellCount,weekDayRightVirtualCellCount:Ve.rightVirtualCellCount,isMonthDateHeader:_e}}_generateDateHeaderDataRow(e,t,i,r,m,A){const{startCellIndex:V,cellCount:X,isProvideVirtualCellsWidth:ce,groups:_e,groupOrientation:Me,isGroupedByDate:Ve}=e,Je=kW(_e,Me),rt=Ve?Je*r:r,Ct=Math.floor(V/rt),Xt=A5(X,i),On=Math.ceil((V+Xt)/rt),Yt=Ct*rt,xn=RW(i)-On*rt;return{dateRow:t[m].slice(Ct,On),leftVirtualCellCount:Yt,leftVirtualCellWidth:ce?Yt*A:void 0,rightVirtualCellCount:xn,rightVirtualCellWidth:ce?xn*A:void 0}}}const I8=Tn.A.dateToMilliseconds;class P8{constructor(e,t,i,r){this.groupedDataMap=e.generateGroupedDataMap(t),this.completeViewDataMap=i,this._viewOptions=r}getGroupStartDate(e){var t;const i=this.getFirstGroupRow(e);return(null==i||null===(t=i[0])||void 0===t||null===(t=t.cellData)||void 0===t?void 0:t.startDate)??null}getGroupEndDate(e){const t=this.getLastGroupRow(e);if(t){const i=t.length-1,{cellData:r}=t[i],{endDate:m}=r;return m}}findGroupCellStartDate(e,t,i,r){const m=this.getGroupFromDateTableGroupMap(e),A=(ce,_e)=>{const{cellData:Me}=m[ce][_e];let{startDate:Ve,endDate:Je}=Me;if(r&&(Ve=Tn.A.trimTime(Ve),Je=Tn.A.setToDayEnd(Ve)),Tn.A.intervalsOverlap({firstMin:t,firstMax:i,secondMin:Ve,secondMax:Je}))return Ve},V=(()=>{const ce=m[0].length;for(let _e=0;_e<ce;++_e)for(let Me=0;Me<m.length;++Me){const Ve=A(Me,_e);if(Ve)return Ve}})(),X=(()=>{for(let ce=0;ce<m.length;++ce){const _e=m[ce];for(let Me=0;Me<_e.length;++Me){const Ve=A(ce,Me);if(Ve)return Ve}}})();return V>X?X:V}findAllDayGroupCellStartDate(e){var t;const i=this.getGroupFromDateTableGroupMap(e),r=null==i||null===(t=i[0])||void 0===t||null===(t=t[0])||void 0===t?void 0:t.cellData;return r?.startDate??null}findCellPositionInMap(e,t){const{groupIndex:i,startDate:r,isAllDay:m,index:A}=e,{allDayPanelGroupedMap:V,dateTableGroupedMap:X}=this.groupedDataMap,{viewOffset:ce}=this._viewOptions,_e=m&&!this._viewOptions.isVerticalGrouping?V[i]?[V[i]]:[]:X[i]||[];for(let Me=0;Me<_e.length;Me+=1){const Ve=_e[Me];for(let Je=0;Je<Ve.length;Je+=1){const rt=Ve[Je],Ct=rt.cellData,Xt=t?(0,Lo.A)({},Ct,{startDate:$s_addOffsets(rt.cellData.startDate,[-ce]),endDate:$s_addOffsets(rt.cellData.endDate,[-ce])}):Ct;if(this._isSameGroupIndexAndIndex(Xt,i,A)&&this.isStartDateInCell(r,m,Xt,Ct))return rt.position}}}isStartDateInCell(e,t,i,r){let{startDate:m,endDate:A,allDay:V}=i,{startDate:X,endDate:ce}=r;const{viewType:_e}=this._viewOptions,Me=this.getCellSecondIntervalOffset(X,ce),Ve=0!==Me;switch(!0){case!sP(_e):case t&&V:return Tn.A.sameDate(e,m);case!t&&!Ve:return e>=m&&e<A;case!t&&Ve:return this.isStartDateInTwoIntervalsCell(e,Me,m,A);default:return!1}}getCellSecondIntervalOffset(e,t){const i=$s_addOffsets(e,[I8("hour")]),r=Aa.getDaylightOffset(e,t),m=Aa.getDaylightOffset(e,i);return 0===r&&m<0?Math.abs(m*I8("minute")):0}isStartDateInTwoIntervalsCell(e,t,i,r){const m=$s_addOffsets(i,[t]),A=$s_addOffsets(r,[t]);return e>=i&&e<r||e>=m&&e<A}_isSameGroupIndexAndIndex(e,t,i){return e.groupIndex===t&&(void 0===i||e.index===i)}getCellsGroup(e){const{dateTableGroupedMap:t}=this.groupedDataMap,i=t[e];if(i){const{cellData:r}=i[0][0];return r.groups}}getCompletedGroupsInfo(){const{dateTableGroupedMap:e}=this.groupedDataMap;return e.map(t=>{const i=t[0][0],{allDay:r,groupIndex:m}=i.cellData;return{allDay:r,groupIndex:m,startDate:this.getGroupStartDate(m),endDate:this.getGroupEndDate(m)}}).filter(t=>{let{startDate:i}=t;return!!i})}getGroupIndices(){return this.getCompletedGroupsInfo().map(e=>{let{groupIndex:t}=e;return t})}getGroupFromDateTableGroupMap(e){const{dateTableGroupedMap:t}=this.groupedDataMap;return t[e]}getFirstGroupRow(e){const t=this.getGroupFromDateTableGroupMap(e);if(t){const{cellData:i}=t[0][0];return i.allDay?t[1]:t[0]}}getLastGroupRow(e){const{dateTableGroupedMap:t}=this.groupedDataMap,i=t[e];if(i)return i[i.length-1]}getLastGroupCellPosition(e){const t=this.getLastGroupRow(e);return t?.[t?.length-1].position}getRowCountInGroup(e){const t=this.getLastGroupRow(e);return(t[t.length-1].cellData.index+1)/t.length}}const yV=(n,e)=>{if(!Number.isInteger(n))throw Error(`Passed integer value ${n} is not an integer.`);if(!Number.isInteger(e))throw Error(`Passed module value ${e} is not an integer.`);if(e<=0)throw Error(`Passed module value ${e} must be > 0.`);const t=n%e;switch(!0){case 0===t:return 0;case t>0:return t;case t<0:return e+t;default:throw Error(`Unexpected division (${n} % ${e}) occurred.`)}},yse=["allDay","startDate","endDate","groups","groupIndex","isFirstGroupCell","isLastGroupCell","index"],fP=Tn.A.dateToMilliseconds;class bse{constructor(e){this._viewDataGenerator=e}getCompleteTimePanelMap(e,t){const{startViewDate:i,cellDuration:r,startDayHour:m,isVerticalGrouping:A,intervalCount:V,currentDate:X,viewType:ce,hoursInterval:_e,endDayHour:Me,viewOffset:Ve,today:Je,showCurrentTimeIndicator:rt}=e,Ct=t.length-1,Xt=t[Ct][t[Ct].length-1].endDate,On=this._viewDataGenerator.getRowCount({intervalCount:V,currentDate:X,viewType:ce,hoursInterval:_e,startDayHour:m,endDayHour:Me}),Fn=this._viewDataGenerator.getCellCount({intervalCount:V,currentDate:X,viewType:ce,hoursInterval:_e,startDayHour:m,endDayHour:Me});let oi=0,Yt=0;return t.map(($t,xn)=>{const Gn=$t[0],{allDay:qn,startDate:ii,groups:qi,groupIndex:ji,isFirstGroupCell:$i,isLastGroupCell:ho,index:io}=Gn,Uo=(0,fp.A)(Gn,yse),zr=!qn&&this.isTimeCellShouldBeHighlighted(Je,Ve,{startViewDate:i,realEndViewDate:Xt,showCurrentTimeIndicator:rt},{date:ii,index:Yt,duration:Math.round(r),isFirst:0===Yt,isLast:this.isLastCellInGroup(t,xn)});return qn?(oi+=1,Yt=0):Yt+=1,(0,Lo.A)({},Uo,{startDate:ii,allDay:qn,highlighted:zr,text:vU_getTimePanelCellText((xn-oi)%On,ii,i,r,m,Ve),groups:A?qi:void 0,groupIndex:A?ji:void 0,isFirstGroupCell:A&&$i,isLastGroupCell:A&&ho,index:Math.floor(io/Fn)})})}generateTimePanelData(e,t){const{startRowIndex:i,rowCount:r,topVirtualRowHeight:m,bottomVirtualRowHeight:A,isGroupedAllDayPanel:V,isVerticalGrouping:X,isAllDayPanelVisible:ce}=t,Me=i+(X||!ce?0:1),Ve=BW(r,e),Je=e.slice(Me,Me+Ve),rt={topVirtualRowHeight:m,bottomVirtualRowHeight:A,isGroupedAllDayPanel:V},{previousGroupedData:Ct}=this._generateTimePanelDataFromMap(Je,X);return rt.groupedData=Ct,rt}_generateTimePanelDataFromMap(e,t){return e.reduce((i,r)=>{let{previousGroupIndex:m,previousGroupedData:A}=i;const V=r.groupIndex;return V!==m&&A.push({dateTable:[],isGroupedAllDayPanel:L5(!!r.allDay,t),groupIndex:V,key:B5(V,t)}),r.allDay?A[A.length-1].allDayPanel=r:A[A.length-1].dateTable.push(r),{previousGroupIndex:V,previousGroupedData:A}},{previousGroupIndex:-1,previousGroupedData:[]})}isTimeCellShouldBeHighlighted(e,t,i,r){let{startViewDate:m,realEndViewDate:A,showCurrentTimeIndicator:V}=i;const X=$s_addOffsets(e,[t]),ce=$s_addOffsets(m,[t]);if(!V||X<ce||X>=A)return!1;const _e=this.getLocalDateTimeInMs(X),[Me,Ve]=this.getHighlightedInterval(r);return Me<Ve?_e>=Me&&_e<Ve:_e>=Me&&_e<fP("day")||_e>=0&&_e<Ve}getHighlightedInterval(e){let{date:t,index:i,duration:r,isFirst:m,isLast:A}=e;const V=this.getLocalDateTimeInMs(t),X=i%2==0;switch(!0){case m||A&&!X:return[V,yV(V+r,fP("day"))];case X:return[yV(V-r,fP("day")),yV(V+r,fP("day"))];default:return[V,yV(V+2*r,fP("day"))]}}getLocalDateTimeInMs(e){const t=e.getTime()-e.getTimezoneOffset()*fP("minute");return yV(t,fP("day"))}isLastCellInGroup(e,t){if(t===e.length-1)return!0;const{groupIndex:i}=e[t][0],{groupIndex:r,allDay:m}=e[t+1][0];return m||r!==i}}const eL=Tn.A.dateToMilliseconds;class bV{constructor(){this.daysInInterval=1,this.isWorkView=!1,this.tableAllDay=!1}isSkippedDate(e){return!1}_calculateStartViewDate(e){}getStartViewDate(e){return this._calculateStartViewDate(e)}getCompleteViewDataMap(e){const{groups:t,isGroupedByDate:i,isHorizontalGrouping:r,isVerticalGrouping:m,intervalCount:A,currentDate:V,viewType:X,startDayHour:ce,endDayHour:_e,hoursInterval:Me}=e;this._setVisibilityDates(e),this.setHiddenInterval(ce,_e,Me);const Ve=n7(t),Je=this.getCellCount({intervalCount:A,currentDate:V,viewType:X,startDayHour:ce,endDayHour:_e,hoursInterval:Me}),rt=this.getRowCount({intervalCount:A,currentDate:V,viewType:X,hoursInterval:Me,startDayHour:ce,endDayHour:_e});let Ct=[];const Xt=this._generateAllDayPanelData(e,rt,Je),On=this._generateViewCellsData(e,rt,Je);return Xt&&Ct.push(Xt),Ct.push(...On),r&&!i&&(Ct=this._transformViewDataMapForHorizontalGrouping(Ct,Ve)),m&&(Ct=this._transformViewDataMapForVerticalGrouping(Ct,Ve)),i&&(Ct=this._transformViewDataMapForGroupingByDate(Ct,Ve)),this._addKeysToCells(Ct)}_transformViewDataMapForHorizontalGrouping(e,t){const i=e.map(r=>r.slice());return t.slice(1).forEach((r,m)=>{const A=m+1;e.forEach((V,X)=>{const ce=V.map(_e=>(0,Lo.A)({},_e,{groups:r,groupIndex:A}));i[X].push(...ce)})}),i}_transformViewDataMapForVerticalGrouping(e,t){const i=e.map(r=>r.slice());return t.slice(1).forEach((r,m)=>{const A=m+1,V=e.map(X=>X.map(_e=>(0,Lo.A)({},_e,{groupIndex:A,groups:r})));i.push(...V)}),i}_transformViewDataMapForGroupingByDate(e,t){const i=t.slice(1),r=i.length;return e.map(A=>A.reduce((X,ce)=>[...X,(0,Lo.A)({},ce,{isFirstGroupCell:!0,isLastGroupCell:0===r}),...i.map((Me,Ve)=>(0,Lo.A)({},ce,{groups:Me,groupIndex:Ve+1,isFirstGroupCell:!1,isLastGroupCell:Ve===r-1}))],[]))}_addKeysToCells(e){const t=e[0].length,{currentViewDataMap:i}=e.reduce((r,m,A)=>{let{allDayPanelsCount:V,currentViewDataMap:X}=r;const _e=(A-V)*t,Me=m[0].allDay?V+1:V;return X[A].forEach((Ve,Je)=>{Ve.key=_e+Je}),{allDayPanelsCount:Me,currentViewDataMap:X}},{allDayPanelsCount:0,currentViewDataMap:e});return i}generateViewDataMap(e,t){const{rowCount:i,startCellIndex:r,startRowIndex:m,cellCount:A,isVerticalGrouping:V,isAllDayPanelVisible:X}=t,ce=(rt,Ct,Xt,On)=>rt.slice(Xt,void 0!==On?Xt+On:void 0).map((oi,Yt)=>({cellData:oi,position:{rowIndex:Ct,columnIndex:Yt}}));let _e=m,Me=[];this._isStandaloneAllDayPanel(V,X)&&(_e++,Me=ce(e[0],0,r,A));const Ve=BW(i,e);return{allDayPanelMap:Me,dateTableMap:e.slice(_e,_e+Ve).map((rt,Ct)=>ce(rt,Ct,r,A))}}_isStandaloneAllDayPanel(e,t){return!e&&t}getViewDataFromMap(e,t,i){const{topVirtualRowHeight:r,bottomVirtualRowHeight:m,leftVirtualCellWidth:A,rightVirtualCellWidth:V,cellCount:X,rowCount:ce,startRowIndex:_e,startCellIndex:Me,isProvideVirtualCellsWidth:Ve,isGroupedAllDayPanel:Je,isVerticalGrouping:rt,isAllDayPanelVisible:Ct}=i,{allDayPanelMap:Xt,dateTableMap:On}=t,{groupedData:Fn}=On.reduce((Gn,qn)=>{let{previousGroupIndex:ii,groupedData:qi}=Gn;const ji=qn.map(Uo=>{let{cellData:zr}=Uo;return zr}),$i=ji[0],ho=$i.allDay,io=$i.groupIndex;return io!==ii&&qi.push({dateTable:[],isGroupedAllDayPanel:L5(!!ho,rt),groupIndex:io,key:B5(io,rt)}),ho?qi[qi.length-1].allDayPanel=ji:qi[qi.length-1].dateTable.push({cells:ji,key:ji[0].key-Me}),{groupedData:qi,previousGroupIndex:io}},{previousGroupIndex:-1,groupedData:[]});this._isStandaloneAllDayPanel(rt,Ct)&&(Fn[0].allDayPanel=Xt.map(Gn=>{let{cellData:qn}=Gn;return qn}));const oi=RW(e),Yt=k5(e),$t=A5(X,e),xn=BW(ce,e);return{groupedData:Fn,topVirtualRowHeight:r,bottomVirtualRowHeight:m,leftVirtualCellWidth:Ve?A:void 0,rightVirtualCellWidth:Ve?V:void 0,isGroupedAllDayPanel:Je,leftVirtualCellCount:Me,rightVirtualCellCount:void 0===X?0:oi-Me-$t,topVirtualRowCount:_e,bottomVirtualRowCount:Yt-_e-xn}}_generateViewCellsData(e,t,i){const r=[];for(let m=0;m<t;m+=1)r.push(this._generateCellsRow(e,!1,m,t,i));return r}_generateAllDayPanelData(e,t,i){return e.isAllDayPanelVisible?this._generateCellsRow(e,!0,0,t,i):null}_generateCellsRow(e,t,i,r,m){const A=[];for(let V=0;V<m;++V){const X=this.getCellData(i,V,e,t);X.index=i*m+V,X.isFirstGroupCell=this._isFirstGroupCell(i,V,e,r,m),X.isLastGroupCell=this._isLastGroupCell(i,V,e,r,m),A.push(X)}return A}getCellData(e,t,i,r){return r?this.prepareAllDayCellData(i,e,t):this.prepareCellData(i,e,t)}prepareCellData(e,t,i){const{groups:r,startDayHour:m,endDayHour:A,hoursInterval:V}=e,X=n7(r),ce=this.getDateByCellIndices(e,t,i,this.getCellCountInDay(m,A,V)),Me={startDate:ce,endDate:this.getCellEndDate(ce,e),allDay:this.tableAllDay,groupIndex:0};return X.length>0&&(Me.groups=X[0]),Me}prepareAllDayCellData(e,t,i){const r=this.prepareCellData((0,Lo.A)({},e,{viewOffset:0}),t,i),{viewOffset:m}=e,A=Tn.A.trimTime(r.startDate),V=$s_addOffsets(A,[m]);return(0,Lo.A)({},r,{startDate:V,endDate:V,allDay:!0})}getDateByCellIndices(e,t,i,r){let{startViewDate:m}=e;const{startDayHour:A,interval:V,firstDayOfWeek:X,intervalCount:ce,viewOffset:_e}=e,Me=m.getHours()!==Math.floor(A);if(Me){const Yt=((n,e)=>{const t=Aa.getDateWithoutTimezoneChange(n);return t.setHours(e),t})(m,A);m=new Date(Yt.getTime()-eL("day"))}const Ve=this.getCellCount(e),Je=this.getRowCount(e),rt=this._calculateCellIndex(t,i,Je,Ve),Ct=this.getMillisecondsOffset(rt,V,r),Xt=this.isWorkView?this.getTimeOffsetByColumnIndex(i,this.getFirstDayOfWeek(X),Ve,ce):0,On=m.getTime(),Fn=new Date(On+Ct+Xt+_e),oi=Me?0:Tn.A.getTimezonesDifference(m,Fn);return Fn.setTime(Fn.getTime()+oi),Fn}getMillisecondsOffset(e,t,i){return t*e+Math.floor(e/i)*this.hiddenInterval}getTimeOffsetByColumnIndex(e,t,i,r){const m=Math.max(0,t-1);return 2*Math.floor((e+m)/(i/r))*eL("day")}calculateEndDate(e,t,i){return this.getCellEndDate(e,{interval:t})}_calculateCellIndex(e,t,i,r){return((n,e,t)=>e*t+n)(e,t,i)}generateGroupedDataMap(e){const{allDayPanelMap:t,dateTableMap:i}=e,{previousGroupedDataMap:r}=i.reduce((A,V)=>{const{previousGroupedDataMap:X,previousRowIndex:ce,previousGroupIndex:_e}=A,{groupIndex:Me}=V[0].cellData,Ve=Me===_e?ce+1:0;return V.forEach(Je=>{const{groupIndex:rt}=Je.cellData;X[rt]||(X[rt]=[]),X[rt][Ve]||(X[rt][Ve]=[]),X[rt][Ve].push(Je)}),{previousGroupedDataMap:X,previousRowIndex:Ve,previousGroupIndex:Me}},{previousGroupedDataMap:[],previousRowIndex:-1,previousGroupIndex:-1}),m=[];return t?.forEach(A=>{const{groupIndex:V}=A.cellData;m[V]||(m[V]=[]),m[V].push(A)}),{allDayPanelGroupedMap:m,dateTableGroupedMap:r}}_isFirstGroupCell(e,t,i,r,m){const{groupOrientation:A,groups:V,isGroupedByDate:X}=i,ce=HS(V);return X?t%ce==0:A===S5?t%m==0:e%r==0}_isLastGroupCell(e,t,i,r,m){const{groupOrientation:A,groups:V,isGroupedByDate:X}=i,ce=HS(V);return X?(t+1)%ce==0:A===S5?(t+1)%m==0:(e+1)%r==0}markSelectedAndFocusedCells(e,t){const{selectedCells:i,focusedCell:r}=t;if(!i&&!r)return e;const{allDayPanelMap:m,dateTableMap:A}=e,V=A.map(ce=>this._markSelectedAndFocusedCellsInRow(ce,i,r));return{allDayPanelMap:this._markSelectedAndFocusedCellsInRow(m,i,r),dateTableMap:V}}_markSelectedAndFocusedCellsInRow(e,t,i){return e.map(r=>{const{index:m,groupIndex:A,allDay:V,startDate:X}=r.cellData,ce=t.findIndex(Me=>{let{index:Ve,groupIndex:Je,allDay:rt,startDate:Ct}=Me;return A===Je&&(m===Ve||void 0===Ve&&X.getTime()===Ct.getTime())&&!!V==!!rt}),_e=!!i&&m===i.cellData.index&&A===i.cellData.groupIndex&&V===i.cellData.allDay;return _e||-1!==ce?(0,Lo.A)({},r,{cellData:(0,Lo.A)({},r.cellData,{isSelected:ce>-1,isFocused:_e})}):r})}getInterval(e){return e*eL("hour")}_getIntervalDuration(e){return eL("day")*e}_setVisibilityDates(e){}getCellCountInDay(e,t,i){const r=MW(e,t)/i;return Math.ceil(r)}getCellCount(e){const{intervalCount:t,viewType:i,startDayHour:r,endDayHour:m,hoursInterval:A}=e,V=this.getCellCountInDay(r,m,A),X=LW(i)?V:1;return this.daysInInterval*t*X}getRowCount(e){const{viewType:t,startDayHour:i,endDayHour:r,hoursInterval:m}=e,A=this.getCellCountInDay(i,r,m);return LW(t)?1:A}setHiddenInterval(e,t,i){this.hiddenInterval=eL("day")-this.getVisibleDayDuration(e,t,i)}getVisibleDayDuration(e,t,i){return i*this.getCellCountInDay(e,t,i)*eL("hour")}getFirstDayOfWeek(e){return e}getCellEndDate(e,t){const i=Math.round(t.interval);return Aa.addOffsetsWithoutDST(e,i)}}class xse extends bV{_calculateStartViewDate(e){return((n,e,t,i)=>{const r=mU(t,n,i,t);return Lw(r,e)})(e.currentDate,e.startDayHour,e.startDate,this._getIntervalDuration(e.intervalCount))}}const M8=Tn.A.dateToMilliseconds;class Sse extends bV{constructor(){super(...arguments),this.tableAllDay=void 0}getCellData(e,t,i,r){const{indicatorTime:m,timeZoneCalculator:A,intervalCount:V,viewOffset:X}=i,ce=super.getCellData(e,t,i,!1),_e=Aa.addOffsetsWithoutDST(ce.startDate,-X);return ce.today=this.isCurrentDate(_e,m,A),ce.otherMonth=this.isOtherMonth(_e,this._minVisibleDate,this._maxVisibleDate),ce.firstDayOfMonth=P5(_e,V),ce.text=Bw_getCellText(_e,V),ce}isCurrentDate(e,t,i){return Tn.A.sameDate(e,N5(t,i))}isOtherMonth(e,t,i){return!Tn.A.dateInRange(e,t,i,"date")}_calculateCellIndex(e,t,i,r){return Bw_calculateCellIndex(e,t,0,r)}calculateEndDate(e,t,i){return Lw(e,i)}getInterval(){return M8("day")}_calculateStartViewDate(e){return((n,e,t,i,r)=>{const m=NW(t,n,i,Tn.A.getFirstMonthDate(t)),A=Tn.A.getFirstMonthDate(m),V=F5(r),X=Tn.A.getFirstWeekDate(A,V);return Lw(X,e)})(e.currentDate,e.startDayHour,e.startDate,e.intervalCount,this.getFirstDayOfWeek(e.firstDayOfWeek))}_setVisibilityDates(e){const{intervalCount:t,startDate:i,currentDate:r}=e,m=Tn.A.getFirstMonthDate(i),A=Bw_getViewStartByOptions(i,r,t,m);this._minVisibleDate=new Date(A.setDate(1));const V=new Date(A.setMonth(A.getMonth()+t));this._maxVisibleDate=new Date(V.setDate(0))}getCellCount(){return 7}getRowCount(e){const t=new Date(e.currentDate);t.setDate(1);const i=new Date(t);return i.setMonth(i.getMonth()+e.intervalCount),i.setDate(0),function Ase(n,e,t){const i=B8(n,t),r=function Tse(n,e){const t=B8(n,e);return t.setDate(t.getDate()+m$-1),t}(e,t),m=function Dse(n,e){const t=Tn.A.trimTime(e).getTime()-Tn.A.trimTime(n).getTime();return Math.round(t/wse)+1}(i,r)/m$;return Math.max(m,6)}(t,i,e.firstDayOfWeek??sa.A.firstDayOfWeekIndex())}getCellCountInDay(){return 1}setHiddenInterval(){this.hiddenInterval=0}getCellEndDate(e,t){const{startDayHour:i,endDayHour:r}=t,m=(r-i)*M8("hour");return Aa.addOffsetsWithoutDST(e,m)}}const R8=Tn.A.dateToMilliseconds;class Ese extends bV{_calculateCellIndex(e,t,i,r){return Bw_calculateCellIndex(e,t,0,r)}calculateEndDate(e,t,i){return Lw(e,i)}getInterval(){return R8("day")}_calculateStartViewDate(e){return((n,e,t,i)=>{const r=Tn.A.getFirstMonthDate(NW(t,n,i,Tn.A.getFirstMonthDate(t)));return Lw(r,e)})(e.currentDate,e.startDayHour,e.startDate,e.intervalCount)}getCellCount(e){const{intervalCount:t}=e,i=new Date(e.currentDate);let r=0;for(let m=1;m<=t;m++)r+=new Date(i.getFullYear(),i.getMonth()+m,0).getDate();return r}setHiddenInterval(){this.hiddenInterval=0}getCellEndDate(e,t){const{startDayHour:i,endDayHour:r}=t,m=(r-i)*R8("hour");return Aa.addOffsetsWithoutDST(e,m)}}class k8 extends bV{constructor(){super(...arguments),this.daysInInterval=7}_getIntervalDuration(e){return(n=>7*Tn.A.dateToMilliseconds("day")*n)(e)}_calculateStartViewDate(e){return((n,e,t,i,r)=>{const m=F5(r),A=mU(t,n,i,W5(t,m)),V=Tn.A.getFirstWeekDate(A,m);return Lw(V,e)})(e.currentDate,e.startDayHour,e.startDate,this._getIntervalDuration(e.intervalCount),this.getFirstDayOfWeek(e.firstDayOfWeek))}}class Ose extends k8{constructor(){super(...arguments),this.daysInInterval=5,this.isWorkView=!0}isSkippedDate(e){return H5(e)}_calculateStartViewDate(e){return((n,e,t,i,r)=>{const m=mU(t,n,i,W5(t,r)),A=Tn.A.getFirstWeekDate(m,r);if(H5(A)){const X=(8-A.getDay())%7;A.setDate(A.getDate()+X)}return Lw(A,e)})(e.currentDate,e.startDayHour,e.startDate,this._getIntervalDuration(e.intervalCount),this.getFirstDayOfWeek(e.firstDayOfWeek))}getFirstDayOfWeek(e){return e||0}}const m$=7,wse=864e5,L8=n=>{switch(n){case kc.MONTH:return new Sse;case kc.TIMELINE_MONTH:return new Ese;case kc.DAY:case kc.TIMELINE_DAY:return new xse;case kc.WEEK:case kc.TIMELINE_WEEK:return new k8;case kc.WORK_WEEK:case kc.TIMELINE_WORK_WEEK:return new Ose;default:return new bV}};function B8(n,e){const t=new Date(n);let i=t.getDay()-e;return i<0&&(i+=m$),t.setDate(t.getDate()-i),t}const Ise=["groups","groupOrientation","groupByDate","isAllDayPanelVisible","viewOffset"];class Pse{constructor(e){this.viewType=e,this.viewDataGenerator=L8(e),this.viewData={},this.completeViewDataMap=[],this.completeDateHeaderMap=[],this.viewDataMap={},this._groupedDataMapProvider=null}get groupedDataMap(){return this._groupedDataMapProvider.groupedDataMap}get hiddenInterval(){return this.viewDataGenerator.hiddenInterval}isSkippedDate(e){return this.viewDataGenerator.isSkippedDate(e)}update(e,t){this.viewDataGenerator=L8(e.viewType);const{viewDataGenerator:i}=this,r=new Cse(i),m=new bse(i),A=this._transformRenderOptions(e);A.interval=this.viewDataGenerator.getInterval(A.hoursInterval),this._options=A,t&&(this.completeViewDataMap=i.getCompleteViewDataMap(A),this.completeDateHeaderMap=r.getCompleteDateHeaderMap(A,this.completeViewDataMap),A.isGenerateTimePanelData&&(this.completeTimePanelMap=m.getCompleteTimePanelMap(A,this.completeViewDataMap))),this.viewDataMap=i.generateViewDataMap(this.completeViewDataMap,A),this.updateViewData(A),this._groupedDataMapProvider=new P8(this.viewDataGenerator,this.viewDataMap,this.completeViewDataMap,{isVerticalGrouping:A.isVerticalGrouping,viewType:A.viewType,viewOffset:e.viewOffset}),this.dateHeaderData=r.generateDateHeaderData(this.completeDateHeaderMap,this.completeViewDataMap,A),A.isGenerateTimePanelData&&(this.timePanelData=m.generateTimePanelData(this.completeTimePanelMap,A))}createGroupedDataMapProvider(){this._groupedDataMapProvider=new P8(this.viewDataGenerator,this.viewDataMap,this.completeViewDataMap,{isVerticalGrouping:this._options.isVerticalGrouping,viewType:this._options.viewType})}updateViewData(e){const t=this._transformRenderOptions(e);this.viewDataMapWithSelection=this.viewDataGenerator.markSelectedAndFocusedCells(this.viewDataMap,t),this.viewData=this.viewDataGenerator.getViewDataFromMap(this.completeViewDataMap,this.viewDataMapWithSelection,t)}_transformRenderOptions(e){const{groups:t,groupOrientation:i,groupByDate:r,isAllDayPanelVisible:m,viewOffset:A}=e,V=(0,fp.A)(e,Ise);return(0,Lo.A)({},V,{startViewDate:this.viewDataGenerator._calculateStartViewDate(e),isVerticalGrouping:gU(t,i),isHorizontalGrouping:hV(t,i),isGroupedByDate:Lte(t,i,r),isGroupedAllDayPanel:M5(t,i,m),groups:t,groupOrientation:i,isAllDayPanelVisible:m,viewOffset:A})}getGroupPanelData(e){const t=this._transformRenderOptions(e);if(t.groups.length>0){const i=this.getCellCount(t);return((n,e,t,i)=>{let r=1,m=n.map(A=>{const V=[],{name:X,items:ce,data:_e}=A;for(let Me=0;Me<r;Me+=1)V.push(...ce.map((Ve,Je)=>{let{id:rt,text:Ct,color:Xt}=Ve;return{id:rt,text:Ct,color:Xt,key:`${Me}_${X}_${rt}`,resourceName:X,data:_e?.[Je]}}));return r*=ce.length,V});return t&&(m=((n,e)=>[...new Array(e)].reduce((t,i,r)=>n.map((m,A)=>[...t[A]||[],...m.map((X,ce)=>(0,Lo.A)({},X,{key:`${X.key}_group_by_date_${r}`,isFirstGroupCell:0===ce,isLastGroupCell:ce===m.length-1}))]),[]))(m,e)),{groupPanelItems:m,baseColSpan:i}})(t.groups,i,t.isGroupedByDate,t.isGroupedByDate?1:i)}}getGroupStartDate(e){return this._groupedDataMapProvider.getGroupStartDate(e)}getGroupEndDate(e){return this._groupedDataMapProvider.getGroupEndDate(e)}findGroupCellStartDate(e,t,i){return this._groupedDataMapProvider.findGroupCellStartDate(e,t,i,arguments.length>3&&void 0!==arguments[3]&&arguments[3])}findAllDayGroupCellStartDate(e){return this._groupedDataMapProvider.findAllDayGroupCellStartDate(e)}findCellPositionInMap(e){return this._groupedDataMapProvider.findCellPositionInMap(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}hasAllDayPanel(){const{viewData:e}=this.viewDataMap,{allDayPanel:t}=e.groupedData[0];return!e.isGroupedAllDayPanel&&t?.length>0}getCellsGroup(e){return this._groupedDataMapProvider.getCellsGroup(e)}getCompletedGroupsInfo(){return this._groupedDataMapProvider.getCompletedGroupsInfo()}getGroupIndices(){return this._groupedDataMapProvider.getGroupIndices()}getLastGroupCellPosition(e){return this._groupedDataMapProvider.getLastGroupCellPosition(e)}getRowCountInGroup(e){return this._groupedDataMapProvider.getRowCountInGroup(e)}getCellData(e,t,i,r){const m=i&&!this._options.isVerticalGrouping?this.viewDataMap.allDayPanelMap:this.viewDataMap.dateTableMap[e],A=r?m.length-1-t:t,{cellData:V}=m[A];return V}getCellsByGroupIndexAndAllDay(e,t){const i=this._getRowCountWithAllDayRows(),m=this._options.isVerticalGrouping?e*i:0,V=this._options.isAllDayPanelVisible&&!t?m+1:m;return this.completeViewDataMap.slice(V,(t?V:this._options.isVerticalGrouping?(e+1)*i-1:i)+1).map(ce=>ce.filter(_e=>{let{groupIndex:Me}=_e;return e===Me}))}getCellCountWithGroup(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{dateTableGroupedMap:i}=this.groupedDataMap;return i.filter((r,m)=>m<=e).reduce((r,m)=>r+m[t].length,0)}hasGroupAllDayPanel(e){var t,i;return this._options.isVerticalGrouping?!(null===(i=this.groupedDataMap.dateTableGroupedMap[e])||void 0===i||!i[0][0].cellData.allDay):(null===(t=this.groupedDataMap.allDayPanelGroupedMap[e])||void 0===t?void 0:t.length)>0}isGroupIntersectDateInterval(e,t,i){const r=this.getGroupStartDate(e);return t<this.getGroupEndDate(e)&&i>r}findGlobalCellPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{completeViewDataMap:r}=this,m=this._options.isAllDayPanelVisible;for(let A=0;A<r.length;A+=1){const V=r[A];for(let X=0;X<V.length;X+=1){const ce=V[X],{startDate:_e,endDate:Me,groupIndex:Ve,allDay:Je}=ce;if(t===Ve&&i===!!Je&&this._compareDatesAndAllDay(e,_e,Me,i))return{position:{columnIndex:X,rowIndex:m&&!this._options.isVerticalGrouping?A-1:A},cellData:ce}}}}_compareDatesAndAllDay(e,t,i,r){return r?Tn.A.sameDate(e,t):e>=t&&e<i}getSkippedDaysCount(e,t,i,r){const{dateTableGroupedMap:m}=this._groupedDataMapProvider.groupedDataMap,A=m[e];let V=0;for(let Ve=0;Ve<A.length;Ve+=1)for(let Je=0;Je<A[Ve].length;Je+=1){const rt=A[Ve][Je].cellData;t.getTime()<rt.endDate.getTime()&&i.getTime()>rt.startDate.getTime()&&(V+=1)}const ce=Tn.A.trimTime(A[A.length-1][A[0].length-1].cellData.startDate),_e=Math.floor((i.getTime()-ce.getTime())/Tn.A.dateToMilliseconds("day"));return r-V-(_e>0?_e:0)}getColumnsCount(){const{dateTableMap:e}=this.viewDataMap;return e?e[0].length:0}getViewEdgeIndices(e){return e?{firstColumnIndex:0,lastColumnIndex:this.viewDataMap.allDayPanelMap.length-1,firstRowIndex:0,lastRowIndex:0}:{firstColumnIndex:0,lastColumnIndex:this.viewDataMap.dateTableMap[0].length-1,firstRowIndex:0,lastRowIndex:this.viewDataMap.dateTableMap.length-1}}getGroupEdgeIndices(e,t){const i=this.groupedDataMap.dateTableGroupedMap[e],A=i[0][0].position.columnIndex,V=i[0][i[0].length-1].position.columnIndex;return t?{firstColumnIndex:A,lastColumnIndex:V,firstRowIndex:0,lastRowIndex:0}:{firstColumnIndex:A,lastColumnIndex:V,firstRowIndex:i[0][0].position.rowIndex,lastRowIndex:i[i.length-1][0].position.rowIndex}}isSameCell(e,t){const{startDate:i,groupIndex:r,allDay:m,index:A}=e,{startDate:V,groupIndex:X,allDay:ce,index:_e}=t;return i.getTime()===V.getTime()&&r===X&&m===ce&&A===_e}getLastViewDate(){const{completeViewDataMap:e}=this,t=e.length-1;return e[t][e[t].length-1].endDate}getStartViewDate(){return this._options.startViewDate}getIntervalDuration(e){return this.viewDataGenerator._getIntervalDuration(e)}getLastCellEndDate(){const e=new Date(this.getLastViewDate().getTime()-Tn.A.dateToMilliseconds("minute"));return $s_addOffsets(e,[-this._options.viewOffset])}getLastViewDateByEndDayHour(e){const t=this.getLastCellEndDate(),i=Tn.A.dateTimeFromDecimal(e),r=new Date(t.setHours(i.hours,i.minutes));return this._adjustEndDateByDaylightDiff(t,r)}_adjustEndDateByDaylightDiff(e,t){const i=Aa.getDaylightOffsetInMs(e,t),r=new Date(t.getTime()-i);return new Date(r.getTime()-Tn.A.dateToMilliseconds("minute"))}getCellCountInDay(e,t,i){return this.viewDataGenerator.getCellCountInDay(e,t,i)}getCellCount(e){return this.viewDataGenerator.getCellCount(e)}getRowCount(e){return this.viewDataGenerator.getRowCount(e)}getVisibleDayDuration(e,t,i){return this.viewDataGenerator.getVisibleDayDuration(e,t,i)}_getRowCountWithAllDayRows(){const e=this._options.isAllDayPanelVisible?1:0;return this.getRowCount(this._options)+e}getFirstDayOfWeek(e){return this.viewDataGenerator.getFirstDayOfWeek(e)}setViewOptions(e){this._options=this._transformRenderOptions(e)}getViewOptions(){return this._options}getViewPortGroupCount(){const{dateTableGroupedMap:e}=this.groupedDataMap;return e?.length||0}getCellsBetween(e,t){const[i,r]=this.normalizeCellsOrder(e,t),{index:m}=i,{index:A}=r,V=this.getCellsByGroupIndexAndAllDay(i.groupIndex??0,r.allDay??!1);return LW(this.viewType)?this.getCellsBetweenHorizontalView(V,m,A):this.getCellsBetweenVerticalView(V,m,A)}getCellsBetweenHorizontalView(e,t,i){return e.reduce((r,m)=>r.concat(m.filter(A=>{let{index:V}=A;return t<=V&&V<=i})),[])}getCellsBetweenVerticalView(e,t,i){var r;const m=[],A=e.length,V=(null===(r=e[0])||void 0===r?void 0:r.length)??0;let X=!1;for(let ce=0;ce<V;ce+=1)for(let _e=0;_e<A;_e+=1){const Me=e[_e][ce],{index:Ve}=Me;if(Ve===t&&(X=!0),X&&m.push(Me),Ve===i)return m}return m}normalizeCellsOrder(e,t){return e.startDate>t.startDate?[t,e]:[e,t]}}const{tableCreator:xV}=s$,{abstract:Mse}=b8,FU=Tn.A.dateToMilliseconds,N8="dx-scheduler-work-space-vertical-group-table",F8="dx-scheduler-time-panel-cell",_$="dx-scheduler-all-day-panel",v$="dx-scheduler-all-day-table",V8="dx-scheduler-all-day-title",GS="dx-scheduler-all-day-table-cell",H8="dx-scheduler-work-space-mouse-selection",C$="dx-scheduler-cell-sizes-horizontal",U8="dx-scheduler-cell-sizes-vertical",z8="dx-scheduler-group-header",Vy="dx-scheduler-date-table-cell",VU="dx-scheduler-date-table-droppable-cell",G8=(0,N.b4)(Si.A.down,"dxSchedulerWorkSpace"),tL={ENTER:(0,N.b4)(ul.Ve,"dxSchedulerDateTable"),DROP:(0,N.b4)(ul.gv,"dxSchedulerDateTable"),LEAVE:(0,N.b4)(ul.qG,"dxSchedulerDateTable")},W8=(0,N.b4)(I.U,"dxSchedulerDateTable"),$8=(0,N.b4)(Si.A.down,"dxSchedulerDateTable"),y$=(0,N.b4)(Si.A.up,"dxSchedulerDateTable"),j8=(0,N.b4)(Si.A.move,"dxSchedulerDateTable"),K8="dxCellData",X8=FU("day"),Yse=FU("hour"),HU=`.${TW} td, .${v$} td`,Zse=`.${Vy}, .${GS}`,Y8={renderComponents:{header:!0,timePanel:!0,dateTable:!0,allDayPanel:!0},generateNewData:!0},Z8=class Qse extends b8{constructor(){super(...arguments),this.viewDirection="vertical"}get type(){return""}get viewDataProvider(){return this._viewDataProvider||(this._viewDataProvider=new Pse(this.type)),this._viewDataProvider}get cache(){return this._cache||(this._cache=new O8),this._cache}get cellsSelectionState(){if(!this._cellsSelectionState){this._cellsSelectionState=new cse(this.viewDataProvider);const e=this.option("selectedCellData");if(e?.length>0){const t=e.map(i=>{const{groups:r}=i;if(!r||0===this._getGroupCount())return(0,Lo.A)({},i,{groupIndex:0});const m=this._getGroupIndexByResourceId(r);return(0,Lo.A)({},i,{groupIndex:m})});this._cellsSelectionState.setSelectedCellsByData(t)}}return this._cellsSelectionState}get cellsSelectionController(){return this._cellsSelectionController||(this._cellsSelectionController=new lse),this._cellsSelectionController}get isAllDayPanelVisible(){return this._isShowAllDayPanel()&&this.supportAllDayRow()}get verticalGroupTableClass(){return N8}get renovatedHeaderPanelComponent(){return NU}get timeZoneCalculator(){return this.option("timeZoneCalculator")}get isDefaultDraggingMode(){return"default"===this.option("draggingMode")}_supportedKeys(){const e=function(i){i.preventDefault(),i.stopPropagation();const r=this.cellsSelectionState.getSelectedCells();if(null!=r&&r.length){const m=r.map(A=>this._getCellByData(A)).filter(A=>!!A);i.target=m,this._showPopup=!0,this._cellClickAction({event:i,cellElement:(0,a.A)(m),cellData:r[0]})}},t=(i,r)=>{var m;i.preventDefault(),i.stopPropagation();const A=null===(m=this.cellsSelectionState.focusedCell)||void 0===m?void 0:m.cellData;if(A){const V=A.allDay&&!this._isVerticalGroupedWorkSpace(),X=i.shiftKey,ce=this.option("allowMultipleCellSelection"),_e=this._isRTL(),Me=this._getGroupCount(),Ve=this.isGroupedByDate(),Je=this._isHorizontalGroupedWorkSpace(),rt=this.viewDataProvider.findCellPositionInMap((0,Lo.A)({},A,{isAllDay:A.allDay})),Ct=Je&&X&&!Ve?this.viewDataProvider.getGroupEdgeIndices(A.groupIndex,V):this.viewDataProvider.getViewEdgeIndices(V),Xt=this.cellsSelectionController.handleArrowClick({focusedCellPosition:rt,edgeIndices:Ct,isRTL:_e,isGroupedByDate:Ve,groupCount:Me,isMultiSelection:X,isMultiSelectionAllowed:ce,viewType:this.type,key:r,getCellDataByPosition:this.viewDataProvider.getCellData.bind(this.viewDataProvider),isAllDayPanelCell:V,focusedCellData:A});this._processNextSelectedCell(Xt,A,X&&ce)}};return(0,_.X)(super._supportedKeys(),{enter:e,space:e,downArrow:i=>{t(i,"down")},upArrow:i=>{t(i,"up")},rightArrow:i=>{t(i,"right")},leftArrow:i=>{t(i,"left")}})}_isRTL(){return this.option("rtlEnabled")}_moveToCell(e,t){if(!(0,C.O9)(e)||!e.length)return;const i=this.option("allowMultipleCellSelection"),r=this._getFullCellData(e),m=this.cellsSelectionState.focusedCell.cellData,A=this.cellsSelectionController.moveToCell({isMultiSelection:t,isMultiSelectionAllowed:i,currentCellData:r,focusedCellData:m,isVirtualCell:e.hasClass(dU)});this._processNextSelectedCell(A,m,i&&t)}_processNextSelectedCell(e,t,i){const r=this.viewDataProvider.findCellPositionInMap({startDate:e.startDate,groupIndex:e.groupIndex,isAllDay:e.allDay,index:e.index});if(!this.viewDataProvider.isSameCell(t,e)){const m=e.allDay&&!this._isVerticalGroupedWorkSpace()?this._dom_getAllDayPanelCell(r.columnIndex):this._dom_getDateCell(r);this._setSelectedCellsStateAndUpdateSelection(e.allDay,r,i,m),this._dateTableScrollable.scrollToElement(m)}}_setSelectedCellsStateAndUpdateSelection(e,t,i,r){const m={rowIndex:t.rowIndex,columnIndex:t.columnIndex,allDay:e};this.cellsSelectionState.setFocusedCell(m.rowIndex,m.columnIndex,e),i?this.cellsSelectionState.setSelectedCells(m):this.cellsSelectionState.setSelectedCells(m,m),this.updateCellsSelection(),this._updateSelectedCellDataOption(this.cellsSelectionState.getSelectedCells(),r)}_hasAllDayClass(e){return e.hasClass(GS)}_focusInHandler(e){if((0,a.A)(e.target).is(this._focusTarget())&&!1!==this._isCellClick){if(delete this._isCellClick,delete this._contextMenuHandled,super._focusInHandler.apply(this,arguments),this.cellsSelectionState.restoreSelectedAndFocusedCells(),!this.cellsSelectionState.focusedCell){const t={columnIndex:0,rowIndex:0,allDay:this._isVerticalGroupedWorkSpace()&&this.isAllDayPanelVisible};this.cellsSelectionState.setFocusedCell(t.rowIndex,t.columnIndex,t.allDay),this.cellsSelectionState.setSelectedCells(t,t)}this.updateCellsSelection(),this._updateSelectedCellDataOption(this.cellsSelectionState.getSelectedCells())}}_focusOutHandler(){super._focusOutHandler.apply(this,arguments),!this._contextMenuHandled&&!this._disposed&&(this.cellsSelectionState.releaseSelectedAndFocusedCells(),this.viewDataProvider.updateViewData(this.generateRenderOptions()),this.updateCellsSelection())}_focusTarget(){return this.$element()}_isVerticalGroupedWorkSpace(){var e;return!(null===(e=this.option("groups"))||void 0===e||!e.length)&&"vertical"===this.option("groupOrientation")}_isHorizontalGroupedWorkSpace(){var e;return!(null===(e=this.option("groups"))||void 0===e||!e.length)&&"horizontal"===this.option("groupOrientation")}_isWorkSpaceWithCount(){return this.option("intervalCount")>1}_isWorkspaceWithOddCells(){return.5===this.option("hoursInterval")&&!this.isVirtualScrolling()}_getRealGroupOrientation(){return this._isVerticalGroupedWorkSpace()?"vertical":"horizontal"}createRAllDayPanelElements(){this._$allDayPanel=(0,a.A)("<div>").addClass(_$),this._$allDayTitle=(0,a.A)("<div>").appendTo(this._$headerPanelEmptyCell)}_dateTableScrollableConfig(){let e={useKeyboard:!1,bounceEnabled:!1,updateManually:!0,onScroll:()=>{var t;null===(t=this._groupedStrategy.cache)||void 0===t||t.clear()}};if(this._needCreateCrossScrolling()&&(e=(0,_.X)(e,this._createCrossScrollingConfig(e))),this.isVirtualScrolling()&&(this.virtualScrollingDispatcher.horizontalScrollingAllowed||this.virtualScrollingDispatcher.height)){const t=e.onScroll;e=(0,Lo.A)({},e,{onScroll:i=>{t?.(i),this.virtualScrollingDispatcher.handleOnScrollEvent(i?.scrollOffset)}})}return e}_createCrossScrollingConfig(e){let{onScroll:t}=e;return{direction:"both",onScroll:i=>{t?.(),this._scrollSync.sidebar({top:i.scrollOffset.top}),this._scrollSync.header({left:i.scrollOffset.left})},onEnd:()=>{this.option("onScrollEnd")()}}}_headerScrollableConfig(){return{useKeyboard:!1,showScrollbar:"never",direction:"horizontal",useNative:!1,updateManually:!0,bounceEnabled:!1,onScroll:e=>{this._scrollSync.dateTable({left:e.scrollOffset.left})}}}_visibilityChanged(e){this.cache.clear(),e&&this._updateGroupTableHeight(),e&&this._needCreateCrossScrolling()&&this._setTableSizes()}_setTableSizes(){this.cache.clear(),this._attachTableClasses();let e=this.getCellWidth();e<this.getCellMinWidth()&&(e=this.getCellMinWidth());const t=this.getWorkSpaceMinWidth(),i=this._getGroupCount();let m=e*this._getTotalCellCount(i);m<t&&(m=t),(0,D.zj)(this._$headerPanel,m),(0,D.zj)(this._$dateTable,m),this._$allDayTable&&(0,D.zj)(this._$allDayTable,m),this._attachHeaderTableClasses(),this._updateGroupTableHeight(),this._updateScrollable()}getWorkSpaceMinWidth(){return this._groupedStrategy.getWorkSpaceMinWidth()}_dimensionChanged(){this._isVisible()&&(this.option("crossScrollingEnabled")&&this._setTableSizes(),this.updateHeaderEmptyCellWidth(),this._updateScrollable(),this.cache.clear())}_needCreateCrossScrolling(){return this.option("crossScrollingEnabled")}_getElementClass(){return(0,h.lQ)()}_getRowCount(){return this.viewDataProvider.getRowCount({intervalCount:this.option("intervalCount"),currentDate:this.option("currentDate"),viewType:this.type,hoursInterval:this.option("hoursInterval"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour")})}_getCellCount(){return this.viewDataProvider.getCellCount({intervalCount:this.option("intervalCount"),currentDate:this.option("currentDate"),viewType:this.type,hoursInterval:this.option("hoursInterval"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour")})}isRenovatedRender(){return this.renovatedRenderSupported()&&this.option("renovateRender")}_isVirtualModeOn(){return"virtual"===this.option("scrolling.mode")}isVirtualScrolling(){return this.isRenovatedRender()&&this._isVirtualModeOn()}_initVirtualScrolling(){this.virtualScrollingDispatcher&&(this.virtualScrollingDispatcher.dispose(),this.virtualScrollingDispatcher=null),this.virtualScrollingDispatcher=new use(this._getVirtualScrollingDispatcherOptions()),this.virtualScrollingDispatcher.attachScrollableEvents(),this.renderer=new gse(this)}onDataSourceChanged(e){}isGroupedAllDayPanel(){return M5(this.option("groups"),this.option("groupOrientation"),this.isAllDayPanelVisible)}generateRenderOptions(e){var t;const r=this._getGroupCount()>0?this.option("groupOrientation"):this._getDefaultGroupStrategy();return(0,Lo.A)({groupByDate:this.option("groupByDate"),startRowIndex:0,startCellIndex:0,groupOrientation:r,today:null===(t=this._getToday)||void 0===t?void 0:t.call(this),groups:this.option("groups"),isProvideVirtualCellsWidth:e,isAllDayPanelVisible:this.isAllDayPanelVisible,selectedCells:this.cellsSelectionState.getSelectedCells(),focusedCell:this.cellsSelectionState.focusedCell,headerCellTextFormat:this._getFormat(),getDateForHeaderText:(A,V)=>V,viewOffset:this.option("viewOffset"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour"),cellDuration:this.getCellDuration(),viewType:this.type,intervalCount:this.option("intervalCount"),hoursInterval:this.option("hoursInterval"),currentDate:this.option("currentDate"),startDate:this.option("startDate"),firstDayOfWeek:this.option("firstDayOfWeek"),showCurrentTimeIndicator:this.option("showCurrentTimeIndicator")},this.virtualScrollingDispatcher.getRenderState())}renovatedRenderSupported(){return!0}_updateGroupTableHeight(){this._isVerticalGroupedWorkSpace()&&(0,gr.Vd)()&&this._setHorizontalGroupHeaderCellsHeight()}updateHeaderEmptyCellWidth(){if((0,gr.Vd)()&&this._isRenderHeaderPanelEmptyCell()){const e=this.getTimePanelWidth(),t=this.getGroupTableWidth();this._$headerPanelEmptyCell.css("width",e+t)}}_isGroupsSpecified(e){var t;return(null===(t=this.option("groups"))||void 0===t?void 0:t.length)&&e}_getGroupIndexByResourceId(e){const t=this.option("groups"),i=fV(t);return i.length?this._getGroupIndexRecursively(i,e):0}_getGroupIndexRecursively(e,t){const r=t[e[0].name];return e.reduce((m,A)=>{let{leafIndex:V,value:X,children:ce}=A;const _e=r===X;return _e&&void 0!==V?V:_e?this._getGroupIndexRecursively(ce,t):m},0)}_getViewStartByOptions(){return mU(this.option("startDate"),this.option("currentDate"),this._getIntervalDuration(),this.option("startDate")?this._calculateViewStartDate():void 0)}_getIntervalDuration(){return this.viewDataProvider.getIntervalDuration(this.option("intervalCount"))}_getHeaderDate(){return this.getStartViewDate()}_calculateViewStartDate(){return this.option("startDate")}_firstDayOfWeek(){return this.viewDataProvider.getFirstDayOfWeek(this.option("firstDayOfWeek"))}_attachEvents(){this._createSelectionChangedAction(),this._attachClickEvent(),this._attachContextMenuEvent()}_attachClickEvent(){const e=this,t=this._createAction(m=>{e._pointerDownHandler(m.event)});this._createCellClickAction();const i=`.${Vy},.${GS}`,r=this.$element();L.A.off(r,G8),L.A.off(r,W8),L.A.on(r,G8,m=>{(0,N.Er)(m)&&m.which>1?m.preventDefault():t({event:m})}),L.A.on(r,W8,i,m=>{const A=(0,a.A)(m.target);e._cellClickAction({event:m,cellElement:(0,s.cc)(A),cellData:e.getCellData(A)})})}_createCellClickAction(){this._cellClickAction=this._createActionByOption("onCellClick",{afterExecute:e=>this._cellClickHandler(e.args[0].event)})}_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")}_cellClickHandler(e){this._showPopup&&(delete this._showPopup,this._handleSelectedCellsClick())}_pointerDownHandler(e){const t=(0,a.A)(e.target);if(t.hasClass(Vy)||t.hasClass(GS))if(this._isCellClick=!0,t.hasClass("dx-scheduler-focused-cell"))this._showPopup=!0;else{const i=this._getCoordinatesByCell(t),r=this._hasAllDayClass(t);this._setSelectedCellsStateAndUpdateSelection(r,i,!1,t)}else this._isCellClick=!1}_handleSelectedCellsClick(){const e=this.cellsSelectionState.getSelectedCells(),i=e[e.length-1],r={startDate:e[0].startDate,endDate:i.endDate};void 0!==i.allDay&&(r.allDay=i.allDay),this.option("onSelectedCellsClick")(r,i.groups)}_attachContextMenuEvent(){this._createContextMenuAction();const e=`.${Vy},.${GS}`,t=this.$element(),i=(0,N.b4)(GI.U,this.NAME);L.A.off(t,i,e),L.A.on(t,i,e,this._contextMenuHandler.bind(this))}_contextMenuHandler(e){const t=(0,a.A)(e.target);this._contextMenuAction({event:e,cellElement:(0,s.cc)(t),cellData:this.getCellData(t)}),this._contextMenuHandled=!0}_createContextMenuAction(){this._contextMenuAction=this._createActionByOption("onCellContextMenu")}_getGroupHeaderContainer(){return this._isVerticalGroupedWorkSpace()?this._$groupTable:this._$thead}_getDateHeaderContainer(){return this._$thead}_getCalculateHeaderCellRepeatCount(){return this._groupedStrategy.calculateHeaderCellRepeatCount()}_updateScrollable(){var e,t;this._dateTableScrollable.update(),null===(e=this._headerScrollable)||void 0===e||e.update(),null===(t=this._sidebarScrollable)||void 0===t||t.update()}_getTimePanelRowCount(){return this._getCellCountInDay()}_getCellCountInDay(){const e=this.option("hoursInterval"),t=this.option("startDayHour"),i=this.option("endDayHour");return this.viewDataProvider.getCellCountInDay(t,i,e)}_getTotalCellCount(e){return this._groupedStrategy.getTotalCellCount(e)}_getTotalRowCount(e,t){let i=this._groupedStrategy.getTotalRowCount(e);return t&&this.isAllDayPanelVisible&&(i+=e),i}_getGroupIndex(e,t){return this._groupedStrategy.getGroupIndex(e,t)}calculateEndDate(e){const{viewDataGenerator:t}=this.viewDataProvider;return t.calculateEndDate(e,t.getInterval(this.option("hoursInterval")),this.option("endDayHour"))}_getGroupCount(){return HS(this.option("groups"))}_attachTablesEvents(){const e=this.$element();this._attachDragEvents(e),this._attachPointerEvents(e)}_detachDragEvents(e){L.A.off(e,tL.ENTER),L.A.off(e,tL.LEAVE),L.A.off(e,tL.DROP)}_attachDragEvents(e){this._detachDragEvents(e),L.A.on(e,tL.ENTER,HU,{checkDropTarget:(t,i)=>!this._isOutsideScrollable(t,i)},t=>{this.preventDefaultDragging||(this.removeDroppableCellClass(),(0,a.A)(t.target).addClass(VU))}),L.A.on(e,tL.LEAVE,()=>{this.preventDefaultDragging||this.removeDroppableCellClass()}),L.A.on(e,tL.DROP,HU,()=>{var t,i;if(this.dragBehavior){if(null===(t=this.dragBehavior)||void 0===t||!t.dragBetweenComponentsPromise)return void this.dragBehavior.removeDroppableClasses();null===(i=this.dragBehavior.dragBetweenComponentsPromise)||void 0===i||i.then(()=>{this.dragBehavior.removeDroppableClasses()})}})}_attachPointerEvents(e){let t=!1;L.A.off(e,j8),L.A.off(e,$8),L.A.on(e,$8,HU,i=>{(0,N.Er)(i)&&1===i.which&&(t=!0,this.$element().addClass(H8),L.A.off(c.A.getDocument(),y$),L.A.on(c.A.getDocument(),y$,()=>{t=!1,this.$element().removeClass(H8)}))}),L.A.on(e,j8,HU,i=>{t&&this._dateTableScrollable&&!this._dateTableScrollable.option("scrollByContent")&&(i.preventDefault(),i.stopPropagation(),this._moveToCell((0,a.A)(i.target),!0))})}_getFormat(){return Mse()}getWorkArea(){return this._$dateTableContainer}getScrollable(){return this._dateTableScrollable}getScrollableScrollTop(){return this._dateTableScrollable.scrollTop()}getGroupedScrollableScrollTop(e){return this._groupedStrategy.getScrollableScrollTop(e)}getScrollableScrollLeft(){return this._dateTableScrollable.scrollLeft()}getScrollableOuterWidth(){return this._dateTableScrollable.scrollWidth()}getScrollableContainer(){return(0,a.A)(this._dateTableScrollable.container())}getHeaderPanelHeight(){return this._$headerPanel&&(0,D.P$)(this._$headerPanel,!0)}getTimePanelWidth(){return this._$timePanel&&(0,za.N)(this._$timePanel.get(0)).width}getGroupTableWidth(){return this._$groupTable?(0,D.Ot)(this._$groupTable):0}getWorkSpaceLeftOffset(){return this._groupedStrategy.getLeftOffset()}_getCellCoordinatesByIndex(e){const t=Math.floor(e/this._getRowCount());return{columnIndex:t,rowIndex:e-this._getRowCount()*t}}_getDateGenerationOptions(){var e;return{startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour"),isWorkView:this.viewDataProvider.viewDataGenerator.isWorkView,interval:null===(e=this.viewDataProvider.viewDataGenerator)||void 0===e?void 0:e.getInterval(this.option("hoursInterval")),startViewDate:this.getStartViewDate(),firstDayOfWeek:this._firstDayOfWeek()}}_getIntervalBetween(e,t){const i=this.getStartViewDate(),r=this.option("startDayHour")*Yse,m=Tn.A.getTimezonesDifference(i,e),A=e.getTime()-i.getTime()-m,V=this._getDaysOfInterval(A,r),X=this._getWeekendsCount(V);let ce=(V-X)*X8;if(!t){const{hiddenInterval:_e}=this.viewDataProvider;ce=A-V*_e-X*this.getVisibleDayDuration()}return ce}_getWeekendsCount(e){return 0}_getDaysOfInterval(e,t){return Math.floor((e+t)/X8)}_updateIndex(e){return e*this._getRowCount()}_getDroppableCell(){return this._getDateTables().find(`.${VU}`)}_getWorkSpaceWidth(){return this.cache.get("workspaceWidth",()=>this._needCreateCrossScrolling()?(0,za.N)(this._$dateTable.get(0)).width:(0,za.N)(this.$element().get(0)).width-this.getTimePanelWidth()-this.getGroupTableWidth())}_getCellByCoordinates(e,t,i){const r=this._groupedStrategy.prepareCellIndexes(e,t,i);return this._dom_getDateCell(r)}_dom_getDateCell(e){return this._$dateTable.find("tr:not(.dx-scheduler-virtual-row)").eq(e.rowIndex).find(`td:not(.${dU})`).eq(e.columnIndex)}_dom_getAllDayPanelCell(e){return this._$allDayPanel.find("tr").eq(0).find("td").eq(e)}_getCells(e,t){const i=e?GS:Vy;if("vertical"===t){let r=[];for(let m=1;;m++){const A=this.$element().find(`tr .${i}:nth-child(${m})`);if(!A.length)break;r=r.concat(A.toArray())}return(0,a.A)(r)}return this.$element().find(`.${i}`)}_getFirstAndLastDataTableCell(){const e=this.isVirtualScrolling()?`.${Vy}, .${dU}`:`.${Vy}`,t=this.$element().find(e);return[t[0],t[t.length-1]]}_getAllCells(e){if(this._isVerticalGroupedWorkSpace())return this._$dateTable.find(`td:not(.${dU})`);const t=e&&this.supportAllDayRow()?GS:Vy;return this.$element().find(`.${t}`)}_setHorizontalGroupHeaderCellsHeight(){const{height:e}=(0,za.N)(this._$dateTable.get(0));(0,D.NG)(this._$groupTable,e)}_getGroupHeaderCells(){return this.$element().find(`.${z8}`)}_getScrollCoordinates(e,t,i,r,m){const A=i||new Date(this.option("currentDate")),V=this.option("startDayHour"),X=this.option("endDayHour");e<V&&(e=V),e>=X&&(e=X-1),A.setHours(e,t,0,0);const ce=this.viewDataProvider.findGlobalCellPosition(A,r,m),{position:_e,cellData:Me}=ce;return this.virtualScrollingDispatcher.calculateCoordinatesByDataAndPosition(Me,_e,A,sP(this.type),"vertical"===this.viewDirection)}_isOutsideScrollable(e,t){const i=this._dateTableScrollable.$element(),r=(0,za.N)(i.get(0)),m=(0,gr.zk)(),A=!(0,a.A)(e).closest(i).length,V=t.pageX<r.left||t.pageX>r.left+r.width+(m.scrollX||0);return!(A&&!V)&&(t.pageY<r.top||t.pageY>r.top+r.height+(m.scrollY||0)||V)}setCellDataCache(e,t,i){const r=JSON.stringify({rowIndex:e.rowIndex,columnIndex:e.columnIndex,groupIndex:t});this.cache.set(r,this.getCellData(i))}setCellDataCacheAlias(e,t){const i=JSON.stringify({rowIndex:e.rowIndex,columnIndex:e.columnIndex,groupIndex:e.groupIndex}),r=JSON.stringify({top:t.top,left:t.left});this.cache.set(r,this.cache.get(i))}supportAllDayRow(){return!0}keepOriginalHours(){return!1}_filterCellDataFields(e){return(0,_.X)(!0,{},{startDate:e.startDate,endDate:e.endDate,groups:e.groups,groupIndex:e.groupIndex,allDay:e.allDay})}getCellData(e){const t=this._getFullCellData(e)||{};return this._filterCellDataFields(t)}_getFullCellData(e){if(e[0])return this._getDataByCell(e)}_getVirtualRowOffset(){return this.virtualScrollingDispatcher.virtualRowOffset}_getVirtualCellOffset(){return this.virtualScrollingDispatcher.virtualCellOffset}_getDataByCell(e){const t=e.parent().index()-this.virtualScrollingDispatcher.topVirtualRowsCount,i=e.index()-this.virtualScrollingDispatcher.leftVirtualCellsCount,{viewDataProvider:r}=this,m=this._hasAllDayClass(e);return r.getCellData(t,i,m)||void 0}isGroupedByDate(){return this.option("groupByDate")&&this._isHorizontalGroupedWorkSpace()&&this._getGroupCount()>0}getCellIndexByDate(e,t){const{viewDataGenerator:i}=this.viewDataProvider,r=t?864e5:i.getInterval(this.option("hoursInterval")),m=T5(this.getStartViewDate(),this.option("startDayHour")),A=this._getIntervalBetween(e,t)+m;let V=Math.floor(A/r);return t&&(V=this._updateIndex(V)),V<0&&(V=0),V}getDroppableCellIndex(){const e=this._getDroppableCell(),t=e.parent();return t.index()*t.find("td").length+e.index()}getDataByDroppableCell(){const e=this.getCellData((0,a.A)(this._getDroppableCell())),{allDay:t}=e,{startDate:i}=e,{endDate:r}=e;return{startDate:i,endDate:r,allDay:t,groups:e.groups}}getDateRange(){return[this.getStartViewDate(),this.getEndViewDateByEndDayHour()]}getCellMinWidth(){return 75}getRoundedCellWidth(e,t,i){if(e<0||!(0,gr.Vd)())return 0;let m=0;const A=this.$element().find(`.${DW}`).eq(0).find(`.${Vy}`),V=this._getCellCount()*e;i=i||this._getCellCount(),(0,C.O9)(t)||(t=V);for(let X=t;X<V+i;X++){const ce=(0,a.A)(A).eq(X).get(0);m+=ce?(0,za.N)(ce).width:0}return m/(V+i-t)}getCellWidth(){return IU(this.getDOMElementsMetaData())}getCellHeight(){return t$(this.getDOMElementsMetaData())}getAllDayHeight(){return mV(this.option("showAllDayPanel"),this._isVerticalGroupedWorkSpace(),this.getDOMElementsMetaData())}getMaxAllowedPosition(e){return n$(e,this.viewDataProvider,this.option("rtlEnabled"),this.getDOMElementsMetaData())}getAllDayOffset(){return this._groupedStrategy.getAllDayOffset()}getCellIndexByCoordinates(e,t){const{horizontalScrollingState:i,verticalScrollingState:r}=this.virtualScrollingDispatcher,m=i?.itemCount??this._getTotalCellCount(this._getGroupCount()),A=this.getCellWidth(),V=t?this.getAllDayHeight():this.getCellHeight(),X=i?.virtualItemSizeBefore??0,_e=Math.floor(Math.floor(e.top-(r?.virtualItemSizeBefore??0))/Math.floor(V));let Me=(e.left-X)/A;return Me=Math.floor(Me+.05),this._isRTL()&&(Me=m-Me-1),m*_e+Me}getStartViewDate(){return this.viewDataProvider.getStartViewDate()}getEndViewDate(){return this.viewDataProvider.getLastCellEndDate()}getEndViewDateByEndDayHour(){return this.viewDataProvider.getLastViewDateByEndDayHour(this.option("endDayHour"))}getCellDuration(){return R5(this.type,this.option("startDayHour"),this.option("endDayHour"),this.option("hoursInterval"))}getIntervalDuration(e){return e?FU("day"):this.getCellDuration()}getVisibleDayDuration(){const e=this.option("startDayHour"),t=this.option("endDayHour"),i=this.option("hoursInterval");return this.viewDataProvider.getVisibleDayDuration(e,t,i)}getGroupBounds(e){const t=this._groupedStrategy instanceof A8?this.getGroupBoundsVertical(e.groupIndex):this.getGroupBoundsHorizontal(e);return this._isRTL()?this.getGroupBoundsRtlCorrection(t):t}getGroupBoundsVertical(e){const t=this._getFirstAndLastDataTableCell();return this._groupedStrategy.getGroupBoundsOffset(e,t)}getGroupBoundsHorizontal(e){const t=this._getCellCount(),i=this._getCells(),r=this.getCellWidth(),{groupedDataMap:m}=this.viewDataProvider;return this._groupedStrategy.getGroupBoundsOffset(t,i,r,e,m)}getGroupBoundsRtlCorrection(e){const t=this.getCellWidth();return(0,Lo.A)({},e,{left:e.right-2*t,right:e.left+2*t})}needRecalculateResizableArea(){return this._isVerticalGroupedWorkSpace()&&0!==this.getScrollable().scrollTop()}getCellDataByCoordinates(e,t){const i=JSON.stringify({top:e.top,left:e.left});return this.cache.get(i,()=>{const r=this._getCells(t),m=this.getCellIndexByCoordinates(e,t),A=r.eq(m);return this.getCellData(A)})}getVisibleBounds(){const e={},t=this.getScrollable().$element(),i=this.getCellHeight(),r=this.getScrollableScrollTop()/i,m=r+(0,D.Oq)(t)/i;return e.top={hours:Math.floor(r*this.option("hoursInterval"))+this.option("startDayHour"),minutes:r%2?30:0},e.bottom={hours:Math.floor(m*this.option("hoursInterval"))+this.option("startDayHour"),minutes:Math.floor(m)%2?30:0},e}updateScrollPosition(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.timeZoneCalculator.createDate(e,{path:"toGrid"}),m=i&&this.isAllDayPanelVisible;this.needUpdateScrollPosition(r,t,m)&&this.scrollTo(r,t,m,!1)}needUpdateScrollPosition(e,t,i){const r=this._getCellsInViewport(i),m=this._isGroupsSpecified(t)?this._getGroupIndexByResourceId(t):0,A=e.getTime(),V=Tn.A.trimTime(e).getTime();return r.reduce((X,ce)=>{const{startDate:_e,endDate:Me,groupIndex:Ve}=this.getCellData(ce),Je=_e.getTime(),rt=Me.getTime();return(!(!i&&Je<=A&&A<rt||i&&V===Je)||m!==Ve)&&X},!0)}_getCellsInViewport(e){const t=this.getScrollable().$element(),i=this.getCellHeight(),r=this.getCellWidth(),m=this._getTotalCellCount(this._getGroupCount()),A=this.getScrollableScrollTop(),V=this.getScrollableScrollLeft(),X=A/i-this.virtualScrollingDispatcher.topVirtualRowsCount;let ce=Math.floor(X);A%i!=0&&(ce+=1);const _e=V/r;let Me=Math.floor(_e);V%r!=0&&(Me+=1);const Ve=Math.floor(X+(0,D.Oq)(t)/i),Je=Math.floor(_e+(0,D.RG)(t)/r),rt=this._getAllCells(e),Ct=[];return rt.each(function(Xt){const On=(0,a.A)(this),Fn=Xt%m,oi=Xt/m;Me<=Fn&&Fn<Je&&ce<=oi&&oi<Ve&&Ct.push(On)}),Ct}scrollToTime(e,t,i){if(!this._isValidScrollDate(i))return;const r=this._getScrollCoordinates(e,t,i),m=this.getScrollable();m.scrollBy({top:r.top-m.scrollTop(),left:0})}scrollTo(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this._isValidScrollDate(e,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]))return;const m=this._getGroupCount()&&t?this._getGroupIndexByResourceId(t):0,A=i&&this.isAllDayPanelVisible,V=this._getScrollCoordinates(e.getHours(),e.getMinutes(),e,m,A),X=this.getScrollable(),ce=X.$element(),_e=this.getCellWidth(),Me=this.option("rtlEnabled")?_e:0,Ve=(0,D.Oq)(ce),Ct=((0,D.RG)(ce)-_e)/2,Xt=(Ve-this.getCellHeight())/2,On=V.left-X.scrollLeft()-Ct-Me;let Fn=V.top-X.scrollTop()-Xt;A&&!this._isVerticalGroupedWorkSpace()&&(Fn=0),this.option("templatesRenderAsynchronously")?setTimeout(()=>{X.scrollBy({left:On,top:Fn})}):X.scrollBy({left:On,top:Fn})}_isValidScrollDate(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.getStartViewDate(),r=this.getEndViewDate();return!(e<i||e>r)||(t&&is.A.log("W1008",e),!1)}needApplyCollectorOffset(){return!1}removeDroppableCellClass(e){const t=e||this._getDroppableCell();t?.removeClass(VU)}_getCoordinatesByCell(e){const t=e.index()-this.virtualScrollingDispatcher.leftVirtualCellsCount;let i=e.parent().index();const r=this._hasAllDayClass(e),m=this._isVerticalGroupedWorkSpace();return r&&!m||(i-=this.virtualScrollingDispatcher.topVirtualRowsCount),{rowIndex:i,columnIndex:t}}_isShowAllDayPanel(){return this.option("showAllDayPanel")}_getTimePanelCells(){return this.$element().find(`.${F8}`)}_getRDateTableProps(){return{viewData:this.viewDataProvider.viewData,viewContext:this.getR1ComponentsViewContext(),dataCellTemplate:this.option("dataCellTemplate"),addDateTableClass:!this.option("crossScrollingEnabled")||this.isVirtualScrolling(),groupOrientation:this.option("groupOrientation"),addVerticalSizesClassToRows:!1}}getR1ComponentsViewContext(){return{view:{type:this.type},crossScrollingEnabled:!!this.option("crossScrollingEnabled")}}_updateSelectedCellDataOption(e,t){const i=e.map(r=>{let{startDate:m,endDate:A,allDay:V,groupIndex:X,groups:ce}=r;return{startDate:m,endDate:A,allDay:V,groupIndex:X,groups:ce}});this.option("selectedCellData",i),this._selectionChangedAction({selectedCellData:i})}_getCellByData(e){const{startDate:t,groupIndex:i,allDay:r,index:m}=e,A=this.viewDataProvider.findCellPositionInMap({startDate:t,groupIndex:i,isAllDay:r,index:m});if(A)return r&&!this._isVerticalGroupedWorkSpace()?this._dom_getAllDayPanelCell(A.columnIndex):this._dom_getDateCell(A)}getDOMElementsMetaData(){return this.cache.get("cellElementsMeta",()=>({dateTableCellsMeta:this._getDateTableDOMElementsInfo(),allDayPanelCellsMeta:this._getAllDayPanelDOMElementsInfo()}))}_getDateTableDOMElementsInfo(){const e=this._getAllCells(!1);if(!e.length||!(0,gr.Vd)())return[[{}]];const t=this._getDateTable(),i=(0,za.N)(t.get(0)),r=this.viewDataProvider.getColumnsCount(),m=[];return e.each((A,V)=>{const X=Math.floor(A/r);m.length===X&&m.push([]),this._addCellMetaData(m[X],V,i)}),m}_getAllDayPanelDOMElementsInfo(){const e=[];if(this.isAllDayPanelVisible&&!this._isVerticalGroupedWorkSpace()&&(0,gr.Vd)()){const t=this._getAllCells(!0);if(!t.length)return[{}];const r=(0,za.N)(this._$allDayPanel.get(0));t.each((m,A)=>{this._addCellMetaData(e,A,r)})}return e}_addCellMetaData(e,t,i){const r=(0,za.N)(t);e.push({left:r.left-i.left,top:r.top-i.top,width:r.width,height:r.height})}_oldRender_getAllDayCellData(e){return(t,i,r)=>{const m=r%this._getCellCount(),A=this._getDateGenerationOptions(!0);let V=this.viewDataProvider.viewDataGenerator.getDateByCellIndices(A,i,m,this._getCellCountInDay());V=Tn.A.trimTime(V);let X=e||0;this.isGroupedByDate()?X=Math.floor(r%this._getGroupCount()):this._isHorizontalGroupedWorkSpace()&&(X=Math.floor(r/this._getCellCount()));const ce={startDate:V,endDate:V,allDay:!0,groupIndex:X},_e=Kk(X,this.option("groups"));return _e.length&&(ce.groups=bU(_e)),{key:K8,value:ce}}}renderRWorkSpace(){let{header:e,timePanel:t,dateTable:i,allDayPanel:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y8.renderComponents;e&&this.renderRHeaderPanel(),t&&this.renderRTimeTable(),i&&this.renderRDateTable(),r&&this.renderRAllDayPanel()}renderRDateTable(){Tg.renovation.renderComponent(this,this._$dateTable,BU,"renovatedDateTable",this._getRDateTableProps())}renderRGroupPanel(){var e;const t={viewContext:this.getR1ComponentsViewContext(),groups:this.option("groups"),groupOrientation:this.option("groupOrientation"),groupByDate:this.isGroupedByDate(),resourceCellTemplate:this.option("resourceCellTemplate"),className:this.verticalGroupTableClass,groupPanelData:this.viewDataProvider.getGroupPanelData(this.generateRenderOptions())};null!==(e=this.option("groups"))&&void 0!==e&&e.length?(this._attachGroupCountClass(),Tg.renovation.renderComponent(this,this._getGroupHeaderContainer(),p8,"renovatedGroupPanel",t)):this._detachGroupCountClass()}renderRAllDayPanel(){if(this.isAllDayPanelVisible&&!this.isGroupedAllDayPanel()){var t;this._toggleAllDayVisibility(!1);const i=(0,Lo.A)({viewData:this.viewDataProvider.viewData,viewContext:this.getR1ComponentsViewContext(),dataCellTemplate:this.option("dataCellTemplate"),startCellIndex:0},(null===(t=this.virtualScrollingDispatcher.horizontalVirtualScrolling)||void 0===t?void 0:t.getRenderState())||{});Tg.renovation.renderComponent(this,this._$allDayTable,l8,"renovatedAllDayPanel",i),Tg.renovation.renderComponent(this,this._$allDayTitle,n8,"renovatedAllDayPanelTitle",{})}this._toggleAllDayVisibility(!0)}renderRTimeTable(){Tg.renovation.renderComponent(this,this._$timePanel,y8,"renovatedTimePanel",{viewContext:this.getR1ComponentsViewContext(),timePanelData:this.viewDataProvider.timePanelData,timeCellTemplate:this.option("timeCellTemplate"),groupOrientation:this.option("groupOrientation")})}renderRHeaderPanel(){var e;let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null!==(e=this.option("groups"))&&void 0!==e&&e.length?this._attachGroupCountClass():this._detachGroupCountClass(),Tg.renovation.renderComponent(this,this._$thead,this.renovatedHeaderPanelComponent,"renovatedHeaderPanel",{viewContext:this.getR1ComponentsViewContext(),dateHeaderData:this.viewDataProvider.dateHeaderData,groupPanelData:this.viewDataProvider.getGroupPanelData(this.generateRenderOptions()),dateCellTemplate:this.option("dateCellTemplate"),timeCellTemplate:this.option("timeCellTemplate"),groups:this.option("groups"),groupByDate:this.isGroupedByDate(),groupOrientation:this.option("groupOrientation"),resourceCellTemplate:this.option("resourceCellTemplate"),isRenderDateHeader:t})}initDragBehavior(e){if(!this.dragBehavior&&e){this.dragBehavior=new nse(e);const t=(0,a.A)(e.element());this._createDragBehavior(this.getWorkArea(),t),this._isVerticalGroupedWorkSpace()||this._createDragBehavior(this._$allDayPanel,t)}}_createDragBehavior(e,t){this._createDragBehaviorBase(e,t,{getItemData:(r,m)=>m._getItemData(r),getItemSettings:r=>r.data(VS)})}_createDragBehaviorBase(e,t,i){const r=this.$element().find(`.${y5}`);this.dragBehavior.addTo(e,((n,e,t,i,r,m,A,V,X,ce,_e)=>{const Me={dragElement:void 0,itemData:void 0},Ve=()=>{const{itemData:rt}=Me;return!rt||(0,fa.Hz)("disabled")(rt)};return{container:n,dragTemplate:()=>Me.dragElement,onDragStart:rt=>{t||m();const Ct=rt.cancel,{event:Xt}=rt,On=(0,a.A)(rt.itemElement),Fn=rt.component._appointments;Me.itemData=_e.getItemData(rt.itemElement,Fn);const oi=_e.getItemSettings(On,rt),{initialPosition:Yt}=_e;Ve()||(Xt.data=Xt.data||{},Ct||(oi.isCompact||i.updateDragSource(Me.itemData,oi),Me.dragElement=(($t,xn,Gn)=>{const qn=Gn.option("items").length;return xn.isCompact=!1,xn.virtual=!1,Gn._renderItem(qn,{itemData:$t,settings:[xn]})[0]})(Me.itemData,oi,Fn),Xt.data.itemElement=Me.dragElement,Xt.data.initialPosition=Yt??(0,Fw.x5)((0,a.A)(Me.dragElement)),Xt.data.itemData=Me.itemData,Xt.data.itemSettings=oi,i.onDragStart(Xt.data),(0,Fw.fw)((0,a.A)(Me.dragElement))))},onDragMove:()=>{if(t)return;const rt=(()=>{const Fn=(0,D.RG)(Me.dragElement),Yt=Fn>ce(),$t=Fn<=10,xn=(0,a.A)(Me.dragElement).parent().get(0),Gn=(0,za.N)(xn),qn=Gn.left,ii=Gn.top;return Yt?c.A.elementsFromPoint(qn+10,ii+10,xn):$t?c.A.elementsFromPoint(qn,ii,xn):c.A.elementsFromPoint(qn+Fn/2,ii+10,xn)})(),Ct=!!rt.find(Fn=>Fn===e.get(0)),Xt=V(),On=rt.find(Fn=>{const{classList:oi}=Fn;return 1===Xt.find(Fn).length&&(oi.contains(Vy)||oi.contains(GS))});On?(A().is(On)||X(),(0,a.A)(On).addClass(VU)):Ct||X()},onDragEnd:rt=>{var Ct;t||r(),Ve()||i.onDragEnd(rt),null===(Ct=Me.dragElement)||void 0===Ct||Ct.remove(),X()},cursorOffset:_e.isSetCursorOffset?()=>{const rt=(0,a.A)(Me.dragElement);return{x:(0,D.RG)(rt)/2,y:(0,D.Oq)(rt)/2}}:void 0,filter:_e.filter}})(r,t,this.isDefaultDraggingMode,this.dragBehavior,()=>{this.isDefaultDraggingMode||(this.preventDefaultDragging=!1)},()=>{this.isDefaultDraggingMode||(this.preventDefaultDragging=!0)},()=>this._getDroppableCell(),()=>this._getDateTables(),()=>this.removeDroppableCellClass(),()=>this.getCellWidth(),i))}_isRenderHeaderPanelEmptyCell(){return this._isVerticalGroupedWorkSpace()}_dispose(){super._dispose(),this.virtualScrollingDispatcher.dispose()}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{currentDate:new Date,intervalCount:1,startDate:null,firstDayOfWeek:void 0,startDayHour:0,endDayHour:24,viewOffset:0,hoursInterval:.5,activeStateEnabled:!0,hoverStateEnabled:!0,groups:[],showAllDayPanel:!0,allDayExpanded:!1,onCellClick:null,crossScrollingEnabled:!1,dataCellTemplate:null,timeCellTemplate:null,resourceCellTemplate:null,dateCellTemplate:null,allowMultipleCellSelection:!0,indicatorTime:new Date,indicatorUpdateInterval:5*FU("minute"),shadeUntilCurrentTime:!0,groupOrientation:"horizontal",selectedCellData:[],groupByDate:!1,scrolling:{mode:"standard"},allDayPanelMode:"all",renovateRender:!0,height:void 0,draggingMode:"outlook",onScrollEnd:()=>{},getHeaderHeight:void 0,onRenderAppointments:()=>{},onShowAllDayPanel:()=>{},onSelectedCellsClick:()=>{},timeZoneCalculator:void 0,schedulerHeight:void 0,schedulerWidth:void 0})}_optionChanged(e){switch(e.name){case"startDayHour":case"endDayHour":case"viewOffset":case"dateCellTemplate":case"resourceCellTemplate":case"dataCellTemplate":case"timeCellTemplate":case"hoursInterval":case"firstDayOfWeek":case"currentDate":case"startDate":this._cleanWorkSpace();break;case"groups":this._cleanView(),this._removeAllDayElements(),this._initGrouping(),this.repaint();break;case"groupOrientation":this._initGroupedStrategy(),this._createAllDayPanelElements(),this._removeAllDayElements(),this._cleanWorkSpace(),this._toggleGroupByDateClass();break;case"showAllDayPanel":this._isVerticalGroupedWorkSpace()?(this._cleanView(),this._removeAllDayElements(),this._initGrouping(),this.repaint()):this.isRenovatedRender()?this.renderWorkSpace():this._toggleAllDayVisibility(!0);break;case"allDayExpanded":this._changeAllDayVisibility(),this._attachTablesEvents(),this._updateScrollable();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"onCellClick":this._createCellClickAction();break;case"onCellContextMenu":this._attachContextMenuEvent();break;case"intervalCount":this._cleanWorkSpace(),this._toggleWorkSpaceCountClass();break;case"groupByDate":this._cleanWorkSpace(),this._toggleGroupByDateClass();break;case"crossScrollingEnabled":this._toggleHorizontalScrollClass(),this._dateTableScrollable.option(this._dateTableScrollableConfig());break;case"allDayPanelMode":this.updateShowAllDayPanel(),this.updateAppointments();break;case"width":super._optionChanged(e),this._dimensionChanged();break;case"timeZoneCalculator":case"allowMultipleCellSelection":case"selectedCellData":break;case"renovateRender":case"scrolling":this.repaint();break;case"schedulerHeight":case"schedulerWidth":this.virtualScrollingDispatcher.updateDimensions(!0);break;default:super._optionChanged(e)}}updateShowAllDayPanel(){const e="hidden"===this.option("allDayPanelMode");this.option("onShowAllDayPanel")(!e)}_getVirtualScrollingDispatcherOptions(){return{getCellHeight:this.getCellHeight.bind(this),getCellWidth:this.getCellWidth.bind(this),getCellMinWidth:this.getCellMinWidth.bind(this),isRTL:this._isRTL.bind(this),getSchedulerHeight:()=>this.option("schedulerHeight"),getSchedulerWidth:()=>this.option("schedulerWidth"),getViewHeight:()=>this.$element().height?this.$element().height():(0,D.Oq)(this.$element()),getViewWidth:()=>this.$element().width?this.$element().width():(0,D.RG)(this.$element()),getWindowHeight:()=>(0,gr.zk)().innerHeight,getWindowWidth:()=>(0,gr.zk)().innerWidth,getScrolling:()=>this.option("scrolling"),getScrollableOuterWidth:this.getScrollableOuterWidth.bind(this),getScrollable:this.getScrollable.bind(this),createAction:this._createAction.bind(this),updateRender:this.updateRender.bind(this),updateGrid:this.updateGrid.bind(this),getGroupCount:this._getGroupCount.bind(this),isVerticalGrouping:this._isVerticalGroupedWorkSpace.bind(this),getTotalRowCount:this._getTotalRowCount.bind(this),getTotalCellCount:this._getTotalCellCount.bind(this)}}_cleanWorkSpace(){this._cleanView(),this._toggleGroupedClass(),this._toggleWorkSpaceWithOddCells(),this.virtualScrollingDispatcher.updateDimensions(!0),this._renderView(),this.option("crossScrollingEnabled")&&this._setTableSizes(),this.cache.clear()}_init(){this._scrollSync={},this._viewDataProvider=null,this._cellsSelectionState=null,this._activeStateUnit=Zse,super._init(),this._initGrouping(),this._toggleHorizontalScrollClass(),this._toggleWorkSpaceCountClass(),this._toggleGroupByDateClass(),this._toggleWorkSpaceWithOddCells(),this.$element().addClass("dx-scheduler-work-space").addClass(this._getElementClass())}_initPositionHelper(){this.positionHelper=new voe({key:this.option("key"),viewDataProvider:this.viewDataProvider,viewStartDayHour:this.option("startDayHour"),viewEndDayHour:this.option("endDayHour"),cellDuration:this.getCellDuration(),groupedStrategy:this._groupedStrategy,isGroupedByDate:this.isGroupedByDate(),rtlEnabled:this.option("rtlEnabled"),startViewDate:this.getStartViewDate(),isVerticalGrouping:this._isVerticalGroupedWorkSpace(),groupCount:this._getGroupCount(),isVirtualScrolling:this.isVirtualScrolling(),getDOMMetaDataCallback:this.getDOMElementsMetaData.bind(this)})}_initGrouping(){this._initGroupedStrategy(),this._toggleGroupingDirectionClass(),this._toggleGroupByDateClass()}isVerticalOrientation(){var e;return"vertical"===(null!==(e=this.option("groups"))&&void 0!==e&&e.length?this.option("groupOrientation"):this._getDefaultGroupStrategy())}_initGroupedStrategy(){const e=this.isVerticalOrientation()?A8:mse;this._groupedStrategy=new e(this)}_getDefaultGroupStrategy(){return"horizontal"}_toggleHorizontalScrollClass(){this.$element().toggleClass("dx-scheduler-work-space-both-scrollbar",this.option("crossScrollingEnabled"))}_toggleGroupByDateClass(){this.$element().toggleClass("dx-scheduler-work-space-group-by-date",this.isGroupedByDate())}_toggleWorkSpaceCountClass(){this.$element().toggleClass("dx-scheduler-work-space-count",this._isWorkSpaceWithCount())}_toggleWorkSpaceWithOddCells(){this.$element().toggleClass("dx-scheduler-work-space-odd-cells",this._isWorkspaceWithOddCells())}_toggleGroupingDirectionClass(){this.$element().toggleClass("dx-scheduler-work-space-vertical-grouped",this._isVerticalGroupedWorkSpace())}_getDateTableCellClass(e,t){return this._groupedStrategy.addAdditionalGroupCellClasses(`${Vy} ${C$} ${U8}`,t+1,e,t)}_getGroupHeaderClass(e){return this._groupedStrategy.addAdditionalGroupCellClasses(z8,e+1)}_initWorkSpaceUnits(){this._$headerPanelContainer=(0,a.A)("<div>").addClass("dx-scheduler-header-panel-container"),this._$headerTablesContainer=(0,a.A)("<div>").addClass("dx-scheduler-header-tables-container"),this._$headerPanel=(0,a.A)("<table>"),this._$thead=(0,a.A)("<thead>").appendTo(this._$headerPanel),this._$headerPanelEmptyCell=(0,a.A)("<div>").addClass("dx-scheduler-header-panel-empty-cell"),this._$allDayTable=(0,a.A)("<table>"),this._$fixedContainer=(0,a.A)("<div>").addClass(y5),this._$allDayContainer=(0,a.A)("<div>").addClass("dx-scheduler-all-day-appointments"),this._$dateTableScrollableContent=(0,a.A)("<div>").addClass("dx-scheduler-date-table-scrollable-content"),this._$sidebarScrollableContent=(0,a.A)("<div>").addClass("dx-scheduler-side-bar-scrollable-content"),this._initAllDayPanelElements(),this.isRenovatedRender()?this.createRAllDayPanelElements():this._createAllDayPanelElements(),this._$timePanel=(0,a.A)("<table>").addClass(x5),this._$dateTable=(0,a.A)("<table>"),this._$dateTableContainer=(0,a.A)("<div>").addClass("dx-scheduler-date-table-container"),this._$groupTable=(0,a.A)("<div>").addClass(N8)}_initAllDayPanelElements(){this._allDayTitles=[],this._allDayTables=[],this._allDayPanels=[]}_initDateTableScrollable(){const e=(0,a.A)("<div>").addClass("dx-scheduler-date-table-scrollable");this._dateTableScrollable=this._createComponent(e,nV.A,this._dateTableScrollableConfig()),this._scrollSync.dateTable=NH(()=>this._dateTableScrollable)}_createWorkSpaceElements(){this.option("crossScrollingEnabled")?this._createWorkSpaceScrollableElements():this._createWorkSpaceStaticElements()}_createWorkSpaceStaticElements(){var e;this._$dateTableContainer.append(this._$dateTable),this._isVerticalGroupedWorkSpace()?(this._$dateTableContainer.append(this._$allDayContainer),this._$dateTableScrollableContent.append(this._$groupTable,this._$timePanel,this._$dateTableContainer),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._$headerTablesContainer.append(this._$headerPanel)):(this._$dateTableScrollableContent.append(this._$timePanel,this._$dateTableContainer),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._$headerTablesContainer.append(this._$headerPanel,this._$allDayPanel),null===(e=this._$allDayPanel)||void 0===e||e.append(this._$allDayContainer,this._$allDayTable)),this._appendHeaderPanelEmptyCellIfNecessary(),this._$headerPanelContainer.append(this._$headerTablesContainer),this.$element().append(this._$fixedContainer,this._$headerPanelContainer,this._dateTableScrollable.$element())}_createWorkSpaceScrollableElements(){var e;this.$element().append(this._$fixedContainer),this._$flexContainer=(0,a.A)("<div>").addClass("dx-scheduler-work-space-flex-container"),this._createHeaderScrollable(),this._headerScrollable.$content().append(this._$headerPanel),this._appendHeaderPanelEmptyCellIfNecessary(),this._$headerPanelContainer.append(this._$headerTablesContainer),this.$element().append(this._$headerPanelContainer),this.$element().append(this._$flexContainer),this._createSidebarScrollable(),this._$flexContainer.append(this._dateTableScrollable.$element()),this._$dateTableContainer.append(this._$dateTable),this._$dateTableScrollableContent.append(this._$dateTableContainer),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._isVerticalGroupedWorkSpace()?(this._$dateTableContainer.append(this._$allDayContainer),this._$sidebarScrollableContent.append(this._$groupTable,this._$timePanel)):(this._headerScrollable.$content().append(this._$allDayPanel),null===(e=this._$allDayPanel)||void 0===e||e.append(this._$allDayContainer,this._$allDayTable),this._$sidebarScrollableContent.append(this._$timePanel)),this._sidebarScrollable.$content().append(this._$sidebarScrollableContent)}_appendHeaderPanelEmptyCellIfNecessary(){this._isRenderHeaderPanelEmptyCell()&&this._$headerPanelContainer.append(this._$headerPanelEmptyCell)}_createHeaderScrollable(){const e=(0,a.A)("<div>").addClass("dx-scheduler-header-scrollable").appendTo(this._$headerTablesContainer);this._headerScrollable=this._createComponent(e,nV.A,this._headerScrollableConfig()),this._scrollSync.header=NH(()=>this._headerScrollable)}_createSidebarScrollable(){const e=(0,a.A)("<div>").addClass("dx-scheduler-sidebar-scrollable").appendTo(this._$flexContainer);this._sidebarScrollable=this._createComponent(e,nV.A,{useKeyboard:!1,showScrollbar:"never",direction:"vertical",useNative:!1,updateManually:!0,bounceEnabled:!1,onScroll:t=>{this._scrollSync.dateTable({top:t.scrollOffset.top})}}),this._scrollSync.sidebar=NH(()=>this._sidebarScrollable)}_attachTableClasses(){if(this._addTableClass(this._$dateTable,TW),this._isVerticalGroupedWorkSpace()){const e=this._getGroupCount();for(let t=0;t<e;t++)this._addTableClass(this._allDayTables[t],v$)}else this.isRenovatedRender()||this._addTableClass(this._$allDayTable,v$)}_attachHeaderTableClasses(){this._addTableClass(this._$headerPanel,"dx-scheduler-header-panel")}_addTableClass(e,t){e&&!e.hasClass(t)&&e.addClass(t)}_initMarkup(){this.cache.clear(),this._initWorkSpaceUnits(),this._initVirtualScrolling(),this._initDateTableScrollable(),this._createWorkSpaceElements(),super._initMarkup(),this.option("crossScrollingEnabled")||(this._attachTableClasses(),this._attachHeaderTableClasses()),this._toggleGroupedClass(),this._renderView(),this._attachEvents()}_render(){super._render(),this._renderDateTimeIndication(),this._setIndicationUpdateInterval()}_toggleGroupedClass(){this.$element().toggleClass("dx-scheduler-work-space-grouped",this._getGroupCount()>0)}_renderView(){this.isRenovatedRender()?this._isVerticalGroupedWorkSpace()&&this.renderRGroupPanel():this._applyCellTemplates(this._renderGroupHeader()),this.renderWorkSpace(),this.isRenovatedRender()&&this.virtualScrollingDispatcher.updateDimensions(),this._updateGroupTableHeight(),this.updateHeaderEmptyCellWidth(),this._shader=new ase(this)}updateCellsSelection(){const e=this.generateRenderOptions();this.viewDataProvider.updateViewData(e),this.renderRWorkSpace({timePanel:!0,dateTable:!0,allDayPanel:!0})}_renderDateTimeIndication(){return(0,h.lQ)()}renderCurrentDateTimeLineAndShader(){return(0,h.lQ)()}renderCurrentDateTimeIndication(){return(0,h.lQ)()}_setIndicationUpdateInterval(){return(0,h.lQ)()}_detachGroupCountClass(){[...pU].forEach(e=>{this.$element().removeClass(e)})}_attachGroupCountClass(){const e=this._groupedStrategy.getGroupCountClass(this.option("groups"));this.$element().addClass(e)}_getDateHeaderTemplate(){return this.option("dateCellTemplate")}_toggleAllDayVisibility(e){const t=this._isShowAllDayPanel();this.$element().toggleClass("dx-scheduler-work-space-all-day",t),this._changeAllDayVisibility(),e&&this._updateScrollable()}_changeAllDayVisibility(){this.cache.clear(),this.$element().toggleClass("dx-scheduler-work-space-all-day-collapsed",!this.option("allDayExpanded")&&this._isShowAllDayPanel())}_getDateTables(){return this._$dateTable.add(this._$allDayTable)}_getDateTable(){return this._$dateTable}_removeAllDayElements(){this._$allDayTable&&this._$allDayTable.remove(),this._$allDayTitle&&this._$allDayTitle.remove()}_cleanView(){var e,t,i;this.cache.clear(),this._cleanTableWidths(),this.cellsSelectionState.clearSelectedAndFocusedCells(),this.isRenovatedRender()||(this._$thead.empty(),this._$dateTable.empty(),this._$timePanel.empty(),this._$groupTable.empty(),null===(t=this._$allDayTable)||void 0===t||t.empty(),null===(i=this._$sidebarTable)||void 0===i||i.empty()),null===(e=this._shader)||void 0===e||e.clean(),delete this._interval}_clean(){L.A.off(c.A.getDocument(),y$),this._disposeRenovatedComponents(),super._clean()}_cleanTableWidths(){this._$headerPanel.css("width",""),this._$dateTable.css("width",""),this._$allDayTable&&this._$allDayTable.css("width","")}_disposeRenovatedComponents(){var e,t,i,r,m;null===(e=this.renovatedAllDayPanel)||void 0===e||e.dispose(),this.renovatedAllDayPanel=void 0,null===(t=this.renovatedDateTable)||void 0===t||t.dispose(),this.renovatedDateTable=void 0,null===(i=this.renovatedTimePanel)||void 0===i||i.dispose(),this.renovatedTimePanel=void 0,null===(r=this.renovatedGroupPanel)||void 0===r||r.dispose(),this.renovatedGroupPanel=void 0,null===(m=this.renovatedHeaderPanel)||void 0===m||m.dispose(),this.renovatedHeaderPanel=void 0}getGroupedStrategy(){return this._groupedStrategy}getFixedContainer(){return this._$fixedContainer}getAllDayContainer(){return this._$allDayContainer}updateRender(){this.renderer.updateRender()}updateGrid(){this.renderer._renderGrid()}updateAppointments(){var e;this.option("onRenderAppointments")(),null===(e=this.dragBehavior)||void 0===e||e.updateDragSource()}_createAllDayPanelElements(){const e=this._getGroupCount();if(this._isVerticalGroupedWorkSpace()&&0!==e)for(let t=0;t<e;t++){const i=(0,a.A)("<div>").addClass(V8).text(Wn.A.format("dxScheduler-allDay"));this._allDayTitles.push(i),this._$allDayTable=(0,a.A)("<table>"),this._allDayTables.push(this._$allDayTable),this._$allDayPanel=(0,a.A)("<div>").addClass(_$).append(this._$allDayTable),this._allDayPanels.push(this._$allDayPanel)}else this._$allDayTitle=(0,a.A)("<div>").addClass(V8).text(Wn.A.format("dxScheduler-allDay")).appendTo(this.$element()),this._$allDayTable=(0,a.A)("<table>"),this._$allDayPanel=(0,a.A)("<div>").addClass(_$).append(this._$allDayTable)}renderWorkSpace(){let{generateNewData:e,renderComponents:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y8;this.cache.clear(),this.viewDataProvider.update(this.generateRenderOptions(),e),this.isRenovatedRender()?this.renderRWorkSpace(t):(this._renderDateHeader(),this._renderTimePanel(),this._renderGroupAllDayPanel(),this._renderDateTable(),this._renderAllDayPanel()),this._initPositionHelper()}_renderGroupHeader(){const e=this._getGroupHeaderContainer();let i=[];if(this._getGroupCount()){const r=this._makeGroupRows(this.option("groups"),this.option("groupByDate"));this._attachGroupCountClass(),e.append(r.elements),i=r.cellTemplates}else this._detachGroupCountClass();return i}_applyCellTemplates(e){e?.forEach(t=>{t()})}_makeGroupRows(e,t){const i=this._isVerticalGroupedWorkSpace()?xV.VERTICAL:xV.HORIZONTAL;return xV.makeGroupedTable(i,e,{groupHeaderRowClass:Wk,groupRowClass:Wk,groupHeaderClass:this._getGroupHeaderClass.bind(this),groupHeaderContentClass:AW},this._getCellCount()||1,this.option("resourceCellTemplate"),this._getGroupCount(),t)}_renderDateHeader(){const e=this._getDateHeaderContainer(),t=(0,a.A)("<tr>").addClass("dx-scheduler-header-row"),i=this._getCellCount(),r=this._getDateHeaderTemplate(),m=this._getCalculateHeaderCellRepeatCount(),A=[],V=this.isGroupedByDate();if(V){const X=V?this._getGroupCount():1;for(let ce=0;ce<i;ce++)this._renderDateHeaderTemplate(t,ce,ce*m,r,A).attr("colSpan",X);e.prepend(t)}else{for(let X=0;X<m;X++)for(let ce=0;ce<i;ce++)this._renderDateHeaderTemplate(t,ce,X*i+ce,r,A);e.append(t)}return this._applyCellTemplates(A),t}_renderDateHeaderTemplate(e,t,i,r,m){const A=this.isGroupedByDate()?Math.floor(i/this._getGroupCount()):i,{completeDateHeaderMap:V}=this.viewDataProvider,{text:X,startDate:ce}=V[V.length-1][A],_e=(0,a.A)("<th>").addClass(this._getHeaderPanelCellClass(t)).attr("title",X);return null!=r&&r.render?m.push(r.render.bind(r,{model:(0,Lo.A)({text:X,date:ce},this._getGroupsForDateHeaderTemplate(i)),index:i,container:(0,s.cc)(_e)})):_e.text(X),e.append(_e),_e}_getGroupsForDateHeaderTemplate(e){let i,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this._isHorizontalGroupedWorkSpace()&&!this.isGroupedByDate()){i=this._getGroupIndex(0,e*t);const m=Kk(i,this.option("groups"));r=bU(m)}return{groups:r,groupIndex:i}}_getHeaderPanelCellClass(e){return this._groupedStrategy.addAdditionalGroupCellClasses(`dx-scheduler-header-panel-cell ${C$}`,e+1,void 0,void 0,this.isGroupedByDate())}_renderAllDayPanel(e){let t=this._getCellCount();this._isVerticalGroupedWorkSpace()||(t*=this._getGroupCount()||1);const i=this._renderTableBody({container:(0,s.cc)(this._allDayPanels.length?this._allDayTables[e]:this._$allDayTable),rowCount:1,cellCount:t,cellClass:this._getAllDayPanelCellClass.bind(this),rowClass:"dx-scheduler-all-day-table-row",cellTemplate:this.option("dataCellTemplate"),getCellData:this._oldRender_getAllDayCellData(e),groupIndex:e},!0);this._toggleAllDayVisibility(!0),this._applyCellTemplates(i)}_renderGroupAllDayPanel(){if(this._isVerticalGroupedWorkSpace()){const e=this._getGroupCount();for(let t=0;t<e;t++)this._renderAllDayPanel(t)}}_getAllDayPanelCellClass(e,t){return this._groupedStrategy.addAdditionalGroupCellClasses(`${GS} ${C$}`,t+1)}_renderTimePanel(){const e=this._groupedStrategy.calculateTimeCellRepeatCount(),t=(i,r)=>{let m=0;return this.isAllDayPanelVisible&&(m=1),this.isGroupedAllDayPanel()&&(m=Math.ceil((i+1)/this._getRowCount())),this.viewDataProvider.completeTimePanelMap[i+m][r]};this._renderTableBody({container:(0,s.cc)(this._$timePanel),rowCount:this._getTimePanelRowCount()*e,cellCount:1,cellClass:this._getTimeCellClass.bind(this),rowClass:"dx-scheduler-time-panel-row",cellTemplate:this.option("timeCellTemplate"),getCellText:i=>t(i,"text"),getCellDate:i=>t(i,"startDate"),groupCount:this._getGroupCount(),allDayElements:this._insertAllDayRowsIntoDateTable()?this._allDayTitles:void 0,getTemplateData:(i=>{if(!this._isVerticalGroupedWorkSpace())return{};const r=this._getGroupIndex(i,0),m=Kk(r,this.option("groups"));return{groupIndex:r,groups:bU(m)}}).bind(this)})}_getTimeCellClass(e){const t=`${F8} ${U8}`;return this._isVerticalGroupedWorkSpace()?this._groupedStrategy.addAdditionalGroupCellClasses(t,e,e):t}_renderDateTable(){const e=this._getGroupCount();this._renderTableBody({container:(0,s.cc)(this._$dateTable),rowCount:this._getTotalRowCount(e),cellCount:this._getTotalCellCount(e),cellClass:this._getDateTableCellClass.bind(this),rowClass:DW,cellTemplate:this.option("dataCellTemplate"),getCellData:(t,i,r)=>{let A=i;if(this.isGroupedAllDayPanel()){const X=this._getRowCount();A+=Math.ceil(i/X)}const{cellData:V}=this.viewDataProvider.viewDataMap.dateTableMap[A][r];return{value:this._filterCellDataFields(V),fullValue:V,key:K8}},allDayElements:this._insertAllDayRowsIntoDateTable()?this._allDayPanels:void 0,groupCount:e,groupByDate:this.option("groupByDate")})}_insertAllDayRowsIntoDateTable(){return this._groupedStrategy.insertAllDayRowsIntoDateTable()}_renderTableBody(e,t){let i=[];return t?i=xV.makeTable(e):this._applyCellTemplates(xV.makeTable(e)),i}},{tableCreator:Q8}=s$,J8="dx-scheduler-group-table";class q8 extends Z8{get type(){return kc.AGENDA}get renderingStrategy(){return this.invoke("getLayoutManager").getRenderingStrategyInstance()}get appointmentDataProvider(){return this.option("getAppointmentDataProvider")()}getStartViewDate(){return this._startViewDate}_init(){super._init(),this._activeStateUnit=void 0}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{agendaDuration:7,rowHeight:60,noDataText:""})}_optionChanged(e){const{name:t}=e,{value:i}=e;switch(t){case"agendaDuration":break;case"noDataText":case"rowHeight":this._recalculateAgenda(this._rows);break;case"groups":i&&i.length?this._$groupTable||(this._initGroupTable(),this._dateTableScrollable.$content().prepend(this._$groupTable)):this._$groupTable&&(this._$groupTable.remove(),this._$groupTable=null,this._detachGroupCountClass()),super._optionChanged(e);break;default:super._optionChanged(e)}}_renderFocusState(){return(0,h.lQ)()}_renderFocusTarget(){return(0,h.lQ)()}_cleanFocusState(){return(0,h.lQ)()}supportAllDayRow(){return!1}_isVerticalGroupedWorkSpace(){return!1}_getElementClass(){return"dx-scheduler-agenda"}_calculateStartViewDate(){return((n,e)=>{const t=new Date(n);return Lw(t,e)})(this.option("currentDate"),this.option("startDayHour"))}_getRowCount(){return this.option("agendaDuration")}_getCellCount(){return 1}_getTimePanelRowCount(){return this.option("agendaDuration")}_renderAllDayPanel(){return(0,h.lQ)()}_toggleAllDayVisibility(){return(0,h.lQ)()}_initWorkSpaceUnits(){this._initGroupTable(),this._$timePanel=(0,a.A)("<table>").addClass(x5),this._$dateTable=(0,a.A)("<table>").addClass(TW),this._$dateTableScrollableContent=(0,a.A)("<div>").addClass("dx-scheduler-date-table-scrollable-content"),this._$dateTableContainer=(0,a.A)("<div>").addClass("dx-scheduler-date-table-container")}_initGroupTable(){const e=this.option("groups");e&&e.length&&(this._$groupTable=(0,a.A)("<table>").addClass(J8))}_renderView(){this._startViewDate=this._calculateStartViewDate(),this._rows=[],this._initPositionHelper()}_recalculateAgenda(e){let t=[];this._cleanView(),this._rowsIsEmpty(e)?this._renderNoData():(this._rows=e,this._$groupTable&&(t=this._renderGroupHeader(),this._setGroupHeaderCellsHeight()),this._renderTimePanel(),this._renderDateTable(),this.invoke("onAgendaReady",e),this._applyCellTemplates(t),this._dateTableScrollable.update())}_renderNoData(){this._$noDataContainer=(0,a.A)("<div>").addClass("dx-scheduler-agenda-nodata").html(this.option("noDataText")),this._dateTableScrollable.$content().append(this._$noDataContainer)}_setTableSizes(){return(0,h.lQ)()}_toggleHorizontalScrollClass(){return(0,h.lQ)()}_createCrossScrollingConfig(e){return(0,h.lQ)()}_setGroupHeaderCellsHeight(){const e=this._getGroupHeaderCells().filter((i,r)=>!r.getAttribute("rowSpan")),t=this._removeEmptyRows(this._rows);if(t.length)for(let i=0;i<e.length;i++){const r=e.eq(i).find(".dx-scheduler-group-header-content");(0,D.NG)(r,this._getGroupRowHeight(t[i]))}}_rowsIsEmpty(e){let t=!0;for(let i=0;i<e.length;i++){const r=e[i];for(let m=0;m<r.length;m++)if(r[m]){t=!1;break}}return t}_attachGroupCountClass(){const e=w5(this.option("groups"));this.$element().addClass(e)}_removeEmptyRows(e){const t=[];for(let r=0;r<e.length;r++)e[r].length&&e[r].some(m=>m>0)&&t.push(e[r]);return t}_getGroupHeaderContainer(){return this._$groupTable}_makeGroupRows(){const e=((n,e,t)=>{const i=fV(n);return o7(e,i,t)})(this.option("loadedResources"),(A,V)=>SU(this.option("getResourceDataAccessors")(),A,V),this.option("getFilteredItems")()),t=this.option("resourceCellTemplate"),i=AW,r=[],m=Q8.makeGroupedTableFromJSON(Q8.VERTICAL,e,{cellTag:"th",groupTableClass:J8,groupRowClass:Wk,groupCellClass:this._getGroupHeaderClass(),groupCellCustomContent(A,V,X,ce){const _e=c.A.createElement("div");if(_e.className=i,t&&t.render)r.push(t.render.bind(t,{model:{data:ce.data,id:ce.value,color:ce.color,text:V.textContent},container:(0,s.cc)((0,a.A)(_e)),index:X}));else{const Me=c.A.createElement("div");Me.appendChild(V),_e.appendChild(Me)}A.appendChild(_e)},cellTemplate:t});return{elements:(0,a.A)(m).find(`.${Wk}`),cellTemplates:r}}_cleanView(){this._$dateTable.empty(),this._$timePanel.empty(),this._$groupTable&&this._$groupTable.empty(),this._$noDataContainer&&(this._$noDataContainer.empty(),this._$noDataContainer.remove(),delete this._$noDataContainer)}_createWorkSpaceElements(){this._createWorkSpaceStaticElements()}_createWorkSpaceStaticElements(){this._$dateTableContainer.append(this._$dateTable),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._$groupTable&&this._$dateTableScrollableContent.prepend(this._$groupTable),this._$dateTableScrollableContent.append(this._$timePanel,this._$dateTableContainer),this.$element().append(this._dateTableScrollable.$element())}_renderDateTable(){this._renderTableBody({container:(0,s.cc)(this._$dateTable),rowClass:DW,cellClass:this._getDateTableCellClass()})}_attachTablesEvents(){return(0,h.lQ)()}_attachEvents(){return(0,h.lQ)()}_cleanCellDataCache(){return(0,h.lQ)()}isIndicationAvailable(){return!1}_prepareCellTemplateOptions(e,t,i,r){const m=this.option("groups"),A={},V=!!m.length;(V&&t7(i,m)||[]).forEach((_e,Me)=>{A[m[Me].name]=_e});const ce=V?this._getGroupIndexByResourceId(A):void 0;return{model:{text:e,date:t,groups:A,groupIndex:ce},container:(0,s.cc)(r),index:i}}_renderTableBody(e,t){const i=[],r=e.cellTemplate;let m;this._$rows=[];const A=function(V,X){if(X){let ce,_e,Me;const Ve=(0,a.A)("<tr>"),Je=(0,a.A)("<td>");if((0,D.k$)(Je,this._getRowHeight(X)),e.getStartDate&&(ce=e.getStartDate&&e.getStartDate(V),_e=sa.A.format(ce,"d"),Me=sa.A.format(ce,zW)),r&&r.render){const rt=this._prepareCellTemplateOptions(`${_e} ${Me}`,ce,m,Je);i.push(r.render.bind(r,rt))}else _e&&Me&&Je.addClass("dx-scheduler-agenda-date").text(`${_e} ${Me}`);e.rowClass&&Ve.addClass(e.rowClass),e.cellClass&&Je.addClass(e.cellClass),Ve.append(Je),this._$rows.push(Ve)}}.bind(this);for(m=0;m<this._rows.length;m++)(0,w.__)(this._rows[m],A),this._setLastRowClass();(0,a.A)(e.container).append((0,a.A)("<tbody>").append(this._$rows)),this._applyCellTemplates(i)}_setLastRowClass(){this._rows.length>1&&this._$rows.length&&this._$rows[this._$rows.length-1].addClass("dx-scheduler-date-table-last-row")}_renderTimePanel(){this._renderTableBody({container:(0,s.cc)(this._$timePanel),rowCount:this._getTimePanelRowCount(),cellCount:1,rowClass:"dx-scheduler-time-panel-row",cellClass:"dx-scheduler-time-panel-cell",cellTemplate:this.option("dateCellTemplate"),getStartDate:this._getTimePanelStartDate.bind(this)})}_getTimePanelStartDate(e){const t=new Date(this.option("currentDate"));return new Date(t.setDate(t.getDate()+e))}_getRowHeight(e){const t=this.option("rowHeight");return e?t*e+5*(e-1)+20:0}_getGroupRowHeight(e){if(!e)return;let t=0;for(let i=0;i<e.length;i++)t+=this._getRowHeight(e[i]);return t}_calculateRows(e){return this.renderingStrategy.calculateRows(e,this.option("agendaDuration"),this.option("currentDate"))}onDataSourceChanged(e){super.onDataSourceChanged(),this._renderView();const t=this._calculateRows(e);this._recalculateAgenda(t)}getAgendaVerticalStepHeight(){return this.option("rowHeight")}getEndViewDate(){const e=new Date(this.option("currentDate")),t=this.option("agendaDuration");e.setHours(this.option("endDayHour"));const i=e.setDate(e.getDate()+t-1)-6e4;return new Date(i)}getEndViewDateByEndDayHour(){return this.getEndViewDate()}getCellDataByCoordinates(){return{startDate:null,endDate:null}}updateScrollPosition(e){const t=this.timeZoneCalculator.createDate(e,{path:"toGrid"}),i=this.getVisibleBounds(),r=t.getHours(),m=t.getMinutes();this.needUpdateScrollPosition(r,m,i,t)&&this.scrollToTime(r,m,t)}needUpdateScrollPosition(e,t,i,r){let m=!1;return(e<i.top.hours||e>i.bottom.hours)&&(m=!0),e===i.top.hours&&t<i.top.minutes&&(m=!0),e===i.bottom.hours&&t>i.top.minutes&&(m=!0),m}renovatedRenderSupported(){return!1}_setSelectedCellsByCellData(){}_getIntervalDuration(){return Tn.A.dateToMilliseconds("day")*this.option("intervalCount")}getDOMElementsMetaData(){return{dateTableCellsMeta:[[{}]],allDayPanelCellsMeta:[{}]}}}(0,y.A)("dxSchedulerAgenda",q8);const rae=q8,aae=class sae extends S8{renderShader(){const e=this._workSpace._isHorizontalGroupedWorkSpace()?this._workSpace._getGroupCount():1;for(let t=0;t<e;t+=1){const i=0===t,r=i?this._$shader:this.createShader();this._workSpace.isGroupedByDate()?this._customizeGroupedByDateShader(r,t):this._customizeShader(r,t),!i&&this._shader.push(r)}}_customizeShader(e,t){const i=this._workSpace.getIndicationWidth();if(this._applyShaderWidth(e,i),t>=1){const r=this._workSpace,m=r._getCellCount()*r.getCellWidth();e.css("left",m)}else e.css("left",0)}_applyShaderWidth(e,t){const i=(0,za.N)(this._$container.get(0)).width;t>i&&(t=i),t>0&&(0,D.zj)(e,t)}_customizeGroupedByDateShader(e,t){const i=this._workSpace.getIndicationCellCount(),r=Math.floor(i),m=i-r,A=0===t,V=this._workSpace,X=A?V.getIndicationWidth():m*V.getCellWidth();let ce;this._applyShaderWidth(e,X),ce=A?V._getCellCount()*V.getCellWidth()*t:V.getCellWidth()*r*V._getGroupCount()+t*V.getCellWidth(),e.css("left",ce)}},nL=Tn.A.dateToMilliseconds,b$="dx-scheduler-time-panel-current-time-cell";class e6 extends Z8{_getToday(){const e=this.option("viewOffset"),t=N5(this.option("indicatorTime"),this.timeZoneCalculator);return $s_addOffsets(t,[-e])}isIndicationOnView(){if(this.option("showCurrentTimeIndicator")){const e=this._getToday(),t=Tn.A.trimTime(this.getEndViewDate());return Tn.A.dateInRange(e,this.getStartViewDate(),new Date(t.getTime()+nL("day")))}return!1}isIndicationAvailable(){return!!(0,gr.Vd)()&&this._getToday()>=Tn.A.trimTime(new Date(this.getStartViewDate()))}isIndicatorVisible(){const e=this._getToday(),t=new Date(this.getEndViewDate().getTime()+nL("minute")-1),i=new Date(this.getStartViewDate());return i.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),Tn.A.dateInRange(e,i,t)}_renderIndicator(e,t,i,r){const m=this.isGroupedByDate(),A=m?1:r;for(let V=0;V<A;V++){const X=this._createIndicator(i);(0,D.zj)(X,m?this.getCellWidth()*r:this.getCellWidth()),this._groupedStrategy.shiftIndicator(X,e,t,V)}}_createIndicator(e){const t=(0,a.A)("<div>").addClass("dx-scheduler-date-time-indicator");return e.append(t),t}_getRtlOffset(e){return this.option("rtlEnabled")?(0,za.N)(this._dateTableScrollable.$content().get(0)).width-this.getTimePanelWidth()-e:0}_setIndicationUpdateInterval(){!this.option("showCurrentTimeIndicator")||0===this.option("indicatorUpdateInterval")||(this._clearIndicatorUpdateInterval(),this._indicatorInterval=setInterval(()=>{this.renderCurrentDateTimeIndication()},this.option("indicatorUpdateInterval")))}_clearIndicatorUpdateInterval(){this._indicatorInterval&&(clearInterval(this._indicatorInterval),delete this._indicatorInterval)}_isVerticalShader(){return!0}getIndicationWidth(e){const t=this.getCellWidth()*this._getCellCount();let i=this._getIndicatorDuration();i>this._getCellCount()&&(i=this._getCellCount());const r=i*this.getRoundedCellWidth(e,e*this._getCellCount(),i);return t<r?t:r}getIndicatorOffset(e){const t=this._getIndicatorDuration()-1;return t*this.getRoundedCellWidth(e,e*this._getCellCount(),t)}_getIndicatorDuration(){const e=this._getToday(),t=new Date(this.getStartViewDate());let i=e.getTime()-t.getTime();return"workWeek"===this.option("type")&&(i-=this._getWeekendsCount(Math.round(i/nL("day")))*nL("day")),Math.ceil((i+1)/nL("day"))}getIndicationHeight(){const e=Aa.getDateWithoutTimezoneChange(this._getToday()),t=this.getCellHeight(),i=new Date(this.getStartViewDate());return this.isIndicationOnView()&&i.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),(e.getTime()-i.getTime())/this.getCellDuration()*t}_dispose(){this._clearIndicatorUpdateInterval(),super._dispose.apply(this,arguments)}renderCurrentDateTimeIndication(){this.renderCurrentDateTimeLineAndShader(),this.isRenovatedRender()&&this.renderWorkSpace({generateNewData:!0,renderComponents:{header:!0,timePanel:!0}})}renderCurrentDateTimeLineAndShader(){var e;this._cleanDateTimeIndicator(),null===(e=this._shader)||void 0===e||e.clean(),this._renderDateTimeIndication()}_isCurrentTimeHeaderCell(e){if(this.isIndicationOnView()){const{completeDateHeaderMap:t}=this.viewDataProvider;return Tn.A.sameDate(t[t.length-1][e].startDate,this._getToday())}return!1}_getHeaderPanelCellClass(e){const t=super._getHeaderPanelCellClass(e);return this._isCurrentTimeHeaderCell(e)?`${t} ${cU}`:t}_cleanView(){super._cleanView(),this._cleanDateTimeIndicator()}_dimensionChanged(){super._dimensionChanged(),this.renderCurrentDateTimeLineAndShader()}_cleanDateTimeIndicator(){this.$element().find(".dx-scheduler-date-time-indicator").remove()}_cleanWorkSpace(){super._cleanWorkSpace(),this._renderDateTimeIndication(),this._setIndicationUpdateInterval()}_optionChanged(e){switch(e.name){case"showCurrentTimeIndicator":case"indicatorTime":this._cleanWorkSpace();break;case"indicatorUpdateInterval":this._setIndicationUpdateInterval();break;case"showAllDayPanel":case"allDayExpanded":case"crossScrollingEnabled":super._optionChanged(e),this.renderCurrentDateTimeIndication();break;case"shadeUntilCurrentTime":this.renderCurrentDateTimeIndication();break;default:super._optionChanged(e)}}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{showCurrentTimeIndicator:!0,indicatorTime:new Date,indicatorUpdateInterval:5*nL("minute"),shadeUntilCurrentTime:!0})}_getCurrentTimePanelCellIndices(){const e=this._getTimePanelRowCount(),t=this._getToday(),i=this.getCellIndexByDate(t),{rowIndex:r}=this._getCellCoordinatesByIndex(i);if(void 0===r)return[];let m;m=0===r?[r]:r%2==0?[r-1,r]:[r,r+1];const A=this._isVerticalGroupedWorkSpace()?this._getGroupCount():1;return[...new Array(A)].reduce((V,X,ce)=>[...V,...m.map(_e=>e*ce+_e)],[])}_renderDateTimeIndication(){if(!this.isIndicationAvailable()||(this.option("shadeUntilCurrentTime")&&this._shader.render(),!this.isIndicationOnView()||!this.isIndicatorVisible()))return;const e=this._getGroupCount()||1,t=this._dateTableScrollable.$content(),i=this.getIndicationHeight(),r=this._getRtlOffset(this.getCellWidth());this._renderIndicator(i,r,t,e),this.isRenovatedRender()||this._setCurrentTimeCells()}_setCurrentTimeCells(){const e=this._getTimePanelCells();this._getCurrentTimePanelCellIndices().forEach(i=>{e.eq(i).addClass(b$)})}_cleanCurrentTimeCells(){this.$element().find(`.${b$}`).removeClass(b$)}}(0,y.A)("dxSchedulerWorkSpace",e6);const x$=e6,{tableCreator:S$}=s$,t6="dx-scheduler-group-table",n6="dx-scheduler-header-panel-cell",i6="dx-scheduler-header-panel-week-cell",Hw=Tn.A.dateToMilliseconds;class o6 extends x${constructor(){super(...arguments),this.viewDirection="horizontal"}get verticalGroupTableClass(){return t6}get renovatedHeaderPanelComponent(){return C8}getGroupTableWidth(){return this._$sidebarTable?(0,D.Ot)(this._$sidebarTable):0}_getTotalRowCount(e){return this._isHorizontalGroupedWorkSpace()?this._getRowCount():(e=e||1,this._getRowCount()*e)}_getFormat(){return"shorttime"}_getWorkSpaceHeight(){return this.option("crossScrollingEnabled")&&(0,gr.Vd)()?(0,za.N)(this._$dateTable.get(0)).height:(0,za.N)(this.$element().get(0)).height}_dateTableScrollableConfig(){const e=super._dateTableScrollableConfig();return this.option("crossScrollingEnabled")?e:(0,_.X)(e,{direction:"horizontal"})}_needCreateCrossScrolling(){return!0}_headerScrollableConfig(){const e=super._headerScrollableConfig();return(0,_.X)(e,{scrollByContent:!0})}supportAllDayRow(){return!1}_getGroupHeaderContainer(){return this._isHorizontalGroupedWorkSpace()?this._$thead:this._$sidebarTable}_insertAllDayRowsIntoDateTable(){return!1}_needRenderWeekHeader(){return!1}_incrementDate(e){e.setDate(e.getDate()+1)}getIndicationCellCount(){const e=this._getTimeDiff();return this._calculateDurationInCells(e)}_getTimeDiff(){let e=this._getToday();const t=this._getIndicationFirstViewDate(),i=this.getStartViewDate(),r=Aa.getDaylightOffsetInMs(i,e);return r&&(e=new Date(e.getTime()+r)),e.getTime()-t.getTime()}_calculateDurationInCells(e){const t=this._getToday(),i=Math.floor(e/Hw("day"));let r=(e-i*Hw("day")-this.option("startDayHour")*Hw("hour"))/this.getCellDuration();return t.getHours()>this.option("endDayHour")&&(r=this._getCellCountInDay()),r<0&&(r=0),i*this._getCellCountInDay()+r}getIndicationWidth(){if(this.isGroupedByDate()){const e=this.getIndicationCellCount(),t=Math.floor(e),i=e-t;return this.getCellWidth()*(t*this._getGroupCount()+i)}return this.getIndicationCellCount()*this.getCellWidth()}_isVerticalShader(){return!1}_isCurrentTimeHeaderCell(){return!1}_setTableSizes(){super._setTableSizes();const e=this._getWorkSpaceMinHeight();(0,D.k$)(this._$sidebarTable,e),(0,D.k$)(this._$dateTable,e),this.virtualScrollingDispatcher.updateDimensions()}_getWorkSpaceMinHeight(){let e=this._getWorkSpaceHeight();const t=(0,D.P$)(this._$flexContainer,!0);return e<t&&(e=t),e}_getCellCoordinatesByIndex(e){return{columnIndex:e%this._getCellCount(),rowIndex:0}}_getCellByCoordinates(e,t){const i=this._groupedStrategy.prepareCellIndexes(e,t);return this._$dateTable.find("tr").eq(i.rowIndex).find("td").eq(i.columnIndex)}_getWorkSpaceWidth(){return(0,D.Ot)(this._$dateTable,!0)}_getIndicationFirstViewDate(){return Tn.A.trimTime(new Date(this.getStartViewDate()))}_getIntervalBetween(e,t){const i=this.option("startDayHour"),r=this.option("endDayHour"),m=this.getStartViewDate(),A=m.getTime(),V=(24-r+i)*Hw("hour"),X=Tn.A.getTimezonesDifference(m,e),ce=e.getTime(),_e=ce-A-X,Me=Math.floor(_e/Hw("day")),Ve=_e-Me*Hw("day");let Je=0;const rt=this._getCellCountInDay()*(Me-this._getWeekendsCount(Me)),Ct=ce-Tn.A.trimTime(new Date(e)).getTime();let Xt=rt*this.option("hoursInterval")*Hw("hour");return t||(e.getHours()<i?Je=Ve-V+Ct:e.getHours()>=i&&e.getHours()<r?Je=Ve:e.getHours()>=i&&e.getHours()>=r?Je=Ve-(Ct-r*Hw("hour")):Me||(Xt=_e),Xt+=Je),Xt}_getWeekendsCount(e){return 0}getAllDayContainer(){return null}getTimePanelWidth(){return 0}getIntervalDuration(e){return this.getCellDuration()}getCellMinWidth(){return 0}getWorkSpaceLeftOffset(){return 0}scrollToTime(e,t,i){const r=this._getScrollCoordinates(e,t,i),m=this.getScrollable(),A=this.option("rtlEnabled")?(0,za.N)(this.getScrollableContainer().get(0)).width:0;this.option("templatesRenderAsynchronously")?setTimeout(()=>{m.scrollBy({left:r.left-m.scrollLeft()-A,top:0})}):m.scrollBy({left:r.left-m.scrollLeft()-A,top:0})}renderRAllDayPanel(){}renderRTimeTable(){}_renderGroupAllDayPanel(){}generateRenderOptions(e){const t=super.generateRenderOptions(!0);return(0,Lo.A)({},t,{isGenerateWeekDaysHeaderData:this._needRenderWeekHeader(),getDateForHeaderText:_ne.getDateForHeaderText})}_init(){super._init(),this.$element().addClass("dx-scheduler-timeline"),this._$sidebarTable=(0,a.A)("<div>").addClass(t6)}_getDefaultGroupStrategy(){return"vertical"}_toggleGroupingDirectionClass(){this.$element().toggleClass("dx-scheduler-work-space-horizontal-grouped",this._isHorizontalGroupedWorkSpace())}_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{groupOrientation:"vertical"})}_createWorkSpaceElements(){this._createWorkSpaceScrollableElements()}_toggleAllDayVisibility(){return(0,h.lQ)()}_changeAllDayVisibility(){return(0,h.lQ)()}_getDateHeaderTemplate(){return this.option("timeCellTemplate")}_renderView(){let e;this.isRenovatedRender()||(e=this._renderGroupHeader()),this.renderWorkSpace(),this.isRenovatedRender()&&this.virtualScrollingDispatcher.updateDimensions(),this._shader=new aae(this),this._$sidebarTable.appendTo(this._sidebarScrollable.$content()),this.isRenovatedRender()&&this._isVerticalGroupedWorkSpace()&&this.renderRGroupPanel(),this.updateHeaderEmptyCellWidth(),this._applyCellTemplates(e)}_setHorizontalGroupHeaderCellsHeight(){return(0,h.lQ)()}_getTimePanelCells(){return this.$element().find(`.${n6}:not(.${i6})`)}_getCurrentTimePanelCellIndices(){const e=this._getCellCount(),t=this._getToday(),i=this.getCellIndexByDate(t),{columnIndex:r}=this._getCellCoordinatesByIndex(i);if(void 0===r)return[];const m=this._isHorizontalGroupedWorkSpace()&&!this.isGroupedByDate()?this._getGroupCount():1;return[...new Array(m)].map((A,V)=>e*V+r)}_renderTimePanel(){return(0,h.lQ)()}_renderAllDayPanel(){return(0,h.lQ)()}_createAllDayPanelElements(){return(0,h.lQ)()}_renderDateHeader(){const e=super._renderDateHeader();if(this._needRenderWeekHeader()){const t=new Date(this.getStartViewDate());let i=new Date(t);const r=[],m=this._getGroupCount(),A=this._getCellCountInDay(),V=this.isGroupedByDate()?A*m:A,X=this.option("dateCellTemplate"),ce=this._isHorizontalGroupedWorkSpace()&&!this.isGroupedByDate()?m:1,_e=this.viewDataProvider.viewDataGenerator.daysInInterval*this.option("intervalCount"),Me=_e*ce;for(let Je=0;Je<Me;Je++){const rt=(0,a.A)("<th>"),Ct=_U(i);if(X){const Xt={model:(0,Lo.A)({text:Ct,date:new Date(i)},this._getGroupsForDateHeaderTemplate(Je,V)),container:rt,index:Je};X.render(Xt)}else rt.text(Ct);rt.addClass(n6).addClass(i6).attr("colSpan",V),r.push(rt),Je%_e==_e-1?i=new Date(t):this._incrementDate(i)}const Ve=(0,a.A)("<tr>").addClass("dx-scheduler-header-row").append(r);e.before(Ve)}}_renderIndicator(e,t,i,r){let m;const A=this.getIndicationWidth();if("vertical"===this.option("groupOrientation"))m=this._createIndicator(i),(0,D.k$)(m,(0,za.N)(i.get(0)).height),m.css("left",t?t-A:A);else for(let V=0;V<r;V++){const X=this.isGroupedByDate()?V*this.getCellWidth():this._getCellCount()*this.getCellWidth()*V;m=this._createIndicator(i),(0,D.k$)(m,(0,za.N)(i.get(0)).height),m.css("left",t?t-A-X:A+X)}}_makeGroupRows(e,t){const i="vertical"===this.option("groupOrientation")?S$.VERTICAL:S$.HORIZONTAL;return S$.makeGroupedTable(i,e,{groupRowClass:Wk,groupHeaderRowClass:Wk,groupHeaderClass:this._getGroupHeaderClass.bind(this),groupHeaderContentClass:AW},this._getCellCount()||1,this.option("resourceCellTemplate"),this._getTotalRowCount(this._getGroupCount()),t)}_setCurrentTimeCells(){const e=this._getTimePanelCells();this._getCurrentTimePanelCellIndices().forEach(i=>{e.eq(i).addClass(cU)})}_cleanCurrentTimeCells(){this.$element().find(`.${cU}`).removeClass(cU)}}(0,y.A)("dxSchedulerTimeline",o6);const E$=o6;class r6 extends E${get type(){return kc.TIMELINE_DAY}_getElementClass(){return"dx-scheduler-timeline-day"}_needRenderWeekHeader(){return this._isWorkSpaceWithCount()}}(0,y.A)("dxSchedulerTimelineDay",r6);const pae=r6;class s6 extends E${constructor(){super(...arguments),this.viewDirection="horizontal"}get type(){return kc.TIMELINE_MONTH}get renovatedHeaderPanelComponent(){return NU}_renderView(){super._renderView(),this._updateScrollable()}_getElementClass(){return"dx-scheduler-timeline-month"}_getDateHeaderTemplate(){return this.option("dateCellTemplate")}_calculateDurationInCells(e){return e/this.getCellDuration()}isIndicatorVisible(){return!0}_getFormat(){return _U}_getIntervalBetween(e){const t=this.getStartViewDate(),i=Tn.A.getTimezonesDifference(t,e);return e.getTime()-(t.getTime()-36e5*this.option("startDayHour"))-i}_getViewStartByOptions(){return Bw_getViewStartByOptions(this.option("startDate"),this.option("currentDate"),this.option("intervalCount"),Tn.A.getFirstMonthDate(this.option("startDate")))}generateRenderOptions(){const e=super.generateRenderOptions(!0);return(0,Lo.A)({},e,{getDateForHeaderText:(t,i)=>i})}keepOriginalHours(){return!0}}(0,y.A)("dxSchedulerTimelineMonth",s6);const fae=s6;class O$ extends E${get type(){return kc.TIMELINE_WEEK}_getElementClass(){return"dx-scheduler-timeline-week"}_getHeaderPanelCellWidth(e){return(0,za.N)(e.children().first().get(0)).width}_needRenderWeekHeader(){return!0}_incrementDate(e){e.setDate(e.getDate()+1)}}(0,y.A)("dxSchedulerTimelineWeek",O$);class a6 extends O${get type(){return kc.TIMELINE_WORK_WEEK}constructor(){super(...arguments),this._getWeekendsCount=U5}_getElementClass(){return"dx-scheduler-timeline-work-week"}_incrementDate(e){5===e.getDay()&&e.setDate(e.getDate()+2),super._incrementDate(e)}}(0,y.A)("dxSchedulerTimelineWorkWeek",a6);const vae=a6,l6=class Cae extends x${_getFormat(){return _U}generateRenderOptions(){const e=super.generateRenderOptions();return(0,Lo.A)({},e,{isGenerateTimePanelData:!0})}_isRenderHeaderPanelEmptyCell(){return!0}};class c6 extends l6{get type(){return kc.DAY}_getElementClass(){return"dx-scheduler-work-space-day"}_renderDateHeader(){return 1===this.option("intervalCount")?null:super._renderDateHeader()}renderRHeaderPanel(){1===this.option("intervalCount")?super.renderRHeaderPanel(!1):super.renderRHeaderPanel(!0)}}(0,y.A)("dxSchedulerWorkSpaceDay",c6);const bae=c6,Tae=Tn.A.dateToMilliseconds;class d6 extends x${get type(){return kc.MONTH}_getElementClass(){return"dx-scheduler-work-space-month"}_getFormat(){return zW}_getIntervalBetween(e){const t=this.getStartViewDate(),i=Tn.A.getTimezonesDifference(t,e);return e.getTime()-(t.getTime()-36e5*this.option("startDayHour"))-i}_getDateGenerationOptions(){return(0,Lo.A)({},super._getDateGenerationOptions(),{cellCountInDay:1})}getCellWidth(){return this.cache.get("cellWidth",()=>{let e=0;const t=this._getCells().slice(0,7);return t.each((i,r)=>{e+=(0,gr.Vd)()?(0,za.N)(r).width:0}),0===t.length?void 0:e/7})}_insertAllDayRowsIntoDateTable(){return!1}_getCellCoordinatesByIndex(e){const t=Math.floor(e/this._getCellCount());return{rowIndex:t,columnIndex:e-this._getCellCount()*t}}_needCreateCrossScrolling(){return this.option("crossScrollingEnabled")||this._isVerticalGroupedWorkSpace()}_getViewStartByOptions(){return Bw_getViewStartByOptions(this.option("startDate"),this.option("currentDate"),this.option("intervalCount"),Tn.A.getFirstMonthDate(this.option("startDate")))}_updateIndex(e){return e}isIndicationAvailable(){return!1}getIntervalDuration(){return Tae("day")}getTimePanelWidth(){return 0}supportAllDayRow(){return!1}keepOriginalHours(){return!0}getWorkSpaceLeftOffset(){return 0}needApplyCollectorOffset(){return!0}_getHeaderDate(){return this._getViewStartByOptions()}scrollToTime(){return(0,h.lQ)()}renderRAllDayPanel(){}renderRTimeTable(){}renderRDateTable(){Tg.renovation.renderComponent(this,this._$dateTable,c8,"renovatedDateTable",this._getRDateTableProps())}_createWorkSpaceElements(){this._isVerticalGroupedWorkSpace()?this._createWorkSpaceScrollableElements():super._createWorkSpaceElements()}_toggleAllDayVisibility(){return(0,h.lQ)()}_changeAllDayVisibility(){return(0,h.lQ)()}_renderTimePanel(){return(0,h.lQ)()}_renderAllDayPanel(){return(0,h.lQ)()}_setMonthClassesToCell(e,t){e.toggleClass("dx-scheduler-date-table-current-date",t.isCurrentDate).toggleClass("dx-scheduler-date-table-first-of-month",t.firstDayOfMonth).toggleClass("dx-scheduler-date-table-other-month",t.otherMonth)}_createAllDayPanelElements(){}_renderTableBody(e){e.getCellText=(t,i)=>Bw_getCellText(this.viewDataProvider.completeViewDataMap[t][i].startDate,this.option("intervalCount")),e.getCellTextClass="dx-scheduler-date-table-cell-text",e.setAdditionalClasses=this._setMonthClassesToCell.bind(this),super._renderTableBody(e)}}(0,y.A)("dxSchedulerWorkSpaceMonth",d6);const Dae=d6;class u6 extends l6{get type(){return kc.WEEK}_getElementClass(){return"dx-scheduler-work-space-week"}_calculateViewStartDate(){return((n,e)=>{const t=e??sa.A.firstDayOfWeekIndex();return Tn.A.getFirstWeekDate(n,t)})(this.option("startDate"),this._firstDayOfWeek())}}(0,y.A)("dxSchedulerWorkSpaceWeek",u6);const h6=u6;class p6 extends h6{get type(){return kc.WORK_WEEK}constructor(){super(...arguments),this._getWeekendsCount=U5}_getElementClass(){return"dx-scheduler-work-space-work-week"}}(0,y.A)("dxSchedulerWorkSpaceWorkWeek",p6);const Mae=Tn.A.dateToMilliseconds,UU="dx-scheduler",Rae=`${UU}-small`,kae=`${UU}-adaptive`,Lae=`${UU}-readonly`,Nae={day:{workSpace:bae,renderingStrategy:"vertical"},week:{workSpace:h6,renderingStrategy:"vertical"},workWeek:{workSpace:p6,renderingStrategy:"vertical"},month:{workSpace:Dae,renderingStrategy:"horizontalMonth"},timelineDay:{workSpace:pae,renderingStrategy:"horizontal"},timelineWeek:{workSpace:O$,renderingStrategy:"horizontal"},timelineWorkWeek:{workSpace:vae,renderingStrategy:"horizontal"},timelineMonth:{workSpace:fae,renderingStrategy:"horizontalMonthLine"},agenda:{workSpace:rae,renderingStrategy:"agenda"}},Jh_ADDING="onAppointmentAdding",Jh_ADDED="onAppointmentAdded",Jh_DELETED="onAppointmentDeleted",Jh_UPDATED="onAppointmentUpdated";class g6 extends Sl.A{_getDefaultOptions(){const e=(0,_.X)(super._getDefaultOptions(),{views:["day","week"],currentView:"day",currentDate:Tn.A.trimTime(new Date),min:void 0,max:void 0,dateSerializationFormat:void 0,firstDayOfWeek:void 0,groups:[],resources:[],loadedResources:[],resourceLoaderMap:new Map,dataSource:null,customizeDateNavigatorText:void 0,appointmentTemplate:"item",dropDownAppointmentTemplate:"dropDownAppointment",appointmentCollectorTemplate:"appointmentCollector",dataCellTemplate:null,timeCellTemplate:null,resourceCellTemplate:null,dateCellTemplate:null,startDayHour:0,endDayHour:24,offset:0,editing:{allowAdding:!0,allowDeleting:!0,allowDragging:!0,allowResizing:!0,allowUpdating:!0,allowTimeZoneEditing:!1},showAllDayPanel:!0,showCurrentTimeIndicator:!0,shadeUntilCurrentTime:!1,indicatorUpdateInterval:3e5,indicatorTime:void 0,recurrenceEditMode:"dialog",cellDuration:30,maxAppointmentsPerCell:"auto",selectedCellData:[],groupByDate:!1,onAppointmentRendered:null,onAppointmentClick:null,onAppointmentDblClick:null,onAppointmentContextMenu:null,onCellClick:null,onCellContextMenu:null,onAppointmentAdding:null,onAppointmentAdded:null,onAppointmentUpdating:null,onAppointmentUpdated:null,onAppointmentDeleting:null,onAppointmentDeleted:null,onAppointmentFormOpening:null,onAppointmentTooltipShowing:null,appointmentTooltipTemplate:"appointmentTooltip",appointmentPopupTemplate:"appointmentPopup",crossScrollingEnabled:!1,useDropDownViewSwitcher:!1,startDateExpr:"startDate",endDateExpr:"endDate",textExpr:"text",descriptionExpr:"description",allDayExpr:"allDay",recurrenceRuleExpr:"recurrenceRule",recurrenceExceptionExpr:"recurrenceException",disabledExpr:"disabled",remoteFiltering:!1,timeZone:"",startDateTimeZoneExpr:"startDateTimeZone",endDateTimeZoneExpr:"endDateTimeZone",noDataText:Wn.A.format("dxCollectionWidget-noDataText"),adaptivityEnabled:!1,allowMultipleCellSelection:!0,scrolling:{mode:"standard"},allDayPanelMode:"all",renovateRender:!0,_draggingMode:"outlook",_appointmentTooltipOffset:{x:0,y:0},_appointmentTooltipButtonsPosition:"bottom",_appointmentTooltipOpenButtonText:Wn.A.format("dxScheduler-openAppointment"),_appointmentCountPerCell:2,_collectorOffset:0,_appointmentOffset:26,toolbar:[{location:"before",defaultElement:"dateNavigator"},{location:"after",defaultElement:"viewSwitcher"}]});return(0,_.X)(!0,e,{integrationOptions:{useDeferUpdateForTemplates:!1}})}get filteredItems(){return this._filteredItems||(this._filteredItems=[]),this._filteredItems}set filteredItems(e){this._filteredItems=e}get preparedItems(){return this._preparedItems||(this._preparedItems=[]),this._preparedItems}set preparedItems(e){this._preparedItems=e}get currentView(){return GW_getCurrentView(this.option("currentView"),this.option("views"))}get currentViewType(){return(0,C.Gv)(this.currentView)?this.currentView.type:this.currentView}get timeZoneCalculator(){return this._timeZoneCalculator||(this._timeZoneCalculator=(n=>new eq({getClientOffset:e=>Aa.getClientTimezoneOffset(e),tryGetCommonOffset:e=>Aa.calculateTimezoneByValue(n,e),tryGetAppointmentOffset:(e,t)=>Aa.calculateTimezoneByValue(t,e)}))(this.option("timeZone"))),this._timeZoneCalculator}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,_.X)(this._deprecatedOptions,{dropDownAppointmentTemplate:{since:"19.2",message:"appointmentTooltipTemplate"}})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>"desktop"===d.A.real().deviceType&&!d.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>!d.A.current().generic,options:{useDropDownViewSwitcher:!0,editing:{allowDragging:!1,allowResizing:!1}}},{device:()=>(0,k.Nt)(),options:{useDropDownViewSwitcher:!0,dateCellTemplate(e,t,i){const{text:r}=e;r.split(" ").forEach((m,A)=>{const V=(0,a.A)("<span>").text(m).addClass("dx-scheduler-header-panel-cell-date");(0,a.A)(i).append(V),A||(0,a.A)(i).append(" ")})},_appointmentTooltipButtonsPosition:"top",_appointmentTooltipOpenButtonText:null,_appointmentCountPerCell:1,_collectorOffset:20,_appointmentOffset:30}},{device:()=>(0,k.gx)(),options:{_appointmentTooltipOffset:{x:0,y:11}}}])}_postponeDataSourceLoading(e){this.postponedOperations.add("_reloadDataSource",this._reloadDataSource.bind(this),e)}_postponeResourceLoading(){const e=this.postponedOperations.add("loadResources",()=>{const i=this._getCurrentViewOption("groups");return s7(i,this.option("resources"),this.option("resourceLoaderMap"))}),t=new g.cY;return e.done(i=>{this.option("loadedResources",i),t.resolve(i)}),this._postponeDataSourceLoading(e),t.promise()}_optionChanged(e){var t,i,r;this.validateOptions();let{value:m}=e;const{name:A}=e;switch(e.name){case"customizeDateNavigatorText":this._updateOption("header",A,m);break;case"firstDayOfWeek":this._updateOption("workSpace",A,m),this._updateOption("header",A,m);break;case"currentDate":m=this._dateOption(A),m=Tn.A.trimTime(new Date(m)),this.option("selectedCellData",[]),this._workSpace.option(A,new Date(m)),null===(t=this._header)||void 0===t||t.option(A,new Date(m)),null===(i=this._header)||void 0===i||i.option("startViewDate",this.getStartViewDate()),this._appointments.option("items",[]),this._filterAppointmentsByDate(),this._postponeDataSourceLoading();break;case"dataSource":this._initDataSource(),this.appointmentDataProvider.setDataSource(this._dataSource),this._postponeResourceLoading().done(()=>{this._filterAppointmentsByDate(),this._updateOption("workSpace","showAllDayPanel",this.option("showAllDayPanel"))});break;case"min":case"max":m=this._dateOption(A),this._updateOption("header",A,new Date(m)),this._updateOption("workSpace",A,new Date(m));break;case"views":var V;this._getCurrentViewOptions()?this.repaint():null===(V=this._header)||void 0===V||V.option(A,m);break;case"useDropDownViewSwitcher":null===(r=this._header)||void 0===r||r.option(A,m);break;case"currentView":this._appointments.option({items:[],allowDrag:this._allowDragging(),allowResize:this._allowResizing(),itemTemplate:this._getAppointmentTemplate("appointmentTemplate")}),this._postponeResourceLoading().done(X=>{var ce;this._refreshWorkSpace(X),null===(ce=this._header)||void 0===ce||ce.option(this._headerConfig()),this._filterAppointmentsByDate(),this._appointments.option("allowAllDayResize","day"!==m)}),this.postponedOperations.callPostponedOperations();break;case"appointmentTemplate":this._appointments.option("itemTemplate",m);break;case"dateCellTemplate":case"resourceCellTemplate":case"dataCellTemplate":case"timeCellTemplate":this.repaint();break;case"groups":this._postponeResourceLoading().done(X=>{this._refreshWorkSpace(X),this._filterAppointmentsByDate()});break;case"resources":this._dataAccessors.resources=r7(this.option("resources")),this.agendaResourceProcessor.initializeState(this.option("resources")),this.updateInstances(),this._postponeResourceLoading().done(X=>{this._appointments.option("items",[]),this._refreshWorkSpace(X),this._filterAppointmentsByDate(),this._createAppointmentPopupForm()});break;case"startDayHour":case"endDayHour":this.updateInstances(),this._appointments.option("items",[]),this._updateOption("workSpace",A,m),this._appointments.repaint(),this._filterAppointmentsByDate(),this._postponeDataSourceLoading();break;case"offset":this.updateInstances(),this._appointments.option("items",[]),this._updateOption("workSpace","viewOffset",this.normalizeViewOffsetValue(m)),this._appointments.repaint(),this._filterAppointmentsByDate(),this._postponeDataSourceLoading();break;case Jh_ADDING:case Jh_ADDED:case"onAppointmentUpdating":case Jh_UPDATED:case"onAppointmentDeleting":case Jh_DELETED:case"onAppointmentFormOpening":case"onAppointmentTooltipShowing":this._actions[A]=this._createActionByOption(A);break;case"onAppointmentRendered":this._appointments.option("onItemRendered",this._getAppointmentRenderedAction());break;case"onAppointmentClick":this._appointments.option("onItemClick",this._createActionByOption(A));break;case"onAppointmentDblClick":this._appointments.option(A,this._createActionByOption(A));break;case"onAppointmentContextMenu":this._appointments.option("onItemContextMenu",this._createActionByOption(A)),this._appointmentTooltip._options.onItemContextMenu=this._createActionByOption(A);break;case"noDataText":case"allowMultipleCellSelection":case"selectedCellData":case"accessKey":case"onCellClick":case"onCellContextMenu":this._workSpace.option(A,m);break;case"crossScrollingEnabled":this._postponeResourceLoading().done(X=>{this._appointments.option("items",[]),this._refreshWorkSpace(X),this._readyToRenderAppointments&&this._appointments.option("items",this._getAppointmentsToRepaint())});break;case"cellDuration":this._updateOption("workSpace",A,m),this._appointments.option("items",[]),this._readyToRenderAppointments&&(this._updateOption("workSpace","hoursInterval",m/60),this._appointments.option("items",this._getAppointmentsToRepaint()));break;case"tabIndex":case"focusStateEnabled":this._updateOption("header",A,m),this._updateOption("workSpace",A,m),this._appointments.option(A,m),super._optionChanged(e);break;case"width":this._updateOption("header",A,m),this.option("crossScrollingEnabled")&&this._updateOption("workSpace","width",m),this._updateOption("workSpace","schedulerWidth",m),super._optionChanged(e),this._dimensionChanged(null,!0);break;case"height":super._optionChanged(e),this._dimensionChanged(null,!0),this._updateOption("workSpace","schedulerHeight",m);break;case"editing":this._initEditing(),this._bringEditingModeToAppointments(this._editing),this.hideAppointmentTooltip(),this._cleanPopup();break;case"showAllDayPanel":this.updateInstances(),this.repaint();break;case"showCurrentTimeIndicator":case"indicatorTime":case"indicatorUpdateInterval":case"shadeUntilCurrentTime":case"groupByDate":this._updateOption("workSpace",A,m),this.repaint();break;case"appointmentDragging":case"appointmentTooltipTemplate":case"appointmentPopupTemplate":case"recurrenceEditMode":case"remoteFiltering":case"timeZone":this.updateInstances(),this.repaint();break;case"dropDownAppointmentTemplate":case"appointmentCollectorTemplate":case"_appointmentTooltipOffset":case"_appointmentTooltipButtonsPosition":case"_appointmentTooltipOpenButtonText":case"_appointmentCountPerCell":case"_collectorOffset":case"_appointmentOffset":this.repaint();break;case"dateSerializationFormat":case"maxAppointmentsPerCell":break;case"startDateExpr":case"endDateExpr":case"startDateTimeZoneExpr":case"endDateTimeZoneExpr":case"textExpr":case"descriptionExpr":case"allDayExpr":case"recurrenceRuleExpr":case"recurrenceExceptionExpr":case"disabledExpr":this._updateExpression(A,m),this.appointmentDataProvider.updateDataAccessors(this._dataAccessors),this._initAppointmentTemplate(),this.repaint();break;case"adaptivityEnabled":this._toggleAdaptiveClass(),this.repaint();break;case"scrolling":this.option("crossScrollingEnabled",this._isHorizontalVirtualScrolling()||this.option("crossScrollingEnabled")),this._updateOption("workSpace",e.fullName,m);break;case"allDayPanelMode":this.updateInstances(),this._updateOption("workSpace",e.fullName,m);break;case"renovateRender":this._updateOption("workSpace",A,m);break;case"_draggingMode":this._workSpace.option("draggingMode",m);break;case"toolbar":this._header?this._header.option("items",m):this.repaint();break;case"loadedResources":case"resourceLoaderMap":break;default:super._optionChanged(e)}}_dateOption(e){const t=this._getCurrentViewOption(e);return Yl.A.deserializeDate(t)}_getSerializationFormat(e){const t=this._getCurrentViewOption(e);return"number"==typeof t?"number":(0,C.Kg)(t)?Yl.A.getDateSerializationFormat(t):void 0}_bringEditingModeToAppointments(e){const t={allowDelete:e.allowUpdating&&e.allowDeleting};this._isAgenda()||(t.allowDrag=e.allowDragging,t.allowResize=e.allowResizing,t.allowAllDayResize=e.allowResizing&&this._supportAllDayResizing()),this._appointments.option(t),this.repaint()}_isAgenda(){return"agenda"===this.getLayoutManager().appointmentRenderingStrategyName}_allowDragging(){return this._editing.allowDragging&&!this._isAgenda()}_allowResizing(){return this._editing.allowResizing&&!this._isAgenda()}_allowAllDayResizing(){return this._editing.allowResizing&&this._supportAllDayResizing()}_supportAllDayResizing(){return"day"!==this.currentViewType||this.currentView.intervalCount>1}_isAllDayExpanded(){return this.option("showAllDayPanel")&&this.appointmentDataProvider.hasAllDayAppointments(this.filteredItems,this.preparedItems)}_getTimezoneOffsetByOption(e){return Aa.calculateTimezoneByValue(this.option("timeZone"),e)}_filterAppointmentsByDate(){const e=this._workSpace.getDateRange(),t=this.timeZoneCalculator.createDate(e[0],{path:"fromGrid"}),i=this.timeZoneCalculator.createDate(e[1],{path:"fromGrid"});this.appointmentDataProvider.filterByDate(t,i,this.option("remoteFiltering"),this.option("dateSerializationFormat"))}_reloadDataSource(){const e=new g.cY;return this._dataSource?(this._dataSource.load().done(()=>{CU(),this._fireContentReadyAction(e)}).fail(()=>{CU(),e.reject()}),this._dataSource.isLoading()&&e7({container:this.$element(),position:{of:this.$element()}})):this._fireContentReadyAction(e),e.promise()}_fireContentReadyAction(e){const t=super._fireContentReadyAction.bind(this),i=()=>{t(),e?.resolve()};var r;this._workSpaceRecalculation?null===(r=this._workSpaceRecalculation)||void 0===r||r.done(()=>{i()}):i()}_dimensionChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i="number"==typeof this.option("height"),r="number"==typeof this.option("width");if(!this._isVisible())return;this._toggleSmallClass();const m=this.getWorkSpace();if(!this._isAgenda()&&this.filteredItems&&m&&(t||!i||!r)){m.option("allDayExpanded",this._isAllDayExpanded()),m._dimensionChanged();const A=this.getLayoutManager().createAppointmentsMap(this.filteredItems);this._appointments.option("items",A)}this.hideAppointmentTooltip(),this._appointmentPopup.triggerResize(),this._appointmentPopup.updatePopupFullScreenMode()}_clean(){this._cleanPopup(),super._clean()}_toggleSmallClass(){const{width:e}=(0,za.N)(this.$element().get(0));this.$element().toggleClass(Rae,e<400)}_toggleAdaptiveClass(){this.$element().toggleClass(kae,this.option("adaptivityEnabled"))}_visibilityChanged(e){e&&this._dimensionChanged(null,!0)}_dataSourceOptions(){return{paginate:!1}}_initAllDayPanel(){"hidden"===this.option("allDayPanelMode")&&this.option("showAllDayPanel",!1)}_init(){this._initExpressions({startDate:this.option("startDateExpr"),endDate:this.option("endDateExpr"),startDateTimeZone:this.option("startDateTimeZoneExpr"),endDateTimeZone:this.option("endDateTimeZoneExpr"),allDay:this.option("allDayExpr"),text:this.option("textExpr"),description:this.option("descriptionExpr"),recurrenceRule:this.option("recurrenceRuleExpr"),recurrenceException:this.option("recurrenceExceptionExpr"),disabled:this.option("disabledExpr")}),super._init(),this._initAllDayPanel(),this._initDataSource(),this._customizeDataSourceLoadOptions(),this.$element().addClass(UU),this._initEditing(),this.updateInstances(),this._initActions(),this._compactAppointmentsHelper=new Roe(this),this._asyncTemplatesTimers=[],this._dataSourceLoadedCallback=(0,BS.A)(),this._subscribes=K7,this.agendaResourceProcessor=new Yoe(this.option("resources")),this._optionsValidator=new $oe,this._optionsValidatorErrorHandler=new Koe}createAppointmentDataProvider(){var e;null===(e=this.appointmentDataProvider)||void 0===e||e.destroy(),this.appointmentDataProvider=new Jne({dataSource:this._dataSource,dataAccessors:this._dataAccessors,timeZoneCalculator:this.timeZoneCalculator,dateSerializationFormat:this.option("dateSerializationFormat"),resources:this.option("resources"),startDayHour:this._getCurrentViewOption("startDayHour"),endDayHour:this._getCurrentViewOption("endDayHour"),viewOffset:this.getViewOffsetMs(),appointmentDuration:this._getCurrentViewOption("cellDuration"),allDayPanelMode:this._getCurrentViewOption("allDayPanelMode"),showAllDayPanel:this.option("showAllDayPanel"),getLoadedResources:()=>this.option("loadedResources"),getIsVirtualScrolling:()=>this.isVirtualScrolling(),getSupportAllDayRow:()=>this._workSpace.supportAllDayRow(),getViewType:()=>this._workSpace.type,getViewDirection:()=>this._workSpace.viewDirection,getDateRange:()=>this._workSpace.getDateRange(),getGroupCount:()=>this._workSpace._getGroupCount(),getViewDataProvider:()=>this._workSpace.viewDataProvider})}updateInstances(){this._timeZoneCalculator=null,this.getWorkSpace()&&this.createAppointmentDataProvider()}_customizeDataSourceLoadOptions(){var e;null===(e=this._dataSource)||void 0===e||e.on("customizeStoreLoadOptions",t=>{let{storeLoadOptions:i}=t;i.startDate=this.getStartViewDate(),i.endDate=this.getEndViewDate()})}_initTemplates(){this._initAppointmentTemplate(),this._templateManager.addDefaultTemplates({appointmentTooltip:new v5.A,dropDownAppointment:new v5.A}),super._initTemplates()}_initAppointmentTemplate(){const{expr:e}=this._dataAccessors,t=r=>(0,fa.Hz)(`appointmentData.${r}`),i=r=>m=>{const A=r(m);return A instanceof Date?A.valueOf():A};this._templateManager.addDefaultTemplates({item:new u.U((r,m,A)=>this.getAppointmentsInstance()._renderAppointmentTemplate(r,m,A),["html","text","startDate","endDate","allDay","description","recurrenceRule","recurrenceException","startDateTimeZone","endDateTimeZone"],this.option("integrationOptions.watchMethod"),{text:t(e.textExpr),startDate:i(t(e.startDateExpr)),endDate:i(t(e.endDateExpr)),startDateTimeZone:t(e.startDateTimeZoneExpr),endDateTimeZone:t(e.endDateTimeZoneExpr),allDay:t(e.allDayExpr),recurrenceRule:t(e.recurrenceRuleExpr)})})}_renderContent(){this._renderContentImpl()}_updatePreparedItems(e){this.preparedItems=((n,e,t,i)=>{const r=[];return n?.forEach(m=>{var A;const V=new Date(e.getter.startDate(m)),X=new Date(e.getter.endDate(m));$5(m,V,X,t,e);const ce=hc(m,e,i),_e=ce.startDate&&ce.calculateStartDate("toGrid"),Me=ce.endDate&&ce.calculateEndDate("toGrid"),Ve=new RegExp("freq","gi"),Je=ce.recurrenceRule,rt=!(null==Je||null===(A=Je.match(Ve))||void 0===A||!A.length),Ct=!(0,C.O9)(m.visible)||!!m.visible;_e&&Me&&r.push({allDay:!!ce.allDay,startDate:_e,startDateTimeZone:m.startDateTimeZone,endDate:Me,endDateTimeZone:m.endDateTimeZone,recurrenceRule:ce.recurrenceRule,recurrenceException:ce.recurrenceException,hasRecurrenceRule:rt,visible:Ct,rawAppointment:m})}),r})(e,this._dataAccessors,this._getCurrentViewOption("cellDuration"),this.timeZoneCalculator)}_dataSourceChangedHandler(e){this._readyToRenderAppointments&&this._workSpaceRecalculation.done(()=>{this._updatePreparedItems(e),this._renderAppointments(),this.getWorkSpace().onDataSourceChanged(this.filteredItems)})}isVirtualScrolling(){var e;const t=this.getWorkSpace();if(t)return t.isVirtualScrolling();const i=this._getCurrentViewOptions(),r=this.option("scrolling");return"virtual"===r?.mode||"virtual"===(null==i||null===(e=i.scrolling)||void 0===e?void 0:e.mode)}_filterAppointments(){this.filteredItems=this.appointmentDataProvider.filter(this.preparedItems)}_renderAppointments(){const e=this.getWorkSpace();this._filterAppointments(),e.option("allDayExpanded",this._isAllDayExpanded());let t=[];this._isVisible()&&(t=this._getAppointmentsToRepaint()),this._appointments.option("items",t),this.appointmentDataProvider.cleanState()}_getAppointmentsToRepaint(){const e=this.getLayoutManager(),t=e.createAppointmentsMap(this.filteredItems);return e.getRepaintedAppointments(t,this.getAppointmentsInstance().option("items"))}_initExpressions(e){this._dataAccessors=Tg.dataAccessors.create(e,this._dataAccessors,(0,oW.A)().forceIsoDateParsing,this.option("dateSerializationFormat")),this._dataAccessors.resources=r7(this.option("resources"))}_updateExpression(e,t){const i={};i[e.replace("Expr","")]=t,this._initExpressions(i)}getResourceDataAccessors(){return this._dataAccessors.resources}_initEditing(){const e=this.option("editing");this._editing={allowAdding:!!e,allowUpdating:!!e,allowDeleting:!!e,allowResizing:!!e,allowDragging:!!e},(0,C.Gv)(e)&&(this._editing=(0,_.X)(this._editing,e)),this._editing.allowDragging=this._editing.allowDragging&&this._editing.allowUpdating,this._editing.allowResizing=this._editing.allowResizing&&this._editing.allowUpdating,this.$element().toggleClass(Lae,this._isReadOnly())}_isReadOnly(){let e=!0;const t=this._editing;for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e=e&&!t[i]);return e}_dispose(){var e;this._appointmentTooltip&&this._appointmentTooltip.dispose(),null===(e=this._recurrenceDialog)||void 0===e||e.hide("cancel"),this.hideAppointmentPopup(),this.hideAppointmentTooltip(),this._asyncTemplatesTimers.forEach(clearTimeout),this._asyncTemplatesTimers=[],super._dispose()}_initActions(){this._actions={onAppointmentAdding:this._createActionByOption(Jh_ADDING),onAppointmentAdded:this._createActionByOption(Jh_ADDED),onAppointmentUpdating:this._createActionByOption("onAppointmentUpdating"),onAppointmentUpdated:this._createActionByOption(Jh_UPDATED),onAppointmentDeleting:this._createActionByOption("onAppointmentDeleting"),onAppointmentDeleted:this._createActionByOption(Jh_DELETED),onAppointmentFormOpening:this._createActionByOption("onAppointmentFormOpening"),onAppointmentTooltipShowing:this._createActionByOption("onAppointmentTooltipShowing")}}_getAppointmentRenderedAction(){return this._createActionByOption("onAppointmentRendered",{excludeValidators:["disabled","readOnly"]})}_renderFocusTarget(){return(0,h.lQ)()}_initMarkup(){if(super._initMarkup(),this._renderMainContainer(),this._renderHeader(),this._layoutManager=new Ioe(this),this._appointments=this._createComponent("<div>",uie,this._appointmentsConfig()),this._appointments.option("itemTemplate",this._getAppointmentTemplate("appointmentTemplate")),this._appointmentTooltip=new(this.option("adaptivityEnabled")?ure:sre)(this._getAppointmentTooltipOptions()),this._createAppointmentPopupForm(),this._isDataSourceLoaded()||this._isDataSourceLoading())this._initMarkupCore(this.option("loadedResources")),this._dataSourceChangedHandler(this._dataSource.items()),this._fireContentReadyAction();else{const e=this._getCurrentViewOption("groups");s7(e,this.option("resources"),this.option("resourceLoaderMap")).done(t=>{this.option("loadedResources",t),this._initMarkupCore(t),this._reloadDataSource()})}}_createAppointmentPopupForm(){var e,t;this._appointmentForm&&(null===(t=this._appointmentForm.form)||void 0===t||t.dispose()),this._appointmentForm=this.createAppointmentForm(),null===(e=this._appointmentPopup)||void 0===e||e.dispose(),this._appointmentPopup=this.createAppointmentPopup(this._appointmentForm)}_renderMainContainer(){this._mainContainer=(0,a.A)("<div>").addClass("dx-scheduler-container"),this.$element().append(this._mainContainer)}createAppointmentForm(){const e={createResourceEditorModel:()=>((n,e)=>n.map(t=>{const i=Nw(t),r=((n,e)=>{for(let t=0;t<e.length;t++){const i=e[t];if(i.name===n)return i.data}return[]})(i,e);return{editorOptions:{dataSource:r.length?r:yU(t.dataSource),displayExpr:jW(t),valueExpr:gV(t),stylingMode:(0,k.Ft)((0,k.ss)())?"filled":"outlined"},dataField:i,editorType:t.allowMultiple?"dxTagBox":"dxSelectBox",label:{text:t.label||i}}}))(this.option("resources"),this.option("loadedResources")),getDataAccessors:()=>this._dataAccessors,createComponent:(t,i,r)=>this._createComponent(t,i,r),getEditingConfig:()=>this._editing,getFirstDayOfWeek:()=>this.option("firstDayOfWeek"),getStartDayHour:()=>this.option("startDayHour"),getCalculatedEndDate:t=>this._workSpace.calculateEndDate(t),getTimeZoneCalculator:()=>this.timeZoneCalculator};return new Tne(e)}createAppointmentPopup(e){return new Kne({getElement:()=>this.$element(),createComponent:(i,r,m)=>this._createComponent(i,r,m),focus:()=>this.focus(),getResources:()=>this.option("resources"),getEditingConfig:()=>this._editing,getTimeZoneCalculator:()=>this.timeZoneCalculator,getDataAccessors:()=>this._dataAccessors,getAppointmentFormOpening:()=>this._actions.onAppointmentFormOpening,processActionResult:(i,r)=>this._processActionResult(i,r),addAppointment:i=>this.addAppointment(i),updateAppointment:(i,r)=>this.updateAppointment(i,r),updateScrollPosition:(i,r,m)=>{this._workSpace.updateScrollPosition(i,r,m)}},e)}_getAppointmentTooltipOptions(){return{createComponent:this._createComponent.bind(this),container:this.$element(),getScrollableContainer:this.getWorkSpaceScrollableContainer.bind(this),addDefaultTemplates:this._templateManager.addDefaultTemplates.bind(this._templateManager),getAppointmentTemplate:this._getAppointmentTemplate.bind(this),showAppointmentPopup:this.showAppointmentPopup.bind(this),checkAndDeleteAppointment:this.checkAndDeleteAppointment.bind(this),isAppointmentInAllDayPanel:this.isAppointmentInAllDayPanel.bind(this),createFormattedDateText:(e,t,i)=>this.fire("getTextAndFormatDate",e,t,i),getAppointmentDisabled:e=>hc(e,this._dataAccessors,this.timeZoneCalculator).disabled,onItemContextMenu:this._createActionByOption("onAppointmentContextMenu"),createEventArgs:this._createEventArgs.bind(this)}}_createEventArgs(e){return(0,_.X)({},this.fire("mapAppointmentFields",{itemData:e.itemData.appointment,itemElement:e.itemElement,targetedAppointment:e.itemData.targetedAppointment}),{component:e.component,element:e.element,event:e.event,model:e.model})}checkAndDeleteAppointment(e,t){const i=hc(t,this._dataAccessors,this.timeZoneCalculator),r=this.fireOnAppointmentDeleting(e,i);this._checkRecurringAppointment(e,t,i.startDate,()=>{this.processDeleteAppointment(e,r)},!0)}_getExtraAppointmentTooltipOptions(){return{rtlEnabled:this.option("rtlEnabled"),focusStateEnabled:this.option("focusStateEnabled"),editing:this.option("editing"),offset:this.option("_appointmentTooltipOffset")}}isAppointmentInAllDayPanel(e){const t=this._workSpace;return this.appointmentTakesAllDay(e)&&t.supportAllDayRow()&&t.option("showAllDayPanel")}_initMarkupCore(e){this._readyToRenderAppointments=(0,gr.Vd)(),this._workSpace&&this._cleanWorkspace(),this._renderWorkSpace(e),this._appointments.option({fixedContainer:this._workSpace.getFixedContainer(),allDayContainer:this._workSpace.getAllDayContainer()}),this._waitAsyncTemplate(()=>{var t;return null===(t=this._workSpaceRecalculation)||void 0===t?void 0:t.resolve()}),this.createAppointmentDataProvider(),this._filterAppointmentsByDate(),this._validateKeyFieldIfAgendaExist()}_isDataSourceLoaded(){return this._dataSource&&this._dataSource.isLoaded()}_render(){var e;this._toggleSmallClass(),this._toggleAdaptiveClass(),null===(e=this.getWorkSpace())||void 0===e||e.updateHeaderEmptyCellWidth(),super._render()}_renderHeader(){if(0!==this.option("toolbar").length){const e=(0,a.A)("<div>").appendTo(this._mainContainer);this._header=this._createComponent(e,L7,this._headerConfig())}}_headerConfig(){const e=this._getCurrentViewOptions(),t=this._getViewCountConfig(),i=(0,_.X)({firstDayOfWeek:this.getFirstDayOfWeek(),currentView:this.option("currentView"),isAdaptive:this.option("adaptivityEnabled"),tabIndex:this.option("tabIndex"),focusStateEnabled:this.option("focusStateEnabled"),rtlEnabled:this.option("rtlEnabled"),useDropDownViewSwitcher:this.option("useDropDownViewSwitcher"),customizeDateNavigatorText:this.option("customizeDateNavigatorText"),agendaDuration:e.agendaDuration||7},e);return i.intervalCount=t.intervalCount,i.views=this.option("views"),i.min=new Date(this._dateOption("min")),i.max=new Date(this._dateOption("max")),i.currentDate=Tn.A.trimTime(new Date(this._dateOption("currentDate"))),i.onCurrentViewChange=r=>{this.option("currentView",r)},i.onCurrentDateChange=r=>{this.option("currentDate",r)},i.items=this.option("toolbar"),i.startViewDate=this.getStartViewDate(),i.todayDate=()=>this.timeZoneCalculator.createDate(new Date,{path:"toGrid"}),i}_appointmentsConfig(){return{getResources:()=>this.option("resources"),getResourceDataAccessors:this.getResourceDataAccessors.bind(this),getAgendaResourceProcessor:()=>this.agendaResourceProcessor,getAppointmentColor:this.createGetAppointmentColor(),getAppointmentDataProvider:()=>this.appointmentDataProvider,dataAccessors:this._dataAccessors,observer:this,onItemRendered:this._getAppointmentRenderedAction(),onItemClick:this._createActionByOption("onAppointmentClick"),onItemContextMenu:this._createActionByOption("onAppointmentContextMenu"),onAppointmentDblClick:this._createActionByOption("onAppointmentDblClick"),tabIndex:this.option("tabIndex"),focusStateEnabled:this.option("focusStateEnabled"),allowDrag:this._allowDragging(),allowDelete:this._editing.allowUpdating&&this._editing.allowDeleting,allowResize:this._allowResizing(),allowAllDayResize:this._allowAllDayResizing(),rtlEnabled:this.option("rtlEnabled"),currentView:this.currentView,groups:this._getCurrentViewOption("groups"),timeZoneCalculator:this.timeZoneCalculator,getResizableStep:()=>this._workSpace?this._workSpace.positionHelper.getResizableStep():0,getDOMElementsMetaData:()=>{var t;return null===(t=this._workSpace)||void 0===t?void 0:t.getDOMElementsMetaData()},getViewDataProvider:()=>{var t;return null===(t=this._workSpace)||void 0===t?void 0:t.viewDataProvider},isVerticalViewDirection:()=>"vertical"===this.getRenderingStrategyInstance().getDirection(),isVerticalGroupedWorkSpace:()=>this._workSpace._isVerticalGroupedWorkSpace(),isDateAndTimeView:()=>sP(this._workSpace.type),onContentReady:()=>{var t;null===(t=this._workSpace)||void 0===t||t.option("allDayExpanded",this._isAllDayExpanded())}}}getCollectorOffset(){return this._workSpace.needApplyCollectorOffset()&&!this.option("adaptivityEnabled")?this.option("_collectorOffset"):0}getAppointmentDurationInMinutes(){return this._getCurrentViewOption("cellDuration")}_getCurrentViewType(){return this.currentViewType}_renderWorkSpace(e){var t;this._readyToRenderAppointments&&this._toggleSmallClass();const i=(0,a.A)("<div>").appendTo(this._mainContainer),r=this._getViewCountConfig(),m=Nae[this._getCurrentViewType()].workSpace,A=this._workSpaceConfig(e,r);this._workSpace=this._createComponent(i,m,A),this._allowDragging()&&this._workSpace.initDragBehavior(this,this._all),this._workSpace._attachTablesEvents(),this._workSpace.getWorkArea().append(this._appointments.$element()),this._recalculateWorkspace(),r.startDate&&(null===(t=this._header)||void 0===t||t.option("currentDate",this._workSpace._getHeaderDate())),this._appointments.option("_collectorOffset",this.getCollectorOffset())}_getViewCountConfig(){const e=this.option("currentView"),t=this._getViewByName(e);return{intervalCount:t&&t.intervalCount||1,startDate:t&&t.startDate||null}}_getViewByName(e){const t=this.option("views");for(let i=0;i<t.length;i++)if(t[i].name===e||t[i].type===e||t[i]===e)return t[i]}_recalculateWorkspace(){this._workSpaceRecalculation=new g.cY,this._waitAsyncTemplate(()=>{(0,Du.ho)(this._workSpace.$element()),this._workSpace.renderCurrentDateTimeLineAndShader()})}_workSpaceConfig(e,t){var i;const r=this._getCurrentViewOptions(),m=this.option("scrolling"),A="virtual"===m.mode||"virtual"===(null===(i=r.scrolling)||void 0===i?void 0:i.mode),V=A&&(!(0,C.O9)(m.orientation)||["horizontal","both"].filter(_e=>{var Me;return m.orientation===_e||(null===(Me=r.scrolling)||void 0===Me?void 0:Me.orientation)===_e}).length>0),X=this.option("crossScrollingEnabled")||V||fU(this.currentViewType),ce=(0,_.X)({resources:this.option("resources"),loadedResources:this.option("loadedResources"),getFilteredItems:()=>this.filteredItems,getResourceDataAccessors:this.getResourceDataAccessors.bind(this),noDataText:this.option("noDataText"),firstDayOfWeek:this.option("firstDayOfWeek"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour"),viewOffset:this.getViewOffsetMs(),tabIndex:this.option("tabIndex"),accessKey:this.option("accessKey"),focusStateEnabled:this.option("focusStateEnabled"),cellDuration:this.option("cellDuration"),showAllDayPanel:this.option("showAllDayPanel"),showCurrentTimeIndicator:this.option("showCurrentTimeIndicator"),indicatorTime:this.option("indicatorTime"),indicatorUpdateInterval:this.option("indicatorUpdateInterval"),shadeUntilCurrentTime:this.option("shadeUntilCurrentTime"),allDayExpanded:this._appointments.option("items"),crossScrollingEnabled:X,dataCellTemplate:this.option("dataCellTemplate"),timeCellTemplate:this.option("timeCellTemplate"),resourceCellTemplate:this.option("resourceCellTemplate"),dateCellTemplate:this.option("dateCellTemplate"),allowMultipleCellSelection:this.option("allowMultipleCellSelection"),selectedCellData:this.option("selectedCellData"),onSelectionChanged:_e=>{this.option("selectedCellData",_e.selectedCellData)},groupByDate:this._getCurrentViewOption("groupByDate"),scrolling:m,draggingMode:this.option("_draggingMode"),timeZoneCalculator:this.timeZoneCalculator,schedulerHeight:this.option("height"),schedulerWidth:this.option("width"),allDayPanelMode:this.option("allDayPanelMode"),onSelectedCellsClick:this.showAddAppointmentPopup.bind(this),onRenderAppointments:this._renderAppointments.bind(this),onShowAllDayPanel:_e=>this.option("showAllDayPanel",_e),getHeaderHeight:()=>Tg.DOM.getHeaderHeight(this._header),onScrollEnd:()=>this._appointments.updateResizableArea(),renovateRender:this._isRenovatedRender(A)},r);return ce.observer=this,ce.intervalCount=t.intervalCount,ce.startDate=t.startDate,ce.groups=e,ce.onCellClick=this._createActionByOption("onCellClick"),ce.onCellContextMenu=this._createActionByOption("onCellContextMenu"),ce.currentDate=Tn.A.trimTime(new Date(this._dateOption("currentDate"))),ce.hoursInterval=ce.cellDuration/60,ce.allDayExpanded=!1,ce.dataCellTemplate=ce.dataCellTemplate?this._getTemplate(ce.dataCellTemplate):null,ce.timeCellTemplate=ce.timeCellTemplate?this._getTemplate(ce.timeCellTemplate):null,ce.resourceCellTemplate=ce.resourceCellTemplate?this._getTemplate(ce.resourceCellTemplate):null,ce.dateCellTemplate=ce.dateCellTemplate?this._getTemplate(ce.dateCellTemplate):null,ce.getAppointmentDataProvider=()=>this.appointmentDataProvider,ce}_isRenovatedRender(e){return this.option("renovateRender")&&(0,gr.Vd)()||e}_waitAsyncTemplate(e){if(this._options.silent("templatesRenderAsynchronously")){const t=setTimeout(()=>{e(),clearTimeout(t)});this._asyncTemplatesTimers.push(t)}else e()}_getCurrentViewOptions(){return this.currentView}_getCurrentViewOption(e){return this.currentView&&void 0!==this.currentView[e]?this.currentView[e]:this.option(e)}_getAppointmentTemplate(e){const t=this._getCurrentViewOptions();return t&&t[e]?this._getTemplate(t[e]):this._getTemplateByOption(e)}_updateOption(e,t,i){const r=this._getCurrentViewOptions();(!r||!(0,C.O9)(r[t]))&&this[`_${e}`].option(t,i)}_refreshWorkSpace(e){this._cleanWorkspace(),delete this._workSpace,this._renderWorkSpace(e),this._readyToRenderAppointments&&(this._appointments.option({fixedContainer:this._workSpace.getFixedContainer(),allDayContainer:this._workSpace.getAllDayContainer()}),this._waitAsyncTemplate(()=>this._workSpaceRecalculation.resolve()))}_cleanWorkspace(){this._appointments.$element().detach(),this._workSpace._dispose(),this._workSpace.$element().remove(),this.option("selectedCellData",[])}getWorkSpaceScrollable(){return this._workSpace.getScrollable()}getWorkSpaceScrollableContainer(){return this._workSpace.getScrollableContainer()}getWorkSpace(){return this._workSpace}getHeader(){return this._header}_cleanPopup(){var e;null===(e=this._appointmentPopup)||void 0===e||e.dispose()}_checkRecurringAppointment(e,t,i,r,m,A,V,X){const ce=ll_getField(this._dataAccessors,"recurrenceRule",e);if(Fy().evalRecurrenceRule(ce).isValid&&this._editing.allowUpdating)switch(X||this.option("recurrenceEditMode")){case"series":r();break;case"occurrence":this._excludeAppointmentFromSeries(e,t,i,m,A,V);break;default:V&&(V.cancel=new g.cY),this._showRecurrenceChangeConfirm(m).done(Me=>{"editSeries"===Me&&r(),"editOccurence"===Me&&this._excludeAppointmentFromSeries(e,t,i,m,A,V)}).fail(()=>this._appointments.moveAppointmentBack(V))}else r()}_excludeAppointmentFromSeries(e,t,i,r,m,A){const V=((n,e,t,i)=>{const r=hc((0,Lo.A)({},n),t,i);return r.recurrenceException=((n,e)=>{const t=[];return n.recurrenceException&&t.push(n.recurrenceException),t.push(((n,e,t)=>(t&&n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),Yl.A.serializeDate(n,"yyyyMMddTHHmmssZ")))(e,n.startDate,n.allDay)),t.join()})(r,e),r})(e,i,this._dataAccessors,this._timeZoneCalculator),X=(0,Lo.A)({},t);delete X[this._dataAccessors.expr.recurrenceExceptionExpr],delete X[this._dataAccessors.expr.recurrenceRuleExpr],delete X[this.appointmentDataProvider.keyName],!r&&!m&&this.addAppointment(X),m?(this._appointmentPopup.show(X,{isToolbarVisible:!0,action:2,excludeInfo:{sourceAppointment:e,updatedAppointment:V.source()}}),this._editAppointmentData=e):this._updateAppointment(e,V.source(),()=>{this._appointments.moveAppointmentBack(A)},A)}_createRecurrenceException(e,t){const i=[];return e.recurrenceException&&i.push(e.recurrenceException),i.push(this._getSerializedDate(t,e.startDate,e.allDay)),i.join()}_getSerializedDate(e,t,i){return i&&e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),Yl.A.serializeDate(e,"yyyyMMddTHHmmssZ")}_showRecurrenceChangeConfirm(e){const t=Wn.A.format(e?"dxScheduler-confirmRecurrenceDeleteTitle":"dxScheduler-confirmRecurrenceEditTitle"),i=Wn.A.format(e?"dxScheduler-confirmRecurrenceDeleteMessage":"dxScheduler-confirmRecurrenceEditMessage"),r=Wn.A.format(e?"dxScheduler-confirmRecurrenceDeleteSeries":"dxScheduler-confirmRecurrenceEditSeries"),m=Wn.A.format(e?"dxScheduler-confirmRecurrenceDeleteOccurrence":"dxScheduler-confirmRecurrenceEditOccurrence");return this._recurrenceDialog=(0,ute.Ie)({title:t,messageHtml:i,showCloseButton:!0,showTitle:!0,buttons:[{text:r,onClick:()=>"editSeries"},{text:m,onClick:()=>"editOccurence"}],popupOptions:{wrapperAttr:{class:"dx-dialog"}}}),this._recurrenceDialog.show()}_getUpdatedData(e){const t=this.getViewOffsetMs(),i=On=>{if(!On)return;const Fn=this.timeZoneCalculator.createDate(On,{path:"fromGrid"});return $s_addOffsets(Fn,[-t])},r=On=>!isNaN(new Date(On).getTime()),m=this.getTargetCellData(),A=hc(e,this._dataAccessors,this.timeZoneCalculator),V=i(m.startDate),X=i(m.endDate);let ce=new Date(A.startDate);ce=$s_addOffsets(ce,[-t]);let _e=new Date(A.endDate);_e=$s_addOffsets(_e,[-t]);let Me=V??ce;r(ce)||(ce=Me),r(_e)||(_e=X);const Ve=_e.getTime()-ce.getTime();if(this._workSpace.keepOriginalHours()&&r(A.startDate)&&r(V)){const On=this.timeZoneCalculator.createDate(ce,{path:"toGrid"}),Fn=On.getTime()-Tn.A.trimTime(On).getTime(),oi=$s_addOffsets(m.startDate,[-t]);Me=new Date(Tn.A.trimTime(oi).getTime()+Fn),Me=this.timeZoneCalculator.createDate(Me,{path:"fromGrid"})}const rt=hc({},this._dataAccessors,this.timeZoneCalculator);void 0!==m.allDay&&(rt.allDay=m.allDay),rt.startDate=Me;let Ct=new Date(Me.getTime()+Ve);if(this.appointmentTakesAllDay(e)&&!rt.allDay&&this._workSpace.supportAllDayRow()&&(Ct=this._workSpace.calculateEndDate(Me)),A.allDay&&!this._workSpace.supportAllDayRow()&&!this._workSpace.keepOriginalHours()){const On=new Date(Me);On.setHours(0),Ct=new Date(On.getTime()+Ve),0!==Ct.getHours()&&Ct.setHours(this._getCurrentViewOption("endDayHour"))}rt.startDate=$s_addOffsets(rt.startDate,[t]),rt.endDate=$s_addOffsets(Ct,[t]);const Xt=rt.source();return((n,e,t,i)=>{const r=e.setter;for(const m in i){const A=i[m],V=i7(n,m)?(0,By.BO)(A):A;r[m](t,V)}})(this.option("resources"),this.getResourceDataAccessors(),Xt,m.groups),Xt}getTargetedAppointment(e,t){const i=Tg.dataAccessors.getAppointmentSettings(t),r=Tg.dataAccessors.getAppointmentInfo(t),m=(0,a.A)(t).data(this._appointments._itemIndexKey()),A=hc(e,this._dataAccessors,this.timeZoneCalculator),V=A.clone();if(this._isAgenda()&&A.isRecurrent){const{agendaSettings:ce}=i;V.startDate=ll_getField(this._dataAccessors,"startDate",ce),V.endDate=ll_getField(this._dataAccessors,"endDate",ce)}else i&&(V.startDate=r?r.sourceAppointment.startDate:A.startDate,V.endDate=r?r.sourceAppointment.endDate:A.endDate);const X=V.source();return t&&this.setTargetedAppointmentResources(X,t,m),r&&(X.displayStartDate=new Date(r.appointment.startDate),X.displayEndDate=new Date(r.appointment.endDate)),X}subscribe(e,t){this._subscribes[e]=K7[e]=t}fire(e){const t=this._subscribes[e],i=Array.prototype.slice.call(arguments);if(!(0,C.Tn)(t))throw is.A.Error("E1031",e);return t.apply(this,i.slice(1))}getTargetCellData(){return this._workSpace.getDataByDroppableCell()}_updateAppointment(e,t,i,r){const m={newData:t,oldData:(0,_.X)({},e),cancel:!1},A=function(V){if(i&&i.call(this),V&&"Error"===V.name)throw V}.bind(this);return this._actions.onAppointmentUpdating(m),r&&!(0,C.uF)(r.cancel)&&(r.cancel=new g.cY),this._processActionResult(m,function(V){let X=new g.cY;if(V)A(),X.resolve();else{this._expandAllDayPanel(t);try{X=this.appointmentDataProvider.update(e,t).done(()=>{r&&r.cancel.resolve(!1)}).always(ce=>this._onDataPromiseCompleted(Jh_UPDATED,ce)).fail(()=>A())}catch(ce){A(ce),X.resolve()}}return X.promise()})}_processActionResult(e,t){const i=new g.cY,r=m=>{(0,g.z7)((0,g.Sx)(m)).always(i.resolve)};return(0,C.yL)(e.cancel)?(0,g.z7)((0,g.Sx)(e.cancel)).always(m=>{(0,C.O9)(m)||(m="rejected"===e.cancel.state()),r(t.call(this,m))}):r(t.call(this,e.cancel)),i.promise()}_expandAllDayPanel(e){!this._isAllDayExpanded()&&this.appointmentTakesAllDay(e)&&this._workSpace.option("allDayExpanded",!0)}_onDataPromiseCompleted(e,t,i){const r={appointmentData:i||t};t instanceof Error?r.error=t:this._appointmentPopup.visible&&this._appointmentPopup.hide(),this._actions[e](r),this._fireContentReadyAction()}getAppointmentsInstance(){return this._appointments}getLayoutManager(){return this._layoutManager}getRenderingStrategyInstance(){return this.getLayoutManager().getRenderingStrategyInstance()}getActions(){return this._actions}appointmentTakesAllDay(e){const t=hc(e,this._dataAccessors,this.timeZoneCalculator);return $k(t,this._getCurrentViewOption("allDayPanelMode"))}dayHasAppointment(e,t,i){const r=Me=>this.timeZoneCalculator.createDate(Me,{path:"toGrid"}),m=hc(t,this._dataAccessors,this.timeZoneCalculator);let A=new Date(m.startDate),V=new Date(m.endDate);if(A=r(A),V=r(V),e.getTime()===V.getTime())return A.getTime()===V.getTime();i&&(e=Tn.A.trimTime(e),A=Tn.A.trimTime(A),V=Tn.A.trimTime(V));const X=e.getTime(),ce=A.getTime(),_e=V.getTime();return ce<=X&&X<=_e}setTargetedAppointmentResources(e,t,i){const r=this._getCurrentViewOption("groups");if(null!=r&&r.length){const m=this.getResourceDataAccessors().setter,A=this._workSpace;let V,X;this._isAgenda()?(V=function(){const ce=this.getLayoutManager()._positionMap[i];return Kk(ce[0].groupIndex,this.getWorkSpace().option("groups"))},X=function(ce,_e){m[_e.name](e,_e.id)}):(V=function(){const ce=Tg.dataAccessors.getAppointmentSettings(t)||{};return A.getCellDataByCoordinates({left:ce.left,top:ce.top}).groups},X=function(ce,_e){m[ce](e,_e)}),(0,w.__)(V.call(this),X)}}getStartViewDate(){var e;return null===(e=this._workSpace)||void 0===e?void 0:e.getStartViewDate()}getEndViewDate(){return this._workSpace.getEndViewDate()}showAddAppointmentPopup(e,t){const i=hc({},this._dataAccessors,this.timeZoneCalculator);i.allDay=e.allDay,i.startDate=this.timeZoneCalculator.createDate(e.startDate,{path:"fromGrid"}),i.endDate=this.timeZoneCalculator.createDate(e.endDate,{path:"fromGrid"});const r=(0,_.X)(i.source(),t);this.showAppointmentPopup(r,!0)}showAppointmentPopup(e,t,i){const r=(0,Lo.A)({},i);r&&(delete r.displayStartDate,delete r.displayEndDate);const m=hc(r||e,this._dataAccessors,this.timeZoneCalculator),A=(0,_.X)({},e,r),V=t??(0,C.RI)(e);(0,C.RI)(e)&&(e=this.createPopupAppointment()),V?(delete this._editAppointmentData,this._editing.allowAdding&&this._appointmentPopup.show(e,{isToolbarVisible:!0,action:0})):this._checkRecurringAppointment(e,A,m.startDate,()=>{this._editAppointmentData=e,this._appointmentPopup.show(e,{isToolbarVisible:this._editing.allowUpdating,action:1})},!1,!0)}createPopupAppointment(){const e={},t=Tn.A.dateToMilliseconds,i=new Date(this.option("currentDate")),r=new Date(i.getTime()+this.option("cellDuration")*t("minute"));return ll_setField(this._dataAccessors,"startDate",e,i),ll_setField(this._dataAccessors,"endDate",e,r),e}hideAppointmentPopup(e){var t;null!==(t=this._appointmentPopup)&&void 0!==t&&t.visible&&(e&&this._appointmentPopup.saveChangesAsync(),this._appointmentPopup.hide())}showAppointmentTooltip(e,t,i){if(e){const r=Tg.dataAccessors.getAppointmentSettings(t),m={itemData:i||e,groupIndex:r?.groupIndex,groups:this.option("groups")},V=this.createGetAppointmentColor()(m),X=new j7(e,i,V);this.showAppointmentTooltipCore(t,[X])}}createGetAppointmentColor(){return e=>{const t={resources:this.option("resources"),dataAccessors:this.getResourceDataAccessors(),loadedResources:this.option("loadedResources"),resourceLoaderMap:this.option("resourceLoaderMap")};return Gne(t,e)}}showAppointmentTooltipCore(e,t,i){const r={cancel:!1,appointments:t.map(m=>{const A={appointmentData:m.appointment,currentAppointmentData:(0,Lo.A)({},m.targetedAppointment),color:m.color};if(m.settings.info){const{startDate:V,endDate:X}=m.settings.info.appointment;A.currentAppointmentData.displayStartDate=V,A.currentAppointmentData.displayEndDate=X}return A}),targetElement:(0,s.cc)(e)};this._createActionByOption("onAppointmentTooltipShowing")(r),this._appointmentTooltip.isAlreadyShown(e)?this.hideAppointmentTooltip():this._processActionResult(r,m=>{!m&&this._appointmentTooltip.show(e,t,(0,Lo.A)({},this._getExtraAppointmentTooltipOptions(),i))})}hideAppointmentTooltip(){this._appointmentTooltip&&this._appointmentTooltip.hide()}scrollToTime(e,t,i){is.A.log("W0002","dxScheduler","scrollToTime","21.1",'Use the "scrollTo" method instead'),this._workSpace.scrollToTime(e,t,i)}scrollTo(e,t,i){this._workSpace.scrollTo(e,t,i)}_isHorizontalVirtualScrolling(){const e=this.option("scrolling"),{orientation:t,mode:i}=e;return"virtual"===i&&("horizontal"===t||"both"===t)}addAppointment(e){const t=hc(e,this._dataAccessors,this.timeZoneCalculator);t.text=t.text||"";const i=t.source(!0),r={appointmentData:i,cancel:!1};return this._actions[Jh_ADDING](r),this._processActionResult(r,m=>m?(new g.cY).resolve():(this._expandAllDayPanel(i),this.appointmentDataProvider.add(i).always(A=>this._onDataPromiseCompleted(Jh_ADDED,A))))}updateAppointment(e,t){return this._updateAppointment(e,t)}deleteAppointment(e){const t=this.fireOnAppointmentDeleting(e);this.processDeleteAppointment(e,t)}fireOnAppointmentDeleting(e,t){const i={appointmentData:e,targetedAppointmentData:t,cancel:!1};return this._actions.onAppointmentDeleting(i),i}processDeleteAppointment(e,t){this._processActionResult(t,function(i){i||this.appointmentDataProvider.remove(e).always(r=>this._onDataPromiseCompleted(Jh_DELETED,r,e))})}deleteRecurrence(e,t,i){this._checkRecurringAppointment(e,{},t,()=>{this.processDeleteAppointment(e,{cancel:!1})},!0,!1,null,i)}focus(){this._editAppointmentData?this._appointments.focus():this._workSpace.focus()}getFirstDayOfWeek(){return(0,C.O9)(this.option("firstDayOfWeek"))?this.option("firstDayOfWeek"):sa.A.firstDayOfWeekIndex()}_validateKeyFieldIfAgendaExist(){this.appointmentDataProvider.isDataSourceInit&&this._getViewByName("agenda")&&!this.appointmentDataProvider.keyName&&is.A.log("W1023")}_getDragBehavior(){return this._workSpace.dragBehavior}getViewOffsetMs(){const e=this._getCurrentViewOption("offset");return this.normalizeViewOffsetValue(e)}normalizeViewOffsetValue(e){return(0,C.O9)(e)&&this.currentViewType!==kc.AGENDA?e*Mae("minute"):0}validateOptions(){const e=(0,Lo.A)({},this.option(),{startDayHour:this._getCurrentViewOption("startDayHour"),endDayHour:this._getCurrentViewOption("endDayHour"),offset:this._getCurrentViewOption("offset"),cellDuration:this._getCurrentViewOption("cellDuration")}),t=this._optionsValidator.validate(e);this._optionsValidatorErrorHandler.handleValidationResult(t)}}g6.include(Do.A),(0,y.A)("dxScheduler",g6);let f6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.kaJ,z.aJg,z.gb2,z.lkr,z.ZqW,f.p_,f.xZ,z.kaJ,z.aJg,z.gb2,z.lkr,z.ZqW,f.xZ]})}return n})();var m6=M(7866),_6=M(5463),v6=M(7052);M(3125);let C6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.XUe,f.p_,f.xZ,z.XUe,f.xZ]})}return n})();const Fae={line:!0,spline:!0,stepline:!0,area:!0,steparea:!0,splinearea:!0,bar:!0,winloss:!0},zU=Math,Vae=zU.abs,Hae=zU.round,y6=zU.max,b6=zU.min,w$=isFinite,T$=Number,Uae=String;function x6(n,e,t,i){return(t===i.first||t===i.last)&&(n=e.firstLastColor),(i.min||[]).indexOf(t)>=0&&(n=e.minColor),(i.max||[]).indexOf(t)>=0&&(n=e.maxColor),n}const D$=mR.inherit({_rootClassPrefix:"dxsl",_rootClass:"dxsl-sparkline",_themeSection:"sparkline",_defaultSize:{width:250,height:30},_initCore:function(){this.callBase(),this._createSeries()},_initialChanges:["DATA_SOURCE"],_dataSourceChangedHandler:function(){this._requestChange(["UPDATE"])},_updateWidgetElements:function(){this._updateSeries(),this.callBase()},_disposeWidgetElements:function(){this._series&&this._series.dispose(),this._series=this._seriesGroup=this._seriesLabelGroup=null},_cleanWidgetElements:function(){this._seriesGroup.remove(),this._seriesLabelGroup.remove(),this._seriesGroup.clear(),this._seriesLabelGroup.clear(),this._series.removeGraphicElements(),this._series.removePointElements(),this._series.removeBordersGroup()},_drawWidgetElements:function(){this._dataIsLoaded()&&(this._drawSeries(),this._drawn())},_getCorrectCanvas:function(){const n=this._allOptions,e=this._canvas,t=n.pointSize&&Math.ceil(n.pointSize/2)+2,i=n.type;return"bar"!==i&&"winloss"!==i&&(n.showFirstLast||n.showMinMax)?{width:e.width,height:e.height,left:e.left+t,right:e.right+t,top:e.top+t,bottom:e.bottom+t}:e},_prepareOptions:function(){const n=this;n._allOptions=n.callBase(),n._allOptions.type=Wi(n._allOptions.type),Fae[n._allOptions.type]||(n._allOptions.type="line")},_createHtmlElements:function(){this._seriesGroup=this._renderer.g().attr({class:"dxsl-series"}),this._seriesLabelGroup=this._renderer.g().attr({class:"dxsl-series-labels"})},_createSeries:function(){this._series=new Hc({renderer:this._renderer,seriesGroup:this._seriesGroup,labelsGroup:this._seriesLabelGroup,argumentAxis:this._argumentAxis,valueAxis:this._valueAxis,incidentOccurred:this._incidentOccurred},{widgetType:"chart",type:"line"})},_updateSeries:function(){const n=this._series;this._prepareDataSource();const e=this._prepareSeriesOptions();n.updateOptions(e);const t={groups:[{series:[n]}]};t.argumentOptions={type:"bar"===e.type?"discrete":void 0},this._simpleDataSource=Hf(this._simpleDataSource,t,this._incidentOccurred,{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0})[n.getArgumentField()],e.customizePoint=this._getCustomizeFunction(),n.updateData(this._simpleDataSource),n.createPoints(),this._groupsDataCategories=t.categories},_optionChangesMap:{dataSource:"DATA_SOURCE"},_optionChangesOrder:["DATA_SOURCE"],_change_DATA_SOURCE:function(){this._updateDataSource()},_prepareDataSource:function(){const n=this,e=n._allOptions,t=e.argumentField,i=e.valueField,m=function Gae(n,e,t,i){return ui(n,function(r,m){let V,X,A=null;return void 0!==r&&(A={},V=w$(r),A[e]=V?Uae(m):r[e],X=V?r:r[t],A[t]=null===X?i?void 0:X:T$(X),A=void 0!==A[e]&&void 0!==A[t]?A:null),A})}(n._dataSourceItems()||[],t,i,n.option("ignoreEmptyPoints"));"winloss"===e.type?(n._winlossDataSource=m,n._simpleDataSource=function Wae(n,e,t,i){return ui(n,function(r){const m={};return m[e]=r[e],m[t]=Vae(r[t]-i)<1e-4?0:r[t]>i?1:-1,m})}(m,t,i,e.winlossThreshold)):n._simpleDataSource=m},_prepareSeriesOptions:function(){const n=this._allOptions,e="winloss"===n.type?"bar":n.type;return{visible:!0,argumentField:n.argumentField,valueField:n.valueField,color:n.lineColor,width:n.lineWidth,widgetType:"chart",name:"",type:e,opacity:-1!==e.indexOf("area")?this._allOptions.areaOpacity:void 0,point:{size:n.pointSize,symbol:n.pointSymbol,border:{visible:!0,width:2},color:n.pointColor,visible:!1,hoverStyle:{border:{}},selectionStyle:{border:{}}},border:{color:n.lineColor,width:n.lineWidth,visible:"bar"!==e}}},_getCustomizeFunction:function(){const n=this,e=n._allOptions,i=n._getExtremumPointsIndexes(n._winlossDataSource||n._simpleDataSource);let r;return r="winloss"===e.type||"bar"===e.type?function jae(n,e,t){return function(){const i=this.index,r="winloss"===e.type;return{color:x6((r?t[i][e.valueField]:this.value)>=(r?e.winlossThreshold:0)?r?e.winColor:e.barPositiveColor:r?e.lossColor:e.barNegativeColor,e,i,n)}}}(i,e,n._winlossDataSource):function $ae(n,e){return function(){const t=x6(void 0,e,this.index,n);return t?{visible:!0,border:{color:t}}:{}}}(i,e),r},_getExtremumPointsIndexes:function(n){const e=this,t=e._allOptions,i=n.length-1,r={};return e._minMaxIndexes=function zae(n,e){const i=(n[0]||{})[e]||0;let r=i,m=i,A=[0],V=[0];const X=n.length;let ce,_e;for(_e=1;_e<X;_e++)ce=n[_e][e],ce<r?(r=ce,A=[_e]):ce===r&&A.push(_e),ce>m?(m=ce,V=[_e]):ce===m&&V.push(_e);return m===r&&(A=V=[]),{minIndexes:A,maxIndexes:V}}(n,t.valueField),t.showFirstLast&&(r.first=0,r.last=i),t.showMinMax&&(r.min=e._minMaxIndexes.minIndexes,r.max=e._minMaxIndexes.maxIndexes),r},_getStick:function(){return{stick:"bar"!==this._series.type}},_updateRange:function(){const n=this._series,e=n.type,t="bar"===e,i="winloss"===e,r=n.getRangeData(),m=this._allOptions.minValue,A=(0,C.O9)(m)&&w$(m),V=this._allOptions.maxValue,X=(0,C.O9)(V)&&w$(V);let ce;const _e=.15*(r.val.max-r.val.min);t||i||"area"===e?(0!==r.val.min&&(r.val.min-=_e),0!==r.val.max&&(r.val.max+=_e)):(r.val.min-=_e,r.val.max+=_e),(A||X)&&(A&&X?(r.val.minVisible=b6(m,V),r.val.maxVisible=y6(m,V)):(r.val.minVisible=A?T$(m):void 0,r.val.maxVisible=X?T$(V):void 0),i&&(r.val.minVisible=A?y6(r.val.minVisible,-1):void 0,r.val.maxVisible=X?b6(r.val.maxVisible,1):void 0)),n.getPoints().length>1&&t&&(ce=.1*(r.arg.max-r.arg.min),r.arg.min=r.arg.min-ce,r.arg.max=r.arg.max+ce),r.arg.categories=this._groupsDataCategories,this._ranges=r},_getBarWidth:function(n){const e=this._canvas;let r=Hae((e.width-e.left-e.right-4*n)/n);return r<1&&(r=1),r>50&&(r=50),r},_correctPoints:function(){const n=this,e=n._allOptions.type,t=n._series.getPoints(),i=t.length;let r,m;if("bar"===e||"winloss"===e)for(r=n._getBarWidth(i),m=0;m<i;m++)t[m].correctCoordinates({width:r,offset:0})},_drawSeries:function(){const n=this;n._simpleDataSource.length>0&&(n._correctPoints(),n._series.draw(),n._seriesGroup.append(n._renderer.root))},_isTooltipEnabled:function(){return!!this._simpleDataSource.length},_getTooltipData:function(){const n=this._allOptions,e=this._winlossDataSource||this._simpleDataSource,t=this._tooltip;if(0===e.length)return{};const i=this._minMaxIndexes,r=n.valueField,m=e[0][r],A=e[e.length-1][r],V=(0,C.O9)(i.minIndexes[0])?e[i.minIndexes[0]][r]:m,X=(0,C.O9)(i.maxIndexes[0])?e[i.maxIndexes[0]][r]:m,ce=t.formatValue(m),_e=t.formatValue(A),Me=t.formatValue(V),Ve=t.formatValue(X),Je={firstValue:ce,lastValue:_e,minValue:Me,maxValue:Ve,originalFirstValue:m,originalLastValue:A,originalMinValue:V,originalMaxValue:X,valueText:["Start:",ce,"End:",_e,"Min:",Me,"Max:",Ve]};return"winloss"===n.type&&(Je.originalThresholdValue=n.winlossThreshold,Je.thresholdValue=t.formatValue(n.winlossThreshold)),Je}});ui(["lossColor","lineColor","lineWidth","areaOpacity","minColor","maxColor","barPositiveColor","barNegativeColor","winColor","lessColor","firstLastColor","pointSymbol","pointColor","pointSize","type","argumentField","valueField","winlossThreshold","showFirstLast","showMinMax","ignoreEmptyPoints","minValue","maxValue"],function(n){D$.prototype._optionChangesMap[n]="OPTIONS"}),(0,y.A)("dxSparkline",D$),D$.addPlugin(cs);let S6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.Yh3,z.hzo,z.Vku,z.A1g,z.r2Z,z.Pxf,z.cug,f.p_,f.xZ,z.Yh3,z.hzo,z.Vku,z.A1g,z.r2Z,z.Pxf,z.cug,f.xZ]})}return n})();var E6=M(1609),GU=M(9281);const{getSwatchContainer:Kae}=C4.A,Xae=$d.A.add;(0,y.A)("dxSpeedDialAction",class Yae extends E6.A{_getDefaultOptions(){return(0,_.X)(super._getDefaultOptions(),{icon:"",onClick:null,label:"",visible:!0,index:0,onContentReady:null,activeStateEnabled:!0,hoverStateEnabled:!0,animation:{show:{type:"pop",duration:200,easing:"cubic-bezier(0.4, 0, 0.2, 1)",from:{scale:0,opacity:0},to:{scale:1,opacity:1}},hide:{type:"pop",duration:200,easing:"cubic-bezier(0.4, 0, 0.2, 1)",from:{scale:1,opacity:1},to:{scale:0,opacity:0}}},id:new Rf.A})}_optionChanged(e){switch(e.name){case"onClick":case"icon":case"label":case"visible":case"index":case"onInitializing":(0,GU.po)(this);break;case"animation":case"id":break;default:super._optionChanged(e)}}_render(){this._toggleVisibility(!1),Kae(this.$element())?(0,GU.po)(this):Xae(()=>(0,GU.po)(this))}_dispose(){(0,GU.Ax)(this._options.silent("id")),super._dispose()}});let O6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();M(4972);const Zae=G.A;function WU(n){return`_${(0,vv.PT)(n.replace("on",""))}Action`}const $U="dx-resize-handle",nle=class tle extends E6.A{_supportedKeys(){return(0,Lo.A)({},super._supportedKeys(),{rightArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapseNext:i,showCollapsePrev:r,rtlEnabled:m}=this.option(),A=m?!1===r:!1===i;if((0,N.By)(e)){if("vertical"===t||A)return;m?this._collapsePrevHandler(e):this._collapseNextHandler(e)}else this._resizeBy(e,{x:5})},leftArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapsePrev:i,showCollapseNext:r,rtlEnabled:m}=this.option(),A=m?!1===r:!1===i;if((0,N.By)(e)){if("vertical"===t||A)return;m?this._collapseNextHandler(e):this._collapsePrevHandler(e)}else this._resizeBy(e,{x:-5})},upArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapsePrev:i}=this.option();if((0,N.By)(e)){if("horizontal"===t||!1===i)return;this._collapsePrevHandler(e)}else this._resizeBy(e,{y:-5})},downArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapseNext:i}=this.option();if((0,N.By)(e)){if("horizontal"===t||!1===i)return;this._collapseNextHandler(e)}else this._resizeBy(e,{y:5})}})}_getDefaultOptions(){return(0,Lo.A)({},super._getDefaultOptions(),{direction:"horizontal",hoverStateEnabled:!0,focusStateEnabled:!0,activeStateEnabled:!0,onResize:void 0,onResizeEnd:void 0,onResizeStart:void 0,resizable:!0,showCollapsePrev:!0,showCollapseNext:!0,onCollapsePrev:void 0,onCollapseNext:void 0,separatorSize:8})}_init(){super._init();const e=`dxResizeHandle${new Rf.A}`;this.RESIZE_START_EVENT_NAME=(0,N.b4)(ul.ni,e),this.RESIZE_EVENT_NAME=(0,N.b4)(ul.Cy,e),this.RESIZE_END_EVENT_NAME=(0,N.b4)(ul._N,e),this.CLICK_EVENT_NAME=(0,N.b4)(I.U,e),this.DOUBLE_CLICK_EVENT_NAME=(0,N.b4)(HI.U,e)}_initMarkup(){super._initMarkup(),this._renderResizeHandleContent(),this._setAriaAttributes()}_renderResizeHandleContent(){const{resizable:e}=this.option();(0,a.A)(this.element()).addClass("dx-resize-handle"),(0,a.A)(this.element()).toggleClass("dx-resize-handle-resizable",e),this._toggleDirectionClass(),this._updateDimensions(),this._$collapsePrevButton=(0,a.A)("<div>").addClass(this._getIconClass("prev")).appendTo(this.$element()),this._$resizeHandle=(0,a.A)("<div>").addClass(this._getIconClass("icon")).appendTo(this.$element()),this._$collapseNextButton=(0,a.A)("<div>").addClass(this._getIconClass("next")).appendTo(this.$element()),this._setCollapseButtonsVisibility(),this._setResizeIconVisibility()}_updateIconsClasses(){var e,t,i;const r=this._isHorizontalDirection(),m=this.option("rtlEnabled");null===(e=this._$collapsePrevButton)||void 0===e||e.removeClass(this._getCollapseIconClass(!1,!r,!!m)).addClass(this._getCollapseIconClass(!1,r,!!m)),null===(t=this._$resizeHandle)||void 0===t||t.removeClass(this._getResizeIconClass(!r)).addClass(this._getResizeIconClass(r)),null===(i=this._$collapseNextButton)||void 0===i||i.removeClass(this._getCollapseIconClass(!0,!r,!!m)).addClass(this._getCollapseIconClass(!0,r,!!m))}_updateDimensions(){const e=this._isHorizontalDirection(),t=e?"width":"height";this.option(e?"height":"width",null),this.option(t,this.getSize())}_isInactive(){const{resizable:e,showCollapseNext:t,showCollapsePrev:i}=this.option();return!1===e&&!1===t&&!1===i}_getIconClass(e){const t=this._isHorizontalDirection(),i=this.option("rtlEnabled");switch(e){case"prev":return`dx-resize-handle-collapse-prev-pane dx-icon ${this._getCollapseIconClass(!1,t,!!i)}`;case"next":return`dx-resize-handle-collapse-next-pane dx-icon ${this._getCollapseIconClass(!0,t,!!i)}`;case"icon":return`dx-resize-handle-icon dx-icon ${this._getResizeIconClass(t)}`;default:return""}}_getResizeIconClass(e){return"dx-icon-handle"+(e?"vertical":"horizontal")}_getCollapseIconClass(e,t,i){return"dx-icon-triangle"+(t?e===i?"left":"right":e?"down":"up")}_setCollapseButtonsVisibility(){var e,t;const{showCollapsePrev:i,showCollapseNext:r}=this.option();null===(e=this._$collapsePrevButton)||void 0===e||e.toggleClass("dx-state-invisible",!i),null===(t=this._$collapseNextButton)||void 0===t||t.toggleClass("dx-state-invisible",!r)}_setResizeIconVisibility(){var e;const{resizable:t}=this.option();null===(e=this._$resizeHandle)||void 0===e||e.toggleClass("dx-state-invisible",!t)}_setAriaAttributes(){this.setAria({role:"application",roledescription:"separator",label:Wn.A.format("dxSplitter-resizeHandleAriaLabel")})}_toggleDirectionClass(){(0,a.A)(this.element()).toggleClass("dx-resize-handle-horizontal",this._isHorizontalDirection()),(0,a.A)(this.element()).toggleClass("dx-resize-handle-vertical",!this._isHorizontalDirection())}_render(){super._render(),this._attachEventHandlers()}_resizeStartHandler(e){this._getAction("onResizeStart")({event:e})}_resizeHandler(e){this._getAction("onResize")({event:e})}_resizeEndHandler(e){this._getAction("onResizeEnd")({event:e})}_collapsePrevHandler(e){this._getAction("onCollapsePrev")({event:e})}_collapseNextHandler(e){this._getAction("onCollapseNext")({event:e})}_resizeBy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0};const{resizable:i}=this.option();!1!==i&&(e.offset=t,this._resizeStartHandler(e),this._resizeHandler(e),this._resizeEndHandler(e))}_createEventAction(e){this[WU(e)]=this._createActionByOption(e,{excludeValidators:["disabled","readOnly"]})}_getAction(e){const t=WU(e);return this[t]||this._createEventAction(e),this[t]}_attachEventHandlers(){this._attachResizeEventHandlers(),this._attachPointerEventHandlers()}_attachResizeEventHandlers(){const{resizable:e,direction:t}=this.option();if(e){const i={direction:t,immediate:!0};L.A.on(this.$element(),this.RESIZE_START_EVENT_NAME,i,this._resizeStartHandler.bind(this)),L.A.on(this.$element(),this.RESIZE_EVENT_NAME,i,this._resizeHandler.bind(this)),L.A.on(this.$element(),this.RESIZE_END_EVENT_NAME,i,this._resizeEndHandler.bind(this))}}_attachPointerEventHandlers(){const{showCollapsePrev:e,showCollapseNext:t}=this.option();(!0===e||!0===t)&&L.A.on(this.$element(),this.DOUBLE_CLICK_EVENT_NAME,this._doubleClickHandler.bind(this)),!0===e&&L.A.on(this._$collapsePrevButton,this.CLICK_EVENT_NAME,this._collapsePrevHandler.bind(this)),!0===t&&L.A.on(this._$collapseNextButton,this.CLICK_EVENT_NAME,this._collapseNextHandler.bind(this))}_detachEventHandlers(){this._detachResizeEventHandlers(),this._detachPointerEventHandlers()}_detachResizeEventHandlers(){L.A.off(this.$element(),this.RESIZE_START_EVENT_NAME),L.A.off(this.$element(),this.RESIZE_EVENT_NAME),L.A.off(this.$element(),this.RESIZE_END_EVENT_NAME)}_detachPointerEventHandlers(){L.A.off(this.$element(),this.DOUBLE_CLICK_EVENT_NAME),L.A.off(this._$collapsePrevButton,this.CLICK_EVENT_NAME),L.A.off(this._$collapseNextButton,this.CLICK_EVENT_NAME)}_doubleClickHandler(e){const{showCollapsePrev:t,showCollapseNext:i}=this.option();!0===t?this._collapsePrevHandler(e):!0===i&&this._collapseNextHandler(e)}_isHorizontalDirection(){return"horizontal"===this.option("direction")}_clean(){this._detachResizeEventHandlers(),this._detachPointerEventHandlers(),super._clean()}_optionChanged(e){const{name:t,value:i}=e;switch(t){case"direction":this._toggleDirectionClass(),this._detachResizeEventHandlers(),this._attachResizeEventHandlers(),this._updateDimensions(),this._updateIconsClasses();break;case"resizable":this._setResizeIconVisibility(),(0,a.A)(this.element()).toggleClass("dx-resize-handle-resizable",!!i),this._detachResizeEventHandlers(),this._attachResizeEventHandlers(),this._updateDimensions();break;case"separatorSize":this._updateDimensions();break;case"showCollapsePrev":case"showCollapseNext":this._setCollapseButtonsVisibility(),this._setResizeIconVisibility(),this._updateDimensions(),this._detachPointerEventHandlers(),this._attachPointerEventHandlers();break;case"onCollapsePrev":case"onCollapseNext":case"onResize":case"onResizeStart":case"onResizeEnd":this._createEventAction(t);break;default:super._optionChanged(e)}}getSize(){const{separatorSize:e}=this.option();return this._isInactive()?2:void 0!==e&&Number.isFinite(e)&&e>=0?e:8}isInactive(){return this._isInactive()}};var ile=M(5107);const rle=class ole extends ile.A{constructor(e,t,i){super(e,t,i),this._owner=t.owner}_renderResizeHandle(){var e;if(!1!==(null===(e=this._rawData)||void 0===e?void 0:e.visible)&&!this.isLast()){const t=`dx_${new Rf.A}`;this._setIdAttr(t);const i=this._owner._getResizeHandleConfig(t);this._resizeHandle=this._owner._createComponent((0,a.A)("<div>"),nle,i),this._resizeHandle&&this._$element&&(0,a.A)(this._resizeHandle.element()).insertAfter(this._$element)}}_setIdAttr(e){var t;null===(t=this._$element)||void 0===t||t.attr("id",e)}getIndex(){return this._owner._getIndexByItemData(this._rawData)}getResizeHandle(){return this._resizeHandle}isLast(){return this._owner._isLastVisibleItem(this.getIndex())}};function A$(n){var e,t;const i=null===(e=n.data)||void 0===e?void 0:e.call(n,"dxComponents")[0];return i&&(null===(t=n.data)||void 0===t?void 0:t.call(n,`${i}`))}var mP=M(749);const EV=10;function Hy(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const i=parseFloat((0,mP.M)(n,t))-parseFloat((0,mP.M)(e,t));return 0===i?0:i>0?1:-1}const T6_horizontal="horizontal",T6_vertical="vertical",sle="%",ale="px";function I$(n){for(let e=n.length-1;e>=0;e-=1)if(!1!==n[e].visible)return e;return-1}function D6(n){for(let e=n.length-1;e>=0;e-=1)if(!0!==n[e].collapsed)return e;return-1}function rL(n,e){const{minSize:t=0,maxSize:i=100,resizable:r,visible:m,collapsed:A,collapsedSize:V=0}=n;if(!1===m)return 0;if(!0===A)return V??0;if(!1===r&&(0,C.O9)(n.size))return n.size;let X=Hy(e,t)<0?t:e;return X=Math.min(i,X),X=parseFloat((0,mP.M)(X,EV)),X}function A6(n,e,t,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i<0||i>=t.length)return r;const m=e[i];return A6(n,e,t,i+n,r+(rL(t[i],100)-m))}function I6(n,e,t,i){if(!(0,C.O9)(t))return n;const r=[...n],m=t+1;let A=e,X=A<0?m:t;const ce=A6(A<0?1:-1,n,i,X,0),_e=Math.min(Math.abs(A),Math.abs(ce));let Me=0;for(A=A<0?-_e:_e,X=A<0?t:m;X>=0&&X<i.length;){const On=Math.abs(A)-Math.abs(Me),Fn=n[X],Yt=rL(i[X],Fn-On);if(0!==Hy(Fn,Yt)&&(Me+=Fn-Yt,r[X]=Yt,parseFloat((0,mP.M)(Me,EV))>=parseFloat((0,mP.M)(Math.abs(A),EV))))break;A<0?X-=1:X+=1}if(0===Hy(Me,0))return n;let Ve=A<0?m:t,Je=n[Ve],rt=Je+Me,Ct=rL(i[Ve],rt);if(r[Ve]=Ct,0!==Hy(Ct,rt)){let On=rt-Ct;Ve=A<0?m:t;let Fn=Ve;for(;Fn>=0&&Fn<i.length&&(Je=r[Fn],rt=Je+On,Ct=rL(i[Fn],rt),0!==Hy(Je,Ct)&&(On-=Ct-Je,r[Fn]=Ct),0!==Hy(On,0));)A>0?Fn-=1:Fn+=1}return 0!==Hy(r.reduce((On,Fn)=>Fn+On,0),100,3)?n:r}function P$(n,e,t){const i=(0,JF.CC)(e,t);n.style[(0,JF.jA)(e)]=i}function P6(n,e){return!!(0,C.Kg)(n)&&new RegExp(`^\\d+(\\.\\d+)?${e}$`).test(n)}function OV(n,e,t){const i=function gle(n,e){if((0,C.O9)(n)){if((0,C.kf)(n)&&n>=0)return Number(n);if((0,C.Kg)(n)){if(function ule(n){return P6(n,sle)}(n))return parseFloat(n)/100*e;if(function hle(n){return"number"==typeof n?n>=0:P6(n,ale)}(n))return parseFloat(n.slice(0,-2))}}}(n,e);if(!(0,C.O9)(i))return;const m=function ple(n,e){return 0===n?0:e/n*100}(e-t,i);return parseFloat((0,mP.M)(m,EV))}function M6(n,e){return e===T6_horizontal?(0,D.RG)(n):(0,D.Oq)(n)}var qh;!function(n){n.Previous="prev",n.Next="next"}(qh||(qh={}));let vle=(()=>{class n extends Zae{constructor(){super(...arguments),this._renderQueue=[],this._panesCacheSize=[],this._itemRestrictions=[]}_getDefaultOptions(){const t=super._getDefaultOptions();return(0,Lo.A)({},t,{orientation:"horizontal",onItemCollapsed:void 0,onItemExpanded:void 0,onResize:void 0,onResizeEnd:void 0,onResizeStart:void 0,allowKeyboardNavigation:!0,separatorSize:8,_itemAttributes:(0,Lo.A)({},t._itemAttributes,{role:"group"}),_renderQueue:void 0})}_itemClass(){return"dx-splitter-item"}_itemDataKey(){return"dxSplitterItemData"}_init(){super._init(),this._initializeRenderQueue()}_initializeRenderQueue(){this._renderQueue=this.option("_renderQueue")??[]}_isRenderQueueEmpty(){return this._renderQueue.length<=0}_pushItemToRenderQueue(t,i){this._renderQueue.push({itemContent:t,splitterConfig:i})}_shiftItemFromQueue(){return this._renderQueue.shift()}_initMarkup(){(0,a.A)(this.element()).addClass("dx-splitter"),this._toggleOrientationClass(),super._initMarkup(),this._panesCacheSize=[],this._attachResizeObserverSubscription()}_getItemDimension(t){return this._isHorizontalOrientation()?(0,D.Ot)(t):(0,D.P$)(t)}_attachResizeObserverSubscription(){if((0,gr.Vd)()){const t=(0,a.A)(this.element()).get(0);UE.A.unobserve(t),UE.A.observe(t,()=>{this._resizeHandler()})}}_attachHoldEvent(){}_resizeHandler(){this._shouldRecalculateLayout&&(this._layout=this._getDefaultLayoutBasedOnSize(),this._applyStylesFromLayout(this._layout),this._updateItemSizes(),this._shouldRecalculateLayout=!1)}_renderItems(t){super._renderItems(t),this._updateResizeHandlesResizableState(),this._updateResizeHandlesCollapsibleState(),function mle(n){var e;return!!n&&!!(n.offsetWidth||n.offsetHeight||null!==(e=n.getClientRects)&&void 0!==e&&e.call(n).length)}((0,a.A)(this.element())[0])?(this._layout=this._getDefaultLayoutBasedOnSize(),this._applyStylesFromLayout(this._layout),this._updateItemSizes()):this._shouldRecalculateLayout=!0,this._processRenderQueue()}_processRenderQueue(){if(this._isRenderQueueEmpty())return;const t=this._shiftItemFromQueue();t&&(this._createComponent((0,a.A)(t.itemContent),n,(0,_.X)({itemTemplate:this.option("itemTemplate"),onResize:this.option("onResize"),onResizeStart:this.option("onResizeStart"),onResizeEnd:this.option("onResizeEnd"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),onItemExpanded:this.option("onItemExpanded"),onItemCollapsed:this.option("onItemCollapsed"),separatorSize:this.option("separatorSize"),allowKeyboardNavigation:this.option("allowKeyboardNavigation"),rtlEnabled:this.option("rtlEnabled"),_renderQueue:this._renderQueue},t.splitterConfig)),this._processRenderQueue())}_itemElements(){return(0,a.A)(this._itemContainer()).children(this._itemSelector())}_isLastVisibleItem(t){const{items:i=[]}=this.option();return t===I$(i)}_renderItem(t,i,r,m){const A=super._renderItem(t,i,r,m),V=A.get(0);return P$(V,"flexShrink",0),P$(V,"flexBasis",0),this._getItemInstance(A)._renderResizeHandle(),A}_getItemInstance(t){return n.ItemClass.getInstance(t)}_updateResizeHandlesResizableState(){this._getResizeHandles().forEach(t=>{const i=t.$element(),r=this._getResizeHandleLeftItem(i),m=this._getResizeHandleRightItem(i),A=this._getItemData(r),V=this._getItemData(m);t.option("resizable",!1!==A.resizable&&!1!==V.resizable&&!0!==A.collapsed&&!0!==V.collapsed),t.option("disabled",t.isInactive())})}_updateResizeHandlesCollapsibleState(){this._getResizeHandles().forEach(t=>{const i=(0,a.A)(t.element()),r=this._getResizeHandleLeftItem(i),m=this._getResizeHandleRightItem(i),A=this._getItemData(r),V=this._getItemData(m);t.option({showCollapsePrev:!0===V.collapsed?!0===V.collapsible&&!0!==A.collapsed:!0===A.collapsible&&!0!==A.collapsed,showCollapseNext:!0===A.collapsed?!0===A.collapsible:!0===V.collapsible&&!0!==V.collapsed}),t.option("disabled",t.isInactive())})}_updateNestedSplitterOption(t,i){const{items:r=[]}=this.option();r.forEach(m=>{if(null!=m&&m.splitter){const A=this._findItemElementByItem(m).find(".dx-splitter").eq(0);A.length&&A$(A).option(t,i)}})}_updateResizeHandlesOption(t,i){this._getResizeHandles().forEach(r=>{r.option(t,i)})}_getNextVisibleItemData(t){const{items:i=[]}=this.option();return this._getItemDataByIndex(function lle(n,e){for(let t=e+1;t<n.length;t+=1)if(!1!==n[t].visible)return t;return-1}(i,t))}_getItemDataByIndex(t){return this._editStrategy.getItemDataByIndex(t)}_createEventAction(t){this[WU(t)]=this._createActionByOption(t,{excludeValidators:["disabled","readOnly"]})}_getAction(t){const i=WU(t);return this[i]||this._createEventAction(t),this[i]}_getResizeHandleConfig(t){const{orientation:i,rtlEnabled:r,allowKeyboardNavigation:m,separatorSize:A}=this.option();return{direction:i,focusStateEnabled:m,hoverStateEnabled:!0,separatorSize:A,elementAttr:{"aria-controls":t},onCollapsePrev:V=>{var X;null===(X=V.event)||void 0===X||X.stopPropagation(),this._savedCollapsingEvent=V.event,this.handleCollapseEvent(this._getResizeHandleLeftItem((0,a.A)(V.element)),qh.Previous)},onCollapseNext:V=>{var X;null===(X=V.event)||void 0===X||X.stopPropagation(),this._savedCollapsingEvent=V.event,this.handleCollapseEvent(this._getResizeHandleLeftItem((0,a.A)(V.element)),qh.Next)},onResizeStart:V=>{const{element:X,event:ce}=V;if(!ce)return;const _e=(0,a.A)(X),Me={event:ce,handleElement:(0,s.cc)(_e)};if(this._getAction("onResizeStart")(Me),Me.cancel)return void(ce.cancel=!0);this._feedbackDeferred=(0,g.cY)(),(0,pre.s2)(this._feedbackDeferred),this._toggleActiveState(_e,!0);const Ve=this._getResizeHandleLeftItem(_e),Je=this._getItemData(Ve),rt=this._getIndexByItem(Je);this._activeResizeHandleIndex=rt,this._currentOnePxRatio=OV(1,M6((0,a.A)(this.element()),i),this._getResizeHandlesSize()),this._currentLayout=this.getLayout(),this._updateItemsRestrictions()},onResize:V=>{const{element:X,event:ce}=V;if(!ce)return;const _e={event:ce,handleElement:(0,s.cc)((0,a.A)(X))};if(this._getAction("onResize")(_e),_e.cancel)return void(ce.cancel=!0);const Me=I6(this._currentLayout??[],function dle(n,e,t){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return function cle(n,e,t){return e===T6_vertical?n.y??0:(t?-1:1)*(n.x??0)}(n,e,t)*i}(ce.offset,this.option("orientation"),r,this._currentOnePxRatio),this._activeResizeHandleIndex,this._itemRestrictions);this._applyStylesFromLayout(Me),this._layout=Me},onResizeEnd:V=>{var X;const{element:ce,event:_e}=V;if(this._activeResizeHandleIndex=void 0,!_e)return;const Me=(0,a.A)(ce),Ve={event:_e,handleElement:(0,s.cc)(Me)};this._getAction("onResizeEnd")(Ve),Ve.cancel?_e.cancel=!0:(null===(X=this._feedbackDeferred)||void 0===X||X.resolve(),this._toggleActiveState(Me,!1),this._updateItemSizes())}}}handleCollapseEvent(t,i,r){const m=t,A=this._getItemData(m),V=this._getIndexByItem(A),X=this._getResizeHandleRightItem(m),ce=this._getItemData(X),_e=this._getIndexByItem(ce);this._activeResizeHandleIndex=V,this._collapseDirection=i;const Me=r??(i===qh.Previous?ce.collapsed:A.collapsed);let Ve=0;Ve=i===qh.Previous?Me?_e:V:Me?V:_e,this._updateItemData("collapsed",Ve,!Me,!1)}_getResizeHandleLeftItem(t){let i=t.prev();for(;i.hasClass("dx-state-invisible")||i.hasClass($U);)i=i.prev();return i}_getResizeHandleRightItem(t){let i=t.next();for(;i.hasClass("dx-state-invisible")||i.hasClass($U);)i=i.next();return i}_getResizeHandlesSize(){return this._getResizeHandles().reduce((t,i)=>t+i.getSize(),0)}_createItemByTemplate(t,i){const{itemData:r}=i;return r.splitter?t.source?t.source():(0,a.A)():super._createItemByTemplate(t,i)}_postprocessRenderItem(t){const i=t.itemData.splitter;i&&this._pushItemToRenderQueue(t.itemContent,i)}_isHorizontalOrientation(){return"horizontal"===this.option("orientation")}_toggleOrientationClass(){(0,a.A)(this.element()).toggleClass("dx-splitter-horizontal",this._isHorizontalOrientation()).toggleClass("dx-splitter-vertical",!this._isHorizontalOrientation())}_itemOptionChanged(t,i,r,m){switch(i){case"size":case"maxSize":case"minSize":case"collapsedSize":this._layout=this._getDefaultLayoutBasedOnSize(),this._applyStylesFromLayout(this.getLayout()),this._updateItemSizes();break;case"collapsed":this._itemCollapsedOptionChanged(t,r,m);break;case"resizable":this._updateResizeHandlesResizableState();break;case"collapsible":this._updateResizeHandlesCollapsibleState();break;case"visible":this._invalidate();break;default:super._itemOptionChanged(t,i,r,m)}}_itemCollapsedOptionChanged(t,i,r){if(!!i==!!r)return;const m=this._getIndexByItem(t),A=(0,a.A)(this._itemElements()[m]),{items:V=[]}=this.option();if(!(0,C.O9)(this._activeResizeHandleIndex))if(i){const _e=m>D6(V);this._isLastVisibleItem(m)||_e?this.handleCollapseEvent(this._getResizeHandleLeftItem(A),qh.Next,!!r):this.handleCollapseEvent(A,qh.Previous,!!r)}else{var X;const _e=m>=D6(V);this._isLastVisibleItem(m)||_e||(null===(X=this._panesCacheSize[m])||void 0===X?void 0:X.direction)===qh.Previous?this.handleCollapseEvent(this._getResizeHandleLeftItem(A),qh.Previous,!!r):this.handleCollapseEvent(A,qh.Next,!!r)}this._updateItemsRestrictions();const ce=this._getCollapseDelta(t,i);this._itemRestrictions.map(_e=>(_e.maxSize=void 0,_e.resizable=void 0,t)),this._layout=I6(this.getLayout(),ce,this._activeResizeHandleIndex,this._itemRestrictions),this._applyStylesFromLayout(this.getLayout()),this._updateItemSizes(),this._updateResizeHandlesResizableState(),this._updateResizeHandlesCollapsibleState(),this._fireCollapsedStateChanged(!i,A,this._savedCollapsingEvent),this._savedCollapsingEvent=void 0,this._collapseDirection=void 0,this._activeResizeHandleIndex=void 0}_calculateExpandToLeftSize(t){const{items:i=[]}=this.option();for(let r=t;r>=0;r-=1){const{collapsed:m,visible:A}=i[r];if(!0!==m&&!1!==A)return this.getLayout()[r]/2}return 0}_calculateExpandToRightSize(t){const{items:i=[]}=this.option();for(let r=t;r<=i.length-1;r+=1){const{collapsed:m,visible:A}=i[r];if(!0!==m&&!1!==A)return this.getLayout()[r]/2}return 0}_getCollapseDelta(t,i){const r=this._getIndexByItem(t),{collapsedSize:m=0,minSize:A=0,maxSize:V=100}=this._itemRestrictions[r],X=this.getLayout()[r];if(i){const rt=m;return X>rt&&(this._panesCacheSize[r]={size:X,direction:this._collapseDirection===qh.Next?qh.Previous:qh.Next}),this._collapseDirection===qh.Previous?rt-X:X-rt}const ce=this._panesCacheSize[r];this._panesCacheSize[r]=void 0;let _e=0;_e=ce&&ce.direction===this._collapseDirection?ce.size-m:this._collapseDirection===qh.Previous?this._calculateExpandToLeftSize(r-1):this._calculateExpandToRightSize(r+1);let Me=Hy(_e,A)<0?A:_e;return Me=Math.min(V,Me),Me*(this._collapseDirection===qh.Previous?-1:1)}_fireCollapsedStateChanged(t,i,r){this._itemEventHandler(i,t?"onItemExpanded":"onItemCollapsed",{event:r})}_getDefaultLayoutBasedOnSize(){return this._updateItemsRestrictions(),function _le(n){let e=new Array(n.length).fill(null),t=0,i=100;n.forEach((V,X)=>{const{size:ce,visible:_e,collapsed:Me,collapsedSize:Ve=0}=V;if(!1===_e)return t+=1,e[X]=0,void(i-=0);if(!0===Me)return t+=1,e[X]=Ve,void(i-=Ve);if((0,C.O9)(ce)){if(t+=1,i-ce<0)return e[X]=i,void(i=0);e[X]=ce,i-=ce}});let r=n.length-t;if(0===r)e[I$(n)]+=i,i=0;else if(n.forEach((V,X)=>{null===e[X]&&((0,C.O9)(V.maxSize)&&1===r?(e[X]=i>V.maxSize?i:V.maxSize,i-=e[X],t+=1):(0,C.O9)(V.maxSize)&&V.maxSize<i/r&&(e[X]=V.maxSize,i-=V.maxSize,t+=1,r-=1))}),r=n.length-t,r>0){const V=i/r;e.forEach((X,ce)=>{null===X&&(e[ce]=V)})}if(e=e.map(V=>null===V?0:parseFloat((0,mP.M)(V,EV))),1===e.length)return e;let m=[...e];const A=m.reduce((V,X)=>V+X,0);if(0!==Hy(A,100))for(let V=0;V<n.length;V+=1)m[V]=100/A*m[V];if(i=0,m=e.map((V,X)=>{const _e=rL(n[X],V);return i+=V-_e,_e}),0!==Hy(i,0)){for(let V=0;V<m.length&&0!==Hy(i,0);V+=1){const X=m[V],ce=rL(n[V],X+i);i-=ce-X,m[V]=ce}if(i>0){const V=I$(n);!1===n[V].collapsed&&(m[V]+=i)}}return m}(this._itemRestrictions)}_updateItemsRestrictions(){const{orientation:t,items:i=[]}=this.option(),r=this._getResizeHandlesSize(),m=M6((0,a.A)(this.element()),t);this._itemRestrictions=[],i.forEach(A=>{this._itemRestrictions.push({resizable:!1!==A.resizable,visible:!1!==A.visible,collapsed:!0===A.collapsed,collapsedSize:OV(A.collapsedSize,m,r),size:OV(A.size,m,r),maxSize:OV(A.maxSize,m,r),minSize:OV(A.minSize,m,r)})})}_applyStylesFromLayout(t){this._iterateItems((i,r)=>{P$((0,a.A)(r)[0],"flexGrow",t[i]);const m=this._getItemData(r),A=0===t[i]&&!1!==m.visible;(0,a.A)(r).toggleClass("dx-splitter-item-hidden-content",A)})}_updateItemSizes(){this._iterateItems((t,i)=>{this._updateItemData("size",t,this._getItemDimension(i))})}_updateItemData(t,i,r){let m=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const A=`items[${i}]`,V=this.option(A);(0,C.Gv)(V)?this._updateItemOption(`${A}.${t}`,r,m):this._updateItemOption(A,{text:V,[t]:r},m)}_updateItemOption(t,i){arguments.length>2&&void 0!==arguments[2]&&arguments[2]?this._options.silent(t,i):this.option(t,i)}_iterateItems(t){this._itemElements().each((i,r)=>(t(i,r),!0))}_getResizeHandles(){const t=[];return this._iterateItems((i,r)=>{const A=this._getItemInstance((0,a.A)(r)).getResizeHandle();A&&t.push(A)}),t}_getResizeHandleItems(){return(0,a.A)(this.element()).children(`.${$U}`)}_iterateResizeHandles(t){this._getResizeHandleItems().each((i,r)=>(t(A$((0,a.A)(r))),!0))}_dimensionChanged(){this._updateItemSizes(),this._layout=this._getDefaultLayoutBasedOnSize()}_optionChanged(t){const{name:i,value:r}=t;switch(i){case"width":case"height":super._optionChanged(t),this._dimensionChanged();break;case"allowKeyboardNavigation":this._iterateResizeHandles(m=>{m.option("focusStateEnabled",!!r)}),this._updateNestedSplitterOption(i,r);break;case"orientation":this._toggleOrientationClass(),this._updateResizeHandlesOption("direction",r);break;case"onResizeStart":case"onResizeEnd":case"onResize":case"onItemCollapsed":case"onItemExpanded":this._createEventAction(i),this._updateNestedSplitterOption(i,r);break;case"separatorSize":this._updateResizeHandlesOption(i,r),this._updateNestedSplitterOption(i,r);break;case"_renderQueue":this._invalidate();break;default:super._optionChanged(t)}}registerKeyHandler(t,i){(0,a.A)(this.element()).find(`.${$U}`).each((r,m)=>(A$((0,a.A)(m)).registerKeyHandler(t,i),!0))}getLayout(){return this._layout??[]}}return n.ItemClass=rle,n})();(0,y.A)("dxSplitter",vle);let k6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,z.BM2,f.p_,f.xZ,z.POb,z.BM2,f.xZ]})}return n})();var L6=M(5947);let B6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,f.p_,f.xZ,z.POb,f.xZ]})}return n})();var N6=M(2459),F6=M(6165);const Cle={provide:Ce.kq,useExisting:(0,S.Rfq)(()=>yle),multi:!0};let yle=(()=>{class n extends f.ic{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get autoResizeEnabled(){return this._getOption("autoResizeEnabled")}set autoResizeEnabled(t){this._setOption("autoResizeEnabled",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get maxHeight(){return this._getOption("maxHeight")}set maxHeight(t){this._setOption("maxHeight",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get minHeight(){return this._getOption("minHeight")}set minHeight(t){this._setOption("minHeight",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(t){this._setOption("spellcheck",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOptionChanged;onPaste;onValueChanged;accessKeyChange;activeStateEnabledChange;autoResizeEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maxHeightChange;maxLengthChange;minHeightChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};constructor(t,i,r,m,A,V,X,ce){super(t,i,r,m,X,ce),this._watcherHelper=m,this._idh=A,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"autoResizeEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxHeightChange"},{emit:"maxLengthChange"},{emit:"minHeightChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),V.setHost(this)}_createInstance(t,i){return new bne(t,i)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",i=>{this.eventHelper.fireNgEvent("onBlur",[i])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("validationErrors",t)}setupChanges(t,i){t in this._optionsToUpdate||this._idh.setup(t,i)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,i){let r=this._idh.setupSingle(t,i),m=null!==this._idh.getChanges(t,i);(r||m)&&super._setOption(t,i)}static \u0275fac=function(i){return new(i||n)(S.rXU(S.aKT),S.rXU(S.SKi),S.rXU(f.zF),S.rXU(f.jS),S.rXU(f.$M),S.rXU(f.fH),S.rXU(S.pJN),S.rXU(S.Agw))};static \u0275cmp=S.VBU({type:n,selectors:[["dx-text-area"]],hostBindings:function(i,r){1&i&&S.bIt("valueChange",function(A){return r.change(A)})("onBlur",function(A){return r.touched(A)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",autoResizeEnabled:"autoResizeEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",maxHeight:"maxHeight",maxLength:"maxLength",minHeight:"minHeight",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",autoResizeEnabledChange:"autoResizeEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxHeightChange:"maxHeightChange",maxLengthChange:"maxLengthChange",minHeightChange:"minHeightChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},features:[S.Jv_([f.zF,f.jS,Cle,f.fH,f.$M]),S.Vt3,S.OA$],decls:0,vars:0,template:function(i,r){},encapsulation:2})}return n})(),V6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();var H6=M(862);const ble={horizontal:{itemMainRatio:"widthRatio",itemCrossRatio:"heightRatio",baseItemMainDimension:"baseItemWidth",baseItemCrossDimension:"baseItemHeight",mainDimension:"width",crossDimension:"height",mainPosition:"left",crossPosition:"top"},vertical:{itemMainRatio:"heightRatio",itemCrossRatio:"widthRatio",baseItemMainDimension:"baseItemHeight",baseItemCrossDimension:"baseItemWidth",mainDimension:"height",crossDimension:"width",mainPosition:"top",crossPosition:"left"}},xle=WI.A.inherit({_activeStateUnit:".dx-tile",_getDefaultOptions(){return(0,_.X)(this.callBase(),{items:null,direction:"horizontal",hoverStateEnabled:!0,showScrollbar:"never",height:500,baseItemWidth:100,baseItemHeight:100,itemMargin:20,activeStateEnabled:!0,indicateLoading:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===d.A.real().deviceType&&!d.A.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>Tk.nativeScrolling,options:{showScrollbar:"onScroll"}}])},_itemClass:()=>"dx-tile",_itemDataKey:()=>"dxTileData",_itemContainer(){return this._$container},_init(){this.callBase(),this.$element().addClass("dx-tileview"),this._initScrollView()},_dataSourceLoadingChangedHandler(n){const e=this._scrollView;!e||!e.startLoading||(n&&this.option("indicateLoading")?e.startLoading():e.finishLoading())},_hideLoadingIfLoadIndicationOff(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_initScrollView(){const{width:n,height:e,direction:t,showScrollbar:i}=this.option();this._scrollView=this._createComponent(this.$element(),Af.A,{direction:t,width:n,height:e,scrollByContent:!0,useKeyboard:!1,showScrollbar:i}),this._$container=(0,a.A)(this._scrollView.content()),this._$container.addClass("dx-tileview-wrapper"),this._scrollView.option("onUpdated",this._renderGeometry.bind(this))},_initMarkup(){this.callBase(),(0,h.zE)(()=>{this._cellsPerDimension=1,this._renderGeometry(),this._updateScrollView(),this._fireContentReadyAction()})},_updateScrollView(){this._scrollView.option("direction",this.option("direction")),this._scrollView.update(),this._indicateLoadingIfAlreadyStarted()},_indicateLoadingIfAlreadyStarted(){this._isDataSourceLoading()&&this._dataSourceLoadingChangedHandler(!0)},_renderGeometry(){this._config=ble[this.option("direction")];const n=this.option("items")||[],e=this._config,t=this.option("itemMargin"),i=Math.max.apply(Math,(0,w.Tj)(n||[],m=>Math.round(m[e.itemCrossRatio]||1)));let r;r=gr.Vd?("width"===e.crossDimension?D.RG:D.Oq)(this.$element()):parseInt(this.$element().get(0).style[e.crossDimension]),this._cellsPerDimension=Math.floor(r/(this.option(e.baseItemCrossDimension)+t)),this._cellsPerDimension=Math.max(this._cellsPerDimension,i),this._cells=[],this._cells.push(new Array(this._cellsPerDimension)),this._arrangeItems(n),this._renderContentSize(e,t)},_renderContentSize(n,e){let{mainDimension:t,baseItemMainDimension:i}=n;if((0,gr.Vd)()){const r=this._cells.length*this.option(i)+(this._cells.length+1)*e,m=("width"===t?D.RG:D.Oq)(this.$element());("width"===t?D.zj:D.k$)(this._$container,Math.max(r,m))}},_arrangeItems(n){const e=this._config,{itemMainRatio:t}=e,{itemCrossRatio:i}=e,{mainPosition:r}=e;this._itemsPositions=[],(0,w.__)(n,(m,A)=>{const V={};V[t]=A[t]||1,V[i]=A[i]||1,V.index=m,V[t]=V[t]<=0?0:Math.round(V[e.itemMainRatio]),V[i]=V[i]<=0?0:Math.round(V[e.itemCrossRatio]);const X=this._getItemPosition(V);-1===X[r]&&(X[r]=this._cells.push(new Array(this._cellsPerDimension))-1),this._occupyCells(V,X),this._arrangeItem(V,X),this._itemsPositions.push(X)})},_refreshActiveDescendant:h.lQ,_getItemPosition(n){const e=this._config,{mainPosition:t}=e,{crossPosition:i}=e,r={};r[t]=-1,r[i]=0;for(let m=0;m<this._cells.length;m++){for(let A=0;A<this._cellsPerDimension;A++)if(this._itemFit(m,A,n)){r[t]=m,r[i]=A;break}if(r[t]>-1)break}return r},_itemFit(n,e,t){let i=!0;const r=this._config,m=t[r.itemMainRatio],A=t[r.itemCrossRatio];if(e+A>this._cellsPerDimension)return!1;for(let V=n;V<n+m;V++)for(let X=e;X<e+A;X++)if(this._cells.length-1<V)this._cells.push(new Array(this._cellsPerDimension));else if(void 0!==this._cells[V][X]){i=!1;break}return i},_occupyCells(n,e){const t=this._config,i=e[t.mainPosition],r=e[t.crossPosition],m=n[t.itemMainRatio],A=n[t.itemCrossRatio];for(let V=i;V<i+m;V++)for(let X=r;X<r+A;X++)this._cells[V][X]=n.index},_arrangeItem(n,e){const t=this._config,i=e[t.mainPosition],r=e[t.crossPosition],m=n[t.itemMainRatio],A=n[t.itemCrossRatio],V=this.option(t.baseItemCrossDimension),X=this.option(t.baseItemMainDimension),ce=this.option("itemMargin"),_e={display:m<=0||A<=0?"none":""},Me=m*X+(m-1)*ce,Ve=A*V+(A-1)*ce;if(_e[t.mainDimension]=Me<0?0:Me,_e[t.crossDimension]=Ve<0?0:Ve,_e[t.mainPosition]=i*X+(i+1)*ce,_e[t.crossPosition]=r*V+(r+1)*ce,this.option("rtlEnabled")){const Je=(0,D.RG)(this._$container),rt=this.option("baseItemWidth"),Ct=e.left;_e.left=Je-(Ct*rt+(rt+ce)*n.widthRatio+Ct*ce)}this._itemElements().eq(n.index).css(_e)},_moveFocus(n){const e=this.option("rtlEnabled")?"right":"left",t=this.option("rtlEnabled")?"left":"right",i="horizontal"===this.option("direction"),r=this._cells,m=(0,a.A)(this.option("focusedElement")).index();let A=this._itemsPositions[m].left,V=this._itemsPositions[m].top;const X=(i?r:r[0]).length,ce=(i?r[0]:r).length,_e=function(Je,rt){return i?r[Je][rt]:r[rt][Je]};switch(n){case"pageup":case"up":for(;V>0&&m===_e(A,V);)V--;V<0&&(V=0);break;case"pagedown":case"down":for(;V<ce&&m===_e(A,V);)V++;V===ce&&(V=ce-1);break;case t:for(;A<X&&m===_e(A,V);)A++;A===X&&(A=X-1);break;case e:for(;A>=0&&m===_e(A,V);)A--;A<0&&(A=0);break;default:return void this.callBase.apply(this,arguments)}const Me=_e(A,V);if(!(0,C.O9)(Me))return;const Ve=this._itemElements().eq(Me);this.option("focusedElement",(0,s.cc)(Ve)),this._scrollToItem(Ve)},_scrollToItem(n){if(!n.length)return;const e=this._config,t="width"===e.mainDimension?D.Ot:D.P$,i=this.option("itemMargin"),r=n.position()[e.mainPosition],m=t(n),A=r+m,V=this.scrollPosition(),X=t(this.$element());V<=r&&A<=V+X||this._scrollView.scrollTo(V>r?r-i:r+m-X+i)},_optionChanged(n){switch(n.name){case"items":this.callBase(n),this._renderGeometry(),this._updateScrollView();break;case"showScrollbar":this._initScrollView();break;case"disabled":this._scrollView.option("disabled",n.value),this.callBase(n);break;case"baseItemWidth":case"baseItemHeight":case"itemMargin":this._renderGeometry();break;case"width":case"height":this.callBase(n),this._renderGeometry(),this._scrollView.option(n.name,n.value),this._updateScrollView();break;case"direction":this._renderGeometry(),this._updateScrollView();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;default:this.callBase(n)}},scrollPosition(){return this._scrollView.scrollOffset()[this._config.mainPosition]}});(0,y.A)("dxTileView",xle);let U6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,f.p_,f.xZ,z.POb,f.xZ]})}return n})();M(1728);let z6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,f.p_,f.xZ,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,f.xZ]})}return n})(),G6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,f.p_,f.xZ,z.POb,f.xZ]})}return n})(),W6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.i9t,z.TBD,f.p_,f.xZ,z.YLo,z.YaD,z.eNx,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z.Tob,z.$Ql,z.i9t,z.TBD,f.xZ]})}return n})(),$6=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.nrj,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z._zS,z.U9o,z.hyP,z._RO,z.YC7,z.GIV,z.X1G,z.W6p,z.Pxf,z.BR_,z.uE7,z.$lK,z.aJg,z.GCl,z.Sy5,z.k61,z.POb,z.hUd,z.HKo,z.Ixj,z.a6E,z.YLo,z.YaD,z.eNx,z.Tob,z.$Ql,z.isg,z.L0X,z.MtA,z.yA4,z.oCB,z.tWd,z.zkV,z.Sn2,z.MBy,z.qCh,z.x_w,z.s5o,z.ZaD,z.m1r,z.Wnt,z.rER,z.XUe,z.lkr,z.WC8,z.kYc,z.X6g,z.l4W,f.p_,f.xZ,z.nrj,z.Bkf,z.nwt,z.hXw,z.YGc,z.gf0,z.rvW,z._zS,z.U9o,z.hyP,z._RO,z.YC7,z.GIV,z.X1G,z.W6p,z.Pxf,z.BR_,z.uE7,z.$lK,z.aJg,z.GCl,z.Sy5,z.k61,z.POb,z.hUd,z.HKo,z.Ixj,z.a6E,z.YLo,z.YaD,z.eNx,z.Tob,z.$Ql,z.isg,z.L0X,z.MtA,z.yA4,z.oCB,z.tWd,z.zkV,z.Sn2,z.MBy,z.qCh,z.x_w,z.s5o,z.ZaD,z.m1r,z.Wnt,z.rER,z.XUe,z.lkr,z.WC8,z.kYc,z.X6g,z.l4W,f.xZ]})}return n})();function R$(n){const e=n.border||{};return{fill:n.color,opacity:n.opacity,stroke:e.color,"stroke-width":e.width,"stroke-opacity":e.opacity,hatching:n.hatching}}function j6(n,e){return{attr:{filter:e},css:Ti(n.font)}}function K6(){}const Sle=[function Ele(n,e){n.smartAttr(e)},function Ole(n,e){n.outer.attr({stroke:e.stroke,"stroke-width":e["stroke-width"],"stroke-opacity":e["stroke-opacity"]}),n.inner.smartAttr({fill:e.fill,opacity:e.opacity,hatching:e.hatching})}];(0,_.X)(K6.prototype,{value:0,isNode:function(){return!!(this.nodes&&this.level<this.ctx.maxLevel)},isActive:function(){const n=this.ctx;return this.level>=n.minLevel&&this.level<=n.maxLevel},updateStyles:function(){const n=Number(this.isNode());this.state=this._buildState(this.ctx.settings[n].state,!n&&this.color&&{fill:this.color})},_buildState:function(n,e){const t=(0,_.X)({},n);return e?(0,_.X)(t,e):t},updateLabelStyle:function(){const n=this.ctx.settings[Number(this.isNode())];this.labelState=n.labelState,this.labelParams=n.labelParams},_getState:function(){return this.state},applyState:function(){Sle[Number(this.isNode())](this.tile,this._getState())}});const sL=K6,wle=Math.round,k$={};let X6;function Y6(n){return k$[Wi(n)]||(0,C.Tn)(n)&&n||X6}function jU(n,e){k$[n]=e}const KU={"-1":[2,0],1:[0,2]},Z6=function(n){return n[2]-n[0]<n[3]-n[1]?0:1};function Q6(n,e,t){const i=void 0!==t?t:Z6(n),r=1-i,m=e[i],A=e[r],V=KU[m],X=KU[A];return{staticSide:n[2+i]-n[i],variedSide:n[2+r]-n[r],static1:i+V[0],static2:i+V[1],varied1:r+X[0],varied2:r+X[1],staticDir:m,variedDir:A}}function J6(n,e,t,i,r){let m,A;const V=[0,0,0,0],X=i.static1,ce=i.static2;let _e=t[X];const Me=i.staticDir;let rt,Ct,Ve=i.staticSide,Je=r.sum;for(V[i.varied1]=t[i.varied1],V[i.varied2]=t[i.varied1]+i.variedDir*r.side,m=e,A=e+r.count;m<A;++m)rt=V.slice(),rt[X]=_e,Ct=wle(Ve*n[m].value/Je)||0,Je-=n[m].value,Ve-=Ct,_e+=Me*Ct,rt[ce]=_e,n[m].rect=rt;t[i.varied1]=V[i.varied2]}const L$={};let q6;function Dle(n){return function(e){return e.isNode()?void 0:n(e)}}function Ale(n){return function(e){const t=!e.isNode()&&e.parent;return t?t._groupColor=t._groupColor||n(t):void 0}}function B$(n,e){L$[n]=e}function Mle(n){return n.value}function e9(n){return n.colorCodeField?function Rle(n){return function(e){return Number(e.data[n])}}(n.colorCodeField):Mle}const kle=Math.max,Lle=Math.round;function Ble(n,e){return e.value-n.value}function Nle(n){return kle(n,1/n)}function Hle(n,e,t){const i=Q6(t.rect,t.directions,t.staticSideIndex),r=function Vle(n){return(n[2]-n[0])*(n[3]-n[1])}(t.rect),m=r>0?function Fle(n,e,t){let r,A,V,X,i=1/0,m=0;const ce=n.length,_e=t.areaToValue/t.staticSide;let Me;for(V=e;V<ce;){for(A=m+n[V].value,Me=t.staticSide/_e/A,r=0,X=e;X<=V;++X)r=t.accumulate(r,Nle(Me*n[X].value/A),X-e+1);if(!(r<i))break;i=r,m=A,++V}return{sum:m,count:V-e,side:Lle(_e*m)}}(n,e,{areaToValue:r/t.sum,accumulate:t.accumulate,staticSide:i.staticSide}):{sum:1,side:i.variedSide,count:n.length-e};return J6(n,e,t.rect,i,m),t.sum-=m.sum,e+m.count}function t9(n,e,t){const i=n.items,r=i.length;let m;const A={sum:n.sum,rect:n.rect,directions:n.directions,accumulate:e};for(t&&(A.staticSideIndex=Z6(A.rect)),i.sort(Ble),m=0;m<r;)m=Hle(i,m,A)}const Ule=Math.max;function zle(n,e){return Ule(n,e)}function n9(n){const e=n.nodes.slice();let t;const i=e.length;let m,r=0;for(t=0;t<i;++t)m=e[t],m.isNode()?r=Math.max(r,n9(m)):r+=1;return r}function $le(n){const e=n.generateColors();return function(t){return e[t.index]}}function i9(n){const e=n.nodes.slice();let t;const i=e.length;let m,r=0;for(t=0;t<i;++t)m=e[t],m.isNode()&&(r+=i9(m)+1);return r}function Kle(n,e){const t=function jle(n,e){const t={};let r,A,i=e.nodes.slice(),m=i.length;for(r=0;r<m;++r)A=i[r],A.isNode()?(i=i.concat(A.nodes),m=i.length):t[A.parent._id]||(t[A.parent._id]=n.getNextColor());return t}(n,e);return function(i){return t[i._id]}}jU("squarified",function Gle(n){return t9(n,zle,!1)}),B$("discrete",function Wle(n,e,t){const i=e.createPalette(n.palette,{useHighlight:!0,extensionMode:n.paletteExtensionMode,count:n.colorizeGroups?i9(t):n9(t)});return(n.colorizeGroups?Kle:$le)(i,t)});const o9=Math.max,r9={lefttoprightbottom:[1,1],leftbottomrighttop:[1,-1],righttopleftbottom:[-1,1],rightbottomlefttop:[-1,-1]};function _P(n){return n>0?Math.round(n):0}(function Tle(n){X6=k$[n]})("squarified"),function Ple(n){q6=n}("discrete");const N$=Vh.inherit({_handlers:{beginBuildNodes:h.lQ,buildNode:h.lQ,endBuildNodes:h.lQ,setTrackerData:h.lQ,calculateState:function(n){return R$(n)}},_rootClass:"dxtm-tree-map",_rootClassPrefix:"dxtm",_getDefaultSize:function(){return{width:400,height:400}},_themeSection:"treeMap",_fontFields:["tile.label.font","group.label.font"],_init:function(){const n=this;n._rectOffsets={},n._handlers=Object.create(n._handlers),n._context={suspend:function(){n._applyingChanges||n._suspendChanges()},resume:function(){n._applyingChanges||n._resumeChanges()},change:function(e){n._change(e)},settings:[{},{}],calculateState:n._handlers.calculateState,calculateLabelState:j6},n._root=n._topNode={nodes:[]},n.callBase.apply(n,arguments)},_initialChanges:["DATA_SOURCE"],_initCore:function(){const n=this._renderer;this._createProxyType(),this._tilesGroup=n.g().linkOn(n.root,"tiles").linkAppend(),this._labelsGroup=n.g().linkOn(n.root,"labels").linkAppend()},_createProxyType:h.lQ,_disposeCore:function(){this._filter&&this._filter.dispose(),this._labelsGroup.linkOff(),this._tilesGroup.linkOff()},_applySize:function(n){this._tilingRect=n.slice(),this._change(["TILING"])},_optionChangesMap:{dataSource:"DATA_SOURCE",valueField:"NODES_CREATE",childrenField:"NODES_CREATE",colorField:"TILES",colorizer:"TILES",labelField:"LABELS",tile:"TILE_SETTINGS",group:"GROUP_SETTINGS",maxDepth:"MAX_DEPTH",layoutAlgorithm:"TILING",layoutDirection:"TILING"},_themeDependentChanges:["TILE_SETTINGS","GROUP_SETTINGS","MAX_DEPTH"],_changeDataSource:function(){const n=this;n._isDataExpected=n._isSyncData=!0,n._updateDataSource(),n._isSyncData=!1,n._isDataExpected&&n._suspendChanges()},_dataSourceChangedHandler:function(){const n=this;n._isDataExpected?(n._isDataExpected=!1,n._change(["NODES_CREATE"]),n._isSyncData||n._resumeChanges()):n._requestChange(["NODES_CREATE"])},_optionChangesOrder:["DATA_SOURCE","TILE_SETTINGS","GROUP_SETTINGS","MAX_DEPTH"],_change_DATA_SOURCE:function(){this._changeDataSource()},_change_TILE_SETTINGS:function(){this._changeTileSettings()},_change_GROUP_SETTINGS:function(){this._changeGroupSettings()},_change_MAX_DEPTH:function(){this._changeMaxDepth()},_customChangesOrder:["NODES_CREATE","NODES_RESET","TILES","LABELS","TILING","LABELS_LAYOUT"],_change_NODES_CREATE:function(){this._buildNodes()},_change_NODES_RESET:function(){this._resetNodes()},_change_TILES:function(){this._applyTilesAppearance()},_change_LABELS:function(){this._applyLabelsAppearance()},_change_TILING:function(){this._performTiling()},_change_LABELS_LAYOUT:function(){this._performLabelsLayout()},_applyChanges:function(){const n=this;n.callBase.apply(n,arguments),n._isDataExpected||n._drawn(),n._context.forceReset=!1},_buildNodes:function(){const n=this._root=this._topNode=new sL;n._id=0,n.parent={},n.data={},n.level=n.index=-1,n.ctx=this._context,n.label=null,this._nodes=[n],this._handlers.beginBuildNodes();const e=this._processDataSourceItems(this._dataSourceItems()||[]);s9(n,e.items,0,{itemsField:!e.isPlain&&this._getOption("childrenField",!0)||"items",valueField:this._getOption("valueField",!0)||"value",buildNode:this._handlers.buildNode,ctx:this._context,nodes:this._nodes}),this._onNodesCreated(),this._handlers.endBuildNodes(),this._change(["NODES_RESET"])},_onNodesCreated:h.lQ,_processDataSourceItems:function(n){return{items:n,isPlain:!1}},_changeTileSettings:function(){const n=this,e=n._getOption("tile"),t=n._rectOffsets,i=_P(e.border.width),r=i/2,m=1&i?.5:0,A=e.label,V=n._context.settings[0];n._change(["TILES","LABELS"]),V.state=n._handlers.calculateState(e),n._filter=n._filter||n._renderer.shadowFilter("-50%","-50%","200%","200%"),n._filter.attr(A.shadow),n._calculateLabelSettings(V,A,n._filter.id),(t.tileEdge!==r||t.tileInner!==m)&&(t.tileEdge=r,t.tileInner=m,n._change(["TILING"]))},_changeGroupSettings:function(){const n=this,e=n._getOption("group"),t=e.label,i=n._rectOffsets,r=_P(e.border.width),m=r/2,A=1&r?.5:0;let V=0;const X=_P(e.padding),ce=n._context.settings[1];n._change(["TILES","LABELS"]),ce.state=n._handlers.calculateState(e),n._calculateLabelSettings(ce,t),V=e.headerHeight>=0?_P(e.headerHeight):ce.labelParams.height+2*_P(t.paddingTopBottom),n._headerHeight!==V&&(n._headerHeight=V,n._change(["TILING"])),n._groupPadding!==X&&(n._groupPadding=X,n._change(["TILING"])),(i.headerEdge!==m||i.headerInner!==A)&&(i.headerEdge=m,i.headerInner=A,n._change(["TILING"]))},_calculateLabelSettings:function(n,e,t){const i=this._getTextBBox(e.font),r=_P(e.paddingLeftRight),m=_P(e.paddingTopBottom),A=this._getOption("tile.label"),V=this._getOption("group.label");n.labelState=j6(e,t),n.labelState.visible=!("visible"in e)||!!e.visible,n.labelParams={height:i.height,rtlEnabled:this._getOption("rtlEnabled",!0),paddingTopBottom:m,paddingLeftRight:r,tileLabelWordWrap:A.wordWrap,tileLabelOverflow:A.textOverflow,groupLabelOverflow:V.textOverflow}},_changeMaxDepth:function(){let n=this._getOption("maxDepth",!0);n=n>=1?Math.round(n):1/0,this._maxDepth!==n&&(this._maxDepth=n,this._change(["NODES_RESET"]))},_resetNodes:function(){this._tilesGroup.clear(),this._renderer.initDefsElements(),this._context.forceReset=!0,this._context.minLevel=this._topNode.level+1,this._context.maxLevel=this._context.minLevel+this._maxDepth-1,this._change(["TILES","LABELS","TILING"])},_processNodes:function(n,e){a9(n,this._topNode,e)},_applyTilesAppearance:function(){const n=function Ile(n,e,t){const i=Wi(n.type||q6),r=L$[i]&&L$[i](n,e,t);return r?(n.colorizeGroups?Ale:Dle)(r):h.lQ}(this._getOption("colorizer"),this._themeManager,this._topNode);this._processNodes({renderer:this._renderer,group:this._tilesGroup,setTrackerData:this._handlers.setTrackerData,colorField:this._getOption("colorField",!0)||"color",getColor:n},Yle)},_applyLabelsAppearance:function(){this._labelsGroup.clear(),this._processNodes({renderer:this._renderer,group:this._labelsGroup,setTrackerData:this._handlers.setTrackerData,labelField:this._getOption("labelField",!0)||"name"},Jle),this._change(["LABELS_LAYOUT"])},_performTiling:function(){const n={algorithm:Y6(this._getOption("layoutAlgorithm",!0)),directions:r9[String(this._getOption("layoutDirection",!0)).toLowerCase()]||r9.lefttoprightbottom,headerHeight:this._headerHeight,groupPadding:this._groupPadding,rectOffsets:this._rectOffsets};this._topNode.innerRect=this._tilingRect,l9(n,this._topNode),this._processNodes(n,tce),this._change(["LABELS_LAYOUT"]),this._onTilingPerformed()},_onTilingPerformed:h.lQ,_performLabelsLayout:function(){this._processNodes(null,nce)},_getTextBBox:function(n){const e=this._renderer,t=this._textForCalculations||e.text("0",0,0);this._textForCalculations=t,t.css(Ti(n)).append(e.root);const i=t.getBBox();return t.remove(),i}});function s9(n,e,t,i){const r=[],m=i.nodes;let A,V;const X=e.length;let ce,Me,_e=0;for(V=0;V<X;++V){var Ve;ce=e[V],A=new sL,A._id=m.length,A.ctx=i.ctx,A.parent=n,A.level=t,A.index=r.length,A.data=ce,i.buildNode(A),m.push(A),r.push(A),Me=ce[i.itemsField],null!==(Ve=Me)&&void 0!==Ve&&Ve.length&&s9(A,Me,t+1,i),ce[i.valueField]>0&&(A.value=Number(ce[i.valueField])),_e+=A.value}n.nodes=r,n.value=_e}function a9(n,e,t){const i=e.nodes;let r,m;const A=i.length;for(m=0;m<A;++m)r=i[m],t(n,r),r.isNode()&&a9(n,r,t)}const Xle=[function Zle(n,e){const t=n.renderer.simpleRect().append(n.group);return n.setTrackerData(e,t),t},function Qle(n,e){const t=n.renderer.simpleRect().append(n.group),i=n.renderer.simpleRect().append(n.group);return n.setTrackerData(e,i),{outer:t,inner:i}}];function Yle(n,e){e.color=e.data[n.colorField]||n.getColor(e)||e.parent.color,e.updateStyles(),e.tile=!e.ctx.forceReset&&e.tile||Xle[Number(e.isNode())](n,e),e.applyState()}function Jle(n,e){e.updateLabelStyle(),e.labelState.visible&&function qle(n,e,t,i){let r=e.data[n.labelField];e.label=r?String(r):null,r=e.customLabel||e.label,r&&(e.text=n.renderer.text(r).attr(t.attr).css(t.css).append(n.group),n.setTrackerData(e,e.text))}(n,e,e.labelState)}const ece=[0,0,0,0];function l9(n,e){const t=e.nodes,i=[],r=[];let A,m=0;const V=i.length=r.length=t.length;for(A=0;A<V;++A)m+=t[A].value,i[A]={value:t[A].value,i:A};for(m>0&&n.algorithm({items:i.slice(),sum:m,rect:e.innerRect.slice(),isRotated:1&t[0].level,directions:n.directions}),A=0;A<V;++A)r[A]=i[A].rect||ece;e.rects=r}function tce(n,e){let t=e.parent.rects[e.index];const i=n.rectOffsets;let r;e.isNode()?(F$(e.tile.outer,d9(t,e.parent.innerRect,i.headerEdge,i.headerInner)),t=c9(t,n.groupPadding),r=Math.min(n.headerHeight,t[3]-t[1]),e.rect=[t[0],t[1],t[2],t[1]+r],F$(e.tile.inner,c9(e.rect,i.headerEdge)),t[1]+=r,e.innerRect=t,l9(n,e)):(e.rect=t,F$(e.tile,d9(t,e.parent.innerRect,i.tileEdge,i.tileInner)))}function c9(n,e){return[n[0]+e,n[1]+e,n[2]-e,n[3]-e]}function d9(n,e,t,i){return[n[0]+(n[0]===e[0]?t:+i),n[1]+(n[1]===e[1]?t:+i),n[2]-(n[2]===e[2]?t:-i),n[3]-(n[3]===e[3]?t:-i)]}function F$(n,e){n.attr({x:e[0],y:e[1],width:o9(e[2]-e[0],0),height:o9(e[3]-e[1],0)})}function nce(n,e){e.text&&e.labelState.visible&&function ice(n,e){const t=n.rect,i=n.text,r=i.getBBox(),m=e.paddingLeftRight,A=e.paddingTopBottom;i.setMaxSize(t[2]-t[0]-2*m,t[3]-t[1]-A,n.isNode()?{textOverflow:e.groupLabelOverflow,wordWrap:"none"}:{textOverflow:e.tileLabelOverflow,wordWrap:e.tileLabelWordWrap,hideOverflowEllipsis:!0}),i.move(e.rtlEnabled?t[2]-m-r.x-r.width:t[0]+m-r.x,t[1]+A-r.y)}(e,e.labelParams)}(0,y.A)("dxTreeMap",N$);const Im=N$;function oce(n,e,t){return((t-1)*n+e)/t}N$.addPlugin(cs),jU("strip",function rce(n){return t9(n,oce,!0)}),jU("sliceanddice",function sce(n){const e=n.items,t=Q6(n.rect,n.directions,n.isRotated?1:0);J6(e,0,n.rect,t,{sum:n.sum,count:e.length,side:t.variedSide})});const ace=Y6("sliceanddice");jU("rotatedsliceanddice",function lce(n){return n.isRotated=!n.isRotated,ace.call(this,n)});const cce=Math.min,dce=Math.max;function u9(n){return[Number(n[0])||0,n[1]-n[0]||1]}B$("gradient",function gce(n,e){const t=e.createGradientPalette(n.palette),i=e9(n);return"range"in n?function uce(n,e){return function(t){return n(t,e)}}(r,u9(n.range||[])):function pce(n,e){const t={};return function(i){const r=i.parent;return n(i,t[r._id]||(t[r._id]=function hce(n,e){let t;const i=n.length,r=[];let m;for(t=0;t<i;++t)m=e(n[t]),isFinite(m)&&r.push(m);return u9([cce.apply(null,r),dce.apply(null,r)])}(r.nodes,e)))}}(r,i);function r(m,A){return t.getColor((i(m)-A[0])/A[1])}}),B$("range",function mce(n,e){const t=n.range||[],i=e.createDiscretePalette(n.palette,t.length-1),r=e9(n);return function(m){return i.getColor(function fce(n,e){let m,t=0,i=e.length-1,r=-1;if(e[t]<=n&&n<=e[i])if(n===e[i])r=i-1;else{for(;i-t>1;)m=t+i>>1,n<e[m]?i=m:t=m;r=t}return r}(r(m),t))}});const Uw=Im.prototype,XU=sL.prototype;function YU(n,e){const t=n.ctx;t.suspend(),t.change(e),t.resume()}function h9(n,e){const t=n.nodes;let i;const r=t&&t.length;for(i=0;i<r;++i)e.push(t[i].proxy),h9(t[i],e)}Uw._eventsMap.onNodesInitialized={name:"nodesInitialized"},Uw._eventsMap.onNodesRendering={name:"nodesRendering"},Uw._createProxyType=function(){const n=this;let e;function t(i){i.proxy=this,this._id=i._id,this.level=i.level,this.index=i.index,this.data=i.data}t.prototype={constructor:t,getParent:function(){return e[this._id].parent.proxy||null},getChild:function(i){const r=e[this._id].nodes;return r?r[i].proxy:null},getChildrenCount:function(){const i=e[this._id].nodes;return i?i.length:0},getAllChildren:function(){const i=e[this._id].nodes;let r;const m=i&&i.length,A=[];for(r=0;r<m;++r)A.push(i[r].proxy);return A},getAllNodes:function(){const i=[];return h9(e[this._id],i),i},isLeaf:function(){return!e[this._id].isNode()},isActive:function(){return e[this._id].isActive()},value:function(i){const r=e[this._id];let m;return void 0!==i?(function _ce(n,e){const t=e-n.value;for(;n;)n.value+=t,n=n.parent}(r,i>0?Number(i):0),YU(r,["TILING"]),m=this):m=r.value,m},label:function(i){const r=e[this._id];let m;return void 0!==i?(r.customLabel=i?String(i):null,YU(r,["LABELS"]),m=this):m=r.customLabel||r.label,m},customize:function(i){const r=e[this._id];return i&&(r._custom=r._custom||{},(0,_.X)(!0,r._custom,i),r._partialState=r._partialLabelState=null),YU(r,["TILES","LABELS"]),this},resetCustomization:function(){const i=e[this._id];return i._custom=i._partialState=i._partialLabelState=null,YU(i,["TILES","LABELS"]),this}},n._extendProxyType(t.prototype),n._handlers.beginBuildNodes=function(){e=n._nodes,new t(n._root)},n._handlers.buildNode=function(i){new t(i)},n._handlers.endBuildNodes=function(){n._eventTrigger("nodesInitialized",{root:n._root.proxy})}},Uw._extendProxyType=h.lQ;const vce=Uw._resetNodes;Uw._resetNodes=function(){vce.call(this),this._eventTrigger("nodesRendering",{node:this._topNode.proxy})};const Cce=XU.updateStyles;XU.updateStyles=function(){const n=this;Cce.call(n),n._custom&&(n._partialState=!n.ctx.forceReset&&n._partialState||n.ctx.calculateState(n._custom),(0,_.X)(!0,n.state,n._partialState))};const yce=XU.updateLabelStyle;XU.updateLabelStyle=function(){const n=this,e=n._custom;yce.call(n),e&&e.label&&(n._partialLabelState=!n.ctx.forceReset&&n._partialLabelState||function bce(n,e){const t=n.ctx.calculateLabelState(e);return"visible"in e&&(t.visible=!!e.visible),t}(n,e.label),n.labelState=(0,_.X)(!0,{},n.labelState,n._partialLabelState))},Uw.getRootNode=function(){return this._root.proxy},Uw.resetNodes=function(){const n=this._context;return n.suspend(),n.change(["NODES_CREATE"]),n.resume(),this};const vP=sL.prototype,ZU=Im.prototype._handlers,Sce=ZU.calculateState,Ece=vP._buildState;ZU.calculateState=function(n){const e={0:Sce(n)};return ZU.calculateAdditionalStates(e,n),e},ZU.calculateAdditionalStates=h.lQ,vP.code=0,vP.statesMap={0:0},vP.additionalStates=[],vP._buildState=function(n,e){const t={0:Ece(n[0],e)};return this.additionalStates.length&&function Oce(n,e,t,i){let r;const m=i.length;for(r=0;r<m;++r)n[i[r]]=(0,_.X)({},e,t[i[r]])}(t,t[0],n,this.additionalStates),t},vP._getState=function(){return this.state[this.statesMap[this.code]]},vP.setState=function(n,e){e?this.code|=n:this.code&=~n,this.ctx.change(["TILES"])};const zw=Im.prototype,p9=sL.prototype;function g9(n,e,t){const i=n.isNode()&&n.nodes;let r;const m=i&&i.length;for(n.setState(e,t),r=0;r<m;++r)g9(i[r],e,t)}zw._eventsMap.onHoverChanged={name:"hoverChanged"},Wd(zw._handlers,"calculateAdditionalStates",function(n,e){n[1]=e.hoverStyle?R$(e.hoverStyle):{}}),Im.addChange({code:"HOVER_ENABLED",handler:function(){const n=mn(this._getOption("hoverEnabled",!0),!0);n||this.clearHover(),this._hoverEnabled=n},isThemeDependent:!0,isOptionChange:!0,option:"hoverEnabled"}),p9.statesMap[1]=1,p9.additionalStates.push(1),Wd(zw,"_extendProxyType",function(n){const e=this;n.setHover=function(){e._hoverNode(this._id)},n.isHovered=function(){return e._hoverIndex===this._id}}),Wd(zw,"_onNodesCreated",function(){this._hoverIndex=-1}),Wd(zw,"_changeGroupSettings",function(){const n=this;n._groupHoverEnabled=mn(n._getOption("group").hoverEnabled,!0),n._groupHoverEnabled||n.clearHover()}),zw._applyHoverState=function(n,e){g9(this._nodes[n],1,e),this._eventTrigger("hoverChanged",{node:this._nodes[n].proxy})},zw._hoverNode=function(n){const e=this,t=e._hoverIndex;if(e._hoverEnabled&&t!==n){if(!e._groupHoverEnabled&&n>=0&&e._nodes[n].isNode())return void e.clearHover();e._context.suspend(),e._hoverIndex=-1,t>=0&&e._applyHoverState(t,!1),e._hoverIndex=n,n>=0&&e._applyHoverState(n,!0),e._context.resume()}},zw.clearHover=function(){this._hoverNode(-1)};const Gw=Im.prototype,V$=sL.prototype;Gw._eventsMap.onSelectionChanged={name:"selectionChanged"},Wd(Gw._handlers,"calculateAdditionalStates",function(n,e){n[2]=e.selectionStyle?R$(e.selectionStyle):{}}),V$.statesMap[2]=V$.statesMap[3]=2,V$.additionalStates.push(2),Wd(Gw,"_onNodesCreated",function(){this._selectionList.length=0}),Wd(Gw,"_extendProxyType",function(n){const e=this;n.select=function(t){e._selectNode(this._id,!!t)},n.isSelected=function(){return e._selectionList.includes(this._id)},e._selectionList=[]}),Im.addChange({code:"SELECTION_MODE",handler:function(){const n=this,e=Wi(n._getOption("selectionMode",!0)),t=n._selectionList;let i;const r="none"===e?0:"multiple"===e?2:1;1===r&&t.length>1?(i=t.pop(),n.clearSelection(),t.push(i)):0===r&&n.clearSelection(),n._selectionMode=r},isThemeDependent:!0,isOptionChange:!0,option:"selectionMode"}),Wd(Gw,"_applyTilesAppearance",function(){this._selectionList.length&&function Tce(n,e){let t;const i=e.length;let r;for(t=0;t<i;++t)r=n[e[t]],wce[Number(r.isNode())](r.tile)}(this._nodes,this._selectionList)});const wce=[function Dce(n){n.toForeground()},function Ace(n){n.outer.toForeground(),n.inner.toForeground()}];Gw._applySelectionState=function(n,e){const t=this._nodes[n];t.setState(2,e),this._eventTrigger("selectionChanged",{node:t.proxy})},Gw._selectNode=function(n,e){const t=this;let i,r,m;0!==t._selectionMode&&(t._context.suspend(),i=t._selectionList,r=i.indexOf(n),e&&-1===r?(1===t._selectionMode&&i.length&&(m=i.pop(),t._applySelectionState(m,!1)),i.push(n),t._applySelectionState(n,!0)):!e&&r>=0&&(i.splice(r,1),t._applySelectionState(n,!1)),t._context.resume())},Gw.clearSelection=function(){const n=this,e=n._selectionList;let t;const i=e.length;if(0!==n._selectionMode){for(n._context.suspend(),t=0;t<i;++t)n._applySelectionState(e[t],!1);e.length=0,n._context.resume()}};const aL=Im.prototype;function f9(n,e,t){const i=t.getRootOffset();return n||e&&[(e[0]+e[2])/2+i.left,(e[1]+e[3])/2+i.top]||[-1e3,-1e3]}Wd(aL,"_extendProxyType",function(n){const e=this;n.showTooltip=function(t){e._showTooltip(this._id,t)}}),Wd(aL,"_onNodesCreated",function(){this._tooltipIndex>=0&&this._tooltip.hide(),this._tooltipIndex=-1}),Wd(aL,"_onTilingPerformed",function(){this._tooltipIndex>=0&&this._moveTooltip(this._nodes[this._tooltipIndex])}),aL._showTooltip=function(n,e){const t=this,i=t._tooltip,r=t._nodes[n];if(t._tooltipIndex===n)return void t._moveTooltip(r,e);const m=V=>{void 0!==V&&(V||i.hide(),t._tooltipIndex=V?n:-1)},A=f9(e,r.rect,this._renderer);m(i.show({value:r.value,valueText:i.formatValue(r.value),node:r.proxy},{x:A[0],y:A[1],offset:0},{node:r.proxy},void 0,m))},aL._moveTooltip=function(n,e){const t=f9(e,n.rect,this._renderer);this._tooltip.move(t[0],t[1],0)},aL.hideTooltip=function(){this._tooltipIndex>=0&&(this._tooltipIndex=-1,this._tooltip.hide())},Im.addPlugin(qy);let Pce=0;const H$=Im.prototype;H$._eventsMap.onClick={name:"click"},Wd(H$,"_initCore",function(){const n=this,e="__treemap_data_"+Pce++,t=function(i){return n._nodes[i].proxy};n._tracker=new GF({widget:n,root:n._renderer.root,getNode:function(i){const r=t(i);return mn(n._getOption("interactWithGroup",!0))&&r.isLeaf()&&r.getParent().isActive()?r.getParent():r},getData:function(i){const r=i.target;return("tspan"===r.tagName?r.parentNode:r)[e]},getProxy:t,click:function(i){n._eventTrigger("click",i)}}),n._handlers.setTrackerData=function(i,r){r.data(e,i._id)}}),Wd(H$,"_disposeCore",function(){this._tracker.dispose()});const CP=Im.prototype;CP._eventsMap.onDrill={name:"drill"},Wd(CP,"_extendProxyType",function(n){const e=this;n.drillDown=function(){e._drillToNode(this._id)}}),Wd(CP,"_onNodesCreated",function(){this._drilldownIndex=-1}),CP._drillToNode=function(n){const e=this;let t;e._drilldownIndex!==n&&(t=e._nodes[n]||e._root,t.nodes&&(e._drilldownIndex=n,e._topNode=t,e._context.suspend(),e._context.change(["MAX_DEPTH","NODES_RESET"]),e._context.resume(),e._eventTrigger("drill",{node:t.proxy})))},CP.resetDrillDown=function(){return this._drillToNode(-1),this},CP.drillUp=function(){return this._drillToNode(this._topNode.parent._id||-1),this},CP.getCurrentNode=function(){return this._topNode.proxy};const U$=Im.prototype;function m9(n,e){let t,i;const r=n.struct;let m;for(i=0;i<e.length;i++)t=e[i],m=t[n.idField],r[m]&&(t.items=r[m].items,r[m]=null,m9(n,t.items))}U$._optionChangesMap.idField=U$._optionChangesMap.parentField="NODES_CREATE",U$._processDataSourceItems=function(n){let e;const t={};let i;const r=this._getOption("idField",!0),m=this._getOption("parentField",!0);let A;const V=[];let X,ce;if(!r||!m||0===n.length)return{items:n,isPlain:!1};for(e=0;e<n.length;e++)i=n[e],A=i[m],A?(t[A]=t[A]||{items:[]},X=t[A].items):X=V,X.push(i);for(ce in m9({struct:t,idField:r},V),t)t[ce]&&V.push(t[ce]);return{items:V,isPlain:!0}},Im.addPlugin(bv),Im.addPlugin(Xp),Im.addPlugin(LC);let _9=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.jTB,z.uIe,z.X19,z.A1g,z.lWu,z.uE7,z.r2Z,z.$jZ,z.FXg,z.hzo,z.EaX,z.sVF,z.Yh3,z.YkV,z.Vku,z.Pxf,z.cug,f.p_,f.xZ,z.jTB,z.uIe,z.X19,z.A1g,z.lWu,z.uE7,z.r2Z,z.$jZ,z.FXg,z.hzo,z.EaX,z.sVF,z.Yh3,z.YkV,z.Vku,z.Pxf,z.cug,f.xZ]})}return n})();var v9=M(471);M(3600);let C9=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[f.p_,f.xZ,f.xZ]})}return n})();M(643);let y9=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.POb,f.p_,f.xZ,z.POb,f.xZ]})}return n})();var b9=M(1767);const x9={_initEvents:function(){const n=this._eventNames;let e;const t=n.length,i=this._events={};for(e=0;e<t;++e)i[n[e]]=(0,BS.A)()},_disposeEvents:function(){const n=this._events;let e;for(e in n)n[e].empty();this._events=null},on:function(n){const e=this._events;let t;for(t in n)e[t].add(n[t]);return function(){for(t in n)e[t].remove(n[t])}},_fire:function(n,e){this._events[n].fire(e)}};function S9(n){const e=n.prototype;let t;for(t in x9)e[t]=x9[t]}const z$=Number,lL=Math.min,yP=Math.max,X_=Math.abs,QU=Math.round,G$=Math.log,Rce=Math.pow,kce=2/Math.LN2,E9=1/3600/180/10,O9=[NaN,NaN];function W$(n,e){return X_(n-e)<1e-8}function w9(n,e){return W$(n[0],e[0])&&W$(n[1],e[1])}function JU(n,e,t,i){const r=z$(n);return isFinite(r)?lL(yP(r,e),t):i}function $$(n,e,t,i){return[JU(n[0],e[0],t[0],i[0]),JU(n[1],e[1],t[1],i[1])]}function T9(n){return n instanceof wV&&n||Bf.get(n)||Bf(n)||Bf.get("mercator")}const qU=function(n){this._initEvents(),this._params=n,this._engine=T9(),this._center=this._engine.center(),this._adjustCenter()};function ez(n,e,t,i){const r=(t+i)/2;return X_(n-r)>X_(e-r)?n:e}function tz(n,e,t,i){const r=(t+i)/2;return X_(n-r)<X_(e-r)?n:e}function D9(n,e,t){const{min:i,max:r}=I9(e,t);n.min=j$(i),n.max=j$(r)}qU.prototype={constructor:qU,_minZoom:1,_maxZoom:256,_zoom:1,_center:O9,_canvas:{},_scale:[],dispose:function(){this._disposeEvents()},setEngine:function(n){const e=this,t=T9(n);e._engine!==t&&(e._engine=t,e._fire("engine"),e._changeCenter(t.center())&&e._triggerCenterChanged(),e._changeZoom(e._minZoom)&&e._triggerZoomChanged(),e._adjustCenter(),e._setupScreen())},setBounds:function(n){void 0!==n&&this.setEngine(this._engine.original().bounds(n))},_setupScreen:function(){const n=this,e=n._canvas,t=e.width,i=e.height,r=n._engine,m=r.ar();n._x0=e.left+t/2,n._y0=e.top+i/2;const A=[n.project([r.min()[0],0])[0],n.project([0,r.min()[1]])[1]],V=[n.project([r.max()[0],0])[0],n.project([0,r.max()[1]])[1]],X=t/i,ce=X_(V[0]-A[0])/X_(V[1]-A[1]);let _e;_e=isNaN(ce)||0===ce||lL(X,m)<=m*ce&&m*ce<=yP(X,m)?1:ce>1?ce:1/ce,m*ce>=X?(n._xRadius=t/2/_e,n._yRadius=t/2/(m*_e)):(n._xRadius=i/2*(m/_e),n._yRadius=i/2/_e),n._fire("screen")},setSize:function(n){this._canvas=n,this._setupScreen()},getCanvas:function(){return this._canvas},_toScreen:function(n){return[this._x0+this._xRadius*n[0],this._y0+this._yRadius*n[1]]},_fromScreen:function(n){return[(n[0]-this._x0)/this._xRadius,(n[1]-this._y0)/this._yRadius]},_toTransformed:function(n){return[n[0]*this._zoom+this._xCenter,n[1]*this._zoom+this._yCenter]},_toTransformedFast:function(n){return[n[0]*this._zoom,n[1]*this._zoom]},_fromTransformed:function(n){return[(n[0]-this._xCenter)/this._zoom,(n[1]-this._yCenter)/this._zoom]},_adjustCenter:function(){const n=this._engine.project(this._center);this._xCenter=-n[0]*this._zoom||0,this._yCenter=-n[1]*this._zoom||0},project:function(n){return this._engine.project(n)},transform:function(n){return this._toScreen(this._toTransformedFast(n))},isInvertible:function(){return this._engine.isInvertible()},getSquareSize:function(n){return[n[0]*this._zoom*this._xRadius,n[1]*this._zoom*this._yRadius]},getZoom:function(){return this._zoom},_changeZoom:function(n){const e=this,r=!W$(e._zoom,e._zoom=JU(n,e._minZoom,e._maxZoom,e._minZoom));return r&&(e._adjustCenter(),e._fire("zoom")),r},setZoom:function(n){this._engine.isInvertible()&&this._changeZoom(n)&&this._triggerZoomChanged()},getScaledZoom:function(){return QU((this._scale.length-1)*G$(this._zoom)/G$(this._maxZoom))},setScaledZoom:function(n){this.setZoom(this._scale[QU(n)])},changeScaledZoom:function(n){this.setZoom(this._scale[yP(lL(QU(this.getScaledZoom()+n),this._scale.length-1),0)])},getZoomScalePartition:function(){return this._scale.length-1},_setupScaling:function(){const n=this,e=yP(QU(kce*G$(n._maxZoom)),4),t=Rce(n._maxZoom,1/e);let i=n._minZoom;n._scale=[i];for(let r=1;r<=e;++r)n._scale.push(i*=t)},setMaxZoom:function(n){const e=this;e._minZoom=1,e._maxZoom=JU(n,e._minZoom,z$.MAX_VALUE,256),e._setupScaling(),e._zoom>e._maxZoom&&e.setZoom(e._maxZoom),e._fire("max-zoom")},getCenter:function(){return this._center.slice()},setCenter:function(n){this._engine.isInvertible()&&this._changeCenter(n||[])&&this._triggerCenterChanged()},_changeCenter:function(n){const e=this,t=e._engine,m=!w9(e._center,e._center=$$(n,t.min(),t.max(),t.center()));return m&&(e._adjustCenter(),e._fire("center")),m},_triggerCenterChanged:function(){this._params.centerChanged(this.getCenter())},_triggerZoomChanged:function(){this._params.zoomChanged(this.getZoom())},setCenterByPoint:function(n,e){const t=this._engine.project(n),i=this._fromScreen(e);this.setCenter(this._engine.unproject([-i[0]/this._zoom+t[0],-i[1]/this._zoom+t[1]]))},beginMoveCenter:function(){this._engine.isInvertible()&&(this._moveCenter=this._center)},endMoveCenter:function(){const n=this;n._moveCenter&&(w9(n._moveCenter,n._center)||n._triggerCenterChanged(),n._moveCenter=null)},moveCenter:function(n){const e=this;if(e._moveCenter){const t=e.toScreenPoint(e._center);e._changeCenter(e.fromScreenPoint([t[0]+n[0],t[1]+n[1]]))}},getViewport:function(){const n=this._engine.unproject,e=n(this._fromTransformed([-1,-1])),t=n(this._fromTransformed([-1,1])),i=n(this._fromTransformed([1,-1])),r=n(this._fromTransformed([1,1])),m=I9([ez(e[0],t[0],i[0],r[0]),ez(e[1],i[1],t[1],r[1])],[ez(i[0],r[0],e[0],t[0]),ez(t[1],r[1],e[1],i[1])]);return[].concat(m.min[0],m.max[1],m.max[0],m.min[1])},setViewport:function(n){const e=this._engine,t=n?function Lce(n,e,t){const i=n([t[0],t[3]]),r=n([t[0],t[1]]),m=n([t[2],t[3]]),A=n([t[2],t[1]]),V=tz(i[0],r[0],m[0],A[0]),X=tz(m[0],A[0],i[0],r[0]),ce=tz(i[1],m[1],r[1],A[1]),_e=tz(r[1],A[1],i[1],m[1]);return[2/yP(X_(V-X),X_(ce-_e)),e([(V+X)/2,(ce+_e)/2])]}(e.project,e.unproject,n):[this._minZoom,e.center()];this.setZoom(t[0]),this.setCenter(t[1])},getTransform:function(){return{translateX:this._xCenter*this._xRadius,translateY:this._yCenter*this._yRadius}},fromScreenPoint:function(n){return this._engine.unproject(this._fromTransformed(this._fromScreen(n)))},toScreenPoint:function(n){return this._toScreen(this._toTransformed(this._engine.project(n)))},_eventNames:["engine","screen","center","zoom","max-zoom"]},S9(qU);const wV=class{constructor(n){const e=function Bce(n){return e=>A9(n(e))}(n.to),t=n.from?function Nce(n){return e=>n(A9(e))}(n.from):nz(O9);this.project=e,this.unproject=t,this.original=nz(this),this.source=function(){return(0,_.X)({},n)},this.isInvertible=nz(!!n.from),this.ar=nz(n.aspectRatio>0?z$(n.aspectRatio):1),this.center=j$(t([0,0])),D9(this,[t([-1,0])[0],t([0,1])[1]],[t([1,0])[0],t([0,-1])[1]])}aspectRatio(n){const e=new wV((0,_.X)(this.source(),{aspectRatio:n}));return e.original=this.original,e.min=this.min,e.max=this.max,e}bounds(n){n=n||[];const e=this.source(),t=this.min(),i=this.max(),r=$$([n[0],n[1]],t,i,t),m=$$([n[2],n[3]],t,i,i),A=e.to(r),V=e.to(m),X=lL(X_(V[0]-A[0])>E9?X_(V[0]-A[0]):2,X_(V[1]-A[1])>E9?X_(V[1]-A[1]):2);X<2&&(0,_.X)(e,function Fce(n,e,t,i,r){const m=(t[0]+i[0])/2-r/2,A=(t[1]+i[1])/2-r/2,V=2/r;return{to:function(X){const[ce,_e]=n(X);return[(ce-m)*V-1,(_e-A)*V-1]},from:function(X){return e([m+(X[0]+1)/V,A+(X[1]+1)/V])}}}(e.to,e.from,A,V,X));const ce=new wV(e);return ce.original=this.original,D9(ce,r,m),ce}};function A9(n){return[n[0],-n[1]]}function nz(n){return()=>n}function j$(n){return()=>n.slice()}function I9(n,e){return{min:[lL(n[0],e[0]),lL(n[1],e[1])],max:[yP(n[0],e[0]),yP(n[1],e[1])]}}const Bf=function(n){return n&&n.to?new wV(n):null},K$={};Bf.get=function(n){return K$[n]||null},Bf.add=function(n,e){return e=e instanceof wV&&e||Bf(e),!K$[n]&&e&&(K$[n]=e),Bf};const P9=(n,e)=>n.g().attr({stroke:"none","stroke-width":0,fill:"#000000",opacity:1e-4}).css({cursor:"pointer"}).append(e),M9=function(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n.g().attr({class:t}).append(e)},R9=(n,e)=>{const t=e?{display:"block"}:{display:"none"};n.map(i=>i.css(t))},TV=Math,k9=TV.min,L9=TV.max,iz=TV.round,B9=TV.floor,Vce=TV.sqrt,Hce=pi(["left","center","right"]),Uce=pi(["top","bottom"]),N9="command-reset",X$="command-move-up",Y$="command-move-right",Z$="command-move-down",Q$="command-move-left",J$="command-zoom-in",F9="command-zoom-out",V9="command-zoom-drag",bP={bigCircleSize:58,smallCircleSize:28,buttonSize:10,arrowButtonOffset:20,incDecButtonSize:11,incButtonOffset:66,decButtonOffset:227,sliderLineStartOffset:88.5,sliderLineEndOffset:205.5,sliderLength:20,sliderWidth:8,trackerGap:4};let WS={};function q$(n){this._params=n,this._createElements(n.renderer,n.container,n.dataKey),n.layoutControl.addItem(this),this._subscribeToProjection(n.projection),this._subscribeToTracker(n.tracker),this._createCallbacks(n.projection)}function DV(n){delete n._owner,n.update=function(){},n.finish=function(){}}function oz(n,e){this._owner=n,this._command=e}function rz(n,e,t){this._command=e;let i=null,r=0,m=0;switch(this._command){case X$:m=-10;break;case Y$:r=10;break;case Z$:m=10;break;case Q$:r=-10}this._stop=function(){return clearTimeout(i),n._callbacks.endMove(),this._stop=n=null,this},n._callbacks.beginMove(),function A(){n._callbacks.move([r,m]),i=setTimeout(A,100)}()}function sz(n,e){this._owner=n,this._command=e;let t=null;const i=this._command===J$?1:-1;this._stop=function(){return clearTimeout(t),this._stop=n=null,this},function r(){n._adjustZoom(n._zoomFactor+i),t=setTimeout(r,150)}()}function az(n,e,t){this._owner=n,this._zoomFactor=n._zoomFactor,this._pos=t.y}WS[N9]=oz,WS[X$]=WS[Y$]=WS[Z$]=WS[Q$]=rz,WS[J$]=WS[F9]=sz,WS[V9]=az,q$.prototype={constructor:q$,_flags:0,dispose:function(){this._params.layoutControl.removeItem(this),this._root.linkRemove().linkOff(),this._offProjection(),this._offTracker(),this._params=this._root=this._offProjection=this._offTracker=this._callbacks=null},_subscribeToProjection:function(n){const e=this;function t(){e._adjustZoom(n.getScaledZoom())}e._offProjection=n.on({engine:function(){e._update()},zoom:t,"max-zoom":function(){e._zoomPartition=n.getZoomScalePartition(),e._sliderUnitLength=e._sliderLineLength/e._zoomPartition,t()}})},_subscribeToTracker:function(n){const e=this;let t=!1;e._offTracker=n.on({start:function(i){t="control-bar"===i.data.name,t&&e._processStart(i.data.index,i)},move:function(i){t&&e._processMove(i.data.index,i)},end:function(){t&&(e._processEnd(),t=!1)}})},_createCallbacks:function(n){this._callbacks={reset:function(e,t){e&&n.setCenter(null),t&&n.setZoom(null)},beginMove:function(){n.beginMoveCenter()},endMove:function(){n.endMoveCenter()},move:function(e){n.moveCenter(e)},zoom:function(e){n.setScaledZoom(e)}}},_createElements:function(n,e,t){this._root=n.g().attr({class:"dxm-control-bar"}).linkOn(e,"control-bar");const i=this._panControl=M9(n,this._root,"dxm-pan-control"),r=this._zoomBar=M9(n,this._root,"dxm-zoom-bar"),m=this._trackersPan=P9(n,this._root),A=this._trackersZoom=P9(n,this._root);this._createTrackersPan(n,t,m),this._createTrackersZoom(n,t,A),this._createPanControl(n,t,i),this._createZoomBar(n,t,r)},_createPanControl:function(n,e,t){const r=bP.buttonSize/2,m=bP.arrowButtonOffset-r,A=bP.arrowButtonOffset,V={"stroke-linecap":"square",fill:"none"};n.circle(0,0,bP.bigCircleSize/2).append(t),n.circle(0,0,r).attr({fill:"none"}).append(t),n.path([-r,-m,0,-A,r,-m],"line").attr(V).append(t),n.path([m,-r,A,0,m,r],"line").attr(V).append(t),n.path([r,m,0,A,-r,m],"line").attr(V).append(t),n.path([-m,r,-A,0,-m,-r],"line").attr(V).append(t)},_createZoomBar:function(n,e,t){const i=bP,r=i.incDecButtonSize/2;n.circle(0,i.incButtonOffset,i.smallCircleSize/2).append(t),n.path([[-r,i.incButtonOffset,r,i.incButtonOffset],[0,i.incButtonOffset-r,0,i.incButtonOffset+r]],"area").append(t),n.circle(0,i.decButtonOffset,i.smallCircleSize/2).append(t),n.path([-r,i.decButtonOffset,r,i.decButtonOffset],"area").append(t),this._zoomLine=n.path([],"line").append(t),this._zoomDrag=n.rect(B9(-i.sliderLength/2),B9(i.sliderLineEndOffset-i.sliderWidth/2),i.sliderLength,i.sliderWidth).append(t),this._sliderLineLength=i.sliderLineEndOffset-i.sliderLineStartOffset},_createTrackersPan:function(n,e,t){const i=bP,r=iz((i.arrowButtonOffset-i.trackerGap)/2),m=i.arrowButtonOffset-r,A=iz(Vce(i.bigCircleSize*i.bigCircleSize/4-r*r)),V=A-m;n.rect(-r,-r,2*r,2*r).data(e,{index:N9,name:"control-bar"}).append(t),n.rect(-r,-A,2*r,V).data(e,{index:X$,name:"control-bar"}).append(t),n.rect(m,-r,V,2*r).data(e,{index:Y$,name:"control-bar"}).append(t),n.rect(-r,m,2*r,V).data(e,{index:Z$,name:"control-bar"}).append(t),n.rect(-A,-r,V,2*r).data(e,{index:Q$,name:"control-bar"}).append(t)},_createTrackersZoom:function(n,e,t){const i=bP;n.circle(0,i.incButtonOffset,i.smallCircleSize/2).data(e,{index:J$,name:"control-bar"}).append(t),n.circle(0,i.decButtonOffset,i.smallCircleSize/2).data(e,{index:F9,name:"control-bar"}).append(t),n.rect(-2,i.sliderLineStartOffset-2,4,i.sliderLineEndOffset-i.sliderLineStartOffset+4).css({cursor:"default"}).data(e,{index:"command-zoom-drag-line",name:"control-bar"}).append(t),this._zoomDragTracker=n.rect(-i.sliderLength/2,i.sliderLineEndOffset-i.sliderWidth/2,i.sliderLength,i.sliderWidth).data(e,{index:V9,name:"control-bar"}).append(t)},resize:function(n){this._isActive&&this._root.attr({visibility:null!==n?null:"hidden"})},getLayoutOptions:function(){return this._isActive?this._layoutOptions:null},locate:function(n,e){this._root.attr({translateX:n+this._margin+30.5,translateY:e+this._margin+30.5})},_update:function(){const n=this;n._isActive=n._isEnabled&&n._flags&&n._params.projection.isInvertible();const e=[n._panControl,n._trackersPan],t=[n._zoomBar,n._trackersZoom];n._isActive?(n._root.linkAppend(),R9(e,n._isPanVisible),R9(t,n._isZoomVisible)):n._root.linkRemove(),n._processEnd(),n.updateLayout()},setInteraction:function(n){const e=this;mn(n.centeringEnabled,!0)?e._flags|=1:e._flags&=-2,mn(n.zoomingEnabled,!0)?e._flags|=2:e._flags&=-3,e._update()},setOptions:function(n){const e={"stroke-width":n.borderWidth,stroke:n.borderColor,fill:n.color,"fill-opacity":n.opacity};this._isEnabled=!!mn(n.enabled,!0),this._margin=n.margin||0,this._layoutOptions={width:2*this._margin+61,height:2*this._margin+274,horizontalAlignment:Hce(n.horizontalAlignment,"left"),verticalAlignment:Uce(n.verticalAlignment,"top")},this._isPanVisible=!!mn(n.panVisible,!0),this._isZoomVisible=!!mn(n.zoomVisible,!0),this._panControl.attr(e),this._zoomBar.attr(e),this._update()},_adjustZoom:function(n){const e=bP.sliderLineStartOffset,t=bP.sliderLineEndOffset,i=bP.sliderWidth;this._zoomFactor=L9(k9(iz(n),this._zoomPartition),0);const r={translateY:-iz(this._zoomFactor*this._sliderUnitLength)},m=t-i/2+r.translateY;this._zoomLine.attr({points:[[0,e,0,L9(e,m)],[0,k9(t,m+i),0,t]]}),this._zoomDrag.attr(r),this._zoomDragTracker.attr(r)},_applyZoom:function(){this._callbacks.zoom(this._zoomFactor)},_processStart:function(n,e){let t;this._isActive&&(t=WS[n],this._command=t&&t.flags&this._flags?new t(this,n,e):null)},_processMove:function(n,e){this._command&&this._command.update(n,e)},_processEnd:function(){this._command&&this._command.finish(),this._command=null}},oz.flags=3,oz.prototype.update=function(n){n!==this._command&&DV(this)},oz.prototype.finish=function(){const n=this._owner._flags;this._owner._callbacks.reset(!!(1&n),!!(2&n)),DV(this)},rz.flags=1,rz.prototype.update=function(n){this._command!==n&&this.finish()},rz.prototype.finish=function(){DV(this._stop())},sz.flags=2,sz.prototype.update=function(n){this._command!==n&&this.finish()},sz.prototype.finish=function(){this._owner._applyZoom(),DV(this._stop())},az.flags=2,az.prototype.update=function(n,e){const t=this._owner;t._adjustZoom(this._zoomFactor+t._zoomPartition*(this._pos-e.y)/t._sliderLineLength)},az.prototype.finish=function(){this._owner._applyZoom(),DV(this)};const Gce=Math.log,Wce=Math.LN2;function ej(n){this._projection=n.projection,this._renderer=n.renderer,this._x=this._y=0,this._subscribeToTracker(n.tracker)}ej.prototype={constructor:ej,dispose:function(){this._offTracker(),this._offTracker=null},_subscribeToTracker:function(n){const e=this;let t=!1;e._offTracker=n.on({start:function(i){t="control-bar"!==i.data.name,t&&e._processStart(i)},move:function(i){t&&e._processMove(i)},end:function(){t&&e._processEnd()},zoom:function(i){e._processZoom(i)}})},setInteraction:function(n){this._processEnd(),this._centeringEnabled=n.centeringEnabled,this._zoomingEnabled=n.zoomingEnabled},_processStart:function(n){this._centeringEnabled&&(this._x=n.x,this._y=n.y,this._projection.beginMoveCenter())},_processMove:function(n){const e=this;e._centeringEnabled&&(e._renderer.root.attr({cursor:"move"}),e._projection.moveCenter([e._x-n.x,e._y-n.y]),e._x=n.x,e._y=n.y)},_processEnd:function(){this._centeringEnabled&&(this._renderer.root.attr({cursor:"default"}),this._projection.endMoveCenter())},_processZoom:function(n){const e=this;let t,i,r;e._zoomingEnabled&&(n.delta?t=n.delta:n.ratio&&(t=Gce(n.ratio)/Wce),e._centeringEnabled&&(i=e._renderer.getRootOffset(),i=[n.x-i.left,n.y-i.top],r=e._projection.fromScreenPoint(i)),e._projection.changeScaledZoom(t),e._centeringEnabled&&e._projection.setCenterByPoint(r,i))}};const H9=(0,gr.w3)(),tj=Math,AV=tj.abs,$ce=tj.sqrt,U9=tj.round,cL=N.b4,dL="dxVectorMap";let IV,z9;function lz(n){const e=this;e._root=n.root,e._createEventHandlers(n.dataKey),e._createProjectionHandlers(n.projection),e._initEvents(),e._focus=new z9(function(t,i){e._fire(t,i)}),e._attachHandlers()}function G9(n,e,t,i){return $ce((n-t)*(n-t)+(e-i)*(e-i))}function Uy(n){const e=n.originalEvent.type,t=n.originalEvent.pointerType;return/^touch/.test(e)||/^MSPointer/.test(e)&&4!==t||/^pointer/.test(e)&&"mouse"!==t}function nj(n,e){let t=0;const i=n.length;let r;for(;t<i;++t)if(n[t]){r=e[t];break}return cL(r||e[t],dL)}function uL(n){const e=n.originalEvent,t=e.touches&&e.touches[0]||{};return{x:t.pageX||e.pageX||n.pageX,y:t.pageY||e.pageY||n.pageY}}function W9(n){return n.originalEvent.pointerId}function cz(n,e){let t=n.originalEvent;return t=void 0!==t.pointerId?t.pointerId===e?t:null:t.touches[e],t?{x:t.pageX||n.pageX,y:t.pageY||n.pageY}:null}function ij(){this._store={}}!function jce(){let n=[H9.pointerEnabled,H9.msPointerEnabled,(0,gr.i5)("ontouchstart")];IV={start:nj(n,["pointerdown","MSPointerDown","touchstart mousedown","mousedown"]),move:nj(n,["pointermove","MSPointerMove","touchmove mousemove","mousemove"]),end:nj(n,["pointerup","MSPointerUp","touchend mouseup","mouseup"]),wheel:cL(Vb.U,dL)}}(),lz.prototype={constructor:lz,dispose:function(){this._detachHandlers(),this._disposeEvents(),this._focus.dispose(),this._root=this._focus=this._docHandlers=this._rootHandlers=null},_eventNames:["start","move","end","zoom","click","hover-on","hover-off","focus-on","focus-off","focus-move"],_startClick:function(n,e){if(!e)return;const t=uL(n);this._clickState={x:t.x,y:t.y,threshold:Uy(n)?20:5,time:Date.now()}},_endClick:function(n,e){const t=this._clickState;let i,r;t&&(e&&Date.now()-t.time<=500&&(i=t.threshold,r=uL(n),AV(r.x-t.x)<=i&&AV(r.y-t.y)<=i&&this._fire("click",{data:e,x:r.x,y:r.y,$event:n})),this._clickState=null)},_startDrag:function(n,e){if(!e)return;const t=uL(n),i=this._dragState={x:t.x,y:t.y,data:e};this._fire("start",{x:i.x,y:i.y,data:i.data})},_moveDrag:function(n,e){const t=this._dragState;if(!t)return;const i=uL(n),r=Uy(n)?10:5;(t.active||AV(i.x-t.x)>r||AV(i.y-t.y)>r)&&(t.x=i.x,t.y=i.y,t.active=!0,t.data=e||{},this._fire("move",{x:t.x,y:t.y,data:t.data}))},_endDrag:function(){const n=this._dragState;n&&(this._dragState=null,this._fire("end",{x:n.x,y:n.y,data:n.data}))},_wheelZoom:function(n,e){if(!e)return;const t=this._wheelLock,i=Date.now();if(i-t.time<=50)return;i-t.dirTime>300&&(t.dir=0);const r=function Kce(n,e){if(0===n)return 0;let t=AV(n);const i=U9(n/t);return e.dir&&i!==e.dir?0:(e.dir=i,t=t<.1?0:t<1?1:t>4?4:U9(t),i*t)}(n.delta/120||0,t);if(0===r)return;const m=uL(n);this._fire("zoom",{delta:r,x:m.x,y:m.y}),t.time=t.dirTime=i},_startZoom:function(n,e){if(!Uy(n)||!e)return;const t=this._zoomState=this._zoomState||{};let i,r;t.pointer1&&t.pointer2||(void 0===t.pointer1&&(t.pointer1=W9(n)||0,i=cz(n,t.pointer1),t.x1=t.x1_0=i.x,t.y1=t.y1_0=i.y),void 0===t.pointer2&&(r=W9(n)||1,r!==t.pointer1&&(i=cz(n,r),i&&(t.x2=t.x2_0=i.x,t.y2=t.y2_0=i.y,t.pointer2=r,t.ready=!0,this._endDrag()))))},_moveZoom:function(n){const e=this._zoomState;let t;!e||!Uy(n)||(void 0!==e.pointer1&&(t=cz(n,e.pointer1),t&&(e.x1=t.x,e.y1=t.y)),void 0!==e.pointer2&&(t=cz(n,e.pointer2),t&&(e.x2=t.x,e.y2=t.y)))},_endZoom:function(n){const e=this._zoomState;let t,i;!e||!Uy(n)||(e.ready&&(t=G9(e.x1_0,e.y1_0,e.x2_0,e.y2_0),i=G9(e.x1,e.y1,e.x2,e.y2),this._fire("zoom",{ratio:i/t,x:(e.x1_0+e.x2_0)/2,y:(e.y1_0+e.y2_0)/2})),this._zoomState=null)},_startHover:function(n,e){this._doHover(n,e,!0)},_moveHover:function(n,e){this._doHover(n,e,!1)},_doHover:function(n,e,t){const i=this;i._dragState&&i._dragState.active||i._zoomState&&i._zoomState.ready?i._cancelHover():Uy(n)!==t||i._hoverTarget===n.target||i._hoverState&&i._hoverState.data===e||(i._cancelHover(),e&&(i._hoverState={data:e},i._fire("hover-on",{data:e})),i._hoverTarget=n.target)},_cancelHover:function(){const n=this._hoverState;this._hoverState=this._hoverTarget=null,n&&this._fire("hover-off",{data:n.data})},_startFocus:function(n,e){this._doFocus(n,e,!0)},_moveFocus:function(n,e){this._doFocus(n,e,!1)},_doFocus:function(n,e,t){const i=this;i._dragState&&i._dragState.active||i._zoomState&&i._zoomState.ready?i._cancelFocus():Uy(n)===t&&(i._focus.turnOff(),e&&i._focus.turnOn(e,uL(n)))},_cancelFocus:function(){this._focus.cancel()},_createEventHandlers:function(n){const e=this;function t(i){const r=i.target;return("tspan"===r.tagName?r.parentNode:r)[n]}e._docHandlers={},e._rootHandlers={},e._docHandlers[IV.start]=function(i){const r=Uy(i),m=t(i);r&&!e._isTouchEnabled||(m&&i.preventDefault(),e._startClick(i,m),e._startDrag(i,m),e._startZoom(i,m),e._startHover(i,m),e._startFocus(i,m))},e._docHandlers[IV.move]=function(i){const r=Uy(i),m=t(i);r&&!e._isTouchEnabled||(e._moveDrag(i,m),e._moveZoom(i,m),e._moveHover(i,m),e._moveFocus(i,m))},e._docHandlers[IV.end]=function(i){const r=Uy(i),m=t(i);r&&!e._isTouchEnabled||(e._endClick(i,m),e._endDrag(i,m),e._endZoom(i,m))},e._rootHandlers[IV.wheel]=function(i){if(e._cancelFocus(),!e._isWheelEnabled)return;const r=t(i);r&&(i.preventDefault(),i.stopPropagation(),e._wheelZoom(i,r))},e._wheelLock={dir:0}},_createProjectionHandlers:function(n){const e=this;function t(){e._cancelFocus()}n.on({center:t,zoom:t})},reset:function(){this._clickState=null,this._endDrag(),this._cancelHover(),this._cancelFocus()},setOptions:function(n){this.reset(),this._detachHandlers(),this._isTouchEnabled=!!mn(n.touchEnabled,!0),this._isWheelEnabled=!!mn(n.wheelEnabled,!0),this._attachHandlers()},_detachHandlers:function(){const n=this;n._isTouchEnabled&&n._root.css({"touch-action":"","-webkit-user-select":""}).off(cL("MSHoldVisual",dL)).off(cL("contextmenu",dL)),L.A.off(c.A.getDocument(),n._docHandlers),n._root.off(n._rootHandlers)},_attachHandlers:function(){const n=this;n._isTouchEnabled&&n._root.css({"touch-action":"none","-webkit-user-select":"none"}).on(cL("MSHoldVisual",dL),function(e){e.preventDefault()}).on(cL("contextmenu",dL),function(e){Uy(e)&&e.preventDefault()}),L.A.on(c.A.getDocument(),n._docHandlers),n._root.on(n._rootHandlers)}},z9=function(n){let m,A,e=this,t=null,i=null,r=!1;e.dispose=function(){e.turnOn=e.turnOff=e.cancel=e.dispose=e=n=t=i=null},e.turnOn=function(V,X){function ce(_e){r=!_e,_e&&(t=i)}V===i&&r||(r=!1,i=V,t?(m=X.x,A=X.y,i===t?(n("focus-move",{data:i,x:m,y:A}),ce(!0)):n("focus-on",{data:i,x:m,y:A,done:ce})):(m=X.x,A=X.y,n("focus-on",{data:i,x:m,y:A,done:ce})))},e.turnOff=function(){i=null,t&&!r&&(n("focus-off",{data:t}),t=null)},e.cancel=function(){t&&n("focus-off",{data:t}),t=i=null}},S9(lz),ij.prototype={constructor:ij,dispose:function(){return this._store=null,this},_get:function(n,e){const t=this._store[n]||(this._store[n]={});return t[e]||(t[e]={callbacks:(0,BS.A)()})},set:function(n,e,t){const i=this._get(n,e);return i.data=t,i.callbacks.fire(t),this},bind:function(n,e,t){const i=this._get(n,e);return i.callbacks.add(t),i.data&&t(i.data),this},unbind:function(n,e,t){return this._get(n,e).callbacks.remove(t),this}};const $9=_.X,Xce=w.__,Yce={category:"UNKNOWN",name:"UNKNOWN"};let oj=function(n){const e=this;e._params=n,e._root=n.renderer.g().attr({class:"dxm-legend"}).linkOn(n.container,{name:"legend",after:"legend-base"}).enableLinks().linkAppend(),n.layoutControl.addItem(e),Qt.call(e,{renderer:n.renderer,widget:n.widget,group:e._root,backgroundClass:null,itemsGroupClass:null,textField:"text",getFormatObject:function(t){return t}}),e._onDataChanged=function(t){e._updateData(t)}};function rj(n){this._params=n,this._items=[],n.container.virtualLink("legend-base")}oj.prototype=$9((0,xe.o8)(Qt.prototype),{constructor:oj,dispose:function(){return this._params.layoutControl.removeItem(this),this._unbindData(),this._root.linkRemove().linkOff(),this._params=this._root=this._onDataChanged=null,Qt.prototype.dispose.apply(this,arguments)},resize:function(n){this._params.notifyDirty(),null===n?this.erase():this.draw(n.width,n.height),this._params.notifyReady()},locate:Qt.prototype.shift,_updateData:function(n){this._options.defaultColor=n&&n.defaultColor,this.update(n?function Zce(n,e,t){let i;const r=e.length,m=[];let A;for(i=0;i<r;++i)m[i]=A={start:n[i],end:n[i+1],index:i},A[t]=e[i],A.states={normal:{fill:A.color}},A.visible=!0;return m}(n.partition,n.values,this._dataName):[],this._options,this._params.themeManager.theme("legend").title),this.updateLayout()},_unbindData:function(){this._dataCategory&&this._params.dataExchanger.unbind(this._dataCategory,this._dataName,this._onDataChanged)},_bindData:function(n){this._params.dataExchanger.bind(this._dataCategory=n.category,this._dataName=n.name,this._onDataChanged)},setOptions:function(n){this.update(this._data,n,this._params.themeManager.theme("legend").title),this._unbindData();const e=n.source;return this._bindData(e?{category:e.layer,name:e.grouping}:Yce),this.updateLayout(),this}}),rj.prototype={constructor:rj,dispose:function(){Xce(this._items,function(n,e){e.dispose()}),this._params=this._items=null},setOptions:function(n){const e=n&&n.length?n:[],t=this._items;let i;const r=e.length,m=this._params,A=m.themeManager.theme("legend");for(i=t.length;i<r;++i)t[i]=new oj(m);for(i=t.length-1;i>=r;--i)t[i].dispose(),t.splice(i,1);for(m.layoutControl.suspend(),i=0;i<r;++i)t[i].setOptions($9(!0,{},A,e[i]));m.layoutControl.resume()}};const dz=Math.round,sj=Math.min,uz=Math.max,Ww=w.__,Qce={left:0,center:1,right:2},Jce={top:0,bottom:1};function j9(n,e){let t=!1;return function tde(n){Ww([0,1,2,3,4,5],function(e,t){const i=n[t],r=n[(t+3)%6];i.items&&(r.items||(i.rect[1]=sj(i.rect[1],r.rect[3]),i.rect[3]=uz(i.rect[3],r.rect[1])))}),Ww([1,4],function(e,t){const i=n[t],r=n[t-1],m=n[t+1];let A,V;i.items?!r.items&&!m.items&&(A=i.rect[0]-r.rect[2],V=m.rect[0]-i.rect[2],A>V?A/V>=2?(i.rect[0]-=A,i.right=!0):(i.rect[0]-=V,i.rect[2]+=V):V/A>=2?(i.rect[2]+=V,i.center=null):(i.rect[0]-=A,i.rect[2]+=A)):(r.items&&(r.rect[2]=(i.rect[0]+i.rect[2])/2),m.items&&(m.rect[0]=(i.rect[0]+i.rect[2])/2))})}(n),Ww(n,function(i,r){r.items&&(t=function nde(n,e){const t=n.rect,i=t[2]-t[0],r=t[3]-t[1];let m=0,A=0,V=0,X=t[2],ce=t[3],_e=t[0],Me=t[1];const Ve=[];let Je=!1;return Ww(n.items,function(rt,Ct){if(Ct.width>i||Ct.height>r||(m+Ct.width>i&&(A+=V,m=V=0),A+Ct.height>r))return Ve.push(null),Je=!0,e||!1;V=uz(V,Ct.height);const Xt=n.horInversion?t[2]-Ct.width-m:t[0]+m,On=n.verInversion?t[3]-Ct.height-A:t[1]+A;m+=Ct.width,X=sj(X,Xt),ce=sj(ce,On),_e=uz(_e,Xt+Ct.width),Me=uz(Me,On+Ct.height),Ve.push([Xt,On])}),(e||!Je)&&(m=0,n.right?m=t[2]-t[0]-_e+X:n.center&&(m=dz((t[2]-t[0]-_e+X)/2)),Ww(n.items,function(rt,Ct){const Xt=Ve[rt];Xt?Ct.item.locate(Xt[0]+m,Xt[1]):Ct.item.resize(null)}),n.rect=[X,ce,_e,Me],n.items=null),Je}(r,e)||t)}),t}function aj(n){const e=this;e._items=[],e._suspended=0,e._widget=n,e._updateLayout=function(){e._update()}}aj.prototype={constructor:aj,dispose:function(){this._items=this._updateLayout=null},setSize:function(n){this._canvas=n,this._update()},suspend:function(){++this._suspended},resume:function(){0==--this._suspended&&this._update()},addItem:function(n){this._items.push(n),n.updateLayout=this._updateLayout},removeItem:function(n){const e=this._items.indexOf(n);this._items.splice(e,1),n.updateLayout=null},_update:function(){let n;0===this._suspended&&(n=this._canvas,Ww(this._items,function(e,t){t.resize(n)}),this._widget.resolveItemsDeferred(this._items.filter(e=>e.getTemplatesGroups&&e.getTemplatesDef)),function ide(n,e){const t=function ede(n,e){const t=(n.right-n.left)/3,i=(n.bottom-n.top)/2,r=n.left,m=dz(r+t),A=dz(r+t+t),V=n.right,X=n.top,ce=dz(X+i),_e=n.bottom,Me=[{rect:[r,X,m,ce]},{rect:[m,X,A,ce],center:!0},{rect:[A,X,V,ce],horInversion:!0},{rect:[r,ce,m,_e],verInversion:!0},{rect:[m,ce,A,_e],center:!0,verInversion:!0},{rect:[A,ce,V,_e],horInversion:!0,verInversion:!0}],Ve=[[],[],[],[],[],[]];return Ww(e,function(Je,rt){const Ct=rt.getLayoutOptions();Ct&&Ve[function qce(n){return 3*Jce[n.verticalAlignment]+Qce[n.horizontalAlignment]}(Ct)].push({item:rt,width:Ct.width,height:Ct.height})}),Ww(Me,function(Je,rt){Ve[Je].length?rt.items=Ve[Je]:(rt.center?rt.rect[0]=rt.rect[2]=(rt.rect[0]+rt.rect[2])/2:rt.rect[rt.horInversion?0:2]=rt.rect[rt.horInversion?2:0],rt.rect[rt.verInversion?1:3]=rt.rect[rt.verInversion?3:1])}),Me}(n,e);j9(t)&&j9(t,!0)}({left:n.left,top:n.top,right:n.width+n.left,bottom:n.height+n.top},this._items))}};const zy=h.lQ,Vx=_.X,PV=w.__,ode=Array.prototype.concat,rde=[0,1,2,2],lj={none:null,single:-1,multiple:NaN},MV=Array.isArray,gC=Number,sde=String,ade=Math.abs,lde=Math.round,$S=Math.min,Pm=Math.max,cj=Math.sqrt;function dj(n){return n.reduce((e,t)=>t?[$S(e[0],t[0]),$S(e[1],t[1]),Pm(e[2],t[2]),Pm(e[3],t[3])]:e,n[0])}function K9(n,e){return(n[e]||{}).name}function uj(){}function hj(n){this.raw=n}function pz(n){this.raw=n}function pj(n){return MV(n.features)}function X9(n){n.text.attr({visibility:n.size[0]/n.spaceSize[0]<1&&n.size[1]/n.spaceSize[1]<1?null:"hidden"})}function Y9(n){n.text.attr({visibility:n.size[0]/n.spaceSize[0]<1||n.size[1]/n.spaceSize[1]<1?null:"hidden"})}function RV(n,e){return n.attribute(e)}uj.prototype.count=function(){return 0},hj.prototype={constructor:hj,count:function(){return this.raw.length},item:function(n){return this.raw[n]},geometry:function(n){return{coordinates:n.coordinates}},attributes:function(n){return n.attributes},getBBox:function(n){return 0===arguments.length?void 0:this.raw[n].bbox}},pz.prototype={constructor:pz,count:function(){return this.raw.features.length},item:function(n){return this.raw.features[n]},geometry:function(n){return n.geometry},attributes:function(n){return n.properties},getBBox:function(n){return 0===arguments.length?this.raw.bbox:this.raw.features[n].bbox}};const pde={Point:"marker",MultiPoint:"line",LineString:"line",MultiLineString:"line",Polygon:"area",MultiPolygon:"area"};function El(n,e){return void 0!==n?n:e}const Z9={setup:zy,reset:zy,arrange:zy,updateGrouping:zy,getDefaultColor:zy},hL={},gz={},kV={};let fz,gj;function jS(n,e,t,i){n[i].attr(e[i][t])}function Q9(n,e){const t=[];let i;const r=t.length=e.length;for(i=0;i<r;++i)t[i]=n.project(e[i]);return t}function _de(n,e){return[Q9(n,e)]}function fj(n,e){const t=[];let i;const r=t.length=e.length;for(i=0;i<r;++i)t[i]=Q9(n,e[i]);return t}function yde(n,e){const t=[];let i;const r=e.length;let m,A=0;for(t.length=2*r,i=0;i<r;++i)m=n.transform(e[i]),t[A++]=m[0],t[A++]=m[1];return t}function J9(n,e,t){const i=[];let r;const m=i.length=t.length;for(r=0;r<m;++r)i[r]=yde(e,t[r]);n.root.attr({points:i})}function q9(n,e){let m,t=0,i=e.length-1,r=-1;if(e[t]<=n&&n<=e[i])if(n===e[i])r=i-1;else{for(;i-t>1;)m=t+i>>1,n<e[m]?i=m:t=m;r=t}return r}function eX(n,e,t,i){n.params.eventTrigger(i,{target:e.proxy,state:t})}function mj(n,e){const t=Vx({},n,e);return t.label=Vx({},n.label,t.label),t.label.font=Vx({},n.label.font,t.label.font),t}function wde(n,e){return n.attribute(e)}hL.area={projectLabel:function Pde(n){let e;const t=n.length;let i,r,m=0;for(e=0;e<t;++e)i=Ade(n[e]),i.area>m&&(m=i.area,r=i);return r?[r.center,[cj(r.area),cj(r.area)]]:[[],[]]},transform:J9,transformLabel:function bde(n,e,t){const i=e.transform(t[0]);n.spaceSize=e.getSquareSize(t[1]),n.text.attr({translateX:i[0],translateY:i[1]}),X9(n)},draw:function(n,e,t){e.root=n.renderer.path([],"area").data(n.dataKey,t)},refresh:zy,getLabelOffset:function(n){return X9(n),[0,0]},getStyles:function(n){const e=n.color||null,t=n.borderColor||null,i=El(n.borderWidth,null),r=El(n.opacity,null);return{root:[{class:"dxm-area",stroke:t,"stroke-width":i,fill:e,opacity:r},{class:"dxm-area dxm-area-hovered",stroke:n.hoveredBorderColor||t,"stroke-width":El(n.hoveredBorderWidth,i),fill:n.hoveredColor||e,opacity:El(n.hoveredOpacity,r)},{class:"dxm-area dxm-area-selected",stroke:n.selectedBorderColor||t,"stroke-width":El(n.selectedBorderWidth,i),fill:n.selectedColor||e,opacity:El(n.selectedOpacity,r)}]}},setState:function(n,e,t){jS(n,e,t,"root")},hasLabelsGroup:!0,updateGrouping:function(n){fz(n)},getDefaultColor:zy},hL.line={projectLabel:function Mde(n){let e;const t=n.length;let r,m,i=0;for(e=0;e<t;++e)r=Ide(n[e]),r[2]>i&&(i=r[2],m=r);return m||[[],[]]},transform:J9,transformLabel:function xde(n,e,t){const i=e.transform(t[0]);n.spaceSize=e.getSquareSize(t[1]),n.text.attr({translateX:i[0],translateY:i[1]}),Y9(n)},draw:function(n,e,t){e.root=n.renderer.path([],"line").data(n.dataKey,t)},refresh:zy,getLabelOffset:function(n){return Y9(n),[0,0]},getStyles:function(n){const e=n.color||n.borderColor||null,t=El(n.borderWidth,null),i=El(n.opacity,null);return{root:[{class:"dxm-line",stroke:e,"stroke-width":t,opacity:i},{class:"dxm-line dxm-line-hovered",stroke:n.hoveredColor||n.hoveredBorderColor||e,"stroke-width":El(n.hoveredBorderWidth,t),opacity:El(n.hoveredOpacity,i)},{class:"dxm-line dxm-line-selected",stroke:n.selectedColor||n.selectedBorderColor||e,"stroke-width":El(n.selectedBorderWidth,t),opacity:El(n.selectedOpacity,i)}]}},setState:function(n,e,t){jS(n,e,t,"root")},hasLabelsGroup:!0,updateGrouping:function(n){fz(n)},getDefaultColor:zy},hL.marker={project:function mde(n,e){return n.project(e)},transform:function Cde(n,e,t){const i=e.transform(t);n.root.attr({translateX:i[0],translateY:i[1]})},draw:function(n,e,t){e.root=n.renderer.g(),this._draw(n,e,t)},refresh:zy,hasLabelsGroup:!1,getLabelOffset:function(n,e){return[lde((n.size[0]+Pm(e.size||0,0))/2)+2,0]},getStyles:function(n){const e={root:[{class:"dxm-marker"},{class:"dxm-marker dxm-marker-hovered"},{class:"dxm-marker dxm-marker-selected"}]};return this._getStyles(e,n),e},setState:function(n,e,t){jS(n,e,t,"root"),this._setState(n,e,t)},updateGrouping:function(n){fz(n),gj(n)},getDefaultColor:function(n,e){return n.params.themeManager.getAccentColor(e)}},gz.area=function(n){return{project:(e,t)=>t[0]&&t[0][0]&&t[0][0][0]&&"number"==typeof t[0][0][0][0]?function vde(n,e){const t=[];let i;const r=t.length=e.length;for(i=0;i<r;++i)t[i]=fj(n,e[i]);return ode.apply([],t)}(e,t):fj(e,t)}},gz.line=function(n){const e=n.coordinates;return{project:e[0]&&e[0][0]&&"number"==typeof e[0][0][0]?fj:_de}},kV.marker={_default:"dot",dot:{setup:function(n){n.filter=n.renderer.shadowFilter("-40%","-40%","180%","200%",0,1,1,"#000000",.2)},reset:function(n){n.filter.dispose(),n.filter=null},_draw:function(n,e,t){e.back=n.renderer.circle().sharp().data(n.dataKey,t).append(e.root),e.dot=n.renderer.circle().sharp().data(n.dataKey,t).append(e.root)},refresh:function(n,e,t,i,r){e.dot.attr({filter:r.shadow?n.filter.id:null})},_getStyles:function(n,e){const t=e.size>0?gC(e.size):0,i=t,r=t+(e.selectedStep>0?gC(e.selectedStep):0),m=i+(e.backStep>0?gC(e.backStep):0),A=r+(e.backStep>0?gC(e.backStep):0),V=e.color||null,X=e.borderColor||null,ce=El(e.borderWidth,null),_e=El(e.opacity,null),Me=e.backColor||null,Ve=El(e.backOpacity,null);n.dot=[{r:t/2,stroke:X,"stroke-width":ce,fill:V,opacity:_e},{r:i/2,stroke:e.hoveredBorderColor||X,"stroke-width":El(e.hoveredBorderWidth,ce),fill:e.hoveredColor||V,opacity:El(e.hoveredOpacity,_e)},{r:r/2,stroke:e.selectedBorderColor||X,"stroke-width":El(e.selectedBorderWidth,ce),fill:e.selectedColor||V,opacity:El(e.selectedOpacity,_e)}],n.back=[{r:t/2,stroke:"none","stroke-width":0,fill:Me,opacity:Ve},{r:m/2,stroke:"none","stroke-width":0,fill:Me,opacity:Ve},{r:A/2,stroke:"none","stroke-width":0,fill:Me,opacity:Ve}]},_setState:function(n,e,t){jS(n,e,t,"dot"),jS(n,e,t,"back")}},bubble:{_draw:function(n,e,t){e.bubble=n.renderer.circle().sharp().data(n.dataKey,t).append(e.root)},refresh:function(n,e,t,i,r){e.bubble.attr({r:r.size/2})},_getStyles:function(n,e){const t=e.color||null,i=e.borderColor||null,r=El(e.borderWidth,null),m=El(e.opacity,null);n.bubble=[{stroke:i,"stroke-width":r,fill:t,opacity:m},{stroke:e.hoveredBorderColor||i,"stroke-width":El(e.hoveredBorderWidth,r),fill:e.hoveredColor||e.color,opacity:El(e.hoveredOpacity,m)},{stroke:e.selectedBorderColor||i,"stroke-width":El(e.selectedBorderWidth,r),fill:e.selectedColor||e.color,opacity:El(e.selectedOpacity,m)}]},_setState:function(n,e,t){jS(n,e,t,"bubble")},arrange:function(n,e){const t=[];let i;const r=t.length=e.length,m=n.settings,A=m.dataField,V=m.minSize>0?gC(m.minSize):0,X=m.maxSize>V?gC(m.maxSize):V;if(m.sizeGroups)return;for(i=0;i<r;++i)t[i]=Pm(RV(e[i].proxy,A)||0,0);const ce=$S.apply(null,t),Me=Pm.apply(null,t)-ce||1,Ve=X-V;for(i=0;i<r;++i)e[i]._settings.size=V+Ve*(t[i]-ce)/Me},updateGrouping:function(n){const e=n.settings.dataField;hL.marker.updateGrouping(n),gj(n,function(t){return RV(t,e)})}},pie:{_draw:function(n,e,t){e.pie=n.renderer.g().append(e.root),e.border=n.renderer.circle().sharp().data(n.dataKey,t).append(e.root)},refresh:function(n,e,t,i,r){const m=RV(i,n.settings.dataField)||[],A=r._colors;let V=0;const X=e.pie,ce=n.renderer,_e=n.dataKey,Me=(r.size>0?gC(r.size):0)/2;let Ve=90,Je=Ve,rt=!1;V=m.reduce(function(Ct,Xt){return Ct+(Xt||0)},0),0===V&&(rt=!0,V=360/m.length),m.forEach(function(Ct,Xt){Ve=Je,Je+=rt?V:(Ct||0)/V*360,ce.arc(0,0,0,Me,Ve,Je).attr({"stroke-linejoin":"round",fill:A[Xt]}).data(_e,t).append(X)}),e.border.attr({r:Me})},_getStyles:function(n,e){const t=El(e.opacity,null),i=e.borderColor||null,r=El(e.borderWidth,null);n.pie=[{opacity:t},{opacity:El(e.hoveredOpacity,t)},{opacity:El(e.selectedOpacity,t)}],n.border=[{stroke:i,"stroke-width":r},{stroke:e.hoveredBorderColor||i,"stroke-width":El(e.hoveredBorderWidth,r)},{stroke:e.selectedBorderColor||i,"stroke-width":El(e.selectedBorderWidth,r)}]},_setState:function(n,e,t){jS(n,e,t,"pie"),jS(n,e,t,"border")},arrange:function(n,e){let t;const i=e.length,r=n.settings.dataField;let m,V,A=0;for(t=0;t<i;++t)m=RV(e[t].proxy,r),m&&m.length>A&&(A=m.length);A>0&&(V=n.params.themeManager.createPalette(n.settings.palette,{useHighlight:!0,extensionMode:"alternate"}),m=V.generateColors(A),n.settings._colors=m,n.grouping.color={callback:zy,field:"",partition:[],values:[]},n.params.dataExchanger.set(n.name,"color",{partition:[],values:m}))}},image:{_draw:function(n,e,t){e.image=n.renderer.image(null,null,null,null,null,"center").attr({"pointer-events":"visible"}).data(n.dataKey,t).append(e.root)},refresh:function(n,e,t,i){e.image.attr({href:RV(i,n.settings.dataField)})},_getStyles:function(n,e){const t=e.size>0?gC(e.size):0,i=t+(e.hoveredStep>0?gC(e.hoveredStep):0),r=t+(e.selectedStep>0?gC(e.selectedStep):0),m=El(e.opacity,null);n.image=[{x:-t/2,y:-t/2,width:t,height:t,opacity:m},{x:-i/2,y:-i/2,width:i,height:i,opacity:El(e.hoveredOpacity,m)},{x:-r/2,y:-r/2,width:r,height:r,opacity:El(e.selectedOpacity,m)}]},_setState:function(n,e,t){jS(n,e,t,"image")}}};let tX=function(n,e,t,i,r){let m;i&&e&&e.length>1&&(m=r(e.length-1),n.grouping[t]={callback:(0,C.Tn)(i)?i:wde,field:i,partition:e,values:m},n.params.dataExchanger.set(n.name,t,{partition:e,values:m,defaultColor:n.settings.color}))};function nX(n){const e=n.name,t=n.params.dataExchanger;PV(n.grouping,function(i){t.set(e,i,null)}),n.grouping={}}function _j(n,e,t){return t?n|=e:n&=~e,n}function vj(n,e){return!!(n&e)}fz=function(n){tX(n,n.settings.colorGroups,"color",n.settings.colorGroupingField,function(e){const t=n.params.themeManager.createDiscretePalette(n.settings.palette,e);let i;const r=[];for(i=0;i<e;++i)r.push(t.getColor(i));return r})},gj=function(n,e){const t=n.settings;tX(n,t.sizeGroups,"size",e||t.sizeGroupingField,function(i){const r=t.minSize>0?gC(t.minSize):0,m=t.maxSize>=r?gC(t.maxSize):0;let A=0;const V=[];if(i>1)for(A=0;A<i;++A)V.push((r*(i-A-1)+m*A)/(i-1));else 1===i&&V.push((r+m)/2);return V})};let mz,Cj=function(n,e,t,i){this._params=n,this._onProjection(),this.proxy=function Tde(n,e,t){const i={index:t,name:e,getElements:function(){return n.getProxies()},clearSelection:function(r){return n.clearSelection(r),i},getDataSource:function(){return n.getDataSource()},getBounds:()=>n.getBounds()};return i}(this,t,i),this._context={name:t,layer:this.proxy,renderer:n.renderer,projection:n.projection,params:n,dataKey:n.dataKey,str:Z9,hover:!1,selection:null,grouping:{},root:n.renderer.g().attr({class:"dxm-layer"}).linkOn(e,t).linkAppend()},this._container=e,this._options={},this._handles=[],this._data=new uj,this._dataSourceLoaded=null};function Ade(n){let e;const t=n.length;let i,m,r=n[t-1],A=0,V=0,X=0,ce=1/0,_e=-1/0,Me=1/0,Ve=-1/0;for(e=0;e<t;++e)i=r,r=n[e],m=i[0]*r[1]-r[0]*i[1],X+=m,A+=(i[0]+r[0])*m,V+=(i[1]+r[1])*m,ce=$S(ce,r[0]),_e=Pm(_e,r[0]),Me=$S(Me,r[1]),Ve=Pm(Ve,r[1]);return{area:ade(X)/2,center:[2*A/3/X-(ce+_e)/2,2*V/3/X-(Me+Ve)/2]}}function Ide(n){let e;const t=n.length;let i,r=n[0]||[],m=0;const A=[0];let V=r[0],X=r[0],ce=r[1],_e=r[1];for(e=1;e<t;++e)i=r,r=n[e],m+=cj((i[0]-r[0])*(i[0]-r[0])+(i[1]-r[1])*(i[1]-r[1])),A[e]=m,V=$S(V,r[0]),X=Pm(X,r[0]),ce=$S(ce,r[1]),_e=Pm(_e,r[1]);e=q9(m/2,A),i=n[e],r=n[e+1];const Me=(m/2-A[e])/(A[e+1]-A[e]);return t?[[i[0]*(1-Me)+r[0]*Me,i[1]*(1-Me)+r[1]*Me],[X-V,_e-ce],m]:[]}function yj(n){const e=n.renderer;this._params=n,this._layers=[],this._layerByName={},this._rect=[0,0,0,0],this._clip=e.clipRect(),this._background=e.rect().attr({class:"dxm-background"}).data(n.dataKey,{name:"background"}).append(e.root),this._container=e.g().attr({class:"dxm-layers","clip-path":this._clip.id}).append(e.root).enableLinks(),this._subscribeToTracker(n.tracker,e,n.eventTrigger),this._dataReady=n.dataReady}function bj(n){this._subscribeToTracker(n.tracker,n.tooltip,n.layerCollection)}Cj.prototype=Vx({constructor:Cj,getDataReadyCallback(){return this._dataSourceLoaded},_onProjection:function(){const n=this;n._removeHandlers=n._params.projection.on({engine:function(){n._project()},screen:function(){n._transform()},center:function(){n._transformCore()},zoom:function(){n._transform()}})},getData(){return this._data},_dataSourceLoadErrorHandler:function(){this._dataSourceChangedHandler()},_dataSourceChangedHandler:function(){this._data=function dde(n){let e;return n&&(pj(n)?e=pz:1===n.length&&n[0]&&pj(n[0])?(e=pz,n=n[0]):MV(n)&&(e=hj)),e=e||uj,new e(n)}(this._dataSource&&this._dataSource.items()),this._update(!0)},_dataSourceOptions:function(){return{paginate:!1}},_getSpecificDataSourceOption:function(){return this._specificDataSourceOption},_normalizeDataSource:function(n){const e=n.store();return"raw"===e._loadMode&&(e._loadMode=void 0),n},_offProjection:function(){this._removeHandlers(),this._removeHandlers=null},dispose:function(){return this._disposeDataSource(),this._destroyHandles(),nX(this._context),this._context.root.linkRemove().linkOff(),this._context.labelRoot&&this._context.labelRoot.linkRemove().linkOff(),this._context.str.reset(this._context),this._offProjection(),this._params=this._container=this._context=this.proxy=null,this},setOptions:function(n){const e=this;n=e._options=n||{},e._dataSourceLoaded=new g.cY,"dataSource"in n&&n.dataSource!==e._options_dataSource?(e._options_dataSource=n.dataSource,e._params.notifyDirty(),e._specificDataSourceOption=function ude(n){return n?pj(n)?[n]:n:[]}(n.dataSource),e._refreshDataSource()):e._data.count()>0&&(e._params.notifyDirty(),e._update(void 0!==n.type&&n.type!==e._context.str.type||void 0!==n.elementType&&n.elementType!==e._context.str.elementType)),e._transformCore()},_update:function(n){const e=this,t=e._context;n&&(t.str.reset(t),t.root.clear(),t.labelRoot&&t.labelRoot.clear(),e._params.tracker.reset(),e._destroyHandles(),t.str=function(n,e){let r,t=Wi(n.type),i=Wi(n.elementType);const m=Vx({},Z9);return e.count()>0&&(r=e.geometry(e.item(0)),t=hL[t]?t:function gde(n){let e=pde[n.type];const t=n.coordinates;return e||(e="number"==typeof t[0]?"marker":"number"==typeof t[0][0]?"line":"area"),e}(r),Vx(m,hL[t]),m.fullType=m.type=t,gz[t]&&Vx(m,gz[t](r)),kV[t]&&(i=kV[t][i]?i:kV[t]._default,Vx(m,kV[t][i]),m.elementType=i,m.fullType+=":"+i)),m}(e._options,e._data),t.str.setup(t),e.proxy.type=t.str.type,e.proxy.elementType=t.str.elementType),t.settings=function Ode(n,e){const t=n.params.themeManager,i=n.str,r=mj(Vx({label:{},color:i.getDefaultColor(n,e.palette)},t.theme("layer:"+i.fullType)),e);let m,A,V;if(r.paletteSize>0){for(V=t.createDiscretePalette(r.palette,r.paletteSize),A=0,m=[];A<r.paletteSize;++A)m.push(V.getColor(A));r._colors=m}return r}(t,e._options),t.hasSeparateLabel=!(!t.settings.label.enabled||!t.str.hasLabelsGroup),t.hover=!!mn(t.settings.hoverEnabled,!0),t.selection&&PV(t.selection.state,function(i,r){r&&r.resetSelected()}),t.selection=function cde(n){let e=Wi(n);return e=e in lj?lj[e]:lj.single,null!==e&&(e={state:{},single:e}),e}(t.settings.selectionMode),t.hasSeparateLabel?t.labelRoot||(t.labelRoot=t.renderer.g().attr({class:"dxm-layer-labels"}).linkOn(e._container,{name:t.name+"-labels",after:t.name}).linkAppend(),e._transformCore()):t.labelRoot&&(t.labelRoot.linkRemove().linkOff(),t.labelRoot=null),n&&e._createHandles(),nX(t),t.str.arrange(t,e._handles),t.str.updateGrouping(t),e._updateHandles(),e._params.notifyReady(),e._dataSourceLoaded?(e._dataSourceLoaded.resolve(),e._dataSourceLoaded=null):e._params.dataReady()},getBounds(){return dj(this._handles.map(n=>{let{proxy:e}=n;return e.coordinates().map(t=>{if(!MV(t))return;const i=MV(t[0][0])?t.reduce((m,A)=>m.concat(A),[]):t,r=i[0];return i.reduce((m,A)=>[$S(m[0],A[0]),$S(m[1],A[1]),Pm(m[2],A[0]),Pm(m[3],A[1])],[r[0],r[1],r[0],r[1]])})}).map(dj))},_destroyHandles(){this._handles.forEach(n=>n.dispose()),this._context.selection&&(this._context.selection.state={}),this._handles=[]},_createHandles:function(){const n=this._handles=[],e=this._data;let t;const i=n.length=e.count(),r=this._context,m=e.geometry,A=e.attributes;let V,X;for(t=0;t<i;++t)X=e.item(t),n[t]=new mz(r,t,m(X),A(X));for((0,C.Tn)(this._options.customize)&&function hde(n,e,t){e.call(t,n)}(this.getProxies(),this._options.customize,this._params.widget),t=0;t<i;++t)V=n[t],V.project(),V.draw(),V.transform();r.selection&&PV(r.selection.state,function(ce,_e){_e&&_e.restoreSelected()})},_updateHandles:function(){const n=this._handles;let e;const t=n.length;for(e=0;e<t;++e)n[e].refresh();if(this._context.settings.label.enabled){for(e=0;e<t;++e)n[e].measureLabel();for(e=0;e<t;++e)n[e].adjustLabel()}},_transformCore:function(){const n=this._params.projection.getTransform();this._context.root.attr(n),this._context.labelRoot&&this._context.labelRoot.attr(n)},_project:function(){const n=this._handles;let e;const t=n.length;for(e=0;e<t;++e)n[e].project()},_transform:function(){const n=this._handles;let e;const t=n.length;for(this._transformCore(),e=0;e<t;++e)n[e].transform()},getProxies(){return this._handles.map(n=>n.proxy)},getProxy:function(n){return this._handles[n].proxy},raiseClick:function(n,e){this._params.eventTrigger("click",{target:this._handles[n].proxy,event:e})},hoverItem:function(n,e){this._handles[n].setHovered(e)},selectItem:function(n,e,t){this._handles[n].setSelected(e,t)},clearSelection:function(){const n=this._context.selection;n&&(PV(n.state,function(e,t){t&&t.setSelected(!1)}),n.state={})}},Do.A),mz=function(n,e,t,i){const r=this.proxy=function Dde(n,e,t){const i={coordinates:function(){return e},attribute:function(r,m){return arguments.length>1?(t[r]=m,i):arguments.length>0?t[r]:t},selected:function(r,m){return arguments.length>0?(n.setSelected(r,m),i):n.isSelected()},applySettings:function(r){return n.update(r),i}};return i}(this,t.coordinates,Vx({},i));this._ctx=n,this._index=e,this._fig=this._label=null,this._state=0,this._coordinates=t.coordinates,this._settings={label:{}},r.index=e,r.layer=n.layer,this._data={name:n.name,index:e}},mz.prototype={constructor:mz,dispose:function(){return this._ctx=this.proxy=this._settings=this._fig=this._label=this.data=null,this},project:function(){const n=this._ctx;this._projection=n.str.project(n.projection,this._coordinates),n.hasSeparateLabel&&this._label&&this._projectLabel()},_projectLabel:function(){this._labelProjection=this._ctx.str.projectLabel(this._projection)},draw:function(){const n=this._ctx;n.str.draw(n,this._fig={},this._data),this._fig.root.append(n.root)},transform:function(){const n=this,e=n._ctx;e.str.transform(n._fig,e.projection,n._projection),e.hasSeparateLabel&&n._label&&n._transformLabel()},_transformLabel:function(){this._ctx.str.transformLabel(this._label,this._ctx.projection,this._labelProjection)},refresh:function(){const n=this._ctx.str,e=function Sde(n,e,t){const i=mj(n.settings,t);return function Ede(n,e,t){PV(n,function(i,r){const m=q9(r.callback(e,r.field),r.partition);m>=0&&(t[i]=r.values[m])})}(n.grouping,e,i),void 0===t.color&&t.paletteIndex>=0&&(i.color=i._colors[t.paletteIndex]),i}(this._ctx,this.proxy,this._settings);this._styles=n.getStyles(e),n.refresh(this._ctx,this._fig,this._data,this.proxy,e),this._refreshLabel(e),this._setState()},_refreshLabel:function(n){const e=this,t=e._ctx,i=n.label;let r=e._label;t.settings.label.enabled?(r||(r=e._label={root:t.labelRoot||e._fig.root,text:t.renderer.text().attr({class:"dxm-label"}),size:[0,0]},t.hasSeparateLabel&&(e._projectLabel(),e._transformLabel())),r.value=sde(e.proxy.text||e.proxy.attribute(i.dataField)||""),r.value&&(r.text.attr({text:r.value,x:0,y:0}).css(Ti(i.font)).attr({align:"center",stroke:i.stroke,"stroke-width":i["stroke-width"],"stroke-opacity":i["stroke-opacity"]}).data(t.dataKey,e._data).append(r.root),r.settings=n)):r&&(r.text.remove(),e._label=null)},measureLabel:function(){const n=this._label;let e;n.value&&(e=n.text.getBBox(),n.size=[e.width,e.height,-e.y-e.height/2])},adjustLabel:function(){const n=this._label;let e;n.value&&(e=this._ctx.str.getLabelOffset(n,n.settings),n.settings=null,n.text.attr({x:e[0],y:e[1]+n.size[2]}))},update:function(n){const e=this;e._settings=mj(e._settings,n),e._fig&&(e.refresh(),e._label&&e._label.value&&(e.measureLabel(),e.adjustLabel()))},_setState:function(){this._ctx.str.setState(this._fig,this._styles,rde[this._state])},_setForeground:function(){const n=this._fig.root;this._state?n.toForeground():n.toBackground()},setHovered:function(n){const e=this,t=vj(e._state,1),i=!!n;return e._ctx.hover&&t!==i&&(e._state=_j(e._state,1,i),e._setState(),e._setForeground(),eX(e._ctx,e,i,"hoverChanged")),e},setSelected:function(n,e){const t=this,i=vj(t._state,2),r=!!n,m=t._ctx.selection;let A;m&&i!==r&&(t._state=_j(t._state,2,r),A=m.state[m.single],m.state[m.single]=null,A&&A.setSelected(!1),m.state[m.single||t._index]=n?t:null,t._fig&&(t._setState(),t._setForeground(),e||eX(t._ctx,t,r,"selectionChanged")))},isSelected:function(){return vj(this._state,2)},resetSelected:function(){this._state=_j(this._state,2,!1)},restoreSelected:function(){this._fig.root.toForeground()}},yj.prototype={constructor:yj,dispose:function(){this._clip.dispose(),this._layers.forEach(n=>n.dispose()),this._offTracker(),this._params=this._offTracker=this._layers=this._layerByName=this._clip=this._background=this._container=null},_subscribeToTracker:function(n,e,t){const i=this;i._offTracker=n.on({click:function(r){const m=e.getRootOffset(),A=i.byName(r.data.name);r.$event.x=r.x-m.left,r.$event.y=r.y-m.top,A?A.raiseClick(r.data.index,r.$event):"background"===r.data.name&&t("click",{event:r.$event})},"hover-on":function(r){const m=i.byName(r.data.name);m&&m.hoverItem(r.data.index,!0)},"hover-off":function(r){const m=i.byName(r.data.name);m&&m.hoverItem(r.data.index,!1)}})},setOptions(n){const e=this,t=n?MV(n)?n:[n]:[];let i=e._layers,r=[];if(t.length!==i.length||i.some((A,V)=>{const X=K9(t,V);return(0,C.O9)(X)&&X!==A.proxy.name})){e._params.tracker.reset(),e._layers.forEach(V=>V.dispose());const A=e._layerByName={};e._layers=i=[];for(let V=0,X=t.length;V<X;++V){const ce=K9(t,V)||"map-layer-"+V,_e=i[V]=new Cj(e._params,e._container,ce,V);A[ce]=_e}}i.forEach((A,V)=>{A.setOptions(t[V])}),r=i.map(A=>A.getDataReadyCallback()),r.length&&g.z7.apply(void 0,r).done(e._dataReady)},_updateClip:function(){const n=this._rect,e=this._borderWidth;this._clip.attr({x:n[0]+e,y:n[1]+e,width:Pm(n[2]-2*e,0),height:Pm(n[3]-2*e,0)})},setBackgroundOptions:function(n){this._background.attr({stroke:n.borderColor,"stroke-width":n.borderWidth,fill:n.color}),this._borderWidth=Pm(n.borderWidth,0),this._updateClip()},setRect:function(n){this._rect=n,this._background.attr({x:n[0],y:n[1],width:n[2],height:n[3]}),this._updateClip()},byIndex:function(n){return this._layers[n]},byName:function(n){return this._layerByName[n]},items:function(){return this._layers}},bj.prototype={constructor:bj,dispose:function(){this._offTracker(),this._offTracker=null},_subscribeToTracker:function(n,e,t){this._offTracker=n.on({"focus-on":function(i){let r,m;if(e.isEnabled()){r=t.byName(i.data.name),m=r&&r.getProxy(i.data.index);const A=V=>{V&&i.done(V)};m&&A(e.show(m,{x:i.x,y:i.y,offset:12},{target:m},void 0,A))}},"focus-move":function(i){e.move(i.x,i.y,12)},"focus-off":function(){e.hide()}})}};let Rde=1;const Lde=Math.min,Bde=Math.max,Nde=Math.sin,Fde=Math.asin,iX=Math.tan,_z=Math.atan,vz=Math.exp,oX=Math.log,fC=Math.PI,rX=fC/4,$w=fC/180,Vde=(2*_z(vz(fC))-fC/2)/$w,Hde=(2.5*_z(vz(.8*fC))-.625*fC)/$w;function Cz(n,e){return Bde(Lde(n,+e),-e)}Bf.add("mercator",Bf({aspectRatio:1,to:function(n){return[n[0]/180,oX(iX(rX+Cz(n[1],Vde)*$w/2))/fC]},from:function(n){return[180*n[0],(2*_z(vz(n[1]*fC))-fC/2)/$w]}})),Bf.add("equirectangular",Bf({aspectRatio:2,to:function(n){return[n[0]/180,n[1]/90]},from:function(n){return[180*n[0],90*n[1]]}})),Bf.add("lambert",Bf({aspectRatio:2,to:function(n){return[n[0]/180,Nde(Cz(n[1],90)*$w)]},from:function(n){return[180*n[0],Fde(Cz(n[1],1))/$w]}})),Bf.add("miller",Bf({aspectRatio:1,to:function(n){return[n[0]/180,1.25*oX(iX(rX+Cz(n[1],Hde)*$w*.4))/fC]},from:function(n){return[180*n[0],(2.5*_z(vz(.8*n[1]*fC))-.625*fC)/$w]}}));const Ude=/^layers/,zde=/\.dataSource$/;function sX(n,e){return e?[Math.min(e[0],e[2],n[0]),Math.min(e[1],e[3],n[3]),Math.max(e[0],e[2],n[2]),Math.max(e[1],e[3],n[1])]:n}const xP=Vh.inherit({_eventsMap:{onClick:{name:"click"},onCenterChanged:{name:"centerChanged"},onZoomFactorChanged:{name:"zoomFactorChanged"},onHoverChanged:{name:"hoverChanged"},onSelectionChanged:{name:"selectionChanged"}},_rootClassPrefix:"dxm",_rootClass:"dxm-vector-map",_themeSection:"map",_fontFields:["layer:area.label.font","layer:marker:dot.label.font","layer:marker:bubble.label.font","layer:marker:pie.label.font","layer:marker:image.label.font","legend.font","legend.title.font","legend.title.subtitle.font"],_initLayerCollection:function(n){const e=this;e._layerCollection=new yj({renderer:e._renderer,projection:e._projection,themeManager:e._themeManager,tracker:e._tracker,dataKey:n,eventTrigger:e._eventTrigger,dataExchanger:e._dataExchanger,tooltip:e._tooltip,notifyDirty:e._notifyDirty,notifyReady:e._notifyReady,dataReady(){let t;if(e.option("getBoundsFromData")&&!e.option("bounds")&&(e._preventProjectionEvents(),t=e._getBoundsFromData(),e._projection.setBounds(t),e._allowProjectionEvents()),!e.option("projection")&&(t=t||e._getBoundsFromData(),Math.ceil(t[0])<-180||Math.ceil(t[3])<-90||Math.floor(t[2])>180||Math.floor(t[1])>90)){const i=t[2]-t[0],r=t[1]-t[3];e._projection.setEngine({to:m=>[2*(m[0]-t[0])/i-1,2*(m[1]-t[3])/r-1],from:m=>[(m[0]+1)*i/2+t[0],(m[1]+1)*r/2+t[3]]})}}})},_getBoundsFromData(){let n=this._getBoundingBoxFromDataSource();if(!n){const t=dj(this.getLayers().map(i=>i.getBounds()).filter(i=>void 0!==i));t&&(n=t)}return n=n||[],n=[n[0],n[3],n[2],n[1]],n},_initLegendsControl:function(){this._legendsControl=new rj({renderer:this._renderer,container:this._root,widget:this,layoutControl:this._layoutControl,themeManager:this._themeManager,dataExchanger:this._dataExchanger,notifyDirty:this._notifyDirty,notifyReady:this._notifyReady})},_initControlBar:function(n){this._controlBar=new q$({renderer:this._renderer,container:this._root,layoutControl:this._layoutControl,projection:this._projection,tracker:this._tracker,dataKey:n})},_initElements:function(){const n=this,e=function kde(){return"vectormap-data-"+Rde++}();let i,t=0;n._preventProjectionEvents=function(){i=!0},n._allowProjectionEvents=function(){i=!1},n._notifyDirty=function(){n._resetIsReady(),++t},n._notifyReady=function(){n._allowProjectionEvents(),0==--t&&n._drawn()},n._preventProjectionEvents(),n._dataExchanger=new ij,n._projection=new qU({centerChanged:function(r){i||n._eventTrigger("centerChanged",{center:r})},zoomChanged:function(r){i||n._eventTrigger("zoomFactorChanged",{zoomFactor:r})}}),n._tracker=new lz({root:n._root,projection:n._projection,dataKey:e}),n._gestureHandler=new ej({projection:n._projection,renderer:n._renderer,tracker:n._tracker}),n._layoutControl=new aj(n),n._layoutControl.suspend(),n._initLayerCollection(e),n._createHtmlStructure(),n._initControlBar(e),n._initLegendsControl(),n._prepareExtraElements(),n._tooltipViewer=new bj({tracker:n._tracker,tooltip:n._tooltip,layerCollection:n._layerCollection})},_change_RESUME_LAYOUT:function(){this._layoutControl.resume()},_initialChanges:["PROJECTION","RESUME_LAYOUT","LAYOUT_INIT","BOUNDS","MAX_ZOOM_FACTOR","ZOOM_FACTOR","CENTER"],_layoutChangesOrder:["RESUME_LAYOUT","LAYERS"],_customChangesOrder:["EXTRA_ELEMENTS"],_initCore:function(){this._root=this._renderer.root.attr({align:"center",cursor:"default"}),this._initElements()},_disposeCore:function(){this._controlBar.dispose(),this._gestureHandler.dispose(),this._tracker.dispose(),this._legendsControl.dispose(),this._layerCollection.dispose(),this._layoutControl.dispose(),this._tooltipViewer.dispose(),this._dataExchanger.dispose(),this._projection.dispose(),this._dataExchanger=this._gestureHandler=this._projection=this._tracker=this._layoutControl=this._root=this._layerCollection=this._controlBar=this._legendsControl=null},_setupInteraction:function(){const n={centeringEnabled:!!mn(this._getOption("panningEnabled",!0),!0),zoomingEnabled:!!mn(this._getOption("zoomingEnabled",!0),!0)};this._gestureHandler.setInteraction(n),this._controlBar.setInteraction(n)},_getDefaultSize:function(){return{width:800,height:400}},_applySize:function(n){const e={left:n[0],top:n[1],width:n[2]-n[0],height:n[3]-n[1],right:0,bottom:0};this._projection.setSize(e),this._layoutControl.setSize(e),this._layerCollection.setRect([e.left,e.top,e.width,e.height]),this._requestChange(["EXTRA_ELEMENTS"])},_optionChanging:function(n,e,t){e&&t&&Ude.test(n)&&(e.dataSource&&t.dataSource&&e!==t?e.dataSource=null:zde.test(n)&&this.option(n,null))},_applyChanges:function(){this._notifyDirty(),this.callBase.apply(this,arguments),this._notifyReady()},_optionChangesMap:{background:"BACKGROUND",layers:"LAYERS",extraElements:"EXTRA_ELEMENTS",controlBar:"CONTROL_BAR",legends:"LEGENDS",touchEnabled:"TRACKER",wheelEnabled:"TRACKER",panningEnabled:"INTERACTION",zoomingEnabled:"INTERACTION",projection:"PROJECTION",bounds:"BOUNDS",maxZoomFactor:"MAX_ZOOM_FACTOR",zoomFactor:"ZOOM_FACTOR",center:"CENTER"},_optionChangesOrder:["PROJECTION","BOUNDS","MAX_ZOOM_FACTOR","ZOOM_FACTOR","CENTER","BACKGROUND","CONTROL_BAR","LEGENDS","TRACKER","INTERACTION"],_change_PROJECTION:function(){this._setProjection()},_change_BOUNDS:function(){this._setBounds()},_change_MAX_ZOOM_FACTOR:function(){this._setMaxZoom()},_change_ZOOM_FACTOR:function(){this._setZoom()},_change_CENTER:function(){this._setCenter()},_change_BACKGROUND:function(){this._setBackgroundOptions()},_change_LAYERS:function(){this._setLayerCollectionOptions()},_change_CONTROL_BAR:function(){this._setControlBarOptions()},_change_EXTRA_ELEMENTS:function(){this._renderExtraElements()},_change_LEGENDS:function(){this._setLegendsOptions()},_change_TRACKER:function(){this._setTrackerOptions()},_change_INTERACTION:function(){this._setupInteraction()},_themeDependentChanges:["BACKGROUND","LAYERS","CONTROL_BAR","LEGENDS","TRACKER","INTERACTION"],_setProjection:function(){this._projection.setEngine(this.option("projection"))},_setBounds:function(){this._projection.setBounds(this.option("bounds"))},_setMaxZoom:function(){this._projection.setMaxZoom(this.option("maxZoomFactor"))},_setZoom:function(){this._projection.setZoom(this.option("zoomFactor"))},_setCenter:function(){this._projection.setCenter(this.option("center"))},_setBackgroundOptions:function(){this._layerCollection.setBackgroundOptions(this._getOption("background"))},_setLayerCollectionOptions:function(){this._layerCollection.setOptions(this.option("layers"))},_getBoundingBoxFromDataSource(){const n=this._layerCollection.items(),e=[1/0,-1/0,-1/0,1/0],t=n&&n.length?n.reduce((i,r)=>{const m=r.getData(),A=m.count();if(A>0){const V=m.getBBox();if(V)i=sX(i,V);else for(let X=0;X<A;X++)i=sX(i,m.getBBox(X))}return i},e):void 0;return t===e?void 0:t},_setControlBarOptions:function(){this._controlBar.setOptions(this._getOption("controlBar"))},_setLegendsOptions:function(){this._legendsControl.setOptions(this.option("legends"))},_setTrackerOptions:function(){this._tracker.setOptions({touchEnabled:this._getOption("touchEnabled",!0),wheelEnabled:this._getOption("wheelEnabled",!0)})},getLayers(){return this._layerCollection.items().map(n=>n.proxy)},getLayerByIndex:function(n){const e=this._layerCollection.byIndex(n);return e?e.proxy:null},getLayerByName:function(n){const e=this._layerCollection.byName(n);return e?e.proxy:null},clearSelection:function(n){const e=this._layerCollection.items();let t;const i=e.length;for(t=0;t<i;++t)e[t].clearSelection(n);return this},center:function(n){const e=this;return void 0===n?e._projection.getCenter():(e._projection.setCenter(n),e)},zoomFactor:function(n){const e=this;return void 0===n?e._projection.getZoom():(e._projection.setZoom(n),e)},viewport:function(n){const e=this;return void 0===n?e._projection.getViewport():(e._projection.setViewport(n),e)},convertCoordinates:function(n){return this.convertToGeo((n=n&&n.length?n:[arguments[0],arguments[1]])[0],n[1])},convertToGeo:function(n,e){return this._projection.fromScreenPoint([n,e])},convertToXY:function(n,e){return this._projection.toScreenPoint([n,e])}});(0,y.A)("dxVectorMap",xP),xP.addPlugin(bv),xP.addPlugin(Xp),xP.addPlugin(qy),xP.addPlugin(LC),xP.addPlugin(F_.core),xP.addPlugin(F_.vectorMap);let aX=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.y$D,z.tXi,z.mQ_,z.uIe,z.Dll,z.uE7,z.fnp,z.Yh3,z.bSv,z.sVF,z.YkV,z.FXg,z.N3e,z.hzo,z.Vku,f.p_,f.xZ,z.DlA,z.A1g,z.r2Z,z.lPC,z.cug,z.y$D,z.tXi,z.mQ_,z.uIe,z.Dll,z.uE7,z.fnp,z.Yh3,z.bSv,z.sVF,z.YkV,z.FXg,z.N3e,z.hzo,z.Vku,f.xZ]})}return n})(),Gde=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=S.$C({type:n});static \u0275inj=S.G2t({imports:[ae,ee.Q,fe,Cd,cA,LO,Ps.L,CR.i,mA,rI,sI.A,aI,lI.x,iw,g1.N,rC.W,f1.B,uI,DI,J1,AI.i,sk,hF.m,br,cr.b,xd,bh.F,n3,i3.L,C3,y3.D,E3,O3.R,w3.S,T3,D3.t,M3,R3.I,k3,B3,z3,F4,V4,H4,U4,z4.p,G4,W4.z,hK,gK,n5,i5,o5,_5,f6,m6.t,_6.S,v6.k,C6,S6,O6,k6,L6.d,B6,N6.B,F6.u,V6,H6.Z,U6,z6,G6,W6,$6,_9,v9.c,C9,y9,b9.L,aX,f.xZ,ae,ee.Q,fe,Cd,cA,LO,Ps.L,CR.i,mA,rI,sI.A,aI,lI.x,iw,g1.N,rC.W,f1.B,uI,DI,J1,AI.i,sk,hF.m,br,cr.b,xd,bh.F,n3,i3.L,C3,y3.D,E3,O3.R,w3.S,T3,D3.t,M3,R3.I,k3,B3,z3,F4,V4,H4,U4,z4.p,G4,W4.z,hK,gK,n5,i5,o5,_5,f6,m6.t,_6.S,v6.k,C6,S6,O6,k6,L6.d,B6,N6.B,F6.u,V6,H6.Z,U6,z6,G6,W6,$6,_9,v9.c,C9,y9,b9.L,aX,f.xZ]})}return n})()},3438:(In,Ze,M)=>{"use strict";M.d(Ze,{Ay:()=>vn,cf:()=>vn});const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,o=Object.keys,P=Array.isArray;function b(ft,ht){return"object"!=typeof ht||o(ht).forEach(function(jt){ft[jt]=ht[jt]}),ft}typeof Promise>"u"||W.Promise||(W.Promise=Promise);const f=Object.getPrototypeOf,S={}.hasOwnProperty;function T(ft,ht){return S.call(ft,ht)}function y(ft,ht){"function"==typeof ht&&(ht=ht(f(ft))),(typeof Reflect>"u"?o:Reflect.ownKeys)(ht).forEach(jt=>{c(ft,jt,ht[jt])})}const d=Object.defineProperty;function c(ft,ht,jt,yn){d(ft,ht,b(jt&&T(jt,"get")&&"function"==typeof jt.get?{get:jt.get,set:jt.set,configurable:!0}:{value:jt,configurable:!0,writable:!0},yn))}function s(ft){return{from:function(ht){return ft.prototype=Object.create(ht.prototype),c(ft.prototype,"constructor",ft),{extend:y.bind(null,ft.prototype)}}}}const a=Object.getOwnPropertyDescriptor;function u(ft,ht){let jt;return a(ft,ht)||(jt=f(ft))&&u(jt,ht)}const h=[].slice;function g(ft,ht,jt){return h.call(ft,ht,jt)}function _(ft,ht){return ht(ft)}function x(ft){if(!ft)throw new Error("Assertion Failed")}function w(ft){W.setImmediate?setImmediate(ft):setTimeout(ft,0)}function D(ft,ht){return ft.reduce((jt,yn,Nn)=>{var hi=ht(yn,Nn);return hi&&(jt[hi[0]]=hi[1]),jt},{})}function C(ft,ht){if("string"==typeof ht&&T(ft,ht))return ft[ht];if(!ht)return ft;if("string"!=typeof ht){for(var jt=[],yn=0,Nn=ht.length;yn<Nn;++yn){var hi=C(ft,ht[yn]);jt.push(hi)}return jt}var xi=ht.indexOf(".");if(-1!==xi){var to=ft[ht.substr(0,xi)];return null==to?void 0:C(to,ht.substr(xi+1))}}function I(ft,ht,jt){if(ft&&void 0!==ht&&(!("isFrozen"in Object)||!Object.isFrozen(ft)))if("string"!=typeof ht&&"length"in ht){x("string"!=typeof jt&&"length"in jt);for(var yn=0,Nn=ht.length;yn<Nn;++yn)I(ft,ht[yn],jt[yn])}else{var hi=ht.indexOf(".");if(-1!==hi){var xi=ht.substr(0,hi),to=ht.substr(hi+1);if(""===to)void 0===jt?P(ft)&&!isNaN(parseInt(xi))?ft.splice(xi,1):delete ft[xi]:ft[xi]=jt;else{var Yi=ft[xi];Yi&&T(ft,xi)||(Yi=ft[xi]={}),I(Yi,to,jt)}}else void 0===jt?P(ft)&&!isNaN(parseInt(ht))?ft.splice(ht,1):delete ft[ht]:ft[ht]=jt}}function L(ft){var ht={};for(var jt in ft)T(ft,jt)&&(ht[jt]=ft[jt]);return ht}const N=[].concat;function G(ft){return N.apply([],ft)}const k="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(G([8,16,32,64].map(ft=>["Int","Uint","Float"].map(ht=>ht+ft+"Array")))).filter(ft=>W[ft]),U=k.map(ft=>W[ft]);D(k,ft=>[ft,!0]);let B=null;function K(ft){B=typeof WeakMap<"u"&&new WeakMap;const ht=J(ft);return B=null,ht}function J(ft){if(!ft||"object"!=typeof ft)return ft;let ht=B&&B.get(ft);if(ht)return ht;if(P(ft)){ht=[],B&&B.set(ft,ht);for(var jt=0,yn=ft.length;jt<yn;++jt)ht.push(J(ft[jt]))}else if(U.indexOf(ft.constructor)>=0)ht=ft;else{const hi=f(ft);for(var Nn in ht=hi===Object.prototype?{}:Object.create(hi),B&&B.set(ft,ht),ft)T(ft,Nn)&&(ht[Nn]=J(ft[Nn]))}return ht}const{toString:ie}={};function re(ft){return ie.call(ft).slice(8,-1)}const q=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Y="symbol"==typeof q?function(ft){var ht;return null!=ft&&(ht=ft[q])&&ht.apply(ft)}:function(){return null},Z={};function Q(ft){var ht,jt,yn,Nn;if(1===arguments.length){if(P(ft))return ft.slice();if(this===Z&&"string"==typeof ft)return[ft];if(Nn=Y(ft)){for(jt=[];!(yn=Nn.next()).done;)jt.push(yn.value);return jt}if(null==ft)return[ft];if("number"==typeof(ht=ft.length)){for(jt=new Array(ht);ht--;)jt[ht]=ft[ht];return jt}return[ft]}for(ht=arguments.length,jt=new Array(ht);ht--;)jt[ht]=arguments[ht];return jt}const te=typeof Symbol<"u"?ft=>"AsyncFunction"===ft[Symbol.toStringTag]:()=>!1;var pe=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function z(ft,ht){pe=ft,oe=ht}var oe=()=>!0;const ae=!new Error("").stack;function ee(){if(ae)try{throw new Error}catch(ft){return ft}return new Error}function he(ft,ht){var jt=ft.stack;return jt?(ht=ht||0,0===jt.indexOf(ft.name)&&(ht+=(ft.name+ft.message).split("\n").length),jt.split("\n").slice(ht).filter(oe).map(yn=>"\n"+yn).join("")):""}var de=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ue=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(de),be={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ve(ft,ht){this._e=ee(),this.name=ft,this.message=ht}function le(ft,ht){return ft+". Errors: "+Object.keys(ht).map(jt=>ht[jt].toString()).filter((jt,yn,Nn)=>Nn.indexOf(jt)===yn).join("\n")}function Ce(ft,ht,jt,yn){this._e=ee(),this.failures=ht,this.failedKeys=yn,this.successCount=jt,this.message=le(ft,ht)}function ye(ft,ht){this._e=ee(),this.name="BulkError",this.failures=Object.keys(ht).map(jt=>ht[jt]),this.failuresByPos=ht,this.message=le(ft,ht)}s(ve).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+he(this._e,2))}},toString:function(){return this.name+": "+this.message}}),s(Ce).from(ve),s(ye).from(ve);var ge=ue.reduce((ft,ht)=>(ft[ht]=ht+"Error",ft),{});const fe=ve;var xe=ue.reduce((ft,ht)=>{var jt=ht+"Error";function yn(Nn,hi){this._e=ee(),this.name=jt,Nn?"string"==typeof Nn?(this.message=`${Nn}${hi?"\n "+hi:""}`,this.inner=hi||null):"object"==typeof Nn&&(this.message=`${Nn.name} ${Nn.message}`,this.inner=Nn):(this.message=be[ht]||jt,this.inner=null)}return s(yn).from(fe),ft[ht]=yn,ft},{});xe.Syntax=SyntaxError,xe.Type=TypeError,xe.Range=RangeError;var Te=de.reduce((ft,ht)=>(ft[ht+"Error"]=xe[ht],ft),{}),Ee=ue.reduce((ft,ht)=>(-1===["Syntax","Type","Range"].indexOf(ht)&&(ft[ht+"Error"]=xe[ht]),ft),{});function Oe(){}function ze(ft){return ft}function $e(ft,ht){return null==ft||ft===ze?ht:function(jt){return ht(ft(jt))}}function Be(ft,ht){return function(){ft.apply(this,arguments),ht.apply(this,arguments)}}function Ue(ft,ht){return ft===Oe?ht:function(){var jt=ft.apply(this,arguments);void 0!==jt&&(arguments[0]=jt);var yn=this.onsuccess,Nn=this.onerror;this.onsuccess=null,this.onerror=null;var hi=ht.apply(this,arguments);return yn&&(this.onsuccess=this.onsuccess?Be(yn,this.onsuccess):yn),Nn&&(this.onerror=this.onerror?Be(Nn,this.onerror):Nn),void 0!==hi?hi:jt}}function ot(ft,ht){return ft===Oe?ht:function(){ft.apply(this,arguments);var jt=this.onsuccess,yn=this.onerror;this.onsuccess=this.onerror=null,ht.apply(this,arguments),jt&&(this.onsuccess=this.onsuccess?Be(jt,this.onsuccess):jt),yn&&(this.onerror=this.onerror?Be(yn,this.onerror):yn)}}function st(ft,ht){return ft===Oe?ht:function(jt){var yn=ft.apply(this,arguments);b(jt,yn);var Nn=this.onsuccess,hi=this.onerror;this.onsuccess=null,this.onerror=null;var xi=ht.apply(this,arguments);return Nn&&(this.onsuccess=this.onsuccess?Be(Nn,this.onsuccess):Nn),hi&&(this.onerror=this.onerror?Be(hi,this.onerror):hi),void 0===yn?void 0===xi?void 0:xi:b(yn,xi)}}function et(ft,ht){return ft===Oe?ht:function(){return!1!==ht.apply(this,arguments)&&ft.apply(this,arguments)}}function Ke(ft,ht){return ft===Oe?ht:function(){var jt=ft.apply(this,arguments);if(jt&&"function"==typeof jt.then){for(var yn=this,Nn=arguments.length,hi=new Array(Nn);Nn--;)hi[Nn]=arguments[Nn];return jt.then(function(){return ht.apply(yn,hi)})}return ht.apply(this,arguments)}}Ee.ModifyError=Ce,Ee.DexieError=ve,Ee.BulkError=ye;var Ye={};const Pe=100,[Se,Re,Fe]=typeof Promise>"u"?[]:(()=>{let ft=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[ft,f(ft),ft];const ht=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[ht,f(ht),ft]})(),Xe=Re&&Re.then,tt=Se&&Se.constructor,vt=!!Fe;var qe=!1,At=Fe?()=>{Fe.then(sn)}:W.setImmediate?setImmediate.bind(null,sn):W.MutationObserver?()=>{var ft=document.createElement("div");new MutationObserver(()=>{sn(),ft=null}).observe(ft,{attributes:!0}),ft.setAttribute("i","1")}:()=>{setTimeout(sn,0)},Tt=function(ft,ht){gi.push([ft,ht]),wt&&(At(),wt=!1)},qt=!0,wt=!0,En=[],ri=[],Tn=null,Jn=ze,wi={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Zo,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(ft=>{try{Zo(ft[0],ft[1])}catch{}})}},Bn=wi,gi=[],Ai=0,pt=[];function Dt(ft){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Oe,this._lib=!1;var ht=this._PSD=Bn;if(pe&&(this._stackHolder=ee(),this._prev=null,this._numPrev=0),"function"!=typeof ft){if(ft!==Ye)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&hn(this,this._value))}this._state=null,this._value=null,++ht.ref,Et(this,ft)}const cn={get:function(){var ft=Bn,ht=xo;function jt(yn,Nn){var hi=!ft.global&&(ft!==Bn||ht!==xo);const xi=hi&&!Zn();var to=new Dt((Yi,uo)=>{Ln(this,new dt(ao(yn,ft,hi,xi),ao(Nn,ft,hi,xi),Yi,uo,ft))});return pe&&on(to,this),to}return jt.prototype=Ye,jt},set:function(ft){c(this,"then",ft&&ft.prototype===Ye?cn:{get:function(){return ft},set:cn.set})}};function dt(ft,ht,jt,yn,Nn){this.onFulfilled="function"==typeof ft?ft:null,this.onRejected="function"==typeof ht?ht:null,this.resolve=jt,this.reject=yn,this.psd=Nn}function Et(ft,ht){try{ht(jt=>{if(null===ft._state){if(jt===ft)throw new TypeError("A promise cannot be resolved with itself.");var yn=ft._lib&&It();jt&&"function"==typeof jt.then?Et(ft,(Nn,hi)=>{jt instanceof Dt?jt._then(Nn,hi):jt.then(Nn,hi)}):(ft._state=!0,ft._value=jt,$n(ft)),yn&&Ot()}},hn.bind(null,ft))}catch(jt){hn(ft,jt)}}function hn(ft,ht){if(ri.push(ht),null===ft._state){var jt=ft._lib&&It();ht=Jn(ht),ft._state=!1,ft._value=ht,pe&&null!==ht&&"object"==typeof ht&&!ht._promise&&function(yn,Nn,hi){try{(()=>{var yn=u(ht,"stack");ht._promise=ft,c(ht,"stack",{get:()=>qe?yn&&(yn.get?yn.get.apply(ht):yn.value):ft.stack})}).apply(null,void 0)}catch(xi){}}(),yn=ft,En.some(Nn=>Nn._value===yn._value)||En.push(yn),$n(ft),jt&&Ot()}var yn}function $n(ft){var ht=ft._listeners;ft._listeners=[];for(var jt=0,yn=ht.length;jt<yn;++jt)Ln(ft,ht[jt]);var Nn=ft._PSD;--Nn.ref||Nn.finalize(),0===Ai&&(++Ai,Tt(()=>{0==--Ai&&zt()},[]))}function Ln(ft,ht){if(null!==ft._state){var jt=ft._state?ht.onFulfilled:ht.onRejected;if(null===jt)return(ft._state?ht.resolve:ht.reject)(ft._value);++ht.psd.ref,++Ai,Tt(Nt,[jt,ft,ht])}else ft._listeners.push(ht)}function Nt(ft,ht,jt){try{Tn=ht;var yn,Nn=ht._value;ht._state?yn=ft(Nn):(ri.length&&(ri=[]),yn=ft(Nn),-1===ri.indexOf(Nn)&&function(hi){for(var xi=En.length;xi;)if(En[--xi]._value===hi._value)return void En.splice(xi,1)}(ht)),jt.resolve(yn)}catch(hi){jt.reject(hi)}finally{Tn=null,0==--Ai&&zt(),--jt.psd.ref||jt.psd.finalize()}}function Gt(ft,ht,jt){if(ht.length===jt)return ht;var yn="";if(!1===ft._state){var Nn,hi,xi=ft._value;null!=xi?(Nn=xi.name||"Error",hi=xi.message||xi,yn=he(xi,0)):(Nn=xi,hi=""),ht.push(Nn+(hi?": "+hi:"")+yn)}return pe&&((yn=he(ft._stackHolder,2))&&-1===ht.indexOf(yn)&&ht.push(yn),ft._prev&&Gt(ft._prev,ht,jt)),ht}function on(ft,ht){var jt=ht?ht._numPrev+1:0;jt<100&&(ft._prev=ht,ft._numPrev=jt)}function sn(){It()&&Ot()}function It(){var ft=qt;return qt=!1,wt=!1,ft}function Ot(){var ft,ht,jt;do{for(;gi.length>0;)for(ft=gi,gi=[],jt=ft.length,ht=0;ht<jt;++ht){var yn=ft[ht];yn[0].apply(null,yn[1])}}while(gi.length>0);qt=!0,wt=!0}function zt(){var ft=En;En=[],ft.forEach(yn=>{yn._PSD.onunhandled.call(null,yn._value,yn)});for(var ht=pt.slice(0),jt=ht.length;jt;)ht[--jt]()}function un(ft){return new Dt(Ye,!1,ft)}function Pn(ft,ht){var jt=Bn;return function(){var yn=It(),Nn=Bn;try{return Xo(jt,!0),ft.apply(this,arguments)}catch(hi){ht&&ht(hi)}finally{Xo(Nn,!1),yn&&Ot()}}}y(Dt.prototype,{then:cn,_then:function(ft,ht){Ln(this,new dt(null,null,ft,ht,Bn))},catch:function(ft){if(1===arguments.length)return this.then(null,ft);var ht=arguments[0],jt=arguments[1];return this.then(null,"function"==typeof ht?yn=>yn instanceof ht?jt(yn):un(yn):yn=>yn&&yn.name===ht?jt(yn):un(yn))},finally:function(ft){return this.then(ht=>(ft(),ht),ht=>(ft(),un(ht)))},stack:{get:function(){if(this._stack)return this._stack;try{qe=!0;var ft=Gt(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=ft),ft}finally{qe=!1}}},timeout:function(ft,ht){return ft<1/0?new Dt((jt,yn)=>{var Nn=setTimeout(()=>yn(new xe.Timeout(ht)),ft);this.then(jt,yn).finally(clearTimeout.bind(null,Nn))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&c(Dt.prototype,Symbol.toStringTag,"Dexie.Promise"),wi.env=Hn(),y(Dt,{all:function(){var ft=Q.apply(null,arguments).map(Di);return new Dt(function(ht,jt){0===ft.length&&ht([]);var yn=ft.length;ft.forEach((Nn,hi)=>Dt.resolve(Nn).then(xi=>{ft[hi]=xi,--yn||ht(ft)},jt))})},resolve:ft=>{if(ft instanceof Dt)return ft;if(ft&&"function"==typeof ft.then)return new Dt((jt,yn)=>{ft.then(jt,yn)});var ht=new Dt(Ye,!0,ft);return on(ht,Tn),ht},reject:un,race:function(){var ft=Q.apply(null,arguments).map(Di);return new Dt((ht,jt)=>{ft.map(yn=>Dt.resolve(yn).then(ht,jt))})},PSD:{get:()=>Bn,set:ft=>Bn=ft},totalEchoes:{get:()=>xo},newPSD:rn,usePSD:ui,scheduler:{get:()=>Tt,set:ft=>{Tt=ft}},rejectionMapper:{get:()=>Jn,set:ft=>{Jn=ft}},follow:(ft,ht)=>new Dt((jt,yn)=>rn((Nn,hi)=>{var xi=Bn;xi.unhandleds=[],xi.onunhandled=hi,xi.finalize=Be(function(){var to;to=()=>{0===this.unhandleds.length?Nn():hi(this.unhandleds[0])},pt.push(function Yi(){to(),pt.splice(pt.indexOf(Yi),1)}),++Ai,Tt(()=>{0==--Ai&&zt()},[])},xi.finalize),ft()},ht,jt,yn))}),tt&&(tt.allSettled&&c(Dt,"allSettled",function(){const ft=Q.apply(null,arguments).map(Di);return new Dt(ht=>{0===ft.length&&ht([]);let jt=ft.length;const yn=new Array(jt);ft.forEach((Nn,hi)=>Dt.resolve(Nn).then(xi=>yn[hi]={status:"fulfilled",value:xi},xi=>yn[hi]={status:"rejected",reason:xi}).then(()=>--jt||ht(yn)))})}),tt.any&&typeof AggregateError<"u"&&c(Dt,"any",function(){const ft=Q.apply(null,arguments).map(Di);return new Dt((ht,jt)=>{0===ft.length&&jt(new AggregateError([]));let yn=ft.length;const Nn=new Array(yn);ft.forEach((hi,xi)=>Dt.resolve(hi).then(to=>ht(to),to=>{Nn[xi]=to,--yn||jt(new AggregateError(Nn))}))})}));const ci={awaits:0,echoes:0,id:0};var Ei=0,Hi=[],mo=0,xo=0,vr=0;function rn(ft,ht,jt,yn){var Nn=Bn,hi=Object.create(Nn);hi.parent=Nn,hi.ref=0,hi.global=!1,hi.id=++vr;var xi=wi.env;hi.env=vt?{Promise:Dt,PromiseProp:{value:Dt,configurable:!0,writable:!0},all:Dt.all,race:Dt.race,allSettled:Dt.allSettled,any:Dt.any,resolve:Dt.resolve,reject:Dt.reject,nthen:Wi(xi.nthen,hi),gthen:Wi(xi.gthen,hi)}:{},ht&&b(hi,ht),++Nn.ref,hi.finalize=function(){--this.parent.ref||this.parent.finalize()};var to=ui(hi,ft,jt,yn);return 0===hi.ref&&hi.finalize(),to}function en(){return ci.id||(ci.id=++Ei),++ci.awaits,ci.echoes+=Pe,ci.id}function Zn(){return!!ci.awaits&&(0==--ci.awaits&&(ci.id=0),ci.echoes=ci.awaits*Pe,!0)}function Di(ft){return ci.echoes&&ft&&ft.constructor===tt?(en(),ft.then(ht=>(Zn(),ht),ht=>(Zn(),xr(ht)))):ft}function po(ft){++xo,ci.echoes&&0!=--ci.echoes||(ci.echoes=ci.id=0),Hi.push(Bn),Xo(ft,!0)}function nr(){var ft=Hi[Hi.length-1];Hi.pop(),Xo(ft,!1)}function Xo(ft,ht){var jt=Bn;if((ht?!ci.echoes||mo++&&ft===Bn:!mo||--mo&&ft===Bn)||bi(ht?po.bind(null,ft):nr),ft!==Bn&&(Bn=ft,jt===wi&&(wi.env=Hn()),vt)){var yn=wi.env.Promise,Nn=ft.env;Re.then=Nn.nthen,yn.prototype.then=Nn.gthen,(jt.global||ft.global)&&(Object.defineProperty(W,"Promise",Nn.PromiseProp),yn.all=Nn.all,yn.race=Nn.race,yn.resolve=Nn.resolve,yn.reject=Nn.reject,Nn.allSettled&&(yn.allSettled=Nn.allSettled),Nn.any&&(yn.any=Nn.any))}}function Hn(){var ft=W.Promise;return vt?{Promise:ft,PromiseProp:Object.getOwnPropertyDescriptor(W,"Promise"),all:ft.all,race:ft.race,allSettled:ft.allSettled,any:ft.any,resolve:ft.resolve,reject:ft.reject,nthen:Re.then,gthen:ft.prototype.then}:{}}function ui(ft,ht,jt,yn,Nn){var hi=Bn;try{return Xo(ft,!0),ht(jt,yn,Nn)}finally{Xo(hi,!1)}}function bi(ft){Xe.call(Se,ft)}function ao(ft,ht,jt,yn){return"function"!=typeof ft?ft:function(){var Nn=Bn;jt&&en(),Xo(ht,!0);try{return ft.apply(this,arguments)}finally{Xo(Nn,!1),yn&&bi(Zn)}}}function Wi(ft,ht){return function(jt,yn){return ft.call(this,ao(jt,ht),ao(yn,ht))}}-1===(""+Xe).indexOf("[native code]")&&(en=Zn=Oe);const Ko="unhandledrejection";function Zo(ft,ht){var jt;try{jt=ht.onuncatched(ft)}catch{}if(!1!==jt)try{var yn,Nn={promise:ht,reason:ft};if(W.document&&document.createEvent?((yn=document.createEvent("Event")).initEvent(Ko,!0,!0),b(yn,Nn)):W.CustomEvent&&b(yn=new CustomEvent(Ko,{detail:Nn}),Nn),yn&&W.dispatchEvent&&(dispatchEvent(yn),!W.PromiseRejectionEvent&&W.onunhandledrejection))try{W.onunhandledrejection(yn)}catch{}pe&&yn&&!yn.defaultPrevented&&console.warn(`Unhandled rejection: ${ft.stack||ft}`)}catch{}}var xr=Dt.reject;function hr(ft,ht,jt,yn){if(ft.idbdb&&(ft._state.openComplete||Bn.letThrough||ft._vip)){var Nn=ft._createTransaction(ht,jt,ft._dbSchema);try{Nn.create(),ft._state.PR1398_maxLoop=3}catch(hi){return hi.name===ge.InvalidState&&ft.isOpen()&&--ft._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),ft._close(),ft.open().then(()=>hr(ft,ht,jt,yn))):xr(hi)}return Nn._promise(ht,(hi,xi)=>rn(()=>(Bn.trans=Nn,yn(hi,xi,Nn)))).then(hi=>Nn._completion.then(()=>hi))}if(ft._state.openComplete)return xr(new xe.DatabaseClosed(ft._state.dbOpenError));if(!ft._state.isBeingOpened){if(!ft._options.autoOpen)return xr(new xe.DatabaseClosed);ft.open().catch(Oe)}return ft._state.dbReadyPromise.then(()=>hr(ft,ht,jt,yn))}const pi=-1/0,Ti="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",lo="String expected.",Eo=[],Jo=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),fr=Jo,Gr=Jo,Yn=ft=>!/(dexie\.js|dexie\.min\.js)/.test(ft),ei="__dbnames",Ii="readonly",co="readwrite";function ko(ft,ht){return ft?ht?function(){return ft.apply(this,arguments)&&ht.apply(this,arguments)}:ft:ht}const er={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function or(ft){return"string"!=typeof ft||/\./.test(ft)?ht=>ht:ht=>(void 0===ht[ft]&&ft in ht&&delete(ht=K(ht))[ft],ht)}class Jr{_trans(ht,jt,yn){const Nn=this._tx||Bn.trans,hi=this.name;function xi(Yi,uo,so){if(!so.schema[hi])throw new xe.NotFound("Table "+hi+" not part of transaction");return jt(so.idbtrans,so)}const to=It();try{return Nn&&Nn.db===this.db?Nn===Bn.trans?Nn._promise(ht,xi,yn):rn(()=>Nn._promise(ht,xi,yn),{trans:Nn,transless:Bn.transless||Bn}):hr(this.db,ht,[this.name],xi)}finally{to&&Ot()}}get(ht,jt){return ht&&ht.constructor===Object?this.where(ht).first(jt):this._trans("readonly",yn=>this.core.get({trans:yn,key:ht}).then(Nn=>this.hook.reading.fire(Nn))).then(jt)}where(ht){if("string"==typeof ht)return new this.db.WhereClause(this,ht);if(P(ht))return new this.db.WhereClause(this,`[${ht.join("+")}]`);const jt=o(ht);if(1===jt.length)return this.where(jt[0]).equals(ht[jt[0]]);const yn=this.schema.indexes.concat(this.schema.primKey).filter(uo=>{if(uo.compound&&jt.every(so=>uo.keyPath.indexOf(so)>=0)){for(let so=0;so<jt.length;++so)if(-1===jt.indexOf(uo.keyPath[so]))return!1;return!0}return!1}).sort((uo,so)=>uo.keyPath.length-so.keyPath.length)[0];if(yn&&"\uffff"!==this.db._maxKey){const uo=yn.keyPath.slice(0,jt.length);return this.where(uo).equals(uo.map(so=>ht[so]))}!yn&&pe&&console.warn(`The query ${JSON.stringify(ht)} on ${this.name} would benefit of a compound index [${jt.join("+")}]`);const{idxByName:Nn}=this.schema,hi=this.db._deps.indexedDB;function xi(uo,so){try{return 0===hi.cmp(uo,so)}catch{return!1}}const[to,Yi]=jt.reduce(([uo,so],To)=>{const Ji=Nn[To],Wo=ht[To];return[uo||Ji,uo||!Ji?ko(so,Ji&&Ji.multi?ln=>{const Bt=C(ln,To);return P(Bt)&&Bt.some(kt=>xi(Wo,kt))}:ln=>xi(Wo,C(ln,To))):so]},[null,null]);return to?this.where(to.name).equals(ht[to.keyPath]).filter(Yi):yn?this.filter(Yi):this.where(jt).equals("")}filter(ht){return this.toCollection().and(ht)}count(ht){return this.toCollection().count(ht)}offset(ht){return this.toCollection().offset(ht)}limit(ht){return this.toCollection().limit(ht)}each(ht){return this.toCollection().each(ht)}toArray(ht){return this.toCollection().toArray(ht)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(ht){return new this.db.Collection(new this.db.WhereClause(this,P(ht)?`[${ht.join("+")}]`:ht))}reverse(){return this.toCollection().reverse()}mapToClass(ht){this.schema.mappedClass=ht;const jt=yn=>{if(!yn)return yn;const Nn=Object.create(ht.prototype);for(var hi in yn)if(T(yn,hi))try{Nn[hi]=yn[hi]}catch{}return Nn};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=jt,this.hook("reading",jt),ht}defineClass(){return this.mapToClass(function(ht){b(this,ht)})}add(ht,jt){const{auto:yn,keyPath:Nn}=this.schema.primKey;let hi=ht;return Nn&&yn&&(hi=or(Nn)(ht)),this._trans("readwrite",xi=>this.core.mutate({trans:xi,type:"add",keys:null!=jt?[jt]:null,values:[hi]})).then(xi=>xi.numFailures?Dt.reject(xi.failures[0]):xi.lastResult).then(xi=>{if(Nn)try{I(ht,Nn,xi)}catch{}return xi})}update(ht,jt){if("object"!=typeof ht||P(ht))return this.where(":id").equals(ht).modify(jt);{const yn=C(ht,this.schema.primKey.keyPath);if(void 0===yn)return xr(new xe.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof jt?o(jt).forEach(Nn=>{I(ht,Nn,jt[Nn])}):jt(ht,{value:ht,primKey:yn})}catch{}return this.where(":id").equals(yn).modify(jt)}}put(ht,jt){const{auto:yn,keyPath:Nn}=this.schema.primKey;let hi=ht;return Nn&&yn&&(hi=or(Nn)(ht)),this._trans("readwrite",xi=>this.core.mutate({trans:xi,type:"put",values:[hi],keys:null!=jt?[jt]:null})).then(xi=>xi.numFailures?Dt.reject(xi.failures[0]):xi.lastResult).then(xi=>{if(Nn)try{I(ht,Nn,xi)}catch{}return xi})}delete(ht){return this._trans("readwrite",jt=>this.core.mutate({trans:jt,type:"delete",keys:[ht]})).then(jt=>jt.numFailures?Dt.reject(jt.failures[0]):void 0)}clear(){return this._trans("readwrite",ht=>this.core.mutate({trans:ht,type:"deleteRange",range:er})).then(ht=>ht.numFailures?Dt.reject(ht.failures[0]):void 0)}bulkGet(ht){return this._trans("readonly",jt=>this.core.getMany({keys:ht,trans:jt}).then(yn=>yn.map(Nn=>this.hook.reading.fire(Nn))))}bulkAdd(ht,jt,yn){const Nn=Array.isArray(jt)?jt:void 0,hi=(yn=yn||(Nn?void 0:jt))?yn.allKeys:void 0;return this._trans("readwrite",xi=>{const{auto:to,keyPath:Yi}=this.schema.primKey;if(Yi&&Nn)throw new xe.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(Nn&&Nn.length!==ht.length)throw new xe.InvalidArgument("Arguments objects and keys must have the same length");const uo=ht.length;let so=Yi&&to?ht.map(or(Yi)):ht;return this.core.mutate({trans:xi,type:"add",keys:Nn,values:so,wantResults:hi}).then(({numFailures:To,results:Ji,lastResult:Wo,failures:ln})=>{if(0===To)return hi?Ji:Wo;throw new ye(`${this.name}.bulkAdd(): ${To} of ${uo} operations failed`,ln)})})}bulkPut(ht,jt,yn){const Nn=Array.isArray(jt)?jt:void 0,hi=(yn=yn||(Nn?void 0:jt))?yn.allKeys:void 0;return this._trans("readwrite",xi=>{const{auto:to,keyPath:Yi}=this.schema.primKey;if(Yi&&Nn)throw new xe.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(Nn&&Nn.length!==ht.length)throw new xe.InvalidArgument("Arguments objects and keys must have the same length");const uo=ht.length;let so=Yi&&to?ht.map(or(Yi)):ht;return this.core.mutate({trans:xi,type:"put",keys:Nn,values:so,wantResults:hi}).then(({numFailures:To,results:Ji,lastResult:Wo,failures:ln})=>{if(0===To)return hi?Ji:Wo;throw new ye(`${this.name}.bulkPut(): ${To} of ${uo} operations failed`,ln)})})}bulkDelete(ht){const jt=ht.length;return this._trans("readwrite",yn=>this.core.mutate({trans:yn,type:"delete",keys:ht})).then(({numFailures:yn,lastResult:Nn,failures:hi})=>{if(0===yn)return Nn;throw new ye(`${this.name}.bulkDelete(): ${yn} of ${jt} operations failed`,hi)})}}function Wr(ft){var ht={},jt=function(xi,to){if(to){for(var Yi=arguments.length,uo=new Array(Yi-1);--Yi;)uo[Yi-1]=arguments[Yi];return ht[xi].subscribe.apply(null,uo),ft}if("string"==typeof xi)return ht[xi]};jt.addEventType=hi;for(var yn=1,Nn=arguments.length;yn<Nn;++yn)hi(arguments[yn]);return jt;function hi(xi,to,Yi){if("object"!=typeof xi){var uo;to||(to=et),Yi||(Yi=Oe);var so={subscribers:[],fire:Yi,subscribe:function(To){-1===so.subscribers.indexOf(To)&&(so.subscribers.push(To),so.fire=to(so.fire,To))},unsubscribe:function(To){so.subscribers=so.subscribers.filter(function(Ji){return Ji!==To}),so.fire=so.subscribers.reduce(to,Yi)}};return ht[xi]=jt[xi]=so,so}o(uo=xi).forEach(function(To){var Ji=uo[To];if(P(Ji))hi(To,uo[To][0],uo[To][1]);else{if("asap"!==Ji)throw new xe.InvalidArgument("Invalid event config");var Wo=hi(To,ze,function(){for(var ln=arguments.length,Bt=new Array(ln);ln--;)Bt[ln]=arguments[ln];Wo.subscribers.forEach(function(kt){w(function(){kt.apply(null,Bt)})})})}})}}function Xr(ft,ht){return s(ht).from({prototype:ft}),ht}function Mr(ft,ht){return!(ft.filter||ft.algorithm||ft.or)&&(ht?ft.justLimit:!ft.replayFilter)}function dn(ft,ht){ft.filter=ko(ft.filter,ht)}function an(ft,ht,jt){var yn=ft.replayFilter;ft.replayFilter=yn?()=>ko(yn(),ht()):ht,ft.justLimit=jt&&!yn}function _n(ft,ht){if(ft.isPrimKey)return ht.primaryKey;const jt=ht.getIndexByKeyPath(ft.index);if(!jt)throw new xe.Schema("KeyPath "+ft.index+" on object store "+ht.name+" is not indexed");return jt}function Wt(ft,ht,jt){const yn=_n(ft,ht.schema);return ht.openCursor({trans:jt,values:!ft.keysOnly,reverse:"prev"===ft.dir,unique:!!ft.unique,query:{index:yn,range:ft.range}})}function zn(ft,ht,jt,yn){const Nn=ft.replayFilter?ko(ft.filter,ft.replayFilter()):ft.filter;if(ft.or){const hi={},xi=(to,Yi,uo)=>{if(!Nn||Nn(Yi,uo,Ji=>Yi.stop(Ji),Ji=>Yi.fail(Ji))){var so=Yi.primaryKey,To=""+so;"[object ArrayBuffer]"===To&&(To=""+new Uint8Array(so)),T(hi,To)||(hi[To]=!0,ht(to,Yi,uo))}};return Promise.all([ft.or._iterate(xi,jt),mi(Wt(ft,yn,jt),ft.algorithm,xi,!ft.keysOnly&&ft.valueMapper)])}return mi(Wt(ft,yn,jt),ko(ft.algorithm,Nn),ht,!ft.keysOnly&&ft.valueMapper)}function mi(ft,ht,jt,yn){var Nn=Pn(yn?(hi,xi,to)=>jt(yn(hi),xi,to):jt);return ft.then(hi=>{if(hi)return hi.start(()=>{var xi=()=>hi.continue();ht&&!ht(hi,to=>xi=to,to=>{hi.stop(to),xi=Oe},to=>{hi.fail(to),xi=Oe})||Nn(hi.value,hi,to=>xi=to),xi()})})}function Si(ft,ht){try{const jt=go(ft),yn=go(ht);if(jt!==yn)return"Array"===jt?1:"Array"===yn?-1:"binary"===jt?1:"binary"===yn?-1:"string"===jt?1:"string"===yn?-1:"Date"===jt?1:"Date"!==yn?NaN:-1;switch(jt){case"number":case"Date":case"string":return ft>ht?1:ft<ht?-1:0;case"binary":return function(Nn,hi){const xi=Nn.length,to=hi.length,Yi=xi<to?xi:to;for(let uo=0;uo<Yi;++uo)if(Nn[uo]!==hi[uo])return Nn[uo]<hi[uo]?-1:1;return xi===to?0:xi<to?-1:1}(No(ft),No(ht));case"Array":return function(Nn,hi){const xi=Nn.length,to=hi.length,Yi=xi<to?xi:to;for(let uo=0;uo<Yi;++uo){const so=Si(Nn[uo],hi[uo]);if(0!==so)return so}return xi===to?0:xi<to?-1:1}(ft,ht)}}catch{}return NaN}function go(ft){const ht=typeof ft;if("object"!==ht)return ht;if(ArrayBuffer.isView(ft))return"binary";const jt=re(ft);return"ArrayBuffer"===jt?"binary":jt}function No(ft){return ft instanceof Uint8Array?ft:ArrayBuffer.isView(ft)?new Uint8Array(ft.buffer,ft.byteOffset,ft.byteLength):new Uint8Array(ft)}class Sr{_read(ht,jt){var yn=this._ctx;return yn.error?yn.table._trans(null,xr.bind(null,yn.error)):yn.table._trans("readonly",ht).then(jt)}_write(ht){var jt=this._ctx;return jt.error?jt.table._trans(null,xr.bind(null,jt.error)):jt.table._trans("readwrite",ht,"locked")}_addAlgorithm(ht){var jt=this._ctx;jt.algorithm=ko(jt.algorithm,ht)}_iterate(ht,jt){return zn(this._ctx,ht,jt,this._ctx.table.core)}clone(ht){var jt=Object.create(this.constructor.prototype),yn=Object.create(this._ctx);return ht&&b(yn,ht),jt._ctx=yn,jt}raw(){return this._ctx.valueMapper=null,this}each(ht){var jt=this._ctx;return this._read(yn=>zn(jt,ht,yn,jt.table.core))}count(ht){return this._read(jt=>{const yn=this._ctx,Nn=yn.table.core;if(Mr(yn,!0))return Nn.count({trans:jt,query:{index:_n(yn,Nn.schema),range:yn.range}}).then(xi=>Math.min(xi,yn.limit));var hi=0;return zn(yn,()=>(++hi,!1),jt,Nn).then(()=>hi)}).then(ht)}sortBy(ht,jt){const yn=ht.split(".").reverse(),Nn=yn[0],hi=yn.length-1;function xi(uo,so){return so?xi(uo[yn[so]],so-1):uo[Nn]}var to="next"===this._ctx.dir?1:-1;function Yi(uo,so){var To=xi(uo,hi),Ji=xi(so,hi);return To<Ji?-to:To>Ji?to:0}return this.toArray(function(uo){return uo.sort(Yi)}).then(jt)}toArray(ht){return this._read(jt=>{var yn=this._ctx;if("next"===yn.dir&&Mr(yn,!0)&&yn.limit>0){const{valueMapper:Nn}=yn,hi=_n(yn,yn.table.core.schema);return yn.table.core.query({trans:jt,limit:yn.limit,values:!0,query:{index:hi,range:yn.range}}).then(({result:xi})=>Nn?xi.map(Nn):xi)}{const Nn=[];return zn(yn,hi=>Nn.push(hi),jt,yn.table.core).then(()=>Nn)}},ht)}offset(ht){var jt=this._ctx;return ht<=0||(jt.offset+=ht,Mr(jt)?an(jt,()=>{var yn=ht;return(Nn,hi)=>0===yn||(1===yn?(--yn,!1):(hi(()=>{Nn.advance(yn),yn=0}),!1))}):an(jt,()=>{var yn=ht;return()=>--yn<0})),this}limit(ht){return this._ctx.limit=Math.min(this._ctx.limit,ht),an(this._ctx,()=>{var jt=ht;return function(yn,Nn,hi){return--jt<=0&&Nn(hi),jt>=0}},!0),this}until(ht,jt){return dn(this._ctx,function(yn,Nn,hi){return!ht(yn.value)||(Nn(hi),jt)}),this}first(ht){return this.limit(1).toArray(function(jt){return jt[0]}).then(ht)}last(ht){return this.reverse().first(ht)}filter(ht){var jt;return dn(this._ctx,function(Nn){return ht(Nn.value)}),(jt=this._ctx).isMatch=ko(jt.isMatch,ht),this}and(ht){return this.filter(ht)}or(ht){return new this.db.WhereClause(this._ctx.table,ht,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(ht){var jt=this._ctx;return jt.keysOnly=!jt.isMatch,this.each(function(yn,Nn){ht(Nn.key,Nn)})}eachUniqueKey(ht){return this._ctx.unique="unique",this.eachKey(ht)}eachPrimaryKey(ht){var jt=this._ctx;return jt.keysOnly=!jt.isMatch,this.each(function(yn,Nn){ht(Nn.primaryKey,Nn)})}keys(ht){var jt=this._ctx;jt.keysOnly=!jt.isMatch;var yn=[];return this.each(function(Nn,hi){yn.push(hi.key)}).then(function(){return yn}).then(ht)}primaryKeys(ht){var jt=this._ctx;if("next"===jt.dir&&Mr(jt,!0)&&jt.limit>0)return this._read(Nn=>{var hi=_n(jt,jt.table.core.schema);return jt.table.core.query({trans:Nn,values:!1,limit:jt.limit,query:{index:hi,range:jt.range}})}).then(({result:Nn})=>Nn).then(ht);jt.keysOnly=!jt.isMatch;var yn=[];return this.each(function(Nn,hi){yn.push(hi.primaryKey)}).then(function(){return yn}).then(ht)}uniqueKeys(ht){return this._ctx.unique="unique",this.keys(ht)}firstKey(ht){return this.limit(1).keys(function(jt){return jt[0]}).then(ht)}lastKey(ht){return this.reverse().firstKey(ht)}distinct(){var ht=this._ctx,jt=ht.index&&ht.table.schema.idxByName[ht.index];if(!jt||!jt.multi)return this;var yn={};return dn(this._ctx,function(Nn){var hi=Nn.primaryKey.toString(),xi=T(yn,hi);return yn[hi]=!0,!xi}),this}modify(ht){var jt=this._ctx;return this._write(yn=>{var Nn;if("function"==typeof ht)Nn=ht;else{var hi=o(ht),xi=hi.length;Nn=function(Bt){for(var kt=!1,Rn=0;Rn<xi;++Rn){var ti=hi[Rn],Ri=ht[ti];C(Bt,ti)!==Ri&&(I(Bt,ti,Ri),kt=!0)}return kt}}const to=jt.table.core,{outbound:Yi,extractKey:uo}=to.schema.primaryKey,so=this.db._options.modifyChunkSize||200,To=[];let Ji=0;const Wo=[],ln=(Bt,kt)=>{const{failures:Rn,numFailures:ti}=kt;Ji+=Bt-ti;for(let Ri of o(Rn))To.push(Rn[Ri])};return this.clone().primaryKeys().then(Bt=>{const kt=Rn=>{const ti=Math.min(so,Bt.length-Rn);return to.getMany({trans:yn,keys:Bt.slice(Rn,Rn+ti),cache:"immutable"}).then(Ri=>{const Oi=[],eo=[],So=Yi?[]:null,Oo=[];for(let zo=0;zo<ti;++zo){const jr=Ri[zo],qr={value:K(jr),primKey:Bt[Rn+zo]};!1!==Nn.call(qr,qr.value,qr)&&(null==qr.value?Oo.push(Bt[Rn+zo]):Yi||0===Si(uo(jr),uo(qr.value))?(eo.push(qr.value),Yi&&So.push(Bt[Rn+zo])):(Oo.push(Bt[Rn+zo]),Oi.push(qr.value)))}const Yo=Mr(jt)&&jt.limit===1/0&&("function"!=typeof ht||ht===pr)&&{index:jt.index,range:jt.range};return Promise.resolve(Oi.length>0&&to.mutate({trans:yn,type:"add",values:Oi}).then(zo=>{for(let jr in zo.failures)Oo.splice(parseInt(jr),1);ln(Oi.length,zo)})).then(()=>(eo.length>0||Yo&&"object"==typeof ht)&&to.mutate({trans:yn,type:"put",keys:So,values:eo,criteria:Yo,changeSpec:"function"!=typeof ht&&ht}).then(zo=>ln(eo.length,zo))).then(()=>(Oo.length>0||Yo&&ht===pr)&&to.mutate({trans:yn,type:"delete",keys:Oo,criteria:Yo}).then(zo=>ln(Oo.length,zo))).then(()=>Bt.length>Rn+ti&&kt(Rn+so))})};return kt(0).then(()=>{if(To.length>0)throw new Ce("Error modifying one or more objects",To,Ji,Wo);return Bt.length})})})}delete(){var ht=this._ctx,jt=ht.range;return Mr(ht)&&(ht.isPrimKey&&!Gr||3===jt.type)?this._write(yn=>{const{primaryKey:Nn}=ht.table.core.schema,hi=jt;return ht.table.core.count({trans:yn,query:{index:Nn,range:hi}}).then(xi=>ht.table.core.mutate({trans:yn,type:"deleteRange",range:hi}).then(({failures:to,numFailures:so})=>{if(so)throw new Ce("Could not delete some values",Object.keys(to).map(To=>to[To]),xi-so);return xi-so}))}):this.modify(pr)}}const pr=(ft,ht)=>ht.value=null;function Vr(ft,ht){return ft<ht?-1:ft===ht?0:1}function Lt(ft,ht){return ft>ht?-1:ft===ht?0:1}function bn(ft,ht,jt){var yn=ft instanceof gn?new ft.Collection(ft):ft;return yn._ctx.error=jt?new jt(ht):new TypeError(ht),yn}function jn(ft){return new ft.Collection(ft,()=>bt("")).limit(0)}function Ci(ft,ht,jt,yn,Nn,hi){for(var xi=Math.min(ft.length,yn.length),to=-1,Yi=0;Yi<xi;++Yi){var uo=ht[Yi];if(uo!==yn[Yi])return Nn(ft[Yi],jt[Yi])<0?ft.substr(0,Yi)+jt[Yi]+jt.substr(Yi+1):Nn(ft[Yi],yn[Yi])<0?ft.substr(0,Yi)+yn[Yi]+jt.substr(Yi+1):to>=0?ft.substr(0,to)+ht[to]+jt.substr(to+1):null;Nn(ft[Yi],uo)<0&&(to=Yi)}return xi<yn.length&&"next"===hi?ft+jt.substr(ft.length):xi<ft.length&&"prev"===hi?ft.substr(0,jt.length):to<0?null:ft.substr(0,to)+yn[to]+jt.substr(to+1)}function Mi(ft,ht,jt,yn){var Nn,hi,xi,to,Yi,uo,so,To=jt.length;if(!jt.every(Bt=>"string"==typeof Bt))return bn(ft,lo);function Ji(Bt){Nn=function(Rn){return"next"===Rn?ti=>ti.toUpperCase():ti=>ti.toLowerCase()}(Bt),hi=function(Rn){return"next"===Rn?ti=>ti.toLowerCase():ti=>ti.toUpperCase()}(Bt),xi="next"===Bt?Vr:Lt;var kt=jt.map(function(Rn){return{lower:hi(Rn),upper:Nn(Rn)}}).sort(function(Rn,ti){return xi(Rn.lower,ti.lower)});to=kt.map(function(Rn){return Rn.upper}),Yi=kt.map(function(Rn){return Rn.lower}),uo=Bt,so="next"===Bt?"":yn}Ji("next");var Wo=new ft.Collection(ft,()=>Ki(to[0],Yi[To-1]+yn));Wo._ondirectionchange=function(Bt){Ji(Bt)};var ln=0;return Wo._addAlgorithm(function(Bt,kt,Rn){var ti=Bt.key;if("string"!=typeof ti)return!1;var Ri=hi(ti);if(ht(Ri,Yi,ln))return!0;for(var Oi=null,eo=ln;eo<To;++eo){var So=Ci(ti,Ri,to[eo],Yi[eo],xi,uo);null===So&&null===Oi?ln=eo+1:(null===Oi||xi(Oi,So)>0)&&(Oi=So)}return kt(null!==Oi?function(){Bt.continue(Oi+so)}:Rn),!1}),Wo}function Ki(ft,ht,jt,yn){return{type:2,lower:ft,upper:ht,lowerOpen:jt,upperOpen:yn}}function bt(ft){return{type:1,lower:ft,upper:ft}}class gn{get Collection(){return this._ctx.table.db.Collection}between(ht,jt,yn,Nn){yn=!1!==yn,Nn=!0===Nn;try{return this._cmp(ht,jt)>0||0===this._cmp(ht,jt)&&(yn||Nn)&&(!yn||!Nn)?jn(this):new this.Collection(this,()=>Ki(ht,jt,!yn,!Nn))}catch{return bn(this,Ti)}}equals(ht){return null==ht?bn(this,Ti):new this.Collection(this,()=>bt(ht))}above(ht){return null==ht?bn(this,Ti):new this.Collection(this,()=>Ki(ht,void 0,!0))}aboveOrEqual(ht){return null==ht?bn(this,Ti):new this.Collection(this,()=>Ki(ht,void 0,!1))}below(ht){return null==ht?bn(this,Ti):new this.Collection(this,()=>Ki(void 0,ht,!1,!0))}belowOrEqual(ht){return null==ht?bn(this,Ti):new this.Collection(this,()=>Ki(void 0,ht))}startsWith(ht){return"string"!=typeof ht?bn(this,lo):this.between(ht,ht+"\uffff",!0,!0)}startsWithIgnoreCase(ht){return""===ht?this.startsWith(ht):Mi(this,(jt,yn)=>0===jt.indexOf(yn[0]),[ht],"\uffff")}equalsIgnoreCase(ht){return Mi(this,(jt,yn)=>jt===yn[0],[ht],"")}anyOfIgnoreCase(){var ht=Q.apply(Z,arguments);return 0===ht.length?jn(this):Mi(this,(jt,yn)=>-1!==yn.indexOf(jt),ht,"")}startsWithAnyOfIgnoreCase(){var ht=Q.apply(Z,arguments);return 0===ht.length?jn(this):Mi(this,(jt,yn)=>yn.some(Nn=>0===jt.indexOf(Nn)),ht,"\uffff")}anyOf(){const ht=Q.apply(Z,arguments);let jt=this._cmp;try{ht.sort(jt)}catch{return bn(this,Ti)}if(0===ht.length)return jn(this);const yn=new this.Collection(this,()=>Ki(ht[0],ht[ht.length-1]));yn._ondirectionchange=hi=>{jt="next"===hi?this._ascending:this._descending,ht.sort(jt)};let Nn=0;return yn._addAlgorithm((hi,xi,to)=>{const Yi=hi.key;for(;jt(Yi,ht[Nn])>0;)if(++Nn,Nn===ht.length)return xi(to),!1;return 0===jt(Yi,ht[Nn])||(xi(()=>{hi.continue(ht[Nn])}),!1)}),yn}notEqual(ht){return this.inAnyRange([[pi,ht],[ht,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const ht=Q.apply(Z,arguments);if(0===ht.length)return new this.Collection(this);try{ht.sort(this._ascending)}catch{return bn(this,Ti)}const jt=ht.reduce((yn,Nn)=>yn?yn.concat([[yn[yn.length-1][1],Nn]]):[[pi,Nn]],null);return jt.push([ht[ht.length-1],this.db._maxKey]),this.inAnyRange(jt,{includeLowers:!1,includeUppers:!1})}inAnyRange(ht,jt){const yn=this._cmp,Nn=this._ascending,hi=this._descending,xi=this._min,to=this._max;if(0===ht.length)return jn(this);if(!ht.every(ti=>void 0!==ti[0]&&void 0!==ti[1]&&Nn(ti[0],ti[1])<=0))return bn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",xe.InvalidArgument);const Yi=!jt||!1!==jt.includeLowers,uo=jt&&!0===jt.includeUppers;let so,To=Nn;function Ji(ti,Ri){return To(ti[0],Ri[0])}try{so=ht.reduce(function(ti,Ri){let Oi=0,eo=ti.length;for(;Oi<eo;++Oi){const So=ti[Oi];if(yn(Ri[0],So[1])<0&&yn(Ri[1],So[0])>0){So[0]=xi(So[0],Ri[0]),So[1]=to(So[1],Ri[1]);break}}return Oi===eo&&ti.push(Ri),ti},[]),so.sort(Ji)}catch{return bn(this,Ti)}let Wo=0;const ln=uo?ti=>Nn(ti,so[Wo][1])>0:ti=>Nn(ti,so[Wo][1])>=0,Bt=Yi?ti=>hi(ti,so[Wo][0])>0:ti=>hi(ti,so[Wo][0])>=0;let kt=ln;const Rn=new this.Collection(this,()=>Ki(so[0][0],so[so.length-1][1],!Yi,!uo));return Rn._ondirectionchange=ti=>{"next"===ti?(kt=ln,To=Nn):(kt=Bt,To=hi),so.sort(Ji)},Rn._addAlgorithm((ti,Ri,Oi)=>{for(var eo=ti.key;kt(eo);)if(++Wo,Wo===so.length)return Ri(Oi),!1;return!((ln(So=eo)||Bt(So))&&(0===this._cmp(eo,so[Wo][1])||0===this._cmp(eo,so[Wo][0])||Ri(()=>{ti.continue(To===Nn?so[Wo][0]:so[Wo][1])}),1));var So}),Rn}startsWithAnyOf(){const ht=Q.apply(Z,arguments);return ht.every(jt=>"string"==typeof jt)?0===ht.length?jn(this):this.inAnyRange(ht.map(jt=>[jt,jt+"\uffff"])):bn(this,"startsWithAnyOf() only works with strings")}}function Kt(ft){return Pn(function(ht){return Mn(ht),ft(ht.target.error),!1})}function Mn(ft){ft.stopPropagation&&ft.stopPropagation(),ft.preventDefault&&ft.preventDefault()}const _i="storagemutated",Qi="x-storagemutated-1",Co=Wr(null,_i);class $o{_lock(){return x(!Bn.global),++this._reculock,1!==this._reculock||Bn.global||(Bn.lockOwnerFor=this),this}_unlock(){if(x(!Bn.global),0==--this._reculock)for(Bn.global||(Bn.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var ht=this._blockedFuncs.shift();try{ui(ht[1],ht[0])}catch{}}return this}_locked(){return this._reculock&&Bn.lockOwnerFor!==this}create(ht){if(!this.mode)return this;const jt=this.db.idbdb,yn=this.db._state.dbOpenError;if(x(!this.idbtrans),!ht&&!jt)switch(yn&&yn.name){case"DatabaseClosedError":throw new xe.DatabaseClosed(yn);case"MissingAPIError":throw new xe.MissingAPI(yn.message,yn);default:throw new xe.OpenFailed(yn)}if(!this.active)throw new xe.TransactionInactive;return x(null===this._completion._state),(ht=this.idbtrans=ht||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):jt.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Pn(Nn=>{Mn(Nn),this._reject(ht.error)}),ht.onabort=Pn(Nn=>{Mn(Nn),this.active&&this._reject(new xe.Abort(ht.error)),this.active=!1,this.on("abort").fire(Nn)}),ht.oncomplete=Pn(()=>{this.active=!1,this._resolve(),"mutatedParts"in ht&&Co.storagemutated.fire(ht.mutatedParts)}),this}_promise(ht,jt,yn){if("readwrite"===ht&&"readwrite"!==this.mode)return xr(new xe.ReadOnly("Transaction is readonly"));if(!this.active)return xr(new xe.TransactionInactive);if(this._locked())return new Dt((hi,xi)=>{this._blockedFuncs.push([()=>{this._promise(ht,jt,yn).then(hi,xi)},Bn])});if(yn)return rn(()=>{var hi=new Dt((xi,to)=>{this._lock();const Yi=jt(xi,to,this);Yi&&Yi.then&&Yi.then(xi,to)});return hi.finally(()=>this._unlock()),hi._lib=!0,hi});var Nn=new Dt((hi,xi)=>{var to=jt(hi,xi,this);to&&to.then&&to.then(hi,xi)});return Nn._lib=!0,Nn}_root(){return this.parent?this.parent._root():this}waitFor(ht){var jt=this._root();const yn=Dt.resolve(ht);if(jt._waitingFor)jt._waitingFor=jt._waitingFor.then(()=>yn);else{jt._waitingFor=yn,jt._waitingQueue=[];var Nn=jt.idbtrans.objectStore(jt.storeNames[0]);!function xi(){for(++jt._spinCount;jt._waitingQueue.length;)jt._waitingQueue.shift()();jt._waitingFor&&(Nn.get(-1/0).onsuccess=xi)}()}var hi=jt._waitingFor;return new Dt((xi,to)=>{yn.then(Yi=>jt._waitingQueue.push(Pn(xi.bind(null,Yi))),Yi=>jt._waitingQueue.push(Pn(to.bind(null,Yi)))).finally(()=>{jt._waitingFor===hi&&(jt._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new xe.Abort))}table(ht){const jt=this._memoizedTables||(this._memoizedTables={});if(T(jt,ht))return jt[ht];const yn=this.schema[ht];if(!yn)throw new xe.NotFound("Table "+ht+" not part of transaction");const Nn=new this.db.Table(ht,yn,this);return Nn.core=this.db.core.table(ht),jt[ht]=Nn,Nn}}function sr(ft,ht,jt,yn,Nn,hi,xi){return{name:ft,keyPath:ht,unique:jt,multi:yn,auto:Nn,compound:hi,src:(jt&&!xi?"&":"")+(yn?"*":"")+(Nn?"++":"")+lr(ht)}}function lr(ft){return"string"==typeof ft?ft:ft?"["+[].join.call(ft,"+")+"]":""}function rr(ft,ht,jt){return{name:ft,primKey:ht,indexes:jt,mappedClass:null,idxByName:D(jt,yn=>[yn.name,yn])}}let Pr=ft=>{try{return ft.only([[]]),Pr=()=>[[]],[[]]}catch{return Pr=()=>"\uffff","\uffff"}};function wr(ft){return null==ft?()=>{}:"string"==typeof ft?1===(ht=ft).split(".").length?yn=>yn[ht]:yn=>C(yn,ht):ht=>C(ht,ft);var ht}function Fo(ft){return[].slice.call(ft)}let os=0;function fs(ft){return null==ft?":id":"string"==typeof ft?ft:`[${ft.join("+")}]`}function js(ft,ht,jt){function yn(Yi){if(3===Yi.type)return null;if(4===Yi.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:uo,upper:so,lowerOpen:To,upperOpen:Ji}=Yi;return void 0===uo?void 0===so?null:ht.upperBound(so,!!Ji):void 0===so?ht.lowerBound(uo,!!To):ht.bound(uo,so,!!To,!!Ji)}const{schema:Nn,hasGetAll:hi}=function(Yi,uo){const so=Fo(Yi.objectStoreNames);return{schema:{name:Yi.name,tables:so.map(To=>uo.objectStore(To)).map(To=>{const{keyPath:Ji,autoIncrement:Wo}=To,ln=P(Ji),kt={},Rn={name:To.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:null==Ji,compound:ln,keyPath:Ji,autoIncrement:Wo,unique:!0,extractKey:wr(Ji)},indexes:Fo(To.indexNames).map(ti=>To.index(ti)).map(ti=>{const{name:Ri,unique:Oi,multiEntry:eo,keyPath:So}=ti,Oo={name:Ri,compound:P(So),keyPath:So,unique:Oi,multiEntry:eo,extractKey:wr(So)};return kt[fs(So)]=Oo,Oo}),getIndexByKeyPath:ti=>kt[fs(ti)]};return kt[":id"]=Rn.primaryKey,null!=Ji&&(kt[fs(Ji)]=Rn.primaryKey),Rn})},hasGetAll:so.length>0&&"getAll"in uo.objectStore(so[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(ft,jt),xi=Nn.tables.map(Yi=>function(uo){const so=uo.name;return{name:so,schema:uo,mutate:function({trans:To,type:Ji,keys:Wo,values:ln,range:Bt}){return new Promise((kt,Rn)=>{kt=Pn(kt);const ti=To.objectStore(so),Ri=null==ti.keyPath,Oi="put"===Ji||"add"===Ji;if(!Oi&&"delete"!==Ji&&"deleteRange"!==Ji)throw new Error("Invalid operation type: "+Ji);const{length:eo}=Wo||ln||{length:1};if(Wo&&ln&&Wo.length!==ln.length)throw new Error("Given keys array must have same length as given values array.");if(0===eo)return kt({numFailures:0,failures:{},results:[],lastResult:void 0});let So;const Oo=[],Yo=[];let zo=0;const jr=bs=>{++zo,Mn(bs)};if("deleteRange"===Ji){if(4===Bt.type)return kt({numFailures:zo,failures:Yo,results:[],lastResult:void 0});Oo.push(So=3===Bt.type?ti.clear():ti.delete(yn(Bt)))}else{const[bs,Io]=Oi?Ri?[ln,Wo]:[ln,null]:[Wo,null];if(Oi)for(let Pt=0;Pt<eo;++Pt)Oo.push(So=Io&&void 0!==Io[Pt]?ti[Ji](bs[Pt],Io[Pt]):ti[Ji](bs[Pt])),So.onerror=jr;else for(let Pt=0;Pt<eo;++Pt)Oo.push(So=ti[Ji](bs[Pt])),So.onerror=jr}const qr=bs=>{const Io=bs.target.result;Oo.forEach((Pt,St)=>null!=Pt.error&&(Yo[St]=Pt.error)),kt({numFailures:zo,failures:Yo,results:"delete"===Ji?Wo:Oo.map(Pt=>Pt.result),lastResult:Io})};So.onerror=bs=>{jr(bs),qr(bs)},So.onsuccess=qr})},getMany:({trans:To,keys:Ji})=>new Promise((Wo,ln)=>{Wo=Pn(Wo);const Bt=To.objectStore(so),kt=Ji.length,Rn=new Array(kt);let ti,Ri=0,Oi=0;const eo=Oo=>{const Yo=Oo.target;Rn[Yo._pos]=Yo.result,++Oi===Ri&&Wo(Rn)},So=Kt(ln);for(let Oo=0;Oo<kt;++Oo)null!=Ji[Oo]&&(ti=Bt.get(Ji[Oo]),ti._pos=Oo,ti.onsuccess=eo,ti.onerror=So,++Ri);0===Ri&&Wo(Rn)}),get:({trans:To,key:Ji})=>new Promise((Wo,ln)=>{Wo=Pn(Wo);const Bt=To.objectStore(so).get(Ji);Bt.onsuccess=kt=>Wo(kt.target.result),Bt.onerror=Kt(ln)}),query:function(To){return Ji=>new Promise((Wo,ln)=>{Wo=Pn(Wo);const{trans:Bt,values:kt,limit:Rn,query:ti}=Ji,Ri=Rn===1/0?void 0:Rn,{index:Oi,range:eo}=ti,So=Bt.objectStore(so),Oo=Oi.isPrimaryKey?So:So.index(Oi.name),Yo=yn(eo);if(0===Rn)return Wo({result:[]});if(To){const zo=kt?Oo.getAll(Yo,Ri):Oo.getAllKeys(Yo,Ri);zo.onsuccess=jr=>Wo({result:jr.target.result}),zo.onerror=Kt(ln)}else{let zo=0;const jr=kt||!("openKeyCursor"in Oo)?Oo.openCursor(Yo):Oo.openKeyCursor(Yo),qr=[];jr.onsuccess=bs=>{const Io=jr.result;return Io?(qr.push(kt?Io.value:Io.primaryKey),++zo===Rn?Wo({result:qr}):void Io.continue()):Wo({result:qr})},jr.onerror=Kt(ln)}})}(hi),openCursor:function({trans:To,values:Ji,query:Wo,reverse:ln,unique:Bt}){return new Promise((kt,Rn)=>{kt=Pn(kt);const{index:ti,range:Ri}=Wo,Oi=To.objectStore(so),eo=ti.isPrimaryKey?Oi:Oi.index(ti.name),So=ln?Bt?"prevunique":"prev":Bt?"nextunique":"next",Oo=Ji||!("openKeyCursor"in eo)?eo.openCursor(yn(Ri),So):eo.openKeyCursor(yn(Ri),So);Oo.onerror=Kt(Rn),Oo.onsuccess=Pn(Yo=>{const zo=Oo.result;if(!zo)return void kt(null);zo.___id=++os,zo.done=!1;const jr=zo.continue.bind(zo);let qr=zo.continuePrimaryKey;qr&&(qr=qr.bind(zo));const bs=zo.advance.bind(zo),Io=()=>{throw new Error("Cursor not stopped")};zo.trans=To,zo.stop=zo.continue=zo.continuePrimaryKey=zo.advance=()=>{throw new Error("Cursor not started")},zo.fail=Pn(Rn),zo.next=function(){let Pt=1;return this.start(()=>Pt--?this.continue():this.stop()).then(()=>this)},zo.start=Pt=>{const St=new Promise((ai,ro)=>{ai=Pn(ai),Oo.onerror=Kt(ro),zo.fail=ro,zo.stop=jo=>{zo.stop=zo.continue=zo.continuePrimaryKey=zo.advance=Io,ai(jo)}}),Dn=()=>{if(Oo.result)try{Pt()}catch(ai){zo.fail(ai)}else zo.done=!0,zo.start=()=>{throw new Error("Cursor behind last entry")},zo.stop()};return Oo.onsuccess=Pn(ai=>{Oo.onsuccess=Dn,Dn()}),zo.continue=jr,zo.continuePrimaryKey=qr,zo.advance=bs,Dn(),St},kt(zo)},Rn)})},count({query:To,trans:Ji}){const{index:Wo,range:ln}=To;return new Promise((Bt,kt)=>{const Rn=Ji.objectStore(so),ti=Wo.isPrimaryKey?Rn:Rn.index(Wo.name),Ri=yn(ln),Oi=Ri?ti.count(Ri):ti.count();Oi.onsuccess=Pn(eo=>Bt(eo.target.result)),Oi.onerror=Kt(kt)})}}}(Yi)),to={};return xi.forEach(Yi=>to[Yi.name]=Yi),{stack:"dbcore",transaction:ft.transaction.bind(ft),table(Yi){if(!to[Yi])throw new Error(`Table '${Yi}' not found`);return to[Yi]},MIN_KEY:-1/0,MAX_KEY:Pr(ht),schema:Nn}}function Ta({_novip:ft},ht){const yn=function(Nn,hi,{IDBKeyRange:xi},Yi){return{dbcore:(so=js(hi,xi,Yi),To=Nn.dbcore,To.reduce((Ji,{create:Wo})=>({...Ji,...Wo(Ji)}),so))};var so,To}(ft._middlewares,ht.db,ft._deps,ht);ft.core=yn.dbcore,ft.tables.forEach(Nn=>{const hi=Nn.name;ft.core.schema.tables.some(xi=>xi.name===hi)&&(Nn.core=ft.core.table(hi),ft[hi]instanceof ft.Table&&(ft[hi].core=Nn.core))})}function es({_novip:ft},ht,jt,yn){jt.forEach(Nn=>{const hi=yn[Nn];ht.forEach(xi=>{const to=u(xi,Nn);(!to||"value"in to&&void 0===to.value)&&(xi===ft.Transaction.prototype||xi instanceof ft.Transaction?c(xi,Nn,{get(){return this.table(Nn)},set(Yi){d(this,Nn,{value:Yi,writable:!0,configurable:!0,enumerable:!0})}}):xi[Nn]=new ft.Table(Nn,hi))})})}function gs({_novip:ft},ht){ht.forEach(jt=>{for(let yn in jt)jt[yn]instanceof ft.Table&&delete jt[yn]})}function Ca(ft,ht){return ft._cfg.version-ht._cfg.version}function Fi(ft,ht){const jt={del:[],add:[],change:[]};let yn;for(yn in ft)ht[yn]||jt.del.push(yn);for(yn in ht){const Nn=ft[yn],hi=ht[yn];if(Nn){const xi={name:yn,def:hi,recreate:!1,del:[],add:[],change:[]};if(""+(Nn.primKey.keyPath||"")!=""+(hi.primKey.keyPath||"")||Nn.primKey.auto!==hi.primKey.auto&&!Jo)xi.recreate=!0,jt.change.push(xi);else{const to=Nn.idxByName,Yi=hi.idxByName;let uo;for(uo in to)Yi[uo]||xi.del.push(uo);for(uo in Yi){const so=to[uo],To=Yi[uo];so?so.src!==To.src&&xi.change.push(To):xi.add.push(To)}(xi.del.length>0||xi.add.length>0||xi.change.length>0)&&jt.change.push(xi)}}else jt.add.push([yn,hi])}return jt}function ct(ft,ht,jt,yn){const Nn=ft.db.createObjectStore(ht,jt.keyPath?{keyPath:jt.keyPath,autoIncrement:jt.auto}:{autoIncrement:jt.auto});return yn.forEach(hi=>Ut(Nn,hi)),Nn}function Ut(ft,ht){ft.createIndex(ht.name,ht.keyPath,{unique:ht.unique,multiEntry:ht.multi})}function nn(ft,ht,jt){const yn={};return g(ht.objectStoreNames,0).forEach(Nn=>{const hi=jt.objectStore(Nn);let xi=hi.keyPath;const to=sr(lr(xi),xi||"",!1,!1,!!hi.autoIncrement,xi&&"string"!=typeof xi,!0),Yi=[];for(let so=0;so<hi.indexNames.length;++so){const To=hi.index(hi.indexNames[so]);xi=To.keyPath;var uo=sr(To.name,xi,!!To.unique,!!To.multiEntry,!1,xi&&"string"!=typeof xi,!1);Yi.push(uo)}yn[Nn]=rr(Nn,to,Yi)}),yn}function kn({_novip:ft},ht,jt){const yn=jt.db.objectStoreNames;for(let Nn=0;Nn<yn.length;++Nn){const hi=yn[Nn],xi=jt.objectStore(hi);ft._hasGetAll="getAll"in xi;for(let to=0;to<xi.indexNames.length;++to){const Yi=xi.indexNames[to],uo=xi.index(Yi).keyPath,so="string"==typeof uo?uo:"["+g(uo).join("+")+"]";if(ht[hi]){const To=ht[hi].idxByName[so];To&&(To.name=Yi,delete ht[hi].idxByName[so],ht[hi].idxByName[Yi]=To)}}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&W.WorkerGlobalScope&&W instanceof W.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(ft._hasGetAll=!1)}class si{_parseStoresSpec(ht,jt){o(ht).forEach(yn=>{if(null!==ht[yn]){var Nn=ht[yn].split(",").map((xi,to)=>{const Yi=(xi=xi.trim()).replace(/([&*]|\+\+)/g,""),uo=/^\[/.test(Yi)?Yi.match(/^\[(.*)\]$/)[1].split("+"):Yi;return sr(Yi,uo||null,/\&/.test(xi),/\*/.test(xi),/\+\+/.test(xi),P(uo),0===to)}),hi=Nn.shift();if(hi.multi)throw new xe.Schema("Primary key cannot be multi-valued");Nn.forEach(xi=>{if(xi.auto)throw new xe.Schema("Only primary key can be marked as autoIncrement (++)");if(!xi.keyPath)throw new xe.Schema("Index must have a name and cannot be an empty string")}),jt[yn]=rr(yn,hi,Nn)}})}stores(ht){const jt=this.db;this._cfg.storesSource=this._cfg.storesSource?b(this._cfg.storesSource,ht):ht;const Nn={};let hi={};return jt._versions.forEach(xi=>{b(Nn,xi._cfg.storesSource),hi=xi._cfg.dbschema={},xi._parseStoresSpec(Nn,hi)}),jt._dbSchema=hi,gs(jt,[jt._allTables,jt,jt.Transaction.prototype]),es(jt,[jt._allTables,jt,jt.Transaction.prototype,this._cfg.tables],o(hi),hi),jt._storeNames=o(hi),this}upgrade(ht){return this._cfg.contentUpgrade=Ke(this._cfg.contentUpgrade||Oe,ht),this}}function vi(ft,ht){let jt=ft._dbNamesDB;return jt||(jt=ft._dbNamesDB=new vn(ei,{addons:[],indexedDB:ft,IDBKeyRange:ht}),jt.version(1).stores({dbnames:"name"})),jt.table("dbnames")}function Ni(ft){return ft&&"function"==typeof ft.databases}function fo(ft){return rn(function(){return Bn.letThrough=!0,ft()})}function Xi(){var ft;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ht){var jt=function(){return indexedDB.databases().finally(ht)};ft=setInterval(jt,100),jt()}).finally(function(){return clearInterval(ft)}):Promise.resolve()}function Go(ft){var ht=hi=>ft.next(hi),jt=Nn(ht),yn=Nn(hi=>ft.throw(hi));function Nn(hi){return xi=>{var to=hi(xi),Yi=to.value;return to.done?Yi:Yi&&"function"==typeof Yi.then?Yi.then(jt,yn):P(Yi)?Promise.all(Yi).then(jt,yn):jt(Yi)}}return Nn(ht)()}function Er(ft,ht,jt){var yn=arguments.length;if(yn<2)throw new xe.InvalidArgument("Too few arguments");for(var Nn=new Array(yn-1);--yn;)Nn[yn-1]=arguments[yn];return jt=Nn.pop(),[ft,G(Nn),jt]}function Ts(ft,ht,jt,yn,Nn){return Dt.resolve().then(()=>{const hi=Bn.transless||Bn,xi=ft._createTransaction(ht,jt,ft._dbSchema,yn),to={trans:xi,transless:hi};if(yn)xi.idbtrans=yn.idbtrans;else try{xi.create(),ft._state.PR1398_maxLoop=3}catch(To){return To.name===ge.InvalidState&&ft.isOpen()&&--ft._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),ft._close(),ft.open().then(()=>Ts(ft,ht,jt,null,Nn))):xr(To)}const Yi=te(Nn);let uo;Yi&&en();const so=Dt.follow(()=>{if(uo=Nn.call(xi,xi),uo)if(Yi){var To=Zn.bind(null,null);uo.then(To,To)}else"function"==typeof uo.next&&"function"==typeof uo.throw&&(uo=Go(uo))},to);return(uo&&"function"==typeof uo.then?Dt.resolve(uo).then(To=>xi.active?To:xr(new xe.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):so.then(()=>uo)).then(To=>(yn&&xi._resolve(),xi._completion.then(()=>To))).catch(To=>(xi._reject(To),xr(To)))})}function ms(ft,ht,jt){const yn=P(ft)?ft.slice():[ft];for(let Nn=0;Nn<jt;++Nn)yn.push(ht);return yn}const rs={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(ft){return{...ft,table(ht){const jt=ft.table(ht),{schema:yn}=jt,Nn={},hi=[];function xi(so,To,Ji){const Wo=fs(so),ln=Nn[Wo]=Nn[Wo]||[],Bt=null==so?0:"string"==typeof so?1:so.length,kt=To>0,Rn={...Ji,isVirtual:kt,keyTail:To,keyLength:Bt,extractKey:wr(so),unique:!kt&&Ji.unique};return ln.push(Rn),Rn.isPrimaryKey||hi.push(Rn),Bt>1&&xi(2===Bt?so[0]:so.slice(0,Bt-1),To+1,Ji),ln.sort((ti,Ri)=>ti.keyTail-Ri.keyTail),Rn}const to=xi(yn.primaryKey.keyPath,0,yn.primaryKey);Nn[":id"]=[to];for(const so of yn.indexes)xi(so.keyPath,0,so);function Yi(so){const To=so.query.index;return To.isVirtual?{...so,query:{index:To,range:(Ji=so.query.range,Wo=To.keyTail,{type:1===Ji.type?2:Ji.type,lower:ms(Ji.lower,Ji.lowerOpen?ft.MAX_KEY:ft.MIN_KEY,Wo),lowerOpen:!0,upper:ms(Ji.upper,Ji.upperOpen?ft.MIN_KEY:ft.MAX_KEY,Wo),upperOpen:!0})}}:so;var Ji,Wo}return{...jt,schema:{...yn,primaryKey:to,indexes:hi,getIndexByKeyPath:function(so){const To=Nn[fs(so)];return To&&To[0]}},count:so=>jt.count(Yi(so)),query:so=>jt.query(Yi(so)),openCursor(so){const{keyTail:To,isVirtual:Ji,keyLength:Wo}=so.query.index;return Ji?jt.openCursor(Yi(so)).then(ln=>{return ln&&(Bt=ln,Object.create(Bt,{continue:{value:function(Rn){null!=Rn?Bt.continue(ms(Rn,so.reverse?ft.MAX_KEY:ft.MIN_KEY,To)):so.unique?Bt.continue(Bt.key.slice(0,Wo).concat(so.reverse?ft.MIN_KEY:ft.MAX_KEY,To)):Bt.continue()}},continuePrimaryKey:{value(Rn,ti){Bt.continuePrimaryKey(ms(Rn,ft.MAX_KEY,To),ti)}},primaryKey:{get:()=>Bt.primaryKey},key:{get(){const Rn=Bt.key;return 1===Wo?Rn[0]:Rn.slice(0,Wo)}},value:{get:()=>Bt.value}}));var Bt}):jt.openCursor(so)}}}}}};function $r(ft,ht,jt,yn){return jt=jt||{},yn=yn||"",o(ft).forEach(Nn=>{if(T(ht,Nn)){var hi=ft[Nn],xi=ht[Nn];if("object"==typeof hi&&"object"==typeof xi&&hi&&xi){const to=re(hi);to!==re(xi)?jt[yn+Nn]=ht[Nn]:"Object"===to?$r(hi,xi,jt,yn+Nn+"."):hi!==xi&&(jt[yn+Nn]=ht[Nn])}else hi!==xi&&(jt[yn+Nn]=ht[Nn])}else jt[yn+Nn]=void 0}),o(ht).forEach(Nn=>{T(ft,Nn)||(jt[yn+Nn]=ht[Nn])}),jt}const Qa={stack:"dbcore",name:"HooksMiddleware",level:2,create:ft=>({...ft,table(ht){const jt=ft.table(ht),{primaryKey:yn}=jt.schema;return{...jt,mutate(hi){const xi=Bn.trans,{deleting:to,creating:Yi,updating:uo}=xi.table(ht).hook;switch(hi.type){case"add":if(Yi.fire===Oe)break;return xi._promise("readwrite",()=>so(hi),!0);case"put":if(Yi.fire===Oe&&uo.fire===Oe)break;return xi._promise("readwrite",()=>so(hi),!0);case"delete":if(to.fire===Oe)break;return xi._promise("readwrite",()=>so(hi),!0);case"deleteRange":if(to.fire===Oe)break;return xi._promise("readwrite",()=>{return To((Ji=hi).trans,Ji.range,1e4);var Ji},!0)}return jt.mutate(hi);function so(Ji){const Wo=Bn.trans,ln=Ji.keys||("delete"===(kt=Ji).type?kt.keys:kt.keys||kt.values.map(yn.extractKey));var kt;if(!ln)throw new Error("Keys missing");return"delete"!==(Ji="add"===Ji.type||"put"===Ji.type?{...Ji,keys:ln}:{...Ji}).type&&(Ji.values=[...Ji.values]),Ji.keys&&(Ji.keys=[...Ji.keys]),function(Bt,kt,Rn){return"add"===kt.type?Promise.resolve([]):Bt.getMany({trans:kt.trans,keys:Rn,cache:"immutable"})}(jt,Ji,ln).then(Bt=>{const kt=ln.map((Rn,ti)=>{const Ri=Bt[ti],Oi={onerror:null,onsuccess:null};if("delete"===Ji.type)to.fire.call(Oi,Rn,Ri,Wo);else if("add"===Ji.type||void 0===Ri){const eo=Yi.fire.call(Oi,Rn,Ji.values[ti],Wo);null==Rn&&null!=eo&&(Ji.keys[ti]=Rn=eo,yn.outbound||I(Ji.values[ti],yn.keyPath,Rn))}else{const eo=$r(Ri,Ji.values[ti]),So=uo.fire.call(Oi,eo,Rn,Ri,Wo);if(So){const Oo=Ji.values[ti];Object.keys(So).forEach(Yo=>{T(Oo,Yo)?Oo[Yo]=So[Yo]:I(Oo,Yo,So[Yo])})}}return Oi});return jt.mutate(Ji).then(({failures:Rn,results:ti,numFailures:Ri,lastResult:Oi})=>{for(let eo=0;eo<ln.length;++eo){const So=ti?ti[eo]:ln[eo],Oo=kt[eo];null==So?Oo.onerror&&Oo.onerror(Rn[eo]):Oo.onsuccess&&Oo.onsuccess("put"===Ji.type&&Bt[eo]?Ji.values[eo]:So)}return{failures:Rn,results:ti,numFailures:Ri,lastResult:Oi}}).catch(Rn=>(kt.forEach(ti=>ti.onerror&&ti.onerror(Rn)),Promise.reject(Rn)))})}function To(Ji,Wo,ln){return jt.query({trans:Ji,values:!1,query:{index:yn,range:Wo},limit:ln}).then(({result:Bt})=>so({type:"delete",keys:Bt,trans:Ji}).then(kt=>kt.numFailures>0?Promise.reject(kt.failures[0]):Bt.length<ln?{failures:[],numFailures:0,lastResult:void 0}:To(Ji,{...Wo,lower:Bt[Bt.length-1],lowerOpen:!0},ln)))}}}}})};function Gs(ft,ht,jt){try{if(!ht||ht.keys.length<ft.length)return null;const yn=[];for(let Nn=0,hi=0;Nn<ht.keys.length&&hi<ft.length;++Nn)0===Si(ht.keys[Nn],ft[hi])&&(yn.push(jt?K(ht.values[Nn]):ht.values[Nn]),++hi);return yn.length===ft.length?yn:null}catch{return null}}const Vl={stack:"dbcore",level:-1,create:ft=>({table:ht=>{const jt=ft.table(ht);return{...jt,getMany:yn=>{if(!yn.cache)return jt.getMany(yn);const Nn=Gs(yn.keys,yn.trans._cache,"clone"===yn.cache);return Nn?Dt.resolve(Nn):jt.getMany(yn).then(hi=>(yn.trans._cache={keys:yn.keys,values:"clone"===yn.cache?K(hi):hi},hi))},mutate:yn=>("add"!==yn.type&&(yn.trans._cache=null),jt.mutate(yn))}}})};function Ma(ft){return!("from"in ft)}const Lo=function(ft,ht){if(!this){const jt=new Lo;return ft&&"d"in ft&&b(jt,ft),jt}b(this,arguments.length?{d:1,from:ft,to:arguments.length>1?ht:ft}:{d:0})};function Ms(ft,ht,jt){const yn=Si(ht,jt);if(isNaN(yn))return;if(yn>0)throw RangeError();if(Ma(ft))return b(ft,{from:ht,to:jt,d:1});const Nn=ft.l,hi=ft.r;if(Si(jt,ft.from)<0)return Nn?Ms(Nn,ht,jt):ft.l={from:ht,to:jt,d:1,l:null,r:null},Ld(ft);if(Si(ht,ft.to)>0)return hi?Ms(hi,ht,jt):ft.r={from:ht,to:jt,d:1,l:null,r:null},Ld(ft);Si(ht,ft.from)<0&&(ft.from=ht,ft.l=null,ft.d=hi?hi.d+1:1),Si(jt,ft.to)>0&&(ft.to=jt,ft.r=null,ft.d=ft.l?ft.l.d+1:1);const xi=!ft.r;Nn&&!ft.l&&cl(ft,Nn),hi&&xi&&cl(ft,hi)}function cl(ft,ht){Ma(ht)||function jt(yn,{from:Nn,to:hi,l:xi,r:to}){Ms(yn,Nn,hi),xi&&jt(yn,xi),to&&jt(yn,to)}(ft,ht)}function Hl(ft){let ht=Ma(ft)?null:{s:0,n:ft};return{next(jt){const yn=arguments.length>0;for(;ht;)switch(ht.s){case 0:if(ht.s=1,yn)for(;ht.n.l&&Si(jt,ht.n.from)<0;)ht={up:ht,n:ht.n.l,s:1};else for(;ht.n.l;)ht={up:ht,n:ht.n.l,s:1};case 1:if(ht.s=2,!yn||Si(jt,ht.n.to)<=0)return{value:ht.n,done:!1};case 2:if(ht.n.r){ht.s=3,ht={up:ht,n:ht.n.r,s:0};continue}case 3:ht=ht.up}return{done:!0}}}}function Ld(ft){var ht,jt;const yn=((null===(ht=ft.r)||void 0===ht?void 0:ht.d)||0)-((null===(jt=ft.l)||void 0===jt?void 0:jt.d)||0),Nn=yn>1?"r":yn<-1?"l":"";if(Nn){const hi="r"===Nn?"l":"r",xi={...ft},to=ft[Nn];ft.from=to.from,ft.to=to.to,ft[Nn]=to[Nn],xi[Nn]=to[hi],ft[hi]=xi,xi.d=nd(xi)}ft.d=nd(ft)}function nd({r:ft,l:ht}){return(ft?ht?Math.max(ft.d,ht.d):ft.d:ht?ht.d:0)+1}y(Lo.prototype,{add(ft){return cl(this,ft),this},addKey(ft){return Ms(this,ft,ft),this},addKeys(ft){return ft.forEach(ht=>Ms(this,ht,ht)),this},[q](){return Hl(this)}});const Cn={stack:"dbcore",level:0,create:ft=>{const ht=ft.schema.name,jt=new Lo(ft.MIN_KEY,ft.MAX_KEY);return{...ft,table:yn=>{const Nn=ft.table(yn),{schema:hi}=Nn,{primaryKey:xi}=hi,{extractKey:to,outbound:Yi}=xi,uo={...Nn,mutate:Ji=>{const Wo=Ji.trans,ln=Wo.mutatedParts||(Wo.mutatedParts={}),Bt=So=>{const Oo=`idb://${ht}/${yn}/${So}`;return ln[Oo]||(ln[Oo]=new Lo)},kt=Bt(""),Rn=Bt(":dels"),{type:ti}=Ji;let[Ri,Oi]="deleteRange"===Ji.type?[Ji.range]:"delete"===Ji.type?[Ji.keys]:Ji.values.length<50?[[],Ji.values]:[];const eo=Ji.trans._cache;return Nn.mutate(Ji).then(So=>{if(P(Ri)){"delete"!==ti&&(Ri=So.results),kt.addKeys(Ri);const Oo=Gs(Ri,eo);Oo||"add"===ti||Rn.addKeys(Ri),(Oo||Oi)&&(Yo=Bt,jr=Oo,qr=Oi,hi.indexes.forEach(function bs(Io){const Pt=Yo(Io.name||"");function St(ai){return null!=ai?Io.extractKey(ai):null}const Dn=ai=>Io.multiEntry&&P(ai)?ai.forEach(ro=>Pt.addKey(ro)):Pt.addKey(ai);(jr||qr).forEach((ai,ro)=>{const jo=jr&&St(jr[ro]),ia=qr&&St(qr[ro]);0!==Si(jo,ia)&&(null!=jo&&Dn(jo),null!=ia&&Dn(ia))})}))}else if(Ri){const Oo={from:Ri.lower,to:Ri.upper};Rn.add(Oo),kt.add(Oo)}else kt.add(jt),Rn.add(jt),hi.indexes.forEach(Oo=>Bt(Oo.name).add(jt));var Yo,jr,qr;return So})}},so=({query:{index:Ji,range:Wo}})=>{var ln,Bt;return[Ji,new Lo(null!==(ln=Wo.lower)&&void 0!==ln?ln:ft.MIN_KEY,null!==(Bt=Wo.upper)&&void 0!==Bt?Bt:ft.MAX_KEY)]},To={get:Ji=>[xi,new Lo(Ji.key)],getMany:Ji=>[xi,(new Lo).addKeys(Ji.keys)],count:so,query:so,openCursor:so};return o(To).forEach(Ji=>{uo[Ji]=function(Wo){const{subscr:ln}=Bn;if(ln){const Bt=Oi=>{const eo=`idb://${ht}/${yn}/${Oi}`;return ln[eo]||(ln[eo]=new Lo)},kt=Bt(""),Rn=Bt(":dels"),[ti,Ri]=To[Ji](Wo);if(Bt(ti.name||"").add(Ri),!ti.isPrimaryKey){if("count"!==Ji){const Oi="query"===Ji&&Yi&&Wo.values&&Nn.query({...Wo,values:!1});return Nn[Ji].apply(this,arguments).then(eo=>{if("query"===Ji){if(Yi&&Wo.values)return Oi.then(({result:Oo})=>(kt.addKeys(Oo),eo));const So=Wo.values?eo.result.map(to):eo.result;Wo.values?kt.addKeys(So):Rn.addKeys(So)}else if("openCursor"===Ji){const So=eo,Oo=Wo.values;return So&&Object.create(So,{key:{get:()=>(Rn.addKey(So.primaryKey),So.key)},primaryKey:{get(){const Yo=So.primaryKey;return Rn.addKey(Yo),Yo}},value:{get:()=>(Oo&&kt.addKey(So.primaryKey),So.value)}})}return eo})}Rn.add(jt)}}return Nn[Ji].apply(this,arguments)}}),uo}}}};class vn{constructor(ht,jt){this._middlewares={},this.verno=0;const yn=vn.dependencies;this._options=jt={addons:vn.addons,autoOpen:!0,indexedDB:yn.indexedDB,IDBKeyRange:yn.IDBKeyRange,...jt},this._deps={indexedDB:jt.indexedDB,IDBKeyRange:jt.IDBKeyRange};const{addons:Nn}=jt;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const hi={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Oe,dbReadyPromise:null,cancelOpen:Oe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var xi,to;hi.dbReadyPromise=new Dt(to=>{hi.dbReadyResolve=to}),hi.openCanceller=new Dt((to,Yi)=>{hi.cancelOpen=Yi}),this._state=hi,this.name=ht,this.on=Wr(this,"populate","blocked","versionchange","close",{ready:[Ke,Oe]}),this.on.ready.subscribe=_(this.on.ready.subscribe,to=>(Yi,uo)=>{vn.vip(()=>{const so=this._state;if(so.openComplete)so.dbOpenError||Dt.resolve().then(Yi),uo&&to(Yi);else if(so.onReadyBeingFired)so.onReadyBeingFired.push(Yi),uo&&to(Yi);else{to(Yi);const To=this;uo||to(function Ji(){To.on.ready.unsubscribe(Yi),To.on.ready.unsubscribe(Ji)})}})}),this.Collection=(xi=this,Xr(Sr.prototype,function(to,Yi){this.db=xi;let uo=er,so=null;if(Yi)try{uo=Yi()}catch(ln){so=ln}const To=to._ctx,Ji=To.table,Wo=Ji.hook.reading.fire;this._ctx={table:Ji,index:To.index,isPrimKey:!To.index||Ji.schema.primKey.keyPath&&To.index===Ji.schema.primKey.name,range:uo,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:so,or:To.or,valueMapper:Wo!==ze?Wo:null}})),this.Table=(to=this,Xr(Jr.prototype,function(Yi,uo,so){this.db=to,this._tx=so,this.name=Yi,this.schema=uo,this.hook=to._allTables[Yi]?to._allTables[Yi].hook:Wr(null,{creating:[Ue,Oe],reading:[$e,ze],updating:[st,Oe],deleting:[ot,Oe]})})),this.Transaction=function(to){return Xr($o.prototype,function(Yi,uo,so,To,Ji){this.db=to,this.mode=Yi,this.storeNames=uo,this.schema=so,this.chromeTransactionDurability=To,this.idbtrans=null,this.on=Wr(this,"complete","error","abort"),this.parent=Ji||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Dt((Wo,ln)=>{this._resolve=Wo,this._reject=ln}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},Wo=>{var ln=this.active;return this.active=!1,this.on.error.fire(Wo),this.parent?this.parent._reject(Wo):ln&&this.idbtrans&&this.idbtrans.abort(),xr(Wo)})})}(this),this.Version=function(to){return Xr(si.prototype,function(Yi){this.db=to,this._cfg={version:Yi,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(to){return Xr(gn.prototype,function(Yi,uo,so){this.db=to,this._ctx={table:Yi,index:":id"===uo?null:uo,or:so};const To=to._deps.indexedDB;if(!To)throw new xe.MissingAPI;this._cmp=this._ascending=To.cmp.bind(To),this._descending=(Ji,Wo)=>To.cmp(Wo,Ji),this._max=(Ji,Wo)=>To.cmp(Ji,Wo)>0?Ji:Wo,this._min=(Ji,Wo)=>To.cmp(Ji,Wo)<0?Ji:Wo,this._IDBKeyRange=to._deps.IDBKeyRange})}(this),this.on("versionchange",to=>{to.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",to=>{!to.newVersion||to.newVersion<to.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${to.oldVersion/10}`)}),this._maxKey=Pr(jt.IDBKeyRange),this._createTransaction=(to,Yi,uo,so)=>new this.Transaction(to,Yi,uo,this._options.chromeTransactionDurability,so),this._fireOnBlocked=to=>{this.on("blocked").fire(to),Eo.filter(Yi=>Yi.name===this.name&&Yi!==this&&!Yi._state.vcFired).map(Yi=>Yi.on("versionchange").fire(to))},this.use(rs),this.use(Qa),this.use(Cn),this.use(Vl),this.vip=Object.create(this,{_vip:{value:!0}}),Nn.forEach(to=>to(this))}version(ht){if(isNaN(ht)||ht<.1)throw new xe.Type("Given version is not a positive number");if(ht=Math.round(10*ht)/10,this.idbdb||this._state.isBeingOpened)throw new xe.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,ht);const jt=this._versions;var yn=jt.filter(Nn=>Nn._cfg.version===ht)[0];return yn||(yn=new this.Version(ht),jt.push(yn),jt.sort(Ca),yn.stores({}),this._state.autoSchema=!1,yn)}_whenReady(ht){return this.idbdb&&(this._state.openComplete||Bn.letThrough||this._vip)?ht():new Dt((jt,yn)=>{if(this._state.openComplete)return yn(new xe.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void yn(new xe.DatabaseClosed);this.open().catch(Oe)}this._state.dbReadyPromise.then(jt,yn)}).then(ht)}use({stack:ht,create:jt,level:yn,name:Nn}){Nn&&this.unuse({stack:ht,name:Nn});const hi=this._middlewares[ht]||(this._middlewares[ht]=[]);return hi.push({stack:ht,create:jt,level:yn??10,name:Nn}),hi.sort((xi,to)=>xi.level-to.level),this}unuse({stack:ht,name:jt,create:yn}){return ht&&this._middlewares[ht]&&(this._middlewares[ht]=this._middlewares[ht].filter(Nn=>yn?Nn.create!==yn:!!jt&&Nn.name!==jt)),this}open(){return function Vo(ft){const ht=ft._state,{indexedDB:jt}=ft._deps;if(ht.isBeingOpened||ft.idbdb)return ht.dbReadyPromise.then(()=>ht.dbOpenError?xr(ht.dbOpenError):ft);pe&&(ht.openCanceller._stackHolder=ee()),ht.isBeingOpened=!0,ht.dbOpenError=null,ht.openComplete=!1;const yn=ht.openCanceller;function Nn(){if(ht.openCanceller!==yn)throw new xe.DatabaseClosed("db.open() was cancelled")}let hi=ht.dbReadyResolve,xi=null,to=!1;const Yi=()=>new Dt((uo,so)=>{if(Nn(),!jt)throw new xe.MissingAPI;const To=ft.name,Ji=ht.autoSchema?jt.open(To):jt.open(To,Math.round(10*ft.verno));if(!Ji)throw new xe.MissingAPI;Ji.onerror=Kt(so),Ji.onblocked=Pn(ft._fireOnBlocked),Ji.onupgradeneeded=Pn(Wo=>{if(xi=Ji.transaction,ht.autoSchema&&!ft._options.allowEmptyDB){Ji.onerror=Mn,xi.abort(),Ji.result.close();const Bt=jt.deleteDatabase(To);Bt.onsuccess=Bt.onerror=Pn(()=>{so(new xe.NoSuchDatabase(`Database ${To} doesnt exist`))})}else{xi.onerror=Kt(so);var ln=Wo.oldVersion>Math.pow(2,62)?0:Wo.oldVersion;to=ln<1,ft._novip.idbdb=Ji.result,function Ga(ft,ht,jt,yn){const Nn=ft._dbSchema,hi=ft._createTransaction("readwrite",ft._storeNames,Nn);hi.create(jt),hi._completion.catch(yn);const xi=hi._reject.bind(hi),to=Bn.transless||Bn;rn(()=>{Bn.trans=hi,Bn.transless=to,0===ht?(o(Nn).forEach(Yi=>{ct(jt,Yi,Nn[Yi].primKey,Nn[Yi].indexes)}),Ta(ft,jt),Dt.follow(()=>ft.on.populate.fire(hi)).catch(xi)):function({_novip:Yi},uo,so,To){const Ji=[],Wo=Yi._versions;let ln=Yi._dbSchema=nn(0,Yi.idbdb,To),Bt=!1;return Wo.filter(ti=>ti._cfg.version>=uo).forEach(ti=>{Ji.push(()=>{const Ri=ln,Oi=ti._cfg.dbschema;kn(Yi,Ri,To),kn(Yi,Oi,To),ln=Yi._dbSchema=Oi;const eo=Fi(Ri,Oi);eo.add.forEach(Oo=>{ct(To,Oo[0],Oo[1].primKey,Oo[1].indexes)}),eo.change.forEach(Oo=>{if(Oo.recreate)throw new xe.Upgrade("Not yet support for changing primary key");{const Yo=To.objectStore(Oo.name);Oo.add.forEach(zo=>Ut(Yo,zo)),Oo.change.forEach(zo=>{Yo.deleteIndex(zo.name),Ut(Yo,zo)}),Oo.del.forEach(zo=>Yo.deleteIndex(zo))}});const So=ti._cfg.contentUpgrade;if(So&&ti._cfg.version>uo){Ta(Yi,To),so._memoizedTables={},Bt=!0;let Oo=L(Oi);eo.del.forEach(qr=>{Oo[qr]=Ri[qr]}),gs(Yi,[Yi.Transaction.prototype]),es(Yi,[Yi.Transaction.prototype],o(Oo),Oo),so.schema=Oo;const Yo=te(So);let zo;Yo&&en();const jr=Dt.follow(()=>{if(zo=So(so),zo&&Yo){var qr=Zn.bind(null,null);zo.then(qr,qr)}});return zo&&"function"==typeof zo.then?Dt.resolve(zo):jr.then(()=>zo)}}),Ji.push(Ri=>{var Oi,eo;(!Bt||!fr)&&(Oi=ti._cfg.dbschema,[].slice.call((eo=Ri).db.objectStoreNames).forEach(So=>null==Oi[So]&&eo.db.deleteObjectStore(So))),gs(Yi,[Yi.Transaction.prototype]),es(Yi,[Yi.Transaction.prototype],Yi._storeNames,Yi._dbSchema),so.schema=Yi._dbSchema})}),function Rn(){return Ji.length?Dt.resolve(Ji.shift()(so.idbtrans)).then(Rn):Dt.resolve()}().then(()=>{var ti,Ri;Ri=To,o(ti=ln).forEach(Oi=>{Ri.db.objectStoreNames.contains(Oi)||ct(Ri,Oi,ti[Oi].primKey,ti[Oi].indexes)})})}(ft,ht,hi,jt).catch(xi)})}(ft,ln/10,xi,so)}},so),Ji.onsuccess=Pn(()=>{xi=null;const Wo=ft._novip.idbdb=Ji.result,ln=g(Wo.objectStoreNames);if(ln.length>0)try{const kt=Wo.transaction(1===(Bt=ln).length?Bt[0]:Bt,"readonly");ht.autoSchema?function({_novip:Rn},ti,Ri){Rn.verno=ti.version/10;const Oi=Rn._dbSchema=nn(0,ti,Ri);Rn._storeNames=g(ti.objectStoreNames,0),es(Rn,[Rn._allTables],o(Oi),Oi)}(ft,Wo,kt):(kn(ft,ft._dbSchema,kt),function(Rn,ti){const Ri=Fi(nn(0,Rn.idbdb,ti),Rn._dbSchema);return!(Ri.add.length||Ri.change.some(Oi=>Oi.add.length||Oi.change.length))}(ft,kt)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Ta(ft,kt)}catch{}var Bt;Eo.push(ft),Wo.onversionchange=Pn(kt=>{ht.vcFired=!0,ft.on("versionchange").fire(kt)}),Wo.onclose=Pn(kt=>{ft.on("close").fire(kt)}),to&&function({indexedDB:kt,IDBKeyRange:Rn},ti){!Ni(kt)&&ti!==ei&&vi(kt,Rn).put({name:ti}).catch(Oe)}(ft._deps,To),uo()},so)}).catch(uo=>uo&&"UnknownError"===uo.name&&ht.PR1398_maxLoop>0?(ht.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),Yi()):Dt.reject(uo));return Dt.race([yn,(typeof navigator>"u"?Dt.resolve():Xi()).then(Yi)]).then(()=>(Nn(),ht.onReadyBeingFired=[],Dt.resolve(fo(()=>ft.on.ready.fire(ft.vip))).then(function uo(){if(ht.onReadyBeingFired.length>0){let so=ht.onReadyBeingFired.reduce(Ke,Oe);return ht.onReadyBeingFired=[],Dt.resolve(fo(()=>so(ft.vip))).then(uo)}}))).finally(()=>{ht.onReadyBeingFired=null,ht.isBeingOpened=!1}).then(()=>ft).catch(uo=>{ht.dbOpenError=uo;try{xi&&xi.abort()}catch{}return yn===ht.openCanceller&&ft._close(),xr(uo)}).finally(()=>{ht.openComplete=!0,hi()})}(this)}_close(){const ht=this._state,jt=Eo.indexOf(this);if(jt>=0&&Eo.splice(jt,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}ht.dbReadyPromise=new Dt(yn=>{ht.dbReadyResolve=yn}),ht.openCanceller=new Dt((yn,Nn)=>{ht.cancelOpen=Nn})}close(){this._close();const ht=this._state;this._options.autoOpen=!1,ht.dbOpenError=new xe.DatabaseClosed,ht.isBeingOpened&&ht.cancelOpen(ht.dbOpenError)}delete(){const ht=arguments.length>0,jt=this._state;return new Dt((yn,Nn)=>{const hi=()=>{this.close();var xi=this._deps.indexedDB.deleteDatabase(this.name);xi.onsuccess=Pn(()=>{(function({indexedDB:to,IDBKeyRange:Yi},uo){!Ni(to)&&uo!==ei&&vi(to,Yi).delete(uo).catch(Oe)})(this._deps,this.name),yn()}),xi.onerror=Kt(Nn),xi.onblocked=this._fireOnBlocked};if(ht)throw new xe.InvalidArgument("Arguments not allowed in db.delete()");jt.isBeingOpened?jt.dbReadyPromise.then(hi):hi()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const ht=this._state.dbOpenError;return ht&&"DatabaseClosed"===ht.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return o(this._allTables).map(ht=>this._allTables[ht])}transaction(){const ht=Er.apply(this,arguments);return this._transaction.apply(this,ht)}_transaction(ht,jt,yn){let Nn=Bn.trans;Nn&&Nn.db===this&&-1===ht.indexOf("!")||(Nn=null);const hi=-1!==ht.indexOf("?");let xi,to;ht=ht.replace("!","").replace("?","");try{if(to=jt.map(uo=>{var so=uo instanceof this.Table?uo.name:uo;if("string"!=typeof so)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return so}),"r"==ht||ht===Ii)xi=Ii;else{if("rw"!=ht&&ht!=co)throw new xe.InvalidArgument("Invalid transaction mode: "+ht);xi=co}if(Nn){if(Nn.mode===Ii&&xi===co){if(!hi)throw new xe.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");Nn=null}Nn&&to.forEach(uo=>{if(Nn&&-1===Nn.storeNames.indexOf(uo)){if(!hi)throw new xe.SubTransaction("Table "+uo+" not included in parent transaction.");Nn=null}}),hi&&Nn&&!Nn.active&&(Nn=null)}}catch(uo){return Nn?Nn._promise(null,(so,To)=>{To(uo)}):xr(uo)}const Yi=Ts.bind(null,this,xi,to,Nn,yn);return Nn?Nn._promise(xi,Yi,"lock"):Bn.trans?ui(Bn.transless,()=>this._whenReady(Yi)):this._whenReady(Yi)}table(ht){if(!T(this._allTables,ht))throw new xe.InvalidTable(`Table ${ht} does not exist`);return this._allTables[ht]}}const Ht=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class Kn{constructor(ht){this._subscribe=ht}subscribe(ht,jt,yn){return this._subscribe(ht&&"function"!=typeof ht?ht:{next:ht,error:jt,complete:yn})}[Ht](){return this}}function yi(ft,ht){return o(ht).forEach(jt=>{cl(ft[jt]||(ft[jt]=new Lo),ht[jt])}),ft}let us;try{us={indexedDB:W.indexedDB||W.mozIndexedDB||W.webkitIndexedDB||W.msIndexedDB,IDBKeyRange:W.IDBKeyRange||W.webkitIDBKeyRange}}catch{us={indexedDB:null,IDBKeyRange:null}}const la=vn;function ya(ft){let ht=Wa;try{Wa=!0,Co.storagemutated.fire(ft)}finally{Wa=ht}}y(la,{...Ee,delete:ft=>new la(ft,{addons:[]}).delete(),exists:ft=>new la(ft,{addons:[]}).open().then(ht=>(ht.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(ft){try{return function({indexedDB:ht,IDBKeyRange:jt}){return Ni(ht)?Promise.resolve(ht.databases()).then(yn=>yn.map(Nn=>Nn.name).filter(Nn=>Nn!==ei)):vi(ht,jt).toCollection().primaryKeys()}(la.dependencies).then(ft)}catch{return xr(new xe.MissingAPI)}},defineClass:()=>function(ft){b(this,ft)},ignoreTransaction:ft=>Bn.trans?ui(Bn.transless,ft):ft(),vip:fo,async:function(ft){return function(){try{var ht=Go(ft.apply(this,arguments));return ht&&"function"==typeof ht.then?ht:Dt.resolve(ht)}catch(jt){return xr(jt)}}},spawn:function(ft,ht,jt){try{var yn=Go(ft.apply(jt,ht||[]));return yn&&"function"==typeof yn.then?yn:Dt.resolve(yn)}catch(Nn){return xr(Nn)}},currentTransaction:{get:()=>Bn.trans||null},waitFor:function(ft,ht){const jt=Dt.resolve("function"==typeof ft?la.ignoreTransaction(ft):ft).timeout(ht||6e4);return Bn.trans?Bn.trans.waitFor(jt):jt},Promise:Dt,debug:{get:()=>pe,set:ft=>{z(ft,"dexie"===ft?()=>!0:Yn)}},derive:s,extend:b,props:y,override:_,Events:Wr,on:Co,liveQuery:function Dr(ft){let ht,jt=!1;const yn=new Kn(Nn=>{const hi=te(ft);let xi=!1,to={},Yi={};const uo={get closed(){return xi},unsubscribe:()=>{xi=!0,Co.storagemutated.unsubscribe(Wo)}};Nn.start&&Nn.start(uo);let so=!1,To=!1;function Ji(){return o(Yi).some(Bt=>to[Bt]&&function Fs(ft,ht){const jt=Hl(ht);let yn=jt.next();if(yn.done)return!1;let Nn=yn.value;const hi=Hl(ft);let xi=hi.next(Nn.from),to=xi.value;for(;!yn.done&&!xi.done;){if(Si(to.from,Nn.to)<=0&&Si(to.to,Nn.from)>=0)return!0;Si(Nn.from,to.from)<0?Nn=(yn=jt.next(to.from)).value:to=(xi=hi.next(Nn.from)).value}return!1}(to[Bt],Yi[Bt]))}const Wo=Bt=>{yi(to,Bt),Ji()&&ln()},ln=()=>{if(so||xi)return;to={};const Bt={},kt=function(Rn){hi&&en();const ti=()=>rn(ft,{subscr:Rn,trans:null}),Ri=Bn.trans?ui(Bn.transless,ti):ti();return hi&&Ri.then(Zn,Zn),Ri}(Bt);To||(Co(_i,Wo),To=!0),so=!0,Promise.resolve(kt).then(Rn=>{jt=!0,ht=Rn,so=!1,xi||(Ji()?ln():(to={},Yi=Bt,Nn.next&&Nn.next(Rn)))},Rn=>{so=!1,jt=!1,Nn.error&&Nn.error(Rn),uo.unsubscribe()})};return ln(),uo});return yn.hasValue=()=>jt,yn.getValue=()=>ht,yn},extendObservabilitySet:yi,getByKeyPath:C,setByKeyPath:I,delByKeyPath:function(ft,ht){"string"==typeof ht?I(ft,ht,void 0):"length"in ht&&[].map.call(ht,function(jt){I(ft,jt,void 0)})},shallowClone:L,deepClone:K,getObjectDiff:$r,cmp:Si,asap:w,minKey:pi,addons:[],connections:Eo,errnames:ge,dependencies:us,semVer:"3.2.7",version:"3.2.7".split(".").map(ft=>parseInt(ft)).reduce((ft,ht,jt)=>ft+ht/Math.pow(10,2*jt))}),la.maxKey=Pr(la.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Co(_i,ft=>{if(!Wa){let ht;Jo?(ht=document.createEvent("CustomEvent"),ht.initCustomEvent(Qi,!0,!0,ft)):ht=new CustomEvent(Qi,{detail:ft}),Wa=!0,dispatchEvent(ht),Wa=!1}}),addEventListener(Qi,({detail:ft})=>{Wa||ya(ft)}));let Wa=!1;if(typeof BroadcastChannel<"u"){const ft=new BroadcastChannel(Qi);"function"==typeof ft.unref&&ft.unref(),Co(_i,ht=>{Wa||ft.postMessage(ht)}),ft.onmessage=ht=>{ht.data&&ya(ht.data)}}else if(typeof self<"u"&&typeof navigator<"u"){Co(_i,ht=>{try{Wa||(typeof localStorage<"u"&&localStorage.setItem(Qi,JSON.stringify({trig:Math.random(),changedParts:ht})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(jt=>jt.postMessage({type:Qi,changedParts:ht})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",ht=>{if(ht.key===Qi){const jt=JSON.parse(ht.newValue);jt&&ya(jt.changedParts)}});const ft=self.document&&navigator.serviceWorker;ft&&ft.addEventListener("message",function({data:ht}){ht&&ht.type===Qi&&ya(ht.changedParts)})}Dt.rejectionMapper=function(ft,ht){if(!ft||ft instanceof ve||ft instanceof TypeError||ft instanceof SyntaxError||!ft.name||!Te[ft.name])return ft;var jt=new Te[ft.name](ht||ft.message,ft);return"stack"in ft&&c(jt,"stack",{get:function(){return this.inner.stack}}),jt},z(pe,Yn)},3308:(In,Ze,M)=>{"use strict";function W(P,b,f,S,T,y,d){try{var c=P[y](d),s=c.value}catch(a){return void f(a)}c.done?b(s):Promise.resolve(s).then(S,T)}function o(P){return function(){var b=this,f=arguments;return new Promise(function(S,T){var y=P.apply(b,f);function d(s){W(y,S,T,d,c,"next",s)}function c(s){W(y,S,T,d,c,"throw",s)}d(void 0)})}}M.d(Ze,{A:()=>o})},5737:(In,Ze,M)=>{"use strict";function W(){return W=Object.assign?Object.assign.bind():function(o){for(var P=1;P<arguments.length;P++){var b=arguments[P];for(var f in b)({}).hasOwnProperty.call(b,f)&&(o[f]=b[f])}return o},W.apply(null,arguments)}M.d(Ze,{A:()=>W})},9144:(In,Ze,M)=>{"use strict";function W(o,P){if(null==o)return{};var b={};for(var f in o)if({}.hasOwnProperty.call(o,f)){if(P.indexOf(f)>=0)continue;b[f]=o[f]}return b}M.d(Ze,{A:()=>W})},7270:(In,Ze,M)=>{"use strict";M.d(Ze,{C6:()=>o,Cl:()=>P,fX:()=>C});var W=function(te,pe){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var ae in oe)Object.prototype.hasOwnProperty.call(oe,ae)&&(z[ae]=oe[ae])})(te,pe)};function o(te,pe){if("function"!=typeof pe&&null!==pe)throw new TypeError("Class extends value "+String(pe)+" is not a constructor or null");function z(){this.constructor=te}W(te,pe),te.prototype=null===pe?Object.create(pe):(z.prototype=pe.prototype,new z)}var P=function(){return P=Object.assign||function(pe){for(var z,oe=1,ae=arguments.length;oe<ae;oe++)for(var ee in z=arguments[oe])Object.prototype.hasOwnProperty.call(z,ee)&&(pe[ee]=z[ee]);return pe},P.apply(this,arguments)};function C(te,pe,z){if(z||2===arguments.length)for(var ee,oe=0,ae=pe.length;oe<ae;oe++)(ee||!(oe in pe))&&(ee||(ee=Array.prototype.slice.call(pe,0,oe)),ee[oe]=pe[oe]);return te.concat(ee||Array.prototype.slice.call(pe))}"function"==typeof SuppressedError&&SuppressedError}},In=>{In(In.s=2468)}]);
